summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-10-07 18:29:57 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2013-10-07 18:29:57 +0200
commit9528eae6f62700199aee9bce12a7e9ea40262018 (patch)
tree29de10a4b06bdf64fbc9645ba927b028fddd333d /src
parent686cbf2f1fac0cd2c7b5fdbec44a86661e3a1f22 (diff)
downloadetna_viv-9528eae6f62700199aee9bce12a7e9ea40262018.tar.gz
etna_viv-9528eae6f62700199aee9bce12a7e9ea40262018.tar.xz
rename native directory to src
This is more consistent with other projects.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile28
-rw-r--r--src/Makefile.inc19
-rw-r--r--src/README.md29
-rw-r--r--src/cl/.gitignore2
-rw-r--r--src/cl/Makefile23
-rw-r--r--src/cl/README.md8
-rw-r--r--src/cl/hello.c253
-rw-r--r--src/driver/.gitignore2
-rw-r--r--src/driver/Makefile34
-rw-r--r--src/driver/etna_asm.c114
-rw-r--r--src/driver/etna_asm.h98
-rw-r--r--src/driver/etna_blend.c104
-rw-r--r--src/driver/etna_blend.h32
-rw-r--r--src/driver/etna_clear_blit.c302
-rw-r--r--src/driver/etna_clear_blit.h41
-rw-r--r--src/driver/etna_compiler.c1796
-rw-r--r--src/driver/etna_compiler.h119
-rw-r--r--src/driver/etna_debug.h73
-rw-r--r--src/driver/etna_fence.c176
-rw-r--r--src/driver/etna_fence.h70
-rw-r--r--src/driver/etna_internal.h405
-rw-r--r--src/driver/etna_pipe.c1346
-rw-r--r--src/driver/etna_pipe.h240
-rw-r--r--src/driver/etna_rasterizer.c92
-rw-r--r--src/driver/etna_rasterizer.h32
-rw-r--r--src/driver/etna_resource.c303
-rw-r--r--src/driver/etna_resource.h44
-rw-r--r--src/driver/etna_screen.c579
-rw-r--r--src/driver/etna_screen.h70
-rw-r--r--src/driver/etna_shader.c299
-rw-r--r--src/driver/etna_shader.h39
-rw-r--r--src/driver/etna_surface.c125
-rw-r--r--src/driver/etna_surface.h32
-rw-r--r--src/driver/etna_texture.c236
-rw-r--r--src/driver/etna_texture.h33
-rw-r--r--src/driver/etna_transfer.c246
-rw-r--r--src/driver/etna_transfer.h35
-rw-r--r--src/driver/etna_translate.h554
-rw-r--r--src/driver/etna_zsa.c139
-rw-r--r--src/driver/etna_zsa.h32
-rw-r--r--src/egl/.gitignore11
-rw-r--r--src/egl/Makefile61
-rw-r--r--src/egl/clear_surface.c440
-rw-r--r--src/egl/cube.c440
-rw-r--r--src/egl/cube_companion.c373
-rw-r--r--src/egl/cube_companion_idx.c357
-rw-r--r--src/egl/cube_x11.c385
-rw-r--r--src/egl/displacement.c347
-rw-r--r--src/egl/eglinfo.c172
-rw-r--r--src/egl/es2gears.c723
-rwxr-xr-xsrc/egl/exec_egl2.sh14
-rw-r--r--src/egl/glut_test.c432
-rw-r--r--src/egl/particle_system_x11.c319
-rw-r--r--src/egl/ps_sandbox.c273
-rw-r--r--src/egl/simple_texture_cubemap.c325
-rw-r--r--src/egl/stencil_test.c401
-rw-r--r--src/etnaviv/.gitignore2
-rw-r--r--src/etnaviv/Makefile40
-rw-r--r--src/etnaviv/README.md18
-rw-r--r--src/etnaviv/cmdstream.xml.h218
-rw-r--r--src/etnaviv/common.xml.h221
-rw-r--r--src/etnaviv/etna.c688
-rw-r--r--src/etnaviv/etna.h370
-rw-r--r--src/etnaviv/etna_fb.c119
-rw-r--r--src/etnaviv/etna_fb.h38
-rw-r--r--src/etnaviv/etna_mem.c189
-rw-r--r--src/etnaviv/etna_mem.h74
-rw-r--r--src/etnaviv/etna_queue.c136
-rw-r--r--src/etnaviv/etna_queue.h102
-rw-r--r--src/etnaviv/etna_rs.c155
-rw-r--r--src/etnaviv/etna_rs.h81
-rw-r--r--src/etnaviv/etna_tex.c76
-rw-r--r--src/etnaviv/etna_tex.h45
-rw-r--r--src/etnaviv/etna_util.h106
-rw-r--r--src/etnaviv/isa.xml.h206
-rw-r--r--src/etnaviv/state.xml.h348
-rw-r--r--src/etnaviv/state_2d.xml.h1473
-rw-r--r--src/etnaviv/state_3d.xml.h1147
-rw-r--r--src/etnaviv/state_hi.xml.h364
-rw-r--r--src/etnaviv/state_vg.xml.h181
-rw-r--r--src/etnaviv/viv.c562
-rw-r--r--src/etnaviv/viv.h299
-rw-r--r--src/etnaviv/viv_internal.h93
-rw-r--r--src/etnaviv/viv_profile.c176
-rw-r--r--src/etnaviv/viv_profile.h93
-rw-r--r--src/fb/.gitignore17
-rw-r--r--src/fb/Makefile59
-rw-r--r--src/fb/alpha_blend.c363
-rw-r--r--src/fb/cube_companion.c418
-rw-r--r--src/fb/cubemap_sphere.c396
-rw-r--r--src/fb/displacement.c429
-rw-r--r--src/fb/downsample_test.c153
-rw-r--r--src/fb/etna_gears.c650
-rwxr-xr-xsrc/fb/exec_fb.sh35
-rw-r--r--src/fb/mip_cube.c543
-rw-r--r--src/fb/particle_system.c406
-rw-r--r--src/fb/ps_sandbox.c366
-rw-r--r--src/fb/rotate_cube.c431
-rw-r--r--src/fb/stencil_test.c518
-rwxr-xr-xsrc/fb/sync_cubox.sh13
-rwxr-xr-xsrc/fb/sync_gcw.sh7
-rw-r--r--src/fb/viv_profile.c43
-rw-r--r--src/fb_old/.gitignore11
-rw-r--r--src/fb_old/Makefile37
-rw-r--r--src/fb_old/cube_companion.c687
-rw-r--r--src/fb_old/etna_test.c513
-rw-r--r--src/fb_old/fbtest.c549
-rw-r--r--src/fb_old/mip_cube_raw.c651
-rw-r--r--src/fb_old/rotate_cube.c645
-rw-r--r--src/fb_old/rstests.c330
-rw-r--r--src/fb_rawshader/.gitignore13
-rw-r--r--src/fb_rawshader/Makefile46
-rw-r--r--src/fb_rawshader/alpha_blend.c376
-rw-r--r--src/fb_rawshader/alpha_blend_vs.asm15
-rw-r--r--src/fb_rawshader/cube_companion.c423
-rw-r--r--src/fb_rawshader/cube_companion_ps.asm3
-rw-r--r--src/fb_rawshader/cube_companion_vs.asm24
-rw-r--r--src/fb_rawshader/cubemap_sphere.c405
-rw-r--r--src/fb_rawshader/cubemap_sphere_ps.asm5
-rw-r--r--src/fb_rawshader/cubemap_sphere_vs.asm25
-rw-r--r--src/fb_rawshader/displacement.c439
-rw-r--r--src/fb_rawshader/displacement_ps.asm1
-rw-r--r--src/fb_rawshader/displacement_vs.asm33
-rw-r--r--src/fb_rawshader/etna_gears.c658
-rw-r--r--src/fb_rawshader/etna_gears_ps.asm12
-rw-r--r--src/fb_rawshader/etna_gears_vs.asm67
-rwxr-xr-xsrc/fb_rawshader/exec_fb.sh35
-rw-r--r--src/fb_rawshader/mip_cube.c509
-rw-r--r--src/fb_rawshader/mip_cube_ps.asm4
-rw-r--r--src/fb_rawshader/mip_cube_vs.asm25
-rw-r--r--src/fb_rawshader/particle_system.c408
-rw-r--r--src/fb_rawshader/particle_system_ps.asm8
-rw-r--r--src/fb_rawshader/particle_system_vs.asm31
-rw-r--r--src/fb_rawshader/rotate_cube.c439
-rw-r--r--src/fb_rawshader/shader.binbin0 -> 368 bytes
-rw-r--r--src/fb_rawshader/stencil_test.c537
-rw-r--r--src/fb_rawshader/stencil_test_ps.asm4
-rw-r--r--src/fb_rawshader/stencil_test_vs.asm5
-rw-r--r--src/include_arnova/gc_abi.h58
-rw-r--r--src/include_arnova/gc_hal.h1900
-rw-r--r--src/include_arnova/gc_hal_base.h2573
-rw-r--r--src/include_arnova/gc_hal_compiler.h1955
-rw-r--r--src/include_arnova/gc_hal_driver.h588
-rw-r--r--src/include_arnova/gc_hal_dump.h90
-rw-r--r--src/include_arnova/gc_hal_engine.h1597
-rw-r--r--src/include_arnova/gc_hal_enum.h608
-rw-r--r--src/include_arnova/gc_hal_mem.h471
-rw-r--r--src/include_arnova/gc_hal_options.h263
-rw-r--r--src/include_arnova/gc_hal_profiler.h817
-rw-r--r--src/include_arnova/gc_hal_raster.h842
-rw-r--r--src/include_arnova/gc_hal_types.h545
-rw-r--r--src/include_arnova/gc_hal_user_context.h170
-rw-r--r--src/include_dove/gc_abi.h53
-rw-r--r--src/include_dove/gc_hal.h2071
-rw-r--r--src/include_dove/gc_hal_base.h2828
-rw-r--r--src/include_dove/gc_hal_compiler.h1841
-rw-r--r--src/include_dove/gc_hal_driver.h640
-rw-r--r--src/include_dove/gc_hal_dump.h90
-rw-r--r--src/include_dove/gc_hal_engine.h1673
-rw-r--r--src/include_dove/gc_hal_enum.h565
-rw-r--r--src/include_dove/gc_hal_mem.h472
-rw-r--r--src/include_dove/gc_hal_options.h532
-rw-r--r--src/include_dove/gc_hal_profiler.h221
-rw-r--r--src/include_dove/gc_hal_raster.h807
-rw-r--r--src/include_dove/gc_hal_types.h601
-rw-r--r--src/include_dove/gc_hal_user_context.h199
-rw-r--r--src/include_dove_old/gc_abi.h52
-rw-r--r--src/include_dove_old/gc_hal.h1642
-rw-r--r--src/include_dove_old/gc_hal_base.h2630
-rw-r--r--src/include_dove_old/gc_hal_compiler.h1841
-rw-r--r--src/include_dove_old/gc_hal_driver.h634
-rw-r--r--src/include_dove_old/gc_hal_dump.h90
-rw-r--r--src/include_dove_old/gc_hal_engine.h1593
-rw-r--r--src/include_dove_old/gc_hal_enum.h534
-rw-r--r--src/include_dove_old/gc_hal_mem.h472
-rw-r--r--src/include_dove_old/gc_hal_options.h326
-rw-r--r--src/include_dove_old/gc_hal_profiler.h232
-rw-r--r--src/include_dove_old/gc_hal_raster.h792
-rw-r--r--src/include_dove_old/gc_hal_types.h543
-rw-r--r--src/include_dove_old/gc_hal_user_context.h165
-rw-r--r--src/include_eureka/gc_abi.h54
-rw-r--r--src/include_eureka/gc_hal.h2345
-rw-r--r--src/include_eureka/gc_hal_base.h3612
-rw-r--r--src/include_eureka/gc_hal_compiler.h3400
-rw-r--r--src/include_eureka/gc_hal_driver.h927
-rw-r--r--src/include_eureka/gc_hal_driver_vg.h293
-rw-r--r--src/include_eureka/gc_hal_dump.h89
-rw-r--r--src/include_eureka/gc_hal_eglplatform.h621
-rw-r--r--src/include_eureka/gc_hal_engine.h1847
-rw-r--r--src/include_eureka/gc_hal_engine_vg.h908
-rw-r--r--src/include_eureka/gc_hal_enum.h823
-rw-r--r--src/include_eureka/gc_hal_kernel.h789
-rw-r--r--src/include_eureka/gc_hal_kernel_buffer.h192
-rw-r--r--src/include_eureka/gc_hal_kernel_context.h146
-rw-r--r--src/include_eureka/gc_hal_kernel_debug.h100
-rw-r--r--src/include_eureka/gc_hal_kernel_device.h170
-rw-r--r--src/include_eureka/gc_hal_kernel_hardware.h112
-rw-r--r--src/include_eureka/gc_hal_kernel_linux.h93
-rw-r--r--src/include_eureka/gc_hal_kernel_os.h88
-rw-r--r--src/include_eureka/gc_hal_kernel_precomp.h31
-rw-r--r--src/include_eureka/gc_hal_kernel_vg.h90
-rw-r--r--src/include_eureka/gc_hal_md5.h112
-rw-r--r--src/include_eureka/gc_hal_mem.h532
-rw-r--r--src/include_eureka/gc_hal_options.h758
-rw-r--r--src/include_eureka/gc_hal_profiler.h1311
-rw-r--r--src/include_eureka/gc_hal_raster.h933
-rw-r--r--src/include_eureka/gc_hal_rename.h250
-rw-r--r--src/include_eureka/gc_hal_types.h970
-rw-r--r--src/include_eureka/gc_hal_version.h39
-rw-r--r--src/include_eureka/gc_hal_vg.h933
-rw-r--r--src/include_imx6/gc_abi.h56
-rw-r--r--src/include_imx6/gc_hal.h2339
-rw-r--r--src/include_imx6/gc_hal_base.h3612
-rw-r--r--src/include_imx6/gc_hal_compiler.h3400
-rw-r--r--src/include_imx6/gc_hal_driver.h901
-rw-r--r--src/include_imx6/gc_hal_driver_vg.h292
-rw-r--r--src/include_imx6/gc_hal_dump.h89
-rw-r--r--src/include_imx6/gc_hal_eglplatform.h621
-rw-r--r--src/include_imx6/gc_hal_engine.h1847
-rw-r--r--src/include_imx6/gc_hal_engine_vg.h908
-rw-r--r--src/include_imx6/gc_hal_enum.h823
-rw-r--r--src/include_imx6/gc_hal_kernel.h789
-rw-r--r--src/include_imx6/gc_hal_kernel_buffer.h192
-rw-r--r--src/include_imx6/gc_hal_kernel_context.h146
-rw-r--r--src/include_imx6/gc_hal_kernel_debug.h100
-rw-r--r--src/include_imx6/gc_hal_kernel_device.h177
-rw-r--r--src/include_imx6/gc_hal_kernel_hardware.h112
-rw-r--r--src/include_imx6/gc_hal_kernel_hardware_command_vg.h323
-rw-r--r--src/include_imx6/gc_hal_kernel_hardware_vg.h76
-rw-r--r--src/include_imx6/gc_hal_kernel_linux.h88
-rw-r--r--src/include_imx6/gc_hal_kernel_os.h88
-rw-r--r--src/include_imx6/gc_hal_kernel_precomp.h31
-rw-r--r--src/include_imx6/gc_hal_kernel_vg.h90
-rw-r--r--src/include_imx6/gc_hal_md5.h112
-rw-r--r--src/include_imx6/gc_hal_mem.h532
-rw-r--r--src/include_imx6/gc_hal_options.h756
-rw-r--r--src/include_imx6/gc_hal_profiler.h1311
-rw-r--r--src/include_imx6/gc_hal_raster.h933
-rw-r--r--src/include_imx6/gc_hal_rename.h250
-rw-r--r--src/include_imx6/gc_hal_types.h970
-rw-r--r--src/include_imx6/gc_hal_version.h39
-rw-r--r--src/include_imx6/gc_hal_vg.h933
-rw-r--r--src/include_imx6_v4_0_0/gc_abi.h60
-rw-r--r--src/include_imx6_v4_0_0/gc_hal.h2573
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_base.h3732
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_compiler.h4130
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_driver.h988
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_driver_vg.h270
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_dump.h88
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_eglplatform.h616
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_eglplatform_type.h286
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_engine.h2028
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_engine_vg.h904
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_enum.h886
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_kernel.h981
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_kernel_buffer.h185
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_kernel_context.h144
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_kernel_debug.h102
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_kernel_debugfs.h84
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_kernel_device.h179
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_kernel_hardware.h133
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_kernel_hardware_command_vg.h319
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_kernel_hardware_vg.h72
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_kernel_linux.h88
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_kernel_os.h79
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_kernel_precomp.h29
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_kernel_vg.h85
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_md5.h112
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_mem.h530
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_options.h861
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_profiler.h1336
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_raster.h962
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_rename.h248
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_statistics.h115
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_types.h1002
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_version.h37
-rw-r--r--src/include_imx6_v4_0_0/gc_hal_vg.h907
-rw-r--r--src/include_imx6_v4_1_0/gc_abi.h61
-rw-r--r--src/include_imx6_v4_1_0/gc_hal.h2579
-rw-r--r--src/include_imx6_v4_1_0/gc_hal_base.h3730
-rw-r--r--src/include_imx6_v4_1_0/gc_hal_driver.h991
-rw-r--r--src/include_imx6_v4_1_0/gc_hal_dump.h88
-rw-r--r--src/include_imx6_v4_1_0/gc_hal_enum.h879
-rw-r--r--src/include_imx6_v4_1_0/gc_hal_kernel_buffer.h185
-rw-r--r--src/include_imx6_v4_1_0/gc_hal_options.h869
-rw-r--r--src/include_imx6_v4_1_0/gc_hal_profiler.h1336
-rw-r--r--src/include_imx6_v4_1_0/gc_hal_rename.h248
-rw-r--r--src/include_imx6_v4_1_0/gc_hal_statistics.h115
-rw-r--r--src/include_imx6_v4_1_0/gc_hal_types.h1002
-rw-r--r--src/include_imx6_v4_1_0/gc_hal_version.h37
-rw-r--r--src/include_v2/gc_abi.h52
-rw-r--r--src/include_v2/gc_hal.h1900
-rw-r--r--src/include_v2/gc_hal_base.h2573
-rw-r--r--src/include_v2/gc_hal_compiler.h1955
-rw-r--r--src/include_v2/gc_hal_driver.h641
-rw-r--r--src/include_v2/gc_hal_dump.h90
-rw-r--r--src/include_v2/gc_hal_engine.h1597
-rw-r--r--src/include_v2/gc_hal_enum.h608
-rw-r--r--src/include_v2/gc_hal_mem.h471
-rw-r--r--src/include_v2/gc_hal_options.h263
-rw-r--r--src/include_v2/gc_hal_profiler.h817
-rw-r--r--src/include_v2/gc_hal_raster.h842
-rw-r--r--src/include_v2/gc_hal_types.h545
-rw-r--r--src/include_v2/gc_hal_user_context.h170
-rw-r--r--src/include_v4/gc_abi.h54
-rw-r--r--src/include_v4/gc_hal.h2372
-rw-r--r--src/include_v4/gc_hal_base.h3612
-rw-r--r--src/include_v4/gc_hal_compiler.h3400
-rw-r--r--src/include_v4/gc_hal_driver.h901
-rw-r--r--src/include_v4/gc_hal_driver_vg.h292
-rw-r--r--src/include_v4/gc_hal_dump.h89
-rw-r--r--src/include_v4/gc_hal_eglplatform.h621
-rw-r--r--src/include_v4/gc_hal_engine.h1847
-rw-r--r--src/include_v4/gc_hal_engine_vg.h908
-rw-r--r--src/include_v4/gc_hal_enum.h823
-rw-r--r--src/include_v4/gc_hal_kernel_buffer.h192
-rw-r--r--src/include_v4/gc_hal_md5.h112
-rw-r--r--src/include_v4/gc_hal_mem.h532
-rw-r--r--src/include_v4/gc_hal_options.h756
-rw-r--r--src/include_v4/gc_hal_profiler.h1311
-rw-r--r--src/include_v4/gc_hal_raster.h933
-rw-r--r--src/include_v4/gc_hal_rename.h250
-rw-r--r--src/include_v4/gc_hal_types.h970
-rw-r--r--src/include_v4/gc_hal_version.h39
-rw-r--r--src/include_v4/gc_hal_vg.h933
-rw-r--r--src/include_v4_uapi/gc_abi.h47
-rw-r--r--src/include_v4_uapi/gc_hal.h1595
-rw-r--r--src/lib/dds.c341
-rw-r--r--src/lib/dds.h69
-rw-r--r--src/lib/dump_gl_screen.c22
-rw-r--r--src/lib/dump_gl_screen.h9
-rw-r--r--src/lib/eglutil.c67
-rw-r--r--src/lib/eglutil.h33
-rw-r--r--src/lib/elf_hook.c498
-rw-r--r--src/lib/elf_hook.h15
-rw-r--r--src/lib/esShader.c155
-rw-r--r--src/lib/esShader.h72
-rw-r--r--src/lib/esShapes.c290
-rw-r--r--src/lib/esShapes.h58
-rw-r--r--src/lib/esTransform.c293
-rw-r--r--src/lib/esTransform.h125
-rw-r--r--src/lib/esUtil.c107
-rw-r--r--src/lib/esUtil.h51
-rw-r--r--src/lib/esWindow.c349
-rw-r--r--src/lib/esWindow.h154
-rw-r--r--src/lib/etna_bswap.c195
-rw-r--r--src/lib/etna_bswap.h76
-rw-r--r--src/lib/etna_rawshader.c164
-rw-r--r--src/lib/etna_rawshader.h61
-rw-r--r--src/lib/fbdemos.c326
-rw-r--r--src/lib/fbdemos.h98
-rw-r--r--src/lib/flightrecorder.cpp413
-rw-r--r--src/lib/flightrecorder.h186
-rw-r--r--src/lib/interval.h120
-rw-r--r--src/lib/interval_test.cpp38
-rw-r--r--src/lib/read_png.c158
-rw-r--r--src/lib/read_png.h11
-rw-r--r--src/lib/viv_hook.c369
-rw-r--r--src/lib/viv_hook.h16
-rw-r--r--src/lib/write_bmp.c152
-rw-r--r--src/lib/write_bmp.h34
-rw-r--r--src/minigallium/.gitignore3
-rw-r--r--src/minigallium/Makefile73
-rw-r--r--src/minigallium/README.md6
-rw-r--r--src/minigallium/auxiliary/cso_cache/cso_cache.c322
-rw-r--r--src/minigallium/auxiliary/cso_cache/cso_cache.h175
-rw-r--r--src/minigallium/auxiliary/cso_cache/cso_context.c1431
-rw-r--r--src/minigallium/auxiliary/cso_cache/cso_context.h239
-rw-r--r--src/minigallium/auxiliary/cso_cache/cso_hash.c439
-rw-r--r--src/minigallium/auxiliary/cso_cache/cso_hash.h129
-rw-r--r--src/minigallium/auxiliary/os/os_memory.h80
-rw-r--r--src/minigallium/auxiliary/os/os_memory_aligned.h72
-rw-r--r--src/minigallium/auxiliary/os/os_memory_debug.h92
-rw-r--r--src/minigallium/auxiliary/os/os_memory_stdc.h76
-rw-r--r--src/minigallium/auxiliary/os/os_misc.c91
-rw-r--r--src/minigallium/auxiliary/os/os_misc.h95
-rw-r--r--src/minigallium/auxiliary/os/os_mman.h87
-rw-r--r--src/minigallium/auxiliary/os/os_thread.h510
-rw-r--r--src/minigallium/auxiliary/os/os_time.c94
-rw-r--r--src/minigallium/auxiliary/os/os_time.h101
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_build.c1373
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_build.h118
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_dump.c723
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_dump.h77
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_exec.c4536
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_exec.h463
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_info.c368
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_info.h113
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_iterate.c90
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_iterate.h80
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_opcode_tmp.h231
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_parse.c307
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_parse.h159
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_sanity.c562
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_sanity.h52
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_scan.c398
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_scan.h109
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_strings.c201
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_strings.h71
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_text.c1591
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_text.h49
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_transform.c250
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_transform.h96
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_ureg.c1795
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_ureg.h1278
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_util.c461
-rw-r--r--src/minigallium/auxiliary/tgsi/tgsi_util.h89
-rw-r--r--src/minigallium/auxiliary/translate/translate.c55
-rw-r--r--src/minigallium/auxiliary/translate/translate.h160
-rw-r--r--src/minigallium/auxiliary/translate/translate_cache.c106
-rw-r--r--src/minigallium/auxiliary/translate/translate_cache.h54
-rw-r--r--src/minigallium/auxiliary/translate/translate_generic.c997
-rw-r--r--src/minigallium/auxiliary/translate/translate_sse.c1569
-rw-r--r--src/minigallium/auxiliary/util/dbghelp.h1265
-rw-r--r--src/minigallium/auxiliary/util/texcompress_etc_tmp.h170
-rw-r--r--src/minigallium/auxiliary/util/texcompress_rgtc_tmp.h418
-rw-r--r--src/minigallium/auxiliary/util/u_atomic.h349
-rw-r--r--src/minigallium/auxiliary/util/u_bitmask.c328
-rw-r--r--src/minigallium/auxiliary/util/u_bitmask.h117
-rw-r--r--src/minigallium/auxiliary/util/u_blit.c954
-rw-r--r--src/minigallium/auxiliary/util/u_blit.h85
-rw-r--r--src/minigallium/auxiliary/util/u_blitter.c1877
-rw-r--r--src/minigallium/auxiliary/util/u_blitter.h531
-rw-r--r--src/minigallium/auxiliary/util/u_box.h80
-rw-r--r--src/minigallium/auxiliary/util/u_cache.c351
-rw-r--r--src/minigallium/auxiliary/util/u_cache.h91
-rw-r--r--src/minigallium/auxiliary/util/u_caps.c269
-rw-r--r--src/minigallium/auxiliary/util/u_caps.h71
-rw-r--r--src/minigallium/auxiliary/util/u_clear.h59
-rw-r--r--src/minigallium/auxiliary/util/u_cpu_detect.c458
-rw-r--r--src/minigallium/auxiliary/util/u_cpu_detect.h87
-rw-r--r--src/minigallium/auxiliary/util/u_debug.c730
-rw-r--r--src/minigallium/auxiliary/util/u_debug.h459
-rw-r--r--src/minigallium/auxiliary/util/u_debug_describe.c91
-rw-r--r--src/minigallium/auxiliary/util/u_debug_describe.h51
-rw-r--r--src/minigallium/auxiliary/util/u_debug_memory.c451
-rw-r--r--src/minigallium/auxiliary/util/u_debug_refcnt.c195
-rw-r--r--src/minigallium/auxiliary/util/u_debug_refcnt.h63
-rw-r--r--src/minigallium/auxiliary/util/u_debug_stack.c161
-rw-r--r--src/minigallium/auxiliary/util/u_debug_stack.h72
-rw-r--r--src/minigallium/auxiliary/util/u_debug_symbol.c326
-rw-r--r--src/minigallium/auxiliary/util/u_debug_symbol.h58
-rw-r--r--src/minigallium/auxiliary/util/u_dirty_flags.h32
-rw-r--r--src/minigallium/auxiliary/util/u_dirty_surfaces.h119
-rw-r--r--src/minigallium/auxiliary/util/u_dl.c94
-rw-r--r--src/minigallium/auxiliary/util/u_dl.h83
-rw-r--r--src/minigallium/auxiliary/util/u_double_list.h147
-rw-r--r--src/minigallium/auxiliary/util/u_draw.c125
-rw-r--r--src/minigallium/auxiliary/util/u_draw.h157
-rw-r--r--src/minigallium/auxiliary/util/u_draw_quad.c158
-rw-r--r--src/minigallium/auxiliary/util/u_draw_quad.h66
-rw-r--r--src/minigallium/auxiliary/util/u_dual_blend.h26
-rw-r--r--src/minigallium/auxiliary/util/u_dump.h181
-rw-r--r--src/minigallium/auxiliary/util/u_dump_defines.c361
-rw-r--r--src/minigallium/auxiliary/util/u_dump_state.c836
-rw-r--r--src/minigallium/auxiliary/util/u_dynarray.h114
-rw-r--r--src/minigallium/auxiliary/util/u_fifo.h94
-rw-r--r--src/minigallium/auxiliary/util/u_format.c725
-rw-r--r--src/minigallium/auxiliary/util/u_format.csv374
-rw-r--r--src/minigallium/auxiliary/util/u_format.h1196
-rw-r--r--src/minigallium/auxiliary/util/u_format_etc.c81
-rw-r--r--src/minigallium/auxiliary/util/u_format_etc.h46
-rw-r--r--src/minigallium/auxiliary/util/u_format_latc.c332
-rw-r--r--src/minigallium/auxiliary/util/u_format_latc.h108
-rw-r--r--src/minigallium/auxiliary/util/u_format_other.c472
-rw-r--r--src/minigallium/auxiliary/util/u_format_other.h134
-rw-r--r--src/minigallium/auxiliary/util/u_format_pack.py725
-rwxr-xr-xsrc/minigallium/auxiliary/util/u_format_parse.py313
-rw-r--r--src/minigallium/auxiliary/util/u_format_r11g11b10f.h232
-rw-r--r--src/minigallium/auxiliary/util/u_format_rgb9e5.h164
-rw-r--r--src/minigallium/auxiliary/util/u_format_rgtc.c474
-rw-r--r--src/minigallium/auxiliary/util/u_format_rgtc.h114
-rw-r--r--src/minigallium/auxiliary/util/u_format_s3tc.c794
-rw-r--r--src/minigallium/auxiliary/util/u_format_s3tc.h218
-rw-r--r--src/minigallium/auxiliary/util/u_format_srgb.c178
-rw-r--r--src/minigallium/auxiliary/util/u_format_srgb.h147
-rw-r--r--src/minigallium/auxiliary/util/u_format_srgb.py100
-rw-r--r--src/minigallium/auxiliary/util/u_format_table.c33985
-rwxr-xr-xsrc/minigallium/auxiliary/util/u_format_table.py219
-rw-r--r--src/minigallium/auxiliary/util/u_format_tests.c1011
-rw-r--r--src/minigallium/auxiliary/util/u_format_tests.h71
-rw-r--r--src/minigallium/auxiliary/util/u_format_yuv.c1193
-rw-r--r--src/minigallium/auxiliary/util/u_format_yuv.h364
-rw-r--r--src/minigallium/auxiliary/util/u_format_zs.c973
-rw-r--r--src/minigallium/auxiliary/util/u_format_zs.h212
-rw-r--r--src/minigallium/auxiliary/util/u_framebuffer.c148
-rw-r--r--src/minigallium/auxiliary/util/u_framebuffer.h62
-rw-r--r--src/minigallium/auxiliary/util/u_gen_mipmap.c1704
-rw-r--r--src/minigallium/auxiliary/util/u_gen_mipmap.h64
-rw-r--r--src/minigallium/auxiliary/util/u_half.h131
-rw-r--r--src/minigallium/auxiliary/util/u_handle_table.c298
-rw-r--r--src/minigallium/auxiliary/util/u_handle_table.h116
-rw-r--r--src/minigallium/auxiliary/util/u_hash.c121
-rw-r--r--src/minigallium/auxiliary/util/u_hash.h55
-rw-r--r--src/minigallium/auxiliary/util/u_hash_table.c293
-rw-r--r--src/minigallium/auxiliary/util/u_hash_table.h96
-rw-r--r--src/minigallium/auxiliary/util/u_helpers.c90
-rw-r--r--src/minigallium/auxiliary/util/u_helpers.h51
-rw-r--r--src/minigallium/auxiliary/util/u_index_modify.c203
-rw-r--r--src/minigallium/auxiliary/util/u_index_modify.h72
-rw-r--r--src/minigallium/auxiliary/util/u_init.h52
-rw-r--r--src/minigallium/auxiliary/util/u_inlines.h644
-rw-r--r--src/minigallium/auxiliary/util/u_keymap.c318
-rw-r--r--src/minigallium/auxiliary/util/u_keymap.h68
-rw-r--r--src/minigallium/auxiliary/util/u_linear.c101
-rw-r--r--src/minigallium/auxiliary/util/u_linear.h106
-rw-r--r--src/minigallium/auxiliary/util/u_linkage.c149
-rw-r--r--src/minigallium/auxiliary/util/u_linkage.h67
-rw-r--r--src/minigallium/auxiliary/util/u_math.c137
-rw-r--r--src/minigallium/auxiliary/util/u_math.h783
-rw-r--r--src/minigallium/auxiliary/util/u_memory.h100
-rw-r--r--src/minigallium/auxiliary/util/u_mm.c296
-rw-r--r--src/minigallium/auxiliary/util/u_mm.h91
-rw-r--r--src/minigallium/auxiliary/util/u_network.c191
-rw-r--r--src/minigallium/auxiliary/util/u_network.h25
-rw-r--r--src/minigallium/auxiliary/util/u_pack_color.h651
-rw-r--r--src/minigallium/auxiliary/util/u_pointer.h130
-rw-r--r--src/minigallium/auxiliary/util/u_prim.h268
-rw-r--r--src/minigallium/auxiliary/util/u_pstipple.c456
-rw-r--r--src/minigallium/auxiliary/util/u_pstipple.h56
-rw-r--r--src/minigallium/auxiliary/util/u_range.h89
-rw-r--r--src/minigallium/auxiliary/util/u_rect.h92
-rw-r--r--src/minigallium/auxiliary/util/u_resource.c65
-rw-r--r--src/minigallium/auxiliary/util/u_resource.h52
-rw-r--r--src/minigallium/auxiliary/util/u_ringbuffer.c160
-rw-r--r--src/minigallium/auxiliary/util/u_ringbuffer.h29
-rw-r--r--src/minigallium/auxiliary/util/u_sampler.c109
-rw-r--r--src/minigallium/auxiliary/util/u_sampler.h57
-rw-r--r--src/minigallium/auxiliary/util/u_simple_list.h199
-rw-r--r--src/minigallium/auxiliary/util/u_simple_shaders.c529
-rw-r--r--src/minigallium/auxiliary/util/u_simple_shaders.h130
-rw-r--r--src/minigallium/auxiliary/util/u_slab.c171
-rw-r--r--src/minigallium/auxiliary/util/u_slab.h87
-rw-r--r--src/minigallium/auxiliary/util/u_snprintf.c1489
-rw-r--r--src/minigallium/auxiliary/util/u_split_prim.h114
-rw-r--r--src/minigallium/auxiliary/util/u_sse.h260
-rw-r--r--src/minigallium/auxiliary/util/u_staging.c132
-rw-r--r--src/minigallium/auxiliary/util/u_staging.h63
-rw-r--r--src/minigallium/auxiliary/util/u_string.h232
-rw-r--r--src/minigallium/auxiliary/util/u_suballoc.c132
-rw-r--r--src/minigallium/auxiliary/util/u_suballoc.h48
-rw-r--r--src/minigallium/auxiliary/util/u_surface.c684
-rw-r--r--src/minigallium/auxiliary/util/u_surface.h111
-rw-r--r--src/minigallium/auxiliary/util/u_surfaces.c124
-rw-r--r--src/minigallium/auxiliary/util/u_surfaces.h101
-rw-r--r--src/minigallium/auxiliary/util/u_texture.c103
-rw-r--r--src/minigallium/auxiliary/util/u_texture.h54
-rw-r--r--src/minigallium/auxiliary/util/u_tile.c895
-rw-r--r--src/minigallium/auxiliary/util/u_tile.h165
-rw-r--r--src/minigallium/auxiliary/util/u_time.h150
-rw-r--r--src/minigallium/auxiliary/util/u_transfer.c163
-rw-r--r--src/minigallium/auxiliary/util/u_transfer.h109
-rw-r--r--src/minigallium/auxiliary/util/u_upload_mgr.c271
-rw-r--r--src/minigallium/auxiliary/util/u_upload_mgr.h130
-rw-r--r--src/minigallium/auxiliary/util/u_vbuf.c1335
-rw-r--r--src/minigallium/auxiliary/util/u_vbuf.h93
-rw-r--r--src/minigallium/auxiliary/util/u_video.h75
-rw-r--r--src/minigallium/include/c99_compat.h0
-rw-r--r--src/minigallium/include/pipe/p_compiler.h267
-rw-r--r--src/minigallium/include/pipe/p_config.h259
-rw-r--r--src/minigallium/include/pipe/p_context.h547
-rw-r--r--src/minigallium/include/pipe/p_defines.h692
-rw-r--r--src/minigallium/include/pipe/p_format.h380
-rw-r--r--src/minigallium/include/pipe/p_screen.h229
-rw-r--r--src/minigallium/include/pipe/p_shader_tokens.h646
-rw-r--r--src/minigallium/include/pipe/p_state.h614
-rw-r--r--src/minigallium/include/pipe/p_video_enums.h79
-rw-r--r--src/minigallium/include/pipe/p_video_state.h292
-rw-r--r--src/minigallium/include/state_tracker/graw.h96
-rw-r--r--src/minigallium/targets/graw-null/graw_util.c96
-rw-r--r--src/minigallium/test.c145
-rw-r--r--src/minigallium/tgsi_testdata/cube_companion_frag.tgsi14
-rw-r--r--src/minigallium/tgsi_testdata/cube_companion_vert.tgsi37
-rw-r--r--src/minigallium/tgsi_testdata/cube_frag.tgsi7
-rw-r--r--src/minigallium/tgsi_testdata/cube_vert.tgsi34
-rw-r--r--src/minigallium/tgsi_testdata/cubemap_sphere_frag.tgsi10
-rw-r--r--src/minigallium/tgsi_testdata/cubemap_sphere_vert.tgsi11
-rw-r--r--src/minigallium/tgsi_testdata/displacement_frag.tgsi7
-rw-r--r--src/minigallium/tgsi_testdata/displacement_vert.tgsi40
-rw-r--r--src/minigallium/tgsi_testdata/etna_gears_ps.tgsi6
-rw-r--r--src/minigallium/tgsi_testdata/etna_gears_vs.tgsi29
-rw-r--r--src/minigallium/tgsi_testdata/particle_system_frag.tgsi16
-rw-r--r--src/minigallium/tgsi_testdata/particle_system_vert.tgsi29
-rw-r--r--src/minigallium/tgsi_testdata/stencil_test_frag.tgsi7
-rw-r--r--src/minigallium/tgsi_testdata/stencil_test_vert.tgsi6
-rw-r--r--src/minigallium/tgsi_testdata/sun_fs_frag.tgsi1157
-rw-r--r--src/replay/.gitignore13
-rw-r--r--src/replay/Makefile64
-rw-r--r--src/replay/companion_cmd.h853
-rw-r--r--src/replay/companion_cmd_gc2000.h803
-rw-r--r--src/replay/context_cmd.h8306
-rw-r--r--src/replay/cube.c518
-rw-r--r--src/replay/cube_cmd.h838
-rw-r--r--src/replay/cube_cmd_gc2000.h650
-rw-r--r--src/replay/cube_companion.c484
-rw-r--r--src/replay/cube_companion_gc2000.c473
-rw-r--r--src/replay/cube_companion_replay.pngbin0 -> 48689 bytes
-rw-r--r--src/replay/cube_etna.c1179
-rw-r--r--src/replay/cube_etna2.c625
-rw-r--r--src/replay/cube_etna2_gc2000.c651
-rw-r--r--src/replay/cube_etna_gc2000.c1070
-rw-r--r--src/replay/cube_gc2000.c497
-rw-r--r--src/replay/cube_replay.pngbin0 -> 12340 bytes
-rw-r--r--src/replay/debugscript.gdb7
-rw-r--r--src/replay/empty_screen_cmd.h234
-rw-r--r--src/replay/empty_screen_gc2000.c305
-rw-r--r--src/replay/etna_test.c484
-rwxr-xr-xsrc/replay/exec_replay.sh21
-rw-r--r--src/replay/ps_sandbox_etna.c933
-rw-r--r--src/replay/sandbox.asm47
-rw-r--r--src/replay/test.c8
-rw-r--r--src/replay/viv_raw.c468
-rw-r--r--src/replay/viv_raw.h186
-rw-r--r--src/resources/README.md6
-rw-r--r--src/resources/amethyst256.pngbin0 -> 105474 bytes
-rw-r--r--src/resources/attribution.txt4
-rw-r--r--src/resources/bigbuckbunny_yv12.yuv3
-rw-r--r--src/resources/companion.h58
-rw-r--r--src/resources/companion_array.c74
-rw-r--r--src/resources/companion_mesh.c18367
-rw-r--r--src/resources/companion_texture.c49171
-rw-r--r--src/resources/lavaetc1.ddsbin0 -> 43832 bytes
-rwxr-xr-xsrc/resources/mipdxt1.ddsbin0 -> 43832 bytes
-rwxr-xr-xsrc/resources/mipdxt5.ddsbin0 -> 87536 bytes
-rwxr-xr-xsrc/resources/miprgba.ddsbin0 -> 349652 bytes
-rw-r--r--src/resources/smoke.tgabin0 -> 49170 bytes
-rw-r--r--src/resources/test_image-dxt1a.ddsbin0 -> 43832 bytes
-rw-r--r--src/resources/test_image-dxt1c.ddsbin0 -> 43832 bytes
-rw-r--r--src/resources/test_image-dxt3.ddsbin0 -> 87536 bytes
-rw-r--r--src/resources/wall1_a8.ddsbin0 -> 87509 bytes
-rw-r--r--src/resources/wall1_l8.ddsbin0 -> 87509 bytes
-rw-r--r--src/resources/wani21_sr8.h2893
-rw-r--r--src/test2d/.gitignore12
-rw-r--r--src/test2d/Makefile54
-rw-r--r--src/test2d/bitblt2d.c210
-rw-r--r--src/test2d/bitblt2d_alpha.c239
-rw-r--r--src/test2d/bitblt2d_from_stream.c222
-rw-r--r--src/test2d/bitblt2d_palette.c254
-rw-r--r--src/test2d/bitblt2d_rotate.c218
-rw-r--r--src/test2d/clear2d.c184
-rw-r--r--src/test2d/filterblt2d.c303
-rw-r--r--src/test2d/filterblt2d_fromplanar.c377
-rw-r--r--src/test2d/line2d.c202
-rw-r--r--src/test2d/line2d_patterned.c205
-rw-r--r--src/test2d/stretchblt2d.c216
-rw-r--r--src/utils/.gitignore6
-rw-r--r--src/utils/Makefile45
-rw-r--r--src/utils/viv_gpu_top.c537
-rw-r--r--src/utils/viv_info.c366
-rw-r--r--src/utils/viv_registers.c93
-rw-r--r--src/utils/viv_reset.c56
-rw-r--r--src/utils/viv_throughput.c440
-rw-r--r--src/utils/viv_watch.c170
653 files changed, 391256 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..a723103
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,28 @@
+TOP=.
+
+include $(TOP)/Makefile.inc
+
+DIRS=minigallium etnaviv driver fb fb_rawshader replay test2d utils
+
+# only needed for reverse engineering/dumping
+# this needs a current EGL+OpenGL ES2 driver
+# use "make rev"
+DIRS_REV=egl
+
+.PHONY: all clean install rev $(DIRS) $(DIRS_REV)
+
+all: CMD = make all
+all: $(DIRS)
+
+rev: CMD = make all
+rev: $(DIRS_REV)
+
+$(DIRS) $(DIRS_REV):
+ $(CMD) -C $@
+
+install: CMD = make install
+install: $(DIRS)
+
+clean: CMD = make clean
+clean: $(DIRS) $(DIRS_REV)
+
diff --git a/src/Makefile.inc b/src/Makefile.inc
new file mode 100644
index 0000000..d1f590f
--- /dev/null
+++ b/src/Makefile.inc
@@ -0,0 +1,19 @@
+GCABI ?= v2
+PLATFORM_GL_LIBS ?= -lEGL -lGLESv2
+
+CC = $(GCCPREFIX)gcc
+CXX = $(GCCPREFIX)g++
+LD = $(GCCPREFIX)ld
+AR = $(GCCPREFIX)ar
+
+GCC_CFLAGS = -D_POSIX_C_SOURCE=200809 -D_GNU_SOURCE
+COMMON_FLAGS = -O2 -g3 -ggdb3 -Wall -Wmissing-prototypes -DGCABI_${GCABI} $(GCC_CFLAGS) -I$(TOP)/lib -I$(TOP)/include_$(GCABI) -fPIC \
+ -I$(TOP)/minigallium/include -I$(TOP)/minigallium/auxiliary -I$(TOP) \
+ -fdiagnostics-show-option \
+ -Werror=missing-prototypes -Werror=missing-declarations -Werror=implicit-function-declaration \
+ -Werror=return-type
+
+CFLAGS += $(PLATFORM_CFLAGS) $(COMMON_FLAGS) -std=gnu99
+CXXFLAGS += $(PLATFORM_CXXFLAGS) $(COMMON_FLAGS)
+LDFLAGS += $(PLATFORM_LDFLAGS) $(COMMON_FLAGS) -lm
+
diff --git a/src/README.md b/src/README.md
new file mode 100644
index 0000000..134400e
--- /dev/null
+++ b/src/README.md
@@ -0,0 +1,29 @@
+Directory contents
+===================
+
+- `egl`: egl demos, to check GL functionality
+
+- `replay`: original replay command stream tests (very low level)
+
+- `etnaviv`: libetnaviv low-level command buffer handling library and register definition headers
+
+- `fb`: attempts at rendering to framebuffer using `etna_pipe` (high level gallium-like interface)
+
+- `fb_rawshader`: same as `fb`, but using manually assembled shaders. &lt;GC1000 only.
+
+- `fb_old`: attempts at rendering to framebuffer using raw state queueing (lower level interface)
+
+- `include_*`: different versions of Vivante GPL kernel headers
+
+- `lib`: C files shared between demos and tests, generic math and GL context utilities etc
+
+- `driver`: `etna_pipe` driver and generated hardware header files
+
+- `resources`: meshes, textures used in demos
+
+- `cl`: OpenCL test (like egl, for command stream interception)
+
+- `test2d`: 2D engine tests
+
+- `util`: Various utilities for developing, debugging and profiling for Vivante GPUS
+
diff --git a/src/cl/.gitignore b/src/cl/.gitignore
new file mode 100644
index 0000000..9a80a22
--- /dev/null
+++ b/src/cl/.gitignore
@@ -0,0 +1,2 @@
+hello
+
diff --git a/src/cl/Makefile b/src/cl/Makefile
new file mode 100644
index 0000000..46843ab
--- /dev/null
+++ b/src/cl/Makefile
@@ -0,0 +1,23 @@
+TOP=..
+
+include $(TOP)/Makefile.inc
+
+COMMON_FLAGS += -I../resources
+CFLAGS += $(COMMON_FLAGS)
+CXXFLAGS += $(COMMON_FLAGS)
+LDFLAGS +=
+
+GL_LIBS = $(PLATFORM_CL_LIBS)
+TARGETS = hello
+LIB_OBJS = ../lib/elf_hook.o ../lib/flightrecorder.o ../lib/viv_hook.o
+
+all: $(TARGETS)
+
+clean:
+ rm -f *.o ../lib/*.o
+ rm -f $(TARGETS) ${COMPANION_OBJS}
+
+hello: hello.o $(LIB_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(GL_LIBS) $(LDFLAGS)
+
+
diff --git a/src/cl/README.md b/src/cl/README.md
new file mode 100644
index 0000000..f92c202
--- /dev/null
+++ b/src/cl/README.md
@@ -0,0 +1,8 @@
+OpenCL
+----------
+
+This directory holds demos, similar to the `egl` directory for GLES2, can be used to intercept the GPU
+command stream while using OpenCL.
+
+- hello: very basic OpenCL program
+
diff --git a/src/cl/hello.c b/src/cl/hello.c
new file mode 100644
index 0000000..cc93429
--- /dev/null
+++ b/src/cl/hello.c
@@ -0,0 +1,253 @@
+//
+// File: hello.c
+//
+// Abstract: A simple "Hello World" compute example showing basic usage of OpenCL which
+// calculates the mathematical square (X[i] = pow(X[i],2)) for a buffer of
+// floating point values.
+//
+//
+// Version: <1.0>
+//
+// Based on Apple "hello.c" example, adapted to work on non-apple systems and
+// OpenCL hardware that has a non-power-of-two maximum work group size.
+//
+// Also use non-exact comparison of floats to prevent false positives in the checking loop.
+//
+////////////////////////////////////////////////////////////////////////////////
+#define HOOK
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <CL/cl.h>
+#include "viv_hook.h"
+
+////////////////////////////////////////////////////////////////////////////////
+
+// Use a static data size for simplicity
+//
+#define DATA_SIZE (1024)
+
+/* round down to largest power of two smaller or equal than x */
+uint32_t flp2(uint32_t x)
+{
+ x = x | (x >> 1);
+ x = x | (x >> 2);
+ x = x | (x >> 4);
+ x = x | (x >> 8);
+ x = x | (x >> 16);
+ return x - (x >> 1);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+// Simple compute kernel which computes the square of an input array
+//
+const char *KernelSource = "\n" \
+"__kernel void square( \n" \
+" __global float* input, \n" \
+" __global float* output, \n" \
+" const unsigned int count) \n" \
+"{ \n" \
+" int i = get_global_id(0); \n" \
+" if(i < count) \n" \
+" output[i] = input[i] * input[i]; \n" \
+"} \n" \
+"\n";
+
+////////////////////////////////////////////////////////////////////////////////
+
+int main(int argc, char** argv)
+{
+ int err; // error code returned from api calls
+
+ float data[DATA_SIZE]; // original data set given to device
+ float results[DATA_SIZE]; // results returned from device
+ unsigned int correct; // number of correct results returned
+
+ size_t global; // global domain size for our calculation
+ size_t local; // local domain size for our calculation
+
+ cl_device_id device_id; // compute device id
+ cl_context context; // compute context
+ cl_command_queue commands; // compute command queue
+ cl_program program; // compute program
+ cl_kernel kernel; // compute kernel
+
+ cl_mem input; // device memory used for the input array
+ cl_mem output; // device memory used for the output array
+
+#ifdef HOOK
+ the_hook("/tmp/cl.fdr");
+#endif
+
+ // Fill our data set with random float values
+ //
+ int i = 0;
+ unsigned int count = DATA_SIZE;
+ for(i = 0; i < count; i++)
+ data[i] = rand() / (float)RAND_MAX;
+
+ // Connect to a compute device
+ //
+ int gpu = 1;
+ err = clGetDeviceIDs(NULL, gpu ? CL_DEVICE_TYPE_GPU : CL_DEVICE_TYPE_CPU, 1, &device_id, NULL);
+ if (err != CL_SUCCESS)
+ {
+ printf("Error: Failed to create a device group!\n");
+ return EXIT_FAILURE;
+ }
+
+ // Create a compute context
+ //
+ context = clCreateContext(0, 1, &device_id, NULL, NULL, &err);
+ if (!context)
+ {
+ printf("Error: Failed to create a compute context!\n");
+ return EXIT_FAILURE;
+ }
+
+ // Create a command commands
+ //
+ commands = clCreateCommandQueue(context, device_id, 0, &err);
+ if (!commands)
+ {
+ printf("Error: Failed to create a command commands!\n");
+ return EXIT_FAILURE;
+ }
+
+ // Create the compute program from the source buffer
+ //
+ program = clCreateProgramWithSource(context, 1, (const char **) & KernelSource, NULL, &err);
+ if (!program)
+ {
+ printf("Error: Failed to create compute program!\n");
+ return EXIT_FAILURE;
+ }
+
+ // Build the program executable
+ err = clBuildProgram(program, 0, NULL,
+ "-cl-mad-enable -cl-unsafe-math-optimizations -cl-fast-relaxed-math",
+ NULL, NULL);
+ if (err != CL_SUCCESS)
+ {
+ size_t len;
+ char buffer[2048];
+
+ printf("Error: Failed to build program executable!\n");
+ clGetProgramBuildInfo(program, device_id, CL_PROGRAM_BUILD_LOG, sizeof(buffer), buffer, &len);
+ printf("%s\n", buffer);
+ exit(1);
+ }
+
+ // Create the compute kernel in the program we wish to run
+ //
+ kernel = clCreateKernel(program, "square", &err);
+ if (!kernel || err != CL_SUCCESS)
+ {
+ printf("Error: Failed to create compute kernel!\n");
+ exit(1);
+ }
+
+ // Create the input and output arrays in device memory for our calculation
+ //
+ input = clCreateBuffer(context, CL_MEM_READ_ONLY, sizeof(float) * count, NULL, NULL);
+ output = clCreateBuffer(context, CL_MEM_WRITE_ONLY, sizeof(float) * count, NULL, NULL);
+ if (!input || !output)
+ {
+ printf("Error: Failed to allocate device memory!\n");
+ exit(1);
+ }
+
+ // Write our data set into the input array in device memory
+ //
+ err = clEnqueueWriteBuffer(commands, input, CL_TRUE, 0, sizeof(float) * count, data, 0, NULL, NULL);
+ if (err != CL_SUCCESS)
+ {
+ printf("Error: Failed to write to source array!\n");
+ exit(1);
+ }
+
+ // Set the arguments to our compute kernel
+ //
+ err = 0;
+ err = clSetKernelArg(kernel, 0, sizeof(cl_mem), &input);
+ err |= clSetKernelArg(kernel, 1, sizeof(cl_mem), &output);
+ err |= clSetKernelArg(kernel, 2, sizeof(unsigned int), &count);
+ if (err != CL_SUCCESS)
+ {
+ printf("Error: Failed to set kernel arguments! %d\n", err);
+ exit(1);
+ }
+
+ // Get the maximum work group size for executing the kernel on the device
+ //
+ err = clGetKernelWorkGroupInfo(kernel, device_id, CL_KERNEL_WORK_GROUP_SIZE, sizeof(local), &local, NULL);
+ if (err != CL_SUCCESS)
+ {
+ printf("Error: Failed to retrieve kernel work group info! %d\n", err);
+ exit(1);
+ }
+
+ // Execute the kernel over the entire range of our 1d input data set
+ // using the maximum number of work group items for this device
+ //
+ local = flp2(local);
+ global = count;
+ printf("global: %i, local: %i\n", global, local);
+
+ err = clEnqueueNDRangeKernel(commands, kernel, 1, NULL, &global, &local, 0, NULL, NULL);
+ if (err)
+ {
+ printf("Error: Failed to execute kernel!\n");
+ return EXIT_FAILURE;
+ }
+
+ // Wait for the command commands to get serviced before reading back results
+ //
+ clFinish(commands);
+
+ // Read back the results from the device to verify the output
+ //
+ err = clEnqueueReadBuffer( commands, output, CL_TRUE, 0, sizeof(float) * count, results, 0, NULL, NULL );
+ if (err != CL_SUCCESS)
+ {
+ printf("Error: Failed to read output array! %d\n", err);
+ exit(1);
+ }
+
+ // Validate our results
+ //
+ correct = 0;
+ for(i = 0; i < count; i++)
+ {
+ float delta = results[i] - data[i] * data[i];
+ if(delta < 1e-6)
+ correct++;
+ }
+
+ // Print a brief summary detailing the results
+ //
+ printf("Computed '%d/%d' correct values!\n", correct, count);
+
+ // Shutdown and cleanup
+ //
+ clReleaseMemObject(input);
+ clReleaseMemObject(output);
+ clReleaseProgram(program);
+ clReleaseKernel(kernel);
+ clReleaseCommandQueue(commands);
+ clReleaseContext(context);
+
+#ifdef HOOK
+ close_hook();
+#endif
+
+ return 0;
+}
+
diff --git a/src/driver/.gitignore b/src/driver/.gitignore
new file mode 100644
index 0000000..5b9b2f6
--- /dev/null
+++ b/src/driver/.gitignore
@@ -0,0 +1,2 @@
+libetnadriver.a
+
diff --git a/src/driver/Makefile b/src/driver/Makefile
new file mode 100644
index 0000000..945ab2f
--- /dev/null
+++ b/src/driver/Makefile
@@ -0,0 +1,34 @@
+TOP=..
+
+include $(TOP)/Makefile.inc
+
+COMMON_FLAGS += -DRAWSHADER
+LDFLAGS +=
+DRIVER_OBJS = \
+ etna_asm.o \
+ etna_blend.o \
+ etna_clear_blit.o \
+ etna_compiler.o \
+ etna_fence.o \
+ etna_pipe.o \
+ etna_rasterizer.o \
+ etna_resource.o \
+ etna_screen.o \
+ etna_shader.o \
+ etna_surface.o \
+ etna_texture.o \
+ etna_transfer.o \
+ etna_zsa.o
+
+TARGETS = libetnadriver.a
+
+all: $(TARGETS)
+
+clean:
+ rm -f $(DRIVER_OBJS)
+ rm -f $(TARGETS) *.o
+
+libetnadriver.a: $(DRIVER_OBJS)
+ $(AR) rcs $@ $^
+
+
diff --git a/src/driver/etna_asm.c b/src/driver/etna_asm.c
new file mode 100644
index 0000000..c4a4802
--- /dev/null
+++ b/src/driver/etna_asm.c
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#include "etna_asm.h"
+#include "etna_debug.h"
+
+#include <etnaviv/isa.xml.h>
+
+/* Return whether the rgroup is one of the uniforms */
+int etna_rgroup_is_uniform(unsigned rgroup)
+{
+ return rgroup == INST_RGROUP_UNIFORM_0 ||
+ rgroup == INST_RGROUP_UNIFORM_1;
+}
+
+/** An instruction can only read from one distinct uniform.
+ * This function verifies this property and returns true if the instruction
+ * is deemed correct and false otherwise.
+ */
+static bool check_uniforms(const struct etna_inst *inst)
+{
+ unsigned uni_rgroup = -1;
+ unsigned uni_reg = -1;
+ bool conflict = false;
+ for(int src=0; src<ETNA_NUM_SRC; ++src)
+ {
+ if(etna_rgroup_is_uniform(inst->src[src].rgroup))
+ {
+ if(uni_reg == -1) /* first uniform used */
+ {
+ uni_rgroup = inst->src[src].rgroup;
+ uni_reg = inst->src[src].reg;
+ } else { /* second or later; check that it is a re-use */
+ if(uni_rgroup != inst->src[src].rgroup ||
+ uni_reg != inst->src[src].reg)
+ {
+ conflict = true;
+ }
+ }
+ }
+ }
+ return !conflict;
+}
+
+int etna_assemble(uint32_t *out, const struct etna_inst *inst)
+{
+ if(inst->imm && inst->src[2].use)
+ return 1; /* cannot have both src2 and imm */
+
+ if(!check_uniforms(inst))
+ {
+ BUG("error: generating instruction that accesses two different uniforms");
+ }
+
+ out[0] = VIV_ISA_WORD_0_OPCODE(inst->opcode) |
+ VIV_ISA_WORD_0_COND(inst->cond) |
+ (inst->sat ? VIV_ISA_WORD_0_SAT : 0) |
+ (inst->dst.use ? VIV_ISA_WORD_0_DST_USE : 0) |
+ VIV_ISA_WORD_0_DST_AMODE(inst->dst.amode) |
+ VIV_ISA_WORD_0_DST_REG(inst->dst.reg) |
+ VIV_ISA_WORD_0_DST_COMPS(inst->dst.comps) |
+ VIV_ISA_WORD_0_TEX_ID(inst->tex.id);
+ out[1] = VIV_ISA_WORD_1_TEX_AMODE(inst->tex.amode) |
+ VIV_ISA_WORD_1_TEX_SWIZ(inst->tex.swiz) |
+ (inst->src[0].use ? VIV_ISA_WORD_1_SRC0_USE : 0) |
+ VIV_ISA_WORD_1_SRC0_REG(inst->src[0].reg) |
+ VIV_ISA_WORD_1_SRC0_SWIZ(inst->src[0].swiz) |
+ (inst->src[0].neg ? VIV_ISA_WORD_1_SRC0_NEG : 0) |
+ (inst->src[0].abs ? VIV_ISA_WORD_1_SRC0_ABS : 0);
+ out[2] = VIV_ISA_WORD_2_SRC0_AMODE(inst->src[0].amode) |
+ VIV_ISA_WORD_2_SRC0_RGROUP(inst->src[0].rgroup) |
+ (inst->src[1].use ? VIV_ISA_WORD_2_SRC1_USE : 0) |
+ VIV_ISA_WORD_2_SRC1_REG(inst->src[1].reg) |
+ VIV_ISA_WORD_2_SRC1_SWIZ(inst->src[1].swiz) |
+ (inst->src[1].neg ? VIV_ISA_WORD_2_SRC1_NEG : 0) |
+ (inst->src[1].abs ? VIV_ISA_WORD_2_SRC1_ABS : 0) |
+ VIV_ISA_WORD_2_SRC1_AMODE(inst->src[1].amode);
+ out[3] = VIV_ISA_WORD_3_SRC1_RGROUP(inst->src[1].rgroup) |
+ (inst->src[2].use ? VIV_ISA_WORD_3_SRC2_USE : 0) |
+ VIV_ISA_WORD_3_SRC2_REG(inst->src[2].reg) |
+ VIV_ISA_WORD_3_SRC2_SWIZ(inst->src[2].swiz) |
+ (inst->src[2].neg ? VIV_ISA_WORD_3_SRC2_NEG : 0) |
+ (inst->src[2].abs ? VIV_ISA_WORD_3_SRC2_ABS : 0) |
+ VIV_ISA_WORD_3_SRC2_AMODE(inst->src[2].amode) |
+ VIV_ISA_WORD_3_SRC2_RGROUP(inst->src[2].rgroup);
+ out[3] |= VIV_ISA_WORD_3_SRC2_IMM(inst->imm);
+ return 0;
+}
+
+int etna_assemble_set_imm(uint32_t *out, uint32_t imm)
+{
+ out[3] |= VIV_ISA_WORD_3_SRC2_IMM(imm);
+ return 0;
+}
+
diff --git a/src/driver/etna_asm.h b/src/driver/etna_asm.h
new file mode 100644
index 0000000..ad2e075
--- /dev/null
+++ b/src/driver/etna_asm.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Utilities for generating low-level ISA instructions */
+#ifndef H_ETNA_ASM
+#define H_ETNA_ASM
+#include <stdint.h>
+
+/* Size of an instruction in 32-bit words */
+#define ETNA_INST_SIZE (4)
+/* Number of source operands per instruction */
+#define ETNA_NUM_SRC (3)
+
+/*** operands ***/
+
+/* destination operand */
+struct etna_inst_dst
+{
+ unsigned use:1; /* 0: not in use, 1: in use */
+ unsigned amode:3; /* INST_AMODE_* */
+ unsigned reg:7; /* register number 0..127 */
+ unsigned comps:4; /* INST_COMPS_* */
+};
+
+/* texture operand */
+struct etna_inst_tex
+{
+ unsigned id:5; /* sampler id */
+ unsigned amode:3; /* INST_AMODE_* */
+ unsigned swiz:8; /* INST_SWIZ */
+};
+
+/* source operand */
+struct etna_inst_src
+{
+ unsigned use:1; /* 0: not in use, 1: in use */
+ unsigned reg:9; /* register or uniform number 0..511 */
+ unsigned swiz:8; /* INST_SWIZ */
+ unsigned neg:1; /* negate (flip sign) if set */
+ unsigned abs:1; /* absolute (remove sign) if set */
+ unsigned amode:3; /* INST_AMODE_* */
+ unsigned rgroup:3; /* INST_RGROUP_* */
+};
+
+/*** instruction ***/
+struct etna_inst
+{
+ uint8_t opcode; /* INST_OPCODE_* */
+ unsigned cond:5; /* INST_CONDITION_* */
+ unsigned sat:1; /* saturate result between 0..1 */
+ struct etna_inst_dst dst; /* destination operand */
+ struct etna_inst_tex tex; /* texture operand */
+ struct etna_inst_src src[ETNA_NUM_SRC]; /* source operand */
+ unsigned imm; /* takes place of src[2] for BRANCH/CALL */
+};
+
+/**
+ * Build vivante instruction from structure with
+ * opcode, cond, sat, dst_use, dst_amode,
+ * dst_reg, dst_comps, tex_id, tex_amode, tex_swiz,
+ * src[0-2]_reg, use, swiz, neg, abs, amode, rgroup,
+ * imm
+ *
+ * Return 0 if succesful, and a non-zero
+ * value otherwise.
+ */
+int etna_assemble(uint32_t *out, const struct etna_inst *inst);
+
+/**
+ * Set field imm of already-assembled instruction.
+ * This is used for filling in jump destinations in a separate pass.
+ */
+int etna_assemble_set_imm(uint32_t *out, uint32_t imm);
+
+/* Return whether the rgroup is one of the uniforms */
+int etna_rgroup_is_uniform(unsigned rgroup);
+
+#endif
+
diff --git a/src/driver/etna_blend.c b/src/driver/etna_blend.c
new file mode 100644
index 0000000..ebc69bb
--- /dev/null
+++ b/src/driver/etna_blend.c
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Blending CSOs */
+#include "etna_blend.h"
+
+#include "etna_internal.h"
+#include "etna_pipe.h"
+#include "etna_translate.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_state.h"
+#include "util/u_memory.h"
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+
+static void *etna_pipe_create_blend_state(struct pipe_context *pipe,
+ const struct pipe_blend_state *bs)
+{
+ //struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct compiled_blend_state *cs = CALLOC_STRUCT(compiled_blend_state);
+ const struct pipe_rt_blend_state *rt0 = &bs->rt[0];
+ bool enable = rt0->blend_enable && !(rt0->rgb_src_factor == PIPE_BLENDFACTOR_ONE && rt0->rgb_dst_factor == PIPE_BLENDFACTOR_ZERO &&
+ rt0->alpha_src_factor == PIPE_BLENDFACTOR_ONE && rt0->alpha_dst_factor == PIPE_BLENDFACTOR_ZERO);
+ bool separate_alpha = enable && !(rt0->rgb_src_factor == rt0->alpha_src_factor &&
+ rt0->rgb_dst_factor == rt0->alpha_dst_factor);
+ bool full_overwrite = (rt0->colormask == 15) && !enable;
+ if(enable)
+ {
+ cs->PE_ALPHA_CONFIG =
+ VIVS_PE_ALPHA_CONFIG_BLEND_ENABLE_COLOR |
+ (separate_alpha ? VIVS_PE_ALPHA_CONFIG_BLEND_SEPARATE_ALPHA : 0) |
+ VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR(translate_blend_factor(rt0->rgb_src_factor)) |
+ VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA(translate_blend_factor(rt0->alpha_src_factor)) |
+ VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR(translate_blend_factor(rt0->rgb_dst_factor)) |
+ VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA(translate_blend_factor(rt0->alpha_dst_factor)) |
+ VIVS_PE_ALPHA_CONFIG_EQ_COLOR(translate_blend(rt0->rgb_func)) |
+ VIVS_PE_ALPHA_CONFIG_EQ_ALPHA(translate_blend(rt0->alpha_func));
+ } else {
+ cs->PE_ALPHA_CONFIG = 0;
+ }
+ /* XXX should colormask be used if enable==false? */
+ cs->PE_COLOR_FORMAT =
+ VIVS_PE_COLOR_FORMAT_COMPONENTS(rt0->colormask) |
+ (full_overwrite ? VIVS_PE_COLOR_FORMAT_OVERWRITE : 0);
+ cs->PE_LOGIC_OP =
+ VIVS_PE_LOGIC_OP_OP(bs->logicop_enable ? bs->logicop_func : LOGIC_OP_COPY) /* 1-to-1 mapping */ |
+ 0x000E4000 /* ??? */;
+ /* independent_blend_enable not needed: only one rt supported */
+ /* XXX alpha_to_coverage / alpha_to_one? */
+ /* XXX dither? VIVS_PE_DITHER(...) and/or VIVS_RS_DITHER(...) on resolve */
+ if(bs->dither)
+ {
+ cs->PE_DITHER[0] = 0x6e4ca280;
+ cs->PE_DITHER[1] = 0x5d7f91b3;
+ } else {
+ cs->PE_DITHER[0] = 0xffffffff;
+ cs->PE_DITHER[1] = 0xffffffff;
+ }
+ return cs;
+}
+
+static void etna_pipe_bind_blend_state(struct pipe_context *pipe, void *bs)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ priv->dirty_bits |= ETNA_STATE_BLEND;
+ priv->blend_p = bs;
+ if(bs)
+ priv->blend = *(struct compiled_blend_state*)bs;
+}
+
+static void etna_pipe_delete_blend_state(struct pipe_context *pipe, void *bs)
+{
+ //struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ FREE(bs);
+}
+
+void etna_pipe_blend_init(struct pipe_context *pc)
+{
+ pc->create_blend_state = etna_pipe_create_blend_state;
+ pc->bind_blend_state = etna_pipe_bind_blend_state;
+ pc->delete_blend_state = etna_pipe_delete_blend_state;
+}
+
diff --git a/src/driver/etna_blend.h b/src/driver/etna_blend.h
new file mode 100644
index 0000000..ef0156a
--- /dev/null
+++ b/src/driver/etna_blend.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Blending CSOs */
+#ifndef H_ETNA_BLEND
+#define H_ETNA_BLEND
+
+struct pipe_context;
+
+void etna_pipe_blend_init(struct pipe_context *pipe);
+
+#endif
+
diff --git a/src/driver/etna_clear_blit.c b/src/driver/etna_clear_blit.c
new file mode 100644
index 0000000..95579f0
--- /dev/null
+++ b/src/driver/etna_clear_blit.c
@@ -0,0 +1,302 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Clearing and blitting functionality */
+#include "etna_clear_blit.h"
+
+#include "etna_internal.h"
+#include "etna_pipe.h"
+#include "etna_resource.h"
+#include "etna_translate.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_state.h"
+#include "util/u_blitter.h"
+#include "util/u_inlines.h"
+#include "util/u_memory.h"
+#include "util/u_surface.h"
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+
+/* Save current state for blitter operation */
+static void etna_pipe_blit_save_state(struct pipe_context *pipe)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ util_blitter_save_vertex_buffer_slot(priv->blitter, &priv->vertex_buffer_s[0]);
+ util_blitter_save_vertex_elements(priv->blitter, priv->vertex_elements_p);
+ util_blitter_save_vertex_shader(priv->blitter, priv->vs);
+ util_blitter_save_rasterizer(priv->blitter, priv->rasterizer_p);
+ util_blitter_save_viewport(priv->blitter, &priv->viewport_s);
+ util_blitter_save_scissor(priv->blitter, &priv->scissor_s);
+ util_blitter_save_fragment_shader(priv->blitter, priv->fs);
+ util_blitter_save_blend(priv->blitter, priv->blend_p);
+ util_blitter_save_depth_stencil_alpha(priv->blitter, priv->depth_stencil_alpha_p);
+ util_blitter_save_stencil_ref(priv->blitter, &priv->stencil_ref_s);
+ util_blitter_save_sample_mask(priv->blitter, priv->sample_mask_s);
+ util_blitter_save_framebuffer(priv->blitter, &priv->framebuffer_s);
+ util_blitter_save_fragment_sampler_states(priv->blitter,
+ priv->num_fragment_samplers,
+ (void **)priv->sampler);
+ util_blitter_save_fragment_sampler_views(priv->blitter,
+ priv->num_fragment_sampler_views, priv->sampler_view_s);
+}
+
+/* Generate clear command for a surface (non-TS case) */
+void etna_rs_gen_clear_surface(struct compiled_rs_state *rs_state, struct etna_surface *surf, uint32_t clear_value)
+{
+ uint bs = util_format_get_blocksize(surf->base.format);
+ uint format = 0;
+ switch(bs)
+ {
+ case 2: format = RS_FORMAT_A1R5G5B5; break;
+ case 4: format = RS_FORMAT_A8R8G8B8; break;
+ default: BUG("etna_rs_gen_clear_surface: Unhandled clear blocksize: %i (fmt %i)", bs, surf->base.format);
+ format = RS_FORMAT_A8R8G8B8;
+ assert(0);
+ }
+ /* use tiled clear if width is multiple of 16 */
+ bool tiled_clear = (surf->surf.padded_width & ETNA_RS_WIDTH_MASK) == 0 &&
+ (surf->surf.padded_height & ETNA_RS_HEIGHT_MASK) == 0;
+ etna_compile_rs_state(rs_state, &(struct rs_state){
+ .source_format = format,
+ .dest_format = format,
+ .dest_addr = surf->surf.address,
+ .dest_stride = surf->surf.stride,
+ .dest_tiling = tiled_clear ? surf->layout : ETNA_LAYOUT_LINEAR,
+ .dither = {0xffffffff, 0xffffffff},
+ .width = surf->surf.padded_width, /* These must be padded to 16x4 if !LINEAR, otherwise RS will hang */
+ .height = surf->surf.padded_height,
+ .clear_value = {clear_value},
+ .clear_mode = VIVS_RS_CLEAR_CONTROL_MODE_ENABLED1,
+ .clear_bits = 0xffff
+ });
+}
+
+static void etna_pipe_clear(struct pipe_context *pipe,
+ unsigned buffers,
+ const union pipe_color_union *color,
+ double depth,
+ unsigned stencil)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ /* Flush color and depth cache before clearing anything.
+ * This is especially important when coming from another surface, as otherwise it may clear
+ * part of the old surface instead.
+ */
+ etna_set_state(priv->ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_stall(priv->ctx, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
+ /* Preparation: Flush the TS. This must be done after flushing color and depth, otherwise it can
+ * result in crashes */
+ bool need_ts_flush = false;
+ if((buffers & PIPE_CLEAR_COLOR) && priv->framebuffer_s.nr_cbufs)
+ {
+ struct etna_surface *surf = etna_surface(priv->framebuffer_s.cbufs[0]);
+ if(surf->surf.ts_address)
+ need_ts_flush = true;
+ }
+ if((buffers & PIPE_CLEAR_DEPTHSTENCIL) && priv->framebuffer_s.zsbuf != NULL)
+ {
+ struct etna_surface *surf = etna_surface(priv->framebuffer_s.zsbuf);
+ if(surf->surf.ts_address)
+ need_ts_flush = true;
+ }
+ if(need_ts_flush)
+ {
+ etna_set_state(priv->ctx, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH);
+ }
+ /* No need to set up the TS here with sync_context.
+ * RS clear operations (in contrast to resolve and copy) do not require the TS state.
+ */
+ /* Need to update clear command in non-TS (fast clear) case *if*
+ * clear value is different from previous time.
+ */
+ if(buffers & PIPE_CLEAR_COLOR)
+ {
+ for(int idx=0; idx<priv->framebuffer_s.nr_cbufs; ++idx)
+ {
+ struct etna_surface *surf = etna_surface(priv->framebuffer_s.cbufs[idx]);
+ uint32_t new_clear_value = translate_clear_color(surf->base.format, &color[idx]);
+ if(surf->surf.ts_address) /* TS: use precompiled clear command */
+ {
+ /* Set new clear color */
+ priv->framebuffer.TS_COLOR_CLEAR_VALUE = new_clear_value;
+ if(!DBG_ENABLED(ETNA_DBG_NO_AUTODISABLE))
+ {
+ /* Set number of color tiles to be filled */
+ etna_set_state(priv->ctx, VIVS_TS_COLOR_AUTO_DISABLE_COUNT, surf->surf.padded_width*surf->surf.padded_height/16);
+ priv->framebuffer.TS_MEM_CONFIG |= VIVS_TS_MEM_CONFIG_COLOR_AUTO_DISABLE;
+ }
+ priv->dirty_bits |= ETNA_STATE_TS;
+ }
+ else if(unlikely(new_clear_value != surf->level->clear_value)) /* Queue normal RS clear for non-TS surfaces */
+ {
+ etna_rs_gen_clear_surface(&surf->clear_command, surf, new_clear_value);
+ }
+ etna_submit_rs_state(priv->ctx, &surf->clear_command);
+ surf->level->clear_value = new_clear_value;
+ }
+ }
+ if((buffers & PIPE_CLEAR_DEPTHSTENCIL) && priv->framebuffer_s.zsbuf != NULL)
+ {
+ struct etna_surface *surf = etna_surface(priv->framebuffer_s.zsbuf);
+ uint32_t new_clear_value = translate_clear_depth_stencil(surf->base.format, depth, stencil);
+ if(surf->surf.ts_address) /* TS: use precompiled clear command */
+ {
+ /* Set new clear color */
+ priv->framebuffer.TS_DEPTH_CLEAR_VALUE = new_clear_value;
+ if(!DBG_ENABLED(ETNA_DBG_NO_AUTODISABLE))
+ {
+ /* Set number of depth tiles to be filled */
+ etna_set_state(priv->ctx, VIVS_TS_DEPTH_AUTO_DISABLE_COUNT, surf->surf.padded_width*surf->surf.padded_height/16);
+ priv->framebuffer.TS_MEM_CONFIG |= VIVS_TS_MEM_CONFIG_DEPTH_AUTO_DISABLE;
+ }
+ priv->dirty_bits |= ETNA_STATE_TS;
+ } else if(unlikely(new_clear_value != surf->level->clear_value)) /* Queue normal RS clear for non-TS surfaces */
+ {
+ etna_rs_gen_clear_surface(&surf->clear_command, surf, new_clear_value);
+ }
+ etna_submit_rs_state(priv->ctx, &surf->clear_command);
+ surf->level->clear_value = new_clear_value;
+ }
+ etna_stall(priv->ctx, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
+}
+
+static void etna_pipe_clear_render_target(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ const union pipe_color_union *color,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ /* XXX could fall back to RS when target area is full screen / resolveable and no TS. */
+ etna_pipe_blit_save_state(pipe);
+ util_blitter_clear_render_target(priv->blitter, dst, color, dstx, dsty, width, height);
+}
+
+static void etna_pipe_clear_depth_stencil(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ unsigned clear_flags,
+ double depth,
+ unsigned stencil,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ /* XXX could fall back to RS when target area is full screen / resolveable and no TS. */
+ etna_pipe_blit_save_state(pipe);
+ util_blitter_clear_depth_stencil(priv->blitter, dst, clear_flags, depth, stencil, dstx, dsty, width, height);
+}
+
+static void etna_pipe_resource_copy_region(struct pipe_context *pipe,
+ struct pipe_resource *dst,
+ unsigned dst_level,
+ unsigned dstx, unsigned dsty, unsigned dstz,
+ struct pipe_resource *src,
+ unsigned src_level,
+ const struct pipe_box *src_box)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ /* The resource must be of the same format. */
+ assert(src->format == dst->format);
+ /* Resources with nr_samples > 1 are not allowed. */
+ assert(src->nr_samples == 1 && dst->nr_samples == 1);
+ /* XXX we can use the RS as a literal copy engine here
+ * the only complexity is tiling; the size of the boxes needs to be aligned to the tile size
+ * how to handle the case where a resource is copied from/to a non-aligned position?
+ * from non-aligned: can fall back to rendering-based copy?
+ * to non-aligned: can fall back to rendering-based copy?
+ * XXX this goes wrong when source surface is supertiled.
+ */
+ etna_pipe_blit_save_state(pipe);
+ util_blitter_copy_texture(priv->blitter, dst, dst_level, dstx, dsty, dstz, src, src_level, src_box,
+ PIPE_MASK_RGBA, false);
+ etna_resource_touch(pipe, dst);
+ etna_resource_touch(pipe, src);
+}
+
+static void etna_pipe_blit(struct pipe_context *pipe, const struct pipe_blit_info *blit_info)
+{
+ /* This is a more extended version of resource_copy_region */
+ /* TODO Some cases can be handled by RS; if not, fall back to rendering */
+ /* copy block of pixels from info->src to info->dst (resource, level, box, format);
+ * function is used for scaling, flipping in x and y direction (negative width/height), format conversion, mask and filter
+ * and even a scissor rectangle
+ *
+ * What can the RS do for us:
+ * convert between tiling formats (layouts)
+ * downsample 2x in x and y
+ * convert between a limited number of pixel formats
+ *
+ * For the rest, fall back to util_blitter
+ * XXX this goes wrong when source surface is supertiled.
+ */
+ struct pipe_blit_info info = *blit_info;
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ if (info.src.resource->nr_samples > 1 &&
+ info.dst.resource->nr_samples <= 1 &&
+ !util_format_is_depth_or_stencil(info.src.resource->format) &&
+ !util_format_is_pure_integer(info.src.resource->format)) {
+ DBG("color resolve unimplemented");
+ return;
+ }
+ if (util_try_blit_via_copy_region(pipe, blit_info)) {
+ return; /* done */
+ }
+ if (info.mask & PIPE_MASK_S) {
+ DBG("cannot blit stencil, skipping");
+ info.mask &= ~PIPE_MASK_S;
+ }
+
+ if (!util_blitter_is_blit_supported(priv->blitter, &info)) {
+ DBG("blit unsupported %s -> %s",
+ util_format_short_name(info.src.resource->format),
+ util_format_short_name(info.dst.resource->format));
+ return;
+ }
+
+ etna_pipe_blit_save_state(pipe);
+ util_blitter_blit(priv->blitter, &info);
+ etna_resource_touch(pipe, info.src.resource);
+ etna_resource_touch(pipe, info.dst.resource);
+}
+
+
+void etna_pipe_clear_blit_init(struct pipe_context *pc)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pc);
+ pc->clear = etna_pipe_clear;
+ pc->clear_render_target = etna_pipe_clear_render_target;
+ pc->clear_depth_stencil = etna_pipe_clear_depth_stencil;
+ pc->resource_copy_region = etna_pipe_resource_copy_region;
+ pc->blit = etna_pipe_blit;
+
+ priv->blitter = util_blitter_create(pc);
+}
+
+void etna_pipe_clear_blit_destroy(struct pipe_context *pc)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pc);
+ if (priv->blitter)
+ util_blitter_destroy(priv->blitter);
+}
+
diff --git a/src/driver/etna_clear_blit.h b/src/driver/etna_clear_blit.h
new file mode 100644
index 0000000..097c307
--- /dev/null
+++ b/src/driver/etna_clear_blit.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Clearing and blitting functionality */
+#ifndef H_ETNA_CLEAR_BLIT
+#define H_ETNA_CLEAR_BLIT
+
+#include <stdint.h>
+
+struct pipe_context;
+struct etna_surface;
+struct compiled_rs_state;
+
+void etna_rs_gen_clear_surface(struct compiled_rs_state *rs_state, struct etna_surface *surf, uint32_t clear_value);
+
+void etna_pipe_clear_blit_init(struct pipe_context *pipe);
+
+void etna_pipe_clear_blit_destroy(struct pipe_context *pipe);
+
+#endif
+
+
diff --git a/src/driver/etna_compiler.c b/src/driver/etna_compiler.c
new file mode 100644
index 0000000..8f6eba7
--- /dev/null
+++ b/src/driver/etna_compiler.c
@@ -0,0 +1,1796 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/* TGSI->Vivante shader ISA conversion */
+
+/* What does the compiler return (see etna_shader_object)?
+ * 1) instruction data
+ * 2) input-to-temporary mapping (fixed for ps)
+ * *) in case of ps, semantic -> varying id mapping
+ * *) for each varying: number of components used (r, rg, rgb, rgba)
+ * 3) temporary-to-output mapping (in case of vs, fixed for ps)
+ * 4) for each input/output: possible semantic (position, color, glpointcoord, ...)
+ * 5) immediates base offset, immediates data
+ * 6) used texture units (and possibly the TGSI_TEXTURE_* type); not needed to configure the hw, but useful
+ * for error checking
+ * 7) enough information to add the z=(z+w)/2.0 necessary for older chips (output reg id is enough)
+ *
+ * Empty shaders are not allowed, should always at least generate a NOP. Also if there is a label
+ * at the end of the shader, an extra NOP should be generated as jump target.
+ *
+ * TODO
+ * * Allow loops
+ * * Use an instruction scheduler
+ * * Avoid using more than one uniform in one instruction (can be used in multiple arguments)
+ */
+#include "etna_compiler.h"
+#include "etna_asm.h"
+#include "etna_internal.h"
+#include "etna_debug.h"
+
+#include "tgsi/tgsi_iterate.h"
+#include "tgsi/tgsi_strings.h"
+#include "tgsi/tgsi_util.h"
+#include "tgsi/tgsi_info.h"
+#include "pipe/p_shader_tokens.h"
+#include "util/u_memory.h"
+#include "util/u_math.h"
+
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/isa.xml.h>
+#include <etnaviv/state_3d.xml.h>
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+/* Broadcast swizzle to all four components */
+#define INST_SWIZ_BROADCAST(x) \
+ (INST_SWIZ_X(x) | INST_SWIZ_Y(x) | INST_SWIZ_Z(x) | INST_SWIZ_W(x))
+/* Identity (NOP) swizzle */
+#define INST_SWIZ_IDENTITY \
+ (INST_SWIZ_X(0) | INST_SWIZ_Y(1) | INST_SWIZ_Z(2) | INST_SWIZ_W(3))
+
+/* Compose two swizzles (computes swz1.swz2) */
+static inline uint32_t inst_swiz_compose(uint32_t swz1, uint32_t swz2)
+{
+ return INST_SWIZ_X((swz1 >> (((swz2 >> 0)&3)*2))&3) |
+ INST_SWIZ_Y((swz1 >> (((swz2 >> 2)&3)*2))&3) |
+ INST_SWIZ_Z((swz1 >> (((swz2 >> 4)&3)*2))&3) |
+ INST_SWIZ_W((swz1 >> (((swz2 >> 6)&3)*2))&3);
+}
+
+/* Native register description structure */
+struct etna_native_reg
+{
+ unsigned valid:1;
+ unsigned is_tex:1; /* is texture unit, overrides rgroup */
+ unsigned rgroup:3;
+ unsigned id:9;
+};
+
+struct etna_reg_desc
+{
+ enum tgsi_file_type file; /* IN, OUT, TEMP, ... */
+ int idx; /* index into file */
+ bool active; /* used in program */
+ int first_use; /* instruction id of first use (scope begin) */
+ int last_use; /* instruction id of last use (scope end, inclusive) */
+
+ struct etna_native_reg native; /* native register to map to */
+ unsigned usage_mask:4; /* usage, per channel */
+ bool has_semantic; /* register has associated TGSI semantic */
+ struct tgsi_declaration_semantic semantic; /* TGSI semantic */
+ struct tgsi_declaration_interp interp; /* Interpolation type */
+};
+
+/* Label information structure */
+struct etna_compile_label
+{
+ int inst_idx; /* Instruction id that label points to */
+};
+
+enum etna_compile_frame_type {
+ ETNA_COMPILE_FRAME_IF, /* IF/ELSE/ENDIF */
+};
+
+/* nesting scope frame (LOOP, IF, ...) during compilation
+ */
+struct etna_compile_frame
+{
+ enum etna_compile_frame_type type;
+ struct etna_compile_label *lbl_else;
+ struct etna_compile_label *lbl_endif;
+};
+
+/* scratch area for compiling shader, freed after compilation finishes */
+struct etna_compile_data
+{
+ uint processor; /* TGSI_PROCESSOR_... */
+
+ /* Register descriptions, per TGSI file, per register index */
+ struct etna_reg_desc *file[TGSI_FILE_COUNT];
+
+ /* Number of registers in each TGSI file (max register+1) */
+ uint file_size[TGSI_FILE_COUNT];
+
+ /* Keep track of TGSI register declarations */
+ struct etna_reg_desc decl[ETNA_MAX_DECL];
+ uint total_decls;
+
+ /* Bitmap of dead instructions which are removed in a separate pass */
+ bool dead_inst[ETNA_MAX_TOKENS]; /* mark dead input instructions */
+
+ /* Immediate data */
+ uint32_t imm_data[ETNA_MAX_IMM];
+ uint32_t imm_base; /* base of immediates (in 32 bit units) */
+ uint32_t imm_size; /* size of immediates (in 32 bit units) */
+
+ /* Next free native register, for register allocation */
+ uint32_t next_free_native;
+
+ /* Temporary register for use within translated TGSI instruction,
+ * only allocated when needed.
+ */
+ int inner_temps; /* number of inner temps used; only up to one available at this point */
+ struct etna_native_reg inner_temp;
+
+ /* Fields for handling nested conditionals */
+ struct etna_compile_frame frame_stack[ETNA_MAX_DEPTH];
+ int frame_sp;
+ struct etna_compile_label *lbl_usage[ETNA_MAX_INSTRUCTIONS]; /* label usage reference, per instruction */
+ struct etna_compile_label labels[ETNA_MAX_LABELS]; /* XXX use subheap allocation */
+ int num_labels;
+
+ /* Code generation */
+ int inst_ptr; /* current instruction pointer */
+ uint32_t code[ETNA_MAX_INSTRUCTIONS*4];
+
+ /* I/O */
+
+ /* Number of varyings (PS only) */
+ int num_varyings;
+
+ /* GPU hardware specs */
+ const struct etna_pipe_specs *specs;
+};
+
+/** Register allocation **/
+enum reg_sort_order
+{
+ FIRST_USE_ASC,
+ FIRST_USE_DESC,
+ LAST_USE_ASC,
+ LAST_USE_DESC
+};
+
+/* Augmented register description for sorting */
+struct sort_rec
+{
+ struct etna_reg_desc *ptr;
+ int key;
+};
+
+static int sort_rec_compar(const struct sort_rec *a, const struct sort_rec *b)
+{
+ if(a->key < b->key) return -1;
+ if(a->key > b->key) return 1;
+ return 0;
+}
+
+/* create an index on a register set based on certain criteria. */
+static int sort_registers(
+ struct sort_rec *sorted,
+ struct etna_reg_desc *regs,
+ int count,
+ enum reg_sort_order so)
+{
+ /* pre-populate keys from active registers */
+ int ptr = 0;
+ for(int idx=0; idx<count; ++idx)
+ {
+ /* only interested in active registers now; will only assign inactive ones if no
+ * space in active ones */
+ if(regs[idx].active)
+ {
+ sorted[ptr].ptr = &regs[idx];
+ switch(so)
+ {
+ case FIRST_USE_ASC: sorted[ptr].key = regs[idx].first_use; break;
+ case LAST_USE_ASC: sorted[ptr].key = regs[idx].last_use; break;
+ case FIRST_USE_DESC: sorted[ptr].key = -regs[idx].first_use; break;
+ case LAST_USE_DESC: sorted[ptr].key = -regs[idx].last_use; break;
+ }
+ ptr++;
+ }
+ }
+ /* sort index by key */
+ qsort(sorted, ptr, sizeof(struct sort_rec), (int (*) (const void *, const void *))sort_rec_compar);
+ return ptr;
+}
+
+/* Allocate a new, unused, native temp register */
+static struct etna_native_reg alloc_new_native_reg(struct etna_compile_data *cd)
+{
+ assert(cd->next_free_native < ETNA_MAX_TEMPS);
+ int rv = cd->next_free_native;
+ cd->next_free_native++;
+ return (struct etna_native_reg){ .valid=1, .rgroup=INST_RGROUP_TEMP, .id=rv };
+}
+
+/* assign TEMPs to native registers */
+static void assign_temporaries_to_native(struct etna_compile_data *cd, struct etna_reg_desc *temps, int num_temps)
+{
+ for(int idx=0; idx<num_temps; ++idx)
+ {
+ temps[idx].native = alloc_new_native_reg(cd);
+ }
+}
+
+/* assign inputs and outputs to temporaries
+ * Gallium assumes that the hardware has separate registers for taking input and output,
+ * however Vivante GPUs use temporaries both for passing in inputs and passing back outputs.
+ * Try to re-use temporary registers where possible.
+ */
+static void assign_inouts_to_temporaries(struct etna_compile_data *cd, uint file)
+{
+ bool mode_inputs = (file == TGSI_FILE_INPUT);
+ int inout_ptr = 0, num_inouts;
+ int temp_ptr = 0, num_temps;
+ struct sort_rec inout_order[ETNA_MAX_TEMPS];
+ struct sort_rec temps_order[ETNA_MAX_TEMPS];
+ num_inouts = sort_registers(inout_order,
+ cd->file[file], cd->file_size[file],
+ mode_inputs ? LAST_USE_ASC : FIRST_USE_ASC);
+ num_temps = sort_registers(temps_order,
+ cd->file[TGSI_FILE_TEMPORARY], cd->file_size[TGSI_FILE_TEMPORARY],
+ mode_inputs ? FIRST_USE_ASC : LAST_USE_ASC);
+
+ while(inout_ptr < num_inouts && temp_ptr < num_temps)
+ {
+ struct etna_reg_desc *inout = inout_order[inout_ptr].ptr;
+ struct etna_reg_desc *temp = temps_order[temp_ptr].ptr;
+ if(!inout->active || inout->native.valid) /* Skip if already a native register assigned */
+ {
+ inout_ptr++;
+ continue;
+ }
+ /* last usage of this input is before or in same instruction of first use of temporary? */
+ if(mode_inputs ? (inout->last_use <= temp->first_use) :
+ (inout->first_use >= temp->last_use))
+ {
+ /* assign it and advance to next input */
+ inout->native = temp->native;
+ inout_ptr++;
+ }
+ temp_ptr++;
+ }
+ /* if we couldn't reuse current ones, allocate new temporaries
+ */
+ for(inout_ptr=0; inout_ptr<num_inouts; ++inout_ptr)
+ {
+ struct etna_reg_desc *inout = inout_order[inout_ptr].ptr;
+ if(inout->active && !inout->native.valid)
+ {
+ inout->native = alloc_new_native_reg(cd);
+ }
+ }
+}
+
+/* Allocate an immediate with a certain value and return the index. If
+ * there is already an immediate with that value, return that.
+ */
+static struct etna_inst_src alloc_imm_u32(struct etna_compile_data *cd, uint32_t value)
+{
+ int idx;
+ /* Could use a hash table to speed this up */
+ for(idx = 0; idx<cd->imm_size; ++idx)
+ {
+ if(cd->imm_data[idx] == value)
+ break;
+ }
+ if(idx == cd->imm_size) /* allocate new immediate */
+ {
+ assert(cd->imm_size < ETNA_MAX_IMM);
+ idx = cd->imm_size++;
+ cd->imm_data[idx] = value;
+ }
+
+ /* swizzle so that component with value is returned in all components */
+ idx += cd->imm_base;
+ struct etna_inst_src imm_src = {
+ .use = 1,
+ .rgroup = INST_RGROUP_UNIFORM_0,
+ .reg = idx/4,
+ .swiz = INST_SWIZ_BROADCAST(idx & 3)
+ };
+ return imm_src;
+}
+
+/* Allocate immediate with a certain float value. If there is already an
+ * immediate with that value, return that.
+ */
+static struct etna_inst_src alloc_imm_f32(struct etna_compile_data *cd, float value)
+{
+ return alloc_imm_u32(cd, etna_f32_to_u32(value));
+}
+
+/* Pass -- check register file declarations and immediates */
+static void etna_compile_parse_declarations(struct etna_compile_data *cd, const struct tgsi_token *tokens)
+{
+ struct tgsi_parse_context ctx = {};
+ unsigned status = TGSI_PARSE_OK;
+ status = tgsi_parse_init(&ctx, tokens);
+ assert(status == TGSI_PARSE_OK);
+
+ cd->processor = ctx.FullHeader.Processor.Processor;
+
+ while(!tgsi_parse_end_of_tokens(&ctx))
+ {
+ tgsi_parse_token(&ctx);
+ switch(ctx.FullToken.Token.Type)
+ {
+ case TGSI_TOKEN_TYPE_DECLARATION: {
+ const struct tgsi_full_declaration *decl = &ctx.FullToken.FullDeclaration;
+ cd->file_size[decl->Declaration.File] = MAX2(cd->file_size[decl->Declaration.File], decl->Range.Last+1);
+ } break;
+ case TGSI_TOKEN_TYPE_IMMEDIATE: { /* immediates are handled differently from other files; they are not declared
+ explicitly, and always add four components */
+ const struct tgsi_full_immediate *imm = &ctx.FullToken.FullImmediate;
+ assert(cd->imm_size <= (ETNA_MAX_IMM-4));
+ for(int i=0; i<4; ++i)
+ {
+ cd->imm_data[cd->imm_size++] = imm->u[i].Uint;
+ }
+ cd->file_size[TGSI_FILE_IMMEDIATE] = cd->imm_size / 4;
+ } break;
+ }
+ }
+ tgsi_parse_free(&ctx);
+}
+
+static void etna_assign_decls(struct etna_compile_data *cd)
+{
+ uint idx=0;
+ for(int x=0; x<TGSI_FILE_COUNT; ++x)
+ {
+ cd->file[x] = &cd->decl[idx];
+ for(int sub=0; sub<cd->file_size[x]; ++sub)
+ {
+ cd->decl[idx].file = x;
+ cd->decl[idx].idx = sub;
+ idx++;
+ }
+ }
+ cd->total_decls = idx;
+}
+
+/* Pass -- check usage of temporaries, inputs, outputs */
+static void etna_compile_pass_check_usage(struct etna_compile_data *cd, const struct tgsi_token *tokens)
+{
+ struct tgsi_parse_context ctx = {};
+ unsigned status = TGSI_PARSE_OK;
+ status = tgsi_parse_init(&ctx, tokens);
+ assert(status == TGSI_PARSE_OK);
+
+ for(int idx=0; idx<cd->total_decls; ++idx)
+ {
+ cd->decl[idx].active = false;
+ cd->decl[idx].first_use = cd->decl[idx].last_use = -1;
+ }
+
+ int inst_idx = 0;
+ while(!tgsi_parse_end_of_tokens(&ctx))
+ {
+ tgsi_parse_token(&ctx);
+ /* find out max register #s used
+ * For every register mark first and last instruction index where it's
+ * used this allows finding ranges where the temporary can be borrowed
+ * as input and/or output register
+ *
+ * XXX in the case of loops this needs special care, as the last usage of a register
+ * inside a loop means it can still be used on next loop iteration (execution is no longer
+ * chronological). The register can only be declared "free" after the loop finishes.
+ *
+ * Same for inputs: the first usage of a register inside a loop doesn't mean that the register
+ * won't have been overwritten in previous iteration. The register can only be declared free before the loop
+ * starts.
+ * The proper way would be to do full dominator / post-dominator analysis (especially with more complicated
+ * control flow such as direct branch instructions) but not for now...
+ */
+ switch(ctx.FullToken.Token.Type)
+ {
+ case TGSI_TOKEN_TYPE_DECLARATION: {
+ /* Declaration: fill in file details */
+ const struct tgsi_full_declaration *decl = &ctx.FullToken.FullDeclaration;
+ for(int idx=decl->Range.First; idx<=decl->Range.Last; ++idx)
+ {
+ cd->file[decl->Declaration.File][idx].usage_mask = 0; // we'll compute this ourselves
+ cd->file[decl->Declaration.File][idx].has_semantic = decl->Declaration.Semantic;
+ cd->file[decl->Declaration.File][idx].semantic = decl->Semantic;
+ cd->file[decl->Declaration.File][idx].interp = decl->Interp;
+ }
+ } break;
+ case TGSI_TOKEN_TYPE_INSTRUCTION: {
+ /* Instruction: iterate over operands of instruction */
+ const struct tgsi_full_instruction *inst = &ctx.FullToken.FullInstruction;
+ /* iterate over destination registers */
+ for(int idx=0; idx<inst->Instruction.NumDstRegs; ++idx)
+ {
+ struct etna_reg_desc *reg_desc = &cd->file[inst->Dst[idx].Register.File][inst->Dst[idx].Register.Index];
+ if(reg_desc->first_use == -1)
+ reg_desc->first_use = inst_idx;
+ reg_desc->last_use = inst_idx;
+ reg_desc->active = true;
+ }
+ /* iterate over source registers */
+ for(int idx=0; idx<inst->Instruction.NumSrcRegs; ++idx)
+ {
+ struct etna_reg_desc *reg_desc = &cd->file[inst->Src[idx].Register.File][inst->Src[idx].Register.Index];
+ if(reg_desc->first_use == -1)
+ reg_desc->first_use = inst_idx;
+ reg_desc->last_use = inst_idx;
+ reg_desc->active = true;
+ /* accumulate usage mask for register, this is used to determine how many slots for varyings
+ * should be allocated */
+ reg_desc->usage_mask |= tgsi_util_get_inst_usage_mask(inst, idx);
+ }
+ inst_idx += 1;
+ } break;
+ default:
+ break;
+ }
+ }
+ tgsi_parse_free(&ctx);
+}
+
+/* assign inputs that need to be assigned to specific registers */
+static void assign_special_inputs(struct etna_compile_data *cd)
+{
+ if(cd->processor == TGSI_PROCESSOR_FRAGMENT)
+ {
+ /* never assign t0; writing to it causes fragment to be discarded? */
+ cd->next_free_native = 1;
+ /* hardwire TGSI_SEMANTIC_POSITION (input and output) to t0 */
+ for(int idx=0; idx<cd->total_decls; ++idx)
+ {
+ struct etna_reg_desc *reg = &cd->decl[idx];
+ if(reg->active && reg->semantic.Name == TGSI_SEMANTIC_POSITION)
+ {
+ reg->native.valid = 1;
+ reg->native.rgroup = INST_RGROUP_TEMP;
+ reg->native.id = 0;
+ }
+ }
+ }
+}
+
+/* Check that a move instruction does not swizzle any of the components
+ * that it writes.
+ */
+static bool etna_mov_check_no_swizzle(const struct tgsi_dst_register dst, const struct tgsi_src_register src)
+{
+ return (!(dst.WriteMask & TGSI_WRITEMASK_X) || src.SwizzleX == TGSI_SWIZZLE_X) &&
+ (!(dst.WriteMask & TGSI_WRITEMASK_Y) || src.SwizzleY == TGSI_SWIZZLE_Y) &&
+ (!(dst.WriteMask & TGSI_WRITEMASK_Z) || src.SwizzleZ == TGSI_SWIZZLE_Z) &&
+ (!(dst.WriteMask & TGSI_WRITEMASK_W) || src.SwizzleW == TGSI_SWIZZLE_W);
+
+}
+
+/* Pass -- optimize outputs
+ * Mesa tends to generate code like this at the end if their shaders
+ * MOV OUT[1], TEMP[2]
+ * MOV OUT[0], TEMP[0]
+ * MOV OUT[2], TEMP[1]
+ * Recognize if
+ * a) there is only a single assignment to an output register and
+ * b) the temporary is not used after that
+ * Also recognize direct assignment of IN to OUT (passthrough)
+ **/
+static void etna_compile_pass_optimize_outputs(struct etna_compile_data *cd, const struct tgsi_token *tokens)
+{
+ struct tgsi_parse_context ctx = {};
+ unsigned status = TGSI_PARSE_OK;
+ status = tgsi_parse_init(&ctx, tokens);
+ assert(status == TGSI_PARSE_OK);
+
+ int inst_idx = 0;
+ while(!tgsi_parse_end_of_tokens(&ctx))
+ {
+ tgsi_parse_token(&ctx);
+ switch(ctx.FullToken.Token.Type)
+ {
+ case TGSI_TOKEN_TYPE_INSTRUCTION: {
+ const struct tgsi_full_instruction *inst = &ctx.FullToken.FullInstruction;
+ /* iterate over operands */
+ switch(inst->Instruction.Opcode)
+ {
+ case TGSI_OPCODE_MOV: {
+ uint out_idx = inst->Dst[0].Register.Index;
+ uint in_idx = inst->Src[0].Register.Index;
+ /* assignment of temporary to output --
+ * and the output doesn't yet have a native register assigned
+ * and the last use of the temporary is this instruction
+ */
+ if(inst->Dst[0].Register.File == TGSI_FILE_OUTPUT &&
+ inst->Src[0].Register.File == TGSI_FILE_TEMPORARY &&
+ !cd->file[TGSI_FILE_OUTPUT][out_idx].native.valid &&
+ cd->file[TGSI_FILE_TEMPORARY][in_idx].last_use == inst_idx)
+ {
+ cd->file[TGSI_FILE_OUTPUT][out_idx].native = cd->file[TGSI_FILE_TEMPORARY][in_idx].native;
+ /* prevent temp from being re-used for the rest of the shader */
+ cd->file[TGSI_FILE_TEMPORARY][in_idx].last_use = ETNA_MAX_TOKENS;
+ /* mark this MOV instruction as a no-op */
+ cd->dead_inst[inst_idx] = true;
+ }
+ /* direct assignment of input to output --
+ * and the input or output doesn't yet have a native register assigned
+ * and the output is only used in this instruction,
+ * allocate a new register, and associate both input and output to it */
+ if(inst->Dst[0].Register.File == TGSI_FILE_OUTPUT &&
+ inst->Src[0].Register.File == TGSI_FILE_INPUT &&
+ !cd->file[TGSI_FILE_INPUT][in_idx].native.valid &&
+ !cd->file[TGSI_FILE_OUTPUT][out_idx].native.valid &&
+ cd->file[TGSI_FILE_OUTPUT][out_idx].last_use == inst_idx &&
+ cd->file[TGSI_FILE_OUTPUT][out_idx].first_use == inst_idx &&
+ etna_mov_check_no_swizzle(inst->Dst[0].Register, inst->Src[0].Register))
+ {
+ cd->file[TGSI_FILE_OUTPUT][out_idx].native = cd->file[TGSI_FILE_INPUT][in_idx].native =
+ alloc_new_native_reg(cd);
+ /* mark this MOV instruction as a no-op */
+ cd->dead_inst[inst_idx] = true;
+ }
+ } break;
+ default: ;
+ }
+ inst_idx += 1;
+ } break;
+ }
+ }
+ tgsi_parse_free(&ctx);
+}
+
+/* Get temporary to be used within one TGSI instruction.
+ * The first time that this function is called the temporary will be allocated.
+ * Each call to this function will return the same temporary.
+ */
+static struct etna_native_reg etna_compile_get_inner_temp(struct etna_compile_data *cd)
+{
+ if(cd->inner_temps)
+ BUG("Multiple inner temporaries (%i) requested in one instruction", cd->inner_temps + 1);
+ if(!cd->inner_temp.valid)
+ cd->inner_temp = alloc_new_native_reg(cd);
+ cd->inner_temps += 1;
+ return cd->inner_temp;
+}
+
+/* emit instruction and append to program */
+static void emit_inst(struct etna_compile_data *cd, struct etna_inst *inst)
+{
+ assert(cd->inst_ptr <= ETNA_MAX_INSTRUCTIONS);
+
+ /* Check for uniform conflicts (each instruction can only access one uniform),
+ * if detected, use an intermediate temporary */
+ unsigned uni_rgroup = -1;
+ unsigned uni_reg = -1;
+
+ for(int src=0; src<ETNA_NUM_SRC; ++src)
+ {
+ if(etna_rgroup_is_uniform(inst->src[src].rgroup))
+ {
+ if(uni_reg == -1) /* first unique uniform used */
+ {
+ uni_rgroup = inst->src[src].rgroup;
+ uni_reg = inst->src[src].reg;
+ } else { /* second or later; check that it is a re-use */
+ if(uni_rgroup != inst->src[src].rgroup ||
+ uni_reg != inst->src[src].reg)
+ {
+ DBG_F(ETNA_DBG_COMPILER_MSGS,
+ "perf warning: instruction that accesses different uniforms, need to generate extra MOV");
+ struct etna_native_reg inner_temp = etna_compile_get_inner_temp(cd);
+
+ /* Generate move instruction to temporary */
+ etna_assemble(&cd->code[cd->inst_ptr*4], &(struct etna_inst) {
+ .opcode = INST_OPCODE_MOV,
+ .dst.use = 1,
+ .dst.comps = INST_COMPS_X | INST_COMPS_Y | INST_COMPS_Z | INST_COMPS_W,
+ .dst.reg = inner_temp.id,
+ .src[2] = inst->src[src]
+ });
+ cd->inst_ptr ++;
+
+ /* Modify instruction to use temp register instead of uniform */
+ inst->src[src].use = 1;
+ inst->src[src].rgroup = INST_RGROUP_TEMP;
+ inst->src[src].reg = inner_temp.id;
+ inst->src[src].swiz = INST_SWIZ_IDENTITY; /* swizzling happens on MOV */
+ inst->src[src].neg = 0; /* negation happens on MOV */
+ inst->src[src].abs = 0; /* abs happens on MOV */
+ inst->src[src].amode = 0; /* amode effects happen on MOV */
+ }
+ }
+ }
+ }
+
+ /* Finally assemble the actual instruction */
+ etna_assemble(&cd->code[cd->inst_ptr*4], inst);
+ cd->inst_ptr ++;
+}
+
+/* convert destination operand */
+static struct etna_inst_dst convert_dst(struct etna_compile_data *cd, const struct tgsi_full_dst_register *in)
+{
+ struct etna_inst_dst rv = {
+ /// XXX .amode
+ .use = 1,
+ .comps = in->Register.WriteMask,
+ };
+ struct etna_native_reg native_reg = cd->file[in->Register.File][in->Register.Index].native;
+ assert(native_reg.valid && !native_reg.is_tex && native_reg.rgroup == INST_RGROUP_TEMP); /* can only assign to temporaries */
+ rv.reg = native_reg.id;
+ return rv;
+}
+
+/* convert texture operand */
+static struct etna_inst_tex convert_tex(struct etna_compile_data *cd, const struct tgsi_full_src_register *in, const struct tgsi_instruction_texture *tex)
+{
+ struct etna_inst_tex rv = {
+ // XXX .amode (to allow for an array of samplers?)
+ .swiz = INST_SWIZ_IDENTITY
+ };
+ struct etna_native_reg native_reg = cd->file[in->Register.File][in->Register.Index].native;
+ assert(native_reg.is_tex && native_reg.valid);
+ rv.id = native_reg.id;
+ return rv;
+}
+
+/* convert source operand */
+static struct etna_inst_src convert_src(struct etna_compile_data *cd, const struct tgsi_full_src_register *in, uint32_t swizzle)
+{
+ struct etna_inst_src rv = {
+ .use = 1,
+ .swiz = inst_swiz_compose(
+ INST_SWIZ_X(in->Register.SwizzleX) | INST_SWIZ_Y(in->Register.SwizzleY) |
+ INST_SWIZ_Z(in->Register.SwizzleZ) | INST_SWIZ_W(in->Register.SwizzleW),
+ swizzle),
+ .neg = in->Register.Negate,
+ .abs = in->Register.Absolute,
+ // XXX .amode
+ };
+ struct etna_native_reg native_reg = cd->file[in->Register.File][in->Register.Index].native;
+ assert(native_reg.valid && !native_reg.is_tex);
+ rv.rgroup = native_reg.rgroup;
+ rv.reg = native_reg.id;
+ return rv;
+}
+
+/* convert destination to source operand (for operation in place)
+ * i.e,
+ * MUL dst0.x__w, src0.xyzw, 2/PI
+ * SIN dst0.x__w, dst0.xyzw
+ */
+static struct etna_inst_src convert_dst_to_src(struct etna_compile_data *cd, const struct tgsi_full_dst_register *in)
+{
+ struct etna_inst_src rv = {
+ .use = 1,
+ .swiz = INST_SWIZ_IDENTITY, /* no swizzle needed, destination does selection */
+ .neg = 0,
+ .abs = 0,
+ };
+ struct etna_native_reg native_reg = cd->file[in->Register.File][in->Register.Index].native;
+ assert(native_reg.valid && !native_reg.is_tex);
+ rv.rgroup = native_reg.rgroup;
+ rv.reg = native_reg.id;
+ return rv;
+}
+
+/* create a new label */
+static struct etna_compile_label *alloc_new_label(struct etna_compile_data *cd)
+{
+ assert(cd->num_labels < ETNA_MAX_LABELS);
+ struct etna_compile_label *rv = &cd->labels[cd->num_labels++];
+ rv->inst_idx = -1; /* start by point to no specific instruction */
+ return rv;
+}
+
+/* place label at current instruction pointer */
+static void label_place(struct etna_compile_data *cd, struct etna_compile_label *label)
+{
+ label->inst_idx = cd->inst_ptr;
+}
+
+/* mark label use at current instruction.
+ * target of the label will be filled in in the marked instruction's src2.imm slot as soon
+ * as the value becomes known.
+ */
+static void label_mark_use(struct etna_compile_data *cd, struct etna_compile_label *label)
+{
+ assert(cd->inst_ptr < ETNA_MAX_INSTRUCTIONS);
+ cd->lbl_usage[cd->inst_ptr] = label;
+}
+
+/* Pass -- compile instructions */
+static void etna_compile_pass_generate_code(struct etna_compile_data *cd, const struct tgsi_token *tokens)
+{
+ struct tgsi_parse_context ctx = {};
+ unsigned status = TGSI_PARSE_OK;
+ status = tgsi_parse_init(&ctx, tokens);
+ assert(status == TGSI_PARSE_OK);
+
+ int inst_idx = 0;
+ while(!tgsi_parse_end_of_tokens(&ctx))
+ {
+ tgsi_parse_token(&ctx);
+ const struct tgsi_full_instruction *inst = 0;
+ /* No inner temps used yet for this instruction, clear counter */
+ cd->inner_temps = 0;
+
+ switch(ctx.FullToken.Token.Type)
+ {
+ case TGSI_TOKEN_TYPE_INSTRUCTION:
+ /* iterate over operands */
+ inst = &ctx.FullToken.FullInstruction;
+ if(cd->dead_inst[inst_idx]) /* skip dead instructions */
+ {
+ inst_idx++;
+ continue;
+ }
+ assert(inst->Instruction.Saturate != TGSI_SAT_MINUS_PLUS_ONE);
+ int sat = (inst->Instruction.Saturate == TGSI_SAT_ZERO_ONE);
+ /* Use a naive switch statement to get up and running, later on when we have more experience with
+ * Vivante instructions generation, this may be shortened greatly by using lookup in a table with patterns. */
+ switch(inst->Instruction.Opcode)
+ {
+ case TGSI_OPCODE_MOV:
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_MOV,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_LIT: {
+ /*
+ LOG tmp.x, void, void, src.yyyy
+ MUL tmp.x, tmp.xxxx, src.wwww, void
+ LITP dst, src.xxyy, src.xxxx, tmp.xxxx
+ */
+ struct etna_native_reg inner_temp = etna_compile_get_inner_temp(cd);
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_LOG,
+ .sat = 0,
+ .dst.use = 1,
+ .dst.comps = INST_COMPS_X, /* tmp.x */
+ .dst.reg = inner_temp.id,
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_BROADCAST(1)), /* src.yyyy */
+ });
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_MUL,
+ .sat = 0,
+ .dst.use = 1,
+ .dst.comps = INST_COMPS_X,
+ .dst.reg = inner_temp.id,
+ .src[0].use = 1,
+ .src[0].swiz = INST_SWIZ_BROADCAST(0), /* tmp.xxxx */
+ .src[0].neg = 0,
+ .src[0].abs = 0,
+ .src[0].rgroup = inner_temp.rgroup,
+ .src[0].reg = inner_temp.id,
+ .src[1] = convert_src(cd, &inst->Src[0], INST_SWIZ_BROADCAST(3)), /* src.wwww */
+ });
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_LITP,
+ .sat = 0,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[0] = convert_src(cd, &inst->Src[0],
+ (INST_SWIZ_X(0) | INST_SWIZ_Y(0) | INST_SWIZ_Z(1) | INST_SWIZ_W(1))), /* src.xxyy */
+ .src[1] = convert_src(cd, &inst->Src[0], INST_SWIZ_BROADCAST(0)), /* src.xxxx */
+ .src[2].use = 1,
+ .src[2].swiz = INST_SWIZ_BROADCAST(0), /* tmp.xxxx */
+ .src[2].neg = 0,
+ .src[2].abs = 0,
+ .src[2].rgroup = inner_temp.rgroup,
+ .src[2].reg = inner_temp.id,
+ });
+ } break;
+ case TGSI_OPCODE_RCP:
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_RCP,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_RSQ:
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_RSQ,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_MUL:
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_MUL,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[0] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ .src[1] = convert_src(cd, &inst->Src[1], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_ADD:
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_ADD,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[0] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ .src[2] = convert_src(cd, &inst->Src[1], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_DP3:
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_DP3,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[0] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ .src[1] = convert_src(cd, &inst->Src[1], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_DP4:
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_DP4,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[0] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ .src[1] = convert_src(cd, &inst->Src[1], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_MIN:
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_SELECT,
+ .cond = INST_CONDITION_GT,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[0] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ .src[1] = convert_src(cd, &inst->Src[1], INST_SWIZ_IDENTITY),
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_MAX:
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_SELECT,
+ .cond = INST_CONDITION_LT,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[0] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ .src[1] = convert_src(cd, &inst->Src[1], INST_SWIZ_IDENTITY),
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_SLT:
+ case TGSI_OPCODE_SGE:
+ case TGSI_OPCODE_SEQ:
+ case TGSI_OPCODE_SGT:
+ case TGSI_OPCODE_SLE:
+ case TGSI_OPCODE_SNE:
+ case TGSI_OPCODE_STR: {
+ uint cond = 0;
+ switch(inst->Instruction.Opcode)
+ {
+ case TGSI_OPCODE_SLT: cond = INST_CONDITION_LT; break;
+ case TGSI_OPCODE_SGE: cond = INST_CONDITION_GE; break;
+ case TGSI_OPCODE_SEQ: cond = INST_CONDITION_EQ; break;
+ case TGSI_OPCODE_SGT: cond = INST_CONDITION_GT; break;
+ case TGSI_OPCODE_SLE: cond = INST_CONDITION_LE; break;
+ case TGSI_OPCODE_SNE: cond = INST_CONDITION_NE; break;
+ case TGSI_OPCODE_STR: cond = INST_CONDITION_TRUE; break;
+ }
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_SET,
+ .cond = cond,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[0] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ .src[1] = convert_src(cd, &inst->Src[1], INST_SWIZ_IDENTITY),
+ });
+ } break;
+ case TGSI_OPCODE_MAD:
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_MAD,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[0] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ .src[1] = convert_src(cd, &inst->Src[1], INST_SWIZ_IDENTITY),
+ .src[2] = convert_src(cd, &inst->Src[2], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_SUB: { /* ADD with negated SRC1 */
+ struct etna_inst inst_out = {
+ .opcode = INST_OPCODE_ADD,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[0] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ .src[2] = convert_src(cd, &inst->Src[1], INST_SWIZ_IDENTITY),
+ };
+ inst_out.src[2].neg = !inst_out.src[2].neg;
+ emit_inst(cd, &inst_out);
+ } break;
+ case TGSI_OPCODE_SQRT: /* only generated if HAS_SQRT_TRIG */
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_SQRT,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_FRC:
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_FRC,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_FLR: /* XXX HAS_SIGN_FLOOR_CEIL */
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_FLOOR,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_CEIL: /* XXX HAS_SIGN_FLOOR_CEIL */
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_CEIL,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_SSG: /* XXX HAS_SIGN_FLOOR_CEIL */
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_SIGN,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_EX2:
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_EXP,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_LG2:
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_LOG,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_ABS: /* XXX can be propagated into uses of destination operand */
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_MOV,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ .src[2].abs = 1
+ });
+ break;
+ case TGSI_OPCODE_COS: /* fall through */
+ case TGSI_OPCODE_SIN:
+ if(cd->specs->has_sin_cos_sqrt)
+ {
+ /* add divide by PI/2, re-use dest register, this works even in src=dst case
+ * because second instruction only uses output of first. */
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_MUL,
+ .sat = 0,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[0] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY), /* any swizzling happens here */
+ .src[1] = alloc_imm_u32(cd, 2.0f/M_PI),
+ });
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = inst->Instruction.Opcode == TGSI_OPCODE_COS ? INST_OPCODE_COS : INST_OPCODE_SIN,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[2] = convert_dst_to_src(cd, &inst->Dst[0]),
+ });
+ } else {
+ /* XXX fall back to Taylor series if not HAS_SQRT_TRIG,
+ * see i915_fragprog.c for a good example.
+ */
+ assert(0);
+ }
+ break;
+ case TGSI_OPCODE_DDX:
+ case TGSI_OPCODE_DDY:
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = inst->Instruction.Opcode == TGSI_OPCODE_DDX ? INST_OPCODE_DSX : INST_OPCODE_DSY,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[0] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_KILL_IF:
+ /* discard if (src.x < 0 || src.y < 0 || src.z < 0 || src.w < 0) */
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_TEXKILL,
+ .cond = INST_CONDITION_LZ,
+ .src[0] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY)
+ });
+ break;
+ case TGSI_OPCODE_KILL:
+ /* discard always */
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_TEXKILL,
+ .cond = INST_CONDITION_TRUE
+ });
+ break;
+ case TGSI_OPCODE_TEX:
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_TEXLD,
+ .sat = (inst->Instruction.Saturate == TGSI_SAT_ZERO_ONE),
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .tex = convert_tex(cd, &inst->Src[1], &inst->Texture),
+ .src[0] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_TXP: { /* divide src.xyz by src.w */
+ struct etna_native_reg temp = etna_compile_get_inner_temp(cd);
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_RCP,
+ .sat = 0,
+ .dst.use = 1,
+ .dst.comps = INST_COMPS_W, /* tmp.w */
+ .dst.reg = temp.id,
+ .src[2] = convert_src(cd, &inst->Src[0], INST_SWIZ_BROADCAST(3)),
+ });
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_MUL,
+ .sat = 0,
+ .dst.use = 1,
+ .dst.comps = INST_COMPS_X | INST_COMPS_Y | INST_COMPS_Z, /* tmp.xyz */
+ .dst.reg = temp.id,
+ .src[0].use = 1, /* tmp.wwww */
+ .src[0].swiz = INST_SWIZ_BROADCAST(3),
+ .src[0].neg = 0,
+ .src[0].abs = 0,
+ .src[0].rgroup = temp.rgroup,
+ .src[0].reg = temp.id,
+ .src[1] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY), /* src.xyzw */
+ });
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_TEXLD,
+ .sat = (inst->Instruction.Saturate == TGSI_SAT_ZERO_ONE),
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .tex = convert_tex(cd, &inst->Src[1], &inst->Texture),
+ .src[0].use = 1, /* tmp.xyzw */
+ .src[0].swiz = INST_SWIZ_IDENTITY,
+ .src[0].neg = 0,
+ .src[0].abs = 0,
+ .src[0].rgroup = temp.rgroup,
+ .src[0].reg = temp.id,
+ });
+ } break;
+ case TGSI_OPCODE_CMP: /* componentwise dst = (src0 < 0) ? src1 : src2 */
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_SELECT,
+ .cond = INST_CONDITION_LZ,
+ .sat = sat,
+ .dst = convert_dst(cd, &inst->Dst[0]),
+ .src[0] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ .src[1] = convert_src(cd, &inst->Src[1], INST_SWIZ_IDENTITY),
+ .src[2] = convert_src(cd, &inst->Src[2], INST_SWIZ_IDENTITY),
+ });
+ break;
+ case TGSI_OPCODE_IF: {
+ struct etna_compile_frame *f = &cd->frame_stack[cd->frame_sp++];
+ /* push IF to stack */
+ f->type = ETNA_COMPILE_FRAME_IF;
+ /* create "else" label */
+ f->lbl_else = alloc_new_label(cd);
+ f->lbl_endif = NULL;
+ /* mark position in instruction stream of label reference so that it can be filled in in next pass */
+ label_mark_use(cd, f->lbl_else);
+ /* create conditional branch to label if src0 EQ 0 */
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_BRANCH,
+ .cond = INST_CONDITION_EQ,
+ .src[0] = convert_src(cd, &inst->Src[0], INST_SWIZ_IDENTITY),
+ .src[1] = alloc_imm_f32(cd, 0.0f),
+ /* imm is filled in later */
+ });
+ } break;
+ case TGSI_OPCODE_ELSE: {
+ assert(cd->frame_sp>0);
+ struct etna_compile_frame *f = &cd->frame_stack[cd->frame_sp-1];
+ assert(f->type == ETNA_COMPILE_FRAME_IF);
+ /* create "endif" label, and branch to endif label */
+ f->lbl_endif = alloc_new_label(cd);
+ label_mark_use(cd, f->lbl_endif);
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_BRANCH,
+ .cond = INST_CONDITION_TRUE,
+ /* imm is filled in later */
+ });
+ /* mark "else" label at this position in instruction stream */
+ label_place(cd, f->lbl_else);
+ } break;
+ case TGSI_OPCODE_ENDIF: {
+ assert(cd->frame_sp>0);
+ struct etna_compile_frame *f = &cd->frame_stack[--cd->frame_sp];
+ assert(f->type == ETNA_COMPILE_FRAME_IF);
+ /* assign "endif" or "else" (if no ELSE) label to current position in instruction stream, pop IF */
+ if(f->lbl_endif != NULL)
+ label_place(cd, f->lbl_endif);
+ else
+ label_place(cd, f->lbl_else);
+ } break;
+ case TGSI_OPCODE_NOP: break;
+ case TGSI_OPCODE_END: /* Nothing to do */ break;
+
+ case TGSI_OPCODE_PK2H:
+ case TGSI_OPCODE_PK2US:
+ case TGSI_OPCODE_PK4B:
+ case TGSI_OPCODE_PK4UB:
+ case TGSI_OPCODE_RFL:
+ case TGSI_OPCODE_RCC:
+ case TGSI_OPCODE_DPH: /* src0.x * src1.x + src0.y * src1.y + src0.z * src1.z + src1.w */
+ case TGSI_OPCODE_POW: /* lowered by mesa to ex2(y*lg2(x)) */
+ case TGSI_OPCODE_XPD:
+ case TGSI_OPCODE_ROUND:
+ case TGSI_OPCODE_CLAMP:
+ case TGSI_OPCODE_DP2A:
+ case TGSI_OPCODE_LRP: /* lowered by mesa to (op2 * (1.0f - op0)) + (op1 * op0) */
+ case TGSI_OPCODE_CND:
+ case TGSI_OPCODE_SFL: /* SET to 0 */
+ case TGSI_OPCODE_DST: /* XXX INST_OPCODE_DST */
+ case TGSI_OPCODE_DP2: /* Either MUL+MAD or DP3 with a zeroed channel, but we don't have a 'zero' swizzle */
+ case TGSI_OPCODE_EXP:
+ case TGSI_OPCODE_LOG:
+ case TGSI_OPCODE_TXB: /* XXX INST_OPCODE_TEXLDB */
+ case TGSI_OPCODE_TXL: /* XXX INST_OPCODE_TEXLDL */
+ case TGSI_OPCODE_UP2H:
+ case TGSI_OPCODE_UP2US:
+ case TGSI_OPCODE_UP4B:
+ case TGSI_OPCODE_UP4UB:
+ case TGSI_OPCODE_X2D:
+ case TGSI_OPCODE_ARL: /* floor */
+ case TGSI_OPCODE_ARR: /* round */
+ case TGSI_OPCODE_ARA: /* to be removed according to doc */
+ case TGSI_OPCODE_BRA: /* to be removed according to doc */
+ case TGSI_OPCODE_CAL: /* XXX INST_OPCODE_CALL */
+ case TGSI_OPCODE_RET: /* XXX INST_OPCODE_RET */
+ case TGSI_OPCODE_BRK: /* break from loop */
+ case TGSI_OPCODE_BGNLOOP:
+ case TGSI_OPCODE_ENDLOOP:
+ case TGSI_OPCODE_BGNSUB:
+ case TGSI_OPCODE_ENDSUB:
+ default:
+ BUG("Unhandled instruction %s", tgsi_get_opcode_name(inst->Instruction.Opcode));
+ assert(0);
+ }
+ inst_idx += 1;
+ break;
+ }
+ }
+ tgsi_parse_free(&ctx);
+}
+
+/* Look up register by semantic */
+static struct etna_reg_desc *find_decl_by_semantic(struct etna_compile_data *cd, uint file, uint name, uint index)
+{
+ for(int idx=0; idx<cd->file_size[file]; ++idx)
+ {
+ struct etna_reg_desc *reg = &cd->file[file][idx];
+ if(reg->semantic.Name == name && reg->semantic.Index == index)
+ {
+ return reg;
+ }
+ }
+ return NULL; /* not found */
+}
+
+/** Add ADD and MUL instruction to bring Z/W to 0..1 if -1..1 if needed:
+ * - this is a vertex shader
+ * - and this is an older GPU
+ */
+static void etna_compile_add_z_div_if_needed(struct etna_compile_data *cd)
+{
+ if(cd->processor == TGSI_PROCESSOR_VERTEX && cd->specs->vs_need_z_div)
+ {
+ /* find position out */
+ struct etna_reg_desc *pos_reg = find_decl_by_semantic(cd, TGSI_FILE_OUTPUT, TGSI_SEMANTIC_POSITION, 0);
+ if(pos_reg != NULL)
+ {
+ /*
+ * ADD tX.__z_, tX.zzzz, void, tX.wwww
+ * MUL tX.__z_, tX.zzzz, 0.5, void
+ */
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_ADD,
+ .dst.use = 1,
+ .dst.reg = pos_reg->native.id,
+ .dst.comps = INST_COMPS_Z,
+ .src[0].use = 1,
+ .src[0].reg = pos_reg->native.id,
+ .src[0].swiz = INST_SWIZ_BROADCAST(INST_SWIZ_COMP_Z),
+ .src[2].use = 1,
+ .src[2].reg = pos_reg->native.id,
+ .src[2].swiz = INST_SWIZ_BROADCAST(INST_SWIZ_COMP_W),
+ });
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_MUL,
+ .dst.use = 1,
+ .dst.reg = pos_reg->native.id,
+ .dst.comps = INST_COMPS_Z,
+ .src[0].use = 1,
+ .src[0].reg = pos_reg->native.id,
+ .src[0].swiz = INST_SWIZ_BROADCAST(INST_SWIZ_COMP_Z),
+ .src[1] = alloc_imm_f32(cd, 0.5f),
+ });
+ }
+ }
+}
+
+/** add a NOP to the shader if
+ * a) the shader is empty
+ * or
+ * b) there is a label at the end if the shader
+ */
+static void etna_compile_add_nop_if_needed(struct etna_compile_data *cd)
+{
+ bool label_at_last_inst = false;
+ for(int idx=0; idx<cd->num_labels; ++idx)
+ {
+ if(cd->labels[idx].inst_idx == (cd->inst_ptr-1))
+ {
+ label_at_last_inst = true;
+ }
+ }
+ if(cd->inst_ptr == 0 || label_at_last_inst)
+ {
+ emit_inst(cd, &(struct etna_inst) {
+ .opcode = INST_OPCODE_NOP
+ });
+ }
+}
+
+/* Allocate CONST and IMM to native ETNA_RGROUP_UNIFORM(x).
+ * CONST must be consecutive as const buffers are supposed to be consecutive, and before IMM, as this is
+ * more convenient because is possible for the compilation process itself to generate extra
+ * immediates for constants such as pi, one, zero.
+ */
+static void assign_constants_and_immediates(struct etna_compile_data *cd)
+{
+ for(int idx=0; idx<cd->file_size[TGSI_FILE_CONSTANT]; ++idx)
+ {
+ cd->file[TGSI_FILE_CONSTANT][idx].native.valid = 1;
+ cd->file[TGSI_FILE_CONSTANT][idx].native.rgroup = INST_RGROUP_UNIFORM_0;
+ cd->file[TGSI_FILE_CONSTANT][idx].native.id = idx;
+ }
+ /* immediates start after the constants */
+ cd->imm_base = cd->file_size[TGSI_FILE_CONSTANT] * 4;
+ for(int idx=0; idx<cd->file_size[TGSI_FILE_IMMEDIATE]; ++idx)
+ {
+ cd->file[TGSI_FILE_IMMEDIATE][idx].native.valid = 1;
+ cd->file[TGSI_FILE_IMMEDIATE][idx].native.rgroup = INST_RGROUP_UNIFORM_0;
+ cd->file[TGSI_FILE_IMMEDIATE][idx].native.id = cd->imm_base/4 + idx;
+ }
+ DBG_F(ETNA_DBG_COMPILER_MSGS, "imm base: %i size: %i", cd->imm_base, cd->imm_size);
+}
+
+/* Assign declared samplers to native texture units */
+static void assign_texture_units(struct etna_compile_data *cd)
+{
+ uint tex_base = 0;
+ if(cd->processor == TGSI_PROCESSOR_VERTEX)
+ {
+ tex_base = cd->specs->vertex_sampler_offset;
+ }
+ for(int idx=0; idx<cd->file_size[TGSI_FILE_SAMPLER]; ++idx)
+ {
+ cd->file[TGSI_FILE_SAMPLER][idx].native.valid = 1;
+ cd->file[TGSI_FILE_SAMPLER][idx].native.is_tex = 1; // overrides rgroup
+ cd->file[TGSI_FILE_SAMPLER][idx].native.id = tex_base + idx;
+ }
+}
+
+/* additional pass to fill in branch targets */
+static void etna_compile_fill_in_labels(struct etna_compile_data *cd)
+{
+ for(int idx=0; idx<cd->inst_ptr ; ++idx)
+ {
+ if(cd->lbl_usage[idx])
+ {
+ etna_assemble_set_imm(&cd->code[idx * 4], cd->lbl_usage[idx]->inst_idx);
+ }
+ }
+}
+
+/* compare two etna_native_reg structures, return true if equal */
+static bool cmp_etna_native_reg(const struct etna_native_reg to, const struct etna_native_reg from)
+{
+ return to.valid == from.valid && to.is_tex == from.is_tex && to.rgroup == from.rgroup &&
+ to.id == from.id;
+}
+
+/* go through all declarations and swap native registers *to* and *from* */
+static void swap_native_registers(struct etna_compile_data *cd, const struct etna_native_reg to, const struct etna_native_reg from)
+{
+ if(cmp_etna_native_reg(from, to))
+ return; /* Nothing to do */
+ for(int idx=0; idx<cd->total_decls; ++idx)
+ {
+ if(cmp_etna_native_reg(cd->decl[idx].native, from))
+ {
+ cd->decl[idx].native = to;
+ } else if(cmp_etna_native_reg(cd->decl[idx].native, to))
+ {
+ cd->decl[idx].native = from;
+ }
+ }
+}
+
+/* For PS we need to permute so that inputs are always in temporary 0..N-1.
+ * Semantic POS is always t0. If that semantic is not used, avoid t0.
+ */
+static void permute_ps_inputs(struct etna_compile_data *cd)
+{
+ /* Special inputs:
+ * gl_FragCoord VARYING_SLOT_POS TGSI_SEMANTIC_POSITION
+ * gl_PointCoord VARYING_SLOT_PNTC TGSI_SEMANTIC_PCOORD
+ */
+ uint native_idx = 1;
+ for(int idx=0; idx<cd->file_size[TGSI_FILE_INPUT]; ++idx)
+ {
+ struct etna_reg_desc *reg = &cd->file[TGSI_FILE_INPUT][idx];
+ uint input_id;
+ assert(reg->has_semantic);
+ if(!reg->active || reg->semantic.Name == TGSI_SEMANTIC_POSITION)
+ continue;
+ input_id = native_idx++;
+ swap_native_registers(cd, (struct etna_native_reg) {
+ .valid = 1,
+ .rgroup = INST_RGROUP_TEMP,
+ .id = input_id
+ }, cd->file[TGSI_FILE_INPUT][idx].native);
+ }
+ cd->num_varyings = native_idx-1;
+ if(native_idx > cd->next_free_native)
+ cd->next_free_native = native_idx;
+}
+
+/* fill in ps inputs into shader object */
+static void fill_in_ps_inputs(struct etna_shader_object *sobj, struct etna_compile_data *cd)
+{
+ sobj->num_inputs = cd->num_varyings;
+ assert(sobj->num_inputs < ETNA_NUM_INPUTS);
+ for(int idx=0; idx<cd->file_size[TGSI_FILE_INPUT]; ++idx)
+ {
+ struct etna_reg_desc *reg = &cd->file[TGSI_FILE_INPUT][idx];
+ if(reg->native.id > 0)
+ {
+ int input_id = reg->native.id - 1;
+ sobj->inputs[input_id].reg = reg->native.id;
+ sobj->inputs[input_id].semantic = reg->semantic;
+ if(reg->semantic.Name == TGSI_SEMANTIC_COLOR) /* colors affected by flat shading */
+ sobj->inputs[input_id].pa_attributes = 0x200;
+ else /* texture coord or other bypasses flat shading */
+ sobj->inputs[input_id].pa_attributes = 0x2f1;
+ /* convert usage mask to number of components (*=wildcard)
+ * .r (0..1) -> 1 component
+ * .*g (2..3) -> 2 component
+ * .**b (4..7) -> 3 components
+ * .***a (8..15) -> 4 components
+ */
+ sobj->inputs[input_id].num_components = util_last_bit(reg->usage_mask);
+ }
+ }
+ sobj->input_count_unk8 = 31; /* XXX what is this */
+}
+
+/* fill in output mapping for ps into shader object */
+static void fill_in_ps_outputs(struct etna_shader_object *sobj, struct etna_compile_data *cd)
+{
+ sobj->num_outputs = 0;
+ for(int idx=0; idx<cd->file_size[TGSI_FILE_OUTPUT]; ++idx)
+ {
+ struct etna_reg_desc *reg = &cd->file[TGSI_FILE_OUTPUT][idx];
+ switch(reg->semantic.Name)
+ {
+ case TGSI_SEMANTIC_COLOR: /* FRAG_RESULT_COLOR */
+ sobj->ps_color_out_reg = reg->native.id;
+ break;
+ case TGSI_SEMANTIC_POSITION: /* FRAG_RESULT_DEPTH */
+ sobj->ps_depth_out_reg = reg->native.id; /* =always native reg 0, only z component should be assigned */
+ break;
+ default:
+ assert(0); /* only outputs supported are COLOR and POSITION at the moment */
+ }
+ }
+}
+
+/* fill in inputs for vs into shader object */
+static void fill_in_vs_inputs(struct etna_shader_object *sobj, struct etna_compile_data *cd)
+{
+ sobj->num_inputs = 0;
+ for(int idx=0; idx<cd->file_size[TGSI_FILE_INPUT]; ++idx)
+ {
+ struct etna_reg_desc *reg = &cd->file[TGSI_FILE_INPUT][idx];
+ assert(sobj->num_inputs < ETNA_NUM_INPUTS);
+ /* XXX exclude inputs with special semantics such as gl_frontFacing */
+ sobj->inputs[sobj->num_inputs].reg = reg->native.id;
+ sobj->inputs[sobj->num_inputs].semantic = reg->semantic;
+ sobj->inputs[sobj->num_inputs].num_components = util_last_bit(reg->usage_mask);
+ sobj->num_inputs++;
+ }
+ sobj->input_count_unk8 = (sobj->num_inputs + 19)/16; /* XXX what is this */
+}
+
+/* build two-level output index [Semantic][Index] for fast linking */
+static void build_output_index(struct etna_shader_object *sobj)
+{
+ int total = 0;
+ int offset = 0;
+ for(int name=0; name<TGSI_SEMANTIC_COUNT; ++name)
+ {
+ total += sobj->output_count_per_semantic[name];
+ }
+ sobj->output_per_semantic_list = CALLOC(total, sizeof(struct etna_shader_inout *));
+ for(int name=0; name<TGSI_SEMANTIC_COUNT; ++name)
+ {
+ sobj->output_per_semantic[name] = &sobj->output_per_semantic_list[offset];
+ offset += sobj->output_count_per_semantic[name];
+ }
+ for(int idx=0; idx<sobj->num_outputs; ++idx)
+ {
+ sobj->output_per_semantic[sobj->outputs[idx].semantic.Name]
+ [sobj->outputs[idx].semantic.Index] = &sobj->outputs[idx];
+ }
+}
+
+/* fill in outputs for vs into shader object */
+static void fill_in_vs_outputs(struct etna_shader_object *sobj, struct etna_compile_data *cd)
+{
+ sobj->num_outputs = 0;
+ for(int idx=0; idx<cd->file_size[TGSI_FILE_OUTPUT]; ++idx)
+ {
+ struct etna_reg_desc *reg = &cd->file[TGSI_FILE_OUTPUT][idx];
+ assert(sobj->num_inputs < ETNA_NUM_INPUTS);
+ switch(reg->semantic.Name)
+ {
+ case TGSI_SEMANTIC_POSITION:
+ sobj->vs_pos_out_reg = reg->native.id;
+ break;
+ case TGSI_SEMANTIC_PSIZE:
+ sobj->vs_pointsize_out_reg = reg->native.id;
+ break;
+ default:
+ sobj->outputs[sobj->num_outputs].reg = reg->native.id;
+ sobj->outputs[sobj->num_outputs].semantic = reg->semantic;
+ sobj->outputs[sobj->num_outputs].num_components = 4; // XXX reg->num_components;
+ sobj->num_outputs++;
+ sobj->output_count_per_semantic[reg->semantic.Name] = MAX2(
+ reg->semantic.Index + 1,
+ sobj->output_count_per_semantic[reg->semantic.Name]);
+ }
+ }
+ /* build two-level index for linking */
+ build_output_index(sobj);
+
+ /* fill in "mystery meat" load balancing value. This value determines how work is scheduled between VS and PS
+ * in the unified shader architecture. More precisely, it is determined from the number of VS outputs, as well as chip-specific
+ * vertex output buffer size, vertex cache size, and the number of shader cores.
+ *
+ * XXX this is a conservative estimate, the "optimal" value is only known for sure at link time because some
+ * outputs may be unused and thus unmapped. Then again, in the general use case with GLSL the vertex and fragment
+ * shaders are linked already before submitting to Gallium, thus all outputs are used.
+ */
+ int half_out = (cd->file_size[TGSI_FILE_OUTPUT] + 1) / 2;
+ assert(half_out);
+ uint32_t b = ((20480/(cd->specs->vertex_output_buffer_size-2*half_out*cd->specs->vertex_cache_size))+9)/10;
+ uint32_t a = (b+256/(cd->specs->shader_core_count*half_out))/2;
+ sobj->vs_load_balancing = VIVS_VS_LOAD_BALANCING_A(MIN2(a,255)) |
+ VIVS_VS_LOAD_BALANCING_B(MIN2(b,255)) |
+ VIVS_VS_LOAD_BALANCING_C(0x3f) |
+ VIVS_VS_LOAD_BALANCING_D(0x0f);
+}
+
+static bool etna_compile_check_limits(struct etna_compile_data *cd)
+{
+ int max_uniforms = (cd->processor == TGSI_PROCESSOR_VERTEX) ?
+ cd->specs->max_vs_uniforms :
+ cd->specs->max_ps_uniforms;
+ /* round up number of uniforms, including immediates, in units of four */
+ int num_uniforms = cd->imm_base/4 + (cd->imm_size+3)/4;
+ if(cd->inst_ptr > cd->specs->max_instructions)
+ {
+ DBG("Number of instructions (%d) exceeds maximum %d", cd->inst_ptr, cd->specs->max_instructions);
+ return false;
+ }
+ if(cd->next_free_native > cd->specs->max_registers)
+ {
+ DBG("Number of registers (%d) exceeds maximum %d", cd->next_free_native, cd->specs->max_registers);
+ return false;
+ }
+ if(num_uniforms > max_uniforms)
+ {
+ DBG("Number of uniforms (%d) exceeds maximum %d", num_uniforms, max_uniforms);
+ return false;
+ }
+ if(cd->num_varyings > cd->specs->max_varyings)
+ {
+ DBG("Number of varyings (%d) exceeds maximum %d", cd->num_varyings, cd->specs->max_varyings);
+ return false;
+ }
+ return true;
+}
+
+int etna_compile_shader_object(const struct etna_pipe_specs *specs, const struct tgsi_token *tokens,
+ struct etna_shader_object **out)
+{
+ /* Create scratch space that may be too large to fit on stack
+ * XXX don't forget to free this on all exit paths.
+ */
+ struct etna_compile_data *cd = CALLOC_STRUCT(etna_compile_data);
+ cd->specs = specs;
+
+ /* Build a map from gallium register to native registers for files
+ * CONST, SAMP, IMM, OUT, IN, TEMP.
+ * SAMP will map as-is for fragment shaders, there will be a +8 offset for vertex shaders.
+ */
+ /* Pass one -- check register file declarations and immediates */
+ etna_compile_parse_declarations(cd, tokens);
+
+ etna_assign_decls(cd);
+
+ /* Pass two -- check usage of temporaries, inputs, outputs */
+ etna_compile_pass_check_usage(cd, tokens);
+
+ assign_special_inputs(cd);
+
+ /* Assign native temp register to TEMPs */
+ assign_temporaries_to_native(cd, cd->file[TGSI_FILE_TEMPORARY], cd->file_size[TGSI_FILE_TEMPORARY]);
+
+ /* optimize outputs */
+ etna_compile_pass_optimize_outputs(cd, tokens);
+
+ /* XXX assign special inputs: gl_FrontFacing (VARYING_SLOT_FACE)
+ * this is part of RGROUP_INTERNAL
+ */
+
+ /* assign inputs: last usage of input should be <= first usage of temp */
+ /* potential optimization case:
+ * if single MOV TEMP[y], IN[x] before which temp y is not used, and after which IN[x]
+ * is not read, temp[y] can be used as input register as-is
+ */
+ /* sort temporaries by first use
+ * sort inputs by last usage
+ * iterate over inputs, temporaries
+ * if last usage of input <= first usage of temp:
+ * assign input to temp
+ * advance input, temporary pointer
+ * else
+ * advance temporary pointer
+ *
+ * potential problem: instruction with multiple inputs of which one is the temp and the other is the input;
+ * however, as the temp is not used before this, how would this make sense? uninitialized temporaries have an undefined
+ * value, so this would be ok
+ */
+ assign_inouts_to_temporaries(cd, TGSI_FILE_INPUT);
+
+ /* assign outputs: first usage of output should be >= last usage of temp */
+ /* potential optimization case:
+ * if single MOV OUT[x], TEMP[y] (with full write mask, or at least writing all components that are used in
+ * the shader) after which temp y is no longer used temp[y] can be used as output register as-is
+ *
+ * potential problem: instruction with multiple outputs of which one is the temp and the other is the output;
+ * however, as the temp is not used after this, how would this make sense? could just discard the output value
+ */
+ /* sort temporaries by last use
+ * sort outputs by first usage
+ * iterate over outputs, temporaries
+ * if first usage of output >= last usage of temp:
+ * assign output to temp
+ * advance output, temporary pointer
+ * else
+ * advance temporary pointer
+ */
+ assign_inouts_to_temporaries(cd, TGSI_FILE_OUTPUT);
+
+ assign_constants_and_immediates(cd);
+ assign_texture_units(cd);
+
+ /* list declarations */
+ for(int x=0; x<cd->total_decls; ++x)
+ {
+ DBG_F(ETNA_DBG_COMPILER_MSGS, "%i: %s,%d active=%i first_use=%i last_use=%i native=%i usage_mask=%x has_semantic=%i", x, tgsi_file_name(cd->decl[x].file), cd->decl[x].idx,
+ cd->decl[x].active,
+ cd->decl[x].first_use, cd->decl[x].last_use, cd->decl[x].native.valid?cd->decl[x].native.id:-1,
+ cd->decl[x].usage_mask,
+ cd->decl[x].has_semantic);
+ if(cd->decl[x].has_semantic)
+ DBG_F(ETNA_DBG_COMPILER_MSGS, " semantic_name=%s semantic_idx=%i",
+ tgsi_semantic_names[cd->decl[x].semantic.Name], cd->decl[x].semantic.Index);
+ }
+ /* XXX for PS we need to permute so that inputs are always in temporary 0..N-1.
+ * There is no "switchboard" for varyings (AFAIK!). The output color, however, can be routed
+ * from an arbitrary temporary.
+ */
+ if(cd->processor == TGSI_PROCESSOR_FRAGMENT)
+ {
+ permute_ps_inputs(cd);
+ }
+
+ /* list declarations */
+ for(int x=0; x<cd->total_decls; ++x)
+ {
+ DBG_F(ETNA_DBG_COMPILER_MSGS, "%i: %s,%d active=%i first_use=%i last_use=%i native=%i usage_mask=%x has_semantic=%i", x, tgsi_file_name(cd->decl[x].file), cd->decl[x].idx,
+ cd->decl[x].active,
+ cd->decl[x].first_use, cd->decl[x].last_use, cd->decl[x].native.valid?cd->decl[x].native.id:-1,
+ cd->decl[x].usage_mask,
+ cd->decl[x].has_semantic);
+ if(cd->decl[x].has_semantic)
+ DBG_F(ETNA_DBG_COMPILER_MSGS, " semantic_name=%s semantic_idx=%i",
+ tgsi_semantic_names[cd->decl[x].semantic.Name], cd->decl[x].semantic.Index);
+ }
+
+ /* pass 3: generate instructions
+ */
+ etna_compile_pass_generate_code(cd, tokens);
+ etna_compile_add_z_div_if_needed(cd);
+ etna_compile_add_nop_if_needed(cd);
+ etna_compile_fill_in_labels(cd);
+
+ if(!etna_compile_check_limits(cd))
+ {
+ FREE(cd);
+ *out = NULL;
+ return -1;
+ }
+
+ /* fill in output structure */
+ struct etna_shader_object *sobj = CALLOC_STRUCT(etna_shader_object);
+ sobj->processor = cd->processor;
+ sobj->code_size = cd->inst_ptr * 4;
+ sobj->code = mem_dup(cd->code, cd->inst_ptr * 16);
+ sobj->num_temps = cd->next_free_native;
+ sobj->const_base = 0;
+ sobj->const_size = cd->imm_base;
+ sobj->imm_base = cd->imm_base;
+ sobj->imm_size = cd->imm_size;
+ sobj->imm_data = mem_dup(cd->imm_data, cd->imm_size * 4);
+ sobj->vs_pos_out_reg = -1;
+ sobj->vs_pointsize_out_reg = -1;
+ sobj->ps_color_out_reg = -1;
+ sobj->ps_depth_out_reg = -1;
+ if(cd->processor == TGSI_PROCESSOR_VERTEX)
+ {
+ fill_in_vs_inputs(sobj, cd);
+ fill_in_vs_outputs(sobj, cd);
+ } else if(cd->processor == TGSI_PROCESSOR_FRAGMENT) {
+ fill_in_ps_inputs(sobj, cd);
+ fill_in_ps_outputs(sobj, cd);
+ }
+ *out = sobj;
+ FREE(cd);
+ return 0;
+}
+
+extern const char *tgsi_swizzle_names[];
+void etna_dump_shader_object(const struct etna_shader_object *sobj)
+{
+ if(sobj->processor == TGSI_PROCESSOR_VERTEX)
+ {
+ printf("VERT\n");
+ } else {
+ printf("FRAG\n");
+ }
+ for(int x=0; x<sobj->code_size/4; ++x)
+ {
+ printf("| %08x %08x %08x %08x\n", sobj->code[x*4+0], sobj->code[x*4+1], sobj->code[x*4+2], sobj->code[x*4+3]);
+ }
+ printf("num temps: %i\n", sobj->num_temps);
+ printf("num const: %i\n", sobj->const_size);
+ printf("immediates:\n");
+ for(int idx=0; idx<sobj->imm_size; ++idx)
+ {
+ printf(" [%i].%s = %f (0x%08x)\n", (idx+sobj->imm_base)/4, tgsi_swizzle_names[idx%4],
+ *((float*)&sobj->imm_data[idx]), sobj->imm_data[idx]);
+ }
+ printf("inputs:\n");
+ for(int idx=0; idx<sobj->num_inputs; ++idx)
+ {
+ printf(" [%i] name=%s index=%i pa=%08x comps=%i\n",
+ sobj->inputs[idx].reg,
+ tgsi_semantic_names[sobj->inputs[idx].semantic.Name], sobj->inputs[idx].semantic.Index,
+ sobj->inputs[idx].pa_attributes, sobj->inputs[idx].num_components);
+ }
+ printf("outputs:\n");
+ for(int idx=0; idx<sobj->num_outputs; ++idx)
+ {
+ printf(" [%i] name=%s index=%i pa=%08x comps=%i\n",
+ sobj->outputs[idx].reg,
+ tgsi_semantic_names[sobj->outputs[idx].semantic.Name], sobj->outputs[idx].semantic.Index,
+ sobj->outputs[idx].pa_attributes, sobj->outputs[idx].num_components);
+ }
+ printf("special:\n");
+ if(sobj->processor == TGSI_PROCESSOR_VERTEX)
+ {
+ printf(" vs_pos_out_reg=%i\n", sobj->vs_pos_out_reg);
+ printf(" vs_pointsize_out_reg=%i\n", sobj->vs_pointsize_out_reg);
+ printf(" vs_load_balancing=0x%08x\n", sobj->vs_load_balancing);
+ } else {
+ printf(" ps_color_out_reg=%i\n", sobj->ps_color_out_reg);
+ printf(" ps_depth_out_reg=%i\n", sobj->ps_depth_out_reg);
+ }
+ printf(" input_count_unk8=0x%08x\n", sobj->input_count_unk8);
+}
+
+void etna_destroy_shader_object(struct etna_shader_object *sobj)
+{
+ if(sobj != NULL)
+ {
+ FREE(sobj->code);
+ FREE(sobj->imm_data);
+ FREE(sobj->output_per_semantic_list);
+ FREE(sobj);
+ }
+}
+
+int etna_link_shader_objects(struct etna_shader_link_info *info, const struct etna_shader_object *vs, const struct etna_shader_object *fs)
+{
+ /* For each fs input we need to find the associated ps input, which can be found by matching on
+ * semantic name and index.
+ * A binary search can be used because the vs outputs are sorted by semantic in fill_in_vs_outputs.
+ */
+ assert(fs->num_inputs < ETNA_NUM_INPUTS);
+ for(int idx=0; idx<fs->num_inputs; ++idx)
+ {
+ struct tgsi_declaration_semantic semantic = fs->inputs[idx].semantic;
+ if(semantic.Name == TGSI_SEMANTIC_PCOORD)
+ {
+ info->varyings_vs_reg[idx] = 0; /* replaced by point coord -- doesn't matter */
+ continue;
+ }
+ struct etna_shader_inout *match = NULL;
+ if(semantic.Index < vs->output_count_per_semantic[semantic.Name])
+ {
+ match = vs->output_per_semantic[semantic.Name][semantic.Index];
+ }
+ if(match == NULL)
+ return 1; /* not found -- link error */
+ info->varyings_vs_reg[idx] = match->reg;
+ }
+ return 0;
+}
+
diff --git a/src/driver/etna_compiler.h b/src/driver/etna_compiler.h
new file mode 100644
index 0000000..9ba9d98
--- /dev/null
+++ b/src/driver/etna_compiler.h
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Interface to shader compiler */
+#ifndef H_ETNA_COMPILER
+#define H_ETNA_COMPILER
+#include "etna_internal.h"
+
+#include <stdint.h>
+#include "pipe/p_compiler.h"
+#include "pipe/p_shader_tokens.h"
+
+/* XXX some of these such as ETNA_MAX_LABELS are pretty arbitrary limits, may be better to switch
+ * to dynamic allocation at some point.
+ */
+#define ETNA_MAX_TEMPS (64) /* max temp register count of all Vivante hw */
+#define ETNA_MAX_TOKENS (2048)
+#define ETNA_MAX_IMM (1024) /* max const+imm in 32-bit words */
+#define ETNA_MAX_DECL (2048) /* max declarations */
+#define ETNA_MAX_DEPTH (32)
+#define ETNA_MAX_LABELS (64)
+#define ETNA_MAX_INSTRUCTIONS (2048)
+
+struct etna_pipe_specs;
+
+/* compiler output per input/output */
+struct etna_shader_inout
+{
+ int reg; /* native register */
+ struct tgsi_declaration_semantic semantic; /* tgsi semantic name and index */
+ int num_components;
+ /* varyings */
+ uint32_t pa_attributes; /* PA_SHADER_ATTRIBUTES */
+};
+
+/* shader object, for linking */
+struct etna_shader_object
+{
+ uint processor; /* TGSI_PROCESSOR_... */
+ uint32_t code_size; /* code size in uint32 words */
+ uint32_t *code;
+ unsigned num_temps;
+
+ uint32_t const_base; /* base of constants (in 32 bit units) */
+ uint32_t const_size; /* size of constants, also base of immediates (in 32 bit units) */
+ uint32_t imm_base; /* base of immediates (in 32 bit units) */
+ uint32_t imm_size; /* size of immediates (in 32 bit units) */
+ uint32_t *imm_data;
+
+ /* inputs (for linking)
+ * for fs, the inputs must be in register 1..N */
+ unsigned num_inputs;
+ struct etna_shader_inout inputs[ETNA_NUM_INPUTS];
+
+ /* outputs (for linking) */
+ unsigned num_outputs;
+ struct etna_shader_inout outputs[ETNA_NUM_INPUTS];
+ /* index into outputs (for linking) */
+ int output_count_per_semantic[TGSI_SEMANTIC_COUNT];
+ struct etna_shader_inout **output_per_semantic_list; /* list of pointers to outputs */
+ struct etna_shader_inout **output_per_semantic[TGSI_SEMANTIC_COUNT];
+
+ /* special outputs (vs only) */
+ int vs_pos_out_reg; /* VS position output */
+ int vs_pointsize_out_reg; /* VS point size output */
+ uint32_t vs_load_balancing;
+
+ /* special outputs (ps only) */
+ int ps_color_out_reg; /* color output register */
+ int ps_depth_out_reg; /* depth output register */
+
+ /* unknown input property (XX_INPUT_COUNT, field UNK8) */
+ uint32_t input_count_unk8;
+};
+
+struct etna_shader_link_info
+{
+ /* each PS input is annotated with the VS output reg */
+ unsigned varyings_vs_reg[ETNA_NUM_INPUTS];
+};
+
+/* Entry point to compiler.
+ * Returns non-zero if compilation fails.
+ */
+int etna_compile_shader_object(const struct etna_pipe_specs *specs, const struct tgsi_token *tokens,
+ struct etna_shader_object **out);
+
+/* Debug dump of shader object */
+void etna_dump_shader_object(const struct etna_shader_object *sobj);
+
+/* Link two shader objects together, annotates each PS input with the VS
+ * output register. Returns non-zero if the linking fails.
+ */
+int etna_link_shader_objects(struct etna_shader_link_info *info, const struct etna_shader_object *vs, const struct etna_shader_object *fs);
+
+/* Destroy a previously allocated shader object */
+void etna_destroy_shader_object(struct etna_shader_object *obj);
+
+#endif
+
diff --git a/src/driver/etna_debug.h b/src/driver/etna_debug.h
new file mode 100644
index 0000000..df6f792
--- /dev/null
+++ b/src/driver/etna_debug.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/* Common debug stuffl */
+#ifndef H_ETNA_DEBUG
+#define H_ETNA_DEBUG
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "util/u_debug.h"
+
+/* Logging */
+#define ETNA_DBG_MSGS 0x1 /* Warnings and non-fatal errors */
+#define ETNA_DBG_FRAME_MSGS 0x2
+#define ETNA_DBG_RESOURCE_MSGS 0x4
+#define ETNA_DBG_COMPILER_MSGS 0x8
+#define ETNA_DBG_LINKER_MSGS 0x10
+#define ETNA_DBG_DUMP_SHADERS 0x20
+
+/* Bypasses */
+#define ETNA_DBG_NO_TS 0x1000 /* Disable TS */
+#define ETNA_DBG_NO_AUTODISABLE 0x2000 /* Disable autodisable */
+#define ETNA_DBG_NO_SUPERTILE 0x4000 /* Disable supertile */
+#define ETNA_DBG_NO_EARLY_Z 0x8000 /* Disable early z */
+#define ETNA_DBG_CFLUSH_ALL 0x10000 /* Flush before every state update + draw call */
+#define ETNA_DBG_MSAA_2X 0x20000 /* Force 2X MSAA for screen */
+#define ETNA_DBG_MSAA_4X 0x40000 /* Force 4X MSAA for screen */
+#define ETNA_DBG_FINISH_ALL 0x80000 /* Finish on every flush */
+#define ETNA_DBG_FLUSH_ALL 0x100000 /* Flush after every rendered primitive */
+#define ETNA_DBG_ZERO 0x200000 /* Zero all resources after allocation */
+
+extern uint32_t etna_mesa_debug; /* set in etna_screen.c from ETNA_DEBUG */
+
+#define DBG_ENABLED(flag) unlikely(etna_mesa_debug & (flag))
+
+#define DBG_F(flag, fmt, ...) \
+ do { if (etna_mesa_debug & (flag)) \
+ debug_printf("%s:%d: "fmt "\n", \
+ __FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0)
+
+#define DBG(fmt, ...) \
+ do { if (etna_mesa_debug & ETNA_DBG_MSGS) \
+ debug_printf("%s:%d: "fmt "\n", \
+ __FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0)
+
+/* A serious bug, show this even in non-debug mode */
+#define BUG(fmt, ...) \
+ do { printf("%s:%d: "fmt "\n", \
+ __FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0)
+
+#endif
+
diff --git a/src/driver/etna_fence.c b/src/driver/etna_fence.c
new file mode 100644
index 0000000..018f67a
--- /dev/null
+++ b/src/driver/etna_fence.c
@@ -0,0 +1,176 @@
+#include "etna_fence.h"
+#include "etna_debug.h"
+#include "etna_screen.h"
+#include "util/u_memory.h"
+#include "util/u_inlines.h"
+#include "util/u_string.h"
+
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_queue.h>
+
+static void etna_screen_fence_reference(struct pipe_screen *screen_h,
+ struct pipe_fence_handle **ptr_h,
+ struct pipe_fence_handle *fence_h );
+static boolean etna_screen_fence_signalled(struct pipe_screen *screen_h,
+ struct pipe_fence_handle *fence_h);
+static boolean etna_screen_fence_finish(struct pipe_screen *screen_h,
+ struct pipe_fence_handle *fence_h,
+ uint64_t timeout );
+
+int etna_fence_new(struct pipe_screen *screen_h, struct etna_ctx *ctx, struct pipe_fence_handle **fence_p)
+{
+ struct etna_fence *fence = NULL;
+ struct etna_screen *screen = etna_screen(screen_h);
+ int rv;
+
+ /* XXX we do not release the fence_p reference here -- neither do the other drivers,
+ * and clients don't seem to rely on this. */
+ if(fence_p == NULL)
+ return ETNA_INVALID_ADDR;
+ assert(*fence_p == NULL);
+
+ /* re-use old fence, if available, and reset it first */
+ pipe_mutex_lock(screen->fence_mutex);
+ if(screen->fence_freelist != NULL)
+ {
+ fence = screen->fence_freelist;
+ screen->fence_freelist = fence->next_free;
+ fence->next_free = NULL;
+ }
+ pipe_mutex_unlock(screen->fence_mutex);
+
+ if(fence != NULL)
+ {
+ if((rv = viv_user_signal_signal(ctx->conn, fence->signal, 0)) != VIV_STATUS_OK)
+ {
+ BUG("Error: could not reset signal %i", fence->signal);
+ etna_screen_destroy_fence(screen_h, fence);
+ return rv;
+ }
+ fence->signalled = false;
+ } else {
+ fence = CALLOC_STRUCT(etna_fence);
+ /* Create signal with manual reset; we want to be able to probe it
+ * or wait for it without resetting it.
+ */
+ if((rv = viv_user_signal_create(ctx->conn, /* manualReset */ true, &fence->signal)) != VIV_STATUS_OK)
+ {
+ FREE(fence);
+ return rv;
+ }
+ }
+ if((rv = etna_queue_signal(ctx->queue, fence->signal, VIV_WHERE_PIXEL)) != ETNA_OK)
+ {
+ BUG("error queueing signal %i", fence->signal);
+ viv_user_signal_destroy(ctx->conn, fence->signal);
+ FREE(fence);
+ return rv;
+ }
+ pipe_reference_init(&fence->reference, 1);
+ *fence_p = (struct pipe_fence_handle*)fence;
+ return ETNA_OK;
+}
+
+static void
+debug_describe_fence(char* buf, const struct etna_fence *fence)
+{
+ util_sprintf(buf, "etna_fence<%i>", fence->signal);
+}
+
+/**
+ * Reference or unreference a fence. Once the reference count falls to zero,
+ * the fence will be destroyed or put in the free list to be reused.
+ */
+static void etna_screen_fence_reference(struct pipe_screen *screen_h,
+ struct pipe_fence_handle **ptr_h,
+ struct pipe_fence_handle *fence_h )
+{
+ struct etna_screen *screen = etna_screen(screen_h);
+ struct etna_fence *fence = etna_fence(fence_h);
+ struct etna_fence **ptr = (struct etna_fence **) ptr_h;
+ struct etna_fence *old_fence = *ptr;
+ if (pipe_reference_described(&(*ptr)->reference, &fence->reference,
+ (debug_reference_descriptor)debug_describe_fence))
+ {
+ if(etna_screen_fence_signalled(screen_h, (struct pipe_fence_handle*)old_fence))
+ {
+ /* If signalled, add old fence to free list, as it can be reused */
+ pipe_mutex_lock(screen->fence_mutex);
+ old_fence->next_free = screen->fence_freelist;
+ screen->fence_freelist = old_fence;
+ pipe_mutex_unlock(screen->fence_mutex);
+ } else {
+ /* If fence is still to be signalled, destroy it, to prevent it from being
+ * reused. */
+ etna_screen_destroy_fence(screen_h, old_fence);
+ }
+ }
+ *ptr_h = fence_h;
+}
+
+/**
+ * Poll whether the fence has been signalled.
+ */
+static boolean etna_screen_fence_signalled(struct pipe_screen *screen_h,
+ struct pipe_fence_handle *fence_h)
+{
+ return etna_screen_fence_finish(screen_h, fence_h, 0);
+}
+
+/**
+ * Wait until the fence has been signalled for the specified timeout in nanoseconds,
+ * or PIPE_TIMEOUT_INFINITE.
+ */
+static boolean etna_screen_fence_finish(struct pipe_screen *screen_h,
+ struct pipe_fence_handle *fence_h,
+ uint64_t timeout )
+{
+ struct etna_screen *screen = etna_screen(screen_h);
+ struct etna_fence *fence = etna_fence(fence_h);
+ int rv;
+ if(fence->signalled) /* avoid a kernel roundtrip */
+ return true;
+ /* nanoseconds to milliseconds */
+ rv = viv_user_signal_wait(screen->dev, fence->signal,
+ timeout == PIPE_TIMEOUT_INFINITE ? VIV_WAIT_INDEFINITE : (timeout / 1000000ULL));
+ if(rv != VIV_STATUS_OK && rv != VIV_STATUS_TIMEOUT)
+ {
+ BUG("error waiting for signal %i", fence->signal);
+ }
+ fence->signalled = (rv != VIV_STATUS_TIMEOUT);
+ return fence->signalled;
+}
+
+void etna_screen_destroy_fence(struct pipe_screen *screen_h, struct etna_fence *fence)
+{
+ struct etna_screen *screen = etna_screen(screen_h);
+ if(viv_user_signal_destroy(screen->dev, fence->signal) != VIV_STATUS_OK)
+ {
+ BUG("cannot destroy signal %i", fence->signal);
+ }
+ FREE(fence);
+}
+
+void etna_screen_destroy_fences(struct pipe_screen *screen_h)
+{
+ struct etna_screen *screen = etna_screen(screen_h);
+ struct etna_fence *fence, *next;
+ pipe_mutex_lock(screen->fence_mutex);
+ for(fence = screen->fence_freelist; fence != NULL; fence = next)
+ {
+ next = fence->next_free;
+ etna_screen_destroy_fence(screen_h, fence);
+ }
+ screen->fence_freelist = NULL;
+ pipe_mutex_unlock(screen->fence_mutex);
+}
+
+void etna_screen_fence_init(struct pipe_screen *pscreen)
+{
+ pscreen->fence_reference = etna_screen_fence_reference;
+ pscreen->fence_signalled = etna_screen_fence_signalled;
+ pscreen->fence_finish = etna_screen_fence_finish;
+}
+
+
diff --git a/src/driver/etna_fence.h b/src/driver/etna_fence.h
new file mode 100644
index 0000000..41afbc6
--- /dev/null
+++ b/src/driver/etna_fence.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Functions dealing with fences */
+#ifndef ETNA_FENCE_H_
+#define ETNA_FENCE_H_
+
+#include "pipe/p_state.h"
+
+struct pipe_screen;
+struct pipe_fence_handle;
+struct etna_ctx;
+
+struct etna_fence
+{
+ struct pipe_reference reference;
+ int signal; /* signal id from kernel */
+ bool signalled; /* cached value of signalled */
+ struct etna_fence *next_free; /* if in free list, reference to next free fence */
+};
+
+/** Convert generic pipe_fence_handle pointer to etna_fence */
+static INLINE struct etna_fence *
+etna_fence(struct pipe_fence_handle *pfence)
+{
+ return (struct etna_fence *)pfence;
+}
+
+/**
+ * Create a new fence that will be signalled after GPU completes rendering
+ * after the next flush.
+ */
+int etna_fence_new(struct pipe_screen *screen,
+ struct etna_ctx *ctx,
+ struct pipe_fence_handle **fence);
+
+/**
+ * Destroy a fence. In general, you should call etna_screen_fence_reference instead,
+ * if there may be other references.
+ */
+void etna_screen_destroy_fence(struct pipe_screen *screen_h, struct etna_fence *fence);
+
+/**
+ * Destroy all fences kept around for re-use in the free list.
+ */
+void etna_screen_destroy_fences(struct pipe_screen *screen_h);
+
+void etna_screen_fence_init(struct pipe_screen *screen);
+
+#endif
+
diff --git a/src/driver/etna_internal.h b/src/driver/etna_internal.h
new file mode 100644
index 0000000..643914f
--- /dev/null
+++ b/src/driver/etna_internal.h
@@ -0,0 +1,405 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* internal definitions */
+#ifndef H_ETNA_INTERNAL
+#define H_ETNA_INTERNAL
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+
+#define ETNA_NUM_INPUTS (16)
+#define ETNA_NUM_VARYINGS (16)
+#define ETNA_NUM_LOD (14)
+#define ETNA_NUM_LAYERS (6)
+#define ETNA_MAX_UNIFORMS (256)
+
+/* RS tiled operations must have width%16 = 0 */
+#define ETNA_RS_WIDTH_MASK (16-1)
+/* RS tiled operations must have height%4 = 0 */
+#define ETNA_RS_HEIGHT_MASK (3)
+/* PE render targets must be aligned to 64 bytes */
+#define ETNA_PE_ALIGNMENT (64)
+
+/* GPU chip 3D specs */
+struct etna_pipe_specs
+{
+ /* supports SUPERTILE (64x64) tiling? */
+ unsigned can_supertile:1;
+ /* needs z=(z+w)/2, for older GCxxx */
+ unsigned vs_need_z_div:1;
+ /* supports trigonometric instructions */
+ unsigned has_sin_cos_sqrt:1;
+ /* can use VS_RANGE, PS_RANGE registers*/
+ unsigned has_shader_range_registers:1;
+ /* can use any kind of wrapping mode on npot textures */
+ unsigned npot_tex_any_wrap;
+ /* number of bits per TS tile */
+ unsigned bits_per_tile;
+ /* clear value for TS (dependent on bits_per_tile) */
+ uint32_t ts_clear_value;
+ /* base of vertex texture units */
+ unsigned vertex_sampler_offset;
+ /* number of fragment sampler units */
+ unsigned fragment_sampler_count;
+ /* number of vertex sampler units */
+ unsigned vertex_sampler_count;
+ /* size of vertex shader output buffer */
+ unsigned vertex_output_buffer_size;
+ /* size of a cached vertex (?) */
+ unsigned vertex_cache_size;
+ /* number of shader cores */
+ unsigned shader_core_count;
+ /* number of vertex streams */
+ unsigned stream_count;
+ /* vertex shader memory address*/
+ uint32_t vs_offset;
+ /* pixel shader memory address*/
+ uint32_t ps_offset;
+ /* vertex/fragment shader max instructions */
+ uint32_t max_instructions;
+ /* maximum number of varyings */
+ unsigned max_varyings;
+ /* maximum number of registers */
+ unsigned max_registers;
+ /* maximum vertex uniforms */
+ unsigned max_vs_uniforms;
+ /* maximum pixel uniforms */
+ unsigned max_ps_uniforms;
+ /* maximum texture size */
+ unsigned max_texture_size;
+ /* maximum texture size */
+ unsigned max_rendertarget_size;
+};
+
+/** Compiled Gallium state. All the different compiled state atoms are woven together and uploaded
+ * only when it is necessary to synchronize the state, for example before rendering. */
+
+/* Compiled pipe_rasterizer_state */
+struct compiled_rasterizer_state
+{
+ uint32_t PA_CONFIG;
+ uint32_t PA_LINE_WIDTH;
+ uint32_t PA_POINT_SIZE;
+ uint32_t PA_SYSTEM_MODE;
+ uint32_t SE_DEPTH_SCALE;
+ uint32_t SE_DEPTH_BIAS;
+ uint32_t SE_CONFIG;
+ bool point_size_per_vertex;
+ bool scissor;
+};
+
+/* Compiled pipe_depth_stencil_alpha_state */
+struct compiled_depth_stencil_alpha_state
+{
+ uint32_t PE_DEPTH_CONFIG;
+ uint32_t PE_ALPHA_OP;
+ uint32_t PE_STENCIL_OP;
+ uint32_t PE_STENCIL_CONFIG;
+};
+
+/* Compiled pipe_blend_state */
+struct compiled_blend_state
+{
+ uint32_t PE_ALPHA_CONFIG;
+ uint32_t PE_COLOR_FORMAT;
+ uint32_t PE_LOGIC_OP;
+ uint32_t PE_DITHER[2];
+};
+
+/* Compiled pipe_blend_color */
+struct compiled_blend_color
+{
+ uint32_t PE_ALPHA_BLEND_COLOR;
+};
+
+/* Compiled pipe_stencil_ref */
+struct compiled_stencil_ref
+{
+ uint32_t PE_STENCIL_CONFIG;
+ uint32_t PE_STENCIL_CONFIG_EXT;
+};
+
+/* Compiled pipe_scissor_state */
+struct compiled_scissor_state
+{
+ uint32_t SE_SCISSOR_LEFT; // fixp
+ uint32_t SE_SCISSOR_TOP; // fixp
+ uint32_t SE_SCISSOR_RIGHT; // fixp
+ uint32_t SE_SCISSOR_BOTTOM; // fixp
+};
+
+/* Compiled pipe_viewport_state */
+struct compiled_viewport_state
+{
+ uint32_t PA_VIEWPORT_SCALE_X;
+ uint32_t PA_VIEWPORT_SCALE_Y;
+ uint32_t PA_VIEWPORT_SCALE_Z;
+ uint32_t PA_VIEWPORT_OFFSET_X;
+ uint32_t PA_VIEWPORT_OFFSET_Y;
+ uint32_t PA_VIEWPORT_OFFSET_Z;
+ uint32_t SE_SCISSOR_LEFT; // fixp
+ uint32_t SE_SCISSOR_TOP; // fixp
+ uint32_t SE_SCISSOR_RIGHT; // fixp
+ uint32_t SE_SCISSOR_BOTTOM; // fixp
+ uint32_t PE_DEPTH_NEAR;
+ uint32_t PE_DEPTH_FAR;
+};
+
+/* Compiled sample mask (context->set_sample_mask) */
+struct compiled_sample_mask
+{
+ uint32_t GL_MULTI_SAMPLE_CONFIG;
+};
+
+/* Compiled pipe_sampler_state */
+struct compiled_sampler_state
+{
+ /* sampler offset +4*sampler, interleave when committing state */
+ uint32_t TE_SAMPLER_CONFIG0;
+ uint32_t TE_SAMPLER_CONFIG1;
+ uint32_t TE_SAMPLER_LOD_CONFIG;
+ unsigned min_lod, max_lod;
+};
+
+/* Compiled pipe_sampler_view */
+struct compiled_sampler_view
+{
+ /* sampler offset +4*sampler, interleave when committing state */
+ uint32_t TE_SAMPLER_CONFIG0;
+ uint32_t TE_SAMPLER_CONFIG0_MASK;
+ uint32_t TE_SAMPLER_CONFIG1;
+ uint32_t TE_SAMPLER_SIZE;
+ uint32_t TE_SAMPLER_LOG_SIZE;
+ uint32_t TE_SAMPLER_LOD_ADDR[VIVS_TE_SAMPLER_LOD_ADDR__LEN];
+ unsigned min_lod, max_lod; /* 5.5 fixp */
+};
+
+/* Compiled pipe_framebuffer_state */
+struct compiled_framebuffer_state
+{
+ struct pipe_surface *cbuf, *zsbuf; /* keep reference to surfaces */
+ uint32_t GL_MULTI_SAMPLE_CONFIG;
+ uint32_t PE_COLOR_FORMAT;
+ uint32_t PE_DEPTH_CONFIG;
+ uint32_t PE_DEPTH_ADDR;
+ uint32_t PE_PIPE_DEPTH_ADDR[2];
+ uint32_t PE_DEPTH_STRIDE;
+ uint32_t PE_HDEPTH_CONTROL;
+ uint32_t PE_DEPTH_NORMALIZE;
+ uint32_t PE_COLOR_ADDR;
+ uint32_t PE_PIPE_COLOR_ADDR[2];
+ uint32_t PE_COLOR_STRIDE;
+ uint32_t SE_SCISSOR_LEFT; // fixp, restricted by scissor state *if* enabled in rasterizer state
+ uint32_t SE_SCISSOR_TOP; // fixp
+ uint32_t SE_SCISSOR_RIGHT; // fixp
+ uint32_t SE_SCISSOR_BOTTOM; // fixp
+ uint32_t RA_MULTISAMPLE_UNK00E04;
+ uint32_t RA_MULTISAMPLE_UNK00E10[VIVS_RA_MULTISAMPLE_UNK00E10__LEN];
+ uint32_t RA_CENTROID_TABLE[VIVS_RA_CENTROID_TABLE__LEN];
+ uint32_t TS_MEM_CONFIG;
+ uint32_t TS_DEPTH_CLEAR_VALUE;
+ uint32_t TS_DEPTH_STATUS_BASE;
+ uint32_t TS_DEPTH_SURFACE_BASE;
+ uint32_t TS_COLOR_CLEAR_VALUE;
+ uint32_t TS_COLOR_STATUS_BASE;
+ uint32_t TS_COLOR_SURFACE_BASE;
+ bool msaa_mode; // adds input (and possible temp) to PS
+};
+
+/* Compiled context->create_vertex_elements_state */
+struct compiled_vertex_elements_state
+{
+ unsigned num_elements;
+ uint32_t FE_VERTEX_ELEMENT_CONFIG[VIVS_FE_VERTEX_ELEMENT_CONFIG__LEN];
+};
+
+/* Compiled context->set_vertex_buffer result */
+struct compiled_set_vertex_buffer
+{
+ void *logical; /* CPU address of vertex buffer base */
+ uint32_t FE_VERTEX_STREAM_CONTROL;
+ uint32_t FE_VERTEX_STREAM_BASE_ADDR;
+};
+
+/* Compiled context->set_index_buffer result */
+struct compiled_set_index_buffer
+{
+ void *logical;
+ uint32_t FE_INDEX_STREAM_CONTROL;
+ uint32_t FE_INDEX_STREAM_BASE_ADDR;
+};
+
+/* Compiled linked VS+PS shader state */
+struct compiled_shader_state
+{
+ uint32_t RA_CONTROL;
+ uint32_t PA_ATTRIBUTE_ELEMENT_COUNT;
+ uint32_t PA_CONFIG;
+ uint32_t PA_SHADER_ATTRIBUTES[VIVS_PA_SHADER_ATTRIBUTES__LEN];
+ uint32_t VS_END_PC;
+ uint32_t VS_OUTPUT_COUNT; /* number of outputs if point size per vertex disabled */
+ uint32_t VS_OUTPUT_COUNT_PSIZE; /* number of outputs of point size per vertex enabled */
+ uint32_t VS_INPUT_COUNT;
+ uint32_t VS_TEMP_REGISTER_CONTROL;
+ uint32_t VS_OUTPUT[4];
+ uint32_t VS_INPUT[4];
+ uint32_t VS_LOAD_BALANCING;
+ uint32_t VS_START_PC;
+ uint32_t PS_END_PC;
+ uint32_t PS_OUTPUT_REG;
+ uint32_t PS_INPUT_COUNT;
+ uint32_t PS_INPUT_COUNT_MSAA; /* Adds an input */
+ uint32_t PS_TEMP_REGISTER_CONTROL;
+ uint32_t PS_TEMP_REGISTER_CONTROL_MSAA; /* Adds a temporary if needed to make space for extra input */
+ uint32_t PS_CONTROL;
+ uint32_t PS_START_PC;
+ uint32_t GL_VARYING_TOTAL_COMPONENTS;
+ uint32_t GL_VARYING_NUM_COMPONENTS;
+ uint32_t GL_VARYING_COMPONENT_USE[2];
+ unsigned vs_inst_mem_size;
+ unsigned vs_uniforms_size;
+ unsigned ps_inst_mem_size;
+ unsigned ps_uniforms_size;
+ uint32_t *VS_INST_MEM;
+ uint32_t VS_UNIFORMS[ETNA_MAX_UNIFORMS*4];
+ uint32_t *PS_INST_MEM;
+ uint32_t PS_UNIFORMS[ETNA_MAX_UNIFORMS*4];
+};
+
+/* state of all 3d and common registers relevant to etna driver */
+struct etna_3d_state
+{
+ unsigned num_vertex_elements; /* number of elements in FE_VERTEX_ELEMENT_CONFIG */
+ unsigned vs_uniforms_size;
+ unsigned ps_uniforms_size;
+ unsigned vs_inst_mem_size;
+ unsigned ps_inst_mem_size;
+
+ uint32_t /*00600*/ FE_VERTEX_ELEMENT_CONFIG[VIVS_FE_VERTEX_ELEMENT_CONFIG__LEN];
+ uint32_t /*00644*/ FE_INDEX_STREAM_BASE_ADDR;
+ uint32_t /*00648*/ FE_INDEX_STREAM_CONTROL;
+ uint32_t /*0064C*/ FE_VERTEX_STREAM_BASE_ADDR;
+ uint32_t /*00650*/ FE_VERTEX_STREAM_CONTROL;
+ uint32_t /*00680*/ FE_VERTEX_STREAMS_BASE_ADDR[VIVS_FE_VERTEX_STREAMS__LEN];
+ uint32_t /*006A0*/ FE_VERTEX_STREAMS_CONTROL[VIVS_FE_VERTEX_STREAMS__LEN];
+
+ uint32_t /*00800*/ VS_END_PC;
+ uint32_t /*00804*/ VS_OUTPUT_COUNT;
+ uint32_t /*00808*/ VS_INPUT_COUNT;
+ uint32_t /*0080C*/ VS_TEMP_REGISTER_CONTROL;
+ uint32_t /*00810*/ VS_OUTPUT[VIVS_VS_OUTPUT__LEN];
+ uint32_t /*00820*/ VS_INPUT[VIVS_VS_INPUT__LEN];
+ uint32_t /*00830*/ VS_LOAD_BALANCING;
+ uint32_t /*00838*/ VS_START_PC;
+ uint32_t /*0085C*/ VS_RANGE;
+
+ uint32_t /*00A00*/ PA_VIEWPORT_SCALE_X;
+ uint32_t /*00A04*/ PA_VIEWPORT_SCALE_Y;
+ uint32_t /*00A08*/ PA_VIEWPORT_SCALE_Z;
+ uint32_t /*00A0C*/ PA_VIEWPORT_OFFSET_X;
+ uint32_t /*00A10*/ PA_VIEWPORT_OFFSET_Y;
+ uint32_t /*00A14*/ PA_VIEWPORT_OFFSET_Z;
+ uint32_t /*00A18*/ PA_LINE_WIDTH;
+ uint32_t /*00A1C*/ PA_POINT_SIZE;
+ uint32_t /*00A28*/ PA_SYSTEM_MODE;
+ uint32_t /*00A2C*/ PA_W_CLIP_LIMIT;
+ uint32_t /*00A30*/ PA_ATTRIBUTE_ELEMENT_COUNT;
+ uint32_t /*00A34*/ PA_CONFIG;
+ uint32_t /*00A40*/ PA_SHADER_ATTRIBUTES[VIVS_PA_SHADER_ATTRIBUTES__LEN];
+
+ uint32_t /*00C00*/ SE_SCISSOR_LEFT; // fixp
+ uint32_t /*00C04*/ SE_SCISSOR_TOP; // fixp
+ uint32_t /*00C08*/ SE_SCISSOR_RIGHT; // fixp
+ uint32_t /*00C0C*/ SE_SCISSOR_BOTTOM; // fixp
+ uint32_t /*00C10*/ SE_DEPTH_SCALE;
+ uint32_t /*00C14*/ SE_DEPTH_BIAS;
+ uint32_t /*00C18*/ SE_CONFIG;
+
+ uint32_t /*00E00*/ RA_CONTROL;
+ uint32_t /*00E04*/ RA_MULTISAMPLE_UNK00E04;
+ uint32_t /*00E08*/ RA_EARLY_DEPTH;
+ uint32_t /*00E10*/ RA_MULTISAMPLE_UNK00E10[VIVS_RA_MULTISAMPLE_UNK00E10__LEN];
+ uint32_t /*00E40*/ RA_CENTROID_TABLE[VIVS_RA_CENTROID_TABLE__LEN];
+
+ uint32_t /*01000*/ PS_END_PC;
+ uint32_t /*01004*/ PS_OUTPUT_REG;
+ uint32_t /*01008*/ PS_INPUT_COUNT;
+ uint32_t /*0100C*/ PS_TEMP_REGISTER_CONTROL;
+ uint32_t /*01010*/ PS_CONTROL;
+ uint32_t /*01018*/ PS_START_PC;
+ uint32_t /*0101C*/ PS_RANGE;
+
+ uint32_t /*01400*/ PE_DEPTH_CONFIG;
+ uint32_t /*01404*/ PE_DEPTH_NEAR;
+ uint32_t /*01408*/ PE_DEPTH_FAR;
+ uint32_t /*0140C*/ PE_DEPTH_NORMALIZE;
+ uint32_t /*01410*/ PE_DEPTH_ADDR;
+ uint32_t /*01414*/ PE_DEPTH_STRIDE;
+ uint32_t /*01418*/ PE_STENCIL_OP;
+ uint32_t /*0141C*/ PE_STENCIL_CONFIG;
+ uint32_t /*01420*/ PE_ALPHA_OP;
+ uint32_t /*01424*/ PE_ALPHA_BLEND_COLOR;
+ uint32_t /*01428*/ PE_ALPHA_CONFIG;
+ uint32_t /*0142C*/ PE_COLOR_FORMAT;
+ uint32_t /*01430*/ PE_COLOR_ADDR;
+ uint32_t /*01434*/ PE_COLOR_STRIDE;
+ uint32_t /*01454*/ PE_HDEPTH_CONTROL;
+ uint32_t /*014A0*/ PE_STENCIL_CONFIG_EXT;
+ uint32_t /*014A4*/ PE_LOGIC_OP;
+ uint32_t /*014A8*/ PE_DITHER[2];
+ uint32_t /*01460*/ PE_PIPE_COLOR_ADDR[VIVS_PE_PIPE__LEN];
+ uint32_t /*01480*/ PE_PIPE_DEPTH_ADDR[VIVS_PE_PIPE__LEN];
+
+ uint32_t /*01654*/ TS_MEM_CONFIG;
+ uint32_t /*01658*/ TS_COLOR_STATUS_BASE;
+ uint32_t /*0165C*/ TS_COLOR_SURFACE_BASE;
+ uint32_t /*01660*/ TS_COLOR_CLEAR_VALUE;
+ uint32_t /*01664*/ TS_DEPTH_STATUS_BASE;
+ uint32_t /*01668*/ TS_DEPTH_SURFACE_BASE;
+ uint32_t /*0166C*/ TS_DEPTH_CLEAR_VALUE;
+
+ uint32_t /*02000*/ TE_SAMPLER_CONFIG0[VIVS_TE_SAMPLER__LEN];
+ uint32_t /*02040*/ TE_SAMPLER_SIZE[VIVS_TE_SAMPLER__LEN];
+ uint32_t /*02080*/ TE_SAMPLER_LOG_SIZE[VIVS_TE_SAMPLER__LEN];
+ uint32_t /*020C0*/ TE_SAMPLER_LOD_CONFIG[VIVS_TE_SAMPLER__LEN];
+ uint32_t /*021C0*/ TE_SAMPLER_CONFIG1[VIVS_TE_SAMPLER__LEN];
+ uint32_t /*02400*/ TE_SAMPLER_LOD_ADDR[VIVS_TE_SAMPLER_LOD_ADDR__LEN][VIVS_TE_SAMPLER__LEN];
+
+ uint32_t /*03814*/ GL_VERTEX_ELEMENT_CONFIG;
+ uint32_t /*03818*/ GL_MULTI_SAMPLE_CONFIG;
+ uint32_t /*0381C*/ GL_VARYING_TOTAL_COMPONENTS;
+ uint32_t /*03820*/ GL_VARYING_NUM_COMPONENTS;
+ uint32_t /*03828*/ GL_VARYING_COMPONENT_USE[VIVS_GL_VARYING_COMPONENT_USE__LEN];
+ uint32_t /*0384C*/ GL_API_MODE;
+
+ uint32_t /*04000*/ VS_INST_MEM[VIVS_VS_INST_MEM__LEN];
+ uint32_t /*05000*/ VS_UNIFORMS[VIVS_VS_UNIFORMS__LEN];
+ uint32_t /*06000*/ PS_INST_MEM[VIVS_PS_INST_MEM__LEN];
+ uint32_t /*07000*/ PS_UNIFORMS[VIVS_PS_UNIFORMS__LEN];
+};
+
+
+#endif
+
diff --git a/src/driver/etna_pipe.c b/src/driver/etna_pipe.c
new file mode 100644
index 0000000..9ba6c56
--- /dev/null
+++ b/src/driver/etna_pipe.c
@@ -0,0 +1,1346 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Gallium pipe driver
+ */
+#include "etna_pipe.h"
+#include "etna_translate.h"
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+
+#include "etna_blend.h"
+#include "etna_clear_blit.h"
+#include "etna_compiler.h"
+#include "etna_debug.h"
+#include "etna_fence.h"
+#include "etna_rasterizer.h"
+#include "etna_resource.h"
+#include "etna_shader.h"
+#include "etna_surface.h"
+#include "etna_texture.h"
+#include "etna_transfer.h"
+#include "etna_zsa.h"
+
+#include "pipe/p_context.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_state.h"
+#include "util/u_math.h"
+#include "util/u_inlines.h"
+#include "util/u_memory.h"
+#include "util/u_prim.h"
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+#include <errno.h>
+
+/*********************************************************************/
+/* Context handling */
+
+#define ETNA_3D_CONTEXT_SIZE (400) /* keep this number above "Total state updates (fixed)" from gen_weave_state tool */
+
+/* Create bit field that specifies which samplers are active and thus need to be programmed
+ * 32 bits is enough for 32 samplers. As far as I know this is the upper bound supported on any Vivante hw
+ * up to GC4000.
+ */
+static uint32_t active_samplers_bits(struct pipe_context *pipe)
+{
+ struct etna_pipe_context *restrict e = etna_pipe_context(pipe);
+ unsigned num_fragment_samplers = MIN2(e->num_fragment_samplers, e->num_fragment_sampler_views);
+ unsigned num_vertex_samplers = MIN2(e->num_vertex_samplers, e->num_vertex_sampler_views);
+ uint32_t active_samplers = etna_bits_ones(num_fragment_samplers) |
+ etna_bits_ones(num_vertex_samplers) << e->specs.vertex_sampler_offset;
+ return active_samplers;
+}
+
+/* Reset / re-upload context.
+ *
+ * This pushes the current register state in pipe->gpu3d to the GPU.
+ * The function is used to initialize the GPU in a predictable state
+ * at the beginning of rendering, as well as to create a context
+ * buffer for the kernel driver.
+ */
+static void reset_context(struct pipe_context *restrict pipe)
+{
+ struct etna_pipe_context *restrict e = etna_pipe_context(pipe);
+ struct etna_ctx *restrict ctx = e->ctx;
+
+#define EMIT_STATE(state_name, dest_field) \
+ ETNA_COALESCE_STATE_UPDATE(state_name, e->gpu3d.dest_field, 0)
+
+#define EMIT_STATE_FIXP(state_name, dest_field) \
+ ETNA_COALESCE_STATE_UPDATE(state_name, e->gpu3d.dest_field, 1)
+
+ uint32_t last_reg, last_fixp, span_start;
+ ETNA_COALESCE_STATE_OPEN(ETNA_3D_CONTEXT_SIZE);
+ /* multi sample config is set first, and outside of the normal sorting
+ * order, as changing the multisample state clobbers PS.INPUT_COUNT (and
+ * possibly PS.TEMP_REGISTER_CONTROL).
+ */
+ /*03818*/ EMIT_STATE(GL_MULTI_SAMPLE_CONFIG, GL_MULTI_SAMPLE_CONFIG);
+ /* below code generated by gen_weave_state.py, keep this in sync with sync_context! */
+ /* begin only EMIT_STATE -- make sure no new etna_reserve calls are done here directly
+ * or indirectly */
+ for(int x=0; x<e->gpu3d.num_vertex_elements; ++x)
+ {
+ /*00600*/ EMIT_STATE(FE_VERTEX_ELEMENT_CONFIG(x), FE_VERTEX_ELEMENT_CONFIG[x]);
+ }
+ /*00644*/ EMIT_STATE(FE_INDEX_STREAM_BASE_ADDR, FE_INDEX_STREAM_BASE_ADDR);
+ /*00648*/ EMIT_STATE(FE_INDEX_STREAM_CONTROL, FE_INDEX_STREAM_CONTROL);
+ /*0064C*/ EMIT_STATE(FE_VERTEX_STREAM_BASE_ADDR, FE_VERTEX_STREAM_BASE_ADDR);
+ /*00650*/ EMIT_STATE(FE_VERTEX_STREAM_CONTROL, FE_VERTEX_STREAM_CONTROL);
+ for(int x=0; x<8; ++x)
+ {
+ /*00680*/ EMIT_STATE(FE_VERTEX_STREAMS_BASE_ADDR(x), FE_VERTEX_STREAMS_BASE_ADDR[x]);
+ }
+ for(int x=0; x<8; ++x)
+ {
+ /*006A0*/ EMIT_STATE(FE_VERTEX_STREAMS_CONTROL(x), FE_VERTEX_STREAMS_CONTROL[x]);
+ }
+ /*00800*/ EMIT_STATE(VS_END_PC, VS_END_PC);
+ /*00804*/ EMIT_STATE(VS_OUTPUT_COUNT, VS_OUTPUT_COUNT);
+ /*00808*/ EMIT_STATE(VS_INPUT_COUNT, VS_INPUT_COUNT);
+ /*0080C*/ EMIT_STATE(VS_TEMP_REGISTER_CONTROL, VS_TEMP_REGISTER_CONTROL);
+ for(int x=0; x<4; ++x)
+ {
+ /*00810*/ EMIT_STATE(VS_OUTPUT(x), VS_OUTPUT[x]);
+ }
+ for(int x=0; x<4; ++x)
+ {
+ /*00820*/ EMIT_STATE(VS_INPUT(x), VS_INPUT[x]);
+ }
+ /*00830*/ EMIT_STATE(VS_LOAD_BALANCING, VS_LOAD_BALANCING);
+ /*00838*/ EMIT_STATE(VS_START_PC, VS_START_PC);
+ if (e->specs.has_shader_range_registers)
+ {
+ /*0085C*/ EMIT_STATE(VS_RANGE, VS_RANGE);
+ }
+ /*00A00*/ EMIT_STATE_FIXP(PA_VIEWPORT_SCALE_X, PA_VIEWPORT_SCALE_X);
+ /*00A04*/ EMIT_STATE_FIXP(PA_VIEWPORT_SCALE_Y, PA_VIEWPORT_SCALE_Y);
+ /*00A08*/ EMIT_STATE(PA_VIEWPORT_SCALE_Z, PA_VIEWPORT_SCALE_Z);
+ /*00A0C*/ EMIT_STATE_FIXP(PA_VIEWPORT_OFFSET_X, PA_VIEWPORT_OFFSET_X);
+ /*00A10*/ EMIT_STATE_FIXP(PA_VIEWPORT_OFFSET_Y, PA_VIEWPORT_OFFSET_Y);
+ /*00A14*/ EMIT_STATE(PA_VIEWPORT_OFFSET_Z, PA_VIEWPORT_OFFSET_Z);
+ /*00A18*/ EMIT_STATE(PA_LINE_WIDTH, PA_LINE_WIDTH);
+ /*00A1C*/ EMIT_STATE(PA_POINT_SIZE, PA_POINT_SIZE);
+ /*00A28*/ EMIT_STATE(PA_SYSTEM_MODE, PA_SYSTEM_MODE);
+ /*00A2C*/ EMIT_STATE(PA_W_CLIP_LIMIT, PA_W_CLIP_LIMIT);
+ /*00A30*/ EMIT_STATE(PA_ATTRIBUTE_ELEMENT_COUNT, PA_ATTRIBUTE_ELEMENT_COUNT);
+ /*00A34*/ EMIT_STATE(PA_CONFIG, PA_CONFIG);
+ for(int x=0; x<10; ++x)
+ {
+ /*00A40*/ EMIT_STATE(PA_SHADER_ATTRIBUTES(x), PA_SHADER_ATTRIBUTES[x]);
+ }
+ /*00C00*/ EMIT_STATE_FIXP(SE_SCISSOR_LEFT, SE_SCISSOR_LEFT);
+ /*00C04*/ EMIT_STATE_FIXP(SE_SCISSOR_TOP, SE_SCISSOR_TOP);
+ /*00C08*/ EMIT_STATE_FIXP(SE_SCISSOR_RIGHT, SE_SCISSOR_RIGHT);
+ /*00C0C*/ EMIT_STATE_FIXP(SE_SCISSOR_BOTTOM, SE_SCISSOR_BOTTOM);
+ /*00C10*/ EMIT_STATE(SE_DEPTH_SCALE, SE_DEPTH_SCALE);
+ /*00C14*/ EMIT_STATE(SE_DEPTH_BIAS, SE_DEPTH_BIAS);
+ /*00C18*/ EMIT_STATE(SE_CONFIG, SE_CONFIG);
+ /*00E00*/ EMIT_STATE(RA_CONTROL, RA_CONTROL);
+ /*00E04*/ EMIT_STATE(RA_MULTISAMPLE_UNK00E04, RA_MULTISAMPLE_UNK00E04);
+ /*00E08*/ EMIT_STATE(RA_EARLY_DEPTH, RA_EARLY_DEPTH);
+ for(int x=0; x<4; ++x)
+ {
+ /*00E10*/ EMIT_STATE(RA_MULTISAMPLE_UNK00E10(x), RA_MULTISAMPLE_UNK00E10[x]);
+ }
+ for(int x=0; x<16; ++x)
+ {
+ /*00E40*/ EMIT_STATE(RA_CENTROID_TABLE(x), RA_CENTROID_TABLE[x]);
+ }
+ /*01000*/ EMIT_STATE(PS_END_PC, PS_END_PC);
+ /*01004*/ EMIT_STATE(PS_OUTPUT_REG, PS_OUTPUT_REG);
+ /*01008*/ EMIT_STATE(PS_INPUT_COUNT, PS_INPUT_COUNT);
+ /*0100C*/ EMIT_STATE(PS_TEMP_REGISTER_CONTROL, PS_TEMP_REGISTER_CONTROL);
+ /*01010*/ EMIT_STATE(PS_CONTROL, PS_CONTROL);
+ /*01018*/ EMIT_STATE(PS_START_PC, PS_START_PC);
+ if (e->specs.has_shader_range_registers)
+ {
+ /*0101C*/ EMIT_STATE(PS_RANGE, PS_RANGE);
+ }
+ /*01400*/ EMIT_STATE(PE_DEPTH_CONFIG, PE_DEPTH_CONFIG);
+ /*01404*/ EMIT_STATE(PE_DEPTH_NEAR, PE_DEPTH_NEAR);
+ /*01408*/ EMIT_STATE(PE_DEPTH_FAR, PE_DEPTH_FAR);
+ /*0140C*/ EMIT_STATE(PE_DEPTH_NORMALIZE, PE_DEPTH_NORMALIZE);
+ /*01410*/ EMIT_STATE(PE_DEPTH_ADDR, PE_DEPTH_ADDR);
+ /*01414*/ EMIT_STATE(PE_DEPTH_STRIDE, PE_DEPTH_STRIDE);
+ /*01418*/ EMIT_STATE(PE_STENCIL_OP, PE_STENCIL_OP);
+ /*0141C*/ EMIT_STATE(PE_STENCIL_CONFIG, PE_STENCIL_CONFIG);
+ /*01420*/ EMIT_STATE(PE_ALPHA_OP, PE_ALPHA_OP);
+ /*01424*/ EMIT_STATE(PE_ALPHA_BLEND_COLOR, PE_ALPHA_BLEND_COLOR);
+ /*01428*/ EMIT_STATE(PE_ALPHA_CONFIG, PE_ALPHA_CONFIG);
+ /*0142C*/ EMIT_STATE(PE_COLOR_FORMAT, PE_COLOR_FORMAT);
+ /*01430*/ EMIT_STATE(PE_COLOR_ADDR, PE_COLOR_ADDR);
+ /*01434*/ EMIT_STATE(PE_COLOR_STRIDE, PE_COLOR_STRIDE);
+ /*01454*/ EMIT_STATE(PE_HDEPTH_CONTROL, PE_HDEPTH_CONTROL);
+ for(int x=0; x<8; ++x)
+ {
+ /*01460*/ EMIT_STATE(PE_PIPE_COLOR_ADDR(x), PE_PIPE_COLOR_ADDR[x]);
+ }
+ for(int x=0; x<8; ++x)
+ {
+ /*01480*/ EMIT_STATE(PE_PIPE_DEPTH_ADDR(x), PE_PIPE_DEPTH_ADDR[x]);
+ }
+ /*014A0*/ EMIT_STATE(PE_STENCIL_CONFIG_EXT, PE_STENCIL_CONFIG_EXT);
+ /*014A4*/ EMIT_STATE(PE_LOGIC_OP, PE_LOGIC_OP);
+ for(int x=0; x<2; ++x)
+ {
+ /*014A8*/ EMIT_STATE(PE_DITHER(x), PE_DITHER[x]);
+ }
+ /*01654*/ EMIT_STATE(TS_MEM_CONFIG, TS_MEM_CONFIG);
+ /*01658*/ EMIT_STATE(TS_COLOR_STATUS_BASE, TS_COLOR_STATUS_BASE);
+ /*0165C*/ EMIT_STATE(TS_COLOR_SURFACE_BASE, TS_COLOR_SURFACE_BASE);
+ /*01660*/ EMIT_STATE(TS_COLOR_CLEAR_VALUE, TS_COLOR_CLEAR_VALUE);
+ /*01664*/ EMIT_STATE(TS_DEPTH_STATUS_BASE, TS_DEPTH_STATUS_BASE);
+ /*01668*/ EMIT_STATE(TS_DEPTH_SURFACE_BASE, TS_DEPTH_SURFACE_BASE);
+ /*0166C*/ EMIT_STATE(TS_DEPTH_CLEAR_VALUE, TS_DEPTH_CLEAR_VALUE);
+ for(int x=0; x<12; ++x)
+ {
+ /*02000*/ EMIT_STATE(TE_SAMPLER_CONFIG0(x), TE_SAMPLER_CONFIG0[x]);
+ }
+ for(int x=0; x<12; ++x)
+ {
+ /*02040*/ EMIT_STATE(TE_SAMPLER_SIZE(x), TE_SAMPLER_SIZE[x]);
+ }
+ for(int x=0; x<12; ++x)
+ {
+ /*02080*/ EMIT_STATE(TE_SAMPLER_LOG_SIZE(x), TE_SAMPLER_LOG_SIZE[x]);
+ }
+ for(int x=0; x<12; ++x)
+ {
+ /*020C0*/ EMIT_STATE(TE_SAMPLER_LOD_CONFIG(x), TE_SAMPLER_LOD_CONFIG[x]);
+ }
+ for(int x=0; x<12; ++x)
+ {
+ /*021C0*/ EMIT_STATE(TE_SAMPLER_CONFIG1(x), TE_SAMPLER_CONFIG1[x]);
+ }
+ for(int y=0; y<14; ++y)
+ {
+ for(int x=0; x<12; ++x)
+ {
+ /*02400*/ EMIT_STATE(TE_SAMPLER_LOD_ADDR(x, y), TE_SAMPLER_LOD_ADDR[y][x]);
+ }
+ }
+ /*03814*/ EMIT_STATE(GL_VERTEX_ELEMENT_CONFIG, GL_VERTEX_ELEMENT_CONFIG);
+ /*0381C*/ EMIT_STATE(GL_VARYING_TOTAL_COMPONENTS, GL_VARYING_TOTAL_COMPONENTS);
+ /*03820*/ EMIT_STATE(GL_VARYING_NUM_COMPONENTS, GL_VARYING_NUM_COMPONENTS);
+ for(int x=0; x<2; ++x)
+ {
+ /*03828*/ EMIT_STATE(GL_VARYING_COMPONENT_USE(x), GL_VARYING_COMPONENT_USE[x]);
+ }
+ /*0384C*/ EMIT_STATE(GL_API_MODE, GL_API_MODE);
+ ETNA_COALESCE_STATE_CLOSE();
+ /* end only EMIT_STATE */
+#undef EMIT_STATE
+#undef EMIT_STATE_FIXP
+ /* re-submit current shader program and uniforms */
+ /*04000 or 0C000*/
+ etna_set_state_multi(ctx, e->specs.vs_offset, e->gpu3d.vs_inst_mem_size, e->gpu3d.VS_INST_MEM);
+ /*06000 or 0D000*/
+ etna_set_state_multi(ctx, e->specs.ps_offset, e->gpu3d.ps_inst_mem_size, e->gpu3d.PS_INST_MEM);
+ /*05000*/ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(0), e->gpu3d.vs_uniforms_size, e->gpu3d.VS_UNIFORMS);
+ /*07000*/ etna_set_state_multi(ctx, VIVS_PS_UNIFORMS(0), e->gpu3d.ps_uniforms_size, e->gpu3d.PS_UNIFORMS);
+}
+
+/* Weave state before draw operation. This function merges all the compiled state blocks under
+ * the context into one device register state. Parts of this state that are changed since
+ * last call (dirty) will be uploaded as state changes in the command buffer.
+ */
+static void sync_context(struct pipe_context *restrict pipe)
+{
+ struct etna_pipe_context *restrict e = etna_pipe_context(pipe);
+ struct etna_ctx *restrict ctx = e->ctx;
+ uint32_t active_samplers = active_samplers_bits(pipe);
+ uint32_t dirty = e->dirty_bits;
+
+ /* CSOs must be bound before calling this */
+ assert(e->blend_p && e->rasterizer_p && e->depth_stencil_alpha_p && e->vertex_elements_p);
+
+ /* Pre-processing: re-link shader if needed.
+ */
+ if(unlikely((dirty & ETNA_STATE_SHADER)) && e->vs && e->fs)
+ {
+ /* re-link vs and fs if needed */
+ etna_link_shaders(pipe, &e->shader_state, e->vs, e->fs);
+ }
+
+ /* Pre-processing: see what caches we need to flush before making state
+ * changes.
+ */
+ uint32_t to_flush = 0;
+ if(unlikely(dirty & (ETNA_STATE_BLEND)))
+ {
+ /* Need flush COLOR when changing PE.COLOR_FORMAT.OVERWRITE.
+ */
+ if((e->gpu3d.PE_COLOR_FORMAT & VIVS_PE_COLOR_FORMAT_OVERWRITE) !=
+ (e->blend.PE_COLOR_FORMAT & VIVS_PE_COLOR_FORMAT_OVERWRITE))
+ to_flush |= VIVS_GL_FLUSH_CACHE_COLOR;
+ }
+ if(unlikely(dirty & (ETNA_STATE_TEXTURE_CACHES)))
+ to_flush |= VIVS_GL_FLUSH_CACHE_TEXTURE;
+ if(unlikely(dirty & (ETNA_STATE_FRAMEBUFFER))) /* Framebuffer config changed? */
+ to_flush |= VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH;
+ if(DBG_ENABLED(ETNA_DBG_CFLUSH_ALL))
+ to_flush |= VIVS_GL_FLUSH_CACHE_TEXTURE | VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH;
+ if(to_flush)
+ {
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, to_flush);
+ etna_stall(ctx, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
+ }
+
+ /* If MULTI_SAMPLE_CONFIG.MSAA_SAMPLES changed, clobber affected shader
+ * state to make sure it is always rewritten. */
+ if(unlikely(dirty & (ETNA_STATE_FRAMEBUFFER)))
+ {
+ if((e->gpu3d.GL_MULTI_SAMPLE_CONFIG & VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES__MASK) !=
+ (e->framebuffer.GL_MULTI_SAMPLE_CONFIG & VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES__MASK))
+ {
+ /* XXX what does the GPU set these states to on MSAA samples change? Does it do the right thing?
+ * (increase/decrease as necessary) or something else? Just set some invalid value until we know for
+ * sure. */
+ e->gpu3d.PS_INPUT_COUNT = 0xffffffff;
+ e->gpu3d.PS_TEMP_REGISTER_CONTROL = 0xffffffff;
+ }
+ }
+
+ /*
+ * Cached state update emission.
+ * The etna_3d_state structure e->gpu3d is used to keep the current context.
+ * State is only emitted if the new value of the register is different from the cached value
+ * in the context. Update the state afterwards.
+ */
+#define EMIT_STATE(state_name, dest_field, src_value) \
+ if(e->gpu3d.dest_field != (src_value)) { \
+ ETNA_COALESCE_STATE_UPDATE(state_name, src_value, 0) \
+ e->gpu3d.dest_field = (src_value); \
+ }
+
+#define EMIT_STATE_FIXP(state_name, dest_field, src_value) \
+ if(e->gpu3d.dest_field != (src_value)) { \
+ ETNA_COALESCE_STATE_UPDATE(state_name, src_value, 1) \
+ e->gpu3d.dest_field = (src_value); \
+ }
+
+ /* Update vertex elements. This is different from any of the other states, in that
+ * a) the number of vertex elements written matters: so write only active ones
+ * b) the vertex element states must all be written: do not skip entries that stay the same
+ */
+ if(dirty & (ETNA_STATE_VERTEX_ELEMENTS))
+ {
+ if(e->gpu3d.num_vertex_elements != e->vertex_elements.num_elements ||
+ memcmp(e->gpu3d.FE_VERTEX_ELEMENT_CONFIG, e->vertex_elements.FE_VERTEX_ELEMENT_CONFIG, e->gpu3d.num_vertex_elements * 4))
+ {
+ /* Special case: vertex elements must always be sent in full if changed */
+ /*00600*/ etna_set_state_multi(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(0), e->vertex_elements.num_elements, e->vertex_elements.FE_VERTEX_ELEMENT_CONFIG);
+ memcpy(e->gpu3d.FE_VERTEX_ELEMENT_CONFIG, e->vertex_elements.FE_VERTEX_ELEMENT_CONFIG, e->vertex_elements.num_elements * 4);
+
+ e->gpu3d.num_vertex_elements = e->vertex_elements.num_elements;
+ }
+ }
+
+ /* The following code is originally generated by gen_merge_state.py, to
+ * emit state in increasing order of address (this makes it possible to merge
+ * consecutive register updates into one SET_STATE command)
+ *
+ * There have been some manual changes, where the weaving operation is not
+ * simply bitwise or:
+ * - scissor fixp
+ * - num vertex elements
+ * - scissor handling
+ * - num samplers
+ * - texture lod
+ * - ETNA_STATE_TS
+ * - removed ETNA_STATE_BASE_SETUP statements -- these are guaranteed to not change anyway
+ * - PS / framebuffer interaction for MSAA
+ * - move update of GL_MULTI_SAMPLE_CONFIG first
+ * - add unlikely()/likely()
+ */
+ uint32_t last_reg, last_fixp, span_start;
+ ETNA_COALESCE_STATE_OPEN(ETNA_3D_CONTEXT_SIZE);
+ /* begin only EMIT_STATE -- make sure no new etna_reserve calls are done here directly
+ * or indirectly */
+ /* multi sample config is set first, and outside of the normal sorting
+ * order, as changing the multisample state clobbers PS.INPUT_COUNT (and
+ * possibly PS.TEMP_REGISTER_CONTROL).
+ */
+ if(unlikely(dirty & (ETNA_STATE_FRAMEBUFFER | ETNA_STATE_SAMPLE_MASK)))
+ {
+ /*03818*/ EMIT_STATE(GL_MULTI_SAMPLE_CONFIG, GL_MULTI_SAMPLE_CONFIG, e->sample_mask.GL_MULTI_SAMPLE_CONFIG | e->framebuffer.GL_MULTI_SAMPLE_CONFIG);
+ }
+ if(likely(dirty & (ETNA_STATE_INDEX_BUFFER)))
+ {
+ /*00644*/ EMIT_STATE(FE_INDEX_STREAM_BASE_ADDR, FE_INDEX_STREAM_BASE_ADDR, e->index_buffer.FE_INDEX_STREAM_BASE_ADDR);
+ /*00648*/ EMIT_STATE(FE_INDEX_STREAM_CONTROL, FE_INDEX_STREAM_CONTROL, e->index_buffer.FE_INDEX_STREAM_CONTROL);
+ }
+ if(likely(dirty & (ETNA_STATE_VERTEX_BUFFERS)))
+ {
+ /*0064C*/ EMIT_STATE(FE_VERTEX_STREAM_BASE_ADDR, FE_VERTEX_STREAM_BASE_ADDR, e->vertex_buffer[0].FE_VERTEX_STREAM_BASE_ADDR);
+ /*00650*/ EMIT_STATE(FE_VERTEX_STREAM_CONTROL, FE_VERTEX_STREAM_CONTROL, e->vertex_buffer[0].FE_VERTEX_STREAM_CONTROL);
+ if (e->specs.has_shader_range_registers)
+ {
+ for(int x=0; x<8; ++x)
+ {
+ /*00680*/ EMIT_STATE(FE_VERTEX_STREAMS_BASE_ADDR(x), FE_VERTEX_STREAMS_BASE_ADDR[x], e->vertex_buffer[x].FE_VERTEX_STREAM_BASE_ADDR);
+ }
+ for(int x=0; x<8; ++x)
+ {
+ /*006A0*/ EMIT_STATE(FE_VERTEX_STREAMS_CONTROL(x), FE_VERTEX_STREAMS_CONTROL[x], e->vertex_buffer[x].FE_VERTEX_STREAM_CONTROL);
+ }
+ }
+ }
+ if(unlikely(dirty & (ETNA_STATE_SHADER)))
+ {
+ /*00800*/ EMIT_STATE(VS_END_PC, VS_END_PC, e->shader_state.VS_END_PC);
+ }
+ if(unlikely(dirty & (ETNA_STATE_SHADER | ETNA_STATE_RASTERIZER)))
+ {
+ /*00804*/ EMIT_STATE(VS_OUTPUT_COUNT, VS_OUTPUT_COUNT,
+ e->rasterizer.point_size_per_vertex ? e->shader_state.VS_OUTPUT_COUNT_PSIZE : e->shader_state.VS_OUTPUT_COUNT);
+ }
+ if(unlikely(dirty & (ETNA_STATE_VERTEX_ELEMENTS | ETNA_STATE_SHADER)))
+ {
+ /*00808*/ EMIT_STATE(VS_INPUT_COUNT, VS_INPUT_COUNT, VIVS_VS_INPUT_COUNT_COUNT(e->vertex_elements.num_elements) | e->shader_state.VS_INPUT_COUNT);
+ }
+ if(unlikely(dirty & (ETNA_STATE_SHADER)))
+ {
+ /*0080C*/ EMIT_STATE(VS_TEMP_REGISTER_CONTROL, VS_TEMP_REGISTER_CONTROL, e->shader_state.VS_TEMP_REGISTER_CONTROL);
+ for(int x=0; x<4; ++x)
+ {
+ /*00810*/ EMIT_STATE(VS_OUTPUT(x), VS_OUTPUT[x], e->shader_state.VS_OUTPUT[x]);
+ }
+ for(int x=0; x<4; ++x)
+ {
+ /*00820*/ EMIT_STATE(VS_INPUT(x), VS_INPUT[x], e->shader_state.VS_INPUT[x]);
+ }
+ /*00830*/ EMIT_STATE(VS_LOAD_BALANCING, VS_LOAD_BALANCING, e->shader_state.VS_LOAD_BALANCING);
+ /*00838*/ EMIT_STATE(VS_START_PC, VS_START_PC, e->shader_state.VS_START_PC);
+ if (e->specs.has_shader_range_registers)
+ {
+ /*0085C*/ EMIT_STATE(VS_RANGE, VS_RANGE, (e->shader_state.vs_inst_mem_size/4-1)<<16);
+ }
+ }
+ if(unlikely(dirty & (ETNA_STATE_VIEWPORT)))
+ {
+ /*00A00*/ EMIT_STATE_FIXP(PA_VIEWPORT_SCALE_X, PA_VIEWPORT_SCALE_X, e->viewport.PA_VIEWPORT_SCALE_X);
+ /*00A04*/ EMIT_STATE_FIXP(PA_VIEWPORT_SCALE_Y, PA_VIEWPORT_SCALE_Y, e->viewport.PA_VIEWPORT_SCALE_Y);
+ /*00A08*/ EMIT_STATE(PA_VIEWPORT_SCALE_Z, PA_VIEWPORT_SCALE_Z, e->viewport.PA_VIEWPORT_SCALE_Z);
+ /*00A0C*/ EMIT_STATE_FIXP(PA_VIEWPORT_OFFSET_X, PA_VIEWPORT_OFFSET_X, e->viewport.PA_VIEWPORT_OFFSET_X);
+ /*00A10*/ EMIT_STATE_FIXP(PA_VIEWPORT_OFFSET_Y, PA_VIEWPORT_OFFSET_Y, e->viewport.PA_VIEWPORT_OFFSET_Y);
+ /*00A14*/ EMIT_STATE(PA_VIEWPORT_OFFSET_Z, PA_VIEWPORT_OFFSET_Z, e->viewport.PA_VIEWPORT_OFFSET_Z);
+ }
+ if(unlikely(dirty & (ETNA_STATE_RASTERIZER)))
+ {
+ /*00A18*/ EMIT_STATE(PA_LINE_WIDTH, PA_LINE_WIDTH, e->rasterizer.PA_LINE_WIDTH);
+ /*00A1C*/ EMIT_STATE(PA_POINT_SIZE, PA_POINT_SIZE, e->rasterizer.PA_POINT_SIZE);
+ /*00A28*/ EMIT_STATE(PA_SYSTEM_MODE, PA_SYSTEM_MODE, e->rasterizer.PA_SYSTEM_MODE);
+ }
+ if(unlikely(dirty & (ETNA_STATE_SHADER)))
+ {
+ /*00A30*/ EMIT_STATE(PA_ATTRIBUTE_ELEMENT_COUNT, PA_ATTRIBUTE_ELEMENT_COUNT, e->shader_state.PA_ATTRIBUTE_ELEMENT_COUNT);
+ }
+ if(unlikely(dirty & (ETNA_STATE_RASTERIZER | ETNA_STATE_SHADER)))
+ {
+ /*00A34*/ EMIT_STATE(PA_CONFIG, PA_CONFIG, e->rasterizer.PA_CONFIG & e->shader_state.PA_CONFIG);
+ }
+ if(unlikely(dirty & (ETNA_STATE_SHADER)))
+ {
+ for(int x=0; x<10; ++x)
+ {
+ /*00A40*/ EMIT_STATE(PA_SHADER_ATTRIBUTES(x), PA_SHADER_ATTRIBUTES[x], e->shader_state.PA_SHADER_ATTRIBUTES[x]);
+ }
+ }
+ if(unlikely(dirty & (ETNA_STATE_SCISSOR | ETNA_STATE_FRAMEBUFFER | ETNA_STATE_RASTERIZER | ETNA_STATE_VIEWPORT)))
+ {
+ /* this is a bit of a mess: rasterizer.scissor determines whether to use only the
+ * framebuffer scissor, or specific scissor state, and the viewport clips too so the logic
+ * spans four CSOs
+ */
+ uint32_t scissor_left = MAX2(e->framebuffer.SE_SCISSOR_LEFT, e->viewport.SE_SCISSOR_LEFT);
+ uint32_t scissor_top = MAX2(e->framebuffer.SE_SCISSOR_TOP, e->viewport.SE_SCISSOR_TOP);
+ uint32_t scissor_right = MIN2(e->framebuffer.SE_SCISSOR_RIGHT, e->viewport.SE_SCISSOR_RIGHT);
+ uint32_t scissor_bottom = MIN2(e->framebuffer.SE_SCISSOR_BOTTOM, e->viewport.SE_SCISSOR_BOTTOM);
+ if(e->rasterizer.scissor)
+ {
+ scissor_left = MAX2(e->scissor.SE_SCISSOR_LEFT, scissor_left);
+ scissor_top = MAX2(e->scissor.SE_SCISSOR_TOP, scissor_top);
+ scissor_right = MIN2(e->scissor.SE_SCISSOR_RIGHT, scissor_right);
+ scissor_bottom = MIN2(e->scissor.SE_SCISSOR_BOTTOM, scissor_bottom);
+ }
+ /*00C00*/ EMIT_STATE_FIXP(SE_SCISSOR_LEFT, SE_SCISSOR_LEFT, scissor_left);
+ /*00C04*/ EMIT_STATE_FIXP(SE_SCISSOR_TOP, SE_SCISSOR_TOP, scissor_top);
+ /*00C08*/ EMIT_STATE_FIXP(SE_SCISSOR_RIGHT, SE_SCISSOR_RIGHT, scissor_right);
+ /*00C0C*/ EMIT_STATE_FIXP(SE_SCISSOR_BOTTOM, SE_SCISSOR_BOTTOM, scissor_bottom);
+ }
+ if(unlikely(dirty & (ETNA_STATE_RASTERIZER)))
+ {
+ /*00C10*/ EMIT_STATE(SE_DEPTH_SCALE, SE_DEPTH_SCALE, e->rasterizer.SE_DEPTH_SCALE);
+ /*00C14*/ EMIT_STATE(SE_DEPTH_BIAS, SE_DEPTH_BIAS, e->rasterizer.SE_DEPTH_BIAS);
+ /*00C18*/ EMIT_STATE(SE_CONFIG, SE_CONFIG, e->rasterizer.SE_CONFIG);
+ }
+ if(unlikely(dirty & (ETNA_STATE_SHADER)))
+ {
+ /*00E00*/ EMIT_STATE(RA_CONTROL, RA_CONTROL, e->shader_state.RA_CONTROL);
+ }
+ if(unlikely(dirty & (ETNA_STATE_FRAMEBUFFER)))
+ {
+ /*00E04*/ EMIT_STATE(RA_MULTISAMPLE_UNK00E04, RA_MULTISAMPLE_UNK00E04, e->framebuffer.RA_MULTISAMPLE_UNK00E04);
+ for(int x=0; x<4; ++x)
+ {
+ /*00E10*/ EMIT_STATE(RA_MULTISAMPLE_UNK00E10(x), RA_MULTISAMPLE_UNK00E10[x], e->framebuffer.RA_MULTISAMPLE_UNK00E10[x]);
+ }
+ for(int x=0; x<16; ++x)
+ {
+ /*00E40*/ EMIT_STATE(RA_CENTROID_TABLE(x), RA_CENTROID_TABLE[x], e->framebuffer.RA_CENTROID_TABLE[x]);
+ }
+ }
+ if(unlikely(dirty & (ETNA_STATE_SHADER | ETNA_STATE_FRAMEBUFFER)))
+ {
+ /*01000*/ EMIT_STATE(PS_END_PC, PS_END_PC, e->shader_state.PS_END_PC);
+ /*01004*/ EMIT_STATE(PS_OUTPUT_REG, PS_OUTPUT_REG, e->shader_state.PS_OUTPUT_REG);
+ /*01008*/ EMIT_STATE(PS_INPUT_COUNT, PS_INPUT_COUNT,
+ e->framebuffer.msaa_mode ?
+ e->shader_state.PS_INPUT_COUNT_MSAA :
+ e->shader_state.PS_INPUT_COUNT);
+ /*0100C*/ EMIT_STATE(PS_TEMP_REGISTER_CONTROL, PS_TEMP_REGISTER_CONTROL,
+ e->framebuffer.msaa_mode ?
+ e->shader_state.PS_TEMP_REGISTER_CONTROL_MSAA :
+ e->shader_state.PS_TEMP_REGISTER_CONTROL);
+ /*01010*/ EMIT_STATE(PS_CONTROL, PS_CONTROL, e->shader_state.PS_CONTROL);
+ /*01018*/ EMIT_STATE(PS_START_PC, PS_START_PC, e->shader_state.PS_START_PC);
+ if (e->specs.has_shader_range_registers)
+ {
+ /*0101C*/ EMIT_STATE(PS_RANGE, PS_RANGE, ((e->shader_state.ps_inst_mem_size/4-1+0x100)<<16) | 0x100);
+ }
+ }
+ if(unlikely(dirty & (ETNA_STATE_DSA | ETNA_STATE_FRAMEBUFFER)))
+ {
+ /*01400*/ EMIT_STATE(PE_DEPTH_CONFIG, PE_DEPTH_CONFIG, e->depth_stencil_alpha.PE_DEPTH_CONFIG | e->framebuffer.PE_DEPTH_CONFIG);
+ }
+ if(unlikely(dirty & (ETNA_STATE_VIEWPORT)))
+ {
+ /*01404*/ EMIT_STATE(PE_DEPTH_NEAR, PE_DEPTH_NEAR, e->viewport.PE_DEPTH_NEAR);
+ /*01408*/ EMIT_STATE(PE_DEPTH_FAR, PE_DEPTH_FAR, e->viewport.PE_DEPTH_FAR);
+ }
+ if(unlikely(dirty & (ETNA_STATE_FRAMEBUFFER)))
+ {
+ /*0140C*/ EMIT_STATE(PE_DEPTH_NORMALIZE, PE_DEPTH_NORMALIZE, e->framebuffer.PE_DEPTH_NORMALIZE);
+
+ if (ctx->conn->chip.pixel_pipes == 1)
+ {
+ /*01410*/ EMIT_STATE(PE_DEPTH_ADDR, PE_DEPTH_ADDR, e->framebuffer.PE_DEPTH_ADDR);
+ }
+
+ /*01414*/ EMIT_STATE(PE_DEPTH_STRIDE, PE_DEPTH_STRIDE, e->framebuffer.PE_DEPTH_STRIDE);
+ }
+ if(unlikely(dirty & (ETNA_STATE_DSA)))
+ {
+ /*01418*/ EMIT_STATE(PE_STENCIL_OP, PE_STENCIL_OP, e->depth_stencil_alpha.PE_STENCIL_OP);
+ }
+ if(unlikely(dirty & (ETNA_STATE_DSA | ETNA_STATE_STENCIL_REF)))
+ {
+ /*0141C*/ EMIT_STATE(PE_STENCIL_CONFIG, PE_STENCIL_CONFIG, e->depth_stencil_alpha.PE_STENCIL_CONFIG | e->stencil_ref.PE_STENCIL_CONFIG);
+ }
+ if(unlikely(dirty & (ETNA_STATE_DSA)))
+ {
+ /*01420*/ EMIT_STATE(PE_ALPHA_OP, PE_ALPHA_OP, e->depth_stencil_alpha.PE_ALPHA_OP);
+ }
+ if(unlikely(dirty & (ETNA_STATE_BLEND_COLOR)))
+ {
+ /*01424*/ EMIT_STATE(PE_ALPHA_BLEND_COLOR, PE_ALPHA_BLEND_COLOR, e->blend_color.PE_ALPHA_BLEND_COLOR);
+ }
+ if(unlikely(dirty & (ETNA_STATE_BLEND)))
+ {
+ /*01428*/ EMIT_STATE(PE_ALPHA_CONFIG, PE_ALPHA_CONFIG, e->blend.PE_ALPHA_CONFIG);
+ }
+ if(unlikely(dirty & (ETNA_STATE_BLEND | ETNA_STATE_FRAMEBUFFER)))
+ {
+ /*0142C*/ EMIT_STATE(PE_COLOR_FORMAT, PE_COLOR_FORMAT, e->blend.PE_COLOR_FORMAT | e->framebuffer.PE_COLOR_FORMAT);
+ }
+ if(unlikely(dirty & (ETNA_STATE_FRAMEBUFFER)))
+ {
+ if (ctx->conn->chip.pixel_pipes == 1)
+ {
+ /*01430*/ EMIT_STATE(PE_COLOR_ADDR, PE_COLOR_ADDR, e->framebuffer.PE_COLOR_ADDR);
+ /*01434*/ EMIT_STATE(PE_COLOR_STRIDE, PE_COLOR_STRIDE, e->framebuffer.PE_COLOR_STRIDE);
+ /*01454*/ EMIT_STATE(PE_HDEPTH_CONTROL, PE_HDEPTH_CONTROL, e->framebuffer.PE_HDEPTH_CONTROL);
+ }
+ else if (ctx->conn->chip.pixel_pipes == 2)
+ {
+ /*01434*/ EMIT_STATE(PE_COLOR_STRIDE, PE_COLOR_STRIDE, e->framebuffer.PE_COLOR_STRIDE);
+ /*01454*/ EMIT_STATE(PE_HDEPTH_CONTROL, PE_HDEPTH_CONTROL, e->framebuffer.PE_HDEPTH_CONTROL);
+ /*01460*/ EMIT_STATE(PE_PIPE_COLOR_ADDR(0), PE_PIPE_COLOR_ADDR[0], e->framebuffer.PE_PIPE_COLOR_ADDR[0]);
+ /*01464*/ EMIT_STATE(PE_PIPE_COLOR_ADDR(1), PE_PIPE_COLOR_ADDR[1], e->framebuffer.PE_PIPE_COLOR_ADDR[1]);
+ /*01480*/ EMIT_STATE(PE_PIPE_DEPTH_ADDR(0), PE_PIPE_DEPTH_ADDR[0], e->framebuffer.PE_PIPE_DEPTH_ADDR[0]);
+ /*01484*/ EMIT_STATE(PE_PIPE_DEPTH_ADDR(1), PE_PIPE_DEPTH_ADDR[1], e->framebuffer.PE_PIPE_DEPTH_ADDR[1]);
+ }
+ }
+ if(unlikely(dirty & (ETNA_STATE_STENCIL_REF)))
+ {
+ /*014A0*/ EMIT_STATE(PE_STENCIL_CONFIG_EXT, PE_STENCIL_CONFIG_EXT, e->stencil_ref.PE_STENCIL_CONFIG_EXT);
+ }
+ if(unlikely(dirty & (ETNA_STATE_BLEND)))
+ {
+ /*014A4*/ EMIT_STATE(PE_LOGIC_OP, PE_LOGIC_OP, e->blend.PE_LOGIC_OP);
+ for(int x=0; x<2; ++x)
+ {
+ /*014A8*/ EMIT_STATE(PE_DITHER(x), PE_DITHER[x], e->blend.PE_DITHER[x]);
+ }
+ }
+ if(unlikely(dirty & (ETNA_STATE_FRAMEBUFFER | ETNA_STATE_TS)))
+ {
+ /*01654*/ EMIT_STATE(TS_MEM_CONFIG, TS_MEM_CONFIG, e->framebuffer.TS_MEM_CONFIG);
+ /*01658*/ EMIT_STATE(TS_COLOR_STATUS_BASE, TS_COLOR_STATUS_BASE, e->framebuffer.TS_COLOR_STATUS_BASE);
+ /*0165C*/ EMIT_STATE(TS_COLOR_SURFACE_BASE, TS_COLOR_SURFACE_BASE, e->framebuffer.TS_COLOR_SURFACE_BASE);
+ /*01660*/ EMIT_STATE(TS_COLOR_CLEAR_VALUE, TS_COLOR_CLEAR_VALUE, e->framebuffer.TS_COLOR_CLEAR_VALUE);
+ /*01664*/ EMIT_STATE(TS_DEPTH_STATUS_BASE, TS_DEPTH_STATUS_BASE, e->framebuffer.TS_DEPTH_STATUS_BASE);
+ /*01668*/ EMIT_STATE(TS_DEPTH_SURFACE_BASE, TS_DEPTH_SURFACE_BASE, e->framebuffer.TS_DEPTH_SURFACE_BASE);
+ /*0166C*/ EMIT_STATE(TS_DEPTH_CLEAR_VALUE, TS_DEPTH_CLEAR_VALUE, e->framebuffer.TS_DEPTH_CLEAR_VALUE);
+ }
+ if(unlikely(dirty & (ETNA_STATE_SAMPLER_VIEWS | ETNA_STATE_SAMPLERS)))
+ {
+ for(int x=0; x<VIVS_TE_SAMPLER__LEN; ++x)
+ {
+ /* set active samplers to their configuration value (determined by both the sampler state and sampler view),
+ * set inactive sampler config to 0 */
+ /*02000*/ EMIT_STATE(TE_SAMPLER_CONFIG0(x), TE_SAMPLER_CONFIG0[x],
+ ((1<<x) & active_samplers)?(
+ (e->sampler[x].TE_SAMPLER_CONFIG0 & e->sampler_view[x].TE_SAMPLER_CONFIG0_MASK) |
+ e->sampler_view[x].TE_SAMPLER_CONFIG0):0);
+ }
+ }
+ if(unlikely(dirty & (ETNA_STATE_SAMPLER_VIEWS)))
+ {
+ for(int x=0; x<VIVS_TE_SAMPLER__LEN; ++x)
+ {
+ if((1<<x) & active_samplers)
+ {
+ /*02040*/ EMIT_STATE(TE_SAMPLER_SIZE(x), TE_SAMPLER_SIZE[x], e->sampler_view[x].TE_SAMPLER_SIZE);
+ }
+ }
+ for(int x=0; x<VIVS_TE_SAMPLER__LEN; ++x)
+ {
+ if((1<<x) & active_samplers)
+ {
+ /*02080*/ EMIT_STATE(TE_SAMPLER_LOG_SIZE(x), TE_SAMPLER_LOG_SIZE[x], e->sampler_view[x].TE_SAMPLER_LOG_SIZE);
+ }
+ }
+ }
+ if(unlikely(dirty & (ETNA_STATE_SAMPLER_VIEWS | ETNA_STATE_SAMPLERS)))
+ {
+ for(int x=0; x<VIVS_TE_SAMPLER__LEN; ++x)
+ {
+ if((1<<x) & active_samplers)
+ {
+ /* min and max lod is determined both by the sampler and the view */
+ /*020C0*/ EMIT_STATE(TE_SAMPLER_LOD_CONFIG(x), TE_SAMPLER_LOD_CONFIG[x],
+ e->sampler[x].TE_SAMPLER_LOD_CONFIG |
+ VIVS_TE_SAMPLER_LOD_CONFIG_MAX(MIN2(e->sampler[x].max_lod, e->sampler_view[x].max_lod)) |
+ VIVS_TE_SAMPLER_LOD_CONFIG_MIN(MAX2(e->sampler[x].min_lod, e->sampler_view[x].min_lod)));
+ }
+ }
+ for(int x=0; x<VIVS_TE_SAMPLER__LEN; ++x)
+ {
+ if((1<<x) & active_samplers)
+ {
+ /*021C0*/ EMIT_STATE(TE_SAMPLER_CONFIG1(x), TE_SAMPLER_CONFIG1[x],
+ e->sampler[x].TE_SAMPLER_CONFIG1 | e->sampler_view[x].TE_SAMPLER_CONFIG1);
+ }
+ }
+ }
+ if(unlikely(dirty & (ETNA_STATE_SAMPLER_VIEWS)))
+ {
+ for(int y=0; y<VIVS_TE_SAMPLER_LOD_ADDR__LEN; ++y)
+ {
+ for(int x=0; x<VIVS_TE_SAMPLER__LEN; ++x)
+ {
+ if((1<<x) & active_samplers)
+ {
+ /*02400*/ EMIT_STATE(TE_SAMPLER_LOD_ADDR(x, y), TE_SAMPLER_LOD_ADDR[y][x], e->sampler_view[x].TE_SAMPLER_LOD_ADDR[y]);
+ }
+ }
+ }
+ }
+ if(unlikely(dirty & (ETNA_STATE_SHADER)))
+ {
+ /*0381C*/ EMIT_STATE(GL_VARYING_TOTAL_COMPONENTS, GL_VARYING_TOTAL_COMPONENTS, e->shader_state.GL_VARYING_TOTAL_COMPONENTS);
+ /*03820*/ EMIT_STATE(GL_VARYING_NUM_COMPONENTS, GL_VARYING_NUM_COMPONENTS, e->shader_state.GL_VARYING_NUM_COMPONENTS);
+ for(int x=0; x<2; ++x)
+ {
+ /*03828*/ EMIT_STATE(GL_VARYING_COMPONENT_USE(x), GL_VARYING_COMPONENT_USE[x], e->shader_state.GL_VARYING_COMPONENT_USE[x]);
+ }
+ }
+ ETNA_COALESCE_STATE_CLOSE();
+ /* end only EMIT_STATE */
+ /**** Large dynamically-sized state ****/
+ if(dirty & (ETNA_STATE_SHADER))
+ {
+ /* Special case: a new shader was loaded; simply re-load all uniforms and shader code at once */
+ /*04000 or 0C000*/
+ etna_set_state_multi(ctx, e->specs.vs_offset, e->shader_state.vs_inst_mem_size, e->shader_state.VS_INST_MEM);
+ /*06000 or 0D000*/
+ etna_set_state_multi(ctx, e->specs.ps_offset, e->shader_state.ps_inst_mem_size, e->shader_state.PS_INST_MEM);
+ /*05000*/ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(0), e->shader_state.vs_uniforms_size, e->shader_state.VS_UNIFORMS);
+ /*07000*/ etna_set_state_multi(ctx, VIVS_PS_UNIFORMS(0), e->shader_state.ps_uniforms_size, e->shader_state.PS_UNIFORMS);
+
+ /* Copy uniforms to gpu3d, so that incremental updates to uniforms are possible as long as the
+ * same shader remains bound */
+ e->gpu3d.vs_uniforms_size = e->shader_state.vs_uniforms_size;
+ e->gpu3d.ps_uniforms_size = e->shader_state.ps_uniforms_size;
+ e->gpu3d.vs_inst_mem_size = e->shader_state.vs_inst_mem_size;
+ e->gpu3d.ps_inst_mem_size = e->shader_state.ps_inst_mem_size;
+ memcpy(e->gpu3d.VS_UNIFORMS, e->shader_state.VS_UNIFORMS, e->shader_state.vs_uniforms_size * 4);
+ memcpy(e->gpu3d.PS_UNIFORMS, e->shader_state.PS_UNIFORMS, e->shader_state.ps_uniforms_size * 4);
+ memcpy(e->gpu3d.VS_INST_MEM, e->shader_state.VS_INST_MEM, e->shader_state.vs_inst_mem_size * 4);
+ memcpy(e->gpu3d.PS_INST_MEM, e->shader_state.PS_INST_MEM, e->shader_state.ps_inst_mem_size * 4);
+ }
+ else
+ {
+ /* If new uniforms loaded with current shader, only submit what changed */
+ if(dirty & (ETNA_STATE_VS_UNIFORMS))
+ {
+ ETNA_COALESCE_STATE_OPEN(e->shader_state.vs_uniforms_size); /* worst case */
+ for(int x=0; x<e->shader_state.vs_uniforms_size; ++x)
+ {
+ /*05000*/ EMIT_STATE(VS_UNIFORMS(x), VS_UNIFORMS[x], e->shader_state.VS_UNIFORMS[x]);
+ }
+ ETNA_COALESCE_STATE_CLOSE();
+ }
+ if(dirty & (ETNA_STATE_PS_UNIFORMS))
+ {
+ ETNA_COALESCE_STATE_OPEN(e->shader_state.ps_uniforms_size); /* worst case */
+ for(int x=0; x<e->shader_state.ps_uniforms_size; ++x)
+ {
+ /*07000*/ EMIT_STATE(PS_UNIFORMS(x), PS_UNIFORMS[x], e->shader_state.PS_UNIFORMS[x]);
+ }
+ ETNA_COALESCE_STATE_CLOSE();
+ }
+ }
+ /**** End of state update ****/
+#undef EMIT_STATE
+#undef EMIT_STATE_FIXP
+
+ e->dirty_bits = 0;
+}
+
+/** Build new explicit context for etna. This is a command buffer that contains
+ * all commands needed to set up the GPU to current state, to be used after a context
+ * switch (when multiple processes are using the GPU at once).
+ *
+ * This function is called as callback by etna_flush for kernel drivers
+ * that require an explicit context)
+ */
+static int update_context(void *pipe, struct etna_ctx *ctx, enum etna_pipe *initial_pipe, enum etna_pipe *final_pipe)
+{
+ reset_context((struct pipe_context*) pipe);
+ *initial_pipe = ETNA_PIPE_3D;
+ *final_pipe = ETNA_PIPE_3D;
+ return ETNA_OK;
+}
+
+/*********************************************************************/
+
+/** Destroy etna pipe. After calling this the pipe object must never be
+ * used again.
+ */
+static void etna_pipe_destroy(struct pipe_context *pipe)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ etna_pipe_clear_blit_destroy(pipe);
+ etna_pipe_transfer_destroy(pipe);
+ etna_free(priv->ctx);
+ FREE(pipe);
+}
+
+/** Main draw function. Draw primitives from a vertex buffer object,
+ * using optonally an index buffer.
+ */
+static void etna_pipe_draw_vbo(struct pipe_context *pipe,
+ const struct pipe_draw_info *info)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ if(priv->vertex_elements_p == NULL || priv->vertex_elements.num_elements == 0)
+ return; /* Nothing to do */
+ int prims = u_decomposed_prims_for_vertices(info->mode, info->count);
+ if(unlikely(prims <= 0))
+ {
+ DBG("Invalid draw primitive mode=%i or no primitives to be drawn", info->mode);
+ return;
+ }
+ /* First, sync state, then emit DRAW_PRIMITIVES or DRAW_INDEXED_PRIMITIVES */
+ sync_context(pipe);
+ if(priv->vs && priv->vertex_elements.num_elements != priv->vs->num_inputs)
+ {
+ BUG("Number of elements %i does not match the number of VS inputs %i",
+ priv->vertex_elements.num_elements, priv->vs->num_inputs);
+ return;
+ }
+ if(info->indexed)
+ {
+ etna_draw_indexed_primitives(priv->ctx, translate_draw_mode(info->mode),
+ info->start, prims, info->index_bias);
+ } else
+ {
+ etna_draw_primitives(priv->ctx, translate_draw_mode(info->mode),
+ info->start, prims);
+ }
+ if(DBG_ENABLED(ETNA_DBG_FLUSH_ALL))
+ {
+ pipe->flush(pipe, NULL, 0);
+ }
+}
+
+/** Create vertex element states, which define a layout for fetching
+ * vertices for rendering.
+ */
+static void *etna_pipe_create_vertex_elements_state(struct pipe_context *pipe,
+ unsigned num_elements,
+ const struct pipe_vertex_element *elements)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct compiled_vertex_elements_state *cs = CALLOC_STRUCT(compiled_vertex_elements_state);
+ /* XXX could minimize number of consecutive stretches here by sorting, and
+ * permuting the inputs in shader or does Mesa do this already? */
+
+ /* Check that vertex element binding is compatible with hardware; thus
+ * elements[idx].vertex_buffer_index are < stream_count. If not, the binding
+ * uses more streams than is supported, and u_vbuf should have done some reorganization
+ * for compatibility.
+ */
+ bool incompatible = false;
+ for(unsigned idx=0; idx<num_elements; ++idx)
+ {
+ if(elements[idx].vertex_buffer_index >= priv->specs.stream_count ||
+ elements[idx].instance_divisor > 0)
+ incompatible = true;
+ }
+ cs->num_elements = num_elements;
+ if(incompatible || num_elements == 0)
+ {
+ DBG("Error: zero vertex elements, or more vertex buffers used than supported");
+ FREE(cs);
+ return NULL;
+ }
+ unsigned start_offset = 0; /* start of current consecutive stretch */
+ bool nonconsecutive = true; /* previous value of nonconsecutive */
+ for(unsigned idx=0; idx<num_elements; ++idx)
+ {
+ unsigned element_size = util_format_get_blocksize(elements[idx].src_format);
+ unsigned end_offset = elements[idx].src_offset + element_size;
+ if(nonconsecutive)
+ start_offset = elements[idx].src_offset;
+ assert(element_size != 0 && end_offset <= 256); /* maximum vertex size is 256 bytes */
+ /* check whether next element is consecutive to this one */
+ nonconsecutive = (idx == (num_elements-1)) ||
+ elements[idx+1].vertex_buffer_index != elements[idx].vertex_buffer_index ||
+ end_offset != elements[idx+1].src_offset;
+ cs->FE_VERTEX_ELEMENT_CONFIG[idx] =
+ (nonconsecutive ? VIVS_FE_VERTEX_ELEMENT_CONFIG_NONCONSECUTIVE : 0) |
+ translate_vertex_format_type(elements[idx].src_format, false) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM(util_format_get_nr_components(elements[idx].src_format)) |
+ translate_vertex_format_normalize(elements[idx].src_format) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN(ENDIAN_MODE_NO_SWAP) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM(elements[idx].vertex_buffer_index) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_START(elements[idx].src_offset) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_END(end_offset - start_offset);
+ }
+ return cs;
+}
+
+static void etna_pipe_bind_vertex_elements_state(struct pipe_context *pipe, void *ve)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ priv->dirty_bits |= ETNA_STATE_VERTEX_ELEMENTS;
+ priv->vertex_elements_p = ve;
+ if(ve)
+ priv->vertex_elements = *(struct compiled_vertex_elements_state*)ve;
+}
+
+static void etna_pipe_delete_vertex_elements_state(struct pipe_context *pipe, void *ve)
+{
+ struct compiled_vertex_elements_state *cs = (struct compiled_vertex_elements_state*)ve;
+ //struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ FREE(cs);
+}
+
+static void etna_pipe_set_blend_color(struct pipe_context *pipe,
+ const struct pipe_blend_color *bc)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct compiled_blend_color *cs = &priv->blend_color;
+ cs->PE_ALPHA_BLEND_COLOR =
+ VIVS_PE_ALPHA_BLEND_COLOR_R(etna_cfloat_to_uint8(bc->color[0])) |
+ VIVS_PE_ALPHA_BLEND_COLOR_G(etna_cfloat_to_uint8(bc->color[1])) |
+ VIVS_PE_ALPHA_BLEND_COLOR_B(etna_cfloat_to_uint8(bc->color[2])) |
+ VIVS_PE_ALPHA_BLEND_COLOR_A(etna_cfloat_to_uint8(bc->color[3]));
+ priv->dirty_bits |= ETNA_STATE_BLEND_COLOR;
+}
+
+static void etna_pipe_set_stencil_ref(struct pipe_context *pipe,
+ const struct pipe_stencil_ref *sr)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct compiled_stencil_ref *cs = &priv->stencil_ref;
+
+ priv->stencil_ref_s = *sr;
+
+ cs->PE_STENCIL_CONFIG =
+ VIVS_PE_STENCIL_CONFIG_REF_FRONT(sr->ref_value[0]);
+ /* rest of bits weaved in from depth_stencil_alpha */
+ cs->PE_STENCIL_CONFIG_EXT =
+ VIVS_PE_STENCIL_CONFIG_EXT_REF_BACK(sr->ref_value[0]);
+ priv->dirty_bits |= ETNA_STATE_STENCIL_REF;
+}
+
+static void etna_pipe_set_sample_mask(struct pipe_context *pipe,
+ unsigned sample_mask)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct compiled_sample_mask *cs = &priv->sample_mask;
+
+ priv->sample_mask_s = sample_mask;
+
+ cs->GL_MULTI_SAMPLE_CONFIG =
+ /* to be merged with render target state */
+ VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES(sample_mask);
+ priv->dirty_bits |= ETNA_STATE_SAMPLE_MASK;
+}
+
+static void etna_pipe_set_framebuffer_state(struct pipe_context *pipe,
+ const struct pipe_framebuffer_state *sv)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct compiled_framebuffer_state *cs = &priv->framebuffer;
+ int nr_samples_color = -1;
+ int nr_samples_depth = -1;
+
+ /* Set up TS as well. Warning: this state is used by both the RS and PE */
+ uint32_t ts_mem_config = 0;
+ if(sv->nr_cbufs > 0) /* at least one color buffer? */
+ {
+ struct etna_surface *cbuf = etna_surface(sv->cbufs[0]);
+ bool color_supertiled = (cbuf->layout & 2)!=0;
+ assert(cbuf->layout & 1); /* Cannot render to linear surfaces */
+ pipe_surface_reference(&cs->cbuf, &cbuf->base);
+ cs->PE_COLOR_FORMAT =
+ VIVS_PE_COLOR_FORMAT_FORMAT(translate_rt_format(cbuf->base.format, false)) |
+ (color_supertiled ? VIVS_PE_COLOR_FORMAT_SUPER_TILED : 0);
+ /* XXX VIVS_PE_COLOR_FORMAT_OVERWRITE and the rest comes from blend_state / depth_stencil_alpha */
+ /* merged with depth_stencil_alpha */
+ if((cbuf->surf.address & 63) || (((cbuf->surf.stride*4) & 63) && cbuf->surf.height > 4))
+ {
+ /* XXX Must make temporary surface here.
+ * Need the same mechanism on gc2000 when we want to do mipmap generation by
+ * rendering to levels > 1 due to multitiled / tiled conversion.
+ */
+ BUG("Alignment error, trying to render to %08x with tile stride %i",
+ cbuf->surf.address, cbuf->surf.stride*4);
+ }
+
+ if (priv->ctx->conn->chip.pixel_pipes == 1)
+ {
+ cs->PE_COLOR_ADDR = cbuf->surf.address;
+ }
+ else if (priv->ctx->conn->chip.pixel_pipes == 2)
+ {
+ cs->PE_PIPE_COLOR_ADDR[0] = cbuf->surf.address;
+ cs->PE_PIPE_COLOR_ADDR[1] = cbuf->surf.address; /* TODO */
+ }
+ cs->PE_COLOR_STRIDE = cbuf->surf.stride;
+ if(cbuf->surf.ts_address)
+ {
+ ts_mem_config |= VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR;
+ cs->TS_COLOR_CLEAR_VALUE = cbuf->level->clear_value;
+ cs->TS_COLOR_STATUS_BASE = cbuf->surf.ts_address;
+ cs->TS_COLOR_SURFACE_BASE = cbuf->surf.address;
+ }
+ /* MSAA */
+ if(cbuf->base.texture->nr_samples > 1)
+ ts_mem_config |= VIVS_TS_MEM_CONFIG_MSAA | translate_msaa_format(cbuf->base.format, false);
+ nr_samples_color = cbuf->base.texture->nr_samples;
+ } else {
+ pipe_surface_reference(&cs->cbuf, NULL);
+ cs->PE_COLOR_FORMAT = 0; /* Is this enough to render without color? */
+ }
+
+ if(sv->zsbuf != NULL)
+ {
+ struct etna_surface *zsbuf = etna_surface(sv->zsbuf);
+ pipe_surface_reference(&cs->zsbuf, &zsbuf->base);
+ assert(zsbuf->layout & 1); /* Cannot render to linear surfaces */
+ uint32_t depth_format = translate_depth_format(zsbuf->base.format, false);
+ unsigned depth_bits = depth_format == VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT_D16 ? 16 : 24;
+ bool depth_supertiled = (zsbuf->layout & 2)!=0;
+ cs->PE_DEPTH_CONFIG =
+ depth_format |
+ (depth_supertiled ? VIVS_PE_DEPTH_CONFIG_SUPER_TILED : 0) |
+ VIVS_PE_DEPTH_CONFIG_DEPTH_MODE_Z;
+ /* VIVS_PE_DEPTH_CONFIG_ONLY_DEPTH */
+ /* merged with depth_stencil_alpha */
+ if (priv->ctx->conn->chip.pixel_pipes == 1)
+ {
+ cs->PE_DEPTH_ADDR = zsbuf->surf.address;
+ }
+ else if (priv->ctx->conn->chip.pixel_pipes == 2)
+ {
+ cs->PE_PIPE_DEPTH_ADDR[0] = zsbuf->surf.address;
+ cs->PE_PIPE_DEPTH_ADDR[1] = zsbuf->surf.address; /* TODO */
+ }
+ cs->PE_DEPTH_STRIDE = zsbuf->surf.stride;
+ cs->PE_HDEPTH_CONTROL = VIVS_PE_HDEPTH_CONTROL_FORMAT_DISABLED;
+ cs->PE_DEPTH_NORMALIZE = etna_f32_to_u32(exp2f(depth_bits) - 1.0f);
+ if(zsbuf->surf.ts_address)
+ {
+ ts_mem_config |= VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR;
+ cs->TS_DEPTH_CLEAR_VALUE = zsbuf->level->clear_value;
+ cs->TS_DEPTH_STATUS_BASE = zsbuf->surf.ts_address;
+ cs->TS_DEPTH_SURFACE_BASE = zsbuf->surf.address;
+ }
+ ts_mem_config |= (depth_bits == 16 ? VIVS_TS_MEM_CONFIG_DEPTH_16BPP : 0);
+ /* MSAA */
+ if(zsbuf->base.texture->nr_samples > 1)
+ /* XXX VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION;
+ * Disable without MSAA for now, as it causes corruption in glquake. */
+ ts_mem_config |= VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION;
+ nr_samples_depth = zsbuf->base.texture->nr_samples;
+ } else {
+ pipe_surface_reference(&cs->zsbuf, NULL);
+ cs->PE_DEPTH_CONFIG = VIVS_PE_DEPTH_CONFIG_DEPTH_MODE_NONE;
+ }
+
+ /* MSAA setup */
+ if(nr_samples_depth != -1 && nr_samples_color != -1 &&
+ nr_samples_depth != nr_samples_color)
+ {
+ BUG("Number of samples in color and depth texture must match (%i and %i respectively)",
+ nr_samples_color, nr_samples_depth);
+ }
+ switch(MAX2(nr_samples_depth, nr_samples_color))
+ {
+ case 0:
+ case 1: /* Are 0 and 1 samples allowed? */
+ cs->GL_MULTI_SAMPLE_CONFIG = VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_NONE;
+ cs->msaa_mode = false;
+ break;
+ case 2:
+ cs->GL_MULTI_SAMPLE_CONFIG = VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_2X;
+ cs->msaa_mode = true; /* Add input to PS */
+ cs->RA_MULTISAMPLE_UNK00E04 = 0x0;
+ cs->RA_MULTISAMPLE_UNK00E10[0] = 0x0000aa22;
+ cs->RA_CENTROID_TABLE[0] = 0x66aa2288;
+ cs->RA_CENTROID_TABLE[1] = 0x88558800;
+ cs->RA_CENTROID_TABLE[2] = 0x88881100;
+ cs->RA_CENTROID_TABLE[3] = 0x33888800;
+ break;
+ case 4:
+ cs->GL_MULTI_SAMPLE_CONFIG = VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_4X;
+ cs->msaa_mode = true; /* Add input to PS */
+ cs->RA_MULTISAMPLE_UNK00E04 = 0x0;
+ cs->RA_MULTISAMPLE_UNK00E10[0] = 0xeaa26e26;
+ cs->RA_MULTISAMPLE_UNK00E10[1] = 0xe6ae622a;
+ cs->RA_MULTISAMPLE_UNK00E10[2] = 0xaaa22a22;
+ cs->RA_CENTROID_TABLE[0] = 0x4a6e2688;
+ cs->RA_CENTROID_TABLE[1] = 0x888888a2;
+ cs->RA_CENTROID_TABLE[2] = 0x888888ea;
+ cs->RA_CENTROID_TABLE[3] = 0x888888c6;
+ cs->RA_CENTROID_TABLE[4] = 0x46622a88;
+ cs->RA_CENTROID_TABLE[5] = 0x888888ae;
+ cs->RA_CENTROID_TABLE[6] = 0x888888e6;
+ cs->RA_CENTROID_TABLE[7] = 0x888888ca;
+ cs->RA_CENTROID_TABLE[8] = 0x262a2288;
+ cs->RA_CENTROID_TABLE[9] = 0x886688a2;
+ cs->RA_CENTROID_TABLE[10] = 0x888866aa;
+ cs->RA_CENTROID_TABLE[11] = 0x668888a6;
+ break;
+ }
+
+ /* Scissor setup */
+ cs->SE_SCISSOR_LEFT = 0; /* affected by rasterizer and scissor state as well */
+ cs->SE_SCISSOR_TOP = 0;
+ cs->SE_SCISSOR_RIGHT = (sv->width << 16)-1;
+ cs->SE_SCISSOR_BOTTOM = (sv->height << 16)-1;
+
+ cs->TS_MEM_CONFIG = ts_mem_config;
+
+ priv->dirty_bits |= ETNA_STATE_FRAMEBUFFER;
+ priv->framebuffer_s = *sv; /* keep copy of original structure */
+}
+
+static void etna_pipe_set_scissor_states( struct pipe_context *pipe,
+ unsigned start_slot,
+ unsigned num_scissors,
+ const struct pipe_scissor_state *ss)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct compiled_scissor_state *cs = &priv->scissor;
+ priv->scissor_s = *ss;
+ cs->SE_SCISSOR_LEFT = (ss->minx << 16);
+ cs->SE_SCISSOR_TOP = (ss->miny << 16);
+ cs->SE_SCISSOR_RIGHT = (ss->maxx << 16)-1;
+ cs->SE_SCISSOR_BOTTOM = (ss->maxy << 16)-1;
+ /* note that this state is only used when rasterizer_state->scissor is on */
+ priv->dirty_bits |= ETNA_STATE_SCISSOR;
+}
+
+static void etna_pipe_set_viewport_states( struct pipe_context *pipe,
+ unsigned start_slot,
+ unsigned num_scissors,
+ const struct pipe_viewport_state *vs)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct compiled_viewport_state *cs = &priv->viewport;
+ priv->viewport_s = *vs;
+ /**
+ * For Vivante GPU, viewport z transformation is 0..1 to 0..1 instead of -1..1 to 0..1.
+ * scaling and translation to 0..1 already happened, so remove that
+ *
+ * z' = (z * 2 - 1) * scale + translate
+ * = z * (2 * scale) + (translate - scale)
+ *
+ * scale' = 2 * scale
+ * translate' = translate - scale
+ */
+ cs->PA_VIEWPORT_SCALE_X = etna_f32_to_fixp16(vs->scale[0]); /* must be fixp as v4 state deltas assume it is */
+ cs->PA_VIEWPORT_SCALE_Y = etna_f32_to_fixp16(vs->scale[1]);
+ cs->PA_VIEWPORT_SCALE_Z = etna_f32_to_u32(vs->scale[2] * 2.0f);
+ cs->PA_VIEWPORT_OFFSET_X = etna_f32_to_fixp16(vs->translate[0]);
+ cs->PA_VIEWPORT_OFFSET_Y = etna_f32_to_fixp16(vs->translate[1]);
+ cs->PA_VIEWPORT_OFFSET_Z = etna_f32_to_u32(vs->translate[2] - vs->scale[2]);
+
+ /* Compute scissor rectangle (fixp) from viewport.
+ * Make sure left is always < right and top always < bottom.
+ */
+ cs->SE_SCISSOR_LEFT = etna_f32_to_fixp16(MAX2(vs->translate[0] - vs->scale[0], 0.0f));
+ cs->SE_SCISSOR_TOP = etna_f32_to_fixp16(MAX2(vs->translate[1] - vs->scale[1], 0.0f));
+ cs->SE_SCISSOR_RIGHT = etna_f32_to_fixp16(MAX2(vs->translate[0] + vs->scale[0], 0.0f));
+ cs->SE_SCISSOR_BOTTOM = etna_f32_to_fixp16(MAX2(vs->translate[1] + vs->scale[1], 0.0f));
+ if(cs->SE_SCISSOR_LEFT > cs->SE_SCISSOR_RIGHT)
+ {
+ uint32_t tmp = cs->SE_SCISSOR_RIGHT;
+ cs->SE_SCISSOR_RIGHT = cs->SE_SCISSOR_LEFT;
+ cs->SE_SCISSOR_LEFT = tmp;
+ }
+ if(cs->SE_SCISSOR_TOP > cs->SE_SCISSOR_BOTTOM)
+ {
+ uint32_t tmp = cs->SE_SCISSOR_BOTTOM;
+ cs->SE_SCISSOR_BOTTOM = cs->SE_SCISSOR_TOP;
+ cs->SE_SCISSOR_TOP = tmp;
+ }
+
+ cs->PE_DEPTH_NEAR = etna_f32_to_u32(0.0); /* not affected if depth mode is Z (as in GL) */
+ cs->PE_DEPTH_FAR = etna_f32_to_u32(1.0);
+ priv->dirty_bits |= ETNA_STATE_VIEWPORT;
+}
+
+static void etna_pipe_set_vertex_buffers( struct pipe_context *pipe,
+ unsigned start_slot,
+ unsigned num_buffers,
+ const struct pipe_vertex_buffer *vb)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ assert((start_slot + num_buffers) <= PIPE_MAX_ATTRIBS);
+ struct pipe_vertex_buffer zero_vb = {};
+ for(unsigned idx=0; idx<num_buffers; ++idx)
+ {
+ unsigned slot = start_slot + idx; /* copy from vb[idx] to priv->...[slot] */
+ const struct pipe_vertex_buffer *vbi = vb ? &vb[idx] : &zero_vb;
+ struct compiled_set_vertex_buffer *cs = &priv->vertex_buffer[slot];
+ assert(!vbi->user_buffer); /* XXX support user_buffer using etna_usermem_map */
+ /* copy pipe_vertex_buffer structure and take reference */
+ priv->vertex_buffer_s[slot].stride = vbi->stride;
+ priv->vertex_buffer_s[slot].buffer_offset = vbi->buffer_offset;
+ pipe_resource_reference(&priv->vertex_buffer_s[slot].buffer, vbi->buffer);
+ priv->vertex_buffer_s[slot].user_buffer = vbi->user_buffer;
+ /* determine addresses */
+ viv_addr_t gpu_addr = 0;
+ cs->logical = 0;
+ if(vbi->buffer) /* GPU buffer */
+ {
+ gpu_addr = etna_resource(vbi->buffer)->levels[0].address + vbi->buffer_offset;
+ cs->logical = etna_resource(vbi->buffer)->levels[0].logical + vbi->buffer_offset;
+ }
+ /* compiled state */
+ cs->FE_VERTEX_STREAM_CONTROL = FE_VERTEX_STREAM_CONTROL_VERTEX_STRIDE(vbi->stride);
+ cs->FE_VERTEX_STREAM_BASE_ADDR = gpu_addr;
+
+ etna_resource_touch(pipe, vbi->buffer);
+ }
+
+ priv->dirty_bits |= ETNA_STATE_VERTEX_BUFFERS;
+}
+
+static void etna_pipe_set_index_buffer( struct pipe_context *pipe,
+ const struct pipe_index_buffer *ib)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct compiled_set_index_buffer *cs = &priv->index_buffer;
+ if(ib == NULL)
+ {
+ pipe_resource_reference(&priv->index_buffer_s.buffer, NULL); /* update reference to buffer */
+ cs->logical = NULL;
+ cs->FE_INDEX_STREAM_CONTROL = 0;
+ cs->FE_INDEX_STREAM_BASE_ADDR = 0;
+ } else
+ {
+ assert(ib->buffer); /* XXX user_buffer using etna_usermem_map */
+ pipe_resource_reference(&priv->index_buffer_s.buffer, ib->buffer); /* update reference to buffer */
+ priv->index_buffer_s.index_size = ib->index_size;
+ priv->index_buffer_s.offset = ib->offset;
+ priv->index_buffer_s.user_buffer = ib->user_buffer;
+
+ cs->FE_INDEX_STREAM_CONTROL =
+ translate_index_size(ib->index_size);
+ cs->FE_INDEX_STREAM_BASE_ADDR = etna_resource(ib->buffer)->levels[0].address + ib->offset;
+ cs->logical = etna_resource(ib->buffer)->levels[0].logical + ib->offset;
+
+ etna_resource_touch(pipe, ib->buffer);
+ }
+ priv->dirty_bits |= ETNA_STATE_INDEX_BUFFER;
+}
+
+static void etna_pipe_flush(struct pipe_context *pipe,
+ struct pipe_fence_handle **fence,
+ enum pipe_flush_flags flags)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ if(fence)
+ {
+ if(etna_fence_new(pipe->screen, priv->ctx, fence) != ETNA_OK)
+ {
+ BUG("Error: could not create fence");
+ }
+ }
+ if(etna_flush(priv->ctx) != ETNA_OK)
+ {
+ BUG("Error: etna_flush failed, GPU may be in unpredictable state");
+ }
+ if(DBG_ENABLED(ETNA_DBG_FINISH_ALL))
+ {
+ if(etna_finish(priv->ctx) != ETNA_OK)
+ {
+ BUG("Error: etna_finish failed, GPU may be in unpredictable state");
+ abort();
+ }
+ }
+}
+
+static void etna_pipe_set_clip_state(struct pipe_context *pipe, const struct pipe_clip_state *pcs)
+{
+ /* NOOP */
+}
+
+static void etna_pipe_set_polygon_stipple(struct pipe_context *pctx,
+ const struct pipe_poly_stipple *stipple)
+{
+ /* NOP */
+}
+
+struct pipe_context *etna_new_pipe_context(struct viv_conn *dev, const struct etna_pipe_specs *specs, struct pipe_screen *screen, void *priv)
+{
+ struct etna_pipe_context *ectx = CALLOC_STRUCT(etna_pipe_context);
+ if(ectx == NULL)
+ return NULL;
+ struct pipe_context *pc = &ectx->base;
+
+ pc->priv = priv;
+ pc->screen = screen;
+
+ if(etna_create(dev, &ectx->ctx) < 0)
+ {
+ FREE(pc);
+ return NULL;
+ }
+ etna_set_context_cb(ectx->ctx, update_context, ectx);
+
+ /* context ctxate setup */
+ ectx->dirty_bits = 0xffffffff;
+ ectx->conn = dev;
+ ectx->specs = *specs;
+
+ /* Set sensible defaults for state */
+ ectx->gpu3d.PA_W_CLIP_LIMIT = 0x34000001;
+ ectx->gpu3d.GL_VERTEX_ELEMENT_CONFIG = 0x1;
+ ectx->gpu3d.GL_API_MODE = VIVS_GL_API_MODE_OPENGL;
+ ectx->gpu3d.RA_EARLY_DEPTH = 0x00000031; /* enable */
+
+ /* fill in vtable entries one by one */
+ pc->destroy = etna_pipe_destroy;
+ pc->draw_vbo = etna_pipe_draw_vbo;
+ /* XXX render_condition */
+ /* XXX create_query */
+ /* XXX destroy_query */
+ /* XXX begin_query */
+ /* XXX end_query */
+ /* XXX get_query_result */
+ pc->create_vertex_elements_state = etna_pipe_create_vertex_elements_state;
+ pc->bind_vertex_elements_state = etna_pipe_bind_vertex_elements_state;
+ pc->delete_vertex_elements_state = etna_pipe_delete_vertex_elements_state;
+ pc->set_blend_color = etna_pipe_set_blend_color;
+ pc->set_stencil_ref = etna_pipe_set_stencil_ref;
+ pc->set_sample_mask = etna_pipe_set_sample_mask;
+ pc->set_clip_state = etna_pipe_set_clip_state;
+ pc->set_framebuffer_state = etna_pipe_set_framebuffer_state;
+ pc->set_polygon_stipple = etna_pipe_set_polygon_stipple;
+ pc->set_scissor_states = etna_pipe_set_scissor_states;
+ pc->set_viewport_states = etna_pipe_set_viewport_states;
+ pc->set_vertex_buffers = etna_pipe_set_vertex_buffers;
+ pc->set_index_buffer = etna_pipe_set_index_buffer;
+ /* XXX create_stream_output_target */
+ /* XXX stream_output_target_destroy */
+ /* XXX set_stream_output_targets */
+ pc->flush = etna_pipe_flush;
+ /* XXX create_video_decoder */
+ /* XXX create_video_buffer */
+ /* XXX create_compute_state */
+ /* XXX bind_compute_state */
+ /* XXX delete_compute_state */
+ /* XXX set_compute_resources */
+ /* XXX set_global_binding */
+ /* XXX launch_grid */
+
+ etna_pipe_blend_init(pc);
+ etna_pipe_rasterizer_init(pc);
+ etna_pipe_shader_init(pc);
+ etna_pipe_surface_init(pc);
+ etna_pipe_texture_init(pc);
+ etna_pipe_transfer_init(pc);
+ etna_pipe_zsa_init(pc);
+ etna_pipe_clear_blit_init(pc);
+
+ /* Reset GPU to initial state */
+ reset_context(pc);
+ return pc;
+}
+
diff --git a/src/driver/etna_pipe.h b/src/driver/etna_pipe.h
new file mode 100644
index 0000000..4fec1dc
--- /dev/null
+++ b/src/driver/etna_pipe.h
@@ -0,0 +1,240 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Gallium driver main header file
+ */
+#ifndef H_ETNA_PIPE
+#define H_ETNA_PIPE
+
+#include <stdint.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_rs.h>
+#include <etnaviv/etna_tex.h>
+
+#include "etna_internal.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_format.h"
+#include "pipe/p_shader_tokens.h"
+#include "pipe/p_state.h"
+#include "pipe/p_context.h"
+#include "util/u_slab.h"
+
+struct pipe_screen;
+
+struct etna_shader_input
+{
+ int vs_reg; /* VS input register */
+};
+
+enum etna_varying_special {
+ ETNA_VARYING_VSOUT = 0, /* from VS */
+ ETNA_VARYING_POINTCOORD, /* point texture coord */
+};
+
+struct etna_shader_varying
+{
+ int num_components;
+ enum etna_varying_special special;
+ int pa_attributes;
+ int vs_reg; /* VS output register */
+};
+
+struct etna_resource_level
+{
+ unsigned width, padded_width;
+ unsigned height, padded_height;
+ unsigned offset; /* offset into memory area */
+ unsigned size; /* size of memory area */
+
+ uint32_t address; /* cached GPU pointers to LODs */
+ void *logical; /* cached CPU pointer */
+ uint32_t ts_address;
+ uint32_t ts_size;
+ uint32_t clear_value; /* clear value of resource level (mainly for TS) */
+ uint32_t stride; /* VIVS_PE_(COLOR|DEPTH)_STRIDE */
+ uint32_t layer_stride;
+};
+
+struct etna_resource
+{
+ struct pipe_resource base;
+
+ /* only lod 0 used for non-texture buffers */
+ /* Layout for surface (tiled, multitiled, split tiled, ...) */
+ enum etna_surface_layout layout;
+ /* Horizontal alignment for texture unit (TEXTURE_HALIGN_*) */
+ unsigned halign;
+ struct etna_vidmem *surface; /* Surface video memory */
+ struct etna_vidmem *ts; /* Tile status video memory */
+
+ struct etna_resource_level levels[ETNA_NUM_LOD];
+ struct etna_pipe_context *last_ctx; /* Last bound context */
+};
+
+struct etna_surface
+{
+ struct pipe_surface base;
+
+ enum etna_surface_layout layout;
+ struct etna_resource_level surf;
+ struct compiled_rs_state clear_command;
+ /* Keep pointer to resource level, for fast clear */
+ struct etna_resource_level *level;
+};
+
+struct etna_sampler_view
+{
+ struct pipe_sampler_view base;
+
+ struct compiled_sampler_view *internal;
+};
+
+struct etna_transfer
+{
+ struct pipe_transfer base;
+
+ /* Pointer to buffer (same pointer as returned by transfer_map) */
+ void *buffer;
+ /* If true, transfer happens in-place. buffer is not allocated separately but
+ * points into the actual resource, and thus does not need to be copied or freed.
+ */
+ bool in_place;
+};
+
+/* group all current CSOs, for dirty bits */
+enum
+{
+ ETNA_STATE_BLEND = (1<<1),
+ ETNA_STATE_SAMPLERS = (1<<2),
+ ETNA_STATE_RASTERIZER = (1<<3),
+ ETNA_STATE_DSA = (1<<4),
+ ETNA_STATE_VERTEX_ELEMENTS = (1<<5),
+ ETNA_STATE_BLEND_COLOR = (1<<6),
+ ETNA_STATE_STENCIL_REF = (1<<7),
+ ETNA_STATE_SAMPLE_MASK = (1<<8),
+ ETNA_STATE_VIEWPORT = (1<<9),
+ ETNA_STATE_FRAMEBUFFER = (1<<10),
+ ETNA_STATE_SCISSOR = (1<<11),
+ ETNA_STATE_SAMPLER_VIEWS = (1<<12),
+ ETNA_STATE_VERTEX_BUFFERS = (1<<13),
+ ETNA_STATE_INDEX_BUFFER = (1<<14),
+ ETNA_STATE_SHADER = (1<<15),
+ ETNA_STATE_VS_UNIFORMS = (1<<16),
+ ETNA_STATE_PS_UNIFORMS = (1<<17),
+ ETNA_STATE_TS = (1<<18), /* set after clear and when RS blit operations from other surface affect TS */
+ ETNA_STATE_TEXTURE_CACHES = (1<<19) /* set when texture has been modified/uploaded */
+};
+
+/* private opaque context structure */
+struct etna_pipe_context
+{
+ struct pipe_context base;
+ struct viv_conn *conn;
+ struct etna_ctx *ctx;
+ unsigned dirty_bits;
+ struct etna_pipe_specs specs;
+ struct util_slab_mempool transfer_pool;
+ struct blitter_context *blitter;
+
+ /* compiled bindable state */
+ struct compiled_blend_state blend;
+ unsigned num_vertex_samplers;
+ unsigned num_fragment_samplers;
+ struct compiled_sampler_state sampler[PIPE_MAX_SAMPLERS];
+ struct compiled_rasterizer_state rasterizer;
+ struct compiled_depth_stencil_alpha_state depth_stencil_alpha;
+ struct compiled_vertex_elements_state vertex_elements;
+ struct compiled_shader_state shader_state;
+
+ /* compiled parameter-like state */
+ struct compiled_blend_color blend_color;
+ struct compiled_stencil_ref stencil_ref;
+ struct compiled_sample_mask sample_mask;
+ struct compiled_framebuffer_state framebuffer;
+ struct compiled_scissor_state scissor;
+ struct compiled_viewport_state viewport;
+ unsigned num_fragment_sampler_views;
+ unsigned num_vertex_sampler_views;
+ struct compiled_sampler_view sampler_view[PIPE_MAX_SAMPLERS];
+ struct compiled_set_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
+ struct compiled_set_index_buffer index_buffer;
+
+ /* pointers to the bound state. these are mainly kept around for the blitter. */
+ struct compiled_blend_state *blend_p;
+ struct compiled_sampler_state *sampler_p[PIPE_MAX_SAMPLERS];
+ struct compiled_rasterizer_state *rasterizer_p;
+ struct compiled_depth_stencil_alpha_state *depth_stencil_alpha_p;
+ struct compiled_vertex_elements_state *vertex_elements_p;
+ struct etna_shader_object *vs;
+ struct etna_shader_object *fs;
+
+ /* saved parameter-like state. these are mainly kept around for the blitter. */
+ struct pipe_framebuffer_state framebuffer_s;
+ unsigned sample_mask_s;
+ struct pipe_stencil_ref stencil_ref_s;
+ struct pipe_viewport_state viewport_s;
+ struct pipe_scissor_state scissor_s;
+ struct pipe_sampler_view *sampler_view_s[PIPE_MAX_SAMPLERS];
+ struct pipe_vertex_buffer vertex_buffer_s[PIPE_MAX_ATTRIBS];
+ struct pipe_index_buffer index_buffer_s;
+ struct pipe_constant_buffer vs_cbuf_s;
+ struct pipe_constant_buffer fs_cbuf_s;
+
+ /* cached state of entire GPU */
+ struct etna_3d_state gpu3d;
+};
+
+static INLINE struct etna_pipe_context *
+etna_pipe_context(struct pipe_context *p)
+{
+ return (struct etna_pipe_context *)p;
+}
+
+static INLINE struct etna_resource *
+etna_resource(struct pipe_resource *p)
+{
+ return (struct etna_resource *)p;
+}
+
+static INLINE struct etna_surface *
+etna_surface(struct pipe_surface *p)
+{
+ return (struct etna_surface *)p;
+}
+
+static INLINE struct etna_sampler_view *
+etna_sampler_view(struct pipe_sampler_view *p)
+{
+ return (struct etna_sampler_view *)p;
+}
+
+static INLINE struct etna_transfer *
+etna_transfer(struct pipe_transfer *p)
+{
+ return (struct etna_transfer *)p;
+}
+
+struct pipe_context *etna_new_pipe_context(struct viv_conn *dev, const struct etna_pipe_specs *specs, struct pipe_screen *scr, void *priv);
+
+#endif
+
diff --git a/src/driver/etna_rasterizer.c b/src/driver/etna_rasterizer.c
new file mode 100644
index 0000000..691865a
--- /dev/null
+++ b/src/driver/etna_rasterizer.c
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Rasterizer CSOs */
+#include "etna_rasterizer.h"
+
+#include "etna_internal.h"
+#include "etna_pipe.h"
+#include "etna_translate.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_state.h"
+#include "util/u_memory.h"
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+
+static void *etna_pipe_create_rasterizer_state(struct pipe_context *pipe,
+ const struct pipe_rasterizer_state *rs)
+{
+ //struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct compiled_rasterizer_state *cs = CALLOC_STRUCT(compiled_rasterizer_state);
+ if(rs->fill_front != rs->fill_back)
+ {
+ DBG("Different front and back fill mode not supported");
+ }
+ cs->PA_CONFIG =
+ (rs->flatshade ? VIVS_PA_CONFIG_SHADE_MODEL_FLAT : VIVS_PA_CONFIG_SHADE_MODEL_SMOOTH) |
+ translate_cull_face(rs->cull_face, rs->front_ccw) |
+ translate_polygon_mode(rs->fill_front) |
+ (rs->point_quad_rasterization ? VIVS_PA_CONFIG_POINT_SPRITE_ENABLE : 0) |
+ (rs->point_size_per_vertex ? VIVS_PA_CONFIG_POINT_SIZE_ENABLE : 0);
+ cs->PA_LINE_WIDTH = etna_f32_to_u32(rs->line_width / 2.0f);
+ cs->PA_POINT_SIZE = etna_f32_to_u32(rs->point_size);
+ cs->SE_DEPTH_SCALE = etna_f32_to_u32(rs->offset_scale);
+ cs->SE_DEPTH_BIAS = etna_f32_to_u32(rs->offset_units) / 65535.0f;
+ cs->SE_CONFIG =
+ (rs->line_last_pixel ? VIVS_SE_CONFIG_LAST_PIXEL_ENABLE : 0);
+ /* XXX anything else? */
+ /* XXX bottom_edge_rule */
+ cs->PA_SYSTEM_MODE =
+ (rs->half_pixel_center ? (VIVS_PA_SYSTEM_MODE_UNK0 | VIVS_PA_SYSTEM_MODE_UNK4) : 0);
+ /* rs->scissor overrides the scissor, defaulting to the whole framebuffer, with the scissor state */
+ cs->scissor = rs->scissor;
+ /* point size per vertex adds a vertex shader output */
+ cs->point_size_per_vertex = rs->point_size_per_vertex;
+
+ assert(!rs->clip_halfz); /* could be supported with shader magic, actually D3D z is default on older gc */
+ return cs;
+}
+
+static void etna_pipe_bind_rasterizer_state(struct pipe_context *pipe, void *rs)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ priv->dirty_bits |= ETNA_STATE_RASTERIZER;
+ priv->rasterizer_p = rs;
+ if(rs)
+ priv->rasterizer = *(struct compiled_rasterizer_state*)rs;
+}
+
+static void etna_pipe_delete_rasterizer_state(struct pipe_context *pipe, void *rs)
+{
+ //struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ FREE(rs);
+}
+
+void etna_pipe_rasterizer_init(struct pipe_context *pc)
+{
+ pc->create_rasterizer_state = etna_pipe_create_rasterizer_state;
+ pc->bind_rasterizer_state = etna_pipe_bind_rasterizer_state;
+ pc->delete_rasterizer_state = etna_pipe_delete_rasterizer_state;
+}
+
diff --git a/src/driver/etna_rasterizer.h b/src/driver/etna_rasterizer.h
new file mode 100644
index 0000000..0574391
--- /dev/null
+++ b/src/driver/etna_rasterizer.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Rasterizer CSOs */
+#ifndef H_ETNA_RASTERIZER
+#define H_ETNA_RASTERIZER
+
+struct pipe_context;
+
+void etna_pipe_rasterizer_init(struct pipe_context *pipe);
+
+#endif
+
diff --git a/src/driver/etna_resource.c b/src/driver/etna_resource.c
new file mode 100644
index 0000000..54dac4b
--- /dev/null
+++ b/src/driver/etna_resource.c
@@ -0,0 +1,303 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Resource handling.
+ */
+#include "etna_resource.h"
+
+#include "etna_pipe.h"
+#include "etna_screen.h"
+#include "etna_debug.h"
+#include "etna_translate.h"
+
+#include "util/u_format.h"
+#include "util/u_memory.h"
+#include "util/u_math.h"
+#include "util/u_inlines.h"
+#include "util/u_transfer.h" /* u_default_resource_get_handle */
+
+/* Associate an resource with this context when it is bound in any way
+ * (vertex buffer, index buffer, texture, surface, blit).
+ */
+void etna_resource_touch(struct pipe_context *pipe, struct pipe_resource *resource_)
+{
+ struct etna_pipe_context *ectx = etna_pipe_context(pipe);
+ struct etna_resource *resource = etna_resource(resource_);
+ if(resource == NULL)
+ return;
+ resource->last_ctx = ectx;
+}
+
+bool etna_screen_resource_alloc_ts(struct pipe_screen *screen, struct etna_resource *resource)
+{
+ struct etna_screen *priv = etna_screen(screen);
+ size_t rt_ts_size;
+ assert(!resource->ts);
+ /* TS only for level 0 -- XXX is this formula correct? */
+ rt_ts_size = align(resource->levels[0].size*priv->specs.bits_per_tile/0x80, 0x100);
+ if(rt_ts_size == 0)
+ return true;
+
+ DBG_F(ETNA_DBG_RESOURCE_MSGS, "%p: Allocating tile status of size %i", resource, rt_ts_size);
+ struct etna_vidmem *rt_ts = 0;
+ if(unlikely(etna_vidmem_alloc_linear(priv->dev, &rt_ts, rt_ts_size, VIV_SURF_TILE_STATUS, VIV_POOL_DEFAULT, true)!=ETNA_OK))
+ {
+ BUG("Problem allocating tile status for resource");
+ return false;
+ }
+ resource->ts = rt_ts;
+ resource->levels[0].ts_address = resource->ts->address;
+ resource->levels[0].ts_size = resource->ts->size;
+ /* It is important to initialize the TS, as random pattern
+ * can result in crashes. Do this on the CPU as this only happens once
+ * per surface anyway and it's a small area, so it may not be worth
+ * queuing this to the GPU.
+ */
+ memset(rt_ts->logical, priv->specs.ts_clear_value, rt_ts_size);
+ return true;
+}
+
+
+static boolean etna_screen_can_create_resource(struct pipe_screen *pscreen,
+ const struct pipe_resource *templat)
+{
+ struct etna_screen *screen = etna_screen(pscreen);
+ if(!translate_samples_to_xyscale(templat->nr_samples, NULL, NULL, NULL))
+ return false;
+ if(templat->bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL | PIPE_BIND_SAMPLER_VIEW))
+ {
+ uint max_size = (templat->bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL)) ?
+ screen->specs.max_rendertarget_size :
+ screen->specs.max_texture_size;
+ if(templat->width0 > max_size || templat->height0 > max_size)
+ return false;
+ }
+ return true;
+}
+
+static struct pipe_resource * etna_screen_resource_from_handle(struct pipe_screen *screen,
+ const struct pipe_resource *templat,
+ struct winsys_handle *handle)
+{
+ DBG("unimplemented etna_screen_resource_from_handle");
+ return NULL;
+}
+
+/* Allocate 2D texture or render target resource
+ */
+static struct pipe_resource * etna_screen_resource_create(struct pipe_screen *screen,
+ const struct pipe_resource *templat)
+{
+ struct etna_screen *priv = etna_screen(screen);
+ assert(templat);
+ unsigned element_size = util_format_get_blocksize(templat->format);
+ if(!element_size)
+ return NULL;
+
+ /* Check input */
+ if(templat->target == PIPE_TEXTURE_CUBE)
+ {
+ assert(templat->array_size == 6);
+ } else if (templat->target == PIPE_BUFFER)
+ {
+ assert(templat->format == PIPE_FORMAT_R8_UNORM); /* bytes; want TYPELESS or similar */
+ assert(templat->array_size == 1);
+ assert(templat->height0 == 1);
+ assert(templat->depth0 == 1);
+ assert(templat->array_size == 1);
+ assert(templat->last_level == 0);
+ } else
+ {
+ assert(templat->array_size == 1);
+ }
+ assert(templat->width0 != 0);
+ assert(templat->height0 != 0);
+ assert(templat->depth0 != 0);
+ assert(templat->array_size != 0);
+
+ /* Figure out what tiling to use -- for now, assume that textures cannot be supertiled, and cannot be linear.
+ * There is a feature flag SUPERTILED_TEXTURE (not supported on any known hw) that may allow this, as well
+ * as LINEAR_TEXTURE_SUPPORT (supported on gc880 and gc2000 at least), but not sure how it works.
+ * Buffers always have LINEAR layout.
+ */
+ unsigned layout = ETNA_LAYOUT_LINEAR;
+ if(templat->target != PIPE_BUFFER)
+ {
+ if(!(templat->bind & PIPE_BIND_SAMPLER_VIEW) && priv->specs.can_supertile &&
+ !DBG_ENABLED(ETNA_DBG_NO_SUPERTILE))
+ layout = ETNA_LAYOUT_SUPER_TILED;
+ else
+ layout = ETNA_LAYOUT_TILED;
+ }
+ /* XXX multi tiled formats */
+
+ /* Determine scaling for antialiasing, allow override using debug flag */
+ int nr_samples = templat->nr_samples;
+ if((templat->bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL)) &&
+ !(templat->bind & PIPE_BIND_SAMPLER_VIEW))
+ {
+ if(DBG_ENABLED(ETNA_DBG_MSAA_2X))
+ nr_samples = 2;
+ if(DBG_ENABLED(ETNA_DBG_MSAA_4X))
+ nr_samples = 4;
+ }
+ int msaa_xscale = 1, msaa_yscale = 1;
+ if(!translate_samples_to_xyscale(nr_samples, &msaa_xscale, &msaa_yscale, NULL))
+ {
+ /* Number of samples not supported */
+ assert(0);
+ }
+
+ /* Determine needed padding (alignment of height/width) */
+ unsigned paddingX = 0, paddingY = 0;
+ unsigned halign = TEXTURE_HALIGN_FOUR;
+ etna_layout_multiple(layout,
+ priv->dev->chip.pixel_pipes,
+ (templat->bind & PIPE_BIND_SAMPLER_VIEW) && !VIV_FEATURE(priv->dev, chipMinorFeatures1, TEXTURE_HALIGN),
+ &paddingX, &paddingY, &halign);
+ assert(paddingX && paddingY);
+
+ /* determine mipmap levels */
+ struct etna_resource *resource = CALLOC_STRUCT(etna_resource);
+ int max_mip_level = templat->last_level;
+ if(unlikely(max_mip_level >= ETNA_NUM_LOD)) /* max LOD supported by hw */
+ max_mip_level = ETNA_NUM_LOD - 1;
+
+ /* take care about DXTx formats, which have a divSize of non-1x1
+ * also: lower mipmaps are still 4x4 due to tiling. In as sense, compressed formats are already tiled.
+ * XXX UYVY formats?
+ */
+ unsigned divSizeX = util_format_get_blockwidth(templat->format);
+ unsigned divSizeY = util_format_get_blockheight(templat->format);
+ unsigned ix = 0;
+ unsigned x = templat->width0, y = templat->height0;
+ unsigned offset = 0;
+ while(true)
+ {
+ struct etna_resource_level *mip = &resource->levels[ix];
+ mip->width = x;
+ mip->height = y;
+ mip->padded_width = align(x * msaa_xscale, paddingX);
+ mip->padded_height = align(y * msaa_yscale, paddingY);
+ mip->stride = align(mip->padded_width, divSizeX)/divSizeX * element_size;
+ mip->offset = offset;
+ mip->layer_stride = align(mip->padded_width, divSizeX)/divSizeX *
+ align(mip->padded_height, divSizeY)/divSizeY * element_size;
+ mip->size = templat->array_size * mip->layer_stride;
+ offset += align(mip->size, ETNA_PE_ALIGNMENT); /* align mipmaps to 64 bytes to be able to render to them */
+ if(ix == max_mip_level || (x == 1 && y == 1))
+ break; // stop at last level
+ x = MAX2(x >> 1, 1);
+ y = MAX2(y >> 1, 1);
+ ix += 1;
+ }
+
+ /* Determine memory size, and whether to create a tile status */
+ size_t rt_size = offset;
+
+ /* determine memory type */
+ enum viv_surf_type memtype = VIV_SURF_UNKNOWN;
+ if(templat->bind & PIPE_BIND_SAMPLER_VIEW)
+ memtype = VIV_SURF_TEXTURE;
+ else if(templat->bind & PIPE_BIND_RENDER_TARGET)
+ memtype = VIV_SURF_RENDER_TARGET;
+ else if(templat->bind & PIPE_BIND_DEPTH_STENCIL)
+ memtype = VIV_SURF_DEPTH;
+ else if(templat->bind & PIPE_BIND_INDEX_BUFFER)
+ memtype = VIV_SURF_INDEX;
+ else if(templat->bind & PIPE_BIND_VERTEX_BUFFER)
+ memtype = VIV_SURF_VERTEX;
+
+ DBG_F(ETNA_DBG_RESOURCE_MSGS, "%p: Allocate surface of %ix%i (padded to %ix%i) of format %s (%i bpe %ix%i), size %08x flags %08x, memtype %i",
+ resource,
+ templat->width0, templat->height0, resource->levels[0].padded_width, resource->levels[0].padded_height, util_format_name(templat->format),
+ element_size, divSizeX, divSizeY, rt_size, templat->bind, memtype);
+
+ struct etna_vidmem *rt = 0;
+ if(unlikely(etna_vidmem_alloc_linear(priv->dev, &rt, rt_size, memtype, VIV_POOL_DEFAULT, true) != ETNA_OK))
+ {
+ BUG("Problem allocating video memory for resource");
+ return NULL;
+ }
+
+ resource->base = *templat;
+ resource->base.last_level = ix; /* real last mipmap level */
+ resource->base.screen = screen;
+ resource->base.nr_samples = nr_samples;
+ resource->layout = layout;
+ resource->halign = halign;
+ resource->surface = rt;
+ resource->ts = 0; /* TS is only created when first bound to surface */
+ pipe_reference_init(&resource->base.reference, 1);
+
+ if(DBG_ENABLED(ETNA_DBG_ZERO))
+ {
+ memset(resource->surface->logical, 0, rt_size);
+ }
+
+ for(unsigned ix=0; ix<=resource->base.last_level; ++ix)
+ {
+ struct etna_resource_level *mip = &resource->levels[ix];
+ mip->address = resource->surface->address + mip->offset;
+ mip->logical = resource->surface->logical + mip->offset;
+ DBG_F(ETNA_DBG_RESOURCE_MSGS, " %08x level %i: %ix%i (%i) stride=%i layer_stride=%i",
+ (int)mip->address, ix, (int)mip->width, (int)mip->height, (int)mip->size,
+ (int)mip->stride, (int)mip->layer_stride);
+ }
+
+ return &resource->base;
+}
+
+static void etna_screen_resource_destroy(struct pipe_screen *screen,
+ struct pipe_resource *resource_)
+{
+ struct etna_screen *priv = etna_screen(screen);
+ struct etna_resource *resource = etna_resource(resource_);
+ if(resource == NULL)
+ return;
+ if(resource->last_ctx != NULL)
+ {
+ /* XXX This could fail when multiple contexts share this resource,
+ * (the last one to bind it will "own" it) or fail miserably if
+ * the context was since destroyed.
+ */
+ struct etna_pipe_context *ectx = resource->last_ctx;
+ DBG_F(ETNA_DBG_RESOURCE_MSGS, "%p: resource queued destroyed (%ix%ix%i)", resource, resource_->width0, resource_->height0, resource_->depth0);
+ etna_vidmem_queue_free(ectx->ctx->queue, resource->surface);
+ etna_vidmem_queue_free(ectx->ctx->queue, resource->ts);
+ } else {
+ DBG_F(ETNA_DBG_RESOURCE_MSGS, "%p: resource destroyed (%ix%ix%i)", resource, resource_->width0, resource_->height0, resource_->depth0);
+ etna_vidmem_free(priv->dev, resource->surface);
+ etna_vidmem_free(priv->dev, resource->ts);
+ }
+ FREE(resource);
+}
+
+void etna_screen_resource_init(struct pipe_screen *pscreen)
+{
+ pscreen->can_create_resource = etna_screen_can_create_resource;
+ pscreen->resource_create = etna_screen_resource_create;
+ pscreen->resource_from_handle = etna_screen_resource_from_handle;
+ pscreen->resource_get_handle = u_default_resource_get_handle;
+ pscreen->resource_destroy = etna_screen_resource_destroy;
+}
+
diff --git a/src/driver/etna_resource.h b/src/driver/etna_resource.h
new file mode 100644
index 0000000..d45fe55
--- /dev/null
+++ b/src/driver/etna_resource.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Resource handling.
+ */
+#ifndef H_ETNA_RESOURCE
+#define H_ETNA_RESOURCE
+
+#include "pipe/p_state.h"
+
+struct pipe_screen;
+struct etna_resource;
+
+void etna_resource_touch(struct pipe_context *pipe, struct pipe_resource *resource_);
+
+/* Allocate Tile Status for an etna resource.
+ * Tile status is a cache of the clear status per tile. This means a smaller surface
+ * has to be cleared which is faster. This is also called "fast clear".
+ */
+bool etna_screen_resource_alloc_ts(struct pipe_screen *screen, struct etna_resource *resource);
+
+void etna_screen_resource_init(struct pipe_screen *screen);
+
+#endif
+
diff --git a/src/driver/etna_screen.c b/src/driver/etna_screen.c
new file mode 100644
index 0000000..bfe2c27
--- /dev/null
+++ b/src/driver/etna_screen.c
@@ -0,0 +1,579 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#include "etna_screen.h"
+#include "etna_pipe.h"
+#include "etna_compiler.h"
+#include "etna_translate.h"
+#include "etna_debug.h"
+#include "etna_fence.h"
+#include "etna_resource.h"
+
+#include <etnaviv/etna_rs.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_util.h>
+
+#include "util/u_memory.h"
+#include "util/u_format.h"
+#include "util/u_transfer.h"
+#include "util/u_math.h"
+#include "util/u_inlines.h"
+
+#include <stdio.h>
+
+uint32_t etna_mesa_debug = 0;
+
+/* Set debug flags from ETNA_DEBUG environment variable */
+static void etna_set_debug_flags(const char *str)
+{
+ struct option {
+ const char *name;
+ uint32_t flag;
+ };
+ static const struct option opts[] = {
+ { "dbg_msgs", ETNA_DBG_MSGS },
+ { "frame_msgs", ETNA_DBG_FRAME_MSGS },
+ { "resource_msgs", ETNA_DBG_RESOURCE_MSGS },
+ { "compiler_msgs", ETNA_DBG_COMPILER_MSGS },
+ { "linker_msgs", ETNA_DBG_LINKER_MSGS },
+ { "dump_shaders", ETNA_DBG_DUMP_SHADERS },
+ { "no_ts", ETNA_DBG_NO_TS },
+ { "no_autodisable", ETNA_DBG_NO_AUTODISABLE },
+ { "no_supertile", ETNA_DBG_NO_SUPERTILE },
+ { "no_early_z", ETNA_DBG_NO_EARLY_Z },
+ { "cflush_all", ETNA_DBG_CFLUSH_ALL },
+ { "msaa2x", ETNA_DBG_MSAA_2X },
+ { "msaa4x", ETNA_DBG_MSAA_4X },
+ { "finish_all", ETNA_DBG_FINISH_ALL },
+ { "flush_all", ETNA_DBG_FLUSH_ALL },
+ { "zero", ETNA_DBG_ZERO }
+ };
+ int i;
+
+ if (!str)
+ return;
+
+ for (i = 0; i < Elements(opts); i++) {
+ if (strstr(str, opts[i].name))
+ etna_mesa_debug |= opts[i].flag;
+ }
+}
+
+static void etna_screen_destroy( struct pipe_screen *screen )
+{
+ struct etna_screen *priv = etna_screen(screen);
+ etna_screen_destroy_fences(screen);
+ pipe_mutex_destroy(priv->fence_mutex);
+ FREE(screen);
+}
+
+static const char *etna_screen_get_name( struct pipe_screen *screen )
+{
+ struct etna_screen *priv = etna_screen(screen);
+ return priv->name;
+}
+
+static const char *etna_screen_get_vendor( struct pipe_screen *screen )
+{
+ return "etnaviv";
+}
+
+static int etna_screen_get_param( struct pipe_screen *screen, enum pipe_cap param )
+{
+ struct etna_screen *priv = etna_screen(screen);
+ switch (param) {
+ /* Supported features (boolean caps). */
+ case PIPE_CAP_TWO_SIDED_STENCIL:
+ case PIPE_CAP_ANISOTROPIC_FILTER:
+ case PIPE_CAP_POINT_SPRITE:
+ case PIPE_CAP_TEXTURE_SHADOW_MAP:
+ case PIPE_CAP_BLEND_EQUATION_SEPARATE:
+ case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT: /* FS coordinates start in upper left */
+ case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER: /* Pixel center on 0.5 */
+ case PIPE_CAP_SM3:
+ case PIPE_CAP_SEAMLESS_CUBE_MAP: /* ??? */
+ case PIPE_CAP_TEXTURE_BARRIER:
+ case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
+ case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
+ case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
+ case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
+ case PIPE_CAP_USER_CONSTANT_BUFFERS: /* constant buffers can be user buffers; they end up in command stream anyway */
+ case PIPE_CAP_TGSI_TEXCOORD: /* explicit TEXCOORD and POINTCOORD semantics */
+ return 1;
+
+ /* Memory */
+ case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
+ return 256;
+ case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
+ return 4; /* XXX could easily be supported */
+ case PIPE_CAP_GLSL_FEATURE_LEVEL:
+ return 120;
+
+ case PIPE_CAP_NPOT_TEXTURES: /* MUST be supported with GLES 2.0: what the capability specifies is filtering support */
+ return true; /* VIV_FEATURE(priv->dev, chipMinorFeatures1, NON_POWER_OF_TWO); */
+
+ case PIPE_CAP_MAX_VERTEX_BUFFERS:
+ return priv->specs.stream_count;
+ case PIPE_CAP_ENDIANNESS:
+ return PIPE_ENDIAN_LITTLE; /* on most Viv hw this is configurable (feature ENDIANNESS_CONFIG) */
+
+ /* Unsupported features. */
+ case PIPE_CAP_TEXTURE_SWIZZLE: /* XXX supported on gc2000 */
+ case PIPE_CAP_COMPUTE: /* XXX supported on gc2000 */
+ case PIPE_CAP_MIXED_COLORBUFFER_FORMATS: /* only one colorbuffer supported, so mixing makes no sense */
+ case PIPE_CAP_PRIMITIVE_RESTART: /* primitive restart index AFAIK not supported */
+ case PIPE_CAP_VERTEX_COLOR_UNCLAMPED: /* no floating point buffer support */
+ case PIPE_CAP_CONDITIONAL_RENDER: /* no occlusion queries */
+ case PIPE_CAP_TGSI_INSTANCEID: /* no idea, really */
+ case PIPE_CAP_START_INSTANCE: /* instancing not supported AFAIK */
+ case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR: /* instancing not supported AFAIK */
+ case PIPE_CAP_SHADER_STENCIL_EXPORT: /* Fragment shader cannot export stencil value */
+ case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS: /* no dual-source supported */
+ case PIPE_CAP_TEXTURE_MULTISAMPLE: /* no texture multisample */
+ case PIPE_CAP_TEXTURE_MIRROR_CLAMP: /* only mirrored repeat */
+ case PIPE_CAP_INDEP_BLEND_ENABLE:
+ case PIPE_CAP_INDEP_BLEND_FUNC:
+ case PIPE_CAP_DEPTH_CLIP_DISABLE:
+ case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
+ case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
+ case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
+ case PIPE_CAP_SCALED_RESOLVE: /* Should be possible to support */
+ case PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS: /* Don't skip strict max uniform limit check */
+ case PIPE_CAP_FRAGMENT_COLOR_CLAMPED:
+ case PIPE_CAP_VERTEX_COLOR_CLAMPED:
+ case PIPE_CAP_USER_VERTEX_BUFFERS:
+ case PIPE_CAP_USER_INDEX_BUFFERS:
+ case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
+ return 0;
+
+ /* Stream output. */
+ case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
+ case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
+ case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
+ case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
+ return 0;
+
+ /* Texturing. */
+ case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
+ case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
+ return 14;
+ case PIPE_CAP_MAX_TEXTURE_3D_LEVELS: /* 3D textures not supported */
+ return 0;
+ case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
+ return 0;
+ case PIPE_CAP_MAX_COMBINED_SAMPLERS:
+ return priv->specs.fragment_sampler_count + priv->specs.vertex_sampler_count;
+ case PIPE_CAP_CUBE_MAP_ARRAY:
+ return 0;
+ case PIPE_CAP_MIN_TEXEL_OFFSET:
+ return -8;
+ case PIPE_CAP_MAX_TEXEL_OFFSET:
+ return 7;
+ case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
+ return 0;
+ case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
+ return 65536;
+
+ /* Render targets. */
+ case PIPE_CAP_MAX_RENDER_TARGETS:
+ return 1;
+
+ /* Viewports and scissors. */
+ case PIPE_CAP_MAX_VIEWPORTS:
+ return 1;
+
+ /* Timer queries. */
+ case PIPE_CAP_QUERY_TIME_ELAPSED:
+ case PIPE_CAP_OCCLUSION_QUERY:
+ case PIPE_CAP_QUERY_TIMESTAMP:
+ return 0;
+ case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
+ return 0;
+
+ /* Preferences */
+ case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
+ return 0;
+
+ default:
+ DBG("unknown param %d", param);
+ return 0;
+ }
+}
+
+static float etna_screen_get_paramf( struct pipe_screen *screen, enum pipe_capf param )
+{
+ switch (param) {
+ case PIPE_CAPF_MAX_LINE_WIDTH:
+ case PIPE_CAPF_MAX_LINE_WIDTH_AA:
+ case PIPE_CAPF_MAX_POINT_WIDTH:
+ case PIPE_CAPF_MAX_POINT_WIDTH_AA:
+ return 8192.0f;
+ case PIPE_CAPF_MAX_TEXTURE_ANISOTROPY:
+ return 16.0f;
+ case PIPE_CAPF_MAX_TEXTURE_LOD_BIAS:
+ return 16.0f;
+ case PIPE_CAPF_GUARD_BAND_LEFT:
+ case PIPE_CAPF_GUARD_BAND_TOP:
+ case PIPE_CAPF_GUARD_BAND_RIGHT:
+ case PIPE_CAPF_GUARD_BAND_BOTTOM:
+ return 0.0f;
+ default:
+ DBG("unknown paramf %d", param);
+ return 0;
+ }
+}
+
+static int etna_screen_get_shader_param( struct pipe_screen *screen, unsigned shader, enum pipe_shader_cap param )
+{
+ struct etna_screen *priv = etna_screen(screen);
+ switch(shader)
+ {
+ case PIPE_SHADER_FRAGMENT:
+ case PIPE_SHADER_VERTEX:
+ break;
+ case PIPE_SHADER_COMPUTE:
+ case PIPE_SHADER_GEOMETRY:
+ /* maybe we could emulate.. */
+ return 0;
+ default:
+ DBG("unknown shader type %d", shader);
+ return 0;
+ }
+
+ switch (param) {
+ case PIPE_SHADER_CAP_MAX_INSTRUCTIONS:
+ case PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS:
+ case PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS:
+ case PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS:
+ return ETNA_MAX_TOKENS;
+ case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH:
+ return ETNA_MAX_DEPTH; /* XXX */
+ case PIPE_SHADER_CAP_MAX_INPUTS:
+ return 16; /* XXX this amount is reserved */
+ case PIPE_SHADER_CAP_MAX_TEMPS:
+ return 64; /* Max native temporaries. */
+ case PIPE_SHADER_CAP_MAX_ADDRS:
+ return 1; /* Max native address registers */
+ case PIPE_SHADER_CAP_MAX_CONSTS:
+ /* Absolute maximum on ideal hardware is 256 (as that's how much register space is reserved);
+ * immediates are included in here, so actual space available for constants will always be less.
+ * Also the amount of registers really available depends on the hw.
+ * XXX see also: viv_specs.num_constants, if this is 0 we need to come up with some default value.
+ */
+ return 256;
+ case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
+ return 1;
+ case PIPE_SHADER_CAP_MAX_PREDS:
+ return 0; /* nothing uses this */
+ case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED:
+ return 1;
+ case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR:
+ case PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR:
+ case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR:
+ case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR:
+ return 1;
+ case PIPE_SHADER_CAP_SUBROUTINES:
+ return 0;
+ case PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED:
+ return VIV_FEATURE(priv->dev, chipMinorFeatures0, HAS_SQRT_TRIG);
+ case PIPE_SHADER_CAP_TGSI_POW_SUPPORTED:
+ return false;
+ case PIPE_SHADER_CAP_TGSI_LRP_SUPPORTED:
+ return false;
+ case PIPE_SHADER_CAP_INTEGERS: /* XXX supported on gc2000 but not yet implemented */
+ return 0;
+ case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
+ return shader==PIPE_SHADER_FRAGMENT ? priv->specs.fragment_sampler_count :
+ priv->specs.vertex_sampler_count;
+ case PIPE_SHADER_CAP_PREFERRED_IR:
+ return PIPE_SHADER_IR_TGSI;
+ default:
+ DBG("unknown shader param %d", param);
+ return 0;
+ }
+ return 0;
+}
+
+static int etna_screen_get_video_param( struct pipe_screen *screen,
+ enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
+ enum pipe_video_cap param )
+{
+ DBG("unimplemented etna_screen_get_video_param");
+ return 0;
+}
+
+static int etna_screen_get_compute_param(struct pipe_screen *screen,
+ enum pipe_compute_cap param,
+ void *ret)
+{
+ DBG("unimplemented etna_screen_get_compute_param");
+ return 0;
+}
+
+static uint64_t etna_screen_get_timestamp(struct pipe_screen *screen)
+{
+ DBG("unimplemented etna_screen_get_timestamp");
+ return 0;
+}
+
+static struct pipe_context * etna_screen_context_create( struct pipe_screen *screen,
+ void *priv )
+{
+ struct etna_screen *es = etna_screen(screen);
+ struct pipe_context *ctx = etna_new_pipe_context(es->dev, &es->specs, screen, priv);
+ return ctx;
+}
+
+static boolean etna_screen_is_format_supported( struct pipe_screen *screen,
+ enum pipe_format format,
+ enum pipe_texture_target target,
+ unsigned sample_count,
+ unsigned usage)
+{
+ struct etna_screen *priv = etna_screen(screen);
+ unsigned allowed = 0;
+ if (target >= PIPE_MAX_TEXTURE_TYPES)
+ {
+ return FALSE;
+ }
+
+ if (usage & PIPE_BIND_RENDER_TARGET)
+ {
+ /* if render target, must be RS-supported format */
+ if(translate_rt_format(format, true) != ETNA_NO_MATCH)
+ {
+ /* Validate MSAA; number of samples must be allowed, and render target must have
+ * MSAA'able format.
+ */
+ if(sample_count > 1)
+ {
+ if(translate_samples_to_xyscale(sample_count, NULL, NULL, NULL) &&
+ translate_msaa_format(format, true) != ETNA_NO_MATCH)
+ {
+ allowed |= PIPE_BIND_RENDER_TARGET;
+ }
+ } else {
+ allowed |= PIPE_BIND_RENDER_TARGET;
+ }
+ }
+ }
+ if (usage & PIPE_BIND_DEPTH_STENCIL)
+ {
+ /* must be supported depth format */
+ if(translate_depth_format(format, true) != ETNA_NO_MATCH)
+ {
+ allowed |= PIPE_BIND_DEPTH_STENCIL;
+ }
+ }
+ if (usage & PIPE_BIND_SAMPLER_VIEW)
+ {
+ /* must be supported texture format */
+ if(sample_count < 2 && translate_texture_format(format, true) != ETNA_NO_MATCH)
+ {
+ allowed |= PIPE_BIND_SAMPLER_VIEW;
+ }
+ }
+ if (usage & PIPE_BIND_VERTEX_BUFFER)
+ {
+ /* must be supported vertex format */
+ if(translate_vertex_format_type(format, true) == ETNA_NO_MATCH)
+ {
+ allowed |= PIPE_BIND_VERTEX_BUFFER;
+ }
+ }
+ if (usage & PIPE_BIND_INDEX_BUFFER)
+ {
+ /* must be supported index format */
+ if(format == PIPE_FORMAT_I8_UINT ||
+ format == PIPE_FORMAT_I16_UINT ||
+ (format == PIPE_FORMAT_I32_UINT && VIV_FEATURE(priv->dev, chipFeatures, 32_BIT_INDICES)))
+ {
+ allowed |= PIPE_BIND_INDEX_BUFFER;
+ }
+ }
+ /* Always allowed */
+ allowed |= usage & (PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_SCANOUT |
+ PIPE_BIND_SHARED | PIPE_BIND_TRANSFER_READ | PIPE_BIND_TRANSFER_WRITE);
+
+ return usage == allowed;
+}
+
+static boolean etna_screen_is_video_format_supported( struct pipe_screen *screen,
+ enum pipe_format format,
+ enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint )
+{
+ DBG("unimplemented etna_screen_is_video_format_supported");
+ return false;
+}
+
+/* XXX this should use a blit or resource copy, when implemented, instead
+ * of programming the RS directly.
+ */
+static void etna_screen_flush_frontbuffer( struct pipe_screen *screen,
+ struct pipe_resource *resource,
+ unsigned level, unsigned layer,
+ void *winsys_drawable_handle )
+{
+ struct etna_rs_target *drawable = (struct etna_rs_target *)winsys_drawable_handle;
+ struct etna_resource *rt_resource = etna_resource(resource);
+ struct etna_pipe_context *ectx = rt_resource->last_ctx;
+ struct pipe_fence_handle **fence = 0;
+ assert(level <= resource->last_level && layer < resource->array_size);
+ assert(ectx);
+ struct etna_ctx *ctx = ectx->ctx;
+
+ /* release previous fence, make reference to fence if we need one */
+ screen->fence_reference(screen, &drawable->fence, NULL);
+ if(drawable->want_fence)
+ fence = &drawable->fence;
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_stall(ctx, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
+
+ /* Set up color TS to source surface before blit, if needed */
+ if(rt_resource->levels[level].ts_address != ectx->gpu3d.TS_COLOR_STATUS_BASE)
+ {
+ if(rt_resource->levels[level].ts_address)
+ {
+ etna_set_state_multi(ctx, VIVS_TS_MEM_CONFIG, 4, (uint32_t[]) {
+ ectx->gpu3d.TS_MEM_CONFIG = VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR, /* XXX |= VIVS_TS_MEM_CONFIG_MSAA | translate_msaa_format(cbuf->format) */
+ ectx->gpu3d.TS_COLOR_STATUS_BASE = rt_resource->levels[level].ts_address,
+ ectx->gpu3d.TS_COLOR_SURFACE_BASE = rt_resource->levels[level].address,
+ ectx->gpu3d.TS_COLOR_CLEAR_VALUE = rt_resource->levels[level].clear_value
+ });
+ } else {
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG, 0x00000000);
+ ectx->gpu3d.TS_MEM_CONFIG = 0;
+ }
+ ectx->dirty_bits |= ETNA_STATE_TS;
+ }
+
+ int msaa_xscale=1, msaa_yscale=1;
+ if(!translate_samples_to_xyscale(resource->nr_samples, &msaa_xscale, &msaa_yscale, NULL))
+ return;
+
+ /* Kick off RS here */
+ struct compiled_rs_state copy_to_screen;
+ etna_compile_rs_state(&copy_to_screen, &(struct rs_state){
+ .source_format = translate_rt_format(rt_resource->base.format, false),
+ .source_tiling = rt_resource->layout,
+ .source_addr = rt_resource->levels[level].address,
+ .source_stride = rt_resource->levels[level].stride,
+ .dest_format = drawable->rs_format,
+ .dest_tiling = ETNA_LAYOUT_LINEAR,
+ .dest_addr = drawable->addr,
+ .dest_stride = drawable->stride,
+ .downsample_x = msaa_xscale > 1,
+ .downsample_y = msaa_yscale > 1,
+ .swap_rb = drawable->swap_rb,
+ .dither = {0xffffffff, 0xffffffff}, // XXX dither when going from 24 to 16 bit?
+ .clear_mode = VIVS_RS_CLEAR_CONTROL_MODE_DISABLED,
+ .width = drawable->width * msaa_xscale,
+ .height = drawable->height * msaa_yscale
+ });
+ etna_submit_rs_state(ctx, &copy_to_screen);
+ DBG_F(ETNA_DBG_FRAME_MSGS,
+ "Queued RS command to flush screen from %08x to %08x stride=%08x width=%i height=%i, ctx %p",
+ rt_resource->levels[0].address,
+ drawable->addr, drawable->stride,
+ drawable->width, drawable->height, ctx);
+ ectx->base.flush(&ectx->base, fence, 0);
+}
+
+struct pipe_screen *
+etna_screen_create(struct viv_conn *dev)
+{
+ struct etna_screen *screen = CALLOC_STRUCT(etna_screen);
+ struct pipe_screen *pscreen = &screen->base;
+ screen->dev = dev;
+
+ etna_set_debug_flags(getenv("ETNA_DEBUG"));
+
+ /* Set up driver identification */
+ snprintf(screen->name, ETNA_SCREEN_NAME_LEN, "Vivante GC%x rev %04x, %s",
+ dev->chip.chip_model, dev->chip.chip_revision, dev->kernel_driver.name);
+
+ /* Determine specs for device */
+ screen->specs.can_supertile = VIV_FEATURE(dev, chipMinorFeatures0, SUPER_TILED);
+ screen->specs.bits_per_tile = VIV_FEATURE(dev, chipMinorFeatures0, 2BITPERTILE)?2:4;
+ screen->specs.ts_clear_value = VIV_FEATURE(dev, chipMinorFeatures0, 2BITPERTILE)?0x55555555:0x11111111;
+ screen->specs.vertex_sampler_offset = 8; /* vertex and fragment samplers live in one address space, with vertex shaders at this offset */
+ screen->specs.fragment_sampler_count = 8;
+ screen->specs.vertex_sampler_count = 4;
+ screen->specs.vs_need_z_div = dev->chip.chip_model < 0x1000 && dev->chip.chip_model != 0x880;
+ screen->specs.vertex_output_buffer_size = dev->chip.vertex_output_buffer_size;
+ screen->specs.vertex_cache_size = dev->chip.vertex_cache_size;
+ screen->specs.shader_core_count = dev->chip.shader_core_count;
+ screen->specs.stream_count = dev->chip.stream_count;
+ screen->specs.has_sin_cos_sqrt = VIV_FEATURE(dev, chipMinorFeatures0, HAS_SQRT_TRIG);
+ screen->specs.has_shader_range_registers = dev->chip.chip_model >= 0x1000 || dev->chip.chip_model == 0x880;
+ screen->specs.npot_tex_any_wrap = VIV_FEATURE(dev, chipMinorFeatures1, NON_POWER_OF_TWO);
+ if (dev->chip.instruction_count > 256) /* unified instruction memory? */
+ {
+ screen->specs.vs_offset = 0xC000;
+ screen->specs.ps_offset = 0xD000; //like vivante driver
+ screen->specs.max_instructions = 256;
+ } else {
+ screen->specs.vs_offset = 0x4000;
+ screen->specs.ps_offset = 0x6000;
+ screen->specs.max_instructions = dev->chip.instruction_count/2;
+ }
+ screen->specs.max_varyings = dev->chip.varyings_count;
+ screen->specs.max_registers = dev->chip.register_max;
+ if (dev->chip.chip_model < chipModel_GC4000) /* from QueryShaderCaps in kernel driver */
+ {
+ screen->specs.max_vs_uniforms = 168;
+ screen->specs.max_ps_uniforms = 64;
+ } else {
+ screen->specs.max_vs_uniforms = 256;
+ screen->specs.max_ps_uniforms = 256;
+ }
+
+ screen->specs.max_texture_size = VIV_FEATURE(dev, chipMinorFeatures0, TEXTURE_8K)?8192:4096;
+ screen->specs.max_rendertarget_size = VIV_FEATURE(dev, chipMinorFeatures0, RENDERTARGET_8K)?8192:4096;
+
+ /* Initialize vtable */
+ pscreen->destroy = etna_screen_destroy;
+ pscreen->get_name = etna_screen_get_name;
+ pscreen->get_vendor = etna_screen_get_vendor;
+ pscreen->get_param = etna_screen_get_param;
+ pscreen->get_paramf = etna_screen_get_paramf;
+ pscreen->get_shader_param = etna_screen_get_shader_param;
+ pscreen->get_video_param = etna_screen_get_video_param;
+ pscreen->get_compute_param = etna_screen_get_compute_param;
+ pscreen->get_timestamp = etna_screen_get_timestamp;
+ pscreen->context_create = etna_screen_context_create;
+ pscreen->is_format_supported = etna_screen_is_format_supported;
+ pscreen->is_video_format_supported = etna_screen_is_video_format_supported;
+ pscreen->flush_frontbuffer = etna_screen_flush_frontbuffer;
+
+ etna_screen_fence_init(pscreen);
+ etna_screen_resource_init(pscreen);
+
+ pipe_mutex_init(screen->fence_mutex);
+
+ return pscreen;
+}
+
diff --git a/src/driver/etna_screen.h b/src/driver/etna_screen.h
new file mode 100644
index 0000000..75a88ec
--- /dev/null
+++ b/src/driver/etna_screen.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#ifndef ETNA_SCREEN_H_
+#define ETNA_SCREEN_H_
+
+#include "etna_internal.h"
+
+#include "pipe/p_screen.h"
+#include "os/os_thread.h"
+
+struct viv_conn;
+
+#define ETNA_SCREEN_NAME_LEN (64)
+/* Gallium screen structure for etna driver.
+ */
+struct etna_screen {
+ struct pipe_screen base;
+ char name[ETNA_SCREEN_NAME_LEN];
+ struct viv_conn *dev;
+ struct etna_pipe_specs specs;
+
+ pipe_mutex fence_mutex;
+ struct etna_fence *fence_freelist;
+};
+
+/* Resolve target.
+ * Used by etna_screen_flush_frontbuffer
+ */
+struct etna_rs_target
+{
+ unsigned rs_format;
+ bool swap_rb;
+ unsigned width, height;
+ size_t addr; /* GPU address */
+ size_t stride;
+ bool want_fence; /* should flush_frontbuffer return a fence? */
+ struct pipe_fence_handle *fence;
+};
+
+static INLINE struct etna_screen *
+etna_screen(struct pipe_screen *pscreen)
+{
+ return (struct etna_screen *)pscreen;
+}
+
+struct pipe_screen *
+etna_screen_create(struct viv_conn *dev);
+
+#endif
+
diff --git a/src/driver/etna_shader.c b/src/driver/etna_shader.c
new file mode 100644
index 0000000..eae05be
--- /dev/null
+++ b/src/driver/etna_shader.c
@@ -0,0 +1,299 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Shader state handling.
+ */
+#include "etna_shader.h"
+
+#include "etna_pipe.h"
+#include "etna_compiler.h"
+#include "etna_debug.h"
+
+#include "util/u_memory.h"
+#include "util/u_math.h"
+
+#include <etnaviv/state_3d.xml.h>
+
+/* Fetch uniforms from user buffer, if bound, and mark respective uniform
+ * bank as dirty. */
+static void etna_fetch_uniforms(struct pipe_context *pipe, uint shader)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct pipe_constant_buffer *buf = NULL;
+ switch(shader)
+ {
+ case PIPE_SHADER_VERTEX:
+ buf = &priv->vs_cbuf_s;
+ if(buf->user_buffer)
+ {
+ memcpy(priv->shader_state.VS_UNIFORMS, buf->user_buffer, MIN2(buf->buffer_size, priv->vs->const_size * 4));
+ priv->dirty_bits |= ETNA_STATE_VS_UNIFORMS;
+ }
+ break;
+ case PIPE_SHADER_FRAGMENT:
+ buf = &priv->fs_cbuf_s;
+ if(buf->user_buffer)
+ {
+ memcpy(priv->shader_state.PS_UNIFORMS, buf->user_buffer, MIN2(buf->buffer_size, priv->fs->const_size * 4));
+ priv->dirty_bits |= ETNA_STATE_PS_UNIFORMS;
+ }
+ break;
+ default: DBG("Unhandled shader type %i", shader);
+ }
+}
+
+
+/* Link vs and fs together: fill in shader_state from vs and fs
+ * as this function is called every time a new fs or vs is bound, the goal is to do
+ * little processing as possible here, and to precompute as much as possible in the
+ * vs/fs shader_object.
+ * XXX we could cache the link result for a certain set of VS/PS; usually a pair
+ * of VS and PS will be used together anyway.
+ */
+void etna_link_shaders(struct pipe_context *pipe,
+ struct compiled_shader_state *cs,
+ const struct etna_shader_object *vs, const struct etna_shader_object *fs)
+{
+ assert(vs->processor == TGSI_PROCESSOR_VERTEX);
+ assert(fs->processor == TGSI_PROCESSOR_FRAGMENT);
+#ifdef DEBUG
+ if(DBG_ENABLED(ETNA_DBG_DUMP_SHADERS))
+ {
+ etna_dump_shader_object(vs);
+ etna_dump_shader_object(fs);
+ }
+#endif
+ /* set last_varying_2x flag if the last varying has 1 or 2 components */
+ bool last_varying_2x = false;
+ if(fs->num_inputs>0 && fs->inputs[fs->num_inputs-1].num_components <= 2)
+ last_varying_2x = true;
+
+ cs->RA_CONTROL = VIVS_RA_CONTROL_UNK0 |
+ (last_varying_2x ? VIVS_RA_CONTROL_LAST_VARYING_2X : 0);
+
+ cs->PA_ATTRIBUTE_ELEMENT_COUNT = VIVS_PA_ATTRIBUTE_ELEMENT_COUNT_COUNT(fs->num_inputs);
+ for(int idx=0; idx<fs->num_inputs; ++idx)
+ cs->PA_SHADER_ATTRIBUTES[idx] = fs->inputs[idx].pa_attributes;
+
+ cs->VS_END_PC = vs->code_size / 4;
+ cs->VS_OUTPUT_COUNT = fs->num_inputs + 1; /* position + varyings */
+ /* Number of vertex elements determines number of VS inputs. Otherwise, the GPU crashes */
+ cs->VS_INPUT_COUNT = VIVS_VS_INPUT_COUNT_UNK8(vs->input_count_unk8);
+ cs->VS_TEMP_REGISTER_CONTROL =
+ VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS(vs->num_temps);
+
+ /* link vs outputs to fs inputs */
+ struct etna_shader_link_info link = {};
+ if(etna_link_shader_objects(&link, vs, fs))
+ {
+ assert(0); /* linking failed: some fs inputs do not have corresponding vs outputs */
+ }
+ DBG_F(ETNA_DBG_LINKER_MSGS, "link result:");
+ for(int idx=0; idx<fs->num_inputs; ++idx)
+ {
+ DBG_F(ETNA_DBG_LINKER_MSGS," %i -> %i", link.varyings_vs_reg[idx], idx+1);
+ }
+
+ /* vs outputs (varyings) */
+ uint32_t vs_output[16] = {0};
+ int varid = 0;
+ vs_output[varid++] = vs->vs_pos_out_reg;
+ for(int idx=0; idx<fs->num_inputs; ++idx)
+ vs_output[varid++] = link.varyings_vs_reg[idx];
+ if(vs->vs_pointsize_out_reg >= 0)
+ vs_output[varid++] = vs->vs_pointsize_out_reg; /* pointsize is last */
+
+ for(int idx=0; idx<4; ++idx)
+ {
+ cs->VS_OUTPUT[idx] =(vs_output[idx*4+0] << 0) | (vs_output[idx*4+1] << 8) |
+ (vs_output[idx*4+2] << 16) | (vs_output[idx*4+3] << 24);
+ }
+
+ if(vs->vs_pointsize_out_reg != -1)
+ {
+ /* vertex shader outputs point coordinate, provide extra output and make sure PA config is
+ * not masked */
+ cs->PA_CONFIG = ~0;
+ cs->VS_OUTPUT_COUNT_PSIZE = cs->VS_OUTPUT_COUNT + 1;
+ } else {
+ /* vertex shader does not output point coordinate, make sure thate POINT_SIZE_ENABLE is masked
+ * and no extra output is given */
+ cs->PA_CONFIG = ~VIVS_PA_CONFIG_POINT_SIZE_ENABLE;
+ cs->VS_OUTPUT_COUNT_PSIZE = cs->VS_OUTPUT_COUNT;
+ }
+
+ /* vs inputs (attributes) */
+ uint32_t vs_input[4] = {0};
+ for(int idx=0; idx<vs->num_inputs; ++idx)
+ vs_input[idx/4] |= vs->inputs[idx].reg << ((idx%4)*8);
+ for(int idx=0; idx<4; ++idx)
+ cs->VS_INPUT[idx] = vs_input[idx];
+
+ cs->VS_LOAD_BALANCING = vs->vs_load_balancing;
+ cs->VS_START_PC = 0;
+
+ cs->PS_END_PC = fs->code_size / 4;
+ cs->PS_OUTPUT_REG = fs->ps_color_out_reg;
+ cs->PS_INPUT_COUNT = VIVS_PS_INPUT_COUNT_COUNT(fs->num_inputs + 1) | /* Number of inputs plus position */
+ VIVS_PS_INPUT_COUNT_UNK8(fs->input_count_unk8);
+ cs->PS_TEMP_REGISTER_CONTROL =
+ VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS(MAX2(fs->num_temps, fs->num_inputs + 1));
+ cs->PS_CONTROL = VIVS_PS_CONTROL_UNK1; /* XXX when can we set BYPASS? */
+ cs->PS_START_PC = 0;
+
+ /* Precompute PS_INPUT_COUNT and TEMP_REGISTER_CONTROL in the case of MSAA mode, avoids
+ * some fumbling in sync_context.
+ */
+ cs->PS_INPUT_COUNT_MSAA = VIVS_PS_INPUT_COUNT_COUNT(fs->num_inputs + 2) | /* MSAA adds another input */
+ VIVS_PS_INPUT_COUNT_UNK8(fs->input_count_unk8);
+ cs->PS_TEMP_REGISTER_CONTROL_MSAA =
+ VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS(MAX2(fs->num_temps, fs->num_inputs + 2));
+
+ uint32_t total_components = 0;
+ uint32_t num_components = 0;
+ uint32_t component_use[2] = {0};
+ for(int idx=0; idx<fs->num_inputs; ++idx)
+ {
+ num_components |= fs->inputs[idx].num_components << ((idx%8)*4);
+ for(int comp=0; comp<fs->inputs[idx].num_components; ++comp)
+ {
+ unsigned use = VARYING_COMPONENT_USE_USED;
+ if(fs->inputs[idx].semantic.Name == TGSI_SEMANTIC_PCOORD)
+ {
+ if(comp == 0)
+ use = VARYING_COMPONENT_USE_POINTCOORD_X;
+ else if(comp == 1)
+ use = VARYING_COMPONENT_USE_POINTCOORD_Y;
+ }
+ /* 16 components per uint32 */
+ component_use[total_components/16] |= use << ((total_components%16)*2);
+ total_components += 1;
+ }
+ }
+ cs->GL_VARYING_TOTAL_COMPONENTS = VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM(align(total_components, 2));
+ cs->GL_VARYING_NUM_COMPONENTS = num_components;
+ cs->GL_VARYING_COMPONENT_USE[0] = component_use[0];
+ cs->GL_VARYING_COMPONENT_USE[1] = component_use[1];
+
+ /* reference instruction memory */
+ cs->vs_inst_mem_size = vs->code_size;
+ cs->VS_INST_MEM = vs->code;
+ cs->ps_inst_mem_size = fs->code_size;
+ cs->PS_INST_MEM = fs->code;
+
+ /* uniforms layout -- first constants, then immediates */
+ cs->vs_uniforms_size = vs->const_size + vs->imm_size;
+ memcpy(&cs->VS_UNIFORMS[vs->imm_base], vs->imm_data, vs->imm_size*4);
+
+ cs->ps_uniforms_size = fs->const_size + fs->imm_size;
+ memcpy(&cs->PS_UNIFORMS[fs->imm_base], fs->imm_data, fs->imm_size*4);
+
+ /* fetch any previous uniforms from buffer */
+ etna_fetch_uniforms(pipe, PIPE_SHADER_VERTEX);
+ etna_fetch_uniforms(pipe, PIPE_SHADER_FRAGMENT);
+}
+
+static void etna_set_constant_buffer(struct pipe_context *pipe,
+ uint shader, uint index,
+ struct pipe_constant_buffer *buf)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ if(buf == NULL) /* Unbinding constant buffer */
+ {
+ if(likely(index == 0))
+ {
+ switch(shader)
+ {
+ case PIPE_SHADER_VERTEX: priv->vs_cbuf_s.user_buffer = 0; break;
+ case PIPE_SHADER_FRAGMENT: priv->fs_cbuf_s.user_buffer = 0; break;
+ default: DBG("Unhandled shader type %i", shader);
+ }
+ } else {
+ DBG("Unhandled buffer index %i", index);
+ }
+ } else {
+ assert(buf->buffer == NULL && buf->user_buffer != NULL);
+ assert(priv->vs && priv->fs);
+ /* support only user buffer for now */
+ if(likely(index == 0))
+ {
+ /* copy only up to shader-specific constant size; never overwrite immediates */
+ switch(shader)
+ {
+ case PIPE_SHADER_VERTEX: priv->vs_cbuf_s = *buf; break;
+ case PIPE_SHADER_FRAGMENT: priv->fs_cbuf_s = *buf; break;
+ default: DBG("Unhandled shader type %i", shader);
+ }
+ etna_fetch_uniforms(pipe, shader);
+ } else {
+ DBG("Unhandled buffer index %i", index);
+ }
+ }
+}
+
+static void *etna_pipe_create_shader_state(struct pipe_context *pipe, const struct pipe_shader_state *pss)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct etna_shader_object *out = NULL;
+ if(etna_compile_shader_object(&priv->specs, pss->tokens, &out) != ETNA_OK)
+ return NULL;
+ else
+ return out;
+}
+
+static void etna_pipe_delete_shader_state(struct pipe_context *pipe, void *ss)
+{
+ etna_destroy_shader_object((struct etna_shader_object*)ss);
+}
+
+static void etna_pipe_bind_fs_state(struct pipe_context *pipe, void *fss_)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct etna_shader_object *fss = (struct etna_shader_object*)fss_;
+ priv->dirty_bits |= ETNA_STATE_SHADER | ETNA_STATE_PS_UNIFORMS;
+ assert(fss == NULL || fss->processor == TGSI_PROCESSOR_FRAGMENT);
+ priv->fs = fss;
+}
+
+static void etna_pipe_bind_vs_state(struct pipe_context *pipe, void *vss_)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct etna_shader_object *vss = (struct etna_shader_object*)vss_;
+ priv->dirty_bits |= ETNA_STATE_SHADER | ETNA_STATE_VS_UNIFORMS;
+ assert(vss == NULL || vss->processor == TGSI_PROCESSOR_VERTEX);
+ priv->vs = vss;
+}
+
+void etna_pipe_shader_init(struct pipe_context *pc)
+{
+ pc->create_fs_state = etna_pipe_create_shader_state;
+ pc->bind_fs_state = etna_pipe_bind_fs_state;
+ pc->delete_fs_state = etna_pipe_delete_shader_state;
+ pc->create_vs_state = etna_pipe_create_shader_state;
+ pc->bind_vs_state = etna_pipe_bind_vs_state;
+ pc->delete_vs_state = etna_pipe_delete_shader_state;
+ /* XXX create_gs_state */
+ /* XXX bind_gs_state */
+ /* XXX delete_gs_state */
+ pc->set_constant_buffer = etna_set_constant_buffer;
+}
+
diff --git a/src/driver/etna_shader.h b/src/driver/etna_shader.h
new file mode 100644
index 0000000..a9c2610
--- /dev/null
+++ b/src/driver/etna_shader.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Shader state handling.
+ */
+#ifndef H_ETNA_SHADER
+
+#include "pipe/p_state.h"
+
+struct etna_shader_object;
+struct compiled_shader_state;
+
+void etna_link_shaders(struct pipe_context *pipe,
+ struct compiled_shader_state *cs,
+ const struct etna_shader_object *vs, const struct etna_shader_object *fs);
+
+void etna_pipe_shader_init(struct pipe_context *pipe);
+
+#endif
+
diff --git a/src/driver/etna_surface.c b/src/driver/etna_surface.c
new file mode 100644
index 0000000..bab2f4f
--- /dev/null
+++ b/src/driver/etna_surface.c
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Surface handling */
+#include "etna_surface.h"
+
+#include "etna_clear_blit.h"
+#include "etna_internal.h"
+#include "etna_pipe.h"
+#include "etna_resource.h"
+#include "etna_translate.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_state.h"
+#include "util/u_inlines.h"
+#include "util/u_memory.h"
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+
+static struct pipe_surface *etna_pipe_create_surface(struct pipe_context *pipe,
+ struct pipe_resource *resource_,
+ const struct pipe_surface *templat)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct etna_surface *surf = CALLOC_STRUCT(etna_surface);
+ struct etna_resource *resource = etna_resource(resource_);
+ assert(templat->u.tex.first_layer == templat->u.tex.last_layer);
+ unsigned layer = templat->u.tex.first_layer;
+ unsigned level = templat->u.tex.level;
+ assert(layer < resource->base.array_size);
+
+ surf->base.context = pipe;
+
+ pipe_reference_init(&surf->base.reference, 1);
+ pipe_resource_reference(&surf->base.texture, &resource->base);
+
+ /* Allocate a TS for the resource if there isn't one yet,
+ * and it is allowed by the hw (width is a multiple of 16).
+ */
+ /* XXX for now, don't do TS for render textures as this path
+ * is not stable.
+ */
+ if(!DBG_ENABLED(ETNA_DBG_NO_TS) &&
+ !resource->ts &&
+ !(resource->base.bind & (PIPE_BIND_SAMPLER_VIEW)) &&
+ (resource->levels[level].padded_width & ETNA_RS_WIDTH_MASK) == 0 &&
+ (resource->levels[level].padded_height & ETNA_RS_HEIGHT_MASK) == 0)
+ {
+ etna_screen_resource_alloc_ts(pipe->screen, resource);
+ }
+
+ surf->base.texture = &resource->base;
+ surf->base.format = resource->base.format;
+ surf->base.width = resource->levels[level].width;
+ surf->base.height = resource->levels[level].height;
+ surf->base.writable = templat->writable; // what is this for anyway
+ surf->base.u = templat->u;
+
+ surf->layout = resource->layout;
+ surf->level = &resource->levels[level]; /* Keep pointer to actual level to set clear color on */
+ /* underlying resource instead of surface */
+ surf->surf = resource->levels[level]; /* Make copy of level to narrow down address to layer */
+ /* XXX we don't really need a copy but it's convenient */
+ surf->surf.address += layer * surf->surf.layer_stride;
+ surf->surf.logical += layer * surf->surf.layer_stride;
+
+ if(surf->surf.ts_address)
+ {
+ /* This abuses the RS as a plain buffer memset().
+ Currently uses a fixed row size of 64 bytes. Some benchmarking with different sizes may be in order.
+ */
+ etna_compile_rs_state(&surf->clear_command, &(struct rs_state){
+ .source_format = RS_FORMAT_A8R8G8B8,
+ .dest_format = RS_FORMAT_A8R8G8B8,
+ .dest_addr = surf->surf.ts_address,
+ .dest_stride = 0x40,
+ .dest_tiling = ETNA_LAYOUT_TILED,
+ .dither = {0xffffffff, 0xffffffff},
+ .width = 16,
+ .height = etna_align_up(surf->surf.ts_size/0x40, 4),
+ .clear_value = {priv->specs.ts_clear_value},
+ .clear_mode = VIVS_RS_CLEAR_CONTROL_MODE_ENABLED1,
+ .clear_bits = 0xffff
+ });
+ } else {
+ etna_rs_gen_clear_surface(&surf->clear_command, surf, surf->level->clear_value);
+ }
+ etna_resource_touch(pipe, surf->base.texture);
+ return &surf->base;
+}
+
+static void etna_pipe_surface_destroy(struct pipe_context *pipe, struct pipe_surface *surf)
+{
+ //struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ pipe_resource_reference(&surf->texture, NULL);
+ FREE(surf);
+}
+
+
+void etna_pipe_surface_init(struct pipe_context *pc)
+{
+ pc->create_surface = etna_pipe_create_surface;
+ pc->surface_destroy = etna_pipe_surface_destroy;
+}
+
diff --git a/src/driver/etna_surface.h b/src/driver/etna_surface.h
new file mode 100644
index 0000000..3c0b0c3
--- /dev/null
+++ b/src/driver/etna_surface.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Surface handling */
+#ifndef H_ETNA_SURFACE
+#define H_ETNA_SURFACE
+
+struct pipe_context;
+
+void etna_pipe_surface_init(struct pipe_context *pipe);
+
+#endif
+
diff --git a/src/driver/etna_texture.c b/src/driver/etna_texture.c
new file mode 100644
index 0000000..58ac8ff
--- /dev/null
+++ b/src/driver/etna_texture.c
@@ -0,0 +1,236 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Texture CSOs */
+#include "etna_texture.h"
+
+#include "etna_internal.h"
+#include "etna_pipe.h"
+#include "etna_translate.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_state.h"
+#include "util/u_inlines.h"
+#include "util/u_memory.h"
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+
+static void *etna_pipe_create_sampler_state(struct pipe_context *pipe,
+ const struct pipe_sampler_state *ss)
+{
+ //struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct compiled_sampler_state *cs = CALLOC_STRUCT(compiled_sampler_state);
+ cs->TE_SAMPLER_CONFIG0 =
+ VIVS_TE_SAMPLER_CONFIG0_UWRAP(translate_texture_wrapmode(ss->wrap_s))|
+ VIVS_TE_SAMPLER_CONFIG0_VWRAP(translate_texture_wrapmode(ss->wrap_t))|
+ VIVS_TE_SAMPLER_CONFIG0_MIN(translate_texture_filter(ss->min_img_filter))|
+ VIVS_TE_SAMPLER_CONFIG0_MIP(translate_texture_mipfilter(ss->min_mip_filter))|
+ VIVS_TE_SAMPLER_CONFIG0_MAG(translate_texture_filter(ss->mag_img_filter));
+ cs->TE_SAMPLER_CONFIG1 = 0; /* VIVS_TE_SAMPLER_CONFIG1 (swizzle, extended format) fully determined by sampler view */
+ cs->TE_SAMPLER_LOD_CONFIG =
+ (ss->lod_bias != 0.0 ? VIVS_TE_SAMPLER_LOD_CONFIG_BIAS_ENABLE : 0) |
+ VIVS_TE_SAMPLER_LOD_CONFIG_BIAS(etna_float_to_fixp55(ss->lod_bias));
+ if(ss->min_mip_filter != PIPE_TEX_MIPFILTER_NONE)
+ {
+ cs->min_lod = etna_float_to_fixp55(ss->min_lod);
+ cs->max_lod = etna_float_to_fixp55(ss->max_lod);
+ } else { /* when not mipmapping, we need to set max/min lod so that always lowest LOD is selected */
+ cs->min_lod = cs->max_lod = etna_float_to_fixp55(ss->min_lod);
+ }
+ return cs;
+}
+
+static void etna_pipe_bind_fragment_sampler_states(struct pipe_context *pipe,
+ unsigned num_samplers,
+ void **samplers)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ priv->dirty_bits |= ETNA_STATE_SAMPLERS;
+ priv->num_fragment_samplers = num_samplers;
+ for(int idx=0; idx<num_samplers; ++idx)
+ {
+ priv->sampler_p[idx] = samplers[idx];
+ if(samplers[idx])
+ priv->sampler[idx] = *(struct compiled_sampler_state*)samplers[idx];
+ }
+}
+
+static void etna_pipe_bind_vertex_sampler_states(struct pipe_context *pipe,
+ unsigned num_samplers,
+ void **samplers)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ priv->dirty_bits |= ETNA_STATE_SAMPLERS;
+ priv->num_vertex_samplers = num_samplers;
+ for(int idx=0; idx<num_samplers; ++idx)
+ {
+ priv->sampler_p[priv->specs.vertex_sampler_offset + idx] = samplers[idx];
+ if(samplers[idx])
+ priv->sampler[priv->specs.vertex_sampler_offset + idx] = *(struct compiled_sampler_state*)samplers[idx];
+ }
+}
+
+static void etna_pipe_delete_sampler_state(struct pipe_context *pipe, void *ss)
+{
+ //struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ FREE(ss);
+}
+
+static struct pipe_sampler_view *etna_pipe_create_sampler_view(struct pipe_context *pipe,
+ struct pipe_resource *texture,
+ const struct pipe_sampler_view *templat)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct etna_sampler_view *sv = CALLOC_STRUCT(etna_sampler_view);
+ sv->base = *templat;
+ sv->base.context = pipe;
+ sv->base.texture = 0;
+ pipe_resource_reference(&sv->base.texture, texture);
+ sv->base.texture = texture;
+ assert(sv->base.texture);
+
+ struct compiled_sampler_view *cs = CALLOC_STRUCT(compiled_sampler_view);
+ struct etna_resource *res = etna_resource(sv->base.texture);
+ assert(res != NULL);
+
+ cs->TE_SAMPLER_CONFIG0 =
+ VIVS_TE_SAMPLER_CONFIG0_TYPE(translate_texture_target(res->base.target, false)) |
+ VIVS_TE_SAMPLER_CONFIG0_FORMAT(translate_texture_format(sv->base.format, false));
+ /* merged with sampler state */
+ cs->TE_SAMPLER_CONFIG0_MASK = 0xffffffff;
+
+ cs->TE_SAMPLER_CONFIG1 =
+ VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_R(templat->swizzle_r) |
+ VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_G(templat->swizzle_g) |
+ VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_B(templat->swizzle_b) |
+ VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_A(templat->swizzle_a) |
+ VIVS_TE_SAMPLER_CONFIG1_HALIGN(res->halign);
+ cs->TE_SAMPLER_SIZE =
+ VIVS_TE_SAMPLER_SIZE_WIDTH(res->base.width0)|
+ VIVS_TE_SAMPLER_SIZE_HEIGHT(res->base.height0);
+ cs->TE_SAMPLER_LOG_SIZE =
+ VIVS_TE_SAMPLER_LOG_SIZE_WIDTH(etna_log2_fixp55(res->base.width0)) |
+ VIVS_TE_SAMPLER_LOG_SIZE_HEIGHT(etna_log2_fixp55(res->base.height0));
+
+ /* Set up levels-of-detail */
+ for(int lod=0; lod<=res->base.last_level; ++lod)
+ {
+ cs->TE_SAMPLER_LOD_ADDR[lod] = res->levels[lod].address;
+ }
+ cs->min_lod = sv->base.u.tex.first_level << 5;
+ cs->max_lod = MIN2(sv->base.u.tex.last_level, res->base.last_level) << 5;
+
+ /* Workaround for npot textures -- it appears that only CLAMP_TO_EDGE is supported when the
+ * appropriate capability is not set. */
+ if(!priv->specs.npot_tex_any_wrap &&
+ (!util_is_power_of_two(res->base.width0) || !util_is_power_of_two(res->base.height0)))
+ {
+ cs->TE_SAMPLER_CONFIG0_MASK = ~(VIVS_TE_SAMPLER_CONFIG0_UWRAP__MASK |
+ VIVS_TE_SAMPLER_CONFIG0_VWRAP__MASK);
+ cs->TE_SAMPLER_CONFIG0 |= VIVS_TE_SAMPLER_CONFIG0_UWRAP(TEXTURE_WRAPMODE_CLAMP_TO_EDGE) |
+ VIVS_TE_SAMPLER_CONFIG0_VWRAP(TEXTURE_WRAPMODE_CLAMP_TO_EDGE);
+ }
+
+ sv->internal = cs;
+ pipe_reference_init(&sv->base.reference, 1);
+ return &sv->base;
+}
+
+static void etna_pipe_sampler_view_destroy(struct pipe_context *pipe,
+ struct pipe_sampler_view *view)
+{
+ //struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ pipe_resource_reference(&view->texture, NULL);
+ FREE(etna_sampler_view(view)->internal);
+ FREE(view);
+}
+
+
+static void etna_pipe_set_fragment_sampler_views(struct pipe_context *pipe,
+ unsigned num_views,
+ struct pipe_sampler_view **info)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ unsigned idx;
+ priv->dirty_bits |= ETNA_STATE_SAMPLER_VIEWS;
+ priv->num_fragment_sampler_views = num_views;
+ for(idx=0; idx<num_views; ++idx)
+ {
+ pipe_sampler_view_reference(&priv->sampler_view_s[idx], info[idx]);
+ if(info[idx])
+ priv->sampler_view[idx] = *etna_sampler_view(info[idx])->internal;
+ }
+ for(; idx<priv->specs.fragment_sampler_count; ++idx)
+ {
+ pipe_sampler_view_reference(&priv->sampler_view_s[idx], NULL);
+ }
+}
+
+static void etna_pipe_set_vertex_sampler_views(struct pipe_context *pipe,
+ unsigned num_views,
+ struct pipe_sampler_view **info)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ unsigned idx;
+ unsigned offset = priv->specs.vertex_sampler_offset;
+ priv->dirty_bits |= ETNA_STATE_SAMPLER_VIEWS;
+ priv->num_vertex_sampler_views = num_views;
+ for(idx=0; idx<num_views; ++idx)
+ {
+ pipe_sampler_view_reference(&priv->sampler_view_s[offset + idx], info[idx]);
+ if(info[idx])
+ priv->sampler_view[offset + idx] = *etna_sampler_view(info[idx])->internal;
+ }
+ for(; idx<priv->specs.vertex_sampler_count; ++idx)
+ {
+ pipe_sampler_view_reference(&priv->sampler_view_s[offset + idx], NULL);
+ }
+}
+
+static void etna_pipe_texture_barrier(struct pipe_context *pipe)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ /* clear color and texture cache to make sure that texture unit reads
+ * what has been written
+ */
+ etna_set_state(priv->ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_TEXTURE);
+}
+
+void etna_pipe_texture_init(struct pipe_context *pc)
+{
+ pc->create_sampler_state = etna_pipe_create_sampler_state;
+ pc->bind_fragment_sampler_states = etna_pipe_bind_fragment_sampler_states;
+ pc->bind_vertex_sampler_states = etna_pipe_bind_vertex_sampler_states;
+ /* XXX bind_geometry_sampler_states */
+ /* XXX bind_compute_sampler_states */
+ pc->delete_sampler_state = etna_pipe_delete_sampler_state;
+ pc->set_fragment_sampler_views = etna_pipe_set_fragment_sampler_views;
+ pc->set_vertex_sampler_views = etna_pipe_set_vertex_sampler_views;
+ /* XXX set_geometry_sampler_views */
+ /* XXX set_compute_sampler_views */
+ /* XXX set_shader_resources */
+ pc->create_sampler_view = etna_pipe_create_sampler_view;
+ pc->sampler_view_destroy = etna_pipe_sampler_view_destroy;
+ pc->texture_barrier = etna_pipe_texture_barrier;
+}
+
diff --git a/src/driver/etna_texture.h b/src/driver/etna_texture.h
new file mode 100644
index 0000000..40c7f04
--- /dev/null
+++ b/src/driver/etna_texture.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Texture CSOs */
+#ifndef H_ETNA_TEXTURE
+#define H_ETNA_TEXTURE
+
+struct pipe_context;
+
+void etna_pipe_texture_init(struct pipe_context *pipe);
+
+#endif
+
+
diff --git a/src/driver/etna_transfer.c b/src/driver/etna_transfer.c
new file mode 100644
index 0000000..b9ad9bd
--- /dev/null
+++ b/src/driver/etna_transfer.c
@@ -0,0 +1,246 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Pipe memory transfer
+ */
+#include "etna_transfer.h"
+#include "etna_pipe.h"
+#include "etna_debug.h"
+
+#include "pipe/p_defines.h"
+#include "pipe/p_format.h"
+#include "pipe/p_state.h"
+#include "util/u_format.h"
+#include "util/u_memory.h"
+#include "util/u_surface.h"
+#include "util/u_transfer.h"
+
+/* Compute offset into a 1D/2D/3D buffer of a certain box.
+ * This box must be aligned to the block width and height of the underlying format.
+ */
+static inline size_t etna_compute_offset(enum pipe_format format, const struct pipe_box *box,
+ size_t stride, size_t layer_stride)
+{
+ return box->z * layer_stride +
+ box->y / util_format_get_blockheight(format) * stride +
+ box->x / util_format_get_blockwidth(format) * util_format_get_blocksize(format);
+}
+
+static void *etna_pipe_transfer_map(struct pipe_context *pipe,
+ struct pipe_resource *resource,
+ unsigned level,
+ unsigned usage, /* a combination of PIPE_TRANSFER_x */
+ const struct pipe_box *box,
+ struct pipe_transfer **out_transfer)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct etna_transfer *ptrans = util_slab_alloc(&priv->transfer_pool);
+ struct etna_resource *resource_priv = etna_resource(resource);
+ enum pipe_format format = resource->format;
+ if (!ptrans)
+ return NULL;
+ assert(level <= resource->last_level);
+
+ /* PIPE_TRANSFER_READ always requires a sync. */
+ if(usage & PIPE_TRANSFER_READ)
+ {
+ etna_finish(priv->ctx);
+ }
+ /* XXX we don't handle PIPE_TRANSFER_FLUSH_EXPLICIT; this flag can be ignored when mapping in-place,
+ * but when not in place we need to fire off the copy operation in transfer_flush_region (currently
+ * a no-op) instead of unmap. Need to handle this to support ARB_map_buffer_range extension at least.
+ */
+ /* XXX we don't take care of current operations on the resource; which can be, at some point in the pipeline
+ which is not yet executed:
+
+ - bound as surface
+ - bound through vertex buffer
+ - bound through index buffer
+ - bound in sampler view
+ - used in clear_render_target / clear_depth_stencil operation
+ - used in blit
+ - used in resource_copy_region
+
+ How do other drivers record this information over course of the rendering pipeline?
+ Is it necessary at all? Only in case we want to provide a fast path and map the resource directly
+ (and for PIPE_TRANSFER_MAP_DIRECTLY) and we don't want to force a sync.
+ We also need to know whether the resource is in use to determine if a sync is needed (or just do it
+ always, but that comes at the expense of performance).
+
+ A conservative approximation without too much overhead would be to mark all resources that have
+ been bound at some point as busy. A drawback would be that accessing resources that have
+ been bound but are no longer in use for a while still carry a performance penalty. On the other hand,
+ the program could be using PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE or PIPE_TRANSFER_UNSYNCHRONIZED to
+ avoid this in the first place...
+
+ A) We use an in-pipe copy engine, and queue the copy operation after unmap so that the copy
+ will be performed when all current commands have been executed.
+ Using the RS is possible, not sure if always efficient. This can also do any kind of tiling for us.
+ Only possible when PIPE_TRANSFER_DISCARD_RANGE is set.
+ B) We discard the entire resource (or at least, the mipmap level) and allocate new memory for it.
+ Only possible when mapping the entire resource or PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE is set.
+ */
+
+ /* No need to allocate a buffer for copying if the resource is not in use,
+ * and no tiling is needed, can just return a direct pointer.
+ */
+ ptrans->in_place = resource_priv->layout == ETNA_LAYOUT_LINEAR ||
+ (resource_priv->layout == ETNA_LAYOUT_TILED && util_format_is_compressed(resource->format));
+ ptrans->base.resource = resource;
+ ptrans->base.level = level;
+ ptrans->base.usage = usage;
+ ptrans->base.box = *box;
+
+ struct etna_resource_level *res_level = &resource_priv->levels[level];
+ if(likely(ptrans->in_place))
+ {
+ ptrans->base.stride = res_level->stride;
+ ptrans->base.layer_stride = res_level->layer_stride;
+ ptrans->buffer = res_level->logical + etna_compute_offset(resource->format, box, res_level->stride, res_level->layer_stride);
+ } else {
+ unsigned divSizeX = util_format_get_blockwidth(format);
+ unsigned divSizeY = util_format_get_blockheight(format);
+ if(usage & PIPE_TRANSFER_MAP_DIRECTLY)
+ {
+ /* No in-place transfer possible */
+ util_slab_free(&priv->transfer_pool, ptrans);
+ return NULL;
+ }
+
+ ptrans->base.stride = align(box->width, divSizeX) * util_format_get_blocksize(format); /* row stride in bytes */
+ ptrans->base.layer_stride = align(box->height, divSizeY) * ptrans->base.stride;
+ size_t size = ptrans->base.layer_stride * box->depth;
+ ptrans->buffer = MALLOC(size);
+
+ if(usage & PIPE_TRANSFER_READ)
+ {
+ /* untile or copy resource for reading */
+ if(resource_priv->layout == ETNA_LAYOUT_LINEAR || resource_priv->layout == ETNA_LAYOUT_TILED)
+ {
+ if(resource_priv->layout == ETNA_LAYOUT_TILED && !util_format_is_compressed(resource_priv->base.format))
+ {
+ etna_texture_untile(ptrans->buffer, res_level->logical,
+ ptrans->base.box.x, ptrans->base.box.y, res_level->stride,
+ ptrans->base.box.width, ptrans->base.box.height, ptrans->base.stride,
+ util_format_get_blocksize(resource_priv->base.format));
+ } else { /* non-tiled or compressed format */
+ util_copy_box(ptrans->buffer,
+ resource_priv->base.format,
+ ptrans->base.stride, ptrans->base.layer_stride,
+ 0, 0, 0, /* dst x,y,z */
+ ptrans->base.box.width, ptrans->base.box.height, ptrans->base.box.depth,
+ res_level->logical,
+ res_level->stride, res_level->layer_stride,
+ ptrans->base.box.x, ptrans->base.box.y, ptrans->base.box.z);
+ }
+ } else /* TODO supertiling */
+ {
+ BUG("unsupported tiling %i for reading", resource_priv->layout);
+ }
+ }
+ }
+
+ *out_transfer = &ptrans->base;
+ return ptrans->buffer;
+}
+
+static void etna_pipe_transfer_flush_region(struct pipe_context *pipe,
+ struct pipe_transfer *transfer_,
+ const struct pipe_box *box)
+{
+ /* NOOP for now */
+}
+
+static void etna_pipe_transfer_unmap(struct pipe_context *pipe,
+ struct pipe_transfer *transfer_)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct etna_transfer *ptrans = etna_transfer(transfer_);
+
+ /* XXX
+ * When writing to a resource that is already in use, replace the resource with a completely new buffer
+ * and free the old one using a fenced free.
+ * The most tricky case to implement will be: tiled or supertiled surface, partial write, target not aligned to 4/64
+ */
+ struct etna_resource *resource = etna_resource(ptrans->base.resource);
+ assert(ptrans->base.level <= resource->base.last_level);
+ struct etna_resource_level *level = &resource->levels[ptrans->base.level];
+
+ if(ptrans->base.usage & PIPE_TRANSFER_WRITE)
+ {
+ /* write back */
+ if(unlikely(!ptrans->in_place))
+ {
+ if(resource->layout == ETNA_LAYOUT_LINEAR || resource->layout == ETNA_LAYOUT_TILED)
+ {
+ if(resource->layout == ETNA_LAYOUT_TILED && !util_format_is_compressed(resource->base.format))
+ {
+ etna_texture_tile(level->logical, ptrans->buffer,
+ ptrans->base.box.x, ptrans->base.box.y, level->stride,
+ ptrans->base.box.width, ptrans->base.box.height, ptrans->base.stride,
+ util_format_get_blocksize(resource->base.format));
+ } else { /* non-tiled or compressed format */
+ util_copy_box(level->logical,
+ resource->base.format,
+ level->stride, level->layer_stride,
+ ptrans->base.box.x, ptrans->base.box.y, ptrans->base.box.z,
+ ptrans->base.box.width, ptrans->base.box.height, ptrans->base.box.depth,
+ ptrans->buffer,
+ ptrans->base.stride, ptrans->base.layer_stride,
+ 0, 0, 0 /* src x,y,z */);
+ }
+ } else
+ {
+ BUG("unsupported tiling %i", resource->layout);
+ }
+ FREE(ptrans->buffer);
+ }
+ if(resource->base.bind & PIPE_BIND_SAMPLER_VIEW)
+ {
+ /* XXX do we need to flush the CPU cache too or start a write barrier
+ * to make sure the GPU sees it? */
+ priv->dirty_bits |= ETNA_STATE_TEXTURE_CACHES;
+ }
+ }
+
+ util_slab_free(&priv->transfer_pool, ptrans);
+}
+
+void etna_pipe_transfer_init(struct pipe_context *pc)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pc);
+
+ pc->transfer_map = etna_pipe_transfer_map;
+ pc->transfer_flush_region = etna_pipe_transfer_flush_region;
+ pc->transfer_unmap = etna_pipe_transfer_unmap;
+ pc->transfer_inline_write = u_default_transfer_inline_write;
+
+ util_slab_create(&priv->transfer_pool, sizeof(struct etna_transfer),
+ 16, UTIL_SLAB_SINGLETHREADED);
+}
+
+void etna_pipe_transfer_destroy(struct pipe_context *pc)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pc);
+ util_slab_destroy(&priv->transfer_pool);
+}
+
diff --git a/src/driver/etna_transfer.h b/src/driver/etna_transfer.h
new file mode 100644
index 0000000..1bd1a5d
--- /dev/null
+++ b/src/driver/etna_transfer.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Pipe memory transfer
+ */
+#ifndef H_ETNA_TRANSFER
+#define H_ETNA_TRANSFER
+
+#include "pipe/p_state.h"
+
+void etna_pipe_transfer_init(struct pipe_context *pipe);
+
+void etna_pipe_transfer_destroy(struct pipe_context *pc);
+
+#endif
+
diff --git a/src/driver/etna_translate.h b/src/driver/etna_translate.h
new file mode 100644
index 0000000..2ef2f2c
--- /dev/null
+++ b/src/driver/etna_translate.h
@@ -0,0 +1,554 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* inlined translation functions between gallium and vivante */
+#ifndef H_TRANSLATE
+#define H_TRANSLATE
+
+#include "pipe/p_defines.h"
+#include "pipe/p_format.h"
+#include "pipe/p_state.h"
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/etna_tex.h>
+#include "etna_internal.h"
+#include "etna_debug.h"
+
+#include "util/u_format.h"
+
+#include <stdio.h>
+
+/* Returned when there is no match of pipe value to etna value */
+#define ETNA_NO_MATCH (~0)
+
+static inline uint32_t translate_cull_face(unsigned cull_face, unsigned front_ccw)
+{
+ switch(cull_face)
+ {
+ case PIPE_FACE_NONE: return VIVS_PA_CONFIG_CULL_FACE_MODE_OFF;
+ case PIPE_FACE_BACK: return front_ccw ? VIVS_PA_CONFIG_CULL_FACE_MODE_CW : VIVS_PA_CONFIG_CULL_FACE_MODE_CCW;
+ case PIPE_FACE_FRONT: return front_ccw ? VIVS_PA_CONFIG_CULL_FACE_MODE_CCW : VIVS_PA_CONFIG_CULL_FACE_MODE_CW;
+ default: DBG("Unhandled cull face mode %i\n", cull_face); return ETNA_NO_MATCH;
+ }
+}
+
+static inline uint32_t translate_polygon_mode(unsigned polygon_mode)
+{
+ switch(polygon_mode)
+ {
+ case PIPE_POLYGON_MODE_FILL: return VIVS_PA_CONFIG_FILL_MODE_SOLID;
+ case PIPE_POLYGON_MODE_LINE: return VIVS_PA_CONFIG_FILL_MODE_WIREFRAME;
+ case PIPE_POLYGON_MODE_POINT: return VIVS_PA_CONFIG_FILL_MODE_POINT;
+ default: DBG("Unhandled polygon mode %i\n", polygon_mode); return ETNA_NO_MATCH;
+ }
+}
+
+static inline uint32_t translate_stencil_mode(bool enable_0, bool enable_1)
+{
+ if(enable_0)
+ {
+ return enable_1 ? VIVS_PE_STENCIL_CONFIG_MODE_TWO_SIDED :
+ VIVS_PE_STENCIL_CONFIG_MODE_ONE_SIDED;
+ } else {
+ return VIVS_PE_STENCIL_CONFIG_MODE_DISABLED;
+ }
+}
+
+static inline uint32_t translate_stencil_op(unsigned stencil_op)
+{
+ switch(stencil_op)
+ {
+ case PIPE_STENCIL_OP_KEEP: return STENCIL_OP_KEEP;
+ case PIPE_STENCIL_OP_ZERO: return STENCIL_OP_ZERO;
+ case PIPE_STENCIL_OP_REPLACE: return STENCIL_OP_REPLACE;
+ case PIPE_STENCIL_OP_INCR: return STENCIL_OP_INCR;
+ case PIPE_STENCIL_OP_DECR: return STENCIL_OP_DECR;
+ case PIPE_STENCIL_OP_INCR_WRAP: return STENCIL_OP_INCR_WRAP;
+ case PIPE_STENCIL_OP_DECR_WRAP: return STENCIL_OP_DECR_WRAP;
+ case PIPE_STENCIL_OP_INVERT: return STENCIL_OP_INVERT;
+ default: DBG("Unhandled stencil op: %i\n", stencil_op); return ETNA_NO_MATCH;
+ }
+}
+
+static inline uint32_t translate_blend(unsigned blend)
+{
+ switch(blend)
+ {
+ case PIPE_BLEND_ADD: return BLEND_EQ_ADD;
+ case PIPE_BLEND_SUBTRACT: return BLEND_EQ_SUBTRACT;
+ case PIPE_BLEND_REVERSE_SUBTRACT: return BLEND_EQ_REVERSE_SUBTRACT;
+ case PIPE_BLEND_MIN: return BLEND_EQ_MIN;
+ case PIPE_BLEND_MAX: return BLEND_EQ_MAX;
+ default: DBG("Unhandled blend: %i\n", blend); return ETNA_NO_MATCH;
+ }
+}
+
+static inline uint32_t translate_blend_factor(unsigned blend_factor)
+{
+ switch(blend_factor)
+ {
+ case PIPE_BLENDFACTOR_ONE: return BLEND_FUNC_ONE;
+ case PIPE_BLENDFACTOR_SRC_COLOR: return BLEND_FUNC_SRC_COLOR;
+ case PIPE_BLENDFACTOR_SRC_ALPHA: return BLEND_FUNC_SRC_ALPHA;
+ case PIPE_BLENDFACTOR_DST_ALPHA: return BLEND_FUNC_DST_ALPHA;
+ case PIPE_BLENDFACTOR_DST_COLOR: return BLEND_FUNC_DST_COLOR;
+ case PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE: return BLEND_FUNC_SRC_ALPHA_SATURATE;
+ case PIPE_BLENDFACTOR_CONST_COLOR: return BLEND_FUNC_CONSTANT_COLOR;
+ case PIPE_BLENDFACTOR_CONST_ALPHA: return BLEND_FUNC_CONSTANT_ALPHA;
+ case PIPE_BLENDFACTOR_ZERO: return BLEND_FUNC_ZERO;
+ case PIPE_BLENDFACTOR_INV_SRC_COLOR: return BLEND_FUNC_ONE_MINUS_SRC_COLOR;
+ case PIPE_BLENDFACTOR_INV_SRC_ALPHA: return BLEND_FUNC_ONE_MINUS_SRC_ALPHA;
+ case PIPE_BLENDFACTOR_INV_DST_ALPHA: return BLEND_FUNC_ONE_MINUS_DST_ALPHA;
+ case PIPE_BLENDFACTOR_INV_DST_COLOR: return BLEND_FUNC_ONE_MINUS_DST_COLOR;
+ case PIPE_BLENDFACTOR_INV_CONST_COLOR: return BLEND_FUNC_ONE_MINUS_CONSTANT_COLOR;
+ case PIPE_BLENDFACTOR_INV_CONST_ALPHA: return BLEND_FUNC_ONE_MINUS_CONSTANT_ALPHA;
+ case PIPE_BLENDFACTOR_SRC1_COLOR:
+ case PIPE_BLENDFACTOR_SRC1_ALPHA:
+ case PIPE_BLENDFACTOR_INV_SRC1_COLOR:
+ case PIPE_BLENDFACTOR_INV_SRC1_ALPHA:
+ default: DBG("Unhandled blend factor: %i\n", blend_factor); return ETNA_NO_MATCH;
+ }
+}
+
+static inline uint32_t translate_texture_wrapmode(unsigned wrap)
+{
+ switch(wrap)
+ {
+ case PIPE_TEX_WRAP_REPEAT: return TEXTURE_WRAPMODE_REPEAT;
+ case PIPE_TEX_WRAP_CLAMP: return TEXTURE_WRAPMODE_CLAMP_TO_EDGE;
+ case PIPE_TEX_WRAP_CLAMP_TO_EDGE: return TEXTURE_WRAPMODE_CLAMP_TO_EDGE;
+ case PIPE_TEX_WRAP_CLAMP_TO_BORDER: return TEXTURE_WRAPMODE_CLAMP_TO_EDGE; /* XXX */
+ case PIPE_TEX_WRAP_MIRROR_REPEAT: return TEXTURE_WRAPMODE_MIRRORED_REPEAT;
+ case PIPE_TEX_WRAP_MIRROR_CLAMP: return TEXTURE_WRAPMODE_MIRRORED_REPEAT; /* XXX */
+ case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE: return TEXTURE_WRAPMODE_MIRRORED_REPEAT; /* XXX */
+ case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER: return TEXTURE_WRAPMODE_MIRRORED_REPEAT; /* XXX */
+ default: DBG("Unhandled texture wrapmode: %i\n", wrap); return ETNA_NO_MATCH;
+ }
+}
+
+static inline uint32_t translate_texture_mipfilter(unsigned filter)
+{
+ switch(filter)
+ {
+ case PIPE_TEX_MIPFILTER_NEAREST: return TEXTURE_FILTER_NEAREST;
+ case PIPE_TEX_MIPFILTER_LINEAR: return TEXTURE_FILTER_LINEAR;
+ case PIPE_TEX_MIPFILTER_NONE: return TEXTURE_FILTER_NONE;
+ default: DBG("Unhandled texture mipfilter: %i\n", filter); return ETNA_NO_MATCH;
+ }
+}
+
+static inline uint32_t translate_texture_filter(unsigned filter)
+{
+ switch(filter)
+ {
+ case PIPE_TEX_FILTER_NEAREST: return TEXTURE_FILTER_NEAREST;
+ case PIPE_TEX_FILTER_LINEAR: return TEXTURE_FILTER_LINEAR;
+ /* What about anisotropic? */
+ default: DBG("Unhandled texture filter: %i\n", filter); return ETNA_NO_MATCH;
+ }
+}
+
+static inline uint32_t translate_texture_format(enum pipe_format fmt, bool silent)
+{
+ switch(fmt) /* XXX with TEXTURE_FORMAT_EXT and swizzle on newer chips we can support much more */
+ {
+ /* Note: Pipe format convention is LSB to MSB, VIVS is MSB to LSB */
+ case PIPE_FORMAT_A8_UNORM: return TEXTURE_FORMAT_A8;
+ case PIPE_FORMAT_L8_UNORM: return TEXTURE_FORMAT_L8;
+ case PIPE_FORMAT_I8_UNORM: return TEXTURE_FORMAT_I8;
+ case PIPE_FORMAT_L8A8_UNORM: return TEXTURE_FORMAT_A8L8;
+ case PIPE_FORMAT_B4G4R4A4_UNORM: return TEXTURE_FORMAT_A4R4G4B4;
+ case PIPE_FORMAT_B4G4R4X4_UNORM: return TEXTURE_FORMAT_X4R4G4B4;
+ case PIPE_FORMAT_B8G8R8A8_UNORM: return TEXTURE_FORMAT_A8R8G8B8;
+ case PIPE_FORMAT_B8G8R8X8_UNORM: return TEXTURE_FORMAT_X8R8G8B8;
+ case PIPE_FORMAT_R8G8B8A8_UNORM: return TEXTURE_FORMAT_A8B8G8R8;
+ case PIPE_FORMAT_R8G8B8X8_UNORM: return TEXTURE_FORMAT_X8B8G8R8;
+ case PIPE_FORMAT_B5G6R5_UNORM: return TEXTURE_FORMAT_R5G6B5;
+ case PIPE_FORMAT_B5G5R5A1_UNORM: return TEXTURE_FORMAT_A1R5G5B5;
+ case PIPE_FORMAT_B5G5R5X1_UNORM: return TEXTURE_FORMAT_X1R5G5B5;
+ case PIPE_FORMAT_YUYV: return TEXTURE_FORMAT_YUY2;
+ case PIPE_FORMAT_UYVY: return TEXTURE_FORMAT_UYVY;
+ case PIPE_FORMAT_Z16_UNORM: return TEXTURE_FORMAT_D16;
+ case PIPE_FORMAT_X8Z24_UNORM: return TEXTURE_FORMAT_D24S8;
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM: return TEXTURE_FORMAT_D24S8;
+ case PIPE_FORMAT_DXT1_RGB: return TEXTURE_FORMAT_DXT1;
+ case PIPE_FORMAT_DXT1_RGBA: return TEXTURE_FORMAT_DXT1;
+ case PIPE_FORMAT_DXT3_RGBA: return TEXTURE_FORMAT_DXT2_DXT3;
+ case PIPE_FORMAT_DXT5_RGBA: return TEXTURE_FORMAT_DXT4_DXT5;
+ case PIPE_FORMAT_ETC1_RGB8: return TEXTURE_FORMAT_ETC1;
+ default: if(!silent) { DBG("Unhandled texture format: %i\n", fmt); } return ETNA_NO_MATCH;
+ }
+}
+
+/* render target format (non-rb swapped RS-supported formats) */
+static inline uint32_t translate_rt_format(enum pipe_format fmt, bool silent)
+{
+ switch(fmt)
+ {
+ /* Note: Pipe format convention is LSB to MSB, VIVS is MSB to LSB */
+ case PIPE_FORMAT_B4G4R4X4_UNORM: return RS_FORMAT_X4R4G4B4;
+ case PIPE_FORMAT_B4G4R4A4_UNORM: return RS_FORMAT_A4R4G4B4;
+ case PIPE_FORMAT_B5G5R5X1_UNORM: return RS_FORMAT_X1R5G5B5;
+ case PIPE_FORMAT_B5G5R5A1_UNORM: return RS_FORMAT_A1R5G5B5;
+ case PIPE_FORMAT_B5G6R5_UNORM: return RS_FORMAT_R5G6B5;
+ case PIPE_FORMAT_B8G8R8X8_UNORM: return RS_FORMAT_X8R8G8B8;
+ case PIPE_FORMAT_B8G8R8A8_UNORM: return RS_FORMAT_A8R8G8B8;
+ case PIPE_FORMAT_YUYV: return RS_FORMAT_YUY2;
+ default: if(!silent) { DBG("Unhandled rs surface format: %i\n", fmt); } return ETNA_NO_MATCH;
+ }
+}
+
+static inline uint32_t translate_depth_format(enum pipe_format fmt, bool silent)
+{
+ switch(fmt)
+ {
+ /* Note: Pipe format convention is LSB to MSB, VIVS is MSB to LSB */
+ case PIPE_FORMAT_Z16_UNORM: return VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT_D16;
+ case PIPE_FORMAT_X8Z24_UNORM: return VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT_D24S8;
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM: return VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT_D24S8;
+ default: if(!silent) { DBG("Unhandled depth format: %i\n", fmt); } return ETNA_NO_MATCH;
+ }
+}
+
+/* render target format for MSAA */
+static inline uint32_t translate_msaa_format(enum pipe_format fmt, bool silent)
+{
+ switch(fmt)
+ {
+ /* Note: Pipe format convention is LSB to MSB, VIVS is MSB to LSB */
+ case PIPE_FORMAT_B4G4R4X4_UNORM: return VIVS_TS_MEM_CONFIG_MSAA_FORMAT_A4R4G4B4;
+ case PIPE_FORMAT_B4G4R4A4_UNORM: return VIVS_TS_MEM_CONFIG_MSAA_FORMAT_A4R4G4B4;
+ case PIPE_FORMAT_B5G5R5X1_UNORM: return VIVS_TS_MEM_CONFIG_MSAA_FORMAT_A1R5G5B5;
+ case PIPE_FORMAT_B5G5R5A1_UNORM: return VIVS_TS_MEM_CONFIG_MSAA_FORMAT_A1R5G5B5;
+ case PIPE_FORMAT_B5G6R5_UNORM: return VIVS_TS_MEM_CONFIG_MSAA_FORMAT_R5G6B5;
+ case PIPE_FORMAT_B8G8R8X8_UNORM: return VIVS_TS_MEM_CONFIG_MSAA_FORMAT_X8R8G8B8;
+ case PIPE_FORMAT_B8G8R8A8_UNORM: return VIVS_TS_MEM_CONFIG_MSAA_FORMAT_A8R8G8B8;
+ /* MSAA with YUYV not supported */
+ default: if(!silent) { DBG("Unhandled msaa surface format: %i\n", fmt); } return ETNA_NO_MATCH;
+ }
+}
+
+static inline uint32_t translate_texture_target(enum pipe_texture_target tgt, bool silent)
+{
+ switch(tgt)
+ {
+ case PIPE_TEXTURE_2D: return TEXTURE_TYPE_2D;
+ case PIPE_TEXTURE_CUBE: return TEXTURE_TYPE_CUBE_MAP;
+ default: DBG("Unhandled texture target: %i\n", tgt); return ETNA_NO_MATCH;
+ }
+}
+
+/* Return type flags for vertex element format */
+static inline uint32_t translate_vertex_format_type(enum pipe_format fmt, bool silent)
+{
+ switch(fmt)
+ {
+ case PIPE_FORMAT_R8_UNORM:
+ case PIPE_FORMAT_R8G8_UNORM:
+ case PIPE_FORMAT_R8G8B8_UNORM:
+ case PIPE_FORMAT_R8G8B8A8_UNORM:
+ case PIPE_FORMAT_R8_USCALED:
+ case PIPE_FORMAT_R8G8_USCALED:
+ case PIPE_FORMAT_R8G8B8_USCALED:
+ case PIPE_FORMAT_R8G8B8A8_USCALED:
+ case PIPE_FORMAT_R8_UINT:
+ case PIPE_FORMAT_R8G8_UINT:
+ case PIPE_FORMAT_R8G8B8_UINT:
+ case PIPE_FORMAT_R8G8B8A8_UINT:
+ return VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_UNSIGNED_BYTE;
+ case PIPE_FORMAT_R8_SNORM:
+ case PIPE_FORMAT_R8G8_SNORM:
+ case PIPE_FORMAT_R8G8B8_SNORM:
+ case PIPE_FORMAT_R8G8B8A8_SNORM:
+ case PIPE_FORMAT_R8_SSCALED:
+ case PIPE_FORMAT_R8G8_SSCALED:
+ case PIPE_FORMAT_R8G8B8_SSCALED:
+ case PIPE_FORMAT_R8G8B8A8_SSCALED:
+ case PIPE_FORMAT_R8_SINT:
+ case PIPE_FORMAT_R8G8_SINT:
+ case PIPE_FORMAT_R8G8B8_SINT:
+ case PIPE_FORMAT_R8G8B8A8_SINT:
+ return VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_BYTE;
+ case PIPE_FORMAT_R16_UNORM:
+ case PIPE_FORMAT_R16G16_UNORM:
+ case PIPE_FORMAT_R16G16B16_UNORM:
+ case PIPE_FORMAT_R16G16B16A16_UNORM:
+ case PIPE_FORMAT_R16_USCALED:
+ case PIPE_FORMAT_R16G16_USCALED:
+ case PIPE_FORMAT_R16G16B16_USCALED:
+ case PIPE_FORMAT_R16G16B16A16_USCALED:
+ case PIPE_FORMAT_R16_UINT:
+ case PIPE_FORMAT_R16G16_UINT:
+ case PIPE_FORMAT_R16G16B16_UINT:
+ case PIPE_FORMAT_R16G16B16A16_UINT:
+ return VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_UNSIGNED_SHORT;
+ case PIPE_FORMAT_R16_SNORM:
+ case PIPE_FORMAT_R16G16_SNORM:
+ case PIPE_FORMAT_R16G16B16_SNORM:
+ case PIPE_FORMAT_R16G16B16A16_SNORM:
+ case PIPE_FORMAT_R16_SSCALED:
+ case PIPE_FORMAT_R16G16_SSCALED:
+ case PIPE_FORMAT_R16G16B16_SSCALED:
+ case PIPE_FORMAT_R16G16B16A16_SSCALED:
+ case PIPE_FORMAT_R16_SINT:
+ case PIPE_FORMAT_R16G16_SINT:
+ case PIPE_FORMAT_R16G16B16_SINT:
+ case PIPE_FORMAT_R16G16B16A16_SINT:
+ return VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_SHORT;
+ case PIPE_FORMAT_R32_UNORM:
+ case PIPE_FORMAT_R32G32_UNORM:
+ case PIPE_FORMAT_R32G32B32_UNORM:
+ case PIPE_FORMAT_R32G32B32A32_UNORM:
+ case PIPE_FORMAT_R32_USCALED:
+ case PIPE_FORMAT_R32G32_USCALED:
+ case PIPE_FORMAT_R32G32B32_USCALED:
+ case PIPE_FORMAT_R32G32B32A32_USCALED:
+ case PIPE_FORMAT_R32_UINT:
+ case PIPE_FORMAT_R32G32_UINT:
+ case PIPE_FORMAT_R32G32B32_UINT:
+ case PIPE_FORMAT_R32G32B32A32_UINT:
+ return VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_UNSIGNED_INT;
+ case PIPE_FORMAT_R32_SNORM:
+ case PIPE_FORMAT_R32G32_SNORM:
+ case PIPE_FORMAT_R32G32B32_SNORM:
+ case PIPE_FORMAT_R32G32B32A32_SNORM:
+ case PIPE_FORMAT_R32_SSCALED:
+ case PIPE_FORMAT_R32G32_SSCALED:
+ case PIPE_FORMAT_R32G32B32_SSCALED:
+ case PIPE_FORMAT_R32G32B32A32_SSCALED:
+ case PIPE_FORMAT_R32_SINT:
+ case PIPE_FORMAT_R32G32_SINT:
+ case PIPE_FORMAT_R32G32B32_SINT:
+ case PIPE_FORMAT_R32G32B32A32_SINT:
+ return VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_INT;
+ case PIPE_FORMAT_R16_FLOAT:
+ case PIPE_FORMAT_R16G16_FLOAT:
+ case PIPE_FORMAT_R16G16B16_FLOAT:
+ case PIPE_FORMAT_R16G16B16A16_FLOAT:
+ return VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_HALF_FLOAT;
+ case PIPE_FORMAT_R32_FLOAT:
+ case PIPE_FORMAT_R32G32_FLOAT:
+ case PIPE_FORMAT_R32G32B32_FLOAT:
+ case PIPE_FORMAT_R32G32B32A32_FLOAT:
+ return VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT;
+ case PIPE_FORMAT_R32_FIXED:
+ case PIPE_FORMAT_R32G32_FIXED:
+ case PIPE_FORMAT_R32G32B32_FIXED:
+ case PIPE_FORMAT_R32G32B32A32_FIXED:
+ return VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FIXED;
+ case PIPE_FORMAT_R10G10B10A2_UNORM:
+ case PIPE_FORMAT_R10G10B10A2_USCALED:
+ return VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_UNSIGNED_INT_10_10_10_2;
+ case PIPE_FORMAT_R10G10B10A2_SNORM:
+ case PIPE_FORMAT_R10G10B10A2_SSCALED:
+ return VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_INT_10_10_10_2;
+ default: if(!silent) { DBG("Unhandled vertex format: %i", fmt); } return ETNA_NO_MATCH;
+ }
+}
+
+/* Return normalization flag for vertex element format */
+static inline uint32_t translate_vertex_format_normalize(enum pipe_format fmt)
+{
+ const struct util_format_description *desc = util_format_description(fmt);
+ if(!desc)
+ return VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF;
+ /* assumes that normalization of channel 0 holds for all channels;
+ * this holds for all vertex formats that we support */
+ return desc->channel[0].normalized ? VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_ON :
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF;
+}
+
+static inline uint32_t translate_index_size(unsigned index_size)
+{
+ switch(index_size)
+ {
+ case 1: return VIVS_FE_INDEX_STREAM_CONTROL_TYPE_UNSIGNED_CHAR;
+ case 2: return VIVS_FE_INDEX_STREAM_CONTROL_TYPE_UNSIGNED_SHORT;
+ case 4: return VIVS_FE_INDEX_STREAM_CONTROL_TYPE_UNSIGNED_INT;
+ default: DBG("Unhandled index size %i\n", index_size); return ETNA_NO_MATCH;
+ }
+}
+
+static inline uint32_t translate_draw_mode(unsigned mode)
+{
+ switch(mode)
+ {
+ case PIPE_PRIM_POINTS: return PRIMITIVE_TYPE_POINTS;
+ case PIPE_PRIM_LINES: return PRIMITIVE_TYPE_LINES;
+ case PIPE_PRIM_LINE_LOOP: return PRIMITIVE_TYPE_LINE_LOOP;
+ case PIPE_PRIM_LINE_STRIP: return PRIMITIVE_TYPE_LINE_STRIP;
+ case PIPE_PRIM_TRIANGLES: return PRIMITIVE_TYPE_TRIANGLES;
+ case PIPE_PRIM_TRIANGLE_STRIP: return PRIMITIVE_TYPE_TRIANGLE_STRIP;
+ case PIPE_PRIM_TRIANGLE_FAN: return PRIMITIVE_TYPE_TRIANGLE_FAN;
+ case PIPE_PRIM_QUADS: return PRIMITIVE_TYPE_QUADS;
+ default: DBG("Unhandled draw mode primitive %i\n", mode); return ETNA_NO_MATCH;
+ }
+}
+
+/* Get size multiple for size of texture/rendertarget with a certain layout
+ * This is affected by many different parameters:
+ * - A horizontal multiple of 16 is used when possible as in this case tile status and resolve can be used
+ * at the cost of only a little bit extra memory usage.
+ * - If the surface is a texture, and HALIGN can not be specified on thie GPU, set tex_no_halign to 1
+ * If set, an horizontal multiple of 4 will be used for tiled and linear surfaces, otherwise one of 16.
+ * - If the surface is supertiled, horizontal and vertical multiple is always 64
+ * - If the surface is multi tiled or supertiled, make sure that the vertical size
+ * is a multiple of the number of pixel pipes as well.
+ * */
+static inline void etna_layout_multiple(unsigned layout, unsigned pixel_pipes,
+ bool tex_no_halign,
+ unsigned *paddingX, unsigned *paddingY, unsigned *halign)
+{
+ switch(layout)
+ {
+ case ETNA_LAYOUT_LINEAR:
+ *paddingX = tex_no_halign ? 4 : 16;
+ *paddingY = 1;
+ *halign = tex_no_halign ? TEXTURE_HALIGN_FOUR : TEXTURE_HALIGN_SIXTEEN;
+ break;
+ case ETNA_LAYOUT_TILED:
+ *paddingX = tex_no_halign ? 4 : 16;
+ *paddingY = 4;
+ *halign = tex_no_halign ? TEXTURE_HALIGN_FOUR : TEXTURE_HALIGN_SIXTEEN;
+ break;
+ case ETNA_LAYOUT_SUPER_TILED:
+ *paddingX = 64;
+ *paddingY = 64;
+ *halign = TEXTURE_HALIGN_SUPER_TILED;
+ break;
+ case ETNA_LAYOUT_MULTI_TILED:
+ *paddingX = 16;
+ *paddingY = 4 * pixel_pipes;
+ *halign = TEXTURE_HALIGN_SPLIT_TILED;
+ break;
+ case ETNA_LAYOUT_MULTI_SUPERTILED:
+ *paddingX = 64;
+ *paddingY = 64 * pixel_pipes;
+ *halign = TEXTURE_HALIGN_SPLIT_SUPER_TILED;
+ break;
+ default: DBG("Unhandled layout %i\n", layout);
+ }
+}
+
+/* return 32-bit clear pattern for color */
+static inline uint32_t translate_clear_color(enum pipe_format format, const union pipe_color_union *color)
+{
+ uint32_t clear_value = 0;
+ switch(format) // XXX util_pack_color
+ {
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
+ clear_value = etna_cfloat_to_uintN(color->f[2], 8) |
+ (etna_cfloat_to_uintN(color->f[1], 8) << 8) |
+ (etna_cfloat_to_uintN(color->f[0], 8) << 16) |
+ (etna_cfloat_to_uintN(color->f[3], 8) << 24);
+ break;
+ case PIPE_FORMAT_B4G4R4X4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
+ clear_value = etna_cfloat_to_uintN(color->f[2], 4) |
+ (etna_cfloat_to_uintN(color->f[1], 4) << 4) |
+ (etna_cfloat_to_uintN(color->f[0], 4) << 8) |
+ (etna_cfloat_to_uintN(color->f[3], 4) << 12);
+ clear_value |= clear_value << 16;
+ break;
+ case PIPE_FORMAT_B5G5R5X1_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
+ clear_value = etna_cfloat_to_uintN(color->f[2], 5) |
+ (etna_cfloat_to_uintN(color->f[1], 5) << 5) |
+ (etna_cfloat_to_uintN(color->f[0], 5) << 10) |
+ (etna_cfloat_to_uintN(color->f[3], 1) << 15);
+ clear_value |= clear_value << 16;
+ break;
+ case PIPE_FORMAT_B5G6R5_UNORM:
+ clear_value = etna_cfloat_to_uintN(color->f[2], 5) |
+ (etna_cfloat_to_uintN(color->f[1], 6) << 5) |
+ (etna_cfloat_to_uintN(color->f[0], 5) << 11);
+ clear_value |= clear_value << 16;
+ break;
+ default:
+ DBG("Unhandled pipe format for color clear: %i\n", format);
+ }
+ return clear_value;
+}
+
+static inline uint32_t translate_clear_depth_stencil(enum pipe_format format, float depth, unsigned stencil)
+{
+ uint32_t clear_value = 0;
+ switch(format) // XXX util_pack_color
+ {
+ case PIPE_FORMAT_Z16_UNORM:
+ clear_value = etna_cfloat_to_uintN(depth, 16);
+ clear_value |= clear_value << 16;
+ break;
+ case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
+ clear_value = (etna_cfloat_to_uintN(depth, 24) << 8) | (stencil & 0xFF);
+ break;
+ default:
+ DBG("Unhandled pipe format for depth stencil clear: %i\n", format);
+ }
+ return clear_value;
+}
+
+/* Convert MSAA number of samples to x and y scaling factor and VIVS_GL_MULTI_SAMPLE_CONFIG value.
+ * Return true if supported and false otherwise.
+ */
+static inline bool translate_samples_to_xyscale(int num_samples, int *xscale_out, int *yscale_out, uint32_t *config_out)
+{
+ int xscale, yscale;
+ uint32_t config;
+ switch(num_samples)
+ {
+ case 0:
+ case 1:
+ xscale = 1;
+ yscale = 1;
+ config = VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_NONE;
+ break;
+ case 2:
+ xscale = 2;
+ yscale = 1;
+ config = VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_2X;
+ break;
+ case 4:
+ xscale = 2;
+ yscale = 2;
+ config = VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_4X;
+ break;
+ default:
+ return false;
+ }
+ if(xscale_out)
+ *xscale_out = xscale;
+ if(yscale_out)
+ *yscale_out = yscale;
+ if(config_out)
+ *config_out = config;
+ return true;
+}
+
+#endif
+
diff --git a/src/driver/etna_zsa.c b/src/driver/etna_zsa.c
new file mode 100644
index 0000000..2c711b2
--- /dev/null
+++ b/src/driver/etna_zsa.c
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Depth stencil alpha CSOs */
+#include "etna_zsa.h"
+
+#include "etna_internal.h"
+#include "etna_pipe.h"
+#include "etna_translate.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_state.h"
+#include "util/u_memory.h"
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+
+static void *etna_pipe_create_depth_stencil_alpha_state(struct pipe_context *pipe,
+ const struct pipe_depth_stencil_alpha_state *dsa_p)
+{
+ //struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ struct compiled_depth_stencil_alpha_state *cs = CALLOC_STRUCT(compiled_depth_stencil_alpha_state);
+ struct pipe_depth_stencil_alpha_state dsa = *dsa_p;
+ /* XXX does stencil[0] / stencil[1] order depend on rs->front_ccw? */
+ bool early_z = true;
+ bool disable_zs = !dsa.depth.writemask;
+ int i;
+
+ /* Set operations to KEEP if write mask is 0.
+ * When we don't do this, the depth buffer is written for the entire primitive instead of
+ * just where the stencil condition holds (GC600 rev 0x0019, without feature CORRECT_STENCIL).
+ * Not sure if this is a hardware bug or just a strange edge case.
+ */
+ for(i=0; i<2; ++i)
+ {
+ if(dsa.stencil[i].writemask == 0)
+ {
+ dsa.stencil[i].fail_op = dsa.stencil[i].zfail_op = dsa.stencil[i].zpass_op = PIPE_STENCIL_OP_KEEP;
+ }
+ }
+
+ /* Determine whether to enable early z reject. Don't enable it when any of
+ * the stencil-modifying functions is used. */
+ if(dsa.stencil[0].enabled)
+ {
+ if(dsa.stencil[0].fail_op != PIPE_STENCIL_OP_KEEP ||
+ dsa.stencil[0].zfail_op != PIPE_STENCIL_OP_KEEP ||
+ dsa.stencil[0].zpass_op != PIPE_STENCIL_OP_KEEP)
+ {
+ disable_zs = early_z = false;
+ }
+ else if(dsa.stencil[1].enabled)
+ {
+ if(dsa.stencil[1].fail_op != PIPE_STENCIL_OP_KEEP ||
+ dsa.stencil[1].zfail_op != PIPE_STENCIL_OP_KEEP ||
+ dsa.stencil[1].zpass_op != PIPE_STENCIL_OP_KEEP)
+ {
+ disable_zs = early_z = false;
+ }
+ }
+ }
+ /* Disable early z reject when no depth test is enabled.
+ * This avoids having to sample depth even though we know it's going to succeed.
+ */
+ if(dsa.depth.enabled == false || dsa.depth.func == PIPE_FUNC_ALWAYS)
+ early_z = false;
+ if(DBG_ENABLED(ETNA_DBG_NO_EARLY_Z))
+ early_z = false;
+ /* compare funcs have 1 to 1 mapping */
+ cs->PE_DEPTH_CONFIG =
+ VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC(dsa.depth.enabled ? dsa.depth.func : PIPE_FUNC_ALWAYS) |
+ (dsa.depth.writemask ? VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE : 0) |
+ (early_z ? VIVS_PE_DEPTH_CONFIG_EARLY_Z : 0) |
+ (disable_zs ? VIVS_PE_DEPTH_CONFIG_DISABLE_ZS : 0);
+ cs->PE_ALPHA_OP =
+ (dsa.alpha.enabled ? VIVS_PE_ALPHA_OP_ALPHA_TEST : 0) |
+ VIVS_PE_ALPHA_OP_ALPHA_FUNC(dsa.alpha.func) |
+ VIVS_PE_ALPHA_OP_ALPHA_REF(etna_cfloat_to_uint8(dsa.alpha.ref_value));
+ cs->PE_STENCIL_OP =
+ VIVS_PE_STENCIL_OP_FUNC_FRONT(dsa.stencil[0].func) |
+ VIVS_PE_STENCIL_OP_FUNC_BACK(dsa.stencil[1].func) |
+ VIVS_PE_STENCIL_OP_FAIL_FRONT(translate_stencil_op(dsa.stencil[0].fail_op)) |
+ VIVS_PE_STENCIL_OP_FAIL_BACK(translate_stencil_op(dsa.stencil[1].fail_op)) |
+ VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT(translate_stencil_op(dsa.stencil[0].zfail_op)) |
+ VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK(translate_stencil_op(dsa.stencil[1].zfail_op)) |
+ VIVS_PE_STENCIL_OP_PASS_FRONT(translate_stencil_op(dsa.stencil[0].zpass_op)) |
+ VIVS_PE_STENCIL_OP_PASS_BACK(translate_stencil_op(dsa.stencil[1].zpass_op));
+ cs->PE_STENCIL_CONFIG =
+ translate_stencil_mode(dsa.stencil[0].enabled, dsa.stencil[1].enabled) |
+ VIVS_PE_STENCIL_CONFIG_MASK_FRONT(dsa.stencil[0].valuemask) |
+ VIVS_PE_STENCIL_CONFIG_WRITE_MASK(dsa.stencil[0].writemask);
+ /* XXX back masks in VIVS_PE_DEPTH_CONFIG_EXT? */
+ /* XXX VIVS_PE_STENCIL_CONFIG_REF_FRONT comes from pipe_stencil_ref */
+
+ /* XXX does alpha/stencil test affect PE_COLOR_FORMAT_OVERWRITE? */
+ return cs;
+}
+
+static void etna_pipe_bind_depth_stencil_alpha_state(struct pipe_context *pipe, void *dsa)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ priv->dirty_bits |= ETNA_STATE_DSA;
+ priv->depth_stencil_alpha_p = dsa;
+ if(dsa)
+ priv->depth_stencil_alpha = *(struct compiled_depth_stencil_alpha_state*)dsa;
+}
+
+static void etna_pipe_delete_depth_stencil_alpha_state(struct pipe_context *pipe, void *dsa)
+{
+ //struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ FREE(dsa);
+}
+
+void etna_pipe_zsa_init(struct pipe_context *pc)
+{
+ pc->create_depth_stencil_alpha_state = etna_pipe_create_depth_stencil_alpha_state;
+ pc->bind_depth_stencil_alpha_state = etna_pipe_bind_depth_stencil_alpha_state;
+ pc->delete_depth_stencil_alpha_state = etna_pipe_delete_depth_stencil_alpha_state;
+}
+
diff --git a/src/driver/etna_zsa.h b/src/driver/etna_zsa.h
new file mode 100644
index 0000000..260601a
--- /dev/null
+++ b/src/driver/etna_zsa.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Depth stencil alpha CSOs */
+#ifndef H_ETNA_ZSA
+#define H_ETNA_ZSA
+
+struct pipe_context;
+
+void etna_pipe_zsa_init(struct pipe_context *pipe);
+
+#endif
+
diff --git a/src/egl/.gitignore b/src/egl/.gitignore
new file mode 100644
index 0000000..6bddcdf
--- /dev/null
+++ b/src/egl/.gitignore
@@ -0,0 +1,11 @@
+cube
+cube_companion
+ps_sandbox
+eglinfo
+cube_companion_idx
+cube_x11
+simple_texture_cubemap
+particle_system_x11
+stencil_test
+displacement
+clear_surface
diff --git a/src/egl/Makefile b/src/egl/Makefile
new file mode 100644
index 0000000..c8f7b34
--- /dev/null
+++ b/src/egl/Makefile
@@ -0,0 +1,61 @@
+TOP=..
+
+include $(TOP)/Makefile.inc
+
+COMMON_FLAGS += -I../resources
+
+ifeq ($(USE_DIRECTFB),1)
+ DIRECTFB_FLAGS = -DLINUX -DEGL_API_DFB -I/usr/include/directfb/
+else
+ DIRECTFB_FLAGS =
+endif
+
+CFLAGS += $(COMMON_FLAGS) $(DIRECTFB_FLAGS)
+CXXFLAGS += $(COMMON_FLAGS) $(DIRECTFB_FLAGS)
+LDFLAGS += -ldl
+
+GL_LIBS = $(PLATFORM_GL_LIBS)
+TARGETS = cube cube_companion ps_sandbox eglinfo cube_companion_idx simple_texture_cubemap displacement
+TARGETS_X11 = cube_x11 particle_system_x11
+LIB_OBJS = ../lib/esTransform.o ../lib/esShapes.o ../lib/elf_hook.o ../lib/flightrecorder.o ../lib/viv_hook.o ../lib/write_bmp.o ../lib/dump_gl_screen.o ../lib/eglutil.o
+COMPANION_OBJS = ../resources/companion_array.o ../resources/companion_mesh.o ../resources/companion_texture.o
+
+all: $(TARGETS)
+
+all_x11: $(TARGETS_X11)
+
+clean:
+ rm -f *.o ../lib/*.o
+ rm -f $(TARGETS) $(COMPANION_OBJS) $(TARGETS_X11)
+
+cube: cube.o $(LIB_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(GL_LIBS) $(LDFLAGS)
+
+displacement: displacement.o ../lib/esShapes.o $(LIB_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(GL_LIBS) $(LDFLAGS)
+
+
+cube_companion: cube_companion.o $(LIB_OBJS) $(COMPANION_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(GL_LIBS) $(LDFLAGS)
+
+cube_companion_idx: cube_companion_idx.o $(LIB_OBJS) $(COMPANION_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(GL_LIBS) $(LDFLAGS)
+
+ps_sandbox: ps_sandbox.o $(LIB_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(GL_LIBS) $(LDFLAGS)
+
+simple_texture_cubemap: simple_texture_cubemap.o $(LIB_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(GL_LIBS) $(LDFLAGS)
+
+eglinfo: eglinfo.o $(LIB_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(GL_LIBS) $(LDFLAGS)
+
+stencil_test: stencil_test.o ${LIB_OBJS}
+ $(CXX) $(CFLAGS) -o $@ $^ $(GL_LIBS) $(LDFLAGS)
+
+cube_x11: cube_x11.o ../lib/esUtil.o ../lib/esWindow.o $(LIB_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(GL_LIBS) $(LDFLAGS) -lX11
+
+particle_system_x11: particle_system_x11.o ../lib/esUtil.o ../lib/esWindow.o ../lib/esShader.o $(LIB_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(GL_LIBS) $(LDFLAGS) -lX11
+
diff --git a/src/egl/clear_surface.c b/src/egl/clear_surface.c
new file mode 100644
index 0000000..f53ab86
--- /dev/null
+++ b/src/egl/clear_surface.c
@@ -0,0 +1,440 @@
+/*
+ * Copyright (c) 2011-2012 Luc Verhaegen <libv@codethink.co.uk>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#define HOOK
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdbool.h>
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+#include <dlfcn.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include "esTransform.h"
+#include "eglutil.h"
+#include "dump_gl_screen.h"
+#include "viv_hook.h"
+
+static EGLint const config_attribute_list[] = {
+ EGL_RED_SIZE, 8,
+ EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8,
+ EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+ EGL_DEPTH_SIZE, 8,
+ EGL_NONE
+};
+
+static EGLint const pbuffer_attribute_list[] = {
+ EGL_WIDTH, 400,
+ EGL_HEIGHT, 240,
+ EGL_LARGEST_PBUFFER, EGL_TRUE,
+ EGL_NONE
+};
+
+static const EGLint context_attribute_list[] = {
+ EGL_CONTEXT_CLIENT_VERSION, 2,
+ EGL_NONE
+};
+
+int main(int argc, char *argv[])
+{
+ EGLDisplay display;
+ EGLint egl_major, egl_minor;
+ EGLConfig config;
+ EGLint num_config;
+ EGLContext context;
+ EGLSurface surface;
+ GLuint vertex_shader;
+ GLuint fragment_shader;
+ GLuint program;
+ GLint ret;
+ GLint width, height;
+#ifdef HOOK
+ the_hook("/home/debian/egl_clear_surface.fdr");
+#endif
+
+ const char *vertex_shader_source =
+ "uniform mat4 modelviewMatrix;\n"
+ "uniform mat4 modelviewprojectionMatrix;\n"
+ "uniform mat3 normalMatrix;\n"
+ "\n"
+ "attribute vec4 in_position; \n"
+ "attribute vec3 in_normal; \n"
+ "attribute vec4 in_color; \n"
+ "\n"
+ "vec4 lightSource = vec4(2.0, 2.0, 20.0, 0.0);\n"
+ " \n"
+ "varying vec4 vVaryingColor; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = modelviewprojectionMatrix * in_position;\n"
+ " vec3 vEyeNormal = normalMatrix * in_normal;\n"
+ " vec4 vPosition4 = modelviewMatrix * in_position;\n"
+ " vec3 vPosition3 = vPosition4.xyz / vPosition4.w;\n"
+ " vec3 vLightDir = normalize(lightSource.xyz - vPosition3);\n"
+ " float diff = max(0.0, dot(vEyeNormal, vLightDir));\n"
+ " vVaryingColor = vec4(diff * in_color.rgb, 1.0);\n"
+ "} \n";
+
+ const char *fragment_shader_source =
+ "precision mediump float; \n"
+ " \n"
+ "varying vec4 vVaryingColor; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = vVaryingColor; \n"
+ "} \n";
+
+ GLfloat vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+ };
+
+ GLfloat vColors[] = {
+ // front
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f, // magenta
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ // back
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 1.0f, 0.0f, // yellow
+ 0.0f, 1.0f, 0.0f, // green
+ // right
+ 1.0f, 0.0f, 1.0f, // magenta
+ 1.0f, 0.0f, 0.0f, // red
+ 1.0f, 1.0f, 1.0f, // white
+ 1.0f, 1.0f, 0.0f, // yellow
+ // left
+ 0.0f, 0.0f, 0.0f, // black
+ 0.0f, 0.0f, 1.0f, // blue
+ 0.0f, 1.0f, 0.0f, // green
+ 0.0f, 1.0f, 1.0f, // cyan
+ // top
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ 0.0f, 1.0f, 0.0f, // green
+ 1.0f, 1.0f, 0.0f, // yellow
+ // bottom
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f // magenta
+ };
+
+ GLfloat vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+ };
+
+ display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+ if (display == EGL_NO_DISPLAY) {
+ printf("Error: No display found!\n");
+ return -1;
+ }
+
+ if (!eglInitialize(display, &egl_major, &egl_minor)) {
+ printf("Error: eglInitialise failed!\n");
+ return -1;
+ }
+
+ printf("Using display %p with EGL version %d.%d\n",
+ display, egl_major, egl_minor);
+
+ printf("EGL Version \"%s\"\n", eglQueryString(display, EGL_VERSION));
+ printf("EGL Vendor \"%s\"\n", eglQueryString(display, EGL_VENDOR));
+ printf("EGL Extensions \"%s\"\n", eglQueryString(display, EGL_EXTENSIONS));
+
+ /* get an appropriate EGL frame buffer configuration */
+ eglChooseConfig(display, config_attribute_list, &config, 1, &num_config);
+
+ /* create an EGL rendering context */
+ context = eglCreateContext(display, config, EGL_NO_CONTEXT, context_attribute_list);
+ if (context == EGL_NO_CONTEXT) {
+ printf("Error: eglCreateContext failed: %d\n", eglGetError());
+ return -1;
+ }
+
+ surface = eglCreatePbufferSurface(display, config, pbuffer_attribute_list);
+ if (surface == EGL_NO_SURFACE) {
+ printf("Error: eglCreatePbufferSurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ if (!eglQuerySurface(display, surface, EGL_WIDTH, &width) ||
+ !eglQuerySurface(display, surface, EGL_HEIGHT, &height)) {
+ printf("Error: eglQuerySurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+ printf("PBuffer: %dx%d\n", width, height);
+ printf("GL Extensions \"%s\"\n", glGetString(GL_EXTENSIONS));
+
+ /* connect the context to the surface */
+ if (!eglMakeCurrent(display, surface, surface, context)) {
+ printf("Error: eglMakeCurrent() failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ //vertex_shader = glCreateShader(GL_VERTEX_SHADER);
+ //if (!vertex_shader) {
+ // printf("Error: glCreateShader(GL_VERTEX_SHADER) failed: %d (%s)\n",
+ // eglGetError(), eglStrError(eglGetError()));
+ // return -1;
+ //}
+
+
+ //glShaderSource(vertex_shader, 1, &vertex_shader_source, NULL);
+ //glCompileShader(vertex_shader);
+
+ /*glGetShaderiv(vertex_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: vertex shader compilation failed!:\n");
+ glGetShaderiv(vertex_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(vertex_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Vertex shader compilation succeeded!\n");
+
+ fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);
+ if (!fragment_shader) {
+ printf("Error: glCreateShader(GL_FRAGMENT_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(fragment_shader, 1, &fragment_shader_source, NULL);
+ glCompileShader(fragment_shader);*/
+
+ /*glGetShaderiv(fragment_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: fragment shader compilation failed!:\n");
+ glGetShaderiv(fragment_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(fragment_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Fragment shader compilation succeeded!\n");
+
+ program = glCreateProgram();
+ if (!program) {
+ printf("Error: failed to create program!\n");
+ return -1;
+ }
+
+ glAttachShader(program, vertex_shader);
+ glAttachShader(program, fragment_shader);
+
+ glBindAttribLocation(program, 0, "in_position");
+ glBindAttribLocation(program, 1, "in_normal");
+ glBindAttribLocation(program, 2, "in_color");
+
+ glLinkProgram(program);
+
+ glGetProgramiv(program, GL_LINK_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: program linking failed!:\n");
+ glGetProgramiv(program, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetProgramInfoLog(program, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("program linking succeeded!\n");
+
+ glUseProgram(program);*/
+
+ glViewport(0, 0, width, height);
+
+ /* clear the color buffer */
+ glClearColor(0.5, 0.5, 0.5, 1.0);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ //glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vVertices);
+ //glEnableVertexAttribArray(0);
+
+ //glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, vNormals);
+ //glEnableVertexAttribArray(1);
+
+ //glVertexAttribPointer(2, 3, GL_FLOAT, GL_FALSE, 0, vColors);
+ //glEnableVertexAttribArray(2);
+
+ /*ESMatrix modelview;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, 10.0f, 0.0f, 0.0f, 1.0f);
+
+ GLfloat aspect = (GLfloat)(height) / (GLfloat)(width);
+
+ ESMatrix projection;
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 10.0f);
+
+ ESMatrix modelviewprojection;
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+
+ float normal[9];
+ normal[0] = modelview.m[0][0];
+ normal[1] = modelview.m[0][1];
+ normal[2] = modelview.m[0][2];
+ normal[3] = modelview.m[1][0];
+ normal[4] = modelview.m[1][1];
+ normal[5] = modelview.m[1][2];
+ normal[6] = modelview.m[2][0];
+ normal[7] = modelview.m[2][1];
+ normal[8] = modelview.m[2][2];
+
+ GLint modelviewmatrix_handle = glGetUniformLocation(program, "modelviewMatrix");
+ GLint modelviewprojectionmatrix_handle = glGetUniformLocation(program, "modelviewprojectionMatrix");
+ GLint normalmatrix_handle = glGetUniformLocation(program, "normalMatrix");
+
+ glUniformMatrix4fv(modelviewmatrix_handle, 1, GL_FALSE, &modelview.m[0][0]);
+ glUniformMatrix4fv(modelviewprojectionmatrix_handle, 1, GL_FALSE, &modelviewprojection.m[0][0]);
+ glUniformMatrix3fv(normalmatrix_handle, 1, GL_FALSE, normal);
+
+ printf("Model view\n");
+ for(int i=0; i<4; ++i)
+ {
+ printf(" ");
+ for(int j=0; j<4; ++j)
+ printf("%f ", modelview.m[i][j]);
+ printf("\n");
+ }
+ printf("Model view projection\n");
+ for(int i=0; i<4; ++i)
+ {
+ printf(" ");
+ for(int j=0; j<4; ++j)
+ printf("%f ", modelviewprojection.m[i][j]);
+ printf("\n");
+ }
+
+ glEnable(GL_CULL_FACE);
+
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 4, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 8, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 12, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 16, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 20, 4);*/
+
+ glFlush();
+
+ fflush(stdout);
+ dump_gl_screen("/home/debian/egl_clear_surface.bmp", width, height);
+
+#ifdef HOOK
+ close_hook();
+#endif
+
+ return 0;
+}
diff --git a/src/egl/cube.c b/src/egl/cube.c
new file mode 100644
index 0000000..3df23be
--- /dev/null
+++ b/src/egl/cube.c
@@ -0,0 +1,440 @@
+/*
+ * Copyright (c) 2011-2012 Luc Verhaegen <libv@codethink.co.uk>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#define HOOK
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdbool.h>
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+#include <dlfcn.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include "esTransform.h"
+#include "eglutil.h"
+#include "dump_gl_screen.h"
+#include "viv_hook.h"
+
+static EGLint const config_attribute_list[] = {
+ EGL_RED_SIZE, 8,
+ EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8,
+ EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+ EGL_DEPTH_SIZE, 8,
+ EGL_NONE
+};
+
+static EGLint const pbuffer_attribute_list[] = {
+ EGL_WIDTH, 400,
+ EGL_HEIGHT, 240,
+ EGL_LARGEST_PBUFFER, EGL_TRUE,
+ EGL_NONE
+};
+
+static const EGLint context_attribute_list[] = {
+ EGL_CONTEXT_CLIENT_VERSION, 2,
+ EGL_NONE
+};
+
+int main(int argc, char *argv[])
+{
+ EGLDisplay display;
+ EGLint egl_major, egl_minor;
+ EGLConfig config;
+ EGLint num_config;
+ EGLContext context;
+ EGLSurface surface;
+ GLuint vertex_shader;
+ GLuint fragment_shader;
+ GLuint program;
+ GLint ret;
+ GLint width, height;
+#ifdef HOOK
+ the_hook("/mnt/sdcard/egl2.fdr");
+#endif
+
+ const char *vertex_shader_source =
+ "uniform mat4 modelviewMatrix;\n"
+ "uniform mat4 modelviewprojectionMatrix;\n"
+ "uniform mat3 normalMatrix;\n"
+ "\n"
+ "attribute vec4 in_position; \n"
+ "attribute vec3 in_normal; \n"
+ "attribute vec4 in_color; \n"
+ "\n"
+ "vec4 lightSource = vec4(2.0, 2.0, 20.0, 0.0);\n"
+ " \n"
+ "varying vec4 vVaryingColor; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = modelviewprojectionMatrix * in_position;\n"
+ " vec3 vEyeNormal = normalMatrix * in_normal;\n"
+ " vec4 vPosition4 = modelviewMatrix * in_position;\n"
+ " vec3 vPosition3 = vPosition4.xyz / vPosition4.w;\n"
+ " vec3 vLightDir = normalize(lightSource.xyz - vPosition3);\n"
+ " float diff = max(0.0, dot(vEyeNormal, vLightDir));\n"
+ " vVaryingColor = vec4(diff * in_color.rgb, 1.0);\n"
+ "} \n";
+
+ const char *fragment_shader_source =
+ "precision mediump float; \n"
+ " \n"
+ "varying vec4 vVaryingColor; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = vVaryingColor; \n"
+ "} \n";
+
+ GLfloat vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+ };
+
+ GLfloat vColors[] = {
+ // front
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f, // magenta
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ // back
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 1.0f, 0.0f, // yellow
+ 0.0f, 1.0f, 0.0f, // green
+ // right
+ 1.0f, 0.0f, 1.0f, // magenta
+ 1.0f, 0.0f, 0.0f, // red
+ 1.0f, 1.0f, 1.0f, // white
+ 1.0f, 1.0f, 0.0f, // yellow
+ // left
+ 0.0f, 0.0f, 0.0f, // black
+ 0.0f, 0.0f, 1.0f, // blue
+ 0.0f, 1.0f, 0.0f, // green
+ 0.0f, 1.0f, 1.0f, // cyan
+ // top
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ 0.0f, 1.0f, 0.0f, // green
+ 1.0f, 1.0f, 0.0f, // yellow
+ // bottom
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f // magenta
+ };
+
+ GLfloat vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+ };
+
+ display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+ if (display == EGL_NO_DISPLAY) {
+ printf("Error: No display found!\n");
+ return -1;
+ }
+
+ if (!eglInitialize(display, &egl_major, &egl_minor)) {
+ printf("Error: eglInitialise failed!\n");
+ return -1;
+ }
+
+ printf("Using display %p with EGL version %d.%d\n",
+ display, egl_major, egl_minor);
+
+ printf("EGL Version \"%s\"\n", eglQueryString(display, EGL_VERSION));
+ printf("EGL Vendor \"%s\"\n", eglQueryString(display, EGL_VENDOR));
+ printf("EGL Extensions \"%s\"\n", eglQueryString(display, EGL_EXTENSIONS));
+
+ /* get an appropriate EGL frame buffer configuration */
+ eglChooseConfig(display, config_attribute_list, &config, 1, &num_config);
+
+ /* create an EGL rendering context */
+ context = eglCreateContext(display, config, EGL_NO_CONTEXT, context_attribute_list);
+ if (context == EGL_NO_CONTEXT) {
+ printf("Error: eglCreateContext failed: %d\n", eglGetError());
+ return -1;
+ }
+
+ surface = eglCreatePbufferSurface(display, config, pbuffer_attribute_list);
+ if (surface == EGL_NO_SURFACE) {
+ printf("Error: eglCreatePbufferSurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ if (!eglQuerySurface(display, surface, EGL_WIDTH, &width) ||
+ !eglQuerySurface(display, surface, EGL_HEIGHT, &height)) {
+ printf("Error: eglQuerySurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+ printf("PBuffer: %dx%d\n", width, height);
+ printf("GL Extensions \"%s\"\n", glGetString(GL_EXTENSIONS));
+
+ /* connect the context to the surface */
+ if (!eglMakeCurrent(display, surface, surface, context)) {
+ printf("Error: eglMakeCurrent() failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ vertex_shader = glCreateShader(GL_VERTEX_SHADER);
+ if (!vertex_shader) {
+ printf("Error: glCreateShader(GL_VERTEX_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(vertex_shader, 1, &vertex_shader_source, NULL);
+ glCompileShader(vertex_shader);
+
+ glGetShaderiv(vertex_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: vertex shader compilation failed!:\n");
+ glGetShaderiv(vertex_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(vertex_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Vertex shader compilation succeeded!\n");
+
+ fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);
+ if (!fragment_shader) {
+ printf("Error: glCreateShader(GL_FRAGMENT_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(fragment_shader, 1, &fragment_shader_source, NULL);
+ glCompileShader(fragment_shader);
+
+ glGetShaderiv(fragment_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: fragment shader compilation failed!:\n");
+ glGetShaderiv(fragment_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(fragment_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Fragment shader compilation succeeded!\n");
+
+ program = glCreateProgram();
+ if (!program) {
+ printf("Error: failed to create program!\n");
+ return -1;
+ }
+
+ glAttachShader(program, vertex_shader);
+ glAttachShader(program, fragment_shader);
+
+ glBindAttribLocation(program, 0, "in_position");
+ glBindAttribLocation(program, 1, "in_normal");
+ glBindAttribLocation(program, 2, "in_color");
+
+ glLinkProgram(program);
+
+ glGetProgramiv(program, GL_LINK_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: program linking failed!:\n");
+ glGetProgramiv(program, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetProgramInfoLog(program, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("program linking succeeded!\n");
+
+ glUseProgram(program);
+
+ glViewport(0, 0, width, height);
+
+ /* clear the color buffer */
+ glClearColor(0.5, 0.5, 0.5, 1.0);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vVertices);
+ glEnableVertexAttribArray(0);
+
+ glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, vNormals);
+ glEnableVertexAttribArray(1);
+
+ glVertexAttribPointer(2, 3, GL_FLOAT, GL_FALSE, 0, vColors);
+ glEnableVertexAttribArray(2);
+
+ ESMatrix modelview;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, 10.0f, 0.0f, 0.0f, 1.0f);
+
+ GLfloat aspect = (GLfloat)(height) / (GLfloat)(width);
+
+ ESMatrix projection;
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 10.0f);
+
+ ESMatrix modelviewprojection;
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+
+ float normal[9];
+ normal[0] = modelview.m[0][0];
+ normal[1] = modelview.m[0][1];
+ normal[2] = modelview.m[0][2];
+ normal[3] = modelview.m[1][0];
+ normal[4] = modelview.m[1][1];
+ normal[5] = modelview.m[1][2];
+ normal[6] = modelview.m[2][0];
+ normal[7] = modelview.m[2][1];
+ normal[8] = modelview.m[2][2];
+
+ GLint modelviewmatrix_handle = glGetUniformLocation(program, "modelviewMatrix");
+ GLint modelviewprojectionmatrix_handle = glGetUniformLocation(program, "modelviewprojectionMatrix");
+ GLint normalmatrix_handle = glGetUniformLocation(program, "normalMatrix");
+
+ glUniformMatrix4fv(modelviewmatrix_handle, 1, GL_FALSE, &modelview.m[0][0]);
+ glUniformMatrix4fv(modelviewprojectionmatrix_handle, 1, GL_FALSE, &modelviewprojection.m[0][0]);
+ glUniformMatrix3fv(normalmatrix_handle, 1, GL_FALSE, normal);
+
+ printf("Model view\n");
+ for(int i=0; i<4; ++i)
+ {
+ printf(" ");
+ for(int j=0; j<4; ++j)
+ printf("%f ", modelview.m[i][j]);
+ printf("\n");
+ }
+ printf("Model view projection\n");
+ for(int i=0; i<4; ++i)
+ {
+ printf(" ");
+ for(int j=0; j<4; ++j)
+ printf("%f ", modelviewprojection.m[i][j]);
+ printf("\n");
+ }
+
+ glEnable(GL_CULL_FACE);
+
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 4, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 8, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 12, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 16, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 20, 4);
+
+ glFlush();
+
+ fflush(stdout);
+ dump_gl_screen("/sdcard/egl2.bmp", width, height);
+
+#ifdef HOOK
+ close_hook();
+#endif
+
+ return 0;
+}
diff --git a/src/egl/cube_companion.c b/src/egl/cube_companion.c
new file mode 100644
index 0000000..9031508
--- /dev/null
+++ b/src/egl/cube_companion.c
@@ -0,0 +1,373 @@
+/*
+ * Copyright (c) 2011-2012 Luc Verhaegen <libv@skynet.be>
+ * Copyright (c) 2012 Arvin Schnell <arvin.schnell@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+
+#include "esTransform.h"
+#include "companion.h"
+#include "dump_gl_screen.h"
+#include "viv_hook.h"
+#include "eglutil.h"
+
+#define ONSCREEN 0
+#define WIDTH 800
+#define HEIGHT 480
+
+static EGLint const config_attribute_list[] = {
+ EGL_RED_SIZE, 8,
+ EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8,
+ EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+ EGL_DEPTH_SIZE, 8,
+ EGL_NONE
+};
+
+static EGLint const pbuffer_attribute_list[] = {
+ EGL_WIDTH, WIDTH,
+ EGL_HEIGHT, HEIGHT,
+ EGL_LARGEST_PBUFFER, EGL_TRUE,
+ EGL_NONE
+};
+
+static const EGLint context_attribute_list[] = {
+ EGL_CONTEXT_CLIENT_VERSION, 2,
+ EGL_NONE
+};
+
+int main(int argc, char *argv[])
+{
+ EGLDisplay display;
+ EGLint egl_major, egl_minor;
+ EGLConfig config;
+ EGLint num_config;
+ EGLContext context;
+ EGLSurface surface;
+ GLuint vertex_shader;
+ GLuint fragment_shader;
+ GLuint program;
+ GLint ret;
+ GLint width, height;
+ GLuint texture;
+
+ the_hook("/mnt/sdcard/egl2.fdr");
+#if ONSCREEN
+ struct mali_native_window window = {WIDTH, HEIGHT};
+#endif
+
+ const char *vertex_shader_source =
+ "uniform mat4 modelviewMatrix;\n"
+ "uniform mat4 modelviewprojectionMatrix;\n"
+ "uniform mat3 normalMatrix;\n"
+ "\n"
+ "attribute vec4 in_position; \n"
+ "attribute vec3 in_normal; \n"
+ "attribute vec2 in_coord; \n"
+ "\n"
+ "vec4 lightSource = vec4(2.0, 2.0, 20.0, 0.0);\n"
+ " \n"
+ "varying vec4 vVaryingColor; \n"
+ "varying vec2 coord; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = modelviewprojectionMatrix * in_position;\n"
+ " vec3 vEyeNormal = normalMatrix * in_normal;\n"
+ " vec4 vPosition4 = modelviewMatrix * in_position;\n"
+ " vec3 vPosition3 = vPosition4.xyz / vPosition4.w;\n"
+ " vec3 vLightDir = normalize(lightSource.xyz - vPosition3);\n"
+ " float diff = max(0.0, dot(vEyeNormal, vLightDir));\n"
+ " vVaryingColor = vec4(diff * vec3(1.0, 1.0, 1.0), 1.0);\n"
+ " coord = in_coord; \n"
+ "} \n";
+
+ const char *fragment_shader_source =
+ "precision mediump float; \n"
+ " \n"
+ "varying vec4 vVaryingColor; \n"
+ "varying vec2 coord; \n"
+ " \n"
+ "uniform sampler2D in_texture; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = 3.0 * vVaryingColor * texture2D(in_texture, coord);\n"
+ "} \n";
+
+ float *vertices_array = companion_vertices_array();
+ float *texture_coordinates_array =
+ companion_texture_coordinates_array();
+ float *normals_array = companion_normals_array();
+
+ display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+ if (display == EGL_NO_DISPLAY) {
+ printf("Error: No display found!\n");
+ return -1;
+ }
+
+ if (!eglInitialize(display, &egl_major, &egl_minor)) {
+ printf("Error: eglInitialise failed!\n");
+ return -1;
+ }
+
+ printf("Using display %p with EGL version %d.%d\n",
+ display, egl_major, egl_minor);
+
+ printf("EGL Version \"%s\"\n", eglQueryString(display, EGL_VERSION));
+ printf("EGL Vendor \"%s\"\n", eglQueryString(display, EGL_VENDOR));
+ printf("EGL Extensions \"%s\"\n", eglQueryString(display, EGL_EXTENSIONS));
+
+ /* get an appropriate EGL frame buffer configuration */
+ eglChooseConfig(display, config_attribute_list, &config, 1, &num_config);
+
+ /* create an EGL rendering context */
+ context = eglCreateContext(display, config, EGL_NO_CONTEXT, context_attribute_list);
+ if (context == EGL_NO_CONTEXT) {
+ printf("Error: eglCreateContext failed: %d\n", eglGetError());
+ return -1;
+ }
+
+#if ONSCREEN
+ surface = eglCreateWindowSurface(display, config, &window, NULL);
+ if (surface == EGL_NO_SURFACE) {
+ printf("Error: eglCreateWindowSurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+#else
+ surface = eglCreatePbufferSurface(display, config, pbuffer_attribute_list);
+ if (surface == EGL_NO_SURFACE) {
+ printf("Error: eglCreatePbufferSurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+#endif
+
+ if (!eglQuerySurface(display, surface, EGL_WIDTH, &width) ||
+ !eglQuerySurface(display, surface, EGL_HEIGHT, &height)) {
+ printf("Error: eglQuerySurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+ printf("PBuffer: %dx%d\n", width, height);
+
+ /* connect the context to the surface */
+ if (!eglMakeCurrent(display, surface, surface, context)) {
+ printf("Error: eglMakeCurrent() failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ vertex_shader = glCreateShader(GL_VERTEX_SHADER);
+ if (!vertex_shader) {
+ printf("Error: glCreateShader(GL_VERTEX_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(vertex_shader, 1, &vertex_shader_source, NULL);
+ glCompileShader(vertex_shader);
+
+ glGetShaderiv(vertex_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: vertex shader compilation failed!:\n");
+ glGetShaderiv(vertex_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(vertex_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Vertex shader compilation succeeded!\n");
+
+ fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);
+ if (!fragment_shader) {
+ printf("Error: glCreateShader(GL_FRAGMENT_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(fragment_shader, 1, &fragment_shader_source, NULL);
+ glCompileShader(fragment_shader);
+
+ glGetShaderiv(fragment_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: fragment shader compilation failed!:\n");
+ glGetShaderiv(fragment_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(fragment_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Fragment shader compilation succeeded!\n");
+
+ program = glCreateProgram();
+ if (!program) {
+ printf("Error: failed to create program!\n");
+ return -1;
+ }
+
+ glAttachShader(program, vertex_shader);
+ glAttachShader(program, fragment_shader);
+
+ glBindAttribLocation(program, 0, "in_position");
+ glBindAttribLocation(program, 1, "in_normal");
+ glBindAttribLocation(program, 2, "in_coord");
+
+ glLinkProgram(program);
+
+ glGetProgramiv(program, GL_LINK_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: program linking failed!:\n");
+ glGetProgramiv(program, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetProgramInfoLog(program, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("program linking succeeded!\n");
+
+ glUseProgram(program);
+
+ glViewport(0, 0, width, height);
+
+ /* clear the color buffer */
+ glClearColor(0.5, 0.5, 0.5, 1.0);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vertices_array);
+ glEnableVertexAttribArray(0);
+
+ glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, normals_array);
+ glEnableVertexAttribArray(1);
+
+ glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, 0,
+ texture_coordinates_array);
+ glEnableVertexAttribArray(2);
+
+ ESMatrix modelview;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, 10.0f, 0.0f, 0.0f, 1.0f);
+ esScale(&modelview, 0.475f, 0.475f, 0.475f);
+
+ GLfloat aspect = (GLfloat)(height) / (GLfloat)(width);
+
+ ESMatrix projection;
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 11.0f);
+
+ ESMatrix modelviewprojection;
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+
+ float normal[9];
+ normal[0] = modelview.m[0][0];
+ normal[1] = modelview.m[0][1];
+ normal[2] = modelview.m[0][2];
+ normal[3] = modelview.m[1][0];
+ normal[4] = modelview.m[1][1];
+ normal[5] = modelview.m[1][2];
+ normal[6] = modelview.m[2][0];
+ normal[7] = modelview.m[2][1];
+ normal[8] = modelview.m[2][2];
+
+ glEnable(GL_TEXTURE_2D);
+
+ glGenTextures(1, &texture);
+ glBindTexture(GL_TEXTURE_2D, texture);
+
+ //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+
+ //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT);
+ //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB,
+ COMPANION_TEXTURE_WIDTH, COMPANION_TEXTURE_HEIGHT, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, companion_texture);
+ glGenerateMipmap(GL_TEXTURE_2D);
+
+ GLint modelviewmatrix_handle = glGetUniformLocation(program, "modelviewMatrix");
+ GLint modelviewprojectionmatrix_handle = glGetUniformLocation(program, "modelviewprojectionMatrix");
+ GLint normalmatrix_handle = glGetUniformLocation(program, "normalMatrix");
+
+ glUniformMatrix4fv(modelviewmatrix_handle, 1, GL_FALSE, &modelview.m[0][0]);
+ glUniformMatrix4fv(modelviewprojectionmatrix_handle, 1, GL_FALSE, &modelviewprojection.m[0][0]);
+ glUniformMatrix3fv(normalmatrix_handle, 1, GL_FALSE, normal);
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, texture);
+
+ GLint texture_loc = glGetUniformLocation(program, "in_texture");
+ glUniform1i(texture_loc, 0); // 0 -> GL_TEXTURE0 in glActiveTexture
+
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_DEPTH_TEST);
+
+ glDrawArrays(GL_TRIANGLES, 0, COMPANION_ARRAY_COUNT);
+
+ glFlush();
+
+#if ONSCREEN
+ eglSwapBuffers(display, surface);
+#endif
+
+ fflush(stdout);
+ dump_gl_screen("/sdcard/egl2.bmp", width, height);
+ close_hook();
+
+ return 0;
+}
diff --git a/src/egl/cube_companion_idx.c b/src/egl/cube_companion_idx.c
new file mode 100644
index 0000000..94294e4
--- /dev/null
+++ b/src/egl/cube_companion_idx.c
@@ -0,0 +1,357 @@
+/*
+ * Copyright (c) 2011-2012 Luc Verhaegen <libv@skynet.be>
+ * Copyright (c) 2012 Arvin Schnell <arvin.schnell@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+
+#include "esTransform.h"
+#include "eglutil.h"
+#include "companion.h"
+#include "dump_gl_screen.h"
+#include "viv_hook.h"
+
+#define ONSCREEN 0
+#define WIDTH 800
+#define HEIGHT 480
+
+static EGLint const config_attribute_list[] = {
+ EGL_RED_SIZE, 8,
+ EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8,
+ EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+ EGL_DEPTH_SIZE, 8,
+ EGL_NONE
+};
+
+static EGLint const pbuffer_attribute_list[] = {
+ EGL_WIDTH, WIDTH,
+ EGL_HEIGHT, HEIGHT,
+ EGL_LARGEST_PBUFFER, EGL_TRUE,
+ EGL_NONE
+};
+
+static const EGLint context_attribute_list[] = {
+ EGL_CONTEXT_CLIENT_VERSION, 2,
+ EGL_NONE
+};
+
+int main(int argc, char *argv[])
+{
+ EGLDisplay display;
+ EGLint egl_major, egl_minor;
+ EGLConfig config;
+ EGLint num_config;
+ EGLContext context;
+ EGLSurface surface;
+ GLuint vertex_shader;
+ GLuint fragment_shader;
+ GLuint program;
+ GLint ret;
+ GLint width, height;
+ GLuint texture;
+
+ the_hook("/mnt/sdcard/egl2.fdr");
+#if ONSCREEN
+ struct mali_native_window window = {WIDTH, HEIGHT};
+#endif
+
+ const char *vertex_shader_source =
+ "uniform mat4 modelviewMatrix;\n"
+ "uniform mat4 modelviewprojectionMatrix;\n"
+ "uniform mat3 normalMatrix;\n"
+ "\n"
+ "attribute vec4 in_position; \n"
+ "attribute vec3 in_normal; \n"
+ "attribute vec2 in_coord; \n"
+ "\n"
+ "vec4 lightSource = vec4(2.0, 2.0, 20.0, 0.0);\n"
+ " \n"
+ "varying vec4 vVaryingColor; \n"
+ "varying vec2 coord; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = modelviewprojectionMatrix * in_position;\n"
+ " vec3 vEyeNormal = normalMatrix * in_normal;\n"
+ " vec4 vPosition4 = modelviewMatrix * in_position;\n"
+ " vec3 vPosition3 = vPosition4.xyz / vPosition4.w;\n"
+ " vec3 vLightDir = normalize(lightSource.xyz - vPosition3);\n"
+ " float diff = max(0.0, dot(vEyeNormal, vLightDir));\n"
+ " vVaryingColor = vec4(diff * vec3(1.0, 1.0, 1.0), 1.0);\n"
+ " coord = in_coord; \n"
+ "} \n";
+
+ const char *fragment_shader_source =
+ "precision mediump float; \n"
+ " \n"
+ "varying vec4 vVaryingColor; \n"
+ "varying vec2 coord; \n"
+ " \n"
+ "uniform sampler2D in_texture; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = 3.0 * vVaryingColor * texture2D(in_texture, coord);\n"
+ "} \n";
+
+ display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+ if (display == EGL_NO_DISPLAY) {
+ printf("Error: No display found!\n");
+ return -1;
+ }
+
+ if (!eglInitialize(display, &egl_major, &egl_minor)) {
+ printf("Error: eglInitialise failed!\n");
+ return -1;
+ }
+
+ printf("Using display %p with EGL version %d.%d\n",
+ display, egl_major, egl_minor);
+
+ printf("EGL Version \"%s\"\n", eglQueryString(display, EGL_VERSION));
+ printf("EGL Vendor \"%s\"\n", eglQueryString(display, EGL_VENDOR));
+ printf("EGL Extensions \"%s\"\n", eglQueryString(display, EGL_EXTENSIONS));
+
+ /* get an appropriate EGL frame buffer configuration */
+ eglChooseConfig(display, config_attribute_list, &config, 1, &num_config);
+
+ /* create an EGL rendering context */
+ context = eglCreateContext(display, config, EGL_NO_CONTEXT, context_attribute_list);
+ if (context == EGL_NO_CONTEXT) {
+ printf("Error: eglCreateContext failed: %d\n", eglGetError());
+ return -1;
+ }
+
+#if ONSCREEN
+ surface = eglCreateWindowSurface(display, config, &window, NULL);
+ if (surface == EGL_NO_SURFACE) {
+ printf("Error: eglCreateWindowSurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+#else
+ surface = eglCreatePbufferSurface(display, config, pbuffer_attribute_list);
+ if (surface == EGL_NO_SURFACE) {
+ printf("Error: eglCreatePbufferSurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+#endif
+
+ if (!eglQuerySurface(display, surface, EGL_WIDTH, &width) ||
+ !eglQuerySurface(display, surface, EGL_HEIGHT, &height)) {
+ printf("Error: eglQuerySurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+ printf("PBuffer: %dx%d\n", width, height);
+
+ /* connect the context to the surface */
+ if (!eglMakeCurrent(display, surface, surface, context)) {
+ printf("Error: eglMakeCurrent() failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ vertex_shader = glCreateShader(GL_VERTEX_SHADER);
+ if (!vertex_shader) {
+ printf("Error: glCreateShader(GL_VERTEX_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(vertex_shader, 1, &vertex_shader_source, NULL);
+ glCompileShader(vertex_shader);
+
+ glGetShaderiv(vertex_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: vertex shader compilation failed!:\n");
+ glGetShaderiv(vertex_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(vertex_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Vertex shader compilation succeeded!\n");
+
+ fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);
+ if (!fragment_shader) {
+ printf("Error: glCreateShader(GL_FRAGMENT_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(fragment_shader, 1, &fragment_shader_source, NULL);
+ glCompileShader(fragment_shader);
+
+ glGetShaderiv(fragment_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: fragment shader compilation failed!:\n");
+ glGetShaderiv(fragment_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(fragment_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Fragment shader compilation succeeded!\n");
+
+ program = glCreateProgram();
+ if (!program) {
+ printf("Error: failed to create program!\n");
+ return -1;
+ }
+
+ glAttachShader(program, vertex_shader);
+ glAttachShader(program, fragment_shader);
+
+ glBindAttribLocation(program, 0, "in_position");
+ glBindAttribLocation(program, 1, "in_normal");
+ glBindAttribLocation(program, 2, "in_coord");
+
+ glLinkProgram(program);
+
+ glGetProgramiv(program, GL_LINK_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: program linking failed!:\n");
+ glGetProgramiv(program, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetProgramInfoLog(program, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("program linking succeeded!\n");
+
+ glUseProgram(program);
+
+ glViewport(0, 0, width, height);
+
+ /* clear the color buffer */
+ glClearColor(0.5, 0.5, 0.5, 1.0);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, &companion_vertices[0][0]);
+ glEnableVertexAttribArray(0);
+
+ glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, &companion_normals[0][0]);
+ glEnableVertexAttribArray(1);
+
+ glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, 0,
+ &companion_texture_coordinates[0][0]);
+ glEnableVertexAttribArray(2);
+
+ ESMatrix modelview;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, 10.0f, 0.0f, 0.0f, 1.0f);
+ esScale(&modelview, 0.475f, 0.475f, 0.475f);
+
+ GLfloat aspect = (GLfloat)(height) / (GLfloat)(width);
+
+ ESMatrix projection;
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 11.0f);
+
+ ESMatrix modelviewprojection;
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+
+ float normal[9];
+ normal[0] = modelview.m[0][0];
+ normal[1] = modelview.m[0][1];
+ normal[2] = modelview.m[0][2];
+ normal[3] = modelview.m[1][0];
+ normal[4] = modelview.m[1][1];
+ normal[5] = modelview.m[1][2];
+ normal[6] = modelview.m[2][0];
+ normal[7] = modelview.m[2][1];
+ normal[8] = modelview.m[2][2];
+
+ glEnable(GL_TEXTURE_2D);
+
+ glGenTextures(1, &texture);
+ glBindTexture(GL_TEXTURE_2D, texture);
+
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB,
+ COMPANION_TEXTURE_WIDTH, COMPANION_TEXTURE_HEIGHT, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, companion_texture);
+ GLint modelviewmatrix_handle = glGetUniformLocation(program, "modelviewMatrix");
+ GLint modelviewprojectionmatrix_handle = glGetUniformLocation(program, "modelviewprojectionMatrix");
+ GLint normalmatrix_handle = glGetUniformLocation(program, "normalMatrix");
+
+ glUniformMatrix4fv(modelviewmatrix_handle, 1, GL_FALSE, &modelview.m[0][0]);
+ glUniformMatrix4fv(modelviewprojectionmatrix_handle, 1, GL_FALSE, &modelviewprojection.m[0][0]);
+ glUniformMatrix3fv(normalmatrix_handle, 1, GL_FALSE, normal);
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, texture);
+
+ GLint texture_loc = glGetUniformLocation(program, "in_texture");
+ glUniform1i(texture_loc, 0); // 0 -> GL_TEXTURE0 in glActiveTexture
+
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_DEPTH_TEST);
+
+ glDrawElements(GL_TRIANGLES, COMPANION_TRIANGLE_COUNT*3, GL_UNSIGNED_SHORT, &companion_triangles[0][0]);
+
+ glFlush();
+
+#if ONSCREEN
+ eglSwapBuffers(display, surface);
+#endif
+
+ fflush(stdout);
+ dump_gl_screen("/sdcard/egl2.bmp", width, height);
+ close_hook();
+
+ return 0;
+}
diff --git a/src/egl/cube_x11.c b/src/egl/cube_x11.c
new file mode 100644
index 0000000..d3338c6
--- /dev/null
+++ b/src/egl/cube_x11.c
@@ -0,0 +1,385 @@
+/*
+ * Copyright (c) 2011-2012 Luc Verhaegen <libv@codethink.co.uk>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Windowed cube... */
+#define HOOK
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdbool.h>
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+#include <dlfcn.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include "esUtil.h"
+#include "esWindow.h"
+#include "esTransform.h"
+#include "eglutil.h"
+#include "dump_gl_screen.h"
+#include "viv_hook.h"
+
+typedef struct
+{
+ GLuint program;
+ int frames;
+} UserData;
+
+int Init ( ESContext *esContext )
+{
+ esContext->userData = malloc(sizeof(UserData));
+
+ UserData *userData = esContext->userData;
+ GLuint vertex_shader;
+ GLuint fragment_shader;
+ GLuint program;
+ GLint ret=0;
+
+ userData->frames = 0;
+
+ const char *vertex_shader_source =
+ "uniform mat4 modelviewMatrix;\n"
+ "uniform mat4 modelviewprojectionMatrix;\n"
+ "uniform mat3 normalMatrix;\n"
+ "\n"
+ "attribute vec4 in_position; \n"
+ "attribute vec3 in_normal; \n"
+ "attribute vec4 in_color; \n"
+ "\n"
+ "vec4 lightSource = vec4(2.0, 2.0, 20.0, 0.0);\n"
+ " \n"
+ "varying vec4 vVaryingColor; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = modelviewprojectionMatrix * in_position;\n"
+ " vec3 vEyeNormal = normalMatrix * in_normal;\n"
+ " vec4 vPosition4 = modelviewMatrix * in_position;\n"
+ " vec3 vPosition3 = vPosition4.xyz / vPosition4.w;\n"
+ " vec3 vLightDir = normalize(lightSource.xyz - vPosition3);\n"
+ " float diff = max(0.0, dot(vEyeNormal, vLightDir));\n"
+ " vVaryingColor = vec4(diff * in_color.rgb, 1.0);\n"
+ "} \n";
+
+ const char *fragment_shader_source =
+ "precision mediump float; \n"
+ " \n"
+ "varying vec4 vVaryingColor; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = vVaryingColor; \n"
+ "} \n";
+
+ vertex_shader = glCreateShader(GL_VERTEX_SHADER);
+ if (!vertex_shader) {
+ printf("Error: glCreateShader(GL_VERTEX_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(vertex_shader, 1, &vertex_shader_source, NULL);
+ glCompileShader(vertex_shader);
+
+ glGetShaderiv(vertex_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: vertex shader compilation failed!:\n");
+ glGetShaderiv(vertex_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(vertex_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Vertex shader compilation succeeded!\n");
+
+ fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);
+ if (!fragment_shader) {
+ printf("Error: glCreateShader(GL_FRAGMENT_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(fragment_shader, 1, &fragment_shader_source, NULL);
+ glCompileShader(fragment_shader);
+
+ glGetShaderiv(fragment_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: fragment shader compilation failed!:\n");
+ glGetShaderiv(fragment_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(fragment_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Fragment shader compilation succeeded!\n");
+
+ program = glCreateProgram();
+ if (!program) {
+ printf("Error: failed to create program!\n");
+ return -1;
+ }
+
+ glAttachShader(program, vertex_shader);
+ glAttachShader(program, fragment_shader);
+
+ glBindAttribLocation(program, 0, "in_position");
+ glBindAttribLocation(program, 1, "in_normal");
+ glBindAttribLocation(program, 2, "in_color");
+
+ glLinkProgram(program);
+
+ glGetProgramiv(program, GL_LINK_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: program linking failed!:\n");
+ glGetProgramiv(program, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetProgramInfoLog(program, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("program linking succeeded!\n");
+
+ userData->program = program;
+}
+
+GLfloat vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+};
+
+GLfloat vColors[] = {
+ // front
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f, // magenta
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ // back
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 1.0f, 0.0f, // yellow
+ 0.0f, 1.0f, 0.0f, // green
+ // right
+ 1.0f, 0.0f, 1.0f, // magenta
+ 1.0f, 0.0f, 0.0f, // red
+ 1.0f, 1.0f, 1.0f, // white
+ 1.0f, 1.0f, 0.0f, // yellow
+ // left
+ 0.0f, 0.0f, 0.0f, // black
+ 0.0f, 0.0f, 1.0f, // blue
+ 0.0f, 1.0f, 0.0f, // green
+ 0.0f, 1.0f, 1.0f, // cyan
+ // top
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ 0.0f, 1.0f, 0.0f, // green
+ 1.0f, 1.0f, 0.0f, // yellow
+ // bottom
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f // magenta
+};
+
+GLfloat vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+};
+
+void Draw ( ESContext *esContext )
+{
+ UserData *userData = esContext->userData;
+ glViewport(0, 0, esContext->width, esContext->height);
+
+ /* clear the color buffer */
+ glClearColor(0.5, 0.5, 0.5, 1.0);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vVertices);
+ glEnableVertexAttribArray(0);
+
+ glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, vNormals);
+ glEnableVertexAttribArray(1);
+
+ glVertexAttribPointer(2, 3, GL_FLOAT, GL_FALSE, 0, vColors);
+ glEnableVertexAttribArray(2);
+
+ glUseProgram(userData->program);
+ ESMatrix modelview;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, 10.0f, 0.0f, 0.0f, 1.0f);
+
+ GLfloat aspect = (GLfloat)(esContext->height) / (GLfloat)(esContext->width);
+
+ ESMatrix projection;
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 10.0f);
+
+ ESMatrix modelviewprojection;
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+
+ float normal[9];
+ normal[0] = modelview.m[0][0];
+ normal[1] = modelview.m[0][1];
+ normal[2] = modelview.m[0][2];
+ normal[3] = modelview.m[1][0];
+ normal[4] = modelview.m[1][1];
+ normal[5] = modelview.m[1][2];
+ normal[6] = modelview.m[2][0];
+ normal[7] = modelview.m[2][1];
+ normal[8] = modelview.m[2][2];
+
+ GLint modelviewmatrix_handle = glGetUniformLocation(userData->program, "modelviewMatrix");
+ GLint modelviewprojectionmatrix_handle = glGetUniformLocation(userData->program, "modelviewprojectionMatrix");
+ GLint normalmatrix_handle = glGetUniformLocation(userData->program, "normalMatrix");
+
+ glUniformMatrix4fv(modelviewmatrix_handle, 1, GL_FALSE, &modelview.m[0][0]);
+ glUniformMatrix4fv(modelviewprojectionmatrix_handle, 1, GL_FALSE, &modelviewprojection.m[0][0]);
+ glUniformMatrix3fv(normalmatrix_handle, 1, GL_FALSE, normal);
+
+ glEnable(GL_CULL_FACE);
+
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 4, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 8, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 12, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 16, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 20, 4);
+
+ userData->frames ++;
+#ifdef HOOK
+ // If logging, exit mainloop after a few frames
+ if(userData->frames == 5)
+ {
+ esContext->terminate = TRUE;
+ }
+#endif
+}
+
+int main(int argc, char *argv[])
+{
+ ESContext esContext;
+ UserData userData;
+#ifdef HOOK
+ the_hook("/tmp/egl2.fdr");
+#endif
+
+ esInitContext ( &esContext );
+ esContext.userData = &userData;
+
+ esCreateWindow ( &esContext, "Cubic fun", 320, 240, ES_WINDOW_RGB );
+
+ if ( !Init ( &esContext ) )
+ return 0;
+
+ esRegisterDrawFunc ( &esContext, Draw );
+
+ esMainLoop ( &esContext );
+ //dump_gl_screen("/sdcard/egl2.bmp", width, height);
+#ifdef HOOK
+ glFinish();
+ close_hook();
+#endif
+ return 0;
+}
+
diff --git a/src/egl/displacement.c b/src/egl/displacement.c
new file mode 100644
index 0000000..37af7cc
--- /dev/null
+++ b/src/egl/displacement.c
@@ -0,0 +1,347 @@
+//#define HOOK
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdbool.h>
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+#include <dlfcn.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include "esTransform.h"
+#include "esShapes.h"
+#include "eglutil.h"
+#include "dump_gl_screen.h"
+#include "viv_hook.h"
+
+static EGLint const config_attribute_list[] = {
+ EGL_RED_SIZE, 8,
+ EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8,
+ EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+ EGL_DEPTH_SIZE, 8,
+ EGL_NONE
+};
+
+static EGLint const pbuffer_attribute_list[] = {
+ EGL_WIDTH, 400,
+ EGL_HEIGHT, 240,
+ EGL_LARGEST_PBUFFER, EGL_TRUE,
+ EGL_NONE
+};
+
+static const EGLint context_attribute_list[] = {
+ EGL_CONTEXT_CLIENT_VERSION, 2,
+ EGL_NONE
+};
+
+#define TEX_WIDTH (16)
+#define TEX_HEIGHT (16)
+static GLuint createSimpleTexture()
+{
+ GLuint textureId;
+ uint8_t pixels[TEX_HEIGHT][TEX_WIDTH];
+
+ for(int y=0; y<TEX_HEIGHT; ++y)
+ {
+ for(int x=0; x<TEX_WIDTH; ++x)
+ {
+ float xx = (float)x / (float)(TEX_WIDTH-1) * 2.0f - 1.0f;
+ float yy = (float)y / (float)(TEX_HEIGHT-1) * 2.0f - 1.0f;
+ pixels[y][x] = (0.25*xx*xx*yy*yy)*255.0f;
+ printf("%3i ", pixels[y][x]);
+ }
+ printf("\n");
+ }
+
+ glGenTextures(1, &textureId);
+ glBindTexture(GL_TEXTURE_2D, textureId);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, TEX_WIDTH, TEX_HEIGHT, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, &pixels[0][0]);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+
+ return textureId;
+}
+#undef TEX_WIDTH
+#undef TEX_HEIGHT
+
+int main(int argc, char *argv[])
+{
+ EGLDisplay display;
+ EGLint egl_major, egl_minor;
+ EGLConfig config;
+ EGLint num_config;
+ EGLContext context;
+ EGLSurface surface;
+ GLuint vertex_shader;
+ GLuint fragment_shader;
+ GLuint program;
+ GLint ret;
+ GLint width, height;
+#ifdef HOOK
+ the_hook("/mnt/sdcard/egl2.fdr");
+#endif
+
+ const char *vertex_shader_source =
+ "uniform mat4 modelviewMatrix;\n"
+ "uniform mat4 modelviewprojectionMatrix;\n"
+ "uniform mat3 normalMatrix;\n"
+ "\n"
+ "attribute vec4 in_position; \n"
+ "attribute vec3 in_normal; \n"
+ "attribute vec2 in_texcoord; \n"
+ "\n"
+ "vec4 lightSource = vec4(2.0, 2.0, 20.0, 0.0);\n"
+ " \n"
+ "varying vec4 vColor; \n"
+ "varying vec2 vTexCoord; \n"
+ "uniform sampler2D s_texture; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " float texvalue = texture2D(s_texture, in_texcoord).x;\n"
+ " gl_Position = modelviewprojectionMatrix * (in_position + vec4(0.2 * texvalue * in_normal, 0));\n"
+ " vec3 vEyeNormal = normalMatrix * in_normal;\n"
+ " vec4 vPosition4 = modelviewMatrix * in_position;\n"
+ " vec3 vPosition3 = vPosition4.xyz / vPosition4.w;\n"
+ " vec3 vLightDir = normalize(lightSource.xyz - vPosition3);\n"
+ " float diff = max(0.0, dot(vEyeNormal, vLightDir));\n"
+ " vColor = vec4(diff, 0.0, 0.0, 1.0);\n"
+ " vTexCoord = in_texcoord;\n"
+ "} \n";
+
+ const char *fragment_shader_source =
+ "precision mediump float; \n"
+ " \n"
+ "varying vec4 vColor; \n"
+ "varying vec2 vTexCoord; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = vColor;// * texture2D(s_texture, vTexCoord); \n"
+ "} \n";
+
+ display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+ if (display == EGL_NO_DISPLAY) {
+ printf("Error: No display found!\n");
+ return -1;
+ }
+
+ if (!eglInitialize(display, &egl_major, &egl_minor)) {
+ printf("Error: eglInitialise failed!\n");
+ return -1;
+ }
+
+ printf("Using display %p with EGL version %d.%d\n",
+ display, egl_major, egl_minor);
+
+ printf("EGL Version \"%s\"\n", eglQueryString(display, EGL_VERSION));
+ printf("EGL Vendor \"%s\"\n", eglQueryString(display, EGL_VENDOR));
+ printf("EGL Extensions \"%s\"\n", eglQueryString(display, EGL_EXTENSIONS));
+
+ /* get an appropriate EGL frame buffer configuration */
+ eglChooseConfig(display, config_attribute_list, &config, 1, &num_config);
+
+ /* create an EGL rendering context */
+ context = eglCreateContext(display, config, EGL_NO_CONTEXT, context_attribute_list);
+ if (context == EGL_NO_CONTEXT) {
+ printf("Error: eglCreateContext failed: %d\n", eglGetError());
+ return -1;
+ }
+
+ surface = eglCreatePbufferSurface(display, config, pbuffer_attribute_list);
+ if (surface == EGL_NO_SURFACE) {
+ printf("Error: eglCreatePbufferSurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ if (!eglQuerySurface(display, surface, EGL_WIDTH, &width) ||
+ !eglQuerySurface(display, surface, EGL_HEIGHT, &height)) {
+ printf("Error: eglQuerySurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+ printf("PBuffer: %dx%d\n", width, height);
+ printf("GL Extensions \"%s\"\n", glGetString(GL_EXTENSIONS));
+
+ /* connect the context to the surface */
+ if (!eglMakeCurrent(display, surface, surface, context)) {
+ printf("Error: eglMakeCurrent() failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ vertex_shader = glCreateShader(GL_VERTEX_SHADER);
+ if (!vertex_shader) {
+ printf("Error: glCreateShader(GL_VERTEX_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(vertex_shader, 1, &vertex_shader_source, NULL);
+ glCompileShader(vertex_shader);
+
+ glGetShaderiv(vertex_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: vertex shader compilation failed!:\n");
+ glGetShaderiv(vertex_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(vertex_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Vertex shader compilation succeeded!\n");
+
+ fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);
+ if (!fragment_shader) {
+ printf("Error: glCreateShader(GL_FRAGMENT_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(fragment_shader, 1, &fragment_shader_source, NULL);
+ glCompileShader(fragment_shader);
+
+ glGetShaderiv(fragment_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: fragment shader compilation failed!:\n");
+ glGetShaderiv(fragment_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(fragment_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Fragment shader compilation succeeded!\n");
+
+ program = glCreateProgram();
+ if (!program) {
+ printf("Error: failed to create program!\n");
+ return -1;
+ }
+
+ GLfloat *vVertices;
+ GLfloat *vNormals;
+ GLfloat *vTexCoords;
+ GLushort *vIndices;
+ int numIndices = esGenSphere(40, 1.0f, &vVertices, &vNormals,
+ &vTexCoords, &vIndices, NULL);
+ GLuint texId = createSimpleTexture();
+
+ glAttachShader(program, vertex_shader);
+ glAttachShader(program, fragment_shader);
+
+ glBindAttribLocation(program, 0, "in_position");
+ glBindAttribLocation(program, 1, "in_normal");
+ glBindAttribLocation(program, 2, "in_texcoord");
+
+ glLinkProgram(program);
+
+ glGetProgramiv(program, GL_LINK_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: program linking failed!:\n");
+ glGetProgramiv(program, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetProgramInfoLog(program, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("program linking succeeded!\n");
+
+ glUseProgram(program);
+
+ glViewport(0, 0, width, height);
+
+ /* clear the color buffer */
+ glClearColor(0.5, 0.5, 0.5, 1.0);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vVertices);
+ glEnableVertexAttribArray(0);
+
+ glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, vNormals);
+ glEnableVertexAttribArray(1);
+
+ glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, 0, vTexCoords);
+ glEnableVertexAttribArray(2);
+
+ ESMatrix modelview;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, 10.0f, 0.0f, 0.0f, 1.0f);
+
+ GLfloat aspect = (GLfloat)(height) / (GLfloat)(width);
+
+ ESMatrix projection;
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -1.8f, +1.8f, -1.8f * aspect, +1.8f * aspect, 6.0f, 10.0f);
+
+ ESMatrix modelviewprojection;
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+
+ float normal[9];
+ normal[0] = modelview.m[0][0];
+ normal[1] = modelview.m[0][1];
+ normal[2] = modelview.m[0][2];
+ normal[3] = modelview.m[1][0];
+ normal[4] = modelview.m[1][1];
+ normal[5] = modelview.m[1][2];
+ normal[6] = modelview.m[2][0];
+ normal[7] = modelview.m[2][1];
+ normal[8] = modelview.m[2][2];
+
+ GLint modelviewmatrix_handle = glGetUniformLocation(program, "modelviewMatrix");
+ GLint modelviewprojectionmatrix_handle = glGetUniformLocation(program, "modelviewprojectionMatrix");
+ GLint normalmatrix_handle = glGetUniformLocation(program, "normalMatrix");
+ GLint sampler_handle = glGetUniformLocation(program, "s_texture");
+
+ glUniformMatrix4fv(modelviewmatrix_handle, 1, GL_FALSE, &modelview.m[0][0]);
+ glUniformMatrix4fv(modelviewprojectionmatrix_handle, 1, GL_FALSE, &modelviewprojection.m[0][0]);
+ glUniformMatrix3fv(normalmatrix_handle, 1, GL_FALSE, normal);
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, texId);
+ glUniform1i(sampler_handle, 0);
+
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_DEPTH_TEST);
+
+ glDrawElements(GL_TRIANGLES, numIndices, GL_UNSIGNED_SHORT, vIndices);
+
+ glFlush();
+
+ fflush(stdout);
+ dump_gl_screen("/sdcard/egl2.bmp", width, height);
+
+#ifdef HOOK
+ close_hook();
+#endif
+
+ return 0;
+}
diff --git a/src/egl/eglinfo.c b/src/egl/eglinfo.c
new file mode 100644
index 0000000..a0afc08
--- /dev/null
+++ b/src/egl/eglinfo.c
@@ -0,0 +1,172 @@
+/*
+ * eglinfo - like glxinfo but for EGL
+ *
+ * Brian Paul
+ * 11 March 2005
+ *
+ * Copyright (C) 2005 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#include <EGL/egl.h>
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define MAX_CONFIGS 1000
+#define MAX_MODES 1000
+#define MAX_SCREENS 10
+
+
+/**
+ * Print table of all available configurations.
+ */
+static void
+PrintConfigs(EGLDisplay d)
+{
+ EGLConfig configs[MAX_CONFIGS];
+ EGLint numConfigs=0, i;
+
+ eglGetConfigs(d, configs, MAX_CONFIGS, &numConfigs);
+
+ printf("Configurations (%i):\n", numConfigs);
+ printf(" bf lv d st colorbuffer dp st ms vis supported\n");
+ printf(" id sz l b ro r g b a th cl ns b id surfaces \n");
+ printf("--------------------------------------------------------\n");
+ for (i = 0; i < numConfigs; i++) {
+ EGLint id, size, level;
+ EGLint red, green, blue, alpha;
+ EGLint depth, stencil;
+ EGLint surfaces;
+ EGLint doubleBuf = 1, stereo = 0;
+ EGLint vid;
+ EGLint samples, sampleBuffers;
+ char surfString[100] = "";
+
+ eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &id);
+ eglGetConfigAttrib(d, configs[i], EGL_BUFFER_SIZE, &size);
+ eglGetConfigAttrib(d, configs[i], EGL_LEVEL, &level);
+
+ eglGetConfigAttrib(d, configs[i], EGL_RED_SIZE, &red);
+ eglGetConfigAttrib(d, configs[i], EGL_GREEN_SIZE, &green);
+ eglGetConfigAttrib(d, configs[i], EGL_BLUE_SIZE, &blue);
+ eglGetConfigAttrib(d, configs[i], EGL_ALPHA_SIZE, &alpha);
+ eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &depth);
+ eglGetConfigAttrib(d, configs[i], EGL_STENCIL_SIZE, &stencil);
+ eglGetConfigAttrib(d, configs[i], EGL_NATIVE_VISUAL_ID, &vid);
+ eglGetConfigAttrib(d, configs[i], EGL_SURFACE_TYPE, &surfaces);
+
+ eglGetConfigAttrib(d, configs[i], EGL_SAMPLES, &samples);
+ eglGetConfigAttrib(d, configs[i], EGL_SAMPLE_BUFFERS, &sampleBuffers);
+
+ if (surfaces & EGL_WINDOW_BIT)
+ strcat(surfString, "win,");
+ if (surfaces & EGL_PBUFFER_BIT)
+ strcat(surfString, "pb,");
+ if (surfaces & EGL_PIXMAP_BIT)
+ strcat(surfString, "pix,");
+#ifdef EGL_MESA_screen_surface
+ if (surfaces & EGL_SCREEN_BIT_MESA)
+ strcat(surfString, "scrn,");
+#endif
+ if (strlen(surfString) > 0)
+ surfString[strlen(surfString) - 1] = 0;
+
+ printf("0x%02x %2d %2d %c %c %2d %2d %2d %2d %2d %2d %2d%2d 0x%02x %-12s\n",
+ id, size, level,
+ doubleBuf ? 'y' : '.',
+ stereo ? 'y' : '.',
+ red, green, blue, alpha,
+ depth, stencil,
+ samples, sampleBuffers, vid, surfString);
+ }
+}
+
+
+/**
+ * Print table of all available configurations.
+ */
+static void
+PrintModes(EGLDisplay d)
+{
+#ifdef EGL_MESA_screen_surface
+ const char *extensions = eglQueryString(d, EGL_EXTENSIONS);
+ if (strstr(extensions, "EGL_MESA_screen_surface")) {
+ EGLScreenMESA screens[MAX_SCREENS];
+ EGLint numScreens = 1, scrn;
+ EGLModeMESA modes[MAX_MODES];
+
+ eglGetScreensMESA(d, screens, MAX_SCREENS, &numScreens);
+ printf("Number of Screens: %d\n\n", numScreens);
+
+ for (scrn = 0; scrn < numScreens; scrn++) {
+ EGLint numModes, i;
+
+ eglGetModesMESA(d, screens[scrn], modes, MAX_MODES, &numModes);
+
+ printf("Screen %d Modes:\n", scrn);
+ printf(" id width height refresh name\n");
+ printf("-----------------------------------------\n");
+ for (i = 0; i < numModes; i++) {
+ EGLint id, w, h, r;
+ const char *str;
+ eglGetModeAttribMESA(d, modes[i], EGL_MODE_ID_MESA, &id);
+ eglGetModeAttribMESA(d, modes[i], EGL_WIDTH, &w);
+ eglGetModeAttribMESA(d, modes[i], EGL_HEIGHT, &h);
+ eglGetModeAttribMESA(d, modes[i], EGL_REFRESH_RATE_MESA, &r);
+ str = eglQueryModeStringMESA(d, modes[i]);
+ printf("0x%02x %5d %5d %.3f %s\n", id, w, h, r / 1000.0, str);
+ }
+ }
+ }
+#endif
+}
+
+
+
+int
+main(int argc, char *argv[])
+{
+ int maj, min;
+ EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+
+ if (!eglInitialize(d, &maj, &min)) {
+ printf("eglinfo: eglInitialize failed\n");
+ exit(1);
+ }
+
+ printf("EGL API version: %d.%d\n", maj, min);
+ printf("EGL vendor string: %s\n", eglQueryString(d, EGL_VENDOR));
+ printf("EGL version string: %s\n", eglQueryString(d, EGL_VERSION));
+#ifdef EGL_VERSION_1_2
+ printf("EGL client APIs: %s\n", eglQueryString(d, EGL_CLIENT_APIS));
+#endif
+ printf("EGL extensions string:\n");
+ printf(" %s\n", eglQueryString(d, EGL_EXTENSIONS));
+
+ PrintConfigs(d);
+
+ PrintModes(d);
+
+ eglTerminate(d);
+
+ return 0;
+}
diff --git a/src/egl/es2gears.c b/src/egl/es2gears.c
new file mode 100644
index 0000000..37fb6a4
--- /dev/null
+++ b/src/egl/es2gears.c
@@ -0,0 +1,723 @@
+/*
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Ported to GLES2.
+ * Kristian Høgsberg <krh@bitplanet.net>
+ * May 3, 2010
+ *
+ * Improve GLES2 port:
+ * * Refactor gear drawing.
+ * * Use correct normals for surfaces.
+ * * Improve shader.
+ * * Use perspective projection transformation.
+ * * Add FPS count.
+ * * Add comments.
+ * Alexandros Frantzis <alexandros.frantzis@linaro.org>
+ * Jul 13, 2010
+ */
+
+#define GL_GLEXT_PROTOTYPES
+#define EGL_EGLEXT_PROTOTYPES
+
+#define _GNU_SOURCE
+
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <GLES2/gl2.h>
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+#include "eglut.h"
+
+#define STRIPS_PER_TOOTH 7
+#define VERTICES_PER_TOOTH 34
+#define GEAR_VERTEX_STRIDE 6
+
+/**
+ * Struct describing the vertices in triangle strip
+ */
+struct vertex_strip {
+ /** The first vertex in the strip */
+ GLint first;
+ /** The number of consecutive vertices in the strip after the first */
+ GLint count;
+};
+
+/* Each vertex consist of GEAR_VERTEX_STRIDE GLfloat attributes */
+typedef GLfloat GearVertex[GEAR_VERTEX_STRIDE];
+
+/**
+ * Struct representing a gear.
+ */
+struct gear {
+ /** The array of vertices comprising the gear */
+ GearVertex *vertices;
+ /** The number of vertices comprising the gear */
+ int nvertices;
+ /** The array of triangle strips comprising the gear */
+ struct vertex_strip *strips;
+ /** The number of triangle strips comprising the gear */
+ int nstrips;
+ /** The Vertex Buffer Object holding the vertices in the graphics card */
+ GLuint vbo;
+};
+
+/** The view rotation [x, y, z] */
+static GLfloat view_rot[3] = { 20.0, 30.0, 0.0 };
+/** The gears */
+static struct gear *gear1, *gear2, *gear3;
+/** The current gear rotation angle */
+static GLfloat angle = 0.0;
+/** The location of the shader uniforms */
+static GLuint ModelViewProjectionMatrix_location,
+ NormalMatrix_location,
+ LightSourcePosition_location,
+ MaterialColor_location;
+/** The projection matrix */
+static GLfloat ProjectionMatrix[16];
+/** The direction of the directional light for the scene */
+static const GLfloat LightSourcePosition[4] = { 5.0, 5.0, 10.0, 1.0};
+
+/**
+ * Fills a gear vertex.
+ *
+ * @param v the vertex to fill
+ * @param x the x coordinate
+ * @param y the y coordinate
+ * @param z the z coortinate
+ * @param n pointer to the normal table
+ *
+ * @return the operation error code
+ */
+static GearVertex *
+vert(GearVertex *v, GLfloat x, GLfloat y, GLfloat z, GLfloat n[3])
+{
+ v[0][0] = x;
+ v[0][1] = y;
+ v[0][2] = z;
+ v[0][3] = n[0];
+ v[0][4] = n[1];
+ v[0][5] = n[2];
+
+ return v + 1;
+}
+
+/**
+ * Create a gear wheel.
+ *
+ * @param inner_radius radius of hole at center
+ * @param outer_radius radius at center of teeth
+ * @param width width of gear
+ * @param teeth number of teeth
+ * @param tooth_depth depth of tooth
+ *
+ * @return pointer to the constructed struct gear
+ */
+static struct gear *
+create_gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
+ GLint teeth, GLfloat tooth_depth)
+{
+ GLfloat r0, r1, r2;
+ GLfloat da;
+ GearVertex *v;
+ struct gear *gear;
+ double s[5], c[5];
+ GLfloat normal[3];
+ int cur_strip = 0;
+ int i;
+
+ /* Allocate memory for the gear */
+ gear = malloc(sizeof *gear);
+ if (gear == NULL)
+ return NULL;
+
+ /* Calculate the radii used in the gear */
+ r0 = inner_radius;
+ r1 = outer_radius - tooth_depth / 2.0;
+ r2 = outer_radius + tooth_depth / 2.0;
+
+ da = 2.0 * M_PI / teeth / 4.0;
+
+ /* Allocate memory for the triangle strip information */
+ gear->nstrips = STRIPS_PER_TOOTH * teeth;
+ gear->strips = calloc(gear->nstrips, sizeof (*gear->strips));
+
+ /* Allocate memory for the vertices */
+ gear->vertices = calloc(VERTICES_PER_TOOTH * teeth, sizeof(*gear->vertices));
+ v = gear->vertices;
+
+ for (i = 0; i < teeth; i++) {
+ /* Calculate needed sin/cos for varius angles */
+ sincos(i * 2.0 * M_PI / teeth, &s[0], &c[0]);
+ sincos(i * 2.0 * M_PI / teeth + da, &s[1], &c[1]);
+ sincos(i * 2.0 * M_PI / teeth + da * 2, &s[2], &c[2]);
+ sincos(i * 2.0 * M_PI / teeth + da * 3, &s[3], &c[3]);
+ sincos(i * 2.0 * M_PI / teeth + da * 4, &s[4], &c[4]);
+
+ /* A set of macros for making the creation of the gears easier */
+#define GEAR_POINT(r, da) { (r) * c[(da)], (r) * s[(da)] }
+#define SET_NORMAL(x, y, z) do { \
+ normal[0] = (x); normal[1] = (y); normal[2] = (z); \
+} while(0)
+
+#define GEAR_VERT(v, point, sign) vert((v), p[(point)].x, p[(point)].y, (sign) * width * 0.5, normal)
+
+#define START_STRIP do { \
+ gear->strips[cur_strip].first = v - gear->vertices; \
+} while(0);
+
+#define END_STRIP do { \
+ int _tmp = (v - gear->vertices); \
+ gear->strips[cur_strip].count = _tmp - gear->strips[cur_strip].first; \
+ cur_strip++; \
+} while (0)
+
+#define QUAD_WITH_NORMAL(p1, p2) do { \
+ SET_NORMAL((p[(p1)].y - p[(p2)].y), -(p[(p1)].x - p[(p2)].x), 0); \
+ v = GEAR_VERT(v, (p1), -1); \
+ v = GEAR_VERT(v, (p1), 1); \
+ v = GEAR_VERT(v, (p2), -1); \
+ v = GEAR_VERT(v, (p2), 1); \
+} while(0)
+
+ struct point {
+ GLfloat x;
+ GLfloat y;
+ };
+
+ /* Create the 7 points (only x,y coords) used to draw a tooth */
+ struct point p[7] = {
+ GEAR_POINT(r2, 1), // 0
+ GEAR_POINT(r2, 2), // 1
+ GEAR_POINT(r1, 0), // 2
+ GEAR_POINT(r1, 3), // 3
+ GEAR_POINT(r0, 0), // 4
+ GEAR_POINT(r1, 4), // 5
+ GEAR_POINT(r0, 4), // 6
+ };
+
+ /* Front face */
+ START_STRIP;
+ SET_NORMAL(0, 0, 1.0);
+ v = GEAR_VERT(v, 0, +1);
+ v = GEAR_VERT(v, 1, +1);
+ v = GEAR_VERT(v, 2, +1);
+ v = GEAR_VERT(v, 3, +1);
+ v = GEAR_VERT(v, 4, +1);
+ v = GEAR_VERT(v, 5, +1);
+ v = GEAR_VERT(v, 6, +1);
+ END_STRIP;
+
+ /* Inner face */
+ START_STRIP;
+ QUAD_WITH_NORMAL(4, 6);
+ END_STRIP;
+
+ /* Back face */
+ START_STRIP;
+ SET_NORMAL(0, 0, -1.0);
+ v = GEAR_VERT(v, 6, -1);
+ v = GEAR_VERT(v, 5, -1);
+ v = GEAR_VERT(v, 4, -1);
+ v = GEAR_VERT(v, 3, -1);
+ v = GEAR_VERT(v, 2, -1);
+ v = GEAR_VERT(v, 1, -1);
+ v = GEAR_VERT(v, 0, -1);
+ END_STRIP;
+
+ /* Outer face */
+ START_STRIP;
+ QUAD_WITH_NORMAL(0, 2);
+ END_STRIP;
+
+ START_STRIP;
+ QUAD_WITH_NORMAL(1, 0);
+ END_STRIP;
+
+ START_STRIP;
+ QUAD_WITH_NORMAL(3, 1);
+ END_STRIP;
+
+ START_STRIP;
+ QUAD_WITH_NORMAL(5, 3);
+ END_STRIP;
+ }
+
+ gear->nvertices = (v - gear->vertices);
+
+ /* Store the vertices in a vertex buffer object (VBO) */
+ glGenBuffers(1, &gear->vbo);
+ glBindBuffer(GL_ARRAY_BUFFER, gear->vbo);
+ glBufferData(GL_ARRAY_BUFFER, gear->nvertices * sizeof(GearVertex),
+ gear->vertices, GL_STATIC_DRAW);
+
+ return gear;
+}
+
+/**
+ * Multiplies two 4x4 matrices.
+ *
+ * The result is stored in matrix m.
+ *
+ * @param m the first matrix to multiply
+ * @param n the second matrix to multiply
+ */
+static void
+multiply(GLfloat *m, const GLfloat *n)
+{
+ GLfloat tmp[16];
+ const GLfloat *row, *column;
+ div_t d;
+ int i, j;
+
+ for (i = 0; i < 16; i++) {
+ tmp[i] = 0;
+ d = div(i, 4);
+ row = n + d.quot * 4;
+ column = m + d.rem;
+ for (j = 0; j < 4; j++)
+ tmp[i] += row[j] * column[j * 4];
+ }
+ memcpy(m, &tmp, sizeof tmp);
+}
+
+/**
+ * Rotates a 4x4 matrix.
+ *
+ * @param[in,out] m the matrix to rotate
+ * @param angle the angle to rotate
+ * @param x the x component of the direction to rotate to
+ * @param y the y component of the direction to rotate to
+ * @param z the z component of the direction to rotate to
+ */
+static void
+rotate(GLfloat *m, GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
+{
+ double s, c;
+
+ sincos(angle, &s, &c);
+ GLfloat r[16] = {
+ x * x * (1 - c) + c, y * x * (1 - c) + z * s, x * z * (1 - c) - y * s, 0,
+ x * y * (1 - c) - z * s, y * y * (1 - c) + c, y * z * (1 - c) + x * s, 0,
+ x * z * (1 - c) + y * s, y * z * (1 - c) - x * s, z * z * (1 - c) + c, 0,
+ 0, 0, 0, 1
+ };
+
+ multiply(m, r);
+}
+
+
+/**
+ * Translates a 4x4 matrix.
+ *
+ * @param[in,out] m the matrix to translate
+ * @param x the x component of the direction to translate to
+ * @param y the y component of the direction to translate to
+ * @param z the z component of the direction to translate to
+ */
+static void
+translate(GLfloat *m, GLfloat x, GLfloat y, GLfloat z)
+{
+ GLfloat t[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x, y, z, 1 };
+
+ multiply(m, t);
+}
+
+/**
+ * Creates an identity 4x4 matrix.
+ *
+ * @param m the matrix make an identity matrix
+ */
+static void
+identity(GLfloat *m)
+{
+ GLfloat t[16] = {
+ 1.0, 0.0, 0.0, 0.0,
+ 0.0, 1.0, 0.0, 0.0,
+ 0.0, 0.0, 1.0, 0.0,
+ 0.0, 0.0, 0.0, 1.0,
+ };
+
+ memcpy(m, t, sizeof(t));
+}
+
+/**
+ * Transposes a 4x4 matrix.
+ *
+ * @param m the matrix to transpose
+ */
+static void
+transpose(GLfloat *m)
+{
+ GLfloat t[16] = {
+ m[0], m[4], m[8], m[12],
+ m[1], m[5], m[9], m[13],
+ m[2], m[6], m[10], m[14],
+ m[3], m[7], m[11], m[15]};
+
+ memcpy(m, t, sizeof(t));
+}
+
+/**
+ * Inverts a 4x4 matrix.
+ *
+ * This function can currently handle only pure translation-rotation matrices.
+ * Read http://www.gamedev.net/community/forums/topic.asp?topic_id=425118
+ * for an explanation.
+ */
+static void
+invert(GLfloat *m)
+{
+ GLfloat t[16];
+ identity(t);
+
+ // Extract and invert the translation part 't'. The inverse of a
+ // translation matrix can be calculated by negating the translation
+ // coordinates.
+ t[12] = -m[12]; t[13] = -m[13]; t[14] = -m[14];
+
+ // Invert the rotation part 'r'. The inverse of a rotation matrix is
+ // equal to its transpose.
+ m[12] = m[13] = m[14] = 0;
+ transpose(m);
+
+ // inv(m) = inv(r) * inv(t)
+ multiply(m, t);
+}
+
+/**
+ * Calculate a perspective projection transformation.
+ *
+ * @param m the matrix to save the transformation in
+ * @param fovy the field of view in the y direction
+ * @param aspect the view aspect ratio
+ * @param zNear the near clipping plane
+ * @param zFar the far clipping plane
+ */
+void perspective(GLfloat *m, GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar)
+{
+ GLfloat tmp[16];
+ identity(tmp);
+
+ double sine, cosine, cotangent, deltaZ;
+ GLfloat radians = fovy / 2 * M_PI / 180;
+
+ deltaZ = zFar - zNear;
+ sincos(radians, &sine, &cosine);
+
+ if ((deltaZ == 0) || (sine == 0) || (aspect == 0))
+ return;
+
+ cotangent = cosine / sine;
+
+ tmp[0] = cotangent / aspect;
+ tmp[5] = cotangent;
+ tmp[10] = -(zFar + zNear) / deltaZ;
+ tmp[11] = -1;
+ tmp[14] = -2 * zNear * zFar / deltaZ;
+ tmp[15] = 0;
+
+ memcpy(m, tmp, sizeof(tmp));
+}
+
+/**
+ * Draws a gear.
+ *
+ * @param gear the gear to draw
+ * @param transform the current transformation matrix
+ * @param x the x position to draw the gear at
+ * @param y the y position to draw the gear at
+ * @param angle the rotation angle of the gear
+ * @param color the color of the gear
+ */
+static void
+draw_gear(struct gear *gear, GLfloat *transform,
+ GLfloat x, GLfloat y, GLfloat angle, const GLfloat color[4])
+{
+ GLfloat model_view[16];
+ GLfloat normal_matrix[16];
+ GLfloat model_view_projection[16];
+
+ /* Translate and rotate the gear */
+ memcpy(model_view, transform, sizeof (model_view));
+ translate(model_view, x, y, 0);
+ rotate(model_view, 2 * M_PI * angle / 360.0, 0, 0, 1);
+
+ /* Create and set the ModelViewProjectionMatrix */
+ memcpy(model_view_projection, ProjectionMatrix, sizeof(model_view_projection));
+ multiply(model_view_projection, model_view);
+
+ glUniformMatrix4fv(ModelViewProjectionMatrix_location, 1, GL_FALSE,
+ model_view_projection);
+
+ /*
+ * Create and set the NormalMatrix. It's the inverse transpose of the
+ * ModelView matrix.
+ */
+ memcpy(normal_matrix, model_view, sizeof (normal_matrix));
+ invert(normal_matrix);
+ transpose(normal_matrix);
+ glUniformMatrix4fv(NormalMatrix_location, 1, GL_FALSE, normal_matrix);
+
+ /* Set the gear color */
+ glUniform4fv(MaterialColor_location, 1, color);
+
+ /* Set the vertex buffer object to use */
+ glBindBuffer(GL_ARRAY_BUFFER, gear->vbo);
+
+ /* Set up the position of the attributes in the vertex buffer object */
+ glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE,
+ 6 * sizeof(GLfloat), NULL);
+ glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE,
+ 6 * sizeof(GLfloat), (GLfloat *) 0 + 3);
+
+ /* Enable the attributes */
+ glEnableVertexAttribArray(0);
+ glEnableVertexAttribArray(1);
+
+ /* Draw the triangle strips that comprise the gear */
+ int n;
+ for (n = 0; n < gear->nstrips; n++)
+ glDrawArrays(GL_TRIANGLE_STRIP, gear->strips[n].first, gear->strips[n].count);
+
+ /* Disable the attributes */
+ glDisableVertexAttribArray(1);
+ glDisableVertexAttribArray(0);
+}
+
+/**
+ * Draws the gears.
+ */
+static void
+gears_draw(void)
+{
+ const static GLfloat red[4] = { 0.8, 0.1, 0.0, 1.0 };
+ const static GLfloat green[4] = { 0.0, 0.8, 0.2, 1.0 };
+ const static GLfloat blue[4] = { 0.2, 0.2, 1.0, 1.0 };
+ GLfloat transform[16];
+ identity(transform);
+
+ glClearColor(0.0, 0.0, 0.0, 0.0);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ /* Translate and rotate the view */
+ translate(transform, 0, 0, -20);
+ rotate(transform, 2 * M_PI * view_rot[0] / 360.0, 1, 0, 0);
+ rotate(transform, 2 * M_PI * view_rot[1] / 360.0, 0, 1, 0);
+ rotate(transform, 2 * M_PI * view_rot[2] / 360.0, 0, 0, 1);
+
+ /* Draw the gears */
+ draw_gear(gear1, transform, -3.0, -2.0, angle, red);
+ draw_gear(gear2, transform, 3.1, -2.0, -2 * angle - 9.0, green);
+ draw_gear(gear3, transform, -3.1, 4.2, -2 * angle - 25.0, blue);
+}
+
+/**
+ * Handles a new window size or exposure.
+ *
+ * @param width the window width
+ * @param height the window height
+ */
+static void
+gears_reshape(int width, int height)
+{
+ /* Update the projection matrix */
+ perspective(ProjectionMatrix, 60.0, width / (float)height, 1.0, 1024.0);
+
+ /* Set the viewport */
+ glViewport(0, 0, (GLint) width, (GLint) height);
+}
+
+/**
+ * Handles special eglut events.
+ *
+ * @param special the event to handle.
+ */
+static void
+gears_special(int special)
+{
+ switch (special) {
+ case EGLUT_KEY_LEFT:
+ view_rot[1] += 5.0;
+ break;
+ case EGLUT_KEY_RIGHT:
+ view_rot[1] -= 5.0;
+ break;
+ case EGLUT_KEY_UP:
+ view_rot[0] += 5.0;
+ break;
+ case EGLUT_KEY_DOWN:
+ view_rot[0] -= 5.0;
+ break;
+ }
+}
+
+static void
+gears_idle(void)
+{
+ static int frames = 0;
+ static double tRot0 = -1.0, tRate0 = -1.0;
+ double dt, t = eglutGet(EGLUT_ELAPSED_TIME) / 1000.0;
+
+ if (tRot0 < 0.0)
+ tRot0 = t;
+ dt = t - tRot0;
+ tRot0 = t;
+
+ /* advance rotation for next frame */
+ angle += 70.0 * dt; /* 70 degrees per second */
+ if (angle > 3600.0)
+ angle -= 3600.0;
+
+ eglutPostRedisplay();
+ frames++;
+
+ if (tRate0 < 0.0)
+ tRate0 = t;
+ if (t - tRate0 >= 5.0) {
+ GLfloat seconds = t - tRate0;
+ GLfloat fps = frames / seconds;
+ printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds,
+ fps);
+ tRate0 = t;
+ frames = 0;
+ }
+}
+
+static const char vertex_shader[] =
+"attribute vec3 position;\n"
+"attribute vec3 normal;\n"
+"\n"
+"uniform mat4 ModelViewProjectionMatrix;\n"
+"uniform mat4 NormalMatrix;\n"
+"uniform vec4 LightSourcePosition;\n"
+"uniform vec4 MaterialColor;\n"
+"\n"
+"varying vec4 Color;\n"
+"\n"
+"void main(void)\n"
+"{\n"
+" // Transform the normal to eye coordinates\n"
+" vec3 N = normalize(vec3(NormalMatrix * vec4(normal, 1.0)));\n"
+"\n"
+" // The LightSourcePosition is actually its direction for directional light\n"
+" vec3 L = normalize(LightSourcePosition.xyz);\n"
+"\n"
+" // Multiply the diffuse value by the vertex color (which is fixed in this case)\n"
+" // to get the actual color that we will use to draw this vertex with\n"
+" float diffuse = max(dot(N, L), 0.0);\n"
+" Color = diffuse * MaterialColor;\n"
+"\n"
+" // Transform the position to clip coordinates\n"
+" gl_Position = ModelViewProjectionMatrix * vec4(position, 1.0);\n"
+"}";
+
+static const char fragment_shader[] =
+"precision mediump float;\n"
+"varying vec4 Color;\n"
+"\n"
+"void main(void)\n"
+"{\n"
+" gl_FragColor = Color;\n"
+"}";
+
+static void
+gears_init(void)
+{
+ GLuint v, f, program;
+ const char *p;
+ char msg[512];
+
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_DEPTH_TEST);
+
+ /* Compile the vertex shader */
+ p = vertex_shader;
+ v = glCreateShader(GL_VERTEX_SHADER);
+ glShaderSource(v, 1, &p, NULL);
+ glCompileShader(v);
+ glGetShaderInfoLog(v, sizeof msg, NULL, msg);
+ printf("vertex shader info: %s\n", msg);
+
+ /* Compile the fragment shader */
+ p = fragment_shader;
+ f = glCreateShader(GL_FRAGMENT_SHADER);
+ glShaderSource(f, 1, &p, NULL);
+ glCompileShader(f);
+ glGetShaderInfoLog(f, sizeof msg, NULL, msg);
+ printf("fragment shader info: %s\n", msg);
+
+ /* Create and link the shader program */
+ program = glCreateProgram();
+ glAttachShader(program, v);
+ glAttachShader(program, f);
+ glBindAttribLocation(program, 0, "position");
+ glBindAttribLocation(program, 1, "normal");
+
+ glLinkProgram(program);
+ glGetProgramInfoLog(program, sizeof msg, NULL, msg);
+ printf("info: %s\n", msg);
+
+ /* Enable the shaders */
+ glUseProgram(program);
+
+ /* Get the locations of the uniforms so we can access them */
+ ModelViewProjectionMatrix_location = glGetUniformLocation(program, "ModelViewProjectionMatrix");
+ NormalMatrix_location = glGetUniformLocation(program, "NormalMatrix");
+ LightSourcePosition_location = glGetUniformLocation(program, "LightSourcePosition");
+ MaterialColor_location = glGetUniformLocation(program, "MaterialColor");
+
+ /* Set the LightSourcePosition uniform which is constant throught the program */
+ glUniform4fv(LightSourcePosition_location, 1, LightSourcePosition);
+
+ /* make the gears */
+ gear1 = create_gear(1.0, 4.0, 1.0, 20, 0.7);
+ gear2 = create_gear(0.5, 2.0, 2.0, 10, 0.7);
+ gear3 = create_gear(1.3, 2.0, 0.5, 10, 0.7);
+}
+
+int
+main(int argc, char *argv[])
+{
+ /* Initialize the window */
+ eglutInitWindowSize(300, 300);
+ eglutInitAPIMask(EGLUT_OPENGL_ES2_BIT);
+ eglutInit(argc, argv);
+
+ eglutCreateWindow("es2gears");
+
+ /* Set up eglut callback functions */
+ eglutIdleFunc(gears_idle);
+ eglutReshapeFunc(gears_reshape);
+ eglutDisplayFunc(gears_draw);
+ eglutSpecialFunc(gears_special);
+
+ /* Initialize the gears */
+ gears_init();
+
+ eglutMainLoop();
+
+ return 0;
+}
diff --git a/src/egl/exec_egl2.sh b/src/egl/exec_egl2.sh
new file mode 100755
index 0000000..64d6735
--- /dev/null
+++ b/src/egl/exec_egl2.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+# Build, upload, execute gles2 demo on device and fetch data log and resulting image
+DEMO=$1
+if [ -z "$DEMO" ]; then
+ echo "Defaulting to cube"
+ DEMO="cube"
+fi
+make ${DEMO}
+[ $? -ne 0 ] && exit
+
+adb push ${DEMO} /data/mine
+adb shell 'export LD_LIBRARY_PATH="/system/lib/egl";/data/mine/'"${DEMO}"
+adb pull /mnt/sdcard/egl2.fdr ${DEMO}.fdr
+adb pull /mnt/sdcard/egl2.bmp ${DEMO}.bmp
diff --git a/src/egl/glut_test.c b/src/egl/glut_test.c
new file mode 100644
index 0000000..f7cab16
--- /dev/null
+++ b/src/egl/glut_test.c
@@ -0,0 +1,432 @@
+// glut_example.c
+// Stanford University, CS248, Fall 2000
+//
+// Demonstrates basic use of GLUT toolkit for CS248 video game assignment.
+// More GLUT details at http://reality.sgi.com/mjk_asd/spec3/spec3.html
+// Here you'll find examples of initialization, basic viewing transformations,
+// mouse and keyboard callbacks, menus, some rendering primitives, lighting,
+// double buffering, Z buffering, and texturing.
+//
+// Matt Ginzton -- magi@cs.stanford.edu
+#include <GL/glew.h>
+#include <GL/glut.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/time.h>
+
+const char *vertex_shader_source =
+ "attribute vec4 in_position; \n"
+ "attribute vec4 in_color; \n"
+ "\n"
+ "varying vec4 vVaryingColor; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = in_position;\n"
+ " vVaryingColor = in_color;\n"
+ "} \n";
+
+const char *fragment_shader_source =
+ "precision mediump float; \n"
+ " \n"
+ "varying vec4 vVaryingColor; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = vVaryingColor; \n"
+ "} \n";
+
+GLfloat vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+};
+
+GLfloat vColors[] = {
+ // front
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f, // magenta
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+};
+
+#define VERTEX_BUFFER_SIZE 0x60000
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (4)
+
+GLint modelviewmatrix_handle;
+GLint modelviewprojectionmatrix_handle;
+GLint normalmatrix_handle;
+GLuint vertex_shader;
+GLuint fragment_shader;
+GLuint program;
+
+#define VIEWING_DISTANCE_MIN 3.0
+#define TEXTURE_ID_CUBE 1
+enum {
+ MENU_LIGHTING = 1,
+ MENU_POLYMODE,
+ MENU_TEXTURING,
+ MENU_EXIT
+};
+typedef int BOOL;
+#define TRUE 1
+#define FALSE 0
+static BOOL g_bLightingEnabled = TRUE;
+static BOOL g_bFillPolygons = TRUE;
+static BOOL g_bTexture = FALSE;
+static BOOL g_bButton1Down = FALSE;
+static GLfloat g_fTeapotAngle = 0.0;
+static GLfloat g_fTeapotAngle2 = 0.0;
+static GLfloat g_fViewDistance = 3 * VIEWING_DISTANCE_MIN;
+static GLfloat g_nearPlane = 1;
+static GLfloat g_farPlane = 1000;
+static int g_Width = 600; // Initial window width
+static int g_Height = 600; // Initial window height
+static int g_yClick = 0;
+static float g_lightPos[4] = { 10, 10, -100, 1 }; // Position of light
+#ifdef _WIN32
+static DWORD last_idle_time;
+#else
+static struct timeval last_idle_time;
+#endif
+void DrawCubeFace(float fSize)
+{
+ fSize /= 2.0;
+ glBegin(GL_QUADS);
+ glVertex3f(-fSize, -fSize, fSize); glTexCoord2f (0, 0);
+ glVertex3f(fSize, -fSize, fSize); glTexCoord2f (1, 0);
+ glVertex3f(fSize, fSize, fSize); glTexCoord2f (1, 1);
+ glVertex3f(-fSize, fSize, fSize); glTexCoord2f (0, 1);
+ glEnd();
+}
+void DrawCubeWithTextureCoords (float fSize)
+{
+ glPushMatrix();
+ DrawCubeFace (fSize);
+ glRotatef (90, 1, 0, 0);
+ DrawCubeFace (fSize);
+ glRotatef (90, 1, 0, 0);
+ DrawCubeFace (fSize);
+ glRotatef (90, 1, 0, 0);
+ DrawCubeFace (fSize);
+ glRotatef (90, 0, 1, 0);
+ DrawCubeFace (fSize);
+ glRotatef (180, 0, 1, 0);
+ DrawCubeFace (fSize);
+ glPopMatrix();
+}
+void RenderObjects(void)
+{
+ float colorBronzeDiff[4] = { 0.8, 0.6, 0.0, 1.0 };
+ float colorBronzeSpec[4] = { 1.0, 1.0, 0.4, 1.0 };
+ float colorBlue[4] = { 0.0, 0.2, 1.0, 1.0 };
+ float colorNone[4] = { 0.0, 0.0, 0.0, 0.0 };
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ // Main object (cube) ... transform to its coordinates, and render
+ glRotatef(15, 1, 0, 0);
+ glRotatef(45, 0, 1, 0);
+ glRotatef(g_fTeapotAngle, 0, 0, 1);
+ glMaterialfv(GL_FRONT, GL_DIFFUSE, colorBlue);
+ glMaterialfv(GL_FRONT, GL_SPECULAR, colorNone);
+ glColor4fv(colorBlue);
+ glBindTexture(GL_TEXTURE_2D, TEXTURE_ID_CUBE);
+ DrawCubeWithTextureCoords(1.0);
+ // Child object (teapot) ... relative transform, and render
+ glPushMatrix();
+ glTranslatef(2, 0, 0);
+ glRotatef(g_fTeapotAngle2, 1, 1, 0);
+ glMaterialfv(GL_FRONT, GL_DIFFUSE, colorBronzeDiff);
+ glMaterialfv(GL_FRONT, GL_SPECULAR, colorBronzeSpec);
+ glMaterialf(GL_FRONT, GL_SHININESS, 50.0);
+ glColor4fv(colorBronzeDiff);
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glutSolidTeapot(0.3);
+ glPopMatrix();
+ glPopMatrix();
+}
+void display(void)
+{
+ // Clear frame buffer and depth buffer
+ glClearColor(0.5, 0.5, 0.5, 1.0);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ glEnable(GL_CULL_FACE);
+
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 4, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 8, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 12, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 16, 4);
+ glDrawArrays(GL_TRIANGLE_STRIP, 20, 4);
+
+ // Make sure changes appear onscreen
+ glutSwapBuffers();
+}
+void reshape(GLint width, GLint height)
+{
+ g_Width = width;
+ g_Height = height;
+ glViewport(0, 0, g_Width, g_Height);
+}
+void InitGraphics(void)
+{
+ GLint ret;
+ printf("GL Extensions \"%s\"\n", glGetString(GL_EXTENSIONS));
+
+ vertex_shader = glCreateShader(GL_VERTEX_SHADER);
+ if (!vertex_shader) {
+ exit(1);
+ }
+
+
+ glShaderSource(vertex_shader, 1, &vertex_shader_source, NULL);
+ glCompileShader(vertex_shader);
+
+ glGetShaderiv(vertex_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: vertex shader compilation failed!:\n");
+ glGetShaderiv(vertex_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(vertex_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ exit(1);
+ } else
+ printf("Vertex shader compilation succeeded!\n");
+
+ fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);
+ if (!fragment_shader) {
+ exit(1);
+ }
+
+
+ glShaderSource(fragment_shader, 1, &fragment_shader_source, NULL);
+ glCompileShader(fragment_shader);
+
+ glGetShaderiv(fragment_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: fragment shader compilation failed!:\n");
+ glGetShaderiv(fragment_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(fragment_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ exit(-1);
+ } else
+ printf("Fragment shader compilation succeeded!\n");
+
+ program = glCreateProgram();
+ if (!program) {
+ printf("Error: failed to create program!\n");
+ exit(-1);
+ }
+
+ glAttachShader(program, vertex_shader);
+ glAttachShader(program, fragment_shader);
+
+ glBindAttribLocation(program, 0, "in_position");
+ glBindAttribLocation(program, 1, "in_color");
+
+ glLinkProgram(program);
+
+ glGetProgramiv(program, GL_LINK_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: program linking failed!:\n");
+ glGetProgramiv(program, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetProgramInfoLog(program, ret, NULL, log);
+ printf("%s", log);
+ }
+ exit(-1);
+ } else
+ printf("program linking succeeded!\n");
+
+ glUseProgram(program);
+
+ /* Make vertex buffer object */
+ float vtx_logical[NUM_VERTICES * COMPONENTS_PER_VERTEX * 3];
+ size_t stride = COMPONENTS_PER_VERTEX * 3;
+
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int src_idx = vert * COMPONENTS_PER_VERTEX;
+ int dest_idx = vert * stride;
+ for(int comp=0; comp<COMPONENTS_PER_VERTEX; ++comp)
+ {
+ vtx_logical[dest_idx+comp+0] = vVertices[src_idx + comp]; /* 0 */
+ vtx_logical[dest_idx+comp+6] = vColors[src_idx + comp]; /* 2 */
+ }
+ }
+
+ int vbo = 0;
+ glGenBuffers(1, &vbo);
+ glBindBuffer(GL_ARRAY_BUFFER, vbo);
+ glBufferData(GL_ARRAY_BUFFER, sizeof(vtx_logical), (void*)vtx_logical, GL_STREAM_DRAW);
+
+ glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, stride*4, (void*)(0*4));
+ glEnableVertexAttribArray(0);
+
+ glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, stride*4, (void*)(6*4));
+ glEnableVertexAttribArray(1);
+
+ modelviewmatrix_handle = glGetUniformLocation(program, "modelviewMatrix");
+ modelviewprojectionmatrix_handle = glGetUniformLocation(program, "modelviewprojectionMatrix");
+ normalmatrix_handle = glGetUniformLocation(program, "normalMatrix");
+}
+void MouseButton(int button, int state, int x, int y)
+{
+ // Respond to mouse button presses.
+ // If button1 pressed, mark this state so we know in motion function.
+ if (button == GLUT_LEFT_BUTTON)
+ {
+ g_bButton1Down = (state == GLUT_DOWN) ? TRUE : FALSE;
+ g_yClick = y - 3 * g_fViewDistance;
+ }
+}
+void MouseMotion(int x, int y)
+{
+ // If button1 pressed, zoom in/out if mouse is moved up/down.
+ if (g_bButton1Down)
+ {
+ g_fViewDistance = (y - g_yClick) / 3.0;
+ if (g_fViewDistance < VIEWING_DISTANCE_MIN)
+ g_fViewDistance = VIEWING_DISTANCE_MIN;
+ glutPostRedisplay();
+ }
+}
+void AnimateScene(void)
+{
+ float dt;
+#ifdef _WIN32
+ DWORD time_now;
+ time_now = GetTickCount();
+ dt = (float) (time_now - last_idle_time) / 1000.0;
+#else
+ // Figure out time elapsed since last call to idle function
+ struct timeval time_now;
+ gettimeofday(&time_now, NULL);
+ dt = (float)(time_now.tv_sec - last_idle_time.tv_sec) +
+ 1.0e-6*(time_now.tv_usec - last_idle_time.tv_usec);
+#endif
+ // Animate the teapot by updating its angles
+ g_fTeapotAngle += dt * 30.0;
+ g_fTeapotAngle2 += dt * 100.0;
+ // Save time_now for next time
+ last_idle_time = time_now;
+ // Force redraw
+ glutPostRedisplay();
+}
+void SelectFromMenu(int idCommand)
+{
+ switch (idCommand)
+ {
+ case MENU_LIGHTING:
+ g_bLightingEnabled = !g_bLightingEnabled;
+ if (g_bLightingEnabled)
+ glEnable(GL_LIGHTING);
+ else
+ glDisable(GL_LIGHTING);
+ break;
+ case MENU_POLYMODE:
+ g_bFillPolygons = !g_bFillPolygons;
+ glPolygonMode (GL_FRONT_AND_BACK, g_bFillPolygons ? GL_FILL : GL_LINE);
+ break;
+ case MENU_TEXTURING:
+ g_bTexture = !g_bTexture;
+ if (g_bTexture)
+ glEnable(GL_TEXTURE_2D);
+ else
+ glDisable(GL_TEXTURE_2D);
+ break;
+ case MENU_EXIT:
+ exit (0);
+ break;
+ }
+ // Almost any menu selection requires a redraw
+ glutPostRedisplay();
+}
+void Keyboard(unsigned char key, int x, int y)
+{
+ switch (key)
+ {
+ case 27: // ESCAPE key
+ exit (0);
+ break;
+ case 'l':
+ SelectFromMenu(MENU_LIGHTING);
+ break;
+ case 'p':
+ SelectFromMenu(MENU_POLYMODE);
+ break;
+ case 't':
+ SelectFromMenu(MENU_TEXTURING);
+ break;
+ }
+}
+int BuildPopupMenu (void)
+{
+ int menu;
+ menu = glutCreateMenu (SelectFromMenu);
+ glutAddMenuEntry ("Toggle lighting\tl", MENU_LIGHTING);
+ glutAddMenuEntry ("Toggle polygon fill\tp", MENU_POLYMODE);
+ glutAddMenuEntry ("Toggle texturing\tt", MENU_TEXTURING);
+ glutAddMenuEntry ("Exit demo\tEsc", MENU_EXIT);
+ return menu;
+}
+int main(int argc, char** argv)
+{
+ // GLUT Window Initialization:
+ glutInit (&argc, argv);
+ glutInitWindowSize (g_Width, g_Height);
+ glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
+ glutCreateWindow ("Orientation check");
+
+ GLenum err = glewInit();
+ if (GLEW_OK != err)
+ {
+ /* Problem: glewInit failed, something is seriously wrong. */
+ fprintf(stderr, "Error: %s\n", glewGetErrorString(err));
+ exit(1);
+ }
+ fprintf(stdout, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));
+
+ // Initialize OpenGL graphics state
+ InitGraphics();
+ // Register callbacks:
+ glutDisplayFunc (display);
+ glutReshapeFunc (reshape);
+ glutKeyboardFunc (Keyboard);
+ glutMouseFunc (MouseButton);
+ glutMotionFunc (MouseMotion);
+ glutIdleFunc (AnimateScene);
+ // Create our popup menu
+ BuildPopupMenu ();
+ glutAttachMenu (GLUT_RIGHT_BUTTON);
+ // Get the initial time, for use by animation
+#ifdef _WIN32
+ last_idle_time = GetTickCount();
+#else
+ gettimeofday (&last_idle_time, NULL);
+#endif
+ // Turn the flow of control over to GLUT
+ glutMainLoop ();
+ return 0;
+}
+
+
diff --git a/src/egl/particle_system_x11.c b/src/egl/particle_system_x11.c
new file mode 100644
index 0000000..ea57840
--- /dev/null
+++ b/src/egl/particle_system_x11.c
@@ -0,0 +1,319 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// ParticleSystem.c
+//
+// This is an example that demonstrates rendering a particle system
+// using a vertex shader and point sprites.
+//
+#include <stdlib.h>
+#include <math.h>
+#include "esUtil.h"
+#include "esWindow.h"
+#include "esShader.h"
+#include "viv_hook.h"
+
+#define HOOK
+
+#define NUM_PARTICLES 1000
+#define PARTICLE_SIZE 7
+
+typedef struct
+{
+ // Handle to a program object
+ GLuint programObject;
+
+ // Attribute locations
+ GLint lifetimeLoc;
+ GLint startPositionLoc;
+ GLint endPositionLoc;
+
+ // Uniform location
+ GLint timeLoc;
+ GLint colorLoc;
+ GLint centerPositionLoc;
+ GLint samplerLoc;
+
+ // Texture handle
+ GLuint textureId;
+
+ // Particle vertex data
+ float particleData[ NUM_PARTICLES * PARTICLE_SIZE ];
+
+ // Current time
+ float time;
+
+ int frames;
+
+} UserData;
+
+///
+// Load texture from disk
+//
+GLuint LoadTexture ( char *fileName )
+{
+ int width,
+ height;
+ char *buffer = esLoadTGA ( fileName, &width, &height );
+ GLuint texId;
+
+ if ( buffer == NULL )
+ {
+ esLogMessage ( "Error loading (%s) image.\n", fileName );
+ return 0;
+ }
+
+ glGenTextures ( 1, &texId );
+ glBindTexture ( GL_TEXTURE_2D, texId );
+
+ glTexImage2D ( GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, buffer );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
+
+ free ( buffer );
+
+ return texId;
+}
+
+
+///
+// Initialize the shader and program object
+//
+int Init ( ESContext *esContext )
+{
+ UserData *userData = esContext->userData;
+ int i;
+
+ GLbyte vShaderStr[] =
+ "uniform float u_time; \n"
+ "uniform vec3 u_centerPosition; \n"
+ "attribute float a_lifetime; \n"
+ "attribute vec3 a_startPosition; \n"
+ "attribute vec3 a_endPosition; \n"
+ "varying float v_lifetime; \n"
+ "void main() \n"
+ "{ \n"
+ " if ( u_time <= a_lifetime ) \n"
+ " { \n"
+ " gl_Position.xyz = a_startPosition + \n"
+ " (u_time * a_endPosition); \n"
+ " gl_Position.xyz += u_centerPosition; \n"
+ " gl_Position.w = 1.0; \n"
+ " } \n"
+ " else \n"
+ " gl_Position = vec4( -1000, -1000, 0, 0 ); \n"
+ " v_lifetime = 1.0 - ( u_time / a_lifetime ); \n"
+ " v_lifetime = clamp ( v_lifetime, 0.0, 1.0 ); \n"
+ " gl_PointSize = ( v_lifetime * v_lifetime ) * 40.0; \n"
+ "}";
+
+ GLbyte fShaderStr[] =
+ "precision mediump float; \n"
+ "uniform vec4 u_color; \n"
+ "varying float v_lifetime; \n"
+ "uniform sampler2D s_texture; \n"
+ "void main() \n"
+ "{ \n"
+ " vec4 texColor; \n"
+ " texColor = texture2D( s_texture, gl_PointCoord ); \n"
+ " gl_FragColor = vec4( u_color ) * texColor; \n"
+ " gl_FragColor.a *= v_lifetime; \n"
+ "} \n";
+
+ // Load the shaders and get a linked program object
+ userData->programObject = esLoadProgram ( vShaderStr, fShaderStr );
+
+ // Get the attribute locations
+ userData->lifetimeLoc = glGetAttribLocation ( userData->programObject, "a_lifetime" );
+ userData->startPositionLoc = glGetAttribLocation ( userData->programObject, "a_startPosition" );
+ userData->endPositionLoc = glGetAttribLocation ( userData->programObject, "a_endPosition" );
+
+ // Get the uniform locations
+ userData->timeLoc = glGetUniformLocation ( userData->programObject, "u_time" );
+ userData->centerPositionLoc = glGetUniformLocation ( userData->programObject, "u_centerPosition" );
+ userData->colorLoc = glGetUniformLocation ( userData->programObject, "u_color" );
+ userData->samplerLoc = glGetUniformLocation ( userData->programObject, "s_texture" );
+
+ glClearColor ( 0.0f, 0.0f, 0.0f, 0.0f );
+
+ // Fill in particle data array
+ srand ( 0 );
+ for ( i = 0; i < NUM_PARTICLES; i++ )
+ {
+ float *particleData = &userData->particleData[i * PARTICLE_SIZE];
+
+ // Lifetime of particle
+ (*particleData++) = ( (float)(rand() % 10000) / 10000.0f );
+
+ // End position of particle
+ (*particleData++) = ( (float)(rand() % 10000) / 5000.0f ) - 1.0f;
+ (*particleData++) = ( (float)(rand() % 10000) / 5000.0f ) - 1.0f;
+ (*particleData++) = ( (float)(rand() % 10000) / 5000.0f ) - 1.0f;
+
+ // Start position of particle
+ (*particleData++) = ( (float)(rand() % 10000) / 40000.0f ) - 0.125f;
+ (*particleData++) = ( (float)(rand() % 10000) / 40000.0f ) - 0.125f;
+ (*particleData++) = ( (float)(rand() % 10000) / 40000.0f ) - 0.125f;
+
+ }
+
+ // Initialize time to cause reset on first update
+ userData->time = 1.0f;
+
+ userData->textureId = LoadTexture ( "smoke.tga" );
+ if ( userData->textureId <= 0 )
+ {
+ return FALSE;
+ }
+
+ userData->frames = 0;
+
+ return TRUE;
+}
+
+///
+// Update time-based variables
+//
+void Update ( ESContext *esContext, float deltaTime )
+{
+ UserData *userData = esContext->userData;
+
+ userData->time += deltaTime;
+
+ if ( userData->time >= 1.0f )
+ {
+ float centerPos[3];
+ float color[4];
+
+ userData->time = 0.0f;
+
+ // Pick a new start location and color
+ centerPos[0] = ( (float)(rand() % 10000) / 10000.0f ) - 0.5f;
+ centerPos[1] = ( (float)(rand() % 10000) / 10000.0f ) - 0.5f;
+ centerPos[2] = ( (float)(rand() % 10000) / 10000.0f ) - 0.5f;
+
+ glUniform3fv ( userData->centerPositionLoc, 1, &centerPos[0] );
+
+ // Random color
+ color[0] = ( (float)(rand() % 10000) / 20000.0f ) + 0.5f;
+ color[1] = ( (float)(rand() % 10000) / 20000.0f ) + 0.5f;
+ color[2] = ( (float)(rand() % 10000) / 20000.0f ) + 0.5f;
+ color[3] = 0.5;
+
+ glUniform4fv ( userData->colorLoc, 1, &color[0] );
+ }
+
+ // Load uniform time variable
+ glUniform1f ( userData->timeLoc, userData->time );
+}
+
+///
+// Draw a triangle using the shader pair created in Init()
+//
+void Draw ( ESContext *esContext )
+{
+ UserData *userData = esContext->userData;
+
+ // Set the viewport
+ glViewport ( 0, 0, esContext->width, esContext->height );
+
+ // Clear the color buffer
+ glClear ( GL_COLOR_BUFFER_BIT );
+
+ // Use the program object
+ glUseProgram ( userData->programObject );
+
+ // Load the vertex attributes
+ glVertexAttribPointer ( userData->lifetimeLoc, 1, GL_FLOAT,
+ GL_FALSE, PARTICLE_SIZE * sizeof(GLfloat),
+ userData->particleData );
+
+ glVertexAttribPointer ( userData->endPositionLoc, 3, GL_FLOAT,
+ GL_FALSE, PARTICLE_SIZE * sizeof(GLfloat),
+ &userData->particleData[1] );
+
+ glVertexAttribPointer ( userData->startPositionLoc, 3, GL_FLOAT,
+ GL_FALSE, PARTICLE_SIZE * sizeof(GLfloat),
+ &userData->particleData[4] );
+
+
+ glEnableVertexAttribArray ( userData->lifetimeLoc );
+ glEnableVertexAttribArray ( userData->endPositionLoc );
+ glEnableVertexAttribArray ( userData->startPositionLoc );
+ // Blend particles
+ glEnable ( GL_BLEND );
+ glBlendFunc ( GL_SRC_ALPHA, GL_ONE );
+
+ // Bind the texture
+ glActiveTexture ( GL_TEXTURE0 );
+ glBindTexture ( GL_TEXTURE_2D, userData->textureId );
+ glEnable ( GL_TEXTURE_2D );
+
+ // Set the sampler texture unit to 0
+ glUniform1i ( userData->samplerLoc, 0 );
+
+ glDrawArrays( GL_POINTS, 0, NUM_PARTICLES );
+
+ userData->frames ++;
+#ifdef HOOK
+ // If logging, exit mainloop after a few frames
+ if(userData->frames == 5)
+ {
+ esContext->terminate = TRUE;
+ }
+#endif
+}
+
+///
+// Cleanup
+//
+void ShutDown ( ESContext *esContext )
+{
+ UserData *userData = esContext->userData;
+
+ // Delete texture object
+ glDeleteTextures ( 1, &userData->textureId );
+
+ // Delete program object
+ glDeleteProgram ( userData->programObject );
+}
+
+
+int main ( int argc, char *argv[] )
+{
+ ESContext esContext;
+ UserData userData;
+
+#ifdef HOOK
+ the_hook("/tmp/egl2.fdr");
+#endif
+
+ esInitContext ( &esContext );
+ esContext.userData = &userData;
+
+ esCreateWindow ( &esContext, "ParticleSystem", 640, 480, ES_WINDOW_RGB );
+
+ if ( !Init ( &esContext ) )
+ return 0;
+
+ esRegisterDrawFunc ( &esContext, Draw );
+ esRegisterUpdateFunc ( &esContext, Update );
+
+ esMainLoop ( &esContext );
+
+ ShutDown ( &esContext );
+#ifdef HOOK
+ glFinish();
+ close_hook();
+#endif
+}
+
diff --git a/src/egl/ps_sandbox.c b/src/egl/ps_sandbox.c
new file mode 100644
index 0000000..589a2a2
--- /dev/null
+++ b/src/egl/ps_sandbox.c
@@ -0,0 +1,273 @@
+/*
+ * Copyright (c) 2013 Wladimir J. van der Laan
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Pixel shader playground */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdbool.h>
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+#include <dlfcn.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+#include "esTransform.h"
+#include "eglutil.h"
+#include "dump_gl_screen.h"
+#include "viv_hook.h"
+
+static EGLint const config_attribute_list[] = {
+ EGL_RED_SIZE, 8,
+ EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8,
+ //EGL_ALPHA_SIZE, 8,
+ //EGL_SAMPLE_BUFFERS, 1,
+ //EGL_SAMPLES, 2,
+ //EGL_SAMPLES, 4,
+ //EGL_RED_SIZE, 4,
+ //EGL_GREEN_SIZE, 4,
+ //EGL_BLUE_SIZE, 4,
+ EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+ EGL_DEPTH_SIZE, 8,
+ EGL_NONE
+};
+
+static EGLint const pbuffer_attribute_list[] = {
+ EGL_WIDTH, 256,
+ EGL_HEIGHT, 256,
+ EGL_LARGEST_PBUFFER, EGL_TRUE,
+ EGL_NONE
+};
+
+static const EGLint context_attribute_list[] = {
+ EGL_CONTEXT_CLIENT_VERSION, 2,
+ EGL_NONE
+};
+
+int main(int argc, char *argv[])
+{
+ EGLDisplay display;
+ EGLint egl_major, egl_minor;
+ EGLConfig config;
+ EGLint num_config;
+ EGLContext context;
+ EGLSurface surface;
+ GLuint vertex_shader;
+ GLuint fragment_shader;
+ GLuint program;
+ GLint ret;
+ GLint width, height;
+
+ the_hook("/mnt/sdcard/egl2.fdr");
+
+ const char *vertex_shader_source =
+ "attribute vec4 in_position; \n"
+ "attribute vec2 in_coord; \n"
+ "\n"
+ "varying vec2 coord; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = in_position;\n"
+ " coord = in_coord; \n"
+ "} \n";
+
+ const char *fragment_shader_source =
+ "precision mediump float; \n"
+ " \n"
+ "varying vec2 coord; \n"
+ " \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = vec4(coord, 0.0, 1.0); \n"
+ "} \n";
+
+ GLfloat vVertices[] = {
+ -1.0f, -1.0f, +0.0f,
+ +1.0f, -1.0f, +0.0f,
+ -1.0f, +1.0f, +0.0f,
+ +1.0f, +1.0f, +0.0f,
+ };
+
+ GLfloat vTexCoords[] = {
+ +0.0f, +0.0f,
+ +1.0f, +0.0f,
+ +0.0f, +1.0f,
+ +1.0f, +1.0f,
+ };
+
+ display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+ if (display == EGL_NO_DISPLAY) {
+ printf("Error: No display found!\n");
+ return -1;
+ }
+
+ if (!eglInitialize(display, &egl_major, &egl_minor)) {
+ printf("Error: eglInitialise failed!\n");
+ return -1;
+ }
+
+ eglChooseConfig(display, config_attribute_list, &config, 1, &num_config);
+ printEGLConfig(display, config);
+
+ context = eglCreateContext(display, config, EGL_NO_CONTEXT, context_attribute_list);
+ if (context == EGL_NO_CONTEXT) {
+ printf("Error: eglCreateContext failed: %d\n", eglGetError());
+ return -1;
+ }
+
+ surface = eglCreatePbufferSurface(display, config, pbuffer_attribute_list);
+ if (surface == EGL_NO_SURFACE) {
+ printf("Error: eglCreatePbufferSurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ if (!eglQuerySurface(display, surface, EGL_WIDTH, &width) ||
+ !eglQuerySurface(display, surface, EGL_HEIGHT, &height)) {
+ printf("Error: eglQuerySurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ if (!eglMakeCurrent(display, surface, surface, context)) {
+ printf("Error: eglMakeCurrent() failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ vertex_shader = glCreateShader(GL_VERTEX_SHADER);
+ if (!vertex_shader) {
+ printf("Error: glCreateShader(GL_VERTEX_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(vertex_shader, 1, &vertex_shader_source, NULL);
+ glCompileShader(vertex_shader);
+
+ glGetShaderiv(vertex_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: vertex shader compilation failed!:\n");
+ glGetShaderiv(vertex_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(vertex_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Vertex shader compilation succeeded!\n");
+
+ fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);
+ if (!fragment_shader) {
+ printf("Error: glCreateShader(GL_FRAGMENT_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(fragment_shader, 1, &fragment_shader_source, NULL);
+ glCompileShader(fragment_shader);
+
+ glGetShaderiv(fragment_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: fragment shader compilation failed!:\n");
+ glGetShaderiv(fragment_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(fragment_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Fragment shader compilation succeeded!\n");
+
+ program = glCreateProgram();
+ if (!program) {
+ printf("Error: failed to create program!\n");
+ return -1;
+ }
+
+ glAttachShader(program, vertex_shader);
+ glAttachShader(program, fragment_shader);
+
+ glBindAttribLocation(program, 0, "in_position");
+ glBindAttribLocation(program, 1, "in_coord");
+
+ glLinkProgram(program);
+
+ glGetProgramiv(program, GL_LINK_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: program linking failed!:\n");
+ glGetProgramiv(program, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetProgramInfoLog(program, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("program linking succeeded!\n");
+
+ glUseProgram(program);
+
+ glViewport(0, 0, width, height);
+
+ /* clear the color buffer */
+ glClearColor(0.5, 0.5, 0.5, 1.0);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vVertices);
+ glEnableVertexAttribArray(0);
+
+ glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 0, vTexCoords);
+ glEnableVertexAttribArray(1);
+
+ //glEnable(GL_CULL_FACE);
+
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+
+ glFlush();
+
+ fflush(stdout);
+ dump_gl_screen("/sdcard/egl2.bmp", width, height);
+
+ close_hook();
+
+ return 0;
+}
diff --git a/src/egl/simple_texture_cubemap.c b/src/egl/simple_texture_cubemap.c
new file mode 100644
index 0000000..db93e0a
--- /dev/null
+++ b/src/egl/simple_texture_cubemap.c
@@ -0,0 +1,325 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// Simple_TextureCubemap.c
+//
+// This is a simple example that draws a sphere with a cubemap image applied.
+//
+#include <stdlib.h>
+#include <stdio.h>
+#include <EGL/egl.h>
+#include "esUtil.h"
+
+#include "esTransform.h"
+#include "esShapes.h"
+#include "eglutil.h"
+#include "dump_gl_screen.h"
+#include "viv_hook.h"
+
+#define HOOK
+
+///
+// Create a simple cubemap with a 1x1 face with a different
+// color for each face
+static GLuint CreateSimpleTextureCubemap( )
+{
+ GLuint textureId;
+ // Six 1x1 RGB faces
+ GLubyte cubePixels[6 * 3] =
+ {
+ // Face 0 - Red
+ 255, 0, 0,
+ // Face 1 - Green,
+ 0, 255, 0,
+ // Face 3 - Blue
+ 0, 0, 255,
+ // Face 4 - Yellow
+ 255, 255, 0,
+ // Face 5 - Purple
+ 255, 0, 255,
+ // Face 6 - White
+ 255, 255, 255
+ };
+
+ // Generate a texture object
+ glGenTextures ( 1, &textureId );
+
+ // Bind the texture object
+ glBindTexture ( GL_TEXTURE_CUBE_MAP, textureId );
+
+ // Load the cube face - Positive X
+ glTexImage2D ( GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_RGB, 1, 1, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, &cubePixels[0] );
+
+ // Load the cube face - Negative X
+ glTexImage2D ( GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL_RGB, 1, 1, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, &cubePixels[3] );
+
+ // Load the cube face - Positive Y
+ glTexImage2D ( GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL_RGB, 1, 1, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, &cubePixels[6] );
+
+ // Load the cube face - Negative Y
+ glTexImage2D ( GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL_RGB, 1, 1, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, &cubePixels[9] );
+
+ // Load the cube face - Positive Z
+ glTexImage2D ( GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL_RGB, 1, 1, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, &cubePixels[12] );
+
+ // Load the cube face - Negative Z
+ glTexImage2D ( GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL_RGB, 1, 1, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, &cubePixels[15] );
+
+ // Set the filtering mode
+ glTexParameteri ( GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+ glTexParameteri ( GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
+
+ return textureId;
+
+}
+
+static EGLint const config_attribute_list[] = {
+ EGL_RED_SIZE, 8,
+ EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8,
+ EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+ EGL_DEPTH_SIZE, 8,
+ EGL_NONE
+};
+
+static EGLint const pbuffer_attribute_list[] = {
+ EGL_WIDTH, 400,
+ EGL_HEIGHT, 240,
+ EGL_LARGEST_PBUFFER, EGL_TRUE,
+ EGL_NONE
+};
+
+static const EGLint context_attribute_list[] = {
+ EGL_CONTEXT_CLIENT_VERSION, 2,
+ EGL_NONE
+};
+
+int main(int argc, char *argv[])
+{
+ EGLDisplay display;
+ EGLint egl_major, egl_minor;
+ EGLConfig config;
+ EGLint num_config;
+ EGLContext context;
+ EGLSurface surface;
+ GLuint vertex_shader;
+ GLuint fragment_shader;
+ GLuint program;
+ GLint ret;
+ GLint width, height;
+#ifdef HOOK
+ the_hook("/mnt/sdcard/egl2.fdr");
+#endif
+
+ const char *vertex_shader_source =
+ "attribute vec4 a_position; \n"
+ "attribute vec3 a_normal; \n"
+ "varying vec3 v_normal; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = a_position; \n"
+ " v_normal = a_normal; \n"
+ "} \n";
+
+ const char *fragment_shader_source =
+ "precision mediump float; \n"
+ "varying vec3 v_normal; \n"
+ "uniform samplerCube s_texture; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = textureCube( s_texture, v_normal );\n"
+ "} \n";
+
+ display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+ if (display == EGL_NO_DISPLAY) {
+ printf("Error: No display found!\n");
+ return -1;
+ }
+
+ if (!eglInitialize(display, &egl_major, &egl_minor)) {
+ printf("Error: eglInitialise failed!\n");
+ return -1;
+ }
+
+ printf("Using display %p with EGL version %d.%d\n",
+ display, egl_major, egl_minor);
+
+ printf("EGL Version \"%s\"\n", eglQueryString(display, EGL_VERSION));
+ printf("EGL Vendor \"%s\"\n", eglQueryString(display, EGL_VENDOR));
+ printf("EGL Extensions \"%s\"\n", eglQueryString(display, EGL_EXTENSIONS));
+
+ /* get an appropriate EGL frame buffer configuration */
+ eglChooseConfig(display, config_attribute_list, &config, 1, &num_config);
+
+ /* create an EGL rendering context */
+ context = eglCreateContext(display, config, EGL_NO_CONTEXT, context_attribute_list);
+ if (context == EGL_NO_CONTEXT) {
+ printf("Error: eglCreateContext failed: %d\n", eglGetError());
+ return -1;
+ }
+
+ surface = eglCreatePbufferSurface(display, config, pbuffer_attribute_list);
+ if (surface == EGL_NO_SURFACE) {
+ printf("Error: eglCreatePbufferSurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ if (!eglQuerySurface(display, surface, EGL_WIDTH, &width) ||
+ !eglQuerySurface(display, surface, EGL_HEIGHT, &height)) {
+ printf("Error: eglQuerySurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+ printf("PBuffer: %dx%d\n", width, height);
+ printf("GL Extensions \"%s\"\n", glGetString(GL_EXTENSIONS));
+
+ /* connect the context to the surface */
+ if (!eglMakeCurrent(display, surface, surface, context)) {
+ printf("Error: eglMakeCurrent() failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ vertex_shader = glCreateShader(GL_VERTEX_SHADER);
+ if (!vertex_shader) {
+ printf("Error: glCreateShader(GL_VERTEX_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(vertex_shader, 1, &vertex_shader_source, NULL);
+ glCompileShader(vertex_shader);
+
+ glGetShaderiv(vertex_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: vertex shader compilation failed!:\n");
+ glGetShaderiv(vertex_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(vertex_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Vertex shader compilation succeeded!\n");
+
+ fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);
+ if (!fragment_shader) {
+ printf("Error: glCreateShader(GL_FRAGMENT_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(fragment_shader, 1, &fragment_shader_source, NULL);
+ glCompileShader(fragment_shader);
+
+ glGetShaderiv(fragment_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: fragment shader compilation failed!:\n");
+ glGetShaderiv(fragment_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(fragment_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Fragment shader compilation succeeded!\n");
+
+ program = glCreateProgram();
+ if (!program) {
+ printf("Error: failed to create program!\n");
+ return -1;
+ }
+
+ glAttachShader(program, vertex_shader);
+ glAttachShader(program, fragment_shader);
+
+ glBindAttribLocation(program, 0, "a_position");
+ glBindAttribLocation(program, 1, "a_normal");
+
+ glLinkProgram(program);
+
+ glGetProgramiv(program, GL_LINK_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: program linking failed!:\n");
+ glGetProgramiv(program, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetProgramInfoLog(program, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("program linking succeeded!\n");
+
+ GLint samplerLoc = glGetUniformLocation(program, "s_texture");
+ GLint textureId = CreateSimpleTextureCubemap();
+
+ GLfloat *vVertices;
+ GLfloat *vNormals;
+ GLushort *vIndices;
+ int numIndices = esGenSphere(20, 0.75f, &vVertices, &vNormals,
+ NULL, &vIndices, NULL);
+
+ glUseProgram(program);
+
+ glViewport(0, 0, width, height);
+
+ /* clear the color buffer */
+ glClearColor(0.5, 0.5, 0.5, 1.0);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vVertices);
+ glEnableVertexAttribArray(0);
+
+ glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, vNormals);
+ glEnableVertexAttribArray(1);
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_CUBE_MAP, textureId);
+ glUniform1i(samplerLoc, 0);
+
+ glEnable(GL_CULL_FACE);
+
+ glDrawElements ( GL_TRIANGLES, numIndices,
+ GL_UNSIGNED_SHORT, vIndices );
+
+ glFlush();
+
+ fflush(stdout);
+ dump_gl_screen("/sdcard/egl2.bmp", width, height);
+
+#ifdef HOOK
+ close_hook();
+#endif
+
+ return 0;
+}
+
diff --git a/src/egl/stencil_test.c b/src/egl/stencil_test.c
new file mode 100644
index 0000000..ab6d57f
--- /dev/null
+++ b/src/egl/stencil_test.c
@@ -0,0 +1,401 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// Stencil_Test.c
+//
+// This example shows various stencil buffer
+// operations.
+//
+#define HOOK
+
+#include <stdlib.h>
+#include "esUtil.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdbool.h>
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+#include <dlfcn.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include "esTransform.h"
+#include "eglutil.h"
+#include "dump_gl_screen.h"
+#include "viv_hook.h"
+
+static EGLint const config_attribute_list[] = {
+ EGL_RED_SIZE, 8,
+ EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8,
+ EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+ EGL_DEPTH_SIZE, 16,
+ EGL_STENCIL_SIZE, 8,
+ EGL_NONE
+};
+
+static EGLint const pbuffer_attribute_list[] = {
+ EGL_WIDTH, 400,
+ EGL_HEIGHT, 240,
+ EGL_LARGEST_PBUFFER, EGL_TRUE,
+ EGL_NONE
+};
+
+static const EGLint context_attribute_list[] = {
+ EGL_CONTEXT_CLIENT_VERSION, 2,
+ EGL_NONE
+};
+
+int main(int argc, char *argv[])
+{
+ EGLDisplay display;
+ EGLint egl_major, egl_minor;
+ EGLConfig config;
+ EGLint num_config;
+ EGLContext context;
+ EGLSurface surface;
+ GLuint vertex_shader;
+ GLuint fragment_shader;
+ GLuint program;
+ GLint ret;
+ GLint width, height;
+#ifdef HOOK
+ the_hook("/mnt/sdcard/egl2.fdr");
+#endif
+
+ const char *vertex_shader_source =
+ "attribute vec4 a_position; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = a_position; \n"
+ "} \n";
+
+ const char *fragment_shader_source =
+ "precision mediump float; \n"
+ "uniform vec4 u_color; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = u_color; \n"
+ "} \n";
+ GLfloat vVertices[] = {
+ -0.75f, 0.25f, 0.50f, // Quad #0
+ -0.25f, 0.25f, 0.50f,
+ -0.25f, 0.75f, 0.50f,
+ -0.75f, 0.75f, 0.50f,
+ 0.25f, 0.25f, 0.90f, // Quad #1
+ 0.75f, 0.25f, 0.90f,
+ 0.75f, 0.75f, 0.90f,
+ 0.25f, 0.75f, 0.90f,
+ -0.75f, -0.75f, 0.50f, // Quad #2
+ -0.25f, -0.75f, 0.50f,
+ -0.25f, -0.25f, 0.50f,
+ -0.75f, -0.25f, 0.50f,
+ 0.25f, -0.75f, 0.50f, // Quad #3
+ 0.75f, -0.75f, 0.50f,
+ 0.75f, -0.25f, 0.50f,
+ 0.25f, -0.25f, 0.50f,
+ -1.00f, -1.00f, 0.00f, // Big Quad
+ 1.00f, -1.00f, 0.00f,
+ 1.00f, 1.00f, 0.00f,
+ -1.00f, 1.00f, 0.00f
+ };
+
+ GLubyte indices[][6] = {
+ { 0, 1, 2, 0, 2, 3 }, // Quad #0
+ { 4, 5, 6, 4, 6, 7 }, // Quad #1
+ { 8, 9, 10, 8, 10, 11 }, // Quad #2
+ { 12, 13, 14, 12, 14, 15 }, // Quad #3
+ { 16, 17, 18, 16, 18, 19 } // Big Quad
+ };
+
+#define NumTests 4
+ GLfloat colors[NumTests][4] = {
+ { 1.0f, 0.0f, 0.0f, 1.0f },
+ { 0.0f, 1.0f, 0.0f, 1.0f },
+ { 0.0f, 0.0f, 1.0f, 1.0f },
+ { 1.0f, 1.0f, 0.0f, 0.0f }
+ };
+
+ GLint numStencilBits;
+ GLuint stencilValues[NumTests] = {
+ 0x7, // Result of test 0
+ 0x0, // Result of test 1
+ 0x2, // Result of test 2
+ 0xff // Result of test 3. We need to fill this
+ // value in a run-time
+ };
+
+
+ display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+ if (display == EGL_NO_DISPLAY) {
+ printf("Error: No display found!\n");
+ return -1;
+ }
+
+ if (!eglInitialize(display, &egl_major, &egl_minor)) {
+ printf("Error: eglInitialise failed!\n");
+ return -1;
+ }
+
+ printf("Using display %p with EGL version %d.%d\n",
+ display, egl_major, egl_minor);
+
+ printf("EGL Version \"%s\"\n", eglQueryString(display, EGL_VERSION));
+ printf("EGL Vendor \"%s\"\n", eglQueryString(display, EGL_VENDOR));
+ printf("EGL Extensions \"%s\"\n", eglQueryString(display, EGL_EXTENSIONS));
+
+ /* get an appropriate EGL frame buffer configuration */
+ eglChooseConfig(display, config_attribute_list, &config, 1, &num_config);
+
+ /* create an EGL rendering context */
+ context = eglCreateContext(display, config, EGL_NO_CONTEXT, context_attribute_list);
+ if (context == EGL_NO_CONTEXT) {
+ printf("Error: eglCreateContext failed: %d\n", eglGetError());
+ return -1;
+ }
+
+ surface = eglCreatePbufferSurface(display, config, pbuffer_attribute_list);
+ if (surface == EGL_NO_SURFACE) {
+ printf("Error: eglCreatePbufferSurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ if (!eglQuerySurface(display, surface, EGL_WIDTH, &width) ||
+ !eglQuerySurface(display, surface, EGL_HEIGHT, &height)) {
+ printf("Error: eglQuerySurface failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+ printf("PBuffer: %dx%d\n", width, height);
+ printf("GL Extensions \"%s\"\n", glGetString(GL_EXTENSIONS));
+
+ /* connect the context to the surface */
+ if (!eglMakeCurrent(display, surface, surface, context)) {
+ printf("Error: eglMakeCurrent() failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ vertex_shader = glCreateShader(GL_VERTEX_SHADER);
+ if (!vertex_shader) {
+ printf("Error: glCreateShader(GL_VERTEX_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+ glShaderSource(vertex_shader, 1, &vertex_shader_source, NULL);
+ glCompileShader(vertex_shader);
+
+ glGetShaderiv(vertex_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: vertex shader compilation failed!:\n");
+ glGetShaderiv(vertex_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(vertex_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Vertex shader compilation succeeded!\n");
+
+ fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);
+ if (!fragment_shader) {
+ printf("Error: glCreateShader(GL_FRAGMENT_SHADER) failed: %d (%s)\n",
+ eglGetError(), eglStrError(eglGetError()));
+ return -1;
+ }
+
+
+ glShaderSource(fragment_shader, 1, &fragment_shader_source, NULL);
+ glCompileShader(fragment_shader);
+
+ glGetShaderiv(fragment_shader, GL_COMPILE_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: fragment shader compilation failed!:\n");
+ glGetShaderiv(fragment_shader, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetShaderInfoLog(fragment_shader, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("Fragment shader compilation succeeded!\n");
+
+ program = glCreateProgram();
+ if (!program) {
+ printf("Error: failed to create program!\n");
+ return -1;
+ }
+
+ glAttachShader(program, vertex_shader);
+ glAttachShader(program, fragment_shader);
+
+ glBindAttribLocation(program, 0, "in_position");
+
+ glLinkProgram(program);
+
+ glGetProgramiv(program, GL_LINK_STATUS, &ret);
+ if (!ret) {
+ char *log;
+
+ printf("Error: program linking failed!:\n");
+ glGetProgramiv(program, GL_INFO_LOG_LENGTH, &ret);
+
+ if (ret > 1) {
+ log = malloc(ret);
+ glGetProgramInfoLog(program, ret, NULL, log);
+ printf("%s", log);
+ }
+ return -1;
+ } else
+ printf("program linking succeeded!\n");
+
+ GLint colorLoc = glGetUniformLocation(program, "u_color");
+ glUseProgram(program);
+
+ glViewport(0, 0, width, height);
+
+ // Set the clear color
+ glClearColor ( 0.0f, 0.0f, 0.0f, 0.0f );
+
+ // Set the stencil clear value
+ glClearStencil ( 0x1 );
+
+ // Set the depth clear value
+ glClearDepthf( 0.75f );
+
+ // Enable the depth and stencil tests
+ glEnable( GL_DEPTH_TEST );
+ glEnable( GL_STENCIL_TEST );
+
+ /* clear the color buffer */
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
+
+ // Load the vertex position
+ glVertexAttribPointer ( 0, 3, GL_FLOAT,
+ GL_FALSE, 0, vVertices );
+
+ glEnableVertexAttribArray ( 0 );
+
+ // Test 0:
+ //
+ // Initialize upper-left region. In this case, the
+ // stencil-buffer values will be replaced because the
+ // stencil test for the rendered pixels will fail the
+ // stencil test, which is
+ //
+ // ref mask stencil mask
+ // ( 0x7 & 0x3 ) < ( 0x1 & 0x3 )
+ //
+ // The value in the stencil buffer for these pixels will
+ // be 0x7.
+ //
+ glStencilFunc( GL_LESS, 0x7, 0x3 );
+ glStencilOp( GL_REPLACE, GL_DECR, GL_DECR );
+ glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, indices[0] );
+
+ // Test 1:
+ //
+ // Initialize the upper-right region. Here, we'll decrement
+ // the stencil-buffer values where the stencil test passes
+ // but the depth test fails. The stencil test is
+ //
+ // ref mask stencil mask
+ // ( 0x3 & 0x3 ) > ( 0x1 & 0x3 )
+ //
+ // but where the geometry fails the depth test. The
+ // stencil values for these pixels will be 0x0.
+ //
+ glStencilFunc( GL_GREATER, 0x3, 0x3 );
+ glStencilOp( GL_KEEP, GL_DECR, GL_KEEP );
+ glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, indices[1] );
+
+ // Test 2:
+ //
+ // Initialize the lower-left region. Here we'll increment
+ // (with saturation) the stencil value where both the
+ // stencil and depth tests pass. The stencil test for
+ // these pixels will be
+ //
+ // ref mask stencil mask
+ // ( 0x1 & 0x3 ) == ( 0x1 & 0x3 )
+ //
+ // The stencil values for these pixels will be 0x2.
+ //
+ glStencilFunc( GL_EQUAL, 0x1, 0x3 );
+ glStencilOp( GL_KEEP, GL_INCR, GL_INCR );
+ glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, indices[2] );
+
+ // Test 3:
+ //
+ // Finally, initialize the lower-right region. We'll invert
+ // the stencil value where the stencil tests fails. The
+ // stencil test for these pixels will be
+ //
+ // ref mask stencil mask
+ // ( 0x2 & 0x1 ) == ( 0x1 & 0x1 )
+ //
+ // The stencil value here will be set to ~((2^s-1) & 0x1),
+ // (with the 0x1 being from the stencil clear value),
+ // where 's' is the number of bits in the stencil buffer
+ //
+ glStencilFunc( GL_EQUAL, 0x2, 0x1 );
+ glStencilOp( GL_INVERT, GL_KEEP, GL_KEEP );
+ glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, indices[3] );
+
+ // Since we don't know at compile time how many stecil bits are present,
+ // we'll query, and update the value correct value in the
+ // stencilValues arrays for the fourth tests. We'll use this value
+ // later in rendering.
+ glGetIntegerv( GL_STENCIL_BITS, &numStencilBits );
+ printf("num stencil bits: %i\n", numStencilBits);
+
+ stencilValues[3] = ~(((1 << numStencilBits) - 1) & 0x1) & 0xff;
+
+ // Use the stencil buffer for controlling where rendering will
+ // occur. We diable writing to the stencil buffer so we
+ // can test against them without modifying the values we
+ // generated.
+ glStencilMask( 0x0 );
+
+ for ( int i = 0; i < NumTests; ++i )
+ {
+ glStencilFunc( GL_EQUAL, stencilValues[i], 0xff );
+ glUniform4fv( colorLoc, 1, colors[i] );
+ glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, indices[4] );
+ }
+
+ glFlush();
+
+ fflush(stdout);
+ dump_gl_screen("/sdcard/egl2.bmp", width, height);
+
+#ifdef HOOK
+ close_hook();
+#endif
+
+ return 0;
+}
+
diff --git a/src/etnaviv/.gitignore b/src/etnaviv/.gitignore
new file mode 100644
index 0000000..2271b0b
--- /dev/null
+++ b/src/etnaviv/.gitignore
@@ -0,0 +1,2 @@
+libetnaviv.a
+
diff --git a/src/etnaviv/Makefile b/src/etnaviv/Makefile
new file mode 100644
index 0000000..ad7f61e
--- /dev/null
+++ b/src/etnaviv/Makefile
@@ -0,0 +1,40 @@
+TOP=..
+
+include $(TOP)/Makefile.inc
+
+COMMON_FLAGS +=
+#-DDEBUG
+LDFLAGS +=
+ETNAVIV_OBJS = etna.o viv.o viv_profile.o etna_mem.o etna_queue.o etna_tex.o etna_fb.o etna_rs.o
+
+ifeq ($(ETNAVIV_HOOK), 1)
+# Define ETNAVIV_HOOK=1 to enable hook mechanism
+# fdr will be written to ETNAVIV_FDR environment variable
+COMMON_FLAGS += -I../util -DETNAVIV_HOOK
+ETNAVIV_OBJS += ../lib/viv_hook.o ../lib/flightrecorder.o ../lib/elf_hook.o
+endif
+
+ifeq ($(ETNAVIV_PROFILER), 1)
+# Define ETNAVIV_PROFILER=1 if the kernel was built with VIVANTE_PROFILER
+# enabled
+COMMON_FLAGS += -DVIVANTE_PROFILER=1
+endif
+
+ifeq ($(ETNAVIV_DEBUG), 1)
+COMMON_FLAGS += -DDEBUG=1
+endif
+
+TARGETS = libetnaviv.a
+
+all: $(TARGETS)
+
+clean:
+ rm -f $(ETNAVIV_OBJS)
+ rm -f $(TARGETS) *.o
+
+libetnaviv.a: $(ETNAVIV_OBJS)
+ $(AR) rcs $@ $^
+
+test: test.o ../driver/etna_asm.o ../driver/etna_shader.o libminigallium.a
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
diff --git a/src/etnaviv/README.md b/src/etnaviv/README.md
new file mode 100644
index 0000000..63787ba
--- /dev/null
+++ b/src/etnaviv/README.md
@@ -0,0 +1,18 @@
+libetnaviv
+==============
+
+Library for
+
+a) ioctl (kernel interface) wrapping
+b) video memory management
+c) command buffer and event queue handling
+d) context / state delta handling (still incomplete)
+e) register description headers
+f) converting surfaces and textures from and to Vivante specific tiling formats
+
+Currently used only by the 3D driver in driver/.
+A future 2D, SVG or OpenCL driver can share this code.
+
+This library completely wraps the kernel interface, so that clients don't
+depend on the specific headers.
+
diff --git a/src/etnaviv/cmdstream.xml.h b/src/etnaviv/cmdstream.xml.h
new file mode 100644
index 0000000..5d57b33
--- /dev/null
+++ b/src/etnaviv/cmdstream.xml.h
@@ -0,0 +1,218 @@
+#ifndef CMDSTREAM_XML
+#define CMDSTREAM_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- /home/orion/projects/etna_viv/rnndb/cmdstream.xml ( 12589 bytes, from 2013-09-01 10:53:22)
+- /home/orion/projects/etna_viv/rnndb/common.xml ( 16543 bytes, from 2013-09-01 10:53:22)
+
+Copyright (C) 2013
+*/
+
+
+#define FE_OPCODE_LOAD_STATE 0x00000001
+#define FE_OPCODE_END 0x00000002
+#define FE_OPCODE_NOP 0x00000003
+#define FE_OPCODE_DRAW_2D 0x00000004
+#define FE_OPCODE_DRAW_PRIMITIVES 0x00000005
+#define FE_OPCODE_DRAW_INDEXED_PRIMITIVES 0x00000006
+#define FE_OPCODE_WAIT 0x00000007
+#define FE_OPCODE_LINK 0x00000008
+#define FE_OPCODE_STALL 0x00000009
+#define FE_OPCODE_CALL 0x0000000a
+#define FE_OPCODE_RETURN 0x0000000b
+#define FE_OPCODE_CHIP_SELECT 0x0000000d
+#define PRIMITIVE_TYPE_POINTS 0x00000001
+#define PRIMITIVE_TYPE_LINES 0x00000002
+#define PRIMITIVE_TYPE_LINE_STRIP 0x00000003
+#define PRIMITIVE_TYPE_TRIANGLES 0x00000004
+#define PRIMITIVE_TYPE_TRIANGLE_STRIP 0x00000005
+#define PRIMITIVE_TYPE_TRIANGLE_FAN 0x00000006
+#define PRIMITIVE_TYPE_LINE_LOOP 0x00000007
+#define PRIMITIVE_TYPE_QUADS 0x00000008
+#define VIV_FE_LOAD_STATE 0x00000000
+
+#define VIV_FE_LOAD_STATE_HEADER 0x00000000
+#define VIV_FE_LOAD_STATE_HEADER_OP__MASK 0xf8000000
+#define VIV_FE_LOAD_STATE_HEADER_OP__SHIFT 27
+#define VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE 0x08000000
+#define VIV_FE_LOAD_STATE_HEADER_FIXP 0x04000000
+#define VIV_FE_LOAD_STATE_HEADER_COUNT__MASK 0x03ff0000
+#define VIV_FE_LOAD_STATE_HEADER_COUNT__SHIFT 16
+#define VIV_FE_LOAD_STATE_HEADER_COUNT(x) (((x) << VIV_FE_LOAD_STATE_HEADER_COUNT__SHIFT) & VIV_FE_LOAD_STATE_HEADER_COUNT__MASK)
+#define VIV_FE_LOAD_STATE_HEADER_OFFSET__MASK 0x0000ffff
+#define VIV_FE_LOAD_STATE_HEADER_OFFSET__SHIFT 0
+#define VIV_FE_LOAD_STATE_HEADER_OFFSET(x) (((x) << VIV_FE_LOAD_STATE_HEADER_OFFSET__SHIFT) & VIV_FE_LOAD_STATE_HEADER_OFFSET__MASK)
+#define VIV_FE_LOAD_STATE_HEADER_OFFSET__SHR 2
+
+#define VIV_FE_END 0x00000000
+
+#define VIV_FE_END_HEADER 0x00000000
+#define VIV_FE_END_HEADER_EVENT_ID__MASK 0x0000001f
+#define VIV_FE_END_HEADER_EVENT_ID__SHIFT 0
+#define VIV_FE_END_HEADER_EVENT_ID(x) (((x) << VIV_FE_END_HEADER_EVENT_ID__SHIFT) & VIV_FE_END_HEADER_EVENT_ID__MASK)
+#define VIV_FE_END_HEADER_EVENT_ENABLE 0x00000100
+#define VIV_FE_END_HEADER_OP__MASK 0xf8000000
+#define VIV_FE_END_HEADER_OP__SHIFT 27
+#define VIV_FE_END_HEADER_OP_END 0x10000000
+
+#define VIV_FE_NOP 0x00000000
+
+#define VIV_FE_NOP_HEADER 0x00000000
+#define VIV_FE_NOP_HEADER_OP__MASK 0xf8000000
+#define VIV_FE_NOP_HEADER_OP__SHIFT 27
+#define VIV_FE_NOP_HEADER_OP_NOP 0x18000000
+
+#define VIV_FE_DRAW_2D 0x00000000
+
+#define VIV_FE_DRAW_2D_HEADER 0x00000000
+#define VIV_FE_DRAW_2D_HEADER_COUNT__MASK 0x0000ff00
+#define VIV_FE_DRAW_2D_HEADER_COUNT__SHIFT 8
+#define VIV_FE_DRAW_2D_HEADER_COUNT(x) (((x) << VIV_FE_DRAW_2D_HEADER_COUNT__SHIFT) & VIV_FE_DRAW_2D_HEADER_COUNT__MASK)
+#define VIV_FE_DRAW_2D_HEADER_DATA_COUNT__MASK 0x07ff0000
+#define VIV_FE_DRAW_2D_HEADER_DATA_COUNT__SHIFT 16
+#define VIV_FE_DRAW_2D_HEADER_DATA_COUNT(x) (((x) << VIV_FE_DRAW_2D_HEADER_DATA_COUNT__SHIFT) & VIV_FE_DRAW_2D_HEADER_DATA_COUNT__MASK)
+#define VIV_FE_DRAW_2D_HEADER_OP__MASK 0xf8000000
+#define VIV_FE_DRAW_2D_HEADER_OP__SHIFT 27
+#define VIV_FE_DRAW_2D_HEADER_OP_DRAW_2D 0x20000000
+
+#define VIV_FE_DRAW_2D_TOP_LEFT 0x00000008
+#define VIV_FE_DRAW_2D_TOP_LEFT_X__MASK 0x0000ffff
+#define VIV_FE_DRAW_2D_TOP_LEFT_X__SHIFT 0
+#define VIV_FE_DRAW_2D_TOP_LEFT_X(x) (((x) << VIV_FE_DRAW_2D_TOP_LEFT_X__SHIFT) & VIV_FE_DRAW_2D_TOP_LEFT_X__MASK)
+#define VIV_FE_DRAW_2D_TOP_LEFT_Y__MASK 0xffff0000
+#define VIV_FE_DRAW_2D_TOP_LEFT_Y__SHIFT 16
+#define VIV_FE_DRAW_2D_TOP_LEFT_Y(x) (((x) << VIV_FE_DRAW_2D_TOP_LEFT_Y__SHIFT) & VIV_FE_DRAW_2D_TOP_LEFT_Y__MASK)
+
+#define VIV_FE_DRAW_2D_BOTTOM_RIGHT 0x0000000c
+#define VIV_FE_DRAW_2D_BOTTOM_RIGHT_X__MASK 0x0000ffff
+#define VIV_FE_DRAW_2D_BOTTOM_RIGHT_X__SHIFT 0
+#define VIV_FE_DRAW_2D_BOTTOM_RIGHT_X(x) (((x) << VIV_FE_DRAW_2D_BOTTOM_RIGHT_X__SHIFT) & VIV_FE_DRAW_2D_BOTTOM_RIGHT_X__MASK)
+#define VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y__MASK 0xffff0000
+#define VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y__SHIFT 16
+#define VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y(x) (((x) << VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y__SHIFT) & VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y__MASK)
+
+#define VIV_FE_DRAW_PRIMITIVES 0x00000000
+
+#define VIV_FE_DRAW_PRIMITIVES_HEADER 0x00000000
+#define VIV_FE_DRAW_PRIMITIVES_HEADER_OP__MASK 0xf8000000
+#define VIV_FE_DRAW_PRIMITIVES_HEADER_OP__SHIFT 27
+#define VIV_FE_DRAW_PRIMITIVES_HEADER_OP_DRAW_PRIMITIVES 0x28000000
+
+#define VIV_FE_DRAW_PRIMITIVES_COMMAND 0x00000004
+#define VIV_FE_DRAW_PRIMITIVES_COMMAND_TYPE__MASK 0x000000ff
+#define VIV_FE_DRAW_PRIMITIVES_COMMAND_TYPE__SHIFT 0
+#define VIV_FE_DRAW_PRIMITIVES_COMMAND_TYPE(x) (((x) << VIV_FE_DRAW_PRIMITIVES_COMMAND_TYPE__SHIFT) & VIV_FE_DRAW_PRIMITIVES_COMMAND_TYPE__MASK)
+
+#define VIV_FE_DRAW_PRIMITIVES_START 0x00000008
+
+#define VIV_FE_DRAW_PRIMITIVES_COUNT 0x0000000c
+
+#define VIV_FE_DRAW_INDEXED_PRIMITIVES 0x00000000
+
+#define VIV_FE_DRAW_INDEXED_PRIMITIVES_HEADER 0x00000000
+#define VIV_FE_DRAW_INDEXED_PRIMITIVES_HEADER_OP__MASK 0xf8000000
+#define VIV_FE_DRAW_INDEXED_PRIMITIVES_HEADER_OP__SHIFT 27
+#define VIV_FE_DRAW_INDEXED_PRIMITIVES_HEADER_OP_DRAW_INDEXED_PRIMITIVES 0x30000000
+
+#define VIV_FE_DRAW_INDEXED_PRIMITIVES_COMMAND 0x00000004
+#define VIV_FE_DRAW_INDEXED_PRIMITIVES_COMMAND_TYPE__MASK 0x000000ff
+#define VIV_FE_DRAW_INDEXED_PRIMITIVES_COMMAND_TYPE__SHIFT 0
+#define VIV_FE_DRAW_INDEXED_PRIMITIVES_COMMAND_TYPE(x) (((x) << VIV_FE_DRAW_INDEXED_PRIMITIVES_COMMAND_TYPE__SHIFT) & VIV_FE_DRAW_INDEXED_PRIMITIVES_COMMAND_TYPE__MASK)
+
+#define VIV_FE_DRAW_INDEXED_PRIMITIVES_START 0x00000008
+
+#define VIV_FE_DRAW_INDEXED_PRIMITIVES_COUNT 0x0000000c
+
+#define VIV_FE_DRAW_INDEXED_PRIMITIVES_OFFSET 0x00000010
+
+#define VIV_FE_WAIT 0x00000000
+
+#define VIV_FE_WAIT_HEADER 0x00000000
+#define VIV_FE_WAIT_HEADER_DELAY__MASK 0x0000ffff
+#define VIV_FE_WAIT_HEADER_DELAY__SHIFT 0
+#define VIV_FE_WAIT_HEADER_DELAY(x) (((x) << VIV_FE_WAIT_HEADER_DELAY__SHIFT) & VIV_FE_WAIT_HEADER_DELAY__MASK)
+#define VIV_FE_WAIT_HEADER_OP__MASK 0xf8000000
+#define VIV_FE_WAIT_HEADER_OP__SHIFT 27
+#define VIV_FE_WAIT_HEADER_OP_WAIT 0x38000000
+
+#define VIV_FE_LINK 0x00000000
+
+#define VIV_FE_LINK_HEADER 0x00000000
+#define VIV_FE_LINK_HEADER_PREFETCH__MASK 0x0000ffff
+#define VIV_FE_LINK_HEADER_PREFETCH__SHIFT 0
+#define VIV_FE_LINK_HEADER_PREFETCH(x) (((x) << VIV_FE_LINK_HEADER_PREFETCH__SHIFT) & VIV_FE_LINK_HEADER_PREFETCH__MASK)
+#define VIV_FE_LINK_HEADER_OP__MASK 0xf8000000
+#define VIV_FE_LINK_HEADER_OP__SHIFT 27
+#define VIV_FE_LINK_HEADER_OP_LINK 0x40000000
+
+#define VIV_FE_LINK_ADDRESS 0x00000004
+
+#define VIV_FE_STALL 0x00000000
+
+#define VIV_FE_STALL_HEADER 0x00000000
+#define VIV_FE_STALL_HEADER_OP__MASK 0xf8000000
+#define VIV_FE_STALL_HEADER_OP__SHIFT 27
+#define VIV_FE_STALL_HEADER_OP_STALL 0x48000000
+
+#define VIV_FE_STALL_TOKEN 0x00000004
+#define VIV_FE_STALL_TOKEN_FROM__MASK 0x0000001f
+#define VIV_FE_STALL_TOKEN_FROM__SHIFT 0
+#define VIV_FE_STALL_TOKEN_FROM(x) (((x) << VIV_FE_STALL_TOKEN_FROM__SHIFT) & VIV_FE_STALL_TOKEN_FROM__MASK)
+#define VIV_FE_STALL_TOKEN_TO__MASK 0x00001f00
+#define VIV_FE_STALL_TOKEN_TO__SHIFT 8
+#define VIV_FE_STALL_TOKEN_TO(x) (((x) << VIV_FE_STALL_TOKEN_TO__SHIFT) & VIV_FE_STALL_TOKEN_TO__MASK)
+
+#define VIV_FE_CALL 0x00000000
+
+#define VIV_FE_CALL_HEADER 0x00000000
+#define VIV_FE_CALL_HEADER_PREFETCH__MASK 0x0000ffff
+#define VIV_FE_CALL_HEADER_PREFETCH__SHIFT 0
+#define VIV_FE_CALL_HEADER_PREFETCH(x) (((x) << VIV_FE_CALL_HEADER_PREFETCH__SHIFT) & VIV_FE_CALL_HEADER_PREFETCH__MASK)
+#define VIV_FE_CALL_HEADER_OP__MASK 0xf8000000
+#define VIV_FE_CALL_HEADER_OP__SHIFT 27
+#define VIV_FE_CALL_HEADER_OP_CALL 0x50000000
+
+#define VIV_FE_CALL_ADDRESS 0x00000004
+
+#define VIV_FE_CALL_RETURN_PREFETCH 0x00000008
+
+#define VIV_FE_CALL_RETURN_ADDRESS 0x0000000c
+
+#define VIV_FE_RETURN 0x00000000
+
+#define VIV_FE_RETURN_HEADER 0x00000000
+#define VIV_FE_RETURN_HEADER_OP__MASK 0xf8000000
+#define VIV_FE_RETURN_HEADER_OP__SHIFT 27
+#define VIV_FE_RETURN_HEADER_OP_RETURN 0x58000000
+
+#define VIV_FE_CHIP_SELECT 0x00000000
+
+#define VIV_FE_CHIP_SELECT_HEADER 0x00000000
+#define VIV_FE_CHIP_SELECT_HEADER_OP__MASK 0xf8000000
+#define VIV_FE_CHIP_SELECT_HEADER_OP__SHIFT 27
+#define VIV_FE_CHIP_SELECT_HEADER_OP_CHIP_SELECT 0x68000000
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP15 0x00008000
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP14 0x00004000
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP13 0x00002000
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP12 0x00001000
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP11 0x00000800
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP10 0x00000400
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP9 0x00000200
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP8 0x00000100
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP7 0x00000080
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP6 0x00000040
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP5 0x00000020
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP4 0x00000010
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP3 0x00000008
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP2 0x00000004
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP1 0x00000002
+#define VIV_FE_CHIP_SELECT_HEADER_ENABLE_CHIP0 0x00000001
+
+
+#endif /* CMDSTREAM_XML */
diff --git a/src/etnaviv/common.xml.h b/src/etnaviv/common.xml.h
new file mode 100644
index 0000000..072885e
--- /dev/null
+++ b/src/etnaviv/common.xml.h
@@ -0,0 +1,221 @@
+#ifndef COMMON_XML
+#define COMMON_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- /home/orion/projects/etna_viv/rnndb/state.xml ( 18526 bytes, from 2013-09-11 16:52:32)
+- /home/orion/projects/etna_viv/rnndb/common.xml ( 16543 bytes, from 2013-09-01 10:53:22)
+- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21834 bytes, from 2013-09-11 15:58:37)
+- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51058 bytes, from 2013-09-01 10:53:22)
+- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54270 bytes, from 2013-09-17 15:37:52)
+- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-09-01 10:53:22)
+
+Copyright (C) 2013
+*/
+
+
+#define PIPE_ID_PIPE_3D 0x00000000
+#define PIPE_ID_PIPE_2D 0x00000001
+#define SYNC_RECIPIENT_FE 0x00000001
+#define SYNC_RECIPIENT_RA 0x00000005
+#define SYNC_RECIPIENT_PE 0x00000007
+#define SYNC_RECIPIENT_DE 0x0000000b
+#define SYNC_RECIPIENT_VG 0x0000000f
+#define SYNC_RECIPIENT_TESSELATOR 0x00000010
+#define SYNC_RECIPIENT_VG2 0x00000011
+#define SYNC_RECIPIENT_TESSELATOR2 0x00000012
+#define SYNC_RECIPIENT_VG3 0x00000013
+#define SYNC_RECIPIENT_TESSELATOR3 0x00000014
+#define ENDIAN_MODE_NO_SWAP 0x00000000
+#define ENDIAN_MODE_SWAP_16 0x00000001
+#define ENDIAN_MODE_SWAP_32 0x00000002
+#define chipModel_GC300 0x00000300
+#define chipModel_GC320 0x00000320
+#define chipModel_GC350 0x00000350
+#define chipModel_GC355 0x00000355
+#define chipModel_GC400 0x00000400
+#define chipModel_GC410 0x00000410
+#define chipModel_GC420 0x00000420
+#define chipModel_GC450 0x00000450
+#define chipModel_GC500 0x00000500
+#define chipModel_GC530 0x00000530
+#define chipModel_GC600 0x00000600
+#define chipModel_GC700 0x00000700
+#define chipModel_GC800 0x00000800
+#define chipModel_GC860 0x00000860
+#define chipModel_GC880 0x00000880
+#define chipModel_GC1000 0x00001000
+#define chipModel_GC2000 0x00002000
+#define chipModel_GC2100 0x00002100
+#define chipModel_GC4000 0x00004000
+#define RGBA_BITS_R 0x00000001
+#define RGBA_BITS_G 0x00000002
+#define RGBA_BITS_B 0x00000004
+#define RGBA_BITS_A 0x00000008
+#define chipFeatures_FAST_CLEAR 0x00000001
+#define chipFeatures_SPECIAL_ANTI_ALIASING 0x00000002
+#define chipFeatures_PIPE_3D 0x00000004
+#define chipFeatures_DXT_TEXTURE_COMPRESSION 0x00000008
+#define chipFeatures_DEBUG_MODE 0x00000010
+#define chipFeatures_Z_COMPRESSION 0x00000020
+#define chipFeatures_YUV420_SCALER 0x00000040
+#define chipFeatures_MSAA 0x00000080
+#define chipFeatures_DC 0x00000100
+#define chipFeatures_PIPE_2D 0x00000200
+#define chipFeatures_ETC1_TEXTURE_COMPRESSION 0x00000400
+#define chipFeatures_FAST_SCALER 0x00000800
+#define chipFeatures_HIGH_DYNAMIC_RANGE 0x00001000
+#define chipFeatures_YUV420_TILER 0x00002000
+#define chipFeatures_MODULE_CG 0x00004000
+#define chipFeatures_MIN_AREA 0x00008000
+#define chipFeatures_NO_EARLY_Z 0x00010000
+#define chipFeatures_NO_422_TEXTURE 0x00020000
+#define chipFeatures_BUFFER_INTERLEAVING 0x00040000
+#define chipFeatures_BYTE_WRITE_2D 0x00080000
+#define chipFeatures_NO_SCALER 0x00100000
+#define chipFeatures_YUY2_AVERAGING 0x00200000
+#define chipFeatures_HALF_PE_CACHE 0x00400000
+#define chipFeatures_HALF_TX_CACHE 0x00800000
+#define chipFeatures_YUY2_RENDER_TARGET 0x01000000
+#define chipFeatures_MEM32 0x02000000
+#define chipFeatures_PIPE_VG 0x04000000
+#define chipFeatures_VGTS 0x08000000
+#define chipFeatures_FE20 0x10000000
+#define chipFeatures_BYTE_WRITE_3D 0x20000000
+#define chipFeatures_RS_YUV_TARGET 0x40000000
+#define chipFeatures_32_BIT_INDICES 0x80000000
+#define chipMinorFeatures0_FLIP_Y 0x00000001
+#define chipMinorFeatures0_DUAL_RETURN_BUS 0x00000002
+#define chipMinorFeatures0_ENDIANNESS_CONFIG 0x00000004
+#define chipMinorFeatures0_TEXTURE_8K 0x00000008
+#define chipMinorFeatures0_CORRECT_TEXTURE_CONVERTER 0x00000010
+#define chipMinorFeatures0_SPECIAL_MSAA_LOD 0x00000020
+#define chipMinorFeatures0_FAST_CLEAR_FLUSH 0x00000040
+#define chipMinorFeatures0_2DPE20 0x00000080
+#define chipMinorFeatures0_CORRECT_AUTO_DISABLE 0x00000100
+#define chipMinorFeatures0_RENDERTARGET_8K 0x00000200
+#define chipMinorFeatures0_2BITPERTILE 0x00000400
+#define chipMinorFeatures0_SEPARATE_TILE_STATUS_WHEN_INTERLEAVED 0x00000800
+#define chipMinorFeatures0_SUPER_TILED 0x00001000
+#define chipMinorFeatures0_VG_20 0x00002000
+#define chipMinorFeatures0_TS_EXTENDED_COMMANDS 0x00004000
+#define chipMinorFeatures0_COMPRESSION_FIFO_FIXED 0x00008000
+#define chipMinorFeatures0_HAS_SIGN_FLOOR_CEIL 0x00010000
+#define chipMinorFeatures0_VG_FILTER 0x00020000
+#define chipMinorFeatures0_VG_21 0x00040000
+#define chipMinorFeatures0_SHADER_HAS_W 0x00080000
+#define chipMinorFeatures0_HAS_SQRT_TRIG 0x00100000
+#define chipMinorFeatures0_MORE_MINOR_FEATURES 0x00200000
+#define chipMinorFeatures0_MC20 0x00400000
+#define chipMinorFeatures0_MSAA_SIDEBAND 0x00800000
+#define chipMinorFeatures0_BUG_FIXES0 0x01000000
+#define chipMinorFeatures0_VAA 0x02000000
+#define chipMinorFeatures0_BYPASS_IN_MSAA 0x04000000
+#define chipMinorFeatures0_HZ 0x08000000
+#define chipMinorFeatures0_NEW_TEXTURE 0x10000000
+#define chipMinorFeatures0_2D_A8_TARGET 0x20000000
+#define chipMinorFeatures0_CORRECT_STENCIL 0x40000000
+#define chipMinorFeatures0_ENHANCE_VR 0x80000000
+#define chipMinorFeatures1_RSUV_SWIZZLE 0x00000001
+#define chipMinorFeatures1_V2_COMPRESSION 0x00000002
+#define chipMinorFeatures1_VG_DOUBLE_BUFFER 0x00000004
+#define chipMinorFeatures1_EXTRA_EVENT_STATES 0x00000008
+#define chipMinorFeatures1_NO_STRIPING_NEEDED 0x00000010
+#define chipMinorFeatures1_TEXTURE_STRIDE 0x00000020
+#define chipMinorFeatures1_BUG_FIXES3 0x00000040
+#define chipMinorFeatures1_AUTO_DISABLE 0x00000080
+#define chipMinorFeatures1_AUTO_RESTART_TS 0x00000100
+#define chipMinorFeatures1_DISABLE_PE_GATING 0x00000200
+#define chipMinorFeatures1_L2_WINDOWING 0x00000400
+#define chipMinorFeatures1_HALF_FLOAT 0x00000800
+#define chipMinorFeatures1_PIXEL_DITHER 0x00001000
+#define chipMinorFeatures1_TWO_STENCIL_REFERENCE 0x00002000
+#define chipMinorFeatures1_EXTENDED_PIXEL_FORMAT 0x00004000
+#define chipMinorFeatures1_CORRECT_MIN_MAX_DEPTH 0x00008000
+#define chipMinorFeatures1_2D_DITHER 0x00010000
+#define chipMinorFeatures1_BUG_FIXES5 0x00020000
+#define chipMinorFeatures1_NEW_2D 0x00040000
+#define chipMinorFeatures1_NEW_FP 0x00080000
+#define chipMinorFeatures1_TEXTURE_HALIGN 0x00100000
+#define chipMinorFeatures1_NON_POWER_OF_TWO 0x00200000
+#define chipMinorFeatures1_LINEAR_TEXTURE_SUPPORT 0x00400000
+#define chipMinorFeatures1_HALTI0 0x00800000
+#define chipMinorFeatures1_CORRECT_OVERFLOW_VG 0x01000000
+#define chipMinorFeatures1_NEGATIVE_LOG_FIX 0x02000000
+#define chipMinorFeatures1_RESOLVE_OFFSET 0x04000000
+#define chipMinorFeatures1_OK_TO_GATE_AXI_CLOCK 0x08000000
+#define chipMinorFeatures1_MMU_VERSION 0x10000000
+#define chipMinorFeatures1_WIDE_LINE 0x20000000
+#define chipMinorFeatures1_BUG_FIXES6 0x40000000
+#define chipMinorFeatures1_FC_FLUSH_STALL 0x80000000
+#define chipMinorFeatures2_LINE_LOOP 0x00000001
+#define chipMinorFeatures2_LOGIC_OP 0x00000002
+#define chipMinorFeatures2_UNK2 0x00000004
+#define chipMinorFeatures2_SUPERTILED_TEXTURE 0x00000008
+#define chipMinorFeatures2_UNK4 0x00000010
+#define chipMinorFeatures2_RECT_PRIMITIVE 0x00000020
+#define chipMinorFeatures2_COMPOSITION 0x00000040
+#define chipMinorFeatures2_CORRECT_AUTO_DISABLE_COUNT 0x00000080
+#define chipMinorFeatures2_UNK8 0x00000100
+#define chipMinorFeatures2_UNK9 0x00000200
+#define chipMinorFeatures2_UNK10 0x00000400
+#define chipMinorFeatures2_SAMPLERBASE_16 0x00000800
+#define chipMinorFeatures2_UNK12 0x00001000
+#define chipMinorFeatures2_UNK13 0x00002000
+#define chipMinorFeatures2_UNK14 0x00004000
+#define chipMinorFeatures2_EXTRA_TEXTURE_STATE 0x00008000
+#define chipMinorFeatures2_FULL_DIRECTFB 0x00010000
+#define chipMinorFeatures2_2D_TILING 0x00020000
+#define chipMinorFeatures2_THREAD_WALKER_IN_PS 0x00040000
+#define chipMinorFeatures2_TILE_FILLER 0x00080000
+#define chipMinorFeatures2_UNK20 0x00100000
+#define chipMinorFeatures2_2D_MULTI_SOURCE_BLIT 0x00200000
+#define chipMinorFeatures2_UNK22 0x00400000
+#define chipMinorFeatures2_UNK23 0x00800000
+#define chipMinorFeatures2_UNK24 0x01000000
+#define chipMinorFeatures2_MIXED_STREAMS 0x02000000
+#define chipMinorFeatures2_2D_420_L2CACHE 0x04000000
+#define chipMinorFeatures2_UNK27 0x08000000
+#define chipMinorFeatures2_2D_NO_INDEX8_BRUSH 0x10000000
+#define chipMinorFeatures2_TEXTURE_TILED_READ 0x20000000
+#define chipMinorFeatures2_UNK30 0x40000000
+#define chipMinorFeatures2_UNK31 0x80000000
+#define chipMinorFeatures3_ROTATION_STALL_FIX 0x00000001
+#define chipMinorFeatures3_UNK1 0x00000002
+#define chipMinorFeatures3_2D_MULTI_SOURCE_BLT_EX 0x00000004
+#define chipMinorFeatures3_UNK3 0x00000008
+#define chipMinorFeatures3_UNK4 0x00000010
+#define chipMinorFeatures3_UNK5 0x00000020
+#define chipMinorFeatures3_UNK6 0x00000040
+#define chipMinorFeatures3_UNK7 0x00000080
+#define chipMinorFeatures3_UNK8 0x00000100
+#define chipMinorFeatures3_UNK9 0x00000200
+#define chipMinorFeatures3_BUG_FIXES10 0x00000400
+#define chipMinorFeatures3_UNK11 0x00000800
+#define chipMinorFeatures3_BUG_FIXES11 0x00001000
+#define chipMinorFeatures3_UNK13 0x00002000
+#define chipMinorFeatures3_UNK14 0x00004000
+#define chipMinorFeatures3_UNK15 0x00008000
+#define chipMinorFeatures3_UNK16 0x00010000
+#define chipMinorFeatures3_UNK17 0x00020000
+#define chipMinorFeatures3_UNK18 0x00040000
+#define chipMinorFeatures3_UNK19 0x00080000
+#define chipMinorFeatures3_UNK20 0x00100000
+#define chipMinorFeatures3_UNK21 0x00200000
+#define chipMinorFeatures3_UNK22 0x00400000
+#define chipMinorFeatures3_UNK23 0x00800000
+#define chipMinorFeatures3_UNK24 0x01000000
+#define chipMinorFeatures3_UNK25 0x02000000
+#define chipMinorFeatures3_UNK26 0x04000000
+#define chipMinorFeatures3_UNK27 0x08000000
+#define chipMinorFeatures3_UNK28 0x10000000
+#define chipMinorFeatures3_UNK29 0x20000000
+#define chipMinorFeatures3_UNK30 0x40000000
+#define chipMinorFeatures3_UNK31 0x80000000
+
+#endif /* COMMON_XML */
diff --git a/src/etnaviv/etna.c b/src/etnaviv/etna.c
new file mode 100644
index 0000000..93af9cb
--- /dev/null
+++ b/src/etnaviv/etna.c
@@ -0,0 +1,688 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#include <etnaviv/etna.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna_queue.h>
+#include <etnaviv/state.xml.h>
+
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "gc_abi.h"
+
+#include "viv_internal.h"
+
+//#define DEBUG
+//#define DEBUG_CMDBUF
+
+/* Maximum number of flushes without queuing a signal (per command buffer).
+ If this amount is reached, we roll to the next command buffer,
+ which automatically queues a signal.
+ XXX works around driver bug on (at least) cubox, for which drivers
+ is this not needed? Not urgent as this does not result in a
+ deducible performance impact.
+*/
+#define ETNA_MAX_UNSIGNALED_FLUSHES (40)
+
+/* Initialize kernel GPU context (v2 only)
+ * XXX move all this context handling stuff to a separate implementation file.
+ */
+#ifdef GCABI_HAS_CONTEXT
+
+static int gpu_context_clear(struct etna_ctx *ctx);
+
+#define GCCTX(x) ((gcoCONTEXT)(size_t)((x)->ctx))
+
+/* Allocate new command buffer for context */
+static int gpu_context_allocate_buffer(struct etna_ctx *ctx, struct etna_context_info *ctx_info)
+{
+ if(viv_alloc_contiguous(ctx->conn, COMMAND_BUFFER_SIZE,
+ &ctx_info->physical,
+ &ctx_info->logical,
+ &ctx_info->bytes)!=0)
+ {
+#ifdef DEBUG
+ fprintf(stderr, "Error allocating contiguous host memory for context\n");
+#endif
+ return ETNA_OUT_OF_MEMORY;
+ }
+#ifdef DEBUG
+ printf("Allocated buffer (size 0x%x) for context: phys=%08x log=%08x\n", (int)ctx_info->bytes, (int)ctx_info->physical, (int)ctx_info->logical);
+#endif
+ return ETNA_OK;
+}
+
+/* Free command buffer for context, either immediately or queued for when the
+ * GPU is finished with it. */
+static int gpu_context_free_buffer(struct etna_ctx *ctx, struct etna_context_info *ctx_info, bool queued)
+{
+ int rv;
+ if(queued)
+ {
+ rv = etna_queue_free_contiguous(ctx->queue,
+ ctx_info->bytes,
+ ctx_info->physical,
+ ctx_info->logical);
+ } else {
+ rv = viv_free_contiguous(ctx->conn,
+ ctx_info->bytes,
+ ctx_info->physical,
+ ctx_info->logical);
+ }
+ if(rv != ETNA_OK)
+ {
+#ifdef DEBUG
+ fprintf(stderr, "Error releasing contiguous host memory for context (%i)\n", rv);
+#endif
+ return rv;
+ }
+ ctx_info->bytes = ctx_info->physical = 0;
+ ctx_info->logical = NULL;
+ return ETNA_OK;
+}
+
+static int gpu_context_initialize(struct etna_ctx *ctx)
+{
+ int rv;
+ gcoCONTEXT vctx = ETNA_CALLOC_STRUCT(_gcoCONTEXT);
+ if(vctx == NULL)
+ {
+ return ETNA_OUT_OF_MEMORY;
+ }
+ vctx->object.type = gcvOBJ_CONTEXT;
+ vctx->id = 0x0; /* Actual ID will be returned here by kernel */
+
+ vctx->pipe3DIndex = vctx->pipe2DIndex = /* Any non-zero value will do, as kernel does not use */
+ vctx->linkIndex = vctx->inUseIndex = 1; /* the actual values, just checks for zero */
+ vctx->initialPipe = ETNA_PIPE_3D; /* Pipe to be active at beginning of context buffer */
+ vctx->entryPipe = ETNA_PIPE_3D; /* Pipe at beginning of command buffer (needs to be added to context as well if */
+ /* pipe at end of context is different from entry pipe) */
+ vctx->currentPipe = ETNA_PIPE_3D; /* Pipe at end of command buffer */
+
+ /* CPU address of buffer */
+ vctx->logical = 0;
+ /* Number of bytes to read from command buffer by GPU */
+ vctx->bufferSize = 0;
+ /* Logical address of two NOP words at end of command buffer */
+ vctx->link = NULL;
+ /* Logical address of inUse flag as returned from kernel (within
+ * consecutive array), must have one word of NOP */
+ vctx->inUse = NULL;
+
+ ctx->ctx = VIV_TO_HANDLE(vctx);
+ /* Allocate initial context buffer */
+ if((rv = gpu_context_allocate_buffer(ctx, &ctx->ctx_info)) != ETNA_OK)
+ {
+ ETNA_FREE(vctx);
+ return rv;
+ }
+ /* Set context to initial sane values */
+ gpu_context_clear(ctx);
+ return ETNA_OK;
+}
+
+/* Clear GPU context, to rebuild it for next flush */
+static int gpu_context_clear(struct etna_ctx *ctx)
+{
+ /* If context was used, queue free it and allocate new buffer to prevent
+ * overwriting it while being used by the GPU. Otherwise we can just
+ * re-use it.
+ */
+ int rv;
+#ifdef DEBUG
+ printf("gpu_context_clear (context %i)\n", (int)GCCTX(ctx)->id);
+#endif
+ if(GCCTX(ctx)->inUse != NULL &&
+ *GCCTX(ctx)->inUse)
+ {
+#ifdef DEBUG
+ printf("gpu_context_clear: context was in use, deferred freeing and reallocating it\n");
+#endif
+ if((rv = gpu_context_free_buffer(ctx, &ctx->ctx_info, true)) != ETNA_OK)
+ {
+ return rv;
+ }
+ if((rv = gpu_context_allocate_buffer(ctx, &ctx->ctx_info)) != ETNA_OK)
+ {
+ return rv;
+ }
+ }
+ /* Leave space at beginning of buffer for PIPE switch */
+ GCCTX(ctx)->bufferSize = BEGIN_COMMIT_CLEARANCE;
+ GCCTX(ctx)->logical = ctx->ctx_info.logical;
+#ifdef GCABI_CONTEXT_HAS_PHYSICAL
+ GCCTX(ctx)->bytes = ctx->ctx_info.bytes; /* actual size of buffer */
+ GCCTX(ctx)->physical = HANDLE_TO_VIV(ctx->ctx_info.physical);
+#endif
+ /* When context is empty, initial pipe should default to entry pipe so that
+ * no pipe switch is needed within the context and the kernel does the
+ * right thing.
+ */
+ GCCTX(ctx)->initialPipe = GCCTX(ctx)->entryPipe;
+ return ETNA_OK;
+}
+
+/** Start building context buffer.
+ * Subsequent etna_reserve and other state setting commands will go to
+ * the context buffer instead of the command buffer.
+ * initial_pipe is the pipe as it has to be at the beginning of the context
+ * buffer.
+ *
+ * @return ETNA_OK if succesful (can start building context)
+ * or an error code otherwise.
+ */
+static int gpu_context_build_start(struct etna_ctx *ctx)
+{
+ if(ctx->cur_buf == ETNA_CTX_BUFFER)
+ return ETNA_INTERNAL_ERROR;
+ /* Save current buffer id and position */
+ ctx->cmdbuf[ctx->cur_buf]->offset = ctx->offset * 4;
+ ctx->stored_buf = ctx->cur_buf;
+
+ /* Switch to context buffer */
+ ctx->cur_buf = ETNA_CTX_BUFFER;
+ ctx->buf = GCCTX(ctx)->logical;
+ ctx->offset = GCCTX(ctx)->bufferSize / 4;
+
+ return ETNA_OK;
+}
+
+/** Finish building context buffer.
+ * final_pipe is the current pipe at the end of the context buffer.
+ */
+static int gpu_context_build_end(struct etna_ctx *ctx, enum etna_pipe final_pipe)
+{
+ if(ctx->cur_buf != ETNA_CTX_BUFFER)
+ return ETNA_INTERNAL_ERROR;
+ /* If closing pipe of context is different from entry pipe, add a switch
+ * command, as we want the context to end in the entry pipe. The kernel
+ * will handle switching to the entry pipe only when this is a new context.
+ */
+ if(final_pipe != GCCTX(ctx)->entryPipe)
+ {
+ etna_set_pipe(ctx, GCCTX(ctx)->entryPipe);
+ }
+ /* Set current size -- finishing up context before flush
+ * will add space for a LINK command and inUse flag.
+ */
+ GCCTX(ctx)->bufferSize = ctx->offset * 4;
+
+ /* Switch back to stored buffer */
+ ctx->cur_buf = ctx->stored_buf;
+ ctx->buf = VIV_TO_PTR(ctx->cmdbuf[ctx->cur_buf]->logical);
+ ctx->offset = ctx->cmdbuf[ctx->cur_buf]->offset / 4;
+ return ETNA_OK;
+}
+
+/** Finish up GPU context, make it ready for submission to kernel.
+ Append space for LINK and inUse flag.
+ */
+static int gpu_context_finish_up(struct etna_ctx *ctx)
+{
+ uint32_t *logical = GCCTX(ctx)->logical;
+ uint32_t ptr = GCCTX(ctx)->bufferSize/4;
+ /* Append LINK (8 bytes) */
+ GCCTX(ctx)->link = &logical[ptr];
+ logical[ptr++] = VIV_FE_NOP_HEADER_OP_NOP;
+ logical[ptr++] = VIV_FE_NOP_HEADER_OP_NOP;
+ /* Append inUse (4 bytes) */
+ GCCTX(ctx)->inUse = (int*)&logical[ptr];
+ logical[ptr++] = 0;
+ /* Update buffer size to final value */
+ GCCTX(ctx)->bufferSize = ptr*4;
+#ifdef DEBUG
+ printf("gpu_context_finish_up: bufferSize %i link %p inUse %p\n",
+ (int)GCCTX(ctx)->bufferSize, GCCTX(ctx)->link, GCCTX(ctx)->inUse);
+#endif
+ return ETNA_OK;
+}
+
+#else
+
+#define GCCTX(x) ((gckCONTEXT)((x)->ctx))
+
+static int gpu_context_initialize(struct etna_ctx *ctx)
+{
+ /* attach to GPU */
+ int err;
+ gcsHAL_INTERFACE id = {};
+ id.command = gcvHAL_ATTACH;
+ if((err=viv_invoke(ctx->conn, &id)) != gcvSTATUS_OK)
+ {
+#ifdef DEBUG
+ fprintf(stderr, "Error attaching to GPU\n");
+#endif
+ return ETNA_INTERNAL_ERROR;
+ }
+
+#ifdef DEBUG
+ printf("Context 0x%08x\n", (int)id.u.Attach.context);
+#endif
+
+ ctx->ctx = VIV_TO_HANDLE(id.u.Attach.context);
+ return ETNA_OK;
+}
+#endif
+
+int etna_create(struct viv_conn *conn, struct etna_ctx **ctx_out)
+{
+ int rv;
+ if(ctx_out == NULL) return ETNA_INVALID_ADDR;
+ struct etna_ctx *ctx = ETNA_CALLOC_STRUCT(etna_ctx);
+ if(ctx == NULL) return ETNA_OUT_OF_MEMORY;
+ ctx->conn = conn;
+
+ if(gpu_context_initialize(ctx) != ETNA_OK)
+ {
+ ETNA_FREE(ctx);
+ return ETNA_INTERNAL_ERROR;
+ }
+
+ /* Create synchronization signal */
+ if(viv_user_signal_create(conn, 0, &ctx->sig_id) != 0) /* automatic resetting signal */
+ {
+#ifdef DEBUG
+ fprintf(stderr, "Cannot create user signal\n");
+#endif
+ return ETNA_INTERNAL_ERROR;
+ }
+#ifdef DEBUG
+ printf("Created user signal %i\n", ctx->sig_id);
+#endif
+
+ /* Allocate command buffers, and create a synchronization signal for each.
+ * Also signal the synchronization signal for the buffers to tell that the buffers are ready for use.
+ */
+ for(int x=0; x<NUM_COMMAND_BUFFERS; ++x)
+ {
+ ctx->cmdbuf[x] = ETNA_CALLOC_STRUCT(_gcoCMDBUF);
+ if(viv_alloc_contiguous(conn, COMMAND_BUFFER_SIZE, &ctx->cmdbufi[x].physical, &ctx->cmdbufi[x].logical, &ctx->cmdbufi[x].bytes)!=0)
+ {
+#ifdef DEBUG
+ fprintf(stderr, "Error allocating host memory for command buffer\n");
+#endif
+ return ETNA_OUT_OF_MEMORY;
+ }
+ ctx->cmdbuf[x]->object.type = gcvOBJ_COMMANDBUFFER;
+#ifdef GCABI_CMDBUF_HAS_PHYSICAL
+ ctx->cmdbuf[x]->physical = PTR_TO_VIV((void*)ctx->cmdbufi[x].physical);
+ ctx->cmdbuf[x]->bytes = ctx->cmdbufi[x].bytes;
+#endif
+ ctx->cmdbuf[x]->logical = PTR_TO_VIV((void*)ctx->cmdbufi[x].logical);
+
+ if(viv_user_signal_create(conn, 0, &ctx->cmdbufi[x].sig_id) != 0 ||
+ viv_user_signal_signal(conn, ctx->cmdbufi[x].sig_id, 1) != 0)
+ {
+#ifdef DEBUG
+ fprintf(stderr, "Cannot create user signal\n");
+#endif
+ return ETNA_INTERNAL_ERROR;
+ }
+#ifdef DEBUG
+ printf("Allocated buffer %i: phys=%08x log=%08x bytes=%08x [signal %i]\n", x,
+ (uint32_t)buf0_physical, (uint32_t)buf0_logical, buf0_bytes, ctx->cmdbufi[x].sig);
+#endif
+ }
+
+ /* Allocate command queue */
+ if((rv = etna_queue_create(ctx, &ctx->queue)) != ETNA_OK)
+ {
+#ifdef DEBUG
+ fprintf(stderr, "Error allocating kernel command queue\n");
+#endif
+ return rv;
+ }
+
+ /* Set current buffer to ETNA_NO_BUFFER, to signify that we need to switch to buffer 0 before
+ * queueing of commands can be started.
+ */
+ ctx->cur_buf = ETNA_NO_BUFFER;
+
+ *ctx_out = ctx;
+ return ETNA_OK;
+}
+
+/* Clear a command buffer */
+static void clear_buffer(gcoCMDBUF cmdbuf)
+{
+ /* Prepare command buffer for use */
+ cmdbuf->startOffset = 0x0;
+ cmdbuf->offset = BEGIN_COMMIT_CLEARANCE;
+}
+
+/* Switch to next buffer, optionally wait for it to be available */
+static int switch_next_buffer(struct etna_ctx *ctx)
+{
+ int next_buf_id = (ctx->cur_buf + 1) % NUM_COMMAND_BUFFERS;
+#if 0
+ printf("Switching to new buffer %i\n", next_buf_id);
+#endif
+ if(viv_user_signal_wait(ctx->conn, ctx->cmdbufi[next_buf_id].sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+#ifdef DEBUG
+ printf("Error waiting for command buffer sync signal\n");
+#endif
+ return ETNA_INTERNAL_ERROR;
+ }
+ clear_buffer(ctx->cmdbuf[next_buf_id]);
+ ctx->cur_buf = next_buf_id;
+ ctx->buf = VIV_TO_PTR(ctx->cmdbuf[next_buf_id]->logical);
+ ctx->offset = ctx->cmdbuf[next_buf_id]->offset / 4;
+#ifdef DEBUG
+ printf("Switched to command buffer %i\n", ctx->cur_buf);
+#endif
+ return ETNA_OK;
+}
+
+int etna_free(struct etna_ctx *ctx)
+{
+ if(ctx == NULL)
+ return ETNA_INVALID_ADDR;
+ /* Free kernel command queue */
+ etna_queue_free(ctx->queue);
+#ifdef GCABI_HAVE_CONTEXT
+ /* Free context buffer */
+ gpu_context_free_buffer(ctx, &ctx->ctx_info, false);
+#endif
+ /* Free command buffers */
+ for(int x=0; x<NUM_COMMAND_BUFFERS; ++x)
+ {
+ viv_free_contiguous(ctx->conn, ctx->cmdbufi[x].bytes, (viv_addr_t)ctx->cmdbufi[x].physical, VIV_TO_PTR(ctx->cmdbufi[x].logical));
+ ETNA_FREE(ctx->cmdbuf[x]);
+ }
+ ETNA_FREE(ctx);
+ return ETNA_OK;
+}
+
+/* internal (non-inline) part of etna_reserve
+ * - commit current command buffer (if there is a current command buffer)
+ * - signify when current command buffer becomes available using a signal
+ * - switch to next command buffer
+ */
+int _etna_reserve_internal(struct etna_ctx *ctx, size_t n)
+{
+ int status;
+#ifdef DEBUG
+ printf("Buffer full\n");
+#endif
+ if((ctx->offset*4 + END_COMMIT_CLEARANCE) > COMMAND_BUFFER_SIZE)
+ {
+ printf("%s: Command buffer overflow! This is likely a programming error in the GPU driver.\n", __func__);
+ abort();
+ }
+#ifdef GCABI_HAS_CONTEXT
+ if(ctx->cur_buf == ETNA_CTX_BUFFER)
+ {
+ printf("%s: Context buffer overflow! This is likely a programming error in the GPU driver.\n", __func__);
+ abort();
+ }
+#endif
+ if(ctx->cur_buf != ETNA_NO_BUFFER)
+ {
+#if 0
+ printf("Submitting old buffer %i\n", ctx->cur_buf);
+#endif
+ /* Queue signal to signify when buffer is available again */
+ if((status = etna_queue_signal(ctx->queue, ctx->cmdbufi[ctx->cur_buf].sig_id, VIV_WHERE_COMMAND)) != ETNA_OK)
+ {
+ printf("%s: queue signal for old buffer failed: %i\n", __func__, status);
+ abort(); /* buffer is in invalid state XXX need some kind of recovery */
+ }
+ /* Otherwise, if there is something to be committed left in the current command buffer, commit it */
+ if((status = etna_flush(ctx)) != ETNA_OK)
+ {
+ printf("%s: reserve failed: %i\n", __func__, status);
+ abort(); /* buffer is in invalid state XXX need some kind of recovery */
+ }
+ }
+
+ /* Move on to next buffer if not enough free in current one */
+ if((status = switch_next_buffer(ctx)) != ETNA_OK)
+ {
+ printf("%s: can't switch to next command buffer: %i\n", __func__, status);
+ abort(); /* Buffer is in invalid state XXX need some kind of recovery.
+ This could involve waiting and re-uploading the context state. */
+ }
+ return status;
+}
+
+int etna_flush(struct etna_ctx *ctx)
+{
+ int status;
+ if(ctx == NULL)
+ return ETNA_INVALID_ADDR;
+ if(ctx->cur_buf == ETNA_CTX_BUFFER)
+ /* Can never flush while building context buffer */
+ return ETNA_INTERNAL_ERROR;
+ struct _gcsQUEUE *queue_first = etna_queue_first(ctx->queue);
+ if(ctx->cur_buf == ETNA_NO_BUFFER)
+ goto nothing_to_do;
+ gcoCMDBUF cur_buf = ctx->cmdbuf[ctx->cur_buf];
+
+ ETNA_ALIGN(ctx); /* make sure end of submitted command buffer end is aligned */
+#ifdef DEBUG
+ printf("Committing command buffer %i startOffset=%x offset=%x\n", ctx->cur_buf,
+ cur_buf->startOffset, ctx->offset*4);
+#endif
+ if(ctx->offset*4 <= (cur_buf->startOffset + BEGIN_COMMIT_CLEARANCE))
+ goto nothing_to_do;
+ cur_buf->offset = ctx->offset*4; /* Copy over current ending offset into CMDBUF, for kernel */
+#ifdef DEBUG_CMDBUF
+ etna_dump_cmd_buffer(ctx);
+#endif
+#ifdef GCABI_HAS_CONTEXT
+ gpu_context_finish_up(ctx);
+#endif
+ if(!queue_first)
+ ctx->flushes += 1;
+ else
+ ctx->flushes = 0;
+ if((status = viv_commit(ctx->conn, cur_buf, ctx->ctx, queue_first)) != 0)
+ {
+#ifdef DEBUG
+ fprintf(stderr, "Error committing command buffer\n");
+#endif
+ return status;
+ }
+ if((status = etna_queue_clear(ctx->queue)) != ETNA_OK)
+ return status;
+#ifdef GCABI_HAS_CONTEXT
+ /* set context entryPipe to currentPipe (next commit will start with current pipe) */
+ GCCTX(ctx)->entryPipe = GCCTX(ctx)->currentPipe;
+ gpu_context_clear(ctx);
+ if(ctx->ctx_cb)
+ {
+ enum etna_pipe initial_pipe, final_pipe;
+ /* Start building GPU context */
+ if((status = gpu_context_build_start(ctx)) != ETNA_OK)
+ {
+ printf("%s: gpu_context_build_start failed with status %i\n", __func__, status);
+ return status;
+ }
+ if((status = ctx->ctx_cb(ctx->ctx_cb_data, ctx, &initial_pipe, &final_pipe)) != ETNA_OK)
+ {
+ printf("%s: Context callback failed with status %i\n", __func__, status);
+ return status;
+ }
+ /* Set initial pipe in context */
+ GCCTX(ctx)->initialPipe = initial_pipe;
+ /* Finish building GPU context */
+ if((status = gpu_context_build_end(ctx, final_pipe)) != ETNA_OK)
+ {
+ printf("%s: gpu_context_build_end failed with status %i\n", __func__, status);
+ return status;
+ }
+ }
+#endif
+ cur_buf->startOffset = cur_buf->offset + END_COMMIT_CLEARANCE;
+ cur_buf->offset = cur_buf->startOffset + BEGIN_COMMIT_CLEARANCE;
+
+ if((cur_buf->offset + END_COMMIT_CLEARANCE) >= COMMAND_BUFFER_SIZE ||
+ ctx->flushes > ETNA_MAX_UNSIGNALED_FLUSHES)
+ {
+ /* nothing more fits in buffer, prevent warning about buffer overflow
+ on next etna_reserve.
+ */
+ cur_buf->startOffset = cur_buf->offset = COMMAND_BUFFER_SIZE - END_COMMIT_CLEARANCE;
+ }
+
+ /* Set writing offset for next etna_reserve. For convenience this is
+ stored as an index instead of a byte offset. */
+ ctx->offset = cur_buf->offset / 4;
+#ifdef DEBUG
+#ifdef GCABI_HAS_CONTEXT
+ printf(" New start offset: %x New offset: %x Contextbuffer used: %i\n", cur_buf->startOffset, cur_buf->offset, *(GCCTX(ctx)->inUse));
+#else
+ printf(" New start offset: %x New offset: %x\n", cur_buf->startOffset, cur_buf->offset);
+#endif
+#endif
+ return ETNA_OK;
+nothing_to_do:
+ /* Nothing in command buffer; but there may be kernel commands to submit. Do this seperately. */
+ if(queue_first != NULL)
+ {
+ ctx->flushes = 0;
+ if((status = viv_event_commit(ctx->conn, queue_first)) != 0)
+ {
+#ifdef DEBUG
+ fprintf(stderr, "Error committing kernel commands\n");
+#endif
+ return status;
+ }
+ if((status = etna_queue_clear(ctx->queue)) != ETNA_OK)
+ return status;
+ }
+ return ETNA_OK;
+}
+
+int etna_finish(struct etna_ctx *ctx)
+{
+ int status;
+ if(ctx == NULL)
+ return ETNA_INVALID_ADDR;
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL (wait for pixel engine to finish) */
+ if(etna_queue_signal(ctx->queue, ctx->sig_id, VIV_WHERE_PIXEL) != 0)
+ {
+ return ETNA_INTERNAL_ERROR;
+ }
+ if((status = etna_flush(ctx)) != ETNA_OK)
+ return status;
+#ifdef DEBUG
+ printf("finish: Waiting for signal...\n");
+#endif
+ /* Wait for signal */
+ if(viv_user_signal_wait(ctx->conn, ctx->sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ return ETNA_INTERNAL_ERROR;
+ }
+
+ return ETNA_OK;
+}
+
+int etna_set_pipe(struct etna_ctx *ctx, enum etna_pipe pipe)
+{
+ int status;
+ if(ctx == NULL)
+ return ETNA_INVALID_ADDR;
+
+ if((status = etna_reserve(ctx, 2)) != ETNA_OK)
+ return status;
+ ETNA_EMIT_LOAD_STATE(ctx, VIVS_GL_FLUSH_CACHE>>2, 1, 0);
+ switch(pipe)
+ {
+ case ETNA_PIPE_2D: ETNA_EMIT(ctx, VIVS_GL_FLUSH_CACHE_PE2D); break;
+ case ETNA_PIPE_3D: ETNA_EMIT(ctx, VIVS_GL_FLUSH_CACHE_DEPTH | VIVS_GL_FLUSH_CACHE_COLOR); break;
+ default: return ETNA_INVALID_VALUE;
+ }
+
+ etna_stall(ctx, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE);
+
+ if((status = etna_reserve(ctx, 2)) != ETNA_OK)
+ return status;
+ ETNA_EMIT_LOAD_STATE(ctx, VIVS_GL_PIPE_SELECT>>2, 1, 0);
+ ETNA_EMIT(ctx, pipe);
+
+#ifdef GCABI_HAS_CONTEXT
+ if(ctx->cur_buf != ETNA_CTX_BUFFER)
+ {
+ GCCTX(ctx)->currentPipe = pipe;
+ }
+#endif
+ return ETNA_OK;
+}
+
+int etna_semaphore(struct etna_ctx *ctx, uint32_t from, uint32_t to)
+{
+ int status;
+ if(ctx == NULL)
+ return ETNA_INVALID_ADDR;
+ if((status = etna_reserve(ctx, 2)) != ETNA_OK)
+ return status;
+ ETNA_EMIT_LOAD_STATE(ctx, VIVS_GL_SEMAPHORE_TOKEN>>2, 1, 0);
+ ETNA_EMIT(ctx, VIVS_GL_SEMAPHORE_TOKEN_FROM(from) | VIVS_GL_SEMAPHORE_TOKEN_TO(to));
+ return ETNA_OK;
+}
+
+int etna_stall(struct etna_ctx *ctx, uint32_t from, uint32_t to)
+{
+ int status;
+ if(ctx == NULL)
+ return ETNA_INVALID_ADDR;
+ if((status = etna_reserve(ctx, 4)) != ETNA_OK)
+ return status;
+ ETNA_EMIT_LOAD_STATE(ctx, VIVS_GL_SEMAPHORE_TOKEN>>2, 1, 0);
+ ETNA_EMIT(ctx, VIVS_GL_SEMAPHORE_TOKEN_FROM(from) | VIVS_GL_SEMAPHORE_TOKEN_TO(to));
+ if(from == SYNC_RECIPIENT_FE)
+ {
+ /* if the frontend is to be stalled, queue a STALL frontend command */
+ ETNA_EMIT_STALL(ctx, from, to);
+ } else {
+ /* otherwise, load the STALL token state */
+ ETNA_EMIT_LOAD_STATE(ctx, VIVS_GL_STALL_TOKEN>>2, 1, 0);
+ ETNA_EMIT(ctx, VIVS_GL_STALL_TOKEN_FROM(from) | VIVS_GL_STALL_TOKEN_TO(to));
+ }
+ return ETNA_OK;
+}
+
+int etna_set_context_cb(struct etna_ctx *ctx, etna_context_snapshot_cb_t snapshot_cb, void *data)
+{
+ ctx->ctx_cb = snapshot_cb;
+ ctx->ctx_cb_data = data;
+ return ETNA_OK;
+}
+
+void etna_dump_cmd_buffer(struct etna_ctx *ctx)
+{
+ uint32_t start_offset = ctx->cmdbuf[ctx->cur_buf]->startOffset/4 + 8;
+ uint32_t *buf = &ctx->buf[start_offset];
+ size_t size = ctx->offset - start_offset;
+ printf("cmdbuf:\n");
+ for(unsigned idx=0; idx<size; ++idx)
+ {
+ printf(":%08x ", buf[idx]);
+ printf("\n");
+ }
+}
+
diff --git a/src/etnaviv/etna.h b/src/etnaviv/etna.h
new file mode 100644
index 0000000..a4e3255
--- /dev/null
+++ b/src/etnaviv/etna.h
@@ -0,0 +1,370 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/* Buffer building and submission, abstracts away specific kernel interface
+ * as much as practically possible.
+ */
+#ifndef H_ETNA
+#define H_ETNA
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/viv.h>
+
+#include <stdint.h>
+#include <stdlib.h>
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+#include <string.h> /* for memcpy */
+
+/* Number of command buffers, to be used in a circular fashion.
+ */
+#define NUM_COMMAND_BUFFERS 5
+
+/* Special command buffer ids */
+#define ETNA_NO_BUFFER (-1)
+#define ETNA_CTX_BUFFER (-2)
+
+/* Number of bytes in one command buffer */
+#define COMMAND_BUFFER_SIZE (0x8000)
+
+/* Constraints to command buffer layout:
+ *
+ * - Keep 8 words (32 bytes) at beginning of commit (for kernel to add optional PIPE switch)
+ * - Keep 6 words (24 bytes) between end of one commit and beginning of next, or at the end of a buffer (for kernel to add LINK)
+ * These reserved areas can be left uninitialized, as they are written by the kernel.
+ *
+ * Synchronization:
+ *
+ * - Create N command buffers, with a signal for each buffer
+ * - Before starting to write to a buffer, make sure it is free by waiting for buffer's sync signal
+ * - After a buffer is full, queue the buffer's sync signal and switch to next buffer
+ *
+ */
+#define BEGIN_COMMIT_CLEARANCE 32
+#define END_COMMIT_CLEARANCE 24
+
+/** Structure definitions */
+
+/* Etna error (return) codes */
+enum etna_status {
+ ETNA_OK = 0, /* = VIV_STATUS_OK */
+ ETNA_INVALID_ADDR = 1000, /* Don't overlap with VIV_STATUS_* */
+ ETNA_INVALID_VALUE = 1001,
+ ETNA_OUT_OF_MEMORY = 1002,
+ ETNA_INTERNAL_ERROR = 1003,
+ ETNA_ALREADY_LOCKED = 1004
+};
+
+/* HW pipes.
+ * Used by GPU to tell front-end what back-end modules to synchronize operations with.
+ */
+enum etna_pipe {
+ ETNA_PIPE_3D = 0,
+ ETNA_PIPE_2D = 1
+};
+
+struct _gcoCMDBUF;
+struct etna_queue;
+struct etna_ctx;
+
+struct etna_context_info {
+ size_t bytes;
+ viv_addr_t physical;
+ void *logical;
+};
+
+typedef int (*etna_context_snapshot_cb_t)(void *data, struct etna_ctx *ctx,
+ enum etna_pipe *initial_pipe, enum etna_pipe *final_pipe);
+
+struct etna_cmdbuf {
+ /* sync signals for command buffer */
+ int sig_id;
+ /* memory info */
+ size_t bytes;
+ viv_addr_t physical;
+ void *logical;
+};
+
+struct etna_ctx {
+ /* Driver connection */
+ struct viv_conn *conn;
+ /* Keep track of current command buffer and writing location.
+ * The offset is kept here instead of in cmdbuf[cur_buf].offset to save an level of indirection
+ * when building the buffer. It is only copied to the command buffer before submission to the kernel
+ * in etna_flush().
+ * Also, this offset is in terms of 32 bit words, instead of in bytes, so it can be directly used to index
+ * into buf.
+ */
+ uint32_t *buf;
+ uint32_t offset;
+ /* Current buffer id (index into cmdbuf) */
+ int cur_buf;
+ /* Stored current buffer id when building context */
+ int stored_buf;
+ /* Synchronization signal for finish() */
+ int sig_id;
+ /* Structures for kernel */
+ struct _gcoCMDBUF *cmdbuf[NUM_COMMAND_BUFFERS];
+ /* Extra information per command buffer */
+ struct etna_cmdbuf cmdbufi[NUM_COMMAND_BUFFERS];
+ /* number of unsignalled flushes (used to work around kernel bug) */
+ int flushes;
+ /* context */
+ viv_context_t ctx;
+ struct etna_context_info ctx_info;
+ etna_context_snapshot_cb_t ctx_cb;
+ void *ctx_cb_data;
+ /* command queue */
+ struct etna_queue *queue;
+};
+
+/** Convenience macros for command buffer building, remember to reserve enough space before using them */
+/* Queue load state command header (queues one word) */
+#define ETNA_EMIT_LOAD_STATE(ctx, ofs, count, fixp) \
+ (ctx)->buf[(ctx)->offset++] = \
+ (VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE | ((fixp)?VIV_FE_LOAD_STATE_HEADER_FIXP:0) | \
+ VIV_FE_LOAD_STATE_HEADER_OFFSET(ofs) | \
+ (VIV_FE_LOAD_STATE_HEADER_COUNT(count) & VIV_FE_LOAD_STATE_HEADER_COUNT__MASK))
+
+/* Queues one value (1 word) */
+#define ETNA_EMIT(ctx, value) \
+ (ctx)->buf[(ctx)->offset++] = (value)
+
+/* Draw array primitives (queues 4 words) */
+#define ETNA_EMIT_DRAW_PRIMITIVES(ctx, cmd, start, count) \
+ do { (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_PRIMITIVES_HEADER_OP_DRAW_PRIMITIVES; \
+ (ctx)->buf[(ctx)->offset++] = cmd; \
+ (ctx)->buf[(ctx)->offset++] = start; \
+ (ctx)->buf[(ctx)->offset++] = count; } while(0)
+
+/* Draw indexed primitives (queues 6 words) */
+#define ETNA_EMIT_DRAW_INDEXED_PRIMITIVES(ctx, cmd, start, count, offset) \
+ do { (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_INDEXED_PRIMITIVES_HEADER_OP_DRAW_INDEXED_PRIMITIVES; \
+ (ctx)->buf[(ctx)->offset++] = cmd; \
+ (ctx)->buf[(ctx)->offset++] = start; \
+ (ctx)->buf[(ctx)->offset++] = count; \
+ (ctx)->buf[(ctx)->offset++] = offset; \
+ (ctx)->offset++; } while(0)
+
+/* Queue a STALL command (queues 2 words) */
+#define ETNA_EMIT_STALL(ctx, from, to) \
+ do { (ctx)->buf[(ctx)->offset++] = VIV_FE_STALL_HEADER_OP_STALL; \
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_STALL_TOKEN_FROM(from) | VIV_FE_STALL_TOKEN_TO(to); } while(0)
+
+/* Round current offset to 64-bit */
+#define ETNA_ALIGN(ctx) ctx->offset = (ctx->offset + 1)&(~1);
+
+/* macro for MASKED() (multiple can be &ed) */
+#define ETNA_MASKED(NAME, VALUE) (~(NAME ## _MASK | NAME ## __MASK) | ((VALUE)<<(NAME ## __SHIFT)))
+/* for boolean bits */
+#define ETNA_MASKED_BIT(NAME, VALUE) (~(NAME ## _MASK | NAME) | ((VALUE) ? NAME : 0))
+/* for inline enum bit fields
+ */
+#define ETNA_MASKED_INL(NAME, VALUE) (~(NAME ## _MASK | NAME ## __MASK) | (NAME ## _ ## VALUE))
+
+/* Create new etna context.
+ * Return error when creation fails.
+ */
+int etna_create(struct viv_conn *conn, struct etna_ctx **ctx);
+
+/* Free an etna context. */
+int etna_free(struct etna_ctx *ctx);
+
+/* internal (non-inline) part of etna_reserve.
+ only to be used from etna_reserve. */
+int _etna_reserve_internal(struct etna_ctx *ctx, size_t n);
+
+/* Reserve space for writing N 32-bit command words. It is allowed to reserve
+ * more than is written, but not less, as this will result in a buffer overflow.
+ * ctx->offset will point to the reserved area on succesful return.
+ * It will always be 64-bit aligned so that a new command can be started.
+ * @return OK on success, error code otherwise
+ */
+static inline int etna_reserve(struct etna_ctx *ctx, size_t n)
+{
+ if(ctx == NULL)
+ return ETNA_INVALID_ADDR;
+ if(ctx->cur_buf != ETNA_NO_BUFFER)
+ {
+#ifdef CMD_DEBUG
+ printf("etna_reserve: %i at offset %i\n", (int)n, (int)ctx->offset);
+#endif
+ ETNA_ALIGN(ctx);
+
+ if(((ctx->offset + n)*4 + END_COMMIT_CLEARANCE) <= COMMAND_BUFFER_SIZE) /* enough bytes free in buffer */
+ {
+ return ETNA_OK;
+ }
+ }
+ return _etna_reserve_internal(ctx, n);
+}
+
+/* Set GPU pipe (ETNA_PIPE_2D, ETNA_PIPE_3D).
+ */
+int etna_set_pipe(struct etna_ctx *ctx, enum etna_pipe pipe);
+
+/* Send currently queued commands to kernel.
+ * @return OK on success, error code otherwise
+ */
+int etna_flush(struct etna_ctx *ctx);
+
+/* Send currently queued commands to kernel, then block for them to finish.
+ * @return OK on success, error code otherwise
+ */
+int etna_finish(struct etna_ctx *ctx);
+
+/* Queue a semaphore (but don't stall).
+ * from, to are values from SYNC_RECIPIENT_*.
+ * @return OK on success, error code otherwise
+ */
+int etna_semaphore(struct etna_ctx *ctx, uint32_t from, uint32_t to);
+
+/* Queue a semaphore and stall.
+ * from, to are values from SYNC_RECIPIENT_*.
+ * @return OK on success, error code otherwise
+ */
+int etna_stall(struct etna_ctx *ctx, uint32_t from, uint32_t to);
+
+/** Set callback for building context before flush.
+ * Any etna state update commands called inside this callback function will be
+ * part of context.
+ * @note This callback is never called if the kernel driver does not use contexts.
+ * @return OK on success, error code otherwise
+ */
+int etna_set_context_cb(struct etna_ctx *ctx, etna_context_snapshot_cb_t snapshot_cb, void *data);
+
+/* print command buffer for debugging */
+void etna_dump_cmd_buffer(struct etna_ctx *ctx);
+
+/**
+ * Direct state setting functions; these can be used for convenience. When absolute performance
+ * is required while updating big blocks of state at once, it is recommended to use the
+ * ETNA_EMIT_* macros and etna_reserve directly.
+ */
+static inline void etna_set_state(struct etna_ctx *cmdbuf, uint32_t address, uint32_t value)
+{
+ etna_reserve(cmdbuf, 2);
+ ETNA_EMIT_LOAD_STATE(cmdbuf, address >> 2, 1, 0);
+ ETNA_EMIT(cmdbuf, value);
+}
+
+static inline void etna_set_state_multi(struct etna_ctx *cmdbuf, uint32_t base, uint32_t num, const uint32_t *values)
+{
+ if(num == 0) return;
+ etna_reserve(cmdbuf, 1 + num + 1); /* 1 extra for potential alignment */
+ ETNA_EMIT_LOAD_STATE(cmdbuf, base >> 2, num, 0);
+ memcpy(&cmdbuf->buf[cmdbuf->offset], values, 4*num);
+ cmdbuf->offset += num;
+ ETNA_ALIGN(cmdbuf);
+}
+
+static inline void etna_set_state_f32(struct etna_ctx *cmdbuf, uint32_t address, float value)
+{
+ etna_set_state(cmdbuf, address, etna_f32_to_u32(value));
+}
+static inline void etna_set_state_fixp(struct etna_ctx *cmdbuf, uint32_t address, uint32_t value)
+{
+ etna_reserve(cmdbuf, 2);
+ ETNA_EMIT_LOAD_STATE(cmdbuf, address >> 2, 1, 1);
+ ETNA_EMIT(cmdbuf, value);
+}
+static inline void etna_set_state_fixp_multi(struct etna_ctx *cmdbuf, uint32_t address, uint32_t num, uint32_t *values)
+{
+ etna_reserve(cmdbuf, 1 + num + 1); /* 1 extra for potential alignment */
+ ETNA_EMIT_LOAD_STATE(cmdbuf, address >> 2, num, 1);
+ memcpy(&cmdbuf->buf[cmdbuf->offset], values, 4*num);
+ cmdbuf->offset += num;
+ ETNA_ALIGN(cmdbuf);
+}
+static inline void etna_draw_primitives(struct etna_ctx *cmdbuf, uint32_t primitive_type, uint32_t start, uint32_t count)
+{
+#ifdef CMD_DEBUG
+ printf("draw_primitives %08x %08x %08x %08x\n",
+ VIV_FE_DRAW_PRIMITIVES_HEADER_OP_DRAW_PRIMITIVES,
+ primitive_type, start, count);
+#endif
+ etna_reserve(cmdbuf, 4);
+ ETNA_EMIT_DRAW_PRIMITIVES(cmdbuf, primitive_type, start, count);
+}
+static inline void etna_draw_indexed_primitives(struct etna_ctx *cmdbuf, uint32_t primitive_type, uint32_t start, uint32_t count, uint32_t offset)
+{
+#ifdef CMD_DEBUG
+ printf("draw_primitives_indexed %08x %08x %08x %08x\n",
+ VIV_FE_DRAW_PRIMITIVES_HEADER_OP_DRAW_INDEXED_PRIMITIVES,
+ primitive_type, start, count);
+#endif
+ etna_reserve(cmdbuf, 5+1);
+ ETNA_EMIT_DRAW_INDEXED_PRIMITIVES(cmdbuf, primitive_type, start, count, offset);
+}
+
+/* ETNA_COALESCE
+ *
+ * Mechanism to emit state changes and join consecutive
+ * state updates into single SET_STATE commands when possible.
+ *
+ * Usage:
+ * - Set state words with ETNA_COALESCE_STATE_UPDATE.
+ *
+ * - Before starting the state update, reserve space using EMIT_STATE_OPEN(max_updates),
+ * where max_updates is the maximum number of possible updates that will be emitted between
+ * this ETNA_COALESCE_STATE_OPEN .. ETNA_COALESCE_STATE_CLOSE pair.
+ *
+ * - When done with updating, call ETNA_COALESCE_STATE_CLOSE.
+ *
+ * In the scope where these macros are used, define the variables
+ * uint32_t last_reg, -> last register to write to
+ * last_fixp, -> fixp conversion flag for last written register
+ * span_start -> start of span in command buffer
+ * for state tracking.
+ *
+ * It works by keeping track of the last register that was written to plus one,
+ * thus the next register that will be written. If the register number to be written
+ * matches this next register, add it to the current span. If not, close the span
+ * and open a new one.
+ */
+#define ETNA_COALESCE_STATE_OPEN(max_updates) \
+ etna_reserve(ctx, (max_updates) * 2); \
+ span_start = ctx->offset; \
+ last_reg = last_fixp = 0;
+
+#define ETNA_COALESCE_STATE_CLOSE() \
+ uint32_t span_size = ctx->offset - span_start; \
+ if(span_size) { (ctx)->buf[span_start - 1] |= VIV_FE_LOAD_STATE_HEADER_COUNT(span_size); } \
+ ETNA_ALIGN(ctx);
+
+#define ETNA_COALESCE_STATE_UPDATE(state_name, src_value, fixp) \
+ { \
+ if(last_reg != (VIVS_##state_name) || (fixp) != last_fixp) \
+ { \
+ ETNA_COALESCE_STATE_CLOSE() \
+ ETNA_EMIT_LOAD_STATE(ctx, (VIVS_##state_name) >> 2, 0, (fixp)); \
+ span_start = ctx->offset; \
+ } \
+ ETNA_EMIT(ctx, src_value); \
+ last_reg = VIVS_##state_name + 4; last_fixp = (fixp); \
+ }
+
+#endif
diff --git a/src/etnaviv/etna_fb.c b/src/etnaviv/etna_fb.c
new file mode 100644
index 0000000..5bd7470
--- /dev/null
+++ b/src/etnaviv/etna_fb.c
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#include <etnaviv/etna_fb.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include <errno.h>
+#include <assert.h>
+
+/* Structure to convert framebuffer format to RS destination conf */
+struct etna_fb_format_desc
+{
+ unsigned bits_per_pixel;
+ unsigned red_offset;
+ unsigned red_length;
+ unsigned green_offset;
+ unsigned green_length;
+ unsigned blue_offset;
+ unsigned blue_length;
+ unsigned alpha_offset;
+ unsigned alpha_length;
+ unsigned rs_format;
+ bool swap_rb;
+};
+
+static const struct etna_fb_format_desc etna_fb_formats[] = {
+ /* bpp ro rl go gl bo bl ao al rs_format swap_rb */
+ {32, 16, 8, 8, 8, 0 , 8, 0, 0, RS_FORMAT_X8R8G8B8, false},
+ {32, 0 , 8, 8, 8, 16, 8, 0, 0, RS_FORMAT_X8R8G8B8, true},
+ {32, 16, 8, 8, 8, 0 , 8, 24, 8, RS_FORMAT_A8R8G8B8, false},
+ {32, 0 , 8, 8, 8, 16, 8, 24, 8, RS_FORMAT_A8R8G8B8, true},
+ {16, 8 , 4, 4, 4, 0, 4, 0, 0, RS_FORMAT_X4R4G4B4, false},
+ {16, 0 , 4, 4, 4, 8, 4, 0, 0, RS_FORMAT_X4R4G4B4, true},
+ {16, 8 , 4, 4, 4, 0, 4, 12, 4, RS_FORMAT_A4R4G4B4, false},
+ {16, 0 , 4, 4, 4, 8, 4, 12, 4, RS_FORMAT_A4R4G4B4, true},
+ {16, 10, 5, 5, 5, 0, 5, 0, 0, RS_FORMAT_X1R5G5B5, false},
+ {16, 0, 5, 5, 5, 10, 5, 0, 0, RS_FORMAT_X1R5G5B5, true},
+ {16, 10, 5, 5, 5, 0, 5, 15, 1, RS_FORMAT_A1R5G5B5, false},
+ {16, 0, 5, 5, 5, 10, 5, 15, 1, RS_FORMAT_A1R5G5B5, true},
+ {16, 11, 5, 5, 6, 0, 5, 0, 0, RS_FORMAT_R5G6B5, false},
+ {16, 0, 5, 5, 6, 11, 5, 0, 0, RS_FORMAT_R5G6B5, true},
+ /* I guess we could support YUV outputs as well, for overlays,
+ * at least on GPUs that support YUV resolve target... */
+};
+
+#define NUM_FB_FORMATS (sizeof(etna_fb_formats) / sizeof(etna_fb_formats[0]))
+
+/* Get resolve format and swap red/blue format based on report on red/green/blue
+ * bit positions from kernel.
+ */
+bool etna_fb_get_format(const struct fb_var_screeninfo *fb_var, unsigned *rs_format, bool *swap_rb)
+{
+ int fmt_idx=0;
+ /* linear scan of table to find matching format */
+ for(fmt_idx=0; fmt_idx<NUM_FB_FORMATS; ++fmt_idx)
+ {
+ const struct etna_fb_format_desc *desc = &etna_fb_formats[fmt_idx];
+ if(desc->red_offset == fb_var->red.offset &&
+ desc->red_length == fb_var->red.length &&
+ desc->green_offset == fb_var->green.offset &&
+ desc->green_length == fb_var->green.length &&
+ desc->blue_offset == fb_var->blue.offset &&
+ desc->blue_length == fb_var->blue.length &&
+ (desc->alpha_offset == fb_var->transp.offset || desc->alpha_length == 0) &&
+ desc->alpha_length == fb_var->transp.length)
+ {
+ break;
+ }
+ }
+ if(fmt_idx == NUM_FB_FORMATS)
+ {
+ printf("Unsupported framebuffer format: red_offset=%i red_length=%i green_offset=%i green_length=%i blue_offset=%i blue_length=%i trans_offset=%i transp_length=%i\n",
+ (int)fb_var->red.offset, (int)fb_var->red.length,
+ (int)fb_var->green.offset, (int)fb_var->green.length,
+ (int)fb_var->blue.offset, (int)fb_var->blue.length,
+ (int)fb_var->transp.offset, (int)fb_var->transp.length);
+ return false;
+ } else {
+ printf("Framebuffer format: %i, flip_rb=%i\n",
+ etna_fb_formats[fmt_idx].rs_format,
+ etna_fb_formats[fmt_idx].swap_rb);
+ *rs_format = etna_fb_formats[fmt_idx].rs_format;
+ *swap_rb = etna_fb_formats[fmt_idx].swap_rb;
+ return true;
+ }
+}
+
diff --git a/src/etnaviv/etna_fb.h b/src/etnaviv/etna_fb.h
new file mode 100644
index 0000000..22790f6
--- /dev/null
+++ b/src/etnaviv/etna_fb.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Convert framebuffer format to RS/PE format */
+#ifndef H_ETNA_FB
+#define H_ETNA_FB
+
+#include <etnaviv/etna.h>
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <linux/fb.h>
+#include <unistd.h>
+
+/* Determine the framebuffer format from Linux framebuffer info structure */
+bool etna_fb_get_format(const struct fb_var_screeninfo *fb_var, unsigned *rs_format, bool *swap_rb);
+
+#endif
+
diff --git a/src/etnaviv/etna_mem.c b/src/etnaviv/etna_mem.c
new file mode 100644
index 0000000..bac6dbd
--- /dev/null
+++ b/src/etnaviv/etna_mem.c
@@ -0,0 +1,189 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_queue.h>
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "gc_abi.h"
+
+//#define DEBUG
+#define ETNA_VIDMEM_ALIGNMENT (0x40)
+
+int etna_vidmem_alloc_linear(struct viv_conn *conn, struct etna_vidmem **mem_out, size_t bytes, enum viv_surf_type type, enum viv_pool pool, bool lock)
+{
+ if(mem_out == NULL) return ETNA_INVALID_ADDR;
+ struct etna_vidmem *mem = ETNA_CALLOC_STRUCT(etna_vidmem);
+ if(mem == NULL) return ETNA_OUT_OF_MEMORY;
+
+ mem->type = type;
+
+ if(viv_alloc_linear_vidmem(conn, bytes, ETNA_VIDMEM_ALIGNMENT, type, pool, &mem->node, &mem->size)!=0)
+ {
+#ifdef DEBUG
+ fprintf(stderr, "Error allocating render target tile status memory\n");
+#endif
+ return ETNA_OUT_OF_MEMORY;
+ }
+#ifdef DEBUG
+ printf("Allocated: node=%08x size=%08x\n", (uint32_t)mem->node, mem->size);
+#endif
+ if(lock)
+ {
+ int status = etna_vidmem_lock(conn, mem);
+ if(status != ETNA_OK)
+ {
+ etna_vidmem_free(conn, mem);
+ return status;
+ }
+ }
+ *mem_out = mem;
+ return ETNA_OK;
+}
+
+int etna_vidmem_lock(struct viv_conn *conn, struct etna_vidmem *mem)
+{
+ if(mem == NULL) return ETNA_INVALID_ADDR;
+ if(mem->logical != NULL) return ETNA_ALREADY_LOCKED;
+
+ if(viv_lock_vidmem(conn, mem->node, &mem->address, &mem->logical)!=0)
+ {
+#ifdef DEBUG
+ fprintf(stderr, "Error locking render target memory\n");
+#endif
+ return ETNA_INTERNAL_ERROR;
+ }
+#ifdef DEBUG
+ printf("Locked: phys=%08x log=%08x\n", (uint32_t)mem->address, (uint32_t)mem->logical);
+#endif
+
+ return ETNA_OK;
+}
+
+int etna_vidmem_unlock(struct viv_conn *conn, struct etna_queue *queue, struct etna_vidmem *mem)
+{
+ if(mem == NULL) return ETNA_INVALID_ADDR;
+ int async = 0;
+ /* Unlocking video memory seems to be a two-step process. First try it synchronously
+ * then the kernel can request an asynchronous component. Just queueing it asynchronously
+ * in the first place will not free the virtual memory on v4 */
+ if(viv_unlock_vidmem(conn, mem->node, mem->type, false, &async) != ETNA_OK)
+ {
+ return ETNA_INTERNAL_ERROR;
+ }
+ if(async)
+ {
+ if(queue)
+ {
+ /* If a queue is passed, add the async part at the end of the queue, to be submitted
+ * with next flush.
+ */
+ if(etna_queue_unlock_vidmem(queue, mem->node, mem->type) != ETNA_OK)
+ {
+ return ETNA_INTERNAL_ERROR;
+ }
+ } else { /* No queue, need to submit async part directly as event */
+ if(viv_unlock_vidmem(conn, mem->node, mem->type, true, &async) != ETNA_OK)
+ {
+ return ETNA_INTERNAL_ERROR;
+ }
+ }
+ }
+ mem->logical = NULL;
+ mem->address = 0;
+ return ETNA_OK;
+}
+
+int etna_vidmem_free(struct viv_conn *conn, struct etna_vidmem *mem)
+{
+ if(mem == NULL) return ETNA_OK;
+ if(mem->logical != NULL)
+ {
+ if(etna_vidmem_unlock(conn, NULL, mem) != ETNA_OK)
+ {
+ printf("etna: Warning: could not unlock memory\n");
+ }
+ }
+ if(viv_free_vidmem(conn, mem->node) != ETNA_OK)
+ {
+ printf("etna: Warning: could not free video memory\n");
+ }
+ ETNA_FREE(mem);
+ return ETNA_OK;
+}
+
+int etna_vidmem_queue_free(struct etna_queue *queue, struct etna_vidmem *mem)
+{
+ if(mem == NULL) return ETNA_OK;
+ if(mem->logical != NULL)
+ {
+ if(etna_vidmem_unlock(queue->ctx->conn, queue, mem) != ETNA_OK)
+ {
+ printf("etna: Warning: could not queue unlock memory\n");
+ }
+ }
+ if(etna_queue_free_vidmem(queue, mem->node) != ETNA_OK)
+ {
+ printf("etna: Warning: could not queue free video memory\n");
+ }
+ ETNA_FREE(mem);
+ return ETNA_OK;
+}
+
+int etna_usermem_map(struct viv_conn *conn, struct etna_usermem **mem_out, void *memory, size_t size)
+{
+ if(mem_out == NULL) return ETNA_INVALID_ADDR;
+ struct etna_usermem *mem = ETNA_CALLOC_STRUCT(etna_usermem);
+
+ mem->memory = memory;
+ mem->size = size;
+
+ if(viv_map_user_memory(conn, memory, size, &mem->info, &mem->address)!=0)
+ {
+ return ETNA_INTERNAL_ERROR;
+ }
+
+ *mem_out = mem;
+ return ETNA_OK;
+}
+
+int etna_usermem_unmap(struct viv_conn *conn, struct etna_usermem *mem)
+{
+ if(mem == NULL) return ETNA_INVALID_ADDR;
+ viv_unmap_user_memory(conn, mem->memory, mem->size, mem->info, mem->address);
+ ETNA_FREE(mem);
+ return ETNA_OK;
+}
+
+int etna_usermem_queue_unmap(struct etna_queue *queue, struct etna_usermem *mem)
+{
+ if(mem == NULL) return ETNA_INVALID_ADDR;
+ etna_queue_unmap_user_memory(queue, mem->memory, mem->size, mem->info, mem->address);
+ ETNA_FREE(mem);
+ return ETNA_OK;
+}
+
+
diff --git a/src/etnaviv/etna_mem.h b/src/etnaviv/etna_mem.h
new file mode 100644
index 0000000..165295d
--- /dev/null
+++ b/src/etnaviv/etna_mem.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* etna: memory management functions */
+#ifndef H_ETNA_MEM
+#define H_ETNA_MEM
+
+#include <etnaviv/viv.h>
+#include <stdbool.h>
+
+/* Structure describing a block of video memory */
+struct etna_vidmem {
+ size_t size;
+ enum viv_surf_type type;
+ viv_node_t node;
+ viv_addr_t address;
+ void *logical;
+};
+
+/* Structure describing a block of mapped user memory */
+struct etna_usermem {
+ void *memory;
+ size_t size;
+ viv_usermem_t info;
+ viv_addr_t address;
+};
+
+struct etna_queue;
+
+/* Allocate linear block of video memory */
+int etna_vidmem_alloc_linear(struct viv_conn *conn, struct etna_vidmem **mem_out, size_t bytes, enum viv_surf_type type, enum viv_pool pool, bool lock);
+
+/* Lock video memory into GPU and CPU memory space */
+int etna_vidmem_lock(struct viv_conn *conn, struct etna_vidmem *mem);
+
+/* Unlock video memory. Pass a queue for deferred usage, otherwise pass queue as NULL. */
+int etna_vidmem_unlock(struct viv_conn *conn, struct etna_queue *queue, struct etna_vidmem *mem);
+
+/* Free video memory node */
+int etna_vidmem_free(struct viv_conn *conn, struct etna_vidmem *mem);
+
+/* Deferred free video memory node */
+int etna_vidmem_queue_free(struct etna_queue *queue, struct etna_vidmem *mem);
+
+/* Map user memory into GPU memory space */
+int etna_usermem_map(struct viv_conn *conn, struct etna_usermem **mem_out, void *memory, size_t size);
+
+/* Unmap user memory from GPU memory space */
+int etna_usermem_unmap(struct viv_conn *conn, struct etna_usermem *mem);
+
+/* Deferred unmap user memory */
+int etna_usermem_queue_unmap(struct etna_queue *queue, struct etna_usermem *mem);
+
+#endif
+
diff --git a/src/etnaviv/etna_queue.c b/src/etnaviv/etna_queue.c
new file mode 100644
index 0000000..c874087
--- /dev/null
+++ b/src/etnaviv/etna_queue.c
@@ -0,0 +1,136 @@
+#include <etnaviv/etna_queue.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/viv.h>
+
+#include "gc_abi.h"
+#include "viv_internal.h"
+
+#include <assert.h>
+
+/* Maximum number of kernel commands in queue */
+#define ETNA_QUEUE_CAPACITY (64)
+
+int etna_queue_create(struct etna_ctx *ctx, struct etna_queue **queue_out)
+{
+ struct etna_queue *queue = ETNA_CALLOC_STRUCT(etna_queue);
+ if(queue == NULL)
+ {
+ return ETNA_OUT_OF_MEMORY;
+ }
+ queue->ctx = ctx;
+ queue->queue = ETNA_CALLOC_STRUCT_ARRAY(ETNA_QUEUE_CAPACITY, _gcsQUEUE);
+ queue->last = NULL;
+ queue->count = 0;
+ queue->max_count = ETNA_QUEUE_CAPACITY;
+
+ *queue_out = queue;
+ return ETNA_OK;
+}
+
+int etna_queue_clear(struct etna_queue *queue)
+{
+ queue->last = NULL;
+ queue->count = 0;
+ return ETNA_OK;
+}
+
+int etna_queue_alloc(struct etna_queue *queue, struct _gcsHAL_INTERFACE **cmd_out)
+{
+ int rv;
+ if(queue == NULL)
+ return ETNA_INVALID_ADDR;
+ if(queue->count == queue->max_count)
+ {
+ /* Queue is full, flush context. Assert that there is a one-to-one relationship
+ * between queue and etna context so that flushing the context flushes this queue.
+ */
+ assert(queue->ctx->queue == queue);
+ if((rv = etna_flush(queue->ctx)) != ETNA_OK)
+ return rv;
+ assert(queue->count == 0);
+ }
+ struct _gcsQUEUE *cmd = &queue->queue[queue->count++];
+ cmd->next = PTR_TO_VIV(NULL);
+ /* update next pointer of previous record */
+ if(queue->last != NULL)
+ {
+ queue->last->next = PTR_TO_VIV(cmd);
+ }
+ queue->last = cmd;
+ *cmd_out = &cmd->iface;
+ return ETNA_OK;
+}
+
+int etna_queue_signal(struct etna_queue *queue, int sig_id, enum viv_where fromWhere)
+{
+ struct _gcsHAL_INTERFACE *cmd = NULL;
+ int rv;
+ if((rv=etna_queue_alloc(queue, &cmd)) != ETNA_OK)
+ return rv;
+ cmd->command = gcvHAL_SIGNAL;
+ cmd->u.Signal.signal = PTR_TO_VIV((void*)sig_id);
+ cmd->u.Signal.auxSignal = PTR_TO_VIV((void*)0x0);
+ cmd->u.Signal.process = HANDLE_TO_VIV(queue->ctx->conn->process);
+ cmd->u.Signal.fromWhere = convert_where(fromWhere);
+ return ETNA_OK;
+}
+
+int etna_queue_free_contiguous(struct etna_queue *queue, size_t bytes, viv_addr_t physical, void *logical)
+{
+ struct _gcsHAL_INTERFACE *cmd = NULL;
+ int rv;
+ if((rv=etna_queue_alloc(queue, &cmd)) != ETNA_OK)
+ return rv;
+ cmd->command = gcvHAL_FREE_CONTIGUOUS_MEMORY;
+ cmd->u.FreeContiguousMemory.bytes = bytes;
+ cmd->u.FreeContiguousMemory.physical = PTR_TO_VIV((gctPHYS_ADDR)physical);
+ cmd->u.FreeContiguousMemory.logical = PTR_TO_VIV(logical);
+ return ETNA_OK;
+}
+
+int etna_queue_unlock_vidmem(struct etna_queue *queue, viv_node_t node, enum viv_surf_type type)
+{
+ struct _gcsHAL_INTERFACE *cmd = NULL;
+ int rv;
+ if((rv=etna_queue_alloc(queue, &cmd)) != ETNA_OK)
+ return rv;
+ cmd->command = gcvHAL_UNLOCK_VIDEO_MEMORY;
+ cmd->u.UnlockVideoMemory.node = HANDLE_TO_VIV(node);
+ cmd->u.UnlockVideoMemory.type = convert_surf_type(type);
+ return ETNA_OK;
+}
+
+int etna_queue_free_vidmem(struct etna_queue *queue, viv_node_t node)
+{
+ struct _gcsHAL_INTERFACE *cmd = NULL;
+ int rv;
+ if((rv=etna_queue_alloc(queue, &cmd)) != ETNA_OK)
+ return rv;
+ cmd->command = gcvHAL_FREE_VIDEO_MEMORY;
+ cmd->u.FreeVideoMemory.node = HANDLE_TO_VIV(node);
+ return ETNA_OK;
+}
+
+int etna_queue_unmap_user_memory(struct etna_queue *queue, void *memory, size_t size, viv_usermem_t info, viv_addr_t address)
+{
+ struct _gcsHAL_INTERFACE *cmd = NULL;
+ int rv;
+ if((rv=etna_queue_alloc(queue, &cmd)) != ETNA_OK)
+ return rv;
+ cmd->command = gcvHAL_UNMAP_USER_MEMORY;
+ cmd->u.UnmapUserMemory.memory = PTR_TO_VIV(memory);
+ cmd->u.UnmapUserMemory.size = size;
+ cmd->u.UnmapUserMemory.info = HANDLE_TO_VIV(info);
+ cmd->u.UnmapUserMemory.address = address;
+ return ETNA_OK;
+}
+
+int etna_queue_free(struct etna_queue *queue)
+{
+ if(queue == NULL)
+ return ETNA_INVALID_ADDR;
+ ETNA_FREE(queue->queue);
+ ETNA_FREE(queue);
+ return ETNA_OK;
+}
+
diff --git a/src/etnaviv/etna_queue.h b/src/etnaviv/etna_queue.h
new file mode 100644
index 0000000..d9f0a1b
--- /dev/null
+++ b/src/etnaviv/etna_queue.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/* Kernel command queue. Kernel commands that should be executed after a certain command buffer
+ * has been processed can be added to this queue.
+ * Preallocate the entire queue at a fixed size for performance.
+ * The queue is flushed to the kernel after command buffer submission.
+ */
+#ifndef H_ETNA_QUEUE
+#define H_ETNA_QUEUE
+
+#include <etnaviv/viv.h>
+
+struct _gcsQUEUE;
+struct _gcsHAL_INTERFACE;
+struct etna_ctx;
+
+/* command queue */
+struct etna_queue {
+ struct etna_ctx *ctx;
+ struct _gcsQUEUE *queue;
+ struct _gcsQUEUE *last;
+ int count;
+ int max_count;
+};
+
+/* Initialize and allocate a queue.
+ */
+int etna_queue_create(struct etna_ctx *ctx, struct etna_queue **queue_out);
+
+/* Clear the queue, removing all commands.
+ */
+int etna_queue_clear(struct etna_queue *queue);
+
+/* Return pointer to first element in queue, or NULL if queue is empty.
+ * As the queue is submitted to the kernel as a linked list, a pointer to the first element is enough
+ * to represent it.
+ *
+ * Submitting the queue is currently a two-step process:
+ *
+ * - Request first pointer using etna_queue_first
+ * - Submit queue to kernel
+ * - Clear queue using etna_queue_clear
+ *
+ */
+static inline struct _gcsQUEUE *etna_queue_first(struct etna_queue *queue)
+{
+ return (queue->count == 0) ? NULL : queue->queue;
+}
+
+/* Allocate a new kernel command structure, add it to the queue,
+ * and return a pointer to it.
+ * @note the returned structure is not zero-initialized
+ */
+int etna_queue_alloc(struct etna_queue *queue, struct _gcsHAL_INTERFACE **cmd_out);
+
+/** Queue synchronization signal from GPU.
+ */
+int etna_queue_signal(struct etna_queue *queue, int sig_id, enum viv_where fromWhere);
+
+/** Queue free block of contiguous memory previously allocated with viv_alloc_contiguous.
+ */
+int etna_queue_free_contiguous(struct etna_queue *queue, size_t bytes, viv_addr_t physical, void *logical);
+
+/** Queue unlock (unmap) video memory node from GPU and CPU memory.
+ */
+int etna_queue_unlock_vidmem(struct etna_queue *queue, viv_node_t node, enum viv_surf_type type);
+
+/** Queue free block of video memory previously allocated with viv_alloc_linear_vidmem.
+ */
+int etna_queue_free_vidmem(struct etna_queue *queue, viv_node_t node);
+
+/** Queue unmap user memory from GPU memory.
+ */
+int etna_queue_unmap_user_memory(struct etna_queue *queue, void *memory, size_t size, viv_usermem_t info, viv_addr_t address);
+
+/* Deallocate a queue. Flushes the queue and returns all memory.
+ */
+int etna_queue_free(struct etna_queue *queue);
+
+#endif
+
diff --git a/src/etnaviv/etna_rs.c b/src/etnaviv/etna_rs.c
new file mode 100644
index 0000000..04103ef
--- /dev/null
+++ b/src/etnaviv/etna_rs.c
@@ -0,0 +1,155 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#include <etnaviv/etna_rs.h>
+#include <etnaviv/etna_tex.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+
+/* Some kind of RS flush, used in the older drivers */
+void etna_warm_up_rs(struct etna_ctx *cmdbuf, viv_addr_t aux_rt_physical, viv_addr_t aux_rt_ts_physical)
+{
+ etna_set_state(cmdbuf, VIVS_TS_COLOR_STATUS_BASE, aux_rt_ts_physical); /* ADDR_G */
+ etna_set_state(cmdbuf, VIVS_TS_COLOR_SURFACE_BASE, aux_rt_physical); /* ADDR_F */
+ etna_set_state(cmdbuf, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH);
+ etna_set_state(cmdbuf, VIVS_RS_CONFIG, /* wut? */
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_R5G6B5) |
+ VIVS_RS_CONFIG_DEST_TILED);
+ etna_set_state(cmdbuf, VIVS_RS_SOURCE_ADDR, aux_rt_physical); /* ADDR_F */
+ etna_set_state(cmdbuf, VIVS_RS_SOURCE_STRIDE, 0x400);
+ etna_set_state(cmdbuf, VIVS_RS_DEST_ADDR, aux_rt_physical); /* ADDR_F */
+ etna_set_state(cmdbuf, VIVS_RS_DEST_STRIDE, 0x400);
+ etna_set_state(cmdbuf, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(4) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(16));
+ etna_set_state(cmdbuf, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(cmdbuf, VIVS_RS_KICKER, 0xbeebbeeb);
+}
+
+/* compile RS state struct */
+#define SET_STATE(addr, value) cs->addr = (value)
+#define SET_STATE_FIXP(addr, value) cs->addr = (value)
+#define SET_STATE_F32(addr, value) cs->addr = f32_to_u32(value)
+void etna_compile_rs_state(struct compiled_rs_state *cs, const struct rs_state *rs)
+{
+ /* TILED and SUPERTILED layout have their strides multiplied with 4 in RS */
+ unsigned source_stride_shift = (rs->source_tiling != ETNA_LAYOUT_LINEAR) ? 2 : 0;
+ unsigned dest_stride_shift = (rs->dest_tiling != ETNA_LAYOUT_LINEAR) ? 2 : 0;
+ /* TODO could just pre-generate command buffer, would simply submit to one memcpy */
+ SET_STATE(RS_CONFIG, VIVS_RS_CONFIG_SOURCE_FORMAT(rs->source_format) |
+ (rs->downsample_x?VIVS_RS_CONFIG_DOWNSAMPLE_X:0) |
+ (rs->downsample_y?VIVS_RS_CONFIG_DOWNSAMPLE_Y:0) |
+ ((rs->source_tiling&1)?VIVS_RS_CONFIG_SOURCE_TILED:0) |
+ VIVS_RS_CONFIG_DEST_FORMAT(rs->dest_format) |
+ ((rs->dest_tiling&1)?VIVS_RS_CONFIG_DEST_TILED:0) |
+ ((rs->swap_rb)?VIVS_RS_CONFIG_SWAP_RB:0) |
+ ((rs->flip)?VIVS_RS_CONFIG_FLIP:0));
+ SET_STATE(RS_SOURCE_ADDR, rs->source_addr);
+ SET_STATE(RS_PIPE_SOURCE_ADDR[0], rs->source_addr);
+ SET_STATE(RS_PIPE_SOURCE_ADDR[1], rs->source_addr); /* TODO */
+ SET_STATE(RS_SOURCE_STRIDE, (rs->source_stride << source_stride_shift) | ((rs->source_tiling&2)?VIVS_RS_SOURCE_STRIDE_TILING:0));
+ SET_STATE(RS_DEST_ADDR, rs->dest_addr);
+ SET_STATE(RS_PIPE_DEST_ADDR[0], rs->dest_addr);
+ SET_STATE(RS_PIPE_DEST_ADDR[1], rs->dest_addr); /* TODO */
+ SET_STATE(RS_DEST_STRIDE, (rs->dest_stride << dest_stride_shift) | ((rs->dest_tiling&2)?VIVS_RS_DEST_STRIDE_TILING:0));
+ SET_STATE(RS_WINDOW_SIZE, VIVS_RS_WINDOW_SIZE_WIDTH(rs->width) | VIVS_RS_WINDOW_SIZE_HEIGHT(rs->height));
+ SET_STATE(RS_DITHER[0], rs->dither[0]);
+ SET_STATE(RS_DITHER[1], rs->dither[1]);
+ SET_STATE(RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_BITS(rs->clear_bits) | rs->clear_mode);
+ SET_STATE(RS_FILL_VALUE[0], rs->clear_value[0]);
+ SET_STATE(RS_FILL_VALUE[1], rs->clear_value[1]);
+ SET_STATE(RS_FILL_VALUE[2], rs->clear_value[2]);
+ SET_STATE(RS_FILL_VALUE[3], rs->clear_value[3]);
+ SET_STATE(RS_EXTRA_CONFIG, VIVS_RS_EXTRA_CONFIG_AA(rs->aa) | VIVS_RS_EXTRA_CONFIG_ENDIAN(rs->endian_mode));
+}
+
+/* submit RS state, without any processing and no dependence on context
+ * except TS if this is a source-to-destination blit. */
+void etna_submit_rs_state(struct etna_ctx *restrict ctx, const struct compiled_rs_state *cs)
+{
+ if (ctx->conn->chip.pixel_pipes == 1)
+ {
+ etna_reserve(ctx, 22);
+ /*0 */ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_CONFIG>>2, 5, 0);
+ /*1 */ ETNA_EMIT(ctx, cs->RS_CONFIG);
+ /*2 */ ETNA_EMIT(ctx, cs->RS_SOURCE_ADDR);
+ /*3 */ ETNA_EMIT(ctx, cs->RS_SOURCE_STRIDE);
+ /*4 */ ETNA_EMIT(ctx, cs->RS_DEST_ADDR);
+ /*5 */ ETNA_EMIT(ctx, cs->RS_DEST_STRIDE);
+ /*6 */ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_WINDOW_SIZE>>2, 1, 0);
+ /*7 */ ETNA_EMIT(ctx, cs->RS_WINDOW_SIZE);
+ /*8 */ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_DITHER(0)>>2, 2, 0);
+ /*9 */ ETNA_EMIT(ctx, cs->RS_DITHER[0]);
+ /*10*/ ETNA_EMIT(ctx, cs->RS_DITHER[1]);
+ /*11*/ ETNA_EMIT(ctx, 0xbabb1e); /* pad */
+ /*12*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_CLEAR_CONTROL>>2, 5, 0);
+ /*13*/ ETNA_EMIT(ctx, cs->RS_CLEAR_CONTROL);
+ /*14*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[0]);
+ /*15*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[1]);
+ /*16*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[2]);
+ /*17*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[3]);
+ /*18*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_EXTRA_CONFIG>>2, 1, 0);
+ /*19*/ ETNA_EMIT(ctx, cs->RS_EXTRA_CONFIG);
+ /*20*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_KICKER>>2, 1, 0);
+ /*21*/ ETNA_EMIT(ctx, 0xbeebbeeb);
+ }
+ else if (ctx->conn->chip.pixel_pipes == 2)
+ {
+ etna_reserve(ctx, 32);
+ /*0 */ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_CONFIG>>2, 5, 0);
+ /*1 */ ETNA_EMIT(ctx, cs->RS_CONFIG);
+ /*2 */ ETNA_EMIT(ctx, cs->RS_SOURCE_STRIDE);
+ /*3 */ ETNA_EMIT(ctx, cs->RS_DEST_ADDR);
+ /*4 */ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_PIPE_SOURCE_ADDR(0)>>2, 2, 0);
+ /*5 */ ETNA_EMIT(ctx, cs->RS_PIPE_SOURCE_ADDR[0]);
+ /*6 */ ETNA_EMIT(ctx, cs->RS_PIPE_SOURCE_ADDR[1]);
+ /*7 */ ETNA_EMIT(ctx, 0x00000000); /* pad */
+ /*8 */ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_PIPE_DEST_ADDR(0)>>2, 2, 0);
+ /*9 */ ETNA_EMIT(ctx, cs->RS_PIPE_DEST_ADDR[0]);
+ /*10*/ ETNA_EMIT(ctx, cs->RS_PIPE_DEST_ADDR[1]);
+ /*11*/ ETNA_EMIT(ctx, 0x00000000); /* pad */
+ /*12*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_PIPE_OFFSET(0)>>2, 2, 0);
+ /*13*/ ETNA_EMIT(ctx, cs->RS_PIPE_OFFSET[0]);
+ /*14*/ ETNA_EMIT(ctx, cs->RS_PIPE_OFFSET[1]);
+ /*15*/ ETNA_EMIT(ctx, 0x00000000); /* pad */
+ /*16*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_WINDOW_SIZE>>2, 1, 0);
+ /*17*/ ETNA_EMIT(ctx, cs->RS_WINDOW_SIZE);
+ /*18*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_DITHER(0)>>2, 2, 0);
+ /*19*/ ETNA_EMIT(ctx, cs->RS_DITHER[0]);
+ /*20*/ ETNA_EMIT(ctx, cs->RS_DITHER[1]);
+ /*21*/ ETNA_EMIT(ctx, 0xbabb1e); /* pad */
+ /*22*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_CLEAR_CONTROL>>2, 5, 0);
+ /*23*/ ETNA_EMIT(ctx, cs->RS_CLEAR_CONTROL);
+ /*24*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[0]);
+ /*25*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[1]);
+ /*26*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[2]);
+ /*27*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[3]);
+ /*28*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_EXTRA_CONFIG>>2, 1, 0);
+ /*29*/ ETNA_EMIT(ctx, cs->RS_EXTRA_CONFIG);
+ /*30*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_KICKER>>2, 1, 0);
+ /*31*/ ETNA_EMIT(ctx, 0xbeebbeeb);
+ }
+}
+
diff --git a/src/etnaviv/etna_rs.h b/src/etnaviv/etna_rs.h
new file mode 100644
index 0000000..3593548
--- /dev/null
+++ b/src/etnaviv/etna_rs.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#ifndef H_ETNA_RS
+#define H_ETNA_RS
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+
+struct rs_state
+{
+ uint8_t downsample_x:1; // Downsample in x direction
+ uint8_t downsample_y:1; // Downsample in y direction
+
+ uint8_t source_format; // RS_FORMAT_XXX
+ uint8_t source_tiling; // ETNA_LAYOUT_XXX
+ uint8_t dest_tiling; // ETNA_LAYOUT_XXX
+ uint8_t dest_format; // RS_FORMAT_XXX
+ uint8_t swap_rb;
+ uint8_t flip;
+ uint32_t source_addr;
+ uint32_t source_stride;
+ uint32_t dest_addr;
+ uint32_t dest_stride;
+ uint16_t width; // source width
+ uint16_t height; // source height
+ uint32_t dither[2];
+ uint32_t clear_bits;
+ uint32_t clear_mode; // VIVS_RS_CLEAR_CONTROL_MODE_XXX
+ uint32_t clear_value[4];
+ uint8_t aa;
+ uint8_t endian_mode; // ENDIAN_MODE_XXX
+};
+
+/* treat this as opaque structure */
+struct compiled_rs_state
+{
+ uint32_t RS_CONFIG;
+ uint32_t RS_SOURCE_ADDR;
+ uint32_t RS_SOURCE_STRIDE;
+ uint32_t RS_DEST_ADDR;
+ uint32_t RS_DEST_STRIDE;
+ uint32_t RS_WINDOW_SIZE;
+ uint32_t RS_DITHER[2];
+ uint32_t RS_CLEAR_CONTROL;
+ uint32_t RS_FILL_VALUE[4];
+ uint32_t RS_EXTRA_CONFIG;
+ uint32_t RS_PIPE_SOURCE_ADDR[2]; /* TODO is there hardware with more then 2 pipes? */
+ uint32_t RS_PIPE_DEST_ADDR[2]; /* TODO is there hardware with more then 2 pipes? */
+ uint32_t RS_PIPE_OFFSET[2]; /* TODO is there hardware with more then 2 pipes? */
+};
+
+/* Flush RS? warm up RS on aux render target */
+void etna_warm_up_rs(struct etna_ctx *cmdbuf, viv_addr_t aux_rt_physical, viv_addr_t aux_rt_ts_physical);
+
+/* compile RS state struct */
+void etna_compile_rs_state(struct compiled_rs_state *cs, const struct rs_state *rs);
+
+/* submit compiled RS state */
+void etna_submit_rs_state(struct etna_ctx *restrict ctx, const struct compiled_rs_state *cs);
+
+#endif
+
diff --git a/src/etnaviv/etna_tex.c b/src/etnaviv/etna_tex.c
new file mode 100644
index 0000000..8582c65
--- /dev/null
+++ b/src/etnaviv/etna_tex.c
@@ -0,0 +1,76 @@
+#include <etnaviv/etna_tex.h>
+
+#include <stdint.h>
+#include <stdio.h>
+
+#define TEX_TILE_WIDTH (4)
+#define TEX_TILE_HEIGHT (4)
+#define TEX_TILE_WORDS (TEX_TILE_WIDTH*TEX_TILE_HEIGHT)
+
+#define DO_TILE(type) \
+ src_stride /= sizeof(type); \
+ dst_stride = (dst_stride * TEX_TILE_HEIGHT) / sizeof(type); \
+ for(unsigned srcy=0; srcy<height; ++srcy) \
+ { \
+ unsigned dsty = basey + srcy; \
+ unsigned ty = (dsty/TEX_TILE_HEIGHT) * dst_stride + (dsty%TEX_TILE_HEIGHT) * TEX_TILE_WIDTH; \
+ for(unsigned srcx=0; srcx<width; ++srcx) \
+ { \
+ unsigned dstx = basex + srcx; \
+ ((type*)dest)[ty + (dstx/TEX_TILE_WIDTH)*TEX_TILE_WORDS + (dstx%TEX_TILE_WIDTH)] = \
+ ((type*)src)[srcy * src_stride + srcx]; \
+ } \
+ }
+
+#define DO_UNTILE(type) \
+ src_stride = (src_stride * TEX_TILE_HEIGHT) / sizeof(type); \
+ dst_stride /= sizeof(type); \
+ for(unsigned dsty=0; dsty<height; ++dsty) \
+ { \
+ unsigned srcy = basey + dsty; \
+ unsigned sy = (srcy/TEX_TILE_HEIGHT) * src_stride + (srcy%TEX_TILE_HEIGHT) * TEX_TILE_WIDTH; \
+ for(unsigned dstx=0; dstx<width; ++dstx) \
+ { \
+ unsigned srcx = basex + dstx; \
+ ((type*)dest)[dsty * dst_stride + dstx] = \
+ ((type*)src)[sy + (srcx/TEX_TILE_WIDTH)*TEX_TILE_WORDS + (srcx%TEX_TILE_WIDTH)]; \
+ } \
+ }
+
+void etna_texture_tile(void *dest, void *src, unsigned basex, unsigned basey, unsigned dst_stride, unsigned width, unsigned height, unsigned src_stride, unsigned elmtsize)
+{
+ if(elmtsize == 4)
+ {
+ DO_TILE(uint32_t)
+ } else if(elmtsize == 2)
+ {
+ DO_TILE(uint16_t)
+ } else if(elmtsize == 1)
+ {
+ DO_TILE(uint8_t)
+ } else
+ {
+ /* Tiling is only used for element sizes of 1, 2 and 4 */
+ printf("etna_texture_tile: unhandled element size %i\n", elmtsize);
+ }
+}
+
+void etna_texture_untile(void *dest, void *src, unsigned basex, unsigned basey, unsigned src_stride, unsigned width, unsigned height, unsigned dst_stride, unsigned elmtsize)
+{
+ if(elmtsize == 4)
+ {
+ DO_UNTILE(uint32_t);
+ } else if(elmtsize == 2)
+ {
+ DO_UNTILE(uint16_t);
+ } else if(elmtsize == 1)
+ {
+ DO_UNTILE(uint8_t);
+ } else
+ {
+ /* Tiling is only used for element sizes of 1, 2 and 4 */
+ printf("etna_texture_tile: unhandled element size %i\n", elmtsize);
+ }
+}
+
+
diff --git a/src/etnaviv/etna_tex.h b/src/etnaviv/etna_tex.h
new file mode 100644
index 0000000..d6df2aa
--- /dev/null
+++ b/src/etnaviv/etna_tex.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Vivante specific surface tiling */
+#ifndef H_ETNA_TEX
+#define H_ETNA_TEX
+
+#include <stdint.h>
+
+/* texture or surface layout */
+enum etna_surface_layout
+{
+ ETNA_LAYOUT_LINEAR = 0,
+ ETNA_LAYOUT_TILED = 1,
+ ETNA_LAYOUT_SUPER_TILED = 1|2, /* both tiling and supertiling bit enabled */
+ ETNA_LAYOUT_MULTI_TILED = 4|1, /* multi pipe tiled */
+ ETNA_LAYOUT_MULTI_SUPERTILED = 4|1|2 /* multi pipe supertiled */
+};
+
+void etna_texture_tile(void *dest, void *src, unsigned basex, unsigned basey, unsigned dst_stride, unsigned width, unsigned height, unsigned src_stride, unsigned elmtsize);
+void etna_texture_untile(void *dest, void *src, unsigned basex, unsigned basey, unsigned src_stride, unsigned width, unsigned height, unsigned dst_stride, unsigned elmtsize);
+
+/* XXX from/to supertiling (can have different layouts, may be better to leave to RS) */
+
+#endif
+
diff --git a/src/etnaviv/etna_util.h b/src/etnaviv/etna_util.h
new file mode 100644
index 0000000..477fe14
--- /dev/null
+++ b/src/etnaviv/etna_util.h
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/* Misc util */
+#ifndef H_ETNA_UTIL
+#define H_ETNA_UTIL
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <math.h>
+
+#define ETNA_MALLOC(_size) malloc(_size)
+#define ETNA_CALLOC_STRUCT(T) (struct T *) calloc(1, sizeof(struct T))
+#define ETNA_CALLOC_STRUCT_ARRAY(N, T) (struct T *) calloc((N), sizeof(struct T))
+#define ETNA_FREE(_ptr) free(_ptr)
+
+/* align to a value divisable by granularity >= value, works only for powers of two */
+static inline uint32_t etna_align_up(uint32_t value, uint32_t granularity)
+{
+ return (value + (granularity-1)) & (~(granularity-1));
+}
+/* align to a value divisable by granularity <= value, works only for powers of two */
+static inline uint32_t etna_align_down(uint32_t value, uint32_t granularity)
+{
+ return (value) & (~(granularity-1));
+}
+
+static inline uint32_t etna_umin(uint32_t a, uint32_t b) { return (a<b)?a:b; }
+static inline uint32_t etna_umax(uint32_t a, uint32_t b) { return (a>b)?a:b; }
+static inline uint32_t etna_smin(int32_t a, int32_t b) { return (a<b)?a:b; }
+static inline uint32_t etna_smax(int32_t a, int32_t b) { return (a>b)?a:b; }
+static inline uint32_t etna_bits_ones(unsigned num) { return (1<<num)-1; }
+
+/* clamped float [0.0 .. 1.0] -> [0 .. 255] */
+static inline uint8_t etna_cfloat_to_uint8(float f)
+{
+ if(f<=0.0f) return 0;
+ if(f>=(1.0f-1.0f/256.0f)) return 255;
+ return f * 256.0f;
+}
+
+/* clamped float [0.0 .. 1.0] -> [0 .. (1<<bits)-1] */
+static inline uint32_t etna_cfloat_to_uintN(float f, int bits)
+{
+ if(f<=0.0f) return 0;
+ if(f>=(1.0f-1.0f/(1<<bits))) return (1<<bits)-1;
+ return f * (1<<bits);
+}
+
+/* binary reinterpretation of f32 as u32 */
+static inline uint32_t etna_f32_to_u32(float value)
+{
+ union {
+ uint32_t u32;
+ float f32;
+ } x = { .f32 = value };
+ return x.u32;
+}
+
+/* 1/log10(2) */
+#define RCPLOG2 (1.4426950408889634f)
+
+/* float to fixp 5.5 */
+static inline uint32_t etna_float_to_fixp55(float f)
+{
+ if(f >= 15.953125f) return 511;
+ if(f < -16.0f) return 512;
+ return (int32_t) (f * 32.0f + 0.5f);
+}
+
+/* float to fixp 16.16 */
+static inline uint32_t etna_f32_to_fixp16(float f)
+{
+ if(f >= (32768.0f-1.0f/65536.0f)) return 0x7fffffff;
+ if(f < -32768.0f) return 0x80000000;
+ return (int32_t) (f * 65536.0f + 0.5f);
+}
+
+/* texture size to log2 in fixp 5.5 format */
+static inline uint32_t etna_log2_fixp55(unsigned width)
+{
+ return etna_float_to_fixp55(logf((float)width) * RCPLOG2);
+}
+
+#endif
+
diff --git a/src/etnaviv/isa.xml.h b/src/etnaviv/isa.xml.h
new file mode 100644
index 0000000..9bbe022
--- /dev/null
+++ b/src/etnaviv/isa.xml.h
@@ -0,0 +1,206 @@
+#ifndef ISA_XML
+#define ISA_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- /home/orion/projects/etna_viv/rnndb/isa.xml ( 19194 bytes, from 2013-09-17 13:47:14)
+
+Copyright (C) 2013
+*/
+
+
+#define INST_OPCODE_NOP 0x00000000
+#define INST_OPCODE_ADD 0x00000001
+#define INST_OPCODE_MAD 0x00000002
+#define INST_OPCODE_MUL 0x00000003
+#define INST_OPCODE_DST 0x00000004
+#define INST_OPCODE_DP3 0x00000005
+#define INST_OPCODE_DP4 0x00000006
+#define INST_OPCODE_DSX 0x00000007
+#define INST_OPCODE_DSY 0x00000008
+#define INST_OPCODE_MOV 0x00000009
+#define INST_OPCODE_MOVAR 0x0000000a
+#define INST_OPCODE_MOVAF 0x0000000b
+#define INST_OPCODE_RCP 0x0000000c
+#define INST_OPCODE_RSQ 0x0000000d
+#define INST_OPCODE_LITP 0x0000000e
+#define INST_OPCODE_SELECT 0x0000000f
+#define INST_OPCODE_SET 0x00000010
+#define INST_OPCODE_EXP 0x00000011
+#define INST_OPCODE_LOG 0x00000012
+#define INST_OPCODE_FRC 0x00000013
+#define INST_OPCODE_CALL 0x00000014
+#define INST_OPCODE_RET 0x00000015
+#define INST_OPCODE_BRANCH 0x00000016
+#define INST_OPCODE_TEXKILL 0x00000017
+#define INST_OPCODE_TEXLD 0x00000018
+#define INST_OPCODE_TEXLDB 0x00000019
+#define INST_OPCODE_TEXLDD 0x0000001a
+#define INST_OPCODE_TEXLDL 0x0000001b
+#define INST_OPCODE_TEXLDPCF 0x0000001c
+#define INST_OPCODE_REP 0x0000001d
+#define INST_OPCODE_ENDREP 0x0000001e
+#define INST_OPCODE_LOOP 0x0000001f
+#define INST_OPCODE_ENDLOOP 0x00000020
+#define INST_OPCODE_SQRT 0x00000021
+#define INST_OPCODE_SIN 0x00000022
+#define INST_OPCODE_COS 0x00000023
+#define INST_OPCODE_FLOOR 0x00000025
+#define INST_OPCODE_CEIL 0x00000026
+#define INST_OPCODE_SIGN 0x00000027
+#define INST_OPCODE_I2F 0x0000002d
+#define INST_OPCODE_CMP 0x00000031
+#define INST_OPCODE_LOAD 0x00000032
+#define INST_OPCODE_STORE 0x00000033
+#define INST_OPCODE_IMULLO0 0x0000003c
+#define INST_OPCODE_IMULHI0 0x00000040
+#define INST_OPCODE_LEADZERO 0x00000058
+#define INST_OPCODE_LSHIFT 0x00000059
+#define INST_OPCODE_RSHIFT 0x0000005a
+#define INST_OPCODE_ROTATE 0x0000005b
+#define INST_OPCODE_OR 0x0000005c
+#define INST_OPCODE_AND 0x0000005d
+#define INST_OPCODE_XOR 0x0000005e
+#define INST_OPCODE_NOT 0x0000005f
+#define INST_CONDITION_TRUE 0x00000000
+#define INST_CONDITION_GT 0x00000001
+#define INST_CONDITION_LT 0x00000002
+#define INST_CONDITION_GE 0x00000003
+#define INST_CONDITION_LE 0x00000004
+#define INST_CONDITION_EQ 0x00000005
+#define INST_CONDITION_NE 0x00000006
+#define INST_CONDITION_AND 0x00000007
+#define INST_CONDITION_OR 0x00000008
+#define INST_CONDITION_XOR 0x00000009
+#define INST_CONDITION_NOT 0x0000000a
+#define INST_CONDITION_NZ 0x0000000b
+#define INST_CONDITION_GEZ 0x0000000c
+#define INST_CONDITION_GZ 0x0000000d
+#define INST_CONDITION_LEZ 0x0000000e
+#define INST_CONDITION_LZ 0x0000000f
+#define INST_RGROUP_TEMP 0x00000000
+#define INST_RGROUP_INTERNAL 0x00000001
+#define INST_RGROUP_UNIFORM_0 0x00000002
+#define INST_RGROUP_UNIFORM_1 0x00000003
+#define INST_AMODE_DIRECT 0x00000000
+#define INST_AMODE_ADD_A_X 0x00000001
+#define INST_AMODE_ADD_A_Y 0x00000002
+#define INST_AMODE_ADD_A_Z 0x00000003
+#define INST_AMODE_ADD_A_W 0x00000004
+#define INST_SWIZ_COMP_X 0x00000000
+#define INST_SWIZ_COMP_Y 0x00000001
+#define INST_SWIZ_COMP_Z 0x00000002
+#define INST_SWIZ_COMP_W 0x00000003
+#define INST_COMPS_X 0x00000001
+#define INST_COMPS_Y 0x00000002
+#define INST_COMPS_Z 0x00000004
+#define INST_COMPS_W 0x00000008
+#define INST_SWIZ_X__MASK 0x00000003
+#define INST_SWIZ_X__SHIFT 0
+#define INST_SWIZ_X(x) (((x) << INST_SWIZ_X__SHIFT) & INST_SWIZ_X__MASK)
+#define INST_SWIZ_Y__MASK 0x0000000c
+#define INST_SWIZ_Y__SHIFT 2
+#define INST_SWIZ_Y(x) (((x) << INST_SWIZ_Y__SHIFT) & INST_SWIZ_Y__MASK)
+#define INST_SWIZ_Z__MASK 0x00000030
+#define INST_SWIZ_Z__SHIFT 4
+#define INST_SWIZ_Z(x) (((x) << INST_SWIZ_Z__SHIFT) & INST_SWIZ_Z__MASK)
+#define INST_SWIZ_W__MASK 0x000000c0
+#define INST_SWIZ_W__SHIFT 6
+#define INST_SWIZ_W(x) (((x) << INST_SWIZ_W__SHIFT) & INST_SWIZ_W__MASK)
+#define VIV_ISA_WORD_0 0x00000000
+#define VIV_ISA_WORD_0_OPCODE__MASK 0x0000003f
+#define VIV_ISA_WORD_0_OPCODE__SHIFT 0
+#define VIV_ISA_WORD_0_OPCODE(x) (((x) << VIV_ISA_WORD_0_OPCODE__SHIFT) & VIV_ISA_WORD_0_OPCODE__MASK)
+#define VIV_ISA_WORD_0_COND__MASK 0x000007c0
+#define VIV_ISA_WORD_0_COND__SHIFT 6
+#define VIV_ISA_WORD_0_COND(x) (((x) << VIV_ISA_WORD_0_COND__SHIFT) & VIV_ISA_WORD_0_COND__MASK)
+#define VIV_ISA_WORD_0_SAT 0x00000800
+#define VIV_ISA_WORD_0_DST_USE 0x00001000
+#define VIV_ISA_WORD_0_DST_AMODE__MASK 0x0000e000
+#define VIV_ISA_WORD_0_DST_AMODE__SHIFT 13
+#define VIV_ISA_WORD_0_DST_AMODE(x) (((x) << VIV_ISA_WORD_0_DST_AMODE__SHIFT) & VIV_ISA_WORD_0_DST_AMODE__MASK)
+#define VIV_ISA_WORD_0_DST_REG__MASK 0x007f0000
+#define VIV_ISA_WORD_0_DST_REG__SHIFT 16
+#define VIV_ISA_WORD_0_DST_REG(x) (((x) << VIV_ISA_WORD_0_DST_REG__SHIFT) & VIV_ISA_WORD_0_DST_REG__MASK)
+#define VIV_ISA_WORD_0_DST_COMPS__MASK 0x07800000
+#define VIV_ISA_WORD_0_DST_COMPS__SHIFT 23
+#define VIV_ISA_WORD_0_DST_COMPS(x) (((x) << VIV_ISA_WORD_0_DST_COMPS__SHIFT) & VIV_ISA_WORD_0_DST_COMPS__MASK)
+#define VIV_ISA_WORD_0_TEX_ID__MASK 0xf8000000
+#define VIV_ISA_WORD_0_TEX_ID__SHIFT 27
+#define VIV_ISA_WORD_0_TEX_ID(x) (((x) << VIV_ISA_WORD_0_TEX_ID__SHIFT) & VIV_ISA_WORD_0_TEX_ID__MASK)
+
+#define VIV_ISA_WORD_1 0x00000004
+#define VIV_ISA_WORD_1_TEX_AMODE__MASK 0x00000007
+#define VIV_ISA_WORD_1_TEX_AMODE__SHIFT 0
+#define VIV_ISA_WORD_1_TEX_AMODE(x) (((x) << VIV_ISA_WORD_1_TEX_AMODE__SHIFT) & VIV_ISA_WORD_1_TEX_AMODE__MASK)
+#define VIV_ISA_WORD_1_TEX_SWIZ__MASK 0x000007f8
+#define VIV_ISA_WORD_1_TEX_SWIZ__SHIFT 3
+#define VIV_ISA_WORD_1_TEX_SWIZ(x) (((x) << VIV_ISA_WORD_1_TEX_SWIZ__SHIFT) & VIV_ISA_WORD_1_TEX_SWIZ__MASK)
+#define VIV_ISA_WORD_1_SRC0_USE 0x00000800
+#define VIV_ISA_WORD_1_SRC0_REG__MASK 0x001ff000
+#define VIV_ISA_WORD_1_SRC0_REG__SHIFT 12
+#define VIV_ISA_WORD_1_SRC0_REG(x) (((x) << VIV_ISA_WORD_1_SRC0_REG__SHIFT) & VIV_ISA_WORD_1_SRC0_REG__MASK)
+#define VIV_ISA_WORD_1_UNK1_21 0x00200000
+#define VIV_ISA_WORD_1_SRC0_SWIZ__MASK 0x3fc00000
+#define VIV_ISA_WORD_1_SRC0_SWIZ__SHIFT 22
+#define VIV_ISA_WORD_1_SRC0_SWIZ(x) (((x) << VIV_ISA_WORD_1_SRC0_SWIZ__SHIFT) & VIV_ISA_WORD_1_SRC0_SWIZ__MASK)
+#define VIV_ISA_WORD_1_SRC0_NEG 0x40000000
+#define VIV_ISA_WORD_1_SRC0_ABS 0x80000000
+
+#define VIV_ISA_WORD_2 0x00000008
+#define VIV_ISA_WORD_2_SRC0_AMODE__MASK 0x00000007
+#define VIV_ISA_WORD_2_SRC0_AMODE__SHIFT 0
+#define VIV_ISA_WORD_2_SRC0_AMODE(x) (((x) << VIV_ISA_WORD_2_SRC0_AMODE__SHIFT) & VIV_ISA_WORD_2_SRC0_AMODE__MASK)
+#define VIV_ISA_WORD_2_SRC0_RGROUP__MASK 0x00000038
+#define VIV_ISA_WORD_2_SRC0_RGROUP__SHIFT 3
+#define VIV_ISA_WORD_2_SRC0_RGROUP(x) (((x) << VIV_ISA_WORD_2_SRC0_RGROUP__SHIFT) & VIV_ISA_WORD_2_SRC0_RGROUP__MASK)
+#define VIV_ISA_WORD_2_SRC1_USE 0x00000040
+#define VIV_ISA_WORD_2_SRC1_REG__MASK 0x0000ff80
+#define VIV_ISA_WORD_2_SRC1_REG__SHIFT 7
+#define VIV_ISA_WORD_2_SRC1_REG(x) (((x) << VIV_ISA_WORD_2_SRC1_REG__SHIFT) & VIV_ISA_WORD_2_SRC1_REG__MASK)
+#define VIV_ISA_WORD_2_OPCODE_BIT6 0x00010000
+#define VIV_ISA_WORD_2_SRC1_SWIZ__MASK 0x01fe0000
+#define VIV_ISA_WORD_2_SRC1_SWIZ__SHIFT 17
+#define VIV_ISA_WORD_2_SRC1_SWIZ(x) (((x) << VIV_ISA_WORD_2_SRC1_SWIZ__SHIFT) & VIV_ISA_WORD_2_SRC1_SWIZ__MASK)
+#define VIV_ISA_WORD_2_SRC1_NEG 0x02000000
+#define VIV_ISA_WORD_2_SRC1_ABS 0x04000000
+#define VIV_ISA_WORD_2_SRC1_AMODE__MASK 0x38000000
+#define VIV_ISA_WORD_2_SRC1_AMODE__SHIFT 27
+#define VIV_ISA_WORD_2_SRC1_AMODE(x) (((x) << VIV_ISA_WORD_2_SRC1_AMODE__SHIFT) & VIV_ISA_WORD_2_SRC1_AMODE__MASK)
+#define VIV_ISA_WORD_2_UNK2_30__MASK 0xc0000000
+#define VIV_ISA_WORD_2_UNK2_30__SHIFT 30
+#define VIV_ISA_WORD_2_UNK2_30(x) (((x) << VIV_ISA_WORD_2_UNK2_30__SHIFT) & VIV_ISA_WORD_2_UNK2_30__MASK)
+
+#define VIV_ISA_WORD_3 0x0000000c
+#define VIV_ISA_WORD_3_SRC1_RGROUP__MASK 0x00000007
+#define VIV_ISA_WORD_3_SRC1_RGROUP__SHIFT 0
+#define VIV_ISA_WORD_3_SRC1_RGROUP(x) (((x) << VIV_ISA_WORD_3_SRC1_RGROUP__SHIFT) & VIV_ISA_WORD_3_SRC1_RGROUP__MASK)
+#define VIV_ISA_WORD_3_SRC2_IMM__MASK 0x003fff80
+#define VIV_ISA_WORD_3_SRC2_IMM__SHIFT 7
+#define VIV_ISA_WORD_3_SRC2_IMM(x) (((x) << VIV_ISA_WORD_3_SRC2_IMM__SHIFT) & VIV_ISA_WORD_3_SRC2_IMM__MASK)
+#define VIV_ISA_WORD_3_SRC2_USE 0x00000008
+#define VIV_ISA_WORD_3_SRC2_REG__MASK 0x00001ff0
+#define VIV_ISA_WORD_3_SRC2_REG__SHIFT 4
+#define VIV_ISA_WORD_3_SRC2_REG(x) (((x) << VIV_ISA_WORD_3_SRC2_REG__SHIFT) & VIV_ISA_WORD_3_SRC2_REG__MASK)
+#define VIV_ISA_WORD_3_UNK3_13 0x00002000
+#define VIV_ISA_WORD_3_SRC2_SWIZ__MASK 0x003fc000
+#define VIV_ISA_WORD_3_SRC2_SWIZ__SHIFT 14
+#define VIV_ISA_WORD_3_SRC2_SWIZ(x) (((x) << VIV_ISA_WORD_3_SRC2_SWIZ__SHIFT) & VIV_ISA_WORD_3_SRC2_SWIZ__MASK)
+#define VIV_ISA_WORD_3_SRC2_NEG 0x00400000
+#define VIV_ISA_WORD_3_SRC2_ABS 0x00800000
+#define VIV_ISA_WORD_3_UNK3_24 0x01000000
+#define VIV_ISA_WORD_3_SRC2_AMODE__MASK 0x0e000000
+#define VIV_ISA_WORD_3_SRC2_AMODE__SHIFT 25
+#define VIV_ISA_WORD_3_SRC2_AMODE(x) (((x) << VIV_ISA_WORD_3_SRC2_AMODE__SHIFT) & VIV_ISA_WORD_3_SRC2_AMODE__MASK)
+#define VIV_ISA_WORD_3_SRC2_RGROUP__MASK 0x70000000
+#define VIV_ISA_WORD_3_SRC2_RGROUP__SHIFT 28
+#define VIV_ISA_WORD_3_SRC2_RGROUP(x) (((x) << VIV_ISA_WORD_3_SRC2_RGROUP__SHIFT) & VIV_ISA_WORD_3_SRC2_RGROUP__MASK)
+#define VIV_ISA_WORD_3_UNK3_31 0x80000000
+
+
+#endif /* ISA_XML */
diff --git a/src/etnaviv/state.xml.h b/src/etnaviv/state.xml.h
new file mode 100644
index 0000000..0b8b92b
--- /dev/null
+++ b/src/etnaviv/state.xml.h
@@ -0,0 +1,348 @@
+#ifndef STATE_XML
+#define STATE_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- /home/orion/projects/etna_viv/rnndb/state.xml ( 18526 bytes, from 2013-09-11 16:52:32)
+- /home/orion/projects/etna_viv/rnndb/common.xml ( 16543 bytes, from 2013-09-01 10:53:22)
+- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21834 bytes, from 2013-09-11 15:58:37)
+- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51058 bytes, from 2013-09-01 10:53:22)
+- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54270 bytes, from 2013-09-17 15:37:52)
+- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-09-01 10:53:22)
+
+Copyright (C) 2013
+*/
+
+
+#define VARYING_COMPONENT_USE_UNUSED 0x00000000
+#define VARYING_COMPONENT_USE_USED 0x00000001
+#define VARYING_COMPONENT_USE_POINTCOORD_X 0x00000002
+#define VARYING_COMPONENT_USE_POINTCOORD_Y 0x00000003
+#define FE_VERTEX_STREAM_CONTROL_VERTEX_STRIDE__MASK 0x000000ff
+#define FE_VERTEX_STREAM_CONTROL_VERTEX_STRIDE__SHIFT 0
+#define FE_VERTEX_STREAM_CONTROL_VERTEX_STRIDE(x) (((x) << FE_VERTEX_STREAM_CONTROL_VERTEX_STRIDE__SHIFT) & FE_VERTEX_STREAM_CONTROL_VERTEX_STRIDE__MASK)
+#define VIVS_FE 0x00000000
+
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG(i0) (0x00000600 + 0x4*(i0))
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG__ESIZE 0x00000004
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG__LEN 0x00000010
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE__MASK 0x0000000f
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE__SHIFT 0
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_BYTE 0x00000000
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_UNSIGNED_BYTE 0x00000001
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_SHORT 0x00000002
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_UNSIGNED_SHORT 0x00000003
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_INT 0x00000004
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_UNSIGNED_INT 0x00000005
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT 0x00000008
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_HALF_FLOAT 0x00000009
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FIXED 0x0000000b
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_INT_10_10_10_2 0x0000000c
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_UNSIGNED_INT_10_10_10_2 0x0000000d
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__MASK 0x00000030
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT 4
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN(x) (((x) << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) & VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__MASK)
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_NONCONSECUTIVE 0x00000080
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__MASK 0x00000700
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT 8
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM(x) (((x) << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) & VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__MASK)
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__MASK 0x00003000
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT 12
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM(x) (((x) << VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) & VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__MASK)
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE__MASK 0x0000c000
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE__SHIFT 14
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF 0x00000000
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_ON 0x00008000
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_START__MASK 0x00ff0000
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT 16
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_START(x) (((x) << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) & VIVS_FE_VERTEX_ELEMENT_CONFIG_START__MASK)
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_END__MASK 0xff000000
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT 24
+#define VIVS_FE_VERTEX_ELEMENT_CONFIG_END(x) (((x) << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT) & VIVS_FE_VERTEX_ELEMENT_CONFIG_END__MASK)
+
+#define VIVS_FE_CMD_STREAM_BASE_ADDR 0x00000640
+
+#define VIVS_FE_INDEX_STREAM_BASE_ADDR 0x00000644
+
+#define VIVS_FE_INDEX_STREAM_CONTROL 0x00000648
+#define VIVS_FE_INDEX_STREAM_CONTROL_TYPE__MASK 0x00000003
+#define VIVS_FE_INDEX_STREAM_CONTROL_TYPE__SHIFT 0
+#define VIVS_FE_INDEX_STREAM_CONTROL_TYPE_UNSIGNED_CHAR 0x00000000
+#define VIVS_FE_INDEX_STREAM_CONTROL_TYPE_UNSIGNED_SHORT 0x00000001
+#define VIVS_FE_INDEX_STREAM_CONTROL_TYPE_UNSIGNED_INT 0x00000002
+
+#define VIVS_FE_VERTEX_STREAM_BASE_ADDR 0x0000064c
+
+#define VIVS_FE_VERTEX_STREAM_CONTROL 0x00000650
+
+#define VIVS_FE_COMMAND_ADDRESS 0x00000654
+
+#define VIVS_FE_COMMAND_CONTROL 0x00000658
+#define VIVS_FE_COMMAND_CONTROL_PREFETCH__MASK 0x0000ffff
+#define VIVS_FE_COMMAND_CONTROL_PREFETCH__SHIFT 0
+#define VIVS_FE_COMMAND_CONTROL_PREFETCH(x) (((x) << VIVS_FE_COMMAND_CONTROL_PREFETCH__SHIFT) & VIVS_FE_COMMAND_CONTROL_PREFETCH__MASK)
+#define VIVS_FE_COMMAND_CONTROL_ENABLE 0x00010000
+
+#define VIVS_FE_DMA_STATUS 0x0000065c
+
+#define VIVS_FE_DMA_DEBUG_STATE 0x00000660
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE__MASK 0x0000001f
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE__SHIFT 0
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_IDLE 0x00000000
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_DEC 0x00000001
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_ADR0 0x00000002
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_LOAD0 0x00000003
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_ADR1 0x00000004
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_LOAD1 0x00000005
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_3DADR 0x00000006
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_3DCMD 0x00000007
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_3DCNTL 0x00000008
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_3DIDXCNTL 0x00000009
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_INITREQDMA 0x0000000a
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_DRAWIDX 0x0000000b
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_DRAW 0x0000000c
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_2DRECT0 0x0000000d
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_2DRECT1 0x0000000e
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_2DDATA0 0x0000000f
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_2DDATA1 0x00000010
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_WAITFIFO 0x00000011
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_WAIT 0x00000012
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_LINK 0x00000013
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_END 0x00000014
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_STATE_STALL 0x00000015
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_DMA_STATE__MASK 0x00000300
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_DMA_STATE__SHIFT 8
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_DMA_STATE_IDLE 0x00000000
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_DMA_STATE_START 0x00000100
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_DMA_STATE_REQ 0x00000200
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_DMA_STATE_END 0x00000300
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_FETCH_STATE__MASK 0x00000c00
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_FETCH_STATE__SHIFT 10
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_FETCH_STATE_IDLE 0x00000000
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_FETCH_STATE_RAMVALID 0x00000400
+#define VIVS_FE_DMA_DEBUG_STATE_CMD_FETCH_STATE_VALID 0x00000800
+#define VIVS_FE_DMA_DEBUG_STATE_REQ_DMA_STATE__MASK 0x00003000
+#define VIVS_FE_DMA_DEBUG_STATE_REQ_DMA_STATE__SHIFT 12
+#define VIVS_FE_DMA_DEBUG_STATE_REQ_DMA_STATE_IDLE 0x00000000
+#define VIVS_FE_DMA_DEBUG_STATE_REQ_DMA_STATE_WAITIDX 0x00001000
+#define VIVS_FE_DMA_DEBUG_STATE_REQ_DMA_STATE_CAL 0x00002000
+#define VIVS_FE_DMA_DEBUG_STATE_CAL_STATE__MASK 0x0000c000
+#define VIVS_FE_DMA_DEBUG_STATE_CAL_STATE__SHIFT 14
+#define VIVS_FE_DMA_DEBUG_STATE_CAL_STATE_IDLE 0x00000000
+#define VIVS_FE_DMA_DEBUG_STATE_CAL_STATE_LDADR 0x00004000
+#define VIVS_FE_DMA_DEBUG_STATE_CAL_STATE_IDXCALC 0x00008000
+#define VIVS_FE_DMA_DEBUG_STATE_VE_REQ_STATE__MASK 0x00030000
+#define VIVS_FE_DMA_DEBUG_STATE_VE_REQ_STATE__SHIFT 16
+#define VIVS_FE_DMA_DEBUG_STATE_VE_REQ_STATE_IDLE 0x00000000
+#define VIVS_FE_DMA_DEBUG_STATE_VE_REQ_STATE_CKCACHE 0x00010000
+#define VIVS_FE_DMA_DEBUG_STATE_VE_REQ_STATE_MISS 0x00020000
+
+#define VIVS_FE_DMA_ADDRESS 0x00000664
+
+#define VIVS_FE_DMA_LOW 0x00000668
+
+#define VIVS_FE_DMA_HIGH 0x0000066c
+
+#define VIVS_FE_AUTO_FLUSH 0x00000670
+
+#define VIVS_FE_UNK00678 0x00000678
+
+#define VIVS_FE_UNK0067C 0x0000067c
+
+#define VIVS_FE_VERTEX_STREAMS(i0) (0x00000000 + 0x4*(i0))
+#define VIVS_FE_VERTEX_STREAMS__ESIZE 0x00000004
+#define VIVS_FE_VERTEX_STREAMS__LEN 0x00000008
+
+#define VIVS_FE_VERTEX_STREAMS_BASE_ADDR(i0) (0x00000680 + 0x4*(i0))
+
+#define VIVS_FE_VERTEX_STREAMS_CONTROL(i0) (0x000006a0 + 0x4*(i0))
+
+#define VIVS_FE_UNK00700(i0) (0x00000700 + 0x4*(i0))
+#define VIVS_FE_UNK00700__ESIZE 0x00000004
+#define VIVS_FE_UNK00700__LEN 0x00000010
+
+#define VIVS_FE_UNK00740(i0) (0x00000740 + 0x4*(i0))
+#define VIVS_FE_UNK00740__ESIZE 0x00000004
+#define VIVS_FE_UNK00740__LEN 0x00000010
+
+#define VIVS_FE_UNK00780(i0) (0x00000780 + 0x4*(i0))
+#define VIVS_FE_UNK00780__ESIZE 0x00000004
+#define VIVS_FE_UNK00780__LEN 0x00000010
+
+#define VIVS_GL 0x00000000
+
+#define VIVS_GL_PIPE_SELECT 0x00003800
+#define VIVS_GL_PIPE_SELECT_PIPE__MASK 0x00000001
+#define VIVS_GL_PIPE_SELECT_PIPE__SHIFT 0
+#define VIVS_GL_PIPE_SELECT_PIPE(x) (((x) << VIVS_GL_PIPE_SELECT_PIPE__SHIFT) & VIVS_GL_PIPE_SELECT_PIPE__MASK)
+
+#define VIVS_GL_EVENT 0x00003804
+#define VIVS_GL_EVENT_EVENT_ID__MASK 0x0000001f
+#define VIVS_GL_EVENT_EVENT_ID__SHIFT 0
+#define VIVS_GL_EVENT_EVENT_ID(x) (((x) << VIVS_GL_EVENT_EVENT_ID__SHIFT) & VIVS_GL_EVENT_EVENT_ID__MASK)
+#define VIVS_GL_EVENT_FROM_FE 0x00000020
+#define VIVS_GL_EVENT_FROM_PE 0x00000040
+#define VIVS_GL_EVENT_SOURCE__MASK 0x00001f00
+#define VIVS_GL_EVENT_SOURCE__SHIFT 8
+#define VIVS_GL_EVENT_SOURCE(x) (((x) << VIVS_GL_EVENT_SOURCE__SHIFT) & VIVS_GL_EVENT_SOURCE__MASK)
+
+#define VIVS_GL_SEMAPHORE_TOKEN 0x00003808
+#define VIVS_GL_SEMAPHORE_TOKEN_FROM__MASK 0x0000001f
+#define VIVS_GL_SEMAPHORE_TOKEN_FROM__SHIFT 0
+#define VIVS_GL_SEMAPHORE_TOKEN_FROM(x) (((x) << VIVS_GL_SEMAPHORE_TOKEN_FROM__SHIFT) & VIVS_GL_SEMAPHORE_TOKEN_FROM__MASK)
+#define VIVS_GL_SEMAPHORE_TOKEN_TO__MASK 0x00001f00
+#define VIVS_GL_SEMAPHORE_TOKEN_TO__SHIFT 8
+#define VIVS_GL_SEMAPHORE_TOKEN_TO(x) (((x) << VIVS_GL_SEMAPHORE_TOKEN_TO__SHIFT) & VIVS_GL_SEMAPHORE_TOKEN_TO__MASK)
+
+#define VIVS_GL_FLUSH_CACHE 0x0000380c
+#define VIVS_GL_FLUSH_CACHE_DEPTH 0x00000001
+#define VIVS_GL_FLUSH_CACHE_COLOR 0x00000002
+#define VIVS_GL_FLUSH_CACHE_TEXTURE 0x00000004
+#define VIVS_GL_FLUSH_CACHE_PE2D 0x00000008
+#define VIVS_GL_FLUSH_CACHE_TEXTUREVS 0x00000010
+#define VIVS_GL_FLUSH_CACHE_SHADER_L1 0x00000020
+#define VIVS_GL_FLUSH_CACHE_SHADER_L2 0x00000040
+
+#define VIVS_GL_FLUSH_MMU 0x00003810
+#define VIVS_GL_FLUSH_MMU_FLUSH_FEMMU 0x00000001
+#define VIVS_GL_FLUSH_MMU_FLUSH_PEMMU 0x00000002
+
+#define VIVS_GL_VERTEX_ELEMENT_CONFIG 0x00003814
+
+#define VIVS_GL_MULTI_SAMPLE_CONFIG 0x00003818
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES__MASK 0x00000003
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES__SHIFT 0
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_NONE 0x00000000
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_2X 0x00000001
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_4X 0x00000002
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_MASK 0x00000008
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES__MASK 0x000000f0
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES__SHIFT 4
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES(x) (((x) << VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES__SHIFT) & VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES__MASK)
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES_MASK 0x00000100
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12__MASK 0x00007000
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12__SHIFT 12
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12(x) (((x) << VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12__SHIFT) & VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12__MASK)
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12_MASK 0x00008000
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16__MASK 0x00030000
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16__SHIFT 16
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16(x) (((x) << VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16__SHIFT) & VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16__MASK)
+#define VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16_MASK 0x00080000
+
+#define VIVS_GL_VARYING_TOTAL_COMPONENTS 0x0000381c
+#define VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM__MASK 0x000000ff
+#define VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM__SHIFT 0
+#define VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM(x) (((x) << VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM__SHIFT) & VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM__MASK)
+
+#define VIVS_GL_VARYING_NUM_COMPONENTS 0x00003820
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR0__MASK 0x00000007
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR0__SHIFT 0
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR0(x) (((x) << VIVS_GL_VARYING_NUM_COMPONENTS_VAR0__SHIFT) & VIVS_GL_VARYING_NUM_COMPONENTS_VAR0__MASK)
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR1__MASK 0x00000070
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR1__SHIFT 4
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR1(x) (((x) << VIVS_GL_VARYING_NUM_COMPONENTS_VAR1__SHIFT) & VIVS_GL_VARYING_NUM_COMPONENTS_VAR1__MASK)
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR2__MASK 0x00000700
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR2__SHIFT 8
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR2(x) (((x) << VIVS_GL_VARYING_NUM_COMPONENTS_VAR2__SHIFT) & VIVS_GL_VARYING_NUM_COMPONENTS_VAR2__MASK)
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR3__MASK 0x00007000
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR3__SHIFT 12
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR3(x) (((x) << VIVS_GL_VARYING_NUM_COMPONENTS_VAR3__SHIFT) & VIVS_GL_VARYING_NUM_COMPONENTS_VAR3__MASK)
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR4__MASK 0x00070000
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR4__SHIFT 16
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR4(x) (((x) << VIVS_GL_VARYING_NUM_COMPONENTS_VAR4__SHIFT) & VIVS_GL_VARYING_NUM_COMPONENTS_VAR4__MASK)
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR5__MASK 0x00700000
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR5__SHIFT 20
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR5(x) (((x) << VIVS_GL_VARYING_NUM_COMPONENTS_VAR5__SHIFT) & VIVS_GL_VARYING_NUM_COMPONENTS_VAR5__MASK)
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR6__MASK 0x07000000
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR6__SHIFT 24
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR6(x) (((x) << VIVS_GL_VARYING_NUM_COMPONENTS_VAR6__SHIFT) & VIVS_GL_VARYING_NUM_COMPONENTS_VAR6__MASK)
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR7__MASK 0x70000000
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR7__SHIFT 28
+#define VIVS_GL_VARYING_NUM_COMPONENTS_VAR7(x) (((x) << VIVS_GL_VARYING_NUM_COMPONENTS_VAR7__SHIFT) & VIVS_GL_VARYING_NUM_COMPONENTS_VAR7__MASK)
+
+#define VIVS_GL_VARYING_COMPONENT_USE(i0) (0x00003828 + 0x4*(i0))
+#define VIVS_GL_VARYING_COMPONENT_USE__ESIZE 0x00000004
+#define VIVS_GL_VARYING_COMPONENT_USE__LEN 0x00000002
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP0__MASK 0x00000003
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP0__SHIFT 0
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP0(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP0__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP0__MASK)
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP1__MASK 0x0000000c
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP1__SHIFT 2
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP1(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP1__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP1__MASK)
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP2__MASK 0x00000030
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP2__SHIFT 4
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP2(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP2__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP2__MASK)
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP3__MASK 0x000000c0
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP3__SHIFT 6
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP3(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP3__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP3__MASK)
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP4__MASK 0x00000300
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP4__SHIFT 8
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP4(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP4__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP4__MASK)
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP5__MASK 0x00000c00
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP5__SHIFT 10
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP5(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP5__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP5__MASK)
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP6__MASK 0x00003000
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP6__SHIFT 12
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP6(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP6__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP6__MASK)
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP7__MASK 0x0000c000
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP7__SHIFT 14
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP7(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP7__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP7__MASK)
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP8__MASK 0x00030000
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP8__SHIFT 16
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP8(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP8__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP8__MASK)
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP9__MASK 0x000c0000
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP9__SHIFT 18
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP9(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP9__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP9__MASK)
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP10__MASK 0x00300000
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP10__SHIFT 20
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP10(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP10__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP10__MASK)
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP11__MASK 0x00c00000
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP11__SHIFT 22
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP11(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP11__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP11__MASK)
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP12__MASK 0x03000000
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP12__SHIFT 24
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP12(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP12__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP12__MASK)
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP13__MASK 0x0c000000
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP13__SHIFT 26
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP13(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP13__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP13__MASK)
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP14__MASK 0x30000000
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP14__SHIFT 28
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP14(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP14__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP14__MASK)
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP15__MASK 0xc0000000
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP15__SHIFT 30
+#define VIVS_GL_VARYING_COMPONENT_USE_COMP15(x) (((x) << VIVS_GL_VARYING_COMPONENT_USE_COMP15__SHIFT) & VIVS_GL_VARYING_COMPONENT_USE_COMP15__MASK)
+
+#define VIVS_GL_UNK03834 0x00003834
+
+#define VIVS_GL_UNK03838 0x00003838
+
+#define VIVS_GL_API_MODE 0x0000384c
+#define VIVS_GL_API_MODE_OPENGL 0x00000000
+#define VIVS_GL_API_MODE_OPENVG 0x00000001
+#define VIVS_GL_API_MODE_OPENCL 0x00000002
+
+#define VIVS_GL_CONTEXT_POINTER 0x00003850
+
+#define VIVS_GL_UNK03A00 0x00003a00
+
+#define VIVS_GL_STALL_TOKEN 0x00003c00
+#define VIVS_GL_STALL_TOKEN_FROM__MASK 0x0000001f
+#define VIVS_GL_STALL_TOKEN_FROM__SHIFT 0
+#define VIVS_GL_STALL_TOKEN_FROM(x) (((x) << VIVS_GL_STALL_TOKEN_FROM__SHIFT) & VIVS_GL_STALL_TOKEN_FROM__MASK)
+#define VIVS_GL_STALL_TOKEN_TO__MASK 0x00001f00
+#define VIVS_GL_STALL_TOKEN_TO__SHIFT 8
+#define VIVS_GL_STALL_TOKEN_TO(x) (((x) << VIVS_GL_STALL_TOKEN_TO__SHIFT) & VIVS_GL_STALL_TOKEN_TO__MASK)
+#define VIVS_GL_STALL_TOKEN_FLIP0 0x40000000
+#define VIVS_GL_STALL_TOKEN_FLIP1 0x80000000
+
+#define VIVS_DUMMY 0x00000000
+
+#define VIVS_DUMMY_DUMMY 0x0003fffc
+
+
+#endif /* STATE_XML */
diff --git a/src/etnaviv/state_2d.xml.h b/src/etnaviv/state_2d.xml.h
new file mode 100644
index 0000000..3c77032
--- /dev/null
+++ b/src/etnaviv/state_2d.xml.h
@@ -0,0 +1,1473 @@
+#ifndef STATE_2D_XML
+#define STATE_2D_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- /home/orion/projects/etna_viv/rnndb/state.xml ( 18526 bytes, from 2013-09-11 16:52:32)
+- /home/orion/projects/etna_viv/rnndb/common.xml ( 16543 bytes, from 2013-09-01 10:53:22)
+- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21834 bytes, from 2013-09-11 15:58:37)
+- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51058 bytes, from 2013-09-01 10:53:22)
+- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54270 bytes, from 2013-09-17 15:37:52)
+- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-09-01 10:53:22)
+
+Copyright (C) 2013
+*/
+
+
+#define DE_FORMAT_X4R4G4B4 0x00000000
+#define DE_FORMAT_A4R4G4B4 0x00000001
+#define DE_FORMAT_X1R5G5B5 0x00000002
+#define DE_FORMAT_A1R5G5B5 0x00000003
+#define DE_FORMAT_R5G6B5 0x00000004
+#define DE_FORMAT_X8R8G8B8 0x00000005
+#define DE_FORMAT_A8R8G8B8 0x00000006
+#define DE_FORMAT_YUY2 0x00000007
+#define DE_FORMAT_UYVY 0x00000008
+#define DE_FORMAT_INDEX8 0x00000009
+#define DE_FORMAT_MONOCHROME 0x0000000a
+#define DE_FORMAT_YV12 0x0000000f
+#define DE_FORMAT_A8 0x00000010
+#define DE_FORMAT_NV12 0x00000011
+#define DE_FORMAT_NV16 0x00000012
+#define DE_FORMAT_RG16 0x00000013
+#define DE_SWIZZLE_ARGB 0x00000000
+#define DE_SWIZZLE_RGBA 0x00000001
+#define DE_SWIZZLE_ABGR 0x00000002
+#define DE_SWIZZLE_BGRA 0x00000003
+#define DE_BLENDMODE_ZERO 0x00000000
+#define DE_BLENDMODE_ONE 0x00000001
+#define DE_BLENDMODE_NORMAL 0x00000002
+#define DE_BLENDMODE_INVERSED 0x00000003
+#define DE_BLENDMODE_COLOR 0x00000004
+#define DE_BLENDMODE_COLOR_INVERSED 0x00000005
+#define DE_BLENDMODE_SATURATED_ALPHA 0x00000006
+#define DE_BLENDMODE_SATURATED_DEST_ALPHA 0x00000007
+#define DE_COMPONENT_BLUE 0x00000000
+#define DE_COMPONENT_GREEN 0x00000001
+#define DE_COMPONENT_RED 0x00000002
+#define DE_COMPONENT_ALPHA 0x00000003
+#define DE_ROT_MODE_ROT0 0x00000000
+#define DE_ROT_MODE_FLIP_X 0x00000001
+#define DE_ROT_MODE_FLIP_Y 0x00000002
+#define DE_ROT_MODE_ROT90 0x00000004
+#define DE_ROT_MODE_ROT180 0x00000005
+#define DE_ROT_MODE_ROT270 0x00000006
+#define DE_MIRROR_MODE_NONE 0x00000000
+#define DE_MIRROR_MODE_MIRROR_X 0x00000001
+#define DE_MIRROR_MODE_MIRROR_Y 0x00000002
+#define DE_MIRROR_MODE_MIRROR_XY 0x00000003
+#define DE_COLOR_BLUE__MASK 0x000000ff
+#define DE_COLOR_BLUE__SHIFT 0
+#define DE_COLOR_BLUE(x) (((x) << DE_COLOR_BLUE__SHIFT) & DE_COLOR_BLUE__MASK)
+#define DE_COLOR_GREEN__MASK 0x0000ff00
+#define DE_COLOR_GREEN__SHIFT 8
+#define DE_COLOR_GREEN(x) (((x) << DE_COLOR_GREEN__SHIFT) & DE_COLOR_GREEN__MASK)
+#define DE_COLOR_RED__MASK 0x00ff0000
+#define DE_COLOR_RED__SHIFT 16
+#define DE_COLOR_RED(x) (((x) << DE_COLOR_RED__SHIFT) & DE_COLOR_RED__MASK)
+#define DE_COLOR_ALPHA__MASK 0xff000000
+#define DE_COLOR_ALPHA__SHIFT 24
+#define DE_COLOR_ALPHA(x) (((x) << DE_COLOR_ALPHA__SHIFT) & DE_COLOR_ALPHA__MASK)
+#define VIVS_DE 0x00000000
+
+#define VIVS_DE_SRC_ADDRESS 0x00001200
+
+#define VIVS_DE_SRC_STRIDE 0x00001204
+#define VIVS_DE_SRC_STRIDE_STRIDE__MASK 0x0003ffff
+#define VIVS_DE_SRC_STRIDE_STRIDE__SHIFT 0
+#define VIVS_DE_SRC_STRIDE_STRIDE(x) (((x) << VIVS_DE_SRC_STRIDE_STRIDE__SHIFT) & VIVS_DE_SRC_STRIDE_STRIDE__MASK)
+
+#define VIVS_DE_SRC_ROTATION_CONFIG 0x00001208
+#define VIVS_DE_SRC_ROTATION_CONFIG_WIDTH__MASK 0x0000ffff
+#define VIVS_DE_SRC_ROTATION_CONFIG_WIDTH__SHIFT 0
+#define VIVS_DE_SRC_ROTATION_CONFIG_WIDTH(x) (((x) << VIVS_DE_SRC_ROTATION_CONFIG_WIDTH__SHIFT) & VIVS_DE_SRC_ROTATION_CONFIG_WIDTH__MASK)
+#define VIVS_DE_SRC_ROTATION_CONFIG_ROTATION__MASK 0x00010000
+#define VIVS_DE_SRC_ROTATION_CONFIG_ROTATION__SHIFT 16
+#define VIVS_DE_SRC_ROTATION_CONFIG_ROTATION_DISABLE 0x00000000
+#define VIVS_DE_SRC_ROTATION_CONFIG_ROTATION_ENABLE 0x00010000
+
+#define VIVS_DE_SRC_CONFIG 0x0000120c
+#define VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT__MASK 0x0000000f
+#define VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT__SHIFT 0
+#define VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT(x) (((x) << VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT__SHIFT) & VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT__MASK)
+#define VIVS_DE_SRC_CONFIG_TRANSPARENCY__MASK 0x00000030
+#define VIVS_DE_SRC_CONFIG_TRANSPARENCY__SHIFT 4
+#define VIVS_DE_SRC_CONFIG_TRANSPARENCY(x) (((x) << VIVS_DE_SRC_CONFIG_TRANSPARENCY__SHIFT) & VIVS_DE_SRC_CONFIG_TRANSPARENCY__MASK)
+#define VIVS_DE_SRC_CONFIG_SRC_RELATIVE__MASK 0x00000040
+#define VIVS_DE_SRC_CONFIG_SRC_RELATIVE__SHIFT 6
+#define VIVS_DE_SRC_CONFIG_SRC_RELATIVE_ABSOLUTE 0x00000000
+#define VIVS_DE_SRC_CONFIG_SRC_RELATIVE_RELATIVE 0x00000040
+#define VIVS_DE_SRC_CONFIG_TILED__MASK 0x00000080
+#define VIVS_DE_SRC_CONFIG_TILED__SHIFT 7
+#define VIVS_DE_SRC_CONFIG_TILED_DISABLE 0x00000000
+#define VIVS_DE_SRC_CONFIG_TILED_ENABLE 0x00000080
+#define VIVS_DE_SRC_CONFIG_LOCATION__MASK 0x00000100
+#define VIVS_DE_SRC_CONFIG_LOCATION__SHIFT 8
+#define VIVS_DE_SRC_CONFIG_LOCATION_MEMORY 0x00000000
+#define VIVS_DE_SRC_CONFIG_LOCATION_STREAM 0x00000100
+#define VIVS_DE_SRC_CONFIG_PACK__MASK 0x00003000
+#define VIVS_DE_SRC_CONFIG_PACK__SHIFT 12
+#define VIVS_DE_SRC_CONFIG_PACK_PACKED8 0x00000000
+#define VIVS_DE_SRC_CONFIG_PACK_PACKED16 0x00001000
+#define VIVS_DE_SRC_CONFIG_PACK_PACKED32 0x00002000
+#define VIVS_DE_SRC_CONFIG_PACK_UNPACKED 0x00003000
+#define VIVS_DE_SRC_CONFIG_MONO_TRANSPARENCY__MASK 0x00008000
+#define VIVS_DE_SRC_CONFIG_MONO_TRANSPARENCY__SHIFT 15
+#define VIVS_DE_SRC_CONFIG_MONO_TRANSPARENCY_BACKGROUND 0x00000000
+#define VIVS_DE_SRC_CONFIG_MONO_TRANSPARENCY_FOREGROUND 0x00008000
+#define VIVS_DE_SRC_CONFIG_UNK16 0x00010000
+#define VIVS_DE_SRC_CONFIG_SWIZZLE__MASK 0x00300000
+#define VIVS_DE_SRC_CONFIG_SWIZZLE__SHIFT 20
+#define VIVS_DE_SRC_CONFIG_SWIZZLE(x) (((x) << VIVS_DE_SRC_CONFIG_SWIZZLE__SHIFT) & VIVS_DE_SRC_CONFIG_SWIZZLE__MASK)
+#define VIVS_DE_SRC_CONFIG_SOURCE_FORMAT__MASK 0x1f000000
+#define VIVS_DE_SRC_CONFIG_SOURCE_FORMAT__SHIFT 24
+#define VIVS_DE_SRC_CONFIG_SOURCE_FORMAT(x) (((x) << VIVS_DE_SRC_CONFIG_SOURCE_FORMAT__SHIFT) & VIVS_DE_SRC_CONFIG_SOURCE_FORMAT__MASK)
+#define VIVS_DE_SRC_CONFIG_DISABLE420_L2_CACHE 0x20000000
+#define VIVS_DE_SRC_CONFIG_ENDIAN_CONTROL__MASK 0xc0000000
+#define VIVS_DE_SRC_CONFIG_ENDIAN_CONTROL__SHIFT 30
+#define VIVS_DE_SRC_CONFIG_ENDIAN_CONTROL(x) (((x) << VIVS_DE_SRC_CONFIG_ENDIAN_CONTROL__SHIFT) & VIVS_DE_SRC_CONFIG_ENDIAN_CONTROL__MASK)
+
+#define VIVS_DE_SRC_ORIGIN 0x00001210
+#define VIVS_DE_SRC_ORIGIN_X__MASK 0x0000ffff
+#define VIVS_DE_SRC_ORIGIN_X__SHIFT 0
+#define VIVS_DE_SRC_ORIGIN_X(x) (((x) << VIVS_DE_SRC_ORIGIN_X__SHIFT) & VIVS_DE_SRC_ORIGIN_X__MASK)
+#define VIVS_DE_SRC_ORIGIN_Y__MASK 0xffff0000
+#define VIVS_DE_SRC_ORIGIN_Y__SHIFT 16
+#define VIVS_DE_SRC_ORIGIN_Y(x) (((x) << VIVS_DE_SRC_ORIGIN_Y__SHIFT) & VIVS_DE_SRC_ORIGIN_Y__MASK)
+
+#define VIVS_DE_SRC_SIZE 0x00001214
+#define VIVS_DE_SRC_SIZE_X__MASK 0x0000ffff
+#define VIVS_DE_SRC_SIZE_X__SHIFT 0
+#define VIVS_DE_SRC_SIZE_X(x) (((x) << VIVS_DE_SRC_SIZE_X__SHIFT) & VIVS_DE_SRC_SIZE_X__MASK)
+#define VIVS_DE_SRC_SIZE_Y__MASK 0xffff0000
+#define VIVS_DE_SRC_SIZE_Y__SHIFT 16
+#define VIVS_DE_SRC_SIZE_Y(x) (((x) << VIVS_DE_SRC_SIZE_Y__SHIFT) & VIVS_DE_SRC_SIZE_Y__MASK)
+
+#define VIVS_DE_SRC_COLOR_BG 0x00001218
+
+#define VIVS_DE_SRC_COLOR_FG 0x0000121c
+
+#define VIVS_DE_STRETCH_FACTOR_LOW 0x00001220
+#define VIVS_DE_STRETCH_FACTOR_LOW_X__MASK 0x7fffffff
+#define VIVS_DE_STRETCH_FACTOR_LOW_X__SHIFT 0
+#define VIVS_DE_STRETCH_FACTOR_LOW_X(x) (((x) << VIVS_DE_STRETCH_FACTOR_LOW_X__SHIFT) & VIVS_DE_STRETCH_FACTOR_LOW_X__MASK)
+
+#define VIVS_DE_STRETCH_FACTOR_HIGH 0x00001224
+#define VIVS_DE_STRETCH_FACTOR_HIGH_Y__MASK 0x7fffffff
+#define VIVS_DE_STRETCH_FACTOR_HIGH_Y__SHIFT 0
+#define VIVS_DE_STRETCH_FACTOR_HIGH_Y(x) (((x) << VIVS_DE_STRETCH_FACTOR_HIGH_Y__SHIFT) & VIVS_DE_STRETCH_FACTOR_HIGH_Y__MASK)
+
+#define VIVS_DE_DEST_ADDRESS 0x00001228
+
+#define VIVS_DE_DEST_STRIDE 0x0000122c
+#define VIVS_DE_DEST_STRIDE_STRIDE__MASK 0x0003ffff
+#define VIVS_DE_DEST_STRIDE_STRIDE__SHIFT 0
+#define VIVS_DE_DEST_STRIDE_STRIDE(x) (((x) << VIVS_DE_DEST_STRIDE_STRIDE__SHIFT) & VIVS_DE_DEST_STRIDE_STRIDE__MASK)
+
+#define VIVS_DE_DEST_ROTATION_CONFIG 0x00001230
+#define VIVS_DE_DEST_ROTATION_CONFIG_WIDTH__MASK 0x0000ffff
+#define VIVS_DE_DEST_ROTATION_CONFIG_WIDTH__SHIFT 0
+#define VIVS_DE_DEST_ROTATION_CONFIG_WIDTH(x) (((x) << VIVS_DE_DEST_ROTATION_CONFIG_WIDTH__SHIFT) & VIVS_DE_DEST_ROTATION_CONFIG_WIDTH__MASK)
+#define VIVS_DE_DEST_ROTATION_CONFIG_ROTATION__MASK 0x00010000
+#define VIVS_DE_DEST_ROTATION_CONFIG_ROTATION__SHIFT 16
+#define VIVS_DE_DEST_ROTATION_CONFIG_ROTATION_DISABLE 0x00000000
+#define VIVS_DE_DEST_ROTATION_CONFIG_ROTATION_ENABLE 0x00010000
+
+#define VIVS_DE_DEST_CONFIG 0x00001234
+#define VIVS_DE_DEST_CONFIG_FORMAT__MASK 0x0000001f
+#define VIVS_DE_DEST_CONFIG_FORMAT__SHIFT 0
+#define VIVS_DE_DEST_CONFIG_FORMAT(x) (((x) << VIVS_DE_DEST_CONFIG_FORMAT__SHIFT) & VIVS_DE_DEST_CONFIG_FORMAT__MASK)
+#define VIVS_DE_DEST_CONFIG_TILED__MASK 0x00000100
+#define VIVS_DE_DEST_CONFIG_TILED__SHIFT 8
+#define VIVS_DE_DEST_CONFIG_TILED_DISABLE 0x00000000
+#define VIVS_DE_DEST_CONFIG_TILED_ENABLE 0x00000100
+#define VIVS_DE_DEST_CONFIG_COMMAND__MASK 0x0000f000
+#define VIVS_DE_DEST_CONFIG_COMMAND__SHIFT 12
+#define VIVS_DE_DEST_CONFIG_COMMAND_CLEAR 0x00000000
+#define VIVS_DE_DEST_CONFIG_COMMAND_LINE 0x00001000
+#define VIVS_DE_DEST_CONFIG_COMMAND_BIT_BLT 0x00002000
+#define VIVS_DE_DEST_CONFIG_COMMAND_BIT_BLT_REVERSED 0x00003000
+#define VIVS_DE_DEST_CONFIG_COMMAND_STRETCH_BLT 0x00004000
+#define VIVS_DE_DEST_CONFIG_COMMAND_HOR_FILTER_BLT 0x00005000
+#define VIVS_DE_DEST_CONFIG_COMMAND_VER_FILTER_BLT 0x00006000
+#define VIVS_DE_DEST_CONFIG_COMMAND_ONE_PASS_FILTER_BLT 0x00007000
+#define VIVS_DE_DEST_CONFIG_COMMAND_MULTI_SOURCE_BLT 0x00008000
+#define VIVS_DE_DEST_CONFIG_SWIZZLE__MASK 0x00030000
+#define VIVS_DE_DEST_CONFIG_SWIZZLE__SHIFT 16
+#define VIVS_DE_DEST_CONFIG_SWIZZLE(x) (((x) << VIVS_DE_DEST_CONFIG_SWIZZLE__SHIFT) & VIVS_DE_DEST_CONFIG_SWIZZLE__MASK)
+#define VIVS_DE_DEST_CONFIG_ENDIAN_CONTROL__MASK 0x00300000
+#define VIVS_DE_DEST_CONFIG_ENDIAN_CONTROL__SHIFT 20
+#define VIVS_DE_DEST_CONFIG_ENDIAN_CONTROL(x) (((x) << VIVS_DE_DEST_CONFIG_ENDIAN_CONTROL__SHIFT) & VIVS_DE_DEST_CONFIG_ENDIAN_CONTROL__MASK)
+#define VIVS_DE_DEST_CONFIG_GDI_STRE__MASK 0x01000000
+#define VIVS_DE_DEST_CONFIG_GDI_STRE__SHIFT 24
+#define VIVS_DE_DEST_CONFIG_GDI_STRE_DISABLE 0x00000000
+#define VIVS_DE_DEST_CONFIG_GDI_STRE_ENABLE 0x01000000
+#define VIVS_DE_DEST_CONFIG_INTER_TILE_PER_FIX__MASK 0x02000000
+#define VIVS_DE_DEST_CONFIG_INTER_TILE_PER_FIX__SHIFT 25
+#define VIVS_DE_DEST_CONFIG_INTER_TILE_PER_FIX_DISABLED 0x02000000
+#define VIVS_DE_DEST_CONFIG_INTER_TILE_PER_FIX_ENABLED 0x00000000
+#define VIVS_DE_DEST_CONFIG_MINOR_TILED__MASK 0x04000000
+#define VIVS_DE_DEST_CONFIG_MINOR_TILED__SHIFT 26
+#define VIVS_DE_DEST_CONFIG_MINOR_TILED_DISABLE 0x00000000
+#define VIVS_DE_DEST_CONFIG_MINOR_TILED_ENABLE 0x04000000
+
+#define VIVS_DE_PATTERN_ADDRESS 0x00001238
+
+#define VIVS_DE_PATTERN_CONFIG 0x0000123c
+#define VIVS_DE_PATTERN_CONFIG_FORMAT__MASK 0x0000000f
+#define VIVS_DE_PATTERN_CONFIG_FORMAT__SHIFT 0
+#define VIVS_DE_PATTERN_CONFIG_FORMAT(x) (((x) << VIVS_DE_PATTERN_CONFIG_FORMAT__SHIFT) & VIVS_DE_PATTERN_CONFIG_FORMAT__MASK)
+#define VIVS_DE_PATTERN_CONFIG_TYPE__MASK 0x00000010
+#define VIVS_DE_PATTERN_CONFIG_TYPE__SHIFT 4
+#define VIVS_DE_PATTERN_CONFIG_TYPE_SOLID_COLOR 0x00000000
+#define VIVS_DE_PATTERN_CONFIG_TYPE_PATTERN 0x00000010
+#define VIVS_DE_PATTERN_CONFIG_COLOR_CONVERT__MASK 0x00000020
+#define VIVS_DE_PATTERN_CONFIG_COLOR_CONVERT__SHIFT 5
+#define VIVS_DE_PATTERN_CONFIG_COLOR_CONVERT_DISABLE 0x00000000
+#define VIVS_DE_PATTERN_CONFIG_COLOR_CONVERT_ENABLE 0x00000020
+#define VIVS_DE_PATTERN_CONFIG_INIT_TRIGGER__MASK 0x000000c0
+#define VIVS_DE_PATTERN_CONFIG_INIT_TRIGGER__SHIFT 6
+#define VIVS_DE_PATTERN_CONFIG_INIT_TRIGGER(x) (((x) << VIVS_DE_PATTERN_CONFIG_INIT_TRIGGER__SHIFT) & VIVS_DE_PATTERN_CONFIG_INIT_TRIGGER__MASK)
+#define VIVS_DE_PATTERN_CONFIG_ORIGIN_X__MASK 0x00070000
+#define VIVS_DE_PATTERN_CONFIG_ORIGIN_X__SHIFT 16
+#define VIVS_DE_PATTERN_CONFIG_ORIGIN_X(x) (((x) << VIVS_DE_PATTERN_CONFIG_ORIGIN_X__SHIFT) & VIVS_DE_PATTERN_CONFIG_ORIGIN_X__MASK)
+#define VIVS_DE_PATTERN_CONFIG_ORIGIN_Y__MASK 0x00700000
+#define VIVS_DE_PATTERN_CONFIG_ORIGIN_Y__SHIFT 20
+#define VIVS_DE_PATTERN_CONFIG_ORIGIN_Y(x) (((x) << VIVS_DE_PATTERN_CONFIG_ORIGIN_Y__SHIFT) & VIVS_DE_PATTERN_CONFIG_ORIGIN_Y__MASK)
+
+#define VIVS_DE_PATTERN_LOW 0x00001240
+
+#define VIVS_DE_PATTERN_HIGH 0x00001244
+
+#define VIVS_DE_PATTERN_MASK_LOW 0x00001248
+
+#define VIVS_DE_PATTERN_MASK_HIGH 0x0000124c
+
+#define VIVS_DE_PATTERN_BG_COLOR 0x00001250
+
+#define VIVS_DE_PATTERN_FG_COLOR 0x00001254
+
+#define VIVS_DE_ROP 0x0000125c
+#define VIVS_DE_ROP_ROP_FG__MASK 0x000000ff
+#define VIVS_DE_ROP_ROP_FG__SHIFT 0
+#define VIVS_DE_ROP_ROP_FG(x) (((x) << VIVS_DE_ROP_ROP_FG__SHIFT) & VIVS_DE_ROP_ROP_FG__MASK)
+#define VIVS_DE_ROP_ROP_BG__MASK 0x0000ff00
+#define VIVS_DE_ROP_ROP_BG__SHIFT 8
+#define VIVS_DE_ROP_ROP_BG(x) (((x) << VIVS_DE_ROP_ROP_BG__SHIFT) & VIVS_DE_ROP_ROP_BG__MASK)
+#define VIVS_DE_ROP_TYPE__MASK 0x00300000
+#define VIVS_DE_ROP_TYPE__SHIFT 20
+#define VIVS_DE_ROP_TYPE_ROP2_PATTERN 0x00000000
+#define VIVS_DE_ROP_TYPE_ROP2_SOURCE 0x00100000
+#define VIVS_DE_ROP_TYPE_ROP3 0x00200000
+#define VIVS_DE_ROP_TYPE_ROP4 0x00300000
+
+#define VIVS_DE_CLIP_TOP_LEFT 0x00001260
+#define VIVS_DE_CLIP_TOP_LEFT_X__MASK 0x00007fff
+#define VIVS_DE_CLIP_TOP_LEFT_X__SHIFT 0
+#define VIVS_DE_CLIP_TOP_LEFT_X(x) (((x) << VIVS_DE_CLIP_TOP_LEFT_X__SHIFT) & VIVS_DE_CLIP_TOP_LEFT_X__MASK)
+#define VIVS_DE_CLIP_TOP_LEFT_Y__MASK 0x7fff0000
+#define VIVS_DE_CLIP_TOP_LEFT_Y__SHIFT 16
+#define VIVS_DE_CLIP_TOP_LEFT_Y(x) (((x) << VIVS_DE_CLIP_TOP_LEFT_Y__SHIFT) & VIVS_DE_CLIP_TOP_LEFT_Y__MASK)
+
+#define VIVS_DE_CLIP_BOTTOM_RIGHT 0x00001264
+#define VIVS_DE_CLIP_BOTTOM_RIGHT_X__MASK 0x00007fff
+#define VIVS_DE_CLIP_BOTTOM_RIGHT_X__SHIFT 0
+#define VIVS_DE_CLIP_BOTTOM_RIGHT_X(x) (((x) << VIVS_DE_CLIP_BOTTOM_RIGHT_X__SHIFT) & VIVS_DE_CLIP_BOTTOM_RIGHT_X__MASK)
+#define VIVS_DE_CLIP_BOTTOM_RIGHT_Y__MASK 0x7fff0000
+#define VIVS_DE_CLIP_BOTTOM_RIGHT_Y__SHIFT 16
+#define VIVS_DE_CLIP_BOTTOM_RIGHT_Y(x) (((x) << VIVS_DE_CLIP_BOTTOM_RIGHT_Y__SHIFT) & VIVS_DE_CLIP_BOTTOM_RIGHT_Y__MASK)
+
+#define VIVS_DE_CLEAR_BYTE_MASK 0x00001268
+
+#define VIVS_DE_CONFIG 0x0000126c
+#define VIVS_DE_CONFIG_MIRROR_BLT_ENABLE__MASK 0x00000001
+#define VIVS_DE_CONFIG_MIRROR_BLT_ENABLE__SHIFT 0
+#define VIVS_DE_CONFIG_MIRROR_BLT_ENABLE_OFF 0x00000000
+#define VIVS_DE_CONFIG_MIRROR_BLT_ENABLE_ON 0x00000001
+#define VIVS_DE_CONFIG_MIRROR_BLT_MODE__MASK 0x00000030
+#define VIVS_DE_CONFIG_MIRROR_BLT_MODE__SHIFT 4
+#define VIVS_DE_CONFIG_MIRROR_BLT_MODE_NORMAL 0x00000000
+#define VIVS_DE_CONFIG_MIRROR_BLT_MODE_HMIRROR 0x00000010
+#define VIVS_DE_CONFIG_MIRROR_BLT_MODE_VMIRROR 0x00000020
+#define VIVS_DE_CONFIG_MIRROR_BLT_MODE_FULL_MIRROR 0x00000030
+#define VIVS_DE_CONFIG_SOURCE_SELECT__MASK 0x00070000
+#define VIVS_DE_CONFIG_SOURCE_SELECT__SHIFT 16
+#define VIVS_DE_CONFIG_SOURCE_SELECT(x) (((x) << VIVS_DE_CONFIG_SOURCE_SELECT__SHIFT) & VIVS_DE_CONFIG_SOURCE_SELECT__MASK)
+#define VIVS_DE_CONFIG_DESTINATION_SELECT__MASK 0x00300000
+#define VIVS_DE_CONFIG_DESTINATION_SELECT__SHIFT 20
+#define VIVS_DE_CONFIG_DESTINATION_SELECT(x) (((x) << VIVS_DE_CONFIG_DESTINATION_SELECT__SHIFT) & VIVS_DE_CONFIG_DESTINATION_SELECT__MASK)
+
+#define VIVS_DE_CLEAR_PIXEL_VALUE_LOW 0x00001270
+
+#define VIVS_DE_CLEAR_PIXEL_VALUE_HIGH 0x00001274
+
+#define VIVS_DE_SRC_ORIGIN_FRACTION 0x00001278
+#define VIVS_DE_SRC_ORIGIN_FRACTION_X__MASK 0x0000ffff
+#define VIVS_DE_SRC_ORIGIN_FRACTION_X__SHIFT 0
+#define VIVS_DE_SRC_ORIGIN_FRACTION_X(x) (((x) << VIVS_DE_SRC_ORIGIN_FRACTION_X__SHIFT) & VIVS_DE_SRC_ORIGIN_FRACTION_X__MASK)
+#define VIVS_DE_SRC_ORIGIN_FRACTION_Y__MASK 0xffff0000
+#define VIVS_DE_SRC_ORIGIN_FRACTION_Y__SHIFT 16
+#define VIVS_DE_SRC_ORIGIN_FRACTION_Y(x) (((x) << VIVS_DE_SRC_ORIGIN_FRACTION_Y__SHIFT) & VIVS_DE_SRC_ORIGIN_FRACTION_Y__MASK)
+
+#define VIVS_DE_ALPHA_CONTROL 0x0000127c
+#define VIVS_DE_ALPHA_CONTROL_ENABLE__MASK 0x00000001
+#define VIVS_DE_ALPHA_CONTROL_ENABLE__SHIFT 0
+#define VIVS_DE_ALPHA_CONTROL_ENABLE_OFF 0x00000000
+#define VIVS_DE_ALPHA_CONTROL_ENABLE_ON 0x00000001
+#define VIVS_DE_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA__MASK 0x00ff0000
+#define VIVS_DE_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA__SHIFT 16
+#define VIVS_DE_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA(x) (((x) << VIVS_DE_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA__SHIFT) & VIVS_DE_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA__MASK)
+#define VIVS_DE_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA__MASK 0xff000000
+#define VIVS_DE_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA__SHIFT 24
+#define VIVS_DE_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA(x) (((x) << VIVS_DE_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA__SHIFT) & VIVS_DE_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA__MASK)
+
+#define VIVS_DE_ALPHA_MODES 0x00001280
+#define VIVS_DE_ALPHA_MODES_SRC_ALPHA_MODE__MASK 0x00000001
+#define VIVS_DE_ALPHA_MODES_SRC_ALPHA_MODE__SHIFT 0
+#define VIVS_DE_ALPHA_MODES_SRC_ALPHA_MODE_NORMAL 0x00000000
+#define VIVS_DE_ALPHA_MODES_SRC_ALPHA_MODE_INVERSED 0x00000001
+#define VIVS_DE_ALPHA_MODES_DST_ALPHA_MODE__MASK 0x00000010
+#define VIVS_DE_ALPHA_MODES_DST_ALPHA_MODE__SHIFT 4
+#define VIVS_DE_ALPHA_MODES_DST_ALPHA_MODE_NORMAL 0x00000000
+#define VIVS_DE_ALPHA_MODES_DST_ALPHA_MODE_INVERSED 0x00000010
+#define VIVS_DE_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE__MASK 0x00000300
+#define VIVS_DE_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE__SHIFT 8
+#define VIVS_DE_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE_NORMAL 0x00000000
+#define VIVS_DE_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE_GLOBAL 0x00000100
+#define VIVS_DE_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE_SCALED 0x00000200
+#define VIVS_DE_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE__MASK 0x00003000
+#define VIVS_DE_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE__SHIFT 12
+#define VIVS_DE_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE_NORMAL 0x00000000
+#define VIVS_DE_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE_GLOBAL 0x00001000
+#define VIVS_DE_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE_SCALED 0x00002000
+#define VIVS_DE_ALPHA_MODES_PE10_SRC_COLOR_MULTIPLY__MASK 0x00010000
+#define VIVS_DE_ALPHA_MODES_PE10_SRC_COLOR_MULTIPLY__SHIFT 16
+#define VIVS_DE_ALPHA_MODES_PE10_SRC_COLOR_MULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_ALPHA_MODES_PE10_SRC_COLOR_MULTIPLY_ENABLE 0x00010000
+#define VIVS_DE_ALPHA_MODES_PE10_DST_COLOR_MULTIPLY__MASK 0x00100000
+#define VIVS_DE_ALPHA_MODES_PE10_DST_COLOR_MULTIPLY__SHIFT 20
+#define VIVS_DE_ALPHA_MODES_PE10_DST_COLOR_MULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_ALPHA_MODES_PE10_DST_COLOR_MULTIPLY_ENABLE 0x00100000
+#define VIVS_DE_ALPHA_MODES_SRC_BLENDING_MODE__MASK 0x07000000
+#define VIVS_DE_ALPHA_MODES_SRC_BLENDING_MODE__SHIFT 24
+#define VIVS_DE_ALPHA_MODES_SRC_BLENDING_MODE(x) (((x) << VIVS_DE_ALPHA_MODES_SRC_BLENDING_MODE__SHIFT) & VIVS_DE_ALPHA_MODES_SRC_BLENDING_MODE__MASK)
+#define VIVS_DE_ALPHA_MODES_SRC_ALPHA_FACTOR__MASK 0x08000000
+#define VIVS_DE_ALPHA_MODES_SRC_ALPHA_FACTOR__SHIFT 27
+#define VIVS_DE_ALPHA_MODES_SRC_ALPHA_FACTOR_DISABLE 0x00000000
+#define VIVS_DE_ALPHA_MODES_SRC_ALPHA_FACTOR_ENABLE 0x08000000
+#define VIVS_DE_ALPHA_MODES_DST_BLENDING_MODE__MASK 0x70000000
+#define VIVS_DE_ALPHA_MODES_DST_BLENDING_MODE__SHIFT 28
+#define VIVS_DE_ALPHA_MODES_DST_BLENDING_MODE(x) (((x) << VIVS_DE_ALPHA_MODES_DST_BLENDING_MODE__SHIFT) & VIVS_DE_ALPHA_MODES_DST_BLENDING_MODE__MASK)
+#define VIVS_DE_ALPHA_MODES_DST_ALPHA_FACTOR__MASK 0x80000000
+#define VIVS_DE_ALPHA_MODES_DST_ALPHA_FACTOR__SHIFT 31
+#define VIVS_DE_ALPHA_MODES_DST_ALPHA_FACTOR_DISABLE 0x00000000
+#define VIVS_DE_ALPHA_MODES_DST_ALPHA_FACTOR_ENABLE 0x80000000
+
+#define VIVS_DE_UPLANE_ADDRESS 0x00001284
+
+#define VIVS_DE_UPLANE_STRIDE 0x00001288
+#define VIVS_DE_UPLANE_STRIDE_STRIDE__MASK 0x0003ffff
+#define VIVS_DE_UPLANE_STRIDE_STRIDE__SHIFT 0
+#define VIVS_DE_UPLANE_STRIDE_STRIDE(x) (((x) << VIVS_DE_UPLANE_STRIDE_STRIDE__SHIFT) & VIVS_DE_UPLANE_STRIDE_STRIDE__MASK)
+
+#define VIVS_DE_VPLANE_ADDRESS 0x0000128c
+
+#define VIVS_DE_VPLANE_STRIDE 0x00001290
+#define VIVS_DE_VPLANE_STRIDE_STRIDE__MASK 0x0003ffff
+#define VIVS_DE_VPLANE_STRIDE_STRIDE__SHIFT 0
+#define VIVS_DE_VPLANE_STRIDE_STRIDE(x) (((x) << VIVS_DE_VPLANE_STRIDE_STRIDE__SHIFT) & VIVS_DE_VPLANE_STRIDE_STRIDE__MASK)
+
+#define VIVS_DE_VR_CONFIG 0x00001294
+#define VIVS_DE_VR_CONFIG_START__MASK 0x00000003
+#define VIVS_DE_VR_CONFIG_START__SHIFT 0
+#define VIVS_DE_VR_CONFIG_START_HORIZONTAL_BLIT 0x00000000
+#define VIVS_DE_VR_CONFIG_START_VERTICAL_BLIT 0x00000001
+#define VIVS_DE_VR_CONFIG_START_ONE_PASS_BLIT 0x00000002
+#define VIVS_DE_VR_CONFIG_START_MASK 0x00000008
+
+#define VIVS_DE_VR_SOURCE_IMAGE_LOW 0x00001298
+#define VIVS_DE_VR_SOURCE_IMAGE_LOW_LEFT__MASK 0x0000ffff
+#define VIVS_DE_VR_SOURCE_IMAGE_LOW_LEFT__SHIFT 0
+#define VIVS_DE_VR_SOURCE_IMAGE_LOW_LEFT(x) (((x) << VIVS_DE_VR_SOURCE_IMAGE_LOW_LEFT__SHIFT) & VIVS_DE_VR_SOURCE_IMAGE_LOW_LEFT__MASK)
+#define VIVS_DE_VR_SOURCE_IMAGE_LOW_TOP__MASK 0xffff0000
+#define VIVS_DE_VR_SOURCE_IMAGE_LOW_TOP__SHIFT 16
+#define VIVS_DE_VR_SOURCE_IMAGE_LOW_TOP(x) (((x) << VIVS_DE_VR_SOURCE_IMAGE_LOW_TOP__SHIFT) & VIVS_DE_VR_SOURCE_IMAGE_LOW_TOP__MASK)
+
+#define VIVS_DE_VR_SOURCE_IMAGE_HIGH 0x0000129c
+#define VIVS_DE_VR_SOURCE_IMAGE_HIGH_RIGHT__MASK 0x0000ffff
+#define VIVS_DE_VR_SOURCE_IMAGE_HIGH_RIGHT__SHIFT 0
+#define VIVS_DE_VR_SOURCE_IMAGE_HIGH_RIGHT(x) (((x) << VIVS_DE_VR_SOURCE_IMAGE_HIGH_RIGHT__SHIFT) & VIVS_DE_VR_SOURCE_IMAGE_HIGH_RIGHT__MASK)
+#define VIVS_DE_VR_SOURCE_IMAGE_HIGH_BOTTOM__MASK 0xffff0000
+#define VIVS_DE_VR_SOURCE_IMAGE_HIGH_BOTTOM__SHIFT 16
+#define VIVS_DE_VR_SOURCE_IMAGE_HIGH_BOTTOM(x) (((x) << VIVS_DE_VR_SOURCE_IMAGE_HIGH_BOTTOM__SHIFT) & VIVS_DE_VR_SOURCE_IMAGE_HIGH_BOTTOM__MASK)
+
+#define VIVS_DE_VR_SOURCE_ORIGIN_LOW 0x000012a0
+#define VIVS_DE_VR_SOURCE_ORIGIN_LOW_X__MASK 0xffffffff
+#define VIVS_DE_VR_SOURCE_ORIGIN_LOW_X__SHIFT 0
+#define VIVS_DE_VR_SOURCE_ORIGIN_LOW_X(x) (((x) << VIVS_DE_VR_SOURCE_ORIGIN_LOW_X__SHIFT) & VIVS_DE_VR_SOURCE_ORIGIN_LOW_X__MASK)
+
+#define VIVS_DE_VR_SOURCE_ORIGIN_HIGH 0x000012a4
+#define VIVS_DE_VR_SOURCE_ORIGIN_HIGH_Y__MASK 0xffffffff
+#define VIVS_DE_VR_SOURCE_ORIGIN_HIGH_Y__SHIFT 0
+#define VIVS_DE_VR_SOURCE_ORIGIN_HIGH_Y(x) (((x) << VIVS_DE_VR_SOURCE_ORIGIN_HIGH_Y__SHIFT) & VIVS_DE_VR_SOURCE_ORIGIN_HIGH_Y__MASK)
+
+#define VIVS_DE_VR_TARGET_WINDOW_LOW 0x000012a8
+#define VIVS_DE_VR_TARGET_WINDOW_LOW_LEFT__MASK 0x0000ffff
+#define VIVS_DE_VR_TARGET_WINDOW_LOW_LEFT__SHIFT 0
+#define VIVS_DE_VR_TARGET_WINDOW_LOW_LEFT(x) (((x) << VIVS_DE_VR_TARGET_WINDOW_LOW_LEFT__SHIFT) & VIVS_DE_VR_TARGET_WINDOW_LOW_LEFT__MASK)
+#define VIVS_DE_VR_TARGET_WINDOW_LOW_TOP__MASK 0xffff0000
+#define VIVS_DE_VR_TARGET_WINDOW_LOW_TOP__SHIFT 16
+#define VIVS_DE_VR_TARGET_WINDOW_LOW_TOP(x) (((x) << VIVS_DE_VR_TARGET_WINDOW_LOW_TOP__SHIFT) & VIVS_DE_VR_TARGET_WINDOW_LOW_TOP__MASK)
+
+#define VIVS_DE_VR_TARGET_WINDOW_HIGH 0x000012ac
+#define VIVS_DE_VR_TARGET_WINDOW_HIGH_RIGHT__MASK 0x0000ffff
+#define VIVS_DE_VR_TARGET_WINDOW_HIGH_RIGHT__SHIFT 0
+#define VIVS_DE_VR_TARGET_WINDOW_HIGH_RIGHT(x) (((x) << VIVS_DE_VR_TARGET_WINDOW_HIGH_RIGHT__SHIFT) & VIVS_DE_VR_TARGET_WINDOW_HIGH_RIGHT__MASK)
+#define VIVS_DE_VR_TARGET_WINDOW_HIGH_BOTTOM__MASK 0xffff0000
+#define VIVS_DE_VR_TARGET_WINDOW_HIGH_BOTTOM__SHIFT 16
+#define VIVS_DE_VR_TARGET_WINDOW_HIGH_BOTTOM(x) (((x) << VIVS_DE_VR_TARGET_WINDOW_HIGH_BOTTOM__SHIFT) & VIVS_DE_VR_TARGET_WINDOW_HIGH_BOTTOM__MASK)
+
+#define VIVS_DE_PE_CONFIG 0x000012b0
+#define VIVS_DE_PE_CONFIG_DESTINATION_FETCH__MASK 0x00000003
+#define VIVS_DE_PE_CONFIG_DESTINATION_FETCH__SHIFT 0
+#define VIVS_DE_PE_CONFIG_DESTINATION_FETCH_DISABLE 0x00000000
+#define VIVS_DE_PE_CONFIG_DESTINATION_FETCH_DEFAULT 0x00000001
+#define VIVS_DE_PE_CONFIG_DESTINATION_FETCH_ALWAYS 0x00000002
+#define VIVS_DE_PE_CONFIG_DESTINATION_FETCH_MASK 0x00000008
+
+#define VIVS_DE_DEST_ROTATION_HEIGHT 0x000012b4
+#define VIVS_DE_DEST_ROTATION_HEIGHT_HEIGHT__MASK 0x0000ffff
+#define VIVS_DE_DEST_ROTATION_HEIGHT_HEIGHT__SHIFT 0
+#define VIVS_DE_DEST_ROTATION_HEIGHT_HEIGHT(x) (((x) << VIVS_DE_DEST_ROTATION_HEIGHT_HEIGHT__SHIFT) & VIVS_DE_DEST_ROTATION_HEIGHT_HEIGHT__MASK)
+
+#define VIVS_DE_SRC_ROTATION_HEIGHT 0x000012b8
+#define VIVS_DE_SRC_ROTATION_HEIGHT_HEIGHT__MASK 0x0000ffff
+#define VIVS_DE_SRC_ROTATION_HEIGHT_HEIGHT__SHIFT 0
+#define VIVS_DE_SRC_ROTATION_HEIGHT_HEIGHT(x) (((x) << VIVS_DE_SRC_ROTATION_HEIGHT_HEIGHT__SHIFT) & VIVS_DE_SRC_ROTATION_HEIGHT_HEIGHT__MASK)
+
+#define VIVS_DE_ROT_ANGLE 0x000012bc
+#define VIVS_DE_ROT_ANGLE_SRC__MASK 0x00000007
+#define VIVS_DE_ROT_ANGLE_SRC__SHIFT 0
+#define VIVS_DE_ROT_ANGLE_SRC(x) (((x) << VIVS_DE_ROT_ANGLE_SRC__SHIFT) & VIVS_DE_ROT_ANGLE_SRC__MASK)
+#define VIVS_DE_ROT_ANGLE_DST__MASK 0x00000038
+#define VIVS_DE_ROT_ANGLE_DST__SHIFT 3
+#define VIVS_DE_ROT_ANGLE_DST(x) (((x) << VIVS_DE_ROT_ANGLE_DST__SHIFT) & VIVS_DE_ROT_ANGLE_DST__MASK)
+#define VIVS_DE_ROT_ANGLE_SRC_MASK 0x00000100
+#define VIVS_DE_ROT_ANGLE_DST_MASK 0x00000200
+#define VIVS_DE_ROT_ANGLE_SRC_MIRROR__MASK 0x00003000
+#define VIVS_DE_ROT_ANGLE_SRC_MIRROR__SHIFT 12
+#define VIVS_DE_ROT_ANGLE_SRC_MIRROR(x) (((x) << VIVS_DE_ROT_ANGLE_SRC_MIRROR__SHIFT) & VIVS_DE_ROT_ANGLE_SRC_MIRROR__MASK)
+#define VIVS_DE_ROT_ANGLE_SRC_MIRROR_MASK 0x00008000
+#define VIVS_DE_ROT_ANGLE_DST_MIRROR__MASK 0x00030000
+#define VIVS_DE_ROT_ANGLE_DST_MIRROR__SHIFT 16
+#define VIVS_DE_ROT_ANGLE_DST_MIRROR(x) (((x) << VIVS_DE_ROT_ANGLE_DST_MIRROR__SHIFT) & VIVS_DE_ROT_ANGLE_DST_MIRROR__MASK)
+#define VIVS_DE_ROT_ANGLE_DST_MIRROR_MASK 0x00080000
+
+#define VIVS_DE_CLEAR_PIXEL_VALUE32 0x000012c0
+
+#define VIVS_DE_DEST_COLOR_KEY 0x000012c4
+
+#define VIVS_DE_GLOBAL_SRC_COLOR 0x000012c8
+
+#define VIVS_DE_GLOBAL_DEST_COLOR 0x000012cc
+
+#define VIVS_DE_COLOR_MULTIPLY_MODES 0x000012d0
+#define VIVS_DE_COLOR_MULTIPLY_MODES_SRC_PREMULTIPLY__MASK 0x00000001
+#define VIVS_DE_COLOR_MULTIPLY_MODES_SRC_PREMULTIPLY__SHIFT 0
+#define VIVS_DE_COLOR_MULTIPLY_MODES_SRC_PREMULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_COLOR_MULTIPLY_MODES_SRC_PREMULTIPLY_ENABLE 0x00000001
+#define VIVS_DE_COLOR_MULTIPLY_MODES_DST_PREMULTIPLY__MASK 0x00000010
+#define VIVS_DE_COLOR_MULTIPLY_MODES_DST_PREMULTIPLY__SHIFT 4
+#define VIVS_DE_COLOR_MULTIPLY_MODES_DST_PREMULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_COLOR_MULTIPLY_MODES_DST_PREMULTIPLY_ENABLE 0x00000010
+#define VIVS_DE_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY__MASK 0x00000300
+#define VIVS_DE_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY__SHIFT 8
+#define VIVS_DE_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY_ALPHA 0x00000100
+#define VIVS_DE_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY_COLOR 0x00000200
+#define VIVS_DE_COLOR_MULTIPLY_MODES_DST_DEMULTIPLY__MASK 0x00100000
+#define VIVS_DE_COLOR_MULTIPLY_MODES_DST_DEMULTIPLY__SHIFT 20
+#define VIVS_DE_COLOR_MULTIPLY_MODES_DST_DEMULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_COLOR_MULTIPLY_MODES_DST_DEMULTIPLY_ENABLE 0x00100000
+
+#define VIVS_DE_PE_TRANSPARENCY 0x000012d4
+#define VIVS_DE_PE_TRANSPARENCY_SOURCE__MASK 0x00000003
+#define VIVS_DE_PE_TRANSPARENCY_SOURCE__SHIFT 0
+#define VIVS_DE_PE_TRANSPARENCY_SOURCE_OPAQUE 0x00000000
+#define VIVS_DE_PE_TRANSPARENCY_SOURCE_MASK 0x00000001
+#define VIVS_DE_PE_TRANSPARENCY_SOURCE_KEY 0x00000002
+#define VIVS_DE_PE_TRANSPARENCY_PATTERN__MASK 0x00000030
+#define VIVS_DE_PE_TRANSPARENCY_PATTERN__SHIFT 4
+#define VIVS_DE_PE_TRANSPARENCY_PATTERN_OPAQUE 0x00000000
+#define VIVS_DE_PE_TRANSPARENCY_PATTERN_MASK 0x00000010
+#define VIVS_DE_PE_TRANSPARENCY_PATTERN_KEY 0x00000020
+#define VIVS_DE_PE_TRANSPARENCY_DESTINATION__MASK 0x00000300
+#define VIVS_DE_PE_TRANSPARENCY_DESTINATION__SHIFT 8
+#define VIVS_DE_PE_TRANSPARENCY_DESTINATION_OPAQUE 0x00000000
+#define VIVS_DE_PE_TRANSPARENCY_DESTINATION_MASK 0x00000100
+#define VIVS_DE_PE_TRANSPARENCY_DESTINATION_KEY 0x00000200
+#define VIVS_DE_PE_TRANSPARENCY_TRANSPARENCY_MASK 0x00001000
+#define VIVS_DE_PE_TRANSPARENCY_USE_SRC_OVERRIDE__MASK 0x00030000
+#define VIVS_DE_PE_TRANSPARENCY_USE_SRC_OVERRIDE__SHIFT 16
+#define VIVS_DE_PE_TRANSPARENCY_USE_SRC_OVERRIDE_DEFAULT 0x00000000
+#define VIVS_DE_PE_TRANSPARENCY_USE_SRC_OVERRIDE_USE_ENABLE 0x00010000
+#define VIVS_DE_PE_TRANSPARENCY_USE_SRC_OVERRIDE_USE_DISABLE 0x00020000
+#define VIVS_DE_PE_TRANSPARENCY_USE_PAT_OVERRIDE__MASK 0x00300000
+#define VIVS_DE_PE_TRANSPARENCY_USE_PAT_OVERRIDE__SHIFT 20
+#define VIVS_DE_PE_TRANSPARENCY_USE_PAT_OVERRIDE_DEFAULT 0x00000000
+#define VIVS_DE_PE_TRANSPARENCY_USE_PAT_OVERRIDE_USE_ENABLE 0x00100000
+#define VIVS_DE_PE_TRANSPARENCY_USE_PAT_OVERRIDE_USE_DISABLE 0x00200000
+#define VIVS_DE_PE_TRANSPARENCY_USE_DST_OVERRIDE__MASK 0x03000000
+#define VIVS_DE_PE_TRANSPARENCY_USE_DST_OVERRIDE__SHIFT 24
+#define VIVS_DE_PE_TRANSPARENCY_USE_DST_OVERRIDE_DEFAULT 0x00000000
+#define VIVS_DE_PE_TRANSPARENCY_USE_DST_OVERRIDE_USE_ENABLE 0x01000000
+#define VIVS_DE_PE_TRANSPARENCY_USE_DST_OVERRIDE_USE_DISABLE 0x02000000
+#define VIVS_DE_PE_TRANSPARENCY_RESOURCE_OVERRIDE_MASK 0x10000000
+#define VIVS_DE_PE_TRANSPARENCY_DFB_COLOR_KEY__MASK 0x20000000
+#define VIVS_DE_PE_TRANSPARENCY_DFB_COLOR_KEY__SHIFT 29
+#define VIVS_DE_PE_TRANSPARENCY_DFB_COLOR_KEY_DISABLE 0x00000000
+#define VIVS_DE_PE_TRANSPARENCY_DFB_COLOR_KEY_ENABLE 0x20000000
+#define VIVS_DE_PE_TRANSPARENCY_DFB_COLOR_KEY_MASK 0x80000000
+
+#define VIVS_DE_PE_CONTROL 0x000012d8
+#define VIVS_DE_PE_CONTROL_YUV__MASK 0x00000001
+#define VIVS_DE_PE_CONTROL_YUV__SHIFT 0
+#define VIVS_DE_PE_CONTROL_YUV_601 0x00000000
+#define VIVS_DE_PE_CONTROL_YUV_709 0x00000001
+#define VIVS_DE_PE_CONTROL_YUV_MASK 0x00000008
+#define VIVS_DE_PE_CONTROL_UV_SWIZZLE__MASK 0x00000010
+#define VIVS_DE_PE_CONTROL_UV_SWIZZLE__SHIFT 4
+#define VIVS_DE_PE_CONTROL_UV_SWIZZLE_UV 0x00000000
+#define VIVS_DE_PE_CONTROL_UV_SWIZZLE_VU 0x00000010
+#define VIVS_DE_PE_CONTROL_UV_SWIZZLE_MASK 0x00000080
+#define VIVS_DE_PE_CONTROL_YUVRGB__MASK 0x00000100
+#define VIVS_DE_PE_CONTROL_YUVRGB__SHIFT 8
+#define VIVS_DE_PE_CONTROL_YUVRGB_DISABLE 0x00000000
+#define VIVS_DE_PE_CONTROL_YUVRGB_ENABLE 0x00000100
+#define VIVS_DE_PE_CONTROL_YUVRGB_MASK 0x00000800
+
+#define VIVS_DE_SRC_COLOR_KEY_HIGH 0x000012dc
+
+#define VIVS_DE_DEST_COLOR_KEY_HIGH 0x000012e0
+
+#define VIVS_DE_VR_CONFIG_EX 0x000012e4
+#define VIVS_DE_VR_CONFIG_EX_VERTICAL_LINE_WIDTH__MASK 0x00000003
+#define VIVS_DE_VR_CONFIG_EX_VERTICAL_LINE_WIDTH__SHIFT 0
+#define VIVS_DE_VR_CONFIG_EX_VERTICAL_LINE_WIDTH_AUTO 0x00000000
+#define VIVS_DE_VR_CONFIG_EX_VERTICAL_LINE_WIDTH_PIXELS16 0x00000001
+#define VIVS_DE_VR_CONFIG_EX_VERTICAL_LINE_WIDTH_PIXELS32 0x00000002
+#define VIVS_DE_VR_CONFIG_EX_VERTICAL_LINE_WIDTH_MASK 0x00000008
+#define VIVS_DE_VR_CONFIG_EX_FILTER_TAP__MASK 0x000000f0
+#define VIVS_DE_VR_CONFIG_EX_FILTER_TAP__SHIFT 4
+#define VIVS_DE_VR_CONFIG_EX_FILTER_TAP(x) (((x) << VIVS_DE_VR_CONFIG_EX_FILTER_TAP__SHIFT) & VIVS_DE_VR_CONFIG_EX_FILTER_TAP__MASK)
+#define VIVS_DE_VR_CONFIG_EX_FILTER_TAP_MASK 0x00000100
+
+#define VIVS_DE_PE_DITHER_LOW 0x000012e8
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X0_Y0__MASK 0x0000000f
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X0_Y0__SHIFT 0
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X0_Y0(x) (((x) << VIVS_DE_PE_DITHER_LOW_PIXEL_X0_Y0__SHIFT) & VIVS_DE_PE_DITHER_LOW_PIXEL_X0_Y0__MASK)
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X1_Y0__MASK 0x000000f0
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X1_Y0__SHIFT 4
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X1_Y0(x) (((x) << VIVS_DE_PE_DITHER_LOW_PIXEL_X1_Y0__SHIFT) & VIVS_DE_PE_DITHER_LOW_PIXEL_X1_Y0__MASK)
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X2_Y0__MASK 0x00000f00
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X2_Y0__SHIFT 8
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X2_Y0(x) (((x) << VIVS_DE_PE_DITHER_LOW_PIXEL_X2_Y0__SHIFT) & VIVS_DE_PE_DITHER_LOW_PIXEL_X2_Y0__MASK)
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X3_Y0__MASK 0x0000f000
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X3_Y0__SHIFT 12
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X3_Y0(x) (((x) << VIVS_DE_PE_DITHER_LOW_PIXEL_X3_Y0__SHIFT) & VIVS_DE_PE_DITHER_LOW_PIXEL_X3_Y0__MASK)
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X0_Y1__MASK 0x000f0000
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X0_Y1__SHIFT 16
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X0_Y1(x) (((x) << VIVS_DE_PE_DITHER_LOW_PIXEL_X0_Y1__SHIFT) & VIVS_DE_PE_DITHER_LOW_PIXEL_X0_Y1__MASK)
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X1_Y1__MASK 0x00f00000
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X1_Y1__SHIFT 20
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X1_Y1(x) (((x) << VIVS_DE_PE_DITHER_LOW_PIXEL_X1_Y1__SHIFT) & VIVS_DE_PE_DITHER_LOW_PIXEL_X1_Y1__MASK)
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X2_Y1__MASK 0x0f000000
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X2_Y1__SHIFT 24
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X2_Y1(x) (((x) << VIVS_DE_PE_DITHER_LOW_PIXEL_X2_Y1__SHIFT) & VIVS_DE_PE_DITHER_LOW_PIXEL_X2_Y1__MASK)
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X3_Y1__MASK 0xf0000000
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X3_Y1__SHIFT 28
+#define VIVS_DE_PE_DITHER_LOW_PIXEL_X3_Y1(x) (((x) << VIVS_DE_PE_DITHER_LOW_PIXEL_X3_Y1__SHIFT) & VIVS_DE_PE_DITHER_LOW_PIXEL_X3_Y1__MASK)
+
+#define VIVS_DE_PE_DITHER_HIGH 0x000012ec
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X0_Y2__MASK 0x0000000f
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X0_Y2__SHIFT 0
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X0_Y2(x) (((x) << VIVS_DE_PE_DITHER_HIGH_PIXEL_X0_Y2__SHIFT) & VIVS_DE_PE_DITHER_HIGH_PIXEL_X0_Y2__MASK)
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X1_Y2__MASK 0x000000f0
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X1_Y2__SHIFT 4
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X1_Y2(x) (((x) << VIVS_DE_PE_DITHER_HIGH_PIXEL_X1_Y2__SHIFT) & VIVS_DE_PE_DITHER_HIGH_PIXEL_X1_Y2__MASK)
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X2_Y2__MASK 0x00000f00
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X2_Y2__SHIFT 8
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X2_Y2(x) (((x) << VIVS_DE_PE_DITHER_HIGH_PIXEL_X2_Y2__SHIFT) & VIVS_DE_PE_DITHER_HIGH_PIXEL_X2_Y2__MASK)
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X3_Y2__MASK 0x0000f000
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X3_Y2__SHIFT 12
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X3_Y2(x) (((x) << VIVS_DE_PE_DITHER_HIGH_PIXEL_X3_Y2__SHIFT) & VIVS_DE_PE_DITHER_HIGH_PIXEL_X3_Y2__MASK)
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X0_Y3__MASK 0x000f0000
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X0_Y3__SHIFT 16
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X0_Y3(x) (((x) << VIVS_DE_PE_DITHER_HIGH_PIXEL_X0_Y3__SHIFT) & VIVS_DE_PE_DITHER_HIGH_PIXEL_X0_Y3__MASK)
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X1_Y3__MASK 0x00f00000
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X1_Y3__SHIFT 20
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X1_Y3(x) (((x) << VIVS_DE_PE_DITHER_HIGH_PIXEL_X1_Y3__SHIFT) & VIVS_DE_PE_DITHER_HIGH_PIXEL_X1_Y3__MASK)
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X2_Y3__MASK 0x0f000000
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X2_Y3__SHIFT 24
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X2_Y3(x) (((x) << VIVS_DE_PE_DITHER_HIGH_PIXEL_X2_Y3__SHIFT) & VIVS_DE_PE_DITHER_HIGH_PIXEL_X2_Y3__MASK)
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X3_Y3__MASK 0xf0000000
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X3_Y3__SHIFT 28
+#define VIVS_DE_PE_DITHER_HIGH_PIXEL_X3_Y3(x) (((x) << VIVS_DE_PE_DITHER_HIGH_PIXEL_X3_Y3__SHIFT) & VIVS_DE_PE_DITHER_HIGH_PIXEL_X3_Y3__MASK)
+
+#define VIVS_DE_BW_CONFIG 0x000012f0
+#define VIVS_DE_BW_CONFIG_BLOCK_CONFIG__MASK 0x00000001
+#define VIVS_DE_BW_CONFIG_BLOCK_CONFIG__SHIFT 0
+#define VIVS_DE_BW_CONFIG_BLOCK_CONFIG_AUTO 0x00000000
+#define VIVS_DE_BW_CONFIG_BLOCK_CONFIG_CUSTOMIZE 0x00000001
+#define VIVS_DE_BW_CONFIG_BLOCK_CONFIG_MASK 0x00000008
+#define VIVS_DE_BW_CONFIG_BLOCK_WALK_DIRECTION__MASK 0x00000010
+#define VIVS_DE_BW_CONFIG_BLOCK_WALK_DIRECTION__SHIFT 4
+#define VIVS_DE_BW_CONFIG_BLOCK_WALK_DIRECTION_RIGHT_BOTTOM 0x00000000
+#define VIVS_DE_BW_CONFIG_BLOCK_WALK_DIRECTION_BOTTOM_RIGHT 0x00000010
+#define VIVS_DE_BW_CONFIG_BLOCK_WALK_DIRECTION_MASK 0x00000080
+#define VIVS_DE_BW_CONFIG_TILE_WALK_DIRECTION__MASK 0x00000100
+#define VIVS_DE_BW_CONFIG_TILE_WALK_DIRECTION__SHIFT 8
+#define VIVS_DE_BW_CONFIG_TILE_WALK_DIRECTION_RIGHT_BOTTOM 0x00000000
+#define VIVS_DE_BW_CONFIG_TILE_WALK_DIRECTION_BOTTOM_RIGHT 0x00000100
+#define VIVS_DE_BW_CONFIG_TILE_WALK_DIRECTION_MASK 0x00000800
+#define VIVS_DE_BW_CONFIG_PIXEL_WALK_DIRECTION__MASK 0x00001000
+#define VIVS_DE_BW_CONFIG_PIXEL_WALK_DIRECTION__SHIFT 12
+#define VIVS_DE_BW_CONFIG_PIXEL_WALK_DIRECTION_RIGHT_BOTTOM 0x00000000
+#define VIVS_DE_BW_CONFIG_PIXEL_WALK_DIRECTION_BOTTOM_RIGHT 0x00001000
+#define VIVS_DE_BW_CONFIG_PIXEL_WALK_DIRECTION_MASK 0x00008000
+
+#define VIVS_DE_BW_BLOCK_SIZE 0x000012f4
+#define VIVS_DE_BW_BLOCK_SIZE_WIDTH__MASK 0x0000ffff
+#define VIVS_DE_BW_BLOCK_SIZE_WIDTH__SHIFT 0
+#define VIVS_DE_BW_BLOCK_SIZE_WIDTH(x) (((x) << VIVS_DE_BW_BLOCK_SIZE_WIDTH__SHIFT) & VIVS_DE_BW_BLOCK_SIZE_WIDTH__MASK)
+#define VIVS_DE_BW_BLOCK_SIZE_HEIGHT__MASK 0xffff0000
+#define VIVS_DE_BW_BLOCK_SIZE_HEIGHT__SHIFT 16
+#define VIVS_DE_BW_BLOCK_SIZE_HEIGHT(x) (((x) << VIVS_DE_BW_BLOCK_SIZE_HEIGHT__SHIFT) & VIVS_DE_BW_BLOCK_SIZE_HEIGHT__MASK)
+
+#define VIVS_DE_BW_TILE_SIZE 0x000012f8
+#define VIVS_DE_BW_TILE_SIZE_WIDTH__MASK 0x0000ffff
+#define VIVS_DE_BW_TILE_SIZE_WIDTH__SHIFT 0
+#define VIVS_DE_BW_TILE_SIZE_WIDTH(x) (((x) << VIVS_DE_BW_TILE_SIZE_WIDTH__SHIFT) & VIVS_DE_BW_TILE_SIZE_WIDTH__MASK)
+#define VIVS_DE_BW_TILE_SIZE_HEIGHT__MASK 0xffff0000
+#define VIVS_DE_BW_TILE_SIZE_HEIGHT__SHIFT 16
+#define VIVS_DE_BW_TILE_SIZE_HEIGHT(x) (((x) << VIVS_DE_BW_TILE_SIZE_HEIGHT__SHIFT) & VIVS_DE_BW_TILE_SIZE_HEIGHT__MASK)
+
+#define VIVS_DE_BW_BLOCK_MASK 0x000012fc
+#define VIVS_DE_BW_BLOCK_MASK_HORIZONTAL__MASK 0x0000ffff
+#define VIVS_DE_BW_BLOCK_MASK_HORIZONTAL__SHIFT 0
+#define VIVS_DE_BW_BLOCK_MASK_HORIZONTAL(x) (((x) << VIVS_DE_BW_BLOCK_MASK_HORIZONTAL__SHIFT) & VIVS_DE_BW_BLOCK_MASK_HORIZONTAL__MASK)
+#define VIVS_DE_BW_BLOCK_MASK_VERTICAL__MASK 0xffff0000
+#define VIVS_DE_BW_BLOCK_MASK_VERTICAL__SHIFT 16
+#define VIVS_DE_BW_BLOCK_MASK_VERTICAL(x) (((x) << VIVS_DE_BW_BLOCK_MASK_VERTICAL__SHIFT) & VIVS_DE_BW_BLOCK_MASK_VERTICAL__MASK)
+
+#define VIVS_DE_SRC_EX_CONFIG 0x00001300
+#define VIVS_DE_SRC_EX_CONFIG_MULTI_TILED__MASK 0x00000001
+#define VIVS_DE_SRC_EX_CONFIG_MULTI_TILED__SHIFT 0
+#define VIVS_DE_SRC_EX_CONFIG_MULTI_TILED_DISABLE 0x00000000
+#define VIVS_DE_SRC_EX_CONFIG_MULTI_TILED_ENABLE 0x00000001
+#define VIVS_DE_SRC_EX_CONFIG_SUPER_TILED__MASK 0x00000008
+#define VIVS_DE_SRC_EX_CONFIG_SUPER_TILED__SHIFT 3
+#define VIVS_DE_SRC_EX_CONFIG_SUPER_TILED_DISABLE 0x00000000
+#define VIVS_DE_SRC_EX_CONFIG_SUPER_TILED_ENABLE 0x00000008
+#define VIVS_DE_SRC_EX_CONFIG_MINOR_TILED__MASK 0x00000100
+#define VIVS_DE_SRC_EX_CONFIG_MINOR_TILED__SHIFT 8
+#define VIVS_DE_SRC_EX_CONFIG_MINOR_TILED_DISABLE 0x00000000
+#define VIVS_DE_SRC_EX_CONFIG_MINOR_TILED_ENABLE 0x00000100
+
+#define VIVS_DE_SRC_EX_ADDRESS 0x00001304
+
+#define VIVS_DE_DE_MULTI_SOURCE 0x00001308
+#define VIVS_DE_DE_MULTI_SOURCE_MAX_SOURCE__MASK 0x00000007
+#define VIVS_DE_DE_MULTI_SOURCE_MAX_SOURCE__SHIFT 0
+#define VIVS_DE_DE_MULTI_SOURCE_MAX_SOURCE(x) (((x) << VIVS_DE_DE_MULTI_SOURCE_MAX_SOURCE__SHIFT) & VIVS_DE_DE_MULTI_SOURCE_MAX_SOURCE__MASK)
+#define VIVS_DE_DE_MULTI_SOURCE_HORIZONTAL_BLOCK__MASK 0x00000700
+#define VIVS_DE_DE_MULTI_SOURCE_HORIZONTAL_BLOCK__SHIFT 8
+#define VIVS_DE_DE_MULTI_SOURCE_HORIZONTAL_BLOCK_PIXEL16 0x00000000
+#define VIVS_DE_DE_MULTI_SOURCE_HORIZONTAL_BLOCK_PIXEL32 0x00000100
+#define VIVS_DE_DE_MULTI_SOURCE_HORIZONTAL_BLOCK_PIXEL64 0x00000200
+#define VIVS_DE_DE_MULTI_SOURCE_HORIZONTAL_BLOCK_PIXEL128 0x00000300
+#define VIVS_DE_DE_MULTI_SOURCE_HORIZONTAL_BLOCK_PIXEL256 0x00000400
+#define VIVS_DE_DE_MULTI_SOURCE_HORIZONTAL_BLOCK_PIXEL512 0x00000500
+#define VIVS_DE_DE_MULTI_SOURCE_VERTICAL_BLOCK__MASK 0x00070000
+#define VIVS_DE_DE_MULTI_SOURCE_VERTICAL_BLOCK__SHIFT 16
+#define VIVS_DE_DE_MULTI_SOURCE_VERTICAL_BLOCK_LINE1 0x00000000
+#define VIVS_DE_DE_MULTI_SOURCE_VERTICAL_BLOCK_LINE2 0x00010000
+#define VIVS_DE_DE_MULTI_SOURCE_VERTICAL_BLOCK_LINE4 0x00020000
+#define VIVS_DE_DE_MULTI_SOURCE_VERTICAL_BLOCK_LINE8 0x00030000
+#define VIVS_DE_DE_MULTI_SOURCE_VERTICAL_BLOCK_LINE16 0x00040000
+#define VIVS_DE_DE_MULTI_SOURCE_VERTICAL_BLOCK_LINE32 0x00050000
+#define VIVS_DE_DE_MULTI_SOURCE_VERTICAL_BLOCK_LINE64 0x00060000
+#define VIVS_DE_DE_MULTI_SOURCE_VERTICAL_BLOCK_LINE128 0x00070000
+
+#define VIVS_DE_DEYUV_CONVERSION 0x0000130c
+#define VIVS_DE_DEYUV_CONVERSION_ENABLE__MASK 0x00000003
+#define VIVS_DE_DEYUV_CONVERSION_ENABLE__SHIFT 0
+#define VIVS_DE_DEYUV_CONVERSION_ENABLE_OFF 0x00000000
+#define VIVS_DE_DEYUV_CONVERSION_ENABLE_PLANE1 0x00000001
+#define VIVS_DE_DEYUV_CONVERSION_ENABLE_PLANE2 0x00000002
+#define VIVS_DE_DEYUV_CONVERSION_ENABLE_PLANE3 0x00000003
+#define VIVS_DE_DEYUV_CONVERSION_PLANE1_COUNT__MASK 0x0000000c
+#define VIVS_DE_DEYUV_CONVERSION_PLANE1_COUNT__SHIFT 2
+#define VIVS_DE_DEYUV_CONVERSION_PLANE1_COUNT(x) (((x) << VIVS_DE_DEYUV_CONVERSION_PLANE1_COUNT__SHIFT) & VIVS_DE_DEYUV_CONVERSION_PLANE1_COUNT__MASK)
+#define VIVS_DE_DEYUV_CONVERSION_PLANE2_COUNT__MASK 0x00000030
+#define VIVS_DE_DEYUV_CONVERSION_PLANE2_COUNT__SHIFT 4
+#define VIVS_DE_DEYUV_CONVERSION_PLANE2_COUNT(x) (((x) << VIVS_DE_DEYUV_CONVERSION_PLANE2_COUNT__SHIFT) & VIVS_DE_DEYUV_CONVERSION_PLANE2_COUNT__MASK)
+#define VIVS_DE_DEYUV_CONVERSION_PLANE3_COUNT__MASK 0x000000c0
+#define VIVS_DE_DEYUV_CONVERSION_PLANE3_COUNT__SHIFT 6
+#define VIVS_DE_DEYUV_CONVERSION_PLANE3_COUNT(x) (((x) << VIVS_DE_DEYUV_CONVERSION_PLANE3_COUNT__SHIFT) & VIVS_DE_DEYUV_CONVERSION_PLANE3_COUNT__MASK)
+#define VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_B__MASK 0x00000300
+#define VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_B__SHIFT 8
+#define VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_B(x) (((x) << VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_B__SHIFT) & VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_B__MASK)
+#define VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_G__MASK 0x00000c00
+#define VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_G__SHIFT 10
+#define VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_G(x) (((x) << VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_G__SHIFT) & VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_G__MASK)
+#define VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_R__MASK 0x00003000
+#define VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_R__SHIFT 12
+#define VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_R(x) (((x) << VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_R__SHIFT) & VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_R__MASK)
+#define VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_A__MASK 0x0000c000
+#define VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_A__SHIFT 14
+#define VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_A(x) (((x) << VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_A__SHIFT) & VIVS_DE_DEYUV_CONVERSION_PLANE1_SWIZZLE_A__MASK)
+#define VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_B__MASK 0x00030000
+#define VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_B__SHIFT 16
+#define VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_B(x) (((x) << VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_B__SHIFT) & VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_B__MASK)
+#define VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_G__MASK 0x000c0000
+#define VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_G__SHIFT 18
+#define VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_G(x) (((x) << VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_G__SHIFT) & VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_G__MASK)
+#define VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_R__MASK 0x00300000
+#define VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_R__SHIFT 20
+#define VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_R(x) (((x) << VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_R__SHIFT) & VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_R__MASK)
+#define VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_A__MASK 0x00c00000
+#define VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_A__SHIFT 22
+#define VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_A(x) (((x) << VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_A__SHIFT) & VIVS_DE_DEYUV_CONVERSION_PLANE2_SWIZZLE_A__MASK)
+#define VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_B__MASK 0x03000000
+#define VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_B__SHIFT 24
+#define VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_B(x) (((x) << VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_B__SHIFT) & VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_B__MASK)
+#define VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_G__MASK 0x0c000000
+#define VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_G__SHIFT 26
+#define VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_G(x) (((x) << VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_G__SHIFT) & VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_G__MASK)
+#define VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_R__MASK 0x30000000
+#define VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_R__SHIFT 28
+#define VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_R(x) (((x) << VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_R__SHIFT) & VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_R__MASK)
+#define VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_A__MASK 0xc0000000
+#define VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_A__SHIFT 30
+#define VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_A(x) (((x) << VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_A__SHIFT) & VIVS_DE_DEYUV_CONVERSION_PLANE3_SWIZZLE_A__MASK)
+
+#define VIVS_DE_DE_PLANE2_ADDRESS 0x00001310
+
+#define VIVS_DE_DE_PLANE2_STRIDE 0x00001314
+#define VIVS_DE_DE_PLANE2_STRIDE_STRIDE__MASK 0x0003ffff
+#define VIVS_DE_DE_PLANE2_STRIDE_STRIDE__SHIFT 0
+#define VIVS_DE_DE_PLANE2_STRIDE_STRIDE(x) (((x) << VIVS_DE_DE_PLANE2_STRIDE_STRIDE__SHIFT) & VIVS_DE_DE_PLANE2_STRIDE_STRIDE__MASK)
+
+#define VIVS_DE_DE_PLANE3_ADDRESS 0x00001318
+
+#define VIVS_DE_DE_PLANE3_STRIDE 0x0000131c
+#define VIVS_DE_DE_PLANE3_STRIDE_STRIDE__MASK 0x0003ffff
+#define VIVS_DE_DE_PLANE3_STRIDE_STRIDE__SHIFT 0
+#define VIVS_DE_DE_PLANE3_STRIDE_STRIDE(x) (((x) << VIVS_DE_DE_PLANE3_STRIDE_STRIDE__SHIFT) & VIVS_DE_DE_PLANE3_STRIDE_STRIDE__MASK)
+
+#define VIVS_DE_DE_STALL_DE 0x00001320
+#define VIVS_DE_DE_STALL_DE_ENABLE__MASK 0x00000001
+#define VIVS_DE_DE_STALL_DE_ENABLE__SHIFT 0
+#define VIVS_DE_DE_STALL_DE_ENABLE_DISABLE 0x00000000
+#define VIVS_DE_DE_STALL_DE_ENABLE_ENABLE 0x00000001
+
+#define VIVS_DE_FILTER_KERNEL(i0) (0x00001800 + 0x4*(i0))
+#define VIVS_DE_FILTER_KERNEL__ESIZE 0x00000004
+#define VIVS_DE_FILTER_KERNEL__LEN 0x00000080
+#define VIVS_DE_FILTER_KERNEL_COEFFICIENT0__MASK 0x0000ffff
+#define VIVS_DE_FILTER_KERNEL_COEFFICIENT0__SHIFT 0
+#define VIVS_DE_FILTER_KERNEL_COEFFICIENT0(x) (((x) << VIVS_DE_FILTER_KERNEL_COEFFICIENT0__SHIFT) & VIVS_DE_FILTER_KERNEL_COEFFICIENT0__MASK)
+#define VIVS_DE_FILTER_KERNEL_COEFFICIENT1__MASK 0xffff0000
+#define VIVS_DE_FILTER_KERNEL_COEFFICIENT1__SHIFT 16
+#define VIVS_DE_FILTER_KERNEL_COEFFICIENT1(x) (((x) << VIVS_DE_FILTER_KERNEL_COEFFICIENT1__SHIFT) & VIVS_DE_FILTER_KERNEL_COEFFICIENT1__MASK)
+
+#define VIVS_DE_INDEX_COLOR_TABLE(i0) (0x00001c00 + 0x4*(i0))
+#define VIVS_DE_INDEX_COLOR_TABLE__ESIZE 0x00000004
+#define VIVS_DE_INDEX_COLOR_TABLE__LEN 0x00000100
+
+#define VIVS_DE_HORI_FILTER_KERNEL(i0) (0x00002800 + 0x4*(i0))
+#define VIVS_DE_HORI_FILTER_KERNEL__ESIZE 0x00000004
+#define VIVS_DE_HORI_FILTER_KERNEL__LEN 0x00000080
+#define VIVS_DE_HORI_FILTER_KERNEL_COEFFICIENT0__MASK 0x0000ffff
+#define VIVS_DE_HORI_FILTER_KERNEL_COEFFICIENT0__SHIFT 0
+#define VIVS_DE_HORI_FILTER_KERNEL_COEFFICIENT0(x) (((x) << VIVS_DE_HORI_FILTER_KERNEL_COEFFICIENT0__SHIFT) & VIVS_DE_HORI_FILTER_KERNEL_COEFFICIENT0__MASK)
+#define VIVS_DE_HORI_FILTER_KERNEL_COEFFICIENT1__MASK 0xffff0000
+#define VIVS_DE_HORI_FILTER_KERNEL_COEFFICIENT1__SHIFT 16
+#define VIVS_DE_HORI_FILTER_KERNEL_COEFFICIENT1(x) (((x) << VIVS_DE_HORI_FILTER_KERNEL_COEFFICIENT1__SHIFT) & VIVS_DE_HORI_FILTER_KERNEL_COEFFICIENT1__MASK)
+
+#define VIVS_DE_VERTI_FILTER_KERNEL(i0) (0x00002a00 + 0x4*(i0))
+#define VIVS_DE_VERTI_FILTER_KERNEL__ESIZE 0x00000004
+#define VIVS_DE_VERTI_FILTER_KERNEL__LEN 0x00000080
+#define VIVS_DE_VERTI_FILTER_KERNEL_COEFFICIENT0__MASK 0x0000ffff
+#define VIVS_DE_VERTI_FILTER_KERNEL_COEFFICIENT0__SHIFT 0
+#define VIVS_DE_VERTI_FILTER_KERNEL_COEFFICIENT0(x) (((x) << VIVS_DE_VERTI_FILTER_KERNEL_COEFFICIENT0__SHIFT) & VIVS_DE_VERTI_FILTER_KERNEL_COEFFICIENT0__MASK)
+#define VIVS_DE_VERTI_FILTER_KERNEL_COEFFICIENT1__MASK 0xffff0000
+#define VIVS_DE_VERTI_FILTER_KERNEL_COEFFICIENT1__SHIFT 16
+#define VIVS_DE_VERTI_FILTER_KERNEL_COEFFICIENT1(x) (((x) << VIVS_DE_VERTI_FILTER_KERNEL_COEFFICIENT1__SHIFT) & VIVS_DE_VERTI_FILTER_KERNEL_COEFFICIENT1__MASK)
+
+#define VIVS_DE_INDEX_COLOR_TABLE32(i0) (0x00003400 + 0x4*(i0))
+#define VIVS_DE_INDEX_COLOR_TABLE32__ESIZE 0x00000004
+#define VIVS_DE_INDEX_COLOR_TABLE32__LEN 0x00000100
+
+#define VIVS_DE_BLOCK4 0x00000000
+
+#define VIVS_DE_BLOCK4_SRC_ADDRESS(i0) (0x00012800 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_SRC_ADDRESS__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_SRC_ADDRESS__LEN 0x00000004
+
+#define VIVS_DE_BLOCK4_SRC_STRIDE(i0) (0x00012810 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_SRC_STRIDE__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_SRC_STRIDE__LEN 0x00000004
+#define VIVS_DE_BLOCK4_SRC_STRIDE_STRIDE__MASK 0x0003ffff
+#define VIVS_DE_BLOCK4_SRC_STRIDE_STRIDE__SHIFT 0
+#define VIVS_DE_BLOCK4_SRC_STRIDE_STRIDE(x) (((x) << VIVS_DE_BLOCK4_SRC_STRIDE_STRIDE__SHIFT) & VIVS_DE_BLOCK4_SRC_STRIDE_STRIDE__MASK)
+
+#define VIVS_DE_BLOCK4_SRC_ROTATION_CONFIG(i0) (0x00012820 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_SRC_ROTATION_CONFIG__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_SRC_ROTATION_CONFIG__LEN 0x00000004
+#define VIVS_DE_BLOCK4_SRC_ROTATION_CONFIG_WIDTH__MASK 0x0000ffff
+#define VIVS_DE_BLOCK4_SRC_ROTATION_CONFIG_WIDTH__SHIFT 0
+#define VIVS_DE_BLOCK4_SRC_ROTATION_CONFIG_WIDTH(x) (((x) << VIVS_DE_BLOCK4_SRC_ROTATION_CONFIG_WIDTH__SHIFT) & VIVS_DE_BLOCK4_SRC_ROTATION_CONFIG_WIDTH__MASK)
+#define VIVS_DE_BLOCK4_SRC_ROTATION_CONFIG_ROTATION__MASK 0x00010000
+#define VIVS_DE_BLOCK4_SRC_ROTATION_CONFIG_ROTATION__SHIFT 16
+#define VIVS_DE_BLOCK4_SRC_ROTATION_CONFIG_ROTATION_DISABLE 0x00000000
+#define VIVS_DE_BLOCK4_SRC_ROTATION_CONFIG_ROTATION_ENABLE 0x00010000
+
+#define VIVS_DE_BLOCK4_SRC_CONFIG(i0) (0x00012830 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_SRC_CONFIG__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_SRC_CONFIG__LEN 0x00000004
+#define VIVS_DE_BLOCK4_SRC_CONFIG_PE10_SOURCE_FORMAT__MASK 0x0000000f
+#define VIVS_DE_BLOCK4_SRC_CONFIG_PE10_SOURCE_FORMAT__SHIFT 0
+#define VIVS_DE_BLOCK4_SRC_CONFIG_PE10_SOURCE_FORMAT(x) (((x) << VIVS_DE_BLOCK4_SRC_CONFIG_PE10_SOURCE_FORMAT__SHIFT) & VIVS_DE_BLOCK4_SRC_CONFIG_PE10_SOURCE_FORMAT__MASK)
+#define VIVS_DE_BLOCK4_SRC_CONFIG_TRANSPARENCY__MASK 0x00000030
+#define VIVS_DE_BLOCK4_SRC_CONFIG_TRANSPARENCY__SHIFT 4
+#define VIVS_DE_BLOCK4_SRC_CONFIG_TRANSPARENCY(x) (((x) << VIVS_DE_BLOCK4_SRC_CONFIG_TRANSPARENCY__SHIFT) & VIVS_DE_BLOCK4_SRC_CONFIG_TRANSPARENCY__MASK)
+#define VIVS_DE_BLOCK4_SRC_CONFIG_SRC_RELATIVE__MASK 0x00000040
+#define VIVS_DE_BLOCK4_SRC_CONFIG_SRC_RELATIVE__SHIFT 6
+#define VIVS_DE_BLOCK4_SRC_CONFIG_SRC_RELATIVE_ABSOLUTE 0x00000000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_SRC_RELATIVE_RELATIVE 0x00000040
+#define VIVS_DE_BLOCK4_SRC_CONFIG_TILED__MASK 0x00000080
+#define VIVS_DE_BLOCK4_SRC_CONFIG_TILED__SHIFT 7
+#define VIVS_DE_BLOCK4_SRC_CONFIG_TILED_DISABLE 0x00000000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_TILED_ENABLE 0x00000080
+#define VIVS_DE_BLOCK4_SRC_CONFIG_LOCATION__MASK 0x00000100
+#define VIVS_DE_BLOCK4_SRC_CONFIG_LOCATION__SHIFT 8
+#define VIVS_DE_BLOCK4_SRC_CONFIG_LOCATION_MEMORY 0x00000000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_LOCATION_STREAM 0x00000100
+#define VIVS_DE_BLOCK4_SRC_CONFIG_PACK__MASK 0x00003000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_PACK__SHIFT 12
+#define VIVS_DE_BLOCK4_SRC_CONFIG_PACK_PACKED8 0x00000000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_PACK_PACKED16 0x00001000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_PACK_PACKED32 0x00002000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_PACK_UNPACKED 0x00003000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_MONO_TRANSPARENCY__MASK 0x00008000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_MONO_TRANSPARENCY__SHIFT 15
+#define VIVS_DE_BLOCK4_SRC_CONFIG_MONO_TRANSPARENCY_BACKGROUND 0x00000000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_MONO_TRANSPARENCY_FOREGROUND 0x00008000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_UNK16 0x00010000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_SWIZZLE__MASK 0x00300000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_SWIZZLE__SHIFT 20
+#define VIVS_DE_BLOCK4_SRC_CONFIG_SWIZZLE(x) (((x) << VIVS_DE_BLOCK4_SRC_CONFIG_SWIZZLE__SHIFT) & VIVS_DE_BLOCK4_SRC_CONFIG_SWIZZLE__MASK)
+#define VIVS_DE_BLOCK4_SRC_CONFIG_SOURCE_FORMAT__MASK 0x1f000000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_SOURCE_FORMAT__SHIFT 24
+#define VIVS_DE_BLOCK4_SRC_CONFIG_SOURCE_FORMAT(x) (((x) << VIVS_DE_BLOCK4_SRC_CONFIG_SOURCE_FORMAT__SHIFT) & VIVS_DE_BLOCK4_SRC_CONFIG_SOURCE_FORMAT__MASK)
+#define VIVS_DE_BLOCK4_SRC_CONFIG_DISABLE420_L2_CACHE 0x20000000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_ENDIAN_CONTROL__MASK 0xc0000000
+#define VIVS_DE_BLOCK4_SRC_CONFIG_ENDIAN_CONTROL__SHIFT 30
+#define VIVS_DE_BLOCK4_SRC_CONFIG_ENDIAN_CONTROL(x) (((x) << VIVS_DE_BLOCK4_SRC_CONFIG_ENDIAN_CONTROL__SHIFT) & VIVS_DE_BLOCK4_SRC_CONFIG_ENDIAN_CONTROL__MASK)
+
+#define VIVS_DE_BLOCK4_SRC_ORIGIN(i0) (0x00012840 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_SRC_ORIGIN__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_SRC_ORIGIN__LEN 0x00000004
+#define VIVS_DE_BLOCK4_SRC_ORIGIN_X__MASK 0x0000ffff
+#define VIVS_DE_BLOCK4_SRC_ORIGIN_X__SHIFT 0
+#define VIVS_DE_BLOCK4_SRC_ORIGIN_X(x) (((x) << VIVS_DE_BLOCK4_SRC_ORIGIN_X__SHIFT) & VIVS_DE_BLOCK4_SRC_ORIGIN_X__MASK)
+#define VIVS_DE_BLOCK4_SRC_ORIGIN_Y__MASK 0xffff0000
+#define VIVS_DE_BLOCK4_SRC_ORIGIN_Y__SHIFT 16
+#define VIVS_DE_BLOCK4_SRC_ORIGIN_Y(x) (((x) << VIVS_DE_BLOCK4_SRC_ORIGIN_Y__SHIFT) & VIVS_DE_BLOCK4_SRC_ORIGIN_Y__MASK)
+
+#define VIVS_DE_BLOCK4_SRC_SIZE(i0) (0x00012850 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_SRC_SIZE__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_SRC_SIZE__LEN 0x00000004
+#define VIVS_DE_BLOCK4_SRC_SIZE_X__MASK 0x0000ffff
+#define VIVS_DE_BLOCK4_SRC_SIZE_X__SHIFT 0
+#define VIVS_DE_BLOCK4_SRC_SIZE_X(x) (((x) << VIVS_DE_BLOCK4_SRC_SIZE_X__SHIFT) & VIVS_DE_BLOCK4_SRC_SIZE_X__MASK)
+#define VIVS_DE_BLOCK4_SRC_SIZE_Y__MASK 0xffff0000
+#define VIVS_DE_BLOCK4_SRC_SIZE_Y__SHIFT 16
+#define VIVS_DE_BLOCK4_SRC_SIZE_Y(x) (((x) << VIVS_DE_BLOCK4_SRC_SIZE_Y__SHIFT) & VIVS_DE_BLOCK4_SRC_SIZE_Y__MASK)
+
+#define VIVS_DE_BLOCK4_SRC_COLOR_BG(i0) (0x00012860 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_SRC_COLOR_BG__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_SRC_COLOR_BG__LEN 0x00000004
+
+#define VIVS_DE_BLOCK4_ROP(i0) (0x00012870 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_ROP__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_ROP__LEN 0x00000004
+#define VIVS_DE_BLOCK4_ROP_ROP_FG__MASK 0x000000ff
+#define VIVS_DE_BLOCK4_ROP_ROP_FG__SHIFT 0
+#define VIVS_DE_BLOCK4_ROP_ROP_FG(x) (((x) << VIVS_DE_BLOCK4_ROP_ROP_FG__SHIFT) & VIVS_DE_BLOCK4_ROP_ROP_FG__MASK)
+#define VIVS_DE_BLOCK4_ROP_ROP_BG__MASK 0x0000ff00
+#define VIVS_DE_BLOCK4_ROP_ROP_BG__SHIFT 8
+#define VIVS_DE_BLOCK4_ROP_ROP_BG(x) (((x) << VIVS_DE_BLOCK4_ROP_ROP_BG__SHIFT) & VIVS_DE_BLOCK4_ROP_ROP_BG__MASK)
+#define VIVS_DE_BLOCK4_ROP_TYPE__MASK 0x00300000
+#define VIVS_DE_BLOCK4_ROP_TYPE__SHIFT 20
+#define VIVS_DE_BLOCK4_ROP_TYPE_ROP2_PATTERN 0x00000000
+#define VIVS_DE_BLOCK4_ROP_TYPE_ROP2_SOURCE 0x00100000
+#define VIVS_DE_BLOCK4_ROP_TYPE_ROP3 0x00200000
+#define VIVS_DE_BLOCK4_ROP_TYPE_ROP4 0x00300000
+
+#define VIVS_DE_BLOCK4_ALPHA_CONTROL(i0) (0x00012880 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_ALPHA_CONTROL__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_ALPHA_CONTROL__LEN 0x00000004
+#define VIVS_DE_BLOCK4_ALPHA_CONTROL_ENABLE__MASK 0x00000001
+#define VIVS_DE_BLOCK4_ALPHA_CONTROL_ENABLE__SHIFT 0
+#define VIVS_DE_BLOCK4_ALPHA_CONTROL_ENABLE_OFF 0x00000000
+#define VIVS_DE_BLOCK4_ALPHA_CONTROL_ENABLE_ON 0x00000001
+#define VIVS_DE_BLOCK4_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA__MASK 0x00ff0000
+#define VIVS_DE_BLOCK4_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA__SHIFT 16
+#define VIVS_DE_BLOCK4_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA(x) (((x) << VIVS_DE_BLOCK4_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA__SHIFT) & VIVS_DE_BLOCK4_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA__MASK)
+#define VIVS_DE_BLOCK4_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA__MASK 0xff000000
+#define VIVS_DE_BLOCK4_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA__SHIFT 24
+#define VIVS_DE_BLOCK4_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA(x) (((x) << VIVS_DE_BLOCK4_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA__SHIFT) & VIVS_DE_BLOCK4_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA__MASK)
+
+#define VIVS_DE_BLOCK4_ALPHA_MODES(i0) (0x00012890 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_ALPHA_MODES__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_ALPHA_MODES__LEN 0x00000004
+#define VIVS_DE_BLOCK4_ALPHA_MODES_SRC_ALPHA_MODE__MASK 0x00000001
+#define VIVS_DE_BLOCK4_ALPHA_MODES_SRC_ALPHA_MODE__SHIFT 0
+#define VIVS_DE_BLOCK4_ALPHA_MODES_SRC_ALPHA_MODE_NORMAL 0x00000000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_SRC_ALPHA_MODE_INVERSED 0x00000001
+#define VIVS_DE_BLOCK4_ALPHA_MODES_DST_ALPHA_MODE__MASK 0x00000010
+#define VIVS_DE_BLOCK4_ALPHA_MODES_DST_ALPHA_MODE__SHIFT 4
+#define VIVS_DE_BLOCK4_ALPHA_MODES_DST_ALPHA_MODE_NORMAL 0x00000000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_DST_ALPHA_MODE_INVERSED 0x00000010
+#define VIVS_DE_BLOCK4_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE__MASK 0x00000300
+#define VIVS_DE_BLOCK4_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE__SHIFT 8
+#define VIVS_DE_BLOCK4_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE_NORMAL 0x00000000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE_GLOBAL 0x00000100
+#define VIVS_DE_BLOCK4_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE_SCALED 0x00000200
+#define VIVS_DE_BLOCK4_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE__MASK 0x00003000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE__SHIFT 12
+#define VIVS_DE_BLOCK4_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE_NORMAL 0x00000000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE_GLOBAL 0x00001000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE_SCALED 0x00002000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_PE10_SRC_COLOR_MULTIPLY__MASK 0x00010000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_PE10_SRC_COLOR_MULTIPLY__SHIFT 16
+#define VIVS_DE_BLOCK4_ALPHA_MODES_PE10_SRC_COLOR_MULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_PE10_SRC_COLOR_MULTIPLY_ENABLE 0x00010000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_PE10_DST_COLOR_MULTIPLY__MASK 0x00100000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_PE10_DST_COLOR_MULTIPLY__SHIFT 20
+#define VIVS_DE_BLOCK4_ALPHA_MODES_PE10_DST_COLOR_MULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_PE10_DST_COLOR_MULTIPLY_ENABLE 0x00100000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_SRC_BLENDING_MODE__MASK 0x07000000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_SRC_BLENDING_MODE__SHIFT 24
+#define VIVS_DE_BLOCK4_ALPHA_MODES_SRC_BLENDING_MODE(x) (((x) << VIVS_DE_BLOCK4_ALPHA_MODES_SRC_BLENDING_MODE__SHIFT) & VIVS_DE_BLOCK4_ALPHA_MODES_SRC_BLENDING_MODE__MASK)
+#define VIVS_DE_BLOCK4_ALPHA_MODES_SRC_ALPHA_FACTOR__MASK 0x08000000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_SRC_ALPHA_FACTOR__SHIFT 27
+#define VIVS_DE_BLOCK4_ALPHA_MODES_SRC_ALPHA_FACTOR_DISABLE 0x00000000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_SRC_ALPHA_FACTOR_ENABLE 0x08000000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_DST_BLENDING_MODE__MASK 0x70000000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_DST_BLENDING_MODE__SHIFT 28
+#define VIVS_DE_BLOCK4_ALPHA_MODES_DST_BLENDING_MODE(x) (((x) << VIVS_DE_BLOCK4_ALPHA_MODES_DST_BLENDING_MODE__SHIFT) & VIVS_DE_BLOCK4_ALPHA_MODES_DST_BLENDING_MODE__MASK)
+#define VIVS_DE_BLOCK4_ALPHA_MODES_DST_ALPHA_FACTOR__MASK 0x80000000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_DST_ALPHA_FACTOR__SHIFT 31
+#define VIVS_DE_BLOCK4_ALPHA_MODES_DST_ALPHA_FACTOR_DISABLE 0x00000000
+#define VIVS_DE_BLOCK4_ALPHA_MODES_DST_ALPHA_FACTOR_ENABLE 0x80000000
+
+#define VIVS_DE_BLOCK4_ADDRESS_U(i0) (0x000128a0 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_ADDRESS_U__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_ADDRESS_U__LEN 0x00000004
+
+#define VIVS_DE_BLOCK4_STRIDE_U(i0) (0x000128b0 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_STRIDE_U__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_STRIDE_U__LEN 0x00000004
+#define VIVS_DE_BLOCK4_STRIDE_U_STRIDE__MASK 0x0003ffff
+#define VIVS_DE_BLOCK4_STRIDE_U_STRIDE__SHIFT 0
+#define VIVS_DE_BLOCK4_STRIDE_U_STRIDE(x) (((x) << VIVS_DE_BLOCK4_STRIDE_U_STRIDE__SHIFT) & VIVS_DE_BLOCK4_STRIDE_U_STRIDE__MASK)
+
+#define VIVS_DE_BLOCK4_ADDRESS_V(i0) (0x000128c0 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_ADDRESS_V__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_ADDRESS_V__LEN 0x00000004
+
+#define VIVS_DE_BLOCK4_STRIDE_V(i0) (0x000128d0 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_STRIDE_V__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_STRIDE_V__LEN 0x00000004
+#define VIVS_DE_BLOCK4_STRIDE_V_STRIDE__MASK 0x0003ffff
+#define VIVS_DE_BLOCK4_STRIDE_V_STRIDE__SHIFT 0
+#define VIVS_DE_BLOCK4_STRIDE_V_STRIDE(x) (((x) << VIVS_DE_BLOCK4_STRIDE_V_STRIDE__SHIFT) & VIVS_DE_BLOCK4_STRIDE_V_STRIDE__MASK)
+
+#define VIVS_DE_BLOCK4_SRC_ROTATION_HEIGHT(i0) (0x000128e0 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_SRC_ROTATION_HEIGHT__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_SRC_ROTATION_HEIGHT__LEN 0x00000004
+#define VIVS_DE_BLOCK4_SRC_ROTATION_HEIGHT_HEIGHT__MASK 0x0000ffff
+#define VIVS_DE_BLOCK4_SRC_ROTATION_HEIGHT_HEIGHT__SHIFT 0
+#define VIVS_DE_BLOCK4_SRC_ROTATION_HEIGHT_HEIGHT(x) (((x) << VIVS_DE_BLOCK4_SRC_ROTATION_HEIGHT_HEIGHT__SHIFT) & VIVS_DE_BLOCK4_SRC_ROTATION_HEIGHT_HEIGHT__MASK)
+
+#define VIVS_DE_BLOCK4_ROT_ANGLE(i0) (0x000128f0 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_ROT_ANGLE__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_ROT_ANGLE__LEN 0x00000004
+#define VIVS_DE_BLOCK4_ROT_ANGLE_SRC__MASK 0x00000007
+#define VIVS_DE_BLOCK4_ROT_ANGLE_SRC__SHIFT 0
+#define VIVS_DE_BLOCK4_ROT_ANGLE_SRC(x) (((x) << VIVS_DE_BLOCK4_ROT_ANGLE_SRC__SHIFT) & VIVS_DE_BLOCK4_ROT_ANGLE_SRC__MASK)
+#define VIVS_DE_BLOCK4_ROT_ANGLE_DST__MASK 0x00000038
+#define VIVS_DE_BLOCK4_ROT_ANGLE_DST__SHIFT 3
+#define VIVS_DE_BLOCK4_ROT_ANGLE_DST(x) (((x) << VIVS_DE_BLOCK4_ROT_ANGLE_DST__SHIFT) & VIVS_DE_BLOCK4_ROT_ANGLE_DST__MASK)
+#define VIVS_DE_BLOCK4_ROT_ANGLE_SRC_MASK 0x00000100
+#define VIVS_DE_BLOCK4_ROT_ANGLE_DST_MASK 0x00000200
+#define VIVS_DE_BLOCK4_ROT_ANGLE_SRC_MIRROR__MASK 0x00003000
+#define VIVS_DE_BLOCK4_ROT_ANGLE_SRC_MIRROR__SHIFT 12
+#define VIVS_DE_BLOCK4_ROT_ANGLE_SRC_MIRROR(x) (((x) << VIVS_DE_BLOCK4_ROT_ANGLE_SRC_MIRROR__SHIFT) & VIVS_DE_BLOCK4_ROT_ANGLE_SRC_MIRROR__MASK)
+#define VIVS_DE_BLOCK4_ROT_ANGLE_SRC_MIRROR_MASK 0x00008000
+#define VIVS_DE_BLOCK4_ROT_ANGLE_DST_MIRROR__MASK 0x00030000
+#define VIVS_DE_BLOCK4_ROT_ANGLE_DST_MIRROR__SHIFT 16
+#define VIVS_DE_BLOCK4_ROT_ANGLE_DST_MIRROR(x) (((x) << VIVS_DE_BLOCK4_ROT_ANGLE_DST_MIRROR__SHIFT) & VIVS_DE_BLOCK4_ROT_ANGLE_DST_MIRROR__MASK)
+#define VIVS_DE_BLOCK4_ROT_ANGLE_DST_MIRROR_MASK 0x00080000
+
+#define VIVS_DE_BLOCK4_GLOBAL_SRC_COLOR(i0) (0x00012900 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_GLOBAL_SRC_COLOR__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_GLOBAL_SRC_COLOR__LEN 0x00000004
+
+#define VIVS_DE_BLOCK4_GLOBAL_DEST_COLOR(i0) (0x00012910 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_GLOBAL_DEST_COLOR__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_GLOBAL_DEST_COLOR__LEN 0x00000004
+
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES(i0) (0x00012920 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES__LEN 0x00000004
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_SRC_PREMULTIPLY__MASK 0x00000001
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_SRC_PREMULTIPLY__SHIFT 0
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_SRC_PREMULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_SRC_PREMULTIPLY_ENABLE 0x00000001
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_DST_PREMULTIPLY__MASK 0x00000010
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_DST_PREMULTIPLY__SHIFT 4
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_DST_PREMULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_DST_PREMULTIPLY_ENABLE 0x00000010
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY__MASK 0x00000300
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY__SHIFT 8
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY_ALPHA 0x00000100
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY_COLOR 0x00000200
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_DST_DEMULTIPLY__MASK 0x00100000
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_DST_DEMULTIPLY__SHIFT 20
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_DST_DEMULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_BLOCK4_COLOR_MULTIPLY_MODES_DST_DEMULTIPLY_ENABLE 0x00100000
+
+#define VIVS_DE_BLOCK4_TRANSPARENCY(i0) (0x00012930 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_TRANSPARENCY__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_TRANSPARENCY__LEN 0x00000004
+#define VIVS_DE_BLOCK4_TRANSPARENCY_SOURCE__MASK 0x00000003
+#define VIVS_DE_BLOCK4_TRANSPARENCY_SOURCE__SHIFT 0
+#define VIVS_DE_BLOCK4_TRANSPARENCY_SOURCE_OPAQUE 0x00000000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_SOURCE_MASK 0x00000001
+#define VIVS_DE_BLOCK4_TRANSPARENCY_SOURCE_KEY 0x00000002
+#define VIVS_DE_BLOCK4_TRANSPARENCY_PATTERN__MASK 0x00000030
+#define VIVS_DE_BLOCK4_TRANSPARENCY_PATTERN__SHIFT 4
+#define VIVS_DE_BLOCK4_TRANSPARENCY_PATTERN_OPAQUE 0x00000000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_PATTERN_MASK 0x00000010
+#define VIVS_DE_BLOCK4_TRANSPARENCY_PATTERN_KEY 0x00000020
+#define VIVS_DE_BLOCK4_TRANSPARENCY_DESTINATION__MASK 0x00000300
+#define VIVS_DE_BLOCK4_TRANSPARENCY_DESTINATION__SHIFT 8
+#define VIVS_DE_BLOCK4_TRANSPARENCY_DESTINATION_OPAQUE 0x00000000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_DESTINATION_MASK 0x00000100
+#define VIVS_DE_BLOCK4_TRANSPARENCY_DESTINATION_KEY 0x00000200
+#define VIVS_DE_BLOCK4_TRANSPARENCY_TRANSPARENCY_MASK 0x00001000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_USE_SRC_OVERRIDE__MASK 0x00030000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_USE_SRC_OVERRIDE__SHIFT 16
+#define VIVS_DE_BLOCK4_TRANSPARENCY_USE_SRC_OVERRIDE_DEFAULT 0x00000000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_USE_SRC_OVERRIDE_USE_ENABLE 0x00010000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_USE_SRC_OVERRIDE_USE_DISABLE 0x00020000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_USE_PAT_OVERRIDE__MASK 0x00300000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_USE_PAT_OVERRIDE__SHIFT 20
+#define VIVS_DE_BLOCK4_TRANSPARENCY_USE_PAT_OVERRIDE_DEFAULT 0x00000000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_USE_PAT_OVERRIDE_USE_ENABLE 0x00100000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_USE_PAT_OVERRIDE_USE_DISABLE 0x00200000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_USE_DST_OVERRIDE__MASK 0x03000000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_USE_DST_OVERRIDE__SHIFT 24
+#define VIVS_DE_BLOCK4_TRANSPARENCY_USE_DST_OVERRIDE_DEFAULT 0x00000000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_USE_DST_OVERRIDE_USE_ENABLE 0x01000000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_USE_DST_OVERRIDE_USE_DISABLE 0x02000000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_RESOURCE_OVERRIDE_MASK 0x10000000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_DFB_COLOR_KEY__MASK 0x20000000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_DFB_COLOR_KEY__SHIFT 29
+#define VIVS_DE_BLOCK4_TRANSPARENCY_DFB_COLOR_KEY_DISABLE 0x00000000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_DFB_COLOR_KEY_ENABLE 0x20000000
+#define VIVS_DE_BLOCK4_TRANSPARENCY_DFB_COLOR_KEY_MASK 0x80000000
+
+#define VIVS_DE_BLOCK4_CONTROL(i0) (0x00012940 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_CONTROL__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_CONTROL__LEN 0x00000004
+#define VIVS_DE_BLOCK4_CONTROL_YUV__MASK 0x00000001
+#define VIVS_DE_BLOCK4_CONTROL_YUV__SHIFT 0
+#define VIVS_DE_BLOCK4_CONTROL_YUV_601 0x00000000
+#define VIVS_DE_BLOCK4_CONTROL_YUV_709 0x00000001
+#define VIVS_DE_BLOCK4_CONTROL_YUV_MASK 0x00000008
+#define VIVS_DE_BLOCK4_CONTROL_UV_SWIZZLE__MASK 0x00000010
+#define VIVS_DE_BLOCK4_CONTROL_UV_SWIZZLE__SHIFT 4
+#define VIVS_DE_BLOCK4_CONTROL_UV_SWIZZLE_UV 0x00000000
+#define VIVS_DE_BLOCK4_CONTROL_UV_SWIZZLE_VU 0x00000010
+#define VIVS_DE_BLOCK4_CONTROL_UV_SWIZZLE_MASK 0x00000080
+#define VIVS_DE_BLOCK4_CONTROL_YUVRGB__MASK 0x00000100
+#define VIVS_DE_BLOCK4_CONTROL_YUVRGB__SHIFT 8
+#define VIVS_DE_BLOCK4_CONTROL_YUVRGB_DISABLE 0x00000000
+#define VIVS_DE_BLOCK4_CONTROL_YUVRGB_ENABLE 0x00000100
+#define VIVS_DE_BLOCK4_CONTROL_YUVRGB_MASK 0x00000800
+
+#define VIVS_DE_BLOCK4_SRC_COLOR_KEY_HIGH(i0) (0x00012950 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_SRC_COLOR_KEY_HIGH__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_SRC_COLOR_KEY_HIGH__LEN 0x00000004
+
+#define VIVS_DE_BLOCK4_SRC_EX_CONFIG(i0) (0x00012960 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_SRC_EX_CONFIG__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_SRC_EX_CONFIG__LEN 0x00000004
+#define VIVS_DE_BLOCK4_SRC_EX_CONFIG_MULTI_TILED__MASK 0x00000001
+#define VIVS_DE_BLOCK4_SRC_EX_CONFIG_MULTI_TILED__SHIFT 0
+#define VIVS_DE_BLOCK4_SRC_EX_CONFIG_MULTI_TILED_DISABLE 0x00000000
+#define VIVS_DE_BLOCK4_SRC_EX_CONFIG_MULTI_TILED_ENABLE 0x00000001
+#define VIVS_DE_BLOCK4_SRC_EX_CONFIG_SUPER_TILED__MASK 0x00000008
+#define VIVS_DE_BLOCK4_SRC_EX_CONFIG_SUPER_TILED__SHIFT 3
+#define VIVS_DE_BLOCK4_SRC_EX_CONFIG_SUPER_TILED_DISABLE 0x00000000
+#define VIVS_DE_BLOCK4_SRC_EX_CONFIG_SUPER_TILED_ENABLE 0x00000008
+#define VIVS_DE_BLOCK4_SRC_EX_CONFIG_MINOR_TILED__MASK 0x00000100
+#define VIVS_DE_BLOCK4_SRC_EX_CONFIG_MINOR_TILED__SHIFT 8
+#define VIVS_DE_BLOCK4_SRC_EX_CONFIG_MINOR_TILED_DISABLE 0x00000000
+#define VIVS_DE_BLOCK4_SRC_EX_CONFIG_MINOR_TILED_ENABLE 0x00000100
+
+#define VIVS_DE_BLOCK4_SRC_EX_ADDRESS(i0) (0x00012970 + 0x4*(i0))
+#define VIVS_DE_BLOCK4_SRC_EX_ADDRESS__ESIZE 0x00000004
+#define VIVS_DE_BLOCK4_SRC_EX_ADDRESS__LEN 0x00000004
+
+#define VIVS_DE_BLOCK8 0x00000000
+
+#define VIVS_DE_BLOCK8_SRC_ADDRESS(i0) (0x00012a00 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_SRC_ADDRESS__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_SRC_ADDRESS__LEN 0x00000008
+
+#define VIVS_DE_BLOCK8_SRC_STRIDE(i0) (0x00012a20 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_SRC_STRIDE__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_SRC_STRIDE__LEN 0x00000008
+#define VIVS_DE_BLOCK8_SRC_STRIDE_STRIDE__MASK 0x0003ffff
+#define VIVS_DE_BLOCK8_SRC_STRIDE_STRIDE__SHIFT 0
+#define VIVS_DE_BLOCK8_SRC_STRIDE_STRIDE(x) (((x) << VIVS_DE_BLOCK8_SRC_STRIDE_STRIDE__SHIFT) & VIVS_DE_BLOCK8_SRC_STRIDE_STRIDE__MASK)
+
+#define VIVS_DE_BLOCK8_SRC_ROTATION_CONFIG(i0) (0x00012a40 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_SRC_ROTATION_CONFIG__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_SRC_ROTATION_CONFIG__LEN 0x00000008
+#define VIVS_DE_BLOCK8_SRC_ROTATION_CONFIG_WIDTH__MASK 0x0000ffff
+#define VIVS_DE_BLOCK8_SRC_ROTATION_CONFIG_WIDTH__SHIFT 0
+#define VIVS_DE_BLOCK8_SRC_ROTATION_CONFIG_WIDTH(x) (((x) << VIVS_DE_BLOCK8_SRC_ROTATION_CONFIG_WIDTH__SHIFT) & VIVS_DE_BLOCK8_SRC_ROTATION_CONFIG_WIDTH__MASK)
+#define VIVS_DE_BLOCK8_SRC_ROTATION_CONFIG_ROTATION__MASK 0x00010000
+#define VIVS_DE_BLOCK8_SRC_ROTATION_CONFIG_ROTATION__SHIFT 16
+#define VIVS_DE_BLOCK8_SRC_ROTATION_CONFIG_ROTATION_DISABLE 0x00000000
+#define VIVS_DE_BLOCK8_SRC_ROTATION_CONFIG_ROTATION_ENABLE 0x00010000
+
+#define VIVS_DE_BLOCK8_SRC_CONFIG(i0) (0x00012a60 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_SRC_CONFIG__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_SRC_CONFIG__LEN 0x00000008
+#define VIVS_DE_BLOCK8_SRC_CONFIG_PE10_SOURCE_FORMAT__MASK 0x0000000f
+#define VIVS_DE_BLOCK8_SRC_CONFIG_PE10_SOURCE_FORMAT__SHIFT 0
+#define VIVS_DE_BLOCK8_SRC_CONFIG_PE10_SOURCE_FORMAT(x) (((x) << VIVS_DE_BLOCK8_SRC_CONFIG_PE10_SOURCE_FORMAT__SHIFT) & VIVS_DE_BLOCK8_SRC_CONFIG_PE10_SOURCE_FORMAT__MASK)
+#define VIVS_DE_BLOCK8_SRC_CONFIG_TRANSPARENCY__MASK 0x00000030
+#define VIVS_DE_BLOCK8_SRC_CONFIG_TRANSPARENCY__SHIFT 4
+#define VIVS_DE_BLOCK8_SRC_CONFIG_TRANSPARENCY(x) (((x) << VIVS_DE_BLOCK8_SRC_CONFIG_TRANSPARENCY__SHIFT) & VIVS_DE_BLOCK8_SRC_CONFIG_TRANSPARENCY__MASK)
+#define VIVS_DE_BLOCK8_SRC_CONFIG_SRC_RELATIVE__MASK 0x00000040
+#define VIVS_DE_BLOCK8_SRC_CONFIG_SRC_RELATIVE__SHIFT 6
+#define VIVS_DE_BLOCK8_SRC_CONFIG_SRC_RELATIVE_ABSOLUTE 0x00000000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_SRC_RELATIVE_RELATIVE 0x00000040
+#define VIVS_DE_BLOCK8_SRC_CONFIG_TILED__MASK 0x00000080
+#define VIVS_DE_BLOCK8_SRC_CONFIG_TILED__SHIFT 7
+#define VIVS_DE_BLOCK8_SRC_CONFIG_TILED_DISABLE 0x00000000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_TILED_ENABLE 0x00000080
+#define VIVS_DE_BLOCK8_SRC_CONFIG_LOCATION__MASK 0x00000100
+#define VIVS_DE_BLOCK8_SRC_CONFIG_LOCATION__SHIFT 8
+#define VIVS_DE_BLOCK8_SRC_CONFIG_LOCATION_MEMORY 0x00000000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_LOCATION_STREAM 0x00000100
+#define VIVS_DE_BLOCK8_SRC_CONFIG_PACK__MASK 0x00003000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_PACK__SHIFT 12
+#define VIVS_DE_BLOCK8_SRC_CONFIG_PACK_PACKED8 0x00000000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_PACK_PACKED16 0x00001000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_PACK_PACKED32 0x00002000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_PACK_UNPACKED 0x00003000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_MONO_TRANSPARENCY__MASK 0x00008000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_MONO_TRANSPARENCY__SHIFT 15
+#define VIVS_DE_BLOCK8_SRC_CONFIG_MONO_TRANSPARENCY_BACKGROUND 0x00000000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_MONO_TRANSPARENCY_FOREGROUND 0x00008000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_UNK16 0x00010000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_SWIZZLE__MASK 0x00300000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_SWIZZLE__SHIFT 20
+#define VIVS_DE_BLOCK8_SRC_CONFIG_SWIZZLE(x) (((x) << VIVS_DE_BLOCK8_SRC_CONFIG_SWIZZLE__SHIFT) & VIVS_DE_BLOCK8_SRC_CONFIG_SWIZZLE__MASK)
+#define VIVS_DE_BLOCK8_SRC_CONFIG_SOURCE_FORMAT__MASK 0x1f000000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_SOURCE_FORMAT__SHIFT 24
+#define VIVS_DE_BLOCK8_SRC_CONFIG_SOURCE_FORMAT(x) (((x) << VIVS_DE_BLOCK8_SRC_CONFIG_SOURCE_FORMAT__SHIFT) & VIVS_DE_BLOCK8_SRC_CONFIG_SOURCE_FORMAT__MASK)
+#define VIVS_DE_BLOCK8_SRC_CONFIG_DISABLE420_L2_CACHE 0x20000000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_ENDIAN_CONTROL__MASK 0xc0000000
+#define VIVS_DE_BLOCK8_SRC_CONFIG_ENDIAN_CONTROL__SHIFT 30
+#define VIVS_DE_BLOCK8_SRC_CONFIG_ENDIAN_CONTROL(x) (((x) << VIVS_DE_BLOCK8_SRC_CONFIG_ENDIAN_CONTROL__SHIFT) & VIVS_DE_BLOCK8_SRC_CONFIG_ENDIAN_CONTROL__MASK)
+
+#define VIVS_DE_BLOCK8_SRC_ORIGIN(i0) (0x00012a80 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_SRC_ORIGIN__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_SRC_ORIGIN__LEN 0x00000008
+#define VIVS_DE_BLOCK8_SRC_ORIGIN_X__MASK 0x0000ffff
+#define VIVS_DE_BLOCK8_SRC_ORIGIN_X__SHIFT 0
+#define VIVS_DE_BLOCK8_SRC_ORIGIN_X(x) (((x) << VIVS_DE_BLOCK8_SRC_ORIGIN_X__SHIFT) & VIVS_DE_BLOCK8_SRC_ORIGIN_X__MASK)
+#define VIVS_DE_BLOCK8_SRC_ORIGIN_Y__MASK 0xffff0000
+#define VIVS_DE_BLOCK8_SRC_ORIGIN_Y__SHIFT 16
+#define VIVS_DE_BLOCK8_SRC_ORIGIN_Y(x) (((x) << VIVS_DE_BLOCK8_SRC_ORIGIN_Y__SHIFT) & VIVS_DE_BLOCK8_SRC_ORIGIN_Y__MASK)
+
+#define VIVS_DE_BLOCK8_SRC_SIZE(i0) (0x00012aa0 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_SRC_SIZE__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_SRC_SIZE__LEN 0x00000008
+#define VIVS_DE_BLOCK8_SRC_SIZE_X__MASK 0x0000ffff
+#define VIVS_DE_BLOCK8_SRC_SIZE_X__SHIFT 0
+#define VIVS_DE_BLOCK8_SRC_SIZE_X(x) (((x) << VIVS_DE_BLOCK8_SRC_SIZE_X__SHIFT) & VIVS_DE_BLOCK8_SRC_SIZE_X__MASK)
+#define VIVS_DE_BLOCK8_SRC_SIZE_Y__MASK 0xffff0000
+#define VIVS_DE_BLOCK8_SRC_SIZE_Y__SHIFT 16
+#define VIVS_DE_BLOCK8_SRC_SIZE_Y(x) (((x) << VIVS_DE_BLOCK8_SRC_SIZE_Y__SHIFT) & VIVS_DE_BLOCK8_SRC_SIZE_Y__MASK)
+
+#define VIVS_DE_BLOCK8_SRC_COLOR_BG(i0) (0x00012ac0 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_SRC_COLOR_BG__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_SRC_COLOR_BG__LEN 0x00000008
+
+#define VIVS_DE_BLOCK8_ROP(i0) (0x00012ae0 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_ROP__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_ROP__LEN 0x00000008
+#define VIVS_DE_BLOCK8_ROP_ROP_FG__MASK 0x000000ff
+#define VIVS_DE_BLOCK8_ROP_ROP_FG__SHIFT 0
+#define VIVS_DE_BLOCK8_ROP_ROP_FG(x) (((x) << VIVS_DE_BLOCK8_ROP_ROP_FG__SHIFT) & VIVS_DE_BLOCK8_ROP_ROP_FG__MASK)
+#define VIVS_DE_BLOCK8_ROP_ROP_BG__MASK 0x0000ff00
+#define VIVS_DE_BLOCK8_ROP_ROP_BG__SHIFT 8
+#define VIVS_DE_BLOCK8_ROP_ROP_BG(x) (((x) << VIVS_DE_BLOCK8_ROP_ROP_BG__SHIFT) & VIVS_DE_BLOCK8_ROP_ROP_BG__MASK)
+#define VIVS_DE_BLOCK8_ROP_TYPE__MASK 0x00300000
+#define VIVS_DE_BLOCK8_ROP_TYPE__SHIFT 20
+#define VIVS_DE_BLOCK8_ROP_TYPE_ROP2_PATTERN 0x00000000
+#define VIVS_DE_BLOCK8_ROP_TYPE_ROP2_SOURCE 0x00100000
+#define VIVS_DE_BLOCK8_ROP_TYPE_ROP3 0x00200000
+#define VIVS_DE_BLOCK8_ROP_TYPE_ROP4 0x00300000
+
+#define VIVS_DE_BLOCK8_ALPHA_CONTROL(i0) (0x00012b00 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_ALPHA_CONTROL__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_ALPHA_CONTROL__LEN 0x00000008
+#define VIVS_DE_BLOCK8_ALPHA_CONTROL_ENABLE__MASK 0x00000001
+#define VIVS_DE_BLOCK8_ALPHA_CONTROL_ENABLE__SHIFT 0
+#define VIVS_DE_BLOCK8_ALPHA_CONTROL_ENABLE_OFF 0x00000000
+#define VIVS_DE_BLOCK8_ALPHA_CONTROL_ENABLE_ON 0x00000001
+#define VIVS_DE_BLOCK8_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA__MASK 0x00ff0000
+#define VIVS_DE_BLOCK8_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA__SHIFT 16
+#define VIVS_DE_BLOCK8_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA(x) (((x) << VIVS_DE_BLOCK8_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA__SHIFT) & VIVS_DE_BLOCK8_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA__MASK)
+#define VIVS_DE_BLOCK8_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA__MASK 0xff000000
+#define VIVS_DE_BLOCK8_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA__SHIFT 24
+#define VIVS_DE_BLOCK8_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA(x) (((x) << VIVS_DE_BLOCK8_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA__SHIFT) & VIVS_DE_BLOCK8_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA__MASK)
+
+#define VIVS_DE_BLOCK8_ALPHA_MODES(i0) (0x00012b20 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_ALPHA_MODES__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_ALPHA_MODES__LEN 0x00000008
+#define VIVS_DE_BLOCK8_ALPHA_MODES_SRC_ALPHA_MODE__MASK 0x00000001
+#define VIVS_DE_BLOCK8_ALPHA_MODES_SRC_ALPHA_MODE__SHIFT 0
+#define VIVS_DE_BLOCK8_ALPHA_MODES_SRC_ALPHA_MODE_NORMAL 0x00000000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_SRC_ALPHA_MODE_INVERSED 0x00000001
+#define VIVS_DE_BLOCK8_ALPHA_MODES_DST_ALPHA_MODE__MASK 0x00000010
+#define VIVS_DE_BLOCK8_ALPHA_MODES_DST_ALPHA_MODE__SHIFT 4
+#define VIVS_DE_BLOCK8_ALPHA_MODES_DST_ALPHA_MODE_NORMAL 0x00000000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_DST_ALPHA_MODE_INVERSED 0x00000010
+#define VIVS_DE_BLOCK8_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE__MASK 0x00000300
+#define VIVS_DE_BLOCK8_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE__SHIFT 8
+#define VIVS_DE_BLOCK8_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE_NORMAL 0x00000000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE_GLOBAL 0x00000100
+#define VIVS_DE_BLOCK8_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE_SCALED 0x00000200
+#define VIVS_DE_BLOCK8_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE__MASK 0x00003000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE__SHIFT 12
+#define VIVS_DE_BLOCK8_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE_NORMAL 0x00000000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE_GLOBAL 0x00001000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE_SCALED 0x00002000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_PE10_SRC_COLOR_MULTIPLY__MASK 0x00010000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_PE10_SRC_COLOR_MULTIPLY__SHIFT 16
+#define VIVS_DE_BLOCK8_ALPHA_MODES_PE10_SRC_COLOR_MULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_PE10_SRC_COLOR_MULTIPLY_ENABLE 0x00010000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_PE10_DST_COLOR_MULTIPLY__MASK 0x00100000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_PE10_DST_COLOR_MULTIPLY__SHIFT 20
+#define VIVS_DE_BLOCK8_ALPHA_MODES_PE10_DST_COLOR_MULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_PE10_DST_COLOR_MULTIPLY_ENABLE 0x00100000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_SRC_BLENDING_MODE__MASK 0x07000000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_SRC_BLENDING_MODE__SHIFT 24
+#define VIVS_DE_BLOCK8_ALPHA_MODES_SRC_BLENDING_MODE(x) (((x) << VIVS_DE_BLOCK8_ALPHA_MODES_SRC_BLENDING_MODE__SHIFT) & VIVS_DE_BLOCK8_ALPHA_MODES_SRC_BLENDING_MODE__MASK)
+#define VIVS_DE_BLOCK8_ALPHA_MODES_SRC_ALPHA_FACTOR__MASK 0x08000000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_SRC_ALPHA_FACTOR__SHIFT 27
+#define VIVS_DE_BLOCK8_ALPHA_MODES_SRC_ALPHA_FACTOR_DISABLE 0x00000000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_SRC_ALPHA_FACTOR_ENABLE 0x08000000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_DST_BLENDING_MODE__MASK 0x70000000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_DST_BLENDING_MODE__SHIFT 28
+#define VIVS_DE_BLOCK8_ALPHA_MODES_DST_BLENDING_MODE(x) (((x) << VIVS_DE_BLOCK8_ALPHA_MODES_DST_BLENDING_MODE__SHIFT) & VIVS_DE_BLOCK8_ALPHA_MODES_DST_BLENDING_MODE__MASK)
+#define VIVS_DE_BLOCK8_ALPHA_MODES_DST_ALPHA_FACTOR__MASK 0x80000000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_DST_ALPHA_FACTOR__SHIFT 31
+#define VIVS_DE_BLOCK8_ALPHA_MODES_DST_ALPHA_FACTOR_DISABLE 0x00000000
+#define VIVS_DE_BLOCK8_ALPHA_MODES_DST_ALPHA_FACTOR_ENABLE 0x80000000
+
+#define VIVS_DE_BLOCK8_ADDRESS_U(i0) (0x00012b40 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_ADDRESS_U__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_ADDRESS_U__LEN 0x00000008
+
+#define VIVS_DE_BLOCK8_STRIDE_U(i0) (0x00012b60 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_STRIDE_U__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_STRIDE_U__LEN 0x00000008
+#define VIVS_DE_BLOCK8_STRIDE_U_STRIDE__MASK 0x0003ffff
+#define VIVS_DE_BLOCK8_STRIDE_U_STRIDE__SHIFT 0
+#define VIVS_DE_BLOCK8_STRIDE_U_STRIDE(x) (((x) << VIVS_DE_BLOCK8_STRIDE_U_STRIDE__SHIFT) & VIVS_DE_BLOCK8_STRIDE_U_STRIDE__MASK)
+
+#define VIVS_DE_BLOCK8_ADDRESS_V(i0) (0x00012b80 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_ADDRESS_V__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_ADDRESS_V__LEN 0x00000008
+
+#define VIVS_DE_BLOCK8_STRIDE_V(i0) (0x00012ba0 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_STRIDE_V__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_STRIDE_V__LEN 0x00000008
+#define VIVS_DE_BLOCK8_STRIDE_V_STRIDE__MASK 0x0003ffff
+#define VIVS_DE_BLOCK8_STRIDE_V_STRIDE__SHIFT 0
+#define VIVS_DE_BLOCK8_STRIDE_V_STRIDE(x) (((x) << VIVS_DE_BLOCK8_STRIDE_V_STRIDE__SHIFT) & VIVS_DE_BLOCK8_STRIDE_V_STRIDE__MASK)
+
+#define VIVS_DE_BLOCK8_SRC_ROTATION_HEIGHT(i0) (0x00012bc0 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_SRC_ROTATION_HEIGHT__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_SRC_ROTATION_HEIGHT__LEN 0x00000008
+#define VIVS_DE_BLOCK8_SRC_ROTATION_HEIGHT_HEIGHT__MASK 0x0000ffff
+#define VIVS_DE_BLOCK8_SRC_ROTATION_HEIGHT_HEIGHT__SHIFT 0
+#define VIVS_DE_BLOCK8_SRC_ROTATION_HEIGHT_HEIGHT(x) (((x) << VIVS_DE_BLOCK8_SRC_ROTATION_HEIGHT_HEIGHT__SHIFT) & VIVS_DE_BLOCK8_SRC_ROTATION_HEIGHT_HEIGHT__MASK)
+
+#define VIVS_DE_BLOCK8_ROT_ANGLE(i0) (0x00012be0 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_ROT_ANGLE__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_ROT_ANGLE__LEN 0x00000008
+#define VIVS_DE_BLOCK8_ROT_ANGLE_SRC__MASK 0x00000007
+#define VIVS_DE_BLOCK8_ROT_ANGLE_SRC__SHIFT 0
+#define VIVS_DE_BLOCK8_ROT_ANGLE_SRC(x) (((x) << VIVS_DE_BLOCK8_ROT_ANGLE_SRC__SHIFT) & VIVS_DE_BLOCK8_ROT_ANGLE_SRC__MASK)
+#define VIVS_DE_BLOCK8_ROT_ANGLE_DST__MASK 0x00000038
+#define VIVS_DE_BLOCK8_ROT_ANGLE_DST__SHIFT 3
+#define VIVS_DE_BLOCK8_ROT_ANGLE_DST(x) (((x) << VIVS_DE_BLOCK8_ROT_ANGLE_DST__SHIFT) & VIVS_DE_BLOCK8_ROT_ANGLE_DST__MASK)
+#define VIVS_DE_BLOCK8_ROT_ANGLE_SRC_MASK 0x00000100
+#define VIVS_DE_BLOCK8_ROT_ANGLE_DST_MASK 0x00000200
+#define VIVS_DE_BLOCK8_ROT_ANGLE_SRC_MIRROR__MASK 0x00003000
+#define VIVS_DE_BLOCK8_ROT_ANGLE_SRC_MIRROR__SHIFT 12
+#define VIVS_DE_BLOCK8_ROT_ANGLE_SRC_MIRROR(x) (((x) << VIVS_DE_BLOCK8_ROT_ANGLE_SRC_MIRROR__SHIFT) & VIVS_DE_BLOCK8_ROT_ANGLE_SRC_MIRROR__MASK)
+#define VIVS_DE_BLOCK8_ROT_ANGLE_SRC_MIRROR_MASK 0x00008000
+#define VIVS_DE_BLOCK8_ROT_ANGLE_DST_MIRROR__MASK 0x00030000
+#define VIVS_DE_BLOCK8_ROT_ANGLE_DST_MIRROR__SHIFT 16
+#define VIVS_DE_BLOCK8_ROT_ANGLE_DST_MIRROR(x) (((x) << VIVS_DE_BLOCK8_ROT_ANGLE_DST_MIRROR__SHIFT) & VIVS_DE_BLOCK8_ROT_ANGLE_DST_MIRROR__MASK)
+#define VIVS_DE_BLOCK8_ROT_ANGLE_DST_MIRROR_MASK 0x00080000
+
+#define VIVS_DE_BLOCK8_GLOBAL_SRC_COLOR(i0) (0x00012c00 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_GLOBAL_SRC_COLOR__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_GLOBAL_SRC_COLOR__LEN 0x00000008
+
+#define VIVS_DE_BLOCK8_GLOBAL_DEST_COLOR(i0) (0x00012c20 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_GLOBAL_DEST_COLOR__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_GLOBAL_DEST_COLOR__LEN 0x00000008
+
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES(i0) (0x00012c40 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES__LEN 0x00000008
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_SRC_PREMULTIPLY__MASK 0x00000001
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_SRC_PREMULTIPLY__SHIFT 0
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_SRC_PREMULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_SRC_PREMULTIPLY_ENABLE 0x00000001
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_DST_PREMULTIPLY__MASK 0x00000010
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_DST_PREMULTIPLY__SHIFT 4
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_DST_PREMULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_DST_PREMULTIPLY_ENABLE 0x00000010
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY__MASK 0x00000300
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY__SHIFT 8
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY_ALPHA 0x00000100
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY_COLOR 0x00000200
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_DST_DEMULTIPLY__MASK 0x00100000
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_DST_DEMULTIPLY__SHIFT 20
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_DST_DEMULTIPLY_DISABLE 0x00000000
+#define VIVS_DE_BLOCK8_COLOR_MULTIPLY_MODES_DST_DEMULTIPLY_ENABLE 0x00100000
+
+#define VIVS_DE_BLOCK8_TRANSPARENCY(i0) (0x00012c60 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_TRANSPARENCY__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_TRANSPARENCY__LEN 0x00000008
+#define VIVS_DE_BLOCK8_TRANSPARENCY_SOURCE__MASK 0x00000003
+#define VIVS_DE_BLOCK8_TRANSPARENCY_SOURCE__SHIFT 0
+#define VIVS_DE_BLOCK8_TRANSPARENCY_SOURCE_OPAQUE 0x00000000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_SOURCE_MASK 0x00000001
+#define VIVS_DE_BLOCK8_TRANSPARENCY_SOURCE_KEY 0x00000002
+#define VIVS_DE_BLOCK8_TRANSPARENCY_PATTERN__MASK 0x00000030
+#define VIVS_DE_BLOCK8_TRANSPARENCY_PATTERN__SHIFT 4
+#define VIVS_DE_BLOCK8_TRANSPARENCY_PATTERN_OPAQUE 0x00000000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_PATTERN_MASK 0x00000010
+#define VIVS_DE_BLOCK8_TRANSPARENCY_PATTERN_KEY 0x00000020
+#define VIVS_DE_BLOCK8_TRANSPARENCY_DESTINATION__MASK 0x00000300
+#define VIVS_DE_BLOCK8_TRANSPARENCY_DESTINATION__SHIFT 8
+#define VIVS_DE_BLOCK8_TRANSPARENCY_DESTINATION_OPAQUE 0x00000000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_DESTINATION_MASK 0x00000100
+#define VIVS_DE_BLOCK8_TRANSPARENCY_DESTINATION_KEY 0x00000200
+#define VIVS_DE_BLOCK8_TRANSPARENCY_TRANSPARENCY_MASK 0x00001000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_USE_SRC_OVERRIDE__MASK 0x00030000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_USE_SRC_OVERRIDE__SHIFT 16
+#define VIVS_DE_BLOCK8_TRANSPARENCY_USE_SRC_OVERRIDE_DEFAULT 0x00000000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_USE_SRC_OVERRIDE_USE_ENABLE 0x00010000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_USE_SRC_OVERRIDE_USE_DISABLE 0x00020000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_USE_PAT_OVERRIDE__MASK 0x00300000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_USE_PAT_OVERRIDE__SHIFT 20
+#define VIVS_DE_BLOCK8_TRANSPARENCY_USE_PAT_OVERRIDE_DEFAULT 0x00000000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_USE_PAT_OVERRIDE_USE_ENABLE 0x00100000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_USE_PAT_OVERRIDE_USE_DISABLE 0x00200000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_USE_DST_OVERRIDE__MASK 0x03000000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_USE_DST_OVERRIDE__SHIFT 24
+#define VIVS_DE_BLOCK8_TRANSPARENCY_USE_DST_OVERRIDE_DEFAULT 0x00000000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_USE_DST_OVERRIDE_USE_ENABLE 0x01000000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_USE_DST_OVERRIDE_USE_DISABLE 0x02000000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_RESOURCE_OVERRIDE_MASK 0x10000000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_DFB_COLOR_KEY__MASK 0x20000000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_DFB_COLOR_KEY__SHIFT 29
+#define VIVS_DE_BLOCK8_TRANSPARENCY_DFB_COLOR_KEY_DISABLE 0x00000000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_DFB_COLOR_KEY_ENABLE 0x20000000
+#define VIVS_DE_BLOCK8_TRANSPARENCY_DFB_COLOR_KEY_MASK 0x80000000
+
+#define VIVS_DE_BLOCK8_CONTROL(i0) (0x00012c80 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_CONTROL__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_CONTROL__LEN 0x00000008
+#define VIVS_DE_BLOCK8_CONTROL_YUV__MASK 0x00000001
+#define VIVS_DE_BLOCK8_CONTROL_YUV__SHIFT 0
+#define VIVS_DE_BLOCK8_CONTROL_YUV_601 0x00000000
+#define VIVS_DE_BLOCK8_CONTROL_YUV_709 0x00000001
+#define VIVS_DE_BLOCK8_CONTROL_YUV_MASK 0x00000008
+#define VIVS_DE_BLOCK8_CONTROL_UV_SWIZZLE__MASK 0x00000010
+#define VIVS_DE_BLOCK8_CONTROL_UV_SWIZZLE__SHIFT 4
+#define VIVS_DE_BLOCK8_CONTROL_UV_SWIZZLE_UV 0x00000000
+#define VIVS_DE_BLOCK8_CONTROL_UV_SWIZZLE_VU 0x00000010
+#define VIVS_DE_BLOCK8_CONTROL_UV_SWIZZLE_MASK 0x00000080
+#define VIVS_DE_BLOCK8_CONTROL_YUVRGB__MASK 0x00000100
+#define VIVS_DE_BLOCK8_CONTROL_YUVRGB__SHIFT 8
+#define VIVS_DE_BLOCK8_CONTROL_YUVRGB_DISABLE 0x00000000
+#define VIVS_DE_BLOCK8_CONTROL_YUVRGB_ENABLE 0x00000100
+#define VIVS_DE_BLOCK8_CONTROL_YUVRGB_MASK 0x00000800
+
+#define VIVS_DE_BLOCK8_SRC_COLOR_KEY_HIGH(i0) (0x00012ca0 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_SRC_COLOR_KEY_HIGH__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_SRC_COLOR_KEY_HIGH__LEN 0x00000008
+
+#define VIVS_DE_BLOCK8_SRC_EX_CONFIG(i0) (0x00012cc0 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_SRC_EX_CONFIG__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_SRC_EX_CONFIG__LEN 0x00000008
+#define VIVS_DE_BLOCK8_SRC_EX_CONFIG_MULTI_TILED__MASK 0x00000001
+#define VIVS_DE_BLOCK8_SRC_EX_CONFIG_MULTI_TILED__SHIFT 0
+#define VIVS_DE_BLOCK8_SRC_EX_CONFIG_MULTI_TILED_DISABLE 0x00000000
+#define VIVS_DE_BLOCK8_SRC_EX_CONFIG_MULTI_TILED_ENABLE 0x00000001
+#define VIVS_DE_BLOCK8_SRC_EX_CONFIG_SUPER_TILED__MASK 0x00000008
+#define VIVS_DE_BLOCK8_SRC_EX_CONFIG_SUPER_TILED__SHIFT 3
+#define VIVS_DE_BLOCK8_SRC_EX_CONFIG_SUPER_TILED_DISABLE 0x00000000
+#define VIVS_DE_BLOCK8_SRC_EX_CONFIG_SUPER_TILED_ENABLE 0x00000008
+#define VIVS_DE_BLOCK8_SRC_EX_CONFIG_MINOR_TILED__MASK 0x00000100
+#define VIVS_DE_BLOCK8_SRC_EX_CONFIG_MINOR_TILED__SHIFT 8
+#define VIVS_DE_BLOCK8_SRC_EX_CONFIG_MINOR_TILED_DISABLE 0x00000000
+#define VIVS_DE_BLOCK8_SRC_EX_CONFIG_MINOR_TILED_ENABLE 0x00000100
+
+#define VIVS_DE_BLOCK8_SRC_EX_ADDRESS(i0) (0x00012ce0 + 0x4*(i0))
+#define VIVS_DE_BLOCK8_SRC_EX_ADDRESS__ESIZE 0x00000004
+#define VIVS_DE_BLOCK8_SRC_EX_ADDRESS__LEN 0x00000008
+
+
+#endif /* STATE_2D_XML */
diff --git a/src/etnaviv/state_3d.xml.h b/src/etnaviv/state_3d.xml.h
new file mode 100644
index 0000000..c7f07ed
--- /dev/null
+++ b/src/etnaviv/state_3d.xml.h
@@ -0,0 +1,1147 @@
+#ifndef STATE_3D_XML
+#define STATE_3D_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- /home/orion/projects/etna_viv/rnndb/state.xml ( 18526 bytes, from 2013-09-11 16:52:32)
+- /home/orion/projects/etna_viv/rnndb/common.xml ( 16543 bytes, from 2013-09-01 10:53:22)
+- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21834 bytes, from 2013-09-11 15:58:37)
+- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51058 bytes, from 2013-09-01 10:53:22)
+- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54270 bytes, from 2013-09-17 15:37:52)
+- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-09-01 10:53:22)
+
+Copyright (C) 2013
+*/
+
+
+#define COMPARE_FUNC_NEVER 0x00000000
+#define COMPARE_FUNC_LESS 0x00000001
+#define COMPARE_FUNC_EQUAL 0x00000002
+#define COMPARE_FUNC_LEQUAL 0x00000003
+#define COMPARE_FUNC_GREATER 0x00000004
+#define COMPARE_FUNC_NOTEQUAL 0x00000005
+#define COMPARE_FUNC_GEQUAL 0x00000006
+#define COMPARE_FUNC_ALWAYS 0x00000007
+#define STENCIL_OP_KEEP 0x00000000
+#define STENCIL_OP_ZERO 0x00000001
+#define STENCIL_OP_REPLACE 0x00000002
+#define STENCIL_OP_INCR 0x00000003
+#define STENCIL_OP_DECR 0x00000004
+#define STENCIL_OP_INVERT 0x00000005
+#define STENCIL_OP_INCR_WRAP 0x00000006
+#define STENCIL_OP_DECR_WRAP 0x00000007
+#define BLEND_EQ_ADD 0x00000000
+#define BLEND_EQ_SUBTRACT 0x00000001
+#define BLEND_EQ_REVERSE_SUBTRACT 0x00000002
+#define BLEND_EQ_MIN 0x00000003
+#define BLEND_EQ_MAX 0x00000004
+#define BLEND_FUNC_ZERO 0x00000000
+#define BLEND_FUNC_ONE 0x00000001
+#define BLEND_FUNC_SRC_COLOR 0x00000002
+#define BLEND_FUNC_ONE_MINUS_SRC_COLOR 0x00000003
+#define BLEND_FUNC_SRC_ALPHA 0x00000004
+#define BLEND_FUNC_ONE_MINUS_SRC_ALPHA 0x00000005
+#define BLEND_FUNC_DST_ALPHA 0x00000006
+#define BLEND_FUNC_ONE_MINUS_DST_ALPHA 0x00000007
+#define BLEND_FUNC_DST_COLOR 0x00000008
+#define BLEND_FUNC_ONE_MINUS_DST_COLOR 0x00000009
+#define BLEND_FUNC_SRC_ALPHA_SATURATE 0x0000000a
+#define BLEND_FUNC_CONSTANT_ALPHA 0x0000000b
+#define BLEND_FUNC_ONE_MINUS_CONSTANT_ALPHA 0x0000000c
+#define BLEND_FUNC_CONSTANT_COLOR 0x0000000d
+#define BLEND_FUNC_ONE_MINUS_CONSTANT_COLOR 0x0000000e
+#define RS_FORMAT_X4R4G4B4 0x00000000
+#define RS_FORMAT_A4R4G4B4 0x00000001
+#define RS_FORMAT_X1R5G5B5 0x00000002
+#define RS_FORMAT_A1R5G5B5 0x00000003
+#define RS_FORMAT_R5G6B5 0x00000004
+#define RS_FORMAT_X8R8G8B8 0x00000005
+#define RS_FORMAT_A8R8G8B8 0x00000006
+#define RS_FORMAT_YUY2 0x00000007
+#define TEXTURE_FORMAT_NONE 0x00000000
+#define TEXTURE_FORMAT_A8 0x00000001
+#define TEXTURE_FORMAT_L8 0x00000002
+#define TEXTURE_FORMAT_I8 0x00000003
+#define TEXTURE_FORMAT_A8L8 0x00000004
+#define TEXTURE_FORMAT_A4R4G4B4 0x00000005
+#define TEXTURE_FORMAT_X4R4G4B4 0x00000006
+#define TEXTURE_FORMAT_A8R8G8B8 0x00000007
+#define TEXTURE_FORMAT_X8R8G8B8 0x00000008
+#define TEXTURE_FORMAT_A8B8G8R8 0x00000009
+#define TEXTURE_FORMAT_X8B8G8R8 0x0000000a
+#define TEXTURE_FORMAT_R5G6B5 0x0000000b
+#define TEXTURE_FORMAT_A1R5G5B5 0x0000000c
+#define TEXTURE_FORMAT_X1R5G5B5 0x0000000d
+#define TEXTURE_FORMAT_YUY2 0x0000000e
+#define TEXTURE_FORMAT_UYVY 0x0000000f
+#define TEXTURE_FORMAT_D16 0x00000010
+#define TEXTURE_FORMAT_D24S8 0x00000011
+#define TEXTURE_FORMAT_DXT1 0x00000013
+#define TEXTURE_FORMAT_DXT2_DXT3 0x00000014
+#define TEXTURE_FORMAT_DXT4_DXT5 0x00000015
+#define TEXTURE_FORMAT_ETC1 0x0000001e
+#define TEXTURE_FORMAT_EXT_NONE 0x00000000
+#define TEXTURE_FORMAT_EXT_A16F 0x00000007
+#define TEXTURE_FORMAT_EXT_A16L16F 0x00000008
+#define TEXTURE_FORMAT_EXT_A16B16G16R16F 0x00000009
+#define TEXTURE_FORMAT_EXT_A32F 0x0000000a
+#define TEXTURE_FORMAT_EXT_A32L32F 0x0000000b
+#define TEXTURE_FORMAT_EXT_A2B10G10R10 0x0000000c
+#define TEXTURE_FILTER_NONE 0x00000000
+#define TEXTURE_FILTER_NEAREST 0x00000001
+#define TEXTURE_FILTER_LINEAR 0x00000002
+#define TEXTURE_FILTER_ANISOTROPIC 0x00000003
+#define TEXTURE_TYPE_NONE 0x00000000
+#define TEXTURE_TYPE_2D 0x00000002
+#define TEXTURE_TYPE_CUBE_MAP 0x00000005
+#define TEXTURE_WRAPMODE_REPEAT 0x00000000
+#define TEXTURE_WRAPMODE_MIRRORED_REPEAT 0x00000001
+#define TEXTURE_WRAPMODE_CLAMP_TO_EDGE 0x00000002
+#define TEXTURE_FACE_POS_X 0x00000000
+#define TEXTURE_FACE_NEG_X 0x00000001
+#define TEXTURE_FACE_POS_Y 0x00000002
+#define TEXTURE_FACE_NEG_Y 0x00000003
+#define TEXTURE_FACE_POS_Z 0x00000004
+#define TEXTURE_FACE_NEG_Z 0x00000005
+#define TEXTURE_SWIZZLE_RED 0x00000000
+#define TEXTURE_SWIZZLE_GREEN 0x00000001
+#define TEXTURE_SWIZZLE_BLUE 0x00000002
+#define TEXTURE_SWIZZLE_ALPHA 0x00000003
+#define TEXTURE_SWIZZLE_ZERO 0x00000004
+#define TEXTURE_SWIZZLE_ONE 0x00000005
+#define TEXTURE_HALIGN_FOUR 0x00000000
+#define TEXTURE_HALIGN_SIXTEEN 0x00000001
+#define TEXTURE_HALIGN_SUPER_TILED 0x00000002
+#define TEXTURE_HALIGN_SPLIT_TILED 0x00000003
+#define TEXTURE_HALIGN_SPLIT_SUPER_TILED 0x00000004
+#define LOGIC_OP_CLEAR 0x00000000
+#define LOGIC_OP_NOR 0x00000001
+#define LOGIC_OP_AND_INVERTED 0x00000002
+#define LOGIC_OP_COPY_INVERTED 0x00000003
+#define LOGIC_OP_AND_REVERSE 0x00000004
+#define LOGIC_OP_INVERT 0x00000005
+#define LOGIC_OP_XOR 0x00000006
+#define LOGIC_OP_NAND 0x00000007
+#define LOGIC_OP_AND 0x00000008
+#define LOGIC_OP_EQUIV 0x00000009
+#define LOGIC_OP_NOOP 0x0000000a
+#define LOGIC_OP_OR_INVERTED 0x0000000b
+#define LOGIC_OP_COPY 0x0000000c
+#define LOGIC_OP_OR_REVERSE 0x0000000d
+#define LOGIC_OP_OR 0x0000000e
+#define LOGIC_OP_SET 0x0000000f
+#define VIVS_VS 0x00000000
+
+#define VIVS_VS_END_PC 0x00000800
+
+#define VIVS_VS_OUTPUT_COUNT 0x00000804
+
+#define VIVS_VS_INPUT_COUNT 0x00000808
+#define VIVS_VS_INPUT_COUNT_COUNT__MASK 0x0000000f
+#define VIVS_VS_INPUT_COUNT_COUNT__SHIFT 0
+#define VIVS_VS_INPUT_COUNT_COUNT(x) (((x) << VIVS_VS_INPUT_COUNT_COUNT__SHIFT) & VIVS_VS_INPUT_COUNT_COUNT__MASK)
+#define VIVS_VS_INPUT_COUNT_UNK8__MASK 0x00001f00
+#define VIVS_VS_INPUT_COUNT_UNK8__SHIFT 8
+#define VIVS_VS_INPUT_COUNT_UNK8(x) (((x) << VIVS_VS_INPUT_COUNT_UNK8__SHIFT) & VIVS_VS_INPUT_COUNT_UNK8__MASK)
+
+#define VIVS_VS_TEMP_REGISTER_CONTROL 0x0000080c
+#define VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS__MASK 0x0000003f
+#define VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS__SHIFT 0
+#define VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS(x) (((x) << VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS__SHIFT) & VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS__MASK)
+
+#define VIVS_VS_OUTPUT(i0) (0x00000810 + 0x4*(i0))
+#define VIVS_VS_OUTPUT__ESIZE 0x00000004
+#define VIVS_VS_OUTPUT__LEN 0x00000004
+#define VIVS_VS_OUTPUT_O0__MASK 0x000000ff
+#define VIVS_VS_OUTPUT_O0__SHIFT 0
+#define VIVS_VS_OUTPUT_O0(x) (((x) << VIVS_VS_OUTPUT_O0__SHIFT) & VIVS_VS_OUTPUT_O0__MASK)
+#define VIVS_VS_OUTPUT_O1__MASK 0x0000ff00
+#define VIVS_VS_OUTPUT_O1__SHIFT 8
+#define VIVS_VS_OUTPUT_O1(x) (((x) << VIVS_VS_OUTPUT_O1__SHIFT) & VIVS_VS_OUTPUT_O1__MASK)
+#define VIVS_VS_OUTPUT_O2__MASK 0x00ff0000
+#define VIVS_VS_OUTPUT_O2__SHIFT 16
+#define VIVS_VS_OUTPUT_O2(x) (((x) << VIVS_VS_OUTPUT_O2__SHIFT) & VIVS_VS_OUTPUT_O2__MASK)
+#define VIVS_VS_OUTPUT_O3__MASK 0xff000000
+#define VIVS_VS_OUTPUT_O3__SHIFT 24
+#define VIVS_VS_OUTPUT_O3(x) (((x) << VIVS_VS_OUTPUT_O3__SHIFT) & VIVS_VS_OUTPUT_O3__MASK)
+
+#define VIVS_VS_INPUT(i0) (0x00000820 + 0x4*(i0))
+#define VIVS_VS_INPUT__ESIZE 0x00000004
+#define VIVS_VS_INPUT__LEN 0x00000004
+#define VIVS_VS_INPUT_I0__MASK 0x000000ff
+#define VIVS_VS_INPUT_I0__SHIFT 0
+#define VIVS_VS_INPUT_I0(x) (((x) << VIVS_VS_INPUT_I0__SHIFT) & VIVS_VS_INPUT_I0__MASK)
+#define VIVS_VS_INPUT_I1__MASK 0x0000ff00
+#define VIVS_VS_INPUT_I1__SHIFT 8
+#define VIVS_VS_INPUT_I1(x) (((x) << VIVS_VS_INPUT_I1__SHIFT) & VIVS_VS_INPUT_I1__MASK)
+#define VIVS_VS_INPUT_I2__MASK 0x00ff0000
+#define VIVS_VS_INPUT_I2__SHIFT 16
+#define VIVS_VS_INPUT_I2(x) (((x) << VIVS_VS_INPUT_I2__SHIFT) & VIVS_VS_INPUT_I2__MASK)
+#define VIVS_VS_INPUT_I3__MASK 0xff000000
+#define VIVS_VS_INPUT_I3__SHIFT 24
+#define VIVS_VS_INPUT_I3(x) (((x) << VIVS_VS_INPUT_I3__SHIFT) & VIVS_VS_INPUT_I3__MASK)
+
+#define VIVS_VS_LOAD_BALANCING 0x00000830
+#define VIVS_VS_LOAD_BALANCING_A__MASK 0x000000ff
+#define VIVS_VS_LOAD_BALANCING_A__SHIFT 0
+#define VIVS_VS_LOAD_BALANCING_A(x) (((x) << VIVS_VS_LOAD_BALANCING_A__SHIFT) & VIVS_VS_LOAD_BALANCING_A__MASK)
+#define VIVS_VS_LOAD_BALANCING_B__MASK 0x0000ff00
+#define VIVS_VS_LOAD_BALANCING_B__SHIFT 8
+#define VIVS_VS_LOAD_BALANCING_B(x) (((x) << VIVS_VS_LOAD_BALANCING_B__SHIFT) & VIVS_VS_LOAD_BALANCING_B__MASK)
+#define VIVS_VS_LOAD_BALANCING_C__MASK 0x00ff0000
+#define VIVS_VS_LOAD_BALANCING_C__SHIFT 16
+#define VIVS_VS_LOAD_BALANCING_C(x) (((x) << VIVS_VS_LOAD_BALANCING_C__SHIFT) & VIVS_VS_LOAD_BALANCING_C__MASK)
+#define VIVS_VS_LOAD_BALANCING_D__MASK 0xff000000
+#define VIVS_VS_LOAD_BALANCING_D__SHIFT 24
+#define VIVS_VS_LOAD_BALANCING_D(x) (((x) << VIVS_VS_LOAD_BALANCING_D__SHIFT) & VIVS_VS_LOAD_BALANCING_D__MASK)
+
+#define VIVS_VS_PERF_COUNTER 0x00000834
+
+#define VIVS_VS_START_PC 0x00000838
+
+#define VIVS_VS_UNK00850 0x00000850
+
+#define VIVS_VS_UNK00854 0x00000854
+
+#define VIVS_VS_UNK00858 0x00000858
+
+#define VIVS_VS_RANGE 0x0000085c
+#define VIVS_VS_RANGE_LOW__MASK 0x0000ffff
+#define VIVS_VS_RANGE_LOW__SHIFT 0
+#define VIVS_VS_RANGE_LOW(x) (((x) << VIVS_VS_RANGE_LOW__SHIFT) & VIVS_VS_RANGE_LOW__MASK)
+#define VIVS_VS_RANGE_HIGH__MASK 0xffff0000
+#define VIVS_VS_RANGE_HIGH__SHIFT 16
+#define VIVS_VS_RANGE_HIGH(x) (((x) << VIVS_VS_RANGE_HIGH__SHIFT) & VIVS_VS_RANGE_HIGH__MASK)
+
+#define VIVS_VS_NEW_UNK00860 0x00000860
+
+#define VIVS_VS_INST_MEM(i0) (0x00004000 + 0x4*(i0))
+#define VIVS_VS_INST_MEM__ESIZE 0x00000004
+#define VIVS_VS_INST_MEM__LEN 0x00000400
+
+#define VIVS_VS_UNIFORMS(i0) (0x00005000 + 0x4*(i0))
+#define VIVS_VS_UNIFORMS__ESIZE 0x00000004
+#define VIVS_VS_UNIFORMS__LEN 0x00000400
+
+#define VIVS_CL 0x00000000
+
+#define VIVS_CL_CONFIG 0x00000900
+#define VIVS_CL_CONFIG_DIMENSIONS__MASK 0x00000003
+#define VIVS_CL_CONFIG_DIMENSIONS__SHIFT 0
+#define VIVS_CL_CONFIG_DIMENSIONS(x) (((x) << VIVS_CL_CONFIG_DIMENSIONS__SHIFT) & VIVS_CL_CONFIG_DIMENSIONS__MASK)
+#define VIVS_CL_CONFIG_TRAVERSE_ORDER__MASK 0x00000070
+#define VIVS_CL_CONFIG_TRAVERSE_ORDER__SHIFT 4
+#define VIVS_CL_CONFIG_TRAVERSE_ORDER(x) (((x) << VIVS_CL_CONFIG_TRAVERSE_ORDER__SHIFT) & VIVS_CL_CONFIG_TRAVERSE_ORDER__MASK)
+#define VIVS_CL_CONFIG_ENABLE_SWATH_X 0x00000100
+#define VIVS_CL_CONFIG_ENABLE_SWATH_Y 0x00000200
+#define VIVS_CL_CONFIG_ENABLE_SWATH_Z 0x00000400
+#define VIVS_CL_CONFIG_SWATH_SIZE_X__MASK 0x0000f000
+#define VIVS_CL_CONFIG_SWATH_SIZE_X__SHIFT 12
+#define VIVS_CL_CONFIG_SWATH_SIZE_X(x) (((x) << VIVS_CL_CONFIG_SWATH_SIZE_X__SHIFT) & VIVS_CL_CONFIG_SWATH_SIZE_X__MASK)
+#define VIVS_CL_CONFIG_SWATH_SIZE_Y__MASK 0x000f0000
+#define VIVS_CL_CONFIG_SWATH_SIZE_Y__SHIFT 16
+#define VIVS_CL_CONFIG_SWATH_SIZE_Y(x) (((x) << VIVS_CL_CONFIG_SWATH_SIZE_Y__SHIFT) & VIVS_CL_CONFIG_SWATH_SIZE_Y__MASK)
+#define VIVS_CL_CONFIG_SWATH_SIZE_Z__MASK 0x00f00000
+#define VIVS_CL_CONFIG_SWATH_SIZE_Z__SHIFT 20
+#define VIVS_CL_CONFIG_SWATH_SIZE_Z(x) (((x) << VIVS_CL_CONFIG_SWATH_SIZE_Z__SHIFT) & VIVS_CL_CONFIG_SWATH_SIZE_Z__MASK)
+#define VIVS_CL_CONFIG_VALUE_ORDER__MASK 0x07000000
+#define VIVS_CL_CONFIG_VALUE_ORDER__SHIFT 24
+#define VIVS_CL_CONFIG_VALUE_ORDER(x) (((x) << VIVS_CL_CONFIG_VALUE_ORDER__SHIFT) & VIVS_CL_CONFIG_VALUE_ORDER__MASK)
+
+#define VIVS_CL_GLOBAL_X 0x00000904
+#define VIVS_CL_GLOBAL_X_SIZE__MASK 0x0000ffff
+#define VIVS_CL_GLOBAL_X_SIZE__SHIFT 0
+#define VIVS_CL_GLOBAL_X_SIZE(x) (((x) << VIVS_CL_GLOBAL_X_SIZE__SHIFT) & VIVS_CL_GLOBAL_X_SIZE__MASK)
+#define VIVS_CL_GLOBAL_X_OFFSET__MASK 0xffff0000
+#define VIVS_CL_GLOBAL_X_OFFSET__SHIFT 16
+#define VIVS_CL_GLOBAL_X_OFFSET(x) (((x) << VIVS_CL_GLOBAL_X_OFFSET__SHIFT) & VIVS_CL_GLOBAL_X_OFFSET__MASK)
+
+#define VIVS_CL_GLOBAL_Y 0x00000908
+#define VIVS_CL_GLOBAL_Y_SIZE__MASK 0x0000ffff
+#define VIVS_CL_GLOBAL_Y_SIZE__SHIFT 0
+#define VIVS_CL_GLOBAL_Y_SIZE(x) (((x) << VIVS_CL_GLOBAL_Y_SIZE__SHIFT) & VIVS_CL_GLOBAL_Y_SIZE__MASK)
+#define VIVS_CL_GLOBAL_Y_OFFSET__MASK 0xffff0000
+#define VIVS_CL_GLOBAL_Y_OFFSET__SHIFT 16
+#define VIVS_CL_GLOBAL_Y_OFFSET(x) (((x) << VIVS_CL_GLOBAL_Y_OFFSET__SHIFT) & VIVS_CL_GLOBAL_Y_OFFSET__MASK)
+
+#define VIVS_CL_GLOBAL_Z 0x0000090c
+#define VIVS_CL_GLOBAL_Z_SIZE__MASK 0x0000ffff
+#define VIVS_CL_GLOBAL_Z_SIZE__SHIFT 0
+#define VIVS_CL_GLOBAL_Z_SIZE(x) (((x) << VIVS_CL_GLOBAL_Z_SIZE__SHIFT) & VIVS_CL_GLOBAL_Z_SIZE__MASK)
+#define VIVS_CL_GLOBAL_Z_OFFSET__MASK 0xffff0000
+#define VIVS_CL_GLOBAL_Z_OFFSET__SHIFT 16
+#define VIVS_CL_GLOBAL_Z_OFFSET(x) (((x) << VIVS_CL_GLOBAL_Z_OFFSET__SHIFT) & VIVS_CL_GLOBAL_Z_OFFSET__MASK)
+
+#define VIVS_CL_WORKGROUP_X 0x00000910
+#define VIVS_CL_WORKGROUP_X_SIZE__MASK 0x000003ff
+#define VIVS_CL_WORKGROUP_X_SIZE__SHIFT 0
+#define VIVS_CL_WORKGROUP_X_SIZE(x) (((x) << VIVS_CL_WORKGROUP_X_SIZE__SHIFT) & VIVS_CL_WORKGROUP_X_SIZE__MASK)
+#define VIVS_CL_WORKGROUP_X_COUNT__MASK 0xffff0000
+#define VIVS_CL_WORKGROUP_X_COUNT__SHIFT 16
+#define VIVS_CL_WORKGROUP_X_COUNT(x) (((x) << VIVS_CL_WORKGROUP_X_COUNT__SHIFT) & VIVS_CL_WORKGROUP_X_COUNT__MASK)
+
+#define VIVS_CL_WORKGROUP_Y 0x00000914
+#define VIVS_CL_WORKGROUP_Y_SIZE__MASK 0x000003ff
+#define VIVS_CL_WORKGROUP_Y_SIZE__SHIFT 0
+#define VIVS_CL_WORKGROUP_Y_SIZE(x) (((x) << VIVS_CL_WORKGROUP_Y_SIZE__SHIFT) & VIVS_CL_WORKGROUP_Y_SIZE__MASK)
+#define VIVS_CL_WORKGROUP_Y_COUNT__MASK 0xffff0000
+#define VIVS_CL_WORKGROUP_Y_COUNT__SHIFT 16
+#define VIVS_CL_WORKGROUP_Y_COUNT(x) (((x) << VIVS_CL_WORKGROUP_Y_COUNT__SHIFT) & VIVS_CL_WORKGROUP_Y_COUNT__MASK)
+
+#define VIVS_CL_WORKGROUP_Z 0x00000918
+#define VIVS_CL_WORKGROUP_Z_SIZE__MASK 0x000003ff
+#define VIVS_CL_WORKGROUP_Z_SIZE__SHIFT 0
+#define VIVS_CL_WORKGROUP_Z_SIZE(x) (((x) << VIVS_CL_WORKGROUP_Z_SIZE__SHIFT) & VIVS_CL_WORKGROUP_Z_SIZE__MASK)
+#define VIVS_CL_WORKGROUP_Z_COUNT__MASK 0xffff0000
+#define VIVS_CL_WORKGROUP_Z_COUNT__SHIFT 16
+#define VIVS_CL_WORKGROUP_Z_COUNT(x) (((x) << VIVS_CL_WORKGROUP_Z_COUNT__SHIFT) & VIVS_CL_WORKGROUP_Z_COUNT__MASK)
+
+#define VIVS_CL_THREAD_ALLOCATION 0x0000091c
+
+#define VIVS_CL_KICKER 0x00000920
+
+#define VIVS_CL_UNK00924 0x00000924
+
+#define VIVS_PA 0x00000000
+
+#define VIVS_PA_VIEWPORT_SCALE_X 0x00000a00
+
+#define VIVS_PA_VIEWPORT_SCALE_Y 0x00000a04
+
+#define VIVS_PA_VIEWPORT_SCALE_Z 0x00000a08
+
+#define VIVS_PA_VIEWPORT_OFFSET_X 0x00000a0c
+
+#define VIVS_PA_VIEWPORT_OFFSET_Y 0x00000a10
+
+#define VIVS_PA_VIEWPORT_OFFSET_Z 0x00000a14
+
+#define VIVS_PA_LINE_WIDTH 0x00000a18
+
+#define VIVS_PA_POINT_SIZE 0x00000a1c
+
+#define VIVS_PA_SYSTEM_MODE 0x00000a28
+#define VIVS_PA_SYSTEM_MODE_UNK0 0x00000001
+#define VIVS_PA_SYSTEM_MODE_UNK4 0x00000010
+
+#define VIVS_PA_W_CLIP_LIMIT 0x00000a2c
+
+#define VIVS_PA_ATTRIBUTE_ELEMENT_COUNT 0x00000a30
+#define VIVS_PA_ATTRIBUTE_ELEMENT_COUNT_UNK0__MASK 0x000000ff
+#define VIVS_PA_ATTRIBUTE_ELEMENT_COUNT_UNK0__SHIFT 0
+#define VIVS_PA_ATTRIBUTE_ELEMENT_COUNT_UNK0(x) (((x) << VIVS_PA_ATTRIBUTE_ELEMENT_COUNT_UNK0__SHIFT) & VIVS_PA_ATTRIBUTE_ELEMENT_COUNT_UNK0__MASK)
+#define VIVS_PA_ATTRIBUTE_ELEMENT_COUNT_COUNT__MASK 0x0000ff00
+#define VIVS_PA_ATTRIBUTE_ELEMENT_COUNT_COUNT__SHIFT 8
+#define VIVS_PA_ATTRIBUTE_ELEMENT_COUNT_COUNT(x) (((x) << VIVS_PA_ATTRIBUTE_ELEMENT_COUNT_COUNT__SHIFT) & VIVS_PA_ATTRIBUTE_ELEMENT_COUNT_COUNT__MASK)
+
+#define VIVS_PA_CONFIG 0x00000a34
+#define VIVS_PA_CONFIG_POINT_SIZE_ENABLE 0x00000004
+#define VIVS_PA_CONFIG_POINT_SIZE_ENABLE_MASK 0x00000008
+#define VIVS_PA_CONFIG_POINT_SPRITE_ENABLE 0x00000010
+#define VIVS_PA_CONFIG_POINT_SPRITE_ENABLE_MASK 0x00000020
+#define VIVS_PA_CONFIG_CULL_FACE_MODE__MASK 0x00000300
+#define VIVS_PA_CONFIG_CULL_FACE_MODE__SHIFT 8
+#define VIVS_PA_CONFIG_CULL_FACE_MODE_OFF 0x00000000
+#define VIVS_PA_CONFIG_CULL_FACE_MODE_CW 0x00000100
+#define VIVS_PA_CONFIG_CULL_FACE_MODE_CCW 0x00000200
+#define VIVS_PA_CONFIG_CULL_FACE_MODE_MASK 0x00000400
+#define VIVS_PA_CONFIG_FILL_MODE__MASK 0x00003000
+#define VIVS_PA_CONFIG_FILL_MODE__SHIFT 12
+#define VIVS_PA_CONFIG_FILL_MODE_POINT 0x00000000
+#define VIVS_PA_CONFIG_FILL_MODE_WIREFRAME 0x00001000
+#define VIVS_PA_CONFIG_FILL_MODE_SOLID 0x00002000
+#define VIVS_PA_CONFIG_FILL_MODE_MASK 0x00004000
+#define VIVS_PA_CONFIG_SHADE_MODEL__MASK 0x00030000
+#define VIVS_PA_CONFIG_SHADE_MODEL__SHIFT 16
+#define VIVS_PA_CONFIG_SHADE_MODEL_FLAT 0x00000000
+#define VIVS_PA_CONFIG_SHADE_MODEL_SMOOTH 0x00010000
+#define VIVS_PA_CONFIG_SHADE_MODEL_MASK 0x00040000
+#define VIVS_PA_CONFIG_UNK22 0x00400000
+#define VIVS_PA_CONFIG_UNK22_MASK 0x00800000
+
+#define VIVS_PA_LINE_UNK00A38 0x00000a38
+
+#define VIVS_PA_LINE_UNK00A3C 0x00000a3c
+
+#define VIVS_PA_SHADER_ATTRIBUTES(i0) (0x00000a40 + 0x4*(i0))
+#define VIVS_PA_SHADER_ATTRIBUTES__ESIZE 0x00000004
+#define VIVS_PA_SHADER_ATTRIBUTES__LEN 0x0000000a
+#define VIVS_PA_SHADER_ATTRIBUTES_BYPASS_FLAT 0x00000001
+#define VIVS_PA_SHADER_ATTRIBUTES_UNK4__MASK 0x000000f0
+#define VIVS_PA_SHADER_ATTRIBUTES_UNK4__SHIFT 4
+#define VIVS_PA_SHADER_ATTRIBUTES_UNK4(x) (((x) << VIVS_PA_SHADER_ATTRIBUTES_UNK4__SHIFT) & VIVS_PA_SHADER_ATTRIBUTES_UNK4__MASK)
+#define VIVS_PA_SHADER_ATTRIBUTES_UNK8__MASK 0x00000f00
+#define VIVS_PA_SHADER_ATTRIBUTES_UNK8__SHIFT 8
+#define VIVS_PA_SHADER_ATTRIBUTES_UNK8(x) (((x) << VIVS_PA_SHADER_ATTRIBUTES_UNK8__SHIFT) & VIVS_PA_SHADER_ATTRIBUTES_UNK8__MASK)
+
+#define VIVS_PA_VIEWPORT_UNK00A80 0x00000a80
+
+#define VIVS_PA_VIEWPORT_UNK00A84 0x00000a84
+
+#define VIVS_PA_VIEWPORT_UNK00A8C 0x00000a8c
+
+#define VIVS_SE 0x00000000
+
+#define VIVS_SE_SCISSOR_LEFT 0x00000c00
+
+#define VIVS_SE_SCISSOR_TOP 0x00000c04
+
+#define VIVS_SE_SCISSOR_RIGHT 0x00000c08
+
+#define VIVS_SE_SCISSOR_BOTTOM 0x00000c0c
+
+#define VIVS_SE_DEPTH_SCALE 0x00000c10
+
+#define VIVS_SE_DEPTH_BIAS 0x00000c14
+
+#define VIVS_SE_CONFIG 0x00000c18
+#define VIVS_SE_CONFIG_LAST_PIXEL_ENABLE 0x00000001
+
+#define VIVS_SE_UNK00C1C 0x00000c1c
+
+#define VIVS_SE_CLIP_RIGHT 0x00000c20
+
+#define VIVS_SE_CLIP_BOTTOM 0x00000c24
+
+#define VIVS_RA 0x00000000
+
+#define VIVS_RA_CONTROL 0x00000e00
+#define VIVS_RA_CONTROL_UNK0 0x00000001
+#define VIVS_RA_CONTROL_LAST_VARYING_2X 0x00000002
+
+#define VIVS_RA_MULTISAMPLE_UNK00E04 0x00000e04
+
+#define VIVS_RA_EARLY_DEPTH 0x00000e08
+
+#define VIVS_RA_MULTISAMPLE_UNK00E10(i0) (0x00000e10 + 0x4*(i0))
+#define VIVS_RA_MULTISAMPLE_UNK00E10__ESIZE 0x00000004
+#define VIVS_RA_MULTISAMPLE_UNK00E10__LEN 0x00000004
+
+#define VIVS_RA_CENTROID_TABLE(i0) (0x00000e40 + 0x4*(i0))
+#define VIVS_RA_CENTROID_TABLE__ESIZE 0x00000004
+#define VIVS_RA_CENTROID_TABLE__LEN 0x00000010
+
+#define VIVS_PS 0x00000000
+
+#define VIVS_PS_END_PC 0x00001000
+
+#define VIVS_PS_OUTPUT_REG 0x00001004
+
+#define VIVS_PS_INPUT_COUNT 0x00001008
+#define VIVS_PS_INPUT_COUNT_COUNT__MASK 0x0000000f
+#define VIVS_PS_INPUT_COUNT_COUNT__SHIFT 0
+#define VIVS_PS_INPUT_COUNT_COUNT(x) (((x) << VIVS_PS_INPUT_COUNT_COUNT__SHIFT) & VIVS_PS_INPUT_COUNT_COUNT__MASK)
+#define VIVS_PS_INPUT_COUNT_UNK8__MASK 0x00001f00
+#define VIVS_PS_INPUT_COUNT_UNK8__SHIFT 8
+#define VIVS_PS_INPUT_COUNT_UNK8(x) (((x) << VIVS_PS_INPUT_COUNT_UNK8__SHIFT) & VIVS_PS_INPUT_COUNT_UNK8__MASK)
+
+#define VIVS_PS_TEMP_REGISTER_CONTROL 0x0000100c
+#define VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS__MASK 0x0000003f
+#define VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS__SHIFT 0
+#define VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS(x) (((x) << VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS__SHIFT) & VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS__MASK)
+
+#define VIVS_PS_CONTROL 0x00001010
+#define VIVS_PS_CONTROL_BYPASS 0x00000001
+#define VIVS_PS_CONTROL_UNK1 0x00000002
+
+#define VIVS_PS_PERF_COUNTER 0x00001014
+
+#define VIVS_PS_START_PC 0x00001018
+
+#define VIVS_PS_RANGE 0x0000101c
+#define VIVS_PS_RANGE_LOW__MASK 0x0000ffff
+#define VIVS_PS_RANGE_LOW__SHIFT 0
+#define VIVS_PS_RANGE_LOW(x) (((x) << VIVS_PS_RANGE_LOW__SHIFT) & VIVS_PS_RANGE_LOW__MASK)
+#define VIVS_PS_RANGE_HIGH__MASK 0xffff0000
+#define VIVS_PS_RANGE_HIGH__SHIFT 16
+#define VIVS_PS_RANGE_HIGH(x) (((x) << VIVS_PS_RANGE_HIGH__SHIFT) & VIVS_PS_RANGE_HIGH__MASK)
+
+#define VIVS_PS_INST_MEM(i0) (0x00006000 + 0x4*(i0))
+#define VIVS_PS_INST_MEM__ESIZE 0x00000004
+#define VIVS_PS_INST_MEM__LEN 0x00000400
+
+#define VIVS_PS_UNIFORMS(i0) (0x00007000 + 0x4*(i0))
+#define VIVS_PS_UNIFORMS__ESIZE 0x00000004
+#define VIVS_PS_UNIFORMS__LEN 0x00000400
+
+#define VIVS_PE 0x00000000
+
+#define VIVS_PE_DEPTH_CONFIG 0x00001400
+#define VIVS_PE_DEPTH_CONFIG_DEPTH_MODE__MASK 0x00000003
+#define VIVS_PE_DEPTH_CONFIG_DEPTH_MODE__SHIFT 0
+#define VIVS_PE_DEPTH_CONFIG_DEPTH_MODE_NONE 0x00000000
+#define VIVS_PE_DEPTH_CONFIG_DEPTH_MODE_Z 0x00000001
+#define VIVS_PE_DEPTH_CONFIG_DEPTH_MODE_W 0x00000002
+#define VIVS_PE_DEPTH_CONFIG_DEPTH_MODE_MASK 0x00000008
+#define VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT__MASK 0x00000010
+#define VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT__SHIFT 4
+#define VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT_D16 0x00000000
+#define VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT_D24S8 0x00000010
+#define VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT_MASK 0x00000020
+#define VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC__MASK 0x00000700
+#define VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC__SHIFT 8
+#define VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC(x) (((x) << VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC__SHIFT) & VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC__MASK)
+#define VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC_MASK 0x00000800
+#define VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE 0x00001000
+#define VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE_MASK 0x00002000
+#define VIVS_PE_DEPTH_CONFIG_EARLY_Z 0x00010000
+#define VIVS_PE_DEPTH_CONFIG_EARLY_Z_MASK 0x00020000
+#define VIVS_PE_DEPTH_CONFIG_ONLY_DEPTH 0x00100000
+#define VIVS_PE_DEPTH_CONFIG_ONLY_DEPTH_MASK 0x00200000
+#define VIVS_PE_DEPTH_CONFIG_DISABLE_ZS 0x01000000
+#define VIVS_PE_DEPTH_CONFIG_DISABLE_ZS_MASK 0x02000000
+#define VIVS_PE_DEPTH_CONFIG_SUPER_TILED 0x04000000
+#define VIVS_PE_DEPTH_CONFIG_SUPER_TILED_MASK 0x08000000
+
+#define VIVS_PE_DEPTH_NEAR 0x00001404
+
+#define VIVS_PE_DEPTH_FAR 0x00001408
+
+#define VIVS_PE_DEPTH_NORMALIZE 0x0000140c
+
+#define VIVS_PE_DEPTH_ADDR 0x00001410
+
+#define VIVS_PE_DEPTH_STRIDE 0x00001414
+
+#define VIVS_PE_STENCIL_OP 0x00001418
+#define VIVS_PE_STENCIL_OP_FUNC_FRONT__MASK 0x00000007
+#define VIVS_PE_STENCIL_OP_FUNC_FRONT__SHIFT 0
+#define VIVS_PE_STENCIL_OP_FUNC_FRONT(x) (((x) << VIVS_PE_STENCIL_OP_FUNC_FRONT__SHIFT) & VIVS_PE_STENCIL_OP_FUNC_FRONT__MASK)
+#define VIVS_PE_STENCIL_OP_FUNC_FRONT_MASK 0x00000008
+#define VIVS_PE_STENCIL_OP_PASS_FRONT__MASK 0x00000070
+#define VIVS_PE_STENCIL_OP_PASS_FRONT__SHIFT 4
+#define VIVS_PE_STENCIL_OP_PASS_FRONT(x) (((x) << VIVS_PE_STENCIL_OP_PASS_FRONT__SHIFT) & VIVS_PE_STENCIL_OP_PASS_FRONT__MASK)
+#define VIVS_PE_STENCIL_OP_PASS_FRONT_MASK 0x00000080
+#define VIVS_PE_STENCIL_OP_FAIL_FRONT__MASK 0x00000700
+#define VIVS_PE_STENCIL_OP_FAIL_FRONT__SHIFT 8
+#define VIVS_PE_STENCIL_OP_FAIL_FRONT(x) (((x) << VIVS_PE_STENCIL_OP_FAIL_FRONT__SHIFT) & VIVS_PE_STENCIL_OP_FAIL_FRONT__MASK)
+#define VIVS_PE_STENCIL_OP_FAIL_FRONT_MASK 0x00000800
+#define VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT__MASK 0x00007000
+#define VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT__SHIFT 12
+#define VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT(x) (((x) << VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT__SHIFT) & VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT__MASK)
+#define VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT_MASK 0x00008000
+#define VIVS_PE_STENCIL_OP_FUNC_BACK__MASK 0x00070000
+#define VIVS_PE_STENCIL_OP_FUNC_BACK__SHIFT 16
+#define VIVS_PE_STENCIL_OP_FUNC_BACK(x) (((x) << VIVS_PE_STENCIL_OP_FUNC_BACK__SHIFT) & VIVS_PE_STENCIL_OP_FUNC_BACK__MASK)
+#define VIVS_PE_STENCIL_OP_FUNC_BACK_MASK 0x00080000
+#define VIVS_PE_STENCIL_OP_PASS_BACK__MASK 0x00700000
+#define VIVS_PE_STENCIL_OP_PASS_BACK__SHIFT 20
+#define VIVS_PE_STENCIL_OP_PASS_BACK(x) (((x) << VIVS_PE_STENCIL_OP_PASS_BACK__SHIFT) & VIVS_PE_STENCIL_OP_PASS_BACK__MASK)
+#define VIVS_PE_STENCIL_OP_PASS_BACK_MASK 0x00800000
+#define VIVS_PE_STENCIL_OP_FAIL_BACK__MASK 0x07000000
+#define VIVS_PE_STENCIL_OP_FAIL_BACK__SHIFT 24
+#define VIVS_PE_STENCIL_OP_FAIL_BACK(x) (((x) << VIVS_PE_STENCIL_OP_FAIL_BACK__SHIFT) & VIVS_PE_STENCIL_OP_FAIL_BACK__MASK)
+#define VIVS_PE_STENCIL_OP_FAIL_BACK_MASK 0x08000000
+#define VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK__MASK 0x70000000
+#define VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK__SHIFT 28
+#define VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK(x) (((x) << VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK__SHIFT) & VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK__MASK)
+#define VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK_MASK 0x80000000
+
+#define VIVS_PE_STENCIL_CONFIG 0x0000141c
+#define VIVS_PE_STENCIL_CONFIG_MODE__MASK 0x00000003
+#define VIVS_PE_STENCIL_CONFIG_MODE__SHIFT 0
+#define VIVS_PE_STENCIL_CONFIG_MODE_DISABLED 0x00000000
+#define VIVS_PE_STENCIL_CONFIG_MODE_ONE_SIDED 0x00000001
+#define VIVS_PE_STENCIL_CONFIG_MODE_TWO_SIDED 0x00000002
+#define VIVS_PE_STENCIL_CONFIG_MODE_MASK 0x00000010
+#define VIVS_PE_STENCIL_CONFIG_REF_FRONT_MASK 0x00000020
+#define VIVS_PE_STENCIL_CONFIG_MASK_FRONT_MASK 0x00000040
+#define VIVS_PE_STENCIL_CONFIG_WRITE_MASK_MASK 0x00000080
+#define VIVS_PE_STENCIL_CONFIG_REF_FRONT__MASK 0x0000ff00
+#define VIVS_PE_STENCIL_CONFIG_REF_FRONT__SHIFT 8
+#define VIVS_PE_STENCIL_CONFIG_REF_FRONT(x) (((x) << VIVS_PE_STENCIL_CONFIG_REF_FRONT__SHIFT) & VIVS_PE_STENCIL_CONFIG_REF_FRONT__MASK)
+#define VIVS_PE_STENCIL_CONFIG_MASK_FRONT__MASK 0x00ff0000
+#define VIVS_PE_STENCIL_CONFIG_MASK_FRONT__SHIFT 16
+#define VIVS_PE_STENCIL_CONFIG_MASK_FRONT(x) (((x) << VIVS_PE_STENCIL_CONFIG_MASK_FRONT__SHIFT) & VIVS_PE_STENCIL_CONFIG_MASK_FRONT__MASK)
+#define VIVS_PE_STENCIL_CONFIG_WRITE_MASK__MASK 0xff000000
+#define VIVS_PE_STENCIL_CONFIG_WRITE_MASK__SHIFT 24
+#define VIVS_PE_STENCIL_CONFIG_WRITE_MASK(x) (((x) << VIVS_PE_STENCIL_CONFIG_WRITE_MASK__SHIFT) & VIVS_PE_STENCIL_CONFIG_WRITE_MASK__MASK)
+
+#define VIVS_PE_ALPHA_OP 0x00001420
+#define VIVS_PE_ALPHA_OP_ALPHA_TEST 0x00000001
+#define VIVS_PE_ALPHA_OP_ALPHA_TEST_MASK 0x00000002
+#define VIVS_PE_ALPHA_OP_ALPHA_FUNC__MASK 0x00000070
+#define VIVS_PE_ALPHA_OP_ALPHA_FUNC__SHIFT 4
+#define VIVS_PE_ALPHA_OP_ALPHA_FUNC(x) (((x) << VIVS_PE_ALPHA_OP_ALPHA_FUNC__SHIFT) & VIVS_PE_ALPHA_OP_ALPHA_FUNC__MASK)
+#define VIVS_PE_ALPHA_OP_ALPHA_FUNC_MASK 0x00000080
+#define VIVS_PE_ALPHA_OP_ALPHA_REF__MASK 0x0000ff00
+#define VIVS_PE_ALPHA_OP_ALPHA_REF__SHIFT 8
+#define VIVS_PE_ALPHA_OP_ALPHA_REF(x) (((x) << VIVS_PE_ALPHA_OP_ALPHA_REF__SHIFT) & VIVS_PE_ALPHA_OP_ALPHA_REF__MASK)
+#define VIVS_PE_ALPHA_OP_ALPHA_REF_MASKFUNC_MASK 0x00010000
+
+#define VIVS_PE_ALPHA_BLEND_COLOR 0x00001424
+#define VIVS_PE_ALPHA_BLEND_COLOR_B__MASK 0x000000ff
+#define VIVS_PE_ALPHA_BLEND_COLOR_B__SHIFT 0
+#define VIVS_PE_ALPHA_BLEND_COLOR_B(x) (((x) << VIVS_PE_ALPHA_BLEND_COLOR_B__SHIFT) & VIVS_PE_ALPHA_BLEND_COLOR_B__MASK)
+#define VIVS_PE_ALPHA_BLEND_COLOR_G__MASK 0x0000ff00
+#define VIVS_PE_ALPHA_BLEND_COLOR_G__SHIFT 8
+#define VIVS_PE_ALPHA_BLEND_COLOR_G(x) (((x) << VIVS_PE_ALPHA_BLEND_COLOR_G__SHIFT) & VIVS_PE_ALPHA_BLEND_COLOR_G__MASK)
+#define VIVS_PE_ALPHA_BLEND_COLOR_R__MASK 0x00ff0000
+#define VIVS_PE_ALPHA_BLEND_COLOR_R__SHIFT 16
+#define VIVS_PE_ALPHA_BLEND_COLOR_R(x) (((x) << VIVS_PE_ALPHA_BLEND_COLOR_R__SHIFT) & VIVS_PE_ALPHA_BLEND_COLOR_R__MASK)
+#define VIVS_PE_ALPHA_BLEND_COLOR_A__MASK 0xff000000
+#define VIVS_PE_ALPHA_BLEND_COLOR_A__SHIFT 24
+#define VIVS_PE_ALPHA_BLEND_COLOR_A(x) (((x) << VIVS_PE_ALPHA_BLEND_COLOR_A__SHIFT) & VIVS_PE_ALPHA_BLEND_COLOR_A__MASK)
+
+#define VIVS_PE_ALPHA_CONFIG 0x00001428
+#define VIVS_PE_ALPHA_CONFIG_BLEND_ENABLE_COLOR 0x00000001
+#define VIVS_PE_ALPHA_CONFIG_BLEND_ENABLE_COLOR_MASK 0x00000002
+#define VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR_MASK 0x00000004
+#define VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR_MASK 0x00000008
+#define VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR__MASK 0x000000f0
+#define VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR__SHIFT 4
+#define VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR(x) (((x) << VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR__SHIFT) & VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR__MASK)
+#define VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR__MASK 0x00000f00
+#define VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR__SHIFT 8
+#define VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR(x) (((x) << VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR__SHIFT) & VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR__MASK)
+#define VIVS_PE_ALPHA_CONFIG_EQ_COLOR__MASK 0x00007000
+#define VIVS_PE_ALPHA_CONFIG_EQ_COLOR__SHIFT 12
+#define VIVS_PE_ALPHA_CONFIG_EQ_COLOR(x) (((x) << VIVS_PE_ALPHA_CONFIG_EQ_COLOR__SHIFT) & VIVS_PE_ALPHA_CONFIG_EQ_COLOR__MASK)
+#define VIVS_PE_ALPHA_CONFIG_EQ_COLOR_MASK 0x00008000
+#define VIVS_PE_ALPHA_CONFIG_BLEND_SEPARATE_ALPHA 0x00010000
+#define VIVS_PE_ALPHA_CONFIG_BLEND_SEPARATE_ALPHA_MASK 0x00020000
+#define VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA_MASK 0x00040000
+#define VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA_MASK 0x00080000
+#define VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA__MASK 0x00f00000
+#define VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA__SHIFT 20
+#define VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA(x) (((x) << VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA__SHIFT) & VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA__MASK)
+#define VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA__MASK 0x0f000000
+#define VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA__SHIFT 24
+#define VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA(x) (((x) << VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA__SHIFT) & VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA__MASK)
+#define VIVS_PE_ALPHA_CONFIG_EQ_ALPHA__MASK 0x70000000
+#define VIVS_PE_ALPHA_CONFIG_EQ_ALPHA__SHIFT 28
+#define VIVS_PE_ALPHA_CONFIG_EQ_ALPHA(x) (((x) << VIVS_PE_ALPHA_CONFIG_EQ_ALPHA__SHIFT) & VIVS_PE_ALPHA_CONFIG_EQ_ALPHA__MASK)
+#define VIVS_PE_ALPHA_CONFIG_EQ_ALPHA_MASK 0x80000000
+
+#define VIVS_PE_COLOR_FORMAT 0x0000142c
+#define VIVS_PE_COLOR_FORMAT_FORMAT__MASK 0x0000000f
+#define VIVS_PE_COLOR_FORMAT_FORMAT__SHIFT 0
+#define VIVS_PE_COLOR_FORMAT_FORMAT(x) (((x) << VIVS_PE_COLOR_FORMAT_FORMAT__SHIFT) & VIVS_PE_COLOR_FORMAT_FORMAT__MASK)
+#define VIVS_PE_COLOR_FORMAT_FORMAT_MASK 0x00000010
+#define VIVS_PE_COLOR_FORMAT_COMPONENTS__MASK 0x00000f00
+#define VIVS_PE_COLOR_FORMAT_COMPONENTS__SHIFT 8
+#define VIVS_PE_COLOR_FORMAT_COMPONENTS(x) (((x) << VIVS_PE_COLOR_FORMAT_COMPONENTS__SHIFT) & VIVS_PE_COLOR_FORMAT_COMPONENTS__MASK)
+#define VIVS_PE_COLOR_FORMAT_COMPONENTS_MASK 0x00001000
+#define VIVS_PE_COLOR_FORMAT_OVERWRITE 0x00010000
+#define VIVS_PE_COLOR_FORMAT_OVERWRITE_MASK 0x00020000
+#define VIVS_PE_COLOR_FORMAT_SUPER_TILED 0x00100000
+#define VIVS_PE_COLOR_FORMAT_SUPER_TILED_MASK 0x00200000
+
+#define VIVS_PE_COLOR_ADDR 0x00001430
+
+#define VIVS_PE_COLOR_STRIDE 0x00001434
+
+#define VIVS_PE_HDEPTH_CONTROL 0x00001454
+#define VIVS_PE_HDEPTH_CONTROL_FORMAT__MASK 0x0000000f
+#define VIVS_PE_HDEPTH_CONTROL_FORMAT__SHIFT 0
+#define VIVS_PE_HDEPTH_CONTROL_FORMAT_DISABLED 0x00000000
+#define VIVS_PE_HDEPTH_CONTROL_FORMAT_D16 0x00000005
+#define VIVS_PE_HDEPTH_CONTROL_FORMAT_D24S8 0x00000008
+
+#define VIVS_PE_HDEPTH_ADDR 0x00001458
+
+#define VIVS_PE_UNK0145C 0x0000145c
+
+#define VIVS_PE_PIPE(i0) (0x00000000 + 0x4*(i0))
+#define VIVS_PE_PIPE__ESIZE 0x00000004
+#define VIVS_PE_PIPE__LEN 0x00000008
+
+#define VIVS_PE_PIPE_COLOR_ADDR(i0) (0x00001460 + 0x4*(i0))
+
+#define VIVS_PE_PIPE_DEPTH_ADDR(i0) (0x00001480 + 0x4*(i0))
+
+#define VIVS_PE_PIPE_ADDR_UNK01500(i0) (0x00001500 + 0x4*(i0))
+
+#define VIVS_PE_PIPE_ADDR_UNK01520(i0) (0x00001520 + 0x4*(i0))
+
+#define VIVS_PE_STENCIL_CONFIG_EXT 0x000014a0
+#define VIVS_PE_STENCIL_CONFIG_EXT_REF_BACK__MASK 0x000000ff
+#define VIVS_PE_STENCIL_CONFIG_EXT_REF_BACK__SHIFT 0
+#define VIVS_PE_STENCIL_CONFIG_EXT_REF_BACK(x) (((x) << VIVS_PE_STENCIL_CONFIG_EXT_REF_BACK__SHIFT) & VIVS_PE_STENCIL_CONFIG_EXT_REF_BACK__MASK)
+#define VIVS_PE_STENCIL_CONFIG_EXT_REF_BACK_MASK 0x00000100
+#define VIVS_PE_STENCIL_CONFIG_EXT_UNK16_MASK 0x00000200
+#define VIVS_PE_STENCIL_CONFIG_EXT_UNK16__MASK 0xffff0000
+#define VIVS_PE_STENCIL_CONFIG_EXT_UNK16__SHIFT 16
+#define VIVS_PE_STENCIL_CONFIG_EXT_UNK16(x) (((x) << VIVS_PE_STENCIL_CONFIG_EXT_UNK16__SHIFT) & VIVS_PE_STENCIL_CONFIG_EXT_UNK16__MASK)
+
+#define VIVS_PE_LOGIC_OP 0x000014a4
+#define VIVS_PE_LOGIC_OP_OP__MASK 0x0000000f
+#define VIVS_PE_LOGIC_OP_OP__SHIFT 0
+#define VIVS_PE_LOGIC_OP_OP(x) (((x) << VIVS_PE_LOGIC_OP_OP__SHIFT) & VIVS_PE_LOGIC_OP_OP__MASK)
+#define VIVS_PE_LOGIC_OP_OP_MASK 0x00000010
+
+#define VIVS_PE_DITHER(i0) (0x000014a8 + 0x4*(i0))
+#define VIVS_PE_DITHER__ESIZE 0x00000004
+#define VIVS_PE_DITHER__LEN 0x00000002
+
+#define VIVS_PE_UNK014B0 0x000014b0
+
+#define VIVS_PE_UNK014B4 0x000014b4
+
+#define VIVS_PE_UNK01580(i0) (0x00001580 + 0x4*(i0))
+#define VIVS_PE_UNK01580__ESIZE 0x00000004
+#define VIVS_PE_UNK01580__LEN 0x00000003
+
+#define VIVS_CO 0x00000000
+
+#define VIVS_CO_UNK03008 0x00003008
+
+#define VIVS_CO_KICKER 0x0000300c
+
+#define VIVS_CO_UNK03010 0x00003010
+
+#define VIVS_CO_UNK03014 0x00003014
+
+#define VIVS_CO_UNK03018 0x00003018
+
+#define VIVS_CO_UNK0301C 0x0000301c
+
+#define VIVS_CO_UNK03020 0x00003020
+
+#define VIVS_CO_UNK03024 0x00003024
+
+#define VIVS_CO_UNK03040 0x00003040
+
+#define VIVS_CO_UNK03044 0x00003044
+
+#define VIVS_CO_UNK03048 0x00003048
+
+#define VIVS_CO_SAMPLER(i0) (0x00000000 + 0x4*(i0))
+#define VIVS_CO_SAMPLER__ESIZE 0x00000004
+#define VIVS_CO_SAMPLER__LEN 0x00000008
+
+#define VIVS_CO_SAMPLER_UNK03060(i0) (0x00003060 + 0x4*(i0))
+
+#define VIVS_CO_SAMPLER_UNK03080(i0) (0x00003080 + 0x4*(i0))
+
+#define VIVS_CO_SAMPLER_UNK030A0(i0) (0x000030a0 + 0x4*(i0))
+
+#define VIVS_CO_SAMPLER_UNK030C0(i0) (0x000030c0 + 0x4*(i0))
+
+#define VIVS_CO_SAMPLER_UNK030E0(i0) (0x000030e0 + 0x4*(i0))
+
+#define VIVS_CO_SAMPLER_UNK03100(i0) (0x00003100 + 0x4*(i0))
+
+#define VIVS_CO_SAMPLER_UNK03120(i0) (0x00003120 + 0x4*(i0))
+
+#define VIVS_CO_SAMPLER_UNK03140(i0) (0x00003140 + 0x4*(i0))
+
+#define VIVS_CO_SAMPLER_UNK03160(i0) (0x00003160 + 0x4*(i0))
+
+#define VIVS_CO_SAMPLER_UNK03180(i0) (0x00003180 + 0x4*(i0))
+
+#define VIVS_CO_SAMPLER_UNK031A0(i0) (0x000031a0 + 0x4*(i0))
+
+#define VIVS_CO_SAMPLER_UNK031C0(i0) (0x000031c0 + 0x4*(i0))
+
+#define VIVS_CO_SAMPLER_UNK031E0(i0) (0x000031e0 + 0x4*(i0))
+
+#define VIVS_CO_ADDR_UNK03200(i0) (0x00003200 + 0x20*(i0))
+#define VIVS_CO_ADDR_UNK03200__ESIZE 0x00000020
+#define VIVS_CO_ADDR_UNK03200__LEN 0x00000008
+
+#define VIVS_CO_ADDR_UNK03200_PPIPE(i0, i1) (0x00003200 + 0x20*(i0) + 0x4*(i1))
+#define VIVS_CO_ADDR_UNK03200_PPIPE__ESIZE 0x00000004
+#define VIVS_CO_ADDR_UNK03200_PPIPE__LEN 0x00000008
+
+#define VIVS_RS 0x00000000
+
+#define VIVS_RS_KICKER 0x00001600
+
+#define VIVS_RS_CONFIG 0x00001604
+#define VIVS_RS_CONFIG_SOURCE_FORMAT__MASK 0x0000001f
+#define VIVS_RS_CONFIG_SOURCE_FORMAT__SHIFT 0
+#define VIVS_RS_CONFIG_SOURCE_FORMAT(x) (((x) << VIVS_RS_CONFIG_SOURCE_FORMAT__SHIFT) & VIVS_RS_CONFIG_SOURCE_FORMAT__MASK)
+#define VIVS_RS_CONFIG_DOWNSAMPLE_X 0x00000020
+#define VIVS_RS_CONFIG_DOWNSAMPLE_Y 0x00000040
+#define VIVS_RS_CONFIG_SOURCE_TILED 0x00000080
+#define VIVS_RS_CONFIG_DEST_FORMAT__MASK 0x00001f00
+#define VIVS_RS_CONFIG_DEST_FORMAT__SHIFT 8
+#define VIVS_RS_CONFIG_DEST_FORMAT(x) (((x) << VIVS_RS_CONFIG_DEST_FORMAT__SHIFT) & VIVS_RS_CONFIG_DEST_FORMAT__MASK)
+#define VIVS_RS_CONFIG_DEST_TILED 0x00004000
+#define VIVS_RS_CONFIG_SWAP_RB 0x20000000
+#define VIVS_RS_CONFIG_FLIP 0x40000000
+
+#define VIVS_RS_SOURCE_ADDR 0x00001608
+
+#define VIVS_RS_SOURCE_STRIDE 0x0000160c
+#define VIVS_RS_SOURCE_STRIDE_STRIDE__MASK 0x0003ffff
+#define VIVS_RS_SOURCE_STRIDE_STRIDE__SHIFT 0
+#define VIVS_RS_SOURCE_STRIDE_STRIDE(x) (((x) << VIVS_RS_SOURCE_STRIDE_STRIDE__SHIFT) & VIVS_RS_SOURCE_STRIDE_STRIDE__MASK)
+#define VIVS_RS_SOURCE_STRIDE_MULTI 0x40000000
+#define VIVS_RS_SOURCE_STRIDE_TILING 0x80000000
+
+#define VIVS_RS_DEST_ADDR 0x00001610
+
+#define VIVS_RS_DEST_STRIDE 0x00001614
+#define VIVS_RS_DEST_STRIDE_STRIDE__MASK 0x0003ffff
+#define VIVS_RS_DEST_STRIDE_STRIDE__SHIFT 0
+#define VIVS_RS_DEST_STRIDE_STRIDE(x) (((x) << VIVS_RS_DEST_STRIDE_STRIDE__SHIFT) & VIVS_RS_DEST_STRIDE_STRIDE__MASK)
+#define VIVS_RS_DEST_STRIDE_MULTI 0x40000000
+#define VIVS_RS_DEST_STRIDE_TILING 0x80000000
+
+#define VIVS_RS_WINDOW_SIZE 0x00001620
+#define VIVS_RS_WINDOW_SIZE_HEIGHT__MASK 0xffff0000
+#define VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT 16
+#define VIVS_RS_WINDOW_SIZE_HEIGHT(x) (((x) << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) & VIVS_RS_WINDOW_SIZE_HEIGHT__MASK)
+#define VIVS_RS_WINDOW_SIZE_WIDTH__MASK 0x0000ffff
+#define VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT 0
+#define VIVS_RS_WINDOW_SIZE_WIDTH(x) (((x) << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT) & VIVS_RS_WINDOW_SIZE_WIDTH__MASK)
+
+#define VIVS_RS_DITHER(i0) (0x00001630 + 0x4*(i0))
+#define VIVS_RS_DITHER__ESIZE 0x00000004
+#define VIVS_RS_DITHER__LEN 0x00000002
+
+#define VIVS_RS_CLEAR_CONTROL 0x0000163c
+#define VIVS_RS_CLEAR_CONTROL_BITS__MASK 0x0000ffff
+#define VIVS_RS_CLEAR_CONTROL_BITS__SHIFT 0
+#define VIVS_RS_CLEAR_CONTROL_BITS(x) (((x) << VIVS_RS_CLEAR_CONTROL_BITS__SHIFT) & VIVS_RS_CLEAR_CONTROL_BITS__MASK)
+#define VIVS_RS_CLEAR_CONTROL_MODE__MASK 0x00030000
+#define VIVS_RS_CLEAR_CONTROL_MODE__SHIFT 16
+#define VIVS_RS_CLEAR_CONTROL_MODE_DISABLED 0x00000000
+#define VIVS_RS_CLEAR_CONTROL_MODE_ENABLED1 0x00010000
+#define VIVS_RS_CLEAR_CONTROL_MODE_ENABLED4 0x00020000
+#define VIVS_RS_CLEAR_CONTROL_MODE_ENABLED4_2 0x00030000
+
+#define VIVS_RS_FILL_VALUE(i0) (0x00001640 + 0x4*(i0))
+#define VIVS_RS_FILL_VALUE__ESIZE 0x00000004
+#define VIVS_RS_FILL_VALUE__LEN 0x00000004
+
+#define VIVS_RS_EXTRA_CONFIG 0x000016a0
+#define VIVS_RS_EXTRA_CONFIG_AA__MASK 0x00000003
+#define VIVS_RS_EXTRA_CONFIG_AA__SHIFT 0
+#define VIVS_RS_EXTRA_CONFIG_AA(x) (((x) << VIVS_RS_EXTRA_CONFIG_AA__SHIFT) & VIVS_RS_EXTRA_CONFIG_AA__MASK)
+#define VIVS_RS_EXTRA_CONFIG_ENDIAN__MASK 0x00000300
+#define VIVS_RS_EXTRA_CONFIG_ENDIAN__SHIFT 8
+#define VIVS_RS_EXTRA_CONFIG_ENDIAN(x) (((x) << VIVS_RS_EXTRA_CONFIG_ENDIAN__SHIFT) & VIVS_RS_EXTRA_CONFIG_ENDIAN__MASK)
+
+#define VIVS_RS_UNK016B4 0x000016b4
+
+#define VIVS_RS_PIPE(i0) (0x00000000 + 0x4*(i0))
+#define VIVS_RS_PIPE__ESIZE 0x00000004
+#define VIVS_RS_PIPE__LEN 0x00000008
+
+#define VIVS_RS_PIPE_SOURCE_ADDR(i0) (0x000016c0 + 0x4*(i0))
+
+#define VIVS_RS_PIPE_DEST_ADDR(i0) (0x000016e0 + 0x4*(i0))
+
+#define VIVS_RS_PIPE_OFFSET(i0) (0x00001700 + 0x4*(i0))
+#define VIVS_RS_PIPE_OFFSET_X__MASK 0x0000ffff
+#define VIVS_RS_PIPE_OFFSET_X__SHIFT 0
+#define VIVS_RS_PIPE_OFFSET_X(x) (((x) << VIVS_RS_PIPE_OFFSET_X__SHIFT) & VIVS_RS_PIPE_OFFSET_X__MASK)
+#define VIVS_RS_PIPE_OFFSET_Y__MASK 0xffff0000
+#define VIVS_RS_PIPE_OFFSET_Y__SHIFT 16
+#define VIVS_RS_PIPE_OFFSET_Y(x) (((x) << VIVS_RS_PIPE_OFFSET_Y__SHIFT) & VIVS_RS_PIPE_OFFSET_Y__MASK)
+
+#define VIVS_TS 0x00000000
+
+#define VIVS_TS_FLUSH_CACHE 0x00001650
+#define VIVS_TS_FLUSH_CACHE_FLUSH 0x00000001
+
+#define VIVS_TS_MEM_CONFIG 0x00001654
+#define VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR 0x00000001
+#define VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR 0x00000002
+#define VIVS_TS_MEM_CONFIG_DEPTH_16BPP 0x00000008
+#define VIVS_TS_MEM_CONFIG_DEPTH_AUTO_DISABLE 0x00000010
+#define VIVS_TS_MEM_CONFIG_COLOR_AUTO_DISABLE 0x00000020
+#define VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION 0x00000040
+#define VIVS_TS_MEM_CONFIG_MSAA 0x00000080
+#define VIVS_TS_MEM_CONFIG_MSAA_FORMAT__MASK 0x00000f00
+#define VIVS_TS_MEM_CONFIG_MSAA_FORMAT__SHIFT 8
+#define VIVS_TS_MEM_CONFIG_MSAA_FORMAT_A4R4G4B4 0x00000000
+#define VIVS_TS_MEM_CONFIG_MSAA_FORMAT_A1R5G5B5 0x00000100
+#define VIVS_TS_MEM_CONFIG_MSAA_FORMAT_R5G6B5 0x00000200
+#define VIVS_TS_MEM_CONFIG_MSAA_FORMAT_A8R8G8B8 0x00000300
+#define VIVS_TS_MEM_CONFIG_MSAA_FORMAT_X8R8G8B8 0x00000400
+#define VIVS_TS_MEM_CONFIG_UNK12 0x00001000
+#define VIVS_TS_MEM_CONFIG_HDEPTH_AUTO_DISABLE 0x00002000
+
+#define VIVS_TS_COLOR_STATUS_BASE 0x00001658
+
+#define VIVS_TS_COLOR_SURFACE_BASE 0x0000165c
+
+#define VIVS_TS_COLOR_CLEAR_VALUE 0x00001660
+
+#define VIVS_TS_DEPTH_STATUS_BASE 0x00001664
+
+#define VIVS_TS_DEPTH_SURFACE_BASE 0x00001668
+
+#define VIVS_TS_DEPTH_CLEAR_VALUE 0x0000166c
+
+#define VIVS_TS_DEPTH_AUTO_DISABLE_COUNT 0x00001670
+
+#define VIVS_TS_COLOR_AUTO_DISABLE_COUNT 0x00001674
+
+#define VIVS_TS_HDEPTH_STATUS_BASE 0x000016a4
+
+#define VIVS_TS_HDEPTH_CLEAR_VALUE 0x000016a8
+
+#define VIVS_TS_HDEPTH_SIZE 0x000016ac
+
+#define VIVS_TS_SAMPLER(i0) (0x00000000 + 0x4*(i0))
+#define VIVS_TS_SAMPLER__ESIZE 0x00000004
+#define VIVS_TS_SAMPLER__LEN 0x00000008
+
+#define VIVS_TS_SAMPLER_CONFIG(i0) (0x00001720 + 0x4*(i0))
+#define VIVS_TS_SAMPLER_CONFIG_ENABLE__MASK 0x00000003
+#define VIVS_TS_SAMPLER_CONFIG_ENABLE__SHIFT 0
+#define VIVS_TS_SAMPLER_CONFIG_ENABLE(x) (((x) << VIVS_TS_SAMPLER_CONFIG_ENABLE__SHIFT) & VIVS_TS_SAMPLER_CONFIG_ENABLE__MASK)
+#define VIVS_TS_SAMPLER_CONFIG_FORMAT__MASK 0x000000f0
+#define VIVS_TS_SAMPLER_CONFIG_FORMAT__SHIFT 4
+#define VIVS_TS_SAMPLER_CONFIG_FORMAT(x) (((x) << VIVS_TS_SAMPLER_CONFIG_FORMAT__SHIFT) & VIVS_TS_SAMPLER_CONFIG_FORMAT__MASK)
+
+#define VIVS_TS_SAMPLER_STATUS_BASE(i0) (0x00001740 + 0x4*(i0))
+
+#define VIVS_TS_SAMPLER_CLEAR_VALUE(i0) (0x00001760 + 0x4*(i0))
+
+#define VIVS_YUV 0x00000000
+
+#define VIVS_YUV_UNK01678 0x00001678
+
+#define VIVS_YUV_UNK0167C 0x0000167c
+
+#define VIVS_YUV_UNK01680 0x00001680
+
+#define VIVS_YUV_UNK01684 0x00001684
+
+#define VIVS_YUV_UNK01688 0x00001688
+
+#define VIVS_YUV_UNK0168C 0x0000168c
+
+#define VIVS_YUV_UNK01690 0x00001690
+
+#define VIVS_YUV_UNK01694 0x00001694
+
+#define VIVS_YUV_UNK01698 0x00001698
+
+#define VIVS_YUV_UNK0169C 0x0000169c
+
+#define VIVS_TE 0x00000000
+
+#define VIVS_TE_SAMPLER(i0) (0x00000000 + 0x4*(i0))
+#define VIVS_TE_SAMPLER__ESIZE 0x00000004
+#define VIVS_TE_SAMPLER__LEN 0x0000000c
+
+#define VIVS_TE_SAMPLER_CONFIG0(i0) (0x00002000 + 0x4*(i0))
+#define VIVS_TE_SAMPLER_CONFIG0_TYPE__MASK 0x00000007
+#define VIVS_TE_SAMPLER_CONFIG0_TYPE__SHIFT 0
+#define VIVS_TE_SAMPLER_CONFIG0_TYPE(x) (((x) << VIVS_TE_SAMPLER_CONFIG0_TYPE__SHIFT) & VIVS_TE_SAMPLER_CONFIG0_TYPE__MASK)
+#define VIVS_TE_SAMPLER_CONFIG0_UWRAP__MASK 0x00000018
+#define VIVS_TE_SAMPLER_CONFIG0_UWRAP__SHIFT 3
+#define VIVS_TE_SAMPLER_CONFIG0_UWRAP(x) (((x) << VIVS_TE_SAMPLER_CONFIG0_UWRAP__SHIFT) & VIVS_TE_SAMPLER_CONFIG0_UWRAP__MASK)
+#define VIVS_TE_SAMPLER_CONFIG0_VWRAP__MASK 0x00000060
+#define VIVS_TE_SAMPLER_CONFIG0_VWRAP__SHIFT 5
+#define VIVS_TE_SAMPLER_CONFIG0_VWRAP(x) (((x) << VIVS_TE_SAMPLER_CONFIG0_VWRAP__SHIFT) & VIVS_TE_SAMPLER_CONFIG0_VWRAP__MASK)
+#define VIVS_TE_SAMPLER_CONFIG0_MIN__MASK 0x00000180
+#define VIVS_TE_SAMPLER_CONFIG0_MIN__SHIFT 7
+#define VIVS_TE_SAMPLER_CONFIG0_MIN(x) (((x) << VIVS_TE_SAMPLER_CONFIG0_MIN__SHIFT) & VIVS_TE_SAMPLER_CONFIG0_MIN__MASK)
+#define VIVS_TE_SAMPLER_CONFIG0_MIP__MASK 0x00000600
+#define VIVS_TE_SAMPLER_CONFIG0_MIP__SHIFT 9
+#define VIVS_TE_SAMPLER_CONFIG0_MIP(x) (((x) << VIVS_TE_SAMPLER_CONFIG0_MIP__SHIFT) & VIVS_TE_SAMPLER_CONFIG0_MIP__MASK)
+#define VIVS_TE_SAMPLER_CONFIG0_MAG__MASK 0x00001800
+#define VIVS_TE_SAMPLER_CONFIG0_MAG__SHIFT 11
+#define VIVS_TE_SAMPLER_CONFIG0_MAG(x) (((x) << VIVS_TE_SAMPLER_CONFIG0_MAG__SHIFT) & VIVS_TE_SAMPLER_CONFIG0_MAG__MASK)
+#define VIVS_TE_SAMPLER_CONFIG0_FORMAT__MASK 0x0003e000
+#define VIVS_TE_SAMPLER_CONFIG0_FORMAT__SHIFT 13
+#define VIVS_TE_SAMPLER_CONFIG0_FORMAT(x) (((x) << VIVS_TE_SAMPLER_CONFIG0_FORMAT__SHIFT) & VIVS_TE_SAMPLER_CONFIG0_FORMAT__MASK)
+#define VIVS_TE_SAMPLER_CONFIG0_ROUND_UV 0x00080000
+#define VIVS_TE_SAMPLER_CONFIG0_ENDIAN__MASK 0x00c00000
+#define VIVS_TE_SAMPLER_CONFIG0_ENDIAN__SHIFT 22
+#define VIVS_TE_SAMPLER_CONFIG0_ENDIAN(x) (((x) << VIVS_TE_SAMPLER_CONFIG0_ENDIAN__SHIFT) & VIVS_TE_SAMPLER_CONFIG0_ENDIAN__MASK)
+#define VIVS_TE_SAMPLER_CONFIG0_ANISOTROPY__MASK 0xff000000
+#define VIVS_TE_SAMPLER_CONFIG0_ANISOTROPY__SHIFT 24
+#define VIVS_TE_SAMPLER_CONFIG0_ANISOTROPY(x) (((x) << VIVS_TE_SAMPLER_CONFIG0_ANISOTROPY__SHIFT) & VIVS_TE_SAMPLER_CONFIG0_ANISOTROPY__MASK)
+
+#define VIVS_TE_SAMPLER_SIZE(i0) (0x00002040 + 0x4*(i0))
+#define VIVS_TE_SAMPLER_SIZE_WIDTH__MASK 0x0000ffff
+#define VIVS_TE_SAMPLER_SIZE_WIDTH__SHIFT 0
+#define VIVS_TE_SAMPLER_SIZE_WIDTH(x) (((x) << VIVS_TE_SAMPLER_SIZE_WIDTH__SHIFT) & VIVS_TE_SAMPLER_SIZE_WIDTH__MASK)
+#define VIVS_TE_SAMPLER_SIZE_HEIGHT__MASK 0xffff0000
+#define VIVS_TE_SAMPLER_SIZE_HEIGHT__SHIFT 16
+#define VIVS_TE_SAMPLER_SIZE_HEIGHT(x) (((x) << VIVS_TE_SAMPLER_SIZE_HEIGHT__SHIFT) & VIVS_TE_SAMPLER_SIZE_HEIGHT__MASK)
+
+#define VIVS_TE_SAMPLER_LOG_SIZE(i0) (0x00002080 + 0x4*(i0))
+#define VIVS_TE_SAMPLER_LOG_SIZE_WIDTH__MASK 0x000003ff
+#define VIVS_TE_SAMPLER_LOG_SIZE_WIDTH__SHIFT 0
+#define VIVS_TE_SAMPLER_LOG_SIZE_WIDTH(x) (((x) << VIVS_TE_SAMPLER_LOG_SIZE_WIDTH__SHIFT) & VIVS_TE_SAMPLER_LOG_SIZE_WIDTH__MASK)
+#define VIVS_TE_SAMPLER_LOG_SIZE_HEIGHT__MASK 0x000ffc00
+#define VIVS_TE_SAMPLER_LOG_SIZE_HEIGHT__SHIFT 10
+#define VIVS_TE_SAMPLER_LOG_SIZE_HEIGHT(x) (((x) << VIVS_TE_SAMPLER_LOG_SIZE_HEIGHT__SHIFT) & VIVS_TE_SAMPLER_LOG_SIZE_HEIGHT__MASK)
+
+#define VIVS_TE_SAMPLER_LOD_CONFIG(i0) (0x000020c0 + 0x4*(i0))
+#define VIVS_TE_SAMPLER_LOD_CONFIG_BIAS_ENABLE 0x00000001
+#define VIVS_TE_SAMPLER_LOD_CONFIG_MAX__MASK 0x000007fe
+#define VIVS_TE_SAMPLER_LOD_CONFIG_MAX__SHIFT 1
+#define VIVS_TE_SAMPLER_LOD_CONFIG_MAX(x) (((x) << VIVS_TE_SAMPLER_LOD_CONFIG_MAX__SHIFT) & VIVS_TE_SAMPLER_LOD_CONFIG_MAX__MASK)
+#define VIVS_TE_SAMPLER_LOD_CONFIG_MIN__MASK 0x001ff800
+#define VIVS_TE_SAMPLER_LOD_CONFIG_MIN__SHIFT 11
+#define VIVS_TE_SAMPLER_LOD_CONFIG_MIN(x) (((x) << VIVS_TE_SAMPLER_LOD_CONFIG_MIN__SHIFT) & VIVS_TE_SAMPLER_LOD_CONFIG_MIN__MASK)
+#define VIVS_TE_SAMPLER_LOD_CONFIG_BIAS__MASK 0x7fe00000
+#define VIVS_TE_SAMPLER_LOD_CONFIG_BIAS__SHIFT 21
+#define VIVS_TE_SAMPLER_LOD_CONFIG_BIAS(x) (((x) << VIVS_TE_SAMPLER_LOD_CONFIG_BIAS__SHIFT) & VIVS_TE_SAMPLER_LOD_CONFIG_BIAS__MASK)
+
+#define VIVS_TE_SAMPLER_UNK02100(i0) (0x00002100 + 0x4*(i0))
+
+#define VIVS_TE_SAMPLER_UNK02140(i0) (0x00002140 + 0x4*(i0))
+
+#define VIVS_TE_SAMPLER_UNK02180(i0) (0x00002180 + 0x4*(i0))
+
+#define VIVS_TE_SAMPLER_CONFIG1(i0) (0x000021c0 + 0x4*(i0))
+#define VIVS_TE_SAMPLER_CONFIG1_FORMAT_EXT__MASK 0x0000001f
+#define VIVS_TE_SAMPLER_CONFIG1_FORMAT_EXT__SHIFT 0
+#define VIVS_TE_SAMPLER_CONFIG1_FORMAT_EXT(x) (((x) << VIVS_TE_SAMPLER_CONFIG1_FORMAT_EXT__SHIFT) & VIVS_TE_SAMPLER_CONFIG1_FORMAT_EXT__MASK)
+#define VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_R__MASK 0x00000700
+#define VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_R__SHIFT 8
+#define VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_R(x) (((x) << VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_R__SHIFT) & VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_R__MASK)
+#define VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_G__MASK 0x00007000
+#define VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_G__SHIFT 12
+#define VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_G(x) (((x) << VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_G__SHIFT) & VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_G__MASK)
+#define VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_B__MASK 0x00070000
+#define VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_B__SHIFT 16
+#define VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_B(x) (((x) << VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_B__SHIFT) & VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_B__MASK)
+#define VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_A__MASK 0x00700000
+#define VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_A__SHIFT 20
+#define VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_A(x) (((x) << VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_A__SHIFT) & VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_A__MASK)
+#define VIVS_TE_SAMPLER_CONFIG1_HALIGN__MASK 0x1c000000
+#define VIVS_TE_SAMPLER_CONFIG1_HALIGN__SHIFT 26
+#define VIVS_TE_SAMPLER_CONFIG1_HALIGN(x) (((x) << VIVS_TE_SAMPLER_CONFIG1_HALIGN__SHIFT) & VIVS_TE_SAMPLER_CONFIG1_HALIGN__MASK)
+
+#define VIVS_TE_SAMPLER_UNK02200(i0) (0x00002200 + 0x4*(i0))
+
+#define VIVS_TE_SAMPLER_UNK02240(i0) (0x00002240 + 0x4*(i0))
+
+#define VIVS_TE_SAMPLER_LOD_ADDR(i0, i1) (0x00002400 + 0x4*(i0) + 0x40*(i1))
+#define VIVS_TE_SAMPLER_LOD_ADDR__ESIZE 0x00000040
+#define VIVS_TE_SAMPLER_LOD_ADDR__LEN 0x0000000e
+
+#define VIVS_NTE 0x00000000
+
+#define VIVS_NTE_SAMPLER(i0) (0x00010000 + 0x4*(i0))
+#define VIVS_NTE_SAMPLER__ESIZE 0x00000004
+#define VIVS_NTE_SAMPLER__LEN 0x00000020
+
+#define VIVS_NTE_SAMPLER_CONFIG0(i0) (0x00010000 + 0x4*(i0))
+#define VIVS_NTE_SAMPLER_CONFIG0_TYPE__MASK 0x00000007
+#define VIVS_NTE_SAMPLER_CONFIG0_TYPE__SHIFT 0
+#define VIVS_NTE_SAMPLER_CONFIG0_TYPE(x) (((x) << VIVS_NTE_SAMPLER_CONFIG0_TYPE__SHIFT) & VIVS_NTE_SAMPLER_CONFIG0_TYPE__MASK)
+#define VIVS_NTE_SAMPLER_CONFIG0_UWRAP__MASK 0x00000018
+#define VIVS_NTE_SAMPLER_CONFIG0_UWRAP__SHIFT 3
+#define VIVS_NTE_SAMPLER_CONFIG0_UWRAP(x) (((x) << VIVS_NTE_SAMPLER_CONFIG0_UWRAP__SHIFT) & VIVS_NTE_SAMPLER_CONFIG0_UWRAP__MASK)
+#define VIVS_NTE_SAMPLER_CONFIG0_VWRAP__MASK 0x00000060
+#define VIVS_NTE_SAMPLER_CONFIG0_VWRAP__SHIFT 5
+#define VIVS_NTE_SAMPLER_CONFIG0_VWRAP(x) (((x) << VIVS_NTE_SAMPLER_CONFIG0_VWRAP__SHIFT) & VIVS_NTE_SAMPLER_CONFIG0_VWRAP__MASK)
+#define VIVS_NTE_SAMPLER_CONFIG0_MIN__MASK 0x00000180
+#define VIVS_NTE_SAMPLER_CONFIG0_MIN__SHIFT 7
+#define VIVS_NTE_SAMPLER_CONFIG0_MIN(x) (((x) << VIVS_NTE_SAMPLER_CONFIG0_MIN__SHIFT) & VIVS_NTE_SAMPLER_CONFIG0_MIN__MASK)
+#define VIVS_NTE_SAMPLER_CONFIG0_MIP__MASK 0x00000600
+#define VIVS_NTE_SAMPLER_CONFIG0_MIP__SHIFT 9
+#define VIVS_NTE_SAMPLER_CONFIG0_MIP(x) (((x) << VIVS_NTE_SAMPLER_CONFIG0_MIP__SHIFT) & VIVS_NTE_SAMPLER_CONFIG0_MIP__MASK)
+#define VIVS_NTE_SAMPLER_CONFIG0_MAG__MASK 0x00001800
+#define VIVS_NTE_SAMPLER_CONFIG0_MAG__SHIFT 11
+#define VIVS_NTE_SAMPLER_CONFIG0_MAG(x) (((x) << VIVS_NTE_SAMPLER_CONFIG0_MAG__SHIFT) & VIVS_NTE_SAMPLER_CONFIG0_MAG__MASK)
+#define VIVS_NTE_SAMPLER_CONFIG0_FORMAT__MASK 0x0003e000
+#define VIVS_NTE_SAMPLER_CONFIG0_FORMAT__SHIFT 13
+#define VIVS_NTE_SAMPLER_CONFIG0_FORMAT(x) (((x) << VIVS_NTE_SAMPLER_CONFIG0_FORMAT__SHIFT) & VIVS_NTE_SAMPLER_CONFIG0_FORMAT__MASK)
+#define VIVS_NTE_SAMPLER_CONFIG0_ROUND_UV 0x00080000
+#define VIVS_NTE_SAMPLER_CONFIG0_ENDIAN__MASK 0x00c00000
+#define VIVS_NTE_SAMPLER_CONFIG0_ENDIAN__SHIFT 22
+#define VIVS_NTE_SAMPLER_CONFIG0_ENDIAN(x) (((x) << VIVS_NTE_SAMPLER_CONFIG0_ENDIAN__SHIFT) & VIVS_NTE_SAMPLER_CONFIG0_ENDIAN__MASK)
+#define VIVS_NTE_SAMPLER_CONFIG0_ANISOTROPY__MASK 0xff000000
+#define VIVS_NTE_SAMPLER_CONFIG0_ANISOTROPY__SHIFT 24
+#define VIVS_NTE_SAMPLER_CONFIG0_ANISOTROPY(x) (((x) << VIVS_NTE_SAMPLER_CONFIG0_ANISOTROPY__SHIFT) & VIVS_NTE_SAMPLER_CONFIG0_ANISOTROPY__MASK)
+
+#define VIVS_NTE_SAMPLER_SIZE(i0) (0x00010080 + 0x4*(i0))
+#define VIVS_NTE_SAMPLER_SIZE_WIDTH__MASK 0x0000ffff
+#define VIVS_NTE_SAMPLER_SIZE_WIDTH__SHIFT 0
+#define VIVS_NTE_SAMPLER_SIZE_WIDTH(x) (((x) << VIVS_NTE_SAMPLER_SIZE_WIDTH__SHIFT) & VIVS_NTE_SAMPLER_SIZE_WIDTH__MASK)
+#define VIVS_NTE_SAMPLER_SIZE_HEIGHT__MASK 0xffff0000
+#define VIVS_NTE_SAMPLER_SIZE_HEIGHT__SHIFT 16
+#define VIVS_NTE_SAMPLER_SIZE_HEIGHT(x) (((x) << VIVS_NTE_SAMPLER_SIZE_HEIGHT__SHIFT) & VIVS_NTE_SAMPLER_SIZE_HEIGHT__MASK)
+
+#define VIVS_NTE_SAMPLER_LOG_SIZE(i0) (0x00010100 + 0x4*(i0))
+#define VIVS_NTE_SAMPLER_LOG_SIZE_WIDTH__MASK 0x000003ff
+#define VIVS_NTE_SAMPLER_LOG_SIZE_WIDTH__SHIFT 0
+#define VIVS_NTE_SAMPLER_LOG_SIZE_WIDTH(x) (((x) << VIVS_NTE_SAMPLER_LOG_SIZE_WIDTH__SHIFT) & VIVS_NTE_SAMPLER_LOG_SIZE_WIDTH__MASK)
+#define VIVS_NTE_SAMPLER_LOG_SIZE_HEIGHT__MASK 0x000ffc00
+#define VIVS_NTE_SAMPLER_LOG_SIZE_HEIGHT__SHIFT 10
+#define VIVS_NTE_SAMPLER_LOG_SIZE_HEIGHT(x) (((x) << VIVS_NTE_SAMPLER_LOG_SIZE_HEIGHT__SHIFT) & VIVS_NTE_SAMPLER_LOG_SIZE_HEIGHT__MASK)
+
+#define VIVS_NTE_SAMPLER_LOD_CONFIG(i0) (0x00010180 + 0x4*(i0))
+#define VIVS_NTE_SAMPLER_LOD_CONFIG_BIAS_ENABLE 0x00000001
+#define VIVS_NTE_SAMPLER_LOD_CONFIG_MAX__MASK 0x000007fe
+#define VIVS_NTE_SAMPLER_LOD_CONFIG_MAX__SHIFT 1
+#define VIVS_NTE_SAMPLER_LOD_CONFIG_MAX(x) (((x) << VIVS_NTE_SAMPLER_LOD_CONFIG_MAX__SHIFT) & VIVS_NTE_SAMPLER_LOD_CONFIG_MAX__MASK)
+#define VIVS_NTE_SAMPLER_LOD_CONFIG_MIN__MASK 0x001ff800
+#define VIVS_NTE_SAMPLER_LOD_CONFIG_MIN__SHIFT 11
+#define VIVS_NTE_SAMPLER_LOD_CONFIG_MIN(x) (((x) << VIVS_NTE_SAMPLER_LOD_CONFIG_MIN__SHIFT) & VIVS_NTE_SAMPLER_LOD_CONFIG_MIN__MASK)
+#define VIVS_NTE_SAMPLER_LOD_CONFIG_BIAS__MASK 0x7fe00000
+#define VIVS_NTE_SAMPLER_LOD_CONFIG_BIAS__SHIFT 21
+#define VIVS_NTE_SAMPLER_LOD_CONFIG_BIAS(x) (((x) << VIVS_NTE_SAMPLER_LOD_CONFIG_BIAS__SHIFT) & VIVS_NTE_SAMPLER_LOD_CONFIG_BIAS__MASK)
+
+#define VIVS_NTE_SAMPLER_UNK10200(i0) (0x00010200 + 0x4*(i0))
+
+#define VIVS_NTE_SAMPLER_UNK10280(i0) (0x00010280 + 0x4*(i0))
+
+#define VIVS_NTE_SAMPLER_UNK10300(i0) (0x00010300 + 0x4*(i0))
+
+#define VIVS_NTE_SAMPLER_CONFIG1(i0) (0x00010380 + 0x4*(i0))
+#define VIVS_NTE_SAMPLER_CONFIG1_FORMAT_EXT__MASK 0x0000001f
+#define VIVS_NTE_SAMPLER_CONFIG1_FORMAT_EXT__SHIFT 0
+#define VIVS_NTE_SAMPLER_CONFIG1_FORMAT_EXT(x) (((x) << VIVS_NTE_SAMPLER_CONFIG1_FORMAT_EXT__SHIFT) & VIVS_NTE_SAMPLER_CONFIG1_FORMAT_EXT__MASK)
+#define VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_R__MASK 0x00000700
+#define VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_R__SHIFT 8
+#define VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_R(x) (((x) << VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_R__SHIFT) & VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_R__MASK)
+#define VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_G__MASK 0x00007000
+#define VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_G__SHIFT 12
+#define VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_G(x) (((x) << VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_G__SHIFT) & VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_G__MASK)
+#define VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_B__MASK 0x00070000
+#define VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_B__SHIFT 16
+#define VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_B(x) (((x) << VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_B__SHIFT) & VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_B__MASK)
+#define VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_A__MASK 0x00700000
+#define VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_A__SHIFT 20
+#define VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_A(x) (((x) << VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_A__SHIFT) & VIVS_NTE_SAMPLER_CONFIG1_SWIZZLE_A__MASK)
+#define VIVS_NTE_SAMPLER_CONFIG1_HALIGN__MASK 0x1c000000
+#define VIVS_NTE_SAMPLER_CONFIG1_HALIGN__SHIFT 26
+#define VIVS_NTE_SAMPLER_CONFIG1_HALIGN(x) (((x) << VIVS_NTE_SAMPLER_CONFIG1_HALIGN__SHIFT) & VIVS_NTE_SAMPLER_CONFIG1_HALIGN__MASK)
+
+#define VIVS_NTE_SAMPLER_UNK10400(i0) (0x00010400 + 0x4*(i0))
+
+#define VIVS_NTE_SAMPLER_UNK10480(i0) (0x00010480 + 0x4*(i0))
+
+#define VIVS_NTE_SAMPLER_ADDR(i0) (0x00010800 + 0x40*(i0))
+#define VIVS_NTE_SAMPLER_ADDR__ESIZE 0x00000040
+#define VIVS_NTE_SAMPLER_ADDR__LEN 0x00000020
+
+#define VIVS_NTE_SAMPLER_ADDR_LOD(i0, i1) (0x00010800 + 0x40*(i0) + 0x4*(i1))
+#define VIVS_NTE_SAMPLER_ADDR_LOD__ESIZE 0x00000004
+#define VIVS_NTE_SAMPLER_ADDR_LOD__LEN 0x0000000e
+
+#define VIVS_NTE_UNK12000(i0) (0x00012000 + 0x4*(i0))
+#define VIVS_NTE_UNK12000__ESIZE 0x00000004
+#define VIVS_NTE_UNK12000__LEN 0x00000100
+
+#define VIVS_NTE_UNK12400(i0) (0x00012400 + 0x4*(i0))
+#define VIVS_NTE_UNK12400__ESIZE 0x00000004
+#define VIVS_NTE_UNK12400__LEN 0x00000100
+
+#define VIVS_SH 0x00000000
+
+#define VIVS_SH_UNK20000(i0) (0x00020000 + 0x4*(i0))
+#define VIVS_SH_UNK20000__ESIZE 0x00000004
+#define VIVS_SH_UNK20000__LEN 0x00002000
+
+#define VIVS_SH_INST_MEM(i0) (0x0000c000 + 0x4*(i0))
+#define VIVS_SH_INST_MEM__ESIZE 0x00000004
+#define VIVS_SH_INST_MEM__LEN 0x00001000
+
+#define VIVS_SH_UNK0C000_MIRROR(i0) (0x00008000 + 0x4*(i0))
+#define VIVS_SH_UNK0C000_MIRROR__ESIZE 0x00000004
+#define VIVS_SH_UNK0C000_MIRROR__LEN 0x00001000
+
+
+#endif /* STATE_3D_XML */
diff --git a/src/etnaviv/state_hi.xml.h b/src/etnaviv/state_hi.xml.h
new file mode 100644
index 0000000..8d8bf2c
--- /dev/null
+++ b/src/etnaviv/state_hi.xml.h
@@ -0,0 +1,364 @@
+#ifndef STATE_HI_XML
+#define STATE_HI_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- /home/orion/projects/etna_viv/rnndb/state.xml ( 18526 bytes, from 2013-09-11 16:52:32)
+- /home/orion/projects/etna_viv/rnndb/common.xml ( 16543 bytes, from 2013-09-01 10:53:22)
+- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 22118 bytes, from 2013-10-03 14:57:04)
+- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51191 bytes, from 2013-10-02 12:49:04)
+- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54270 bytes, from 2013-09-17 15:37:52)
+- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-09-01 10:53:22)
+
+Copyright (C) 2013
+*/
+
+
+#define MMU_EXCEPTION_SLAVE_NOT_PRESENT 0x00000001
+#define MMU_EXCEPTION_PAGE_NOT_PRESENT 0x00000002
+#define MMU_EXCEPTION_WRITE_VIOLATION 0x00000003
+#define VIVS_HI 0x00000000
+
+#define VIVS_HI_CLOCK_CONTROL 0x00000000
+#define VIVS_HI_CLOCK_CONTROL_CLK3D_DIS 0x00000001
+#define VIVS_HI_CLOCK_CONTROL_CLK2D_DIS 0x00000002
+#define VIVS_HI_CLOCK_CONTROL_FSCALE_VAL__MASK 0x000001fc
+#define VIVS_HI_CLOCK_CONTROL_FSCALE_VAL__SHIFT 2
+#define VIVS_HI_CLOCK_CONTROL_FSCALE_VAL(x) (((x) << VIVS_HI_CLOCK_CONTROL_FSCALE_VAL__SHIFT) & VIVS_HI_CLOCK_CONTROL_FSCALE_VAL__MASK)
+#define VIVS_HI_CLOCK_CONTROL_FSCALE_CMD_LOAD 0x00000200
+#define VIVS_HI_CLOCK_CONTROL_DISABLE_RAM_CLK_GATING 0x00000400
+#define VIVS_HI_CLOCK_CONTROL_DISABLE_DEBUG_REGISTERS 0x00000800
+#define VIVS_HI_CLOCK_CONTROL_SOFT_RESET 0x00001000
+#define VIVS_HI_CLOCK_CONTROL_IDLE_3D 0x00010000
+#define VIVS_HI_CLOCK_CONTROL_IDLE_2D 0x00020000
+#define VIVS_HI_CLOCK_CONTROL_IDLE_VG 0x00040000
+#define VIVS_HI_CLOCK_CONTROL_ISOLATE_GPU 0x00080000
+#define VIVS_HI_CLOCK_CONTROL_DEBUG_PIXEL_PIPE__MASK 0x00f00000
+#define VIVS_HI_CLOCK_CONTROL_DEBUG_PIXEL_PIPE__SHIFT 20
+#define VIVS_HI_CLOCK_CONTROL_DEBUG_PIXEL_PIPE(x) (((x) << VIVS_HI_CLOCK_CONTROL_DEBUG_PIXEL_PIPE__SHIFT) & VIVS_HI_CLOCK_CONTROL_DEBUG_PIXEL_PIPE__MASK)
+
+#define VIVS_HI_IDLE_STATE 0x00000004
+#define VIVS_HI_IDLE_STATE_FE 0x00000001
+#define VIVS_HI_IDLE_STATE_DE 0x00000002
+#define VIVS_HI_IDLE_STATE_PE 0x00000004
+#define VIVS_HI_IDLE_STATE_SH 0x00000008
+#define VIVS_HI_IDLE_STATE_PA 0x00000010
+#define VIVS_HI_IDLE_STATE_SE 0x00000020
+#define VIVS_HI_IDLE_STATE_RA 0x00000040
+#define VIVS_HI_IDLE_STATE_TX 0x00000080
+#define VIVS_HI_IDLE_STATE_VG 0x00000100
+#define VIVS_HI_IDLE_STATE_IM 0x00000200
+#define VIVS_HI_IDLE_STATE_FP 0x00000400
+#define VIVS_HI_IDLE_STATE_TS 0x00000800
+#define VIVS_HI_IDLE_STATE_AXI_LP 0x80000000
+
+#define VIVS_HI_AXI_CONFIG 0x00000008
+#define VIVS_HI_AXI_CONFIG_AWID__MASK 0x0000000f
+#define VIVS_HI_AXI_CONFIG_AWID__SHIFT 0
+#define VIVS_HI_AXI_CONFIG_AWID(x) (((x) << VIVS_HI_AXI_CONFIG_AWID__SHIFT) & VIVS_HI_AXI_CONFIG_AWID__MASK)
+#define VIVS_HI_AXI_CONFIG_ARID__MASK 0x000000f0
+#define VIVS_HI_AXI_CONFIG_ARID__SHIFT 4
+#define VIVS_HI_AXI_CONFIG_ARID(x) (((x) << VIVS_HI_AXI_CONFIG_ARID__SHIFT) & VIVS_HI_AXI_CONFIG_ARID__MASK)
+#define VIVS_HI_AXI_CONFIG_AWCACHE__MASK 0x00000f00
+#define VIVS_HI_AXI_CONFIG_AWCACHE__SHIFT 8
+#define VIVS_HI_AXI_CONFIG_AWCACHE(x) (((x) << VIVS_HI_AXI_CONFIG_AWCACHE__SHIFT) & VIVS_HI_AXI_CONFIG_AWCACHE__MASK)
+#define VIVS_HI_AXI_CONFIG_ARCACHE__MASK 0x0000f000
+#define VIVS_HI_AXI_CONFIG_ARCACHE__SHIFT 12
+#define VIVS_HI_AXI_CONFIG_ARCACHE(x) (((x) << VIVS_HI_AXI_CONFIG_ARCACHE__SHIFT) & VIVS_HI_AXI_CONFIG_ARCACHE__MASK)
+
+#define VIVS_HI_AXI_STATUS 0x0000000c
+#define VIVS_HI_AXI_STATUS_WR_ERR_ID__MASK 0x0000000f
+#define VIVS_HI_AXI_STATUS_WR_ERR_ID__SHIFT 0
+#define VIVS_HI_AXI_STATUS_WR_ERR_ID(x) (((x) << VIVS_HI_AXI_STATUS_WR_ERR_ID__SHIFT) & VIVS_HI_AXI_STATUS_WR_ERR_ID__MASK)
+#define VIVS_HI_AXI_STATUS_RD_ERR_ID__MASK 0x000000f0
+#define VIVS_HI_AXI_STATUS_RD_ERR_ID__SHIFT 4
+#define VIVS_HI_AXI_STATUS_RD_ERR_ID(x) (((x) << VIVS_HI_AXI_STATUS_RD_ERR_ID__SHIFT) & VIVS_HI_AXI_STATUS_RD_ERR_ID__MASK)
+#define VIVS_HI_AXI_STATUS_DET_WR_ERR 0x00000100
+#define VIVS_HI_AXI_STATUS_DET_RD_ERR 0x00000200
+
+#define VIVS_HI_INTR_ACKNOWLEDGE 0x00000010
+#define VIVS_HI_INTR_ACKNOWLEDGE_INTR_VEC__MASK 0x7fffffff
+#define VIVS_HI_INTR_ACKNOWLEDGE_INTR_VEC__SHIFT 0
+#define VIVS_HI_INTR_ACKNOWLEDGE_INTR_VEC(x) (((x) << VIVS_HI_INTR_ACKNOWLEDGE_INTR_VEC__SHIFT) & VIVS_HI_INTR_ACKNOWLEDGE_INTR_VEC__MASK)
+#define VIVS_HI_INTR_ACKNOWLEDGE_AXI_BUS_ERROR 0x80000000
+
+#define VIVS_HI_INTR_ENBL 0x00000014
+#define VIVS_HI_INTR_ENBL_INTR_ENBL_VEC__MASK 0xffffffff
+#define VIVS_HI_INTR_ENBL_INTR_ENBL_VEC__SHIFT 0
+#define VIVS_HI_INTR_ENBL_INTR_ENBL_VEC(x) (((x) << VIVS_HI_INTR_ENBL_INTR_ENBL_VEC__SHIFT) & VIVS_HI_INTR_ENBL_INTR_ENBL_VEC__MASK)
+
+#define VIVS_HI_CHIP_IDENTITY 0x00000018
+
+#define VIVS_HI_CHIP_FEATURE 0x0000001c
+
+#define VIVS_HI_CHIP_MODEL 0x00000020
+
+#define VIVS_HI_CHIP_REV 0x00000024
+
+#define VIVS_HI_CHIP_DATE 0x00000028
+
+#define VIVS_HI_CHIP_TIME 0x0000002c
+
+#define VIVS_HI_CHIP_MINOR_FEATURE_0 0x00000034
+
+#define VIVS_HI_CACHE_CONTROL 0x00000038
+
+#define VIVS_HI_MEMORY_COUNTER_RESET 0x0000003c
+
+#define VIVS_HI_PROFILE_READ_BYTES8 0x00000040
+
+#define VIVS_HI_PROFILE_WRITE_BYTES8 0x00000044
+
+#define VIVS_HI_CHIP_SPECS 0x00000048
+
+#define VIVS_HI_PROFILE_WRITE_BURSTS 0x0000004c
+
+#define VIVS_HI_PROFILE_WRITE_REQUESTS 0x00000050
+
+#define VIVS_HI_PROFILE_READ_BURSTS 0x00000058
+
+#define VIVS_HI_PROFILE_READ_REQUESTS 0x0000005c
+
+#define VIVS_HI_PROFILE_READ_LASTS 0x00000060
+
+#define VIVS_HI_GP_OUT0 0x00000064
+
+#define VIVS_HI_GP_OUT1 0x00000068
+
+#define VIVS_HI_GP_OUT2 0x0000006c
+
+#define VIVS_HI_AXI_CONTROL 0x00000070
+#define VIVS_HI_AXI_CONTROL_WR_FULL_BURST_MODE 0x00000001
+
+#define VIVS_HI_CHIP_MINOR_FEATURE_1 0x00000074
+
+#define VIVS_HI_PROFILE_TOTAL_CYCLES 0x00000078
+
+#define VIVS_HI_PROFILE_IDLE_CYCLES 0x0000007c
+
+#define VIVS_HI_CHIP_SPECS_2 0x00000080
+
+#define VIVS_HI_CHIP_MINOR_FEATURE_2 0x00000084
+
+#define VIVS_HI_CHIP_MINOR_FEATURE_3 0x00000088
+
+#define VIVS_PM 0x00000000
+
+#define VIVS_PM_POWER_CONTROLS 0x00000100
+#define VIVS_PM_POWER_CONTROLS_ENABLE_MODULE_CLOCK_GATING 0x00000001
+#define VIVS_PM_POWER_CONTROLS_DISABLE_STALL_MODULE_CLOCK_GATING 0x00000002
+#define VIVS_PM_POWER_CONTROLS_DISABLE_STARVE_MODULE_CLOCK_GATING 0x00000004
+#define VIVS_PM_POWER_CONTROLS_TURN_ON_COUNTER__MASK 0x000000f0
+#define VIVS_PM_POWER_CONTROLS_TURN_ON_COUNTER__SHIFT 4
+#define VIVS_PM_POWER_CONTROLS_TURN_ON_COUNTER(x) (((x) << VIVS_PM_POWER_CONTROLS_TURN_ON_COUNTER__SHIFT) & VIVS_PM_POWER_CONTROLS_TURN_ON_COUNTER__MASK)
+#define VIVS_PM_POWER_CONTROLS_TURN_OFF_COUNTER__MASK 0xffff0000
+#define VIVS_PM_POWER_CONTROLS_TURN_OFF_COUNTER__SHIFT 16
+#define VIVS_PM_POWER_CONTROLS_TURN_OFF_COUNTER(x) (((x) << VIVS_PM_POWER_CONTROLS_TURN_OFF_COUNTER__SHIFT) & VIVS_PM_POWER_CONTROLS_TURN_OFF_COUNTER__MASK)
+
+#define VIVS_PM_MODULE_CONTROLS 0x00000104
+#define VIVS_PM_MODULE_CONTROLS_DISABLE_MODULE_CLOCK_GATING_FE 0x00000001
+#define VIVS_PM_MODULE_CONTROLS_DISABLE_MODULE_CLOCK_GATING_DE 0x00000002
+#define VIVS_PM_MODULE_CONTROLS_DISABLE_MODULE_CLOCK_GATING_PE 0x00000004
+
+#define VIVS_PM_MODULE_STATUS 0x00000108
+#define VIVS_PM_MODULE_STATUS_MODULE_CLOCK_GATED_FE 0x00000001
+#define VIVS_PM_MODULE_STATUS_MODULE_CLOCK_GATED_DE 0x00000002
+#define VIVS_PM_MODULE_STATUS_MODULE_CLOCK_GATED_PE 0x00000004
+
+#define VIVS_PM_PULSE_EATER 0x0000010c
+
+#define VIVS_MMUv2 0x00000000
+
+#define VIVS_MMUv2_SAFE_ADDRESS 0x00000180
+
+#define VIVS_MMUv2_CONFIGURATION 0x00000184
+#define VIVS_MMUv2_CONFIGURATION_MODE__MASK 0x00000001
+#define VIVS_MMUv2_CONFIGURATION_MODE__SHIFT 0
+#define VIVS_MMUv2_CONFIGURATION_MODE_MODE4_K 0x00000000
+#define VIVS_MMUv2_CONFIGURATION_MODE_MODE1_K 0x00000001
+#define VIVS_MMUv2_CONFIGURATION_MODE_MASK 0x00000008
+#define VIVS_MMUv2_CONFIGURATION_FLUSH__MASK 0x00000010
+#define VIVS_MMUv2_CONFIGURATION_FLUSH__SHIFT 4
+#define VIVS_MMUv2_CONFIGURATION_FLUSH_FLUSH 0x00000010
+#define VIVS_MMUv2_CONFIGURATION_FLUSH_MASK 0x00000080
+#define VIVS_MMUv2_CONFIGURATION_ADDRESS_MASK 0x00000100
+#define VIVS_MMUv2_CONFIGURATION_ADDRESS__MASK 0xfffffc00
+#define VIVS_MMUv2_CONFIGURATION_ADDRESS__SHIFT 10
+#define VIVS_MMUv2_CONFIGURATION_ADDRESS(x) (((x) << VIVS_MMUv2_CONFIGURATION_ADDRESS__SHIFT) & VIVS_MMUv2_CONFIGURATION_ADDRESS__MASK)
+
+#define VIVS_MMUv2_STATUS 0x00000188
+#define VIVS_MMUv2_STATUS_EXCEPTION0__MASK 0x00000003
+#define VIVS_MMUv2_STATUS_EXCEPTION0__SHIFT 0
+#define VIVS_MMUv2_STATUS_EXCEPTION0(x) (((x) << VIVS_MMUv2_STATUS_EXCEPTION0__SHIFT) & VIVS_MMUv2_STATUS_EXCEPTION0__MASK)
+#define VIVS_MMUv2_STATUS_EXCEPTION1__MASK 0x00000030
+#define VIVS_MMUv2_STATUS_EXCEPTION1__SHIFT 4
+#define VIVS_MMUv2_STATUS_EXCEPTION1(x) (((x) << VIVS_MMUv2_STATUS_EXCEPTION1__SHIFT) & VIVS_MMUv2_STATUS_EXCEPTION1__MASK)
+#define VIVS_MMUv2_STATUS_EXCEPTION2__MASK 0x00000300
+#define VIVS_MMUv2_STATUS_EXCEPTION2__SHIFT 8
+#define VIVS_MMUv2_STATUS_EXCEPTION2(x) (((x) << VIVS_MMUv2_STATUS_EXCEPTION2__SHIFT) & VIVS_MMUv2_STATUS_EXCEPTION2__MASK)
+#define VIVS_MMUv2_STATUS_EXCEPTION3__MASK 0x00003000
+#define VIVS_MMUv2_STATUS_EXCEPTION3__SHIFT 12
+#define VIVS_MMUv2_STATUS_EXCEPTION3(x) (((x) << VIVS_MMUv2_STATUS_EXCEPTION3__SHIFT) & VIVS_MMUv2_STATUS_EXCEPTION3__MASK)
+
+#define VIVS_MMUv2_CONTROL 0x0000018c
+#define VIVS_MMUv2_CONTROL_ENABLE 0x00000001
+
+#define VIVS_MMUv2_EXCEPTION_ADDR(i0) (0x00000190 + 0x4*(i0))
+#define VIVS_MMUv2_EXCEPTION_ADDR__ESIZE 0x00000004
+#define VIVS_MMUv2_EXCEPTION_ADDR__LEN 0x00000004
+
+#define VIVS_MC 0x00000000
+
+#define VIVS_MC_MMU_FE_PAGE_TABLE 0x00000400
+
+#define VIVS_MC_MMU_TX_PAGE_TABLE 0x00000404
+
+#define VIVS_MC_MMU_PE_PAGE_TABLE 0x00000408
+
+#define VIVS_MC_MMU_PEZ_PAGE_TABLE 0x0000040c
+
+#define VIVS_MC_MMU_RA_PAGE_TABLE 0x00000410
+
+#define VIVS_MC_DEBUG_MEMORY 0x00000414
+#define VIVS_MC_DEBUG_MEMORY_SPECIAL_PATCH_GC320 0x00000008
+#define VIVS_MC_DEBUG_MEMORY_FAST_CLEAR_BYPASS 0x00100000
+#define VIVS_MC_DEBUG_MEMORY_COMPRESSION_BYPASS 0x00200000
+
+#define VIVS_MC_MEMORY_BASE_ADDR_RA 0x00000418
+
+#define VIVS_MC_MEMORY_BASE_ADDR_FE 0x0000041c
+
+#define VIVS_MC_MEMORY_BASE_ADDR_TX 0x00000420
+
+#define VIVS_MC_MEMORY_BASE_ADDR_PEZ 0x00000424
+
+#define VIVS_MC_MEMORY_BASE_ADDR_PE 0x00000428
+
+#define VIVS_MC_MEMORY_TIMING_CONTROL 0x0000042c
+
+#define VIVS_MC_MEMORY_FLUSH 0x00000430
+
+#define VIVS_MC_PROFILE_CYCLE_COUNTER 0x00000438
+
+#define VIVS_MC_DEBUG_READ0 0x0000043c
+
+#define VIVS_MC_DEBUG_READ1 0x00000440
+
+#define VIVS_MC_DEBUG_WRITE 0x00000444
+
+#define VIVS_MC_PROFILE_RA_READ 0x00000448
+
+#define VIVS_MC_PROFILE_TX_READ 0x0000044c
+
+#define VIVS_MC_PROFILE_FE_READ 0x00000450
+
+#define VIVS_MC_PROFILE_PE_READ 0x00000454
+
+#define VIVS_MC_PROFILE_DE_READ 0x00000458
+
+#define VIVS_MC_PROFILE_SH_READ 0x0000045c
+
+#define VIVS_MC_PROFILE_PA_READ 0x00000460
+
+#define VIVS_MC_PROFILE_SE_READ 0x00000464
+
+#define VIVS_MC_PROFILE_MC_READ 0x00000468
+
+#define VIVS_MC_PROFILE_HI_READ 0x0000046c
+
+#define VIVS_MC_PROFILE_CONFIG0 0x00000470
+#define VIVS_MC_PROFILE_CONFIG0_FE__MASK 0x0000000f
+#define VIVS_MC_PROFILE_CONFIG0_FE__SHIFT 0
+#define VIVS_MC_PROFILE_CONFIG0_FE_RESET 0x0000000f
+#define VIVS_MC_PROFILE_CONFIG0_DE__MASK 0x00000f00
+#define VIVS_MC_PROFILE_CONFIG0_DE__SHIFT 8
+#define VIVS_MC_PROFILE_CONFIG0_DE_RESET 0x00000f00
+#define VIVS_MC_PROFILE_CONFIG0_PE__MASK 0x000f0000
+#define VIVS_MC_PROFILE_CONFIG0_PE__SHIFT 16
+#define VIVS_MC_PROFILE_CONFIG0_PE_PIXEL_COUNT_KILLED_BY_COLOR_PIPE 0x00000000
+#define VIVS_MC_PROFILE_CONFIG0_PE_PIXEL_COUNT_KILLED_BY_DEPTH_PIPE 0x00010000
+#define VIVS_MC_PROFILE_CONFIG0_PE_PIXEL_COUNT_DRAWN_BY_COLOR_PIPE 0x00020000
+#define VIVS_MC_PROFILE_CONFIG0_PE_PIXEL_COUNT_DRAWN_BY_DEPTH_PIPE 0x00030000
+#define VIVS_MC_PROFILE_CONFIG0_PE_PIXELS_RENDERED_2D 0x000b0000
+#define VIVS_MC_PROFILE_CONFIG0_PE_RESET 0x000f0000
+#define VIVS_MC_PROFILE_CONFIG0_SH__MASK 0x0f000000
+#define VIVS_MC_PROFILE_CONFIG0_SH__SHIFT 24
+#define VIVS_MC_PROFILE_CONFIG0_SH_SHADER_CYCLES 0x04000000
+#define VIVS_MC_PROFILE_CONFIG0_SH_PS_INST_COUNTER 0x07000000
+#define VIVS_MC_PROFILE_CONFIG0_SH_RENDERED_PIXEL_COUNTER 0x08000000
+#define VIVS_MC_PROFILE_CONFIG0_SH_VS_INST_COUNTER 0x09000000
+#define VIVS_MC_PROFILE_CONFIG0_SH_RENDERED_VERTICE_COUNTER 0x0a000000
+#define VIVS_MC_PROFILE_CONFIG0_SH_VTX_BRANCH_INST_COUNTER 0x0b000000
+#define VIVS_MC_PROFILE_CONFIG0_SH_VTX_TEXLD_INST_COUNTER 0x0c000000
+#define VIVS_MC_PROFILE_CONFIG0_SH_PXL_BRANCH_INST_COUNTER 0x0d000000
+#define VIVS_MC_PROFILE_CONFIG0_SH_PXL_TEXLD_INST_COUNTER 0x0e000000
+#define VIVS_MC_PROFILE_CONFIG0_SH_RESET 0x0f000000
+
+#define VIVS_MC_PROFILE_CONFIG1 0x00000474
+#define VIVS_MC_PROFILE_CONFIG1_PA__MASK 0x0000000f
+#define VIVS_MC_PROFILE_CONFIG1_PA__SHIFT 0
+#define VIVS_MC_PROFILE_CONFIG1_PA_INPUT_VTX_COUNTER 0x00000003
+#define VIVS_MC_PROFILE_CONFIG1_PA_INPUT_PRIM_COUNTER 0x00000004
+#define VIVS_MC_PROFILE_CONFIG1_PA_OUTPUT_PRIM_COUNTER 0x00000005
+#define VIVS_MC_PROFILE_CONFIG1_PA_DEPTH_CLIPPED_COUNTER 0x00000006
+#define VIVS_MC_PROFILE_CONFIG1_PA_TRIVIAL_REJECTED_COUNTER 0x00000007
+#define VIVS_MC_PROFILE_CONFIG1_PA_CULLED_COUNTER 0x00000008
+#define VIVS_MC_PROFILE_CONFIG1_PA_RESET 0x0000000f
+#define VIVS_MC_PROFILE_CONFIG1_SE__MASK 0x00000f00
+#define VIVS_MC_PROFILE_CONFIG1_SE__SHIFT 8
+#define VIVS_MC_PROFILE_CONFIG1_SE_CULLED_TRIANGLE_COUNT 0x00000000
+#define VIVS_MC_PROFILE_CONFIG1_SE_CULLED_LINES_COUNT 0x00000100
+#define VIVS_MC_PROFILE_CONFIG1_SE_RESET 0x00000f00
+#define VIVS_MC_PROFILE_CONFIG1_RA__MASK 0x000f0000
+#define VIVS_MC_PROFILE_CONFIG1_RA__SHIFT 16
+#define VIVS_MC_PROFILE_CONFIG1_RA_VALID_PIXEL_COUNT 0x00000000
+#define VIVS_MC_PROFILE_CONFIG1_RA_TOTAL_QUAD_COUNT 0x00010000
+#define VIVS_MC_PROFILE_CONFIG1_RA_VALID_QUAD_COUNT_AFTER_EARLY_Z 0x00020000
+#define VIVS_MC_PROFILE_CONFIG1_RA_TOTAL_PRIMITIVE_COUNT 0x00030000
+#define VIVS_MC_PROFILE_CONFIG1_RA_PIPE_CACHE_MISS_COUNTER 0x00090000
+#define VIVS_MC_PROFILE_CONFIG1_RA_PREFETCH_CACHE_MISS_COUNTER 0x000a0000
+#define VIVS_MC_PROFILE_CONFIG1_RA_CULLED_QUAD_COUNT 0x000b0000
+#define VIVS_MC_PROFILE_CONFIG1_RA_RESET 0x000f0000
+#define VIVS_MC_PROFILE_CONFIG1_TX__MASK 0x0f000000
+#define VIVS_MC_PROFILE_CONFIG1_TX__SHIFT 24
+#define VIVS_MC_PROFILE_CONFIG1_TX_TOTAL_BILINEAR_REQUESTS 0x00000000
+#define VIVS_MC_PROFILE_CONFIG1_TX_TOTAL_TRILINEAR_REQUESTS 0x01000000
+#define VIVS_MC_PROFILE_CONFIG1_TX_TOTAL_DISCARDED_TEXTURE_REQUESTS 0x02000000
+#define VIVS_MC_PROFILE_CONFIG1_TX_TOTAL_TEXTURE_REQUESTS 0x03000000
+#define VIVS_MC_PROFILE_CONFIG1_TX_UNKNOWN 0x04000000
+#define VIVS_MC_PROFILE_CONFIG1_TX_MEM_READ_COUNT 0x05000000
+#define VIVS_MC_PROFILE_CONFIG1_TX_MEM_READ_IN_8B_COUNT 0x06000000
+#define VIVS_MC_PROFILE_CONFIG1_TX_CACHE_MISS_COUNT 0x07000000
+#define VIVS_MC_PROFILE_CONFIG1_TX_CACHE_HIT_TEXEL_COUNT 0x08000000
+#define VIVS_MC_PROFILE_CONFIG1_TX_CACHE_MISS_TEXEL_COUNT 0x09000000
+#define VIVS_MC_PROFILE_CONFIG1_TX_RESET 0x0f000000
+
+#define VIVS_MC_PROFILE_CONFIG2 0x00000478
+#define VIVS_MC_PROFILE_CONFIG2_MC__MASK 0x0000000f
+#define VIVS_MC_PROFILE_CONFIG2_MC__SHIFT 0
+#define VIVS_MC_PROFILE_CONFIG2_MC_TOTAL_READ_REQ_8B_FROM_PIPELINE 0x00000001
+#define VIVS_MC_PROFILE_CONFIG2_MC_TOTAL_READ_REQ_8B_FROM_IP 0x00000002
+#define VIVS_MC_PROFILE_CONFIG2_MC_TOTAL_WRITE_REQ_8B_FROM_PIPELINE 0x00000003
+#define VIVS_MC_PROFILE_CONFIG2_MC_RESET 0x0000000f
+#define VIVS_MC_PROFILE_CONFIG2_HI__MASK 0x00000f00
+#define VIVS_MC_PROFILE_CONFIG2_HI__SHIFT 8
+#define VIVS_MC_PROFILE_CONFIG2_HI_AXI_CYCLES_READ_REQUEST_STALLED 0x00000000
+#define VIVS_MC_PROFILE_CONFIG2_HI_AXI_CYCLES_WRITE_REQUEST_STALLED 0x00000100
+#define VIVS_MC_PROFILE_CONFIG2_HI_AXI_CYCLES_WRITE_DATA_STALLED 0x00000200
+#define VIVS_MC_PROFILE_CONFIG2_HI_RESET 0x00000f00
+
+#define VIVS_MC_PROFILE_CONFIG3 0x0000047c
+
+#define VIVS_MC_BUS_CONFIG 0x00000480
+
+#define VIVS_MC_START_COMPOSITION 0x00000554
+
+#define VIVS_MC_128B_MERGE 0x00000558
+
+
+#endif /* STATE_HI_XML */
diff --git a/src/etnaviv/state_vg.xml.h b/src/etnaviv/state_vg.xml.h
new file mode 100644
index 0000000..f143015
--- /dev/null
+++ b/src/etnaviv/state_vg.xml.h
@@ -0,0 +1,181 @@
+#ifndef STATE_VG_XML
+#define STATE_VG_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- /home/orion/projects/etna_viv/rnndb/state.xml ( 18526 bytes, from 2013-09-11 16:52:32)
+- /home/orion/projects/etna_viv/rnndb/common.xml ( 16543 bytes, from 2013-09-01 10:53:22)
+- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21834 bytes, from 2013-09-11 15:58:37)
+- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51058 bytes, from 2013-09-01 10:53:22)
+- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54270 bytes, from 2013-09-17 15:37:52)
+- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-09-01 10:53:22)
+
+Copyright (C) 2013
+*/
+
+
+#define VIVS_VG 0x00000000
+
+#define VIVS_VG_UNK02800 0x00002800
+
+#define VIVS_VG_UNK02804 0x00002804
+
+#define VIVS_VG_UNK02808 0x00002808
+
+#define VIVS_VG_UNK0280C 0x0000280c
+
+#define VIVS_VG_UNK02810(i0) (0x00002810 + 0x4*(i0))
+#define VIVS_VG_UNK02810__ESIZE 0x00000004
+#define VIVS_VG_UNK02810__LEN 0x00000002
+
+#define VIVS_VG_UNK02818(i0) (0x00002818 + 0x4*(i0))
+#define VIVS_VG_UNK02818__ESIZE 0x00000004
+#define VIVS_VG_UNK02818__LEN 0x00000002
+
+#define VIVS_VG_UNK02820(i0) (0x00002820 + 0x4*(i0))
+#define VIVS_VG_UNK02820__ESIZE 0x00000004
+#define VIVS_VG_UNK02820__LEN 0x00000002
+
+#define VIVS_VG_UNK02828 0x00002828
+
+#define VIVS_VG_UNK0282C 0x0000282c
+
+#define VIVS_VG_UNK02830(i0) (0x00002830 + 0x4*(i0))
+#define VIVS_VG_UNK02830__ESIZE 0x00000004
+#define VIVS_VG_UNK02830__LEN 0x00000004
+
+#define VIVS_VG_UNK02840 0x00002840
+
+#define VIVS_VG_UNK02844 0x00002844
+
+#define VIVS_VG_UNK02848 0x00002848
+
+#define VIVS_VG_UNK0284C 0x0000284c
+
+#define VIVS_VG_UNK02850 0x00002850
+
+#define VIVS_VG_UNK02854 0x00002854
+
+#define VIVS_VG_UNK02858 0x00002858
+
+#define VIVS_VG_UNK0285C 0x0000285c
+
+#define VIVS_VG_UNK02860(i0) (0x00002860 + 0x4*(i0))
+#define VIVS_VG_UNK02860__ESIZE 0x00000004
+#define VIVS_VG_UNK02860__LEN 0x00000003
+
+#define VIVS_VG_UNK02870(i0) (0x00002870 + 0x4*(i0))
+#define VIVS_VG_UNK02870__ESIZE 0x00000004
+#define VIVS_VG_UNK02870__LEN 0x00000003
+
+#define VIVS_VG_UNK02880(i0) (0x00002880 + 0x4*(i0))
+#define VIVS_VG_UNK02880__ESIZE 0x00000004
+#define VIVS_VG_UNK02880__LEN 0x00000003
+
+#define VIVS_VG_UNK02890(i0) (0x00002890 + 0x4*(i0))
+#define VIVS_VG_UNK02890__ESIZE 0x00000004
+#define VIVS_VG_UNK02890__LEN 0x00000002
+
+#define VIVS_VG_UNK02898(i0) (0x00002898 + 0x4*(i0))
+#define VIVS_VG_UNK02898__ESIZE 0x00000004
+#define VIVS_VG_UNK02898__LEN 0x00000002
+
+#define VIVS_VG_UNK028A0(i0) (0x000028a0 + 0x4*(i0))
+#define VIVS_VG_UNK028A0__ESIZE 0x00000004
+#define VIVS_VG_UNK028A0__LEN 0x00000002
+
+#define VIVS_VG_UNK028A8(i0) (0x000028a8 + 0x4*(i0))
+#define VIVS_VG_UNK028A8__ESIZE 0x00000004
+#define VIVS_VG_UNK028A8__LEN 0x00000002
+
+#define VIVS_VG_UNK028B0(i0) (0x000028b0 + 0x4*(i0))
+#define VIVS_VG_UNK028B0__ESIZE 0x00000004
+#define VIVS_VG_UNK028B0__LEN 0x00000002
+
+#define VIVS_VG_UNK028B8(i0) (0x000028b8 + 0x4*(i0))
+#define VIVS_VG_UNK028B8__ESIZE 0x00000004
+#define VIVS_VG_UNK028B8__LEN 0x00000002
+
+#define VIVS_VG_UNK028C0 0x000028c0
+
+#define VIVS_VG_UNK028C4 0x000028c4
+
+#define VIVS_VG_UNK028C8 0x000028c8
+
+#define VIVS_VG_UNK028CC 0x000028cc
+
+#define VIVS_VG_UNK028D0 0x000028d0
+
+#define VIVS_VG_UNK028D4 0x000028d4
+
+#define VIVS_VG_UNK028D8 0x000028d8
+
+#define VIVS_VG_UNK028DC 0x000028dc
+
+#define VIVS_VG_UNK028E0 0x000028e0
+
+#define VIVS_VG_UNK028E4 0x000028e4
+
+#define VIVS_VG_UNK028E8 0x000028e8
+
+#define VIVS_VG_UNK028EC 0x000028ec
+
+#define VIVS_VG_UNK028F0 0x000028f0
+
+#define VIVS_VG_UNK028F8 0x000028f8
+
+#define VIVS_VG_UNK028FC 0x000028fc
+
+#define VIVS_VG_UNK02900(i0) (0x00002900 + 0x4*(i0))
+#define VIVS_VG_UNK02900__ESIZE 0x00000004
+#define VIVS_VG_UNK02900__LEN 0x00000006
+
+#define VIVS_VG_UNK02918 0x00002918
+
+#define VIVS_VG_UNK0291C 0x0000291c
+
+#define VIVS_VG_UNK02920 0x00002920
+
+#define VIVS_VG_UNK02924 0x00002924
+
+#define VIVS_VG_UNK02928 0x00002928
+
+#define VIVS_VG_UNK0292C 0x0000292c
+
+#define VIVS_VG_UNK02930 0x00002930
+
+#define VIVS_VG_UNK02934 0x00002934
+
+#define VIVS_VG_UNK02938 0x00002938
+
+#define VIVS_VG_UNK0293C 0x0000293c
+
+#define VIVS_VG_UNK02940(i0) (0x00002940 + 0x4*(i0))
+#define VIVS_VG_UNK02940__ESIZE 0x00000004
+#define VIVS_VG_UNK02940__LEN 0x00000002
+
+#define VIVS_VG_UNK02948(i0) (0x00002948 + 0x4*(i0))
+#define VIVS_VG_UNK02948__ESIZE 0x00000004
+#define VIVS_VG_UNK02948__LEN 0x00000002
+
+#define VIVS_VG_UNK02950 0x00002950
+
+#define VIVS_VG_UNK02954 0x00002954
+
+#define VIVS_VG_UNK02958 0x00002958
+
+#define VIVS_VG_UNK0295C 0x0000295c
+
+#define VIVS_VG_UNK02960 0x00002960
+
+#define VIVS_VG_UNK02980(i0) (0x00002980 + 0x4*(i0))
+#define VIVS_VG_UNK02980__ESIZE 0x00000004
+#define VIVS_VG_UNK02980__LEN 0x00000019
+
+
+#endif /* STATE_VG_XML */
diff --git a/src/etnaviv/viv.c b/src/etnaviv/viv.c
new file mode 100644
index 0000000..b9b400a
--- /dev/null
+++ b/src/etnaviv/viv.c
@@ -0,0 +1,562 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#include <etnaviv/viv.h>
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "gc_abi.h"
+#include "viv_internal.h"
+
+#ifdef ETNAVIV_HOOK
+/* If set, command stream will be logged to environment variable ETNAVIV_FDR */
+#include "viv_hook.h"
+#define open my_open
+#define mmap my_mmap
+#define munmap my_munmap
+#define ioctl my_ioctl
+#endif
+//#define DEBUG
+
+const char *galcore_device[] = {"/dev/gal3d", "/dev/galcore", "/dev/graphics/galcore", NULL};
+#define INTERFACE_SIZE (sizeof(gcsHAL_INTERFACE))
+
+/* Call ioctl interface with structure cmd as input and output.
+ * @returns status (VIV_STATUS_xxx)
+ */
+int viv_invoke(struct viv_conn *conn, struct _gcsHAL_INTERFACE *cmd)
+{
+ vivante_ioctl_data_t ic = {
+#ifdef GCABI_UINT64_IOCTL_DATA
+ .in_buf = PTR_TO_VIV(cmd),
+ .in_buf_size = INTERFACE_SIZE,
+ .out_buf = PTR_TO_VIV(cmd),
+ .out_buf_size = INTERFACE_SIZE
+#else
+ .in_buf = (void*)cmd,
+ .in_buf_size = INTERFACE_SIZE,
+ .out_buf = (void*)cmd,
+ .out_buf_size = INTERFACE_SIZE
+#endif
+ };
+#ifdef GCABI_HAS_HARDWARE_TYPE
+ cmd->hardwareType = (gceHARDWARE_TYPE)conn->hw_type;
+#endif
+ if(ioctl(conn->fd, IOCTL_GCHAL_INTERFACE, &ic) < 0)
+ return -1;
+#ifdef DEBUG
+ if(cmd->status != 0)
+ {
+ printf("Command %i failed with status %i\n", cmd->command, cmd->status);
+ }
+#endif
+ return cmd->status;
+}
+
+int viv_close(struct viv_conn *conn)
+{
+ if(conn->fd < 0)
+ return -1;
+ close(conn->fd);
+ free(conn);
+#ifdef ETNAVIV_HOOK
+ close_hook();
+#endif
+ return 0;
+}
+
+/* convert specs to kernel-independent format */
+static void convert_chip_specs(struct viv_specs *out, const struct _gcsHAL_QUERY_CHIP_IDENTITY *in)
+{
+ out->chip_model = in->chipModel;
+ out->chip_revision = in->chipRevision;
+ out->chip_features[0] = in->chipFeatures;
+ out->chip_features[1] = in->chipMinorFeatures;
+ out->chip_features[2] = in->chipMinorFeatures1;
+#ifdef GCABI_HAS_MINOR_FEATURES_2
+ out->chip_features[3] = in->chipMinorFeatures2;
+#else
+ out->chip_features[3] = 0;
+#endif
+#ifdef GCABI_HAS_MINOR_FEATURES_3
+ out->chip_features[4] = in->chipMinorFeatures3;
+#else
+ out->chip_features[4] = 0;
+#endif
+ out->stream_count = in->streamCount;
+ out->register_max = in->registerMax;
+ out->thread_count = in->threadCount;
+ out->shader_core_count = in->shaderCoreCount;
+ out->vertex_cache_size = in->vertexCacheSize;
+ out->vertex_output_buffer_size = in->vertexOutputBufferSize;
+#ifdef GCABI_CHIPIDENTITY_EXT
+ out->pixel_pipes = in->pixelPipes;
+ out->instruction_count = in->instructionCount;
+ out->num_constants = in->numConstants;
+ out->buffer_size = in->bufferSize;
+#else
+ out->pixel_pipes = 1;
+ out->instruction_count = 256;
+ out->num_constants = 0; /* =default (depends on hw) */
+ out->buffer_size = 0; /* =default (depends on hw) */
+#endif
+#ifdef GCABI_CHIPIDENTITY_VARYINGS
+ out->varyings_count = in->varyingsCount;
+#else
+ out->varyings_count = 8;
+#endif
+}
+
+int viv_open(enum viv_hw_type hw_type, struct viv_conn **out)
+{
+ struct viv_conn *conn = malloc(sizeof(struct viv_conn));
+ int err = 0;
+ if(conn == NULL)
+ return -1;
+#ifdef ETNAVIV_HOOK
+ char *fdr_out = getenv("ETNAVIV_FDR");
+ if(fdr_out)
+ hook_start_logging(fdr_out);
+#endif
+ conn->hw_type = hw_type;
+ gcsHAL_INTERFACE id = {};
+ /* try galcore devices */
+ conn->fd = -1;
+ for(const char **pname = galcore_device; *pname && conn->fd < 0; ++pname)
+ {
+ conn->fd = open(*pname, O_RDWR);
+ }
+ if((err=conn->fd) < 0)
+ goto error;
+
+#ifdef GCABI_HAS_STATE_DELTAS
+ /* Determine version */
+ id.command = gcvHAL_VERSION;
+ if((err=viv_invoke(conn, &id)) != gcvSTATUS_OK)
+ goto error;
+ conn->kernel_driver.major = id.u.Version.major;
+ conn->kernel_driver.minor = id.u.Version.minor;
+ conn->kernel_driver.patch = id.u.Version.patch;
+ conn->kernel_driver.build = id.u.Version.build;
+#else
+ /* <=v2 drivers don't have an always available mechanism for getting the driver version,
+ * although in some (like dove) a /proc file is available that gives the version.
+ */
+ conn->kernel_driver.major = 2;
+ conn->kernel_driver.minor = 0;
+ conn->kernel_driver.patch = 0;
+ conn->kernel_driver.build = 0;
+#endif
+ snprintf(conn->kernel_driver.name, sizeof(conn->kernel_driver.name),
+ "Vivante GPL kernel driver %i.%i.%i.%i",
+ conn->kernel_driver.major, conn->kernel_driver.minor,
+ conn->kernel_driver.patch, conn->kernel_driver.build);
+ printf("Kernel: %s\n", conn->kernel_driver.name);
+
+ /* Determine base address */
+ id.command = gcvHAL_GET_BASE_ADDRESS;
+ if((err=viv_invoke(conn, &id)) != gcvSTATUS_OK)
+ goto error;
+ conn->base_address = id.u.GetBaseAddress.baseAddress;
+ printf("Physical address of internal memory: %08x\n", conn->base_address);
+
+ /* Get chip identity */
+ id.command = gcvHAL_QUERY_CHIP_IDENTITY;
+ if((err=viv_invoke(conn, &id)) != gcvSTATUS_OK)
+ goto error;
+ convert_chip_specs(&conn->chip, &id.u.QueryChipIdentity);
+
+ /* Map contiguous memory */
+ id.command = gcvHAL_QUERY_VIDEO_MEMORY;
+ if((err=viv_invoke(conn, &id)) != gcvSTATUS_OK)
+ goto error;
+ printf("* Video memory:\n");
+ printf(" Internal physical: 0x%08x\n", (uint32_t)id.u.QueryVideoMemory.internalPhysical);
+ printf(" Internal size: 0x%08x\n", (uint32_t)id.u.QueryVideoMemory.internalSize);
+ printf(" External physical: %08x\n", (uint32_t)id.u.QueryVideoMemory.externalPhysical);
+ printf(" External size: 0x%08x\n", (uint32_t)id.u.QueryVideoMemory.externalSize);
+ printf(" Contiguous physical: 0x%08x\n", (uint32_t)id.u.QueryVideoMemory.contiguousPhysical);
+ printf(" Contiguous size: 0x%08x\n", (uint32_t)id.u.QueryVideoMemory.contiguousSize);
+
+ conn->mem_base = (viv_addr_t)id.u.QueryVideoMemory.contiguousPhysical;
+ conn->mem = mmap(NULL, id.u.QueryVideoMemory.contiguousSize, PROT_READ|PROT_WRITE, MAP_SHARED, conn->fd, conn->mem_base);
+ if(conn->mem == NULL)
+ {
+ err = -1;
+ goto error;
+ }
+
+ conn->process = getpid(); /* value passed as .process to commands */
+
+ *out = conn;
+ return gcvSTATUS_OK;
+error:
+ if(conn->fd >= 0)
+ close(conn->fd);
+ free(conn);
+ return err;
+}
+
+int viv_alloc_contiguous(struct viv_conn *conn, size_t bytes, viv_addr_t *physical, void **logical, size_t *bytes_out)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY,
+ .u = {
+ .AllocateContiguousMemory = {
+ .bytes = bytes
+ }
+ }
+ };
+ int rv = viv_invoke(conn, &id);
+ if(rv != gcvSTATUS_OK)
+ {
+ *physical = 0;
+ *logical = 0;
+ return rv;
+ }
+ *physical = (viv_addr_t) id.u.AllocateContiguousMemory.physical;
+ *logical = VIV_TO_PTR(id.u.AllocateContiguousMemory.logical);
+ if(bytes_out)
+ *bytes_out = id.u.AllocateContiguousMemory.bytes;
+ return gcvSTATUS_OK;
+}
+
+int viv_alloc_linear_vidmem(struct viv_conn *conn, size_t bytes, size_t alignment, enum viv_surf_type type, enum viv_pool pool, viv_node_t *node, size_t *bytes_out)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY,
+ .u = {
+ .AllocateLinearVideoMemory = {
+ .bytes = bytes,
+ .alignment = alignment,
+ .type = convert_surf_type(type),
+ .pool = convert_pool(pool)
+ }
+ }
+ };
+ int rv = viv_invoke(conn, &id);
+ if(rv != gcvSTATUS_OK)
+ {
+ *node = 0;
+ if(bytes_out != NULL)
+ *bytes_out = 0;
+ return rv;
+ }
+ *node = VIV_TO_HANDLE(id.u.AllocateLinearVideoMemory.node);
+ if(bytes_out != NULL)
+ *bytes_out = id.u.AllocateLinearVideoMemory.bytes;
+ return gcvSTATUS_OK;
+}
+
+int viv_lock_vidmem(struct viv_conn *conn, viv_node_t node, viv_addr_t *physical, void **logical)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_LOCK_VIDEO_MEMORY,
+ .u = {
+ .LockVideoMemory = {
+ .node = HANDLE_TO_VIV(node),
+ }
+ }
+ };
+ int rv = viv_invoke(conn, &id);
+ if(rv != gcvSTATUS_OK)
+ {
+ *physical = 0;
+ *logical = 0;
+ return rv;
+ }
+ *physical = id.u.LockVideoMemory.address;
+ *logical = VIV_TO_PTR(id.u.LockVideoMemory.memory);
+ return gcvSTATUS_OK;
+}
+
+int viv_unlock_vidmem(struct viv_conn *conn, viv_node_t node, enum viv_surf_type type, bool submit_as_event, int *async)
+{
+ int rv;
+ if(!submit_as_event && async == NULL)
+ return VIV_STATUS_INVALID_ADDRESS;
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_UNLOCK_VIDEO_MEMORY,
+ .u = {
+ .UnlockVideoMemory = {
+ .node = HANDLE_TO_VIV(node),
+ .type = convert_surf_type(type), /* why does this need type? */
+ .asynchroneous = 0
+ }
+ }
+ };
+ if(submit_as_event) /* submit as event immediately */
+ {
+ struct _gcsQUEUE queue = {
+ .next = PTR_TO_VIV(NULL),
+ .iface = id
+ };
+ rv = viv_event_commit(conn, &queue);
+ } else { /* submit as command, return async flag */
+ rv = viv_invoke(conn, &id);
+ *async = id.u.UnlockVideoMemory.asynchroneous;
+ }
+ return rv;
+}
+
+#ifdef GCABI_HAS_CONTEXT
+int viv_commit(struct viv_conn *conn, struct _gcoCMDBUF *commandBuffer, viv_context_t contextBuffer, struct _gcsQUEUE *queue)
+{
+ int rv;
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_COMMIT,
+ .u = {
+ .Commit = {
+ .commandBuffer = commandBuffer,
+ .contextBuffer = HANDLE_TO_VIV(contextBuffer),
+ .process = HANDLE_TO_VIV(conn->process)
+ }
+ }
+ };
+ if((rv=viv_invoke(conn, &id)) != gcvSTATUS_OK)
+ return rv;
+ /* commit queue after command buffer */
+ if(queue != NULL && (rv=viv_event_commit(conn, queue)) != gcvSTATUS_OK)
+ return rv;
+ return gcvSTATUS_OK;
+}
+#else
+int viv_commit(struct viv_conn *conn, struct _gcoCMDBUF *commandBuffer, viv_context_t context, struct _gcsQUEUE *queue)
+{
+ gcsSTATE_DELTA fake_delta;
+ memset(&fake_delta, 0, sizeof(gcsSTATE_DELTA));
+
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_COMMIT,
+ .u = {
+ .Commit = {
+ .commandBuffer = PTR_TO_VIV(commandBuffer),
+ .context = HANDLE_TO_VIV(context),
+ .queue = PTR_TO_VIV(queue),
+ .delta = PTR_TO_VIV(&fake_delta),
+ }
+ }
+ };
+
+ return viv_invoke(conn, &id);
+}
+#endif
+
+int viv_event_commit(struct viv_conn *conn, struct _gcsQUEUE *queue)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_EVENT_COMMIT,
+ .u = {
+ .Event = {
+ .queue = PTR_TO_VIV(queue),
+ }
+ }
+ };
+ return viv_invoke(conn, &id);
+}
+
+int viv_user_signal_create(struct viv_conn *conn, int manualReset, int *id_out)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_USER_SIGNAL,
+ .u = {
+ .UserSignal = {
+ .command = gcvUSER_SIGNAL_CREATE,
+ .manualReset = manualReset,
+#ifdef GCABI_USER_SIGNAL_HAS_TYPE
+ .signalType = 0 /* only used for debugging and error messages inside kernel */
+#endif
+ }
+ }
+ };
+ int rv = viv_invoke(conn, &id);
+ if(rv != gcvSTATUS_OK)
+ return rv;
+ *id_out = id.u.UserSignal.id;
+ return gcvSTATUS_OK;
+}
+
+int viv_user_signal_signal(struct viv_conn *conn, int sig_id, int state)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_USER_SIGNAL,
+ .u = {
+ .UserSignal = {
+ .command = gcvUSER_SIGNAL_SIGNAL,
+ .id = sig_id,
+ .state = state
+ }
+ }
+ };
+ return viv_invoke(conn, &id);
+}
+
+int viv_user_signal_wait(struct viv_conn *conn, int sig_id, int wait)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_USER_SIGNAL,
+ .u = {
+ .UserSignal = {
+ .command = gcvUSER_SIGNAL_WAIT,
+ .id = sig_id,
+ .wait = wait
+ }
+ }
+ };
+ return viv_invoke(conn, &id);
+}
+
+int viv_user_signal_destroy(struct viv_conn *conn, int sig_id)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_USER_SIGNAL,
+ .u = {
+ .UserSignal = {
+ .command = gcvUSER_SIGNAL_DESTROY,
+ .id = sig_id
+ }
+ }
+ };
+ return viv_invoke(conn, &id);
+}
+
+void viv_show_chip_info(struct viv_conn *conn)
+{
+ printf("* Chip identity:\n");
+ printf(" Chip model: %08x\n", conn->chip.chip_model);
+ printf(" Chip revision: %08x\n", conn->chip.chip_revision);
+ printf(" Chip features: 0x%08x\n", conn->chip.chip_features[0]);
+ printf(" Chip minor features 0: 0x%08x\n", conn->chip.chip_features[1]);
+ printf(" Chip minor features 1: 0x%08x\n", conn->chip.chip_features[2]);
+ printf(" Chip minor features 2: 0x%08x\n", conn->chip.chip_features[3]);
+ printf(" Chip minor features 3: 0x%08x\n", conn->chip.chip_features[4]);
+ printf(" Stream count: 0x%08x\n", conn->chip.stream_count);
+ printf(" Register max: 0x%08x\n", conn->chip.register_max);
+ printf(" Thread count: 0x%08x\n", conn->chip.thread_count);
+ printf(" Shader core count: 0x%08x\n", conn->chip.shader_core_count);
+ printf(" Vertex cache size: 0x%08x\n", conn->chip.vertex_cache_size);
+ printf(" Vertex output buffer size: 0x%08x\n", conn->chip.vertex_output_buffer_size);
+ printf(" Pixel pipes: 0x%08x\n", conn->chip.pixel_pipes);
+ printf(" Instruction count: 0x%08x\n", conn->chip.instruction_count);
+ printf(" Num constants: 0x%08x\n", conn->chip.num_constants);
+ printf(" Buffer size: 0x%08x\n", conn->chip.buffer_size);
+}
+
+int viv_reset(struct viv_conn *conn)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_RESET,
+ };
+ return viv_invoke(conn, &id);
+}
+
+int viv_free_vidmem(struct viv_conn *conn, viv_node_t node)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_FREE_VIDEO_MEMORY,
+ .u = {
+ .FreeVideoMemory = {
+ .node = HANDLE_TO_VIV(node)
+ }
+ }
+ };
+ return viv_invoke(conn, &id);
+}
+
+int viv_free_contiguous(struct viv_conn *conn, size_t bytes, viv_addr_t physical, void *logical)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_FREE_CONTIGUOUS_MEMORY,
+ .u = {
+ .FreeContiguousMemory = {
+ .bytes = bytes,
+ .physical = PTR_TO_VIV((gctPHYS_ADDR)physical),
+ .logical = PTR_TO_VIV(logical)
+ }
+ }
+ };
+ return viv_invoke(conn, &id);
+}
+
+int viv_map_user_memory(struct viv_conn *conn, void *memory, size_t size, viv_usermem_t *info, viv_addr_t *address)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_MAP_USER_MEMORY,
+ .u = {
+ .MapUserMemory = {
+ .memory = PTR_TO_VIV(memory),
+ .size = size
+ }
+ }
+ };
+ int status = viv_invoke(conn, &id);
+ *info = VIV_TO_HANDLE(id.u.MapUserMemory.info);
+ *address = id.u.MapUserMemory.address;
+ return status;
+}
+
+int viv_unmap_user_memory(struct viv_conn *conn, void *memory, size_t size, viv_usermem_t info, viv_addr_t address)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_UNMAP_USER_MEMORY,
+ .u = {
+ .UnmapUserMemory = {
+ .memory = PTR_TO_VIV(memory),
+ .size = size,
+ .info = HANDLE_TO_VIV(info),
+ .address = address
+ }
+ }
+ };
+ return viv_invoke(conn, &id);
+}
+
+int viv_read_register(struct viv_conn *conn, uint32_t address, uint32_t *data)
+{
+ gcsHAL_INTERFACE id;
+ int rv;
+ id.command = gcvHAL_READ_REGISTER;
+ id.u.ReadRegisterData.address = address;
+ rv = viv_invoke(conn, &id);
+ *data = id.u.ReadRegisterData.data;
+ return rv;
+}
+
+int viv_write_register(struct viv_conn *conn, uint32_t address, uint32_t data)
+{
+ gcsHAL_INTERFACE id;
+ id.command = gcvHAL_WRITE_REGISTER;
+ id.u.WriteRegisterData.address = address;
+ id.u.WriteRegisterData.data = data;
+ return viv_invoke(conn, &id);
+}
+
diff --git a/src/etnaviv/viv.h b/src/etnaviv/viv.h
new file mode 100644
index 0000000..4d0ebd4
--- /dev/null
+++ b/src/etnaviv/viv.h
@@ -0,0 +1,299 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Thin wrapper around Vivante ioctls */
+#ifndef H_VIV
+#define H_VIV
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+
+#define VIV_WAIT_INDEFINITE (0xffffffff)
+
+/* Enum with indices for each of the feature words */
+enum viv_features_word
+{
+ viv_chipFeatures = 0,
+ viv_chipMinorFeatures0 = 1,
+ viv_chipMinorFeatures1 = 2,
+ viv_chipMinorFeatures2 = 3,
+ viv_chipMinorFeatures3 = 4,
+ VIV_FEATURES_WORD_COUNT /* Must be last */
+};
+
+/* hardware type */
+/* matches gceHARDWARE_TYPE enums */
+enum viv_hw_type
+{
+ VIV_HW_3D = 1,
+ VIV_HW_2D = 2,
+ VIV_HW_VG = 4,
+
+ VIV_HW_2D3D = VIV_HW_3D | VIV_HW_2D
+};
+
+/* Surface types */
+enum viv_surf_type
+{
+ VIV_SURF_UNKNOWN,
+ VIV_SURF_INDEX,
+ VIV_SURF_VERTEX,
+ VIV_SURF_TEXTURE,
+ VIV_SURF_RENDER_TARGET,
+ VIV_SURF_DEPTH,
+ VIV_SURF_BITMAP,
+ VIV_SURF_TILE_STATUS,
+ VIV_SURF_IMAGE,
+ VIV_SURF_MASK,
+ VIV_SURF_SCISSOR,
+ VIV_SURF_HIERARCHICAL_DEPTH
+};
+
+/* Video memory pool type. */
+enum viv_pool
+{
+ VIV_POOL_UNKNOWN,
+ VIV_POOL_DEFAULT,
+ VIV_POOL_LOCAL,
+ VIV_POOL_LOCAL_INTERNAL,
+ VIV_POOL_LOCAL_EXTERNAL,
+ VIV_POOL_UNIFIED,
+ VIV_POOL_SYSTEM,
+ VIV_POOL_VIRTUAL,
+ VIV_POOL_USER,
+ VIV_POOL_CONTIGUOUS
+};
+
+/* Semaphore recipient */
+enum viv_where
+{
+ VIV_WHERE_COMMAND,
+ VIV_WHERE_PIXEL
+};
+
+/* Status code from kernel.
+ * These numbers must match gcvSTATUS_*.
+ */
+enum viv_status
+{
+ VIV_STATUS_OK = 0,
+ VIV_STATUS_TRUE = 1,
+ VIV_STATUS_NOT_OUR_INTERRUPT = 6,
+ VIV_STATUS_CHIP_NOT_READY = 11,
+ VIV_STATUS_SKIP = 13,
+ VIV_STATUS_EXECUTED = 18,
+ VIV_STATUS_TERMINATE = 19,
+
+ VIV_STATUS_INVALID_ARGUMENT = -1,
+ VIV_STATUS_INVALID_OBJECT = -2,
+ VIV_STATUS_OUT_OF_MEMORY = -3,
+ VIV_STATUS_MEMORY_LOCKED = -4,
+ VIV_STATUS_MEMORY_UNLOCKED = -5,
+ VIV_STATUS_HEAP_CORRUPTED = -6,
+ VIV_STATUS_GENERIC_IO = -7,
+ VIV_STATUS_INVALID_ADDRESS = -8,
+ VIV_STATUS_CONTEXT_LOSSED = -9,
+ VIV_STATUS_TOO_COMPLEX = -10,
+ VIV_STATUS_BUFFER_TOO_SMALL = -11,
+ VIV_STATUS_INTERFACE_ERROR = -12,
+ VIV_STATUS_NOT_SUPPORTED = -13,
+ VIV_STATUS_MORE_DATA = -14,
+ VIV_STATUS_TIMEOUT = -15,
+ VIV_STATUS_OUT_OF_RESOURCES = -16,
+ VIV_STATUS_INVALID_DATA = -17,
+ VIV_STATUS_INVALID_MIPMAP = -18,
+ VIV_STATUS_NOT_FOUND = -19,
+ VIV_STATUS_NOT_ALIGNED = -20,
+ VIV_STATUS_INVALID_REQUEST = -21,
+ VIV_STATUS_GPU_NOT_RESPONDING = -22,
+ VIV_STATUS_TIMER_OVERFLOW = -23,
+ VIV_STATUS_VERSION_MISMATCH = -24,
+ VIV_STATUS_LOCKED = -25,
+ VIV_STATUS_INTERRUPTED = -26,
+ VIV_STATUS_DEVICE = -27,
+};
+
+/* Type for GPU physical address */
+typedef uint32_t viv_addr_t;
+
+/* General process handle */
+typedef uint64_t viv_handle_t;
+
+/* Memory node handle */
+typedef uint64_t viv_node_t;
+
+/* GPU context handle */
+typedef uint64_t viv_context_t;
+
+/* User memory info handle */
+typedef uint64_t viv_usermem_t;
+
+/* kernel-interface independent chip specs structure, this is much easier to use
+ * than checking GCABI defines all the time.
+ */
+struct viv_specs {
+ uint32_t chip_model;
+ uint32_t chip_revision;
+ uint32_t chip_features[VIV_FEATURES_WORD_COUNT];
+ uint32_t stream_count;
+ uint32_t register_max;
+ uint32_t thread_count;
+ uint32_t shader_core_count;
+ uint32_t vertex_cache_size;
+ uint32_t vertex_output_buffer_size;
+ uint32_t pixel_pipes;
+ uint32_t instruction_count;
+ uint32_t num_constants;
+ uint32_t buffer_size;
+ uint32_t varyings_count;
+};
+
+struct viv_kernel_driver_version {
+ char name[40];
+ int major, minor, patch, build;
+};
+
+/* Structure encompassing a connection to kernel driver */
+struct viv_conn {
+ int fd;
+ enum viv_hw_type hw_type;
+
+ viv_addr_t base_address;
+ void *mem;
+ viv_addr_t mem_base;
+ viv_handle_t process;
+ struct viv_specs chip;
+ struct viv_kernel_driver_version kernel_driver;
+};
+
+/* Predefines for some kernel structures */
+struct _gcsHAL_INTERFACE;
+struct _gcoCMDBUF;
+struct _gcsQUEUE;
+
+/* Open a new connection to the GPU driver.
+ */
+int viv_open(enum viv_hw_type hw_type, struct viv_conn **out);
+
+/* Call ioctl interface with structure cmd as input and output.
+ * @returns status (gcvSTATUS_xxx)
+ */
+int viv_invoke(struct viv_conn *conn, struct _gcsHAL_INTERFACE *cmd);
+
+/* Close connection to GPU driver and free temporary structures
+ * and mapping.
+ */
+int viv_close(struct viv_conn *conn);
+
+/** Allocate a span of physical contiguous GPU-mapped memory */
+int viv_alloc_contiguous(struct viv_conn *conn, size_t bytes, viv_addr_t *physical, void **logical, size_t *bytes_out);
+
+/** Allocate linear video memory.
+ @returns a handle. To get the GPU and CPU address of the memory, use lock_vidmem
+ */
+int viv_alloc_linear_vidmem(struct viv_conn *conn, size_t bytes, size_t alignment, enum viv_surf_type type, enum viv_pool pool, viv_node_t *node, size_t *bytes_out);
+
+/** Lock (map) video memory node to GPU and CPU memory.
+ * Video memory needs to be locked to be used by either the CPU or GPU.
+ */
+int viv_lock_vidmem(struct viv_conn *conn, viv_node_t node, viv_addr_t *physical, void **logical);
+
+/** Commit GPU command buffer and context. This submits a batch of commands.
+ */
+int viv_commit(struct viv_conn *conn, struct _gcoCMDBUF *commandBuffer, viv_context_t context, struct _gcsQUEUE *queue);
+
+/** Unlock (unmap) video memory node from GPU and CPU memory.
+ *
+ * If submit_as_event is set, submit the unlock as an event immediately, otherwise send it as command.
+ * If submit_as_event is not set, the function will return 0 or 1 in *async depending on whether a second
+ * unlock stage must be submitted as event (either through this function with submit_as_event=true
+ * or through etna_queue_unlock_vidmem).
+ */
+int viv_unlock_vidmem(struct viv_conn *conn, viv_node_t node, enum viv_surf_type type, bool submit_as_event, int *async);
+
+/** Free a block of video memory previously allocated with viv_alloc_linear_vidmem.
+ */
+int viv_free_vidmem(struct viv_conn *conn, viv_node_t node);
+
+/** Free block of contiguous memory previously allocated with viv_alloc_contiguous.
+ */
+int viv_free_contiguous(struct viv_conn *conn, size_t bytes, viv_addr_t physical, void *logical);
+
+/** Map user memory to GPU memory.
+ */
+int viv_map_user_memory(struct viv_conn *conn, void *memory, size_t size, viv_usermem_t *info, viv_addr_t *address);
+
+/** Unmap user memory from GPU memory.
+ */
+int viv_unmap_user_memory(struct viv_conn *conn, void *memory, size_t size, viv_usermem_t info, viv_addr_t address);
+
+/** Commit event queue.
+ */
+int viv_event_commit(struct viv_conn *conn, struct _gcsQUEUE *queue);
+
+/** Create a new user signal.
+ * if manualReset=0 automatic reset on completion of signal_wait
+ * manualReset=1 need to manually reset state to 0 using SIGNAL
+ */
+int viv_user_signal_create(struct viv_conn *conn, int manualReset, int *id_out);
+
+/** Set user signal state.
+ */
+int viv_user_signal_signal(struct viv_conn *conn, int sig_id, int state);
+
+/** Wait for signal.
+ * @param[in] wait Provide time to wait in milliseconds, or VIV_WAIT_INDEFINITE.
+ */
+int viv_user_signal_wait(struct viv_conn *conn, int sig_id, int wait);
+
+/** Destroy signal created with viv_user_signal_create.
+ */
+int viv_user_signal_destroy(struct viv_conn *conn, int sig_id);
+
+void viv_show_chip_info(struct viv_conn *conn);
+
+/** Send reset command to GPU.
+ * This is supposed to fix a hung state, but its effectiveness depends on the SoC.
+ */
+int viv_reset(struct viv_conn *conn);
+
+/** Read register from GPU.
+ * @note Needs kernel module compiled with user space register access
+ * (gcdREGISTER_ACCESS_FROM_USER=1)
+ */
+int viv_read_register(struct viv_conn *conn, uint32_t address, uint32_t *data);
+
+/** Write register to GPU.
+ * @note Needs kernel module compiled with user space register access
+ * (gcdREGISTER_ACCESS_FROM_USER=1)
+ */
+int viv_write_register(struct viv_conn *conn, uint32_t address, uint32_t data);
+
+/** Convenience macro to probe features from state.xml.h:
+ * VIV_FEATURE(chipFeatures, FAST_CLEAR)
+ * VIV_FEATURE(chipMinorFeatures1, AUTO_DISABLE)
+ */
+#define VIV_FEATURE(conn, word, feature) ((conn->chip.chip_features[viv_ ## word] & (word ## _ ## feature))!=0)
+
+#endif
+
diff --git a/src/etnaviv/viv_internal.h b/src/etnaviv/viv_internal.h
new file mode 100644
index 0000000..e4a9d04
--- /dev/null
+++ b/src/etnaviv/viv_internal.h
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Internal header: convert from etnaviv-specific values to kernel driver values */
+#ifndef VIV_INTERNAL_H
+#define VIV_INTERNAL_H
+
+/* Convert VIV_SURF_* to kernel specific gcvSURF_* */
+static inline gceSURF_TYPE convert_surf_type(enum viv_surf_type type)
+{
+ switch(type)
+ {
+ case VIV_SURF_INDEX: return gcvSURF_INDEX;
+ case VIV_SURF_VERTEX: return gcvSURF_VERTEX;
+ case VIV_SURF_TEXTURE: return gcvSURF_TEXTURE;
+ case VIV_SURF_RENDER_TARGET: return gcvSURF_RENDER_TARGET;
+ case VIV_SURF_DEPTH: return gcvSURF_DEPTH;
+ case VIV_SURF_BITMAP: return gcvSURF_BITMAP;
+ case VIV_SURF_TILE_STATUS: return gcvSURF_TILE_STATUS;
+#ifndef GCABI_HAS_CONTEXT
+ case VIV_SURF_IMAGE: return gcvSURF_IMAGE;
+#endif
+ case VIV_SURF_MASK: return gcvSURF_MASK;
+ case VIV_SURF_SCISSOR: return gcvSURF_SCISSOR;
+ case VIV_SURF_HIERARCHICAL_DEPTH: return gcvSURF_HIERARCHICAL_DEPTH;
+ default: return gcvSURF_TYPE_UNKNOWN;
+ }
+}
+
+/* Convert video memory pool */
+static inline gcePOOL convert_pool(enum viv_pool pool)
+{
+ switch(pool)
+ {
+ case VIV_POOL_DEFAULT: return gcvPOOL_DEFAULT;
+ case VIV_POOL_LOCAL: return gcvPOOL_LOCAL;
+ case VIV_POOL_LOCAL_INTERNAL: return gcvPOOL_LOCAL_INTERNAL;
+ case VIV_POOL_LOCAL_EXTERNAL: return gcvPOOL_LOCAL_EXTERNAL;
+ case VIV_POOL_UNIFIED: return gcvPOOL_UNIFIED;
+ case VIV_POOL_SYSTEM: return gcvPOOL_SYSTEM;
+ case VIV_POOL_VIRTUAL: return gcvPOOL_VIRTUAL;
+ case VIV_POOL_USER: return gcvPOOL_USER;
+ case VIV_POOL_CONTIGUOUS: return gcvPOOL_CONTIGUOUS;
+ default: return gcvPOOL_UNKNOWN;
+ }
+};
+
+/* Convert semaphore recipient */
+static inline gceKERNEL_WHERE convert_where(enum viv_where where)
+{
+ switch(where)
+ {
+ case VIV_WHERE_COMMAND: return gcvKERNEL_COMMAND;
+ case VIV_WHERE_PIXEL: return gcvKERNEL_PIXEL;
+ default: return gcvKERNEL_PIXEL; /* unknown default */
+ }
+}
+
+#ifdef GCABI_UINT64_POINTERS
+/* imx6 BSP 4.x Vivante driver casts all pointers to 64 bit integers
+ * provide macros to cast back and forth. */
+#define PTR_TO_VIV(x) ((uint64_t)((intptr_t)(x)))
+#define VIV_TO_PTR(x) ((void*)((intptr_t)(x)))
+#define HANDLE_TO_VIV(x) (x)
+#define VIV_TO_HANDLE(x) (x)
+#else
+#define PTR_TO_VIV(x) (x)
+#define VIV_TO_PTR(x) (x)
+#define HANDLE_TO_VIV(x) ((void*)((intptr_t)(x)))
+#define VIV_TO_HANDLE(x) ((uint64_t)(intptr_t)(x))
+#endif
+
+#endif
+
diff --git a/src/etnaviv/viv_profile.c b/src/etnaviv/viv_profile.c
new file mode 100644
index 0000000..7772e36
--- /dev/null
+++ b/src/etnaviv/viv_profile.c
@@ -0,0 +1,176 @@
+#include <etnaviv/viv_profile.h>
+
+#include <etnaviv/viv.h>
+
+#include "gc_abi.h"
+
+static struct viv_profile_counter_info viv_profile_counters[] = {
+ [VIV_PROF_GPU_CYCLES_COUNTER] = {"GPU_CYCLES_COUNTER", "GPU cycles counter"},
+ [VIV_PROF_GPU_TOTAL_READ_64_BIT] = {"GPU_TOTAL_READ_64_BIT", "GPU total read 64 bit"},
+ [VIV_PROF_GPU_TOTAL_WRITE_64_BIT] = {"GPU_TOTAL_WRITE_64_BIT", "GPU total write 64 bit"},
+ [VIV_PROF_PE_PIXEL_COUNT_KILLED_BY_COLOR_PIPE] = {"PE_PIXEL_COUNT_KILLED_BY_COLOR_PIPE", "PE pixel count killed by color pipe"},
+ [VIV_PROF_PE_PIXEL_COUNT_KILLED_BY_DEPTH_PIPE] = {"PE_PIXEL_COUNT_KILLED_BY_DEPTH_PIPE", "PE pixel count killed by depth pipe"},
+ [VIV_PROF_PE_PIXEL_COUNT_DRAWN_BY_COLOR_PIPE] = {"PE_PIXEL_COUNT_DRAWN_BY_COLOR_PIPE", "PE pixel count drawn by color pipe"},
+ [VIV_PROF_PE_PIXEL_COUNT_DRAWN_BY_DEPTH_PIPE] = {"PE_PIXEL_COUNT_DRAWN_BY_DEPTH_PIPE", "PE pixel count drawn by depth pipe"},
+ [VIV_PROF_PS_INST_COUNTER] = {"PS_INST_COUNTER", "PS inst counter"},
+ [VIV_PROF_RENDERED_PIXEL_COUNTER] = {"RENDERED_PIXEL_COUNTER", "Rendered pixel counter"},
+ [VIV_PROF_VS_INST_COUNTER] = {"VS_INST_COUNTER", "VS inst counter"},
+ [VIV_PROF_RENDERED_VERTICE_COUNTER] = {"RENDERED_VERTICE_COUNTER", "Rendered vertice counter"},
+ [VIV_PROF_VTX_BRANCH_INST_COUNTER] = {"VTX_BRANCH_INST_COUNTER", "VTX branch inst counter"},
+ [VIV_PROF_VTX_TEXLD_INST_COUNTER] = {"VTX_TEXLD_INST_COUNTER", "VTX texld inst counter"},
+ [VIV_PROF_PXL_BRANCH_INST_COUNTER] = {"PXL_BRANCH_INST_COUNTER", "PXL branch inst counter"},
+ [VIV_PROF_PXL_TEXLD_INST_COUNTER] = {"PXL_TEXLD_INST_COUNTER", "PXL texld inst counter"},
+ [VIV_PROF_PA_INPUT_VTX_COUNTER] = {"PA_INPUT_VTX_COUNTER", "PA input vtx counter"},
+ [VIV_PROF_PA_INPUT_PRIM_COUNTER] = {"PA_INPUT_PRIM_COUNTER", "PA input prim counter"},
+ [VIV_PROF_PA_OUTPUT_PRIM_COUNTER] = {"PA_OUTPUT_PRIM_COUNTER", "PA output prim counter"},
+ [VIV_PROF_PA_DEPTH_CLIPPED_COUNTER] = {"PA_DEPTH_CLIPPED_COUNTER", "PA depth clipped counter"},
+ [VIV_PROF_PA_TRIVIAL_REJECTED_COUNTER] = {"PA_TRIVIAL_REJECTED_COUNTER", "PA trivial rejected counter"},
+ [VIV_PROF_PA_CULLED_COUNTER] = {"PA_CULLED_COUNTER", "PA culled counter"},
+ [VIV_PROF_SE_CULLED_TRIANGLE_COUNT] = {"SE_CULLED_TRIANGLE_COUNT", "SE culled triangle count"},
+ [VIV_PROF_SE_CULLED_LINES_COUNT] = {"SE_CULLED_LINES_COUNT", "SE culled lines count"},
+ [VIV_PROF_RA_VALID_PIXEL_COUNT] = {"RA_VALID_PIXEL_COUNT", "RA valid pixel count"},
+ [VIV_PROF_RA_TOTAL_QUAD_COUNT] = {"RA_TOTAL_QUAD_COUNT", "RA total quad count"},
+ [VIV_PROF_RA_VALID_QUAD_COUNT_AFTER_EARLY_Z] = {"RA_VALID_QUAD_COUNT_AFTER_EARLY_Z", "RA valid quad count after early Z"},
+ [VIV_PROF_RA_TOTAL_PRIMITIVE_COUNT] = {"RA_TOTAL_PRIMITIVE_COUNT", "RA total primitive count"},
+ [VIV_PROF_RA_PIPE_CACHE_MISS_COUNTER] = {"RA_PIPE_CACHE_MISS_COUNTER", "RA pipe cache miss counter"},
+ [VIV_PROF_RA_PREFETCH_CACHE_MISS_COUNTER] = {"RA_PREFETCH_CACHE_MISS_COUNTER", "RA prefetch cache miss counter"},
+ [VIV_PROF_RA_EEZ_CULLED_COUNTER] = {"RA_EEZ_CULLED_COUNTER", "RA EEZ culled counter"},
+ [VIV_PROF_TX_TOTAL_BILINEAR_REQUESTS] = {"TX_TOTAL_BILINEAR_REQUESTS", "TX total bilinear requests"},
+ [VIV_PROF_TX_TOTAL_TRILINEAR_REQUESTS] = {"TX_TOTAL_TRILINEAR_REQUESTS", "TX total trilinear requests"},
+ [VIV_PROF_TX_TOTAL_DISCARDED_TEXTURE_REQUESTS] = {"TX_TOTAL_DISCARDED_TEXTURE_REQUESTS", "TX total discarded texture requests"},
+ [VIV_PROF_TX_TOTAL_TEXTURE_REQUESTS] = {"TX_TOTAL_TEXTURE_REQUESTS", "TX total texture requests"},
+ [VIV_PROF_TX_MEM_READ_COUNT] = {"TX_MEM_READ_COUNT", "TX mem read count"},
+ [VIV_PROF_TX_MEM_READ_IN_8B_COUNT] = {"TX_MEM_READ_IN_8B_COUNT", "TX mem read in 8b count"},
+ [VIV_PROF_TX_CACHE_MISS_COUNT] = {"TX_CACHE_MISS_COUNT", "TX cache miss count"},
+ [VIV_PROF_TX_CACHE_HIT_TEXEL_COUNT] = {"TX_CACHE_HIT_TEXEL_COUNT", "TX cache hit texel count"},
+ [VIV_PROF_TX_CACHE_MISS_TEXEL_COUNT] = {"TX_CACHE_MISS_TEXEL_COUNT", "TX cache miss texel count"},
+ [VIV_PROF_MC_TOTAL_READ_REQ_8B_FROM_PIPELINE] = {"MC_TOTAL_READ_REQ_8B_FROM_PIPELINE", "MC total read req 8b from pipeline"},
+ [VIV_PROF_MC_TOTAL_READ_REQ_8B_FROM_IP] = {"MC_TOTAL_READ_REQ_8B_FROM_IP", "MC total read req 8b from ip"},
+ [VIV_PROF_MC_TOTAL_WRITE_REQ_8B_FROM_PIPELINE] = {"MC_TOTAL_WRITE_REQ_8B_FROM_PIPELINE", "MC total write req 8b from pipeline"},
+ [VIV_PROF_HI_AXI_CYCLES_READ_REQUEST_STALLED] = {"HI_AXI_CYCLES_READ_REQUEST_STALLED", "HI AXI cycles read request stalled"},
+ [VIV_PROF_HI_AXI_CYCLES_WRITE_REQUEST_STALLED] = {"HI_AXI_CYCLES_WRITE_REQUEST_STALLED", "HI AXI cycles write request stalled"},
+ [VIV_PROF_HI_AXI_CYCLES_WRITE_DATA_STALLED] = {"HI_AXI_CYCLES_WRITE_DATA_STALLED", "HI AXI cycles write data stalled"},
+ [VIV_PROF_PE_PIXELS_RENDERED_2D] = {"PE_PIXELS_RENDERED_2D", "PE pixels rendered 2D"},
+};
+
+uint32_t viv_get_num_profile_counters(void)
+{
+ return VIV_PROF_NUM_COUNTERS;
+}
+
+struct viv_profile_counter_info *viv_get_profile_counter_info(enum viv_profile_counter id)
+{
+ if(id >= VIV_PROF_NUM_COUNTERS)
+ return NULL;
+ return &viv_profile_counters[id];
+}
+
+int viv_read_profile_counters_3d(struct viv_conn *conn, uint32_t *out)
+{
+#if VIVANTE_PROFILER
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_READ_ALL_PROFILE_REGISTERS,
+ .u = {
+ }
+ };
+ int rv = viv_invoke(conn, &id);
+ if(rv < 0)
+ return rv;
+ gcsPROFILER_COUNTERS *counters = &id.u.RegisterProfileData.counters;
+
+ out[VIV_PROF_GPU_CYCLES_COUNTER] = counters->gpuCyclesCounter;
+ out[VIV_PROF_GPU_TOTAL_READ_64_BIT] = counters->gpuTotalRead64BytesPerFrame;
+ out[VIV_PROF_GPU_TOTAL_WRITE_64_BIT] = counters->gpuTotalWrite64BytesPerFrame;
+ out[VIV_PROF_PE_PIXEL_COUNT_KILLED_BY_COLOR_PIPE] = counters->pe_pixel_count_killed_by_color_pipe;
+ out[VIV_PROF_PE_PIXEL_COUNT_KILLED_BY_DEPTH_PIPE] = counters->pe_pixel_count_killed_by_depth_pipe;
+ out[VIV_PROF_PE_PIXEL_COUNT_DRAWN_BY_COLOR_PIPE] = counters->pe_pixel_count_drawn_by_color_pipe;
+ out[VIV_PROF_PE_PIXEL_COUNT_DRAWN_BY_DEPTH_PIPE] = counters->pe_pixel_count_drawn_by_depth_pipe;
+ out[VIV_PROF_PS_INST_COUNTER] = counters->ps_inst_counter;
+ out[VIV_PROF_RENDERED_PIXEL_COUNTER] = counters->rendered_pixel_counter;
+ out[VIV_PROF_VS_INST_COUNTER] = counters->vs_inst_counter;
+ out[VIV_PROF_RENDERED_VERTICE_COUNTER] = counters->rendered_vertice_counter;
+ out[VIV_PROF_VTX_BRANCH_INST_COUNTER] = counters->vtx_branch_inst_counter;
+ out[VIV_PROF_VTX_TEXLD_INST_COUNTER] = counters->vtx_texld_inst_counter;
+ out[VIV_PROF_PXL_BRANCH_INST_COUNTER] = counters->pxl_branch_inst_counter;
+ out[VIV_PROF_PXL_TEXLD_INST_COUNTER] = counters->pxl_texld_inst_counter;
+ out[VIV_PROF_PA_INPUT_VTX_COUNTER] = counters->pa_input_vtx_counter;
+ out[VIV_PROF_PA_INPUT_PRIM_COUNTER] = counters->pa_input_prim_counter;
+ out[VIV_PROF_PA_OUTPUT_PRIM_COUNTER] = counters->pa_output_prim_counter;
+ out[VIV_PROF_PA_DEPTH_CLIPPED_COUNTER] = counters->pa_depth_clipped_counter;
+ out[VIV_PROF_PA_TRIVIAL_REJECTED_COUNTER] = counters->pa_trivial_rejected_counter;
+ out[VIV_PROF_PA_CULLED_COUNTER] = counters->pa_culled_counter;
+ out[VIV_PROF_SE_CULLED_TRIANGLE_COUNT] = counters->se_culled_triangle_count;
+ out[VIV_PROF_SE_CULLED_LINES_COUNT] = counters->se_culled_lines_count;
+ out[VIV_PROF_RA_VALID_PIXEL_COUNT] = counters->ra_valid_pixel_count;
+ out[VIV_PROF_RA_TOTAL_QUAD_COUNT] = counters->ra_total_quad_count;
+ out[VIV_PROF_RA_VALID_QUAD_COUNT_AFTER_EARLY_Z] = counters->ra_valid_quad_count_after_early_z;
+ out[VIV_PROF_RA_TOTAL_PRIMITIVE_COUNT] = counters->ra_total_primitive_count;
+ out[VIV_PROF_RA_PIPE_CACHE_MISS_COUNTER] = counters->ra_pipe_cache_miss_counter;
+ out[VIV_PROF_RA_PREFETCH_CACHE_MISS_COUNTER] = counters->ra_prefetch_cache_miss_counter;
+ out[VIV_PROF_RA_EEZ_CULLED_COUNTER] = counters->ra_eez_culled_counter;
+ out[VIV_PROF_TX_TOTAL_BILINEAR_REQUESTS] = counters->tx_total_bilinear_requests;
+ out[VIV_PROF_TX_TOTAL_TRILINEAR_REQUESTS] = counters->tx_total_trilinear_requests;
+ out[VIV_PROF_TX_TOTAL_DISCARDED_TEXTURE_REQUESTS] = counters->tx_total_discarded_texture_requests;
+ out[VIV_PROF_TX_TOTAL_TEXTURE_REQUESTS] = counters->tx_total_texture_requests;
+ out[VIV_PROF_TX_MEM_READ_COUNT] = counters->tx_mem_read_count;
+ out[VIV_PROF_TX_MEM_READ_IN_8B_COUNT] = counters->tx_mem_read_in_8B_count;
+ out[VIV_PROF_TX_CACHE_MISS_COUNT] = counters->tx_cache_miss_count;
+ out[VIV_PROF_TX_CACHE_HIT_TEXEL_COUNT] = counters->tx_cache_hit_texel_count;
+ out[VIV_PROF_TX_CACHE_MISS_TEXEL_COUNT] = counters->tx_cache_miss_texel_count;
+ out[VIV_PROF_MC_TOTAL_READ_REQ_8B_FROM_PIPELINE] = counters->mc_total_read_req_8B_from_pipeline;
+ out[VIV_PROF_MC_TOTAL_READ_REQ_8B_FROM_IP] = counters->mc_total_read_req_8B_from_IP;
+ out[VIV_PROF_MC_TOTAL_WRITE_REQ_8B_FROM_PIPELINE] = counters->mc_total_write_req_8B_from_pipeline;
+ out[VIV_PROF_HI_AXI_CYCLES_READ_REQUEST_STALLED] = counters->hi_axi_cycles_read_request_stalled;
+ out[VIV_PROF_HI_AXI_CYCLES_WRITE_REQUEST_STALLED] = counters->hi_axi_cycles_write_request_stalled;
+ out[VIV_PROF_HI_AXI_CYCLES_WRITE_DATA_STALLED] = counters->hi_axi_cycles_write_data_stalled;
+ return 0;
+#else
+ return VIV_STATUS_NOT_SUPPORTED;
+#endif
+}
+
+int viv_read_profile_counters_2d(struct viv_conn *conn, uint32_t *out)
+{
+#if VIVANTE_PROFILER
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_PROFILE_REGISTERS_2D,
+ .u = {
+ }
+ };
+ int rv = viv_invoke(conn, &id);
+ if(rv < 0)
+ return rv;
+ struct _gcs2D_PROFILE *counters = &id.u.RegisterProfileData2D.hwProfile2D;
+
+ out[VIV_PROF_GPU_CYCLES_COUNTER] = counters->cycleCount;
+ out[VIV_PROF_PE_PIXELS_RENDERED_2D] = counters->pixelsRendered;
+ return 0;
+#else
+ return VIV_STATUS_NOT_SUPPORTED;
+#endif
+}
+
+void viv_get_counters_reset_after_read(struct viv_conn *conn, bool *counters)
+{
+ /* Either dove driver doesn't reset perf counters properly, or
+ * is it the hw, I'm not sure */
+ for(int c=0; c<VIV_PROF_NUM_COUNTERS; ++c)
+ counters[c] = true;
+ if(conn->kernel_driver.major < 4)
+ {
+ counters[VIV_PROF_SE_CULLED_TRIANGLE_COUNT] = false;
+ counters[VIV_PROF_SE_CULLED_LINES_COUNT] = false;
+ } else {
+ counters[VIV_PROF_SE_CULLED_TRIANGLE_COUNT] = false;
+ counters[VIV_PROF_SE_CULLED_LINES_COUNT] = false;
+ counters[VIV_PROF_PS_INST_COUNTER] = false;
+ counters[VIV_PROF_VS_INST_COUNTER] = false;
+ counters[VIV_PROF_RENDERED_PIXEL_COUNTER] = false;
+ counters[VIV_PROF_RENDERED_VERTICE_COUNTER] = false;
+ counters[VIV_PROF_PXL_TEXLD_INST_COUNTER] = false;
+ counters[VIV_PROF_PXL_BRANCH_INST_COUNTER] = false;
+ counters[VIV_PROF_VTX_TEXLD_INST_COUNTER] = false;
+ counters[VIV_PROF_VTX_BRANCH_INST_COUNTER] = false;
+ }
+}
+
diff --git a/src/etnaviv/viv_profile.h b/src/etnaviv/viv_profile.h
new file mode 100644
index 0000000..bc84cb3
--- /dev/null
+++ b/src/etnaviv/viv_profile.h
@@ -0,0 +1,93 @@
+#ifndef H_VIV_PROFILE
+#define H_VIV_PROFILE
+
+#include <stdint.h>
+#include <stdbool.h>
+
+struct viv_conn;
+
+/* GPU profile counters */
+enum viv_profile_counter
+{
+ VIV_PROF_GPU_CYCLES_COUNTER = 0, /* reg 00438 */
+ VIV_PROF_GPU_TOTAL_READ_64_BIT = 1, /* reg 00040 */
+ VIV_PROF_GPU_TOTAL_WRITE_64_BIT = 2, /* reg 00044 */
+ VIV_PROF_PE_PIXEL_COUNT_KILLED_BY_COLOR_PIPE = 3, /* PE debug reg 0 */
+ VIV_PROF_PE_PIXEL_COUNT_KILLED_BY_DEPTH_PIPE = 4, /* PE debug reg 1 */
+ VIV_PROF_PE_PIXEL_COUNT_DRAWN_BY_COLOR_PIPE = 5, /* PE debug reg 2 */
+ VIV_PROF_PE_PIXEL_COUNT_DRAWN_BY_DEPTH_PIPE = 6, /* PE debug reg 3 */
+ VIV_PROF_PS_INST_COUNTER = 7, /* SH debug reg 7 */
+ VIV_PROF_RENDERED_PIXEL_COUNTER = 8, /* SH debug reg 8 */
+ VIV_PROF_VS_INST_COUNTER = 9, /* SH debug reg 9 */
+ VIV_PROF_RENDERED_VERTICE_COUNTER = 10, /* SH debug reg A */
+ VIV_PROF_VTX_BRANCH_INST_COUNTER = 11, /* SH debug reg B */
+ VIV_PROF_VTX_TEXLD_INST_COUNTER = 12, /* SH debug reg C */
+ VIV_PROF_PXL_BRANCH_INST_COUNTER = 13, /* SH debug reg D */
+ VIV_PROF_PXL_TEXLD_INST_COUNTER = 14, /* SH debug reg E */
+ VIV_PROF_PA_INPUT_VTX_COUNTER = 15, /* PA debug reg 3 */
+ VIV_PROF_PA_INPUT_PRIM_COUNTER = 16, /* PA debug reg 4 */
+ VIV_PROF_PA_OUTPUT_PRIM_COUNTER = 17, /* PA debug reg 5 */
+ VIV_PROF_PA_DEPTH_CLIPPED_COUNTER = 18, /* PA debug reg 6 */
+ VIV_PROF_PA_TRIVIAL_REJECTED_COUNTER = 19, /* PA debug reg 7 */
+ VIV_PROF_PA_CULLED_COUNTER = 20, /* PA debug reg 8 */
+ VIV_PROF_SE_CULLED_TRIANGLE_COUNT = 21, /* SE debug reg 0 */
+ VIV_PROF_SE_CULLED_LINES_COUNT = 22, /* SE debug reg 1 */
+ VIV_PROF_RA_VALID_PIXEL_COUNT = 23, /* RA debug reg 0 */
+ VIV_PROF_RA_TOTAL_QUAD_COUNT = 24, /* RA debug reg 1 */
+ VIV_PROF_RA_VALID_QUAD_COUNT_AFTER_EARLY_Z = 25, /* RA debug reg 2 */
+ VIV_PROF_RA_TOTAL_PRIMITIVE_COUNT = 26, /* RA debug reg 3 */
+ VIV_PROF_RA_PIPE_CACHE_MISS_COUNTER = 27, /* RA debug reg 9 */
+ VIV_PROF_RA_PREFETCH_CACHE_MISS_COUNTER = 28, /* RA debug reg A */
+ VIV_PROF_RA_EEZ_CULLED_COUNTER = 29, /* RA debug reg B */
+ VIV_PROF_TX_TOTAL_BILINEAR_REQUESTS = 30, /* TX debug reg 0 */
+ VIV_PROF_TX_TOTAL_TRILINEAR_REQUESTS = 31, /* TX debug reg 1 */
+ VIV_PROF_TX_TOTAL_DISCARDED_TEXTURE_REQUESTS = 32, /* TX debug reg 2 */
+ VIV_PROF_TX_TOTAL_TEXTURE_REQUESTS = 33, /* TX debug reg 3 */
+ VIV_PROF_TX_MEM_READ_COUNT = 34, /* TX debug reg 5 */
+ VIV_PROF_TX_MEM_READ_IN_8B_COUNT = 35, /* TX debug reg 6 */
+ VIV_PROF_TX_CACHE_MISS_COUNT = 36, /* TX debug reg 7 */
+ VIV_PROF_TX_CACHE_HIT_TEXEL_COUNT = 37, /* TX debug reg 8 */
+ VIV_PROF_TX_CACHE_MISS_TEXEL_COUNT = 38, /* TX debug reg 9 */
+ VIV_PROF_MC_TOTAL_READ_REQ_8B_FROM_PIPELINE = 39, /* MC debug reg 1 */
+ VIV_PROF_MC_TOTAL_READ_REQ_8B_FROM_IP = 40, /* MC debug reg 2 */
+ VIV_PROF_MC_TOTAL_WRITE_REQ_8B_FROM_PIPELINE = 41, /* MC debug reg 3 */
+ VIV_PROF_HI_AXI_CYCLES_READ_REQUEST_STALLED = 42, /* HI debug reg 0 */
+ VIV_PROF_HI_AXI_CYCLES_WRITE_REQUEST_STALLED = 43, /* HI debug reg 1 */
+ VIV_PROF_HI_AXI_CYCLES_WRITE_DATA_STALLED = 44, /* HI debug reg 2 */
+ VIV_PROF_PE_PIXELS_RENDERED_2D = 45, /* PE debug reg B */
+ VIV_PROF_NUM_COUNTERS
+};
+
+struct viv_profile_counter_info
+{
+ const char *name;
+ const char *description;
+};
+
+/** Get number of profile counters.
+ */
+uint32_t viv_get_num_profile_counters(void);
+
+/** Get information about specific profile counter.
+ */
+struct viv_profile_counter_info *viv_get_profile_counter_info(enum viv_profile_counter id);
+
+/** Return a vector of booleans, one for each counter, depending on whether it
+ * (reliably) resets after a read.
+ */
+void viv_get_counters_reset_after_read(struct viv_conn *conn, bool *counters);
+
+/** Read and reset 2D profile counters.
+ * This will return VIV_STATUS_NOT_SUPPORTED if built without profiling support.
+ * Call viv_get_num_profile_counters() to determine how many uint32_ts to reserve for output buffer.
+ */
+int viv_read_profile_counters_2d(struct viv_conn *conn, uint32_t *out);
+
+/** Read and reset 3D profile counters.
+ * This will return VIV_STATUS_NOT_SUPPORTED if built without profiling support.
+ * Call viv_get_num_profile_counters() to determine how many uint32_ts to reserve for output buffer.
+ */
+int viv_read_profile_counters_3d(struct viv_conn *conn, uint32_t *out);
+
+#endif
+
diff --git a/src/fb/.gitignore b/src/fb/.gitignore
new file mode 100644
index 0000000..11a4448
--- /dev/null
+++ b/src/fb/.gitignore
@@ -0,0 +1,17 @@
+fbtest
+etna_test
+rotate_cube
+cube_companion
+mip_cube
+rstests
+alpha_blend
+cubemap_sphere
+stencil_test
+displacement
+particle_system
+etna_gears
+viv_profile
+viv_gpu_top
+ps_sandbox
+downsample_test
+
diff --git a/src/fb/Makefile b/src/fb/Makefile
new file mode 100644
index 0000000..48aadc4
--- /dev/null
+++ b/src/fb/Makefile
@@ -0,0 +1,59 @@
+TOP=..
+
+include $(TOP)/Makefile.inc
+
+COMMON_FLAGS += -I$(TOP)/resources -I$(TOP)/driver
+CFLAGS += -DDUMP
+CXXFLAGS +=
+LDFLAGS +=
+
+TARGETS = rotate_cube alpha_blend cube_companion cubemap_sphere particle_system etna_gears stencil_test displacement mip_cube viv_profile ps_sandbox \
+ downsample_test
+COMPANION_OBJS = ../resources/companion_array.o ../resources/companion_mesh.o ../resources/companion_texture.o
+ETNA_OBJS = ../lib/fbdemos.o ../lib/etna_bswap.o ../driver/libetnadriver.a ../minigallium/libminigallium.a ../etnaviv/libetnaviv.a
+
+all: $(TARGETS)
+
+clean:
+ rm -f *.o ../lib/*.o ../resources/*.o
+ rm -f $(TARGETS)
+
+rotate_cube: rotate_cube.o ../lib/write_bmp.o $(ETNA_OBJS) ../lib/esTransform.o
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+mip_cube: mip_cube.o ../lib/write_bmp.o ../lib/esTransform.o ../lib/dds.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+cubemap_sphere: cubemap_sphere.o ../lib/write_bmp.o ../lib/esTransform.o ../lib/dds.o ../lib/esShapes.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+cube_companion: cube_companion.o ../lib/write_bmp.o ../lib/esTransform.o $(COMPANION_OBJS) $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+alpha_blend: alpha_blend.o ../lib/write_bmp.o ../lib/esTransform.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+stencil_test: stencil_test.o ../lib/write_bmp.o ../lib/esTransform.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+particle_system: particle_system.o ../lib/write_bmp.o ../lib/esUtil.o ../lib/esTransform.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+displacement: displacement.o ../lib/write_bmp.o ../lib/esUtil.o ../lib/esTransform.o ../lib/esShapes.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+etna_gears: etna_gears.o ../lib/write_bmp.o ../lib/esUtil.o ../lib/esTransform.o ../lib/esShapes.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+viv_profile: viv_profile.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+viv_gpu_top: viv_gpu_top.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+ps_sandbox: ps_sandbox.o ../lib/write_bmp.o ../lib/esUtil.o ../lib/esTransform.o ../lib/esShapes.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+downsample_test: downsample_test.o ../lib/write_bmp.o ../lib/esUtil.o ../lib/esTransform.o ../lib/esShapes.o $(COMPANION_OBJS) $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
diff --git a/src/fb/alpha_blend.c b/src/fb/alpha_blend.c
new file mode 100644
index 0000000..3d0a553
--- /dev/null
+++ b/src/fb/alpha_blend.c
@@ -0,0 +1,363 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Experiments with alpha blending
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "util/u_inlines.h"
+#include "write_bmp.h"
+#include "state_tracker/graw.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "dds.h"
+
+/*********************************************************************/
+#define VERTEX_BUFFER_SIZE 0x60000
+
+float vVertices[] = {
+ -1.0f, -1.0f, +0.0f,
+ +1.0f, -1.0f, +0.0f,
+ -1.0f, +1.0f, +0.0f,
+ +1.0f, +1.0f, +0.0f,
+};
+
+float vColors[] = {
+ 0.8f, 0.8f, 0.8f,
+ 0.9f, 0.9f, 0.9f,
+ 1.0f, 1.0f, 1.0f,
+ 1.0f, 1.0f, 1.0f,
+};
+
+float vNormals[] = {
+ +0.0f, +0.0f, +1.0f,
+ +0.0f, +0.0f, +1.0f,
+ +0.0f, +0.0f, +1.0f,
+ +0.0f, +0.0f, +1.0f,
+};
+
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (4)
+
+static const char alpha_blend_vert[] =
+"VERT\n"
+"DCL IN[0]\n"
+"DCL IN[1]\n"
+"DCL IN[2]\n"
+"DCL OUT[0], POSITION\n"
+"DCL OUT[1], GENERIC[0]\n"
+"DCL CONST[0..4]\n"
+"DCL TEMP[0], LOCAL\n"
+" 0: MUL TEMP[0], CONST[0], IN[0].xxxx\n"
+" 1: MAD TEMP[0], CONST[1], IN[0].yyyy, TEMP[0]\n"
+" 2: MAD TEMP[0], CONST[2], IN[0].zzzz, TEMP[0]\n"
+" 3: MAD TEMP[0], CONST[3], IN[0].wwww, TEMP[0]\n"
+" 4: MUL OUT[1], IN[2], CONST[4]\n"
+" 6: MOV OUT[0], TEMP[0]\n"
+" 7: END\n";
+
+/* simple passthrough */
+static const char alpha_blend_frag[] =
+"FRAG\n"
+"PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n"
+"DCL IN[0], GENERIC[0], PERSPECTIVE\n"
+"DCL OUT[0], COLOR\n"
+" 0: MOV OUT[0], IN[0]\n"
+" 1: END\n";
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* interleave vertex data */
+ struct pipe_transfer *transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &transfer);
+ assert(vtx_logical);
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int dest_idx = vert * (3 + 3 + 3);
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+0] = vVertices[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+3] = vNormals[vert*3 + comp]; /* 1 */
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+6] = vColors[vert*3 + comp]; /* 2 */
+ }
+ pipe_buffer_unmap(pipe, transfer);
+
+ /* compile gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 1,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA,
+ .colormask = 0xf
+ }
+ });
+
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .min_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_LINEAR,
+ .mag_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_BACK, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 0,
+ .writemask = 0,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ struct pipe_vertex_buffer vertex_buf_desc = {
+ .stride = (3 + 3 + 3)*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ };
+
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0xc,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* texture coord */
+ .src_offset = 0x18,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ }
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* bind */
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+
+ pipe->set_vertex_buffers(pipe, 0, 1, &vertex_buf_desc);
+ pipe->set_index_buffer(pipe, NULL);/*&(struct pipe_index_buffer){
+ .index_size = 0,
+ .offset = 0,
+ .buffer = 0,
+ .user_buffer = 0
+ });*/ /* non-indexed rendering */
+
+ void *vtx_shader = graw_parse_vertex_shader(pipe, alpha_blend_vert);
+ void *frag_shader = graw_parse_fragment_shader(pipe, alpha_blend_frag);
+ pipe->bind_vs_state(pipe, vtx_shader);
+ pipe->bind_fs_state(pipe, frag_shader);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix projection;
+ float aspect = (float)(height) / (float)(width);
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -1.8f, +1.8f, -1.8f * aspect, +1.8f * aspect, 5.0f, 10.0f);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ for(int idx=0; idx<5; ++idx)
+ {
+ float vs_const[5*4];
+ ESMatrix modelview, modelviewprojection;
+ esMatrixLoadIdentity(&modelview);
+
+ esTranslate(&modelview, 0.0f, 0.0f, -7.0f);
+ //esRotate(&modelview, 25.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 35.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.15f, 1.0f, 0.0f, 0.0f);
+ esTranslate(&modelview, 0.0f, 0.0f, 0.3f * idx);
+
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+
+ memcpy(&vs_const[0], (uint32_t*)&modelviewprojection.m[0][0], 16 * 4);
+ /* material color */
+ vs_const[16] = idx*0.25f;
+ vs_const[17] = 0.3f;
+ vs_const[18] = 1.0f - idx*0.25f;
+ vs_const[19] = 0.5f;
+ pipe->set_constant_buffer(pipe, PIPE_SHADER_VERTEX, 0, &(struct pipe_constant_buffer){
+ .user_buffer = vs_const,
+ .buffer_size = sizeof(vs_const)
+ });
+
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 0,
+ .mode = PIPE_PRIM_TRIANGLE_STRIP,
+ .start = 0,
+ .count = 4
+ });
+ }
+
+#if 0
+ etna_dump_cmd_buffer(ctx);
+ exit(0);
+#endif
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
+
diff --git a/src/fb/cube_companion.c b/src/fb/cube_companion.c
new file mode 100644
index 0000000..8e565ed
--- /dev/null
+++ b/src/fb/cube_companion.c
@@ -0,0 +1,418 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Animated rotating "weighted companion cube", using array or indexed rendering
+ * Exercised in this demo:
+ * - Array and indexed rendering of arbitrary mesh
+ * - Video memory allocation
+ * - Setting up render state
+ * - Depth buffer
+ * - Vertex / fragment shader
+ * - Texturing
+ * - Double-buffered rendering to framebuffer
+ * - Mipmapping
+ */
+#define INDEXED
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "util/u_inlines.h"
+#include "write_bmp.h"
+#include "state_tracker/graw.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "dds.h"
+#include "companion.h"
+
+/*********************************************************************/
+#define INDEXED /* Used indexed rendering */
+#define INDEX_BUFFER_SIZE 0x8000
+#define VERTEX_BUFFER_SIZE 0x60000
+
+static const char cube_companion_vert[] =
+"VERT\n"
+"DCL IN[0]\n"
+"DCL IN[1]\n"
+"DCL IN[2]\n"
+"DCL OUT[0], POSITION\n"
+"DCL OUT[1], GENERIC[0]\n"
+"DCL OUT[2], GENERIC[1]\n"
+"DCL CONST[0..10]\n"
+"DCL TEMP[0..4], LOCAL\n"
+"IMM[0] FLT32 { 2.0000, 20.0000, 1.0000, 0.0000}\n"
+" 0: MUL TEMP[0], CONST[3], IN[0].xxxx\n"
+" 1: MAD TEMP[0], CONST[4], IN[0].yyyy, TEMP[0]\n"
+" 2: MAD TEMP[0], CONST[5], IN[0].zzzz, TEMP[0]\n"
+" 3: MAD TEMP[0], CONST[6], IN[0].wwww, TEMP[0]\n"
+" 4: MUL TEMP[1], CONST[7], IN[0].xxxx\n"
+" 5: MAD TEMP[1], CONST[8], IN[0].yyyy, TEMP[1]\n"
+" 6: MAD TEMP[1], CONST[9], IN[0].zzzz, TEMP[1]\n"
+" 7: MAD TEMP[1], CONST[10], IN[0].wwww, TEMP[1]\n"
+" 8: RCP TEMP[2].x, TEMP[1].wwww\n"
+" 9: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[2].xxxx\n"
+" 10: ADD TEMP[1].xyz, IMM[0].xxyy, -TEMP[1].xyzz\n"
+" 11: MOV TEMP[2].w, IMM[0].zzzz\n"
+" 12: MUL TEMP[3].xyz, CONST[0].xyzz, IN[1].xxxx\n"
+" 13: MAD TEMP[3].xyz, CONST[1].xyzz, IN[1].yyyy, TEMP[3].xyzz\n"
+" 14: MAD TEMP[3].xyz, CONST[2].xyzz, IN[1].zzzz, TEMP[3].xyzz\n"
+" 15: DP3 TEMP[4].x, TEMP[1].xyzz, TEMP[1].xyzz\n"
+" 16: RSQ TEMP[4].x, TEMP[4].xxxx\n"
+" 17: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[4].xxxx\n"
+" 18: DP3 TEMP[1].x, TEMP[3].xyzz, TEMP[1].xyzz\n"
+" 19: MAX TEMP[1].x, IMM[0].wwww, TEMP[1].xxxx\n"
+" 20: MOV TEMP[2].xyz, TEMP[1].xxxx\n"
+" 21: MOV TEMP[1].xy, IN[2].xyxx\n"
+" 22: MOV OUT[1], TEMP[2]\n"
+" 23: MOV OUT[0], TEMP[0]\n"
+" 24: MOV OUT[2], TEMP[1]\n"
+" 25: END\n";
+
+static const char cube_companion_frag[] =
+"FRAG\n"
+"PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n"
+"DCL IN[0], GENERIC[0], PERSPECTIVE\n"
+"DCL IN[1], GENERIC[1], PERSPECTIVE\n"
+"DCL OUT[0], COLOR\n"
+"DCL SAMP[0]\n"
+"DCL TEMP[0..1], LOCAL\n"
+" 1: TEX TEMP[1], IN[1].xyyy, SAMP[0], 2D\n"
+" 2: MUL TEMP[0], IN[0], TEMP[1]\n"
+" 3: MOV OUT[0], TEMP[0]\n"
+" 4: END\n";
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ /* Convert and upload embedded texture */
+ struct pipe_resource *tex_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_SAMPLER_VIEW, PIPE_FORMAT_B8G8R8X8_UNORM,
+ COMPANION_TEXTURE_WIDTH, COMPANION_TEXTURE_HEIGHT, 0);
+ void *temp = malloc(COMPANION_TEXTURE_WIDTH * COMPANION_TEXTURE_HEIGHT * 4);
+ etna_convert_r8g8b8_to_b8g8r8x8(temp, (const uint8_t*)companion_texture, COMPANION_TEXTURE_WIDTH * COMPANION_TEXTURE_HEIGHT);
+ etna_pipe_inline_write(pipe, tex_resource, 0, 0, temp, COMPANION_TEXTURE_WIDTH * COMPANION_TEXTURE_HEIGHT * 4);
+ free(temp);
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* geometry */
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+ struct pipe_resource *idx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_IMMUTABLE, INDEX_BUFFER_SIZE);
+
+ struct pipe_transfer *vtx_transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &vtx_transfer);
+ assert(vtx_logical);
+ struct pipe_transfer *idx_transfer = 0;
+ float *idx_logical = pipe_buffer_map(pipe, idx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &idx_transfer);
+ assert(idx_logical);
+#ifndef INDEXED
+ printf("Interleaving vertices...\n");
+ float *vertices_array = companion_vertices_array();
+ float *texture_coordinates_array =
+ companion_texture_coordinates_array();
+ float *normals_array = companion_normals_array();
+ assert(COMPANION_ARRAY_COUNT*(3+3+2)*sizeof(float) < VERTEX_BUFFER_SIZE);
+ for(int vert=0; vert<COMPANION_ARRAY_COUNT; ++vert)
+ {
+ int dest_idx = vert * (3 + 3 + 2);
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx_logical)[dest_idx+comp+0] = vertices_array[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx_logical)[dest_idx+comp+3] = normals_array[vert*3 + comp]; /* 1 */
+ for(int comp=0; comp<2; ++comp)
+ ((float*)vtx_logical)[dest_idx+comp+6] = texture_coordinates_array[vert*2 + comp]; /* 2 */
+ }
+#else
+ printf("Interleaving vertices and copying index buffer...\n");
+ assert(COMPANION_VERTEX_COUNT*(3+3+2)*sizeof(float) < VERTEX_BUFFER_SIZE);
+ for(int vert=0; vert<COMPANION_VERTEX_COUNT; ++vert)
+ {
+ int dest_idx = vert * (3 + 3 + 2);
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx_logical)[dest_idx+comp+0] = companion_vertices[vert][comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx_logical)[dest_idx+comp+3] = companion_normals[vert][comp]; /* 1 */
+ for(int comp=0; comp<2; ++comp)
+ ((float*)vtx_logical)[dest_idx+comp+6] = companion_texture_coordinates[vert][comp]; /* 2 */
+ }
+ assert(COMPANION_TRIANGLE_COUNT*3*sizeof(unsigned short) < INDEX_BUFFER_SIZE);
+ memcpy(idx_logical, &companion_triangles[0][0], COMPANION_TRIANGLE_COUNT*3*sizeof(unsigned short));
+#endif
+ pipe_buffer_unmap(pipe, vtx_transfer);
+ pipe_buffer_unmap(pipe, idx_transfer);
+
+ struct pipe_vertex_buffer vertex_buffer_desc = {
+ .stride = (3 + 3 + 2)*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ };
+ struct pipe_index_buffer index_buffer_desc = {
+ .index_size = sizeof(unsigned short),
+ .offset = 0,
+ .buffer = idx_resource,
+ .user_buffer = 0
+ };
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0xc,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* texture coord */
+ .src_offset = 0x18,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32_FLOAT
+ }
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+
+ /* compile other gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 0,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_ONE,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_ONE,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .colormask = 0xf
+ }
+ });
+
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .min_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_LINEAR,
+ .mag_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_BACK, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ struct pipe_sampler_view *sampler_view = pipe->create_sampler_view(pipe, tex_resource, &(struct pipe_sampler_view){
+ .format = tex_resource->format,
+ .u.tex.first_level = 0,
+ .u.tex.last_level = 0,
+ .swizzle_r = PIPE_SWIZZLE_RED,
+ .swizzle_g = PIPE_SWIZZLE_GREEN,
+ .swizzle_b = PIPE_SWIZZLE_BLUE,
+ .swizzle_a = PIPE_SWIZZLE_ALPHA,
+ });
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* bind */
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+ pipe->set_fragment_sampler_views(pipe, 1, &sampler_view);
+ pipe->set_vertex_buffers(pipe, 0, 1, &vertex_buffer_desc);
+ pipe->set_index_buffer(pipe, &index_buffer_desc);
+
+ void *vtx_shader = graw_parse_vertex_shader(pipe, cube_companion_vert);
+ void *frag_shader = graw_parse_fragment_shader(pipe, cube_companion_frag);
+ pipe->bind_vs_state(pipe, vtx_shader);
+ pipe->bind_fs_state(pipe, frag_shader);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ float vs_const[11*4];
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview, projection, modelviewprojection;
+ ESMatrix inverse, normal;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -9.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.5f, 0.0f, 0.0f, 1.0f);
+ esScale(&modelview, 0.475f, 0.475f, 0.475f);
+ float aspect = (float)(height) / (float)(width);
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 10.0f);
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+ esMatrixInverse3x3(&inverse, &modelview);
+ esMatrixTranspose(&normal, &inverse);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ memcpy(&vs_const[0*4], &normal.m[0][0], 3*4); /* CONST[0] */
+ memcpy(&vs_const[1*4], &normal.m[1][0], 3*4); /* CONST[1] */
+ memcpy(&vs_const[2*4], &normal.m[2][0], 3*4); /* CONST[2] */
+ memcpy(&vs_const[3*4], &modelviewprojection.m[0][0], 16*4); /* CONST[3..6] */
+ memcpy(&vs_const[7*4], &modelview.m[0][0], 16*4); /* CONST[7..10] */
+ pipe->set_constant_buffer(pipe, PIPE_SHADER_VERTEX, 0, &(struct pipe_constant_buffer){
+ .user_buffer = vs_const,
+ .buffer_size = sizeof(vs_const)
+ });
+
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+#ifdef INDEXED
+ .indexed = 1,
+#else
+ .indexed = 0,
+#endif
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 0,
+ .count = COMPANION_TRIANGLE_COUNT * 3
+ });
+
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
diff --git a/src/fb/cubemap_sphere.c b/src/fb/cubemap_sphere.c
new file mode 100644
index 0000000..d6895fc
--- /dev/null
+++ b/src/fb/cubemap_sphere.c
@@ -0,0 +1,396 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Mip cube, but in terms of minigallium pipe
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "util/u_inlines.h"
+#include "write_bmp.h"
+#include "state_tracker/graw.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "esShapes.h"
+#include "dds.h"
+
+/*********************************************************************/
+#define VERTEX_BUFFER_SIZE 0x60000
+
+static const char cubemap_sphere_vert[] =
+"VERT\n"
+"DCL IN[0]\n"
+"DCL IN[1]\n"
+"DCL IN[2]\n"
+"DCL OUT[0], POSITION\n"
+"DCL OUT[1], GENERIC[0]\n"
+"DCL OUT[2], GENERIC[1]\n"
+"DCL CONST[0..10]\n"
+"DCL TEMP[0..4], LOCAL\n"
+"IMM[0] FLT32 { 2.0000, 20.0000, 1.0000, 0.0000}\n"
+" 0: MUL TEMP[0], CONST[3], IN[0].xxxx\n"
+" 1: MAD TEMP[0], CONST[4], IN[0].yyyy, TEMP[0]\n"
+" 2: MAD TEMP[0], CONST[5], IN[0].zzzz, TEMP[0]\n"
+" 3: MAD TEMP[0], CONST[6], IN[0].wwww, TEMP[0]\n"
+" 4: MUL TEMP[1], CONST[7], IN[0].xxxx\n"
+" 5: MAD TEMP[1], CONST[8], IN[0].yyyy, TEMP[1]\n"
+" 6: MAD TEMP[1], CONST[9], IN[0].zzzz, TEMP[1]\n"
+" 7: MAD TEMP[1], CONST[10], IN[0].wwww, TEMP[1]\n"
+" 8: RCP TEMP[2].x, TEMP[1].wwww\n"
+" 9: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[2].xxxx\n"
+" 10: ADD TEMP[1].xyz, IMM[0].xxyy, -TEMP[1].xyzz\n"
+" 11: MOV TEMP[2].w, IMM[0].zzzz\n"
+" 12: MUL TEMP[3].xyz, CONST[0].xyzz, IN[1].xxxx\n"
+" 13: MAD TEMP[3].xyz, CONST[1].xyzz, IN[1].yyyy, TEMP[3].xyzz\n"
+" 14: MAD TEMP[3].xyz, CONST[2].xyzz, IN[1].zzzz, TEMP[3].xyzz\n"
+" 15: DP3 TEMP[4].x, TEMP[1].xyzz, TEMP[1].xyzz\n"
+" 16: RSQ TEMP[4].x, TEMP[4].xxxx\n"
+" 17: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[4].xxxx\n"
+" 18: DP3 TEMP[1].x, TEMP[3].xyzz, TEMP[1].xyzz\n"
+" 19: MAX TEMP[1].x, IMM[0].wwww, TEMP[1].xxxx\n"
+" 20: MOV TEMP[2].xyz, TEMP[1].xxxx\n"
+" 21: MOV TEMP[1].xyz, TEMP[3].xyzz\n"
+" 22: MOV OUT[1], TEMP[2]\n"
+" 23: MOV OUT[0], TEMP[0]\n"
+" 24: MOV OUT[2], TEMP[1]\n"
+" 25: END\n";
+
+static const char cubemap_sphere_frag[] =
+"FRAG\n"
+"PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n"
+"DCL IN[0], GENERIC[0], PERSPECTIVE\n"
+"DCL IN[1], GENERIC[1], PERSPECTIVE\n"
+"DCL OUT[0], COLOR\n"
+"DCL SAMP[0]\n"
+"DCL TEMP[0..1], LOCAL\n"
+"IMM[0] FLT32 { 1.0000, 0.0000, 0.0000, 0.0000}\n"
+" 0: MUL TEMP[0], IMM[0].xxxx, IN[0]\n"
+" 1: TEX TEMP[1], IN[1].xyzz, SAMP[0], CUBE\n"
+" 2: MUL TEMP[0], TEMP[0], TEMP[1]\n"
+" 3: MOV OUT[0], TEMP[0]\n"
+" 4: END\n";
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ struct pipe_resource *tex_resource = fbdemo_create_cube(fbs->screen, PIPE_BIND_SAMPLER_VIEW, FMT_X8R8G8B8, 1, 1, 0);
+
+ uint32_t tex_data[6] = {
+ 0xffff0000,
+ 0xff00ff00,
+ 0xff0000ff,
+ 0xffffff00,
+ 0xffff00ff,
+ 0xffffffff
+ };
+ for(int layerid=0; layerid<6; ++layerid)
+ etna_pipe_inline_write(pipe, tex_resource, layerid, 0, &tex_data[layerid], sizeof(uint32_t));
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+ struct pipe_resource *idx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ float *vVertices;
+ float *vNormals;
+ float *vTexCoords;
+ uint16_t *vIndices;
+ int numVertices = 0;
+ int numIndices = esGenSphere(20, 1.0f, &vVertices, &vNormals,
+ &vTexCoords, &vIndices, &numVertices);
+
+ struct pipe_transfer *vtx_transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &vtx_transfer);
+ for(int vert=0; vert<numVertices; ++vert)
+ {
+ int dest_idx = vert * (3 + 3 + 2);
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+0] = vVertices[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+3] = vNormals[vert*3 + comp]; /* 1 */
+ for(int comp=0; comp<2; ++comp)
+ vtx_logical[dest_idx+comp+6] = vTexCoords[vert*2 + comp]; /* 2 */
+ }
+ pipe_buffer_unmap(pipe, vtx_transfer);
+
+ struct pipe_transfer *idx_transfer = 0;
+ float *idx_logical = pipe_buffer_map(pipe, idx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &idx_transfer);
+ memcpy(idx_logical, vIndices, numIndices*sizeof(uint16_t));
+ pipe_buffer_unmap(pipe, idx_transfer);
+
+ /* compile gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 0,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_ONE,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_ONE,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .colormask = 0xf
+ }
+ });
+
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_REPEAT,
+ .wrap_t = PIPE_TEX_WRAP_REPEAT,
+ .wrap_r = PIPE_TEX_WRAP_REPEAT,
+ .min_img_filter = PIPE_TEX_FILTER_NEAREST,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_NONE,
+ .mag_img_filter = PIPE_TEX_FILTER_NEAREST,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_BACK, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 0,
+ .writemask = 0,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0xc,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* texture coord */
+ .src_offset = 0x18,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32_FLOAT
+ }
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+ struct pipe_sampler_view *sampler_view = pipe->create_sampler_view(pipe, tex_resource, &(struct pipe_sampler_view){
+ .format = tex_resource->format,
+ .u.tex.first_level = 0,
+ .u.tex.last_level = 0,
+ .swizzle_r = PIPE_SWIZZLE_RED,
+ .swizzle_g = PIPE_SWIZZLE_GREEN,
+ .swizzle_b = PIPE_SWIZZLE_BLUE,
+ .swizzle_a = PIPE_SWIZZLE_ALPHA,
+ });
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* bind */
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+ pipe->set_fragment_sampler_views(pipe, 1, &sampler_view);
+ pipe->set_vertex_buffers(pipe, 0, 1, &(struct pipe_vertex_buffer){
+ .stride = (3 + 3 + 2)*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ });
+ pipe->set_index_buffer(pipe, &(struct pipe_index_buffer){
+ .index_size = 2,
+ .offset = 0,
+ .buffer = idx_resource,
+ .user_buffer = 0
+ }); /* non-indexed rendering */
+
+ void *vtx_shader = graw_parse_vertex_shader(pipe, cubemap_sphere_vert);
+ void *frag_shader = graw_parse_fragment_shader(pipe, cubemap_sphere_frag);
+ pipe->bind_vs_state(pipe, vtx_shader);
+ pipe->bind_fs_state(pipe, frag_shader);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ float vs_const[11*4];
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview, projection, modelviewprojection;
+ ESMatrix inverse, normal;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.5f, 0.0f, 0.0f, 1.0f);
+ float aspect = (float)(height) / (float)(width);
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -1.8f, +1.8f, -1.8f * aspect, +1.8f * aspect, 6.0f, 10.0f);
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+ esMatrixInverse3x3(&inverse, &modelview);
+ esMatrixTranspose(&normal, &inverse);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ memcpy(&vs_const[0*4], &normal.m[0][0], 3*4); /* CONST[0] */
+ memcpy(&vs_const[1*4], &normal.m[1][0], 3*4); /* CONST[1] */
+ memcpy(&vs_const[2*4], &normal.m[2][0], 3*4); /* CONST[2] */
+ memcpy(&vs_const[3*4], &modelviewprojection.m[0][0], 16*4); /* CONST[3..6] */
+ memcpy(&vs_const[7*4], &modelview.m[0][0], 16*4); /* CONST[7..10] */
+ pipe->set_constant_buffer(pipe, PIPE_SHADER_VERTEX, 0, &(struct pipe_constant_buffer){
+ .user_buffer = vs_const,
+ .buffer_size = sizeof(vs_const)
+ });
+
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 1,
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 0,
+ .count = numIndices
+ });
+
+#if 0
+ etna_dump_cmd_buffer(ctx);
+ exit(0);
+#endif
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
diff --git a/src/fb/displacement.c b/src/fb/displacement.c
new file mode 100644
index 0000000..b01888e
--- /dev/null
+++ b/src/fb/displacement.c
@@ -0,0 +1,429 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Displacement mapping using vertex texture.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "util/u_inlines.h"
+#include "write_bmp.h"
+#include "state_tracker/graw.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "esShapes.h"
+#include "dds.h"
+
+/*********************************************************************/
+#ifndef M_PI
+# define M_PI 3.14159265358979323846 /* pi */
+#endif
+
+#define VERTEX_BUFFER_SIZE 0x60000
+
+static const char displacement_vert[] =
+"VERT\n"
+"DCL IN[0]\n"
+"DCL IN[1]\n"
+"DCL IN[2]\n"
+"DCL OUT[0], POSITION\n"
+"DCL OUT[1], GENERIC[0]\n"
+"DCL SAMP[0]\n"
+"DCL CONST[0..11]\n"
+"DCL TEMP[0..4], LOCAL\n"
+"IMM[0] FLT32 { 0.0000, 0.2000, 2.0000, 20.0000}\n"
+"IMM[1] FLT32 { 0.0000, 1.0000, 0.0000, 0.0000}\n"
+" 0: MOV TEMP[0].w, IMM[0].xxxx\n"
+" 1: TEX TEMP[1].x, IN[2].xyyy, SAMP[0], 2D\n"
+" 2: MUL TEMP[1].x, CONST[0].xxxx, TEMP[1].xxxx\n"
+" 3: MUL TEMP[0].xyz, TEMP[1].xxxx, IN[1].xyzz\n"
+" 4: ADD TEMP[0], IN[0], TEMP[0]\n"
+" 5: MUL TEMP[1], CONST[4], TEMP[0].xxxx\n"
+" 6: MAD TEMP[1], CONST[5], TEMP[0].yyyy, TEMP[1]\n"
+" 7: MAD TEMP[1], CONST[6], TEMP[0].zzzz, TEMP[1]\n"
+" 8: MAD TEMP[0], CONST[7], TEMP[0].wwww, TEMP[1]\n"
+" 9: MUL TEMP[1], CONST[8], IN[0].xxxx\n"
+" 10: MAD TEMP[1], CONST[9], IN[0].yyyy, TEMP[1]\n"
+" 11: MAD TEMP[1], CONST[10], IN[0].zzzz, TEMP[1]\n"
+" 12: MAD TEMP[1], CONST[11], IN[0].wwww, TEMP[1]\n"
+" 13: RCP TEMP[2].x, TEMP[1].wwww\n"
+" 14: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[2].xxxx\n"
+" 15: ADD TEMP[1].xyz, IMM[0].zzww, -TEMP[1].xyzz\n"
+" 16: MOV TEMP[2].yzw, IMM[1].xxxy\n"
+" 17: MUL TEMP[3].xyz, CONST[1].xyzz, IN[1].xxxx\n"
+" 18: MAD TEMP[3].xyz, CONST[2].xyzz, IN[1].yyyy, TEMP[3].xyzz\n"
+" 19: MAD TEMP[3].xyz, CONST[3].xyzz, IN[1].zzzz, TEMP[3].xyzz\n"
+" 20: DP3 TEMP[4].x, TEMP[1].xyzz, TEMP[1].xyzz\n"
+" 21: RSQ TEMP[4].x, TEMP[4].xxxx\n"
+" 22: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[4].xxxx\n"
+" 23: DP3 TEMP[1].x, TEMP[3].xyzz, TEMP[1].xyzz\n"
+" 24: MAX TEMP[2].x, IMM[0].xxxx, TEMP[1].xxxx\n"
+" 25: MOV OUT[1], TEMP[2]\n"
+" 26: MOV OUT[0], TEMP[0]\n"
+" 27: END\n";
+
+static const char displacement_frag[] =
+"FRAG\n"
+"PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n"
+"DCL IN[0], GENERIC[0], PERSPECTIVE\n"
+"DCL OUT[0], COLOR\n"
+" 0: MOV OUT[0], IN[0]\n"
+" 1: END\n";
+
+#define TEX_WIDTH (32)
+#define TEX_HEIGHT (32)
+static struct pipe_resource *createSimpleTexture(struct pipe_screen *screen, struct pipe_context *pipe)
+{
+ struct pipe_resource *tex_resource = fbdemo_create_2d(screen, PIPE_BIND_SAMPLER_VIEW, PIPE_FORMAT_L8_UNORM, TEX_WIDTH, TEX_HEIGHT, 0);
+ uint8_t pixels[TEX_HEIGHT][TEX_WIDTH];
+
+ for(int y=0; y<TEX_HEIGHT; ++y)
+ {
+ for(int x=0; x<TEX_WIDTH; ++x)
+ {
+ float xx = (float)x / (float)(TEX_WIDTH-1) * 2.0f - 1.0f;
+ float yy = (float)y / (float)(TEX_HEIGHT-1) * 2.0f - 1.0f;
+ //float vv = (0.25*xx*xx*yy*yy);
+ //float vv = (sin(xx*2.0*M_PI*2.0)*sin(yy*2.0*M_PI*2.0) + 1.0f) / 2.0f;
+ float vv = sin(xx*2.0*M_PI*2.0)*sin(yy*2.0*M_PI*2.0);
+ vv = vv * (1.0 - yy * yy); /* flatten over poles */
+ pixels[y][x] = etna_cfloat_to_uint8(vv);
+ printf("%3i ", pixels[y][x]);
+ }
+ printf("\n");
+ }
+
+ etna_pipe_inline_write(pipe, tex_resource, 0, 0, &pixels[0][0], TEX_WIDTH*TEX_HEIGHT);
+
+ return tex_resource;
+}
+#undef TEX_WIDTH
+#undef TEX_HEIGHT
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+ struct pipe_resource *idx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ float *vVertices;
+ float *vNormals;
+ float *vTexCoords;
+ uint16_t *vIndices;
+ int numVertices = 0;
+ int numIndices = esGenSphere(80, 1.0f, &vVertices, &vNormals,
+ &vTexCoords, &vIndices, &numVertices);
+
+ unsigned vtxStride = 3+3+2;
+ assert((numVertices * vtxStride*4) < VERTEX_BUFFER_SIZE);
+ struct pipe_transfer *vtx_transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &vtx_transfer);
+ for(int vert=0; vert<numVertices; ++vert)
+ {
+ int dest_idx = vert * vtxStride;
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+0] = vVertices[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+3] = vNormals[vert*3 + comp]; /* 1 */
+ for(int comp=0; comp<2; ++comp)
+ vtx_logical[dest_idx+comp+6] = vTexCoords[vert*2 + comp]; /* 2 */
+ }
+ pipe_buffer_unmap(pipe, vtx_transfer);
+
+ assert((numIndices * 2) < VERTEX_BUFFER_SIZE);
+ struct pipe_transfer *idx_transfer = 0;
+ void *idx_logical = pipe_buffer_map(pipe, idx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &idx_transfer);
+ memcpy(idx_logical, vIndices, numIndices*sizeof(uint16_t));
+ pipe_buffer_unmap(pipe, idx_transfer);
+
+ /* compile gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 0,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_ONE,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_ONE,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .colormask = 0xf
+ }
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_BACK, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0xc,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* texture coord */
+ .src_offset = 0x18,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32_FLOAT
+ }
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+
+ /* texture... */
+ struct pipe_resource *tex_resource = createSimpleTexture(fbs->screen, pipe);
+ struct pipe_sampler_view *sampler_view = pipe->create_sampler_view(pipe, tex_resource, &(struct pipe_sampler_view){
+ .format = tex_resource->format,
+ .u.tex.first_level = 0,
+ .u.tex.last_level = 0,
+ .swizzle_r = PIPE_SWIZZLE_RED,
+ .swizzle_g = PIPE_SWIZZLE_GREEN,
+ .swizzle_b = PIPE_SWIZZLE_BLUE,
+ .swizzle_a = PIPE_SWIZZLE_ALPHA,
+ });
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_REPEAT,
+ .wrap_t = PIPE_TEX_WRAP_REPEAT,
+ .wrap_r = PIPE_TEX_WRAP_REPEAT,
+ .min_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_NONE,
+ .mag_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* bind */
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+ pipe->set_vertex_buffers(pipe, 0, 1, &(struct pipe_vertex_buffer){
+ .stride = vtxStride*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ });
+ pipe->set_index_buffer(pipe, &(struct pipe_index_buffer){
+ .index_size = 2,
+ .offset = 0,
+ .buffer = idx_resource,
+ .user_buffer = 0
+ }); /* non-indexed rendering */
+
+ /* vertex samplers */
+ pipe->bind_vertex_sampler_states(pipe, 1, &sampler);
+ pipe->set_vertex_sampler_views(pipe, 1, &sampler_view);
+
+ void *vtx_shader = graw_parse_vertex_shader(pipe, displacement_vert);
+ void *frag_shader = graw_parse_fragment_shader(pipe, displacement_frag);
+ pipe->bind_vs_state(pipe, vtx_shader);
+ pipe->bind_fs_state(pipe, frag_shader);
+
+ ESMatrix projection;
+ float aspect = (float)(height) / (float)(width);
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -1.8f, +1.8f, -1.8f * aspect, +1.8f * aspect, 6.0f, 10.0f);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ float vs_const[12*4];
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview, modelviewprojection;
+ ESMatrix inverse, normal;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.5f, 0.0f, 0.0f, 1.0f);
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+ esMatrixInverse3x3(&inverse, &modelview);
+ esMatrixTranspose(&normal, &inverse);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ memcpy(&vs_const[1*4], &normal.m[0][0], 3*4); /* u4.xyz */
+ memcpy(&vs_const[2*4], &normal.m[1][0], 3*4); /* u5.xyz */
+ memcpy(&vs_const[3*4], &normal.m[2][0], 3*4); /* u6.xyz */
+ memcpy(&vs_const[4*4], &modelviewprojection.m[0][0], 16*4);
+ memcpy(&vs_const[8*4], (uint32_t*)&modelview.m[0][0], 16*4);
+
+ float scaling = fmodf(frame* 0.025f, 2.0f);
+ if(scaling > 1.0f)
+ scaling = 2.0f - scaling; // sawtooth
+ vs_const[0] = scaling;
+
+ pipe->set_constant_buffer(pipe, PIPE_SHADER_VERTEX, 0, &(struct pipe_constant_buffer){
+ .user_buffer = vs_const,
+ .buffer_size = sizeof(vs_const)
+ });
+
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 1,
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 0,
+ .count = numIndices
+ });
+
+#if 0
+ etna_dump_cmd_buffer(ctx);
+ exit(0);
+#endif
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
diff --git a/src/fb/downsample_test.c b/src/fb/downsample_test.c
new file mode 100644
index 0000000..0013783
--- /dev/null
+++ b/src/fb/downsample_test.c
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Mipmap generation test
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "util/u_inlines.h"
+#include "util/u_format.h"
+#include "util/u_gen_mipmap.h"
+#include "cso_cache/cso_context.h"
+#include "write_bmp.h"
+#include "state_tracker/graw.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "companion.h"
+
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ struct pipe_context *pipe = fbs->pipe;
+ unsigned format = PIPE_FORMAT_B5G6R5_UNORM; /* texture format */
+ //unsigned format = PIPE_FORMAT_B8G8R8X8_UNORM; /* texture format */
+ const struct util_format_description *format_desc = util_format_description(format);
+ unsigned bs = util_format_get_blocksize(format);
+ int twidth = COMPANION_TEXTURE_WIDTH/4;
+ int theight = COMPANION_TEXTURE_HEIGHT;
+
+ /* Convert and upload embedded texture */
+ struct pipe_resource *tex_resource = fbdemo_create_2d(fbs->screen,
+ PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET, format,
+ twidth, theight, 1000);
+
+ /* First convert from cumbersome RGB to RGBX */
+ void *temp_rgbx8888 = malloc(COMPANION_TEXTURE_WIDTH * COMPANION_TEXTURE_HEIGHT * 4);
+ etna_convert_r8g8b8_to_b8g8r8x8(temp_rgbx8888, (const uint8_t*)companion_texture, COMPANION_TEXTURE_WIDTH * COMPANION_TEXTURE_HEIGHT);
+
+ /* Then convert to destination format */
+ void *temp_fmt = malloc(twidth * theight * bs);
+ format_desc->pack_rgba_8unorm(temp_fmt, twidth*bs, temp_rgbx8888, COMPANION_TEXTURE_WIDTH*4,
+ twidth, theight);
+ etna_pipe_inline_write(pipe, tex_resource, 0, 0, temp_fmt, twidth * theight * bs);
+
+ free(temp_rgbx8888);
+ free(temp_fmt);
+ /* 0 512x512
+ * 1 256x256
+ * 2 128x128
+ * 3 64x64
+ * 4 32x32
+ * 5 16x16
+ * 6 8x8
+ * 7 4x4
+ * 8 2x2
+ * 9 1x1
+ */
+ struct pipe_sampler_view *sampler_view = pipe->create_sampler_view(pipe, tex_resource, &(struct pipe_sampler_view){
+ .format = tex_resource->format,
+ .u.tex.first_level = 0,
+ .u.tex.last_level = 9,
+ .swizzle_r = PIPE_SWIZZLE_RED,
+ .swizzle_g = PIPE_SWIZZLE_GREEN,
+ .swizzle_b = PIPE_SWIZZLE_BLUE,
+ .swizzle_a = PIPE_SWIZZLE_ALPHA,
+ });
+
+ struct cso_context *cso = cso_create_context(pipe);
+ assert(cso);
+ struct gen_mipmap_state *gen_mipmap = util_create_gen_mipmap(pipe, cso);
+ assert(gen_mipmap);
+ for(int frame=0; frame<1; ++frame)
+ {
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+ util_gen_mipmap(gen_mipmap, sampler_view, 0 /* layer */,
+ sampler_view->u.tex.first_level,
+ sampler_view->u.tex.last_level,
+ PIPE_TEX_FILTER_LINEAR);
+ }
+ struct pipe_fence_handle *fence = 0;
+ pipe->flush(pipe, &fence, 0);
+ assert(fence);
+ pipe->screen->fence_finish(pipe->screen, fence, PIPE_TIMEOUT_INFINITE);
+
+ /* OK, now read back the textures */
+ int lwidth = twidth;
+ int lheight = theight;
+ for(int level=0; level<=sampler_view->u.tex.last_level; ++level)
+ {
+ struct pipe_transfer *transfer = 0;
+ struct pipe_box box;
+ char filename[100];
+ box.x = 0;
+ box.y = 0;
+ box.z = 0;
+ box.width = lwidth;
+ box.height = lheight;
+ box.depth = 1;
+ void *data = pipe->transfer_map(pipe, tex_resource, level, PIPE_TRANSFER_READ,
+ &box, &transfer);
+
+ void *temp = malloc(lwidth * lheight * 4);
+ printf("%i: Transfer stride is %i\n", level, transfer->stride);
+ format_desc->unpack_rgba_8unorm(temp, lwidth*4, data, transfer->stride, lwidth, lheight);
+ snprintf(filename, sizeof(filename), "mip%i.bmp", level);
+ bmp_dump32_ex(temp, lwidth, lheight, /*flip*/ false, /*bgra*/true, /*alpha*/false, filename);
+ free(temp);
+
+ pipe->transfer_unmap(pipe, transfer);
+
+ lwidth = (lwidth+1)/2;
+ lheight = (lheight+1)/2;
+ }
+
+ fbdemo_free(fbs);
+ return 0;
+}
+
diff --git a/src/fb/etna_gears.c b/src/fb/etna_gears.c
new file mode 100644
index 0000000..bc36215
--- /dev/null
+++ b/src/fb/etna_gears.c
@@ -0,0 +1,650 @@
+/*
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Ported to GLES2.
+ * Kristian Høgsberg <krh@bitplanet.net>
+ * May 3, 2010
+ *
+ * Improve GLES2 port:
+ * * Refactor gear drawing.
+ * * Use correct normals for surfaces.
+ * * Improve shader.
+ * * Use perspective projection transformation.
+ * * Add FPS count.
+ * * Add comments.
+ * Alexandros Frantzis <alexandros.frantzis@linaro.org>
+ * Jul 13, 2010
+ */
+/* Ported to Etna by Wladimir van der Laan */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "etna_pipe.h"
+#include "util/u_inlines.h"
+#include "write_bmp.h"
+#include "state_tracker/graw.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "esShapes.h"
+#include "esUtil.h"
+
+#ifndef M_PI
+# define M_PI 3.14159265358979323846 /* pi */
+#endif
+
+#define STRIPS_PER_TOOTH 7
+#define VERTICES_PER_TOOTH 34
+#define GEAR_VERTEX_STRIDE 6
+
+/**
+ * Struct describing the vertices in triangle strip
+ */
+struct vertex_strip {
+ /** The first vertex in the strip */
+ int first;
+ /** The number of consecutive vertices in the strip after the first */
+ int count;
+};
+
+/* Each vertex consist of GEAR_VERTEX_STRIDE float attributes */
+typedef float GearVertex[GEAR_VERTEX_STRIDE];
+
+/**
+ * Struct representing a gear.
+ */
+struct gear {
+ /** The array of vertices comprising the gear */
+ GearVertex *vertices;
+ /** The number of vertices comprising the gear */
+ int nvertices;
+ /** The array of triangle strips comprising the gear */
+ struct vertex_strip *strips;
+ /** The number of triangle strips comprising the gear */
+ int nstrips;
+ /** The Vertex Buffer Object holding the vertices in the graphics card */
+ struct pipe_resource *vtx_resource;
+ void *vertex_elements;
+ struct pipe_vertex_buffer vertex_buffer;
+};
+
+/** The view rotation [x, y, z] */
+static float view_rot[3] = { 20.0, 30.0, 0.0 };
+/** The gears */
+static struct gear *gear1, *gear2, *gear3;
+/** The current gear rotation angle */
+static float angle = 0.0;
+/** The projection matrix */
+static ESMatrix ProjectionMatrix;
+/** The direction of the directional light for the scene */
+static const float LightSourcePosition[4] = { 5.0, 5.0, 10.0, 1.0};
+
+/**
+ * Fills a gear vertex.
+ *
+ * @param v the vertex to fill
+ * @param x the x coordinate
+ * @param y the y coordinate
+ * @param z the z coortinate
+ * @param n pointer to the normal table
+ *
+ * @return the operation error code
+ */
+static GearVertex *
+vert(GearVertex *v, float x, float y, float z, float n[3])
+{
+ v[0][0] = x;
+ v[0][1] = y;
+ v[0][2] = z;
+ v[0][3] = n[0];
+ v[0][4] = n[1];
+ v[0][5] = n[2];
+
+ return v + 1;
+}
+
+static void sincos_(double x, double *s, double *c)
+{
+ *s = sin(x);
+ *c = cos(x);
+}
+
+/**
+ * Create a gear wheel.
+ *
+ * @param inner_radius radius of hole at center
+ * @param outer_radius radius at center of teeth
+ * @param width width of gear
+ * @param teeth number of teeth
+ * @param tooth_depth depth of tooth
+ *
+ * @return pointer to the constructed struct gear
+ */
+static struct gear *
+create_gear(struct pipe_context *pipe, struct pipe_screen *screen, float inner_radius, float outer_radius, float width,
+ int teeth, float tooth_depth)
+{
+ float r0, r1, r2;
+ float da;
+ GearVertex *v;
+ struct gear *gear;
+ double s[5], c[5];
+ float normal[3];
+ int cur_strip = 0;
+ int i;
+
+ /* Allocate memory for the gear */
+ gear = malloc(sizeof *gear);
+ if (gear == NULL)
+ return NULL;
+
+ /* Calculate the radii used in the gear */
+ r0 = inner_radius;
+ r1 = outer_radius - tooth_depth / 2.0;
+ r2 = outer_radius + tooth_depth / 2.0;
+
+ da = 2.0 * M_PI / teeth / 4.0;
+
+ /* Allocate memory for the triangle strip information */
+ gear->nstrips = STRIPS_PER_TOOTH * teeth;
+ gear->strips = calloc(gear->nstrips, sizeof (*gear->strips));
+
+ /* Allocate memory for the vertices */
+ gear->vertices = calloc(VERTICES_PER_TOOTH * teeth, sizeof(*gear->vertices));
+ v = gear->vertices;
+
+ for (i = 0; i < teeth; i++) {
+ /* Calculate needed sin/cos for varius angles */
+ sincos_(i * 2.0 * M_PI / teeth, &s[0], &c[0]);
+ sincos_(i * 2.0 * M_PI / teeth + da, &s[1], &c[1]);
+ sincos_(i * 2.0 * M_PI / teeth + da * 2, &s[2], &c[2]);
+ sincos_(i * 2.0 * M_PI / teeth + da * 3, &s[3], &c[3]);
+ sincos_(i * 2.0 * M_PI / teeth + da * 4, &s[4], &c[4]);
+
+ /* A set of macros for making the creation of the gears easier */
+#define GEAR_POINT(r, da) { (r) * c[(da)], (r) * s[(da)] }
+#define SET_NORMAL(x, y, z) do { \
+ normal[0] = (x); normal[1] = (y); normal[2] = (z); \
+} while(0)
+
+#define GEAR_VERT(v, point, sign) vert((v), p[(point)].x, p[(point)].y, (sign) * width * 0.5, normal)
+
+#define START_STRIP do { \
+ gear->strips[cur_strip].first = v - gear->vertices; \
+} while(0);
+
+#define END_STRIP do { \
+ int _tmp = (v - gear->vertices); \
+ gear->strips[cur_strip].count = _tmp - gear->strips[cur_strip].first; \
+ cur_strip++; \
+} while (0)
+
+#define QUAD_WITH_NORMAL(p1, p2) do { \
+ SET_NORMAL((p[(p1)].y - p[(p2)].y), -(p[(p1)].x - p[(p2)].x), 0); \
+ v = GEAR_VERT(v, (p1), -1); \
+ v = GEAR_VERT(v, (p1), 1); \
+ v = GEAR_VERT(v, (p2), -1); \
+ v = GEAR_VERT(v, (p2), 1); \
+} while(0)
+
+ struct point {
+ float x;
+ float y;
+ };
+
+ /* Create the 7 points (only x,y coords) used to draw a tooth */
+ struct point p[7] = {
+ GEAR_POINT(r2, 1), // 0
+ GEAR_POINT(r2, 2), // 1
+ GEAR_POINT(r1, 0), // 2
+ GEAR_POINT(r1, 3), // 3
+ GEAR_POINT(r0, 0), // 4
+ GEAR_POINT(r1, 4), // 5
+ GEAR_POINT(r0, 4), // 6
+ };
+
+ /* Front face */
+ START_STRIP;
+ SET_NORMAL(0, 0, 1.0);
+ v = GEAR_VERT(v, 0, +1);
+ v = GEAR_VERT(v, 1, +1);
+ v = GEAR_VERT(v, 2, +1);
+ v = GEAR_VERT(v, 3, +1);
+ v = GEAR_VERT(v, 4, +1);
+ v = GEAR_VERT(v, 5, +1);
+ v = GEAR_VERT(v, 6, +1);
+ END_STRIP;
+
+ /* Inner face */
+ START_STRIP;
+ QUAD_WITH_NORMAL(4, 6);
+ END_STRIP;
+
+ /* Back face */
+ START_STRIP;
+ SET_NORMAL(0, 0, -1.0);
+ v = GEAR_VERT(v, 6, -1);
+ v = GEAR_VERT(v, 5, -1);
+ v = GEAR_VERT(v, 4, -1);
+ v = GEAR_VERT(v, 3, -1);
+ v = GEAR_VERT(v, 2, -1);
+ v = GEAR_VERT(v, 1, -1);
+ v = GEAR_VERT(v, 0, -1);
+ END_STRIP;
+
+ /* Outer face */
+ START_STRIP;
+ QUAD_WITH_NORMAL(0, 2);
+ END_STRIP;
+
+ START_STRIP;
+ QUAD_WITH_NORMAL(1, 0);
+ END_STRIP;
+
+ START_STRIP;
+ QUAD_WITH_NORMAL(3, 1);
+ END_STRIP;
+
+ START_STRIP;
+ QUAD_WITH_NORMAL(5, 3);
+ END_STRIP;
+ }
+
+ gear->nvertices = (v - gear->vertices);
+
+ /* element layout */
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0x0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0xc,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ }
+ };
+ gear->vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+
+ /* Store the vertices in a vertex buffer object (VBO) */
+ gear->vtx_resource = pipe_buffer_create(screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, gear->nvertices * sizeof(GearVertex));
+ etna_pipe_inline_write(pipe, gear->vtx_resource, 0, 0, gear->vertices, gear->nvertices * sizeof(GearVertex));
+
+ gear->vertex_buffer.stride = sizeof(GearVertex);
+ gear->vertex_buffer.buffer_offset = 0;
+ gear->vertex_buffer.buffer = gear->vtx_resource;
+ gear->vertex_buffer.user_buffer = 0;
+
+ return gear;
+}
+
+/**
+ * Draws a gear.
+ *
+ * @param gear the gear to draw
+ * @param transform the current transformation matrix
+ * @param x the x position to draw the gear at
+ * @param y the y position to draw the gear at
+ * @param angle the rotation angle of the gear
+ * @param color the color of the gear
+ */
+static void
+draw_gear(struct pipe_context *pipe, struct gear *gear, void *shader_state, ESMatrix *transform,
+ float x, float y, float angle, const float color[4])
+{
+ ESMatrix model_view;
+ ESMatrix normal_matrix;
+ ESMatrix model_view_projection;
+ float vs_const[10*4];
+
+ /* Set the LightSourcePosition uniform which is constant throught the program */
+ memcpy(&vs_const[1*4], LightSourcePosition, 4*4);
+
+ /* Translate and rotate the gear */
+ model_view = *transform;
+ esTranslate(&model_view, x, y, 0);
+ esRotate(&model_view, -angle, 0, 0, 1);
+
+ /* Create and set the ModelViewProjectionMatrix */
+ esMatrixMultiply(&model_view_projection, &model_view, &ProjectionMatrix);
+
+ memcpy(&vs_const[6*4], &model_view_projection.m[0][0], 16*4);
+
+ /*
+ * Create and set the NormalMatrix. It's the inverse transpose of the
+ * ModelView matrix.
+ */
+ ESMatrix inverse_model_view;
+ esMatrixInverse3x3(&inverse_model_view, &model_view);
+ esMatrixTranspose(&normal_matrix, &inverse_model_view);
+ memcpy(&vs_const[2*4], &normal_matrix.m[0][0], 16*4);
+
+ /* Set the gear color */
+ memcpy(&vs_const[0*4], color, 4*4);
+
+ /* Set up the position of the attributes in the vertex buffer object */
+ pipe->bind_vertex_elements_state(pipe, gear->vertex_elements);
+ pipe->set_vertex_buffers(pipe, 0, 1, &gear->vertex_buffer);
+ pipe->set_index_buffer(pipe, NULL);
+
+ /* Draw the triangle strips that comprise the gear */
+ pipe->set_constant_buffer(pipe, PIPE_SHADER_VERTEX, 0, &(struct pipe_constant_buffer){
+ .user_buffer = vs_const,
+ .buffer_size = sizeof(vs_const)
+ });
+ int n;
+ for (n = 0; n < gear->nstrips; n++)
+ {
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 0,
+ .mode = PIPE_PRIM_TRIANGLE_STRIP,
+ .start = gear->strips[n].first,
+ .count = gear->strips[n].count
+ });
+ }
+}
+
+/**
+ * Draws the gears.
+ */
+static void
+gears_draw(struct pipe_context *pipe, void *shader_state)
+{
+ const static float red[4] = { 0.8, 0.1, 0.0, 1.0 };
+ const static float green[4] = { 0.0, 0.8, 0.2, 1.0 };
+ const static float blue[4] = { 0.2, 0.2, 1.0, 1.0 };
+ ESMatrix transform;
+ esMatrixLoadIdentity(&transform);
+
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ /* Translate and rotate the view */
+ esTranslate(&transform, 0, 0, -15);
+ esRotate(&transform, -view_rot[0], 1, 0, 0);
+ esRotate(&transform, -view_rot[1], 0, 1, 0);
+ esRotate(&transform, -view_rot[2], 0, 0, 1);
+
+ /* Draw the gears */
+ draw_gear(pipe, gear1, shader_state, &transform, -3.0, -2.0, angle, red);
+ draw_gear(pipe, gear2, shader_state, &transform, 3.1, -2.0, -2 * angle - 9.0, green);
+ draw_gear(pipe, gear3, shader_state, &transform, -3.1, 4.2, -2 * angle - 25.0, blue);
+}
+
+/**
+ * Handles a new window size or exposure.
+ *
+ * @param width the window width
+ * @param height the window height
+ */
+static void
+gears_reshape(struct pipe_context *pipe, int width, int height)
+{
+ /* Update the projection matrix */
+ esMatrixLoadIdentity(&ProjectionMatrix);
+ esPerspective(&ProjectionMatrix, 60.0, width / (float)height, 1.0, 1024.0);
+
+ /* Set the viewport */
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+}
+
+static void
+gears_idle(struct etna_bswap_buffers *buffers)
+{
+ static int frames = 0;
+ static double tRot0 = -1.0, tRate0 = -1.0;
+ double dt, t = esNow();
+
+ if (tRot0 < 0.0)
+ tRot0 = t;
+ dt = t - tRot0;
+ tRot0 = t;
+
+ /* advance rotation for next frame */
+ angle += 70.0 * dt; /* 70 degrees per second */
+ if (angle > 3600.0)
+ angle -= 3600.0;
+
+ etna_swap_buffers(buffers);
+ frames++;
+
+ if (tRate0 < 0.0)
+ tRate0 = t;
+ if (t - tRate0 >= 5.0) {
+ float seconds = t - tRate0;
+ float fps = frames / seconds;
+ printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds,
+ fps);
+ tRate0 = t;
+ frames = 0;
+ }
+}
+
+static const char etna_gears_vert[] =
+"VERT\n"
+"DCL IN[0]\n"
+"DCL IN[1]\n"
+"DCL OUT[0], POSITION\n"
+"DCL OUT[1], GENERIC[0]\n"
+"DCL CONST[0..9]\n"
+"DCL TEMP[0..1], LOCAL\n"
+"IMM[0] FLT32 { 0.0000, 0.0000, 0.0000, 0.0000}\n"
+" 0: MUL TEMP[0], CONST[2], IN[1].xxxx\n"
+" 1: MAD TEMP[0], CONST[3], IN[1].yyyy, TEMP[0]\n"
+" 2: MAD TEMP[0], CONST[4], IN[1].zzzz, TEMP[0]\n"
+" 3: ADD TEMP[0].xyz, TEMP[0], CONST[5]\n"
+" 4: DP3 TEMP[1].x, TEMP[0].xyzz, TEMP[0].xyzz\n"
+" 5: RSQ TEMP[1].x, TEMP[1].xxxx\n"
+" 6: MUL TEMP[0].xyz, TEMP[0].xyzz, TEMP[1].xxxx\n"
+" 7: DP3 TEMP[1].x, CONST[1].xyzz, CONST[1].xyzz\n"
+" 8: RSQ TEMP[1].x, TEMP[1].xxxx\n"
+" 9: MUL TEMP[1].xyz, CONST[1].xyzz, TEMP[1].xxxx\n"
+" 10: DP3 TEMP[0].x, TEMP[0].xyzz, TEMP[1].xyzz\n"
+" 11: MAX TEMP[0].x, TEMP[0].xxxx, IMM[0].xxxx\n"
+" 12: MUL TEMP[0], TEMP[0].xxxx, CONST[0]\n"
+" 13: MUL TEMP[1], CONST[6], IN[0].xxxx\n"
+" 14: MAD TEMP[1], CONST[7], IN[0].yyyy, TEMP[1]\n"
+" 15: MAD TEMP[1], CONST[8], IN[0].zzzz, TEMP[1]\n"
+" 16: ADD TEMP[1], TEMP[1], CONST[9]\n"
+" 17: MOV OUT[1], TEMP[0]\n"
+" 18: MOV OUT[0], TEMP[1]\n"
+" 19: END\n";
+
+static const char etna_gears_frag[] =
+"FRAG\n"
+"PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n"
+"DCL IN[0], GENERIC[0], PERSPECTIVE\n"
+"DCL OUT[0], COLOR\n"
+" 0: MOV OUT[0], IN[0]\n"
+" 1: END\n";
+
+int
+main(int argc, char *argv[])
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* compile gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 0,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_ONE,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_ONE,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .colormask = 0xf
+ }
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_BACK, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+
+ void *vtx_shader = graw_parse_vertex_shader(pipe, etna_gears_vert);
+ void *frag_shader = graw_parse_fragment_shader(pipe, etna_gears_frag);
+ pipe->bind_vs_state(pipe, vtx_shader);
+ pipe->bind_fs_state(pipe, frag_shader);
+
+ /* make the gears */
+ gear1 = create_gear(pipe, fbs->screen, 1.0, 4.0, 1.0, 20, 0.7);
+ gear2 = create_gear(pipe, fbs->screen, 0.5, 2.0, 2.0, 10, 0.7);
+ gear3 = create_gear(pipe, fbs->screen, 1.3, 2.0, 0.5, 10, 0.7);
+
+ gears_reshape(pipe, width, height);
+
+ int frame = 0;
+ while(true)
+ {
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+ gears_draw(pipe, NULL);
+#if 0
+ etna_dump_cmd_buffer(ctx);
+ exit(0);
+#endif
+ gears_idle(fbs->buffers);
+ frame++;
+ }
+ fbdemo_free(fbs);
+
+ return 0;
+}
+
diff --git a/src/fb/exec_fb.sh b/src/fb/exec_fb.sh
new file mode 100755
index 0000000..d1cb172
--- /dev/null
+++ b/src/fb/exec_fb.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+# Build, upload, execute egl2 on device and fetch data log
+DEMO=$1
+if [ -z "$DEMO" ]; then
+ DEMO="fbtest"
+ echo "Defaulting to ${DEMO}"
+fi
+if [[ "$DEMO" == "ps_sandbox_etna" || "$DEMO" == "etna_test" ]]; then
+ ARG="/data/mine/shader.bin"
+ ../../tools/asm.py --isa-file ../../rnndb/isa.xml sandbox.asm -o shader.bin
+ [ $? -ne 0 ] && exit
+ adb push shader.bin ${ARG}
+fi
+if [[ "$DEMO" == "mip_cube" || "$DEMO" == "mip_cube_raw" ]]; then
+ #TEX="miprgba"
+ #TEX="mipdxt1"
+ #TEX="test_image-dxt3"
+ #TEX="mipdxt5"
+ #TEX="test_image-dxt1a"
+ #TEX="test_image-dxt1c"
+ TEX="lavaetc1"
+ adb push ../resources/${TEX}.dds /mnt/sdcard
+ ARG="/mnt/sdcard/${TEX}.dds"
+fi
+if [[ "$DEMO" == "particle_system" ]]; then
+ TEX="smoke"
+ adb push ../resources/${TEX}.tga /mnt/sdcard
+ ARG="/mnt/sdcard/${TEX}.tga"
+fi
+make ${DEMO}
+[ $? -ne 0 ] && exit
+adb push ${DEMO} /data/mine
+adb shell "/data/mine/${DEMO} ${ARG}"
+#adb pull /mnt/sdcard/egl2.fdr .
+#adb pull /mnt/sdcard/replay.bmp .
diff --git a/src/fb/mip_cube.c b/src/fb/mip_cube.c
new file mode 100644
index 0000000..5f262e1
--- /dev/null
+++ b/src/fb/mip_cube.c
@@ -0,0 +1,543 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Mip cube, but in terms of minigallium pipe
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "util/u_inlines.h"
+#include "write_bmp.h"
+#include "state_tracker/graw.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "dds.h"
+
+/*********************************************************************/
+#define VERTEX_BUFFER_SIZE 0x60000
+
+float vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+};
+
+float vTexCoords[] = {
+ // front
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ // back
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ // right
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ // left
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ // top
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ // bottom
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+};
+
+float vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+};
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (6*4)
+
+static const char mip_cube_vert[] =
+"VERT\n"
+"DCL IN[0]\n"
+"DCL IN[1]\n"
+"DCL IN[2]\n"
+"DCL OUT[0], POSITION\n"
+"DCL OUT[1], GENERIC[0]\n"
+"DCL OUT[2], GENERIC[1]\n"
+"DCL CONST[0..10]\n"
+"DCL TEMP[0..4], LOCAL\n"
+"IMM[0] FLT32 { 2.0000, 20.0000, 1.0000, 0.0000}\n"
+" 0: MUL TEMP[0], CONST[3], IN[0].xxxx\n"
+" 1: MAD TEMP[0], CONST[4], IN[0].yyyy, TEMP[0]\n"
+" 2: MAD TEMP[0], CONST[5], IN[0].zzzz, TEMP[0]\n"
+" 3: MAD TEMP[0], CONST[6], IN[0].wwww, TEMP[0]\n"
+" 4: MUL TEMP[1], CONST[7], IN[0].xxxx\n"
+" 5: MAD TEMP[1], CONST[8], IN[0].yyyy, TEMP[1]\n"
+" 6: MAD TEMP[1], CONST[9], IN[0].zzzz, TEMP[1]\n"
+" 7: MAD TEMP[1], CONST[10], IN[0].wwww, TEMP[1]\n"
+" 8: RCP TEMP[2].x, TEMP[1].wwww\n"
+" 9: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[2].xxxx\n"
+" 10: ADD TEMP[1].xyz, IMM[0].xxyy, -TEMP[1].xyzz\n"
+" 11: MOV TEMP[2].w, IMM[0].zzzz\n"
+" 12: MUL TEMP[3].xyz, CONST[0].xyzz, IN[1].xxxx\n"
+" 13: MAD TEMP[3].xyz, CONST[1].xyzz, IN[1].yyyy, TEMP[3].xyzz\n"
+" 14: MAD TEMP[3].xyz, CONST[2].xyzz, IN[1].zzzz, TEMP[3].xyzz\n"
+" 15: DP3 TEMP[4].x, TEMP[1].xyzz, TEMP[1].xyzz\n"
+" 16: RSQ TEMP[4].x, TEMP[4].xxxx\n"
+" 17: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[4].xxxx\n"
+" 18: DP3 TEMP[1].x, TEMP[3].xyzz, TEMP[1].xyzz\n"
+" 19: MAX TEMP[1].x, IMM[0].wwww, TEMP[1].xxxx\n"
+" 20: MOV TEMP[2].xyz, TEMP[1].xxxx\n"
+" 21: MOV TEMP[1].xy, IN[2].xyxx\n"
+" 22: MOV OUT[1], TEMP[2]\n"
+" 23: MOV OUT[0], TEMP[0]\n"
+" 24: MOV OUT[2], TEMP[1]\n"
+" 25: END\n";
+
+static const char mip_cube_frag[] =
+"FRAG\n"
+"PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n"
+"DCL IN[0], GENERIC[0], PERSPECTIVE\n"
+"DCL IN[1], GENERIC[1], PERSPECTIVE\n"
+"DCL OUT[0], COLOR\n"
+"DCL SAMP[0]\n"
+"DCL TEMP[0..1], LOCAL\n"
+" 1: TEX TEMP[1], IN[1].xyyy, SAMP[0], 2D\n"
+" 2: MUL TEMP[0], IN[0], TEMP[1]\n"
+" 3: MOV OUT[0], TEMP[0]\n"
+" 4: END\n";
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ dds_texture *dds = 0;
+ if(argc<2 || !dds_load(argv[1], &dds))
+ {
+ printf("Error loading texture\n");
+ exit(1);
+ }
+
+ uint32_t tex_format = 0;
+ uint32_t tex_base_width = dds->slices[0][0].width;
+ uint32_t tex_base_height = dds->slices[0][0].height;
+ switch(dds->fmt)
+ {
+ case FMT_A8R8G8B8: tex_format = PIPE_FORMAT_B8G8R8A8_UNORM; break;
+ case FMT_X8R8G8B8: tex_format = PIPE_FORMAT_B8G8R8X8_UNORM; break;
+ case FMT_R5G6B5: tex_format = PIPE_FORMAT_B5G6R5_UNORM; break;
+ case FMT_DXT1: tex_format = PIPE_FORMAT_DXT1_RGB; break;
+ case FMT_DXT3: tex_format = PIPE_FORMAT_DXT3_RGBA; break;
+ case FMT_DXT5: tex_format = PIPE_FORMAT_DXT5_RGBA; break;
+ case FMT_ETC1: tex_format = PIPE_FORMAT_ETC1_RGB8; break;
+ case FMT_A8: tex_format = PIPE_FORMAT_A8_UNORM; break;
+ case FMT_L8: tex_format = PIPE_FORMAT_L8_UNORM; break;
+ case FMT_A8L8: tex_format = PIPE_FORMAT_L8A8_UNORM; break;
+ default:
+ printf("Unknown texture format\n");
+ exit(1);
+ }
+
+ struct pipe_resource *tex_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_SAMPLER_VIEW, tex_format, tex_base_width, tex_base_height,
+ dds->num_mipmaps - 1);
+
+ printf("Loading compressed texture (format %i, %ix%i)\n", dds->fmt, tex_base_width, tex_base_height);
+
+ for(int ix=0; ix<dds->num_mipmaps; ++ix)
+ {
+ printf("%08x: Uploading mipmap %i (%ix%i)\n", dds->slices[0][ix].offset, ix, dds->slices[0][ix].width, dds->slices[0][ix].height);
+#if 0
+ for(int y=0; y<dds->slices[0][ix].height; ++y)
+ {
+ for(int x=0; x<dds->slices[0][ix].width; ++x)
+ {
+ uint32_t val = ((uint32_t*)dds->slices[0][ix].data)[y * dds->slices[0][ix].width + x];
+ printf("%c",val != 0xffffffff ? ' ' : '1');
+ }
+ printf("\n");
+ }
+#endif
+ struct pipe_box box;
+ box.x = 0;
+ box.y = 0;
+ box.z = 0;
+ box.width = dds->slices[0][ix].width;
+ box.height = dds->slices[0][ix].height;
+ box.depth = 1;
+
+ pipe->transfer_inline_write(pipe, tex_resource, ix,
+ (PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED), &box,
+ dds->slices[0][ix].data, dds->slices[0][ix].stride, dds->slices[0][ix].stride);
+ }
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ struct pipe_transfer *vtx_transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &vtx_transfer);
+ assert(vtx_logical);
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int dest_idx = vert * (3 + 3 + 2);
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+0] = vVertices[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+3] = vNormals[vert*3 + comp]; /* 1 */
+ for(int comp=0; comp<2; ++comp)
+ vtx_logical[dest_idx+comp+6] = vTexCoords[vert*2 + comp]; /* 2 */
+ }
+ pipe_buffer_unmap(pipe, vtx_transfer);
+
+ /* compile gallium3d states */
+ void *blend = NULL;
+ if(tex_format == PIPE_FORMAT_A8_UNORM || tex_format == PIPE_FORMAT_L8A8_UNORM) /* if alpha texture, enable blending */
+ {
+ blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 1,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA,
+ .colormask = 0xf
+ }
+ });
+ } else {
+ blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 0,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_ONE,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_ONE,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .colormask = 0xf
+ }
+ });
+ }
+
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .min_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_LINEAR,
+ .mag_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_BACK, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 0,
+ .writemask = 0,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0xc,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* texture coord */
+ .src_offset = 0x18,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32_FLOAT
+ }
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+ struct pipe_sampler_view *sampler_view = pipe->create_sampler_view(pipe, tex_resource, &(struct pipe_sampler_view){
+ .format = tex_format,
+ .u.tex.first_level = 0,
+ .u.tex.last_level = dds->num_mipmaps - 1,
+ .swizzle_r = PIPE_SWIZZLE_RED,
+ .swizzle_g = PIPE_SWIZZLE_GREEN,
+ .swizzle_b = PIPE_SWIZZLE_BLUE,
+ .swizzle_a = PIPE_SWIZZLE_ALPHA,
+ });
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* bind */
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+ pipe->set_fragment_sampler_views(pipe, 1, &sampler_view);
+ pipe->set_vertex_buffers(pipe, 0, 1, &(struct pipe_vertex_buffer){
+ .stride = (3 + 3 + 2)*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ });
+ pipe->set_index_buffer(pipe, NULL);/*&(struct pipe_index_buffer){
+ .index_size = 0,
+ .offset = 0,
+ .buffer = 0,
+ .user_buffer = 0
+ });*/ /* non-indexed rendering */
+
+ void *vtx_shader = graw_parse_vertex_shader(pipe, mip_cube_vert);
+ void *frag_shader = graw_parse_fragment_shader(pipe, mip_cube_frag);
+ pipe->bind_vs_state(pipe, vtx_shader);
+ pipe->bind_fs_state(pipe, frag_shader);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ float vs_const[11*4];
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview, projection, modelviewprojection;
+ ESMatrix inverse, normal;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.5f, 0.0f, 0.0f, 1.0f);
+ float aspect = (float)(height) / (float)(width);
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.4f, +2.4f, -2.4f * aspect, +2.4f * aspect, 6.0f, 10.0f);
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+ esMatrixInverse3x3(&inverse, &modelview);
+ esMatrixTranspose(&normal, &inverse);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ memcpy(&vs_const[0*4], &normal.m[0][0], 3*4); /* CONST[0] */
+ memcpy(&vs_const[1*4], &normal.m[1][0], 3*4); /* CONST[1] */
+ memcpy(&vs_const[2*4], &normal.m[2][0], 3*4); /* CONST[2] */
+ memcpy(&vs_const[3*4], &modelviewprojection.m[0][0], 16*4); /* CONST[3..6] */
+ memcpy(&vs_const[7*4], &modelview.m[0][0], 16*4); /* CONST[7..10] */
+ pipe->set_constant_buffer(pipe, PIPE_SHADER_VERTEX, 0, &(struct pipe_constant_buffer){
+ .user_buffer = vs_const,
+ .buffer_size = sizeof(vs_const)
+ });
+
+ for(int prim=0; prim<6; ++prim)
+ {
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 0,
+ .mode = PIPE_PRIM_TRIANGLE_STRIP,
+ .start = prim*4,
+ .count = 4
+ });
+ }
+
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
diff --git a/src/fb/particle_system.c b/src/fb/particle_system.c
new file mode 100644
index 0000000..18bc4b2
--- /dev/null
+++ b/src/fb/particle_system.c
@@ -0,0 +1,406 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Vertex-shader based particle system
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "util/u_inlines.h"
+#include "write_bmp.h"
+#include "state_tracker/graw.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "esUtil.h"
+#include "dds.h"
+
+/*********************************************************************/
+#define VERTEX_BUFFER_SIZE 0x60000
+#define NUM_PARTICLES 1000
+#define PARTICLE_SIZE 7
+
+static const char particle_system_vert[] =
+"VERT\n"
+"DCL IN[0]\n"
+"DCL IN[1]\n"
+"DCL IN[2]\n"
+"DCL OUT[0], POSITION\n"
+"DCL OUT[1], PSIZE\n"
+"DCL OUT[2], GENERIC[0]\n"
+"DCL CONST[0..1]\n"
+"DCL TEMP[0..2], LOCAL\n"
+"IMM[0] FLT32 { 1.0000, -1000.0000, 0.0000, 40.0000}\n"
+" 0: SGE TEMP[0].x, IN[0].xxxx, CONST[1].xxxx\n"
+" 1: IF TEMP[0].xxxx :0\n"
+" 2: MAD TEMP[0].xyz, CONST[1].xxxx, IN[2].xyzz, IN[1].xyzz\n"
+" 3: ADD TEMP[0].xyz, TEMP[0].xyzz, CONST[0].xyzz\n"
+" 4: MOV TEMP[0].w, IMM[0].xxxx\n"
+" 5: ELSE :0\n"
+" 6: MOV TEMP[0], IMM[0].yyzz\n"
+" 7: ENDIF\n"
+" 8: RCP TEMP[1].x, IN[0].xxxx\n"
+" 9: MUL TEMP[1].x, CONST[1].xxxx, TEMP[1].xxxx\n"
+" 10: ADD_SAT TEMP[1].x, IMM[0].xxxx, -TEMP[1].xxxx\n"
+" 11: MUL TEMP[2].x, TEMP[1].xxxx, TEMP[1].xxxx\n"
+" 12: MUL TEMP[2].x, TEMP[2].xxxx, IMM[0].wwww\n"
+" 13: MOV TEMP[1].x, TEMP[1].xxxx\n"
+" 14: MOV OUT[2], TEMP[1]\n"
+" 15: MOV OUT[1], TEMP[2].xxxx\n"
+" 16: MOV OUT[0], TEMP[0]\n"
+" 17: END\n";
+
+static const char particle_system_frag[] =
+"FRAG\n"
+"PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n"
+"DCL IN[0], PCOORD, LINEAR\n"
+"DCL IN[1], GENERIC[0], PERSPECTIVE\n"
+"DCL OUT[0], COLOR\n"
+"DCL SAMP[0]\n"
+"DCL CONST[1]\n"
+"DCL TEMP[0..1], LOCAL\n"
+" 0: TEX TEMP[0], IN[0].xyyy, SAMP[0], 2D\n"
+" 1: MUL TEMP[0], CONST[1], TEMP[0]\n"
+" 2: MOV TEMP[1].xyz, TEMP[0].xyzx\n"
+" 3: MUL TEMP[0].x, TEMP[0].wwww, IN[1].xxxx\n"
+" 4: MOV TEMP[1].w, TEMP[0].xxxx\n"
+" 5: MOV OUT[0], TEMP[1]\n"
+" 6: END\n";
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ /* texture */
+ int tex_base_width = 0;
+ int tex_base_height = 0;
+ if(argc<2)
+ {
+ printf("Pass path to smoke.tga on command line\n");
+ exit(1);
+ }
+ uint8_t *tex_buffer = (uint8_t*)esLoadTGA(argv[1], &tex_base_width, &tex_base_height );
+ if(!tex_buffer)
+ {
+ printf("Could not load texture\n");
+ exit(1);
+ }
+ struct pipe_resource *tex_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_SAMPLER_VIEW, PIPE_FORMAT_B8G8R8X8_UNORM,
+ tex_base_width, tex_base_height, 0);
+ printf("Uploading texture (%ix%i)\n", tex_base_width, tex_base_height);
+ uint32_t *temp = malloc(tex_base_width * tex_base_height * 4);
+ etna_convert_r8g8b8_to_b8g8r8x8(temp, tex_buffer, tex_base_width * tex_base_height);
+ etna_pipe_inline_write(pipe, tex_resource, 0, 0, temp, tex_base_width * tex_base_height * 4);
+ free(temp);
+
+ /* render target resources and surfaces */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* surfaces */
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* compile gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 1,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_ONE,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_ONE,
+ .colormask = 0xf
+ }
+ });
+
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .min_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_NONE,
+ .mag_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_NONE, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 1, /** points rasterized as quads or points */
+ .point_size_per_vertex = 1, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 0,
+ .writemask = 0,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ /* particles */
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+ struct pipe_vertex_buffer vertex_buffer_desc = {
+ .stride = PARTICLE_SIZE*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ };
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0x0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0x4,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* texture coord */
+ .src_offset = 0x10,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ }
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+
+ /* texture and render target surfaces */
+ struct pipe_sampler_view *sampler_view = pipe->create_sampler_view(pipe, tex_resource, &(struct pipe_sampler_view){
+ .format = tex_resource->format,
+ .u.tex.first_level = 0,
+ .u.tex.last_level = 0,
+ .swizzle_r = PIPE_SWIZZLE_RED,
+ .swizzle_g = PIPE_SWIZZLE_GREEN,
+ .swizzle_b = PIPE_SWIZZLE_BLUE,
+ .swizzle_a = PIPE_SWIZZLE_ALPHA,
+ });
+
+ /* bind */
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+ pipe->set_fragment_sampler_views(pipe, 1, &sampler_view);
+ pipe->set_vertex_buffers(pipe, 0, 1, &vertex_buffer_desc);
+ pipe->set_index_buffer(pipe, NULL);
+
+ void *vtx_shader = graw_parse_vertex_shader(pipe, particle_system_vert);
+ void *frag_shader = graw_parse_fragment_shader(pipe, particle_system_frag);
+ pipe->bind_vs_state(pipe, vtx_shader);
+ pipe->bind_fs_state(pipe, frag_shader);
+
+ /* Fill in particle data array */
+ struct pipe_transfer *vtx_transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &vtx_transfer);
+ srand(0);
+ for(int i = 0; i < NUM_PARTICLES; i++)
+ {
+ float *particleData = &vtx_logical[i * PARTICLE_SIZE];
+
+ // Lifetime of particle
+ (*particleData++) = ( (float)(rand() % 10000) / 10000.0f );
+
+ // End position of particle
+ (*particleData++) = ( (float)(rand() % 10000) / 5000.0f ) - 1.0f;
+ (*particleData++) = ( (float)(rand() % 10000) / 5000.0f ) - 1.0f;
+ (*particleData++) = ( (float)(rand() % 10000) / 5000.0f ) - 1.0f;
+
+ // Start position of particle
+ (*particleData++) = ( (float)(rand() % 10000) / 40000.0f ) - 0.125f;
+ (*particleData++) = ( (float)(rand() % 10000) / 40000.0f ) - 0.125f;
+ (*particleData++) = ( (float)(rand() % 10000) / 40000.0f ) - 0.125f;
+ }
+ pipe_buffer_unmap(pipe, vtx_transfer);
+
+ double prevTime = esNow();
+ float time = 1.0f;
+ for(int frame=0; frame<1000; ++frame)
+ {
+ float vs_const[2*4];
+ float fs_const[2*4];
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ double newTime = esNow();
+ time += newTime - prevTime;
+ prevTime = newTime;
+ if ( time >= 1.0f )
+ {
+ float centerPos[3];
+ float color[4];
+
+ time = 0.0f;
+
+ // Pick a new start location and color
+ centerPos[0] = ( (float)(rand() % 10000) / 10000.0f ) - 0.5f;
+ centerPos[1] = ( (float)(rand() % 10000) / 10000.0f ) - 0.5f;
+ centerPos[2] = ( (float)(rand() % 10000) / 10000.0f ) - 0.5f;
+
+ memcpy(&vs_const[0*4], &centerPos[0], 3*4);
+
+ // Random color
+ color[0] = ( (float)(rand() % 10000) / 20000.0f ) + 0.5f;
+ color[1] = ( (float)(rand() % 10000) / 20000.0f ) + 0.5f;
+ color[2] = ( (float)(rand() % 10000) / 20000.0f ) + 0.5f;
+ color[3] = 0.5;
+
+ memcpy(&fs_const[1*4], &color[0], 4*4);
+ }
+ vs_const[4] = time;
+
+ pipe->set_constant_buffer(pipe, PIPE_SHADER_VERTEX, 0, &(struct pipe_constant_buffer){
+ .user_buffer = vs_const,
+ .buffer_size = sizeof(vs_const)
+ });
+ pipe->set_constant_buffer(pipe, PIPE_SHADER_FRAGMENT, 0, &(struct pipe_constant_buffer){
+ .user_buffer = fs_const,
+ .buffer_size = sizeof(fs_const)
+ });
+
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 0,
+ .mode = PIPE_PRIM_POINTS,
+ .start = 0,
+ .count = NUM_PARTICLES
+ });
+
+#if 0
+ etna_dump_cmd_buffer(ctx);
+ exit(0);
+#endif
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
diff --git a/src/fb/ps_sandbox.c b/src/fb/ps_sandbox.c
new file mode 100644
index 0000000..f0d7739
--- /dev/null
+++ b/src/fb/ps_sandbox.c
@@ -0,0 +1,366 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* stencil_test implemented with etna_pipe
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "util/u_inlines.h"
+#include "write_bmp.h"
+#include "state_tracker/graw.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "dds.h"
+
+/*
+Usage: ps_sandbox vs.txt fs.txt
+
+Example vs.txt:
+
+ VERT
+ DCL IN[0]
+ DCL IN[1]
+ DCL OUT[0], POSITION
+ DCL OUT[1], GENERIC[0]
+ 0: MOV OUT[0], IN[0]
+ 1: MOV OUT[1], IN[1]
+ 2: END
+
+Example fs.txt:
+
+ FRAG
+ PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1
+ DCL IN[0], GENERIC[0]
+ DCL OUT[0], COLOR
+ DCL CONST[0]
+ DCL TEMP[0], LOCAL
+ IMM[0] FLT32 { 1.0, 0.0, 0.0, 1.0 }
+ 0: MOV TEMP[0].xy, IN[0].xyzw
+ 1: MOV TEMP[0].zw, IMM[0].xyzw
+ 2: MOV OUT[0], TEMP[0]
+ 3: END
+
+*/
+
+/*********************************************************************/
+
+const float vVertices[] = {
+ -1.0f, -1.0f, 0.0f, 1.0f,
+ 0.0f, 0.0f, 0.0f, 0.0f,
+
+ 1.0f, -1.0f, 0.0f, 1.0f,
+ 1.0f, 0.0f, 0.0f, 0.0f,
+
+ 1.0f, 1.0f, 0.0f, 1.0f,
+ 1.0f, 1.0f, 0.0f, 0.0f,
+
+ -1.0f, 1.0f, 0.0f, 1.0f,
+ 0.0f, 1.0f, 0.0f, 0.0f
+};
+
+#define VERTEX_STRIDE (8)
+#define NUM_VERTICES (sizeof(vVertices) / (sizeof(float)*VERTEX_STRIDE))
+
+static char* readfile(const char* path, unsigned* size)
+{
+ FILE* fp = fopen(path, "rb");
+ if (!fp) return NULL;
+
+ if (fseek(fp, 0, SEEK_END) != 0)
+ {
+ fclose(fp);
+ return NULL;
+ }
+ long fsize = ftell(fp);
+ if ((fsize <= 0)
+ || (fseek(fp, 0, SEEK_SET) != 0))
+ {
+ fclose(fp);
+ return NULL;
+ }
+
+ char* data = (char*)malloc(fsize + 1);
+ if (!data)
+ {
+ fclose(fp);
+ return NULL;
+ }
+
+ if (fread(data, fsize, 1, fp) != 1)
+ {
+ fclose(fp);
+ free(data);
+ return NULL;
+ }
+ data[fsize] = '\0';
+
+ fclose(fp);
+ if (size)
+ *size = (unsigned)fsize;
+ return data;
+}
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_S8_UINT_Z24_UNORM, width, height, 0);
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, sizeof(vVertices));
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* vertex / index buffer setup */
+ struct pipe_transfer *vtx_transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &vtx_transfer);
+ assert(vtx_logical);
+ memcpy(vtx_logical, vVertices, sizeof(vVertices));
+ pipe_buffer_unmap(pipe, vtx_transfer);
+
+ struct pipe_vertex_buffer vertex_buf_desc = {
+ .stride = VERTEX_STRIDE*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ };
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0*4,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32A32_FLOAT
+ },
+ { /* texcoord */
+ .src_offset = 4*4,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32A32_FLOAT
+ },
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+
+ /* compile gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 0,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA,
+ .colormask = 0xf
+ }
+ });
+
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .min_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_LINEAR,
+ .mag_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_NONE, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+
+ pipe->set_vertex_buffers(pipe, 0, 1, &vertex_buf_desc);
+
+ /* Load shaders */
+ if(argc < 3)
+ {
+ printf("Usage: ps_sandbox <vs.txt> <ps.txt>\n");
+ exit(1);
+ }
+ char *vert_text = readfile(argv[1], NULL);
+ if(vert_text == NULL)
+ {
+ printf("Could not load vertex shader %s\n", argv[1]);
+ exit(1);
+ }
+ char *frag_text = readfile(argv[2], NULL);
+ if(frag_text == NULL)
+ {
+ printf("Could not load vertex shader %s\n", argv[2]);
+ exit(1);
+ }
+ void *vtx_shader = graw_parse_vertex_shader(pipe, vert_text);
+ if(vtx_shader == NULL)
+ {
+ printf("Could not parse vertex shader %s\n", argv[1]);
+ exit(1);
+ }
+ void *frag_shader = graw_parse_fragment_shader(pipe, frag_text);
+ if(frag_shader == NULL)
+ {
+ printf("Could not parse fragment shader %s\n", argv[2]);
+ exit(1);
+ }
+ pipe->bind_vs_state(pipe, vtx_shader);
+ pipe->bind_fs_state(pipe, frag_shader);
+
+ void *dsa_bigquad = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 0,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = { .enabled = 0 },
+ .stencil[1] = { .enabled = 0 },
+ .alpha = { .enabled = 0 }
+ });
+
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa_bigquad);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 0.75f, 0x01);
+
+ float fs_const[4] = {frame / 1000.0f, -frame / 1000.0f, 0.0, 0.0f}; /* frame, for animation */
+ pipe->set_constant_buffer(pipe, PIPE_SHADER_FRAGMENT, 0, &(struct pipe_constant_buffer){
+ .user_buffer = fs_const,
+ .buffer_size = sizeof(fs_const)
+ });
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 0,
+ .mode = PIPE_PRIM_TRIANGLE_FAN,
+ .start = 0,
+ .count = 4 });
+
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
+
diff --git a/src/fb/rotate_cube.c b/src/fb/rotate_cube.c
new file mode 100644
index 0000000..d61e70f
--- /dev/null
+++ b/src/fb/rotate_cube.c
@@ -0,0 +1,431 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Rotating, animated cube. */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "util/u_inlines.h"
+#include "write_bmp.h"
+#include "state_tracker/graw.h"
+#include "fbdemos.h"
+#include "esTransform.h"
+
+/*********************************************************************/
+#define VERTEX_BUFFER_SIZE 0x60000
+
+static const char cube_vert[] =
+"VERT\n"
+"DCL IN[0]\n"
+"DCL IN[1]\n"
+"DCL IN[2]\n"
+"DCL OUT[0], POSITION\n"
+"DCL OUT[1], GENERIC[0]\n"
+"DCL CONST[0..10]\n"
+"DCL TEMP[0..4], LOCAL\n"
+"IMM[0] FLT32 { 2.0000, 20.0000, 1.0000, 0.0000}\n"
+" 0: MUL TEMP[0], CONST[3], IN[0].xxxx\n"
+" 1: MAD TEMP[0], CONST[4], IN[0].yyyy, TEMP[0]\n"
+" 2: MAD TEMP[0], CONST[5], IN[0].zzzz, TEMP[0]\n"
+" 3: MAD TEMP[0], CONST[6], IN[0].wwww, TEMP[0]\n"
+" 4: MUL TEMP[1], CONST[7], IN[0].xxxx\n"
+" 5: MAD TEMP[1], CONST[8], IN[0].yyyy, TEMP[1]\n"
+" 6: MAD TEMP[1], CONST[9], IN[0].zzzz, TEMP[1]\n"
+" 7: MAD TEMP[1], CONST[10], IN[0].wwww, TEMP[1]\n"
+" 8: RCP TEMP[2].x, TEMP[1].wwww\n"
+" 9: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[2].xxxx\n"
+" 10: ADD TEMP[1].xyz, IMM[0].xxyy, -TEMP[1].xyzz\n"
+" 11: MOV TEMP[2].w, IMM[0].zzzz\n"
+" 12: MUL TEMP[3].xyz, CONST[0].xyzz, IN[1].xxxx\n"
+" 13: MAD TEMP[3].xyz, CONST[1].xyzz, IN[1].yyyy, TEMP[3].xyzz\n"
+" 14: MAD TEMP[3].xyz, CONST[2].xyzz, IN[1].zzzz, TEMP[3].xyzz\n"
+" 15: DP3 TEMP[4].x, TEMP[1].xyzz, TEMP[1].xyzz\n"
+" 16: RSQ TEMP[4].x, TEMP[4].xxxx\n"
+" 17: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[4].xxxx\n"
+" 18: DP3 TEMP[1].x, TEMP[3].xyzz, TEMP[1].xyzz\n"
+" 19: MAX TEMP[1].x, IMM[0].wwww, TEMP[1].xxxx\n"
+" 20: MUL TEMP[2].xyz, TEMP[1].xxxx, IN[2].xyzz\n"
+" 21: MOV OUT[1], TEMP[2]\n"
+" 22: MOV OUT[0], TEMP[0]\n"
+" 23: END\n";
+
+static const char cube_frag[] =
+"FRAG\n"
+"PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n"
+"DCL IN[0], GENERIC[0], PERSPECTIVE\n"
+"DCL OUT[0], COLOR\n"
+" 0: MOV OUT[0], IN[0]\n"
+" 1: END\n";
+
+float vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+};
+
+float vColors[] = {
+ // front
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f, // magenta
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ // back
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 1.0f, 0.0f, // yellow
+ 0.0f, 1.0f, 0.0f, // green
+ // right
+ 1.0f, 0.0f, 1.0f, // magenta
+ 1.0f, 0.0f, 0.0f, // red
+ 1.0f, 1.0f, 1.0f, // white
+ 1.0f, 1.0f, 0.0f, // yellow
+ // left
+ 0.0f, 0.0f, 0.0f, // black
+ 0.0f, 0.0f, 1.0f, // blue
+ 0.0f, 1.0f, 0.0f, // green
+ 0.0f, 1.0f, 1.0f, // cyan
+ // top
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ 0.0f, 1.0f, 0.0f, // green
+ 1.0f, 1.0f, 0.0f, // yellow
+ // bottom
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f // magenta
+};
+
+float vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+};
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (6*4)
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* geometry */
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+
+ struct pipe_transfer *transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &transfer);
+ assert(vtx_logical);
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int src_idx = vert * COMPONENTS_PER_VERTEX;
+ int dest_idx = vert * COMPONENTS_PER_VERTEX * 3;
+ for(int comp=0; comp<COMPONENTS_PER_VERTEX; ++comp)
+ {
+ ((float*)vtx_logical)[dest_idx+comp+0] = vVertices[src_idx + comp]; /* 0 */
+ ((float*)vtx_logical)[dest_idx+comp+3] = vNormals[src_idx + comp]; /* 1 */
+ ((float*)vtx_logical)[dest_idx+comp+6] = vColors[src_idx + comp]; /* 2 */
+ }
+ }
+ pipe_buffer_unmap(pipe, transfer);
+
+ struct pipe_vertex_buffer vertex_buffer_desc = {
+ .stride = (3 + 3 + 3)*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ };
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0xc,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* texture coord */
+ .src_offset = 0x18,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ }
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+
+ /* compile other gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 0,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_ONE,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_ONE,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .colormask = 0xf
+ }
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_BACK, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* bind */
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+ pipe->set_vertex_buffers(pipe, 0, 1, &vertex_buffer_desc);
+ pipe->set_index_buffer(pipe, NULL);
+
+ void *vtx_shader = graw_parse_vertex_shader(pipe, cube_vert);
+ void *frag_shader = graw_parse_fragment_shader(pipe, cube_frag);
+ pipe->bind_vs_state(pipe, vtx_shader);
+ pipe->bind_fs_state(pipe, frag_shader);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ float vs_const[12*4];
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview, projection, modelviewprojection;
+ ESMatrix inverse, normal;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.5f, 0.0f, 0.0f, 1.0f);
+ float aspect = (float)(height) / (float)(width);
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 10.0f);
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+ esMatrixInverse3x3(&inverse, &modelview);
+ esMatrixTranspose(&normal, &inverse);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ memcpy(&vs_const[0*4], &normal.m[0][0], 3*4); /* CONST[0] */
+ memcpy(&vs_const[1*4], &normal.m[1][0], 3*4); /* CONST[1] */
+ memcpy(&vs_const[2*4], &normal.m[2][0], 3*4); /* CONST[2] */
+ memcpy(&vs_const[3*4], &modelviewprojection.m[0][0], 16*4); /* CONST[3..6] */
+ memcpy(&vs_const[7*4], &modelview.m[0][0], 16*4); /* CONST[7..10] */
+ pipe->set_constant_buffer(pipe, PIPE_SHADER_VERTEX, 0, &(struct pipe_constant_buffer){
+ .user_buffer = vs_const,
+ .buffer_size = sizeof(vs_const)
+ });
+
+ for(int prim=0; prim<6; ++prim)
+ {
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 0,
+ .mode = PIPE_PRIM_TRIANGLE_STRIP,
+ .start = prim*4,
+ .count = 4
+ });
+ }
+#if 0
+ etna_dump_cmd_buffer(ctx);
+ exit(1);
+#endif
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
diff --git a/src/fb/stencil_test.c b/src/fb/stencil_test.c
new file mode 100644
index 0000000..eea8463
--- /dev/null
+++ b/src/fb/stencil_test.c
@@ -0,0 +1,518 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* stencil_test implemented with etna_pipe
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "util/u_inlines.h"
+#include "write_bmp.h"
+#include "state_tracker/graw.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "dds.h"
+
+/*********************************************************************/
+#define VERTEX_BUFFER_SIZE 0x60000
+
+const float vVertices[] = {
+ -0.75f, 0.25f, 0.50f, // Quad #0
+ -0.25f, 0.25f, 0.50f,
+ -0.25f, 0.75f, 0.50f,
+ -0.75f, 0.75f, 0.50f,
+ 0.25f, 0.25f, 0.90f, // Quad #1
+ 0.75f, 0.25f, 0.90f,
+ 0.75f, 0.75f, 0.90f,
+ 0.25f, 0.75f, 0.90f,
+ -0.75f, -0.75f, 0.50f, // Quad #2
+ -0.25f, -0.75f, 0.50f,
+ -0.25f, -0.25f, 0.50f,
+ -0.75f, -0.25f, 0.50f,
+ 0.25f, -0.75f, 0.50f, // Quad #3
+ 0.75f, -0.75f, 0.50f,
+ 0.75f, -0.25f, 0.50f,
+ 0.25f, -0.25f, 0.50f,
+ -1.00f, -1.00f, 0.00f, // Big Quad
+ 1.00f, -1.00f, 0.00f,
+ 1.00f, 1.00f, 0.00f,
+ -1.00f, 1.00f, 0.00f
+};
+
+const uint8_t indices[][6] = {
+ { 0, 1, 2, 0, 2, 3 }, // Quad #0
+ { 4, 5, 6, 4, 6, 7 }, // Quad #1
+ { 8, 9, 10, 8, 10, 11 }, // Quad #2
+ { 12, 13, 14, 12, 14, 15 }, // Quad #3
+ { 16, 17, 18, 16, 18, 19 } // Big Quad
+};
+
+#define NumTests 4
+const float colors[NumTests][4] = {
+ { 1.0f, 0.0f, 0.0f, 1.0f },
+ { 0.0f, 1.0f, 0.0f, 1.0f },
+ { 0.0f, 0.0f, 1.0f, 1.0f },
+ { 1.0f, 1.0f, 0.0f, 1.0f }
+};
+
+uint32_t stencilValues[NumTests] = {
+ 0x7, // Result of test 0
+ 0x0, // Result of test 1
+ 0x2, // Result of test 2
+ 0xff // Result of test 3. We need to fill this
+ // value in a run-time
+};
+
+#define NUM_VERTICES (sizeof(vVertices) / (sizeof(float)*3))
+
+static const char stencil_test_vert[] =
+"VERT\n"
+"DCL IN[0]\n"
+"DCL OUT[0], POSITION\n"
+" 0: MOV OUT[0], IN[0]\n"
+" 1: END\n";
+
+static const char stencil_test_frag[] =
+"FRAG\n"
+"PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n"
+"DCL OUT[0], COLOR\n"
+"DCL CONST[0]\n"
+" 0: MOV OUT[0], CONST[0]\n"
+" 1: END\n";
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_S8_UINT_Z24_UNORM, width, height, 0);
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+ struct pipe_resource *idx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* vertex / index buffer setup */
+ struct pipe_transfer *vtx_transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &vtx_transfer);
+ assert(vtx_logical);
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int dest_idx = vert * 3;
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+0] = vVertices[vert*3 + comp]; /* 0 */
+ }
+ pipe_buffer_unmap(pipe, vtx_transfer);
+
+ struct pipe_transfer *idx_transfer = 0;
+ void *idx_logical = pipe_buffer_map(pipe, idx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &idx_transfer);
+ assert(idx_logical);
+ memcpy(idx_logical, indices, sizeof(indices));
+ pipe_buffer_unmap(pipe, idx_transfer);
+
+ struct pipe_vertex_buffer vertex_buf_desc = {
+ .stride = (3)*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ };
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+ struct pipe_index_buffer index_buf_desc = {
+ .index_size = 1,
+ .offset = 0,
+ .buffer = idx_resource,
+ .user_buffer = 0
+ };
+
+ /* compile gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 0,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA,
+ .colormask = 0xf
+ }
+ });
+
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .min_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_LINEAR,
+ .mag_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_NONE, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+
+ pipe->set_vertex_buffers(pipe, 0, 1, &vertex_buf_desc);
+ pipe->set_index_buffer(pipe, &index_buf_desc);
+
+ void *vtx_shader = graw_parse_vertex_shader(pipe, stencil_test_vert);
+ void *frag_shader = graw_parse_fragment_shader(pipe, stencil_test_frag);
+ pipe->bind_vs_state(pipe, vtx_shader);
+ pipe->bind_fs_state(pipe, frag_shader);
+
+ /* create depth stencil alpha states for the different test phases.
+ * except the stencil_ref, which is set separately
+ */
+ void *dsa_test0 = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = { /* single-sided stencil */
+ .enabled = 1,
+ .func = PIPE_FUNC_LESS,
+ .fail_op = PIPE_STENCIL_OP_REPLACE,
+ .zfail_op = PIPE_STENCIL_OP_DECR,
+ .zpass_op = PIPE_STENCIL_OP_DECR,
+ .valuemask = 0x03,
+ .writemask = 0xff
+ },
+ .stencil[1] = { .enabled = 0 },
+ .alpha = { .enabled = 0 }
+ });
+ void *dsa_test1 = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = { /* single-sided stencil */
+ .enabled = 1,
+ .func = PIPE_FUNC_GREATER,
+ .fail_op = PIPE_STENCIL_OP_KEEP,
+ .zfail_op = PIPE_STENCIL_OP_DECR,
+ .zpass_op = PIPE_STENCIL_OP_KEEP,
+ .valuemask = 0x03,
+ .writemask = 0xff
+ },
+ .stencil[1] = { .enabled = 0 },
+ .alpha = { .enabled = 0 }
+ });
+ void *dsa_test2 = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = { /* single-sided stencil */
+ .enabled = 1,
+ .func = PIPE_FUNC_EQUAL,
+ .fail_op = PIPE_STENCIL_OP_KEEP,
+ .zfail_op = PIPE_STENCIL_OP_INCR,
+ .zpass_op = PIPE_STENCIL_OP_INCR,
+ .valuemask = 0x03,
+ .writemask = 0xff
+ },
+ .stencil[1] = { .enabled = 0 },
+ .alpha = { .enabled = 0 }
+ });
+ void *dsa_test3 = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = { /* single-sided stencil */
+ .enabled = 1,
+ .func = PIPE_FUNC_EQUAL,
+ .fail_op = PIPE_STENCIL_OP_INVERT,
+ .zfail_op = PIPE_STENCIL_OP_KEEP,
+ .zpass_op = PIPE_STENCIL_OP_KEEP,
+ .valuemask = 0x01,
+ .writemask = 0xff
+ },
+ .stencil[1] = { .enabled = 0 },
+ .alpha = { .enabled = 0 }
+ });
+ void *dsa_bigquad = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = { /* single-sided stencil */
+ .enabled = 1,
+ .func = PIPE_FUNC_EQUAL,
+ .fail_op = PIPE_STENCIL_OP_KEEP,
+ .zfail_op = PIPE_STENCIL_OP_KEEP,
+ .zpass_op = PIPE_STENCIL_OP_KEEP,
+ .valuemask = 0xff,
+ .writemask = 0x00
+ },
+ .stencil[1] = { .enabled = 0 },
+ .alpha = { .enabled = 0 }
+ });
+
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa_test0);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 0.75f, 0x01);
+
+ // Test 0:
+ //
+ // Initialize upper-left region. In this case, the
+ // stencil-buffer values will be replaced because the
+ // stencil test for the rendered pixels will fail the
+ // stencil test, which is
+ //
+ // ref mask stencil mask
+ // ( 0x7 & 0x3 ) < ( 0x1 & 0x3 )
+ //
+ // The value in the stencil buffer for these pixels will
+ // be 0x7.
+ //
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa_test0);
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0x07,
+ .ref_value[1] = 0x07});
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 1,
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 0*6,
+ .count = 6 });
+
+ // Test 1:
+ //
+ // Initialize the upper-right region. Here, we'll decrement
+ // the stencil-buffer values where the stencil test passes
+ // but the depth test fails. The stencil test is
+ //
+ // ref mask stencil mask
+ // ( 0x3 & 0x3 ) > ( 0x1 & 0x3 )
+ //
+ // but where the geometry fails the depth test. The
+ // stencil values for these pixels will be 0x0.
+ //
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa_test1);
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0x03,
+ .ref_value[1] = 0x03});
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 1,
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 1*6,
+ .count = 6 });
+
+ // Test 2:
+ //
+ // Initialize the lower-left region. Here we'll increment
+ // (with saturation) the stencil value where both the
+ // stencil and depth tests pass. The stencil test for
+ // these pixels will be
+ //
+ // ref mask stencil mask
+ // ( 0x1 & 0x3 ) == ( 0x1 & 0x3 )
+ //
+ // The stencil values for these pixels will be 0x2.
+ //
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa_test2);
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0x01,
+ .ref_value[1] = 0x01});
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 1,
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 2*6,
+ .count = 6 });
+
+ // Test 3:
+ //
+ // Finally, initialize the lower-right region. We'll invert
+ // the stencil value where the stencil tests fails. The
+ // stencil test for these pixels will be
+ //
+ // ref mask stencil mask
+ // ( 0x2 & 0x1 ) == ( 0x1 & 0x1 )
+ //
+ // The stencil value here will be set to ~((2^s-1) & 0x1),
+ // (with the 0x1 being from the stencil clear value),
+ // where 's' is the number of bits in the stencil buffer
+ //
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa_test3);
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0x02,
+ .ref_value[1] = 0x02});
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 1,
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 3*6,
+ .count = 6 });
+
+ stencilValues[3] = ~(((1 << 8) - 1) & 0x1) & 0xff;
+
+ /* Bind depth stencil state for big quad */
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa_bigquad);
+ for(int idx=0; idx<NumTests; ++idx)
+ {
+ float fs_const[4];
+ /* material color */
+ memcpy(&fs_const[0], colors[idx], 4*4);
+ pipe->set_constant_buffer(pipe, PIPE_SHADER_FRAGMENT, 0, &(struct pipe_constant_buffer){
+ .user_buffer = fs_const,
+ .buffer_size = sizeof(fs_const)
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = stencilValues[idx],
+ .ref_value[1] = stencilValues[idx]});
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 1,
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 4*6,
+ .count = 6 });
+ }
+#if 0
+ etna_dump_cmd_buffer(ctx);
+ exit(0);
+#endif
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
+
diff --git a/src/fb/sync_cubox.sh b/src/fb/sync_cubox.sh
new file mode 100755
index 0000000..53d4c08
--- /dev/null
+++ b/src/fb/sync_cubox.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+TARGET=cubox
+
+rsync -zv alpha_blend cube_companion cubemap_sphere displacement etna_gears mip_cube particle_system rotate_cube stencil_test \
+ ps_sandbox downsample_test $TARGET:
+cd ../../../
+rsync -zar --include \*/ \
+ --include \*.c \
+ --include \*.h \
+ --include \*.py \
+ --include \*.xml \
+ --exclude \* etna_viv cubox:
+
diff --git a/src/fb/sync_gcw.sh b/src/fb/sync_gcw.sh
new file mode 100755
index 0000000..2e087cf
--- /dev/null
+++ b/src/fb/sync_gcw.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+TARGET=root@10.1.1.2
+
+rsync -zv alpha_blend cube_companion cubemap_sphere displacement etna_gears\
+ mip_cube particle_system rotate_cube stencil_test downsample_test ps_sandbox \
+ $TARGET:
+
diff --git a/src/fb/viv_profile.c b/src/fb/viv_profile.c
new file mode 100644
index 0000000..761f61c
--- /dev/null
+++ b/src/fb/viv_profile.c
@@ -0,0 +1,43 @@
+/* Get info about vivante device */
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <etnaviv/viv.h>
+#include <etnaviv/viv_profile.h>
+
+int main()
+{
+ struct viv_conn *conn = 0;
+ int rv;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ uint32_t num_profile_counters = viv_get_num_profile_counters();
+
+ uint32_t *counter_data = calloc(num_profile_counters, 4);
+ if(viv_read_profile_counters_3d(conn, counter_data) != 0)
+ {
+ fprintf(stderr, "Error querying counters (probably unsupported with this kernel, or not built into libetnaviv)\n");
+ exit(1);
+ }
+ for(uint32_t c=0; c<num_profile_counters; ++c)
+ {
+ struct viv_profile_counter_info *info = viv_get_profile_counter_info(c);
+ printf("[%d] %s %u\n", c, info->name, counter_data[c]);
+ }
+
+ return 0;
+}
+
diff --git a/src/fb_old/.gitignore b/src/fb_old/.gitignore
new file mode 100644
index 0000000..c870aed
--- /dev/null
+++ b/src/fb_old/.gitignore
@@ -0,0 +1,11 @@
+fbtest
+etna_test
+rotate_cube
+cube_companion_msaa
+mip_cube
+rstests
+mip_cube_raw
+alpha_blend
+cubemap_sphere
+stencil_test
+
diff --git a/src/fb_old/Makefile b/src/fb_old/Makefile
new file mode 100644
index 0000000..15aa6ea
--- /dev/null
+++ b/src/fb_old/Makefile
@@ -0,0 +1,37 @@
+TOP=..
+
+include $(TOP)/Makefile.inc
+
+COMMON_FLAGS += -I$(TOP)/resources -I$(TOP)/driver
+CFLAGS += $(COMMON_FLAGS)
+CXXFLAGS += $(COMMON_FLAGS)
+LDFLAGS += -lm ../driver/libetnadriver.a ../minigallium/libminigallium.a ../etnaviv/libetnaviv.a
+
+TARGETS = fbtest etna_test rotate_cube cube_companion rstests mip_cube_raw
+COMPANION_OBJS = ../resources/companion_array.o ../resources/companion_mesh.o ../resources/companion_texture.o
+ETNA_OBJS = ../lib/etna_bswap.o ../lib/fbdemos.o
+
+all: cube_companion_msaa
+
+clean:
+ rm -f *.o ../lib/*.o
+ rm -f $(TARGETS)
+
+fbtest: fbtest.o ../lib/write_bmp.o $(ETNA_OBJS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+etna_test: etna_test.o ../lib/write_bmp.o $(ETNA_OBJS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+rotate_cube: rotate_cube.o ../lib/write_bmp.o $(ETNA_OBJS) ../lib/esTransform.o
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+mip_cube_raw: mip_cube_raw.o ../lib/write_bmp.o ../lib/esTransform.o ../lib/dds.o $(ETNA_OBJS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+cube_companion_msaa: cube_companion.o ../lib/write_bmp.o ../lib/esTransform.o $(COMPANION_OBJS) $(ETNA_OBJS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+rstests: rstests.o ../lib/write_bmp.o ../lib/esTransform.o $(COMPANION_OBJS) $(ETNA_OBJS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
diff --git a/src/fb_old/cube_companion.c b/src/fb_old/cube_companion.c
new file mode 100644
index 0000000..4cbbaff
--- /dev/null
+++ b/src/fb_old/cube_companion.c
@@ -0,0 +1,687 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Animated rotating "weighted companion cube", using array or indexed rendering
+ * Exercised in this demo:
+ * - Array and indexed rendering of arbitrary mesh
+ * - Video memory allocation
+ * - Setting up render state
+ * - Depth buffer
+ * - Vertex / fragment shader
+ * - Texturing
+ * - Double-buffered rendering to framebuffer
+ * - Anti-aliasing (MSAA)
+ *
+ * Still TODO:
+ * - Mipmapping (hw generation, if possible)
+ * - Cube map textures
+ * - Decrease verbosity by grouping often-used commands
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+
+#include <errno.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_rs.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_util.h>
+
+#include "write_bmp.h"
+
+#include "etna_pipe.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+
+#include "companion.h"
+
+//#define TEST_PATTERN /* Upload test pattern instead of texture */
+//#define EXTRA_DELAYS /* Insert extra delays (that blob does but appear unnecessary on my hw for this demo) */
+#define INDEXED /* Used indexed rendering */
+#define INDEX_BUFFER_SIZE 0x8000
+#define VERTEX_BUFFER_SIZE 0x60000
+uint32_t vs[] = {
+ 0x01831009, 0x00000000, 0x00000000, 0x203fc048,
+ 0x02031009, 0x00000000, 0x00000000, 0x203fc058,
+ 0x07841003, 0x39000800, 0x00000050, 0x00000000,
+ 0x07841002, 0x39001800, 0x00aa0050, 0x00390048,
+ 0x07841002, 0x39002800, 0x01540050, 0x00390048,
+ 0x07841002, 0x39003800, 0x01fe0050, 0x00390048,
+ 0x03851003, 0x29004800, 0x000000d0, 0x00000000,
+ 0x03851002, 0x29005800, 0x00aa00d0, 0x00290058,
+ 0x03811002, 0x29006800, 0x015400d0, 0x00290058,
+ 0x07851003, 0x39007800, 0x00000050, 0x00000000,
+ 0x07851002, 0x39008800, 0x00aa0050, 0x00390058,
+ 0x07851002, 0x39009800, 0x01540050, 0x00390058,
+ 0x07801002, 0x3900a800, 0x01fe0050, 0x00390058,
+ 0x0401100c, 0x00000000, 0x00000000, 0x003fc008,
+ 0x03801002, 0x69000800, 0x01fe00c0, 0x00290038,
+ 0x03831005, 0x29000800, 0x01480040, 0x00000000,
+ 0x0383100d, 0x00000000, 0x00000000, 0x00000038,
+ 0x03801003, 0x29000800, 0x014801c0, 0x00000000,
+ 0x00801005, 0x29001800, 0x01480040, 0x00000000,
+ 0x0380108f, 0x3fc06800, 0x00000050, 0x203fc068,
+ 0x04001009, 0x00000000, 0x00000000, 0x200000b8,
+ 0x01811009, 0x00000000, 0x00000000, 0x00150028,
+ 0x02041001, 0x2a804800, 0x00000000, 0x003fc048,
+ 0x02041003, 0x2a804800, 0x00aa05c0, 0x00000002,
+};
+#if 1
+uint32_t ps[] = { /* texture sampling */
+ 0x07811003, 0x00000800, 0x01c800d0, 0x00000000,
+ 0x07821018, 0x15002f20, 0x00000000, 0x00000000,
+ 0x07811003, 0x39001800, 0x01c80140, 0x00000000,
+};
+#else
+uint32_t ps[] = { /* passthrough */
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000
+};
+#endif
+
+size_t vs_size = sizeof(vs);
+size_t ps_size = sizeof(ps);
+
+int main(int argc, char **argv)
+{
+ int width, height;
+ int width_s, height_s;
+ int padded_width, padded_height;
+ int backbuffer = 0;
+ int supersample_x = 2; // 1 or 2
+ int supersample_y = 2; // 1 or 2
+ int extra_ps_inputs = 0;
+
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ width = fbs->width;
+ height = fbs->height;
+ struct viv_conn *conn = fbs->conn;
+
+ bool supertiled = VIV_FEATURE(conn, chipMinorFeatures0,SUPER_TILED);
+ unsigned bits_per_tile = VIV_FEATURE(conn, chipMinorFeatures0,2BITPERTILE)?2:4;
+ printf("supertiled: %i bits per tile: %i\n", supertiled, bits_per_tile);
+
+ width_s = width * supersample_x;
+ height_s = height * supersample_y;
+ padded_width = etna_align_up(width_s, 64);
+ padded_height = etna_align_up(height_s, 64);
+ extra_ps_inputs = (supersample_x > 1 || supersample_y > 1); // in case of supersample, there is an extra input to PS
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+
+ struct etna_vidmem *rt = 0; /* main render target */
+ struct etna_vidmem *rt_ts = 0; /* tile status for main render target */
+ struct etna_vidmem *z = 0; /* depth for main render target */
+ struct etna_vidmem *z_ts = 0; /* depth ts for main render target */
+ struct etna_vidmem *vtx = 0; /* vertex buffer */
+ struct etna_vidmem *idx = 0; /* index buffer */
+ struct etna_vidmem *aux_rt = 0; /* auxilary render target */
+ struct etna_vidmem *aux_rt_ts = 0; /* tile status for auxilary render target */
+ struct etna_vidmem *tex = 0; /* texture */
+ struct etna_vidmem *bmp = 0; /* bitmap */
+
+ /* TODO: anti aliasing (doubles width/height) */
+ size_t rt_size = padded_width * padded_height * 4;
+ size_t rt_ts_size = etna_align_up((padded_width * padded_height * 4)*bits_per_tile/0x80, 0x100);
+ size_t z_size = padded_width * padded_height * 2;
+ size_t z_ts_size = etna_align_up((padded_width * padded_height * 2)*bits_per_tile/0x80, 0x100);
+ size_t bmp_size = width * height * 4;
+
+ if(etna_vidmem_alloc_linear(conn, &rt, rt_size, VIV_SURF_RENDER_TARGET, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &rt_ts, rt_ts_size, VIV_SURF_TILE_STATUS, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z, z_size, VIV_SURF_DEPTH, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z_ts, z_ts_size, VIV_SURF_TILE_STATUS, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &vtx, VERTEX_BUFFER_SIZE, VIV_SURF_VERTEX, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &idx, INDEX_BUFFER_SIZE, VIV_SURF_INDEX, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &aux_rt, 0x4000, VIV_SURF_RENDER_TARGET, VIV_POOL_SYSTEM, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &aux_rt_ts, 0x100, VIV_SURF_TILE_STATUS, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &tex, 0x100000, VIV_SURF_TEXTURE, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &bmp, bmp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK
+ )
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ memset(vtx->logical, 0, 0x5ef80);
+#ifndef INDEXED
+ printf("Interleaving vertices...\n");
+ float *vertices_array = companion_vertices_array();
+ float *texture_coordinates_array =
+ companion_texture_coordinates_array();
+ float *normals_array = companion_normals_array();
+ assert(COMPANION_ARRAY_COUNT*(3+3+2)*sizeof(float) < VERTEX_BUFFER_SIZE);
+ for(int vert=0; vert<COMPANION_ARRAY_COUNT; ++vert)
+ {
+ int dest_idx = vert * (3 + 3 + 2);
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx->logical)[dest_idx+comp+0] = vertices_array[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx->logical)[dest_idx+comp+3] = normals_array[vert*3 + comp]; /* 1 */
+ for(int comp=0; comp<2; ++comp)
+ ((float*)vtx->logical)[dest_idx+comp+6] = texture_coordinates_array[vert*2 + comp]; /* 2 */
+ }
+#else
+ printf("Interleaving vertices and copying index buffer...\n");
+ assert(COMPANION_VERTEX_COUNT*(3+3+2)*sizeof(float) < VERTEX_BUFFER_SIZE);
+ for(int vert=0; vert<COMPANION_VERTEX_COUNT; ++vert)
+ {
+ int dest_idx = vert * (3 + 3 + 2);
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx->logical)[dest_idx+comp+0] = companion_vertices[vert][comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx->logical)[dest_idx+comp+3] = companion_normals[vert][comp]; /* 1 */
+ for(int comp=0; comp<2; ++comp)
+ ((float*)vtx->logical)[dest_idx+comp+6] = companion_texture_coordinates[vert][comp]; /* 2 */
+ }
+ assert(COMPANION_TRIANGLE_COUNT*3*sizeof(unsigned short) < INDEX_BUFFER_SIZE);
+ memcpy(idx->logical, &companion_triangles[0][0], COMPANION_TRIANGLE_COUNT*3*sizeof(unsigned short));
+#endif
+ /* Fill in texture (convert from RGB linear to tiled) */
+#define TILE_WIDTH (4)
+#define TILE_HEIGHT (4)
+#define TILE_WORDS (TILE_WIDTH*TILE_HEIGHT)
+ unsigned ytiles = COMPANION_TEXTURE_HEIGHT / TILE_HEIGHT;
+ unsigned xtiles = COMPANION_TEXTURE_WIDTH / TILE_WIDTH;
+ unsigned dst_stride = xtiles * TILE_WORDS;
+
+ for(unsigned ty=0; ty<ytiles; ++ty)
+ {
+ for(unsigned tx=0; tx<xtiles; ++tx)
+ {
+ unsigned ofs = ty * dst_stride + tx * TILE_WORDS;
+ for(unsigned y=0; y<TILE_HEIGHT; ++y)
+ {
+ for(unsigned x=0; x<TILE_WIDTH; ++x)
+ {
+ unsigned srcy = ty*TILE_HEIGHT + y;
+ unsigned srcx = tx*TILE_WIDTH + x;
+ unsigned src_ofs = (srcy*COMPANION_TEXTURE_WIDTH+srcx)*3;
+ unsigned r,g,b,a;
+#ifndef TEST_PATTERN /* actual texture */
+ r = ((uint8_t*)companion_texture)[src_ofs+0];
+ g = ((uint8_t*)companion_texture)[src_ofs+1];
+ b = ((uint8_t*)companion_texture)[src_ofs+2];
+#else /* test pattern */
+ r = srcx; g = srcy; b = 0;
+#endif
+ a = 255;
+
+ ((uint32_t*)tex->logical)[ofs] = ((a&0xFF) << 24) | ((b&0xFF) << 16) | ((g&0xFF) << 8) | (r&0xFF);
+ ofs += 1;
+ }
+ }
+ }
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+ /* XXX part of this can be put outside the loop, but until we have usable context management
+ * this is safest.
+ */
+ etna_set_state(ctx, VIVS_GL_VERTEX_ELEMENT_CONFIG, 0x1);
+ etna_set_state(ctx, VIVS_RA_CONTROL, 0x1);
+ etna_set_state(ctx, VIVS_PA_W_CLIP_LIMIT, 0x34000001);
+ etna_set_state(ctx, VIVS_PA_SYSTEM_MODE, 0x11);
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_UNK22, 0));
+ etna_set_state(ctx, VIVS_SE_CONFIG, 0x0);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+
+ etna_set_state(ctx, VIVS_PE_ALPHA_CONFIG,
+ ETNA_MASKED_BIT(VIVS_PE_ALPHA_CONFIG_BLEND_ENABLE_COLOR, 0) &
+ ETNA_MASKED_BIT(VIVS_PE_ALPHA_CONFIG_BLEND_SEPARATE_ALPHA, 0) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR, BLEND_FUNC_ONE) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA, BLEND_FUNC_ONE) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR, BLEND_FUNC_ZERO) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA, BLEND_FUNC_ZERO) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_EQ_COLOR, BLEND_EQ_ADD) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_EQ_ALPHA, BLEND_EQ_ADD));
+ etna_set_state(ctx, VIVS_PE_ALPHA_BLEND_COLOR,
+ VIVS_PE_ALPHA_BLEND_COLOR_B(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_G(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_R(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_A(0));
+ etna_set_state(ctx, VIVS_PE_ALPHA_OP, ETNA_MASKED_BIT(VIVS_PE_ALPHA_OP_ALPHA_TEST, 0));
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_CULL_FACE_MODE, CCW));
+ etna_set_state(ctx, VIVS_PE_STENCIL_CONFIG, ETNA_MASKED(VIVS_PE_STENCIL_CONFIG_REF_FRONT, 0) &
+ ETNA_MASKED(VIVS_PE_STENCIL_CONFIG_MASK_FRONT, 0xff) &
+ ETNA_MASKED(VIVS_PE_STENCIL_CONFIG_WRITE_MASK, 0xff) &
+ ETNA_MASKED_INL(VIVS_PE_STENCIL_CONFIG_MODE, DISABLED));
+ etna_set_state(ctx, VIVS_PE_STENCIL_OP, ETNA_MASKED(VIVS_PE_STENCIL_OP_FUNC_FRONT, COMPARE_FUNC_ALWAYS) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_FUNC_BACK, COMPARE_FUNC_ALWAYS) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_FAIL_FRONT, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_FAIL_BACK, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_PASS_FRONT, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_PASS_BACK, STENCIL_OP_KEEP));
+
+ etna_set_state(ctx, VIVS_SE_DEPTH_SCALE, 0x0);
+ etna_set_state(ctx, VIVS_SE_DEPTH_BIAS, 0x0);
+
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_FILL_MODE, SOLID) &
+ ETNA_MASKED_INL(VIVS_PA_CONFIG_SHADE_MODEL, SMOOTH));
+
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT,
+ ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 0) &
+ ETNA_MASKED(VIVS_PE_COLOR_FORMAT_COMPONENTS, 0xf) &
+ ETNA_MASKED(VIVS_PE_COLOR_FORMAT_FORMAT, RS_FORMAT_X8R8G8B8) &
+ ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_SUPER_TILED, supertiled));
+
+ etna_set_state(ctx, VIVS_PE_COLOR_ADDR, rt->address);
+ etna_set_state(ctx, VIVS_PE_COLOR_STRIDE, padded_width * 4);
+
+ uint32_t ts_msaa_config;
+ if(supersample_x == 2 && supersample_y == 2)
+ {
+ // 4X MSAA
+ etna_set_state(ctx, VIVS_GL_MULTI_SAMPLE_CONFIG,
+ ETNA_MASKED_INL(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES, 4X) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES, 0xf) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12, 0x0) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16, 0x0)
+ );
+ etna_set_state(ctx, VIVS_RA_MULTISAMPLE_UNK00E04, 0x0);
+ etna_set_state(ctx, VIVS_RA_MULTISAMPLE_UNK00E10(2), 0xaaa22a22);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(8), 0x262a2288);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(9), 0x886688a2);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(10), 0x888866aa);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(11), 0x668888a6);
+ etna_set_state(ctx, VIVS_RA_MULTISAMPLE_UNK00E10(1), 0xe6ae622a);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(4), 0x46622a88);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(5), 0x888888ae);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(6), 0x888888e6);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(7), 0x888888ca);
+ etna_set_state(ctx, VIVS_RA_MULTISAMPLE_UNK00E10(0), 0xeaa26e26);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(0), 0x4a6e2688);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(1), 0x888888a2);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(2), 0x888888ea);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(3), 0x888888c6);
+ ts_msaa_config = VIVS_TS_MEM_CONFIG_MSAA | VIVS_TS_MEM_CONFIG_MSAA_FORMAT_A8R8G8B8;
+ } else if(supersample_x == 2 && supersample_y == 1)
+ {
+ // 2X MSAA
+ etna_set_state(ctx, VIVS_GL_MULTI_SAMPLE_CONFIG,
+ ETNA_MASKED_INL(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES, 2X) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES, 0xf) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12, 0x0) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16, 0x0)
+ );
+ etna_set_state(ctx, VIVS_RA_MULTISAMPLE_UNK00E04, 0x0);
+ etna_set_state(ctx, VIVS_RA_MULTISAMPLE_UNK00E10(0), 0xaa22);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(0), 0x66aa2288);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(1), 0x88558800);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(2), 0x88881100);
+ etna_set_state(ctx, VIVS_RA_CENTROID_TABLE(3), 0x33888800);
+ ts_msaa_config = VIVS_TS_MEM_CONFIG_MSAA | VIVS_TS_MEM_CONFIG_MSAA_FORMAT_A8R8G8B8;
+ } else { // No multisampling
+ etna_set_state(ctx, VIVS_GL_MULTI_SAMPLE_CONFIG,
+ ETNA_MASKED_INL(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES, NONE) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES, 0xf) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12, 0x0) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16, 0x0)
+ );
+ ts_msaa_config = 0;
+ }
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_CLEAR_VALUE, 0);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address);
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address);
+
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG,
+ ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0) &
+ ETNA_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT, D16) &
+ ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_SUPER_TILED, supertiled) &
+ ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 1));
+ etna_set_state(ctx, VIVS_PE_DEPTH_ADDR, z->address);
+ etna_set_state(ctx, VIVS_PE_DEPTH_STRIDE, padded_width * 2);
+ etna_set_state(ctx, VIVS_PE_HDEPTH_CONTROL, VIVS_PE_HDEPTH_CONTROL_FORMAT_DISABLED);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(ctx, VIVS_TS_DEPTH_CLEAR_VALUE, 0xffffffff);
+ etna_set_state(ctx, VIVS_TS_DEPTH_STATUS_BASE, z_ts->address);
+ etna_set_state(ctx, VIVS_TS_DEPTH_SURFACE_BASE, z->address);
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION |
+ ts_msaa_config);
+
+#ifdef EXTRA_DELAYS
+ /* Warm up RS on aux render target (is this needed?) */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts_physical);
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt_physical);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(ctx, aux_rt_physical, aux_rt_ts_physical);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts_physical);
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt_physical);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(ctx, aux_rt_physical, aux_rt_ts_physical);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts_physical);
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt_physical);
+#endif
+ /* sync rasterizer to pixel engine after changes to PE config */
+ etna_stall(ctx, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
+
+ /* Set up the resolve to clear tile status for main render target and depth
+ * Regard the TS as an image of width 16 with 4 bytes per pixel (64 bytes per row)
+ * */
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_A8R8G8B8)
+ );
+ etna_set_state_multi(ctx, VIVS_RS_DITHER(0), 2, (uint32_t[]){0xffffffff, 0xffffffff});
+ etna_set_state(ctx, VIVS_RS_FILL_VALUE(0), (bits_per_tile==4)?0x11111111:0x55555555);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL,
+ VIVS_RS_CLEAR_CONTROL_MODE_ENABLED1 |
+ (0xffff << VIVS_RS_CLEAR_CONTROL_BITS__SHIFT));
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0);
+ /* clear color ts */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt_ts->address);
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, 0x40);
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ ((rt_ts_size/0x40) << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (16 << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+ /* clear depth ts */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, z_ts->address);
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, 0x40);
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ ((z_ts_size/0x40) << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (16 << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+ /** Done */
+
+ etna_set_state(ctx, VIVS_TS_COLOR_CLEAR_VALUE, 0xff7f7f7f);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address);
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ /* depth setup */
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 1) &
+ ETNA_MASKED(VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC, COMPARE_FUNC_LESS) &
+ ETNA_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_MODE, Z) &
+ ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_ONLY_DEPTH, 0));
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NEAR, 0.0);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_FAR, 1.0);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+
+ /* set up primitive assembly and setup engine */
+ etna_set_state_f32(ctx, VIVS_PA_VIEWPORT_OFFSET_Z, 0.0);
+ etna_set_state_f32(ctx, VIVS_PA_VIEWPORT_SCALE_Z, 1.0);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_OFFSET_X, width << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_OFFSET_Y, height << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_SCALE_X, width << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_SCALE_Y, height << 15);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_LEFT, 0);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_TOP, 0);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_RIGHT, (width << 16) | 5);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_BOTTOM, (height << 16) | 5);
+
+ /* set up texture unit */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_TEXTURE);
+ etna_set_state(ctx, VIVS_TE_SAMPLER_SIZE(0),
+ VIVS_TE_SAMPLER_SIZE_WIDTH(512)|VIVS_TE_SAMPLER_SIZE_HEIGHT(512));
+ etna_set_state(ctx, VIVS_TE_SAMPLER_LOG_SIZE(0),
+ VIVS_TE_SAMPLER_LOG_SIZE_WIDTH(9<<5) |
+ VIVS_TE_SAMPLER_LOG_SIZE_HEIGHT(9<<5));
+ etna_set_state(ctx, VIVS_TE_SAMPLER_LOD_ADDR(0,0), tex->address);
+ etna_set_state(ctx, VIVS_TE_SAMPLER_CONFIG0(0),
+ VIVS_TE_SAMPLER_CONFIG0_TYPE(TEXTURE_TYPE_2D)|
+ VIVS_TE_SAMPLER_CONFIG0_UWRAP(TEXTURE_WRAPMODE_CLAMP_TO_EDGE)|
+ VIVS_TE_SAMPLER_CONFIG0_VWRAP(TEXTURE_WRAPMODE_CLAMP_TO_EDGE)|
+ VIVS_TE_SAMPLER_CONFIG0_MIN(TEXTURE_FILTER_LINEAR)|
+ VIVS_TE_SAMPLER_CONFIG0_MIP(TEXTURE_FILTER_NONE)|
+ VIVS_TE_SAMPLER_CONFIG0_MAG(TEXTURE_FILTER_LINEAR)|
+ VIVS_TE_SAMPLER_CONFIG0_FORMAT(TEXTURE_FORMAT_X8R8G8B8));
+ etna_set_state(ctx, VIVS_TE_SAMPLER_LOD_CONFIG(0), 0x00000000); /* TE.SAMPLER[0].LOD_CONFIG := 0x0 */
+
+ /* shader setup */
+ etna_set_state(ctx, VIVS_VS_END_PC, vs_size/16);
+ etna_set_state_multi(ctx, VIVS_VS_INPUT_COUNT, 3, (uint32_t[]){
+ /* VIVS_VS_INPUT_COUNT */ VIVS_VS_INPUT_COUNT_UNK8(1) | VIVS_VS_INPUT_COUNT_COUNT(3),
+ /* VIVS_VS_TEMP_REGISTER_CONTROL */ VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS(6),
+ /* VIVS_VS_OUTPUT(0) */ 0x10004});
+ etna_set_state(ctx, VIVS_VS_START_PC, 0x0);
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(45), 0.5); /* u11.y */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(44), 1.0); /* u11.x */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(27), 0.0); /* u6.w */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(23), 20.0); /* u5.w */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(19), 2.0); /* u4.w */
+
+ /* Now load the shader itself */
+ etna_set_state_multi(ctx, VIVS_VS_INST_MEM(0), vs_size/4, vs);
+ etna_set_state(ctx, VIVS_RA_CONTROL, 0x3);
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(0), 1.0); /* u0.x */
+ etna_set_state_multi(ctx, VIVS_PS_END_PC, 2, (uint32_t[]){
+ /* VIVS_PS_END_PC */ ps_size/16,
+ /* VIVS_PS_OUTPUT_REG */ 0x1});
+ etna_set_state(ctx, VIVS_PS_START_PC, 0x0);
+ etna_set_state(ctx, VIVS_PA_ATTRIBUTE_ELEMENT_COUNT, 0x200);
+ etna_set_state(ctx, VIVS_PA_SHADER_ATTRIBUTES(0), 0x200);
+ etna_set_state(ctx, VIVS_PA_SHADER_ATTRIBUTES(1), 0x200);
+ etna_set_state(ctx, VIVS_GL_VARYING_NUM_COMPONENTS,
+ VIVS_GL_VARYING_NUM_COMPONENTS_VAR0(4)| /* position */
+ VIVS_GL_VARYING_NUM_COMPONENTS_VAR1(2) /* texture coordinate */
+ );
+ etna_set_state_multi(ctx, VIVS_GL_VARYING_COMPONENT_USE(0), 2, (uint32_t[]){
+ VIVS_GL_VARYING_COMPONENT_USE_COMP0(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP1(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP2(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP3(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP4(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP5(VARYING_COMPONENT_USE_USED)
+ , 0
+ });
+ etna_set_state_multi(ctx, VIVS_PS_INST_MEM(0), ps_size/4, ps);
+ etna_set_state(ctx, VIVS_PS_INPUT_COUNT,
+ VIVS_PS_INPUT_COUNT_UNK8(31)| VIVS_PS_INPUT_COUNT_COUNT(3 + extra_ps_inputs));
+ etna_set_state(ctx, VIVS_PS_TEMP_REGISTER_CONTROL,
+ VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS(3 + extra_ps_inputs));
+ etna_set_state(ctx, VIVS_PS_CONTROL, VIVS_PS_CONTROL_UNK1);
+ etna_set_state(ctx, VIVS_GL_VARYING_TOTAL_COMPONENTS,
+ VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM(6)); /* 4+2=6 total varying components */
+ etna_set_state(ctx, VIVS_VS_LOAD_BALANCING, 0xf3f0542); /* depends on number of inputs/outputs/varyings? XXX how exactly */
+ etna_set_state(ctx, VIVS_VS_OUTPUT_COUNT, 3);
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_POINT_SIZE_ENABLE, 0));
+
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -9.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.5f, 0.0f, 0.0f, 1.0f);
+ esScale(&modelview, 0.475f, 0.475f, 0.475f);
+ float aspect = (float)(height) / (float)(width);
+ ESMatrix projection;
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 10.0f);
+ ESMatrix modelviewprojection;
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+ ESMatrix inverse, normal; /* compute inverse transpose normal transformation matrix */
+ esMatrixInverse3x3(&inverse, &modelview);
+ esMatrixTranspose(&normal, &inverse);
+
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(0), 16, (uint32_t*)&modelviewprojection.m[0][0]);
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(16), 3, (uint32_t*)&normal.m[0][0]); /* u4.xyz */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(20), 3, (uint32_t*)&normal.m[1][0]); /* u5.xyz */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(24), 3, (uint32_t*)&normal.m[2][0]); /* u6.xyz */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(28), 16, (uint32_t*)&modelview.m[0][0]);
+#ifdef INDEXED
+ etna_set_state(ctx, VIVS_FE_INDEX_STREAM_BASE_ADDR, idx->address);
+ etna_set_state(ctx, VIVS_FE_INDEX_STREAM_CONTROL, VIVS_FE_INDEX_STREAM_CONTROL_TYPE_UNSIGNED_SHORT);
+#endif
+ etna_set_state(ctx, VIVS_FE_VERTEX_STREAM_BASE_ADDR, vtx->address);
+ etna_set_state(ctx, VIVS_FE_VERTEX_STREAM_CONTROL,
+ FE_VERTEX_STREAM_CONTROL_VERTEX_STRIDE((3 + 3 + 2)*4));
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(0),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM(0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM(3) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_START(0x0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_END(0xc));
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(1),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM(0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM(3) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_START(0xc) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_END(0x18));
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(2),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NONCONSECUTIVE |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM(0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM(2) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_START(0x18) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_END(0x20));
+ etna_set_state(ctx, VIVS_VS_INPUT(0), 0x20100);
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_POINT_SPRITE_ENABLE, 0));
+
+#ifdef INDEXED
+ etna_draw_indexed_primitives(ctx, PRIMITIVE_TYPE_TRIANGLES, 0, COMPANION_TRIANGLE_COUNT, 0);
+#else
+ etna_draw_primitives(ctx, PRIMITIVE_TYPE_TRIANGLES, 0, COMPANION_TRIANGLE_COUNT);
+#endif
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+#ifdef EXTRA_DELAYS
+ etna_flush(ctx);
+#endif
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_DEST_TILED);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | (supertiled?VIVS_RS_SOURCE_STRIDE_TILING:0));
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, (padded_width * 4 * 4) | (supertiled?VIVS_RS_SOURCE_STRIDE_TILING:0));
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0);
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address);
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt->address);
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(padded_height) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(padded_width));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+#ifdef EXTRA_DELAYS
+ etna_flush(ctx);
+
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+#endif
+
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address);
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+
+ /* Wait for pixel engine to finish */
+#ifdef EXTRA_DELAYS
+ etna_finish(ctx);
+#else
+ etna_stall(ctx, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE);
+#endif
+
+ /* Copy result to framebuffer */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ ((supersample_x>1)?VIVS_RS_CONFIG_DOWNSAMPLE_X:0) |
+ ((supersample_y>1)?VIVS_RS_CONFIG_DOWNSAMPLE_Y:0) |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_SWAP_RB);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | (supertiled?VIVS_RS_SOURCE_STRIDE_TILING:0));
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, fbs->fb.fb_fix.line_length);
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0);
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address);
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, fbs->fb.physical[backbuffer]);
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(height * supersample_y) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(width * supersample_x));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+ etna_finish(ctx);
+
+ /* switch buffers */
+ fb_set_buffer(&fbs->fb, backbuffer);
+ backbuffer = 1-backbuffer;
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/fb_old/etna_test.c b/src/fb_old/etna_test.c
new file mode 100644
index 0000000..8904b6f
--- /dev/null
+++ b/src/fb_old/etna_test.c
@@ -0,0 +1,513 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* shader playground using etna_* functions,
+ * more high-level command-buffer building with synchronization
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include <linux/fb.h>
+#include <errno.h>
+
+#include "common.xml.h"
+#include "state.xml.h"
+#include "state_3d.xml.h"
+#include "cmdstream.xml.h"
+
+#include "write_bmp.h"
+#include "viv.h"
+#include "etna.h"
+#include "etna_rs.h"
+#include "etna_fb.h"
+#include "etna_mem.h"
+#include "etna_util.h"
+
+#include "esTransform.h"
+
+GLfloat vVertices[] = {
+ -1.0f, -1.0f, +0.0f,
+ +1.0f, -1.0f, +0.0f,
+ -1.0f, +1.0f, +0.0f,
+ +1.0f, +1.0f, +0.0f,
+};
+
+GLfloat vTexCoords[] = {
+ +0.0f, +0.0f,
+ +1.0f, +0.0f,
+ +0.0f, +1.0f,
+ +1.0f, +1.0f,
+};
+
+#define VERTEX_BUFFER_SIZE 0x60000
+
+#define NUM_VERTICES (4)
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 256;
+ int padded_width, padded_height;
+ int backbuffer = 0;
+
+ struct fb_info fb;
+ rv = fb_open(0, &fb);
+ if(rv!=0)
+ {
+ exit(1);
+ }
+ width = fb.fb_var.xres;
+ height = fb.fb_var.yres;
+ padded_width = etna_align_up(width, 64);
+ padded_height = etna_align_up(height, 64);
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ struct etna_vidmem *rt = 0; /* main render target */
+ struct etna_vidmem *rt_ts = 0; /* tile status for main render target */
+ struct etna_vidmem *z = 0; /* depth for main render target */
+ struct etna_vidmem *z_ts = 0; /* depth ts for main render target */
+ struct etna_vidmem *vtx = 0; /* vertex buffer */
+ struct etna_vidmem *aux_rt = 0; /* auxilary render target */
+ struct etna_vidmem *aux_rt_ts = 0; /* tile status for auxilary render target */
+ struct etna_vidmem *bmp = 0; /* bitmap */
+
+ size_t rt_size = padded_width * padded_height * 4;
+ size_t rt_ts_size = etna_align_up((padded_width * padded_height * 4)/0x100, 0x100);
+ size_t z_size = padded_width * padded_height * 2;
+ size_t z_ts_size = etna_align_up((padded_width * padded_height * 2)/0x100, 0x100);
+ size_t bmp_size = width * height * 4;
+
+ if(etna_vidmem_alloc_linear(conn, &rt, rt_size, gcvSURF_RENDER_TARGET, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &rt_ts, rt_ts_size, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z, z_size, gcvSURF_DEPTH, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z_ts, z_ts_size, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &vtx, VERTEX_BUFFER_SIZE, gcvSURF_VERTEX, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &aux_rt, 0x4000, gcvSURF_RENDER_TARGET, gcvPOOL_SYSTEM, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &aux_rt_ts, 0x100, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &bmp, bmp_size, gcvSURF_BITMAP, gcvPOOL_DEFAULT, true)!=ETNA_OK
+ )
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int dest_idx = vert * (3 + 2);
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx->logical)[dest_idx+comp+0] = vVertices[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<2; ++comp)
+ ((float*)vtx->logical)[dest_idx+comp+3] = vTexCoords[vert*2 + comp]; /* 1 */
+ }
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* Now load the shader itself */
+ uint32_t vs[] = {
+ 0x02001001, 0x2a800800, 0x00000000, 0x003fc008,
+ 0x02001003, 0x2a800800, 0x00000040, 0x00000002,
+ };
+ uint32_t vs_size = sizeof(vs);
+ uint32_t *ps;
+ uint32_t ps_size;
+ if(argc < 2)
+ {
+ perror("provide shader on command line");
+ exit(1);
+ }
+ int fd = open(argv[1], O_RDONLY);
+ if(fd == -1)
+ {
+ perror("opening shader");
+ exit(1);
+ }
+ ps_size = lseek(fd, 0, SEEK_END);
+ ps = malloc(ps_size);
+ lseek(fd, 0, SEEK_SET);
+ if(ps_size == 0 || ps_size>8192 || read(fd, ps, ps_size) != ps_size)
+ {
+ perror("empty or unreadable shader");
+ exit(1);
+ }
+ close(fd);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+ /* XXX part of this can be put outside the loop, but until we have usable context management
+ * this is safest.
+ */
+ etna_set_state(ctx, VIVS_GL_VERTEX_ELEMENT_CONFIG, 0x1);
+ etna_set_state(ctx, VIVS_RA_CONTROL, 0x1);
+ etna_set_state(ctx, VIVS_PA_W_CLIP_LIMIT, 0x34000001);
+ etna_set_state(ctx, VIVS_PA_SYSTEM_MODE, 0x11);
+ etna_set_state(ctx, VIVS_SE_CONFIG, 0x0);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+
+ /* Set up pixel engine */
+ etna_set_state(ctx, VIVS_PE_ALPHA_CONFIG,
+ ETNA_MASKED_BIT(VIVS_PE_ALPHA_CONFIG_BLEND_ENABLE_COLOR, 0) &
+ ETNA_MASKED_BIT(VIVS_PE_ALPHA_CONFIG_BLEND_SEPARATE_ALPHA, 0) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR, BLEND_FUNC_ONE) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA, BLEND_FUNC_ONE) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR, BLEND_FUNC_ZERO) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA, BLEND_FUNC_ZERO) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_EQ_COLOR, BLEND_EQ_ADD) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_EQ_ALPHA, BLEND_EQ_ADD));
+ etna_set_state(ctx, VIVS_PE_ALPHA_BLEND_COLOR,
+ VIVS_PE_ALPHA_BLEND_COLOR_B(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_G(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_R(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_A(0));
+ etna_set_state(ctx, VIVS_PE_ALPHA_OP, ETNA_MASKED_BIT(VIVS_PE_ALPHA_OP_ALPHA_TEST, 0));
+ etna_set_state(ctx, VIVS_PE_STENCIL_CONFIG, ETNA_MASKED(VIVS_PE_STENCIL_CONFIG_REF_FRONT, 0) &
+ ETNA_MASKED(VIVS_PE_STENCIL_CONFIG_MASK_FRONT, 0xff) &
+ ETNA_MASKED(VIVS_PE_STENCIL_CONFIG_WRITE_MASK, 0xff));
+ etna_set_state(ctx, VIVS_PE_STENCIL_OP, ETNA_MASKED(VIVS_PE_STENCIL_OP_FUNC_FRONT, COMPARE_FUNC_ALWAYS) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_FUNC_BACK, COMPARE_FUNC_ALWAYS) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_FAIL_FRONT, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_FAIL_BACK, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_PASS_FRONT, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_PASS_BACK, STENCIL_OP_KEEP));
+
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+
+ etna_set_state(ctx, VIVS_SE_DEPTH_SCALE, 0x0);
+ etna_set_state(ctx, VIVS_SE_DEPTH_BIAS, 0x0);
+
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_UNK22, 0));
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_CULL_FACE_MODE, OFF));
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_FILL_MODE, SOLID));
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_SHADE_MODEL, SMOOTH));
+
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT,
+ ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 0));
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT, ETNA_MASKED(VIVS_PE_COLOR_FORMAT_COMPONENTS, 0xf));
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT,
+ ETNA_MASKED(VIVS_PE_COLOR_FORMAT_FORMAT, RS_FORMAT_A8R8G8B8) &
+ ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_SUPER_TILED, 1));
+
+ etna_set_state(ctx, VIVS_PE_COLOR_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_PE_COLOR_STRIDE, padded_width * 4);
+ etna_set_state(ctx, VIVS_GL_MULTI_SAMPLE_CONFIG,
+ ETNA_MASKED_INL(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES, NONE) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES, 0xf) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12, 0x0) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16, 0x0)
+ );
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT, ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 1));
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_CLEAR_VALUE, 0);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG, VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR); /* ADDR_A */
+
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG,
+ ETNA_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT, D16) &
+ ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_SUPER_TILED, 1)
+ );
+ etna_set_state(ctx, VIVS_PE_DEPTH_ADDR, z->address); /* ADDR_C */
+ etna_set_state(ctx, VIVS_PE_DEPTH_STRIDE, padded_width * 2);
+ etna_set_state(ctx, VIVS_PE_STENCIL_CONFIG, ETNA_MASKED_INL(VIVS_PE_STENCIL_CONFIG_MODE, DISABLED));
+ etna_set_state(ctx, VIVS_PE_HDEPTH_CONTROL, VIVS_PE_HDEPTH_CONTROL_FORMAT_DISABLED);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(ctx, VIVS_TS_DEPTH_CLEAR_VALUE, 0xffffffff);
+ etna_set_state(ctx, VIVS_TS_DEPTH_STATUS_BASE, z_ts->address); /* ADDR_D */
+ etna_set_state(ctx, VIVS_TS_DEPTH_SURFACE_BASE, z->address); /* ADDR_C */
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 1)); /* flip-flopping once again */
+
+ /* Warm up RS on aux render target */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+
+ /* Phew, now that's one hell of a setup; the serious rendering starts now */
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+
+ /* ... or so we thought */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+
+ /* maybe now? */
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ /* nope, not really... */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+
+ etna_stall(ctx, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
+
+ /* Set up the resolve to clear tile status for main render target
+ * What the blob does is regard the TS as an image of width N, height 4, with 4 bytes per pixel
+ * Looks like the height always stays the same. I don't think it matters as long as the entire memory are is covered.
+ * XXX need to clear the depth ts too.
+ * */
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_A8R8G8B8)
+ );
+ etna_set_state_multi(ctx, VIVS_RS_DITHER(0), 2, (uint32_t[]){0xffffffff, 0xffffffff});
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, 0x100); /* 0x100 iso 0x40! seems it uses a width of 256 if width divisible by 256, XXX need to figure out these rules */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(rt_ts_size/0x100) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(64));
+ etna_set_state(ctx, VIVS_RS_FILL_VALUE(0), 0x55555555);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL,
+ VIVS_RS_CLEAR_CONTROL_MODE_ENABLED1 |
+ VIVS_RS_CLEAR_CONTROL_BITS(0xffff));
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_KICKER,
+ 0xbeebbeeb);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_CLEAR_VALUE, 0xff7f7f7f);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_MODE, NONE));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED(VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC, COMPARE_FUNC_ALWAYS));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_MODE, Z));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_ONLY_DEPTH, 0));
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NEAR, 0.0);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_FAR, 1.0);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+
+ /* set up primitive assembly */
+ etna_set_state_f32(ctx, VIVS_PA_VIEWPORT_OFFSET_Z, 0.0);
+ etna_set_state_f32(ctx, VIVS_PA_VIEWPORT_SCALE_Z, 1.0);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_OFFSET_X, width << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_OFFSET_Y, height << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_SCALE_X, width << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_SCALE_Y, height << 15);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_LEFT, 0);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_TOP, 0);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_RIGHT, (width << 16) | 5);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_BOTTOM, (height << 16) | 5);
+
+ /* shader setup */
+ etna_set_state(ctx, VIVS_VS_END_PC, vs_size/16);
+ etna_set_state_multi(ctx, VIVS_VS_INPUT_COUNT, 3, (uint32_t[]){
+ /* VIVS_VS_INPUT_COUNT */ (1<<8) | 2,
+ /* VIVS_VS_TEMP_REGISTER_CONTROL */ VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS(2),
+ /* VIVS_VS_OUTPUT(0) */ 0x100});
+ etna_set_state(ctx, VIVS_VS_START_PC, 0x0);
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(0), 0.5); /* u0.x */
+
+ etna_set_state_multi(ctx, VIVS_VS_INST_MEM(0), vs_size/4, vs);
+ etna_set_state(ctx, VIVS_RA_CONTROL, 0x3); /* huh, this is 1 for the cubes */
+ etna_set_state_multi(ctx, VIVS_PS_END_PC, 2, (uint32_t[]){
+ /* VIVS_PS_END_PC */ ps_size/16,
+ /* VIVS_PS_OUTPUT_REG */ 0x1});
+ etna_set_state(ctx, VIVS_PS_START_PC, 0x0);
+ etna_set_state(ctx, VIVS_PA_SHADER_ATTRIBUTES(0), 0x200);
+ etna_set_state(ctx, VIVS_GL_VARYING_NUM_COMPONENTS, /* one varying, with four components */
+ VIVS_GL_VARYING_NUM_COMPONENTS_VAR0(2)
+ );
+ etna_set_state_multi(ctx, VIVS_GL_VARYING_COMPONENT_USE(0), 2, (uint32_t[]){ /* one varying, with four components */
+ VIVS_GL_VARYING_COMPONENT_USE_COMP0(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP1(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP2(VARYING_COMPONENT_USE_UNUSED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP3(VARYING_COMPONENT_USE_UNUSED)
+ , 0
+ });
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(0), 0.0); /* u0.x */
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(1), 1.0); /* u0.y */
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(2), 0.5); /* u0.z */
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(3), 2.0); /* u0.w */
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(4), 1/256.0); /* u1.x */
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(5), 16.0); /* u1.y */
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(6), 10.0); /* u1.z */
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(8), frame); /* u2.x */
+
+ etna_set_state_multi(ctx, VIVS_PS_INST_MEM(0), ps_size/4, ps);
+ etna_set_state(ctx, VIVS_PS_INPUT_COUNT, (31<<8)|2);
+ etna_set_state(ctx, VIVS_PS_TEMP_REGISTER_CONTROL,
+ VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS(4));
+ etna_set_state(ctx, VIVS_PS_CONTROL,
+ VIVS_PS_CONTROL_UNK1
+ );
+ etna_set_state(ctx, VIVS_PA_ATTRIBUTE_ELEMENT_COUNT, 0x100);
+ etna_set_state(ctx, VIVS_GL_VARYING_TOTAL_COMPONENTS, /* one varying, with two components, must be
+ changed together with GL_PS_VARYING_NUM_COMPONENTS */
+ VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM(2)
+ );
+ etna_set_state(ctx, VIVS_VS_LOAD_BALANCING, 0xf3f0582);
+ etna_set_state(ctx, VIVS_VS_OUTPUT_COUNT, 2);
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_POINT_SIZE_ENABLE, 0));
+
+ etna_set_state(ctx, VIVS_FE_VERTEX_STREAM_BASE_ADDR, vtx->address); /* ADDR_E */
+ etna_set_state(ctx, VIVS_FE_VERTEX_STREAM_CONTROL,
+ VIVS_FE_VERTEX_STREAM_CONTROL_VERTEX_STRIDE(0x14));
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(0),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN(ENDIAN_MODE_NO_SWAP) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM(0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM(3) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_START(0x0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_END(0xc));
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(1),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN(ENDIAN_MODE_NO_SWAP) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NONCONSECUTIVE |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM(0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM(2) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_START(0xc) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_END(0x14));
+ etna_set_state(ctx, VIVS_VS_INPUT(0), 0x00100); /* 0x20000 in etna_cube */
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_POINT_SPRITE_ENABLE, 0));
+ etna_draw_primitives(ctx, PRIMITIVE_TYPE_TRIANGLE_STRIP, 0, 2);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ /* Submit first command buffer */
+ etna_flush(ctx);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_DEST_TILED);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | VIVS_RS_SOURCE_STRIDE_TILING);
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, (padded_width * 4 * 4) | VIVS_RS_DEST_STRIDE_TILING);
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(padded_height) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(padded_width));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+
+ /* Submit second command buffer */
+ etna_flush(ctx);
+
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT,
+ ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 0));
+
+ /* Submit third command buffer, wait for pixel engine to finish */
+ etna_finish(ctx);
+
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_A8R8G8B8) /*|
+ VIVS_RS_CONFIG_SWAP_RB*/);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | VIVS_RS_SOURCE_STRIDE_TILING);
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, fb.fb_fix.line_length);
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, fb.physical[backbuffer]); /* ADDR_J */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(height) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(width));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+ etna_finish(ctx);
+ /* switch buffers */
+ fb_set_buffer(&fb, backbuffer);
+ backbuffer = 1-backbuffer;
+ }
+
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/fb_old/fbtest.c b/src/fb_old/fbtest.c
new file mode 100644
index 0000000..0c3b27f
--- /dev/null
+++ b/src/fb_old/fbtest.c
@@ -0,0 +1,549 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <errno.h>
+#include <sys/mman.h>
+#include <linux/fb.h>
+#include <unistd.h>
+#include <string.h>
+#include <inttypes.h>
+
+#include "write_bmp.h"
+#include "viv.h"
+#include "etna_fb.h"
+
+#include "../replay/cube_cmd.h"
+#include "../replay/context_cmd.h"
+
+float vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ //-0.5f, -0.6f, +0.5f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+};
+
+float vColors[] = {
+ // front
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f, // magenta
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ // back
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 1.0f, 0.0f, // yellow
+ 0.0f, 1.0f, 0.0f, // green
+ // right
+ 1.0f, 0.0f, 1.0f, // magenta
+ 1.0f, 0.0f, 0.0f, // red
+ 1.0f, 1.0f, 1.0f, // white
+ 1.0f, 1.0f, 0.0f, // yellow
+ // left
+ 0.0f, 0.0f, 0.0f, // black
+ 0.0f, 0.0f, 1.0f, // blue
+ 0.0f, 1.0f, 0.0f, // green
+ 0.0f, 1.0f, 1.0f, // cyan
+ // top
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ 0.0f, 1.0f, 0.0f, // green
+ 1.0f, 1.0f, 0.0f, // yellow
+ // bottom
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f // magenta
+};
+
+float vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+};
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (6*4)
+
+int main(int argc, char **argv)
+{
+ int rv;
+ struct fb_info fb;
+ rv = fb_open(0, &fb);
+ if(rv!=0)
+ {
+ exit(1);
+ }
+ fb_set_buffer(&fb, 0);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ /* allocate command buffer (blob uses four command buffers, but we don't even fill one) */
+ viv_addr_t buf0_physical = 0;
+ void *buf0_logical = 0;
+ if(viv_alloc_contiguous(conn, 0x8000, &buf0_physical, &buf0_logical, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating host memory\n");
+ exit(1);
+ }
+ printf("Allocated buffer: phys=%08x log=%08x\n", (uint32_t)buf0_physical, (uint32_t)buf0_logical);
+
+ /* allocate main render target */
+ gcuVIDMEM_NODE_PTR rt_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x70000, 0x40, gcvSURF_RENDER_TARGET, gcvPOOL_DEFAULT, &rt_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target buffer memory\n");
+ exit(1);
+ }
+ printf("Allocated render target node: node=%08x\n", (uint32_t)rt_node);
+
+ viv_addr_t rt_physical = 0;
+ void *rt_logical = 0;
+ if(viv_lock_vidmem(conn, rt_node, &rt_physical, &rt_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target: phys=%08x log=%08x\n", (uint32_t)rt_physical, (uint32_t)rt_logical);
+ memset(rt_logical, 0xff, 0x70000); /* clear previous result just in case, test that clearing works */
+
+ /* allocate tile status for main render target */
+ gcuVIDMEM_NODE_PTR rt_ts_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x700, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &rt_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated render target tile status node: node=%08x\n", (uint32_t)rt_ts_node);
+
+ viv_addr_t rt_ts_physical = 0;
+ void *rt_ts_logical = 0;
+ if(viv_lock_vidmem(conn, rt_ts_node, &rt_ts_physical, &rt_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target ts: phys=%08x log=%08x\n", (uint32_t)rt_ts_physical, (uint32_t)rt_ts_logical);
+
+ /* allocate depth for main render target */
+ gcuVIDMEM_NODE_PTR z_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x38000, 0x40, gcvSURF_DEPTH, gcvPOOL_DEFAULT, &z_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth node: node=%08x\n", (uint32_t)z_node);
+
+ viv_addr_t z_physical = 0;
+ void *z_logical = 0;
+ if(viv_lock_vidmem(conn, z_node, &z_physical, &z_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target memory\n");
+ exit(1);
+ }
+ printf("Locked depth target: phys=%08x log=%08x\n", (uint32_t)z_physical, (uint32_t)z_logical);
+
+ /* allocate depth ts for main render target */
+ gcuVIDMEM_NODE_PTR z_ts_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x400, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &z_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth ts node: node=%08x\n", (uint32_t)z_ts_node);
+
+ viv_addr_t z_ts_physical = 0;
+ void *z_ts_logical = 0;
+ if(viv_lock_vidmem(conn, z_ts_node, &z_ts_physical, &z_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target ts memory\n");
+ exit(1);
+ }
+ printf("Locked depth ts target: phys=%08x log=%08x\n", (uint32_t)z_ts_physical, (uint32_t)z_ts_logical);
+
+ /* allocate vertex buffer */
+ gcuVIDMEM_NODE_PTR vtx_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x60000, 0x40, gcvSURF_VERTEX, gcvPOOL_DEFAULT, &vtx_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating vertex memory\n");
+ exit(1);
+ }
+ printf("Allocated vertex node: node=%08x\n", (uint32_t)vtx_node);
+
+ viv_addr_t vtx_physical = 0;
+ void *vtx_logical = 0;
+ if(viv_lock_vidmem(conn, vtx_node, &vtx_physical, &vtx_logical)!=0)
+ {
+ fprintf(stderr, "Error locking vertex memory\n");
+ exit(1);
+ }
+ printf("Locked vertex memory: phys=%08x log=%08x\n", (uint32_t)vtx_physical, (uint32_t)vtx_logical);
+
+ /* allocate aux render target */
+ gcuVIDMEM_NODE_PTR aux_rt_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x4000, 0x40, gcvSURF_RENDER_TARGET, gcvPOOL_SYSTEM /*why?*/, &aux_rt_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating aux render target buffer memory\n");
+ exit(1);
+ }
+ printf("Allocated aux render target node: node=%08x\n", (uint32_t)aux_rt_node);
+
+ viv_addr_t aux_rt_physical = 0;
+ void *aux_rt_logical = 0;
+ if(viv_lock_vidmem(conn, aux_rt_node, &aux_rt_physical, &aux_rt_logical)!=0)
+ {
+ fprintf(stderr, "Error locking aux render target memory\n");
+ exit(1);
+ }
+ printf("Locked aux render target: phys=%08x log=%08x\n", (uint32_t)aux_rt_physical, (uint32_t)aux_rt_logical);
+
+ /* allocate tile status for aux render target */
+ gcuVIDMEM_NODE_PTR aux_rt_ts_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x100, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &aux_rt_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating aux render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated aux render target tile status node: node=%08x\n", (uint32_t)aux_rt_ts_node);
+
+ viv_addr_t aux_rt_ts_physical = 0;
+ void *aux_rt_ts_logical = 0;
+ if(viv_lock_vidmem(conn, aux_rt_ts_node, &aux_rt_ts_physical, &aux_rt_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking aux ts render target memory\n");
+ exit(1);
+ }
+ printf("Locked aux render target ts: phys=%08x log=%08x\n", (uint32_t)aux_rt_ts_physical, (uint32_t)aux_rt_ts_logical);
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int src_idx = vert * COMPONENTS_PER_VERTEX;
+ int dest_idx = vert * COMPONENTS_PER_VERTEX * 3;
+ for(int comp=0; comp<COMPONENTS_PER_VERTEX; ++comp)
+ {
+ ((float*)vtx_logical)[dest_idx+comp+0] = vVertices[src_idx + comp]; /* 0 */
+ ((float*)vtx_logical)[dest_idx+comp+3] = vNormals[src_idx + comp]; /* 1 */
+ ((float*)vtx_logical)[dest_idx+comp+6] = vColors[src_idx + comp]; /* 2 */
+ }
+ }
+ /*
+ for(int idx=0; idx<NUM_VERTICES*3*3; ++idx)
+ {
+ printf("%i %f\n", idx, ((float*)vtx_logical)[idx]);
+ }*/
+
+ /* Load the command buffer and send the commit command. */
+ /* First build context state map */
+ size_t stateCount = 0x1d00;
+ uint32_t *contextMap = malloc(stateCount * 4);
+ memset(contextMap, 0, stateCount*4);
+ for(int idx=0; idx<sizeof(contextbuf_addr)/sizeof(address_index_t); ++idx)
+ {
+ contextMap[contextbuf_addr[idx].address / 4] = contextbuf_addr[idx].index;
+ }
+
+ struct _gcoCMDBUF commandBuffer = {
+ .object = {
+ .type = gcvOBJ_COMMANDBUFFER
+ },
+ //.os = (_gcoOS*)0xbf7488,
+ //.hardware = (_gcoHARDWARE*)0x402694e0,
+ .physical = (void*)buf0_physical,
+ .logical = (void*)buf0_logical,
+ .bytes = 0x8000,
+ .startOffset = 0x0,
+ //.offset = 0xac0,
+ //.free = 0x7520,
+ //.hintTable = (unsigned int*)0x0, // Used when gcdSECURE
+ //.hintIndex = (unsigned int*)0x58, // Used when gcdSECURE
+ //.hintCommit = (unsigned int*)0xffffffff // Used when gcdSECURE
+ };
+ struct _gcoCONTEXT contextBuffer = {
+ .object = {
+ .type = gcvOBJ_CONTEXT
+ },
+ //.os = (_gcoOS*)0xbf7488,
+ //.hardware = (_gcoHARDWARE*)0x402694e0,
+ .id = 0x0, // Actual ID will be returned here
+ .map = contextMap,
+ .stateCount = stateCount,
+ //.hint = (unsigned char*)0x0, // Used when gcdSECURE
+ //.hintValue = 2, // Used when gcdSECURE
+ //.hintCount = 0xca, // Used when gcdSECURE
+ .buffer = contextbuf,
+ .pipe3DIndex = 0x2d6, // XXX should not be hardcoded
+ .pipe2DIndex = 0x106e,
+ .linkIndex = 0x1076,
+ .inUseIndex = 0x1078,
+ .bufferSize = 0x41e4,
+ .bytes = 0x0, // Number of bytes at physical, logical
+ .physical = (void*)0x0,
+ .logical = (void*)0x0,
+ .link = (void*)0x0, // Logical address of link
+ .initialPipe = 0x1,
+ .entryPipe = 0x0,
+ .currentPipe = 0x0,
+ .postCommit = 1,
+ .inUse = (int*)0x0, // Logical address of inUse
+ .lastAddress = 0xffffffff, // Not used by kernel
+ .lastSize = 0x2, // Not used by kernel
+ .lastIndex = 0x106a, // Not used by kernel
+ .lastFixed = 0, // Not used by kernel
+ //.hintArray = (unsigned int*)0x0, // Used when gcdSECURE
+ //.hintIndex = (unsigned int*)0x0 // Used when gcdSECURE
+ };
+ commandBuffer.free = commandBuffer.bytes - 0x8; /* Always keep 0x8 at end of buffer for kernel driver */
+ /* Set addresses in first command buffer */
+ cmdbuf1[0x57] = cmdbuf1[0x67] = cmdbuf1[0x9f] = cmdbuf1[0xbb] = cmdbuf1[0xd9] = cmdbuf1[0xfb] = rt_physical;
+ cmdbuf1[0x65] = cmdbuf1[0x9d] = cmdbuf1[0xb9] = cmdbuf1[0xd7] = cmdbuf1[0xe5] = cmdbuf1[0xf9] = rt_ts_physical;
+ cmdbuf1[0x6d] = cmdbuf1[0x7f] = z_physical;
+ cmdbuf1[0x7d] = z_ts_physical;
+ cmdbuf1[0x87] = cmdbuf1[0xa3] = cmdbuf1[0xc1] = aux_rt_ts_physical;
+ cmdbuf1[0x89] = cmdbuf1[0x8f] = cmdbuf1[0x93]
+ = cmdbuf1[0xa5] = cmdbuf1[0xab] = cmdbuf1[0xaf]
+ = cmdbuf1[0xc3] = cmdbuf1[0xc9] = cmdbuf1[0xcd] = aux_rt_physical;
+ cmdbuf1[0x1f3] = cmdbuf1[0x215] = cmdbuf1[0x237]
+ = cmdbuf1[0x259] = cmdbuf1[0x27b] = cmdbuf1[0x29d] = vtx_physical;
+
+ /* Submit first command buffer */
+ commandBuffer.startOffset = 0;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf1, sizeof(cmdbuf1));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf1);
+ commandBuffer.free -= sizeof(cmdbuf1) + 0x18;
+ printf("[1] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing first command buffer\n");
+ exit(1);
+ }
+
+ /* After the first COMMIT, allocate contiguous memory for context and set
+ * bytes, physical, logical, link, inUse */
+ printf("Context assigned index: %i\n", (uint32_t)contextBuffer.id);
+ viv_addr_t cbuf0_physical = 0;
+ void *cbuf0_logical = 0;
+ size_t cbuf0_bytes = 0;
+ if(viv_alloc_contiguous(conn, contextBuffer.bufferSize, &cbuf0_physical, &cbuf0_logical, &cbuf0_bytes)!=0)
+ {
+ fprintf(stderr, "Error allocating contiguous host memory for context\n");
+ exit(1);
+ }
+ printf("Allocated buffer (size 0x%x) for context: phys=%08x log=%08x\n", (int)cbuf0_bytes, (int)cbuf0_physical, (int)cbuf0_logical);
+ contextBuffer.bytes = cbuf0_bytes; /* actual size of buffer */
+ contextBuffer.physical = (void*)cbuf0_physical;
+ contextBuffer.logical = cbuf0_logical;
+ contextBuffer.link = ((uint32_t*)cbuf0_logical) + contextBuffer.linkIndex;
+ contextBuffer.inUse = (int*)(((uint32_t*)cbuf0_logical) + contextBuffer.inUseIndex);
+ *contextBuffer.inUse = 0;
+
+ /* Submit second command buffer, with updated context.
+ * Second command buffer fills the background.
+ */
+ cmdbuf2[0x1d] = cmdbuf2[0x1f] = rt_physical;
+ commandBuffer.startOffset = commandBuffer.offset + 0x18; /* Make space for LINK */
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf2, sizeof(cmdbuf2));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf2);
+ commandBuffer.free -= sizeof(cmdbuf2) + 0x18;
+ printf("[2] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing second command buffer\n");
+ exit(1);
+ }
+
+ /* Submit third command buffer, with updated context
+ * Third command buffer does some cache flush trick?
+ * It can be left out without any visible harm.
+ **/
+ cmdbuf3[0x9] = aux_rt_ts_physical;
+ cmdbuf3[0xb] = cmdbuf3[0x11] = cmdbuf3[0x15] = aux_rt_physical;
+ cmdbuf3[0x1f] = rt_ts_physical;
+ cmdbuf3[0x21] = rt_physical;
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf3, sizeof(cmdbuf3));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf3);
+ commandBuffer.free -= sizeof(cmdbuf3) + 0x18;
+ printf("[3] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing third command buffer\n");
+ exit(1);
+ }
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL (wait for pixel engine to finish) */
+ int sig_id = 0;
+ if(viv_user_signal_create(conn, 0, &sig_id) != 0) /* automatic resetting signal */
+ {
+ fprintf(stderr, "Cannot create user signal\n");
+ exit(1);
+ }
+ printf("Created user signal %i\n", sig_id);
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+
+ /* Allocate video memory for BITMAP, lock */
+ gcuVIDMEM_NODE_PTR bmp_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x5dc00, 0x40, gcvSURF_BITMAP, gcvPOOL_DEFAULT, &bmp_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating bitmap status memory\n");
+ exit(1);
+ }
+ printf("Allocated bitmap node: node=%08x\n", (uint32_t)bmp_node);
+
+ viv_addr_t bmp_physical = 0;
+ void *bmp_logical = 0;
+ if(viv_lock_vidmem(conn, bmp_node, &bmp_physical, &bmp_logical)!=0)
+ {
+ fprintf(stderr, "Error locking bmp memory\n");
+ exit(1);
+ }
+ memset(bmp_logical, 0xff, 0x5dc00); /* clear previous result */
+ printf("Locked bmp: phys=%08x log=%08x\n", (uint32_t)bmp_physical, (uint32_t)bmp_logical);
+
+ /* Submit fourth command buffer, updating context.
+ * Fourth command buffer copies render result to bitmap, detiling along the way.
+ */
+ cmdbuf4[0x0f] = fb.fb_fix.line_length;
+ cmdbuf4[0x19] = rt_physical;
+ cmdbuf4[0x1b] = fb.physical[0];
+ fb_set_buffer(&fb, 0);
+ /* XXX gcvHAL_MAP_USER_MEMORY to get dma-able address, or does this work as-is? */
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf4, sizeof(cmdbuf4));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf4);
+ commandBuffer.free -= sizeof(cmdbuf4) + 0x18;
+ printf("[4] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing fourth command buffer\n");
+ exit(1);
+ }
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL */
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+ bmp_dump32(bmp_logical, 400, 240, false, "/mnt/sdcard/replay.bmp");
+ /* Unlock video memory */
+ if(viv_unlock_vidmem(conn, bmp_node, gcvSURF_BITMAP, 1) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+ /*
+ for(int x=0; x<0x700; ++x)
+ {
+ uint32_t value = ((uint32_t*)rt_ts_logical)[x];
+ printf("Sample ts: %x %08x\n", x*4, value);
+ }*/
+ printf("Contextbuffer used %i\n", *contextBuffer.inUse);
+
+ viv_close(conn);
+ return 0;
+}
+
diff --git a/src/fb_old/mip_cube_raw.c b/src/fb_old/mip_cube_raw.c
new file mode 100644
index 0000000..1d8e63e
--- /dev/null
+++ b/src/fb_old/mip_cube_raw.c
@@ -0,0 +1,651 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Rotating, mipmapped cube. Load mipmaps from .dds file.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "common.xml.h"
+#include "state.xml.h"
+#include "state_3d.xml.h"
+#include "cmdstream.xml.h"
+
+#include "write_bmp.h"
+#include "viv.h"
+#include "etna.h"
+#include "etna_state.h"
+#include "etna_rs.h"
+#include "etna_fb.h"
+#include "etna_mem.h"
+#include "etna_bswap.h"
+#include "etna_tex.h"
+#include "etna_util.h"
+
+#include "esTransform.h"
+#include "dds.h"
+
+#define RCPLOG2 (1.4426950408889634f)
+#define VERTEX_BUFFER_SIZE 0x60000
+
+float vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+};
+
+float vTexCoords[] = {
+ // front
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ // back
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ // right
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ // left
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ // top
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ // bottom
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+};
+
+float vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+};
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (6*4)
+
+uint32_t vs[] = {
+ 0x01831009, 0x00000000, 0x00000000, 0x203fc048,
+ 0x02031009, 0x00000000, 0x00000000, 0x203fc058,
+ 0x07841003, 0x39000800, 0x00000050, 0x00000000,
+ 0x07841002, 0x39001800, 0x00aa0050, 0x00390048,
+ 0x07841002, 0x39002800, 0x01540050, 0x00390048,
+ 0x07841002, 0x39003800, 0x01fe0050, 0x00390048,
+ 0x03851003, 0x29004800, 0x000000d0, 0x00000000,
+ 0x03851002, 0x29005800, 0x00aa00d0, 0x00290058,
+ 0x03811002, 0x29006800, 0x015400d0, 0x00290058,
+ 0x07851003, 0x39007800, 0x00000050, 0x00000000,
+ 0x07851002, 0x39008800, 0x00aa0050, 0x00390058,
+ 0x07851002, 0x39009800, 0x01540050, 0x00390058,
+ 0x07801002, 0x3900a800, 0x01fe0050, 0x00390058,
+ 0x0401100c, 0x00000000, 0x00000000, 0x003fc008,
+ 0x03801002, 0x69000800, 0x01fe00c0, 0x00290038,
+ 0x03831005, 0x29000800, 0x01480040, 0x00000000,
+ 0x0383100d, 0x00000000, 0x00000000, 0x00000038,
+ 0x03801003, 0x29000800, 0x014801c0, 0x00000000,
+ 0x00801005, 0x29001800, 0x01480040, 0x00000000,
+ 0x0380108f, 0x3fc06800, 0x00000050, 0x203fc068,
+ 0x04001009, 0x00000000, 0x00000000, 0x200000b8,
+ 0x01811009, 0x00000000, 0x00000000, 0x00150028,
+ 0x02041001, 0x2a804800, 0x00000000, 0x003fc048,
+ 0x02041003, 0x2a804800, 0x00aa05c0, 0x00000002,
+};
+uint32_t ps[] = { /* texture sampling */
+ 0x07811003, 0x00000800, 0x01c800d0, 0x00000000,
+ 0x07821018, 0x15002f20, 0x00000000, 0x00000000,
+ 0x07811003, 0x39001800, 0x01c80140, 0x00000000,
+};
+size_t vs_size = sizeof(vs);
+size_t ps_size = sizeof(ps);
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 256;
+ int padded_width, padded_height;
+
+ struct fb_info fb;
+ rv = fb_open(0, &fb);
+ if(rv!=0)
+ {
+ exit(1);
+ }
+ width = fb.fb_var.xres;
+ height = fb.fb_var.yres;
+ padded_width = etna_align_up(width, 64);
+ padded_height = etna_align_up(height, 64);
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* Initialize buffers synchronization structure */
+ struct etna_bswap_buffers *buffers = 0;
+ if(etna_bswap_create(ctx, &buffers, (int (*)(void *, int))&fb_set_buffer, NULL, &fb) < 0)
+ {
+ fprintf(stderr, "Error creating buffer swapper\n");
+ exit(1);
+ }
+
+ /* Allocate video memory */
+ struct etna_vidmem *rt = 0; /* main render target */
+ struct etna_vidmem *rt_ts = 0; /* tile status for main render target */
+ struct etna_vidmem *z = 0; /* depth for main render target */
+ struct etna_vidmem *z_ts = 0; /* depth ts for main render target */
+ struct etna_vidmem *vtx = 0; /* vertex buffer */
+ struct etna_vidmem *aux_rt = 0; /* auxilary render target */
+ struct etna_vidmem *aux_rt_ts = 0; /* tile status for auxilary render target */
+ struct etna_vidmem *tex = 0; /* texture */
+
+ size_t rt_size = padded_width * padded_height * 4;
+ size_t rt_ts_size = etna_align_up((padded_width * padded_height * 4)/0x100, 0x100);
+ size_t z_size = padded_width * padded_height * 2;
+ size_t z_ts_size = etna_align_up((padded_width * padded_height * 2)/0x100, 0x100);
+
+ dds_texture *dds = 0;
+ if(argc<2 || !dds_load(argv[1], &dds))
+ {
+ printf("Error loading texture\n");
+ exit(1);
+ }
+
+ if(etna_vidmem_alloc_linear(conn, &rt, rt_size, gcvSURF_RENDER_TARGET, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &rt_ts, rt_ts_size, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z, z_size, gcvSURF_DEPTH, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z_ts, z_ts_size, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &vtx, VERTEX_BUFFER_SIZE, gcvSURF_VERTEX, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &aux_rt, 0x4000, gcvSURF_RENDER_TARGET, gcvPOOL_SYSTEM, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &aux_rt_ts, 0x100, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &tex, dds->size, gcvSURF_TEXTURE, gcvPOOL_DEFAULT, true)!=ETNA_OK
+ )
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ uint32_t tex_format = 0;
+ uint32_t tex_base_width = dds->slices[0][0].width;
+ uint32_t tex_base_height = dds->slices[0][0].height;
+ uint32_t tex_base_log_width = (int)(logf(tex_base_width) * RCPLOG2 * 32.0f + 0.5f);
+ uint32_t tex_base_log_height = (int)(logf(tex_base_height) * RCPLOG2 * 32.0f + 0.5f);
+ printf("Loading compressed texture (format %i, %ix%i) log_width=%i log_height=%i\n", dds->fmt, tex_base_width, tex_base_height, tex_base_log_width, tex_base_log_height);
+ if(dds->fmt == FMT_X8R8G8B8 || dds->fmt == FMT_A8R8G8B8)
+ {
+ for(int ix=0; ix<dds->num_mipmaps; ++ix)
+ {
+ printf("%08x: Tiling mipmap %i (%ix%i)\n", dds->slices[0][ix].offset, ix, dds->slices[0][ix].width, dds->slices[0][ix].height);
+ etna_texture_tile((void*)((size_t)tex->logical + dds->slices[0][ix].offset),
+ dds->slices[0][ix].data, dds->slices[0][ix].width, dds->slices[0][ix].height, dds->slices[0][ix].stride, 4);
+ }
+ tex_format = TEXTURE_FORMAT_X8R8G8B8;
+ } else if(dds->fmt == FMT_DXT1 || dds->fmt == FMT_DXT3 || dds->fmt == FMT_DXT5 || dds->fmt == FMT_ETC1)
+ {
+ printf("Uploading compressed texture\n");
+ memcpy(tex->logical, dds->data, dds->size);
+ switch(dds->fmt)
+ {
+ case FMT_DXT1: tex_format = TEXTURE_FORMAT_DXT1; break;
+ case FMT_DXT3: tex_format = TEXTURE_FORMAT_DXT2_DXT3; break;
+ case FMT_DXT5: tex_format = TEXTURE_FORMAT_DXT4_DXT5; break;
+ case FMT_ETC1: tex_format = TEXTURE_FORMAT_ETC1; break;
+ }
+ } else
+ {
+ printf("Unknown texture format\n");
+ exit(1);
+ }
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int dest_idx = vert * (3 + 3 + 2);
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx->logical)[dest_idx+comp+0] = vVertices[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx->logical)[dest_idx+comp+3] = vNormals[vert*3 + comp]; /* 1 */
+ for(int comp=0; comp<2; ++comp)
+ ((float*)vtx->logical)[dest_idx+comp+6] = vTexCoords[vert*2 + comp]; /* 2 */
+ }
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview, projection, modelviewprojection;
+ ESMatrix inverse, normal;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.5f, 0.0f, 0.0f, 1.0f);
+ GLfloat aspect = (GLfloat)(height) / (GLfloat)(width);
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 10.0f);
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+ esMatrixInverse3x3(&inverse, &modelview);
+ esMatrixTranspose(&normal, &inverse);
+
+ /* XXX part of this can be put outside the loop, but until we have usable context management
+ * this is safest.
+ */
+ etna_set_state(ctx, VIVS_RA_CONTROL, 0x3);
+
+ etna_set_state(ctx, VIVS_GL_MULTI_SAMPLE_CONFIG,
+ VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES_NONE |
+ VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES(0xf) /*|
+ VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12 |
+ VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16 */
+ );
+ etna_set_state(ctx, VIVS_GL_VERTEX_ELEMENT_CONFIG, 0x1);
+ etna_set_state(ctx, VIVS_GL_VARYING_NUM_COMPONENTS,
+ VIVS_GL_VARYING_NUM_COMPONENTS_VAR0(4)| /* position */
+ VIVS_GL_VARYING_NUM_COMPONENTS_VAR1(2) /* texture coordinate */
+ );
+ etna_set_state(ctx, VIVS_GL_VARYING_TOTAL_COMPONENTS,
+ VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM(4 + 2)
+ );
+ etna_set_state_multi(ctx, VIVS_GL_VARYING_COMPONENT_USE(0), 2, (uint32_t[]){
+ VIVS_GL_VARYING_COMPONENT_USE_COMP0(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP1(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP2(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP3(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP4(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP5(VARYING_COMPONENT_USE_USED)
+ , 0
+ });
+
+ etna_set_state(ctx, VIVS_PA_W_CLIP_LIMIT, 0x34000001);
+ etna_set_state(ctx, VIVS_PA_SYSTEM_MODE, 0x11);
+ etna_set_state(ctx, VIVS_PA_CONFIG, /* VIVS_PA_CONFIG_UNK22 | */
+ VIVS_PA_CONFIG_CULL_FACE_MODE_CCW |
+ VIVS_PA_CONFIG_FILL_MODE_SOLID |
+ VIVS_PA_CONFIG_SHADE_MODEL_SMOOTH /* |
+ VIVS_PA_CONFIG_POINT_SIZE_ENABLE |
+ VIVS_PA_CONFIG_POINT_SPRITE_ENABLE*/);
+ etna_set_state_f32(ctx, VIVS_PA_VIEWPORT_OFFSET_Z, 0.0);
+ etna_set_state_f32(ctx, VIVS_PA_VIEWPORT_SCALE_Z, 1.0);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_OFFSET_X, width << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_OFFSET_Y, height << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_SCALE_X, width << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_SCALE_Y, height << 15);
+ etna_set_state(ctx, VIVS_PA_ATTRIBUTE_ELEMENT_COUNT, 0x200);
+ etna_set_state(ctx, VIVS_PA_SHADER_ATTRIBUTES(0), 0x200);
+ etna_set_state(ctx, VIVS_PA_SHADER_ATTRIBUTES(1), 0x200);
+
+ etna_set_state(ctx, VIVS_SE_CONFIG, 0x0);
+ etna_set_state(ctx, VIVS_SE_DEPTH_SCALE, 0x0);
+ etna_set_state(ctx, VIVS_SE_DEPTH_BIAS, 0x0);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_LEFT, 0);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_TOP, 0);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_RIGHT, (width << 16) | 5);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_BOTTOM, (height << 16) | 5);
+
+ etna_set_state(ctx, VIVS_PE_ALPHA_CONFIG,
+ /* VIVS_PE_ALPHA_CONFIG_BLEND_ENABLE_COLOR | */
+ /* VIVS_PE_ALPHA_CONFIG_BLEND_ENABLE_ALPHA | */
+ VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR(BLEND_FUNC_ONE) |
+ VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA(BLEND_FUNC_ONE) |
+ VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR(BLEND_FUNC_ZERO) |
+ VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA(BLEND_FUNC_ZERO) |
+ VIVS_PE_ALPHA_CONFIG_EQ_COLOR(BLEND_EQ_ADD) |
+ VIVS_PE_ALPHA_CONFIG_EQ_ALPHA(BLEND_EQ_ADD));
+ etna_set_state(ctx, VIVS_PE_ALPHA_BLEND_COLOR,
+ VIVS_PE_ALPHA_BLEND_COLOR_B(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_G(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_R(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_A(0));
+ etna_set_state(ctx, VIVS_PE_ALPHA_OP, /* VIVS_PE_ALPHA_OP_ALPHA_TEST */ 0);
+ etna_set_state(ctx, VIVS_PE_STENCIL_CONFIG, VIVS_PE_STENCIL_CONFIG_REF_FRONT(0) |
+ VIVS_PE_STENCIL_CONFIG_MASK_FRONT(0xff) |
+ VIVS_PE_STENCIL_CONFIG_WRITE_MASK(0xff) |
+ VIVS_PE_STENCIL_CONFIG_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_PE_STENCIL_OP, VIVS_PE_STENCIL_OP_FUNC_FRONT(COMPARE_FUNC_ALWAYS) |
+ VIVS_PE_STENCIL_OP_FUNC_BACK(COMPARE_FUNC_ALWAYS) |
+ VIVS_PE_STENCIL_OP_FAIL_FRONT(STENCIL_OP_KEEP) |
+ VIVS_PE_STENCIL_OP_FAIL_BACK(STENCIL_OP_KEEP) |
+ VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT(STENCIL_OP_KEEP) |
+ VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK(STENCIL_OP_KEEP) |
+ VIVS_PE_STENCIL_OP_PASS_FRONT(STENCIL_OP_KEEP) |
+ VIVS_PE_STENCIL_OP_PASS_BACK(STENCIL_OP_KEEP));
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT,
+ VIVS_PE_COLOR_FORMAT_COMPONENTS(0xf) |
+ VIVS_PE_COLOR_FORMAT_FORMAT(RS_FORMAT_X8R8G8B8) |
+ VIVS_PE_COLOR_FORMAT_SUPER_TILED |
+ VIVS_PE_COLOR_FORMAT_OVERWRITE);
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG,
+ VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT_D16 |
+ VIVS_PE_DEPTH_CONFIG_SUPER_TILED |
+ VIVS_PE_DEPTH_CONFIG_EARLY_Z |
+ /* VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE | */
+ VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC(COMPARE_FUNC_ALWAYS) |
+ VIVS_PE_DEPTH_CONFIG_DEPTH_MODE_Z
+ /* VIVS_PE_DEPTH_CONFIG_ONLY_DEPTH */
+ );
+ etna_set_state(ctx, VIVS_PE_DEPTH_ADDR, z->address);
+ etna_set_state(ctx, VIVS_PE_DEPTH_STRIDE, padded_width * 2);
+ etna_set_state(ctx, VIVS_PE_HDEPTH_CONTROL, VIVS_PE_HDEPTH_CONTROL_FORMAT_DISABLED);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+ etna_set_state(ctx, VIVS_PE_COLOR_ADDR, rt->address);
+ etna_set_state(ctx, VIVS_PE_COLOR_STRIDE, padded_width * 4);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NEAR, 0.0);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_FAR, 1.0);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH);
+ etna_stall(ctx, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
+
+ /* Set up the resolve to clear tile status for main render target
+ * Regard the TS plane as an image of width 16 with 4 bytes per pixel (64 bytes per row)
+ * XXX need to clear the depth ts too? we don't really use depth buffer in this sample
+ * */
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG, 0);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_X8R8G8B8) |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_X8R8G8B8)
+ );
+ etna_set_state_multi(ctx, VIVS_RS_DITHER(0), 2, (uint32_t[]){0xffffffff, 0xffffffff});
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, 0x40);
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ ((rt_ts_size/0x40) << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (16 << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(ctx, VIVS_RS_FILL_VALUE(0), 0x55555555);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL,
+ VIVS_RS_CLEAR_CONTROL_MODE_ENABLED1 |
+ (0xffff << VIVS_RS_CLEAR_CONTROL_BITS__SHIFT));
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0);
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+ /** Done */
+
+ /* Now set up TS */
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_TS_DEPTH_CLEAR_VALUE, 0xffffffff);
+ etna_set_state(ctx, VIVS_TS_DEPTH_STATUS_BASE, z_ts->address);
+ etna_set_state(ctx, VIVS_TS_DEPTH_SURFACE_BASE, z->address);
+ etna_set_state(ctx, VIVS_TS_COLOR_CLEAR_VALUE, 0xff303030);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address);
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ /* set up texture unit */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_TEXTURE);
+ etna_set_state(ctx, VIVS_TE_SAMPLER_SIZE(0),
+ VIVS_TE_SAMPLER_SIZE_WIDTH(tex_base_width)|
+ VIVS_TE_SAMPLER_SIZE_HEIGHT(tex_base_height));
+ etna_set_state(ctx, VIVS_TE_SAMPLER_LOG_SIZE(0),
+ VIVS_TE_SAMPLER_LOG_SIZE_WIDTH(tex_base_log_width) |
+ VIVS_TE_SAMPLER_LOG_SIZE_HEIGHT(tex_base_log_height));
+ for(int ix=0; ix<dds->num_mipmaps; ++ix)
+ {
+ etna_set_state(ctx, VIVS_TE_SAMPLER_LOD_ADDR(0,ix), tex->address + dds->slices[0][ix].offset);
+ }
+ etna_set_state(ctx, VIVS_TE_SAMPLER_CONFIG0(0),
+ VIVS_TE_SAMPLER_CONFIG0_TYPE(TEXTURE_TYPE_2D)|
+ VIVS_TE_SAMPLER_CONFIG0_UWRAP(TEXTURE_WRAPMODE_CLAMP_TO_EDGE)|
+ VIVS_TE_SAMPLER_CONFIG0_VWRAP(TEXTURE_WRAPMODE_CLAMP_TO_EDGE)|
+ VIVS_TE_SAMPLER_CONFIG0_MIN(TEXTURE_FILTER_LINEAR)|
+ VIVS_TE_SAMPLER_CONFIG0_MIP(TEXTURE_FILTER_LINEAR)|
+ VIVS_TE_SAMPLER_CONFIG0_MAG(TEXTURE_FILTER_LINEAR)|
+ VIVS_TE_SAMPLER_CONFIG0_FORMAT(tex_format));
+ etna_set_state(ctx, VIVS_TE_SAMPLER_LOD_CONFIG(0),
+ VIVS_TE_SAMPLER_LOD_CONFIG_MAX((dds->num_mipmaps - 1)<<5) | VIVS_TE_SAMPLER_LOD_CONFIG_MIN(0));
+ //etna_set_state(ctx, VIVS_TE_SAMPLER_UNK2100(0), 0);
+ //etna_set_state(ctx, VIVS_TE_SAMPLER_UNK2140(0), 0);
+
+ /* shader setup */
+ etna_set_state(ctx, VIVS_VS_START_PC, 0x0);
+ etna_set_state(ctx, VIVS_VS_END_PC, vs_size/16);
+ etna_set_state_multi(ctx, VIVS_VS_INPUT_COUNT, 3, (uint32_t[]){
+ /* VIVS_VS_INPUT_COUNT */ VIVS_VS_INPUT_COUNT_UNK8(1) | VIVS_VS_INPUT_COUNT_COUNT(3),
+ /* VIVS_VS_TEMP_REGISTER_CONTROL */ VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS(6),
+ /* VIVS_VS_OUTPUT(0) */ VIVS_VS_OUTPUT_O0(4) |
+ VIVS_VS_OUTPUT_O1(0) |
+ VIVS_VS_OUTPUT_O2(1)});
+ etna_set_state_multi(ctx, VIVS_VS_INST_MEM(0), vs_size/4, vs);
+ etna_set_state(ctx, VIVS_VS_OUTPUT_COUNT, 3);
+ etna_set_state(ctx, VIVS_VS_LOAD_BALANCING, 0xf3f0542); /* depends on number of inputs/outputs/varyings? XXX how exactly */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(0), 16, (uint32_t*)&modelviewprojection.m[0][0]);
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(16), 3, (uint32_t*)&normal.m[0][0]); /* u4.xyz */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(20), 3, (uint32_t*)&normal.m[1][0]); /* u5.xyz */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(24), 3, (uint32_t*)&normal.m[2][0]); /* u6.xyz */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(28), 16, (uint32_t*)&modelview.m[0][0]);
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(19), 2.0); /* u4.w */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(23), 20.0); /* u5.w */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(27), 0.0); /* u6.w */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(45), 0.5); /* u11.y */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(44), 1.0); /* u11.x */
+ etna_set_state(ctx, VIVS_VS_INPUT(0), VIVS_VS_INPUT_I0(0) |
+ VIVS_VS_INPUT_I1(1) |
+ VIVS_VS_INPUT_I2(2));
+
+ etna_set_state(ctx, VIVS_PS_START_PC, 0x0);
+ etna_set_state_multi(ctx, VIVS_PS_END_PC, 2, (uint32_t[]){
+ /* VIVS_PS_END_PC */ ps_size/16,
+ /* VIVS_PS_OUTPUT_REG */ 0x1});
+ etna_set_state_multi(ctx, VIVS_PS_INST_MEM(0), ps_size/4, ps);
+ etna_set_state(ctx, VIVS_PS_INPUT_COUNT, VIVS_PS_INPUT_COUNT_UNK8(31) | VIVS_PS_INPUT_COUNT_COUNT(3));
+ etna_set_state(ctx, VIVS_PS_TEMP_REGISTER_CONTROL, VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS(3));
+ etna_set_state(ctx, VIVS_PS_CONTROL, VIVS_PS_CONTROL_UNK1);
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(0), 1.0); /* u0.x */
+
+ etna_set_state(ctx, VIVS_FE_VERTEX_STREAM_BASE_ADDR, vtx->address); /* ADDR_E */
+ etna_set_state(ctx, VIVS_FE_VERTEX_STREAM_CONTROL,
+ VIVS_FE_VERTEX_STREAM_CONTROL_VERTEX_STRIDE((3 + 3 + 2)*4));
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(0),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM(0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM(3) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_START(0x0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_END(0xc));
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(1),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM(0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM(3) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_START(0xc) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_END(0x18));
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(2),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NONCONSECUTIVE |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM(0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM(2) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_START(0x18) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_END(0x20));
+
+ for(int prim=0; prim<6; ++prim)
+ {
+ etna_draw_primitives(ctx, PRIMITIVE_TYPE_TRIANGLE_STRIP, prim*4, 2);
+ }
+#if 0
+ /* resolve to self */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_X8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_X8R8G8B8) |
+ VIVS_RS_CONFIG_DEST_TILED);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | VIVS_RS_SOURCE_STRIDE_TILING);
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, (padded_width * 4 * 4) | VIVS_RS_DEST_STRIDE_TILING);
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(padded_height) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(padded_width));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+
+ etna_set_state(ctx, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+#endif
+ etna_stall(ctx, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE);
+
+ /* copy to screen */
+ etna_bswap_wait_available(buffers);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_X8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_X8R8G8B8) |
+ VIVS_RS_CONFIG_SWAP_RB);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | VIVS_RS_SOURCE_STRIDE_TILING);
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, fb.fb_fix.line_length);
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, fb.physical[buffers->backbuffer]); /* ADDR_J */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(height) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(width));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+
+ etna_flush(ctx);
+ etna_bswap_queue_swap(buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fb.logical[1-backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ etna_bswap_free(buffers);
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/fb_old/rotate_cube.c b/src/fb_old/rotate_cube.c
new file mode 100644
index 0000000..a0b2777
--- /dev/null
+++ b/src/fb_old/rotate_cube.c
@@ -0,0 +1,645 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Rotating, animated cube.
+ * Adapted to work on gc600 (4 bit per tile, no supertiling) as well as gc800.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include <errno.h>
+
+#include "common.xml.h"
+#include "state.xml.h"
+#include "state_3d.xml.h"
+#include "cmdstream.xml.h"
+
+#include "write_bmp.h"
+#include "viv.h"
+#include "etna.h"
+#include "etna_state.h"
+#include "etna_rs.h"
+#include "etna_fb.h"
+#include "etna_mem.h"
+#include "etna_util.h"
+
+#include "esTransform.h"
+
+#define VERTEX_BUFFER_SIZE 0x60000
+
+float vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+};
+
+float vColors[] = {
+ // front
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f, // magenta
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ // back
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 1.0f, 0.0f, // yellow
+ 0.0f, 1.0f, 0.0f, // green
+ // right
+ 1.0f, 0.0f, 1.0f, // magenta
+ 1.0f, 0.0f, 0.0f, // red
+ 1.0f, 1.0f, 1.0f, // white
+ 1.0f, 1.0f, 0.0f, // yellow
+ // left
+ 0.0f, 0.0f, 0.0f, // black
+ 0.0f, 0.0f, 1.0f, // blue
+ 0.0f, 1.0f, 0.0f, // green
+ 0.0f, 1.0f, 1.0f, // cyan
+ // top
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ 0.0f, 1.0f, 0.0f, // green
+ 1.0f, 1.0f, 0.0f, // yellow
+ // bottom
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f // magenta
+};
+
+float vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+};
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (6*4)
+
+uint32_t vs[] = {
+ 0x01831009, 0x00000000, 0x00000000, 0x203fc048,
+ 0x02031009, 0x00000000, 0x00000000, 0x203fc058,
+ 0x07841003, 0x39000800, 0x00000050, 0x00000000,
+ 0x07841002, 0x39001800, 0x00aa0050, 0x00390048,
+ 0x07841002, 0x39002800, 0x01540050, 0x00390048,
+ 0x07841002, 0x39003800, 0x01fe0050, 0x00390048,
+ 0x03851003, 0x29004800, 0x000000d0, 0x00000000,
+ 0x03851002, 0x29005800, 0x00aa00d0, 0x00290058,
+ 0x03811002, 0x29006800, 0x015400d0, 0x00290058,
+ 0x07851003, 0x39007800, 0x00000050, 0x00000000,
+ 0x07851002, 0x39008800, 0x00aa0050, 0x00390058,
+ 0x07851002, 0x39009800, 0x01540050, 0x00390058,
+ 0x07801002, 0x3900a800, 0x01fe0050, 0x00390058,
+ 0x0401100c, 0x00000000, 0x00000000, 0x003fc008,
+ 0x03801002, 0x69000800, 0x01fe00c0, 0x00290038,
+ 0x03831005, 0x29000800, 0x01480040, 0x00000000,
+ 0x0383100d, 0x00000000, 0x00000000, 0x00000038,
+ 0x03801003, 0x29000800, 0x014801c0, 0x00000000,
+ 0x00801005, 0x29001800, 0x01480040, 0x00000000,
+ 0x0080108f, 0x3fc06800, 0x00000050, 0x203fc068,
+ 0x03801003, 0x00000800, 0x01480140, 0x00000000,
+ 0x04001009, 0x00000000, 0x00000000, 0x200000b8,
+ 0x02041001, 0x2a804800, 0x00000000, 0x003fc048,
+ 0x02041003, 0x2a804800, 0x00aa05c0, 0x00000002,
+};
+uint32_t ps[] = {
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000
+};
+size_t vs_size = sizeof(vs);
+size_t ps_size = sizeof(ps);
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 256;
+ int padded_width, padded_height;
+ int backbuffer = 0;
+
+ struct fb_info fb;
+ rv = fb_open(0, &fb);
+ if(rv!=0)
+ {
+ exit(1);
+ }
+ width = fb.fb_var.xres;
+ height = fb.fb_var.yres;
+ padded_width = etna_align_up(width, 64);
+ padded_height = etna_align_up(height, 64);
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+ bool supertiled = VIV_FEATURE(conn, chipMinorFeatures0,SUPER_TILED);
+ unsigned bits_per_tile = VIV_FEATURE(conn, chipMinorFeatures0,2BITPERTILE)?2:4;
+ printf("supertiled: %i bits per tile: %i\n", supertiled, bits_per_tile);
+
+ struct etna_vidmem *rt = 0; /* main render target */
+ struct etna_vidmem *rt_ts = 0; /* tile status for main render target */
+ struct etna_vidmem *z = 0; /* depth for main render target */
+ struct etna_vidmem *z_ts = 0; /* depth ts for main render target */
+ struct etna_vidmem *vtx = 0; /* vertex buffer */
+ struct etna_vidmem *aux_rt = 0; /* auxilary render target */
+ struct etna_vidmem *aux_rt_ts = 0; /* tile status for auxilary render target */
+ struct etna_vidmem *bmp = 0; /* bitmap */
+
+ size_t rt_size = padded_width * padded_height * 4;
+ size_t rt_ts_size = etna_align_up((padded_width * padded_height * 4)*bits_per_tile/0x80, 0x100);
+ size_t z_size = padded_width * padded_height * 2;
+ size_t z_ts_size = etna_align_up((padded_width * padded_height * 2)*bits_per_tile/0x80, 0x100);
+ size_t bmp_size = width * height * 4;
+
+ if(etna_vidmem_alloc_linear(conn, &rt, rt_size, gcvSURF_RENDER_TARGET, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &rt_ts, rt_ts_size, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z, z_size, gcvSURF_DEPTH, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z_ts, z_ts_size, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &vtx, VERTEX_BUFFER_SIZE, gcvSURF_VERTEX, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &aux_rt, 0x4000, gcvSURF_RENDER_TARGET, gcvPOOL_SYSTEM, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &aux_rt_ts, 0x80*bits_per_tile, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &bmp, bmp_size, gcvSURF_BITMAP, gcvPOOL_DEFAULT, true)!=ETNA_OK
+ )
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int src_idx = vert * COMPONENTS_PER_VERTEX;
+ int dest_idx = vert * COMPONENTS_PER_VERTEX * 3;
+ for(int comp=0; comp<COMPONENTS_PER_VERTEX; ++comp)
+ {
+ ((float*)vtx->logical)[dest_idx+comp+0] = vVertices[src_idx + comp]; /* 0 */
+ ((float*)vtx->logical)[dest_idx+comp+3] = vNormals[src_idx + comp]; /* 1 */
+ ((float*)vtx->logical)[dest_idx+comp+6] = vColors[src_idx + comp]; /* 2 */
+ }
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* XXX how important is the ordering? I suppose we could group states (except the flushes, kickers, semaphores etc)
+ * and simply submit them at once. Especially for consecutive states and masked stated this could be a big win
+ * in DMA command buffer size. */
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ if(frame % 50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+ /* XXX part of this can be put outside the loop, but until we have usable context management
+ * this is safest.
+ */
+
+ etna_set_state(ctx, VIVS_GL_VERTEX_ELEMENT_CONFIG, 0x1);
+ etna_set_state(ctx, VIVS_RA_CONTROL, 0x1);
+
+ etna_set_state(ctx, VIVS_PA_W_CLIP_LIMIT, 0x34000001);
+ etna_set_state(ctx, VIVS_PA_SYSTEM_MODE, 0x11);
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_UNK22, 0));
+ etna_set_state(ctx, VIVS_SE_CONFIG, 0x0);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT,
+ ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 0));
+ etna_set_state(ctx, VIVS_PE_ALPHA_CONFIG,
+ ETNA_MASKED_BIT(VIVS_PE_ALPHA_CONFIG_BLEND_ENABLE_COLOR, 0) &
+ ETNA_MASKED_BIT(VIVS_PE_ALPHA_CONFIG_BLEND_SEPARATE_ALPHA, 0) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR, BLEND_FUNC_ONE) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA, BLEND_FUNC_ONE) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR, BLEND_FUNC_ZERO) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA, BLEND_FUNC_ZERO) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_EQ_COLOR, BLEND_EQ_ADD) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_EQ_ALPHA, BLEND_EQ_ADD));
+ etna_set_state(ctx, VIVS_PE_ALPHA_BLEND_COLOR,
+ VIVS_PE_ALPHA_BLEND_COLOR_B(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_G(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_R(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_A(0));
+ etna_set_state(ctx, VIVS_PE_ALPHA_OP, ETNA_MASKED_BIT(VIVS_PE_ALPHA_OP_ALPHA_TEST, 0));
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_CULL_FACE_MODE, OFF));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(ctx, VIVS_PE_STENCIL_CONFIG, ETNA_MASKED(VIVS_PE_STENCIL_CONFIG_REF_FRONT, 0) &
+ ETNA_MASKED(VIVS_PE_STENCIL_CONFIG_MASK_FRONT, 0xff) &
+ ETNA_MASKED(VIVS_PE_STENCIL_CONFIG_WRITE_MASK, 0xff) &
+ ETNA_MASKED_INL(VIVS_PE_STENCIL_CONFIG_MODE, DISABLED));
+ etna_set_state(ctx, VIVS_PE_STENCIL_OP, ETNA_MASKED(VIVS_PE_STENCIL_OP_FUNC_FRONT, COMPARE_FUNC_ALWAYS) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_FUNC_BACK, COMPARE_FUNC_ALWAYS) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_FAIL_FRONT, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_FAIL_BACK, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_PASS_FRONT, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_PASS_BACK, STENCIL_OP_KEEP));
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT, ETNA_MASKED(VIVS_PE_COLOR_FORMAT_COMPONENTS, 0xf));
+
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(ctx, VIVS_SE_DEPTH_SCALE, 0x0);
+ etna_set_state(ctx, VIVS_SE_DEPTH_BIAS, 0x0);
+
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_FILL_MODE, SOLID));
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_SHADE_MODEL, SMOOTH));
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT,
+ ETNA_MASKED(VIVS_PE_COLOR_FORMAT_FORMAT, RS_FORMAT_X8R8G8B8) &
+ ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_SUPER_TILED, supertiled));
+
+ etna_set_state(ctx, VIVS_PE_COLOR_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_PE_COLOR_STRIDE, padded_width * 4);
+ etna_set_state(ctx, VIVS_GL_MULTI_SAMPLE_CONFIG,
+ ETNA_MASKED_INL(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES, NONE) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES, 0xf) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12, 0x0) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16, 0x0)
+ );
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT, ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 1));
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_TS_COLOR_CLEAR_VALUE, 0);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG, VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR);
+
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG,
+ ETNA_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT, D16) &
+ ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_SUPER_TILED, supertiled)
+ );
+ etna_set_state(ctx, VIVS_PE_DEPTH_ADDR, z->address); /* ADDR_C */
+ etna_set_state(ctx, VIVS_PE_DEPTH_STRIDE, padded_width * 2);
+ etna_set_state(ctx, VIVS_PE_HDEPTH_CONTROL, VIVS_PE_HDEPTH_CONTROL_FORMAT_DISABLED);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(ctx, VIVS_TS_DEPTH_CLEAR_VALUE, 0xffffffff);
+ etna_set_state(ctx, VIVS_TS_DEPTH_STATUS_BASE, z_ts->address); /* ADDR_D */
+ etna_set_state(ctx, VIVS_TS_DEPTH_SURFACE_BASE, z->address); /* ADDR_C */
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 1)); /* flip-flopping once again */
+
+ /* Warm up RS on aux render target */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+
+ etna_stall(ctx, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
+
+ /* Set up the resolve to clear tile status for main render target
+ * Regard the TS as an image of width 16 with 4 bytes per pixel (64 bytes per row)
+ * XXX need to clear the depth ts too.
+ * */
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_SOURCE_FORMAT__SHIFT) |
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_DEST_FORMAT__SHIFT)
+ );
+ etna_set_state_multi(ctx, VIVS_RS_DITHER(0), 2, (uint32_t[]){0xffffffff, 0xffffffff});
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, 0x40);
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ ((rt_ts_size/0x40) << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (16 << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(ctx, VIVS_RS_FILL_VALUE(0), (bits_per_tile==4)?0x11111111:0x55555555);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL,
+ VIVS_RS_CLEAR_CONTROL_MODE_ENABLED1 |
+ (0xffff << VIVS_RS_CLEAR_CONTROL_BITS__SHIFT));
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_KICKER,
+ 0xbeebbeeb);
+ /** Done */
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_TS_COLOR_CLEAR_VALUE, 0xff7f7f7f);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_CULL_FACE_MODE, CCW));
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_MODE, NONE));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED(VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC, COMPARE_FUNC_ALWAYS));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_MODE, Z));
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NEAR, 0.0);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_FAR, 1.0);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+
+ /* set up primitive assembly */
+ etna_set_state_f32(ctx, VIVS_PA_VIEWPORT_OFFSET_Z, 0.0);
+ etna_set_state_f32(ctx, VIVS_PA_VIEWPORT_SCALE_Z, 1.0);
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_ONLY_DEPTH, 0));
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_OFFSET_X, width << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_OFFSET_Y, height << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_SCALE_X, width << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_SCALE_Y, height << 15);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_LEFT, 0);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_TOP, 0);
+ //etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_RIGHT, (width << 16) | 5);
+ //etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_BOTTOM, (height << 16) | 5);
+ /// XXX really important; setting SCISSOR to |5 as above causes crashes for higher resolutions such as
+ /// 1920x1080. I don't know why.
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_RIGHT, (width << 16)-1);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_BOTTOM, (height << 16)-1);
+
+ /* shader setup */
+ etna_set_state(ctx, VIVS_VS_END_PC, vs_size/16);
+ etna_set_state_multi(ctx, VIVS_VS_INPUT_COUNT, 3, (uint32_t[]){
+ /* VIVS_VS_INPUT_COUNT */ (1<<8) | 3,
+ /* VIVS_VS_TEMP_REGISTER_CONTROL */ 6 << VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS__SHIFT,
+ /* VIVS_VS_OUTPUT(0) */ 4});
+ etna_set_state(ctx, VIVS_VS_START_PC, 0x0);
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(45), 0.5); /* u11.y */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(44), 1.0); /* u11.x */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(27), 0.0); /* u6.w */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(23), 20.0); /* u5.w */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(19), 2.0); /* u4.w */
+
+ /* Now load the shader itself */
+ etna_set_state_multi(ctx, VIVS_VS_INST_MEM(0), vs_size/4, vs);
+ etna_set_state(ctx, VIVS_RA_CONTROL, 0x1);
+ etna_set_state_multi(ctx, VIVS_PS_END_PC, 2, (uint32_t[]){
+ /* VIVS_PS_END_PC */ ps_size/16,
+ /* VIVS_PS_OUTPUT_REG */ 0x1});
+ etna_set_state(ctx, VIVS_PS_START_PC, 0x0);
+ etna_set_state(ctx, VIVS_PA_SHADER_ATTRIBUTES(0), 0x200);
+ etna_set_state(ctx, VIVS_GL_VARYING_NUM_COMPONENTS, /* one varying, with four components */
+ (4 << VIVS_GL_VARYING_NUM_COMPONENTS_VAR0__SHIFT)
+ );
+ etna_set_state_multi(ctx, VIVS_GL_VARYING_COMPONENT_USE(0), 2, (uint32_t[]){ /* one varying, with four components */
+ (VARYING_COMPONENT_USE_USED << VIVS_GL_VARYING_COMPONENT_USE_COMP0__SHIFT) |
+ (VARYING_COMPONENT_USE_USED << VIVS_GL_VARYING_COMPONENT_USE_COMP1__SHIFT) |
+ (VARYING_COMPONENT_USE_USED << VIVS_GL_VARYING_COMPONENT_USE_COMP2__SHIFT) |
+ (VARYING_COMPONENT_USE_USED << VIVS_GL_VARYING_COMPONENT_USE_COMP3__SHIFT)
+ , 0
+ });
+ etna_set_state_multi(ctx, VIVS_PS_INST_MEM(0), ps_size/4, ps);
+ etna_set_state(ctx, VIVS_PS_INPUT_COUNT, (31<<8)|2);
+ etna_set_state(ctx, VIVS_PS_TEMP_REGISTER_CONTROL,
+ (2 << VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS__SHIFT));
+ etna_set_state(ctx, VIVS_PS_CONTROL,
+ VIVS_PS_CONTROL_UNK1
+ );
+ etna_set_state(ctx, VIVS_PA_ATTRIBUTE_ELEMENT_COUNT, 0x100);
+ etna_set_state(ctx, VIVS_GL_VARYING_TOTAL_COMPONENTS, /* one varying, with four components */
+ VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM(4)
+ );
+ etna_set_state(ctx, VIVS_VS_LOAD_BALANCING, 0xf3f0582);
+ etna_set_state(ctx, VIVS_VS_OUTPUT_COUNT, 2);
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_POINT_SIZE_ENABLE, 0));
+
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.5f, 0.0f, 0.0f, 1.0f);
+
+ GLfloat aspect = (GLfloat)(height) / (GLfloat)(width);
+
+ ESMatrix projection;
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 10.0f);
+
+ ESMatrix modelviewprojection;
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+
+ ESMatrix inverse, normal; /* compute inverse transpose normal transformation matrix */
+ esMatrixInverse3x3(&inverse, &modelview);
+ esMatrixTranspose(&normal, &inverse);
+
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(0), 16, (uint32_t*)&modelviewprojection.m[0][0]);
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(16), 3, (uint32_t*)&normal.m[0][0]); /* u4.xyz */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(20), 3, (uint32_t*)&normal.m[1][0]); /* u5.xyz */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(24), 3, (uint32_t*)&normal.m[2][0]); /* u6.xyz */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(28), 16, (uint32_t*)&modelview.m[0][0]);
+ etna_set_state(ctx, VIVS_FE_VERTEX_STREAM_BASE_ADDR, vtx->address); /* ADDR_E */
+ etna_set_state(ctx, VIVS_FE_VERTEX_STREAM_CONTROL,
+ 0x24 << VIVS_FE_VERTEX_STREAM_CONTROL_VERTEX_STRIDE__SHIFT);
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(0),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) |
+ (3 <<VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ (0x0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) |
+ (0xc << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT));
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(1),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) |
+ (3 <<VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ (0xc << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) |
+ (0x18 << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT));
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(2),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NONCONSECUTIVE |
+ (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) |
+ (3 <<VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ (0x18 << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) |
+ (0x24 << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT));
+ etna_set_state(ctx, VIVS_VS_INPUT(0), 0x20100);
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_POINT_SPRITE_ENABLE, 0));
+
+ for(int prim=0; prim<6; ++prim)
+ {
+ etna_draw_primitives(ctx, PRIMITIVE_TYPE_TRIANGLE_STRIP, prim*4, 2);
+ }
+ //etna_finish(ctx);
+ //exit(1);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_flush(ctx);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_X8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_X8R8G8B8) |
+ VIVS_RS_CONFIG_DEST_TILED);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | (supertiled?VIVS_RS_SOURCE_STRIDE_TILING:0));
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, (padded_width * 4 * 4) | (supertiled?VIVS_RS_DEST_STRIDE_TILING:0));
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(padded_height) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(padded_width));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+
+ /* Submit second command buffer */
+ etna_flush(ctx);
+
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT,
+ ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 0));
+
+ /* Submit third command buffer, wait for pixel engine to finish */
+ etna_finish(ctx);
+
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_X8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_X8R8G8B8) /*|
+ VIVS_RS_CONFIG_SWAP_RB*/);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | (supertiled?VIVS_RS_SOURCE_STRIDE_TILING:0));
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, fb.fb_fix.line_length);
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, fb.physical[backbuffer]); /* ADDR_J */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(height) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(width));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+ etna_finish(ctx);
+ /* switch buffers */
+ fb_set_buffer(&fb, backbuffer);
+ backbuffer = 1-backbuffer;
+ }
+
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/fb_old/rstests.c b/src/fb_old/rstests.c
new file mode 100644
index 0000000..8b86512
--- /dev/null
+++ b/src/fb_old/rstests.c
@@ -0,0 +1,330 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Resolve tests
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etnaviv/common.xml.h"
+#include "etnaviv/state.xml.h"
+#include "etnaviv/state_3d.xml.h"
+#include "etnaviv/cmdstream.xml.h"
+
+#include "write_bmp.h"
+#include "fbdemos.h"
+#include "etnaviv/viv.h"
+#include "etnaviv/etna.h"
+#include "etnaviv/etna_fb.h"
+#include "etnaviv/etna_util.h"
+#include "etnaviv/etna_rs.h"
+#include "etnaviv/etna_mem.h"
+
+#include "etna_pipe.h"
+#include "esTransform.h"
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 256;
+ int padded_width, padded_height;
+
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ struct viv_conn *conn = fbs->conn;
+
+ padded_width = etna_align_up(width, 64);
+ padded_height = etna_align_up(height, 64);
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+
+ struct etna_vidmem *rt1 = 0; /* main render target */
+ struct etna_vidmem *rt2 = 0; /* main render target */
+ struct etna_vidmem *rt_ts = 0; /* tile status for main render target */
+ struct etna_vidmem *z = 0; /* depth for main render target */
+ struct etna_vidmem *z_ts = 0; /* depth ts for main render target */
+
+ size_t rt_size = padded_width * padded_height * 4;
+ size_t rt_ts_size = etna_align_up((padded_width * padded_height * 4)/0x100, 0x100);
+ size_t z_size = padded_width * padded_height * 2;
+ size_t z_ts_size = etna_align_up((padded_width * padded_height * 2)/0x100, 0x100);
+
+ if(etna_vidmem_alloc_linear(conn, &rt1, rt_size, VIV_SURF_RENDER_TARGET, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &rt2, rt_size, VIV_SURF_RENDER_TARGET, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &rt_ts, rt_ts_size, VIV_SURF_TILE_STATUS, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z, z_size, VIV_SURF_DEPTH, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z_ts, z_ts_size, VIV_SURF_TILE_STATUS, VIV_POOL_DEFAULT, true)!=ETNA_OK
+ )
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ memset(rt_ts->logical, 0x55, rt_ts->size); // Pattern: cleared
+ //memset(rt_ts->logical, 0xAA, rt_ts->size); // Pattern: weird pattern fill
+ //memset(rt_ts->logical, 0x00, rt_ts->size); // Pattern: filled in (nothing to do)
+ //memset(rt_ts->logical, 0xFF, rt_ts->size); // Pattern: weird pattern fill
+ //
+ /* pattern in:
+ * <32b> [<32b>] <32b> [<32b>] ... delete odd groups of 32 bytes
+ * ->
+ * <32b> <32b> ...
+ */
+ {
+ int src_height = 16;
+ for(int x=0; x<(src_height/4)*64; ++x)
+ {
+ *(uint16_t*)(rt1->logical + 2*x) = x;
+ }
+ printf("In:\n");
+ for(int x=0; x<(src_height/4); ++x) /* print values, per tile */
+ {
+ printf(" ");
+ for(int y=0; y<16; ++y)
+ printf("%i ", *(uint16_t*)(rt1->logical + 64*x + 2*y));
+ printf("\n");
+ }
+ printf("\n");
+ memset(rt2->logical, 0, rt_size);
+ //int format = RS_FORMAT_R5G6B5;
+ //int format = 0x9;
+ int format = 0x6;
+ bool tiled1 = true;
+ bool tiled2 = false;
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG, 0);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(format) |
+ (tiled1?VIVS_RS_CONFIG_SOURCE_TILED:0) |
+ VIVS_RS_CONFIG_DEST_FORMAT(format) |
+ (tiled2?VIVS_RS_CONFIG_DEST_TILED:0));
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, 64);
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, 64);
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt1->address);
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt2->address);
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(2) | /* height in 4x4 tiles */
+ VIVS_RS_WINDOW_SIZE_WIDTH(16)); /* width spans one 16bpp 4x4 tile = 32 bytes */
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+
+ etna_finish(ctx);
+
+ printf("Out:\n");
+ for(int x=0; x<(src_height/4); ++x) /* print values, per tile */
+ {
+ printf(" ");
+ for(int y=0; y<16; ++y)
+ printf("%i ", *(uint16_t*)(rt2->logical + 32*x + 2*y));
+ printf("\n");
+ }
+ printf("\n");
+ }
+ /* tile->nontiled swizzle ("rotation")
+ * (width 16)
+ * <8b_0> <8b_1> <8b_2> <8b_3> <8b_4> <8b_5> <8b_6> <8b_7> <8b_8> <8b_9> <8b_10> <8b_11> <8b_12> <8b_13> <8b_14> <8b_15>
+ * ->
+ * row0 <8b_0> <8b_4> <8b_8> <8b_12>
+ * row1 <8b_1> <8b_5> <8b_9> <8b_13>
+ * row2 <8b_2> <8b_6> <8b_10> <8b_14>
+ * row3 <8b_3> <8b_7> <8b_11> <8b_15>
+ *
+ * Swizzle other way around
+ *
+ * row0 <8b_0> <8b_1> <8b_2> <8b_3> <8b_4> <8b_5> <8b_6> <8b_7> <8b_8> <8b_9> <8b_10> <8b_11> <8b_12> <8b_13> <8b_14> <8b_15>
+ * row1 <8b_16> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...>
+ * row2 <8b_32> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...>
+ * row3 <8b_48> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...> <...>
+ * ->
+ * tile0 <8b_0> <8b_16> <8b_32> <8b_48>
+ * tile1 <8b_1> <8b_17> <8b_33> <8b_49>
+ * tile2 <8b_2> <8b_18> <8b_34> <8b_50>
+ * tile3 <8b_3> <8b_19> <8b_35> <8b_51>
+ * ...
+ */
+ /* Pass 1
+ *
+ * <16b_0> <16b_1> [<16b_2> <16b_3>] <16b_4> <16b_5> [<16b_6> <16b_7>] <16b_8> <16b_9> [<16b_10> <16b_11>] <16b_12> <16b_13> [<16b_14> <16b_15>]
+ * ->
+ * row0 <16b_0> <16b_4> <16b_8> <16b_12>
+ * row1 <16b_1> <16b_5> <16b_9> <16b_13>
+ * row2 [<16b_2> <16b_6> <16b_10> <16b_14>]
+ * row3 [<16b_3> <16b_7> <16b_11> <16b_15>]
+ *
+ * drop row2 and row3
+ * how to put it back?
+ *
+ * <16b_0> <16b_2> <16b_4> <16b_6> <16b_1> <16b_3> <16b_5> <16b_7>
+ * ->
+ * <16b_0> <16b_1> <16b_2> <16b_3> <16b_4> <16b_5> <16b_6> <16b_7>
+ *
+ */
+
+#if 0
+ uint32_t pixelfmt = RS_FORMAT_X8R8G8B8;
+ bool supertiled = true;
+ bool tiled = true;
+ uint32_t stride = 0;
+ if(tiled)
+ {
+ stride = (padded_width * 4 * 4) | (supertiled?VIVS_RS_DEST_STRIDE_TILING:0);
+ } else {
+ stride = (padded_width * 4) | (supertiled?VIVS_RS_DEST_STRIDE_TILING:0);
+ }
+ {
+ etna_set_state(ctx, VIVS_GL_VERTEX_ELEMENT_CONFIG, 0x1);
+ etna_set_state(ctx, VIVS_RA_CONTROL, 0x1);
+
+ etna_set_state(ctx, VIVS_PA_W_CLIP_LIMIT, 0x34000001);
+ etna_set_state(ctx, VIVS_PA_SYSTEM_MODE, 0x11);
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_UNK22, 0));
+
+ etna_set_state(ctx, VIVS_SE_CONFIG, 0x0);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+
+ /* Set up resolve to self */
+ etna_set_state(ctx, VIVS_TS_COLOR_CLEAR_VALUE, 0xff7f7f7f);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+#if 0 /* don't care about depth, for now */
+ etna_set_state(ctx, VIVS_TS_DEPTH_CLEAR_VALUE, 0xffffffff);
+ etna_set_state(ctx, VIVS_TS_DEPTH_STATUS_BASE, z_ts->address); /* ADDR_D */
+ etna_set_state(ctx, VIVS_TS_DEPTH_SURFACE_BASE, z->address); /* ADDR_C */
+#endif
+
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR
+ /*VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION*/);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(pixelfmt) |
+ (tiled?VIVS_RS_CONFIG_SOURCE_TILED:0) |
+ VIVS_RS_CONFIG_DEST_FORMAT(pixelfmt) |
+ (tiled?VIVS_RS_CONFIG_DEST_TILED:0));
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, stride);
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, stride);
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(padded_height) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(padded_width));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+
+ etna_set_state(ctx, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH | VIVS_GL_FLUSH_CACHE_COLOR);
+
+ /* Clear part using normal (not fast) clear */
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG, 0);
+ etna_set_state_multi(ctx, VIVS_RS_DITHER(0), 2, (uint32_t[]){0xffffffff, 0xffffffff});
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(0x100) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(0x100));
+ etna_set_state(ctx, VIVS_RS_FILL_VALUE(0), 0xffff0000);
+ etna_set_state(ctx, VIVS_RS_FILL_VALUE(1), 0xff00ff00);
+ etna_set_state(ctx, VIVS_RS_FILL_VALUE(2), 0xff0000ff);
+ etna_set_state(ctx, VIVS_RS_FILL_VALUE(3), 0xffff00ff);
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, 0); /* fill disregards source anyway */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt->address + 64*64*4); /* Offset one entire 64*64 tile. Interesting things happen if only a partial tile is offset. */
+ /* Pure FILL_VALUE(0) */
+ //etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_ENABLED1 | VIVS_RS_CLEAR_CONTROL_BITS(0xffff));
+ /* Vertical line pattern */
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_ENABLED4 | VIVS_RS_CLEAR_CONTROL_BITS(0xffff));
+ /* Same as ENABLED2 */
+ //etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_ENABLED4_2 | VIVS_RS_CLEAR_CONTROL_BITS(0xffff));
+
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0);
+ etna_set_state(ctx, VIVS_RS_KICKER,
+ 0xbeebbeeb);
+
+ etna_finish(ctx);
+
+#if 0
+ /* manually fill, to figure out tiling pattern */
+ for(int x=0; x<16384/4; ++x)
+ {
+ int a = (x & 0x3F) << 2;
+ int b = ((x >> 3) & 0x3F) << 2;
+ int c = ((x >> 6) & 0x3F) << 2;
+ ((uint32_t*)(rt->logical + 16384*6))[x] = (a & 0xFF) | ((b & 0xFF) << 8) | ((c & 0xFF) << 16);
+ printf("%08x\n", (a & 0xFF) | ((b & 0xFF) << 8) | ((c & 0xFF) << 16));
+ }
+#endif
+
+ /* Copy image to screen */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG, 0);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(pixelfmt) |
+ (tiled?VIVS_RS_CONFIG_SOURCE_TILED:0) |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_X8R8G8B8) |
+ VIVS_RS_CONFIG_SWAP_RB);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, stride);
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, stride);
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, fb.physical[backbuffer]); /* ADDR_J */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(height) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(width));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+ etna_finish(ctx);
+
+ /* switch buffers */
+ fb_set_buffer(&fb, backbuffer);
+ backbuffer = 1-backbuffer;
+ }
+#endif
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/fb_rawshader/.gitignore b/src/fb_rawshader/.gitignore
new file mode 100644
index 0000000..6a1b2a0
--- /dev/null
+++ b/src/fb_rawshader/.gitignore
@@ -0,0 +1,13 @@
+fbtest
+etna_test
+rotate_cube
+cube_companion
+mip_cube
+rstests
+alpha_blend
+cubemap_sphere
+stencil_test
+displacement
+particle_system
+etna_gears
+
diff --git a/src/fb_rawshader/Makefile b/src/fb_rawshader/Makefile
new file mode 100644
index 0000000..4df810b
--- /dev/null
+++ b/src/fb_rawshader/Makefile
@@ -0,0 +1,46 @@
+TOP=..
+
+include $(TOP)/Makefile.inc
+
+COMMON_FLAGS += -I$(TOP)/resources -I$(TOP)/driver
+CFLAGS += -DDUMP
+CXXFLAGS +=
+LDFLAGS +=
+
+TARGETS = mip_cube cubemap_sphere stencil_test alpha_blend cube_companion particle_system displacement etna_gears rotate_cube
+COMPANION_OBJS = ../resources/companion_array.o ../resources/companion_mesh.o ../resources/companion_texture.o
+ETNA_OBJS = ../lib/fbdemos.o ../lib/etna_bswap.o ../lib/etna_rawshader.o ../driver/libetnadriver.a ../minigallium/libminigallium.a ../etnaviv/libetnaviv.a
+
+all: $(TARGETS)
+
+clean:
+ rm -f *.o ../lib/*.o ../resources/*.o
+ rm -f $(TARGETS)
+
+rotate_cube: rotate_cube.o ../lib/write_bmp.o $(ETNA_OBJS) ../lib/esTransform.o
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+mip_cube: mip_cube.o ../lib/write_bmp.o ../lib/esTransform.o ../lib/dds.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+cubemap_sphere: cubemap_sphere.o ../lib/write_bmp.o ../lib/esTransform.o ../lib/dds.o ../lib/esShapes.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+cube_companion: cube_companion.o ../lib/write_bmp.o ../lib/esTransform.o $(COMPANION_OBJS) $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+alpha_blend: alpha_blend.o ../lib/write_bmp.o ../lib/esTransform.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+stencil_test: stencil_test.o ../lib/write_bmp.o ../lib/esTransform.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+particle_system: particle_system.o ../lib/write_bmp.o ../lib/esUtil.o ../lib/esTransform.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+displacement: displacement.o ../lib/write_bmp.o ../lib/esUtil.o ../lib/esTransform.o ../lib/esShapes.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+etna_gears: etna_gears.o ../lib/write_bmp.o ../lib/esUtil.o ../lib/esTransform.o ../lib/esShapes.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
diff --git a/src/fb_rawshader/alpha_blend.c b/src/fb_rawshader/alpha_blend.c
new file mode 100644
index 0000000..87f763f
--- /dev/null
+++ b/src/fb_rawshader/alpha_blend.c
@@ -0,0 +1,376 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Experiments with alpha blending
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "etna_rawshader.h"
+#include "util/u_inlines.h"
+
+#include "write_bmp.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "dds.h"
+
+/*********************************************************************/
+#define VERTEX_BUFFER_SIZE 0x60000
+
+float vVertices[] = {
+ -1.0f, -1.0f, +0.0f,
+ +1.0f, -1.0f, +0.0f,
+ -1.0f, +1.0f, +0.0f,
+ +1.0f, +1.0f, +0.0f,
+};
+
+float vColors[] = {
+ 0.8f, 0.8f, 0.8f,
+ 0.9f, 0.9f, 0.9f,
+ 1.0f, 1.0f, 1.0f,
+ 1.0f, 1.0f, 1.0f,
+};
+
+float vNormals[] = {
+ +0.0f, +0.0f, +1.0f,
+ +0.0f, +0.0f, +1.0f,
+ +0.0f, +0.0f, +1.0f,
+ +0.0f, +0.0f, +1.0f,
+};
+
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (4)
+
+/* alpha_blend_vs.asm */
+uint32_t vs[] = {
+ 0x07841003,0x39000800,0x00000050,0x00000000,
+ 0x07841002,0x39001800,0x00aa0050,0x00390048,
+ 0x07841002,0x39002800,0x01540050,0x00390048,
+ 0x07841002,0x39003800,0x01fe0050,0x00390048,
+ 0x07801009,0x00000000,0x00000000,0x00390028,
+ 0x07801003,0x39000800,0x01c80640,0x00000002,
+ 0x02041001,0x2a804800,0x00000000,0x003fc048,
+ 0x02041003,0x2a804800,0x00aa05c0,0x00000002,
+};
+/* passthrough (nop)
+ * register 1 will contain color on input, and will be used as output */
+uint32_t ps[] = {
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000
+};
+
+const struct etna_shader_program shader = {
+ .num_inputs = 3,
+ .inputs = {{.vs_reg=0},{.vs_reg=1},{.vs_reg=2}},
+ .num_varyings = 1,
+ .varyings = {
+ {.num_components=4, .special=ETNA_VARYING_VSOUT, .pa_attributes=0x200, .vs_reg=0}, /* color */
+ },
+ .vs_code_size = sizeof(vs)/4,
+ .vs_code = (uint32_t*)vs,
+ .vs_pos_out_reg = 4, // t4 out
+ .vs_load_balancing = 0xf3f0582, /* depends on number of inputs/outputs/varyings? XXX how exactly */
+ .vs_num_temps = 6,
+ .vs_uniforms_size = 13*4,
+ .vs_uniforms = (uint32_t*)(const float[12*4]){
+ [19] = 2.0f, /* u4.w */
+ [23] = 20.0f, /* u5.w */
+ [27] = 0.0f, /* u6.w */
+ [45] = 0.5f, /* u11.y */
+ [44] = 1.0f, /* u11.x */
+ },
+ .ps_code_size = sizeof(ps)/4,
+ .ps_code = (uint32_t*)ps,
+ .ps_color_out_reg = 1, // t1 out
+ .ps_num_temps = 2,
+ .ps_uniforms_size = 1*4,
+ .ps_uniforms = (uint32_t*)(const float[1*4]){
+ [0] = 1.0f,
+ },
+};
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* interleave vertex data */
+ struct pipe_transfer *transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &transfer);
+ assert(vtx_logical);
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int dest_idx = vert * (3 + 3 + 3);
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+0] = vVertices[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+3] = vNormals[vert*3 + comp]; /* 1 */
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+6] = vColors[vert*3 + comp]; /* 2 */
+ }
+ pipe_buffer_unmap(pipe, transfer);
+
+ /* compile gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 1,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA,
+ .colormask = 0xf
+ }
+ });
+
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .min_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_LINEAR,
+ .mag_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_BACK, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 0,
+ .writemask = 0,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ struct pipe_vertex_buffer vertex_buf_desc = {
+ .stride = (3 + 3 + 3)*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ };
+
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0xc,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* texture coord */
+ .src_offset = 0x18,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ }
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* bind */
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+
+ pipe->set_vertex_buffers(pipe, 0, 1, &vertex_buf_desc);
+ pipe->set_index_buffer(pipe, NULL);/*&(struct pipe_index_buffer){
+ .index_size = 0,
+ .offset = 0,
+ .buffer = 0,
+ .user_buffer = 0
+ });*/ /* non-indexed rendering */
+
+ void *shader_state = etna_create_shader_state(pipe, &shader);
+ etna_bind_shader_state(pipe, shader_state);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix projection;
+ float aspect = (float)(height) / (float)(width);
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -1.8f, +1.8f, -1.8f * aspect, +1.8f * aspect, 5.0f, 10.0f);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ for(int idx=0; idx<5; ++idx)
+ {
+ ESMatrix modelview, modelviewprojection;
+ esMatrixLoadIdentity(&modelview);
+
+ esTranslate(&modelview, 0.0f, 0.0f, -7.0f);
+ //esRotate(&modelview, 25.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 35.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.15f, 1.0f, 0.0f, 0.0f);
+ esTranslate(&modelview, 0.0f, 0.0f, 0.3f * idx);
+
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 0, 16, (uint32_t*)&modelviewprojection.m[0][0]);
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 28, 16, (uint32_t*)&modelview.m[0][0]);
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 48, 4, (uint32_t*)(float[]) /* material color */
+ {idx*0.25f, 0.3f, 1.0f - idx*0.25f, 0.5f});
+
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 0,
+ .mode = PIPE_PRIM_TRIANGLE_STRIP,
+ .start = 0,
+ .count = 4
+ });
+ }
+
+#if 0
+ etna_dump_cmd_buffer(ctx);
+ exit(0);
+#endif
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
+
diff --git a/src/fb_rawshader/alpha_blend_vs.asm b/src/fb_rawshader/alpha_blend_vs.asm
new file mode 100644
index 0000000..a6b2472
--- /dev/null
+++ b/src/fb_rawshader/alpha_blend_vs.asm
@@ -0,0 +1,15 @@
+; VS used for `alpha_blend` test
+
+; compute output position using model-view-projection
+MUL t4, u0, t0.xxxx, void
+MAD t4, u1, t0.yyyy, t4
+MAD t4, u2, t0.zzzz, t4
+MAD t4, u3, t0.wwww, t4
+
+; compute output color
+MOV t0, void, void, t2 ; t0 = vertex color
+MUL t0, t0, u12, void ; multiply in material color
+
+; transform z of output vertex
+ADD t4.__z_, t4.zzzz, void, t4.wwww ; z = z + w
+MUL t4.__z_, t4.zzzz, u11.yyyy, void ; z = (z + w) * 0.5
diff --git a/src/fb_rawshader/cube_companion.c b/src/fb_rawshader/cube_companion.c
new file mode 100644
index 0000000..dbb3f3e
--- /dev/null
+++ b/src/fb_rawshader/cube_companion.c
@@ -0,0 +1,423 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Animated rotating "weighted companion cube", using array or indexed rendering
+ * Exercised in this demo:
+ * - Array and indexed rendering of arbitrary mesh
+ * - Video memory allocation
+ * - Setting up render state
+ * - Depth buffer
+ * - Vertex / fragment shader
+ * - Texturing
+ * - Double-buffered rendering to framebuffer
+ * - Mipmapping (hw generation, if possible)
+ */
+#define INDEXED
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "etna_rawshader.h"
+#include "util/u_inlines.h"
+
+#include "write_bmp.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "dds.h"
+#include "companion.h"
+
+/*********************************************************************/
+#define INDEXED /* Used indexed rendering */
+#define INDEX_BUFFER_SIZE 0x8000
+#define VERTEX_BUFFER_SIZE 0x60000
+uint32_t vs[] = {
+ 0x01831009, 0x00000000, 0x00000000, 0x203fc048,
+ 0x02031009, 0x00000000, 0x00000000, 0x203fc058,
+ 0x07841003, 0x39000800, 0x00000050, 0x00000000,
+ 0x07841002, 0x39001800, 0x00aa0050, 0x00390048,
+ 0x07841002, 0x39002800, 0x01540050, 0x00390048,
+ 0x07841002, 0x39003800, 0x01fe0050, 0x00390048,
+ 0x03851003, 0x29004800, 0x000000d0, 0x00000000,
+ 0x03851002, 0x29005800, 0x00aa00d0, 0x00290058,
+ 0x03811002, 0x29006800, 0x015400d0, 0x00290058,
+ 0x07851003, 0x39007800, 0x00000050, 0x00000000,
+ 0x07851002, 0x39008800, 0x00aa0050, 0x00390058,
+ 0x07851002, 0x39009800, 0x01540050, 0x00390058,
+ 0x07801002, 0x3900a800, 0x01fe0050, 0x00390058,
+ 0x0401100c, 0x00000000, 0x00000000, 0x003fc008,
+ 0x03801002, 0x69000800, 0x01fe00c0, 0x00290038,
+ 0x03831005, 0x29000800, 0x01480040, 0x00000000,
+ 0x0383100d, 0x00000000, 0x00000000, 0x00000038,
+ 0x03801003, 0x29000800, 0x014801c0, 0x00000000,
+ 0x00801005, 0x29001800, 0x01480040, 0x00000000,
+ 0x0380108f, 0x3fc06800, 0x00000050, 0x203fc068,
+ 0x04001009, 0x00000000, 0x00000000, 0x200000b8,
+ 0x01811009, 0x00000000, 0x00000000, 0x00150028,
+ 0x02041001, 0x2a804800, 0x00000000, 0x003fc048,
+ 0x02041003, 0x2a804800, 0x00aa05c0, 0x00000002,
+};
+uint32_t ps[] = { /* texture sampling */
+ 0x07811003, 0x00000800, 0x01c800d0, 0x00000000,
+ 0x07821018, 0x15002f20, 0x00000000, 0x00000000,
+ 0x07811003, 0x39001800, 0x01c80140, 0x00000000,
+};
+
+const struct etna_shader_program shader = {
+ .num_inputs = 3,
+ .inputs = {{.vs_reg=0},{.vs_reg=1},{.vs_reg=2}},
+ .num_varyings = 2,
+ .varyings = {
+ {.num_components=4, .special=ETNA_VARYING_VSOUT, .pa_attributes=0x200, .vs_reg=0}, /* color */
+ {.num_components=2, .special=ETNA_VARYING_VSOUT, .pa_attributes=0x200, .vs_reg=1} /* texcoord */
+ },
+ .vs_code_size = sizeof(vs)/4,
+ .vs_code = (uint32_t*)vs,
+ .vs_pos_out_reg = 4, // t4 out
+ .vs_load_balancing = 0xf3f0542, /* depends on number of inputs/outputs/varyings? XXX how exactly */
+ .vs_num_temps = 6,
+ .vs_uniforms_size = 12*4,
+ .vs_uniforms = (uint32_t*)(const float[12*4]){
+ [19] = 2.0f, /* u4.w */
+ [23] = 20.0f, /* u5.w */
+ [27] = 0.0f, /* u6.w */
+ [45] = 0.5f, /* u11.y */
+ [44] = 1.0f, /* u11.x */
+ },
+ .ps_code_size = sizeof(ps)/4,
+ .ps_code = (uint32_t*)ps,
+ .ps_color_out_reg = 1, // t1 out
+ .ps_num_temps = 3,
+ .ps_uniforms_size = 1*4,
+ .ps_uniforms = (uint32_t*)(const float[1*4]){
+ [0] = 1.0f,
+ },
+};
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ /* Convert and upload embedded texture */
+ struct pipe_resource *tex_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_SAMPLER_VIEW, PIPE_FORMAT_B8G8R8X8_UNORM,
+ COMPANION_TEXTURE_WIDTH, COMPANION_TEXTURE_HEIGHT, 0);
+ void *temp = malloc(COMPANION_TEXTURE_WIDTH * COMPANION_TEXTURE_HEIGHT * 4);
+ etna_convert_r8g8b8_to_b8g8r8x8(temp, (const uint8_t*)companion_texture, COMPANION_TEXTURE_WIDTH * COMPANION_TEXTURE_HEIGHT);
+ etna_pipe_inline_write(pipe, tex_resource, 0, 0, temp, COMPANION_TEXTURE_WIDTH * COMPANION_TEXTURE_HEIGHT * 4);
+ free(temp);
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* geometry */
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+ struct pipe_resource *idx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_IMMUTABLE, INDEX_BUFFER_SIZE);
+
+ struct pipe_transfer *vtx_transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &vtx_transfer);
+ assert(vtx_logical);
+ struct pipe_transfer *idx_transfer = 0;
+ float *idx_logical = pipe_buffer_map(pipe, idx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &idx_transfer);
+ assert(idx_logical);
+#ifndef INDEXED
+ printf("Interleaving vertices...\n");
+ float *vertices_array = companion_vertices_array();
+ float *texture_coordinates_array =
+ companion_texture_coordinates_array();
+ float *normals_array = companion_normals_array();
+ assert(COMPANION_ARRAY_COUNT*(3+3+2)*sizeof(float) < VERTEX_BUFFER_SIZE);
+ for(int vert=0; vert<COMPANION_ARRAY_COUNT; ++vert)
+ {
+ int dest_idx = vert * (3 + 3 + 2);
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx_logical)[dest_idx+comp+0] = vertices_array[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx_logical)[dest_idx+comp+3] = normals_array[vert*3 + comp]; /* 1 */
+ for(int comp=0; comp<2; ++comp)
+ ((float*)vtx_logical)[dest_idx+comp+6] = texture_coordinates_array[vert*2 + comp]; /* 2 */
+ }
+#else
+ printf("Interleaving vertices and copying index buffer...\n");
+ assert(COMPANION_VERTEX_COUNT*(3+3+2)*sizeof(float) < VERTEX_BUFFER_SIZE);
+ for(int vert=0; vert<COMPANION_VERTEX_COUNT; ++vert)
+ {
+ int dest_idx = vert * (3 + 3 + 2);
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx_logical)[dest_idx+comp+0] = companion_vertices[vert][comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx_logical)[dest_idx+comp+3] = companion_normals[vert][comp]; /* 1 */
+ for(int comp=0; comp<2; ++comp)
+ ((float*)vtx_logical)[dest_idx+comp+6] = companion_texture_coordinates[vert][comp]; /* 2 */
+ }
+ assert(COMPANION_TRIANGLE_COUNT*3*sizeof(unsigned short) < INDEX_BUFFER_SIZE);
+ memcpy(idx_logical, &companion_triangles[0][0], COMPANION_TRIANGLE_COUNT*3*sizeof(unsigned short));
+#endif
+ pipe_buffer_unmap(pipe, vtx_transfer);
+ pipe_buffer_unmap(pipe, idx_transfer);
+
+ struct pipe_vertex_buffer vertex_buffer_desc = {
+ .stride = (3 + 3 + 2)*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ };
+ struct pipe_index_buffer index_buffer_desc = {
+ .index_size = sizeof(unsigned short),
+ .offset = 0,
+ .buffer = idx_resource,
+ .user_buffer = 0
+ };
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0xc,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* texture coord */
+ .src_offset = 0x18,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32_FLOAT
+ }
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+
+ /* compile other gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 0,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_ONE,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_ONE,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .colormask = 0xf
+ }
+ });
+
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .min_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_LINEAR,
+ .mag_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_BACK, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ struct pipe_sampler_view *sampler_view = pipe->create_sampler_view(pipe, tex_resource, &(struct pipe_sampler_view){
+ .format = tex_resource->format,
+ .u.tex.first_level = 0,
+ .u.tex.last_level = 0,
+ .swizzle_r = PIPE_SWIZZLE_RED,
+ .swizzle_g = PIPE_SWIZZLE_GREEN,
+ .swizzle_b = PIPE_SWIZZLE_BLUE,
+ .swizzle_a = PIPE_SWIZZLE_ALPHA,
+ });
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* bind */
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+ pipe->set_fragment_sampler_views(pipe, 1, &sampler_view);
+ pipe->set_vertex_buffers(pipe, 0, 1, &vertex_buffer_desc);
+ pipe->set_index_buffer(pipe, &index_buffer_desc);
+
+ void *shader_state = etna_create_shader_state(pipe, &shader);
+ etna_bind_shader_state(pipe, shader_state);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview, projection, modelviewprojection;
+ ESMatrix inverse, normal;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -9.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.5f, 0.0f, 0.0f, 1.0f);
+ esScale(&modelview, 0.475f, 0.475f, 0.475f);
+ float aspect = (float)(height) / (float)(width);
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 10.0f);
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+ esMatrixInverse3x3(&inverse, &modelview);
+ esMatrixTranspose(&normal, &inverse);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 0, 16, (uint32_t*)&modelviewprojection.m[0][0]);
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 16, 3, (uint32_t*)&normal.m[0][0]); /* u4.xyz */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 20, 3, (uint32_t*)&normal.m[1][0]); /* u5.xyz */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 24, 3, (uint32_t*)&normal.m[2][0]); /* u6.xyz */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 28, 16, (uint32_t*)&modelview.m[0][0]);
+
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+#ifdef INDEXED
+ .indexed = 1,
+#else
+ .indexed = 0,
+#endif
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 0,
+ .count = COMPANION_TRIANGLE_COUNT * 3
+ });
+
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
diff --git a/src/fb_rawshader/cube_companion_ps.asm b/src/fb_rawshader/cube_companion_ps.asm
new file mode 100644
index 0000000..195a83d
--- /dev/null
+++ b/src/fb_rawshader/cube_companion_ps.asm
@@ -0,0 +1,3 @@
+MUL t1, u0.xxxx, t1, void
+TEXLD t2, tex0, t2.xyyy, void, void
+MUL t1, t1, t2, void
diff --git a/src/fb_rawshader/cube_companion_vs.asm b/src/fb_rawshader/cube_companion_vs.asm
new file mode 100644
index 0000000..d9fdfa0
--- /dev/null
+++ b/src/fb_rawshader/cube_companion_vs.asm
@@ -0,0 +1,24 @@
+MOV t3.xy__, void, void, u4.wwww
+MOV t3.__z_, void, void, u5.wwww
+MUL t4, u0, t0.xxxx, void
+MAD t4, u1, t0.yyyy, t4
+MAD t4, u2, t0.zzzz, t4
+MAD t4, u3, t0.wwww, t4
+MUL t5.xyz_, u4.xyzz, t1.xxxx, void
+MAD t5.xyz_, u5.xyzz, t1.yyyy, t5.xyzz
+MAD t1.xyz_, u6.xyzz, t1.zzzz, t5.xyzz
+MUL t5, u7, t0.xxxx, void
+MAD t5, u8, t0.yyyy, t5
+MAD t5, u9, t0.zzzz, t5
+MAD t0, u10, t0.wwww, t5
+RCP t1.___w, void, void, t0.wwww
+MAD t0.xyz_, -t0.xyzz, t1.wwww, t3.xyzz
+DP3 t3.xyz_, t0.xyzz, t0.xyzz, void
+RSQ t3.xyz_, void, void, t3.xxxx
+MUL t0.xyz_, t0.xyzz, t3.xyzz, void
+DP3 t0.x___, t1.xyzz, t0.xyzz, void
+SELECT.LT t0.xyz_, u6.wwww, t0.xxxx, u6.wwww
+MOV t0.___w, void, void, u11.xxxx
+MOV t1.xy__, void, void, t2.xyyy
+ADD t4.__z_, t4.zzzz, void, t4.wwww
+MUL t4.__z_, t4.zzzz, u11.yyyy, void
diff --git a/src/fb_rawshader/cubemap_sphere.c b/src/fb_rawshader/cubemap_sphere.c
new file mode 100644
index 0000000..9a199c5
--- /dev/null
+++ b/src/fb_rawshader/cubemap_sphere.c
@@ -0,0 +1,405 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Mip cube, but in terms of minigallium pipe
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "etna_rawshader.h"
+#include "util/u_inlines.h"
+
+#include "write_bmp.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "esShapes.h"
+#include "dds.h"
+
+/*********************************************************************/
+#define VERTEX_BUFFER_SIZE 0x60000
+
+/* cubemap_sphere_vs.asm */
+const uint32_t vs[] = {
+ 0x01831009,0x00000000,0x00000000,0x203fc048,
+ 0x02031009,0x00000000,0x00000000,0x203fc058,
+ 0x07841003,0x39000800,0x00000050,0x00000000,
+ 0x07841002,0x39001800,0x00aa0050,0x00390048,
+ 0x07841002,0x39002800,0x01540050,0x00390048,
+ 0x07841002,0x39003800,0x01fe0050,0x00390048,
+ 0x03851003,0x29004800,0x000000d0,0x00000000,
+ 0x03851002,0x29005800,0x00aa00d0,0x00290058,
+ 0x03811002,0x29006800,0x015400d0,0x00290058,
+ 0x07851003,0x39007800,0x00000050,0x00000000,
+ 0x07851002,0x39008800,0x00aa0050,0x00390058,
+ 0x07851002,0x39009800,0x01540050,0x00390058,
+ 0x07801002,0x3900a800,0x01fe0050,0x00390058,
+ 0x0401100c,0x00000000,0x00000000,0x003fc008,
+ 0x03801002,0x69000800,0x01fe00c0,0x00290038,
+ 0x03831005,0x29000800,0x01480040,0x00000000,
+ 0x0383100d,0x00000000,0x00000000,0x00000038,
+ 0x03801003,0x29000800,0x014801c0,0x00000000,
+ 0x00801005,0x29001800,0x01480040,0x00000000,
+ 0x0380108f,0x3fc06800,0x00000050,0x203fc068,
+ 0x04001009,0x00000000,0x00000000,0x200000b8,
+ 0x02041001,0x2a804800,0x00000000,0x003fc048,
+ 0x02041003,0x2a804800,0x00aa05c0,0x00000002,
+};
+/* cubemap_sphere_ps.asm */
+const uint32_t ps[] = { /* texture sampling */
+ 0x07811003,0x00000800,0x01c800d0,0x00000000,
+ 0x07821018,0x29002f20,0x00000000,0x00000000,
+ 0x07811003,0x39001800,0x01c80140,0x00000000,
+};
+
+const struct etna_shader_program shader = {
+ .num_inputs = 3,
+ .inputs = {{.vs_reg=0},{.vs_reg=1},{.vs_reg=2}},
+ .num_varyings = 2,
+ .varyings = {
+ {.num_components=4, .special=ETNA_VARYING_VSOUT, .pa_attributes=0x200, .vs_reg=0},
+ {.num_components=3, .special=ETNA_VARYING_VSOUT, .pa_attributes=0x200, .vs_reg=1}
+ },
+ .vs_code_size = sizeof(vs)/4,
+ .vs_code = (uint32_t*)vs,
+ .vs_pos_out_reg = 4, // t4 out
+ .vs_load_balancing = 0xf3f0542,
+ .vs_num_temps = 6,
+ .vs_uniforms_size = 12*4,
+ .vs_uniforms = (uint32_t*)(const float[12*4]){
+ [19] = 2.0f, /* u4.w */
+ [23] = 20.0f, /* u5.w */
+ [27] = 0.0f, /* u6.w */
+ [45] = 0.5f, /* u11.y */
+ [44] = 1.0f, /* u11.x */
+ },
+ .ps_code_size = sizeof(ps)/4,
+ .ps_code = (uint32_t*)ps,
+ .ps_color_out_reg = 1, // t1 out
+ .ps_num_temps = 3,
+ .ps_uniforms_size = 2*4,
+ .ps_uniforms = (uint32_t*)(const float[2*4]){
+ [0] = 1.0f,
+ [4] = 1.0f,
+ [5] = -1.0f,
+ [6] = -1.0f,
+ [7] = 0.0f
+ },
+};
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ struct pipe_resource *tex_resource = fbdemo_create_cube(fbs->screen, PIPE_BIND_SAMPLER_VIEW, FMT_X8R8G8B8, 1, 1, 0);
+
+ uint32_t tex_data[6] = {
+ 0xffff0000,
+ 0xff00ff00,
+ 0xff0000ff,
+ 0xffffff00,
+ 0xffff00ff,
+ 0xffffffff
+ };
+ for(int layerid=0; layerid<6; ++layerid)
+ etna_pipe_inline_write(pipe, tex_resource, layerid, 0, &tex_data[layerid], sizeof(uint32_t));
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+ struct pipe_resource *idx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ float *vVertices;
+ float *vNormals;
+ float *vTexCoords;
+ uint16_t *vIndices;
+ int numVertices = 0;
+ int numIndices = esGenSphere(20, 1.0f, &vVertices, &vNormals,
+ &vTexCoords, &vIndices, &numVertices);
+
+ struct pipe_transfer *vtx_transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &vtx_transfer);
+ for(int vert=0; vert<numVertices; ++vert)
+ {
+ int dest_idx = vert * (3 + 3 + 2);
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+0] = vVertices[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+3] = vNormals[vert*3 + comp]; /* 1 */
+ for(int comp=0; comp<2; ++comp)
+ vtx_logical[dest_idx+comp+6] = vTexCoords[vert*2 + comp]; /* 2 */
+ }
+ pipe_buffer_unmap(pipe, vtx_transfer);
+
+ struct pipe_transfer *idx_transfer = 0;
+ float *idx_logical = pipe_buffer_map(pipe, idx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &idx_transfer);
+ memcpy(idx_logical, vIndices, numIndices*sizeof(uint16_t));
+ pipe_buffer_unmap(pipe, idx_transfer);
+
+ /* compile gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 0,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_ONE,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_ONE,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .colormask = 0xf
+ }
+ });
+
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_REPEAT,
+ .wrap_t = PIPE_TEX_WRAP_REPEAT,
+ .wrap_r = PIPE_TEX_WRAP_REPEAT,
+ .min_img_filter = PIPE_TEX_FILTER_NEAREST,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_NONE,
+ .mag_img_filter = PIPE_TEX_FILTER_NEAREST,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_BACK, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 0,
+ .writemask = 0,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0xc,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* texture coord */
+ .src_offset = 0x18,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32_FLOAT
+ }
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+ struct pipe_sampler_view *sampler_view = pipe->create_sampler_view(pipe, tex_resource, &(struct pipe_sampler_view){
+ .format = tex_resource->format,
+ .u.tex.first_level = 0,
+ .u.tex.last_level = 0,
+ .swizzle_r = PIPE_SWIZZLE_RED,
+ .swizzle_g = PIPE_SWIZZLE_GREEN,
+ .swizzle_b = PIPE_SWIZZLE_BLUE,
+ .swizzle_a = PIPE_SWIZZLE_ALPHA,
+ });
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* bind */
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+ pipe->set_fragment_sampler_views(pipe, 1, &sampler_view);
+ pipe->set_vertex_buffers(pipe, 0, 1, &(struct pipe_vertex_buffer){
+ .stride = (3 + 3 + 2)*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ });
+ pipe->set_index_buffer(pipe, &(struct pipe_index_buffer){
+ .index_size = 2,
+ .offset = 0,
+ .buffer = idx_resource,
+ .user_buffer = 0
+ }); /* non-indexed rendering */
+
+ void *shader_state = etna_create_shader_state(pipe, &shader);
+ etna_bind_shader_state(pipe, shader_state);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview, projection, modelviewprojection;
+ ESMatrix inverse, normal;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.5f, 0.0f, 0.0f, 1.0f);
+ float aspect = (float)(height) / (float)(width);
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -1.8f, +1.8f, -1.8f * aspect, +1.8f * aspect, 6.0f, 10.0f);
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+ esMatrixInverse3x3(&inverse, &modelview);
+ esMatrixTranspose(&normal, &inverse);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 0, 16, (uint32_t*)&modelviewprojection.m[0][0]);
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 16, 3, (uint32_t*)&normal.m[0][0]); /* u4.xyz */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 20, 3, (uint32_t*)&normal.m[1][0]); /* u5.xyz */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 24, 3, (uint32_t*)&normal.m[2][0]); /* u6.xyz */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 28, 16, (uint32_t*)&modelview.m[0][0]);
+
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 1,
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 0,
+ .count = numIndices
+ });
+
+#if 0
+ etna_dump_cmd_buffer(ctx);
+ exit(0);
+#endif
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
diff --git a/src/fb_rawshader/cubemap_sphere_ps.asm b/src/fb_rawshader/cubemap_sphere_ps.asm
new file mode 100644
index 0000000..a866354
--- /dev/null
+++ b/src/fb_rawshader/cubemap_sphere_ps.asm
@@ -0,0 +1,5 @@
+; ps program for cubemap_sphere
+MUL t1, u0.xxxx, t1, void
+TEXLD t2, tex0, t2.xyzz, void, void
+;TEXLD t2, tex0, u1, void, void
+MUL t1, t1, t2, void
diff --git a/src/fb_rawshader/cubemap_sphere_vs.asm b/src/fb_rawshader/cubemap_sphere_vs.asm
new file mode 100644
index 0000000..e1b253f
--- /dev/null
+++ b/src/fb_rawshader/cubemap_sphere_vs.asm
@@ -0,0 +1,25 @@
+; vertex program for cubemap_sphere
+MOV t3.xy__, void, void, u4.wwww
+MOV t3.__z_, void, void, u5.wwww
+MUL t4, u0, t0.xxxx, void
+MAD t4, u1, t0.yyyy, t4
+MAD t4, u2, t0.zzzz, t4
+MAD t4, u3, t0.wwww, t4
+MUL t5.xyz_, u4.xyzz, t1.xxxx, void
+MAD t5.xyz_, u5.xyzz, t1.yyyy, t5.xyzz
+MAD t1.xyz_, u6.xyzz, t1.zzzz, t5.xyzz
+MUL t5, u7, t0.xxxx, void
+MAD t5, u8, t0.yyyy, t5
+MAD t5, u9, t0.zzzz, t5
+MAD t0, u10, t0.wwww, t5
+RCP t1.___w, void, void, t0.wwww
+MAD t0.xyz_, -t0.xyzz, t1.wwww, t3.xyzz
+DP3 t3.xyz_, t0.xyzz, t0.xyzz, void
+RSQ t3.xyz_, void, void, t3.xxxx
+MUL t0.xyz_, t0.xyzz, t3.xyzz, void
+DP3 t0.x___, t1.xyzz, t0.xyzz, void
+SELECT.LT t0.xyz_, u6.wwww, t0.xxxx, u6.wwww
+MOV t0.___w, void, void, u11.xxxx
+;MOV t1.xy__, void, void, t2.xyyy
+ADD t4.__z_, t4.zzzz, void, t4.wwww
+MUL t4.__z_, t4.zzzz, u11.yyyy, void
diff --git a/src/fb_rawshader/displacement.c b/src/fb_rawshader/displacement.c
new file mode 100644
index 0000000..64d3c6f
--- /dev/null
+++ b/src/fb_rawshader/displacement.c
@@ -0,0 +1,439 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Displacement mapping using vertex texture.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "etna_rawshader.h"
+#include "util/u_inlines.h"
+
+#include "write_bmp.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "esShapes.h"
+#include "dds.h"
+
+/*********************************************************************/
+#ifndef M_PI
+# define M_PI 3.14159265358979323846 /* pi */
+#endif
+
+#define VERTEX_BUFFER_SIZE 0x60000
+
+/* displacement_vs.asm */
+const uint32_t vs[] = {
+0x01831009,0x00000000,0x00000000,0x203fc048,
+0x02031009,0x00000000,0x00000000,0x203fc058,
+0x47841018,0x15000f20,0x00000000,0x00000000,
+0x00841003,0x00004800,0x015405c0,0x00000002,
+0x03841003,0x00004800,0x01480140,0x00000000,
+0x04041009,0x00000000,0x00000000,0x203fc068,
+0x07841001,0x39001800,0x00000000,0x00390048,
+0x07851003,0x39000800,0x00000250,0x00000000,
+0x07851002,0x39001800,0x00aa0250,0x00390058,
+0x07851002,0x39002800,0x01540250,0x00390058,
+0x07841002,0x39003800,0x01fe0250,0x00390058,
+0x03851003,0x29004800,0x00000150,0x00000000,
+0x03851002,0x29005800,0x00aa0150,0x00290058,
+0x03821002,0x29006800,0x01540150,0x00290058,
+0x07851003,0x39007800,0x000000d0,0x00000000,
+0x07851002,0x39008800,0x00aa00d0,0x00390058,
+0x07851002,0x39009800,0x015400d0,0x00390058,
+0x07811002,0x3900a800,0x01fe00d0,0x00390058,
+0x0402100c,0x00000000,0x00000000,0x003fc018,
+0x03811002,0x69001800,0x01fe0140,0x00290038,
+0x03831005,0x29001800,0x014800c0,0x00000000,
+0x0383100d,0x00000000,0x00000000,0x00000038,
+0x03811003,0x29001800,0x014801c0,0x00000000,
+0x00811005,0x29002800,0x014800c0,0x00000000,
+0x0081108f,0x3fc06800,0x000000d0,0x203fc068,
+0x03011009,0x00000000,0x00000000,0x203fc068,
+0x04011009,0x00000000,0x00000000,0x200000b8,
+0x02041001,0x2a804800,0x00000000,0x003fc048,
+0x02041003,0x2a804800,0x00aa05c0,0x00000002,
+};
+/* displacement_ps.asm */
+const uint32_t ps[] = {
+0x00000000,0x00000000,0x00000000,0x00000000,
+};
+
+const struct etna_shader_program shader = {
+ .num_inputs = 3,
+ .inputs = {{.vs_reg=1},{.vs_reg=2},{.vs_reg=0}},
+ .num_varyings = 1,
+ .varyings = {
+ {.num_components=4, .special=ETNA_VARYING_VSOUT, .pa_attributes=0x200, .vs_reg=1}
+ },
+ .vs_code_size = sizeof(vs)/4,
+ .vs_code = (uint32_t*)vs,
+ .vs_pos_out_reg = 4, // t4 out
+ .vs_load_balancing = 0xf3f0582,
+ .vs_num_temps = 6,
+ .vs_uniforms_size = 12*4,
+ .vs_uniforms = (uint32_t*)(const float[12*4]){
+ [19] = 2.0f, /* u4.w */
+ [23] = 20.0f, /* u5.w */
+ [27] = 0.0f, /* u6.w */
+ [44] = 1.0f, /* u11.x */
+ [45] = 0.5f, /* u11.y */
+ [46] = 0.2f, /* u11.z -- scaling factor applied to displacement */
+ },
+ .ps_code_size = sizeof(ps)/4,
+ .ps_code = (uint32_t*)ps,
+ .ps_color_out_reg = 1, // t1 out
+ .ps_num_temps = 2,
+ .ps_uniforms_size = 0,
+ .ps_uniforms = NULL,
+};
+
+#define TEX_WIDTH (32)
+#define TEX_HEIGHT (32)
+static struct pipe_resource *createSimpleTexture(struct pipe_screen *screen, struct pipe_context *pipe)
+{
+ struct pipe_resource *tex_resource = fbdemo_create_2d(screen, PIPE_BIND_SAMPLER_VIEW, PIPE_FORMAT_L8_UNORM, TEX_WIDTH, TEX_HEIGHT, 0);
+ uint8_t pixels[TEX_HEIGHT][TEX_WIDTH];
+
+ for(int y=0; y<TEX_HEIGHT; ++y)
+ {
+ for(int x=0; x<TEX_WIDTH; ++x)
+ {
+ float xx = (float)x / (float)(TEX_WIDTH-1) * 2.0f - 1.0f;
+ float yy = (float)y / (float)(TEX_HEIGHT-1) * 2.0f - 1.0f;
+ //float vv = (0.25*xx*xx*yy*yy);
+ //float vv = (sin(xx*2.0*M_PI*2.0)*sin(yy*2.0*M_PI*2.0) + 1.0f) / 2.0f;
+ float vv = sin(xx*2.0*M_PI*2.0)*sin(yy*2.0*M_PI*2.0);
+ vv = vv * (1.0 - yy * yy); /* flatten over poles */
+ pixels[y][x] = etna_cfloat_to_uint8(vv);
+ printf("%3i ", pixels[y][x]);
+ }
+ printf("\n");
+ }
+
+ etna_pipe_inline_write(pipe, tex_resource, 0, 0, &pixels[0][0], TEX_WIDTH*TEX_HEIGHT);
+
+ return tex_resource;
+}
+#undef TEX_WIDTH
+#undef TEX_HEIGHT
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+ struct pipe_resource *idx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ float *vVertices;
+ float *vNormals;
+ float *vTexCoords;
+ uint16_t *vIndices;
+ int numVertices = 0;
+ int numIndices = esGenSphere(80, 1.0f, &vVertices, &vNormals,
+ &vTexCoords, &vIndices, &numVertices);
+
+ unsigned vtxStride = 3+3+2;
+ assert((numVertices * vtxStride*4) < VERTEX_BUFFER_SIZE);
+ struct pipe_transfer *vtx_transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &vtx_transfer);
+ for(int vert=0; vert<numVertices; ++vert)
+ {
+ int dest_idx = vert * vtxStride;
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+0] = vVertices[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+3] = vNormals[vert*3 + comp]; /* 1 */
+ for(int comp=0; comp<2; ++comp)
+ vtx_logical[dest_idx+comp+6] = vTexCoords[vert*2 + comp]; /* 2 */
+ }
+ pipe_buffer_unmap(pipe, vtx_transfer);
+
+ assert((numIndices * 2) < VERTEX_BUFFER_SIZE);
+ struct pipe_transfer *idx_transfer = 0;
+ void *idx_logical = pipe_buffer_map(pipe, idx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &idx_transfer);
+ memcpy(idx_logical, vIndices, numIndices*sizeof(uint16_t));
+ pipe_buffer_unmap(pipe, idx_transfer);
+
+ /* compile gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 0,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_ONE,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_ONE,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .colormask = 0xf
+ }
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_BACK, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0xc,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* texture coord */
+ .src_offset = 0x18,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32_FLOAT
+ }
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+
+ /* texture... */
+ struct pipe_resource *tex_resource = createSimpleTexture(fbs->screen, pipe);
+ struct pipe_sampler_view *sampler_view = pipe->create_sampler_view(pipe, tex_resource, &(struct pipe_sampler_view){
+ .format = tex_resource->format,
+ .u.tex.first_level = 0,
+ .u.tex.last_level = 0,
+ .swizzle_r = PIPE_SWIZZLE_RED,
+ .swizzle_g = PIPE_SWIZZLE_GREEN,
+ .swizzle_b = PIPE_SWIZZLE_BLUE,
+ .swizzle_a = PIPE_SWIZZLE_ALPHA,
+ });
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_REPEAT,
+ .wrap_t = PIPE_TEX_WRAP_REPEAT,
+ .wrap_r = PIPE_TEX_WRAP_REPEAT,
+ .min_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_NONE,
+ .mag_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* bind */
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+ pipe->set_vertex_buffers(pipe, 0, 1, &(struct pipe_vertex_buffer){
+ .stride = vtxStride*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ });
+ pipe->set_index_buffer(pipe, &(struct pipe_index_buffer){
+ .index_size = 2,
+ .offset = 0,
+ .buffer = idx_resource,
+ .user_buffer = 0
+ }); /* non-indexed rendering */
+
+ /* vertex samplers */
+ pipe->bind_vertex_sampler_states(pipe, 1, &sampler);
+ pipe->set_vertex_sampler_views(pipe, 1, &sampler_view);
+
+ void *shader_state = etna_create_shader_state(pipe, &shader);
+ etna_bind_shader_state(pipe, shader_state);
+
+ ESMatrix projection;
+ float aspect = (float)(height) / (float)(width);
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -1.8f, +1.8f, -1.8f * aspect, +1.8f * aspect, 6.0f, 10.0f);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview, modelviewprojection;
+ ESMatrix inverse, normal;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.5f, 0.0f, 0.0f, 1.0f);
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+ esMatrixInverse3x3(&inverse, &modelview);
+ esMatrixTranspose(&normal, &inverse);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 0, 16, (uint32_t*)&modelviewprojection.m[0][0]);
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 16, 3, (uint32_t*)&normal.m[0][0]); /* u4.xyz */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 20, 3, (uint32_t*)&normal.m[1][0]); /* u5.xyz */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 24, 3, (uint32_t*)&normal.m[2][0]); /* u6.xyz */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 28, 16, (uint32_t*)&modelview.m[0][0]);
+
+ float scaling = fmodf(frame* 0.025f, 2.0f);
+ if(scaling > 1.0f)
+ scaling = 2.0f - scaling; // sawtooth
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 46, 1, (uint32_t*)&scaling);
+
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 1,
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 0,
+ .count = numIndices
+ });
+
+#if 0
+ etna_dump_cmd_buffer(ctx);
+ exit(0);
+#endif
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
diff --git a/src/fb_rawshader/displacement_ps.asm b/src/fb_rawshader/displacement_ps.asm
new file mode 100644
index 0000000..fbdf24e
--- /dev/null
+++ b/src/fb_rawshader/displacement_ps.asm
@@ -0,0 +1 @@
+NOP void, void, void, void
diff --git a/src/fb_rawshader/displacement_vs.asm b/src/fb_rawshader/displacement_vs.asm
new file mode 100644
index 0000000..35f9f06
--- /dev/null
+++ b/src/fb_rawshader/displacement_vs.asm
@@ -0,0 +1,33 @@
+; test for vertex texture fetch
+; this crashes the blob driver on my Arnova as it doesn't properly set up sampler 8
+; so I wonder if this will work when I properly setup that sampler (it does!)
+; u11.z scaling factor applied to displacement
+MOV t3.xy__, void, void, u4.wwww
+MOV t3.__z_, void, void, u5.wwww
+TEXLD t4, tex8, t0.xyyy, void, void
+MUL t4.x___, t4.x, u11.z, void ; apply scaling factor to displacement
+MUL t4.xyz_, t4.xxxx, t2.xyzz, void
+MOV t4.___w, void, void, u6.wwww
+ADD t4, t1, void, t4
+MUL t5, u0, t4.xxxx, void
+MAD t5, u1, t4.yyyy, t5
+MAD t5, u2, t4.zzzz, t5
+MAD t4, u3, t4.wwww, t5
+MUL t5.xyz_, u4.xyzz, t2.xxxx, void
+MAD t5.xyz_, u5.xyzz, t2.yyyy, t5.xyzz
+MAD t2.xyz_, u6.xyzz, t2.zzzz, t5.xyzz
+MUL t5, u7, t1.xxxx, void
+MAD t5, u8, t1.yyyy, t5
+MAD t5, u9, t1.zzzz, t5
+MAD t1, u10, t1.wwww, t5
+RCP t2.___w, void, void, t1.wwww
+MAD t1.xyz_, -t1.xyzz, t2.wwww, t3.xyzz
+DP3 t3.xyz_, t1.xyzz, t1.xyzz, void
+RSQ t3.xyz_, void, void, t3.xxxx
+MUL t1.xyz_, t1.xyzz, t3.xyzz, void
+DP3 t1.x___, t2.xyzz, t1.xyzz, void
+SELECT.LT t1.x___, u6.wwww, t1.xxxx, u6.wwww
+MOV t1._yz_, void, void, u6.wwww
+MOV t1.___w, void, void, u11.xxxx
+ADD t4.__z_, t4.zzzz, void, t4.wwww
+MUL t4.__z_, t4.zzzz, u11.yyyy, void
diff --git a/src/fb_rawshader/etna_gears.c b/src/fb_rawshader/etna_gears.c
new file mode 100644
index 0000000..dfc0fe0
--- /dev/null
+++ b/src/fb_rawshader/etna_gears.c
@@ -0,0 +1,658 @@
+/*
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Ported to GLES2.
+ * Kristian Høgsberg <krh@bitplanet.net>
+ * May 3, 2010
+ *
+ * Improve GLES2 port:
+ * * Refactor gear drawing.
+ * * Use correct normals for surfaces.
+ * * Improve shader.
+ * * Use perspective projection transformation.
+ * * Add FPS count.
+ * * Add comments.
+ * Alexandros Frantzis <alexandros.frantzis@linaro.org>
+ * Jul 13, 2010
+ */
+/* Ported to Etna by Wladimir van der Laan */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "etna_pipe.h"
+#include "etna_rawshader.h"
+#include "util/u_inlines.h"
+
+#include "write_bmp.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "esShapes.h"
+#include "esUtil.h"
+
+#ifndef M_PI
+# define M_PI 3.14159265358979323846 /* pi */
+#endif
+
+#define STRIPS_PER_TOOTH 7
+#define VERTICES_PER_TOOTH 34
+#define GEAR_VERTEX_STRIDE 6
+
+/**
+ * Struct describing the vertices in triangle strip
+ */
+struct vertex_strip {
+ /** The first vertex in the strip */
+ int first;
+ /** The number of consecutive vertices in the strip after the first */
+ int count;
+};
+
+/* Each vertex consist of GEAR_VERTEX_STRIDE float attributes */
+typedef float GearVertex[GEAR_VERTEX_STRIDE];
+
+/**
+ * Struct representing a gear.
+ */
+struct gear {
+ /** The array of vertices comprising the gear */
+ GearVertex *vertices;
+ /** The number of vertices comprising the gear */
+ int nvertices;
+ /** The array of triangle strips comprising the gear */
+ struct vertex_strip *strips;
+ /** The number of triangle strips comprising the gear */
+ int nstrips;
+ /** The Vertex Buffer Object holding the vertices in the graphics card */
+ struct pipe_resource *vtx_resource;
+ void *vertex_elements;
+ struct pipe_vertex_buffer vertex_buffer;
+};
+
+/** The view rotation [x, y, z] */
+static float view_rot[3] = { 20.0, 30.0, 0.0 };
+/** The gears */
+static struct gear *gear1, *gear2, *gear3;
+/** The current gear rotation angle */
+static float angle = 0.0;
+/** The projection matrix */
+static ESMatrix ProjectionMatrix;
+/** The direction of the directional light for the scene */
+static const float LightSourcePosition[4] = { 5.0, 5.0, 10.0, 1.0};
+
+/**
+ * Fills a gear vertex.
+ *
+ * @param v the vertex to fill
+ * @param x the x coordinate
+ * @param y the y coordinate
+ * @param z the z coortinate
+ * @param n pointer to the normal table
+ *
+ * @return the operation error code
+ */
+static GearVertex *
+vert(GearVertex *v, float x, float y, float z, float n[3])
+{
+ v[0][0] = x;
+ v[0][1] = y;
+ v[0][2] = z;
+ v[0][3] = n[0];
+ v[0][4] = n[1];
+ v[0][5] = n[2];
+
+ return v + 1;
+}
+
+static void sincos_(double x, double *s, double *c)
+{
+ *s = sin(x);
+ *c = cos(x);
+}
+
+/**
+ * Create a gear wheel.
+ *
+ * @param inner_radius radius of hole at center
+ * @param outer_radius radius at center of teeth
+ * @param width width of gear
+ * @param teeth number of teeth
+ * @param tooth_depth depth of tooth
+ *
+ * @return pointer to the constructed struct gear
+ */
+static struct gear *
+create_gear(struct pipe_screen *screen, struct pipe_context *pipe, float inner_radius, float outer_radius, float width,
+ int teeth, float tooth_depth)
+{
+ float r0, r1, r2;
+ float da;
+ GearVertex *v;
+ struct gear *gear;
+ double s[5], c[5];
+ float normal[3];
+ int cur_strip = 0;
+ int i;
+
+ /* Allocate memory for the gear */
+ gear = malloc(sizeof *gear);
+ if (gear == NULL)
+ return NULL;
+
+ /* Calculate the radii used in the gear */
+ r0 = inner_radius;
+ r1 = outer_radius - tooth_depth / 2.0;
+ r2 = outer_radius + tooth_depth / 2.0;
+
+ da = 2.0 * M_PI / teeth / 4.0;
+
+ /* Allocate memory for the triangle strip information */
+ gear->nstrips = STRIPS_PER_TOOTH * teeth;
+ gear->strips = calloc(gear->nstrips, sizeof (*gear->strips));
+
+ /* Allocate memory for the vertices */
+ gear->vertices = calloc(VERTICES_PER_TOOTH * teeth, sizeof(*gear->vertices));
+ v = gear->vertices;
+
+ for (i = 0; i < teeth; i++) {
+ /* Calculate needed sin/cos for varius angles */
+ sincos_(i * 2.0 * M_PI / teeth, &s[0], &c[0]);
+ sincos_(i * 2.0 * M_PI / teeth + da, &s[1], &c[1]);
+ sincos_(i * 2.0 * M_PI / teeth + da * 2, &s[2], &c[2]);
+ sincos_(i * 2.0 * M_PI / teeth + da * 3, &s[3], &c[3]);
+ sincos_(i * 2.0 * M_PI / teeth + da * 4, &s[4], &c[4]);
+
+ /* A set of macros for making the creation of the gears easier */
+#define GEAR_POINT(r, da) { (r) * c[(da)], (r) * s[(da)] }
+#define SET_NORMAL(x, y, z) do { \
+ normal[0] = (x); normal[1] = (y); normal[2] = (z); \
+} while(0)
+
+#define GEAR_VERT(v, point, sign) vert((v), p[(point)].x, p[(point)].y, (sign) * width * 0.5, normal)
+
+#define START_STRIP do { \
+ gear->strips[cur_strip].first = v - gear->vertices; \
+} while(0);
+
+#define END_STRIP do { \
+ int _tmp = (v - gear->vertices); \
+ gear->strips[cur_strip].count = _tmp - gear->strips[cur_strip].first; \
+ cur_strip++; \
+} while (0)
+
+#define QUAD_WITH_NORMAL(p1, p2) do { \
+ SET_NORMAL((p[(p1)].y - p[(p2)].y), -(p[(p1)].x - p[(p2)].x), 0); \
+ v = GEAR_VERT(v, (p1), -1); \
+ v = GEAR_VERT(v, (p1), 1); \
+ v = GEAR_VERT(v, (p2), -1); \
+ v = GEAR_VERT(v, (p2), 1); \
+} while(0)
+
+ struct point {
+ float x;
+ float y;
+ };
+
+ /* Create the 7 points (only x,y coords) used to draw a tooth */
+ struct point p[7] = {
+ GEAR_POINT(r2, 1), // 0
+ GEAR_POINT(r2, 2), // 1
+ GEAR_POINT(r1, 0), // 2
+ GEAR_POINT(r1, 3), // 3
+ GEAR_POINT(r0, 0), // 4
+ GEAR_POINT(r1, 4), // 5
+ GEAR_POINT(r0, 4), // 6
+ };
+
+ /* Front face */
+ START_STRIP;
+ SET_NORMAL(0, 0, 1.0);
+ v = GEAR_VERT(v, 0, +1);
+ v = GEAR_VERT(v, 1, +1);
+ v = GEAR_VERT(v, 2, +1);
+ v = GEAR_VERT(v, 3, +1);
+ v = GEAR_VERT(v, 4, +1);
+ v = GEAR_VERT(v, 5, +1);
+ v = GEAR_VERT(v, 6, +1);
+ END_STRIP;
+
+ /* Inner face */
+ START_STRIP;
+ QUAD_WITH_NORMAL(4, 6);
+ END_STRIP;
+
+ /* Back face */
+ START_STRIP;
+ SET_NORMAL(0, 0, -1.0);
+ v = GEAR_VERT(v, 6, -1);
+ v = GEAR_VERT(v, 5, -1);
+ v = GEAR_VERT(v, 4, -1);
+ v = GEAR_VERT(v, 3, -1);
+ v = GEAR_VERT(v, 2, -1);
+ v = GEAR_VERT(v, 1, -1);
+ v = GEAR_VERT(v, 0, -1);
+ END_STRIP;
+
+ /* Outer face */
+ START_STRIP;
+ QUAD_WITH_NORMAL(0, 2);
+ END_STRIP;
+
+ START_STRIP;
+ QUAD_WITH_NORMAL(1, 0);
+ END_STRIP;
+
+ START_STRIP;
+ QUAD_WITH_NORMAL(3, 1);
+ END_STRIP;
+
+ START_STRIP;
+ QUAD_WITH_NORMAL(5, 3);
+ END_STRIP;
+ }
+
+ gear->nvertices = (v - gear->vertices);
+
+ /* element layout */
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0x0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0xc,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ }
+ };
+ gear->vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+
+ /* Store the vertices in a vertex buffer object (VBO) */
+ gear->vtx_resource = pipe_buffer_create(screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, gear->nvertices * sizeof(GearVertex));
+ etna_pipe_inline_write(pipe, gear->vtx_resource, 0, 0, gear->vertices, gear->nvertices * sizeof(GearVertex));
+
+ gear->vertex_buffer.stride = sizeof(GearVertex);
+ gear->vertex_buffer.buffer_offset = 0;
+ gear->vertex_buffer.buffer = gear->vtx_resource;
+ gear->vertex_buffer.user_buffer = 0;
+
+ return gear;
+}
+
+/**
+ * Draws a gear.
+ *
+ * @param gear the gear to draw
+ * @param transform the current transformation matrix
+ * @param x the x position to draw the gear at
+ * @param y the y position to draw the gear at
+ * @param angle the rotation angle of the gear
+ * @param color the color of the gear
+ */
+static void
+draw_gear(struct pipe_context *pipe, struct gear *gear, void *shader_state, ESMatrix *transform,
+ float x, float y, float angle, const float color[4])
+{
+ ESMatrix model_view;
+ ESMatrix normal_matrix;
+ ESMatrix model_view_projection;
+
+ /* Translate and rotate the gear */
+ model_view = *transform;
+ esTranslate(&model_view, x, y, 0);
+ esRotate(&model_view, -angle, 0, 0, 1);
+
+ /* Create and set the ModelViewProjectionMatrix */
+ esMatrixMultiply(&model_view_projection, &model_view, &ProjectionMatrix);
+
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 6*4, 16, (uint32_t*)&model_view_projection.m[0][0]);
+
+ /*
+ * Create and set the NormalMatrix. It's the inverse transpose of the
+ * ModelView matrix.
+ */
+ ESMatrix inverse_model_view;
+ esMatrixInverse3x3(&inverse_model_view, &model_view);
+ esMatrixTranspose(&normal_matrix, &inverse_model_view);
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 0*4, 16, (uint32_t*)&normal_matrix.m[0][0]);
+
+ /* Set the gear color */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 5*4, 4, (uint32_t*)color);
+
+ /* Set up the position of the attributes in the vertex buffer object */
+ pipe->bind_vertex_elements_state(pipe, gear->vertex_elements);
+ pipe->set_vertex_buffers(pipe, 0, 1, &gear->vertex_buffer);
+ pipe->set_index_buffer(pipe, NULL);
+
+ /* Draw the triangle strips that comprise the gear */
+ int n;
+ for (n = 0; n < gear->nstrips; n++)
+ {
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 0,
+ .mode = PIPE_PRIM_TRIANGLE_STRIP,
+ .start = gear->strips[n].first,
+ .count = gear->strips[n].count
+ });
+ }
+}
+
+/**
+ * Draws the gears.
+ */
+static void
+gears_draw(struct pipe_context *pipe, void *shader_state)
+{
+ const static float red[4] = { 0.8, 0.1, 0.0, 1.0 };
+ const static float green[4] = { 0.0, 0.8, 0.2, 1.0 };
+ const static float blue[4] = { 0.2, 0.2, 1.0, 1.0 };
+ ESMatrix transform;
+ esMatrixLoadIdentity(&transform);
+
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ /* Translate and rotate the view */
+ esTranslate(&transform, 0, 0, -15);
+ esRotate(&transform, -view_rot[0], 1, 0, 0);
+ esRotate(&transform, -view_rot[1], 0, 1, 0);
+ esRotate(&transform, -view_rot[2], 0, 0, 1);
+
+ /* Draw the gears */
+ draw_gear(pipe, gear1, shader_state, &transform, -3.0, -2.0, angle, red);
+ draw_gear(pipe, gear2, shader_state, &transform, 3.1, -2.0, -2 * angle - 9.0, green);
+ draw_gear(pipe, gear3, shader_state, &transform, -3.1, 4.2, -2 * angle - 25.0, blue);
+}
+
+/**
+ * Handles a new window size or exposure.
+ *
+ * @param width the window width
+ * @param height the window height
+ */
+static void
+gears_reshape(struct pipe_context *pipe, int width, int height)
+{
+ /* Update the projection matrix */
+ esMatrixLoadIdentity(&ProjectionMatrix);
+ esPerspective(&ProjectionMatrix, 60.0, width / (float)height, 1.0, 1024.0);
+
+ /* Set the viewport */
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+}
+
+static void
+gears_idle(struct etna_bswap_buffers *buffers)
+{
+ static int frames = 0;
+ static double tRot0 = -1.0, tRate0 = -1.0;
+ double dt, t = esNow();
+
+ if (tRot0 < 0.0)
+ tRot0 = t;
+ dt = t - tRot0;
+ tRot0 = t;
+
+ /* advance rotation for next frame */
+ angle += 70.0 * dt; /* 70 degrees per second */
+ if (angle > 3600.0)
+ angle -= 3600.0;
+
+ etna_swap_buffers(buffers);
+ frames++;
+
+ if (tRate0 < 0.0)
+ tRate0 = t;
+ if (t - tRate0 >= 5.0) {
+ float seconds = t - tRate0;
+ float fps = frames / seconds;
+ printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds,
+ fps);
+ tRate0 = t;
+ frames = 0;
+ }
+}
+
+/* etna_gears_vs.asm */
+uint32_t vs[] = {
+0x07821003,0x39000800,0x00000050,0x00000000,
+0x07821002,0x39001800,0x00aa0050,0x00390028,
+0x07801002,0x39002800,0x01540050,0x00390028,
+0x07801001,0x39000800,0x00000000,0x20390038,
+0x03821005,0x29000800,0x01480040,0x00000000,
+0x0382100d,0x00000000,0x00000000,0x00000028,
+0x03801003,0x29000800,0x01480140,0x00000000,
+0x03821005,0x29004800,0x01480250,0x00000002,
+0x0382100d,0x00000000,0x00000000,0x00000028,
+0x03821003,0x29004800,0x01480150,0x00000000,
+0x00801005,0x29000800,0x01480140,0x00000000,
+0x0080108f,0x00000800,0x00000540,0x0000000a,
+0x07801003,0x00000800,0x01c802c0,0x00000002,
+0x07821003,0x39006800,0x000000d0,0x00000000,
+0x07821002,0x39007800,0x00aa00d0,0x00390028,
+0x07811002,0x39008800,0x015400d0,0x00390028,
+0x07811001,0x39001800,0x00000000,0x20390098,
+0x02011001,0x2a801800,0x00000000,0x003fc018,
+0x02011003,0x2a801800,0x00aa0540,0x00000002,
+};
+/* etna_gears_ps.asm */
+uint32_t ps[] = {
+0x00000000,0x00000000,0x00000000,0x00000000,
+};
+
+const struct etna_shader_program shader = {
+ .num_inputs = 2,
+ .inputs = {{.vs_reg=1},{.vs_reg=0}},
+ .num_varyings = 1,
+ .varyings = {
+ {.num_components=4, .special=ETNA_VARYING_VSOUT, .pa_attributes=0x200, .vs_reg=0},
+ },
+ .vs_code_size = sizeof(vs)/4,
+ .vs_code = (uint32_t*)vs,
+ .vs_pos_out_reg = 1,
+ .vs_load_balancing = 0xf3f0582,
+ .vs_num_temps = 3,
+ .vs_uniforms_size = 12*4,
+ .vs_uniforms = (uint32_t*)(const float[12*4]){
+ [40] = 0.0f, /* u10.x */
+ [41] = 0.5f, /* u10.y */
+ },
+ .ps_code_size = sizeof(ps)/4,
+ .ps_code = (uint32_t*)ps,
+ .ps_color_out_reg = 1, // t1 in/out passthrough
+ .ps_num_temps = 2,
+ .ps_uniforms_size = 0,
+ .ps_uniforms = NULL
+};
+
+int
+main(int argc, char *argv[])
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* compile gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 0,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_ONE,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_ONE,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .colormask = 0xf
+ }
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_BACK, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+
+ void *shader_state = etna_create_shader_state(pipe, &shader);
+ etna_bind_shader_state(pipe, shader_state);
+
+ /* Set the LightSourcePosition uniform which is constant throught the program */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 4*4, 4, (uint32_t*)LightSourcePosition);
+
+ /* make the gears */
+ gear1 = create_gear(fbs->screen, pipe, 1.0, 4.0, 1.0, 20, 0.7);
+ gear2 = create_gear(fbs->screen, pipe, 0.5, 2.0, 2.0, 10, 0.7);
+ gear3 = create_gear(fbs->screen, pipe, 1.3, 2.0, 0.5, 10, 0.7);
+
+ gears_reshape(pipe, width, height);
+
+ int frame = 0;
+ while(true)
+ {
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+ gears_draw(pipe, shader_state);
+#if 0
+ etna_dump_cmd_buffer(ctx);
+ exit(0);
+#endif
+ gears_idle(fbs->buffers);
+ frame++;
+ }
+ fbdemo_free(fbs);
+
+ return 0;
+}
+
diff --git a/src/fb_rawshader/etna_gears_ps.asm b/src/fb_rawshader/etna_gears_ps.asm
new file mode 100644
index 0000000..675fd09
--- /dev/null
+++ b/src/fb_rawshader/etna_gears_ps.asm
@@ -0,0 +1,12 @@
+; etna_gears ps
+NOP void, void, void, void
+; GLSL:
+;
+; precision mediump float;
+; varying vec4 Color;
+;
+; void main(void)
+; {
+; gl_FragColor = Color;
+; }
+
diff --git a/src/fb_rawshader/etna_gears_vs.asm b/src/fb_rawshader/etna_gears_vs.asm
new file mode 100644
index 0000000..34443d1
--- /dev/null
+++ b/src/fb_rawshader/etna_gears_vs.asm
@@ -0,0 +1,67 @@
+; etna_gears vs
+;
+; uniforms
+; u0-u3 normal_matrix
+; u4 lightsource_position
+; u5 material_color
+; u6-u9 modelviewprojection matrix
+;
+; constants
+; u10.x 0.0
+; u10.y 0.5
+;
+; inputs
+; t0 normal
+; t1 position
+;
+; output
+; t0 color (4 comps)
+; t1 position (4 comps)
+;
+MUL t2, u0, t0.xxxx, void
+MAD t2, u1, t0.yyyy, t2
+MAD t0, u2, t0.zzzz, t2
+ADD t0, t0, void, u3
+DP3 t2.xyz_, t0.xyzz, t0.xyzz, void
+RSQ t2.xyz_, void, void, t2.xxxx
+MUL t0.xyz_, t0.xyzz, t2.xyzz, void
+DP3 t2.xyz_, u4.xyzz, u4.xyzz, void
+RSQ t2.xyz_, void, void, t2.xxxx
+MUL t2.xyz_, u4.xyzz, t2.xyzz, void
+DP3 t0.x___, t0.xyzz, t2.xyzz, void
+SELECT.LT t0.x___, t0.xxxx, u10.xxxx, t0.xxxx
+MUL t0, t0.xxxx, u5, void
+MUL t2, u6, t1.xxxx, void
+MAD t2, u7, t1.yyyy, t2
+MAD t1, u8, t1.zzzz, t2
+ADD t1, t1, void, u9
+ADD t1.__z_, t1.zzzz, void, t1.wwww
+MUL t1.__z_, t1.zzzz, u10.yyyy, void
+; GLSL:
+; attribute vec3 position;
+; attribute vec3 normal;
+;
+; uniform mat4 ModelViewProjectionMatrix;
+; uniform mat4 NormalMatrix;
+; uniform vec4 LightSourcePosition;
+; uniform vec4 MaterialColor;
+;
+; varying vec4 Color;
+;
+; void main(void)
+; {
+; // Transform the normal to eye coordinates
+; vec3 N = normalize(vec3(NormalMatrix * vec4(normal, 1.0)));
+;
+; // The LightSourcePosition is actually its direction for directional light
+; vec3 L = normalize(LightSourcePosition.xyz);
+;
+; // Multiply the diffuse value by the vertex color (which is fixed in this case)
+; // to get the actual color that we will use to draw this vertex with
+; float diffuse = max(dot(N, L), 0.0);
+; Color = diffuse * MaterialColor;
+;
+; // Transform the position to clip coordinates
+; gl_Position = ModelViewProjectionMatrix * vec4(position, 1.0);
+; };
+;
diff --git a/src/fb_rawshader/exec_fb.sh b/src/fb_rawshader/exec_fb.sh
new file mode 100755
index 0000000..d1cb172
--- /dev/null
+++ b/src/fb_rawshader/exec_fb.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+# Build, upload, execute egl2 on device and fetch data log
+DEMO=$1
+if [ -z "$DEMO" ]; then
+ DEMO="fbtest"
+ echo "Defaulting to ${DEMO}"
+fi
+if [[ "$DEMO" == "ps_sandbox_etna" || "$DEMO" == "etna_test" ]]; then
+ ARG="/data/mine/shader.bin"
+ ../../tools/asm.py --isa-file ../../rnndb/isa.xml sandbox.asm -o shader.bin
+ [ $? -ne 0 ] && exit
+ adb push shader.bin ${ARG}
+fi
+if [[ "$DEMO" == "mip_cube" || "$DEMO" == "mip_cube_raw" ]]; then
+ #TEX="miprgba"
+ #TEX="mipdxt1"
+ #TEX="test_image-dxt3"
+ #TEX="mipdxt5"
+ #TEX="test_image-dxt1a"
+ #TEX="test_image-dxt1c"
+ TEX="lavaetc1"
+ adb push ../resources/${TEX}.dds /mnt/sdcard
+ ARG="/mnt/sdcard/${TEX}.dds"
+fi
+if [[ "$DEMO" == "particle_system" ]]; then
+ TEX="smoke"
+ adb push ../resources/${TEX}.tga /mnt/sdcard
+ ARG="/mnt/sdcard/${TEX}.tga"
+fi
+make ${DEMO}
+[ $? -ne 0 ] && exit
+adb push ${DEMO} /data/mine
+adb shell "/data/mine/${DEMO} ${ARG}"
+#adb pull /mnt/sdcard/egl2.fdr .
+#adb pull /mnt/sdcard/replay.bmp .
diff --git a/src/fb_rawshader/mip_cube.c b/src/fb_rawshader/mip_cube.c
new file mode 100644
index 0000000..2334de8
--- /dev/null
+++ b/src/fb_rawshader/mip_cube.c
@@ -0,0 +1,509 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Mip cube, but in terms of minigallium pipe
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "etna_rawshader.h"
+#include "util/u_inlines.h"
+
+#include "write_bmp.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "dds.h"
+
+/*********************************************************************/
+#define VERTEX_BUFFER_SIZE 0x60000
+
+float vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+};
+
+float vTexCoords[] = {
+ // front
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ // back
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ // right
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ // left
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ // top
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ // bottom
+ 0.0f, 0.0f,
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+};
+
+float vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+};
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (6*4)
+
+/* cube_state_vs.asm */
+uint32_t vs[] = {
+ 0x01831009, 0x00000000, 0x00000000, 0x203fc048,
+ 0x02031009, 0x00000000, 0x00000000, 0x203fc058,
+ 0x07841003, 0x39000800, 0x00000050, 0x00000000,
+ 0x07841002, 0x39001800, 0x00aa0050, 0x00390048,
+ 0x07841002, 0x39002800, 0x01540050, 0x00390048,
+ 0x07841002, 0x39003800, 0x01fe0050, 0x00390048,
+ 0x03851003, 0x29004800, 0x000000d0, 0x00000000,
+ 0x03851002, 0x29005800, 0x00aa00d0, 0x00290058,
+ 0x03811002, 0x29006800, 0x015400d0, 0x00290058,
+ 0x07851003, 0x39007800, 0x00000050, 0x00000000,
+ 0x07851002, 0x39008800, 0x00aa0050, 0x00390058,
+ 0x07851002, 0x39009800, 0x01540050, 0x00390058,
+ 0x07801002, 0x3900a800, 0x01fe0050, 0x00390058,
+ 0x0401100c, 0x00000000, 0x00000000, 0x003fc008,
+ 0x03801002, 0x69000800, 0x01fe00c0, 0x00290038,
+ 0x03831005, 0x29000800, 0x01480040, 0x00000000,
+ 0x0383100d, 0x00000000, 0x00000000, 0x00000038,
+ 0x03801003, 0x29000800, 0x014801c0, 0x00000000,
+ 0x00801005, 0x29001800, 0x01480040, 0x00000000,
+ 0x0380108f, 0x3fc06800, 0x00000050, 0x203fc068,
+ 0x04001009, 0x00000000, 0x00000000, 0x200000b8,
+ 0x01811009, 0x00000000, 0x00000000, 0x00150028,
+ 0x02041001, 0x2a804800, 0x00000000, 0x003fc048,
+ 0x02041003, 0x2a804800, 0x00aa05c0, 0x00000002,
+};
+/* cube_state_ps.asm */
+uint32_t ps[] = { /* texture sampling */
+ 0x07811003, 0x00000800, 0x01c800d0, 0x00000000,
+ 0x07821018, 0x15002f20, 0x00000000, 0x00000000,
+ 0x07811003, 0x39001800, 0x01c80140, 0x00000000,
+};
+
+const struct etna_shader_program shader = {
+ .num_inputs = 3,
+ .inputs = {{.vs_reg=0},{.vs_reg=1},{.vs_reg=2}},
+ .num_varyings = 2,
+ .varyings = {
+ {.num_components=4, .special=ETNA_VARYING_VSOUT, .pa_attributes=0x200, .vs_reg=0}, /* color */
+ {.num_components=2, .special=ETNA_VARYING_VSOUT, .pa_attributes=0x200, .vs_reg=1} /* texcoord */
+ },
+ .vs_code_size = sizeof(vs)/4,
+ .vs_code = (uint32_t*)vs,
+ .vs_pos_out_reg = 4, // t4 out
+ .vs_load_balancing = 0xf3f0542, /* depends on number of inputs/outputs/varyings? XXX how exactly */
+ .vs_num_temps = 6,
+ .vs_uniforms_size = 12*4,
+ .vs_uniforms = (uint32_t*)(const float[12*4]){
+ [19] = 2.0f, /* u4.w */
+ [23] = 20.0f, /* u5.w */
+ [27] = 0.0f, /* u6.w */
+ [45] = 0.5f, /* u11.y */
+ [44] = 1.0f, /* u11.x */
+ },
+ .ps_code_size = sizeof(ps)/4,
+ .ps_code = (uint32_t*)ps,
+ .ps_color_out_reg = 1, // t1 out
+ .ps_num_temps = 3,
+ .ps_uniforms_size = 1*4,
+ .ps_uniforms = (uint32_t*)(const float[1*4]){
+ [0] = 1.0f,
+ },
+};
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ dds_texture *dds = 0;
+ if(argc<2 || !dds_load(argv[1], &dds))
+ {
+ printf("Error loading texture\n");
+ exit(1);
+ }
+
+ uint32_t tex_format = 0;
+ uint32_t tex_base_width = dds->slices[0][0].width;
+ uint32_t tex_base_height = dds->slices[0][0].height;
+ switch(dds->fmt)
+ {
+ case FMT_A8R8G8B8: tex_format = PIPE_FORMAT_B8G8R8A8_UNORM; break;
+ case FMT_X8R8G8B8: tex_format = PIPE_FORMAT_B8G8R8X8_UNORM; break;
+ case FMT_DXT1: tex_format = PIPE_FORMAT_DXT1_RGB; break;
+ case FMT_DXT3: tex_format = PIPE_FORMAT_DXT3_RGBA; break;
+ case FMT_DXT5: tex_format = PIPE_FORMAT_DXT5_RGBA; break;
+ case FMT_ETC1: tex_format = PIPE_FORMAT_ETC1_RGB8; break;
+ default:
+ printf("Unknown texture format\n");
+ exit(1);
+ }
+
+ struct pipe_resource *tex_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_SAMPLER_VIEW, tex_format, tex_base_width, tex_base_height,
+ dds->num_mipmaps - 1);
+
+ printf("Loading compressed texture (format %i, %ix%i)\n", dds->fmt, tex_base_width, tex_base_height);
+
+ for(int ix=0; ix<dds->num_mipmaps; ++ix)
+ {
+ printf("%08x: Uploading mipmap %i (%ix%i)\n", dds->slices[0][ix].offset, ix, dds->slices[0][ix].width, dds->slices[0][ix].height);
+ etna_pipe_inline_write(pipe, tex_resource, 0, ix, dds->slices[0][ix].data, dds->slices[0][ix].size);
+ }
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ struct pipe_transfer *vtx_transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &vtx_transfer);
+ assert(vtx_logical);
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int dest_idx = vert * (3 + 3 + 2);
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+0] = vVertices[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+3] = vNormals[vert*3 + comp]; /* 1 */
+ for(int comp=0; comp<2; ++comp)
+ vtx_logical[dest_idx+comp+6] = vTexCoords[vert*2 + comp]; /* 2 */
+ }
+ pipe_buffer_unmap(pipe, vtx_transfer);
+
+ /* compile gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 0,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_ONE,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_ONE,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .colormask = 0xf
+ }
+ });
+
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .min_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_LINEAR,
+ .mag_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_BACK, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 0,
+ .writemask = 0,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0xc,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* texture coord */
+ .src_offset = 0x18,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32_FLOAT
+ }
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+ struct pipe_sampler_view *sampler_view = pipe->create_sampler_view(pipe, tex_resource, &(struct pipe_sampler_view){
+ .format = tex_format,
+ .u.tex.first_level = 0,
+ .u.tex.last_level = dds->num_mipmaps - 1,
+ .swizzle_r = PIPE_SWIZZLE_RED,
+ .swizzle_g = PIPE_SWIZZLE_GREEN,
+ .swizzle_b = PIPE_SWIZZLE_BLUE,
+ .swizzle_a = PIPE_SWIZZLE_ALPHA,
+ });
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* bind */
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+ pipe->set_fragment_sampler_views(pipe, 1, &sampler_view);
+ pipe->set_vertex_buffers(pipe, 0, 1, &(struct pipe_vertex_buffer){
+ .stride = (3 + 3 + 2)*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ });
+ pipe->set_index_buffer(pipe, NULL);/*&(struct pipe_index_buffer){
+ .index_size = 0,
+ .offset = 0,
+ .buffer = 0,
+ .user_buffer = 0
+ });*/ /* non-indexed rendering */
+
+ void *shader_state = etna_create_shader_state(pipe, &shader);
+ etna_bind_shader_state(pipe, shader_state);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview, projection, modelviewprojection;
+ ESMatrix inverse, normal;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.5f, 0.0f, 0.0f, 1.0f);
+ float aspect = (float)(height) / (float)(width);
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.4f, +2.4f, -2.4f * aspect, +2.4f * aspect, 6.0f, 10.0f);
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+ esMatrixInverse3x3(&inverse, &modelview);
+ esMatrixTranspose(&normal, &inverse);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 0, 16, (uint32_t*)&modelviewprojection.m[0][0]);
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 16, 3, (uint32_t*)&normal.m[0][0]); /* u4.xyz */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 20, 3, (uint32_t*)&normal.m[1][0]); /* u5.xyz */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 24, 3, (uint32_t*)&normal.m[2][0]); /* u6.xyz */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 28, 16, (uint32_t*)&modelview.m[0][0]);
+
+ for(int prim=0; prim<6; ++prim)
+ {
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 0,
+ .mode = PIPE_PRIM_TRIANGLE_STRIP,
+ .start = prim*4,
+ .count = 4
+ });
+ }
+
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
diff --git a/src/fb_rawshader/mip_cube_ps.asm b/src/fb_rawshader/mip_cube_ps.asm
new file mode 100644
index 0000000..d65a477
--- /dev/null
+++ b/src/fb_rawshader/mip_cube_ps.asm
@@ -0,0 +1,4 @@
+; pixel shader for mip_cube_state
+MUL t1, u0.xxxx, t1, void
+TEXLD t2, tex0, t2.xyyy, void, void
+MUL t1, t1, t2, void
diff --git a/src/fb_rawshader/mip_cube_vs.asm b/src/fb_rawshader/mip_cube_vs.asm
new file mode 100644
index 0000000..8d947fc
--- /dev/null
+++ b/src/fb_rawshader/mip_cube_vs.asm
@@ -0,0 +1,25 @@
+; vertex shader for mip_cube_state
+MOV t3.xy__, void, void, u4.wwww
+MOV t3.__z_, void, void, u5.wwww
+MUL t4, u0, t0.xxxx, void
+MAD t4, u1, t0.yyyy, t4
+MAD t4, u2, t0.zzzz, t4
+MAD t4, u3, t0.wwww, t4
+MUL t5.xyz_, u4.xyzz, t1.xxxx, void
+MAD t5.xyz_, u5.xyzz, t1.yyyy, t5.xyzz
+MAD t1.xyz_, u6.xyzz, t1.zzzz, t5.xyzz
+MUL t5, u7, t0.xxxx, void
+MAD t5, u8, t0.yyyy, t5
+MAD t5, u9, t0.zzzz, t5
+MAD t0, u10, t0.wwww, t5
+RCP t1.___w, void, void, t0.wwww
+MAD t0.xyz_, -t0.xyzz, t1.wwww, t3.xyzz
+DP3 t3.xyz_, t0.xyzz, t0.xyzz, void
+RSQ t3.xyz_, void, void, t3.xxxx
+MUL t0.xyz_, t0.xyzz, t3.xyzz, void
+DP3 t0.x___, t1.xyzz, t0.xyzz, void
+SELECT.LT t0.xyz_, u6.wwww, t0.xxxx, u6.wwww
+MOV t0.___w, void, void, u11.xxxx
+MOV t1.xy__, void, void, t2.xyyy
+ADD t4.__z_, t4.zzzz, void, t4.wwww
+MUL t4.__z_, t4.zzzz, u11.yyyy, void
diff --git a/src/fb_rawshader/particle_system.c b/src/fb_rawshader/particle_system.c
new file mode 100644
index 0000000..2f4f9ee
--- /dev/null
+++ b/src/fb_rawshader/particle_system.c
@@ -0,0 +1,408 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Vertex-shader based particle system
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "etna_rawshader.h"
+#include "util/u_inlines.h"
+
+#include "write_bmp.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "esUtil.h"
+#include "dds.h"
+
+/*********************************************************************/
+#define VERTEX_BUFFER_SIZE 0x60000
+#define NUM_PARTICLES 1000
+#define PARTICLE_SIZE 7
+
+/* particle_system_vs.asm */
+uint32_t vs[] = {
+0x00000056,0x00000800,0x00000050,0x00000280,
+0x03811002,0x00000800,0x01480150,0x00290018,
+0x03811001,0x29001800,0x00000000,0x203e4008,
+0x04011009,0x00000000,0x00000000,0x20000018,
+0x00000016,0x00000000,0x00000000,0x00000300,
+0x07811009,0x00000000,0x00000000,0x20294018,
+0x0080100c,0x00000000,0x00000000,0x00000008,
+0x07821009,0x00000000,0x00000000,0x20390008,
+0x00801002,0x40002800,0x00000040,0x20000018,
+0x00801809,0x00000000,0x00000000,0x00000008,
+0x01001003,0x00000800,0x00000040,0x00000000,
+0x00821003,0x15400800,0x01fe00c0,0x00000002,
+0x02011001,0x2a801800,0x00000000,0x003fc018,
+0x02011003,0x2a801800,0x00000140,0x00000002,
+};
+/* particle_system_ps.asm */
+uint32_t ps[] = {
+0x01011001,0x00001800,0x00000010,0x00554018,
+0x07811018,0x15001f20,0x00000000,0x00000000,
+0x07811003,0x39000800,0x01c800d0,0x00000000,
+0x04011003,0x3fc01800,0x00000140,0x00000000,
+};
+
+const struct etna_shader_program shader = {
+ .num_inputs = 3,
+ .inputs = {{.vs_reg=0},{.vs_reg=1},{.vs_reg=2}},
+ .num_varyings = 2,
+ .varyings = {
+ {.num_components=2, .special=ETNA_VARYING_POINTCOORD, .pa_attributes=0x2f1, .vs_reg=1}, /* pointcoord */
+ {.num_components=1, .special=ETNA_VARYING_VSOUT, .pa_attributes=0x200, .vs_reg=0} /* v_lifetime */
+ },
+ .vs_code_size = sizeof(vs)/4,
+ .vs_code = (uint32_t*)vs,
+ .vs_pos_out_reg = 1, // t1
+ .vs_pointsize_out_reg = 2, // t2
+ .vs_load_balancing = 0xf3f0542, /* depends on number of inputs/outputs/varyings? XXX how exactly */
+ .vs_num_temps = 3,
+ .vs_uniforms_size = 12,
+ .vs_uniforms = (uint32_t*)(const float[12]){
+ [4] = 1.0f, /* u1.x */
+ [5] = -1000.0f, /* u1.y */
+ [6] = 0.0f, /* u1.z */
+ [7] = 40.0f, /* u1.w */
+ [8] = 0.5f, /* u2.x */
+ },
+ .ps_code_size = sizeof(ps)/4,
+ .ps_code = (uint32_t*)ps,
+ .ps_color_out_reg = 1, // t1 out
+ .ps_num_temps = 3,
+ .ps_uniforms_size = 5,
+ .ps_uniforms = (uint32_t*)(const float[5]){
+ [0] = 0.0f, /* u0 u_color */
+ [1] = 0.0f,
+ [2] = 0.0f,
+ [3] = 0.0f,
+ [4] = 1.0f,
+ },
+};
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ /* texture */
+ int tex_base_width = 0;
+ int tex_base_height = 0;
+ if(argc<2)
+ {
+ printf("Pass path to smoke.tga on command line\n");
+ exit(1);
+ }
+ uint8_t *tex_buffer = (uint8_t*)esLoadTGA(argv[1], &tex_base_width, &tex_base_height );
+ if(!tex_buffer)
+ {
+ printf("Could not load texture\n");
+ exit(1);
+ }
+ struct pipe_resource *tex_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_SAMPLER_VIEW, PIPE_FORMAT_B8G8R8X8_UNORM,
+ tex_base_width, tex_base_height, 0);
+ printf("Uploading texture (%ix%i)\n", tex_base_width, tex_base_height);
+ uint32_t *temp = malloc(tex_base_width * tex_base_height * 4);
+ etna_convert_r8g8b8_to_b8g8r8x8(temp, tex_buffer, tex_base_width * tex_base_height);
+ etna_pipe_inline_write(pipe, tex_resource, 0, 0, temp, tex_base_width * tex_base_height * 4);
+ free(temp);
+
+ /* render target resources and surfaces */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* surfaces */
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* compile gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 1,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_ONE,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_ONE,
+ .colormask = 0xf
+ }
+ });
+
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .min_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_NONE,
+ .mag_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_NONE, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 1, /** points rasterized as quads or points */
+ .point_size_per_vertex = 1, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 0,
+ .writemask = 0,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ /* particles */
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+ struct pipe_vertex_buffer vertex_buffer_desc = {
+ .stride = PARTICLE_SIZE*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ };
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0x0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0x4,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* texture coord */
+ .src_offset = 0x10,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ }
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+
+ /* texture and render target surfaces */
+ struct pipe_sampler_view *sampler_view = pipe->create_sampler_view(pipe, tex_resource, &(struct pipe_sampler_view){
+ .format = tex_resource->format,
+ .u.tex.first_level = 0,
+ .u.tex.last_level = 0,
+ .swizzle_r = PIPE_SWIZZLE_RED,
+ .swizzle_g = PIPE_SWIZZLE_GREEN,
+ .swizzle_b = PIPE_SWIZZLE_BLUE,
+ .swizzle_a = PIPE_SWIZZLE_ALPHA,
+ });
+
+ /* bind */
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+ pipe->set_fragment_sampler_views(pipe, 1, &sampler_view);
+ pipe->set_vertex_buffers(pipe, 0, 1, &vertex_buffer_desc);
+ pipe->set_index_buffer(pipe, NULL);
+
+ void *shader_state = etna_create_shader_state(pipe, &shader);
+ etna_bind_shader_state(pipe, shader_state);
+
+ /* Fill in particle data array */
+ struct pipe_transfer *vtx_transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &vtx_transfer);
+ srand(0);
+ for(int i = 0; i < NUM_PARTICLES; i++)
+ {
+ float *particleData = &vtx_logical[i * PARTICLE_SIZE];
+
+ // Lifetime of particle
+ (*particleData++) = ( (float)(rand() % 10000) / 10000.0f );
+
+ // End position of particle
+ (*particleData++) = ( (float)(rand() % 10000) / 5000.0f ) - 1.0f;
+ (*particleData++) = ( (float)(rand() % 10000) / 5000.0f ) - 1.0f;
+ (*particleData++) = ( (float)(rand() % 10000) / 5000.0f ) - 1.0f;
+
+ // Start position of particle
+ (*particleData++) = ( (float)(rand() % 10000) / 40000.0f ) - 0.125f;
+ (*particleData++) = ( (float)(rand() % 10000) / 40000.0f ) - 0.125f;
+ (*particleData++) = ( (float)(rand() % 10000) / 40000.0f ) - 0.125f;
+ }
+ pipe_buffer_unmap(pipe, vtx_transfer);
+
+ double prevTime = esNow();
+ float time = 1.0f;
+ for(int frame=0; frame<1000; ++frame)
+ {
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ double newTime = esNow();
+ time += newTime - prevTime;
+ prevTime = newTime;
+ if ( time >= 1.0f )
+ {
+ float centerPos[3];
+ float color[4];
+
+ time = 0.0f;
+
+ // Pick a new start location and color
+ centerPos[0] = ( (float)(rand() % 10000) / 10000.0f ) - 0.5f;
+ centerPos[1] = ( (float)(rand() % 10000) / 10000.0f ) - 0.5f;
+ centerPos[2] = ( (float)(rand() % 10000) / 10000.0f ) - 0.5f;
+
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 1, 3, (uint32_t*)&centerPos[0]);
+
+ // Random color
+ color[0] = ( (float)(rand() % 10000) / 20000.0f ) + 0.5f;
+ color[1] = ( (float)(rand() % 10000) / 20000.0f ) + 0.5f;
+ color[2] = ( (float)(rand() % 10000) / 20000.0f ) + 0.5f;
+ color[3] = 0.5;
+
+ etna_set_uniforms(pipe, PIPE_SHADER_FRAGMENT, 0, 4, (uint32_t*)&color[0]);
+ }
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 0, 1, (uint32_t*)&time);
+
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 0,
+ .mode = PIPE_PRIM_POINTS,
+ .start = 0,
+ .count = NUM_PARTICLES
+ });
+
+#if 0
+ etna_dump_cmd_buffer(ctx);
+ exit(0);
+#endif
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
diff --git a/src/fb_rawshader/particle_system_ps.asm b/src/fb_rawshader/particle_system_ps.asm
new file mode 100644
index 0000000..23b2749
--- /dev/null
+++ b/src/fb_rawshader/particle_system_ps.asm
@@ -0,0 +1,8 @@
+; ps for particle_system demo
+; t1.xy should be marked as pointcoord x/y
+; uniform inputs
+; u0 u_color
+ADD t1._y__, u1.xxxx, void, -t1.yyyy
+TEXLD t1, tex0, t1.xyyy, void, void
+MUL t1, u0, t1, void
+MUL t1.___w, t1.wwww, t2.xxxx, void
diff --git a/src/fb_rawshader/particle_system_vs.asm b/src/fb_rawshader/particle_system_vs.asm
new file mode 100644
index 0000000..33348be
--- /dev/null
+++ b/src/fb_rawshader/particle_system_vs.asm
@@ -0,0 +1,31 @@
+; fs for particle system demo
+; different from the others in that it uses branching, and a .SAT modifier
+; uniform inputs
+; u0.x u_time
+; u0.yzw u_centerPosition
+; uniform constants
+; u1.x 1.0
+; u1.y -1000.0
+; u1.z 0.0
+; u1.w 40.0
+; u2.x 0.5
+; outputs
+; t0 v_lifetime
+; t1 position
+; t2 pointsize
+ BRANCH.GT void, u0.xxxx, t0.xxxx, label_5
+ MAD t1.xyz_, u0.xxxx, t2.xyzz, t1.xyzz
+ ADD t1.xyz_, t1.xyzz, void, u0.yzww
+ MOV t1.___w, void, void, u1.xxxx
+ BRANCH void, void, void, label_6
+label_5:
+ MOV t1, void, void, u1.yyzz
+label_6:
+ RCP t0.x___, void, void, t0.xxxx
+ MOV t2, void, void, u0
+ MAD t0.x___, -t2.xxxx, t0.xxxx, u1.xxxx
+ MOV.SAT t0.x___, void, void, t0.xxxx
+ MUL t0._y__, t0.xxxx, t0.xxxx, void
+ MUL t2.x___, t0.yyyy, u1.wwww, void
+ ADD t1.__z_, t1.zzzz, void, t1.wwww
+ MUL t1.__z_, t1.zzzz, u2.xxxx, void
diff --git a/src/fb_rawshader/rotate_cube.c b/src/fb_rawshader/rotate_cube.c
new file mode 100644
index 0000000..0c6a7c3
--- /dev/null
+++ b/src/fb_rawshader/rotate_cube.c
@@ -0,0 +1,439 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Rotating, animated cube. */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "etna_rawshader.h"
+#include "util/u_inlines.h"
+
+#include "write_bmp.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+
+/*********************************************************************/
+#define VERTEX_BUFFER_SIZE 0x60000
+uint32_t vs[] = {
+ 0x01831009, 0x00000000, 0x00000000, 0x203fc048,
+ 0x02031009, 0x00000000, 0x00000000, 0x203fc058,
+ 0x07841003, 0x39000800, 0x00000050, 0x00000000,
+ 0x07841002, 0x39001800, 0x00aa0050, 0x00390048,
+ 0x07841002, 0x39002800, 0x01540050, 0x00390048,
+ 0x07841002, 0x39003800, 0x01fe0050, 0x00390048,
+ 0x03851003, 0x29004800, 0x000000d0, 0x00000000,
+ 0x03851002, 0x29005800, 0x00aa00d0, 0x00290058,
+ 0x03811002, 0x29006800, 0x015400d0, 0x00290058,
+ 0x07851003, 0x39007800, 0x00000050, 0x00000000,
+ 0x07851002, 0x39008800, 0x00aa0050, 0x00390058,
+ 0x07851002, 0x39009800, 0x01540050, 0x00390058,
+ 0x07801002, 0x3900a800, 0x01fe0050, 0x00390058,
+ 0x0401100c, 0x00000000, 0x00000000, 0x003fc008,
+ 0x03801002, 0x69000800, 0x01fe00c0, 0x00290038,
+ 0x03831005, 0x29000800, 0x01480040, 0x00000000,
+ 0x0383100d, 0x00000000, 0x00000000, 0x00000038,
+ 0x03801003, 0x29000800, 0x014801c0, 0x00000000,
+ 0x00801005, 0x29001800, 0x01480040, 0x00000000,
+ 0x0080108f, 0x3fc06800, 0x00000050, 0x203fc068,
+ 0x03801003, 0x00000800, 0x01480140, 0x00000000,
+ 0x04001009, 0x00000000, 0x00000000, 0x200000b8,
+ 0x02041001, 0x2a804800, 0x00000000, 0x003fc048,
+ 0x02041003, 0x2a804800, 0x00aa05c0, 0x00000002,
+};
+uint32_t ps[] = {
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000
+};
+
+const struct etna_shader_program shader = {
+ .num_inputs = 3,
+ .inputs = {{.vs_reg=0},{.vs_reg=1},{.vs_reg=2}},
+ .num_varyings = 1,
+ .varyings = {
+ {.num_components=4, .special=ETNA_VARYING_VSOUT, .pa_attributes=0x200, .vs_reg=0}, /* color */
+ },
+ .vs_code_size = sizeof(vs)/4,
+ .vs_code = (uint32_t*)vs,
+ .vs_pos_out_reg = 4, // t4 out
+ .vs_load_balancing = 0xf3f0542, /* depends on number of inputs/outputs/varyings? XXX how exactly */
+ .vs_num_temps = 6,
+ .vs_uniforms_size = 12*4,
+ .vs_uniforms = (uint32_t*)(const float[12*4]){
+ [19] = 2.0f, /* u4.w */
+ [23] = 20.0f, /* u5.w */
+ [27] = 0.0f, /* u6.w */
+ [45] = 0.5f, /* u11.y */
+ [44] = 1.0f, /* u11.x */
+ },
+ .ps_code_size = sizeof(ps)/4,
+ .ps_code = (uint32_t*)ps,
+ .ps_color_out_reg = 1, // t1 out
+ .ps_num_temps = 3,
+ .ps_uniforms_size = 1*4,
+ .ps_uniforms = (uint32_t*)(const float[1*4]){
+ [0] = 1.0f,
+ },
+};
+
+float vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+};
+
+float vColors[] = {
+ // front
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f, // magenta
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ // back
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 1.0f, 0.0f, // yellow
+ 0.0f, 1.0f, 0.0f, // green
+ // right
+ 1.0f, 0.0f, 1.0f, // magenta
+ 1.0f, 0.0f, 0.0f, // red
+ 1.0f, 1.0f, 1.0f, // white
+ 1.0f, 1.0f, 0.0f, // yellow
+ // left
+ 0.0f, 0.0f, 0.0f, // black
+ 0.0f, 0.0f, 1.0f, // blue
+ 0.0f, 1.0f, 0.0f, // green
+ 0.0f, 1.0f, 1.0f, // cyan
+ // top
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ 0.0f, 1.0f, 0.0f, // green
+ 1.0f, 1.0f, 0.0f, // yellow
+ // bottom
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f // magenta
+};
+
+float vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+};
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (6*4)
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* geometry */
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+
+ struct pipe_transfer *transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &transfer);
+ assert(vtx_logical);
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int src_idx = vert * COMPONENTS_PER_VERTEX;
+ int dest_idx = vert * COMPONENTS_PER_VERTEX * 3;
+ for(int comp=0; comp<COMPONENTS_PER_VERTEX; ++comp)
+ {
+ ((float*)vtx_logical)[dest_idx+comp+0] = vVertices[src_idx + comp]; /* 0 */
+ ((float*)vtx_logical)[dest_idx+comp+3] = vNormals[src_idx + comp]; /* 1 */
+ ((float*)vtx_logical)[dest_idx+comp+6] = vColors[src_idx + comp]; /* 2 */
+ }
+ }
+ pipe_buffer_unmap(pipe, transfer);
+
+ struct pipe_vertex_buffer vertex_buffer_desc = {
+ .stride = (3 + 3 + 3)*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ };
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* normals */
+ .src_offset = 0xc,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ { /* texture coord */
+ .src_offset = 0x18,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ }
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+
+ /* compile other gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 0,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_ONE,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_ONE,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_ZERO,
+ .colormask = 0xf
+ }
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_BACK, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ void *dsa = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = {
+ .enabled = 0
+ },
+ .stencil[1] = {
+ .enabled = 0
+ },
+ .alpha = {
+ .enabled = 0
+ }
+ });
+
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ /* bind */
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+ pipe->set_vertex_buffers(pipe, 0, 1, &vertex_buffer_desc);
+ pipe->set_index_buffer(pipe, NULL);
+
+ void *shader_state = etna_create_shader_state(pipe, &shader);
+ etna_bind_shader_state(pipe, shader_state);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview, projection, modelviewprojection;
+ ESMatrix inverse, normal;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.5f, 0.0f, 0.0f, 1.0f);
+ float aspect = (float)(height) / (float)(width);
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 10.0f);
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+ esMatrixInverse3x3(&inverse, &modelview);
+ esMatrixTranspose(&normal, &inverse);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 1.0, 0xff);
+
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 0, 16, (uint32_t*)&modelviewprojection.m[0][0]);
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 16, 3, (uint32_t*)&normal.m[0][0]); /* u4.xyz */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 20, 3, (uint32_t*)&normal.m[1][0]); /* u5.xyz */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 24, 3, (uint32_t*)&normal.m[2][0]); /* u6.xyz */
+ etna_set_uniforms(pipe, PIPE_SHADER_VERTEX, 28, 16, (uint32_t*)&modelview.m[0][0]);
+
+ for(int prim=0; prim<6; ++prim)
+ {
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 0,
+ .mode = PIPE_PRIM_TRIANGLE_STRIP,
+ .start = prim*4,
+ .count = 4
+ });
+ }
+
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
diff --git a/src/fb_rawshader/shader.bin b/src/fb_rawshader/shader.bin
new file mode 100644
index 0000000..c08567e
--- /dev/null
+++ b/src/fb_rawshader/shader.bin
Binary files differ
diff --git a/src/fb_rawshader/stencil_test.c b/src/fb_rawshader/stencil_test.c
new file mode 100644
index 0000000..1d9280f
--- /dev/null
+++ b/src/fb_rawshader/stencil_test.c
@@ -0,0 +1,537 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* stencil_test implemented with etna_pipe
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include "etna_pipe.h"
+#include "etna_rawshader.h"
+#include "util/u_inlines.h"
+
+#include "write_bmp.h"
+#include "etna_bswap.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "dds.h"
+
+/*********************************************************************/
+#define VERTEX_BUFFER_SIZE 0x60000
+
+const float vVertices[] = {
+ -0.75f, 0.25f, 0.50f, // Quad #0
+ -0.25f, 0.25f, 0.50f,
+ -0.25f, 0.75f, 0.50f,
+ -0.75f, 0.75f, 0.50f,
+ 0.25f, 0.25f, 0.90f, // Quad #1
+ 0.75f, 0.25f, 0.90f,
+ 0.75f, 0.75f, 0.90f,
+ 0.25f, 0.75f, 0.90f,
+ -0.75f, -0.75f, 0.50f, // Quad #2
+ -0.25f, -0.75f, 0.50f,
+ -0.25f, -0.25f, 0.50f,
+ -0.75f, -0.25f, 0.50f,
+ 0.25f, -0.75f, 0.50f, // Quad #3
+ 0.75f, -0.75f, 0.50f,
+ 0.75f, -0.25f, 0.50f,
+ 0.25f, -0.25f, 0.50f,
+ -1.00f, -1.00f, 0.00f, // Big Quad
+ 1.00f, -1.00f, 0.00f,
+ 1.00f, 1.00f, 0.00f,
+ -1.00f, 1.00f, 0.00f
+};
+
+const uint8_t indices[][6] = {
+ { 0, 1, 2, 0, 2, 3 }, // Quad #0
+ { 4, 5, 6, 4, 6, 7 }, // Quad #1
+ { 8, 9, 10, 8, 10, 11 }, // Quad #2
+ { 12, 13, 14, 12, 14, 15 }, // Quad #3
+ { 16, 17, 18, 16, 18, 19 } // Big Quad
+};
+
+#define NumTests 4
+const float colors[NumTests][4] = {
+ { 1.0f, 0.0f, 0.0f, 1.0f },
+ { 0.0f, 1.0f, 0.0f, 1.0f },
+ { 0.0f, 0.0f, 1.0f, 1.0f },
+ { 1.0f, 1.0f, 0.0f, 1.0f }
+};
+
+uint32_t stencilValues[NumTests] = {
+ 0x7, // Result of test 0
+ 0x0, // Result of test 1
+ 0x2, // Result of test 2
+ 0xff // Result of test 3. We need to fill this
+ // value in a run-time
+};
+
+#define NUM_VERTICES (sizeof(vVertices) / (sizeof(float)*3))
+
+/* stencil_test_vs.asm */
+uint32_t vs[] = {
+0x02001001,0x2a800800,0x00000000,0x003fc008,
+0x02001003,0x2a800800,0x00000040,0x00000002,
+};
+/* stencil_test_ps.asm */
+uint32_t ps[] = {
+0x07811009,0x00000000,0x00000000,0x20390008,
+};
+
+const struct etna_shader_program shader = {
+ .num_inputs = 1,
+ .inputs = {{.vs_reg=0}},
+ .num_varyings = 0,
+ .varyings = {
+ },
+ .vs_code_size = sizeof(vs)/4,
+ .vs_code = (uint32_t*)vs,
+ .vs_pos_out_reg = 0,
+ .vs_load_balancing = 0xf3f0582, /* depends on number of inputs/outputs/varyings? XXX how exactly */
+ .vs_num_temps = 1,
+ .vs_uniforms_size = 1*4,
+ .vs_uniforms = (uint32_t*)(const float[1*4]){
+ [0] = 0.5f, /* u0.x */
+ },
+ .ps_code_size = sizeof(ps)/4,
+ .ps_code = (uint32_t*)ps,
+ .ps_color_out_reg = 1, // t1 = color out
+ .ps_num_temps = 2,
+ .ps_uniforms_size = 1*4,
+ .ps_uniforms = (uint32_t*)(const float[1*4]){
+ [0] = 0.0f,
+ [1] = 0.0f,
+ [2] = 0.0f,
+ [3] = 0.0f,
+ },
+};
+
+int main(int argc, char **argv)
+{
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ int width = fbs->width;
+ int height = fbs->height;
+ struct pipe_context *pipe = fbs->pipe;
+
+ /* resources */
+ struct pipe_resource *rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_B8G8R8X8_UNORM, width, height, 0);
+ struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_S8_UINT_Z24_UNORM, width, height, 0);
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+ struct pipe_resource *idx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE);
+
+ /* bind render target to framebuffer */
+ etna_fb_bind_resource(&fbs->fb, rt_resource);
+
+ /* vertex / index buffer setup */
+ struct pipe_transfer *vtx_transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &vtx_transfer);
+ assert(vtx_logical);
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int dest_idx = vert * 3;
+ for(int comp=0; comp<3; ++comp)
+ vtx_logical[dest_idx+comp+0] = vVertices[vert*3 + comp]; /* 0 */
+ }
+ pipe_buffer_unmap(pipe, vtx_transfer);
+
+ struct pipe_transfer *idx_transfer = 0;
+ void *idx_logical = pipe_buffer_map(pipe, idx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &idx_transfer);
+ assert(idx_logical);
+ memcpy(idx_logical, indices, sizeof(indices));
+ pipe_buffer_unmap(pipe, idx_transfer);
+
+ struct pipe_vertex_buffer vertex_buf_desc = {
+ .stride = (3)*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ };
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32_FLOAT
+ },
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+ struct pipe_index_buffer index_buf_desc = {
+ .index_size = 1,
+ .offset = 0,
+ .buffer = idx_resource,
+ .user_buffer = 0
+ };
+
+ /* compile gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 1,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA,
+ .colormask = 0xf
+ }
+ });
+
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .min_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_LINEAR,
+ .mag_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_NONE, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ struct pipe_surface *zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+
+ pipe->set_vertex_buffers(pipe, 0, 1, &vertex_buf_desc);
+ pipe->set_index_buffer(pipe, &index_buf_desc);
+
+ void *shader_state = etna_create_shader_state(pipe, &shader);
+ etna_bind_shader_state(pipe, shader_state);
+
+ /* create depth stencil alpha states for the different test phases.
+ * except the stencil_ref, which is set separately
+ */
+ void *dsa_test0 = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = { /* single-sided stencil */
+ .enabled = 1,
+ .func = PIPE_FUNC_LESS,
+ .fail_op = PIPE_STENCIL_OP_REPLACE,
+ .zfail_op = PIPE_STENCIL_OP_DECR,
+ .zpass_op = PIPE_STENCIL_OP_DECR,
+ .valuemask = 0x03,
+ .writemask = 0xff
+ },
+ .stencil[1] = { .enabled = 0 },
+ .alpha = { .enabled = 0 }
+ });
+ void *dsa_test1 = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = { /* single-sided stencil */
+ .enabled = 1,
+ .func = PIPE_FUNC_GREATER,
+ .fail_op = PIPE_STENCIL_OP_KEEP,
+ .zfail_op = PIPE_STENCIL_OP_DECR,
+ .zpass_op = PIPE_STENCIL_OP_KEEP,
+ .valuemask = 0x03,
+ .writemask = 0xff
+ },
+ .stencil[1] = { .enabled = 0 },
+ .alpha = { .enabled = 0 }
+ });
+ void *dsa_test2 = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = { /* single-sided stencil */
+ .enabled = 1,
+ .func = PIPE_FUNC_EQUAL,
+ .fail_op = PIPE_STENCIL_OP_KEEP,
+ .zfail_op = PIPE_STENCIL_OP_INCR,
+ .zpass_op = PIPE_STENCIL_OP_INCR,
+ .valuemask = 0x03,
+ .writemask = 0xff
+ },
+ .stencil[1] = { .enabled = 0 },
+ .alpha = { .enabled = 0 }
+ });
+ void *dsa_test3 = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = { /* single-sided stencil */
+ .enabled = 1,
+ .func = PIPE_FUNC_EQUAL,
+ .fail_op = PIPE_STENCIL_OP_INVERT,
+ .zfail_op = PIPE_STENCIL_OP_KEEP,
+ .zpass_op = PIPE_STENCIL_OP_KEEP,
+ .valuemask = 0x01,
+ .writemask = 0xff
+ },
+ .stencil[1] = { .enabled = 0 },
+ .alpha = { .enabled = 0 }
+ });
+ void *dsa_bigquad = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 1,
+ .writemask = 1,
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = { /* single-sided stencil */
+ .enabled = 1,
+ .func = PIPE_FUNC_EQUAL,
+ .fail_op = PIPE_STENCIL_OP_KEEP,
+ .zfail_op = PIPE_STENCIL_OP_KEEP,
+ .zpass_op = PIPE_STENCIL_OP_KEEP,
+ .valuemask = 0xff,
+ .writemask = 0x00
+ },
+ .stencil[1] = { .enabled = 0 },
+ .alpha = { .enabled = 0 }
+ });
+
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa_test0);
+
+ for(int frame=0; frame<1000; ++frame)
+ {
+ if(frame%50 == 0)
+ printf("*** FRAME %i ****\n", frame);
+
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 0.75f, 0x01);
+
+ // Test 0:
+ //
+ // Initialize upper-left region. In this case, the
+ // stencil-buffer values will be replaced because the
+ // stencil test for the rendered pixels will fail the
+ // stencil test, which is
+ //
+ // ref mask stencil mask
+ // ( 0x7 & 0x3 ) < ( 0x1 & 0x3 )
+ //
+ // The value in the stencil buffer for these pixels will
+ // be 0x7.
+ //
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa_test0);
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0x07,
+ .ref_value[1] = 0x07});
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 1,
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 0*6,
+ .count = 6 });
+
+ // Test 1:
+ //
+ // Initialize the upper-right region. Here, we'll decrement
+ // the stencil-buffer values where the stencil test passes
+ // but the depth test fails. The stencil test is
+ //
+ // ref mask stencil mask
+ // ( 0x3 & 0x3 ) > ( 0x1 & 0x3 )
+ //
+ // but where the geometry fails the depth test. The
+ // stencil values for these pixels will be 0x0.
+ //
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa_test1);
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0x03,
+ .ref_value[1] = 0x03});
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 1,
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 1*6,
+ .count = 6 });
+
+ // Test 2:
+ //
+ // Initialize the lower-left region. Here we'll increment
+ // (with saturation) the stencil value where both the
+ // stencil and depth tests pass. The stencil test for
+ // these pixels will be
+ //
+ // ref mask stencil mask
+ // ( 0x1 & 0x3 ) == ( 0x1 & 0x3 )
+ //
+ // The stencil values for these pixels will be 0x2.
+ //
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa_test2);
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0x01,
+ .ref_value[1] = 0x01});
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 1,
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 2*6,
+ .count = 6 });
+
+ // Test 3:
+ //
+ // Finally, initialize the lower-right region. We'll invert
+ // the stencil value where the stencil tests fails. The
+ // stencil test for these pixels will be
+ //
+ // ref mask stencil mask
+ // ( 0x2 & 0x1 ) == ( 0x1 & 0x1 )
+ //
+ // The stencil value here will be set to ~((2^s-1) & 0x1),
+ // (with the 0x1 being from the stencil clear value),
+ // where 's' is the number of bits in the stencil buffer
+ //
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa_test3);
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0x02,
+ .ref_value[1] = 0x02});
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 1,
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 3*6,
+ .count = 6 });
+
+ stencilValues[3] = ~(((1 << 8) - 1) & 0x1) & 0xff;
+
+ /* Bind depth stencil state for big quad */
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa_bigquad);
+ for(int idx=0; idx<NumTests; ++idx)
+ {
+ /* material color */
+ etna_set_uniforms(pipe, PIPE_SHADER_FRAGMENT, 0, 4,
+ (uint32_t*)colors[idx]);
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = stencilValues[idx],
+ .ref_value[1] = stencilValues[idx]});
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 1,
+ .mode = PIPE_PRIM_TRIANGLES,
+ .start = 4*6,
+ .count = 6 });
+ }
+#if 0
+ etna_dump_cmd_buffer(ctx);
+ exit(0);
+#endif
+ etna_swap_buffers(fbs->buffers);
+ }
+#ifdef DUMP
+ bmp_dump32(fbs->fb.logical[1-fbs->buffers->backbuffer], width, height, false, "/mnt/sdcard/fb.bmp");
+ printf("Dump complete\n");
+#endif
+ fbdemo_free(fbs);
+ return 0;
+}
+
diff --git a/src/fb_rawshader/stencil_test_ps.asm b/src/fb_rawshader/stencil_test_ps.asm
new file mode 100644
index 0000000..4a3ff16
--- /dev/null
+++ b/src/fb_rawshader/stencil_test_ps.asm
@@ -0,0 +1,4 @@
+; very simple flat-shaded pixel shader
+; t1 = u0
+; 2 temporary registers used (t0,t1)
+MOV t1, void, void, u0
diff --git a/src/fb_rawshader/stencil_test_vs.asm b/src/fb_rawshader/stencil_test_vs.asm
new file mode 100644
index 0000000..0c25cfe
--- /dev/null
+++ b/src/fb_rawshader/stencil_test_vs.asm
@@ -0,0 +1,5 @@
+; very basic vertex shader
+; z = (z+w)/2
+; 1 temporary register used (t0)
+ADD t0.__z_, t0.zzzz, void, t0.wwww
+MUL t0.__z_, t0.zzzz, u0.xxxx, void
diff --git a/src/include_arnova/gc_abi.h b/src/include_arnova/gc_abi.h
new file mode 100644
index 0000000..efc2365
--- /dev/null
+++ b/src/include_arnova/gc_abi.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/** Kernel ABI definition file for Etna **/
+#ifndef H_GCABI
+#define H_GCABI
+
+//#define GCABI_USER_SIGNAL_HAS_TYPE
+#define GCABI_CONTEXT_HAS_PHYSICAL
+#define GCABI_HAS_MINOR_FEATURES_2
+//#define GCABI_HAS_MINOR_FEATURES_3
+
+// One of these must be set:
+#define GCABI_HAS_CONTEXT
+//#define GCABI_HAS_STATE_DELTAS
+
+/* IOCTL structure for userspace driver*/
+typedef struct
+{
+ void *in_buf;
+ unsigned int in_buf_size;
+ void *out_buf;
+ unsigned int out_buf_size;
+} vivante_ioctl_data_t;
+
+#define _gcs2D_PROFILE gcs2D_PROFILE
+
+#include "gc_hal_base.h"
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#ifdef GCABI_HAS_CONTEXT
+#include "gc_hal_user_context.h"
+#else
+#include "gc_hal_kernel_buffer.h"
+#endif
+#include "gc_hal_types.h"
+
+#endif
+
diff --git a/src/include_arnova/gc_hal.h b/src/include_arnova/gc_hal.h
new file mode 100644
index 0000000..1829e7d
--- /dev/null
+++ b/src/include_arnova/gc_hal.h
@@ -0,0 +1,1900 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_h_
+#define __gc_hal_h_
+
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+#include "gc_hal_base.h"
+#include "gc_hal_profiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* Alignment Macros *******************************
+\******************************************************************************/
+
+#define gcmALIGN(n, align) \
+( \
+ ((n) + ((align) - 1)) & ~((align) - 1) \
+)
+
+/******************************************************************************\
+***************************** Element Count Macro *****************************
+\******************************************************************************/
+
+#define gcmSIZEOF(a) \
+( \
+ (gctSIZE_T) (sizeof(a)) \
+)
+
+#define gcmCOUNTOF(a) \
+( \
+ sizeof(a) / sizeof(a[0]) \
+)
+
+/******************************************************************************\
+******************************** gcsOBJECT Object *******************************
+\******************************************************************************/
+
+/* Type of objects. */
+typedef enum _gceOBJECT_TYPE
+{
+ gcvOBJ_UNKNOWN = 0,
+ gcvOBJ_2D = gcmCC('2','D',' ',' '),
+ gcvOBJ_3D = gcmCC('3','D',' ',' '),
+ gcvOBJ_ATTRIBUTE = gcmCC('A','T','T','R'),
+ gcvOBJ_BRUSHCACHE = gcmCC('B','R','U','$'),
+ gcvOBJ_BRUSHNODE = gcmCC('B','R','U','n'),
+ gcvOBJ_BRUSH = gcmCC('B','R','U','o'),
+ gcvOBJ_BUFFER = gcmCC('B','U','F','R'),
+ gcvOBJ_COMMAND = gcmCC('C','M','D',' '),
+ gcvOBJ_COMMANDBUFFER = gcmCC('C','M','D','B'),
+ gcvOBJ_CONTEXT = gcmCC('C','T','X','T'),
+ gcvOBJ_DEVICE = gcmCC('D','E','V',' '),
+ gcvOBJ_DUMP = gcmCC('D','U','M','P'),
+ gcvOBJ_EVENT = gcmCC('E','V','N','T'),
+ gcvOBJ_FUNCTION = gcmCC('F','U','N','C'),
+ gcvOBJ_HAL = gcmCC('H','A','L',' '),
+ gcvOBJ_HARDWARE = gcmCC('H','A','R','D'),
+ gcvOBJ_HEAP = gcmCC('H','E','A','P'),
+ gcvOBJ_INDEX = gcmCC('I','N','D','X'),
+ gcvOBJ_INTERRUPT = gcmCC('I','N','T','R'),
+ gcvOBJ_KERNEL = gcmCC('K','E','R','N'),
+ gcvOBJ_MEMORYBUFFER = gcmCC('M','E','M','B'),
+ gcvOBJ_MMU = gcmCC('M','M','U',' '),
+ gcvOBJ_OS = gcmCC('O','S',' ',' '),
+ gcvOBJ_OUTPUT = gcmCC('O','U','T','P'),
+ gcvOBJ_PAINT = gcmCC('P','N','T',' '),
+ gcvOBJ_PATH = gcmCC('P','A','T','H'),
+ gcvOBJ_QUEUE = gcmCC('Q','U','E',' '),
+ gcvOBJ_SAMPLER = gcmCC('S','A','M','P'),
+ gcvOBJ_SHADER = gcmCC('S','H','D','R'),
+ gcvOBJ_STREAM = gcmCC('S','T','R','M'),
+ gcvOBJ_SURF = gcmCC('S','U','R','F'),
+ gcvOBJ_TEXTURE = gcmCC('T','X','T','R'),
+ gcvOBJ_UNIFORM = gcmCC('U','N','I','F'),
+ gcvOBJ_VARIABLE = gcmCC('V','A','R','I'),
+ gcvOBJ_VERTEX = gcmCC('V','R','T','X'),
+ gcvOBJ_VIDMEM = gcmCC('V','M','E','M'),
+ gcvOBJ_VG = gcmCC('V','G',' ',' '),
+}
+gceOBJECT_TYPE;
+
+/* gcsOBJECT object defintinon. */
+typedef struct _gcsOBJECT
+{
+ /* Type of an object. */
+ gceOBJECT_TYPE type;
+}
+gcsOBJECT;
+
+/* Kernel settings. */
+typedef struct _gcsKERNEL_SETTINGS
+{
+ /* Used RealTime signal between kernel and user. */
+ gctINT signal;
+}
+gcsKERNEL_SETTINGS;
+
+typedef struct _gckHARDWARE * gckHARDWARE;
+
+/*******************************************************************************
+**
+** gcmVERIFY_OBJECT
+**
+** Assert if an object is invalid or is not of the specified type. If the
+** object is invalid or not of the specified type, gcvSTATUS_INVALID_OBJECT
+** will be returned from the current function. In retail mode this macro
+** does nothing.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_OBJECT(prefix, obj, t) \
+ do \
+ { \
+ if ((obj) == gcvNULL) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: NULL"); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT((obj) != gcvNULL); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ } \
+ else if (((gcsOBJECT*) (obj))->type != t) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: %c%c%c%c", \
+ gcmCC_PRINT(((gcsOBJECT*) (obj))->type)); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT(((gcsOBJECT*)(obj))->type == t); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcm, obj, t)
+# define gcmkVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcmk, obj, t)
+#else
+# define gcmVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+# define gcmkVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+#endif
+
+/******************************************************************************\
+********************************** gckOS Object *********************************
+\******************************************************************************/
+
+typedef struct _gckOS * gckOS;
+
+/* Construct a new gckOS object. */
+gceSTATUS
+gckOS_Construct(
+ IN gctPOINTER Context,
+ OUT gckOS * Os
+ );
+
+/* Destroy an gckOS object. */
+gceSTATUS
+gckOS_Destroy(
+ IN gckOS Os
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckOS_QueryVideoMemory(
+ IN gckOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gckOS_Allocate(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gckOS_Free(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Wrapper for allocation memory.. */
+gceSTATUS
+gckOS_AllocateMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Wrapper for freeing memory. */
+gceSTATUS
+gckOS_FreeMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocateVirtualMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Wrapper for freeing virtual memory. */
+gceSTATUS
+gckOS_FreeVirtualMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemoryEx(
+ IN gckOS Os,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Lock pages. */
+gceSTATUS
+gckOS_LockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+#endif
+ OUT gctPOINTER * Logical,
+ OUT gctSIZE_T * PageCount
+ );
+
+/* Map pages. */
+gceSTATUS
+gckOS_MapPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Logical,
+#endif
+ IN gctSIZE_T PageCount,
+ IN gctPOINTER PageTable
+ );
+
+/* Unlock pages. */
+gceSTATUS
+gckOS_UnlockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+#endif
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Free paged memory. */
+gceSTATUS
+gckOS_FreePagedMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Allocate non-paged memory. */
+gceSTATUS
+gckOS_AllocateNonPagedMemory(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non-paged memory. */
+gceSTATUS
+gckOS_FreeNonPagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gckOS_AllocateContiguous(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gckOS_FreeContiguous(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get the number fo bytes per page. */
+gceSTATUS
+gckOS_GetPageSize(
+ IN gckOS Os,
+ OUT gctSIZE_T * PageSize
+ );
+
+/* Get the physical address of a corresponding logical address. */
+gceSTATUS
+gckOS_GetPhysicalAddress(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+/* Map physical memory. */
+gceSTATUS
+gckOS_MapPhysical(
+ IN gckOS Os,
+ IN gctUINT32 Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap previously mapped physical memory. */
+gceSTATUS
+gckOS_UnmapPhysical(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Read data from a hardware register. */
+gceSTATUS
+gckOS_ReadRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+/* Write data to a hardware register. */
+gceSTATUS
+gckOS_WriteRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Write data to a 32-bit memory location. */
+gceSTATUS
+gckOS_WriteMemory(
+ IN gckOS Os,
+ IN gctPOINTER Address,
+ IN gctUINT32 Data
+ );
+
+/* Map physical memory into the process space. */
+gceSTATUS
+gckOS_MapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap physical memory from the process space. */
+gceSTATUS
+gckOS_UnmapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Create a new mutex. */
+gceSTATUS
+gckOS_CreateMutex(
+ IN gckOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gckOS_DeleteMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gckOS_AcquireMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gckOS_ReleaseMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Atomically exchange a pair of 32-bit values. */
+gceSTATUS
+gckOS_AtomicExchange(
+ IN gckOS Os,
+ IN OUT gctUINT32_PTR Target,
+ IN gctUINT32 NewValue,
+ OUT gctUINT32_PTR OldValue
+ );
+
+/* Atomically exchange a pair of pointers. */
+gceSTATUS
+gckOS_AtomicExchangePtr(
+ IN gckOS Os,
+ IN OUT gctPOINTER * Target,
+ IN gctPOINTER NewValue,
+ OUT gctPOINTER * OldValue
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomConstruct
+**
+** Create an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** OUTPUT:
+**
+** gctPOINTER * Atom
+** Pointer to a variable receiving the constructed atom.
+*/
+gceSTATUS
+gckOS_AtomConstruct(
+ IN gckOS Os,
+ OUT gctPOINTER * Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDestroy
+**
+** Destroy an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom to destroy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_AtomDestroy(
+ IN gckOS Os,
+ OUT gctPOINTER Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomGet
+**
+** Get the 32-bit value protected by an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the value of the atom.
+*/
+gceSTATUS
+gckOS_AtomGet(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomIncrement
+**
+** Atomically increment the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomIncrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDecrement
+**
+** Atomically decrement the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomDecrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gckOS_Delay(
+ IN gckOS Os,
+ IN gctUINT32 Delay
+ );
+
+/* Memory barrier. */
+gceSTATUS
+gckOS_MemoryBarrier(
+ IN gckOS Os,
+ IN gctPOINTER Address
+ );
+
+/* Map user pointer. */
+gceSTATUS
+gckOS_MapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Unmap user pointer. */
+gceSTATUS
+gckOS_UnmapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ IN gctPOINTER KernelPointer
+ );
+
+#ifdef __QNXNTO__
+/* Map user physical address. */
+gceSTATUS
+gckOS_MapUserPhysical(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Phys,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Allocate from user's shared pool. */
+gceSTATUS
+gckOS_AllocateNonPagedMemoryShmPool(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Pid,
+ IN gctHANDLE Handle,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+#endif
+
+gceSTATUS
+gckOS_SuspendInterrupt(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_ResumeInterrupt(
+ IN gckOS Os
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gckOS_GetBaseAddress(
+ IN gckOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gckOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gckOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Device I/O control to the kernel HAL layer. */
+gceSTATUS
+gckOS_DeviceControl(
+ IN gckOS Os,
+ IN gctBOOL FromUser,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ OUT gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/*******************************************************************************
+**
+** gckOS_GetProcessID
+**
+** Get current process ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ProcessID
+** Pointer to the variable that receives the process ID.
+*/
+gceSTATUS
+gckOS_GetProcessID(
+ OUT gctUINT32_PTR ProcessID
+ );
+
+/*******************************************************************************
+**
+** gckOS_GetThreadID
+**
+** Get current thread ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ThreadID
+** Pointer to the variable that receives the thread ID.
+*/
+gceSTATUS
+gckOS_GetThreadID(
+ OUT gctUINT32_PTR ThreadID
+ );
+
+/******************************************************************************\
+********************************** Signal Object *********************************
+\******************************************************************************/
+
+/* User signal command codes. */
+typedef enum _gceUSER_SIGNAL_COMMAND_CODES
+{
+ gcvUSER_SIGNAL_CREATE,
+ gcvUSER_SIGNAL_DESTROY,
+ gcvUSER_SIGNAL_SIGNAL,
+ gcvUSER_SIGNAL_WAIT,
+}
+gceUSER_SIGNAL_COMMAND_CODES;
+
+/* Create a signal. */
+gceSTATUS
+gckOS_CreateSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gckOS_DestroySignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gckOS_Signal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gckOS_WaitSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Wait for a signal uninterruptibly. */
+gceSTATUS
+gckOS_WaitSignalUninterruptible(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Map a user signal to the kernel space. */
+gceSTATUS
+gckOS_MapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process,
+ OUT gctSIGNAL * MappedSignal
+ );
+
+/* Unmap a user signal */
+gceSTATUS
+gckOS_UnmapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL MappedSignal
+ );
+
+/* Map user memory. */
+gceSTATUS
+gckOS_MapUserMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gckOS_UnmapUserMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+#if !USE_NEW_LINUX_SIGNAL
+/* Create signal to be used in the user space. */
+gceSTATUS
+gckOS_CreateUserSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctINT * SignalID
+ );
+
+/* Destroy signal used in the user space. */
+gceSTATUS
+gckOS_DestroyUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID
+ );
+
+/* Wait for signal used in the user space. */
+gceSTATUS
+gckOS_WaitUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctUINT32 Wait
+ );
+
+/* Signal a signal used in the user space. */
+gceSTATUS
+gckOS_SignalUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctBOOL State
+ );
+#endif /* USE_NEW_LINUX_SIGNAL */
+
+/* Set a signal owned by a process. */
+#if defined(__QNXNTO__)
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctINT Recvid,
+ IN gctINT Coid
+ );
+#else
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process
+ );
+#endif
+
+/******************************************************************************\
+** Cache Support
+*/
+
+gceSTATUS
+gckOS_CacheFlush(
+ gckOS Os,
+ gctHANDLE ProcessId,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gckOS_CacheInvalidate(
+ gckOS Os,
+ gctHANDLE ProcessId,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+** Debug Support
+*/
+
+void
+gckOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gckOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gckOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+/*******************************************************************************
+** Broadcast interface.
+*/
+
+typedef enum _gceBROADCAST
+{
+ /* GPU might be idle. */
+ gcvBROADCAST_GPU_IDLE,
+
+ /* A commit is going to happen. */
+ gcvBROADCAST_GPU_COMMIT,
+
+ /* GPU seems to be stuck. */
+ gcvBROADCAST_GPU_STUCK,
+
+ /* First process gets attached. */
+ gcvBROADCAST_FIRST_PROCESS,
+
+ /* Last process gets detached. */
+ gcvBROADCAST_LAST_PROCESS,
+
+ /* AXI bus error. */
+ gcvBROADCAST_AXI_BUS_ERROR,
+}
+gceBROADCAST;
+
+gceSTATUS
+gckOS_Broadcast(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gceBROADCAST Reason
+ );
+
+/*******************************************************************************
+**
+** gckOS_SetGPUPower
+**
+** Set the power of the GPU on or off.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.ß
+**
+** gctBOOL Clock
+** gcvTRUE to turn on the clock, or gcvFALSE to turn off the clock.
+**
+** gctBOOL Power
+** gcvTRUE to turn on the power, or gcvFALSE to turn off the power.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_SetGPUPower(
+ IN gckOS Os,
+ IN gctBOOL Clock,
+ IN gctBOOL Power
+ );
+
+/*******************************************************************************
+** Semaphores.
+*/
+
+/* Create a new semaphore. */
+gceSTATUS
+gckOS_CreateSemaphore(
+ IN gckOS Os,
+ OUT gctPOINTER * Semaphore
+ );
+
+/* Delete a semahore. */
+gceSTATUS
+gckOS_DestroySemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Acquire a semahore. */
+gceSTATUS
+gckOS_AcquireSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Release a semahore. */
+gceSTATUS
+gckOS_ReleaseSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/******************************************************************************\
+********************************* gckHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gckHEAP * gckHEAP;
+
+/* Construct a new gckHEAP object. */
+gceSTATUS
+gckHEAP_Construct(
+ IN gckOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gckHEAP * Heap
+ );
+
+/* Destroy an gckHEAP object. */
+gceSTATUS
+gckHEAP_Destroy(
+ IN gckHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gckHEAP_Allocate(
+ IN gckHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckHEAP_Free(
+ IN gckHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+/* Profile the heap. */
+gceSTATUS
+gckHEAP_ProfileStart(
+ IN gckHEAP Heap
+ );
+
+gceSTATUS
+gckHEAP_ProfileEnd(
+ IN gckHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+
+#if defined gcdHAL_TEST
+gceSTATUS
+gckHEAP_Test(
+ IN gckHEAP Heap,
+ IN gctSIZE_T Vectors,
+ IN gctSIZE_T MaxSize
+ );
+#endif
+
+/******************************************************************************\
+******************************** gckVIDMEM Object ******************************
+\******************************************************************************/
+
+typedef struct _gckVIDMEM * gckVIDMEM;
+typedef union _gcuVIDMEM_NODE * gcuVIDMEM_NODE_PTR;
+typedef struct _gckKERNEL * gckKERNEL;
+
+/* Construct a new gckVIDMEM object. */
+gceSTATUS
+gckVIDMEM_Construct(
+ IN gckOS Os,
+ IN gctUINT32 BaseAddress,
+ IN gctSIZE_T Bytes,
+ IN gctSIZE_T Threshold,
+ IN gctSIZE_T Banking,
+ OUT gckVIDMEM * Memory
+ );
+
+/* Destroy an gckVDIMEM object. */
+gceSTATUS
+gckVIDMEM_Destroy(
+ IN gckVIDMEM Memory
+ );
+
+/* Allocate rectangular memory. */
+gceSTATUS
+gckVIDMEM_Allocate(
+ IN gckVIDMEM Memory,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT BytesPerPixel,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+#ifdef __QNXNTO__
+ IN gctHANDLE Handle,
+#endif
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Allocate linear memory. */
+gceSTATUS
+gckVIDMEM_AllocateLinear(
+ IN gckVIDMEM Memory,
+ IN gctSIZE_T Bytes,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+#ifdef __QNXNTO__
+ IN gctHANDLE Handle,
+#endif
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckVIDMEM_Free(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/* Lock memory. */
+gceSTATUS
+gckVIDMEM_Lock(
+ IN gcuVIDMEM_NODE_PTR Node,
+ OUT gctUINT32 * Address
+ );
+
+/* Unlock memory. */
+gceSTATUS
+gckVIDMEM_Unlock(
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type,
+ IN OUT gctBOOL * Asynchroneous
+ );
+
+/* Construct a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_ConstructVirtual(
+ IN gckKERNEL Kernel,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+#ifdef __QNXNTO__
+ IN gctHANDLE Handle,
+#endif
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Destroy a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_DestroyVirtual(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+#ifdef __QNXNTO__
+/* Set the allocating process' PID for this node. */
+gceSTATUS
+gckVIDMEM_SetPID(
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctUINT32 Pid);
+#endif
+
+/******************************************************************************\
+******************************** gckKERNEL Object ******************************
+\******************************************************************************/
+
+struct _gcsHAL_INTERFACE;
+
+/* Notifications. */
+typedef enum _gceNOTIFY
+{
+ gcvNOTIFY_INTERRUPT,
+ gcvNOTIFY_COMMAND_QUEUE,
+}
+gceNOTIFY;
+
+/* Event locations. */
+typedef enum _gceKERNEL_WHERE
+{
+ gcvKERNEL_COMMAND,
+ gcvKERNEL_VERTEX,
+ gcvKERNEL_TRIANGLE,
+ gcvKERNEL_TEXTURE,
+ gcvKERNEL_PIXEL,
+}
+gceKERNEL_WHERE;
+
+/* Flush flags. */
+typedef enum _gceKERNEL_FLUSH
+{
+ gcvFLUSH_COLOR = 0x01,
+ gcvFLUSH_DEPTH = 0x02,
+ gcvFLUSH_TEXTURE = 0x04,
+ gcvFLUSH_2D = 0x08,
+ gcvFLUSH_ALL = gcvFLUSH_COLOR
+ | gcvFLUSH_DEPTH
+ | gcvFLUSH_TEXTURE
+ | gcvFLUSH_2D,
+}
+gceKERNEL_FLUSH;
+
+/* Construct a new gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Construct(
+ IN gckOS Os,
+ IN gctPOINTER Context,
+ OUT gckKERNEL * Kernel
+ );
+
+/* Destroy an gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Destroy(
+ IN gckKERNEL Kernel
+ );
+
+/* Dispatch a user-level command. */
+gceSTATUS
+gckKERNEL_Dispatch(
+ IN gckKERNEL Kernel,
+ IN gctBOOL FromUser,
+ IN OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckKERNEL_QueryVideoMemory(
+ IN gckKERNEL Kernel,
+ OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Lookup the gckVIDMEM object for a pool. */
+gceSTATUS
+gckKERNEL_GetVideoMemoryPool(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+/* Map video memory. */
+gceSTATUS
+gckKERNEL_MapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Address,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes,
+#endif
+ OUT gctPOINTER * Logical
+ );
+
+#ifdef __QNXNTO__
+/* Unmap video memory. */
+gceSTATUS
+gckKERNEL_UnmapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes
+ );
+#endif
+
+/* Map memory. */
+gceSTATUS
+gckKERNEL_MapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap memory. */
+gceSTATUS
+gckKERNEL_UnmapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Notification of events. */
+gceSTATUS
+gckKERNEL_Notify(
+ IN gckKERNEL Kernel,
+ IN gceNOTIFY Notifcation,
+ IN gctBOOL Data
+ );
+
+gceSTATUS
+gckKERNEL_QuerySettings(
+ IN gckKERNEL Kernel,
+ OUT gcsKERNEL_SETTINGS * Settings
+ );
+
+/*******************************************************************************
+**
+** gckKERNEL_Recovery
+**
+** Try to recover the GPU from a fatal error.
+**
+** INPUT:
+**
+** gckKERNEL Kernel
+** Pointer to an gckKERNEL object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckKERNEL_Recovery(
+ IN gckKERNEL Kernel
+ );
+
+/******************************************************************************\
+******************************* gckHARDWARE Object *****************************
+\******************************************************************************/
+
+/* Construct a new gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Construct(
+ IN gckOS Os,
+ OUT gckHARDWARE * Hardware
+ );
+
+/* Destroy an gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Destroy(
+ IN gckHARDWARE Hardware
+ );
+
+/* Query system memory requirements. */
+gceSTATUS
+gckHARDWARE_QuerySystemMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * SystemSize,
+ OUT gctUINT32 * SystemBaseAddress
+ );
+
+/* Build virtual address. */
+gceSTATUS
+gckHARDWARE_BuildVirtualAddress(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Index,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Query command buffer requirements. */
+gceSTATUS
+gckHARDWARE_QueryCommandBuffer(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * Alignment,
+ OUT gctSIZE_T * ReservedHead,
+ OUT gctSIZE_T * ReservedTail
+ );
+
+/* Add a WAIT/LINK pair in the command queue. */
+gceSTATUS
+gckHARDWARE_WaitLink(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPOINTER * Wait,
+ OUT gctSIZE_T * WaitBytes
+ );
+
+/* Kickstart the command processor. */
+gceSTATUS
+gckHARDWARE_Execute(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Physical,
+ IN gctBOOL PhysicalAddresses,
+#endif
+ IN gctSIZE_T Bytes
+ );
+
+/* Add an END command in the command queue. */
+gceSTATUS
+gckHARDWARE_End(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a NOP command in the command queue. */
+gceSTATUS
+gckHARDWARE_Nop(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a WAIT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Wait(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Count,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a PIPESELECT command in the command queue. */
+gceSTATUS
+gckHARDWARE_PipeSelect(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Pipe,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a LINK command in the command queue. */
+gceSTATUS
+gckHARDWARE_Link(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctPOINTER FetchAddress,
+ IN gctSIZE_T FetchSize,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add an EVENT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Event(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT8 Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Query the available memory. */
+gceSTATUS
+gckHARDWARE_QueryMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctUINT32 * InternalBaseAddress,
+ OUT gctUINT32 * InternalAlignment,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctUINT32 * ExternalBaseAddress,
+ OUT gctUINT32 * ExternalAlignment,
+ OUT gctUINT32 * HorizontalTileSize,
+ OUT gctUINT32 * VerticalTileSize
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gckHARDWARE_QueryChipIdentity(
+ IN gckHARDWARE Hardware,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures,
+ OUT gctUINT32* ChipMinorFeatures1,
+ OUT gctUINT32* ChipMinorFeatures2
+ );
+
+/* Query the specifications sof the hardware. */
+gceSTATUS
+gckHARDWARE_QueryChipSpecs(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR StreamCount,
+ OUT gctUINT32_PTR RegisterMax,
+ OUT gctUINT32_PTR ThreadCount,
+ OUT gctUINT32_PTR ShaderCoreCount,
+ OUT gctUINT32_PTR VertexCacheSize,
+ OUT gctUINT32_PTR VertexOutputBufferSize
+ );
+
+/* Convert an API format. */
+gceSTATUS
+gckHARDWARE_ConvertFormat(
+ IN gckHARDWARE Hardware,
+ IN gceSURF_FORMAT Format,
+ OUT gctUINT32 * BitsPerPixel,
+ OUT gctUINT32 * BytesPerTile
+ );
+
+/* Split a harwdare specific address into API stuff. */
+gceSTATUS
+gckHARDWARE_SplitMemory(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Align size to tile boundary. */
+gceSTATUS
+gckHARDWARE_AlignToTile(
+ IN gckHARDWARE Hardware,
+ IN gceSURF_TYPE Type,
+ IN OUT gctUINT32_PTR Width,
+ IN OUT gctUINT32_PTR Height,
+ OUT gctBOOL_PTR SuperTiled
+ );
+
+/* Update command queue tail pointer. */
+gceSTATUS
+gckHARDWARE_UpdateQueueTail(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset
+ );
+
+/* Convert logical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertLogical(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+#ifdef __QNXNTO__
+/* Convert physical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertPhysical(
+ IN gckHARDWARE Hardware,
+ IN gctPHYS_ADDR Physical,
+ OUT gctUINT32 * Address
+ );
+#endif
+
+/* Interrupt manager. */
+gceSTATUS
+gckHARDWARE_Interrupt(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL InterruptValid
+ );
+
+/* Program MMU. */
+gceSTATUS
+gckHARDWARE_SetMMU(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical
+ );
+
+/* Flush the MMU. */
+gceSTATUS
+gckHARDWARE_FlushMMU(
+ IN gckHARDWARE Hardware
+ );
+
+/* Get idle register. */
+gceSTATUS
+gckHARDWARE_GetIdle(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Wait,
+ OUT gctUINT32 * Data
+ );
+
+/* Flush the caches. */
+gceSTATUS
+gckHARDWARE_Flush(
+ IN gckHARDWARE Hardware,
+ IN gceKERNEL_FLUSH Flush,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Enable/disable fast clear. */
+gceSTATUS
+gckHARDWARE_SetFastClear(
+ IN gckHARDWARE Hardware,
+ IN gctINT Enable,
+ IN gctINT Compression
+ );
+
+gceSTATUS
+gckHARDWARE_ReadInterrupt(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR IDs
+ );
+
+/* Power management. */
+gceSTATUS
+gckHARDWARE_SetPowerManagementState(
+ IN gckHARDWARE Hardware,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gckHARDWARE_QueryPowerManagementState(
+ IN gckHARDWARE Hardware,
+ OUT gceCHIPPOWERSTATE* State
+ );
+
+/* Profile 2D Engine. */
+gceSTATUS
+gckHARDWARE_ProfileEngine2D(
+ IN gckHARDWARE Hardware,
+ OUT gcs2D_PROFILE_PTR Profile
+ );
+
+gceSTATUS
+gckHARDWARE_InitializeHardware(
+ IN gckHARDWARE Hardware
+ );
+
+gceSTATUS
+gckHARDWARE_Reset(
+ IN gckHARDWARE Hardware
+ );
+
+typedef gceSTATUS (*gctISRMANAGERFUNC)(gctPOINTER Context);
+
+gceSTATUS
+gckHARDWARE_SetIsrManager(
+ IN gckHARDWARE Hardware,
+ IN gctISRMANAGERFUNC StartIsr,
+ IN gctISRMANAGERFUNC StopIsr,
+ IN gctPOINTER Context
+ );
+
+/******************************************************************************\
+***************************** gckINTERRUPT Object ******************************
+\******************************************************************************/
+
+typedef struct _gckINTERRUPT * gckINTERRUPT;
+
+typedef gceSTATUS (* gctINTERRUPT_HANDLER)(
+ IN gckKERNEL Kernel
+ );
+
+gceSTATUS
+gckINTERRUPT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckINTERRUPT * Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_Destroy(
+ IN gckINTERRUPT Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_SetHandler(
+ IN gckINTERRUPT Interrupt,
+ IN OUT gctINT32_PTR Id,
+ IN gctINTERRUPT_HANDLER Handler
+ );
+
+gceSTATUS
+gckINTERRUPT_Notify(
+ IN gckINTERRUPT Interrupt,
+ IN gctBOOL Valid
+ );
+
+/******************************************************************************\
+******************************** gckEVENT Object *******************************
+\******************************************************************************/
+
+typedef struct _gckEVENT * gckEVENT;
+
+/* Construct a new gckEVENT object. */
+gceSTATUS
+gckEVENT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckEVENT * Event
+ );
+
+/* Destroy an gckEVENT object. */
+gceSTATUS
+gckEVENT_Destroy(
+ IN gckEVENT Event
+ );
+
+/* Schedule a FreeNonPagedMemory event. */
+gceSTATUS
+gckEVENT_FreeNonPagedMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeContiguousMemory event. */
+gceSTATUS
+gckEVENT_FreeContiguousMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeVideoMemory event. */
+gceSTATUS
+gckEVENT_FreeVideoMemory(
+ IN gckEVENT Event,
+ IN gcuVIDMEM_NODE_PTR VideoMemory,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a signal event. */
+gceSTATUS
+gckEVENT_Signal(
+ IN gckEVENT Event,
+ IN gctSIGNAL Signal,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule an Unlock event. */
+gceSTATUS
+gckEVENT_Unlock(
+ IN gckEVENT Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type
+ );
+
+gceSTATUS
+gckEVENT_Submit(
+ IN gckEVENT Event,
+ IN gctBOOL Wait
+ );
+
+struct _gcsQUEUE;
+
+/* Commit an event queue. */
+gceSTATUS
+gckEVENT_Commit(
+ IN gckEVENT Event,
+ IN struct _gcsQUEUE * Queue
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Notify(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Interrupt(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+/******************************************************************************\
+******************************* gckCOMMAND Object ******************************
+\******************************************************************************/
+
+typedef struct _gckCOMMAND * gckCOMMAND;
+
+/* Construct a new gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckCOMMAND * Command
+ );
+
+/* Destroy an gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Destroy(
+ IN gckCOMMAND Command
+ );
+
+/* Start the command queue. */
+gceSTATUS
+gckCOMMAND_Start(
+ IN gckCOMMAND Command
+ );
+
+/* Stop the command queue. */
+gceSTATUS
+gckCOMMAND_Stop(
+ IN gckCOMMAND Command
+ );
+
+/* Commit a buffer to the command queue. */
+gceSTATUS
+gckCOMMAND_Commit(
+ IN gckCOMMAND Command,
+ IN gcoCMDBUF CommandBuffer,
+ IN gcoCONTEXT Context,
+ IN gctHANDLE Process
+ );
+
+/* Reserve space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Reserve(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequestedBytes,
+ OUT gctPOINTER * Buffer,
+ OUT gctSIZE_T * BufferSize
+ );
+
+/* Release reserved space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Release(
+ IN gckCOMMAND Command
+ );
+
+/* Execute reserved space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Execute(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequstedBytes
+ );
+
+/* Stall the command queue. */
+gceSTATUS
+gckCOMMAND_Stall(
+ IN gckCOMMAND Command
+ );
+
+/******************************************************************************\
+********************************* gckMMU Object ********************************
+\******************************************************************************/
+
+typedef struct _gckMMU * gckMMU;
+
+/* Construct a new gckMMU object. */
+gceSTATUS
+gckMMU_Construct(
+ IN gckKERNEL Kernel,
+ IN gctSIZE_T MmuSize,
+ OUT gckMMU * Mmu
+ );
+
+/* Destroy an gckMMU object. */
+gceSTATUS
+gckMMU_Destroy(
+ IN gckMMU Mmu
+ );
+
+/* Allocate pages inside the MMU. */
+gceSTATUS
+gckMMU_AllocatePages(
+ IN gckMMU Mmu,
+ IN gctSIZE_T PageCount,
+ OUT gctPOINTER * PageTable,
+ OUT gctUINT32 * Address
+ );
+
+/* Remove a page table from the MMU. */
+gceSTATUS
+gckMMU_FreePages(
+ IN gckMMU Mmu,
+ IN gctPOINTER PageTable,
+ IN gctSIZE_T PageCount
+ );
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_InsertNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+
+gceSTATUS
+gckMMU_RemoveNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+#endif
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_FreeHandleMemory(
+ IN gckMMU Mmu,
+ IN gctHANDLE Handle
+ );
+#endif
+
+#if defined gcdHAL_TEST
+gceSTATUS
+gckMMU_Test(
+ IN gckMMU Mmu,
+ IN gctSIZE_T Vectors,
+ IN gctINT MaxSize
+ );
+#endif
+
+gceSTATUS
+gckHARDWARE_QueryProfileRegisters(
+ IN gckHARDWARE Hardware,
+ OUT gcsPROFILER_COUNTERS * Counters
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_h_ */
+
diff --git a/src/include_arnova/gc_hal_base.h b/src/include_arnova/gc_hal_base.h
new file mode 100644
index 0000000..d224b11
--- /dev/null
+++ b/src/include_arnova/gc_hal_base.h
@@ -0,0 +1,2573 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_base_h_
+#define __gc_hal_base_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+#include "gc_hal_dump.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoHAL * gcoHAL;
+typedef struct _gcoOS * gcoOS;
+typedef struct _gco2D * gco2D;
+typedef struct _gcoVG * gcoVG;
+typedef struct _gco3D * gco3D;
+typedef struct _gcoSURF * gcoSURF;
+typedef struct _gcsSURF_INFO * gcsSURF_INFO_PTR;
+typedef struct _gcsSURF_NODE * gcsSURF_NODE_PTR;
+typedef struct _gcsSURF_FORMAT_INFO * gcsSURF_FORMAT_INFO_PTR;
+typedef struct _gcsPOINT * gcsPOINT_PTR;
+typedef struct _gcsSIZE * gcsSIZE_PTR;
+typedef struct _gcsRECT * gcsRECT_PTR;
+typedef struct _gcsBOUNDARY * gcsBOUNDARY_PTR;
+typedef struct _gcoDUMP * gcoDUMP;
+typedef struct _gcoHARDWARE * gcoHARDWARE;
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+/* Video memory pool type. */
+typedef enum _gcePOOL
+{
+ gcvPOOL_UNKNOWN,
+ gcvPOOL_DEFAULT,
+ gcvPOOL_LOCAL,
+ gcvPOOL_LOCAL_INTERNAL,
+ gcvPOOL_LOCAL_EXTERNAL,
+ gcvPOOL_UNIFIED,
+ gcvPOOL_SYSTEM,
+ gcvPOOL_VIRTUAL,
+ gcvPOOL_USER,
+ gcvPOOL_CONTIGUOUS
+}
+gcePOOL;
+
+/* Blending functions. */
+typedef enum _gceBLEND_FUNCTION
+{
+ gcvBLEND_ZERO,
+ gcvBLEND_ONE,
+ gcvBLEND_SOURCE_COLOR,
+ gcvBLEND_INV_SOURCE_COLOR,
+ gcvBLEND_SOURCE_ALPHA,
+ gcvBLEND_INV_SOURCE_ALPHA,
+ gcvBLEND_TARGET_COLOR,
+ gcvBLEND_INV_TARGET_COLOR,
+ gcvBLEND_TARGET_ALPHA,
+ gcvBLEND_INV_TARGET_ALPHA,
+ gcvBLEND_SOURCE_ALPHA_SATURATE,
+ gcvBLEND_CONST_COLOR,
+ gcvBLEND_INV_CONST_COLOR,
+ gcvBLEND_CONST_ALPHA,
+ gcvBLEND_INV_CONST_ALPHA,
+}
+gceBLEND_FUNCTION;
+
+/* Blending modes. */
+typedef enum _gceBLEND_MODE
+{
+ gcvBLEND_ADD,
+ gcvBLEND_SUBTRACT,
+ gcvBLEND_REVERSE_SUBTRACT,
+ gcvBLEND_MIN,
+ gcvBLEND_MAX,
+}
+gceBLEND_MODE;
+
+/* API flags. */
+typedef enum _gceAPI
+{
+ gcvAPI_D3D = 0x1,
+ gcvAPI_OPENGL = 0x2,
+}
+gceAPI;
+
+/* Depth modes. */
+typedef enum _gceDEPTH_MODE
+{
+ gcvDEPTH_NONE,
+ gcvDEPTH_Z,
+ gcvDEPTH_W,
+}
+gceDEPTH_MODE;
+
+typedef enum _gceWHERE
+{
+ gcvWHERE_COMMAND,
+ gcvWHERE_RASTER,
+ gcvWHERE_PIXEL,
+}
+gceWHERE;
+
+typedef enum _gceHOW
+{
+ gcvHOW_SEMAPHORE = 0x1,
+ gcvHOW_STALL = 0x2,
+ gcvHOW_SEMAPHORE_STALL = 0x3,
+}
+gceHOW;
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Construct a new gcoHAL object. */
+gceSTATUS
+gcoHAL_Construct(
+ IN gctPOINTER Context,
+ IN gcoOS Os,
+ OUT gcoHAL * Hal
+ );
+
+/* Destroy an gcoHAL object. */
+gceSTATUS
+gcoHAL_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Get pointer to gco2D object. */
+gceSTATUS
+gcoHAL_Get2DEngine(
+ IN gcoHAL Hal,
+ OUT gco2D * Engine
+ );
+
+/* Get pointer to gcoVG object. */
+gceSTATUS
+gcoHAL_GetVGEngine(
+ IN gcoHAL Hal,
+ OUT gcoVG * Engine
+ );
+
+/* Get pointer to gco3D object. */
+gceSTATUS
+gcoHAL_Get3DEngine(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+/* Verify whether the specified feature is available in hardware. */
+gceSTATUS
+gcoHAL_IsFeatureAvailable(
+ IN gcoHAL Hal,
+ IN gceFEATURE Feature
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gcoHAL_QueryChipIdentity(
+ IN gcoHAL Hal,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the minor features of the hardware. */
+gceSTATUS gcoHAL_QueryChipMinorFeatures(
+ IN gcoHAL Hal,
+ OUT gctUINT32* NumFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the amount of video memory. */
+gceSTATUS
+gcoHAL_QueryVideoMemory(
+ IN gcoHAL Hal,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Map video memory. */
+gceSTATUS
+gcoHAL_MapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap video memory. */
+gceSTATUS
+gcoHAL_UnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a buffer mapped through its physical address. */
+gceSTATUS
+gcoHAL_ScheduleUnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a user buffer using event mechanism. */
+gceSTATUS
+gcoHAL_ScheduleUnmapUserMemory(
+ IN gcoHAL Hal,
+ IN gctPOINTER Info,
+ IN gctSIZE_T Size,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory
+ );
+
+/* Commit the current command buffer. */
+gceSTATUS
+gcoHAL_Commit(
+ IN gcoHAL Hal,
+ IN gctBOOL Stall
+ );
+
+/* Query the tile capabilities. */
+gceSTATUS
+gcoHAL_QueryTiled(
+ IN gcoHAL Hal,
+ OUT gctINT32 * TileWidth2D,
+ OUT gctINT32 * TileHeight2D,
+ OUT gctINT32 * TileWidth3D,
+ OUT gctINT32 * TileHeight3D
+ );
+
+gceSTATUS
+gcoHAL_Compact(
+ IN gcoHAL Hal
+ );
+
+gceSTATUS
+gcoHAL_ProfileStart(
+ IN gcoHAL Hal
+ );
+
+gceSTATUS
+gcoHAL_ProfileEnd(
+ IN gcoHAL Hal,
+ IN gctCONST_STRING Title
+ );
+
+/* Power Management */
+gceSTATUS
+gcoHAL_SetPowerManagementState(
+ IN gcoHAL Hal,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gcoHAL_QueryPowerManagementState(
+ IN gcoHAL Hal,
+ OUT gceCHIPPOWERSTATE *State
+ );
+
+/* Set the filter type for filter blit. */
+gceSTATUS
+gcoHAL_SetFilterType(
+ IN gcoHAL Hal,
+ IN gceFILTER_TYPE FilterType
+ );
+
+gceSTATUS
+gcoHAL_GetDump(
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Call the kernel HAL layer. */
+gceSTATUS
+gcoHAL_Call(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Schedule an event. */
+gceSTATUS
+gcoHAL_ScheduleEvent(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Destroy a surface. */
+gceSTATUS
+gcoHAL_DestroySurface(
+ IN gcoHAL Hal,
+ IN gcoSURF Surface
+ );
+
+/* Wait for a signal from GPU. */
+gceSTATUS
+gcoHAL_WaitSignalFromGPU(
+ IN gcoHAL Hal,
+ IN gctSIGNAL Signal
+ );
+
+/******************************************************************************\
+********************************** gcoOS Object *********************************
+\******************************************************************************/
+
+/* Construct a new gcoOS object. */
+gceSTATUS
+gcoOS_Construct(
+ IN gctPOINTER Context,
+ OUT gcoOS * Os
+ );
+
+/* Destroy an gcoOS object. */
+gceSTATUS
+gcoOS_Destroy(
+ IN gcoOS Os
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gcoOS_GetBaseAddress(
+ IN gcoOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gcoOS_Allocate(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gcoOS_Free(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoOS_AllocateMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoOS_FreeMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gcoOS_AllocateContiguous(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gcoOS_FreeContiguous(
+ IN gcoOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Map user memory. */
+gceSTATUS
+gcoOS_MapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gcoOS_UnmapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+/* Device I/O Control call to the kernel HAL layer. */
+gceSTATUS
+gcoOS_DeviceControl(
+ IN gcoOS Os,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ IN gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/* Allocate non paged memory. */
+gceSTATUS gcoOS_AllocateNonPagedMemory(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non paged memory. */
+gceSTATUS gcoOS_FreeNonPagedMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+typedef enum _gceFILE_MODE
+{
+ gcvFILE_CREATE = 0,
+ gcvFILE_APPEND,
+ gcvFILE_READ,
+ gcvFILE_CREATETEXT,
+ gcvFILE_APPENDTEXT,
+ gcvFILE_READTEXT,
+}
+gceFILE_MODE;
+
+/* Open a file. */
+gceSTATUS
+gcoOS_Open(
+ IN gcoOS Os,
+ IN gctCONST_STRING FileName,
+ IN gceFILE_MODE Mode,
+ OUT gctFILE * File
+ );
+
+/* Close a file. */
+gceSTATUS
+gcoOS_Close(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Read data from a file. */
+gceSTATUS
+gcoOS_Read(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctPOINTER Data,
+ OUT gctSIZE_T * ByteRead
+ );
+
+/* Write data to a file. */
+gceSTATUS
+gcoOS_Write(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Flush data to a file. */
+gceSTATUS
+gcoOS_Flush(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Create an endpoint for communication. */
+gceSTATUS
+gcoOS_Socket(
+ IN gcoOS Os,
+ IN gctINT Domain,
+ IN gctINT Type,
+ IN gctINT Protocol,
+ OUT gctINT *SockFd
+ );
+
+/* Close a socket. */
+gceSTATUS
+gcoOS_CloseSocket(
+ IN gcoOS Os,
+ IN gctINT SockFd
+ );
+
+/* Initiate a connection on a socket. */
+gceSTATUS
+gcoOS_Connect(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctCONST_POINTER HostName,
+ IN gctUINT Port);
+
+/* Shut down part of connection on a socket. */
+gceSTATUS
+gcoOS_Shutdown(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctINT How
+ );
+
+/* Send a message on a socket. */
+gceSTATUS
+gcoOS_Send(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data,
+ IN gctINT Flags
+ );
+
+/* Initiate a connection on a socket. */
+gceSTATUS
+gcoOS_WaitForSend(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctINT Seconds,
+ IN gctINT MicroSeconds);
+
+/* Get environment variable value. */
+gceSTATUS
+gcoOS_GetEnv(
+ IN gcoOS Os,
+ IN gctCONST_STRING VarName,
+ OUT gctSTRING * Value
+ );
+
+typedef enum _gceFILE_WHENCE
+{
+ gcvFILE_SEEK_SET,
+ gcvFILE_SEEK_CUR,
+ gcvFILE_SEEK_END
+}
+gceFILE_WHENCE;
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_Seek(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Offset,
+ IN gceFILE_WHENCE Whence
+ );
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_SetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Position
+ );
+
+/* Get the current position of a file. */
+gceSTATUS
+gcoOS_GetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ OUT gctUINT32 * Position
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gcoOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Perform a memory fill. */
+gceSTATUS
+gcoOS_MemFill(
+ IN gctPOINTER Destination,
+ IN gctUINT8 Filler,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gcoOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Find the last occurance of a character inside a string. */
+gceSTATUS
+gcoOS_StrFindReverse(
+ IN gctCONST_STRING String,
+ IN gctINT8 Character,
+ OUT gctSTRING * Output
+ );
+
+gceSTATUS
+gcoOS_StrLen(
+ IN gctCONST_STRING String,
+ OUT gctSIZE_T * Length
+ );
+
+gceSTATUS
+gcoOS_StrDup(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ OUT gctSTRING * Target
+ );
+
+/* Copy a string. */
+gceSTATUS
+gcoOS_StrCopySafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Append a string. */
+gceSTATUS
+gcoOS_StrCatSafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Compare two strings. */
+gceSTATUS
+gcoOS_StrCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2
+ );
+
+/* Compare characters of two strings. */
+gceSTATUS
+gcoOS_StrNCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2,
+ IN gctSIZE_T Count
+ );
+
+/* Convert string to float. */
+gceSTATUS
+gcoOS_StrToFloat(
+ IN gctCONST_STRING String,
+ OUT gctFLOAT * Float
+ );
+
+/* Convert string to integer. */
+gceSTATUS
+gcoOS_StrToInt(
+ IN gctCONST_STRING String,
+ OUT gctINT * Int
+ );
+
+gceSTATUS
+gcoOS_MemCmp(
+ IN gctCONST_POINTER Memory1,
+ IN gctCONST_POINTER Memory2,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_PrintStrSafe(
+ OUT gctSTRING String,
+ IN gctSIZE_T StringSize,
+ IN OUT gctUINT * Offset,
+ IN gctCONST_STRING Format,
+ ...
+ );
+
+gceSTATUS
+gcoOS_PrintStrVSafe(
+ OUT gctSTRING String,
+ IN gctSIZE_T StringSize,
+ IN OUT gctUINT * Offset,
+ IN gctCONST_STRING Format,
+ IN gctPOINTER Arguments
+ );
+
+gceSTATUS
+gcoOS_LoadLibrary(
+ IN gcoOS Os,
+ IN gctCONST_STRING Library,
+ OUT gctHANDLE * Handle
+ );
+
+gceSTATUS
+gcoOS_FreeLibrary(
+ IN gcoOS Os,
+ IN gctHANDLE Handle
+ );
+
+gceSTATUS
+gcoOS_GetProcAddress(
+ IN gcoOS Os,
+ IN gctHANDLE Handle,
+ IN gctCONST_STRING Name,
+ OUT gctPOINTER * Function
+ );
+
+gceSTATUS
+gcoOS_Compact(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_ProfileStart(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_ProfileEnd(
+ IN gcoOS Os,
+ IN gctCONST_STRING Title
+ );
+
+gceSTATUS
+gcoOS_SetProfileSetting(
+ IN gcoOS Os,
+ IN gctBOOL Enable,
+ IN gctCONST_STRING FileName
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gcoOS_QueryVideoMemory(
+ IN gcoOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Atoms ----------------------------------------------------------------*/
+
+typedef struct gcsATOM * gcsATOM_PTR;
+
+/* Construct an atom. */
+gceSTATUS
+gcoOS_AtomConstruct(
+ IN gcoOS Os,
+ OUT gcsATOM_PTR * Atom
+ );
+
+/* Destroy an atom. */
+gceSTATUS
+gcoOS_AtomDestroy(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom
+ );
+
+/* Increment an atom. */
+gceSTATUS
+gcoOS_AtomIncrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+/* Decrement an atom. */
+gceSTATUS
+gcoOS_AtomDecrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+gctHANDLE
+gcoOS_GetCurrentProcessID(
+ void
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Time -----------------------------------------------------------------*/
+
+/* Get the number of milliseconds since the system started. */
+gctUINT32
+gcoOS_GetTicks(
+ void
+ );
+
+/* Get time in microseconds. */
+gceSTATUS
+gcoOS_GetTime(
+ gctUINT64_PTR Time
+ );
+
+/* Get CPU usage in microseconds. */
+gceSTATUS
+gcoOS_GetCPUTime(
+ gctUINT64_PTR CPUTime
+ );
+
+/* Get memory usage. */
+gceSTATUS
+gcoOS_GetMemoryUsage(
+ gctUINT32_PTR MaxRSS,
+ gctUINT32_PTR IxRSS,
+ gctUINT32_PTR IdRSS,
+ gctUINT32_PTR IsRSS
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gcoOS_Delay(
+ IN gcoOS Os,
+ IN gctUINT32 Delay
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Mutexes --------------------------------------------------------------*/
+
+/* Create a new mutex. */
+gceSTATUS
+gcoOS_CreateMutex(
+ IN gcoOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gcoOS_DeleteMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gcoOS_AcquireMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gcoOS_ReleaseMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Signals --------------------------------------------------------------*/
+
+/* Create a signal. */
+gceSTATUS
+gcoOS_CreateSignal(
+ IN gcoOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gcoOS_DestroySignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gcoOS_Signal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gcoOS_WaitSignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Write a register. */
+gceSTATUS
+gcoOS_WriteRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Read a register. */
+gceSTATUS
+gcoOS_ReadRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+gceSTATUS
+gcoOS_CacheFlush(
+ IN gcoOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_CacheInvalidate(
+ IN gcoOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/*******************************************************************************
+** gcoMATH object
+*/
+
+#define gcdPI 3.14159265358979323846f
+
+gctUINT32
+gcoMATH_Log2in5dot5(
+ IN gctINT X
+ );
+
+gctFLOAT
+gcoMATH_Sine(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Cosine(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Floor(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Ceiling(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_SquareRoot(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Log2(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Power(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+gctFLOAT
+gcoMATH_Modulo(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+gctFLOAT
+gcoMATH_Exp(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Absolute(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_ArcCosine(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Tangent(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_UInt2Float(
+ IN gctUINT X
+ );
+
+gctUINT
+gcoMATH_Float2UInt(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Multiply(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+/******************************************************************************\
+**************************** Coordinate Structures *****************************
+\******************************************************************************/
+
+typedef struct _gcsPOINT
+{
+ gctINT32 x;
+ gctINT32 y;
+}
+gcsPOINT;
+
+typedef struct _gcsSIZE
+{
+ gctINT32 width;
+ gctINT32 height;
+}
+gcsSIZE;
+
+typedef struct _gcsRECT
+{
+ gctINT32 left;
+ gctINT32 top;
+ gctINT32 right;
+ gctINT32 bottom;
+}
+gcsRECT;
+
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*------------------------------- gcoSURF Common ------------------------------*/
+
+/* Color format classes. */
+typedef enum _gceFORMAT_CLASS
+{
+ gcvFORMAT_CLASS_RGBA = 4500,
+ gcvFORMAT_CLASS_YUV,
+ gcvFORMAT_CLASS_INDEX,
+ gcvFORMAT_CLASS_LUMINANCE,
+ gcvFORMAT_CLASS_BUMP,
+ gcvFORMAT_CLASS_DEPTH,
+}
+gceFORMAT_CLASS;
+
+/* Special enums for width field in gcsFORMAT_COMPONENT. */
+typedef enum _gceCOMPONENT_CONTROL
+{
+ gcvCOMPONENT_NOTPRESENT = 0x00,
+ gcvCOMPONENT_DONTCARE = 0x80,
+ gcvCOMPONENT_WIDTHMASK = 0x7F,
+ gcvCOMPONENT_ODD = 0x80
+}
+gceCOMPONENT_CONTROL;
+
+/* Color format component parameters. */
+typedef struct _gcsFORMAT_COMPONENT
+{
+ gctUINT8 start;
+ gctUINT8 width;
+}
+gcsFORMAT_COMPONENT;
+
+/* RGBA color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_RGBA
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT red;
+ gcsFORMAT_COMPONENT green;
+ gcsFORMAT_COMPONENT blue;
+}
+gcsFORMAT_CLASS_TYPE_RGBA;
+
+/* YUV color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_YUV
+{
+ gcsFORMAT_COMPONENT y;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT v;
+}
+gcsFORMAT_CLASS_TYPE_YUV;
+
+/* Index color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_INDEX
+{
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_INDEX;
+
+/* Luminance color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_LUMINANCE
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_LUMINANCE;
+
+/* Bump map color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_BUMP
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT l;
+ gcsFORMAT_COMPONENT v;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT q;
+ gcsFORMAT_COMPONENT w;
+}
+gcsFORMAT_CLASS_TYPE_BUMP;
+
+/* Depth and stencil format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_DEPTH
+{
+ gcsFORMAT_COMPONENT depth;
+ gcsFORMAT_COMPONENT stencil;
+}
+gcsFORMAT_CLASS_TYPE_DEPTH;
+
+/* Format parameters. */
+typedef struct _gcsSURF_FORMAT_INFO
+{
+ /* Format code and class. */
+ gceSURF_FORMAT format;
+ gceFORMAT_CLASS fmtClass;
+
+ /* The size of one pixel in bits. */
+ gctUINT8 bitsPerPixel;
+
+ /* Component swizzle. */
+ gceSURF_SWIZZLE swizzle;
+
+ /* Some formats have two neighbour pixels interleaved together. */
+ /* To describe such format, set the flag to 1 and add another */
+ /* like this one describing the odd pixel format. */
+ gctUINT8 interleaved;
+
+ /* Format components. */
+ union
+ {
+ gcsFORMAT_CLASS_TYPE_BUMP bump;
+ gcsFORMAT_CLASS_TYPE_RGBA rgba;
+ gcsFORMAT_CLASS_TYPE_YUV yuv;
+ gcsFORMAT_CLASS_TYPE_LUMINANCE lum;
+ gcsFORMAT_CLASS_TYPE_INDEX index;
+ gcsFORMAT_CLASS_TYPE_DEPTH depth;
+ } u;
+}
+gcsSURF_FORMAT_INFO;
+
+/* Frame buffer information. */
+typedef struct _gcsSURF_FRAMEBUFFER
+{
+ gctPOINTER logical;
+ gctUINT width, height;
+ gctINT stride;
+ gceSURF_FORMAT format;
+}
+gcsSURF_FRAMEBUFFER;
+
+/* Generic pixel component descriptors. */
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XXX8;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XX8X;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_X8XX;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_8XXX;
+
+typedef enum _gceORIENTATION
+{
+ gcvORIENTATION_TOP_BOTTOM,
+ gcvORIENTATION_BOTTOM_TOP,
+}
+gceORIENTATION;
+
+
+/* Construct a new gcoSURF object. */
+gceSTATUS
+gcoSURF_Construct(
+ IN gcoHAL Hal,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+/* Destroy an gcoSURF object. */
+gceSTATUS
+gcoSURF_Destroy(
+ IN gcoSURF Surface
+ );
+
+/* Map user-allocated surface. */
+gceSTATUS
+gcoSURF_MapUserSurface(
+ IN gcoSURF Surface,
+ IN gctUINT Alignment,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Set the color type of the surface. */
+gceSTATUS
+gcoSURF_SetColorType(
+ IN gcoSURF Surface,
+ IN gceSURF_COLOR_TYPE ColorType
+ );
+
+/* Get the color type of the surface. */
+gceSTATUS
+gcoSURF_GetColorType(
+ IN gcoSURF Surface,
+ OUT gceSURF_COLOR_TYPE *ColorType
+ );
+
+/* Set the surface ration angle. */
+gceSTATUS
+gcoSURF_SetRotation(
+ IN gcoSURF Surface,
+ IN gceSURF_ROTATION Rotation
+ );
+
+/* Verify and return the state of the tile status mechanism. */
+gceSTATUS
+gcoSURF_IsTileStatusSupported(
+ IN gcoSURF Surface
+ );
+
+/* Enable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_EnableTileStatus(
+ IN gcoSURF Surface
+ );
+
+/* Disable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_DisableTileStatus(
+ IN gcoSURF Surface,
+ IN gctBOOL Decompress
+ );
+
+/* Get surface size. */
+gceSTATUS
+gcoSURF_GetSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctUINT * Depth
+ );
+
+/* Get surface aligned sizes. */
+gceSTATUS
+gcoSURF_GetAlignedSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctINT * Stride
+ );
+
+/* Get surface type and format. */
+gceSTATUS
+gcoSURF_GetFormat(
+ IN gcoSURF Surface,
+ OUT gceSURF_TYPE * Type,
+ OUT gceSURF_FORMAT * Format
+ );
+
+/* Lock the surface. */
+gceSTATUS
+gcoSURF_Lock(
+ IN gcoSURF Surface,
+ IN OUT gctUINT32 * Address,
+ IN OUT gctPOINTER * Memory
+ );
+
+/* Unlock the surface. */
+gceSTATUS
+gcoSURF_Unlock(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory
+ );
+
+/* Return pixel format parameters. */
+gceSTATUS
+gcoSURF_QueryFormat(
+ IN gceSURF_FORMAT Format,
+ OUT gcsSURF_FORMAT_INFO_PTR * Info
+ );
+
+/* Compute the color pixel mask. */
+gceSTATUS
+gcoSURF_ComputeColorMask(
+ IN gcsSURF_FORMAT_INFO_PTR Format,
+ OUT gctUINT32_PTR ColorMask
+ );
+
+/* Flush the surface. */
+gceSTATUS
+gcoSURF_Flush(
+ IN gcoSURF Surface
+ );
+
+/* Fill surface with a value. */
+gceSTATUS
+gcoSURF_Fill(
+ IN gcoSURF Surface,
+ IN gcsPOINT_PTR Origin,
+ IN gcsSIZE_PTR Size,
+ IN gctUINT32 Value,
+ IN gctUINT32 Mask
+ );
+
+/* Alpha blend two surfaces together. */
+gceSTATUS
+gcoSURF_Blend(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrig,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsSIZE_PTR Size,
+ IN gceSURF_BLEND_MODE Mode
+ );
+
+/* Create a new gcoSURF wrapper object. */
+gceSTATUS
+gcoSURF_ConstructWrapper(
+ IN gcoHAL Hal,
+ OUT gcoSURF * Surface
+ );
+
+/* Set the underlying buffer for the surface wrapper. */
+gceSTATUS
+gcoSURF_SetBuffer(
+ IN gcoSURF Surface,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Stride,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Set the size of the surface in pixels and map the underlying buffer. */
+gceSTATUS
+gcoSURF_SetWindow(
+ IN gcoSURF Surface,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height
+ );
+
+/* Increase reference count of the surface. */
+gceSTATUS
+gcoSURF_ReferenceSurface(
+ IN gcoSURF Surface
+ );
+
+/* Get surface reference count. */
+gceSTATUS
+gcoSURF_QueryReferenceCount(
+ IN gcoSURF Surface,
+ OUT gctINT32 * ReferenceCount
+ );
+
+/* Set surface orientation. */
+gceSTATUS
+gcoSURF_SetOrientation(
+ IN gcoSURF Surface,
+ IN gceORIENTATION Orientation
+ );
+
+/* Query surface orientation. */
+gceSTATUS
+gcoSURF_QueryOrientation(
+ IN gcoSURF Surface,
+ OUT gceORIENTATION * Orientation
+ );
+
+/*Reset the hal member of a surface*/
+gceSTATUS
+gcoSURF_ResetHal(
+ IN gcoSURF Surface,
+ IN gcoHAL Hal
+ );
+
+/******************************************************************************\
+********************************* gcoDUMP Object ********************************
+\******************************************************************************/
+
+/* Construct a new gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Construct(
+ IN gcoOS Os,
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Destroy a gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Destroy(
+ IN gcoDUMP Dump
+ );
+
+/* Enable/disable dumping. */
+gceSTATUS
+gcoDUMP_Control(
+ IN gcoDUMP Dump,
+ IN gctSTRING FileName
+ );
+
+gceSTATUS
+gcoDUMP_IsEnabled(
+ IN gcoDUMP Dump,
+ OUT gctBOOL * Enabled
+ );
+
+/* Add surface. */
+gceSTATUS
+gcoDUMP_AddSurface(
+ IN gcoDUMP Dump,
+ IN gctINT32 Width,
+ IN gctINT32 Height,
+ IN gceSURF_FORMAT PixelFormat,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount
+ );
+
+/* Mark the beginning of a frame. */
+gceSTATUS
+gcoDUMP_FrameBegin(
+ IN gcoDUMP Dump
+ );
+
+/* Mark the end of a frame. */
+gceSTATUS
+gcoDUMP_FrameEnd(
+ IN gcoDUMP Dump
+ );
+
+/* Dump data. */
+gceSTATUS
+gcoDUMP_DumpData(
+ IN gcoDUMP Dump,
+ IN gceDUMP_TAG Type,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Delete an address. */
+gceSTATUS
+gcoDUMP_Delete(
+ IN gcoDUMP Dump,
+ IN gctUINT32 Address
+ );
+
+/******************************************************************************\
+******************************* gcsRECT Structure ******************************
+\******************************************************************************/
+
+/* Initialize rectangle structure. */
+gceSTATUS
+gcsRECT_Set(
+ OUT gcsRECT_PTR Rect,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Return the width of the rectangle. */
+gceSTATUS
+gcsRECT_Width(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Width
+ );
+
+/* Return the height of the rectangle. */
+gceSTATUS
+gcsRECT_Height(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Height
+ );
+
+/* Ensure that top left corner is to the left and above the right bottom. */
+gceSTATUS
+gcsRECT_Normalize(
+ IN OUT gcsRECT_PTR Rect
+ );
+
+/* Compare two rectangles. */
+gceSTATUS
+gcsRECT_IsEqual(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * Equal
+ );
+
+/* Compare the sizes of two rectangles. */
+gceSTATUS
+gcsRECT_IsOfEqualSize(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * EqualSize
+ );
+
+
+/******************************************************************************\
+**************************** gcsBOUNDARY Structure *****************************
+\******************************************************************************/
+
+typedef struct _gcsBOUNDARY
+{
+ gctINT x;
+ gctINT y;
+ gctINT width;
+ gctINT height;
+}
+gcsBOUNDARY;
+
+/******************************************************************************\
+********************************* gcoHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gcoHEAP * gcoHEAP;
+
+/* Construct a new gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Construct(
+ IN gcoOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gcoHEAP * Heap
+ );
+
+/* Destroy an gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Destroy(
+ IN gcoHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoHEAP_Allocate(
+ IN gcoHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoHEAP_Free(
+ IN gcoHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+/* Profile the heap. */
+gceSTATUS
+gcoHEAP_ProfileStart(
+ IN gcoHEAP Heap
+ );
+
+gceSTATUS
+gcoHEAP_ProfileEnd(
+ IN gcoHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+
+#if defined gcdHAL_TEST
+gceSTATUS
+gcoHEAP_Test(
+ IN gcoHEAP Heap,
+ IN gctSIZE_T Vectors,
+ IN gctSIZE_T MaxSize
+ );
+#endif
+
+/******************************************************************************\
+******************************* Debugging Macros *******************************
+\******************************************************************************/
+
+void
+gcoOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gcoOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gcoOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+/*******************************************************************************
+**
+** gcmFATAL
+**
+** Print a message to the debugger and execute a break point.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcdDEBUG
+# define gcmFATAL gcoOS_DebugFatal
+# define gcmkFATAL gckOS_DebugFatal
+#elif gcdHAS_ELLIPSES
+# define gcmFATAL(...)
+# define gcmkFATAL(...)
+#else
+ gcmINLINE static void
+ __dummy_fatal(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmFATAL __dummy_fatal
+# define gcmkFATAL __dummy_fatal
+#endif
+
+#define gcmENUM2TEXT(e) case e: return #e
+
+/*******************************************************************************
+**
+** gcmTRACE
+**
+** Print a message to the debugfer if the correct level has been set. In
+** retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** level Level of message.
+** message Message.
+** ... Optional arguments.
+*/
+#define gcvLEVEL_NONE -1
+#define gcvLEVEL_ERROR 0
+#define gcvLEVEL_WARNING 1
+#define gcvLEVEL_INFO 2
+#define gcvLEVEL_VERBOSE 3
+
+void
+gckOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+void
+
+gcoOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcdDEBUG
+# define gcmTRACE gcoOS_DebugTrace
+# define gcmkTRACE gckOS_DebugTrace
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE(...)
+# define gcmkTRACE(...)
+#else
+ gcmINLINE static void
+ __dummy_trace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmTRACE __dummy_trace
+# define gcmkTRACE __dummy_trace
+#endif
+
+/* Debug zones. */
+#define gcvZONE_OS (1 << 0)
+#define gcvZONE_HARDWARE (1 << 1)
+#define gcvZONE_HEAP (1 << 2)
+
+/* Kernel zones. */
+#define gcvZONE_KERNEL (1 << 3)
+#define gcvZONE_VIDMEM (1 << 4)
+#define gcvZONE_COMMAND (1 << 5)
+#define gcvZONE_DRIVER (1 << 6)
+#define gcvZONE_CMODEL (1 << 7)
+#define gcvZONE_MMU (1 << 8)
+#define gcvZONE_EVENT (1 << 9)
+#define gcvZONE_DEVICE (1 << 10)
+
+/* User zones. */
+#define gcvZONE_HAL (1 << 3)
+#define gcvZONE_BUFFER (1 << 4)
+#define gcvZONE_CONTEXT (1 << 5)
+#define gcvZONE_SURFACE (1 << 6)
+#define gcvZONE_INDEX (1 << 7)
+#define gcvZONE_STREAM (1 << 8)
+#define gcvZONE_TEXTURE (1 << 9)
+#define gcvZONE_2D (1 << 10)
+#define gcvZONE_3D (1 << 11)
+#define gcvZONE_COMPILER (1 << 12)
+#define gcvZONE_MEMORY (1 << 13)
+#define gcvZONE_STATE (1 << 14)
+#define gcvZONE_AUX (1 << 15)
+
+/* API definitions. */
+#define gcvZONE_API_HAL (0 << 28)
+#define gcvZONE_API_EGL (1 << 28)
+#define gcvZONE_API_ES11 (2 << 28)
+#define gcvZONE_API_ES20 (3 << 28)
+#define gcvZONE_API_VG11 (4 << 28)
+#define gcvZONE_API_GL (5 << 28)
+#define gcvZONE_API_DFB (6 << 28)
+#define gcvZONE_API_GDI (7 << 28)
+#define gcvZONE_API_D3D (8 << 28)
+
+#define gcmZONE_GET_API(zone) ((zone) >> 28)
+#define gcdZONE_MASK 0x0FFFFFFF
+
+/* Handy zones. */
+#define gcvZONE_NONE 0
+#define gcvZONE_ALL gcdZONE_MASK
+
+/*******************************************************************************
+**
+** gcmTRACE_ZONE
+**
+** Print a message to the debugger if the correct level and zone has been
+** set. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** Level Level of message.
+** Zone Zone of message.
+** Message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcdDEBUG
+# define gcmTRACE_ZONE gcoOS_DebugTraceZone
+# define gcmkTRACE_ZONE gckOS_DebugTraceZone
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE_ZONE(...)
+# define gcmkTRACE_ZONE(...)
+#else
+ gcmINLINE static void
+ __dummy_trace_zone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmTRACE_ZONE __dummy_trace_zone
+# define gcmkTRACE_ZONE __dummy_trace_zone
+#endif
+
+/******************************************************************************\
+******************************** Logging Macros ********************************
+\******************************************************************************/
+
+#define gcdHEADER_LEVEL gcvLEVEL_VERBOSE
+
+#define gcmHEADER() \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmHEADER_ARG(Text, ...) \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_header_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmHEADER_ARG __dummy_header_arg
+#endif
+
+#define gcmFOOTER() \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d", \
+ __FUNCTION__, __LINE__, status)
+
+#define gcmFOOTER_NO() \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmFOOTER_ARG(Text, ...) \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, \
+ __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_footer_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmFOOTER_ARG __dummy_footer_arg
+#endif
+
+#define gcmkHEADER() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmkHEADER_ARG(Text, ...) \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_kheader_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkHEADER_ARG __dummy_kheader_arg
+#endif
+
+#define gcmkFOOTER() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d", \
+ __FUNCTION__, __LINE__, status)
+
+#define gcmkFOOTER_NO() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmkFOOTER_ARG(Text, ...) \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, \
+ __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_kfooter_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkFOOTER_ARG __dummy_kfooter_arg
+#endif
+
+#define gcmOPT_VALUE(ptr) (((ptr) == gcvNULL) ? 0 : *(ptr))
+#define gcmOPT_POINTER(ptr) (((ptr) == gcvNULL) ? gcvNULL : *(ptr))
+#define gcmOPT_STRING(ptr) (((ptr) == gcvNULL) ? "(nil)" : (ptr))
+
+void
+gcoOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+void
+gckOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+#define gcmPRINT gcoOS_Print
+#define gcmkPRINT gckOS_Print
+
+/*******************************************************************************
+**
+** gcmDUMP
+**
+** Print a dump message.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+#if gcdDUMP
+ gceSTATUS
+ gcfDump(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ ...
+ );
+# define gcmDUMP gcfDump
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP(...)
+#else
+ gcmINLINE static void
+ __dummy_dump(
+ IN gcoOS Os,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP __dummy_dump
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_DATA
+**
+** Add data to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP
+ gceSTATUS
+ gcfDumpData(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_DATA gcfDumpData
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_DATA(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_data(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_DATA __dummy_dump_data
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_BUFFER
+**
+** Print a buffer to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctUINT32 Physical
+** Physical address of buffer.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctUINT32 Offset
+** Offset into buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP
+gceSTATUS
+gcfDumpBuffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_BUFFER gcfDumpBuffer
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_BUFFER(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_buffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_BUFFER __dummy_dump_buffer
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API
+**
+** Print a dump message for a high level API prefixed by the function name.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpApi(
+ IN gctCONST_STRING String,
+ ...
+ );
+# define gcmDUMP_API gcfDumpApi
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP_API __dummy_dump_api
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY
+**
+** Print an array of data.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Size.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpArray(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Size
+ );
+# define gcmDUMP_API_ARRAY gcfDumpArray
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Size
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY __dummy_dump_api_array
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY_TOKEN
+**
+** Print an array of data terminated by a token.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Termination.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpArrayToken(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Termination
+ );
+# define gcmDUMP_API_ARRAY_TOKEN gcfDumpArrayToken
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY_TOKEN(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array_token(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Termination
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY_TOKEN __dummy_dump_api_array_token
+#endif
+
+/*******************************************************************************
+**
+** gcmTRACE_RELEASE
+**
+** Print a message to the shader debugger.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+#define gcmTRACE_RELEASE gcoOS_DebugShaderTrace
+
+void
+gcoOS_DebugShaderTrace(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_SetDebugShaderFiles(
+ IN gctCONST_STRING VSFileName,
+ IN gctCONST_STRING FSFileName
+ );
+
+void
+gcoOS_SetDebugShaderFileType(
+ IN gctUINT32 ShaderType
+ );
+
+/*******************************************************************************
+**
+** gcmBREAK
+**
+** Break into the debugger. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** None.
+*/
+
+void
+gcoOS_DebugBreak(
+ void
+ );
+
+void
+gckOS_DebugBreak(
+ void
+ );
+
+#if gcdDEBUG
+# define gcmBREAK gcoOS_DebugBreak
+# define gcmkBREAK gckOS_DebugBreak
+#else
+# define gcmBREAK()
+# define gcmkBREAK()
+#endif
+
+/*******************************************************************************
+**
+** gcmASSERT
+**
+** Evaluate an expression and break into the debugger if the expression
+** evaluates to false. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcdDEBUG
+# define _gcmASSERT(prefix, exp) \
+ do \
+ { \
+ if (!(exp)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ASSERT at %s(%d) in " __FILE__, \
+ __FUNCTION__, __LINE__); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ "(%s)", #exp); \
+ prefix##BREAK(); \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmASSERT(exp) _gcmASSERT(gcm, exp)
+# define gcmkASSERT(exp) _gcmASSERT(gcmk, exp)
+#else
+# define gcmASSERT(exp)
+# define gcmkASSERT(exp)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY
+**
+** Verify if an expression returns true. If the expression does not
+** evaluates to true, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcdDEBUG
+# define gcmVERIFY(exp) gcmASSERT(exp)
+# define gcmkVERIFY(exp) gcmkASSERT(exp)
+#else
+# define gcmVERIFY(exp) exp
+# define gcmkVERIFY(exp) exp
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY_OK
+**
+** Verify a fucntion returns gcvSTATUS_OK. If the function does not return
+** gcvSTATUS_OK, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+
+void
+gcoOS_Verify(
+ IN gceSTATUS Status
+ );
+
+void
+gckOS_Verify(
+ IN gceSTATUS Status
+ );
+
+#if gcdDEBUG
+# define gcmVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ gcoOS_Verify(verifyStatus); \
+ gcmASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+# define gcmkVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ gckOS_Verify(verifyStatus); \
+ gcmkASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+#else
+# define gcmVERIFY_OK(func) func
+# define gcmkVERIFY_OK(func) func
+#endif
+
+/*******************************************************************************
+**
+** gcmERR_BREAK
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_BREAK(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_BREAK: status=%d @ %s(%d) in " __FILE__, \
+ status, __FUNCTION__, __LINE__); \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_BREAK(func) _gcmERR_BREAK(gcm, func)
+#define gcmkERR_BREAK(func) _gcmERR_BREAK(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmERR_RETURN
+**
+** Executes a return on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d @ %s(%d) in " __FILE__, \
+ status, __FUNCTION__, __LINE__); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_RETURN(func) _gcmERR_RETURN(gcm, func)
+#define gcmkERR_RETURN(func) _gcmERR_RETURN(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmONERROR
+**
+** Jump to the error handler in case there is an error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmONERROR(prefix, func) \
+ do \
+ { \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ONERROR: status=%d @ %s(%d) in " __FILE__, \
+ status, __FUNCTION__, __LINE__); \
+ goto OnError; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmONERROR(func) _gcmONERROR(gcm, func)
+#define gcmkONERROR(func) _gcmONERROR(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_LOCK
+**
+** Verifies whether the surface is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_LOCK(surfaceInfo) \
+ if (!surfaceInfo->node.valid) \
+ { \
+ status = gcvSTATUS_MEMORY_UNLOCKED; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmVERIFY_NODE_LOCK
+**
+** Verifies whether the surface node is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_NODE_LOCK(surfaceNode) \
+ if (!surfaceNode->valid) \
+ { \
+ status = gcvSTATUS_MEMORY_UNLOCKED; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmBADOBJECT_BREAK
+**
+** Executes a break statement on bad object.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#define gcmBADOBJECT_BREAK(obj, t) \
+ if ((obj == gcvNULL) \
+ || (((gcsOBJECT *)(obj))->type != t) \
+ ) \
+ { \
+ status = gcvSTATUS_INVALID_OBJECT; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmCHECK_STATUS
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmCHECK_STATUS(prefix, func) \
+ do \
+ { \
+ last = func; \
+ if (gcmIS_ERROR(last)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "CHECK_STATUS: status=%d @ %s(%d) in " __FILE__, \
+ last, __FUNCTION__, __LINE__); \
+ status = last; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmCHECK_STATUS(func) _gcmCHECK_STATUS(gcm, func)
+#define gcmkCHECK_STATUS(func) _gcmCHECK_STATUS(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_ARGUMENT(prefix, arg) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, #prefix "VERIFY_ARGUMENT failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_ARGUMENT); \
+ return gcvSTATUS_INVALID_ARGUMENT; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcm, arg)
+# define gcmkVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcmk, arg)
+#else
+# define gcmVERIFY_ARGUMENT(arg)
+# define gcmkVERIFY_ARGUMENT(arg)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT_RETURN
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_ARGUMENT_RETURN(prefix, arg, value) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "gcmVERIFY_ARGUMENT_RETURN failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("value=%d", value); \
+ return value; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcm, arg, value)
+# define gcmkVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcmk, arg, value)
+#else
+# define gcmVERIFY_ARGUMENT_RETURN(arg, value)
+# define gcmkVERIFY_ARGUMENT_RETURN(arg, value)
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_base_h_ */
+
diff --git a/src/include_arnova/gc_hal_compiler.h b/src/include_arnova/gc_hal_compiler.h
new file mode 100644
index 0000000..d237cc3
--- /dev/null
+++ b/src/include_arnova/gc_hal_compiler.h
@@ -0,0 +1,1955 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+/*
+** Include file the defines the front- and back-end compilers, as well as the
+** objects they use.
+*/
+
+#ifndef __gc_hal_compiler_h_
+#define __gc_hal_compiler_h_
+
+#include "gc_hal_types.h"
+#include "gc_hal_engine.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+|******************************* SHADER LANGUAGE ******************************|
+\******************************************************************************/
+
+/* Possible shader language opcodes. */
+typedef enum _gcSL_OPCODE
+{
+ gcSL_NOP, /* 0x00 */
+ gcSL_MOV, /* 0x01 */
+ gcSL_SAT, /* 0x02 */
+ gcSL_DP3, /* 0x03 */
+ gcSL_DP4, /* 0x04 */
+ gcSL_ABS, /* 0x05 */
+ gcSL_JMP, /* 0x06 */
+ gcSL_ADD, /* 0x07 */
+ gcSL_MUL, /* 0x08 */
+ gcSL_RCP, /* 0x09 */
+ gcSL_SUB, /* 0x0A */
+ gcSL_KILL, /* 0x0B */
+ gcSL_TEXLD, /* 0x0C */
+ gcSL_CALL, /* 0x0D */
+ gcSL_RET, /* 0x0E */
+ gcSL_NORM, /* 0x0F */
+ gcSL_MAX, /* 0x10 */
+ gcSL_MIN, /* 0x11 */
+ gcSL_POW, /* 0x12 */
+ gcSL_RSQ, /* 0x13 */
+ gcSL_LOG, /* 0x14 */
+ gcSL_FRAC, /* 0x15 */
+ gcSL_FLOOR, /* 0x16 */
+ gcSL_CEIL, /* 0x17 */
+ gcSL_CROSS, /* 0x18 */
+ gcSL_TEXLDP, /* 0x19 */
+ gcSL_TEXBIAS, /* 0x1A */
+ gcSL_TEXGRAD, /* 0x1B */
+ gcSL_TEXLOD, /* 0x1C */
+ gcSL_SIN, /* 0x1D */
+ gcSL_COS, /* 0x1E */
+ gcSL_TAN, /* 0x1F */
+ gcSL_EXP, /* 0x20 */
+ gcSL_SIGN, /* 0x21 */
+ gcSL_STEP, /* 0x22 */
+ gcSL_SQRT, /* 0x23 */
+ gcSL_ACOS, /* 0x24 */
+ gcSL_ASIN, /* 0x25 */
+ gcSL_ATAN, /* 0x26 */
+ gcSL_SET, /* 0x27 */
+ gcSL_DSX, /* 0x28 */
+ gcSL_DSY, /* 0x29 */
+ gcSL_FWIDTH, /* 0x2A */
+}
+gcSL_OPCODE;
+
+typedef enum _gcSL_FORMAT
+{
+ gcSL_FLOAT, /* 0 */
+ gcSL_INTEGER, /* 1 */
+ gcSL_BOOLEAN, /* 2 */
+}
+gcSL_FORMAT;
+
+/* Destination write enable bits. */
+typedef enum _gcSL_ENABLE
+{
+ gcSL_ENABLE_X = 0x1,
+ gcSL_ENABLE_Y = 0x2,
+ gcSL_ENABLE_Z = 0x4,
+ gcSL_ENABLE_W = 0x8,
+ /* Combinations. */
+ gcSL_ENABLE_XY = gcSL_ENABLE_X | gcSL_ENABLE_Y,
+ gcSL_ENABLE_XYZ = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XYZW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XYW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_XZ = gcSL_ENABLE_X | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XZW = gcSL_ENABLE_X | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XW = gcSL_ENABLE_X | gcSL_ENABLE_W,
+ gcSL_ENABLE_YZ = gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_YZW = gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_YW = gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_ZW = gcSL_ENABLE_Z | gcSL_ENABLE_W,
+}
+gcSL_ENABLE;
+
+/* Possible indices. */
+typedef enum _gcSL_INDEXED
+{
+ gcSL_NOT_INDEXED, /* 0 */
+ gcSL_INDEXED_X, /* 1 */
+ gcSL_INDEXED_Y, /* 2 */
+ gcSL_INDEXED_Z, /* 3 */
+ gcSL_INDEXED_W, /* 4 */
+}
+gcSL_INDEXED;
+
+/* Opcode conditions. */
+typedef enum _gcSL_CONDITION
+{
+ gcSL_ALWAYS, /* 0x0 */
+ gcSL_NOT_EQUAL, /* 0x1 */
+ gcSL_LESS_OR_EQUAL, /* 0x2 */
+ gcSL_LESS, /* 0x3 */
+ gcSL_EQUAL, /* 0x4 */
+ gcSL_GREATER, /* 0x5 */
+ gcSL_GREATER_OR_EQUAL, /* 0x6 */
+ gcSL_AND, /* 0x7 */
+ gcSL_OR, /* 0x8 */
+ gcSL_XOR, /* 0x9 */
+}
+gcSL_CONDITION;
+
+/* Possible source operand types. */
+typedef enum _gcSL_TYPE
+{
+ gcSL_NONE, /* 0x0 */
+ gcSL_TEMP, /* 0x1 */
+ gcSL_ATTRIBUTE, /* 0x2 */
+ gcSL_UNIFORM, /* 0x3 */
+ gcSL_SAMPLER, /* 0x4 */
+ gcSL_CONSTANT, /* 0x5 */
+ gcSL_OUTPUT, /* 0x6 */
+ gcSL_PHYSICAL, /* 0x7 */
+}
+gcSL_TYPE;
+
+/* Swizzle generator macro. */
+#define gcmSWIZZLE(Component1, Component2, Component3, Component4) \
+( \
+ (gcSL_SWIZZLE_ ## Component1 << 0) | \
+ (gcSL_SWIZZLE_ ## Component2 << 2) | \
+ (gcSL_SWIZZLE_ ## Component3 << 4) | \
+ (gcSL_SWIZZLE_ ## Component4 << 6) \
+)
+
+/* Possible swizzle values. */
+typedef enum _gcSL_SWIZZLE
+{
+ gcSL_SWIZZLE_X, /* 0x0 */
+ gcSL_SWIZZLE_Y, /* 0x1 */
+ gcSL_SWIZZLE_Z, /* 0x2 */
+ gcSL_SWIZZLE_W, /* 0x3 */
+ /* Combinations. */
+ gcSL_SWIZZLE_XXXX = gcmSWIZZLE(X, X, X, X),
+ gcSL_SWIZZLE_YYYY = gcmSWIZZLE(Y, Y, Y, Y),
+ gcSL_SWIZZLE_ZZZZ = gcmSWIZZLE(Z, Z, Z, Z),
+ gcSL_SWIZZLE_WWWW = gcmSWIZZLE(W, W, W, W),
+ gcSL_SWIZZLE_XYYY = gcmSWIZZLE(X, Y, Y, Y),
+ gcSL_SWIZZLE_XZZZ = gcmSWIZZLE(X, Z, Z, Z),
+ gcSL_SWIZZLE_XWWW = gcmSWIZZLE(X, W, W, W),
+ gcSL_SWIZZLE_YZZZ = gcmSWIZZLE(Y, Z, Z, Z),
+ gcSL_SWIZZLE_YWWW = gcmSWIZZLE(Y, W, W, W),
+ gcSL_SWIZZLE_ZWWW = gcmSWIZZLE(Z, W, W, W),
+ gcSL_SWIZZLE_XYZZ = gcmSWIZZLE(X, Y, Z, Z),
+ gcSL_SWIZZLE_XYWW = gcmSWIZZLE(X, Y, W, W),
+ gcSL_SWIZZLE_XZWW = gcmSWIZZLE(X, Z, W, W),
+ gcSL_SWIZZLE_YZWW = gcmSWIZZLE(Y, Z, W, W),
+ gcSL_SWIZZLE_XXYZ = gcmSWIZZLE(X, X, Y, Z),
+ gcSL_SWIZZLE_XYZW = gcmSWIZZLE(X, Y, Z, W),
+ gcSL_SWIZZLE_XYXY = gcmSWIZZLE(X, Y, X, Y),
+}
+gcSL_SWIZZLE;
+
+
+/******************************************************************************\
+|*********************************** SHADERS **********************************|
+\******************************************************************************/
+
+/* Shader types. */
+#define gcSHADER_TYPE_UNKNOWN 0
+#define gcSHADER_TYPE_VERTEX 1
+#define gcSHADER_TYPE_FRAGMENT 2
+
+/* gcSHADER objects. */
+typedef struct _gcSHADER * gcSHADER;
+typedef struct _gcATTRIBUTE * gcATTRIBUTE;
+typedef struct _gcUNIFORM * gcUNIFORM;
+typedef struct _gcOUTPUT * gcOUTPUT;
+typedef struct _gcsFUNCTION * gcFUNCTION;
+typedef struct _gcsHINT * gcsHINT_PTR;
+typedef struct _gcSHADER_PROFILER * gcSHADER_PROFILER;
+typedef struct _gcVARIABLE * gcVARIABLE;
+
+/* gcSHADER_TYPE enumeration. */
+typedef enum _gcSHADER_TYPE
+{
+ gcSHADER_FLOAT_X1, /* 0x00 */
+ gcSHADER_FLOAT_X2, /* 0x01 */
+ gcSHADER_FLOAT_X3, /* 0x02 */
+ gcSHADER_FLOAT_X4, /* 0x03 */
+ gcSHADER_FLOAT_2X2, /* 0x04 */
+ gcSHADER_FLOAT_3X3, /* 0x05 */
+ gcSHADER_FLOAT_4X4, /* 0x06 */
+ gcSHADER_BOOLEAN_X1, /* 0x07 */
+ gcSHADER_BOOLEAN_X2, /* 0x08 */
+ gcSHADER_BOOLEAN_X3, /* 0x09 */
+ gcSHADER_BOOLEAN_X4, /* 0x0A */
+ gcSHADER_INTEGER_X1, /* 0x0B */
+ gcSHADER_INTEGER_X2, /* 0x0C */
+ gcSHADER_INTEGER_X3, /* 0x0D */
+ gcSHADER_INTEGER_X4, /* 0x0E */
+ gcSHADER_SAMPLER_1D, /* 0x0F */
+ gcSHADER_SAMPLER_2D, /* 0x10 */
+ gcSHADER_SAMPLER_3D, /* 0x11 */
+ gcSHADER_SAMPLER_CUBIC, /* 0x12 */
+ gcSHADER_FIXED_X1, /* 0x13 */
+ gcSHADER_FIXED_X2, /* 0x14 */
+ gcSHADER_FIXED_X3, /* 0x15 */
+ gcSHADER_FIXED_X4, /* 0x16 */
+}
+gcSHADER_TYPE;
+
+/* Shader flags. */
+typedef enum _gceSHADER_FLAGS
+{
+ gcvSHADER_DEAD_CODE = 0x01,
+ gcvSHADER_RESOURCE_USAGE = 0x02,
+ gcvSHADER_OPTIMIZER = 0x04,
+ gcvSHADER_USE_GL_Z = 0x08,
+ gcvSHADER_USE_GL_POSITION = 0x10,
+ gcvSHADER_USE_GL_FACE = 0x20,
+ gcvSHADER_USE_GL_POINT_COORD = 0x40,
+}
+gceSHADER_FLAGS;
+
+/* Function argument qualifier */
+typedef enum _gceINPUT_OUTPUT
+{
+ gcvFUNCTION_INPUT,
+ gcvFUNCTION_OUTPUT,
+ gcvFUNCTION_INOUT
+}
+gceINPUT_OUTPUT;
+
+/*******************************************************************************
+** gcSHADER_Construct
+********************************************************************************
+**
+** Construct a new gcSHADER object.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Type of gcSHADER object to cerate. 'ShaderType' can be one of the
+** following:
+**
+** gcSHADER_TYPE_VERTEX Vertex shader.
+** gcSHADER_TYPE_FRAGMENT Fragment shader.
+**
+** OUTPUT:
+**
+** gcSHADER * Shader
+** Pointer to a variable receiving the gcSHADER object pointer.
+*/
+gceSTATUS
+gcSHADER_Construct(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ OUT gcSHADER * Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Destroy
+********************************************************************************
+**
+** Destroy a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Destroy(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Load
+********************************************************************************
+**
+** Load a gcSHADER object from a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containg the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Load(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_Save
+********************************************************************************
+**
+** Save a gcSHADER object to a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer to be used as storage for the gcSHADER
+** object. If 'Buffer' is gcvNULL, the gcSHADER object will not be saved,
+** but the number of bytes required to hold the binary output for the
+** gcSHADER object will be returned.
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable holding the number of bytes allocated in
+** 'Buffer'. Only valid if 'Buffer' is not gcvNULL.
+**
+** OUTPUT:
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable receiving the number of bytes required to hold
+** the binary form of the gcSHADER object.
+*/
+gceSTATUS
+gcSHADER_Save(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN OUT gctSIZE_T * BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateAttributes
+**
+** Reallocate an array of pointers to gcATTRIBUTE objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateAttributes(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddAttribute
+********************************************************************************
+**
+** Add an attribute to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the attribute to add.
+**
+** gcSHADER_TYPE Type
+** Type of the attribute to add.
+**
+** gctSIZE_T Length
+** Array length of the attribute to add. 'Length' must be at least 1.
+**
+** gctBOOL IsTexture
+** gcvTRUE if the attribute is used as a texture coordinate, gcvFALSE if not.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_AddAttribute(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctBOOL IsTexture,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttributeCount
+********************************************************************************
+**
+** Get the number of attributes for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of attributes.
+*/
+gceSTATUS
+gcSHADER_GetAttributeCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttribute
+********************************************************************************
+**
+** Get the gcATTRIBUTE object poniter for an indexed attribute for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the attribute to retrieve.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetAttribute(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_GetPositionAttribute
+********************************************************************************
+**
+** Get the gcATTRIBUTE object pointer for the attribute that defines the
+** position.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctUINT * Index
+** Pointer to a variable receiving the index of te gcATTRIBUTE object
+** used as a position.
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetPositionAttribute(
+ IN gcSHADER Shader,
+ OUT gctUINT * Index,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateUniforms
+**
+** Reallocate an array of pointers to gcUNIFORM objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateUniforms(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddUniform
+********************************************************************************
+**
+** Add an uniform to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the uniform to add.
+**
+** gcSHADER_TYPE Type
+** Type of the uniform to add.
+**
+** gctSIZE_T Length
+** Array length of the uniform to add. 'Length' must be at least 1.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_AddUniform(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniformCount
+********************************************************************************
+**
+** Get the number of uniforms for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of uniforms.
+*/
+gceSTATUS
+gcSHADER_GetUniformCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniform
+********************************************************************************
+**
+** Get the gcUNIFORM object pointer for an indexed uniform for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the uniform to retrieve.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_GetUniform(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateOutputs
+**
+** Reallocate an array of pointers to gcOUTPUT objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateOutputs(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOutput
+********************************************************************************
+**
+** Add an output to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the output to add.
+**
+** gcSHADER_TYPE Type
+** Type of the output to add.
+**
+** gctSIZE_T Length
+** Array length of the output to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the output value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOutput(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+gceSTATUS
+gcSHADER_AddOutputIndexed(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gctSIZE_T Index,
+ IN gctUINT16 TempIndex
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutputCount
+********************************************************************************
+**
+** Get the number of outputs for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of outputs.
+*/
+gceSTATUS
+gcSHADER_GetOutputCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutput
+********************************************************************************
+**
+** Get the gcOUTPUT object pointer for an indexed output for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of output to retrieve.
+**
+** OUTPUT:
+**
+** gcOUTPUT * Output
+** Pointer to a variable receiving the gcOUTPUT object pointer.
+*/
+gceSTATUS
+gcSHADER_GetOutput(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcOUTPUT * Output
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateVariables
+**
+** Reallocate an array of pointers to gcVARIABLE objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateVariables(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddVariable
+********************************************************************************
+**
+** Add a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the variable to add.
+**
+** gcSHADER_TYPE Type
+** Type of the variable to add.
+**
+** gctSIZE_T Length
+** Array length of the variable to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the variable value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddVariable(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariableCount
+********************************************************************************
+**
+** Get the number of variables for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of variables.
+*/
+gceSTATUS
+gcSHADER_GetVariableCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariable
+********************************************************************************
+**
+** Get the gcVARIABLE object pointer for an indexed variable for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of variable to retrieve.
+**
+** OUTPUT:
+**
+** gcVARIABLE * Variable
+** Pointer to a variable receiving the gcVARIABLE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetVariable(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcVARIABLE * Variable
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcode
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the target
+** of the opcode.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcode(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddOpcode2(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeIndexed
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object that writes to an dynamically indexed
+** target.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the
+** target of the opcode.
+**
+** gcSL_INDEXED Mode
+** Location of the dynamic index inside the temporary register. Valid
+** values can be:
+**
+** gcSL_INDEXED_X - Use x component of the temporary register.
+** gcSL_INDEXED_Y - Use y component of the temporary register.
+** gcSL_INDEXED_Z - Use z component of the temporary register.
+** gcSL_INDEXED_W - Use w component of the temporary register.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditional
+********************************************************************************
+**
+** Add an conditional opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditional(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddLabel
+********************************************************************************
+**
+** Define a label at the current instruction of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Label
+** Label to define.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddLabel(
+ IN gcSHADER Shader,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSource
+********************************************************************************
+**
+** Add a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSource(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceIndexed
+********************************************************************************
+**
+** Add a dynamically indexed source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_INDEXED Mode
+** Addressing mode for the index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttribute
+********************************************************************************
+**
+** Add an attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttribute(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttributeIndexed
+********************************************************************************
+**
+** Add an indexed attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttributeIndexed(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniform
+********************************************************************************
+**
+** Add a uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniform(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniformIndexed
+********************************************************************************
+**
+** Add an indexed uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniformIndexed(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+gceSTATUS
+gcSHADER_AddSourceSamplerIndexed(
+ IN gcSHADER Shader,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceConstant
+********************************************************************************
+**
+** Add a constant floating pointer value as a source operand to a gcSHADER
+** object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctFLOAT Constant
+** Floating pointer constant.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceConstant(
+ IN gcSHADER Shader,
+ IN gctFLOAT Constant
+ );
+
+/*******************************************************************************
+** gcSHADER_Pack
+********************************************************************************
+**
+** Pack a dynamically created gcSHADER object by trimming the allocated arrays
+** and resolving all the labeling.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Pack(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_SetOptimizationOption
+********************************************************************************
+**
+** Set optimization option of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT OptimizationOption
+** Optimization option. Can be one of the following:
+**
+** 0 - No optimization.
+** 1 - Full optimization.
+** Other value - For optimizer testing.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_SetOptimizationOption(
+ IN gcSHADER Shader,
+ IN gctUINT OptimizationOption
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateFunctions
+**
+** Reallocate an array of pointers to gcFUNCTION objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateFunctions(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcSHADER_AddFunction(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ OUT gcFUNCTION * Function
+ );
+
+gceSTATUS
+gcSHADER_BeginFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+gceSTATUS
+gcSHADER_EndFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the attribute. 'Type'
+** can be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** attribute was declared as an array. If the attribute was not
+** declared as an array, the array length will be 1. 'ArrayLength' can
+** be gcvNULL, in which case no array length will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetType(
+ IN gcATTRIBUTE Attribute,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_GetName
+********************************************************************************
+**
+** Get the name of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the attribute name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the attribute name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetName(
+ IN gcATTRIBUTE Attribute,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_IsEnabled
+********************************************************************************
+**
+** Query the enabled state of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctBOOL * Enabled
+** Pointer to a variable receiving the enabled state of the attribute.
+*/
+gceSTATUS
+gcATTRIBUTE_IsEnabled(
+ IN gcATTRIBUTE Attribute,
+ OUT gctBOOL * Enabled
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the uniform. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** uniform was declared as an array. If the uniform was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetType(
+ IN gcUNIFORM Uniform,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetName
+********************************************************************************
+**
+** Get the name of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the uniform name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the uniform name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetName(
+ IN gcUNIFORM Uniform,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetSampler
+********************************************************************************
+**
+** Get the physical sampler number for a sampler gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctUINT32 * Sampler
+** Pointer to a variable receiving the physical sampler.
+*/
+gceSTATUS
+gcUNIFORM_GetSampler(
+ IN gcUNIFORM Uniform,
+ OUT gctUINT32 * Sampler
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValue
+********************************************************************************
+**
+** Set the value of a uniform in integer.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctINT * Value
+** Pointer to a buffer holding the integer values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValue(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueX
+********************************************************************************
+**
+** Set the value of a uniform in fixed point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFIXED_POINT * Value
+** Pointer to a buffer holding the fixed point values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueX(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN gctFIXED_POINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueF
+********************************************************************************
+**
+** Set the value of a uniform in floating point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFLOAT * Value
+** Pointer to a buffer holding the floating point values for the
+** uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueF(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctFLOAT * Value
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the output. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** output was declared as an array. If the output was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetType(
+ IN gcOUTPUT Output,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetIndex
+********************************************************************************
+**
+** Get the index of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctUINT * Index
+** Pointer to a variable receiving the temporary register index of the
+** output. 'Index' can be gcvNULL,. in which case no index will be
+** returned.
+*/
+gceSTATUS
+gcOUTPUT_GetIndex(
+ IN gcOUTPUT Output,
+ OUT gctUINT * Index
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetName
+********************************************************************************
+**
+** Get the name of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the output name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the output name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetName(
+ IN gcOUTPUT Output,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+*********************************************************** F U N C T I O N S **
+*******************************************************************************/
+
+/*******************************************************************************
+** gcFUNCTION_ReallocateArguments
+**
+** Reallocate an array of gcsFUNCTION_ARGUMENT objects.
+**
+** INPUT:
+**
+** gcFUNCTION Function
+** Pointer to a gcFUNCTION object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcFUNCTION_ReallocateArguments(
+ IN gcFUNCTION Function,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcFUNCTION_AddArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 TempIndex,
+ IN gctUINT8 Enable,
+ IN gctUINT8 Qualifier
+ );
+
+gceSTATUS
+gcFUNCTION_GetArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 Index,
+ OUT gctUINT16_PTR Temp,
+ OUT gctUINT8_PTR Enable,
+ OUT gctUINT8_PTR Swizzle
+ );
+
+gceSTATUS
+gcFUNCTION_GetLabel(
+ IN gcFUNCTION Function,
+ OUT gctUINT_PTR Label
+ );
+
+/*******************************************************************************
+** gcCompileShader
+********************************************************************************
+**
+** Compile a shader.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Shader type to compile. Can be one of the following values:
+**
+** gcSHADER_TYPE_VERTEX
+** Compile a vertex shader.
+**
+** gcSHADER_TYPE_FRAGMENT
+** Compile a fragment shader.
+**
+** gctSIZE_T SourceSize
+** Size of the source buffer in bytes.
+**
+** gctCONST_STRING Source
+** Pointer to the buffer containing the shader source code.
+**
+** OUTPUT:
+**
+** gcSHADER * Binary
+** Pointer to a variable receiving the pointer to a gcSHADER object
+** containg the compiled shader code.
+**
+** gctSTRING * Log
+** Pointer to a variable receiving a string pointer containging the
+** compile log.
+*/
+gceSTATUS
+gcCompileShader(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ IN gctSIZE_T SourceSize,
+ IN gctCONST_STRING Source,
+ OUT gcSHADER * Binary,
+ OUT gctSTRING * Log
+ );
+
+/*******************************************************************************
+** gcOptimizeShader
+********************************************************************************
+**
+** Optimize a shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object holding information about the compiled
+** shader.
+**
+** gctFILE LogFile
+** Pointer to an open FILE object.
+*/
+gceSTATUS
+gcOptimizeShader(
+ IN gcSHADER Shader,
+ IN gctFILE LogFile
+ );
+
+/*******************************************************************************
+** gcLinkShaders
+********************************************************************************
+**
+** Link two shaders and generate a harwdare specific state buffer by compiling
+** the compiler generated code through the resource allocator and code
+** generator.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to a gcSHADER object holding information about the compiled
+** vertex shader.
+**
+** gcSHADER FragmentShader
+** Pointer to a gcSHADER object holding information about the compiled
+** fragment shader.
+**
+** gceSHADER_FLAGS Flags
+** Compiler flags. Can be any of the following:
+**
+** gcvSHADER_DEAD_CODE - Dead code elimination.
+** gcvSHADER_RESOURCE_USAGE - Resource usage optimizaion.
+** gcvSHADER_OPTIMIZER - Full optimization.
+** gcvSHADER_USE_GL_Z - Use OpenGL ES Z coordinate.
+** gcvSHADER_USE_GL_POSITION - Use OpenGL ES gl_Position.
+** gcvSHADER_USE_GL_FACE - Use OpenGL ES gl_FaceForward.
+**
+** OUTPUT:
+**
+** gctSIZE_T * StateBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'StateBuffer'.
+**
+** gctPOINTER * StateBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLinkShaders(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gceSHADER_FLAGS Flags,
+ OUT gctSIZE_T * StateBufferSize,
+ OUT gctPOINTER * StateBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+/*******************************************************************************
+** gcLoadShaders
+********************************************************************************
+**
+** Load a pre-compiled and pre-linked shader program into the hardware.
+**
+** INPUT:
+**
+** gcoHAL Hal
+** Pointer to a gcoHAL object.
+**
+** gctSIZE_T StateBufferSize
+** The number of bytes in the 'StateBuffer'.
+**
+** gctPOINTER StateBuffer
+** Pointer to the states that make up the shader program.
+**
+** gcsHINT_PTR Hints
+** Pointer to a gcsHINT structure that contains information required
+** when loading the shader states.
+**
+** gcePRIMITIVE PrimitiveType
+** Primitive type to be rendered.
+*/
+gceSTATUS
+gcLoadShaders(
+ IN gcoHAL Hal,
+ IN gctSIZE_T StateBufferSize,
+ IN gctPOINTER StateBuffer,
+ IN gcsHINT_PTR Hints,
+ IN gcePRIMITIVE PrimitiveType
+ );
+
+/*******************************************************************************
+** gcSaveProgram
+********************************************************************************
+**
+** Save pre-compiled shaders and pre-linked programs to a binary file.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to vertex shader object.
+**
+** gcSHADER FragmentShader
+** Pointer to fragment shader object.
+**
+** gctSIZE_T ProgramBufferSize
+** Number of bytes in 'ProgramBuffer'.
+**
+** gctPOINTER ProgramBuffer
+** Pointer to buffer containing the program states.
+**
+** gcsHINT_PTR Hints
+** Pointer to HINTS structure for program states.
+**
+** OUTPUT:
+**
+** gctPOINTER * Binary
+** Pointer to a variable receiving the binary data to be saved.
+**
+** gctSIZE_T * BinarySize
+** Pointer to a variable receiving the number of bytes inside 'Binary'.
+*/
+gceSTATUS
+gcSaveProgram(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gctSIZE_T ProgramBufferSize,
+ IN gctPOINTER ProgramBuffer,
+ IN gcsHINT_PTR Hints,
+ OUT gctPOINTER * Binary,
+ OUT gctSIZE_T * BinarySize
+ );
+
+/*******************************************************************************
+** gcLoadProgram
+********************************************************************************
+**
+** Load pre-compiled shaders and pre-linked programs from a binary file.
+**
+** INPUT:
+**
+** gctPOINTER Binary
+** Pointer to the binary data loaded.
+**
+** gctSIZE_T BinarySize
+** Number of bytes in 'Binary'.
+**
+** OUTPUT:
+**
+** gcSHADER * VertexShader
+** Pointer to a variable receiving the vertex shader object.
+**
+** gcSHADER * FragmentShader
+** Pointer to a variable receiving the fragment shader object.
+**
+** gctSIZE_T * ProgramBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'ProgramBuffer'.
+**
+** gctPOINTER * ProgramBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLoadProgram(
+ IN gctPOINTER Binary,
+ IN gctSIZE_T BinarySize,
+ OUT gcSHADER * VertexShader,
+ OUT gcSHADER * FragmentShader,
+ OUT gctSIZE_T * ProgramBufferSize,
+ OUT gctPOINTER * ProgramBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_compiler_h_ */
+
diff --git a/src/include_arnova/gc_hal_driver.h b/src/include_arnova/gc_hal_driver.h
new file mode 100644
index 0000000..faca927
--- /dev/null
+++ b/src/include_arnova/gc_hal_driver.h
@@ -0,0 +1,588 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_driver_h_
+#define __gc_hal_driver_h_
+
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* I/O Control Codes ******************************
+\******************************************************************************/
+
+#define gcvHAL_CLASS "galcore"
+#define IOCTL_GCHAL_INTERFACE 30000
+#define IOCTL_GCHAL_KERNEL_INTERFACE 30001
+#define IOCTL_GCHAL_TERMINATE 30002
+
+/******************************************************************************\
+********************************* Command Codes ********************************
+\******************************************************************************/
+
+typedef enum _gceHAL_COMMAND_CODES
+{
+ /* Generic query. */
+ gcvHAL_QUERY_VIDEO_MEMORY,
+ gcvHAL_QUERY_CHIP_IDENTITY,
+
+ /* Contiguous memory. */
+ gcvHAL_ALLOCATE_NON_PAGED_MEMORY,
+ gcvHAL_FREE_NON_PAGED_MEMORY,
+ gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY,
+ gcvHAL_FREE_CONTIGUOUS_MEMORY,
+
+ /* Video memory allocation. */
+ gcvHAL_ALLOCATE_VIDEO_MEMORY, /* Enforced alignment. */
+ gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY, /* No alignment. */
+ gcvHAL_FREE_VIDEO_MEMORY,
+
+ /* Physical-to-logical mapping. */
+ gcvHAL_MAP_MEMORY,
+ gcvHAL_UNMAP_MEMORY,
+
+ /* Logical-to-physical mapping. */
+ gcvHAL_MAP_USER_MEMORY,
+ gcvHAL_UNMAP_USER_MEMORY,
+
+ /* Surface lock/unlock. */
+ gcvHAL_LOCK_VIDEO_MEMORY,
+ gcvHAL_UNLOCK_VIDEO_MEMORY,
+
+ /* Event queue. */
+ gcvHAL_EVENT_COMMIT,
+
+ gcvHAL_USER_SIGNAL,
+ gcvHAL_SIGNAL,
+ gcvHAL_WRITE_DATA,
+
+ gcvHAL_COMMIT,
+ gcvHAL_STALL,
+
+ gcvHAL_READ_REGISTER,
+ gcvHAL_WRITE_REGISTER,
+
+ gcvHAL_GET_PROFILE_SETTING,
+ gcvHAL_SET_PROFILE_SETTING,
+
+ gcvHAL_READ_ALL_PROFILE_REGISTERS,
+ gcvHAL_PROFILE_REGISTERS_2D,
+
+ /* Power management. */
+ gcvHAL_SET_POWER_MANAGEMENT_STATE,
+ gcvHAL_QUERY_POWER_MANAGEMENT_STATE,
+
+ gcvHAL_GET_BASE_ADDRESS,
+
+ gcvHAL_SET_IDLE, /* reserved */
+
+ /* Queries. */
+ gcvHAL_QUERY_KERNEL_SETTINGS,
+
+ /* Reset. */
+ gcvHAL_RESET,
+
+ /* Map physical address into handle. */
+ gcvHAL_MAP_PHYSICAL,
+
+ /* Debugger stuff. */
+ gcvHAL_DEBUG,
+
+ /* Cache stuff. */
+ gcvHAL_CACHE,
+
+#if gcdGPU_TIMEOUT
+ /* Broadcast GPU stuck */
+ gcvHAL_BROADCAST_GPU_STUCK,
+#endif
+}
+gceHAL_COMMAND_CODES;
+
+/******************************************************************************\
+****************************** Interface Structure *****************************
+\******************************************************************************/
+
+#define gcdMAX_PROFILE_FILE_NAME 128
+
+typedef struct _gcsHAL_INTERFACE
+{
+ /* Command code. */
+ gceHAL_COMMAND_CODES command;
+
+ /* Status value. */
+ gceSTATUS status;
+
+ /* Handle to this interface channel. */
+ gctHANDLE handle;
+
+ /* Pid of the client. */
+ gctUINT32 pid;
+
+ /* Union of command structures. */
+ union _u
+ {
+ /* gcvHAL_GET_BASE_ADDRESS */
+ struct _gcsHAL_GET_BASE_ADDRESS
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctUINT32 baseAddress;
+ }
+ GetBaseAddress;
+
+ /* gcvHAL_QUERY_VIDEO_MEMORY */
+ struct _gcsHAL_QUERY_VIDEO_MEMORY
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctPHYS_ADDR internalPhysical;
+
+ /* Size in bytes of internal memory.*/
+ OUT gctSIZE_T internalSize;
+
+ /* Physical memory address of external memory. */
+ OUT gctPHYS_ADDR externalPhysical;
+
+ /* Size in bytes of external memory.*/
+ OUT gctSIZE_T externalSize;
+
+ /* Physical memory address of contiguous memory. */
+ OUT gctPHYS_ADDR contiguousPhysical;
+
+ /* Size in bytes of contiguous memory.*/
+ OUT gctSIZE_T contiguousSize;
+ }
+ QueryVideoMemory;
+
+ /* gcvHAL_QUERY_CHIP_IDENTITY */
+ struct _gcsHAL_QUERY_CHIP_IDENTITY
+ {
+
+ /* Chip model. */
+ OUT gceCHIPMODEL chipModel;
+
+ /* Revision value.*/
+ OUT gctUINT32 chipRevision;
+
+ /* Supported feature fields. */
+ OUT gctUINT32 chipFeatures;
+
+ /* Supported minor feature fields. */
+ OUT gctUINT32 chipMinorFeatures;
+
+ /* Supported minor feature 1 fields. */
+ OUT gctUINT32 chipMinorFeatures1;
+
+ /* Supported minor feature 2 fields. */
+ OUT gctUINT32 chipMinorFeatures2;
+
+ /* Number of streams supported. */
+ OUT gctUINT32 streamCount;
+
+ /* Total number of temporary registers per thread. */
+ OUT gctUINT32 registerMax;
+
+ /* Maximum number of threads. */
+ OUT gctUINT32 threadCount;
+
+ /* Number of shader cores. */
+ OUT gctUINT32 shaderCoreCount;
+
+ /* Size of the vertex cache. */
+ OUT gctUINT32 vertexCacheSize;
+
+ /* Number of entries in the vertex output buffer. */
+ OUT gctUINT32 vertexOutputBufferSize;
+ }
+ QueryChipIdentity;
+
+ /* gcvHAL_MAP_MEMORY */
+ struct _gcsHAL_MAP_MEMORY
+ {
+ /* Physical memory address to map. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to map. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory. */
+ OUT gctPOINTER logical;
+ }
+ MapMemory;
+
+ /* gcvHAL_UNMAP_MEMORY */
+ struct _gcsHAL_UNMAP_MEMORY
+ {
+ /* Physical memory address to unmap. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to unmap. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory to unmap. */
+ IN gctPOINTER logical;
+ }
+ UnmapMemory;
+
+ /* gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_LINEAR_VIDEO_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctUINT bytes;
+
+ /* Buffer alignment. */
+ IN gctUINT alignment;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateLinearVideoMemory;
+
+ /* gcvHAL_ALLOCATE_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_VIDEO_MEMORY
+ {
+ /* Width of rectangle to allocate. */
+ IN OUT gctUINT width;
+
+ /* Height of rectangle to allocate. */
+ IN OUT gctUINT height;
+
+ /* Depth of rectangle to allocate. */
+ IN gctUINT depth;
+
+ /* Format rectangle to allocate in gceSURF_FORMAT. */
+ IN gceSURF_FORMAT format;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateVideoMemory;
+
+ /* gcvHAL_FREE_VIDEO_MEMORY */
+ struct _gcsHAL_FREE_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+#ifdef __QNXNTO__
+/* TODO: This is part of the unlock - why is it here? */
+ /* Mapped logical address to unmap in user space. */
+ OUT gctPOINTER memory;
+
+ /* Number of bytes to allocated. */
+ OUT gctSIZE_T bytes;
+#endif
+ }
+ FreeVideoMemory;
+
+ /* gcvHAL_LOCK_VIDEO_MEMORY */
+ struct _gcsHAL_LOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Hardware specific address. */
+ OUT gctUINT32 address;
+
+ /* Mapped logical address. */
+ OUT gctPOINTER memory;
+ }
+ LockVideoMemory;
+
+ /* gcvHAL_UNLOCK_VIDEO_MEMORY */
+ struct _gcsHAL_UNLOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Type of surface. */
+ IN gceSURF_TYPE type;
+
+ /* Flag to unlock surface asynchroneously. */
+ IN OUT gctBOOL asynchroneous;
+ }
+ UnlockVideoMemory;
+
+ /* gcvHAL_ALLOCATE_NON_PAGED_MEMORY */
+ struct _gcsHAL_ALLOCATE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT gctPOINTER logical;
+ }
+ AllocateNonPagedMemory;
+
+ /* gcvHAL_FREE_NON_PAGED_MEMORY */
+ struct _gcsHAL_FREE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+ }
+ FreeNonPagedMemory;
+
+ /* gcvHAL_EVENT_COMMIT. */
+ struct _gcsHAL_EVENT_COMMIT
+ {
+ /* Event queue. */
+ IN struct _gcsQUEUE * queue;
+ }
+ Event;
+
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_COMMIT
+ {
+ /* Command buffer. */
+ IN gcoCMDBUF commandBuffer;
+
+ /* Context buffer. */
+ IN gcoCONTEXT contextBuffer;
+
+ /* Process handle. */
+ IN gctHANDLE process;
+ }
+ Commit;
+
+ /* gcvHAL_MAP_USER_MEMORY */
+ struct _gcsHAL_MAP_USER_MEMORY
+ {
+ /* Base address of user memory to map. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to map. */
+ IN gctSIZE_T size;
+
+ /* Info record required by gcvHAL_UNMAP_USER_MEMORY. */
+ OUT gctPOINTER info;
+
+ /* Physical address of mapped memory. */
+ OUT gctUINT32 address;
+ }
+ MapUserMemory;
+
+ /* gcvHAL_UNMAP_USER_MEMORY */
+ struct _gcsHAL_UNMAP_USER_MEMORY
+ {
+ /* Base address of user memory to unmap. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to unmap. */
+ IN gctSIZE_T size;
+
+ /* Info record returned by gcvHAL_MAP_USER_MEMORY. */
+ IN gctPOINTER info;
+
+ /* Physical address of mapped memory as returned by
+ gcvHAL_MAP_USER_MEMORY. */
+ IN gctUINT32 address;
+ }
+ UnmapUserMemory;
+
+#if !USE_NEW_LINUX_SIGNAL
+ /* gcsHAL_USER_SIGNAL */
+ struct _gcsHAL_USER_SIGNAL
+ {
+ /* Command. */
+ gceUSER_SIGNAL_COMMAND_CODES command;
+
+ /* Signal ID. */
+ IN OUT gctINT id;
+
+ /* Reset mode. */
+ IN gctBOOL manualReset;
+
+ /* Wait timedout. */
+ IN gctUINT32 wait;
+
+ /* State. */
+ IN gctBOOL state;
+ }
+ UserSignal;
+#endif
+
+ /* gcvHAL_SIGNAL. */
+ struct _gcsHAL_SIGNAL
+ {
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+
+ /* Reserved. */
+ IN gctSIGNAL auxSignal;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+#if defined(__QNXNTO__)
+ /* Client pulse side-channel connection ID. Set by client in gcoOS_CreateSignal. */
+ IN gctINT32 coid;
+
+ /* Set by server. */
+ IN gctINT32 rcvid;
+#endif
+ /* Event generated from where of pipeline */
+ IN gceKERNEL_WHERE fromWhere;
+ }
+ Signal;
+
+ /* gcvHAL_WRITE_DATA. */
+ struct _gcsHAL_WRITE_DATA
+ {
+ /* Address to write data to. */
+ IN gctUINT32 address;
+
+ /* Data to write. */
+ IN gctUINT32 data;
+ }
+ WriteData;
+
+ /* gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_ALLOCATE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT gctPOINTER logical;
+
+ }
+ AllocateContiguousMemory;
+
+ /* gcvHAL_FREE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_FREE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+ }
+ FreeContiguousMemory;
+
+ /* gcvHAL_READ_REGISTER */
+ struct _gcsHAL_READ_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ OUT gctUINT32 data;
+ }
+ ReadRegisterData;
+
+ /* gcvHAL_WRITE_REGISTER */
+ struct _gcsHAL_WRITE_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ IN gctUINT32 data;
+ }
+ WriteRegisterData;
+
+ /* Power management. */
+ /* gcvHAL_SET_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_SET_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ IN gceCHIPPOWERSTATE state;
+ }
+ SetPowerManagement;
+
+ /* gcvHAL_QUERY_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_QUERY_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ OUT gceCHIPPOWERSTATE state;
+
+ /* Idle query. */
+ OUT gctBOOL isIdle;
+ }
+ QueryPowerManagement;
+ /* gcvHAL_QUERY_KERNEL_SETTINGS */
+ struct _gcsHAL_QUERY_KERNEL_SETTINGS
+ {
+ /* Settings.*/
+ OUT gcsKERNEL_SETTINGS settings;
+ }
+ QueryKernelSettings;
+
+ /* gcvHAL_MAP_PHYSICAL */
+ struct _gcsHAL_MAP_PHYSICAL
+ {
+ /* gcvTRUE to map, gcvFALSE to unmap. */
+ IN gctBOOL map;
+
+ /* Physical address. */
+ IN OUT gctPHYS_ADDR physical;
+ }
+ MapPhysical;
+
+ struct _gcsHAL_CACHE
+ {
+ IN gctBOOL invalidate;
+ IN gctHANDLE process;
+ IN gctPOINTER logical;
+ IN gctSIZE_T bytes;
+ }
+ Cache;
+ }
+ u;
+}
+gcsHAL_INTERFACE;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_driver_h_ */
+
diff --git a/src/include_arnova/gc_hal_dump.h b/src/include_arnova/gc_hal_dump.h
new file mode 100644
index 0000000..570218c
--- /dev/null
+++ b/src/include_arnova/gc_hal_dump.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_dump_h_
+#define __gc_hal_dump_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** FILE LAYOUT:
+**
+** gcsDUMP_FILE structure
+**
+** gcsDUMP_DATA frame
+** gcsDUMP_DATA or gcDUMP_DATA_SIZE records rendingring the frame
+** gctUINT8 data[length]
+*/
+
+#define gcvDUMP_FILE_SIGNATURE gcmCC('g','c','D','B')
+
+typedef struct _gcsDUMP_FILE
+{
+ gctUINT32 signature; /* File signature */
+ gctSIZE_T length; /* Length of file */
+ gctUINT32 frames; /* Number of frames in file */
+}
+gcsDUMP_FILE;
+
+typedef enum _gceDUMP_TAG
+{
+ gcvTAG_SURFACE = gcmCC('s','u','r','f'),
+ gcvTAG_FRAME = gcmCC('f','r','m',' '),
+ gcvTAG_COMMAND = gcmCC('c','m','d',' '),
+ gcvTAG_INDEX = gcmCC('i','n','d','x'),
+ gcvTAG_STREAM = gcmCC('s','t','r','m'),
+ gcvTAG_TEXTURE = gcmCC('t','e','x','t'),
+ gcvTAG_RENDER_TARGET = gcmCC('r','n','d','r'),
+ gcvTAG_DEPTH = gcmCC('z','b','u','f'),
+ gcvTAG_RESOLVE = gcmCC('r','s','l','v'),
+ gcvTAG_DELETE = gcmCC('d','e','l',' '),
+}
+gceDUMP_TAG;
+
+typedef struct _gcsDUMP_SURFACE
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctUINT32 address; /* Address of the surface. */
+ gctINT16 width; /* Width of surface. */
+ gctINT16 height; /* Height of surface. */
+ gceSURF_FORMAT format; /* Surface pixel format. */
+ gctSIZE_T length; /* Number of bytes inside the surface. */
+}
+gcsDUMP_SURFACE;
+
+typedef struct _gcsDUMP_DATA
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctSIZE_T length; /* Number of bytes of data. */
+ gctUINT32 address; /* Address for the data. */
+}
+gcsDUMP_DATA;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_dump_h_ */
+
diff --git a/src/include_arnova/gc_hal_engine.h b/src/include_arnova/gc_hal_engine.h
new file mode 100644
index 0000000..0382081
--- /dev/null
+++ b/src/include_arnova/gc_hal_engine.h
@@ -0,0 +1,1597 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_engine_h_
+#define __gc_hal_engine_h_
+
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoSTREAM * gcoSTREAM;
+typedef struct _gcoVERTEX * gcoVERTEX;
+typedef struct _gcoTEXTURE * gcoTEXTURE;
+typedef struct _gcoINDEX * gcoINDEX;
+typedef struct _gcsVERTEX_ATTRIBUTES * gcsVERTEX_ATTRIBUTES_PTR;
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+/* Shading format. */
+typedef enum _gceSHADING
+{
+ gcvSHADING_SMOOTH,
+ gcvSHADING_FLAT_D3D,
+ gcvSHADING_FLAT_OPENGL,
+}
+gceSHADING;
+
+/* Culling modes. */
+typedef enum _gceCULL
+{
+ gcvCULL_NONE,
+ gcvCULL_CCW,
+ gcvCULL_CW,
+}
+gceCULL;
+
+/* Fill modes. */
+typedef enum _gceFILL
+{
+ gcvFILL_POINT,
+ gcvFILL_WIRE_FRAME,
+ gcvFILL_SOLID,
+}
+gceFILL;
+
+/* Compare modes. */
+typedef enum _gceCOMPARE
+{
+ gcvCOMPARE_NEVER,
+ gcvCOMPARE_NOT_EQUAL,
+ gcvCOMPARE_LESS,
+ gcvCOMPARE_LESS_OR_EQUAL,
+ gcvCOMPARE_EQUAL,
+ gcvCOMPARE_GREATER,
+ gcvCOMPARE_GREATER_OR_EQUAL,
+ gcvCOMPARE_ALWAYS,
+}
+gceCOMPARE;
+
+/* Stencil modes. */
+typedef enum _gceSTENCIL_MODE
+{
+ gcvSTENCIL_NONE,
+ gcvSTENCIL_SINGLE_SIDED,
+ gcvSTENCIL_DOUBLE_SIDED,
+}
+gceSTENCIL_MODE;
+
+/* Stencil operations. */
+typedef enum _gceSTENCIL_OPERATION
+{
+ gcvSTENCIL_KEEP,
+ gcvSTENCIL_REPLACE,
+ gcvSTENCIL_ZERO,
+ gcvSTENCIL_INVERT,
+ gcvSTENCIL_INCREMENT,
+ gcvSTENCIL_DECREMENT,
+ gcvSTENCIL_INCREMENT_SATURATE,
+ gcvSTENCIL_DECREMENT_SATURATE,
+}
+gceSTENCIL_OPERATION;
+
+/* Stencil selection. */
+typedef enum _gceSTENCIL_WHERE
+{
+ gcvSTENCIL_FRONT,
+ gcvSTENCIL_BACK,
+}
+gceSTENCIL_WHERE;
+
+/* Texture addressing selection. */
+typedef enum _gceTEXTURE_WHICH
+{
+ gcvTEXTURE_S,
+ gcvTEXTURE_T,
+ gcvTEXTURE_R,
+}
+gceTEXTURE_WHICH;
+
+/* Texture addressing modes. */
+typedef enum _gceTEXTURE_ADDRESSING
+{
+ gcvTEXTURE_WRAP,
+ gcvTEXTURE_CLAMP,
+ gcvTEXTURE_BORDER,
+ gcvTEXTURE_MIRROR,
+ gcvTEXTURE_MIRROR_ONCE,
+}
+gceTEXTURE_ADDRESSING;
+
+/* Texture filters. */
+typedef enum _gceTEXTURE_FILTER
+{
+ gcvTEXTURE_NONE,
+ gcvTEXTURE_POINT,
+ gcvTEXTURE_LINEAR,
+ gcvTEXTURE_ANISOTROPIC,
+}
+gceTEXTURE_FILTER;
+
+/* Primitive types. */
+typedef enum _gcePRIMITIVE
+{
+ gcvPRIMITIVE_POINT_LIST,
+ gcvPRIMITIVE_LINE_LIST,
+ gcvPRIMITIVE_LINE_STRIP,
+ gcvPRIMITIVE_LINE_LOOP,
+ gcvPRIMITIVE_TRIANGLE_LIST,
+ gcvPRIMITIVE_TRIANGLE_STRIP,
+ gcvPRIMITIVE_TRIANGLE_FAN,
+}
+gcePRIMITIVE;
+
+/* Index types. */
+typedef enum _gceINDEX_TYPE
+{
+ gcvINDEX_8,
+ gcvINDEX_16,
+ gcvINDEX_32,
+}
+gceINDEX_TYPE;
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Query the target capabilities. */
+gceSTATUS
+gcoHAL_QueryTargetCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MultiTargetCount,
+ OUT gctUINT * MaxSamples
+ );
+
+gceSTATUS
+gcoHAL_SetDepthOnly(
+ IN gcoHAL Hal,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoHAL_QueryShaderCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * VertexUniforms,
+ OUT gctUINT * FragmentUniforms,
+ OUT gctUINT * Varyings
+ );
+
+gceSTATUS
+gcoHAL_QueryTextureCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoHAL_QueryStreamCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT32 * MaxAttributes,
+ OUT gctUINT32 * MaxStreamSize,
+ OUT gctUINT32 * NumberOfStreams,
+ OUT gctUINT32 * Alignment
+ );
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*--------------------------------- gcoSURF 3D --------------------------------*/
+
+/* Copy surface. */
+gceSTATUS
+gcoSURF_Copy(
+ IN gcoSURF Surface,
+ IN gcoSURF Source
+ );
+
+/* Clear surface. */
+gceSTATUS
+gcoSURF_Clear(
+ IN gcoSURF Surface,
+ IN gctUINT Flags
+ );
+
+/* Set number of samples for a gcoSURF object. */
+gceSTATUS
+gcoSURF_SetSamples(
+ IN gcoSURF Surface,
+ IN gctUINT Samples
+ );
+
+/* Get the number of samples per pixel. */
+gceSTATUS
+gcoSURF_GetSamples(
+ IN gcoSURF Surface,
+ OUT gctUINT_PTR Samples
+ );
+
+/* Clear rectangular surface. */
+gceSTATUS
+gcoSURF_ClearRect(
+ IN gcoSURF Surface,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctUINT Flags
+ );
+
+/* TO BE REMOVED */
+#if 1
+ gceSTATUS
+ depr_gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight
+ );
+
+ gceSTATUS
+ depr_gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+#endif
+
+/* Resample surface. */
+gceSTATUS
+gcoSURF_Resample(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Resolve surface. */
+gceSTATUS
+gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Resolve rectangular area of a surface. */
+gceSTATUS
+gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Set surface resolvability. */
+gceSTATUS
+gcoSURF_SetResolvability(
+ IN gcoSURF Surface,
+ IN gctBOOL Resolvable
+ );
+
+/******************************************************************************\
+******************************** gcoINDEX Object *******************************
+\******************************************************************************/
+
+/* Construct a new gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoINDEX * Index
+ );
+
+/* Destroy a gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Destroy(
+ IN gcoINDEX Index
+ );
+
+/* Lock index in memory. */
+gceSTATUS
+gcoINDEX_Lock(
+ IN gcoINDEX Index,
+ OUT gctUINT32 * Address,
+ OUT gctPOINTER * Memory
+ );
+
+/* Unlock index that was previously locked with gcoINDEX_Lock. */
+gceSTATUS
+gcoINDEX_Unlock(
+ IN gcoINDEX Index
+ );
+
+/* Upload index data into the memory. */
+gceSTATUS
+gcoINDEX_Load(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE IndexType,
+ IN gctUINT32 IndexCount,
+ IN gctPOINTER IndexBuffer
+ );
+
+/* Bind an index object to the hardware, for neocore hacking*/
+gceSTATUS
+gcoINDEX_LoadHack(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE IndexType,
+ IN gctUINT32 IndexCount,
+ IN gctPOINTER IndexBuffer
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_Bind(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_BindOffset(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset
+ );
+
+/* Free existing index buffer. */
+gceSTATUS
+gcoINDEX_Free(
+ IN gcoINDEX Index
+ );
+
+/* Upload data into an index buffer. */
+gceSTATUS
+gcoINDEX_Upload(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/* Upload data into an index buffer starting at an offset. */
+gceSTATUS
+gcoINDEX_UploadOffset(
+ IN gcoINDEX Index,
+ IN gctUINT32 Offset,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/* Query the index capabilities. */
+gceSTATUS
+gcoINDEX_QueryCaps(
+ OUT gctBOOL * Index8,
+ OUT gctBOOL * Index16,
+ OUT gctBOOL * Index32,
+ OUT gctUINT * MaxIndex
+ );
+
+/* Determine the index range in the current index buffer. */
+gceSTATUS
+gcoINDEX_GetIndexRange(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Count,
+ OUT gctUINT32 * MinimumIndex,
+ OUT gctUINT32 * MaximumIndex
+ );
+
+/* Dynamic buffer management. */
+gceSTATUS
+gcoINDEX_SetDynamic(
+ IN gcoINDEX Index,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+gceSTATUS
+gcoINDEX_UploadDynamic(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+********************************** gco3D Object *********************************
+\******************************************************************************/
+
+/* Clear flags. */
+typedef enum _gceCLEAR
+{
+ gcvCLEAR_COLOR = 0x1,
+ gcvCLEAR_DEPTH = 0x2,
+ gcvCLEAR_STENCIL = 0x4,
+ gcvCLEAR_HZ = 0x8,
+ gcvCLEAR_HAS_VAA = 0x10,
+}
+gceCLEAR;
+
+/* Blending targets. */
+typedef enum _gceBLEND_UNIT
+{
+ gcvBLEND_SOURCE,
+ gcvBLEND_TARGET,
+}
+gceBLEND_UNIT;
+
+/* Construct a new gco3D object. */
+gceSTATUS
+gco3D_Construct(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+/* Destroy an gco3D object. */
+gceSTATUS
+gco3D_Destroy(
+ IN gco3D Engine
+ );
+
+/* Set 3D API type. */
+gceSTATUS
+gco3D_SetAPI(
+ IN gco3D Engine,
+ IN gceAPI ApiType
+ );
+
+/* Set render target. */
+gceSTATUS
+gco3D_SetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset render target. */
+gceSTATUS
+gco3D_UnsetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set depth buffer. */
+gceSTATUS
+gco3D_SetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset depth buffer. */
+gceSTATUS
+gco3D_UnsetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set viewport. */
+gceSTATUS
+gco3D_SetViewport(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set scissors. */
+gceSTATUS
+gco3D_SetScissors(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set clear color. */
+gceSTATUS
+gco3D_SetClearColor(
+ IN gco3D Engine,
+ IN gctUINT8 Red,
+ IN gctUINT8 Green,
+ IN gctUINT8 Blue,
+ IN gctUINT8 Alpha
+ );
+
+/* Set fixed point clear color. */
+gceSTATUS
+gco3D_SetClearColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point clear color. */
+gceSTATUS
+gco3D_SetClearColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set fixed point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Depth
+ );
+
+/* Set floating point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthF(
+ IN gco3D Engine,
+ IN gctFLOAT Depth
+ );
+
+/* Set clear stencil. */
+gceSTATUS
+gco3D_SetClearStencil(
+ IN gco3D Engine,
+ IN gctUINT32 Stencil
+ );
+
+/* Clear a Rect sub-surface. */
+gceSTATUS
+gco3D_ClearRect(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+/* Clear surface. */
+gceSTATUS
+gco3D_Clear(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+
+/* Clear tile status. */
+gceSTATUS
+gco3D_ClearTileStatus(
+ IN gco3D Engine,
+ IN gcsSURF_INFO_PTR Surface,
+ IN gctUINT32 TileStatusAddress,
+ IN gctUINT32 Flags
+ );
+
+/* Set shading mode. */
+gceSTATUS
+gco3D_SetShading(
+ IN gco3D Engine,
+ IN gceSHADING Shading
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_EnableBlending(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set blending function. */
+gceSTATUS
+gco3D_SetBlendFunction(
+ IN gco3D Engine,
+ IN gceBLEND_UNIT Unit,
+ IN gceBLEND_FUNCTION FunctionRGB,
+ IN gceBLEND_FUNCTION FunctionAlpha
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_SetBlendMode(
+ IN gco3D Engine,
+ IN gceBLEND_MODE ModeRGB,
+ IN gceBLEND_MODE ModeAlpha
+ );
+
+/* Set blending color. */
+gceSTATUS
+gco3D_SetBlendColor(
+ IN gco3D Engine,
+ IN gctUINT Red,
+ IN gctUINT Green,
+ IN gctUINT Blue,
+ IN gctUINT Alpha
+ );
+
+/* Set fixed point blending color. */
+gceSTATUS
+gco3D_SetBlendColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point blending color. */
+gceSTATUS
+gco3D_SetBlendColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set culling mode. */
+gceSTATUS
+gco3D_SetCulling(
+ IN gco3D Engine,
+ IN gceCULL Mode
+ );
+
+/* Enable point size */
+gceSTATUS
+gco3D_SetPointSizeEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set point sprite */
+gceSTATUS
+gco3D_SetPointSprite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set fill mode. */
+gceSTATUS
+gco3D_SetFill(
+ IN gco3D Engine,
+ IN gceFILL Mode
+ );
+
+/* Set depth compare mode. */
+gceSTATUS
+gco3D_SetDepthCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Enable depth writing. */
+gceSTATUS
+gco3D_EnableDepthWrite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth mode. */
+gceSTATUS
+gco3D_SetDepthMode(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeX(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFIXED_POINT Near,
+ IN gctFIXED_POINT Far
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeF(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFLOAT Near,
+ IN gctFLOAT Far
+ );
+
+/* Set last pixel enable */
+gceSTATUS
+gco3D_SetLastPixelEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth Bias and Scale */
+gceSTATUS
+gco3D_SetDepthScaleBiasX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT DepthScale,
+ IN gctFIXED_POINT DepthBias
+ );
+
+gceSTATUS
+gco3D_SetDepthScaleBiasF(
+ IN gco3D Engine,
+ IN gctFLOAT DepthScale,
+ IN gctFLOAT DepthBias
+ );
+
+/* Enable or disable dithering. */
+gceSTATUS
+gco3D_EnableDither(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set color write enable bits. */
+gceSTATUS
+gco3D_SetColorWrite(
+ IN gco3D Engine,
+ IN gctUINT8 Enable
+ );
+
+/* Enable or disable early depth. */
+gceSTATUS
+gco3D_SetEarlyDepth(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Enable or disable depth-only mode. */
+gceSTATUS
+gco3D_SetDepthOnly(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set stencil mode. */
+gceSTATUS
+gco3D_SetStencilMode(
+ IN gco3D Engine,
+ IN gceSTENCIL_MODE Mode
+ );
+
+/* Set stencil mask. */
+gceSTATUS
+gco3D_SetStencilMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil write mask. */
+gceSTATUS
+gco3D_SetStencilWriteMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil reference. */
+gceSTATUS
+gco3D_SetStencilReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference,
+ IN gctBOOL Front
+ );
+
+/* Set stencil compare. */
+gceSTATUS
+gco3D_SetStencilCompare(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceCOMPARE Compare
+ );
+
+/* Set stencil operation on pass. */
+gceSTATUS
+gco3D_SetStencilPass(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on fail. */
+gceSTATUS
+gco3D_SetStencilFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on depth fail. */
+gceSTATUS
+gco3D_SetStencilDepthFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Enable or disable alpha test. */
+gceSTATUS
+gco3D_SetAlphaTest(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set alpha test compare. */
+gceSTATUS
+gco3D_SetAlphaCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Set alpha test reference in unsigned integer. */
+gceSTATUS
+gco3D_SetAlphaReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference
+ );
+
+/* Set alpha test reference in fixed point. */
+gceSTATUS
+gco3D_SetAlphaReferenceX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Reference
+ );
+
+/* Set alpha test reference in floating point. */
+gceSTATUS
+gco3D_SetAlphaReferenceF(
+ IN gco3D Engine,
+ IN gctFLOAT Reference
+ );
+
+/* Enable/Disable anti-alias line. */
+gceSTATUS
+gco3D_SetAntiAliasLine(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set texture slot for anti-alias line. */
+gceSTATUS
+gco3D_SetAALineTexSlot(
+ IN gco3D Engine,
+ IN gctUINT TexSlot
+ );
+
+/* Set anti-alias line width scale. */
+gceSTATUS
+gco3D_SetAALineWidth(
+ IN gco3D Engine,
+ IN gctFLOAT Width
+ );
+
+/* Draw a number of primitives. */
+gceSTATUS
+gco3D_DrawPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT StartVertex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of primitives using offsets. */
+gceSTATUS
+gco3D_DrawPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives. */
+gceSTATUS
+gco3D_DrawIndexedPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT BaseVertex,
+ IN gctINT StartIndex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives using offsets. */
+gceSTATUS
+gco3D_DrawIndexedPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 BaseOffset,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Enable or disable anti-aliasing. */
+gceSTATUS
+gco3D_SetAntiAlias(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Write data into the command buffer. */
+gceSTATUS
+gco3D_WriteBuffer(
+ IN gco3D Engine,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Aligned
+ );
+
+/*Send sempahore and stall until sempahore is signalled.*/
+gceSTATUS
+gco3D_Semaphore(
+ IN gco3D Engine,
+ IN gceWHERE From,
+ IN gceWHERE To,
+ IN gceHOW How);
+
+/*Set the subpixels center .*/
+gceSTATUS
+gco3D_SetCentroids(
+ IN gco3D Engine,
+ IN gctUINT32 Index,
+ IN gctPOINTER Centroids
+ );
+/*----------------------------------------------------------------------------*/
+/*-------------------------- gco3D Fragment Processor ------------------------*/
+
+/* Set the fragment processor configuration. */
+gceSTATUS
+gco3D_SetFragmentConfiguration(
+ IN gco3D Engine,
+ IN gctBOOL ColorFromStream,
+ IN gctBOOL EnableFog,
+ IN gctBOOL EnableSmoothPoint,
+ IN gctUINT32 ClipPlanes
+ );
+
+/* Enable/disable texture stage operation. */
+gceSTATUS
+gco3D_EnableTextureStage(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL Enable
+ );
+
+/* Program the channel enable masks for the color texture function. */
+gceSTATUS
+gco3D_SetTextureColorMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the channel enable masks for the alpha texture function. */
+gceSTATUS
+gco3D_SetTextureAlphaMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the constant fragment color. */
+gceSTATUS
+gco3D_SetFragmentColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFragmentColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant fog color. */
+gceSTATUS
+gco3D_SetFogColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFogColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant texture color. */
+gceSTATUS
+gco3D_SetTetxureColorX(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetTetxureColorF(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Configure color texture function. */
+gceSTATUS
+gco3D_SetColorTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+/* Configure alpha texture function. */
+gceSTATUS
+gco3D_SetAlphaTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+
+/******************************************************************************\
+******************************* gcoTEXTURE Object *******************************
+\******************************************************************************/
+
+/* Cube faces. */
+typedef enum _gceTEXTURE_FACE
+{
+ gcvFACE_NONE,
+ gcvFACE_POSITIVE_X,
+ gcvFACE_NEGATIVE_X,
+ gcvFACE_POSITIVE_Y,
+ gcvFACE_NEGATIVE_Y,
+ gcvFACE_POSITIVE_Z,
+ gcvFACE_NEGATIVE_Z,
+}
+gceTEXTURE_FACE;
+
+typedef struct _gcsTEXTURE
+{
+ /* Addressing modes. */
+ gceTEXTURE_ADDRESSING s;
+ gceTEXTURE_ADDRESSING t;
+ gceTEXTURE_ADDRESSING r;
+
+ /* Border color. */
+ gctUINT8 border[4];
+
+ /* Filters. */
+ gceTEXTURE_FILTER minFilter;
+ gceTEXTURE_FILTER magFilter;
+ gceTEXTURE_FILTER mipFilter;
+
+ /* Level of detail. */
+ gctFIXED_POINT lodBias;
+ gctFIXED_POINT lodMin;
+ gctFIXED_POINT lodMax;
+}
+gcsTEXTURE, * gcsTEXTURE_PTR;
+
+
+/* Construct a new gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Construct(
+ IN gcoHAL Hal,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Construct a new sized gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_ConstructSized(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gctUINT MipMapCount,
+ IN gcePOOL Pool,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Destroy an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Destroy(
+ IN gcoTEXTURE Texture
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Upload(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadSub(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload compressed data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadCompressed(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get gcoSURF object for a mipmap level. */
+gceSTATUS
+gcoTEXTURE_GetMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ OUT gcoSURF * Surface
+ );
+
+/* Get gcoSURF object for a mipmap level and face offset. */
+gceSTATUS
+gcoTEXTURE_GetMipMapFace(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ OUT gcoSURF * Surface,
+ OUT gctUINT32_PTR Offset
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromClient(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromSurface(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_SetEndianHint(
+ IN gcoTEXTURE Texture,
+ IN gceENDIAN_HINT EndianHint
+ );
+
+gceSTATUS
+gcoTEXTURE_SetAddressingMode(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_WHICH Which,
+ IN gceTEXTURE_ADDRESSING Mode
+ );
+
+gceSTATUS
+gcoTEXTURE_SetBorderColor(
+ IN gcoTEXTURE Texture,
+ IN gctUINT Red,
+ IN gctUINT Green,
+ IN gctUINT Blue,
+ IN gctUINT Alpha
+ );
+
+gceSTATUS
+gcoTEXTURE_SetBorderColorX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gcoTEXTURE_SetBorderColorF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+gceSTATUS
+gcoTEXTURE_SetMinFilter(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FILTER Filter
+ );
+
+gceSTATUS
+gcoTEXTURE_SetMagFilter(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FILTER Filter
+ );
+
+gceSTATUS
+gcoTEXTURE_SetMipFilter(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FILTER Filter
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODBiasX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT Bias
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODBiasF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT Bias
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMinX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMinF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMaxX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMaxF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_Bind(
+ IN gcoTEXTURE Texture,
+ IN gctINT Sampler
+ );
+
+gceSTATUS
+gcoTEXTURE_Disable(
+ IN gcoHAL Hal,
+ IN gctINT Sampler
+ );
+
+gceSTATUS
+gcoTEXTURE_Flush(
+ IN gcoTEXTURE Texture
+ );
+
+gceSTATUS
+gcoTEXTURE_QueryCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoTEXTURE_GetClosestFormat(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT InFormat,
+ OUT gceSURF_FORMAT* OutFormat
+ );
+
+gceSTATUS
+gcoTEXTURE_RenderIntoMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsRenderable(
+ IN gcoTEXTURE Texture,
+ IN gctUINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsComplete(
+ IN gcoTEXTURE Texture,
+ IN gctINT MaxLevel
+ );
+
+gceSTATUS
+gcoTEXTURE_BindTexture(
+ IN gcoTEXTURE Texture,
+ IN gctINT Sampler,
+ IN gcsTEXTURE_PTR Info
+ );
+
+/******************************************************************************\
+******************************* gcoSTREAM Object ******************************
+\******************************************************************************/
+
+typedef enum _gceVERTEX_FORMAT
+{
+ gcvVERTEX_BYTE,
+ gcvVERTEX_UNSIGNED_BYTE,
+ gcvVERTEX_SHORT,
+ gcvVERTEX_UNSIGNED_SHORT,
+ gcvVERTEX_INT,
+ gcvVERTEX_UNSIGNED_INT,
+ gcvVERTEX_FIXED,
+ gcvVERTEX_HALF,
+ gcvVERTEX_FLOAT,
+}
+gceVERTEX_FORMAT;
+
+gceSTATUS
+gcoSTREAM_Construct(
+ IN gcoHAL Hal,
+ OUT gcoSTREAM * Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Destroy(
+ IN gcoSTREAM Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Upload(
+ IN gcoSTREAM Stream,
+ IN gctCONST_POINTER Buffer,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Dynamic
+ );
+
+gceSTATUS
+gcoSTREAM_SetStride(
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoSTREAM_Lock(
+ IN gcoSTREAM Stream,
+ OUT gctPOINTER * Logical,
+ OUT gctUINT32 * Physical
+ );
+
+gceSTATUS
+gcoSTREAM_Unlock(
+ IN gcoSTREAM Stream);
+
+gceSTATUS
+gcoSTREAM_Reserve(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoSTREAM_Flush(
+ IN gcoSTREAM Stream
+ );
+
+/* Dynamic buffer API. */
+gceSTATUS
+gcoSTREAM_SetDynamic(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+typedef struct _gcsSTREAM_INFO
+{
+ gctUINT index;
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT components;
+ gctSIZE_T size;
+ gctCONST_POINTER data;
+ gctUINT stride;
+}
+gcsSTREAM_INFO, * gcsSTREAM_INFO_PTR;
+
+gceSTATUS
+gcoSTREAM_UploadDynamic(
+ IN gcoSTREAM Stream,
+ IN gctUINT VertexCount,
+ IN gctUINT InfoCount,
+ IN gcsSTREAM_INFO_PTR Info,
+ IN gcoVERTEX Vertex
+ );
+
+/******************************************************************************\
+******************************** gcoVERTEX Object ******************************
+\******************************************************************************/
+
+typedef struct _gcsVERTEX_ATTRIBUTES
+{
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT32 components;
+ gctSIZE_T size;
+ gctUINT32 stream;
+ gctUINT32 offset;
+ gctUINT32 stride;
+}
+gcsVERTEX_ATTRIBUTES;
+
+gceSTATUS
+gcoVERTEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVERTEX * Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Destroy(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Reset(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_EnableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index,
+ IN gceVERTEX_FORMAT Format,
+ IN gctBOOL Normalized,
+ IN gctUINT32 Components,
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoVERTEX_DisableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index
+ );
+
+gceSTATUS
+gcoVERTEX_Bind(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_BindHack(
+ IN gctUINT32 ActiveAttributeCount,
+ IN gctUINT32 TotalStride,
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Address
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_engine_h_ */
+
diff --git a/src/include_arnova/gc_hal_enum.h b/src/include_arnova/gc_hal_enum.h
new file mode 100644
index 0000000..0f6ccf8
--- /dev/null
+++ b/src/include_arnova/gc_hal_enum.h
@@ -0,0 +1,608 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_enum_h_
+#define __gc_hal_enum_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Chip models. */
+typedef enum _gceCHIPMODEL
+{
+ gcv300 = 0x0300,
+ gcv400 = 0x0400,
+ gcv410 = 0x0410,
+ gcv450 = 0x0450,
+ gcv500 = 0x0500,
+ gcv530 = 0x0530,
+ gcv600 = 0x0600,
+ gcv700 = 0x0700,
+ gcv800 = 0x0800,
+ gcv860 = 0x0860,
+ gcv1000 = 0x1000,
+}
+gceCHIPMODEL;
+
+/* Chip features. */
+typedef enum _gceFEATURE
+{
+ gcvFEATURE_PIPE_2D,
+ gcvFEATURE_PIPE_3D,
+ gcvFEATURE_PIPE_VG,
+ gcvFEATURE_DC,
+ gcvFEATURE_HIGH_DYNAMIC_RANGE,
+ gcvFEATURE_MODULE_CG,
+ gcvFEATURE_MIN_AREA,
+ gcvFEATURE_BUFFER_INTERLEAVING,
+ gcvFEATURE_BYTE_WRITE_2D,
+ gcvFEATURE_ENDIANNESS_CONFIG,
+ gcvFEATURE_DUAL_RETURN_BUS,
+ gcvFEATURE_DEBUG_MODE,
+ gcvFEATURE_YUY2_RENDER_TARGET,
+ gcvFEATURE_FRAGMENT_PROCESSOR,
+ gcvFEATURE_2DPE20,
+ gcvFEATURE_FAST_CLEAR,
+ gcvFEATURE_YUV420_TILER,
+ gcvFEATURE_YUY2_AVERAGING,
+ gcvFEATURE_FLIP_Y,
+ gcvFEATURE_EARLY_Z,
+ gcvFEATURE_Z_COMPRESSION,
+ gcvFEATURE_MSAA,
+ gcvFEATURE_SPECIAL_ANTI_ALIASING,
+ gcvFEATURE_SPECIAL_MSAA_LOD,
+ gcvFEATURE_422_TEXTURE_COMPRESSION,
+ gcvFEATURE_DXT_TEXTURE_COMPRESSION,
+ gcvFEATURE_ETC1_TEXTURE_COMPRESSION,
+ gcvFEATURE_CORRECT_TEXTURE_CONVERTER,
+ gcvFEATURE_TEXTURE_8K,
+ gcvFEATURE_SCALER,
+ gcvFEATURE_YUV420_SCALER,
+ gcvFEATURE_SHADER_HAS_W,
+ gcvFEATURE_SHADER_HAS_SIGN,
+ gcvFEATURE_SHADER_HAS_FLOOR,
+ gcvFEATURE_SHADER_HAS_CEIL,
+ gcvFEATURE_SHADER_HAS_SQRT,
+ gcvFEATURE_SHADER_HAS_TRIG,
+ gcvFEATURE_VAA,
+ gcvFEATURE_HZ,
+ gcvFEATURE_CORRECT_STENCIL,
+ gcvFEATURE_VG20,
+ gcvFEATURE_VG_FILTER,
+ gcvFEATURE_VG21,
+ gcvFEATURE_VG_DOUBLE_BUFFER,
+ gcvFEATURE_MC20,
+ gcvFEATURE_SUPER_TILED,
+
+ gcvFEATURE_2D_FILTERBLIT_PLUS_ALPHABLEND,
+ gcvFEATURE_2D_DITHER,
+ gcvFEATURE_2D_A8_TARGET,
+ gcvFEATURE_2D_FILTERBLIT_FULLROTATION,
+ gcvFEATURE_2D_BITBLIT_FULLROTATION,
+
+ gcvFEATURE_WIDE_LINE,
+ gcvFEATURE_FC_FLUSH_STALL,
+
+ gcvFEATURE_FULL_DIRECTFB,
+ gcvFEATURE_HALF_FLOAT_PIPE,
+ gcvFEATURE_LINE_LOOP,
+ gcvFEATURE_2D_YUV_BLIT,
+ gcvFEATURE_2D_TILING,
+}
+gceFEATURE;
+
+/* Chip Power Status. */
+typedef enum _gceCHIPPOWERSTATE
+{
+ gcvPOWER_ON,
+ gcvPOWER_OFF,
+ gcvPOWER_IDLE,
+ gcvPOWER_SUSPEND,
+ gcvPOWER_ON_BROADCAST,
+ gcvPOWER_SUSPEND_ATPOWERON,
+ gcvPOWER_OFF_ATPOWERON,
+ gcvPOWER_IDLE_BROADCAST,
+ gcvPOWER_SUSPEND_BROADCAST,
+ gcvPOWER_OFF_BROADCAST,
+ gcvPOWER_OFF_RECOVERY,
+}
+gceCHIPPOWERSTATE;
+
+/* Surface types. */
+typedef enum _gceSURF_TYPE
+{
+ gcvSURF_TYPE_UNKNOWN,
+ gcvSURF_INDEX,
+ gcvSURF_VERTEX,
+ gcvSURF_TEXTURE,
+ gcvSURF_RENDER_TARGET,
+ gcvSURF_DEPTH,
+ gcvSURF_BITMAP,
+ gcvSURF_TILE_STATUS,
+ gcvSURF_MASK,
+ gcvSURF_SCISSOR,
+ gcvSURF_HIERARCHICAL_DEPTH,
+ gcvSURF_NUM_TYPES, /* Make sure this is the last one! */
+
+ /* Combinations. */
+ gcvSURF_NO_TILE_STATUS = 0x100,
+ gcvSURF_RENDER_TARGET_NO_TILE_STATUS = gcvSURF_RENDER_TARGET
+ | gcvSURF_NO_TILE_STATUS,
+ gcvSURF_DEPTH_NO_TILE_STATUS = gcvSURF_DEPTH
+ | gcvSURF_NO_TILE_STATUS,
+}
+gceSURF_TYPE;
+
+typedef enum _gceSURF_COLOR_TYPE
+{
+ gcvSURF_COLOR_UNKNOWN,
+ gcvSURF_COLOR_LINEAR = 0x01,
+ gcvSURF_COLOR_ALPHA_PRE = 0x02,
+}
+gceSURF_COLOR_TYPE;
+
+/* Rotation. */
+typedef enum _gceSURF_ROTATION
+{
+ gcvSURF_0_DEGREE,
+ gcvSURF_90_DEGREE,
+ gcvSURF_180_DEGREE,
+ gcvSURF_270_DEGREE,
+ gcvSURF_FLIP_X,
+ gcvSURF_FLIP_Y,
+}
+gceSURF_ROTATION;
+
+/* Surface formats. */
+typedef enum _gceSURF_FORMAT
+{
+ /* Unknown format. */
+ gcvSURF_UNKNOWN,
+
+ /* Palettized formats. */
+ gcvSURF_INDEX1 = 100,
+ gcvSURF_INDEX4,
+ gcvSURF_INDEX8,
+
+ /* RGB formats. */
+ gcvSURF_A2R2G2B2 = 200,
+ gcvSURF_R3G3B2,
+ gcvSURF_A8R3G3B2,
+ gcvSURF_X4R4G4B4,
+ gcvSURF_A4R4G4B4,
+ gcvSURF_R4G4B4A4,
+ gcvSURF_X1R5G5B5,
+ gcvSURF_A1R5G5B5,
+ gcvSURF_R5G5B5A1,
+ gcvSURF_R5G6B5,
+ gcvSURF_R8G8B8,
+ gcvSURF_X8R8G8B8,
+ gcvSURF_A8R8G8B8,
+ gcvSURF_R8G8B8A8,
+ gcvSURF_G8R8G8B8,
+ gcvSURF_R8G8B8G8,
+ gcvSURF_X2R10G10B10,
+ gcvSURF_A2R10G10B10,
+ gcvSURF_X12R12G12B12,
+ gcvSURF_A12R12G12B12,
+ gcvSURF_X16R16G16B16,
+ gcvSURF_A16R16G16B16,
+ gcvSURF_R8G8B8X8,
+ gcvSURF_R5G5B5X1,
+ gcvSURF_R4G4B4X4,
+
+ /* BGR formats. */
+ gcvSURF_A4B4G4R4 = 300,
+ gcvSURF_A1B5G5R5,
+ gcvSURF_B5G6R5,
+ gcvSURF_B8G8R8,
+ gcvSURF_X8B8G8R8,
+ gcvSURF_A8B8G8R8,
+ gcvSURF_A2B10G10R10,
+ gcvSURF_A16B16G16R16,
+ gcvSURF_G16R16,
+ gcvSURF_B4G4R4A4,
+ gcvSURF_B5G5R5A1,
+ gcvSURF_B8G8R8X8,
+ gcvSURF_B8G8R8A8,
+ gcvSURF_X4B4G4R4,
+ gcvSURF_X1B5G5R5,
+ gcvSURF_B4G4R4X4,
+ gcvSURF_B5G5R5X1,
+
+ /* Compressed formats. */
+ gcvSURF_DXT1 = 400,
+ gcvSURF_DXT2,
+ gcvSURF_DXT3,
+ gcvSURF_DXT4,
+ gcvSURF_DXT5,
+ gcvSURF_CXV8U8,
+ gcvSURF_ETC1,
+
+ /* YUV formats. */
+ gcvSURF_YUY2 = 500,
+ gcvSURF_UYVY,
+ gcvSURF_YV12,
+ gcvSURF_I420,
+ gcvSURF_NV12,
+ gcvSURF_NV21,
+ gcvSURF_NV16,
+ gcvSURF_NV61,
+ gcvSURF_YVYU,
+ gcvSURF_VYUY,
+
+ /* Depth formats. */
+ gcvSURF_D16 = 600,
+ gcvSURF_D24S8,
+ gcvSURF_D32,
+ gcvSURF_D24X8,
+
+ /* Alpha formats. */
+ gcvSURF_A4 = 700,
+ gcvSURF_A8,
+ gcvSURF_A12,
+ gcvSURF_A16,
+ gcvSURF_A32,
+ gcvSURF_A1,
+
+ /* Luminance formats. */
+ gcvSURF_L4 = 800,
+ gcvSURF_L8,
+ gcvSURF_L12,
+ gcvSURF_L16,
+ gcvSURF_L32,
+ gcvSURF_L1,
+
+ /* Alpha/Luminance formats. */
+ gcvSURF_A4L4 = 900,
+ gcvSURF_A2L6,
+ gcvSURF_A8L8,
+ gcvSURF_A4L12,
+ gcvSURF_A12L12,
+ gcvSURF_A16L16,
+
+ /* Bump formats. */
+ gcvSURF_L6V5U5 = 1000,
+ gcvSURF_V8U8,
+ gcvSURF_X8L8V8U8,
+ gcvSURF_Q8W8V8U8,
+ gcvSURF_A2W10V10U10,
+ gcvSURF_V16U16,
+ gcvSURF_Q16W16V16U16,
+
+ /* Floating point formats. */
+ gcvSURF_R16F = 1100,
+ gcvSURF_G16R16F,
+ gcvSURF_A16B16G16R16F,
+ gcvSURF_R32F,
+ gcvSURF_G32R32F,
+ gcvSURF_A32B32G32R32F,
+
+#if 0
+ /* FIXME: remove HDR support for now. */
+ /* HDR formats. */
+ gcvSURF_HDR7E3 = 1200,
+ gcvSURF_HDR6E4,
+ gcvSURF_HDR5E5,
+ gcvSURF_HDR6E5,
+#endif
+}
+gceSURF_FORMAT;
+
+/* Pixel swizzle modes. */
+typedef enum _gceSURF_SWIZZLE
+{
+ gcvSURF_NOSWIZZLE,
+ gcvSURF_ARGB,
+ gcvSURF_ABGR,
+ gcvSURF_RGBA,
+ gcvSURF_BGRA
+}
+gceSURF_SWIZZLE;
+
+/* Transparency modes. */
+typedef enum _gceSURF_TRANSPARENCY
+{
+ /* Valid only for PE 1.0 */
+ gcvSURF_OPAQUE,
+ gcvSURF_SOURCE_MATCH,
+ gcvSURF_SOURCE_MASK,
+ gcvSURF_PATTERN_MASK,
+}
+gceSURF_TRANSPARENCY;
+
+/* Transparency modes. */
+typedef enum _gce2D_TRANSPARENCY
+{
+ /* Valid only for PE 2.0 */
+ gcv2D_OPAQUE,
+ gcv2D_KEYED,
+ gcv2D_MASKED
+}
+gce2D_TRANSPARENCY;
+
+/* Mono packing modes. */
+typedef enum _gceSURF_MONOPACK
+{
+ gcvSURF_PACKED8,
+ gcvSURF_PACKED16,
+ gcvSURF_PACKED32,
+ gcvSURF_UNPACKED,
+}
+gceSURF_MONOPACK;
+
+/* Blending modes. */
+typedef enum _gceSURF_BLEND_MODE
+{
+ /* Porter-Duff blending modes. */
+ /* Fsrc Fdst */
+ gcvBLEND_CLEAR, /* 0 0 */
+ gcvBLEND_SRC, /* 1 0 */
+ gcvBLEND_DST, /* 0 1 */
+ gcvBLEND_SRC_OVER_DST, /* 1 1 - Asrc */
+ gcvBLEND_DST_OVER_SRC, /* 1 - Adst 1 */
+ gcvBLEND_SRC_IN_DST, /* Adst 0 */
+ gcvBLEND_DST_IN_SRC, /* 0 Asrc */
+ gcvBLEND_SRC_OUT_DST, /* 1 - Adst 0 */
+ gcvBLEND_DST_OUT_SRC, /* 0 1 - Asrc */
+ gcvBLEND_SRC_ATOP_DST, /* Adst 1 - Asrc */
+ gcvBLEND_DST_ATOP_SRC, /* 1 - Adst Asrc */
+ gcvBLEND_SRC_XOR_DST, /* 1 - Adst 1 - Asrc */
+
+ /* Special blending modes. */
+ gcvBLEND_SET, /* DST = 1 */
+ gcvBLEND_SUB /* DST = DST * (1 - SRC) */
+}
+gceSURF_BLEND_MODE;
+
+/* Per-pixel alpha modes. */
+typedef enum _gceSURF_PIXEL_ALPHA_MODE
+{
+ gcvSURF_PIXEL_ALPHA_STRAIGHT,
+ gcvSURF_PIXEL_ALPHA_INVERSED
+}
+gceSURF_PIXEL_ALPHA_MODE;
+
+/* Global alpha modes. */
+typedef enum _gceSURF_GLOBAL_ALPHA_MODE
+{
+ gcvSURF_GLOBAL_ALPHA_OFF,
+ gcvSURF_GLOBAL_ALPHA_ON,
+ gcvSURF_GLOBAL_ALPHA_SCALE
+}
+gceSURF_GLOBAL_ALPHA_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gceSURF_PIXEL_COLOR_MODE
+{
+ gcvSURF_COLOR_STRAIGHT,
+ gcvSURF_COLOR_MULTIPLY
+}
+gceSURF_PIXEL_COLOR_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_PIXEL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_COLOR_MULTIPLY_DISABLE,
+ gcv2D_COLOR_MULTIPLY_ENABLE
+}
+gce2D_PIXEL_COLOR_MULTIPLY_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_GLOBAL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_GLOBAL_COLOR_MULTIPLY_DISABLE,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_ALPHA,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_COLOR
+}
+gce2D_GLOBAL_COLOR_MULTIPLY_MODE;
+
+/* Alpha blending factor modes. */
+typedef enum _gceSURF_BLEND_FACTOR_MODE
+{
+ gcvSURF_BLEND_ZERO,
+ gcvSURF_BLEND_ONE,
+ gcvSURF_BLEND_STRAIGHT,
+ gcvSURF_BLEND_INVERSED,
+ gcvSURF_BLEND_COLOR,
+ gcvSURF_BLEND_COLOR_INVERSED,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED,
+ gcvSURF_BLEND_STRAIGHT_NO_CROSS,
+ gcvSURF_BLEND_INVERSED_NO_CROSS,
+ gcvSURF_BLEND_COLOR_NO_CROSS,
+ gcvSURF_BLEND_COLOR_INVERSED_NO_CROSS,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED_CROSS
+}
+gceSURF_BLEND_FACTOR_MODE;
+
+/* Alpha blending porter duff rules. */
+typedef enum _gce2D_PORTER_DUFF_RULE
+{
+ gcvPD_CLEAR,
+ gcvPD_SRC,
+ gcvPD_SRC_OVER,
+ gcvPD_DST_OVER,
+ gcvPD_SRC_IN,
+ gcvPD_DST_IN,
+ gcvPD_SRC_OUT,
+ gcvPD_DST_OUT,
+ gcvPD_SRC_ATOP,
+ gcvPD_DST_ATOP,
+ gcvPD_ADD,
+ gcvPD_XOR,
+ gcvPD_DST
+}
+gce2D_PORTER_DUFF_RULE;
+
+/* Alpha blending factor modes. */
+typedef enum _gce2D_YUV_COLOR_MODE
+{
+ gcv2D_YUV_601,
+ gcv2D_YUV_709
+}
+gce2D_YUV_COLOR_MODE;
+
+/* 2D Rotation and flipping. */
+typedef enum _gce2D_ORIENTATION
+{
+ gcv2D_0_DEGREE,
+ gcv2D_90_DEGREE,
+ gcv2D_180_DEGREE,
+ gcv2D_270_DEGREE,
+ gcv2D_X_FLIP,
+ gcv2D_Y_FLIP
+}
+gce2D_ORIENTATION;
+
+typedef enum _gce2D_COMMAND
+{
+ gcv2D_CLEAR,
+ gcv2D_LINE,
+ gcv2D_BLT,
+ gcv2D_STRETCH,
+ gcv2D_HOR_FILTER,
+ gcv2D_VER_FILTER,
+ gcv2D_MULTI_SOURCE_BLEND,
+}
+gce2D_COMMAND;
+
+#ifndef VIVANTE_NO_3D
+/* Texture functions. */
+typedef enum _gceTEXTURE_FUNCTION
+{
+ gcvTEXTURE_DUMMY = 0,
+ gcvTEXTURE_REPLACE = 0,
+ gcvTEXTURE_MODULATE,
+ gcvTEXTURE_ADD,
+ gcvTEXTURE_ADD_SIGNED,
+ gcvTEXTURE_INTERPOLATE,
+ gcvTEXTURE_SUBTRACT,
+ gcvTEXTURE_DOT3
+}
+gceTEXTURE_FUNCTION;
+
+/* Texture sources. */
+typedef enum _gceTEXTURE_SOURCE
+{
+ gcvCOLOR_FROM_TEXTURE,
+ gcvCOLOR_FROM_CONSTANT_COLOR,
+ gcvCOLOR_FROM_PRIMARY_COLOR,
+ gcvCOLOR_FROM_PREVIOUS_COLOR
+}
+gceTEXTURE_SOURCE;
+
+/* Texture source channels. */
+typedef enum _gceTEXTURE_CHANNEL
+{
+ gcvFROM_COLOR,
+ gcvFROM_ONE_MINUS_COLOR,
+ gcvFROM_ALPHA,
+ gcvFROM_ONE_MINUS_ALPHA
+}
+gceTEXTURE_CHANNEL;
+#endif /* VIVANTE_NO_3D */
+
+/* Filter types. */
+typedef enum _gceFILTER_TYPE
+{
+ gcvFILTER_SYNC,
+ gcvFILTER_BLUR,
+ gcvFILTER_USER
+}
+gceFILTER_TYPE;
+
+/* Filter pass types. */
+typedef enum _gceFILTER_PASS_TYPE
+{
+ gcvFILTER_HOR_PASS,
+ gcvFILTER_VER_PASS
+}
+gceFILTER_PASS_TYPE;
+
+/* Endian hints. */
+typedef enum _gceENDIAN_HINT
+{
+ gcvENDIAN_NO_SWAP = 0,
+ gcvENDIAN_SWAP_WORD,
+ gcvENDIAN_SWAP_DWORD
+}
+gceENDIAN_HINT;
+
+/* Tiling modes. */
+typedef enum _gceTILING
+{
+ gcvLINEAR,
+ gcvTILED,
+ gcvSUPERTILED,
+ gcvMULTI_TILED,
+ gcvMULTI_SUPERTILED,
+}
+gceTILING;
+
+/* 2D pattern type. */
+typedef enum _gce2D_PATTERN
+{
+ gcv2D_PATTERN_SOLID = 0,
+ gcv2D_PATTERN_MONO,
+ gcv2D_PATTERN_COLOR,
+ gcv2D_PATTERN_INVALID
+}
+gce2D_PATTERN;
+
+/* 2D source type. */
+typedef enum _gce2D_SOURCE
+{
+ gcv2D_SOURCE_MASKED = 0,
+ gcv2D_SOURCE_MONO,
+ gcv2D_SOURCE_COLOR,
+ gcv2D_SOURCE_INVALID
+}
+gce2D_SOURCE;
+
+/* Pipes. */
+typedef enum _gcePIPE_SELECT
+{
+ gcvPIPE_INVALID = ~0,
+ gcvPIPE_3D = 0,
+ gcvPIPE_2D
+}
+gcePIPE_SELECT;
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoCONTEXT * gcoCONTEXT;
+typedef struct _gcoCMDBUF * gcoCMDBUF;
+typedef struct _gcoQUEUE * gcoQUEUE;
+typedef struct _gcsHAL_INTERFACE * gcsHAL_INTERFACE_PTR;
+typedef struct gcs2D_PROFILE * gcs2D_PROFILE_PTR;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_enum_h_ */
+
+
diff --git a/src/include_arnova/gc_hal_mem.h b/src/include_arnova/gc_hal_mem.h
new file mode 100644
index 0000000..bf0c40f
--- /dev/null
+++ b/src/include_arnova/gc_hal_mem.h
@@ -0,0 +1,471 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+/*
+** Include file for the local memory management.
+*/
+
+#ifndef __gc_hal_mem_h_
+#define __gc_hal_mem_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*******************************************************************************
+** Usage:
+
+ The macros to declare MemPool type and functions are
+ gcmMEM_DeclareFSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareVSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix)
+
+ The data structures for MemPool are
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+
+ The MemPool constructor and destructor functions are
+ gcfMEM_InitFSMemPool(gcsMEM_FS_MEM_POOL *, gcoOS, gctUINT, gctUINT);
+ gcfMEM_FreeFSMemPool(gcsMEM_FS_MEM_POOL *);
+ gcfMEM_InitVSMemPool(gcsMEM_VS_MEM_POOL *, gcoOS, gctUINT, gctBOOL);
+ gcfMEM_FreeVSMemPool(gcsMEM_VS_MEM_POOL *);
+ gcfMEM_InitAFSMemPool(gcsMEM_AFS_MEM_POOL *, gcoOS, gctUINT);
+ gcfMEM_FreeAFSMemPool(gcsMEM_AFS_MEM_POOL *);
+
+ FS: for Fixed-Size data structures
+ VS: for Variable-size data structures
+ AFS: for Array of Fixed-Size data structures
+
+
+ // Example 1: For a fixed-size data structure, struct gcsNode.
+ // It is used locally in a file, so the functions are static without prefix.
+ // At top level, declear allocate and free functions.
+ // The first argument is the data type.
+ // The second armument is the short name used in the fuctions.
+ gcmMEM_DeclareFSMemPool(struct gcsNode, Node, );
+
+ // The previous macro creates two inline functions,
+ // _AllocateNode and _FreeNode.
+
+ // In function or struct
+ gcsMEM_FS_MEM_POOL nodeMemPool;
+
+ // In function,
+ struct gcsNode * node;
+ gceSTATUS status;
+
+ // Before using the memory pool, initialize it.
+ // The second argument is the gcoOS object.
+ // The third argument is the number of data structures to allocate for each chunk.
+ status = gcfMEM_InitFSMemPool(&nodeMemPool, os, 100, sizeof(struct gcsNode));
+ ...
+
+ // Allocate a node.
+ status = _AllocateNode(nodeMemPool, &node);
+ ...
+ // Free a node.
+ _FreeNode(nodeMemPool, node);
+
+ // After using the memory pool, free it.
+ gcfMEM_FreeFSMemPool(&nodeMemPool);
+
+
+ // Example 2: For array of fixed-size data structures, struct gcsNode.
+ // It is used in several files, so the functions are extern with prefix.
+ // At top level, declear allocate and free functions.
+ // The first argument is the data type, and the second one is the short name
+ // used in the fuctions.
+ gcmMEM_DeclareAFSMemPool(struct gcsNode, NodeArray, gcfOpt);
+
+ // The previous macro creates two inline functions,
+ // gcfOpt_AllocateNodeArray and gcfOpt_FreeNodeArray.
+
+ // In function or struct
+ gcsMEM_AFS_MEM_POOL nodeArrayMemPool;
+
+ // In function,
+ struct gcsNode * nodeArray;
+ gceSTATUS status;
+
+ // Before using the array memory pool, initialize it.
+ // The second argument is the gcoOS object, the third is the number of data
+ // structures to allocate for each chunk.
+ status = gcfMEM_InitAFSMemPool(&nodeArrayMemPool, os, sizeof(struct gcsNode));
+ ...
+
+ // Allocate a node array of size 100.
+ status = gcfOpt_AllocateNodeArray(nodeArrayMemPool, &nodeArray, 100);
+ ...
+ // Free a node array.
+ gcfOpt_FreeNodeArray(&nodeArrayMemPool, nodeArray);
+
+ // After using the array memory pool, free it.
+ gcfMEM_FreeAFSMemPool(&nodeArrayMemPool);
+
+*******************************************************************************/
+
+/*******************************************************************************
+** To switch back to use gcoOS_Allocate and gcoOS_Free, add
+** #define USE_LOCAL_MEMORY_POOL 0
+** before including this file.
+*******************************************************************************/
+#ifndef USE_LOCAL_MEMORY_POOL
+/*
+ USE_LOCAL_MEMORY_POOL
+
+ This define enables the local memory management to improve performance.
+*/
+#define USE_LOCAL_MEMORY_POOL 1
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Structures
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+#else
+ typedef gcoOS gcsMEM_FS_MEM_POOL;
+ typedef gcoOS gcsMEM_VS_MEM_POOL;
+ typedef gcoOS gcsMEM_AFS_MEM_POOL;
+#endif
+
+/*******************************************************************************
+** Memory Pool Macros
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName##List( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * FirstPointer, \
+ Type * LastPointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolFreeAList(MemPool, (gctPOINTER) FirstPointer, (gctPOINTER) LastPointer)); \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ return(gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+ Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, size)); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcfMEM_VSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer)); \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ return(gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcfMEM_AFSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer)); \
+}
+
+#else
+
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ return(gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcoOS_Free(MemPool, Pointer)); \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ return(gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Size)); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcoOS_Free(MemPool, Pointer)); \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ return(gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcoOS_Free(MemPool, Pointer)); \
+}
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Functions
+*******************************************************************************/
+gceSTATUS
+gcfMEM_InitFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolGetANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeAList(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER FirstNode,
+ IN gctPOINTER LastNode
+ );
+
+gceSTATUS
+gcfMEM_InitVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT BlockSize,
+ IN gctBOOL RecycleFreeNode
+ );
+
+gceSTATUS
+gcfMEM_FreeVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolGetANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctUINT Size,
+ IN gctUINT Alignment,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolFreeANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_InitAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolGetANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctUINT Count,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolFreeANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_mem_h_ */
+
diff --git a/src/include_arnova/gc_hal_options.h b/src/include_arnova/gc_hal_options.h
new file mode 100644
index 0000000..6c4ca99
--- /dev/null
+++ b/src/include_arnova/gc_hal_options.h
@@ -0,0 +1,263 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_options_h_
+#define __gc_hal_options_h_
+
+/*
+ USE_NEW_LINUX_SIGNAL
+
+ This define enables the Linux kernel signaling between kernel and user.
+*/
+#ifndef USE_NEW_LINUX_SIGNAL
+# define USE_NEW_LINUX_SIGNAL 0
+#endif
+
+/*
+ NO_USER_DIRECT_ACCESS_FROM_KERNEL
+
+ This define enables the Linux kernel behavior accessing user memory.
+*/
+#ifndef NO_USER_DIRECT_ACCESS_FROM_KERNEL
+# define NO_USER_DIRECT_ACCESS_FROM_KERNEL 0
+#endif
+
+/*
+ VIVANTE_PROFILER
+
+ This define enables the profiler.
+*/
+#ifndef VIVANTE_PROFILER
+# define VIVANTE_PROFILER 0
+#endif
+
+/*
+ gcdUSE_VG
+
+ Enable VG HAL layer (only for GC350).
+*/
+#ifndef gcdUSE_VG
+# define gcdUSE_VG 0
+#endif
+
+/*
+ USE_SW_FB
+
+ Set to 1 if the frame buffer memory cannot be accessed by the GPU.
+*/
+#ifndef USE_SW_FB
+#define USE_SW_FB 0
+#endif
+
+/*
+ USE_SHADER_SYMBOL_TABLE
+
+ This define enables the symbol table in shader object.
+*/
+#define USE_SHADER_SYMBOL_TABLE 1
+
+/*
+ USE_SUPER_SAMPLING
+
+ This define enables super-sampling support.
+*/
+#define USE_SUPER_SAMPLING 0
+
+/* PROFILE_HAL_COUNTERS, PROFILE_HW_COUNTERS, PROFILE_SHADER_COUNTERS are not runtime configurable. */
+/*
+ PROFILE_HAL_COUNTERS
+
+ This define enables HAL counter profiling support.
+ HW and SHADER Counter profiling depends on this.
+*/
+/*
+#define PROFILE_HAL_COUNTERS 1
+*/
+/*
+ PROFILE_HW_COUNTERS
+
+ This define enables HW counter profiling support.
+*/
+/*
+#define PROFILE_HW_COUNTERS 1
+*/
+/*
+ PROFILE_SHADER_COUNTERS
+
+ This define enables SHADER counter profiling support.
+*/
+/*
+#define PROFILE_SHADER_COUNTERS 1
+*/
+/*
+ COMMAND_PROCESSOR_VERSION
+
+ The version of the command buffer and task manager.
+*/
+#define COMMAND_PROCESSOR_VERSION 1
+
+/*
+ gcdDUMP
+
+ When set to 1, a dump of all states and memory uploads, as well as other
+ hardware related execution will be printed to the debug console. This
+ data can be used for playing back applications.
+*/
+#define gcdDUMP 0
+
+/*
+ gcdDUMP_API
+
+ When set to 1, a high level dump of the EGL and GL/VG APs's are
+ captured.
+*/
+#define gcdDUMP_API 0
+
+/*
+ gcdDUMP_IN_KERNEL
+
+ When set to 1, all dumps will happen in the kernel. This is handy if
+ you want the kernel to dump its command buffers as well and the data
+ needs to be in sync.
+*/
+#define gcdDUMP_IN_KERNEL 0
+
+/*
+ gcdDUMP_COMMAND
+
+ When set to non-zero, the command queue will dump all incoming command
+ and context buffers as well as all other modifications to the command
+ queue.
+*/
+#define gcdDUMP_COMMAND 0
+
+/*
+ gcdNULL_DRIVER
+*/
+#define gcdNULL_DRIVER 0
+
+/*
+ gcdENABLE_TIMEOUT_DETECTION
+
+ Enable timeout detection.
+*/
+#define gcdENABLE_TIMEOUT_DETECTION 0
+
+/*
+ gcdCMD_BUFFERS
+
+ Number of command buffers to use per client. Each command buffer is 32kB in
+ size.
+*/
+#define gcdCMD_BUFFERS 2
+
+/*
+ gcdPOWER_CONTROL_DELAY
+
+ The delay in milliseconds required to wait until the GPU has woke up from a
+ suspend or power-down state. This is system dependent because the bus clock
+ also needs to be stabalize.
+*/
+#define gcdPOWER_CONTROL_DELAY 1
+
+/*
+ gcdMMU_SIZE
+
+ Size of the MMU page table in bytes. Each 4 bytes can hold 4kB worth of
+ virtual data.
+*/
+#define gcdMMU_SIZE (128 << 10)
+
+/*
+ gcdSECURE_USER
+
+ Use logical addresses instead of physical addresses in user land. In this
+ case a hint table is created for both command buffers and context buffers,
+ and that hint table will be used to patch up those buffers in the kernel
+ when they are ready to submit.
+*/
+#define gcdSECURE_USER 1
+
+/*
+ gcdSECURE_CACHE_SLOTS
+
+ Number of slots in the logical to DMA address cache table. Each time a
+ logical address needs to be translated into a DMA address for the GPU, this
+ cache will be walked. The replacement scheme is LRU.
+*/
+#define gcdSECURE_CACHE_SLOTS 64
+
+/*
+ gcdREGISTER_ACCESS_FROM_USER
+
+ Set to 1 to allow IOCTL calls to get through from user land. This should
+ only be in debug or development drops.
+*/
+#ifndef gcdREGISTER_ACCESS_FROM_USER
+# define gcdREGISTER_ACCESS_FROM_USER 1
+#endif
+
+/*
+ gcdHEAP_SIZE
+
+ Set the allocation size for the internal heaps. Each time a heap is full,
+ a new heap will be allocated with this minmimum amount of bytes. The bigger
+ this size, the fewer heaps there are to allocate, the better the
+ performance. However, heaps won't be freed until they are completely free,
+ so there might be some more memory waste if the size is too big.
+*/
+#define gcdHEAP_SIZE (64 << 10)
+
+/*
+ gcdNO_POWER_MANAGEMENT
+
+ This define disables the power management code.
+*/
+#ifndef gcdNO_POWER_MANAGEMENT
+# define gcdNO_POWER_MANAGEMENT 0
+#endif
+
+/*
+ gcdFPGA_BUILD
+
+ This define enables work arounds for FPGA images.
+*/
+#if !defined(gcdFPGA_BUILD)
+# define gcdFPGA_BUILD 0
+#endif
+
+/*
+ gcdGPU_TIMEOUT
+
+ This define specified the number of milliseconds the system will wait before
+ it broadcasts the GPU is stuck. In other words, it will define the timeout
+ of any operation that needs to wait for the GPU.
+
+ If the value is 0, no timeout will be checked for.
+*/
+#if !defined(gcdGPU_TIMEOUT)
+# define gcdGPU_TIMEOUT 0
+#endif
+
+#endif /* __gc_hal_options_h_ */
+
diff --git a/src/include_arnova/gc_hal_profiler.h b/src/include_arnova/gc_hal_profiler.h
new file mode 100644
index 0000000..70d0c69
--- /dev/null
+++ b/src/include_arnova/gc_hal_profiler.h
@@ -0,0 +1,817 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_profiler_h_
+#define __gc_hal_profiler_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define GLVERTEX_OBJECT 10
+#define GLVERTEX_OBJECT_BYTES 11
+
+#define GLINDEX_OBJECT 20
+#define GLINDEX_OBJECT_BYTES 21
+
+#define GLTEXTURE_OBJECT 30
+#define GLTEXTURE_OBJECT_BYTES 31
+
+#if VIVANTE_PROFILER
+#define gcmPROFILE_GC(Hal, Enum, Value) gcoPROFILER_Count(Hal, Enum, Value)
+#else
+#define gcmPROFILE_GC(Hal, Enum, Value) do { } while (gcvFALSE)
+#endif
+
+#ifndef gcdNEW_PROFILER_FILE
+#define gcdNEW_PROFILER_FILE 1
+#endif
+
+#ifdef gcdNEW_PROFILER_FILE
+
+/* Category Constants. */
+#define VPHEADER 0x010000
+#define VPG_INFO 0x020000
+#define VPG_TIME 0x030000
+#define VPG_MEM 0x040000
+#define VPG_ES11 0x050000
+#define VPG_ES20 0x060000
+#define VPG_VG11 0x070000
+#define VPG_HAL 0x080000
+#define VPG_HW 0x090000
+#define VPG_GPU 0x0a0000
+#define VPG_VS 0x0b0000
+#define VPG_PS 0x0c0000
+#define VPG_PA 0x0d0000
+#define VPG_SETUP 0x0e0000
+#define VPG_RA 0x0f0000
+#define VPG_TX 0x100000
+#define VPG_PE 0x110000
+#define VPG_MC 0x120000
+#define VPG_AXI 0x130000
+#define VPG_PROG 0x140000
+#define VPG_PVS 0x150000
+#define VPG_PPS 0x160000
+#define VPG_FRAME 0x170000
+#define VPG_END 0xff0000
+
+/* Info. */
+#define VPC_INFOCOMPANY (VPG_INFO + 1)
+#define VPC_INFOVERSION (VPG_INFO + 2)
+#define VPC_INFORENDERER (VPG_INFO + 3)
+#define VPC_INFOREVISION (VPG_INFO + 4)
+#define VPC_INFODRIVER (VPG_INFO + 5)
+
+/* Counter Constants. */
+#define VPC_ELAPSETIME 0x030001
+#define VPC_CPUTIME 0x030002
+
+#define VPC_MEMMAXRES 0x040001
+#define VPC_MEMSHARED 0x040002
+#define VPC_MEMUNSHAREDDATA 0x040003
+#define VPC_MEMUNSHAREDSTACK 0x040004
+
+/* OpenGL ES11 Counters. */
+#define VPC_ES11ACTIVETEXTURE (VPG_ES11 + 1)
+#define VPC_ES11ALPHAFUNC (VPG_ES11 + 2)
+#define VPC_ES11ALPHAFUNCX (VPG_ES11 + 3)
+#define VPC_ES11BINDBUFFER (VPG_ES11 + 4)
+#define VPC_ES11BINDTEXTURE (VPG_ES11 + 5)
+#define VPC_ES11BLENDFUNC (VPG_ES11 + 6)
+#define VPC_ES11BUFFERDATA (VPG_ES11 + 7)
+#define VPC_ES11BUFFERSUBDATA (VPG_ES11 + 8)
+#define VPC_ES11CLEAR (VPG_ES11 + 9)
+#define VPC_ES11CLEARCOLOR (VPG_ES11 + 10)
+#define VPC_ES11CLEARCOLORX (VPG_ES11 + 11)
+#define VPC_ES11CLEARDEPTHF (VPG_ES11 + 12)
+#define VPC_ES11CLEARDEPTHX (VPG_ES11 + 13)
+#define VPC_ES11CLEARSTENCIL (VPG_ES11 + 14)
+#define VPC_ES11CLIENTACTIVETEXTURE (VPG_ES11 + 15)
+#define VPC_ES11CLIPPLANEF (VPG_ES11 + 16)
+#define VPC_ES11CLIPPLANEX (VPG_ES11 + 17)
+#define VPC_ES11COLOR4F (VPG_ES11 + 18)
+#define VPC_ES11COLOR4UB (VPG_ES11 + 19)
+#define VPC_ES11COLOR4X (VPG_ES11 + 20)
+#define VPC_ES11COLORMASK (VPG_ES11 + 21)
+#define VPC_ES11COLORPOINTER (VPG_ES11 + 22)
+#define VPC_ES11COMPRESSEDTEXIMAGE2D (VPG_ES11 + 23)
+#define VPC_ES11COMPRESSEDTEXSUBIMAGE2D (VPG_ES11 + 24)
+#define VPC_ES11COPYTEXIMAGE2D (VPG_ES11 + 25)
+#define VPC_ES11COPYTEXSUBIMAGE2D (VPG_ES11 + 26)
+#define VPC_ES11CULLFACE (VPG_ES11 + 27)
+#define VPC_ES11DELETEBUFFERS (VPG_ES11 + 28)
+#define VPC_ES11DELETETEXTURES (VPG_ES11 + 29)
+#define VPC_ES11DEPTHFUNC (VPG_ES11 + 30)
+#define VPC_ES11DEPTHMASK (VPG_ES11 + 31)
+#define VPC_ES11DEPTHRANGEF (VPG_ES11 + 32)
+#define VPC_ES11DEPTHRANGEX (VPG_ES11 + 33)
+#define VPC_ES11DISABLE (VPG_ES11 + 34)
+#define VPC_ES11DISABLECLIENTSTATE (VPG_ES11 + 35)
+#define VPC_ES11DRAWARRAYS (VPG_ES11 + 36)
+#define VPC_ES11DRAWELEMENTS (VPG_ES11 + 37)
+#define VPC_ES11ENABLE (VPG_ES11 + 38)
+#define VPC_ES11ENABLECLIENTSTATE (VPG_ES11 + 39)
+#define VPC_ES11FINISH (VPG_ES11 + 40)
+#define VPC_ES11FLUSH (VPG_ES11 + 41)
+#define VPC_ES11FOGF (VPG_ES11 + 42)
+#define VPC_ES11FOGFV (VPG_ES11 + 43)
+#define VPC_ES11FOGX (VPG_ES11 + 44)
+#define VPC_ES11FOGXV (VPG_ES11 + 45)
+#define VPC_ES11FRONTFACE (VPG_ES11 + 46)
+#define VPC_ES11FRUSTUMF (VPG_ES11 + 47)
+#define VPC_ES11FRUSTUMX (VPG_ES11 + 48)
+#define VPC_ES11GENBUFFERS (VPG_ES11 + 49)
+#define VPC_ES11GENTEXTURES (VPG_ES11 + 50)
+#define VPC_ES11GETBOOLEANV (VPG_ES11 + 51)
+#define VPC_ES11GETBUFFERPARAMETERIV (VPG_ES11 + 52)
+#define VPC_ES11GETCLIPPLANEF (VPG_ES11 + 53)
+#define VPC_ES11GETCLIPPLANEX (VPG_ES11 + 54)
+#define VPC_ES11GETERROR (VPG_ES11 + 55)
+#define VPC_ES11GETFIXEDV (VPG_ES11 + 56)
+#define VPC_ES11GETFLOATV (VPG_ES11 + 57)
+#define VPC_ES11GETINTEGERV (VPG_ES11 + 58)
+#define VPC_ES11GETLIGHTFV (VPG_ES11 + 59)
+#define VPC_ES11GETLIGHTXV (VPG_ES11 + 60)
+#define VPC_ES11GETMATERIALFV (VPG_ES11 + 61)
+#define VPC_ES11GETMATERIALXV (VPG_ES11 + 62)
+#define VPC_ES11GETPOINTERV (VPG_ES11 + 63)
+#define VPC_ES11GETSTRING (VPG_ES11 + 64)
+#define VPC_ES11GETTEXENVFV (VPG_ES11 + 65)
+#define VPC_ES11GETTEXENVIV (VPG_ES11 + 66)
+#define VPC_ES11GETTEXENVXV (VPG_ES11 + 67)
+#define VPC_ES11GETTEXPARAMETERFV (VPG_ES11 + 68)
+#define VPC_ES11GETTEXPARAMETERIV (VPG_ES11 + 69)
+#define VPC_ES11GETTEXPARAMETERXV (VPG_ES11 + 70)
+#define VPC_ES11HINT (VPG_ES11 + 71)
+#define VPC_ES11ISBUFFER (VPG_ES11 + 72)
+#define VPC_ES11ISENABLED (VPG_ES11 + 73)
+#define VPC_ES11ISTEXTURE (VPG_ES11 + 74)
+#define VPC_ES11LIGHTF (VPG_ES11 + 75)
+#define VPC_ES11LIGHTFV (VPG_ES11 + 76)
+#define VPC_ES11LIGHTMODELF (VPG_ES11 + 77)
+#define VPC_ES11LIGHTMODELFV (VPG_ES11 + 78)
+#define VPC_ES11LIGHTMODELX (VPG_ES11 + 79)
+#define VPC_ES11LIGHTMODELXV (VPG_ES11 + 80)
+#define VPC_ES11LIGHTX (VPG_ES11 + 81)
+#define VPC_ES11LIGHTXV (VPG_ES11 + 82)
+#define VPC_ES11LINEWIDTH (VPG_ES11 + 83)
+#define VPC_ES11LINEWIDTHX (VPG_ES11 + 84)
+#define VPC_ES11LOADIDENTITY (VPG_ES11 + 85)
+#define VPC_ES11LOADMATRIXF (VPG_ES11 + 86)
+#define VPC_ES11LOADMATRIXX (VPG_ES11 + 87)
+#define VPC_ES11LOGICOP (VPG_ES11 + 88)
+#define VPC_ES11MATERIALF (VPG_ES11 + 89)
+#define VPC_ES11MATERIALFV (VPG_ES11 + 90)
+#define VPC_ES11MATERIALX (VPG_ES11 + 91)
+#define VPC_ES11MATERIALXV (VPG_ES11 + 92)
+#define VPC_ES11MATRIXMODE (VPG_ES11 + 93)
+#define VPC_ES11MULTITEXCOORD4F (VPG_ES11 + 94)
+#define VPC_ES11MULTITEXCOORD4X (VPG_ES11 + 95)
+#define VPC_ES11MULTMATRIXF (VPG_ES11 + 96)
+#define VPC_ES11MULTMATRIXX (VPG_ES11 + 97)
+#define VPC_ES11NORMAL3F (VPG_ES11 + 98)
+#define VPC_ES11NORMAL3X (VPG_ES11 + 99)
+#define VPC_ES11NORMALPOINTER (VPG_ES11 + 100)
+#define VPC_ES11ORTHOF (VPG_ES11 + 101)
+#define VPC_ES11ORTHOX (VPG_ES11 + 102)
+#define VPC_ES11PIXELSTOREI (VPG_ES11 + 103)
+#define VPC_ES11POINTPARAMETERF (VPG_ES11 + 104)
+#define VPC_ES11POINTPARAMETERFV (VPG_ES11 + 105)
+#define VPC_ES11POINTPARAMETERX (VPG_ES11 + 106)
+#define VPC_ES11POINTPARAMETERXV (VPG_ES11 + 107)
+#define VPC_ES11POINTSIZE (VPG_ES11 + 108)
+#define VPC_ES11POINTSIZEX (VPG_ES11 + 109)
+#define VPC_ES11POLYGONOFFSET (VPG_ES11 + 110)
+#define VPC_ES11POLYGONOFFSETX (VPG_ES11 + 111)
+#define VPC_ES11POPMATRIX (VPG_ES11 + 112)
+#define VPC_ES11PUSHMATRIX (VPG_ES11 + 113)
+#define VPC_ES11READPIXELS (VPG_ES11 + 114)
+#define VPC_ES11ROTATEF (VPG_ES11 + 115)
+#define VPC_ES11ROTATEX (VPG_ES11 + 116)
+#define VPC_ES11SAMPLECOVERAGE (VPG_ES11 + 117)
+#define VPC_ES11SAMPLECOVERAGEX (VPG_ES11 + 118)
+#define VPC_ES11SCALEF (VPG_ES11 + 119)
+#define VPC_ES11SCALEX (VPG_ES11 + 120)
+#define VPC_ES11SCISSOR (VPG_ES11 + 121)
+#define VPC_ES11SHADEMODEL (VPG_ES11 + 122)
+#define VPC_ES11STENCILFUNC (VPG_ES11 + 123)
+#define VPC_ES11STENCILMASK (VPG_ES11 + 124)
+#define VPC_ES11STENCILOP (VPG_ES11 + 125)
+#define VPC_ES11TEXCOORDPOINTER (VPG_ES11 + 126)
+#define VPC_ES11TEXENVF (VPG_ES11 + 127)
+#define VPC_ES11TEXENVFV (VPG_ES11 + 128)
+#define VPC_ES11TEXENVI (VPG_ES11 + 129)
+#define VPC_ES11TEXENVIV (VPG_ES11 + 130)
+#define VPC_ES11TEXENVX (VPG_ES11 + 131)
+#define VPC_ES11TEXENVXV (VPG_ES11 + 132)
+#define VPC_ES11TEXIMAGE2D (VPG_ES11 + 133)
+#define VPC_ES11TEXPARAMETERF (VPG_ES11 + 134)
+#define VPC_ES11TEXPARAMETERFV (VPG_ES11 + 135)
+#define VPC_ES11TEXPARAMETERI (VPG_ES11 + 136)
+#define VPC_ES11TEXPARAMETERIV (VPG_ES11 + 137)
+#define VPC_ES11TEXPARAMETERX (VPG_ES11 + 138)
+#define VPC_ES11TEXPARAMETERXV (VPG_ES11 + 139)
+#define VPC_ES11TEXSUBIMAGE2D (VPG_ES11 + 140)
+#define VPC_ES11TRANSLATEF (VPG_ES11 + 141)
+#define VPC_ES11TRANSLATEX (VPG_ES11 + 142)
+#define VPC_ES11VERTEXPOINTER (VPG_ES11 + 143)
+#define VPC_ES11VIEWPORT (VPG_ES11 + 144)
+#define VPC_ES11CALLS (VPG_ES11 + 145)
+#define VPC_ES11DRAWCALLS (VPG_ES11 + 146)
+#define VPC_ES11STATECHANGECALLS (VPG_ES11 + 147)
+#define VPC_ES11POINTCOUNT (VPG_ES11 + 148)
+#define VPC_ES11LINECOUNT (VPG_ES11 + 149)
+#define VPC_ES11TRIANGLECOUNT (VPG_ES11 + 150)
+
+/* OpenGLES 2.x */
+#define VPC_ES20ACTIVETEXTURE (VPG_ES20 + 1)
+#define VPC_ES20ATTACHSHADER (VPG_ES20 + 2)
+#define VPC_ES20BINDATTRIBLOCATION (VPG_ES20 + 3)
+#define VPC_ES20BINDBUFFER (VPG_ES20 + 4)
+#define VPC_ES20BINDFRAMEBUFFER (VPG_ES20 + 5)
+#define VPC_ES20BINDRENDERBUFFER (VPG_ES20 + 6)
+#define VPC_ES20BINDTEXTURE (VPG_ES20 + 7)
+#define VPC_ES20BLENDCOLOR (VPG_ES20 + 8)
+#define VPC_ES20BLENDEQUATION (VPG_ES20 + 9)
+#define VPC_ES20BLENDEQUATIONSEPARATE (VPG_ES20 + 10)
+#define VPC_ES20BLENDFUNC (VPG_ES20 + 11)
+#define VPC_ES20BLENDFUNCSEPARATE (VPG_ES20 + 12)
+#define VPC_ES20BUFFERDATA (VPG_ES20 + 13)
+#define VPC_ES20BUFFERSUBDATA (VPG_ES20 + 14)
+#define VPC_ES20CHECKFRAMEBUFFERSTATUS (VPG_ES20 + 15)
+#define VPC_ES20CLEAR (VPG_ES20 + 16)
+#define VPC_ES20CLEARCOLOR (VPG_ES20 + 17)
+#define VPC_ES20CLEARDEPTHF (VPG_ES20 + 18)
+#define VPC_ES20CLEARSTENCIL (VPG_ES20 + 19)
+#define VPC_ES20COLORMASK (VPG_ES20 + 20)
+#define VPC_ES20COMPILESHADER (VPG_ES20 + 21)
+#define VPC_ES20COMPRESSEDTEXIMAGE2D (VPG_ES20 + 22)
+#define VPC_ES20COMPRESSEDTEXSUBIMAGE2D (VPG_ES20 + 23)
+#define VPC_ES20COPYTEXIMAGE2D (VPG_ES20 + 24)
+#define VPC_ES20COPYTEXSUBIMAGE2D (VPG_ES20 + 25)
+#define VPC_ES20CREATEPROGRAM (VPG_ES20 + 26)
+#define VPC_ES20CREATESHADER (VPG_ES20 + 27)
+#define VPC_ES20CULLFACE (VPG_ES20 + 28)
+#define VPC_ES20DELETEBUFFERS (VPG_ES20 + 29)
+#define VPC_ES20DELETEFRAMEBUFFERS (VPG_ES20 + 30)
+#define VPC_ES20DELETEPROGRAM (VPG_ES20 + 31)
+#define VPC_ES20DELETERENDERBUFFERS (VPG_ES20 + 32)
+#define VPC_ES20DELETESHADER (VPG_ES20 + 33)
+#define VPC_ES20DELETETEXTURES (VPG_ES20 + 34)
+#define VPC_ES20DEPTHFUNC (VPG_ES20 + 35)
+#define VPC_ES20DEPTHMASK (VPG_ES20 + 36)
+#define VPC_ES20DEPTHRANGEF (VPG_ES20 + 37)
+#define VPC_ES20DETACHSHADER (VPG_ES20 + 38)
+#define VPC_ES20DISABLE (VPG_ES20 + 39)
+#define VPC_ES20DISABLEVERTEXATTRIBARRAY (VPG_ES20 + 40)
+#define VPC_ES20DRAWARRAYS (VPG_ES20 + 41)
+#define VPC_ES20DRAWELEMENTS (VPG_ES20 + 42)
+#define VPC_ES20ENABLE (VPG_ES20 + 43)
+#define VPC_ES20ENABLEVERTEXATTRIBARRAY (VPG_ES20 + 44)
+#define VPC_ES20FINISH (VPG_ES20 + 45)
+#define VPC_ES20FLUSH (VPG_ES20 + 46)
+#define VPC_ES20FRAMEBUFFERRENDERBUFFER (VPG_ES20 + 47)
+#define VPC_ES20FRAMEBUFFERTEXTURE2D (VPG_ES20 + 48)
+#define VPC_ES20FRONTFACE (VPG_ES20 + 49)
+#define VPC_ES20GENBUFFERS (VPG_ES20 + 50)
+#define VPC_ES20GENERATEMIPMAP (VPG_ES20 + 51)
+#define VPC_ES20GENFRAMEBUFFERS (VPG_ES20 + 52)
+#define VPC_ES20GENRENDERBUFFERS (VPG_ES20 + 53)
+#define VPC_ES20GENTEXTURES (VPG_ES20 + 54)
+#define VPC_ES20GETACTIVEATTRIB (VPG_ES20 + 55)
+#define VPC_ES20GETACTIVEUNIFORM (VPG_ES20 + 56)
+#define VPC_ES20GETATTACHEDSHADERS (VPG_ES20 + 57)
+#define VPC_ES20GETATTRIBLOCATION (VPG_ES20 + 58)
+#define VPC_ES20GETBOOLEANV (VPG_ES20 + 59)
+#define VPC_ES20GETBUFFERPARAMETERIV (VPG_ES20 + 60)
+#define VPC_ES20GETERROR (VPG_ES20 + 61)
+#define VPC_ES20GETFLOATV (VPG_ES20 + 62)
+#define VPC_ES20GETFRAMEBUFFERATTACHMENTPARAMETERIV (VPG_ES20 + 63)
+#define VPC_ES20GETINTEGERV (VPG_ES20 + 64)
+#define VPC_ES20GETPROGRAMIV (VPG_ES20 + 65)
+#define VPC_ES20GETPROGRAMINFOLOG (VPG_ES20 + 66)
+#define VPC_ES20GETRENDERBUFFERPARAMETERIV (VPG_ES20 + 67)
+#define VPC_ES20GETSHADERIV (VPG_ES20 + 68)
+#define VPC_ES20GETSHADERINFOLOG (VPG_ES20 + 69)
+#define VPC_ES20GETSHADERPRECISIONFORMAT (VPG_ES20 + 70)
+#define VPC_ES20GETSHADERSOURCE (VPG_ES20 + 71)
+#define VPC_ES20GETSTRING (VPG_ES20 + 72)
+#define VPC_ES20GETTEXPARAMETERFV (VPG_ES20 + 73)
+#define VPC_ES20GETTEXPARAMETERIV (VPG_ES20 + 74)
+#define VPC_ES20GETUNIFORMFV (VPG_ES20 + 75)
+#define VPC_ES20GETUNIFORMIV (VPG_ES20 + 76)
+#define VPC_ES20GETUNIFORMLOCATION (VPG_ES20 + 77)
+#define VPC_ES20GETVERTEXATTRIBFV (VPG_ES20 + 78)
+#define VPC_ES20GETVERTEXATTRIBIV (VPG_ES20 + 79)
+#define VPC_ES20GETVERTEXATTRIBPOINTERV (VPG_ES20 + 80)
+#define VPC_ES20HINT (VPG_ES20 + 81)
+#define VPC_ES20ISBUFFER (VPG_ES20 + 82)
+#define VPC_ES20ISENABLED (VPG_ES20 + 83)
+#define VPC_ES20ISFRAMEBUFFER (VPG_ES20 + 84)
+#define VPC_ES20ISPROGRAM (VPG_ES20 + 85)
+#define VPC_ES20ISRENDERBUFFER (VPG_ES20 + 86)
+#define VPC_ES20ISSHADER (VPG_ES20 + 87)
+#define VPC_ES20ISTEXTURE (VPG_ES20 + 88)
+#define VPC_ES20LINEWIDTH (VPG_ES20 + 89)
+#define VPC_ES20LINKPROGRAM (VPG_ES20 + 90)
+#define VPC_ES20PIXELSTOREI (VPG_ES20 + 91)
+#define VPC_ES20POLYGONOFFSET (VPG_ES20 + 92)
+#define VPC_ES20READPIXELS (VPG_ES20 + 93)
+#define VPC_ES20RELEASESHADERCOMPILER (VPG_ES20 + 94)
+#define VPC_ES20RENDERBUFFERSTORAGE (VPG_ES20 + 95)
+#define VPC_ES20SAMPLECOVERAGE (VPG_ES20 + 96)
+#define VPC_ES20SCISSOR (VPG_ES20 + 97)
+#define VPC_ES20SHADERBINARY (VPG_ES20 + 98)
+#define VPC_ES20SHADERSOURCE (VPG_ES20 + 99)
+#define VPC_ES20STENCILFUNC (VPG_ES20 + 100)
+#define VPC_ES20STENCILFUNCSEPARATE (VPG_ES20 + 101)
+#define VPC_ES20STENCILMASK (VPG_ES20 + 102)
+#define VPC_ES20STENCILMASKSEPARATE (VPG_ES20 + 103)
+#define VPC_ES20STENCILOP (VPG_ES20 + 104)
+#define VPC_ES20STENCILOPSEPARATE (VPG_ES20 + 105)
+#define VPC_ES20TEXIMAGE2D (VPG_ES20 + 106)
+#define VPC_ES20TEXPARAMETERF (VPG_ES20 + 107)
+#define VPC_ES20TEXPARAMETERFV (VPG_ES20 + 108)
+#define VPC_ES20TEXPARAMETERI (VPG_ES20 + 109)
+#define VPC_ES20TEXPARAMETERIV (VPG_ES20 + 110)
+#define VPC_ES20TEXSUBIMAGE2D (VPG_ES20 + 111)
+#define VPC_ES20UNIFORM1F (VPG_ES20 + 112)
+#define VPC_ES20UNIFORM1FV (VPG_ES20 + 113)
+#define VPC_ES20UNIFORM1I (VPG_ES20 + 114)
+#define VPC_ES20UNIFORM1IV (VPG_ES20 + 115)
+#define VPC_ES20UNIFORM2F (VPG_ES20 + 116)
+#define VPC_ES20UNIFORM2FV (VPG_ES20 + 117)
+#define VPC_ES20UNIFORM2I (VPG_ES20 + 118)
+#define VPC_ES20UNIFORM2IV (VPG_ES20 + 119)
+#define VPC_ES20UNIFORM3F (VPG_ES20 + 120)
+#define VPC_ES20UNIFORM3FV (VPG_ES20 + 121)
+#define VPC_ES20UNIFORM3I (VPG_ES20 + 122)
+#define VPC_ES20UNIFORM3IV (VPG_ES20 + 123)
+#define VPC_ES20UNIFORM4F (VPG_ES20 + 124)
+#define VPC_ES20UNIFORM4FV (VPG_ES20 + 125)
+#define VPC_ES20UNIFORM4I (VPG_ES20 + 126)
+#define VPC_ES20UNIFORM4IV (VPG_ES20 + 127)
+#define VPC_ES20UNIFORMMATRIX2FV (VPG_ES20 + 128)
+#define VPC_ES20UNIFORMMATRIX3FV (VPG_ES20 + 129)
+#define VPC_ES20UNIFORMMATRIX4FV (VPG_ES20 + 130)
+#define VPC_ES20USEPROGRAM (VPG_ES20 + 131)
+#define VPC_ES20VALIDATEPROGRAM (VPG_ES20 + 132)
+#define VPC_ES20VERTEXATTRIB1F (VPG_ES20 + 133)
+#define VPC_ES20VERTEXATTRIB1FV (VPG_ES20 + 134)
+#define VPC_ES20VERTEXATTRIB2F (VPG_ES20 + 135)
+#define VPC_ES20VERTEXATTRIB2FV (VPG_ES20 + 136)
+#define VPC_ES20VERTEXATTRIB3F (VPG_ES20 + 137)
+#define VPC_ES20VERTEXATTRIB3FV (VPG_ES20 + 138)
+#define VPC_ES20VERTEXATTRIB4F (VPG_ES20 + 139)
+#define VPC_ES20VERTEXATTRIB4FV (VPG_ES20 + 140)
+#define VPC_ES20VERTEXATTRIBPOINTER (VPG_ES20 + 141)
+#define VPC_ES20VIEWPORT (VPG_ES20 + 142)
+#define VPC_ES20CALLS (VPG_ES20 + 143)
+#define VPC_ES20DRAWCALLS (VPG_ES20 + 144)
+#define VPC_ES20STATECHANGECALLS (VPG_ES20 + 145)
+#define VPC_ES20POINTCOUNT (VPG_ES20 + 146)
+#define VPC_ES20LINECOUNT (VPG_ES20 + 147)
+#define VPC_ES20TRIANGLECOUNT (VPG_ES20 + 148)
+
+/* VG11 Counters. */
+#define VPC_VG11APPENDPATH (VPG_VG11 + 1)
+#define VPC_VG11APPENDPATHDATA (VPG_VG11 + 2)
+#define VPC_VG11CHILDIMAGE (VPG_VG11 + 3)
+#define VPC_VG11CLEAR (VPG_VG11 + 4)
+#define VPC_VG11CLEARGLYPH (VPG_VG11 + 5)
+#define VPC_VG11CLEARIMAGE (VPG_VG11 + 6)
+#define VPC_VG11CLEARPATH (VPG_VG11 + 7)
+#define VPC_VG11COLORMATRIX (VPG_VG11 + 8)
+#define VPC_VG11CONVOLVE (VPG_VG11 + 9)
+#define VPC_VG11COPYIMAGE (VPG_VG11 + 10)
+#define VPC_VG11COPYMASK (VPG_VG11 + 11)
+#define VPC_VG11COPYPIXELS (VPG_VG11 + 12)
+#define VPC_VG11CREATEFONT (VPG_VG11 + 13)
+#define VPC_VG11CREATEIMAGE (VPG_VG11 + 14)
+#define VPC_VG11CREATEMASKLAYER (VPG_VG11 + 15)
+#define VPC_VG11CREATEPAINT (VPG_VG11 + 16)
+#define VPC_VG11CREATEPATH (VPG_VG11 + 17)
+#define VPC_VG11DESTROYFONT (VPG_VG11 + 18)
+#define VPC_VG11DESTROYIMAGE (VPG_VG11 + 19)
+#define VPC_VG11DESTROYMASKLAYER (VPG_VG11 + 20)
+#define VPC_VG11DESTROYPAINT (VPG_VG11 + 21)
+#define VPC_VG11DESTROYPATH (VPG_VG11 + 22)
+#define VPC_VG11DRAWGLYPH (VPG_VG11 + 23)
+#define VPC_VG11DRAWGLYPHS (VPG_VG11 + 24)
+#define VPC_VG11DRAWIMAGE (VPG_VG11 + 25)
+#define VPC_VG11DRAWPATH (VPG_VG11 + 26)
+#define VPC_VG11FILLMASKLAYER (VPG_VG11 + 27)
+#define VPC_VG11FINISH (VPG_VG11 + 28)
+#define VPC_VG11FLUSH (VPG_VG11 + 29)
+#define VPC_VG11GAUSSIANBLUR (VPG_VG11 + 30)
+#define VPC_VG11GETCOLOR (VPG_VG11 + 31)
+#define VPC_VG11GETERROR (VPG_VG11 + 32)
+#define VPC_VG11GETF (VPG_VG11 + 33)
+#define VPC_VG11GETFV (VPG_VG11 + 34)
+#define VPC_VG11GETI (VPG_VG11 + 35)
+#define VPC_VG11GETIMAGESUBDATA (VPG_VG11 + 36)
+#define VPC_VG11GETIV (VPG_VG11 + 37)
+#define VPC_VG11GETMATRIX (VPG_VG11 + 38)
+#define VPC_VG11GETPAINT (VPG_VG11 + 39)
+#define VPC_VG11GETPARAMETERF (VPG_VG11 + 40)
+#define VPC_VG11GETPARAMETERFV (VPG_VG11 + 41)
+#define VPC_VG11GETPARAMETERI (VPG_VG11 + 42)
+#define VPC_VG11GETPARAMETERIV (VPG_VG11 + 43)
+#define VPC_VG11GETPARAMETERVECTORSIZE (VPG_VG11 + 44)
+#define VPC_VG11GETPARENT (VPG_VG11 + 45)
+#define VPC_VG11GETPATHCAPABILITIES (VPG_VG11 + 46)
+#define VPC_VG11GETPIXELS (VPG_VG11 + 47)
+#define VPC_VG11GETSTRING (VPG_VG11 + 48)
+#define VPC_VG11GETVECTORSIZE (VPG_VG11 + 49)
+#define VPC_VG11HARDWAREQUERY (VPG_VG11 + 50)
+#define VPC_VG11IMAGESUBDATA (VPG_VG11 + 51)
+#define VPC_VG11INTERPOLATEPATH (VPG_VG11 + 52)
+#define VPC_VG11LOADIDENTITY (VPG_VG11 + 53)
+#define VPC_VG11LOADMATRIX (VPG_VG11 + 54)
+#define VPC_VG11LOOKUP (VPG_VG11 + 55)
+#define VPC_VG11LOOKUPSINGLE (VPG_VG11 + 56)
+#define VPC_VG11MASK (VPG_VG11 + 57)
+#define VPC_VG11MODIFYPATHCOORDS (VPG_VG11 + 58)
+#define VPC_VG11MULTMATRIX (VPG_VG11 + 59)
+#define VPC_VG11PAINTPATTERN (VPG_VG11 + 60)
+#define VPC_VG11PATHBOUNDS (VPG_VG11 + 61)
+#define VPC_VG11PATHLENGTH (VPG_VG11 + 62)
+#define VPC_VG11PATHTRANSFORMEDBOUNDS (VPG_VG11 + 63)
+#define VPC_VG11POINTALONGPATH (VPG_VG11 + 64)
+#define VPC_VG11READPIXELS (VPG_VG11 + 65)
+#define VPC_VG11REMOVEPATHCAPABILITIES (VPG_VG11 + 66)
+#define VPC_VG11RENDERTOMASK (VPG_VG11 + 67)
+#define VPC_VG11ROTATE (VPG_VG11 + 68)
+#define VPC_VG11SCALE (VPG_VG11 + 69)
+#define VPC_VG11SEPARABLECONVOLVE (VPG_VG11 + 70)
+#define VPC_VG11SETCOLOR (VPG_VG11 + 71)
+#define VPC_VG11SETF (VPG_VG11 + 72)
+#define VPC_VG11SETFV (VPG_VG11 + 73)
+#define VPC_VG11SETGLYPHTOIMAGE (VPG_VG11 + 74)
+#define VPC_VG11SETGLYPHTOPATH (VPG_VG11 + 75)
+#define VPC_VG11SETI (VPG_VG11 + 76)
+#define VPC_VG11SETIV (VPG_VG11 + 77)
+#define VPC_VG11SETPAINT (VPG_VG11 + 78)
+#define VPC_VG11SETPARAMETERF (VPG_VG11 + 79)
+#define VPC_VG11SETPARAMETERFV (VPG_VG11 + 80)
+#define VPC_VG11SETPARAMETERI (VPG_VG11 + 81)
+#define VPC_VG11SETPARAMETERIV (VPG_VG11 + 82)
+#define VPC_VG11SETPIXELS (VPG_VG11 + 83)
+#define VPC_VG11SHEAR (VPG_VG11 + 84)
+#define VPC_VG11TRANSFORMPATH (VPG_VG11 + 85)
+#define VPC_VG11TRANSLATE (VPG_VG11 + 86)
+#define VPC_VG11WRITEPIXELS (VPG_VG11 + 87)
+#define VPC_VG11CALLS (VPG_VG11 + 88)
+#define VPC_VG11DRAWCALLS (VPG_VG11 + 89)
+#define VPC_VG11STATECHANGECALLS (VPG_VG11 + 90)
+#define VPC_VG11FILLCOUNT (VPG_VG11 + 91)
+#define VPC_VG11STROKECOUNT (VPG_VG11 + 92)
+
+/* HAL Counters. */
+#define VPC_HALVERTBUFNEWBYTEALLOC (VPG_HAL + 1)
+#define VPC_HALVERTBUFTOTALBYTEALLOC (VPG_HAL + 2)
+#define VPC_HALVERTBUFNEWOBJALLOC (VPG_HAL + 3)
+#define VPC_HALVERTBUFTOTALOBJALLOC (VPG_HAL + 4)
+#define VPC_HALINDBUFNEWBYTEALLOC (VPG_HAL + 5)
+#define VPC_HALINDBUFTOTALBYTEALLOC (VPG_HAL + 6)
+#define VPC_HALINDBUFNEWOBJALLOC (VPG_HAL + 7)
+#define VPC_HALINDBUFTOTALOBJALLOC (VPG_HAL + 8)
+#define VPC_HALTEXBUFNEWBYTEALLOC (VPG_HAL + 9)
+#define VPC_HALTEXBUFTOTALBYTEALLOC (VPG_HAL + 10)
+#define VPC_HALTEXBUFNEWOBJALLOC (VPG_HAL + 11)
+#define VPC_HALTEXBUFTOTALOBJALLOC (VPG_HAL + 12)
+
+#define VPC_VG11TRANSLATE (VPG_VG11 + 86)
+#define VPC_VG11WRITEPIXELS (VPG_VG11 + 87)
+#define VPC_VG11CALLS (VPG_VG11 + 88)
+#define VPC_VG11DRAWCALLS (VPG_VG11 + 89)
+#define VPC_VG11STATECHANGECALLS (VPG_VG11 + 90)
+#define VPC_VG11FILLCOUNT (VPG_VG11 + 91)
+#define VPC_VG11STROKECOUNT (VPG_VG11 + 92)
+
+/* HAL Counters. */
+#define VPC_HALVERTBUFNEWBYTEALLOC (VPG_HAL + 1)
+#define VPC_HALVERTBUFTOTALBYTEALLOC (VPG_HAL + 2)
+#define VPC_HALVERTBUFNEWOBJALLOC (VPG_HAL + 3)
+#define VPC_HALVERTBUFTOTALOBJALLOC (VPG_HAL + 4)
+#define VPC_HALINDBUFNEWBYTEALLOC (VPG_HAL + 5)
+#define VPC_HALINDBUFTOTALBYTEALLOC (VPG_HAL + 6)
+#define VPC_HALINDBUFNEWOBJALLOC (VPG_HAL + 7)
+#define VPC_HALINDBUFTOTALOBJALLOC (VPG_HAL + 8)
+#define VPC_HALTEXBUFNEWBYTEALLOC (VPG_HAL + 9)
+#define VPC_HALTEXBUFTOTALBYTEALLOC (VPG_HAL + 10)
+#define VPC_HALTEXBUFNEWOBJALLOC (VPG_HAL + 11)
+#define VPC_HALTEXBUFTOTALOBJALLOC (VPG_HAL + 12)
+
+/* HW: GPU Counters. */
+#define VPC_GPUCYCLES (VPG_GPU + 1)
+#define VPC_GPUREAD64BYTE (VPG_GPU + 2)
+#define VPC_GPUWRITE64BYTE (VPG_GPU + 3)
+
+/* HW: Shader Counters. */
+#define VPC_VSINSTCOUNT (VPG_VS + 1)
+#define VPC_VSBRANCHINSTCOUNT (VPG_VS + 2)
+#define VPC_VSTEXLDINSTCOUNT (VPG_VS + 3)
+#define VPC_VSRENDEREDVERTCOUNT (VPG_VS + 4)
+/* HW: PS Count. */
+#define VPC_PSINSTCOUNT (VPG_PS + 1)
+#define VPC_PSBRANCHINSTCOUNT (VPG_PS + 2)
+#define VPC_PSTEXLDINSTCOUNT (VPG_PS + 3)
+#define VPC_PSRENDEREDPIXCOUNT (VPG_PS + 4)
+
+
+/* HW: PA Counters. */
+#define VPC_PAINVERTCOUNT (VPG_PA + 1)
+#define VPC_PAINPRIMCOUNT (VPG_PA + 2)
+#define VPC_PAOUTPRIMCOUNT (VPG_PA + 3)
+#define VPC_PADEPTHCLIPCOUNT (VPG_PA + 4)
+#define VPC_PATRIVIALREJCOUNT (VPG_PA + 5)
+#define VPC_PACULLCOUNT (VPG_PA + 6)
+
+/* HW: Setup Counters. */
+#define VPC_SETRIANGLECOUNT (VPG_SETUP + 1)
+#define VPC_SELINECOUNT (VPG_SETUP + 2)
+
+/* HW: RA Counters. */
+#define VPC_RAVALIDPIXCOUNT (VPG_RA + 1)
+#define VPC_RATOTALQUADCOUNT (VPG_RA + 2)
+#define VPC_RAVALIDQUADCOUNTEZ (VPG_RA + 3)
+#define VPC_RATOTALPRIMCOUNT (VPG_RA + 4)
+#define VPC_RAPIPECACHEMISSCOUNT (VPG_RA + 5)
+#define VPC_RAPREFCACHEMISSCOUNT (VPG_RA + 6)
+#define VPC_RAEEZCULLCOUNT (VPG_RA + 7)
+
+/* HW: TEX Counters. */
+#define VPC_TXTOTBILINEARREQ (VPG_TX + 1)
+#define VPC_TXTOTTRILINEARREQ (VPG_TX + 2)
+#define VPC_TXTOTDISCARDTEXREQ (VPG_TX + 3)
+#define VPC_TXTOTTEXREQ (VPG_TX + 4)
+#define VPC_TXMEMREADCOUNT (VPG_TX + 5)
+#define VPC_TXMEMREADIN8BCOUNT (VPG_TX + 6)
+#define VPC_TXCACHEMISSCOUNT (VPG_TX + 7)
+#define VPC_TXCACHEHITTEXELCOUNT (VPG_TX + 8)
+#define VPC_TXCACHEMISSTEXELCOUNT (VPG_TX + 9)
+
+/* HW: PE Counters. */
+#define VPC_PEKILLEDBYCOLOR (VPG_PE + 1)
+#define VPC_PEKILLEDBYDEPTH (VPG_PE + 2)
+#define VPC_PEDRAWNBYCOLOR (VPG_PE + 3)
+#define VPC_PEDRAWNBYDEPTH (VPG_PE + 4)
+
+/* HW: MC Counters. */
+#define VPC_MCREADREQ8BPIPE (VPG_MC + 1)
+#define VPC_MCREADREQ8BIP (VPG_MC + 2)
+#define VPC_MCWRITEREQ8BPIPE (VPG_MC + 3)
+
+/* HW: AXI Counters. */
+#define VPC_AXIREADREQSTALLED (VPG_AXI + 1)
+#define VPC_AXIWRITEREQSTALLED (VPG_AXI + 2)
+#define VPC_AXIWRITEDATASTALLED (VPG_AXI + 3)
+
+/* PROGRAM: Shader program counters. */
+#define VPC_PVSINSTRCOUNT (VPG_PVS + 1)
+#define VPC_PVSALUINSTRCOUNT (VPG_PVS + 2)
+#define VPC_PVSTEXINSTRCOUNT (VPG_PVS + 3)
+#define VPC_PVSATTRIBCOUNT (VPG_PVS + 4)
+#define VPC_PVSUNIFORMCOUNT (VPG_PVS + 5)
+#define VPC_PVSFUNCTIONCOUNT (VPG_PVS + 6)
+
+#define VPC_PPSINSTRCOUNT (VPG_PPS + 1)
+#define VPC_PPSALUINSTRCOUNT (VPG_PPS + 2)
+#define VPC_PPSTEXINSTRCOUNT (VPG_PPS + 3)
+#define VPC_PPSATTRIBCOUNT (VPG_PPS + 4)
+#define VPC_PPSUNIFORMCOUNT (VPG_PPS + 5)
+#define VPC_PPSFUNCTIONCOUNT (VPG_PPS + 6)
+
+#endif
+
+
+/* HW profile information. */
+typedef struct _gcsPROFILER_COUNTERS
+{
+ /* HW static counters. */
+ gctUINT32 gpuClock;
+ gctUINT32 axiClock;
+ gctUINT32 shaderClock;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuClockStart;
+ gctUINT32 gpuClockEnd;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuCyclesCounter;
+ gctUINT32 gpuTotalRead64BytesPerFrame;
+ gctUINT32 gpuTotalWrite64BytesPerFrame;
+
+ /* PE */
+ gctUINT32 pe_pixel_count_killed_by_color_pipe;
+ gctUINT32 pe_pixel_count_killed_by_depth_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_color_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_depth_pipe;
+
+ /* SH */
+ gctUINT32 ps_inst_counter;
+ gctUINT32 rendered_pixel_counter;
+ gctUINT32 vs_inst_counter;
+ gctUINT32 rendered_vertice_counter;
+ gctUINT32 vtx_branch_inst_counter;
+ gctUINT32 vtx_texld_inst_counter;
+ gctUINT32 pxl_branch_inst_counter;
+ gctUINT32 pxl_texld_inst_counter;
+
+ /* PA */
+ gctUINT32 pa_input_vtx_counter;
+ gctUINT32 pa_input_prim_counter;
+ gctUINT32 pa_output_prim_counter;
+ gctUINT32 pa_depth_clipped_counter;
+ gctUINT32 pa_trivial_rejected_counter;
+ gctUINT32 pa_culled_counter;
+
+ /* SE */
+ gctUINT32 se_culled_triangle_count;
+ gctUINT32 se_culled_lines_count;
+
+ /* RA */
+ gctUINT32 ra_valid_pixel_count;
+ gctUINT32 ra_total_quad_count;
+ gctUINT32 ra_valid_quad_count_after_early_z;
+ gctUINT32 ra_total_primitive_count;
+ gctUINT32 ra_pipe_cache_miss_counter;
+ gctUINT32 ra_prefetch_cache_miss_counter;
+ gctUINT32 ra_eez_culled_counter;
+
+ /* TX */
+ gctUINT32 tx_total_bilinear_requests;
+ gctUINT32 tx_total_trilinear_requests;
+ gctUINT32 tx_total_discarded_texture_requests;
+ gctUINT32 tx_total_texture_requests;
+ gctUINT32 tx_mem_read_count;
+ gctUINT32 tx_mem_read_in_8B_count;
+ gctUINT32 tx_cache_miss_count;
+ gctUINT32 tx_cache_hit_texel_count;
+ gctUINT32 tx_cache_miss_texel_count;
+
+ /* MC */
+ gctUINT32 mc_total_read_req_8B_from_pipeline;
+ gctUINT32 mc_total_read_req_8B_from_IP;
+ gctUINT32 mc_total_write_req_8B_from_pipeline;
+
+ /* HI */
+ gctUINT32 hi_axi_cycles_read_request_stalled;
+ gctUINT32 hi_axi_cycles_write_request_stalled;
+ gctUINT32 hi_axi_cycles_write_data_stalled;
+}
+gcsPROFILER_COUNTERS;
+
+/* HAL profile information. */
+typedef struct _gcsPROFILER
+{
+ gctUINT32 enable;
+ gctBOOL enableHal;
+ gctBOOL enableHW;
+ gctBOOL enableSH;
+
+ gctBOOL useSocket;
+ gctINT sockFd;
+
+ gctFILE file;
+
+ /* Aggregate Information */
+
+ /* Clock Info */
+ gctUINT64 frameStart;
+ gctUINT64 frameEnd;
+
+ /* Current frame information */
+ gctUINT32 frameNumber;
+ gctUINT64 frameStartTimeusec;
+ gctUINT64 frameEndTimeusec;
+ gctUINT64 frameStartCPUTimeusec;
+ gctUINT64 frameEndCPUTimeusec;
+
+/* #if PROFILE_HAL_COUNTERS */
+ gctUINT32 vertexBufferTotalBytesAlloc;
+ gctUINT32 vertexBufferNewBytesAlloc;
+ int vertexBufferTotalObjectsAlloc;
+ int vertexBufferNewObjectsAlloc;
+
+ gctUINT32 indexBufferTotalBytesAlloc;
+ gctUINT32 indexBufferNewBytesAlloc;
+ int indexBufferTotalObjectsAlloc;
+ int indexBufferNewObjectsAlloc;
+
+ gctUINT32 textureBufferTotalBytesAlloc;
+ gctUINT32 textureBufferNewBytesAlloc;
+ int textureBufferTotalObjectsAlloc;
+ int textureBufferNewObjectsAlloc;
+
+ gctUINT32 numCommits;
+ gctUINT32 drawPointCount;
+ gctUINT32 drawLineCount;
+ gctUINT32 drawTriangleCount;
+ gctUINT32 drawVertexCount;
+ gctUINT32 redundantStateChangeCalls;
+/* #endif */
+}
+gcsPROFILER;
+
+/* Memory profile information. */
+struct _gcsMemProfile
+{
+ /* Memory Usage */
+ gctUINT32 videoMemUsed;
+ gctUINT32 systemMemUsed;
+ gctUINT32 commitBufferSize;
+ gctUINT32 contextBufferCopyBytes;
+};
+
+/* Shader profile information. */
+struct _gcsSHADER_PROFILER
+{
+ gctUINT32 shaderLength;
+ gctUINT32 shaderALUCycles;
+ gctUINT32 shaderTexLoadCycles;
+ gctUINT32 shaderTempRegCount;
+ gctUINT32 shaderSamplerRegCount;
+ gctUINT32 shaderInputRegCount;
+ gctUINT32 shaderOutputRegCount;
+};
+
+/* Initialize the gcsProfiler. */
+gceSTATUS
+gcoPROFILER_Initialize(
+ IN gcoHAL Hal
+ );
+
+/* Destroy the gcProfiler. */
+gceSTATUS
+gcoPROFILER_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Write data to profiler. */
+gceSTATUS
+gcoPROFILER_Write(
+ IN gcoHAL Hal,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Flush data out. */
+gceSTATUS
+gcoPROFILER_Flush(
+ IN gcoHAL Hal
+ );
+
+/* Call to signal end of frame. */
+gceSTATUS
+gcoPROFILER_EndFrame(
+ IN gcoHAL Hal
+ );
+
+/* Increase profile counter Enum by Value. */
+gceSTATUS
+gcoPROFILER_Count(
+ IN gcoHAL Hal,
+ IN gctUINT32 Enum,
+ IN gctINT Value
+ );
+
+/* Profile input vertex shader. */
+gceSTATUS
+gcoPROFILER_ShaderVS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Vs
+ );
+
+/* Profile input fragment shader. */
+gceSTATUS
+gcoPROFILER_ShaderFS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Fs
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_profiler_h_ */
+
diff --git a/src/include_arnova/gc_hal_raster.h b/src/include_arnova/gc_hal_raster.h
new file mode 100644
index 0000000..4f1d374
--- /dev/null
+++ b/src/include_arnova/gc_hal_raster.h
@@ -0,0 +1,842 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_raster_h_
+#define __gc_hal_raster_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoBRUSH * gcoBRUSH;
+typedef struct _gcoBRUSH_CACHE * gcoBRUSH_CACHE;
+
+/******************************************************************************\
+******************************** gcoBRUSH Object *******************************
+\******************************************************************************/
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructSingleColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructMonochrome(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Destroy an gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_Destroy(
+ IN gcoBRUSH Brush
+ );
+
+/******************************************************************************\
+******************************** gcoSURF Object *******************************
+\******************************************************************************/
+
+/* Set cipping rectangle. */
+gceSTATUS
+gcoSURF_SetClipping(
+ IN gcoSURF Surface
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gcoSURF_Clear2D(
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 LoColor,
+ IN gctUINT32 HiColor
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gcoSURF_Line(
+ IN gcoSURF Surface,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop
+ );
+
+/* Generic rectangular blit. */
+gceSTATUS
+gcoSURF_Blit(
+ IN OPTIONAL gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN OPTIONAL gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN OPTIONAL gceSURF_TRANSPARENCY Transparency,
+ IN OPTIONAL gctUINT32 TransparencyColor,
+ IN OPTIONAL gctPOINTER Mask,
+ IN OPTIONAL gceSURF_MONOPACK MaskPack
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gcoSURF_MonoBlit(
+ IN gcoSURF DestSurface,
+ IN gctPOINTER Source,
+ IN gceSURF_MONOPACK SourcePack,
+ IN gcsPOINT_PTR SourceSize,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Filter blit. */
+gceSTATUS
+gcoSURF_FilterBlit(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gcoSURF_EnableAlphaBlend(
+ IN gcoSURF Surface,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gcoSURF_DisableAlphaBlend(
+ IN gcoSURF Surface
+ );
+
+/* Copy a rectangular area with format conversion. */
+gceSTATUS
+gcoSURF_CopyPixels(
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctINT SourceX,
+ IN gctINT SourceY,
+ IN gctINT TargetX,
+ IN gctINT TargetY,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+/* Read surface pixel. */
+gceSTATUS
+gcoSURF_ReadPixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ OUT gctPOINTER PixelValue
+ );
+
+/* Write surface pixel. */
+gceSTATUS
+gcoSURF_WritePixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ IN gctPOINTER PixelValue
+ );
+
+/******************************************************************************\
+********************************** gco2D Object *********************************
+\******************************************************************************/
+
+/* Construct a new gco2D object. */
+gceSTATUS
+gco2D_Construct(
+ IN gcoHAL Hal,
+ OUT gco2D * Hardware
+ );
+
+/* Destroy an gco2D object. */
+gceSTATUS
+gco2D_Destroy(
+ IN gco2D Hardware
+ );
+
+/* Sets the maximum number of brushes in the brush cache. */
+gceSTATUS
+gco2D_SetBrushLimit(
+ IN gco2D Hardware,
+ IN gctUINT MaxCount
+ );
+
+/* Flush the brush. */
+gceSTATUS
+gco2D_FlushBrush(
+ IN gco2D Engine,
+ IN gcoBRUSH Brush,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Program the specified solid color brush. */
+gceSTATUS
+gco2D_LoadSolidBrush(
+ IN gco2D Engine,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask
+ );
+
+/* Configure monochrome source. */
+gceSTATUS
+gco2D_SetMonochromeSource(
+ IN gco2D Engine,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_MONOPACK DataPack,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source extension for full rotation. */
+gceSTATUS
+gco2D_SetColorSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSourceAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative
+ );
+
+/* Configure masked color source. */
+gceSTATUS
+gco2D_SetMaskedSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack
+ );
+
+/* Configure masked color source extension for full rotation. */
+gceSTATUS
+gco2D_SetMaskedSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Setup the source rectangle. */
+gceSTATUS
+gco2D_SetSource(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect
+ );
+
+/* Set clipping rectangle. */
+gceSTATUS
+gco2D_SetClipping(
+ IN gco2D Engine,
+ IN gcsRECT_PTR Rect
+ );
+
+/* Configure destination. */
+gceSTATUS
+gco2D_SetTarget(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth
+ );
+
+/* Configure destination extension for full rotation. */
+gceSTATUS
+gco2D_SetTargetEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Calculate and program the stretch factors. */
+gceSTATUS
+gco2D_SetStretchFactors(
+ IN gco2D Engine,
+ IN gctUINT32 HorFactor,
+ IN gctUINT32 VerFactor
+ );
+
+/* Calculate and program the stretch factors based on the rectangles. */
+gceSTATUS
+gco2D_SetStretchRectFactors(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect
+ );
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructSingleColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructMonochromeBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gco2D_Clear(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gco2D_Line(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines based on the 32-bit color. */
+gceSTATUS
+gco2D_ColorLine(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Generic blit. */
+gceSTATUS
+gco2D_Blit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Batch blit. */
+gceSTATUS
+gco2D_BatchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Stretch blit. */
+gceSTATUS
+gco2D_StretchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gco2D_MonoBlit(
+ IN gco2D Engine,
+ IN gctPOINTER StreamBits,
+ IN gcsPOINT_PTR StreamSize,
+ IN gcsRECT_PTR StreamRect,
+ IN gceSURF_MONOPACK SrcStreamPack,
+ IN gceSURF_MONOPACK DestStreamPack,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 FgRop,
+ IN gctUINT32 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Set kernel size. */
+gceSTATUS
+gco2D_SetKernelSize(
+ IN gco2D Engine,
+ IN gctUINT8 HorKernelSize,
+ IN gctUINT8 VerKernelSize
+ );
+
+/* Set filter type. */
+gceSTATUS
+gco2D_SetFilterType(
+ IN gco2D Engine,
+ IN gceFILTER_TYPE FilterType
+ );
+
+/* Set the filter kernel by user. */
+gceSTATUS
+gco2D_SetUserFilterKernel(
+ IN gco2D Engine,
+ IN gceFILTER_PASS_TYPE PassType,
+ IN gctUINT16_PTR KernelArray
+ );
+
+/* Select the pass(es) to be done for user defined filter. */
+gceSTATUS
+gco2D_EnableUserFilterPasses(
+ IN gco2D Engine,
+ IN gctBOOL HorPass,
+ IN gctBOOL VerPass
+ );
+
+/* Frees the temporary buffer allocated by filter blit operation. */
+gceSTATUS
+gco2D_FreeFilterBuffer(
+ IN gco2D Engine
+ );
+
+/* Filter blit. */
+gceSTATUS
+gco2D_FilterBlit(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Filter blit extension for full rotation. */
+gceSTATUS
+gco2D_FilterBlitEx(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gctUINT32 SrcSurfaceHeight,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gctUINT32 DestSurfaceHeight,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+gceSTATUS
+gco2D_FilterBlitEx2(
+ IN gco2D Engine,
+ IN gctUINT32_PTR SrcAddresses,
+ IN gctUINT32 SrcAddressNum,
+ IN gctUINT32_PTR SrcStrides,
+ IN gctUINT32 SrcStrideNum,
+ IN gceTILING SrcTiling,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gctUINT32 SrcSurfaceHeight,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32_PTR DestAddresses,
+ IN gctUINT32 DestAddressNum,
+ IN gctUINT32_PTR DestStrides,
+ IN gctUINT32 DestStrideNum,
+ IN gceTILING DestTiling,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gctUINT32 DestSurfaceHeight,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gco2D_EnableAlphaBlend(
+ IN gco2D Engine,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Enable alpha blending engine in the hardware. */
+gceSTATUS
+gco2D_EnableAlphaBlendAdvanced(
+ IN gco2D Engine,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode
+ );
+
+/* Enable alpha blending engine with Porter Duff rule. */
+gceSTATUS
+gco2D_SetPorterDuffBlending(
+ IN gco2D Engine,
+ IN gce2D_PORTER_DUFF_RULE Rule
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gco2D_DisableAlphaBlend(
+ IN gco2D Engine
+ );
+
+/* Retrieve the maximum number of 32-bit data chunks for a single DE command. */
+gctUINT32
+gco2D_GetMaximumDataCount(
+ void
+ );
+
+/* Retrieve the maximum number of rectangles, that can be passed in a single DE command. */
+gctUINT32
+gco2D_GetMaximumRectCount(
+ void
+ );
+
+/* Returns the pixel alignment of the surface. */
+gceSTATUS
+gco2D_GetPixelAlignment(
+ gceSURF_FORMAT Format,
+ gcsPOINT_PTR Alignment
+ );
+
+/* Retrieve monochrome stream pack size. */
+gceSTATUS
+gco2D_GetPackSize(
+ IN gceSURF_MONOPACK StreamPack,
+ OUT gctUINT32 * PackWidth,
+ OUT gctUINT32 * PackHeight
+ );
+
+/* Flush the 2D pipeline. */
+gceSTATUS
+gco2D_Flush(
+ IN gco2D Engine
+ );
+
+/* Load 256-entry color table for INDEX8 source surfaces. */
+gceSTATUS
+gco2D_LoadPalette(
+ IN gco2D Engine,
+ IN gctUINT FirstIndex,
+ IN gctUINT IndexCount,
+ IN gctPOINTER ColorTable,
+ IN gctBOOL ColorConvert
+ );
+
+/* Enable/disable 2D BitBlt mirrorring. */
+gceSTATUS
+gco2D_SetBitBlitMirror(
+ IN gco2D Engine,
+ IN gctBOOL HorizontalMirror,
+ IN gctBOOL VerticalMirror
+ );
+
+/* Set the transparency for source, destination and pattern. */
+gceSTATUS
+gco2D_SetTransparencyAdvanced(
+ IN gco2D Engine,
+ IN gce2D_TRANSPARENCY SrcTransparency,
+ IN gce2D_TRANSPARENCY DstTransparency,
+ IN gce2D_TRANSPARENCY PatTransparency
+ );
+
+/* Set the source color key. */
+gceSTATUS
+gco2D_SetSourceColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the source color key range. */
+gceSTATUS
+gco2D_SetSourceColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the target color key. */
+gceSTATUS
+gco2D_SetTargetColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the target color key range. */
+gceSTATUS
+gco2D_SetTargetColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the YUV color space mode. */
+gceSTATUS
+gco2D_SetYUVColorMode(
+ IN gco2D Engine,
+ IN gce2D_YUV_COLOR_MODE Mode
+ );
+
+/* Setup the source global color value in ARGB8 format. */
+gceSTATUS gco2D_SetSourceGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the target global color value in ARGB8 format. */
+gceSTATUS gco2D_SetTargetGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the source and target pixel multiply modes. */
+gceSTATUS
+gco2D_SetPixelMultiplyModeAdvanced(
+ IN gco2D Engine,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE SrcPremultiplySrcAlpha,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstPremultiplyDstAlpha,
+ IN gce2D_GLOBAL_COLOR_MULTIPLY_MODE SrcPremultiplyGlobalMode,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstDemultiplyDstAlpha
+ );
+
+/* Set the GPU clock cycles after which the idle engine will keep auto-flushing. */
+gceSTATUS
+gco2D_SetAutoFlushCycles(
+ IN gco2D Engine,
+ IN gctUINT32 Cycles
+ );
+
+/* Read the profile registers available in the 2D engine and sets them in the profile.
+ The function will also reset the pixelsRendered counter every time.
+*/
+gceSTATUS
+gco2D_ProfileEngine(
+ IN gco2D Engine,
+ OPTIONAL gcs2D_PROFILE_PTR Profile
+ );
+
+/* Enable or disable 2D dithering. */
+gceSTATUS
+gco2D_EnableDither(
+ IN gco2D Engine,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gco2D_SetGenericSource(
+ IN gco2D Engine,
+ IN gctUINT32_PTR Addresses,
+ IN gctUINT32 AddressNum,
+ IN gctUINT32_PTR Strides,
+ IN gctUINT32 StrideNum,
+ IN gceTILING Tiling,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+);
+
+gceSTATUS
+gco2D_SetGenericTarget(
+ IN gco2D Engine,
+ IN gctUINT32_PTR Addresses,
+ IN gctUINT32 AddressNum,
+ IN gctUINT32_PTR Strides,
+ IN gctUINT32 StrideNum,
+ IN gceTILING Tiling,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_raster_h_ */
+
diff --git a/src/include_arnova/gc_hal_types.h b/src/include_arnova/gc_hal_types.h
new file mode 100644
index 0000000..b66595e
--- /dev/null
+++ b/src/include_arnova/gc_hal_types.h
@@ -0,0 +1,545 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_types_h_
+#define __gc_hal_types_h_
+
+#include "gc_hal_options.h"
+
+#ifdef _WIN32
+#pragma warning(disable:4127) /* Conditional expression is constant (do { }
+ ** while(0)). */
+#pragma warning(disable:4100) /* Unreferenced formal parameter. */
+#pragma warning(disable:4204) /* Non-constant aggregate initializer (C99). */
+#pragma warning(disable:4131) /* Uses old-style declarator (for Bison and
+ ** Flex generated files). */
+#pragma warning(disable:4206) /* Translation unit is empty. */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+** Platform macros.
+*/
+
+#if defined(__GNUC__)
+# define gcdHAS_ELLIPSES 1 /* GCC always has it. */
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+# define gcdHAS_ELLIPSES 1 /* C99 has it. */
+#elif defined(_MSC_VER) && (_MSC_VER >= 1500)
+# define gcdHAS_ELLIPSES 1 /* MSVC 2007+ has it. */
+#elif defined(UNDER_CE)
+# define gcdHAS_ELLIPSES 0 /* Windows CE doesn't have it. */
+#else
+# error "gcdHAS_ELLIPSES: Platform could not be determined"
+#endif
+
+/******************************************************************************\
+************************************ Keyword ***********************************
+\******************************************************************************/
+
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
+# define gcmINLINE inline /* C99 keyword. */
+#elif defined(__GNUC__)
+# define gcmINLINE __inline__ /* GNU keyword. */
+#elif defined(_MSC_VER) || defined(UNDER_CE)
+# define gcmINLINE __inline /* Internal keyword. */
+#else
+# error "gcmINLINE: Platform could not be determined"
+#endif
+
+#ifndef gcdDEBUG
+# if (defined(DBG) && DBG) || defined(DEBUG) || defined(_DEBUG)
+# define gcdDEBUG 1
+# else
+# define gcdDEBUG 0
+# endif
+#endif
+
+#ifdef _USRDLL
+# ifdef _MSC_VER
+# ifdef HAL_EXPORTS
+# define HALAPI __declspec(dllexport)
+# else
+# define HALAPI __declspec(dllimport)
+# endif
+# define HALDECL __cdecl
+# else
+# ifdef HAL_EXPORTS
+# define HALAPI
+# else
+# define HALAPI extern
+# endif
+# endif
+#else
+# define HALAPI
+# define HALDECL
+#endif
+
+/******************************************************************************\
+********************************** Common Types ********************************
+\******************************************************************************/
+
+#define gcvFALSE 0
+#define gcvTRUE 1
+
+#define gcvINFINITE ((gctUINT32) ~0U)
+
+typedef int gctBOOL;
+typedef gctBOOL * gctBOOL_PTR;
+
+typedef int gctINT;
+typedef signed char gctINT8;
+typedef signed short gctINT16;
+typedef signed int gctINT32;
+typedef signed long long gctINT64;
+
+typedef gctINT * gctINT_PTR;
+typedef gctINT8 * gctINT8_PTR;
+typedef gctINT16 * gctINT16_PTR;
+typedef gctINT32 * gctINT32_PTR;
+typedef gctINT64 * gctINT64_PTR;
+
+typedef unsigned int gctUINT;
+typedef unsigned char gctUINT8;
+typedef unsigned short gctUINT16;
+typedef unsigned int gctUINT32;
+typedef unsigned long long gctUINT64;
+
+typedef gctUINT * gctUINT_PTR;
+typedef gctUINT8 * gctUINT8_PTR;
+typedef gctUINT16 * gctUINT16_PTR;
+typedef gctUINT32 * gctUINT32_PTR;
+typedef gctUINT64 * gctUINT64_PTR;
+
+typedef unsigned long gctSIZE_T;
+typedef gctSIZE_T * gctSIZE_T_PTR;
+
+#ifdef __cplusplus
+# define gcvNULL 0
+#else
+# define gcvNULL ((void *) 0)
+#endif
+
+typedef float gctFLOAT;
+typedef signed int gctFIXED_POINT;
+typedef float * gctFLOAT_PTR;
+
+typedef void * gctPHYS_ADDR;
+typedef void * gctHANDLE;
+typedef void * gctFILE;
+typedef void * gctSIGNAL;
+typedef void * gctWINDOW;
+typedef void * gctIMAGE;
+
+typedef void * gctPOINTER;
+typedef const void * gctCONST_POINTER;
+
+typedef char gctCHAR;
+typedef char * gctSTRING;
+typedef const char * gctCONST_STRING;
+
+typedef struct _gcsCOUNT_STRING
+{
+ gctSIZE_T Length;
+ gctCONST_STRING String;
+}
+gcsCOUNT_STRING;
+
+/* Fixed point constants. */
+#define gcvZERO_X ((gctFIXED_POINT) 0x00000000)
+#define gcvHALF_X ((gctFIXED_POINT) 0x00008000)
+#define gcvONE_X ((gctFIXED_POINT) 0x00010000)
+#define gcvNEGONE_X ((gctFIXED_POINT) 0xFFFF0000)
+#define gcvTWO_X ((gctFIXED_POINT) 0x00020000)
+
+/******************************************************************************\
+******************************* Fixed Point Math *******************************
+\******************************************************************************/
+
+#define gcmXMultiply(x1, x2) \
+ (gctFIXED_POINT) (((gctINT64) (x1) * (x2)) >> 16)
+
+#define gcmXDivide(x1, x2) \
+ (gctFIXED_POINT) ((((gctINT64) (x1)) << 16) / (x2))
+
+#define gcmXMultiplyDivide(x1, x2, x3) \
+ (gctFIXED_POINT) ((gctINT64) (x1) * (x2) / (x3))
+
+/* 2D Engine profile. */
+struct gcs2D_PROFILE
+{
+ /* Cycle count.
+ 32bit counter incremented every 2D clock cycle.
+ Wraps back to 0 when the counter overflows.
+ */
+ gctUINT32 cycleCount;
+
+ /* Pixels rendered by the 2D engine.
+ Resets to 0 every time it is read. */
+ gctUINT32 pixelsRendered;
+};
+
+
+/* Macro to combine four characters into a Charcater Code. */
+#define gcmCC(c1, c2, c3, c4) \
+( \
+ (char) (c1) \
+ | \
+ ((char) (c2) << 8) \
+ | \
+ ((char) (c3) << 16) \
+ | \
+ ((char) (c4) << 24) \
+)
+
+#define gcmPRINTABLE(c) ((((c) >= ' ') && ((c) <= '}')) ? (c) : ' ')
+
+#define gcmCC_PRINT(cc) \
+ gcmPRINTABLE((char) ( (cc) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 8) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 16) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 24) & 0xFF))
+
+/******************************************************************************\
+****************************** Function Parameters *****************************
+\******************************************************************************/
+
+#define IN
+#define OUT
+#define OPTIONAL
+
+/******************************************************************************\
+********************************* Status Codes *********************************
+\******************************************************************************/
+
+typedef enum _gceSTATUS
+{
+ gcvSTATUS_OK = 0,
+ gcvSTATUS_FALSE = 0,
+ gcvSTATUS_TRUE = 1,
+ gcvSTATUS_NO_MORE_DATA = 2,
+ gcvSTATUS_CACHED = 3,
+ gcvSTATUS_MIPMAP_TOO_LARGE = 4,
+ gcvSTATUS_NAME_NOT_FOUND = 5,
+ gcvSTATUS_NOT_OUR_INTERRUPT = 6,
+ gcvSTATUS_MISMATCH = 7,
+ gcvSTATUS_MIPMAP_TOO_SMALL = 8,
+ gcvSTATUS_LARGER = 9,
+ gcvSTATUS_SMALLER = 10,
+ gcvSTATUS_CHIP_NOT_READY = 11,
+ gcvSTATUS_NEED_CONVERSION = 12,
+ gcvSTATUS_SKIP = 13,
+ gcvSTATUS_DATA_TOO_LARGE = 14,
+ gcvSTATUS_INVALID_CONFIG = 15,
+ gcvSTATUS_CHANGED = 16,
+ gcvSTATUS_NOT_SUPPORT_DITHER = 17,
+
+ gcvSTATUS_INVALID_ARGUMENT = -1,
+ gcvSTATUS_INVALID_OBJECT = -2,
+ gcvSTATUS_OUT_OF_MEMORY = -3,
+ gcvSTATUS_MEMORY_LOCKED = -4,
+ gcvSTATUS_MEMORY_UNLOCKED = -5,
+ gcvSTATUS_HEAP_CORRUPTED = -6,
+ gcvSTATUS_GENERIC_IO = -7,
+ gcvSTATUS_INVALID_ADDRESS = -8,
+ gcvSTATUS_CONTEXT_LOSSED = -9,
+ gcvSTATUS_TOO_COMPLEX = -10,
+ gcvSTATUS_BUFFER_TOO_SMALL = -11,
+ gcvSTATUS_INTERFACE_ERROR = -12,
+ gcvSTATUS_NOT_SUPPORTED = -13,
+ gcvSTATUS_MORE_DATA = -14,
+ gcvSTATUS_TIMEOUT = -15,
+ gcvSTATUS_OUT_OF_RESOURCES = -16,
+ gcvSTATUS_INVALID_DATA = -17,
+ gcvSTATUS_INVALID_MIPMAP = -18,
+ gcvSTATUS_NOT_FOUND = -19,
+ gcvSTATUS_NOT_ALIGNED = -20,
+ gcvSTATUS_INVALID_REQUEST = -21,
+ gcvSTATUS_GPU_NOT_RESPONDING = -22,
+
+ /* Linker errors. */
+ gcvSTATUS_GLOBAL_TYPE_MISMATCH = -1000,
+ gcvSTATUS_TOO_MANY_ATTRIBUTES = -1001,
+ gcvSTATUS_TOO_MANY_UNIFORMS = -1002,
+ gcvSTATUS_TOO_MANY_VARYINGS = -1003,
+ gcvSTATUS_UNDECLARED_VARYING = -1004,
+ gcvSTATUS_VARYING_TYPE_MISMATCH = -1005,
+ gcvSTATUS_MISSING_MAIN = -1006,
+ gcvSTATUS_NAME_MISMATCH = -1007,
+ gcvSTATUS_INVALID_INDEX = -1008,
+}
+gceSTATUS;
+
+/******************************************************************************\
+********************************* Status Macros ********************************
+\******************************************************************************/
+
+#define gcmIS_ERROR(status) (status < 0)
+#define gcmNO_ERROR(status) (status >= 0)
+#define gcmIS_SUCCESS(status) (status == gcvSTATUS_OK)
+
+/******************************************************************************\
+********************************* Field Macros *********************************
+\******************************************************************************/
+
+#define __gcmSTART(reg_field) \
+ (0 ? reg_field)
+
+#define __gcmEND(reg_field) \
+ (1 ? reg_field)
+
+#define __gcmGETSIZE(reg_field) \
+ (__gcmEND(reg_field) - __gcmSTART(reg_field) + 1)
+
+#define __gcmALIGN(data, reg_field) \
+ (((gctUINT32) (data)) << __gcmSTART(reg_field))
+
+#define __gcmMASK(reg_field) \
+ ((gctUINT32) ((__gcmGETSIZE(reg_field) == 32) \
+ ? ~0 \
+ : (~(~0 << __gcmGETSIZE(reg_field)))))
+
+/*******************************************************************************
+**
+** gcmFIELDMASK
+**
+** Get aligned field mask.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmFIELDMASK(reg, field) \
+( \
+ __gcmALIGN(__gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmGETFIELD
+**
+** Extract the value of a field from specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmGETFIELD(data, reg, field) \
+( \
+ ((((gctUINT32) (data)) >> __gcmSTART(reg##_##field)) \
+ & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELD
+**
+** Set the value of a field within specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETFIELD(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN((gctUINT32) (value) \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELDVALUE
+**
+** Set the value of a field within specified data with a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmSETFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN(reg##_##field##_##value \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmSETMASKEDFIELD
+**
+** Set the value of a masked field with specified data.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETMASKEDFIELD(reg, field, value) \
+( \
+ ((((gctUINT32) (~0)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? reg_field) - (0 ? reg_field) + 1) == 32) ? ~0 : (~(~0 << ((1 ? reg_field) - (0 ? reg_field) + 1))))))) << (0 ? reg_field))) | (((gctUINT32) ((gctUINT32) (value) & ((gctUINT32) ((((1 ? reg_field) - (0 ? reg_field) + 1) == 32) ? ~0 : (~(~0 << ((1 ? reg_field) - (0 ? reg_field) + 1))))))) << (0 ? reg_field)))&\
+ ((((gctUINT32) (~0)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? reg_MASK_##field) - (0 ? reg_MASK_##field) + 1) == 32) ? ~0 : (~(~0 << ((1 ? reg_MASK_##field) - (0 ? reg_MASK_##field) + 1))))))) << (0 ? reg_MASK_##field))) | (((gctUINT32) (reg_MASK_##field_ENABLED&((gctUINT32)((((1?reg_MASK_##field)-(0?reg_MASK_##field)+1)==32)?~0:(~(~0<<((1?reg_MASK_##field)-(0?reg_MASK_##field)+1)))))))<<(0?reg_MASK_##field)))\
+)
+
+/*******************************************************************************
+**
+** gcmVERIFYFIELDVALUE
+**
+** Verify if the value of a field within specified data equals a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmVERIFYFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) >> __gcmSTART(reg##_##field) & \
+ __gcmMASK(reg##_##field)) \
+ == \
+ (reg##_##field##_##value & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+** Bit field macros.
+*/
+
+#define __gcmSTARTBIT(Field) \
+ ( 1 ? Field )
+
+#define __gcmBITSIZE(Field) \
+ ( 0 ? Field )
+
+#define __gcmBITMASK(Field) \
+( \
+ (1 << __gcmBITSIZE(Field)) - 1 \
+)
+
+#define gcmGETBITS(Value, Type, Field) \
+( \
+ ( ((Type) (Value)) >> __gcmSTARTBIT(Field) ) \
+ & \
+ __gcmBITMASK(Field) \
+)
+
+#define gcmSETBITS(Value, Type, Field, NewValue) \
+( \
+ ( ((Type) (Value)) \
+ & ~(__gcmBITMASK(Field) << __gcmSTARTBIT(Field)) \
+ ) \
+ | \
+ ( ( ((Type) (NewValue)) \
+ & __gcmBITMASK(Field) \
+ ) << __gcmSTARTBIT(Field) \
+ ) \
+)
+
+/******************************************************************************\
+******************************** Min/Max Macros ********************************
+\******************************************************************************/
+
+#define gcmMIN(x, y) (((x) <= (y)) ? (x) : (y))
+#define gcmMAX(x, y) (((x) >= (y)) ? (x) : (y))
+#define gcmCLAMP(x, min, max) (((x) < (min)) ? (min) : \
+ ((x) > (max)) ? (max) : (x))
+#define gcmABS(x) (((x) < 0) ? -(x) : (x))
+#define gcmNEG(x) (((x) < 0) ? (x) : -(x))
+
+/*******************************************************************************
+**
+** gcmPTR2INT
+**
+** Convert a pointer to an integer value.
+**
+** ARGUMENTS:
+**
+** p Pointer value.
+*/
+#if defined(_WIN32) || (defined(__LP64__) && __LP64__)
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (gctUINT64) (p) \
+ )
+#else
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (p) \
+ )
+#endif
+
+/*******************************************************************************
+**
+** gcmINT2PTR
+**
+** Convert an integer value into a pointer.
+**
+** ARGUMENTS:
+**
+** v Integer value.
+*/
+#define gcmINT2PTR(i) \
+( \
+ (gctPOINTER) (i) \
+)
+
+/*******************************************************************************
+**
+** gcmOFFSETOF
+**
+** Compute the byte offset of a field inside a structure.
+**
+** ARGUMENTS:
+**
+** s Structure name.
+** field Field name.
+*/
+#define gcmOFFSETOF(s, field) \
+( \
+ gcmPTR2INT(& (((struct s *) 0)->field)) \
+)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_types_h_ */
+
diff --git a/src/include_arnova/gc_hal_user_context.h b/src/include_arnova/gc_hal_user_context.h
new file mode 100644
index 0000000..abc1481
--- /dev/null
+++ b/src/include_arnova/gc_hal_user_context.h
@@ -0,0 +1,170 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_user_context_h_
+#define __gc_hal_user_context_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* gcoCONTEXT structure that hold the current context. */
+struct _gcoCONTEXT
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gcoOS object. */
+ gcoOS os;
+
+ /* Pointer to gcoHARDWARE object. */
+ gcoHARDWARE hardware;
+
+ /* Context ID. */
+ gctUINT64 id;
+
+ /* State mapping. */
+ gctUINT32_PTR map;
+ gctSIZE_T stateCount;
+
+ /* State hinting. */
+ gctUINT8_PTR hint;
+ gctUINT8 hintValue;
+ gctSIZE_T hintCount;
+
+ /* Context buffer. */
+ gctUINT32_PTR buffer;
+ gctUINT32 pipe3DIndex;
+ gctUINT32 pipe2DIndex;
+ gctUINT32 linkIndex;
+ gctUINT32 inUseIndex;
+ gctSIZE_T bufferSize;
+
+ /* Context buffer used for commitment. */
+ gctSIZE_T bytes;
+ gctPHYS_ADDR physical;
+ gctPOINTER logical;
+
+ /* Pointer to final LINK command. */
+ gctPOINTER link;
+
+ /* Requested pipe select for context. */
+ gctUINT32 initialPipe;
+ gctUINT32 entryPipe;
+ gctUINT32 currentPipe;
+
+ /* Flag to specify whether PostCommit needs to be called. */
+ gctBOOL postCommit;
+
+ /* Busy flag. */
+ volatile gctBOOL * inUse;
+
+ /* Variables used for building state buffer. */
+ gctUINT32 lastAddress;
+ gctSIZE_T lastSize;
+ gctUINT32 lastIndex;
+ gctBOOL lastFixed;
+
+ /* Hint array. */
+ gctUINT32_PTR hintArray;
+ gctUINT32_PTR hintIndex;
+};
+
+struct _gcoCMDBUF
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to gcoOS object. */
+ gcoOS os;
+
+ /* Pointer to gcoHARDWARE object. */
+ gcoHARDWARE hardware;
+
+ /* Physical address of command buffer. */
+ gctPHYS_ADDR physical;
+
+ /* Logical address of command buffer. */
+ gctPOINTER logical;
+
+ /* Number of bytes in command buffer. */
+ gctSIZE_T bytes;
+
+ /* Start offset into the command buffer. */
+ gctUINT32 startOffset;
+
+ /* Current offset into the command buffer. */
+ gctUINT32 offset;
+
+ /* Number of free bytes in command buffer. */
+ gctSIZE_T free;
+
+#if gcdSECURE_USER
+ /* Table of offsets that define the physical addresses to be mapped. */
+ gctUINT32_PTR hintTable;
+
+ /* Current index into map table. */
+ gctUINT32_PTR hintIndex;
+
+ /* Commit index for map table. */
+ gctUINT32_PTR hintCommit;
+#endif
+};
+
+typedef struct _gcsQUEUE * gcsQUEUE_PTR;
+
+typedef struct _gcsQUEUE
+{
+ /* Pointer to next gcsQUEUE structure. */
+ gcsQUEUE_PTR next;
+
+#ifdef __QNXNTO__
+ /* Size of this object. */
+ gctSIZE_T bytes;
+#endif
+
+ /* Event information. */
+ gcsHAL_INTERFACE iface;
+}
+gcsQUEUE;
+
+/* Event queue. */
+struct _gcoQUEUE
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to gcoOS object. */
+ gcoOS os;
+
+ /* Pointer to current event queue. */
+ gcsQUEUE_PTR head;
+ gcsQUEUE_PTR tail;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_user_context_h_ */
+
diff --git a/src/include_dove/gc_abi.h b/src/include_dove/gc_abi.h
new file mode 100644
index 0000000..6736a82
--- /dev/null
+++ b/src/include_dove/gc_abi.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/** Kernel ABI definition file for Etna **/
+#ifndef H_GCABI
+#define H_GCABI
+#define GCABI_USER_SIGNAL_HAS_TYPE
+//#define GCABI_CONTEXT_HAS_PHYSICAL
+//#define GCABI_HAS_MINOR_FEATURES_2
+//#define GCABI_HAS_MINOR_FEATURES_3
+
+// One of these must be set:
+#define GCABI_HAS_CONTEXT
+//#define GCABI_HAS_STATE_DELTAS
+
+/* IOCTL structure for userspace driver*/
+typedef struct
+{
+ void *in_buf;
+ unsigned int in_buf_size;
+ void *out_buf;
+ unsigned int out_buf_size;
+} vivante_ioctl_data_t;
+
+#define _gcs2D_PROFILE gcs2D_PROFILE
+
+#include "gc_hal_base.h"
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_user_context.h"
+#include "gc_hal_types.h"
+
+#endif
+
diff --git a/src/include_dove/gc_hal.h b/src/include_dove/gc_hal.h
new file mode 100644
index 0000000..e9ce46f
--- /dev/null
+++ b/src/include_dove/gc_hal.h
@@ -0,0 +1,2071 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_h_
+#define __gc_hal_h_
+
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+#include "gc_hal_base.h"
+#include "gc_hal_profiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* the number of profiling nodes */
+#define NUM_PROFILE_NODES 100
+
+/* temporarily place gralloc defination here, should be moved to android header file later */
+#define GRALLOC_USAGE_GLES20_RENDER 0x10000000
+
+/* BSP idle profile Macros */
+#if ENABLE_BSP_IDLE_PROFILE
+/*
+dev_id: 1 vpu 0 gpu
+State: 1 run 0 idle
+Start: 2 init 1 start 0 stop
+*/
+#define BSP_IDLE_PROFILE(dev_id,state,start) \
+do { \
+ if(1) \
+ gcmkPRINT("--->%s\t\tstart_profile(0,%d,%d)\t%s\n", \
+ __FUNCTION__,state,start,(start==1)?(state?"busy-time":"\tidle-time"):"init"); \
+ start_profile(dev_id,state,start); \
+} while(0);
+#define BSP_IDLE_PROFILE_INIT BSP_IDLE_PROFILE(0, 0, 2)
+#define BSP_IDLE_PROFILE_CALC_BUSY_TIME BSP_IDLE_PROFILE(0, 1, 1)
+#define BSP_IDLE_PROFILE_CALC_IDLE_TIME BSP_IDLE_PROFILE(0, 0, 1)
+#else /* Disable bsp_idle_profile or OTHER PLATFORMs */
+#define BSP_IDLE_PROFILE_INIT
+#define BSP_IDLE_PROFILE_CALC_BUSY_TIME
+#define BSP_IDLE_PROFILE_CALC_IDLE_TIME
+#endif
+
+/******************************************************************************\
+******************************* Alignment Macros *******************************
+\******************************************************************************/
+#define GC_NOP_COMMAND 0x18000000
+
+#define gcmALIGN(n, align) \
+( \
+ ((n) + ((align) - 1)) & ~((align) - 1) \
+)
+
+/******************************************************************************\
+***************************** Element Count Macro *****************************
+\******************************************************************************/
+
+#define gcmSIZEOF(a) \
+( \
+ (gctSIZE_T) (sizeof(a)) \
+)
+
+#define gcmCOUNTOF(a) \
+( \
+ sizeof(a) / sizeof(a[0]) \
+)
+
+/******************************************************************************\
+******************************** gcsOBJECT Object *******************************
+\******************************************************************************/
+
+/* Type of objects. */
+typedef enum _gceOBJECT_TYPE
+{
+ gcvOBJ_UNKNOWN = 0,
+ gcvOBJ_2D = gcmCC('2','D',' ',' '),
+ gcvOBJ_3D = gcmCC('3','D',' ',' '),
+ gcvOBJ_ATTRIBUTE = gcmCC('A','T','T','R'),
+ gcvOBJ_BRUSHCACHE = gcmCC('B','R','U','$'),
+ gcvOBJ_BRUSHNODE = gcmCC('B','R','U','n'),
+ gcvOBJ_BRUSH = gcmCC('B','R','U','o'),
+ gcvOBJ_BUFFER = gcmCC('B','U','F','R'),
+ gcvOBJ_COMMAND = gcmCC('C','M','D',' '),
+ gcvOBJ_COMMANDBUFFER = gcmCC('C','M','D','B'),
+ gcvOBJ_CONTEXT = gcmCC('C','T','X','T'),
+ gcvOBJ_CONTEXTBUFFER = gcmCC('C','T','X','B'),
+ gcvOBJ_DEVICE = gcmCC('D','E','V',' '),
+ gcvOBJ_DUMP = gcmCC('D','U','M','P'),
+ gcvOBJ_EVENT = gcmCC('E','V','N','T'),
+ gcvOBJ_FUNCTION = gcmCC('F','U','N','C'),
+ gcvOBJ_HAL = gcmCC('H','A','L',' '),
+ gcvOBJ_HARDWARE = gcmCC('H','A','R','D'),
+ gcvOBJ_HEAP = gcmCC('H','E','A','P'),
+ gcvOBJ_INDEX = gcmCC('I','N','D','X'),
+ gcvOBJ_INTERRUPT = gcmCC('I','N','T','R'),
+ gcvOBJ_KERNEL = gcmCC('K','E','R','N'),
+ gcvOBJ_MEMORYBUFFER = gcmCC('M','E','M','B'),
+ gcvOBJ_MMU = gcmCC('M','M','U',' '),
+ gcvOBJ_OS = gcmCC('O','S',' ',' '),
+ gcvOBJ_OUTPUT = gcmCC('O','U','T','P'),
+ gcvOBJ_PAINT = gcmCC('P','N','T',' '),
+ gcvOBJ_PATH = gcmCC('P','A','T','H'),
+ gcvOBJ_QUEUE = gcmCC('Q','U','E',' '),
+ gcvOBJ_SAMPLER = gcmCC('S','A','M','P'),
+ gcvOBJ_SHADER = gcmCC('S','H','D','R'),
+ gcvOBJ_STREAM = gcmCC('S','T','R','M'),
+ gcvOBJ_SURF = gcmCC('S','U','R','F'),
+ gcvOBJ_TEXTURE = gcmCC('T','X','T','R'),
+ gcvOBJ_UNIFORM = gcmCC('U','N','I','F'),
+ gcvOBJ_VARIABLE = gcmCC('V','A','R','I'),
+ gcvOBJ_VERTEX = gcmCC('V','R','T','X'),
+ gcvOBJ_VIDMEM = gcmCC('V','M','E','M'),
+ gcvOBJ_VG = gcmCC('V','G',' ',' '),
+}
+gceOBJECT_TYPE;
+
+/* gcsOBJECT object defintinon. */
+typedef struct _gcsOBJECT
+{
+ /* Type of an object. */
+ gceOBJECT_TYPE type;
+}
+gcsOBJECT;
+
+/* Kernel settings. */
+typedef struct _gcsKERNEL_SETTINGS
+{
+ /* Used RealTime signal between kernel and user. */
+ gctINT signal;
+}
+gcsKERNEL_SETTINGS;
+
+typedef struct _gckHARDWARE * gckHARDWARE;
+
+/*******************************************************************************
+**
+** gcmVERIFY_OBJECT
+**
+** Assert if an object is invalid or is not of the specified type. If the
+** object is invalid or not of the specified type, gcvSTATUS_INVALID_OBJECT
+** will be returned from the current function. In retail mode this macro
+** does nothing.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_OBJECT(prefix, obj, t) \
+ do \
+ { \
+ if ((obj) == gcvNULL) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: NULL"); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT((obj) != gcvNULL); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ } \
+ else if (((gcsOBJECT*) (obj))->type != t) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: %c%c%c%c", \
+ gcmCC_PRINT(((gcsOBJECT*) (obj))->type)); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT(((gcsOBJECT*)(obj))->type == t); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcm, obj, t)
+# define gcmkVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcmk, obj, t)
+#else
+# define gcmVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+# define gcmkVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+#endif
+
+/******************************************************************************\
+********************************** gckOS Object *********************************
+\******************************************************************************/
+
+typedef struct _gckOS * gckOS;
+
+/*!
+*********************************************************************
+* \struct _gckRecursiveMutex
+* \brief
+* Data structure for recursive lock.
+*********************************************************************
+*/
+typedef struct _gckRecursiveMutex * gckRecursiveMutex;
+struct _gckRecursiveMutex
+{
+ /* Thread lock the mutex. */
+ gctINT32 pThread;
+ /* Lock times. */
+ gctUINT32 nReference;
+ /* Access mutex. */
+ gctPOINTER accMutex;
+ /* Underly mutex. */
+ gctPOINTER undMutex;
+};
+
+/* Construct a new gckOS object. */
+gceSTATUS
+gckOS_Construct(
+ IN gctPOINTER Context,
+ OUT gckOS * Os
+ );
+
+/* Destroy an gckOS object. */
+gceSTATUS
+gckOS_Destroy(
+ IN gckOS Os
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckOS_QueryVideoMemory(
+ IN gckOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/*Simulate allocate memory random fail */
+gctBOOL
+gckOS_ForceMemAllocFail(gckOS Os);
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gckOS_Allocate(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gckOS_Free(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Wrapper for allocation memory.. */
+gceSTATUS
+gckOS_AllocateMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Wrapper for freeing memory. */
+gceSTATUS
+gckOS_FreeMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemoryEx(
+ IN gckOS Os,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Lock pages. */
+gceSTATUS
+gckOS_LockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+#endif
+ OUT gctPOINTER * Logical,
+ OUT gctSIZE_T * PageCount
+ );
+
+/* Map pages. */
+gceSTATUS
+gckOS_MapPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Logical,
+#endif
+ IN gctSIZE_T PageCount,
+ IN gctPOINTER PageTable
+ );
+
+/* Unlock pages. */
+gceSTATUS
+gckOS_UnlockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+#endif
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Free paged memory. */
+gceSTATUS
+gckOS_FreePagedMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Allocate non-paged memory. */
+gceSTATUS
+gckOS_AllocateNonPagedMemory(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non-paged memory. */
+gceSTATUS
+gckOS_FreeNonPagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gckOS_AllocateContiguous(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gckOS_FreeContiguous(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get the number fo bytes per page. */
+gceSTATUS
+gckOS_GetPageSize(
+ IN gckOS Os,
+ OUT gctSIZE_T * PageSize
+ );
+
+/* Get the physical address of a corresponding logical address. */
+gceSTATUS
+gckOS_GetPhysicalAddress(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+/* Map physical memory. */
+gceSTATUS
+gckOS_MapPhysical(
+ IN gckOS Os,
+ IN gctUINT32 Physical,
+ IN gctUINT32 OriginalLogical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap previously mapped physical memory. */
+gceSTATUS
+gckOS_UnmapPhysical(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Read data from a hardware register. */
+gceSTATUS
+gckOS_ReadRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+/* Read data from a register directly without mutex protection. */
+gceSTATUS
+gckOS_DirectReadRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+/* Write data to a hardware register. */
+gceSTATUS
+gckOS_WriteRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Write data to a 32-bit memory location. */
+gceSTATUS
+gckOS_WriteMemory(
+ IN gckOS Os,
+ IN gctPOINTER Address,
+ IN gctUINT32 Data
+ );
+
+/* Map physical memory into the process space. */
+gceSTATUS
+gckOS_MapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap physical memory from the process space. */
+gceSTATUS
+gckOS_UnmapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Create a new mutex. */
+gceSTATUS
+gckOS_CreateMutex(
+ IN gckOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gckOS_DeleteMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gckOS_AcquireMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gckOS_ReleaseMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Create a new recursive mutex. */
+gceSTATUS
+gckOS_CreateRecMutex(
+ IN gckOS Os,
+ OUT gckRecursiveMutex *Mutex
+ );
+
+/* Delete a recursive mutex. */
+gceSTATUS
+gckOS_DeleteRecMutex(
+ IN gckOS Os,
+ IN gckRecursiveMutex Mutex
+ );
+
+/* Acquire a recursive mutex. */
+gceSTATUS
+gckOS_AcquireRecMutex(
+ IN gckOS Os,
+ IN gckRecursiveMutex Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a recursive mutex. */
+gceSTATUS
+gckOS_ReleaseRecMutex(
+ IN gckOS Os,
+ IN gckRecursiveMutex Mutex
+ );
+
+/* Atomically exchange a pair of 32-bit values. */
+gceSTATUS
+gckOS_AtomicExchange(
+ IN gckOS Os,
+ IN OUT gctUINT32_PTR Target,
+ IN gctUINT32 NewValue,
+ OUT gctUINT32_PTR OldValue
+ );
+
+/* Atomically exchange a pair of pointers. */
+gceSTATUS
+gckOS_AtomicExchangePtr(
+ IN gckOS Os,
+ IN OUT gctPOINTER * Target,
+ IN gctPOINTER NewValue,
+ OUT gctPOINTER * OldValue
+ );
+
+/* Update video memory usage. */
+gceSTATUS
+gckOS_UpdateVidMemUsage(
+ IN gckOS Os,
+ IN gctBOOL IsAllocated,
+ IN gctSIZE_T Bytes
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomConstruct
+**
+** Create an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** OUTPUT:
+**
+** gctPOINTER * Atom
+** Pointer to a variable receiving the constructed atom.
+*/
+gceSTATUS
+gckOS_AtomConstruct(
+ IN gckOS Os,
+ OUT gctPOINTER * Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDestroy
+**
+** Destroy an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom to destroy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_AtomDestroy(
+ IN gckOS Os,
+ OUT gctPOINTER Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomGet
+**
+** Get the 32-bit value protected by an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the value of the atom.
+*/
+gceSTATUS
+gckOS_AtomGet(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomIncrement
+**
+** Atomically increment the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomIncrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDecrement
+**
+** Atomically decrement the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomDecrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gckOS_Delay(
+ IN gckOS Os,
+ IN gctUINT32 Delay
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS gckOS_Udelay(
+ IN gckOS Os,
+ IN gctUINT32 Delay
+ );
+
+/* Memory barrier. */
+gceSTATUS
+gckOS_MemoryBarrier(
+ IN gckOS Os,
+ IN gctPOINTER Address
+ );
+
+/* Map user pointer. */
+gceSTATUS
+gckOS_MapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Unmap user pointer. */
+gceSTATUS
+gckOS_UnmapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ IN gctPOINTER KernelPointer
+ );
+
+gceSTATUS
+gckOS_ClockOff(
+ IN gckOS Os,
+ IN gctBOOL disableClk,
+ IN gctBOOL disablePwr
+ );
+
+gceSTATUS
+gckOS_ClockOn(
+ IN gckOS Os,
+ IN gctBOOL enableClk,
+ IN gctBOOL enablePwr,
+ IN gctUINT64 Frequency
+ );
+
+gceSTATUS
+gckOS_PowerOff(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_PowerOn(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_PowerOffWhenIdle(
+ IN gckOS Os,
+ IN gctBOOL needProfile
+ );
+
+gceSTATUS
+gckOS_Reset(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_SetConstraint(
+ IN gckOS Os,
+ IN gctBOOL enableDVFM,
+ IN gctBOOL enableLPM
+ );
+
+gceSTATUS
+gckOS_UnSetConstraint(
+ IN gckOS Os,
+ IN gctBOOL enableDVFM,
+ IN gctBOOL enableLPM
+ );
+
+gceSTATUS
+gckOS_NotifyIdle(
+ IN gckOS Os,
+ IN gctBOOL Idle
+ );
+
+gctUINT32
+gckOS_GetTicks(
+ void
+ );
+
+gceSTATUS
+gckOS_IdleProfile(
+ IN gckOS Os,
+ IN OUT gctUINT32* Timeslice,
+ OUT gctUINT32* IdleTime,
+ OUT gctUINT32* StateSwitchTimes
+ );
+
+gceSTATUS gckOS_DumpToFile(
+ IN gckOS Os,
+ IN gctCONST_STRING filename,
+ IN gctPOINTER logical,
+ IN gctSIZE_T size
+ );
+
+#ifdef __QNXNTO__
+/* Map user physical address. */
+gceSTATUS
+gckOS_MapUserPhysical(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Phys,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Allocate from user's shared pool. */
+gceSTATUS
+gckOS_AllocateNonPagedMemoryShmPool(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Pid,
+ IN gctHANDLE Handle,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+#endif
+
+gceSTATUS
+gckOS_SuspendInterrupt(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_ResumeInterrupt(
+ IN gckOS Os
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gckOS_GetBaseAddress(
+ IN gckOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gckOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gckOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Device I/O control to the kernel HAL layer. */
+gceSTATUS
+gckOS_DeviceControl(
+ IN gckOS Os,
+ IN gctBOOL FromUser,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ OUT gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+gceSTATUS gckOS_FreeProcessResource(IN gckOS os, gctUINT32 pid);
+
+/*******************************************************************************
+**
+** gckOS_GetProcessID
+**
+** Get current process ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ProcessID
+** Pointer to the variable that receives the process ID.
+*/
+gceSTATUS
+gckOS_GetProcessID(
+ OUT gctUINT32_PTR ProcessID
+ );
+
+/*******************************************************************************
+**
+** gckOS_GetThreadID
+**
+** Get current thread ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ThreadID
+** Pointer to the variable that receives the thread ID.
+*/
+gceSTATUS
+gckOS_GetThreadID(
+ OUT gctUINT32_PTR ThreadID
+ );
+
+/******************************************************************************\
+********************************** Signal Object *********************************
+\******************************************************************************/
+
+/* User signal command codes. */
+typedef enum _gceUSER_SIGNAL_COMMAND_CODES
+{
+ gcvUSER_SIGNAL_CREATE,
+ gcvUSER_SIGNAL_DESTROY,
+ gcvUSER_SIGNAL_SIGNAL,
+ gcvUSER_SIGNAL_WAIT,
+}
+gceUSER_SIGNAL_COMMAND_CODES;
+
+/* Create a signal. */
+gceSTATUS
+gckOS_CreateSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gckOS_DestroySignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gckOS_Signal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gckOS_WaitSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gckOS_WaitSignalNoInterruptible(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Map a user signal to the kernel space. */
+gceSTATUS
+gckOS_MapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process,
+ OUT gctSIGNAL * MappedSignal
+ );
+
+/* UnMap a user signal */
+gceSTATUS
+gckOS_UnMapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL MappedSignal
+ );
+
+/* Map user memory. */
+gceSTATUS
+gckOS_MapUserMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gckOS_UnmapUserMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+#ifdef ANDROID_VERSION_ECLAIR
+gceSTATUS
+gcoOS_FlushCache(
+ int fd,
+ int offset,
+ int size
+ );
+#endif
+#if !USE_NEW_LINUX_SIGNAL
+/* Create signal to be used in the user space. */
+gceSTATUS
+gckOS_CreateUserSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ IN gceSIGNAL_TYPE SignalType,
+ OUT gctINT * SignalID
+ );
+
+/* Destroy signal used in the user space. */
+gceSTATUS
+gckOS_DestroyUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID
+ );
+
+/* Wait for signal used in the user space. */
+gceSTATUS
+gckOS_WaitUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctUINT32 Wait
+ );
+
+/* Signal a signal used in the user space. */
+gceSTATUS
+gckOS_SignalUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctBOOL State
+ );
+#endif /* USE_NEW_LINUX_SIGNAL */
+
+/* Set a signal owned by a process. */
+#if defined(__QNXNTO__)
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctINT Recvid,
+ IN gctINT Coid
+ );
+#else
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process
+ );
+#endif
+
+/******************************************************************************\
+** Cache Support
+*/
+
+gceSTATUS
+gckOS_CacheFlush(
+ gckOS Os,
+ gctHANDLE ProcessId,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gckOS_CacheInvalidate(
+ gckOS Os,
+ gctHANDLE ProcessId,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+** Debug Support
+*/
+
+void
+gckOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gckOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gckOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+/*******************************************************************************
+** Broadcast interface.
+*/
+
+typedef enum _gceBROADCAST
+{
+ /* GPU might be idle. */
+ gcvBROADCAST_GPU_IDLE,
+
+ /* A commit is going to happen. */
+ gcvBROADCAST_GPU_COMMIT,
+
+ /* GPU seems to be stuck. */
+ gcvBROADCAST_GPU_STUCK,
+
+ /* First process gets attached. */
+ gcvBROADCAST_FIRST_PROCESS,
+
+ /* Last process gets detached. */
+ gcvBROADCAST_LAST_PROCESS,
+
+ /* AXI bus error. */
+ gcvBROADCAST_AXI_BUS_ERROR,
+}
+gceBROADCAST;
+
+gceSTATUS
+gckOS_Broadcast(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gceBROADCAST Reason
+ );
+
+/*******************************************************************************
+**
+** gckOS_SetGPUPower
+**
+** Set the power of the GPU on or off.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.?
+**
+** gctBOOL Power
+** gcvTRUE to turn on the power, or gcvFALSE to turn off the power.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_SetGPUPower(
+ IN gckOS Os,
+ IN gctBOOL Clock,
+ IN gctBOOL Power
+ );
+
+/*******************************************************************************
+** Semaphores.
+*/
+
+/* Create a new semaphore. */
+gceSTATUS
+gckOS_CreateSemaphore(
+ IN gckOS Os,
+ OUT gctPOINTER * Semaphore
+ );
+
+/* Delete a semahore. */
+gceSTATUS
+gckOS_DestroySemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Acquire a semahore. */
+gceSTATUS
+gckOS_AcquireSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Release a semahore. */
+gceSTATUS
+gckOS_ReleaseSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/******************************************************************************\
+********************************* gckHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gckHEAP * gckHEAP;
+
+/* Construct a new gckHEAP object. */
+gceSTATUS
+gckHEAP_Construct(
+ IN gckOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gckHEAP * Heap
+ );
+
+/* Destroy an gckHEAP object. */
+gceSTATUS
+gckHEAP_Destroy(
+ IN gckHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gckHEAP_Allocate(
+ IN gckHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckHEAP_Free(
+ IN gckHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+/* Profile the heap. */
+gceSTATUS
+gckHEAP_ProfileStart(
+ IN gckHEAP Heap
+ );
+
+gceSTATUS
+gckHEAP_ProfileEnd(
+ IN gckHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+
+#if defined gcdHAL_TEST
+gceSTATUS
+gckHEAP_Test(
+ IN gckHEAP Heap,
+ IN gctSIZE_T Vectors,
+ IN gctSIZE_T MaxSize
+ );
+#endif
+
+/******************************************************************************\
+******************************** gckVIDMEM Object ******************************
+\******************************************************************************/
+
+typedef struct _gckVIDMEM * gckVIDMEM;
+typedef union _gcuVIDMEM_NODE * gcuVIDMEM_NODE_PTR;
+typedef struct _gckKERNEL * gckKERNEL;
+
+/* Construct a new gckVIDMEM object. */
+gceSTATUS
+gckVIDMEM_Construct(
+ IN gckOS Os,
+ IN gctUINT32 BaseAddress,
+ IN gctSIZE_T Bytes,
+ IN gctSIZE_T Threshold,
+ IN gctSIZE_T Banking,
+ OUT gckVIDMEM * Memory
+ );
+
+/* Destroy an gckVDIMEM object. */
+gceSTATUS
+gckVIDMEM_Destroy(
+ IN gckVIDMEM Memory
+ );
+
+/* Allocate rectangular memory. */
+gceSTATUS
+gckVIDMEM_Allocate(
+ IN gckVIDMEM Memory,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT BytesPerPixel,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+#ifdef __QNXNTO__
+ IN gctHANDLE Handle,
+#endif
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Allocate linear memory. */
+gceSTATUS
+gckVIDMEM_AllocateLinear(
+ IN gckVIDMEM Memory,
+ IN gctSIZE_T Bytes,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+#ifdef __QNXNTO__
+ IN gctHANDLE Handle,
+#endif
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckVIDMEM_Free(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/* Lock memory. */
+gceSTATUS
+gckVIDMEM_Lock(
+ IN gcuVIDMEM_NODE_PTR Node,
+ OUT gctUINT32 * Address
+ );
+
+/* Unlock memory. */
+gceSTATUS
+gckVIDMEM_Unlock(
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type,
+ IN OUT gctBOOL * Asynchroneous
+ );
+
+/* Construct a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_ConstructVirtual(
+ IN gckKERNEL Kernel,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+#ifdef __QNXNTO__
+ IN gctHANDLE Handle,
+#endif
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Destroy a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_DestroyVirtual(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+#ifdef __QNXNTO__
+/* Set the allocating process' PID for this node. */
+gceSTATUS
+gckVIDMEM_SetPID(
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctUINT32 Pid);
+#endif
+
+/******************************************************************************\
+******************************** gckKERNEL Object ******************************
+\******************************************************************************/
+
+struct _gcsHAL_INTERFACE;
+
+/* Notifications. */
+typedef enum _gceNOTIFY
+{
+ gcvNOTIFY_INTERRUPT,
+ gcvNOTIFY_COMMAND_QUEUE,
+}
+gceNOTIFY;
+
+/* Event locations. */
+typedef enum _gceKERNEL_WHERE
+{
+ gcvKERNEL_COMMAND,
+ gcvKERNEL_VERTEX,
+ gcvKERNEL_TRIANGLE,
+ gcvKERNEL_TEXTURE,
+ gcvKERNEL_PIXEL,
+}
+gceKERNEL_WHERE;
+
+/* Flush flags. */
+typedef enum _gceKERNEL_FLUSH
+{
+ gcvFLUSH_COLOR = 0x01,
+ gcvFLUSH_DEPTH = 0x02,
+ gcvFLUSH_TEXTURE = 0x04,
+ gcvFLUSH_2D = 0x08,
+ gcvFLUSH_ALL = gcvFLUSH_COLOR
+ | gcvFLUSH_DEPTH
+ | gcvFLUSH_TEXTURE
+ | gcvFLUSH_2D,
+}
+gceKERNEL_FLUSH;
+
+/* Construct a new gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Construct(
+ IN gckOS Os,
+ IN gctPOINTER Context,
+ OUT gckKERNEL * Kernel
+ );
+
+/* Destroy an gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Destroy(
+ IN gckKERNEL Kernel
+ );
+
+/* Dispatch a user-level command. */
+gceSTATUS
+gckKERNEL_Dispatch(
+ IN gckKERNEL Kernel,
+ IN gctBOOL FromUser,
+ IN OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckKERNEL_QueryVideoMemory(
+ IN gckKERNEL Kernel,
+ OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Lookup the gckVIDMEM object for a pool. */
+gceSTATUS
+gckKERNEL_GetVideoMemoryPool(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+/* Map video memory. */
+gceSTATUS
+gckKERNEL_MapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Address,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes,
+#endif
+ OUT gctPOINTER * Logical
+ );
+
+#ifdef __QNXNTO__
+/* Unmap video memory. */
+gceSTATUS
+gckKERNEL_UnmapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes
+ );
+#endif
+
+/* Map memory. */
+gceSTATUS
+gckKERNEL_MapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap memory. */
+gceSTATUS
+gckKERNEL_UnmapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Notification of events. */
+gceSTATUS
+gckKERNEL_Notify(
+ IN gckKERNEL Kernel,
+ IN gceNOTIFY Notifcation,
+ IN gctBOOL Data
+ );
+
+gceSTATUS
+gckKERNEL_QuerySettings(
+ IN gckKERNEL Kernel,
+ OUT gcsKERNEL_SETTINGS * Settings
+ );
+
+/*******************************************************************************
+**
+** gckKERNEL_Recovery
+**
+** Try to recover the GPU from a fatal error.
+**
+** INPUT:
+**
+** gckKERNEL Kernel
+** Pointer to an gckKERNEL object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckKERNEL_Recovery(
+ IN gckKERNEL Kernel
+ );
+
+/******************************************************************************\
+******************************* gckHARDWARE Object *****************************
+\******************************************************************************/
+
+/* Construct a new gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Construct(
+ IN gckOS Os,
+ OUT gckHARDWARE * Hardware
+ );
+
+/* Destroy an gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Destroy(
+ IN gckHARDWARE Hardware
+ );
+
+/* Query system memory requirements. */
+gceSTATUS
+gckHARDWARE_QuerySystemMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * SystemSize,
+ OUT gctUINT32 * SystemBaseAddress
+ );
+
+/* Build virtual address. */
+gceSTATUS
+gckHARDWARE_BuildVirtualAddress(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Index,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Query command buffer requirements. */
+gceSTATUS
+gckHARDWARE_QueryCommandBuffer(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * Alignment,
+ OUT gctSIZE_T * ReservedHead,
+ OUT gctSIZE_T * ReservedTail
+ );
+
+/* Add a WAIT/LINK pair in the command queue. */
+gceSTATUS
+gckHARDWARE_WaitLink(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPOINTER * Wait,
+ OUT gctSIZE_T * WaitBytes
+ );
+
+/* Kickstart the command processor. */
+gceSTATUS
+gckHARDWARE_Execute(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Physical,
+ IN gctBOOL PhysicalAddresses,
+#endif
+ IN gctSIZE_T Bytes
+ );
+
+/* Add an END command in the command queue. */
+gceSTATUS
+gckHARDWARE_End(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a NOP command in the command queue. */
+gceSTATUS
+gckHARDWARE_Nop(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a WAIT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Wait(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Count,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a PIPESELECT command in the command queue. */
+gceSTATUS
+gckHARDWARE_PipeSelect(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Pipe,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a LINK command in the command queue. */
+gceSTATUS
+gckHARDWARE_Link(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctPOINTER FetchAddress,
+ IN gctSIZE_T FetchSize,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add an EVENT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Event(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT8 Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Query the available memory. */
+gceSTATUS
+gckHARDWARE_QueryMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctUINT32 * InternalBaseAddress,
+ OUT gctUINT32 * InternalAlignment,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctUINT32 * ExternalBaseAddress,
+ OUT gctUINT32 * ExternalAlignment,
+ OUT gctUINT32 * HorizontalTileSize,
+ OUT gctUINT32 * VerticalTileSize
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gckHARDWARE_QueryChipIdentity(
+ IN gckHARDWARE Hardware,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures,
+ OUT gctUINT32* ChipMinorFeatures1
+ );
+
+/* Query the specifications sof the hardware. */
+gceSTATUS
+gckHARDWARE_QueryChipSpecs(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR StreamCount,
+ OUT gctUINT32_PTR RegisterMax,
+ OUT gctUINT32_PTR ThreadCount,
+ OUT gctUINT32_PTR ShaderCoreCount,
+ OUT gctUINT32_PTR VertexCacheSize,
+ OUT gctUINT32_PTR VertexOutputBufferSize
+ );
+
+/* Convert an API format. */
+gceSTATUS
+gckHARDWARE_ConvertFormat(
+ IN gckHARDWARE Hardware,
+ IN gceSURF_FORMAT Format,
+ OUT gctUINT32 * BitsPerPixel,
+ OUT gctUINT32 * BytesPerTile
+ );
+
+/* Split a harwdare specific address into API stuff. */
+gceSTATUS
+gckHARDWARE_SplitMemory(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Align size to tile boundary. */
+gceSTATUS
+gckHARDWARE_AlignToTile(
+ IN gckHARDWARE Hardware,
+ IN gceSURF_TYPE Type,
+ IN OUT gctUINT32_PTR Width,
+ IN OUT gctUINT32_PTR Height,
+ OUT gctBOOL_PTR SuperTiled
+ );
+
+/* Update command queue tail pointer. */
+gceSTATUS
+gckHARDWARE_UpdateQueueTail(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset
+ );
+
+/* Convert logical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertLogical(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+#ifdef __QNXNTO__
+/* Convert physical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertPhysical(
+ IN gckHARDWARE Hardware,
+ IN gctPHYS_ADDR Physical,
+ OUT gctUINT32 * Address
+ );
+#endif
+
+/* Interrupt manager. */
+gceSTATUS
+gckHARDWARE_Interrupt(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL InterruptValid
+ );
+
+/* Program MMU. */
+gceSTATUS
+gckHARDWARE_SetMMU(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical
+ );
+
+/* Flush the MMU. */
+gceSTATUS
+gckHARDWARE_FlushMMU(
+ IN gckHARDWARE Hardware
+ );
+
+/* Get idle register. */
+gceSTATUS
+gckHARDWARE_GetIdle(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Wait,
+ OUT gctUINT32 * Data
+ );
+
+/* Flush the caches. */
+gceSTATUS
+gckHARDWARE_Flush(
+ IN gckHARDWARE Hardware,
+ IN gceKERNEL_FLUSH Flush,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Enable/disable fast clear. */
+gceSTATUS
+gckHARDWARE_SetFastClear(
+ IN gckHARDWARE Hardware,
+ IN gctINT Enable,
+ IN gctINT Compression
+ );
+
+gceSTATUS
+gckHARDWARE_ReadInterrupt(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR IDs
+ );
+
+/* Power management. */
+gceSTATUS
+gckHARDWARE_SetPowerManagementState(
+ IN gckHARDWARE Hardware,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gckHARDWARE_QueryPowerManagementState(
+ IN gckHARDWARE Hardware,
+ OUT gceCHIPPOWERSTATE* State
+ );
+
+/* Profile 2D Engine. */
+gceSTATUS
+gckHARDWARE_ProfileEngine2D(
+ IN gckHARDWARE Hardware,
+ OUT gcs2D_PROFILE_PTR Profile
+ );
+
+gceSTATUS
+gckHARDWARE_InitializeHardware(
+ IN gckHARDWARE Hardware
+ );
+
+gceSTATUS
+gckHARDWARE_Reset(
+ IN gckHARDWARE Hardware
+ );
+
+/******************************************************************************\
+***************************** gckINTERRUPT Object ******************************
+\******************************************************************************/
+
+typedef struct _gckINTERRUPT * gckINTERRUPT;
+
+typedef gceSTATUS (* gctINTERRUPT_HANDLER)(
+ IN gckKERNEL Kernel
+ );
+
+gceSTATUS
+gckINTERRUPT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckINTERRUPT * Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_Destroy(
+ IN gckINTERRUPT Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_SetHandler(
+ IN gckINTERRUPT Interrupt,
+ IN OUT gctINT32_PTR Id,
+ IN gctINTERRUPT_HANDLER Handler
+ );
+
+gceSTATUS
+gckINTERRUPT_Notify(
+ IN gckINTERRUPT Interrupt,
+ IN gctBOOL Valid
+ );
+
+/******************************************************************************\
+******************************** gckEVENT Object *******************************
+\******************************************************************************/
+
+typedef struct _gckEVENT * gckEVENT;
+
+/* Construct a new gckEVENT object. */
+gceSTATUS
+gckEVENT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckEVENT * Event
+ );
+
+/* Destroy an gckEVENT object. */
+gceSTATUS
+gckEVENT_Destroy(
+ IN gckEVENT Event
+ );
+
+/* Schedule a FreeNonPagedMemory event. */
+gceSTATUS
+gckEVENT_FreeNonPagedMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeContiguousMemory event. */
+gceSTATUS
+gckEVENT_FreeContiguousMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeVideoMemory event. */
+gceSTATUS
+gckEVENT_FreeVideoMemory(
+ IN gckEVENT Event,
+ IN gcuVIDMEM_NODE_PTR VideoMemory,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a signal event. */
+gceSTATUS
+gckEVENT_Signal(
+ IN gckEVENT Event,
+ IN gctSIGNAL Signal,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule an Unlock event. */
+gceSTATUS
+gckEVENT_Unlock(
+ IN gckEVENT Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type
+ );
+
+gceSTATUS
+gckEVENT_Submit(
+ IN gckEVENT Event,
+ IN gctBOOL Wait
+ );
+
+struct _gcsQUEUE;
+
+/* Commit an event queue. */
+gceSTATUS
+gckEVENT_Commit(
+ IN gckEVENT Event,
+ IN struct _gcsQUEUE * Queue
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Notify(
+ IN gckEVENT Event,
+ IN gctBOOL IsReset
+ );
+
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Interrupt(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+/* Try to set idle */
+gceSTATUS
+gckEVENT_TryToSetIdle(
+ IN gckEVENT Event
+ );
+/******************************************************************************\
+******************************* gckCOMMAND Object ******************************
+\******************************************************************************/
+
+typedef struct _gckCOMMAND * gckCOMMAND;
+
+/* Construct a new gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckCOMMAND * Command
+ );
+
+/* Destroy an gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Destroy(
+ IN gckCOMMAND Command
+ );
+
+/* Start the command queue. */
+gceSTATUS
+gckCOMMAND_Start(
+ IN gckCOMMAND Command
+ );
+
+/* Stop the command queue. */
+gceSTATUS
+gckCOMMAND_Stop(
+ IN gckCOMMAND Command
+ );
+
+/* Commit a buffer to the command queue. */
+gceSTATUS
+gckCOMMAND_Commit(
+ IN gckCOMMAND Command,
+ IN gcoCMDBUF CommandBuffer,
+ IN gcoCONTEXT Context,
+ IN gctHANDLE Process
+ );
+
+/* Reserve space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Reserve(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequestedBytes,
+ OUT gctPOINTER * Buffer,
+ OUT gctSIZE_T * BufferSize
+ );
+
+/* Release reserved space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Release(
+ IN gckCOMMAND Command
+ );
+
+/* Execute reserved space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Execute(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequstedBytes
+ );
+
+/* Stall the command queue. */
+gceSTATUS
+gckCOMMAND_Stall(
+ IN gckCOMMAND Command
+ );
+
+/******************************************************************************\
+********************************* gckMMU Object ********************************
+\******************************************************************************/
+
+typedef struct _gckMMU * gckMMU;
+
+/* Construct a new gckMMU object. */
+gceSTATUS
+gckMMU_Construct(
+ IN gckKERNEL Kernel,
+ IN gctSIZE_T MmuSize,
+ OUT gckMMU * Mmu
+ );
+
+/* Destroy an gckMMU object. */
+gceSTATUS
+gckMMU_Destroy(
+ IN gckMMU Mmu
+ );
+
+/* Allocate pages inside the MMU. */
+gceSTATUS
+gckMMU_AllocatePages(
+ IN gckMMU Mmu,
+ IN gctSIZE_T PageCount,
+ OUT gctPOINTER * PageTable,
+ OUT gctUINT32 * Address
+ );
+
+/* Remove a page table from the MMU. */
+gceSTATUS
+gckMMU_FreePages(
+ IN gckMMU Mmu,
+ IN gctPOINTER PageTable,
+ IN gctSIZE_T PageCount
+ );
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_InsertNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+
+gceSTATUS
+gckMMU_RemoveNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+#endif
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_FreeHandleMemory(
+ IN gckMMU Mmu,
+ IN gctHANDLE Handle
+ );
+#endif
+
+#if defined gcdHAL_TEST
+gceSTATUS
+gckMMU_Test(
+ IN gckMMU Mmu,
+ IN gctSIZE_T Vectors,
+ IN gctINT MaxSize
+ );
+#endif
+
+gceSTATUS
+gckHARDWARE_QueryProfileRegisters(
+ IN gckHARDWARE Hardware,
+ OUT gcsPROFILER_COUNTERS * Counters
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_h_ */
+
diff --git a/src/include_dove/gc_hal_base.h b/src/include_dove/gc_hal_base.h
new file mode 100644
index 0000000..c24f8f7
--- /dev/null
+++ b/src/include_dove/gc_hal_base.h
@@ -0,0 +1,2828 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_base_h_
+#define __gc_hal_base_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+#include "gc_hal_dump.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoHAL * gcoHAL;
+typedef struct _gcoOS * gcoOS;
+typedef struct _gco2D * gco2D;
+typedef struct _gcoVG * gcoVG;
+typedef struct _gco3D * gco3D;
+typedef struct _gcoSURF * gcoSURF;
+typedef struct _gcsSURF_INFO * gcsSURF_INFO_PTR;
+typedef struct _gcsSURF_NODE * gcsSURF_NODE_PTR;
+typedef struct _gcsSURF_FORMAT_INFO * gcsSURF_FORMAT_INFO_PTR;
+typedef struct _gcsPOINT * gcsPOINT_PTR;
+typedef struct _gcsSIZE * gcsSIZE_PTR;
+typedef struct _gcsRECT * gcsRECT_PTR;
+typedef struct _gcsBOUNDARY * gcsBOUNDARY_PTR;
+typedef struct _gcoDUMP * gcoDUMP;
+typedef struct _gcoHARDWARE * gcoHARDWARE;
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+/* Video memory pool type. */
+typedef enum _gcePOOL
+{
+ gcvPOOL_UNKNOWN,
+ gcvPOOL_DEFAULT,
+ gcvPOOL_LOCAL,
+ gcvPOOL_LOCAL_INTERNAL,
+ gcvPOOL_LOCAL_EXTERNAL,
+ gcvPOOL_UNIFIED,
+ gcvPOOL_SYSTEM,
+ gcvPOOL_VIRTUAL,
+ gcvPOOL_USER,
+ gcvPOOL_CONTIGUOUS
+}
+gcePOOL;
+
+/* Blending functions. */
+typedef enum _gceBLEND_FUNCTION
+{
+ gcvBLEND_ZERO,
+ gcvBLEND_ONE,
+ gcvBLEND_SOURCE_COLOR,
+ gcvBLEND_INV_SOURCE_COLOR,
+ gcvBLEND_SOURCE_ALPHA,
+ gcvBLEND_INV_SOURCE_ALPHA,
+ gcvBLEND_TARGET_COLOR,
+ gcvBLEND_INV_TARGET_COLOR,
+ gcvBLEND_TARGET_ALPHA,
+ gcvBLEND_INV_TARGET_ALPHA,
+ gcvBLEND_SOURCE_ALPHA_SATURATE,
+ gcvBLEND_CONST_COLOR,
+ gcvBLEND_INV_CONST_COLOR,
+ gcvBLEND_CONST_ALPHA,
+ gcvBLEND_INV_CONST_ALPHA,
+}
+gceBLEND_FUNCTION;
+
+/* Blending modes. */
+typedef enum _gceBLEND_MODE
+{
+ gcvBLEND_ADD,
+ gcvBLEND_SUBTRACT,
+ gcvBLEND_REVERSE_SUBTRACT,
+ gcvBLEND_MIN,
+ gcvBLEND_MAX,
+}
+gceBLEND_MODE;
+
+/* API flags. */
+typedef enum _gceAPI
+{
+ gcvAPI_D3D = 0x1,
+ gcvAPI_OPENGL = 0x2,
+}
+gceAPI;
+
+/* Depth modes. */
+typedef enum _gceDEPTH_MODE
+{
+ gcvDEPTH_NONE,
+ gcvDEPTH_Z,
+ gcvDEPTH_W,
+}
+gceDEPTH_MODE;
+
+typedef enum _gceWHERE
+{
+ gcvWHERE_COMMAND,
+ gcvWHERE_RASTER,
+ gcvWHERE_PIXEL,
+}
+gceWHERE;
+
+typedef enum _gceHOW
+{
+ gcvHOW_SEMAPHORE = 0x1,
+ gcvHOW_STALL = 0x2,
+ gcvHOW_SEMAPHORE_STALL = 0x3,
+}
+gceHOW;
+
+typedef enum _gceSIGNAL_TYPE
+{
+ gcvSIGNAL_NOPE = 0x0,
+ gcvSIGNAL_CONTEXT_GCU = 0x1,
+ gcvSIGNAL_CONTEXT = 0x2,
+ gcvSIGNAL_FENCE_GCU = 0x3,
+ gcvSIGNAL_FENCE = 0x4,
+ gcvSIGNAL_DISPLAY_START = 0x5,
+ gcvSIGNAL_DISPLAY_STOP = 0x6,
+ gcvSIGNAL_WORKER_THREAD = 0x7,
+ gcvSIGNAL_SYNC = 0x8,
+ gcvSIGNAL_SURFACE = 0x9,
+ gcvSIGNAL_TEXTURE = 0x10,
+ gcvSIGNAL_STREAM = 0x11,
+ gcvSIGNAL_INDEX_GROUP = 0x12,
+ gcvSIGNAL_RESERVE_MEM_GROUP = 0x13,
+ gcvSIGNAL_CMD_BUFFER = 0x14,
+ gcvSIGNAL_CONTEXT_BUFFER = 0x15,
+ gcvSIGNAL_INDEX_DYNAMIC = 0x16,
+ gcvSIGNAL_STREAM_DYNAMIC = 0x17,
+ gcvSIGNAL_STALL = 0x18,
+ gcvSIGNAL_RESERVED
+}
+gceSIGNAL_TYPE;
+
+#define gcmSIGNAL_OFFSET 16
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Construct a new gcoHAL object. */
+gceSTATUS
+gcoHAL_Construct(
+ IN gctPOINTER Context,
+ IN gcoOS Os,
+ OUT gcoHAL * Hal
+ );
+
+/* Destroy an gcoHAL object. */
+gceSTATUS
+gcoHAL_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Get pointer to gco2D object. */
+gceSTATUS
+gcoHAL_Get2DEngine(
+ IN gcoHAL Hal,
+ OUT gco2D * Engine
+ );
+
+/* Get pointer to gcoVG object. */
+gceSTATUS
+gcoHAL_GetVGEngine(
+ IN gcoHAL Hal,
+ OUT gcoVG * Engine
+ );
+
+/* Get pointer to gco3D object. */
+gceSTATUS
+gcoHAL_Get3DEngine(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+/* Verify whether the specified feature is available in hardware. */
+gceSTATUS
+gcoHAL_IsFeatureAvailable(
+ IN gcoHAL Hal,
+ IN gceFEATURE Feature
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gcoHAL_QueryChipIdentity(
+ IN gcoHAL Hal,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the amount of video memory. */
+gceSTATUS
+gcoHAL_QueryVideoMemory(
+ IN gcoHAL Hal,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Map video memory. */
+gceSTATUS
+gcoHAL_MapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap video memory. */
+gceSTATUS
+gcoHAL_UnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a buffer mapped through its physical address. */
+gceSTATUS
+gcoHAL_ScheduleUnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a user buffer using event mechanism. */
+gceSTATUS
+gcoHAL_ScheduleUnmapUserMemory(
+ IN gcoHAL Hal,
+ IN gctPOINTER Info,
+ IN gctSIZE_T Size,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory
+ );
+
+/* Commit the current command buffer. */
+gceSTATUS
+gcoHAL_Commit(
+ IN gcoHAL Hal,
+ IN gctBOOL Stall
+ );
+
+/* Query the tile capabilities. */
+gceSTATUS
+gcoHAL_QueryTiled(
+ IN gcoHAL Hal,
+ OUT gctINT32 * TileWidth2D,
+ OUT gctINT32 * TileHeight2D,
+ OUT gctINT32 * TileWidth3D,
+ OUT gctINT32 * TileHeight3D
+ );
+
+gceSTATUS
+gcoHAL_Compact(
+ IN gcoHAL Hal
+ );
+
+gceSTATUS
+gcoHAL_ProfileStart(
+ IN gcoHAL Hal
+ );
+
+gceSTATUS
+gcoHAL_ProfileEnd(
+ IN gcoHAL Hal,
+ IN gctCONST_STRING Title
+ );
+
+/* Power Management */
+gceSTATUS
+gcoHAL_SetPowerManagementState(
+ IN gcoHAL Hal,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gcoHAL_QueryPowerManagementState(
+ IN gcoHAL Hal,
+ OUT gceCHIPPOWERSTATE *State
+ );
+
+/* Set the filter type for filter blit. */
+gceSTATUS
+gcoHAL_SetFilterType(
+ IN gcoHAL Hal,
+ IN gceFILTER_TYPE FilterType
+ );
+
+gceSTATUS
+gcoHAL_GetDump(
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Call the kernel HAL layer. */
+gceSTATUS
+gcoHAL_Call(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Schedule an event. */
+gceSTATUS
+gcoHAL_ScheduleEvent(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Destroy a surface. */
+gceSTATUS
+gcoHAL_DestroySurface(
+ IN gcoHAL Hal,
+ IN gcoSURF Surface
+ );
+
+/******************************************************************************\
+********************************** gcoOS Object *********************************
+\******************************************************************************/
+
+/* Construct a new gcoOS object. */
+gceSTATUS
+gcoOS_Construct(
+ IN gctPOINTER Context,
+ OUT gcoOS * Os
+ );
+
+/* Destroy an gcoOS object. */
+gceSTATUS
+gcoOS_Destroy(
+ IN gcoOS Os
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gcoOS_GetBaseAddress(
+ IN gcoOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gcoOS_Allocate(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gcoOS_Free(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoOS_AllocateMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoOS_FreeMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gcoOS_AllocateContiguous(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gcoOS_FreeContiguous(
+ IN gcoOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Map user memory. */
+gceSTATUS
+gcoOS_MapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gcoOS_UnmapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+/* Device I/O Control call to the kernel HAL layer. */
+gceSTATUS
+gcoOS_DeviceControl(
+ IN gcoOS Os,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ IN gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/* Allocate non paged memory. */
+gceSTATUS gcoOS_AllocateNonPagedMemory(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non paged memory. */
+gceSTATUS gcoOS_FreeNonPagedMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+typedef enum _gceFILE_MODE
+{
+ gcvFILE_CREATE = 0,
+ gcvFILE_APPEND,
+ gcvFILE_READ,
+ gcvFILE_CREATETEXT,
+ gcvFILE_APPENDTEXT,
+ gcvFILE_READTEXT,
+}
+gceFILE_MODE;
+
+/* Open a file. */
+gceSTATUS
+gcoOS_Open(
+ IN gcoOS Os,
+ IN gctCONST_STRING FileName,
+ IN gceFILE_MODE Mode,
+ OUT gctFILE * File
+ );
+
+/* Close a file. */
+gceSTATUS
+gcoOS_Close(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Read data from a file. */
+gceSTATUS
+gcoOS_Read(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctPOINTER Data,
+ OUT gctSIZE_T * ByteRead
+ );
+
+/* Write data to a file. */
+gceSTATUS
+gcoOS_Write(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+typedef enum _gceFILE_WHENCE
+{
+ gcvFILE_SEEK_SET,
+ gcvFILE_SEEK_CUR,
+ gcvFILE_SEEK_END
+}
+gceFILE_WHENCE;
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_Seek(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Offset,
+ IN gceFILE_WHENCE Whence
+ );
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_SetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Position
+ );
+
+/* Get the current position of a file. */
+gceSTATUS
+gcoOS_GetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ OUT gctUINT32 * Position
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gcoOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Perform a memory fill. */
+gceSTATUS
+gcoOS_MemFill(
+ IN gctPOINTER Destination,
+ IN gctUINT8 Filler,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gcoOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Find the last occurance of a character inside a string. */
+gceSTATUS
+gcoOS_StrFindReverse(
+ IN gctCONST_STRING String,
+ IN gctINT8 Character,
+ OUT gctSTRING * Output
+ );
+
+gceSTATUS
+gcoOS_StrLen(
+ IN gctCONST_STRING String,
+ OUT gctSIZE_T * Length
+ );
+
+gceSTATUS
+gcoOS_StrDup(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ OUT gctSTRING * Target
+ );
+
+/* Copy a string. */
+gceSTATUS
+gcoOS_StrCopySafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Append a string. */
+gceSTATUS
+gcoOS_StrCatSafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Compare two strings. */
+gceSTATUS
+gcoOS_StrCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2
+ );
+
+/* Compare characters of two strings. */
+gceSTATUS
+gcoOS_StrNCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2,
+ IN gctSIZE_T Count
+ );
+
+/* Convert string to float. */
+gceSTATUS
+gcoOS_StrToFloat(
+ IN gctCONST_STRING String,
+ OUT gctFLOAT * Float
+ );
+
+/* Convert string to integer. */
+gceSTATUS
+gcoOS_StrToInt(
+ IN gctCONST_STRING String,
+ OUT gctINT * Int
+ );
+
+gceSTATUS
+gcoOS_MemCmp(
+ IN gctCONST_POINTER Memory1,
+ IN gctCONST_POINTER Memory2,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_PrintStrSafe(
+ OUT gctSTRING String,
+ IN gctSIZE_T StringSize,
+ IN OUT gctUINT * Offset,
+ IN gctCONST_STRING Format,
+ ...
+ );
+
+gceSTATUS
+gcoOS_PrintStrVSafe(
+ OUT gctSTRING String,
+ IN gctSIZE_T StringSize,
+ IN OUT gctUINT * Offset,
+ IN gctCONST_STRING Format,
+ IN gctPOINTER Arguments
+ );
+
+gceSTATUS
+gcoOS_LoadLibrary(
+ IN gcoOS Os,
+ IN gctCONST_STRING Library,
+ OUT gctHANDLE * Handle
+ );
+
+gceSTATUS
+gcoOS_FreeLibrary(
+ IN gcoOS Os,
+ IN gctHANDLE Handle
+ );
+
+gceSTATUS
+gcoOS_GetProcAddress(
+ IN gcoOS Os,
+ IN gctHANDLE Handle,
+ IN gctCONST_STRING Name,
+ OUT gctPOINTER * Function
+ );
+
+gceSTATUS
+gcoOS_Compact(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_ProfileStart(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_ProfileEnd(
+ IN gcoOS Os,
+ IN gctCONST_STRING Title
+ );
+
+gceSTATUS
+gcoOS_SetProfileSetting(
+ IN gcoOS Os,
+ IN gctBOOL Enable,
+ IN gctCONST_STRING FileName
+ );
+gctINT32
+gcoOS_GetMilliTime(
+ void
+ );
+
+char* gcoOS_GetProgramName(char* buf, int size);
+
+/* return non-NULL means success. null-terminate guarantee! */
+gctSTRING gcoOS_GetProgramNameWithoutPath(
+ OUT gctSTRING buf,
+ IN const gctSIZE_T size
+ );
+#if MRVL_BENCH
+
+/*
+** Check point for timer.
+** To add new profiling point, modify below two members:
+gceSTATUS
+gcoOS_SetProfileSetting(
+ IN gcoOS Os,
+ IN gctBOOL Enable,
+ IN gctCONST_STRING FileName
+ );
+
+*/
+typedef enum _apiBenchIndex {
+ APIBENCH_INDEX_FRAME,
+ APIBENCH_INDEX_DRAWARRAY,
+ APIBENCH_INDEX_DRAWELEMENTS,
+ APIBENCH_INDEX_BUILDSTREAM,
+ APIBENCH_INDEX_INDEXBUFFER,
+ APIBENCH_INDEX_DRAWARRAY_UPDATESTATE,
+ APIBENCH_INDEX_DRAWARRAY_UPDATESTATE1,
+ APIBENCH_INDEX_UPDATESTATE,
+ APIBENCH_INDEX_UPDATESTATE1,
+ APIBENCH_INDEX_SWAPBUFFERS,
+ APIBENCH_INDEX_DRAWIMAGE,
+ APIBENCH_INDEX_SWTEXTUREUPLOAD,
+ APIBENCH_INDEX_DIRECTTEXTURE,
+ APIBENCH_INDEX_GLEGLIMAGETEXTURE,
+ APIBENCH_INDEX_DRAWTEX,
+ APIBENCH_INDEX_BUFFERDATA,
+ APIBENCH_INDEX_BUFFERSUBDATA,
+ APIBENCH_INDEX_COMPILER_FRONTEND,
+ APIBENCH_INDEX_COMPILER_OPTIMIZING,
+ APIBENCH_INDEX_COMPILER_BACKEND, /* i.e. LINKER */
+ APIBENCH_INDEX_MAX
+}apiBenchIndex;
+
+#define APIBENCHNAME { \
+ "Frame", \
+ "DrawArray", \
+ "DrawElement", \
+ "_buildStream", \
+ "IndexBuffer", \
+ "DrawArray_UpdateState", \
+ "DrawArray_UpdateState1", \
+ "UpdateState", \
+ "UpdateState1", \
+ "eglSwapBuffers", \
+ "DrawImage", \
+ "SWTextureUpload", \
+ "uploadDirectTexture", \
+ "glEGLImageTexture2D", \
+ "glDrawTex", \
+ "glBufferData", \
+ "glBufferSubData", \
+ "_glshCompileShader_frontEnd", \
+ "_glshCompileShader_optimizing",\
+ "_glshLinkShaders", \
+}
+
+/*
+** Check point for state update
+**
+*/
+typedef enum _apiBenchStateIndex {
+ APIBENCH_STATE_INDEX_FRAME,
+ APIBENCH_STATE_INDEX_TEXTURE,
+ APIBENCH_STATE_INDEX_SHADER,
+ APIBENCH_STATE_INDEX_MAX
+}apiBenchStateIndex;
+
+#define APIBENCHSTATENAME { \
+ "Frame", \
+ "Texture", \
+ "Shader", \
+}
+
+ /* Timer structure to store the profile result */
+typedef struct _gcoTIMER
+{
+ gctUINT32 start;
+ gctUINT32 end;
+ gctUINT32 totalTime;
+ gctUINT32 count;
+}gcoTIMER;
+
+ /* global structure for api bench */
+typedef struct _gcoAPIBENCH
+{
+ gctFILE file;
+ /* frame count */
+ gctUINT32 frameCount;
+
+ /* timer object for bench mark */
+ gcoTIMER timer[APIBENCH_INDEX_MAX];
+
+ /* total sent command size */
+ gctUINT32 commandSize;
+
+ /* commit times */
+ gctUINT32 commitNumber;
+
+ /* profile the state update, use same structure of timer */
+ gcoTIMER stateCounter[APIBENCH_STATE_INDEX_MAX];
+
+}gcoAPIBENCH;
+
+ /* Frame count to print */
+#define PROFILE_DRIVER_FRAME_PRINT 10
+
+
+void gcoDUMP_APIBenchStart(
+ IN gcoHAL Hal,
+ IN gctUINT32 timerIndex
+ );
+
+void gcoDUMP_APIBenchEnd(
+ IN gcoHAL Hal,
+ IN gctUINT32 timerIndex
+ );
+
+void gcoDUMP_APIBenchPrint(
+ IN gcoHAL Hal
+ );
+
+void gcoDUMP_APIBenchInit(
+ IN gcoHAL Hal
+ );
+
+void gcoDUMP_APIBenchDestroy(
+ IN gcoHAL Hal
+ );
+
+void gcoDUMP_APIBenchFrame(
+ IN gcoHAL Hal
+ );
+
+void gcoDUMP_APIBenchCommand(
+ IN gcoHAL Hal,
+ IN gctUINT32 size
+ );
+
+void gcoDUMP_APIBenchCommit(
+ IN gcoHAL Hal
+ );
+
+void gcoDUMP_APIBenchStateEnd(
+ IN gcoHAL Hal,
+ IN gctUINT32 stateIndex
+ );
+
+void gcoDUMP_APIBenchStateStart(
+ IN gcoHAL Hal,
+ IN gctUINT32 stateIndex
+ );
+
+#else
+
+
+#endif
+
+/* Query the video memory. */
+gceSTATUS
+gcoOS_QueryVideoMemory(
+ IN gcoOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Atoms ----------------------------------------------------------------*/
+
+typedef struct gcsATOM * gcsATOM_PTR;
+
+/* Construct an atom. */
+gceSTATUS
+gcoOS_AtomConstruct(
+ IN gcoOS Os,
+ OUT gcsATOM_PTR * Atom
+ );
+
+/* Destroy an atom. */
+gceSTATUS
+gcoOS_AtomDestroy(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom
+ );
+
+/* Increment an atom. */
+gceSTATUS
+gcoOS_AtomIncrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+/* Decrement an atom. */
+gceSTATUS
+gcoOS_AtomDecrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+gctHANDLE
+gcoOS_GetCurrentProcessID(
+ void
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Time -----------------------------------------------------------------*/
+
+/* Get the number of milliseconds since the system started. */
+gctUINT32
+gcoOS_GetTicks(
+ void
+ );
+
+/* Get time in microseconds. */
+gceSTATUS
+gcoOS_GetTime(
+ gctUINT64_PTR Time
+ );
+
+/* Get CPU usage in microseconds. */
+gceSTATUS
+gcoOS_GetCPUTime(
+ gctUINT64_PTR CPUTime
+ );
+
+/* Get memory usage. */
+gceSTATUS
+gcoOS_GetMemoryUsage(
+ gctUINT32_PTR MaxRSS,
+ gctUINT32_PTR IxRSS,
+ gctUINT32_PTR IdRSS,
+ gctUINT32_PTR IsRSS
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gcoOS_Delay(
+ IN gcoOS Os,
+ IN gctUINT32 Delay
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Mutexes --------------------------------------------------------------*/
+
+/* Create a new mutex. */
+gceSTATUS
+gcoOS_CreateMutex(
+ IN gcoOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gcoOS_DeleteMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gcoOS_AcquireMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gcoOS_ReleaseMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Signals --------------------------------------------------------------*/
+
+/* Create a signal. */
+gceSTATUS
+gcoOS_CreateSignal(
+ IN gcoOS Os,
+ IN gctBOOL ManualReset,
+ IN gceSIGNAL_TYPE SignalType,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gcoOS_DestroySignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gcoOS_Signal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gcoOS_WaitSignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Write a register. */
+gceSTATUS
+gcoOS_WriteRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Read a register. */
+gceSTATUS
+gcoOS_ReadRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+gceSTATUS
+gcoOS_CacheFlush(
+ IN gcoOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_CacheInvalidate(
+ IN gcoOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/*******************************************************************************
+** gcoMATH object
+*/
+
+#define gcdPI 3.14159265358979323846f
+
+gctUINT32
+gcoMATH_Log2in5dot5(
+ IN gctINT X
+ );
+
+gctFLOAT
+gcoMATH_Sine(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Cosine(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Floor(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Ceiling(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_SquareRoot(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Log2(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Power(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+gctFLOAT
+gcoMATH_Modulo(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+gctFLOAT
+gcoMATH_Exp(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Absolute(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_ArcCosine(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Tangent(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_UInt2Float(
+ IN gctUINT X
+ );
+
+gctUINT
+gcoMATH_Float2UInt(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Multiply(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+/******************************************************************************\
+**************************** Coordinate Structures *****************************
+\******************************************************************************/
+
+typedef struct _gcsPOINT
+{
+ gctINT32 x;
+ gctINT32 y;
+}
+gcsPOINT;
+
+typedef struct _gcsSIZE
+{
+ gctINT32 width;
+ gctINT32 height;
+}
+gcsSIZE;
+
+typedef struct _gcsRECT
+{
+ gctINT32 left;
+ gctINT32 top;
+ gctINT32 right;
+ gctINT32 bottom;
+}
+gcsRECT;
+
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*------------------------------- gcoSURF Common ------------------------------*/
+
+/* Color format classes. */
+typedef enum _gceFORMAT_CLASS
+{
+ gcvFORMAT_CLASS_RGBA = 4500,
+ gcvFORMAT_CLASS_YUV,
+ gcvFORMAT_CLASS_INDEX,
+ gcvFORMAT_CLASS_LUMINANCE,
+ gcvFORMAT_CLASS_BUMP,
+ gcvFORMAT_CLASS_DEPTH,
+}
+gceFORMAT_CLASS;
+
+/* Special enums for width field in gcsFORMAT_COMPONENT. */
+typedef enum _gceCOMPONENT_CONTROL
+{
+ gcvCOMPONENT_NOTPRESENT = 0x00,
+ gcvCOMPONENT_DONTCARE = 0x80,
+ gcvCOMPONENT_WIDTHMASK = 0x7F,
+ gcvCOMPONENT_ODD = 0x80
+}
+gceCOMPONENT_CONTROL;
+
+/* Color format component parameters. */
+typedef struct _gcsFORMAT_COMPONENT
+{
+ gctUINT8 start;
+ gctUINT8 width;
+}
+gcsFORMAT_COMPONENT;
+
+/* RGBA color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_RGBA
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT red;
+ gcsFORMAT_COMPONENT green;
+ gcsFORMAT_COMPONENT blue;
+}
+gcsFORMAT_CLASS_TYPE_RGBA;
+
+/* YUV color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_YUV
+{
+ gcsFORMAT_COMPONENT y;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT v;
+}
+gcsFORMAT_CLASS_TYPE_YUV;
+
+/* Index color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_INDEX
+{
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_INDEX;
+
+/* Luminance color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_LUMINANCE
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_LUMINANCE;
+
+/* Bump map color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_BUMP
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT l;
+ gcsFORMAT_COMPONENT v;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT q;
+ gcsFORMAT_COMPONENT w;
+}
+gcsFORMAT_CLASS_TYPE_BUMP;
+
+/* Depth and stencil format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_DEPTH
+{
+ gcsFORMAT_COMPONENT depth;
+ gcsFORMAT_COMPONENT stencil;
+}
+gcsFORMAT_CLASS_TYPE_DEPTH;
+
+/* Format parameters. */
+typedef struct _gcsSURF_FORMAT_INFO
+{
+ /* Format code and class. */
+ gceSURF_FORMAT format;
+ gceFORMAT_CLASS fmtClass;
+
+ /* The size of one pixel in bits. */
+ gctUINT8 bitsPerPixel;
+
+ /* Component swizzle. */
+ gceSURF_SWIZZLE swizzle;
+
+ /* Some formats have two neighbour pixels interleaved together. */
+ /* To describe such format, set the flag to 1 and add another */
+ /* like this one describing the odd pixel format. */
+ gctUINT8 interleaved;
+
+ /* Format components. */
+ union
+ {
+ gcsFORMAT_CLASS_TYPE_BUMP bump;
+ gcsFORMAT_CLASS_TYPE_RGBA rgba;
+ gcsFORMAT_CLASS_TYPE_YUV yuv;
+ gcsFORMAT_CLASS_TYPE_LUMINANCE lum;
+ gcsFORMAT_CLASS_TYPE_INDEX index;
+ gcsFORMAT_CLASS_TYPE_DEPTH depth;
+ } u;
+}
+gcsSURF_FORMAT_INFO;
+
+/* Frame buffer information. */
+typedef struct _gcsSURF_FRAMEBUFFER
+{
+ gctPOINTER logical;
+ gctUINT width, height;
+ gctINT stride;
+ gceSURF_FORMAT format;
+}
+gcsSURF_FRAMEBUFFER;
+
+/* Generic pixel component descriptors. */
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XXX8;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XX8X;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_X8XX;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_8XXX;
+
+typedef enum _gceORIENTATION
+{
+ gcvORIENTATION_TOP_BOTTOM,
+ gcvORIENTATION_BOTTOM_TOP,
+}
+gceORIENTATION;
+
+
+/* Construct a new gcoSURF object. */
+gceSTATUS
+gcoSURF_Construct(
+ IN gcoHAL Hal,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+/* Destroy an gcoSURF object. */
+gceSTATUS
+gcoSURF_Destroy(
+ IN gcoSURF Surface
+ );
+
+/* Map user-allocated surface. */
+gceSTATUS
+gcoSURF_MapUserSurface(
+ IN gcoSURF Surface,
+ IN gctUINT Alignment,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Set the color type of the surface. */
+gceSTATUS
+gcoSURF_SetColorType(
+ IN gcoSURF Surface,
+ IN gceSURF_COLOR_TYPE ColorType
+ );
+
+/* Get the color type of the surface. */
+gceSTATUS
+gcoSURF_GetColorType(
+ IN gcoSURF Surface,
+ OUT gceSURF_COLOR_TYPE *ColorType
+ );
+
+/* Set the surface ration angle. */
+gceSTATUS
+gcoSURF_SetRotation(
+ IN gcoSURF Surface,
+ IN gceSURF_ROTATION Rotation
+ );
+
+/* Verify and return the state of the tile status mechanism. */
+gceSTATUS
+gcoSURF_IsTileStatusSupported(
+ IN gcoSURF Surface
+ );
+
+/* Enable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_EnableTileStatus(
+ IN gcoSURF Surface
+ );
+
+/* Disable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_DisableTileStatus(
+ IN gcoSURF Surface,
+ IN gctBOOL Decompress
+ );
+
+/* Get surface size. */
+gceSTATUS
+gcoSURF_GetSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctUINT * Depth
+ );
+
+/* Get surface aligned sizes. */
+gceSTATUS
+gcoSURF_GetAlignedSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctINT * Stride
+ );
+
+/* Get surface type and format. */
+gceSTATUS
+gcoSURF_GetFormat(
+ IN gcoSURF Surface,
+ OUT gceSURF_TYPE * Type,
+ OUT gceSURF_FORMAT * Format
+ );
+
+/* Lock the surface. */
+gceSTATUS
+gcoSURF_Lock(
+ IN gcoSURF Surface,
+ IN OUT gctUINT32 * Address,
+ IN OUT gctPOINTER * Memory
+ );
+
+/* Unlock the surface. */
+gceSTATUS
+gcoSURF_Unlock(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory
+ );
+
+/* Return pixel format parameters. */
+gceSTATUS
+gcoSURF_QueryFormat(
+ IN gceSURF_FORMAT Format,
+ OUT gcsSURF_FORMAT_INFO_PTR * Info
+ );
+
+/* Compute the color pixel mask. */
+gceSTATUS
+gcoSURF_ComputeColorMask(
+ IN gcsSURF_FORMAT_INFO_PTR Format,
+ OUT gctUINT32_PTR ColorMask
+ );
+
+/* Check the surface is renderable or not. */
+gceSTATUS
+gcoSURF_IsRenderable(
+ IN gcoSURF Surface
+ );
+
+/* Flush the surface. */
+gceSTATUS
+gcoSURF_Flush(
+ IN gcoSURF Surface
+ );
+
+/* Fill surface with a value. */
+gceSTATUS
+gcoSURF_Fill(
+ IN gcoSURF Surface,
+ IN gcsPOINT_PTR Origin,
+ IN gcsSIZE_PTR Size,
+ IN gctUINT32 Value,
+ IN gctUINT32 Mask
+ );
+
+/* Alpha blend two surfaces together. */
+gceSTATUS
+gcoSURF_Blend(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrig,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsSIZE_PTR Size,
+ IN gceSURF_BLEND_MODE Mode
+ );
+
+/* Create a new gcoSURF wrapper object. */
+gceSTATUS
+gcoSURF_ConstructWrapper(
+ IN gcoHAL Hal,
+ OUT gcoSURF * Surface
+ );
+
+/* Set the underlying buffer for the surface wrapper. */
+gceSTATUS
+gcoSURF_SetBuffer(
+ IN gcoSURF Surface,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Stride,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Set the size of the surface in pixels and map the underlying buffer. */
+gceSTATUS
+gcoSURF_SetWindow(
+ IN gcoSURF Surface,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height
+ );
+
+/* Increase reference count of the surface. */
+gceSTATUS
+gcoSURF_ReferenceSurface(
+ IN gcoSURF Surface
+ );
+
+/* Decrease reference count of the surface. */
+gceSTATUS
+gcoSURF_DereferenceSurface(
+ IN gcoSURF Surface
+ );
+
+
+/* Get surface reference count. */
+gceSTATUS
+gcoSURF_QueryReferenceCount(
+ IN gcoSURF Surface,
+ OUT gctINT32 * ReferenceCount
+ );
+
+/* Set surface orientation. */
+gceSTATUS
+gcoSURF_SetOrientation(
+ IN gcoSURF Surface,
+ IN gceORIENTATION Orientation
+ );
+
+/* Set surface resolve offset */
+gceSTATUS
+gcoSURF_SetFace(
+ IN gcoSURF Surface,
+ IN gctUINT Face
+ );
+
+/* Query surface orientation. */
+gceSTATUS
+gcoSURF_QueryOrientation(
+ IN gcoSURF Surface,
+ OUT gceORIENTATION * Orientation
+ );
+ /* #define DUMP_SURFACE 0 */
+
+/* Dump a buffer to a BMP file */
+int gcoOS_DumpBMP(
+ IN gctPOINTER dumpBase,
+ IN gctINT dumpWidth,
+ IN gctINT dumpHeight,
+ IN gctINT dumpStride,
+ IN gceSURF_FORMAT format,
+ IN gceORIENTATION orientation,
+ IN gctCONST_STRING fileName
+ );
+
+
+/* Dump surface to a BMP file. */
+gceSTATUS
+gcoSURF_DumpSurface(
+ IN gcoSURF Surface,
+ IN gctBOOL bCheckOrientation,
+ IN gctCONST_STRING fileName
+ );
+
+/******************************************************************************\
+********************************* gcoDUMP Object ********************************
+\******************************************************************************/
+
+/* Construct a new gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Construct(
+ IN gcoOS Os,
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Destroy a gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Destroy(
+ IN gcoDUMP Dump
+ );
+
+/* Enable/disable dumping. */
+gceSTATUS
+gcoDUMP_Control(
+ IN gcoDUMP Dump,
+ IN gctSTRING FileName
+ );
+
+gceSTATUS
+gcoDUMP_IsEnabled(
+ IN gcoDUMP Dump,
+ OUT gctBOOL * Enabled
+ );
+
+/* Add surface. */
+gceSTATUS
+gcoDUMP_AddSurface(
+ IN gcoDUMP Dump,
+ IN gctINT32 Width,
+ IN gctINT32 Height,
+ IN gceSURF_FORMAT PixelFormat,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount
+ );
+
+/* Mark the beginning of a frame. */
+gceSTATUS
+gcoDUMP_FrameBegin(
+ IN gcoDUMP Dump
+ );
+
+/* Mark the end of a frame. */
+gceSTATUS
+gcoDUMP_FrameEnd(
+ IN gcoDUMP Dump
+ );
+
+/* Dump data. */
+gceSTATUS
+gcoDUMP_DumpData(
+ IN gcoDUMP Dump,
+ IN gceDUMP_TAG Type,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Delete an address. */
+gceSTATUS
+gcoDUMP_Delete(
+ IN gcoDUMP Dump,
+ IN gctUINT32 Address
+ );
+
+/******************************************************************************\
+******************************* gcsRECT Structure ******************************
+\******************************************************************************/
+
+/* Initialize rectangle structure. */
+gceSTATUS
+gcsRECT_Set(
+ OUT gcsRECT_PTR Rect,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Return the width of the rectangle. */
+gceSTATUS
+gcsRECT_Width(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Width
+ );
+
+/* Return the height of the rectangle. */
+gceSTATUS
+gcsRECT_Height(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Height
+ );
+
+/* Ensure that top left corner is to the left and above the right bottom. */
+gceSTATUS
+gcsRECT_Normalize(
+ IN OUT gcsRECT_PTR Rect
+ );
+
+/* Compare two rectangles. */
+gceSTATUS
+gcsRECT_IsEqual(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * Equal
+ );
+
+/* Compare the sizes of two rectangles. */
+gceSTATUS
+gcsRECT_IsOfEqualSize(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * EqualSize
+ );
+
+
+/******************************************************************************\
+**************************** gcsBOUNDARY Structure *****************************
+\******************************************************************************/
+
+typedef struct _gcsBOUNDARY
+{
+ gctINT x;
+ gctINT y;
+ gctINT width;
+ gctINT height;
+}
+gcsBOUNDARY;
+
+/******************************************************************************\
+********************************* gcoHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gcoHEAP * gcoHEAP;
+
+/* Construct a new gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Construct(
+ IN gcoOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gcoHEAP * Heap
+ );
+
+/* Destroy an gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Destroy(
+ IN gcoHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoHEAP_Allocate(
+ IN gcoHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoHEAP_Free(
+ IN gcoHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+/* Profile the heap. */
+gceSTATUS
+gcoHEAP_ProfileStart(
+ IN gcoHEAP Heap
+ );
+
+gceSTATUS
+gcoHEAP_ProfileEnd(
+ IN gcoHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+
+#if defined gcdHAL_TEST
+gceSTATUS
+gcoHEAP_Test(
+ IN gcoHEAP Heap,
+ IN gctSIZE_T Vectors,
+ IN gctSIZE_T MaxSize
+ );
+#endif
+
+/******************************************************************************\
+******************************* Debugging Macros *******************************
+\******************************************************************************/
+
+void
+gcoOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gcoOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gcoOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+/*******************************************************************************
+**
+** gcmFATAL
+**
+** Print a message to the debugger and execute a break point.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcdDEBUG
+# define gcmFATAL gcoOS_DebugFatal
+# define gcmkFATAL gckOS_DebugFatal
+#elif gcdHAS_ELLIPSES
+# define gcmFATAL(...)
+# define gcmkFATAL(...)
+#else
+ gcmINLINE static void
+ __dummy_fatal(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmFATAL __dummy_fatal
+# define gcmkFATAL __dummy_fatal
+#endif
+
+#define gcmENUM2TEXT(e) case e: return #e
+
+/*******************************************************************************
+**
+** gcmTRACE
+**
+** Print a message to the debugfer if the correct level has been set. In
+** retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** level Level of message.
+** message Message.
+** ... Optional arguments.
+*/
+#define gcvLEVEL_NONE -1
+#define gcvLEVEL_ERROR 0
+#define gcvLEVEL_WARNING 1
+#define gcvLEVEL_INFO 2
+#define gcvLEVEL_VERBOSE 3
+
+void
+gckOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+void
+
+gcoOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcdDEBUG
+# define gcmTRACE gcoOS_DebugTrace
+# define gcmkTRACE gckOS_DebugTrace
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE(...)
+# define gcmkTRACE(...)
+#else
+ gcmINLINE static void
+ __dummy_trace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmTRACE __dummy_trace
+# define gcmkTRACE __dummy_trace
+#endif
+
+/* Debug zones. */
+#define gcvZONE_OS (1 << 0)
+#define gcvZONE_HARDWARE (1 << 1)
+#define gcvZONE_HEAP (1 << 2)
+
+/* Kernel zones. */
+#define gcvZONE_KERNEL (1 << 3)
+#define gcvZONE_VIDMEM (1 << 4)
+#define gcvZONE_COMMAND (1 << 5)
+#define gcvZONE_DRIVER (1 << 6)
+#define gcvZONE_CMODEL (1 << 7)
+#define gcvZONE_MMU (1 << 8)
+#define gcvZONE_EVENT (1 << 9)
+#define gcvZONE_DEVICE (1 << 10)
+
+/* User zones. */
+#define gcvZONE_HAL (1 << 3)
+#define gcvZONE_BUFFER (1 << 4)
+#define gcvZONE_CONTEXT (1 << 5)
+#define gcvZONE_SURFACE (1 << 6)
+#define gcvZONE_INDEX (1 << 7)
+#define gcvZONE_STREAM (1 << 8)
+#define gcvZONE_TEXTURE (1 << 9)
+#define gcvZONE_2D (1 << 10)
+#define gcvZONE_3D (1 << 11)
+#define gcvZONE_COMPILER (1 << 12)
+#define gcvZONE_MEMORY (1 << 13)
+#define gcvZONE_STATE (1 << 14)
+#define gcvZONE_AUX (1 << 15)
+
+/* API definitions. */
+#define gcvZONE_API_HAL (0 << 28)
+#define gcvZONE_API_EGL (1 << 28)
+#define gcvZONE_API_ES11 (2 << 28)
+#define gcvZONE_API_ES20 (3 << 28)
+#define gcvZONE_API_VG11 (4 << 28)
+#define gcvZONE_API_GL (5 << 28)
+#define gcvZONE_API_DFB (6 << 28)
+#define gcvZONE_API_GDI (7 << 28)
+#define gcvZONE_API_D3D (8 << 28)
+
+#define gcmZONE_GET_API(zone) ((zone) >> 28)
+#define gcdZONE_MASK 0x0FFFFFFF
+
+/* Handy zones. */
+#define gcvZONE_NONE 0
+#define gcvZONE_ALL gcdZONE_MASK
+
+/*******************************************************************************
+**
+** gcmTRACE_ZONE
+**
+** Print a message to the debugger if the correct level and zone has been
+** set. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** Level Level of message.
+** Zone Zone of message.
+** Message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcdDEBUG
+# define gcmTRACE_ZONE gcoOS_DebugTraceZone
+# define gcmkTRACE_ZONE gckOS_DebugTraceZone
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE_ZONE(...)
+# define gcmkTRACE_ZONE(...)
+#else
+ gcmINLINE static void
+ __dummy_trace_zone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmTRACE_ZONE __dummy_trace_zone
+# define gcmkTRACE_ZONE __dummy_trace_zone
+#endif
+
+/******************************************************************************\
+******************************** Logging Macros ********************************
+\******************************************************************************/
+
+#define gcdHEADER_LEVEL gcvLEVEL_VERBOSE
+
+#define gcmHEADER() \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmHEADER_ARG(Text, ...) \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_header_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmHEADER_ARG __dummy_header_arg
+#endif
+
+#define gcmFOOTER() \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d", \
+ __FUNCTION__, __LINE__, status)
+
+#define gcmFOOTER_NO() \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmFOOTER_ARG(Text, ...) \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, \
+ __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_footer_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmFOOTER_ARG __dummy_footer_arg
+#endif
+
+#define gcmkHEADER() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmkHEADER_ARG(Text, ...) \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_kheader_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkHEADER_ARG __dummy_kheader_arg
+#endif
+
+#define gcmkFOOTER() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d", \
+ __FUNCTION__, __LINE__, status)
+
+#define gcmkFOOTER_NO() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmkFOOTER_ARG(Text, ...) \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, \
+ __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_kfooter_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkFOOTER_ARG __dummy_kfooter_arg
+#endif
+
+#define gcmOPT_VALUE(ptr) (((ptr) == gcvNULL) ? 0 : *(ptr))
+#define gcmOPT_POINTER(ptr) (((ptr) == gcvNULL) ? gcvNULL : *(ptr))
+
+void
+gcoOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+void
+gckOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+#define gcmPRINT gcoOS_Print
+#define gcmkPRINT gckOS_Print
+
+/*******************************************************************************
+**
+** gcmDUMP
+**
+** Print a dump message.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+#if gcdDUMP
+ gceSTATUS
+ gcfDump(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ ...
+ );
+# define gcmDUMP gcfDump
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP(...)
+#else
+ gcmINLINE static void
+ __dummy_dump(
+ IN gcoOS Os,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP __dummy_dump
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_DATA
+**
+** Add data to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP
+ gceSTATUS
+ gcfDumpData(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_DATA gcfDumpData
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_DATA(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_data(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_DATA __dummy_dump_data
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_BUFFER
+**
+** Print a buffer to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctUINT32 Physical
+** Physical address of buffer.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctUINT32 Offset
+** Offset into buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP
+gceSTATUS
+gcfDumpBuffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_BUFFER gcfDumpBuffer
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_BUFFER(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_buffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_BUFFER __dummy_dump_buffer
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API
+**
+** Print a dump message for a high level API prefixed by the function name.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpApi(
+ IN gctCONST_STRING String,
+ ...
+ );
+# define gcmDUMP_API gcfDumpApi
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP_API __dummy_dump_api
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY
+**
+** Print an array of data.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Size.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpArray(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Size
+ );
+# define gcmDUMP_API_ARRAY gcfDumpArray
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Size
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY __dummy_dump_api_array
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY_TOKEN
+**
+** Print an array of data terminated by a token.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Termination.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpArrayToken(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Termination
+ );
+# define gcmDUMP_API_ARRAY_TOKEN gcfDumpArrayToken
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY_TOKEN(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array_token(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Termination
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY_TOKEN __dummy_dump_api_array_token
+#endif
+
+/*******************************************************************************
+**
+** gcmTRACE_RELEASE
+**
+** Print a message to the shader debugger.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+#define gcmTRACE_RELEASE gcoOS_DebugShaderTrace
+
+void
+gcoOS_DebugShaderTrace(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_SetDebugShaderFiles(
+ IN gctCONST_STRING VSFileName,
+ IN gctCONST_STRING FSFileName
+ );
+
+void
+gcoOS_SetDebugShaderFileType(
+ IN gctUINT32 ShaderType
+ );
+
+/*******************************************************************************
+**
+** gcmBREAK
+**
+** Break into the debugger. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** None.
+*/
+
+void
+gcoOS_DebugBreak(
+ void
+ );
+
+void
+gckOS_DebugBreak(
+ void
+ );
+
+#if gcdDEBUG
+# define gcmBREAK gcoOS_DebugBreak
+# define gcmkBREAK gckOS_DebugBreak
+#else
+# define gcmBREAK()
+# define gcmkBREAK()
+#endif
+
+/*******************************************************************************
+**
+** gcmASSERT
+**
+** Evaluate an expression and break into the debugger if the expression
+** evaluates to false. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcdDEBUG
+# define _gcmASSERT(prefix, exp) \
+ do \
+ { \
+ if (!(exp)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ASSERT at %s(%d) in " __FILE__, \
+ __FUNCTION__, __LINE__); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ "(%s)", #exp); \
+ prefix##BREAK(); \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmASSERT(exp) _gcmASSERT(gcm, exp)
+# define gcmkASSERT(exp) _gcmASSERT(gcmk, exp)
+#else
+# define gcmASSERT(exp)
+# define gcmkASSERT(exp)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY
+**
+** Verify if an expression returns true. If the expression does not
+** evaluates to true, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcdDEBUG
+# define gcmVERIFY(exp) gcmASSERT(exp)
+# define gcmkVERIFY(exp) gcmkASSERT(exp)
+#else
+# define gcmVERIFY(exp) exp
+# define gcmkVERIFY(exp) exp
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY_OK
+**
+** Verify a fucntion returns gcvSTATUS_OK. If the function does not return
+** gcvSTATUS_OK, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+
+void
+gcoOS_Verify(
+ IN gceSTATUS Status
+ );
+
+void
+gckOS_Verify(
+ IN gceSTATUS Status
+ );
+
+#if gcdDEBUG
+# define gcmVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ gcoOS_Verify(verifyStatus); \
+ gcmASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+# define gcmkVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ gckOS_Verify(verifyStatus); \
+ gcmkASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+#else
+# define gcmVERIFY_OK(func) func
+
+# define gcmkVERIFY_OK(func) func
+#endif
+
+/*******************************************************************************
+**
+** gcmERR_BREAK
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_BREAK(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_BREAK: status=%d @ %s(%d) in " __FILE__, \
+ status, __FUNCTION__, __LINE__); \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_BREAK(func) _gcmERR_BREAK(gcm, func)
+#define gcmkERR_BREAK(func) _gcmERR_BREAK(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmERR_RETURN
+**
+** Executes a return on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d @ %s(%d) in " __FILE__, \
+ status, __FUNCTION__, __LINE__); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_RETURN(func) _gcmERR_RETURN(gcm, func)
+#define gcmkERR_RETURN(func) _gcmERR_RETURN(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmONERROR
+**
+** Jump to the error handler in case there is an error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmONERROR(prefix, func) \
+ do \
+ { \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##LOG(_GFX_LOG_ERROR_, \
+ "[GC_" #prefix "ONERROR\t] %s(%d): status=%d", \
+ __FUNCTION__, __LINE__, status); \
+ goto OnError; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmONERROR(func) _gcmONERROR(gcm, func)
+#define gcmkONERROR(func) _gcmONERROR(gcmk, func)
+
+
+/*******************************************************************************
+**
+** gcmVERIFY_LOCK
+**
+** Verifies whether the surface is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_LOCK(surfaceInfo) \
+ if (!surfaceInfo->node.valid) \
+ { \
+ status = gcvSTATUS_MEMORY_UNLOCKED; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmVERIFY_NODE_LOCK
+**
+** Verifies whether the surface node is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_NODE_LOCK(surfaceNode) \
+ if (!surfaceNode->valid) \
+ { \
+ status = gcvSTATUS_MEMORY_UNLOCKED; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmBADOBJECT_BREAK
+**
+** Executes a break statement on bad object.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#define gcmBADOBJECT_BREAK(obj, t) \
+ if ((obj == gcvNULL) \
+ || (((gcsOBJECT *)(obj))->type != t) \
+ ) \
+ { \
+ status = gcvSTATUS_INVALID_OBJECT; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmCHECK_STATUS
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmCHECK_STATUS(prefix, func) \
+ do \
+ { \
+ last = func; \
+ if (gcmIS_ERROR(last)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "CHECK_STATUS: status=%d @ %s(%d) in " __FILE__, \
+ last, __FUNCTION__, __LINE__); \
+ status = last; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmCHECK_STATUS(func) _gcmCHECK_STATUS(gcm, func)
+#define gcmkCHECK_STATUS(func) _gcmCHECK_STATUS(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_ARGUMENT(prefix, arg) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, #prefix "VERIFY_ARGUMENT failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_ARGUMENT); \
+ return gcvSTATUS_INVALID_ARGUMENT; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcm, arg)
+# define gcmkVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcmk, arg)
+#else
+# define gcmVERIFY_ARGUMENT(arg)
+# define gcmkVERIFY_ARGUMENT(arg)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT_RETURN
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_ARGUMENT_RETURN(prefix, arg, value) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "gcmVERIFY_ARGUMENT_RETURN failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("value=%d", value); \
+ return value; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcm, arg, value)
+# define gcmkVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcmk, arg, value)
+#else
+# define gcmVERIFY_ARGUMENT_RETURN(arg, value)
+# define gcmkVERIFY_ARGUMENT_RETURN(arg, value)
+#endif
+void gcoOS_Log(IN unsigned int filter, IN const char* msg,
+ ...
+ );
+
+void gckOS_Log(IN unsigned int filter, IN const char* msg,
+ ...
+ );
+
+void gcoOS_SetLogFilter(IN unsigned int filter);
+
+void gckOS_SetLogFilter(IN unsigned int filter);
+
+#define gcmLOG gcoOS_Log
+#define gcmkLOG gckOS_Log
+
+#define _gcmLOG_STATUS(prefix, tag, filter) \
+ do \
+ { \
+ prefix##LOG(filter, \
+ "[GC_" #tag "\t] %s@%d: status=%d\n", \
+ __FUNCTION__, __LINE__, status); \
+ } \
+ while (gcvFALSE)
+
+#define gcmLOG_WARNING_STATUS() _gcmLOG_STATUS(gcm, WARNING, _GFX_LOG_WARNING_)
+#define gcmLOG_ERROR_STATUS() _gcmLOG_STATUS(gcm, ERR_RETURN, _GFX_LOG_ERROR_)
+
+#define gcmkLOG_WARNING_STATUS() _gcmLOG_STATUS(gcmk, WARNING, _GFX_LOG_WARNING_)
+#define gcmkLOG_ERROR_STATUS() _gcmLOG_STATUS(gcmk, ERR_RETURN, _GFX_LOG_ERROR_)
+
+#if gcdHAS_ELLIPSES
+#define _gcmLOG_ARGS(prefix, tag, filter, TEXT, ...) \
+ do \
+ { \
+ prefix##LOG(filter, \
+ "[GC_" #tag "\t] %s@%d: " TEXT "\n", \
+ __FUNCTION__, __LINE__, ##__VA_ARGS__); \
+ } \
+ while (gcvFALSE)
+
+#define gcmLOG_WARNING_ARGS(TEXT, ...) _gcmLOG_ARGS(gcm, WARNING, _GFX_LOG_WARNING_, TEXT, ##__VA_ARGS__)
+#define gcmLOG_ERROR_ARGS(TEXT, ...) _gcmLOG_ARGS(gcm, ERR_RETURN, _GFX_LOG_ERROR_, TEXT, ##__VA_ARGS__)
+
+#define gcmkLOG_WARNING_ARGS(TEXT, ...) _gcmLOG_ARGS(gcmk, WARNING, _GFX_LOG_WARNING_, TEXT, ##__VA_ARGS__)
+#define gcmkLOG_ERROR_ARGS(TEXT, ...) _gcmLOG_ARGS(gcmk, ERR_RETURN, _GFX_LOG_ERROR_, TEXT, ##__VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_log_args(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+#define gcmLOG_WARNING_ARGS __dummy_log_args
+#define gcmLOG_ERROR_ARGS __dummy_log_args
+#define gcmkLOG_WARNING_ARGS __dummy_log_args
+#define gcmkLOG_ERROR_ARGS __dummy_log_args
+#endif
+
+ /* Logging service */
+#define _GFX_LOG_NONE_ 0x00000000
+#define _GFX_LOG_ERROR_ 0x00000001
+#define _GFX_LOG_WARNING_ 0x00000002
+#define _GFX_LOG_EGL_API_ 0x00000004
+#define _GFX_LOG_NATIVE_API_ 0x00000008
+#define _GFX_LOG_OES_API_ 0x00000010
+#define _GFX_LOG_VG_API_ 0x00000020
+#define _GFX_LOG_CONFIG_ 0x00000040
+#define _GFX_LOG_INFO_ 0x00000080
+#define _GFX_LOG_NOTIFY_ 0x00000100
+#define _GFX_LOG_ALL_ 0xffffffff
+
+
+#if MRVL_ENABLE_EGL_API_LOG
+#define EGL_API_LOG(x) gcoOS_Log x
+#else
+#define EGL_API_LOG(x)
+#endif
+#define EGL_LOG(x) gcoOS_Log x
+
+
+#if MRVL_ENABLE_OES1_API_LOG
+#define OES11_API_LOG(x) gcoOS_Log x
+#else
+#define OES11_API_LOG(x)
+#endif
+#define OES11_LOG(x) gcoOS_Log x
+
+#if MRVL_ENABLE_OES2_API_LOG
+#define OES20_API_LOG(x) gcoOS_Log x
+#else
+#define OES20_API_LOG(x)
+#endif
+#define OES20_LOG(x) gcoOS_Log x
+
+#if MRVL_ENABLE_OVG_API_LOG
+#define OVG_API_LOG(x) gcoOS_Log x
+#else
+#define OVG_API_LOG(x)
+#endif
+#define OVG_LOG(x) gcoOS_Log x
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_base_h_ */
diff --git a/src/include_dove/gc_hal_compiler.h b/src/include_dove/gc_hal_compiler.h
new file mode 100644
index 0000000..6bc96b2
--- /dev/null
+++ b/src/include_dove/gc_hal_compiler.h
@@ -0,0 +1,1841 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+/*
+** Include file the defines the front- and back-end compilers, as well as the
+** objects they use.
+*/
+
+#ifndef __gc_hal_compiler_h_
+#define __gc_hal_compiler_h_
+
+#include "gc_hal_types.h"
+#include "gc_hal_engine.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+|******************************* SHADER LANGUAGE ******************************|
+\******************************************************************************/
+
+/* Possible shader language opcodes. */
+typedef enum _gcSL_OPCODE
+{
+ gcSL_NOP, /* 0x00 */
+ gcSL_MOV, /* 0x01 */
+ gcSL_SAT, /* 0x02 */
+ gcSL_DP3, /* 0x03 */
+ gcSL_DP4, /* 0x04 */
+ gcSL_ABS, /* 0x05 */
+ gcSL_JMP, /* 0x06 */
+ gcSL_ADD, /* 0x07 */
+ gcSL_MUL, /* 0x08 */
+ gcSL_RCP, /* 0x09 */
+ gcSL_SUB, /* 0x0A */
+ gcSL_KILL, /* 0x0B */
+ gcSL_TEXLD, /* 0x0C */
+ gcSL_CALL, /* 0x0D */
+ gcSL_RET, /* 0x0E */
+ gcSL_NORM, /* 0x0F */
+ gcSL_MAX, /* 0x10 */
+ gcSL_MIN, /* 0x11 */
+ gcSL_POW, /* 0x12 */
+ gcSL_RSQ, /* 0x13 */
+ gcSL_LOG, /* 0x14 */
+ gcSL_FRAC, /* 0x15 */
+ gcSL_FLOOR, /* 0x16 */
+ gcSL_CEIL, /* 0x17 */
+ gcSL_CROSS, /* 0x18 */
+ gcSL_TEXLDP, /* 0x19 */
+ gcSL_TEXBIAS, /* 0x1A */
+ gcSL_TEXGRAD, /* 0x1B */
+ gcSL_TEXLOD, /* 0x1C */
+ gcSL_SIN, /* 0x1D */
+ gcSL_COS, /* 0x1E */
+ gcSL_TAN, /* 0x1F */
+ gcSL_EXP, /* 0x20 */
+ gcSL_SIGN, /* 0x21 */
+ gcSL_STEP, /* 0x22 */
+ gcSL_SQRT, /* 0x23 */
+ gcSL_ACOS, /* 0x24 */
+ gcSL_ASIN, /* 0x25 */
+ gcSL_ATAN, /* 0x26 */
+ gcSL_SET, /* 0x27 */
+ gcSL_DSX, /* 0x28 */
+ gcSL_DSY, /* 0x29 */
+ gcSL_FWIDTH, /* 0x2A */
+}
+gcSL_OPCODE;
+
+typedef enum _gcSL_FORMAT
+{
+ gcSL_FLOAT, /* 0 */
+ gcSL_INTEGER, /* 1 */
+ gcSL_BOOLEAN, /* 2 */
+}
+gcSL_FORMAT;
+
+/* Destination write enable bits. */
+typedef enum _gcSL_ENABLE
+{
+ gcSL_ENABLE_X = 0x1,
+ gcSL_ENABLE_Y = 0x2,
+ gcSL_ENABLE_Z = 0x4,
+ gcSL_ENABLE_W = 0x8,
+ /* Combinations. */
+ gcSL_ENABLE_XY = gcSL_ENABLE_X | gcSL_ENABLE_Y,
+ gcSL_ENABLE_XYZ = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XYZW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XYW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_XZ = gcSL_ENABLE_X | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XZW = gcSL_ENABLE_X | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XW = gcSL_ENABLE_X | gcSL_ENABLE_W,
+ gcSL_ENABLE_YZ = gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_YZW = gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_YW = gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_ZW = gcSL_ENABLE_Z | gcSL_ENABLE_W,
+}
+gcSL_ENABLE;
+
+/* Possible indices. */
+typedef enum _gcSL_INDEXED
+{
+ gcSL_NOT_INDEXED, /* 0 */
+ gcSL_INDEXED_X, /* 1 */
+ gcSL_INDEXED_Y, /* 2 */
+ gcSL_INDEXED_Z, /* 3 */
+ gcSL_INDEXED_W, /* 4 */
+}
+gcSL_INDEXED;
+
+/* Opcode conditions. */
+typedef enum _gcSL_CONDITION
+{
+ gcSL_ALWAYS, /* 0x0 */
+ gcSL_NOT_EQUAL, /* 0x1 */
+ gcSL_LESS_OR_EQUAL, /* 0x2 */
+ gcSL_LESS, /* 0x3 */
+ gcSL_EQUAL, /* 0x4 */
+ gcSL_GREATER, /* 0x5 */
+ gcSL_GREATER_OR_EQUAL, /* 0x6 */
+ gcSL_AND, /* 0x7 */
+ gcSL_OR, /* 0x8 */
+ gcSL_XOR, /* 0x9 */
+}
+gcSL_CONDITION;
+
+/* Possible source operand types. */
+typedef enum _gcSL_TYPE
+{
+ gcSL_NONE, /* 0x0 */
+ gcSL_TEMP, /* 0x1 */
+ gcSL_ATTRIBUTE, /* 0x2 */
+ gcSL_UNIFORM, /* 0x3 */
+ gcSL_SAMPLER, /* 0x4 */
+ gcSL_CONSTANT, /* 0x5 */
+ gcSL_OUTPUT, /* 0x6 */
+ gcSL_PHYSICAL, /* 0x7 */
+}
+gcSL_TYPE;
+
+/* Swizzle generator macro. */
+#define gcmSWIZZLE(Component1, Component2, Component3, Component4) \
+( \
+ (gcSL_SWIZZLE_ ## Component1 << 0) | \
+ (gcSL_SWIZZLE_ ## Component2 << 2) | \
+ (gcSL_SWIZZLE_ ## Component3 << 4) | \
+ (gcSL_SWIZZLE_ ## Component4 << 6) \
+)
+
+/* Possible swizzle values. */
+typedef enum _gcSL_SWIZZLE
+{
+ gcSL_SWIZZLE_X, /* 0x0 */
+ gcSL_SWIZZLE_Y, /* 0x1 */
+ gcSL_SWIZZLE_Z, /* 0x2 */
+ gcSL_SWIZZLE_W, /* 0x3 */
+ /* Combinations. */
+ gcSL_SWIZZLE_XXXX = gcmSWIZZLE(X, X, X, X),
+ gcSL_SWIZZLE_YYYY = gcmSWIZZLE(Y, Y, Y, Y),
+ gcSL_SWIZZLE_ZZZZ = gcmSWIZZLE(Z, Z, Z, Z),
+ gcSL_SWIZZLE_WWWW = gcmSWIZZLE(W, W, W, W),
+ gcSL_SWIZZLE_XYYY = gcmSWIZZLE(X, Y, Y, Y),
+ gcSL_SWIZZLE_XZZZ = gcmSWIZZLE(X, Z, Z, Z),
+ gcSL_SWIZZLE_XWWW = gcmSWIZZLE(X, W, W, W),
+ gcSL_SWIZZLE_YZZZ = gcmSWIZZLE(Y, Z, Z, Z),
+ gcSL_SWIZZLE_YWWW = gcmSWIZZLE(Y, W, W, W),
+ gcSL_SWIZZLE_ZWWW = gcmSWIZZLE(Z, W, W, W),
+ gcSL_SWIZZLE_XYZZ = gcmSWIZZLE(X, Y, Z, Z),
+ gcSL_SWIZZLE_XYWW = gcmSWIZZLE(X, Y, W, W),
+ gcSL_SWIZZLE_XZWW = gcmSWIZZLE(X, Z, W, W),
+ gcSL_SWIZZLE_YZWW = gcmSWIZZLE(Y, Z, W, W),
+ gcSL_SWIZZLE_XXYZ = gcmSWIZZLE(X, X, Y, Z),
+ gcSL_SWIZZLE_XYZW = gcmSWIZZLE(X, Y, Z, W),
+ gcSL_SWIZZLE_XYXY = gcmSWIZZLE(X, Y, X, Y),
+}
+gcSL_SWIZZLE;
+
+
+/******************************************************************************\
+|*********************************** SHADERS **********************************|
+\******************************************************************************/
+
+/* Shader types. */
+#define gcSHADER_TYPE_UNKNOWN 0
+#define gcSHADER_TYPE_VERTEX 1
+#define gcSHADER_TYPE_FRAGMENT 2
+
+/* gcSHADER objects. */
+typedef struct _gcSHADER * gcSHADER;
+typedef struct _gcATTRIBUTE * gcATTRIBUTE;
+typedef struct _gcUNIFORM * gcUNIFORM;
+typedef struct _gcOUTPUT * gcOUTPUT;
+typedef struct _gcsFUNCTION * gcFUNCTION;
+typedef struct _gcsHINT * gcsHINT_PTR;
+typedef struct _gcSHADER_PROFILER * gcSHADER_PROFILER;
+typedef struct _gcVARIABLE * gcVARIABLE;
+
+/* gcSHADER_TYPE enumeration. */
+typedef enum _gcSHADER_TYPE
+{
+ gcSHADER_FLOAT_X1, /* 0x00 */
+ gcSHADER_FLOAT_X2, /* 0x01 */
+ gcSHADER_FLOAT_X3, /* 0x02 */
+ gcSHADER_FLOAT_X4, /* 0x03 */
+ gcSHADER_FLOAT_2X2, /* 0x04 */
+ gcSHADER_FLOAT_3X3, /* 0x05 */
+ gcSHADER_FLOAT_4X4, /* 0x06 */
+ gcSHADER_BOOLEAN_X1, /* 0x07 */
+ gcSHADER_BOOLEAN_X2, /* 0x08 */
+ gcSHADER_BOOLEAN_X3, /* 0x09 */
+ gcSHADER_BOOLEAN_X4, /* 0x0A */
+ gcSHADER_INTEGER_X1, /* 0x0B */
+ gcSHADER_INTEGER_X2, /* 0x0C */
+ gcSHADER_INTEGER_X3, /* 0x0D */
+ gcSHADER_INTEGER_X4, /* 0x0E */
+ gcSHADER_SAMPLER_1D, /* 0x0F */
+ gcSHADER_SAMPLER_2D, /* 0x10 */
+ gcSHADER_SAMPLER_3D, /* 0x11 */
+ gcSHADER_SAMPLER_CUBIC, /* 0x12 */
+ gcSHADER_FIXED_X1, /* 0x13 */
+ gcSHADER_FIXED_X2, /* 0x14 */
+ gcSHADER_FIXED_X3, /* 0x15 */
+ gcSHADER_FIXED_X4, /* 0x16 */
+}
+gcSHADER_TYPE;
+
+/* Shader flags. */
+typedef enum _gceSHADER_FLAGS
+{
+ gcvSHADER_DEAD_CODE = 0x01,
+ gcvSHADER_RESOURCE_USAGE = 0x02,
+ gcvSHADER_OPTIMIZER = 0x04,
+ gcvSHADER_USE_GL_Z = 0x08,
+ gcvSHADER_USE_GL_POSITION = 0x10,
+ gcvSHADER_USE_GL_FACE = 0x20,
+ gcvSHADER_USE_GL_POINT_COORD = 0x40,
+}
+gceSHADER_FLAGS;
+
+/* Function argument qualifier */
+typedef enum _gceINPUT_OUTPUT
+{
+ gcvFUNCTION_INPUT,
+ gcvFUNCTION_OUTPUT,
+ gcvFUNCTION_INOUT
+}
+gceINPUT_OUTPUT;
+
+/*******************************************************************************
+** gcSHADER_Construct
+********************************************************************************
+**
+** Construct a new gcSHADER object.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Type of gcSHADER object to cerate. 'ShaderType' can be one of the
+** following:
+**
+** gcSHADER_TYPE_VERTEX Vertex shader.
+** gcSHADER_TYPE_FRAGMENT Fragment shader.
+**
+** OUTPUT:
+**
+** gcSHADER * Shader
+** Pointer to a variable receiving the gcSHADER object pointer.
+*/
+gceSTATUS
+gcSHADER_Construct(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ OUT gcSHADER * Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Destroy
+********************************************************************************
+**
+** Destroy a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Destroy(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Load
+********************************************************************************
+**
+** Load a gcSHADER object from a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containg the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Load(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_Save
+********************************************************************************
+**
+** Save a gcSHADER object to a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer to be used as storage for the gcSHADER
+** object. If 'Buffer' is gcvNULL, the gcSHADER object will not be saved,
+** but the number of bytes required to hold the binary output for the
+** gcSHADER object will be returned.
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable holding the number of bytes allocated in
+** 'Buffer'. Only valid if 'Buffer' is not gcvNULL.
+**
+** OUTPUT:
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable receiving the number of bytes required to hold
+** the binary form of the gcSHADER object.
+*/
+gceSTATUS
+gcSHADER_Save(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN OUT gctSIZE_T * BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_AddAttribute
+********************************************************************************
+**
+** Add an attribute to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the attribute to add.
+**
+** gcSHADER_TYPE Type
+** Type of the attribute to add.
+**
+** gctSIZE_T Length
+** Array length of the attribute to add. 'Length' must be at least 1.
+**
+** gctBOOL IsTexture
+** gcvTRUE if the attribute is used as a texture coordinate, gcvFALSE if not.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_AddAttribute(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctBOOL IsTexture,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttributeCount
+********************************************************************************
+**
+** Get the number of attributes for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of attributes.
+*/
+gceSTATUS
+gcSHADER_GetAttributeCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttribute
+********************************************************************************
+**
+** Get the gcATTRIBUTE object poniter for an indexed attribute for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the attribute to retrieve.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetAttribute(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_GetPositionAttribute
+********************************************************************************
+**
+** Get the gcATTRIBUTE object pointer for the attribute that defines the
+** position.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctUINT * Index
+** Pointer to a variable receiving the index of te gcATTRIBUTE object
+** used as a position.
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetPositionAttribute(
+ IN gcSHADER Shader,
+ OUT gctUINT * Index,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_AddUniform
+********************************************************************************
+**
+** Add an uniform to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the uniform to add.
+**
+** gcSHADER_TYPE Type
+** Type of the uniform to add.
+**
+** gctSIZE_T Length
+** Array length of the uniform to add. 'Length' must be at least 1.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_AddUniform(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniformCount
+********************************************************************************
+**
+** Get the number of uniforms for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of uniforms.
+*/
+gceSTATUS
+gcSHADER_GetUniformCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniform
+********************************************************************************
+**
+** Get the gcUNIFORM object pointer for an indexed uniform for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the uniform to retrieve.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_GetUniform(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOutput
+********************************************************************************
+**
+** Add an output to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the output to add.
+**
+** gcSHADER_TYPE Type
+** Type of the output to add.
+**
+** gctSIZE_T Length
+** Array length of the output to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the output value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOutput(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+gceSTATUS
+gcSHADER_AddOutputIndexed(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gctSIZE_T Index,
+ IN gctUINT16 TempIndex
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutputCount
+********************************************************************************
+**
+** Get the number of outputs for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of outputs.
+*/
+gceSTATUS
+gcSHADER_GetOutputCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutput
+********************************************************************************
+**
+** Get the gcOUTPUT object pointer for an indexed output for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of output to retrieve.
+**
+** OUTPUT:
+**
+** gcOUTPUT * Output
+** Pointer to a variable receiving the gcOUTPUT object pointer.
+*/
+gceSTATUS
+gcSHADER_GetOutput(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcOUTPUT * Output
+ );
+
+/*******************************************************************************
+** gcSHADER_AddVariable
+********************************************************************************
+**
+** Add a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the variable to add.
+**
+** gcSHADER_TYPE Type
+** Type of the variable to add.
+**
+** gctSIZE_T Length
+** Array length of the variable to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the variable value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddVariable(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariableCount
+********************************************************************************
+**
+** Get the number of variables for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of variables.
+*/
+gceSTATUS
+gcSHADER_GetVariableCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariable
+********************************************************************************
+**
+** Get the gcVARIABLE object pointer for an indexed variable for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of variable to retrieve.
+**
+** OUTPUT:
+**
+** gcVARIABLE * Variable
+** Pointer to a variable receiving the gcVARIABLE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetVariable(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcVARIABLE * Variable
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcode
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the target
+** of the opcode.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcode(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddOpcode2(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeIndexed
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object that writes to an dynamically indexed
+** target.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the
+** target of the opcode.
+**
+** gcSL_INDEXED Mode
+** Location of the dynamic index inside the temporary register. Valid
+** values can be:
+**
+** gcSL_INDEXED_X - Use x component of the temporary register.
+** gcSL_INDEXED_Y - Use y component of the temporary register.
+** gcSL_INDEXED_Z - Use z component of the temporary register.
+** gcSL_INDEXED_W - Use w component of the temporary register.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditional
+********************************************************************************
+**
+** Add an conditional opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditional(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddLabel
+********************************************************************************
+**
+** Define a label at the current instruction of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Label
+** Label to define.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddLabel(
+ IN gcSHADER Shader,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSource
+********************************************************************************
+**
+** Add a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSource(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceIndexed
+********************************************************************************
+**
+** Add a dynamically indexed source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_INDEXED Mode
+** Addressing mode for the index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttribute
+********************************************************************************
+**
+** Add an attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttribute(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttributeIndexed
+********************************************************************************
+**
+** Add an indexed attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttributeIndexed(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniform
+********************************************************************************
+**
+** Add a uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniform(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniformIndexed
+********************************************************************************
+**
+** Add an indexed uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniformIndexed(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+gceSTATUS
+gcSHADER_AddSourceSamplerIndexed(
+ IN gcSHADER Shader,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceConstant
+********************************************************************************
+**
+** Add a constant floating pointer value as a source operand to a gcSHADER
+** object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctFLOAT Constant
+** Floating pointer constant.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceConstant(
+ IN gcSHADER Shader,
+ IN gctFLOAT Constant
+ );
+
+/*******************************************************************************
+** gcSHADER_Pack
+********************************************************************************
+**
+** Pack a dynamically created gcSHADER object by trimming the allocated arrays
+** and resolving all the labeling.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Pack(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_SetOptimizationOption
+********************************************************************************
+**
+** Set optimization option of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT OptimizationOption
+** Optimization option. Can be one of the following:
+**
+** 0 - No optimization.
+** 1 - Full optimization.
+** Other value - For optimizer testing.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_SetOptimizationOption(
+ IN gcSHADER Shader,
+ IN gctUINT OptimizationOption
+ );
+
+gceSTATUS
+gcSHADER_AddFunction(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ OUT gcFUNCTION * Function
+ );
+
+gceSTATUS
+gcSHADER_BeginFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+gceSTATUS
+gcSHADER_EndFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the attribute. 'Type'
+** can be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** attribute was declared as an array. If the attribute was not
+** declared as an array, the array length will be 1. 'ArrayLength' can
+** be gcvNULL, in which case no array length will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetType(
+ IN gcATTRIBUTE Attribute,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_GetName
+********************************************************************************
+**
+** Get the name of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the attribute name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the attribute name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetName(
+ IN gcATTRIBUTE Attribute,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_IsEnabled
+********************************************************************************
+**
+** Query the enabled state of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctBOOL * Enabled
+** Pointer to a variable receiving the enabled state of the attribute.
+*/
+gceSTATUS
+gcATTRIBUTE_IsEnabled(
+ IN gcATTRIBUTE Attribute,
+ OUT gctBOOL * Enabled
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the uniform. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** uniform was declared as an array. If the uniform was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetType(
+ IN gcUNIFORM Uniform,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetName
+********************************************************************************
+**
+** Get the name of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the uniform name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the uniform name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetName(
+ IN gcUNIFORM Uniform,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetSampler
+********************************************************************************
+**
+** Get the physical sampler number for a sampler gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctUINT32 * Sampler
+** Pointer to a variable receiving the physical sampler.
+*/
+gceSTATUS
+gcUNIFORM_GetSampler(
+ IN gcUNIFORM Uniform,
+ OUT gctUINT32 * Sampler
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValue
+********************************************************************************
+**
+** Set the value of a uniform in integer.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctINT * Value
+** Pointer to a buffer holding the integer values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValue(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueX
+********************************************************************************
+**
+** Set the value of a uniform in fixed point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFIXED_POINT * Value
+** Pointer to a buffer holding the fixed point values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueX(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN gctFIXED_POINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueF
+********************************************************************************
+**
+** Set the value of a uniform in floating point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFLOAT * Value
+** Pointer to a buffer holding the floating point values for the
+** uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueF(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctFLOAT * Value
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the output. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** output was declared as an array. If the output was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetType(
+ IN gcOUTPUT Output,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetIndex
+********************************************************************************
+**
+** Get the index of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctUINT * Index
+** Pointer to a variable receiving the temporary register index of the
+** output. 'Index' can be gcvNULL,. in which case no index will be
+** returned.
+*/
+gceSTATUS
+gcOUTPUT_GetIndex(
+ IN gcOUTPUT Output,
+ OUT gctUINT * Index
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetName
+********************************************************************************
+**
+** Get the name of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the output name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the output name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetName(
+ IN gcOUTPUT Output,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+*********************************************************** F U N C T I O N S **
+*******************************************************************************/
+
+gceSTATUS
+gcFUNCTION_AddArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 TempIndex,
+ IN gctUINT8 Enable,
+ IN gctUINT8 Qualifier
+ );
+
+gceSTATUS
+gcFUNCTION_GetArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 Index,
+ OUT gctUINT16_PTR Temp,
+ OUT gctUINT8_PTR Enable,
+ OUT gctUINT8_PTR Swizzle
+ );
+
+gceSTATUS
+gcFUNCTION_GetLabel(
+ IN gcFUNCTION Function,
+ OUT gctUINT_PTR Label
+ );
+
+/*******************************************************************************
+** gcCompileShader
+********************************************************************************
+**
+** Compile a shader.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Shader type to compile. Can be one of the following values:
+**
+** gcSHADER_TYPE_VERTEX
+** Compile a vertex shader.
+**
+** gcSHADER_TYPE_FRAGMENT
+** Compile a fragment shader.
+**
+** gctSIZE_T SourceSize
+** Size of the source buffer in bytes.
+**
+** gctCONST_STRING Source
+** Pointer to the buffer containing the shader source code.
+**
+** OUTPUT:
+**
+** gcSHADER * Binary
+** Pointer to a variable receiving the pointer to a gcSHADER object
+** containg the compiled shader code.
+**
+** gctSTRING * Log
+** Pointer to a variable receiving a string pointer containging the
+** compile log.
+*/
+gceSTATUS
+gcCompileShader(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ IN gctSIZE_T SourceSize,
+ IN gctCONST_STRING Source,
+ OUT gcSHADER * Binary,
+ OUT gctSTRING * Log
+ );
+
+/*******************************************************************************
+** gcOptimizeShader
+********************************************************************************
+**
+** Optimize a shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object holding information about the compiled
+** shader.
+**
+** gctFILE LogFile
+** Pointer to an open FILE object.
+*/
+gceSTATUS
+gcOptimizeShader(
+ IN gcSHADER Shader,
+ IN gctFILE LogFile
+ );
+
+/*******************************************************************************
+** gcLinkShaders
+********************************************************************************
+**
+** Link two shaders and generate a harwdare specific state buffer by compiling
+** the compiler generated code through the resource allocator and code
+** generator.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to a gcSHADER object holding information about the compiled
+** vertex shader.
+**
+** gcSHADER FragmentShader
+** Pointer to a gcSHADER object holding information about the compiled
+** fragment shader.
+**
+** gceSHADER_FLAGS Flags
+** Compiler flags. Can be any of the following:
+**
+** gcvSHADER_DEAD_CODE - Dead code elimination.
+** gcvSHADER_RESOURCE_USAGE - Resource usage optimizaion.
+** gcvSHADER_OPTIMIZER - Full optimization.
+** gcvSHADER_USE_GL_Z - Use OpenGL ES Z coordinate.
+** gcvSHADER_USE_GL_POSITION - Use OpenGL ES gl_Position.
+** gcvSHADER_USE_GL_FACE - Use OpenGL ES gl_FaceForward.
+**
+** OUTPUT:
+**
+** gctSIZE_T * StateBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'StateBuffer'.
+**
+** gctPOINTER * StateBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLinkShaders(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gceSHADER_FLAGS Flags,
+ OUT gctSIZE_T * StateBufferSize,
+ OUT gctPOINTER * StateBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+/*******************************************************************************
+** gcLoadShaders
+********************************************************************************
+**
+** Load a pre-compiled and pre-linked shader program into the hardware.
+**
+** INPUT:
+**
+** gcoHAL Hal
+** Pointer to a gcoHAL object.
+**
+** gctSIZE_T StateBufferSize
+** The number of bytes in the 'StateBuffer'.
+**
+** gctPOINTER StateBuffer
+** Pointer to the states that make up the shader program.
+**
+** gcsHINT_PTR Hints
+** Pointer to a gcsHINT structure that contains information required
+** when loading the shader states.
+**
+** gcePRIMITIVE PrimitiveType
+** Primitive type to be rendered.
+*/
+gceSTATUS
+gcLoadShaders(
+ IN gcoHAL Hal,
+ IN gctSIZE_T StateBufferSize,
+ IN gctPOINTER StateBuffer,
+ IN gcsHINT_PTR Hints,
+ IN gcePRIMITIVE PrimitiveType
+ );
+
+/*******************************************************************************
+** gcSaveProgram
+********************************************************************************
+**
+** Save pre-compiled shaders and pre-linked programs to a binary file.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to vertex shader object.
+**
+** gcSHADER FragmentShader
+** Pointer to fragment shader object.
+**
+** gctSIZE_T ProgramBufferSize
+** Number of bytes in 'ProgramBuffer'.
+**
+** gctPOINTER ProgramBuffer
+** Pointer to buffer containing the program states.
+**
+** gcsHINT_PTR Hints
+** Pointer to HINTS structure for program states.
+**
+** OUTPUT:
+**
+** gctPOINTER * Binary
+** Pointer to a variable receiving the binary data to be saved.
+**
+** gctSIZE_T * BinarySize
+** Pointer to a variable receiving the number of bytes inside 'Binary'.
+*/
+gceSTATUS
+gcSaveProgram(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gctSIZE_T ProgramBufferSize,
+ IN gctPOINTER ProgramBuffer,
+ IN gcsHINT_PTR Hints,
+ OUT gctPOINTER * Binary,
+ OUT gctSIZE_T * BinarySize
+ );
+
+/*******************************************************************************
+** gcLoadProgram
+********************************************************************************
+**
+** Load pre-compiled shaders and pre-linked programs from a binary file.
+**
+** INPUT:
+**
+** gctPOINTER Binary
+** Pointer to the binary data loaded.
+**
+** gctSIZE_T BinarySize
+** Number of bytes in 'Binary'.
+**
+** OUTPUT:
+**
+** gcSHADER * VertexShader
+** Pointer to a variable receiving the vertex shader object.
+**
+** gcSHADER * FragmentShader
+** Pointer to a variable receiving the fragment shader object.
+**
+** gctSIZE_T * ProgramBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'ProgramBuffer'.
+**
+** gctPOINTER * ProgramBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLoadProgram(
+ IN gctPOINTER Binary,
+ IN gctSIZE_T BinarySize,
+ OUT gcSHADER * VertexShader,
+ OUT gcSHADER * FragmentShader,
+ OUT gctSIZE_T * ProgramBufferSize,
+ OUT gctPOINTER * ProgramBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_compiler_h_ */
+
diff --git a/src/include_dove/gc_hal_driver.h b/src/include_dove/gc_hal_driver.h
new file mode 100644
index 0000000..bd60d95
--- /dev/null
+++ b/src/include_dove/gc_hal_driver.h
@@ -0,0 +1,640 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_driver_h_
+#define __gc_hal_driver_h_
+
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* I/O Control Codes ******************************
+\******************************************************************************/
+
+#define gcvHAL_CLASS "galcore"
+#define IOCTL_GCHAL_INTERFACE 30000
+#define IOCTL_GCHAL_KERNEL_INTERFACE 30001
+#define IOCTL_GCHAL_TERMINATE 30002
+
+/******************************************************************************\
+********************************* Command Codes ********************************
+\******************************************************************************/
+
+typedef enum _gceHAL_COMMAND_CODES
+{
+ /* Generic query. */
+ gcvHAL_QUERY_VIDEO_MEMORY,
+ gcvHAL_QUERY_CHIP_IDENTITY,
+
+ /* Contiguous memory. */
+ gcvHAL_ALLOCATE_NON_PAGED_MEMORY,
+ gcvHAL_FREE_NON_PAGED_MEMORY,
+ gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY,
+ gcvHAL_FREE_CONTIGUOUS_MEMORY,
+
+ /* Video memory allocation. */
+ gcvHAL_ALLOCATE_VIDEO_MEMORY, /* Enforced alignment. */
+ gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY, /* No alignment. */
+ gcvHAL_FREE_VIDEO_MEMORY,
+
+ /* Physical-to-logical mapping. */
+ gcvHAL_MAP_MEMORY,
+ gcvHAL_UNMAP_MEMORY,
+
+ /* Logical-to-physical mapping. */
+ gcvHAL_MAP_USER_MEMORY,
+ gcvHAL_UNMAP_USER_MEMORY,
+
+ /* Surface lock/unlock. */
+ gcvHAL_LOCK_VIDEO_MEMORY,
+ gcvHAL_UNLOCK_VIDEO_MEMORY,
+
+ /* Event queue. */
+ gcvHAL_EVENT_COMMIT,
+
+ gcvHAL_USER_SIGNAL,
+ gcvHAL_SIGNAL,
+ gcvHAL_WRITE_DATA,
+
+ gcvHAL_COMMIT,
+ gcvHAL_STALL,
+
+ gcvHAL_READ_REGISTER,
+ gcvHAL_WRITE_REGISTER,
+
+ gcvHAL_GET_PROFILE_SETTING,
+ gcvHAL_SET_PROFILE_SETTING,
+
+ gcvHAL_READ_ALL_PROFILE_REGISTERS,
+ gcvHAL_PROFILE_REGISTERS_2D,
+
+ /* Power management. */
+ gcvHAL_SET_POWER_MANAGEMENT_STATE,
+ gcvHAL_QUERY_POWER_MANAGEMENT_STATE,
+
+ gcvHAL_GET_BASE_ADDRESS,
+
+ gcvHAL_SET_IDLE, /* reserved */
+
+ /* Queries. */
+ gcvHAL_QUERY_KERNEL_SETTINGS,
+
+ /* Reset. */
+ gcvHAL_RESET,
+
+ /* Map physical address into handle. */
+ gcvHAL_MAP_PHYSICAL,
+
+ /* Debugger stuff. */
+ gcvHAL_DEBUG,
+
+ /* Cache stuff. */
+ gcvHAL_CACHE,
+
+ gcvHAL_GC_OFF,
+ gcvHAL_GC_ON
+}
+gceHAL_COMMAND_CODES;
+
+/******************************************************************************\
+****************************** Interface Structure *****************************
+\******************************************************************************/
+
+#define gcdMAX_PROFILE_FILE_NAME 128
+
+typedef struct _gcsHAL_INTERFACE
+{
+ /* Command code. */
+ gceHAL_COMMAND_CODES command;
+
+ /* Status value. */
+ gceSTATUS status;
+
+ /* Handle to this interface channel. */
+ gctHANDLE handle;
+
+ /* Pid of the client. */
+ gctUINT32 pid;
+
+ /* Union of command structures. */
+ union _u
+ {
+ /* gcvHAL_GET_BASE_ADDRESS */
+ struct _gcsHAL_GET_BASE_ADDRESS
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctUINT32 baseAddress;
+ }
+ GetBaseAddress;
+
+ /* gcvHAL_QUERY_VIDEO_MEMORY */
+ struct _gcsHAL_QUERY_VIDEO_MEMORY
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctPHYS_ADDR internalPhysical;
+
+ /* Size in bytes of internal memory.*/
+ OUT gctSIZE_T internalSize;
+
+ /* Physical memory address of external memory. */
+ OUT gctPHYS_ADDR externalPhysical;
+
+ /* Size in bytes of external memory.*/
+ OUT gctSIZE_T externalSize;
+
+ /* Physical memory address of contiguous memory. */
+ OUT gctPHYS_ADDR contiguousPhysical;
+
+ /* Size in bytes of contiguous memory.*/
+ OUT gctSIZE_T contiguousSize;
+ }
+ QueryVideoMemory;
+
+ /* gcvHAL_QUERY_CHIP_IDENTITY */
+ struct _gcsHAL_QUERY_CHIP_IDENTITY
+ {
+
+ /* Chip model. */
+ OUT gceCHIPMODEL chipModel;
+
+ /* Revision value.*/
+ OUT gctUINT32 chipRevision;
+
+ /* Supported feature fields. */
+ OUT gctUINT32 chipFeatures;
+
+ /* Supported minor feature fields. */
+ OUT gctUINT32 chipMinorFeatures;
+
+ /* Supported minor feature 1 fields. */
+ OUT gctUINT32 chipMinorFeatures1;
+
+ /* Number of streams supported. */
+ OUT gctUINT32 streamCount;
+
+ /* Total number of temporary registers per thread. */
+ OUT gctUINT32 registerMax;
+
+ /* Maximum number of threads. */
+ OUT gctUINT32 threadCount;
+
+ /* Number of shader cores. */
+ OUT gctUINT32 shaderCoreCount;
+
+ /* Size of the vertex cache. */
+ OUT gctUINT32 vertexCacheSize;
+
+ /* Number of entries in the vertex output buffer. */
+ OUT gctUINT32 vertexOutputBufferSize;
+ }
+ QueryChipIdentity;
+
+ /* gcvHAL_MAP_MEMORY */
+ struct _gcsHAL_MAP_MEMORY
+ {
+ /* Physical memory address to map. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to map. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory. */
+ OUT gctPOINTER logical;
+ }
+ MapMemory;
+
+ /* gcvHAL_UNMAP_MEMORY */
+ struct _gcsHAL_UNMAP_MEMORY
+ {
+ /* Physical memory address to unmap. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to unmap. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory to unmap. */
+ IN gctPOINTER logical;
+ }
+ UnmapMemory;
+
+ /* gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_LINEAR_VIDEO_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctUINT bytes;
+
+ /* Buffer alignment. */
+ IN gctUINT alignment;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateLinearVideoMemory;
+
+ /* gcvHAL_ALLOCATE_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_VIDEO_MEMORY
+ {
+ /* Width of rectangle to allocate. */
+ IN OUT gctUINT width;
+
+ /* Height of rectangle to allocate. */
+ IN OUT gctUINT height;
+
+ /* Depth of rectangle to allocate. */
+ IN gctUINT depth;
+
+ /* Format rectangle to allocate in gceSURF_FORMAT. */
+ IN gceSURF_FORMAT format;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateVideoMemory;
+
+ /* gcvHAL_FREE_VIDEO_MEMORY */
+ struct _gcsHAL_FREE_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+#ifdef __QNXNTO__
+/* TODO: This is part of the unlock - why is it here? */
+ /* Mapped logical address to unmap in user space. */
+ OUT gctPOINTER memory;
+
+ /* Number of bytes to allocated. */
+ OUT gctSIZE_T bytes;
+#endif
+ }
+ FreeVideoMemory;
+
+ /* gcvHAL_LOCK_VIDEO_MEMORY */
+ struct _gcsHAL_LOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Hardware specific address. */
+ OUT gctUINT32 address;
+
+ /* Mapped logical address. */
+ OUT gctPOINTER memory;
+ }
+ LockVideoMemory;
+
+ /* gcvHAL_UNLOCK_VIDEO_MEMORY */
+ struct _gcsHAL_UNLOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Type of surface. */
+ IN gceSURF_TYPE type;
+
+ /* Flag to unlock surface asynchroneously. */
+ IN OUT gctBOOL asynchroneous;
+ }
+ UnlockVideoMemory;
+
+ /* gcvHAL_ALLOCATE_NON_PAGED_MEMORY */
+ struct _gcsHAL_ALLOCATE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT gctPOINTER logical;
+ }
+ AllocateNonPagedMemory;
+
+ /* gcvHAL_FREE_NON_PAGED_MEMORY */
+ struct _gcsHAL_FREE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+ }
+ FreeNonPagedMemory;
+
+ /* gcvHAL_EVENT_COMMIT. */
+ struct _gcsHAL_EVENT_COMMIT
+ {
+ /* Event queue. */
+ IN struct _gcsQUEUE * queue;
+ }
+ Event;
+
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_COMMIT
+ {
+ /* Command buffer. */
+ IN gcoCMDBUF commandBuffer;
+
+ /* Context buffer. */
+ IN gcoCONTEXT contextBuffer;
+
+ /* Process handle. */
+ IN gctHANDLE process;
+ }
+ Commit;
+
+ /* gcvHAL_MAP_USER_MEMORY */
+ struct _gcsHAL_MAP_USER_MEMORY
+ {
+ /* Base address of user memory to map. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to map. */
+ IN gctSIZE_T size;
+
+ /* Info record required by gcvHAL_UNMAP_USER_MEMORY. */
+ OUT gctPOINTER info;
+
+ /* Physical address of mapped memory. */
+ OUT gctUINT32 address;
+ }
+ MapUserMemory;
+
+ /* gcvHAL_UNMAP_USER_MEMORY */
+ struct _gcsHAL_UNMAP_USER_MEMORY
+ {
+ /* Base address of user memory to unmap. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to unmap. */
+ IN gctSIZE_T size;
+
+ /* Info record returned by gcvHAL_MAP_USER_MEMORY. */
+ IN gctPOINTER info;
+
+ /* Physical address of mapped memory as returned by
+ gcvHAL_MAP_USER_MEMORY. */
+ IN gctUINT32 address;
+ }
+ UnmapUserMemory;
+
+#if !USE_NEW_LINUX_SIGNAL
+ /* gcsHAL_USER_SIGNAL */
+ struct _gcsHAL_USER_SIGNAL
+ {
+ /* Command. */
+ gceUSER_SIGNAL_COMMAND_CODES command;
+
+ /* Signal ID. */
+ IN OUT gctINT id;
+
+ /* Reset mode. */
+ IN gctBOOL manualReset;
+
+ /* Signal ID. */
+ IN gceSIGNAL_TYPE signalType;
+
+ /* Wait timedout. */
+ IN gctUINT32 wait;
+
+ /* State. */
+ IN gctBOOL state;
+ }
+ UserSignal;
+#endif
+
+ /* gcvHAL_SIGNAL. */
+ struct _gcsHAL_SIGNAL
+ {
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+
+ /* Reserved. */
+ IN gctSIGNAL auxSignal;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+#if defined(__QNXNTO__)
+ /* Client pulse side-channel connection ID. Set by client in gcoOS_CreateSignal. */
+ IN gctINT32 coid;
+
+ /* Set by server. */
+ IN gctINT32 rcvid;
+#endif
+ /* Event generated from where of pipeline */
+ IN gceKERNEL_WHERE fromWhere;
+ }
+ Signal;
+
+ /* gcvHAL_WRITE_DATA. */
+ struct _gcsHAL_WRITE_DATA
+ {
+ /* Address to write data to. */
+ IN gctUINT32 address;
+
+ IN gctPOINTER kernelAddress;
+ /* Data to write. */
+ IN gctUINT32 data;
+ }
+ WriteData;
+
+ /* gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_ALLOCATE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT gctPOINTER logical;
+
+ }
+ AllocateContiguousMemory;
+
+ /* gcvHAL_FREE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_FREE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+ }
+ FreeContiguousMemory;
+
+ /* gcvHAL_READ_REGISTER */
+ struct _gcsHAL_READ_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ OUT gctUINT32 data;
+ }
+ ReadRegisterData;
+
+ /* gcvHAL_WRITE_REGISTER */
+ struct _gcsHAL_WRITE_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ IN gctUINT32 data;
+ }
+ WriteRegisterData;
+
+ /* gcvHAL_GET_PROFILE_SETTING */
+ struct _gcsHAL_GET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ OUT gctBOOL enable;
+
+ /* The profile file name */
+ OUT gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ GetProfileSetting;
+
+ /* gcvHAL_SET_PROFILE_SETTING */
+ struct _gcsHAL_SET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ IN gctBOOL enable;
+
+ /* The profile file name */
+ IN gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ SetProfileSetting;
+
+ /* gcvHAL_READ_ALL_PROFILE_REGISTERS */
+ struct _gcsHAL_READ_ALL_PROFILE_REGISTERS
+ {
+ /* Data read. */
+ OUT gcsPROFILER_COUNTERS counters;
+ }
+ RegisterProfileData;
+
+ /* gcvHAL_PROFILE_REGISTERS_2D */
+ struct _gcsHAL_PROFILE_REGISTERS_2D
+ {
+ /* Data read. */
+ OUT gcs2D_PROFILE_PTR hwProfile2D;
+ }
+ RegisterProfileData2D;
+
+ /* Power management. */
+ /* gcvHAL_SET_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_SET_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ IN gceCHIPPOWERSTATE state;
+ }
+ SetPowerManagement;
+
+ /* gcvHAL_QUERY_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_QUERY_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ OUT gceCHIPPOWERSTATE state;
+
+ /* Idle query. */
+ OUT gctBOOL isIdle;
+ }
+ QueryPowerManagement;
+
+ /* gcvHAL_QUERY_KERNEL_SETTINGS */
+ struct _gcsHAL_QUERY_KERNEL_SETTINGS
+ {
+ /* Settings.*/
+ OUT gcsKERNEL_SETTINGS settings;
+ }
+ QueryKernelSettings;
+
+ /* gcvHAL_MAP_PHYSICAL */
+ struct _gcsHAL_MAP_PHYSICAL
+ {
+ /* gcvTRUE to map, gcvFALSE to unmap. */
+ IN gctBOOL map;
+
+ /* Physical address. */
+ IN OUT gctPHYS_ADDR physical;
+ }
+ MapPhysical;
+
+ /* gcvHAL_DEBUG */
+ struct _gcsHAL_DEBUG
+ {
+ /* If gcvTRUE, set the debug information. */
+ IN gctBOOL set;
+ IN gctUINT32 level;
+ IN gctUINT32 zones;
+ IN gctBOOL enable;
+
+ /* Message to print if not empty. */
+ IN gctCHAR message[80];
+ }
+ Debug;
+
+ struct _gcsHAL_CACHE
+ {
+ IN gctBOOL invalidate;
+ IN gctHANDLE process;
+ IN gctPOINTER logical;
+ IN gctSIZE_T bytes;
+ }
+ Cache;
+ }
+ u;
+}
+gcsHAL_INTERFACE;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_driver_h_ */
+
diff --git a/src/include_dove/gc_hal_dump.h b/src/include_dove/gc_hal_dump.h
new file mode 100644
index 0000000..2264b60
--- /dev/null
+++ b/src/include_dove/gc_hal_dump.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_dump_h_
+#define __gc_hal_dump_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** FILE LAYOUT:
+**
+** gcsDUMP_FILE structure
+**
+** gcsDUMP_DATA frame
+** gcsDUMP_DATA or gcDUMP_DATA_SIZE records rendingring the frame
+** gctUINT8 data[length]
+*/
+
+#define gcvDUMP_FILE_SIGNATURE gcmCC('g','c','D','B')
+
+typedef struct _gcsDUMP_FILE
+{
+ gctUINT32 signature; /* File signature */
+ gctSIZE_T length; /* Length of file */
+ gctUINT32 frames; /* Number of frames in file */
+}
+gcsDUMP_FILE;
+
+typedef enum _gceDUMP_TAG
+{
+ gcvTAG_SURFACE = gcmCC('s','u','r','f'),
+ gcvTAG_FRAME = gcmCC('f','r','m',' '),
+ gcvTAG_COMMAND = gcmCC('c','m','d',' '),
+ gcvTAG_INDEX = gcmCC('i','n','d','x'),
+ gcvTAG_STREAM = gcmCC('s','t','r','m'),
+ gcvTAG_TEXTURE = gcmCC('t','e','x','t'),
+ gcvTAG_RENDER_TARGET = gcmCC('r','n','d','r'),
+ gcvTAG_DEPTH = gcmCC('z','b','u','f'),
+ gcvTAG_RESOLVE = gcmCC('r','s','l','v'),
+ gcvTAG_DELETE = gcmCC('d','e','l',' '),
+}
+gceDUMP_TAG;
+
+typedef struct _gcsDUMP_SURFACE
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctUINT32 address; /* Address of the surface. */
+ gctINT16 width; /* Width of surface. */
+ gctINT16 height; /* Height of surface. */
+ gceSURF_FORMAT format; /* Surface pixel format. */
+ gctSIZE_T length; /* Number of bytes inside the surface. */
+}
+gcsDUMP_SURFACE;
+
+typedef struct _gcsDUMP_DATA
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctSIZE_T length; /* Number of bytes of data. */
+ gctUINT32 address; /* Address for the data. */
+}
+gcsDUMP_DATA;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_dump_h_ */
+
diff --git a/src/include_dove/gc_hal_engine.h b/src/include_dove/gc_hal_engine.h
new file mode 100644
index 0000000..3fc88f7
--- /dev/null
+++ b/src/include_dove/gc_hal_engine.h
@@ -0,0 +1,1673 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_engine_h_
+#define __gc_hal_engine_h_
+
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoSTREAM * gcoSTREAM;
+typedef struct _gcoVERTEX * gcoVERTEX;
+typedef struct _gcoTEXTURE * gcoTEXTURE;
+typedef struct _gcoINDEX * gcoINDEX;
+typedef struct _gcsVERTEX_ATTRIBUTES * gcsVERTEX_ATTRIBUTES_PTR;
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+/* Shading format. */
+typedef enum _gceSHADING
+{
+ gcvSHADING_SMOOTH,
+ gcvSHADING_FLAT_D3D,
+ gcvSHADING_FLAT_OPENGL,
+}
+gceSHADING;
+
+/* Culling modes. */
+typedef enum _gceCULL
+{
+ gcvCULL_NONE,
+ gcvCULL_CCW,
+ gcvCULL_CW,
+}
+gceCULL;
+
+/* Fill modes. */
+typedef enum _gceFILL
+{
+ gcvFILL_POINT,
+ gcvFILL_WIRE_FRAME,
+ gcvFILL_SOLID,
+}
+gceFILL;
+
+/* Compare modes. */
+typedef enum _gceCOMPARE
+{
+ gcvCOMPARE_NEVER,
+ gcvCOMPARE_NOT_EQUAL,
+ gcvCOMPARE_LESS,
+ gcvCOMPARE_LESS_OR_EQUAL,
+ gcvCOMPARE_EQUAL,
+ gcvCOMPARE_GREATER,
+ gcvCOMPARE_GREATER_OR_EQUAL,
+ gcvCOMPARE_ALWAYS,
+}
+gceCOMPARE;
+
+/* Stencil modes. */
+typedef enum _gceSTENCIL_MODE
+{
+ gcvSTENCIL_NONE,
+ gcvSTENCIL_SINGLE_SIDED,
+ gcvSTENCIL_DOUBLE_SIDED,
+}
+gceSTENCIL_MODE;
+
+/* Stencil operations. */
+typedef enum _gceSTENCIL_OPERATION
+{
+ gcvSTENCIL_KEEP,
+ gcvSTENCIL_REPLACE,
+ gcvSTENCIL_ZERO,
+ gcvSTENCIL_INVERT,
+ gcvSTENCIL_INCREMENT,
+ gcvSTENCIL_DECREMENT,
+ gcvSTENCIL_INCREMENT_SATURATE,
+ gcvSTENCIL_DECREMENT_SATURATE,
+}
+gceSTENCIL_OPERATION;
+
+/* Stencil selection. */
+typedef enum _gceSTENCIL_WHERE
+{
+ gcvSTENCIL_FRONT,
+ gcvSTENCIL_BACK,
+}
+gceSTENCIL_WHERE;
+
+/* Texture addressing selection. */
+typedef enum _gceTEXTURE_WHICH
+{
+ gcvTEXTURE_S,
+ gcvTEXTURE_T,
+ gcvTEXTURE_R,
+}
+gceTEXTURE_WHICH;
+
+/* Texture addressing modes. */
+typedef enum _gceTEXTURE_ADDRESSING
+{
+ gcvTEXTURE_WRAP,
+ gcvTEXTURE_CLAMP,
+ gcvTEXTURE_BORDER,
+ gcvTEXTURE_MIRROR,
+ gcvTEXTURE_MIRROR_ONCE,
+}
+gceTEXTURE_ADDRESSING;
+
+/* Texture filters. */
+typedef enum _gceTEXTURE_FILTER
+{
+ gcvTEXTURE_NONE,
+ gcvTEXTURE_POINT,
+ gcvTEXTURE_LINEAR,
+ gcvTEXTURE_ANISOTROPIC,
+}
+gceTEXTURE_FILTER;
+
+/* Primitive types. */
+typedef enum _gcePRIMITIVE
+{
+ gcvPRIMITIVE_POINT_LIST,
+ gcvPRIMITIVE_LINE_LIST,
+ gcvPRIMITIVE_LINE_STRIP,
+ gcvPRIMITIVE_LINE_LOOP,
+ gcvPRIMITIVE_TRIANGLE_LIST,
+ gcvPRIMITIVE_TRIANGLE_STRIP,
+ gcvPRIMITIVE_TRIANGLE_FAN,
+}
+gcePRIMITIVE;
+
+/* Index types. */
+typedef enum _gceINDEX_TYPE
+{
+ gcvINDEX_8,
+ gcvINDEX_16,
+ gcvINDEX_32,
+}
+gceINDEX_TYPE;
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Query the target capabilities. */
+gceSTATUS
+gcoHAL_QueryTargetCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MultiTargetCount,
+ OUT gctUINT * MaxSamples
+ );
+
+gceSTATUS
+gcoHAL_SetDepthOnly(
+ IN gcoHAL Hal,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoHAL_QueryShaderCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * VertexUniforms,
+ OUT gctUINT * FragmentUniforms,
+ OUT gctUINT * Varyings
+ );
+
+gceSTATUS
+gcoHAL_QueryTextureCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoHAL_QueryStreamCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT32 * MaxAttributes,
+ OUT gctUINT32 * MaxStreamSize,
+ OUT gctUINT32 * NumberOfStreams,
+ OUT gctUINT32 * Alignment
+ );
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*--------------------------------- gcoSURF 3D --------------------------------*/
+
+/* Copy surface. */
+gceSTATUS
+gcoSURF_Copy(
+ IN gcoSURF Surface,
+ IN gcoSURF Source
+ );
+
+/* Clear surface. */
+gceSTATUS
+gcoSURF_Clear(
+ IN gcoSURF Surface,
+ IN gctUINT Flags
+ );
+
+/* Set number of samples for a gcoSURF object. */
+gceSTATUS
+gcoSURF_SetSamples(
+ IN gcoSURF Surface,
+ IN gctUINT Samples
+ );
+
+/* Get the number of samples per pixel. */
+gceSTATUS
+gcoSURF_GetSamples(
+ IN gcoSURF Surface,
+ OUT gctUINT_PTR Samples
+ );
+
+/* Clear rectangular surface. */
+gceSTATUS
+gcoSURF_ClearRect(
+ IN gcoSURF Surface,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctUINT Flags
+ );
+
+/* TO BE REMOVED */
+#if 1
+ gceSTATUS
+ depr_gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight
+ );
+
+ gceSTATUS
+ depr_gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+#endif
+
+/* Resample surface. */
+gceSTATUS
+gcoSURF_Resample(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Resolve surface. */
+gceSTATUS
+gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Resolve rectangular area of a surface. */
+gceSTATUS
+gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Set surface resolvability. */
+gceSTATUS
+gcoSURF_SetResolvability(
+ IN gcoSURF Surface,
+ IN gctBOOL Resolvable
+ );
+
+/******************************************************************************\
+******************************** gcoINDEX Object *******************************
+\******************************************************************************/
+
+/* Construct a new gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoINDEX * Index
+ );
+
+/* Destroy a gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Destroy(
+ IN gcoINDEX Index
+ );
+
+/* Lock index in memory. */
+gceSTATUS
+gcoINDEX_Lock(
+ IN gcoINDEX Index,
+ OUT gctUINT32 * Address,
+ OUT gctPOINTER * Memory
+ );
+
+/* Unlock index that was previously locked with gcoINDEX_Lock. */
+gceSTATUS
+gcoINDEX_Unlock(
+ IN gcoINDEX Index
+ );
+
+/* Upload index data into the memory. */
+gceSTATUS
+gcoINDEX_Load(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE IndexType,
+ IN gctUINT32 IndexCount,
+ IN gctPOINTER IndexBuffer
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_Bind(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_BindOffset(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset
+ );
+
+/* Free existing index buffer. */
+gceSTATUS
+gcoINDEX_Free(
+ IN gcoINDEX Index
+ );
+
+/* Upload data into an index buffer. */
+gceSTATUS
+gcoINDEX_Upload(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/* Upload data into an index buffer starting at an offset. */
+gceSTATUS
+gcoINDEX_UploadOffset(
+ IN gcoINDEX Index,
+ IN gctUINT32 Offset,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/* Query the index capabilities. */
+gceSTATUS
+gcoINDEX_QueryCaps(
+ OUT gctBOOL * Index8,
+ OUT gctBOOL * Index16,
+ OUT gctBOOL * Index32,
+ OUT gctUINT * MaxIndex
+ );
+
+gceSTATUS
+gcoIndex_CopyFakeIndex(
+ IN gcoINDEX index,
+ IN gctUINT8_PTR logic,
+ IN gctUINT32 physical,
+ IN gctUINT32 offset,
+ IN gctUINT32 size);
+
+/* Determine the index range in the current index buffer. */
+gceSTATUS
+gcoINDEX_GetIndexRange(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Count,
+ OUT gctUINT32 * MinimumIndex,
+ OUT gctUINT32 * MaximumIndex
+ );
+/* Convert Index32 to Index16*/
+gceSTATUS
+gcoINDEX_CovertFrom32To16(
+ IN gcoINDEX Index,
+ OUT gcoINDEX* Index16
+ );
+/* Convert Index32 to Index16*/
+gceSTATUS
+gcoINDEX_CovertFrom32To16(
+ IN gcoINDEX Index,
+ OUT gcoINDEX* Index16
+ );
+
+/* Dynamic buffer management. */
+gceSTATUS
+gcoINDEX_SetDynamic(
+ IN gcoINDEX Index,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+gceSTATUS
+gcoINDEX_UploadDynamic(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+********************************** gco3D Object *********************************
+\******************************************************************************/
+
+/* Clear flags. */
+typedef enum _gceCLEAR
+{
+ gcvCLEAR_COLOR = 0x1,
+ gcvCLEAR_DEPTH = 0x2,
+ gcvCLEAR_STENCIL = 0x4,
+ gcvCLEAR_HZ = 0x8,
+ gcvCLEAR_HAS_VAA = 0x10,
+}
+gceCLEAR;
+
+/* Blending targets. */
+typedef enum _gceBLEND_UNIT
+{
+ gcvBLEND_SOURCE,
+ gcvBLEND_TARGET,
+}
+gceBLEND_UNIT;
+
+/* Construct a new gco3D object. */
+gceSTATUS
+gco3D_Construct(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+/* Destroy an gco3D object. */
+gceSTATUS
+gco3D_Destroy(
+ IN gco3D Engine
+ );
+
+/* Set 3D API type. */
+gceSTATUS
+gco3D_SetAPI(
+ IN gco3D Engine,
+ IN gceAPI ApiType
+ );
+
+/* Set render target. */
+gceSTATUS
+gco3D_SetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset render target. */
+gceSTATUS
+gco3D_UnsetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set depth buffer. */
+gceSTATUS
+gco3D_SetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset depth buffer. */
+gceSTATUS
+gco3D_UnsetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set viewport. */
+gceSTATUS
+gco3D_SetViewport(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set scissors. */
+gceSTATUS
+gco3D_SetScissors(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set clear color. */
+gceSTATUS
+gco3D_SetClearColor(
+ IN gco3D Engine,
+ IN gctUINT8 Red,
+ IN gctUINT8 Green,
+ IN gctUINT8 Blue,
+ IN gctUINT8 Alpha
+ );
+
+/* Set fixed point clear color. */
+gceSTATUS
+gco3D_SetClearColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point clear color. */
+gceSTATUS
+gco3D_SetClearColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set fixed point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Depth
+ );
+
+/* Set floating point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthF(
+ IN gco3D Engine,
+ IN gctFLOAT Depth
+ );
+
+/* Set clear stencil. */
+gceSTATUS
+gco3D_SetClearStencil(
+ IN gco3D Engine,
+ IN gctUINT32 Stencil
+ );
+
+/* Clear a Rect sub-surface. */
+gceSTATUS
+gco3D_ClearRect(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+/* Clear surface. */
+gceSTATUS
+gco3D_Clear(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+
+/* Clear tile status. */
+gceSTATUS
+gco3D_ClearTileStatus(
+ IN gco3D Engine,
+ IN gcsSURF_INFO_PTR Surface,
+ IN gctUINT32 TileStatusAddress,
+ IN gctUINT32 Flags
+ );
+
+/* Set shading mode. */
+gceSTATUS
+gco3D_SetShading(
+ IN gco3D Engine,
+ IN gceSHADING Shading
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_EnableBlending(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set blending function. */
+gceSTATUS
+gco3D_SetBlendFunction(
+ IN gco3D Engine,
+ IN gceBLEND_UNIT Unit,
+ IN gceBLEND_FUNCTION FunctionRGB,
+ IN gceBLEND_FUNCTION FunctionAlpha
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_SetBlendMode(
+ IN gco3D Engine,
+ IN gceBLEND_MODE ModeRGB,
+ IN gceBLEND_MODE ModeAlpha
+ );
+
+/* Set blending color. */
+gceSTATUS
+gco3D_SetBlendColor(
+ IN gco3D Engine,
+ IN gctUINT Red,
+ IN gctUINT Green,
+ IN gctUINT Blue,
+ IN gctUINT Alpha
+ );
+
+/* Set fixed point blending color. */
+gceSTATUS
+gco3D_SetBlendColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point blending color. */
+gceSTATUS
+gco3D_SetBlendColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set culling mode. */
+gceSTATUS
+gco3D_SetCulling(
+ IN gco3D Engine,
+ IN gceCULL Mode
+ );
+
+/* Enable point size */
+gceSTATUS
+gco3D_SetPointSizeEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set point sprite */
+gceSTATUS
+gco3D_SetPointSprite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set fill mode. */
+gceSTATUS
+gco3D_SetFill(
+ IN gco3D Engine,
+ IN gceFILL Mode
+ );
+
+/* Set depth compare mode. */
+gceSTATUS
+gco3D_SetDepthCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Enable depth writing. */
+gceSTATUS
+gco3D_EnableDepthWrite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth mode. */
+gceSTATUS
+gco3D_SetDepthMode(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeX(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFIXED_POINT Near,
+ IN gctFIXED_POINT Far
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeF(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFLOAT Near,
+ IN gctFLOAT Far
+ );
+
+/* Set last pixel enable */
+gceSTATUS
+gco3D_SetLastPixelEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth Bias and Scale */
+gceSTATUS
+gco3D_SetDepthScaleBiasX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT DepthScale,
+ IN gctFIXED_POINT DepthBias
+ );
+
+gceSTATUS
+gco3D_SetDepthScaleBiasF(
+ IN gco3D Engine,
+ IN gctFLOAT DepthScale,
+ IN gctFLOAT DepthBias
+ );
+
+/* Enable or disable dithering. */
+gceSTATUS
+gco3D_EnableDither(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set color write enable bits. */
+gceSTATUS
+gco3D_SetColorWrite(
+ IN gco3D Engine,
+ IN gctUINT8 Enable
+ );
+
+/* Enable or disable early depth. */
+gceSTATUS
+gco3D_SetEarlyDepth(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Enable or disable depth-only mode. */
+gceSTATUS
+gco3D_SetDepthOnly(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set stencil mode. */
+gceSTATUS
+gco3D_SetStencilMode(
+ IN gco3D Engine,
+ IN gceSTENCIL_MODE Mode
+ );
+
+/* Set stencil mask. */
+gceSTATUS
+gco3D_SetStencilMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil write mask. */
+gceSTATUS
+gco3D_SetStencilWriteMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil reference. */
+gceSTATUS
+gco3D_SetStencilReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference
+ );
+
+/* Set stencil compare. */
+gceSTATUS
+gco3D_SetStencilCompare(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceCOMPARE Compare
+ );
+
+/* Set stencil operation on pass. */
+gceSTATUS
+gco3D_SetStencilPass(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on fail. */
+gceSTATUS
+gco3D_SetStencilFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on depth fail. */
+gceSTATUS
+gco3D_SetStencilDepthFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Enable or disable alpha test. */
+gceSTATUS
+gco3D_SetAlphaTest(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set alpha test compare. */
+gceSTATUS
+gco3D_SetAlphaCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Set alpha test reference in unsigned integer. */
+gceSTATUS
+gco3D_SetAlphaReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference
+ );
+
+/* Set alpha test reference in fixed point. */
+gceSTATUS
+gco3D_SetAlphaReferenceX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Reference
+ );
+
+/* Set alpha test reference in floating point. */
+gceSTATUS
+gco3D_SetAlphaReferenceF(
+ IN gco3D Engine,
+ IN gctFLOAT Reference
+ );
+
+/* Enable/Disable anti-alias line. */
+gceSTATUS
+gco3D_SetAntiAliasLine(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set texture slot for anti-alias line. */
+gceSTATUS
+gco3D_SetAALineTexSlot(
+ IN gco3D Engine,
+ IN gctUINT TexSlot
+ );
+
+/* Set anti-alias line width scale. */
+gceSTATUS
+gco3D_SetAALineWidth(
+ IN gco3D Engine,
+ IN gctFLOAT Width
+ );
+
+/* Draw a number of primitives. */
+gceSTATUS
+gco3D_DrawPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT StartVertex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of primitives using offsets. */
+gceSTATUS
+gco3D_DrawPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives. */
+gceSTATUS
+gco3D_DrawIndexedPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT BaseVertex,
+ IN gctINT StartIndex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives using offsets. */
+gceSTATUS
+gco3D_DrawIndexedPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 BaseOffset,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Enable or disable anti-aliasing. */
+gceSTATUS
+gco3D_SetAntiAlias(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Write data into the command buffer. */
+gceSTATUS
+gco3D_WriteBuffer(
+ IN gco3D Engine,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Aligned
+ );
+
+/*Send sempahore and stall until sempahore is signalled.*/
+gceSTATUS
+gco3D_Semaphore(
+ IN gco3D Engine,
+ IN gceWHERE From,
+ IN gceWHERE To,
+ IN gceHOW How);
+
+/*Set the subpixels center .*/
+gceSTATUS
+gco3D_SetCentroids(
+ IN gco3D Engine,
+ IN gctUINT32 Index,
+ IN gctPOINTER Centroids
+ );
+
+/*Get 3D engine status*/
+gceSTATUS
+gco3D_Get3DStatus(
+ IN gco3D Engine,
+ OUT gctBOOL_PTR* Idle,
+ OUT gctINT_PTR Count,
+ OUT gctINT_PTR CurrentCmdIndex
+ );
+/*----------------------------------------------------------------------------*/
+/*-------------------------- gco3D Fragment Processor ------------------------*/
+
+/* Set the fragment processor configuration. */
+gceSTATUS
+gco3D_SetFragmentConfiguration(
+ IN gco3D Engine,
+ IN gctBOOL ColorFromStream,
+ IN gctBOOL EnableFog,
+ IN gctBOOL EnableSmoothPoint,
+ IN gctUINT32 ClipPlanes
+ );
+
+/* Enable/disable texture stage operation. */
+gceSTATUS
+gco3D_EnableTextureStage(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL Enable
+ );
+
+/* Program the channel enable masks for the color texture function. */
+gceSTATUS
+gco3D_SetTextureColorMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the channel enable masks for the alpha texture function. */
+gceSTATUS
+gco3D_SetTextureAlphaMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the constant fragment color. */
+gceSTATUS
+gco3D_SetFragmentColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFragmentColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant fog color. */
+gceSTATUS
+gco3D_SetFogColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFogColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant texture color. */
+gceSTATUS
+gco3D_SetTetxureColorX(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetTetxureColorF(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Configure color texture function. */
+gceSTATUS
+gco3D_SetColorTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+/* Configure alpha texture function. */
+gceSTATUS
+gco3D_SetAlphaTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+
+/******************************************************************************\
+******************************* gcoTEXTURE Object *******************************
+\******************************************************************************/
+
+/* Cube faces. */
+typedef enum _gceTEXTURE_FACE
+{
+ gcvFACE_NONE,
+ gcvFACE_POSITIVE_X,
+ gcvFACE_NEGATIVE_X,
+ gcvFACE_POSITIVE_Y,
+ gcvFACE_NEGATIVE_Y,
+ gcvFACE_POSITIVE_Z,
+ gcvFACE_NEGATIVE_Z,
+}
+gceTEXTURE_FACE;
+
+/* Construct a new gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Construct(
+ IN gcoHAL Hal,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Construct a new sized gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_ConstructSized(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gctUINT MipMapCount,
+ IN gcePOOL Pool,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Destroy an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Destroy(
+ IN gcoTEXTURE Texture
+ );
+
+/*Destroy a texture level*/
+gceSTATUS
+gcoTEXTURE_DestroyLevel(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level
+ );
+
+/*check texture surface can be reuse*/
+gctBOOL gcoTEXTURE_BConsistent(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gctSIZE_T Width,
+ IN gctSIZE_T Height,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Upload(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Upload_Linear(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadSub(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+gceSTATUS
+gcoTEXTURE_UploadSub_Linear(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+
+/* Upload compressed data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadCompressed(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get gcoSURF object for a mipmap level. */
+gceSTATUS
+gcoTEXTURE_GetMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ OUT gcoSURF * Surface
+ );
+
+/* Get gcoSURF object for a mipmap level and face offset. */
+gceSTATUS
+gcoTEXTURE_GetMipMapFace(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ OUT gcoSURF * Surface,
+ OUT gctUINT32_PTR Offset
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromClient(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromSurface(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_SetEndianHint(
+ IN gcoTEXTURE Texture,
+ IN gceENDIAN_HINT EndianHint
+ );
+
+gceSTATUS
+gcoTEXTURE_SetAddressingMode(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_WHICH Which,
+ IN gceTEXTURE_ADDRESSING Mode
+ );
+
+gceSTATUS
+gcoTEXTURE_SetBorderColor(
+ IN gcoTEXTURE Texture,
+ IN gctUINT Red,
+ IN gctUINT Green,
+ IN gctUINT Blue,
+ IN gctUINT Alpha
+ );
+
+gceSTATUS
+gcoTEXTURE_SetBorderColorX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gcoTEXTURE_SetBorderColorF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+gctBOOL
+gcoTEXTURE_IsSupportMipMap(
+ IN gcoTEXTURE Texture
+ );
+
+gceSTATUS
+gcoTEXTURE_SetMinFilter(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FILTER Filter
+ );
+
+gceSTATUS
+gcoTEXTURE_SetMagFilter(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FILTER Filter
+ );
+
+gceSTATUS
+gcoTEXTURE_SetMipFilter(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FILTER Filter
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODBiasX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT Bias
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODBiasF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT Bias
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMinX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMinF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMaxX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMaxF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_Bind(
+ IN gcoTEXTURE Texture,
+ IN gctINT Sampler,
+ IN gctUINT Param
+ );
+
+gceSTATUS
+gcoTEXTURE_Disable(
+ IN gcoHAL Hal,
+ IN gctINT Sampler
+ );
+
+gceSTATUS
+gcoTEXTURE_Flush(
+ IN gcoTEXTURE Texture
+ );
+
+gceSTATUS
+gcoTEXTURE_QueryCaps(
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoTEXTURE_GetClosestFormat(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT InFormat,
+ OUT gceSURF_FORMAT* OutFormat
+ );
+
+gceSTATUS
+gcoTEXTURE_RenderIntoMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsRenderable(
+ IN gcoTEXTURE Texture,
+ IN gctUINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsComplete(
+ IN gcoTEXTURE Texture,
+ IN gctINT MaxLevel
+ );
+
+/******************************************************************************\
+******************************* gcoSTREAM Object ******************************
+\******************************************************************************/
+
+typedef enum _gceVERTEX_FORMAT
+{
+ gcvVERTEX_BYTE,
+ gcvVERTEX_UNSIGNED_BYTE,
+ gcvVERTEX_SHORT,
+ gcvVERTEX_UNSIGNED_SHORT,
+ gcvVERTEX_INT,
+ gcvVERTEX_UNSIGNED_INT,
+ gcvVERTEX_FIXED,
+ gcvVERTEX_HALF,
+ gcvVERTEX_FLOAT,
+}
+gceVERTEX_FORMAT;
+
+gceSTATUS
+gcoSTREAM_Construct(
+ IN gcoHAL Hal,
+ OUT gcoSTREAM * Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Destroy(
+ IN gcoSTREAM Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Upload(
+ IN gcoSTREAM Stream,
+ IN gctCONST_POINTER Buffer,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Dynamic
+ );
+
+gceSTATUS
+gcoSTREAM_SetStride(
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoSTREAM_Lock(
+ IN gcoSTREAM Stream,
+ OUT gctPOINTER * Logical,
+ OUT gctUINT32 * Physical
+ );
+
+gceSTATUS
+gcoSTREAM_Unlock(
+ IN gcoSTREAM Stream);
+
+gceSTATUS
+gcoSTREAM_Reserve(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL bSystemCache
+ );
+
+gceSTATUS
+gcoSTREAM_GetSystemCache(
+ IN gcoSTREAM Stream,
+ OUT gctPOINTER* pSystemCache);
+
+gceSTATUS
+gcoSTREAM_GetStreamSize(
+ IN gcoSTREAM Stream,
+ OUT gctUINT32* pSize);
+
+gceSTATUS
+gcoSTREAM_ConstructReserveMemory(
+ IN gcoHAL Hal);
+
+gceSTATUS
+gcoSTREAM_DestroyReserveMemory(
+ IN gcoHAL Hal);
+
+gceSTATUS
+gcoSTREAM_GetReserveMemIndexOffset(
+ IN gcoHAL Hal,
+ OUT gctUINT32 * reserveMemoryIndex,
+ OUT gctUINT32 * reserveMemoryOffset);
+
+gceSTATUS
+gcoSTREAM_GetReserveMemory(
+ IN gcoHAL Hal,
+ IN gctUINT32 requestSize,
+ IN gcoSTREAM stream,
+ IN gcoINDEX index
+ );
+
+gctBOOL
+gcoSTREAM_SignalReserveMemory(
+ IN gcoHAL Hal);
+
+gceSTATUS
+gcoSTREAM_Flush(
+ IN gcoSTREAM Stream
+ );
+
+/* Dynamic buffer API. */
+gceSTATUS
+gcoSTREAM_SetDynamic(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+typedef struct _gcsSTREAM_INFO
+{
+ gctUINT index;
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT components;
+ gctSIZE_T size;
+ gctCONST_POINTER data;
+ gctUINT stride;
+ gctUINT offset;
+ gcoSTREAM stream;
+}
+gcsSTREAM_INFO, * gcsSTREAM_INFO_PTR;
+
+gceSTATUS
+gcoSTREAM_UploadDynamic(
+ IN gcoSTREAM Stream,
+ IN gctUINT VertexCount,
+ IN gctUINT InfoCount,
+ IN gcsSTREAM_INFO_PTR Info,
+ IN gcoVERTEX Vertex
+ );
+
+/******************************************************************************\
+******************************** gcoVERTEX Object ******************************
+\******************************************************************************/
+
+typedef struct _gcsVERTEX_ATTRIBUTES
+{
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT32 components;
+ gctSIZE_T size;
+ gctUINT32 stream;
+ gctUINT32 offset;
+ gctUINT32 stride;
+}
+gcsVERTEX_ATTRIBUTES;
+
+gceSTATUS
+gcoVERTEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVERTEX * Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Destroy(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Reset(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_EnableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index,
+ IN gceVERTEX_FORMAT Format,
+ IN gctBOOL Normalized,
+ IN gctUINT32 Components,
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoVERTEX_DisableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index
+ );
+
+gceSTATUS
+gcoVERTEX_Bind_fast(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 attributeCount
+ );
+
+gceSTATUS
+gcoVERTEX_Bind(
+ IN gcoVERTEX Vertex
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_engine_h_ */
+
diff --git a/src/include_dove/gc_hal_enum.h b/src/include_dove/gc_hal_enum.h
new file mode 100644
index 0000000..d0361af
--- /dev/null
+++ b/src/include_dove/gc_hal_enum.h
@@ -0,0 +1,565 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_enum_h_
+#define __gc_hal_enum_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Chip models. */
+typedef enum _gceCHIPMODEL
+{
+ gcv300 = 0x0300,
+ gcv400 = 0x0400,
+ gcv410 = 0x0410,
+ gcv450 = 0x0450,
+ gcv500 = 0x0500,
+ gcv530 = 0x0530,
+ gcv600 = 0x0600,
+ gcv700 = 0x0700,
+ gcv800 = 0x0800,
+ gcv860 = 0x0860,
+ gcv1000 = 0x1000,
+}
+gceCHIPMODEL;
+
+/* Chip features. */
+typedef enum _gceFEATURE
+{
+ gcvFEATURE_PIPE_2D,
+ gcvFEATURE_PIPE_3D,
+ gcvFEATURE_PIPE_VG,
+ gcvFEATURE_DC,
+ gcvFEATURE_HIGH_DYNAMIC_RANGE,
+ gcvFEATURE_MODULE_CG,
+ gcvFEATURE_MIN_AREA,
+ gcvFEATURE_BUFFER_INTERLEAVING,
+ gcvFEATURE_BYTE_WRITE_2D,
+ gcvFEATURE_ENDIANNESS_CONFIG,
+ gcvFEATURE_DUAL_RETURN_BUS,
+ gcvFEATURE_DEBUG_MODE,
+ gcvFEATURE_YUY2_RENDER_TARGET,
+ gcvFEATURE_FRAGMENT_PROCESSOR,
+ gcvFEATURE_2DPE20,
+ gcvFEATURE_FAST_CLEAR,
+ gcvFEATURE_YUV420_TILER,
+ gcvFEATURE_YUY2_AVERAGING,
+ gcvFEATURE_FLIP_Y,
+ gcvFEATURE_EARLY_Z,
+ gcvFEATURE_Z_COMPRESSION,
+ gcvFEATURE_MSAA,
+ gcvFEATURE_SPECIAL_ANTI_ALIASING,
+ gcvFEATURE_SPECIAL_MSAA_LOD,
+ gcvFEATURE_422_TEXTURE_COMPRESSION,
+ gcvFEATURE_DXT_TEXTURE_COMPRESSION,
+ gcvFEATURE_ETC1_TEXTURE_COMPRESSION,
+ gcvFEATURE_CORRECT_TEXTURE_CONVERTER,
+ gcvFEATURE_TEXTURE_8K,
+ gcvFEATURE_SCALER,
+ gcvFEATURE_YUV420_SCALER,
+ gcvFEATURE_SHADER_HAS_W,
+ gcvFEATURE_SHADER_HAS_SIGN,
+ gcvFEATURE_SHADER_HAS_FLOOR,
+ gcvFEATURE_SHADER_HAS_CEIL,
+ gcvFEATURE_SHADER_HAS_SQRT,
+ gcvFEATURE_SHADER_HAS_TRIG,
+ gcvFEATURE_VAA,
+ gcvFEATURE_HZ,
+ gcvFEATURE_CORRECT_STENCIL,
+ gcvFEATURE_VG20,
+ gcvFEATURE_VG_FILTER,
+ gcvFEATURE_VG21,
+ gcvFEATURE_VG_DOUBLE_BUFFER,
+ gcvFEATURE_MC20,
+ gcvFEATURE_SUPER_TILED,
+}
+gceFEATURE;
+
+/* Chip Power Status. */
+typedef enum _gceCHIPPOWERSTATE
+{
+ gcvPOWER_ON,
+ gcvPOWER_OFF,
+ gcvPOWER_IDLE,
+ gcvPOWER_SUSPEND,
+ gcvPOWER_SUSPEND_ATPOWERON,
+ gcvPOWER_OFF_ATPOWERON,
+ gcvPOWER_IDLE_BROADCAST,
+ gcvPOWER_SUSPEND_BROADCAST,
+ gcvPOWER_OFF_BROADCAST,
+ gcvPOWER_OFF_RECOVERY,
+}
+gceCHIPPOWERSTATE;
+
+/* Surface types. */
+typedef enum _gceSURF_TYPE
+{
+ gcvSURF_TYPE_UNKNOWN,
+ gcvSURF_INDEX,
+ gcvSURF_VERTEX,
+ gcvSURF_TEXTURE,
+ gcvSURF_RENDER_TARGET,
+ gcvSURF_DEPTH,
+ gcvSURF_BITMAP,
+ gcvSURF_TILE_STATUS,
+ gcvSURF_MASK,
+ gcvSURF_SCISSOR,
+ gcvSURF_HIERARCHICAL_DEPTH,
+ gcvSURF_NUM_TYPES, /* Make sure this is the last one! */
+
+ /* Combinations. */
+ gcvSURF_NO_TILE_STATUS = 0x100,
+ gcvSURF_RENDER_TARGET_NO_TILE_STATUS = gcvSURF_RENDER_TARGET
+ | gcvSURF_NO_TILE_STATUS,
+ gcvSURF_DEPTH_NO_TILE_STATUS = gcvSURF_DEPTH
+ | gcvSURF_NO_TILE_STATUS,
+}
+gceSURF_TYPE;
+
+typedef enum _gceSURF_COLOR_TYPE
+{
+ gcvSURF_COLOR_UNKNOWN,
+ gcvSURF_COLOR_LINEAR = 0x01,
+ gcvSURF_COLOR_ALPHA_PRE = 0x02,
+}
+gceSURF_COLOR_TYPE;
+
+/* Rotation. */
+typedef enum _gceSURF_ROTATION
+{
+ gcvSURF_0_DEGREE,
+ gcvSURF_90_DEGREE,
+ gcvSURF_180_DEGREE,
+ gcvSURF_270_DEGREE
+}
+gceSURF_ROTATION;
+
+/* Surface formats. */
+typedef enum _gceSURF_FORMAT
+{
+ /* Unknown format. */
+ gcvSURF_UNKNOWN,
+
+ /* Palettized formats. */
+ gcvSURF_INDEX1 = 100,
+ gcvSURF_INDEX4,
+ gcvSURF_INDEX8,
+
+ /* RGB formats. */
+ gcvSURF_A2R2G2B2 = 200,
+ gcvSURF_R3G3B2,
+ gcvSURF_A8R3G3B2,
+ gcvSURF_X4R4G4B4,
+ gcvSURF_A4R4G4B4,
+ gcvSURF_R4G4B4A4,
+ gcvSURF_X1R5G5B5,
+ gcvSURF_A1R5G5B5,
+ gcvSURF_R5G5B5A1,
+ gcvSURF_R5G6B5,
+ gcvSURF_R8G8B8,
+ gcvSURF_X8R8G8B8,
+ gcvSURF_A8R8G8B8,
+ gcvSURF_R8G8B8A8,
+ gcvSURF_G8R8G8B8,
+ gcvSURF_R8G8B8G8,
+ gcvSURF_X2R10G10B10,
+ gcvSURF_A2R10G10B10,
+ gcvSURF_X12R12G12B12,
+ gcvSURF_A12R12G12B12,
+ gcvSURF_X16R16G16B16,
+ gcvSURF_A16R16G16B16,
+ gcvSURF_R8G8B8X8,
+ gcvSURF_R5G5B5X1,
+ gcvSURF_R4G4B4X4,
+
+ /* BGR formats. */
+ gcvSURF_A4B4G4R4 = 300,
+ gcvSURF_A1B5G5R5,
+ gcvSURF_B5G6R5,
+ gcvSURF_B8G8R8,
+ gcvSURF_X8B8G8R8,
+ gcvSURF_A8B8G8R8,
+ gcvSURF_A2B10G10R10,
+ gcvSURF_A16B16G16R16,
+ gcvSURF_G16R16,
+ gcvSURF_B4G4R4A4,
+ gcvSURF_B5G5R5A1,
+ gcvSURF_B8G8R8X8,
+ gcvSURF_B8G8R8A8,
+ gcvSURF_X4B4G4R4,
+ gcvSURF_X1B5G5R5,
+ gcvSURF_B4G4R4X4,
+ gcvSURF_B5G5R5X1,
+
+ /* Compressed formats. */
+ gcvSURF_DXT1 = 400,
+ gcvSURF_DXT2,
+ gcvSURF_DXT3,
+ gcvSURF_DXT4,
+ gcvSURF_DXT5,
+ gcvSURF_CXV8U8,
+ gcvSURF_ETC1,
+
+ /* YUV formats. */
+ gcvSURF_YUY2 = 500,
+ gcvSURF_UYVY,
+ gcvSURF_YV12,
+ gcvSURF_I420,
+ gcvSURF_NV12,
+ gcvSURF_NV21,
+ gcvSURF_NV16,
+ gcvSURF_NV61,
+ gcvSURF_YVYU,
+ gcvSURF_VYUY,
+
+ /* Depth formats. */
+ gcvSURF_D16 = 600,
+ gcvSURF_D24S8,
+ gcvSURF_D32,
+ gcvSURF_D24X8,
+
+ /* Alpha formats. */
+ gcvSURF_A4 = 700,
+ gcvSURF_A8,
+ gcvSURF_A12,
+ gcvSURF_A16,
+ gcvSURF_A32,
+ gcvSURF_A1,
+
+ /* Luminance formats. */
+ gcvSURF_L4 = 800,
+ gcvSURF_L8,
+ gcvSURF_L12,
+ gcvSURF_L16,
+ gcvSURF_L32,
+ gcvSURF_L1,
+
+ /* Alpha/Luminance formats. */
+ gcvSURF_A4L4 = 900,
+ gcvSURF_A2L6,
+ gcvSURF_A8L8,
+ gcvSURF_A4L12,
+ gcvSURF_A12L12,
+ gcvSURF_A16L16,
+
+ /* Bump formats. */
+ gcvSURF_L6V5U5 = 1000,
+ gcvSURF_V8U8,
+ gcvSURF_X8L8V8U8,
+ gcvSURF_Q8W8V8U8,
+ gcvSURF_A2W10V10U10,
+ gcvSURF_V16U16,
+ gcvSURF_Q16W16V16U16,
+
+ /* Floating point formats. */
+ gcvSURF_R16F = 1100,
+ gcvSURF_G16R16F,
+ gcvSURF_A16B16G16R16F,
+ gcvSURF_R32F,
+ gcvSURF_G32R32F,
+ gcvSURF_A32B32G32R32F,
+
+#if 0
+ /* FIXME: remove HDR support for now. */
+ /* HDR formats. */
+ gcvSURF_HDR7E3 = 1200,
+ gcvSURF_HDR6E4,
+ gcvSURF_HDR5E5,
+ gcvSURF_HDR6E5,
+#endif
+}
+gceSURF_FORMAT;
+
+/* Pixel swizzle modes. */
+typedef enum _gceSURF_SWIZZLE
+{
+ gcvSURF_NOSWIZZLE,
+ gcvSURF_ARGB,
+ gcvSURF_ABGR,
+ gcvSURF_RGBA,
+ gcvSURF_BGRA
+}
+gceSURF_SWIZZLE;
+
+/* Transparency modes. */
+typedef enum _gceSURF_TRANSPARENCY
+{
+ /* Valid only for PE 1.0 */
+ gcvSURF_OPAQUE,
+ gcvSURF_SOURCE_MATCH,
+ gcvSURF_SOURCE_MASK,
+ gcvSURF_PATTERN_MASK,
+}
+gceSURF_TRANSPARENCY;
+
+/* Transparency modes. */
+typedef enum _gce2D_TRANSPARENCY
+{
+ /* Valid only for PE 2.0 */
+ gcv2D_OPAQUE,
+ gcv2D_KEYED,
+ gcv2D_MASKED
+}
+gce2D_TRANSPARENCY;
+
+/* Mono packing modes. */
+typedef enum _gceSURF_MONOPACK
+{
+ gcvSURF_PACKED8,
+ gcvSURF_PACKED16,
+ gcvSURF_PACKED32,
+ gcvSURF_UNPACKED,
+}
+gceSURF_MONOPACK;
+
+/* Blending modes. */
+typedef enum _gceSURF_BLEND_MODE
+{
+ /* Porter-Duff blending modes. */
+ /* Fsrc Fdst */
+ gcvBLEND_CLEAR, /* 0 0 */
+ gcvBLEND_SRC, /* 1 0 */
+ gcvBLEND_DST, /* 0 1 */
+ gcvBLEND_SRC_OVER_DST, /* 1 1 - Asrc */
+ gcvBLEND_DST_OVER_SRC, /* 1 - Adst 1 */
+ gcvBLEND_SRC_IN_DST, /* Adst 0 */
+ gcvBLEND_DST_IN_SRC, /* 0 Asrc */
+ gcvBLEND_SRC_OUT_DST, /* 1 - Adst 0 */
+ gcvBLEND_DST_OUT_SRC, /* 0 1 - Asrc */
+ gcvBLEND_SRC_ATOP_DST, /* Adst 1 - Asrc */
+ gcvBLEND_DST_ATOP_SRC, /* 1 - Adst Asrc */
+ gcvBLEND_SRC_XOR_DST, /* 1 - Adst 1 - Asrc */
+
+ /* Special blending modes. */
+ gcvBLEND_SET, /* DST = 1 */
+ gcvBLEND_SUB /* DST = DST * (1 - SRC) */
+}
+gceSURF_BLEND_MODE;
+
+/* Per-pixel alpha modes. */
+typedef enum _gceSURF_PIXEL_ALPHA_MODE
+{
+ gcvSURF_PIXEL_ALPHA_STRAIGHT,
+ gcvSURF_PIXEL_ALPHA_INVERSED
+}
+gceSURF_PIXEL_ALPHA_MODE;
+
+/* Global alpha modes. */
+typedef enum _gceSURF_GLOBAL_ALPHA_MODE
+{
+ gcvSURF_GLOBAL_ALPHA_OFF,
+ gcvSURF_GLOBAL_ALPHA_ON,
+ gcvSURF_GLOBAL_ALPHA_SCALE
+}
+gceSURF_GLOBAL_ALPHA_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gceSURF_PIXEL_COLOR_MODE
+{
+ gcvSURF_COLOR_STRAIGHT,
+ gcvSURF_COLOR_MULTIPLY
+}
+gceSURF_PIXEL_COLOR_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_PIXEL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_COLOR_MULTIPLY_DISABLE,
+ gcv2D_COLOR_MULTIPLY_ENABLE
+}
+gce2D_PIXEL_COLOR_MULTIPLY_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_GLOBAL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_GLOBAL_COLOR_MULTIPLY_DISABLE,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_ALPHA,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_COLOR
+}
+gce2D_GLOBAL_COLOR_MULTIPLY_MODE;
+
+/* Alpha blending factor modes. */
+typedef enum _gceSURF_BLEND_FACTOR_MODE
+{
+ gcvSURF_BLEND_ZERO,
+ gcvSURF_BLEND_ONE,
+ gcvSURF_BLEND_STRAIGHT,
+ gcvSURF_BLEND_INVERSED,
+ gcvSURF_BLEND_COLOR,
+ gcvSURF_BLEND_COLOR_INVERSED,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED
+}
+gceSURF_BLEND_FACTOR_MODE;
+
+/* Alpha blending porter duff rules. */
+typedef enum _gce2D_PORTER_DUFF_RULE
+{
+ gcvPD_CLEAR,
+ gcvPD_SRC,
+ gcvPD_SRC_OVER,
+ gcvPD_DST_OVER,
+ gcvPD_SRC_IN,
+ gcvPD_DST_IN,
+ gcvPD_SRC_OUT,
+ gcvPD_DST_OUT,
+ gcvPD_SRC_ATOP,
+ gcvPD_DST_ATOP,
+ gcvPD_ADD,
+ gcvPD_XOR,
+ gcvPD_DST
+}
+gce2D_PORTER_DUFF_RULE;
+
+/* Alpha blending factor modes. */
+typedef enum _gce2D_YUV_COLOR_MODE
+{
+ gcv2D_YUV_601,
+ gcv2D_YUV_709
+}
+gce2D_YUV_COLOR_MODE;
+
+/* 2D Rotation and flipping. */
+typedef enum _gce2D_ORIENTATION
+{
+ gcv2D_0_DEGREE,
+ gcv2D_90_DEGREE,
+ gcv2D_180_DEGREE,
+ gcv2D_270_DEGREE,
+ gcv2D_X_FLIP,
+ gcv2D_Y_FLIP
+}
+gce2D_ORIENTATION;
+
+typedef enum _gce2D_COMMAND
+{
+ gcv2D_CLEAR,
+ gcv2D_LINE,
+ gcv2D_BLT,
+ gcv2D_STRETCH,
+ gcv2D_HOR_FILTER,
+ gcv2D_VER_FILTER,
+}
+gce2D_COMMAND;
+
+/* Texture functions. */
+typedef enum _gceTEXTURE_FUNCTION
+{
+ gcvTEXTURE_DUMMY = 0,
+ gcvTEXTURE_REPLACE = 0,
+ gcvTEXTURE_MODULATE,
+ gcvTEXTURE_ADD,
+ gcvTEXTURE_ADD_SIGNED,
+ gcvTEXTURE_INTERPOLATE,
+ gcvTEXTURE_SUBTRACT,
+ gcvTEXTURE_DOT3
+}
+gceTEXTURE_FUNCTION;
+
+/* Texture sources. */
+typedef enum _gceTEXTURE_SOURCE
+{
+ gcvCOLOR_FROM_TEXTURE,
+ gcvCOLOR_FROM_CONSTANT_COLOR,
+ gcvCOLOR_FROM_PRIMARY_COLOR,
+ gcvCOLOR_FROM_PREVIOUS_COLOR
+}
+gceTEXTURE_SOURCE;
+
+/* Texture source channels. */
+typedef enum _gceTEXTURE_CHANNEL
+{
+ gcvFROM_COLOR,
+ gcvFROM_ONE_MINUS_COLOR,
+ gcvFROM_ALPHA,
+ gcvFROM_ONE_MINUS_ALPHA
+}
+gceTEXTURE_CHANNEL;
+
+/* Filter types. */
+typedef enum _gceFILTER_TYPE
+{
+ gcvFILTER_SYNC,
+ gcvFILTER_BLUR,
+ gcvFILTER_USER
+}
+gceFILTER_TYPE;
+
+/* Filter pass types. */
+typedef enum _gceFILTER_PASS_TYPE
+{
+ gcvFILTER_HOR_PASS,
+ gcvFILTER_VER_PASS
+}
+gceFILTER_PASS_TYPE;
+
+/* Endian hints. */
+typedef enum _gceENDIAN_HINT
+{
+ gcvENDIAN_NO_SWAP = 0,
+ gcvENDIAN_SWAP_WORD,
+ gcvENDIAN_SWAP_DWORD
+}
+gceENDIAN_HINT;
+
+/* Endian hints. */
+typedef enum _gceTILING
+{
+ gcvLINEAR,
+ gcvTILED,
+ gcvSUPERTILED
+}
+gceTILING;
+
+typedef enum _gceSAMPLERDIRTY
+{
+ gcvSAMPLER_MIN_FILTER_DIRTY,
+ gcvSAMPLER_MAG_FILTER_DIRTY,
+ gcvSAMPLER_WRAPR_DIRTY_DIRTY,
+ gcvSAMPLER_WRAPS_DIRTY_DIRTY,
+ gcvSAMPLER_WRAPT_DIRTY_DIRTY,
+ gcvSAMPLER_LODMINX_DIRTY,
+ gcvSAMPLER_LODBIASX_DIRTY,
+ gcvSAMPLER_BORDERCOLOR_DIRTY,
+ gcvSAMPLER_MIPMAP_DIRTY,
+ gcvSAMPLER_ALL_DIRTY
+}
+gceSAMPLERDIRTY;
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoCONTEXT * gcoCONTEXT;
+typedef struct _gcoCTXBUF * gcoCTXBUF;
+typedef struct _gcoCMDBUF * gcoCMDBUF;
+typedef struct _gcoQUEUE * gcoQUEUE;
+typedef struct _gcsHAL_INTERFACE * gcsHAL_INTERFACE_PTR;
+typedef struct gcs2D_PROFILE * gcs2D_PROFILE_PTR;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_enum_h_ */
+
diff --git a/src/include_dove/gc_hal_mem.h b/src/include_dove/gc_hal_mem.h
new file mode 100644
index 0000000..e3c4433
--- /dev/null
+++ b/src/include_dove/gc_hal_mem.h
@@ -0,0 +1,472 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+/*
+** Include file for the local memory management.
+*/
+
+#ifndef __gc_hal_mem_h_
+#define __gc_hal_mem_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+*******************************************************************************
+** Usage:
+
+ The macros to declare MemPool type and functions are
+ gcmMEM_DeclareFSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareVSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix)
+
+ The data structures for MemPool are
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+
+ The MemPool constructor and destructor functions are
+ gcfMEM_InitFSMemPool(gcsMEM_FS_MEM_POOL *, gcoOS, gctUINT, gctUINT);
+ gcfMEM_FreeFSMemPool(gcsMEM_FS_MEM_POOL *);
+ gcfMEM_InitVSMemPool(gcsMEM_VS_MEM_POOL *, gcoOS, gctUINT, gctBOOL);
+ gcfMEM_FreeVSMemPool(gcsMEM_VS_MEM_POOL *);
+ gcfMEM_InitAFSMemPool(gcsMEM_AFS_MEM_POOL *, gcoOS, gctUINT);
+ gcfMEM_FreeAFSMemPool(gcsMEM_AFS_MEM_POOL *);
+
+ FS: for Fixed-Size data structures
+ VS: for Variable-size data structures
+ AFS: for Array of Fixed-Size data structures
+
+
+ /* Example 1: For a fixed-size data structure, struct gcsNode. */
+ /* It is used locally in a file, so the functions are static without prefix. */
+ /* At top level, declear allocate and free functions. */
+ /* The first argument is the data type. */
+ /* The second armument is the short name used in the fuctions. */
+ gcmMEM_DeclareFSMemPool(struct gcsNode, Node, );
+
+ /* The previous macro creates two inline functions, */
+ /* _AllocateNode and _FreeNode. */
+
+ /* In function or struct */
+ gcsMEM_FS_MEM_POOL nodeMemPool;
+
+ /* In function, */
+ struct gcsNode * node;
+ gceSTATUS status;
+
+ /* Before using the memory pool, initialize it. */
+ /* The second argument is the gcoOS object. */
+ /* The third argument is the number of data structures to allocate for each chunk. */
+ status = gcfMEM_InitFSMemPool(&nodeMemPool, os, 100, sizeof(struct gcsNode));
+ ...
+
+ /* Allocate a node. */
+ status = _AllocateNode(nodeMemPool, &node);
+ ...
+ /* Free a node. */
+ _FreeNode(nodeMemPool, node);
+
+ /* After using the memory pool, free it. */
+ gcfMEM_FreeFSMemPool(&nodeMemPool);
+
+
+ /* Example 2: For array of fixed-size data structures, struct gcsNode. */
+ /* It is used in several files, so the functions are extern with prefix. */
+ /* At top level, declear allocate and free functions. */
+ /* The first argument is the data type, and the second one is the short name */
+ /* used in the fuctions. */
+ gcmMEM_DeclareAFSMemPool(struct gcsNode, NodeArray, gcfOpt);
+
+ /* The previous macro creates two inline functions, */
+ /* gcfOpt_AllocateNodeArray and gcfOpt_FreeNodeArray. */
+
+ /* In function or struct */
+ gcsMEM_AFS_MEM_POOL nodeArrayMemPool;
+
+ /* In function, */
+ struct gcsNode * nodeArray;
+ gceSTATUS status;
+
+ /* Before using the array memory pool, initialize it. */
+ /* The second argument is the gcoOS object, the third is the number of data */
+ /* structures to allocate for each chunk. */
+ status = gcfMEM_InitAFSMemPool(&nodeArrayMemPool, os, sizeof(struct gcsNode));
+ ...
+
+ /* Allocate a node array of size 100. */
+ status = gcfOpt_AllocateNodeArray(nodeArrayMemPool, &nodeArray, 100);
+ ...
+ /* Free a node array. */
+ gcfOpt_FreeNodeArray(&nodeArrayMemPool, nodeArray);
+
+ /* After using the array memory pool, free it. */
+ gcfMEM_FreeAFSMemPool(&nodeArrayMemPool);
+
+*******************************************************************************
+#endif
+
+/*******************************************************************************
+** To switch back to use gcoOS_Allocate and gcoOS_Free, add
+** #define USE_LOCAL_MEMORY_POOL 0
+** before including this file.
+*******************************************************************************/
+#ifndef USE_LOCAL_MEMORY_POOL
+/*
+ USE_LOCAL_MEMORY_POOL
+
+ This define enables the local memory management to improve performance.
+*/
+#define USE_LOCAL_MEMORY_POOL 1
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Structures
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+#else
+ typedef gcoOS gcsMEM_FS_MEM_POOL;
+ typedef gcoOS gcsMEM_VS_MEM_POOL;
+ typedef gcoOS gcsMEM_AFS_MEM_POOL;
+#endif
+
+/*******************************************************************************
+** Memory Pool Macros
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName##List( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * FirstPointer, \
+ Type * LastPointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolFreeAList(MemPool, (gctPOINTER) FirstPointer, (gctPOINTER) LastPointer)); \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ return(gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+ Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, size)); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcfMEM_VSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer)); \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ return(gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcfMEM_AFSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer)); \
+}
+
+#else
+
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ return(gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcoOS_Free(MemPool, Pointer)); \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ return(gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Size)); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcoOS_Free(MemPool, Pointer)); \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ return(gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcoOS_Free(MemPool, Pointer)); \
+}
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Functions
+*******************************************************************************/
+gceSTATUS
+gcfMEM_InitFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolGetANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeAList(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER FirstNode,
+ IN gctPOINTER LastNode
+ );
+
+gceSTATUS
+gcfMEM_InitVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT BlockSize,
+ IN gctBOOL RecycleFreeNode
+ );
+
+gceSTATUS
+gcfMEM_FreeVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolGetANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctUINT Size,
+ IN gctUINT Alignment,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolFreeANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_InitAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolGetANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctUINT Count,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolFreeANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_mem_h_ */
+
diff --git a/src/include_dove/gc_hal_options.h b/src/include_dove/gc_hal_options.h
new file mode 100644
index 0000000..b9749f4
--- /dev/null
+++ b/src/include_dove/gc_hal_options.h
@@ -0,0 +1,532 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_options_h_
+#define __gc_hal_options_h_
+
+/*
+ USE_NEW_LINUX_SIGNAL
+
+ This define enables the Linux kernel signaling between kernel and user.
+*/
+#ifndef USE_NEW_LINUX_SIGNAL
+# define USE_NEW_LINUX_SIGNAL 0
+#endif
+
+/*
+ NO_USER_DIRECT_ACCESS_FROM_KERNEL
+
+ This define enables the Linux kernel behavior accessing user memory.
+*/
+#ifndef NO_USER_DIRECT_ACCESS_FROM_KERNEL
+# define NO_USER_DIRECT_ACCESS_FROM_KERNEL 0
+#endif
+
+/*
+ VIVANTE_PROFILER
+
+ This define enables the profiler.
+*/
+#ifndef VIVANTE_PROFILER
+# define VIVANTE_PROFILER 0
+#endif
+
+/*
+ gcdUSE_VG
+
+ Enable VG HAL layer (only for GC350).
+*/
+#ifndef gcdUSE_VG
+# define gcdUSE_VG 0
+#endif
+
+/*
+ USE_SW_FB
+
+ Set to 1 if the frame buffer memory cannot be accessed by the GPU.
+*/
+#ifndef USE_SW_FB
+#define USE_SW_FB 0
+#endif
+
+/*
+ USE_SHADER_SYMBOL_TABLE
+
+ This define enables the symbol table in shader object.
+*/
+#define USE_SHADER_SYMBOL_TABLE 1
+
+/*
+ USE_SUPER_SAMPLING
+
+ This define enables super-sampling support.
+*/
+#define USE_SUPER_SAMPLING 0
+
+/*
+ PROFILE_HAL_COUNTERS
+
+ This define enables HAL counter profiling support.
+ HW and SHADER Counter profiling depends on this.
+*/
+#define PROFILE_HAL_COUNTERS 1
+
+/*
+ PROFILE_HW_COUNTERS
+
+ This define enables HW counter profiling support.
+*/
+#define PROFILE_HW_COUNTERS 1
+
+/*
+ PROFILE_SHADER_COUNTERS
+
+ This define enables SHADER counter profiling support.
+*/
+#define PROFILE_SHADER_COUNTERS 1
+
+/*
+ COMMAND_PROCESSOR_VERSION
+
+ The version of the command buffer and task manager.
+*/
+#define COMMAND_PROCESSOR_VERSION 1
+
+/*
+ gcdDUMP
+
+ When set to 1, a dump of all states and memory uploads, as well as other
+ hardware related execution will be printed to the debug console. This
+ data can be used for playing back applications.
+*/
+#define gcdDUMP 0
+
+/*
+ gcdDUMP_API
+
+ When set to 1, a high level dump of the EGL and GL/VG APs's are
+ captured.
+*/
+#define gcdDUMP_API 0
+
+/*
+ gcdDUMP_IN_KERNEL
+
+ When set to 1, all dumps will happen in the kernel. This is handy if
+ you want the kernel to dump its command buffers as well and the data
+ needs to be in sync.
+*/
+#define gcdDUMP_IN_KERNEL 0
+
+/*
+ gcdDUMP_COMMAND
+
+ When set to non-zero, the command queue will dump all incoming command
+ and context buffers as well as all other modifications to the command
+ queue.
+*/
+#define gcdDUMP_COMMAND 0
+
+/*
+ gcdNULL_DRIVER
+*/
+#define gcdNULL_DRIVER 0
+
+/*
+ gcdENABLE_TIMEOUT_DETECTION
+
+ Enable timeout detection.
+*/
+#define gcdENABLE_TIMEOUT_DETECTION 0
+
+/*
+ gcdCMD_BUFFERS
+
+ Number of command buffers to use per client. Each command buffer is 32kB in
+ size.
+*/
+#define gcdCMD_BUFFERS 2
+
+/*
+ gcdPOWER_CONTROL_DELAY
+
+ The delay in milliseconds required to wait until the GPU has woke up from a
+ suspend or power-down state. This is system dependent because the bus clock
+ also needs to be stabalize.
+*/
+#define gcdPOWER_CONTROL_DELAY 1
+
+/*
+ gcdMMU_SIZE
+
+ Size of the MMU page table in bytes. Each 4 bytes can hold 4kB worth of
+ virtual data.
+*/
+#define gcdMMU_SIZE (128 << 10)
+
+/*
+ gcdSECURE_USER
+
+ Use logical addresses instead of physical addresses in user land. In this
+ case a hint table is created for both command buffers and context buffers,
+ and that hint table will be used to patch up those buffers in the kernel
+ when they are ready to submit.
+*/
+#define gcdSECURE_USER 0
+
+/*
+ gcdSECURE_CACHE_SLOTS
+
+ Number of slots in the logical to DMA address cache table. Each time a
+ logical address needs to be translated into a DMA address for the GPU, this
+ cache will be walked. The replacement scheme is LRU.
+*/
+#define gcdSECURE_CACHE_SLOTS 64
+
+/*
+ gcdREGISTER_ACCESS_FROM_USER
+
+ Set to 1 to allow IOCTL calls to get through from user land. This should
+ only be in debug or development drops.
+*/
+#ifndef gcdREGISTER_ACCESS_FROM_USER
+# define gcdREGISTER_ACCESS_FROM_USER 1
+#endif
+
+/*
+ gcdHEAP_SIZE
+
+ Set the allocation size for the internal heaps. Each time a heap is full,
+ a new heap will be allocated with this minmimum amount of bytes. The bigger
+ this size, the fewer heaps there are to allocate, the better the
+ performance. However, heaps won't be freed until they are completely free,
+ so there might be some more memory waste if the size is too big.
+*/
+#define gcdHEAP_SIZE (64 << 10)
+/*
+ MRVL_TAVOR_PV2_DISABLE_YFLIP
+*/
+#define MRVL_TAVOR_PV2_DISABLE_YFLIP 0
+
+/*
+ gcdNO_POWER_MANAGEMENT
+
+ This define disables the power management code.
+*/
+#ifndef gcdNO_POWER_MANAGEMENT
+# define gcdNO_POWER_MANAGEMENT 0
+#endif
+
+/*
+ VIVANTE_POWER_MANAGE
+
+ This define enable the vivante power management code.
+*/
+#ifndef VIVANTE_POWER_MANAGE
+# define VIVANTE_POWER_MANAGE 1
+#endif
+/*
+ gcdFPGA_BUILD
+
+ This define enables work arounds for FPGA images.
+*/
+#if !defined(gcdFPGA_BUILD)
+# define gcdFPGA_BUILD 0
+#endif
+
+/*
+ gcdGPU_TIMEOUT
+
+ This define specified the number of milliseconds the system will wait before
+ it broadcasts the GPU is stuck. In other words, it will define the timeout
+ of any operation that needs to wait for the GPU.
+
+ If the value is 0, no timeout will be checked for.
+*/
+#if !defined(gcdGPU_TIMEOUT)
+# define gcdGPU_TIMEOUT 0
+#endif
+
+/*
+ * MACRO definition of MRVL
+ */
+#ifdef CONFIG_CPU_PXA910
+#define MRVL_PLATFORM_TD 1
+#else
+#define MRVL_PLATFORM_TD 0
+#endif
+
+#ifdef CONFIG_PXA95x
+#define MRVL_PLATFORM_MG1 1
+#else
+#define MRVL_PLATFORM_MG1 0
+#endif
+
+#ifdef CONFIG_CPU_MMP2
+#define MRVL_PLATFORM_MMP2 1
+#else
+#define MRVL_PLATFORM_MMP2 0
+#endif
+
+#if (defined CONFIG_DVFM) && (defined CONFIG_DVFM_PXA910)
+#define MRVL_CONFIG_DVFM_TD 1
+#else
+#define MRVL_CONFIG_DVFM_TD 0
+#endif
+
+#ifdef CONFIG_PXA95x
+#define MRVL_CONFIG_DVFM_MG1 1
+#else
+#define MRVL_CONFIG_DVFM_MG1 0
+#endif
+
+#if (defined CONFIG_DVFM) && (defined CONFIG_DVFM_MMP2)
+#define MRVL_CONFIG_DVFM_MMP2 1
+#else
+#define MRVL_CONFIG_DVFM_MMP2 0
+#endif
+
+/*
+ MRVL_LOW_POWER_MODE_DEBUG
+*/
+#define MRVL_LOW_POWER_MODE_DEBUG 0
+
+/*
+ MRVL Utility Options
+*/
+#define MRVL_FORCE_MSAA_ON 0
+
+/*
+ MRVL_SWAP_BUFFER_IN_EVERY_DRAW
+
+ This define force swapbuffer after every drawElement/drawArray.
+*/
+#define MRVL_SWAP_BUFFER_IN_EVERY_DRAW 0
+
+#ifndef MRVL_BENCH
+# define MRVL_BENCH 0
+#endif
+
+#define MRVL_EANBLE_COMPRESSION_DXT 0
+
+/* Texture coordinate generation */
+#define MRVL_TEXGEN 1
+
+/* Tex gen code from Vivante */
+#define VIVANTE_TEXGEN 0
+
+/* Swap buffer optimization */
+#define MRVL_OPTI_SWAP_BUFFER 1
+
+/* Disable swap worker thread */
+#define MRVL_DISABLE_SWAP_THREAD 1
+
+/* API log enable */
+#define MRVL_ENABLE_ERROR_LOG 1
+#define MRVL_ENABLE_API_LOG 0
+#define MRVL_ENABLE_EGL_API_LOG 0
+#define MRVL_ENABLE_OES1_API_LOG 0
+#define MRVL_ENABLE_OES2_API_LOG 0
+#define MRVL_ENABLE_OVG_API_LOG 0
+
+/* enable it can dump logs to file
+ * for android can stop dump by "setprop marvell.graphics.dump_log 0"
+*/
+#define MRVL_DUMP_LOG_TO_FILE 0
+
+/* Optimization for Eclair UI */
+#define MRVL_OPTI_ANDROID_IMAGE 1
+
+/* if pmem is enabled and cacheable, enable it */
+#define MRVL_CACHEABLE_PMEM 1
+
+#define MRVL_DISABLE_FASTCLEAR 0
+
+#define MRVL_OPTI_COMPOSITOR 1
+#define MRVL_OPTI_COMPOSITOR_DEBUG 0
+#define MRVL_READ_PIXEL_2D 1
+#define MRVL_2D_SKIP_CONTEXT 0
+#define MRVL_2D_FORCE_FILTER_UPLOAD 1
+
+
+#define MRVL_OPTI_STREAM_FAST_PATH 1
+#define MRVL_OPTI_USE_RESERVE_MEMORY 1
+
+/* Enable user mode heap allocation
+ * if enable, all internal structure should be allocated from pre-allocated heap
+ * if disable, all internal structure should be allocated by malloc directly
+ */
+#define MRVL_ENABLE_USERMODE_HEAP_ALLOCATION 0
+
+
+/* Enable a timer thread to check the status of GC periodically */
+#define MRVL_TIMER 0
+
+/* Enable a idle profiling thread to turn off GC when idle */
+#if (MRVL_PLATFORM_TD || MRVL_PLATFORM_MG1 || MRVL_PLATFORM_MMP2) && (defined ANDROID)
+#define MRVL_PROFILE_THREAD 1
+#else
+#define MRVL_PROFILE_THREAD 0
+#endif
+
+/* Enable a guard thread to check the status of GC */
+#if (MRVL_PLATFORM_TD || MRVL_PLATFORM_MG1) && (defined ANDROID)
+#define MRVL_GUARD_THREAD 1
+#define MRVL_PRINT_CMD_BUFFER 1
+#else
+#define MRVL_GUARD_THREAD 0
+#define MRVL_PRINT_CMD_BUFFER 0
+#endif
+
+/* Power -- Enable clock gating */
+#define MRVL_ENABLE_CLOCK_GATING 1
+
+/* Power -- Enable frequency scaling */
+#define MRVL_ENABLE_FREQ_SCALING 1
+
+/* Enable dvfm control for certain platform */
+#if MRVL_CONFIG_DVFM_MG1 || MRVL_CONFIG_DVFM_MMP2
+#define MRVL_CONFIG_ENABLE_DVFM 1
+#else
+#define MRVL_CONFIG_ENABLE_DVFM 0
+#endif
+
+/* Separate GC clk and power on/off */
+#if (MRVL_PLATFORM_TD || MRVL_PLATFORM_MG1)
+#define SEPARATE_CLOCK_AND_POWER 1
+#define KEEP_POWER_ON 0
+#else
+#define SEPARATE_CLOCK_AND_POWER 0
+#endif
+
+/* Enable control of AXI bus clock */
+#if MRVL_PLATFORM_MG1
+#define MRVL_CONFIG_AXICLK_CONTROL 1
+#else
+#define MRVL_CONFIG_AXICLK_CONTROL 0
+#endif
+
+/* Enable early-suspend related functions */
+#if (defined CONFIG_HAS_EARLYSUSPEND) && (defined CONFIG_EARLYSUSPEND)
+#define MRVL_CONFIG_ENABLE_EARLYSUSPEND 1
+#else
+#define MRVL_CONFIG_ENABLE_EARLYSUSPEND 0
+#endif
+
+/* Enable BSP runtime or idle profile */
+#if (defined CONFIG_PXA910_DVFM_STATS)
+#define ENABLE_BSP_IDLE_PROFILE 1
+#else
+#define ENABLE_BSP_IDLE_PROFILE 0
+#endif
+
+/* Force surface format RGBA8888*/
+#define MRVL_FORCE_8888 0
+
+
+/* Preserve cmd buffer space to avoid unneeded split(then context switch */
+#define MRVL_PRESERVE_CMD_BUFFER 1
+
+/*
+ Record texture in command buffer for it idle or not
+*/
+#define MRVL_TEXTURE_USED_LIST 0
+
+/*
+ simple wait vsync
+*/
+#define MRVL_SIMPLE_WAIT_VSYNC 0
+
+/*
+ * to decrese mov instruction
+ */
+#define MRVL_OPTIMIZE_LIGHT_MOV 0
+
+/*
+ * for eglSwapInterval in Android
+ */
+#define MRVL_ANDROID_VSYNC_INTERVAL 1
+
+/* for speed up texture lookup
+ *
+ */
+#define MRVL_OPT_TEXTURE_LOOKUP 1
+
+/*
+ * skip unnecessary texture attribute validate
+ */
+#define MRVL_TEXTURE_VALIDATE_OPT 1
+
+/*
+ * New Back Copy Propagation Optimization
+ */
+#define MRVL_NEW_BCP_OPT 1
+
+/*
+ * VBO dirty patch Optimization
+ */
+#define MRVL_VBO_DIRTY_PATCH 1
+
+/*
+ * Pre-allocated context buffers and reuse them
+ */
+#define MRVL_PRE_ALLOCATE_CTX_BUFFER 1
+
+#if MRVL_PRE_ALLOCATE_CTX_BUFFER
+/* Minimal number of context buffers.
+* Can't be less than 2, or it can't get the signal when wait.
+*/
+#define gcdCTXBUF_SIZE_MIN 2
+/*
+* Number of context buffers to use per client by default.
+*/
+#define gcdCTXBUF_SIZE_DEFAULT 10
+#endif
+
+/*
+ * Remove image texture surface to save video memory on 2d path.
+ */
+#define MRVL_MEM_OPT 1
+
+/*
+ Definitions for vendor, renderer and version strings
+*/
+
+#define _VENDOR_STRING_ "Marvell Technology Group Ltd"
+
+#define _EGL_VERSION_STRING_ "EGL 1.3";
+
+#if defined(COMMON_LITE)
+#define _OES11_VERSION_STRING_ "OpenGL ES-CL 1.1";
+#else
+#define _OES11_VERSION_STRING_ "OpenGL ES-CM 1.1";
+#endif
+
+#define _OES20_VERSION_STRING_ "OpenGL ES 2.0";
+#define _GLSL_ES_VERSION_STRING_ "OpenGL ES GLSL ES 1.00"
+
+#define _OPENVG_VERSION_STRING_ "OpenVG 1.1"
+
+#define _GC_VERSION_STRING_ "GC Ver0.8.0.3184-1"
+
+#endif /* __gc_hal_options_h_ */
diff --git a/src/include_dove/gc_hal_profiler.h b/src/include_dove/gc_hal_profiler.h
new file mode 100644
index 0000000..4373215
--- /dev/null
+++ b/src/include_dove/gc_hal_profiler.h
@@ -0,0 +1,221 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_profiler_h_
+#define __gc_hal_profiler_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define GLVERTEX_OBJECT 10
+#define GLVERTEX_OBJECT_BYTES 11
+
+#define GLINDEX_OBJECT 20
+#define GLINDEX_OBJECT_BYTES 21
+
+#define GLTEXTURE_OBJECT 30
+#define GLTEXTURE_OBJECT_BYTES 31
+
+#if VIVANTE_PROFILER
+#define gcmPROFILE_GC(Hal, Enum, Value) gcoPROFILER_Count(Hal, Enum, Value)
+#else
+#define gcmPROFILE_GC(Hal, Enum, Value) do { } while (gcvFALSE)
+#endif
+
+/* HW profile information. */
+typedef struct _gcsPROFILER_COUNTERS
+{
+ /* HW static counters. */
+ gctUINT32 gpuClock;
+ gctUINT32 axiClock;
+ gctUINT32 shaderClock;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuClockStart;
+ gctUINT32 gpuClockEnd;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuCyclesCounter;
+ gctUINT32 gpuTotalRead64BytesPerFrame;
+ gctUINT32 gpuTotalWrite64BytesPerFrame;
+
+ /* PE */
+ gctUINT32 pe_pixel_count_killed_by_color_pipe;
+ gctUINT32 pe_pixel_count_killed_by_depth_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_color_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_depth_pipe;
+
+ /* SH */
+ gctUINT32 ps_inst_counter;
+ gctUINT32 rendered_pixel_counter;
+ gctUINT32 vs_inst_counter;
+ gctUINT32 rendered_vertice_counter;
+ gctUINT32 vtx_branch_inst_counter;
+ gctUINT32 vtx_texld_inst_counter;
+ gctUINT32 pxl_branch_inst_counter;
+ gctUINT32 pxl_texld_inst_counter;
+
+ /* PA */
+ gctUINT32 pa_input_vtx_counter;
+ gctUINT32 pa_input_prim_counter;
+ gctUINT32 pa_output_prim_counter;
+ gctUINT32 pa_depth_clipped_counter;
+ gctUINT32 pa_trivial_rejected_counter;
+ gctUINT32 pa_culled_counter;
+
+ /* SE */
+ gctUINT32 se_culled_triangle_count;
+ gctUINT32 se_culled_lines_count;
+
+ /* RA */
+ gctUINT32 ra_valid_pixel_count;
+ gctUINT32 ra_total_quad_count;
+ gctUINT32 ra_valid_quad_count_after_early_z;
+ gctUINT32 ra_total_primitive_count;
+ gctUINT32 ra_pipe_cache_miss_counter;
+ gctUINT32 ra_prefetch_cache_miss_counter;
+ gctUINT32 ra_eez_culled_counter;
+
+ /* TX */
+ gctUINT32 tx_total_bilinear_requests;
+ gctUINT32 tx_total_trilinear_requests;
+ gctUINT32 tx_total_discarded_texture_requests;
+ gctUINT32 tx_total_texture_requests;
+ gctUINT32 tx_mem_read_count;
+ gctUINT32 tx_mem_read_in_8B_count;
+ gctUINT32 tx_cache_miss_count;
+ gctUINT32 tx_cache_hit_texel_count;
+ gctUINT32 tx_cache_miss_texel_count;
+
+ /* MC */
+ gctUINT32 mc_total_read_req_8B_from_pipeline;
+ gctUINT32 mc_total_read_req_8B_from_IP;
+ gctUINT32 mc_total_write_req_8B_from_pipeline;
+
+ /* HI */
+ gctUINT32 hi_axi_cycles_read_request_stalled;
+ gctUINT32 hi_axi_cycles_write_request_stalled;
+ gctUINT32 hi_axi_cycles_write_data_stalled;
+}
+gcsPROFILER_COUNTERS;
+
+/* HAL profile information. */
+typedef struct _gcsPROFILER
+{
+ gctFILE file;
+
+ /* Aggregate Information */
+
+ /* Clock Info */
+ gctUINT64 frameStart;
+
+ /* Current frame information */
+ gctUINT32 frameNumber;
+ gctUINT64 frameStartTimeusec;
+
+#if PROFILE_HAL_COUNTERS
+ gctUINT32 vertexBufferTotalBytesAlloc;
+ gctUINT32 vertexBufferNewBytesAlloc;
+ int vertexBufferTotalObjectsAlloc;
+ int vertexBufferNewObjectsAlloc;
+
+ gctUINT32 indexBufferTotalBytesAlloc;
+ gctUINT32 indexBufferNewBytesAlloc;
+ int indexBufferTotalObjectsAlloc;
+ int indexBufferNewObjectsAlloc;
+
+ gctUINT32 textureBufferTotalBytesAlloc;
+ gctUINT32 textureBufferNewBytesAlloc;
+ int textureBufferTotalObjectsAlloc;
+ int textureBufferNewObjectsAlloc;
+
+#endif
+}
+gcsPROFILER;
+
+/* Memory profile information. */
+struct _gcsMemProfile
+{
+ /* Memory Usage */
+ gctUINT32 videoMemUsed;
+ gctUINT32 systemMemUsed;
+ gctUINT32 commitBufferSize;
+ gctUINT32 contextBufferCopyBytes;
+};
+
+/* Shader profile information. */
+struct _gcsSHADER_PROFILER
+{
+ gctUINT32 shaderLength;
+ gctUINT32 shaderALUCycles;
+ gctUINT32 shaderTexLoadCycles;
+ gctUINT32 shaderTempRegCount;
+ gctUINT32 shaderSamplerRegCount;
+ gctUINT32 shaderInputRegCount;
+ gctUINT32 shaderOutputRegCount;
+};
+
+/* Initialize the gcsProfiler. */
+gceSTATUS
+gcoPROFILER_Initialize(
+ IN gcoHAL Hal,
+ IN gctFILE File
+ );
+
+/* Destroy the gcProfiler. */
+gceSTATUS
+gcoPROFILER_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Call to signal end of frame. */
+gceSTATUS
+gcoPROFILER_EndFrame(
+ IN gcoHAL Hal
+ );
+
+gceSTATUS
+gcoPROFILER_Count(
+ IN gcoHAL Hal,
+ IN gctUINT32 Enum,
+ IN gctINT Value
+ );
+
+/* Profile input vertex shader. */
+gceSTATUS
+gcoPROFILER_ShaderVS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Vs
+ );
+
+/* Profile input fragment shader. */
+gceSTATUS
+gcoPROFILER_ShaderFS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Fs
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_profiler_h_ */
diff --git a/src/include_dove/gc_hal_raster.h b/src/include_dove/gc_hal_raster.h
new file mode 100644
index 0000000..23485a2
--- /dev/null
+++ b/src/include_dove/gc_hal_raster.h
@@ -0,0 +1,807 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_raster_h_
+#define __gc_hal_raster_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoBRUSH * gcoBRUSH;
+typedef struct _gcoBRUSH_CACHE * gcoBRUSH_CACHE;
+
+/******************************************************************************\
+******************************** gcoBRUSH Object *******************************
+\******************************************************************************/
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructSingleColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructMonochrome(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Destroy an gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_Destroy(
+ IN gcoBRUSH Brush
+ );
+
+/******************************************************************************\
+******************************** gcoSURF Object *******************************
+\******************************************************************************/
+
+/* Set cipping rectangle. */
+gceSTATUS
+gcoSURF_SetClipping(
+ IN gcoSURF Surface
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gcoSURF_Clear2D(
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 LoColor,
+ IN gctUINT32 HiColor
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gcoSURF_Line(
+ IN gcoSURF Surface,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop
+ );
+
+/* Generic rectangular blit. */
+gceSTATUS
+gcoSURF_Blit(
+ IN OPTIONAL gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN OPTIONAL gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN OPTIONAL gceSURF_TRANSPARENCY Transparency,
+ IN OPTIONAL gctUINT32 TransparencyColor,
+ IN OPTIONAL gctPOINTER Mask,
+ IN OPTIONAL gceSURF_MONOPACK MaskPack
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gcoSURF_MonoBlit(
+ IN gcoSURF DestSurface,
+ IN gctPOINTER Source,
+ IN gceSURF_MONOPACK SourcePack,
+ IN gcsPOINT_PTR SourceSize,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Filter blit. */
+gceSTATUS
+gcoSURF_FilterBlit(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gcoSURF_EnableAlphaBlend(
+ IN gcoSURF Surface,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gcoSURF_DisableAlphaBlend(
+ IN gcoSURF Surface
+ );
+
+/* Copy a rectangular area with format conversion. */
+gceSTATUS
+gcoSURF_CopyPixels(
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctINT SourceX,
+ IN gctINT SourceY,
+ IN gctINT TargetX,
+ IN gctINT TargetY,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+/* Read surface pixel. */
+gceSTATUS
+gcoSURF_ReadPixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ OUT gctPOINTER PixelValue
+ );
+
+/* Write surface pixel. */
+gceSTATUS
+gcoSURF_WritePixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ IN gctPOINTER PixelValue
+ );
+
+/******************************************************************************\
+********************************** gco2D Object *********************************
+\******************************************************************************/
+
+/* Construct a new gco2D object. */
+gceSTATUS
+gco2D_Construct(
+ IN gcoHAL Hal,
+ OUT gco2D * Hardware
+ );
+
+/* Destroy an gco2D object. */
+gceSTATUS
+gco2D_Destroy(
+ IN gco2D Hardware
+ );
+
+
+/* Start and end of gco2D draws */
+gceSTATUS
+gco2D_Begin(
+ IN gco2D Engine,
+ IN gctUINT cmdSize
+ );
+
+gceSTATUS
+gco2D_End(
+ IN gco2D Engine
+ );
+
+
+
+/* Sets the maximum number of brushes in the brush cache. */
+gceSTATUS
+gco2D_SetBrushLimit(
+ IN gco2D Hardware,
+ IN gctUINT MaxCount
+ );
+
+/* Flush the brush. */
+gceSTATUS
+gco2D_FlushBrush(
+ IN gco2D Engine,
+ IN gcoBRUSH Brush,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Program the specified solid color brush. */
+gceSTATUS
+gco2D_LoadSolidBrush(
+ IN gco2D Engine,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask
+ );
+
+/* Configure monochrome source. */
+gceSTATUS
+gco2D_SetMonochromeSource(
+ IN gco2D Engine,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_MONOPACK DataPack,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source extension for full rotation. */
+gceSTATUS
+gco2D_SetColorSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSourceAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative
+ );
+
+/* Configure masked color source. */
+gceSTATUS
+gco2D_SetMaskedSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack
+ );
+
+/* Configure masked color source extension for full rotation. */
+gceSTATUS
+gco2D_SetMaskedSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Setup the source rectangle. */
+gceSTATUS
+gco2D_SetSource(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect
+ );
+
+/* Set clipping rectangle. */
+gceSTATUS
+gco2D_SetClipping(
+ IN gco2D Engine,
+ IN gcsRECT_PTR Rect
+ );
+
+/* Configure destination. */
+gceSTATUS
+gco2D_SetTarget(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth
+ );
+
+/* Configure destination extension for full rotation. */
+gceSTATUS
+gco2D_SetTargetEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Calculate and program the stretch factors. */
+gceSTATUS
+gco2D_SetStretchFactors(
+ IN gco2D Engine,
+ IN gctUINT32 HorFactor,
+ IN gctUINT32 VerFactor
+ );
+
+/* Calculate and program the stretch factors based on the rectangles. */
+gceSTATUS
+gco2D_SetStretchRectFactors(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect
+ );
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructSingleColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructMonochromeBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gco2D_Clear(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+gceSTATUS
+gco2D_ClearEx(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gco2D_Line(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines based on the 32-bit color. */
+gceSTATUS
+gco2D_ColorLine(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Generic blit. */
+gceSTATUS
+gco2D_Blit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Batch blit. */
+gceSTATUS
+gco2D_BatchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Stretch blit. */
+gceSTATUS
+gco2D_StretchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gco2D_MonoBlit(
+ IN gco2D Engine,
+ IN gctPOINTER StreamBits,
+ IN gcsPOINT_PTR StreamSize,
+ IN gcsRECT_PTR StreamRect,
+ IN gceSURF_MONOPACK SrcStreamPack,
+ IN gceSURF_MONOPACK DestStreamPack,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 FgRop,
+ IN gctUINT32 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Set kernel size. */
+gceSTATUS
+gco2D_SetKernelSize(
+ IN gco2D Engine,
+ IN gctUINT8 HorKernelSize,
+ IN gctUINT8 VerKernelSize
+ );
+
+/* Set filter type. */
+gceSTATUS
+gco2D_SetFilterType(
+ IN gco2D Engine,
+ IN gceFILTER_TYPE FilterType
+ );
+
+/* Set the filter kernel by user. */
+gceSTATUS
+gco2D_SetUserFilterKernel(
+ IN gco2D Engine,
+ IN gceFILTER_PASS_TYPE PassType,
+ IN gctUINT16_PTR KernelArray
+ );
+
+/* Select the pass(es) to be done for user defined filter. */
+gceSTATUS
+gco2D_EnableUserFilterPasses(
+ IN gco2D Engine,
+ IN gctBOOL HorPass,
+ IN gctBOOL VerPass
+ );
+
+/* Frees the temporary buffer allocated by filter blit operation. */
+gceSTATUS
+gco2D_FreeFilterBuffer(
+ IN gco2D Engine
+ );
+
+/* Filter blit. */
+gceSTATUS
+gco2D_FilterBlit(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Filter blit extension for full rotation. */
+gceSTATUS
+gco2D_FilterBlitEx(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gctUINT32 SrcSurfaceHeight,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gctUINT32 DestSurfaceHeight,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gco2D_EnableAlphaBlend(
+ IN gco2D Engine,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Enable alpha blending engine in the hardware. */
+gceSTATUS
+gco2D_EnableAlphaBlendAdvanced(
+ IN gco2D Engine,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode
+ );
+
+/* Enable alpha blending engine with Porter Duff rule. */
+gceSTATUS
+gco2D_SetPorterDuffBlending(
+ IN gco2D Engine,
+ IN gce2D_PORTER_DUFF_RULE Rule
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gco2D_DisableAlphaBlend(
+ IN gco2D Engine
+ );
+
+/* Retrieve the maximum number of 32-bit data chunks for a single DE command. */
+gctUINT32
+gco2D_GetMaximumDataCount(
+ void
+ );
+
+/* Retrieve the maximum number of rectangles, that can be passed in a single DE command. */
+gctUINT32
+gco2D_GetMaximumRectCount(
+ void
+ );
+
+/* Returns the pixel alignment of the surface. */
+gceSTATUS
+gco2D_GetPixelAlignment(
+ gceSURF_FORMAT Format,
+ gcsPOINT_PTR Alignment
+ );
+
+/* Retrieve monochrome stream pack size. */
+gceSTATUS
+gco2D_GetPackSize(
+ IN gceSURF_MONOPACK StreamPack,
+ OUT gctUINT32 * PackWidth,
+ OUT gctUINT32 * PackHeight
+ );
+
+/* Flush the 2D pipeline. */
+gceSTATUS
+gco2D_Flush(
+ IN gco2D Engine
+ );
+
+/* Load 256-entry color table for INDEX8 source surfaces. */
+gceSTATUS
+gco2D_LoadPalette(
+ IN gco2D Engine,
+ IN gctUINT FirstIndex,
+ IN gctUINT IndexCount,
+ IN gctPOINTER ColorTable,
+ IN gctBOOL ColorConvert
+ );
+
+/* Enable/disable 2D BitBlt mirrorring. */
+gceSTATUS
+gco2D_SetBitBlitMirror(
+ IN gco2D Engine,
+ IN gctBOOL HorizontalMirror,
+ IN gctBOOL VerticalMirror
+ );
+
+/* Set the transparency for source, destination and pattern. */
+gceSTATUS
+gco2D_SetTransparencyAdvanced(
+ IN gco2D Engine,
+ IN gce2D_TRANSPARENCY SrcTransparency,
+ IN gce2D_TRANSPARENCY DstTransparency,
+ IN gce2D_TRANSPARENCY PatTransparency
+ );
+
+/* Set the source color key. */
+gceSTATUS
+gco2D_SetSourceColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the source color key range. */
+gceSTATUS
+gco2D_SetSourceColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the target color key. */
+gceSTATUS
+gco2D_SetTargetColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the target color key range. */
+gceSTATUS
+gco2D_SetTargetColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the YUV color space mode. */
+gceSTATUS
+gco2D_SetYUVColorMode(
+ IN gco2D Engine,
+ IN gce2D_YUV_COLOR_MODE Mode
+ );
+
+/* Setup the source global color value in ARGB8 format. */
+gceSTATUS gco2D_SetSourceGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the target global color value in ARGB8 format. */
+gceSTATUS gco2D_SetTargetGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the source and target pixel multiply modes. */
+gceSTATUS
+gco2D_SetPixelMultiplyModeAdvanced(
+ IN gco2D Engine,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE SrcPremultiplySrcAlpha,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstPremultiplyDstAlpha,
+ IN gce2D_GLOBAL_COLOR_MULTIPLY_MODE SrcPremultiplyGlobalMode,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstDemultiplyDstAlpha
+ );
+
+/* Set the GPU clock cycles after which the idle engine will keep auto-flushing. */
+gceSTATUS
+gco2D_SetAutoFlushCycles(
+ IN gco2D Engine,
+ IN gctUINT32 Cycles
+ );
+
+/* Read the profile registers available in the 2D engine and sets them in the profile.
+ The function will also reset the pixelsRendered counter every time.
+*/
+gceSTATUS
+gco2D_ProfileEngine(
+ IN gco2D Engine,
+ OPTIONAL gcs2D_PROFILE_PTR Profile
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_raster_h_ */
+
diff --git a/src/include_dove/gc_hal_types.h b/src/include_dove/gc_hal_types.h
new file mode 100644
index 0000000..34d126a
--- /dev/null
+++ b/src/include_dove/gc_hal_types.h
@@ -0,0 +1,601 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_types_h_
+#define __gc_hal_types_h_
+
+#include "gc_hal_options.h"
+
+#ifdef _WIN32
+#pragma warning(disable:4127) /* Conditional expression is constant (do { }
+ ** while(0)). */
+#pragma warning(disable:4100) /* Unreferenced formal parameter. */
+#pragma warning(disable:4204) /* Non-constant aggregate initializer (C99). */
+#pragma warning(disable:4131) /* Uses old-style declarator (for Bison and
+ ** Flex generated files). */
+#pragma warning(disable:4206) /* Translation unit is empty. */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+** Platform macros.
+*/
+
+#if defined(__GNUC__)
+# define gcdHAS_ELLIPSES 1 /* GCC always has it. */
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+# define gcdHAS_ELLIPSES 1 /* C99 has it. */
+#elif defined(_MSC_VER) && (_MSC_VER >= 1500)
+# define gcdHAS_ELLIPSES 1 /* MSVC 2007+ has it. */
+#elif defined(UNDER_CE)
+# define gcdHAS_ELLIPSES 0 /* Windows CE doesn't have it. */
+#else
+# error "gcdHAS_ELLIPSES: Platform could not be determined"
+#endif
+
+/******************************************************************************\
+************************************ Keyword ***********************************
+\******************************************************************************/
+
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
+# define gcmINLINE inline /* C99 keyword. */
+#elif defined(__GNUC__)
+# define gcmINLINE __inline__ /* GNU keyword. */
+#elif defined(_MSC_VER) || defined(UNDER_CE)
+# define gcmINLINE __inline /* Internal keyword. */
+#else
+# error "gcmINLINE: Platform could not be determined"
+#endif
+
+#ifndef gcdDEBUG
+# if (defined(DBG) && DBG) || defined(DEBUG) || defined(_DEBUG)
+# define gcdDEBUG 1
+# else
+# define gcdDEBUG 0
+# endif
+#endif
+
+#ifdef _USRDLL
+# ifdef _MSC_VER
+# ifdef HAL_EXPORTS
+# define HALAPI __declspec(dllexport)
+# else
+# define HALAPI __declspec(dllimport)
+# endif
+# define HALDECL __cdecl
+# else
+# ifdef HAL_EXPORTS
+# define HALAPI
+# else
+# define HALAPI extern
+# endif
+# endif
+#else
+# define HALAPI
+# define HALDECL
+#endif
+
+/******************************************************************************\
+********************************** Common Types ********************************
+\******************************************************************************/
+
+#define gcvFALSE 0
+#define gcvTRUE 1
+
+#define gcvINFINITE ((gctUINT32) ~0U)
+
+typedef int gctBOOL;
+typedef gctBOOL * gctBOOL_PTR;
+
+typedef int gctINT;
+typedef signed char gctINT8;
+typedef signed short gctINT16;
+typedef signed int gctINT32;
+typedef signed long long gctINT64;
+
+typedef gctINT * gctINT_PTR;
+typedef gctINT8 * gctINT8_PTR;
+typedef gctINT16 * gctINT16_PTR;
+typedef gctINT32 * gctINT32_PTR;
+typedef gctINT64 * gctINT64_PTR;
+
+typedef unsigned int gctUINT;
+typedef unsigned char gctUINT8;
+typedef unsigned short gctUINT16;
+typedef unsigned int gctUINT32;
+typedef unsigned long long gctUINT64;
+
+typedef gctUINT * gctUINT_PTR;
+typedef gctUINT8 * gctUINT8_PTR;
+typedef gctUINT16 * gctUINT16_PTR;
+typedef gctUINT32 * gctUINT32_PTR;
+typedef gctUINT64 * gctUINT64_PTR;
+
+typedef unsigned long gctSIZE_T;
+typedef gctSIZE_T * gctSIZE_T_PTR;
+
+#ifdef __cplusplus
+# define gcvNULL 0
+#else
+# define gcvNULL ((void *) 0)
+#endif
+
+typedef float gctFLOAT;
+typedef signed int gctFIXED_POINT;
+typedef float * gctFLOAT_PTR;
+
+typedef void * gctPHYS_ADDR;
+typedef void * gctHANDLE;
+typedef void * gctFILE;
+typedef void * gctSIGNAL;
+typedef void * gctWINDOW;
+typedef void * gctIMAGE;
+
+typedef void * gctPOINTER;
+typedef const void * gctCONST_POINTER;
+
+typedef char gctCHAR;
+typedef char * gctSTRING;
+typedef const char * gctCONST_STRING;
+
+typedef struct _gcsCOUNT_STRING
+{
+ gctSIZE_T Length;
+ gctCONST_STRING String;
+}
+gcsCOUNT_STRING;
+
+/* Fixed point constants. */
+#define gcvZERO_X ((gctFIXED_POINT) 0x00000000)
+#define gcvHALF_X ((gctFIXED_POINT) 0x00008000)
+#define gcvONE_X ((gctFIXED_POINT) 0x00010000)
+#define gcvNEGONE_X ((gctFIXED_POINT) 0xFFFF0000)
+#define gcvTWO_X ((gctFIXED_POINT) 0x00020000)
+
+/******************************************************************************\
+******************************* Fixed Point Math *******************************
+\******************************************************************************/
+
+#define gcmXMultiply(x1, x2) \
+ (gctFIXED_POINT) (((gctINT64) (x1) * (x2)) >> 16)
+
+#define gcmXDivide(x1, x2) \
+ (gctFIXED_POINT) ((((gctINT64) (x1)) << 16) / (x2))
+
+#define gcmXMultiplyDivide(x1, x2, x3) \
+ (gctFIXED_POINT) ((gctINT64) (x1) * (x2) / (x3))
+
+/* 2D Engine profile. */
+struct gcs2D_PROFILE
+{
+ /* Cycle count.
+ 32bit counter incremented every 2D clock cycle.
+ Wraps back to 0 when the counter overflows.
+ */
+ gctUINT32 cycleCount;
+
+ /* Pixels rendered by the 2D engine.
+ Resets to 0 every time it is read. */
+ gctUINT32 pixelsRendered;
+};
+
+
+/* Macro to combine four characters into a Charcater Code. */
+#define gcmCC(c1, c2, c3, c4) \
+( \
+ (char) (c1) \
+ | \
+ ((char) (c2) << 8) \
+ | \
+ ((char) (c3) << 16) \
+ | \
+ ((char) (c4) << 24) \
+)
+
+#define gcmPRINTABLE(c) ((((c) >= ' ') && ((c) <= '}')) ? (c) : ' ')
+
+#define gcmCC_PRINT(cc) \
+ gcmPRINTABLE((char) ( (cc) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 8) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 16) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 24) & 0xFF))
+
+/******************************************************************************\
+****************************** Function Parameters *****************************
+\******************************************************************************/
+
+#define IN
+#define OUT
+#define OPTIONAL
+
+/******************************************************************************\
+********************************* Status Codes *********************************
+\******************************************************************************/
+
+typedef enum _gceSTATUS
+{
+ gcvSTATUS_OK = 0,
+ gcvSTATUS_FALSE = 0,
+ gcvSTATUS_TRUE = 1,
+ gcvSTATUS_NO_MORE_DATA = 2,
+ gcvSTATUS_CACHED = 3,
+ gcvSTATUS_MIPMAP_TOO_LARGE = 4,
+ gcvSTATUS_NAME_NOT_FOUND = 5,
+ gcvSTATUS_NOT_OUR_INTERRUPT = 6,
+ gcvSTATUS_MISMATCH = 7,
+ gcvSTATUS_MIPMAP_TOO_SMALL = 8,
+ gcvSTATUS_LARGER = 9,
+ gcvSTATUS_SMALLER = 10,
+ gcvSTATUS_CHIP_NOT_READY = 11,
+ gcvSTATUS_NEED_CONVERSION = 12,
+ gcvSTATUS_SKIP = 13,
+ gcvSTATUS_DATA_TOO_LARGE = 14,
+ gcvSTATUS_INVALID_CONFIG = 15,
+ gcvSTATUS_CHANGED = 16,
+
+ gcvSTATUS_INVALID_ARGUMENT = -1,
+ gcvSTATUS_INVALID_OBJECT = -2,
+ gcvSTATUS_OUT_OF_MEMORY = -3,
+ gcvSTATUS_MEMORY_LOCKED = -4,
+ gcvSTATUS_MEMORY_UNLOCKED = -5,
+ gcvSTATUS_HEAP_CORRUPTED = -6,
+ gcvSTATUS_GENERIC_IO = -7,
+ gcvSTATUS_INVALID_ADDRESS = -8,
+ gcvSTATUS_CONTEXT_LOSSED = -9,
+ gcvSTATUS_TOO_COMPLEX = -10,
+ gcvSTATUS_BUFFER_TOO_SMALL = -11,
+ gcvSTATUS_INTERFACE_ERROR = -12,
+ gcvSTATUS_NOT_SUPPORTED = -13,
+ gcvSTATUS_MORE_DATA = -14,
+ gcvSTATUS_TIMEOUT = -15,
+ gcvSTATUS_OUT_OF_RESOURCES = -16,
+ gcvSTATUS_INVALID_DATA = -17,
+ gcvSTATUS_INVALID_MIPMAP = -18,
+ gcvSTATUS_NOT_FOUND = -19,
+ gcvSTATUS_NOT_ALIGNED = -20,
+ gcvSTATUS_INVALID_REQUEST = -21,
+ gcvSTATUS_GPU_NOT_RESPONDING = -22,
+
+ /* Linker errors. */
+ gcvSTATUS_GLOBAL_TYPE_MISMATCH = -1000,
+ gcvSTATUS_TOO_MANY_ATTRIBUTES = -1001,
+ gcvSTATUS_TOO_MANY_UNIFORMS = -1002,
+ gcvSTATUS_TOO_MANY_VARYINGS = -1003,
+ gcvSTATUS_UNDECLARED_VARYING = -1004,
+ gcvSTATUS_VARYING_TYPE_MISMATCH = -1005,
+ gcvSTATUS_MISSING_MAIN = -1006,
+ gcvSTATUS_NAME_MISMATCH = -1007,
+ gcvSTATUS_INVALID_INDEX = -1008,
+}
+gceSTATUS;
+
+/******************************************************************************\
+********************************* Status Macros ********************************
+\******************************************************************************/
+
+#define gcmIS_ERROR(status) (status < 0)
+#define gcmNO_ERROR(status) (status >= 0)
+#define gcmIS_SUCCESS(status) (status == gcvSTATUS_OK)
+
+/******************************************************************************\
+********************************* Field Macros *********************************
+\******************************************************************************/
+
+#define __gcmSTART(reg_field) \
+ (0 ? reg_field)
+
+#define __gcmEND(reg_field) \
+ (1 ? reg_field)
+
+#define __gcmGETSIZE(reg_field) \
+ (__gcmEND(reg_field) - __gcmSTART(reg_field) + 1)
+
+#define __gcmALIGN(data, reg_field) \
+ (((gctUINT32) (data)) << __gcmSTART(reg_field))
+
+#define __gcmMASK(reg_field) \
+ ((gctUINT32) ((__gcmGETSIZE(reg_field) == 32) \
+ ? ~0 \
+ : (~(~0 << __gcmGETSIZE(reg_field)))))
+
+/*******************************************************************************
+**
+** gcmFIELDMASK
+**
+** Get aligned field mask.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmFIELDMASK(reg, field) \
+( \
+ __gcmALIGN(__gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmGETFIELD
+**
+** Extract the value of a field from specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmGETFIELD(data, reg, field) \
+( \
+ ((((gctUINT32) (data)) >> __gcmSTART(reg##_##field)) \
+ & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELD
+**
+** Set the value of a field within specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETFIELD(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN((gctUINT32) (value) \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELDVALUE
+**
+** Set the value of a field within specified data with a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmSETFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN(reg##_##field##_##value \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmSETMASKEDFIELD
+**
+** Set the value of a masked field with specified data.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETMASKEDFIELD(reg, field, value) \
+( \
+ gcmSETFIELD(~0, reg, field, value) & \
+ gcmSETFIELDVALUE(~0, reg, MASK_ ## field, ENABLED) \
+)
+
+/*******************************************************************************
+**
+** gcmVERIFYFIELDVALUE
+**
+** Verify if the value of a field within specified data equals a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmVERIFYFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) >> __gcmSTART(reg##_##field) & \
+ __gcmMASK(reg##_##field)) \
+ == \
+ (reg##_##field##_##value & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+** Bit field macros.
+*/
+
+#define __gcmSTARTBIT(Field) \
+ ( 1 ? Field )
+
+#define __gcmBITSIZE(Field) \
+ ( 0 ? Field )
+
+#define __gcmBITMASK(Field) \
+( \
+ (1 << __gcmBITSIZE(Field)) - 1 \
+)
+
+#define gcmGETBITS(Value, Type, Field) \
+( \
+ ( ((Type) (Value)) >> __gcmSTARTBIT(Field) ) \
+ & \
+ __gcmBITMASK(Field) \
+)
+
+#define gcmSETBITS(Value, Type, Field, NewValue) \
+( \
+ ( ((Type) (Value)) \
+ & ~(__gcmBITMASK(Field) << __gcmSTARTBIT(Field)) \
+ ) \
+ | \
+ ( ( ((Type) (NewValue)) \
+ & __gcmBITMASK(Field) \
+ ) << __gcmSTARTBIT(Field) \
+ ) \
+)
+
+/******************************************************************************\
+******************************** Min/Max Macros ********************************
+\******************************************************************************/
+
+#define gcmMIN(x, y) (((x) <= (y)) ? (x) : (y))
+#define gcmMAX(x, y) (((x) >= (y)) ? (x) : (y))
+#define gcmCLAMP(x, min, max) (((x) < (min)) ? (min) : \
+ ((x) > (max)) ? (max) : (x))
+#define gcmABS(x) (((x) < 0) ? -(x) : (x))
+#define gcmNEG(x) (((x) < 0) ? (x) : -(x))
+
+
+#define gcmUNALIGNMENT(X) ((gctUINT32)(X) & (sizeof (gctUINT32) - 1))
+
+#define gcmMEMCPY_BYTE(dst,src,size) \
+ {\
+ gctUINT32 i = 0; \
+ for(i = 0; i < size; i++)\
+ {\
+ *((gctUINT8 *)dst+i) = *((gctUINT8*)src+i);\
+ }\
+ }
+
+/* Optimize memory copy.
+ For 4,8,12,16 bytes copy, use unsigned int assignment instead of calling memcopy.
+ ATTENTION: no break in switch branch.
+*/
+#define gcmMEMCPY_DWORD(dst,src,size) \
+ switch(size) \
+ {\
+ case 16:\
+ *((gctUINT32 *)dst + 3) = *((gctUINT32 *)src + 3);\
+ case 12:\
+ *((gctUINT32 *)dst + 2) = *((gctUINT32 *)src + 2);\
+ case 8:\
+ *((gctUINT32 *)dst + 1) = *((gctUINT32 *)src + 1);\
+ case 4:\
+ *((gctUINT32 *)dst) = *((gctUINT32 *)src);\
+ break;\
+ default:\
+ gcmMEMCPY_BYTE(dst,src,size);\
+ break;\
+ }
+
+/*
+ * gcmMEMCPY.
+ *
+ * gcmMEMCPY is for normal size(> 16 bytes) memory copy
+ * gcmMEMCPY_DWORD is for size <=16 bytes
+ * Note: if you do not know the size, just use gcmMEMCPY
+*/
+#define gcmMEMCPY(dst,src,size) \
+ { \
+ gctUINT32 *pDst = (gctUINT32 *)dst; \
+ gctUINT32 *pSrc = (gctUINT32 *)src; \
+ gctUINT32 Size = size; \
+ while(Size >= gcmSIZEOF(gctUINT32) * 4) \
+ { \
+ pDst[0] = pSrc[0]; \
+ pDst[1] = pSrc[1]; \
+ pDst[2] = pSrc[2]; \
+ pDst[3] = pSrc[3]; \
+ pDst += 4; \
+ pSrc += 4; \
+ Size -= (gcmSIZEOF(gctUINT32) * 4); \
+ } \
+ gcmMEMCPY_DWORD(pDst,pSrc,Size) \
+ }
+/*******************************************************************************
+**
+** gcmPTR2INT
+**
+** Convert a pointer to an integer value.
+**
+** ARGUMENTS:
+**
+** p Pointer value.
+*/
+#if defined(_WIN32) || (defined(__LP64__) && __LP64__)
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (gctUINT64) (p) \
+ )
+#else
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (p) \
+ )
+#endif
+
+/*******************************************************************************
+**
+** gcmINT2PTR
+**
+** Convert an integer value into a pointer.
+**
+** ARGUMENTS:
+**
+** v Integer value.
+*/
+#define gcmINT2PTR(i) \
+( \
+ (gctPOINTER) (i) \
+)
+
+/*******************************************************************************
+**
+** gcmOFFSETOF
+**
+** Compute the byte offset of a field inside a structure.
+**
+** ARGUMENTS:
+**
+** s Structure name.
+** field Field name.
+*/
+#define gcmOFFSETOF(s, field) \
+( \
+ gcmPTR2INT(& (((struct s *) 0)->field)) \
+)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_types_h_ */
+
diff --git a/src/include_dove/gc_hal_user_context.h b/src/include_dove/gc_hal_user_context.h
new file mode 100644
index 0000000..10c0564
--- /dev/null
+++ b/src/include_dove/gc_hal_user_context.h
@@ -0,0 +1,199 @@
+/****************************************************************************
+*
+* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved.
+*
+* The material in this file is confidential and contains trade secrets
+* of Vivante Corporation. This is proprietary information owned by
+* Vivante Corporation. No part of this work may be disclosed,
+* reproduced, copied, transmitted, or used in any way for any purpose,
+* without the express written permission of Vivante Corporation.
+*
+*****************************************************************************
+*
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_user_context_h_
+#define __gc_hal_user_context_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct _gcoCTXBUF
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to gcoOS object. */
+ gcoOS os;
+
+ /* Pointer to gcoHARDWARE object. */
+ gcoHARDWARE hardware;
+
+ /* Physical address of context buffer. */
+ gctPHYS_ADDR physical;
+
+ /* Logical address of context buffer. */
+ gctPOINTER logical;
+
+ /* Number of bytes in context buffer. */
+ gctSIZE_T bytes;
+};
+
+/* gcoCONTEXT structure that hold the current context. */
+struct _gcoCONTEXT
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gcoOS object. */
+ gcoOS os;
+
+ /* Pointer to gcoHARDWARE object. */
+ gcoHARDWARE hardware;
+
+ /* Context ID. */
+ gctUINT64 id;
+
+ /* State mapping. */
+ gctUINT32_PTR map;
+ gctSIZE_T stateCount;
+
+ /* State hinting. */
+ gctUINT8_PTR hint;
+ gctUINT8 hintValue;
+ gctSIZE_T hintCount;
+
+ /* Context buffer. */
+ gctUINT32_PTR buffer;
+ gctUINT32 pipe3DIndex;
+ gctUINT32 pipe2DIndex;
+ gctUINT32 linkIndex;
+ gctUINT32 inUseIndex;
+ gctSIZE_T bufferSize;
+
+ /* Context buffer used for commitment. */
+#if MRVL_PRE_ALLOCATE_CTX_BUFFER
+ /* Array of phisical context buffers and their signals. */
+ gcoCTXBUF ctxbufArray[gcdCTXBUF_SIZE_DEFAULT];
+ gctSIGNAL ctxbufSignal[gcdCTXBUF_SIZE_DEFAULT];
+ /* Real number of context buffers pre-allocated. */
+ gctINT ctxbufSize;
+ /* Current context buffer. */
+ gctINT ctxbufIndex;
+#else
+ gctSIZE_T bytes;
+ gctPHYS_ADDR physical;
+#endif
+ gctPOINTER logical;
+
+ /* Pointer to final LINK command. */
+ gctPOINTER link;
+
+ /* Requested pipe select for context. */
+ gctUINT32 initialPipe;
+ gctUINT32 entryPipe;
+ gctUINT32 currentPipe;
+
+ /* Flag to specify whether PostCommit needs to be called. */
+ gctBOOL postCommit;
+
+ /* Busy flag. */
+ volatile gctBOOL * inUse;
+
+ /* Variables used for building state buffer. */
+ gctUINT32 lastAddress;
+ gctSIZE_T lastSize;
+ gctUINT32 lastIndex;
+ gctBOOL lastFixed;
+
+ /* Hint array. */
+ gctUINT32_PTR hintArray;
+ gctUINT32_PTR hintIndex;
+
+ /* Skip flag */
+ gctBOOL skipContext;
+};
+
+struct _gcoCMDBUF
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to gcoOS object. */
+ gcoOS os;
+
+ /* Pointer to gcoHARDWARE object. */
+ gcoHARDWARE hardware;
+
+ /* Physical address of command buffer. */
+ gctPHYS_ADDR physical;
+
+ /* Logical address of command buffer. */
+ gctPOINTER logical;
+
+ /* Number of bytes in command buffer. */
+ gctSIZE_T bytes;
+
+ /* Start offset into the command buffer. */
+ gctUINT32 startOffset;
+
+ /* Current offset into the command buffer. */
+ gctUINT32 offset;
+
+ /* Number of free bytes in command buffer. */
+ gctSIZE_T free;
+
+#if gcdSECURE_USER
+ /* Table of offsets that define the physical addresses to be mapped. */
+ gctUINT32_PTR hintTable;
+
+ /* Current index into map table. */
+ gctUINT32_PTR hintIndex;
+
+ /* Commit index for map table. */
+ gctUINT32_PTR hintCommit;
+#endif
+};
+
+typedef struct _gcsQUEUE * gcsQUEUE_PTR;
+
+typedef struct _gcsQUEUE
+{
+ /* Pointer to next gcsQUEUE structure. */
+ gcsQUEUE_PTR next;
+
+#ifdef __QNXNTO__
+ /* Size of this object. */
+ gctSIZE_T bytes;
+#endif
+
+ /* Event information. */
+ gcsHAL_INTERFACE iface;
+}
+gcsQUEUE;
+
+/* Event queue. */
+struct _gcoQUEUE
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to gcoOS object. */
+ gcoOS os;
+
+ /* Pointer to current event queue. */
+ gcsQUEUE_PTR head;
+ gcsQUEUE_PTR tail;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_user_context_h_ */
+
diff --git a/src/include_dove_old/gc_abi.h b/src/include_dove_old/gc_abi.h
new file mode 100644
index 0000000..78b3564
--- /dev/null
+++ b/src/include_dove_old/gc_abi.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/** Kernel ABI definition file for Etna **/
+#ifndef H_GCABI
+#define H_GCABI
+//#define GCABI_USER_SIGNAL_HAS_TYPE
+#define GCABI_CONTEXT_HAS_PHYSICAL
+//#define GCABI_HAS_MINOR_FEATURES_2
+//#define GCABI_HAS_MINOR_FEATURES_3
+
+// One of these must be set:
+#define GCABI_HAS_CONTEXT
+//#define GCABI_HAS_STATE_DELTAS
+
+/* IOCTL structure for userspace driver*/
+typedef struct
+{
+ void *in_buf;
+ unsigned int in_buf_size;
+ void *out_buf;
+ unsigned int out_buf_size;
+} vivante_ioctl_data_t;
+
+#define _gcs2D_PROFILE gcs2D_PROFILE
+
+#include "gc_hal_base.h"
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_user_context.h"
+#include "gc_hal_types.h"
+#endif
+
diff --git a/src/include_dove_old/gc_hal.h b/src/include_dove_old/gc_hal.h
new file mode 100644
index 0000000..cc37c3d
--- /dev/null
+++ b/src/include_dove_old/gc_hal.h
@@ -0,0 +1,1642 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public Lisence for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_h_
+#define __gc_hal_h_
+
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+#include "gc_hal_base.h"
+#include "gc_hal_profiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* Alignment Macros *******************************
+\******************************************************************************/
+
+#define gcmALIGN(n, align) \
+( \
+ ((n) + ((align) - 1)) & ~((align) - 1) \
+)
+
+/******************************************************************************\
+***************************** Element Count Macro *****************************
+\******************************************************************************/
+
+#define gcmSIZEOF(a) \
+( \
+ (gctSIZE_T) (sizeof(a)) \
+)
+
+#define gcmCOUNTOF(a) \
+( \
+ sizeof(a) / sizeof(a[0]) \
+)
+
+/******************************************************************************\
+******************************** gcsOBJECT Object *******************************
+\******************************************************************************/
+
+/* Type of objects. */
+typedef enum _gceOBJECT_TYPE
+{
+ gcvOBJ_UNKNOWN = 0,
+ gcvOBJ_2D = gcmCC('2','D',' ',' '),
+ gcvOBJ_3D = gcmCC('3','D',' ',' '),
+ gcvOBJ_ATTRIBUTE = gcmCC('A','T','T','R'),
+ gcvOBJ_BRUSHCACHE = gcmCC('B','R','U','$'),
+ gcvOBJ_BRUSHNODE = gcmCC('B','R','U','n'),
+ gcvOBJ_BRUSH = gcmCC('B','R','U','o'),
+ gcvOBJ_BUFFER = gcmCC('B','U','F','R'),
+ gcvOBJ_COMMAND = gcmCC('C','M','D',' '),
+ gcvOBJ_COMMANDBUFFER = gcmCC('C','M','D','B'),
+ gcvOBJ_CONTEXT = gcmCC('C','T','X','T'),
+ gcvOBJ_DEVICE = gcmCC('D','E','V',' '),
+ gcvOBJ_DUMP = gcmCC('D','U','M','P'),
+ gcvOBJ_EVENT = gcmCC('E','V','N','T'),
+ gcvOBJ_FUNCTION = gcmCC('F','U','N','C'),
+ gcvOBJ_HAL = gcmCC('H','A','L',' '),
+ gcvOBJ_HARDWARE = gcmCC('H','A','R','D'),
+ gcvOBJ_HEAP = gcmCC('H','E','A','P'),
+ gcvOBJ_INDEX = gcmCC('I','N','D','X'),
+ gcvOBJ_INTERRUPT = gcmCC('I','N','T','R'),
+ gcvOBJ_KERNEL = gcmCC('K','E','R','N'),
+ gcvOBJ_MEMORYBUFFER = gcmCC('M','E','M','B'),
+ gcvOBJ_MMU = gcmCC('M','M','U',' '),
+ gcvOBJ_OS = gcmCC('O','S',' ',' '),
+ gcvOBJ_OUTPUT = gcmCC('O','U','T','P'),
+ gcvOBJ_PAINT = gcmCC('P','N','T',' '),
+ gcvOBJ_PATH = gcmCC('P','A','T','H'),
+ gcvOBJ_QUEUE = gcmCC('Q','U','E',' '),
+ gcvOBJ_SAMPLER = gcmCC('S','A','M','P'),
+ gcvOBJ_SHADER = gcmCC('S','H','D','R'),
+ gcvOBJ_STREAM = gcmCC('S','T','R','M'),
+ gcvOBJ_SURF = gcmCC('S','U','R','F'),
+ gcvOBJ_TEXTURE = gcmCC('T','X','T','R'),
+ gcvOBJ_UNIFORM = gcmCC('U','N','I','F'),
+ gcvOBJ_VARIABLE = gcmCC('V','A','R','I'),
+ gcvOBJ_VERTEX = gcmCC('V','R','T','X'),
+ gcvOBJ_VIDMEM = gcmCC('V','M','E','M'),
+ gcvOBJ_VG = gcmCC('V','G',' ',' '),
+}
+gceOBJECT_TYPE;
+
+/* gcsOBJECT object defintinon. */
+typedef struct _gcsOBJECT
+{
+ /* Type of an object. */
+ gceOBJECT_TYPE type;
+}
+gcsOBJECT;
+
+/* Kernel settings. */
+typedef struct _gcsKERNEL_SETTINGS
+{
+ /* Used RealTime signal between kernel and user. */
+ gctINT signal;
+}
+gcsKERNEL_SETTINGS;
+
+/*******************************************************************************
+**
+** gcmVERIFY_OBJECT
+**
+** Assert if an object is invalid or is not of the specified type. If the
+** object is invalid or not of the specified type, gcvSTATUS_INVALID_OBJECT
+** will be returned from the current function. In retail mode this macro
+** does nothing.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_OBJECT(prefix, obj, t) \
+ do \
+ { \
+ if ((obj) == gcvNULL) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: NULL"); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT((obj) != gcvNULL); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ } \
+ else if (((gcsOBJECT*) (obj))->type != t) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: %c%c%c%c", \
+ gcmCC_PRINT(((gcsOBJECT*) (obj))->type)); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT(((gcsOBJECT*)(obj))->type == t); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcm, obj, t)
+# define gcmkVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcmk, obj, t)
+#else
+# define gcmVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+# define gcmkVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+#endif
+
+/******************************************************************************\
+********************************** gckOS Object *********************************
+\******************************************************************************/
+
+typedef struct _gckOS * gckOS;
+
+/* Construct a new gckOS object. */
+gceSTATUS
+gckOS_Construct(
+ IN gctPOINTER Context,
+ OUT gckOS * Os
+ );
+
+/* Destroy an gckOS object. */
+gceSTATUS
+gckOS_Destroy(
+ IN gckOS Os
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckOS_QueryVideoMemory(
+ IN gckOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gckOS_Allocate(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gckOS_Free(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Wrapper for allocation memory.. */
+gceSTATUS
+gckOS_AllocateMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Wrapper for freeing memory. */
+gceSTATUS
+gckOS_FreeMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemoryEx(
+ IN gckOS Os,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Lock pages. */
+gceSTATUS
+gckOS_LockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+#endif
+ OUT gctPOINTER * Logical,
+ OUT gctSIZE_T * PageCount
+ );
+
+/* Map pages. */
+gceSTATUS
+gckOS_MapPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Logical,
+#endif
+ IN gctSIZE_T PageCount,
+ IN gctPOINTER PageTable
+ );
+
+/* Unlock pages. */
+gceSTATUS
+gckOS_UnlockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+#endif
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Free paged memory. */
+gceSTATUS
+gckOS_FreePagedMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Allocate non-paged memory. */
+gceSTATUS
+gckOS_AllocateNonPagedMemory(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non-paged memory. */
+gceSTATUS
+gckOS_FreeNonPagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gckOS_AllocateContiguous(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gckOS_FreeContiguous(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get the number fo bytes per page. */
+gceSTATUS
+gckOS_GetPageSize(
+ IN gckOS Os,
+ OUT gctSIZE_T * PageSize
+ );
+
+/* Get the physical address of a corresponding logical address. */
+gceSTATUS
+gckOS_GetPhysicalAddress(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+/* Map physical memory. */
+gceSTATUS
+gckOS_MapPhysical(
+ IN gckOS Os,
+ IN gctUINT32 Physical,
+ IN gctUINT32 OriginalLogical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap previously mapped physical memory. */
+gceSTATUS
+gckOS_UnmapPhysical(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Read data from a hardware register. */
+gceSTATUS
+gckOS_ReadRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+/* Write data to a hardware register. */
+gceSTATUS
+gckOS_WriteRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Write data to a 32-bit memory location. */
+gceSTATUS
+gckOS_WriteMemory(
+ IN gckOS Os,
+ IN gctPOINTER Address,
+ IN gctUINT32 Data
+ );
+
+/* Map physical memory into the process space. */
+gceSTATUS
+gckOS_MapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap physical memory from the process space. */
+gceSTATUS
+gckOS_UnmapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Create a new mutex. */
+gceSTATUS
+gckOS_CreateMutex(
+ IN gckOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gckOS_DeleteMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gckOS_AcquireMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gckOS_ReleaseMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Atomically exchange a pair of 32-bit values. */
+gceSTATUS
+gckOS_AtomicExchange(
+ IN gckOS Os,
+ IN OUT gctUINT32_PTR Target,
+ IN gctUINT32 NewValue,
+ OUT gctUINT32_PTR OldValue
+ );
+
+/* Atomically exchange a pair of pointers. */
+gceSTATUS
+gckOS_AtomicExchangePtr(
+ IN gckOS Os,
+ IN OUT gctPOINTER * Target,
+ IN gctPOINTER NewValue,
+ OUT gctPOINTER * OldValue
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gckOS_Delay(
+ IN gckOS Os,
+ IN gctUINT32 Delay
+ );
+
+/* Memory barrier. */
+gceSTATUS
+gckOS_MemoryBarrier(
+ IN gckOS Os,
+ IN gctPOINTER Address
+ );
+
+/* Map user pointer. */
+gceSTATUS
+gckOS_MapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Unmap user pointer. */
+gceSTATUS
+gckOS_UnmapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ IN gctPOINTER KernelPointer
+ );
+
+gceSTATUS
+gckOS_ClockOff(
+ void
+ );
+
+gceSTATUS
+gckOS_ClockOn(
+ IN gctUINT64 Frequency
+ );
+
+gceSTATUS
+gckOS_Reset(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_SetConstraint(
+ IN gckOS Os,
+ IN gctBOOL enableDVFM,
+ IN gctBOOL enableLPM
+ );
+
+gceSTATUS
+gckOS_UnSetConstraint(
+ IN gckOS Os,
+ IN gctBOOL enableDVFM,
+ IN gctBOOL enableLPM
+ );
+
+gceSTATUS
+gckOS_NotifyIdle(
+ IN gckOS Os,
+ IN gctBOOL Idle
+ );
+
+gctUINT32
+gckOS_GetTicks(
+ void
+ );
+
+gceSTATUS
+gckOS_IdleProfile(
+ IN gckOS Os,
+ IN OUT gctUINT32* Timeslice,
+ OUT gctUINT32* IdleTime
+ );
+
+#ifdef __QNXNTO__
+/* Map user physical address. */
+gceSTATUS
+gckOS_MapUserPhysical(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Phys,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Allocate from user's shared pool. */
+gceSTATUS
+gckOS_AllocateNonPagedMemoryShmPool(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Pid,
+ IN gctHANDLE Handle,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+#endif
+
+gceSTATUS
+gckOS_SuspendInterrupt(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_ResumeInterrupt(
+ IN gckOS Os
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gckOS_GetBaseAddress(
+ IN gckOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gckOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gckOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Device I/O control to the kernel HAL layer. */
+gceSTATUS
+gckOS_DeviceControl(
+ IN gckOS Os,
+ IN gctBOOL FromUser,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ OUT gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/******************************************************************************\
+********************************** Signal Object *********************************
+\******************************************************************************/
+
+/* User signal command codes. */
+typedef enum _gceUSER_SIGNAL_COMMAND_CODES
+{
+ gcvUSER_SIGNAL_CREATE,
+ gcvUSER_SIGNAL_DESTROY,
+ gcvUSER_SIGNAL_SIGNAL,
+ gcvUSER_SIGNAL_WAIT,
+}
+gceUSER_SIGNAL_COMMAND_CODES;
+
+/* Create a signal. */
+gceSTATUS
+gckOS_CreateSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gckOS_DestroySignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gckOS_Signal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gckOS_WaitSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Map a user signal to the kernel space. */
+gceSTATUS
+gckOS_MapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process,
+ OUT gctSIGNAL * MappedSignal
+ );
+
+/* Map user memory. */
+gceSTATUS
+gckOS_MapUserMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gckOS_UnmapUserMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+#ifdef ANDROID_VERSION_ECLAIR
+gceSTATUS
+gcoOS_FlushCache(
+ int fd,
+ int offset,
+ int size
+ );
+#endif
+#if !USE_NEW_LINUX_SIGNAL
+/* Create signal to be used in the user space. */
+gceSTATUS
+gckOS_CreateUserSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctINT * SignalID
+ );
+
+/* Destroy signal used in the user space. */
+gceSTATUS
+gckOS_DestroyUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID
+ );
+
+/* Wait for signal used in the user space. */
+gceSTATUS
+gckOS_WaitUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctUINT32 Wait
+ );
+
+/* Signal a signal used in the user space. */
+gceSTATUS
+gckOS_SignalUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctBOOL State
+ );
+#endif /* USE_NEW_LINUX_SIGNAL */
+
+/* Set a signal owned by a process. */
+#if defined(__QNXNTO__)
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctINT Recvid,
+ IN gctINT Coid
+ );
+#else
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process
+ );
+#endif
+
+/******************************************************************************\
+** Cache Support
+*/
+
+gceSTATUS
+gckOS_CacheFlush(
+ gckOS Os,
+ gctHANDLE ProcessId,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gckOS_CacheInvalidate(
+ gckOS Os,
+ gctHANDLE ProcessId,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+** Debug Support
+*/
+
+void
+gckOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gckOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gckOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+/******************************************************************************\
+********************************* gckHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gckHEAP * gckHEAP;
+
+/* Construct a new gckHEAP object. */
+gceSTATUS
+gckHEAP_Construct(
+ IN gckOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gckHEAP * Heap
+ );
+
+/* Destroy an gckHEAP object. */
+gceSTATUS
+gckHEAP_Destroy(
+ IN gckHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gckHEAP_Allocate(
+ IN gckHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckHEAP_Free(
+ IN gckHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+/* Profile the heap. */
+gceSTATUS
+gckHEAP_ProfileStart(
+ IN gckHEAP Heap
+ );
+
+gceSTATUS
+gckHEAP_ProfileEnd(
+ IN gckHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+
+#if defined gcdHAL_TEST
+gceSTATUS
+gckHEAP_Test(
+ IN gckHEAP Heap,
+ IN gctSIZE_T Vectors,
+ IN gctSIZE_T MaxSize
+ );
+#endif
+
+/******************************************************************************\
+******************************** gckVIDMEM Object ******************************
+\******************************************************************************/
+
+typedef struct _gckVIDMEM * gckVIDMEM;
+typedef union _gcuVIDMEM_NODE * gcuVIDMEM_NODE_PTR;
+typedef struct _gckHARDWARE * gckHARDWARE;
+typedef struct _gckKERNEL * gckKERNEL;
+
+/* Construct a new gckVIDMEM object. */
+gceSTATUS
+gckVIDMEM_Construct(
+ IN gckOS Os,
+ IN gctUINT32 BaseAddress,
+ IN gctSIZE_T Bytes,
+ IN gctSIZE_T Threshold,
+ IN gctSIZE_T Banking,
+ OUT gckVIDMEM * Memory
+ );
+
+/* Destroy an gckVDIMEM object. */
+gceSTATUS
+gckVIDMEM_Destroy(
+ IN gckVIDMEM Memory
+ );
+
+/* Allocate rectangular memory. */
+gceSTATUS
+gckVIDMEM_Allocate(
+ IN gckVIDMEM Memory,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT BytesPerPixel,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+#ifdef __QNXNTO__
+ IN gctHANDLE Handle,
+#endif
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Allocate linear memory. */
+gceSTATUS
+gckVIDMEM_AllocateLinear(
+ IN gckVIDMEM Memory,
+ IN gctSIZE_T Bytes,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+#ifdef __QNXNTO__
+ IN gctHANDLE Handle,
+#endif
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckVIDMEM_Free(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/* Lock memory. */
+gceSTATUS
+gckVIDMEM_Lock(
+ IN gcuVIDMEM_NODE_PTR Node,
+ OUT gctUINT32 * Address
+ );
+
+/* Unlock memory. */
+gceSTATUS
+gckVIDMEM_Unlock(
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type,
+ IN OUT gctBOOL * Asynchroneous
+ );
+
+/* Construct a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_ConstructVirtual(
+ IN gckKERNEL Kernel,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+#ifdef __QNXNTO__
+ IN gctHANDLE Handle,
+#endif
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Destroy a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_DestroyVirtual(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+#ifdef __QNXNTO__
+/* Set the allocating process' PID for this node. */
+gceSTATUS
+gckVIDMEM_SetPID(
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctUINT32 Pid);
+#endif
+
+/******************************************************************************\
+******************************** gckKERNEL Object ******************************
+\******************************************************************************/
+
+struct _gcsHAL_INTERFACE;
+
+/* Notifications. */
+typedef enum _gceNOTIFY
+{
+ gcvNOTIFY_INTERRUPT,
+ gcvNOTIFY_COMMAND_QUEUE,
+}
+gceNOTIFY;
+
+/* Event locations. */
+typedef enum _gceKERNEL_WHERE
+{
+ gcvKERNEL_COMMAND,
+ gcvKERNEL_VERTEX,
+ gcvKERNEL_TRIANGLE,
+ gcvKERNEL_TEXTURE,
+ gcvKERNEL_PIXEL,
+}
+gceKERNEL_WHERE;
+
+/* Flush flags. */
+typedef enum _gceKERNEL_FLUSH
+{
+ gcvFLUSH_COLOR = 0x01,
+ gcvFLUSH_DEPTH = 0x02,
+ gcvFLUSH_TEXTURE = 0x04,
+ gcvFLUSH_2D = 0x08,
+}
+gceKERNEL_FLUSH;
+
+/* Construct a new gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Construct(
+ IN gckOS Os,
+ IN gctPOINTER Context,
+ OUT gckKERNEL * Kernel
+ );
+
+/* Destroy an gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Destroy(
+ IN gckKERNEL Kernel
+ );
+
+/* Dispatch a user-level command. */
+gceSTATUS
+gckKERNEL_Dispatch(
+ IN gckKERNEL Kernel,
+ IN gctBOOL FromUser,
+ IN OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckKERNEL_QueryVideoMemory(
+ IN gckKERNEL Kernel,
+ OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Lookup the gckVIDMEM object for a pool. */
+gceSTATUS
+gckKERNEL_GetVideoMemoryPool(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+/* Map video memory. */
+gceSTATUS
+gckKERNEL_MapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Address,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes,
+#endif
+ OUT gctPOINTER * Logical
+ );
+
+#ifdef __QNXNTO__
+/* Unmap video memory. */
+gceSTATUS
+gckKERNEL_UnmapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes
+ );
+#endif
+
+/* Map memory. */
+gceSTATUS
+gckKERNEL_MapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap memory. */
+gceSTATUS
+gckKERNEL_UnmapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Notification of events. */
+gceSTATUS
+gckKERNEL_Notify(
+ IN gckKERNEL Kernel,
+ IN gceNOTIFY Notifcation,
+ IN gctBOOL Data
+ );
+
+gceSTATUS
+gckKERNEL_QuerySettings(
+ IN gckKERNEL Kernel,
+ OUT gcsKERNEL_SETTINGS * Settings
+ );
+
+/******************************************************************************\
+******************************* gckHARDWARE Object *****************************
+\******************************************************************************/
+
+/* Construct a new gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Construct(
+ IN gckOS Os,
+ OUT gckHARDWARE * Hardware
+ );
+
+/* Destroy an gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Destroy(
+ IN gckHARDWARE Hardware
+ );
+
+/* Query system memory requirements. */
+gceSTATUS
+gckHARDWARE_QuerySystemMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * SystemSize,
+ OUT gctUINT32 * SystemBaseAddress
+ );
+
+/* Build virtual address. */
+gceSTATUS
+gckHARDWARE_BuildVirtualAddress(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Index,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Query command buffer requirements. */
+gceSTATUS
+gckHARDWARE_QueryCommandBuffer(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * Alignment,
+ OUT gctSIZE_T * ReservedHead,
+ OUT gctSIZE_T * ReservedTail
+ );
+
+/* Add a WAIT/LINK pair in the command queue. */
+gceSTATUS
+gckHARDWARE_WaitLink(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPOINTER * Wait,
+ OUT gctSIZE_T * WaitBytes
+ );
+
+/* Kickstart the command processor. */
+gceSTATUS
+gckHARDWARE_Execute(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Physical,
+ IN gctBOOL PhysicalAddresses,
+#endif
+ IN gctSIZE_T Bytes
+ );
+
+/* Add an END command in the command queue. */
+gceSTATUS
+gckHARDWARE_End(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a NOP command in the command queue. */
+gceSTATUS
+gckHARDWARE_Nop(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a WAIT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Wait(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Count,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a PIPESELECT command in the command queue. */
+gceSTATUS
+gckHARDWARE_PipeSelect(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Pipe,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a LINK command in the command queue. */
+gceSTATUS
+gckHARDWARE_Link(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctPOINTER FetchAddress,
+ IN gctSIZE_T FetchSize,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add an EVENT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Event(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT8 Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Query the available memory. */
+gceSTATUS
+gckHARDWARE_QueryMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctUINT32 * InternalBaseAddress,
+ OUT gctUINT32 * InternalAlignment,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctUINT32 * ExternalBaseAddress,
+ OUT gctUINT32 * ExternalAlignment,
+ OUT gctUINT32 * HorizontalTileSize,
+ OUT gctUINT32 * VerticalTileSize
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gckHARDWARE_QueryChipIdentity(
+ IN gckHARDWARE Hardware,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures,
+ OUT gctUINT32* ChipMinorFeatures1
+ );
+
+/* Query the specifications sof the hardware. */
+gceSTATUS
+gckHARDWARE_QueryChipSpecs(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR StreamCount,
+ OUT gctUINT32_PTR RegisterMax,
+ OUT gctUINT32_PTR ThreadCount,
+ OUT gctUINT32_PTR ShaderCoreCount,
+ OUT gctUINT32_PTR VertexCacheSize,
+ OUT gctUINT32_PTR VertexOutputBufferSize
+ );
+
+/* Convert an API format. */
+gceSTATUS
+gckHARDWARE_ConvertFormat(
+ IN gckHARDWARE Hardware,
+ IN gceSURF_FORMAT Format,
+ OUT gctUINT32 * BitsPerPixel,
+ OUT gctUINT32 * BytesPerTile
+ );
+
+/* Split a harwdare specific address into API stuff. */
+gceSTATUS
+gckHARDWARE_SplitMemory(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Align size to tile boundary. */
+gceSTATUS
+gckHARDWARE_AlignToTile(
+ IN gckHARDWARE Hardware,
+ IN gceSURF_TYPE Type,
+ IN OUT gctUINT32_PTR Width,
+ IN OUT gctUINT32_PTR Height,
+ OUT gctBOOL_PTR SuperTiled
+ );
+
+/* Update command queue tail pointer. */
+gceSTATUS
+gckHARDWARE_UpdateQueueTail(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset
+ );
+
+/* Convert logical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertLogical(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+#ifdef __QNXNTO__
+/* Convert physical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertPhysical(
+ IN gckHARDWARE Hardware,
+ IN gctPHYS_ADDR Physical,
+ OUT gctUINT32 * Address
+ );
+#endif
+
+/* Interrupt manager. */
+gceSTATUS
+gckHARDWARE_Interrupt(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL InterruptValid
+ );
+
+/* Program MMU. */
+gceSTATUS
+gckHARDWARE_SetMMU(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical
+ );
+
+/* Flush the MMU. */
+gceSTATUS
+gckHARDWARE_FlushMMU(
+ IN gckHARDWARE Hardware
+ );
+
+/* Get idle register. */
+gceSTATUS
+gckHARDWARE_GetIdle(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Wait,
+ OUT gctUINT32 * Data
+ );
+
+/* Flush the caches. */
+gceSTATUS
+gckHARDWARE_Flush(
+ IN gckHARDWARE Hardware,
+ IN gceKERNEL_FLUSH Flush,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Enable/disable fast clear. */
+gceSTATUS
+gckHARDWARE_SetFastClear(
+ IN gckHARDWARE Hardware,
+ IN gctINT Enable,
+ IN gctINT Compression
+ );
+
+gceSTATUS
+gckHARDWARE_ReadInterrupt(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR IDs
+ );
+
+/* Power management. */
+gceSTATUS
+gckHARDWARE_SetPowerManagementState(
+ IN gckHARDWARE Hardware,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gckHARDWARE_QueryPowerManagementState(
+ IN gckHARDWARE Hardware,
+ OUT gceCHIPPOWERSTATE* State
+ );
+
+/* Profile 2D Engine. */
+gceSTATUS
+gckHARDWARE_ProfileEngine2D(
+ IN gckHARDWARE Hardware,
+ OUT gcs2D_PROFILE_PTR Profile
+ );
+
+gceSTATUS
+gckHARDWARE_InitializeHardware(
+ IN gckHARDWARE Hardware
+ );
+
+gceSTATUS
+gckHARDWARE_Reset(
+ IN gckHARDWARE Hardware
+ );
+
+/******************************************************************************\
+***************************** gckINTERRUPT Object ******************************
+\******************************************************************************/
+
+typedef struct _gckINTERRUPT * gckINTERRUPT;
+
+typedef gceSTATUS (* gctINTERRUPT_HANDLER)(
+ IN gckKERNEL Kernel
+ );
+
+gceSTATUS
+gckINTERRUPT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckINTERRUPT * Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_Destroy(
+ IN gckINTERRUPT Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_SetHandler(
+ IN gckINTERRUPT Interrupt,
+ IN OUT gctINT32_PTR Id,
+ IN gctINTERRUPT_HANDLER Handler
+ );
+
+gceSTATUS
+gckINTERRUPT_Notify(
+ IN gckINTERRUPT Interrupt,
+ IN gctBOOL Valid
+ );
+
+/******************************************************************************\
+******************************** gckEVENT Object *******************************
+\******************************************************************************/
+
+typedef struct _gckEVENT * gckEVENT;
+
+/* Construct a new gckEVENT object. */
+gceSTATUS
+gckEVENT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckEVENT * Event
+ );
+
+/* Destroy an gckEVENT object. */
+gceSTATUS
+gckEVENT_Destroy(
+ IN gckEVENT Event
+ );
+
+/* Schedule a FreeNonPagedMemory event. */
+gceSTATUS
+gckEVENT_FreeNonPagedMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeContiguousMemory event. */
+gceSTATUS
+gckEVENT_FreeContiguousMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeVideoMemory event. */
+gceSTATUS
+gckEVENT_FreeVideoMemory(
+ IN gckEVENT Event,
+ IN gcuVIDMEM_NODE_PTR VideoMemory,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a signal event. */
+gceSTATUS
+gckEVENT_Signal(
+ IN gckEVENT Event,
+ IN gctSIGNAL Signal,
+ IN gceKERNEL_WHERE FromWhere,
+ IN gctBOOL Locking
+ );
+
+/* Schedule an Unlock event. */
+gceSTATUS
+gckEVENT_Unlock(
+ IN gckEVENT Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type
+ );
+
+gceSTATUS
+gckEVENT_Submit(
+ IN gckEVENT Event,
+ IN gctBOOL Wait,
+ IN gctBOOL Locking
+ );
+
+struct _gcsQUEUE;
+
+/* Commit an event queue. */
+gceSTATUS
+gckEVENT_Commit(
+ IN gckEVENT Event,
+ IN struct _gcsQUEUE * Queue
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Notify(
+ IN gckEVENT Event,
+ IN gctBOOL IsReset
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Interrupt(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+/* Try to set idle */
+gceSTATUS
+gckEVENT_TryToSetIdle(
+ IN gckEVENT Event
+ );
+/******************************************************************************\
+******************************* gckCOMMAND Object ******************************
+\******************************************************************************/
+
+typedef struct _gckCOMMAND * gckCOMMAND;
+
+/* Construct a new gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckCOMMAND * Command
+ );
+
+/* Destroy an gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Destroy(
+ IN gckCOMMAND Command
+ );
+
+/* Start the command queue. */
+gceSTATUS
+gckCOMMAND_Start(
+ IN gckCOMMAND Command
+ );
+
+/* Stop the command queue. */
+gceSTATUS
+gckCOMMAND_Stop(
+ IN gckCOMMAND Command
+ );
+
+/* Commit a buffer to the command queue. */
+gceSTATUS
+gckCOMMAND_Commit(
+ IN gckCOMMAND Command,
+ IN gcoCMDBUF CommandBuffer,
+ IN gcoCONTEXT Context,
+ IN gctHANDLE Process
+ );
+
+/* Reserve space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Reserve(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequestedBytes,
+ IN gctBOOL Locking,
+ OUT gctPOINTER * Buffer,
+ OUT gctSIZE_T * BufferSize
+ );
+
+/* Release reserved space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Release(
+ IN gckCOMMAND Command
+ );
+
+/* Execute reserved space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Execute(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequstedBytes,
+ IN gctBOOL Locking
+ );
+
+/* Stall the command queue. */
+gceSTATUS
+gckCOMMAND_Stall(
+ IN gckCOMMAND Command
+ );
+
+/******************************************************************************\
+********************************* gckMMU Object ********************************
+\******************************************************************************/
+
+typedef struct _gckMMU * gckMMU;
+
+/* Construct a new gckMMU object. */
+gceSTATUS
+gckMMU_Construct(
+ IN gckKERNEL Kernel,
+ IN gctSIZE_T MmuSize,
+ OUT gckMMU * Mmu
+ );
+
+/* Destroy an gckMMU object. */
+gceSTATUS
+gckMMU_Destroy(
+ IN gckMMU Mmu
+ );
+
+/* Allocate pages inside the MMU. */
+gceSTATUS
+gckMMU_AllocatePages(
+ IN gckMMU Mmu,
+ IN gctSIZE_T PageCount,
+ OUT gctPOINTER * PageTable,
+ OUT gctUINT32 * Address
+ );
+
+/* Remove a page table from the MMU. */
+gceSTATUS
+gckMMU_FreePages(
+ IN gckMMU Mmu,
+ IN gctPOINTER PageTable,
+ IN gctSIZE_T PageCount
+ );
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_InsertNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+
+gceSTATUS
+gckMMU_RemoveNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+#endif
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_FreeHandleMemory(
+ IN gckMMU Mmu,
+ IN gctHANDLE Handle
+ );
+#endif
+
+#if defined gcdHAL_TEST
+gceSTATUS
+gckMMU_Test(
+ IN gckMMU Mmu,
+ IN gctSIZE_T Vectors,
+ IN gctINT MaxSize
+ );
+#endif
+
+gceSTATUS
+gckHARDWARE_QueryProfileRegisters(
+ IN gckHARDWARE Hardware,
+ OUT gcsPROFILER_COUNTERS * Counters
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_h_ */
+
diff --git a/src/include_dove_old/gc_hal_base.h b/src/include_dove_old/gc_hal_base.h
new file mode 100644
index 0000000..608962c
--- /dev/null
+++ b/src/include_dove_old/gc_hal_base.h
@@ -0,0 +1,2630 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public Lisence for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_base_h_
+#define __gc_hal_base_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+#include "gc_hal_dump.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoHAL * gcoHAL;
+typedef struct _gcoOS * gcoOS;
+typedef struct _gco2D * gco2D;
+typedef struct _gcoVG * gcoVG;
+typedef struct _gco3D * gco3D;
+typedef struct _gcoSURF * gcoSURF;
+typedef struct _gcsSURF_INFO * gcsSURF_INFO_PTR;
+typedef struct _gcsSURF_NODE * gcsSURF_NODE_PTR;
+typedef struct _gcsSURF_FORMAT_INFO * gcsSURF_FORMAT_INFO_PTR;
+typedef struct _gcsPOINT * gcsPOINT_PTR;
+typedef struct _gcsSIZE * gcsSIZE_PTR;
+typedef struct _gcsRECT * gcsRECT_PTR;
+typedef struct _gcsBOUNDARY * gcsBOUNDARY_PTR;
+typedef struct _gcoDUMP * gcoDUMP;
+typedef struct _gcoHARDWARE * gcoHARDWARE;
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+/* Video memory pool type. */
+typedef enum _gcePOOL
+{
+ gcvPOOL_UNKNOWN,
+ gcvPOOL_DEFAULT,
+ gcvPOOL_LOCAL,
+ gcvPOOL_LOCAL_INTERNAL,
+ gcvPOOL_LOCAL_EXTERNAL,
+ gcvPOOL_UNIFIED,
+ gcvPOOL_SYSTEM,
+ gcvPOOL_VIRTUAL,
+ gcvPOOL_USER,
+ gcvPOOL_CONTIGUOUS
+}
+gcePOOL;
+
+/* Blending functions. */
+typedef enum _gceBLEND_FUNCTION
+{
+ gcvBLEND_ZERO,
+ gcvBLEND_ONE,
+ gcvBLEND_SOURCE_COLOR,
+ gcvBLEND_INV_SOURCE_COLOR,
+ gcvBLEND_SOURCE_ALPHA,
+ gcvBLEND_INV_SOURCE_ALPHA,
+ gcvBLEND_TARGET_COLOR,
+ gcvBLEND_INV_TARGET_COLOR,
+ gcvBLEND_TARGET_ALPHA,
+ gcvBLEND_INV_TARGET_ALPHA,
+ gcvBLEND_SOURCE_ALPHA_SATURATE,
+ gcvBLEND_CONST_COLOR,
+ gcvBLEND_INV_CONST_COLOR,
+ gcvBLEND_CONST_ALPHA,
+ gcvBLEND_INV_CONST_ALPHA,
+}
+gceBLEND_FUNCTION;
+
+/* Blending modes. */
+typedef enum _gceBLEND_MODE
+{
+ gcvBLEND_ADD,
+ gcvBLEND_SUBTRACT,
+ gcvBLEND_REVERSE_SUBTRACT,
+ gcvBLEND_MIN,
+ gcvBLEND_MAX,
+}
+gceBLEND_MODE;
+
+/* API flags. */
+typedef enum _gceAPI
+{
+ gcvAPI_D3D = 0x1,
+ gcvAPI_OPENGL = 0x2,
+}
+gceAPI;
+
+/* Depth modes. */
+typedef enum _gceDEPTH_MODE
+{
+ gcvDEPTH_NONE,
+ gcvDEPTH_Z,
+ gcvDEPTH_W,
+}
+gceDEPTH_MODE;
+
+typedef enum _gceWHERE
+{
+ gcvWHERE_COMMAND,
+ gcvWHERE_RASTER,
+ gcvWHERE_PIXEL,
+}
+gceWHERE;
+
+typedef enum _gceHOW
+{
+ gcvHOW_SEMAPHORE = 0x1,
+ gcvHOW_STALL = 0x2,
+ gcvHOW_SEMAPHORE_STALL = 0x3,
+}
+gceHOW;
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Construct a new gcoHAL object. */
+gceSTATUS
+gcoHAL_Construct(
+ IN gctPOINTER Context,
+ IN gcoOS Os,
+ OUT gcoHAL * Hal
+ );
+
+/* Destroy an gcoHAL object. */
+gceSTATUS
+gcoHAL_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Get pointer to gco2D object. */
+gceSTATUS
+gcoHAL_Get2DEngine(
+ IN gcoHAL Hal,
+ OUT gco2D * Engine
+ );
+
+/* Get pointer to gcoVG object. */
+gceSTATUS
+gcoHAL_GetVGEngine(
+ IN gcoHAL Hal,
+ OUT gcoVG * Engine
+ );
+
+/* Get pointer to gco3D object. */
+gceSTATUS
+gcoHAL_Get3DEngine(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+/* Verify whether the specified feature is available in hardware. */
+gceSTATUS
+gcoHAL_IsFeatureAvailable(
+ IN gcoHAL Hal,
+ IN gceFEATURE Feature
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gcoHAL_QueryChipIdentity(
+ IN gcoHAL Hal,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the amount of video memory. */
+gceSTATUS
+gcoHAL_QueryVideoMemory(
+ IN gcoHAL Hal,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Map video memory. */
+gceSTATUS
+gcoHAL_MapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap video memory. */
+gceSTATUS
+gcoHAL_UnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a buffer mapped through its physical address. */
+gceSTATUS
+gcoHAL_ScheduleUnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a user buffer using event mechanism. */
+gceSTATUS
+gcoHAL_ScheduleUnmapUserMemory(
+ IN gcoHAL Hal,
+ IN gctPOINTER Info,
+ IN gctSIZE_T Size,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory
+ );
+
+/* Commit the current command buffer. */
+gceSTATUS
+gcoHAL_Commit(
+ IN gcoHAL Hal,
+ IN gctBOOL Stall
+ );
+
+gceSTATUS
+gcoHAL_Commit2(
+ IN gcoHAL Hal,
+ IN gctBOOL Stall,
+ IN gctPOINTER Buffer,
+ IN gctUINT32 Size
+ );
+
+/* Query the tile capabilities. */
+gceSTATUS
+gcoHAL_QueryTiled(
+ IN gcoHAL Hal,
+ OUT gctINT32 * TileWidth2D,
+ OUT gctINT32 * TileHeight2D,
+ OUT gctINT32 * TileWidth3D,
+ OUT gctINT32 * TileHeight3D
+ );
+
+gceSTATUS
+gcoHAL_Compact(
+ IN gcoHAL Hal
+ );
+
+gceSTATUS
+gcoHAL_ProfileStart(
+ IN gcoHAL Hal
+ );
+
+gceSTATUS
+gcoHAL_ProfileEnd(
+ IN gcoHAL Hal,
+ IN gctCONST_STRING Title
+ );
+
+/* Power Management */
+gceSTATUS
+gcoHAL_SetPowerManagementState(
+ IN gcoHAL Hal,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gcoHAL_QueryPowerManagementState(
+ IN gcoHAL Hal,
+ OUT gceCHIPPOWERSTATE *State
+ );
+
+/* Set the filter type for filter blit. */
+gceSTATUS
+gcoHAL_SetFilterType(
+ IN gcoHAL Hal,
+ IN gceFILTER_TYPE FilterType
+ );
+
+gceSTATUS
+gcoHAL_GetDump(
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Call the kernel HAL layer. */
+gceSTATUS
+gcoHAL_Call(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Schedule an event. */
+gceSTATUS
+gcoHAL_ScheduleEvent(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Destroy a surface. */
+gceSTATUS
+gcoHAL_DestroySurface(
+ IN gcoHAL Hal,
+ IN gcoSURF Surface
+ );
+
+/******************************************************************************\
+********************************** gcoOS Object *********************************
+\******************************************************************************/
+
+/* Construct a new gcoOS object. */
+gceSTATUS
+gcoOS_Construct(
+ IN gctPOINTER Context,
+ OUT gcoOS * Os
+ );
+
+/* Destroy an gcoOS object. */
+gceSTATUS
+gcoOS_Destroy(
+ IN gcoOS Os
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gcoOS_GetBaseAddress(
+ IN gcoOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gcoOS_Allocate(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gcoOS_Free(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoOS_AllocateMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoOS_FreeMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gcoOS_AllocateContiguous(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gcoOS_FreeContiguous(
+ IN gcoOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Map user memory. */
+gceSTATUS
+gcoOS_MapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gcoOS_UnmapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+/* Device I/O Control call to the kernel HAL layer. */
+gceSTATUS
+gcoOS_DeviceControl(
+ IN gcoOS Os,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ IN gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/* Allocate non paged memory. */
+gceSTATUS gcoOS_AllocateNonPagedMemory(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non paged memory. */
+gceSTATUS gcoOS_FreeNonPagedMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+typedef enum _gceFILE_MODE
+{
+ gcvFILE_CREATE = 0,
+ gcvFILE_APPEND,
+ gcvFILE_READ,
+ gcvFILE_CREATETEXT,
+ gcvFILE_APPENDTEXT,
+ gcvFILE_READTEXT,
+}
+gceFILE_MODE;
+
+/* Open a file. */
+gceSTATUS
+gcoOS_Open(
+ IN gcoOS Os,
+ IN gctCONST_STRING FileName,
+ IN gceFILE_MODE Mode,
+ OUT gctFILE * File
+ );
+
+/* Close a file. */
+gceSTATUS
+gcoOS_Close(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Read data from a file. */
+gceSTATUS
+gcoOS_Read(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctPOINTER Data,
+ OUT gctSIZE_T * ByteRead
+ );
+
+/* Write data to a file. */
+gceSTATUS
+gcoOS_Write(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+typedef enum _gceFILE_WHENCE
+{
+ gcvFILE_SEEK_SET,
+ gcvFILE_SEEK_CUR,
+ gcvFILE_SEEK_END
+}
+gceFILE_WHENCE;
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_Seek(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Offset,
+ IN gceFILE_WHENCE Whence
+ );
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_SetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Position
+ );
+
+/* Get the current position of a file. */
+gceSTATUS
+gcoOS_GetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ OUT gctUINT32 * Position
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gcoOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Perform a memory fill. */
+gceSTATUS
+gcoOS_MemFill(
+ IN gctPOINTER Destination,
+ IN gctUINT8 Filler,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gcoOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Find the last occurance of a character inside a string. */
+gceSTATUS
+gcoOS_StrFindReverse(
+ IN gctCONST_STRING String,
+ IN gctINT8 Character,
+ OUT gctSTRING * Output
+ );
+
+gceSTATUS
+gcoOS_StrLen(
+ IN gctCONST_STRING String,
+ OUT gctSIZE_T * Length
+ );
+
+gceSTATUS
+gcoOS_StrDup(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ OUT gctSTRING * Target
+ );
+
+/* Copy a string. */
+gceSTATUS
+gcoOS_StrCopySafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Append a string. */
+gceSTATUS
+gcoOS_StrCatSafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Compare two strings. */
+gceSTATUS
+gcoOS_StrCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2
+ );
+
+/* Compare characters of two strings. */
+gceSTATUS
+gcoOS_StrNCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2,
+ IN gctSIZE_T Count
+ );
+
+/* Convert string to float. */
+gceSTATUS
+gcoOS_StrToFloat(
+ IN gctCONST_STRING String,
+ OUT gctFLOAT * Float
+ );
+
+/* Convert string to integer. */
+gceSTATUS
+gcoOS_StrToInt(
+ IN gctCONST_STRING String,
+ OUT gctINT * Int
+ );
+
+gceSTATUS
+gcoOS_MemCmp(
+ IN gctCONST_POINTER Memory1,
+ IN gctCONST_POINTER Memory2,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_PrintStrSafe(
+ OUT gctSTRING String,
+ IN gctSIZE_T StringSize,
+ IN OUT gctUINT * Offset,
+ IN gctCONST_STRING Format,
+ ...
+ );
+
+gceSTATUS
+gcoOS_PrintStrVSafe(
+ OUT gctSTRING String,
+ IN gctSIZE_T StringSize,
+ IN OUT gctUINT * Offset,
+ IN gctCONST_STRING Format,
+ IN gctPOINTER Arguments
+ );
+
+gceSTATUS
+gcoOS_LoadLibrary(
+ IN gcoOS Os,
+ IN gctCONST_STRING Library,
+ OUT gctHANDLE * Handle
+ );
+
+gceSTATUS
+gcoOS_FreeLibrary(
+ IN gcoOS Os,
+ IN gctHANDLE Handle
+ );
+
+gceSTATUS
+gcoOS_GetProcAddress(
+ IN gcoOS Os,
+ IN gctHANDLE Handle,
+ IN gctCONST_STRING Name,
+ OUT gctPOINTER * Function
+ );
+
+gceSTATUS
+gcoOS_Compact(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_ProfileStart(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_ProfileEnd(
+ IN gcoOS Os,
+ IN gctCONST_STRING Title
+ );
+
+gceSTATUS
+gcoOS_SetProfileSetting(
+ IN gcoOS Os,
+ IN gctBOOL Enable,
+ IN gctCONST_STRING FileName
+ );
+gctINT32
+gcoOS_GetMilliTime(
+ void
+ );
+
+char* gcoOS_GetProgramName(char* buf, int size);
+
+#if MRVL_BENCH
+
+/*
+** Check point for timer.
+** To add new profiling point, modify below two members:
+gceSTATUS
+gcoOS_SetProfileSetting(
+ IN gcoOS Os,
+ IN gctBOOL Enable,
+ IN gctCONST_STRING FileName
+ );
+
+*/
+typedef enum _apiBenchIndex {
+ APIBENCH_INDEX_FRAME,
+ APIBENCH_INDEX_DRAWARRAY,
+ APIBENCH_INDEX_DRAWELEMENTS,
+ APIBENCH_INDEX_BUILDSTREAM,
+ APIBENCH_INDEX_INDEXBUFFER,
+ APIBENCH_INDEX_DRAWARRAY_UPDATESTATE,
+ APIBENCH_INDEX_DRAWARRAY_UPDATESTATE1,
+ APIBENCH_INDEX_UPDATESTATE,
+ APIBENCH_INDEX_UPDATESTATE1,
+ APIBENCH_INDEX_SWAPBUFFERS,
+ APIBENCH_INDEX_DRAWIMAGE,
+ APIBENCH_INDEX_SWTEXTUREUPLOAD,
+ APIBENCH_INDEX_DIRECTTEXTURE,
+ APIBENCH_INDEX_GLEGLIMAGETEXTURE,
+ APIBENCH_INDEX_DRAWTEX,
+ APIBENCH_INDEX_BUFFERDATA,
+ APIBENCH_INDEX_BUFFERSUBDATA,
+ APIBENCH_INDEX_MAX
+}apiBenchIndex;
+
+#define APIBENCHNAME { \
+ "Frame", \
+ "DrawArray", \
+ "DrawElement", \
+ "_buildStream", \
+ "IndexBuffer", \
+ "DrawArray_UpdateState", \
+ "DrawArray_UpdateState1", \
+ "UpdateState", \
+ "UpdateState1", \
+ "eglSwapBuffers", \
+ "DrawImage", \
+ "SWTextureUpload", \
+ "uploadDirectTexture", \
+ "glEGLImageTexture2D", \
+ "glDrawTex", \
+ "glBufferData", \
+ "glBufferSubData", \
+}
+
+/*
+** Check point for state update
+**
+*/
+typedef enum _apiBenchStateIndex {
+ APIBENCH_STATE_INDEX_FRAME,
+ APIBENCH_STATE_INDEX_TEXTURE,
+ APIBENCH_STATE_INDEX_SHADER,
+ APIBENCH_STATE_INDEX_MAX
+}apiBenchStateIndex;
+
+#define APIBENCHSTATENAME { \
+ "Frame", \
+ "Texture", \
+ "Shader", \
+}
+
+ /* Timer structure to store the profile result */
+typedef struct _gcoTIMER
+{
+ gctUINT32 start;
+ gctUINT32 end;
+ gctUINT32 totalTime;
+ gctUINT32 count;
+}gcoTIMER;
+
+ /* global structure for api bench */
+typedef struct _gcoAPIBENCH
+{
+ /* frame count */
+ gctUINT32 frameCount;
+
+ /* timer object for bench mark */
+ gcoTIMER timer[APIBENCH_INDEX_MAX];
+
+ /* total sent command size */
+ gctUINT32 commandSize;
+
+ /* commit times */
+ gctUINT32 commitNumber;
+
+ /* profile the state update, use same structure of timer */
+ gcoTIMER stateCounter[APIBENCH_STATE_INDEX_MAX];
+
+}gcoAPIBENCH;
+
+ /* Frame count to print */
+#define PROFILE_DRIVER_FRAME_PRINT 10
+
+
+void gcoDUMP_APIBenchStart(
+ IN gcoHAL Hal,
+ IN gctUINT32 timerIndex
+ );
+
+void gcoDUMP_APIBenchEnd(
+ IN gcoHAL Hal,
+ IN gctUINT32 timerIndex
+ );
+
+void gcoDUMP_APIBenchPrint(
+ IN gcoHAL Hal
+ );
+
+void gcoDUMP_APIBenchInit(
+ IN gcoHAL Hal
+ );
+
+void gcoDUMP_APIBenchFrame(
+ IN gcoHAL Hal
+ );
+
+void gcoDUMP_APIBenchCommand(
+ IN gcoHAL Hal,
+ IN gctUINT32 size
+ );
+
+void gcoDUMP_APIBenchCommit(
+ IN gcoHAL Hal
+ );
+
+void gcoDUMP_APIBenchStateEnd(
+ IN gcoHAL Hal,
+ IN gctUINT32 stateIndex
+ );
+
+void gcoDUMP_APIBenchStateStart(
+ IN gcoHAL Hal,
+ IN gctUINT32 stateIndex
+ );
+
+#else
+
+
+#endif
+
+/* Query the video memory. */
+gceSTATUS
+gcoOS_QueryVideoMemory(
+ IN gcoOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Atoms ----------------------------------------------------------------*/
+
+typedef struct gcsATOM * gcsATOM_PTR;
+
+/* Construct an atom. */
+gceSTATUS
+gcoOS_AtomConstruct(
+ IN gcoOS Os,
+ OUT gcsATOM_PTR * Atom
+ );
+
+/* Destroy an atom. */
+gceSTATUS
+gcoOS_AtomDestroy(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom
+ );
+
+/* Increment an atom. */
+gceSTATUS
+gcoOS_AtomIncrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+/* Decrement an atom. */
+gceSTATUS
+gcoOS_AtomDecrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+gctHANDLE
+gcoOS_GetCurrentProcessID(
+ void
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Time -----------------------------------------------------------------*/
+
+/* Get the number of milliseconds since the system started. */
+gctUINT32
+gcoOS_GetTicks(
+ void
+ );
+
+/* Get time in microseconds. */
+gceSTATUS
+gcoOS_GetTime(
+ gctUINT64_PTR Time
+ );
+
+/* Get CPU usage in microseconds. */
+gceSTATUS
+gcoOS_GetCPUTime(
+ gctUINT64_PTR CPUTime
+ );
+
+/* Get memory usage. */
+gceSTATUS
+gcoOS_GetMemoryUsage(
+ gctUINT32_PTR MaxRSS,
+ gctUINT32_PTR IxRSS,
+ gctUINT32_PTR IdRSS,
+ gctUINT32_PTR IsRSS
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gcoOS_Delay(
+ IN gcoOS Os,
+ IN gctUINT32 Delay
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Mutexes --------------------------------------------------------------*/
+
+/* Create a new mutex. */
+gceSTATUS
+gcoOS_CreateMutex(
+ IN gcoOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gcoOS_DeleteMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gcoOS_AcquireMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gcoOS_ReleaseMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Signals --------------------------------------------------------------*/
+
+/* Create a signal. */
+gceSTATUS
+gcoOS_CreateSignal(
+ IN gcoOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gcoOS_DestroySignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gcoOS_Signal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gcoOS_WaitSignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Write a register. */
+gceSTATUS
+gcoOS_WriteRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Read a register. */
+gceSTATUS
+gcoOS_ReadRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+gceSTATUS
+gcoOS_CacheFlush(
+ IN gcoOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_CacheInvalidate(
+ IN gcoOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/*******************************************************************************
+** gcoMATH object
+*/
+
+#define gcdPI 3.14159265358979323846f
+
+gctUINT32
+gcoMATH_Log2in5dot5(
+ IN gctINT X
+ );
+
+gctFLOAT
+gcoMATH_Sine(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Cosine(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Floor(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Ceiling(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_SquareRoot(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Log2(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Power(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+gctFLOAT
+gcoMATH_Modulo(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+gctFLOAT
+gcoMATH_Exp(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Absolute(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_ArcCosine(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Tangent(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_UInt2Float(
+ IN gctUINT X
+ );
+
+gctUINT
+gcoMATH_Float2UInt(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Multiply(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+/******************************************************************************\
+**************************** Coordinate Structures *****************************
+\******************************************************************************/
+
+typedef struct _gcsPOINT
+{
+ gctINT32 x;
+ gctINT32 y;
+}
+gcsPOINT;
+
+typedef struct _gcsSIZE
+{
+ gctINT32 width;
+ gctINT32 height;
+}
+gcsSIZE;
+
+typedef struct _gcsRECT
+{
+ gctINT32 left;
+ gctINT32 top;
+ gctINT32 right;
+ gctINT32 bottom;
+}
+gcsRECT;
+
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*------------------------------- gcoSURF Common ------------------------------*/
+
+/* Color format classes. */
+typedef enum _gceFORMAT_CLASS
+{
+ gcvFORMAT_CLASS_RGBA = 4500,
+ gcvFORMAT_CLASS_YUV,
+ gcvFORMAT_CLASS_INDEX,
+ gcvFORMAT_CLASS_LUMINANCE,
+ gcvFORMAT_CLASS_BUMP,
+ gcvFORMAT_CLASS_DEPTH,
+}
+gceFORMAT_CLASS;
+
+/* Special enums for width field in gcsFORMAT_COMPONENT. */
+typedef enum _gceCOMPONENT_CONTROL
+{
+ gcvCOMPONENT_NOTPRESENT = 0x00,
+ gcvCOMPONENT_DONTCARE = 0x80,
+ gcvCOMPONENT_WIDTHMASK = 0x7F,
+ gcvCOMPONENT_ODD = 0x80
+}
+gceCOMPONENT_CONTROL;
+
+/* Color format component parameters. */
+typedef struct _gcsFORMAT_COMPONENT
+{
+ gctUINT8 start;
+ gctUINT8 width;
+}
+gcsFORMAT_COMPONENT;
+
+/* RGBA color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_RGBA
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT red;
+ gcsFORMAT_COMPONENT green;
+ gcsFORMAT_COMPONENT blue;
+}
+gcsFORMAT_CLASS_TYPE_RGBA;
+
+/* YUV color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_YUV
+{
+ gcsFORMAT_COMPONENT y;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT v;
+}
+gcsFORMAT_CLASS_TYPE_YUV;
+
+/* Index color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_INDEX
+{
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_INDEX;
+
+/* Luminance color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_LUMINANCE
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_LUMINANCE;
+
+/* Bump map color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_BUMP
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT l;
+ gcsFORMAT_COMPONENT v;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT q;
+ gcsFORMAT_COMPONENT w;
+}
+gcsFORMAT_CLASS_TYPE_BUMP;
+
+/* Depth and stencil format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_DEPTH
+{
+ gcsFORMAT_COMPONENT depth;
+ gcsFORMAT_COMPONENT stencil;
+}
+gcsFORMAT_CLASS_TYPE_DEPTH;
+
+/* Format parameters. */
+typedef struct _gcsSURF_FORMAT_INFO
+{
+ /* Format code and class. */
+ gceSURF_FORMAT format;
+ gceFORMAT_CLASS fmtClass;
+
+ /* The size of one pixel in bits. */
+ gctUINT8 bitsPerPixel;
+
+ /* Component swizzle. */
+ gceSURF_SWIZZLE swizzle;
+
+ /* Some formats have two neighbour pixels interleaved together. */
+ /* To describe such format, set the flag to 1 and add another */
+ /* like this one describing the odd pixel format. */
+ gctUINT8 interleaved;
+
+ /* Format components. */
+ union
+ {
+ gcsFORMAT_CLASS_TYPE_BUMP bump;
+ gcsFORMAT_CLASS_TYPE_RGBA rgba;
+ gcsFORMAT_CLASS_TYPE_YUV yuv;
+ gcsFORMAT_CLASS_TYPE_LUMINANCE lum;
+ gcsFORMAT_CLASS_TYPE_INDEX index;
+ gcsFORMAT_CLASS_TYPE_DEPTH depth;
+ } u;
+}
+gcsSURF_FORMAT_INFO;
+
+/* Frame buffer information. */
+typedef struct _gcsSURF_FRAMEBUFFER
+{
+ gctPOINTER logical;
+ gctUINT width, height;
+ gctINT stride;
+ gceSURF_FORMAT format;
+}
+gcsSURF_FRAMEBUFFER;
+
+/* Generic pixel component descriptors. */
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XXX8;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XX8X;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_X8XX;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_8XXX;
+
+typedef enum _gceORIENTATION
+{
+ gcvORIENTATION_TOP_BOTTOM,
+ gcvORIENTATION_BOTTOM_TOP,
+}
+gceORIENTATION;
+
+
+/* Construct a new gcoSURF object. */
+gceSTATUS
+gcoSURF_Construct(
+ IN gcoHAL Hal,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+/* Destroy an gcoSURF object. */
+gceSTATUS
+gcoSURF_Destroy(
+ IN gcoSURF Surface
+ );
+
+/* Map user-allocated surface. */
+gceSTATUS
+gcoSURF_MapUserSurface(
+ IN gcoSURF Surface,
+ IN gctUINT Alignment,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Set the color type of the surface. */
+gceSTATUS
+gcoSURF_SetColorType(
+ IN gcoSURF Surface,
+ IN gceSURF_COLOR_TYPE ColorType
+ );
+
+/* Get the color type of the surface. */
+gceSTATUS
+gcoSURF_GetColorType(
+ IN gcoSURF Surface,
+ OUT gceSURF_COLOR_TYPE *ColorType
+ );
+
+/* Set the surface ration angle. */
+gceSTATUS
+gcoSURF_SetRotation(
+ IN gcoSURF Surface,
+ IN gceSURF_ROTATION Rotation
+ );
+
+/* Verify and return the state of the tile status mechanism. */
+gceSTATUS
+gcoSURF_IsTileStatusSupported(
+ IN gcoSURF Surface
+ );
+
+/* Enable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_EnableTileStatus(
+ IN gcoSURF Surface
+ );
+
+/* Disable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_DisableTileStatus(
+ IN gcoSURF Surface,
+ IN gctBOOL Decompress
+ );
+
+/* Get surface size. */
+gceSTATUS
+gcoSURF_GetSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctUINT * Depth
+ );
+
+/* Get surface aligned sizes. */
+gceSTATUS
+gcoSURF_GetAlignedSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctINT * Stride
+ );
+
+/* Get surface type and format. */
+gceSTATUS
+gcoSURF_GetFormat(
+ IN gcoSURF Surface,
+ OUT gceSURF_TYPE * Type,
+ OUT gceSURF_FORMAT * Format
+ );
+
+/* Lock the surface. */
+gceSTATUS
+gcoSURF_Lock(
+ IN gcoSURF Surface,
+ IN OUT gctUINT32 * Address,
+ IN OUT gctPOINTER * Memory
+ );
+
+/* Unlock the surface. */
+gceSTATUS
+gcoSURF_Unlock(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory
+ );
+
+/* Return pixel format parameters. */
+gceSTATUS
+gcoSURF_QueryFormat(
+ IN gceSURF_FORMAT Format,
+ OUT gcsSURF_FORMAT_INFO_PTR * Info
+ );
+
+/* Compute the color pixel mask. */
+gceSTATUS
+gcoSURF_ComputeColorMask(
+ IN gcsSURF_FORMAT_INFO_PTR Format,
+ OUT gctUINT32_PTR ColorMask
+ );
+
+/* Flush the surface. */
+gceSTATUS
+gcoSURF_Flush(
+ IN gcoSURF Surface
+ );
+
+/* Fill surface with a value. */
+gceSTATUS
+gcoSURF_Fill(
+ IN gcoSURF Surface,
+ IN gcsPOINT_PTR Origin,
+ IN gcsSIZE_PTR Size,
+ IN gctUINT32 Value,
+ IN gctUINT32 Mask
+ );
+
+/* Alpha blend two surfaces together. */
+gceSTATUS
+gcoSURF_Blend(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrig,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsSIZE_PTR Size,
+ IN gceSURF_BLEND_MODE Mode
+ );
+
+/* Create a new gcoSURF wrapper object. */
+gceSTATUS
+gcoSURF_ConstructWrapper(
+ IN gcoHAL Hal,
+ OUT gcoSURF * Surface
+ );
+
+/* Set the underlying buffer for the surface wrapper. */
+gceSTATUS
+gcoSURF_SetBuffer(
+ IN gcoSURF Surface,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Stride,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Set the size of the surface in pixels and map the underlying buffer. */
+gceSTATUS
+gcoSURF_SetWindow(
+ IN gcoSURF Surface,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height
+ );
+
+/* Increase reference count of the surface. */
+gceSTATUS
+gcoSURF_ReferenceSurface(
+ IN gcoSURF Surface
+ );
+
+/* Get surface reference count. */
+gceSTATUS
+gcoSURF_QueryReferenceCount(
+ IN gcoSURF Surface,
+ OUT gctINT32 * ReferenceCount
+ );
+
+/* Set surface orientation. */
+gceSTATUS
+gcoSURF_SetOrientation(
+ IN gcoSURF Surface,
+ IN gceORIENTATION Orientation
+ );
+
+/* Query surface orientation. */
+gceSTATUS
+gcoSURF_QueryOrientation(
+ IN gcoSURF Surface,
+ OUT gceORIENTATION * Orientation
+ );
+ /* #define DUMP_SURFACE 0 */
+
+/* Dump a buffer to a BMP file */
+int gcoOS_DumpBMP(
+ IN gctPOINTER dumpBase,
+ IN gctINT dumpWidth,
+ IN gctINT dumpHeight,
+ IN gctINT dumpStride,
+ IN gctINT dumpBpp,
+ IN gceSURF_FORMAT format,
+ IN gceORIENTATION orientation,
+ IN gctCONST_STRING fileName
+ );
+
+
+/* Dump surface to a BMP file. */
+gceSTATUS
+gcoSURF_DumpSurface(
+ IN gcoSURF Surface,
+ IN gctBOOL bCheckOrientation,
+ IN gctCONST_STRING fileName
+ );
+
+
+/******************************************************************************\
+********************************* gcoDUMP Object ********************************
+\******************************************************************************/
+
+/* Construct a new gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Construct(
+ IN gcoOS Os,
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Destroy a gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Destroy(
+ IN gcoDUMP Dump
+ );
+
+/* Enable/disable dumping. */
+gceSTATUS
+gcoDUMP_Control(
+ IN gcoDUMP Dump,
+ IN gctSTRING FileName
+ );
+
+gceSTATUS
+gcoDUMP_IsEnabled(
+ IN gcoDUMP Dump,
+ OUT gctBOOL * Enabled
+ );
+
+/* Add surface. */
+gceSTATUS
+gcoDUMP_AddSurface(
+ IN gcoDUMP Dump,
+ IN gctINT32 Width,
+ IN gctINT32 Height,
+ IN gceSURF_FORMAT PixelFormat,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount
+ );
+
+/* Mark the beginning of a frame. */
+gceSTATUS
+gcoDUMP_FrameBegin(
+ IN gcoDUMP Dump
+ );
+
+/* Mark the end of a frame. */
+gceSTATUS
+gcoDUMP_FrameEnd(
+ IN gcoDUMP Dump
+ );
+
+/* Dump data. */
+gceSTATUS
+gcoDUMP_DumpData(
+ IN gcoDUMP Dump,
+ IN gceDUMP_TAG Type,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Delete an address. */
+gceSTATUS
+gcoDUMP_Delete(
+ IN gcoDUMP Dump,
+ IN gctUINT32 Address
+ );
+
+/******************************************************************************\
+******************************* gcsRECT Structure ******************************
+\******************************************************************************/
+
+/* Initialize rectangle structure. */
+gceSTATUS
+gcsRECT_Set(
+ OUT gcsRECT_PTR Rect,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Return the width of the rectangle. */
+gceSTATUS
+gcsRECT_Width(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Width
+ );
+
+/* Return the height of the rectangle. */
+gceSTATUS
+gcsRECT_Height(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Height
+ );
+
+/* Ensure that top left corner is to the left and above the right bottom. */
+gceSTATUS
+gcsRECT_Normalize(
+ IN OUT gcsRECT_PTR Rect
+ );
+
+/* Compare two rectangles. */
+gceSTATUS
+gcsRECT_IsEqual(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * Equal
+ );
+
+/* Compare the sizes of two rectangles. */
+gceSTATUS
+gcsRECT_IsOfEqualSize(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * EqualSize
+ );
+
+
+/******************************************************************************\
+**************************** gcsBOUNDARY Structure *****************************
+\******************************************************************************/
+
+typedef struct _gcsBOUNDARY
+{
+ gctINT x;
+ gctINT y;
+ gctINT width;
+ gctINT height;
+}
+gcsBOUNDARY;
+
+/******************************************************************************\
+********************************* gcoHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gcoHEAP * gcoHEAP;
+
+/* Construct a new gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Construct(
+ IN gcoOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gcoHEAP * Heap
+ );
+
+/* Destroy an gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Destroy(
+ IN gcoHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoHEAP_Allocate(
+ IN gcoHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoHEAP_Free(
+ IN gcoHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+/* Profile the heap. */
+gceSTATUS
+gcoHEAP_ProfileStart(
+ IN gcoHEAP Heap
+ );
+
+gceSTATUS
+gcoHEAP_ProfileEnd(
+ IN gcoHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+
+#if defined gcdHAL_TEST
+gceSTATUS
+gcoHEAP_Test(
+ IN gcoHEAP Heap,
+ IN gctSIZE_T Vectors,
+ IN gctSIZE_T MaxSize
+ );
+#endif
+
+/******************************************************************************\
+******************************* Debugging Macros *******************************
+\******************************************************************************/
+
+void
+gcoOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gcoOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gcoOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+/*******************************************************************************
+**
+** gcmFATAL
+**
+** Print a message to the debugger and execute a break point.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcdDEBUG
+# define gcmFATAL gcoOS_DebugFatal
+# define gcmkFATAL gckOS_DebugFatal
+#elif gcdHAS_ELLIPSES
+# define gcmFATAL(...)
+# define gcmkFATAL(...)
+#else
+ gcmINLINE static void
+ __dummy_fatal(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmFATAL __dummy_fatal
+# define gcmkFATAL __dummy_fatal
+#endif
+
+#define gcmENUM2TEXT(e) case e: return #e
+
+/*******************************************************************************
+**
+** gcmTRACE
+**
+** Print a message to the debugfer if the correct level has been set. In
+** retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** level Level of message.
+** message Message.
+** ... Optional arguments.
+*/
+#define gcvLEVEL_NONE -1
+#define gcvLEVEL_ERROR 0
+#define gcvLEVEL_WARNING 1
+#define gcvLEVEL_INFO 2
+#define gcvLEVEL_VERBOSE 3
+
+void
+gckOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+void
+
+gcoOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcdDEBUG
+# define gcmTRACE gcoOS_DebugTrace
+# define gcmkTRACE gckOS_DebugTrace
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE(...)
+# define gcmkTRACE(...)
+#else
+ gcmINLINE static void
+ __dummy_trace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmTRACE __dummy_trace
+# define gcmkTRACE __dummy_trace
+#endif
+
+/* Debug zones. */
+#define gcvZONE_OS (1 << 0)
+#define gcvZONE_HARDWARE (1 << 1)
+#define gcvZONE_HEAP (1 << 2)
+
+/* Kernel zones. */
+#define gcvZONE_KERNEL (1 << 3)
+#define gcvZONE_VIDMEM (1 << 4)
+#define gcvZONE_COMMAND (1 << 5)
+#define gcvZONE_DRIVER (1 << 6)
+#define gcvZONE_CMODEL (1 << 7)
+#define gcvZONE_MMU (1 << 8)
+#define gcvZONE_EVENT (1 << 9)
+#define gcvZONE_DEVICE (1 << 10)
+
+/* User zones. */
+#define gcvZONE_HAL (1 << 3)
+#define gcvZONE_BUFFER (1 << 4)
+#define gcvZONE_CONTEXT (1 << 5)
+#define gcvZONE_SURFACE (1 << 6)
+#define gcvZONE_INDEX (1 << 7)
+#define gcvZONE_STREAM (1 << 8)
+#define gcvZONE_TEXTURE (1 << 9)
+#define gcvZONE_2D (1 << 10)
+#define gcvZONE_3D (1 << 11)
+#define gcvZONE_COMPILER (1 << 12)
+#define gcvZONE_MEMORY (1 << 13)
+#define gcvZONE_STATE (1 << 14)
+#define gcvZONE_AUX (1 << 15)
+
+/* API definitions. */
+#define gcvZONE_API_HAL (0 << 28)
+#define gcvZONE_API_EGL (1 << 28)
+#define gcvZONE_API_ES11 (2 << 28)
+#define gcvZONE_API_ES20 (3 << 28)
+#define gcvZONE_API_VG11 (4 << 28)
+#define gcvZONE_API_GL (5 << 28)
+#define gcvZONE_API_DFB (6 << 28)
+#define gcvZONE_API_GDI (7 << 28)
+#define gcvZONE_API_D3D (8 << 28)
+
+#define gcmZONE_GET_API(zone) ((zone) >> 28)
+#define gcdZONE_MASK 0x0FFFFFFF
+
+/* Handy zones. */
+#define gcvZONE_NONE 0
+#define gcvZONE_ALL gcdZONE_MASK
+
+/*******************************************************************************
+**
+** gcmTRACE_ZONE
+**
+** Print a message to the debugger if the correct level and zone has been
+** set. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** Level Level of message.
+** Zone Zone of message.
+** Message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcdDEBUG
+# define gcmTRACE_ZONE gcoOS_DebugTraceZone
+# define gcmkTRACE_ZONE gckOS_DebugTraceZone
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE_ZONE(...)
+# define gcmkTRACE_ZONE(...)
+#else
+ gcmINLINE static void
+ __dummy_trace_zone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmTRACE_ZONE __dummy_trace_zone
+# define gcmkTRACE_ZONE __dummy_trace_zone
+#endif
+
+/******************************************************************************\
+******************************** Logging Macros ********************************
+\******************************************************************************/
+
+#define gcdHEADER_LEVEL gcvLEVEL_VERBOSE
+
+#define gcmHEADER() \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmHEADER_ARG(Text, ...) \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_header_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmHEADER_ARG __dummy_header_arg
+#endif
+
+#define gcmFOOTER() \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d", \
+ __FUNCTION__, __LINE__, status)
+
+#define gcmFOOTER_NO() \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmFOOTER_ARG(Text, ...) \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, \
+ __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_footer_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmFOOTER_ARG __dummy_footer_arg
+#endif
+
+#define gcmkHEADER() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmkHEADER_ARG(Text, ...) \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_kheader_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkHEADER_ARG __dummy_kheader_arg
+#endif
+
+#define gcmkFOOTER() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d", \
+ __FUNCTION__, __LINE__, status)
+
+#define gcmkFOOTER_NO() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmkFOOTER_ARG(Text, ...) \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, \
+ __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_kfooter_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkFOOTER_ARG __dummy_kfooter_arg
+#endif
+
+#define gcmOPT_VALUE(ptr) (((ptr) == gcvNULL) ? 0 : *(ptr))
+#define gcmOPT_POINTER(ptr) (((ptr) == gcvNULL) ? gcvNULL : *(ptr))
+
+void
+gcoOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+void
+gckOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+#define gcmPRINT gcoOS_Print
+#define gcmkPRINT gckOS_Print
+
+/*******************************************************************************
+**
+** gcmDUMP
+**
+** Print a dump message.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+
+#if gcdDUMP
+gceSTATUS
+gcfDump(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ ...
+ );
+# define gcmDUMP gcfDump
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP(...)
+#else
+ gcmINLINE static void
+ __dummy_dump(
+ IN gcoOS Os,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP __dummy_dump
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_DATA
+**
+** Add data to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP
+geSTATUS
+gcfDumpData(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_DATA gcfDumpData
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_DATA(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_data(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_DATA __dummy_dump_data
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_BUFFER
+**
+** Print a buffer to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctUINT32 Physical
+** Physical address of buffer.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctUINT32 Offset
+** Offset into buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP
+void gcfDumpBuffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_BUFFER gcfDumpBuffer
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_BUFFER(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_buffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_BUFFER __dummy_dump_buffer
+#endif
+
+/*******************************************************************************
+**
+** gcmTRACE_RELEASE
+**
+** Print a message to the shader debugger.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+#define gcmTRACE_RELEASE gcoOS_DebugShaderTrace
+
+void
+gcoOS_DebugShaderTrace(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_SetDebugShaderFiles(
+ IN gctCONST_STRING VSFileName,
+ IN gctCONST_STRING FSFileName
+ );
+
+void
+gcoOS_SetDebugShaderFileType(
+ IN gctUINT32 ShaderType
+ );
+
+/*******************************************************************************
+**
+** gcmBREAK
+**
+** Break into the debugger. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** None.
+*/
+
+void
+gcoOS_DebugBreak(
+ void
+ );
+
+void
+gckOS_DebugBreak(
+ void
+ );
+
+#if gcdDEBUG
+# define gcmBREAK gcoOS_DebugBreak
+# define gcmkBREAK gckOS_DebugBreak
+#else
+# define gcmBREAK()
+# define gcmkBREAK()
+#endif
+
+/*******************************************************************************
+**
+** gcmASSERT
+**
+** Evaluate an expression and break into the debugger if the expression
+** evaluates to false. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcdDEBUG
+# define _gcmASSERT(prefix, exp) \
+ do \
+ { \
+ if (!(exp)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ASSERT at %s(%d) in " __FILE__, \
+ __FUNCTION__, __LINE__); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ "(%s)", #exp); \
+ prefix##BREAK(); \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmASSERT(exp) _gcmASSERT(gcm, exp)
+# define gcmkASSERT(exp) _gcmASSERT(gcmk, exp)
+#else
+# define gcmASSERT(exp)
+# define gcmkASSERT(exp)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY
+**
+** Verify if an expression returns true. If the expression does not
+** evaluates to true, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcdDEBUG
+# define gcmVERIFY(exp) gcmASSERT(exp)
+# define gcmkVERIFY(exp) gcmkASSERT(exp)
+#else
+# define gcmVERIFY(exp) exp
+# define gcmkVERIFY(exp) exp
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY_OK
+**
+** Verify a fucntion returns gcvSTATUS_OK. If the function does not return
+** gcvSTATUS_OK, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+
+void
+gcoOS_Verify(
+ IN gceSTATUS Status
+ );
+
+void
+gckOS_Verify(
+ IN gceSTATUS Status
+ );
+
+#if gcdDEBUG
+# define gcmVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ gcoOS_Verify(verifyStatus); \
+ gcmASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+# define gcmkVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ gckOS_Verify(verifyStatus); \
+ gcmkASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+#else
+# define gcmVERIFY_OK(func) func
+# define gcmkVERIFY_OK(func) func
+#endif
+
+/*******************************************************************************
+**
+** gcmERR_BREAK
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_BREAK(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_BREAK: status=%d @ %s(%d) in " __FILE__, \
+ status, __FUNCTION__, __LINE__); \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_BREAK(func) _gcmERR_BREAK(gcm, func)
+#define gcmkERR_BREAK(func) _gcmERR_BREAK(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmERR_RETURN
+**
+** Executes a return on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d @ %s(%d) in " __FILE__, \
+ status, __FUNCTION__, __LINE__); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_RETURN(func) _gcmERR_RETURN(gcm, func)
+#define gcmkERR_RETURN(func) _gcmERR_RETURN(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmONERROR
+**
+** Jump to the error handler in case there is an error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmONERROR(prefix, func) \
+ do \
+ { \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ONERROR: status=%d @ %s(%d) in " __FILE__, \
+ status, __FUNCTION__, __LINE__); \
+ goto OnError; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmONERROR(func) _gcmONERROR(gcm, func)
+#define gcmkONERROR(func) _gcmONERROR(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_LOCK
+**
+** Verifies whether the surface is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_LOCK(surfaceInfo) \
+ if (!surfaceInfo->node.valid) \
+ { \
+ status = gcvSTATUS_MEMORY_UNLOCKED; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmVERIFY_NODE_LOCK
+**
+** Verifies whether the surface node is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_NODE_LOCK(surfaceNode) \
+ if (!surfaceNode->valid) \
+ { \
+ status = gcvSTATUS_MEMORY_UNLOCKED; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmBADOBJECT_BREAK
+**
+** Executes a break statement on bad object.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#define gcmBADOBJECT_BREAK(obj, t) \
+ if ((obj == gcvNULL) \
+ || (((gcsOBJECT *)(obj))->type != t) \
+ ) \
+ { \
+ status = gcvSTATUS_INVALID_OBJECT; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmCHECK_STATUS
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmCHECK_STATUS(prefix, func) \
+ do \
+ { \
+ last = func; \
+ if (gcmIS_ERROR(last)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "CHECK_STATUS: status=%d @ %s(%d) in " __FILE__, \
+ last, __FUNCTION__, __LINE__); \
+ status = last; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmCHECK_STATUS(func) _gcmCHECK_STATUS(gcm, func)
+#define gcmkCHECK_STATUS(func) _gcmCHECK_STATUS(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_ARGUMENT(prefix, arg) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, #prefix "VERIFY_ARGUMENT failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_ARGUMENT); \
+ return gcvSTATUS_INVALID_ARGUMENT; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcm, arg)
+# define gcmkVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcmk, arg)
+#else
+# define gcmVERIFY_ARGUMENT(arg)
+# define gcmkVERIFY_ARGUMENT(arg)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT_RETURN
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_ARGUMENT_RETURN(prefix, arg, value) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "gcmVERIFY_ARGUMENT_RETURN failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("value=%d", value); \
+ return value; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcm, arg, value)
+# define gcmkVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcmk, arg, value)
+#else
+# define gcmVERIFY_ARGUMENT_RETURN(arg, value)
+# define gcmkVERIFY_ARGUMENT_RETURN(arg, value)
+#endif
+void gcoOS_Log(IN unsigned int filter, IN char* msg,
+ ...
+ );
+
+void gckOS_Log(IN unsigned int filter, IN char* msg,
+ ...
+ );
+
+void gcoOS_SetLogFilter(IN unsigned int filter);
+
+
+ /* Logging service */
+#define _GFX_LOG_ERROR_ 0x00000001
+#define _GFX_LOG_WARNING_ 0x00000002
+#define _GFX_LOG_EGL_API_ 0x00000004
+#define _GFX_LOG_NATIVE_API_ 0x00000008
+#define _GFX_LOG_OES_API_ 0x00000010
+#define _GFX_LOG_VG_API_ 0x00000020
+#define _GFX_LOG_CONFIG_ 0x00000040
+#define _GFX_LOG_INFO_ 0x00000080
+#define _GFX_LOG_NOTIFY_ 0x00000100
+#define _GFX_LOG_ALL_ 0xffffffff
+
+
+#if MRVL_ENABLE_EGL_API_LOG
+#define EGL_API_LOG(x) gcoOS_Log x
+#else
+#define EGL_API_LOG(x)
+#endif
+#define EGL_LOG(x) gcoOS_Log x
+
+
+#if MRVL_ENABLE_OES1_API_LOG
+#define OES11_API_LOG(x) gcoOS_Log x
+#else
+#define OES11_API_LOG(x)
+#endif
+#define OES11_LOG(x) gcoOS_Log x
+
+#if MRVL_ENABLE_OES2_API_LOG
+#define OES20_API_LOG(x) gcoOS_Log x
+#else
+#define OES20_API_LOG(x)
+#endif
+#define OES20_LOG gcoOS_Log x
+
+#if MRVL_ENABLE_OVG_API_LOG
+#define OVG_API_LOG(x) gcoOS_Log x
+#else
+#define OVG_API_LOG(x)
+#endif
+#define OVG_LOG(x) gcoOS_Log x
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_base_h_ */
+
diff --git a/src/include_dove_old/gc_hal_compiler.h b/src/include_dove_old/gc_hal_compiler.h
new file mode 100644
index 0000000..0160155
--- /dev/null
+++ b/src/include_dove_old/gc_hal_compiler.h
@@ -0,0 +1,1841 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public Lisence for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+/*
+** Include file the defines the front- and back-end compilers, as well as the
+** objects they use.
+*/
+
+#ifndef __gc_hal_compiler_h_
+#define __gc_hal_compiler_h_
+
+#include "gc_hal_types.h"
+#include "gc_hal_engine.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+|******************************* SHADER LANGUAGE ******************************|
+\******************************************************************************/
+
+/* Possible shader language opcodes. */
+typedef enum _gcSL_OPCODE
+{
+ gcSL_NOP, /* 0x00 */
+ gcSL_MOV, /* 0x01 */
+ gcSL_SAT, /* 0x02 */
+ gcSL_DP3, /* 0x03 */
+ gcSL_DP4, /* 0x04 */
+ gcSL_ABS, /* 0x05 */
+ gcSL_JMP, /* 0x06 */
+ gcSL_ADD, /* 0x07 */
+ gcSL_MUL, /* 0x08 */
+ gcSL_RCP, /* 0x09 */
+ gcSL_SUB, /* 0x0A */
+ gcSL_KILL, /* 0x0B */
+ gcSL_TEXLD, /* 0x0C */
+ gcSL_CALL, /* 0x0D */
+ gcSL_RET, /* 0x0E */
+ gcSL_NORM, /* 0x0F */
+ gcSL_MAX, /* 0x10 */
+ gcSL_MIN, /* 0x11 */
+ gcSL_POW, /* 0x12 */
+ gcSL_RSQ, /* 0x13 */
+ gcSL_LOG, /* 0x14 */
+ gcSL_FRAC, /* 0x15 */
+ gcSL_FLOOR, /* 0x16 */
+ gcSL_CEIL, /* 0x17 */
+ gcSL_CROSS, /* 0x18 */
+ gcSL_TEXLDP, /* 0x19 */
+ gcSL_TEXBIAS, /* 0x1A */
+ gcSL_TEXGRAD, /* 0x1B */
+ gcSL_TEXLOD, /* 0x1C */
+ gcSL_SIN, /* 0x1D */
+ gcSL_COS, /* 0x1E */
+ gcSL_TAN, /* 0x1F */
+ gcSL_EXP, /* 0x20 */
+ gcSL_SIGN, /* 0x21 */
+ gcSL_STEP, /* 0x22 */
+ gcSL_SQRT, /* 0x23 */
+ gcSL_ACOS, /* 0x24 */
+ gcSL_ASIN, /* 0x25 */
+ gcSL_ATAN, /* 0x26 */
+ gcSL_SET, /* 0x27 */
+ gcSL_DSX, /* 0x28 */
+ gcSL_DSY, /* 0x29 */
+ gcSL_FWIDTH, /* 0x2A */
+}
+gcSL_OPCODE;
+
+typedef enum _gcSL_FORMAT
+{
+ gcSL_FLOAT, /* 0 */
+ gcSL_INTEGER, /* 1 */
+ gcSL_BOOLEAN, /* 2 */
+}
+gcSL_FORMAT;
+
+/* Destination write enable bits. */
+typedef enum _gcSL_ENABLE
+{
+ gcSL_ENABLE_X = 0x1,
+ gcSL_ENABLE_Y = 0x2,
+ gcSL_ENABLE_Z = 0x4,
+ gcSL_ENABLE_W = 0x8,
+ /* Combinations. */
+ gcSL_ENABLE_XY = gcSL_ENABLE_X | gcSL_ENABLE_Y,
+ gcSL_ENABLE_XYZ = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XYZW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XYW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_XZ = gcSL_ENABLE_X | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XZW = gcSL_ENABLE_X | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XW = gcSL_ENABLE_X | gcSL_ENABLE_W,
+ gcSL_ENABLE_YZ = gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_YZW = gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_YW = gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_ZW = gcSL_ENABLE_Z | gcSL_ENABLE_W,
+}
+gcSL_ENABLE;
+
+/* Possible indices. */
+typedef enum _gcSL_INDEXED
+{
+ gcSL_NOT_INDEXED, /* 0 */
+ gcSL_INDEXED_X, /* 1 */
+ gcSL_INDEXED_Y, /* 2 */
+ gcSL_INDEXED_Z, /* 3 */
+ gcSL_INDEXED_W, /* 4 */
+}
+gcSL_INDEXED;
+
+/* Opcode conditions. */
+typedef enum _gcSL_CONDITION
+{
+ gcSL_ALWAYS, /* 0x0 */
+ gcSL_NOT_EQUAL, /* 0x1 */
+ gcSL_LESS_OR_EQUAL, /* 0x2 */
+ gcSL_LESS, /* 0x3 */
+ gcSL_EQUAL, /* 0x4 */
+ gcSL_GREATER, /* 0x5 */
+ gcSL_GREATER_OR_EQUAL, /* 0x6 */
+ gcSL_AND, /* 0x7 */
+ gcSL_OR, /* 0x8 */
+ gcSL_XOR, /* 0x9 */
+}
+gcSL_CONDITION;
+
+/* Possible source operand types. */
+typedef enum _gcSL_TYPE
+{
+ gcSL_NONE, /* 0x0 */
+ gcSL_TEMP, /* 0x1 */
+ gcSL_ATTRIBUTE, /* 0x2 */
+ gcSL_UNIFORM, /* 0x3 */
+ gcSL_SAMPLER, /* 0x4 */
+ gcSL_CONSTANT, /* 0x5 */
+ gcSL_OUTPUT, /* 0x6 */
+ gcSL_PHYSICAL, /* 0x7 */
+}
+gcSL_TYPE;
+
+/* Swizzle generator macro. */
+#define gcmSWIZZLE(Component1, Component2, Component3, Component4) \
+( \
+ (gcSL_SWIZZLE_ ## Component1 << 0) | \
+ (gcSL_SWIZZLE_ ## Component2 << 2) | \
+ (gcSL_SWIZZLE_ ## Component3 << 4) | \
+ (gcSL_SWIZZLE_ ## Component4 << 6) \
+)
+
+/* Possible swizzle values. */
+typedef enum _gcSL_SWIZZLE
+{
+ gcSL_SWIZZLE_X, /* 0x0 */
+ gcSL_SWIZZLE_Y, /* 0x1 */
+ gcSL_SWIZZLE_Z, /* 0x2 */
+ gcSL_SWIZZLE_W, /* 0x3 */
+ /* Combinations. */
+ gcSL_SWIZZLE_XXXX = gcmSWIZZLE(X, X, X, X),
+ gcSL_SWIZZLE_YYYY = gcmSWIZZLE(Y, Y, Y, Y),
+ gcSL_SWIZZLE_ZZZZ = gcmSWIZZLE(Z, Z, Z, Z),
+ gcSL_SWIZZLE_WWWW = gcmSWIZZLE(W, W, W, W),
+ gcSL_SWIZZLE_XYYY = gcmSWIZZLE(X, Y, Y, Y),
+ gcSL_SWIZZLE_XZZZ = gcmSWIZZLE(X, Z, Z, Z),
+ gcSL_SWIZZLE_XWWW = gcmSWIZZLE(X, W, W, W),
+ gcSL_SWIZZLE_YZZZ = gcmSWIZZLE(Y, Z, Z, Z),
+ gcSL_SWIZZLE_YWWW = gcmSWIZZLE(Y, W, W, W),
+ gcSL_SWIZZLE_ZWWW = gcmSWIZZLE(Z, W, W, W),
+ gcSL_SWIZZLE_XYZZ = gcmSWIZZLE(X, Y, Z, Z),
+ gcSL_SWIZZLE_XYWW = gcmSWIZZLE(X, Y, W, W),
+ gcSL_SWIZZLE_XZWW = gcmSWIZZLE(X, Z, W, W),
+ gcSL_SWIZZLE_YZWW = gcmSWIZZLE(Y, Z, W, W),
+ gcSL_SWIZZLE_XXYZ = gcmSWIZZLE(X, X, Y, Z),
+ gcSL_SWIZZLE_XYZW = gcmSWIZZLE(X, Y, Z, W),
+ gcSL_SWIZZLE_XYXY = gcmSWIZZLE(X, Y, X, Y),
+}
+gcSL_SWIZZLE;
+
+
+/******************************************************************************\
+|*********************************** SHADERS **********************************|
+\******************************************************************************/
+
+/* Shader types. */
+#define gcSHADER_TYPE_UNKNOWN 0
+#define gcSHADER_TYPE_VERTEX 1
+#define gcSHADER_TYPE_FRAGMENT 2
+
+/* gcSHADER objects. */
+typedef struct _gcSHADER * gcSHADER;
+typedef struct _gcATTRIBUTE * gcATTRIBUTE;
+typedef struct _gcUNIFORM * gcUNIFORM;
+typedef struct _gcOUTPUT * gcOUTPUT;
+typedef struct _gcsFUNCTION * gcFUNCTION;
+typedef struct _gcsHINT * gcsHINT_PTR;
+typedef struct _gcSHADER_PROFILER * gcSHADER_PROFILER;
+typedef struct _gcVARIABLE * gcVARIABLE;
+
+/* gcSHADER_TYPE enumeration. */
+typedef enum _gcSHADER_TYPE
+{
+ gcSHADER_FLOAT_X1, /* 0x00 */
+ gcSHADER_FLOAT_X2, /* 0x01 */
+ gcSHADER_FLOAT_X3, /* 0x02 */
+ gcSHADER_FLOAT_X4, /* 0x03 */
+ gcSHADER_FLOAT_2X2, /* 0x04 */
+ gcSHADER_FLOAT_3X3, /* 0x05 */
+ gcSHADER_FLOAT_4X4, /* 0x06 */
+ gcSHADER_BOOLEAN_X1, /* 0x07 */
+ gcSHADER_BOOLEAN_X2, /* 0x08 */
+ gcSHADER_BOOLEAN_X3, /* 0x09 */
+ gcSHADER_BOOLEAN_X4, /* 0x0A */
+ gcSHADER_INTEGER_X1, /* 0x0B */
+ gcSHADER_INTEGER_X2, /* 0x0C */
+ gcSHADER_INTEGER_X3, /* 0x0D */
+ gcSHADER_INTEGER_X4, /* 0x0E */
+ gcSHADER_SAMPLER_1D, /* 0x0F */
+ gcSHADER_SAMPLER_2D, /* 0x10 */
+ gcSHADER_SAMPLER_3D, /* 0x11 */
+ gcSHADER_SAMPLER_CUBIC, /* 0x12 */
+ gcSHADER_FIXED_X1, /* 0x13 */
+ gcSHADER_FIXED_X2, /* 0x14 */
+ gcSHADER_FIXED_X3, /* 0x15 */
+ gcSHADER_FIXED_X4, /* 0x16 */
+}
+gcSHADER_TYPE;
+
+/* Shader flags. */
+typedef enum _gceSHADER_FLAGS
+{
+ gcvSHADER_DEAD_CODE = 0x01,
+ gcvSHADER_RESOURCE_USAGE = 0x02,
+ gcvSHADER_OPTIMIZER = 0x04,
+ gcvSHADER_USE_GL_Z = 0x08,
+ gcvSHADER_USE_GL_POSITION = 0x10,
+ gcvSHADER_USE_GL_FACE = 0x20,
+ gcvSHADER_USE_GL_POINT_COORD = 0x40,
+}
+gceSHADER_FLAGS;
+
+/* Function argument qualifier */
+typedef enum _gceINPUT_OUTPUT
+{
+ gcvFUNCTION_INPUT,
+ gcvFUNCTION_OUTPUT,
+ gcvFUNCTION_INOUT
+}
+gceINPUT_OUTPUT;
+
+/*******************************************************************************
+** gcSHADER_Construct
+********************************************************************************
+**
+** Construct a new gcSHADER object.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Type of gcSHADER object to cerate. 'ShaderType' can be one of the
+** following:
+**
+** gcSHADER_TYPE_VERTEX Vertex shader.
+** gcSHADER_TYPE_FRAGMENT Fragment shader.
+**
+** OUTPUT:
+**
+** gcSHADER * Shader
+** Pointer to a variable receiving the gcSHADER object pointer.
+*/
+gceSTATUS
+gcSHADER_Construct(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ OUT gcSHADER * Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Destroy
+********************************************************************************
+**
+** Destroy a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Destroy(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Load
+********************************************************************************
+**
+** Load a gcSHADER object from a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containg the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Load(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_Save
+********************************************************************************
+**
+** Save a gcSHADER object to a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer to be used as storage for the gcSHADER
+** object. If 'Buffer' is gcvNULL, the gcSHADER object will not be saved,
+** but the number of bytes required to hold the binary output for the
+** gcSHADER object will be returned.
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable holding the number of bytes allocated in
+** 'Buffer'. Only valid if 'Buffer' is not gcvNULL.
+**
+** OUTPUT:
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable receiving the number of bytes required to hold
+** the binary form of the gcSHADER object.
+*/
+gceSTATUS
+gcSHADER_Save(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN OUT gctSIZE_T * BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_AddAttribute
+********************************************************************************
+**
+** Add an attribute to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the attribute to add.
+**
+** gcSHADER_TYPE Type
+** Type of the attribute to add.
+**
+** gctSIZE_T Length
+** Array length of the attribute to add. 'Length' must be at least 1.
+**
+** gctBOOL IsTexture
+** gcvTRUE if the attribute is used as a texture coordinate, gcvFALSE if not.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_AddAttribute(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctBOOL IsTexture,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttributeCount
+********************************************************************************
+**
+** Get the number of attributes for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of attributes.
+*/
+gceSTATUS
+gcSHADER_GetAttributeCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttribute
+********************************************************************************
+**
+** Get the gcATTRIBUTE object poniter for an indexed attribute for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the attribute to retrieve.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetAttribute(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_GetPositionAttribute
+********************************************************************************
+**
+** Get the gcATTRIBUTE object pointer for the attribute that defines the
+** position.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctUINT * Index
+** Pointer to a variable receiving the index of te gcATTRIBUTE object
+** used as a position.
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetPositionAttribute(
+ IN gcSHADER Shader,
+ OUT gctUINT * Index,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_AddUniform
+********************************************************************************
+**
+** Add an uniform to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the uniform to add.
+**
+** gcSHADER_TYPE Type
+** Type of the uniform to add.
+**
+** gctSIZE_T Length
+** Array length of the uniform to add. 'Length' must be at least 1.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_AddUniform(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniformCount
+********************************************************************************
+**
+** Get the number of uniforms for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of uniforms.
+*/
+gceSTATUS
+gcSHADER_GetUniformCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniform
+********************************************************************************
+**
+** Get the gcUNIFORM object pointer for an indexed uniform for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the uniform to retrieve.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_GetUniform(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOutput
+********************************************************************************
+**
+** Add an output to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the output to add.
+**
+** gcSHADER_TYPE Type
+** Type of the output to add.
+**
+** gctSIZE_T Length
+** Array length of the output to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the output value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOutput(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+gceSTATUS
+gcSHADER_AddOutputIndexed(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gctSIZE_T Index,
+ IN gctUINT16 TempIndex
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutputCount
+********************************************************************************
+**
+** Get the number of outputs for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of outputs.
+*/
+gceSTATUS
+gcSHADER_GetOutputCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutput
+********************************************************************************
+**
+** Get the gcOUTPUT object pointer for an indexed output for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of output to retrieve.
+**
+** OUTPUT:
+**
+** gcOUTPUT * Output
+** Pointer to a variable receiving the gcOUTPUT object pointer.
+*/
+gceSTATUS
+gcSHADER_GetOutput(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcOUTPUT * Output
+ );
+
+/*******************************************************************************
+** gcSHADER_AddVariable
+********************************************************************************
+**
+** Add a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the variable to add.
+**
+** gcSHADER_TYPE Type
+** Type of the variable to add.
+**
+** gctSIZE_T Length
+** Array length of the variable to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the variable value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddVariable(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariableCount
+********************************************************************************
+**
+** Get the number of variables for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of variables.
+*/
+gceSTATUS
+gcSHADER_GetVariableCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariable
+********************************************************************************
+**
+** Get the gcVARIABLE object pointer for an indexed variable for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of variable to retrieve.
+**
+** OUTPUT:
+**
+** gcVARIABLE * Variable
+** Pointer to a variable receiving the gcVARIABLE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetVariable(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcVARIABLE * Variable
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcode
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the target
+** of the opcode.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcode(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddOpcode2(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeIndexed
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object that writes to an dynamically indexed
+** target.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the
+** target of the opcode.
+**
+** gcSL_INDEXED Mode
+** Location of the dynamic index inside the temporary register. Valid
+** values can be:
+**
+** gcSL_INDEXED_X - Use x component of the temporary register.
+** gcSL_INDEXED_Y - Use y component of the temporary register.
+** gcSL_INDEXED_Z - Use z component of the temporary register.
+** gcSL_INDEXED_W - Use w component of the temporary register.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditional
+********************************************************************************
+**
+** Add an conditional opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditional(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddLabel
+********************************************************************************
+**
+** Define a label at the current instruction of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Label
+** Label to define.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddLabel(
+ IN gcSHADER Shader,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSource
+********************************************************************************
+**
+** Add a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSource(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceIndexed
+********************************************************************************
+**
+** Add a dynamically indexed source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_INDEXED Mode
+** Addressing mode for the index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttribute
+********************************************************************************
+**
+** Add an attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttribute(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttributeIndexed
+********************************************************************************
+**
+** Add an indexed attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttributeIndexed(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniform
+********************************************************************************
+**
+** Add a uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniform(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniformIndexed
+********************************************************************************
+**
+** Add an indexed uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniformIndexed(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+gceSTATUS
+gcSHADER_AddSourceSamplerIndexed(
+ IN gcSHADER Shader,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceConstant
+********************************************************************************
+**
+** Add a constant floating pointer value as a source operand to a gcSHADER
+** object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctFLOAT Constant
+** Floating pointer constant.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceConstant(
+ IN gcSHADER Shader,
+ IN gctFLOAT Constant
+ );
+
+/*******************************************************************************
+** gcSHADER_Pack
+********************************************************************************
+**
+** Pack a dynamically created gcSHADER object by trimming the allocated arrays
+** and resolving all the labeling.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Pack(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_SetOptimizationOption
+********************************************************************************
+**
+** Set optimization option of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT OptimizationOption
+** Optimization option. Can be one of the following:
+**
+** 0 - No optimization.
+** 1 - Full optimization.
+** Other value - For optimizer testing.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_SetOptimizationOption(
+ IN gcSHADER Shader,
+ IN gctUINT OptimizationOption
+ );
+
+gceSTATUS
+gcSHADER_AddFunction(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ OUT gcFUNCTION * Function
+ );
+
+gceSTATUS
+gcSHADER_BeginFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+gceSTATUS
+gcSHADER_EndFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the attribute. 'Type'
+** can be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** attribute was declared as an array. If the attribute was not
+** declared as an array, the array length will be 1. 'ArrayLength' can
+** be gcvNULL, in which case no array length will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetType(
+ IN gcATTRIBUTE Attribute,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_GetName
+********************************************************************************
+**
+** Get the name of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the attribute name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the attribute name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetName(
+ IN gcATTRIBUTE Attribute,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_IsEnabled
+********************************************************************************
+**
+** Query the enabled state of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctBOOL * Enabled
+** Pointer to a variable receiving the enabled state of the attribute.
+*/
+gceSTATUS
+gcATTRIBUTE_IsEnabled(
+ IN gcATTRIBUTE Attribute,
+ OUT gctBOOL * Enabled
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the uniform. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** uniform was declared as an array. If the uniform was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetType(
+ IN gcUNIFORM Uniform,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetName
+********************************************************************************
+**
+** Get the name of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the uniform name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the uniform name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetName(
+ IN gcUNIFORM Uniform,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetSampler
+********************************************************************************
+**
+** Get the physical sampler number for a sampler gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctUINT32 * Sampler
+** Pointer to a variable receiving the physical sampler.
+*/
+gceSTATUS
+gcUNIFORM_GetSampler(
+ IN gcUNIFORM Uniform,
+ OUT gctUINT32 * Sampler
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValue
+********************************************************************************
+**
+** Set the value of a uniform in integer.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctINT * Value
+** Pointer to a buffer holding the integer values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValue(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueX
+********************************************************************************
+**
+** Set the value of a uniform in fixed point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFIXED_POINT * Value
+** Pointer to a buffer holding the fixed point values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueX(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN gctFIXED_POINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueF
+********************************************************************************
+**
+** Set the value of a uniform in floating point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFLOAT * Value
+** Pointer to a buffer holding the floating point values for the
+** uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueF(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctFLOAT * Value
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the output. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** output was declared as an array. If the output was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetType(
+ IN gcOUTPUT Output,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetIndex
+********************************************************************************
+**
+** Get the index of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctUINT * Index
+** Pointer to a variable receiving the temporary register index of the
+** output. 'Index' can be gcvNULL,. in which case no index will be
+** returned.
+*/
+gceSTATUS
+gcOUTPUT_GetIndex(
+ IN gcOUTPUT Output,
+ OUT gctUINT * Index
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetName
+********************************************************************************
+**
+** Get the name of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the output name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the output name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetName(
+ IN gcOUTPUT Output,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+*********************************************************** F U N C T I O N S **
+*******************************************************************************/
+
+gceSTATUS
+gcFUNCTION_AddArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 TempIndex,
+ IN gctUINT8 Enable,
+ IN gctUINT8 Qualifier
+ );
+
+gceSTATUS
+gcFUNCTION_GetArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 Index,
+ OUT gctUINT16_PTR Temp,
+ OUT gctUINT8_PTR Enable,
+ OUT gctUINT8_PTR Swizzle
+ );
+
+gceSTATUS
+gcFUNCTION_GetLabel(
+ IN gcFUNCTION Function,
+ OUT gctUINT_PTR Label
+ );
+
+/*******************************************************************************
+** gcCompileShader
+********************************************************************************
+**
+** Compile a shader.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Shader type to compile. Can be one of the following values:
+**
+** gcSHADER_TYPE_VERTEX
+** Compile a vertex shader.
+**
+** gcSHADER_TYPE_FRAGMENT
+** Compile a fragment shader.
+**
+** gctSIZE_T SourceSize
+** Size of the source buffer in bytes.
+**
+** gctCONST_STRING Source
+** Pointer to the buffer containing the shader source code.
+**
+** OUTPUT:
+**
+** gcSHADER * Binary
+** Pointer to a variable receiving the pointer to a gcSHADER object
+** containg the compiled shader code.
+**
+** gctSTRING * Log
+** Pointer to a variable receiving a string pointer containging the
+** compile log.
+*/
+gceSTATUS
+gcCompileShader(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ IN gctSIZE_T SourceSize,
+ IN gctCONST_STRING Source,
+ OUT gcSHADER * Binary,
+ OUT gctSTRING * Log
+ );
+
+/*******************************************************************************
+** gcOptimizeShader
+********************************************************************************
+**
+** Optimize a shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object holding information about the compiled
+** shader.
+**
+** gctFILE LogFile
+** Pointer to an open FILE object.
+*/
+gceSTATUS
+gcOptimizeShader(
+ IN gcSHADER Shader,
+ IN gctFILE LogFile
+ );
+
+/*******************************************************************************
+** gcLinkShaders
+********************************************************************************
+**
+** Link two shaders and generate a harwdare specific state buffer by compiling
+** the compiler generated code through the resource allocator and code
+** generator.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to a gcSHADER object holding information about the compiled
+** vertex shader.
+**
+** gcSHADER FragmentShader
+** Pointer to a gcSHADER object holding information about the compiled
+** fragment shader.
+**
+** gceSHADER_FLAGS Flags
+** Compiler flags. Can be any of the following:
+**
+** gcvSHADER_DEAD_CODE - Dead code elimination.
+** gcvSHADER_RESOURCE_USAGE - Resource usage optimizaion.
+** gcvSHADER_OPTIMIZER - Full optimization.
+** gcvSHADER_USE_GL_Z - Use OpenGL ES Z coordinate.
+** gcvSHADER_USE_GL_POSITION - Use OpenGL ES gl_Position.
+** gcvSHADER_USE_GL_FACE - Use OpenGL ES gl_FaceForward.
+**
+** OUTPUT:
+**
+** gctSIZE_T * StateBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'StateBuffer'.
+**
+** gctPOINTER * StateBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLinkShaders(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gceSHADER_FLAGS Flags,
+ OUT gctSIZE_T * StateBufferSize,
+ OUT gctPOINTER * StateBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+/*******************************************************************************
+** gcLoadShaders
+********************************************************************************
+**
+** Load a pre-compiled and pre-linked shader program into the hardware.
+**
+** INPUT:
+**
+** gcoHAL Hal
+** Pointer to a gcoHAL object.
+**
+** gctSIZE_T StateBufferSize
+** The number of bytes in the 'StateBuffer'.
+**
+** gctPOINTER StateBuffer
+** Pointer to the states that make up the shader program.
+**
+** gcsHINT_PTR Hints
+** Pointer to a gcsHINT structure that contains information required
+** when loading the shader states.
+**
+** gcePRIMITIVE PrimitiveType
+** Primitive type to be rendered.
+*/
+gceSTATUS
+gcLoadShaders(
+ IN gcoHAL Hal,
+ IN gctSIZE_T StateBufferSize,
+ IN gctPOINTER StateBuffer,
+ IN gcsHINT_PTR Hints,
+ IN gcePRIMITIVE PrimitiveType
+ );
+
+/*******************************************************************************
+** gcSaveProgram
+********************************************************************************
+**
+** Save pre-compiled shaders and pre-linked programs to a binary file.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to vertex shader object.
+**
+** gcSHADER FragmentShader
+** Pointer to fragment shader object.
+**
+** gctSIZE_T ProgramBufferSize
+** Number of bytes in 'ProgramBuffer'.
+**
+** gctPOINTER ProgramBuffer
+** Pointer to buffer containing the program states.
+**
+** gcsHINT_PTR Hints
+** Pointer to HINTS structure for program states.
+**
+** OUTPUT:
+**
+** gctPOINTER * Binary
+** Pointer to a variable receiving the binary data to be saved.
+**
+** gctSIZE_T * BinarySize
+** Pointer to a variable receiving the number of bytes inside 'Binary'.
+*/
+gceSTATUS
+gcSaveProgram(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gctSIZE_T ProgramBufferSize,
+ IN gctPOINTER ProgramBuffer,
+ IN gcsHINT_PTR Hints,
+ OUT gctPOINTER * Binary,
+ OUT gctSIZE_T * BinarySize
+ );
+
+/*******************************************************************************
+** gcLoadProgram
+********************************************************************************
+**
+** Load pre-compiled shaders and pre-linked programs from a binary file.
+**
+** INPUT:
+**
+** gctPOINTER Binary
+** Pointer to the binary data loaded.
+**
+** gctSIZE_T BinarySize
+** Number of bytes in 'Binary'.
+**
+** OUTPUT:
+**
+** gcSHADER * VertexShader
+** Pointer to a variable receiving the vertex shader object.
+**
+** gcSHADER * FragmentShader
+** Pointer to a variable receiving the fragment shader object.
+**
+** gctSIZE_T * ProgramBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'ProgramBuffer'.
+**
+** gctPOINTER * ProgramBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLoadProgram(
+ IN gctPOINTER Binary,
+ IN gctSIZE_T BinarySize,
+ OUT gcSHADER * VertexShader,
+ OUT gcSHADER * FragmentShader,
+ OUT gctSIZE_T * ProgramBufferSize,
+ OUT gctPOINTER * ProgramBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_compiler_h_ */
+
diff --git a/src/include_dove_old/gc_hal_driver.h b/src/include_dove_old/gc_hal_driver.h
new file mode 100644
index 0000000..1a58506
--- /dev/null
+++ b/src/include_dove_old/gc_hal_driver.h
@@ -0,0 +1,634 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public Lisence for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_driver_h_
+#define __gc_hal_driver_h_
+
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* I/O Control Codes ******************************
+\******************************************************************************/
+
+#define gcvHAL_CLASS "galcore"
+#define IOCTL_GCHAL_INTERFACE 30000
+#define IOCTL_GCHAL_KERNEL_INTERFACE 30001
+#define IOCTL_GCHAL_TERMINATE 30002
+
+/******************************************************************************\
+********************************* Command Codes ********************************
+\******************************************************************************/
+
+typedef enum _gceHAL_COMMAND_CODES
+{
+ /* Generic query. */
+ gcvHAL_QUERY_VIDEO_MEMORY,
+ gcvHAL_QUERY_CHIP_IDENTITY,
+
+ /* Contiguous memory. */
+ gcvHAL_ALLOCATE_NON_PAGED_MEMORY,
+ gcvHAL_FREE_NON_PAGED_MEMORY,
+ gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY,
+ gcvHAL_FREE_CONTIGUOUS_MEMORY,
+
+ /* Video memory allocation. */
+ gcvHAL_ALLOCATE_VIDEO_MEMORY, /* Enforced alignment. */
+ gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY, /* No alignment. */
+ gcvHAL_FREE_VIDEO_MEMORY,
+
+ /* Physical-to-logical mapping. */
+ gcvHAL_MAP_MEMORY,
+ gcvHAL_UNMAP_MEMORY,
+
+ /* Logical-to-physical mapping. */
+ gcvHAL_MAP_USER_MEMORY,
+ gcvHAL_UNMAP_USER_MEMORY,
+
+ /* Surface lock/unlock. */
+ gcvHAL_LOCK_VIDEO_MEMORY,
+ gcvHAL_UNLOCK_VIDEO_MEMORY,
+
+ /* Event queue. */
+ gcvHAL_EVENT_COMMIT,
+
+ gcvHAL_USER_SIGNAL,
+ gcvHAL_SIGNAL,
+ gcvHAL_WRITE_DATA,
+
+ gcvHAL_COMMIT,
+ gcvHAL_STALL,
+
+ gcvHAL_READ_REGISTER,
+ gcvHAL_WRITE_REGISTER,
+
+ gcvHAL_GET_PROFILE_SETTING,
+ gcvHAL_SET_PROFILE_SETTING,
+
+ gcvHAL_READ_ALL_PROFILE_REGISTERS,
+ gcvHAL_PROFILE_REGISTERS_2D,
+
+ /* Power management. */
+ gcvHAL_SET_POWER_MANAGEMENT_STATE,
+ gcvHAL_QUERY_POWER_MANAGEMENT_STATE,
+
+ gcvHAL_GET_BASE_ADDRESS,
+
+ gcvHAL_SET_IDLE,
+
+ /* Queries. */
+ gcvHAL_QUERY_KERNEL_SETTINGS,
+
+ /* Reset. */
+ gcvHAL_RESET,
+
+ /* Map physical address into handle. */
+ gcvHAL_MAP_PHYSICAL,
+
+ /* Debugger stuff. */
+ gcvHAL_DEBUG,
+
+ /* Cache stuff. */
+ gcvHAL_CACHE,
+}
+gceHAL_COMMAND_CODES;
+
+/******************************************************************************\
+****************************** Interface Structure *****************************
+\******************************************************************************/
+
+#define gcdMAX_PROFILE_FILE_NAME 128
+
+typedef struct _gcsHAL_INTERFACE
+{
+ /* Command code. */
+ gceHAL_COMMAND_CODES command;
+
+ /* Status value. */
+ gceSTATUS status;
+
+ /* Handle to this interface channel. */
+ gctHANDLE handle;
+
+ /* Pid of the client. */
+ gctUINT32 pid;
+
+ /* Union of command structures. */
+ union _u
+ {
+ /* gcvHAL_GET_BASE_ADDRESS */
+ struct _gcsHAL_GET_BASE_ADDRESS
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctUINT32 baseAddress;
+ }
+ GetBaseAddress;
+
+ /* gcvHAL_QUERY_VIDEO_MEMORY */
+ struct _gcsHAL_QUERY_VIDEO_MEMORY
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctPHYS_ADDR internalPhysical;
+
+ /* Size in bytes of internal memory.*/
+ OUT gctSIZE_T internalSize;
+
+ /* Physical memory address of external memory. */
+ OUT gctPHYS_ADDR externalPhysical;
+
+ /* Size in bytes of external memory.*/
+ OUT gctSIZE_T externalSize;
+
+ /* Physical memory address of contiguous memory. */
+ OUT gctPHYS_ADDR contiguousPhysical;
+
+ /* Size in bytes of contiguous memory.*/
+ OUT gctSIZE_T contiguousSize;
+ }
+ QueryVideoMemory;
+
+ /* gcvHAL_QUERY_CHIP_IDENTITY */
+ struct _gcsHAL_QUERY_CHIP_IDENTITY
+ {
+
+ /* Chip model. */
+ OUT gceCHIPMODEL chipModel;
+
+ /* Revision value.*/
+ OUT gctUINT32 chipRevision;
+
+ /* Supported feature fields. */
+ OUT gctUINT32 chipFeatures;
+
+ /* Supported minor feature fields. */
+ OUT gctUINT32 chipMinorFeatures;
+
+ /* Supported minor feature 1 fields. */
+ OUT gctUINT32 chipMinorFeatures1;
+
+ /* Number of streams supported. */
+ OUT gctUINT32 streamCount;
+
+ /* Total number of temporary registers per thread. */
+ OUT gctUINT32 registerMax;
+
+ /* Maximum number of threads. */
+ OUT gctUINT32 threadCount;
+
+ /* Number of shader cores. */
+ OUT gctUINT32 shaderCoreCount;
+
+ /* Size of the vertex cache. */
+ OUT gctUINT32 vertexCacheSize;
+
+ /* Number of entries in the vertex output buffer. */
+ OUT gctUINT32 vertexOutputBufferSize;
+ }
+ QueryChipIdentity;
+
+ /* gcvHAL_MAP_MEMORY */
+ struct _gcsHAL_MAP_MEMORY
+ {
+ /* Physical memory address to map. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to map. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory. */
+ OUT gctPOINTER logical;
+ }
+ MapMemory;
+
+ /* gcvHAL_UNMAP_MEMORY */
+ struct _gcsHAL_UNMAP_MEMORY
+ {
+ /* Physical memory address to unmap. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to unmap. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory to unmap. */
+ IN gctPOINTER logical;
+ }
+ UnmapMemory;
+
+ /* gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_LINEAR_VIDEO_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctUINT bytes;
+
+ /* Buffer alignment. */
+ IN gctUINT alignment;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateLinearVideoMemory;
+
+ /* gcvHAL_ALLOCATE_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_VIDEO_MEMORY
+ {
+ /* Width of rectangle to allocate. */
+ IN OUT gctUINT width;
+
+ /* Height of rectangle to allocate. */
+ IN OUT gctUINT height;
+
+ /* Depth of rectangle to allocate. */
+ IN gctUINT depth;
+
+ /* Format rectangle to allocate in gceSURF_FORMAT. */
+ IN gceSURF_FORMAT format;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateVideoMemory;
+
+ /* gcvHAL_FREE_VIDEO_MEMORY */
+ struct _gcsHAL_FREE_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+#ifdef __QNXNTO__
+/* TODO: This is part of the unlock - why is it here? */
+ /* Mapped logical address to unmap in user space. */
+ OUT gctPOINTER memory;
+
+ /* Number of bytes to allocated. */
+ OUT gctSIZE_T bytes;
+#endif
+ }
+ FreeVideoMemory;
+
+ /* gcvHAL_LOCK_VIDEO_MEMORY */
+ struct _gcsHAL_LOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Hardware specific address. */
+ OUT gctUINT32 address;
+
+ /* Mapped logical address. */
+ OUT gctPOINTER memory;
+ }
+ LockVideoMemory;
+
+ /* gcvHAL_UNLOCK_VIDEO_MEMORY */
+ struct _gcsHAL_UNLOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Type of surface. */
+ IN gceSURF_TYPE type;
+
+ /* Flag to unlock surface asynchroneously. */
+ IN OUT gctBOOL asynchroneous;
+ }
+ UnlockVideoMemory;
+
+ /* gcvHAL_ALLOCATE_NON_PAGED_MEMORY */
+ struct _gcsHAL_ALLOCATE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT gctPOINTER logical;
+ }
+ AllocateNonPagedMemory;
+
+ /* gcvHAL_FREE_NON_PAGED_MEMORY */
+ struct _gcsHAL_FREE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+ }
+ FreeNonPagedMemory;
+
+ /* gcvHAL_EVENT_COMMIT. */
+ struct _gcsHAL_EVENT_COMMIT
+ {
+ /* Event queue. */
+ IN struct _gcsQUEUE * queue;
+ }
+ Event;
+
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_COMMIT
+ {
+ /* Command buffer. */
+ IN gcoCMDBUF commandBuffer;
+
+ /* Context buffer. */
+ IN gcoCONTEXT contextBuffer;
+
+ /* Process handle. */
+ IN gctHANDLE process;
+ }
+ Commit;
+
+ /* gcvHAL_MAP_USER_MEMORY */
+ struct _gcsHAL_MAP_USER_MEMORY
+ {
+ /* Base address of user memory to map. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to map. */
+ IN gctSIZE_T size;
+
+ /* Info record required by gcvHAL_UNMAP_USER_MEMORY. */
+ OUT gctPOINTER info;
+
+ /* Physical address of mapped memory. */
+ OUT gctUINT32 address;
+ }
+ MapUserMemory;
+
+ /* gcvHAL_UNMAP_USER_MEMORY */
+ struct _gcsHAL_UNMAP_USER_MEMORY
+ {
+ /* Base address of user memory to unmap. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to unmap. */
+ IN gctSIZE_T size;
+
+ /* Info record returned by gcvHAL_MAP_USER_MEMORY. */
+ IN gctPOINTER info;
+
+ /* Physical address of mapped memory as returned by
+ gcvHAL_MAP_USER_MEMORY. */
+ IN gctUINT32 address;
+ }
+ UnmapUserMemory;
+
+#if !USE_NEW_LINUX_SIGNAL
+ /* gcsHAL_USER_SIGNAL */
+ struct _gcsHAL_USER_SIGNAL
+ {
+ /* Command. */
+ gceUSER_SIGNAL_COMMAND_CODES command;
+
+ /* Signal ID. */
+ IN OUT gctINT id;
+
+ /* Reset mode. */
+ IN gctBOOL manualReset;
+
+ /* Wait timedout. */
+ IN gctUINT32 wait;
+
+ /* State. */
+ IN gctBOOL state;
+ }
+ UserSignal;
+#endif
+
+ /* gcvHAL_SIGNAL. */
+ struct _gcsHAL_SIGNAL
+ {
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+
+ /* Reserved. */
+ IN gctSIGNAL auxSignal;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+#if defined(__QNXNTO__)
+ /* Client pulse side-channel connection ID. Set by client in gcoOS_CreateSignal. */
+ IN gctINT32 coid;
+
+ /* Set by server. */
+ IN gctINT32 rcvid;
+#endif
+ /* Event generated from where of pipeline */
+ IN gceKERNEL_WHERE fromWhere;
+ }
+ Signal;
+
+ /* gcvHAL_WRITE_DATA. */
+ struct _gcsHAL_WRITE_DATA
+ {
+ /* Address to write data to. */
+ IN gctUINT32 address;
+
+ IN gctPOINTER kernelAddress;
+ /* Data to write. */
+ IN gctUINT32 data;
+ }
+ WriteData;
+
+ /* gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_ALLOCATE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT gctPOINTER logical;
+
+ }
+ AllocateContiguousMemory;
+
+ /* gcvHAL_FREE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_FREE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+ }
+ FreeContiguousMemory;
+
+ /* gcvHAL_READ_REGISTER */
+ struct _gcsHAL_READ_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ OUT gctUINT32 data;
+ }
+ ReadRegisterData;
+
+ /* gcvHAL_WRITE_REGISTER */
+ struct _gcsHAL_WRITE_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ IN gctUINT32 data;
+ }
+ WriteRegisterData;
+
+ /* gcvHAL_GET_PROFILE_SETTING */
+ struct _gcsHAL_GET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ OUT gctBOOL enable;
+
+ /* The profile file name */
+ OUT gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ GetProfileSetting;
+
+ /* gcvHAL_SET_PROFILE_SETTING */
+ struct _gcsHAL_SET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ IN gctBOOL enable;
+
+ /* The profile file name */
+ IN gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ SetProfileSetting;
+
+ /* gcvHAL_READ_ALL_PROFILE_REGISTERS */
+ struct _gcsHAL_READ_ALL_PROFILE_REGISTERS
+ {
+ /* Data read. */
+ OUT gcsPROFILER_COUNTERS counters;
+ }
+ RegisterProfileData;
+
+ /* gcvHAL_PROFILE_REGISTERS_2D */
+ struct _gcsHAL_PROFILE_REGISTERS_2D
+ {
+ /* Data read. */
+ OUT gcs2D_PROFILE_PTR hwProfile2D;
+ }
+ RegisterProfileData2D;
+
+ /* Power management. */
+ /* gcvHAL_SET_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_SET_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ IN gceCHIPPOWERSTATE state;
+ }
+ SetPowerManagement;
+
+ /* gcvHAL_QUERY_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_QUERY_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ OUT gceCHIPPOWERSTATE state;
+
+ /* Idle query. */
+ OUT gctBOOL isIdle;
+ }
+ QueryPowerManagement;
+
+ /* gcvHAL_QUERY_KERNEL_SETTINGS */
+ struct _gcsHAL_QUERY_KERNEL_SETTINGS
+ {
+ /* Settings.*/
+ OUT gcsKERNEL_SETTINGS settings;
+ }
+ QueryKernelSettings;
+
+ /* gcvHAL_MAP_PHYSICAL */
+ struct _gcsHAL_MAP_PHYSICAL
+ {
+ /* gcvTRUE to map, gcvFALSE to unmap. */
+ IN gctBOOL map;
+
+ /* Physical address. */
+ IN OUT gctPHYS_ADDR physical;
+ }
+ MapPhysical;
+
+ /* gcvHAL_DEBUG */
+ struct _gcsHAL_DEBUG
+ {
+ /* If gcvTRUE, set the debug information. */
+ IN gctBOOL set;
+ IN gctUINT32 level;
+ IN gctUINT32 zones;
+ IN gctBOOL enable;
+
+ /* Message to print if not empty. */
+ IN gctCHAR message[80];
+ }
+ Debug;
+
+ struct _gcsHAL_CACHE
+ {
+ IN gctBOOL invalidate;
+ IN gctHANDLE process;
+ IN gctPOINTER logical;
+ IN gctSIZE_T bytes;
+ }
+ Cache;
+ }
+ u;
+}
+gcsHAL_INTERFACE;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_driver_h_ */
+
diff --git a/src/include_dove_old/gc_hal_dump.h b/src/include_dove_old/gc_hal_dump.h
new file mode 100644
index 0000000..0975c5e
--- /dev/null
+++ b/src/include_dove_old/gc_hal_dump.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public Lisence for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_dump_h_
+#define __gc_hal_dump_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** FILE LAYOUT:
+**
+** gcsDUMP_FILE structure
+**
+** gcsDUMP_DATA frame
+** gcsDUMP_DATA or gcDUMP_DATA_SIZE records rendingring the frame
+** gctUINT8 data[length]
+*/
+
+#define gcvDUMP_FILE_SIGNATURE gcmCC('g','c','D','B')
+
+typedef struct _gcsDUMP_FILE
+{
+ gctUINT32 signature; /* File signature */
+ gctSIZE_T length; /* Length of file */
+ gctUINT32 frames; /* Number of frames in file */
+}
+gcsDUMP_FILE;
+
+typedef enum _gceDUMP_TAG
+{
+ gcvTAG_SURFACE = gcmCC('s','u','r','f'),
+ gcvTAG_FRAME = gcmCC('f','r','m',' '),
+ gcvTAG_COMMAND = gcmCC('c','m','d',' '),
+ gcvTAG_INDEX = gcmCC('i','n','d','x'),
+ gcvTAG_STREAM = gcmCC('s','t','r','m'),
+ gcvTAG_TEXTURE = gcmCC('t','e','x','t'),
+ gcvTAG_RENDER_TARGET = gcmCC('r','n','d','r'),
+ gcvTAG_DEPTH = gcmCC('z','b','u','f'),
+ gcvTAG_RESOLVE = gcmCC('r','s','l','v'),
+ gcvTAG_DELETE = gcmCC('d','e','l',' '),
+}
+gceDUMP_TAG;
+
+typedef struct _gcsDUMP_SURFACE
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctUINT32 address; /* Address of the surface. */
+ gctINT16 width; /* Width of surface. */
+ gctINT16 height; /* Height of surface. */
+ gceSURF_FORMAT format; /* Surface pixel format. */
+ gctSIZE_T length; /* Number of bytes inside the surface. */
+}
+gcsDUMP_SURFACE;
+
+typedef struct _gcsDUMP_DATA
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctSIZE_T length; /* Number of bytes of data. */
+ gctUINT32 address; /* Address for the data. */
+}
+gcsDUMP_DATA;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_dump_h_ */
+
diff --git a/src/include_dove_old/gc_hal_engine.h b/src/include_dove_old/gc_hal_engine.h
new file mode 100644
index 0000000..45b386d
--- /dev/null
+++ b/src/include_dove_old/gc_hal_engine.h
@@ -0,0 +1,1593 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public Lisence for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_engine_h_
+#define __gc_hal_engine_h_
+
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoSTREAM * gcoSTREAM;
+typedef struct _gcoVERTEX * gcoVERTEX;
+typedef struct _gcoTEXTURE * gcoTEXTURE;
+typedef struct _gcoINDEX * gcoINDEX;
+typedef struct _gcsVERTEX_ATTRIBUTES * gcsVERTEX_ATTRIBUTES_PTR;
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+/* Shading format. */
+typedef enum _gceSHADING
+{
+ gcvSHADING_SMOOTH,
+ gcvSHADING_FLAT_D3D,
+ gcvSHADING_FLAT_OPENGL,
+}
+gceSHADING;
+
+/* Culling modes. */
+typedef enum _gceCULL
+{
+ gcvCULL_NONE,
+ gcvCULL_CCW,
+ gcvCULL_CW,
+}
+gceCULL;
+
+/* Fill modes. */
+typedef enum _gceFILL
+{
+ gcvFILL_POINT,
+ gcvFILL_WIRE_FRAME,
+ gcvFILL_SOLID,
+}
+gceFILL;
+
+/* Compare modes. */
+typedef enum _gceCOMPARE
+{
+ gcvCOMPARE_NEVER,
+ gcvCOMPARE_NOT_EQUAL,
+ gcvCOMPARE_LESS,
+ gcvCOMPARE_LESS_OR_EQUAL,
+ gcvCOMPARE_EQUAL,
+ gcvCOMPARE_GREATER,
+ gcvCOMPARE_GREATER_OR_EQUAL,
+ gcvCOMPARE_ALWAYS,
+}
+gceCOMPARE;
+
+/* Stencil modes. */
+typedef enum _gceSTENCIL_MODE
+{
+ gcvSTENCIL_NONE,
+ gcvSTENCIL_SINGLE_SIDED,
+ gcvSTENCIL_DOUBLE_SIDED,
+}
+gceSTENCIL_MODE;
+
+/* Stencil operations. */
+typedef enum _gceSTENCIL_OPERATION
+{
+ gcvSTENCIL_KEEP,
+ gcvSTENCIL_REPLACE,
+ gcvSTENCIL_ZERO,
+ gcvSTENCIL_INVERT,
+ gcvSTENCIL_INCREMENT,
+ gcvSTENCIL_DECREMENT,
+ gcvSTENCIL_INCREMENT_SATURATE,
+ gcvSTENCIL_DECREMENT_SATURATE,
+}
+gceSTENCIL_OPERATION;
+
+/* Stencil selection. */
+typedef enum _gceSTENCIL_WHERE
+{
+ gcvSTENCIL_FRONT,
+ gcvSTENCIL_BACK,
+}
+gceSTENCIL_WHERE;
+
+/* Texture addressing selection. */
+typedef enum _gceTEXTURE_WHICH
+{
+ gcvTEXTURE_S,
+ gcvTEXTURE_T,
+ gcvTEXTURE_R,
+}
+gceTEXTURE_WHICH;
+
+/* Texture addressing modes. */
+typedef enum _gceTEXTURE_ADDRESSING
+{
+ gcvTEXTURE_WRAP,
+ gcvTEXTURE_CLAMP,
+ gcvTEXTURE_BORDER,
+ gcvTEXTURE_MIRROR,
+ gcvTEXTURE_MIRROR_ONCE,
+}
+gceTEXTURE_ADDRESSING;
+
+/* Texture filters. */
+typedef enum _gceTEXTURE_FILTER
+{
+ gcvTEXTURE_NONE,
+ gcvTEXTURE_POINT,
+ gcvTEXTURE_LINEAR,
+ gcvTEXTURE_ANISOTROPIC,
+}
+gceTEXTURE_FILTER;
+
+/* Primitive types. */
+typedef enum _gcePRIMITIVE
+{
+ gcvPRIMITIVE_POINT_LIST,
+ gcvPRIMITIVE_LINE_LIST,
+ gcvPRIMITIVE_LINE_STRIP,
+ gcvPRIMITIVE_LINE_LOOP,
+ gcvPRIMITIVE_TRIANGLE_LIST,
+ gcvPRIMITIVE_TRIANGLE_STRIP,
+ gcvPRIMITIVE_TRIANGLE_FAN,
+}
+gcePRIMITIVE;
+
+/* Index types. */
+typedef enum _gceINDEX_TYPE
+{
+ gcvINDEX_8,
+ gcvINDEX_16,
+ gcvINDEX_32,
+}
+gceINDEX_TYPE;
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Query the target capabilities. */
+gceSTATUS
+gcoHAL_QueryTargetCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MultiTargetCount,
+ OUT gctUINT * MaxSamples
+ );
+
+gceSTATUS
+gcoHAL_SetDepthOnly(
+ IN gcoHAL Hal,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoHAL_QueryShaderCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * VertexUniforms,
+ OUT gctUINT * FragmentUniforms,
+ OUT gctUINT * Varyings
+ );
+
+gceSTATUS
+gcoHAL_QueryTextureCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoHAL_QueryStreamCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT32 * MaxAttributes,
+ OUT gctUINT32 * MaxStreamSize,
+ OUT gctUINT32 * NumberOfStreams,
+ OUT gctUINT32 * Alignment
+ );
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*--------------------------------- gcoSURF 3D --------------------------------*/
+
+/* Copy surface. */
+gceSTATUS
+gcoSURF_Copy(
+ IN gcoSURF Surface,
+ IN gcoSURF Source
+ );
+
+/* Clear surface. */
+gceSTATUS
+gcoSURF_Clear(
+ IN gcoSURF Surface,
+ IN gctUINT Flags
+ );
+
+/* Set number of samples for a gcoSURF object. */
+gceSTATUS
+gcoSURF_SetSamples(
+ IN gcoSURF Surface,
+ IN gctUINT Samples
+ );
+
+/* Get the number of samples per pixel. */
+gceSTATUS
+gcoSURF_GetSamples(
+ IN gcoSURF Surface,
+ OUT gctUINT_PTR Samples
+ );
+
+/* Clear rectangular surface. */
+gceSTATUS
+gcoSURF_ClearRect(
+ IN gcoSURF Surface,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctUINT Flags
+ );
+
+/* TO BE REMOVED */
+#if 1
+ gceSTATUS
+ depr_gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight
+ );
+
+ gceSTATUS
+ depr_gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+#endif
+
+/* Resample surface. */
+gceSTATUS
+gcoSURF_Resample(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Resolve surface. */
+gceSTATUS
+gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Resolve rectangular area of a surface. */
+gceSTATUS
+gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Set surface resolvability. */
+gceSTATUS
+gcoSURF_SetResolvability(
+ IN gcoSURF Surface,
+ IN gctBOOL Resolvable
+ );
+
+/******************************************************************************\
+******************************** gcoINDEX Object *******************************
+\******************************************************************************/
+
+/* Construct a new gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoINDEX * Index
+ );
+
+/* Destroy a gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Destroy(
+ IN gcoINDEX Index
+ );
+
+/* Lock index in memory. */
+gceSTATUS
+gcoINDEX_Lock(
+ IN gcoINDEX Index,
+ OUT gctUINT32 * Address,
+ OUT gctPOINTER * Memory
+ );
+
+/* Unlock index that was previously locked with gcoINDEX_Lock. */
+gceSTATUS
+gcoINDEX_Unlock(
+ IN gcoINDEX Index
+ );
+
+/* Upload index data into the memory. */
+gceSTATUS
+gcoINDEX_Load(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE IndexType,
+ IN gctUINT32 IndexCount,
+ IN gctPOINTER IndexBuffer
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_Bind(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_BindOffset(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset
+ );
+
+/* Free existing index buffer. */
+gceSTATUS
+gcoINDEX_Free(
+ IN gcoINDEX Index
+ );
+
+/* Upload data into an index buffer. */
+gceSTATUS
+gcoINDEX_Upload(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/* Upload data into an index buffer starting at an offset. */
+gceSTATUS
+gcoINDEX_UploadOffset(
+ IN gcoINDEX Index,
+ IN gctUINT32 Offset,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/* Query the index capabilities. */
+gceSTATUS
+gcoINDEX_QueryCaps(
+ OUT gctBOOL * Index8,
+ OUT gctBOOL * Index16,
+ OUT gctBOOL * Index32,
+ OUT gctUINT * MaxIndex
+ );
+
+gceSTATUS
+gcoIndex_CopyFakeIndex(
+ IN gcoINDEX index,
+ IN gctUINT8_PTR logic,
+ IN gctUINT32 physical,
+ IN gctUINT32 offset,
+ IN gctUINT32 size);
+
+/* Determine the index range in the current index buffer. */
+gceSTATUS
+gcoINDEX_GetIndexRange(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Count,
+ OUT gctUINT32 * MinimumIndex,
+ OUT gctUINT32 * MaximumIndex
+ );
+
+/* Dynamic buffer management. */
+gceSTATUS
+gcoINDEX_SetDynamic(
+ IN gcoINDEX Index,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+gceSTATUS
+gcoINDEX_UploadDynamic(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+********************************** gco3D Object *********************************
+\******************************************************************************/
+
+/* Clear flags. */
+typedef enum _gceCLEAR
+{
+ gcvCLEAR_COLOR = 0x1,
+ gcvCLEAR_DEPTH = 0x2,
+ gcvCLEAR_STENCIL = 0x4,
+ gcvCLEAR_HZ = 0x8,
+ gcvCLEAR_HAS_VAA = 0x10,
+}
+gceCLEAR;
+
+/* Blending targets. */
+typedef enum _gceBLEND_UNIT
+{
+ gcvBLEND_SOURCE,
+ gcvBLEND_TARGET,
+}
+gceBLEND_UNIT;
+
+/* Construct a new gco3D object. */
+gceSTATUS
+gco3D_Construct(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+/* Destroy an gco3D object. */
+gceSTATUS
+gco3D_Destroy(
+ IN gco3D Engine
+ );
+
+/* Set 3D API type. */
+gceSTATUS
+gco3D_SetAPI(
+ IN gco3D Engine,
+ IN gceAPI ApiType
+ );
+
+/* Set render target. */
+gceSTATUS
+gco3D_SetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset render target. */
+gceSTATUS
+gco3D_UnsetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set depth buffer. */
+gceSTATUS
+gco3D_SetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset depth buffer. */
+gceSTATUS
+gco3D_UnsetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set viewport. */
+gceSTATUS
+gco3D_SetViewport(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set scissors. */
+gceSTATUS
+gco3D_SetScissors(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set clear color. */
+gceSTATUS
+gco3D_SetClearColor(
+ IN gco3D Engine,
+ IN gctUINT8 Red,
+ IN gctUINT8 Green,
+ IN gctUINT8 Blue,
+ IN gctUINT8 Alpha
+ );
+
+/* Set fixed point clear color. */
+gceSTATUS
+gco3D_SetClearColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point clear color. */
+gceSTATUS
+gco3D_SetClearColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set fixed point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Depth
+ );
+
+/* Set floating point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthF(
+ IN gco3D Engine,
+ IN gctFLOAT Depth
+ );
+
+/* Set clear stencil. */
+gceSTATUS
+gco3D_SetClearStencil(
+ IN gco3D Engine,
+ IN gctUINT32 Stencil
+ );
+
+/* Clear a Rect sub-surface. */
+gceSTATUS
+gco3D_ClearRect(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+/* Clear surface. */
+gceSTATUS
+gco3D_Clear(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+
+/* Clear tile status. */
+gceSTATUS
+gco3D_ClearTileStatus(
+ IN gco3D Engine,
+ IN gcsSURF_INFO_PTR Surface,
+ IN gctUINT32 TileStatusAddress,
+ IN gctUINT32 Flags
+ );
+
+/* Set shading mode. */
+gceSTATUS
+gco3D_SetShading(
+ IN gco3D Engine,
+ IN gceSHADING Shading
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_EnableBlending(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set blending function. */
+gceSTATUS
+gco3D_SetBlendFunction(
+ IN gco3D Engine,
+ IN gceBLEND_UNIT Unit,
+ IN gceBLEND_FUNCTION FunctionRGB,
+ IN gceBLEND_FUNCTION FunctionAlpha
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_SetBlendMode(
+ IN gco3D Engine,
+ IN gceBLEND_MODE ModeRGB,
+ IN gceBLEND_MODE ModeAlpha
+ );
+
+/* Set blending color. */
+gceSTATUS
+gco3D_SetBlendColor(
+ IN gco3D Engine,
+ IN gctUINT Red,
+ IN gctUINT Green,
+ IN gctUINT Blue,
+ IN gctUINT Alpha
+ );
+
+/* Set fixed point blending color. */
+gceSTATUS
+gco3D_SetBlendColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point blending color. */
+gceSTATUS
+gco3D_SetBlendColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set culling mode. */
+gceSTATUS
+gco3D_SetCulling(
+ IN gco3D Engine,
+ IN gceCULL Mode
+ );
+
+/* Enable point size */
+gceSTATUS
+gco3D_SetPointSizeEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set point sprite */
+gceSTATUS
+gco3D_SetPointSprite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set fill mode. */
+gceSTATUS
+gco3D_SetFill(
+ IN gco3D Engine,
+ IN gceFILL Mode
+ );
+
+/* Set depth compare mode. */
+gceSTATUS
+gco3D_SetDepthCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Enable depth writing. */
+gceSTATUS
+gco3D_EnableDepthWrite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth mode. */
+gceSTATUS
+gco3D_SetDepthMode(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeX(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFIXED_POINT Near,
+ IN gctFIXED_POINT Far
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeF(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFLOAT Near,
+ IN gctFLOAT Far
+ );
+
+/* Set last pixel enable */
+gceSTATUS
+gco3D_SetLastPixelEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth Bias and Scale */
+gceSTATUS
+gco3D_SetDepthScaleBiasX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT DepthScale,
+ IN gctFIXED_POINT DepthBias
+ );
+
+gceSTATUS
+gco3D_SetDepthScaleBiasF(
+ IN gco3D Engine,
+ IN gctFLOAT DepthScale,
+ IN gctFLOAT DepthBias
+ );
+
+/* Enable or disable dithering. */
+gceSTATUS
+gco3D_EnableDither(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set color write enable bits. */
+gceSTATUS
+gco3D_SetColorWrite(
+ IN gco3D Engine,
+ IN gctUINT8 Enable
+ );
+
+/* Enable or disable early depth. */
+gceSTATUS
+gco3D_SetEarlyDepth(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Enable or disable depth-only mode. */
+gceSTATUS
+gco3D_SetDepthOnly(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set stencil mode. */
+gceSTATUS
+gco3D_SetStencilMode(
+ IN gco3D Engine,
+ IN gceSTENCIL_MODE Mode
+ );
+
+/* Set stencil mask. */
+gceSTATUS
+gco3D_SetStencilMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil write mask. */
+gceSTATUS
+gco3D_SetStencilWriteMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil reference. */
+gceSTATUS
+gco3D_SetStencilReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference
+ );
+
+/* Set stencil compare. */
+gceSTATUS
+gco3D_SetStencilCompare(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceCOMPARE Compare
+ );
+
+/* Set stencil operation on pass. */
+gceSTATUS
+gco3D_SetStencilPass(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on fail. */
+gceSTATUS
+gco3D_SetStencilFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on depth fail. */
+gceSTATUS
+gco3D_SetStencilDepthFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Enable or disable alpha test. */
+gceSTATUS
+gco3D_SetAlphaTest(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set alpha test compare. */
+gceSTATUS
+gco3D_SetAlphaCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Set alpha test reference in unsigned integer. */
+gceSTATUS
+gco3D_SetAlphaReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference
+ );
+
+/* Set alpha test reference in fixed point. */
+gceSTATUS
+gco3D_SetAlphaReferenceX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Reference
+ );
+
+/* Set alpha test reference in floating point. */
+gceSTATUS
+gco3D_SetAlphaReferenceF(
+ IN gco3D Engine,
+ IN gctFLOAT Reference
+ );
+
+/* Enable/Disable anti-alias line. */
+gceSTATUS
+gco3D_SetAntiAliasLine(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set texture slot for anti-alias line. */
+gceSTATUS
+gco3D_SetAALineTexSlot(
+ IN gco3D Engine,
+ IN gctUINT TexSlot
+ );
+
+/* Set anti-alias line width scale. */
+gceSTATUS
+gco3D_SetAALineWidth(
+ IN gco3D Engine,
+ IN gctFLOAT Width
+ );
+
+/* Draw a number of primitives. */
+gceSTATUS
+gco3D_DrawPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT StartVertex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of primitives using offsets. */
+gceSTATUS
+gco3D_DrawPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives. */
+gceSTATUS
+gco3D_DrawIndexedPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT BaseVertex,
+ IN gctINT StartIndex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives using offsets. */
+gceSTATUS
+gco3D_DrawIndexedPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 BaseOffset,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Enable or disable anti-aliasing. */
+gceSTATUS
+gco3D_SetAntiAlias(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Write data into the command buffer. */
+gceSTATUS
+gco3D_WriteBuffer(
+ IN gco3D Engine,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Aligned
+ );
+
+/*Send sempahore and stall until sempahore is signalled.*/
+gceSTATUS
+gco3D_Semaphore(
+ IN gco3D Engine,
+ IN gceWHERE From,
+ IN gceWHERE To,
+ IN gceHOW How);
+
+/*Set the subpixels center .*/
+gceSTATUS
+gco3D_SetCentroids(
+ IN gco3D Engine,
+ IN gctUINT32 Index,
+ IN gctPOINTER Centroids
+ );
+/*----------------------------------------------------------------------------*/
+/*-------------------------- gco3D Fragment Processor ------------------------*/
+
+/* Set the fragment processor configuration. */
+gceSTATUS
+gco3D_SetFragmentConfiguration(
+ IN gco3D Engine,
+ IN gctBOOL ColorFromStream,
+ IN gctBOOL EnableFog,
+ IN gctBOOL EnableSmoothPoint,
+ IN gctUINT32 ClipPlanes
+ );
+
+/* Enable/disable texture stage operation. */
+gceSTATUS
+gco3D_EnableTextureStage(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL Enable
+ );
+
+/* Program the channel enable masks for the color texture function. */
+gceSTATUS
+gco3D_SetTextureColorMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the channel enable masks for the alpha texture function. */
+gceSTATUS
+gco3D_SetTextureAlphaMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the constant fragment color. */
+gceSTATUS
+gco3D_SetFragmentColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFragmentColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant fog color. */
+gceSTATUS
+gco3D_SetFogColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFogColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant texture color. */
+gceSTATUS
+gco3D_SetTetxureColorX(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetTetxureColorF(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Configure color texture function. */
+gceSTATUS
+gco3D_SetColorTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+/* Configure alpha texture function. */
+gceSTATUS
+gco3D_SetAlphaTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+
+/******************************************************************************\
+******************************* gcoTEXTURE Object *******************************
+\******************************************************************************/
+
+/* Cube faces. */
+typedef enum _gceTEXTURE_FACE
+{
+ gcvFACE_NONE,
+ gcvFACE_POSITIVE_X,
+ gcvFACE_NEGATIVE_X,
+ gcvFACE_POSITIVE_Y,
+ gcvFACE_NEGATIVE_Y,
+ gcvFACE_POSITIVE_Z,
+ gcvFACE_NEGATIVE_Z,
+}
+gceTEXTURE_FACE;
+
+/* Construct a new gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Construct(
+ IN gcoHAL Hal,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Construct a new sized gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_ConstructSized(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gctUINT MipMapCount,
+ IN gcePOOL Pool,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Destroy an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Destroy(
+ IN gcoTEXTURE Texture
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Upload(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadSub(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload compressed data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadCompressed(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get gcoSURF object for a mipmap level. */
+gceSTATUS
+gcoTEXTURE_GetMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ OUT gcoSURF * Surface
+ );
+
+/* Get gcoSURF object for a mipmap level and face offset. */
+gceSTATUS
+gcoTEXTURE_GetMipMapFace(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ OUT gcoSURF * Surface,
+ OUT gctUINT32_PTR Offset
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromClient(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromSurface(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_SetEndianHint(
+ IN gcoTEXTURE Texture,
+ IN gceENDIAN_HINT EndianHint
+ );
+
+gceSTATUS
+gcoTEXTURE_SetAddressingMode(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_WHICH Which,
+ IN gceTEXTURE_ADDRESSING Mode
+ );
+
+gceSTATUS
+gcoTEXTURE_SetBorderColor(
+ IN gcoTEXTURE Texture,
+ IN gctUINT Red,
+ IN gctUINT Green,
+ IN gctUINT Blue,
+ IN gctUINT Alpha
+ );
+
+gceSTATUS
+gcoTEXTURE_SetBorderColorX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gcoTEXTURE_SetBorderColorF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+gceSTATUS
+gcoTEXTURE_SetMinFilter(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FILTER Filter
+ );
+
+gceSTATUS
+gcoTEXTURE_SetMagFilter(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FILTER Filter
+ );
+
+gceSTATUS
+gcoTEXTURE_SetMipFilter(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FILTER Filter
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODBiasX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT Bias
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODBiasF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT Bias
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMinX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMinF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMaxX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMaxF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_Bind(
+ IN gcoTEXTURE Texture,
+ IN gctINT Sampler
+ );
+
+gceSTATUS
+gcoTEXTURE_Disable(
+ IN gcoHAL Hal,
+ IN gctINT Sampler
+ );
+
+gceSTATUS
+gcoTEXTURE_Flush(
+ IN gcoTEXTURE Texture
+ );
+
+gceSTATUS
+gcoTEXTURE_QueryCaps(
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoTEXTURE_GetClosestFormat(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT InFormat,
+ OUT gceSURF_FORMAT* OutFormat
+ );
+
+gceSTATUS
+gcoTEXTURE_RenderIntoMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsRenderable(
+ IN gcoTEXTURE Texture,
+ IN gctUINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsComplete(
+ IN gcoTEXTURE Texture,
+ IN gctINT MaxLevel
+ );
+
+/******************************************************************************\
+******************************* gcoSTREAM Object ******************************
+\******************************************************************************/
+
+typedef enum _gceVERTEX_FORMAT
+{
+ gcvVERTEX_BYTE,
+ gcvVERTEX_UNSIGNED_BYTE,
+ gcvVERTEX_SHORT,
+ gcvVERTEX_UNSIGNED_SHORT,
+ gcvVERTEX_INT,
+ gcvVERTEX_UNSIGNED_INT,
+ gcvVERTEX_FIXED,
+ gcvVERTEX_HALF,
+ gcvVERTEX_FLOAT,
+}
+gceVERTEX_FORMAT;
+
+gceSTATUS
+gcoSTREAM_Construct(
+ IN gcoHAL Hal,
+ OUT gcoSTREAM * Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Destroy(
+ IN gcoSTREAM Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Upload(
+ IN gcoSTREAM Stream,
+ IN gctCONST_POINTER Buffer,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Dynamic
+ );
+
+gceSTATUS
+gcoSTREAM_SetStride(
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoSTREAM_Lock(
+ IN gcoSTREAM Stream,
+ OUT gctPOINTER * Logical,
+ OUT gctUINT32 * Physical
+ );
+
+gceSTATUS
+gcoSTREAM_Unlock(
+ IN gcoSTREAM Stream);
+
+gceSTATUS
+gcoSTREAM_Reserve(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL bSystemCache
+ );
+
+gceSTATUS
+gcoSTREAM_GetSystemCache(
+ IN gcoSTREAM Stream,
+ OUT gctPOINTER* pSystemCache);
+
+gceSTATUS
+gcoSTREAM_GetStreamSize(
+ IN gcoSTREAM Stream,
+ OUT gctUINT32* pSize);
+
+gceSTATUS
+gcoSTREAM_ConstructReserveMemory(
+ IN gcoHAL Hal);
+
+gceSTATUS
+gcoSTREAM_DestroyReserveMemory(
+ IN gcoHAL Hal);
+
+gceSTATUS
+gcoSTREAM_GetReserveMemory(
+ IN gcoHAL Hal,
+ IN gctUINT32 requestSize,
+ IN gcoSTREAM stream,
+ IN gcoINDEX index
+ );
+
+gctBOOL
+gcoSTREAM_SignalReserveMemory(
+ IN gcoHAL Hal);
+
+gceSTATUS
+gcoSTREAM_Flush(
+ IN gcoSTREAM Stream
+ );
+
+/* Dynamic buffer API. */
+gceSTATUS
+gcoSTREAM_SetDynamic(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+typedef struct _gcsSTREAM_INFO
+{
+ gctUINT index;
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT components;
+ gctSIZE_T size;
+ gctCONST_POINTER data;
+ gctUINT stride;
+}
+gcsSTREAM_INFO, * gcsSTREAM_INFO_PTR;
+
+gceSTATUS
+gcoSTREAM_UploadDynamic(
+ IN gcoSTREAM Stream,
+ IN gctUINT VertexCount,
+ IN gctUINT InfoCount,
+ IN gcsSTREAM_INFO_PTR Info,
+ IN gcoVERTEX Vertex
+ );
+
+/******************************************************************************\
+******************************** gcoVERTEX Object ******************************
+\******************************************************************************/
+
+typedef struct _gcsVERTEX_ATTRIBUTES
+{
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT32 components;
+ gctSIZE_T size;
+ gctUINT32 stream;
+ gctUINT32 offset;
+ gctUINT32 stride;
+}
+gcsVERTEX_ATTRIBUTES;
+
+gceSTATUS
+gcoVERTEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVERTEX * Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Destroy(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Reset(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_EnableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index,
+ IN gceVERTEX_FORMAT Format,
+ IN gctBOOL Normalized,
+ IN gctUINT32 Components,
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoVERTEX_DisableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index
+ );
+
+gceSTATUS
+gcoVERTEX_Bind_fast(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 attributeCount
+ );
+
+gceSTATUS
+gcoVERTEX_Bind(
+ IN gcoVERTEX Vertex
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_engine_h_ */
+
diff --git a/src/include_dove_old/gc_hal_enum.h b/src/include_dove_old/gc_hal_enum.h
new file mode 100644
index 0000000..1510e72
--- /dev/null
+++ b/src/include_dove_old/gc_hal_enum.h
@@ -0,0 +1,534 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public Lisence for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_enum_h_
+#define __gc_hal_enum_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Chip models. */
+typedef enum _gceCHIPMODEL
+{
+ gcv300 = 0x0300,
+ gcv400 = 0x0400,
+ gcv410 = 0x0410,
+ gcv450 = 0x0450,
+ gcv500 = 0x0500,
+ gcv530 = 0x0530,
+ gcv600 = 0x0600,
+ gcv700 = 0x0700,
+ gcv800 = 0x0800,
+ gcv860 = 0x0860,
+ gcv1000 = 0x1000,
+}
+gceCHIPMODEL;
+
+/* Chip features. */
+typedef enum _gceFEATURE
+{
+ gcvFEATURE_PIPE_2D,
+ gcvFEATURE_PIPE_3D,
+ gcvFEATURE_PIPE_VG,
+ gcvFEATURE_DC,
+ gcvFEATURE_HIGH_DYNAMIC_RANGE,
+ gcvFEATURE_MODULE_CG,
+ gcvFEATURE_MIN_AREA,
+ gcvFEATURE_BUFFER_INTERLEAVING,
+ gcvFEATURE_BYTE_WRITE_2D,
+ gcvFEATURE_ENDIANNESS_CONFIG,
+ gcvFEATURE_DUAL_RETURN_BUS,
+ gcvFEATURE_DEBUG_MODE,
+ gcvFEATURE_YUY2_RENDER_TARGET,
+ gcvFEATURE_FRAGMENT_PROCESSOR,
+ gcvFEATURE_2DPE20,
+ gcvFEATURE_FAST_CLEAR,
+ gcvFEATURE_YUV420_TILER,
+ gcvFEATURE_YUY2_AVERAGING,
+ gcvFEATURE_FLIP_Y,
+ gcvFEATURE_EARLY_Z,
+ gcvFEATURE_Z_COMPRESSION,
+ gcvFEATURE_MSAA,
+ gcvFEATURE_SPECIAL_ANTI_ALIASING,
+ gcvFEATURE_SPECIAL_MSAA_LOD,
+ gcvFEATURE_422_TEXTURE_COMPRESSION,
+ gcvFEATURE_DXT_TEXTURE_COMPRESSION,
+ gcvFEATURE_ETC1_TEXTURE_COMPRESSION,
+ gcvFEATURE_CORRECT_TEXTURE_CONVERTER,
+ gcvFEATURE_TEXTURE_8K,
+ gcvFEATURE_SCALER,
+ gcvFEATURE_YUV420_SCALER,
+ gcvFEATURE_SHADER_HAS_W,
+ gcvFEATURE_SHADER_HAS_SIGN,
+ gcvFEATURE_SHADER_HAS_FLOOR,
+ gcvFEATURE_SHADER_HAS_CEIL,
+ gcvFEATURE_SHADER_HAS_SQRT,
+ gcvFEATURE_SHADER_HAS_TRIG,
+ gcvFEATURE_VAA,
+ gcvFEATURE_HZ,
+ gcvFEATURE_CORRECT_STENCIL,
+ gcvFEATURE_VG20,
+ gcvFEATURE_VG_FILTER,
+ gcvFEATURE_VG21,
+ gcvFEATURE_VG_DOUBLE_BUFFER,
+ gcvFEATURE_MC20,
+}
+gceFEATURE;
+
+/* Chip Power Status. */
+typedef enum _gceCHIPPOWERSTATE
+{
+ gcvPOWER_ON,
+ gcvPOWER_OFF,
+ gcvPOWER_IDLE,
+ gcvPOWER_SUSPEND,
+}
+gceCHIPPOWERSTATE;
+
+/* Surface types. */
+typedef enum _gceSURF_TYPE
+{
+ gcvSURF_TYPE_UNKNOWN,
+ gcvSURF_INDEX,
+ gcvSURF_VERTEX,
+ gcvSURF_TEXTURE,
+ gcvSURF_RENDER_TARGET,
+ gcvSURF_DEPTH,
+ gcvSURF_BITMAP,
+ gcvSURF_TILE_STATUS,
+ gcvSURF_MASK,
+ gcvSURF_SCISSOR,
+ gcvSURF_HIERARCHICAL_DEPTH,
+ gcvSURF_NUM_TYPES, /* Make sure this is the last one! */
+
+ /* Combinations. */
+ gcvSURF_NO_TILE_STATUS = 0x100,
+ gcvSURF_RENDER_TARGET_NO_TILE_STATUS = gcvSURF_RENDER_TARGET
+ | gcvSURF_NO_TILE_STATUS,
+ gcvSURF_DEPTH_NO_TILE_STATUS = gcvSURF_DEPTH
+ | gcvSURF_NO_TILE_STATUS,
+}
+gceSURF_TYPE;
+
+typedef enum _gceSURF_COLOR_TYPE
+{
+ gcvSURF_COLOR_UNKNOWN,
+ gcvSURF_COLOR_LINEAR = 0x01,
+ gcvSURF_COLOR_ALPHA_PRE = 0x02,
+}
+gceSURF_COLOR_TYPE;
+
+/* Rotation. */
+typedef enum _gceSURF_ROTATION
+{
+ gcvSURF_0_DEGREE,
+ gcvSURF_90_DEGREE,
+ gcvSURF_180_DEGREE,
+ gcvSURF_270_DEGREE
+}
+gceSURF_ROTATION;
+
+/* Surface formats. */
+typedef enum _gceSURF_FORMAT
+{
+ /* Unknown format. */
+ gcvSURF_UNKNOWN,
+
+ /* Palettized formats. */
+ gcvSURF_INDEX1 = 100,
+ gcvSURF_INDEX4,
+ gcvSURF_INDEX8,
+
+ /* RGB formats. */
+ gcvSURF_A2R2G2B2 = 200,
+ gcvSURF_R3G3B2,
+ gcvSURF_A8R3G3B2,
+ gcvSURF_X4R4G4B4,
+ gcvSURF_A4R4G4B4,
+ gcvSURF_R4G4B4A4,
+ gcvSURF_X1R5G5B5,
+ gcvSURF_A1R5G5B5,
+ gcvSURF_R5G5B5A1,
+ gcvSURF_R5G6B5,
+ gcvSURF_R8G8B8,
+ gcvSURF_X8R8G8B8,
+ gcvSURF_A8R8G8B8,
+ gcvSURF_R8G8B8A8,
+ gcvSURF_G8R8G8B8,
+ gcvSURF_R8G8B8G8,
+ gcvSURF_X2R10G10B10,
+ gcvSURF_A2R10G10B10,
+ gcvSURF_X12R12G12B12,
+ gcvSURF_A12R12G12B12,
+ gcvSURF_X16R16G16B16,
+ gcvSURF_A16R16G16B16,
+ gcvSURF_R8G8B8X8,
+ gcvSURF_R5G5B5X1,
+ gcvSURF_R4G4B4X4,
+
+ /* BGR formats. */
+ gcvSURF_A4B4G4R4 = 300,
+ gcvSURF_A1B5G5R5,
+ gcvSURF_B5G6R5,
+ gcvSURF_B8G8R8,
+ gcvSURF_X8B8G8R8,
+ gcvSURF_A8B8G8R8,
+ gcvSURF_A2B10G10R10,
+ gcvSURF_A16B16G16R16,
+ gcvSURF_G16R16,
+ gcvSURF_B4G4R4A4,
+ gcvSURF_B5G5R5A1,
+ gcvSURF_B8G8R8X8,
+ gcvSURF_B8G8R8A8,
+ gcvSURF_X4B4G4R4,
+ gcvSURF_X1B5G5R5,
+ gcvSURF_B4G4R4X4,
+ gcvSURF_B5G5R5X1,
+
+ /* Compressed formats. */
+ gcvSURF_DXT1 = 400,
+ gcvSURF_DXT2,
+ gcvSURF_DXT3,
+ gcvSURF_DXT4,
+ gcvSURF_DXT5,
+ gcvSURF_CXV8U8,
+ gcvSURF_ETC1,
+
+ /* YUV formats. */
+ gcvSURF_YUY2 = 500,
+ gcvSURF_UYVY,
+ gcvSURF_YV12,
+ gcvSURF_I420,
+ gcvSURF_NV12,
+ gcvSURF_NV21,
+ gcvSURF_NV16,
+ gcvSURF_NV61,
+ gcvSURF_YVYU,
+ gcvSURF_VYUY,
+
+ /* Depth formats. */
+ gcvSURF_D16 = 600,
+ gcvSURF_D24S8,
+ gcvSURF_D32,
+ gcvSURF_D24X8,
+
+ /* Alpha formats. */
+ gcvSURF_A4 = 700,
+ gcvSURF_A8,
+ gcvSURF_A12,
+ gcvSURF_A16,
+ gcvSURF_A32,
+ gcvSURF_A1,
+
+ /* Luminance formats. */
+ gcvSURF_L4 = 800,
+ gcvSURF_L8,
+ gcvSURF_L12,
+ gcvSURF_L16,
+ gcvSURF_L32,
+ gcvSURF_L1,
+
+ /* Alpha/Luminance formats. */
+ gcvSURF_A4L4 = 900,
+ gcvSURF_A2L6,
+ gcvSURF_A8L8,
+ gcvSURF_A4L12,
+ gcvSURF_A12L12,
+ gcvSURF_A16L16,
+
+ /* Bump formats. */
+ gcvSURF_L6V5U5 = 1000,
+ gcvSURF_V8U8,
+ gcvSURF_X8L8V8U8,
+ gcvSURF_Q8W8V8U8,
+ gcvSURF_A2W10V10U10,
+ gcvSURF_V16U16,
+ gcvSURF_Q16W16V16U16,
+
+ /* Floating point formats. */
+ gcvSURF_R16F = 1100,
+ gcvSURF_G16R16F,
+ gcvSURF_A16B16G16R16F,
+ gcvSURF_R32F,
+ gcvSURF_G32R32F,
+ gcvSURF_A32B32G32R32F,
+
+#if 0
+ /* FIXME: remove HDR support for now. */
+ /* HDR formats. */
+ gcvSURF_HDR7E3 = 1200,
+ gcvSURF_HDR6E4,
+ gcvSURF_HDR5E5,
+ gcvSURF_HDR6E5,
+#endif
+}
+gceSURF_FORMAT;
+
+/* Pixel swizzle modes. */
+typedef enum _gceSURF_SWIZZLE
+{
+ gcvSURF_NOSWIZZLE,
+ gcvSURF_ARGB,
+ gcvSURF_ABGR,
+ gcvSURF_RGBA,
+ gcvSURF_BGRA
+}
+gceSURF_SWIZZLE;
+
+/* Transparency modes. */
+typedef enum _gceSURF_TRANSPARENCY
+{
+ /* Valid only for PE 1.0 */
+ gcvSURF_OPAQUE,
+ gcvSURF_SOURCE_MATCH,
+ gcvSURF_SOURCE_MASK,
+ gcvSURF_PATTERN_MASK,
+}
+gceSURF_TRANSPARENCY;
+
+/* Transparency modes. */
+typedef enum _gce2D_TRANSPARENCY
+{
+ /* Valid only for PE 2.0 */
+ gcv2D_OPAQUE,
+ gcv2D_KEYED,
+ gcv2D_MASKED
+}
+gce2D_TRANSPARENCY;
+
+/* Mono packing modes. */
+typedef enum _gceSURF_MONOPACK
+{
+ gcvSURF_PACKED8,
+ gcvSURF_PACKED16,
+ gcvSURF_PACKED32,
+ gcvSURF_UNPACKED,
+}
+gceSURF_MONOPACK;
+
+/* Blending modes. */
+typedef enum _gceSURF_BLEND_MODE
+{
+ /* Porter-Duff blending modes. */
+ /* Fsrc Fdst */
+ gcvBLEND_CLEAR, /* 0 0 */
+ gcvBLEND_SRC, /* 1 0 */
+ gcvBLEND_DST, /* 0 1 */
+ gcvBLEND_SRC_OVER_DST, /* 1 1 - Asrc */
+ gcvBLEND_DST_OVER_SRC, /* 1 - Adst 1 */
+ gcvBLEND_SRC_IN_DST, /* Adst 0 */
+ gcvBLEND_DST_IN_SRC, /* 0 Asrc */
+ gcvBLEND_SRC_OUT_DST, /* 1 - Adst 0 */
+ gcvBLEND_DST_OUT_SRC, /* 0 1 - Asrc */
+ gcvBLEND_SRC_ATOP_DST, /* Adst 1 - Asrc */
+ gcvBLEND_DST_ATOP_SRC, /* 1 - Adst Asrc */
+ gcvBLEND_SRC_XOR_DST, /* 1 - Adst 1 - Asrc */
+
+ /* Special blending modes. */
+ gcvBLEND_SET, /* DST = 1 */
+ gcvBLEND_SUB /* DST = DST * (1 - SRC) */
+}
+gceSURF_BLEND_MODE;
+
+/* Per-pixel alpha modes. */
+typedef enum _gceSURF_PIXEL_ALPHA_MODE
+{
+ gcvSURF_PIXEL_ALPHA_STRAIGHT,
+ gcvSURF_PIXEL_ALPHA_INVERSED
+}
+gceSURF_PIXEL_ALPHA_MODE;
+
+/* Global alpha modes. */
+typedef enum _gceSURF_GLOBAL_ALPHA_MODE
+{
+ gcvSURF_GLOBAL_ALPHA_OFF,
+ gcvSURF_GLOBAL_ALPHA_ON,
+ gcvSURF_GLOBAL_ALPHA_SCALE
+}
+gceSURF_GLOBAL_ALPHA_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gceSURF_PIXEL_COLOR_MODE
+{
+ gcvSURF_COLOR_STRAIGHT,
+ gcvSURF_COLOR_MULTIPLY
+}
+gceSURF_PIXEL_COLOR_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_PIXEL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_COLOR_MULTIPLY_DISABLE,
+ gcv2D_COLOR_MULTIPLY_ENABLE
+}
+gce2D_PIXEL_COLOR_MULTIPLY_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_GLOBAL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_GLOBAL_COLOR_MULTIPLY_DISABLE,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_ALPHA,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_COLOR
+}
+gce2D_GLOBAL_COLOR_MULTIPLY_MODE;
+
+/* Alpha blending factor modes. */
+typedef enum _gceSURF_BLEND_FACTOR_MODE
+{
+ gcvSURF_BLEND_ZERO,
+ gcvSURF_BLEND_ONE,
+ gcvSURF_BLEND_STRAIGHT,
+ gcvSURF_BLEND_INVERSED,
+ gcvSURF_BLEND_COLOR,
+ gcvSURF_BLEND_COLOR_INVERSED,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED
+}
+gceSURF_BLEND_FACTOR_MODE;
+
+/* Alpha blending porter duff rules. */
+typedef enum _gce2D_PORTER_DUFF_RULE
+{
+ gcvPD_CLEAR,
+ gcvPD_SRC,
+ gcvPD_SRC_OVER,
+ gcvPD_DST_OVER,
+ gcvPD_SRC_IN,
+ gcvPD_DST_IN,
+ gcvPD_SRC_OUT,
+ gcvPD_DST_OUT,
+ gcvPD_SRC_ATOP,
+ gcvPD_DST_ATOP,
+ gcvPD_ADD,
+ gcvPD_XOR,
+ gcvPD_DST
+}
+gce2D_PORTER_DUFF_RULE;
+
+/* Alpha blending factor modes. */
+typedef enum _gce2D_YUV_COLOR_MODE
+{
+ gcv2D_YUV_601,
+ gcv2D_YUV_709
+}
+gce2D_YUV_COLOR_MODE;
+
+/* 2D Rotation and flipping. */
+typedef enum _gce2D_ORIENTATION
+{
+ gcv2D_0_DEGREE,
+ gcv2D_90_DEGREE,
+ gcv2D_180_DEGREE,
+ gcv2D_270_DEGREE,
+ gcv2D_X_FLIP,
+ gcv2D_Y_FLIP
+}
+gce2D_ORIENTATION;
+
+typedef enum _gce2D_COMMAND
+{
+ gcv2D_CLEAR,
+ gcv2D_LINE,
+ gcv2D_BLT,
+ gcv2D_STRETCH,
+ gcv2D_HOR_FILTER,
+ gcv2D_VER_FILTER,
+}
+gce2D_COMMAND;
+
+/* Texture functions. */
+typedef enum _gceTEXTURE_FUNCTION
+{
+ gcvTEXTURE_DUMMY = 0,
+ gcvTEXTURE_REPLACE = 0,
+ gcvTEXTURE_MODULATE,
+ gcvTEXTURE_ADD,
+ gcvTEXTURE_ADD_SIGNED,
+ gcvTEXTURE_INTERPOLATE,
+ gcvTEXTURE_SUBTRACT,
+ gcvTEXTURE_DOT3
+}
+gceTEXTURE_FUNCTION;
+
+/* Texture sources. */
+typedef enum _gceTEXTURE_SOURCE
+{
+ gcvCOLOR_FROM_TEXTURE,
+ gcvCOLOR_FROM_CONSTANT_COLOR,
+ gcvCOLOR_FROM_PRIMARY_COLOR,
+ gcvCOLOR_FROM_PREVIOUS_COLOR
+}
+gceTEXTURE_SOURCE;
+
+/* Texture source channels. */
+typedef enum _gceTEXTURE_CHANNEL
+{
+ gcvFROM_COLOR,
+ gcvFROM_ONE_MINUS_COLOR,
+ gcvFROM_ALPHA,
+ gcvFROM_ONE_MINUS_ALPHA
+}
+gceTEXTURE_CHANNEL;
+
+/* Filter types. */
+typedef enum _gceFILTER_TYPE
+{
+ gcvFILTER_SYNC,
+ gcvFILTER_BLUR,
+ gcvFILTER_USER
+}
+gceFILTER_TYPE;
+
+/* Filter pass types. */
+typedef enum _gceFILTER_PASS_TYPE
+{
+ gcvFILTER_HOR_PASS,
+ gcvFILTER_VER_PASS
+}
+gceFILTER_PASS_TYPE;
+
+/* Endian hints. */
+typedef enum _gceENDIAN_HINT
+{
+ gcvENDIAN_NO_SWAP = 0,
+ gcvENDIAN_SWAP_WORD,
+ gcvENDIAN_SWAP_DWORD,
+}
+gceENDIAN_HINT;
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoCONTEXT * gcoCONTEXT;
+typedef struct _gcoCMDBUF * gcoCMDBUF;
+typedef struct _gcoQUEUE * gcoQUEUE;
+typedef struct _gcsHAL_INTERFACE * gcsHAL_INTERFACE_PTR;
+typedef struct gcs2D_PROFILE * gcs2D_PROFILE_PTR;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_enum_h_ */
+
diff --git a/src/include_dove_old/gc_hal_mem.h b/src/include_dove_old/gc_hal_mem.h
new file mode 100644
index 0000000..f43d61e
--- /dev/null
+++ b/src/include_dove_old/gc_hal_mem.h
@@ -0,0 +1,472 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public Lisence for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+/*
+** Include file for the local memory management.
+*/
+
+#ifndef __gc_hal_mem_h_
+#define __gc_hal_mem_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+*******************************************************************************
+** Usage:
+
+ The macros to declare MemPool type and functions are
+ gcmMEM_DeclareFSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareVSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix)
+
+ The data structures for MemPool are
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+
+ The MemPool constructor and destructor functions are
+ gcfMEM_InitFSMemPool(gcsMEM_FS_MEM_POOL *, gcoOS, gctUINT, gctUINT);
+ gcfMEM_FreeFSMemPool(gcsMEM_FS_MEM_POOL *);
+ gcfMEM_InitVSMemPool(gcsMEM_VS_MEM_POOL *, gcoOS, gctUINT, gctBOOL);
+ gcfMEM_FreeVSMemPool(gcsMEM_VS_MEM_POOL *);
+ gcfMEM_InitAFSMemPool(gcsMEM_AFS_MEM_POOL *, gcoOS, gctUINT);
+ gcfMEM_FreeAFSMemPool(gcsMEM_AFS_MEM_POOL *);
+
+ FS: for Fixed-Size data structures
+ VS: for Variable-size data structures
+ AFS: for Array of Fixed-Size data structures
+
+
+ /* Example 1: For a fixed-size data structure, struct gcsNode. */
+ /* It is used locally in a file, so the functions are static without prefix. */
+ /* At top level, declear allocate and free functions. */
+ /* The first argument is the data type. */
+ /* The second armument is the short name used in the fuctions. */
+ gcmMEM_DeclareFSMemPool(struct gcsNode, Node, );
+
+ /* The previous macro creates two inline functions, */
+ /* _AllocateNode and _FreeNode. */
+
+ /* In function or struct */
+ gcsMEM_FS_MEM_POOL nodeMemPool;
+
+ /* In function, */
+ struct gcsNode * node;
+ gceSTATUS status;
+
+ /* Before using the memory pool, initialize it. */
+ /* The second argument is the gcoOS object. */
+ /* The third argument is the number of data structures to allocate for each chunk. */
+ status = gcfMEM_InitFSMemPool(&nodeMemPool, os, 100, sizeof(struct gcsNode));
+ ...
+
+ /* Allocate a node. */
+ status = _AllocateNode(nodeMemPool, &node);
+ ...
+ /* Free a node. */
+ _FreeNode(nodeMemPool, node);
+
+ /* After using the memory pool, free it. */
+ gcfMEM_FreeFSMemPool(&nodeMemPool);
+
+
+ /* Example 2: For array of fixed-size data structures, struct gcsNode. */
+ /* It is used in several files, so the functions are extern with prefix. */
+ /* At top level, declear allocate and free functions. */
+ /* The first argument is the data type, and the second one is the short name */
+ /* used in the fuctions. */
+ gcmMEM_DeclareAFSMemPool(struct gcsNode, NodeArray, gcfOpt);
+
+ /* The previous macro creates two inline functions, */
+ /* gcfOpt_AllocateNodeArray and gcfOpt_FreeNodeArray. */
+
+ /* In function or struct */
+ gcsMEM_AFS_MEM_POOL nodeArrayMemPool;
+
+ /* In function, */
+ struct gcsNode * nodeArray;
+ gceSTATUS status;
+
+ /* Before using the array memory pool, initialize it. */
+ /* The second argument is the gcoOS object, the third is the number of data */
+ /* structures to allocate for each chunk. */
+ status = gcfMEM_InitAFSMemPool(&nodeArrayMemPool, os, sizeof(struct gcsNode));
+ ...
+
+ /* Allocate a node array of size 100. */
+ status = gcfOpt_AllocateNodeArray(nodeArrayMemPool, &nodeArray, 100);
+ ...
+ /* Free a node array. */
+ gcfOpt_FreeNodeArray(&nodeArrayMemPool, nodeArray);
+
+ /* After using the array memory pool, free it. */
+ gcfMEM_FreeAFSMemPool(&nodeArrayMemPool);
+
+*******************************************************************************
+#endif
+
+/*******************************************************************************
+** To switch back to use gcoOS_Allocate and gcoOS_Free, add
+** #define USE_LOCAL_MEMORY_POOL 0
+** before including this file.
+*******************************************************************************/
+#ifndef USE_LOCAL_MEMORY_POOL
+/*
+ USE_LOCAL_MEMORY_POOL
+
+ This define enables the local memory management to improve performance.
+*/
+#define USE_LOCAL_MEMORY_POOL 1
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Structures
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+#else
+ typedef gcoOS gcsMEM_FS_MEM_POOL;
+ typedef gcoOS gcsMEM_VS_MEM_POOL;
+ typedef gcoOS gcsMEM_AFS_MEM_POOL;
+#endif
+
+/*******************************************************************************
+** Memory Pool Macros
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName##List( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * FirstPointer, \
+ Type * LastPointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolFreeAList(MemPool, (gctPOINTER) FirstPointer, (gctPOINTER) LastPointer)); \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ return(gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+ Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, size)); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcfMEM_VSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer)); \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ return(gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcfMEM_AFSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer)); \
+}
+
+#else
+
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ return(gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcoOS_Free(MemPool, Pointer)); \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ return(gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Size)); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcoOS_Free(MemPool, Pointer)); \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ return(gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcoOS_Free(MemPool, Pointer)); \
+}
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Functions
+*******************************************************************************/
+gceSTATUS
+gcfMEM_InitFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolGetANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeAList(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER FirstNode,
+ IN gctPOINTER LastNode
+ );
+
+gceSTATUS
+gcfMEM_InitVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT BlockSize,
+ IN gctBOOL RecycleFreeNode
+ );
+
+gceSTATUS
+gcfMEM_FreeVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolGetANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctUINT Size,
+ IN gctUINT Alignment,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolFreeANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_InitAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolGetANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctUINT Count,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolFreeANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_mem_h_ */
+
diff --git a/src/include_dove_old/gc_hal_options.h b/src/include_dove_old/gc_hal_options.h
new file mode 100644
index 0000000..3d23576
--- /dev/null
+++ b/src/include_dove_old/gc_hal_options.h
@@ -0,0 +1,326 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public Lisence for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_options_h_
+#define __gc_hal_options_h_
+
+/*
+ USE_NEW_LINUX_SIGNAL
+
+ This define enables the Linux kernel signaling between kernel and user.
+*/
+#ifndef USE_NEW_LINUX_SIGNAL
+# define USE_NEW_LINUX_SIGNAL 0
+#endif
+
+/*
+ NO_USER_DIRECT_ACCESS_FROM_KERNEL
+
+ This define enables the Linux kernel behavior accessing user memory.
+*/
+#ifndef NO_USER_DIRECT_ACCESS_FROM_KERNEL
+# define NO_USER_DIRECT_ACCESS_FROM_KERNEL 0
+#endif
+
+/*
+ VIVANTE_PROFILER
+
+ This define enables the profiler.
+*/
+#ifndef VIVANTE_PROFILER
+# define VIVANTE_PROFILER 0
+#endif
+
+/*
+ gcdUSE_VG
+
+ Enable VG HAL layer (only for GC350).
+*/
+#ifndef gcdUSE_VG
+# define gcdUSE_VG 0
+#endif
+
+/*
+ USE_SW_FB
+
+ Set to 1 if the frame buffer memory cannot be accessed by the GPU.
+*/
+#ifndef USE_SW_FB
+#define USE_SW_FB 0
+#endif
+
+/*
+ USE_SHADER_SYMBOL_TABLE
+
+ This define enables the symbol table in shader object.
+*/
+#define USE_SHADER_SYMBOL_TABLE 1
+
+/*
+ USE_SUPER_SAMPLING
+
+ This define enables super-sampling support.
+*/
+#define USE_SUPER_SAMPLING 0
+
+/*
+ PROFILE_HAL_COUNTERS
+
+ This define enables HAL counter profiling support.
+ HW and SHADER Counter profiling depends on this.
+*/
+#define PROFILE_HAL_COUNTERS 1
+
+/*
+ PROFILE_HW_COUNTERS
+
+ This define enables HW counter profiling support.
+*/
+#define PROFILE_HW_COUNTERS 1
+
+/*
+ PROFILE_SHADER_COUNTERS
+
+ This define enables SHADER counter profiling support.
+*/
+#define PROFILE_SHADER_COUNTERS 1
+
+/*
+ COMMAND_PROCESSOR_VERSION
+
+ The version of the command buffer and task manager.
+*/
+#define COMMAND_PROCESSOR_VERSION 1
+
+/*
+ gcdDUMP
+
+ When set to 1, a dump of all states and memory uploads, as well as other
+ hardware related execution will be printed to the debug console. This
+ data can be used for playing back applications.
+*/
+#define gcdDUMP 0
+
+/*
+ gcdDUMP_IN_KERNEL
+
+ When set to 1, all dumps will happen in the kernel. This is handy if
+ you want the kernel to dump its command buffers as well and the data
+ needs to be in sync.
+*/
+#define gcdDUMP_IN_KERNEL 0
+
+/*
+ gcdDUMP_COMMAND
+
+ When set to non-zero, the command queue will dump all incoming command
+ and context buffers as well as all other modifications to the command
+ queue.
+*/
+#define gcdDUMP_COMMAND 0
+
+/*
+ gcdNULL_DRIVER
+*/
+#define gcdNULL_DRIVER 0
+
+/*
+ gcdENABLE_TIMEOUT_DETECTION
+
+ Enable timeout detection.
+*/
+#define gcdENABLE_TIMEOUT_DETECTION 0
+
+/*
+ gcdCMD_BUFFERS
+
+ Number of command buffers to use per client. Each command buffer is 32kB in
+ size.
+*/
+#define gcdCMD_BUFFERS 2
+
+/*
+ gcdPOWER_CONTROL_DELAY
+
+ The delay in milliseconds required to wait until the GPU has woke up from a
+ suspend or power-down state. This is system dependent because the bus clock
+ also needs to be stabalize.
+*/
+#define gcdPOWER_CONTROL_DELAY 1
+
+/*
+ gcdMMU_SIZE
+
+ Size of the MMU page table in bytes. Each 4 bytes can hold 4kB worth of
+ virtual data.
+*/
+#define gcdMMU_SIZE (128 << 10)
+
+/*
+ gcdSECURE_USER
+
+ Use logical addresses instead of physical addresses in user land. In this
+ case a hint table is created for both command buffers and context buffers,
+ and that hint table will be used to patch up those buffers in the kernel
+ when they are ready to submit.
+*/
+#define gcdSECURE_USER 0
+
+/*
+ gcdSECURE_CACHE_SLOTS
+
+ Number of slots in the logical to DMA address cache table. Each time a
+ logical address needs to be translated into a DMA address for the GPU, this
+ cache will be walked. The replacement scheme is LRU.
+*/
+#define gcdSECURE_CACHE_SLOTS 64
+
+/*
+ gcdREGISTER_ACCESS_FROM_USER
+
+ Set to 1 to allow IOCTL calls to get through from user land. This should
+ only be in debug or development drops.
+*/
+#ifndef gcdREGISTER_ACCESS_FROM_USER
+# define gcdREGISTER_ACCESS_FROM_USER 1
+#endif
+
+/*
+ gcdHEAP_SIZE
+
+ Set the allocation size for the internal heaps. Each time a heap is full,
+ a new heap will be allocated with this minmimum amount of bytes. The bigger
+ this size, the fewer heaps there are to allocate, the better the
+ performance. However, heaps won't be freed until they are completely free,
+ so there might be some more memory waste if the size is too big.
+*/
+#define gcdHEAP_SIZE (64 << 10)
+/*
+ MRVL_TAVOR_PV2_DISABLE_YFLIP
+*/
+#define MRVL_TAVOR_PV2_DISABLE_YFLIP 0
+
+
+/*
+ MRVL_LOW_POWER_MODE_DEBUG
+*/
+#define MRVL_LOW_POWER_MODE_DEBUG 0
+
+/*
+ MRVL Utility Options
+*/
+#define MRVL_FORCE_MSAA_ON 0
+
+/*
+ MRVL_SWAP_BUFFER_IN_EVERY_DRAW
+
+ This define force swapbuffer after every drawElement/drawArray.
+*/
+#define MRVL_SWAP_BUFFER_IN_EVERY_DRAW 0
+
+#define MRVL_BENCH 0
+
+
+#define MRVL_EANBLE_COMPRESSION_DXT 0
+
+/* Texture coordinate generation */
+#define MRVL_TEXGEN 1
+
+/* Tex gen code from Vivante */
+#define VIVANTE_TEXGEN 0
+
+/* Swap buffer optimization */
+#define MRVL_OPTI_SWAP_BUFFER 1
+
+/* Disable swap worker thread */
+#define MRVL_DISABLE_SWAP_THREAD 1
+
+/* API log enable */
+#define MRVL_ENABLE_API_LOG 0
+#define MRVL_ENABLE_EGL_API_LOG 0
+#define MRVL_ENABLE_OES1_API_LOG 0
+#define MRVL_ENABLE_OES2_API_LOG 0
+#define MRVL_ENABLE_OVG_API_LOG 0
+
+/* Optimization for Eclair UI */
+#define MRVL_OPTI_ANDROID_IMAGE 1
+
+/* if pmem is enabled and cacheable, enable it */
+#define MRVL_CACHEABLE_PMEM 1
+
+#define MRVL_DISABLE_FASTCLEAR 0
+
+#define MRVL_OPTI_COMPOSITOR 1
+#define MRVL_OPTI_COMPOSITOR_DEBUG 0
+
+#define MRVL_OPTI_STREAM_FAST_PATH 1
+#define MRVL_OPTI_USE_RESERVE_MEMORY 1
+
+/* Enable a timer thread to check the status of GC periodically */
+#define MRVL_TIMER 0
+
+/* Enable silent reset */
+#define MRVL_SILENT_RESET 0
+
+/* Force surface format RGBA8888*/
+#define MRVL_FORCE_8888 0
+
+
+/* Preserve cmd buffer space to avoid unneeded split(then context switch */
+#define MRVL_PRESERVE_CMD_BUFFER 1
+
+/*
+ MRVL_PRINT_CMD_BUFFER
+
+ This define enable print cmd buffer and link chain code
+*/
+#define MRVL_PRINT_CMD_BUFFER 0
+
+/*
+ POWER_OFF_GC_WHEN_IDLE
+ This enable idle-power-off strategy on TD
+*/
+#define POWER_OFF_GC_WHEN_IDLE 1
+
+/*
+ Definitions for vendor, renderer and version strings
+*/
+#define _VENDOR_STRING_ "Marvell Technology Group Ltd"
+
+#define _EGL_VERSION_STRING_ "EGL 1.3 Ver0.8.0.1998";
+
+#if defined(COMMON_LITE)
+#define _OES11_VERSION_STRING_ "OpenGL ES-CL 1.1 Ver0.8.0.1998";
+#else
+#define _OES11_VERSION_STRING_ "OpenGL ES-CM 1.1 Ver0.8.0.1998";
+#endif
+
+#define _OES20_VERSION_STRING_ "OpenGL ES 2.0 Ver0.8.0.1998";
+#define _GLSL_ES_VERSION_STRING_ "OpenGL ES GLSL ES 1.00 Ver0.8.0.1998"
+
+#define _OPENVG_VERSION_STRING_ "OpenVG 1.1 Ver0.8.0.1998"
+
+#define _GAL_VERSION_STRING_ "GAL Ver0.8.0.1998"
+
+#endif /* __gc_hal_options_h_ */
+
diff --git a/src/include_dove_old/gc_hal_profiler.h b/src/include_dove_old/gc_hal_profiler.h
new file mode 100644
index 0000000..56aa40b
--- /dev/null
+++ b/src/include_dove_old/gc_hal_profiler.h
@@ -0,0 +1,232 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public Lisence for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_profiler_h_
+#define __gc_hal_profiler_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define GLVERTEX_OBJECT 10
+#define GLVERTEX_OBJECT_BYTES 11
+
+#define GLINDEX_OBJECT 20
+#define GLINDEX_OBJECT_BYTES 21
+
+#define GLTEXTURE_OBJECT 30
+#define GLTEXTURE_OBJECT_BYTES 31
+
+#if VIVANTE_PROFILER
+#define gcmPROFILE_GC(Hal, Enum, Value) gcoPROFILER_Count(Hal, Enum, Value)
+#else
+#define gcmPROFILE_GC(Hal, Enum, Value) do { } while (gcvFALSE)
+#endif
+
+/* HW profile information. */
+typedef struct _gcsPROFILER_COUNTERS
+{
+ /* HW static counters. */
+ gctUINT32 gpuClock;
+ gctUINT32 axiClock;
+ gctUINT32 shaderClock;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuClockStart;
+ gctUINT32 gpuClockEnd;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuCyclesCounter;
+ gctUINT32 gpuTotalRead64BytesPerFrame;
+ gctUINT32 gpuTotalWrite64BytesPerFrame;
+
+ /* PE */
+ gctUINT32 pe_pixel_count_killed_by_color_pipe;
+ gctUINT32 pe_pixel_count_killed_by_depth_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_color_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_depth_pipe;
+
+ /* SH */
+ gctUINT32 ps_inst_counter;
+ gctUINT32 rendered_pixel_counter;
+ gctUINT32 vs_inst_counter;
+ gctUINT32 rendered_vertice_counter;
+ gctUINT32 vtx_branch_inst_counter;
+ gctUINT32 vtx_texld_inst_counter;
+ gctUINT32 pxl_branch_inst_counter;
+ gctUINT32 pxl_texld_inst_counter;
+
+ /* PA */
+ gctUINT32 pa_input_vtx_counter;
+ gctUINT32 pa_input_prim_counter;
+ gctUINT32 pa_output_prim_counter;
+ gctUINT32 pa_depth_clipped_counter;
+ gctUINT32 pa_trivial_rejected_counter;
+ gctUINT32 pa_culled_counter;
+
+ /* SE */
+ gctUINT32 se_culled_triangle_count;
+ gctUINT32 se_culled_lines_count;
+
+ /* RA */
+ gctUINT32 ra_valid_pixel_count;
+ gctUINT32 ra_total_quad_count;
+ gctUINT32 ra_valid_quad_count_after_early_z;
+ gctUINT32 ra_total_primitive_count;
+ gctUINT32 ra_pipe_cache_miss_counter;
+ gctUINT32 ra_prefetch_cache_miss_counter;
+ gctUINT32 ra_eez_culled_counter;
+
+ /* TX */
+ gctUINT32 tx_total_bilinear_requests;
+ gctUINT32 tx_total_trilinear_requests;
+ gctUINT32 tx_total_discarded_texture_requests;
+ gctUINT32 tx_total_texture_requests;
+ gctUINT32 tx_mem_read_count;
+ gctUINT32 tx_mem_read_in_8B_count;
+ gctUINT32 tx_cache_miss_count;
+ gctUINT32 tx_cache_hit_texel_count;
+ gctUINT32 tx_cache_miss_texel_count;
+
+ /* MC */
+ gctUINT32 mc_total_read_req_8B_from_pipeline;
+ gctUINT32 mc_total_read_req_8B_from_IP;
+ gctUINT32 mc_total_write_req_8B_from_pipeline;
+
+ /* HI */
+ gctUINT32 hi_axi_cycles_read_request_stalled;
+ gctUINT32 hi_axi_cycles_write_request_stalled;
+ gctUINT32 hi_axi_cycles_write_data_stalled;
+}
+gcsPROFILER_COUNTERS;
+
+/* HAL profile information. */
+typedef struct _gcsPROFILER
+{
+ gctFILE file;
+
+ /* Aggregate Information */
+
+ /* Clock Info */
+ gctUINT64 frameStart;
+ gctUINT64 frameEnd;
+
+ /* Current frame information */
+ gctUINT32 frameNumber;
+ gctUINT64 frameStartTimeusec;
+ gctUINT64 frameEndTimeusec;
+ gctUINT64 frameStartCPUTimeusec;
+ gctUINT64 frameEndCPUTimeusec;
+
+#if PROFILE_HAL_COUNTERS
+ gctUINT32 vertexBufferTotalBytesAlloc;
+ gctUINT32 vertexBufferNewBytesAlloc;
+ int vertexBufferTotalObjectsAlloc;
+ int vertexBufferNewObjectsAlloc;
+
+ gctUINT32 indexBufferTotalBytesAlloc;
+ gctUINT32 indexBufferNewBytesAlloc;
+ int indexBufferTotalObjectsAlloc;
+ int indexBufferNewObjectsAlloc;
+
+ gctUINT32 textureBufferTotalBytesAlloc;
+ gctUINT32 textureBufferNewBytesAlloc;
+ int textureBufferTotalObjectsAlloc;
+ int textureBufferNewObjectsAlloc;
+
+ gctUINT32 numCommits;
+ gctUINT32 drawPointCount;
+ gctUINT32 drawLineCount;
+ gctUINT32 drawTriangleCount;
+ gctUINT32 drawVertexCount;
+ gctUINT32 redundantStateChangeCalls;
+#endif
+}
+gcsPROFILER;
+
+/* Memory profile information. */
+struct _gcsMemProfile
+{
+ /* Memory Usage */
+ gctUINT32 videoMemUsed;
+ gctUINT32 systemMemUsed;
+ gctUINT32 commitBufferSize;
+ gctUINT32 contextBufferCopyBytes;
+};
+
+/* Shader profile information. */
+struct _gcsSHADER_PROFILER
+{
+ gctUINT32 shaderLength;
+ gctUINT32 shaderALUCycles;
+ gctUINT32 shaderTexLoadCycles;
+ gctUINT32 shaderTempRegCount;
+ gctUINT32 shaderSamplerRegCount;
+ gctUINT32 shaderInputRegCount;
+ gctUINT32 shaderOutputRegCount;
+};
+
+/* Initialize the gcsProfiler. */
+gceSTATUS
+gcoPROFILER_Initialize(
+ IN gcoHAL Hal,
+ IN gctFILE File
+ );
+
+/* Destroy the gcProfiler. */
+gceSTATUS
+gcoPROFILER_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Call to signal end of frame. */
+gceSTATUS
+gcoPROFILER_EndFrame(
+ IN gcoHAL Hal
+ );
+
+gceSTATUS
+gcoPROFILER_Count(
+ IN gcoHAL Hal,
+ IN gctUINT32 Enum,
+ IN gctINT Value
+ );
+
+/* Profile input vertex shader. */
+gceSTATUS
+gcoPROFILER_ShaderVS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Vs
+ );
+
+/* Profile input fragment shader. */
+gceSTATUS
+gcoPROFILER_ShaderFS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Fs
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_profiler_h_ */
+
diff --git a/src/include_dove_old/gc_hal_raster.h b/src/include_dove_old/gc_hal_raster.h
new file mode 100644
index 0000000..08770d4
--- /dev/null
+++ b/src/include_dove_old/gc_hal_raster.h
@@ -0,0 +1,792 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public Lisence for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_raster_h_
+#define __gc_hal_raster_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoBRUSH * gcoBRUSH;
+typedef struct _gcoBRUSH_CACHE * gcoBRUSH_CACHE;
+
+/******************************************************************************\
+******************************** gcoBRUSH Object *******************************
+\******************************************************************************/
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructSingleColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructMonochrome(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Destroy an gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_Destroy(
+ IN gcoBRUSH Brush
+ );
+
+/******************************************************************************\
+******************************** gcoSURF Object *******************************
+\******************************************************************************/
+
+/* Set cipping rectangle. */
+gceSTATUS
+gcoSURF_SetClipping(
+ IN gcoSURF Surface
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gcoSURF_Clear2D(
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 LoColor,
+ IN gctUINT32 HiColor
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gcoSURF_Line(
+ IN gcoSURF Surface,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop
+ );
+
+/* Generic rectangular blit. */
+gceSTATUS
+gcoSURF_Blit(
+ IN OPTIONAL gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN OPTIONAL gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN OPTIONAL gceSURF_TRANSPARENCY Transparency,
+ IN OPTIONAL gctUINT32 TransparencyColor,
+ IN OPTIONAL gctPOINTER Mask,
+ IN OPTIONAL gceSURF_MONOPACK MaskPack
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gcoSURF_MonoBlit(
+ IN gcoSURF DestSurface,
+ IN gctPOINTER Source,
+ IN gceSURF_MONOPACK SourcePack,
+ IN gcsPOINT_PTR SourceSize,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Filter blit. */
+gceSTATUS
+gcoSURF_FilterBlit(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gcoSURF_EnableAlphaBlend(
+ IN gcoSURF Surface,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gcoSURF_DisableAlphaBlend(
+ IN gcoSURF Surface
+ );
+
+/* Copy a rectangular area with format conversion. */
+gceSTATUS
+gcoSURF_CopyPixels(
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctINT SourceX,
+ IN gctINT SourceY,
+ IN gctINT TargetX,
+ IN gctINT TargetY,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+/* Read surface pixel. */
+gceSTATUS
+gcoSURF_ReadPixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ OUT gctPOINTER PixelValue
+ );
+
+/* Write surface pixel. */
+gceSTATUS
+gcoSURF_WritePixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ IN gctPOINTER PixelValue
+ );
+
+/******************************************************************************\
+********************************** gco2D Object *********************************
+\******************************************************************************/
+
+/* Construct a new gco2D object. */
+gceSTATUS
+gco2D_Construct(
+ IN gcoHAL Hal,
+ OUT gco2D * Hardware
+ );
+
+/* Destroy an gco2D object. */
+gceSTATUS
+gco2D_Destroy(
+ IN gco2D Hardware
+ );
+
+/* Sets the maximum number of brushes in the brush cache. */
+gceSTATUS
+gco2D_SetBrushLimit(
+ IN gco2D Hardware,
+ IN gctUINT MaxCount
+ );
+
+/* Flush the brush. */
+gceSTATUS
+gco2D_FlushBrush(
+ IN gco2D Engine,
+ IN gcoBRUSH Brush,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Program the specified solid color brush. */
+gceSTATUS
+gco2D_LoadSolidBrush(
+ IN gco2D Engine,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask
+ );
+
+/* Configure monochrome source. */
+gceSTATUS
+gco2D_SetMonochromeSource(
+ IN gco2D Engine,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_MONOPACK DataPack,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source extension for full rotation. */
+gceSTATUS
+gco2D_SetColorSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSourceAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative
+ );
+
+/* Configure masked color source. */
+gceSTATUS
+gco2D_SetMaskedSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack
+ );
+
+/* Configure masked color source extension for full rotation. */
+gceSTATUS
+gco2D_SetMaskedSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Setup the source rectangle. */
+gceSTATUS
+gco2D_SetSource(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect
+ );
+
+/* Set clipping rectangle. */
+gceSTATUS
+gco2D_SetClipping(
+ IN gco2D Engine,
+ IN gcsRECT_PTR Rect
+ );
+
+/* Configure destination. */
+gceSTATUS
+gco2D_SetTarget(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth
+ );
+
+/* Configure destination extension for full rotation. */
+gceSTATUS
+gco2D_SetTargetEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Calculate and program the stretch factors. */
+gceSTATUS
+gco2D_SetStretchFactors(
+ IN gco2D Engine,
+ IN gctUINT32 HorFactor,
+ IN gctUINT32 VerFactor
+ );
+
+/* Calculate and program the stretch factors based on the rectangles. */
+gceSTATUS
+gco2D_SetStretchRectFactors(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect
+ );
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructSingleColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructMonochromeBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gco2D_Clear(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+gceSTATUS
+gco2D_ClearEx(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gco2D_Line(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines based on the 32-bit color. */
+gceSTATUS
+gco2D_ColorLine(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Generic blit. */
+gceSTATUS
+gco2D_Blit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Batch blit. */
+gceSTATUS
+gco2D_BatchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Stretch blit. */
+gceSTATUS
+gco2D_StretchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gco2D_MonoBlit(
+ IN gco2D Engine,
+ IN gctPOINTER StreamBits,
+ IN gcsPOINT_PTR StreamSize,
+ IN gcsRECT_PTR StreamRect,
+ IN gceSURF_MONOPACK SrcStreamPack,
+ IN gceSURF_MONOPACK DestStreamPack,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 FgRop,
+ IN gctUINT32 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Set kernel size. */
+gceSTATUS
+gco2D_SetKernelSize(
+ IN gco2D Engine,
+ IN gctUINT8 HorKernelSize,
+ IN gctUINT8 VerKernelSize
+ );
+
+/* Set filter type. */
+gceSTATUS
+gco2D_SetFilterType(
+ IN gco2D Engine,
+ IN gceFILTER_TYPE FilterType
+ );
+
+/* Set the filter kernel by user. */
+gceSTATUS
+gco2D_SetUserFilterKernel(
+ IN gco2D Engine,
+ IN gceFILTER_PASS_TYPE PassType,
+ IN gctUINT16_PTR KernelArray
+ );
+
+/* Select the pass(es) to be done for user defined filter. */
+gceSTATUS
+gco2D_EnableUserFilterPasses(
+ IN gco2D Engine,
+ IN gctBOOL HorPass,
+ IN gctBOOL VerPass
+ );
+
+/* Frees the temporary buffer allocated by filter blit operation. */
+gceSTATUS
+gco2D_FreeFilterBuffer(
+ IN gco2D Engine
+ );
+
+/* Filter blit. */
+gceSTATUS
+gco2D_FilterBlit(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Filter blit extension for full rotation. */
+gceSTATUS
+gco2D_FilterBlitEx(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gctUINT32 SrcSurfaceHeight,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gctUINT32 DestSurfaceHeight,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gco2D_EnableAlphaBlend(
+ IN gco2D Engine,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Enable alpha blending engine in the hardware. */
+gceSTATUS
+gco2D_EnableAlphaBlendAdvanced(
+ IN gco2D Engine,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode
+ );
+
+/* Enable alpha blending engine with Porter Duff rule. */
+gceSTATUS
+gco2D_SetPorterDuffBlending(
+ IN gco2D Engine,
+ IN gce2D_PORTER_DUFF_RULE Rule
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gco2D_DisableAlphaBlend(
+ IN gco2D Engine
+ );
+
+/* Retrieve the maximum number of 32-bit data chunks for a single DE command. */
+gctUINT32
+gco2D_GetMaximumDataCount(
+ void
+ );
+
+/* Retrieve the maximum number of rectangles, that can be passed in a single DE command. */
+gctUINT32
+gco2D_GetMaximumRectCount(
+ void
+ );
+
+/* Returns the pixel alignment of the surface. */
+gceSTATUS
+gco2D_GetPixelAlignment(
+ gceSURF_FORMAT Format,
+ gcsPOINT_PTR Alignment
+ );
+
+/* Retrieve monochrome stream pack size. */
+gceSTATUS
+gco2D_GetPackSize(
+ IN gceSURF_MONOPACK StreamPack,
+ OUT gctUINT32 * PackWidth,
+ OUT gctUINT32 * PackHeight
+ );
+
+/* Flush the 2D pipeline. */
+gceSTATUS
+gco2D_Flush(
+ IN gco2D Engine
+ );
+
+/* Load 256-entry color table for INDEX8 source surfaces. */
+gceSTATUS
+gco2D_LoadPalette(
+ IN gco2D Engine,
+ IN gctUINT FirstIndex,
+ IN gctUINT IndexCount,
+ IN gctPOINTER ColorTable,
+ IN gctBOOL ColorConvert
+ );
+
+/* Enable/disable 2D BitBlt mirrorring. */
+gceSTATUS
+gco2D_SetBitBlitMirror(
+ IN gco2D Engine,
+ IN gctBOOL HorizontalMirror,
+ IN gctBOOL VerticalMirror
+ );
+
+/* Set the transparency for source, destination and pattern. */
+gceSTATUS
+gco2D_SetTransparencyAdvanced(
+ IN gco2D Engine,
+ IN gce2D_TRANSPARENCY SrcTransparency,
+ IN gce2D_TRANSPARENCY DstTransparency,
+ IN gce2D_TRANSPARENCY PatTransparency
+ );
+
+/* Set the source color key. */
+gceSTATUS
+gco2D_SetSourceColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the source color key range. */
+gceSTATUS
+gco2D_SetSourceColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the target color key. */
+gceSTATUS
+gco2D_SetTargetColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the target color key range. */
+gceSTATUS
+gco2D_SetTargetColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the YUV color space mode. */
+gceSTATUS
+gco2D_SetYUVColorMode(
+ IN gco2D Engine,
+ IN gce2D_YUV_COLOR_MODE Mode
+ );
+
+/* Setup the source global color value in ARGB8 format. */
+gceSTATUS gco2D_SetSourceGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the target global color value in ARGB8 format. */
+gceSTATUS gco2D_SetTargetGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the source and target pixel multiply modes. */
+gceSTATUS
+gco2D_SetPixelMultiplyModeAdvanced(
+ IN gco2D Engine,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE SrcPremultiplySrcAlpha,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstPremultiplyDstAlpha,
+ IN gce2D_GLOBAL_COLOR_MULTIPLY_MODE SrcPremultiplyGlobalMode,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstDemultiplyDstAlpha
+ );
+
+/* Set the GPU clock cycles after which the idle engine will keep auto-flushing. */
+gceSTATUS
+gco2D_SetAutoFlushCycles(
+ IN gco2D Engine,
+ IN gctUINT32 Cycles
+ );
+
+/* Read the profile registers available in the 2D engine and sets them in the profile.
+ The function will also reset the pixelsRendered counter every time.
+*/
+gceSTATUS
+gco2D_ProfileEngine(
+ IN gco2D Engine,
+ OPTIONAL gcs2D_PROFILE_PTR Profile
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_raster_h_ */
+
diff --git a/src/include_dove_old/gc_hal_types.h b/src/include_dove_old/gc_hal_types.h
new file mode 100644
index 0000000..fa8dfc9
--- /dev/null
+++ b/src/include_dove_old/gc_hal_types.h
@@ -0,0 +1,543 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2010 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public Lisence for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_types_h_
+#define __gc_hal_types_h_
+
+#include "gc_hal_options.h"
+
+#ifdef _WIN32
+#pragma warning(disable:4127) /* Conditional expression is constant (do { }
+ ** while(0)). */
+#pragma warning(disable:4100) /* Unreferenced formal parameter. */
+#pragma warning(disable:4204) /* Non-constant aggregate initializer (C99). */
+#pragma warning(disable:4131) /* Uses old-style declarator (for Bison and
+ ** Flex generated files). */
+#pragma warning(disable:4206) /* Translation unit is empty. */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+** Platform macros.
+*/
+
+#if defined(__GNUC__)
+# define gcdHAS_ELLIPSES 1 /* GCC always has it. */
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+# define gcdHAS_ELLIPSES 1 /* C99 has it. */
+#elif defined(_MSC_VER) && (_MSC_VER >= 1500)
+# define gcdHAS_ELLIPSES 1 /* MSVC 2007+ has it. */
+#elif defined(UNDER_CE)
+# define gcdHAS_ELLIPSES 0 /* Windows CE doesn't have it. */
+#else
+# error "gcdHAS_ELLIPSES: Platform could not be determined"
+#endif
+
+/******************************************************************************\
+************************************ Keyword ***********************************
+\******************************************************************************/
+
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
+# define gcmINLINE inline /* C99 keyword. */
+#elif defined(__GNUC__)
+# define gcmINLINE __inline__ /* GNU keyword. */
+#elif defined(_MSC_VER) || defined(UNDER_CE)
+# define gcmINLINE __inline /* Internal keyword. */
+#else
+# error "gcmINLINE: Platform could not be determined"
+#endif
+
+#ifndef gcdDEBUG
+# if (defined(DBG) && DBG) || defined(DEBUG) || defined(_DEBUG)
+# define gcdDEBUG 1
+# else
+# define gcdDEBUG 0
+# endif
+#endif
+
+#ifdef _USRDLL
+# ifdef _MSC_VER
+# ifdef HAL_EXPORTS
+# define HALAPI __declspec(dllexport)
+# else
+# define HALAPI __declspec(dllimport)
+# endif
+# define HALDECL __cdecl
+# else
+# ifdef HAL_EXPORTS
+# define HALAPI
+# else
+# define HALAPI extern
+# endif
+# endif
+#else
+# define HALAPI
+# define HALDECL
+#endif
+
+/******************************************************************************\
+********************************** Common Types ********************************
+\******************************************************************************/
+
+#define gcvFALSE 0
+#define gcvTRUE 1
+
+#define gcvINFINITE ((gctUINT32) ~0)
+
+typedef int gctBOOL;
+typedef gctBOOL * gctBOOL_PTR;
+
+typedef int gctINT;
+typedef signed char gctINT8;
+typedef signed short gctINT16;
+typedef signed int gctINT32;
+typedef signed long long gctINT64;
+
+typedef gctINT * gctINT_PTR;
+typedef gctINT8 * gctINT8_PTR;
+typedef gctINT16 * gctINT16_PTR;
+typedef gctINT32 * gctINT32_PTR;
+typedef gctINT64 * gctINT64_PTR;
+
+typedef unsigned int gctUINT;
+typedef unsigned char gctUINT8;
+typedef unsigned short gctUINT16;
+typedef unsigned int gctUINT32;
+typedef unsigned long long gctUINT64;
+
+typedef gctUINT * gctUINT_PTR;
+typedef gctUINT8 * gctUINT8_PTR;
+typedef gctUINT16 * gctUINT16_PTR;
+typedef gctUINT32 * gctUINT32_PTR;
+typedef gctUINT64 * gctUINT64_PTR;
+
+typedef unsigned long gctSIZE_T;
+typedef gctSIZE_T * gctSIZE_T_PTR;
+
+#ifdef __cplusplus
+# define gcvNULL 0
+#else
+# define gcvNULL ((void *) 0)
+#endif
+
+typedef float gctFLOAT;
+typedef signed int gctFIXED_POINT;
+typedef float * gctFLOAT_PTR;
+
+typedef void * gctPHYS_ADDR;
+typedef void * gctHANDLE;
+typedef void * gctFILE;
+typedef void * gctSIGNAL;
+typedef void * gctWINDOW;
+typedef void * gctIMAGE;
+
+typedef void * gctPOINTER;
+typedef const void * gctCONST_POINTER;
+
+typedef char gctCHAR;
+typedef char * gctSTRING;
+typedef const char * gctCONST_STRING;
+
+typedef struct _gcsCOUNT_STRING
+{
+ gctSIZE_T Length;
+ gctCONST_STRING String;
+}
+gcsCOUNT_STRING;
+
+/* Fixed point constants. */
+#define gcvZERO_X ((gctFIXED_POINT) 0x00000000)
+#define gcvHALF_X ((gctFIXED_POINT) 0x00008000)
+#define gcvONE_X ((gctFIXED_POINT) 0x00010000)
+#define gcvNEGONE_X ((gctFIXED_POINT) 0xFFFF0000)
+#define gcvTWO_X ((gctFIXED_POINT) 0x00020000)
+
+/******************************************************************************\
+******************************* Fixed Point Math *******************************
+\******************************************************************************/
+
+#define gcmXMultiply(x1, x2) \
+ (gctFIXED_POINT) (((gctINT64) (x1) * (x2)) >> 16)
+
+#define gcmXDivide(x1, x2) \
+ (gctFIXED_POINT) ((((gctINT64) (x1)) << 16) / (x2))
+
+#define gcmXMultiplyDivide(x1, x2, x3) \
+ (gctFIXED_POINT) ((gctINT64) (x1) * (x2) / (x3))
+
+/* 2D Engine profile. */
+struct gcs2D_PROFILE
+{
+ /* Cycle count.
+ 32bit counter incremented every 2D clock cycle.
+ Wraps back to 0 when the counter overflows.
+ */
+ gctUINT32 cycleCount;
+
+ /* Pixels rendered by the 2D engine.
+ Resets to 0 every time it is read. */
+ gctUINT32 pixelsRendered;
+};
+
+
+/* Macro to combine four characters into a Charcater Code. */
+#define gcmCC(c1, c2, c3, c4) \
+( \
+ (char) (c1) \
+ | \
+ ((char) (c2) << 8) \
+ | \
+ ((char) (c3) << 16) \
+ | \
+ ((char) (c4) << 24) \
+)
+
+#define gcmPRINTABLE(c) ((((c) >= ' ') && ((c) <= '}')) ? (c) : ' ')
+
+#define gcmCC_PRINT(cc) \
+ gcmPRINTABLE((char) ( (cc) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 8) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 16) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 24) & 0xFF))
+
+/******************************************************************************\
+****************************** Function Parameters *****************************
+\******************************************************************************/
+
+#define IN
+#define OUT
+#define OPTIONAL
+
+/******************************************************************************\
+********************************* Status Codes *********************************
+\******************************************************************************/
+
+typedef enum _gceSTATUS
+{
+ gcvSTATUS_OK = 0,
+ gcvSTATUS_FALSE = 0,
+ gcvSTATUS_TRUE = 1,
+ gcvSTATUS_NO_MORE_DATA = 2,
+ gcvSTATUS_CACHED = 3,
+ gcvSTATUS_MIPMAP_TOO_LARGE = 4,
+ gcvSTATUS_NAME_NOT_FOUND = 5,
+ gcvSTATUS_NOT_OUR_INTERRUPT = 6,
+ gcvSTATUS_MISMATCH = 7,
+ gcvSTATUS_MIPMAP_TOO_SMALL = 8,
+ gcvSTATUS_LARGER = 9,
+ gcvSTATUS_SMALLER = 10,
+ gcvSTATUS_CHIP_NOT_READY = 11,
+ gcvSTATUS_NEED_CONVERSION = 12,
+ gcvSTATUS_SKIP = 13,
+ gcvSTATUS_DATA_TOO_LARGE = 14,
+ gcvSTATUS_INVALID_CONFIG = 15,
+ gcvSTATUS_CHANGED = 16,
+
+ gcvSTATUS_INVALID_ARGUMENT = -1,
+ gcvSTATUS_INVALID_OBJECT = -2,
+ gcvSTATUS_OUT_OF_MEMORY = -3,
+ gcvSTATUS_MEMORY_LOCKED = -4,
+ gcvSTATUS_MEMORY_UNLOCKED = -5,
+ gcvSTATUS_HEAP_CORRUPTED = -6,
+ gcvSTATUS_GENERIC_IO = -7,
+ gcvSTATUS_INVALID_ADDRESS = -8,
+ gcvSTATUS_CONTEXT_LOSSED = -9,
+ gcvSTATUS_TOO_COMPLEX = -10,
+ gcvSTATUS_BUFFER_TOO_SMALL = -11,
+ gcvSTATUS_INTERFACE_ERROR = -12,
+ gcvSTATUS_NOT_SUPPORTED = -13,
+ gcvSTATUS_MORE_DATA = -14,
+ gcvSTATUS_TIMEOUT = -15,
+ gcvSTATUS_OUT_OF_RESOURCES = -16,
+ gcvSTATUS_INVALID_DATA = -17,
+ gcvSTATUS_INVALID_MIPMAP = -18,
+ gcvSTATUS_NOT_FOUND = -19,
+ gcvSTATUS_NOT_ALIGNED = -20,
+ gcvSTATUS_INVALID_REQUEST = -21,
+
+ /* Linker errors. */
+ gcvSTATUS_GLOBAL_TYPE_MISMATCH = -1000,
+ gcvSTATUS_TOO_MANY_ATTRIBUTES = -1001,
+ gcvSTATUS_TOO_MANY_UNIFORMS = -1002,
+ gcvSTATUS_TOO_MANY_VARYINGS = -1003,
+ gcvSTATUS_UNDECLARED_VARYING = -1004,
+ gcvSTATUS_VARYING_TYPE_MISMATCH = -1005,
+ gcvSTATUS_MISSING_MAIN = -1006,
+ gcvSTATUS_NAME_MISMATCH = -1007,
+ gcvSTATUS_INVALID_INDEX = -1008,
+}
+gceSTATUS;
+
+/******************************************************************************\
+********************************* Status Macros ********************************
+\******************************************************************************/
+
+#define gcmIS_ERROR(status) (status < 0)
+#define gcmNO_ERROR(status) (status >= 0)
+#define gcmIS_SUCCESS(status) (status == gcvSTATUS_OK)
+
+/******************************************************************************\
+********************************* Field Macros *********************************
+\******************************************************************************/
+
+#define __gcmSTART(reg_field) \
+ (0 ? reg_field)
+
+#define __gcmEND(reg_field) \
+ (1 ? reg_field)
+
+#define __gcmGETSIZE(reg_field) \
+ (__gcmEND(reg_field) - __gcmSTART(reg_field) + 1)
+
+#define __gcmALIGN(data, reg_field) \
+ (((gctUINT32) (data)) << __gcmSTART(reg_field))
+
+#define __gcmMASK(reg_field) \
+ ((gctUINT32) ((__gcmGETSIZE(reg_field) == 32) \
+ ? ~0 \
+ : (~(~0 << __gcmGETSIZE(reg_field)))))
+
+/*******************************************************************************
+**
+** gcmFIELDMASK
+**
+** Get aligned field mask.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmFIELDMASK(reg, field) \
+( \
+ __gcmALIGN(__gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmGETFIELD
+**
+** Extract the value of a field from specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmGETFIELD(data, reg, field) \
+( \
+ ((((gctUINT32) (data)) >> __gcmSTART(reg##_##field)) \
+ & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELD
+**
+** Set the value of a field within specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETFIELD(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN((gctUINT32) (value) \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELDVALUE
+**
+** Set the value of a field within specified data with a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmSETFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN(reg##_##field##_##value \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmSETMASKEDFIELD
+**
+** Set the value of a masked field with specified data.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETMASKEDFIELD(reg, field, value) \
+( \
+ gcmSETFIELD(~0, reg, field, value) & \
+ gcmSETFIELDVALUE(~0, reg, MASK_ ## field, ENABLED) \
+)
+
+/*******************************************************************************
+**
+** gcmVERIFYFIELDVALUE
+**
+** Verify if the value of a field within specified data equals a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmVERIFYFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) >> __gcmSTART(reg##_##field) & \
+ __gcmMASK(reg##_##field)) \
+ == \
+ (reg##_##field##_##value & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+** Bit field macros.
+*/
+
+#define __gcmSTARTBIT(Field) \
+ ( 1 ? Field )
+
+#define __gcmBITSIZE(Field) \
+ ( 0 ? Field )
+
+#define __gcmBITMASK(Field) \
+( \
+ (1 << __gcmBITSIZE(Field)) - 1 \
+)
+
+#define gcmGETBITS(Value, Type, Field) \
+( \
+ ( ((Type) (Value)) >> __gcmSTARTBIT(Field) ) \
+ & \
+ __gcmBITMASK(Field) \
+)
+
+#define gcmSETBITS(Value, Type, Field, NewValue) \
+( \
+ ( ((Type) (Value)) \
+ & ~(__gcmBITMASK(Field) << __gcmSTARTBIT(Field)) \
+ ) \
+ | \
+ ( ( ((Type) (NewValue)) \
+ & __gcmBITMASK(Field) \
+ ) << __gcmSTARTBIT(Field) \
+ ) \
+)
+
+/******************************************************************************\
+******************************** Min/Max Macros ********************************
+\******************************************************************************/
+
+#define gcmMIN(x, y) (((x) <= (y)) ? (x) : (y))
+#define gcmMAX(x, y) (((x) >= (y)) ? (x) : (y))
+#define gcmCLAMP(x, min, max) (((x) < (min)) ? (min) : \
+ ((x) > (max)) ? (max) : (x))
+#define gcmABS(x) (((x) < 0) ? -(x) : (x))
+#define gcmNEG(x) (((x) < 0) ? (x) : -(x))
+
+/*******************************************************************************
+**
+** gcmPTR2INT
+**
+** Convert a pointer to an integer value.
+**
+** ARGUMENTS:
+**
+** p Pointer value.
+*/
+#if defined(_WIN32) || (defined(__LP64__) && __LP64__)
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (gctUINT64) (p) \
+ )
+#else
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (p) \
+ )
+#endif
+
+/*******************************************************************************
+**
+** gcmINT2PTR
+**
+** Convert an integer value into a pointer.
+**
+** ARGUMENTS:
+**
+** v Integer value.
+*/
+#define gcmINT2PTR(i) \
+( \
+ (gctPOINTER) (i) \
+)
+
+/*******************************************************************************
+**
+** gcmOFFSETOF
+**
+** Compute the byte offset of a field inside a structure.
+**
+** ARGUMENTS:
+**
+** s Structure name.
+** field Field name.
+*/
+#define gcmOFFSETOF(s, field) \
+( \
+ gcmPTR2INT(& (((struct s *) 0)->field)) \
+)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_types_h_ */
+
diff --git a/src/include_dove_old/gc_hal_user_context.h b/src/include_dove_old/gc_hal_user_context.h
new file mode 100644
index 0000000..4f93a4f
--- /dev/null
+++ b/src/include_dove_old/gc_hal_user_context.h
@@ -0,0 +1,165 @@
+/****************************************************************************
+*
+* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved.
+*
+* The material in this file is confidential and contains trade secrets
+* of Vivante Corporation. This is proprietary information owned by
+* Vivante Corporation. No part of this work may be disclosed,
+* reproduced, copied, transmitted, or used in any way for any purpose,
+* without the express written permission of Vivante Corporation.
+*
+*****************************************************************************
+*
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_user_context_h_
+#define __gc_hal_user_context_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* gcoCONTEXT structure that hold the current context. */
+struct _gcoCONTEXT
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gcoOS object. */
+ gcoOS os;
+
+ /* Pointer to gcoHARDWARE object. */
+ gcoHARDWARE hardware;
+
+ /* Context ID. */
+ gctUINT64 id;
+
+ /* State mapping. */
+ gctUINT32_PTR map;
+ gctSIZE_T stateCount;
+
+ /* State hinting. */
+ gctUINT8_PTR hint;
+ gctUINT8 hintValue;
+ gctSIZE_T hintCount;
+
+ /* Context buffer. */
+ gctUINT32_PTR buffer;
+ gctUINT32 pipe3DIndex;
+ gctUINT32 pipe2DIndex;
+ gctUINT32 linkIndex;
+ gctUINT32 inUseIndex;
+ gctSIZE_T bufferSize;
+
+ /* Context buffer used for commitment. */
+ gctSIZE_T bytes;
+ gctPHYS_ADDR physical;
+ gctPOINTER logical;
+
+ /* Pointer to final LINK command. */
+ gctPOINTER link;
+
+ /* Requested pipe select for context. */
+ gctUINT32 initialPipe;
+ gctUINT32 entryPipe;
+ gctUINT32 currentPipe;
+
+ /* Flag to specify whether PostCommit needs to be called. */
+ gctBOOL postCommit;
+
+ /* Busy flag. */
+ volatile gctBOOL * inUse;
+
+ /* Variables used for building state buffer. */
+ gctUINT32 lastAddress;
+ gctSIZE_T lastSize;
+ gctUINT32 lastIndex;
+ gctBOOL lastFixed;
+
+ /* Hint array. */
+ gctUINT32_PTR hintArray;
+ gctUINT32_PTR hintIndex;
+};
+
+struct _gcoCMDBUF
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to gcoOS object. */
+ gcoOS os;
+
+ /* Pointer to gcoHARDWARE object. */
+ gcoHARDWARE hardware;
+
+ /* Physical address of command buffer. */
+ gctPHYS_ADDR physical;
+
+ /* Logical address of command buffer. */
+ gctPOINTER logical;
+
+ /* Number of bytes in command buffer. */
+ gctSIZE_T bytes;
+
+ /* Start offset into the command buffer. */
+ gctUINT32 startOffset;
+
+ /* Current offset into the command buffer. */
+ gctUINT32 offset;
+
+ /* Number of free bytes in command buffer. */
+ gctSIZE_T free;
+
+#if gcdSECURE_USER
+ /* Table of offsets that define the physical addresses to be mapped. */
+ gctUINT32_PTR hintTable;
+
+ /* Current index into map table. */
+ gctUINT32_PTR hintIndex;
+
+ /* Commit index for map table. */
+ gctUINT32_PTR hintCommit;
+#endif
+};
+
+typedef struct _gcsQUEUE * gcsQUEUE_PTR;
+
+typedef struct _gcsQUEUE
+{
+ /* Pointer to next gcsQUEUE structure. */
+ gcsQUEUE_PTR next;
+
+#ifdef __QNXNTO__
+ /* Size of this object. */
+ gctSIZE_T bytes;
+#endif
+
+ /* Event information. */
+ gcsHAL_INTERFACE iface;
+}
+gcsQUEUE;
+
+/* Event queue. */
+struct _gcoQUEUE
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to gcoOS object. */
+ gcoOS os;
+
+ /* Pointer to current event queue. */
+ gcsQUEUE_PTR head;
+ gcsQUEUE_PTR tail;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_user_context_h_ */
+
diff --git a/src/include_eureka/gc_abi.h b/src/include_eureka/gc_abi.h
new file mode 100644
index 0000000..91b6992
--- /dev/null
+++ b/src/include_eureka/gc_abi.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/** Kernel ABI definition file for Etna **/
+#ifndef H_GCABI
+#define H_GCABI
+//#define GCABI_USER_SIGNAL_HAS_TYPE
+//#define GCABI_CONTEXT_HAS_PHYSICAL
+#define GCABI_HAS_MINOR_FEATURES_2
+#define GCABI_HAS_MINOR_FEATURES_3
+
+#define GCABI_CHIPIDENTITY_EXT
+
+// One of these must be set:
+//#define GCABI_HAS_CONTEXT
+#define GCABI_HAS_STATE_DELTAS
+
+//#define GCABI_HAS_HARDWARE_TYPE
+
+/* IOCTL structure for userspace driver*/
+typedef struct
+{
+ void *in_buf;
+ unsigned int in_buf_size;
+ void *out_buf;
+ unsigned int out_buf_size;
+} vivante_ioctl_data_t;
+
+#include "gc_hal_base.h"
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_kernel_buffer.h"
+#include "gc_hal_types.h"
+#endif
+
diff --git a/src/include_eureka/gc_hal.h b/src/include_eureka/gc_hal.h
new file mode 100644
index 0000000..e584f0c
--- /dev/null
+++ b/src/include_eureka/gc_hal.h
@@ -0,0 +1,2345 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_h_
+#define __gc_hal_h_
+
+#include "gc_hal_rename.h"
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+#include "gc_hal_base.h"
+#include "gc_hal_profiler.h"
+#include "gc_hal_driver.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* Alignment Macros *******************************
+\******************************************************************************/
+
+#define gcmALIGN(n, align) \
+( \
+ ((n) + ((align) - 1)) & ~((align) - 1) \
+)
+
+#define gcmALIGN_BASE(n, align) \
+( \
+ (n) & ~((align) - 1) \
+)
+
+/******************************************************************************\
+***************************** Element Count Macro *****************************
+\******************************************************************************/
+
+#define gcmSIZEOF(a) \
+( \
+ (gctSIZE_T) (sizeof(a)) \
+)
+
+#define gcmCOUNTOF(a) \
+( \
+ sizeof(a) / sizeof(a[0]) \
+)
+
+/******************************************************************************\
+******************************** gcsOBJECT Object *******************************
+\******************************************************************************/
+
+/* Type of objects. */
+typedef enum _gceOBJECT_TYPE
+{
+ gcvOBJ_UNKNOWN = 0,
+ gcvOBJ_2D = gcmCC('2','D',' ',' '),
+ gcvOBJ_3D = gcmCC('3','D',' ',' '),
+ gcvOBJ_ATTRIBUTE = gcmCC('A','T','T','R'),
+ gcvOBJ_BRUSHCACHE = gcmCC('B','R','U','$'),
+ gcvOBJ_BRUSHNODE = gcmCC('B','R','U','n'),
+ gcvOBJ_BRUSH = gcmCC('B','R','U','o'),
+ gcvOBJ_BUFFER = gcmCC('B','U','F','R'),
+ gcvOBJ_COMMAND = gcmCC('C','M','D',' '),
+ gcvOBJ_COMMANDBUFFER = gcmCC('C','M','D','B'),
+ gcvOBJ_CONTEXT = gcmCC('C','T','X','T'),
+ gcvOBJ_DEVICE = gcmCC('D','E','V',' '),
+ gcvOBJ_DUMP = gcmCC('D','U','M','P'),
+ gcvOBJ_EVENT = gcmCC('E','V','N','T'),
+ gcvOBJ_FUNCTION = gcmCC('F','U','N','C'),
+ gcvOBJ_HAL = gcmCC('H','A','L',' '),
+ gcvOBJ_HARDWARE = gcmCC('H','A','R','D'),
+ gcvOBJ_HEAP = gcmCC('H','E','A','P'),
+ gcvOBJ_INDEX = gcmCC('I','N','D','X'),
+ gcvOBJ_INTERRUPT = gcmCC('I','N','T','R'),
+ gcvOBJ_KERNEL = gcmCC('K','E','R','N'),
+ gcvOBJ_KERNEL_FUNCTION = gcmCC('K','F','C','N'),
+ gcvOBJ_MEMORYBUFFER = gcmCC('M','E','M','B'),
+ gcvOBJ_MMU = gcmCC('M','M','U',' '),
+ gcvOBJ_OS = gcmCC('O','S',' ',' '),
+ gcvOBJ_OUTPUT = gcmCC('O','U','T','P'),
+ gcvOBJ_PAINT = gcmCC('P','N','T',' '),
+ gcvOBJ_PATH = gcmCC('P','A','T','H'),
+ gcvOBJ_QUEUE = gcmCC('Q','U','E',' '),
+ gcvOBJ_SAMPLER = gcmCC('S','A','M','P'),
+ gcvOBJ_SHADER = gcmCC('S','H','D','R'),
+ gcvOBJ_STREAM = gcmCC('S','T','R','M'),
+ gcvOBJ_SURF = gcmCC('S','U','R','F'),
+ gcvOBJ_TEXTURE = gcmCC('T','X','T','R'),
+ gcvOBJ_UNIFORM = gcmCC('U','N','I','F'),
+ gcvOBJ_VARIABLE = gcmCC('V','A','R','I'),
+ gcvOBJ_VERTEX = gcmCC('V','R','T','X'),
+ gcvOBJ_VIDMEM = gcmCC('V','M','E','M'),
+ gcvOBJ_VG = gcmCC('V','G',' ',' '),
+}
+gceOBJECT_TYPE;
+
+/* gcsOBJECT object defintinon. */
+typedef struct _gcsOBJECT
+{
+ /* Type of an object. */
+ gceOBJECT_TYPE type;
+}
+gcsOBJECT;
+
+typedef struct _gckHARDWARE * gckHARDWARE;
+
+/* CORE flags. */
+typedef enum _gceCORE
+{
+ gcvCORE_MAJOR = 0x0,
+ gcvCORE_2D = 0x1,
+ gcvCORE_VG = 0x2
+}
+gceCORE;
+
+#define gcdCORE_COUNT 3
+
+/*******************************************************************************
+**
+** gcmVERIFY_OBJECT
+**
+** Assert if an object is invalid or is not of the specified type. If the
+** object is invalid or not of the specified type, gcvSTATUS_INVALID_OBJECT
+** will be returned from the current function. In retail mode this macro
+** does nothing.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+#define _gcmVERIFY_OBJECT(prefix, obj, t) \
+ if ((obj) == gcvNULL) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: NULL"); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT((obj) != gcvNULL); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ } \
+ else if (((gcsOBJECT*) (obj))->type != t) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: %c%c%c%c", \
+ gcmCC_PRINT(((gcsOBJECT*) (obj))->type)); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT(((gcsOBJECT*)(obj))->type == t); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ }
+
+# define gcmVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcm, obj, t)
+# define gcmkVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcmk, obj, t)
+#else
+# define gcmVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+# define gcmkVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+#endif
+
+/******************************************************************************/
+/*VERIFY_OBJECT if special return expected*/
+/******************************************************************************/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_OBJECT_RETURN(prefix, obj, t, retVal) \
+ do \
+ { \
+ if ((obj) == gcvNULL) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT_RETURN failed: NULL"); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT((obj) != gcvNULL); \
+ prefix##FOOTER_ARG("retVal=%d", retVal); \
+ return retVal; \
+ } \
+ else if (((gcsOBJECT*) (obj))->type != t) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT_RETURN failed: %c%c%c%c", \
+ gcmCC_PRINT(((gcsOBJECT*) (obj))->type)); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT(((gcsOBJECT*)(obj))->type == t); \
+ prefix##FOOTER_ARG("retVal=%d", retVal); \
+ return retVal; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_OBJECT_RETURN(obj, t, retVal) \
+ _gcmVERIFY_OBJECT_RETURN(gcm, obj, t, retVal)
+# define gcmkVERIFY_OBJECT_RETURN(obj, t, retVal) \
+ _gcmVERIFY_OBJECT_RETURN(gcmk, obj, t, retVal)
+#else
+# define gcmVERIFY_OBJECT_RETURN(obj, t) do {} while (gcvFALSE)
+# define gcmVERIFY_OBJECT_RETURN(obj, t) do {} while (gcvFALSE)
+#endif
+
+/******************************************************************************\
+********************************** gckOS Object *********************************
+\******************************************************************************/
+
+/* Construct a new gckOS object. */
+gceSTATUS
+gckOS_Construct(
+ IN gctPOINTER Context,
+ OUT gckOS * Os
+ );
+
+/* Destroy an gckOS object. */
+gceSTATUS
+gckOS_Destroy(
+ IN gckOS Os
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckOS_QueryVideoMemory(
+ IN gckOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gckOS_Allocate(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gckOS_Free(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Wrapper for allocation memory.. */
+gceSTATUS
+gckOS_AllocateMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Wrapper for freeing memory. */
+gceSTATUS
+gckOS_FreeMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemoryEx(
+ IN gckOS Os,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Lock pages. */
+gceSTATUS
+gckOS_LockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Cacheable,
+ OUT gctPOINTER * Logical,
+ OUT gctSIZE_T * PageCount
+ );
+
+/* Map pages. */
+gceSTATUS
+gckOS_MapPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Logical,
+#endif
+ IN gctSIZE_T PageCount,
+ IN gctPOINTER PageTable
+ );
+
+/* Map pages. */
+gceSTATUS
+gckOS_MapPagesEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Logical,
+#endif
+ IN gctSIZE_T PageCount,
+ IN gctPOINTER PageTable
+ );
+
+/* Unlock pages. */
+gceSTATUS
+gckOS_UnlockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Free paged memory. */
+gceSTATUS
+gckOS_FreePagedMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Allocate non-paged memory. */
+gceSTATUS
+gckOS_AllocateNonPagedMemory(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non-paged memory. */
+gceSTATUS
+gckOS_FreeNonPagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gckOS_AllocateContiguous(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gckOS_FreeContiguous(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get the number fo bytes per page. */
+gceSTATUS
+gckOS_GetPageSize(
+ IN gckOS Os,
+ OUT gctSIZE_T * PageSize
+ );
+
+/* Get the physical address of a corresponding logical address. */
+gceSTATUS
+gckOS_GetPhysicalAddress(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+/* Get the physical address of a corresponding logical address. */
+gceSTATUS
+gckOS_GetPhysicalAddressProcess(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ IN gctUINT32 ProcessID,
+ OUT gctUINT32 * Address
+ );
+
+/* Map physical memory. */
+gceSTATUS
+gckOS_MapPhysical(
+ IN gckOS Os,
+ IN gctUINT32 Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap previously mapped physical memory. */
+gceSTATUS
+gckOS_UnmapPhysical(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Read data from a hardware register. */
+gceSTATUS
+gckOS_ReadRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+/* Read data from a hardware register. */
+gceSTATUS
+gckOS_ReadRegisterEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+/* Write data to a hardware register. */
+gceSTATUS
+gckOS_WriteRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Write data to a hardware register. */
+gceSTATUS
+gckOS_WriteRegisterEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Write data to a 32-bit memory location. */
+gceSTATUS
+gckOS_WriteMemory(
+ IN gckOS Os,
+ IN gctPOINTER Address,
+ IN gctUINT32 Data
+ );
+
+/* Map physical memory into the process space. */
+gceSTATUS
+gckOS_MapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap physical memory from the specified process space. */
+gceSTATUS
+gckOS_UnmapMemoryEx(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical,
+ IN gctUINT32 PID
+ );
+
+/* Unmap physical memory from the process space. */
+gceSTATUS
+gckOS_UnmapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Create a new mutex. */
+gceSTATUS
+gckOS_CreateMutex(
+ IN gckOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gckOS_DeleteMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gckOS_AcquireMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gckOS_ReleaseMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Atomically exchange a pair of 32-bit values. */
+gceSTATUS
+gckOS_AtomicExchange(
+ IN gckOS Os,
+ IN OUT gctUINT32_PTR Target,
+ IN gctUINT32 NewValue,
+ OUT gctUINT32_PTR OldValue
+ );
+
+/* Atomically exchange a pair of pointers. */
+gceSTATUS
+gckOS_AtomicExchangePtr(
+ IN gckOS Os,
+ IN OUT gctPOINTER * Target,
+ IN gctPOINTER NewValue,
+ OUT gctPOINTER * OldValue
+ );
+
+#if gcdSMP
+gceSTATUS
+gckOS_AtomSetMask(
+ IN gctPOINTER Atom,
+ IN gctUINT32 Mask
+ );
+
+gceSTATUS
+gckOS_AtomClearMask(
+ IN gctPOINTER Atom,
+ IN gctUINT32 Mask
+ );
+#endif
+
+gceSTATUS
+gckOS_DumpGPUState(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomConstruct
+**
+** Create an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** OUTPUT:
+**
+** gctPOINTER * Atom
+** Pointer to a variable receiving the constructed atom.
+*/
+gceSTATUS
+gckOS_AtomConstruct(
+ IN gckOS Os,
+ OUT gctPOINTER * Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDestroy
+**
+** Destroy an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom to destroy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_AtomDestroy(
+ IN gckOS Os,
+ OUT gctPOINTER Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomGet
+**
+** Get the 32-bit value protected by an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the value of the atom.
+*/
+gceSTATUS
+gckOS_AtomGet(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomSet
+**
+** Set the 32-bit value protected by an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** gctINT32 Value
+** The value of the atom.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_AtomSet(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ IN gctINT32 Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomIncrement
+**
+** Atomically increment the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomIncrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDecrement
+**
+** Atomically decrement the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomDecrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gckOS_Delay(
+ IN gckOS Os,
+ IN gctUINT32 Delay
+ );
+
+/* Get time in milliseconds. */
+gceSTATUS
+gckOS_GetTicks(
+ OUT gctUINT32_PTR Time
+ );
+
+/* Compare time value. */
+gceSTATUS
+gckOS_TicksAfter(
+ IN gctUINT32 Time1,
+ IN gctUINT32 Time2,
+ OUT gctBOOL_PTR IsAfter
+ );
+
+/* Get time in microseconds. */
+gceSTATUS
+gckOS_GetTime(
+ OUT gctUINT64_PTR Time
+ );
+
+/* Memory barrier. */
+gceSTATUS
+gckOS_MemoryBarrier(
+ IN gckOS Os,
+ IN gctPOINTER Address
+ );
+
+/* Map user pointer. */
+gceSTATUS
+gckOS_MapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Unmap user pointer. */
+gceSTATUS
+gckOS_UnmapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ IN gctPOINTER KernelPointer
+ );
+
+/*******************************************************************************
+**
+** gckOS_QueryNeedCopy
+**
+** Query whether the memory can be accessed or mapped directly or it has to be
+** copied.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to an gckOS object.
+**
+** gctUINT32 ProcessID
+** Process ID of the current process.
+**
+** OUTPUT:
+**
+** gctBOOL_PTR NeedCopy
+** Pointer to a boolean receiving gcvTRUE if the memory needs a copy or
+** gcvFALSE if the memory can be accessed or mapped dircetly.
+*/
+gceSTATUS
+gckOS_QueryNeedCopy(
+ IN gckOS Os,
+ IN gctUINT32 ProcessID,
+ OUT gctBOOL_PTR NeedCopy
+ );
+
+/*******************************************************************************
+**
+** gckOS_CopyFromUserData
+**
+** Copy data from user to kernel memory.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to an gckOS object.
+**
+** gctPOINTER KernelPointer
+** Pointer to kernel memory.
+**
+** gctPOINTER Pointer
+** Pointer to user memory.
+**
+** gctSIZE_T Size
+** Number of bytes to copy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_CopyFromUserData(
+ IN gckOS Os,
+ IN gctPOINTER KernelPointer,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size
+ );
+
+/*******************************************************************************
+**
+** gckOS_CopyToUserData
+**
+** Copy data from kernel to user memory.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to an gckOS object.
+**
+** gctPOINTER KernelPointer
+** Pointer to kernel memory.
+**
+** gctPOINTER Pointer
+** Pointer to user memory.
+**
+** gctSIZE_T Size
+** Number of bytes to copy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_CopyToUserData(
+ IN gckOS Os,
+ IN gctPOINTER KernelPointer,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size
+ );
+
+#ifdef __QNXNTO__
+/* Map user physical address. */
+gceSTATUS
+gckOS_MapUserPhysical(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Phys,
+ OUT gctPOINTER * KernelPointer
+ );
+#endif
+
+gceSTATUS
+gckOS_SuspendInterrupt(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_SuspendInterruptEx(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+gceSTATUS
+gckOS_ResumeInterrupt(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_ResumeInterruptEx(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gckOS_GetBaseAddress(
+ IN gckOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gckOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gckOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Device I/O control to the kernel HAL layer. */
+gceSTATUS
+gckOS_DeviceControl(
+ IN gckOS Os,
+ IN gctBOOL FromUser,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ OUT gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/*******************************************************************************
+**
+** gckOS_GetProcessID
+**
+** Get current process ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ProcessID
+** Pointer to the variable that receives the process ID.
+*/
+gceSTATUS
+gckOS_GetProcessID(
+ OUT gctUINT32_PTR ProcessID
+ );
+
+gceSTATUS
+gckOS_GetCurrentProcessID(
+ OUT gctUINT32_PTR ProcessID
+ );
+
+/*******************************************************************************
+**
+** gckOS_GetThreadID
+**
+** Get current thread ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ThreadID
+** Pointer to the variable that receives the thread ID.
+*/
+gceSTATUS
+gckOS_GetThreadID(
+ OUT gctUINT32_PTR ThreadID
+ );
+
+/******************************************************************************\
+********************************** Signal Object *********************************
+\******************************************************************************/
+
+/* Create a signal. */
+gceSTATUS
+gckOS_CreateSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gckOS_DestroySignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gckOS_Signal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gckOS_WaitSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Map a user signal to the kernel space. */
+gceSTATUS
+gckOS_MapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process,
+ OUT gctSIGNAL * MappedSignal
+ );
+
+/* Unmap a user signal */
+gceSTATUS
+gckOS_UnmapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Map user memory. */
+gceSTATUS
+gckOS_MapUserMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Map user memory. */
+gceSTATUS
+gckOS_MapUserMemoryEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gckOS_UnmapUserMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gckOS_UnmapUserMemoryEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+#if !USE_NEW_LINUX_SIGNAL
+/* Create signal to be used in the user space. */
+gceSTATUS
+gckOS_CreateUserSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctINT * SignalID
+ );
+
+/* Destroy signal used in the user space. */
+gceSTATUS
+gckOS_DestroyUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID
+ );
+
+/* Wait for signal used in the user space. */
+gceSTATUS
+gckOS_WaitUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctUINT32 Wait
+ );
+
+/* Signal a signal used in the user space. */
+gceSTATUS
+gckOS_SignalUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctBOOL State
+ );
+#endif /* USE_NEW_LINUX_SIGNAL */
+
+/* Set a signal owned by a process. */
+#if defined(__QNXNTO__)
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctINT Recvid,
+ IN gctINT Coid
+ );
+#else
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process
+ );
+#endif
+
+/******************************************************************************\
+** Cache Support
+*/
+
+gceSTATUS
+gckOS_CacheClean(
+ gckOS Os,
+ gctUINT32 ProcessID,
+ gctPHYS_ADDR Handle,
+ gctPOINTER Physical,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gckOS_CacheFlush(
+ gckOS Os,
+ gctUINT32 ProcessID,
+ gctPHYS_ADDR Handle,
+ gctPOINTER Physical,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gckOS_CacheInvalidate(
+ gckOS Os,
+ gctUINT32 ProcessID,
+ gctPHYS_ADDR Handle,
+ gctPOINTER Physical,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+** Debug Support
+*/
+
+void
+gckOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gckOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gckOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+/*******************************************************************************
+** Broadcast interface.
+*/
+
+typedef enum _gceBROADCAST
+{
+ /* GPU might be idle. */
+ gcvBROADCAST_GPU_IDLE,
+
+ /* A commit is going to happen. */
+ gcvBROADCAST_GPU_COMMIT,
+
+ /* GPU seems to be stuck. */
+ gcvBROADCAST_GPU_STUCK,
+
+ /* First process gets attached. */
+ gcvBROADCAST_FIRST_PROCESS,
+
+ /* Last process gets detached. */
+ gcvBROADCAST_LAST_PROCESS,
+
+ /* AXI bus error. */
+ gcvBROADCAST_AXI_BUS_ERROR,
+}
+gceBROADCAST;
+
+gceSTATUS
+gckOS_Broadcast(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gceBROADCAST Reason
+ );
+
+gceSTATUS
+gckOS_BroadcastHurry(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gctUINT Urgency
+ );
+
+gceSTATUS
+gckOS_BroadcastCalibrateSpeed(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gctUINT Idle,
+ IN gctUINT Time
+ );
+
+/*******************************************************************************
+**
+** gckOS_SetGPUPower
+**
+** Set the power of the GPU on or off.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.ß
+**
+** gctBOOL Clock
+** gcvTRUE to turn on the clock, or gcvFALSE to turn off the clock.
+**
+** gctBOOL Power
+** gcvTRUE to turn on the power, or gcvFALSE to turn off the power.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_SetGPUPower(
+ IN gckOS Os,
+ IN gctBOOL Clock,
+ IN gctBOOL Power
+ );
+
+/*******************************************************************************
+** Semaphores.
+*/
+
+/* Create a new semaphore. */
+gceSTATUS
+gckOS_CreateSemaphore(
+ IN gckOS Os,
+ OUT gctPOINTER * Semaphore
+ );
+
+#if gcdENABLE_VG
+gceSTATUS
+gckOS_CreateSemaphoreVG(
+ IN gckOS Os,
+ OUT gctPOINTER * Semaphore
+ );
+#endif
+
+/* Delete a semahore. */
+gceSTATUS
+gckOS_DestroySemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Acquire a semahore. */
+gceSTATUS
+gckOS_AcquireSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Try to acquire a semahore. */
+gceSTATUS
+gckOS_TryAcquireSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Release a semahore. */
+gceSTATUS
+gckOS_ReleaseSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/******************************************************************************\
+********************************* gckHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gckHEAP * gckHEAP;
+
+/* Construct a new gckHEAP object. */
+gceSTATUS
+gckHEAP_Construct(
+ IN gckOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gckHEAP * Heap
+ );
+
+/* Destroy an gckHEAP object. */
+gceSTATUS
+gckHEAP_Destroy(
+ IN gckHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gckHEAP_Allocate(
+ IN gckHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckHEAP_Free(
+ IN gckHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+/* Profile the heap. */
+gceSTATUS
+gckHEAP_ProfileStart(
+ IN gckHEAP Heap
+ );
+
+gceSTATUS
+gckHEAP_ProfileEnd(
+ IN gckHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+
+
+/******************************************************************************\
+******************************** gckVIDMEM Object ******************************
+\******************************************************************************/
+
+typedef struct _gckVIDMEM * gckVIDMEM;
+typedef struct _gckKERNEL * gckKERNEL;
+typedef struct _gckDB * gckDB;
+
+/* Construct a new gckVIDMEM object. */
+gceSTATUS
+gckVIDMEM_Construct(
+ IN gckOS Os,
+ IN gctUINT32 BaseAddress,
+ IN gctSIZE_T Bytes,
+ IN gctSIZE_T Threshold,
+ IN gctSIZE_T Banking,
+ OUT gckVIDMEM * Memory
+ );
+
+/* Destroy an gckVDIMEM object. */
+gceSTATUS
+gckVIDMEM_Destroy(
+ IN gckVIDMEM Memory
+ );
+
+/* Allocate rectangular memory. */
+gceSTATUS
+gckVIDMEM_Allocate(
+ IN gckVIDMEM Memory,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT BytesPerPixel,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Allocate linear memory. */
+gceSTATUS
+gckVIDMEM_AllocateLinear(
+ IN gckVIDMEM Memory,
+ IN gctSIZE_T Bytes,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckVIDMEM_Free(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+//####modified for marvell-bg2
+/* preFree memory. */
+#if USE_GALOIS_SHM
+gceSTATUS
+gckVIDMEM_PreFree(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+#endif
+//####end for marvell-bg2
+
+/* Lock memory. */
+gceSTATUS
+gckVIDMEM_Lock(
+ IN gckKERNEL Kernel,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctBOOL Cacheable,
+ OUT gctUINT32 * Address
+ );
+
+/* Unlock memory. */
+gceSTATUS
+gckVIDMEM_Unlock(
+ IN gckKERNEL Kernel,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type,
+ IN OUT gctBOOL * Asynchroneous
+ );
+
+/* Construct a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_ConstructVirtual(
+ IN gckKERNEL Kernel,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Destroy a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_DestroyVirtual(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/******************************************************************************\
+******************************** gckKERNEL Object ******************************
+\******************************************************************************/
+
+struct _gcsHAL_INTERFACE;
+
+/* Notifications. */
+typedef enum _gceNOTIFY
+{
+ gcvNOTIFY_INTERRUPT,
+ gcvNOTIFY_COMMAND_QUEUE,
+}
+gceNOTIFY;
+
+/* Flush flags. */
+typedef enum _gceKERNEL_FLUSH
+{
+ gcvFLUSH_COLOR = 0x01,
+ gcvFLUSH_DEPTH = 0x02,
+ gcvFLUSH_TEXTURE = 0x04,
+ gcvFLUSH_2D = 0x08,
+ gcvFLUSH_ALL = gcvFLUSH_COLOR
+ | gcvFLUSH_DEPTH
+ | gcvFLUSH_TEXTURE
+ | gcvFLUSH_2D,
+}
+gceKERNEL_FLUSH;
+
+/* Construct a new gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Construct(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPOINTER Context,
+ IN gckDB SharedDB,
+ OUT gckKERNEL * Kernel
+ );
+
+/* Destroy an gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Destroy(
+ IN gckKERNEL Kernel
+ );
+
+/* Dispatch a user-level command. */
+gceSTATUS
+gckKERNEL_Dispatch(
+ IN gckKERNEL Kernel,
+ IN gctBOOL FromUser,
+ IN OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckKERNEL_QueryVideoMemory(
+ IN gckKERNEL Kernel,
+ OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Lookup the gckVIDMEM object for a pool. */
+gceSTATUS
+gckKERNEL_GetVideoMemoryPool(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+#if gcdUSE_VIDMEM_PER_PID
+gceSTATUS
+gckKERNEL_GetVideoMemoryPoolPid(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ IN gctUINT32 Pid,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+gceSTATUS
+gckKERNEL_CreateVideoMemoryPoolPid(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ IN gctUINT32 Pid,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+gceSTATUS
+gckKERNEL_RemoveVideoMemoryPoolPid(
+ IN gckKERNEL Kernel,
+ IN gckVIDMEM VideoMemory
+ );
+#endif
+
+/* Map video memory. */
+gceSTATUS
+gckKERNEL_MapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Address,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes,
+#endif
+ OUT gctPOINTER * Logical
+ );
+
+/* Map video memory. */
+gceSTATUS
+gckKERNEL_MapVideoMemoryEx(
+ IN gckKERNEL Kernel,
+ IN gceCORE Core,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Address,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes,
+#endif
+ OUT gctPOINTER * Logical
+ );
+
+#ifdef __QNXNTO__
+/* Unmap video memory. */
+gceSTATUS
+gckKERNEL_UnmapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes
+ );
+#endif
+
+/* Map memory. */
+gceSTATUS
+gckKERNEL_MapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap memory. */
+gceSTATUS
+gckKERNEL_UnmapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Notification of events. */
+gceSTATUS
+gckKERNEL_Notify(
+ IN gckKERNEL Kernel,
+ IN gceNOTIFY Notifcation,
+ IN gctBOOL Data
+ );
+
+gceSTATUS
+gckKERNEL_QuerySettings(
+ IN gckKERNEL Kernel,
+ OUT gcsKERNEL_SETTINGS * Settings
+ );
+
+/*******************************************************************************
+**
+** gckKERNEL_Recovery
+**
+** Try to recover the GPU from a fatal error.
+**
+** INPUT:
+**
+** gckKERNEL Kernel
+** Pointer to an gckKERNEL object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckKERNEL_Recovery(
+ IN gckKERNEL Kernel
+ );
+
+/* Set the value of timeout on HW operation. */
+void
+gckKERNEL_SetTimeOut(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 timeOut
+ );
+
+/* Get access to the user data. */
+gceSTATUS
+gckKERNEL_OpenUserData(
+ IN gckKERNEL Kernel,
+ IN gctBOOL NeedCopy,
+ IN gctPOINTER StaticStorage,
+ IN gctPOINTER UserPointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Release resources associated with the user data connection. */
+gceSTATUS
+gckKERNEL_CloseUserData(
+ IN gckKERNEL Kernel,
+ IN gctBOOL NeedCopy,
+ IN gctBOOL FlushData,
+ IN gctPOINTER UserPointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/******************************************************************************\
+******************************* gckHARDWARE Object *****************************
+\******************************************************************************/
+
+/* Construct a new gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Construct(
+ IN gckOS Os,
+ IN gceCORE Core,
+ OUT gckHARDWARE * Hardware
+ );
+
+/* Destroy an gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Destroy(
+ IN gckHARDWARE Hardware
+ );
+
+/* Get hardware type. */
+gceSTATUS
+gckHARDWARE_GetType(
+ IN gckHARDWARE Hardware,
+ OUT gceHARDWARE_TYPE * Type
+ );
+
+/* Query system memory requirements. */
+gceSTATUS
+gckHARDWARE_QuerySystemMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * SystemSize,
+ OUT gctUINT32 * SystemBaseAddress
+ );
+
+/* Build virtual address. */
+gceSTATUS
+gckHARDWARE_BuildVirtualAddress(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Index,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Query command buffer requirements. */
+gceSTATUS
+gckHARDWARE_QueryCommandBuffer(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * Alignment,
+ OUT gctSIZE_T * ReservedHead,
+ OUT gctSIZE_T * ReservedTail
+ );
+
+/* Add a WAIT/LINK pair in the command queue. */
+gceSTATUS
+gckHARDWARE_WaitLink(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctUINT32 * WaitOffset,
+ OUT gctSIZE_T * WaitBytes
+ );
+
+/* Kickstart the command processor. */
+gceSTATUS
+gckHARDWARE_Execute(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Physical,
+ IN gctBOOL PhysicalAddresses,
+#endif
+ IN gctSIZE_T Bytes
+ );
+
+/* Add an END command in the command queue. */
+gceSTATUS
+gckHARDWARE_End(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a NOP command in the command queue. */
+gceSTATUS
+gckHARDWARE_Nop(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a WAIT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Wait(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Count,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a PIPESELECT command in the command queue. */
+gceSTATUS
+gckHARDWARE_PipeSelect(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gcePIPE_SELECT Pipe,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a LINK command in the command queue. */
+gceSTATUS
+gckHARDWARE_Link(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctPOINTER FetchAddress,
+ IN gctSIZE_T FetchSize,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add an EVENT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Event(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT8 Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Query the available memory. */
+gceSTATUS
+gckHARDWARE_QueryMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctUINT32 * InternalBaseAddress,
+ OUT gctUINT32 * InternalAlignment,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctUINT32 * ExternalBaseAddress,
+ OUT gctUINT32 * ExternalAlignment,
+ OUT gctUINT32 * HorizontalTileSize,
+ OUT gctUINT32 * VerticalTileSize
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gckHARDWARE_QueryChipIdentity(
+ IN gckHARDWARE Hardware,
+ OUT gcsHAL_QUERY_CHIP_IDENTITY_PTR Identity
+ );
+
+/* Query the shader support. */
+gceSTATUS
+gckHARDWARE_QueryShaderCaps(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT * VertexUniforms,
+ OUT gctUINT * FragmentUniforms,
+ OUT gctUINT * Varyings
+ );
+
+/* Split a harwdare specific address into API stuff. */
+gceSTATUS
+gckHARDWARE_SplitMemory(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Update command queue tail pointer. */
+gceSTATUS
+gckHARDWARE_UpdateQueueTail(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset
+ );
+
+/* Convert logical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertLogical(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+#ifdef __QNXNTO__
+/* Convert physical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertPhysical(
+ IN gckHARDWARE Hardware,
+ IN gctPHYS_ADDR Physical,
+ OUT gctUINT32 * Address
+ );
+#endif
+
+/* Interrupt manager. */
+gceSTATUS
+gckHARDWARE_Interrupt(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL InterruptValid
+ );
+
+/* Program MMU. */
+gceSTATUS
+gckHARDWARE_SetMMU(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical
+ );
+
+/* Flush the MMU. */
+gceSTATUS
+gckHARDWARE_FlushMMU(
+ IN gckHARDWARE Hardware
+ );
+
+/* Set the page table base address. */
+gceSTATUS
+gckHARDWARE_SetMMUv2(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Enable,
+ IN gctPOINTER MtlbAddress,
+ IN gceMMU_MODE Mode,
+ IN gctPOINTER SafeAddress,
+ IN gctBOOL FromPower
+ );
+
+/* Get idle register. */
+gceSTATUS
+gckHARDWARE_GetIdle(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Wait,
+ OUT gctUINT32 * Data
+ );
+
+/* Flush the caches. */
+gceSTATUS
+gckHARDWARE_Flush(
+ IN gckHARDWARE Hardware,
+ IN gceKERNEL_FLUSH Flush,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Enable/disable fast clear. */
+gceSTATUS
+gckHARDWARE_SetFastClear(
+ IN gckHARDWARE Hardware,
+ IN gctINT Enable,
+ IN gctINT Compression
+ );
+
+gceSTATUS
+gckHARDWARE_ReadInterrupt(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR IDs
+ );
+
+/* Power management. */
+gceSTATUS
+gckHARDWARE_SetPowerManagementState(
+ IN gckHARDWARE Hardware,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gckHARDWARE_QueryPowerManagementState(
+ IN gckHARDWARE Hardware,
+ OUT gceCHIPPOWERSTATE* State
+ );
+
+#if gcdPOWEROFF_TIMEOUT
+gceSTATUS
+gckHARDWARE_SetPowerOffTimeout(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Timeout
+);
+
+gceSTATUS
+gckHARDWARE_QueryPowerOffTimeout(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32* Timeout
+);
+#endif
+
+/* Profile 2D Engine. */
+gceSTATUS
+gckHARDWARE_ProfileEngine2D(
+ IN gckHARDWARE Hardware,
+ OUT gcs2D_PROFILE_PTR Profile
+ );
+
+gceSTATUS
+gckHARDWARE_InitializeHardware(
+ IN gckHARDWARE Hardware
+ );
+
+gceSTATUS
+gckHARDWARE_Reset(
+ IN gckHARDWARE Hardware
+ );
+
+typedef gceSTATUS (*gctISRMANAGERFUNC)(gctPOINTER Context);
+
+gceSTATUS
+gckHARDWARE_SetIsrManager(
+ IN gckHARDWARE Hardware,
+ IN gctISRMANAGERFUNC StartIsr,
+ IN gctISRMANAGERFUNC StopIsr,
+ IN gctPOINTER Context
+ );
+
+/* Start a composition. */
+gceSTATUS
+gckHARDWARE_Compose(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 ProcessID,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Offset,
+ IN gctSIZE_T Size,
+ IN gctUINT8 EventID
+ );
+
+/* Check for Hardware features. */
+gceSTATUS
+gckHARDWARE_IsFeatureAvailable(
+ IN gckHARDWARE Hardware,
+ IN gceFEATURE Feature
+ );
+
+#if !gcdENABLE_VG
+/******************************************************************************\
+***************************** gckINTERRUPT Object ******************************
+\******************************************************************************/
+
+typedef struct _gckINTERRUPT * gckINTERRUPT;
+
+typedef gceSTATUS (* gctINTERRUPT_HANDLER)(
+ IN gckKERNEL Kernel
+ );
+
+gceSTATUS
+gckINTERRUPT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckINTERRUPT * Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_Destroy(
+ IN gckINTERRUPT Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_SetHandler(
+ IN gckINTERRUPT Interrupt,
+ IN OUT gctINT32_PTR Id,
+ IN gctINTERRUPT_HANDLER Handler
+ );
+
+gceSTATUS
+gckINTERRUPT_Notify(
+ IN gckINTERRUPT Interrupt,
+ IN gctBOOL Valid
+ );
+#endif
+/******************************************************************************\
+******************************** gckEVENT Object *******************************
+\******************************************************************************/
+
+typedef struct _gckEVENT * gckEVENT;
+
+/* Construct a new gckEVENT object. */
+gceSTATUS
+gckEVENT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckEVENT * Event
+ );
+
+/* Destroy an gckEVENT object. */
+gceSTATUS
+gckEVENT_Destroy(
+ IN gckEVENT Event
+ );
+
+/* Reserve the next available hardware event. */
+gceSTATUS
+gckEVENT_GetEvent(
+ IN gckEVENT Event,
+ IN gctBOOL Wait,
+ OUT gctUINT8 * EventID,
+ IN gceKERNEL_WHERE Source
+ );
+
+/* Add a new event to the list of events. */
+gceSTATUS
+gckEVENT_AddList(
+ IN gckEVENT Event,
+ IN gcsHAL_INTERFACE_PTR Interface,
+ IN gceKERNEL_WHERE FromWhere,
+ IN gctBOOL AllocateAllowed
+ );
+
+/* Schedule a FreeNonPagedMemory event. */
+gceSTATUS
+gckEVENT_FreeNonPagedMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeContiguousMemory event. */
+gceSTATUS
+gckEVENT_FreeContiguousMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeVideoMemory event. */
+gceSTATUS
+gckEVENT_FreeVideoMemory(
+ IN gckEVENT Event,
+ IN gcuVIDMEM_NODE_PTR VideoMemory,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a signal event. */
+gceSTATUS
+gckEVENT_Signal(
+ IN gckEVENT Event,
+ IN gctSIGNAL Signal,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule an Unlock event. */
+gceSTATUS
+gckEVENT_Unlock(
+ IN gckEVENT Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type
+ );
+
+gceSTATUS
+gckEVENT_CommitDone(
+ IN gckEVENT Event,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+gceSTATUS
+gckEVENT_Submit(
+ IN gckEVENT Event,
+ IN gctBOOL Wait,
+ IN gctBOOL FromPower
+ );
+
+/* Commit an event queue. */
+gceSTATUS
+gckEVENT_Commit(
+ IN gckEVENT Event,
+ IN gcsQUEUE_PTR Queue
+ );
+
+/* Schedule a composition event. */
+gceSTATUS
+gckEVENT_Compose(
+ IN gckEVENT Event,
+ IN gcsHAL_COMPOSE_PTR Info
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Notify(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Interrupt(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+gceSTATUS
+gckEVENT_Dump(
+ IN gckEVENT Event
+ );
+/******************************************************************************\
+******************************* gckCOMMAND Object ******************************
+\******************************************************************************/
+
+typedef struct _gckCOMMAND * gckCOMMAND;
+
+/* Construct a new gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckCOMMAND * Command
+ );
+
+/* Destroy an gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Destroy(
+ IN gckCOMMAND Command
+ );
+
+/* Acquire command queue synchronization objects. */
+gceSTATUS
+gckCOMMAND_EnterCommit(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromPower
+ );
+
+/* Release command queue synchronization objects. */
+gceSTATUS
+gckCOMMAND_ExitCommit(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromPower
+ );
+
+/* Start the command queue. */
+gceSTATUS
+gckCOMMAND_Start(
+ IN gckCOMMAND Command
+ );
+
+/* Stop the command queue. */
+gceSTATUS
+gckCOMMAND_Stop(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromRecovery
+ );
+
+/* Commit a buffer to the command queue. */
+gceSTATUS
+gckCOMMAND_Commit(
+ IN gckCOMMAND Command,
+ IN gckCONTEXT Context,
+ IN gcoCMDBUF CommandBuffer,
+ IN gcsSTATE_DELTA_PTR StateDelta,
+ IN gcsQUEUE_PTR EventQueue,
+ IN gctUINT32 ProcessID
+ );
+
+/* Reserve space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Reserve(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequestedBytes,
+ OUT gctPOINTER * Buffer,
+ OUT gctSIZE_T * BufferSize
+ );
+
+/* Execute reserved space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Execute(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequstedBytes
+ );
+
+/* Stall the command queue. */
+gceSTATUS
+gckCOMMAND_Stall(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromPower
+ );
+
+/* Attach user process. */
+gceSTATUS
+gckCOMMAND_Attach(
+ IN gckCOMMAND Command,
+ OUT gckCONTEXT * Context,
+ OUT gctSIZE_T * StateCount,
+ IN gctUINT32 ProcessID
+ );
+
+/* Detach user process. */
+gceSTATUS
+gckCOMMAND_Detach(
+ IN gckCOMMAND Command,
+ IN gckCONTEXT Context
+ );
+
+/******************************************************************************\
+********************************* gckMMU Object ********************************
+\******************************************************************************/
+
+typedef struct _gckMMU * gckMMU;
+
+/* Construct a new gckMMU object. */
+gceSTATUS
+gckMMU_Construct(
+ IN gckKERNEL Kernel,
+ IN gctSIZE_T MmuSize,
+ OUT gckMMU * Mmu
+ );
+
+/* Destroy an gckMMU object. */
+gceSTATUS
+gckMMU_Destroy(
+ IN gckMMU Mmu
+ );
+
+/* Enable the MMU. */
+gceSTATUS
+gckMMU_Enable(
+ IN gckMMU Mmu,
+ IN gctUINT32 PhysBaseAddr,
+ IN gctUINT32 PhysSize
+ );
+
+/* Allocate pages inside the MMU. */
+gceSTATUS
+gckMMU_AllocatePages(
+ IN gckMMU Mmu,
+ IN gctSIZE_T PageCount,
+ OUT gctPOINTER * PageTable,
+ OUT gctUINT32 * Address
+ );
+
+/* Remove a page table from the MMU. */
+gceSTATUS
+gckMMU_FreePages(
+ IN gckMMU Mmu,
+ IN gctPOINTER PageTable,
+ IN gctSIZE_T PageCount
+ );
+
+/* Set the MMU page with info. */
+gceSTATUS
+gckMMU_SetPage(
+ IN gckMMU Mmu,
+ IN gctUINT32 PageAddress,
+ IN gctUINT32 *PageEntry
+ );
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_InsertNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+
+gceSTATUS
+gckMMU_RemoveNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+#endif
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_FreeHandleMemory(
+ IN gckKERNEL Kernel,
+ IN gckMMU Mmu,
+ IN gctUINT32 Pid
+ );
+#endif
+
+gceSTATUS
+gckMMU_Flush(
+ IN gckMMU Mmu
+ );
+
+
+#if VIVANTE_PROFILER
+gceSTATUS
+gckHARDWARE_QueryProfileRegisters(
+ IN gckHARDWARE Hardware,
+ OUT gcsPROFILER_COUNTERS * Counters
+ );
+#endif
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#if gcdENABLE_VG
+#include "gc_hal_vg.h"
+#endif
+
+#endif /* __gc_hal_h_ */
diff --git a/src/include_eureka/gc_hal_base.h b/src/include_eureka/gc_hal_base.h
new file mode 100644
index 0000000..72e23ad
--- /dev/null
+++ b/src/include_eureka/gc_hal_base.h
@@ -0,0 +1,3612 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_base_h_
+#define __gc_hal_base_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#include "gc_hal_dump.h"
+#include "gc_hal_md5.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gckOS * gckOS;
+typedef struct _gcoHAL * gcoHAL;
+typedef struct _gcoOS * gcoOS;
+typedef struct _gco2D * gco2D;
+
+#ifndef VIVANTE_NO_3D
+typedef struct _gco3D * gco3D;
+#endif
+
+typedef struct _gcoSURF * gcoSURF;
+typedef struct _gcsSURF_INFO * gcsSURF_INFO_PTR;
+typedef struct _gcsSURF_NODE * gcsSURF_NODE_PTR;
+typedef struct _gcsSURF_FORMAT_INFO * gcsSURF_FORMAT_INFO_PTR;
+typedef struct _gcsPOINT * gcsPOINT_PTR;
+typedef struct _gcsSIZE * gcsSIZE_PTR;
+typedef struct _gcsRECT * gcsRECT_PTR;
+typedef struct _gcsBOUNDARY * gcsBOUNDARY_PTR;
+typedef struct _gcoDUMP * gcoDUMP;
+typedef struct _gcoHARDWARE * gcoHARDWARE;
+typedef union _gcuVIDMEM_NODE * gcuVIDMEM_NODE_PTR;
+
+#if gcdENABLE_VG
+typedef struct _gcoVG * gcoVG;
+typedef struct _gcsCOMPLETION_SIGNAL * gcsCOMPLETION_SIGNAL_PTR;
+typedef struct _gcsCONTEXT_MAP * gcsCONTEXT_MAP_PTR;
+#else
+typedef void * gcoVG;
+#endif
+
+/******************************************************************************\
+******************************* Process local storage *************************
+\******************************************************************************/
+
+typedef struct _gcsPLS * gcsPLS_PTR;
+typedef struct _gcsPLS
+{
+ /* Global objects. */
+ gcoOS os;
+ gcoHAL hal;
+
+ /* Internal memory pool. */
+ gctSIZE_T internalSize;
+ gctPHYS_ADDR internalPhysical;
+ gctPOINTER internalLogical;
+
+ /* External memory pool. */
+ gctSIZE_T externalSize;
+ gctPHYS_ADDR externalPhysical;
+ gctPOINTER externalLogical;
+
+ /* Contiguous memory pool. */
+ gctSIZE_T contiguousSize;
+ gctPHYS_ADDR contiguousPhysical;
+ gctPOINTER contiguousLogical;
+
+ /* EGL-specific process-wide objects. */
+ gctPOINTER eglDisplayInfo;
+ gctPOINTER eglSurfaceInfo;
+}
+gcsPLS;
+
+extern gcsPLS gcPLS;
+
+/******************************************************************************\
+******************************* Thread local storage *************************
+\******************************************************************************/
+
+typedef struct _gcsTLS * gcsTLS_PTR;
+
+typedef void (* gctTLS_DESTRUCTOR) (
+ gcsTLS_PTR TLS
+ );
+
+typedef struct _gcsTLS
+{
+ gceHARDWARE_TYPE currentType;
+ gcoHARDWARE hardware;
+ /* Only for separated 3D and 2D */
+ gcoHARDWARE hardware2D;
+#if gcdENABLE_VG
+ gcoVGHARDWARE vg;
+ gcoVG engineVG;
+#endif /* gcdENABLE_VG */
+ gctPOINTER context;
+ gctTLS_DESTRUCTOR destructor;
+ gctBOOL ProcessExiting;
+
+#ifndef VIVANTE_NO_3D
+ gco3D engine3D;
+#endif
+ gco2D engine2D;
+}
+gcsTLS;
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+typedef enum _gcePLS_VALUE
+{
+ gcePLS_VALUE_EGL_DISPLAY_INFO,
+ gcePLS_VALUE_EGL_SURFACE_INFO
+}
+gcePLS_VALUE;
+
+/* Video memory pool type. */
+typedef enum _gcePOOL
+{
+ gcvPOOL_UNKNOWN = 0,
+ gcvPOOL_DEFAULT,
+ gcvPOOL_LOCAL,
+ gcvPOOL_LOCAL_INTERNAL,
+ gcvPOOL_LOCAL_EXTERNAL,
+ gcvPOOL_UNIFIED,
+ gcvPOOL_SYSTEM,
+ gcvPOOL_VIRTUAL,
+ gcvPOOL_USER,
+ gcvPOOL_CONTIGUOUS,
+
+ gcvPOOL_NUMBER_OF_POOLS
+}
+gcePOOL;
+
+#ifndef VIVANTE_NO_3D
+/* Blending functions. */
+typedef enum _gceBLEND_FUNCTION
+{
+ gcvBLEND_ZERO,
+ gcvBLEND_ONE,
+ gcvBLEND_SOURCE_COLOR,
+ gcvBLEND_INV_SOURCE_COLOR,
+ gcvBLEND_SOURCE_ALPHA,
+ gcvBLEND_INV_SOURCE_ALPHA,
+ gcvBLEND_TARGET_COLOR,
+ gcvBLEND_INV_TARGET_COLOR,
+ gcvBLEND_TARGET_ALPHA,
+ gcvBLEND_INV_TARGET_ALPHA,
+ gcvBLEND_SOURCE_ALPHA_SATURATE,
+ gcvBLEND_CONST_COLOR,
+ gcvBLEND_INV_CONST_COLOR,
+ gcvBLEND_CONST_ALPHA,
+ gcvBLEND_INV_CONST_ALPHA,
+}
+gceBLEND_FUNCTION;
+
+/* Blending modes. */
+typedef enum _gceBLEND_MODE
+{
+ gcvBLEND_ADD,
+ gcvBLEND_SUBTRACT,
+ gcvBLEND_REVERSE_SUBTRACT,
+ gcvBLEND_MIN,
+ gcvBLEND_MAX,
+}
+gceBLEND_MODE;
+
+/* API flags. */
+typedef enum _gceAPI
+{
+ gcvAPI_D3D = 0x1,
+ gcvAPI_OPENGL = 0x2,
+ gcvAPI_OPENVG = 0x3,
+ gcvAPI_OPENCL = 0x4,
+}
+gceAPI;
+
+/* Depth modes. */
+typedef enum _gceDEPTH_MODE
+{
+ gcvDEPTH_NONE,
+ gcvDEPTH_Z,
+ gcvDEPTH_W,
+}
+gceDEPTH_MODE;
+#endif /* VIVANTE_NO_3D */
+
+typedef enum _gceWHERE
+{
+ gcvWHERE_COMMAND,
+ gcvWHERE_RASTER,
+ gcvWHERE_PIXEL,
+}
+gceWHERE;
+
+typedef enum _gceHOW
+{
+ gcvHOW_SEMAPHORE = 0x1,
+ gcvHOW_STALL = 0x2,
+ gcvHOW_SEMAPHORE_STALL = 0x3,
+}
+gceHOW;
+
+typedef enum _gceSignalHandlerType
+{
+ gcvHANDLE_SIGFPE_WHEN_SIGNAL_CODE_IS_0 = 0x1,
+}
+gceSignalHandlerType;
+
+
+#if gcdENABLE_VG
+/* gcsHAL_Limits*/
+typedef struct _gcsHAL_LIMITS
+{
+ /* chip info */
+ gceCHIPMODEL chipModel;
+ gctUINT32 chipRevision;
+ gctUINT32 featureCount;
+ gctUINT32 *chipFeatures;
+
+ /* target caps */
+ gctUINT32 maxWidth;
+ gctUINT32 maxHeight;
+ gctUINT32 multiTargetCount;
+ gctUINT32 maxSamples;
+
+}gcsHAL_LIMITS;
+#endif
+
+/******************************************************************************\
+*********** Generic Memory Allocation Optimization Using Containers ************
+\******************************************************************************/
+
+/* Generic container definition. */
+typedef struct _gcsCONTAINER_LINK * gcsCONTAINER_LINK_PTR;
+typedef struct _gcsCONTAINER_LINK
+{
+ /* Points to the next container. */
+ gcsCONTAINER_LINK_PTR next;
+}
+gcsCONTAINER_LINK;
+
+typedef struct _gcsCONTAINER_RECORD * gcsCONTAINER_RECORD_PTR;
+typedef struct _gcsCONTAINER_RECORD
+{
+ gcsCONTAINER_RECORD_PTR prev;
+ gcsCONTAINER_RECORD_PTR next;
+}
+gcsCONTAINER_RECORD;
+
+typedef struct _gcsCONTAINER * gcsCONTAINER_PTR;
+typedef struct _gcsCONTAINER
+{
+ gctUINT containerSize;
+ gctUINT recordSize;
+ gctUINT recordCount;
+ gcsCONTAINER_LINK_PTR containers;
+ gcsCONTAINER_RECORD freeList;
+ gcsCONTAINER_RECORD allocList;
+}
+gcsCONTAINER;
+
+gceSTATUS
+gcsCONTAINER_Construct(
+ IN gcsCONTAINER_PTR Container,
+ gctUINT RecordsPerContainer,
+ gctUINT RecordSize
+ );
+
+gceSTATUS
+gcsCONTAINER_Destroy(
+ IN gcsCONTAINER_PTR Container
+ );
+
+gceSTATUS
+gcsCONTAINER_AllocateRecord(
+ IN gcsCONTAINER_PTR Container,
+ OUT gctPOINTER * Record
+ );
+
+gceSTATUS
+gcsCONTAINER_FreeRecord(
+ IN gcsCONTAINER_PTR Container,
+ IN gctPOINTER Record
+ );
+
+gceSTATUS
+gcsCONTAINER_FreeAll(
+ IN gcsCONTAINER_PTR Container
+ );
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Construct a new gcoHAL object. */
+gceSTATUS
+gcoHAL_Construct(
+ IN gctPOINTER Context,
+ IN gcoOS Os,
+ OUT gcoHAL * Hal
+ );
+
+/* Destroy an gcoHAL object. */
+gceSTATUS
+gcoHAL_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Get pointer to gco2D object. */
+gceSTATUS
+gcoHAL_Get2DEngine(
+ IN gcoHAL Hal,
+ OUT gco2D * Engine
+ );
+
+#ifndef VIVANTE_NO_3D
+/* Get pointer to gco3D object. */
+gceSTATUS
+gcoHAL_Get3DEngine(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+gceSTATUS
+gcoHAL_Query3DEngine(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+gceSTATUS
+gcoHAL_Set3DEngine(
+ IN gcoHAL Hal,
+ IN gco3D Engine
+ );
+
+gceSTATUS
+gcoHAL_Get3DHardware(
+ IN gcoHAL Hal,
+ OUT gcoHARDWARE * Hardware
+ );
+
+gceSTATUS
+gcoHAL_Set3DHardware(
+ IN gcoHAL Hal,
+ IN gcoHARDWARE Hardware
+ );
+
+
+#endif /* VIVANTE_NO_3D */
+
+/* Verify whether the specified feature is available in hardware. */
+gceSTATUS
+gcoHAL_IsFeatureAvailable(
+ IN gcoHAL Hal,
+ IN gceFEATURE Feature
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gcoHAL_QueryChipIdentity(
+ IN gcoHAL Hal,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the minor features of the hardware. */
+gceSTATUS gcoHAL_QueryChipMinorFeatures(
+ IN gcoHAL Hal,
+ OUT gctUINT32* NumFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the amount of video memory. */
+gceSTATUS
+gcoHAL_QueryVideoMemory(
+ IN gcoHAL Hal,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Map video memory. */
+gceSTATUS
+gcoHAL_MapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap video memory. */
+gceSTATUS
+gcoHAL_UnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a buffer mapped through its physical address. */
+gceSTATUS
+gcoHAL_ScheduleUnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a user buffer using event mechanism. */
+gceSTATUS
+gcoHAL_ScheduleUnmapUserMemory(
+ IN gcoHAL Hal,
+ IN gctPOINTER Info,
+ IN gctSIZE_T Size,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory
+ );
+
+/* Commit the current command buffer. */
+gceSTATUS
+gcoHAL_Commit(
+ IN gcoHAL Hal,
+ IN gctBOOL Stall
+ );
+
+/* Query the tile capabilities. */
+gceSTATUS
+gcoHAL_QueryTiled(
+ IN gcoHAL Hal,
+ OUT gctINT32 * TileWidth2D,
+ OUT gctINT32 * TileHeight2D,
+ OUT gctINT32 * TileWidth3D,
+ OUT gctINT32 * TileHeight3D
+ );
+
+gceSTATUS
+gcoHAL_Compact(
+ IN gcoHAL Hal
+ );
+
+#if VIVANTE_PROFILER /*gcdENABLE_PROFILING*/
+gceSTATUS
+gcoHAL_ProfileStart(
+ IN gcoHAL Hal
+ );
+
+gceSTATUS
+gcoHAL_ProfileEnd(
+ IN gcoHAL Hal,
+ IN gctCONST_STRING Title
+ );
+#endif
+
+/* Power Management */
+gceSTATUS
+gcoHAL_SetPowerManagementState(
+ IN gcoHAL Hal,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gcoHAL_QueryPowerManagementState(
+ IN gcoHAL Hal,
+ OUT gceCHIPPOWERSTATE *State
+ );
+
+/* Set the filter type for filter blit. */
+gceSTATUS
+gcoHAL_SetFilterType(
+ IN gcoHAL Hal,
+ IN gceFILTER_TYPE FilterType
+ );
+
+gceSTATUS
+gcoHAL_GetDump(
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Call the kernel HAL layer. */
+gceSTATUS
+gcoHAL_Call(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Schedule an event. */
+gceSTATUS
+gcoHAL_ScheduleEvent(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Destroy a surface. */
+gceSTATUS
+gcoHAL_DestroySurface(
+ IN gcoHAL Hal,
+ IN gcoSURF Surface
+ );
+
+/* Request a start/stop timestamp. */
+gceSTATUS
+gcoHAL_SetTimer(
+ IN gcoHAL Hal,
+ IN gctUINT32 Index,
+ IN gctBOOL Start
+ );
+
+/* Get Time delta from a Timer in microseconds. */
+gceSTATUS
+gcoHAL_GetTimerTime(
+ IN gcoHAL Hal,
+ IN gctUINT32 Timer,
+ OUT gctINT32_PTR TimeDelta
+ );
+
+/* set timeout value. */
+gceSTATUS
+gcoHAL_SetTimeOut(
+ IN gcoHAL Hal,
+ IN gctUINT32 timeOut
+ );
+
+gceSTATUS
+gcoHAL_SetHardwareType(
+ IN gcoHAL Hal,
+ IN gceHARDWARE_TYPE HardwardType
+ );
+
+gceSTATUS
+gcoHAL_GetHardwareType(
+ IN gcoHAL Hal,
+ OUT gceHARDWARE_TYPE * HardwardType
+ );
+
+gceSTATUS
+gcoHAL_QueryChipCount(
+ IN gcoHAL Hal,
+ OUT gctINT32 * Count
+ );
+
+gceSTATUS
+gcoHAL_QuerySeparated3D2D(
+ IN gcoHAL Hal
+ );
+
+/* Get pointer to gcoVG object. */
+gceSTATUS
+gcoHAL_GetVGEngine(
+ IN gcoHAL Hal,
+ OUT gcoVG * Engine
+ );
+
+#if gcdENABLE_VG
+gceSTATUS
+gcoHAL_QueryChipLimits(
+ IN gcoHAL Hal,
+ IN gctINT32 Chip,
+ OUT gcsHAL_LIMITS *Limits);
+
+gceSTATUS
+gcoHAL_QueryChipFeature(
+ IN gcoHAL Hal,
+ IN gctINT32 Chip,
+ IN gceFEATURE Feature);
+
+#endif
+/******************************************************************************\
+********************************** gcoOS Object *********************************
+\******************************************************************************/
+
+/* Get PLS value for given key */
+gctPOINTER
+gcoOS_GetPLSValue(
+ IN gcePLS_VALUE key
+ );
+
+/* Set PLS value of a given key */
+void
+gcoOS_SetPLSValue(
+ IN gcePLS_VALUE key,
+ OUT gctPOINTER value
+ );
+
+/* Get access to the thread local storage. */
+gceSTATUS
+gcoOS_GetTLS(
+ OUT gcsTLS_PTR * TLS
+ );
+
+/* Destroy the objects associated with the current thread. */
+void
+gcoOS_FreeThreadData(
+ IN gctBOOL ProcessExiting
+ );
+
+/* Construct a new gcoOS object. */
+gceSTATUS
+gcoOS_Construct(
+ IN gctPOINTER Context,
+ OUT gcoOS * Os
+ );
+
+/* Destroy an gcoOS object. */
+gceSTATUS
+gcoOS_Destroy(
+ IN gcoOS Os
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gcoOS_GetBaseAddress(
+ IN gcoOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gcoOS_Allocate(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Get allocated memory size. */
+gceSTATUS
+gcoOS_GetMemorySize(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ OUT gctSIZE_T_PTR MemorySize
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gcoOS_Free(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoOS_AllocateMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoOS_FreeMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gcoOS_AllocateContiguous(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gcoOS_FreeContiguous(
+ IN gcoOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+#if gcdENABLE_BANK_ALIGNMENT
+gceSTATUS
+gcoSURF_GetBankOffsetBytes(
+ IN gcoSURF Surfce,
+ IN gceSURF_TYPE Type,
+ IN gctUINT32 Stride,
+ IN gctUINT32_PTR Bytes
+ );
+#endif
+
+/* Map user memory. */
+gceSTATUS
+gcoOS_MapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gcoOS_UnmapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+/* Device I/O Control call to the kernel HAL layer. */
+gceSTATUS
+gcoOS_DeviceControl(
+ IN gcoOS Os,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ IN gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/* Allocate non paged memory. */
+gceSTATUS
+gcoOS_AllocateNonPagedMemory(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non paged memory. */
+gceSTATUS
+gcoOS_FreeNonPagedMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+#define gcmOS_SAFE_FREE(os, mem) \
+ gcoOS_Free(os, mem); \
+ mem = gcvNULL
+
+#define gcmkOS_SAFE_FREE(os, mem) \
+ gckOS_Free(os, mem); \
+ mem = gcvNULL
+
+typedef enum _gceFILE_MODE
+{
+ gcvFILE_CREATE = 0,
+ gcvFILE_APPEND,
+ gcvFILE_READ,
+ gcvFILE_CREATETEXT,
+ gcvFILE_APPENDTEXT,
+ gcvFILE_READTEXT,
+}
+gceFILE_MODE;
+
+/* Open a file. */
+gceSTATUS
+gcoOS_Open(
+ IN gcoOS Os,
+ IN gctCONST_STRING FileName,
+ IN gceFILE_MODE Mode,
+ OUT gctFILE * File
+ );
+
+/* Close a file. */
+gceSTATUS
+gcoOS_Close(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Read data from a file. */
+gceSTATUS
+gcoOS_Read(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctPOINTER Data,
+ OUT gctSIZE_T * ByteRead
+ );
+
+/* Write data to a file. */
+gceSTATUS
+gcoOS_Write(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Flush data to a file. */
+gceSTATUS
+gcoOS_Flush(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Create an endpoint for communication. */
+gceSTATUS
+gcoOS_Socket(
+ IN gcoOS Os,
+ IN gctINT Domain,
+ IN gctINT Type,
+ IN gctINT Protocol,
+ OUT gctINT *SockFd
+ );
+
+/* Close a socket. */
+gceSTATUS
+gcoOS_CloseSocket(
+ IN gcoOS Os,
+ IN gctINT SockFd
+ );
+
+/* Initiate a connection on a socket. */
+gceSTATUS
+gcoOS_Connect(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctCONST_POINTER HostName,
+ IN gctUINT Port);
+
+/* Shut down part of connection on a socket. */
+gceSTATUS
+gcoOS_Shutdown(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctINT How
+ );
+
+/* Send a message on a socket. */
+gceSTATUS
+gcoOS_Send(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data,
+ IN gctINT Flags
+ );
+
+/* Initiate a connection on a socket. */
+gceSTATUS
+gcoOS_WaitForSend(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctINT Seconds,
+ IN gctINT MicroSeconds);
+
+/* Get environment variable value. */
+gceSTATUS
+gcoOS_GetEnv(
+ IN gcoOS Os,
+ IN gctCONST_STRING VarName,
+ OUT gctSTRING * Value
+ );
+
+/* Get current working directory. */
+gceSTATUS
+gcoOS_GetCwd(
+ IN gcoOS Os,
+ IN gctINT SizeInBytes,
+ OUT gctSTRING Buffer
+ );
+
+/* Get file status info. */
+gceSTATUS
+gcoOS_Stat(
+ IN gcoOS Os,
+ IN gctCONST_STRING FileName,
+ OUT gctPOINTER Buffer
+ );
+
+typedef enum _gceFILE_WHENCE
+{
+ gcvFILE_SEEK_SET,
+ gcvFILE_SEEK_CUR,
+ gcvFILE_SEEK_END
+}
+gceFILE_WHENCE;
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_Seek(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Offset,
+ IN gceFILE_WHENCE Whence
+ );
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_SetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Position
+ );
+
+/* Get the current position of a file. */
+gceSTATUS
+gcoOS_GetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ OUT gctUINT32 * Position
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gcoOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Perform a memory fill. */
+gceSTATUS
+gcoOS_MemFill(
+ IN gctPOINTER Destination,
+ IN gctUINT8 Filler,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gcoOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Same as strstr. */
+gceSTATUS
+gcoOS_StrStr(
+ IN gctCONST_STRING String,
+ IN gctCONST_STRING SubString,
+ OUT gctSTRING * Output
+ );
+
+/* Find the last occurance of a character inside a string. */
+gceSTATUS
+gcoOS_StrFindReverse(
+ IN gctCONST_STRING String,
+ IN gctINT8 Character,
+ OUT gctSTRING * Output
+ );
+
+gceSTATUS
+gcoOS_StrLen(
+ IN gctCONST_STRING String,
+ OUT gctSIZE_T * Length
+ );
+
+gceSTATUS
+gcoOS_StrDup(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ OUT gctSTRING * Target
+ );
+
+/* Copy a string. */
+gceSTATUS
+gcoOS_StrCopySafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Append a string. */
+gceSTATUS
+gcoOS_StrCatSafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Compare two strings. */
+gceSTATUS
+gcoOS_StrCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2
+ );
+
+/* Compare characters of two strings. */
+gceSTATUS
+gcoOS_StrNCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2,
+ IN gctSIZE_T Count
+ );
+
+/* Convert string to float. */
+gceSTATUS
+gcoOS_StrToFloat(
+ IN gctCONST_STRING String,
+ OUT gctFLOAT * Float
+ );
+
+/* Convert hex string to integer. */
+gceSTATUS gcoOS_HexStrToInt(
+ IN gctCONST_STRING String,
+ OUT gctINT * Int
+ );
+
+/* Convert hex string to float. */
+gceSTATUS gcoOS_HexStrToFloat(
+ IN gctCONST_STRING String,
+ OUT gctFLOAT * Float
+ );
+
+/* Convert string to integer. */
+gceSTATUS
+gcoOS_StrToInt(
+ IN gctCONST_STRING String,
+ OUT gctINT * Int
+ );
+
+gceSTATUS
+gcoOS_MemCmp(
+ IN gctCONST_POINTER Memory1,
+ IN gctCONST_POINTER Memory2,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_PrintStrSafe(
+ OUT gctSTRING String,
+ IN gctSIZE_T StringSize,
+ IN OUT gctUINT * Offset,
+ IN gctCONST_STRING Format,
+ ...
+ );
+
+gceSTATUS
+gcoOS_LoadLibrary(
+ IN gcoOS Os,
+ IN gctCONST_STRING Library,
+ OUT gctHANDLE * Handle
+ );
+
+gceSTATUS
+gcoOS_FreeLibrary(
+ IN gcoOS Os,
+ IN gctHANDLE Handle
+ );
+
+gceSTATUS
+gcoOS_GetProcAddress(
+ IN gcoOS Os,
+ IN gctHANDLE Handle,
+ IN gctCONST_STRING Name,
+ OUT gctPOINTER * Function
+ );
+
+gceSTATUS
+gcoOS_Compact(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_AddSignalHandler (
+ IN gceSignalHandlerType SignalHandlerType
+ );
+
+#if VIVANTE_PROFILER /*gcdENABLE_PROFILING*/
+gceSTATUS
+gcoOS_ProfileStart(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_ProfileEnd(
+ IN gcoOS Os,
+ IN gctCONST_STRING Title
+ );
+
+gceSTATUS
+gcoOS_SetProfileSetting(
+ IN gcoOS Os,
+ IN gctBOOL Enable,
+ IN gctCONST_STRING FileName
+ );
+#endif
+
+/* Query the video memory. */
+gceSTATUS
+gcoOS_QueryVideoMemory(
+ IN gcoOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Detect if the process is the executable specified. */
+gceSTATUS
+gcoOS_DetectProcessByName(
+ IN gctCONST_STRING Name
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Atoms ----------------------------------------------------------------*/
+
+typedef struct gcsATOM * gcsATOM_PTR;
+
+/* Construct an atom. */
+gceSTATUS
+gcoOS_AtomConstruct(
+ IN gcoOS Os,
+ OUT gcsATOM_PTR * Atom
+ );
+
+/* Destroy an atom. */
+gceSTATUS
+gcoOS_AtomDestroy(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom
+ );
+
+/* Increment an atom. */
+gceSTATUS
+gcoOS_AtomIncrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+/* Decrement an atom. */
+gceSTATUS
+gcoOS_AtomDecrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+gctHANDLE
+gcoOS_GetCurrentProcessID(
+ void
+ );
+
+gctHANDLE
+gcoOS_GetCurrentThreadID(
+ void
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Time -----------------------------------------------------------------*/
+
+/* Get the number of milliseconds since the system started. */
+gctUINT32
+gcoOS_GetTicks(
+ void
+ );
+
+/* Get time in microseconds. */
+gceSTATUS
+gcoOS_GetTime(
+ gctUINT64_PTR Time
+ );
+
+/* Get CPU usage in microseconds. */
+gceSTATUS
+gcoOS_GetCPUTime(
+ gctUINT64_PTR CPUTime
+ );
+
+/* Get memory usage. */
+gceSTATUS
+gcoOS_GetMemoryUsage(
+ gctUINT32_PTR MaxRSS,
+ gctUINT32_PTR IxRSS,
+ gctUINT32_PTR IdRSS,
+ gctUINT32_PTR IsRSS
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gcoOS_Delay(
+ IN gcoOS Os,
+ IN gctUINT32 Delay
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Threads --------------------------------------------------------------*/
+
+#ifdef _WIN32
+/* Cannot include windows.h here becuase "near" and "far"
+ * which are used in gcsDEPTH_INFO, are defined to nothing in WinDef.h.
+ * So, use the real value of DWORD and WINAPI, instead.
+ * DWORD is unsigned long, and WINAPI is __stdcall.
+ * If these two are change in WinDef.h, the following two typdefs
+ * need to be changed, too.
+ */
+typedef unsigned long gctTHREAD_RETURN;
+typedef unsigned long (__stdcall * gcTHREAD_ROUTINE)(void * Argument);
+#else
+typedef void * gctTHREAD_RETURN;
+typedef void * (* gcTHREAD_ROUTINE)(void *);
+#endif
+
+/* Create a new thread. */
+gceSTATUS
+gcoOS_CreateThread(
+ IN gcoOS Os,
+ IN gcTHREAD_ROUTINE Worker,
+ IN gctPOINTER Argument,
+ OUT gctPOINTER * Thread
+ );
+
+/* Close a thread. */
+gceSTATUS
+gcoOS_CloseThread(
+ IN gcoOS Os,
+ IN gctPOINTER Thread
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Mutexes --------------------------------------------------------------*/
+
+/* Create a new mutex. */
+gceSTATUS
+gcoOS_CreateMutex(
+ IN gcoOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gcoOS_DeleteMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gcoOS_AcquireMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gcoOS_ReleaseMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Signals --------------------------------------------------------------*/
+
+/* Create a signal. */
+gceSTATUS
+gcoOS_CreateSignal(
+ IN gcoOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gcoOS_DestroySignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gcoOS_Signal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gcoOS_WaitSignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Map a signal from another process */
+gceSTATUS
+gcoOS_MapSignal(
+ IN gctSIGNAL RemoteSignal,
+ OUT gctSIGNAL * LocalSignal
+ );
+
+/* Unmap a signal mapped from another process */
+gceSTATUS
+gcoOS_UnmapSignal(
+ IN gctSIGNAL Signal
+ );
+
+/* Write a register. */
+gceSTATUS
+gcoOS_WriteRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Read a register. */
+gceSTATUS
+gcoOS_ReadRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+gceSTATUS
+gcoOS_CacheClean(
+ IN gcoOS Os,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_CacheFlush(
+ IN gcoOS Os,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_CacheInvalidate(
+ IN gcoOS Os,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_MemoryBarrier(
+ IN gcoOS Os,
+ IN gctPOINTER Logical
+ );
+
+
+/*----------------------------------------------------------------------------*/
+/*----- Profile --------------------------------------------------------------*/
+
+gceSTATUS
+gckOS_GetProfileTick(
+ OUT gctUINT64_PTR Tick
+ );
+
+gceSTATUS
+gckOS_QueryProfileTickRate(
+ OUT gctUINT64_PTR TickRate
+ );
+
+gctUINT32
+gckOS_ProfileToMS(
+ IN gctUINT64 Ticks
+ );
+
+gceSTATUS
+gcoOS_GetProfileTick(
+ OUT gctUINT64_PTR Tick
+ );
+
+gceSTATUS
+gcoOS_QueryProfileTickRate(
+ OUT gctUINT64_PTR TickRate
+ );
+
+#define _gcmPROFILE_INIT(prefix, freq, start) \
+ do { \
+ prefix ## OS_QueryProfileTickRate(&(freq)); \
+ prefix ## OS_GetProfileTick(&(start)); \
+ } while (gcvFALSE)
+
+#define _gcmPROFILE_QUERY(prefix, start, ticks) \
+ do { \
+ prefix ## OS_GetProfileTick(&(ticks)); \
+ (ticks) = ((ticks) > (start)) ? ((ticks) - (start)) \
+ : (~0ull - (start) + (ticks) + 1); \
+ } while (gcvFALSE)
+
+#if gcdENABLE_PROFILING
+# define gcmkPROFILE_INIT(freq, start) _gcmPROFILE_INIT(gck, freq, start)
+# define gcmkPROFILE_QUERY(start, ticks) _gcmPROFILE_QUERY(gck, start, ticks)
+# define gcmPROFILE_INIT(freq, start) _gcmPROFILE_INIT(gco, freq, start)
+# define gcmPROFILE_QUERY(start, ticks) _gcmPROFILE_QUERY(gco, start, ticks)
+# define gcmPROFILE_ONLY(x) x
+# define gcmPROFILE_ELSE(x) do { } while (gcvFALSE)
+# define gcmPROFILE_DECLARE_ONLY(x) x
+# define gcmPROFILE_DECLARE_ELSE(x) typedef x
+#else
+# define gcmkPROFILE_INIT(start, freq) do { } while (gcvFALSE)
+# define gcmkPROFILE_QUERY(start, ticks) do { } while (gcvFALSE)
+# define gcmPROFILE_INIT(start, freq) do { } while (gcvFALSE)
+# define gcmPROFILE_QUERY(start, ticks) do { } while (gcvFALSE)
+# define gcmPROFILE_ONLY(x) do { } while (gcvFALSE)
+# define gcmPROFILE_ELSE(x) x
+# define gcmPROFILE_DECLARE_ONLY(x) typedef x
+# define gcmPROFILE_DECLARE_ELSE(x) x
+#endif
+
+/*******************************************************************************
+** gcoMATH object
+*/
+
+#define gcdPI 3.14159265358979323846f
+
+/* Kernel. */
+gctINT
+gckMATH_ModuloInt(
+ IN gctINT X,
+ IN gctINT Y
+ );
+
+/* User. */
+gctUINT32
+gcoMATH_Log2in5dot5(
+ IN gctINT X
+ );
+
+
+gctFLOAT
+gcoMATH_UIntAsFloat(
+ IN gctUINT32 X
+ );
+
+gctUINT32
+gcoMATH_FloatAsUInt(
+ IN gctFLOAT X
+ );
+
+gctBOOL
+gcoMATH_CompareEqualF(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+gctUINT16
+gcoMATH_UInt8AsFloat16(
+ IN gctUINT8 X
+ );
+
+/******************************************************************************\
+**************************** Coordinate Structures *****************************
+\******************************************************************************/
+
+typedef struct _gcsPOINT
+{
+ gctINT32 x;
+ gctINT32 y;
+}
+gcsPOINT;
+
+typedef struct _gcsSIZE
+{
+ gctINT32 width;
+ gctINT32 height;
+}
+gcsSIZE;
+
+typedef struct _gcsRECT
+{
+ gctINT32 left;
+ gctINT32 top;
+ gctINT32 right;
+ gctINT32 bottom;
+}
+gcsRECT;
+
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*------------------------------- gcoSURF Common ------------------------------*/
+
+/* Color format classes. */
+typedef enum _gceFORMAT_CLASS
+{
+ gcvFORMAT_CLASS_RGBA = 4500,
+ gcvFORMAT_CLASS_YUV,
+ gcvFORMAT_CLASS_INDEX,
+ gcvFORMAT_CLASS_LUMINANCE,
+ gcvFORMAT_CLASS_BUMP,
+ gcvFORMAT_CLASS_DEPTH,
+}
+gceFORMAT_CLASS;
+
+/* Special enums for width field in gcsFORMAT_COMPONENT. */
+typedef enum _gceCOMPONENT_CONTROL
+{
+ gcvCOMPONENT_NOTPRESENT = 0x00,
+ gcvCOMPONENT_DONTCARE = 0x80,
+ gcvCOMPONENT_WIDTHMASK = 0x7F,
+ gcvCOMPONENT_ODD = 0x80
+}
+gceCOMPONENT_CONTROL;
+
+/* Color format component parameters. */
+typedef struct _gcsFORMAT_COMPONENT
+{
+ gctUINT8 start;
+ gctUINT8 width;
+}
+gcsFORMAT_COMPONENT;
+
+/* RGBA color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_RGBA
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT red;
+ gcsFORMAT_COMPONENT green;
+ gcsFORMAT_COMPONENT blue;
+}
+gcsFORMAT_CLASS_TYPE_RGBA;
+
+/* YUV color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_YUV
+{
+ gcsFORMAT_COMPONENT y;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT v;
+}
+gcsFORMAT_CLASS_TYPE_YUV;
+
+/* Index color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_INDEX
+{
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_INDEX;
+
+/* Luminance color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_LUMINANCE
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_LUMINANCE;
+
+/* Bump map color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_BUMP
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT l;
+ gcsFORMAT_COMPONENT v;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT q;
+ gcsFORMAT_COMPONENT w;
+}
+gcsFORMAT_CLASS_TYPE_BUMP;
+
+/* Depth and stencil format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_DEPTH
+{
+ gcsFORMAT_COMPONENT depth;
+ gcsFORMAT_COMPONENT stencil;
+}
+gcsFORMAT_CLASS_TYPE_DEPTH;
+
+/* Format parameters. */
+typedef struct _gcsSURF_FORMAT_INFO
+{
+ /* Format code and class. */
+ gceSURF_FORMAT format;
+ gceFORMAT_CLASS fmtClass;
+
+ /* The size of one pixel in bits. */
+ gctUINT8 bitsPerPixel;
+
+ /* Component swizzle. */
+ gceSURF_SWIZZLE swizzle;
+
+ /* Some formats have two neighbour pixels interleaved together. */
+ /* To describe such format, set the flag to 1 and add another */
+ /* like this one describing the odd pixel format. */
+ gctUINT8 interleaved;
+
+ /* Format components. */
+ union
+ {
+ gcsFORMAT_CLASS_TYPE_BUMP bump;
+ gcsFORMAT_CLASS_TYPE_RGBA rgba;
+ gcsFORMAT_CLASS_TYPE_YUV yuv;
+ gcsFORMAT_CLASS_TYPE_LUMINANCE lum;
+ gcsFORMAT_CLASS_TYPE_INDEX index;
+ gcsFORMAT_CLASS_TYPE_DEPTH depth;
+ } u;
+}
+gcsSURF_FORMAT_INFO;
+
+/* Frame buffer information. */
+typedef struct _gcsSURF_FRAMEBUFFER
+{
+ gctPOINTER logical;
+ gctUINT width, height;
+ gctINT stride;
+ gceSURF_FORMAT format;
+}
+gcsSURF_FRAMEBUFFER;
+
+typedef struct _gcsVIDMEM_NODE_SHARED_INFO
+{
+ gctBOOL tileStatusDisabled;
+ gcsPOINT SrcOrigin;
+ gcsPOINT DestOrigin;
+ gcsSIZE RectSize;
+ gctUINT32 clearValue;
+}
+gcsVIDMEM_NODE_SHARED_INFO;
+
+/* Generic pixel component descriptors. */
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XXX8;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XX8X;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_X8XX;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_8XXX;
+
+typedef enum _gceORIENTATION
+{
+ gcvORIENTATION_TOP_BOTTOM,
+ gcvORIENTATION_BOTTOM_TOP,
+}
+gceORIENTATION;
+
+
+/* Construct a new gcoSURF object. */
+gceSTATUS
+gcoSURF_Construct(
+ IN gcoHAL Hal,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+/* Destroy an gcoSURF object. */
+gceSTATUS
+gcoSURF_Destroy(
+ IN gcoSURF Surface
+ );
+
+/* Map user-allocated surface. */
+gceSTATUS
+gcoSURF_MapUserSurface(
+ IN gcoSURF Surface,
+ IN gctUINT Alignment,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Query vid mem node info. */
+gceSTATUS
+gcoSURF_QueryVidMemNode(
+ IN gcoSURF Surface,
+ OUT gcuVIDMEM_NODE_PTR * Node,
+ OUT gcePOOL * Pool,
+ OUT gctUINT_PTR Bytes
+ );
+
+/* Set usage attribute of a surface. */
+gceSTATUS
+gcoSURF_SetUsage(
+ IN gcoSURF Surface,
+ IN gceSURF_USAGE Usage
+ );
+
+/* Return usage attribute of a surface. */
+gceSTATUS
+gcoSURF_QueryUsage(
+ IN gcoSURF Surface,
+ OUT gceSURF_USAGE *Usage
+ );
+
+/* Set the color type of the surface. */
+gceSTATUS
+gcoSURF_SetColorType(
+ IN gcoSURF Surface,
+ IN gceSURF_COLOR_TYPE ColorType
+ );
+
+/* Get the color type of the surface. */
+gceSTATUS
+gcoSURF_GetColorType(
+ IN gcoSURF Surface,
+ OUT gceSURF_COLOR_TYPE *ColorType
+ );
+
+/* Set the surface ration angle. */
+gceSTATUS
+gcoSURF_SetRotation(
+ IN gcoSURF Surface,
+ IN gceSURF_ROTATION Rotation
+ );
+
+gceSTATUS
+gcoSURF_IsValid(
+ IN gcoSURF Surface
+ );
+
+#ifndef VIVANTE_NO_3D
+/* Verify and return the state of the tile status mechanism. */
+gceSTATUS
+gcoSURF_IsTileStatusSupported(
+ IN gcoSURF Surface
+ );
+
+/* Process tile status for the specified surface. */
+gceSTATUS
+gcoSURF_SetTileStatus(
+ IN gcoSURF Surface
+ );
+
+/* Enable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_EnableTileStatus(
+ IN gcoSURF Surface
+ );
+
+/* Disable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_DisableTileStatus(
+ IN gcoSURF Surface,
+ IN gctBOOL Decompress
+ );
+#endif /* VIVANTE_NO_3D */
+
+/* Get surface size. */
+gceSTATUS
+gcoSURF_GetSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctUINT * Depth
+ );
+
+/* Get surface aligned sizes. */
+gceSTATUS
+gcoSURF_GetAlignedSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctINT * Stride
+ );
+
+/* Get alignments. */
+gceSTATUS
+gcoSURF_GetAlignment(
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ OUT gctUINT * AddressAlignment,
+ OUT gctUINT * XAlignment,
+ OUT gctUINT * YAlignment
+ );
+
+/* Get surface type and format. */
+gceSTATUS
+gcoSURF_GetFormat(
+ IN gcoSURF Surface,
+ OUT gceSURF_TYPE * Type,
+ OUT gceSURF_FORMAT * Format
+ );
+
+/* Get surface tiling. */
+gceSTATUS
+gcoSURF_GetTiling(
+ IN gcoSURF Surface,
+ OUT gceTILING * Tiling
+ );
+
+/* Lock the surface. */
+gceSTATUS
+gcoSURF_Lock(
+ IN gcoSURF Surface,
+ IN OUT gctUINT32 * Address,
+ IN OUT gctPOINTER * Memory
+ );
+
+/* Unlock the surface. */
+gceSTATUS
+gcoSURF_Unlock(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory
+ );
+
+/* Return pixel format parameters. */
+gceSTATUS
+gcoSURF_QueryFormat(
+ IN gceSURF_FORMAT Format,
+ OUT gcsSURF_FORMAT_INFO_PTR * Info
+ );
+
+/* Compute the color pixel mask. */
+gceSTATUS
+gcoSURF_ComputeColorMask(
+ IN gcsSURF_FORMAT_INFO_PTR Format,
+ OUT gctUINT32_PTR ColorMask
+ );
+
+/* Flush the surface. */
+gceSTATUS
+gcoSURF_Flush(
+ IN gcoSURF Surface
+ );
+
+/* Fill surface from it's tile status buffer. */
+gceSTATUS
+gcoSURF_FillFromTile(
+ IN gcoSURF Surface
+ );
+
+/* Fill surface with a value. */
+gceSTATUS
+gcoSURF_Fill(
+ IN gcoSURF Surface,
+ IN gcsPOINT_PTR Origin,
+ IN gcsSIZE_PTR Size,
+ IN gctUINT32 Value,
+ IN gctUINT32 Mask
+ );
+
+/* Alpha blend two surfaces together. */
+gceSTATUS
+gcoSURF_Blend(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrig,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsSIZE_PTR Size,
+ IN gceSURF_BLEND_MODE Mode
+ );
+
+/* Create a new gcoSURF wrapper object. */
+gceSTATUS
+gcoSURF_ConstructWrapper(
+ IN gcoHAL Hal,
+ OUT gcoSURF * Surface
+ );
+
+/* Set the underlying buffer for the surface wrapper. */
+gceSTATUS
+gcoSURF_SetBuffer(
+ IN gcoSURF Surface,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Stride,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Set the size of the surface in pixels and map the underlying buffer. */
+gceSTATUS
+gcoSURF_SetWindow(
+ IN gcoSURF Surface,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height
+ );
+
+/* Increase reference count of the surface. */
+gceSTATUS
+gcoSURF_ReferenceSurface(
+ IN gcoSURF Surface
+ );
+
+/* Get surface reference count. */
+gceSTATUS
+gcoSURF_QueryReferenceCount(
+ IN gcoSURF Surface,
+ OUT gctINT32 * ReferenceCount
+ );
+
+/* Set surface orientation. */
+gceSTATUS
+gcoSURF_SetOrientation(
+ IN gcoSURF Surface,
+ IN gceORIENTATION Orientation
+ );
+
+/* Query surface orientation. */
+gceSTATUS
+gcoSURF_QueryOrientation(
+ IN gcoSURF Surface,
+ OUT gceORIENTATION * Orientation
+ );
+
+gceSTATUS
+gcoSURF_SetOffset(
+ IN gcoSURF Surface,
+ IN gctUINT Offset
+ );
+
+gceSTATUS
+gcoSURF_NODE_Cache(
+ IN gcsSURF_NODE_PTR Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes,
+ IN gceCACHEOPERATION Operation
+ );
+
+/* Perform CPU cache operation on surface */
+gceSTATUS
+gcoSURF_CPUCacheOperation(
+ IN gcoSURF Surface,
+ IN gceCACHEOPERATION Operation
+ );
+
+
+gceSTATUS
+gcoSURF_SetLinearResolveAddress(
+ IN gcoSURF Surface,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory
+ );
+/******************************************************************************\
+********************************* gcoDUMP Object ********************************
+\******************************************************************************/
+
+/* Construct a new gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Construct(
+ IN gcoOS Os,
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Destroy a gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Destroy(
+ IN gcoDUMP Dump
+ );
+
+/* Enable/disable dumping. */
+gceSTATUS
+gcoDUMP_Control(
+ IN gcoDUMP Dump,
+ IN gctSTRING FileName
+ );
+
+gceSTATUS
+gcoDUMP_IsEnabled(
+ IN gcoDUMP Dump,
+ OUT gctBOOL * Enabled
+ );
+
+/* Add surface. */
+gceSTATUS
+gcoDUMP_AddSurface(
+ IN gcoDUMP Dump,
+ IN gctINT32 Width,
+ IN gctINT32 Height,
+ IN gceSURF_FORMAT PixelFormat,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount
+ );
+
+/* Mark the beginning of a frame. */
+gceSTATUS
+gcoDUMP_FrameBegin(
+ IN gcoDUMP Dump
+ );
+
+/* Mark the end of a frame. */
+gceSTATUS
+gcoDUMP_FrameEnd(
+ IN gcoDUMP Dump
+ );
+
+/* Dump data. */
+gceSTATUS
+gcoDUMP_DumpData(
+ IN gcoDUMP Dump,
+ IN gceDUMP_TAG Type,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Delete an address. */
+gceSTATUS
+gcoDUMP_Delete(
+ IN gcoDUMP Dump,
+ IN gctUINT32 Address
+ );
+
+
+/******************************************************************************\
+******************************* gcsRECT Structure ******************************
+\******************************************************************************/
+
+/* Initialize rectangle structure. */
+gceSTATUS
+gcsRECT_Set(
+ OUT gcsRECT_PTR Rect,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Return the width of the rectangle. */
+gceSTATUS
+gcsRECT_Width(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Width
+ );
+
+/* Return the height of the rectangle. */
+gceSTATUS
+gcsRECT_Height(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Height
+ );
+
+/* Ensure that top left corner is to the left and above the right bottom. */
+gceSTATUS
+gcsRECT_Normalize(
+ IN OUT gcsRECT_PTR Rect
+ );
+
+/* Compare two rectangles. */
+gceSTATUS
+gcsRECT_IsEqual(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * Equal
+ );
+
+/* Compare the sizes of two rectangles. */
+gceSTATUS
+gcsRECT_IsOfEqualSize(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * EqualSize
+ );
+
+gceSTATUS
+gcsRECT_RelativeRotation(
+ IN gceSURF_ROTATION Orientation,
+ IN OUT gceSURF_ROTATION *Relation);
+
+gceSTATUS
+
+gcsRECT_Rotate(
+
+ IN OUT gcsRECT_PTR Rect,
+
+ IN gceSURF_ROTATION Rotation,
+
+ IN gceSURF_ROTATION toRotation,
+
+ IN gctINT32 SurfaceWidth,
+
+ IN gctINT32 SurfaceHeight
+
+ );
+
+/******************************************************************************\
+**************************** gcsBOUNDARY Structure *****************************
+\******************************************************************************/
+
+typedef struct _gcsBOUNDARY
+{
+ gctINT x;
+ gctINT y;
+ gctINT width;
+ gctINT height;
+}
+gcsBOUNDARY;
+
+/******************************************************************************\
+********************************* gcoHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gcoHEAP * gcoHEAP;
+
+/* Construct a new gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Construct(
+ IN gcoOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gcoHEAP * Heap
+ );
+
+/* Destroy an gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Destroy(
+ IN gcoHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoHEAP_Allocate(
+ IN gcoHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcoHEAP_GetMemorySize(
+ IN gcoHEAP Heap,
+ IN gctPOINTER Memory,
+ OUT gctSIZE_T_PTR MemorySize
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoHEAP_Free(
+ IN gcoHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+#if (VIVANTE_PROFILER /*gcdENABLE_PROFILING*/ || gcdDEBUG)
+/* Profile the heap. */
+gceSTATUS
+gcoHEAP_ProfileStart(
+ IN gcoHEAP Heap
+ );
+
+gceSTATUS
+gcoHEAP_ProfileEnd(
+ IN gcoHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+#endif
+
+
+/******************************************************************************\
+******************************* Debugging Macros *******************************
+\******************************************************************************/
+
+void
+gcoOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gcoOS_GetDebugLevel(
+ OUT gctUINT32_PTR DebugLevel
+ );
+
+void
+gcoOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_GetDebugZone(
+ IN gctUINT32 Zone,
+ OUT gctUINT32_PTR DebugZone
+ );
+
+void
+gcoOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gcoOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+gctFILE
+gcoOS_ReplaceDebugFile(
+ IN gctFILE fp
+ );
+
+/*******************************************************************************
+**
+** gcmFATAL
+**
+** Print a message to the debugger and execute a break point.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_FATAL)
+# define gcmFATAL gcoOS_DebugFatal
+# define gcmkFATAL gckOS_DebugFatal
+#elif gcdHAS_ELLIPSES
+# define gcmFATAL(...)
+# define gcmkFATAL(...)
+#else
+ gcmINLINE static void
+ __dummy_fatal(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmFATAL __dummy_fatal
+# define gcmkFATAL __dummy_fatal
+#endif
+
+#define gcmENUM2TEXT(e) case e: return #e
+
+/*******************************************************************************
+**
+** gcmTRACE
+**
+** Print a message to the debugfer if the correct level has been set. In
+** retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** level Level of message.
+** message Message.
+** ... Optional arguments.
+*/
+#define gcvLEVEL_NONE -1
+#define gcvLEVEL_ERROR 0
+#define gcvLEVEL_WARNING 1
+#define gcvLEVEL_INFO 2
+#define gcvLEVEL_VERBOSE 3
+
+void
+gckOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_DebugTraceN(
+ IN gctUINT32 Level,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+# define gcmTRACE gcoOS_DebugTrace
+# define gcmkTRACE gckOS_DebugTrace
+# define gcmkTRACE_N gckOS_DebugTraceN
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE(...)
+# define gcmkTRACE(...)
+# define gcmkTRACE_N(...)
+#else
+ gcmINLINE static void
+ __dummy_trace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+ gcmINLINE static void
+ __dummy_trace_n(
+ IN gctUINT32 Level,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+# define gcmTRACE __dummy_trace
+# define gcmkTRACE __dummy_trace
+# define gcmkTRACE_N __dummy_trace_n
+#endif
+
+/* Zones common for kernel and user. */
+#define gcvZONE_OS (1 << 0)
+#define gcvZONE_HARDWARE (1 << 1)
+#define gcvZONE_HEAP (1 << 2)
+#define gcvZONE_SIGNAL (1 << 27)
+
+/* Kernel zones. */
+#define gcvZONE_KERNEL (1 << 3)
+#define gcvZONE_VIDMEM (1 << 4)
+#define gcvZONE_COMMAND (1 << 5)
+#define gcvZONE_DRIVER (1 << 6)
+#define gcvZONE_CMODEL (1 << 7)
+#define gcvZONE_MMU (1 << 8)
+#define gcvZONE_EVENT (1 << 9)
+#define gcvZONE_DEVICE (1 << 10)
+#define gcvZONE_DATABASE (1 << 11)
+#define gcvZONE_INTERRUPT (1 << 12)
+
+/* User zones. */
+#define gcvZONE_HAL (1 << 3)
+#define gcvZONE_BUFFER (1 << 4)
+#define gcvZONE_CONTEXT (1 << 5)
+#define gcvZONE_SURFACE (1 << 6)
+#define gcvZONE_INDEX (1 << 7)
+#define gcvZONE_STREAM (1 << 8)
+#define gcvZONE_TEXTURE (1 << 9)
+#define gcvZONE_2D (1 << 10)
+#define gcvZONE_3D (1 << 11)
+#define gcvZONE_COMPILER (1 << 12)
+#define gcvZONE_MEMORY (1 << 13)
+#define gcvZONE_STATE (1 << 14)
+#define gcvZONE_AUX (1 << 15)
+#define gcvZONE_VERTEX (1 << 16)
+#define gcvZONE_CL (1 << 17)
+#define gcvZONE_COMPOSITION (1 << 17)
+#define gcvZONE_VG (1 << 18)
+#define gcvZONE_IMAGE (1 << 19)
+#define gcvZONE_UTILITY (1 << 20)
+#define gcvZONE_PARAMETERS (1 << 21)
+
+/* API definitions. */
+#define gcvZONE_API_HAL (1 << 28)
+#define gcvZONE_API_EGL (2 << 28)
+#define gcvZONE_API_ES11 (3 << 28)
+#define gcvZONE_API_ES20 (4 << 28)
+#define gcvZONE_API_VG11 (5 << 28)
+#define gcvZONE_API_GL (6 << 28)
+#define gcvZONE_API_DFB (7 << 28)
+#define gcvZONE_API_GDI (8 << 28)
+#define gcvZONE_API_D3D (9 << 28)
+
+
+#define gcmZONE_GET_API(zone) ((zone) >> 28)
+/*Set gcdZONE_MASE like 0x0 | gcvZONE_API_EGL
+will enable print EGL module debug info*/
+#define gcdZONE_MASK 0x0FFFFFFF
+
+/* Handy zones. */
+#define gcvZONE_NONE 0
+#define gcvZONE_ALL 0x0FFFFFFF
+
+/*Dump API depth set 1 for API, 2 for API and API behavior*/
+#define gcvDUMP_API_DEPTH 1
+
+/*******************************************************************************
+**
+** gcmTRACE_ZONE
+**
+** Print a message to the debugger if the correct level and zone has been
+** set. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** Level Level of message.
+** Zone Zone of message.
+** Message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_DebugTraceZoneN(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+# define gcmTRACE_ZONE gcoOS_DebugTraceZone
+# define gcmkTRACE_ZONE gckOS_DebugTraceZone
+# define gcmkTRACE_ZONE_N gckOS_DebugTraceZoneN
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE_ZONE(...)
+# define gcmkTRACE_ZONE(...)
+# define gcmkTRACE_ZONE_N(...)
+#else
+ gcmINLINE static void
+ __dummy_trace_zone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+ gcmINLINE static void
+ __dummy_trace_zone_n(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+# define gcmTRACE_ZONE __dummy_trace_zone
+# define gcmkTRACE_ZONE __dummy_trace_zone
+# define gcmkTRACE_ZONE_N __dummy_trace_zone_n
+#endif
+
+/*******************************************************************************
+**
+** gcmDEBUG_ONLY
+**
+** Execute a statement or function only in DEBUG mode.
+**
+** ARGUMENTS:
+**
+** f Statement or function to execute.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+# define gcmDEBUG_ONLY(f) f
+#else
+# define gcmDEBUG_ONLY(f)
+#endif
+
+/*******************************************************************************
+**
+** gcmSTACK_PUSH
+** gcmSTACK_POP
+** gcmSTACK_DUMP
+**
+** Push or pop a function with entry arguments on the trace stack.
+**
+** ARGUMENTS:
+**
+** Function Name of function.
+** Line Line number.
+** Text Optional text.
+** ... Optional arguments for text.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_STACK)
+ void
+ gcoOS_StackPush(
+ IN gctCONST_STRING Function,
+ IN gctINT Line,
+ IN gctCONST_STRING Text,
+ ...
+ );
+ void
+ gcoOS_StackPop(
+ IN gctCONST_STRING Function
+ );
+ void
+ gcoOS_StackDump(
+ void
+ );
+# define gcmSTACK_PUSH gcoOS_StackPush
+# define gcmSTACK_POP gcoOS_StackPop
+# define gcmSTACK_DUMP gcoOS_StackDump
+#elif gcdHAS_ELLIPSES
+# define gcmSTACK_PUSH(...) do { } while (0)
+# define gcmSTACK_POP(Function) do { } while (0)
+# define gcmSTACK_DUMP() do { } while (0)
+#else
+ gcmINLINE static void
+ __dummy_stack_push(
+ IN gctCONST_STRING Function,
+ IN gctINT Line,
+ IN gctCONST_STRING Text, ...
+ )
+ {
+ }
+# define gcmSTACK_PUSH __dummy_stack_push
+# define gcmSTACK_POP(Function) do { } while (0)
+# define gcmSTACK_DUMP() do { } while (0)
+#endif
+
+/******************************************************************************\
+******************************** Logging Macros ********************************
+\******************************************************************************/
+
+#define gcdHEADER_LEVEL gcvLEVEL_VERBOSE
+
+
+#if gcdENABLE_PROFILING
+void
+gcoOS_ProfileDB(
+ IN gctCONST_STRING Function,
+ IN OUT gctBOOL_PTR Initialized
+ );
+
+#define gcmHEADER() \
+ static gctBOOL __profile__initialized__ = gcvFALSE; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, gcvNULL, gcvNULL); \
+ gcoOS_ProfileDB(__FUNCTION__, &__profile__initialized__)
+#define gcmHEADER_ARG(...) \
+ static gctBOOL __profile__initialized__ = gcvFALSE; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, Text, __VA_ARGS__); \
+ gcoOS_ProfileDB(__FUNCTION__, &__profile__initialized__)
+#define gcmFOOTER() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(__FUNCTION__, gcvNULL)
+#define gcmFOOTER_NO() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(__FUNCTION__, gcvNULL)
+#define gcmFOOTER_ARG(...) \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(__FUNCTION__, gcvNULL)
+#define gcmFOOTER_KILL() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(gcvNULL, gcvNULL)
+
+#else /* gcdENABLE_PROFILING */
+
+#if gcdHAS_ELLIPSES
+#define gcmHEADER() \
+ gctINT8 __user__ = 1; \
+ gctINT8_PTR __user_ptr__ = &__user__; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, gcvNULL, gcvNULL); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+#else
+ gcmINLINE static void
+ __dummy_header(void)
+ {
+ }
+# define gcmHEADER __dummy_header
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmHEADER_ARG(Text, ...) \
+ gctINT8 __user__ = 1; \
+ gctINT8_PTR __user_ptr__ = &__user__; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, Text, __VA_ARGS__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_header_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmHEADER_ARG __dummy_header_arg
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmFOOTER() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmPROFILE_ONLY(gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d) [%llu,%llu]: status=%d(%s)", \
+ __FUNCTION__, __LINE__, \
+ __ticks__, __total__, \
+ status, gcoOS_DebugStatus2Name(status))); \
+ gcmPROFILE_ELSE(gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d(%s)", \
+ __FUNCTION__, __LINE__, \
+ status, gcoOS_DebugStatus2Name(status))); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer(void)
+ {
+ }
+# define gcmFOOTER __dummy_footer
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmFOOTER_NO() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer_no(void)
+ {
+ }
+# define gcmFOOTER_NO __dummy_footer_no
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmFOOTER_KILL() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer_kill(void)
+ {
+ }
+# define gcmFOOTER_KILL __dummy_footer_kill
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmFOOTER_ARG(Text, ...) \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmFOOTER_ARG __dummy_footer_arg
+#endif
+
+#endif /* gcdENABLE_PROFILING */
+
+#if gcdHAS_ELLIPSES
+#define gcmkHEADER() \
+ gctINT8 __kernel__ = 1; \
+ gctINT8_PTR __kernel_ptr__ = &__kernel__; \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+#else
+ gcmINLINE static void
+ __dummy_kheader(void)
+ {
+ }
+# define gcmkHEADER __dummy_kheader
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmkHEADER_ARG(Text, ...) \
+ gctINT8 __kernel__ = 1; \
+ gctINT8_PTR __kernel_ptr__ = &__kernel__; \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_kheader_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkHEADER_ARG __dummy_kheader_arg
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmkFOOTER() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d(%s)", \
+ __FUNCTION__, __LINE__, status, gckOS_DebugStatus2Name(status)); \
+ *__kernel_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_kfooter(void)
+ {
+ }
+# define gcmkFOOTER __dummy_kfooter
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmkFOOTER_NO() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__); \
+ *__kernel_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_kfooter_no(void)
+ {
+ }
+# define gcmkFOOTER_NO __dummy_kfooter_no
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmkFOOTER_ARG(Text, ...) \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, \
+ __FUNCTION__, __LINE__, __VA_ARGS__); \
+ *__kernel_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_kfooter_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkFOOTER_ARG __dummy_kfooter_arg
+#endif
+
+#define gcmOPT_VALUE(ptr) (((ptr) == gcvNULL) ? 0 : *(ptr))
+#define gcmOPT_POINTER(ptr) (((ptr) == gcvNULL) ? gcvNULL : *(ptr))
+#define gcmOPT_STRING(ptr) (((ptr) == gcvNULL) ? "(nil)" : (ptr))
+
+void
+gckOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_PrintN(
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_CopyPrint(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#define gcmPRINT gcoOS_Print
+#define gcmkPRINT gckOS_Print
+#define gcmkPRINT_N gckOS_PrintN
+
+#if gcdPRINT_VERSION
+# define gcmPRINT_VERSION() do { \
+ _gcmPRINT_VERSION(gcm); \
+ gcmSTACK_DUMP(); \
+ } while (0)
+# define gcmkPRINT_VERSION() _gcmPRINT_VERSION(gcmk)
+# define _gcmPRINT_VERSION(prefix) \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ "Vivante HAL version %d.%d.%d build %d %s %s", \
+ gcvVERSION_MAJOR, gcvVERSION_MINOR, gcvVERSION_PATCH, \
+ gcvVERSION_BUILD, gcvVERSION_DATE, gcvVERSION_TIME )
+#else
+# define gcmPRINT_VERSION() do { gcmSTACK_DUMP(); } while (gcvFALSE)
+# define gcmkPRINT_VERSION() do { } while (gcvFALSE)
+#endif
+
+typedef enum _gceDUMP_BUFFER
+{
+ gceDUMP_BUFFER_CONTEXT,
+ gceDUMP_BUFFER_USER,
+ gceDUMP_BUFFER_KERNEL,
+ gceDUMP_BUFFER_LINK,
+ gceDUMP_BUFFER_WAITLINK,
+ gceDUMP_BUFFER_FROM_USER,
+}
+gceDUMP_BUFFER;
+
+void
+gckOS_DumpBuffer(
+ IN gckOS Os,
+ IN gctPOINTER Buffer,
+ IN gctUINT Size,
+ IN gceDUMP_BUFFER Type,
+ IN gctBOOL CopyMessage
+ );
+
+#define gcmkDUMPBUFFER gckOS_DumpBuffer
+
+#if gcdDUMP_COMMAND
+# define gcmkDUMPCOMMAND(Os, Buffer, Size, Type, CopyMessage) \
+ gcmkDUMPBUFFER(Os, Buffer, Size, Type, CopyMessage)
+#else
+# define gcmkDUMPCOMMAND(Os, Buffer, Size, Type, CopyMessage)
+#endif
+
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+
+void
+gckOS_DebugFlush(
+ gctCONST_STRING CallerName,
+ gctUINT LineNumber,
+ gctUINT32 DmaAddress
+ );
+
+# define gcmkDEBUGFLUSH(DmaAddress) \
+ gckOS_DebugFlush(__FUNCTION__, __LINE__, DmaAddress)
+#else
+# define gcmkDEBUGFLUSH(DmaAddress)
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_FRAMERATE
+**
+** Print average frame rate
+**
+*/
+#if gcdDUMP_FRAMERATE
+ gceSTATUS
+ gcfDumpFrameRate(
+ void
+ );
+# define gcmDUMP_FRAMERATE gcfDumpFrameRate
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_FRAMERATE(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_frame_rate(
+ void
+ )
+ {
+ }
+# define gcmDUMP_FRAMERATE __dummy_dump_frame_rate
+#endif
+
+
+/*******************************************************************************
+**
+** gcmDUMP
+**
+** Print a dump message.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+#if gcdDUMP
+ gceSTATUS
+ gcfDump(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ ...
+ );
+# define gcmDUMP gcfDump
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP(...)
+#else
+ gcmINLINE static void
+ __dummy_dump(
+ IN gcoOS Os,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP __dummy_dump
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_DATA
+**
+** Add data to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP || gcdDUMP_COMMAND
+ gceSTATUS
+ gcfDumpData(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_DATA gcfDumpData
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_DATA(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_data(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_DATA __dummy_dump_data
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_BUFFER
+**
+** Print a buffer to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctUINT32 Physical
+** Physical address of buffer.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctUINT32 Offset
+** Offset into buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP || gcdDUMP_COMMAND
+gceSTATUS
+gcfDumpBuffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_BUFFER gcfDumpBuffer
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_BUFFER(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_buffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_BUFFER __dummy_dump_buffer
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API
+**
+** Print a dump message for a high level API prefixed by the function name.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpApi(
+ IN gctCONST_STRING String,
+ ...
+ );
+# define gcmDUMP_API gcfDumpApi
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP_API __dummy_dump_api
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY
+**
+** Print an array of data.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Size.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpArray(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Size
+ );
+# define gcmDUMP_API_ARRAY gcfDumpArray
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Size
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY __dummy_dump_api_array
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY_TOKEN
+**
+** Print an array of data terminated by a token.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Termination.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpArrayToken(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Termination
+ );
+# define gcmDUMP_API_ARRAY_TOKEN gcfDumpArrayToken
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY_TOKEN(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array_token(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Termination
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY_TOKEN __dummy_dump_api_array_token
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_DATA
+**
+** Print an array of bytes.
+**
+** ARGUMENTS:
+**
+** gctCONST_POINTER Pointer to array.
+** gctSIZE_T Size.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpApiData(
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Size
+ );
+# define gcmDUMP_API_DATA gcfDumpApiData
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_DATA(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_data(
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Size
+ )
+ {
+ }
+# define gcmDUMP_API_DATA __dummy_dump_api_data
+#endif
+
+/*******************************************************************************
+**
+** gcmTRACE_RELEASE
+**
+** Print a message to the shader debugger.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+#define gcmTRACE_RELEASE gcoOS_DebugShaderTrace
+
+void
+gcoOS_DebugShaderTrace(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_SetDebugShaderFiles(
+ IN gctCONST_STRING VSFileName,
+ IN gctCONST_STRING FSFileName
+ );
+
+void
+gcoOS_SetDebugShaderFileType(
+ IN gctUINT32 ShaderType
+ );
+
+void
+gcoOS_EnableDebugBuffer(
+ IN gctBOOL Enable
+ );
+
+/*******************************************************************************
+**
+** gcmBREAK
+**
+** Break into the debugger. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** None.
+*/
+
+void
+gcoOS_DebugBreak(
+ void
+ );
+
+void
+gckOS_DebugBreak(
+ void
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_BREAK)
+# define gcmBREAK gcoOS_DebugBreak
+# define gcmkBREAK gckOS_DebugBreak
+#else
+# define gcmBREAK()
+# define gcmkBREAK()
+#endif
+
+/*******************************************************************************
+**
+** gcmASSERT
+**
+** Evaluate an expression and break into the debugger if the expression
+** evaluates to false. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_ASSERT)
+# define _gcmASSERT(prefix, exp) \
+ do \
+ { \
+ if (!(exp)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ASSERT at %s(%d)", \
+ __FUNCTION__, __LINE__); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ "(%s)", #exp); \
+ prefix##BREAK(); \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmASSERT(exp) _gcmASSERT(gcm, exp)
+# define gcmkASSERT(exp) _gcmASSERT(gcmk, exp)
+#else
+# define gcmASSERT(exp)
+# define gcmkASSERT(exp)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY
+**
+** Verify if an expression returns true. If the expression does not
+** evaluates to true, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_ASSERT)
+# define gcmVERIFY(exp) gcmASSERT(exp)
+# define gcmkVERIFY(exp) gcmkASSERT(exp)
+#else
+# define gcmVERIFY(exp) exp
+# define gcmkVERIFY(exp) exp
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY_OK
+**
+** Verify a fucntion returns gcvSTATUS_OK. If the function does not return
+** gcvSTATUS_OK, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+
+void
+gcoOS_Verify(
+ IN gceSTATUS Status
+ );
+
+void
+gckOS_Verify(
+ IN gceSTATUS Status
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_ASSERT)
+# define gcmVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ gcoOS_Verify(verifyStatus); \
+ if (verifyStatus != gcvSTATUS_OK) \
+ { \
+ gcmTRACE( \
+ gcvLEVEL_ERROR, \
+ "gcmVERIFY_OK(%d): function returned %d", \
+ __LINE__, verifyStatus \
+ ); \
+ } \
+ gcmASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+# define gcmkVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ if (verifyStatus != gcvSTATUS_OK) \
+ { \
+ gcmkTRACE( \
+ gcvLEVEL_ERROR, \
+ "gcmkVERIFY_OK(%d): function returned %d", \
+ __LINE__, verifyStatus \
+ ); \
+ } \
+ gckOS_Verify(verifyStatus); \
+ gcmkASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+#else
+# define gcmVERIFY_OK(func) func
+# define gcmkVERIFY_OK(func) func
+#endif
+
+gctCONST_STRING
+gcoOS_DebugStatus2Name(
+ gceSTATUS status
+ );
+
+gctCONST_STRING
+gckOS_DebugStatus2Name(
+ gceSTATUS status
+ );
+
+/*******************************************************************************
+**
+** gcmERR_BREAK
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_BREAK(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_BREAK: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+#define _gcmkERR_BREAK(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_BREAK: status=%d(%s) @ %s(%d)", \
+ status, gckOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_BREAK(func) _gcmERR_BREAK(gcm, func)
+#define gcmkERR_BREAK(func) _gcmkERR_BREAK(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmERR_RETURN
+**
+** Executes a return on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ prefix##FOOTER(); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+#define _gcmkERR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d(%s) @ %s(%d)", \
+ status, gckOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ prefix##FOOTER(); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_RETURN(func) _gcmERR_RETURN(gcm, func)
+#define gcmkERR_RETURN(func) _gcmkERR_RETURN(gcmk, func)
+
+
+/*******************************************************************************
+**
+** gcmONERROR
+**
+** Jump to the error handler in case there is an error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmONERROR(prefix, func) \
+ do \
+ { \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ONERROR: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ goto OnError; \
+ } \
+ } \
+ while (gcvFALSE)
+#define _gcmkONERROR(prefix, func) \
+ do \
+ { \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ONERROR: status=%d(%s) @ %s(%d)", \
+ status, gckOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ goto OnError; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmONERROR(func) _gcmONERROR(gcm, func)
+#define gcmkONERROR(func) _gcmkONERROR(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_LOCK
+**
+** Verifies whether the surface is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_LOCK(surfaceInfo) \
+ if (!surfaceInfo->node.valid) \
+ { \
+ gcmONERROR(gcvSTATUS_MEMORY_UNLOCKED); \
+ } \
+
+/*******************************************************************************
+**
+** gcmVERIFY_NODE_LOCK
+**
+** Verifies whether the surface node is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_NODE_LOCK(surfaceNode) \
+ if (!surfaceNode->valid) \
+ { \
+ status = gcvSTATUS_MEMORY_UNLOCKED; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmBADOBJECT_BREAK
+**
+** Executes a break statement on bad object.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#define gcmBADOBJECT_BREAK(obj, t) \
+ if ((obj == gcvNULL) \
+ || (((gcsOBJECT *)(obj))->type != t) \
+ ) \
+ { \
+ status = gcvSTATUS_INVALID_OBJECT; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmCHECK_STATUS
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmCHECK_STATUS(prefix, func) \
+ do \
+ { \
+ last = func; \
+ if (gcmIS_ERROR(last)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "CHECK_STATUS: status=%d(%s) @ %s(%d)", \
+ last, gcoOS_DebugStatus2Name(last), __FUNCTION__, __LINE__); \
+ status = last; \
+ } \
+ } \
+ while (gcvFALSE)
+#define _gcmkCHECK_STATUS(prefix, func) \
+ do \
+ { \
+ last = func; \
+ if (gcmIS_ERROR(last)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "CHECK_STATUS: status=%d(%s) @ %s(%d)", \
+ last, gckOS_DebugStatus2Name(last), __FUNCTION__, __LINE__); \
+ status = last; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmCHECK_STATUS(func) _gcmCHECK_STATUS(gcm, func)
+#define gcmkCHECK_STATUS(func) _gcmkCHECK_STATUS(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+# define _gcmVERIFY_ARGUMENT(prefix, arg) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, #prefix "VERIFY_ARGUMENT failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_ARGUMENT); \
+ return gcvSTATUS_INVALID_ARGUMENT; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcm, arg)
+# define gcmkVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcmk, arg)
+
+/*******************************************************************************
+**
+** gcmDEBUG_VERIFY_ARGUMENT
+**
+** Works just like gcmVERIFY_ARGUMENT, but is only valid in debug mode.
+** Use this to verify arguments inside non-public API functions.
+*/
+#if gcdDEBUG
+# define gcmDEBUG_VERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcm, arg)
+# define gcmkDEBUG_VERIFY_ARGUMENT(arg) _gcmkVERIFY_ARGUMENT(gcm, arg)
+#else
+# define gcmDEBUG_VERIFY_ARGUMENT(arg)
+# define gcmkDEBUG_VERIFY_ARGUMENT(arg)
+#endif
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT_RETURN
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+# define _gcmVERIFY_ARGUMENT_RETURN(prefix, arg, value) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "gcmVERIFY_ARGUMENT_RETURN failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("value=%d", value); \
+ return value; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcm, arg, value)
+# define gcmkVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcmk, arg, value)
+
+#define MAX_LOOP_COUNT 0x7FFFFFFF
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_base_h_ */
diff --git a/src/include_eureka/gc_hal_compiler.h b/src/include_eureka/gc_hal_compiler.h
new file mode 100644
index 0000000..ecdb763
--- /dev/null
+++ b/src/include_eureka/gc_hal_compiler.h
@@ -0,0 +1,3400 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+/*
+** Include file the defines the front- and back-end compilers, as well as the
+** objects they use.
+*/
+
+#ifndef __gc_hal_compiler_h_
+#define __gc_hal_compiler_h_
+
+#ifndef VIVANTE_NO_3D
+#include "gc_hal_types.h"
+#include "gc_hal_engine.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef GC_ENABLE_LOADTIME_OPT
+#define GC_ENABLE_LOADTIME_OPT 1
+#endif
+
+/******************************* IR VERSION ******************/
+#define gcdSL_IR_VERSION gcmCC('\0','\0','\0','\1')
+
+/******************************************************************************\
+|******************************* SHADER LANGUAGE ******************************|
+\******************************************************************************/
+
+/* Possible shader language opcodes. */
+typedef enum _gcSL_OPCODE
+{
+ gcSL_NOP, /* 0x00 */
+ gcSL_MOV, /* 0x01 */
+ gcSL_SAT, /* 0x02 */
+ gcSL_DP3, /* 0x03 */
+ gcSL_DP4, /* 0x04 */
+ gcSL_ABS, /* 0x05 */
+ gcSL_JMP, /* 0x06 */
+ gcSL_ADD, /* 0x07 */
+ gcSL_MUL, /* 0x08 */
+ gcSL_RCP, /* 0x09 */
+ gcSL_SUB, /* 0x0A */
+ gcSL_KILL, /* 0x0B */
+ gcSL_TEXLD, /* 0x0C */
+ gcSL_CALL, /* 0x0D */
+ gcSL_RET, /* 0x0E */
+ gcSL_NORM, /* 0x0F */
+ gcSL_MAX, /* 0x10 */
+ gcSL_MIN, /* 0x11 */
+ gcSL_POW, /* 0x12 */
+ gcSL_RSQ, /* 0x13 */
+ gcSL_LOG, /* 0x14 */
+ gcSL_FRAC, /* 0x15 */
+ gcSL_FLOOR, /* 0x16 */
+ gcSL_CEIL, /* 0x17 */
+ gcSL_CROSS, /* 0x18 */
+ gcSL_TEXLDP, /* 0x19 */
+ gcSL_TEXBIAS, /* 0x1A */
+ gcSL_TEXGRAD, /* 0x1B */
+ gcSL_TEXLOD, /* 0x1C */
+ gcSL_SIN, /* 0x1D */
+ gcSL_COS, /* 0x1E */
+ gcSL_TAN, /* 0x1F */
+ gcSL_EXP, /* 0x20 */
+ gcSL_SIGN, /* 0x21 */
+ gcSL_STEP, /* 0x22 */
+ gcSL_SQRT, /* 0x23 */
+ gcSL_ACOS, /* 0x24 */
+ gcSL_ASIN, /* 0x25 */
+ gcSL_ATAN, /* 0x26 */
+ gcSL_SET, /* 0x27 */
+ gcSL_DSX, /* 0x28 */
+ gcSL_DSY, /* 0x29 */
+ gcSL_FWIDTH, /* 0x2A */
+ gcSL_DIV, /* 0x2B */
+ gcSL_MOD, /* 0x2C */
+ gcSL_AND_BITWISE, /* 0x2D */
+ gcSL_OR_BITWISE, /* 0x2E */
+ gcSL_XOR_BITWISE, /* 0x2F */
+ gcSL_NOT_BITWISE, /* 0x30 */
+ gcSL_LSHIFT, /* 0x31 */
+ gcSL_RSHIFT, /* 0x32 */
+ gcSL_ROTATE, /* 0x33 */
+ gcSL_BITSEL, /* 0x34 */
+ gcSL_LEADZERO, /* 0x35 */
+ gcSL_LOAD, /* 0x36 */
+ gcSL_STORE, /* 0x37 */
+ gcSL_BARRIER, /* 0x38 */
+ gcSL_STORE1, /* 0x39 */
+ gcSL_ATOMADD, /* 0x3A */
+ gcSL_ATOMSUB, /* 0x3B */
+ gcSL_ATOMXCHG, /* 0x3C */
+ gcSL_ATOMCMPXCHG, /* 0x3D */
+ gcSL_ATOMMIN, /* 0x3E */
+ gcSL_ATOMMAX, /* 0x3F */
+ gcSL_ATOMOR, /* 0x40 */
+ gcSL_ATOMAND, /* 0x41 */
+ gcSL_ATOMXOR, /* 0x42 */
+ /*gcSL_UNUSED, 0x43 */
+ /*gcSL_UNUSED, 0x44 */
+ /*gcSL_UNUSED, 0x45 */
+ /*gcSL_UNUSED, 0x46 */
+ /*gcSL_UNUSED, 0x47 */
+ /*gcSL_UNUSED, 0x48 */
+ /*gcSL_UNUSED, 0x49 */
+ /*gcSL_UNUSED, 0x4A */
+ /*gcSL_UNUSED, 0x4B */
+ /*gcSL_UNUSED, 0x4C */
+ /*gcSL_UNUSED, 0x4D */
+ /*gcSL_UNUSED, 0x4E */
+ /*gcSL_UNUSED, 0x4F */
+ /*gcSL_UNUSED, 0x50 */
+ /*gcSL_UNUSED, 0x51 */
+ /*gcSL_UNUSED, 0x52 */
+ gcSL_ADDLO = 0x53, /* 0x53 */ /* Float only. */
+ gcSL_MULLO, /* 0x54 */ /* Float only. */
+ gcSL_CONV, /* 0x55 */
+ gcSL_GETEXP, /* 0x56 */
+ gcSL_GETMANT, /* 0x57 */
+ gcSL_MULHI, /* 0x58 */ /* Integer only. */
+ gcSL_CMP, /* 0x59 */
+ gcSL_I2F, /* 0x5A */
+ gcSL_F2I, /* 0x5B */
+ gcSL_ADDSAT, /* 0x5C */ /* Integer only. */
+ gcSL_SUBSAT, /* 0x5D */ /* Integer only. */
+ gcSL_MULSAT, /* 0x5E */ /* Integer only. */
+}
+gcSL_OPCODE;
+
+typedef enum _gcSL_FORMAT
+{
+ gcSL_FLOAT = 0, /* 0 */
+ gcSL_INTEGER = 1, /* 1 */
+ gcSL_INT32 = 1, /* 1 */
+ gcSL_BOOLEAN = 2, /* 2 */
+ gcSL_UINT32 = 3, /* 3 */
+ gcSL_INT8, /* 4 */
+ gcSL_UINT8, /* 5 */
+ gcSL_INT16, /* 6 */
+ gcSL_UINT16, /* 7 */
+ gcSL_INT64, /* 8 */ /* Reserved for future enhancement. */
+ gcSL_UINT64, /* 9 */ /* Reserved for future enhancement. */
+ gcSL_INT128, /* 10 */ /* Reserved for future enhancement. */
+ gcSL_UINT128, /* 11 */ /* Reserved for future enhancement. */
+ gcSL_FLOAT16, /* 12 */
+ gcSL_FLOAT64, /* 13 */ /* Reserved for future enhancement. */
+ gcSL_FLOAT128, /* 14 */ /* Reserved for future enhancement. */
+}
+gcSL_FORMAT;
+
+/* Destination write enable bits. */
+typedef enum _gcSL_ENABLE
+{
+ gcSL_ENABLE_NONE = 0x0, /* none is enabled, error/uninitialized state */
+ gcSL_ENABLE_X = 0x1,
+ gcSL_ENABLE_Y = 0x2,
+ gcSL_ENABLE_Z = 0x4,
+ gcSL_ENABLE_W = 0x8,
+ /* Combinations. */
+ gcSL_ENABLE_XY = gcSL_ENABLE_X | gcSL_ENABLE_Y,
+ gcSL_ENABLE_XYZ = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XYZW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XYW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_XZ = gcSL_ENABLE_X | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XZW = gcSL_ENABLE_X | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XW = gcSL_ENABLE_X | gcSL_ENABLE_W,
+ gcSL_ENABLE_YZ = gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_YZW = gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_YW = gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_ZW = gcSL_ENABLE_Z | gcSL_ENABLE_W,
+}
+gcSL_ENABLE;
+
+/* Possible indices. */
+typedef enum _gcSL_INDEXED
+{
+ gcSL_NOT_INDEXED, /* 0 */
+ gcSL_INDEXED_X, /* 1 */
+ gcSL_INDEXED_Y, /* 2 */
+ gcSL_INDEXED_Z, /* 3 */
+ gcSL_INDEXED_W, /* 4 */
+}
+gcSL_INDEXED;
+
+/* Opcode conditions. */
+typedef enum _gcSL_CONDITION
+{
+ gcSL_ALWAYS, /* 0x0 */
+ gcSL_NOT_EQUAL, /* 0x1 */
+ gcSL_LESS_OR_EQUAL, /* 0x2 */
+ gcSL_LESS, /* 0x3 */
+ gcSL_EQUAL, /* 0x4 */
+ gcSL_GREATER, /* 0x5 */
+ gcSL_GREATER_OR_EQUAL, /* 0x6 */
+ gcSL_AND, /* 0x7 */
+ gcSL_OR, /* 0x8 */
+ gcSL_XOR, /* 0x9 */
+ gcSL_NOT_ZERO, /* 0xA */
+}
+gcSL_CONDITION;
+
+/* Possible source operand types. */
+typedef enum _gcSL_TYPE
+{
+ gcSL_NONE, /* 0x0 */
+ gcSL_TEMP, /* 0x1 */
+ gcSL_ATTRIBUTE, /* 0x2 */
+ gcSL_UNIFORM, /* 0x3 */
+ gcSL_SAMPLER, /* 0x4 */
+ gcSL_CONSTANT, /* 0x5 */
+ gcSL_OUTPUT, /* 0x6 */
+ gcSL_PHYSICAL, /* 0x7 */
+}
+gcSL_TYPE;
+
+/* Swizzle generator macro. */
+#define gcmSWIZZLE(Component1, Component2, Component3, Component4) \
+( \
+ (gcSL_SWIZZLE_ ## Component1 << 0) | \
+ (gcSL_SWIZZLE_ ## Component2 << 2) | \
+ (gcSL_SWIZZLE_ ## Component3 << 4) | \
+ (gcSL_SWIZZLE_ ## Component4 << 6) \
+)
+
+#define gcmExtractSwizzle(Swizzle, Index) \
+ ((gcSL_SWIZZLE) ((((Swizzle) >> (Index * 2)) & 0x3)))
+
+#define gcmComposeSwizzle(SwizzleX, SwizzleY, SwizzleZ, SwizzleW) \
+( \
+ ((SwizzleX) << 0) | \
+ ((SwizzleY) << 2) | \
+ ((SwizzleZ) << 4) | \
+ ((SwizzleW) << 6) \
+)
+
+/* Possible swizzle values. */
+typedef enum _gcSL_SWIZZLE
+{
+ gcSL_SWIZZLE_X, /* 0x0 */
+ gcSL_SWIZZLE_Y, /* 0x1 */
+ gcSL_SWIZZLE_Z, /* 0x2 */
+ gcSL_SWIZZLE_W, /* 0x3 */
+ /* Combinations. */
+ gcSL_SWIZZLE_XXXX = gcmSWIZZLE(X, X, X, X),
+ gcSL_SWIZZLE_YYYY = gcmSWIZZLE(Y, Y, Y, Y),
+ gcSL_SWIZZLE_ZZZZ = gcmSWIZZLE(Z, Z, Z, Z),
+ gcSL_SWIZZLE_WWWW = gcmSWIZZLE(W, W, W, W),
+ gcSL_SWIZZLE_XYYY = gcmSWIZZLE(X, Y, Y, Y),
+ gcSL_SWIZZLE_XZZZ = gcmSWIZZLE(X, Z, Z, Z),
+ gcSL_SWIZZLE_XWWW = gcmSWIZZLE(X, W, W, W),
+ gcSL_SWIZZLE_YZZZ = gcmSWIZZLE(Y, Z, Z, Z),
+ gcSL_SWIZZLE_YWWW = gcmSWIZZLE(Y, W, W, W),
+ gcSL_SWIZZLE_ZWWW = gcmSWIZZLE(Z, W, W, W),
+ gcSL_SWIZZLE_XYZZ = gcmSWIZZLE(X, Y, Z, Z),
+ gcSL_SWIZZLE_XYWW = gcmSWIZZLE(X, Y, W, W),
+ gcSL_SWIZZLE_XZWW = gcmSWIZZLE(X, Z, W, W),
+ gcSL_SWIZZLE_YZWW = gcmSWIZZLE(Y, Z, W, W),
+ gcSL_SWIZZLE_XXYZ = gcmSWIZZLE(X, X, Y, Z),
+ gcSL_SWIZZLE_XYZW = gcmSWIZZLE(X, Y, Z, W),
+ gcSL_SWIZZLE_XYXY = gcmSWIZZLE(X, Y, X, Y),
+ gcSL_SWIZZLE_YYZZ = gcmSWIZZLE(Y, Y, Z, Z),
+ gcSL_SWIZZLE_YYWW = gcmSWIZZLE(Y, Y, W, W),
+ gcSL_SWIZZLE_ZZZW = gcmSWIZZLE(Z, Z, Z, W),
+ gcSL_SWIZZLE_XZZW = gcmSWIZZLE(X, Z, Z, W),
+ gcSL_SWIZZLE_YYZW = gcmSWIZZLE(Y, Y, Z, W),
+
+ gcSL_SWIZZLE_INVALID = 0x7FFFFFFF
+}
+gcSL_SWIZZLE;
+
+typedef enum _gcSL_COMPONENT
+{
+ gcSL_COMPONENT_X, /* 0x0 */
+ gcSL_COMPONENT_Y, /* 0x1 */
+ gcSL_COMPONENT_Z, /* 0x2 */
+ gcSL_COMPONENT_W, /* 0x3 */
+ gcSL_COMPONENT_COUNT /* 0x4 */
+} gcSL_COMPONENT;
+
+#define gcmIsComponentEnabled(Enable, Component) (((Enable) & (1 << (Component))) != 0)
+
+/******************************************************************************\
+|*********************************** SHADERS **********************************|
+\******************************************************************************/
+
+/* Shader types. */
+typedef enum _gcSHADER_KIND {
+ gcSHADER_TYPE_UNKNOWN = 0,
+ gcSHADER_TYPE_VERTEX,
+ gcSHADER_TYPE_FRAGMENT,
+ gcSHADER_TYPE_CL,
+ gcSHADER_TYPE_PRECOMPILED,
+ gcSHADER_KIND_COUNT
+} gcSHADER_KIND;
+
+typedef enum _gcGL_DRIVER_VERSION {
+ gcGL_DRIVER_ES11, /* OpenGL ES 1.1 */
+ gcGL_DRIVER_ES20, /* OpenGL ES 2.0 */
+ gcGL_DRIVER_ES30 /* OpenGL ES 3.0 */
+} gcGL_DRIVER_VERSION;
+
+#define gcm
+/* gcSHADER objects. */
+typedef struct _gcSHADER * gcSHADER;
+typedef struct _gcATTRIBUTE * gcATTRIBUTE;
+typedef struct _gcUNIFORM * gcUNIFORM;
+typedef struct _gcOUTPUT * gcOUTPUT;
+typedef struct _gcsFUNCTION * gcFUNCTION;
+typedef struct _gcsKERNEL_FUNCTION * gcKERNEL_FUNCTION;
+typedef struct _gcsHINT * gcsHINT_PTR;
+typedef struct _gcSHADER_PROFILER * gcSHADER_PROFILER;
+typedef struct _gcVARIABLE * gcVARIABLE;
+
+struct _gcsHINT
+{
+ /* Numbr of data transfers for Vertex Shader output. */
+ gctUINT32 vsOutputCount;
+
+ /* Flag whether the VS has point size or not. */
+ gctBOOL vsHasPointSize;
+
+ /* Element count. */
+ gctUINT32 elementCount;
+
+ /* Component count. */
+ gctUINT32 componentCount;
+
+ /* Number of data transfers for Fragment Shader input. */
+ gctUINT32 fsInputCount;
+
+ /* Maximum number of temporary registers used in FS. */
+ gctUINT32 fsMaxTemp;
+
+ /* Maximum number of temporary registers used in VS. */
+ gctUINT32 vsMaxTemp;
+
+ /* Balance minimum. */
+ gctUINT32 balanceMin;
+
+ /* Balance maximum. */
+ gctUINT32 balanceMax;
+
+ /* Flag whether the PS outputs the depth value or not. */
+ gctBOOL psHasFragDepthOut;
+
+ /* Flag whether the ThreadWalker is in PS. */
+ gctBOOL threadWalkerInPS;
+
+};
+
+/* gcSHADER_TYPE enumeration. */
+typedef enum _gcSHADER_TYPE
+{
+ gcSHADER_FLOAT_X1, /* 0x00 */
+ gcSHADER_FLOAT_X2, /* 0x01 */
+ gcSHADER_FLOAT_X3, /* 0x02 */
+ gcSHADER_FLOAT_X4, /* 0x03 */
+ gcSHADER_FLOAT_2X2, /* 0x04 */
+ gcSHADER_FLOAT_3X3, /* 0x05 */
+ gcSHADER_FLOAT_4X4, /* 0x06 */
+ gcSHADER_BOOLEAN_X1, /* 0x07 */
+ gcSHADER_BOOLEAN_X2, /* 0x08 */
+ gcSHADER_BOOLEAN_X3, /* 0x09 */
+ gcSHADER_BOOLEAN_X4, /* 0x0A */
+ gcSHADER_INTEGER_X1, /* 0x0B */
+ gcSHADER_INTEGER_X2, /* 0x0C */
+ gcSHADER_INTEGER_X3, /* 0x0D */
+ gcSHADER_INTEGER_X4, /* 0x0E */
+ gcSHADER_SAMPLER_1D, /* 0x0F */
+ gcSHADER_SAMPLER_2D, /* 0x10 */
+ gcSHADER_SAMPLER_3D, /* 0x11 */
+ gcSHADER_SAMPLER_CUBIC, /* 0x12 */
+ gcSHADER_FIXED_X1, /* 0x13 */
+ gcSHADER_FIXED_X2, /* 0x14 */
+ gcSHADER_FIXED_X3, /* 0x15 */
+ gcSHADER_FIXED_X4, /* 0x16 */
+ gcSHADER_IMAGE_2D, /* 0x17 */ /* For OCL. */
+ gcSHADER_IMAGE_3D, /* 0x18 */ /* For OCL. */
+ gcSHADER_SAMPLER, /* 0x19 */ /* For OCL. */
+ gcSHADER_FLOAT_2X3, /* 0x1A */
+ gcSHADER_FLOAT_2X4, /* 0x1B */
+ gcSHADER_FLOAT_3X2, /* 0x1C */
+ gcSHADER_FLOAT_3X4, /* 0x1D */
+ gcSHADER_FLOAT_4X2, /* 0x1E */
+ gcSHADER_FLOAT_4X3, /* 0x1F */
+ gcSHADER_ISAMPLER_2D, /* 0x20 */
+ gcSHADER_ISAMPLER_3D, /* 0x21 */
+ gcSHADER_ISAMPLER_CUBIC, /* 0x22 */
+ gcSHADER_USAMPLER_2D, /* 0x23 */
+ gcSHADER_USAMPLER_3D, /* 0x24 */
+ gcSHADER_USAMPLER_CUBIC, /* 0x25 */
+ gcSHADER_SAMPLER_EXTERNAL_OES, /* 0x26 */
+ gcSHADER_TYPE_COUNT
+}
+gcSHADER_TYPE;
+
+typedef enum _gcSHADER_VAR_CATEGORY
+{
+ gcSHADER_VAR_CATEGORY_NORMAL = 0, /* primitive type and its array */
+ gcSHADER_VAR_CATEGORY_STRUCT = 1 /* structure */
+}
+gcSHADER_VAR_CATEGORY;
+
+#if GC_ENABLE_LOADTIME_OPT
+
+typedef struct _gcSHADER_TYPE_INFO
+{
+ gcSHADER_TYPE type; /* eg. gcSHADER_FLOAT_2X3 is the type */
+ gctCONST_STRING name; /* the name of the type: "gcSHADER_FLOAT_2X3" */
+ gcSHADER_TYPE baseType; /* its base type is gcSHADER_FLOAT_2 */
+ gctINT components; /* it has 2 components */
+ gctINT rows; /* and 3 rows */
+ gctINT size; /* the size in byte */
+} gcSHADER_TYPE_INFO;
+
+enum gceLTCDumpOption {
+ gceLTC_DUMP_UNIFORM = 0x0001,
+ gceLTC_DUMP_EVALUATION = 0x0002,
+ gceLTC_DUMP_EXPESSION = 0x0004,
+ gceLTC_DUMP_COLLECTING = 0x0008,
+};
+
+gctBOOL gcDumpOption(gctINT Opt);
+
+extern gcSHADER_TYPE_INFO shader_type_info[];
+
+#endif /* GC_ENABLE_LOADTIME_OPT */
+
+
+#define IS_MATRIX_TYPE(type) \
+ (((type >= gcSHADER_FLOAT_2X2) && (type <= gcSHADER_FLOAT_4X4)) || \
+ ((type >= gcSHADER_FLOAT_2X3) && (type <= gcSHADER_FLOAT_4X3)))
+
+/* gcSHADER_PRECISION enumeration. */
+typedef enum _gcSHADER_PRECISION
+{
+ gcSHADER_PRECISION_DEFAULT, /* 0x00 */
+ gcSHADER_PRECISION_HIGH, /* 0x01 */
+ gcSHADER_PRECISION_MEDIUM, /* 0x02 */
+ gcSHADER_PRECISION_LOW, /* 0x03 */
+}
+gcSHADER_PRECISION;
+
+/* Shader flags. */
+typedef enum _gceSHADER_FLAGS
+{
+ gcvSHADER_NO_OPTIMIZATION = 0x00,
+ gcvSHADER_DEAD_CODE = 0x01,
+ gcvSHADER_RESOURCE_USAGE = 0x02,
+ gcvSHADER_OPTIMIZER = 0x04,
+ gcvSHADER_USE_GL_Z = 0x08,
+ /*
+ The GC family of GPU cores model GC860 and under require the Z
+ to be from 0 <= z <= w.
+ However, OpenGL specifies the Z to be from -w <= z <= w. So we
+ have to a conversion here:
+
+ z = (z + w) / 2.
+
+ So here we append two instructions to the vertex shader.
+ */
+ gcvSHADER_USE_GL_POSITION = 0x10,
+ gcvSHADER_USE_GL_FACE = 0x20,
+ gcvSHADER_USE_GL_POINT_COORD = 0x40,
+ gcvSHADER_LOADTIME_OPTIMIZER = 0x80,
+}
+gceSHADER_FLAGS;
+
+/* Function argument qualifier */
+typedef enum _gceINPUT_OUTPUT
+{
+ gcvFUNCTION_INPUT,
+ gcvFUNCTION_OUTPUT,
+ gcvFUNCTION_INOUT
+}
+gceINPUT_OUTPUT;
+
+/* Kernel function property flags. */
+typedef enum _gcePROPERTY_FLAGS
+{
+ gcvPROPERTY_REQD_WORK_GRP_SIZE = 0x01
+}
+gceKERNEL_FUNCTION_PROPERTY_FLAGS;
+
+/* Uniform flags. */
+typedef enum _gceUNIFORM_FLAGS
+{
+ gcvUNIFORM_KERNEL_ARG = 0x01,
+ gcvUNIFORM_KERNEL_ARG_LOCAL = 0x02,
+ gcvUNIFORM_KERNEL_ARG_SAMPLER = 0x04,
+ gcvUNIFORM_LOCAL_ADDRESS_SPACE = 0x08,
+ gcvUNIFORM_PRIVATE_ADDRESS_SPACE = 0x10,
+ gcvUNIFORM_CONSTANT_ADDRESS_SPACE = 0x20,
+ gcvUNIFORM_GLOBAL_SIZE = 0x40,
+ gcvUNIFORM_LOCAL_SIZE = 0x80,
+ gcvUNIFORM_NUM_GROUPS = 0x100,
+ gcvUNIFORM_GLOBAL_OFFSET = 0x200,
+ gcvUNIFORM_WORK_DIM = 0x400,
+ gcvUNIFORM_KERNEL_ARG_CONSTANT = 0x800,
+ gcvUNIFORM_KERNEL_ARG_LOCAL_MEM_SIZE = 0x1000,
+ gcvUNIFORM_KERNEL_ARG_PRIVATE = 0x2000,
+ gcvUNIFORM_LOADTIME_CONSTANT = 0x4000,
+}
+gceUNIFORM_FLAGS;
+
+#define gcdUNIFORM_KERNEL_ARG_MASK (gcvUNIFORM_KERNEL_ARG | \
+ gcvUNIFORM_KERNEL_ARG_LOCAL | \
+ gcvUNIFORM_KERNEL_ARG_SAMPLER | \
+ gcvUNIFORM_KERNEL_ARG_PRIVATE | \
+ gcvUNIFORM_KERNEL_ARG_CONSTANT)
+
+typedef enum _gceVARIABLE_UPDATE_FLAGS
+{
+ gceVARIABLE_UPDATE_NOUPDATE = 0,
+ gceVARIABLE_UPDATE_TEMPREG,
+}gceVARIABLE_UPDATE_FLAGS;
+
+/*******************************************************************************
+** gcSHADER_SetCompilerVersion
+**
+** Set the compiler version of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to gcSHADER object
+**
+** gctINT *Version
+** Pointer to a two word version
+*/
+gceSTATUS
+gcSHADER_SetCompilerVersion(
+ IN gcSHADER Shader,
+ IN gctUINT32 *Version
+ );
+
+/*******************************************************************************
+** gcSHADER_GetCompilerVersion
+**
+** Get the compiler version of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR *CompilerVersion.
+** Pointer to holder of returned compilerVersion pointer
+*/
+gceSTATUS
+gcSHADER_GetCompilerVersion(
+ IN gcSHADER Shader,
+ OUT gctUINT32_PTR *CompilerVersion
+ );
+
+/*******************************************************************************
+** gcSHADER_GetType
+**
+** Get the gcSHADER object's type.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctINT *Type.
+** Pointer to return shader type.
+*/
+gceSTATUS
+gcSHADER_GetType(
+ IN gcSHADER Shader,
+ OUT gctINT *Type
+ );
+/*******************************************************************************
+** gcSHADER_Construct
+********************************************************************************
+**
+** Construct a new gcSHADER object.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Type of gcSHADER object to cerate. 'ShaderType' can be one of the
+** following:
+**
+** gcSHADER_TYPE_VERTEX Vertex shader.
+** gcSHADER_TYPE_FRAGMENT Fragment shader.
+**
+** OUTPUT:
+**
+** gcSHADER * Shader
+** Pointer to a variable receiving the gcSHADER object pointer.
+*/
+gceSTATUS
+gcSHADER_Construct(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ OUT gcSHADER * Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Destroy
+********************************************************************************
+**
+** Destroy a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Destroy(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Copy
+********************************************************************************
+**
+** Copy a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSHADER Source
+** Pointer to a gcSHADER object that will be copied.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Copy(
+ IN gcSHADER Shader,
+ IN gcSHADER Source
+ );
+
+/*******************************************************************************
+** gcSHADER_LoadHeader
+**
+** Load a gcSHADER object from a binary buffer. The binary buffer is layed out
+** as follows:
+** // Six word header
+** // Signature, must be 'S','H','D','R'.
+** gctINT8 signature[4];
+** gctUINT32 binFileVersion;
+** gctUINT32 compilerVersion[2];
+** gctUINT32 gcSLVersion;
+** gctUINT32 binarySize;
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+** Shader type will be returned if type in shader object is not gcSHADER_TYPE_PRECOMPILED
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containing the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+** nothing
+**
+*/
+gceSTATUS
+gcSHADER_LoadHeader(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize,
+ OUT gctUINT32 * ShaderVersion
+ );
+
+/*******************************************************************************
+** gcSHADER_LoadKernel
+**
+** Load a kernel function given by name into gcSHADER object
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSTRING KernelName
+** Pointer to a kernel function name
+**
+** OUTPUT:
+** nothing
+**
+*/
+gceSTATUS
+gcSHADER_LoadKernel(
+ IN gcSHADER Shader,
+ IN gctSTRING KernelName
+ );
+
+/*******************************************************************************
+** gcSHADER_Load
+********************************************************************************
+**
+** Load a gcSHADER object from a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containg the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Load(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_Save
+********************************************************************************
+**
+** Save a gcSHADER object to a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer to be used as storage for the gcSHADER
+** object. If 'Buffer' is gcvNULL, the gcSHADER object will not be saved,
+** but the number of bytes required to hold the binary output for the
+** gcSHADER object will be returned.
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable holding the number of bytes allocated in
+** 'Buffer'. Only valid if 'Buffer' is not gcvNULL.
+**
+** OUTPUT:
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable receiving the number of bytes required to hold
+** the binary form of the gcSHADER object.
+*/
+gceSTATUS
+gcSHADER_Save(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN OUT gctSIZE_T * BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_LoadEx
+********************************************************************************
+**
+** Load a gcSHADER object from a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containg the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_LoadEx(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_SaveEx
+********************************************************************************
+**
+** Save a gcSHADER object to a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer to be used as storage for the gcSHADER
+** object. If 'Buffer' is gcvNULL, the gcSHADER object will not be saved,
+** but the number of bytes required to hold the binary output for the
+** gcSHADER object will be returned.
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable holding the number of bytes allocated in
+** 'Buffer'. Only valid if 'Buffer' is not gcvNULL.
+**
+** OUTPUT:
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable receiving the number of bytes required to hold
+** the binary form of the gcSHADER object.
+*/
+gceSTATUS
+gcSHADER_SaveEx(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN OUT gctSIZE_T * BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateAttributes
+**
+** Reallocate an array of pointers to gcATTRIBUTE objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateAttributes(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddAttribute
+********************************************************************************
+**
+** Add an attribute to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the attribute to add.
+**
+** gcSHADER_TYPE Type
+** Type of the attribute to add.
+**
+** gctSIZE_T Length
+** Array length of the attribute to add. 'Length' must be at least 1.
+**
+** gctBOOL IsTexture
+** gcvTRUE if the attribute is used as a texture coordinate, gcvFALSE if not.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_AddAttribute(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctBOOL IsTexture,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttributeCount
+********************************************************************************
+**
+** Get the number of attributes for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of attributes.
+*/
+gceSTATUS
+gcSHADER_GetAttributeCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttribute
+********************************************************************************
+**
+** Get the gcATTRIBUTE object poniter for an indexed attribute for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the attribute to retrieve.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetAttribute(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateUniforms
+**
+** Reallocate an array of pointers to gcUNIFORM objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateUniforms(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddUniform
+********************************************************************************
+**
+** Add an uniform to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the uniform to add.
+**
+** gcSHADER_TYPE Type
+** Type of the uniform to add.
+**
+** gctSIZE_T Length
+** Array length of the uniform to add. 'Length' must be at least 1.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_AddUniform(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * Uniform
+ );
+
+
+/*******************************************************************************
+** gcSHADER_AddUniformEx
+********************************************************************************
+**
+** Add an uniform to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the uniform to add.
+**
+** gcSHADER_TYPE Type
+** Type of the uniform to add.
+**
+** gcSHADER_PRECISION precision
+** Precision of the uniform to add.
+**
+** gctSIZE_T Length
+** Array length of the uniform to add. 'Length' must be at least 1.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_AddUniformEx(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gcSHADER_PRECISION precision,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniformCount
+********************************************************************************
+**
+** Get the number of uniforms for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of uniforms.
+*/
+gceSTATUS
+gcSHADER_GetUniformCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniform
+********************************************************************************
+**
+** Get the gcUNIFORM object pointer for an indexed uniform for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the uniform to retrieve.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_GetUniform(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_GetKernelFucntion
+**
+** Get the gcKERNEL_FUNCTION object pointer for an indexed kernel function for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of kernel function to retreive the name for.
+**
+** OUTPUT:
+**
+** gcKERNEL_FUNCTION * KernelFunction
+** Pointer to a variable receiving the gcKERNEL_FUNCTION object pointer.
+*/
+gceSTATUS
+gcSHADER_GetKernelFunction(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcKERNEL_FUNCTION * KernelFunction
+ );
+
+gceSTATUS
+gcSHADER_GetKernelFunctionByName(
+ IN gcSHADER Shader,
+ IN gctSTRING KernelName,
+ OUT gcKERNEL_FUNCTION * KernelFunction
+ );
+/*******************************************************************************
+** gcSHADER_GetKernelFunctionCount
+**
+** Get the number of kernel functions for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of kernel functions.
+*/
+gceSTATUS
+gcSHADER_GetKernelFunctionCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateOutputs
+**
+** Reallocate an array of pointers to gcOUTPUT objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateOutputs(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOutput
+********************************************************************************
+**
+** Add an output to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the output to add.
+**
+** gcSHADER_TYPE Type
+** Type of the output to add.
+**
+** gctSIZE_T Length
+** Array length of the output to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the output value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOutput(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+gceSTATUS
+gcSHADER_AddOutputIndexed(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gctSIZE_T Index,
+ IN gctUINT16 TempIndex
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutputCount
+********************************************************************************
+**
+** Get the number of outputs for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of outputs.
+*/
+gceSTATUS
+gcSHADER_GetOutputCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutput
+********************************************************************************
+**
+** Get the gcOUTPUT object pointer for an indexed output for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of output to retrieve.
+**
+** OUTPUT:
+**
+** gcOUTPUT * Output
+** Pointer to a variable receiving the gcOUTPUT object pointer.
+*/
+gceSTATUS
+gcSHADER_GetOutput(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcOUTPUT * Output
+ );
+
+
+/*******************************************************************************
+** gcSHADER_GetOutputByName
+********************************************************************************
+**
+** Get the gcOUTPUT object pointer for this shader by output name.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSTRING name
+** Name of output to retrieve.
+**
+** gctSIZE_T nameLength
+** Length of name to retrieve
+**
+** OUTPUT:
+**
+** gcOUTPUT * Output
+** Pointer to a variable receiving the gcOUTPUT object pointer.
+*/
+gceSTATUS
+gcSHADER_GetOutputByName(
+ IN gcSHADER Shader,
+ IN gctSTRING name,
+ IN gctSIZE_T nameLength,
+ OUT gcOUTPUT * Output
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateVariables
+**
+** Reallocate an array of pointers to gcVARIABLE objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateVariables(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddVariable
+********************************************************************************
+**
+** Add a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the variable to add.
+**
+** gcSHADER_TYPE Type
+** Type of the variable to add.
+**
+** gctSIZE_T Length
+** Array length of the variable to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the variable value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddVariable(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+
+/*******************************************************************************
+** gcSHADER_AddVariableEx
+********************************************************************************
+**
+** Add a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the variable to add.
+**
+** gcSHADER_TYPE Type
+** Type of the variable to add.
+**
+** gctSIZE_T Length
+** Array length of the variable to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the variable value.
+**
+** gcSHADER_VAR_CATEGORY varCategory
+** Variable category, normal or struct.
+**
+** gctUINT16 numStructureElement
+** If struct, its element number.
+**
+** gctINT16 parent
+** If struct, parent index in gcSHADER.variables.
+**
+** gctINT16 preSibling
+** If struct, previous sibling index in gcSHADER.variables.
+**
+** gctINT16* ThisVarIndex
+** Returned value about variable index in gcSHADER.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddVariableEx(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister,
+ IN gcSHADER_VAR_CATEGORY varCategory,
+ IN gctUINT16 numStructureElement,
+ IN gctINT16 parent,
+ IN gctINT16 preSibling,
+ OUT gctINT16* ThisVarIndex
+ );
+
+/*******************************************************************************
+** gcSHADER_UpdateVariable
+********************************************************************************
+**
+** Update a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of variable to retrieve.
+**
+** gceVARIABLE_UPDATE_FLAGS flag
+** Flag which property of variable will be updated.
+**
+** gctUINT16 newValue
+** New value to update.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_UpdateVariable(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ IN gceVARIABLE_UPDATE_FLAGS flag,
+ IN gctUINT16 newValue
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariableCount
+********************************************************************************
+**
+** Get the number of variables for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of variables.
+*/
+gceSTATUS
+gcSHADER_GetVariableCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariable
+********************************************************************************
+**
+** Get the gcVARIABLE object pointer for an indexed variable for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of variable to retrieve.
+**
+** OUTPUT:
+**
+** gcVARIABLE * Variable
+** Pointer to a variable receiving the gcVARIABLE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetVariable(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcVARIABLE * Variable
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcode
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the target
+** of the opcode.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcode(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddOpcode2(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeIndexed
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object that writes to an dynamically indexed
+** target.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the
+** target of the opcode.
+**
+** gcSL_INDEXED Mode
+** Location of the dynamic index inside the temporary register. Valid
+** values can be:
+**
+** gcSL_INDEXED_X - Use x component of the temporary register.
+** gcSL_INDEXED_Y - Use y component of the temporary register.
+** gcSL_INDEXED_Z - Use z component of the temporary register.
+** gcSL_INDEXED_W - Use w component of the temporary register.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditionIndexed
+**
+** Add an opcode to a gcSHADER object that writes to an dynamically indexed
+** target.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition to check.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the
+** target of the opcode.
+**
+** gcSL_INDEXED Indexed
+** Location of the dynamic index inside the temporary register. Valid
+** values can be:
+**
+** gcSL_INDEXED_X - Use x component of the temporary register.
+** gcSL_INDEXED_Y - Use y component of the temporary register.
+** gcSL_INDEXED_Z - Use z component of the temporary register.
+** gcSL_INDEXED_W - Use w component of the temporary register.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditionIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_INDEXED Indexed,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditional
+********************************************************************************
+**
+** Add an conditional opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditional(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditionalFormatted
+**
+** Add an conditional jump or call opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gcSL_FORMAT Format
+** Format of conditional operands
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditionalFormatted(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gcSL_FORMAT Format,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditionalFormattedEnable
+**
+** Add an conditional jump or call opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gcSL_FORMAT Format
+** Format of conditional operands
+**
+** gctUINT8 Enable
+** Write enable value for the target of the opcode.
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditionalFormattedEnable(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gcSL_FORMAT Format,
+ IN gctUINT8 Enable,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddLabel
+********************************************************************************
+**
+** Define a label at the current instruction of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Label
+** Label to define.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddLabel(
+ IN gcSHADER Shader,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSource
+********************************************************************************
+**
+** Add a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSource(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceIndexed
+********************************************************************************
+**
+** Add a dynamically indexed source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_INDEXED Mode
+** Addressing mode for the index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttribute
+********************************************************************************
+**
+** Add an attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttribute(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttributeIndexed
+********************************************************************************
+**
+** Add an indexed attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttributeIndexed(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniform
+********************************************************************************
+**
+** Add a uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniform(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniformIndexed
+********************************************************************************
+**
+** Add an indexed uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniformIndexed(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+gceSTATUS
+gcSHADER_AddSourceSamplerIndexed(
+ IN gcSHADER Shader,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+gceSTATUS
+gcSHADER_AddSourceAttributeFormatted(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceAttributeIndexedFormatted(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceUniformFormatted(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceUniformIndexedFormatted(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceSamplerIndexedFormatted(
+ IN gcSHADER Shader,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceConstant
+********************************************************************************
+**
+** Add a constant floating point value as a source operand to a gcSHADER
+** object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctFLOAT Constant
+** Floating point constant.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceConstant(
+ IN gcSHADER Shader,
+ IN gctFLOAT Constant
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceConstantFormatted
+********************************************************************************
+**
+** Add a constant value as a source operand to a gcSHADER
+** object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** void * Constant
+** Pointer to constant.
+**
+** gcSL_FORMAT Format
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceConstantFormatted(
+ IN gcSHADER Shader,
+ IN void *Constant,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_Pack
+********************************************************************************
+**
+** Pack a dynamically created gcSHADER object by trimming the allocated arrays
+** and resolving all the labeling.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Pack(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_SetOptimizationOption
+********************************************************************************
+**
+** Set optimization option of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT OptimizationOption
+** Optimization option. Can be one of the following:
+**
+** 0 - No optimization.
+** 1 - Full optimization.
+** Other value - For optimizer testing.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_SetOptimizationOption(
+ IN gcSHADER Shader,
+ IN gctUINT OptimizationOption
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateFunctions
+**
+** Reallocate an array of pointers to gcFUNCTION objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateFunctions(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcSHADER_AddFunction(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ OUT gcFUNCTION * Function
+ );
+
+gceSTATUS
+gcSHADER_ReallocateKernelFunctions(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcSHADER_AddKernelFunction(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ OUT gcKERNEL_FUNCTION * KernelFunction
+ );
+
+gceSTATUS
+gcSHADER_BeginFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+gceSTATUS
+gcSHADER_EndFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+gceSTATUS
+gcSHADER_BeginKernelFunction(
+ IN gcSHADER Shader,
+ IN gcKERNEL_FUNCTION KernelFunction
+ );
+
+gceSTATUS
+gcSHADER_EndKernelFunction(
+ IN gcSHADER Shader,
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctSIZE_T LocalMemorySize
+ );
+
+gceSTATUS
+gcSHADER_SetMaxKernelFunctionArgs(
+ IN gcSHADER Shader,
+ IN gctUINT32 MaxKernelFunctionArgs
+ );
+
+/*******************************************************************************
+** gcSHADER_SetConstantMemorySize
+**
+** Set the constant memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T ConstantMemorySize
+** Constant memory size in bytes
+**
+** gctCHAR *ConstantMemoryBuffer
+** Constant memory buffer
+*/
+gceSTATUS
+gcSHADER_SetConstantMemorySize(
+ IN gcSHADER Shader,
+ IN gctSIZE_T ConstantMemorySize,
+ IN gctCHAR * ConstantMemoryBuffer
+ );
+
+/*******************************************************************************
+** gcSHADER_GetConstantMemorySize
+**
+** Set the constant memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * ConstantMemorySize
+** Pointer to a variable receiving constant memory size in bytes
+**
+** gctCHAR **ConstantMemoryBuffer.
+** Pointer to a variable for returned shader constant memory buffer.
+*/
+gceSTATUS
+gcSHADER_GetConstantMemorySize(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * ConstantMemorySize,
+ OUT gctCHAR ** ConstantMemoryBuffer
+ );
+
+/*******************************************************************************
+** gcSHADER_SetPrivateMemorySize
+**
+** Set the private memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T PrivateMemorySize
+** Private memory size in bytes
+*/
+gceSTATUS
+gcSHADER_SetPrivateMemorySize(
+ IN gcSHADER Shader,
+ IN gctSIZE_T PrivateMemorySize
+ );
+
+/*******************************************************************************
+** gcSHADER_GetPrivateMemorySize
+**
+** Set the private memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * PrivateMemorySize
+** Pointer to a variable receiving private memory size in bytes
+*/
+gceSTATUS
+gcSHADER_GetPrivateMemorySize(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * PrivateMemorySize
+ );
+
+/*******************************************************************************
+** gcSHADER_SetLocalMemorySize
+**
+** Set the local memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T LocalMemorySize
+** Local memory size in bytes
+*/
+gceSTATUS
+gcSHADER_SetLocalMemorySize(
+ IN gcSHADER Shader,
+ IN gctSIZE_T LocalMemorySize
+ );
+
+/*******************************************************************************
+** gcSHADER_GetLocalMemorySize
+**
+** Set the local memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * LocalMemorySize
+** Pointer to a variable receiving lcoal memory size in bytes
+*/
+gceSTATUS
+gcSHADER_GetLocalMemorySize(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * LocalMemorySize
+ );
+
+
+/*******************************************************************************
+** gcSHADER_CheckValidity
+**
+** Check validity for a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+*/
+gceSTATUS
+gcSHADER_CheckValidity(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the attribute. 'Type'
+** can be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** attribute was declared as an array. If the attribute was not
+** declared as an array, the array length will be 1. 'ArrayLength' can
+** be gcvNULL, in which case no array length will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetType(
+ IN gcATTRIBUTE Attribute,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_GetName
+********************************************************************************
+**
+** Get the name of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the attribute name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the attribute name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetName(
+ IN gcATTRIBUTE Attribute,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_IsEnabled
+********************************************************************************
+**
+** Query the enabled state of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctBOOL * Enabled
+** Pointer to a variable receiving the enabled state of the attribute.
+*/
+gceSTATUS
+gcATTRIBUTE_IsEnabled(
+ IN gcATTRIBUTE Attribute,
+ OUT gctBOOL * Enabled
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the uniform. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** uniform was declared as an array. If the uniform was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetType(
+ IN gcUNIFORM Uniform,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetTypeEx
+********************************************************************************
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the uniform. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gcSHADER_PRECISION * Precision
+** Pointer to a variable receiving the precision of the uniform. 'Precision' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** uniform was declared as an array. If the uniform was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetTypeEx(
+ IN gcUNIFORM Uniform,
+ OUT gcSHADER_TYPE * Type,
+ OUT gcSHADER_PRECISION * Precision,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetFlags
+********************************************************************************
+**
+** Get the flags of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gceUNIFORM_FLAGS * Flags
+** Pointer to a variable receiving the flags of the uniform.
+**
+*/
+gceSTATUS
+gcUNIFORM_GetFlags(
+ IN gcUNIFORM Uniform,
+ OUT gceUNIFORM_FLAGS * Flags
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetFlags
+********************************************************************************
+**
+** Set the flags of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gceUNIFORM_FLAGS Flags
+** Flags of the uniform to be set.
+**
+** OUTPUT:
+** Nothing.
+**
+*/
+gceSTATUS
+gcUNIFORM_SetFlags(
+ IN gcUNIFORM Uniform,
+ IN gceUNIFORM_FLAGS Flags
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetName
+********************************************************************************
+**
+** Get the name of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the uniform name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the uniform name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetName(
+ IN gcUNIFORM Uniform,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetSampler
+********************************************************************************
+**
+** Get the physical sampler number for a sampler gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctUINT32 * Sampler
+** Pointer to a variable receiving the physical sampler.
+*/
+gceSTATUS
+gcUNIFORM_GetSampler(
+ IN gcUNIFORM Uniform,
+ OUT gctUINT32 * Sampler
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetFormat
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSL_FORMAT * Format
+** Pointer to a variable receiving the format of element of the uniform.
+** 'Type' can be gcvNULL, in which case no type will be returned.
+**
+** gctBOOL * IsPointer
+** Pointer to a variable receiving the state wheter the uniform is a pointer.
+** 'IsPointer' can be gcvNULL, in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetFormat(
+ IN gcUNIFORM Uniform,
+ OUT gcSL_FORMAT * Format,
+ OUT gctBOOL * IsPointer
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetFormat
+**
+** Set the format and isPointer of a uniform.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gcSL_FORMAT Format
+** Format of element of the uniform shaderType.
+**
+** gctBOOL IsPointer
+** Wheter the uniform is a pointer.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetFormat(
+ IN gcUNIFORM Uniform,
+ IN gcSL_FORMAT Format,
+ IN gctBOOL IsPointer
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValue
+********************************************************************************
+**
+** Set the value of a uniform in integer.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctINT * Value
+** Pointer to a buffer holding the integer values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValue(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueX
+********************************************************************************
+**
+** Set the value of a uniform in fixed point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFIXED_POINT * Value
+** Pointer to a buffer holding the fixed point values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueX(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN gctFIXED_POINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueF
+********************************************************************************
+**
+** Set the value of a uniform in floating point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFLOAT * Value
+** Pointer to a buffer holding the floating point values for the
+** uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueF(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctFLOAT * Value
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the output. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** output was declared as an array. If the output was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetType(
+ IN gcOUTPUT Output,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetIndex
+********************************************************************************
+**
+** Get the index of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctUINT * Index
+** Pointer to a variable receiving the temporary register index of the
+** output. 'Index' can be gcvNULL,. in which case no index will be
+** returned.
+*/
+gceSTATUS
+gcOUTPUT_GetIndex(
+ IN gcOUTPUT Output,
+ OUT gctUINT * Index
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetName
+********************************************************************************
+**
+** Get the name of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the output name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the output name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetName(
+ IN gcOUTPUT Output,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+*********************************************************** F U N C T I O N S **
+*******************************************************************************/
+
+/*******************************************************************************
+** gcFUNCTION_ReallocateArguments
+**
+** Reallocate an array of gcsFUNCTION_ARGUMENT objects.
+**
+** INPUT:
+**
+** gcFUNCTION Function
+** Pointer to a gcFUNCTION object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcFUNCTION_ReallocateArguments(
+ IN gcFUNCTION Function,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcFUNCTION_AddArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 TempIndex,
+ IN gctUINT8 Enable,
+ IN gctUINT8 Qualifier
+ );
+
+gceSTATUS
+gcFUNCTION_GetArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 Index,
+ OUT gctUINT16_PTR Temp,
+ OUT gctUINT8_PTR Enable,
+ OUT gctUINT8_PTR Swizzle
+ );
+
+gceSTATUS
+gcFUNCTION_GetLabel(
+ IN gcFUNCTION Function,
+ OUT gctUINT_PTR Label
+ );
+
+/*******************************************************************************
+************************* K E R N E L P R O P E R T Y F U N C T I O N S **
+*******************************************************************************/
+/*******************************************************************************/
+gceSTATUS
+gcKERNEL_FUNCTION_AddKernelFunctionProperties(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctINT propertyType,
+ IN gctSIZE_T propertySize,
+ IN gctINT * values
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetPropertyCount(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetProperty(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT Index,
+ OUT gctSIZE_T * propertySize,
+ OUT gctINT * propertyType,
+ OUT gctINT * propertyValues
+ );
+
+
+/*******************************************************************************
+*******************************I M A G E S A M P L E R F U N C T I O N S **
+*******************************************************************************/
+/*******************************************************************************
+** gcKERNEL_FUNCTION_ReallocateImageSamplers
+**
+** Reallocate an array of pointers to image sampler pair.
+**
+** INPUT:
+**
+** gcKERNEL_FUNCTION KernelFunction
+** Pointer to a gcKERNEL_FUNCTION object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcKERNEL_FUNCTION_ReallocateImageSamplers(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_AddImageSampler(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT8 ImageNum,
+ IN gctBOOL IsConstantSamplerType,
+ IN gctUINT32 SamplerType
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetImageSamplerCount(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetImageSampler(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT Index,
+ OUT gctUINT8 *ImageNum,
+ OUT gctBOOL *IsConstantSamplerType,
+ OUT gctUINT32 *SamplerType
+ );
+
+/*******************************************************************************
+*********************************************K E R N E L F U N C T I O N S **
+*******************************************************************************/
+
+/*******************************************************************************
+** gcKERNEL_FUNCTION_ReallocateArguments
+**
+** Reallocate an array of gcsFUNCTION_ARGUMENT objects.
+**
+** INPUT:
+**
+** gcKERNEL_FUNCTION Function
+** Pointer to a gcKERNEL_FUNCTION object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcKERNEL_FUNCTION_ReallocateArguments(
+ IN gcKERNEL_FUNCTION Function,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_AddArgument(
+ IN gcKERNEL_FUNCTION Function,
+ IN gctUINT16 TempIndex,
+ IN gctUINT8 Enable,
+ IN gctUINT8 Qualifier
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetArgument(
+ IN gcKERNEL_FUNCTION Function,
+ IN gctUINT16 Index,
+ OUT gctUINT16_PTR Temp,
+ OUT gctUINT8_PTR Enable,
+ OUT gctUINT8_PTR Swizzle
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetLabel(
+ IN gcKERNEL_FUNCTION Function,
+ OUT gctUINT_PTR Label
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetName(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_ReallocateUniformArguments(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_AddUniformArgument(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * UniformArgument
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetUniformArgumentCount(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetUniformArgument(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT Index,
+ OUT gcUNIFORM * UniformArgument
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_SetCodeEnd(
+ IN gcKERNEL_FUNCTION KernelFunction
+ );
+
+/*******************************************************************************
+** gcCompileShader
+********************************************************************************
+**
+** Compile a shader.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Shader type to compile. Can be one of the following values:
+**
+** gcSHADER_TYPE_VERTEX
+** Compile a vertex shader.
+**
+** gcSHADER_TYPE_FRAGMENT
+** Compile a fragment shader.
+**
+** gctSIZE_T SourceSize
+** Size of the source buffer in bytes.
+**
+** gctCONST_STRING Source
+** Pointer to the buffer containing the shader source code.
+**
+** OUTPUT:
+**
+** gcSHADER * Binary
+** Pointer to a variable receiving the pointer to a gcSHADER object
+** containg the compiled shader code.
+**
+** gctSTRING * Log
+** Pointer to a variable receiving a string pointer containging the
+** compile log.
+*/
+gceSTATUS
+gcCompileShader(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ IN gctSIZE_T SourceSize,
+ IN gctCONST_STRING Source,
+ OUT gcSHADER * Binary,
+ OUT gctSTRING * Log
+ );
+
+/*******************************************************************************
+** gcOptimizeShader
+********************************************************************************
+**
+** Optimize a shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object holding information about the compiled
+** shader.
+**
+** gctFILE LogFile
+** Pointer to an open FILE object.
+*/
+gceSTATUS
+gcOptimizeShader(
+ IN gcSHADER Shader,
+ IN gctFILE LogFile
+ );
+
+/*******************************************************************************
+** gcLinkShaders
+********************************************************************************
+**
+** Link two shaders and generate a harwdare specific state buffer by compiling
+** the compiler generated code through the resource allocator and code
+** generator.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to a gcSHADER object holding information about the compiled
+** vertex shader.
+**
+** gcSHADER FragmentShader
+** Pointer to a gcSHADER object holding information about the compiled
+** fragment shader.
+**
+** gceSHADER_FLAGS Flags
+** Compiler flags. Can be any of the following:
+**
+** gcvSHADER_DEAD_CODE - Dead code elimination.
+** gcvSHADER_RESOURCE_USAGE - Resource usage optimizaion.
+** gcvSHADER_OPTIMIZER - Full optimization.
+** gcvSHADER_USE_GL_Z - Use OpenGL ES Z coordinate.
+** gcvSHADER_USE_GL_POSITION - Use OpenGL ES gl_Position.
+** gcvSHADER_USE_GL_FACE - Use OpenGL ES gl_FaceForward.
+**
+** OUTPUT:
+**
+** gctSIZE_T * StateBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'StateBuffer'.
+**
+** gctPOINTER * StateBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLinkShaders(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gceSHADER_FLAGS Flags,
+ OUT gctSIZE_T * StateBufferSize,
+ OUT gctPOINTER * StateBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+/*******************************************************************************
+** gcLoadShaders
+********************************************************************************
+**
+** Load a pre-compiled and pre-linked shader program into the hardware.
+**
+** INPUT:
+**
+** gcoHAL Hal
+** Pointer to a gcoHAL object.
+**
+** gctSIZE_T StateBufferSize
+** The number of bytes in the 'StateBuffer'.
+**
+** gctPOINTER StateBuffer
+** Pointer to the states that make up the shader program.
+**
+** gcsHINT_PTR Hints
+** Pointer to a gcsHINT structure that contains information required
+** when loading the shader states.
+*/
+gceSTATUS
+gcLoadShaders(
+ IN gcoHAL Hal,
+ IN gctSIZE_T StateBufferSize,
+ IN gctPOINTER StateBuffer,
+ IN gcsHINT_PTR Hints
+ );
+
+/*******************************************************************************
+** gcSaveProgram
+********************************************************************************
+**
+** Save pre-compiled shaders and pre-linked programs to a binary file.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to vertex shader object.
+**
+** gcSHADER FragmentShader
+** Pointer to fragment shader object.
+**
+** gctSIZE_T ProgramBufferSize
+** Number of bytes in 'ProgramBuffer'.
+**
+** gctPOINTER ProgramBuffer
+** Pointer to buffer containing the program states.
+**
+** gcsHINT_PTR Hints
+** Pointer to HINTS structure for program states.
+**
+** OUTPUT:
+**
+** gctPOINTER * Binary
+** Pointer to a variable receiving the binary data to be saved.
+**
+** gctSIZE_T * BinarySize
+** Pointer to a variable receiving the number of bytes inside 'Binary'.
+*/
+gceSTATUS
+gcSaveProgram(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gctSIZE_T ProgramBufferSize,
+ IN gctPOINTER ProgramBuffer,
+ IN gcsHINT_PTR Hints,
+ OUT gctPOINTER * Binary,
+ OUT gctSIZE_T * BinarySize
+ );
+
+/*******************************************************************************
+** gcLoadProgram
+********************************************************************************
+**
+** Load pre-compiled shaders and pre-linked programs from a binary file.
+**
+** INPUT:
+**
+** gctPOINTER Binary
+** Pointer to the binary data loaded.
+**
+** gctSIZE_T BinarySize
+** Number of bytes in 'Binary'.
+**
+** OUTPUT:
+**
+** gcSHADER VertexShader
+** Pointer to a vertex shader object.
+**
+** gcSHADER FragmentShader
+** Pointer to a fragment shader object.
+**
+** gctSIZE_T * ProgramBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'ProgramBuffer'.
+**
+** gctPOINTER * ProgramBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLoadProgram(
+ IN gctPOINTER Binary,
+ IN gctSIZE_T BinarySize,
+ OUT gcSHADER VertexShader,
+ OUT gcSHADER FragmentShader,
+ OUT gctSIZE_T * ProgramBufferSize,
+ OUT gctPOINTER * ProgramBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+/*******************************************************************************
+** gcCompileKernel
+********************************************************************************
+**
+** Compile a OpenCL kernel shader.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctSIZE_T SourceSize
+** Size of the source buffer in bytes.
+**
+** gctCONST_STRING Source
+** Pointer to the buffer containing the shader source code.
+**
+** OUTPUT:
+**
+** gcSHADER * Binary
+** Pointer to a variable receiving the pointer to a gcSHADER object
+** containg the compiled shader code.
+**
+** gctSTRING * Log
+** Pointer to a variable receiving a string pointer containging the
+** compile log.
+*/
+gceSTATUS
+gcCompileKernel(
+ IN gcoHAL Hal,
+ IN gctSIZE_T SourceSize,
+ IN gctCONST_STRING Source,
+ IN gctCONST_STRING Options,
+ OUT gcSHADER * Binary,
+ OUT gctSTRING * Log
+ );
+
+/*******************************************************************************
+** gcLinkKernel
+********************************************************************************
+**
+** Link OpenCL kernel and generate a harwdare specific state buffer by compiling
+** the compiler generated code through the resource allocator and code
+** generator.
+**
+** INPUT:
+**
+** gcSHADER Kernel
+** Pointer to a gcSHADER object holding information about the compiled
+** OpenCL kernel.
+**
+** gceSHADER_FLAGS Flags
+** Compiler flags. Can be any of the following:
+**
+** gcvSHADER_DEAD_CODE - Dead code elimination.
+** gcvSHADER_RESOURCE_USAGE - Resource usage optimizaion.
+** gcvSHADER_OPTIMIZER - Full optimization.
+** gcvSHADER_USE_GL_Z - Use OpenGL ES Z coordinate.
+** gcvSHADER_USE_GL_POSITION - Use OpenGL ES gl_Position.
+** gcvSHADER_USE_GL_FACE - Use OpenGL ES gl_FaceForward.
+**
+** OUTPUT:
+**
+** gctSIZE_T * StateBufferSize
+** Pointer to a variable receiving the number of bytes in the buffer
+** returned in 'StateBuffer'.
+**
+** gctPOINTER * StateBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLinkKernel(
+ IN gcSHADER Kernel,
+ IN gceSHADER_FLAGS Flags,
+ OUT gctSIZE_T * StateBufferSize,
+ OUT gctPOINTER * StateBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+/*******************************************************************************
+** gcLoadKernel
+********************************************************************************
+**
+** Load a pre-compiled and pre-linked kernel program into the hardware.
+**
+** INPUT:
+**
+** gctSIZE_T StateBufferSize
+** The number of bytes in the 'StateBuffer'.
+**
+** gctPOINTER StateBuffer
+** Pointer to the states that make up the shader program.
+**
+** gcsHINT_PTR Hints
+** Pointer to a gcsHINT structure that contains information required
+** when loading the shader states.
+*/
+gceSTATUS
+gcLoadKernel(
+ IN gctSIZE_T StateBufferSize,
+ IN gctPOINTER StateBuffer,
+ IN gcsHINT_PTR Hints
+ );
+
+gceSTATUS
+gcInvokeThreadWalker(
+ IN gcsTHREAD_WALKER_INFO_PTR Info
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VIVANTE_NO_3D */
+#endif /* __gc_hal_compiler_h_ */
diff --git a/src/include_eureka/gc_hal_driver.h b/src/include_eureka/gc_hal_driver.h
new file mode 100644
index 0000000..12e2894
--- /dev/null
+++ b/src/include_eureka/gc_hal_driver.h
@@ -0,0 +1,927 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_driver_h_
+#define __gc_hal_driver_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#if gcdENABLE_VG
+#include "gc_hal_driver_vg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*####modified for marvell-bg2*/
+#ifdef CONFIG_DOVE_GPU
+#define DRV_NAME "dove_gpu"
+#else
+
+#ifndef DRV_NAME
+#define DRV_NAME "gal3d"
+#endif
+
+#endif
+
+/*#ifndef USE_GALOIS_SHM
+#define USE_GALOIS_SHM 1
+#endif*/
+
+#define DRV_MSG "[" DRV_NAME "]"
+#ifndef gcvHAL_CLASS
+#define gcvHAL_CLASS DRV_NAME
+#endif
+/*####end for marvell-bg2*/
+
+/******************************************************************************\
+******************************* I/O Control Codes ******************************
+\******************************************************************************/
+/*####modified for marvell-bg2
+//#define gcvHAL_CLASS "galcore"
+####end for marvell-bg2*/
+#define IOCTL_GCHAL_INTERFACE 30000
+#define IOCTL_GCHAL_KERNEL_INTERFACE 30001
+#define IOCTL_GCHAL_TERMINATE 30002
+
+/******************************************************************************\
+********************************* Command Codes ********************************
+\******************************************************************************/
+
+typedef enum _gceHAL_COMMAND_CODES
+{
+ /* Generic query. */
+ gcvHAL_QUERY_VIDEO_MEMORY,
+ gcvHAL_QUERY_CHIP_IDENTITY,
+
+ /* Contiguous memory. */
+ gcvHAL_ALLOCATE_NON_PAGED_MEMORY,
+ gcvHAL_FREE_NON_PAGED_MEMORY,
+ gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY,
+ gcvHAL_FREE_CONTIGUOUS_MEMORY,
+
+ /* Video memory allocation. */
+ gcvHAL_ALLOCATE_VIDEO_MEMORY, /* Enforced alignment. */
+ gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY, /* No alignment. */
+ gcvHAL_FREE_VIDEO_MEMORY,
+
+ /* Physical-to-logical mapping. */
+ gcvHAL_MAP_MEMORY,
+ gcvHAL_UNMAP_MEMORY,
+
+ /* Logical-to-physical mapping. */
+ gcvHAL_MAP_USER_MEMORY,
+ gcvHAL_UNMAP_USER_MEMORY,
+
+ /* Surface lock/unlock. */
+ gcvHAL_LOCK_VIDEO_MEMORY,
+ gcvHAL_UNLOCK_VIDEO_MEMORY,
+
+ /* Event queue. */
+ gcvHAL_EVENT_COMMIT,
+
+ gcvHAL_USER_SIGNAL,
+ gcvHAL_SIGNAL,
+ gcvHAL_WRITE_DATA,
+
+ gcvHAL_COMMIT,
+ gcvHAL_STALL,
+
+ gcvHAL_READ_REGISTER,
+ gcvHAL_WRITE_REGISTER,
+
+ gcvHAL_GET_PROFILE_SETTING,
+ gcvHAL_SET_PROFILE_SETTING,
+
+ gcvHAL_READ_ALL_PROFILE_REGISTERS,
+ gcvHAL_PROFILE_REGISTERS_2D,
+
+ /* Power management. */
+ gcvHAL_SET_POWER_MANAGEMENT_STATE,
+ gcvHAL_QUERY_POWER_MANAGEMENT_STATE,
+
+ gcvHAL_GET_BASE_ADDRESS,
+
+ gcvHAL_SET_IDLE, /* reserved */
+
+ /* Queries. */
+ gcvHAL_QUERY_KERNEL_SETTINGS,
+
+ /* Reset. */
+ gcvHAL_RESET,
+
+ /* Map physical address into handle. */
+ gcvHAL_MAP_PHYSICAL,
+
+ /* Debugger stuff. */
+ gcvHAL_DEBUG,
+
+ /* Cache stuff. */
+ gcvHAL_CACHE,
+
+ /* TimeStamp */
+ gcvHAL_TIMESTAMP,
+
+ /* Database. */
+ gcvHAL_DATABASE,
+
+ /* Version. */
+ gcvHAL_VERSION,
+
+ /* Chip info */
+ gcvHAL_CHIP_INFO,
+
+ /* Process attaching/detaching. */
+ gcvHAL_ATTACH,
+ gcvHAL_DETACH,
+
+ /* Composition. */
+ gcvHAL_COMPOSE,
+
+ /* Set timeOut value */
+ gcvHAL_SET_TIMEOUT,
+
+ /* Frame database. */
+ gcvHAL_GET_FRAME_INFO,
+
+ /* Shared info for each process */
+ gcvHAL_GET_SHARED_INFO,
+ gcvHAL_SET_SHARED_INFO,
+ gcvHAL_QUERY_COMMAND_BUFFER,
+
+ gcvHAL_COMMIT_DONE,
+
+ /* GPU and event dump */
+ gcvHAL_DUMP_GPU_STATE,
+ gcvHAL_DUMP_EVENT
+}
+gceHAL_COMMAND_CODES;
+
+/******************************************************************************\
+****************************** Interface Structure *****************************
+\******************************************************************************/
+
+#define gcdMAX_PROFILE_FILE_NAME 128
+
+/* Kernel settings. */
+typedef struct _gcsKERNEL_SETTINGS
+{
+ /* Used RealTime signal between kernel and user. */
+ gctINT signal;
+}
+gcsKERNEL_SETTINGS;
+
+
+/* gcvHAL_QUERY_CHIP_IDENTITY */
+typedef struct _gcsHAL_QUERY_CHIP_IDENTITY * gcsHAL_QUERY_CHIP_IDENTITY_PTR;
+typedef struct _gcsHAL_QUERY_CHIP_IDENTITY
+{
+
+ /* Chip model. */
+ gceCHIPMODEL chipModel;
+
+ /* Revision value.*/
+ gctUINT32 chipRevision;
+
+ /* Supported feature fields. */
+ gctUINT32 chipFeatures;
+
+ /* Supported minor feature fields. */
+ gctUINT32 chipMinorFeatures;
+
+ /* Supported minor feature 1 fields. */
+ gctUINT32 chipMinorFeatures1;
+
+ /* Supported minor feature 2 fields. */
+ gctUINT32 chipMinorFeatures2;
+
+ /* Supported minor feature 3 fields. */
+ gctUINT32 chipMinorFeatures3;
+
+ /* Number of streams supported. */
+ gctUINT32 streamCount;
+
+ /* Total number of temporary registers per thread. */
+ gctUINT32 registerMax;
+
+ /* Maximum number of threads. */
+ gctUINT32 threadCount;
+
+ /* Number of shader cores. */
+ gctUINT32 shaderCoreCount;
+
+ /* Size of the vertex cache. */
+ gctUINT32 vertexCacheSize;
+
+ /* Number of entries in the vertex output buffer. */
+ gctUINT32 vertexOutputBufferSize;
+
+ /* Number of pixel pipes. */
+ gctUINT32 pixelPipes;
+
+ /* Number of instructions. */
+ gctUINT32 instructionCount;
+
+ /* Number of constants. */
+ gctUINT32 numConstants;
+
+ /* Buffer size */
+ gctUINT32 bufferSize;
+
+}
+gcsHAL_QUERY_CHIP_IDENTITY;
+
+/* gcvHAL_COMPOSE. */
+typedef struct _gcsHAL_COMPOSE * gcsHAL_COMPOSE_PTR;
+typedef struct _gcsHAL_COMPOSE
+{
+ /* Composition state buffer. */
+ gctPHYS_ADDR physical;
+ gctPOINTER logical;
+ gctSIZE_T offset;
+ gctSIZE_T size;
+
+ /* Composition end signal. */
+ gctHANDLE process;
+ gctSIGNAL signal;
+
+ /* User signals. */
+ gctHANDLE userProcess;
+ gctSIGNAL userSignal1;
+ gctSIGNAL userSignal2;
+
+#if defined(__QNXNTO__)
+ /* Client pulse side-channel connection ID. */
+ gctINT32 coid;
+
+ /* Set by server. */
+ gctINT32 rcvid;
+#endif
+}
+gcsHAL_COMPOSE;
+
+typedef struct _gcsHAL_INTERFACE
+{
+ /* Command code. */
+ gceHAL_COMMAND_CODES command;
+
+ /* Hardware type. */
+ gceHARDWARE_TYPE hardwareType;
+
+ /* Status value. */
+ gceSTATUS status;
+
+ /* Handle to this interface channel. */
+ gctHANDLE handle;
+
+ /* Pid of the client. */
+ gctUINT32 pid;
+
+ /* Union of command structures. */
+ union _u
+ {
+ /* gcvHAL_GET_BASE_ADDRESS */
+ struct _gcsHAL_GET_BASE_ADDRESS
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctUINT32 baseAddress;
+ }
+ GetBaseAddress;
+
+ /* gcvHAL_QUERY_VIDEO_MEMORY */
+ struct _gcsHAL_QUERY_VIDEO_MEMORY
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctPHYS_ADDR internalPhysical;
+
+ /* Size in bytes of internal memory.*/
+ OUT gctSIZE_T internalSize;
+
+ /* Physical memory address of external memory. */
+ OUT gctPHYS_ADDR externalPhysical;
+
+ /* Size in bytes of external memory.*/
+ OUT gctSIZE_T externalSize;
+
+ /* Physical memory address of contiguous memory. */
+ OUT gctPHYS_ADDR contiguousPhysical;
+
+ /* Size in bytes of contiguous memory.*/
+ OUT gctSIZE_T contiguousSize;
+ }
+ QueryVideoMemory;
+
+ /* gcvHAL_QUERY_CHIP_IDENTITY */
+ gcsHAL_QUERY_CHIP_IDENTITY QueryChipIdentity;
+
+ /* gcvHAL_MAP_MEMORY */
+ struct _gcsHAL_MAP_MEMORY
+ {
+ /* Physical memory address to map. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to map. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory. */
+ OUT gctPOINTER logical;
+ }
+ MapMemory;
+
+ /* gcvHAL_UNMAP_MEMORY */
+ struct _gcsHAL_UNMAP_MEMORY
+ {
+ /* Physical memory address to unmap. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to unmap. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory to unmap. */
+ IN gctPOINTER logical;
+ }
+ UnmapMemory;
+
+ /* gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_LINEAR_VIDEO_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctUINT bytes;
+
+ /* Buffer alignment. */
+ IN gctUINT alignment;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateLinearVideoMemory;
+
+ /* gcvHAL_ALLOCATE_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_VIDEO_MEMORY
+ {
+ /* Width of rectangle to allocate. */
+ IN OUT gctUINT width;
+
+ /* Height of rectangle to allocate. */
+ IN OUT gctUINT height;
+
+ /* Depth of rectangle to allocate. */
+ IN gctUINT depth;
+
+ /* Format rectangle to allocate in gceSURF_FORMAT. */
+ IN gceSURF_FORMAT format;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateVideoMemory;
+
+ /* gcvHAL_FREE_VIDEO_MEMORY */
+ struct _gcsHAL_FREE_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+#ifdef __QNXNTO__
+/* TODO: This is part of the unlock - why is it here? */
+ /* Mapped logical address to unmap in user space. */
+ OUT gctPOINTER memory;
+
+ /* Number of bytes to allocated. */
+ OUT gctSIZE_T bytes;
+#endif
+ }
+ FreeVideoMemory;
+
+ /* gcvHAL_LOCK_VIDEO_MEMORY */
+ struct _gcsHAL_LOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Cache configuration. */
+ /* Only gcvPOOL_CONTIGUOUS and gcvPOOL_VIRUTAL
+ ** can be configured */
+ IN gctBOOL cacheable;
+
+ /* Hardware specific address. */
+ OUT gctUINT32 address;
+
+ /* Mapped logical address. */
+ OUT gctPOINTER memory;
+ }
+ LockVideoMemory;
+
+ /* gcvHAL_UNLOCK_VIDEO_MEMORY */
+ struct _gcsHAL_UNLOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Type of surface. */
+ IN gceSURF_TYPE type;
+
+ /* Flag to unlock surface asynchroneously. */
+ IN OUT gctBOOL asynchroneous;
+ }
+ UnlockVideoMemory;
+
+ /* gcvHAL_ALLOCATE_NON_PAGED_MEMORY */
+ struct _gcsHAL_ALLOCATE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT gctPOINTER logical;
+ }
+ AllocateNonPagedMemory;
+
+ /* gcvHAL_FREE_NON_PAGED_MEMORY */
+ struct _gcsHAL_FREE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+ }
+ FreeNonPagedMemory;
+
+ /* gcvHAL_EVENT_COMMIT. */
+ struct _gcsHAL_EVENT_COMMIT
+ {
+ /* Event queue. */
+ IN gcsQUEUE_PTR queue;
+ }
+ Event;
+
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_COMMIT
+ {
+ /* Context buffer object. */
+ IN gckCONTEXT context;
+
+ /* Command buffer. */
+ IN gcoCMDBUF commandBuffer;
+
+ /* State delta buffer. */
+ gcsSTATE_DELTA_PTR delta;
+
+ /* Event queue. */
+ IN gcsQUEUE_PTR queue;
+ }
+ Commit;
+
+ /* gcvHAL_MAP_USER_MEMORY */
+ struct _gcsHAL_MAP_USER_MEMORY
+ {
+ /* Base address of user memory to map. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to map. */
+ IN gctSIZE_T size;
+
+ /* Info record required by gcvHAL_UNMAP_USER_MEMORY. */
+ OUT gctPOINTER info;
+
+ /* Physical address of mapped memory. */
+ OUT gctUINT32 address;
+ }
+ MapUserMemory;
+
+ /* gcvHAL_UNMAP_USER_MEMORY */
+ struct _gcsHAL_UNMAP_USER_MEMORY
+ {
+ /* Base address of user memory to unmap. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to unmap. */
+ IN gctSIZE_T size;
+
+ /* Info record returned by gcvHAL_MAP_USER_MEMORY. */
+ IN gctPOINTER info;
+
+ /* Physical address of mapped memory as returned by
+ gcvHAL_MAP_USER_MEMORY. */
+ IN gctUINT32 address;
+ }
+ UnmapUserMemory;
+#if !USE_NEW_LINUX_SIGNAL
+ /* gcsHAL_USER_SIGNAL */
+ struct _gcsHAL_USER_SIGNAL
+ {
+ /* Command. */
+ gceUSER_SIGNAL_COMMAND_CODES command;
+
+ /* Signal ID. */
+ IN OUT gctINT id;
+
+ /* Reset mode. */
+ IN gctBOOL manualReset;
+
+ /* Wait timedout. */
+ IN gctUINT32 wait;
+
+ /* State. */
+ IN gctBOOL state;
+ }
+ UserSignal;
+#endif
+
+ /* gcvHAL_SIGNAL. */
+ struct _gcsHAL_SIGNAL
+ {
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+
+ /* Reserved. */
+ IN gctSIGNAL auxSignal;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+#if defined(__QNXNTO__)
+ /* Client pulse side-channel connection ID. Set by client in gcoOS_CreateSignal. */
+ IN gctINT32 coid;
+
+ /* Set by server. */
+ IN gctINT32 rcvid;
+#endif
+ /* Event generated from where of pipeline */
+ IN gceKERNEL_WHERE fromWhere;
+ }
+ Signal;
+
+ /* gcvHAL_WRITE_DATA. */
+ struct _gcsHAL_WRITE_DATA
+ {
+ /* Address to write data to. */
+ IN gctUINT32 address;
+
+ /* Data to write. */
+ IN gctUINT32 data;
+ }
+ WriteData;
+
+ /* gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_ALLOCATE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctSIZE_T bytes;
+
+ /* Hardware address of allocation. */
+ OUT gctUINT32 address;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT gctPOINTER logical;
+ }
+ AllocateContiguousMemory;
+
+ /* gcvHAL_FREE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_FREE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+ }
+ FreeContiguousMemory;
+
+ /* gcvHAL_READ_REGISTER */
+ struct _gcsHAL_READ_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ OUT gctUINT32 data;
+ }
+ ReadRegisterData;
+
+ /* gcvHAL_WRITE_REGISTER */
+ struct _gcsHAL_WRITE_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ IN gctUINT32 data;
+ }
+ WriteRegisterData;
+
+#if VIVANTE_PROFILER
+ /* gcvHAL_GET_PROFILE_SETTING */
+ struct _gcsHAL_GET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ OUT gctBOOL enable;
+
+ /* The profile file name */
+ OUT gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ GetProfileSetting;
+
+ /* gcvHAL_SET_PROFILE_SETTING */
+ struct _gcsHAL_SET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ IN gctBOOL enable;
+
+ /* The profile file name */
+ IN gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ SetProfileSetting;
+
+ /* gcvHAL_READ_ALL_PROFILE_REGISTERS */
+ struct _gcsHAL_READ_ALL_PROFILE_REGISTERS
+ {
+ /* Data read. */
+ OUT gcsPROFILER_COUNTERS counters;
+ }
+ RegisterProfileData;
+
+ /* gcvHAL_PROFILE_REGISTERS_2D */
+ struct _gcsHAL_PROFILE_REGISTERS_2D
+ {
+ /* Data read. */
+ OUT gcs2D_PROFILE_PTR hwProfile2D;
+ }
+ RegisterProfileData2D;
+#endif
+ /* Power management. */
+ /* gcvHAL_SET_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_SET_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ IN gceCHIPPOWERSTATE state;
+ }
+ SetPowerManagement;
+
+ /* gcvHAL_QUERY_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_QUERY_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ OUT gceCHIPPOWERSTATE state;
+
+ /* Idle query. */
+ OUT gctBOOL isIdle;
+ }
+ QueryPowerManagement;
+
+ /* gcvHAL_QUERY_KERNEL_SETTINGS */
+ struct _gcsHAL_QUERY_KERNEL_SETTINGS
+ {
+ /* Settings.*/
+ OUT gcsKERNEL_SETTINGS settings;
+ }
+ QueryKernelSettings;
+
+ /* gcvHAL_MAP_PHYSICAL */
+ struct _gcsHAL_MAP_PHYSICAL
+ {
+ /* gcvTRUE to map, gcvFALSE to unmap. */
+ IN gctBOOL map;
+
+ /* Physical address. */
+ IN OUT gctPHYS_ADDR physical;
+ }
+ MapPhysical;
+
+ /* gcvHAL_DEBUG */
+ struct _gcsHAL_DEBUG
+ {
+ /* If gcvTRUE, set the debug information. */
+ IN gctBOOL set;
+ IN gctUINT32 level;
+ IN gctUINT32 zones;
+ IN gctBOOL enable;
+
+ IN gceDEBUG_MESSAGE_TYPE type;
+ IN gctUINT32 messageSize;
+
+ /* Message to print if not empty. */
+ IN gctCHAR message[80];
+ }
+ Debug;
+
+ /* gcvHAL_CACHE */
+ struct _gcsHAL_CACHE
+ {
+ IN gctBOOL invalidate;
+ IN gceCACHEOPERATION operation;
+ IN gctHANDLE process;
+/*####modified for marvell-bg2*/
+ IN gctPOINTER physical;
+/*####end for marvell-bg2*/
+ IN gctPOINTER logical;
+ IN gctSIZE_T bytes;
+ IN gcuVIDMEM_NODE_PTR node;
+ }
+ Cache;
+
+ /* gcvHAL_TIMESTAMP */
+ struct _gcsHAL_TIMESTAMP
+ {
+ /* Timer select. */
+ IN gctUINT32 timer;
+
+ /* Timer request type (0-stop, 1-start, 2-send delta). */
+ IN gctUINT32 request;
+
+ /* Result of delta time in microseconds. */
+ OUT gctINT32 timeDelta;
+ }
+ TimeStamp;
+
+ /* gcvHAL_DATABASE */
+ struct _gcsHAL_DATABASE
+ {
+ /* Set to gcvTRUE if you want to query a particular process ID.
+ ** Set to gcvFALSE to query the last detached process. */
+ IN gctBOOL validProcessID;
+
+ /* Process ID to query. */
+ IN gctUINT32 processID;
+
+ /* Information. */
+ OUT gcuDATABASE_INFO vidMem;
+ OUT gcuDATABASE_INFO nonPaged;
+ OUT gcuDATABASE_INFO contiguous;
+ OUT gcuDATABASE_INFO gpuIdle;
+ }
+ Database;
+
+ /* gcvHAL_VERSION */
+ struct _gcsHAL_VERSION
+ {
+ /* Major version: N.n.n. */
+ OUT gctINT32 major;
+
+ /* Minor version: n.N.n. */
+ OUT gctINT32 minor;
+
+ /* Patch version: n.n.N. */
+ OUT gctINT32 patch;
+
+ /* Build version. */
+ OUT gctUINT32 build;
+ }
+ Version;
+
+ /* gcvHAL_CHIP_INFO */
+ struct _gcsHAL_CHIP_INFO
+ {
+ /* Chip count. */
+ OUT gctINT32 count;
+
+ /* Chip types. */
+ OUT gceHARDWARE_TYPE types[gcdCHIP_COUNT];
+ }
+ ChipInfo;
+
+ /* gcvHAL_ATTACH */
+ struct _gcsHAL_ATTACH
+ {
+ /* Context buffer object. */
+ OUT gckCONTEXT context;
+
+ /* Number of states in the buffer. */
+ OUT gctSIZE_T stateCount;
+ }
+ Attach;
+
+ /* gcvHAL_DETACH */
+ struct _gcsHAL_DETACH
+ {
+ /* Context buffer object. */
+ IN gckCONTEXT context;
+ }
+ Detach;
+
+ /* gcvHAL_COMPOSE. */
+ gcsHAL_COMPOSE Compose;
+
+ /* gcvHAL_GET_FRAME_INFO. */
+ struct _gcsHAL_GET_FRAME_INFO
+ {
+ OUT gcsHAL_FRAME_INFO * frameInfo;
+ }
+ GetFrameInfo;
+
+ /* gcvHAL_SET_TIME_OUT. */
+ struct _gcsHAL_SET_TIMEOUT
+ {
+ gctUINT32 timeOut;
+ }
+ SetTimeOut;
+
+#if gcdENABLE_VG
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_VGCOMMIT
+ {
+ /* Context buffer. */
+ IN gcsVGCONTEXT_PTR context;
+
+ /* Command queue. */
+ IN gcsVGCMDQUEUE_PTR queue;
+
+ /* Number of entries in the queue. */
+ IN gctUINT entryCount;
+
+ /* Task table. */
+ IN gcsTASK_MASTER_TABLE_PTR taskTable;
+ }
+ VGCommit;
+
+ /* gcvHAL_QUERY_COMMAND_BUFFER */
+ struct _gcsHAL_QUERY_COMMAND_BUFFER
+ {
+ /* Command buffer attributes. */
+ OUT gcsCOMMAND_BUFFER_INFO information;
+ }
+ QueryCommandBuffer;
+
+#endif
+
+ struct _gcsHAL_GET_SHARED_INFO
+ {
+ IN gctUINT32 pid;
+ IN gctUINT32 dataId;
+ IN gcuVIDMEM_NODE_PTR node;
+ OUT gctUINT8_PTR data;
+ /* fix size */
+ OUT gctUINT8_PTR nodeData;
+ gctSIZE_T size;
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE infoType;
+ }
+ GetSharedInfo;
+
+ struct _gcsHAL_SET_SHARED_INFO
+ {
+ IN gctUINT32 dataId;
+ IN gcuVIDMEM_NODE_PTR node;
+ IN gctUINT8_PTR data;
+ IN gctUINT8_PTR nodeData;
+ IN gctSIZE_T size;
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE infoType;
+ }
+ SetSharedInfo;
+ }
+ u;
+}
+gcsHAL_INTERFACE;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_driver_h_ */
diff --git a/src/include_eureka/gc_hal_driver_vg.h b/src/include_eureka/gc_hal_driver_vg.h
new file mode 100644
index 0000000..35e359a
--- /dev/null
+++ b/src/include_eureka/gc_hal_driver_vg.h
@@ -0,0 +1,293 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+
+
+#ifndef __gc_hal_driver_vg_h_
+#define __gc_hal_driver_vg_h_
+
+
+
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* I/O Control Codes ******************************
+\******************************************************************************/
+#ifndef gcvHAL_CLASS
+#define gcvHAL_CLASS "gal3d"
+#endif
+#define IOCTL_GCHAL_INTERFACE 30000
+
+/******************************************************************************\
+********************************* Command Codes ********************************
+\******************************************************************************/
+
+/******************************************************************************\
+********************* Command buffer information structure. ********************
+\******************************************************************************/
+
+typedef struct _gcsCOMMAND_BUFFER_INFO * gcsCOMMAND_BUFFER_INFO_PTR;
+typedef struct _gcsCOMMAND_BUFFER_INFO
+{
+ /* FE command buffer interrupt ID. */
+ gctINT32 feBufferInt;
+
+ /* TS overflow interrupt ID. */
+ gctINT32 tsOverflowInt;
+
+ /* Alignment and mask for the buffer address. */
+ gctUINT addressMask;
+ gctSIZE_T addressAlignment;
+
+ /* Alignment for each command. */
+ gctSIZE_T commandAlignment;
+
+ /* Number of bytes required by the STATE command. */
+ gctSIZE_T stateCommandSize;
+
+ /* Number of bytes required by the RESTART command. */
+ gctSIZE_T restartCommandSize;
+
+ /* Number of bytes required by the FETCH command. */
+ gctSIZE_T fetchCommandSize;
+
+ /* Number of bytes required by the CALL command. */
+ gctSIZE_T callCommandSize;
+
+ /* Number of bytes required by the RETURN command. */
+ gctSIZE_T returnCommandSize;
+
+ /* Number of bytes required by the EVENT command. */
+ gctSIZE_T eventCommandSize;
+
+ /* Number of bytes required by the END command. */
+ gctSIZE_T endCommandSize;
+
+ /* Number of bytes reserved at the tail of a static command buffer. */
+ gctSIZE_T staticTailSize;
+
+ /* Number of bytes reserved at the tail of a dynamic command buffer. */
+ gctSIZE_T dynamicTailSize;
+}
+gcsCOMMAND_BUFFER_INFO;
+
+/******************************************************************************\
+******************************** Task Structures *******************************
+\******************************************************************************/
+
+typedef enum _gceTASK
+{
+ gcvTASK_LINK,
+ gcvTASK_CLUSTER,
+ gcvTASK_INCREMENT,
+ gcvTASK_DECREMENT,
+ gcvTASK_SIGNAL,
+ gcvTASK_LOCKDOWN,
+ gcvTASK_UNLOCK_VIDEO_MEMORY,
+ gcvTASK_FREE_VIDEO_MEMORY,
+ gcvTASK_FREE_CONTIGUOUS_MEMORY,
+ gcvTASK_UNMAP_USER_MEMORY,
+ gcvTASK_UNMAP_MEMORY
+}
+gceTASK;
+
+typedef struct _gcsTASK_HEADER * gcsTASK_HEADER_PTR;
+typedef struct _gcsTASK_HEADER
+{
+ /* Task ID. */
+ IN gceTASK id;
+}
+gcsTASK_HEADER;
+
+typedef struct _gcsTASK_LINK * gcsTASK_LINK_PTR;
+typedef struct _gcsTASK_LINK
+{
+ /* Task ID (gcvTASK_LINK). */
+ IN gceTASK id;
+
+ /* Pointer to the next task container. */
+ IN gctPOINTER cotainer;
+
+ /* Pointer to the next task from the next task container. */
+ IN gcsTASK_HEADER_PTR task;
+}
+gcsTASK_LINK;
+
+typedef struct _gcsTASK_CLUSTER * gcsTASK_CLUSTER_PTR;
+typedef struct _gcsTASK_CLUSTER
+{
+ /* Task ID (gcvTASK_CLUSTER). */
+ IN gceTASK id;
+
+ /* Number of tasks in the cluster. */
+ IN gctUINT taskCount;
+}
+gcsTASK_CLUSTER;
+
+typedef struct _gcsTASK_INCREMENT * gcsTASK_INCREMENT_PTR;
+typedef struct _gcsTASK_INCREMENT
+{
+ /* Task ID (gcvTASK_INCREMENT). */
+ IN gceTASK id;
+
+ /* Address of the variable to increment. */
+ IN gctUINT32 address;
+}
+gcsTASK_INCREMENT;
+
+typedef struct _gcsTASK_DECREMENT * gcsTASK_DECREMENT_PTR;
+typedef struct _gcsTASK_DECREMENT
+{
+ /* Task ID (gcvTASK_DECREMENT). */
+ IN gceTASK id;
+
+ /* Address of the variable to decrement. */
+ IN gctUINT32 address;
+}
+gcsTASK_DECREMENT;
+
+typedef struct _gcsTASK_SIGNAL * gcsTASK_SIGNAL_PTR;
+typedef struct _gcsTASK_SIGNAL
+{
+ /* Task ID (gcvTASK_SIGNAL). */
+ IN gceTASK id;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+
+#if defined(__QNXNTO__)
+ IN gctINT32 coid;
+ IN gctINT32 rcvid;
+#endif
+}
+gcsTASK_SIGNAL;
+
+typedef struct _gcsTASK_LOCKDOWN * gcsTASK_LOCKDOWN_PTR;
+typedef struct _gcsTASK_LOCKDOWN
+{
+ /* Task ID (gcvTASK_LOCKDOWN). */
+ IN gceTASK id;
+
+ /* Address of the user space counter. */
+ IN gctUINT32 userCounter;
+
+ /* Address of the kernel space counter. */
+ IN gctUINT32 kernelCounter;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+}
+gcsTASK_LOCKDOWN;
+
+typedef struct _gcsTASK_UNLOCK_VIDEO_MEMORY * gcsTASK_UNLOCK_VIDEO_MEMORY_PTR;
+typedef struct _gcsTASK_UNLOCK_VIDEO_MEMORY
+{
+ /* Task ID (gcvTASK_UNLOCK_VIDEO_MEMORY). */
+ IN gceTASK id;
+
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+}
+gcsTASK_UNLOCK_VIDEO_MEMORY;
+
+typedef struct _gcsTASK_FREE_VIDEO_MEMORY * gcsTASK_FREE_VIDEO_MEMORY_PTR;
+typedef struct _gcsTASK_FREE_VIDEO_MEMORY
+{
+ /* Task ID (gcvTASK_FREE_VIDEO_MEMORY). */
+ IN gceTASK id;
+
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+}
+gcsTASK_FREE_VIDEO_MEMORY;
+
+typedef struct _gcsTASK_FREE_CONTIGUOUS_MEMORY * gcsTASK_FREE_CONTIGUOUS_MEMORY_PTR;
+typedef struct _gcsTASK_FREE_CONTIGUOUS_MEMORY
+{
+ /* Task ID (gcvTASK_FREE_CONTIGUOUS_MEMORY). */
+ IN gceTASK id;
+
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+}
+gcsTASK_FREE_CONTIGUOUS_MEMORY;
+
+typedef struct _gcsTASK_UNMAP_USER_MEMORY * gcsTASK_UNMAP_USER_MEMORY_PTR;
+typedef struct _gcsTASK_UNMAP_USER_MEMORY
+{
+ /* Task ID (gcvTASK_UNMAP_USER_MEMORY). */
+ IN gceTASK id;
+
+ /* Base address of user memory to unmap. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to unmap. */
+ IN gctSIZE_T size;
+
+ /* Info record returned by gcvHAL_MAP_USER_MEMORY. */
+ IN gctPOINTER info;
+
+ /* Physical address of mapped memory as returned by
+ gcvHAL_MAP_USER_MEMORY. */
+ IN gctUINT32 address;
+}
+gcsTASK_UNMAP_USER_MEMORY;
+
+typedef struct _gcsTASK_UNMAP_MEMORY * gcsTASK_UNMAP_MEMORY_PTR;
+typedef struct _gcsTASK_UNMAP_MEMORY
+{
+ /* Task ID (gcvTASK_UNMAP_MEMORY). */
+ IN gceTASK id;
+
+ /* Physical memory address to unmap. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to unmap. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory to unmap. */
+ IN gctPOINTER logical;
+}
+gcsTASK_UNMAP_MEMORY;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_driver_h_ */
diff --git a/src/include_eureka/gc_hal_dump.h b/src/include_eureka/gc_hal_dump.h
new file mode 100644
index 0000000..9b2db22
--- /dev/null
+++ b/src/include_eureka/gc_hal_dump.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+#ifndef __gc_hal_dump_h_
+#define __gc_hal_dump_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** FILE LAYOUT:
+**
+** gcsDUMP_FILE structure
+**
+** gcsDUMP_DATA frame
+** gcsDUMP_DATA or gcDUMP_DATA_SIZE records rendingring the frame
+** gctUINT8 data[length]
+*/
+
+#define gcvDUMP_FILE_SIGNATURE gcmCC('g','c','D','B')
+
+typedef struct _gcsDUMP_FILE
+{
+ gctUINT32 signature; /* File signature */
+ gctSIZE_T length; /* Length of file */
+ gctUINT32 frames; /* Number of frames in file */
+}
+gcsDUMP_FILE;
+
+typedef enum _gceDUMP_TAG
+{
+ gcvTAG_SURFACE = gcmCC('s','u','r','f'),
+ gcvTAG_FRAME = gcmCC('f','r','m',' '),
+ gcvTAG_COMMAND = gcmCC('c','m','d',' '),
+ gcvTAG_INDEX = gcmCC('i','n','d','x'),
+ gcvTAG_STREAM = gcmCC('s','t','r','m'),
+ gcvTAG_TEXTURE = gcmCC('t','e','x','t'),
+ gcvTAG_RENDER_TARGET = gcmCC('r','n','d','r'),
+ gcvTAG_DEPTH = gcmCC('z','b','u','f'),
+ gcvTAG_RESOLVE = gcmCC('r','s','l','v'),
+ gcvTAG_DELETE = gcmCC('d','e','l',' '),
+}
+gceDUMP_TAG;
+
+typedef struct _gcsDUMP_SURFACE
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctUINT32 address; /* Address of the surface. */
+ gctINT16 width; /* Width of surface. */
+ gctINT16 height; /* Height of surface. */
+ gceSURF_FORMAT format; /* Surface pixel format. */
+ gctSIZE_T length; /* Number of bytes inside the surface. */
+}
+gcsDUMP_SURFACE;
+
+typedef struct _gcsDUMP_DATA
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctSIZE_T length; /* Number of bytes of data. */
+ gctUINT32 address; /* Address for the data. */
+}
+gcsDUMP_DATA;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_dump_h_ */
+
diff --git a/src/include_eureka/gc_hal_eglplatform.h b/src/include_eureka/gc_hal_eglplatform.h
new file mode 100644
index 0000000..e0efba4
--- /dev/null
+++ b/src/include_eureka/gc_hal_eglplatform.h
@@ -0,0 +1,621 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_eglplatform_h_
+#define __gc_hal_eglplatform_h_
+
+/* Include VDK types. */
+#include "gc_hal_types.h"
+#include "gc_hal_base.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*******************************************************************************
+** Events. *********************************************************************
+*/
+
+typedef enum _halEventType
+{
+ /* Keyboard event. */
+ HAL_KEYBOARD,
+
+ /* Mouse move event. */
+ HAL_POINTER,
+
+ /* Mouse button event. */
+ HAL_BUTTON,
+
+ /* Application close event. */
+ HAL_CLOSE,
+
+ /* Application window has been updated. */
+ HAL_WINDOW_UPDATE
+}
+halEventType;
+
+/* Scancodes for keyboard. */
+typedef enum _halKeys
+{
+ HAL_UNKNOWN = -1,
+
+ HAL_BACKSPACE = 0x08,
+ HAL_TAB,
+ HAL_ENTER = 0x0D,
+ HAL_ESCAPE = 0x1B,
+
+ HAL_SPACE = 0x20,
+ HAL_SINGLEQUOTE = 0x27,
+ HAL_PAD_ASTERISK = 0x2A,
+ HAL_COMMA = 0x2C,
+ HAL_HYPHEN,
+ HAL_PERIOD,
+ HAL_SLASH,
+ HAL_0,
+ HAL_1,
+ HAL_2,
+ HAL_3,
+ HAL_4,
+ HAL_5,
+ HAL_6,
+ HAL_7,
+ HAL_8,
+ HAL_9,
+ HAL_SEMICOLON = 0x3B,
+ HAL_EQUAL = 0x3D,
+ HAL_A = 0x41,
+ HAL_B,
+ HAL_C,
+ HAL_D,
+ HAL_E,
+ HAL_F,
+ HAL_G,
+ HAL_H,
+ HAL_I,
+ HAL_J,
+ HAL_K,
+ HAL_L,
+ HAL_M,
+ HAL_N,
+ HAL_O,
+ HAL_P,
+ HAL_Q,
+ HAL_R,
+ HAL_S,
+ HAL_T,
+ HAL_U,
+ HAL_V,
+ HAL_W,
+ HAL_X,
+ HAL_Y,
+ HAL_Z,
+ HAL_LBRACKET,
+ HAL_BACKSLASH,
+ HAL_RBRACKET,
+ HAL_BACKQUOTE = 0x60,
+
+ HAL_F1 = 0x80,
+ HAL_F2,
+ HAL_F3,
+ HAL_F4,
+ HAL_F5,
+ HAL_F6,
+ HAL_F7,
+ HAL_F8,
+ HAL_F9,
+ HAL_F10,
+ HAL_F11,
+ HAL_F12,
+
+ HAL_LCTRL,
+ HAL_RCTRL,
+ HAL_LSHIFT,
+ HAL_RSHIFT,
+ HAL_LALT,
+ HAL_RALT,
+ HAL_CAPSLOCK,
+ HAL_NUMLOCK,
+ HAL_SCROLLLOCK,
+ HAL_PAD_0,
+ HAL_PAD_1,
+ HAL_PAD_2,
+ HAL_PAD_3,
+ HAL_PAD_4,
+ HAL_PAD_5,
+ HAL_PAD_6,
+ HAL_PAD_7,
+ HAL_PAD_8,
+ HAL_PAD_9,
+ HAL_PAD_HYPHEN,
+ HAL_PAD_PLUS,
+ HAL_PAD_SLASH,
+ HAL_PAD_PERIOD,
+ HAL_PAD_ENTER,
+ HAL_SYSRQ,
+ HAL_PRNTSCRN,
+ HAL_BREAK,
+ HAL_UP,
+ HAL_LEFT,
+ HAL_RIGHT,
+ HAL_DOWN,
+ HAL_HOME,
+ HAL_END,
+ HAL_PGUP,
+ HAL_PGDN,
+ HAL_INSERT,
+ HAL_DELETE,
+ HAL_LWINDOW,
+ HAL_RWINDOW,
+ HAL_MENU,
+ HAL_POWER,
+ HAL_SLEEP,
+ HAL_WAKE
+}
+halKeys;
+
+/* Structure that defined keyboard mapping. */
+typedef struct _halKeyMap
+{
+ /* Normal key. */
+ halKeys normal;
+
+ /* Extended key. */
+ halKeys extended;
+}
+halKeyMap;
+
+/* Event structure. */
+typedef struct _halEvent
+{
+ /* Event type. */
+ halEventType type;
+
+ /* Event data union. */
+ union _halEventData
+ {
+ /* Event data for keyboard. */
+ struct _halKeyboard
+ {
+ /* Scancode. */
+ halKeys scancode;
+
+ /* ASCII characte of the key pressed. */
+ gctCHAR key;
+
+ /* Flag whether the key was pressed (1) or released (0). */
+ gctCHAR pressed;
+ }
+ keyboard;
+
+ /* Event data for pointer. */
+ struct _halPointer
+ {
+ /* Current pointer coordinate. */
+ gctINT x;
+ gctINT y;
+ }
+ pointer;
+
+ /* Event data for mouse buttons. */
+ struct _halButton
+ {
+ /* Left button state. */
+ gctINT left;
+
+ /* Middle button state. */
+ gctINT middle;
+
+ /* Right button state. */
+ gctINT right;
+
+ /* Current pointer coordinate. */
+ gctINT x;
+ gctINT y;
+ }
+ button;
+ }
+ data;
+}
+halEvent;
+
+#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+/* Win32 and Windows CE platforms. */
+#include <windows.h>
+typedef HDC HALNativeDisplayType;
+typedef HWND HALNativeWindowType;
+typedef HBITMAP HALNativePixmapType;
+
+#elif defined(LINUX) && defined(EGL_API_FB) && !defined(__APPLE__)
+/* Linux platform for FBDEV. */
+typedef struct _FBDisplay * HALNativeDisplayType;
+typedef struct _FBWindow * HALNativeWindowType;
+typedef struct _FBPixmap * HALNativePixmapType;
+
+#elif defined(__ANDROID__) || defined(ANDROID)
+
+struct egl_native_pixmap_t;
+
+#if ANDROID_SDK_VERSION >= 9
+ #include <android/native_window.h>
+
+ typedef struct ANativeWindow* HALNativeWindowType;
+ typedef struct egl_native_pixmap_t* HALNativePixmapType;
+ typedef void* HALNativeDisplayType;
+#else
+ struct android_native_window_t;
+ typedef struct android_native_window_t* HALNativeWindowType;
+ typedef struct egl_native_pixmap_t * HALNativePixmapType;
+ typedef void* HALNativeDisplayType;
+#endif
+
+#elif defined(LINUX) || defined(__APPLE__)
+/* X11 platform. */
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+typedef Display * HALNativeDisplayType;
+typedef Window HALNativeWindowType;
+
+#ifdef CUSTOM_PIXMAP
+typedef void * HALNativePixmapType;
+#else
+typedef Pixmap HALNativePixmapType;
+#endif /* CUSTOM_PIXMAP */
+
+/* Rename some badly named X defines. */
+#ifdef Status
+# define XStatus int
+# undef Status
+#endif
+#ifdef Always
+# define XAlways 2
+# undef Always
+#endif
+#ifdef CurrentTime
+# undef CurrentTime
+# define XCurrentTime 0
+#endif
+
+#elif defined(__QNXNTO__)
+
+/* VOID */
+typedef void * HALNativeDisplayType;
+typedef void * HALNativeWindowType;
+typedef void * HALNativePixmapType;
+
+#else
+
+#error "Platform not recognized"
+
+/* VOID */
+typedef void * HALNativeDisplayType;
+typedef void * HALNativeWindowType;
+typedef void * HALNativePixmapType;
+
+#endif
+
+
+
+/*******************************************************************************
+** Display. ********************************************************************
+*/
+
+gceSTATUS
+gcoOS_GetDisplay(
+ OUT HALNativeDisplayType * Display
+ );
+
+gceSTATUS
+gcoOS_GetDisplayByIndex(
+ IN gctINT DisplayIndex,
+ OUT HALNativeDisplayType * Display
+ );
+
+gceSTATUS
+gcoOS_GetDisplayInfo(
+ IN HALNativeDisplayType Display,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctSIZE_T * Physical,
+ OUT gctINT * Stride,
+ OUT gctINT * BitsPerPixel
+ );
+
+/* VFK_DISPLAY_INFO structure defining information returned by
+ vdkGetDisplayInfoEx. */
+typedef struct _halDISPLAY_INFO
+{
+ /* The size of the display in pixels. */
+ gctINT width;
+ gctINT height;
+
+ /* The stride of the dispay. -1 is returned if the stride is not known
+ ** for the specified display.*/
+ gctINT stride;
+
+ /* The color depth of the display in bits per pixel. */
+ gctINT bitsPerPixel;
+
+ /* The logical pointer to the display memory buffer. NULL is returned
+ ** if the pointer is not known for the specified display. */
+ gctPOINTER logical;
+
+ /* The physical address of the display memory buffer. ~0 is returned
+ ** if the address is not known for the specified display. */
+ gctSIZE_T physical;
+
+#ifndef __QNXNTO__
+ /* 355_FB_MULTI_BUFFER */
+ gctINT multiBuffer;
+ gctINT backBufferY;
+#endif
+
+ /* The color info of the display. */
+ gctUINT alphaLength;
+ gctUINT alphaOffset;
+ gctUINT redLength;
+ gctUINT redOffset;
+ gctUINT greenLength;
+ gctUINT greenOffset;
+ gctUINT blueLength;
+ gctUINT blueOffset;
+
+ /* Display flip support. */
+ gctINT flip;
+}
+halDISPLAY_INFO;
+
+gceSTATUS
+gcoOS_GetDisplayInfoEx(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctUINT DisplayInfoSize,
+ OUT halDISPLAY_INFO * DisplayInfo
+ );
+
+gceSTATUS
+gcoOS_GetNextDisplayInfoEx(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctUINT DisplayInfoSize,
+ OUT halDISPLAY_INFO * DisplayInfo
+ );
+
+gceSTATUS
+gcoOS_GetDisplayVirtual(
+ IN HALNativeDisplayType Display,
+ OUT gctINT * Width,
+ OUT gctINT * Height
+ );
+
+gceSTATUS
+gcoOS_GetDisplayBackbuffer(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctPOINTER context,
+ IN gcoSURF surface,
+ OUT gctUINT * Offset,
+ OUT gctINT * X,
+ OUT gctINT * Y
+ );
+
+gceSTATUS
+gcoOS_SetDisplayVirtual(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctUINT Offset,
+ IN gctINT X,
+ IN gctINT Y
+ );
+
+gceSTATUS
+gcoOS_DisplayBufferRegions(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctINT NumRects,
+ IN gctINT_PTR Rects
+ );
+
+gceSTATUS
+gcoOS_DestroyDisplay(
+ IN HALNativeDisplayType Display
+ );
+
+/*******************************************************************************
+** Windows. ********************************************************************
+*/
+
+gceSTATUS
+gcoOS_CreateWindow(
+ IN HALNativeDisplayType Display,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gctINT Width,
+ IN gctINT Height,
+ OUT HALNativeWindowType * Window
+ );
+
+gceSTATUS
+gcoOS_GetWindowInfo(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ OUT gctINT * X,
+ OUT gctINT * Y,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctINT * BitsPerPixel,
+#ifdef __QNXNTO__
+ OUT gctINT * Format,
+#endif
+ OUT gctUINT * Offset
+ );
+
+gceSTATUS
+gcoOS_DestroyWindow(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_DrawImage(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT BitsPerPixel,
+ IN gctPOINTER Bits
+ );
+
+gceSTATUS
+gcoOS_GetImage(
+ IN HALNativeWindowType Window,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ OUT gctINT * BitsPerPixel,
+ OUT gctPOINTER * Bits
+ );
+
+/*******************************************************************************
+** Pixmaps. ********************************************************************
+*/
+
+gceSTATUS
+gcoOS_CreatePixmap(
+ IN HALNativeDisplayType Display,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT BitsPerPixel,
+ OUT HALNativePixmapType * Pixmap
+ );
+
+gceSTATUS
+gcoOS_GetPixmapInfo(
+ IN HALNativeDisplayType Display,
+ IN HALNativePixmapType Pixmap,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctINT * BitsPerPixel,
+ OUT gctINT * Stride,
+ OUT gctPOINTER * Bits
+ );
+
+gceSTATUS
+gcoOS_DrawPixmap(
+ IN HALNativeDisplayType Display,
+ IN HALNativePixmapType Pixmap,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT BitsPerPixel,
+ IN gctPOINTER Bits
+ );
+
+gceSTATUS
+gcoOS_DestroyPixmap(
+ IN HALNativeDisplayType Display,
+ IN HALNativePixmapType Pixmap
+ );
+
+/*******************************************************************************
+** OS relative. ****************************************************************
+*/
+gceSTATUS
+gcoOS_LoadEGLLibrary(
+ OUT gctHANDLE * Handle
+ );
+
+gceSTATUS
+gcoOS_FreeEGLLibrary(
+ IN gctHANDLE Handle
+ );
+
+gceSTATUS
+gcoOS_ShowWindow(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_HideWindow(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_SetWindowTitle(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctCONST_STRING Title
+ );
+
+gceSTATUS
+gcoOS_CapturePointer(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_GetEvent(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ OUT halEvent * Event
+ );
+
+gceSTATUS
+gcoOS_CreateClientBuffer(
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT Format,
+ IN gctINT Type,
+ OUT gctPOINTER * ClientBuffer
+ );
+
+gceSTATUS
+gcoOS_GetClientBufferInfo(
+ IN gctPOINTER ClientBuffer,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctINT * Stride,
+ OUT gctPOINTER * Bits
+ );
+
+gceSTATUS
+gcoOS_DestroyClientBuffer(
+ IN gctPOINTER ClientBuffer
+ );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_eglplatform_h_ */
diff --git a/src/include_eureka/gc_hal_engine.h b/src/include_eureka/gc_hal_engine.h
new file mode 100644
index 0000000..22cdc2f
--- /dev/null
+++ b/src/include_eureka/gc_hal_engine.h
@@ -0,0 +1,1847 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_engine_h_
+#define __gc_hal_engine_h_
+
+#ifndef VIVANTE_NO_3D
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+
+#if gcdENABLE_VG
+#include "gc_hal_engine_vg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoSTREAM * gcoSTREAM;
+typedef struct _gcoVERTEX * gcoVERTEX;
+typedef struct _gcoTEXTURE * gcoTEXTURE;
+typedef struct _gcoINDEX * gcoINDEX;
+typedef struct _gcsVERTEX_ATTRIBUTES * gcsVERTEX_ATTRIBUTES_PTR;
+typedef struct _gcoVERTEXARRAY * gcoVERTEXARRAY;
+
+#define gcdATTRIBUTE_COUNT 16
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+/* Shading format. */
+typedef enum _gceSHADING
+{
+ gcvSHADING_SMOOTH,
+ gcvSHADING_FLAT_D3D,
+ gcvSHADING_FLAT_OPENGL,
+}
+gceSHADING;
+
+/* Culling modes. */
+typedef enum _gceCULL
+{
+ gcvCULL_NONE,
+ gcvCULL_CCW,
+ gcvCULL_CW,
+}
+gceCULL;
+
+/* Fill modes. */
+typedef enum _gceFILL
+{
+ gcvFILL_POINT,
+ gcvFILL_WIRE_FRAME,
+ gcvFILL_SOLID,
+}
+gceFILL;
+
+/* Compare modes. */
+typedef enum _gceCOMPARE
+{
+ gcvCOMPARE_NEVER,
+ gcvCOMPARE_NOT_EQUAL,
+ gcvCOMPARE_LESS,
+ gcvCOMPARE_LESS_OR_EQUAL,
+ gcvCOMPARE_EQUAL,
+ gcvCOMPARE_GREATER,
+ gcvCOMPARE_GREATER_OR_EQUAL,
+ gcvCOMPARE_ALWAYS,
+ gcvCOMPARE_INVALID = -1
+}
+gceCOMPARE;
+
+/* Stencil modes. */
+typedef enum _gceSTENCIL_MODE
+{
+ gcvSTENCIL_NONE,
+ gcvSTENCIL_SINGLE_SIDED,
+ gcvSTENCIL_DOUBLE_SIDED,
+}
+gceSTENCIL_MODE;
+
+/* Stencil operations. */
+typedef enum _gceSTENCIL_OPERATION
+{
+ gcvSTENCIL_KEEP,
+ gcvSTENCIL_REPLACE,
+ gcvSTENCIL_ZERO,
+ gcvSTENCIL_INVERT,
+ gcvSTENCIL_INCREMENT,
+ gcvSTENCIL_DECREMENT,
+ gcvSTENCIL_INCREMENT_SATURATE,
+ gcvSTENCIL_DECREMENT_SATURATE,
+ gcvSTENCIL_OPERATION_INVALID = -1
+}
+gceSTENCIL_OPERATION;
+
+/* Stencil selection. */
+typedef enum _gceSTENCIL_WHERE
+{
+ gcvSTENCIL_FRONT,
+ gcvSTENCIL_BACK,
+}
+gceSTENCIL_WHERE;
+
+/* Texture addressing selection. */
+typedef enum _gceTEXTURE_WHICH
+{
+ gcvTEXTURE_S,
+ gcvTEXTURE_T,
+ gcvTEXTURE_R,
+}
+gceTEXTURE_WHICH;
+
+/* Texture addressing modes. */
+typedef enum _gceTEXTURE_ADDRESSING
+{
+ gcvTEXTURE_WRAP,
+ gcvTEXTURE_CLAMP,
+ gcvTEXTURE_BORDER,
+ gcvTEXTURE_MIRROR,
+ gcvTEXTURE_MIRROR_ONCE,
+}
+gceTEXTURE_ADDRESSING;
+
+/* Texture filters. */
+typedef enum _gceTEXTURE_FILTER
+{
+ gcvTEXTURE_NONE,
+ gcvTEXTURE_POINT,
+ gcvTEXTURE_LINEAR,
+ gcvTEXTURE_ANISOTROPIC,
+}
+gceTEXTURE_FILTER;
+
+/* Primitive types. */
+typedef enum _gcePRIMITIVE
+{
+ gcvPRIMITIVE_POINT_LIST,
+ gcvPRIMITIVE_LINE_LIST,
+ gcvPRIMITIVE_LINE_STRIP,
+ gcvPRIMITIVE_LINE_LOOP,
+ gcvPRIMITIVE_TRIANGLE_LIST,
+ gcvPRIMITIVE_TRIANGLE_STRIP,
+ gcvPRIMITIVE_TRIANGLE_FAN,
+ gcvPRIMITIVE_RECTANGLE,
+}
+gcePRIMITIVE;
+
+/* Index types. */
+typedef enum _gceINDEX_TYPE
+{
+ gcvINDEX_8,
+ gcvINDEX_16,
+ gcvINDEX_32,
+}
+gceINDEX_TYPE;
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Query the target capabilities. */
+gceSTATUS
+gcoHAL_QueryTargetCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MultiTargetCount,
+ OUT gctUINT * MaxSamples
+ );
+
+gceSTATUS
+gcoHAL_SetDepthOnly(
+ IN gcoHAL Hal,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoHAL_QueryShaderCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * VertexUniforms,
+ OUT gctUINT * FragmentUniforms,
+ OUT gctUINT * Varyings
+ );
+
+gceSTATUS
+gcoHAL_QueryTextureCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoHAL_QueryTextureMaxAniso(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxAnisoValue
+ );
+
+gceSTATUS
+gcoHAL_QueryStreamCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT32 * MaxAttributes,
+ OUT gctUINT32 * MaxStreamSize,
+ OUT gctUINT32 * NumberOfStreams,
+ OUT gctUINT32 * Alignment
+ );
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*--------------------------------- gcoSURF 3D --------------------------------*/
+
+/* Copy surface. */
+gceSTATUS
+gcoSURF_Copy(
+ IN gcoSURF Surface,
+ IN gcoSURF Source
+ );
+
+/* Clear surface. */
+gceSTATUS
+gcoSURF_Clear(
+ IN gcoSURF Surface,
+ IN gctUINT Flags
+ );
+
+/* Set number of samples for a gcoSURF object. */
+gceSTATUS
+gcoSURF_SetSamples(
+ IN gcoSURF Surface,
+ IN gctUINT Samples
+ );
+
+/* Get the number of samples per pixel. */
+gceSTATUS
+gcoSURF_GetSamples(
+ IN gcoSURF Surface,
+ OUT gctUINT_PTR Samples
+ );
+
+/* Clear rectangular surface. */
+gceSTATUS
+gcoSURF_ClearRect(
+ IN gcoSURF Surface,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctUINT Flags
+ );
+
+/* TO BE REMOVED */
+ gceSTATUS
+ depr_gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight
+ );
+
+ gceSTATUS
+ depr_gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Resample surface. */
+gceSTATUS
+gcoSURF_Resample(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Resolve surface. */
+gceSTATUS
+gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Export the render target. */
+gceSTATUS
+gcoSURF_ExportRenderTarget(
+ IN gcoSURF SrcSurface
+);
+
+/* Import the render target. */
+gceSTATUS
+gcoSURF_ImportRenderTarget(
+ IN gctUINT32 Pid,
+ IN gcoSURF SrcSurface
+);
+
+/* Save the Resolve info to kernel. */
+gceSTATUS
+gcoSURF_PrepareRemoteResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Resolve using the rectangle info previously saved in the vid mem node. */
+gceSTATUS
+gcoSURF_ResolveFromStoredRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Using the info that Process Pid saved to do resolve. */
+gceSTATUS
+gcoSURF_RemoteResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctBOOL *resolveDiscarded
+ );
+
+/* Return the "resolve submitted indicator" signal. */
+gceSTATUS
+gcoSURF_GetRTSignal(
+ IN gcoSURF RTSurface,
+ OUT gctSIGNAL * resolveSubmittedSignal
+ );
+
+/* Resolve rectangular area of a surface. */
+gceSTATUS
+gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Set surface resolvability. */
+gceSTATUS
+gcoSURF_SetResolvability(
+ IN gcoSURF Surface,
+ IN gctBOOL Resolvable
+ );
+
+gceSTATUS
+gcoSURF_IsRenderable(
+ IN gcoSURF Surface
+ );
+
+/******************************************************************************\
+******************************** gcoINDEX Object *******************************
+\******************************************************************************/
+
+/* Construct a new gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoINDEX * Index
+ );
+
+/* Destroy a gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Destroy(
+ IN gcoINDEX Index
+ );
+
+/* Lock index in memory. */
+gceSTATUS
+gcoINDEX_Lock(
+ IN gcoINDEX Index,
+ OUT gctUINT32 * Address,
+ OUT gctPOINTER * Memory
+ );
+
+/* Unlock index that was previously locked with gcoINDEX_Lock. */
+gceSTATUS
+gcoINDEX_Unlock(
+ IN gcoINDEX Index
+ );
+
+/* Upload index data into the memory. */
+gceSTATUS
+gcoINDEX_Load(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE IndexType,
+ IN gctUINT32 IndexCount,
+ IN gctPOINTER IndexBuffer
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_Bind(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_BindOffset(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset
+ );
+
+/* Free existing index buffer. */
+gceSTATUS
+gcoINDEX_Free(
+ IN gcoINDEX Index
+ );
+
+/* Upload data into an index buffer. */
+gceSTATUS
+gcoINDEX_Upload(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/* Upload data into an index buffer starting at an offset. */
+gceSTATUS
+gcoINDEX_UploadOffset(
+ IN gcoINDEX Index,
+ IN gctUINT32 Offset,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/* Query the index capabilities. */
+gceSTATUS
+gcoINDEX_QueryCaps(
+ OUT gctBOOL * Index8,
+ OUT gctBOOL * Index16,
+ OUT gctBOOL * Index32,
+ OUT gctUINT * MaxIndex
+ );
+
+/* Determine the index range in the current index buffer. */
+gceSTATUS
+gcoINDEX_GetIndexRange(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Count,
+ OUT gctUINT32 * MinimumIndex,
+ OUT gctUINT32 * MaximumIndex
+ );
+
+/* Dynamic buffer management. */
+gceSTATUS
+gcoINDEX_SetDynamic(
+ IN gcoINDEX Index,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+gceSTATUS
+gcoINDEX_UploadDynamic(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+********************************** gco3D Object *********************************
+\******************************************************************************/
+
+/* Clear flags. */
+typedef enum _gceCLEAR
+{
+ gcvCLEAR_COLOR = 0x1,
+ gcvCLEAR_DEPTH = 0x2,
+ gcvCLEAR_STENCIL = 0x4,
+ gcvCLEAR_HZ = 0x8,
+ gcvCLEAR_HAS_VAA = 0x10,
+}
+gceCLEAR;
+
+/* Blending targets. */
+typedef enum _gceBLEND_UNIT
+{
+ gcvBLEND_SOURCE,
+ gcvBLEND_TARGET,
+}
+gceBLEND_UNIT;
+
+/* Construct a new gco3D object. */
+gceSTATUS
+gco3D_Construct(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+/* Destroy an gco3D object. */
+gceSTATUS
+gco3D_Destroy(
+ IN gco3D Engine
+ );
+
+/* Set 3D API type. */
+gceSTATUS
+gco3D_SetAPI(
+ IN gco3D Engine,
+ IN gceAPI ApiType
+ );
+
+/* Set render target. */
+gceSTATUS
+gco3D_SetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset render target. */
+gceSTATUS
+gco3D_UnsetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set depth buffer. */
+gceSTATUS
+gco3D_SetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset depth buffer. */
+gceSTATUS
+gco3D_UnsetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set viewport. */
+gceSTATUS
+gco3D_SetViewport(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set scissors. */
+gceSTATUS
+gco3D_SetScissors(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set clear color. */
+gceSTATUS
+gco3D_SetClearColor(
+ IN gco3D Engine,
+ IN gctUINT8 Red,
+ IN gctUINT8 Green,
+ IN gctUINT8 Blue,
+ IN gctUINT8 Alpha
+ );
+
+/* Set fixed point clear color. */
+gceSTATUS
+gco3D_SetClearColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point clear color. */
+gceSTATUS
+gco3D_SetClearColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set fixed point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Depth
+ );
+
+/* Set floating point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthF(
+ IN gco3D Engine,
+ IN gctFLOAT Depth
+ );
+
+/* Set clear stencil. */
+gceSTATUS
+gco3D_SetClearStencil(
+ IN gco3D Engine,
+ IN gctUINT32 Stencil
+ );
+
+/* Clear a Rect sub-surface. */
+gceSTATUS
+gco3D_ClearRect(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+/* Clear surface. */
+gceSTATUS
+gco3D_Clear(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+
+/* Clear tile status. */
+gceSTATUS
+gco3D_ClearTileStatus(
+ IN gco3D Engine,
+ IN gcsSURF_INFO_PTR Surface,
+ IN gctUINT32 TileStatusAddress,
+ IN gctUINT32 Flags
+ );
+
+/* Set shading mode. */
+gceSTATUS
+gco3D_SetShading(
+ IN gco3D Engine,
+ IN gceSHADING Shading
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_EnableBlending(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set blending function. */
+gceSTATUS
+gco3D_SetBlendFunction(
+ IN gco3D Engine,
+ IN gceBLEND_UNIT Unit,
+ IN gceBLEND_FUNCTION FunctionRGB,
+ IN gceBLEND_FUNCTION FunctionAlpha
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_SetBlendMode(
+ IN gco3D Engine,
+ IN gceBLEND_MODE ModeRGB,
+ IN gceBLEND_MODE ModeAlpha
+ );
+
+/* Set blending color. */
+gceSTATUS
+gco3D_SetBlendColor(
+ IN gco3D Engine,
+ IN gctUINT Red,
+ IN gctUINT Green,
+ IN gctUINT Blue,
+ IN gctUINT Alpha
+ );
+
+/* Set fixed point blending color. */
+gceSTATUS
+gco3D_SetBlendColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point blending color. */
+gceSTATUS
+gco3D_SetBlendColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set culling mode. */
+gceSTATUS
+gco3D_SetCulling(
+ IN gco3D Engine,
+ IN gceCULL Mode
+ );
+
+/* Enable point size */
+gceSTATUS
+gco3D_SetPointSizeEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set point sprite */
+gceSTATUS
+gco3D_SetPointSprite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set fill mode. */
+gceSTATUS
+gco3D_SetFill(
+ IN gco3D Engine,
+ IN gceFILL Mode
+ );
+
+/* Set depth compare mode. */
+gceSTATUS
+gco3D_SetDepthCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Enable depth writing. */
+gceSTATUS
+gco3D_EnableDepthWrite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth mode. */
+gceSTATUS
+gco3D_SetDepthMode(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeX(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFIXED_POINT Near,
+ IN gctFIXED_POINT Far
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeF(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFLOAT Near,
+ IN gctFLOAT Far
+ );
+
+/* Set last pixel enable */
+gceSTATUS
+gco3D_SetLastPixelEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth Bias and Scale */
+gceSTATUS
+gco3D_SetDepthScaleBiasX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT DepthScale,
+ IN gctFIXED_POINT DepthBias
+ );
+
+gceSTATUS
+gco3D_SetDepthScaleBiasF(
+ IN gco3D Engine,
+ IN gctFLOAT DepthScale,
+ IN gctFLOAT DepthBias
+ );
+
+/* Enable or disable dithering. */
+gceSTATUS
+gco3D_EnableDither(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set color write enable bits. */
+gceSTATUS
+gco3D_SetColorWrite(
+ IN gco3D Engine,
+ IN gctUINT8 Enable
+ );
+
+/* Enable or disable early depth. */
+gceSTATUS
+gco3D_SetEarlyDepth(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Enable or disable all early depth operations. */
+gceSTATUS
+gco3D_SetAllEarlyDepthModes(
+ IN gco3D Engine,
+ IN gctBOOL Disable
+ );
+
+/* Enable or disable depth-only mode. */
+gceSTATUS
+gco3D_SetDepthOnly(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+typedef struct _gcsSTENCIL_INFO * gcsSTENCIL_INFO_PTR;
+typedef struct _gcsSTENCIL_INFO
+{
+ gceSTENCIL_MODE mode;
+
+ gctUINT8 mask;
+ gctUINT8 writeMask;
+
+ gctUINT8 referenceFront;
+
+ gceCOMPARE compareFront;
+ gceSTENCIL_OPERATION passFront;
+ gceSTENCIL_OPERATION failFront;
+ gceSTENCIL_OPERATION depthFailFront;
+
+ gctUINT8 referenceBack;
+ gceCOMPARE compareBack;
+ gceSTENCIL_OPERATION passBack;
+ gceSTENCIL_OPERATION failBack;
+ gceSTENCIL_OPERATION depthFailBack;
+}
+gcsSTENCIL_INFO;
+
+/* Set stencil mode. */
+gceSTATUS
+gco3D_SetStencilMode(
+ IN gco3D Engine,
+ IN gceSTENCIL_MODE Mode
+ );
+
+/* Set stencil mask. */
+gceSTATUS
+gco3D_SetStencilMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil write mask. */
+gceSTATUS
+gco3D_SetStencilWriteMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil reference. */
+gceSTATUS
+gco3D_SetStencilReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference,
+ IN gctBOOL Front
+ );
+
+/* Set stencil compare. */
+gceSTATUS
+gco3D_SetStencilCompare(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceCOMPARE Compare
+ );
+
+/* Set stencil operation on pass. */
+gceSTATUS
+gco3D_SetStencilPass(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on fail. */
+gceSTATUS
+gco3D_SetStencilFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on depth fail. */
+gceSTATUS
+gco3D_SetStencilDepthFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set all stencil states in one blow. */
+gceSTATUS
+gco3D_SetStencilAll(
+ IN gco3D Engine,
+ IN gcsSTENCIL_INFO_PTR Info
+ );
+
+typedef struct _gcsALPHA_INFO * gcsALPHA_INFO_PTR;
+typedef struct _gcsALPHA_INFO
+{
+ /* Alpha test states. */
+ gctBOOL test;
+ gceCOMPARE compare;
+ gctUINT8 reference;
+
+ /* Alpha blending states. */
+ gctBOOL blend;
+
+ gceBLEND_FUNCTION srcFuncColor;
+ gceBLEND_FUNCTION srcFuncAlpha;
+ gceBLEND_FUNCTION trgFuncColor;
+ gceBLEND_FUNCTION trgFuncAlpha;
+
+ gceBLEND_MODE modeColor;
+ gceBLEND_MODE modeAlpha;
+
+ gctUINT32 color;
+}
+gcsALPHA_INFO;
+
+/* Enable or disable alpha test. */
+gceSTATUS
+gco3D_SetAlphaTest(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set alpha test compare. */
+gceSTATUS
+gco3D_SetAlphaCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Set alpha test reference in unsigned integer. */
+gceSTATUS
+gco3D_SetAlphaReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference
+ );
+
+/* Set alpha test reference in fixed point. */
+gceSTATUS
+gco3D_SetAlphaReferenceX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Reference
+ );
+
+/* Set alpha test reference in floating point. */
+gceSTATUS
+gco3D_SetAlphaReferenceF(
+ IN gco3D Engine,
+ IN gctFLOAT Reference
+ );
+
+/* Enable/Disable anti-alias line. */
+gceSTATUS
+gco3D_SetAntiAliasLine(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set texture slot for anti-alias line. */
+gceSTATUS
+gco3D_SetAALineTexSlot(
+ IN gco3D Engine,
+ IN gctUINT TexSlot
+ );
+
+/* Set anti-alias line width scale. */
+gceSTATUS
+gco3D_SetAALineWidth(
+ IN gco3D Engine,
+ IN gctFLOAT Width
+ );
+
+/* Draw a number of primitives. */
+gceSTATUS
+gco3D_DrawPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT StartVertex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+gceSTATUS
+gco3D_DrawPrimitivesCount(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT* StartVertex,
+ IN gctSIZE_T* VertexCount,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+
+/* Draw a number of primitives using offsets. */
+gceSTATUS
+gco3D_DrawPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives. */
+gceSTATUS
+gco3D_DrawIndexedPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT BaseVertex,
+ IN gctINT StartIndex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives using offsets. */
+gceSTATUS
+gco3D_DrawIndexedPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 BaseOffset,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Enable or disable anti-aliasing. */
+gceSTATUS
+gco3D_SetAntiAlias(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Write data into the command buffer. */
+gceSTATUS
+gco3D_WriteBuffer(
+ IN gco3D Engine,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Aligned
+ );
+
+/* Send sempahore and stall until sempahore is signalled. */
+gceSTATUS
+gco3D_Semaphore(
+ IN gco3D Engine,
+ IN gceWHERE From,
+ IN gceWHERE To,
+ IN gceHOW How);
+
+/* Set the subpixels center. */
+gceSTATUS
+gco3D_SetCentroids(
+ IN gco3D Engine,
+ IN gctUINT32 Index,
+ IN gctPOINTER Centroids
+ );
+
+gceSTATUS
+gco3D_SetLogicOp(
+ IN gco3D Engine,
+ IN gctUINT8 Rop
+ );
+
+/* OCL thread walker information. */
+typedef struct _gcsTHREAD_WALKER_INFO * gcsTHREAD_WALKER_INFO_PTR;
+typedef struct _gcsTHREAD_WALKER_INFO
+{
+ gctUINT32 dimensions;
+ gctUINT32 traverseOrder;
+ gctUINT32 enableSwathX;
+ gctUINT32 enableSwathY;
+ gctUINT32 enableSwathZ;
+ gctUINT32 swathSizeX;
+ gctUINT32 swathSizeY;
+ gctUINT32 swathSizeZ;
+ gctUINT32 valueOrder;
+
+ gctUINT32 globalSizeX;
+ gctUINT32 globalOffsetX;
+ gctUINT32 globalSizeY;
+ gctUINT32 globalOffsetY;
+ gctUINT32 globalSizeZ;
+ gctUINT32 globalOffsetZ;
+
+ gctUINT32 workGroupSizeX;
+ gctUINT32 workGroupCountX;
+ gctUINT32 workGroupSizeY;
+ gctUINT32 workGroupCountY;
+ gctUINT32 workGroupSizeZ;
+ gctUINT32 workGroupCountZ;
+
+ gctUINT32 threadAllocation;
+}
+gcsTHREAD_WALKER_INFO;
+
+/* Start OCL thread walker. */
+gceSTATUS
+gco3D_InvokeThreadWalker(
+ IN gco3D Engine,
+ IN gcsTHREAD_WALKER_INFO_PTR Info
+ );
+
+/*----------------------------------------------------------------------------*/
+/*-------------------------- gco3D Fragment Processor ------------------------*/
+
+/* Set the fragment processor configuration. */
+gceSTATUS
+gco3D_SetFragmentConfiguration(
+ IN gco3D Engine,
+ IN gctBOOL ColorFromStream,
+ IN gctBOOL EnableFog,
+ IN gctBOOL EnableSmoothPoint,
+ IN gctUINT32 ClipPlanes
+ );
+
+/* Enable/disable texture stage operation. */
+gceSTATUS
+gco3D_EnableTextureStage(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL Enable
+ );
+
+/* Program the channel enable masks for the color texture function. */
+gceSTATUS
+gco3D_SetTextureColorMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the channel enable masks for the alpha texture function. */
+gceSTATUS
+gco3D_SetTextureAlphaMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the constant fragment color. */
+gceSTATUS
+gco3D_SetFragmentColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFragmentColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant fog color. */
+gceSTATUS
+gco3D_SetFogColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFogColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant texture color. */
+gceSTATUS
+gco3D_SetTetxureColorX(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetTetxureColorF(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Configure color texture function. */
+gceSTATUS
+gco3D_SetColorTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+/* Configure alpha texture function. */
+gceSTATUS
+gco3D_SetAlphaTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+/* Invoke OCL thread walker. */
+gceSTATUS
+gcoHARDWARE_InvokeThreadWalker(
+ IN gcsTHREAD_WALKER_INFO_PTR Info
+ );
+
+/******************************************************************************\
+******************************* gcoTEXTURE Object *******************************
+\******************************************************************************/
+
+/* Cube faces. */
+typedef enum _gceTEXTURE_FACE
+{
+ gcvFACE_NONE,
+ gcvFACE_POSITIVE_X,
+ gcvFACE_NEGATIVE_X,
+ gcvFACE_POSITIVE_Y,
+ gcvFACE_NEGATIVE_Y,
+ gcvFACE_POSITIVE_Z,
+ gcvFACE_NEGATIVE_Z,
+}
+gceTEXTURE_FACE;
+
+typedef struct _gcsTEXTURE
+{
+ /* Addressing modes. */
+ gceTEXTURE_ADDRESSING s;
+ gceTEXTURE_ADDRESSING t;
+ gceTEXTURE_ADDRESSING r;
+
+ /* Border color. */
+ gctUINT8 border[4];
+
+ /* Filters. */
+ gceTEXTURE_FILTER minFilter;
+ gceTEXTURE_FILTER magFilter;
+ gceTEXTURE_FILTER mipFilter;
+ gctUINT anisoFilter;
+
+ /* Level of detail. */
+ gctFIXED_POINT lodBias;
+ gctFIXED_POINT lodMin;
+ gctFIXED_POINT lodMax;
+}
+gcsTEXTURE, * gcsTEXTURE_PTR;
+
+/* Construct a new gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Construct(
+ IN gcoHAL Hal,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Construct a new sized gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_ConstructSized(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gctUINT MipMapCount,
+ IN gcePOOL Pool,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Destroy an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Destroy(
+ IN gcoTEXTURE Texture
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Upload(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadSub(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload compressed data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadCompressed(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get gcoSURF object for a mipmap level. */
+gceSTATUS
+gcoTEXTURE_GetMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ OUT gcoSURF * Surface
+ );
+
+/* Get gcoSURF object for a mipmap level and face offset. */
+gceSTATUS
+gcoTEXTURE_GetMipMapFace(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ OUT gcoSURF * Surface,
+ OUT gctUINT32_PTR Offset
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromClient(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromSurface(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_SetEndianHint(
+ IN gcoTEXTURE Texture,
+ IN gceENDIAN_HINT EndianHint
+ );
+
+gceSTATUS
+gcoTEXTURE_Disable(
+ IN gcoHAL Hal,
+ IN gctINT Sampler
+ );
+
+gceSTATUS
+gcoTEXTURE_Flush(
+ IN gcoTEXTURE Texture
+ );
+
+gceSTATUS
+gcoTEXTURE_QueryCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoTEXTURE_GetClosestFormat(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT InFormat,
+ OUT gceSURF_FORMAT* OutFormat
+ );
+
+gceSTATUS
+gcoTEXTURE_RenderIntoMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsRenderable(
+ IN gcoTEXTURE Texture,
+ IN gctUINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsComplete(
+ IN gcoTEXTURE Texture,
+ IN gctINT MaxLevel
+ );
+
+gceSTATUS
+gcoTEXTURE_BindTexture(
+ IN gcoTEXTURE Texture,
+ IN gctINT Target,
+ IN gctINT Sampler,
+ IN gcsTEXTURE_PTR Info
+ );
+
+/******************************************************************************\
+******************************* gcoSTREAM Object ******************************
+\******************************************************************************/
+
+typedef enum _gceVERTEX_FORMAT
+{
+ gcvVERTEX_BYTE,
+ gcvVERTEX_UNSIGNED_BYTE,
+ gcvVERTEX_SHORT,
+ gcvVERTEX_UNSIGNED_SHORT,
+ gcvVERTEX_INT,
+ gcvVERTEX_UNSIGNED_INT,
+ gcvVERTEX_FIXED,
+ gcvVERTEX_HALF,
+ gcvVERTEX_FLOAT,
+ gcvVERTEX_UNSIGNED_INT_10_10_10_2,
+ gcvVERTEX_INT_10_10_10_2,
+}
+gceVERTEX_FORMAT;
+
+gceSTATUS
+gcoSTREAM_Construct(
+ IN gcoHAL Hal,
+ OUT gcoSTREAM * Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Destroy(
+ IN gcoSTREAM Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Upload(
+ IN gcoSTREAM Stream,
+ IN gctCONST_POINTER Buffer,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Dynamic
+ );
+
+gceSTATUS
+gcoSTREAM_SetStride(
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoSTREAM_Lock(
+ IN gcoSTREAM Stream,
+ OUT gctPOINTER * Logical,
+ OUT gctUINT32 * Physical
+ );
+
+gceSTATUS
+gcoSTREAM_Unlock(
+ IN gcoSTREAM Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Reserve(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoSTREAM_Flush(
+ IN gcoSTREAM Stream
+ );
+
+/* Dynamic buffer API. */
+gceSTATUS
+gcoSTREAM_SetDynamic(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+typedef struct _gcsSTREAM_INFO
+{
+ gctUINT index;
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT components;
+ gctSIZE_T size;
+ gctCONST_POINTER data;
+ gctUINT stride;
+}
+gcsSTREAM_INFO, * gcsSTREAM_INFO_PTR;
+
+gceSTATUS
+gcoSTREAM_UploadDynamic(
+ IN gcoSTREAM Stream,
+ IN gctUINT VertexCount,
+ IN gctUINT InfoCount,
+ IN gcsSTREAM_INFO_PTR Info,
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoSTREAM_CPUCacheOperation(
+ IN gcoSTREAM Stream,
+ IN gceCACHEOPERATION Operation
+ );
+
+/******************************************************************************\
+******************************** gcoVERTEX Object ******************************
+\******************************************************************************/
+
+typedef struct _gcsVERTEX_ATTRIBUTES
+{
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT32 components;
+ gctSIZE_T size;
+ gctUINT32 stream;
+ gctUINT32 offset;
+ gctUINT32 stride;
+}
+gcsVERTEX_ATTRIBUTES;
+
+gceSTATUS
+gcoVERTEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVERTEX * Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Destroy(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Reset(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_EnableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index,
+ IN gceVERTEX_FORMAT Format,
+ IN gctBOOL Normalized,
+ IN gctUINT32 Components,
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoVERTEX_DisableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index
+ );
+
+gceSTATUS
+gcoVERTEX_Bind(
+ IN gcoVERTEX Vertex
+ );
+
+/*******************************************************************************
+***** gcoVERTEXARRAY Object ***************************************************/
+
+typedef struct _gcsVERTEXARRAY
+{
+ /* Enabled. */
+ gctBOOL enable;
+
+ /* Number of components. */
+ gctINT size;
+
+ /* Attribute format. */
+ gceVERTEX_FORMAT format;
+
+ /* Flag whether the attribute is normalized or not. */
+ gctBOOL normalized;
+
+ /* Stride of the component. */
+ gctUINT stride;
+
+ /* Pointer to the attribute data. */
+ gctCONST_POINTER pointer;
+
+ /* Stream object owning the attribute data. */
+ gcoSTREAM stream;
+
+ /* Generic values for attribute. */
+ gctFLOAT genericValue[4];
+
+ /* Vertex shader linkage. */
+ gctUINT linkage;
+}
+gcsVERTEXARRAY,
+* gcsVERTEXARRAY_PTR;
+
+gceSTATUS
+gcoVERTEXARRAY_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVERTEXARRAY * Vertex
+ );
+
+gceSTATUS
+gcoVERTEXARRAY_Destroy(
+ IN gcoVERTEXARRAY Vertex
+ );
+
+gceSTATUS
+gcoVERTEXARRAY_Bind(
+ IN gcoVERTEXARRAY Vertex,
+ IN gctUINT32 EnableBits,
+ IN gcsVERTEXARRAY_PTR VertexArray,
+ IN gctUINT First,
+ IN gctSIZE_T Count,
+ IN gceINDEX_TYPE IndexType,
+ IN gcoINDEX IndexObject,
+ IN gctPOINTER IndexMemory,
+ IN OUT gcePRIMITIVE * PrimitiveType,
+ IN OUT gctUINT * PrimitiveCount
+ );
+
+/*******************************************************************************
+***** Composition *************************************************************/
+
+typedef enum _gceCOMPOSITION
+{
+ gcvCOMPOSE_CLEAR = 1,
+ gcvCOMPOSE_BLUR,
+ gcvCOMPOSE_DIM,
+ gcvCOMPOSE_LAYER
+}
+gceCOMPOSITION;
+
+typedef struct _gcsCOMPOSITION * gcsCOMPOSITION_PTR;
+typedef struct _gcsCOMPOSITION
+{
+ /* Structure size. */
+ gctUINT structSize;
+
+ /* Composition operation. */
+ gceCOMPOSITION operation;
+
+ /* Layer to be composed. */
+ gcoSURF layer;
+
+ /* Source and target coordinates. */
+ gcsRECT srcRect;
+ gcsRECT trgRect;
+
+ /* Target rectangle */
+ gcsPOINT v0;
+ gcsPOINT v1;
+ gcsPOINT v2;
+
+ /* Blending parameters. */
+ gctBOOL enableBlending;
+ gctBOOL premultiplied;
+ gctUINT8 alphaValue;
+
+ /* Clear color. */
+ gctFLOAT r;
+ gctFLOAT g;
+ gctFLOAT b;
+ gctFLOAT a;
+}
+gcsCOMPOSITION;
+
+gceSTATUS
+gco3D_ProbeComposition(
+ gctBOOL ResetIfEmpty
+ );
+
+gceSTATUS
+gco3D_CompositionBegin(
+ void
+ );
+
+gceSTATUS
+gco3D_ComposeLayer(
+ IN gcsCOMPOSITION_PTR Layer
+ );
+
+gceSTATUS
+gco3D_CompositionSignals(
+ IN gctHANDLE Process,
+ IN gctSIGNAL Signal1,
+ IN gctSIGNAL Signal2
+ );
+
+gceSTATUS
+gco3D_CompositionEnd(
+ IN gcoSURF Target,
+ IN gctBOOL Synchronous
+ );
+
+/* Frame Database */
+gceSTATUS
+gcoHAL_AddFrameDB(
+ void
+ );
+
+gceSTATUS
+gcoHAL_DumpFrameDB(
+ gctCONST_STRING Filename OPTIONAL
+ );
+
+gceSTATUS
+gcoHAL_GetSharedInfo(
+ IN gctUINT32 Pid,
+ IN gctUINT32 DataId,
+ OUT gctUINT8_PTR Data,
+ IN gctSIZE_T Bytes,
+ IN gcuVIDMEM_NODE_PTR Node,
+ OUT gctUINT8_PTR NodeData,
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE SharedInfoType
+ );
+
+gceSTATUS
+gcoHAL_SetSharedInfo(
+ IN gctUINT32 DataId,
+ IN gctUINT8_PTR Data,
+ IN gctSIZE_T Bytes,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctUINT8_PTR NodeData,
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE SharedInfoType
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VIVANTE_NO_3D */
+#endif /* __gc_hal_engine_h_ */
diff --git a/src/include_eureka/gc_hal_engine_vg.h b/src/include_eureka/gc_hal_engine_vg.h
new file mode 100644
index 0000000..571e03e
--- /dev/null
+++ b/src/include_eureka/gc_hal_engine_vg.h
@@ -0,0 +1,908 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+
+
+#ifndef __gc_hal_engine_vg_h_
+#define __gc_hal_engine_vg_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "gc_hal_types.h"
+
+/******************************************************************************\
+******************************** VG Enumerations *******************************
+\******************************************************************************/
+
+/**
+** @ingroup gcoVG
+**
+** @brief Tiling mode for painting and imagig.
+**
+** This enumeration defines the tiling modes supported by the HAL. This is
+** in fact a one-to-one mapping of the OpenVG 1.1 tile modes.
+*/
+typedef enum _gceTILE_MODE
+{
+ gcvTILE_FILL,
+ gcvTILE_PAD,
+ gcvTILE_REPEAT,
+ gcvTILE_REFLECT
+}
+gceTILE_MODE;
+
+/******************************************************************************/
+/** @ingroup gcoVG
+**
+** @brief The different paint modes.
+**
+** This enumeration lists the available paint modes.
+*/
+typedef enum _gcePAINT_TYPE
+{
+ /** Solid color. */
+ gcvPAINT_MODE_SOLID,
+
+ /** Linear gradient. */
+ gcvPAINT_MODE_LINEAR,
+
+ /** Radial gradient. */
+ gcvPAINT_MODE_RADIAL,
+
+ /** Pattern. */
+ gcvPAINT_MODE_PATTERN,
+
+ /** Mode count. */
+ gcvPAINT_MODE_COUNT
+}
+gcePAINT_TYPE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Types of path data supported by HAL.
+**
+** This enumeration defines the types of path data supported by the HAL.
+** This is in fact a one-to-one mapping of the OpenVG 1.1 path types.
+*/
+typedef enum _gcePATHTYPE
+{
+ gcePATHTYPE_UNKNOWN = -1,
+ gcePATHTYPE_INT8,
+ gcePATHTYPE_INT16,
+ gcePATHTYPE_INT32,
+ gcePATHTYPE_FLOAT
+}
+gcePATHTYPE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Supported path segment commands.
+**
+** This enumeration defines the path segment commands supported by the HAL.
+*/
+typedef enum _gceVGCMD
+{
+ gcvVGCMD_END, /* 0: GCCMD_TS_OPCODE_END */
+ gcvVGCMD_CLOSE, /* 1: GCCMD_TS_OPCODE_CLOSE */
+ gcvVGCMD_MOVE, /* 2: GCCMD_TS_OPCODE_MOVE */
+ gcvVGCMD_MOVE_REL, /* 3: GCCMD_TS_OPCODE_MOVE_REL */
+ gcvVGCMD_LINE, /* 4: GCCMD_TS_OPCODE_LINE */
+ gcvVGCMD_LINE_REL, /* 5: GCCMD_TS_OPCODE_LINE_REL */
+ gcvVGCMD_QUAD, /* 6: GCCMD_TS_OPCODE_QUADRATIC */
+ gcvVGCMD_QUAD_REL, /* 7: GCCMD_TS_OPCODE_QUADRATIC_REL */
+ gcvVGCMD_CUBIC, /* 8: GCCMD_TS_OPCODE_CUBIC */
+ gcvVGCMD_CUBIC_REL, /* 9: GCCMD_TS_OPCODE_CUBIC_REL */
+ gcvVGCMD_BREAK, /* 10: GCCMD_TS_OPCODE_BREAK */
+ gcvVGCMD_HLINE, /* 11: ******* R E S E R V E D *******/
+ gcvVGCMD_HLINE_REL, /* 12: ******* R E S E R V E D *******/
+ gcvVGCMD_VLINE, /* 13: ******* R E S E R V E D *******/
+ gcvVGCMD_VLINE_REL, /* 14: ******* R E S E R V E D *******/
+ gcvVGCMD_SQUAD, /* 15: ******* R E S E R V E D *******/
+ gcvVGCMD_SQUAD_REL, /* 16: ******* R E S E R V E D *******/
+ gcvVGCMD_SCUBIC, /* 17: ******* R E S E R V E D *******/
+ gcvVGCMD_SCUBIC_REL, /* 18: ******* R E S E R V E D *******/
+ gcvVGCMD_SCCWARC, /* 19: ******* R E S E R V E D *******/
+ gcvVGCMD_SCCWARC_REL, /* 20: ******* R E S E R V E D *******/
+ gcvVGCMD_SCWARC, /* 21: ******* R E S E R V E D *******/
+ gcvVGCMD_SCWARC_REL, /* 22: ******* R E S E R V E D *******/
+ gcvVGCMD_LCCWARC, /* 23: ******* R E S E R V E D *******/
+ gcvVGCMD_LCCWARC_REL, /* 24: ******* R E S E R V E D *******/
+ gcvVGCMD_LCWARC, /* 25: ******* R E S E R V E D *******/
+ gcvVGCMD_LCWARC_REL, /* 26: ******* R E S E R V E D *******/
+
+ /* The width of the command recognized by the hardware on bits. */
+ gcvVGCMD_WIDTH = 5,
+
+ /* Hardware command mask. */
+ gcvVGCMD_MASK = (1 << gcvVGCMD_WIDTH) - 1,
+
+ /* Command modifiers. */
+ gcvVGCMD_H_MOD = 1 << gcvVGCMD_WIDTH, /* = 32 */
+ gcvVGCMD_V_MOD = 2 << gcvVGCMD_WIDTH, /* = 64 */
+ gcvVGCMD_S_MOD = 3 << gcvVGCMD_WIDTH, /* = 96 */
+ gcvVGCMD_ARC_MOD = 4 << gcvVGCMD_WIDTH, /* = 128 */
+
+ /* Emulated LINE commands. */
+ gcvVGCMD_HLINE_EMUL = gcvVGCMD_H_MOD | gcvVGCMD_LINE, /* = 36 */
+ gcvVGCMD_HLINE_EMUL_REL = gcvVGCMD_H_MOD | gcvVGCMD_LINE_REL, /* = 37 */
+ gcvVGCMD_VLINE_EMUL = gcvVGCMD_V_MOD | gcvVGCMD_LINE, /* = 68 */
+ gcvVGCMD_VLINE_EMUL_REL = gcvVGCMD_V_MOD | gcvVGCMD_LINE_REL, /* = 69 */
+
+ /* Emulated SMOOTH commands. */
+ gcvVGCMD_SQUAD_EMUL = gcvVGCMD_S_MOD | gcvVGCMD_QUAD, /* = 102 */
+ gcvVGCMD_SQUAD_EMUL_REL = gcvVGCMD_S_MOD | gcvVGCMD_QUAD_REL, /* = 103 */
+ gcvVGCMD_SCUBIC_EMUL = gcvVGCMD_S_MOD | gcvVGCMD_CUBIC, /* = 104 */
+ gcvVGCMD_SCUBIC_EMUL_REL = gcvVGCMD_S_MOD | gcvVGCMD_CUBIC_REL, /* = 105 */
+
+ /* Emulation ARC commands. */
+ gcvVGCMD_ARC_LINE = gcvVGCMD_ARC_MOD | gcvVGCMD_LINE, /* = 132 */
+ gcvVGCMD_ARC_LINE_REL = gcvVGCMD_ARC_MOD | gcvVGCMD_LINE_REL, /* = 133 */
+ gcvVGCMD_ARC_QUAD = gcvVGCMD_ARC_MOD | gcvVGCMD_QUAD, /* = 134 */
+ gcvVGCMD_ARC_QUAD_REL = gcvVGCMD_ARC_MOD | gcvVGCMD_QUAD_REL /* = 135 */
+}
+gceVGCMD;
+typedef enum _gceVGCMD * gceVGCMD_PTR;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Blending modes supported by the HAL.
+**
+** This enumeration defines the blending modes supported by the HAL. This is
+** in fact a one-to-one mapping of the OpenVG 1.1 blending modes.
+*/
+typedef enum _gceVG_BLEND
+{
+ gcvVG_BLEND_SRC,
+ gcvVG_BLEND_SRC_OVER,
+ gcvVG_BLEND_DST_OVER,
+ gcvVG_BLEND_SRC_IN,
+ gcvVG_BLEND_DST_IN,
+ gcvVG_BLEND_MULTIPLY,
+ gcvVG_BLEND_SCREEN,
+ gcvVG_BLEND_DARKEN,
+ gcvVG_BLEND_LIGHTEN,
+ gcvVG_BLEND_ADDITIVE,
+ gcvVG_BLEND_SUBTRACT,
+ gcvVG_BLEND_FILTER
+}
+gceVG_BLEND;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Image modes supported by the HAL.
+**
+** This enumeration defines the image modes supported by the HAL. This is
+** in fact a one-to-one mapping of the OpenVG 1.1 image modes with the addition
+** of NO IMAGE.
+*/
+typedef enum _gceVG_IMAGE
+{
+ gcvVG_IMAGE_NONE,
+ gcvVG_IMAGE_NORMAL,
+ gcvVG_IMAGE_MULTIPLY,
+ gcvVG_IMAGE_STENCIL,
+ gcvVG_IMAGE_FILTER
+}
+gceVG_IMAGE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Filter mode patterns and imaging.
+**
+** This enumeration defines the filter modes supported by the HAL.
+*/
+typedef enum _gceIMAGE_FILTER
+{
+ gcvFILTER_POINT,
+ gcvFILTER_LINEAR,
+ gcvFILTER_BI_LINEAR
+}
+gceIMAGE_FILTER;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Primitive modes supported by the HAL.
+**
+** This enumeration defines the primitive modes supported by the HAL.
+*/
+typedef enum _gceVG_PRIMITIVE
+{
+ gcvVG_SCANLINE,
+ gcvVG_RECTANGLE,
+ gcvVG_TESSELLATED,
+ gcvVG_TESSELLATED_TILED
+}
+gceVG_PRIMITIVE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Rendering quality modes supported by the HAL.
+**
+** This enumeration defines the rendering quality modes supported by the HAL.
+*/
+typedef enum _gceRENDER_QUALITY
+{
+ gcvVG_NONANTIALIASED,
+ gcvVG_2X2_MSAA,
+ gcvVG_2X4_MSAA,
+ gcvVG_4X4_MSAA
+}
+gceRENDER_QUALITY;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Fill rules supported by the HAL.
+**
+** This enumeration defines the fill rules supported by the HAL.
+*/
+typedef enum _gceFILL_RULE
+{
+ gcvVG_EVEN_ODD,
+ gcvVG_NON_ZERO
+}
+gceFILL_RULE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Cap styles supported by the HAL.
+**
+** This enumeration defines the cap styles supported by the HAL.
+*/
+typedef enum _gceCAP_STYLE
+{
+ gcvCAP_BUTT,
+ gcvCAP_ROUND,
+ gcvCAP_SQUARE
+}
+gceCAP_STYLE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Join styles supported by the HAL.
+**
+** This enumeration defines the join styles supported by the HAL.
+*/
+typedef enum _gceJOIN_STYLE
+{
+ gcvJOIN_MITER,
+ gcvJOIN_ROUND,
+ gcvJOIN_BEVEL
+}
+gceJOIN_STYLE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Channel mask values.
+**
+** This enumeration defines the values for channel mask used in image
+** filtering.
+*/
+
+/* Base values for channel mask definitions. */
+#define gcvCHANNEL_X (0)
+#define gcvCHANNEL_R (1 << 0)
+#define gcvCHANNEL_G (1 << 1)
+#define gcvCHANNEL_B (1 << 2)
+#define gcvCHANNEL_A (1 << 3)
+
+typedef enum _gceCHANNEL
+{
+ gcvCHANNEL_XXXX = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_XXXA = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_XXBX = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_XXBA = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_A),
+
+ gcvCHANNEL_XGXX = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_XGXA = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_XGBX = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_XGBA = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_A),
+
+ gcvCHANNEL_RXXX = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_RXXA = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_RXBX = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_RXBA = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_A),
+
+ gcvCHANNEL_RGXX = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_RGXA = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_RGBX = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_RGBA = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_A),
+}
+gceCHANNEL;
+
+/******************************************************************************\
+******************************** VG Structures *******************************
+\******************************************************************************/
+
+/**
+** @ingroup gcoVG
+**
+** @brief Definition of the color ramp used by the gradient paints.
+**
+** The gcsCOLOR_RAMP structure defines the layout of one single color inside
+** a color ramp which is used by gradient paints.
+*/
+typedef struct _gcsCOLOR_RAMP
+{
+ /** Value for the color stop. */
+ gctFLOAT stop;
+
+ /** Red color channel value for the color stop. */
+ gctFLOAT red;
+
+ /** Green color channel value for the color stop. */
+ gctFLOAT green;
+
+ /** Blue color channel value for the color stop. */
+ gctFLOAT blue;
+
+ /** Alpha color channel value for the color stop. */
+ gctFLOAT alpha;
+}
+gcsCOLOR_RAMP, * gcsCOLOR_RAMP_PTR;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Definition of the color ramp used by the gradient paints in fixed form.
+**
+** The gcsCOLOR_RAMP structure defines the layout of one single color inside
+** a color ramp which is used by gradient paints.
+*/
+typedef struct _gcsFIXED_COLOR_RAMP
+{
+ /** Value for the color stop. */
+ gctFIXED_POINT stop;
+
+ /** Red color channel value for the color stop. */
+ gctFIXED_POINT red;
+
+ /** Green color channel value for the color stop. */
+ gctFIXED_POINT green;
+
+ /** Blue color channel value for the color stop. */
+ gctFIXED_POINT blue;
+
+ /** Alpha color channel value for the color stop. */
+ gctFIXED_POINT alpha;
+}
+gcsFIXED_COLOR_RAMP, * gcsFIXED_COLOR_RAMP_PTR;
+
+
+/**
+** @ingroup gcoVG
+**
+** @brief Rectangle structure used by the gcoVG object.
+**
+** This structure defines the layout of a rectangle. Make sure width and
+** height are larger than 0.
+*/
+typedef struct _gcsVG_RECT * gcsVG_RECT_PTR;
+typedef struct _gcsVG_RECT
+{
+ /** Left location of the rectangle. */
+ gctINT x;
+
+ /** Top location of the rectangle. */
+ gctINT y;
+
+ /** Width of the rectangle. */
+ gctINT width;
+
+ /** Height of the rectangle. */
+ gctINT height;
+}
+gcsVG_RECT;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Path command buffer attribute structure.
+**
+** The gcsPATH_BUFFER_INFO structure contains the specifics about
+** the layout of the path data command buffer.
+*/
+typedef struct _gcsPATH_BUFFER_INFO * gcsPATH_BUFFER_INFO_PTR;
+typedef struct _gcsPATH_BUFFER_INFO
+{
+ gctUINT reservedForHead;
+ gctUINT reservedForTail;
+}
+gcsPATH_BUFFER_INFO;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Definition of the path data container structure.
+**
+** The gcsPATH structure defines the layout of the path data container.
+*/
+typedef struct _gcsPATH_DATA * gcsPATH_DATA_PTR;
+typedef struct _gcsPATH_DATA
+{
+ /* Data container in command buffer format. */
+ gcsCMDBUFFER data;
+
+ /* Path data type. */
+ gcePATHTYPE dataType;
+}
+gcsPATH_DATA;
+
+
+/******************************************************************************\
+********************************* gcoHAL Object ********************************
+\******************************************************************************/
+
+/* Query path data storage attributes. */
+gceSTATUS
+gcoHAL_QueryPathStorage(
+ IN gcoHAL Hal,
+ OUT gcsPATH_BUFFER_INFO_PTR Information
+ );
+
+/* Associate a completion signal with the command buffer. */
+gceSTATUS
+gcoHAL_AssociateCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Release the current command buffer completion signal. */
+gceSTATUS
+gcoHAL_DeassociateCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Verify whether the command buffer is still in use. */
+gceSTATUS
+gcoHAL_CheckCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Wait until the command buffer is no longer in use. */
+gceSTATUS
+gcoHAL_WaitCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Flush the pixel cache. */
+gceSTATUS
+gcoHAL_Flush(
+ IN gcoHAL Hal
+ );
+
+/* Split a harwdare address into pool and offset. */
+gceSTATUS
+gcoHAL_SplitAddress(
+ IN gcoHAL Hal,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Combine pool and offset into a harwdare address. */
+gceSTATUS
+gcoHAL_CombineAddress(
+ IN gcoHAL Hal,
+ IN gcePOOL Pool,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Schedule to free linear video memory allocated. */
+gceSTATUS
+gcoHAL_ScheduleVideoMemory(
+ IN gcoHAL Hal,
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/* Free linear video memory allocated with gcoHAL_AllocateLinearVideoMemory. */
+gceSTATUS
+gcoHAL_FreeVideoMemory(
+ IN gcoHAL Hal,
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/* Query command buffer attributes. */
+gceSTATUS
+gcoHAL_QueryCommandBuffer(
+ IN gcoHAL Hal,
+ OUT gcsCOMMAND_BUFFER_INFO_PTR Information
+ );
+/* Allocate and lock linear video memory. */
+gceSTATUS
+gcoHAL_AllocateLinearVideoMemory(
+ IN gcoHAL Hal,
+ IN gctUINT Size,
+ IN gctUINT Alignment,
+ IN gcePOOL Pool,
+ OUT gcuVIDMEM_NODE_PTR * Node,
+ OUT gctUINT32 * Address,
+ OUT gctPOINTER * Memory
+ );
+
+/* Align the specified size accordingly to the hardware requirements. */
+gceSTATUS
+gcoHAL_GetAlignedSurfaceSize(
+ IN gcoHAL Hal,
+ IN gceSURF_TYPE Type,
+ IN OUT gctUINT32_PTR Width,
+ IN OUT gctUINT32_PTR Height
+ );
+
+gceSTATUS
+gcoHAL_ReserveTask(
+ IN gcoHAL Hal,
+ IN gceBLOCK Block,
+ IN gctUINT TaskCount,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+/******************************************************************************\
+********************************** gcoVG Object ********************************
+\******************************************************************************/
+
+/** @defgroup gcoVG gcoVG
+**
+** The gcoVG object abstracts the VG hardware pipe.
+*/
+
+gctBOOL
+gcoVG_IsMaskSupported(
+ IN gceSURF_FORMAT Format
+ );
+
+gctBOOL
+gcoVG_IsTargetSupported(
+ IN gceSURF_FORMAT Format
+ );
+
+gctBOOL
+gcoVG_IsImageSupported(
+ IN gceSURF_FORMAT Format
+ );
+
+gctUINT8 gcoVG_PackColorComponent(
+ gctFLOAT Value
+ );
+
+gceSTATUS
+gcoVG_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVG * Vg
+ );
+
+gceSTATUS
+gcoVG_Destroy(
+ IN gcoVG Vg
+ );
+
+gceSTATUS
+gcoVG_SetTarget(
+ IN gcoVG Vg,
+ IN gcoSURF Target
+ );
+
+gceSTATUS
+gcoVG_UnsetTarget(
+ IN gcoVG Vg,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoVG_SetUserToSurface(
+ IN gcoVG Vg,
+ IN gctFLOAT UserToSurface[9]
+ );
+
+gceSTATUS
+gcoVG_SetSurfaceToImage(
+ IN gcoVG Vg,
+ IN gctFLOAT SurfaceToImage[9]
+ );
+
+gceSTATUS
+gcoVG_EnableMask(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoVG_SetMask(
+ IN gcoVG Vg,
+ IN gcoSURF Mask
+ );
+
+gceSTATUS
+gcoVG_UnsetMask(
+ IN gcoVG Vg,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoVG_FlushMask(
+ IN gcoVG Vg
+ );
+
+gceSTATUS
+gcoVG_EnableScissor(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoVG_SetScissor(
+ IN gcoVG Vg,
+ IN gctSIZE_T RectangleCount,
+ IN gcsVG_RECT_PTR Rectangles
+ );
+
+gceSTATUS
+gcoVG_EnableColorTransform(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoVG_SetColorTransform(
+ IN gcoVG Vg,
+ IN gctFLOAT ColorTransform[8]
+ );
+
+gceSTATUS
+gcoVG_SetTileFillColor(
+ IN gcoVG Vg,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+gceSTATUS
+gcoVG_SetSolidPaint(
+ IN gcoVG Vg,
+ IN gctUINT8 Red,
+ IN gctUINT8 Green,
+ IN gctUINT8 Blue,
+ IN gctUINT8 Alpha
+ );
+
+gceSTATUS
+gcoVG_SetLinearPaint(
+ IN gcoVG Vg,
+ IN gctFLOAT Constant,
+ IN gctFLOAT StepX,
+ IN gctFLOAT StepY
+ );
+
+gceSTATUS
+gcoVG_SetRadialPaint(
+ IN gcoVG Vg,
+ IN gctFLOAT LinConstant,
+ IN gctFLOAT LinStepX,
+ IN gctFLOAT LinStepY,
+ IN gctFLOAT RadConstant,
+ IN gctFLOAT RadStepX,
+ IN gctFLOAT RadStepY,
+ IN gctFLOAT RadStepXX,
+ IN gctFLOAT RadStepYY,
+ IN gctFLOAT RadStepXY
+ );
+
+gceSTATUS
+gcoVG_SetPatternPaint(
+ IN gcoVG Vg,
+ IN gctFLOAT UConstant,
+ IN gctFLOAT UStepX,
+ IN gctFLOAT UStepY,
+ IN gctFLOAT VConstant,
+ IN gctFLOAT VStepX,
+ IN gctFLOAT VStepY,
+ IN gctBOOL Linear
+ );
+
+gceSTATUS
+gcoVG_SetColorRamp(
+ IN gcoVG Vg,
+ IN gcoSURF ColorRamp,
+ IN gceTILE_MODE ColorRampSpreadMode
+ );
+
+gceSTATUS
+gcoVG_SetPattern(
+ IN gcoVG Vg,
+ IN gcoSURF Pattern,
+ IN gceTILE_MODE TileMode,
+ IN gceIMAGE_FILTER Filter
+ );
+
+gceSTATUS
+gcoVG_SetImageMode(
+ IN gcoVG Vg,
+ IN gceVG_IMAGE Mode
+ );
+
+gceSTATUS
+gcoVG_SetBlendMode(
+ IN gcoVG Vg,
+ IN gceVG_BLEND Mode
+ );
+
+gceSTATUS
+gcoVG_SetRenderingQuality(
+ IN gcoVG Vg,
+ IN gceRENDER_QUALITY Quality
+ );
+
+gceSTATUS
+gcoVG_SetFillRule(
+ IN gcoVG Vg,
+ IN gceFILL_RULE FillRule
+ );
+
+gceSTATUS
+gcoVG_FinalizePath(
+ IN gcoVG Vg,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+gceSTATUS
+gcoVG_Clear(
+ IN gcoVG Vg,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_DrawPath(
+ IN gcoVG Vg,
+ IN gcsPATH_DATA_PTR PathData,
+ IN gctFLOAT Scale,
+ IN gctFLOAT Bias,
+ IN gctBOOL SoftwareTesselation
+ );
+
+gceSTATUS
+gcoVG_DrawImage(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gcsSIZE_PTR SourceSize,
+ IN gctINT SourceX,
+ IN gctINT SourceY,
+ IN gctINT TargetX,
+ IN gctINT TargetY,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctBOOL Mask
+ );
+
+gceSTATUS
+gcoVG_TesselateImage(
+ IN gcoVG Vg,
+ IN gcoSURF Image,
+ IN gcsVG_RECT_PTR Rectangle,
+ IN gceIMAGE_FILTER Filter,
+ IN gctBOOL Mask,
+ IN gctBOOL SoftwareTesselation
+ );
+
+gceSTATUS
+gcoVG_Blit(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gcsVG_RECT_PTR SrcRect,
+ IN gcsVG_RECT_PTR TrgRect,
+ IN gceIMAGE_FILTER Filter,
+ IN gceVG_BLEND Mode
+ );
+
+gceSTATUS
+gcoVG_ColorMatrix(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN const gctFLOAT * Matrix,
+ IN gceCHANNEL ColorChannels,
+ IN gctBOOL FilterLinear,
+ IN gctBOOL FilterPremultiplied,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_SeparableConvolve(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctINT KernelWidth,
+ IN gctINT KernelHeight,
+ IN gctINT ShiftX,
+ IN gctINT ShiftY,
+ IN const gctINT16 * KernelX,
+ IN const gctINT16 * KernelY,
+ IN gctFLOAT Scale,
+ IN gctFLOAT Bias,
+ IN gceTILE_MODE TilingMode,
+ IN gctFLOAT_PTR FillColor,
+ IN gceCHANNEL ColorChannels,
+ IN gctBOOL FilterLinear,
+ IN gctBOOL FilterPremultiplied,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gcsSIZE_PTR SourceSize,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_GaussianBlur(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctFLOAT StdDeviationX,
+ IN gctFLOAT StdDeviationY,
+ IN gceTILE_MODE TilingMode,
+ IN gctFLOAT_PTR FillColor,
+ IN gceCHANNEL ColorChannels,
+ IN gctBOOL FilterLinear,
+ IN gctBOOL FilterPremultiplied,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gcsSIZE_PTR SourceSize,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_EnableDither(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_vg_h_ */
diff --git a/src/include_eureka/gc_hal_enum.h b/src/include_eureka/gc_hal_enum.h
new file mode 100644
index 0000000..7d67828
--- /dev/null
+++ b/src/include_eureka/gc_hal_enum.h
@@ -0,0 +1,823 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_enum_h_
+#define __gc_hal_enum_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Chip models. */
+typedef enum _gceCHIPMODEL
+{
+ gcv300 = 0x0300,
+ gcv320 = 0x0320,
+ gcv350 = 0x0350,
+ gcv355 = 0x0355,
+ gcv400 = 0x0400,
+ gcv410 = 0x0410,
+ gcv420 = 0x0420,
+ gcv450 = 0x0450,
+ gcv500 = 0x0500,
+ gcv530 = 0x0530,
+ gcv600 = 0x0600,
+ gcv700 = 0x0700,
+ gcv800 = 0x0800,
+ gcv860 = 0x0860,
+ gcv880 = 0x0880,
+ gcv1000 = 0x1000,
+ gcv2000 = 0x2000,
+ gcv2100 = 0x2100,
+ gcv4000 = 0x4000,
+}
+gceCHIPMODEL;
+
+/* Chip features. */
+typedef enum _gceFEATURE
+{
+ gcvFEATURE_PIPE_2D = 0,
+ gcvFEATURE_PIPE_3D,
+ gcvFEATURE_PIPE_VG,
+ gcvFEATURE_DC,
+ gcvFEATURE_HIGH_DYNAMIC_RANGE,
+ gcvFEATURE_MODULE_CG,
+ gcvFEATURE_MIN_AREA,
+ gcvFEATURE_BUFFER_INTERLEAVING,
+ gcvFEATURE_BYTE_WRITE_2D,
+ gcvFEATURE_ENDIANNESS_CONFIG,
+ gcvFEATURE_DUAL_RETURN_BUS,
+ gcvFEATURE_DEBUG_MODE,
+ gcvFEATURE_YUY2_RENDER_TARGET,
+ gcvFEATURE_FRAGMENT_PROCESSOR,
+ gcvFEATURE_2DPE20,
+ gcvFEATURE_FAST_CLEAR,
+ gcvFEATURE_YUV420_TILER,
+ gcvFEATURE_YUY2_AVERAGING,
+ gcvFEATURE_FLIP_Y,
+ gcvFEATURE_EARLY_Z,
+ gcvFEATURE_Z_COMPRESSION,
+ gcvFEATURE_MSAA,
+ gcvFEATURE_SPECIAL_ANTI_ALIASING,
+ gcvFEATURE_SPECIAL_MSAA_LOD,
+ gcvFEATURE_422_TEXTURE_COMPRESSION,
+ gcvFEATURE_DXT_TEXTURE_COMPRESSION,
+ gcvFEATURE_ETC1_TEXTURE_COMPRESSION,
+ gcvFEATURE_CORRECT_TEXTURE_CONVERTER,
+ gcvFEATURE_TEXTURE_8K,
+ gcvFEATURE_SCALER,
+ gcvFEATURE_YUV420_SCALER,
+ gcvFEATURE_SHADER_HAS_W,
+ gcvFEATURE_SHADER_HAS_SIGN,
+ gcvFEATURE_SHADER_HAS_FLOOR,
+ gcvFEATURE_SHADER_HAS_CEIL,
+ gcvFEATURE_SHADER_HAS_SQRT,
+ gcvFEATURE_SHADER_HAS_TRIG,
+ gcvFEATURE_VAA,
+ gcvFEATURE_HZ,
+ gcvFEATURE_CORRECT_STENCIL,
+ gcvFEATURE_VG20,
+ gcvFEATURE_VG_FILTER,
+ gcvFEATURE_VG21,
+ gcvFEATURE_VG_DOUBLE_BUFFER,
+ gcvFEATURE_MC20,
+ gcvFEATURE_SUPER_TILED,
+ gcvFEATURE_2D_FILTERBLIT_PLUS_ALPHABLEND,
+ gcvFEATURE_2D_DITHER,
+ gcvFEATURE_2D_A8_TARGET,
+ gcvFEATURE_2D_FILTERBLIT_FULLROTATION,
+ gcvFEATURE_2D_BITBLIT_FULLROTATION,
+ gcvFEATURE_WIDE_LINE,
+ gcvFEATURE_FC_FLUSH_STALL,
+ gcvFEATURE_FULL_DIRECTFB,
+ gcvFEATURE_HALF_FLOAT_PIPE,
+ gcvFEATURE_LINE_LOOP,
+ gcvFEATURE_2D_YUV_BLIT,
+ gcvFEATURE_2D_TILING,
+ gcvFEATURE_NON_POWER_OF_TWO,
+ gcvFEATURE_3D_TEXTURE,
+ gcvFEATURE_TEXTURE_ARRAY,
+ gcvFEATURE_TILE_FILLER,
+ gcvFEATURE_LOGIC_OP,
+ gcvFEATURE_COMPOSITION,
+ gcvFEATURE_MIXED_STREAMS,
+ gcvFEATURE_2D_MULTI_SOURCE_BLT,
+ gcvFEATURE_END_EVENT,
+ gcvFEATURE_VERTEX_10_10_10_2,
+ gcvFEATURE_TEXTURE_10_10_10_2,
+ gcvFEATURE_TEXTURE_ANISOTROPIC_FILTERING,
+ gcvFEATURE_TEXTURE_FLOAT_HALF_FLOAT,
+ gcvFEATURE_2D_ROTATION_STALL_FIX,
+ gcvFEATURE_2D_MULTI_SOURCE_BLT_EX,
+ gcvFEATURE_BUG_FIXES10,
+ gcvFEATURE_2D_MINOR_TILING,
+ /* Supertiled compressed textures are supported. */
+ gcvFEATURE_TEX_COMPRRESSION_SUPERTILED,
+ gcvFEATURE_FAST_MSAA,
+ gcvFEATURE_BUG_FIXED_INDEXED_TRIANGLE_STRIP,
+ gcvFEATURE_TEXTURE_TILED_READ,
+ gcvFEATURE_DEPTH_BIAS_FIX,
+ gcvFEATURE_RECT_PRIMITIVE,
+ gcvFEATURE_BUG_FIXES11,
+ gcvFEATURE_SUPERTILED_TEXTURE,
+ gcvFEATURE_2D_NO_COLORBRUSH_INDEX8
+}
+gceFEATURE;
+
+/* Chip Power Status. */
+typedef enum _gceCHIPPOWERSTATE
+{
+ gcvPOWER_ON = 0,
+ gcvPOWER_OFF,
+ gcvPOWER_IDLE,
+ gcvPOWER_SUSPEND,
+ gcvPOWER_SUSPEND_ATPOWERON,
+ gcvPOWER_OFF_ATPOWERON,
+ gcvPOWER_IDLE_BROADCAST,
+ gcvPOWER_SUSPEND_BROADCAST,
+ gcvPOWER_OFF_BROADCAST,
+ gcvPOWER_OFF_RECOVERY,
+#if gcdPOWEROFF_TIMEOUT
+ gcvPOWER_OFF_TIMEOUT,
+#endif
+ gcvPOWER_ON_AUTO
+}
+gceCHIPPOWERSTATE;
+
+/* CPU cache operations */
+typedef enum _gceCACHEOPERATION
+{
+ gcvCACHE_CLEAN = 0x01,
+ gcvCACHE_INVALIDATE = 0x02,
+ gcvCACHE_FLUSH = gcvCACHE_CLEAN | gcvCACHE_INVALIDATE,
+ gcvCACHE_MEMORY_BARRIER = 0x04
+}
+gceCACHEOPERATION;
+
+typedef enum _gceVIDMEM_NODE_SHARED_INFO_TYPE
+{
+ gcvVIDMEM_INFO_GENERIC,
+ gcvVIDMEM_INFO_DIRTY_RECTANGLE
+}
+gceVIDMEM_NODE_SHARED_INFO_TYPE;
+
+/* Surface types. */
+typedef enum _gceSURF_TYPE
+{
+ gcvSURF_TYPE_UNKNOWN = 0,
+ gcvSURF_INDEX,
+ gcvSURF_VERTEX,
+ gcvSURF_TEXTURE,
+ gcvSURF_RENDER_TARGET,
+ gcvSURF_DEPTH,
+ gcvSURF_BITMAP,
+ gcvSURF_TILE_STATUS,
+ gcvSURF_IMAGE,
+ gcvSURF_MASK,
+ gcvSURF_SCISSOR,
+ gcvSURF_HIERARCHICAL_DEPTH,
+ gcvSURF_NUM_TYPES, /* Make sure this is the last one! */
+
+ /* Combinations. */
+ gcvSURF_NO_TILE_STATUS = 0x100,
+ gcvSURF_NO_VIDMEM = 0x200, /* Used to allocate surfaces with no underlying vidmem node.
+ In Android, vidmem node is allocated by another process. */
+ gcvSURF_CACHEABLE = 0x400, /* Used to allocate a cacheable surface */
+#if gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST
+ gcvSURF_FLIP = 0x800, /* The Resolve Target the will been flip resolve from RT */
+#endif
+
+ gcvSURF_RENDER_TARGET_NO_TILE_STATUS = gcvSURF_RENDER_TARGET
+ | gcvSURF_NO_TILE_STATUS,
+
+ gcvSURF_DEPTH_NO_TILE_STATUS = gcvSURF_DEPTH
+ | gcvSURF_NO_TILE_STATUS,
+
+ /* Supported surface types with no vidmem node. */
+ gcvSURF_BITMAP_NO_VIDMEM = gcvSURF_BITMAP
+ | gcvSURF_NO_VIDMEM,
+
+ gcvSURF_TEXTURE_NO_VIDMEM = gcvSURF_TEXTURE
+ | gcvSURF_NO_VIDMEM,
+
+ /* Cacheable surface types with no vidmem node. */
+ gcvSURF_CACHEABLE_BITMAP_NO_VIDMEM = gcvSURF_BITMAP_NO_VIDMEM
+ | gcvSURF_CACHEABLE,
+
+ gcvSURF_CACHEABLE_BITMAP = gcvSURF_BITMAP
+ | gcvSURF_CACHEABLE,
+
+#if gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST
+ gcvSURF_FLIP_BITMAP = gcvSURF_BITMAP
+ | gcvSURF_FLIP,
+#endif
+}
+gceSURF_TYPE;
+
+typedef enum _gceSURF_USAGE
+{
+ gcvSURF_USAGE_UNKNOWN,
+ gcvSURF_USAGE_RESOLVE_AFTER_CPU,
+ gcvSURF_USAGE_RESOLVE_AFTER_3D
+}
+gceSURF_USAGE;
+
+typedef enum _gceSURF_COLOR_TYPE
+{
+ gcvSURF_COLOR_UNKNOWN = 0,
+ gcvSURF_COLOR_LINEAR = 0x01,
+ gcvSURF_COLOR_ALPHA_PRE = 0x02,
+}
+gceSURF_COLOR_TYPE;
+
+/* Rotation. */
+typedef enum _gceSURF_ROTATION
+{
+ gcvSURF_0_DEGREE = 0,
+ gcvSURF_90_DEGREE,
+ gcvSURF_180_DEGREE,
+ gcvSURF_270_DEGREE,
+ gcvSURF_FLIP_X,
+ gcvSURF_FLIP_Y,
+}
+gceSURF_ROTATION;
+
+/* Surface formats. */
+typedef enum _gceSURF_FORMAT
+{
+ /* Unknown format. */
+ gcvSURF_UNKNOWN = 0,
+
+ /* Palettized formats. */
+ gcvSURF_INDEX1 = 100,
+ gcvSURF_INDEX4,
+ gcvSURF_INDEX8,
+
+ /* RGB formats. */
+ gcvSURF_A2R2G2B2 = 200,
+ gcvSURF_R3G3B2,
+ gcvSURF_A8R3G3B2,
+ gcvSURF_X4R4G4B4,
+ gcvSURF_A4R4G4B4,
+ gcvSURF_R4G4B4A4,
+ gcvSURF_X1R5G5B5,
+ gcvSURF_A1R5G5B5,
+ gcvSURF_R5G5B5A1,
+ gcvSURF_R5G6B5,
+ gcvSURF_R8G8B8,
+ gcvSURF_X8R8G8B8,
+ gcvSURF_A8R8G8B8,
+ gcvSURF_R8G8B8A8,
+ gcvSURF_G8R8G8B8,
+ gcvSURF_R8G8B8G8,
+ gcvSURF_X2R10G10B10,
+ gcvSURF_A2R10G10B10,
+ gcvSURF_X12R12G12B12,
+ gcvSURF_A12R12G12B12,
+ gcvSURF_X16R16G16B16,
+ gcvSURF_A16R16G16B16,
+ gcvSURF_A32R32G32B32,
+ gcvSURF_R8G8B8X8,
+ gcvSURF_R5G5B5X1,
+ gcvSURF_R4G4B4X4,
+
+ /* BGR formats. */
+ gcvSURF_A4B4G4R4 = 300,
+ gcvSURF_A1B5G5R5,
+ gcvSURF_B5G6R5,
+ gcvSURF_B8G8R8,
+ gcvSURF_B16G16R16,
+ gcvSURF_X8B8G8R8,
+ gcvSURF_A8B8G8R8,
+ gcvSURF_A2B10G10R10,
+ gcvSURF_X16B16G16R16,
+ gcvSURF_A16B16G16R16,
+ gcvSURF_B32G32R32,
+ gcvSURF_X32B32G32R32,
+ gcvSURF_A32B32G32R32,
+ gcvSURF_B4G4R4A4,
+ gcvSURF_B5G5R5A1,
+ gcvSURF_B8G8R8X8,
+ gcvSURF_B8G8R8A8,
+ gcvSURF_X4B4G4R4,
+ gcvSURF_X1B5G5R5,
+ gcvSURF_B4G4R4X4,
+ gcvSURF_B5G5R5X1,
+ gcvSURF_X2B10G10R10,
+
+ /* Compressed formats. */
+ gcvSURF_DXT1 = 400,
+ gcvSURF_DXT2,
+ gcvSURF_DXT3,
+ gcvSURF_DXT4,
+ gcvSURF_DXT5,
+ gcvSURF_CXV8U8,
+ gcvSURF_ETC1,
+
+ /* YUV formats. */
+ gcvSURF_YUY2 = 500,
+ gcvSURF_UYVY,
+ gcvSURF_YV12,
+ gcvSURF_I420,
+ gcvSURF_NV12,
+ gcvSURF_NV21,
+ gcvSURF_NV16,
+ gcvSURF_NV61,
+ gcvSURF_YVYU,
+ gcvSURF_VYUY,
+
+ /* Depth formats. */
+ gcvSURF_D16 = 600,
+ gcvSURF_D24S8,
+ gcvSURF_D32,
+ gcvSURF_D24X8,
+
+ /* Alpha formats. */
+ gcvSURF_A4 = 700,
+ gcvSURF_A8,
+ gcvSURF_A12,
+ gcvSURF_A16,
+ gcvSURF_A32,
+ gcvSURF_A1,
+
+ /* Luminance formats. */
+ gcvSURF_L4 = 800,
+ gcvSURF_L8,
+ gcvSURF_L12,
+ gcvSURF_L16,
+ gcvSURF_L32,
+ gcvSURF_L1,
+
+ /* Alpha/Luminance formats. */
+ gcvSURF_A4L4 = 900,
+ gcvSURF_A2L6,
+ gcvSURF_A8L8,
+ gcvSURF_A4L12,
+ gcvSURF_A12L12,
+ gcvSURF_A16L16,
+
+ /* Bump formats. */
+ gcvSURF_L6V5U5 = 1000,
+ gcvSURF_V8U8,
+ gcvSURF_X8L8V8U8,
+ gcvSURF_Q8W8V8U8,
+ gcvSURF_A2W10V10U10,
+ gcvSURF_V16U16,
+ gcvSURF_Q16W16V16U16,
+
+ /* R/RG/RA formats. */
+ gcvSURF_R8 = 1100,
+ gcvSURF_X8R8,
+ gcvSURF_G8R8,
+ gcvSURF_X8G8R8,
+ gcvSURF_A8R8,
+ gcvSURF_R16,
+ gcvSURF_X16R16,
+ gcvSURF_G16R16,
+ gcvSURF_X16G16R16,
+ gcvSURF_A16R16,
+ gcvSURF_R32,
+ gcvSURF_X32R32,
+ gcvSURF_G32R32,
+ gcvSURF_X32G32R32,
+ gcvSURF_A32R32,
+ gcvSURF_RG16,
+
+ /* Floating point formats. */
+ gcvSURF_R16F = 1200,
+ gcvSURF_X16R16F,
+ gcvSURF_G16R16F,
+ gcvSURF_X16G16R16F,
+ gcvSURF_B16G16R16F,
+ gcvSURF_X16B16G16R16F,
+ gcvSURF_A16B16G16R16F,
+ gcvSURF_R32F,
+ gcvSURF_X32R32F,
+ gcvSURF_G32R32F,
+ gcvSURF_X32G32R32F,
+ gcvSURF_B32G32R32F,
+ gcvSURF_X32B32G32R32F,
+ gcvSURF_A32B32G32R32F,
+ gcvSURF_A16F,
+ gcvSURF_L16F,
+ gcvSURF_A16L16F,
+ gcvSURF_A16R16F,
+ gcvSURF_A32F,
+ gcvSURF_L32F,
+ gcvSURF_A32L32F,
+ gcvSURF_A32R32F,
+
+}
+gceSURF_FORMAT;
+
+/* Pixel swizzle modes. */
+typedef enum _gceSURF_SWIZZLE
+{
+ gcvSURF_NOSWIZZLE = 0,
+ gcvSURF_ARGB,
+ gcvSURF_ABGR,
+ gcvSURF_RGBA,
+ gcvSURF_BGRA
+}
+gceSURF_SWIZZLE;
+
+/* Transparency modes. */
+typedef enum _gceSURF_TRANSPARENCY
+{
+ /* Valid only for PE 1.0 */
+ gcvSURF_OPAQUE = 0,
+ gcvSURF_SOURCE_MATCH,
+ gcvSURF_SOURCE_MASK,
+ gcvSURF_PATTERN_MASK,
+}
+gceSURF_TRANSPARENCY;
+
+/* Surface Alignment. */
+typedef enum _gceSURF_ALIGNMENT
+{
+ gcvSURF_FOUR = 0,
+ gcvSURF_SIXTEEN,
+ gcvSURF_SUPER_TILED,
+ gcvSURF_SPLIT_TILED,
+ gcvSURF_SPLIT_SUPER_TILED,
+}
+gceSURF_ALIGNMENT;
+
+/* Transparency modes. */
+typedef enum _gce2D_TRANSPARENCY
+{
+ /* Valid only for PE 2.0 */
+ gcv2D_OPAQUE = 0,
+ gcv2D_KEYED,
+ gcv2D_MASKED
+}
+gce2D_TRANSPARENCY;
+
+/* Mono packing modes. */
+typedef enum _gceSURF_MONOPACK
+{
+ gcvSURF_PACKED8 = 0,
+ gcvSURF_PACKED16,
+ gcvSURF_PACKED32,
+ gcvSURF_UNPACKED,
+}
+gceSURF_MONOPACK;
+
+/* Blending modes. */
+typedef enum _gceSURF_BLEND_MODE
+{
+ /* Porter-Duff blending modes. */
+ /* Fsrc Fdst */
+ gcvBLEND_CLEAR = 0, /* 0 0 */
+ gcvBLEND_SRC, /* 1 0 */
+ gcvBLEND_DST, /* 0 1 */
+ gcvBLEND_SRC_OVER_DST, /* 1 1 - Asrc */
+ gcvBLEND_DST_OVER_SRC, /* 1 - Adst 1 */
+ gcvBLEND_SRC_IN_DST, /* Adst 0 */
+ gcvBLEND_DST_IN_SRC, /* 0 Asrc */
+ gcvBLEND_SRC_OUT_DST, /* 1 - Adst 0 */
+ gcvBLEND_DST_OUT_SRC, /* 0 1 - Asrc */
+ gcvBLEND_SRC_ATOP_DST, /* Adst 1 - Asrc */
+ gcvBLEND_DST_ATOP_SRC, /* 1 - Adst Asrc */
+ gcvBLEND_SRC_XOR_DST, /* 1 - Adst 1 - Asrc */
+
+ /* Special blending modes. */
+ gcvBLEND_SET, /* DST = 1 */
+ gcvBLEND_SUB /* DST = DST * (1 - SRC) */
+}
+gceSURF_BLEND_MODE;
+
+/* Per-pixel alpha modes. */
+typedef enum _gceSURF_PIXEL_ALPHA_MODE
+{
+ gcvSURF_PIXEL_ALPHA_STRAIGHT = 0,
+ gcvSURF_PIXEL_ALPHA_INVERSED
+}
+gceSURF_PIXEL_ALPHA_MODE;
+
+/* Global alpha modes. */
+typedef enum _gceSURF_GLOBAL_ALPHA_MODE
+{
+ gcvSURF_GLOBAL_ALPHA_OFF = 0,
+ gcvSURF_GLOBAL_ALPHA_ON,
+ gcvSURF_GLOBAL_ALPHA_SCALE
+}
+gceSURF_GLOBAL_ALPHA_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gceSURF_PIXEL_COLOR_MODE
+{
+ gcvSURF_COLOR_STRAIGHT = 0,
+ gcvSURF_COLOR_MULTIPLY
+}
+gceSURF_PIXEL_COLOR_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_PIXEL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_COLOR_MULTIPLY_DISABLE = 0,
+ gcv2D_COLOR_MULTIPLY_ENABLE
+}
+gce2D_PIXEL_COLOR_MULTIPLY_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_GLOBAL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_GLOBAL_COLOR_MULTIPLY_DISABLE = 0,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_ALPHA,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_COLOR
+}
+gce2D_GLOBAL_COLOR_MULTIPLY_MODE;
+
+/* Alpha blending factor modes. */
+typedef enum _gceSURF_BLEND_FACTOR_MODE
+{
+ gcvSURF_BLEND_ZERO = 0,
+ gcvSURF_BLEND_ONE,
+ gcvSURF_BLEND_STRAIGHT,
+ gcvSURF_BLEND_INVERSED,
+ gcvSURF_BLEND_COLOR,
+ gcvSURF_BLEND_COLOR_INVERSED,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED,
+ gcvSURF_BLEND_STRAIGHT_NO_CROSS,
+ gcvSURF_BLEND_INVERSED_NO_CROSS,
+ gcvSURF_BLEND_COLOR_NO_CROSS,
+ gcvSURF_BLEND_COLOR_INVERSED_NO_CROSS,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED_CROSS
+}
+gceSURF_BLEND_FACTOR_MODE;
+
+/* Alpha blending porter duff rules. */
+typedef enum _gce2D_PORTER_DUFF_RULE
+{
+ gcvPD_CLEAR = 0,
+ gcvPD_SRC,
+ gcvPD_SRC_OVER,
+ gcvPD_DST_OVER,
+ gcvPD_SRC_IN,
+ gcvPD_DST_IN,
+ gcvPD_SRC_OUT,
+ gcvPD_DST_OUT,
+ gcvPD_SRC_ATOP,
+ gcvPD_DST_ATOP,
+ gcvPD_ADD,
+ gcvPD_XOR,
+ gcvPD_DST
+}
+gce2D_PORTER_DUFF_RULE;
+
+/* Alpha blending factor modes. */
+typedef enum _gce2D_YUV_COLOR_MODE
+{
+ gcv2D_YUV_601= 0,
+ gcv2D_YUV_709
+}
+gce2D_YUV_COLOR_MODE;
+
+/* 2D Rotation and flipping. */
+typedef enum _gce2D_ORIENTATION
+{
+ gcv2D_0_DEGREE = 0,
+ gcv2D_90_DEGREE,
+ gcv2D_180_DEGREE,
+ gcv2D_270_DEGREE,
+ gcv2D_X_FLIP,
+ gcv2D_Y_FLIP
+}
+gce2D_ORIENTATION;
+
+typedef enum _gce2D_COMMAND
+{
+ gcv2D_CLEAR = 0,
+ gcv2D_LINE,
+ gcv2D_BLT,
+ gcv2D_STRETCH,
+ gcv2D_HOR_FILTER,
+ gcv2D_VER_FILTER,
+ gcv2D_MULTI_SOURCE_BLT,
+}
+gce2D_COMMAND;
+
+#ifndef VIVANTE_NO_3D
+/* Texture functions. */
+typedef enum _gceTEXTURE_FUNCTION
+{
+ gcvTEXTURE_DUMMY = 0,
+ gcvTEXTURE_REPLACE = 0,
+ gcvTEXTURE_MODULATE,
+ gcvTEXTURE_ADD,
+ gcvTEXTURE_ADD_SIGNED,
+ gcvTEXTURE_INTERPOLATE,
+ gcvTEXTURE_SUBTRACT,
+ gcvTEXTURE_DOT3
+}
+gceTEXTURE_FUNCTION;
+
+/* Texture sources. */
+typedef enum _gceTEXTURE_SOURCE
+{
+ gcvCOLOR_FROM_TEXTURE = 0,
+ gcvCOLOR_FROM_CONSTANT_COLOR,
+ gcvCOLOR_FROM_PRIMARY_COLOR,
+ gcvCOLOR_FROM_PREVIOUS_COLOR
+}
+gceTEXTURE_SOURCE;
+
+/* Texture source channels. */
+typedef enum _gceTEXTURE_CHANNEL
+{
+ gcvFROM_COLOR = 0,
+ gcvFROM_ONE_MINUS_COLOR,
+ gcvFROM_ALPHA,
+ gcvFROM_ONE_MINUS_ALPHA
+}
+gceTEXTURE_CHANNEL;
+#endif /* VIVANTE_NO_3D */
+
+/* Filter types. */
+typedef enum _gceFILTER_TYPE
+{
+ gcvFILTER_SYNC = 0,
+ gcvFILTER_BLUR,
+ gcvFILTER_USER
+}
+gceFILTER_TYPE;
+
+/* Filter pass types. */
+typedef enum _gceFILTER_PASS_TYPE
+{
+ gcvFILTER_HOR_PASS = 0,
+ gcvFILTER_VER_PASS
+}
+gceFILTER_PASS_TYPE;
+
+/* Endian hints. */
+typedef enum _gceENDIAN_HINT
+{
+ gcvENDIAN_NO_SWAP = 0,
+ gcvENDIAN_SWAP_WORD,
+ gcvENDIAN_SWAP_DWORD
+}
+gceENDIAN_HINT;
+
+/* Tiling modes. */
+typedef enum _gceTILING
+{
+ gcvLINEAR = 0,
+ gcvTILED,
+ gcvSUPERTILED,
+ gcvMULTI_TILED,
+ gcvMULTI_SUPERTILED,
+ gcvMINORTILED,
+}
+gceTILING;
+
+/* 2D pattern type. */
+typedef enum _gce2D_PATTERN
+{
+ gcv2D_PATTERN_SOLID = 0,
+ gcv2D_PATTERN_MONO,
+ gcv2D_PATTERN_COLOR,
+ gcv2D_PATTERN_INVALID
+}
+gce2D_PATTERN;
+
+/* 2D source type. */
+typedef enum _gce2D_SOURCE
+{
+ gcv2D_SOURCE_MASKED = 0,
+ gcv2D_SOURCE_MONO,
+ gcv2D_SOURCE_COLOR,
+ gcv2D_SOURCE_INVALID
+}
+gce2D_SOURCE;
+
+/* Pipes. */
+typedef enum _gcePIPE_SELECT
+{
+ gcvPIPE_INVALID = ~0,
+ gcvPIPE_3D = 0,
+ gcvPIPE_2D
+}
+gcePIPE_SELECT;
+
+/* Hardware type. */
+typedef enum _gceHARDWARE_TYPE
+{
+ gcvHARDWARE_INVALID = 0x00,
+ gcvHARDWARE_3D = 0x01,
+ gcvHARDWARE_2D = 0x02,
+ gcvHARDWARE_VG = 0x04,
+
+ gcvHARDWARE_3D2D = gcvHARDWARE_3D | gcvHARDWARE_2D
+}
+gceHARDWARE_TYPE;
+
+#define gcdCHIP_COUNT 3
+
+typedef enum _gceMMU_MODE
+{
+ gcvMMU_MODE_1K,
+ gcvMMU_MODE_4K,
+} gceMMU_MODE;
+
+/* User signal command codes. */
+typedef enum _gceUSER_SIGNAL_COMMAND_CODES
+{
+ gcvUSER_SIGNAL_CREATE,
+ gcvUSER_SIGNAL_DESTROY,
+ gcvUSER_SIGNAL_SIGNAL,
+ gcvUSER_SIGNAL_WAIT,
+ gcvUSER_SIGNAL_MAP,
+ gcvUSER_SIGNAL_UNMAP,
+}
+gceUSER_SIGNAL_COMMAND_CODES;
+
+/* Event locations. */
+typedef enum _gceKERNEL_WHERE
+{
+ gcvKERNEL_COMMAND,
+ gcvKERNEL_VERTEX,
+ gcvKERNEL_TRIANGLE,
+ gcvKERNEL_TEXTURE,
+ gcvKERNEL_PIXEL,
+}
+gceKERNEL_WHERE;
+
+#if gcdENABLE_VG
+/* Hardware blocks. */
+typedef enum _gceBLOCK
+{
+ gcvBLOCK_COMMAND,
+ gcvBLOCK_TESSELLATOR,
+ gcvBLOCK_TESSELLATOR2,
+ gcvBLOCK_TESSELLATOR3,
+ gcvBLOCK_RASTER,
+ gcvBLOCK_VG,
+ gcvBLOCK_VG2,
+ gcvBLOCK_VG3,
+ gcvBLOCK_PIXEL,
+
+ /* Number of defined blocks. */
+ gcvBLOCK_COUNT
+}
+gceBLOCK;
+#endif
+
+/* gcdDUMP message type. */
+typedef enum _gceDEBUG_MESSAGE_TYPE
+{
+ gcvMESSAGE_TEXT,
+ gcvMESSAGE_DUMP
+}
+gceDEBUG_MESSAGE_TYPE;
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gckCONTEXT * gckCONTEXT;
+typedef struct _gcoCMDBUF * gcoCMDBUF;
+typedef struct _gcsSTATE_DELTA * gcsSTATE_DELTA_PTR;
+typedef struct _gcsQUEUE * gcsQUEUE_PTR;
+typedef struct _gcoQUEUE * gcoQUEUE;
+typedef struct _gcsHAL_INTERFACE * gcsHAL_INTERFACE_PTR;
+typedef struct _gcs2D_PROFILE * gcs2D_PROFILE_PTR;
+
+#if gcdENABLE_VG
+typedef struct _gcoVGHARDWARE * gcoVGHARDWARE;
+typedef struct _gcoVGBUFFER * gcoVGBUFFER;
+typedef struct _gckVGHARDWARE * gckVGHARDWARE;
+typedef struct _gcsVGCONTEXT * gcsVGCONTEXT_PTR;
+typedef struct _gcsVGCONTEXT_MAP * gcsVGCONTEXT_MAP_PTR;
+typedef struct _gcsVGCMDQUEUE * gcsVGCMDQUEUE_PTR;
+typedef struct _gcsTASK_MASTER_TABLE * gcsTASK_MASTER_TABLE_PTR;
+typedef struct _gckVGKERNEL * gckVGKERNEL;
+typedef void * gctTHREAD;
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_enum_h_ */
diff --git a/src/include_eureka/gc_hal_kernel.h b/src/include_eureka/gc_hal_kernel.h
new file mode 100644
index 0000000..0be0c22
--- /dev/null
+++ b/src/include_eureka/gc_hal_kernel.h
@@ -0,0 +1,789 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_h_
+#define __gc_hal_kernel_h_
+
+#include "gc_hal.h"
+#include "gc_hal_kernel_hardware.h"
+#include "gc_hal_driver.h"
+
+#if gcdENABLE_VG
+#include "gc_hal_kernel_vg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*******************************************************************************
+***** New MMU Defination *******************************************************/
+#define gcdMMU_MTLB_SHIFT 22
+#define gcdMMU_STLB_4K_SHIFT 12
+#define gcdMMU_STLB_64K_SHIFT 16
+
+#define gcdMMU_MTLB_BITS (32 - gcdMMU_MTLB_SHIFT)
+#define gcdMMU_PAGE_4K_BITS gcdMMU_STLB_4K_SHIFT
+#define gcdMMU_STLB_4K_BITS (32 - gcdMMU_MTLB_BITS - gcdMMU_PAGE_4K_BITS)
+#define gcdMMU_PAGE_64K_BITS gcdMMU_STLB_64K_SHIFT
+#define gcdMMU_STLB_64K_BITS (32 - gcdMMU_MTLB_BITS - gcdMMU_PAGE_64K_BITS)
+
+#define gcdMMU_MTLB_ENTRY_NUM (1 << gcdMMU_MTLB_BITS)
+#define gcdMMU_MTLB_SIZE (gcdMMU_MTLB_ENTRY_NUM << 2)
+#define gcdMMU_STLB_4K_ENTRY_NUM (1 << gcdMMU_STLB_4K_BITS)
+#define gcdMMU_STLB_4K_SIZE (gcdMMU_STLB_4K_ENTRY_NUM << 2)
+#define gcdMMU_PAGE_4K_SIZE (1 << gcdMMU_STLB_4K_SHIFT)
+#define gcdMMU_STLB_64K_ENTRY_NUM (1 << gcdMMU_STLB_64K_BITS)
+#define gcdMMU_STLB_64K_SIZE (gcdMMU_STLB_64K_ENTRY_NUM << 2)
+#define gcdMMU_PAGE_64K_SIZE (1 << gcdMMU_STLB_64K_SHIFT)
+
+#define gcdMMU_MTLB_MASK (~((1U << gcdMMU_MTLB_SHIFT)-1))
+#define gcdMMU_STLB_4K_MASK ((~0U << gcdMMU_STLB_4K_SHIFT) ^ gcdMMU_MTLB_MASK)
+#define gcdMMU_PAGE_4K_MASK (gcdMMU_PAGE_4K_SIZE - 1)
+#define gcdMMU_STLB_64K_MASK ((~((1U << gcdMMU_STLB_64K_SHIFT)-1)) ^ gcdMMU_MTLB_MASK)
+#define gcdMMU_PAGE_64K_MASK (gcdMMU_PAGE_64K_SIZE - 1)
+
+/*******************************************************************************
+***** Process Secure Cache ****************************************************/
+
+#define gcdSECURE_CACHE_LRU 1
+#define gcdSECURE_CACHE_LINEAR 2
+#define gcdSECURE_CACHE_HASH 3
+#define gcdSECURE_CACHE_TABLE 4
+
+typedef struct _gcskLOGICAL_CACHE * gcskLOGICAL_CACHE_PTR;
+typedef struct _gcskLOGICAL_CACHE gcskLOGICAL_CACHE;
+struct _gcskLOGICAL_CACHE
+{
+ /* Logical address. */
+ gctPOINTER logical;
+
+ /* DMAable address. */
+ gctUINT32 dma;
+
+#if gcdSECURE_CACHE_METHOD == gcdSECURE_CACHE_HASH
+ /* Pointer to the previous and next hash tables. */
+ gcskLOGICAL_CACHE_PTR nextHash;
+ gcskLOGICAL_CACHE_PTR prevHash;
+#endif
+
+#if gcdSECURE_CACHE_METHOD != gcdSECURE_CACHE_TABLE
+ /* Pointer to the previous and next slot. */
+ gcskLOGICAL_CACHE_PTR next;
+ gcskLOGICAL_CACHE_PTR prev;
+#endif
+
+#if gcdSECURE_CACHE_METHOD == gcdSECURE_CACHE_LINEAR
+ /* Time stamp. */
+ gctUINT64 stamp;
+#endif
+};
+
+typedef struct _gcskSECURE_CACHE * gcskSECURE_CACHE_PTR;
+typedef struct _gcskSECURE_CACHE
+{
+ /* Cache memory. */
+ gcskLOGICAL_CACHE cache[1 + gcdSECURE_CACHE_SLOTS];
+
+ /* Last known index for LINEAR mode. */
+ gcskLOGICAL_CACHE_PTR cacheIndex;
+
+ /* Current free slot for LINEAR mode. */
+ gctUINT32 cacheFree;
+
+ /* Time stamp for LINEAR mode. */
+ gctUINT64 cacheStamp;
+
+#if gcdSECURE_CACHE_METHOD == gcdSECURE_CACHE_HASH
+ /* Hash table for HASH mode. */
+ gcskLOGICAL_CACHE hash[256];
+#endif
+}
+gcskSECURE_CACHE;
+
+/*******************************************************************************
+***** Process Database Management *********************************************/
+
+typedef enum _gceDATABASE_TYPE
+{
+ gcvDB_VIDEO_MEMORY = 1, /* Video memory created. */
+ gcvDB_NON_PAGED, /* Non paged memory. */
+ gcvDB_CONTIGUOUS, /* Contiguous memory. */
+ gcvDB_SIGNAL, /* Signal. */
+ gcvDB_VIDEO_MEMORY_LOCKED, /* Video memory locked. */
+ gcvDB_CONTEXT, /* Context */
+ gcvDB_IDLE, /* GPU idle. */
+ gcvDB_MAP_MEMORY, /* Map memory */
+ gcvDB_SHARED_INFO, /* Private data */
+ gcvDB_MAP_USER_MEMORY /* Map user memory */
+}
+gceDATABASE_TYPE;
+
+typedef struct _gcsDATABASE_RECORD * gcsDATABASE_RECORD_PTR;
+typedef struct _gcsDATABASE_RECORD
+{
+ /* Pointer to kernel. */
+ gckKERNEL kernel;
+
+ /* Pointer to next database record. */
+ gcsDATABASE_RECORD_PTR next;
+
+ /* Type of record. */
+ gceDATABASE_TYPE type;
+
+ /* Data for record. */
+ gctPOINTER data;
+ gctPHYS_ADDR physical;
+ gctSIZE_T bytes;
+}
+gcsDATABASE_RECORD;
+
+typedef struct _gcsDATABASE * gcsDATABASE_PTR;
+typedef struct _gcsDATABASE
+{
+ /* Pointer to next entry is hash list. */
+ gcsDATABASE_PTR next;
+ gctSIZE_T slot;
+
+ /* Process ID. */
+ gctUINT32 processID;
+
+ /* Sizes to query. */
+ gcsDATABASE_COUNTERS vidMem;
+ gcsDATABASE_COUNTERS nonPaged;
+ gcsDATABASE_COUNTERS contiguous;
+ gcsDATABASE_COUNTERS mapUserMemory;
+ gcsDATABASE_COUNTERS mapMemory;
+
+ /* Idle time management. */
+ gctUINT64 lastIdle;
+ gctUINT64 idle;
+
+ /* Pointer to database. */
+ gcsDATABASE_RECORD_PTR list;
+
+#if gcdSECURE_USER
+ /* Secure cache. */
+ gcskSECURE_CACHE cache;
+#endif
+}
+gcsDATABASE;
+
+/* Create a process database that will contain all its allocations. */
+gceSTATUS
+gckKERNEL_CreateProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID
+ );
+
+/* Add a record to the process database. */
+gceSTATUS
+gckKERNEL_AddProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID,
+ IN gceDATABASE_TYPE Type,
+ IN gctPOINTER Pointer,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Size
+ );
+
+/* Remove a record to the process database. */
+gceSTATUS
+gckKERNEL_RemoveProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID,
+ IN gceDATABASE_TYPE Type,
+ IN gctPOINTER Pointer
+ );
+
+/* Destroy the process database. */
+gceSTATUS
+gckKERNEL_DestroyProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID
+ );
+
+/* Find a record to the process database. */
+gceSTATUS
+gckKERNEL_FindProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID,
+ IN gctUINT32 ThreadID,
+ IN gceDATABASE_TYPE Type,
+ IN gctPOINTER Pointer,
+ OUT gcsDATABASE_RECORD_PTR Record
+ );
+
+/* Query the process database. */
+gceSTATUS
+gckKERNEL_QueryProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID,
+ IN gctBOOL LastProcessID,
+ IN gceDATABASE_TYPE Type,
+ OUT gcuDATABASE_INFO * Info
+ );
+
+#if gcdSECURE_USER
+/* Get secure cache from the process database. */
+gceSTATUS
+gckKERNEL_GetProcessDBCache(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID,
+ OUT gcskSECURE_CACHE_PTR * Cache
+ );
+#endif
+
+/*******************************************************************************
+********* Timer Management ****************************************************/
+typedef struct _gcsTIMER * gcsTIMER_PTR;
+typedef struct _gcsTIMER
+{
+ /* Start and Stop time holders. */
+ gctUINT64 startTime;
+ gctUINT64 stopTime;
+}
+gcsTIMER;
+
+/******************************************************************************\
+********************************** Structures **********************************
+\******************************************************************************/
+
+/* gckDB object. */
+struct _gckDB
+{
+ /* Database management. */
+ gcsDATABASE_PTR db[16];
+ gctPOINTER dbMutex;
+ gcsDATABASE_PTR freeDatabase;
+ gcsDATABASE_RECORD_PTR freeRecord;
+ gcsDATABASE_PTR lastDatabase;
+ gctUINT32 lastProcessID;
+ gctUINT64 lastIdle;
+ gctUINT64 idleTime;
+ gctUINT64 lastSlowdown;
+ gctUINT64 lastSlowdownIdle;
+};
+
+/* gckKERNEL object. */
+struct _gckKERNEL
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Core */
+ gceCORE core;
+
+ /* Pointer to gckHARDWARE object. */
+ gckHARDWARE hardware;
+
+ /* Pointer to gckCOMMAND object. */
+ gckCOMMAND command;
+
+ /* Pointer to gckEVENT object. */
+ gckEVENT eventObj;
+
+ /* Pointer to context. */
+ gctPOINTER context;
+
+ /* Pointer to gckMMU object. */
+ gckMMU mmu;
+
+ /* Arom holding number of clients. */
+ gctPOINTER atomClients;
+
+#if VIVANTE_PROFILER
+ /* Enable profiling */
+ gctBOOL profileEnable;
+
+ /* The profile file name */
+ gctCHAR profileFileName[gcdMAX_PROFILE_FILE_NAME];
+#endif
+
+#ifdef QNX_SINGLE_THREADED_DEBUGGING
+ gctPOINTER debugMutex;
+#endif
+
+ /* Database management. */
+ gckDB db;
+ gctBOOL dbCreated;
+
+ /* Pointer to gckEVENT object. */
+ gcsTIMER timers[8];
+ gctUINT32 timeOut;
+
+#if gcdENABLE_VG
+ gckVGKERNEL vg;
+#endif
+};
+
+/* gckCOMMAND object. */
+struct _gckCOMMAND
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to required object. */
+ gckKERNEL kernel;
+ gckOS os;
+
+ /* Number of bytes per page. */
+ gctSIZE_T pageSize;
+
+ /* Current pipe select. */
+ gcePIPE_SELECT pipeSelect;
+
+ /* Command queue running flag. */
+ gctBOOL running;
+
+ /* Idle flag and commit stamp. */
+ gctBOOL idle;
+ gctUINT64 commitStamp;
+
+ /* Command queue mutex. */
+ gctPOINTER mutexQueue;
+
+ /* Context switching mutex. */
+ gctPOINTER mutexContext;
+
+ /* Command queue power semaphore. */
+ gctPOINTER powerSemaphore;
+
+ /* Current command queue. */
+ struct _gcskCOMMAND_QUEUE
+ {
+ gctSIGNAL signal;
+ gctPHYS_ADDR physical;
+ gctPOINTER logical;
+ }
+ queues[gcdCOMMAND_QUEUES];
+
+ gctPHYS_ADDR physical;
+ gctPOINTER logical;
+ gctUINT32 offset;
+ gctINT index;
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+ gctUINT wrapCount;
+#endif
+
+ /* The command queue is new. */
+ gctBOOL newQueue;
+
+ /* Context management. */
+ gckCONTEXT currContext;
+
+ /* Pointer to last WAIT command. */
+ gctPHYS_ADDR waitPhysical;
+ gctPOINTER waitLogical;
+ gctSIZE_T waitSize;
+
+ /* Command buffer alignment. */
+ gctSIZE_T alignment;
+ gctSIZE_T reservedHead;
+ gctSIZE_T reservedTail;
+
+ /* Commit counter. */
+ gctPOINTER atomCommit;
+
+ /* Kernel process ID. */
+ gctUINT32 kernelProcessID;
+
+ /* End Event signal. */
+ gctSIGNAL endEventSignal;
+
+#if gcdSECURE_USER
+ /* Hint array copy buffer. */
+ gctBOOL hintArrayAllocated;
+ gctUINT hintArraySize;
+ gctUINT32_PTR hintArray;
+#endif
+};
+
+typedef struct _gcsEVENT * gcsEVENT_PTR;
+
+/* Structure holding one event to be processed. */
+typedef struct _gcsEVENT
+{
+ /* Pointer to next event in queue. */
+ gcsEVENT_PTR next;
+
+ /* Event information. */
+ gcsHAL_INTERFACE info;
+
+ /* Process ID owning the event. */
+ gctUINT32 processID;
+
+#ifdef __QNXNTO__
+ /* Kernel. */
+ gckKERNEL kernel;
+#endif
+}
+gcsEVENT;
+
+/* Structure holding a list of events to be processed by an interrupt. */
+typedef struct _gcsEVENT_QUEUE * gcsEVENT_QUEUE_PTR;
+typedef struct _gcsEVENT_QUEUE
+{
+ /* Time stamp. */
+ gctUINT64 stamp;
+
+ /* Source of the event. */
+ gceKERNEL_WHERE source;
+
+ /* Pointer to head of event queue. */
+ gcsEVENT_PTR head;
+
+ /* Pointer to tail of event queue. */
+ gcsEVENT_PTR tail;
+
+ /* Next list of events. */
+ gcsEVENT_QUEUE_PTR next;
+}
+gcsEVENT_QUEUE;
+
+/*
+ gcdREPO_LIST_COUNT defines the maximum number of event queues with different
+ hardware module sources that may coexist at the same time. Only two sources
+ are supported - gcvKERNEL_COMMAND and gcvKERNEL_PIXEL. gcvKERNEL_COMMAND
+ source is used only for managing the kernel command queue and is only issued
+ when the current command queue gets full. Since we commit event queues every
+ time we commit command buffers, in the worst case we can have up to three
+ pending event queues:
+ - gcvKERNEL_PIXEL
+ - gcvKERNEL_COMMAND (queue overflow)
+ - gcvKERNEL_PIXEL
+*/
+#define gcdREPO_LIST_COUNT 3
+
+/* gckEVENT object. */
+struct _gckEVENT
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to required objects. */
+ gckOS os;
+ gckKERNEL kernel;
+
+ /* Time stamp. */
+ gctUINT64 stamp;
+ gctUINT64 lastCommitStamp;
+
+ /* Queue mutex. */
+ gctPOINTER eventQueueMutex;
+
+ /* Array of event queues. */
+ gcsEVENT_QUEUE queues[30];
+ gctUINT8 lastID;
+ gctPOINTER freeAtom;
+
+ /* Pending events. */
+#if gcdSMP
+ gctPOINTER pending;
+#else
+ volatile gctUINT pending;
+#endif
+
+ /* List of free event structures and its mutex. */
+ gcsEVENT_PTR freeEventList;
+ gctSIZE_T freeEventCount;
+ gctPOINTER freeEventMutex;
+
+ /* Event queues. */
+ gcsEVENT_QUEUE_PTR queueHead;
+ gcsEVENT_QUEUE_PTR queueTail;
+ gcsEVENT_QUEUE_PTR freeList;
+ gcsEVENT_QUEUE repoList[gcdREPO_LIST_COUNT];
+ gctPOINTER eventListMutex;
+};
+
+/* Free all events belonging to a process. */
+gceSTATUS
+gckEVENT_FreeProcess(
+ IN gckEVENT Event,
+ IN gctUINT32 ProcessID
+ );
+
+gceSTATUS
+gckEVENT_Stop(
+ IN gckEVENT Event,
+ IN gctUINT32 ProcessID,
+ IN gctPHYS_ADDR Handle,
+ IN gctPOINTER Logical,
+ IN gctSIGNAL Signal,
+ IN OUT gctSIZE_T * waitSize
+ );
+
+/* gcuVIDMEM_NODE structure. */
+typedef union _gcuVIDMEM_NODE
+{
+ /* Allocated from gckVIDMEM. */
+ struct _gcsVIDMEM_NODE_VIDMEM
+ {
+ /* Owner of this node. */
+ gckVIDMEM memory;
+
+ /* Dual-linked list of nodes. */
+ gcuVIDMEM_NODE_PTR next;
+ gcuVIDMEM_NODE_PTR prev;
+
+ /* Dual linked list of free nodes. */
+ gcuVIDMEM_NODE_PTR nextFree;
+ gcuVIDMEM_NODE_PTR prevFree;
+
+ /* Information for this node. */
+ gctUINT32 offset;
+ gctSIZE_T bytes;
+ gctUINT32 alignment;
+
+#ifdef __QNXNTO__
+ /* Client/server vaddr (mapped using mmap_join). */
+ gctPOINTER logical;
+#endif
+
+ /* Locked counter. */
+ gctINT32 locked;
+
+ /* Memory pool. */
+ gcePOOL pool;
+ gctUINT32 physical;
+
+ /* Process ID owning this memory. */
+ gctUINT32 processID;
+
+ /* Prevent compositor from freeing until client unlocks. */
+ gctBOOL freePending;
+
+ /* */
+ gcsVIDMEM_NODE_SHARED_INFO sharedInfo;
+
+#if gcdDYNAMIC_MAP_RESERVED_MEMORY && gcdENABLE_VG
+ gctPOINTER kernelVirtual;
+#endif
+ }
+ VidMem;
+
+ /* Allocated from gckOS. */
+ struct _gcsVIDMEM_NODE_VIRTUAL
+ {
+ /* Pointer to gckKERNEL object. */
+ gckKERNEL kernel;
+
+ /* Information for this node. */
+ /* Contiguously allocated? */
+ gctBOOL contiguous;
+ /* mdl record pointer... a kmalloc address. Process agnostic. */
+ gctPHYS_ADDR physical;
+ gctSIZE_T bytes;
+ /* do_mmap_pgoff address... mapped per-process. */
+ gctPOINTER logical;
+
+ /* Page table information. */
+ /* Used only when node is not contiguous */
+ gctSIZE_T pageCount;
+
+ /* Used only when node is not contiguous */
+ gctPOINTER pageTables[gcdCORE_COUNT];
+ /* Pointer to gckKERNEL object who lock this. */
+ gckKERNEL lockKernels[gcdCORE_COUNT];
+ /* Actual physical address */
+ gctUINT32 addresses[gcdCORE_COUNT];
+
+ /* Mutex. */
+ gctPOINTER mutex;
+
+ /* Locked counter. */
+ gctINT32 lockeds[gcdCORE_COUNT];
+
+#ifdef __QNXNTO__
+ /* Single linked list of nodes. */
+ gcuVIDMEM_NODE_PTR next;
+
+ /* Unlock pending flag. */
+ gctBOOL unlockPendings[gcdCORE_COUNT];
+
+ /* Free pending flag. */
+ gctBOOL freePending;
+#endif
+
+ /* Process ID owning this memory. */
+ gctUINT32 processID;
+
+ /* Owner process sets freed to true
+ * when it trys to free a locked
+ * node */
+ gctBOOL freed;
+
+ /* */
+ gcsVIDMEM_NODE_SHARED_INFO sharedInfo;
+ }
+ Virtual;
+}
+gcuVIDMEM_NODE;
+
+/* gckVIDMEM object. */
+struct _gckVIDMEM
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Information for this video memory heap. */
+ gctUINT32 baseAddress;
+ gctSIZE_T bytes;
+ gctSIZE_T freeBytes;
+
+ /* Mapping for each type of surface. */
+ gctINT mapping[gcvSURF_NUM_TYPES];
+
+ /* Sentinel nodes for up to 8 banks. */
+ gcuVIDMEM_NODE sentinel[8];
+
+ /* Allocation threshold. */
+ gctSIZE_T threshold;
+
+ /* The heap mutex. */
+ gctPOINTER mutex;
+
+#if gcdUSE_VIDMEM_PER_PID
+ /* The Pid this VidMem belongs to. */
+ gctUINT32 pid;
+
+ struct _gckVIDMEM* next;
+#endif
+};
+
+/* gckMMU object. */
+struct _gckMMU
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Pointer to gckHARDWARE object. */
+ gckHARDWARE hardware;
+
+ /* The page table mutex. */
+ gctPOINTER pageTableMutex;
+
+ /* Page table information. */
+ gctSIZE_T pageTableSize;
+ gctPHYS_ADDR pageTablePhysical;
+ gctUINT32_PTR pageTableLogical;
+ gctUINT32 pageTableEntries;
+
+ /* Master TLB information. */
+ gctSIZE_T mtlbSize;
+ gctPHYS_ADDR mtlbPhysical;
+ gctUINT32_PTR mtlbLogical;
+ gctUINT32 mtlbEntries;
+
+ /* Free entries. */
+ gctUINT32 heapList;
+ gctBOOL freeNodes;
+
+ gctPOINTER staticSTLB;
+ gctBOOL enabled;
+
+ gctUINT32 dynamicMappingStart;
+
+#ifdef __QNXNTO__
+ /* Single linked list of all allocated nodes. */
+ gctPOINTER nodeMutex;
+ gcuVIDMEM_NODE_PTR nodeList;
+#endif
+};
+
+gceSTATUS
+gckKERNEL_AttachProcess(
+ IN gckKERNEL Kernel,
+ IN gctBOOL Attach
+ );
+
+gceSTATUS
+gckKERNEL_AttachProcessEx(
+ IN gckKERNEL Kernel,
+ IN gctBOOL Attach,
+ IN gctUINT32 PID
+ );
+
+#if gcdSECURE_USER
+gceSTATUS
+gckKERNEL_MapLogicalToPhysical(
+ IN gckKERNEL Kernel,
+ IN gcskSECURE_CACHE_PTR Cache,
+ IN OUT gctPOINTER * Data
+ );
+
+gceSTATUS
+gckKERNEL_FlushTranslationCache(
+ IN gckKERNEL Kernel,
+ IN gcskSECURE_CACHE_PTR Cache,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+#endif
+
+gceSTATUS
+gckHARDWARE_QueryIdle(
+ IN gckHARDWARE Hardware,
+ OUT gctBOOL_PTR IsIdle
+ );
+
+/******************************************************************************\
+******************************* gckCONTEXT Object *******************************
+\******************************************************************************/
+
+gceSTATUS
+gckCONTEXT_Construct(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 ProcessID,
+ OUT gckCONTEXT * Context
+ );
+
+gceSTATUS
+gckCONTEXT_Destroy(
+ IN gckCONTEXT Context
+ );
+
+gceSTATUS
+gckCONTEXT_Update(
+ IN gckCONTEXT Context,
+ IN gctUINT32 ProcessID,
+ IN gcsSTATE_DELTA_PTR StateDelta
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_h_ */
diff --git a/src/include_eureka/gc_hal_kernel_buffer.h b/src/include_eureka/gc_hal_kernel_buffer.h
new file mode 100644
index 0000000..24edc0b
--- /dev/null
+++ b/src/include_eureka/gc_hal_kernel_buffer.h
@@ -0,0 +1,192 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_buffer_h_
+#define __gc_hal_kernel_buffer_h_
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+************************ Command Buffer and Event Objects **********************
+\******************************************************************************/
+
+/* The number of context buffers per user. */
+#define gcdCONTEXT_BUFFER_COUNT 2
+
+/* State delta record. */
+typedef struct _gcsSTATE_DELTA_RECORD * gcsSTATE_DELTA_RECORD_PTR;
+typedef struct _gcsSTATE_DELTA_RECORD
+{
+ /* State address. */
+ gctUINT address;
+
+ /* State mask. */
+ gctUINT32 mask;
+
+ /* State data. */
+ gctUINT32 data;
+}
+gcsSTATE_DELTA_RECORD;
+
+/* State delta. */
+typedef struct _gcsSTATE_DELTA
+{
+ /* For debugging: the number of delta in the order of creation. */
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+ gctUINT num;
+#endif
+
+ /* For dumping. */
+#if gcdDUMP
+ gcoOS os;
+#endif
+
+ /* Main state delta ID. Every time state delta structure gets reinitialized,
+ main ID is incremented. If main state ID overflows, all map entry IDs get
+ reinitialized to make sure there is no potential erroneous match after
+ the overflow.*/
+ gctUINT id;
+
+ /* The number of contexts pending modification by the delta. */
+ gctINT refCount;
+
+ /* Vertex element count for the delta buffer. */
+ gctUINT elementCount;
+
+ /* Number of states currently stored in the record array. */
+ gctUINT recordCount;
+
+ /* Record array; holds all modified states. */
+ gcsSTATE_DELTA_RECORD_PTR recordArray;
+
+ /* Map entry ID is used for map entry validation. If map entry ID does not
+ match the main state delta ID, the entry and the corresponding state are
+ considered not in use. */
+ gctUINT_PTR mapEntryID;
+ gctUINT mapEntryIDSize;
+
+ /* If the map entry ID matches the main state delta ID, index points to
+ the state record in the record array. */
+ gctUINT_PTR mapEntryIndex;
+
+ /* Previous and next state deltas. */
+ gcsSTATE_DELTA_PTR prev;
+ gcsSTATE_DELTA_PTR next;
+}
+gcsSTATE_DELTA;
+
+/* Command buffer object. */
+struct _gcoCMDBUF
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Command buffer entry and exit pipes. */
+ gcePIPE_SELECT entryPipe;
+ gcePIPE_SELECT exitPipe;
+
+ /* Feature usage flags. */
+ gctBOOL using2D;
+ gctBOOL using3D;
+ gctBOOL usingFilterBlit;
+ gctBOOL usingPalette;
+
+ /* Physical address of command buffer. */
+ gctPHYS_ADDR physical;
+
+ /* Logical address of command buffer. */
+ gctPOINTER logical;
+
+ /* Number of bytes in command buffer. */
+ gctSIZE_T bytes;
+
+ /* Start offset into the command buffer. */
+ gctUINT32 startOffset;
+
+ /* Current offset into the command buffer. */
+ gctUINT32 offset;
+
+ /* Number of free bytes in command buffer. */
+ gctSIZE_T free;
+
+ /* Location of the last reserved area. */
+ gctPOINTER lastReserve;
+ gctUINT lastOffset;
+
+#if gcdSECURE_USER
+ /* Hint array for the current command buffer. */
+ gctUINT hintArraySize;
+ gctUINT32_PTR hintArray;
+ gctUINT32_PTR hintArrayTail;
+#endif
+
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+ /* Last load state command location and hardware address. */
+ gctUINT32_PTR lastLoadStatePtr;
+ gctUINT32 lastLoadStateAddress;
+ gctUINT32 lastLoadStateCount;
+#endif
+};
+
+typedef struct _gcsQUEUE
+{
+ /* Pointer to next gcsQUEUE structure. */
+ gcsQUEUE_PTR next;
+
+ /* Event information. */
+ gcsHAL_INTERFACE iface;
+}
+gcsQUEUE;
+
+/* Event queue. */
+struct _gcoQUEUE
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to current event queue. */
+ gcsQUEUE_PTR head;
+ gcsQUEUE_PTR tail;
+
+#ifdef __QNXNTO__
+ /* Buffer for records. */
+ gcsQUEUE_PTR records;
+ gctUINT32 freeBytes;
+ gctUINT32 offset;
+#else
+ /* List of free records. */
+ gcsQUEUE_PTR freeList;
+#endif
+ #define gcdIN_QUEUE_RECORD_LIMIT 16
+ /* Number of records currently in queue */
+ gctUINT32 recordCount;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_buffer_h_ */
diff --git a/src/include_eureka/gc_hal_kernel_context.h b/src/include_eureka/gc_hal_kernel_context.h
new file mode 100644
index 0000000..a5030de
--- /dev/null
+++ b/src/include_eureka/gc_hal_kernel_context.h
@@ -0,0 +1,146 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_context_h_
+#define __gc_hal_kernel_context_h_
+
+#include "gc_hal_kernel_buffer.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Maps state locations within the context buffer. */
+typedef struct _gcsSTATE_MAP * gcsSTATE_MAP_PTR;
+typedef struct _gcsSTATE_MAP
+{
+ /* Index of the state in the context buffer. */
+ gctUINT index;
+
+ /* State mask. */
+ gctUINT32 mask;
+}
+gcsSTATE_MAP;
+
+/* Context buffer. */
+typedef struct _gcsCONTEXT * gcsCONTEXT_PTR;
+typedef struct _gcsCONTEXT
+{
+ /* For debugging: the number of context buffer in the order of creation. */
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+ gctUINT num;
+#endif
+
+ /* Pointer to gckEVENT object. */
+ gckEVENT eventObj;
+
+ /* Context busy signal. */
+ gctSIGNAL signal;
+
+ /* Physical address of the context buffer. */
+ gctPHYS_ADDR physical;
+
+ /* Logical address of the context buffer. */
+ gctUINT32_PTR logical;
+
+ /* Pointer to the LINK commands. */
+ gctPOINTER link2D;
+ gctPOINTER link3D;
+
+ /* The number of pending state deltas. */
+ gctUINT deltaCount;
+
+ /* Pointer to the first delta to be applied. */
+ gcsSTATE_DELTA_PTR delta;
+
+ /* Next context buffer. */
+ gcsCONTEXT_PTR next;
+}
+gcsCONTEXT;
+
+/* gckCONTEXT structure that hold the current context. */
+struct _gckCONTEXT
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Pointer to gckHARDWARE object. */
+ gckHARDWARE hardware;
+
+ /* Command buffer alignment. */
+ gctSIZE_T alignment;
+ gctSIZE_T reservedHead;
+ gctSIZE_T reservedTail;
+
+ /* Context buffer metrics. */
+ gctSIZE_T stateCount;
+ gctSIZE_T totalSize;
+ gctSIZE_T bufferSize;
+ gctUINT32 linkIndex2D;
+ gctUINT32 linkIndex3D;
+ gctUINT32 linkIndexXD;
+ gctUINT32 entryOffset3D;
+ gctUINT32 entryOffsetXDFrom2D;
+ gctUINT32 entryOffsetXDFrom3D;
+
+ /* Dirty flags. */
+ gctBOOL dirty;
+ gctBOOL dirty2D;
+ gctBOOL dirty3D;
+ gcsCONTEXT_PTR dirtyBuffer;
+
+ /* State mapping. */
+ gcsSTATE_MAP_PTR map;
+
+ /* List of context buffers. */
+ gcsCONTEXT_PTR buffer;
+
+ /* A copy of the user record array. */
+ gctUINT recordArraySize;
+ gcsSTATE_DELTA_RECORD_PTR recordArray;
+
+ /* Requested pipe select for context. */
+ gcePIPE_SELECT entryPipe;
+ gcePIPE_SELECT exitPipe;
+
+ /* Variables used for building state buffer. */
+ gctUINT32 lastAddress;
+ gctSIZE_T lastSize;
+ gctUINT32 lastIndex;
+ gctBOOL lastFixed;
+
+ /* Hint array. */
+#if gcdSECURE_USER
+ gctBOOL_PTR hint;
+#endif
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_context_h_ */
+
diff --git a/src/include_eureka/gc_hal_kernel_debug.h b/src/include_eureka/gc_hal_kernel_debug.h
new file mode 100644
index 0000000..5bbc893
--- /dev/null
+++ b/src/include_eureka/gc_hal_kernel_debug.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_debug_h_
+#define __gc_hal_kernel_debug_h_
+
+#include <gc_hal_kernel_linux.h>
+#include <linux/spinlock.h>
+#include <linux/time.h>
+#include <stdarg.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** OS-dependent Macros *****************************
+\******************************************************************************/
+
+typedef va_list gctARGUMENTS;
+
+#define gcmkARGUMENTS_START(Arguments, Pointer) \
+ va_start(Arguments, Pointer)
+
+#define gcmkARGUMENTS_END(Arguments) \
+ va_end(Arguments)
+
+#define gcmkDECLARE_LOCK(__spinLock__) \
+ static DEFINE_SPINLOCK(__spinLock__);
+
+#define gcmkLOCKSECTION(__spinLock__) \
+ spin_lock(&__spinLock__)
+
+#define gcmkUNLOCKSECTION(__spinLock__) \
+ spin_unlock(&__spinLock__)
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+# define gcmkGETPROCESSID() \
+ task_tgid_vnr(current)
+#else
+# define gcmkGETPROCESSID() \
+ current->tgid
+#endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+# define gcmkGETTHREADID() \
+ task_pid_vnr(current)
+#else
+# define gcmkGETTHREADID() \
+ current->pid
+#endif
+
+#define gcmkOUTPUT_STRING(String) \
+ printk(String); \
+ touch_softlockup_watchdog()
+
+#define gcmkSPRINTF(Destination, Size, Message, Value) \
+ snprintf(Destination, Size, Message, Value)
+
+#define gcmkSPRINTF2(Destination, Size, Message, Value1, Value2) \
+ snprintf(Destination, Size, Message, Value1, Value2)
+
+#define gcmkSPRINTF3(Destination, Size, Message, Value1, Value2, Value3) \
+ snprintf(Destination, Size, Message, Value1, Value2, Value3)
+
+#define gcmkVSPRINTF(Destination, Size, Message, Arguments) \
+ vsnprintf(Destination, Size, Message, *(va_list *) &Arguments)
+
+#define gcmkSTRCAT(Destination, Size, String) \
+ strncat(Destination, String, Size)
+
+/* If not zero, forces data alignment in the variable argument list
+ by its individual size. */
+#define gcdALIGNBYSIZE 1
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_debug_h_ */
diff --git a/src/include_eureka/gc_hal_kernel_device.h b/src/include_eureka/gc_hal_kernel_device.h
new file mode 100644
index 0000000..4f49134
--- /dev/null
+++ b/src/include_eureka/gc_hal_kernel_device.h
@@ -0,0 +1,170 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_device_h_
+#define __gc_hal_kernel_device_h_
+
+#ifdef ANDROID
+#define gcdkREPORT_VIDMEM_LEAK 0
+#else
+#define gcdkREPORT_VIDMEM_LEAK 1
+#endif
+
+/******************************************************************************\
+******************************* gckGALDEVICE Structure *******************************
+\******************************************************************************/
+
+typedef struct _gckGALDEVICE
+{
+ /* Objects. */
+ gckOS os;
+ gckKERNEL kernels[gcdCORE_COUNT];
+
+ /* Attributes. */
+ gctSIZE_T internalSize;
+ gctPHYS_ADDR internalPhysical;
+ gctPOINTER internalLogical;
+ gckVIDMEM internalVidMem;
+ gctSIZE_T externalSize;
+ gctPHYS_ADDR externalPhysical;
+ gctPOINTER externalLogical;
+ gckVIDMEM externalVidMem;
+ gckVIDMEM contiguousVidMem;
+ gctPOINTER contiguousBase;
+ gctPHYS_ADDR contiguousPhysical;
+ gctSIZE_T contiguousSize;
+ gctBOOL contiguousMapped;
+ gctPOINTER contiguousMappedUser;
+ gctSIZE_T systemMemorySize;
+ gctUINT32 systemMemoryBaseAddress;
+ gctPOINTER registerBases[gcdCORE_COUNT];
+ gctSIZE_T registerSizes[gcdCORE_COUNT];
+ gctUINT32 baseAddress;
+ gctUINT32 requestedRegisterMemBases[gcdCORE_COUNT];
+ gctSIZE_T requestedRegisterMemSizes[gcdCORE_COUNT];
+ gctUINT32 requestedContiguousBase;
+ gctSIZE_T requestedContiguousSize;
+
+ /* IRQ management. */
+ gctINT irqLines[gcdCORE_COUNT];
+ gctBOOL isrInitializeds[gcdCORE_COUNT];
+ gctBOOL dataReadys[gcdCORE_COUNT];
+
+ /* Thread management. */
+ struct task_struct *threadCtxts[gcdCORE_COUNT];
+ struct semaphore semas[gcdCORE_COUNT];
+ gctBOOL threadInitializeds[gcdCORE_COUNT];
+ gctBOOL killThread;
+
+ /* Signal management. */
+ gctINT signal;
+
+ /* Core mapping */
+ gceCORE coreMapping[8];
+
+ /* States before suspend. */
+ gceCHIPPOWERSTATE statesStored[gcdCORE_COUNT];
+
+#if gcdPOWEROFF_TIMEOUT
+ struct task_struct *pmThreadCtxts[gcdCORE_COUNT];
+ gctBOOL pmThreadInitializeds[gcdCORE_COUNT];
+#endif
+}
+* gckGALDEVICE;
+
+typedef struct _gcsHAL_PRIVATE_DATA
+{
+ gckGALDEVICE device;
+ gctPOINTER mappedMemory;
+ gctPOINTER contiguousLogical;
+ /* The process opening the device may not be the same as the one that closes it. */
+ gctUINT32 pidOpen;
+}
+gcsHAL_PRIVATE_DATA, * gcsHAL_PRIVATE_DATA_PTR;
+
+gceSTATUS gckGALDEVICE_Setup_ISR(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Setup_ISR_2D(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Setup_ISR_VG(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Release_ISR(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Release_ISR_2D(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Release_ISR_VG(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Start_Threads(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Stop_Threads(
+ gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Start(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Stop(
+ gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Construct(
+ IN gctINT IrqLine,
+ IN gctUINT32 RegisterMemBase,
+ IN gctSIZE_T RegisterMemSize,
+ IN gctINT IrqLine2D,
+ IN gctUINT32 RegisterMemBase2D,
+ IN gctSIZE_T RegisterMemSize2D,
+ IN gctINT IrqLineVG,
+ IN gctUINT32 RegisterMemBaseVG,
+ IN gctSIZE_T RegisterMemSizeVG,
+ IN gctUINT32 ContiguousBase,
+ IN gctSIZE_T ContiguousSize,
+ IN gctSIZE_T BankSize,
+ IN gctINT FastClear,
+ IN gctINT Compression,
+ IN gctUINT32 PhysBaseAddr,
+ IN gctUINT32 PhysSize,
+ IN gctINT Signal,
+ OUT gckGALDEVICE *Device
+ );
+
+gceSTATUS gckGALDEVICE_Destroy(
+ IN gckGALDEVICE Device
+ );
+
+#endif /* __gc_hal_kernel_device_h_ */
diff --git a/src/include_eureka/gc_hal_kernel_hardware.h b/src/include_eureka/gc_hal_kernel_hardware.h
new file mode 100644
index 0000000..30e1001
--- /dev/null
+++ b/src/include_eureka/gc_hal_kernel_hardware.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_hardware_h_
+#define __gc_hal_kernel_hardware_h_
+
+#if gcdENABLE_VG
+#include "gc_hal_kernel_hardware_vg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* gckHARDWARE object. */
+struct _gckHARDWARE
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gctKERNEL object. */
+ gckKERNEL kernel;
+
+ /* Pointer to gctOS object. */
+ gckOS os;
+
+ /* Core */
+ gceCORE core;
+
+ /* Chip characteristics. */
+ gcsHAL_QUERY_CHIP_IDENTITY identity;
+ gctBOOL allowFastClear;
+ gctBOOL allowCompression;
+ gctUINT32 powerBaseAddress;
+ gctBOOL extraEventStates;
+
+ /* Big endian */
+ gctBOOL bigEndian;
+
+ /* Chip status */
+ gctPOINTER powerMutex;
+ gctUINT32 powerProcess;
+ gctUINT32 powerThread;
+ gceCHIPPOWERSTATE chipPowerState;
+ gctUINT32 lastWaitLink;
+ gctBOOL clockState;
+ gctBOOL powerState;
+ gctPOINTER globalSemaphore;
+
+ gctISRMANAGERFUNC startIsr;
+ gctISRMANAGERFUNC stopIsr;
+ gctPOINTER isrContext;
+
+ gctUINT32 mmuVersion;
+
+ /* Type */
+ gceHARDWARE_TYPE type;
+
+#if gcdPOWEROFF_TIMEOUT
+ gctUINT32 powerOffTime;
+ gctPOINTER powerOffSema;
+ gctUINT32 powerOffTimeout;
+#endif
+
+ gctPOINTER pageTableDirty;
+};
+
+gceSTATUS
+gckHARDWARE_GetBaseAddress(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+gceSTATUS
+gckHARDWARE_NeedBaseAddress(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 State,
+ OUT gctBOOL_PTR NeedBase
+ );
+
+gceSTATUS
+gckHARDWARE_GetFrameInfo(
+ IN gckHARDWARE Hardware,
+ OUT gcsHAL_FRAME_INFO * FrameInfo
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_hardware_h_ */
+
diff --git a/src/include_eureka/gc_hal_kernel_linux.h b/src/include_eureka/gc_hal_kernel_linux.h
new file mode 100644
index 0000000..7e6bd09
--- /dev/null
+++ b/src/include_eureka/gc_hal_kernel_linux.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_linux_h_
+#define __gc_hal_kernel_linux_h_
+
+#include <linux/version.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/mm.h>
+#include <linux/sched.h>
+#include <linux/signal.h>
+#ifdef FLAREON
+# include <asm/arch-realview/dove_gpio_irq.h>
+#endif
+#include <linux/interrupt.h>
+#include <linux/vmalloc.h>
+#include <linux/dma-mapping.h>
+#include <linux/kthread.h>
+
+#ifdef MODVERSIONS
+# include <linux/modversions.h>
+#endif
+#include <asm/io.h>
+#include <asm/uaccess.h>
+
+#if ENABLE_GPU_CLOCK_BY_DRIVER && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
+#include <linux/clk.h>
+#endif
+
+#define NTSTRSAFE_NO_CCH_FUNCTIONS
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_kernel.h"
+#include "gc_hal_kernel_device.h"
+#include "gc_hal_kernel_os.h"
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+#define FIND_TASK_BY_PID(x) pid_task(find_vpid(x), PIDTYPE_PID)
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
+#define FIND_TASK_BY_PID(x) find_task_by_vpid(x)
+#else
+#define FIND_TASK_BY_PID(x) find_task_by_pid(x)
+#endif
+
+#define _WIDE(string) L##string
+#define WIDE(string) _WIDE(string)
+
+#define countof(a) (sizeof(a) / sizeof(a[0]))
+
+//####modified for marvell-bg2
+#ifndef DRV_NAME
+#define DRV_NAME "gal3d"
+#endif
+//#define DRV_NAME "galcore"
+//####end for marvell-bg2
+
+#define GetPageCount(size, offset) ((((size) + ((offset) & ~PAGE_CACHE_MASK)) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT)
+
+static inline gctINT
+GetOrder(
+ IN gctINT numPages
+ )
+{
+ gctINT order = 0;
+
+ while ((1 << order) < numPages) order++;
+
+ return order;
+}
+
+#endif /* __gc_hal_kernel_linux_h_ */
diff --git a/src/include_eureka/gc_hal_kernel_os.h b/src/include_eureka/gc_hal_kernel_os.h
new file mode 100644
index 0000000..021e77f
--- /dev/null
+++ b/src/include_eureka/gc_hal_kernel_os.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_os_h_
+#define __gc_hal_kernel_os_h_
+
+typedef struct _LINUX_MDL_MAP
+{
+ gctINT pid;
+ gctPOINTER vmaAddr;
+ struct vm_area_struct * vma;
+ struct _LINUX_MDL_MAP * next;
+}
+LINUX_MDL_MAP;
+
+typedef struct _LINUX_MDL_MAP * PLINUX_MDL_MAP;
+
+typedef struct _LINUX_MDL
+{
+ gctINT pid;
+ char * addr;
+
+ union _pages
+ {
+ /* Pointer to a array of pages. */
+ struct page * contiguousPages;
+ /* Pointer to a array of pointers to page. */
+ struct page ** nonContiguousPages;
+ }
+ u;
+
+#ifdef NO_DMA_COHERENT
+ gctPOINTER kaddr;
+#endif /* NO_DMA_COHERENT */
+
+ gctINT numPages;
+ gctINT pagedMem;
+ gctBOOL contiguous;
+ dma_addr_t dmaHandle;
+ PLINUX_MDL_MAP maps;
+ struct _LINUX_MDL * prev;
+ struct _LINUX_MDL * next;
+}
+LINUX_MDL, *PLINUX_MDL;
+
+extern PLINUX_MDL_MAP
+FindMdlMap(
+ IN PLINUX_MDL Mdl,
+ IN gctINT PID
+ );
+
+typedef struct _DRIVER_ARGS
+{
+ gctPOINTER InputBuffer;
+ gctUINT32 InputBufferSize;
+ gctPOINTER OutputBuffer;
+ gctUINT32 OutputBufferSize;
+}
+DRIVER_ARGS;
+
+/* Cleanup the signal table. */
+gceSTATUS
+gckOS_CleanProcessSignal(
+ gckOS Os,
+ gctHANDLE Process
+ );
+
+#endif /* __gc_hal_kernel_os_h_ */
diff --git a/src/include_eureka/gc_hal_kernel_precomp.h b/src/include_eureka/gc_hal_kernel_precomp.h
new file mode 100644
index 0000000..004e6bd
--- /dev/null
+++ b/src/include_eureka/gc_hal_kernel_precomp.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_precomp_h_
+#define __gc_hal_kernel_precomp_h_
+
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_kernel.h"
+
+#endif /* __gc_hal_kernel_precomp_h_ */
diff --git a/src/include_eureka/gc_hal_kernel_vg.h b/src/include_eureka/gc_hal_kernel_vg.h
new file mode 100644
index 0000000..04fccf4
--- /dev/null
+++ b/src/include_eureka/gc_hal_kernel_vg.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+
+
+#ifndef __gc_hal_kernel_vg_h_
+#define __gc_hal_kernel_vg_h_
+
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_kernel_hardware.h"
+
+/******************************************************************************\
+********************************** Structures **********************************
+\******************************************************************************/
+
+
+/* gckKERNEL object. */
+struct _gckVGKERNEL
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Pointer to gckHARDWARE object. */
+ gckVGHARDWARE hardware;
+
+ /* Pointer to gckINTERRUPT object. */
+ gckVGINTERRUPT interrupt;
+
+ /* Pointer to gckCOMMAND object. */
+ gckVGCOMMAND command;
+
+ /* Pointer to context. */
+ gctPOINTER context;
+
+ /* Pointer to gckMMU object. */
+ gckVGMMU mmu;
+
+ gckKERNEL kernel;
+};
+
+/* gckMMU object. */
+struct _gckVGMMU
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Pointer to gckHARDWARE object. */
+ gckVGHARDWARE hardware;
+
+ /* The page table mutex. */
+ gctPOINTER mutex;
+
+ /* Page table information. */
+ gctSIZE_T pageTableSize;
+ gctPHYS_ADDR pageTablePhysical;
+ gctPOINTER pageTableLogical;
+
+ /* Allocation index. */
+ gctUINT32 entryCount;
+ gctUINT32 entry;
+};
+
+#endif /* __gc_hal_kernel_h_ */
diff --git a/src/include_eureka/gc_hal_md5.h b/src/include_eureka/gc_hal_md5.h
new file mode 100644
index 0000000..bc56d95
--- /dev/null
+++ b/src/include_eureka/gc_hal_md5.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+/*
+ Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved.
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ L. Peter Deutsch
+ ghost@aladdin.com
+
+ */
+/* $Id: gc_hal_md5.h,v 1.1.4.1 2012/02/08 23:31:39 semih.demirer Exp $ */
+/*
+ Independent implementation of MD5 (RFC 1321).
+
+ This code implements the MD5 Algorithm defined in RFC 1321, whose
+ text is available at
+ http://www.ietf.org/rfc/rfc1321.txt
+ The code is derived from the text of the RFC, including the test suite
+ (section A.5) but excluding the rest of Appendix A. It does not include
+ any code or documentation that is identified in the RFC as being
+ copyrighted.
+
+ The original and principal author of md5.h is L. Peter Deutsch
+ <ghost@aladdin.com>. Other authors are noted in the change history
+ that follows (in reverse chronological order):
+
+ 2002-04-13 lpd Removed support for non-ANSI compilers; removed
+ references to Ghostscript; clarified derivation from RFC 1321;
+ now handles byte order either statically or dynamically.
+ 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
+ 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
+ added conditionalization for C++ compilation from Martin
+ Purschke <purschke@bnl.gov>.
+ 1999-05-03 lpd Original version.
+ */
+
+
+#ifndef __gc_hal_md5_h_
+#define __gc_hal_md5_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This package supports both compile-time and run-time determination of CPU
+ * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
+ * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is
+ * defined as non-zero, the code will be compiled to run only on big-endian
+ * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to
+ * run on either big- or little-endian CPUs, but will run slightly less
+ * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.
+ */
+
+typedef unsigned char gctMD5_Byte; /* 8-bit byte */
+typedef unsigned int gctMD5_Word; /* 32-bit word */
+
+/* Define the state of the MD5 Algorithm. */
+typedef struct _gcsMD5_State {
+ gctMD5_Word count[2]; /* message length in bits, lsw first */
+ gctMD5_Word abcd[4]; /* digest buffer */
+ gctMD5_Byte buf[64]; /* accumulate block */
+} gcsMD5_State;
+
+/* Initialize the algorithm. */
+void gcoMD5_Init(gcsMD5_State *pms);
+
+/* Append a string to the message. */
+void gcoMD5_Append(gcsMD5_State *pms, const gctMD5_Byte *data, int nbytes);
+
+/* Finish the message and return the digest. */
+void gcoMD5_Finish(gcsMD5_State *pms, gctMD5_Byte digest[16]);
+
+#ifdef __cplusplus
+} /* end extern "C" */
+#endif
+
+#endif /* md5_INCLUDED */
diff --git a/src/include_eureka/gc_hal_mem.h b/src/include_eureka/gc_hal_mem.h
new file mode 100644
index 0000000..e64f7e7
--- /dev/null
+++ b/src/include_eureka/gc_hal_mem.h
@@ -0,0 +1,532 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+/*
+** Include file for the local memory management.
+*/
+
+#ifndef __gc_hal_mem_h_
+#define __gc_hal_mem_h_
+#ifndef VIVANTE_NO_3D
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*******************************************************************************
+** Usage:
+
+ The macros to declare MemPool type and functions are
+ gcmMEM_DeclareFSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareVSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix)
+
+ The data structures for MemPool are
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+
+ The MemPool constructor and destructor functions are
+ gcfMEM_InitFSMemPool(gcsMEM_FS_MEM_POOL *, gcoOS, gctUINT, gctUINT);
+ gcfMEM_FreeFSMemPool(gcsMEM_FS_MEM_POOL *);
+ gcfMEM_InitVSMemPool(gcsMEM_VS_MEM_POOL *, gcoOS, gctUINT, gctBOOL);
+ gcfMEM_FreeVSMemPool(gcsMEM_VS_MEM_POOL *);
+ gcfMEM_InitAFSMemPool(gcsMEM_AFS_MEM_POOL *, gcoOS, gctUINT);
+ gcfMEM_FreeAFSMemPool(gcsMEM_AFS_MEM_POOL *);
+
+ FS: for Fixed-Size data structures
+ VS: for Variable-size data structures
+ AFS: for Array of Fixed-Size data structures
+
+
+ // Example 1: For a fixed-size data structure, struct gcsNode.
+ // It is used locally in a file, so the functions are static without prefix.
+ // At top level, declear allocate and free functions.
+ // The first argument is the data type.
+ // The second armument is the short name used in the fuctions.
+ gcmMEM_DeclareFSMemPool(struct gcsNode, Node, );
+
+ // The previous macro creates two inline functions,
+ // _AllocateNode and _FreeNode.
+
+ // In function or struct
+ gcsMEM_FS_MEM_POOL nodeMemPool;
+
+ // In function,
+ struct gcsNode * node;
+ gceSTATUS status;
+
+ // Before using the memory pool, initialize it.
+ // The second argument is the gcoOS object.
+ // The third argument is the number of data structures to allocate for each chunk.
+ status = gcfMEM_InitFSMemPool(&nodeMemPool, os, 100, sizeof(struct gcsNode));
+ ...
+
+ // Allocate a node.
+ status = _AllocateNode(nodeMemPool, &node);
+ ...
+ // Free a node.
+ _FreeNode(nodeMemPool, node);
+
+ // After using the memory pool, free it.
+ gcfMEM_FreeFSMemPool(&nodeMemPool);
+
+
+ // Example 2: For array of fixed-size data structures, struct gcsNode.
+ // It is used in several files, so the functions are extern with prefix.
+ // At top level, declear allocate and free functions.
+ // The first argument is the data type, and the second one is the short name
+ // used in the fuctions.
+ gcmMEM_DeclareAFSMemPool(struct gcsNode, NodeArray, gcfOpt);
+
+ // The previous macro creates two inline functions,
+ // gcfOpt_AllocateNodeArray and gcfOpt_FreeNodeArray.
+
+ // In function or struct
+ gcsMEM_AFS_MEM_POOL nodeArrayMemPool;
+
+ // In function,
+ struct gcsNode * nodeArray;
+ gceSTATUS status;
+
+ // Before using the array memory pool, initialize it.
+ // The second argument is the gcoOS object, the third is the number of data
+ // structures to allocate for each chunk.
+ status = gcfMEM_InitAFSMemPool(&nodeArrayMemPool, os, sizeof(struct gcsNode));
+ ...
+
+ // Allocate a node array of size 100.
+ status = gcfOpt_AllocateNodeArray(nodeArrayMemPool, &nodeArray, 100);
+ ...
+ // Free a node array.
+ gcfOpt_FreeNodeArray(&nodeArrayMemPool, nodeArray);
+
+ // After using the array memory pool, free it.
+ gcfMEM_FreeAFSMemPool(&nodeArrayMemPool);
+
+*******************************************************************************/
+
+/*******************************************************************************
+** To switch back to use gcoOS_Allocate and gcoOS_Free, add
+** #define USE_LOCAL_MEMORY_POOL 0
+** before including this file.
+*******************************************************************************/
+#ifndef USE_LOCAL_MEMORY_POOL
+/*
+ USE_LOCAL_MEMORY_POOL
+
+ This define enables the local memory management to improve performance.
+*/
+#define USE_LOCAL_MEMORY_POOL 1
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Structures
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+#else
+ typedef gcoOS gcsMEM_FS_MEM_POOL;
+ typedef gcoOS gcsMEM_VS_MEM_POOL;
+ typedef gcoOS gcsMEM_AFS_MEM_POOL;
+#endif
+
+/*******************************************************************************
+** Memory Pool Macros
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ gcmERR_RETURN(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type))); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcfMEM_FSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName##List( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * FirstPointer, \
+ Type * LastPointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x FirstPointer=0x%x LastPointer=0x%x", MemPool, FirstPointer, LastPointer); \
+ status = gcfMEM_FSMemPoolFreeAList(MemPool, (gctPOINTER) FirstPointer, (gctPOINTER) LastPointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status;\
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ status = gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+ Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ gcmERR_RETURN(gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, size)); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pinter); \
+ status = gcfMEM_VSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ status = gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ gcmERR_RETURN(gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type))); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcfMEM_AFSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#else
+
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type))); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcmOS_SAFE_FREE(MemPool, Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ status = gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Size)); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcmOS_SAFE_FREE(MemPool, Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ status = gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type))); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcmOS_SAFE_FREE(MemPool, Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Functions
+*******************************************************************************/
+gceSTATUS
+gcfMEM_InitFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolGetANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeAList(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER FirstNode,
+ IN gctPOINTER LastNode
+ );
+
+gceSTATUS
+gcfMEM_InitVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT BlockSize,
+ IN gctBOOL RecycleFreeNode
+ );
+
+gceSTATUS
+gcfMEM_FreeVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolGetANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctUINT Size,
+ IN gctUINT Alignment,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolFreeANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_InitAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolGetANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctUINT Count,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolFreeANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VIVANTE_NO_3D */
+#endif /* __gc_hal_mem_h_ */
diff --git a/src/include_eureka/gc_hal_options.h b/src/include_eureka/gc_hal_options.h
new file mode 100644
index 0000000..c919370
--- /dev/null
+++ b/src/include_eureka/gc_hal_options.h
@@ -0,0 +1,758 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_options_h_
+#define __gc_hal_options_h_
+
+/*
+ gcdPRINT_VERSION
+
+ Print HAL version.
+*/
+#ifndef gcdPRINT_VERSION
+# define gcdPRINT_VERSION 0
+#endif
+
+/*
+ USE_NEW_LINUX_SIGNAL
+
+ This define enables the Linux kernel signaling between kernel and user.
+*/
+#ifndef USE_NEW_LINUX_SIGNAL
+# define USE_NEW_LINUX_SIGNAL 0
+#endif
+
+/*
+ NO_USER_DIRECT_ACCESS_FROM_KERNEL
+
+ This define enables the Linux kernel behavior accessing user memory.
+*/
+#ifndef NO_USER_DIRECT_ACCESS_FROM_KERNEL
+# define NO_USER_DIRECT_ACCESS_FROM_KERNEL 0
+#endif
+
+/*
+ VIVANTE_PROFILER
+
+ This define enables the profiler.
+*/
+#ifndef VIVANTE_PROFILER
+# define VIVANTE_PROFILER 0
+#endif
+
+/*
+ gcdUSE_VG
+
+ Enable VG HAL layer (only for GC350).
+*/
+#ifndef gcdUSE_VG
+# define gcdUSE_VG 0
+#endif
+
+/*
+ USE_SW_FB
+
+ Set to 1 if the frame buffer memory cannot be accessed by the GPU.
+*/
+#ifndef USE_SW_FB
+# define USE_SW_FB 0
+#endif
+
+/*
+ USE_SUPER_SAMPLING
+
+ This define enables super-sampling support.
+*/
+#define USE_SUPER_SAMPLING 0
+
+/*
+ PROFILE_HAL_COUNTERS
+
+ This define enables HAL counter profiling support. HW and SHADER
+ counter profiling depends on this.
+*/
+#ifndef PROFILE_HAL_COUNTERS
+# define PROFILE_HAL_COUNTERS 1
+#endif
+
+/*
+ PROFILE_HW_COUNTERS
+
+ This define enables HW counter profiling support.
+*/
+#ifndef PROFILE_HW_COUNTERS
+# define PROFILE_HW_COUNTERS 1
+#endif
+
+/*
+ PROFILE_SHADER_COUNTERS
+
+ This define enables SHADER counter profiling support.
+*/
+#ifndef PROFILE_SHADER_COUNTERS
+# define PROFILE_SHADER_COUNTERS 1
+#endif
+
+/*
+ COMMAND_PROCESSOR_VERSION
+
+ The version of the command buffer and task manager.
+*/
+#define COMMAND_PROCESSOR_VERSION 1
+
+/*
+ gcdDUMP
+
+ When set to 1, a dump of all states and memory uploads, as well as other
+ hardware related execution will be printed to the debug console. This
+ data can be used for playing back applications.
+*/
+#ifndef gcdDUMP
+# define gcdDUMP 0
+#endif
+
+/*
+ gcdDUMP_API
+
+ When set to 1, a high level dump of the EGL and GL/VG APs's are
+ captured.
+*/
+#ifndef gcdDUMP_API
+# define gcdDUMP_API 0
+#endif
+
+/*
+ gcdDUMP_FRAMERATE
+ When set to a value other than zero, averaqe frame rate will be dumped.
+ The value set is the starting frame that the average will be calculated.
+ This is needed because sometimes first few frames are too slow to be included
+ in the average. Frame count starts from 1.
+*/
+#ifndef gcdDUMP_FRAMERATE
+# define gcdDUMP_FRAMERATE 0
+#endif
+
+
+/*
+ gcdDUMP_IN_KERNEL
+
+ When set to 1, all dumps will happen in the kernel. This is handy if
+ you want the kernel to dump its command buffers as well and the data
+ needs to be in sync.
+*/
+#ifndef gcdDUMP_IN_KERNEL
+# define gcdDUMP_IN_KERNEL 0
+#endif
+
+/*
+ gcdDUMP_COMMAND
+
+ When set to non-zero, the command queue will dump all incoming command
+ and context buffers as well as all other modifications to the command
+ queue.
+*/
+#ifndef gcdDUMP_COMMAND
+# define gcdDUMP_COMMAND 0
+#endif
+
+/*
+ gcdDUMP_FRAME_TGA
+
+ When set to a value other than 0, a dump of the frame specified by the value,
+ will be done into frame.tga. Frame count starts from 1.
+ */
+#ifndef gcdDUMP_FRAME_TGA
+#define gcdDUMP_FRAME_TGA 0
+#endif
+/*
+ gcdNULL_DRIVER
+
+ Set to 1 for infinite speed hardware.
+ Set to 2 for bypassing the HAL.
+ Set to 3 for bypassing the drivers.
+*/
+#ifndef gcdNULL_DRIVER
+# define gcdNULL_DRIVER 0
+#endif
+
+/*
+ gcdENABLE_TIMEOUT_DETECTION
+
+ Enable timeout detection.
+*/
+#ifndef gcdENABLE_TIMEOUT_DETECTION
+# define gcdENABLE_TIMEOUT_DETECTION 0
+#endif
+
+/*
+ gcdCMD_BUFFER_SIZE
+
+ Number of bytes in a command buffer.
+*/
+#ifndef gcdCMD_BUFFER_SIZE
+//####modified for marvell-bg2
+# define gcdCMD_BUFFER_SIZE (128 << 10)
+//####end for marvell-bg2
+#endif
+
+/*
+ gcdCMD_BUFFERS
+
+ Number of command buffers to use per client.
+*/
+#ifndef gcdCMD_BUFFERS
+# define gcdCMD_BUFFERS 2
+#endif
+
+/*
+ gcdMAX_CMD_BUFFERS
+
+ Maximum number of command buffers to use per client.
+*/
+#ifndef gcdMAX_CMD_BUFFERS
+# define gcdMAX_CMD_BUFFERS 8
+#endif
+
+/*
+ gcdCOMMAND_QUEUES
+
+ Number of command queues in the kernel.
+*/
+#ifndef gcdCOMMAND_QUEUES
+# define gcdCOMMAND_QUEUES 2
+#endif
+
+/*
+ gcdPOWER_CONTROL_DELAY
+
+ The delay in milliseconds required to wait until the GPU has woke up
+ from a suspend or power-down state. This is system dependent because
+ the bus clock also needs to stabalize.
+*/
+#ifndef gcdPOWER_CONTROL_DELAY
+# define gcdPOWER_CONTROL_DELAY 0
+#endif
+
+/*
+ gcdMMU_SIZE
+
+ Size of the MMU page table in bytes. Each 4 bytes can hold 4kB worth of
+ virtual data.
+*/
+#ifndef gcdMMU_SIZE
+# define gcdMMU_SIZE (128 << 10)
+#endif
+
+/*
+ gcdSECURE_USER
+
+ Use logical addresses instead of physical addresses in user land. In
+ this case a hint table is created for both command buffers and context
+ buffers, and that hint table will be used to patch up those buffers in
+ the kernel when they are ready to submit.
+*/
+#ifndef gcdSECURE_USER
+# define gcdSECURE_USER 0
+#endif
+
+/*
+ gcdSECURE_CACHE_SLOTS
+
+ Number of slots in the logical to DMA address cache table. Each time a
+ logical address needs to be translated into a DMA address for the GPU,
+ this cache will be walked. The replacement scheme is LRU.
+*/
+#ifndef gcdSECURE_CACHE_SLOTS
+# define gcdSECURE_CACHE_SLOTS 1024
+#endif
+
+/*
+ gcdSECURE_CACHE_METHOD
+
+ Replacement scheme used for Secure Cache. The following options are
+ available:
+
+ gcdSECURE_CACHE_LRU
+ A standard LRU cache.
+
+ gcdSECURE_CACHE_LINEAR
+ A linear walker with the idea that an application will always
+ render the scene in a similar way, so the next entry in the
+ cache should be a hit most of the time.
+
+ gcdSECURE_CACHE_HASH
+ A 256-entry hash table.
+
+ gcdSECURE_CACHE_TABLE
+ A simple cache but with potential of a lot of cache replacement.
+*/
+#ifndef gcdSECURE_CACHE_METHOD
+# define gcdSECURE_CACHE_METHOD gcdSECURE_CACHE_HASH
+#endif
+
+/*
+ gcdREGISTER_ACCESS_FROM_USER
+
+ Set to 1 to allow IOCTL calls to get through from user land. This
+ should only be in debug or development drops.
+*/
+#ifndef gcdREGISTER_ACCESS_FROM_USER
+# define gcdREGISTER_ACCESS_FROM_USER 1
+#endif
+
+/*
+ gcdHEAP_SIZE
+
+ Set the allocation size for the internal heaps. Each time a heap is
+ full, a new heap will be allocated with this minmimum amount of bytes.
+ The bigger this size, the fewer heaps there are to allocate, the better
+ the performance. However, heaps won't be freed until they are
+ completely free, so there might be some more memory waste if the size is
+ too big.
+*/
+#ifndef gcdHEAP_SIZE
+# define gcdHEAP_SIZE (64 << 10)
+#endif
+
+/*
+ gcdPOWER_MANAGEMENT
+
+ This define enables the power management code.
+*/
+#ifndef gcdPOWER_MANAGEMENT
+# define gcdPOWER_MANAGEMENT 1
+#endif
+
+/*
+ gcdFPGA_BUILD
+
+ This define enables work arounds for FPGA images.
+*/
+#ifndef gcdFPGA_BUILD
+# define gcdFPGA_BUILD 0
+#endif
+
+/*
+ gcdGPU_TIMEOUT
+
+ This define specified the number of milliseconds the system will wait
+ before it broadcasts the GPU is stuck. In other words, it will define
+ the timeout of any operation that needs to wait for the GPU.
+
+ If the value is 0, no timeout will be checked for.
+*/
+#ifndef gcdGPU_TIMEOUT
+# if gcdFPGA_BUILD
+# define gcdGPU_TIMEOUT 0
+# else
+# define gcdGPU_TIMEOUT (2000 * 5)
+# endif
+#endif
+
+/*
+ gcdGPU_ADVANCETIMER
+
+ it is advance timer.
+*/
+#ifndef gcdGPU_ADVANCETIMER
+# define gcdGPU_ADVANCETIMER 250
+#endif
+
+/*
+ gcdSTATIC_LINK
+
+ This define disalbes static linking;
+*/
+#ifndef gcdSTATIC_LINK
+# define gcdSTATIC_LINK 0
+#endif
+
+/*
+ gcdUSE_NEW_HEAP
+
+ Setting this define to 1 enables new heap.
+*/
+#ifndef gcdUSE_NEW_HEAP
+# define gcdUSE_NEW_HEAP 0
+#endif
+
+/*
+ gcdCMD_NO_2D_CONTEXT
+
+ This define enables no-context 2D command buffer.
+*/
+#ifndef gcdCMD_NO_2D_CONTEXT
+# define gcdCMD_NO_2D_CONTEXT 1
+#endif
+
+/*
+ gcdENABLE_BANK_ALIGNMENT
+
+ When enabled, video memory is allocated bank aligned. The vendor can modify
+ _GetSurfaceBankAlignment() and gcoSURF_GetBankOffsetBytes() to define how
+ different types of allocations are bank and channel aligned.
+ When disabled (default), no bank alignment is done.
+*/
+#ifndef gcdENABLE_BANK_ALIGNMENT
+# define gcdENABLE_BANK_ALIGNMENT 0
+#endif
+
+/*
+ gcdBANK_BIT_START
+
+ Specifies the start bit of the bank (inclusive).
+*/
+#ifndef gcdBANK_BIT_START
+# define gcdBANK_BIT_START 12
+#endif
+
+/*
+ gcdBANK_BIT_END
+
+ Specifies the end bit of the bank (inclusive).
+*/
+#ifndef gcdBANK_BIT_END
+# define gcdBANK_BIT_END 14
+#endif
+
+/*
+ gcdBANK_CHANNEL_BIT
+
+ When set, video memory when allocated bank aligned is allocated such that
+ render and depth buffer addresses alternate on the channel bit specified.
+ This option has an effect only when gcdENABLE_BANK_ALIGNMENT is enabled.
+ When disabled (default), no alteration is done.
+*/
+#ifndef gcdBANK_CHANNEL_BIT
+# define gcdBANK_CHANNEL_BIT 7
+#endif
+
+/*
+ gcdDYNAMIC_SPEED
+
+ When non-zero, it informs the kernel driver to use the speed throttling
+ broadcasting functions to inform the system the GPU should be spet up or
+ slowed down. It will send a broadcast for slowdown each "interval"
+ specified by this define in milliseconds
+ (gckOS_BroadcastCalibrateSpeed).
+*/
+#ifndef gcdDYNAMIC_SPEED
+# define gcdDYNAMIC_SPEED 2000
+#endif
+
+/*
+ gcdDYNAMIC_EVENT_THRESHOLD
+
+ When non-zero, it specifies the maximum number of available events at
+ which the kernel driver will issue a broadcast to speed up the GPU
+ (gckOS_BroadcastHurry).
+*/
+#ifndef gcdDYNAMIC_EVENT_THRESHOLD
+# define gcdDYNAMIC_EVENT_THRESHOLD 5
+#endif
+
+/*
+ gcdENABLE_PROFILING
+
+ Enable profiling macros.
+*/
+#ifndef gcdENABLE_PROFILING
+# define gcdENABLE_PROFILING 0
+#endif
+
+/*
+ gcdENABLE_128B_MERGE
+
+ Enable 128B merge for the BUS control.
+*/
+#ifndef gcdENABLE_128B_MERGE
+# define gcdENABLE_128B_MERGE 0
+#endif
+
+/*
+ gcdFRAME_DB
+
+ When non-zero, it specified the number of frames inside the frame
+ database. The frame DB will collect per-frame timestamps and hardware
+ counters.
+*/
+#ifndef gcdFRAME_DB
+# define gcdFRAME_DB 0
+# define gcdFRAME_DB_RESET 0
+# define gcdFRAME_DB_NAME "/var/log/frameDB.log"
+#endif
+
+/*
+ gcdENABLE_VG
+ enable the 2D openVG
+*/
+
+#ifndef gcdENABLE_VG
+# define gcdENABLE_VG 0
+#endif
+
+/*
+ gcdDYNAMIC_MAP_RESERVED_MEMORY
+
+ When gcvPOOL_SYSTEM is constructed from RESERVED memory,
+ driver can map the whole reserved memory to kernel space
+ at the beginning, or just map a piece of memory when need
+ to access.
+
+ Notice:
+ - It's only for the 2D openVG. For other cores, there is
+ _NO_ need to map reserved memory to kernel.
+ - It's meaningless when memory is allocated by
+ gckOS_AllocateContiguous, in that case, memory is always
+ mapped by system when allocated.
+*/
+#ifndef gcdDYNAMIC_MAP_RESERVED_MEMORY
+# define gcdDYNAMIC_MAP_RESERVED_MEMORY 1
+#endif
+
+/*
+ gcdPAGED_MEMORY_CACHEABLE
+
+ When non-zero, paged memory will be cacheable.
+
+ Normally, driver will detemines whether a video memory
+ is cacheable or not. When cacheable is not neccessary,
+ it will be writecombine.
+
+ This option is only for those SOC which can't enable
+ writecombine without enabling cacheable.
+*/
+
+#ifndef gcdPAGED_MEMORY_CACHEABLE
+# define gcdPAGED_MEMORY_CACHEABLE 1
+#endif
+
+/*
+ gcdNONPAGED_MEMORY_CACHEABLE
+
+ When non-zero, non paged memory will be cacheable.
+*/
+
+#ifndef gcdNONPAGED_MEMORY_CACHEABLE
+# define gcdNONPAGED_MEMORY_CACHEABLE 1
+#endif
+
+/*
+ gcdNONPAGED_MEMORY_BUFFERABLE
+
+ When non-zero, non paged memory will be bufferable.
+ gcdNONPAGED_MEMORY_BUFFERABLE and gcdNONPAGED_MEMORY_CACHEABLE
+ can't be set 1 at same time
+*/
+
+#ifndef gcdNONPAGED_MEMORY_BUFFERABLE
+# define gcdNONPAGED_MEMORY_BUFFERABLE 0
+#endif
+
+/*
+ gcdENABLE_INFINITE_SPEED_HW
+ enable the Infinte HW , this is for 2D openVG
+*/
+
+#ifndef gcdENABLE_INFINITE_SPEED_HW
+# define gcdENABLE_INFINITE_SPEED_HW 0
+#endif
+
+/*
+ gcdENABLE_TS_DOUBLE_BUFFER
+ enable the TS double buffer, this is for 2D openVG
+*/
+
+#ifndef gcdENABLE_TS_DOUBLE_BUFFER
+# define gcdENABLE_TS_DOUBLE_BUFFER 1
+#endif
+
+/*
+ gcd6000_SUPPORT
+
+ Temporary define to enable/disable 6000 support.
+ */
+#ifndef gcd6000_SUPPORT
+# define gcd6000_SUPPORT 0
+#endif
+
+/*
+ gcdPOWEROFF_TIMEOUT
+
+ When non-zero, GPU will power off automatically from
+ idle state, and gcdPOWEROFF_TIMEOUT is also the default
+ timeout value.
+ */
+
+#ifndef gcdPOWEROFF_TIMEOUT
+# define gcdPOWEROFF_TIMEOUT 0 /*yunsen: avoid TO MSG 5000*/
+#endif
+
+/*
+ gcdUSE_VIDMEM_PER_PID
+*/
+#ifndef gcdUSE_VIDMEM_PER_PID
+# define gcdUSE_VIDMEM_PER_PID 0
+#endif
+
+/*
+ QNX_SINGLE_THREADED_DEBUGGING
+*/
+#ifndef QNX_SINGLE_THREADED_DEBUGGING
+# define QNX_SINGLE_THREADED_DEBUGGING 0
+#endif
+
+/*
+ gcdENABLE_RECOVERY
+
+ This define enables the recovery code.
+*/
+#ifndef gcdENABLE_RECOVERY
+# define gcdENABLE_RECOVERY 1
+#endif
+
+/*
+ gcdRENDER_THREADS
+
+ Number of render threads. Make it zero, and there will be no render
+ threads.
+*/
+#ifndef gcdRENDER_THREADS
+# define gcdRENDER_THREADS 0
+#endif
+
+/*
+ gcdSMP
+
+ This define enables SMP support.
+
+ Currently, it only works on Linux/Android,
+ Kbuild will config it according to whether
+ CONFIG_SMP is set.
+
+*/
+#ifndef gcdSMP
+# define gcdSMP 0
+#endif
+
+/*
+ gcdSUPPORT_SWAP_RECTANGLE
+
+ Support swap with a specific rectangle.
+
+ Set the rectangle with eglSetSwapRectangleANDROID api.
+*/
+#ifndef gcdSUPPORT_SWAP_RECTANGLE
+# define gcdSUPPORT_SWAP_RECTANGLE 0
+#endif
+
+/*
+ gcdDEFER_RESOLVES
+
+ Support deferred resolves for 3D apps.
+*/
+#ifndef gcdDEFER_RESOLVES
+# define gcdDEFER_RESOLVES 0
+#endif
+
+/*
+ gcdCOPYBLT_OPTIMIZATION
+
+ Combine dirty areas resulting from Android's copyBlt.
+*/
+#ifndef gcdCOPYBLT_OPTIMIZATION
+# define gcdCOPYBLT_OPTIMIZATION 0
+#endif
+
+/*
+ gcdGPU_LINEAR_BUFFER_ENABLED
+
+ Use linear buffer for GPU apps so HWC can do 2D composition.
+*/
+#ifndef gcdGPU_LINEAR_BUFFER_ENABLED
+# define gcdGPU_LINEAR_BUFFER_ENABLED 0
+#endif
+
+/*
+ gcdSHARED_RESOLVE_BUFFER_ENABLED
+
+ Use shared resolve buffer for all app buffers.
+*/
+#ifndef gcdSHARED_RESOLVE_BUFFER_ENABLED
+# define gcdSHARED_RESOLVE_BUFFER_ENABLED 0
+#endif
+
+/*
+ gcdUSE_TRIANGLE_STRIP_PATCH
+ */
+#ifndef gcdUSE_TRIANGLE_STRIP_PATCH
+# define gcdUSE_TRIANGLE_STRIP_PATCH 1
+#endif
+
+/*
+ gcdENABLE_OUTER_CACHE_PATCH
+
+ Enable the outer cache patch.
+*/
+#ifndef gcdENABLE_OUTER_CACHE_PATCH
+# define gcdENABLE_OUTER_CACHE_PATCH 0
+#endif
+
+#ifndef gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST
+# define gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST 0
+#endif
+
+#ifndef gcdSHARED_PAGETABLE
+# define gcdSHARED_PAGETABLE 1
+#endif
+
+#ifndef gcdUSE_OPENCL
+# define gcdUSE_OPENCL 0
+#endif
+
+/*
+ gcdBLOB_CACHE_ENABLED
+ When non-zero, Android blob cache extension will be enabled.
+ Otherwise, caching will be by-passed.
+ */
+
+#ifndef gcdBLOB_CACHE_ENABLED
+# define gcdBLOB_CACHE_ENABLED 0
+#endif
+
+/*
+ gcdSMALL_BLOCK_SIZE
+
+ When non-zero, a part of VIDMEM will be reserved for requests
+ whose requesting size is less than gcdSMALL_BLOCK_SIZE.
+
+ For Linux, it's the size of a page. If this requeset fallbacks
+ to gcvPOOL_CONTIGUOUS or gcvPOOL_VIRTUAL, memory will be wasted
+ because they allocate a page at least.
+ */
+#ifndef gcdSMALL_BLOCK_SIZE
+# define gcdSMALL_BLOCK_SIZE 4096
+# define gcdRATIO_FOR_SMALL_MEMORY 32
+#endif
+
+#endif /* __gc_hal_options_h_ */
diff --git a/src/include_eureka/gc_hal_profiler.h b/src/include_eureka/gc_hal_profiler.h
new file mode 100644
index 0000000..ee4a2ce
--- /dev/null
+++ b/src/include_eureka/gc_hal_profiler.h
@@ -0,0 +1,1311 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_profiler_h_
+#define __gc_hal_profiler_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define GLVERTEX_OBJECT 10
+#define GLVERTEX_OBJECT_BYTES 11
+
+#define GLINDEX_OBJECT 20
+#define GLINDEX_OBJECT_BYTES 21
+
+#define GLTEXTURE_OBJECT 30
+#define GLTEXTURE_OBJECT_BYTES 31
+
+#if VIVANTE_PROFILER
+#define gcmPROFILE_GC(Enum, Value) gcoPROFILER_Count(gcvNULL, Enum, Value)
+#else
+#define gcmPROFILE_GC(Enum, Value) do { } while (gcvFALSE)
+#endif
+
+#ifndef gcdNEW_PROFILER_FILE
+#define gcdNEW_PROFILER_FILE 1
+#endif
+
+/* OpenGL ES11 API IDs. */
+#define ES11_ACTIVETEXTURE 1
+#define ES11_ALPHAFUNC (ES11_ACTIVETEXTURE + 1)
+#define ES11_ALPHAFUNCX (ES11_ALPHAFUNC + 1)
+#define ES11_BINDBUFFER (ES11_ALPHAFUNCX + 1)
+#define ES11_BINDTEXTURE (ES11_BINDBUFFER + 1)
+#define ES11_BLENDFUNC (ES11_BINDTEXTURE + 1)
+#define ES11_BUFFERDATA (ES11_BLENDFUNC + 1)
+#define ES11_BUFFERSUBDATA (ES11_BUFFERDATA + 1)
+#define ES11_CLEAR (ES11_BUFFERSUBDATA + 1)
+#define ES11_CLEARCOLOR (ES11_CLEAR + 1)
+#define ES11_CLEARCOLORX (ES11_CLEARCOLOR + 1)
+#define ES11_CLEARDEPTHF (ES11_CLEARCOLORX + 1)
+#define ES11_CLEARDEPTHX (ES11_CLEARDEPTHF + 1)
+#define ES11_CLEARSTENCIL (ES11_CLEARDEPTHX + 1)
+#define ES11_CLIENTACTIVETEXTURE (ES11_CLEARSTENCIL + 1)
+#define ES11_CLIPPLANEF (ES11_CLIENTACTIVETEXTURE + 1)
+#define ES11_CLIPPLANEX (ES11_CLIPPLANEF + 1)
+#define ES11_COLOR4F (ES11_CLIPPLANEX + 1)
+#define ES11_COLOR4UB (ES11_COLOR4F + 1)
+#define ES11_COLOR4X (ES11_COLOR4UB + 1)
+#define ES11_COLORMASK (ES11_COLOR4X + 1)
+#define ES11_COLORPOINTER (ES11_COLORMASK + 1)
+#define ES11_COMPRESSEDTEXIMAGE2D (ES11_COLORPOINTER + 1)
+#define ES11_COMPRESSEDTEXSUBIMAGE2D (ES11_COMPRESSEDTEXIMAGE2D + 1)
+#define ES11_COPYTEXIMAGE2D (ES11_COMPRESSEDTEXSUBIMAGE2D + 1)
+#define ES11_COPYTEXSUBIMAGE2D (ES11_COPYTEXIMAGE2D + 1)
+#define ES11_CULLFACE (ES11_COPYTEXSUBIMAGE2D + 1)
+#define ES11_DELETEBUFFERS (ES11_CULLFACE + 1)
+#define ES11_DELETETEXTURES (ES11_DELETEBUFFERS + 1)
+#define ES11_DEPTHFUNC (ES11_DELETETEXTURES + 1)
+#define ES11_DEPTHMASK (ES11_DEPTHFUNC + 1)
+#define ES11_DEPTHRANGEF (ES11_DEPTHMASK + 1)
+#define ES11_DEPTHRANGEX (ES11_DEPTHRANGEF + 1)
+#define ES11_DISABLE (ES11_DEPTHRANGEX + 1)
+#define ES11_DISABLECLIENTSTATE (ES11_DISABLE + 1)
+#define ES11_DRAWARRAYS (ES11_DISABLECLIENTSTATE + 1)
+#define ES11_DRAWELEMENTS (ES11_DRAWARRAYS + 1)
+#define ES11_ENABLE (ES11_DRAWELEMENTS + 1)
+#define ES11_ENABLECLIENTSTATE (ES11_ENABLE + 1)
+#define ES11_FINISH (ES11_ENABLECLIENTSTATE + 1)
+#define ES11_FLUSH (ES11_FINISH + 1)
+#define ES11_FOGF (ES11_FLUSH + 1)
+#define ES11_FOGFV (ES11_FOGF + 1)
+#define ES11_FOGX (ES11_FOGFV + 1)
+#define ES11_FOGXV (ES11_FOGX + 1)
+#define ES11_FRONTFACE (ES11_FOGXV + 1)
+#define ES11_FRUSTUMF (ES11_FRONTFACE + 1)
+#define ES11_FRUSTUMX (ES11_FRUSTUMF + 1)
+#define ES11_GENBUFFERS (ES11_FRUSTUMX + 1)
+#define ES11_GENTEXTURES (ES11_GENBUFFERS + 1)
+#define ES11_GETBOOLEANV (ES11_GENTEXTURES + 1)
+#define ES11_GETBUFFERPARAMETERIV (ES11_GETBOOLEANV + 1)
+#define ES11_GETCLIPPLANEF (ES11_GETBUFFERPARAMETERIV + 1)
+#define ES11_GETCLIPPLANEX (ES11_GETCLIPPLANEF + 1)
+#define ES11_GETERROR (ES11_GETCLIPPLANEX + 1)
+#define ES11_GETFIXEDV (ES11_GETERROR + 1)
+#define ES11_GETFLOATV (ES11_GETFIXEDV + 1)
+#define ES11_GETINTEGERV (ES11_GETFLOATV + 1)
+#define ES11_GETLIGHTFV (ES11_GETINTEGERV + 1)
+#define ES11_GETLIGHTXV (ES11_GETLIGHTFV + 1)
+#define ES11_GETMATERIALFV (ES11_GETLIGHTXV + 1)
+#define ES11_GETMATERIALXV (ES11_GETMATERIALFV + 1)
+#define ES11_GETPOINTERV (ES11_GETMATERIALXV + 1)
+#define ES11_GETSTRING (ES11_GETPOINTERV + 1)
+#define ES11_GETTEXENVFV (ES11_GETSTRING + 1)
+#define ES11_GETTEXENVIV (ES11_GETTEXENVFV + 1)
+#define ES11_GETTEXENVXV (ES11_GETTEXENVIV + 1)
+#define ES11_GETTEXPARAMETERFV (ES11_GETTEXENVXV + 1)
+#define ES11_GETTEXPARAMETERIV (ES11_GETTEXPARAMETERFV + 1)
+#define ES11_GETTEXPARAMETERXV (ES11_GETTEXPARAMETERIV + 1)
+#define ES11_HINT (ES11_GETTEXPARAMETERXV + 1)
+#define ES11_ISBUFFER (ES11_HINT + 1)
+#define ES11_ISENABLED (ES11_ISBUFFER + 1)
+#define ES11_ISTEXTURE (ES11_ISENABLED + 1)
+#define ES11_LIGHTF (ES11_ISTEXTURE + 1)
+#define ES11_LIGHTFV (ES11_LIGHTF + 1)
+#define ES11_LIGHTMODELF (ES11_LIGHTFV + 1)
+#define ES11_LIGHTMODELFV (ES11_LIGHTMODELF + 1)
+#define ES11_LIGHTMODELX (ES11_LIGHTMODELFV + 1)
+#define ES11_LIGHTMODELXV (ES11_LIGHTMODELX + 1)
+#define ES11_LIGHTX (ES11_LIGHTMODELXV + 1)
+#define ES11_LIGHTXV (ES11_LIGHTX + 1)
+#define ES11_LINEWIDTH (ES11_LIGHTXV + 1)
+#define ES11_LINEWIDTHX (ES11_LINEWIDTH + 1)
+#define ES11_LOADIDENTITY (ES11_LINEWIDTHX + 1)
+#define ES11_LOADMATRIXF (ES11_LOADIDENTITY + 1)
+#define ES11_LOADMATRIXX (ES11_LOADMATRIXF + 1)
+#define ES11_LOGICOP (ES11_LOADMATRIXX + 1)
+#define ES11_MATERIALF (ES11_LOGICOP + 1)
+#define ES11_MATERIALFV (ES11_MATERIALF + 1)
+#define ES11_MATERIALX (ES11_MATERIALFV + 1)
+#define ES11_MATERIALXV (ES11_MATERIALX + 1)
+#define ES11_MATRIXMODE (ES11_MATERIALXV + 1)
+#define ES11_MULTITEXCOORD4F (ES11_MATRIXMODE + 1)
+#define ES11_MULTITEXCOORD4X (ES11_MULTITEXCOORD4F + 1)
+#define ES11_MULTMATRIXF (ES11_MULTITEXCOORD4X + 1)
+#define ES11_MULTMATRIXX (ES11_MULTMATRIXF + 1)
+#define ES11_NORMAL3F (ES11_MULTMATRIXX + 1)
+#define ES11_NORMAL3X (ES11_NORMAL3F + 1)
+#define ES11_NORMALPOINTER (ES11_NORMAL3X + 1)
+#define ES11_ORTHOF (ES11_NORMALPOINTER + 1)
+#define ES11_ORTHOX (ES11_ORTHOF + 1)
+#define ES11_PIXELSTOREI (ES11_ORTHOX + 1)
+#define ES11_POINTPARAMETERF (ES11_PIXELSTOREI + 1)
+#define ES11_POINTPARAMETERFV (ES11_POINTPARAMETERF + 1)
+#define ES11_POINTPARAMETERX (ES11_POINTPARAMETERFV + 1)
+#define ES11_POINTPARAMETERXV (ES11_POINTPARAMETERX + 1)
+#define ES11_POINTSIZE (ES11_POINTPARAMETERXV + 1)
+#define ES11_POINTSIZEX (ES11_POINTSIZE + 1)
+#define ES11_POLYGONOFFSET (ES11_POINTSIZEX + 1)
+#define ES11_POLYGONOFFSETX (ES11_POLYGONOFFSET + 1)
+#define ES11_POPMATRIX (ES11_POLYGONOFFSETX + 1)
+#define ES11_PUSHMATRIX (ES11_POPMATRIX + 1)
+#define ES11_READPIXELS (ES11_PUSHMATRIX + 1)
+#define ES11_ROTATEF (ES11_READPIXELS + 1)
+#define ES11_ROTATEX (ES11_ROTATEF + 1)
+#define ES11_SAMPLECOVERAGE (ES11_ROTATEX + 1)
+#define ES11_SAMPLECOVERAGEX (ES11_SAMPLECOVERAGE + 1)
+#define ES11_SCALEF (ES11_SAMPLECOVERAGEX + 1)
+#define ES11_SCALEX (ES11_SCALEF + 1)
+#define ES11_SCISSOR (ES11_SCALEX + 1)
+#define ES11_SHADEMODEL (ES11_SCISSOR + 1)
+#define ES11_STENCILFUNC (ES11_SHADEMODEL + 1)
+#define ES11_STENCILMASK (ES11_STENCILFUNC + 1)
+#define ES11_STENCILOP (ES11_STENCILMASK + 1)
+#define ES11_TEXCOORDPOINTER (ES11_STENCILOP + 1)
+#define ES11_TEXENVF (ES11_TEXCOORDPOINTER + 1)
+#define ES11_TEXENVFV (ES11_TEXENVF + 1)
+#define ES11_TEXENVI (ES11_TEXENVFV + 1)
+#define ES11_TEXENVIV (ES11_TEXENVI + 1)
+#define ES11_TEXENVX (ES11_TEXENVIV + 1)
+#define ES11_TEXENVXV (ES11_TEXENVX + 1)
+#define ES11_TEXIMAGE2D (ES11_TEXENVXV + 1)
+#define ES11_TEXPARAMETERF (ES11_TEXIMAGE2D + 1)
+#define ES11_TEXPARAMETERFV (ES11_TEXPARAMETERF + 1)
+#define ES11_TEXPARAMETERI (ES11_TEXPARAMETERFV + 1)
+#define ES11_TEXPARAMETERIV (ES11_TEXPARAMETERI + 1)
+#define ES11_TEXPARAMETERX (ES11_TEXPARAMETERIV + 1)
+#define ES11_TEXPARAMETERXV (ES11_TEXPARAMETERX + 1)
+#define ES11_TEXSUBIMAGE2D (ES11_TEXPARAMETERXV + 1)
+#define ES11_TRANSLATEF (ES11_TEXSUBIMAGE2D + 1)
+#define ES11_TRANSLATEX (ES11_TRANSLATEF + 1)
+#define ES11_VERTEXPOINTER (ES11_TRANSLATEX + 1)
+#define ES11_VIEWPORT (ES11_VERTEXPOINTER + 1)
+#define ES11_BLENDEQUATIONOES (ES11_VIEWPORT + 1)
+#define ES11_BLENDFUNCSEPERATEOES (ES11_BLENDEQUATIONOES + 1)
+#define ES11_BLENDEQUATIONSEPARATEOES (ES11_BLENDFUNCSEPERATEOES + 1)
+#define ES11_GLMAPBUFFEROES (ES11_BLENDEQUATIONSEPARATEOES + 1)
+#define ES11_GLUNMAPBUFFEROES (ES11_GLMAPBUFFEROES + 1)
+#define ES11_GLGETBUFFERPOINTERVOES (ES11_GLUNMAPBUFFEROES + 1)
+#define ES11_CALLS (ES11_GLGETBUFFERPOINTERVOES + 1)
+#define ES11_DRAWCALLS (ES11_CALLS + 1)
+#define ES11_STATECHANGECALLS (ES11_DRAWCALLS + 1)
+#define ES11_POINTCOUNT (ES11_STATECHANGECALLS + 1)
+#define ES11_LINECOUNT (ES11_POINTCOUNT + 1)
+#define ES11_TRIANGLECOUNT (ES11_LINECOUNT + 1)
+
+/* OpenGL ES2X API IDs. */
+#define ES20_ACTIVETEXTURE 1
+#define ES20_ATTACHSHADER (ES20_ACTIVETEXTURE + 1)
+#define ES20_BINDATTRIBLOCATION (ES20_ATTACHSHADER + 1)
+#define ES20_BINDBUFFER (ES20_BINDATTRIBLOCATION + 1)
+#define ES20_BINDFRAMEBUFFER (ES20_BINDBUFFER + 1)
+#define ES20_BINDRENDERBUFFER (ES20_BINDFRAMEBUFFER + 1)
+#define ES20_BINDTEXTURE (ES20_BINDRENDERBUFFER + 1)
+#define ES20_BLENDCOLOR (ES20_BINDTEXTURE + 1)
+#define ES20_BLENDEQUATION (ES20_BLENDCOLOR + 1)
+#define ES20_BLENDEQUATIONSEPARATE (ES20_BLENDEQUATION + 1)
+#define ES20_BLENDFUNC (ES20_BLENDEQUATIONSEPARATE + 1)
+#define ES20_BLENDFUNCSEPARATE (ES20_BLENDFUNC + 1)
+#define ES20_BUFFERDATA (ES20_BLENDFUNCSEPARATE + 1)
+#define ES20_BUFFERSUBDATA (ES20_BUFFERDATA + 1)
+#define ES20_CHECKFRAMEBUFFERSTATUS (ES20_BUFFERSUBDATA + 1)
+#define ES20_CLEAR (ES20_CHECKFRAMEBUFFERSTATUS + 1)
+#define ES20_CLEARCOLOR (ES20_CLEAR + 1)
+#define ES20_CLEARDEPTHF (ES20_CLEARCOLOR + 1)
+#define ES20_CLEARSTENCIL (ES20_CLEARDEPTHF + 1)
+#define ES20_COLORMASK (ES20_CLEARSTENCIL + 1)
+#define ES20_COMPILESHADER (ES20_COLORMASK + 1)
+#define ES20_COMPRESSEDTEXIMAGE2D (ES20_COMPILESHADER + 1)
+#define ES20_COMPRESSEDTEXSUBIMAGE2D (ES20_COMPRESSEDTEXIMAGE2D + 1)
+#define ES20_COPYTEXIMAGE2D (ES20_COMPRESSEDTEXSUBIMAGE2D + 1)
+#define ES20_COPYTEXSUBIMAGE2D (ES20_COPYTEXIMAGE2D + 1)
+#define ES20_CREATEPROGRAM (ES20_COPYTEXSUBIMAGE2D + 1)
+#define ES20_CREATESHADER (ES20_CREATEPROGRAM + 1)
+#define ES20_CULLFACE (ES20_CREATESHADER + 1)
+#define ES20_DELETEBUFFERS (ES20_CULLFACE + 1)
+#define ES20_DELETEFRAMEBUFFERS (ES20_DELETEBUFFERS + 1)
+#define ES20_DELETEPROGRAM (ES20_DELETEFRAMEBUFFERS + 1)
+#define ES20_DELETERENDERBUFFERS (ES20_DELETEPROGRAM + 1)
+#define ES20_DELETESHADER (ES20_DELETERENDERBUFFERS + 1)
+#define ES20_DELETETEXTURES (ES20_DELETESHADER + 1)
+#define ES20_DEPTHFUNC (ES20_DELETETEXTURES + 1)
+#define ES20_DEPTHMASK (ES20_DEPTHFUNC + 1)
+#define ES20_DEPTHRANGEF (ES20_DEPTHMASK + 1)
+#define ES20_DETACHSHADER (ES20_DEPTHRANGEF + 1)
+#define ES20_DISABLE (ES20_DETACHSHADER + 1)
+#define ES20_DISABLEVERTEXATTRIBARRAY (ES20_DISABLE + 1)
+#define ES20_DRAWARRAYS (ES20_DISABLEVERTEXATTRIBARRAY + 1)
+#define ES20_DRAWELEMENTS (ES20_DRAWARRAYS + 1)
+#define ES20_ENABLE (ES20_DRAWELEMENTS + 1)
+#define ES20_ENABLEVERTEXATTRIBARRAY (ES20_ENABLE + 1)
+#define ES20_FINISH (ES20_ENABLEVERTEXATTRIBARRAY + 1)
+#define ES20_FLUSH (ES20_FINISH + 1)
+#define ES20_FRAMEBUFFERRENDERBUFFER (ES20_FLUSH + 1)
+#define ES20_FRAMEBUFFERTEXTURE2D (ES20_FRAMEBUFFERRENDERBUFFER + 1)
+#define ES20_FRONTFACE (ES20_FRAMEBUFFERTEXTURE2D + 1)
+#define ES20_GENBUFFERS (ES20_FRONTFACE + 1)
+#define ES20_GENERATEMIPMAP (ES20_GENBUFFERS + 1)
+#define ES20_GENFRAMEBUFFERS (ES20_GENERATEMIPMAP + 1)
+#define ES20_GENRENDERBUFFERS (ES20_GENFRAMEBUFFERS + 1)
+#define ES20_GENTEXTURES (ES20_GENRENDERBUFFERS + 1)
+#define ES20_GETACTIVEATTRIB (ES20_GENTEXTURES + 1)
+#define ES20_GETACTIVEUNIFORM (ES20_GETACTIVEATTRIB + 1)
+#define ES20_GETATTACHEDSHADERS (ES20_GETACTIVEUNIFORM + 1)
+#define ES20_GETATTRIBLOCATION (ES20_GETATTACHEDSHADERS + 1)
+#define ES20_GETBOOLEANV (ES20_GETATTRIBLOCATION + 1)
+#define ES20_GETBUFFERPARAMETERIV (ES20_GETBOOLEANV + 1)
+#define ES20_GETERROR (ES20_GETBUFFERPARAMETERIV + 1)
+#define ES20_GETFLOATV (ES20_GETERROR + 1)
+#define ES20_GETFRAMEBUFFERATTACHMENTPARAMETERIV (ES20_GETFLOATV + 1)
+#define ES20_GETINTEGERV (ES20_GETFRAMEBUFFERATTACHMENTPARAMETERIV + 1)
+#define ES20_GETPROGRAMIV (ES20_GETINTEGERV + 1)
+#define ES20_GETPROGRAMINFOLOG (ES20_GETPROGRAMIV + 1)
+#define ES20_GETRENDERBUFFERPARAMETERIV (ES20_GETPROGRAMINFOLOG + 1)
+#define ES20_GETSHADERIV (ES20_GETRENDERBUFFERPARAMETERIV + 1)
+#define ES20_GETSHADERINFOLOG (ES20_GETSHADERIV + 1)
+#define ES20_GETSHADERPRECISIONFORMAT (ES20_GETSHADERINFOLOG + 1)
+#define ES20_GETSHADERSOURCE (ES20_GETSHADERPRECISIONFORMAT + 1)
+#define ES20_GETSTRING (ES20_GETSHADERSOURCE + 1)
+#define ES20_GETTEXPARAMETERFV (ES20_GETSTRING + 1)
+#define ES20_GETTEXPARAMETERIV (ES20_GETTEXPARAMETERFV + 1)
+#define ES20_GETUNIFORMFV (ES20_GETTEXPARAMETERIV + 1)
+#define ES20_GETUNIFORMIV (ES20_GETUNIFORMFV + 1)
+#define ES20_GETUNIFORMLOCATION (ES20_GETUNIFORMIV + 1)
+#define ES20_GETVERTEXATTRIBFV (ES20_GETUNIFORMLOCATION + 1)
+#define ES20_GETVERTEXATTRIBIV (ES20_GETVERTEXATTRIBFV + 1)
+#define ES20_GETVERTEXATTRIBPOINTERV (ES20_GETVERTEXATTRIBIV + 1)
+#define ES20_HINT (ES20_GETVERTEXATTRIBPOINTERV + 1)
+#define ES20_ISBUFFER (ES20_HINT + 1)
+#define ES20_ISENABLED (ES20_ISBUFFER + 1)
+#define ES20_ISFRAMEBUFFER (ES20_ISENABLED + 1)
+#define ES20_ISPROGRAM (ES20_ISFRAMEBUFFER + 1)
+#define ES20_ISRENDERBUFFER (ES20_ISPROGRAM + 1)
+#define ES20_ISSHADER (ES20_ISRENDERBUFFER + 1)
+#define ES20_ISTEXTURE (ES20_ISSHADER + 1)
+#define ES20_LINEWIDTH (ES20_ISTEXTURE + 1)
+#define ES20_LINKPROGRAM (ES20_LINEWIDTH + 1)
+#define ES20_PIXELSTOREI (ES20_LINKPROGRAM + 1)
+#define ES20_POLYGONOFFSET (ES20_PIXELSTOREI + 1)
+#define ES20_READPIXELS (ES20_POLYGONOFFSET + 1)
+#define ES20_RELEASESHADERCOMPILER (ES20_READPIXELS + 1)
+#define ES20_RENDERBUFFERSTORAGE (ES20_RELEASESHADERCOMPILER + 1)
+#define ES20_SAMPLECOVERAGE (ES20_RENDERBUFFERSTORAGE + 1)
+#define ES20_SCISSOR (ES20_SAMPLECOVERAGE + 1)
+#define ES20_SHADERBINARY (ES20_SCISSOR + 1)
+#define ES20_SHADERSOURCE (ES20_SHADERBINARY + 1)
+#define ES20_STENCILFUNC (ES20_SHADERSOURCE + 1)
+#define ES20_STENCILFUNCSEPARATE (ES20_STENCILFUNC + 1)
+#define ES20_STENCILMASK (ES20_STENCILFUNCSEPARATE + 1)
+#define ES20_STENCILMASKSEPARATE (ES20_STENCILMASK + 1)
+#define ES20_STENCILOP (ES20_STENCILMASKSEPARATE + 1)
+#define ES20_STENCILOPSEPARATE (ES20_STENCILOP + 1)
+#define ES20_TEXIMAGE2D (ES20_STENCILOPSEPARATE + 1)
+#define ES20_TEXPARAMETERF (ES20_TEXIMAGE2D + 1)
+#define ES20_TEXPARAMETERFV (ES20_TEXPARAMETERF + 1)
+#define ES20_TEXPARAMETERI (ES20_TEXPARAMETERFV + 1)
+#define ES20_TEXPARAMETERIV (ES20_TEXPARAMETERI + 1)
+#define ES20_TEXSUBIMAGE2D (ES20_TEXPARAMETERIV + 1)
+#define ES20_UNIFORM1F (ES20_TEXSUBIMAGE2D + 1)
+#define ES20_UNIFORM1FV (ES20_UNIFORM1F + 1)
+#define ES20_UNIFORM1I (ES20_UNIFORM1FV + 1)
+#define ES20_UNIFORM1IV (ES20_UNIFORM1I + 1)
+#define ES20_UNIFORM2F (ES20_UNIFORM1IV + 1)
+#define ES20_UNIFORM2FV (ES20_UNIFORM2F + 1)
+#define ES20_UNIFORM2I (ES20_UNIFORM2FV + 1)
+#define ES20_UNIFORM2IV (ES20_UNIFORM2I + 1)
+#define ES20_UNIFORM3F (ES20_UNIFORM2IV + 1)
+#define ES20_UNIFORM3FV (ES20_UNIFORM3F + 1)
+#define ES20_UNIFORM3I (ES20_UNIFORM3FV + 1)
+#define ES20_UNIFORM3IV (ES20_UNIFORM3I + 1)
+#define ES20_UNIFORM4F (ES20_UNIFORM3IV + 1)
+#define ES20_UNIFORM4FV (ES20_UNIFORM4F + 1)
+#define ES20_UNIFORM4I (ES20_UNIFORM4FV + 1)
+#define ES20_UNIFORM4IV (ES20_UNIFORM4I + 1)
+#define ES20_UNIFORMMATRIX2FV (ES20_UNIFORM4IV + 1)
+#define ES20_UNIFORMMATRIX3FV (ES20_UNIFORMMATRIX2FV + 1)
+#define ES20_UNIFORMMATRIX4FV (ES20_UNIFORMMATRIX3FV + 1)
+#define ES20_USEPROGRAM (ES20_UNIFORMMATRIX4FV + 1)
+#define ES20_VALIDATEPROGRAM (ES20_USEPROGRAM + 1)
+#define ES20_VERTEXATTRIB1F (ES20_VALIDATEPROGRAM + 1)
+#define ES20_VERTEXATTRIB1FV (ES20_VERTEXATTRIB1F + 1)
+#define ES20_VERTEXATTRIB2F (ES20_VERTEXATTRIB1FV + 1)
+#define ES20_VERTEXATTRIB2FV (ES20_VERTEXATTRIB2F + 1)
+#define ES20_VERTEXATTRIB3F (ES20_VERTEXATTRIB2FV + 1)
+#define ES20_VERTEXATTRIB3FV (ES20_VERTEXATTRIB3F + 1)
+#define ES20_VERTEXATTRIB4F (ES20_VERTEXATTRIB3FV + 1)
+#define ES20_VERTEXATTRIB4FV (ES20_VERTEXATTRIB4F + 1)
+#define ES20_VERTEXATTRIBPOINTER (ES20_VERTEXATTRIB4FV + 1)
+#define ES20_VIEWPORT (ES20_VERTEXATTRIBPOINTER + 1)
+#define ES20_GETPROGRAMBINARYOES (ES20_VIEWPORT + 1)
+#define ES20_PROGRAMBINARYOES (ES20_GETPROGRAMBINARYOES + 1)
+#define ES20_TEXIMAGE3DOES (ES20_PROGRAMBINARYOES + 1)
+#define ES20_TEXSUBIMAGE3DOES (ES20_TEXIMAGE3DOES + 1)
+#define ES20_COPYSUBIMAGE3DOES (ES20_TEXSUBIMAGE3DOES + 1)
+#define ES20_COMPRESSEDTEXIMAGE3DOES (ES20_COPYSUBIMAGE3DOES + 1)
+#define ES20_COMPRESSEDTEXSUBIMAGE3DOES (ES20_COMPRESSEDTEXIMAGE3DOES + 1)
+#define ES20_FRAMEBUFFERTEXTURE3DOES (ES20_COMPRESSEDTEXSUBIMAGE3DOES + 1)
+#define ES20_BINDVERTEXARRAYOES (ES20_FRAMEBUFFERTEXTURE3DOES + 1)
+#define ES20_GENVERTEXARRAYOES (ES20_BINDVERTEXARRAYOES + 1)
+#define ES20_ISVERTEXARRAYOES (ES20_GENVERTEXARRAYOES + 1)
+#define ES20_DELETEVERTEXARRAYOES (ES20_ISVERTEXARRAYOES + 1)
+#define ES20_GLMAPBUFFEROES (ES20_DELETEVERTEXARRAYOES + 1)
+#define ES20_GLUNMAPBUFFEROES (ES20_GLMAPBUFFEROES + 1)
+#define ES20_GLGETBUFFERPOINTERVOES (ES20_GLUNMAPBUFFEROES + 1)
+#define ES20_CALLS (ES20_GLGETBUFFERPOINTERVOES + 1)
+#define ES20_DRAWCALLS (ES20_CALLS + 1)
+#define ES20_STATECHANGECALLS (ES20_DRAWCALLS + 1)
+#define ES20_POINTCOUNT (ES20_STATECHANGECALLS + 1)
+#define ES20_LINECOUNT (ES20_POINTCOUNT + 1)
+#define ES20_TRIANGLECOUNT (ES20_LINECOUNT + 1)
+
+/* OpenVG API IDs. */
+#define VG11_APPENDPATH 1
+#define VG11_APPENDPATHDATA (VG11_APPENDPATH + 1)
+#define VG11_CHILDIMAGE (VG11_APPENDPATHDATA + 1)
+#define VG11_CLEAR (VG11_CHILDIMAGE + 1)
+#define VG11_CLEARGLYPH (VG11_CLEAR + 1)
+#define VG11_CLEARIMAGE (VG11_CLEARGLYPH + 1)
+#define VG11_CLEARPATH (VG11_CLEARIMAGE + 1)
+#define VG11_COLORMATRIX (VG11_CLEARPATH + 1)
+#define VG11_CONVOLVE (VG11_COLORMATRIX + 1)
+#define VG11_COPYIMAGE (VG11_CONVOLVE + 1)
+#define VG11_COPYMASK (VG11_COPYIMAGE + 1)
+#define VG11_COPYPIXELS (VG11_COPYMASK + 1)
+#define VG11_CREATEFONT (VG11_COPYPIXELS + 1)
+#define VG11_CREATEIMAGE (VG11_CREATEFONT + 1)
+#define VG11_CREATEMASKLAYER (VG11_CREATEIMAGE + 1)
+#define VG11_CREATEPAINT (VG11_CREATEMASKLAYER + 1)
+#define VG11_CREATEPATH (VG11_CREATEPAINT + 1)
+#define VG11_DESTROYFONT (VG11_CREATEPATH + 1)
+#define VG11_DESTROYIMAGE (VG11_DESTROYFONT + 1)
+#define VG11_DESTROYMASKLAYER (VG11_DESTROYIMAGE + 1)
+#define VG11_DESTROYPAINT (VG11_DESTROYMASKLAYER + 1)
+#define VG11_DESTROYPATH (VG11_DESTROYPAINT + 1)
+#define VG11_DRAWGLYPH (VG11_DESTROYPATH + 1)
+#define VG11_DRAWGLYPHS (VG11_DRAWGLYPH + 1)
+#define VG11_DRAWIMAGE (VG11_DRAWGLYPHS + 1)
+#define VG11_DRAWPATH (VG11_DRAWIMAGE + 1)
+#define VG11_FILLMASKLAYER (VG11_DRAWPATH + 1)
+#define VG11_FINISH (VG11_FILLMASKLAYER + 1)
+#define VG11_FLUSH (VG11_FINISH + 1)
+#define VG11_GAUSSIANBLUR (VG11_FLUSH + 1)
+#define VG11_GETCOLOR (VG11_GAUSSIANBLUR + 1)
+#define VG11_GETERROR (VG11_GETCOLOR + 1)
+#define VG11_GETF (VG11_GETERROR + 1)
+#define VG11_GETFV (VG11_GETF + 1)
+#define VG11_GETI (VG11_GETFV + 1)
+#define VG11_GETIMAGESUBDATA (VG11_GETI + 1)
+#define VG11_GETIV (VG11_GETIMAGESUBDATA + 1)
+#define VG11_GETMATRIX (VG11_GETIV + 1)
+#define VG11_GETPAINT (VG11_GETMATRIX + 1)
+#define VG11_GETPARAMETERF (VG11_GETPAINT + 1)
+#define VG11_GETPARAMETERFV (VG11_GETPARAMETERF + 1)
+#define VG11_GETPARAMETERI (VG11_GETPARAMETERFV + 1)
+#define VG11_GETPARAMETERIV (VG11_GETPARAMETERI + 1)
+#define VG11_GETPARAMETERVECTORSIZE (VG11_GETPARAMETERIV + 1)
+#define VG11_GETPARENT (VG11_GETPARAMETERVECTORSIZE + 1)
+#define VG11_GETPATHCAPABILITIES (VG11_GETPARENT + 1)
+#define VG11_GETPIXELS (VG11_GETPATHCAPABILITIES + 1)
+#define VG11_GETSTRING (VG11_GETPIXELS + 1)
+#define VG11_GETVECTORSIZE (VG11_GETSTRING + 1)
+#define VG11_HARDWAREQUERY (VG11_GETVECTORSIZE + 1)
+#define VG11_IMAGESUBDATA (VG11_HARDWAREQUERY + 1)
+#define VG11_INTERPOLATEPATH (VG11_IMAGESUBDATA + 1)
+#define VG11_LOADIDENTITY (VG11_INTERPOLATEPATH + 1)
+#define VG11_LOADMATRIX (VG11_LOADIDENTITY + 1)
+#define VG11_LOOKUP (VG11_LOADMATRIX + 1)
+#define VG11_LOOKUPSINGLE (VG11_LOOKUP + 1)
+#define VG11_MASK (VG11_LOOKUPSINGLE + 1)
+#define VG11_MODIFYPATHCOORDS (VG11_MASK + 1)
+#define VG11_MULTMATRIX (VG11_MODIFYPATHCOORDS + 1)
+#define VG11_PAINTPATTERN (VG11_MULTMATRIX + 1)
+#define VG11_PATHBOUNDS (VG11_PAINTPATTERN + 1)
+#define VG11_PATHLENGTH (VG11_PATHBOUNDS + 1)
+#define VG11_PATHTRANSFORMEDBOUNDS (VG11_PATHLENGTH + 1)
+#define VG11_POINTALONGPATH (VG11_PATHTRANSFORMEDBOUNDS + 1)
+#define VG11_READPIXELS (VG11_POINTALONGPATH + 1)
+#define VG11_REMOVEPATHCAPABILITIES (VG11_READPIXELS + 1)
+#define VG11_RENDERTOMASK (VG11_REMOVEPATHCAPABILITIES + 1)
+#define VG11_ROTATE (VG11_RENDERTOMASK + 1)
+#define VG11_SCALE (VG11_ROTATE + 1)
+#define VG11_SEPARABLECONVOLVE (VG11_SCALE + 1)
+#define VG11_SETCOLOR (VG11_SEPARABLECONVOLVE + 1)
+#define VG11_SETF (VG11_SETCOLOR + 1)
+#define VG11_SETFV (VG11_SETF + 1)
+#define VG11_SETGLYPHTOIMAGE (VG11_SETFV + 1)
+#define VG11_SETGLYPHTOPATH (VG11_SETGLYPHTOIMAGE + 1)
+#define VG11_SETI (VG11_SETGLYPHTOPATH + 1)
+#define VG11_SETIV (VG11_SETI + 1)
+#define VG11_SETPAINT (VG11_SETIV + 1)
+#define VG11_SETPARAMETERF (VG11_SETPAINT + 1)
+#define VG11_SETPARAMETERFV (VG11_SETPARAMETERF + 1)
+#define VG11_SETPARAMETERI (VG11_SETPARAMETERFV + 1)
+#define VG11_SETPARAMETERIV (VG11_SETPARAMETERI + 1)
+#define VG11_SETPIXELS (VG11_SETPARAMETERIV + 1)
+#define VG11_SHEAR (VG11_SETPIXELS + 1)
+#define VG11_TRANSFORMPATH (VG11_SHEAR + 1)
+#define VG11_TRANSLATE (VG11_TRANSFORMPATH + 1)
+#define VG11_WRITEPIXELS (VG11_TRANSLATE + 1)
+#define VG11_CALLS (VG11_WRITEPIXELS + 1)
+#define VG11_DRAWCALLS (VG11_CALLS + 1)
+#define VG11_STATECHANGECALLS (VG11_DRAWCALLS + 1)
+#define VG11_FILLCOUNT (VG11_STATECHANGECALLS + 1)
+#define VG11_STROKECOUNT (VG11_FILLCOUNT + 1)
+/* End of Driver API ID Definitions. */
+
+/* HAL & MISC IDs. */
+#define HAL_VERTBUFNEWBYTEALLOC 1
+#define HAL_VERTBUFTOTALBYTEALLOC (HAL_VERTBUFNEWBYTEALLOC + 1)
+#define HAL_VERTBUFNEWOBJALLOC (HAL_VERTBUFTOTALBYTEALLOC + 1)
+#define HAL_VERTBUFTOTALOBJALLOC (HAL_VERTBUFNEWOBJALLOC + 1)
+#define HAL_INDBUFNEWBYTEALLOC (HAL_VERTBUFTOTALOBJALLOC + 1)
+#define HAL_INDBUFTOTALBYTEALLOC (HAL_INDBUFNEWBYTEALLOC + 1)
+#define HAL_INDBUFNEWOBJALLOC (HAL_INDBUFTOTALBYTEALLOC + 1)
+#define HAL_INDBUFTOTALOBJALLOC (HAL_INDBUFNEWOBJALLOC + 1)
+#define HAL_TEXBUFNEWBYTEALLOC (HAL_INDBUFTOTALOBJALLOC + 1)
+#define HAL_TEXBUFTOTALBYTEALLOC (HAL_TEXBUFNEWBYTEALLOC + 1)
+#define HAL_TEXBUFNEWOBJALLOC (HAL_TEXBUFTOTALBYTEALLOC + 1)
+#define HAL_TEXBUFTOTALOBJALLOC (HAL_TEXBUFNEWOBJALLOC + 1)
+
+#define GPU_CYCLES 1
+#define GPU_READ64BYTE (GPU_CYCLES + 1)
+#define GPU_WRITE64BYTE (GPU_READ64BYTE + 1)
+
+#define VS_INSTCOUNT 1
+#define VS_BRANCHINSTCOUNT (VS_INSTCOUNT + 1)
+#define VS_TEXLDINSTCOUNT (VS_BRANCHINSTCOUNT + 1)
+#define VS_RENDEREDVERTCOUNT (VS_TEXLDINSTCOUNT + 1)
+
+#define PS_INSTCOUNT 1
+#define PS_BRANCHINSTCOUNT (PS_INSTCOUNT + 1)
+#define PS_TEXLDINSTCOUNT (PS_BRANCHINSTCOUNT + 1)
+#define PS_RENDEREDPIXCOUNT (PS_TEXLDINSTCOUNT + 1)
+
+#define PA_INVERTCOUNT 1
+#define PA_INPRIMCOUNT (PA_INVERTCOUNT + 1)
+#define PA_OUTPRIMCOUNT (PA_INPRIMCOUNT + 1)
+#define PA_DEPTHCLIPCOUNT (PA_OUTPRIMCOUNT + 1)
+#define PA_TRIVIALREJCOUNT (PA_DEPTHCLIPCOUNT + 1)
+#define PA_CULLCOUNT (PA_TRIVIALREJCOUNT + 1)
+
+#define SE_TRIANGLECOUNT 1
+#define SE_LINECOUNT (SE_TRIANGLECOUNT + 1)
+
+#define RA_VALIDPIXCOUNT 1
+#define RA_TOTALQUADCOUNT (RA_VALIDPIXCOUNT + 1)
+#define RA_VALIDQUADCOUNTEZ (RA_TOTALQUADCOUNT + 1)
+#define RA_TOTALPRIMCOUNT (RA_VALIDQUADCOUNTEZ + 1)
+#define RA_PIPECACHEMISSCOUNT (RA_TOTALPRIMCOUNT + 1)
+#define RA_PREFCACHEMISSCOUNT (RA_PIPECACHEMISSCOUNT + 1)
+#define RA_EEZCULLCOUNT (RA_PREFCACHEMISSCOUNT + 1)
+
+#define TX_TOTBILINEARREQ 1
+#define TX_TOTTRILINEARREQ (TX_TOTBILINEARREQ + 1)
+#define TX_TOTDISCARDTEXREQ (TX_TOTTRILINEARREQ + 1)
+#define TX_TOTTEXREQ (TX_TOTDISCARDTEXREQ + 1)
+#define TX_MEMREADCOUNT (TX_TOTTEXREQ + 1)
+#define TX_MEMREADIN8BCOUNT (TX_MEMREADCOUNT + 1)
+#define TX_CACHEMISSCOUNT (TX_MEMREADIN8BCOUNT + 1)
+#define TX_CACHEHITTEXELCOUNT (TX_CACHEMISSCOUNT + 1)
+#define TX_CACHEMISSTEXELCOUNT (TX_CACHEHITTEXELCOUNT + 1)
+
+#define PE_KILLEDBYCOLOR 1
+#define PE_KILLEDBYDEPTH (PE_KILLEDBYCOLOR + 1)
+#define PE_DRAWNBYCOLOR (PE_KILLEDBYDEPTH + 1)
+#define PE_DRAWNBYDEPTH (PE_DRAWNBYCOLOR + 1)
+
+#define MC_READREQ8BPIPE 1
+#define MC_READREQ8BIP (MC_READREQ8BPIPE + 1)
+#define MC_WRITEREQ8BPIPE (MC_READREQ8BIP + 1)
+
+#define AXI_READREQSTALLED 1
+#define AXI_WRITEREQSTALLED (AXI_READREQSTALLED + 1)
+#define AXI_WRITEDATASTALLED (AXI_WRITEREQSTALLED + 1)
+
+#define PVS_INSTRCOUNT 1
+#define PVS_ALUINSTRCOUNT (PVS_INSTRCOUNT + 1)
+#define PVS_TEXINSTRCOUNT (PVS_ALUINSTRCOUNT + 1)
+#define PVS_ATTRIBCOUNT (PVS_TEXINSTRCOUNT + 1)
+#define PVS_UNIFORMCOUNT (PVS_ATTRIBCOUNT + 1)
+#define PVS_FUNCTIONCOUNT (PVS_UNIFORMCOUNT + 1)
+
+#define PPS_INSTRCOUNT 1
+#define PPS_ALUINSTRCOUNT (PPS_INSTRCOUNT + 1)
+#define PPS_TEXINSTRCOUNT (PPS_ALUINSTRCOUNT + 1)
+#define PPS_ATTRIBCOUNT (PPS_TEXINSTRCOUNT + 1)
+#define PPS_UNIFORMCOUNT (PPS_ATTRIBCOUNT + 1)
+#define PPS_FUNCTIONCOUNT (PPS_UNIFORMCOUNT + 1)
+/* End of MISC Counter IDs. */
+
+#ifdef gcdNEW_PROFILER_FILE
+
+/* Category Constants. */
+#define VPHEADER 0x010000
+#define VPG_INFO 0x020000
+#define VPG_TIME 0x030000
+#define VPG_MEM 0x040000
+#define VPG_ES11 0x050000
+#define VPG_ES20 0x060000
+#define VPG_VG11 0x070000
+#define VPG_HAL 0x080000
+#define VPG_HW 0x090000
+#define VPG_GPU 0x0a0000
+#define VPG_VS 0x0b0000
+#define VPG_PS 0x0c0000
+#define VPG_PA 0x0d0000
+#define VPG_SETUP 0x0e0000
+#define VPG_RA 0x0f0000
+#define VPG_TX 0x100000
+#define VPG_PE 0x110000
+#define VPG_MC 0x120000
+#define VPG_AXI 0x130000
+#define VPG_PROG 0x140000
+#define VPG_PVS 0x150000
+#define VPG_PPS 0x160000
+#define VPG_FRAME 0x170000
+#define VPG_END 0xff0000
+
+/* Info. */
+#define VPC_INFOCOMPANY (VPG_INFO + 1)
+#define VPC_INFOVERSION (VPC_INFOCOMPANY + 1)
+#define VPC_INFORENDERER (VPC_INFOVERSION + 1)
+#define VPC_INFOREVISION (VPC_INFORENDERER + 1)
+#define VPC_INFODRIVER (VPC_INFOREVISION + 1)
+#define VPC_INFODRIVERMODE (VPC_INFODRIVER + 1)
+#define VPC_INFOSCREENSIZE (VPC_INFODRIVERMODE + 1)
+
+/* Counter Constants. */
+#define VPC_ELAPSETIME (VPG_TIME + 1)
+#define VPC_CPUTIME (VPC_ELAPSETIME + 1)
+
+#define VPC_MEMMAXRES (VPG_MEM + 1)
+#define VPC_MEMSHARED (VPC_MEMMAXRES + 1)
+#define VPC_MEMUNSHAREDDATA (VPC_MEMSHARED + 1)
+#define VPC_MEMUNSHAREDSTACK (VPC_MEMUNSHAREDDATA + 1)
+
+/* OpenGL ES11 Counters. */
+#define VPC_ES11ACTIVETEXTURE (VPG_ES11 + ES11_ACTIVETEXTURE)
+#define VPC_ES11ALPHAFUNC (VPG_ES11 + ES11_ALPHAFUNC)
+#define VPC_ES11ALPHAFUNCX (VPG_ES11 + ES11_ALPHAFUNCX)
+#define VPC_ES11BINDBUFFER (VPG_ES11 + ES11_BINDBUFFER)
+#define VPC_ES11BINDTEXTURE (VPG_ES11 + ES11_BINDTEXTURE)
+#define VPC_ES11BLENDFUNC (VPG_ES11 + ES11_BLENDFUNC)
+#define VPC_ES11BUFFERDATA (VPG_ES11 + ES11_BUFFERDATA)
+#define VPC_ES11BUFFERSUBDATA (VPG_ES11 + ES11_BUFFERSUBDATA)
+#define VPC_ES11CLEAR (VPG_ES11 + ES11_CLEAR)
+#define VPC_ES11CLEARCOLOR (VPG_ES11 + ES11_CLEARCOLOR)
+#define VPC_ES11CLEARCOLORX (VPG_ES11 + ES11_CLEARCOLORX)
+#define VPC_ES11CLEARDEPTHF (VPG_ES11 + ES11_CLEARDEPTHF)
+#define VPC_ES11CLEARDEPTHX (VPG_ES11 + ES11_CLEARDEPTHX)
+#define VPC_ES11CLEARSTENCIL (VPG_ES11 + ES11_CLEARSTENCIL)
+#define VPC_ES11CLIENTACTIVETEXTURE (VPG_ES11 + ES11_CLIENTACTIVETEXTURE)
+#define VPC_ES11CLIPPLANEF (VPG_ES11 + ES11_CLIPPLANEF)
+#define VPC_ES11CLIPPLANEX (VPG_ES11 + ES11_CLIPPLANEX)
+#define VPC_ES11COLOR4F (VPG_ES11 + ES11_COLOR4F)
+#define VPC_ES11COLOR4UB (VPG_ES11 + ES11_COLOR4UB)
+#define VPC_ES11COLOR4X (VPG_ES11 + ES11_COLOR4X)
+#define VPC_ES11COLORMASK (VPG_ES11 + ES11_COLORMASK)
+#define VPC_ES11COLORPOINTER (VPG_ES11 + ES11_COLORPOINTER)
+#define VPC_ES11COMPRESSEDTEXIMAGE2D (VPG_ES11 + ES11_COMPRESSEDTEXIMAGE2D)
+#define VPC_ES11COMPRESSEDTEXSUBIMAGE2D (VPG_ES11 + ES11_COMPRESSEDTEXSUBIMAGE2D)
+#define VPC_ES11COPYTEXIMAGE2D (VPG_ES11 + ES11_COPYTEXIMAGE2D)
+#define VPC_ES11COPYTEXSUBIMAGE2D (VPG_ES11 + ES11_COPYTEXSUBIMAGE2D)
+#define VPC_ES11CULLFACE (VPG_ES11 + ES11_CULLFACE)
+#define VPC_ES11DELETEBUFFERS (VPG_ES11 + ES11_DELETEBUFFERS)
+#define VPC_ES11DELETETEXTURES (VPG_ES11 + ES11_DELETETEXTURES)
+#define VPC_ES11DEPTHFUNC (VPG_ES11 + ES11_DEPTHFUNC)
+#define VPC_ES11DEPTHMASK (VPG_ES11 + ES11_DEPTHMASK)
+#define VPC_ES11DEPTHRANGEF (VPG_ES11 + ES11_DEPTHRANGEF)
+#define VPC_ES11DEPTHRANGEX (VPG_ES11 + ES11_DEPTHRANGEX)
+#define VPC_ES11DISABLE (VPG_ES11 + ES11_DISABLE)
+#define VPC_ES11DISABLECLIENTSTATE (VPG_ES11 + ES11_DISABLECLIENTSTATE)
+#define VPC_ES11DRAWARRAYS (VPG_ES11 + ES11_DRAWARRAYS)
+#define VPC_ES11DRAWELEMENTS (VPG_ES11 + ES11_DRAWELEMENTS)
+#define VPC_ES11ENABLE (VPG_ES11 + ES11_ENABLE)
+#define VPC_ES11ENABLECLIENTSTATE (VPG_ES11 + ES11_ENABLECLIENTSTATE)
+#define VPC_ES11FINISH (VPG_ES11 + ES11_FINISH)
+#define VPC_ES11FLUSH (VPG_ES11 + ES11_FLUSH)
+#define VPC_ES11FOGF (VPG_ES11 + ES11_FOGF)
+#define VPC_ES11FOGFV (VPG_ES11 + ES11_FOGFV)
+#define VPC_ES11FOGX (VPG_ES11 + ES11_FOGX)
+#define VPC_ES11FOGXV (VPG_ES11 + ES11_FOGXV)
+#define VPC_ES11FRONTFACE (VPG_ES11 + ES11_FRONTFACE)
+#define VPC_ES11FRUSTUMF (VPG_ES11 + ES11_FRUSTUMF)
+#define VPC_ES11FRUSTUMX (VPG_ES11 + ES11_FRUSTUMX)
+#define VPC_ES11GENBUFFERS (VPG_ES11 + ES11_GENBUFFERS)
+#define VPC_ES11GENTEXTURES (VPG_ES11 + ES11_GENTEXTURES)
+#define VPC_ES11GETBOOLEANV (VPG_ES11 + ES11_GETBOOLEANV)
+#define VPC_ES11GETBUFFERPARAMETERIV (VPG_ES11 + ES11_GETBUFFERPARAMETERIV)
+#define VPC_ES11GETCLIPPLANEF (VPG_ES11 + ES11_GETCLIPPLANEF)
+#define VPC_ES11GETCLIPPLANEX (VPG_ES11 + ES11_GETCLIPPLANEX)
+#define VPC_ES11GETERROR (VPG_ES11 + ES11_GETERROR)
+#define VPC_ES11GETFIXEDV (VPG_ES11 + ES11_GETFIXEDV)
+#define VPC_ES11GETFLOATV (VPG_ES11 + ES11_GETFLOATV)
+#define VPC_ES11GETINTEGERV (VPG_ES11 + ES11_GETINTEGERV)
+#define VPC_ES11GETLIGHTFV (VPG_ES11 + ES11_GETLIGHTFV)
+#define VPC_ES11GETLIGHTXV (VPG_ES11 + ES11_GETLIGHTXV)
+#define VPC_ES11GETMATERIALFV (VPG_ES11 + ES11_GETMATERIALFV)
+#define VPC_ES11GETMATERIALXV (VPG_ES11 + ES11_GETMATERIALXV)
+#define VPC_ES11GETPOINTERV (VPG_ES11 + ES11_GETPOINTERV)
+#define VPC_ES11GETSTRING (VPG_ES11 + ES11_GETSTRING)
+#define VPC_ES11GETTEXENVFV (VPG_ES11 + ES11_GETTEXENVFV)
+#define VPC_ES11GETTEXENVIV (VPG_ES11 + ES11_GETTEXENVIV)
+#define VPC_ES11GETTEXENVXV (VPG_ES11 + ES11_GETTEXENVXV)
+#define VPC_ES11GETTEXPARAMETERFV (VPG_ES11 + ES11_GETTEXPARAMETERFV)
+#define VPC_ES11GETTEXPARAMETERIV (VPG_ES11 + ES11_GETTEXPARAMETERIV)
+#define VPC_ES11GETTEXPARAMETERXV (VPG_ES11 + ES11_GETTEXPARAMETERXV)
+#define VPC_ES11HINT (VPG_ES11 + ES11_HINT)
+#define VPC_ES11ISBUFFER (VPG_ES11 + ES11_ISBUFFER)
+#define VPC_ES11ISENABLED (VPG_ES11 + ES11_ISENABLED)
+#define VPC_ES11ISTEXTURE (VPG_ES11 + ES11_ISTEXTURE)
+#define VPC_ES11LIGHTF (VPG_ES11 + ES11_LIGHTF)
+#define VPC_ES11LIGHTFV (VPG_ES11 + ES11_LIGHTFV)
+#define VPC_ES11LIGHTMODELF (VPG_ES11 + ES11_LIGHTMODELF)
+#define VPC_ES11LIGHTMODELFV (VPG_ES11 + ES11_LIGHTMODELFV)
+#define VPC_ES11LIGHTMODELX (VPG_ES11 + ES11_LIGHTMODELX)
+#define VPC_ES11LIGHTMODELXV (VPG_ES11 + ES11_LIGHTMODELXV)
+#define VPC_ES11LIGHTX (VPG_ES11 + ES11_LIGHTX)
+#define VPC_ES11LIGHTXV (VPG_ES11 + ES11_LIGHTXV)
+#define VPC_ES11LINEWIDTH (VPG_ES11 + ES11_LINEWIDTH)
+#define VPC_ES11LINEWIDTHX (VPG_ES11 + ES11_LINEWIDTHX)
+#define VPC_ES11LOADIDENTITY (VPG_ES11 + ES11_LOADIDENTITY)
+#define VPC_ES11LOADMATRIXF (VPG_ES11 + ES11_LOADMATRIXF)
+#define VPC_ES11LOADMATRIXX (VPG_ES11 + ES11_LOADMATRIXX)
+#define VPC_ES11LOGICOP (VPG_ES11 + ES11_LOGICOP)
+#define VPC_ES11MATERIALF (VPG_ES11 + ES11_MATERIALF)
+#define VPC_ES11MATERIALFV (VPG_ES11 + ES11_MATERIALFV)
+#define VPC_ES11MATERIALX (VPG_ES11 + ES11_MATERIALX)
+#define VPC_ES11MATERIALXV (VPG_ES11 + ES11_MATERIALXV)
+#define VPC_ES11MATRIXMODE (VPG_ES11 + ES11_MATRIXMODE)
+#define VPC_ES11MULTITEXCOORD4F (VPG_ES11 + ES11_MULTITEXCOORD4F)
+#define VPC_ES11MULTITEXCOORD4X (VPG_ES11 + ES11_MULTITEXCOORD4X)
+#define VPC_ES11MULTMATRIXF (VPG_ES11 + ES11_MULTMATRIXF)
+#define VPC_ES11MULTMATRIXX (VPG_ES11 + ES11_MULTMATRIXX)
+#define VPC_ES11NORMAL3F (VPG_ES11 + ES11_NORMAL3F)
+#define VPC_ES11NORMAL3X (VPG_ES11 + ES11_NORMAL3X)
+#define VPC_ES11NORMALPOINTER (VPG_ES11 + ES11_NORMALPOINTER)
+#define VPC_ES11ORTHOF (VPG_ES11 + ES11_ORTHOF)
+#define VPC_ES11ORTHOX (VPG_ES11 + ES11_ORTHOX)
+#define VPC_ES11PIXELSTOREI (VPG_ES11 + ES11_PIXELSTOREI)
+#define VPC_ES11POINTPARAMETERF (VPG_ES11 + ES11_POINTPARAMETERF)
+#define VPC_ES11POINTPARAMETERFV (VPG_ES11 + ES11_POINTPARAMETERFV)
+#define VPC_ES11POINTPARAMETERX (VPG_ES11 + ES11_POINTPARAMETERX)
+#define VPC_ES11POINTPARAMETERXV (VPG_ES11 + ES11_POINTPARAMETERXV)
+#define VPC_ES11POINTSIZE (VPG_ES11 + ES11_POINTSIZE)
+#define VPC_ES11POINTSIZEX (VPG_ES11 + ES11_POINTSIZEX)
+#define VPC_ES11POLYGONOFFSET (VPG_ES11 + ES11_POLYGONOFFSET)
+#define VPC_ES11POLYGONOFFSETX (VPG_ES11 + ES11_POLYGONOFFSETX)
+#define VPC_ES11POPMATRIX (VPG_ES11 + ES11_POPMATRIX)
+#define VPC_ES11PUSHMATRIX (VPG_ES11 + ES11_PUSHMATRIX)
+#define VPC_ES11READPIXELS (VPG_ES11 + ES11_READPIXELS)
+#define VPC_ES11ROTATEF (VPG_ES11 + ES11_ROTATEF)
+#define VPC_ES11ROTATEX (VPG_ES11 + ES11_ROTATEX)
+#define VPC_ES11SAMPLECOVERAGE (VPG_ES11 + ES11_SAMPLECOVERAGE)
+#define VPC_ES11SAMPLECOVERAGEX (VPG_ES11 + ES11_SAMPLECOVERAGEX)
+#define VPC_ES11SCALEF (VPG_ES11 + ES11_SCALEF)
+#define VPC_ES11SCALEX (VPG_ES11 + ES11_SCALEX)
+#define VPC_ES11SCISSOR (VPG_ES11 + ES11_SCISSOR)
+#define VPC_ES11SHADEMODEL (VPG_ES11 + ES11_SHADEMODEL)
+#define VPC_ES11STENCILFUNC (VPG_ES11 + ES11_STENCILFUNC)
+#define VPC_ES11STENCILMASK (VPG_ES11 + ES11_STENCILMASK)
+#define VPC_ES11STENCILOP (VPG_ES11 + ES11_STENCILOP)
+#define VPC_ES11TEXCOORDPOINTER (VPG_ES11 + ES11_TEXCOORDPOINTER)
+#define VPC_ES11TEXENVF (VPG_ES11 + ES11_TEXENVF)
+#define VPC_ES11TEXENVFV (VPG_ES11 + ES11_TEXENVFV)
+#define VPC_ES11TEXENVI (VPG_ES11 + ES11_TEXENVI)
+#define VPC_ES11TEXENVIV (VPG_ES11 + ES11_TEXENVIV)
+#define VPC_ES11TEXENVX (VPG_ES11 + ES11_TEXENVX)
+#define VPC_ES11TEXENVXV (VPG_ES11 + ES11_TEXENVXV)
+#define VPC_ES11TEXIMAGE2D (VPG_ES11 + ES11_TEXIMAGE2D)
+#define VPC_ES11TEXPARAMETERF (VPG_ES11 + ES11_TEXPARAMETERF)
+#define VPC_ES11TEXPARAMETERFV (VPG_ES11 + ES11_TEXPARAMETERFV)
+#define VPC_ES11TEXPARAMETERI (VPG_ES11 + ES11_TEXPARAMETERI)
+#define VPC_ES11TEXPARAMETERIV (VPG_ES11 + ES11_TEXPARAMETERIV)
+#define VPC_ES11TEXPARAMETERX (VPG_ES11 + ES11_TEXPARAMETERX)
+#define VPC_ES11TEXPARAMETERXV (VPG_ES11 + ES11_TEXPARAMETERXV)
+#define VPC_ES11TEXSUBIMAGE2D (VPG_ES11 + ES11_TEXSUBIMAGE2D)
+#define VPC_ES11TRANSLATEF (VPG_ES11 + ES11_TRANSLATEF)
+#define VPC_ES11TRANSLATEX (VPG_ES11 + ES11_TRANSLATEX)
+#define VPC_ES11VERTEXPOINTER (VPG_ES11 + ES11_VERTEXPOINTER)
+#define VPC_ES11VIEWPORT (VPG_ES11 + ES11_VIEWPORT)
+/* OpenGL ES11 Statics Counter IDs. */
+#define VPC_ES11CALLS (VPG_ES11 + ES11_CALLS)
+#define VPC_ES11DRAWCALLS (VPG_ES11 + ES11_DRAWCALLS)
+#define VPC_ES11STATECHANGECALLS (VPG_ES11 + ES11_STATECHANGECALLS)
+#define VPC_ES11POINTCOUNT (VPG_ES11 + ES11_POINTCOUNT)
+#define VPC_ES11LINECOUNT (VPG_ES11 + ES11_LINECOUNT)
+#define VPC_ES11TRIANGLECOUNT (VPG_ES11 + ES11_TRIANGLECOUNT)
+
+/* OpenGLES 2.x */
+#define VPC_ES20ACTIVETEXTURE (VPG_ES20 + ES20_ACTIVETEXTURE)
+#define VPC_ES20ATTACHSHADER (VPG_ES20 + ES20_ATTACHSHADER)
+#define VPC_ES20BINDATTRIBLOCATION (VPG_ES20 + ES20_BINDATTRIBLOCATION)
+#define VPC_ES20BINDBUFFER (VPG_ES20 + ES20_BINDBUFFER)
+#define VPC_ES20BINDFRAMEBUFFER (VPG_ES20 + ES20_BINDFRAMEBUFFER)
+#define VPC_ES20BINDRENDERBUFFER (VPG_ES20 + ES20_BINDRENDERBUFFER)
+#define VPC_ES20BINDTEXTURE (VPG_ES20 + ES20_BINDTEXTURE)
+#define VPC_ES20BLENDCOLOR (VPG_ES20 + ES20_BLENDCOLOR)
+#define VPC_ES20BLENDEQUATION (VPG_ES20 + ES20_BLENDEQUATION)
+#define VPC_ES20BLENDEQUATIONSEPARATE (VPG_ES20 + ES20_BLENDEQUATIONSEPARATE)
+#define VPC_ES20BLENDFUNC (VPG_ES20 + ES20_BLENDFUNC)
+#define VPC_ES20BLENDFUNCSEPARATE (VPG_ES20 + ES20_BLENDFUNCSEPARATE)
+#define VPC_ES20BUFFERDATA (VPG_ES20 + ES20_BUFFERDATA)
+#define VPC_ES20BUFFERSUBDATA (VPG_ES20 + ES20_BUFFERSUBDATA)
+#define VPC_ES20CHECKFRAMEBUFFERSTATUS (VPG_ES20 + ES20_CHECKFRAMEBUFFERSTATUS)
+#define VPC_ES20CLEAR (VPG_ES20 + ES20_CLEAR)
+#define VPC_ES20CLEARCOLOR (VPG_ES20 + ES20_CLEARCOLOR)
+#define VPC_ES20CLEARDEPTHF (VPG_ES20 + ES20_CLEARDEPTHF)
+#define VPC_ES20CLEARSTENCIL (VPG_ES20 + ES20_CLEARSTENCIL)
+#define VPC_ES20COLORMASK (VPG_ES20 + ES20_COLORMASK)
+#define VPC_ES20COMPILESHADER (VPG_ES20 + ES20_COMPILESHADER)
+#define VPC_ES20COMPRESSEDTEXIMAGE2D (VPG_ES20 + ES20_COMPRESSEDTEXIMAGE2D)
+#define VPC_ES20COMPRESSEDTEXSUBIMAGE2D (VPG_ES20 + ES20_COMPRESSEDTEXSUBIMAGE2D)
+#define VPC_ES20COPYTEXIMAGE2D (VPG_ES20 + ES20_COPYTEXIMAGE2D)
+#define VPC_ES20COPYTEXSUBIMAGE2D (VPG_ES20 + ES20_COPYTEXSUBIMAGE2D)
+#define VPC_ES20CREATEPROGRAM (VPG_ES20 + ES20_CREATEPROGRAM)
+#define VPC_ES20CREATESHADER (VPG_ES20 + ES20_CREATESHADER)
+#define VPC_ES20CULLFACE (VPG_ES20 + ES20_CULLFACE)
+#define VPC_ES20DELETEBUFFERS (VPG_ES20 + ES20_DELETEBUFFERS)
+#define VPC_ES20DELETEFRAMEBUFFERS (VPG_ES20 + ES20_DELETEFRAMEBUFFERS)
+#define VPC_ES20DELETEPROGRAM (VPG_ES20 + ES20_DELETEPROGRAM)
+#define VPC_ES20DELETERENDERBUFFERS (VPG_ES20 + ES20_DELETERENDERBUFFERS)
+#define VPC_ES20DELETESHADER (VPG_ES20 + ES20_DELETESHADER)
+#define VPC_ES20DELETETEXTURES (VPG_ES20 + ES20_DELETETEXTURES)
+#define VPC_ES20DEPTHFUNC (VPG_ES20 + ES20_DEPTHFUNC)
+#define VPC_ES20DEPTHMASK (VPG_ES20 + ES20_DEPTHMASK)
+#define VPC_ES20DEPTHRANGEF (VPG_ES20 + ES20_DEPTHRANGEF)
+#define VPC_ES20DETACHSHADER (VPG_ES20 + ES20_DETACHSHADER)
+#define VPC_ES20DISABLE (VPG_ES20 + ES20_DISABLE)
+#define VPC_ES20DISABLEVERTEXATTRIBARRAY (VPG_ES20 + ES20_DISABLEVERTEXATTRIBARRAY)
+#define VPC_ES20DRAWARRAYS (VPG_ES20 + ES20_DRAWARRAYS)
+#define VPC_ES20DRAWELEMENTS (VPG_ES20 + ES20_DRAWELEMENTS)
+#define VPC_ES20ENABLE (VPG_ES20 + ES20_ENABLE)
+#define VPC_ES20ENABLEVERTEXATTRIBARRAY (VPG_ES20 + ES20_ENABLEVERTEXATTRIBARRAY)
+#define VPC_ES20FINISH (VPG_ES20 + ES20_FINISH)
+#define VPC_ES20FLUSH (VPG_ES20 + ES20_FLUSH)
+#define VPC_ES20FRAMEBUFFERRENDERBUFFER (VPG_ES20 + ES20_FRAMEBUFFERRENDERBUFFER)
+#define VPC_ES20FRAMEBUFFERTEXTURE2D (VPG_ES20 + ES20_FRAMEBUFFERTEXTURE2D)
+#define VPC_ES20FRONTFACE (VPG_ES20 + ES20_FRONTFACE)
+#define VPC_ES20GENBUFFERS (VPG_ES20 + ES20_GENBUFFERS)
+#define VPC_ES20GENERATEMIPMAP (VPG_ES20 + ES20_GENERATEMIPMAP)
+#define VPC_ES20GENFRAMEBUFFERS (VPG_ES20 + ES20_GENFRAMEBUFFERS)
+#define VPC_ES20GENRENDERBUFFERS (VPG_ES20 + ES20_GENRENDERBUFFERS)
+#define VPC_ES20GENTEXTURES (VPG_ES20 + ES20_GENTEXTURES)
+#define VPC_ES20GETACTIVEATTRIB (VPG_ES20 + ES20_GETACTIVEATTRIB)
+#define VPC_ES20GETACTIVEUNIFORM (VPG_ES20 + ES20_GETACTIVEUNIFORM)
+#define VPC_ES20GETATTACHEDSHADERS (VPG_ES20 + ES20_GETATTACHEDSHADERS)
+#define VPC_ES20GETATTRIBLOCATION (VPG_ES20 + ES20_GETATTRIBLOCATION)
+#define VPC_ES20GETBOOLEANV (VPG_ES20 + ES20_GETBOOLEANV)
+#define VPC_ES20GETBUFFERPARAMETERIV (VPG_ES20 + ES20_GETBUFFERPARAMETERIV)
+#define VPC_ES20GETERROR (VPG_ES20 + ES20_GETERROR)
+#define VPC_ES20GETFLOATV (VPG_ES20 + ES20_GETFLOATV)
+#define VPC_ES20GETFRAMEBUFFERATTACHMENTPARAMETERIV (VPG_ES20 + ES20_GETFRAMEBUFFERATTACHMENTPARAMETERIV)
+#define VPC_ES20GETINTEGERV (VPG_ES20 + ES20_GETINTEGERV)
+#define VPC_ES20GETPROGRAMIV (VPG_ES20 + ES20_GETPROGRAMIV)
+#define VPC_ES20GETPROGRAMINFOLOG (VPG_ES20 + ES20_GETPROGRAMINFOLOG)
+#define VPC_ES20GETRENDERBUFFERPARAMETERIV (VPG_ES20 + ES20_GETRENDERBUFFERPARAMETERIV)
+#define VPC_ES20GETSHADERIV (VPG_ES20 + ES20_GETSHADERIV)
+#define VPC_ES20GETSHADERINFOLOG (VPG_ES20 + ES20_GETSHADERINFOLOG)
+#define VPC_ES20GETSHADERPRECISIONFORMAT (VPG_ES20 + ES20_GETSHADERPRECISIONFORMAT)
+#define VPC_ES20GETSHADERSOURCE (VPG_ES20 + ES20_GETSHADERSOURCE)
+#define VPC_ES20GETSTRING (VPG_ES20 + ES20_GETSTRING)
+#define VPC_ES20GETTEXPARAMETERFV (VPG_ES20 + ES20_GETTEXPARAMETERFV)
+#define VPC_ES20GETTEXPARAMETERIV (VPG_ES20 + ES20_GETTEXPARAMETERIV)
+#define VPC_ES20GETUNIFORMFV (VPG_ES20 + ES20_GETUNIFORMFV)
+#define VPC_ES20GETUNIFORMIV (VPG_ES20 + ES20_GETUNIFORMIV)
+#define VPC_ES20GETUNIFORMLOCATION (VPG_ES20 + ES20_GETUNIFORMLOCATION)
+#define VPC_ES20GETVERTEXATTRIBFV (VPG_ES20 + ES20_GETVERTEXATTRIBFV)
+#define VPC_ES20GETVERTEXATTRIBIV (VPG_ES20 + ES20_GETVERTEXATTRIBIV)
+#define VPC_ES20GETVERTEXATTRIBPOINTERV (VPG_ES20 + ES20_GETVERTEXATTRIBPOINTERV)
+#define VPC_ES20HINT (VPG_ES20 + ES20_HINT)
+#define VPC_ES20ISBUFFER (VPG_ES20 + ES20_ISBUFFER)
+#define VPC_ES20ISENABLED (VPG_ES20 + ES20_ISENABLED)
+#define VPC_ES20ISFRAMEBUFFER (VPG_ES20 + ES20_ISFRAMEBUFFER)
+#define VPC_ES20ISPROGRAM (VPG_ES20 + ES20_ISPROGRAM)
+#define VPC_ES20ISRENDERBUFFER (VPG_ES20 + ES20_ISRENDERBUFFER)
+#define VPC_ES20ISSHADER (VPG_ES20 + ES20_ISSHADER)
+#define VPC_ES20ISTEXTURE (VPG_ES20 + ES20_ISTEXTURE)
+#define VPC_ES20LINEWIDTH (VPG_ES20 + ES20_LINEWIDTH)
+#define VPC_ES20LINKPROGRAM (VPG_ES20 + ES20_LINKPROGRAM)
+#define VPC_ES20PIXELSTOREI (VPG_ES20 + ES20_PIXELSTOREI)
+#define VPC_ES20POLYGONOFFSET (VPG_ES20 + ES20_POLYGONOFFSET)
+#define VPC_ES20READPIXELS (VPG_ES20 + ES20_READPIXELS)
+#define VPC_ES20RELEASESHADERCOMPILER (VPG_ES20 + ES20_RELEASESHADERCOMPILER)
+#define VPC_ES20RENDERBUFFERSTORAGE (VPG_ES20 + ES20_RENDERBUFFERSTORAGE)
+#define VPC_ES20SAMPLECOVERAGE (VPG_ES20 + ES20_SAMPLECOVERAGE)
+#define VPC_ES20SCISSOR (VPG_ES20 + ES20_SCISSOR)
+#define VPC_ES20SHADERBINARY (VPG_ES20 + ES20_SHADERBINARY)
+#define VPC_ES20SHADERSOURCE (VPG_ES20 + ES20_SHADERSOURCE)
+#define VPC_ES20STENCILFUNC (VPG_ES20 + ES20_STENCILFUNC)
+#define VPC_ES20STENCILFUNCSEPARATE (VPG_ES20 + ES20_STENCILFUNCSEPARATE)
+#define VPC_ES20STENCILMASK (VPG_ES20 + ES20_STENCILMASK)
+#define VPC_ES20STENCILMASKSEPARATE (VPG_ES20 + ES20_STENCILMASKSEPARATE)
+#define VPC_ES20STENCILOP (VPG_ES20 + ES20_STENCILOP)
+#define VPC_ES20STENCILOPSEPARATE (VPG_ES20 + ES20_STENCILOPSEPARATE)
+#define VPC_ES20TEXIMAGE2D (VPG_ES20 + ES20_TEXIMAGE2D)
+#define VPC_ES20TEXPARAMETERF (VPG_ES20 + ES20_TEXPARAMETERF)
+#define VPC_ES20TEXPARAMETERFV (VPG_ES20 + ES20_TEXPARAMETERFV)
+#define VPC_ES20TEXPARAMETERI (VPG_ES20 + ES20_TEXPARAMETERI)
+#define VPC_ES20TEXPARAMETERIV (VPG_ES20 + ES20_TEXPARAMETERIV)
+#define VPC_ES20TEXSUBIMAGE2D (VPG_ES20 + ES20_TEXSUBIMAGE2D)
+#define VPC_ES20UNIFORM1F (VPG_ES20 + ES20_UNIFORM1F)
+#define VPC_ES20UNIFORM1FV (VPG_ES20 + ES20_UNIFORM1FV)
+#define VPC_ES20UNIFORM1I (VPG_ES20 + ES20_UNIFORM1I)
+#define VPC_ES20UNIFORM1IV (VPG_ES20 + ES20_UNIFORM1IV)
+#define VPC_ES20UNIFORM2F (VPG_ES20 + ES20_UNIFORM2F)
+#define VPC_ES20UNIFORM2FV (VPG_ES20 + ES20_UNIFORM2FV)
+#define VPC_ES20UNIFORM2I (VPG_ES20 + ES20_UNIFORM2I)
+#define VPC_ES20UNIFORM2IV (VPG_ES20 + ES20_UNIFORM2IV)
+#define VPC_ES20UNIFORM3F (VPG_ES20 + ES20_UNIFORM3F)
+#define VPC_ES20UNIFORM3FV (VPG_ES20 + ES20_UNIFORM3FV)
+#define VPC_ES20UNIFORM3I (VPG_ES20 + ES20_UNIFORM3I)
+#define VPC_ES20UNIFORM3IV (VPG_ES20 + ES20_UNIFORM3IV)
+#define VPC_ES20UNIFORM4F (VPG_ES20 + ES20_UNIFORM4F)
+#define VPC_ES20UNIFORM4FV (VPG_ES20 + ES20_UNIFORM4FV)
+#define VPC_ES20UNIFORM4I (VPG_ES20 + ES20_UNIFORM4I)
+#define VPC_ES20UNIFORM4IV (VPG_ES20 + ES20_UNIFORM4IV)
+#define VPC_ES20UNIFORMMATRIX2FV (VPG_ES20 + ES20_UNIFORMMATRIX2FV)
+#define VPC_ES20UNIFORMMATRIX3FV (VPG_ES20 + ES20_UNIFORMMATRIX3FV)
+#define VPC_ES20UNIFORMMATRIX4FV (VPG_ES20 + ES20_UNIFORMMATRIX4FV)
+#define VPC_ES20USEPROGRAM (VPG_ES20 + ES20_USEPROGRAM)
+#define VPC_ES20VALIDATEPROGRAM (VPG_ES20 + ES20_VALIDATEPROGRAM)
+#define VPC_ES20VERTEXATTRIB1F (VPG_ES20 + ES20_VERTEXATTRIB1F)
+#define VPC_ES20VERTEXATTRIB1FV (VPG_ES20 + ES20_VERTEXATTRIB1FV)
+#define VPC_ES20VERTEXATTRIB2F (VPG_ES20 + ES20_VERTEXATTRIB2F)
+#define VPC_ES20VERTEXATTRIB2FV (VPG_ES20 + ES20_VERTEXATTRIB2FV)
+#define VPC_ES20VERTEXATTRIB3F (VPG_ES20 + ES20_VERTEXATTRIB3F)
+#define VPC_ES20VERTEXATTRIB3FV (VPG_ES20 + ES20_VERTEXATTRIB3FV)
+#define VPC_ES20VERTEXATTRIB4F (VPG_ES20 + ES20_VERTEXATTRIB4F)
+#define VPC_ES20VERTEXATTRIB4FV (VPG_ES20 + ES20_VERTEXATTRIB4FV)
+#define VPC_ES20VERTEXATTRIBPOINTER (VPG_ES20 + ES20_VERTEXATTRIBPOINTER)
+#define VPC_ES20VIEWPORT (VPG_ES20 + ES20_VIEWPORT)
+/* OpenGL ES20 Statistics Counter IDs. */
+#define VPC_ES20CALLS (VPG_ES20 + ES20_CALLS)
+#define VPC_ES20DRAWCALLS (VPG_ES20 + ES20_DRAWCALLS)
+#define VPC_ES20STATECHANGECALLS (VPG_ES20 + ES20_STATECHANGECALLS)
+#define VPC_ES20POINTCOUNT (VPG_ES20 + ES20_POINTCOUNT)
+#define VPC_ES20LINECOUNT (VPG_ES20 + ES20_LINECOUNT)
+#define VPC_ES20TRIANGLECOUNT (VPG_ES20 + ES20_TRIANGLECOUNT)
+
+/* VG11 Counters. */
+#define VPC_VG11APPENDPATH (VPG_VG11 + VG11_APPENDPATH)
+#define VPC_VG11APPENDPATHDATA (VPG_VG11 + VG11_APPENDPATHDATA)
+#define VPC_VG11CHILDIMAGE (VPG_VG11 + VG11_CHILDIMAGE)
+#define VPC_VG11CLEAR (VPG_VG11 + VG11_CLEAR)
+#define VPC_VG11CLEARGLYPH (VPG_VG11 + VG11_CLEARGLYPH)
+#define VPC_VG11CLEARIMAGE (VPG_VG11 + VG11_CLEARIMAGE)
+#define VPC_VG11CLEARPATH (VPG_VG11 + VG11_CLEARPATH)
+#define VPC_VG11COLORMATRIX (VPG_VG11 + VG11_COLORMATRIX)
+#define VPC_VG11CONVOLVE (VPG_VG11 + VG11_CONVOLVE)
+#define VPC_VG11COPYIMAGE (VPG_VG11 + VG11_COPYIMAGE)
+#define VPC_VG11COPYMASK (VPG_VG11 + VG11_COPYMASK)
+#define VPC_VG11COPYPIXELS (VPG_VG11 + VG11_COPYPIXELS)
+#define VPC_VG11CREATEFONT (VPG_VG11 + VG11_CREATEFONT)
+#define VPC_VG11CREATEIMAGE (VPG_VG11 + VG11_CREATEIMAGE)
+#define VPC_VG11CREATEMASKLAYER (VPG_VG11 + VG11_CREATEMASKLAYER)
+#define VPC_VG11CREATEPAINT (VPG_VG11 + VG11_CREATEPAINT)
+#define VPC_VG11CREATEPATH (VPG_VG11 + VG11_CREATEPATH)
+#define VPC_VG11DESTROYFONT (VPG_VG11 + VG11_DESTROYFONT)
+#define VPC_VG11DESTROYIMAGE (VPG_VG11 + VG11_DESTROYIMAGE)
+#define VPC_VG11DESTROYMASKLAYER (VPG_VG11 + VG11_DESTROYMASKLAYER)
+#define VPC_VG11DESTROYPAINT (VPG_VG11 + VG11_DESTROYPAINT)
+#define VPC_VG11DESTROYPATH (VPG_VG11 + VG11_DESTROYPATH)
+#define VPC_VG11DRAWGLYPH (VPG_VG11 + VG11_DRAWGLYPH)
+#define VPC_VG11DRAWGLYPHS (VPG_VG11 + VG11_DRAWGLYPHS)
+#define VPC_VG11DRAWIMAGE (VPG_VG11 + VG11_DRAWIMAGE)
+#define VPC_VG11DRAWPATH (VPG_VG11 + VG11_DRAWPATH)
+#define VPC_VG11FILLMASKLAYER (VPG_VG11 + VG11_FILLMASKLAYER)
+#define VPC_VG11FINISH (VPG_VG11 + VG11_FINISH)
+#define VPC_VG11FLUSH (VPG_VG11 + VG11_FLUSH)
+#define VPC_VG11GAUSSIANBLUR (VPG_VG11 + VG11_GAUSSIANBLUR)
+#define VPC_VG11GETCOLOR (VPG_VG11 + VG11_GETCOLOR)
+#define VPC_VG11GETERROR (VPG_VG11 + VG11_GETERROR)
+#define VPC_VG11GETF (VPG_VG11 + VG11_GETF)
+#define VPC_VG11GETFV (VPG_VG11 + VG11_GETFV)
+#define VPC_VG11GETI (VPG_VG11 + VG11_GETI)
+#define VPC_VG11GETIMAGESUBDATA (VPG_VG11 + VG11_GETIMAGESUBDATA)
+#define VPC_VG11GETIV (VPG_VG11 + VG11_GETIV)
+#define VPC_VG11GETMATRIX (VPG_VG11 + VG11_GETMATRIX)
+#define VPC_VG11GETPAINT (VPG_VG11 + VG11_GETPAINT)
+#define VPC_VG11GETPARAMETERF (VPG_VG11 + VG11_GETPARAMETERF)
+#define VPC_VG11GETPARAMETERFV (VPG_VG11 + VG11_GETPARAMETERFV)
+#define VPC_VG11GETPARAMETERI (VPG_VG11 + VG11_GETPARAMETERI)
+#define VPC_VG11GETPARAMETERIV (VPG_VG11 + VG11_GETPARAMETERIV)
+#define VPC_VG11GETPARAMETERVECTORSIZE (VPG_VG11 + VG11_GETPARAMETERVECTORSIZE)
+#define VPC_VG11GETPARENT (VPG_VG11 + VG11_GETPARENT)
+#define VPC_VG11GETPATHCAPABILITIES (VPG_VG11 + VG11_GETPATHCAPABILITIES)
+#define VPC_VG11GETPIXELS (VPG_VG11 + VG11_GETPIXELS)
+#define VPC_VG11GETSTRING (VPG_VG11 + VG11_GETSTRING)
+#define VPC_VG11GETVECTORSIZE (VPG_VG11 + VG11_GETVECTORSIZE)
+#define VPC_VG11HARDWAREQUERY (VPG_VG11 + VG11_HARDWAREQUERY)
+#define VPC_VG11IMAGESUBDATA (VPG_VG11 + VG11_IMAGESUBDATA)
+#define VPC_VG11INTERPOLATEPATH (VPG_VG11 + VG11_INTERPOLATEPATH)
+#define VPC_VG11LOADIDENTITY (VPG_VG11 + VG11_LOADIDENTITY)
+#define VPC_VG11LOADMATRIX (VPG_VG11 + VG11_LOADMATRIX)
+#define VPC_VG11LOOKUP (VPG_VG11 + VG11_LOOKUP)
+#define VPC_VG11LOOKUPSINGLE (VPG_VG11 + VG11_LOOKUPSINGLE)
+#define VPC_VG11MASK (VPG_VG11 + VG11_MASK)
+#define VPC_VG11MODIFYPATHCOORDS (VPG_VG11 + VG11_MODIFYPATHCOORDS)
+#define VPC_VG11MULTMATRIX (VPG_VG11 + VG11_MULTMATRIX)
+#define VPC_VG11PAINTPATTERN (VPG_VG11 + VG11_PAINTPATTERN)
+#define VPC_VG11PATHBOUNDS (VPG_VG11 + VG11_PATHBOUNDS)
+#define VPC_VG11PATHLENGTH (VPG_VG11 + VG11_PATHLENGTH)
+#define VPC_VG11PATHTRANSFORMEDBOUNDS (VPG_VG11 + VG11_PATHTRANSFORMEDBOUNDS)
+#define VPC_VG11POINTALONGPATH (VPG_VG11 + VG11_POINTALONGPATH)
+#define VPC_VG11READPIXELS (VPG_VG11 + VG11_READPIXELS)
+#define VPC_VG11REMOVEPATHCAPABILITIES (VPG_VG11 + VG11_REMOVEPATHCAPABILITIES)
+#define VPC_VG11RENDERTOMASK (VPG_VG11 + VG11_RENDERTOMASK)
+#define VPC_VG11ROTATE (VPG_VG11 + VG11_ROTATE)
+#define VPC_VG11SCALE (VPG_VG11 + VG11_SCALE)
+#define VPC_VG11SEPARABLECONVOLVE (VPG_VG11 + VG11_SEPARABLECONVOLVE)
+#define VPC_VG11SETCOLOR (VPG_VG11 + VG11_SETCOLOR)
+#define VPC_VG11SETF (VPG_VG11 + VG11_SETF)
+#define VPC_VG11SETFV (VPG_VG11 + VG11_SETFV)
+#define VPC_VG11SETGLYPHTOIMAGE (VPG_VG11 + VG11_SETGLYPHTOIMAGE)
+#define VPC_VG11SETGLYPHTOPATH (VPG_VG11 + VG11_SETGLYPHTOPATH)
+#define VPC_VG11SETI (VPG_VG11 + VG11_SETI)
+#define VPC_VG11SETIV (VPG_VG11 + VG11_SETIV)
+#define VPC_VG11SETPAINT (VPG_VG11 + VG11_SETPAINT)
+#define VPC_VG11SETPARAMETERF (VPG_VG11 + VG11_SETPARAMETERF)
+#define VPC_VG11SETPARAMETERFV (VPG_VG11 + VG11_SETPARAMETERFV)
+#define VPC_VG11SETPARAMETERI (VPG_VG11 + VG11_SETPARAMETERI)
+#define VPC_VG11SETPARAMETERIV (VPG_VG11 + VG11_SETPARAMETERIV)
+#define VPC_VG11SETPIXELS (VPG_VG11 + VG11_SETPIXELS)
+#define VPC_VG11SHEAR (VPG_VG11 + VG11_SHEAR)
+#define VPC_VG11TRANSFORMPATH (VPG_VG11 + VG11_TRANSFORMPATH)
+#define VPC_VG11TRANSLATE (VPG_VG11 + VG11_TRANSLATE)
+#define VPC_VG11WRITEPIXELS (VPG_VG11 + VG11_WRITEPIXELS)
+/* OpenVG Statistics Counter IDs. */
+#define VPC_VG11CALLS (VPG_VG11 + VG11_CALLS)
+#define VPC_VG11DRAWCALLS (VPG_VG11 + VG11_DRAWCALLS)
+#define VPC_VG11STATECHANGECALLS (VPG_VG11 + VG11_STATECHANGECALLS)
+#define VPC_VG11FILLCOUNT (VPG_VG11 + VG11_FILLCOUNT)
+#define VPC_VG11STROKECOUNT (VPG_VG11 + VG11_STROKECOUNT)
+
+/* HAL Counters. */
+#define VPC_HALVERTBUFNEWBYTEALLOC (VPG_HAL + HAL_VERTBUFNEWBYTEALLOC)
+#define VPC_HALVERTBUFTOTALBYTEALLOC (VPG_HAL + HAL_VERTBUFTOTALBYTEALLOC)
+#define VPC_HALVERTBUFNEWOBJALLOC (VPG_HAL + HAL_VERTBUFNEWOBJALLOC)
+#define VPC_HALVERTBUFTOTALOBJALLOC (VPG_HAL + HAL_VERTBUFTOTALOBJALLOC)
+#define VPC_HALINDBUFNEWBYTEALLOC (VPG_HAL + HAL_INDBUFNEWBYTEALLOC)
+#define VPC_HALINDBUFTOTALBYTEALLOC (VPG_HAL + HAL_INDBUFTOTALBYTEALLOC)
+#define VPC_HALINDBUFNEWOBJALLOC (VPG_HAL + HAL_INDBUFNEWOBJALLOC)
+#define VPC_HALINDBUFTOTALOBJALLOC (VPG_HAL + HAL_INDBUFTOTALOBJALLOC)
+#define VPC_HALTEXBUFNEWBYTEALLOC (VPG_HAL + HAL_TEXBUFNEWBYTEALLOC)
+#define VPC_HALTEXBUFTOTALBYTEALLOC (VPG_HAL + HAL_TEXBUFTOTALBYTEALLOC)
+#define VPC_HALTEXBUFNEWOBJALLOC (VPG_HAL + HAL_TEXBUFNEWOBJALLOC)
+#define VPC_HALTEXBUFTOTALOBJALLOC (VPG_HAL + HAL_TEXBUFTOTALOBJALLOC)
+
+/* HW: GPU Counters. */
+#define VPC_GPUCYCLES (VPG_GPU + GPU_CYCLES)
+#define VPC_GPUREAD64BYTE (VPG_GPU + GPU_READ64BYTE)
+#define VPC_GPUWRITE64BYTE (VPG_GPU + GPU_WRITE64BYTE)
+
+/* HW: Shader Counters. */
+#define VPC_VSINSTCOUNT (VPG_VS + VS_INSTCOUNT)
+#define VPC_VSBRANCHINSTCOUNT (VPG_VS + VS_BRANCHINSTCOUNT)
+#define VPC_VSTEXLDINSTCOUNT (VPG_VS + VS_TEXLDINSTCOUNT)
+#define VPC_VSRENDEREDVERTCOUNT (VPG_VS + VS_RENDEREDVERTCOUNT)
+/* HW: PS Count. */
+#define VPC_PSINSTCOUNT (VPG_PS + PS_INSTCOUNT)
+#define VPC_PSBRANCHINSTCOUNT (VPG_PS + PS_BRANCHINSTCOUNT)
+#define VPC_PSTEXLDINSTCOUNT (VPG_PS + PS_TEXLDINSTCOUNT)
+#define VPC_PSRENDEREDPIXCOUNT (VPG_PS + PS_RENDEREDPIXCOUNT)
+
+
+/* HW: PA Counters. */
+#define VPC_PAINVERTCOUNT (VPG_PA + PA_INVERTCOUNT)
+#define VPC_PAINPRIMCOUNT (VPG_PA + PA_INPRIMCOUNT)
+#define VPC_PAOUTPRIMCOUNT (VPG_PA + PA_OUTPRIMCOUNT)
+#define VPC_PADEPTHCLIPCOUNT (VPG_PA + PA_DEPTHCLIPCOUNT)
+#define VPC_PATRIVIALREJCOUNT (VPG_PA + PA_TRIVIALREJCOUNT)
+#define VPC_PACULLCOUNT (VPG_PA + PA_CULLCOUNT)
+
+/* HW: Setup Counters. */
+#define VPC_SETRIANGLECOUNT (VPG_SETUP + SE_TRIANGLECOUNT)
+#define VPC_SELINECOUNT (VPG_SETUP + SE_LINECOUNT)
+
+/* HW: RA Counters. */
+#define VPC_RAVALIDPIXCOUNT (VPG_RA + RA_VALIDPIXCOUNT)
+#define VPC_RATOTALQUADCOUNT (VPG_RA + RA_TOTALQUADCOUNT)
+#define VPC_RAVALIDQUADCOUNTEZ (VPG_RA + RA_VALIDQUADCOUNTEZ)
+#define VPC_RATOTALPRIMCOUNT (VPG_RA + RA_TOTALPRIMCOUNT)
+#define VPC_RAPIPECACHEMISSCOUNT (VPG_RA + RA_PIPECACHEMISSCOUNT)
+#define VPC_RAPREFCACHEMISSCOUNT (VPG_RA + RA_PREFCACHEMISSCOUNT)
+#define VPC_RAEEZCULLCOUNT (VPG_RA + RA_EEZCULLCOUNT)
+
+/* HW: TEX Counters. */
+#define VPC_TXTOTBILINEARREQ (VPG_TX + TX_TOTBILINEARREQ)
+#define VPC_TXTOTTRILINEARREQ (VPG_TX + TX_TOTTRILINEARREQ)
+#define VPC_TXTOTDISCARDTEXREQ (VPG_TX + TX_TOTDISCARDTEXREQ)
+#define VPC_TXTOTTEXREQ (VPG_TX + TX_TOTTEXREQ)
+#define VPC_TXMEMREADCOUNT (VPG_TX + TX_MEMREADCOUNT)
+#define VPC_TXMEMREADIN8BCOUNT (VPG_TX + TX_MEMREADIN8BCOUNT)
+#define VPC_TXCACHEMISSCOUNT (VPG_TX + TX_CACHEMISSCOUNT)
+#define VPC_TXCACHEHITTEXELCOUNT (VPG_TX + TX_CACHEHITTEXELCOUNT)
+#define VPC_TXCACHEMISSTEXELCOUNT (VPG_TX + TX_CACHEMISSTEXELCOUNT)
+
+/* HW: PE Counters. */
+#define VPC_PEKILLEDBYCOLOR (VPG_PE + PE_KILLEDBYCOLOR)
+#define VPC_PEKILLEDBYDEPTH (VPG_PE + PE_KILLEDBYDEPTH)
+#define VPC_PEDRAWNBYCOLOR (VPG_PE + PE_DRAWNBYCOLOR)
+#define VPC_PEDRAWNBYDEPTH (VPG_PE + PE_DRAWNBYDEPTH)
+
+/* HW: MC Counters. */
+#define VPC_MCREADREQ8BPIPE (VPG_MC + MC_READREQ8BPIPE)
+#define VPC_MCREADREQ8BIP (VPG_MC + MC_READREQ8BIP)
+#define VPC_MCWRITEREQ8BPIPE (VPG_MC + MC_WRITEREQ8BPIPE)
+
+/* HW: AXI Counters. */
+#define VPC_AXIREADREQSTALLED (VPG_AXI + AXI_READREQSTALLED)
+#define VPC_AXIWRITEREQSTALLED (VPG_AXI + AXI_WRITEREQSTALLED)
+#define VPC_AXIWRITEDATASTALLED (VPG_AXI + AXI_WRITEDATASTALLED)
+
+/* PROGRAM: Shader program counters. */
+#define VPC_PVSINSTRCOUNT (VPG_PVS + PVS_INSTRCOUNT)
+#define VPC_PVSALUINSTRCOUNT (VPG_PVS + PVS_ALUINSTRCOUNT)
+#define VPC_PVSTEXINSTRCOUNT (VPG_PVS + PVS_TEXINSTRCOUNT)
+#define VPC_PVSATTRIBCOUNT (VPG_PVS + PVS_ATTRIBCOUNT)
+#define VPC_PVSUNIFORMCOUNT (VPG_PVS + PVS_UNIFORMCOUNT)
+#define VPC_PVSFUNCTIONCOUNT (VPG_PVS + PVS_FUNCTIONCOUNT)
+
+#define VPC_PPSINSTRCOUNT (VPG_PPS + PPS_INSTRCOUNT)
+#define VPC_PPSALUINSTRCOUNT (VPG_PPS + PPS_ALUINSTRCOUNT)
+#define VPC_PPSTEXINSTRCOUNT (VPG_PPS + PPS_TEXINSTRCOUNT)
+#define VPC_PPSATTRIBCOUNT (VPG_PPS + PPS_ATTRIBCOUNT)
+#define VPC_PPSUNIFORMCOUNT (VPG_PPS + PPS_UNIFORMCOUNT)
+#define VPC_PPSFUNCTIONCOUNT (VPG_PPS + PPS_FUNCTIONCOUNT)
+
+#endif
+
+
+/* HW profile information. */
+typedef struct _gcsPROFILER_COUNTERS
+{
+ /* HW static counters. */
+ gctUINT32 gpuClock;
+ gctUINT32 axiClock;
+ gctUINT32 shaderClock;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuClockStart;
+ gctUINT32 gpuClockEnd;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuCyclesCounter;
+ gctUINT32 gpuTotalRead64BytesPerFrame;
+ gctUINT32 gpuTotalWrite64BytesPerFrame;
+
+ /* PE */
+ gctUINT32 pe_pixel_count_killed_by_color_pipe;
+ gctUINT32 pe_pixel_count_killed_by_depth_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_color_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_depth_pipe;
+
+ /* SH */
+ gctUINT32 ps_inst_counter;
+ gctUINT32 rendered_pixel_counter;
+ gctUINT32 vs_inst_counter;
+ gctUINT32 rendered_vertice_counter;
+ gctUINT32 vtx_branch_inst_counter;
+ gctUINT32 vtx_texld_inst_counter;
+ gctUINT32 pxl_branch_inst_counter;
+ gctUINT32 pxl_texld_inst_counter;
+
+ /* PA */
+ gctUINT32 pa_input_vtx_counter;
+ gctUINT32 pa_input_prim_counter;
+ gctUINT32 pa_output_prim_counter;
+ gctUINT32 pa_depth_clipped_counter;
+ gctUINT32 pa_trivial_rejected_counter;
+ gctUINT32 pa_culled_counter;
+
+ /* SE */
+ gctUINT32 se_culled_triangle_count;
+ gctUINT32 se_culled_lines_count;
+
+ /* RA */
+ gctUINT32 ra_valid_pixel_count;
+ gctUINT32 ra_total_quad_count;
+ gctUINT32 ra_valid_quad_count_after_early_z;
+ gctUINT32 ra_total_primitive_count;
+ gctUINT32 ra_pipe_cache_miss_counter;
+ gctUINT32 ra_prefetch_cache_miss_counter;
+ gctUINT32 ra_eez_culled_counter;
+
+ /* TX */
+ gctUINT32 tx_total_bilinear_requests;
+ gctUINT32 tx_total_trilinear_requests;
+ gctUINT32 tx_total_discarded_texture_requests;
+ gctUINT32 tx_total_texture_requests;
+ gctUINT32 tx_mem_read_count;
+ gctUINT32 tx_mem_read_in_8B_count;
+ gctUINT32 tx_cache_miss_count;
+ gctUINT32 tx_cache_hit_texel_count;
+ gctUINT32 tx_cache_miss_texel_count;
+
+ /* MC */
+ gctUINT32 mc_total_read_req_8B_from_pipeline;
+ gctUINT32 mc_total_read_req_8B_from_IP;
+ gctUINT32 mc_total_write_req_8B_from_pipeline;
+
+ /* HI */
+ gctUINT32 hi_axi_cycles_read_request_stalled;
+ gctUINT32 hi_axi_cycles_write_request_stalled;
+ gctUINT32 hi_axi_cycles_write_data_stalled;
+}
+gcsPROFILER_COUNTERS;
+
+/* HAL profile information. */
+typedef struct _gcsPROFILER
+{
+ gctUINT32 enable;
+ gctBOOL enableHal;
+ gctBOOL enableHW;
+ gctBOOL enableSH;
+
+ gctBOOL useSocket;
+ gctINT sockFd;
+
+ gctFILE file;
+
+ /* Aggregate Information */
+
+ /* Clock Info */
+ gctUINT64 frameStart;
+ gctUINT64 frameEnd;
+
+ /* Current frame information */
+ gctUINT32 frameNumber;
+ gctUINT64 frameStartTimeusec;
+ gctUINT64 frameEndTimeusec;
+ gctUINT64 frameStartCPUTimeusec;
+ gctUINT64 frameEndCPUTimeusec;
+
+#if PROFILE_HAL_COUNTERS
+ gctUINT32 vertexBufferTotalBytesAlloc;
+ gctUINT32 vertexBufferNewBytesAlloc;
+ int vertexBufferTotalObjectsAlloc;
+ int vertexBufferNewObjectsAlloc;
+
+ gctUINT32 indexBufferTotalBytesAlloc;
+ gctUINT32 indexBufferNewBytesAlloc;
+ int indexBufferTotalObjectsAlloc;
+ int indexBufferNewObjectsAlloc;
+
+ gctUINT32 textureBufferTotalBytesAlloc;
+ gctUINT32 textureBufferNewBytesAlloc;
+ int textureBufferTotalObjectsAlloc;
+ int textureBufferNewObjectsAlloc;
+
+ gctUINT32 numCommits;
+ gctUINT32 drawPointCount;
+ gctUINT32 drawLineCount;
+ gctUINT32 drawTriangleCount;
+ gctUINT32 drawVertexCount;
+ gctUINT32 redundantStateChangeCalls;
+#endif
+
+ gctUINT32 prevVSInstCount;
+ gctUINT32 prevVSBranchInstCount;
+ gctUINT32 prevVSTexInstCount;
+ gctUINT32 prevVSVertexCount;
+ gctUINT32 prevPSInstCount;
+ gctUINT32 prevPSBranchInstCount;
+ gctUINT32 prevPSTexInstCount;
+ gctUINT32 prevPSPixelCount;
+
+}
+gcsPROFILER;
+
+/* Memory profile information. */
+struct _gcsMemProfile
+{
+ /* Memory Usage */
+ gctUINT32 videoMemUsed;
+ gctUINT32 systemMemUsed;
+ gctUINT32 commitBufferSize;
+ gctUINT32 contextBufferCopyBytes;
+};
+
+/* Shader profile information. */
+struct _gcsSHADER_PROFILER
+{
+ gctUINT32 shaderLength;
+ gctUINT32 shaderALUCycles;
+ gctUINT32 shaderTexLoadCycles;
+ gctUINT32 shaderTempRegCount;
+ gctUINT32 shaderSamplerRegCount;
+ gctUINT32 shaderInputRegCount;
+ gctUINT32 shaderOutputRegCount;
+};
+
+/* Initialize the gcsProfiler. */
+gceSTATUS
+gcoPROFILER_Initialize(
+ IN gcoHAL Hal
+ );
+
+/* Destroy the gcProfiler. */
+gceSTATUS
+gcoPROFILER_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Write data to profiler. */
+gceSTATUS
+gcoPROFILER_Write(
+ IN gcoHAL Hal,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Flush data out. */
+gceSTATUS
+gcoPROFILER_Flush(
+ IN gcoHAL Hal
+ );
+
+/* Call to signal end of frame. */
+gceSTATUS
+gcoPROFILER_EndFrame(
+ IN gcoHAL Hal
+ );
+
+/* Increase profile counter Enum by Value. */
+gceSTATUS
+gcoPROFILER_Count(
+ IN gcoHAL Hal,
+ IN gctUINT32 Enum,
+ IN gctINT Value
+ );
+
+/* Profile input vertex shader. */
+gceSTATUS
+gcoPROFILER_ShaderVS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Vs
+ );
+
+/* Profile input fragment shader. */
+gceSTATUS
+gcoPROFILER_ShaderFS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Fs
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_profiler_h_ */
diff --git a/src/include_eureka/gc_hal_raster.h b/src/include_eureka/gc_hal_raster.h
new file mode 100644
index 0000000..c303462
--- /dev/null
+++ b/src/include_eureka/gc_hal_raster.h
@@ -0,0 +1,933 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_raster_h_
+#define __gc_hal_raster_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoBRUSH * gcoBRUSH;
+typedef struct _gcoBRUSH_CACHE * gcoBRUSH_CACHE;
+
+/******************************************************************************\
+******************************** gcoBRUSH Object *******************************
+\******************************************************************************/
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructSingleColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructMonochrome(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Destroy an gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_Destroy(
+ IN gcoBRUSH Brush
+ );
+
+/******************************************************************************\
+******************************** gcoSURF Object *******************************
+\******************************************************************************/
+
+/* Set cipping rectangle. */
+gceSTATUS
+gcoSURF_SetClipping(
+ IN gcoSURF Surface
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gcoSURF_Clear2D(
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 LoColor,
+ IN gctUINT32 HiColor
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gcoSURF_Line(
+ IN gcoSURF Surface,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop
+ );
+
+/* Generic rectangular blit. */
+gceSTATUS
+gcoSURF_Blit(
+ IN OPTIONAL gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN OPTIONAL gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN OPTIONAL gceSURF_TRANSPARENCY Transparency,
+ IN OPTIONAL gctUINT32 TransparencyColor,
+ IN OPTIONAL gctPOINTER Mask,
+ IN OPTIONAL gceSURF_MONOPACK MaskPack
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gcoSURF_MonoBlit(
+ IN gcoSURF DestSurface,
+ IN gctPOINTER Source,
+ IN gceSURF_MONOPACK SourcePack,
+ IN gcsPOINT_PTR SourceSize,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Filter blit. */
+gceSTATUS
+gcoSURF_FilterBlit(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gcoSURF_EnableAlphaBlend(
+ IN gcoSURF Surface,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gcoSURF_DisableAlphaBlend(
+ IN gcoSURF Surface
+ );
+
+/* Copy a rectangular area with format conversion. */
+gceSTATUS
+gcoSURF_CopyPixels(
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctINT SourceX,
+ IN gctINT SourceY,
+ IN gctINT TargetX,
+ IN gctINT TargetY,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+/* Read surface pixel. */
+gceSTATUS
+gcoSURF_ReadPixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ OUT gctPOINTER PixelValue
+ );
+
+/* Write surface pixel. */
+gceSTATUS
+gcoSURF_WritePixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ IN gctPOINTER PixelValue
+ );
+
+gceSTATUS
+gcoSURF_SetDither(
+ IN gcoSURF Surface,
+ IN gctBOOL Dither
+ );
+/******************************************************************************\
+********************************** gco2D Object *********************************
+\******************************************************************************/
+
+/* Construct a new gco2D object. */
+gceSTATUS
+gco2D_Construct(
+ IN gcoHAL Hal,
+ OUT gco2D * Hardware
+ );
+
+/* Destroy an gco2D object. */
+gceSTATUS
+gco2D_Destroy(
+ IN gco2D Hardware
+ );
+
+/* Sets the maximum number of brushes in the brush cache. */
+gceSTATUS
+gco2D_SetBrushLimit(
+ IN gco2D Hardware,
+ IN gctUINT MaxCount
+ );
+
+/* Flush the brush. */
+gceSTATUS
+gco2D_FlushBrush(
+ IN gco2D Engine,
+ IN gcoBRUSH Brush,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Program the specified solid color brush. */
+gceSTATUS
+gco2D_LoadSolidBrush(
+ IN gco2D Engine,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask
+ );
+
+gceSTATUS
+gco2D_LoadMonochromeBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask
+ );
+
+gceSTATUS
+gco2D_LoadColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask
+ );
+
+/* Configure monochrome source. */
+gceSTATUS
+gco2D_SetMonochromeSource(
+ IN gco2D Engine,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_MONOPACK DataPack,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source extension for full rotation. */
+gceSTATUS
+gco2D_SetColorSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSourceAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative
+ );
+
+gceSTATUS
+gco2D_SetColorSourceN(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctUINT32 SurfaceNumber
+ );
+
+/* Configure masked color source. */
+gceSTATUS
+gco2D_SetMaskedSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack
+ );
+
+/* Configure masked color source extension for full rotation. */
+gceSTATUS
+gco2D_SetMaskedSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Setup the source rectangle. */
+gceSTATUS
+gco2D_SetSource(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect
+ );
+
+/* Set clipping rectangle. */
+gceSTATUS
+gco2D_SetClipping(
+ IN gco2D Engine,
+ IN gcsRECT_PTR Rect
+ );
+
+/* Configure destination. */
+gceSTATUS
+gco2D_SetTarget(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth
+ );
+
+/* Configure destination extension for full rotation. */
+gceSTATUS
+gco2D_SetTargetEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Calculate and program the stretch factors. */
+gceSTATUS
+gco2D_SetStretchFactors(
+ IN gco2D Engine,
+ IN gctUINT32 HorFactor,
+ IN gctUINT32 VerFactor
+ );
+
+/* Calculate and program the stretch factors based on the rectangles. */
+gceSTATUS
+gco2D_SetStretchRectFactors(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect
+ );
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructSingleColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructMonochromeBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gco2D_Clear(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gco2D_Line(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines based on the 32-bit color. */
+gceSTATUS
+gco2D_ColorLine(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Generic blit. */
+gceSTATUS
+gco2D_Blit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+gceSTATUS
+gco2D_Blend(
+ IN gco2D Engine,
+ IN gctUINT32 SrcCount,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Batch blit. */
+gceSTATUS
+gco2D_BatchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Stretch blit. */
+gceSTATUS
+gco2D_StretchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gco2D_MonoBlit(
+ IN gco2D Engine,
+ IN gctPOINTER StreamBits,
+ IN gcsPOINT_PTR StreamSize,
+ IN gcsRECT_PTR StreamRect,
+ IN gceSURF_MONOPACK SrcStreamPack,
+ IN gceSURF_MONOPACK DestStreamPack,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 FgRop,
+ IN gctUINT32 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Set kernel size. */
+gceSTATUS
+gco2D_SetKernelSize(
+ IN gco2D Engine,
+ IN gctUINT8 HorKernelSize,
+ IN gctUINT8 VerKernelSize
+ );
+
+/* Set filter type. */
+gceSTATUS
+gco2D_SetFilterType(
+ IN gco2D Engine,
+ IN gceFILTER_TYPE FilterType
+ );
+
+/* Set the filter kernel by user. */
+gceSTATUS
+gco2D_SetUserFilterKernel(
+ IN gco2D Engine,
+ IN gceFILTER_PASS_TYPE PassType,
+ IN gctUINT16_PTR KernelArray
+ );
+
+/* Select the pass(es) to be done for user defined filter. */
+gceSTATUS
+gco2D_EnableUserFilterPasses(
+ IN gco2D Engine,
+ IN gctBOOL HorPass,
+ IN gctBOOL VerPass
+ );
+
+/* Frees the temporary buffer allocated by filter blit operation. */
+gceSTATUS
+gco2D_FreeFilterBuffer(
+ IN gco2D Engine
+ );
+
+/* Filter blit. */
+gceSTATUS
+gco2D_FilterBlit(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Filter blit extension for full rotation. */
+gceSTATUS
+gco2D_FilterBlitEx(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gctUINT32 SrcSurfaceHeight,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gctUINT32 DestSurfaceHeight,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+gceSTATUS
+gco2D_FilterBlitEx2(
+ IN gco2D Engine,
+ IN gctUINT32_PTR SrcAddresses,
+ IN gctUINT32 SrcAddressNum,
+ IN gctUINT32_PTR SrcStrides,
+ IN gctUINT32 SrcStrideNum,
+ IN gceTILING SrcTiling,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gctUINT32 SrcSurfaceHeight,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32_PTR DestAddresses,
+ IN gctUINT32 DestAddressNum,
+ IN gctUINT32_PTR DestStrides,
+ IN gctUINT32 DestStrideNum,
+ IN gceTILING DestTiling,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gctUINT32 DestSurfaceHeight,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gco2D_EnableAlphaBlend(
+ IN gco2D Engine,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Enable alpha blending engine in the hardware. */
+gceSTATUS
+gco2D_EnableAlphaBlendAdvanced(
+ IN gco2D Engine,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode
+ );
+
+/* Enable alpha blending engine with Porter Duff rule. */
+gceSTATUS
+gco2D_SetPorterDuffBlending(
+ IN gco2D Engine,
+ IN gce2D_PORTER_DUFF_RULE Rule
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gco2D_DisableAlphaBlend(
+ IN gco2D Engine
+ );
+
+/* Retrieve the maximum number of 32-bit data chunks for a single DE command. */
+gctUINT32
+gco2D_GetMaximumDataCount(
+ void
+ );
+
+/* Retrieve the maximum number of rectangles, that can be passed in a single DE command. */
+gctUINT32
+gco2D_GetMaximumRectCount(
+ void
+ );
+
+/* Returns the pixel alignment of the surface. */
+gceSTATUS
+gco2D_GetPixelAlignment(
+ gceSURF_FORMAT Format,
+ gcsPOINT_PTR Alignment
+ );
+
+/* Retrieve monochrome stream pack size. */
+gceSTATUS
+gco2D_GetPackSize(
+ IN gceSURF_MONOPACK StreamPack,
+ OUT gctUINT32 * PackWidth,
+ OUT gctUINT32 * PackHeight
+ );
+
+/* Flush the 2D pipeline. */
+gceSTATUS
+gco2D_Flush(
+ IN gco2D Engine
+ );
+
+/* Load 256-entry color table for INDEX8 source surfaces. */
+gceSTATUS
+gco2D_LoadPalette(
+ IN gco2D Engine,
+ IN gctUINT FirstIndex,
+ IN gctUINT IndexCount,
+ IN gctPOINTER ColorTable,
+ IN gctBOOL ColorConvert
+ );
+
+/* Enable/disable 2D BitBlt mirrorring. */
+gceSTATUS
+gco2D_SetBitBlitMirror(
+ IN gco2D Engine,
+ IN gctBOOL HorizontalMirror,
+ IN gctBOOL VerticalMirror
+ );
+
+/*
+ * Set the transparency for source, destination and pattern.
+ * It also enable or disable the DFB color key mode.
+ */
+gceSTATUS
+gco2D_SetTransparencyAdvancedEx(
+ IN gco2D Engine,
+ IN gce2D_TRANSPARENCY SrcTransparency,
+ IN gce2D_TRANSPARENCY DstTransparency,
+ IN gce2D_TRANSPARENCY PatTransparency,
+ IN gctBOOL EnableDFBColorKeyMode
+ );
+
+/* Set the transparency for source, destination and pattern. */
+gceSTATUS
+gco2D_SetTransparencyAdvanced(
+ IN gco2D Engine,
+ IN gce2D_TRANSPARENCY SrcTransparency,
+ IN gce2D_TRANSPARENCY DstTransparency,
+ IN gce2D_TRANSPARENCY PatTransparency
+ );
+
+/* Set the source color key. */
+gceSTATUS
+gco2D_SetSourceColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the source color key range. */
+gceSTATUS
+gco2D_SetSourceColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the target color key. */
+gceSTATUS
+gco2D_SetTargetColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the target color key range. */
+gceSTATUS
+gco2D_SetTargetColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the YUV color space mode. */
+gceSTATUS
+gco2D_SetYUVColorMode(
+ IN gco2D Engine,
+ IN gce2D_YUV_COLOR_MODE Mode
+ );
+
+/* Setup the source global color value in ARGB8 format. */
+gceSTATUS gco2D_SetSourceGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the target global color value in ARGB8 format. */
+gceSTATUS gco2D_SetTargetGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the source and target pixel multiply modes. */
+gceSTATUS
+gco2D_SetPixelMultiplyModeAdvanced(
+ IN gco2D Engine,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE SrcPremultiplySrcAlpha,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstPremultiplyDstAlpha,
+ IN gce2D_GLOBAL_COLOR_MULTIPLY_MODE SrcPremultiplyGlobalMode,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstDemultiplyDstAlpha
+ );
+
+/* Set the GPU clock cycles after which the idle engine will keep auto-flushing. */
+gceSTATUS
+gco2D_SetAutoFlushCycles(
+ IN gco2D Engine,
+ IN gctUINT32 Cycles
+ );
+
+#if VIVANTE_PROFILER
+/* Read the profile registers available in the 2D engine and sets them in the profile.
+ The function will also reset the pixelsRendered counter every time.
+*/
+gceSTATUS
+gco2D_ProfileEngine(
+ IN gco2D Engine,
+ OPTIONAL gcs2D_PROFILE_PTR Profile
+ );
+#endif
+
+/* Enable or disable 2D dithering. */
+gceSTATUS
+gco2D_EnableDither(
+ IN gco2D Engine,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gco2D_SetGenericSource(
+ IN gco2D Engine,
+ IN gctUINT32_PTR Addresses,
+ IN gctUINT32 AddressNum,
+ IN gctUINT32_PTR Strides,
+ IN gctUINT32 StrideNum,
+ IN gceTILING Tiling,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+);
+
+gceSTATUS
+gco2D_SetGenericTarget(
+ IN gco2D Engine,
+ IN gctUINT32_PTR Addresses,
+ IN gctUINT32 AddressNum,
+ IN gctUINT32_PTR Strides,
+ IN gctUINT32 StrideNum,
+ IN gceTILING Tiling,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+);
+
+gceSTATUS
+gco2D_SetCurrentSourceIndex(
+ IN gco2D Engine,
+ IN gctUINT32 SrcIndex
+ );
+
+gceSTATUS
+gco2D_MultiSourceBlit(
+ IN gco2D Engine,
+ IN gctUINT32 SourceMask,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 RectCount
+ );
+
+gceSTATUS
+gco2D_SetROP(
+ IN gco2D Engine,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop
+ );
+
+gceSTATUS
+gco2D_SetGdiStretchMode(
+ IN gco2D Engine,
+ IN gctBOOL Enable
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_raster_h_ */
diff --git a/src/include_eureka/gc_hal_rename.h b/src/include_eureka/gc_hal_rename.h
new file mode 100644
index 0000000..ed6718d
--- /dev/null
+++ b/src/include_eureka/gc_hal_rename.h
@@ -0,0 +1,250 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_rename_h_
+#define __gc_hal_rename_h_
+
+
+#if defined(_HAL2D_APPENDIX)
+
+#define _HAL2D_RENAME_2(api, appendix) api ## appendix
+#define _HAL2D_RENAME_1(api, appendix) _HAL2D_RENAME_2(api, appendix)
+#define gcmHAL2D(api) _HAL2D_RENAME_1(api, _HAL2D_APPENDIX)
+
+
+#define gckOS_Construct gcmHAL2D(gckOS_Construct)
+#define gckOS_Destroy gcmHAL2D(gckOS_Destroy)
+#define gckOS_QueryVideoMemory gcmHAL2D(gckOS_QueryVideoMemory)
+#define gckOS_Allocate gcmHAL2D(gckOS_Allocate)
+#define gckOS_Free gcmHAL2D(gckOS_Free)
+#define gckOS_AllocateMemory gcmHAL2D(gckOS_AllocateMemory)
+#define gckOS_FreeMemory gcmHAL2D(gckOS_FreeMemory)
+#define gckOS_AllocatePagedMemory gcmHAL2D(gckOS_AllocatePagedMemory)
+#define gckOS_AllocatePagedMemoryEx gcmHAL2D(gckOS_AllocatePagedMemoryEx)
+#define gckOS_LockPages gcmHAL2D(gckOS_LockPages)
+#define gckOS_MapPages gcmHAL2D(gckOS_MapPages)
+#define gckOS_UnlockPages gcmHAL2D(gckOS_UnlockPages)
+#define gckOS_FreePagedMemory gcmHAL2D(gckOS_FreePagedMemory)
+#define gckOS_AllocateNonPagedMemory gcmHAL2D(gckOS_AllocateNonPagedMemory)
+#define gckOS_FreeNonPagedMemory gcmHAL2D(gckOS_FreeNonPagedMemory)
+#define gckOS_AllocateContiguous gcmHAL2D(gckOS_AllocateContiguous)
+#define gckOS_FreeContiguous gcmHAL2D(gckOS_FreeContiguous)
+#define gckOS_GetPageSize gcmHAL2D(gckOS_GetPageSize)
+#define gckOS_GetPhysicalAddress gcmHAL2D(gckOS_GetPhysicalAddress)
+#define gckOS_GetPhysicalAddressProcess gcmHAL2D(gckOS_GetPhysicalAddressProcess)
+#define gckOS_MapPhysical gcmHAL2D(gckOS_MapPhysical)
+#define gckOS_UnmapPhysical gcmHAL2D(gckOS_UnmapPhysical)
+#define gckOS_ReadRegister gcmHAL2D(gckOS_ReadRegister)
+#define gckOS_WriteRegister gcmHAL2D(gckOS_WriteRegister)
+#define gckOS_WriteMemory gcmHAL2D(gckOS_WriteMemory)
+#define gckOS_MapMemory gcmHAL2D(gckOS_MapMemory)
+#define gckOS_UnmapMemory gcmHAL2D(gckOS_UnmapMemory)
+#define gckOS_UnmapMemoryEx gcmHAL2D(gckOS_UnmapMemoryEx)
+#define gckOS_CreateMutex gcmHAL2D(gckOS_CreateMutex)
+#define gckOS_DeleteMutex gcmHAL2D(gckOS_DeleteMutex)
+#define gckOS_AcquireMutex gcmHAL2D(gckOS_AcquireMutex)
+#define gckOS_ReleaseMutex gcmHAL2D(gckOS_ReleaseMutex)
+#define gckOS_AtomicExchange gcmHAL2D(gckOS_AtomicExchange)
+#define gckOS_AtomicExchangePtr gcmHAL2D(gckOS_AtomicExchangePtr)
+#define gckOS_AtomConstruct gcmHAL2D(gckOS_AtomConstruct)
+#define gckOS_AtomDestroy gcmHAL2D(gckOS_AtomDestroy)
+#define gckOS_AtomGet gcmHAL2D(gckOS_AtomGet)
+#define gckOS_AtomIncrement gcmHAL2D(gckOS_AtomIncrement)
+#define gckOS_AtomDecrement gcmHAL2D(gckOS_AtomDecrement)
+#define gckOS_Delay gcmHAL2D(gckOS_Delay)
+#define gckOS_GetTime gcmHAL2D(gckOS_GetTime)
+#define gckOS_MemoryBarrier gcmHAL2D(gckOS_MemoryBarrier)
+#define gckOS_MapUserPointer gcmHAL2D(gckOS_MapUserPointer)
+#define gckOS_UnmapUserPointer gcmHAL2D(gckOS_UnmapUserPointer)
+#define gckOS_QueryNeedCopy gcmHAL2D(gckOS_QueryNeedCopy)
+#define gckOS_CopyFromUserData gcmHAL2D(gckOS_CopyFromUserData)
+#define gckOS_CopyToUserData gcmHAL2D(gckOS_CopyToUserData)
+#define gckOS_MapUserPhysical gcmHAL2D(gckOS_MapUserPhysical)
+#define gckOS_SuspendInterrupt gcmHAL2D(gckOS_SuspendInterrupt)
+#define gckOS_ResumeInterrupt gcmHAL2D(gckOS_ResumeInterrupt)
+#define gckOS_GetBaseAddress gcmHAL2D(gckOS_GetBaseAddress)
+#define gckOS_MemCopy gcmHAL2D(gckOS_MemCopy)
+#define gckOS_ZeroMemory gcmHAL2D(gckOS_ZeroMemory)
+#define gckOS_DeviceControl gcmHAL2D(gckOS_DeviceControl)
+#define gckOS_GetProcessID gcmHAL2D(gckOS_GetProcessID)
+#define gckOS_GetThreadID gcmHAL2D(gckOS_GetThreadID)
+#define gckOS_CreateSignal gcmHAL2D(gckOS_CreateSignal)
+#define gckOS_DestroySignal gcmHAL2D(gckOS_DestroySignal)
+#define gckOS_Signal gcmHAL2D(gckOS_Signal)
+#define gckOS_WaitSignal gcmHAL2D(gckOS_WaitSignal)
+#define gckOS_MapSignal gcmHAL2D(gckOS_MapSignal)
+#define gckOS_MapUserMemory gcmHAL2D(gckOS_MapUserMemory)
+#define gckOS_UnmapUserMemory gcmHAL2D(gckOS_UnmapUserMemory)
+#define gckOS_CreateUserSignal gcmHAL2D(gckOS_CreateUserSignal)
+#define gckOS_DestroyUserSignal gcmHAL2D(gckOS_DestroyUserSignal)
+#define gckOS_WaitUserSignal gcmHAL2D(gckOS_WaitUserSignal)
+#define gckOS_SignalUserSignal gcmHAL2D(gckOS_SignalUserSignal)
+#define gckOS_UserSignal gcmHAL2D(gckOS_UserSignal)
+#define gckOS_UserSignal gcmHAL2D(gckOS_UserSignal)
+#define gckOS_CacheClean gcmHAL2D(gckOS_CacheClean)
+#define gckOS_CacheFlush gcmHAL2D(gckOS_CacheFlush)
+#define gckOS_SetDebugLevel gcmHAL2D(gckOS_SetDebugLevel)
+#define gckOS_SetDebugZone gcmHAL2D(gckOS_SetDebugZone)
+#define gckOS_SetDebugLevelZone gcmHAL2D(gckOS_SetDebugLevelZone)
+#define gckOS_SetDebugZones gcmHAL2D(gckOS_SetDebugZones)
+#define gckOS_SetDebugFile gcmHAL2D(gckOS_SetDebugFile)
+#define gckOS_Broadcast gcmHAL2D(gckOS_Broadcast)
+#define gckOS_SetGPUPower gcmHAL2D(gckOS_SetGPUPower)
+#define gckOS_CreateSemaphore gcmHAL2D(gckOS_CreateSemaphore)
+#define gckOS_DestroySemaphore gcmHAL2D(gckOS_DestroySemaphore)
+#define gckOS_AcquireSemaphore gcmHAL2D(gckOS_AcquireSemaphore)
+#define gckOS_ReleaseSemaphore gcmHAL2D(gckOS_ReleaseSemaphore)
+#define gckHEAP_Construct gcmHAL2D(gckHEAP_Construct)
+#define gckHEAP_Destroy gcmHAL2D(gckHEAP_Destroy)
+#define gckHEAP_Allocate gcmHAL2D(gckHEAP_Allocate)
+#define gckHEAP_Free gcmHAL2D(gckHEAP_Free)
+#define gckHEAP_ProfileStart gcmHAL2D(gckHEAP_ProfileStart)
+#define gckHEAP_ProfileEnd gcmHAL2D(gckHEAP_ProfileEnd)
+#define gckHEAP_Test gcmHAL2D(gckHEAP_Test)
+#define gckVIDMEM_Construct gcmHAL2D(gckVIDMEM_Construct)
+#define gckVIDMEM_Destroy gcmHAL2D(gckVIDMEM_Destroy)
+#define gckVIDMEM_Allocate gcmHAL2D(gckVIDMEM_Allocate)
+#define gckVIDMEM_AllocateLinear gcmHAL2D(gckVIDMEM_AllocateLinear)
+#define gckVIDMEM_Free gcmHAL2D(gckVIDMEM_Free)
+#define gckVIDMEM_Lock gcmHAL2D(gckVIDMEM_Lock)
+#define gckVIDMEM_Unlock gcmHAL2D(gckVIDMEM_Unlock)
+#define gckVIDMEM_ConstructVirtual gcmHAL2D(gckVIDMEM_ConstructVirtual)
+#define gckVIDMEM_DestroyVirtual gcmHAL2D(gckVIDMEM_DestroyVirtual)
+#define gckKERNEL_Construct gcmHAL2D(gckKERNEL_Construct)
+#define gckKERNEL_Destroy gcmHAL2D(gckKERNEL_Destroy)
+#define gckKERNEL_Dispatch gcmHAL2D(gckKERNEL_Dispatch)
+#define gckKERNEL_QueryVideoMemory gcmHAL2D(gckKERNEL_QueryVideoMemory)
+#define gckKERNEL_GetVideoMemoryPool gcmHAL2D(gckKERNEL_GetVideoMemoryPool)
+#define gckKERNEL_MapVideoMemory gcmHAL2D(gckKERNEL_MapVideoMemory)
+#define gckKERNEL_UnmapVideoMemory gcmHAL2D(gckKERNEL_UnmapVideoMemory)
+#define gckKERNEL_MapMemory gcmHAL2D(gckKERNEL_MapMemory)
+#define gckKERNEL_UnmapMemory gcmHAL2D(gckKERNEL_UnmapMemory)
+#define gckKERNEL_Notify gcmHAL2D(gckKERNEL_Notify)
+#define gckKERNEL_QuerySettings gcmHAL2D(gckKERNEL_QuerySettings)
+#define gckKERNEL_Recovery gcmHAL2D(gckKERNEL_Recovery)
+#define gckKERNEL_OpenUserData gcmHAL2D(gckKERNEL_OpenUserData)
+#define gckKERNEL_CloseUserData gcmHAL2D(gckKERNEL_CloseUserData)
+#define gckHARDWARE_Construct gcmHAL2D(gckHARDWARE_Construct)
+#define gckHARDWARE_Destroy gcmHAL2D(gckHARDWARE_Destroy)
+#define gckHARDWARE_QuerySystemMemory gcmHAL2D(gckHARDWARE_QuerySystemMemory)
+#define gckHARDWARE_BuildVirtualAddress gcmHAL2D(gckHARDWARE_BuildVirtualAddress)
+#define gckHARDWARE_QueryCommandBuffer gcmHAL2D(gckHARDWARE_QueryCommandBuffer)
+#define gckHARDWARE_WaitLink gcmHAL2D(gckHARDWARE_WaitLink)
+#define gckHARDWARE_Execute gcmHAL2D(gckHARDWARE_Execute)
+#define gckHARDWARE_End gcmHAL2D(gckHARDWARE_End)
+#define gckHARDWARE_Nop gcmHAL2D(gckHARDWARE_Nop)
+#define gckHARDWARE_Wait gcmHAL2D(gckHARDWARE_Wait)
+#define gckHARDWARE_PipeSelect gcmHAL2D(gckHARDWARE_PipeSelect)
+#define gckHARDWARE_Link gcmHAL2D(gckHARDWARE_Link)
+#define gckHARDWARE_Event gcmHAL2D(gckHARDWARE_Event)
+#define gckHARDWARE_QueryMemory gcmHAL2D(gckHARDWARE_QueryMemory)
+#define gckHARDWARE_QueryChipIdentity gcmHAL2D(gckHARDWARE_QueryChipIdentity)
+#define gckHARDWARE_QueryChipSpecs gcmHAL2D(gckHARDWARE_QueryChipSpecs)
+#define gckHARDWARE_QueryShaderCaps gcmHAL2D(gckHARDWARE_QueryShaderCaps)
+#define gckHARDWARE_ConvertFormat gcmHAL2D(gckHARDWARE_ConvertFormat)
+#define gckHARDWARE_SplitMemory gcmHAL2D(gckHARDWARE_SplitMemory)
+#define gckHARDWARE_AlignToTile gcmHAL2D(gckHARDWARE_AlignToTile)
+#define gckHARDWARE_UpdateQueueTail gcmHAL2D(gckHARDWARE_UpdateQueueTail)
+#define gckHARDWARE_ConvertLogical gcmHAL2D(gckHARDWARE_ConvertLogical)
+#define gckHARDWARE_ConvertPhysical gcmHAL2D(gckHARDWARE_ConvertPhysical)
+#define gckHARDWARE_Interrupt gcmHAL2D(gckHARDWARE_Interrupt)
+#define gckHARDWARE_SetMMU gcmHAL2D(gckHARDWARE_SetMMU)
+#define gckHARDWARE_FlushMMU gcmHAL2D(gckHARDWARE_FlushMMU)
+#define gckHARDWARE_GetIdle gcmHAL2D(gckHARDWARE_GetIdle)
+#define gckHARDWARE_Flush gcmHAL2D(gckHARDWARE_Flush)
+#define gckHARDWARE_SetFastClear gcmHAL2D(gckHARDWARE_SetFastClear)
+#define gckHARDWARE_ReadInterrupt gcmHAL2D(gckHARDWARE_ReadInterrupt)
+#define gckHARDWARE_SetPowerManagementState gcmHAL2D(gckHARDWARE_SetPowerManagementState)
+#define gckHARDWARE_QueryPowerManagementState gcmHAL2D(gckHARDWARE_QueryPowerManagementState)
+#define gckHARDWARE_ProfileEngine2D gcmHAL2D(gckHARDWARE_ProfileEngine2D)
+#define gckHARDWARE_InitializeHardware gcmHAL2D(gckHARDWARE_InitializeHardware)
+#define gckHARDWARE_Reset gcmHAL2D(gckHARDWARE_Reset)
+#define gckINTERRUPT_Construct gcmHAL2D(gckINTERRUPT_Construct)
+#define gckINTERRUPT_Destroy gcmHAL2D(gckINTERRUPT_Destroy)
+#define gckINTERRUPT_SetHandler gcmHAL2D(gckINTERRUPT_SetHandler)
+#define gckINTERRUPT_Notify gcmHAL2D(gckINTERRUPT_Notify)
+#define gckEVENT_Construct gcmHAL2D(gckEVENT_Construct)
+#define gckEVENT_Destroy gcmHAL2D(gckEVENT_Destroy)
+#define gckEVENT_AddList gcmHAL2D(gckEVENT_AddList)
+#define gckEVENT_FreeNonPagedMemory gcmHAL2D(gckEVENT_FreeNonPagedMemory)
+#define gckEVENT_FreeContiguousMemory gcmHAL2D(gckEVENT_FreeContiguousMemory)
+#define gckEVENT_FreeVideoMemory gcmHAL2D(gckEVENT_FreeVideoMemory)
+#define gckEVENT_Signal gcmHAL2D(gckEVENT_Signal)
+#define gckEVENT_Unlock gcmHAL2D(gckEVENT_Unlock)
+#define gckEVENT_Submit gcmHAL2D(gckEVENT_Submit)
+#define gckEVENT_Commit gcmHAL2D(gckEVENT_Commit)
+#define gckEVENT_Notify gcmHAL2D(gckEVENT_Notify)
+#define gckEVENT_Interrupt gcmHAL2D(gckEVENT_Interrupt)
+#define gckCOMMAND_Construct gcmHAL2D(gckCOMMAND_Construct)
+#define gckCOMMAND_Destroy gcmHAL2D(gckCOMMAND_Destroy)
+#define gckCOMMAND_EnterCommit gcmHAL2D(gckCOMMAND_EnterCommit)
+#define gckCOMMAND_ExitCommit gcmHAL2D(gckCOMMAND_ExitCommit)
+#define gckCOMMAND_Start gcmHAL2D(gckCOMMAND_Start)
+#define gckCOMMAND_Stop gcmHAL2D(gckCOMMAND_Stop)
+#define gckCOMMAND_Commit gcmHAL2D(gckCOMMAND_Commit)
+#define gckCOMMAND_Reserve gcmHAL2D(gckCOMMAND_Reserve)
+#define gckCOMMAND_Execute gcmHAL2D(gckCOMMAND_Execute)
+#define gckCOMMAND_Stall gcmHAL2D(gckCOMMAND_Stall)
+#define gckCOMMAND_Attach gcmHAL2D(gckCOMMAND_Attach)
+#define gckCOMMAND_Detach gcmHAL2D(gckCOMMAND_Detach)
+#define gckMMU_Construct gcmHAL2D(gckMMU_Construct)
+#define gckMMU_Destroy gcmHAL2D(gckMMU_Destroy)
+#define gckMMU_AllocatePages gcmHAL2D(gckMMU_AllocatePages)
+#define gckMMU_FreePages gcmHAL2D(gckMMU_FreePages)
+#define gckMMU_InsertNode gcmHAL2D(gckMMU_InsertNode)
+#define gckMMU_RemoveNode gcmHAL2D(gckMMU_RemoveNode)
+#define gckMMU_FreeHandleMemory gcmHAL2D(gckMMU_FreeHandleMemory)
+#define gckMMU_Test gcmHAL2D(gckMMU_Test)
+#define gckHARDWARE_QueryProfileRegisters gcmHAL2D(gckHARDWARE_QueryProfileRegisters)
+
+
+#define FindMdlMap gcmHAL2D(FindMdlMap)
+#define OnProcessExit gcmHAL2D(OnProcessExit)
+
+#define gckGALDEVICE_Destroy gcmHAL2D(gckGALDEVICE_Destroy)
+#define gckOS_Print gcmHAL2D(gckOS_Print)
+#define gckGALDEVICE_FreeMemory gcmHAL2D(gckGALDEVICE_FreeMemory)
+#define gckGALDEVICE_AllocateMemory gcmHAL2D(gckGALDEVICE_AllocateMemory)
+#define gckOS_DebugBreak gcmHAL2D(gckOS_DebugBreak)
+#define gckGALDEVICE_Release_ISR gcmHAL2D(gckGALDEVICE_Release_ISR)
+#define gckOS_Verify gcmHAL2D(gckOS_Verify)
+#define gckCOMMAND_Release gcmHAL2D(gckCOMMAND_Release)
+#define gckGALDEVICE_Stop gcmHAL2D(gckGALDEVICE_Stop)
+#define gckGALDEVICE_Construct gcmHAL2D(gckGALDEVICE_Construct)
+#define gckOS_DebugFatal gcmHAL2D(gckOS_DebugFatal)
+#define gckOS_DebugTrace gcmHAL2D(gckOS_DebugTrace)
+#define gckHARDWARE_GetBaseAddress gcmHAL2D(gckHARDWARE_GetBaseAddress)
+#define gckGALDEVICE_Setup_ISR gcmHAL2D(gckGALDEVICE_Setup_ISR)
+#define gckKERNEL_AttachProcess gcmHAL2D(gckKERNEL_AttachProcess)
+#define gckKERNEL_AttachProcessEx gcmHAL2D(gckKERNEL_AttachProcessEx)
+#define gckGALDEVICE_Start_Thread gcmHAL2D(gckGALDEVICE_Start_Thread)
+#define gckHARDWARE_QueryIdle gcmHAL2D(gckHARDWARE_QueryIdle)
+#define gckGALDEVICE_Start gcmHAL2D(gckGALDEVICE_Start)
+#define gckOS_GetKernelLogical gcmHAL2D(gckOS_GetKernelLogical)
+#define gckOS_DebugTraceZone gcmHAL2D(gckOS_DebugTraceZone)
+#define gckGALDEVICE_Stop_Thread gcmHAL2D(gckGALDEVICE_Stop_Thread)
+#define gckHARDWARE_NeedBaseAddress gcmHAL2D(gckHARDWARE_NeedBaseAddress)
+
+#endif
+
+#endif /* __gc_hal_rename_h_ */
diff --git a/src/include_eureka/gc_hal_types.h b/src/include_eureka/gc_hal_types.h
new file mode 100644
index 0000000..e6d38c1
--- /dev/null
+++ b/src/include_eureka/gc_hal_types.h
@@ -0,0 +1,970 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_types_h_
+#define __gc_hal_types_h_
+
+#include "gc_hal_version.h"
+#include "gc_hal_options.h"
+
+#ifdef _WIN32
+#pragma warning(disable:4127) /* Conditional expression is constant (do { }
+ ** while(0)). */
+#pragma warning(disable:4100) /* Unreferenced formal parameter. */
+#pragma warning(disable:4204) /* Non-constant aggregate initializer (C99). */
+#pragma warning(disable:4131) /* Uses old-style declarator (for Bison and
+ ** Flex generated files). */
+#pragma warning(disable:4206) /* Translation unit is empty. */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+** Platform macros.
+*/
+
+#if defined(__GNUC__)
+# define gcdHAS_ELLIPSES 1 /* GCC always has it. */
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+# define gcdHAS_ELLIPSES 1 /* C99 has it. */
+#elif defined(_MSC_VER) && (_MSC_VER >= 1500)
+# define gcdHAS_ELLIPSES 1 /* MSVC 2007+ has it. */
+#elif defined(UNDER_CE)
+#if UNDER_CE >= 600
+# define gcdHAS_ELLIPSES 1
+# else
+# define gcdHAS_ELLIPSES 0
+# endif
+#else
+# error "gcdHAS_ELLIPSES: Platform could not be determined"
+#endif
+
+/******************************************************************************\
+************************************ Keyword ***********************************
+\******************************************************************************/
+
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
+# define gcmINLINE inline /* C99 keyword. */
+#elif defined(__GNUC__)
+# define gcmINLINE __inline__ /* GNU keyword. */
+#elif defined(_MSC_VER) || defined(UNDER_CE)
+# define gcmINLINE __inline /* Internal keyword. */
+#else
+# error "gcmINLINE: Platform could not be determined"
+#endif
+
+/* Possible debug flags. */
+#define gcdDEBUG_NONE 0
+#define gcdDEBUG_ALL (1 << 0)
+#define gcdDEBUG_FATAL (1 << 1)
+#define gcdDEBUG_TRACE (1 << 2)
+#define gcdDEBUG_BREAK (1 << 3)
+#define gcdDEBUG_ASSERT (1 << 4)
+#define gcdDEBUG_CODE (1 << 5)
+#define gcdDEBUG_STACK (1 << 6)
+
+#define gcmIS_DEBUG(flag) ( gcdDEBUG & (flag | gcdDEBUG_ALL) )
+
+#ifndef gcdDEBUG
+#if (defined(DBG) && DBG) || defined(DEBUG) || defined(_DEBUG)
+# define gcdDEBUG gcdDEBUG_ALL
+# else
+# define gcdDEBUG gcdDEBUG_NONE
+# endif
+#endif
+
+#ifdef _USRDLL
+#ifdef _MSC_VER
+#ifdef HAL_EXPORTS
+# define HALAPI __declspec(dllexport)
+# else
+# define HALAPI __declspec(dllimport)
+# endif
+# define HALDECL __cdecl
+# else
+#ifdef HAL_EXPORTS
+# define HALAPI
+# else
+# define HALAPI extern
+# endif
+# endif
+#else
+# define HALAPI
+# define HALDECL
+#endif
+
+/******************************************************************************\
+********************************** Common Types ********************************
+\******************************************************************************/
+
+#define gcvFALSE 0
+#define gcvTRUE 1
+
+#define gcvINFINITE ((gctUINT32) ~0U)
+
+#define gcvINVALID_HANDLE ((gctHANDLE) ~0U)
+
+typedef int gctBOOL;
+typedef gctBOOL * gctBOOL_PTR;
+
+typedef int gctINT;
+typedef signed char gctINT8;
+typedef signed short gctINT16;
+typedef signed int gctINT32;
+typedef signed long long gctINT64;
+
+typedef gctINT * gctINT_PTR;
+typedef gctINT8 * gctINT8_PTR;
+typedef gctINT16 * gctINT16_PTR;
+typedef gctINT32 * gctINT32_PTR;
+typedef gctINT64 * gctINT64_PTR;
+
+typedef unsigned int gctUINT;
+typedef unsigned char gctUINT8;
+typedef unsigned short gctUINT16;
+typedef unsigned int gctUINT32;
+typedef unsigned long long gctUINT64;
+
+typedef gctUINT * gctUINT_PTR;
+typedef gctUINT8 * gctUINT8_PTR;
+typedef gctUINT16 * gctUINT16_PTR;
+typedef gctUINT32 * gctUINT32_PTR;
+typedef gctUINT64 * gctUINT64_PTR;
+
+typedef unsigned long gctSIZE_T;
+typedef gctSIZE_T * gctSIZE_T_PTR;
+
+#ifdef __cplusplus
+# define gcvNULL 0
+#else
+# define gcvNULL ((void *) 0)
+#endif
+
+typedef float gctFLOAT;
+typedef signed int gctFIXED_POINT;
+typedef float * gctFLOAT_PTR;
+
+typedef void * gctPHYS_ADDR;
+typedef void * gctHANDLE;
+typedef void * gctFILE;
+typedef void * gctSIGNAL;
+typedef void * gctWINDOW;
+typedef void * gctIMAGE;
+
+typedef void * gctSEMAPHORE;
+
+typedef void * gctPOINTER;
+typedef const void * gctCONST_POINTER;
+
+typedef char gctCHAR;
+typedef char * gctSTRING;
+typedef const char * gctCONST_STRING;
+
+typedef struct _gcsCOUNT_STRING
+{
+ gctSIZE_T Length;
+ gctCONST_STRING String;
+}
+gcsCOUNT_STRING;
+
+typedef union _gcuFLOAT_UINT32
+{
+ gctFLOAT f;
+ gctUINT32 u;
+}
+gcuFLOAT_UINT32;
+
+/* Fixed point constants. */
+#define gcvZERO_X ((gctFIXED_POINT) 0x00000000)
+#define gcvHALF_X ((gctFIXED_POINT) 0x00008000)
+#define gcvONE_X ((gctFIXED_POINT) 0x00010000)
+#define gcvNEGONE_X ((gctFIXED_POINT) 0xFFFF0000)
+#define gcvTWO_X ((gctFIXED_POINT) 0x00020000)
+
+/* Stringizing macro. */
+#define gcmSTRING(Value) #Value
+
+/******************************************************************************\
+******************************* Fixed Point Math *******************************
+\******************************************************************************/
+
+#define gcmXMultiply(x1, x2) gcoMATH_MultiplyFixed(x1, x2)
+#define gcmXDivide(x1, x2) gcoMATH_DivideFixed(x1, x2)
+#define gcmXMultiplyDivide(x1, x2, x3) gcoMATH_MultiplyDivideFixed(x1, x2, x3)
+
+/* 2D Engine profile. */
+typedef struct _gcs2D_PROFILE
+{
+ /* Cycle count.
+ 32bit counter incremented every 2D clock cycle.
+ Wraps back to 0 when the counter overflows.
+ */
+ gctUINT32 cycleCount;
+
+ /* Pixels rendered by the 2D engine.
+ Resets to 0 every time it is read. */
+ gctUINT32 pixelsRendered;
+}
+gcs2D_PROFILE;
+
+/* Macro to combine four characters into a Charcater Code. */
+#define gcmCC(c1, c2, c3, c4) \
+( \
+ (char) (c1) \
+ | \
+ ((char) (c2) << 8) \
+ | \
+ ((char) (c3) << 16) \
+ | \
+ ((char) (c4) << 24) \
+)
+
+#define gcmPRINTABLE(c) ((((c) >= ' ') && ((c) <= '}')) ? ((c) != '%' ? (c) : ' ') : ' ')
+
+#define gcmCC_PRINT(cc) \
+ gcmPRINTABLE((char) ( (cc) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 8) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 16) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 24) & 0xFF))
+
+/******************************************************************************\
+****************************** Function Parameters *****************************
+\******************************************************************************/
+
+#define IN
+#define OUT
+#define OPTIONAL
+
+/******************************************************************************\
+********************************* Status Codes *********************************
+\******************************************************************************/
+
+typedef enum _gceSTATUS
+{
+ gcvSTATUS_OK = 0,
+ gcvSTATUS_FALSE = 0,
+ gcvSTATUS_TRUE = 1,
+ gcvSTATUS_NO_MORE_DATA = 2,
+ gcvSTATUS_CACHED = 3,
+ gcvSTATUS_MIPMAP_TOO_LARGE = 4,
+ gcvSTATUS_NAME_NOT_FOUND = 5,
+ gcvSTATUS_NOT_OUR_INTERRUPT = 6,
+ gcvSTATUS_MISMATCH = 7,
+ gcvSTATUS_MIPMAP_TOO_SMALL = 8,
+ gcvSTATUS_LARGER = 9,
+ gcvSTATUS_SMALLER = 10,
+ gcvSTATUS_CHIP_NOT_READY = 11,
+ gcvSTATUS_NEED_CONVERSION = 12,
+ gcvSTATUS_SKIP = 13,
+ gcvSTATUS_DATA_TOO_LARGE = 14,
+ gcvSTATUS_INVALID_CONFIG = 15,
+ gcvSTATUS_CHANGED = 16,
+ gcvSTATUS_NOT_SUPPORT_DITHER = 17,
+ gcvSTATUS_EXECUTED = 18,
+ gcvSTATUS_TERMINATE = 19,
+
+ gcvSTATUS_INVALID_ARGUMENT = -1,
+ gcvSTATUS_INVALID_OBJECT = -2,
+ gcvSTATUS_OUT_OF_MEMORY = -3,
+ gcvSTATUS_MEMORY_LOCKED = -4,
+ gcvSTATUS_MEMORY_UNLOCKED = -5,
+ gcvSTATUS_HEAP_CORRUPTED = -6,
+ gcvSTATUS_GENERIC_IO = -7,
+ gcvSTATUS_INVALID_ADDRESS = -8,
+ gcvSTATUS_CONTEXT_LOSSED = -9,
+ gcvSTATUS_TOO_COMPLEX = -10,
+ gcvSTATUS_BUFFER_TOO_SMALL = -11,
+ gcvSTATUS_INTERFACE_ERROR = -12,
+ gcvSTATUS_NOT_SUPPORTED = -13,
+ gcvSTATUS_MORE_DATA = -14,
+ gcvSTATUS_TIMEOUT = -15,
+ gcvSTATUS_OUT_OF_RESOURCES = -16,
+ gcvSTATUS_INVALID_DATA = -17,
+ gcvSTATUS_INVALID_MIPMAP = -18,
+ gcvSTATUS_NOT_FOUND = -19,
+ gcvSTATUS_NOT_ALIGNED = -20,
+ gcvSTATUS_INVALID_REQUEST = -21,
+ gcvSTATUS_GPU_NOT_RESPONDING = -22,
+ gcvSTATUS_TIMER_OVERFLOW = -23,
+ gcvSTATUS_VERSION_MISMATCH = -24,
+ gcvSTATUS_LOCKED = -25,
+ gcvSTATUS_INTERRUPTED = -26,
+ gcvSTATUS_DEVICE = -27,
+
+ /* Linker errors. */
+ gcvSTATUS_GLOBAL_TYPE_MISMATCH = -1000,
+ gcvSTATUS_TOO_MANY_ATTRIBUTES = -1001,
+ gcvSTATUS_TOO_MANY_UNIFORMS = -1002,
+ gcvSTATUS_TOO_MANY_VARYINGS = -1003,
+ gcvSTATUS_UNDECLARED_VARYING = -1004,
+ gcvSTATUS_VARYING_TYPE_MISMATCH = -1005,
+ gcvSTATUS_MISSING_MAIN = -1006,
+ gcvSTATUS_NAME_MISMATCH = -1007,
+ gcvSTATUS_INVALID_INDEX = -1008,
+ gcvSTATUS_UNIFORM_TYPE_MISMATCH = -1009,
+}
+gceSTATUS;
+
+/******************************************************************************\
+********************************* Status Macros ********************************
+\******************************************************************************/
+
+#define gcmIS_ERROR(status) (status < 0)
+#define gcmNO_ERROR(status) (status >= 0)
+#define gcmIS_SUCCESS(status) (status == gcvSTATUS_OK)
+
+/******************************************************************************\
+********************************* Field Macros *********************************
+\******************************************************************************/
+
+#define __gcmSTART(reg_field) \
+ (0 ? reg_field)
+
+#define __gcmEND(reg_field) \
+ (1 ? reg_field)
+
+#define __gcmGETSIZE(reg_field) \
+ (__gcmEND(reg_field) - __gcmSTART(reg_field) + 1)
+
+#define __gcmALIGN(data, reg_field) \
+ (((gctUINT32) (data)) << __gcmSTART(reg_field))
+
+#define __gcmMASK(reg_field) \
+ ((gctUINT32) ((__gcmGETSIZE(reg_field) == 32) \
+ ? ~0 \
+ : (~(~0 << __gcmGETSIZE(reg_field)))))
+
+/*******************************************************************************
+**
+** gcmFIELDMASK
+**
+** Get aligned field mask.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmFIELDMASK(reg, field) \
+( \
+ __gcmALIGN(__gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmGETFIELD
+**
+** Extract the value of a field from specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmGETFIELD(data, reg, field) \
+( \
+ ((((gctUINT32) (data)) >> __gcmSTART(reg##_##field)) \
+ & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELD
+**
+** Set the value of a field within specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETFIELD(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN((gctUINT32) (value) \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELDVALUE
+**
+** Set the value of a field within specified data with a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmSETFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN(reg##_##field##_##value \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmGETMASKEDFIELDMASK
+**
+** Determine field mask of a masked field.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmGETMASKEDFIELDMASK(reg, field) \
+( \
+ gcmSETFIELD(0, reg, field, ~0) | \
+ gcmSETFIELD(0, reg, MASK_ ## field, ~0) \
+)
+
+/*******************************************************************************
+**
+** gcmSETMASKEDFIELD
+**
+** Set the value of a masked field with specified data.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETMASKEDFIELD(reg, field, value) \
+( \
+ gcmSETFIELD (~0, reg, field, value) & \
+ gcmSETFIELDVALUE(~0, reg, MASK_ ## field, ENABLED) \
+)
+
+/*******************************************************************************
+**
+** gcmSETMASKEDFIELDVALUE
+**
+** Set the value of a masked field with specified data.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETMASKEDFIELDVALUE(reg, field, value) \
+( \
+ gcmSETFIELDVALUE(~0, reg, field, value) & \
+ gcmSETFIELDVALUE(~0, reg, MASK_ ## field, ENABLED) \
+)
+
+/*******************************************************************************
+**
+** gcmVERIFYFIELDVALUE
+**
+** Verify if the value of a field within specified data equals a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmVERIFYFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) >> __gcmSTART(reg##_##field) & \
+ __gcmMASK(reg##_##field)) \
+ == \
+ (reg##_##field##_##value & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+** Bit field macros.
+*/
+
+#define __gcmSTARTBIT(Field) \
+ ( 1 ? Field )
+
+#define __gcmBITSIZE(Field) \
+ ( 0 ? Field )
+
+#define __gcmBITMASK(Field) \
+( \
+ (1 << __gcmBITSIZE(Field)) - 1 \
+)
+
+#define gcmGETBITS(Value, Type, Field) \
+( \
+ ( ((Type) (Value)) >> __gcmSTARTBIT(Field) ) \
+ & \
+ __gcmBITMASK(Field) \
+)
+
+#define gcmSETBITS(Value, Type, Field, NewValue) \
+( \
+ ( ((Type) (Value)) \
+ & ~(__gcmBITMASK(Field) << __gcmSTARTBIT(Field)) \
+ ) \
+ | \
+ ( ( ((Type) (NewValue)) \
+ & __gcmBITMASK(Field) \
+ ) << __gcmSTARTBIT(Field) \
+ ) \
+)
+
+/*******************************************************************************
+**
+** gcmISINREGRANGE
+**
+** Verify whether the specified address is in the register range.
+**
+** ARGUMENTS:
+**
+** Address Address to be verified.
+** Name Name of a register.
+*/
+
+#define gcmISINREGRANGE(Address, Name) \
+( \
+ ((Address & (~0U << Name ## _LSB)) == (Name ## _Address >> 2)) \
+)
+
+/*******************************************************************************
+**
+** A set of macros to aid state loading.
+**
+** ARGUMENTS:
+**
+** CommandBuffer Pointer to a gcoCMDBUF object.
+** StateDelta Pointer to a gcsSTATE_DELTA state delta structure.
+** Memory Destination memory pointer of gctUINT32_PTR type.
+** PartOfContext Whether or not the state is a part of the context.
+** FixedPoint Whether or not the state is of the fixed point format.
+** Count Number of consecutive states to be loaded.
+** Address State address.
+** Data Data to be set to the state.
+*/
+
+/*----------------------------------------------------------------------------*/
+
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+
+# define gcmSTORELOADSTATE(CommandBuffer, Memory, Address, Count) \
+ CommandBuffer->lastLoadStatePtr = Memory; \
+ CommandBuffer->lastLoadStateAddress = Address; \
+ CommandBuffer->lastLoadStateCount = Count
+
+# define gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address) \
+ gcmASSERT( \
+ (gctUINT) (Memory - CommandBuffer->lastLoadStatePtr - 1) \
+ == \
+ (gctUINT) (Address - CommandBuffer->lastLoadStateAddress) \
+ ); \
+ \
+ gcmASSERT(CommandBuffer->lastLoadStateCount > 0); \
+ \
+ CommandBuffer->lastLoadStateCount -= 1
+
+# define gcmVERIFYLOADSTATEDONE(CommandBuffer) \
+ gcmASSERT(CommandBuffer->lastLoadStateCount == 0)
+
+#else
+
+# define gcmSTORELOADSTATE(CommandBuffer, Memory, Address, Count)
+# define gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address)
+# define gcmVERIFYLOADSTATEDONE(CommandBuffer)
+
+#endif
+
+#if gcdSECURE_USER
+
+# define gcmDEFINESECUREUSER() \
+ gctUINT __secure_user_offset__; \
+ gctUINT32_PTR __secure_user_hintArray__;
+
+# define gcmBEGINSECUREUSER() \
+ __secure_user_offset__ = reserve->lastOffset; \
+ \
+ __secure_user_hintArray__ = reserve->hintArrayTail
+
+# define gcmENDSECUREUSER() \
+ reserve->hintArrayTail = __secure_user_hintArray__
+
+# define gcmSKIPSECUREUSER() \
+ __secure_user_offset__ += gcmSIZEOF(gctUINT32)
+
+# define gcmUPDATESECUREUSER() \
+ *__secure_user_hintArray__ = __secure_user_offset__; \
+ \
+ __secure_user_offset__ += gcmSIZEOF(gctUINT32); \
+ __secure_user_hintArray__ += 1
+
+#else
+
+# define gcmDEFINESECUREUSER()
+# define gcmBEGINSECUREUSER()
+# define gcmENDSECUREUSER()
+# define gcmSKIPSECUREUSER()
+# define gcmUPDATESECUREUSER()
+
+#endif
+
+/*----------------------------------------------------------------------------*/
+
+#if gcdDUMP
+# define gcmDUMPSTATEDATA(StateDelta, FixedPoint, Address, Data) \
+ if (FixedPoint) \
+ { \
+ gcmDUMP(gcvNULL, "@[state.x 0x%04X 0x%08X]", \
+ Address, Data \
+ ); \
+ } \
+ else \
+ { \
+ gcmDUMP(gcvNULL, "@[state 0x%04X 0x%08X]", \
+ Address, Data \
+ ); \
+ }
+#else
+# define gcmDUMPSTATEDATA(StateDelta, FixedPoint, Address, Data)
+#endif
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmDEFINESTATEBUFFER(CommandBuffer, StateDelta, Memory, ReserveSize) \
+ gcmDEFINESECUREUSER() \
+ gctSIZE_T ReserveSize; \
+ gcoCMDBUF CommandBuffer; \
+ gctUINT32_PTR Memory; \
+ gcsSTATE_DELTA_PTR StateDelta
+
+#define gcmBEGINSTATEBUFFER(Hardware, CommandBuffer, StateDelta, Memory, ReserveSize) \
+{ \
+ gcmONERROR(gcoBUFFER_Reserve( \
+ Hardware->buffer, ReserveSize, gcvTRUE, &CommandBuffer \
+ )); \
+ \
+ Memory = (gctUINT32_PTR) CommandBuffer->lastReserve; \
+ \
+ StateDelta = Hardware->delta; \
+ \
+ gcmBEGINSECUREUSER(); \
+}
+
+#define gcmENDSTATEBUFFER(CommandBuffer, Memory, ReserveSize) \
+{ \
+ gcmENDSECUREUSER(); \
+ \
+ gcmASSERT( \
+ ((gctUINT8_PTR) CommandBuffer->lastReserve) + ReserveSize \
+ == \
+ (gctUINT8_PTR) Memory \
+ ); \
+}
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmBEGINSTATEBATCH(CommandBuffer, Memory, FixedPoint, Address, Count) \
+{ \
+ gcmASSERT(((Memory - (gctUINT32_PTR) CommandBuffer->lastReserve) & 1) == 0); \
+ \
+ gcmVERIFYLOADSTATEDONE(CommandBuffer); \
+ \
+ gcmSTORELOADSTATE(CommandBuffer, Memory, Address, Count); \
+ \
+ *Memory++ \
+ = gcmSETFIELDVALUE(0, AQ_COMMAND_LOAD_STATE_COMMAND, OPCODE, LOAD_STATE) \
+ | gcmSETFIELD (0, AQ_COMMAND_LOAD_STATE_COMMAND, FLOAT, FixedPoint) \
+ | gcmSETFIELD (0, AQ_COMMAND_LOAD_STATE_COMMAND, COUNT, Count) \
+ | gcmSETFIELD (0, AQ_COMMAND_LOAD_STATE_COMMAND, ADDRESS, Address); \
+ \
+ gcmSKIPSECUREUSER(); \
+}
+
+#define gcmENDSTATEBATCH(CommandBuffer, Memory) \
+{ \
+ gcmVERIFYLOADSTATEDONE(CommandBuffer); \
+ \
+ gcmASSERT(((Memory - (gctUINT32_PTR) CommandBuffer->lastReserve) & 1) == 0); \
+}
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmSETSTATEDATA(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data) \
+{ \
+ gctUINT32 __temp_data32__; \
+ \
+ gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address); \
+ \
+ __temp_data32__ = Data; \
+ \
+ *Memory++ = __temp_data32__; \
+ \
+ gcoHARDWARE_UpdateDelta( \
+ StateDelta, FixedPoint, Address, 0, __temp_data32__ \
+ ); \
+ \
+ gcmDUMPSTATEDATA(StateDelta, FixedPoint, Address, __temp_data32__); \
+ \
+ gcmUPDATESECUREUSER(); \
+}
+
+#define gcmSETCTRLSTATE(StateDelta, CommandBuffer, Memory, Address, Data) \
+{ \
+ gctUINT32 __temp_data32__; \
+ \
+ gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address); \
+ \
+ __temp_data32__ = Data; \
+ \
+ *Memory++ = __temp_data32__; \
+ \
+ gcmDUMPSTATEDATA(StateDelta, gcvFALSE, Address, __temp_data32__); \
+ \
+ gcmSKIPSECUREUSER(); \
+}
+
+#define gcmSETFILLER(CommandBuffer, Memory) \
+{ \
+ gcmVERIFYLOADSTATEDONE(CommandBuffer); \
+ \
+ Memory += 1; \
+ \
+ gcmSKIPSECUREUSER(); \
+}
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmSETSINGLESTATE(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data) \
+{ \
+ gcmBEGINSTATEBATCH(CommandBuffer, Memory, FixedPoint, Address, 1); \
+ gcmSETSTATEDATA(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data); \
+ gcmENDSTATEBATCH(CommandBuffer, Memory); \
+}
+
+#define gcmSETSINGLECTRLSTATE(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data) \
+{ \
+ gcmBEGINSTATEBATCH(CommandBuffer, Memory, FixedPoint, Address, 1); \
+ gcmSETCTRLSTATE(StateDelta, CommandBuffer, Memory, Address, Data); \
+ gcmENDSTATEBATCH(CommandBuffer, Memory); \
+}
+
+
+/*******************************************************************************
+**
+** gcmSETSTARTDECOMMAND
+**
+** Form a START_DE command.
+**
+** ARGUMENTS:
+**
+** Memory Destination memory pointer of gctUINT32_PTR type.
+** Count Number of the rectangles.
+*/
+
+#define gcmSETSTARTDECOMMAND(Memory, Count) \
+{ \
+ *Memory++ \
+ = gcmSETFIELDVALUE(0, AQ_COMMAND_START_DE_COMMAND, OPCODE, START_DE) \
+ | gcmSETFIELD (0, AQ_COMMAND_START_DE_COMMAND, COUNT, Count) \
+ | gcmSETFIELD (0, AQ_COMMAND_START_DE_COMMAND, DATA_COUNT, 0); \
+ \
+ *Memory++ = 0xDEADDEED; \
+}
+
+/******************************************************************************\
+******************************** Ceiling Macro ********************************
+\******************************************************************************/
+#define gcmCEIL(x) ((x - (gctUINT32)x) == 0 ? (gctUINT32)x : (gctUINT32)x + 1)
+
+/******************************************************************************\
+******************************** Min/Max Macros ********************************
+\******************************************************************************/
+
+#define gcmMIN(x, y) (((x) <= (y)) ? (x) : (y))
+#define gcmMAX(x, y) (((x) >= (y)) ? (x) : (y))
+#define gcmCLAMP(x, min, max) (((x) < (min)) ? (min) : \
+ ((x) > (max)) ? (max) : (x))
+#define gcmABS(x) (((x) < 0) ? -(x) : (x))
+#define gcmNEG(x) (((x) < 0) ? (x) : -(x))
+
+/*******************************************************************************
+**
+** gcmPTR2INT
+**
+** Convert a pointer to an integer value.
+**
+** ARGUMENTS:
+**
+** p Pointer value.
+*/
+#if defined(_WIN32) || (defined(__LP64__) && __LP64__)
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (gctUINT64) (p) \
+ )
+#else
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (p) \
+ )
+#endif
+
+/*******************************************************************************
+**
+** gcmINT2PTR
+**
+** Convert an integer value into a pointer.
+**
+** ARGUMENTS:
+**
+** v Integer value.
+*/
+#ifdef __LP64__
+# define gcmINT2PTR(i) \
+ ( \
+ (gctPOINTER) (gctINT64) (i) \
+ )
+#else
+# define gcmINT2PTR(i) \
+ ( \
+ (gctPOINTER) (i) \
+ )
+#endif
+
+/*******************************************************************************
+**
+** gcmOFFSETOF
+**
+** Compute the byte offset of a field inside a structure.
+**
+** ARGUMENTS:
+**
+** s Structure name.
+** field Field name.
+*/
+#define gcmOFFSETOF(s, field) \
+( \
+ gcmPTR2INT(& (((struct s *) 0)->field)) \
+)
+
+/*******************************************************************************
+***** Database ****************************************************************/
+
+typedef struct _gcsDATABASE_COUNTERS
+{
+ /* Number of currently allocated bytes. */
+ gctSIZE_T bytes;
+
+ /* Maximum number of bytes allocated (memory footprint). */
+ gctSIZE_T maxBytes;
+
+ /* Total number of bytes allocated. */
+ gctSIZE_T totalBytes;
+}
+gcsDATABASE_COUNTERS;
+
+typedef struct _gcuDATABASE_INFO
+{
+ /* Counters. */
+ gcsDATABASE_COUNTERS counters;
+
+ /* Time value. */
+ gctUINT64 time;
+}
+gcuDATABASE_INFO;
+
+/*******************************************************************************
+***** Frame database **********************************************************/
+
+/* gcsHAL_FRAME_INFO */
+typedef struct _gcsHAL_FRAME_INFO
+{
+ /* Current timer tick. */
+ OUT gctUINT64 ticks;
+
+ /* Bandwidth counters. */
+ OUT gctUINT readBytes8[8];
+ OUT gctUINT writeBytes8[8];
+
+ /* Counters. */
+ OUT gctUINT cycles[8];
+ OUT gctUINT idleCycles[8];
+ OUT gctUINT mcCycles[8];
+ OUT gctUINT readRequests[8];
+ OUT gctUINT writeRequests[8];
+
+ /* 3D counters. */
+ OUT gctUINT vertexCount;
+ OUT gctUINT primitiveCount;
+ OUT gctUINT rejectedPrimitives;
+ OUT gctUINT culledPrimitives;
+ OUT gctUINT clippedPrimitives;
+ OUT gctUINT outPrimitives;
+ OUT gctUINT inPrimitives;
+ OUT gctUINT culledQuadCount;
+ OUT gctUINT totalQuadCount;
+ OUT gctUINT quadCount;
+ OUT gctUINT totalPixelCount;
+
+ /* PE counters. */
+ OUT gctUINT colorKilled[8];
+ OUT gctUINT colorDrawn[8];
+ OUT gctUINT depthKilled[8];
+ OUT gctUINT depthDrawn[8];
+
+ /* Shader counters. */
+ OUT gctUINT shaderCycles;
+ OUT gctUINT vsInstructionCount;
+ OUT gctUINT vsTextureCount;
+ OUT gctUINT psInstructionCount;
+ OUT gctUINT psTextureCount;
+
+ /* Texture counters. */
+ OUT gctUINT bilinearRequests;
+ OUT gctUINT trilinearRequests;
+ OUT gctUINT txBytes8;
+ OUT gctUINT txHitCount;
+ OUT gctUINT txMissCount;
+}
+gcsHAL_FRAME_INFO;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_types_h_ */
diff --git a/src/include_eureka/gc_hal_version.h b/src/include_eureka/gc_hal_version.h
new file mode 100644
index 0000000..83db422
--- /dev/null
+++ b/src/include_eureka/gc_hal_version.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_version_h_
+#define __gc_hal_version_h_
+
+#define gcvVERSION_MAJOR 4
+
+#define gcvVERSION_MINOR 6
+
+#define gcvVERSION_PATCH 6
+
+#define gcvVERSION_BUILD 1381
+
+#define gcvVERSION_DATE __DATE__
+
+#define gcvVERSION_TIME __TIME__
+
+#endif /* __gc_hal_version_h_ */
diff --git a/src/include_eureka/gc_hal_vg.h b/src/include_eureka/gc_hal_vg.h
new file mode 100644
index 0000000..2060170
--- /dev/null
+++ b/src/include_eureka/gc_hal_vg.h
@@ -0,0 +1,933 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+
+
+#ifndef __gc_hal_vg_h_
+#define __gc_hal_vg_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "gc_hal_rename.h"
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+#include "gc_hal_base.h"
+
+#if gcdENABLE_VG
+
+/* Thread routine type. */
+#if defined(LINUX)
+ typedef gctINT gctTHREADFUNCRESULT;
+ typedef gctPOINTER gctTHREADFUNCPARAMETER;
+# define gctTHREADFUNCTYPE
+#elif defined(WIN32)
+ typedef gctUINT gctTHREADFUNCRESULT;
+ typedef gctPOINTER gctTHREADFUNCPARAMETER;
+# define gctTHREADFUNCTYPE __stdcall
+#elif defined(__QNXNTO__)
+ typedef void * gctTHREADFUNCRESULT;
+ typedef gctPOINTER gctTHREADFUNCPARAMETER;
+# define gctTHREADFUNCTYPE
+#endif
+
+typedef gctTHREADFUNCRESULT (gctTHREADFUNCTYPE * gctTHREADFUNC) (
+ gctTHREADFUNCPARAMETER ThreadParameter
+ );
+
+
+#if defined(gcvDEBUG)
+# undef gcvDEBUG
+#endif
+
+#define gcdFORCE_DEBUG 0
+#define gcdFORCE_MESSAGES 0
+
+
+#if DBG || defined(DEBUG) || defined(_DEBUG) || gcdFORCE_DEBUG
+# define gcvDEBUG 1
+#else
+# define gcvDEBUG 0
+#endif
+
+#define _gcmERROR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+
+#define gcmERROR_RETURN(func) _gcmERROR_RETURN(gcm, func)
+
+#define gcmLOG_LOCATION()
+
+#define gcmkIS_ERROR(status) (status < 0)
+
+#define gcmALIGNDOWN(n, align) \
+( \
+ (n) & ~((align) - 1) \
+)
+
+#define gcmIS_VALID_INDEX(Index, Array) \
+ (((gctUINT) (Index)) < gcmCOUNTOF(Array))
+
+
+#define gcmIS_NAN(x) \
+( \
+ ((* (gctUINT32_PTR) &(x)) & 0x7FFFFFFF) == 0x7FFFFFFF \
+)
+
+#define gcmLERP(v1, v2, w) \
+ ((v1) * (w) + (v2) * (1.0f - (w)))
+
+#define gcmINTERSECT(Start1, Start2, Length) \
+ (gcmABS((Start1) - (Start2)) < (Length))
+
+/*******************************************************************************
+**
+** gcmERR_GOTO
+**
+** Prints a message and terminates the current loop on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** Function
+** Function to evaluate.
+*/
+
+#define gcmERR_GOTO(Function) \
+ status = Function; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ gcmTRACE( \
+ gcvLEVEL_ERROR, \
+ "gcmERR_GOTO: status=%d @ line=%d in function %s.\n", \
+ status, __LINE__, __FUNCTION__ \
+ ); \
+ goto ErrorHandler; \
+ }
+
+#if gcvDEBUG || gcdFORCE_MESSAGES
+# define gcmVERIFY_BOOLEAN(Expression) \
+ gcmASSERT( \
+ ( (Expression) == gcvFALSE ) || \
+ ( (Expression) == gcvTRUE ) \
+ )
+#else
+# define gcmVERIFY_BOOLEAN(Expression)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFYFIELDFIT
+**
+** Verify whether the value fits in the field.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmVERIFYFIELDFIT(reg, field, value) \
+ gcmASSERT( \
+ (value) <= gcmFIELDMAX(reg, field) \
+ )
+/*******************************************************************************
+**
+** gcmFIELDMAX
+**
+** Get field maximum value.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmFIELDMAX(reg, field) \
+( \
+ (gctUINT32) \
+ ( \
+ (__gcmGETSIZE(reg##_##field) == 32) \
+ ? ~0 \
+ : (~(~0 << __gcmGETSIZE(reg##_##field))) \
+ ) \
+)
+
+
+/* ANSI C does not have the 'f' functions, define replacements here. */
+#define gcmSINF(x) ((gctFLOAT) sin(x))
+#define gcmCOSF(x) ((gctFLOAT) cos(x))
+#define gcmASINF(x) ((gctFLOAT) asin(x))
+#define gcmACOSF(x) ((gctFLOAT) acos(x))
+#define gcmSQRTF(x) ((gctFLOAT) sqrt(x))
+#define gcmFABSF(x) ((gctFLOAT) fabs(x))
+#define gcmFMODF(x, y) ((gctFLOAT) fmod((x), (y)))
+#define gcmCEILF(x) ((gctFLOAT) ceil(x))
+#define gcmFLOORF(x) ((gctFLOAT) floor(x))
+
+
+
+/* Fixed point constants. */
+#define gcvZERO_X ((gctFIXED_POINT) 0x00000000)
+#define gcvHALF_X ((gctFIXED_POINT) 0x00008000)
+#define gcvONE_X ((gctFIXED_POINT) 0x00010000)
+#define gcvNEGONE_X ((gctFIXED_POINT) 0xFFFF0000)
+#define gcvTWO_X ((gctFIXED_POINT) 0x00020000)
+
+/* Integer constants. */
+#define gcvMAX_POS_INT ((gctINT) 0x7FFFFFFF)
+#define gcvMAX_NEG_INT ((gctINT) 0x80000000)
+
+/* Float constants. */
+#define gcvMAX_POS_FLOAT ((gctFLOAT) 3.4028235e+038)
+#define gcvMAX_NEG_FLOAT ((gctFLOAT) -3.4028235e+038)
+
+/******************************************************************************\
+***************************** Miscellaneous Macro ******************************
+\******************************************************************************/
+
+#define gcmKB2BYTES(Kilobyte) \
+( \
+ (Kilobyte) << 10 \
+)
+
+#define gcmMB2BYTES(Megabyte) \
+( \
+ (Megabyte) << 20 \
+)
+
+#define gcmMAT(Matrix, Row, Column) \
+( \
+ (Matrix) [(Row) * 3 + (Column)] \
+)
+
+#define gcmMAKE2CHAR(Char1, Char2) \
+( \
+ ((gctUINT16) (gctUINT8) (Char1) << 0) | \
+ ((gctUINT16) (gctUINT8) (Char2) << 8) \
+)
+
+#define gcmMAKE4CHAR(Char1, Char2, Char3, Char4) \
+( \
+ ((gctUINT32)(gctUINT8) (Char1) << 0) | \
+ ((gctUINT32)(gctUINT8) (Char2) << 8) | \
+ ((gctUINT32)(gctUINT8) (Char3) << 16) | \
+ ((gctUINT32)(gctUINT8) (Char4) << 24) \
+)
+
+/* some platforms need to fix the physical address for HW to access*/
+#ifdef __QNXNTO__
+
+gcmINLINE static gctUINT32 _qnxFixAddress(gctUINT32 Address)
+{
+ gctUINT32 baseAddress = 0;
+
+ if (gcmIS_ERROR(gcoOS_GetBaseAddress(gcvNULL, &baseAddress)))
+ {
+ baseAddress = 0;
+ }
+
+ return Address + baseAddress;
+}
+
+#define gcmFIXADDRESS _qnxFixAddress
+
+gcmINLINE static gctUINT32 _qnxkFixAddress(gctUINT32 Address)
+{
+ extern unsigned long baseAddress;
+ return Address + baseAddress;
+}
+
+#define gcmkFIXADDRESS _qnxkFixAddress
+
+#else
+
+#define gcmFIXADDRESS(address) \
+(\
+ (address)\
+)
+
+#define gcmkFIXADDRESS(address) \
+(\
+ (address)\
+)
+
+#endif
+
+/******************************************************************************\
+****************************** Kernel Debug Macro ******************************
+\******************************************************************************/
+
+/* Set signal to signaled state for specified process. */
+gceSTATUS
+gckOS_SetSignal(
+ IN gckOS Os,
+ IN gctHANDLE Process,
+ IN gctSIGNAL Signal
+ );
+
+/* Return the kernel logical pointer for the given physical one. */
+gceSTATUS
+gckOS_GetKernelLogical(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Return the kernel logical pointer for the given physical one. */
+gceSTATUS
+gckOS_GetKernelLogicalEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT32 Address,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----------------------------- Semaphore Object -----------------------------*/
+
+/* Increment the value of a semaphore. */
+gceSTATUS
+gckOS_IncrementSemaphore(
+ IN gckOS Os,
+ IN gctSEMAPHORE Semaphore
+ );
+
+/* Decrement the value of a semaphore (waiting might occur). */
+gceSTATUS
+gckOS_DecrementSemaphore(
+ IN gckOS Os,
+ IN gctSEMAPHORE Semaphore
+ );
+
+
+/*----------------------------------------------------------------------------*/
+/*------------------------------- Thread Object ------------------------------*/
+
+/* Start a thread. */
+gceSTATUS
+gckOS_StartThread(
+ IN gckOS Os,
+ IN gctTHREADFUNC ThreadFunction,
+ IN gctPOINTER ThreadParameter,
+ OUT gctTHREAD * Thread
+ );
+
+/* Stop a thread. */
+gceSTATUS
+gckOS_StopThread(
+ IN gckOS Os,
+ IN gctTHREAD Thread
+ );
+
+/* Verify whether the thread is still running. */
+gceSTATUS
+gckOS_VerifyThread(
+ IN gckOS Os,
+ IN gctTHREAD Thread
+ );
+
+
+/* Construct a new gckVGKERNEL object. */
+gceSTATUS
+gckVGKERNEL_Construct(
+ IN gckOS Os,
+ IN gctPOINTER Context,
+ IN gckKERNEL inKernel,
+ OUT gckVGKERNEL * Kernel
+ );
+
+/* Destroy an gckVGKERNEL object. */
+gceSTATUS
+gckVGKERNEL_Destroy(
+ IN gckVGKERNEL Kernel
+ );
+
+/* Allocate linear video memory. */
+gceSTATUS
+gckKERNEL_AllocateLinearMemory(
+ IN gckKERNEL Kernel,
+ IN OUT gcePOOL * Pool,
+ IN gctSIZE_T Bytes,
+ IN gctSIZE_T Alignment,
+ IN gceSURF_TYPE Type,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Unmap memory. */
+gceSTATUS
+gckKERNEL_UnmapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Dispatch a user-level command. */
+gceSTATUS
+gckVGKERNEL_Dispatch(
+ IN gckKERNEL Kernel,
+ IN gctBOOL FromUser,
+ IN OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Query command buffer requirements. */
+gceSTATUS
+gckKERNEL_QueryCommandBuffer(
+ IN gckKERNEL Kernel,
+ OUT gcsCOMMAND_BUFFER_INFO_PTR Information
+ );
+
+#if gcdDYNAMIC_MAP_RESERVED_MEMORY
+gceSTATUS
+gckOS_MapReservedMemoryToKernel(
+ IN gckOS Os,
+ IN gctUINT32 Physical,
+ IN gctINT Bytes,
+ IN OUT gctPOINTER *Virtual
+ );
+
+gceSTATUS
+gckOS_UnmapReservedMemoryFromKernel(
+ IN gctPOINTER Virtual
+ );
+#endif
+
+/******************************************************************************\
+******************************* gckVGHARDWARE Object ******************************
+\******************************************************************************/
+
+/* Construct a new gckVGHARDWARE object. */
+gceSTATUS
+gckVGHARDWARE_Construct(
+ IN gckOS Os,
+ OUT gckVGHARDWARE * Hardware
+ );
+
+/* Destroy an gckVGHARDWARE object. */
+gceSTATUS
+gckVGHARDWARE_Destroy(
+ IN gckVGHARDWARE Hardware
+ );
+
+/* Query system memory requirements. */
+gceSTATUS
+gckVGHARDWARE_QuerySystemMemory(
+ IN gckVGHARDWARE Hardware,
+ OUT gctSIZE_T * SystemSize,
+ OUT gctUINT32 * SystemBaseAddress
+ );
+
+/* Build virtual address. */
+gceSTATUS
+gckVGHARDWARE_BuildVirtualAddress(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Index,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Kickstart the command processor. */
+gceSTATUS
+gckVGHARDWARE_Execute(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Address,
+ IN gctSIZE_T Count
+ );
+
+/* Query the available memory. */
+gceSTATUS
+gckVGHARDWARE_QueryMemory(
+ IN gckVGHARDWARE Hardware,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctUINT32 * InternalBaseAddress,
+ OUT gctUINT32 * InternalAlignment,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctUINT32 * ExternalBaseAddress,
+ OUT gctUINT32 * ExternalAlignment,
+ OUT gctUINT32 * HorizontalTileSize,
+ OUT gctUINT32 * VerticalTileSize
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gckVGHARDWARE_QueryChipIdentity(
+ IN gckVGHARDWARE Hardware,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures,
+ OUT gctUINT32* ChipMinorFeatures1
+ );
+
+/* Convert an API format. */
+gceSTATUS
+gckVGHARDWARE_ConvertFormat(
+ IN gckVGHARDWARE Hardware,
+ IN gceSURF_FORMAT Format,
+ OUT gctUINT32 * BitsPerPixel,
+ OUT gctUINT32 * BytesPerTile
+ );
+
+/* Split a harwdare specific address into API stuff. */
+gceSTATUS
+gckVGHARDWARE_SplitMemory(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Align size to tile boundary. */
+gceSTATUS
+gckVGHARDWARE_AlignToTile(
+ IN gckVGHARDWARE Hardware,
+ IN gceSURF_TYPE Type,
+ IN OUT gctUINT32_PTR Width,
+ IN OUT gctUINT32_PTR Height
+ );
+
+/* Convert logical address to hardware specific address. */
+gceSTATUS
+gckVGHARDWARE_ConvertLogical(
+ IN gckVGHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+/* Program MMU. */
+gceSTATUS
+gckVGHARDWARE_SetMMU(
+ IN gckVGHARDWARE Hardware,
+ IN gctPOINTER Logical
+ );
+
+/* Flush the MMU. */
+gceSTATUS
+gckVGHARDWARE_FlushMMU(
+ IN gckVGHARDWARE Hardware
+ );
+
+/* Get idle register. */
+gceSTATUS
+gckVGHARDWARE_GetIdle(
+ IN gckVGHARDWARE Hardware,
+ OUT gctUINT32 * Data
+ );
+
+/* Flush the caches. */
+gceSTATUS
+gckVGHARDWARE_Flush(
+ IN gckVGHARDWARE Hardware,
+ IN gceKERNEL_FLUSH Flush,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Enable/disable fast clear. */
+gceSTATUS
+gckVGHARDWARE_SetFastClear(
+ IN gckVGHARDWARE Hardware,
+ IN gctINT Enable
+ );
+
+gceSTATUS
+gckVGHARDWARE_ReadInterrupt(
+ IN gckVGHARDWARE Hardware,
+ OUT gctUINT32_PTR IDs
+ );
+
+/* Power management. */
+gceSTATUS
+gckVGHARDWARE_SetPowerManagementState(
+ IN gckVGHARDWARE Hardware,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gckVGHARDWARE_QueryPowerManagementState(
+ IN gckVGHARDWARE Hardware,
+ OUT gceCHIPPOWERSTATE* State
+ );
+
+gceSTATUS
+gckVGHARDWARE_SetPowerOffTimeout(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Timeout
+ );
+
+gceSTATUS
+gckVGHARDWARE_QueryPowerOffTimeout(
+ IN gckVGHARDWARE Hardware,
+ OUT gctUINT32* Timeout
+ );
+
+gceSTATUS
+gckVGHARDWARE_QueryIdle(
+ IN gckVGHARDWARE Hardware,
+ OUT gctBOOL_PTR IsIdle
+ );
+/******************************************************************************\
+*************************** Command Buffer Structures **************************
+\******************************************************************************/
+
+/* Vacant command buffer marker. */
+#define gcvVACANT_BUFFER ((gcsCOMPLETION_SIGNAL_PTR) (1))
+
+/* Command buffer header. */
+typedef struct _gcsCMDBUFFER * gcsCMDBUFFER_PTR;
+typedef struct _gcsCMDBUFFER
+{
+ /* Pointer to the completion signal. */
+ gcsCOMPLETION_SIGNAL_PTR completion;
+
+ /* The user sets this to the node of the container buffer whitin which
+ this particular command buffer resides. The kernel sets this to the
+ node of the internally allocated buffer. */
+ gcuVIDMEM_NODE_PTR node;
+
+ /* Command buffer hardware address. */
+ gctUINT32 address;
+
+ /* The offset of the buffer from the beginning of the header. */
+ gctUINT32 bufferOffset;
+
+ /* Size of the area allocated for the data portion of this particular
+ command buffer (headers and tail reserves are excluded). */
+ gctSIZE_T size;
+
+ /* Offset into the buffer [0..size]; reflects exactly how much data has
+ been put into the command buffer. */
+ gctUINT offset;
+
+ /* The number of command units in the buffer for the hardware to
+ execute. */
+ gctSIZE_T dataCount;
+
+ /* MANAGED BY : user HAL (gcoBUFFER object).
+ USED BY : user HAL (gcoBUFFER object).
+ Points to the immediate next allocated command buffer. */
+ gcsCMDBUFFER_PTR nextAllocated;
+
+ /* MANAGED BY : user layers (HAL and drivers).
+ USED BY : kernel HAL (gcoBUFFER object).
+ Points to the next subbuffer if any. A family of subbuffers are chained
+ together and are meant to be executed inseparably as a unit. Meaning
+ that context switching cannot occur while a chain of subbuffers is being
+ executed. */
+ gcsCMDBUFFER_PTR nextSubBuffer;
+}
+gcsCMDBUFFER;
+
+/* Command queue element. */
+typedef struct _gcsVGCMDQUEUE
+{
+ /* Pointer to the command buffer header. */
+ gcsCMDBUFFER_PTR commandBuffer;
+
+ /* Dynamic vs. static command buffer state. */
+ gctBOOL dynamic;
+}
+gcsVGCMDQUEUE;
+
+/* Context map entry. */
+typedef struct _gcsVGCONTEXT_MAP
+{
+ /* State index. */
+ gctUINT32 index;
+
+ /* New state value. */
+ gctUINT32 data;
+
+ /* Points to the next entry in the mod list. */
+ gcsVGCONTEXT_MAP_PTR next;
+}
+gcsVGCONTEXT_MAP;
+
+/* gcsVGCONTEXT structure that holds the current context. */
+typedef struct _gcsVGCONTEXT
+{
+ /* Context ID. */
+ gctUINT64 id;
+
+ /* State caching ebable flag. */
+ gctBOOL stateCachingEnabled;
+
+ /* Current pipe. */
+ gctUINT32 currentPipe;
+
+ /* State map/mod buffer. */
+ gctSIZE_T mapFirst;
+ gctSIZE_T mapLast;
+#ifdef __QNXNTO__
+ gctSIZE_T mapContainerSize;
+#endif
+ gcsVGCONTEXT_MAP_PTR mapContainer;
+ gcsVGCONTEXT_MAP_PTR mapPrev;
+ gcsVGCONTEXT_MAP_PTR mapCurr;
+ gcsVGCONTEXT_MAP_PTR firstPrevMap;
+ gcsVGCONTEXT_MAP_PTR firstCurrMap;
+
+ /* Main context buffer. */
+ gcsCMDBUFFER_PTR header;
+ gctUINT32_PTR buffer;
+
+ /* Completion signal. */
+ gctHANDLE process;
+ gctSIGNAL signal;
+
+#if defined(__QNXNTO__)
+ gctINT32 coid;
+ gctINT32 rcvid;
+#endif
+}
+gcsVGCONTEXT;
+
+/* User space task header. */
+typedef struct _gcsTASK * gcsTASK_PTR;
+typedef struct _gcsTASK
+{
+ /* Pointer to the next task for the same interrupt in user space. */
+ gcsTASK_PTR next;
+
+ /* Size of the task data that immediately follows the structure. */
+ gctUINT size;
+
+ /* Task data starts here. */
+ /* ... */
+}
+gcsTASK;
+
+/* User space task master table entry. */
+typedef struct _gcsTASK_MASTER_ENTRY * gcsTASK_MASTER_ENTRY_PTR;
+typedef struct _gcsTASK_MASTER_ENTRY
+{
+ /* Pointers to the head and to the tail of the task chain. */
+ gcsTASK_PTR head;
+ gcsTASK_PTR tail;
+}
+gcsTASK_MASTER_ENTRY;
+
+/* User space task master table entry. */
+typedef struct _gcsTASK_MASTER_TABLE
+{
+ /* Table with one entry per block. */
+ gcsTASK_MASTER_ENTRY table[gcvBLOCK_COUNT];
+
+ /* The total number of tasks sckeduled. */
+ gctUINT count;
+
+ /* The total size of event data in bytes. */
+ gctUINT size;
+
+#if defined(__QNXNTO__)
+ gctINT32 coid;
+ gctINT32 rcvid;
+#endif
+}
+gcsTASK_MASTER_TABLE;
+
+/******************************************************************************\
+***************************** gckVGINTERRUPT Object ******************************
+\******************************************************************************/
+
+typedef struct _gckVGINTERRUPT * gckVGINTERRUPT;
+
+typedef gceSTATUS (* gctINTERRUPT_HANDLER)(
+ IN gckVGKERNEL Kernel
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Construct(
+ IN gckVGKERNEL Kernel,
+ OUT gckVGINTERRUPT * Interrupt
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Destroy(
+ IN gckVGINTERRUPT Interrupt
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Enable(
+ IN gckVGINTERRUPT Interrupt,
+ IN OUT gctINT32_PTR Id,
+ IN gctINTERRUPT_HANDLER Handler
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Disable(
+ IN gckVGINTERRUPT Interrupt,
+ IN gctINT32 Id
+ );
+
+#ifndef __QNXNTO__
+
+gceSTATUS
+gckVGINTERRUPT_Enque(
+ IN gckVGINTERRUPT Interrupt
+ );
+
+#else
+
+gceSTATUS
+gckVGINTERRUPT_Enque(
+ IN gckVGINTERRUPT Interrupt,
+ OUT gckOS *Os,
+ OUT gctSEMAPHORE *Semaphore
+ );
+
+#endif
+
+gceSTATUS
+gckVGINTERRUPT_DumpState(
+ IN gckVGINTERRUPT Interrupt
+ );
+
+
+/******************************************************************************\
+******************************* gckVGCOMMAND Object *******************************
+\******************************************************************************/
+
+typedef struct _gckVGCOMMAND * gckVGCOMMAND;
+
+/* Construct a new gckVGCOMMAND object. */
+gceSTATUS
+gckVGCOMMAND_Construct(
+ IN gckVGKERNEL Kernel,
+ IN gctUINT TaskGranularity,
+ IN gctUINT QueueSize,
+ OUT gckVGCOMMAND * Command
+ );
+
+/* Destroy an gckVGCOMMAND object. */
+gceSTATUS
+gckVGCOMMAND_Destroy(
+ IN gckVGCOMMAND Command
+ );
+
+/* Query command buffer attributes. */
+gceSTATUS
+gckVGCOMMAND_QueryCommandBuffer(
+ IN gckVGCOMMAND Command,
+ OUT gcsCOMMAND_BUFFER_INFO_PTR Information
+ );
+
+/* Allocate a command queue. */
+gceSTATUS
+gckVGCOMMAND_Allocate(
+ IN gckVGCOMMAND Command,
+ IN gctSIZE_T Size,
+ OUT gcsCMDBUFFER_PTR * CommandBuffer,
+ OUT gctPOINTER * Data
+ );
+
+/* Release memory held by the command queue. */
+gceSTATUS
+gckVGCOMMAND_Free(
+ IN gckVGCOMMAND Command,
+ IN gcsCMDBUFFER_PTR CommandBuffer
+ );
+
+/* Schedule the command queue for execution. */
+gceSTATUS
+gckVGCOMMAND_Execute(
+ IN gckVGCOMMAND Command,
+ IN gcsCMDBUFFER_PTR CommandBuffer
+ );
+
+/* Commit a buffer to the command queue. */
+gceSTATUS
+gckVGCOMMAND_Commit(
+ IN gckVGCOMMAND Command,
+ IN gcsVGCONTEXT_PTR Context,
+ IN gcsVGCMDQUEUE_PTR Queue,
+ IN gctUINT EntryCount,
+ IN gcsTASK_MASTER_TABLE_PTR TaskTable
+ );
+
+/******************************************************************************\
+********************************* gckVGMMU Object ********************************
+\******************************************************************************/
+
+typedef struct _gckVGMMU * gckVGMMU;
+
+/* Construct a new gckVGMMU object. */
+gceSTATUS
+gckVGMMU_Construct(
+ IN gckVGKERNEL Kernel,
+ IN gctSIZE_T MmuSize,
+ OUT gckVGMMU * Mmu
+ );
+
+/* Destroy an gckVGMMU object. */
+gceSTATUS
+gckVGMMU_Destroy(
+ IN gckVGMMU Mmu
+ );
+
+/* Allocate pages inside the MMU. */
+gceSTATUS
+gckVGMMU_AllocatePages(
+ IN gckVGMMU Mmu,
+ IN gctSIZE_T PageCount,
+ OUT gctPOINTER * PageTable,
+ OUT gctUINT32 * Address
+ );
+
+/* Remove a page table from the MMU. */
+gceSTATUS
+gckVGMMU_FreePages(
+ IN gckVGMMU Mmu,
+ IN gctPOINTER PageTable,
+ IN gctSIZE_T PageCount
+ );
+
+/* Set the MMU page with info. */
+gceSTATUS
+gckVGMMU_SetPage(
+ IN gckVGMMU Mmu,
+ IN gctUINT32 PageAddress,
+ IN gctUINT32 *PageEntry
+ );
+
+#endif /* gcdENABLE_VG */
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __gc_hal_h_ */
diff --git a/src/include_imx6/gc_abi.h b/src/include_imx6/gc_abi.h
new file mode 100644
index 0000000..37460ef
--- /dev/null
+++ b/src/include_imx6/gc_abi.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/** Kernel ABI definition file for Etna **/
+#ifndef H_GCABI
+#define H_GCABI
+//#define GCABI_USER_SIGNAL_HAS_TYPE
+//#define GCABI_CONTEXT_HAS_PHYSICAL
+#define GCABI_HAS_MINOR_FEATURES_2
+#define GCABI_HAS_MINOR_FEATURES_3
+
+// One of these must be set:
+//#define GCABI_HAS_CONTEXT
+#define GCABI_HAS_STATE_DELTAS
+
+// Interface structure has hardware type (core id)
+#define GCABI_HAS_HARDWARE_TYPE
+
+// Chip identity has pixelPipes, instructionCount, numConstants, bufferSize
+#define GCABI_CHIPIDENTITY_EXT
+
+/* IOCTL structure for userspace driver*/
+typedef struct
+{
+ void *in_buf;
+ unsigned int in_buf_size;
+ void *out_buf;
+ unsigned int out_buf_size;
+} vivante_ioctl_data_t;
+
+#include "gc_hal_base.h"
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_kernel_buffer.h"
+#include "gc_hal_types.h"
+#endif
+
diff --git a/src/include_imx6/gc_hal.h b/src/include_imx6/gc_hal.h
new file mode 100644
index 0000000..a7e6e7a
--- /dev/null
+++ b/src/include_imx6/gc_hal.h
@@ -0,0 +1,2339 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_h_
+#define __gc_hal_h_
+
+#include "gc_hal_rename.h"
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+#include "gc_hal_base.h"
+#include "gc_hal_profiler.h"
+#include "gc_hal_driver.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* Alignment Macros *******************************
+\******************************************************************************/
+
+#define gcmALIGN(n, align) \
+( \
+ ((n) + ((align) - 1)) & ~((align) - 1) \
+)
+
+#define gcmALIGN_BASE(n, align) \
+( \
+ (n) & ~((align) - 1) \
+)
+
+/******************************************************************************\
+***************************** Element Count Macro *****************************
+\******************************************************************************/
+
+#define gcmSIZEOF(a) \
+( \
+ (gctSIZE_T) (sizeof(a)) \
+)
+
+#define gcmCOUNTOF(a) \
+( \
+ sizeof(a) / sizeof(a[0]) \
+)
+
+/******************************************************************************\
+******************************** gcsOBJECT Object *******************************
+\******************************************************************************/
+
+/* Type of objects. */
+typedef enum _gceOBJECT_TYPE
+{
+ gcvOBJ_UNKNOWN = 0,
+ gcvOBJ_2D = gcmCC('2','D',' ',' '),
+ gcvOBJ_3D = gcmCC('3','D',' ',' '),
+ gcvOBJ_ATTRIBUTE = gcmCC('A','T','T','R'),
+ gcvOBJ_BRUSHCACHE = gcmCC('B','R','U','$'),
+ gcvOBJ_BRUSHNODE = gcmCC('B','R','U','n'),
+ gcvOBJ_BRUSH = gcmCC('B','R','U','o'),
+ gcvOBJ_BUFFER = gcmCC('B','U','F','R'),
+ gcvOBJ_COMMAND = gcmCC('C','M','D',' '),
+ gcvOBJ_COMMANDBUFFER = gcmCC('C','M','D','B'),
+ gcvOBJ_CONTEXT = gcmCC('C','T','X','T'),
+ gcvOBJ_DEVICE = gcmCC('D','E','V',' '),
+ gcvOBJ_DUMP = gcmCC('D','U','M','P'),
+ gcvOBJ_EVENT = gcmCC('E','V','N','T'),
+ gcvOBJ_FUNCTION = gcmCC('F','U','N','C'),
+ gcvOBJ_HAL = gcmCC('H','A','L',' '),
+ gcvOBJ_HARDWARE = gcmCC('H','A','R','D'),
+ gcvOBJ_HEAP = gcmCC('H','E','A','P'),
+ gcvOBJ_INDEX = gcmCC('I','N','D','X'),
+ gcvOBJ_INTERRUPT = gcmCC('I','N','T','R'),
+ gcvOBJ_KERNEL = gcmCC('K','E','R','N'),
+ gcvOBJ_KERNEL_FUNCTION = gcmCC('K','F','C','N'),
+ gcvOBJ_MEMORYBUFFER = gcmCC('M','E','M','B'),
+ gcvOBJ_MMU = gcmCC('M','M','U',' '),
+ gcvOBJ_OS = gcmCC('O','S',' ',' '),
+ gcvOBJ_OUTPUT = gcmCC('O','U','T','P'),
+ gcvOBJ_PAINT = gcmCC('P','N','T',' '),
+ gcvOBJ_PATH = gcmCC('P','A','T','H'),
+ gcvOBJ_QUEUE = gcmCC('Q','U','E',' '),
+ gcvOBJ_SAMPLER = gcmCC('S','A','M','P'),
+ gcvOBJ_SHADER = gcmCC('S','H','D','R'),
+ gcvOBJ_STREAM = gcmCC('S','T','R','M'),
+ gcvOBJ_SURF = gcmCC('S','U','R','F'),
+ gcvOBJ_TEXTURE = gcmCC('T','X','T','R'),
+ gcvOBJ_UNIFORM = gcmCC('U','N','I','F'),
+ gcvOBJ_VARIABLE = gcmCC('V','A','R','I'),
+ gcvOBJ_VERTEX = gcmCC('V','R','T','X'),
+ gcvOBJ_VIDMEM = gcmCC('V','M','E','M'),
+ gcvOBJ_VG = gcmCC('V','G',' ',' '),
+}
+gceOBJECT_TYPE;
+
+/* gcsOBJECT object defintinon. */
+typedef struct _gcsOBJECT
+{
+ /* Type of an object. */
+ gceOBJECT_TYPE type;
+}
+gcsOBJECT;
+
+typedef struct _gckHARDWARE * gckHARDWARE;
+
+/* CORE flags. */
+typedef enum _gceCORE
+{
+ gcvCORE_MAJOR = 0x0,
+ gcvCORE_2D = 0x1,
+ gcvCORE_VG = 0x2
+}
+gceCORE;
+
+#define gcdCORE_COUNT 3
+
+/*******************************************************************************
+**
+** gcmVERIFY_OBJECT
+**
+** Assert if an object is invalid or is not of the specified type. If the
+** object is invalid or not of the specified type, gcvSTATUS_INVALID_OBJECT
+** will be returned from the current function. In retail mode this macro
+** does nothing.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+#define _gcmVERIFY_OBJECT(prefix, obj, t) \
+ if ((obj) == gcvNULL) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: NULL"); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT((obj) != gcvNULL); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ } \
+ else if (((gcsOBJECT*) (obj))->type != t) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: %c%c%c%c", \
+ gcmCC_PRINT(((gcsOBJECT*) (obj))->type)); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT(((gcsOBJECT*)(obj))->type == t); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ }
+
+# define gcmVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcm, obj, t)
+# define gcmkVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcmk, obj, t)
+#else
+# define gcmVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+# define gcmkVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+#endif
+
+/******************************************************************************/
+/*VERIFY_OBJECT if special return expected*/
+/******************************************************************************/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_OBJECT_RETURN(prefix, obj, t, retVal) \
+ do \
+ { \
+ if ((obj) == gcvNULL) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT_RETURN failed: NULL"); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT((obj) != gcvNULL); \
+ prefix##FOOTER_ARG("retVal=%d", retVal); \
+ return retVal; \
+ } \
+ else if (((gcsOBJECT*) (obj))->type != t) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT_RETURN failed: %c%c%c%c", \
+ gcmCC_PRINT(((gcsOBJECT*) (obj))->type)); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT(((gcsOBJECT*)(obj))->type == t); \
+ prefix##FOOTER_ARG("retVal=%d", retVal); \
+ return retVal; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_OBJECT_RETURN(obj, t, retVal) \
+ _gcmVERIFY_OBJECT_RETURN(gcm, obj, t, retVal)
+# define gcmkVERIFY_OBJECT_RETURN(obj, t, retVal) \
+ _gcmVERIFY_OBJECT_RETURN(gcmk, obj, t, retVal)
+#else
+# define gcmVERIFY_OBJECT_RETURN(obj, t) do {} while (gcvFALSE)
+# define gcmVERIFY_OBJECT_RETURN(obj, t) do {} while (gcvFALSE)
+#endif
+
+/******************************************************************************\
+********************************** gckOS Object *********************************
+\******************************************************************************/
+
+/* Construct a new gckOS object. */
+gceSTATUS
+gckOS_Construct(
+ IN gctPOINTER Context,
+ OUT gckOS * Os
+ );
+
+/* Destroy an gckOS object. */
+gceSTATUS
+gckOS_Destroy(
+ IN gckOS Os
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckOS_QueryVideoMemory(
+ IN gckOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gckOS_Allocate(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gckOS_Free(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Wrapper for allocation memory.. */
+gceSTATUS
+gckOS_AllocateMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Wrapper for freeing memory. */
+gceSTATUS
+gckOS_FreeMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemoryEx(
+ IN gckOS Os,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Lock pages. */
+gceSTATUS
+gckOS_LockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Cacheable,
+ OUT gctPOINTER * Logical,
+ OUT gctSIZE_T * PageCount
+ );
+
+/* Map pages. */
+gceSTATUS
+gckOS_MapPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Logical,
+#endif
+ IN gctSIZE_T PageCount,
+ IN gctPOINTER PageTable
+ );
+
+/* Map pages. */
+gceSTATUS
+gckOS_MapPagesEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Logical,
+#endif
+ IN gctSIZE_T PageCount,
+ IN gctPOINTER PageTable
+ );
+
+/* Unlock pages. */
+gceSTATUS
+gckOS_UnlockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Free paged memory. */
+gceSTATUS
+gckOS_FreePagedMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Allocate non-paged memory. */
+gceSTATUS
+gckOS_AllocateNonPagedMemory(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non-paged memory. */
+gceSTATUS
+gckOS_FreeNonPagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gckOS_AllocateContiguous(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gckOS_FreeContiguous(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get the number fo bytes per page. */
+gceSTATUS
+gckOS_GetPageSize(
+ IN gckOS Os,
+ OUT gctSIZE_T * PageSize
+ );
+
+/* Get the physical address of a corresponding logical address. */
+gceSTATUS
+gckOS_GetPhysicalAddress(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+/* Get the physical address of a corresponding logical address. */
+gceSTATUS
+gckOS_GetPhysicalAddressProcess(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ IN gctUINT32 ProcessID,
+ OUT gctUINT32 * Address
+ );
+
+/* Map physical memory. */
+gceSTATUS
+gckOS_MapPhysical(
+ IN gckOS Os,
+ IN gctUINT32 Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap previously mapped physical memory. */
+gceSTATUS
+gckOS_UnmapPhysical(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Read data from a hardware register. */
+gceSTATUS
+gckOS_ReadRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+/* Read data from a hardware register. */
+gceSTATUS
+gckOS_ReadRegisterEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+/* Write data to a hardware register. */
+gceSTATUS
+gckOS_WriteRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Write data to a hardware register. */
+gceSTATUS
+gckOS_WriteRegisterEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Write data to a 32-bit memory location. */
+gceSTATUS
+gckOS_WriteMemory(
+ IN gckOS Os,
+ IN gctPOINTER Address,
+ IN gctUINT32 Data
+ );
+
+/* Map physical memory into the process space. */
+gceSTATUS
+gckOS_MapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap physical memory from the specified process space. */
+gceSTATUS
+gckOS_UnmapMemoryEx(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical,
+ IN gctUINT32 PID
+ );
+
+/* Unmap physical memory from the process space. */
+gceSTATUS
+gckOS_UnmapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Create a new mutex. */
+gceSTATUS
+gckOS_CreateMutex(
+ IN gckOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gckOS_DeleteMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gckOS_AcquireMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gckOS_ReleaseMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Atomically exchange a pair of 32-bit values. */
+gceSTATUS
+gckOS_AtomicExchange(
+ IN gckOS Os,
+ IN OUT gctUINT32_PTR Target,
+ IN gctUINT32 NewValue,
+ OUT gctUINT32_PTR OldValue
+ );
+
+/* Atomically exchange a pair of pointers. */
+gceSTATUS
+gckOS_AtomicExchangePtr(
+ IN gckOS Os,
+ IN OUT gctPOINTER * Target,
+ IN gctPOINTER NewValue,
+ OUT gctPOINTER * OldValue
+ );
+
+#if gcdSMP
+gceSTATUS
+gckOS_AtomSetMask(
+ IN gctPOINTER Atom,
+ IN gctUINT32 Mask
+ );
+
+gceSTATUS
+gckOS_AtomClearMask(
+ IN gctPOINTER Atom,
+ IN gctUINT32 Mask
+ );
+#endif
+
+gceSTATUS
+gckOS_DumpGPUState(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomConstruct
+**
+** Create an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** OUTPUT:
+**
+** gctPOINTER * Atom
+** Pointer to a variable receiving the constructed atom.
+*/
+gceSTATUS
+gckOS_AtomConstruct(
+ IN gckOS Os,
+ OUT gctPOINTER * Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDestroy
+**
+** Destroy an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom to destroy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_AtomDestroy(
+ IN gckOS Os,
+ OUT gctPOINTER Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomGet
+**
+** Get the 32-bit value protected by an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the value of the atom.
+*/
+gceSTATUS
+gckOS_AtomGet(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomSet
+**
+** Set the 32-bit value protected by an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** gctINT32 Value
+** The value of the atom.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_AtomSet(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ IN gctINT32 Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomIncrement
+**
+** Atomically increment the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomIncrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDecrement
+**
+** Atomically decrement the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomDecrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gckOS_Delay(
+ IN gckOS Os,
+ IN gctUINT32 Delay
+ );
+
+/* Get time in milliseconds. */
+gceSTATUS
+gckOS_GetTicks(
+ OUT gctUINT32_PTR Time
+ );
+
+/* Compare time value. */
+gceSTATUS
+gckOS_TicksAfter(
+ IN gctUINT32 Time1,
+ IN gctUINT32 Time2,
+ OUT gctBOOL_PTR IsAfter
+ );
+
+/* Get time in microseconds. */
+gceSTATUS
+gckOS_GetTime(
+ OUT gctUINT64_PTR Time
+ );
+
+/* Memory barrier. */
+gceSTATUS
+gckOS_MemoryBarrier(
+ IN gckOS Os,
+ IN gctPOINTER Address
+ );
+
+/* Map user pointer. */
+gceSTATUS
+gckOS_MapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Unmap user pointer. */
+gceSTATUS
+gckOS_UnmapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ IN gctPOINTER KernelPointer
+ );
+
+/*******************************************************************************
+**
+** gckOS_QueryNeedCopy
+**
+** Query whether the memory can be accessed or mapped directly or it has to be
+** copied.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to an gckOS object.
+**
+** gctUINT32 ProcessID
+** Process ID of the current process.
+**
+** OUTPUT:
+**
+** gctBOOL_PTR NeedCopy
+** Pointer to a boolean receiving gcvTRUE if the memory needs a copy or
+** gcvFALSE if the memory can be accessed or mapped dircetly.
+*/
+gceSTATUS
+gckOS_QueryNeedCopy(
+ IN gckOS Os,
+ IN gctUINT32 ProcessID,
+ OUT gctBOOL_PTR NeedCopy
+ );
+
+/*******************************************************************************
+**
+** gckOS_CopyFromUserData
+**
+** Copy data from user to kernel memory.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to an gckOS object.
+**
+** gctPOINTER KernelPointer
+** Pointer to kernel memory.
+**
+** gctPOINTER Pointer
+** Pointer to user memory.
+**
+** gctSIZE_T Size
+** Number of bytes to copy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_CopyFromUserData(
+ IN gckOS Os,
+ IN gctPOINTER KernelPointer,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size
+ );
+
+/*******************************************************************************
+**
+** gckOS_CopyToUserData
+**
+** Copy data from kernel to user memory.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to an gckOS object.
+**
+** gctPOINTER KernelPointer
+** Pointer to kernel memory.
+**
+** gctPOINTER Pointer
+** Pointer to user memory.
+**
+** gctSIZE_T Size
+** Number of bytes to copy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_CopyToUserData(
+ IN gckOS Os,
+ IN gctPOINTER KernelPointer,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size
+ );
+
+#ifdef __QNXNTO__
+/* Map user physical address. */
+gceSTATUS
+gckOS_MapUserPhysical(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Phys,
+ OUT gctPOINTER * KernelPointer
+ );
+#endif
+
+gceSTATUS
+gckOS_SuspendInterrupt(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_SuspendInterruptEx(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+gceSTATUS
+gckOS_ResumeInterrupt(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_ResumeInterruptEx(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gckOS_GetBaseAddress(
+ IN gckOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gckOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gckOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Device I/O control to the kernel HAL layer. */
+gceSTATUS
+gckOS_DeviceControl(
+ IN gckOS Os,
+ IN gctBOOL FromUser,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ OUT gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/*******************************************************************************
+**
+** gckOS_GetProcessID
+**
+** Get current process ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ProcessID
+** Pointer to the variable that receives the process ID.
+*/
+gceSTATUS
+gckOS_GetProcessID(
+ OUT gctUINT32_PTR ProcessID
+ );
+
+gceSTATUS
+gckOS_GetCurrentProcessID(
+ OUT gctUINT32_PTR ProcessID
+ );
+
+/*******************************************************************************
+**
+** gckOS_GetThreadID
+**
+** Get current thread ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ThreadID
+** Pointer to the variable that receives the thread ID.
+*/
+gceSTATUS
+gckOS_GetThreadID(
+ OUT gctUINT32_PTR ThreadID
+ );
+
+/******************************************************************************\
+********************************** Signal Object *********************************
+\******************************************************************************/
+
+/* Create a signal. */
+gceSTATUS
+gckOS_CreateSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gckOS_DestroySignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gckOS_Signal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gckOS_WaitSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Map a user signal to the kernel space. */
+gceSTATUS
+gckOS_MapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process,
+ OUT gctSIGNAL * MappedSignal
+ );
+
+/* Unmap a user signal */
+gceSTATUS
+gckOS_UnmapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Map user memory. */
+gceSTATUS
+gckOS_MapUserMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Map user memory. */
+gceSTATUS
+gckOS_MapUserMemoryEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gckOS_UnmapUserMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gckOS_UnmapUserMemoryEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+#if !USE_NEW_LINUX_SIGNAL
+/* Create signal to be used in the user space. */
+gceSTATUS
+gckOS_CreateUserSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctINT * SignalID
+ );
+
+/* Destroy signal used in the user space. */
+gceSTATUS
+gckOS_DestroyUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID
+ );
+
+/* Wait for signal used in the user space. */
+gceSTATUS
+gckOS_WaitUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctUINT32 Wait
+ );
+
+/* Signal a signal used in the user space. */
+gceSTATUS
+gckOS_SignalUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctBOOL State
+ );
+#endif /* USE_NEW_LINUX_SIGNAL */
+
+/* Set a signal owned by a process. */
+#if defined(__QNXNTO__)
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctINT Recvid,
+ IN gctINT Coid
+ );
+#else
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process
+ );
+#endif
+
+/******************************************************************************\
+** Cache Support
+*/
+
+gceSTATUS
+gckOS_CacheClean(
+ gckOS Os,
+ gctUINT32 ProcessID,
+ gctPHYS_ADDR Handle,
+ gctPOINTER Physical,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gckOS_CacheFlush(
+ gckOS Os,
+ gctUINT32 ProcessID,
+ gctPHYS_ADDR Handle,
+ gctPOINTER Physical,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gckOS_CacheInvalidate(
+ gckOS Os,
+ gctUINT32 ProcessID,
+ gctPHYS_ADDR Handle,
+ gctPOINTER Physical,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+** Debug Support
+*/
+
+void
+gckOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gckOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gckOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+/*******************************************************************************
+** Broadcast interface.
+*/
+
+typedef enum _gceBROADCAST
+{
+ /* GPU might be idle. */
+ gcvBROADCAST_GPU_IDLE,
+
+ /* A commit is going to happen. */
+ gcvBROADCAST_GPU_COMMIT,
+
+ /* GPU seems to be stuck. */
+ gcvBROADCAST_GPU_STUCK,
+
+ /* First process gets attached. */
+ gcvBROADCAST_FIRST_PROCESS,
+
+ /* Last process gets detached. */
+ gcvBROADCAST_LAST_PROCESS,
+
+ /* AXI bus error. */
+ gcvBROADCAST_AXI_BUS_ERROR,
+}
+gceBROADCAST;
+
+gceSTATUS
+gckOS_Broadcast(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gceBROADCAST Reason
+ );
+
+gceSTATUS
+gckOS_BroadcastHurry(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gctUINT Urgency
+ );
+
+gceSTATUS
+gckOS_BroadcastCalibrateSpeed(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gctUINT Idle,
+ IN gctUINT Time
+ );
+
+/*******************************************************************************
+**
+** gckOS_SetGPUPower
+**
+** Set the power of the GPU on or off.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.ß
+**
+** gceCORE Core
+** Core type.
+**
+** gctBOOL Clock
+** gcvTRUE to turn on the clock, or gcvFALSE to turn off the clock.
+**
+** gctBOOL Power
+** gcvTRUE to turn on the power, or gcvFALSE to turn off the power.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_SetGPUPower(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctBOOL Clock,
+ IN gctBOOL Power
+ );
+
+/*******************************************************************************
+** Semaphores.
+*/
+
+/* Create a new semaphore. */
+gceSTATUS
+gckOS_CreateSemaphore(
+ IN gckOS Os,
+ OUT gctPOINTER * Semaphore
+ );
+
+#if gcdENABLE_VG
+gceSTATUS
+gckOS_CreateSemaphoreVG(
+ IN gckOS Os,
+ OUT gctPOINTER * Semaphore
+ );
+#endif
+
+/* Delete a semahore. */
+gceSTATUS
+gckOS_DestroySemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Acquire a semahore. */
+gceSTATUS
+gckOS_AcquireSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Try to acquire a semahore. */
+gceSTATUS
+gckOS_TryAcquireSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Release a semahore. */
+gceSTATUS
+gckOS_ReleaseSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/******************************************************************************\
+********************************* gckHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gckHEAP * gckHEAP;
+
+/* Construct a new gckHEAP object. */
+gceSTATUS
+gckHEAP_Construct(
+ IN gckOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gckHEAP * Heap
+ );
+
+/* Destroy an gckHEAP object. */
+gceSTATUS
+gckHEAP_Destroy(
+ IN gckHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gckHEAP_Allocate(
+ IN gckHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckHEAP_Free(
+ IN gckHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+/* Profile the heap. */
+gceSTATUS
+gckHEAP_ProfileStart(
+ IN gckHEAP Heap
+ );
+
+gceSTATUS
+gckHEAP_ProfileEnd(
+ IN gckHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+
+
+/******************************************************************************\
+******************************** gckVIDMEM Object ******************************
+\******************************************************************************/
+
+typedef struct _gckVIDMEM * gckVIDMEM;
+typedef struct _gckKERNEL * gckKERNEL;
+typedef struct _gckDB * gckDB;
+
+/* Construct a new gckVIDMEM object. */
+gceSTATUS
+gckVIDMEM_Construct(
+ IN gckOS Os,
+ IN gctUINT32 BaseAddress,
+ IN gctSIZE_T Bytes,
+ IN gctSIZE_T Threshold,
+ IN gctSIZE_T Banking,
+ OUT gckVIDMEM * Memory
+ );
+
+/* Destroy an gckVDIMEM object. */
+gceSTATUS
+gckVIDMEM_Destroy(
+ IN gckVIDMEM Memory
+ );
+
+/* Allocate rectangular memory. */
+gceSTATUS
+gckVIDMEM_Allocate(
+ IN gckVIDMEM Memory,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT BytesPerPixel,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Allocate linear memory. */
+gceSTATUS
+gckVIDMEM_AllocateLinear(
+ IN gckVIDMEM Memory,
+ IN gctSIZE_T Bytes,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckVIDMEM_Free(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/* Lock memory. */
+gceSTATUS
+gckVIDMEM_Lock(
+ IN gckKERNEL Kernel,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctBOOL Cacheable,
+ OUT gctUINT32 * Address
+ );
+
+/* Unlock memory. */
+gceSTATUS
+gckVIDMEM_Unlock(
+ IN gckKERNEL Kernel,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type,
+ IN OUT gctBOOL * Asynchroneous
+ );
+
+/* Construct a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_ConstructVirtual(
+ IN gckKERNEL Kernel,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Destroy a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_DestroyVirtual(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/******************************************************************************\
+******************************** gckKERNEL Object ******************************
+\******************************************************************************/
+
+struct _gcsHAL_INTERFACE;
+
+/* Notifications. */
+typedef enum _gceNOTIFY
+{
+ gcvNOTIFY_INTERRUPT,
+ gcvNOTIFY_COMMAND_QUEUE,
+}
+gceNOTIFY;
+
+/* Flush flags. */
+typedef enum _gceKERNEL_FLUSH
+{
+ gcvFLUSH_COLOR = 0x01,
+ gcvFLUSH_DEPTH = 0x02,
+ gcvFLUSH_TEXTURE = 0x04,
+ gcvFLUSH_2D = 0x08,
+ gcvFLUSH_ALL = gcvFLUSH_COLOR
+ | gcvFLUSH_DEPTH
+ | gcvFLUSH_TEXTURE
+ | gcvFLUSH_2D,
+}
+gceKERNEL_FLUSH;
+
+/* Construct a new gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Construct(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPOINTER Context,
+ IN gckDB SharedDB,
+ OUT gckKERNEL * Kernel
+ );
+
+/* Destroy an gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Destroy(
+ IN gckKERNEL Kernel
+ );
+
+/* Dispatch a user-level command. */
+gceSTATUS
+gckKERNEL_Dispatch(
+ IN gckKERNEL Kernel,
+ IN gctBOOL FromUser,
+ IN OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckKERNEL_QueryVideoMemory(
+ IN gckKERNEL Kernel,
+ OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Lookup the gckVIDMEM object for a pool. */
+gceSTATUS
+gckKERNEL_GetVideoMemoryPool(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+#if gcdUSE_VIDMEM_PER_PID
+gceSTATUS
+gckKERNEL_GetVideoMemoryPoolPid(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ IN gctUINT32 Pid,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+gceSTATUS
+gckKERNEL_CreateVideoMemoryPoolPid(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ IN gctUINT32 Pid,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+gceSTATUS
+gckKERNEL_RemoveVideoMemoryPoolPid(
+ IN gckKERNEL Kernel,
+ IN gckVIDMEM VideoMemory
+ );
+#endif
+
+/* Map video memory. */
+gceSTATUS
+gckKERNEL_MapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Address,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes,
+#endif
+ OUT gctPOINTER * Logical
+ );
+
+/* Map video memory. */
+gceSTATUS
+gckKERNEL_MapVideoMemoryEx(
+ IN gckKERNEL Kernel,
+ IN gceCORE Core,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Address,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes,
+#endif
+ OUT gctPOINTER * Logical
+ );
+
+#ifdef __QNXNTO__
+/* Unmap video memory. */
+gceSTATUS
+gckKERNEL_UnmapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes
+ );
+#endif
+
+/* Map memory. */
+gceSTATUS
+gckKERNEL_MapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap memory. */
+gceSTATUS
+gckKERNEL_UnmapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Notification of events. */
+gceSTATUS
+gckKERNEL_Notify(
+ IN gckKERNEL Kernel,
+ IN gceNOTIFY Notifcation,
+ IN gctBOOL Data
+ );
+
+gceSTATUS
+gckKERNEL_QuerySettings(
+ IN gckKERNEL Kernel,
+ OUT gcsKERNEL_SETTINGS * Settings
+ );
+
+/*******************************************************************************
+**
+** gckKERNEL_Recovery
+**
+** Try to recover the GPU from a fatal error.
+**
+** INPUT:
+**
+** gckKERNEL Kernel
+** Pointer to an gckKERNEL object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckKERNEL_Recovery(
+ IN gckKERNEL Kernel
+ );
+
+/* Set the value of timeout on HW operation. */
+void
+gckKERNEL_SetTimeOut(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 timeOut
+ );
+
+/* Get access to the user data. */
+gceSTATUS
+gckKERNEL_OpenUserData(
+ IN gckKERNEL Kernel,
+ IN gctBOOL NeedCopy,
+ IN gctPOINTER StaticStorage,
+ IN gctPOINTER UserPointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Release resources associated with the user data connection. */
+gceSTATUS
+gckKERNEL_CloseUserData(
+ IN gckKERNEL Kernel,
+ IN gctBOOL NeedCopy,
+ IN gctBOOL FlushData,
+ IN gctPOINTER UserPointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/******************************************************************************\
+******************************* gckHARDWARE Object *****************************
+\******************************************************************************/
+
+/* Construct a new gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Construct(
+ IN gckOS Os,
+ IN gceCORE Core,
+ OUT gckHARDWARE * Hardware
+ );
+
+/* Destroy an gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Destroy(
+ IN gckHARDWARE Hardware
+ );
+
+/* Get hardware type. */
+gceSTATUS
+gckHARDWARE_GetType(
+ IN gckHARDWARE Hardware,
+ OUT gceHARDWARE_TYPE * Type
+ );
+
+/* Query system memory requirements. */
+gceSTATUS
+gckHARDWARE_QuerySystemMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * SystemSize,
+ OUT gctUINT32 * SystemBaseAddress
+ );
+
+/* Build virtual address. */
+gceSTATUS
+gckHARDWARE_BuildVirtualAddress(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Index,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Query command buffer requirements. */
+gceSTATUS
+gckHARDWARE_QueryCommandBuffer(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * Alignment,
+ OUT gctSIZE_T * ReservedHead,
+ OUT gctSIZE_T * ReservedTail
+ );
+
+/* Add a WAIT/LINK pair in the command queue. */
+gceSTATUS
+gckHARDWARE_WaitLink(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctUINT32 * WaitOffset,
+ OUT gctSIZE_T * WaitBytes
+ );
+
+/* Kickstart the command processor. */
+gceSTATUS
+gckHARDWARE_Execute(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Physical,
+ IN gctBOOL PhysicalAddresses,
+#endif
+ IN gctSIZE_T Bytes
+ );
+
+/* Add an END command in the command queue. */
+gceSTATUS
+gckHARDWARE_End(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a NOP command in the command queue. */
+gceSTATUS
+gckHARDWARE_Nop(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a WAIT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Wait(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Count,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a PIPESELECT command in the command queue. */
+gceSTATUS
+gckHARDWARE_PipeSelect(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gcePIPE_SELECT Pipe,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a LINK command in the command queue. */
+gceSTATUS
+gckHARDWARE_Link(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctPOINTER FetchAddress,
+ IN gctSIZE_T FetchSize,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add an EVENT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Event(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT8 Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Query the available memory. */
+gceSTATUS
+gckHARDWARE_QueryMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctUINT32 * InternalBaseAddress,
+ OUT gctUINT32 * InternalAlignment,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctUINT32 * ExternalBaseAddress,
+ OUT gctUINT32 * ExternalAlignment,
+ OUT gctUINT32 * HorizontalTileSize,
+ OUT gctUINT32 * VerticalTileSize
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gckHARDWARE_QueryChipIdentity(
+ IN gckHARDWARE Hardware,
+ OUT gcsHAL_QUERY_CHIP_IDENTITY_PTR Identity
+ );
+
+/* Query the shader support. */
+gceSTATUS
+gckHARDWARE_QueryShaderCaps(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT * VertexUniforms,
+ OUT gctUINT * FragmentUniforms,
+ OUT gctUINT * Varyings
+ );
+
+/* Split a harwdare specific address into API stuff. */
+gceSTATUS
+gckHARDWARE_SplitMemory(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Update command queue tail pointer. */
+gceSTATUS
+gckHARDWARE_UpdateQueueTail(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset
+ );
+
+/* Convert logical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertLogical(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+#ifdef __QNXNTO__
+/* Convert physical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertPhysical(
+ IN gckHARDWARE Hardware,
+ IN gctPHYS_ADDR Physical,
+ OUT gctUINT32 * Address
+ );
+#endif
+
+/* Interrupt manager. */
+gceSTATUS
+gckHARDWARE_Interrupt(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL InterruptValid
+ );
+
+/* Program MMU. */
+gceSTATUS
+gckHARDWARE_SetMMU(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical
+ );
+
+/* Flush the MMU. */
+gceSTATUS
+gckHARDWARE_FlushMMU(
+ IN gckHARDWARE Hardware
+ );
+
+/* Set the page table base address. */
+gceSTATUS
+gckHARDWARE_SetMMUv2(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Enable,
+ IN gctPOINTER MtlbAddress,
+ IN gceMMU_MODE Mode,
+ IN gctPOINTER SafeAddress,
+ IN gctBOOL FromPower
+ );
+
+/* Get idle register. */
+gceSTATUS
+gckHARDWARE_GetIdle(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Wait,
+ OUT gctUINT32 * Data
+ );
+
+/* Flush the caches. */
+gceSTATUS
+gckHARDWARE_Flush(
+ IN gckHARDWARE Hardware,
+ IN gceKERNEL_FLUSH Flush,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Enable/disable fast clear. */
+gceSTATUS
+gckHARDWARE_SetFastClear(
+ IN gckHARDWARE Hardware,
+ IN gctINT Enable,
+ IN gctINT Compression
+ );
+
+gceSTATUS
+gckHARDWARE_ReadInterrupt(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR IDs
+ );
+
+/* Power management. */
+gceSTATUS
+gckHARDWARE_SetPowerManagementState(
+ IN gckHARDWARE Hardware,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gckHARDWARE_QueryPowerManagementState(
+ IN gckHARDWARE Hardware,
+ OUT gceCHIPPOWERSTATE* State
+ );
+
+#if gcdPOWEROFF_TIMEOUT
+gceSTATUS
+gckHARDWARE_SetPowerOffTimeout(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Timeout
+);
+
+gceSTATUS
+gckHARDWARE_QueryPowerOffTimeout(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32* Timeout
+);
+#endif
+
+/* Profile 2D Engine. */
+gceSTATUS
+gckHARDWARE_ProfileEngine2D(
+ IN gckHARDWARE Hardware,
+ OUT gcs2D_PROFILE_PTR Profile
+ );
+
+gceSTATUS
+gckHARDWARE_InitializeHardware(
+ IN gckHARDWARE Hardware
+ );
+
+gceSTATUS
+gckHARDWARE_Reset(
+ IN gckHARDWARE Hardware
+ );
+
+typedef gceSTATUS (*gctISRMANAGERFUNC)(gctPOINTER Context);
+
+gceSTATUS
+gckHARDWARE_SetIsrManager(
+ IN gckHARDWARE Hardware,
+ IN gctISRMANAGERFUNC StartIsr,
+ IN gctISRMANAGERFUNC StopIsr,
+ IN gctPOINTER Context
+ );
+
+/* Start a composition. */
+gceSTATUS
+gckHARDWARE_Compose(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 ProcessID,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Offset,
+ IN gctSIZE_T Size,
+ IN gctUINT8 EventID
+ );
+
+/* Check for Hardware features. */
+gceSTATUS
+gckHARDWARE_IsFeatureAvailable(
+ IN gckHARDWARE Hardware,
+ IN gceFEATURE Feature
+ );
+
+#if !gcdENABLE_VG
+/******************************************************************************\
+***************************** gckINTERRUPT Object ******************************
+\******************************************************************************/
+
+typedef struct _gckINTERRUPT * gckINTERRUPT;
+
+typedef gceSTATUS (* gctINTERRUPT_HANDLER)(
+ IN gckKERNEL Kernel
+ );
+
+gceSTATUS
+gckINTERRUPT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckINTERRUPT * Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_Destroy(
+ IN gckINTERRUPT Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_SetHandler(
+ IN gckINTERRUPT Interrupt,
+ IN OUT gctINT32_PTR Id,
+ IN gctINTERRUPT_HANDLER Handler
+ );
+
+gceSTATUS
+gckINTERRUPT_Notify(
+ IN gckINTERRUPT Interrupt,
+ IN gctBOOL Valid
+ );
+#endif
+/******************************************************************************\
+******************************** gckEVENT Object *******************************
+\******************************************************************************/
+
+typedef struct _gckEVENT * gckEVENT;
+
+/* Construct a new gckEVENT object. */
+gceSTATUS
+gckEVENT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckEVENT * Event
+ );
+
+/* Destroy an gckEVENT object. */
+gceSTATUS
+gckEVENT_Destroy(
+ IN gckEVENT Event
+ );
+
+/* Reserve the next available hardware event. */
+gceSTATUS
+gckEVENT_GetEvent(
+ IN gckEVENT Event,
+ IN gctBOOL Wait,
+ OUT gctUINT8 * EventID,
+ IN gceKERNEL_WHERE Source
+ );
+
+/* Add a new event to the list of events. */
+gceSTATUS
+gckEVENT_AddList(
+ IN gckEVENT Event,
+ IN gcsHAL_INTERFACE_PTR Interface,
+ IN gceKERNEL_WHERE FromWhere,
+ IN gctBOOL AllocateAllowed
+ );
+
+/* Schedule a FreeNonPagedMemory event. */
+gceSTATUS
+gckEVENT_FreeNonPagedMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeContiguousMemory event. */
+gceSTATUS
+gckEVENT_FreeContiguousMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeVideoMemory event. */
+gceSTATUS
+gckEVENT_FreeVideoMemory(
+ IN gckEVENT Event,
+ IN gcuVIDMEM_NODE_PTR VideoMemory,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a signal event. */
+gceSTATUS
+gckEVENT_Signal(
+ IN gckEVENT Event,
+ IN gctSIGNAL Signal,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule an Unlock event. */
+gceSTATUS
+gckEVENT_Unlock(
+ IN gckEVENT Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type
+ );
+
+gceSTATUS
+gckEVENT_CommitDone(
+ IN gckEVENT Event,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+gceSTATUS
+gckEVENT_Submit(
+ IN gckEVENT Event,
+ IN gctBOOL Wait,
+ IN gctBOOL FromPower
+ );
+
+/* Commit an event queue. */
+gceSTATUS
+gckEVENT_Commit(
+ IN gckEVENT Event,
+ IN gcsQUEUE_PTR Queue
+ );
+
+/* Schedule a composition event. */
+gceSTATUS
+gckEVENT_Compose(
+ IN gckEVENT Event,
+ IN gcsHAL_COMPOSE_PTR Info
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Notify(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Interrupt(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+gceSTATUS
+gckEVENT_Dump(
+ IN gckEVENT Event
+ );
+/******************************************************************************\
+******************************* gckCOMMAND Object ******************************
+\******************************************************************************/
+
+typedef struct _gckCOMMAND * gckCOMMAND;
+
+/* Construct a new gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckCOMMAND * Command
+ );
+
+/* Destroy an gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Destroy(
+ IN gckCOMMAND Command
+ );
+
+/* Acquire command queue synchronization objects. */
+gceSTATUS
+gckCOMMAND_EnterCommit(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromPower
+ );
+
+/* Release command queue synchronization objects. */
+gceSTATUS
+gckCOMMAND_ExitCommit(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromPower
+ );
+
+/* Start the command queue. */
+gceSTATUS
+gckCOMMAND_Start(
+ IN gckCOMMAND Command
+ );
+
+/* Stop the command queue. */
+gceSTATUS
+gckCOMMAND_Stop(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromRecovery
+ );
+
+/* Commit a buffer to the command queue. */
+gceSTATUS
+gckCOMMAND_Commit(
+ IN gckCOMMAND Command,
+ IN gckCONTEXT Context,
+ IN gcoCMDBUF CommandBuffer,
+ IN gcsSTATE_DELTA_PTR StateDelta,
+ IN gcsQUEUE_PTR EventQueue,
+ IN gctUINT32 ProcessID
+ );
+
+/* Reserve space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Reserve(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequestedBytes,
+ OUT gctPOINTER * Buffer,
+ OUT gctSIZE_T * BufferSize
+ );
+
+/* Execute reserved space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Execute(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequstedBytes
+ );
+
+/* Stall the command queue. */
+gceSTATUS
+gckCOMMAND_Stall(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromPower
+ );
+
+/* Attach user process. */
+gceSTATUS
+gckCOMMAND_Attach(
+ IN gckCOMMAND Command,
+ OUT gckCONTEXT * Context,
+ OUT gctSIZE_T * StateCount,
+ IN gctUINT32 ProcessID
+ );
+
+/* Detach user process. */
+gceSTATUS
+gckCOMMAND_Detach(
+ IN gckCOMMAND Command,
+ IN gckCONTEXT Context
+ );
+
+/******************************************************************************\
+********************************* gckMMU Object ********************************
+\******************************************************************************/
+
+typedef struct _gckMMU * gckMMU;
+
+/* Construct a new gckMMU object. */
+gceSTATUS
+gckMMU_Construct(
+ IN gckKERNEL Kernel,
+ IN gctSIZE_T MmuSize,
+ OUT gckMMU * Mmu
+ );
+
+/* Destroy an gckMMU object. */
+gceSTATUS
+gckMMU_Destroy(
+ IN gckMMU Mmu
+ );
+
+/* Enable the MMU. */
+gceSTATUS
+gckMMU_Enable(
+ IN gckMMU Mmu,
+ IN gctUINT32 PhysBaseAddr,
+ IN gctUINT32 PhysSize
+ );
+
+/* Allocate pages inside the MMU. */
+gceSTATUS
+gckMMU_AllocatePages(
+ IN gckMMU Mmu,
+ IN gctSIZE_T PageCount,
+ OUT gctPOINTER * PageTable,
+ OUT gctUINT32 * Address
+ );
+
+/* Remove a page table from the MMU. */
+gceSTATUS
+gckMMU_FreePages(
+ IN gckMMU Mmu,
+ IN gctPOINTER PageTable,
+ IN gctSIZE_T PageCount
+ );
+
+/* Set the MMU page with info. */
+gceSTATUS
+gckMMU_SetPage(
+ IN gckMMU Mmu,
+ IN gctUINT32 PageAddress,
+ IN gctUINT32 *PageEntry
+ );
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_InsertNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+
+gceSTATUS
+gckMMU_RemoveNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+#endif
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_FreeHandleMemory(
+ IN gckKERNEL Kernel,
+ IN gckMMU Mmu,
+ IN gctUINT32 Pid
+ );
+#endif
+
+gceSTATUS
+gckMMU_Flush(
+ IN gckMMU Mmu
+ );
+
+
+#if VIVANTE_PROFILER
+gceSTATUS
+gckHARDWARE_QueryProfileRegisters(
+ IN gckHARDWARE Hardware,
+ OUT gcsPROFILER_COUNTERS * Counters
+ );
+#endif
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#if gcdENABLE_VG
+#include "gc_hal_vg.h"
+#endif
+
+#endif /* __gc_hal_h_ */
diff --git a/src/include_imx6/gc_hal_base.h b/src/include_imx6/gc_hal_base.h
new file mode 100644
index 0000000..72e23ad
--- /dev/null
+++ b/src/include_imx6/gc_hal_base.h
@@ -0,0 +1,3612 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_base_h_
+#define __gc_hal_base_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#include "gc_hal_dump.h"
+#include "gc_hal_md5.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gckOS * gckOS;
+typedef struct _gcoHAL * gcoHAL;
+typedef struct _gcoOS * gcoOS;
+typedef struct _gco2D * gco2D;
+
+#ifndef VIVANTE_NO_3D
+typedef struct _gco3D * gco3D;
+#endif
+
+typedef struct _gcoSURF * gcoSURF;
+typedef struct _gcsSURF_INFO * gcsSURF_INFO_PTR;
+typedef struct _gcsSURF_NODE * gcsSURF_NODE_PTR;
+typedef struct _gcsSURF_FORMAT_INFO * gcsSURF_FORMAT_INFO_PTR;
+typedef struct _gcsPOINT * gcsPOINT_PTR;
+typedef struct _gcsSIZE * gcsSIZE_PTR;
+typedef struct _gcsRECT * gcsRECT_PTR;
+typedef struct _gcsBOUNDARY * gcsBOUNDARY_PTR;
+typedef struct _gcoDUMP * gcoDUMP;
+typedef struct _gcoHARDWARE * gcoHARDWARE;
+typedef union _gcuVIDMEM_NODE * gcuVIDMEM_NODE_PTR;
+
+#if gcdENABLE_VG
+typedef struct _gcoVG * gcoVG;
+typedef struct _gcsCOMPLETION_SIGNAL * gcsCOMPLETION_SIGNAL_PTR;
+typedef struct _gcsCONTEXT_MAP * gcsCONTEXT_MAP_PTR;
+#else
+typedef void * gcoVG;
+#endif
+
+/******************************************************************************\
+******************************* Process local storage *************************
+\******************************************************************************/
+
+typedef struct _gcsPLS * gcsPLS_PTR;
+typedef struct _gcsPLS
+{
+ /* Global objects. */
+ gcoOS os;
+ gcoHAL hal;
+
+ /* Internal memory pool. */
+ gctSIZE_T internalSize;
+ gctPHYS_ADDR internalPhysical;
+ gctPOINTER internalLogical;
+
+ /* External memory pool. */
+ gctSIZE_T externalSize;
+ gctPHYS_ADDR externalPhysical;
+ gctPOINTER externalLogical;
+
+ /* Contiguous memory pool. */
+ gctSIZE_T contiguousSize;
+ gctPHYS_ADDR contiguousPhysical;
+ gctPOINTER contiguousLogical;
+
+ /* EGL-specific process-wide objects. */
+ gctPOINTER eglDisplayInfo;
+ gctPOINTER eglSurfaceInfo;
+}
+gcsPLS;
+
+extern gcsPLS gcPLS;
+
+/******************************************************************************\
+******************************* Thread local storage *************************
+\******************************************************************************/
+
+typedef struct _gcsTLS * gcsTLS_PTR;
+
+typedef void (* gctTLS_DESTRUCTOR) (
+ gcsTLS_PTR TLS
+ );
+
+typedef struct _gcsTLS
+{
+ gceHARDWARE_TYPE currentType;
+ gcoHARDWARE hardware;
+ /* Only for separated 3D and 2D */
+ gcoHARDWARE hardware2D;
+#if gcdENABLE_VG
+ gcoVGHARDWARE vg;
+ gcoVG engineVG;
+#endif /* gcdENABLE_VG */
+ gctPOINTER context;
+ gctTLS_DESTRUCTOR destructor;
+ gctBOOL ProcessExiting;
+
+#ifndef VIVANTE_NO_3D
+ gco3D engine3D;
+#endif
+ gco2D engine2D;
+}
+gcsTLS;
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+typedef enum _gcePLS_VALUE
+{
+ gcePLS_VALUE_EGL_DISPLAY_INFO,
+ gcePLS_VALUE_EGL_SURFACE_INFO
+}
+gcePLS_VALUE;
+
+/* Video memory pool type. */
+typedef enum _gcePOOL
+{
+ gcvPOOL_UNKNOWN = 0,
+ gcvPOOL_DEFAULT,
+ gcvPOOL_LOCAL,
+ gcvPOOL_LOCAL_INTERNAL,
+ gcvPOOL_LOCAL_EXTERNAL,
+ gcvPOOL_UNIFIED,
+ gcvPOOL_SYSTEM,
+ gcvPOOL_VIRTUAL,
+ gcvPOOL_USER,
+ gcvPOOL_CONTIGUOUS,
+
+ gcvPOOL_NUMBER_OF_POOLS
+}
+gcePOOL;
+
+#ifndef VIVANTE_NO_3D
+/* Blending functions. */
+typedef enum _gceBLEND_FUNCTION
+{
+ gcvBLEND_ZERO,
+ gcvBLEND_ONE,
+ gcvBLEND_SOURCE_COLOR,
+ gcvBLEND_INV_SOURCE_COLOR,
+ gcvBLEND_SOURCE_ALPHA,
+ gcvBLEND_INV_SOURCE_ALPHA,
+ gcvBLEND_TARGET_COLOR,
+ gcvBLEND_INV_TARGET_COLOR,
+ gcvBLEND_TARGET_ALPHA,
+ gcvBLEND_INV_TARGET_ALPHA,
+ gcvBLEND_SOURCE_ALPHA_SATURATE,
+ gcvBLEND_CONST_COLOR,
+ gcvBLEND_INV_CONST_COLOR,
+ gcvBLEND_CONST_ALPHA,
+ gcvBLEND_INV_CONST_ALPHA,
+}
+gceBLEND_FUNCTION;
+
+/* Blending modes. */
+typedef enum _gceBLEND_MODE
+{
+ gcvBLEND_ADD,
+ gcvBLEND_SUBTRACT,
+ gcvBLEND_REVERSE_SUBTRACT,
+ gcvBLEND_MIN,
+ gcvBLEND_MAX,
+}
+gceBLEND_MODE;
+
+/* API flags. */
+typedef enum _gceAPI
+{
+ gcvAPI_D3D = 0x1,
+ gcvAPI_OPENGL = 0x2,
+ gcvAPI_OPENVG = 0x3,
+ gcvAPI_OPENCL = 0x4,
+}
+gceAPI;
+
+/* Depth modes. */
+typedef enum _gceDEPTH_MODE
+{
+ gcvDEPTH_NONE,
+ gcvDEPTH_Z,
+ gcvDEPTH_W,
+}
+gceDEPTH_MODE;
+#endif /* VIVANTE_NO_3D */
+
+typedef enum _gceWHERE
+{
+ gcvWHERE_COMMAND,
+ gcvWHERE_RASTER,
+ gcvWHERE_PIXEL,
+}
+gceWHERE;
+
+typedef enum _gceHOW
+{
+ gcvHOW_SEMAPHORE = 0x1,
+ gcvHOW_STALL = 0x2,
+ gcvHOW_SEMAPHORE_STALL = 0x3,
+}
+gceHOW;
+
+typedef enum _gceSignalHandlerType
+{
+ gcvHANDLE_SIGFPE_WHEN_SIGNAL_CODE_IS_0 = 0x1,
+}
+gceSignalHandlerType;
+
+
+#if gcdENABLE_VG
+/* gcsHAL_Limits*/
+typedef struct _gcsHAL_LIMITS
+{
+ /* chip info */
+ gceCHIPMODEL chipModel;
+ gctUINT32 chipRevision;
+ gctUINT32 featureCount;
+ gctUINT32 *chipFeatures;
+
+ /* target caps */
+ gctUINT32 maxWidth;
+ gctUINT32 maxHeight;
+ gctUINT32 multiTargetCount;
+ gctUINT32 maxSamples;
+
+}gcsHAL_LIMITS;
+#endif
+
+/******************************************************************************\
+*********** Generic Memory Allocation Optimization Using Containers ************
+\******************************************************************************/
+
+/* Generic container definition. */
+typedef struct _gcsCONTAINER_LINK * gcsCONTAINER_LINK_PTR;
+typedef struct _gcsCONTAINER_LINK
+{
+ /* Points to the next container. */
+ gcsCONTAINER_LINK_PTR next;
+}
+gcsCONTAINER_LINK;
+
+typedef struct _gcsCONTAINER_RECORD * gcsCONTAINER_RECORD_PTR;
+typedef struct _gcsCONTAINER_RECORD
+{
+ gcsCONTAINER_RECORD_PTR prev;
+ gcsCONTAINER_RECORD_PTR next;
+}
+gcsCONTAINER_RECORD;
+
+typedef struct _gcsCONTAINER * gcsCONTAINER_PTR;
+typedef struct _gcsCONTAINER
+{
+ gctUINT containerSize;
+ gctUINT recordSize;
+ gctUINT recordCount;
+ gcsCONTAINER_LINK_PTR containers;
+ gcsCONTAINER_RECORD freeList;
+ gcsCONTAINER_RECORD allocList;
+}
+gcsCONTAINER;
+
+gceSTATUS
+gcsCONTAINER_Construct(
+ IN gcsCONTAINER_PTR Container,
+ gctUINT RecordsPerContainer,
+ gctUINT RecordSize
+ );
+
+gceSTATUS
+gcsCONTAINER_Destroy(
+ IN gcsCONTAINER_PTR Container
+ );
+
+gceSTATUS
+gcsCONTAINER_AllocateRecord(
+ IN gcsCONTAINER_PTR Container,
+ OUT gctPOINTER * Record
+ );
+
+gceSTATUS
+gcsCONTAINER_FreeRecord(
+ IN gcsCONTAINER_PTR Container,
+ IN gctPOINTER Record
+ );
+
+gceSTATUS
+gcsCONTAINER_FreeAll(
+ IN gcsCONTAINER_PTR Container
+ );
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Construct a new gcoHAL object. */
+gceSTATUS
+gcoHAL_Construct(
+ IN gctPOINTER Context,
+ IN gcoOS Os,
+ OUT gcoHAL * Hal
+ );
+
+/* Destroy an gcoHAL object. */
+gceSTATUS
+gcoHAL_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Get pointer to gco2D object. */
+gceSTATUS
+gcoHAL_Get2DEngine(
+ IN gcoHAL Hal,
+ OUT gco2D * Engine
+ );
+
+#ifndef VIVANTE_NO_3D
+/* Get pointer to gco3D object. */
+gceSTATUS
+gcoHAL_Get3DEngine(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+gceSTATUS
+gcoHAL_Query3DEngine(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+gceSTATUS
+gcoHAL_Set3DEngine(
+ IN gcoHAL Hal,
+ IN gco3D Engine
+ );
+
+gceSTATUS
+gcoHAL_Get3DHardware(
+ IN gcoHAL Hal,
+ OUT gcoHARDWARE * Hardware
+ );
+
+gceSTATUS
+gcoHAL_Set3DHardware(
+ IN gcoHAL Hal,
+ IN gcoHARDWARE Hardware
+ );
+
+
+#endif /* VIVANTE_NO_3D */
+
+/* Verify whether the specified feature is available in hardware. */
+gceSTATUS
+gcoHAL_IsFeatureAvailable(
+ IN gcoHAL Hal,
+ IN gceFEATURE Feature
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gcoHAL_QueryChipIdentity(
+ IN gcoHAL Hal,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the minor features of the hardware. */
+gceSTATUS gcoHAL_QueryChipMinorFeatures(
+ IN gcoHAL Hal,
+ OUT gctUINT32* NumFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the amount of video memory. */
+gceSTATUS
+gcoHAL_QueryVideoMemory(
+ IN gcoHAL Hal,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Map video memory. */
+gceSTATUS
+gcoHAL_MapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap video memory. */
+gceSTATUS
+gcoHAL_UnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a buffer mapped through its physical address. */
+gceSTATUS
+gcoHAL_ScheduleUnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a user buffer using event mechanism. */
+gceSTATUS
+gcoHAL_ScheduleUnmapUserMemory(
+ IN gcoHAL Hal,
+ IN gctPOINTER Info,
+ IN gctSIZE_T Size,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory
+ );
+
+/* Commit the current command buffer. */
+gceSTATUS
+gcoHAL_Commit(
+ IN gcoHAL Hal,
+ IN gctBOOL Stall
+ );
+
+/* Query the tile capabilities. */
+gceSTATUS
+gcoHAL_QueryTiled(
+ IN gcoHAL Hal,
+ OUT gctINT32 * TileWidth2D,
+ OUT gctINT32 * TileHeight2D,
+ OUT gctINT32 * TileWidth3D,
+ OUT gctINT32 * TileHeight3D
+ );
+
+gceSTATUS
+gcoHAL_Compact(
+ IN gcoHAL Hal
+ );
+
+#if VIVANTE_PROFILER /*gcdENABLE_PROFILING*/
+gceSTATUS
+gcoHAL_ProfileStart(
+ IN gcoHAL Hal
+ );
+
+gceSTATUS
+gcoHAL_ProfileEnd(
+ IN gcoHAL Hal,
+ IN gctCONST_STRING Title
+ );
+#endif
+
+/* Power Management */
+gceSTATUS
+gcoHAL_SetPowerManagementState(
+ IN gcoHAL Hal,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gcoHAL_QueryPowerManagementState(
+ IN gcoHAL Hal,
+ OUT gceCHIPPOWERSTATE *State
+ );
+
+/* Set the filter type for filter blit. */
+gceSTATUS
+gcoHAL_SetFilterType(
+ IN gcoHAL Hal,
+ IN gceFILTER_TYPE FilterType
+ );
+
+gceSTATUS
+gcoHAL_GetDump(
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Call the kernel HAL layer. */
+gceSTATUS
+gcoHAL_Call(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Schedule an event. */
+gceSTATUS
+gcoHAL_ScheduleEvent(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Destroy a surface. */
+gceSTATUS
+gcoHAL_DestroySurface(
+ IN gcoHAL Hal,
+ IN gcoSURF Surface
+ );
+
+/* Request a start/stop timestamp. */
+gceSTATUS
+gcoHAL_SetTimer(
+ IN gcoHAL Hal,
+ IN gctUINT32 Index,
+ IN gctBOOL Start
+ );
+
+/* Get Time delta from a Timer in microseconds. */
+gceSTATUS
+gcoHAL_GetTimerTime(
+ IN gcoHAL Hal,
+ IN gctUINT32 Timer,
+ OUT gctINT32_PTR TimeDelta
+ );
+
+/* set timeout value. */
+gceSTATUS
+gcoHAL_SetTimeOut(
+ IN gcoHAL Hal,
+ IN gctUINT32 timeOut
+ );
+
+gceSTATUS
+gcoHAL_SetHardwareType(
+ IN gcoHAL Hal,
+ IN gceHARDWARE_TYPE HardwardType
+ );
+
+gceSTATUS
+gcoHAL_GetHardwareType(
+ IN gcoHAL Hal,
+ OUT gceHARDWARE_TYPE * HardwardType
+ );
+
+gceSTATUS
+gcoHAL_QueryChipCount(
+ IN gcoHAL Hal,
+ OUT gctINT32 * Count
+ );
+
+gceSTATUS
+gcoHAL_QuerySeparated3D2D(
+ IN gcoHAL Hal
+ );
+
+/* Get pointer to gcoVG object. */
+gceSTATUS
+gcoHAL_GetVGEngine(
+ IN gcoHAL Hal,
+ OUT gcoVG * Engine
+ );
+
+#if gcdENABLE_VG
+gceSTATUS
+gcoHAL_QueryChipLimits(
+ IN gcoHAL Hal,
+ IN gctINT32 Chip,
+ OUT gcsHAL_LIMITS *Limits);
+
+gceSTATUS
+gcoHAL_QueryChipFeature(
+ IN gcoHAL Hal,
+ IN gctINT32 Chip,
+ IN gceFEATURE Feature);
+
+#endif
+/******************************************************************************\
+********************************** gcoOS Object *********************************
+\******************************************************************************/
+
+/* Get PLS value for given key */
+gctPOINTER
+gcoOS_GetPLSValue(
+ IN gcePLS_VALUE key
+ );
+
+/* Set PLS value of a given key */
+void
+gcoOS_SetPLSValue(
+ IN gcePLS_VALUE key,
+ OUT gctPOINTER value
+ );
+
+/* Get access to the thread local storage. */
+gceSTATUS
+gcoOS_GetTLS(
+ OUT gcsTLS_PTR * TLS
+ );
+
+/* Destroy the objects associated with the current thread. */
+void
+gcoOS_FreeThreadData(
+ IN gctBOOL ProcessExiting
+ );
+
+/* Construct a new gcoOS object. */
+gceSTATUS
+gcoOS_Construct(
+ IN gctPOINTER Context,
+ OUT gcoOS * Os
+ );
+
+/* Destroy an gcoOS object. */
+gceSTATUS
+gcoOS_Destroy(
+ IN gcoOS Os
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gcoOS_GetBaseAddress(
+ IN gcoOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gcoOS_Allocate(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Get allocated memory size. */
+gceSTATUS
+gcoOS_GetMemorySize(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ OUT gctSIZE_T_PTR MemorySize
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gcoOS_Free(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoOS_AllocateMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoOS_FreeMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gcoOS_AllocateContiguous(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gcoOS_FreeContiguous(
+ IN gcoOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+#if gcdENABLE_BANK_ALIGNMENT
+gceSTATUS
+gcoSURF_GetBankOffsetBytes(
+ IN gcoSURF Surfce,
+ IN gceSURF_TYPE Type,
+ IN gctUINT32 Stride,
+ IN gctUINT32_PTR Bytes
+ );
+#endif
+
+/* Map user memory. */
+gceSTATUS
+gcoOS_MapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gcoOS_UnmapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+/* Device I/O Control call to the kernel HAL layer. */
+gceSTATUS
+gcoOS_DeviceControl(
+ IN gcoOS Os,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ IN gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/* Allocate non paged memory. */
+gceSTATUS
+gcoOS_AllocateNonPagedMemory(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non paged memory. */
+gceSTATUS
+gcoOS_FreeNonPagedMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+#define gcmOS_SAFE_FREE(os, mem) \
+ gcoOS_Free(os, mem); \
+ mem = gcvNULL
+
+#define gcmkOS_SAFE_FREE(os, mem) \
+ gckOS_Free(os, mem); \
+ mem = gcvNULL
+
+typedef enum _gceFILE_MODE
+{
+ gcvFILE_CREATE = 0,
+ gcvFILE_APPEND,
+ gcvFILE_READ,
+ gcvFILE_CREATETEXT,
+ gcvFILE_APPENDTEXT,
+ gcvFILE_READTEXT,
+}
+gceFILE_MODE;
+
+/* Open a file. */
+gceSTATUS
+gcoOS_Open(
+ IN gcoOS Os,
+ IN gctCONST_STRING FileName,
+ IN gceFILE_MODE Mode,
+ OUT gctFILE * File
+ );
+
+/* Close a file. */
+gceSTATUS
+gcoOS_Close(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Read data from a file. */
+gceSTATUS
+gcoOS_Read(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctPOINTER Data,
+ OUT gctSIZE_T * ByteRead
+ );
+
+/* Write data to a file. */
+gceSTATUS
+gcoOS_Write(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Flush data to a file. */
+gceSTATUS
+gcoOS_Flush(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Create an endpoint for communication. */
+gceSTATUS
+gcoOS_Socket(
+ IN gcoOS Os,
+ IN gctINT Domain,
+ IN gctINT Type,
+ IN gctINT Protocol,
+ OUT gctINT *SockFd
+ );
+
+/* Close a socket. */
+gceSTATUS
+gcoOS_CloseSocket(
+ IN gcoOS Os,
+ IN gctINT SockFd
+ );
+
+/* Initiate a connection on a socket. */
+gceSTATUS
+gcoOS_Connect(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctCONST_POINTER HostName,
+ IN gctUINT Port);
+
+/* Shut down part of connection on a socket. */
+gceSTATUS
+gcoOS_Shutdown(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctINT How
+ );
+
+/* Send a message on a socket. */
+gceSTATUS
+gcoOS_Send(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data,
+ IN gctINT Flags
+ );
+
+/* Initiate a connection on a socket. */
+gceSTATUS
+gcoOS_WaitForSend(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctINT Seconds,
+ IN gctINT MicroSeconds);
+
+/* Get environment variable value. */
+gceSTATUS
+gcoOS_GetEnv(
+ IN gcoOS Os,
+ IN gctCONST_STRING VarName,
+ OUT gctSTRING * Value
+ );
+
+/* Get current working directory. */
+gceSTATUS
+gcoOS_GetCwd(
+ IN gcoOS Os,
+ IN gctINT SizeInBytes,
+ OUT gctSTRING Buffer
+ );
+
+/* Get file status info. */
+gceSTATUS
+gcoOS_Stat(
+ IN gcoOS Os,
+ IN gctCONST_STRING FileName,
+ OUT gctPOINTER Buffer
+ );
+
+typedef enum _gceFILE_WHENCE
+{
+ gcvFILE_SEEK_SET,
+ gcvFILE_SEEK_CUR,
+ gcvFILE_SEEK_END
+}
+gceFILE_WHENCE;
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_Seek(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Offset,
+ IN gceFILE_WHENCE Whence
+ );
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_SetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Position
+ );
+
+/* Get the current position of a file. */
+gceSTATUS
+gcoOS_GetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ OUT gctUINT32 * Position
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gcoOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Perform a memory fill. */
+gceSTATUS
+gcoOS_MemFill(
+ IN gctPOINTER Destination,
+ IN gctUINT8 Filler,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gcoOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Same as strstr. */
+gceSTATUS
+gcoOS_StrStr(
+ IN gctCONST_STRING String,
+ IN gctCONST_STRING SubString,
+ OUT gctSTRING * Output
+ );
+
+/* Find the last occurance of a character inside a string. */
+gceSTATUS
+gcoOS_StrFindReverse(
+ IN gctCONST_STRING String,
+ IN gctINT8 Character,
+ OUT gctSTRING * Output
+ );
+
+gceSTATUS
+gcoOS_StrLen(
+ IN gctCONST_STRING String,
+ OUT gctSIZE_T * Length
+ );
+
+gceSTATUS
+gcoOS_StrDup(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ OUT gctSTRING * Target
+ );
+
+/* Copy a string. */
+gceSTATUS
+gcoOS_StrCopySafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Append a string. */
+gceSTATUS
+gcoOS_StrCatSafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Compare two strings. */
+gceSTATUS
+gcoOS_StrCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2
+ );
+
+/* Compare characters of two strings. */
+gceSTATUS
+gcoOS_StrNCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2,
+ IN gctSIZE_T Count
+ );
+
+/* Convert string to float. */
+gceSTATUS
+gcoOS_StrToFloat(
+ IN gctCONST_STRING String,
+ OUT gctFLOAT * Float
+ );
+
+/* Convert hex string to integer. */
+gceSTATUS gcoOS_HexStrToInt(
+ IN gctCONST_STRING String,
+ OUT gctINT * Int
+ );
+
+/* Convert hex string to float. */
+gceSTATUS gcoOS_HexStrToFloat(
+ IN gctCONST_STRING String,
+ OUT gctFLOAT * Float
+ );
+
+/* Convert string to integer. */
+gceSTATUS
+gcoOS_StrToInt(
+ IN gctCONST_STRING String,
+ OUT gctINT * Int
+ );
+
+gceSTATUS
+gcoOS_MemCmp(
+ IN gctCONST_POINTER Memory1,
+ IN gctCONST_POINTER Memory2,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_PrintStrSafe(
+ OUT gctSTRING String,
+ IN gctSIZE_T StringSize,
+ IN OUT gctUINT * Offset,
+ IN gctCONST_STRING Format,
+ ...
+ );
+
+gceSTATUS
+gcoOS_LoadLibrary(
+ IN gcoOS Os,
+ IN gctCONST_STRING Library,
+ OUT gctHANDLE * Handle
+ );
+
+gceSTATUS
+gcoOS_FreeLibrary(
+ IN gcoOS Os,
+ IN gctHANDLE Handle
+ );
+
+gceSTATUS
+gcoOS_GetProcAddress(
+ IN gcoOS Os,
+ IN gctHANDLE Handle,
+ IN gctCONST_STRING Name,
+ OUT gctPOINTER * Function
+ );
+
+gceSTATUS
+gcoOS_Compact(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_AddSignalHandler (
+ IN gceSignalHandlerType SignalHandlerType
+ );
+
+#if VIVANTE_PROFILER /*gcdENABLE_PROFILING*/
+gceSTATUS
+gcoOS_ProfileStart(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_ProfileEnd(
+ IN gcoOS Os,
+ IN gctCONST_STRING Title
+ );
+
+gceSTATUS
+gcoOS_SetProfileSetting(
+ IN gcoOS Os,
+ IN gctBOOL Enable,
+ IN gctCONST_STRING FileName
+ );
+#endif
+
+/* Query the video memory. */
+gceSTATUS
+gcoOS_QueryVideoMemory(
+ IN gcoOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Detect if the process is the executable specified. */
+gceSTATUS
+gcoOS_DetectProcessByName(
+ IN gctCONST_STRING Name
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Atoms ----------------------------------------------------------------*/
+
+typedef struct gcsATOM * gcsATOM_PTR;
+
+/* Construct an atom. */
+gceSTATUS
+gcoOS_AtomConstruct(
+ IN gcoOS Os,
+ OUT gcsATOM_PTR * Atom
+ );
+
+/* Destroy an atom. */
+gceSTATUS
+gcoOS_AtomDestroy(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom
+ );
+
+/* Increment an atom. */
+gceSTATUS
+gcoOS_AtomIncrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+/* Decrement an atom. */
+gceSTATUS
+gcoOS_AtomDecrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+gctHANDLE
+gcoOS_GetCurrentProcessID(
+ void
+ );
+
+gctHANDLE
+gcoOS_GetCurrentThreadID(
+ void
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Time -----------------------------------------------------------------*/
+
+/* Get the number of milliseconds since the system started. */
+gctUINT32
+gcoOS_GetTicks(
+ void
+ );
+
+/* Get time in microseconds. */
+gceSTATUS
+gcoOS_GetTime(
+ gctUINT64_PTR Time
+ );
+
+/* Get CPU usage in microseconds. */
+gceSTATUS
+gcoOS_GetCPUTime(
+ gctUINT64_PTR CPUTime
+ );
+
+/* Get memory usage. */
+gceSTATUS
+gcoOS_GetMemoryUsage(
+ gctUINT32_PTR MaxRSS,
+ gctUINT32_PTR IxRSS,
+ gctUINT32_PTR IdRSS,
+ gctUINT32_PTR IsRSS
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gcoOS_Delay(
+ IN gcoOS Os,
+ IN gctUINT32 Delay
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Threads --------------------------------------------------------------*/
+
+#ifdef _WIN32
+/* Cannot include windows.h here becuase "near" and "far"
+ * which are used in gcsDEPTH_INFO, are defined to nothing in WinDef.h.
+ * So, use the real value of DWORD and WINAPI, instead.
+ * DWORD is unsigned long, and WINAPI is __stdcall.
+ * If these two are change in WinDef.h, the following two typdefs
+ * need to be changed, too.
+ */
+typedef unsigned long gctTHREAD_RETURN;
+typedef unsigned long (__stdcall * gcTHREAD_ROUTINE)(void * Argument);
+#else
+typedef void * gctTHREAD_RETURN;
+typedef void * (* gcTHREAD_ROUTINE)(void *);
+#endif
+
+/* Create a new thread. */
+gceSTATUS
+gcoOS_CreateThread(
+ IN gcoOS Os,
+ IN gcTHREAD_ROUTINE Worker,
+ IN gctPOINTER Argument,
+ OUT gctPOINTER * Thread
+ );
+
+/* Close a thread. */
+gceSTATUS
+gcoOS_CloseThread(
+ IN gcoOS Os,
+ IN gctPOINTER Thread
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Mutexes --------------------------------------------------------------*/
+
+/* Create a new mutex. */
+gceSTATUS
+gcoOS_CreateMutex(
+ IN gcoOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gcoOS_DeleteMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gcoOS_AcquireMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gcoOS_ReleaseMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Signals --------------------------------------------------------------*/
+
+/* Create a signal. */
+gceSTATUS
+gcoOS_CreateSignal(
+ IN gcoOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gcoOS_DestroySignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gcoOS_Signal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gcoOS_WaitSignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Map a signal from another process */
+gceSTATUS
+gcoOS_MapSignal(
+ IN gctSIGNAL RemoteSignal,
+ OUT gctSIGNAL * LocalSignal
+ );
+
+/* Unmap a signal mapped from another process */
+gceSTATUS
+gcoOS_UnmapSignal(
+ IN gctSIGNAL Signal
+ );
+
+/* Write a register. */
+gceSTATUS
+gcoOS_WriteRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Read a register. */
+gceSTATUS
+gcoOS_ReadRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+gceSTATUS
+gcoOS_CacheClean(
+ IN gcoOS Os,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_CacheFlush(
+ IN gcoOS Os,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_CacheInvalidate(
+ IN gcoOS Os,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_MemoryBarrier(
+ IN gcoOS Os,
+ IN gctPOINTER Logical
+ );
+
+
+/*----------------------------------------------------------------------------*/
+/*----- Profile --------------------------------------------------------------*/
+
+gceSTATUS
+gckOS_GetProfileTick(
+ OUT gctUINT64_PTR Tick
+ );
+
+gceSTATUS
+gckOS_QueryProfileTickRate(
+ OUT gctUINT64_PTR TickRate
+ );
+
+gctUINT32
+gckOS_ProfileToMS(
+ IN gctUINT64 Ticks
+ );
+
+gceSTATUS
+gcoOS_GetProfileTick(
+ OUT gctUINT64_PTR Tick
+ );
+
+gceSTATUS
+gcoOS_QueryProfileTickRate(
+ OUT gctUINT64_PTR TickRate
+ );
+
+#define _gcmPROFILE_INIT(prefix, freq, start) \
+ do { \
+ prefix ## OS_QueryProfileTickRate(&(freq)); \
+ prefix ## OS_GetProfileTick(&(start)); \
+ } while (gcvFALSE)
+
+#define _gcmPROFILE_QUERY(prefix, start, ticks) \
+ do { \
+ prefix ## OS_GetProfileTick(&(ticks)); \
+ (ticks) = ((ticks) > (start)) ? ((ticks) - (start)) \
+ : (~0ull - (start) + (ticks) + 1); \
+ } while (gcvFALSE)
+
+#if gcdENABLE_PROFILING
+# define gcmkPROFILE_INIT(freq, start) _gcmPROFILE_INIT(gck, freq, start)
+# define gcmkPROFILE_QUERY(start, ticks) _gcmPROFILE_QUERY(gck, start, ticks)
+# define gcmPROFILE_INIT(freq, start) _gcmPROFILE_INIT(gco, freq, start)
+# define gcmPROFILE_QUERY(start, ticks) _gcmPROFILE_QUERY(gco, start, ticks)
+# define gcmPROFILE_ONLY(x) x
+# define gcmPROFILE_ELSE(x) do { } while (gcvFALSE)
+# define gcmPROFILE_DECLARE_ONLY(x) x
+# define gcmPROFILE_DECLARE_ELSE(x) typedef x
+#else
+# define gcmkPROFILE_INIT(start, freq) do { } while (gcvFALSE)
+# define gcmkPROFILE_QUERY(start, ticks) do { } while (gcvFALSE)
+# define gcmPROFILE_INIT(start, freq) do { } while (gcvFALSE)
+# define gcmPROFILE_QUERY(start, ticks) do { } while (gcvFALSE)
+# define gcmPROFILE_ONLY(x) do { } while (gcvFALSE)
+# define gcmPROFILE_ELSE(x) x
+# define gcmPROFILE_DECLARE_ONLY(x) typedef x
+# define gcmPROFILE_DECLARE_ELSE(x) x
+#endif
+
+/*******************************************************************************
+** gcoMATH object
+*/
+
+#define gcdPI 3.14159265358979323846f
+
+/* Kernel. */
+gctINT
+gckMATH_ModuloInt(
+ IN gctINT X,
+ IN gctINT Y
+ );
+
+/* User. */
+gctUINT32
+gcoMATH_Log2in5dot5(
+ IN gctINT X
+ );
+
+
+gctFLOAT
+gcoMATH_UIntAsFloat(
+ IN gctUINT32 X
+ );
+
+gctUINT32
+gcoMATH_FloatAsUInt(
+ IN gctFLOAT X
+ );
+
+gctBOOL
+gcoMATH_CompareEqualF(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+gctUINT16
+gcoMATH_UInt8AsFloat16(
+ IN gctUINT8 X
+ );
+
+/******************************************************************************\
+**************************** Coordinate Structures *****************************
+\******************************************************************************/
+
+typedef struct _gcsPOINT
+{
+ gctINT32 x;
+ gctINT32 y;
+}
+gcsPOINT;
+
+typedef struct _gcsSIZE
+{
+ gctINT32 width;
+ gctINT32 height;
+}
+gcsSIZE;
+
+typedef struct _gcsRECT
+{
+ gctINT32 left;
+ gctINT32 top;
+ gctINT32 right;
+ gctINT32 bottom;
+}
+gcsRECT;
+
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*------------------------------- gcoSURF Common ------------------------------*/
+
+/* Color format classes. */
+typedef enum _gceFORMAT_CLASS
+{
+ gcvFORMAT_CLASS_RGBA = 4500,
+ gcvFORMAT_CLASS_YUV,
+ gcvFORMAT_CLASS_INDEX,
+ gcvFORMAT_CLASS_LUMINANCE,
+ gcvFORMAT_CLASS_BUMP,
+ gcvFORMAT_CLASS_DEPTH,
+}
+gceFORMAT_CLASS;
+
+/* Special enums for width field in gcsFORMAT_COMPONENT. */
+typedef enum _gceCOMPONENT_CONTROL
+{
+ gcvCOMPONENT_NOTPRESENT = 0x00,
+ gcvCOMPONENT_DONTCARE = 0x80,
+ gcvCOMPONENT_WIDTHMASK = 0x7F,
+ gcvCOMPONENT_ODD = 0x80
+}
+gceCOMPONENT_CONTROL;
+
+/* Color format component parameters. */
+typedef struct _gcsFORMAT_COMPONENT
+{
+ gctUINT8 start;
+ gctUINT8 width;
+}
+gcsFORMAT_COMPONENT;
+
+/* RGBA color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_RGBA
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT red;
+ gcsFORMAT_COMPONENT green;
+ gcsFORMAT_COMPONENT blue;
+}
+gcsFORMAT_CLASS_TYPE_RGBA;
+
+/* YUV color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_YUV
+{
+ gcsFORMAT_COMPONENT y;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT v;
+}
+gcsFORMAT_CLASS_TYPE_YUV;
+
+/* Index color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_INDEX
+{
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_INDEX;
+
+/* Luminance color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_LUMINANCE
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_LUMINANCE;
+
+/* Bump map color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_BUMP
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT l;
+ gcsFORMAT_COMPONENT v;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT q;
+ gcsFORMAT_COMPONENT w;
+}
+gcsFORMAT_CLASS_TYPE_BUMP;
+
+/* Depth and stencil format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_DEPTH
+{
+ gcsFORMAT_COMPONENT depth;
+ gcsFORMAT_COMPONENT stencil;
+}
+gcsFORMAT_CLASS_TYPE_DEPTH;
+
+/* Format parameters. */
+typedef struct _gcsSURF_FORMAT_INFO
+{
+ /* Format code and class. */
+ gceSURF_FORMAT format;
+ gceFORMAT_CLASS fmtClass;
+
+ /* The size of one pixel in bits. */
+ gctUINT8 bitsPerPixel;
+
+ /* Component swizzle. */
+ gceSURF_SWIZZLE swizzle;
+
+ /* Some formats have two neighbour pixels interleaved together. */
+ /* To describe such format, set the flag to 1 and add another */
+ /* like this one describing the odd pixel format. */
+ gctUINT8 interleaved;
+
+ /* Format components. */
+ union
+ {
+ gcsFORMAT_CLASS_TYPE_BUMP bump;
+ gcsFORMAT_CLASS_TYPE_RGBA rgba;
+ gcsFORMAT_CLASS_TYPE_YUV yuv;
+ gcsFORMAT_CLASS_TYPE_LUMINANCE lum;
+ gcsFORMAT_CLASS_TYPE_INDEX index;
+ gcsFORMAT_CLASS_TYPE_DEPTH depth;
+ } u;
+}
+gcsSURF_FORMAT_INFO;
+
+/* Frame buffer information. */
+typedef struct _gcsSURF_FRAMEBUFFER
+{
+ gctPOINTER logical;
+ gctUINT width, height;
+ gctINT stride;
+ gceSURF_FORMAT format;
+}
+gcsSURF_FRAMEBUFFER;
+
+typedef struct _gcsVIDMEM_NODE_SHARED_INFO
+{
+ gctBOOL tileStatusDisabled;
+ gcsPOINT SrcOrigin;
+ gcsPOINT DestOrigin;
+ gcsSIZE RectSize;
+ gctUINT32 clearValue;
+}
+gcsVIDMEM_NODE_SHARED_INFO;
+
+/* Generic pixel component descriptors. */
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XXX8;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XX8X;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_X8XX;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_8XXX;
+
+typedef enum _gceORIENTATION
+{
+ gcvORIENTATION_TOP_BOTTOM,
+ gcvORIENTATION_BOTTOM_TOP,
+}
+gceORIENTATION;
+
+
+/* Construct a new gcoSURF object. */
+gceSTATUS
+gcoSURF_Construct(
+ IN gcoHAL Hal,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+/* Destroy an gcoSURF object. */
+gceSTATUS
+gcoSURF_Destroy(
+ IN gcoSURF Surface
+ );
+
+/* Map user-allocated surface. */
+gceSTATUS
+gcoSURF_MapUserSurface(
+ IN gcoSURF Surface,
+ IN gctUINT Alignment,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Query vid mem node info. */
+gceSTATUS
+gcoSURF_QueryVidMemNode(
+ IN gcoSURF Surface,
+ OUT gcuVIDMEM_NODE_PTR * Node,
+ OUT gcePOOL * Pool,
+ OUT gctUINT_PTR Bytes
+ );
+
+/* Set usage attribute of a surface. */
+gceSTATUS
+gcoSURF_SetUsage(
+ IN gcoSURF Surface,
+ IN gceSURF_USAGE Usage
+ );
+
+/* Return usage attribute of a surface. */
+gceSTATUS
+gcoSURF_QueryUsage(
+ IN gcoSURF Surface,
+ OUT gceSURF_USAGE *Usage
+ );
+
+/* Set the color type of the surface. */
+gceSTATUS
+gcoSURF_SetColorType(
+ IN gcoSURF Surface,
+ IN gceSURF_COLOR_TYPE ColorType
+ );
+
+/* Get the color type of the surface. */
+gceSTATUS
+gcoSURF_GetColorType(
+ IN gcoSURF Surface,
+ OUT gceSURF_COLOR_TYPE *ColorType
+ );
+
+/* Set the surface ration angle. */
+gceSTATUS
+gcoSURF_SetRotation(
+ IN gcoSURF Surface,
+ IN gceSURF_ROTATION Rotation
+ );
+
+gceSTATUS
+gcoSURF_IsValid(
+ IN gcoSURF Surface
+ );
+
+#ifndef VIVANTE_NO_3D
+/* Verify and return the state of the tile status mechanism. */
+gceSTATUS
+gcoSURF_IsTileStatusSupported(
+ IN gcoSURF Surface
+ );
+
+/* Process tile status for the specified surface. */
+gceSTATUS
+gcoSURF_SetTileStatus(
+ IN gcoSURF Surface
+ );
+
+/* Enable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_EnableTileStatus(
+ IN gcoSURF Surface
+ );
+
+/* Disable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_DisableTileStatus(
+ IN gcoSURF Surface,
+ IN gctBOOL Decompress
+ );
+#endif /* VIVANTE_NO_3D */
+
+/* Get surface size. */
+gceSTATUS
+gcoSURF_GetSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctUINT * Depth
+ );
+
+/* Get surface aligned sizes. */
+gceSTATUS
+gcoSURF_GetAlignedSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctINT * Stride
+ );
+
+/* Get alignments. */
+gceSTATUS
+gcoSURF_GetAlignment(
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ OUT gctUINT * AddressAlignment,
+ OUT gctUINT * XAlignment,
+ OUT gctUINT * YAlignment
+ );
+
+/* Get surface type and format. */
+gceSTATUS
+gcoSURF_GetFormat(
+ IN gcoSURF Surface,
+ OUT gceSURF_TYPE * Type,
+ OUT gceSURF_FORMAT * Format
+ );
+
+/* Get surface tiling. */
+gceSTATUS
+gcoSURF_GetTiling(
+ IN gcoSURF Surface,
+ OUT gceTILING * Tiling
+ );
+
+/* Lock the surface. */
+gceSTATUS
+gcoSURF_Lock(
+ IN gcoSURF Surface,
+ IN OUT gctUINT32 * Address,
+ IN OUT gctPOINTER * Memory
+ );
+
+/* Unlock the surface. */
+gceSTATUS
+gcoSURF_Unlock(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory
+ );
+
+/* Return pixel format parameters. */
+gceSTATUS
+gcoSURF_QueryFormat(
+ IN gceSURF_FORMAT Format,
+ OUT gcsSURF_FORMAT_INFO_PTR * Info
+ );
+
+/* Compute the color pixel mask. */
+gceSTATUS
+gcoSURF_ComputeColorMask(
+ IN gcsSURF_FORMAT_INFO_PTR Format,
+ OUT gctUINT32_PTR ColorMask
+ );
+
+/* Flush the surface. */
+gceSTATUS
+gcoSURF_Flush(
+ IN gcoSURF Surface
+ );
+
+/* Fill surface from it's tile status buffer. */
+gceSTATUS
+gcoSURF_FillFromTile(
+ IN gcoSURF Surface
+ );
+
+/* Fill surface with a value. */
+gceSTATUS
+gcoSURF_Fill(
+ IN gcoSURF Surface,
+ IN gcsPOINT_PTR Origin,
+ IN gcsSIZE_PTR Size,
+ IN gctUINT32 Value,
+ IN gctUINT32 Mask
+ );
+
+/* Alpha blend two surfaces together. */
+gceSTATUS
+gcoSURF_Blend(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrig,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsSIZE_PTR Size,
+ IN gceSURF_BLEND_MODE Mode
+ );
+
+/* Create a new gcoSURF wrapper object. */
+gceSTATUS
+gcoSURF_ConstructWrapper(
+ IN gcoHAL Hal,
+ OUT gcoSURF * Surface
+ );
+
+/* Set the underlying buffer for the surface wrapper. */
+gceSTATUS
+gcoSURF_SetBuffer(
+ IN gcoSURF Surface,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Stride,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Set the size of the surface in pixels and map the underlying buffer. */
+gceSTATUS
+gcoSURF_SetWindow(
+ IN gcoSURF Surface,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height
+ );
+
+/* Increase reference count of the surface. */
+gceSTATUS
+gcoSURF_ReferenceSurface(
+ IN gcoSURF Surface
+ );
+
+/* Get surface reference count. */
+gceSTATUS
+gcoSURF_QueryReferenceCount(
+ IN gcoSURF Surface,
+ OUT gctINT32 * ReferenceCount
+ );
+
+/* Set surface orientation. */
+gceSTATUS
+gcoSURF_SetOrientation(
+ IN gcoSURF Surface,
+ IN gceORIENTATION Orientation
+ );
+
+/* Query surface orientation. */
+gceSTATUS
+gcoSURF_QueryOrientation(
+ IN gcoSURF Surface,
+ OUT gceORIENTATION * Orientation
+ );
+
+gceSTATUS
+gcoSURF_SetOffset(
+ IN gcoSURF Surface,
+ IN gctUINT Offset
+ );
+
+gceSTATUS
+gcoSURF_NODE_Cache(
+ IN gcsSURF_NODE_PTR Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes,
+ IN gceCACHEOPERATION Operation
+ );
+
+/* Perform CPU cache operation on surface */
+gceSTATUS
+gcoSURF_CPUCacheOperation(
+ IN gcoSURF Surface,
+ IN gceCACHEOPERATION Operation
+ );
+
+
+gceSTATUS
+gcoSURF_SetLinearResolveAddress(
+ IN gcoSURF Surface,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory
+ );
+/******************************************************************************\
+********************************* gcoDUMP Object ********************************
+\******************************************************************************/
+
+/* Construct a new gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Construct(
+ IN gcoOS Os,
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Destroy a gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Destroy(
+ IN gcoDUMP Dump
+ );
+
+/* Enable/disable dumping. */
+gceSTATUS
+gcoDUMP_Control(
+ IN gcoDUMP Dump,
+ IN gctSTRING FileName
+ );
+
+gceSTATUS
+gcoDUMP_IsEnabled(
+ IN gcoDUMP Dump,
+ OUT gctBOOL * Enabled
+ );
+
+/* Add surface. */
+gceSTATUS
+gcoDUMP_AddSurface(
+ IN gcoDUMP Dump,
+ IN gctINT32 Width,
+ IN gctINT32 Height,
+ IN gceSURF_FORMAT PixelFormat,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount
+ );
+
+/* Mark the beginning of a frame. */
+gceSTATUS
+gcoDUMP_FrameBegin(
+ IN gcoDUMP Dump
+ );
+
+/* Mark the end of a frame. */
+gceSTATUS
+gcoDUMP_FrameEnd(
+ IN gcoDUMP Dump
+ );
+
+/* Dump data. */
+gceSTATUS
+gcoDUMP_DumpData(
+ IN gcoDUMP Dump,
+ IN gceDUMP_TAG Type,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Delete an address. */
+gceSTATUS
+gcoDUMP_Delete(
+ IN gcoDUMP Dump,
+ IN gctUINT32 Address
+ );
+
+
+/******************************************************************************\
+******************************* gcsRECT Structure ******************************
+\******************************************************************************/
+
+/* Initialize rectangle structure. */
+gceSTATUS
+gcsRECT_Set(
+ OUT gcsRECT_PTR Rect,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Return the width of the rectangle. */
+gceSTATUS
+gcsRECT_Width(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Width
+ );
+
+/* Return the height of the rectangle. */
+gceSTATUS
+gcsRECT_Height(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Height
+ );
+
+/* Ensure that top left corner is to the left and above the right bottom. */
+gceSTATUS
+gcsRECT_Normalize(
+ IN OUT gcsRECT_PTR Rect
+ );
+
+/* Compare two rectangles. */
+gceSTATUS
+gcsRECT_IsEqual(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * Equal
+ );
+
+/* Compare the sizes of two rectangles. */
+gceSTATUS
+gcsRECT_IsOfEqualSize(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * EqualSize
+ );
+
+gceSTATUS
+gcsRECT_RelativeRotation(
+ IN gceSURF_ROTATION Orientation,
+ IN OUT gceSURF_ROTATION *Relation);
+
+gceSTATUS
+
+gcsRECT_Rotate(
+
+ IN OUT gcsRECT_PTR Rect,
+
+ IN gceSURF_ROTATION Rotation,
+
+ IN gceSURF_ROTATION toRotation,
+
+ IN gctINT32 SurfaceWidth,
+
+ IN gctINT32 SurfaceHeight
+
+ );
+
+/******************************************************************************\
+**************************** gcsBOUNDARY Structure *****************************
+\******************************************************************************/
+
+typedef struct _gcsBOUNDARY
+{
+ gctINT x;
+ gctINT y;
+ gctINT width;
+ gctINT height;
+}
+gcsBOUNDARY;
+
+/******************************************************************************\
+********************************* gcoHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gcoHEAP * gcoHEAP;
+
+/* Construct a new gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Construct(
+ IN gcoOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gcoHEAP * Heap
+ );
+
+/* Destroy an gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Destroy(
+ IN gcoHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoHEAP_Allocate(
+ IN gcoHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcoHEAP_GetMemorySize(
+ IN gcoHEAP Heap,
+ IN gctPOINTER Memory,
+ OUT gctSIZE_T_PTR MemorySize
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoHEAP_Free(
+ IN gcoHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+#if (VIVANTE_PROFILER /*gcdENABLE_PROFILING*/ || gcdDEBUG)
+/* Profile the heap. */
+gceSTATUS
+gcoHEAP_ProfileStart(
+ IN gcoHEAP Heap
+ );
+
+gceSTATUS
+gcoHEAP_ProfileEnd(
+ IN gcoHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+#endif
+
+
+/******************************************************************************\
+******************************* Debugging Macros *******************************
+\******************************************************************************/
+
+void
+gcoOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gcoOS_GetDebugLevel(
+ OUT gctUINT32_PTR DebugLevel
+ );
+
+void
+gcoOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_GetDebugZone(
+ IN gctUINT32 Zone,
+ OUT gctUINT32_PTR DebugZone
+ );
+
+void
+gcoOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gcoOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+gctFILE
+gcoOS_ReplaceDebugFile(
+ IN gctFILE fp
+ );
+
+/*******************************************************************************
+**
+** gcmFATAL
+**
+** Print a message to the debugger and execute a break point.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_FATAL)
+# define gcmFATAL gcoOS_DebugFatal
+# define gcmkFATAL gckOS_DebugFatal
+#elif gcdHAS_ELLIPSES
+# define gcmFATAL(...)
+# define gcmkFATAL(...)
+#else
+ gcmINLINE static void
+ __dummy_fatal(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmFATAL __dummy_fatal
+# define gcmkFATAL __dummy_fatal
+#endif
+
+#define gcmENUM2TEXT(e) case e: return #e
+
+/*******************************************************************************
+**
+** gcmTRACE
+**
+** Print a message to the debugfer if the correct level has been set. In
+** retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** level Level of message.
+** message Message.
+** ... Optional arguments.
+*/
+#define gcvLEVEL_NONE -1
+#define gcvLEVEL_ERROR 0
+#define gcvLEVEL_WARNING 1
+#define gcvLEVEL_INFO 2
+#define gcvLEVEL_VERBOSE 3
+
+void
+gckOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_DebugTraceN(
+ IN gctUINT32 Level,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+# define gcmTRACE gcoOS_DebugTrace
+# define gcmkTRACE gckOS_DebugTrace
+# define gcmkTRACE_N gckOS_DebugTraceN
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE(...)
+# define gcmkTRACE(...)
+# define gcmkTRACE_N(...)
+#else
+ gcmINLINE static void
+ __dummy_trace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+ gcmINLINE static void
+ __dummy_trace_n(
+ IN gctUINT32 Level,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+# define gcmTRACE __dummy_trace
+# define gcmkTRACE __dummy_trace
+# define gcmkTRACE_N __dummy_trace_n
+#endif
+
+/* Zones common for kernel and user. */
+#define gcvZONE_OS (1 << 0)
+#define gcvZONE_HARDWARE (1 << 1)
+#define gcvZONE_HEAP (1 << 2)
+#define gcvZONE_SIGNAL (1 << 27)
+
+/* Kernel zones. */
+#define gcvZONE_KERNEL (1 << 3)
+#define gcvZONE_VIDMEM (1 << 4)
+#define gcvZONE_COMMAND (1 << 5)
+#define gcvZONE_DRIVER (1 << 6)
+#define gcvZONE_CMODEL (1 << 7)
+#define gcvZONE_MMU (1 << 8)
+#define gcvZONE_EVENT (1 << 9)
+#define gcvZONE_DEVICE (1 << 10)
+#define gcvZONE_DATABASE (1 << 11)
+#define gcvZONE_INTERRUPT (1 << 12)
+
+/* User zones. */
+#define gcvZONE_HAL (1 << 3)
+#define gcvZONE_BUFFER (1 << 4)
+#define gcvZONE_CONTEXT (1 << 5)
+#define gcvZONE_SURFACE (1 << 6)
+#define gcvZONE_INDEX (1 << 7)
+#define gcvZONE_STREAM (1 << 8)
+#define gcvZONE_TEXTURE (1 << 9)
+#define gcvZONE_2D (1 << 10)
+#define gcvZONE_3D (1 << 11)
+#define gcvZONE_COMPILER (1 << 12)
+#define gcvZONE_MEMORY (1 << 13)
+#define gcvZONE_STATE (1 << 14)
+#define gcvZONE_AUX (1 << 15)
+#define gcvZONE_VERTEX (1 << 16)
+#define gcvZONE_CL (1 << 17)
+#define gcvZONE_COMPOSITION (1 << 17)
+#define gcvZONE_VG (1 << 18)
+#define gcvZONE_IMAGE (1 << 19)
+#define gcvZONE_UTILITY (1 << 20)
+#define gcvZONE_PARAMETERS (1 << 21)
+
+/* API definitions. */
+#define gcvZONE_API_HAL (1 << 28)
+#define gcvZONE_API_EGL (2 << 28)
+#define gcvZONE_API_ES11 (3 << 28)
+#define gcvZONE_API_ES20 (4 << 28)
+#define gcvZONE_API_VG11 (5 << 28)
+#define gcvZONE_API_GL (6 << 28)
+#define gcvZONE_API_DFB (7 << 28)
+#define gcvZONE_API_GDI (8 << 28)
+#define gcvZONE_API_D3D (9 << 28)
+
+
+#define gcmZONE_GET_API(zone) ((zone) >> 28)
+/*Set gcdZONE_MASE like 0x0 | gcvZONE_API_EGL
+will enable print EGL module debug info*/
+#define gcdZONE_MASK 0x0FFFFFFF
+
+/* Handy zones. */
+#define gcvZONE_NONE 0
+#define gcvZONE_ALL 0x0FFFFFFF
+
+/*Dump API depth set 1 for API, 2 for API and API behavior*/
+#define gcvDUMP_API_DEPTH 1
+
+/*******************************************************************************
+**
+** gcmTRACE_ZONE
+**
+** Print a message to the debugger if the correct level and zone has been
+** set. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** Level Level of message.
+** Zone Zone of message.
+** Message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_DebugTraceZoneN(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+# define gcmTRACE_ZONE gcoOS_DebugTraceZone
+# define gcmkTRACE_ZONE gckOS_DebugTraceZone
+# define gcmkTRACE_ZONE_N gckOS_DebugTraceZoneN
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE_ZONE(...)
+# define gcmkTRACE_ZONE(...)
+# define gcmkTRACE_ZONE_N(...)
+#else
+ gcmINLINE static void
+ __dummy_trace_zone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+ gcmINLINE static void
+ __dummy_trace_zone_n(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+# define gcmTRACE_ZONE __dummy_trace_zone
+# define gcmkTRACE_ZONE __dummy_trace_zone
+# define gcmkTRACE_ZONE_N __dummy_trace_zone_n
+#endif
+
+/*******************************************************************************
+**
+** gcmDEBUG_ONLY
+**
+** Execute a statement or function only in DEBUG mode.
+**
+** ARGUMENTS:
+**
+** f Statement or function to execute.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+# define gcmDEBUG_ONLY(f) f
+#else
+# define gcmDEBUG_ONLY(f)
+#endif
+
+/*******************************************************************************
+**
+** gcmSTACK_PUSH
+** gcmSTACK_POP
+** gcmSTACK_DUMP
+**
+** Push or pop a function with entry arguments on the trace stack.
+**
+** ARGUMENTS:
+**
+** Function Name of function.
+** Line Line number.
+** Text Optional text.
+** ... Optional arguments for text.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_STACK)
+ void
+ gcoOS_StackPush(
+ IN gctCONST_STRING Function,
+ IN gctINT Line,
+ IN gctCONST_STRING Text,
+ ...
+ );
+ void
+ gcoOS_StackPop(
+ IN gctCONST_STRING Function
+ );
+ void
+ gcoOS_StackDump(
+ void
+ );
+# define gcmSTACK_PUSH gcoOS_StackPush
+# define gcmSTACK_POP gcoOS_StackPop
+# define gcmSTACK_DUMP gcoOS_StackDump
+#elif gcdHAS_ELLIPSES
+# define gcmSTACK_PUSH(...) do { } while (0)
+# define gcmSTACK_POP(Function) do { } while (0)
+# define gcmSTACK_DUMP() do { } while (0)
+#else
+ gcmINLINE static void
+ __dummy_stack_push(
+ IN gctCONST_STRING Function,
+ IN gctINT Line,
+ IN gctCONST_STRING Text, ...
+ )
+ {
+ }
+# define gcmSTACK_PUSH __dummy_stack_push
+# define gcmSTACK_POP(Function) do { } while (0)
+# define gcmSTACK_DUMP() do { } while (0)
+#endif
+
+/******************************************************************************\
+******************************** Logging Macros ********************************
+\******************************************************************************/
+
+#define gcdHEADER_LEVEL gcvLEVEL_VERBOSE
+
+
+#if gcdENABLE_PROFILING
+void
+gcoOS_ProfileDB(
+ IN gctCONST_STRING Function,
+ IN OUT gctBOOL_PTR Initialized
+ );
+
+#define gcmHEADER() \
+ static gctBOOL __profile__initialized__ = gcvFALSE; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, gcvNULL, gcvNULL); \
+ gcoOS_ProfileDB(__FUNCTION__, &__profile__initialized__)
+#define gcmHEADER_ARG(...) \
+ static gctBOOL __profile__initialized__ = gcvFALSE; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, Text, __VA_ARGS__); \
+ gcoOS_ProfileDB(__FUNCTION__, &__profile__initialized__)
+#define gcmFOOTER() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(__FUNCTION__, gcvNULL)
+#define gcmFOOTER_NO() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(__FUNCTION__, gcvNULL)
+#define gcmFOOTER_ARG(...) \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(__FUNCTION__, gcvNULL)
+#define gcmFOOTER_KILL() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(gcvNULL, gcvNULL)
+
+#else /* gcdENABLE_PROFILING */
+
+#if gcdHAS_ELLIPSES
+#define gcmHEADER() \
+ gctINT8 __user__ = 1; \
+ gctINT8_PTR __user_ptr__ = &__user__; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, gcvNULL, gcvNULL); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+#else
+ gcmINLINE static void
+ __dummy_header(void)
+ {
+ }
+# define gcmHEADER __dummy_header
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmHEADER_ARG(Text, ...) \
+ gctINT8 __user__ = 1; \
+ gctINT8_PTR __user_ptr__ = &__user__; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, Text, __VA_ARGS__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_header_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmHEADER_ARG __dummy_header_arg
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmFOOTER() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmPROFILE_ONLY(gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d) [%llu,%llu]: status=%d(%s)", \
+ __FUNCTION__, __LINE__, \
+ __ticks__, __total__, \
+ status, gcoOS_DebugStatus2Name(status))); \
+ gcmPROFILE_ELSE(gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d(%s)", \
+ __FUNCTION__, __LINE__, \
+ status, gcoOS_DebugStatus2Name(status))); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer(void)
+ {
+ }
+# define gcmFOOTER __dummy_footer
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmFOOTER_NO() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer_no(void)
+ {
+ }
+# define gcmFOOTER_NO __dummy_footer_no
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmFOOTER_KILL() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer_kill(void)
+ {
+ }
+# define gcmFOOTER_KILL __dummy_footer_kill
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmFOOTER_ARG(Text, ...) \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmFOOTER_ARG __dummy_footer_arg
+#endif
+
+#endif /* gcdENABLE_PROFILING */
+
+#if gcdHAS_ELLIPSES
+#define gcmkHEADER() \
+ gctINT8 __kernel__ = 1; \
+ gctINT8_PTR __kernel_ptr__ = &__kernel__; \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+#else
+ gcmINLINE static void
+ __dummy_kheader(void)
+ {
+ }
+# define gcmkHEADER __dummy_kheader
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmkHEADER_ARG(Text, ...) \
+ gctINT8 __kernel__ = 1; \
+ gctINT8_PTR __kernel_ptr__ = &__kernel__; \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_kheader_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkHEADER_ARG __dummy_kheader_arg
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmkFOOTER() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d(%s)", \
+ __FUNCTION__, __LINE__, status, gckOS_DebugStatus2Name(status)); \
+ *__kernel_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_kfooter(void)
+ {
+ }
+# define gcmkFOOTER __dummy_kfooter
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmkFOOTER_NO() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__); \
+ *__kernel_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_kfooter_no(void)
+ {
+ }
+# define gcmkFOOTER_NO __dummy_kfooter_no
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmkFOOTER_ARG(Text, ...) \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, \
+ __FUNCTION__, __LINE__, __VA_ARGS__); \
+ *__kernel_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_kfooter_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkFOOTER_ARG __dummy_kfooter_arg
+#endif
+
+#define gcmOPT_VALUE(ptr) (((ptr) == gcvNULL) ? 0 : *(ptr))
+#define gcmOPT_POINTER(ptr) (((ptr) == gcvNULL) ? gcvNULL : *(ptr))
+#define gcmOPT_STRING(ptr) (((ptr) == gcvNULL) ? "(nil)" : (ptr))
+
+void
+gckOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_PrintN(
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_CopyPrint(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#define gcmPRINT gcoOS_Print
+#define gcmkPRINT gckOS_Print
+#define gcmkPRINT_N gckOS_PrintN
+
+#if gcdPRINT_VERSION
+# define gcmPRINT_VERSION() do { \
+ _gcmPRINT_VERSION(gcm); \
+ gcmSTACK_DUMP(); \
+ } while (0)
+# define gcmkPRINT_VERSION() _gcmPRINT_VERSION(gcmk)
+# define _gcmPRINT_VERSION(prefix) \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ "Vivante HAL version %d.%d.%d build %d %s %s", \
+ gcvVERSION_MAJOR, gcvVERSION_MINOR, gcvVERSION_PATCH, \
+ gcvVERSION_BUILD, gcvVERSION_DATE, gcvVERSION_TIME )
+#else
+# define gcmPRINT_VERSION() do { gcmSTACK_DUMP(); } while (gcvFALSE)
+# define gcmkPRINT_VERSION() do { } while (gcvFALSE)
+#endif
+
+typedef enum _gceDUMP_BUFFER
+{
+ gceDUMP_BUFFER_CONTEXT,
+ gceDUMP_BUFFER_USER,
+ gceDUMP_BUFFER_KERNEL,
+ gceDUMP_BUFFER_LINK,
+ gceDUMP_BUFFER_WAITLINK,
+ gceDUMP_BUFFER_FROM_USER,
+}
+gceDUMP_BUFFER;
+
+void
+gckOS_DumpBuffer(
+ IN gckOS Os,
+ IN gctPOINTER Buffer,
+ IN gctUINT Size,
+ IN gceDUMP_BUFFER Type,
+ IN gctBOOL CopyMessage
+ );
+
+#define gcmkDUMPBUFFER gckOS_DumpBuffer
+
+#if gcdDUMP_COMMAND
+# define gcmkDUMPCOMMAND(Os, Buffer, Size, Type, CopyMessage) \
+ gcmkDUMPBUFFER(Os, Buffer, Size, Type, CopyMessage)
+#else
+# define gcmkDUMPCOMMAND(Os, Buffer, Size, Type, CopyMessage)
+#endif
+
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+
+void
+gckOS_DebugFlush(
+ gctCONST_STRING CallerName,
+ gctUINT LineNumber,
+ gctUINT32 DmaAddress
+ );
+
+# define gcmkDEBUGFLUSH(DmaAddress) \
+ gckOS_DebugFlush(__FUNCTION__, __LINE__, DmaAddress)
+#else
+# define gcmkDEBUGFLUSH(DmaAddress)
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_FRAMERATE
+**
+** Print average frame rate
+**
+*/
+#if gcdDUMP_FRAMERATE
+ gceSTATUS
+ gcfDumpFrameRate(
+ void
+ );
+# define gcmDUMP_FRAMERATE gcfDumpFrameRate
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_FRAMERATE(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_frame_rate(
+ void
+ )
+ {
+ }
+# define gcmDUMP_FRAMERATE __dummy_dump_frame_rate
+#endif
+
+
+/*******************************************************************************
+**
+** gcmDUMP
+**
+** Print a dump message.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+#if gcdDUMP
+ gceSTATUS
+ gcfDump(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ ...
+ );
+# define gcmDUMP gcfDump
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP(...)
+#else
+ gcmINLINE static void
+ __dummy_dump(
+ IN gcoOS Os,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP __dummy_dump
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_DATA
+**
+** Add data to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP || gcdDUMP_COMMAND
+ gceSTATUS
+ gcfDumpData(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_DATA gcfDumpData
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_DATA(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_data(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_DATA __dummy_dump_data
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_BUFFER
+**
+** Print a buffer to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctUINT32 Physical
+** Physical address of buffer.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctUINT32 Offset
+** Offset into buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP || gcdDUMP_COMMAND
+gceSTATUS
+gcfDumpBuffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_BUFFER gcfDumpBuffer
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_BUFFER(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_buffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_BUFFER __dummy_dump_buffer
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API
+**
+** Print a dump message for a high level API prefixed by the function name.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpApi(
+ IN gctCONST_STRING String,
+ ...
+ );
+# define gcmDUMP_API gcfDumpApi
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP_API __dummy_dump_api
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY
+**
+** Print an array of data.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Size.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpArray(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Size
+ );
+# define gcmDUMP_API_ARRAY gcfDumpArray
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Size
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY __dummy_dump_api_array
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY_TOKEN
+**
+** Print an array of data terminated by a token.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Termination.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpArrayToken(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Termination
+ );
+# define gcmDUMP_API_ARRAY_TOKEN gcfDumpArrayToken
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY_TOKEN(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array_token(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Termination
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY_TOKEN __dummy_dump_api_array_token
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_DATA
+**
+** Print an array of bytes.
+**
+** ARGUMENTS:
+**
+** gctCONST_POINTER Pointer to array.
+** gctSIZE_T Size.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpApiData(
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Size
+ );
+# define gcmDUMP_API_DATA gcfDumpApiData
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_DATA(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_data(
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Size
+ )
+ {
+ }
+# define gcmDUMP_API_DATA __dummy_dump_api_data
+#endif
+
+/*******************************************************************************
+**
+** gcmTRACE_RELEASE
+**
+** Print a message to the shader debugger.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+#define gcmTRACE_RELEASE gcoOS_DebugShaderTrace
+
+void
+gcoOS_DebugShaderTrace(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_SetDebugShaderFiles(
+ IN gctCONST_STRING VSFileName,
+ IN gctCONST_STRING FSFileName
+ );
+
+void
+gcoOS_SetDebugShaderFileType(
+ IN gctUINT32 ShaderType
+ );
+
+void
+gcoOS_EnableDebugBuffer(
+ IN gctBOOL Enable
+ );
+
+/*******************************************************************************
+**
+** gcmBREAK
+**
+** Break into the debugger. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** None.
+*/
+
+void
+gcoOS_DebugBreak(
+ void
+ );
+
+void
+gckOS_DebugBreak(
+ void
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_BREAK)
+# define gcmBREAK gcoOS_DebugBreak
+# define gcmkBREAK gckOS_DebugBreak
+#else
+# define gcmBREAK()
+# define gcmkBREAK()
+#endif
+
+/*******************************************************************************
+**
+** gcmASSERT
+**
+** Evaluate an expression and break into the debugger if the expression
+** evaluates to false. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_ASSERT)
+# define _gcmASSERT(prefix, exp) \
+ do \
+ { \
+ if (!(exp)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ASSERT at %s(%d)", \
+ __FUNCTION__, __LINE__); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ "(%s)", #exp); \
+ prefix##BREAK(); \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmASSERT(exp) _gcmASSERT(gcm, exp)
+# define gcmkASSERT(exp) _gcmASSERT(gcmk, exp)
+#else
+# define gcmASSERT(exp)
+# define gcmkASSERT(exp)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY
+**
+** Verify if an expression returns true. If the expression does not
+** evaluates to true, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_ASSERT)
+# define gcmVERIFY(exp) gcmASSERT(exp)
+# define gcmkVERIFY(exp) gcmkASSERT(exp)
+#else
+# define gcmVERIFY(exp) exp
+# define gcmkVERIFY(exp) exp
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY_OK
+**
+** Verify a fucntion returns gcvSTATUS_OK. If the function does not return
+** gcvSTATUS_OK, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+
+void
+gcoOS_Verify(
+ IN gceSTATUS Status
+ );
+
+void
+gckOS_Verify(
+ IN gceSTATUS Status
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_ASSERT)
+# define gcmVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ gcoOS_Verify(verifyStatus); \
+ if (verifyStatus != gcvSTATUS_OK) \
+ { \
+ gcmTRACE( \
+ gcvLEVEL_ERROR, \
+ "gcmVERIFY_OK(%d): function returned %d", \
+ __LINE__, verifyStatus \
+ ); \
+ } \
+ gcmASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+# define gcmkVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ if (verifyStatus != gcvSTATUS_OK) \
+ { \
+ gcmkTRACE( \
+ gcvLEVEL_ERROR, \
+ "gcmkVERIFY_OK(%d): function returned %d", \
+ __LINE__, verifyStatus \
+ ); \
+ } \
+ gckOS_Verify(verifyStatus); \
+ gcmkASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+#else
+# define gcmVERIFY_OK(func) func
+# define gcmkVERIFY_OK(func) func
+#endif
+
+gctCONST_STRING
+gcoOS_DebugStatus2Name(
+ gceSTATUS status
+ );
+
+gctCONST_STRING
+gckOS_DebugStatus2Name(
+ gceSTATUS status
+ );
+
+/*******************************************************************************
+**
+** gcmERR_BREAK
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_BREAK(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_BREAK: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+#define _gcmkERR_BREAK(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_BREAK: status=%d(%s) @ %s(%d)", \
+ status, gckOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_BREAK(func) _gcmERR_BREAK(gcm, func)
+#define gcmkERR_BREAK(func) _gcmkERR_BREAK(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmERR_RETURN
+**
+** Executes a return on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ prefix##FOOTER(); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+#define _gcmkERR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d(%s) @ %s(%d)", \
+ status, gckOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ prefix##FOOTER(); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_RETURN(func) _gcmERR_RETURN(gcm, func)
+#define gcmkERR_RETURN(func) _gcmkERR_RETURN(gcmk, func)
+
+
+/*******************************************************************************
+**
+** gcmONERROR
+**
+** Jump to the error handler in case there is an error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmONERROR(prefix, func) \
+ do \
+ { \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ONERROR: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ goto OnError; \
+ } \
+ } \
+ while (gcvFALSE)
+#define _gcmkONERROR(prefix, func) \
+ do \
+ { \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ONERROR: status=%d(%s) @ %s(%d)", \
+ status, gckOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ goto OnError; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmONERROR(func) _gcmONERROR(gcm, func)
+#define gcmkONERROR(func) _gcmkONERROR(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_LOCK
+**
+** Verifies whether the surface is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_LOCK(surfaceInfo) \
+ if (!surfaceInfo->node.valid) \
+ { \
+ gcmONERROR(gcvSTATUS_MEMORY_UNLOCKED); \
+ } \
+
+/*******************************************************************************
+**
+** gcmVERIFY_NODE_LOCK
+**
+** Verifies whether the surface node is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_NODE_LOCK(surfaceNode) \
+ if (!surfaceNode->valid) \
+ { \
+ status = gcvSTATUS_MEMORY_UNLOCKED; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmBADOBJECT_BREAK
+**
+** Executes a break statement on bad object.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#define gcmBADOBJECT_BREAK(obj, t) \
+ if ((obj == gcvNULL) \
+ || (((gcsOBJECT *)(obj))->type != t) \
+ ) \
+ { \
+ status = gcvSTATUS_INVALID_OBJECT; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmCHECK_STATUS
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmCHECK_STATUS(prefix, func) \
+ do \
+ { \
+ last = func; \
+ if (gcmIS_ERROR(last)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "CHECK_STATUS: status=%d(%s) @ %s(%d)", \
+ last, gcoOS_DebugStatus2Name(last), __FUNCTION__, __LINE__); \
+ status = last; \
+ } \
+ } \
+ while (gcvFALSE)
+#define _gcmkCHECK_STATUS(prefix, func) \
+ do \
+ { \
+ last = func; \
+ if (gcmIS_ERROR(last)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "CHECK_STATUS: status=%d(%s) @ %s(%d)", \
+ last, gckOS_DebugStatus2Name(last), __FUNCTION__, __LINE__); \
+ status = last; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmCHECK_STATUS(func) _gcmCHECK_STATUS(gcm, func)
+#define gcmkCHECK_STATUS(func) _gcmkCHECK_STATUS(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+# define _gcmVERIFY_ARGUMENT(prefix, arg) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, #prefix "VERIFY_ARGUMENT failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_ARGUMENT); \
+ return gcvSTATUS_INVALID_ARGUMENT; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcm, arg)
+# define gcmkVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcmk, arg)
+
+/*******************************************************************************
+**
+** gcmDEBUG_VERIFY_ARGUMENT
+**
+** Works just like gcmVERIFY_ARGUMENT, but is only valid in debug mode.
+** Use this to verify arguments inside non-public API functions.
+*/
+#if gcdDEBUG
+# define gcmDEBUG_VERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcm, arg)
+# define gcmkDEBUG_VERIFY_ARGUMENT(arg) _gcmkVERIFY_ARGUMENT(gcm, arg)
+#else
+# define gcmDEBUG_VERIFY_ARGUMENT(arg)
+# define gcmkDEBUG_VERIFY_ARGUMENT(arg)
+#endif
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT_RETURN
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+# define _gcmVERIFY_ARGUMENT_RETURN(prefix, arg, value) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "gcmVERIFY_ARGUMENT_RETURN failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("value=%d", value); \
+ return value; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcm, arg, value)
+# define gcmkVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcmk, arg, value)
+
+#define MAX_LOOP_COUNT 0x7FFFFFFF
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_base_h_ */
diff --git a/src/include_imx6/gc_hal_compiler.h b/src/include_imx6/gc_hal_compiler.h
new file mode 100644
index 0000000..ecdb763
--- /dev/null
+++ b/src/include_imx6/gc_hal_compiler.h
@@ -0,0 +1,3400 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+/*
+** Include file the defines the front- and back-end compilers, as well as the
+** objects they use.
+*/
+
+#ifndef __gc_hal_compiler_h_
+#define __gc_hal_compiler_h_
+
+#ifndef VIVANTE_NO_3D
+#include "gc_hal_types.h"
+#include "gc_hal_engine.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef GC_ENABLE_LOADTIME_OPT
+#define GC_ENABLE_LOADTIME_OPT 1
+#endif
+
+/******************************* IR VERSION ******************/
+#define gcdSL_IR_VERSION gcmCC('\0','\0','\0','\1')
+
+/******************************************************************************\
+|******************************* SHADER LANGUAGE ******************************|
+\******************************************************************************/
+
+/* Possible shader language opcodes. */
+typedef enum _gcSL_OPCODE
+{
+ gcSL_NOP, /* 0x00 */
+ gcSL_MOV, /* 0x01 */
+ gcSL_SAT, /* 0x02 */
+ gcSL_DP3, /* 0x03 */
+ gcSL_DP4, /* 0x04 */
+ gcSL_ABS, /* 0x05 */
+ gcSL_JMP, /* 0x06 */
+ gcSL_ADD, /* 0x07 */
+ gcSL_MUL, /* 0x08 */
+ gcSL_RCP, /* 0x09 */
+ gcSL_SUB, /* 0x0A */
+ gcSL_KILL, /* 0x0B */
+ gcSL_TEXLD, /* 0x0C */
+ gcSL_CALL, /* 0x0D */
+ gcSL_RET, /* 0x0E */
+ gcSL_NORM, /* 0x0F */
+ gcSL_MAX, /* 0x10 */
+ gcSL_MIN, /* 0x11 */
+ gcSL_POW, /* 0x12 */
+ gcSL_RSQ, /* 0x13 */
+ gcSL_LOG, /* 0x14 */
+ gcSL_FRAC, /* 0x15 */
+ gcSL_FLOOR, /* 0x16 */
+ gcSL_CEIL, /* 0x17 */
+ gcSL_CROSS, /* 0x18 */
+ gcSL_TEXLDP, /* 0x19 */
+ gcSL_TEXBIAS, /* 0x1A */
+ gcSL_TEXGRAD, /* 0x1B */
+ gcSL_TEXLOD, /* 0x1C */
+ gcSL_SIN, /* 0x1D */
+ gcSL_COS, /* 0x1E */
+ gcSL_TAN, /* 0x1F */
+ gcSL_EXP, /* 0x20 */
+ gcSL_SIGN, /* 0x21 */
+ gcSL_STEP, /* 0x22 */
+ gcSL_SQRT, /* 0x23 */
+ gcSL_ACOS, /* 0x24 */
+ gcSL_ASIN, /* 0x25 */
+ gcSL_ATAN, /* 0x26 */
+ gcSL_SET, /* 0x27 */
+ gcSL_DSX, /* 0x28 */
+ gcSL_DSY, /* 0x29 */
+ gcSL_FWIDTH, /* 0x2A */
+ gcSL_DIV, /* 0x2B */
+ gcSL_MOD, /* 0x2C */
+ gcSL_AND_BITWISE, /* 0x2D */
+ gcSL_OR_BITWISE, /* 0x2E */
+ gcSL_XOR_BITWISE, /* 0x2F */
+ gcSL_NOT_BITWISE, /* 0x30 */
+ gcSL_LSHIFT, /* 0x31 */
+ gcSL_RSHIFT, /* 0x32 */
+ gcSL_ROTATE, /* 0x33 */
+ gcSL_BITSEL, /* 0x34 */
+ gcSL_LEADZERO, /* 0x35 */
+ gcSL_LOAD, /* 0x36 */
+ gcSL_STORE, /* 0x37 */
+ gcSL_BARRIER, /* 0x38 */
+ gcSL_STORE1, /* 0x39 */
+ gcSL_ATOMADD, /* 0x3A */
+ gcSL_ATOMSUB, /* 0x3B */
+ gcSL_ATOMXCHG, /* 0x3C */
+ gcSL_ATOMCMPXCHG, /* 0x3D */
+ gcSL_ATOMMIN, /* 0x3E */
+ gcSL_ATOMMAX, /* 0x3F */
+ gcSL_ATOMOR, /* 0x40 */
+ gcSL_ATOMAND, /* 0x41 */
+ gcSL_ATOMXOR, /* 0x42 */
+ /*gcSL_UNUSED, 0x43 */
+ /*gcSL_UNUSED, 0x44 */
+ /*gcSL_UNUSED, 0x45 */
+ /*gcSL_UNUSED, 0x46 */
+ /*gcSL_UNUSED, 0x47 */
+ /*gcSL_UNUSED, 0x48 */
+ /*gcSL_UNUSED, 0x49 */
+ /*gcSL_UNUSED, 0x4A */
+ /*gcSL_UNUSED, 0x4B */
+ /*gcSL_UNUSED, 0x4C */
+ /*gcSL_UNUSED, 0x4D */
+ /*gcSL_UNUSED, 0x4E */
+ /*gcSL_UNUSED, 0x4F */
+ /*gcSL_UNUSED, 0x50 */
+ /*gcSL_UNUSED, 0x51 */
+ /*gcSL_UNUSED, 0x52 */
+ gcSL_ADDLO = 0x53, /* 0x53 */ /* Float only. */
+ gcSL_MULLO, /* 0x54 */ /* Float only. */
+ gcSL_CONV, /* 0x55 */
+ gcSL_GETEXP, /* 0x56 */
+ gcSL_GETMANT, /* 0x57 */
+ gcSL_MULHI, /* 0x58 */ /* Integer only. */
+ gcSL_CMP, /* 0x59 */
+ gcSL_I2F, /* 0x5A */
+ gcSL_F2I, /* 0x5B */
+ gcSL_ADDSAT, /* 0x5C */ /* Integer only. */
+ gcSL_SUBSAT, /* 0x5D */ /* Integer only. */
+ gcSL_MULSAT, /* 0x5E */ /* Integer only. */
+}
+gcSL_OPCODE;
+
+typedef enum _gcSL_FORMAT
+{
+ gcSL_FLOAT = 0, /* 0 */
+ gcSL_INTEGER = 1, /* 1 */
+ gcSL_INT32 = 1, /* 1 */
+ gcSL_BOOLEAN = 2, /* 2 */
+ gcSL_UINT32 = 3, /* 3 */
+ gcSL_INT8, /* 4 */
+ gcSL_UINT8, /* 5 */
+ gcSL_INT16, /* 6 */
+ gcSL_UINT16, /* 7 */
+ gcSL_INT64, /* 8 */ /* Reserved for future enhancement. */
+ gcSL_UINT64, /* 9 */ /* Reserved for future enhancement. */
+ gcSL_INT128, /* 10 */ /* Reserved for future enhancement. */
+ gcSL_UINT128, /* 11 */ /* Reserved for future enhancement. */
+ gcSL_FLOAT16, /* 12 */
+ gcSL_FLOAT64, /* 13 */ /* Reserved for future enhancement. */
+ gcSL_FLOAT128, /* 14 */ /* Reserved for future enhancement. */
+}
+gcSL_FORMAT;
+
+/* Destination write enable bits. */
+typedef enum _gcSL_ENABLE
+{
+ gcSL_ENABLE_NONE = 0x0, /* none is enabled, error/uninitialized state */
+ gcSL_ENABLE_X = 0x1,
+ gcSL_ENABLE_Y = 0x2,
+ gcSL_ENABLE_Z = 0x4,
+ gcSL_ENABLE_W = 0x8,
+ /* Combinations. */
+ gcSL_ENABLE_XY = gcSL_ENABLE_X | gcSL_ENABLE_Y,
+ gcSL_ENABLE_XYZ = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XYZW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XYW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_XZ = gcSL_ENABLE_X | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XZW = gcSL_ENABLE_X | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XW = gcSL_ENABLE_X | gcSL_ENABLE_W,
+ gcSL_ENABLE_YZ = gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_YZW = gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_YW = gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_ZW = gcSL_ENABLE_Z | gcSL_ENABLE_W,
+}
+gcSL_ENABLE;
+
+/* Possible indices. */
+typedef enum _gcSL_INDEXED
+{
+ gcSL_NOT_INDEXED, /* 0 */
+ gcSL_INDEXED_X, /* 1 */
+ gcSL_INDEXED_Y, /* 2 */
+ gcSL_INDEXED_Z, /* 3 */
+ gcSL_INDEXED_W, /* 4 */
+}
+gcSL_INDEXED;
+
+/* Opcode conditions. */
+typedef enum _gcSL_CONDITION
+{
+ gcSL_ALWAYS, /* 0x0 */
+ gcSL_NOT_EQUAL, /* 0x1 */
+ gcSL_LESS_OR_EQUAL, /* 0x2 */
+ gcSL_LESS, /* 0x3 */
+ gcSL_EQUAL, /* 0x4 */
+ gcSL_GREATER, /* 0x5 */
+ gcSL_GREATER_OR_EQUAL, /* 0x6 */
+ gcSL_AND, /* 0x7 */
+ gcSL_OR, /* 0x8 */
+ gcSL_XOR, /* 0x9 */
+ gcSL_NOT_ZERO, /* 0xA */
+}
+gcSL_CONDITION;
+
+/* Possible source operand types. */
+typedef enum _gcSL_TYPE
+{
+ gcSL_NONE, /* 0x0 */
+ gcSL_TEMP, /* 0x1 */
+ gcSL_ATTRIBUTE, /* 0x2 */
+ gcSL_UNIFORM, /* 0x3 */
+ gcSL_SAMPLER, /* 0x4 */
+ gcSL_CONSTANT, /* 0x5 */
+ gcSL_OUTPUT, /* 0x6 */
+ gcSL_PHYSICAL, /* 0x7 */
+}
+gcSL_TYPE;
+
+/* Swizzle generator macro. */
+#define gcmSWIZZLE(Component1, Component2, Component3, Component4) \
+( \
+ (gcSL_SWIZZLE_ ## Component1 << 0) | \
+ (gcSL_SWIZZLE_ ## Component2 << 2) | \
+ (gcSL_SWIZZLE_ ## Component3 << 4) | \
+ (gcSL_SWIZZLE_ ## Component4 << 6) \
+)
+
+#define gcmExtractSwizzle(Swizzle, Index) \
+ ((gcSL_SWIZZLE) ((((Swizzle) >> (Index * 2)) & 0x3)))
+
+#define gcmComposeSwizzle(SwizzleX, SwizzleY, SwizzleZ, SwizzleW) \
+( \
+ ((SwizzleX) << 0) | \
+ ((SwizzleY) << 2) | \
+ ((SwizzleZ) << 4) | \
+ ((SwizzleW) << 6) \
+)
+
+/* Possible swizzle values. */
+typedef enum _gcSL_SWIZZLE
+{
+ gcSL_SWIZZLE_X, /* 0x0 */
+ gcSL_SWIZZLE_Y, /* 0x1 */
+ gcSL_SWIZZLE_Z, /* 0x2 */
+ gcSL_SWIZZLE_W, /* 0x3 */
+ /* Combinations. */
+ gcSL_SWIZZLE_XXXX = gcmSWIZZLE(X, X, X, X),
+ gcSL_SWIZZLE_YYYY = gcmSWIZZLE(Y, Y, Y, Y),
+ gcSL_SWIZZLE_ZZZZ = gcmSWIZZLE(Z, Z, Z, Z),
+ gcSL_SWIZZLE_WWWW = gcmSWIZZLE(W, W, W, W),
+ gcSL_SWIZZLE_XYYY = gcmSWIZZLE(X, Y, Y, Y),
+ gcSL_SWIZZLE_XZZZ = gcmSWIZZLE(X, Z, Z, Z),
+ gcSL_SWIZZLE_XWWW = gcmSWIZZLE(X, W, W, W),
+ gcSL_SWIZZLE_YZZZ = gcmSWIZZLE(Y, Z, Z, Z),
+ gcSL_SWIZZLE_YWWW = gcmSWIZZLE(Y, W, W, W),
+ gcSL_SWIZZLE_ZWWW = gcmSWIZZLE(Z, W, W, W),
+ gcSL_SWIZZLE_XYZZ = gcmSWIZZLE(X, Y, Z, Z),
+ gcSL_SWIZZLE_XYWW = gcmSWIZZLE(X, Y, W, W),
+ gcSL_SWIZZLE_XZWW = gcmSWIZZLE(X, Z, W, W),
+ gcSL_SWIZZLE_YZWW = gcmSWIZZLE(Y, Z, W, W),
+ gcSL_SWIZZLE_XXYZ = gcmSWIZZLE(X, X, Y, Z),
+ gcSL_SWIZZLE_XYZW = gcmSWIZZLE(X, Y, Z, W),
+ gcSL_SWIZZLE_XYXY = gcmSWIZZLE(X, Y, X, Y),
+ gcSL_SWIZZLE_YYZZ = gcmSWIZZLE(Y, Y, Z, Z),
+ gcSL_SWIZZLE_YYWW = gcmSWIZZLE(Y, Y, W, W),
+ gcSL_SWIZZLE_ZZZW = gcmSWIZZLE(Z, Z, Z, W),
+ gcSL_SWIZZLE_XZZW = gcmSWIZZLE(X, Z, Z, W),
+ gcSL_SWIZZLE_YYZW = gcmSWIZZLE(Y, Y, Z, W),
+
+ gcSL_SWIZZLE_INVALID = 0x7FFFFFFF
+}
+gcSL_SWIZZLE;
+
+typedef enum _gcSL_COMPONENT
+{
+ gcSL_COMPONENT_X, /* 0x0 */
+ gcSL_COMPONENT_Y, /* 0x1 */
+ gcSL_COMPONENT_Z, /* 0x2 */
+ gcSL_COMPONENT_W, /* 0x3 */
+ gcSL_COMPONENT_COUNT /* 0x4 */
+} gcSL_COMPONENT;
+
+#define gcmIsComponentEnabled(Enable, Component) (((Enable) & (1 << (Component))) != 0)
+
+/******************************************************************************\
+|*********************************** SHADERS **********************************|
+\******************************************************************************/
+
+/* Shader types. */
+typedef enum _gcSHADER_KIND {
+ gcSHADER_TYPE_UNKNOWN = 0,
+ gcSHADER_TYPE_VERTEX,
+ gcSHADER_TYPE_FRAGMENT,
+ gcSHADER_TYPE_CL,
+ gcSHADER_TYPE_PRECOMPILED,
+ gcSHADER_KIND_COUNT
+} gcSHADER_KIND;
+
+typedef enum _gcGL_DRIVER_VERSION {
+ gcGL_DRIVER_ES11, /* OpenGL ES 1.1 */
+ gcGL_DRIVER_ES20, /* OpenGL ES 2.0 */
+ gcGL_DRIVER_ES30 /* OpenGL ES 3.0 */
+} gcGL_DRIVER_VERSION;
+
+#define gcm
+/* gcSHADER objects. */
+typedef struct _gcSHADER * gcSHADER;
+typedef struct _gcATTRIBUTE * gcATTRIBUTE;
+typedef struct _gcUNIFORM * gcUNIFORM;
+typedef struct _gcOUTPUT * gcOUTPUT;
+typedef struct _gcsFUNCTION * gcFUNCTION;
+typedef struct _gcsKERNEL_FUNCTION * gcKERNEL_FUNCTION;
+typedef struct _gcsHINT * gcsHINT_PTR;
+typedef struct _gcSHADER_PROFILER * gcSHADER_PROFILER;
+typedef struct _gcVARIABLE * gcVARIABLE;
+
+struct _gcsHINT
+{
+ /* Numbr of data transfers for Vertex Shader output. */
+ gctUINT32 vsOutputCount;
+
+ /* Flag whether the VS has point size or not. */
+ gctBOOL vsHasPointSize;
+
+ /* Element count. */
+ gctUINT32 elementCount;
+
+ /* Component count. */
+ gctUINT32 componentCount;
+
+ /* Number of data transfers for Fragment Shader input. */
+ gctUINT32 fsInputCount;
+
+ /* Maximum number of temporary registers used in FS. */
+ gctUINT32 fsMaxTemp;
+
+ /* Maximum number of temporary registers used in VS. */
+ gctUINT32 vsMaxTemp;
+
+ /* Balance minimum. */
+ gctUINT32 balanceMin;
+
+ /* Balance maximum. */
+ gctUINT32 balanceMax;
+
+ /* Flag whether the PS outputs the depth value or not. */
+ gctBOOL psHasFragDepthOut;
+
+ /* Flag whether the ThreadWalker is in PS. */
+ gctBOOL threadWalkerInPS;
+
+};
+
+/* gcSHADER_TYPE enumeration. */
+typedef enum _gcSHADER_TYPE
+{
+ gcSHADER_FLOAT_X1, /* 0x00 */
+ gcSHADER_FLOAT_X2, /* 0x01 */
+ gcSHADER_FLOAT_X3, /* 0x02 */
+ gcSHADER_FLOAT_X4, /* 0x03 */
+ gcSHADER_FLOAT_2X2, /* 0x04 */
+ gcSHADER_FLOAT_3X3, /* 0x05 */
+ gcSHADER_FLOAT_4X4, /* 0x06 */
+ gcSHADER_BOOLEAN_X1, /* 0x07 */
+ gcSHADER_BOOLEAN_X2, /* 0x08 */
+ gcSHADER_BOOLEAN_X3, /* 0x09 */
+ gcSHADER_BOOLEAN_X4, /* 0x0A */
+ gcSHADER_INTEGER_X1, /* 0x0B */
+ gcSHADER_INTEGER_X2, /* 0x0C */
+ gcSHADER_INTEGER_X3, /* 0x0D */
+ gcSHADER_INTEGER_X4, /* 0x0E */
+ gcSHADER_SAMPLER_1D, /* 0x0F */
+ gcSHADER_SAMPLER_2D, /* 0x10 */
+ gcSHADER_SAMPLER_3D, /* 0x11 */
+ gcSHADER_SAMPLER_CUBIC, /* 0x12 */
+ gcSHADER_FIXED_X1, /* 0x13 */
+ gcSHADER_FIXED_X2, /* 0x14 */
+ gcSHADER_FIXED_X3, /* 0x15 */
+ gcSHADER_FIXED_X4, /* 0x16 */
+ gcSHADER_IMAGE_2D, /* 0x17 */ /* For OCL. */
+ gcSHADER_IMAGE_3D, /* 0x18 */ /* For OCL. */
+ gcSHADER_SAMPLER, /* 0x19 */ /* For OCL. */
+ gcSHADER_FLOAT_2X3, /* 0x1A */
+ gcSHADER_FLOAT_2X4, /* 0x1B */
+ gcSHADER_FLOAT_3X2, /* 0x1C */
+ gcSHADER_FLOAT_3X4, /* 0x1D */
+ gcSHADER_FLOAT_4X2, /* 0x1E */
+ gcSHADER_FLOAT_4X3, /* 0x1F */
+ gcSHADER_ISAMPLER_2D, /* 0x20 */
+ gcSHADER_ISAMPLER_3D, /* 0x21 */
+ gcSHADER_ISAMPLER_CUBIC, /* 0x22 */
+ gcSHADER_USAMPLER_2D, /* 0x23 */
+ gcSHADER_USAMPLER_3D, /* 0x24 */
+ gcSHADER_USAMPLER_CUBIC, /* 0x25 */
+ gcSHADER_SAMPLER_EXTERNAL_OES, /* 0x26 */
+ gcSHADER_TYPE_COUNT
+}
+gcSHADER_TYPE;
+
+typedef enum _gcSHADER_VAR_CATEGORY
+{
+ gcSHADER_VAR_CATEGORY_NORMAL = 0, /* primitive type and its array */
+ gcSHADER_VAR_CATEGORY_STRUCT = 1 /* structure */
+}
+gcSHADER_VAR_CATEGORY;
+
+#if GC_ENABLE_LOADTIME_OPT
+
+typedef struct _gcSHADER_TYPE_INFO
+{
+ gcSHADER_TYPE type; /* eg. gcSHADER_FLOAT_2X3 is the type */
+ gctCONST_STRING name; /* the name of the type: "gcSHADER_FLOAT_2X3" */
+ gcSHADER_TYPE baseType; /* its base type is gcSHADER_FLOAT_2 */
+ gctINT components; /* it has 2 components */
+ gctINT rows; /* and 3 rows */
+ gctINT size; /* the size in byte */
+} gcSHADER_TYPE_INFO;
+
+enum gceLTCDumpOption {
+ gceLTC_DUMP_UNIFORM = 0x0001,
+ gceLTC_DUMP_EVALUATION = 0x0002,
+ gceLTC_DUMP_EXPESSION = 0x0004,
+ gceLTC_DUMP_COLLECTING = 0x0008,
+};
+
+gctBOOL gcDumpOption(gctINT Opt);
+
+extern gcSHADER_TYPE_INFO shader_type_info[];
+
+#endif /* GC_ENABLE_LOADTIME_OPT */
+
+
+#define IS_MATRIX_TYPE(type) \
+ (((type >= gcSHADER_FLOAT_2X2) && (type <= gcSHADER_FLOAT_4X4)) || \
+ ((type >= gcSHADER_FLOAT_2X3) && (type <= gcSHADER_FLOAT_4X3)))
+
+/* gcSHADER_PRECISION enumeration. */
+typedef enum _gcSHADER_PRECISION
+{
+ gcSHADER_PRECISION_DEFAULT, /* 0x00 */
+ gcSHADER_PRECISION_HIGH, /* 0x01 */
+ gcSHADER_PRECISION_MEDIUM, /* 0x02 */
+ gcSHADER_PRECISION_LOW, /* 0x03 */
+}
+gcSHADER_PRECISION;
+
+/* Shader flags. */
+typedef enum _gceSHADER_FLAGS
+{
+ gcvSHADER_NO_OPTIMIZATION = 0x00,
+ gcvSHADER_DEAD_CODE = 0x01,
+ gcvSHADER_RESOURCE_USAGE = 0x02,
+ gcvSHADER_OPTIMIZER = 0x04,
+ gcvSHADER_USE_GL_Z = 0x08,
+ /*
+ The GC family of GPU cores model GC860 and under require the Z
+ to be from 0 <= z <= w.
+ However, OpenGL specifies the Z to be from -w <= z <= w. So we
+ have to a conversion here:
+
+ z = (z + w) / 2.
+
+ So here we append two instructions to the vertex shader.
+ */
+ gcvSHADER_USE_GL_POSITION = 0x10,
+ gcvSHADER_USE_GL_FACE = 0x20,
+ gcvSHADER_USE_GL_POINT_COORD = 0x40,
+ gcvSHADER_LOADTIME_OPTIMIZER = 0x80,
+}
+gceSHADER_FLAGS;
+
+/* Function argument qualifier */
+typedef enum _gceINPUT_OUTPUT
+{
+ gcvFUNCTION_INPUT,
+ gcvFUNCTION_OUTPUT,
+ gcvFUNCTION_INOUT
+}
+gceINPUT_OUTPUT;
+
+/* Kernel function property flags. */
+typedef enum _gcePROPERTY_FLAGS
+{
+ gcvPROPERTY_REQD_WORK_GRP_SIZE = 0x01
+}
+gceKERNEL_FUNCTION_PROPERTY_FLAGS;
+
+/* Uniform flags. */
+typedef enum _gceUNIFORM_FLAGS
+{
+ gcvUNIFORM_KERNEL_ARG = 0x01,
+ gcvUNIFORM_KERNEL_ARG_LOCAL = 0x02,
+ gcvUNIFORM_KERNEL_ARG_SAMPLER = 0x04,
+ gcvUNIFORM_LOCAL_ADDRESS_SPACE = 0x08,
+ gcvUNIFORM_PRIVATE_ADDRESS_SPACE = 0x10,
+ gcvUNIFORM_CONSTANT_ADDRESS_SPACE = 0x20,
+ gcvUNIFORM_GLOBAL_SIZE = 0x40,
+ gcvUNIFORM_LOCAL_SIZE = 0x80,
+ gcvUNIFORM_NUM_GROUPS = 0x100,
+ gcvUNIFORM_GLOBAL_OFFSET = 0x200,
+ gcvUNIFORM_WORK_DIM = 0x400,
+ gcvUNIFORM_KERNEL_ARG_CONSTANT = 0x800,
+ gcvUNIFORM_KERNEL_ARG_LOCAL_MEM_SIZE = 0x1000,
+ gcvUNIFORM_KERNEL_ARG_PRIVATE = 0x2000,
+ gcvUNIFORM_LOADTIME_CONSTANT = 0x4000,
+}
+gceUNIFORM_FLAGS;
+
+#define gcdUNIFORM_KERNEL_ARG_MASK (gcvUNIFORM_KERNEL_ARG | \
+ gcvUNIFORM_KERNEL_ARG_LOCAL | \
+ gcvUNIFORM_KERNEL_ARG_SAMPLER | \
+ gcvUNIFORM_KERNEL_ARG_PRIVATE | \
+ gcvUNIFORM_KERNEL_ARG_CONSTANT)
+
+typedef enum _gceVARIABLE_UPDATE_FLAGS
+{
+ gceVARIABLE_UPDATE_NOUPDATE = 0,
+ gceVARIABLE_UPDATE_TEMPREG,
+}gceVARIABLE_UPDATE_FLAGS;
+
+/*******************************************************************************
+** gcSHADER_SetCompilerVersion
+**
+** Set the compiler version of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to gcSHADER object
+**
+** gctINT *Version
+** Pointer to a two word version
+*/
+gceSTATUS
+gcSHADER_SetCompilerVersion(
+ IN gcSHADER Shader,
+ IN gctUINT32 *Version
+ );
+
+/*******************************************************************************
+** gcSHADER_GetCompilerVersion
+**
+** Get the compiler version of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR *CompilerVersion.
+** Pointer to holder of returned compilerVersion pointer
+*/
+gceSTATUS
+gcSHADER_GetCompilerVersion(
+ IN gcSHADER Shader,
+ OUT gctUINT32_PTR *CompilerVersion
+ );
+
+/*******************************************************************************
+** gcSHADER_GetType
+**
+** Get the gcSHADER object's type.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctINT *Type.
+** Pointer to return shader type.
+*/
+gceSTATUS
+gcSHADER_GetType(
+ IN gcSHADER Shader,
+ OUT gctINT *Type
+ );
+/*******************************************************************************
+** gcSHADER_Construct
+********************************************************************************
+**
+** Construct a new gcSHADER object.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Type of gcSHADER object to cerate. 'ShaderType' can be one of the
+** following:
+**
+** gcSHADER_TYPE_VERTEX Vertex shader.
+** gcSHADER_TYPE_FRAGMENT Fragment shader.
+**
+** OUTPUT:
+**
+** gcSHADER * Shader
+** Pointer to a variable receiving the gcSHADER object pointer.
+*/
+gceSTATUS
+gcSHADER_Construct(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ OUT gcSHADER * Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Destroy
+********************************************************************************
+**
+** Destroy a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Destroy(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Copy
+********************************************************************************
+**
+** Copy a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSHADER Source
+** Pointer to a gcSHADER object that will be copied.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Copy(
+ IN gcSHADER Shader,
+ IN gcSHADER Source
+ );
+
+/*******************************************************************************
+** gcSHADER_LoadHeader
+**
+** Load a gcSHADER object from a binary buffer. The binary buffer is layed out
+** as follows:
+** // Six word header
+** // Signature, must be 'S','H','D','R'.
+** gctINT8 signature[4];
+** gctUINT32 binFileVersion;
+** gctUINT32 compilerVersion[2];
+** gctUINT32 gcSLVersion;
+** gctUINT32 binarySize;
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+** Shader type will be returned if type in shader object is not gcSHADER_TYPE_PRECOMPILED
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containing the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+** nothing
+**
+*/
+gceSTATUS
+gcSHADER_LoadHeader(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize,
+ OUT gctUINT32 * ShaderVersion
+ );
+
+/*******************************************************************************
+** gcSHADER_LoadKernel
+**
+** Load a kernel function given by name into gcSHADER object
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSTRING KernelName
+** Pointer to a kernel function name
+**
+** OUTPUT:
+** nothing
+**
+*/
+gceSTATUS
+gcSHADER_LoadKernel(
+ IN gcSHADER Shader,
+ IN gctSTRING KernelName
+ );
+
+/*******************************************************************************
+** gcSHADER_Load
+********************************************************************************
+**
+** Load a gcSHADER object from a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containg the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Load(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_Save
+********************************************************************************
+**
+** Save a gcSHADER object to a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer to be used as storage for the gcSHADER
+** object. If 'Buffer' is gcvNULL, the gcSHADER object will not be saved,
+** but the number of bytes required to hold the binary output for the
+** gcSHADER object will be returned.
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable holding the number of bytes allocated in
+** 'Buffer'. Only valid if 'Buffer' is not gcvNULL.
+**
+** OUTPUT:
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable receiving the number of bytes required to hold
+** the binary form of the gcSHADER object.
+*/
+gceSTATUS
+gcSHADER_Save(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN OUT gctSIZE_T * BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_LoadEx
+********************************************************************************
+**
+** Load a gcSHADER object from a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containg the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_LoadEx(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_SaveEx
+********************************************************************************
+**
+** Save a gcSHADER object to a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer to be used as storage for the gcSHADER
+** object. If 'Buffer' is gcvNULL, the gcSHADER object will not be saved,
+** but the number of bytes required to hold the binary output for the
+** gcSHADER object will be returned.
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable holding the number of bytes allocated in
+** 'Buffer'. Only valid if 'Buffer' is not gcvNULL.
+**
+** OUTPUT:
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable receiving the number of bytes required to hold
+** the binary form of the gcSHADER object.
+*/
+gceSTATUS
+gcSHADER_SaveEx(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN OUT gctSIZE_T * BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateAttributes
+**
+** Reallocate an array of pointers to gcATTRIBUTE objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateAttributes(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddAttribute
+********************************************************************************
+**
+** Add an attribute to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the attribute to add.
+**
+** gcSHADER_TYPE Type
+** Type of the attribute to add.
+**
+** gctSIZE_T Length
+** Array length of the attribute to add. 'Length' must be at least 1.
+**
+** gctBOOL IsTexture
+** gcvTRUE if the attribute is used as a texture coordinate, gcvFALSE if not.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_AddAttribute(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctBOOL IsTexture,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttributeCount
+********************************************************************************
+**
+** Get the number of attributes for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of attributes.
+*/
+gceSTATUS
+gcSHADER_GetAttributeCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttribute
+********************************************************************************
+**
+** Get the gcATTRIBUTE object poniter for an indexed attribute for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the attribute to retrieve.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetAttribute(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateUniforms
+**
+** Reallocate an array of pointers to gcUNIFORM objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateUniforms(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddUniform
+********************************************************************************
+**
+** Add an uniform to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the uniform to add.
+**
+** gcSHADER_TYPE Type
+** Type of the uniform to add.
+**
+** gctSIZE_T Length
+** Array length of the uniform to add. 'Length' must be at least 1.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_AddUniform(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * Uniform
+ );
+
+
+/*******************************************************************************
+** gcSHADER_AddUniformEx
+********************************************************************************
+**
+** Add an uniform to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the uniform to add.
+**
+** gcSHADER_TYPE Type
+** Type of the uniform to add.
+**
+** gcSHADER_PRECISION precision
+** Precision of the uniform to add.
+**
+** gctSIZE_T Length
+** Array length of the uniform to add. 'Length' must be at least 1.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_AddUniformEx(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gcSHADER_PRECISION precision,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniformCount
+********************************************************************************
+**
+** Get the number of uniforms for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of uniforms.
+*/
+gceSTATUS
+gcSHADER_GetUniformCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniform
+********************************************************************************
+**
+** Get the gcUNIFORM object pointer for an indexed uniform for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the uniform to retrieve.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_GetUniform(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_GetKernelFucntion
+**
+** Get the gcKERNEL_FUNCTION object pointer for an indexed kernel function for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of kernel function to retreive the name for.
+**
+** OUTPUT:
+**
+** gcKERNEL_FUNCTION * KernelFunction
+** Pointer to a variable receiving the gcKERNEL_FUNCTION object pointer.
+*/
+gceSTATUS
+gcSHADER_GetKernelFunction(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcKERNEL_FUNCTION * KernelFunction
+ );
+
+gceSTATUS
+gcSHADER_GetKernelFunctionByName(
+ IN gcSHADER Shader,
+ IN gctSTRING KernelName,
+ OUT gcKERNEL_FUNCTION * KernelFunction
+ );
+/*******************************************************************************
+** gcSHADER_GetKernelFunctionCount
+**
+** Get the number of kernel functions for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of kernel functions.
+*/
+gceSTATUS
+gcSHADER_GetKernelFunctionCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateOutputs
+**
+** Reallocate an array of pointers to gcOUTPUT objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateOutputs(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOutput
+********************************************************************************
+**
+** Add an output to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the output to add.
+**
+** gcSHADER_TYPE Type
+** Type of the output to add.
+**
+** gctSIZE_T Length
+** Array length of the output to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the output value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOutput(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+gceSTATUS
+gcSHADER_AddOutputIndexed(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gctSIZE_T Index,
+ IN gctUINT16 TempIndex
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutputCount
+********************************************************************************
+**
+** Get the number of outputs for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of outputs.
+*/
+gceSTATUS
+gcSHADER_GetOutputCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutput
+********************************************************************************
+**
+** Get the gcOUTPUT object pointer for an indexed output for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of output to retrieve.
+**
+** OUTPUT:
+**
+** gcOUTPUT * Output
+** Pointer to a variable receiving the gcOUTPUT object pointer.
+*/
+gceSTATUS
+gcSHADER_GetOutput(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcOUTPUT * Output
+ );
+
+
+/*******************************************************************************
+** gcSHADER_GetOutputByName
+********************************************************************************
+**
+** Get the gcOUTPUT object pointer for this shader by output name.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSTRING name
+** Name of output to retrieve.
+**
+** gctSIZE_T nameLength
+** Length of name to retrieve
+**
+** OUTPUT:
+**
+** gcOUTPUT * Output
+** Pointer to a variable receiving the gcOUTPUT object pointer.
+*/
+gceSTATUS
+gcSHADER_GetOutputByName(
+ IN gcSHADER Shader,
+ IN gctSTRING name,
+ IN gctSIZE_T nameLength,
+ OUT gcOUTPUT * Output
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateVariables
+**
+** Reallocate an array of pointers to gcVARIABLE objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateVariables(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddVariable
+********************************************************************************
+**
+** Add a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the variable to add.
+**
+** gcSHADER_TYPE Type
+** Type of the variable to add.
+**
+** gctSIZE_T Length
+** Array length of the variable to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the variable value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddVariable(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+
+/*******************************************************************************
+** gcSHADER_AddVariableEx
+********************************************************************************
+**
+** Add a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the variable to add.
+**
+** gcSHADER_TYPE Type
+** Type of the variable to add.
+**
+** gctSIZE_T Length
+** Array length of the variable to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the variable value.
+**
+** gcSHADER_VAR_CATEGORY varCategory
+** Variable category, normal or struct.
+**
+** gctUINT16 numStructureElement
+** If struct, its element number.
+**
+** gctINT16 parent
+** If struct, parent index in gcSHADER.variables.
+**
+** gctINT16 preSibling
+** If struct, previous sibling index in gcSHADER.variables.
+**
+** gctINT16* ThisVarIndex
+** Returned value about variable index in gcSHADER.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddVariableEx(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister,
+ IN gcSHADER_VAR_CATEGORY varCategory,
+ IN gctUINT16 numStructureElement,
+ IN gctINT16 parent,
+ IN gctINT16 preSibling,
+ OUT gctINT16* ThisVarIndex
+ );
+
+/*******************************************************************************
+** gcSHADER_UpdateVariable
+********************************************************************************
+**
+** Update a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of variable to retrieve.
+**
+** gceVARIABLE_UPDATE_FLAGS flag
+** Flag which property of variable will be updated.
+**
+** gctUINT16 newValue
+** New value to update.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_UpdateVariable(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ IN gceVARIABLE_UPDATE_FLAGS flag,
+ IN gctUINT16 newValue
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariableCount
+********************************************************************************
+**
+** Get the number of variables for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of variables.
+*/
+gceSTATUS
+gcSHADER_GetVariableCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariable
+********************************************************************************
+**
+** Get the gcVARIABLE object pointer for an indexed variable for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of variable to retrieve.
+**
+** OUTPUT:
+**
+** gcVARIABLE * Variable
+** Pointer to a variable receiving the gcVARIABLE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetVariable(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcVARIABLE * Variable
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcode
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the target
+** of the opcode.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcode(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddOpcode2(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeIndexed
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object that writes to an dynamically indexed
+** target.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the
+** target of the opcode.
+**
+** gcSL_INDEXED Mode
+** Location of the dynamic index inside the temporary register. Valid
+** values can be:
+**
+** gcSL_INDEXED_X - Use x component of the temporary register.
+** gcSL_INDEXED_Y - Use y component of the temporary register.
+** gcSL_INDEXED_Z - Use z component of the temporary register.
+** gcSL_INDEXED_W - Use w component of the temporary register.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditionIndexed
+**
+** Add an opcode to a gcSHADER object that writes to an dynamically indexed
+** target.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition to check.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the
+** target of the opcode.
+**
+** gcSL_INDEXED Indexed
+** Location of the dynamic index inside the temporary register. Valid
+** values can be:
+**
+** gcSL_INDEXED_X - Use x component of the temporary register.
+** gcSL_INDEXED_Y - Use y component of the temporary register.
+** gcSL_INDEXED_Z - Use z component of the temporary register.
+** gcSL_INDEXED_W - Use w component of the temporary register.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditionIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_INDEXED Indexed,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditional
+********************************************************************************
+**
+** Add an conditional opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditional(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditionalFormatted
+**
+** Add an conditional jump or call opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gcSL_FORMAT Format
+** Format of conditional operands
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditionalFormatted(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gcSL_FORMAT Format,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditionalFormattedEnable
+**
+** Add an conditional jump or call opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gcSL_FORMAT Format
+** Format of conditional operands
+**
+** gctUINT8 Enable
+** Write enable value for the target of the opcode.
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditionalFormattedEnable(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gcSL_FORMAT Format,
+ IN gctUINT8 Enable,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddLabel
+********************************************************************************
+**
+** Define a label at the current instruction of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Label
+** Label to define.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddLabel(
+ IN gcSHADER Shader,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSource
+********************************************************************************
+**
+** Add a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSource(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceIndexed
+********************************************************************************
+**
+** Add a dynamically indexed source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_INDEXED Mode
+** Addressing mode for the index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttribute
+********************************************************************************
+**
+** Add an attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttribute(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttributeIndexed
+********************************************************************************
+**
+** Add an indexed attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttributeIndexed(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniform
+********************************************************************************
+**
+** Add a uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniform(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniformIndexed
+********************************************************************************
+**
+** Add an indexed uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniformIndexed(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+gceSTATUS
+gcSHADER_AddSourceSamplerIndexed(
+ IN gcSHADER Shader,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+gceSTATUS
+gcSHADER_AddSourceAttributeFormatted(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceAttributeIndexedFormatted(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceUniformFormatted(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceUniformIndexedFormatted(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceSamplerIndexedFormatted(
+ IN gcSHADER Shader,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceConstant
+********************************************************************************
+**
+** Add a constant floating point value as a source operand to a gcSHADER
+** object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctFLOAT Constant
+** Floating point constant.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceConstant(
+ IN gcSHADER Shader,
+ IN gctFLOAT Constant
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceConstantFormatted
+********************************************************************************
+**
+** Add a constant value as a source operand to a gcSHADER
+** object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** void * Constant
+** Pointer to constant.
+**
+** gcSL_FORMAT Format
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceConstantFormatted(
+ IN gcSHADER Shader,
+ IN void *Constant,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_Pack
+********************************************************************************
+**
+** Pack a dynamically created gcSHADER object by trimming the allocated arrays
+** and resolving all the labeling.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Pack(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_SetOptimizationOption
+********************************************************************************
+**
+** Set optimization option of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT OptimizationOption
+** Optimization option. Can be one of the following:
+**
+** 0 - No optimization.
+** 1 - Full optimization.
+** Other value - For optimizer testing.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_SetOptimizationOption(
+ IN gcSHADER Shader,
+ IN gctUINT OptimizationOption
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateFunctions
+**
+** Reallocate an array of pointers to gcFUNCTION objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateFunctions(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcSHADER_AddFunction(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ OUT gcFUNCTION * Function
+ );
+
+gceSTATUS
+gcSHADER_ReallocateKernelFunctions(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcSHADER_AddKernelFunction(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ OUT gcKERNEL_FUNCTION * KernelFunction
+ );
+
+gceSTATUS
+gcSHADER_BeginFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+gceSTATUS
+gcSHADER_EndFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+gceSTATUS
+gcSHADER_BeginKernelFunction(
+ IN gcSHADER Shader,
+ IN gcKERNEL_FUNCTION KernelFunction
+ );
+
+gceSTATUS
+gcSHADER_EndKernelFunction(
+ IN gcSHADER Shader,
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctSIZE_T LocalMemorySize
+ );
+
+gceSTATUS
+gcSHADER_SetMaxKernelFunctionArgs(
+ IN gcSHADER Shader,
+ IN gctUINT32 MaxKernelFunctionArgs
+ );
+
+/*******************************************************************************
+** gcSHADER_SetConstantMemorySize
+**
+** Set the constant memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T ConstantMemorySize
+** Constant memory size in bytes
+**
+** gctCHAR *ConstantMemoryBuffer
+** Constant memory buffer
+*/
+gceSTATUS
+gcSHADER_SetConstantMemorySize(
+ IN gcSHADER Shader,
+ IN gctSIZE_T ConstantMemorySize,
+ IN gctCHAR * ConstantMemoryBuffer
+ );
+
+/*******************************************************************************
+** gcSHADER_GetConstantMemorySize
+**
+** Set the constant memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * ConstantMemorySize
+** Pointer to a variable receiving constant memory size in bytes
+**
+** gctCHAR **ConstantMemoryBuffer.
+** Pointer to a variable for returned shader constant memory buffer.
+*/
+gceSTATUS
+gcSHADER_GetConstantMemorySize(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * ConstantMemorySize,
+ OUT gctCHAR ** ConstantMemoryBuffer
+ );
+
+/*******************************************************************************
+** gcSHADER_SetPrivateMemorySize
+**
+** Set the private memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T PrivateMemorySize
+** Private memory size in bytes
+*/
+gceSTATUS
+gcSHADER_SetPrivateMemorySize(
+ IN gcSHADER Shader,
+ IN gctSIZE_T PrivateMemorySize
+ );
+
+/*******************************************************************************
+** gcSHADER_GetPrivateMemorySize
+**
+** Set the private memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * PrivateMemorySize
+** Pointer to a variable receiving private memory size in bytes
+*/
+gceSTATUS
+gcSHADER_GetPrivateMemorySize(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * PrivateMemorySize
+ );
+
+/*******************************************************************************
+** gcSHADER_SetLocalMemorySize
+**
+** Set the local memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T LocalMemorySize
+** Local memory size in bytes
+*/
+gceSTATUS
+gcSHADER_SetLocalMemorySize(
+ IN gcSHADER Shader,
+ IN gctSIZE_T LocalMemorySize
+ );
+
+/*******************************************************************************
+** gcSHADER_GetLocalMemorySize
+**
+** Set the local memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * LocalMemorySize
+** Pointer to a variable receiving lcoal memory size in bytes
+*/
+gceSTATUS
+gcSHADER_GetLocalMemorySize(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * LocalMemorySize
+ );
+
+
+/*******************************************************************************
+** gcSHADER_CheckValidity
+**
+** Check validity for a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+*/
+gceSTATUS
+gcSHADER_CheckValidity(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the attribute. 'Type'
+** can be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** attribute was declared as an array. If the attribute was not
+** declared as an array, the array length will be 1. 'ArrayLength' can
+** be gcvNULL, in which case no array length will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetType(
+ IN gcATTRIBUTE Attribute,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_GetName
+********************************************************************************
+**
+** Get the name of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the attribute name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the attribute name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetName(
+ IN gcATTRIBUTE Attribute,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_IsEnabled
+********************************************************************************
+**
+** Query the enabled state of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctBOOL * Enabled
+** Pointer to a variable receiving the enabled state of the attribute.
+*/
+gceSTATUS
+gcATTRIBUTE_IsEnabled(
+ IN gcATTRIBUTE Attribute,
+ OUT gctBOOL * Enabled
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the uniform. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** uniform was declared as an array. If the uniform was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetType(
+ IN gcUNIFORM Uniform,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetTypeEx
+********************************************************************************
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the uniform. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gcSHADER_PRECISION * Precision
+** Pointer to a variable receiving the precision of the uniform. 'Precision' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** uniform was declared as an array. If the uniform was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetTypeEx(
+ IN gcUNIFORM Uniform,
+ OUT gcSHADER_TYPE * Type,
+ OUT gcSHADER_PRECISION * Precision,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetFlags
+********************************************************************************
+**
+** Get the flags of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gceUNIFORM_FLAGS * Flags
+** Pointer to a variable receiving the flags of the uniform.
+**
+*/
+gceSTATUS
+gcUNIFORM_GetFlags(
+ IN gcUNIFORM Uniform,
+ OUT gceUNIFORM_FLAGS * Flags
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetFlags
+********************************************************************************
+**
+** Set the flags of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gceUNIFORM_FLAGS Flags
+** Flags of the uniform to be set.
+**
+** OUTPUT:
+** Nothing.
+**
+*/
+gceSTATUS
+gcUNIFORM_SetFlags(
+ IN gcUNIFORM Uniform,
+ IN gceUNIFORM_FLAGS Flags
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetName
+********************************************************************************
+**
+** Get the name of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the uniform name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the uniform name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetName(
+ IN gcUNIFORM Uniform,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetSampler
+********************************************************************************
+**
+** Get the physical sampler number for a sampler gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctUINT32 * Sampler
+** Pointer to a variable receiving the physical sampler.
+*/
+gceSTATUS
+gcUNIFORM_GetSampler(
+ IN gcUNIFORM Uniform,
+ OUT gctUINT32 * Sampler
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetFormat
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSL_FORMAT * Format
+** Pointer to a variable receiving the format of element of the uniform.
+** 'Type' can be gcvNULL, in which case no type will be returned.
+**
+** gctBOOL * IsPointer
+** Pointer to a variable receiving the state wheter the uniform is a pointer.
+** 'IsPointer' can be gcvNULL, in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetFormat(
+ IN gcUNIFORM Uniform,
+ OUT gcSL_FORMAT * Format,
+ OUT gctBOOL * IsPointer
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetFormat
+**
+** Set the format and isPointer of a uniform.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gcSL_FORMAT Format
+** Format of element of the uniform shaderType.
+**
+** gctBOOL IsPointer
+** Wheter the uniform is a pointer.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetFormat(
+ IN gcUNIFORM Uniform,
+ IN gcSL_FORMAT Format,
+ IN gctBOOL IsPointer
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValue
+********************************************************************************
+**
+** Set the value of a uniform in integer.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctINT * Value
+** Pointer to a buffer holding the integer values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValue(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueX
+********************************************************************************
+**
+** Set the value of a uniform in fixed point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFIXED_POINT * Value
+** Pointer to a buffer holding the fixed point values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueX(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN gctFIXED_POINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueF
+********************************************************************************
+**
+** Set the value of a uniform in floating point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFLOAT * Value
+** Pointer to a buffer holding the floating point values for the
+** uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueF(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctFLOAT * Value
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the output. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** output was declared as an array. If the output was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetType(
+ IN gcOUTPUT Output,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetIndex
+********************************************************************************
+**
+** Get the index of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctUINT * Index
+** Pointer to a variable receiving the temporary register index of the
+** output. 'Index' can be gcvNULL,. in which case no index will be
+** returned.
+*/
+gceSTATUS
+gcOUTPUT_GetIndex(
+ IN gcOUTPUT Output,
+ OUT gctUINT * Index
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetName
+********************************************************************************
+**
+** Get the name of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the output name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the output name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetName(
+ IN gcOUTPUT Output,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+*********************************************************** F U N C T I O N S **
+*******************************************************************************/
+
+/*******************************************************************************
+** gcFUNCTION_ReallocateArguments
+**
+** Reallocate an array of gcsFUNCTION_ARGUMENT objects.
+**
+** INPUT:
+**
+** gcFUNCTION Function
+** Pointer to a gcFUNCTION object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcFUNCTION_ReallocateArguments(
+ IN gcFUNCTION Function,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcFUNCTION_AddArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 TempIndex,
+ IN gctUINT8 Enable,
+ IN gctUINT8 Qualifier
+ );
+
+gceSTATUS
+gcFUNCTION_GetArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 Index,
+ OUT gctUINT16_PTR Temp,
+ OUT gctUINT8_PTR Enable,
+ OUT gctUINT8_PTR Swizzle
+ );
+
+gceSTATUS
+gcFUNCTION_GetLabel(
+ IN gcFUNCTION Function,
+ OUT gctUINT_PTR Label
+ );
+
+/*******************************************************************************
+************************* K E R N E L P R O P E R T Y F U N C T I O N S **
+*******************************************************************************/
+/*******************************************************************************/
+gceSTATUS
+gcKERNEL_FUNCTION_AddKernelFunctionProperties(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctINT propertyType,
+ IN gctSIZE_T propertySize,
+ IN gctINT * values
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetPropertyCount(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetProperty(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT Index,
+ OUT gctSIZE_T * propertySize,
+ OUT gctINT * propertyType,
+ OUT gctINT * propertyValues
+ );
+
+
+/*******************************************************************************
+*******************************I M A G E S A M P L E R F U N C T I O N S **
+*******************************************************************************/
+/*******************************************************************************
+** gcKERNEL_FUNCTION_ReallocateImageSamplers
+**
+** Reallocate an array of pointers to image sampler pair.
+**
+** INPUT:
+**
+** gcKERNEL_FUNCTION KernelFunction
+** Pointer to a gcKERNEL_FUNCTION object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcKERNEL_FUNCTION_ReallocateImageSamplers(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_AddImageSampler(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT8 ImageNum,
+ IN gctBOOL IsConstantSamplerType,
+ IN gctUINT32 SamplerType
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetImageSamplerCount(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetImageSampler(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT Index,
+ OUT gctUINT8 *ImageNum,
+ OUT gctBOOL *IsConstantSamplerType,
+ OUT gctUINT32 *SamplerType
+ );
+
+/*******************************************************************************
+*********************************************K E R N E L F U N C T I O N S **
+*******************************************************************************/
+
+/*******************************************************************************
+** gcKERNEL_FUNCTION_ReallocateArguments
+**
+** Reallocate an array of gcsFUNCTION_ARGUMENT objects.
+**
+** INPUT:
+**
+** gcKERNEL_FUNCTION Function
+** Pointer to a gcKERNEL_FUNCTION object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcKERNEL_FUNCTION_ReallocateArguments(
+ IN gcKERNEL_FUNCTION Function,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_AddArgument(
+ IN gcKERNEL_FUNCTION Function,
+ IN gctUINT16 TempIndex,
+ IN gctUINT8 Enable,
+ IN gctUINT8 Qualifier
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetArgument(
+ IN gcKERNEL_FUNCTION Function,
+ IN gctUINT16 Index,
+ OUT gctUINT16_PTR Temp,
+ OUT gctUINT8_PTR Enable,
+ OUT gctUINT8_PTR Swizzle
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetLabel(
+ IN gcKERNEL_FUNCTION Function,
+ OUT gctUINT_PTR Label
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetName(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_ReallocateUniformArguments(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_AddUniformArgument(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * UniformArgument
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetUniformArgumentCount(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetUniformArgument(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT Index,
+ OUT gcUNIFORM * UniformArgument
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_SetCodeEnd(
+ IN gcKERNEL_FUNCTION KernelFunction
+ );
+
+/*******************************************************************************
+** gcCompileShader
+********************************************************************************
+**
+** Compile a shader.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Shader type to compile. Can be one of the following values:
+**
+** gcSHADER_TYPE_VERTEX
+** Compile a vertex shader.
+**
+** gcSHADER_TYPE_FRAGMENT
+** Compile a fragment shader.
+**
+** gctSIZE_T SourceSize
+** Size of the source buffer in bytes.
+**
+** gctCONST_STRING Source
+** Pointer to the buffer containing the shader source code.
+**
+** OUTPUT:
+**
+** gcSHADER * Binary
+** Pointer to a variable receiving the pointer to a gcSHADER object
+** containg the compiled shader code.
+**
+** gctSTRING * Log
+** Pointer to a variable receiving a string pointer containging the
+** compile log.
+*/
+gceSTATUS
+gcCompileShader(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ IN gctSIZE_T SourceSize,
+ IN gctCONST_STRING Source,
+ OUT gcSHADER * Binary,
+ OUT gctSTRING * Log
+ );
+
+/*******************************************************************************
+** gcOptimizeShader
+********************************************************************************
+**
+** Optimize a shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object holding information about the compiled
+** shader.
+**
+** gctFILE LogFile
+** Pointer to an open FILE object.
+*/
+gceSTATUS
+gcOptimizeShader(
+ IN gcSHADER Shader,
+ IN gctFILE LogFile
+ );
+
+/*******************************************************************************
+** gcLinkShaders
+********************************************************************************
+**
+** Link two shaders and generate a harwdare specific state buffer by compiling
+** the compiler generated code through the resource allocator and code
+** generator.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to a gcSHADER object holding information about the compiled
+** vertex shader.
+**
+** gcSHADER FragmentShader
+** Pointer to a gcSHADER object holding information about the compiled
+** fragment shader.
+**
+** gceSHADER_FLAGS Flags
+** Compiler flags. Can be any of the following:
+**
+** gcvSHADER_DEAD_CODE - Dead code elimination.
+** gcvSHADER_RESOURCE_USAGE - Resource usage optimizaion.
+** gcvSHADER_OPTIMIZER - Full optimization.
+** gcvSHADER_USE_GL_Z - Use OpenGL ES Z coordinate.
+** gcvSHADER_USE_GL_POSITION - Use OpenGL ES gl_Position.
+** gcvSHADER_USE_GL_FACE - Use OpenGL ES gl_FaceForward.
+**
+** OUTPUT:
+**
+** gctSIZE_T * StateBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'StateBuffer'.
+**
+** gctPOINTER * StateBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLinkShaders(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gceSHADER_FLAGS Flags,
+ OUT gctSIZE_T * StateBufferSize,
+ OUT gctPOINTER * StateBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+/*******************************************************************************
+** gcLoadShaders
+********************************************************************************
+**
+** Load a pre-compiled and pre-linked shader program into the hardware.
+**
+** INPUT:
+**
+** gcoHAL Hal
+** Pointer to a gcoHAL object.
+**
+** gctSIZE_T StateBufferSize
+** The number of bytes in the 'StateBuffer'.
+**
+** gctPOINTER StateBuffer
+** Pointer to the states that make up the shader program.
+**
+** gcsHINT_PTR Hints
+** Pointer to a gcsHINT structure that contains information required
+** when loading the shader states.
+*/
+gceSTATUS
+gcLoadShaders(
+ IN gcoHAL Hal,
+ IN gctSIZE_T StateBufferSize,
+ IN gctPOINTER StateBuffer,
+ IN gcsHINT_PTR Hints
+ );
+
+/*******************************************************************************
+** gcSaveProgram
+********************************************************************************
+**
+** Save pre-compiled shaders and pre-linked programs to a binary file.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to vertex shader object.
+**
+** gcSHADER FragmentShader
+** Pointer to fragment shader object.
+**
+** gctSIZE_T ProgramBufferSize
+** Number of bytes in 'ProgramBuffer'.
+**
+** gctPOINTER ProgramBuffer
+** Pointer to buffer containing the program states.
+**
+** gcsHINT_PTR Hints
+** Pointer to HINTS structure for program states.
+**
+** OUTPUT:
+**
+** gctPOINTER * Binary
+** Pointer to a variable receiving the binary data to be saved.
+**
+** gctSIZE_T * BinarySize
+** Pointer to a variable receiving the number of bytes inside 'Binary'.
+*/
+gceSTATUS
+gcSaveProgram(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gctSIZE_T ProgramBufferSize,
+ IN gctPOINTER ProgramBuffer,
+ IN gcsHINT_PTR Hints,
+ OUT gctPOINTER * Binary,
+ OUT gctSIZE_T * BinarySize
+ );
+
+/*******************************************************************************
+** gcLoadProgram
+********************************************************************************
+**
+** Load pre-compiled shaders and pre-linked programs from a binary file.
+**
+** INPUT:
+**
+** gctPOINTER Binary
+** Pointer to the binary data loaded.
+**
+** gctSIZE_T BinarySize
+** Number of bytes in 'Binary'.
+**
+** OUTPUT:
+**
+** gcSHADER VertexShader
+** Pointer to a vertex shader object.
+**
+** gcSHADER FragmentShader
+** Pointer to a fragment shader object.
+**
+** gctSIZE_T * ProgramBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'ProgramBuffer'.
+**
+** gctPOINTER * ProgramBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLoadProgram(
+ IN gctPOINTER Binary,
+ IN gctSIZE_T BinarySize,
+ OUT gcSHADER VertexShader,
+ OUT gcSHADER FragmentShader,
+ OUT gctSIZE_T * ProgramBufferSize,
+ OUT gctPOINTER * ProgramBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+/*******************************************************************************
+** gcCompileKernel
+********************************************************************************
+**
+** Compile a OpenCL kernel shader.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctSIZE_T SourceSize
+** Size of the source buffer in bytes.
+**
+** gctCONST_STRING Source
+** Pointer to the buffer containing the shader source code.
+**
+** OUTPUT:
+**
+** gcSHADER * Binary
+** Pointer to a variable receiving the pointer to a gcSHADER object
+** containg the compiled shader code.
+**
+** gctSTRING * Log
+** Pointer to a variable receiving a string pointer containging the
+** compile log.
+*/
+gceSTATUS
+gcCompileKernel(
+ IN gcoHAL Hal,
+ IN gctSIZE_T SourceSize,
+ IN gctCONST_STRING Source,
+ IN gctCONST_STRING Options,
+ OUT gcSHADER * Binary,
+ OUT gctSTRING * Log
+ );
+
+/*******************************************************************************
+** gcLinkKernel
+********************************************************************************
+**
+** Link OpenCL kernel and generate a harwdare specific state buffer by compiling
+** the compiler generated code through the resource allocator and code
+** generator.
+**
+** INPUT:
+**
+** gcSHADER Kernel
+** Pointer to a gcSHADER object holding information about the compiled
+** OpenCL kernel.
+**
+** gceSHADER_FLAGS Flags
+** Compiler flags. Can be any of the following:
+**
+** gcvSHADER_DEAD_CODE - Dead code elimination.
+** gcvSHADER_RESOURCE_USAGE - Resource usage optimizaion.
+** gcvSHADER_OPTIMIZER - Full optimization.
+** gcvSHADER_USE_GL_Z - Use OpenGL ES Z coordinate.
+** gcvSHADER_USE_GL_POSITION - Use OpenGL ES gl_Position.
+** gcvSHADER_USE_GL_FACE - Use OpenGL ES gl_FaceForward.
+**
+** OUTPUT:
+**
+** gctSIZE_T * StateBufferSize
+** Pointer to a variable receiving the number of bytes in the buffer
+** returned in 'StateBuffer'.
+**
+** gctPOINTER * StateBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLinkKernel(
+ IN gcSHADER Kernel,
+ IN gceSHADER_FLAGS Flags,
+ OUT gctSIZE_T * StateBufferSize,
+ OUT gctPOINTER * StateBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+/*******************************************************************************
+** gcLoadKernel
+********************************************************************************
+**
+** Load a pre-compiled and pre-linked kernel program into the hardware.
+**
+** INPUT:
+**
+** gctSIZE_T StateBufferSize
+** The number of bytes in the 'StateBuffer'.
+**
+** gctPOINTER StateBuffer
+** Pointer to the states that make up the shader program.
+**
+** gcsHINT_PTR Hints
+** Pointer to a gcsHINT structure that contains information required
+** when loading the shader states.
+*/
+gceSTATUS
+gcLoadKernel(
+ IN gctSIZE_T StateBufferSize,
+ IN gctPOINTER StateBuffer,
+ IN gcsHINT_PTR Hints
+ );
+
+gceSTATUS
+gcInvokeThreadWalker(
+ IN gcsTHREAD_WALKER_INFO_PTR Info
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VIVANTE_NO_3D */
+#endif /* __gc_hal_compiler_h_ */
diff --git a/src/include_imx6/gc_hal_driver.h b/src/include_imx6/gc_hal_driver.h
new file mode 100644
index 0000000..7c9d163
--- /dev/null
+++ b/src/include_imx6/gc_hal_driver.h
@@ -0,0 +1,901 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_driver_h_
+#define __gc_hal_driver_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#if gcdENABLE_VG
+#include "gc_hal_driver_vg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* I/O Control Codes ******************************
+\******************************************************************************/
+
+#define gcvHAL_CLASS "galcore"
+#define IOCTL_GCHAL_INTERFACE 30000
+#define IOCTL_GCHAL_KERNEL_INTERFACE 30001
+#define IOCTL_GCHAL_TERMINATE 30002
+
+/******************************************************************************\
+********************************* Command Codes ********************************
+\******************************************************************************/
+
+typedef enum _gceHAL_COMMAND_CODES
+{
+ /* Generic query. */
+ gcvHAL_QUERY_VIDEO_MEMORY,
+ gcvHAL_QUERY_CHIP_IDENTITY,
+
+ /* Contiguous memory. */
+ gcvHAL_ALLOCATE_NON_PAGED_MEMORY,
+ gcvHAL_FREE_NON_PAGED_MEMORY,
+ gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY,
+ gcvHAL_FREE_CONTIGUOUS_MEMORY,
+
+ /* Video memory allocation. */
+ gcvHAL_ALLOCATE_VIDEO_MEMORY, /* Enforced alignment. */
+ gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY, /* No alignment. */
+ gcvHAL_FREE_VIDEO_MEMORY,
+
+ /* Physical-to-logical mapping. */
+ gcvHAL_MAP_MEMORY,
+ gcvHAL_UNMAP_MEMORY,
+
+ /* Logical-to-physical mapping. */
+ gcvHAL_MAP_USER_MEMORY,
+ gcvHAL_UNMAP_USER_MEMORY,
+
+ /* Surface lock/unlock. */
+ gcvHAL_LOCK_VIDEO_MEMORY,
+ gcvHAL_UNLOCK_VIDEO_MEMORY,
+
+ /* Event queue. */
+ gcvHAL_EVENT_COMMIT,
+
+ gcvHAL_USER_SIGNAL,
+ gcvHAL_SIGNAL,
+ gcvHAL_WRITE_DATA,
+
+ gcvHAL_COMMIT,
+ gcvHAL_STALL,
+
+ gcvHAL_READ_REGISTER,
+ gcvHAL_WRITE_REGISTER,
+
+ gcvHAL_GET_PROFILE_SETTING,
+ gcvHAL_SET_PROFILE_SETTING,
+
+ gcvHAL_READ_ALL_PROFILE_REGISTERS,
+ gcvHAL_PROFILE_REGISTERS_2D,
+
+ /* Power management. */
+ gcvHAL_SET_POWER_MANAGEMENT_STATE,
+ gcvHAL_QUERY_POWER_MANAGEMENT_STATE,
+
+ gcvHAL_GET_BASE_ADDRESS,
+
+ gcvHAL_SET_IDLE, /* reserved */
+
+ /* Queries. */
+ gcvHAL_QUERY_KERNEL_SETTINGS,
+
+ /* Reset. */
+ gcvHAL_RESET,
+
+ /* Map physical address into handle. */
+ gcvHAL_MAP_PHYSICAL,
+
+ /* Debugger stuff. */
+ gcvHAL_DEBUG,
+
+ /* Cache stuff. */
+ gcvHAL_CACHE,
+
+ /* TimeStamp */
+ gcvHAL_TIMESTAMP,
+
+ /* Database. */
+ gcvHAL_DATABASE,
+
+ /* Version. */
+ gcvHAL_VERSION,
+
+ /* Chip info */
+ gcvHAL_CHIP_INFO,
+
+ /* Process attaching/detaching. */
+ gcvHAL_ATTACH,
+ gcvHAL_DETACH,
+
+ /* Composition. */
+ gcvHAL_COMPOSE,
+
+ /* Set timeOut value */
+ gcvHAL_SET_TIMEOUT,
+
+ /* Frame database. */
+ gcvHAL_GET_FRAME_INFO,
+
+ /* Shared info for each process */
+ gcvHAL_GET_SHARED_INFO,
+ gcvHAL_SET_SHARED_INFO,
+ gcvHAL_QUERY_COMMAND_BUFFER,
+
+ gcvHAL_COMMIT_DONE,
+
+ /* GPU and event dump */
+ gcvHAL_DUMP_GPU_STATE,
+ gcvHAL_DUMP_EVENT
+}
+gceHAL_COMMAND_CODES;
+
+/******************************************************************************\
+****************************** Interface Structure *****************************
+\******************************************************************************/
+
+#define gcdMAX_PROFILE_FILE_NAME 128
+
+/* Kernel settings. */
+typedef struct _gcsKERNEL_SETTINGS
+{
+ /* Used RealTime signal between kernel and user. */
+ gctINT signal;
+}
+gcsKERNEL_SETTINGS;
+
+
+/* gcvHAL_QUERY_CHIP_IDENTITY */
+typedef struct _gcsHAL_QUERY_CHIP_IDENTITY * gcsHAL_QUERY_CHIP_IDENTITY_PTR;
+typedef struct _gcsHAL_QUERY_CHIP_IDENTITY
+{
+
+ /* Chip model. */
+ gceCHIPMODEL chipModel;
+
+ /* Revision value.*/
+ gctUINT32 chipRevision;
+
+ /* Supported feature fields. */
+ gctUINT32 chipFeatures;
+
+ /* Supported minor feature fields. */
+ gctUINT32 chipMinorFeatures;
+
+ /* Supported minor feature 1 fields. */
+ gctUINT32 chipMinorFeatures1;
+
+ /* Supported minor feature 2 fields. */
+ gctUINT32 chipMinorFeatures2;
+
+ /* Supported minor feature 3 fields. */
+ gctUINT32 chipMinorFeatures3;
+
+ /* Number of streams supported. */
+ gctUINT32 streamCount;
+
+ /* Total number of temporary registers per thread. */
+ gctUINT32 registerMax;
+
+ /* Maximum number of threads. */
+ gctUINT32 threadCount;
+
+ /* Number of shader cores. */
+ gctUINT32 shaderCoreCount;
+
+ /* Size of the vertex cache. */
+ gctUINT32 vertexCacheSize;
+
+ /* Number of entries in the vertex output buffer. */
+ gctUINT32 vertexOutputBufferSize;
+
+ /* Number of pixel pipes. */
+ gctUINT32 pixelPipes;
+
+ /* Number of instructions. */
+ gctUINT32 instructionCount;
+
+ /* Number of constants. */
+ gctUINT32 numConstants;
+
+ /* Buffer size */
+ gctUINT32 bufferSize;
+
+}
+gcsHAL_QUERY_CHIP_IDENTITY;
+
+/* gcvHAL_COMPOSE. */
+typedef struct _gcsHAL_COMPOSE * gcsHAL_COMPOSE_PTR;
+typedef struct _gcsHAL_COMPOSE
+{
+ /* Composition state buffer. */
+ gctPHYS_ADDR physical;
+ gctPOINTER logical;
+ gctSIZE_T offset;
+ gctSIZE_T size;
+
+ /* Composition end signal. */
+ gctHANDLE process;
+ gctSIGNAL signal;
+
+ /* User signals. */
+ gctHANDLE userProcess;
+ gctSIGNAL userSignal1;
+ gctSIGNAL userSignal2;
+
+#if defined(__QNXNTO__)
+ /* Client pulse side-channel connection ID. */
+ gctINT32 coid;
+
+ /* Set by server. */
+ gctINT32 rcvid;
+#endif
+}
+gcsHAL_COMPOSE;
+
+typedef struct _gcsHAL_INTERFACE
+{
+ /* Command code. */
+ gceHAL_COMMAND_CODES command;
+
+ /* Hardware type. */
+ gceHARDWARE_TYPE hardwareType;
+
+ /* Status value. */
+ gceSTATUS status;
+
+ /* Handle to this interface channel. */
+ gctHANDLE handle;
+
+ /* Pid of the client. */
+ gctUINT32 pid;
+
+ /* Union of command structures. */
+ union _u
+ {
+ /* gcvHAL_GET_BASE_ADDRESS */
+ struct _gcsHAL_GET_BASE_ADDRESS
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctUINT32 baseAddress;
+ }
+ GetBaseAddress;
+
+ /* gcvHAL_QUERY_VIDEO_MEMORY */
+ struct _gcsHAL_QUERY_VIDEO_MEMORY
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctPHYS_ADDR internalPhysical;
+
+ /* Size in bytes of internal memory.*/
+ OUT gctSIZE_T internalSize;
+
+ /* Physical memory address of external memory. */
+ OUT gctPHYS_ADDR externalPhysical;
+
+ /* Size in bytes of external memory.*/
+ OUT gctSIZE_T externalSize;
+
+ /* Physical memory address of contiguous memory. */
+ OUT gctPHYS_ADDR contiguousPhysical;
+
+ /* Size in bytes of contiguous memory.*/
+ OUT gctSIZE_T contiguousSize;
+ }
+ QueryVideoMemory;
+
+ /* gcvHAL_QUERY_CHIP_IDENTITY */
+ gcsHAL_QUERY_CHIP_IDENTITY QueryChipIdentity;
+
+ /* gcvHAL_MAP_MEMORY */
+ struct _gcsHAL_MAP_MEMORY
+ {
+ /* Physical memory address to map. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to map. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory. */
+ OUT gctPOINTER logical;
+ }
+ MapMemory;
+
+ /* gcvHAL_UNMAP_MEMORY */
+ struct _gcsHAL_UNMAP_MEMORY
+ {
+ /* Physical memory address to unmap. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to unmap. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory to unmap. */
+ IN gctPOINTER logical;
+ }
+ UnmapMemory;
+
+ /* gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_LINEAR_VIDEO_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctUINT bytes;
+
+ /* Buffer alignment. */
+ IN gctUINT alignment;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateLinearVideoMemory;
+
+ /* gcvHAL_ALLOCATE_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_VIDEO_MEMORY
+ {
+ /* Width of rectangle to allocate. */
+ IN OUT gctUINT width;
+
+ /* Height of rectangle to allocate. */
+ IN OUT gctUINT height;
+
+ /* Depth of rectangle to allocate. */
+ IN gctUINT depth;
+
+ /* Format rectangle to allocate in gceSURF_FORMAT. */
+ IN gceSURF_FORMAT format;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateVideoMemory;
+
+ /* gcvHAL_FREE_VIDEO_MEMORY */
+ struct _gcsHAL_FREE_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+#ifdef __QNXNTO__
+/* TODO: This is part of the unlock - why is it here? */
+ /* Mapped logical address to unmap in user space. */
+ OUT gctPOINTER memory;
+
+ /* Number of bytes to allocated. */
+ OUT gctSIZE_T bytes;
+#endif
+ }
+ FreeVideoMemory;
+
+ /* gcvHAL_LOCK_VIDEO_MEMORY */
+ struct _gcsHAL_LOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Cache configuration. */
+ /* Only gcvPOOL_CONTIGUOUS and gcvPOOL_VIRUTAL
+ ** can be configured */
+ IN gctBOOL cacheable;
+
+ /* Hardware specific address. */
+ OUT gctUINT32 address;
+
+ /* Mapped logical address. */
+ OUT gctPOINTER memory;
+ }
+ LockVideoMemory;
+
+ /* gcvHAL_UNLOCK_VIDEO_MEMORY */
+ struct _gcsHAL_UNLOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Type of surface. */
+ IN gceSURF_TYPE type;
+
+ /* Flag to unlock surface asynchroneously. */
+ IN OUT gctBOOL asynchroneous;
+ }
+ UnlockVideoMemory;
+
+ /* gcvHAL_ALLOCATE_NON_PAGED_MEMORY */
+ struct _gcsHAL_ALLOCATE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT gctPOINTER logical;
+ }
+ AllocateNonPagedMemory;
+
+ /* gcvHAL_FREE_NON_PAGED_MEMORY */
+ struct _gcsHAL_FREE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+ }
+ FreeNonPagedMemory;
+
+ /* gcvHAL_EVENT_COMMIT. */
+ struct _gcsHAL_EVENT_COMMIT
+ {
+ /* Event queue. */
+ IN gcsQUEUE_PTR queue;
+ }
+ Event;
+
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_COMMIT
+ {
+ /* Context buffer object. */
+ IN gckCONTEXT context;
+
+ /* Command buffer. */
+ IN gcoCMDBUF commandBuffer;
+
+ /* State delta buffer. */
+ gcsSTATE_DELTA_PTR delta;
+
+ /* Event queue. */
+ IN gcsQUEUE_PTR queue;
+ }
+ Commit;
+
+ /* gcvHAL_MAP_USER_MEMORY */
+ struct _gcsHAL_MAP_USER_MEMORY
+ {
+ /* Base address of user memory to map. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to map. */
+ IN gctSIZE_T size;
+
+ /* Info record required by gcvHAL_UNMAP_USER_MEMORY. */
+ OUT gctPOINTER info;
+
+ /* Physical address of mapped memory. */
+ OUT gctUINT32 address;
+ }
+ MapUserMemory;
+
+ /* gcvHAL_UNMAP_USER_MEMORY */
+ struct _gcsHAL_UNMAP_USER_MEMORY
+ {
+ /* Base address of user memory to unmap. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to unmap. */
+ IN gctSIZE_T size;
+
+ /* Info record returned by gcvHAL_MAP_USER_MEMORY. */
+ IN gctPOINTER info;
+
+ /* Physical address of mapped memory as returned by
+ gcvHAL_MAP_USER_MEMORY. */
+ IN gctUINT32 address;
+ }
+ UnmapUserMemory;
+#if !USE_NEW_LINUX_SIGNAL
+ /* gcsHAL_USER_SIGNAL */
+ struct _gcsHAL_USER_SIGNAL
+ {
+ /* Command. */
+ gceUSER_SIGNAL_COMMAND_CODES command;
+
+ /* Signal ID. */
+ IN OUT gctINT id;
+
+ /* Reset mode. */
+ IN gctBOOL manualReset;
+
+ /* Wait timedout. */
+ IN gctUINT32 wait;
+
+ /* State. */
+ IN gctBOOL state;
+ }
+ UserSignal;
+#endif
+
+ /* gcvHAL_SIGNAL. */
+ struct _gcsHAL_SIGNAL
+ {
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+
+ /* Reserved. */
+ IN gctSIGNAL auxSignal;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+#if defined(__QNXNTO__)
+ /* Client pulse side-channel connection ID. Set by client in gcoOS_CreateSignal. */
+ IN gctINT32 coid;
+
+ /* Set by server. */
+ IN gctINT32 rcvid;
+#endif
+ /* Event generated from where of pipeline */
+ IN gceKERNEL_WHERE fromWhere;
+ }
+ Signal;
+
+ /* gcvHAL_WRITE_DATA. */
+ struct _gcsHAL_WRITE_DATA
+ {
+ /* Address to write data to. */
+ IN gctUINT32 address;
+
+ /* Data to write. */
+ IN gctUINT32 data;
+ }
+ WriteData;
+
+ /* gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_ALLOCATE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctSIZE_T bytes;
+
+ /* Hardware address of allocation. */
+ OUT gctUINT32 address;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT gctPOINTER logical;
+ }
+ AllocateContiguousMemory;
+
+ /* gcvHAL_FREE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_FREE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+ }
+ FreeContiguousMemory;
+
+ /* gcvHAL_READ_REGISTER */
+ struct _gcsHAL_READ_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ OUT gctUINT32 data;
+ }
+ ReadRegisterData;
+
+ /* gcvHAL_WRITE_REGISTER */
+ struct _gcsHAL_WRITE_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ IN gctUINT32 data;
+ }
+ WriteRegisterData;
+
+#if VIVANTE_PROFILER
+ /* gcvHAL_GET_PROFILE_SETTING */
+ struct _gcsHAL_GET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ OUT gctBOOL enable;
+
+ /* The profile file name */
+ OUT gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ GetProfileSetting;
+
+ /* gcvHAL_SET_PROFILE_SETTING */
+ struct _gcsHAL_SET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ IN gctBOOL enable;
+
+ /* The profile file name */
+ IN gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ SetProfileSetting;
+
+ /* gcvHAL_READ_ALL_PROFILE_REGISTERS */
+ struct _gcsHAL_READ_ALL_PROFILE_REGISTERS
+ {
+ /* Data read. */
+ OUT gcsPROFILER_COUNTERS counters;
+ }
+ RegisterProfileData;
+
+ /* gcvHAL_PROFILE_REGISTERS_2D */
+ struct _gcsHAL_PROFILE_REGISTERS_2D
+ {
+ /* Data read. */
+ OUT gcs2D_PROFILE_PTR hwProfile2D;
+ }
+ RegisterProfileData2D;
+#endif
+ /* Power management. */
+ /* gcvHAL_SET_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_SET_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ IN gceCHIPPOWERSTATE state;
+ }
+ SetPowerManagement;
+
+ /* gcvHAL_QUERY_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_QUERY_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ OUT gceCHIPPOWERSTATE state;
+
+ /* Idle query. */
+ OUT gctBOOL isIdle;
+ }
+ QueryPowerManagement;
+
+ /* gcvHAL_QUERY_KERNEL_SETTINGS */
+ struct _gcsHAL_QUERY_KERNEL_SETTINGS
+ {
+ /* Settings.*/
+ OUT gcsKERNEL_SETTINGS settings;
+ }
+ QueryKernelSettings;
+
+ /* gcvHAL_MAP_PHYSICAL */
+ struct _gcsHAL_MAP_PHYSICAL
+ {
+ /* gcvTRUE to map, gcvFALSE to unmap. */
+ IN gctBOOL map;
+
+ /* Physical address. */
+ IN OUT gctPHYS_ADDR physical;
+ }
+ MapPhysical;
+
+ /* gcvHAL_DEBUG */
+ struct _gcsHAL_DEBUG
+ {
+ /* If gcvTRUE, set the debug information. */
+ IN gctBOOL set;
+ IN gctUINT32 level;
+ IN gctUINT32 zones;
+ IN gctBOOL enable;
+
+ IN gceDEBUG_MESSAGE_TYPE type;
+ IN gctUINT32 messageSize;
+
+ /* Message to print if not empty. */
+ IN gctCHAR message[80];
+ }
+ Debug;
+
+ /* gcvHAL_CACHE */
+ struct _gcsHAL_CACHE
+ {
+ IN gceCACHEOPERATION operation;
+ IN gctHANDLE process;
+ IN gctPOINTER logical;
+ IN gctSIZE_T bytes;
+ IN gcuVIDMEM_NODE_PTR node;
+ }
+ Cache;
+
+ /* gcvHAL_TIMESTAMP */
+ struct _gcsHAL_TIMESTAMP
+ {
+ /* Timer select. */
+ IN gctUINT32 timer;
+
+ /* Timer request type (0-stop, 1-start, 2-send delta). */
+ IN gctUINT32 request;
+
+ /* Result of delta time in microseconds. */
+ OUT gctINT32 timeDelta;
+ }
+ TimeStamp;
+
+ /* gcvHAL_DATABASE */
+ struct _gcsHAL_DATABASE
+ {
+ /* Set to gcvTRUE if you want to query a particular process ID.
+ ** Set to gcvFALSE to query the last detached process. */
+ IN gctBOOL validProcessID;
+
+ /* Process ID to query. */
+ IN gctUINT32 processID;
+
+ /* Information. */
+ OUT gcuDATABASE_INFO vidMem;
+ OUT gcuDATABASE_INFO nonPaged;
+ OUT gcuDATABASE_INFO contiguous;
+ OUT gcuDATABASE_INFO gpuIdle;
+ }
+ Database;
+
+ /* gcvHAL_VERSION */
+ struct _gcsHAL_VERSION
+ {
+ /* Major version: N.n.n. */
+ OUT gctINT32 major;
+
+ /* Minor version: n.N.n. */
+ OUT gctINT32 minor;
+
+ /* Patch version: n.n.N. */
+ OUT gctINT32 patch;
+
+ /* Build version. */
+ OUT gctUINT32 build;
+ }
+ Version;
+
+ /* gcvHAL_CHIP_INFO */
+ struct _gcsHAL_CHIP_INFO
+ {
+ /* Chip count. */
+ OUT gctINT32 count;
+
+ /* Chip types. */
+ OUT gceHARDWARE_TYPE types[gcdCHIP_COUNT];
+ }
+ ChipInfo;
+
+ /* gcvHAL_ATTACH */
+ struct _gcsHAL_ATTACH
+ {
+ /* Context buffer object. */
+ OUT gckCONTEXT context;
+
+ /* Number of states in the buffer. */
+ OUT gctSIZE_T stateCount;
+ }
+ Attach;
+
+ /* gcvHAL_DETACH */
+ struct _gcsHAL_DETACH
+ {
+ /* Context buffer object. */
+ IN gckCONTEXT context;
+ }
+ Detach;
+
+ /* gcvHAL_COMPOSE. */
+ gcsHAL_COMPOSE Compose;
+
+ /* gcvHAL_GET_FRAME_INFO. */
+ struct _gcsHAL_GET_FRAME_INFO
+ {
+ OUT gcsHAL_FRAME_INFO * frameInfo;
+ }
+ GetFrameInfo;
+
+ /* gcvHAL_SET_TIME_OUT. */
+ struct _gcsHAL_SET_TIMEOUT
+ {
+ gctUINT32 timeOut;
+ }
+ SetTimeOut;
+
+#if gcdENABLE_VG
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_VGCOMMIT
+ {
+ /* Context buffer. */
+ IN gcsVGCONTEXT_PTR context;
+
+ /* Command queue. */
+ IN gcsVGCMDQUEUE_PTR queue;
+
+ /* Number of entries in the queue. */
+ IN gctUINT entryCount;
+
+ /* Task table. */
+ IN gcsTASK_MASTER_TABLE_PTR taskTable;
+ }
+ VGCommit;
+
+ /* gcvHAL_QUERY_COMMAND_BUFFER */
+ struct _gcsHAL_QUERY_COMMAND_BUFFER
+ {
+ /* Command buffer attributes. */
+ OUT gcsCOMMAND_BUFFER_INFO information;
+ }
+ QueryCommandBuffer;
+
+#endif
+
+ struct _gcsHAL_GET_SHARED_INFO
+ {
+ IN gctUINT32 pid;
+ IN gctUINT32 dataId;
+ IN gcuVIDMEM_NODE_PTR node;
+ OUT gctUINT8_PTR data;
+ /* fix size */
+ OUT gctUINT8_PTR nodeData;
+ gctSIZE_T size;
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE infoType;
+ }
+ GetSharedInfo;
+
+ struct _gcsHAL_SET_SHARED_INFO
+ {
+ IN gctUINT32 dataId;
+ IN gcuVIDMEM_NODE_PTR node;
+ IN gctUINT8_PTR data;
+ IN gctUINT8_PTR nodeData;
+ IN gctSIZE_T size;
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE infoType;
+ }
+ SetSharedInfo;
+ }
+ u;
+}
+gcsHAL_INTERFACE;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_driver_h_ */
diff --git a/src/include_imx6/gc_hal_driver_vg.h b/src/include_imx6/gc_hal_driver_vg.h
new file mode 100644
index 0000000..fe57968
--- /dev/null
+++ b/src/include_imx6/gc_hal_driver_vg.h
@@ -0,0 +1,292 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+
+
+#ifndef __gc_hal_driver_vg_h_
+#define __gc_hal_driver_vg_h_
+
+
+
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* I/O Control Codes ******************************
+\******************************************************************************/
+
+#define gcvHAL_CLASS "galcore"
+#define IOCTL_GCHAL_INTERFACE 30000
+
+/******************************************************************************\
+********************************* Command Codes ********************************
+\******************************************************************************/
+
+/******************************************************************************\
+********************* Command buffer information structure. ********************
+\******************************************************************************/
+
+typedef struct _gcsCOMMAND_BUFFER_INFO * gcsCOMMAND_BUFFER_INFO_PTR;
+typedef struct _gcsCOMMAND_BUFFER_INFO
+{
+ /* FE command buffer interrupt ID. */
+ gctINT32 feBufferInt;
+
+ /* TS overflow interrupt ID. */
+ gctINT32 tsOverflowInt;
+
+ /* Alignment and mask for the buffer address. */
+ gctUINT addressMask;
+ gctSIZE_T addressAlignment;
+
+ /* Alignment for each command. */
+ gctSIZE_T commandAlignment;
+
+ /* Number of bytes required by the STATE command. */
+ gctSIZE_T stateCommandSize;
+
+ /* Number of bytes required by the RESTART command. */
+ gctSIZE_T restartCommandSize;
+
+ /* Number of bytes required by the FETCH command. */
+ gctSIZE_T fetchCommandSize;
+
+ /* Number of bytes required by the CALL command. */
+ gctSIZE_T callCommandSize;
+
+ /* Number of bytes required by the RETURN command. */
+ gctSIZE_T returnCommandSize;
+
+ /* Number of bytes required by the EVENT command. */
+ gctSIZE_T eventCommandSize;
+
+ /* Number of bytes required by the END command. */
+ gctSIZE_T endCommandSize;
+
+ /* Number of bytes reserved at the tail of a static command buffer. */
+ gctSIZE_T staticTailSize;
+
+ /* Number of bytes reserved at the tail of a dynamic command buffer. */
+ gctSIZE_T dynamicTailSize;
+}
+gcsCOMMAND_BUFFER_INFO;
+
+/******************************************************************************\
+******************************** Task Structures *******************************
+\******************************************************************************/
+
+typedef enum _gceTASK
+{
+ gcvTASK_LINK,
+ gcvTASK_CLUSTER,
+ gcvTASK_INCREMENT,
+ gcvTASK_DECREMENT,
+ gcvTASK_SIGNAL,
+ gcvTASK_LOCKDOWN,
+ gcvTASK_UNLOCK_VIDEO_MEMORY,
+ gcvTASK_FREE_VIDEO_MEMORY,
+ gcvTASK_FREE_CONTIGUOUS_MEMORY,
+ gcvTASK_UNMAP_USER_MEMORY,
+ gcvTASK_UNMAP_MEMORY
+}
+gceTASK;
+
+typedef struct _gcsTASK_HEADER * gcsTASK_HEADER_PTR;
+typedef struct _gcsTASK_HEADER
+{
+ /* Task ID. */
+ IN gceTASK id;
+}
+gcsTASK_HEADER;
+
+typedef struct _gcsTASK_LINK * gcsTASK_LINK_PTR;
+typedef struct _gcsTASK_LINK
+{
+ /* Task ID (gcvTASK_LINK). */
+ IN gceTASK id;
+
+ /* Pointer to the next task container. */
+ IN gctPOINTER cotainer;
+
+ /* Pointer to the next task from the next task container. */
+ IN gcsTASK_HEADER_PTR task;
+}
+gcsTASK_LINK;
+
+typedef struct _gcsTASK_CLUSTER * gcsTASK_CLUSTER_PTR;
+typedef struct _gcsTASK_CLUSTER
+{
+ /* Task ID (gcvTASK_CLUSTER). */
+ IN gceTASK id;
+
+ /* Number of tasks in the cluster. */
+ IN gctUINT taskCount;
+}
+gcsTASK_CLUSTER;
+
+typedef struct _gcsTASK_INCREMENT * gcsTASK_INCREMENT_PTR;
+typedef struct _gcsTASK_INCREMENT
+{
+ /* Task ID (gcvTASK_INCREMENT). */
+ IN gceTASK id;
+
+ /* Address of the variable to increment. */
+ IN gctUINT32 address;
+}
+gcsTASK_INCREMENT;
+
+typedef struct _gcsTASK_DECREMENT * gcsTASK_DECREMENT_PTR;
+typedef struct _gcsTASK_DECREMENT
+{
+ /* Task ID (gcvTASK_DECREMENT). */
+ IN gceTASK id;
+
+ /* Address of the variable to decrement. */
+ IN gctUINT32 address;
+}
+gcsTASK_DECREMENT;
+
+typedef struct _gcsTASK_SIGNAL * gcsTASK_SIGNAL_PTR;
+typedef struct _gcsTASK_SIGNAL
+{
+ /* Task ID (gcvTASK_SIGNAL). */
+ IN gceTASK id;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+
+#if defined(__QNXNTO__)
+ IN gctINT32 coid;
+ IN gctINT32 rcvid;
+#endif
+}
+gcsTASK_SIGNAL;
+
+typedef struct _gcsTASK_LOCKDOWN * gcsTASK_LOCKDOWN_PTR;
+typedef struct _gcsTASK_LOCKDOWN
+{
+ /* Task ID (gcvTASK_LOCKDOWN). */
+ IN gceTASK id;
+
+ /* Address of the user space counter. */
+ IN gctUINT32 userCounter;
+
+ /* Address of the kernel space counter. */
+ IN gctUINT32 kernelCounter;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+}
+gcsTASK_LOCKDOWN;
+
+typedef struct _gcsTASK_UNLOCK_VIDEO_MEMORY * gcsTASK_UNLOCK_VIDEO_MEMORY_PTR;
+typedef struct _gcsTASK_UNLOCK_VIDEO_MEMORY
+{
+ /* Task ID (gcvTASK_UNLOCK_VIDEO_MEMORY). */
+ IN gceTASK id;
+
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+}
+gcsTASK_UNLOCK_VIDEO_MEMORY;
+
+typedef struct _gcsTASK_FREE_VIDEO_MEMORY * gcsTASK_FREE_VIDEO_MEMORY_PTR;
+typedef struct _gcsTASK_FREE_VIDEO_MEMORY
+{
+ /* Task ID (gcvTASK_FREE_VIDEO_MEMORY). */
+ IN gceTASK id;
+
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+}
+gcsTASK_FREE_VIDEO_MEMORY;
+
+typedef struct _gcsTASK_FREE_CONTIGUOUS_MEMORY * gcsTASK_FREE_CONTIGUOUS_MEMORY_PTR;
+typedef struct _gcsTASK_FREE_CONTIGUOUS_MEMORY
+{
+ /* Task ID (gcvTASK_FREE_CONTIGUOUS_MEMORY). */
+ IN gceTASK id;
+
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+}
+gcsTASK_FREE_CONTIGUOUS_MEMORY;
+
+typedef struct _gcsTASK_UNMAP_USER_MEMORY * gcsTASK_UNMAP_USER_MEMORY_PTR;
+typedef struct _gcsTASK_UNMAP_USER_MEMORY
+{
+ /* Task ID (gcvTASK_UNMAP_USER_MEMORY). */
+ IN gceTASK id;
+
+ /* Base address of user memory to unmap. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to unmap. */
+ IN gctSIZE_T size;
+
+ /* Info record returned by gcvHAL_MAP_USER_MEMORY. */
+ IN gctPOINTER info;
+
+ /* Physical address of mapped memory as returned by
+ gcvHAL_MAP_USER_MEMORY. */
+ IN gctUINT32 address;
+}
+gcsTASK_UNMAP_USER_MEMORY;
+
+typedef struct _gcsTASK_UNMAP_MEMORY * gcsTASK_UNMAP_MEMORY_PTR;
+typedef struct _gcsTASK_UNMAP_MEMORY
+{
+ /* Task ID (gcvTASK_UNMAP_MEMORY). */
+ IN gceTASK id;
+
+ /* Physical memory address to unmap. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to unmap. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory to unmap. */
+ IN gctPOINTER logical;
+}
+gcsTASK_UNMAP_MEMORY;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_driver_h_ */
diff --git a/src/include_imx6/gc_hal_dump.h b/src/include_imx6/gc_hal_dump.h
new file mode 100644
index 0000000..9b2db22
--- /dev/null
+++ b/src/include_imx6/gc_hal_dump.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+#ifndef __gc_hal_dump_h_
+#define __gc_hal_dump_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** FILE LAYOUT:
+**
+** gcsDUMP_FILE structure
+**
+** gcsDUMP_DATA frame
+** gcsDUMP_DATA or gcDUMP_DATA_SIZE records rendingring the frame
+** gctUINT8 data[length]
+*/
+
+#define gcvDUMP_FILE_SIGNATURE gcmCC('g','c','D','B')
+
+typedef struct _gcsDUMP_FILE
+{
+ gctUINT32 signature; /* File signature */
+ gctSIZE_T length; /* Length of file */
+ gctUINT32 frames; /* Number of frames in file */
+}
+gcsDUMP_FILE;
+
+typedef enum _gceDUMP_TAG
+{
+ gcvTAG_SURFACE = gcmCC('s','u','r','f'),
+ gcvTAG_FRAME = gcmCC('f','r','m',' '),
+ gcvTAG_COMMAND = gcmCC('c','m','d',' '),
+ gcvTAG_INDEX = gcmCC('i','n','d','x'),
+ gcvTAG_STREAM = gcmCC('s','t','r','m'),
+ gcvTAG_TEXTURE = gcmCC('t','e','x','t'),
+ gcvTAG_RENDER_TARGET = gcmCC('r','n','d','r'),
+ gcvTAG_DEPTH = gcmCC('z','b','u','f'),
+ gcvTAG_RESOLVE = gcmCC('r','s','l','v'),
+ gcvTAG_DELETE = gcmCC('d','e','l',' '),
+}
+gceDUMP_TAG;
+
+typedef struct _gcsDUMP_SURFACE
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctUINT32 address; /* Address of the surface. */
+ gctINT16 width; /* Width of surface. */
+ gctINT16 height; /* Height of surface. */
+ gceSURF_FORMAT format; /* Surface pixel format. */
+ gctSIZE_T length; /* Number of bytes inside the surface. */
+}
+gcsDUMP_SURFACE;
+
+typedef struct _gcsDUMP_DATA
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctSIZE_T length; /* Number of bytes of data. */
+ gctUINT32 address; /* Address for the data. */
+}
+gcsDUMP_DATA;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_dump_h_ */
+
diff --git a/src/include_imx6/gc_hal_eglplatform.h b/src/include_imx6/gc_hal_eglplatform.h
new file mode 100644
index 0000000..e0efba4
--- /dev/null
+++ b/src/include_imx6/gc_hal_eglplatform.h
@@ -0,0 +1,621 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_eglplatform_h_
+#define __gc_hal_eglplatform_h_
+
+/* Include VDK types. */
+#include "gc_hal_types.h"
+#include "gc_hal_base.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*******************************************************************************
+** Events. *********************************************************************
+*/
+
+typedef enum _halEventType
+{
+ /* Keyboard event. */
+ HAL_KEYBOARD,
+
+ /* Mouse move event. */
+ HAL_POINTER,
+
+ /* Mouse button event. */
+ HAL_BUTTON,
+
+ /* Application close event. */
+ HAL_CLOSE,
+
+ /* Application window has been updated. */
+ HAL_WINDOW_UPDATE
+}
+halEventType;
+
+/* Scancodes for keyboard. */
+typedef enum _halKeys
+{
+ HAL_UNKNOWN = -1,
+
+ HAL_BACKSPACE = 0x08,
+ HAL_TAB,
+ HAL_ENTER = 0x0D,
+ HAL_ESCAPE = 0x1B,
+
+ HAL_SPACE = 0x20,
+ HAL_SINGLEQUOTE = 0x27,
+ HAL_PAD_ASTERISK = 0x2A,
+ HAL_COMMA = 0x2C,
+ HAL_HYPHEN,
+ HAL_PERIOD,
+ HAL_SLASH,
+ HAL_0,
+ HAL_1,
+ HAL_2,
+ HAL_3,
+ HAL_4,
+ HAL_5,
+ HAL_6,
+ HAL_7,
+ HAL_8,
+ HAL_9,
+ HAL_SEMICOLON = 0x3B,
+ HAL_EQUAL = 0x3D,
+ HAL_A = 0x41,
+ HAL_B,
+ HAL_C,
+ HAL_D,
+ HAL_E,
+ HAL_F,
+ HAL_G,
+ HAL_H,
+ HAL_I,
+ HAL_J,
+ HAL_K,
+ HAL_L,
+ HAL_M,
+ HAL_N,
+ HAL_O,
+ HAL_P,
+ HAL_Q,
+ HAL_R,
+ HAL_S,
+ HAL_T,
+ HAL_U,
+ HAL_V,
+ HAL_W,
+ HAL_X,
+ HAL_Y,
+ HAL_Z,
+ HAL_LBRACKET,
+ HAL_BACKSLASH,
+ HAL_RBRACKET,
+ HAL_BACKQUOTE = 0x60,
+
+ HAL_F1 = 0x80,
+ HAL_F2,
+ HAL_F3,
+ HAL_F4,
+ HAL_F5,
+ HAL_F6,
+ HAL_F7,
+ HAL_F8,
+ HAL_F9,
+ HAL_F10,
+ HAL_F11,
+ HAL_F12,
+
+ HAL_LCTRL,
+ HAL_RCTRL,
+ HAL_LSHIFT,
+ HAL_RSHIFT,
+ HAL_LALT,
+ HAL_RALT,
+ HAL_CAPSLOCK,
+ HAL_NUMLOCK,
+ HAL_SCROLLLOCK,
+ HAL_PAD_0,
+ HAL_PAD_1,
+ HAL_PAD_2,
+ HAL_PAD_3,
+ HAL_PAD_4,
+ HAL_PAD_5,
+ HAL_PAD_6,
+ HAL_PAD_7,
+ HAL_PAD_8,
+ HAL_PAD_9,
+ HAL_PAD_HYPHEN,
+ HAL_PAD_PLUS,
+ HAL_PAD_SLASH,
+ HAL_PAD_PERIOD,
+ HAL_PAD_ENTER,
+ HAL_SYSRQ,
+ HAL_PRNTSCRN,
+ HAL_BREAK,
+ HAL_UP,
+ HAL_LEFT,
+ HAL_RIGHT,
+ HAL_DOWN,
+ HAL_HOME,
+ HAL_END,
+ HAL_PGUP,
+ HAL_PGDN,
+ HAL_INSERT,
+ HAL_DELETE,
+ HAL_LWINDOW,
+ HAL_RWINDOW,
+ HAL_MENU,
+ HAL_POWER,
+ HAL_SLEEP,
+ HAL_WAKE
+}
+halKeys;
+
+/* Structure that defined keyboard mapping. */
+typedef struct _halKeyMap
+{
+ /* Normal key. */
+ halKeys normal;
+
+ /* Extended key. */
+ halKeys extended;
+}
+halKeyMap;
+
+/* Event structure. */
+typedef struct _halEvent
+{
+ /* Event type. */
+ halEventType type;
+
+ /* Event data union. */
+ union _halEventData
+ {
+ /* Event data for keyboard. */
+ struct _halKeyboard
+ {
+ /* Scancode. */
+ halKeys scancode;
+
+ /* ASCII characte of the key pressed. */
+ gctCHAR key;
+
+ /* Flag whether the key was pressed (1) or released (0). */
+ gctCHAR pressed;
+ }
+ keyboard;
+
+ /* Event data for pointer. */
+ struct _halPointer
+ {
+ /* Current pointer coordinate. */
+ gctINT x;
+ gctINT y;
+ }
+ pointer;
+
+ /* Event data for mouse buttons. */
+ struct _halButton
+ {
+ /* Left button state. */
+ gctINT left;
+
+ /* Middle button state. */
+ gctINT middle;
+
+ /* Right button state. */
+ gctINT right;
+
+ /* Current pointer coordinate. */
+ gctINT x;
+ gctINT y;
+ }
+ button;
+ }
+ data;
+}
+halEvent;
+
+#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+/* Win32 and Windows CE platforms. */
+#include <windows.h>
+typedef HDC HALNativeDisplayType;
+typedef HWND HALNativeWindowType;
+typedef HBITMAP HALNativePixmapType;
+
+#elif defined(LINUX) && defined(EGL_API_FB) && !defined(__APPLE__)
+/* Linux platform for FBDEV. */
+typedef struct _FBDisplay * HALNativeDisplayType;
+typedef struct _FBWindow * HALNativeWindowType;
+typedef struct _FBPixmap * HALNativePixmapType;
+
+#elif defined(__ANDROID__) || defined(ANDROID)
+
+struct egl_native_pixmap_t;
+
+#if ANDROID_SDK_VERSION >= 9
+ #include <android/native_window.h>
+
+ typedef struct ANativeWindow* HALNativeWindowType;
+ typedef struct egl_native_pixmap_t* HALNativePixmapType;
+ typedef void* HALNativeDisplayType;
+#else
+ struct android_native_window_t;
+ typedef struct android_native_window_t* HALNativeWindowType;
+ typedef struct egl_native_pixmap_t * HALNativePixmapType;
+ typedef void* HALNativeDisplayType;
+#endif
+
+#elif defined(LINUX) || defined(__APPLE__)
+/* X11 platform. */
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+typedef Display * HALNativeDisplayType;
+typedef Window HALNativeWindowType;
+
+#ifdef CUSTOM_PIXMAP
+typedef void * HALNativePixmapType;
+#else
+typedef Pixmap HALNativePixmapType;
+#endif /* CUSTOM_PIXMAP */
+
+/* Rename some badly named X defines. */
+#ifdef Status
+# define XStatus int
+# undef Status
+#endif
+#ifdef Always
+# define XAlways 2
+# undef Always
+#endif
+#ifdef CurrentTime
+# undef CurrentTime
+# define XCurrentTime 0
+#endif
+
+#elif defined(__QNXNTO__)
+
+/* VOID */
+typedef void * HALNativeDisplayType;
+typedef void * HALNativeWindowType;
+typedef void * HALNativePixmapType;
+
+#else
+
+#error "Platform not recognized"
+
+/* VOID */
+typedef void * HALNativeDisplayType;
+typedef void * HALNativeWindowType;
+typedef void * HALNativePixmapType;
+
+#endif
+
+
+
+/*******************************************************************************
+** Display. ********************************************************************
+*/
+
+gceSTATUS
+gcoOS_GetDisplay(
+ OUT HALNativeDisplayType * Display
+ );
+
+gceSTATUS
+gcoOS_GetDisplayByIndex(
+ IN gctINT DisplayIndex,
+ OUT HALNativeDisplayType * Display
+ );
+
+gceSTATUS
+gcoOS_GetDisplayInfo(
+ IN HALNativeDisplayType Display,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctSIZE_T * Physical,
+ OUT gctINT * Stride,
+ OUT gctINT * BitsPerPixel
+ );
+
+/* VFK_DISPLAY_INFO structure defining information returned by
+ vdkGetDisplayInfoEx. */
+typedef struct _halDISPLAY_INFO
+{
+ /* The size of the display in pixels. */
+ gctINT width;
+ gctINT height;
+
+ /* The stride of the dispay. -1 is returned if the stride is not known
+ ** for the specified display.*/
+ gctINT stride;
+
+ /* The color depth of the display in bits per pixel. */
+ gctINT bitsPerPixel;
+
+ /* The logical pointer to the display memory buffer. NULL is returned
+ ** if the pointer is not known for the specified display. */
+ gctPOINTER logical;
+
+ /* The physical address of the display memory buffer. ~0 is returned
+ ** if the address is not known for the specified display. */
+ gctSIZE_T physical;
+
+#ifndef __QNXNTO__
+ /* 355_FB_MULTI_BUFFER */
+ gctINT multiBuffer;
+ gctINT backBufferY;
+#endif
+
+ /* The color info of the display. */
+ gctUINT alphaLength;
+ gctUINT alphaOffset;
+ gctUINT redLength;
+ gctUINT redOffset;
+ gctUINT greenLength;
+ gctUINT greenOffset;
+ gctUINT blueLength;
+ gctUINT blueOffset;
+
+ /* Display flip support. */
+ gctINT flip;
+}
+halDISPLAY_INFO;
+
+gceSTATUS
+gcoOS_GetDisplayInfoEx(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctUINT DisplayInfoSize,
+ OUT halDISPLAY_INFO * DisplayInfo
+ );
+
+gceSTATUS
+gcoOS_GetNextDisplayInfoEx(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctUINT DisplayInfoSize,
+ OUT halDISPLAY_INFO * DisplayInfo
+ );
+
+gceSTATUS
+gcoOS_GetDisplayVirtual(
+ IN HALNativeDisplayType Display,
+ OUT gctINT * Width,
+ OUT gctINT * Height
+ );
+
+gceSTATUS
+gcoOS_GetDisplayBackbuffer(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctPOINTER context,
+ IN gcoSURF surface,
+ OUT gctUINT * Offset,
+ OUT gctINT * X,
+ OUT gctINT * Y
+ );
+
+gceSTATUS
+gcoOS_SetDisplayVirtual(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctUINT Offset,
+ IN gctINT X,
+ IN gctINT Y
+ );
+
+gceSTATUS
+gcoOS_DisplayBufferRegions(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctINT NumRects,
+ IN gctINT_PTR Rects
+ );
+
+gceSTATUS
+gcoOS_DestroyDisplay(
+ IN HALNativeDisplayType Display
+ );
+
+/*******************************************************************************
+** Windows. ********************************************************************
+*/
+
+gceSTATUS
+gcoOS_CreateWindow(
+ IN HALNativeDisplayType Display,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gctINT Width,
+ IN gctINT Height,
+ OUT HALNativeWindowType * Window
+ );
+
+gceSTATUS
+gcoOS_GetWindowInfo(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ OUT gctINT * X,
+ OUT gctINT * Y,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctINT * BitsPerPixel,
+#ifdef __QNXNTO__
+ OUT gctINT * Format,
+#endif
+ OUT gctUINT * Offset
+ );
+
+gceSTATUS
+gcoOS_DestroyWindow(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_DrawImage(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT BitsPerPixel,
+ IN gctPOINTER Bits
+ );
+
+gceSTATUS
+gcoOS_GetImage(
+ IN HALNativeWindowType Window,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ OUT gctINT * BitsPerPixel,
+ OUT gctPOINTER * Bits
+ );
+
+/*******************************************************************************
+** Pixmaps. ********************************************************************
+*/
+
+gceSTATUS
+gcoOS_CreatePixmap(
+ IN HALNativeDisplayType Display,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT BitsPerPixel,
+ OUT HALNativePixmapType * Pixmap
+ );
+
+gceSTATUS
+gcoOS_GetPixmapInfo(
+ IN HALNativeDisplayType Display,
+ IN HALNativePixmapType Pixmap,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctINT * BitsPerPixel,
+ OUT gctINT * Stride,
+ OUT gctPOINTER * Bits
+ );
+
+gceSTATUS
+gcoOS_DrawPixmap(
+ IN HALNativeDisplayType Display,
+ IN HALNativePixmapType Pixmap,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT BitsPerPixel,
+ IN gctPOINTER Bits
+ );
+
+gceSTATUS
+gcoOS_DestroyPixmap(
+ IN HALNativeDisplayType Display,
+ IN HALNativePixmapType Pixmap
+ );
+
+/*******************************************************************************
+** OS relative. ****************************************************************
+*/
+gceSTATUS
+gcoOS_LoadEGLLibrary(
+ OUT gctHANDLE * Handle
+ );
+
+gceSTATUS
+gcoOS_FreeEGLLibrary(
+ IN gctHANDLE Handle
+ );
+
+gceSTATUS
+gcoOS_ShowWindow(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_HideWindow(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_SetWindowTitle(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctCONST_STRING Title
+ );
+
+gceSTATUS
+gcoOS_CapturePointer(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_GetEvent(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ OUT halEvent * Event
+ );
+
+gceSTATUS
+gcoOS_CreateClientBuffer(
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT Format,
+ IN gctINT Type,
+ OUT gctPOINTER * ClientBuffer
+ );
+
+gceSTATUS
+gcoOS_GetClientBufferInfo(
+ IN gctPOINTER ClientBuffer,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctINT * Stride,
+ OUT gctPOINTER * Bits
+ );
+
+gceSTATUS
+gcoOS_DestroyClientBuffer(
+ IN gctPOINTER ClientBuffer
+ );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_eglplatform_h_ */
diff --git a/src/include_imx6/gc_hal_engine.h b/src/include_imx6/gc_hal_engine.h
new file mode 100644
index 0000000..22cdc2f
--- /dev/null
+++ b/src/include_imx6/gc_hal_engine.h
@@ -0,0 +1,1847 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_engine_h_
+#define __gc_hal_engine_h_
+
+#ifndef VIVANTE_NO_3D
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+
+#if gcdENABLE_VG
+#include "gc_hal_engine_vg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoSTREAM * gcoSTREAM;
+typedef struct _gcoVERTEX * gcoVERTEX;
+typedef struct _gcoTEXTURE * gcoTEXTURE;
+typedef struct _gcoINDEX * gcoINDEX;
+typedef struct _gcsVERTEX_ATTRIBUTES * gcsVERTEX_ATTRIBUTES_PTR;
+typedef struct _gcoVERTEXARRAY * gcoVERTEXARRAY;
+
+#define gcdATTRIBUTE_COUNT 16
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+/* Shading format. */
+typedef enum _gceSHADING
+{
+ gcvSHADING_SMOOTH,
+ gcvSHADING_FLAT_D3D,
+ gcvSHADING_FLAT_OPENGL,
+}
+gceSHADING;
+
+/* Culling modes. */
+typedef enum _gceCULL
+{
+ gcvCULL_NONE,
+ gcvCULL_CCW,
+ gcvCULL_CW,
+}
+gceCULL;
+
+/* Fill modes. */
+typedef enum _gceFILL
+{
+ gcvFILL_POINT,
+ gcvFILL_WIRE_FRAME,
+ gcvFILL_SOLID,
+}
+gceFILL;
+
+/* Compare modes. */
+typedef enum _gceCOMPARE
+{
+ gcvCOMPARE_NEVER,
+ gcvCOMPARE_NOT_EQUAL,
+ gcvCOMPARE_LESS,
+ gcvCOMPARE_LESS_OR_EQUAL,
+ gcvCOMPARE_EQUAL,
+ gcvCOMPARE_GREATER,
+ gcvCOMPARE_GREATER_OR_EQUAL,
+ gcvCOMPARE_ALWAYS,
+ gcvCOMPARE_INVALID = -1
+}
+gceCOMPARE;
+
+/* Stencil modes. */
+typedef enum _gceSTENCIL_MODE
+{
+ gcvSTENCIL_NONE,
+ gcvSTENCIL_SINGLE_SIDED,
+ gcvSTENCIL_DOUBLE_SIDED,
+}
+gceSTENCIL_MODE;
+
+/* Stencil operations. */
+typedef enum _gceSTENCIL_OPERATION
+{
+ gcvSTENCIL_KEEP,
+ gcvSTENCIL_REPLACE,
+ gcvSTENCIL_ZERO,
+ gcvSTENCIL_INVERT,
+ gcvSTENCIL_INCREMENT,
+ gcvSTENCIL_DECREMENT,
+ gcvSTENCIL_INCREMENT_SATURATE,
+ gcvSTENCIL_DECREMENT_SATURATE,
+ gcvSTENCIL_OPERATION_INVALID = -1
+}
+gceSTENCIL_OPERATION;
+
+/* Stencil selection. */
+typedef enum _gceSTENCIL_WHERE
+{
+ gcvSTENCIL_FRONT,
+ gcvSTENCIL_BACK,
+}
+gceSTENCIL_WHERE;
+
+/* Texture addressing selection. */
+typedef enum _gceTEXTURE_WHICH
+{
+ gcvTEXTURE_S,
+ gcvTEXTURE_T,
+ gcvTEXTURE_R,
+}
+gceTEXTURE_WHICH;
+
+/* Texture addressing modes. */
+typedef enum _gceTEXTURE_ADDRESSING
+{
+ gcvTEXTURE_WRAP,
+ gcvTEXTURE_CLAMP,
+ gcvTEXTURE_BORDER,
+ gcvTEXTURE_MIRROR,
+ gcvTEXTURE_MIRROR_ONCE,
+}
+gceTEXTURE_ADDRESSING;
+
+/* Texture filters. */
+typedef enum _gceTEXTURE_FILTER
+{
+ gcvTEXTURE_NONE,
+ gcvTEXTURE_POINT,
+ gcvTEXTURE_LINEAR,
+ gcvTEXTURE_ANISOTROPIC,
+}
+gceTEXTURE_FILTER;
+
+/* Primitive types. */
+typedef enum _gcePRIMITIVE
+{
+ gcvPRIMITIVE_POINT_LIST,
+ gcvPRIMITIVE_LINE_LIST,
+ gcvPRIMITIVE_LINE_STRIP,
+ gcvPRIMITIVE_LINE_LOOP,
+ gcvPRIMITIVE_TRIANGLE_LIST,
+ gcvPRIMITIVE_TRIANGLE_STRIP,
+ gcvPRIMITIVE_TRIANGLE_FAN,
+ gcvPRIMITIVE_RECTANGLE,
+}
+gcePRIMITIVE;
+
+/* Index types. */
+typedef enum _gceINDEX_TYPE
+{
+ gcvINDEX_8,
+ gcvINDEX_16,
+ gcvINDEX_32,
+}
+gceINDEX_TYPE;
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Query the target capabilities. */
+gceSTATUS
+gcoHAL_QueryTargetCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MultiTargetCount,
+ OUT gctUINT * MaxSamples
+ );
+
+gceSTATUS
+gcoHAL_SetDepthOnly(
+ IN gcoHAL Hal,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoHAL_QueryShaderCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * VertexUniforms,
+ OUT gctUINT * FragmentUniforms,
+ OUT gctUINT * Varyings
+ );
+
+gceSTATUS
+gcoHAL_QueryTextureCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoHAL_QueryTextureMaxAniso(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxAnisoValue
+ );
+
+gceSTATUS
+gcoHAL_QueryStreamCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT32 * MaxAttributes,
+ OUT gctUINT32 * MaxStreamSize,
+ OUT gctUINT32 * NumberOfStreams,
+ OUT gctUINT32 * Alignment
+ );
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*--------------------------------- gcoSURF 3D --------------------------------*/
+
+/* Copy surface. */
+gceSTATUS
+gcoSURF_Copy(
+ IN gcoSURF Surface,
+ IN gcoSURF Source
+ );
+
+/* Clear surface. */
+gceSTATUS
+gcoSURF_Clear(
+ IN gcoSURF Surface,
+ IN gctUINT Flags
+ );
+
+/* Set number of samples for a gcoSURF object. */
+gceSTATUS
+gcoSURF_SetSamples(
+ IN gcoSURF Surface,
+ IN gctUINT Samples
+ );
+
+/* Get the number of samples per pixel. */
+gceSTATUS
+gcoSURF_GetSamples(
+ IN gcoSURF Surface,
+ OUT gctUINT_PTR Samples
+ );
+
+/* Clear rectangular surface. */
+gceSTATUS
+gcoSURF_ClearRect(
+ IN gcoSURF Surface,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctUINT Flags
+ );
+
+/* TO BE REMOVED */
+ gceSTATUS
+ depr_gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight
+ );
+
+ gceSTATUS
+ depr_gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Resample surface. */
+gceSTATUS
+gcoSURF_Resample(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Resolve surface. */
+gceSTATUS
+gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Export the render target. */
+gceSTATUS
+gcoSURF_ExportRenderTarget(
+ IN gcoSURF SrcSurface
+);
+
+/* Import the render target. */
+gceSTATUS
+gcoSURF_ImportRenderTarget(
+ IN gctUINT32 Pid,
+ IN gcoSURF SrcSurface
+);
+
+/* Save the Resolve info to kernel. */
+gceSTATUS
+gcoSURF_PrepareRemoteResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Resolve using the rectangle info previously saved in the vid mem node. */
+gceSTATUS
+gcoSURF_ResolveFromStoredRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Using the info that Process Pid saved to do resolve. */
+gceSTATUS
+gcoSURF_RemoteResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctBOOL *resolveDiscarded
+ );
+
+/* Return the "resolve submitted indicator" signal. */
+gceSTATUS
+gcoSURF_GetRTSignal(
+ IN gcoSURF RTSurface,
+ OUT gctSIGNAL * resolveSubmittedSignal
+ );
+
+/* Resolve rectangular area of a surface. */
+gceSTATUS
+gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Set surface resolvability. */
+gceSTATUS
+gcoSURF_SetResolvability(
+ IN gcoSURF Surface,
+ IN gctBOOL Resolvable
+ );
+
+gceSTATUS
+gcoSURF_IsRenderable(
+ IN gcoSURF Surface
+ );
+
+/******************************************************************************\
+******************************** gcoINDEX Object *******************************
+\******************************************************************************/
+
+/* Construct a new gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoINDEX * Index
+ );
+
+/* Destroy a gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Destroy(
+ IN gcoINDEX Index
+ );
+
+/* Lock index in memory. */
+gceSTATUS
+gcoINDEX_Lock(
+ IN gcoINDEX Index,
+ OUT gctUINT32 * Address,
+ OUT gctPOINTER * Memory
+ );
+
+/* Unlock index that was previously locked with gcoINDEX_Lock. */
+gceSTATUS
+gcoINDEX_Unlock(
+ IN gcoINDEX Index
+ );
+
+/* Upload index data into the memory. */
+gceSTATUS
+gcoINDEX_Load(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE IndexType,
+ IN gctUINT32 IndexCount,
+ IN gctPOINTER IndexBuffer
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_Bind(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_BindOffset(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset
+ );
+
+/* Free existing index buffer. */
+gceSTATUS
+gcoINDEX_Free(
+ IN gcoINDEX Index
+ );
+
+/* Upload data into an index buffer. */
+gceSTATUS
+gcoINDEX_Upload(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/* Upload data into an index buffer starting at an offset. */
+gceSTATUS
+gcoINDEX_UploadOffset(
+ IN gcoINDEX Index,
+ IN gctUINT32 Offset,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/* Query the index capabilities. */
+gceSTATUS
+gcoINDEX_QueryCaps(
+ OUT gctBOOL * Index8,
+ OUT gctBOOL * Index16,
+ OUT gctBOOL * Index32,
+ OUT gctUINT * MaxIndex
+ );
+
+/* Determine the index range in the current index buffer. */
+gceSTATUS
+gcoINDEX_GetIndexRange(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Count,
+ OUT gctUINT32 * MinimumIndex,
+ OUT gctUINT32 * MaximumIndex
+ );
+
+/* Dynamic buffer management. */
+gceSTATUS
+gcoINDEX_SetDynamic(
+ IN gcoINDEX Index,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+gceSTATUS
+gcoINDEX_UploadDynamic(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+********************************** gco3D Object *********************************
+\******************************************************************************/
+
+/* Clear flags. */
+typedef enum _gceCLEAR
+{
+ gcvCLEAR_COLOR = 0x1,
+ gcvCLEAR_DEPTH = 0x2,
+ gcvCLEAR_STENCIL = 0x4,
+ gcvCLEAR_HZ = 0x8,
+ gcvCLEAR_HAS_VAA = 0x10,
+}
+gceCLEAR;
+
+/* Blending targets. */
+typedef enum _gceBLEND_UNIT
+{
+ gcvBLEND_SOURCE,
+ gcvBLEND_TARGET,
+}
+gceBLEND_UNIT;
+
+/* Construct a new gco3D object. */
+gceSTATUS
+gco3D_Construct(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+/* Destroy an gco3D object. */
+gceSTATUS
+gco3D_Destroy(
+ IN gco3D Engine
+ );
+
+/* Set 3D API type. */
+gceSTATUS
+gco3D_SetAPI(
+ IN gco3D Engine,
+ IN gceAPI ApiType
+ );
+
+/* Set render target. */
+gceSTATUS
+gco3D_SetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset render target. */
+gceSTATUS
+gco3D_UnsetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set depth buffer. */
+gceSTATUS
+gco3D_SetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset depth buffer. */
+gceSTATUS
+gco3D_UnsetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set viewport. */
+gceSTATUS
+gco3D_SetViewport(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set scissors. */
+gceSTATUS
+gco3D_SetScissors(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set clear color. */
+gceSTATUS
+gco3D_SetClearColor(
+ IN gco3D Engine,
+ IN gctUINT8 Red,
+ IN gctUINT8 Green,
+ IN gctUINT8 Blue,
+ IN gctUINT8 Alpha
+ );
+
+/* Set fixed point clear color. */
+gceSTATUS
+gco3D_SetClearColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point clear color. */
+gceSTATUS
+gco3D_SetClearColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set fixed point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Depth
+ );
+
+/* Set floating point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthF(
+ IN gco3D Engine,
+ IN gctFLOAT Depth
+ );
+
+/* Set clear stencil. */
+gceSTATUS
+gco3D_SetClearStencil(
+ IN gco3D Engine,
+ IN gctUINT32 Stencil
+ );
+
+/* Clear a Rect sub-surface. */
+gceSTATUS
+gco3D_ClearRect(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+/* Clear surface. */
+gceSTATUS
+gco3D_Clear(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+
+/* Clear tile status. */
+gceSTATUS
+gco3D_ClearTileStatus(
+ IN gco3D Engine,
+ IN gcsSURF_INFO_PTR Surface,
+ IN gctUINT32 TileStatusAddress,
+ IN gctUINT32 Flags
+ );
+
+/* Set shading mode. */
+gceSTATUS
+gco3D_SetShading(
+ IN gco3D Engine,
+ IN gceSHADING Shading
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_EnableBlending(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set blending function. */
+gceSTATUS
+gco3D_SetBlendFunction(
+ IN gco3D Engine,
+ IN gceBLEND_UNIT Unit,
+ IN gceBLEND_FUNCTION FunctionRGB,
+ IN gceBLEND_FUNCTION FunctionAlpha
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_SetBlendMode(
+ IN gco3D Engine,
+ IN gceBLEND_MODE ModeRGB,
+ IN gceBLEND_MODE ModeAlpha
+ );
+
+/* Set blending color. */
+gceSTATUS
+gco3D_SetBlendColor(
+ IN gco3D Engine,
+ IN gctUINT Red,
+ IN gctUINT Green,
+ IN gctUINT Blue,
+ IN gctUINT Alpha
+ );
+
+/* Set fixed point blending color. */
+gceSTATUS
+gco3D_SetBlendColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point blending color. */
+gceSTATUS
+gco3D_SetBlendColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set culling mode. */
+gceSTATUS
+gco3D_SetCulling(
+ IN gco3D Engine,
+ IN gceCULL Mode
+ );
+
+/* Enable point size */
+gceSTATUS
+gco3D_SetPointSizeEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set point sprite */
+gceSTATUS
+gco3D_SetPointSprite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set fill mode. */
+gceSTATUS
+gco3D_SetFill(
+ IN gco3D Engine,
+ IN gceFILL Mode
+ );
+
+/* Set depth compare mode. */
+gceSTATUS
+gco3D_SetDepthCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Enable depth writing. */
+gceSTATUS
+gco3D_EnableDepthWrite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth mode. */
+gceSTATUS
+gco3D_SetDepthMode(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeX(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFIXED_POINT Near,
+ IN gctFIXED_POINT Far
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeF(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFLOAT Near,
+ IN gctFLOAT Far
+ );
+
+/* Set last pixel enable */
+gceSTATUS
+gco3D_SetLastPixelEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth Bias and Scale */
+gceSTATUS
+gco3D_SetDepthScaleBiasX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT DepthScale,
+ IN gctFIXED_POINT DepthBias
+ );
+
+gceSTATUS
+gco3D_SetDepthScaleBiasF(
+ IN gco3D Engine,
+ IN gctFLOAT DepthScale,
+ IN gctFLOAT DepthBias
+ );
+
+/* Enable or disable dithering. */
+gceSTATUS
+gco3D_EnableDither(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set color write enable bits. */
+gceSTATUS
+gco3D_SetColorWrite(
+ IN gco3D Engine,
+ IN gctUINT8 Enable
+ );
+
+/* Enable or disable early depth. */
+gceSTATUS
+gco3D_SetEarlyDepth(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Enable or disable all early depth operations. */
+gceSTATUS
+gco3D_SetAllEarlyDepthModes(
+ IN gco3D Engine,
+ IN gctBOOL Disable
+ );
+
+/* Enable or disable depth-only mode. */
+gceSTATUS
+gco3D_SetDepthOnly(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+typedef struct _gcsSTENCIL_INFO * gcsSTENCIL_INFO_PTR;
+typedef struct _gcsSTENCIL_INFO
+{
+ gceSTENCIL_MODE mode;
+
+ gctUINT8 mask;
+ gctUINT8 writeMask;
+
+ gctUINT8 referenceFront;
+
+ gceCOMPARE compareFront;
+ gceSTENCIL_OPERATION passFront;
+ gceSTENCIL_OPERATION failFront;
+ gceSTENCIL_OPERATION depthFailFront;
+
+ gctUINT8 referenceBack;
+ gceCOMPARE compareBack;
+ gceSTENCIL_OPERATION passBack;
+ gceSTENCIL_OPERATION failBack;
+ gceSTENCIL_OPERATION depthFailBack;
+}
+gcsSTENCIL_INFO;
+
+/* Set stencil mode. */
+gceSTATUS
+gco3D_SetStencilMode(
+ IN gco3D Engine,
+ IN gceSTENCIL_MODE Mode
+ );
+
+/* Set stencil mask. */
+gceSTATUS
+gco3D_SetStencilMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil write mask. */
+gceSTATUS
+gco3D_SetStencilWriteMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil reference. */
+gceSTATUS
+gco3D_SetStencilReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference,
+ IN gctBOOL Front
+ );
+
+/* Set stencil compare. */
+gceSTATUS
+gco3D_SetStencilCompare(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceCOMPARE Compare
+ );
+
+/* Set stencil operation on pass. */
+gceSTATUS
+gco3D_SetStencilPass(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on fail. */
+gceSTATUS
+gco3D_SetStencilFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on depth fail. */
+gceSTATUS
+gco3D_SetStencilDepthFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set all stencil states in one blow. */
+gceSTATUS
+gco3D_SetStencilAll(
+ IN gco3D Engine,
+ IN gcsSTENCIL_INFO_PTR Info
+ );
+
+typedef struct _gcsALPHA_INFO * gcsALPHA_INFO_PTR;
+typedef struct _gcsALPHA_INFO
+{
+ /* Alpha test states. */
+ gctBOOL test;
+ gceCOMPARE compare;
+ gctUINT8 reference;
+
+ /* Alpha blending states. */
+ gctBOOL blend;
+
+ gceBLEND_FUNCTION srcFuncColor;
+ gceBLEND_FUNCTION srcFuncAlpha;
+ gceBLEND_FUNCTION trgFuncColor;
+ gceBLEND_FUNCTION trgFuncAlpha;
+
+ gceBLEND_MODE modeColor;
+ gceBLEND_MODE modeAlpha;
+
+ gctUINT32 color;
+}
+gcsALPHA_INFO;
+
+/* Enable or disable alpha test. */
+gceSTATUS
+gco3D_SetAlphaTest(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set alpha test compare. */
+gceSTATUS
+gco3D_SetAlphaCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Set alpha test reference in unsigned integer. */
+gceSTATUS
+gco3D_SetAlphaReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference
+ );
+
+/* Set alpha test reference in fixed point. */
+gceSTATUS
+gco3D_SetAlphaReferenceX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Reference
+ );
+
+/* Set alpha test reference in floating point. */
+gceSTATUS
+gco3D_SetAlphaReferenceF(
+ IN gco3D Engine,
+ IN gctFLOAT Reference
+ );
+
+/* Enable/Disable anti-alias line. */
+gceSTATUS
+gco3D_SetAntiAliasLine(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set texture slot for anti-alias line. */
+gceSTATUS
+gco3D_SetAALineTexSlot(
+ IN gco3D Engine,
+ IN gctUINT TexSlot
+ );
+
+/* Set anti-alias line width scale. */
+gceSTATUS
+gco3D_SetAALineWidth(
+ IN gco3D Engine,
+ IN gctFLOAT Width
+ );
+
+/* Draw a number of primitives. */
+gceSTATUS
+gco3D_DrawPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT StartVertex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+gceSTATUS
+gco3D_DrawPrimitivesCount(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT* StartVertex,
+ IN gctSIZE_T* VertexCount,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+
+/* Draw a number of primitives using offsets. */
+gceSTATUS
+gco3D_DrawPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives. */
+gceSTATUS
+gco3D_DrawIndexedPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT BaseVertex,
+ IN gctINT StartIndex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives using offsets. */
+gceSTATUS
+gco3D_DrawIndexedPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 BaseOffset,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Enable or disable anti-aliasing. */
+gceSTATUS
+gco3D_SetAntiAlias(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Write data into the command buffer. */
+gceSTATUS
+gco3D_WriteBuffer(
+ IN gco3D Engine,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Aligned
+ );
+
+/* Send sempahore and stall until sempahore is signalled. */
+gceSTATUS
+gco3D_Semaphore(
+ IN gco3D Engine,
+ IN gceWHERE From,
+ IN gceWHERE To,
+ IN gceHOW How);
+
+/* Set the subpixels center. */
+gceSTATUS
+gco3D_SetCentroids(
+ IN gco3D Engine,
+ IN gctUINT32 Index,
+ IN gctPOINTER Centroids
+ );
+
+gceSTATUS
+gco3D_SetLogicOp(
+ IN gco3D Engine,
+ IN gctUINT8 Rop
+ );
+
+/* OCL thread walker information. */
+typedef struct _gcsTHREAD_WALKER_INFO * gcsTHREAD_WALKER_INFO_PTR;
+typedef struct _gcsTHREAD_WALKER_INFO
+{
+ gctUINT32 dimensions;
+ gctUINT32 traverseOrder;
+ gctUINT32 enableSwathX;
+ gctUINT32 enableSwathY;
+ gctUINT32 enableSwathZ;
+ gctUINT32 swathSizeX;
+ gctUINT32 swathSizeY;
+ gctUINT32 swathSizeZ;
+ gctUINT32 valueOrder;
+
+ gctUINT32 globalSizeX;
+ gctUINT32 globalOffsetX;
+ gctUINT32 globalSizeY;
+ gctUINT32 globalOffsetY;
+ gctUINT32 globalSizeZ;
+ gctUINT32 globalOffsetZ;
+
+ gctUINT32 workGroupSizeX;
+ gctUINT32 workGroupCountX;
+ gctUINT32 workGroupSizeY;
+ gctUINT32 workGroupCountY;
+ gctUINT32 workGroupSizeZ;
+ gctUINT32 workGroupCountZ;
+
+ gctUINT32 threadAllocation;
+}
+gcsTHREAD_WALKER_INFO;
+
+/* Start OCL thread walker. */
+gceSTATUS
+gco3D_InvokeThreadWalker(
+ IN gco3D Engine,
+ IN gcsTHREAD_WALKER_INFO_PTR Info
+ );
+
+/*----------------------------------------------------------------------------*/
+/*-------------------------- gco3D Fragment Processor ------------------------*/
+
+/* Set the fragment processor configuration. */
+gceSTATUS
+gco3D_SetFragmentConfiguration(
+ IN gco3D Engine,
+ IN gctBOOL ColorFromStream,
+ IN gctBOOL EnableFog,
+ IN gctBOOL EnableSmoothPoint,
+ IN gctUINT32 ClipPlanes
+ );
+
+/* Enable/disable texture stage operation. */
+gceSTATUS
+gco3D_EnableTextureStage(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL Enable
+ );
+
+/* Program the channel enable masks for the color texture function. */
+gceSTATUS
+gco3D_SetTextureColorMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the channel enable masks for the alpha texture function. */
+gceSTATUS
+gco3D_SetTextureAlphaMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the constant fragment color. */
+gceSTATUS
+gco3D_SetFragmentColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFragmentColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant fog color. */
+gceSTATUS
+gco3D_SetFogColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFogColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant texture color. */
+gceSTATUS
+gco3D_SetTetxureColorX(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetTetxureColorF(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Configure color texture function. */
+gceSTATUS
+gco3D_SetColorTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+/* Configure alpha texture function. */
+gceSTATUS
+gco3D_SetAlphaTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+/* Invoke OCL thread walker. */
+gceSTATUS
+gcoHARDWARE_InvokeThreadWalker(
+ IN gcsTHREAD_WALKER_INFO_PTR Info
+ );
+
+/******************************************************************************\
+******************************* gcoTEXTURE Object *******************************
+\******************************************************************************/
+
+/* Cube faces. */
+typedef enum _gceTEXTURE_FACE
+{
+ gcvFACE_NONE,
+ gcvFACE_POSITIVE_X,
+ gcvFACE_NEGATIVE_X,
+ gcvFACE_POSITIVE_Y,
+ gcvFACE_NEGATIVE_Y,
+ gcvFACE_POSITIVE_Z,
+ gcvFACE_NEGATIVE_Z,
+}
+gceTEXTURE_FACE;
+
+typedef struct _gcsTEXTURE
+{
+ /* Addressing modes. */
+ gceTEXTURE_ADDRESSING s;
+ gceTEXTURE_ADDRESSING t;
+ gceTEXTURE_ADDRESSING r;
+
+ /* Border color. */
+ gctUINT8 border[4];
+
+ /* Filters. */
+ gceTEXTURE_FILTER minFilter;
+ gceTEXTURE_FILTER magFilter;
+ gceTEXTURE_FILTER mipFilter;
+ gctUINT anisoFilter;
+
+ /* Level of detail. */
+ gctFIXED_POINT lodBias;
+ gctFIXED_POINT lodMin;
+ gctFIXED_POINT lodMax;
+}
+gcsTEXTURE, * gcsTEXTURE_PTR;
+
+/* Construct a new gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Construct(
+ IN gcoHAL Hal,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Construct a new sized gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_ConstructSized(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gctUINT MipMapCount,
+ IN gcePOOL Pool,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Destroy an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Destroy(
+ IN gcoTEXTURE Texture
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Upload(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadSub(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload compressed data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadCompressed(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get gcoSURF object for a mipmap level. */
+gceSTATUS
+gcoTEXTURE_GetMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ OUT gcoSURF * Surface
+ );
+
+/* Get gcoSURF object for a mipmap level and face offset. */
+gceSTATUS
+gcoTEXTURE_GetMipMapFace(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ OUT gcoSURF * Surface,
+ OUT gctUINT32_PTR Offset
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromClient(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromSurface(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_SetEndianHint(
+ IN gcoTEXTURE Texture,
+ IN gceENDIAN_HINT EndianHint
+ );
+
+gceSTATUS
+gcoTEXTURE_Disable(
+ IN gcoHAL Hal,
+ IN gctINT Sampler
+ );
+
+gceSTATUS
+gcoTEXTURE_Flush(
+ IN gcoTEXTURE Texture
+ );
+
+gceSTATUS
+gcoTEXTURE_QueryCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoTEXTURE_GetClosestFormat(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT InFormat,
+ OUT gceSURF_FORMAT* OutFormat
+ );
+
+gceSTATUS
+gcoTEXTURE_RenderIntoMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsRenderable(
+ IN gcoTEXTURE Texture,
+ IN gctUINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsComplete(
+ IN gcoTEXTURE Texture,
+ IN gctINT MaxLevel
+ );
+
+gceSTATUS
+gcoTEXTURE_BindTexture(
+ IN gcoTEXTURE Texture,
+ IN gctINT Target,
+ IN gctINT Sampler,
+ IN gcsTEXTURE_PTR Info
+ );
+
+/******************************************************************************\
+******************************* gcoSTREAM Object ******************************
+\******************************************************************************/
+
+typedef enum _gceVERTEX_FORMAT
+{
+ gcvVERTEX_BYTE,
+ gcvVERTEX_UNSIGNED_BYTE,
+ gcvVERTEX_SHORT,
+ gcvVERTEX_UNSIGNED_SHORT,
+ gcvVERTEX_INT,
+ gcvVERTEX_UNSIGNED_INT,
+ gcvVERTEX_FIXED,
+ gcvVERTEX_HALF,
+ gcvVERTEX_FLOAT,
+ gcvVERTEX_UNSIGNED_INT_10_10_10_2,
+ gcvVERTEX_INT_10_10_10_2,
+}
+gceVERTEX_FORMAT;
+
+gceSTATUS
+gcoSTREAM_Construct(
+ IN gcoHAL Hal,
+ OUT gcoSTREAM * Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Destroy(
+ IN gcoSTREAM Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Upload(
+ IN gcoSTREAM Stream,
+ IN gctCONST_POINTER Buffer,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Dynamic
+ );
+
+gceSTATUS
+gcoSTREAM_SetStride(
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoSTREAM_Lock(
+ IN gcoSTREAM Stream,
+ OUT gctPOINTER * Logical,
+ OUT gctUINT32 * Physical
+ );
+
+gceSTATUS
+gcoSTREAM_Unlock(
+ IN gcoSTREAM Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Reserve(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoSTREAM_Flush(
+ IN gcoSTREAM Stream
+ );
+
+/* Dynamic buffer API. */
+gceSTATUS
+gcoSTREAM_SetDynamic(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+typedef struct _gcsSTREAM_INFO
+{
+ gctUINT index;
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT components;
+ gctSIZE_T size;
+ gctCONST_POINTER data;
+ gctUINT stride;
+}
+gcsSTREAM_INFO, * gcsSTREAM_INFO_PTR;
+
+gceSTATUS
+gcoSTREAM_UploadDynamic(
+ IN gcoSTREAM Stream,
+ IN gctUINT VertexCount,
+ IN gctUINT InfoCount,
+ IN gcsSTREAM_INFO_PTR Info,
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoSTREAM_CPUCacheOperation(
+ IN gcoSTREAM Stream,
+ IN gceCACHEOPERATION Operation
+ );
+
+/******************************************************************************\
+******************************** gcoVERTEX Object ******************************
+\******************************************************************************/
+
+typedef struct _gcsVERTEX_ATTRIBUTES
+{
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT32 components;
+ gctSIZE_T size;
+ gctUINT32 stream;
+ gctUINT32 offset;
+ gctUINT32 stride;
+}
+gcsVERTEX_ATTRIBUTES;
+
+gceSTATUS
+gcoVERTEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVERTEX * Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Destroy(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Reset(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_EnableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index,
+ IN gceVERTEX_FORMAT Format,
+ IN gctBOOL Normalized,
+ IN gctUINT32 Components,
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoVERTEX_DisableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index
+ );
+
+gceSTATUS
+gcoVERTEX_Bind(
+ IN gcoVERTEX Vertex
+ );
+
+/*******************************************************************************
+***** gcoVERTEXARRAY Object ***************************************************/
+
+typedef struct _gcsVERTEXARRAY
+{
+ /* Enabled. */
+ gctBOOL enable;
+
+ /* Number of components. */
+ gctINT size;
+
+ /* Attribute format. */
+ gceVERTEX_FORMAT format;
+
+ /* Flag whether the attribute is normalized or not. */
+ gctBOOL normalized;
+
+ /* Stride of the component. */
+ gctUINT stride;
+
+ /* Pointer to the attribute data. */
+ gctCONST_POINTER pointer;
+
+ /* Stream object owning the attribute data. */
+ gcoSTREAM stream;
+
+ /* Generic values for attribute. */
+ gctFLOAT genericValue[4];
+
+ /* Vertex shader linkage. */
+ gctUINT linkage;
+}
+gcsVERTEXARRAY,
+* gcsVERTEXARRAY_PTR;
+
+gceSTATUS
+gcoVERTEXARRAY_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVERTEXARRAY * Vertex
+ );
+
+gceSTATUS
+gcoVERTEXARRAY_Destroy(
+ IN gcoVERTEXARRAY Vertex
+ );
+
+gceSTATUS
+gcoVERTEXARRAY_Bind(
+ IN gcoVERTEXARRAY Vertex,
+ IN gctUINT32 EnableBits,
+ IN gcsVERTEXARRAY_PTR VertexArray,
+ IN gctUINT First,
+ IN gctSIZE_T Count,
+ IN gceINDEX_TYPE IndexType,
+ IN gcoINDEX IndexObject,
+ IN gctPOINTER IndexMemory,
+ IN OUT gcePRIMITIVE * PrimitiveType,
+ IN OUT gctUINT * PrimitiveCount
+ );
+
+/*******************************************************************************
+***** Composition *************************************************************/
+
+typedef enum _gceCOMPOSITION
+{
+ gcvCOMPOSE_CLEAR = 1,
+ gcvCOMPOSE_BLUR,
+ gcvCOMPOSE_DIM,
+ gcvCOMPOSE_LAYER
+}
+gceCOMPOSITION;
+
+typedef struct _gcsCOMPOSITION * gcsCOMPOSITION_PTR;
+typedef struct _gcsCOMPOSITION
+{
+ /* Structure size. */
+ gctUINT structSize;
+
+ /* Composition operation. */
+ gceCOMPOSITION operation;
+
+ /* Layer to be composed. */
+ gcoSURF layer;
+
+ /* Source and target coordinates. */
+ gcsRECT srcRect;
+ gcsRECT trgRect;
+
+ /* Target rectangle */
+ gcsPOINT v0;
+ gcsPOINT v1;
+ gcsPOINT v2;
+
+ /* Blending parameters. */
+ gctBOOL enableBlending;
+ gctBOOL premultiplied;
+ gctUINT8 alphaValue;
+
+ /* Clear color. */
+ gctFLOAT r;
+ gctFLOAT g;
+ gctFLOAT b;
+ gctFLOAT a;
+}
+gcsCOMPOSITION;
+
+gceSTATUS
+gco3D_ProbeComposition(
+ gctBOOL ResetIfEmpty
+ );
+
+gceSTATUS
+gco3D_CompositionBegin(
+ void
+ );
+
+gceSTATUS
+gco3D_ComposeLayer(
+ IN gcsCOMPOSITION_PTR Layer
+ );
+
+gceSTATUS
+gco3D_CompositionSignals(
+ IN gctHANDLE Process,
+ IN gctSIGNAL Signal1,
+ IN gctSIGNAL Signal2
+ );
+
+gceSTATUS
+gco3D_CompositionEnd(
+ IN gcoSURF Target,
+ IN gctBOOL Synchronous
+ );
+
+/* Frame Database */
+gceSTATUS
+gcoHAL_AddFrameDB(
+ void
+ );
+
+gceSTATUS
+gcoHAL_DumpFrameDB(
+ gctCONST_STRING Filename OPTIONAL
+ );
+
+gceSTATUS
+gcoHAL_GetSharedInfo(
+ IN gctUINT32 Pid,
+ IN gctUINT32 DataId,
+ OUT gctUINT8_PTR Data,
+ IN gctSIZE_T Bytes,
+ IN gcuVIDMEM_NODE_PTR Node,
+ OUT gctUINT8_PTR NodeData,
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE SharedInfoType
+ );
+
+gceSTATUS
+gcoHAL_SetSharedInfo(
+ IN gctUINT32 DataId,
+ IN gctUINT8_PTR Data,
+ IN gctSIZE_T Bytes,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctUINT8_PTR NodeData,
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE SharedInfoType
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VIVANTE_NO_3D */
+#endif /* __gc_hal_engine_h_ */
diff --git a/src/include_imx6/gc_hal_engine_vg.h b/src/include_imx6/gc_hal_engine_vg.h
new file mode 100644
index 0000000..571e03e
--- /dev/null
+++ b/src/include_imx6/gc_hal_engine_vg.h
@@ -0,0 +1,908 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+
+
+#ifndef __gc_hal_engine_vg_h_
+#define __gc_hal_engine_vg_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "gc_hal_types.h"
+
+/******************************************************************************\
+******************************** VG Enumerations *******************************
+\******************************************************************************/
+
+/**
+** @ingroup gcoVG
+**
+** @brief Tiling mode for painting and imagig.
+**
+** This enumeration defines the tiling modes supported by the HAL. This is
+** in fact a one-to-one mapping of the OpenVG 1.1 tile modes.
+*/
+typedef enum _gceTILE_MODE
+{
+ gcvTILE_FILL,
+ gcvTILE_PAD,
+ gcvTILE_REPEAT,
+ gcvTILE_REFLECT
+}
+gceTILE_MODE;
+
+/******************************************************************************/
+/** @ingroup gcoVG
+**
+** @brief The different paint modes.
+**
+** This enumeration lists the available paint modes.
+*/
+typedef enum _gcePAINT_TYPE
+{
+ /** Solid color. */
+ gcvPAINT_MODE_SOLID,
+
+ /** Linear gradient. */
+ gcvPAINT_MODE_LINEAR,
+
+ /** Radial gradient. */
+ gcvPAINT_MODE_RADIAL,
+
+ /** Pattern. */
+ gcvPAINT_MODE_PATTERN,
+
+ /** Mode count. */
+ gcvPAINT_MODE_COUNT
+}
+gcePAINT_TYPE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Types of path data supported by HAL.
+**
+** This enumeration defines the types of path data supported by the HAL.
+** This is in fact a one-to-one mapping of the OpenVG 1.1 path types.
+*/
+typedef enum _gcePATHTYPE
+{
+ gcePATHTYPE_UNKNOWN = -1,
+ gcePATHTYPE_INT8,
+ gcePATHTYPE_INT16,
+ gcePATHTYPE_INT32,
+ gcePATHTYPE_FLOAT
+}
+gcePATHTYPE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Supported path segment commands.
+**
+** This enumeration defines the path segment commands supported by the HAL.
+*/
+typedef enum _gceVGCMD
+{
+ gcvVGCMD_END, /* 0: GCCMD_TS_OPCODE_END */
+ gcvVGCMD_CLOSE, /* 1: GCCMD_TS_OPCODE_CLOSE */
+ gcvVGCMD_MOVE, /* 2: GCCMD_TS_OPCODE_MOVE */
+ gcvVGCMD_MOVE_REL, /* 3: GCCMD_TS_OPCODE_MOVE_REL */
+ gcvVGCMD_LINE, /* 4: GCCMD_TS_OPCODE_LINE */
+ gcvVGCMD_LINE_REL, /* 5: GCCMD_TS_OPCODE_LINE_REL */
+ gcvVGCMD_QUAD, /* 6: GCCMD_TS_OPCODE_QUADRATIC */
+ gcvVGCMD_QUAD_REL, /* 7: GCCMD_TS_OPCODE_QUADRATIC_REL */
+ gcvVGCMD_CUBIC, /* 8: GCCMD_TS_OPCODE_CUBIC */
+ gcvVGCMD_CUBIC_REL, /* 9: GCCMD_TS_OPCODE_CUBIC_REL */
+ gcvVGCMD_BREAK, /* 10: GCCMD_TS_OPCODE_BREAK */
+ gcvVGCMD_HLINE, /* 11: ******* R E S E R V E D *******/
+ gcvVGCMD_HLINE_REL, /* 12: ******* R E S E R V E D *******/
+ gcvVGCMD_VLINE, /* 13: ******* R E S E R V E D *******/
+ gcvVGCMD_VLINE_REL, /* 14: ******* R E S E R V E D *******/
+ gcvVGCMD_SQUAD, /* 15: ******* R E S E R V E D *******/
+ gcvVGCMD_SQUAD_REL, /* 16: ******* R E S E R V E D *******/
+ gcvVGCMD_SCUBIC, /* 17: ******* R E S E R V E D *******/
+ gcvVGCMD_SCUBIC_REL, /* 18: ******* R E S E R V E D *******/
+ gcvVGCMD_SCCWARC, /* 19: ******* R E S E R V E D *******/
+ gcvVGCMD_SCCWARC_REL, /* 20: ******* R E S E R V E D *******/
+ gcvVGCMD_SCWARC, /* 21: ******* R E S E R V E D *******/
+ gcvVGCMD_SCWARC_REL, /* 22: ******* R E S E R V E D *******/
+ gcvVGCMD_LCCWARC, /* 23: ******* R E S E R V E D *******/
+ gcvVGCMD_LCCWARC_REL, /* 24: ******* R E S E R V E D *******/
+ gcvVGCMD_LCWARC, /* 25: ******* R E S E R V E D *******/
+ gcvVGCMD_LCWARC_REL, /* 26: ******* R E S E R V E D *******/
+
+ /* The width of the command recognized by the hardware on bits. */
+ gcvVGCMD_WIDTH = 5,
+
+ /* Hardware command mask. */
+ gcvVGCMD_MASK = (1 << gcvVGCMD_WIDTH) - 1,
+
+ /* Command modifiers. */
+ gcvVGCMD_H_MOD = 1 << gcvVGCMD_WIDTH, /* = 32 */
+ gcvVGCMD_V_MOD = 2 << gcvVGCMD_WIDTH, /* = 64 */
+ gcvVGCMD_S_MOD = 3 << gcvVGCMD_WIDTH, /* = 96 */
+ gcvVGCMD_ARC_MOD = 4 << gcvVGCMD_WIDTH, /* = 128 */
+
+ /* Emulated LINE commands. */
+ gcvVGCMD_HLINE_EMUL = gcvVGCMD_H_MOD | gcvVGCMD_LINE, /* = 36 */
+ gcvVGCMD_HLINE_EMUL_REL = gcvVGCMD_H_MOD | gcvVGCMD_LINE_REL, /* = 37 */
+ gcvVGCMD_VLINE_EMUL = gcvVGCMD_V_MOD | gcvVGCMD_LINE, /* = 68 */
+ gcvVGCMD_VLINE_EMUL_REL = gcvVGCMD_V_MOD | gcvVGCMD_LINE_REL, /* = 69 */
+
+ /* Emulated SMOOTH commands. */
+ gcvVGCMD_SQUAD_EMUL = gcvVGCMD_S_MOD | gcvVGCMD_QUAD, /* = 102 */
+ gcvVGCMD_SQUAD_EMUL_REL = gcvVGCMD_S_MOD | gcvVGCMD_QUAD_REL, /* = 103 */
+ gcvVGCMD_SCUBIC_EMUL = gcvVGCMD_S_MOD | gcvVGCMD_CUBIC, /* = 104 */
+ gcvVGCMD_SCUBIC_EMUL_REL = gcvVGCMD_S_MOD | gcvVGCMD_CUBIC_REL, /* = 105 */
+
+ /* Emulation ARC commands. */
+ gcvVGCMD_ARC_LINE = gcvVGCMD_ARC_MOD | gcvVGCMD_LINE, /* = 132 */
+ gcvVGCMD_ARC_LINE_REL = gcvVGCMD_ARC_MOD | gcvVGCMD_LINE_REL, /* = 133 */
+ gcvVGCMD_ARC_QUAD = gcvVGCMD_ARC_MOD | gcvVGCMD_QUAD, /* = 134 */
+ gcvVGCMD_ARC_QUAD_REL = gcvVGCMD_ARC_MOD | gcvVGCMD_QUAD_REL /* = 135 */
+}
+gceVGCMD;
+typedef enum _gceVGCMD * gceVGCMD_PTR;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Blending modes supported by the HAL.
+**
+** This enumeration defines the blending modes supported by the HAL. This is
+** in fact a one-to-one mapping of the OpenVG 1.1 blending modes.
+*/
+typedef enum _gceVG_BLEND
+{
+ gcvVG_BLEND_SRC,
+ gcvVG_BLEND_SRC_OVER,
+ gcvVG_BLEND_DST_OVER,
+ gcvVG_BLEND_SRC_IN,
+ gcvVG_BLEND_DST_IN,
+ gcvVG_BLEND_MULTIPLY,
+ gcvVG_BLEND_SCREEN,
+ gcvVG_BLEND_DARKEN,
+ gcvVG_BLEND_LIGHTEN,
+ gcvVG_BLEND_ADDITIVE,
+ gcvVG_BLEND_SUBTRACT,
+ gcvVG_BLEND_FILTER
+}
+gceVG_BLEND;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Image modes supported by the HAL.
+**
+** This enumeration defines the image modes supported by the HAL. This is
+** in fact a one-to-one mapping of the OpenVG 1.1 image modes with the addition
+** of NO IMAGE.
+*/
+typedef enum _gceVG_IMAGE
+{
+ gcvVG_IMAGE_NONE,
+ gcvVG_IMAGE_NORMAL,
+ gcvVG_IMAGE_MULTIPLY,
+ gcvVG_IMAGE_STENCIL,
+ gcvVG_IMAGE_FILTER
+}
+gceVG_IMAGE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Filter mode patterns and imaging.
+**
+** This enumeration defines the filter modes supported by the HAL.
+*/
+typedef enum _gceIMAGE_FILTER
+{
+ gcvFILTER_POINT,
+ gcvFILTER_LINEAR,
+ gcvFILTER_BI_LINEAR
+}
+gceIMAGE_FILTER;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Primitive modes supported by the HAL.
+**
+** This enumeration defines the primitive modes supported by the HAL.
+*/
+typedef enum _gceVG_PRIMITIVE
+{
+ gcvVG_SCANLINE,
+ gcvVG_RECTANGLE,
+ gcvVG_TESSELLATED,
+ gcvVG_TESSELLATED_TILED
+}
+gceVG_PRIMITIVE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Rendering quality modes supported by the HAL.
+**
+** This enumeration defines the rendering quality modes supported by the HAL.
+*/
+typedef enum _gceRENDER_QUALITY
+{
+ gcvVG_NONANTIALIASED,
+ gcvVG_2X2_MSAA,
+ gcvVG_2X4_MSAA,
+ gcvVG_4X4_MSAA
+}
+gceRENDER_QUALITY;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Fill rules supported by the HAL.
+**
+** This enumeration defines the fill rules supported by the HAL.
+*/
+typedef enum _gceFILL_RULE
+{
+ gcvVG_EVEN_ODD,
+ gcvVG_NON_ZERO
+}
+gceFILL_RULE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Cap styles supported by the HAL.
+**
+** This enumeration defines the cap styles supported by the HAL.
+*/
+typedef enum _gceCAP_STYLE
+{
+ gcvCAP_BUTT,
+ gcvCAP_ROUND,
+ gcvCAP_SQUARE
+}
+gceCAP_STYLE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Join styles supported by the HAL.
+**
+** This enumeration defines the join styles supported by the HAL.
+*/
+typedef enum _gceJOIN_STYLE
+{
+ gcvJOIN_MITER,
+ gcvJOIN_ROUND,
+ gcvJOIN_BEVEL
+}
+gceJOIN_STYLE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Channel mask values.
+**
+** This enumeration defines the values for channel mask used in image
+** filtering.
+*/
+
+/* Base values for channel mask definitions. */
+#define gcvCHANNEL_X (0)
+#define gcvCHANNEL_R (1 << 0)
+#define gcvCHANNEL_G (1 << 1)
+#define gcvCHANNEL_B (1 << 2)
+#define gcvCHANNEL_A (1 << 3)
+
+typedef enum _gceCHANNEL
+{
+ gcvCHANNEL_XXXX = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_XXXA = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_XXBX = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_XXBA = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_A),
+
+ gcvCHANNEL_XGXX = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_XGXA = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_XGBX = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_XGBA = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_A),
+
+ gcvCHANNEL_RXXX = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_RXXA = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_RXBX = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_RXBA = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_A),
+
+ gcvCHANNEL_RGXX = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_RGXA = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_RGBX = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_RGBA = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_A),
+}
+gceCHANNEL;
+
+/******************************************************************************\
+******************************** VG Structures *******************************
+\******************************************************************************/
+
+/**
+** @ingroup gcoVG
+**
+** @brief Definition of the color ramp used by the gradient paints.
+**
+** The gcsCOLOR_RAMP structure defines the layout of one single color inside
+** a color ramp which is used by gradient paints.
+*/
+typedef struct _gcsCOLOR_RAMP
+{
+ /** Value for the color stop. */
+ gctFLOAT stop;
+
+ /** Red color channel value for the color stop. */
+ gctFLOAT red;
+
+ /** Green color channel value for the color stop. */
+ gctFLOAT green;
+
+ /** Blue color channel value for the color stop. */
+ gctFLOAT blue;
+
+ /** Alpha color channel value for the color stop. */
+ gctFLOAT alpha;
+}
+gcsCOLOR_RAMP, * gcsCOLOR_RAMP_PTR;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Definition of the color ramp used by the gradient paints in fixed form.
+**
+** The gcsCOLOR_RAMP structure defines the layout of one single color inside
+** a color ramp which is used by gradient paints.
+*/
+typedef struct _gcsFIXED_COLOR_RAMP
+{
+ /** Value for the color stop. */
+ gctFIXED_POINT stop;
+
+ /** Red color channel value for the color stop. */
+ gctFIXED_POINT red;
+
+ /** Green color channel value for the color stop. */
+ gctFIXED_POINT green;
+
+ /** Blue color channel value for the color stop. */
+ gctFIXED_POINT blue;
+
+ /** Alpha color channel value for the color stop. */
+ gctFIXED_POINT alpha;
+}
+gcsFIXED_COLOR_RAMP, * gcsFIXED_COLOR_RAMP_PTR;
+
+
+/**
+** @ingroup gcoVG
+**
+** @brief Rectangle structure used by the gcoVG object.
+**
+** This structure defines the layout of a rectangle. Make sure width and
+** height are larger than 0.
+*/
+typedef struct _gcsVG_RECT * gcsVG_RECT_PTR;
+typedef struct _gcsVG_RECT
+{
+ /** Left location of the rectangle. */
+ gctINT x;
+
+ /** Top location of the rectangle. */
+ gctINT y;
+
+ /** Width of the rectangle. */
+ gctINT width;
+
+ /** Height of the rectangle. */
+ gctINT height;
+}
+gcsVG_RECT;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Path command buffer attribute structure.
+**
+** The gcsPATH_BUFFER_INFO structure contains the specifics about
+** the layout of the path data command buffer.
+*/
+typedef struct _gcsPATH_BUFFER_INFO * gcsPATH_BUFFER_INFO_PTR;
+typedef struct _gcsPATH_BUFFER_INFO
+{
+ gctUINT reservedForHead;
+ gctUINT reservedForTail;
+}
+gcsPATH_BUFFER_INFO;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Definition of the path data container structure.
+**
+** The gcsPATH structure defines the layout of the path data container.
+*/
+typedef struct _gcsPATH_DATA * gcsPATH_DATA_PTR;
+typedef struct _gcsPATH_DATA
+{
+ /* Data container in command buffer format. */
+ gcsCMDBUFFER data;
+
+ /* Path data type. */
+ gcePATHTYPE dataType;
+}
+gcsPATH_DATA;
+
+
+/******************************************************************************\
+********************************* gcoHAL Object ********************************
+\******************************************************************************/
+
+/* Query path data storage attributes. */
+gceSTATUS
+gcoHAL_QueryPathStorage(
+ IN gcoHAL Hal,
+ OUT gcsPATH_BUFFER_INFO_PTR Information
+ );
+
+/* Associate a completion signal with the command buffer. */
+gceSTATUS
+gcoHAL_AssociateCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Release the current command buffer completion signal. */
+gceSTATUS
+gcoHAL_DeassociateCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Verify whether the command buffer is still in use. */
+gceSTATUS
+gcoHAL_CheckCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Wait until the command buffer is no longer in use. */
+gceSTATUS
+gcoHAL_WaitCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Flush the pixel cache. */
+gceSTATUS
+gcoHAL_Flush(
+ IN gcoHAL Hal
+ );
+
+/* Split a harwdare address into pool and offset. */
+gceSTATUS
+gcoHAL_SplitAddress(
+ IN gcoHAL Hal,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Combine pool and offset into a harwdare address. */
+gceSTATUS
+gcoHAL_CombineAddress(
+ IN gcoHAL Hal,
+ IN gcePOOL Pool,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Schedule to free linear video memory allocated. */
+gceSTATUS
+gcoHAL_ScheduleVideoMemory(
+ IN gcoHAL Hal,
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/* Free linear video memory allocated with gcoHAL_AllocateLinearVideoMemory. */
+gceSTATUS
+gcoHAL_FreeVideoMemory(
+ IN gcoHAL Hal,
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/* Query command buffer attributes. */
+gceSTATUS
+gcoHAL_QueryCommandBuffer(
+ IN gcoHAL Hal,
+ OUT gcsCOMMAND_BUFFER_INFO_PTR Information
+ );
+/* Allocate and lock linear video memory. */
+gceSTATUS
+gcoHAL_AllocateLinearVideoMemory(
+ IN gcoHAL Hal,
+ IN gctUINT Size,
+ IN gctUINT Alignment,
+ IN gcePOOL Pool,
+ OUT gcuVIDMEM_NODE_PTR * Node,
+ OUT gctUINT32 * Address,
+ OUT gctPOINTER * Memory
+ );
+
+/* Align the specified size accordingly to the hardware requirements. */
+gceSTATUS
+gcoHAL_GetAlignedSurfaceSize(
+ IN gcoHAL Hal,
+ IN gceSURF_TYPE Type,
+ IN OUT gctUINT32_PTR Width,
+ IN OUT gctUINT32_PTR Height
+ );
+
+gceSTATUS
+gcoHAL_ReserveTask(
+ IN gcoHAL Hal,
+ IN gceBLOCK Block,
+ IN gctUINT TaskCount,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+/******************************************************************************\
+********************************** gcoVG Object ********************************
+\******************************************************************************/
+
+/** @defgroup gcoVG gcoVG
+**
+** The gcoVG object abstracts the VG hardware pipe.
+*/
+
+gctBOOL
+gcoVG_IsMaskSupported(
+ IN gceSURF_FORMAT Format
+ );
+
+gctBOOL
+gcoVG_IsTargetSupported(
+ IN gceSURF_FORMAT Format
+ );
+
+gctBOOL
+gcoVG_IsImageSupported(
+ IN gceSURF_FORMAT Format
+ );
+
+gctUINT8 gcoVG_PackColorComponent(
+ gctFLOAT Value
+ );
+
+gceSTATUS
+gcoVG_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVG * Vg
+ );
+
+gceSTATUS
+gcoVG_Destroy(
+ IN gcoVG Vg
+ );
+
+gceSTATUS
+gcoVG_SetTarget(
+ IN gcoVG Vg,
+ IN gcoSURF Target
+ );
+
+gceSTATUS
+gcoVG_UnsetTarget(
+ IN gcoVG Vg,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoVG_SetUserToSurface(
+ IN gcoVG Vg,
+ IN gctFLOAT UserToSurface[9]
+ );
+
+gceSTATUS
+gcoVG_SetSurfaceToImage(
+ IN gcoVG Vg,
+ IN gctFLOAT SurfaceToImage[9]
+ );
+
+gceSTATUS
+gcoVG_EnableMask(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoVG_SetMask(
+ IN gcoVG Vg,
+ IN gcoSURF Mask
+ );
+
+gceSTATUS
+gcoVG_UnsetMask(
+ IN gcoVG Vg,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoVG_FlushMask(
+ IN gcoVG Vg
+ );
+
+gceSTATUS
+gcoVG_EnableScissor(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoVG_SetScissor(
+ IN gcoVG Vg,
+ IN gctSIZE_T RectangleCount,
+ IN gcsVG_RECT_PTR Rectangles
+ );
+
+gceSTATUS
+gcoVG_EnableColorTransform(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoVG_SetColorTransform(
+ IN gcoVG Vg,
+ IN gctFLOAT ColorTransform[8]
+ );
+
+gceSTATUS
+gcoVG_SetTileFillColor(
+ IN gcoVG Vg,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+gceSTATUS
+gcoVG_SetSolidPaint(
+ IN gcoVG Vg,
+ IN gctUINT8 Red,
+ IN gctUINT8 Green,
+ IN gctUINT8 Blue,
+ IN gctUINT8 Alpha
+ );
+
+gceSTATUS
+gcoVG_SetLinearPaint(
+ IN gcoVG Vg,
+ IN gctFLOAT Constant,
+ IN gctFLOAT StepX,
+ IN gctFLOAT StepY
+ );
+
+gceSTATUS
+gcoVG_SetRadialPaint(
+ IN gcoVG Vg,
+ IN gctFLOAT LinConstant,
+ IN gctFLOAT LinStepX,
+ IN gctFLOAT LinStepY,
+ IN gctFLOAT RadConstant,
+ IN gctFLOAT RadStepX,
+ IN gctFLOAT RadStepY,
+ IN gctFLOAT RadStepXX,
+ IN gctFLOAT RadStepYY,
+ IN gctFLOAT RadStepXY
+ );
+
+gceSTATUS
+gcoVG_SetPatternPaint(
+ IN gcoVG Vg,
+ IN gctFLOAT UConstant,
+ IN gctFLOAT UStepX,
+ IN gctFLOAT UStepY,
+ IN gctFLOAT VConstant,
+ IN gctFLOAT VStepX,
+ IN gctFLOAT VStepY,
+ IN gctBOOL Linear
+ );
+
+gceSTATUS
+gcoVG_SetColorRamp(
+ IN gcoVG Vg,
+ IN gcoSURF ColorRamp,
+ IN gceTILE_MODE ColorRampSpreadMode
+ );
+
+gceSTATUS
+gcoVG_SetPattern(
+ IN gcoVG Vg,
+ IN gcoSURF Pattern,
+ IN gceTILE_MODE TileMode,
+ IN gceIMAGE_FILTER Filter
+ );
+
+gceSTATUS
+gcoVG_SetImageMode(
+ IN gcoVG Vg,
+ IN gceVG_IMAGE Mode
+ );
+
+gceSTATUS
+gcoVG_SetBlendMode(
+ IN gcoVG Vg,
+ IN gceVG_BLEND Mode
+ );
+
+gceSTATUS
+gcoVG_SetRenderingQuality(
+ IN gcoVG Vg,
+ IN gceRENDER_QUALITY Quality
+ );
+
+gceSTATUS
+gcoVG_SetFillRule(
+ IN gcoVG Vg,
+ IN gceFILL_RULE FillRule
+ );
+
+gceSTATUS
+gcoVG_FinalizePath(
+ IN gcoVG Vg,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+gceSTATUS
+gcoVG_Clear(
+ IN gcoVG Vg,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_DrawPath(
+ IN gcoVG Vg,
+ IN gcsPATH_DATA_PTR PathData,
+ IN gctFLOAT Scale,
+ IN gctFLOAT Bias,
+ IN gctBOOL SoftwareTesselation
+ );
+
+gceSTATUS
+gcoVG_DrawImage(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gcsSIZE_PTR SourceSize,
+ IN gctINT SourceX,
+ IN gctINT SourceY,
+ IN gctINT TargetX,
+ IN gctINT TargetY,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctBOOL Mask
+ );
+
+gceSTATUS
+gcoVG_TesselateImage(
+ IN gcoVG Vg,
+ IN gcoSURF Image,
+ IN gcsVG_RECT_PTR Rectangle,
+ IN gceIMAGE_FILTER Filter,
+ IN gctBOOL Mask,
+ IN gctBOOL SoftwareTesselation
+ );
+
+gceSTATUS
+gcoVG_Blit(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gcsVG_RECT_PTR SrcRect,
+ IN gcsVG_RECT_PTR TrgRect,
+ IN gceIMAGE_FILTER Filter,
+ IN gceVG_BLEND Mode
+ );
+
+gceSTATUS
+gcoVG_ColorMatrix(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN const gctFLOAT * Matrix,
+ IN gceCHANNEL ColorChannels,
+ IN gctBOOL FilterLinear,
+ IN gctBOOL FilterPremultiplied,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_SeparableConvolve(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctINT KernelWidth,
+ IN gctINT KernelHeight,
+ IN gctINT ShiftX,
+ IN gctINT ShiftY,
+ IN const gctINT16 * KernelX,
+ IN const gctINT16 * KernelY,
+ IN gctFLOAT Scale,
+ IN gctFLOAT Bias,
+ IN gceTILE_MODE TilingMode,
+ IN gctFLOAT_PTR FillColor,
+ IN gceCHANNEL ColorChannels,
+ IN gctBOOL FilterLinear,
+ IN gctBOOL FilterPremultiplied,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gcsSIZE_PTR SourceSize,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_GaussianBlur(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctFLOAT StdDeviationX,
+ IN gctFLOAT StdDeviationY,
+ IN gceTILE_MODE TilingMode,
+ IN gctFLOAT_PTR FillColor,
+ IN gceCHANNEL ColorChannels,
+ IN gctBOOL FilterLinear,
+ IN gctBOOL FilterPremultiplied,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gcsSIZE_PTR SourceSize,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_EnableDither(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_vg_h_ */
diff --git a/src/include_imx6/gc_hal_enum.h b/src/include_imx6/gc_hal_enum.h
new file mode 100644
index 0000000..7d67828
--- /dev/null
+++ b/src/include_imx6/gc_hal_enum.h
@@ -0,0 +1,823 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_enum_h_
+#define __gc_hal_enum_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Chip models. */
+typedef enum _gceCHIPMODEL
+{
+ gcv300 = 0x0300,
+ gcv320 = 0x0320,
+ gcv350 = 0x0350,
+ gcv355 = 0x0355,
+ gcv400 = 0x0400,
+ gcv410 = 0x0410,
+ gcv420 = 0x0420,
+ gcv450 = 0x0450,
+ gcv500 = 0x0500,
+ gcv530 = 0x0530,
+ gcv600 = 0x0600,
+ gcv700 = 0x0700,
+ gcv800 = 0x0800,
+ gcv860 = 0x0860,
+ gcv880 = 0x0880,
+ gcv1000 = 0x1000,
+ gcv2000 = 0x2000,
+ gcv2100 = 0x2100,
+ gcv4000 = 0x4000,
+}
+gceCHIPMODEL;
+
+/* Chip features. */
+typedef enum _gceFEATURE
+{
+ gcvFEATURE_PIPE_2D = 0,
+ gcvFEATURE_PIPE_3D,
+ gcvFEATURE_PIPE_VG,
+ gcvFEATURE_DC,
+ gcvFEATURE_HIGH_DYNAMIC_RANGE,
+ gcvFEATURE_MODULE_CG,
+ gcvFEATURE_MIN_AREA,
+ gcvFEATURE_BUFFER_INTERLEAVING,
+ gcvFEATURE_BYTE_WRITE_2D,
+ gcvFEATURE_ENDIANNESS_CONFIG,
+ gcvFEATURE_DUAL_RETURN_BUS,
+ gcvFEATURE_DEBUG_MODE,
+ gcvFEATURE_YUY2_RENDER_TARGET,
+ gcvFEATURE_FRAGMENT_PROCESSOR,
+ gcvFEATURE_2DPE20,
+ gcvFEATURE_FAST_CLEAR,
+ gcvFEATURE_YUV420_TILER,
+ gcvFEATURE_YUY2_AVERAGING,
+ gcvFEATURE_FLIP_Y,
+ gcvFEATURE_EARLY_Z,
+ gcvFEATURE_Z_COMPRESSION,
+ gcvFEATURE_MSAA,
+ gcvFEATURE_SPECIAL_ANTI_ALIASING,
+ gcvFEATURE_SPECIAL_MSAA_LOD,
+ gcvFEATURE_422_TEXTURE_COMPRESSION,
+ gcvFEATURE_DXT_TEXTURE_COMPRESSION,
+ gcvFEATURE_ETC1_TEXTURE_COMPRESSION,
+ gcvFEATURE_CORRECT_TEXTURE_CONVERTER,
+ gcvFEATURE_TEXTURE_8K,
+ gcvFEATURE_SCALER,
+ gcvFEATURE_YUV420_SCALER,
+ gcvFEATURE_SHADER_HAS_W,
+ gcvFEATURE_SHADER_HAS_SIGN,
+ gcvFEATURE_SHADER_HAS_FLOOR,
+ gcvFEATURE_SHADER_HAS_CEIL,
+ gcvFEATURE_SHADER_HAS_SQRT,
+ gcvFEATURE_SHADER_HAS_TRIG,
+ gcvFEATURE_VAA,
+ gcvFEATURE_HZ,
+ gcvFEATURE_CORRECT_STENCIL,
+ gcvFEATURE_VG20,
+ gcvFEATURE_VG_FILTER,
+ gcvFEATURE_VG21,
+ gcvFEATURE_VG_DOUBLE_BUFFER,
+ gcvFEATURE_MC20,
+ gcvFEATURE_SUPER_TILED,
+ gcvFEATURE_2D_FILTERBLIT_PLUS_ALPHABLEND,
+ gcvFEATURE_2D_DITHER,
+ gcvFEATURE_2D_A8_TARGET,
+ gcvFEATURE_2D_FILTERBLIT_FULLROTATION,
+ gcvFEATURE_2D_BITBLIT_FULLROTATION,
+ gcvFEATURE_WIDE_LINE,
+ gcvFEATURE_FC_FLUSH_STALL,
+ gcvFEATURE_FULL_DIRECTFB,
+ gcvFEATURE_HALF_FLOAT_PIPE,
+ gcvFEATURE_LINE_LOOP,
+ gcvFEATURE_2D_YUV_BLIT,
+ gcvFEATURE_2D_TILING,
+ gcvFEATURE_NON_POWER_OF_TWO,
+ gcvFEATURE_3D_TEXTURE,
+ gcvFEATURE_TEXTURE_ARRAY,
+ gcvFEATURE_TILE_FILLER,
+ gcvFEATURE_LOGIC_OP,
+ gcvFEATURE_COMPOSITION,
+ gcvFEATURE_MIXED_STREAMS,
+ gcvFEATURE_2D_MULTI_SOURCE_BLT,
+ gcvFEATURE_END_EVENT,
+ gcvFEATURE_VERTEX_10_10_10_2,
+ gcvFEATURE_TEXTURE_10_10_10_2,
+ gcvFEATURE_TEXTURE_ANISOTROPIC_FILTERING,
+ gcvFEATURE_TEXTURE_FLOAT_HALF_FLOAT,
+ gcvFEATURE_2D_ROTATION_STALL_FIX,
+ gcvFEATURE_2D_MULTI_SOURCE_BLT_EX,
+ gcvFEATURE_BUG_FIXES10,
+ gcvFEATURE_2D_MINOR_TILING,
+ /* Supertiled compressed textures are supported. */
+ gcvFEATURE_TEX_COMPRRESSION_SUPERTILED,
+ gcvFEATURE_FAST_MSAA,
+ gcvFEATURE_BUG_FIXED_INDEXED_TRIANGLE_STRIP,
+ gcvFEATURE_TEXTURE_TILED_READ,
+ gcvFEATURE_DEPTH_BIAS_FIX,
+ gcvFEATURE_RECT_PRIMITIVE,
+ gcvFEATURE_BUG_FIXES11,
+ gcvFEATURE_SUPERTILED_TEXTURE,
+ gcvFEATURE_2D_NO_COLORBRUSH_INDEX8
+}
+gceFEATURE;
+
+/* Chip Power Status. */
+typedef enum _gceCHIPPOWERSTATE
+{
+ gcvPOWER_ON = 0,
+ gcvPOWER_OFF,
+ gcvPOWER_IDLE,
+ gcvPOWER_SUSPEND,
+ gcvPOWER_SUSPEND_ATPOWERON,
+ gcvPOWER_OFF_ATPOWERON,
+ gcvPOWER_IDLE_BROADCAST,
+ gcvPOWER_SUSPEND_BROADCAST,
+ gcvPOWER_OFF_BROADCAST,
+ gcvPOWER_OFF_RECOVERY,
+#if gcdPOWEROFF_TIMEOUT
+ gcvPOWER_OFF_TIMEOUT,
+#endif
+ gcvPOWER_ON_AUTO
+}
+gceCHIPPOWERSTATE;
+
+/* CPU cache operations */
+typedef enum _gceCACHEOPERATION
+{
+ gcvCACHE_CLEAN = 0x01,
+ gcvCACHE_INVALIDATE = 0x02,
+ gcvCACHE_FLUSH = gcvCACHE_CLEAN | gcvCACHE_INVALIDATE,
+ gcvCACHE_MEMORY_BARRIER = 0x04
+}
+gceCACHEOPERATION;
+
+typedef enum _gceVIDMEM_NODE_SHARED_INFO_TYPE
+{
+ gcvVIDMEM_INFO_GENERIC,
+ gcvVIDMEM_INFO_DIRTY_RECTANGLE
+}
+gceVIDMEM_NODE_SHARED_INFO_TYPE;
+
+/* Surface types. */
+typedef enum _gceSURF_TYPE
+{
+ gcvSURF_TYPE_UNKNOWN = 0,
+ gcvSURF_INDEX,
+ gcvSURF_VERTEX,
+ gcvSURF_TEXTURE,
+ gcvSURF_RENDER_TARGET,
+ gcvSURF_DEPTH,
+ gcvSURF_BITMAP,
+ gcvSURF_TILE_STATUS,
+ gcvSURF_IMAGE,
+ gcvSURF_MASK,
+ gcvSURF_SCISSOR,
+ gcvSURF_HIERARCHICAL_DEPTH,
+ gcvSURF_NUM_TYPES, /* Make sure this is the last one! */
+
+ /* Combinations. */
+ gcvSURF_NO_TILE_STATUS = 0x100,
+ gcvSURF_NO_VIDMEM = 0x200, /* Used to allocate surfaces with no underlying vidmem node.
+ In Android, vidmem node is allocated by another process. */
+ gcvSURF_CACHEABLE = 0x400, /* Used to allocate a cacheable surface */
+#if gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST
+ gcvSURF_FLIP = 0x800, /* The Resolve Target the will been flip resolve from RT */
+#endif
+
+ gcvSURF_RENDER_TARGET_NO_TILE_STATUS = gcvSURF_RENDER_TARGET
+ | gcvSURF_NO_TILE_STATUS,
+
+ gcvSURF_DEPTH_NO_TILE_STATUS = gcvSURF_DEPTH
+ | gcvSURF_NO_TILE_STATUS,
+
+ /* Supported surface types with no vidmem node. */
+ gcvSURF_BITMAP_NO_VIDMEM = gcvSURF_BITMAP
+ | gcvSURF_NO_VIDMEM,
+
+ gcvSURF_TEXTURE_NO_VIDMEM = gcvSURF_TEXTURE
+ | gcvSURF_NO_VIDMEM,
+
+ /* Cacheable surface types with no vidmem node. */
+ gcvSURF_CACHEABLE_BITMAP_NO_VIDMEM = gcvSURF_BITMAP_NO_VIDMEM
+ | gcvSURF_CACHEABLE,
+
+ gcvSURF_CACHEABLE_BITMAP = gcvSURF_BITMAP
+ | gcvSURF_CACHEABLE,
+
+#if gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST
+ gcvSURF_FLIP_BITMAP = gcvSURF_BITMAP
+ | gcvSURF_FLIP,
+#endif
+}
+gceSURF_TYPE;
+
+typedef enum _gceSURF_USAGE
+{
+ gcvSURF_USAGE_UNKNOWN,
+ gcvSURF_USAGE_RESOLVE_AFTER_CPU,
+ gcvSURF_USAGE_RESOLVE_AFTER_3D
+}
+gceSURF_USAGE;
+
+typedef enum _gceSURF_COLOR_TYPE
+{
+ gcvSURF_COLOR_UNKNOWN = 0,
+ gcvSURF_COLOR_LINEAR = 0x01,
+ gcvSURF_COLOR_ALPHA_PRE = 0x02,
+}
+gceSURF_COLOR_TYPE;
+
+/* Rotation. */
+typedef enum _gceSURF_ROTATION
+{
+ gcvSURF_0_DEGREE = 0,
+ gcvSURF_90_DEGREE,
+ gcvSURF_180_DEGREE,
+ gcvSURF_270_DEGREE,
+ gcvSURF_FLIP_X,
+ gcvSURF_FLIP_Y,
+}
+gceSURF_ROTATION;
+
+/* Surface formats. */
+typedef enum _gceSURF_FORMAT
+{
+ /* Unknown format. */
+ gcvSURF_UNKNOWN = 0,
+
+ /* Palettized formats. */
+ gcvSURF_INDEX1 = 100,
+ gcvSURF_INDEX4,
+ gcvSURF_INDEX8,
+
+ /* RGB formats. */
+ gcvSURF_A2R2G2B2 = 200,
+ gcvSURF_R3G3B2,
+ gcvSURF_A8R3G3B2,
+ gcvSURF_X4R4G4B4,
+ gcvSURF_A4R4G4B4,
+ gcvSURF_R4G4B4A4,
+ gcvSURF_X1R5G5B5,
+ gcvSURF_A1R5G5B5,
+ gcvSURF_R5G5B5A1,
+ gcvSURF_R5G6B5,
+ gcvSURF_R8G8B8,
+ gcvSURF_X8R8G8B8,
+ gcvSURF_A8R8G8B8,
+ gcvSURF_R8G8B8A8,
+ gcvSURF_G8R8G8B8,
+ gcvSURF_R8G8B8G8,
+ gcvSURF_X2R10G10B10,
+ gcvSURF_A2R10G10B10,
+ gcvSURF_X12R12G12B12,
+ gcvSURF_A12R12G12B12,
+ gcvSURF_X16R16G16B16,
+ gcvSURF_A16R16G16B16,
+ gcvSURF_A32R32G32B32,
+ gcvSURF_R8G8B8X8,
+ gcvSURF_R5G5B5X1,
+ gcvSURF_R4G4B4X4,
+
+ /* BGR formats. */
+ gcvSURF_A4B4G4R4 = 300,
+ gcvSURF_A1B5G5R5,
+ gcvSURF_B5G6R5,
+ gcvSURF_B8G8R8,
+ gcvSURF_B16G16R16,
+ gcvSURF_X8B8G8R8,
+ gcvSURF_A8B8G8R8,
+ gcvSURF_A2B10G10R10,
+ gcvSURF_X16B16G16R16,
+ gcvSURF_A16B16G16R16,
+ gcvSURF_B32G32R32,
+ gcvSURF_X32B32G32R32,
+ gcvSURF_A32B32G32R32,
+ gcvSURF_B4G4R4A4,
+ gcvSURF_B5G5R5A1,
+ gcvSURF_B8G8R8X8,
+ gcvSURF_B8G8R8A8,
+ gcvSURF_X4B4G4R4,
+ gcvSURF_X1B5G5R5,
+ gcvSURF_B4G4R4X4,
+ gcvSURF_B5G5R5X1,
+ gcvSURF_X2B10G10R10,
+
+ /* Compressed formats. */
+ gcvSURF_DXT1 = 400,
+ gcvSURF_DXT2,
+ gcvSURF_DXT3,
+ gcvSURF_DXT4,
+ gcvSURF_DXT5,
+ gcvSURF_CXV8U8,
+ gcvSURF_ETC1,
+
+ /* YUV formats. */
+ gcvSURF_YUY2 = 500,
+ gcvSURF_UYVY,
+ gcvSURF_YV12,
+ gcvSURF_I420,
+ gcvSURF_NV12,
+ gcvSURF_NV21,
+ gcvSURF_NV16,
+ gcvSURF_NV61,
+ gcvSURF_YVYU,
+ gcvSURF_VYUY,
+
+ /* Depth formats. */
+ gcvSURF_D16 = 600,
+ gcvSURF_D24S8,
+ gcvSURF_D32,
+ gcvSURF_D24X8,
+
+ /* Alpha formats. */
+ gcvSURF_A4 = 700,
+ gcvSURF_A8,
+ gcvSURF_A12,
+ gcvSURF_A16,
+ gcvSURF_A32,
+ gcvSURF_A1,
+
+ /* Luminance formats. */
+ gcvSURF_L4 = 800,
+ gcvSURF_L8,
+ gcvSURF_L12,
+ gcvSURF_L16,
+ gcvSURF_L32,
+ gcvSURF_L1,
+
+ /* Alpha/Luminance formats. */
+ gcvSURF_A4L4 = 900,
+ gcvSURF_A2L6,
+ gcvSURF_A8L8,
+ gcvSURF_A4L12,
+ gcvSURF_A12L12,
+ gcvSURF_A16L16,
+
+ /* Bump formats. */
+ gcvSURF_L6V5U5 = 1000,
+ gcvSURF_V8U8,
+ gcvSURF_X8L8V8U8,
+ gcvSURF_Q8W8V8U8,
+ gcvSURF_A2W10V10U10,
+ gcvSURF_V16U16,
+ gcvSURF_Q16W16V16U16,
+
+ /* R/RG/RA formats. */
+ gcvSURF_R8 = 1100,
+ gcvSURF_X8R8,
+ gcvSURF_G8R8,
+ gcvSURF_X8G8R8,
+ gcvSURF_A8R8,
+ gcvSURF_R16,
+ gcvSURF_X16R16,
+ gcvSURF_G16R16,
+ gcvSURF_X16G16R16,
+ gcvSURF_A16R16,
+ gcvSURF_R32,
+ gcvSURF_X32R32,
+ gcvSURF_G32R32,
+ gcvSURF_X32G32R32,
+ gcvSURF_A32R32,
+ gcvSURF_RG16,
+
+ /* Floating point formats. */
+ gcvSURF_R16F = 1200,
+ gcvSURF_X16R16F,
+ gcvSURF_G16R16F,
+ gcvSURF_X16G16R16F,
+ gcvSURF_B16G16R16F,
+ gcvSURF_X16B16G16R16F,
+ gcvSURF_A16B16G16R16F,
+ gcvSURF_R32F,
+ gcvSURF_X32R32F,
+ gcvSURF_G32R32F,
+ gcvSURF_X32G32R32F,
+ gcvSURF_B32G32R32F,
+ gcvSURF_X32B32G32R32F,
+ gcvSURF_A32B32G32R32F,
+ gcvSURF_A16F,
+ gcvSURF_L16F,
+ gcvSURF_A16L16F,
+ gcvSURF_A16R16F,
+ gcvSURF_A32F,
+ gcvSURF_L32F,
+ gcvSURF_A32L32F,
+ gcvSURF_A32R32F,
+
+}
+gceSURF_FORMAT;
+
+/* Pixel swizzle modes. */
+typedef enum _gceSURF_SWIZZLE
+{
+ gcvSURF_NOSWIZZLE = 0,
+ gcvSURF_ARGB,
+ gcvSURF_ABGR,
+ gcvSURF_RGBA,
+ gcvSURF_BGRA
+}
+gceSURF_SWIZZLE;
+
+/* Transparency modes. */
+typedef enum _gceSURF_TRANSPARENCY
+{
+ /* Valid only for PE 1.0 */
+ gcvSURF_OPAQUE = 0,
+ gcvSURF_SOURCE_MATCH,
+ gcvSURF_SOURCE_MASK,
+ gcvSURF_PATTERN_MASK,
+}
+gceSURF_TRANSPARENCY;
+
+/* Surface Alignment. */
+typedef enum _gceSURF_ALIGNMENT
+{
+ gcvSURF_FOUR = 0,
+ gcvSURF_SIXTEEN,
+ gcvSURF_SUPER_TILED,
+ gcvSURF_SPLIT_TILED,
+ gcvSURF_SPLIT_SUPER_TILED,
+}
+gceSURF_ALIGNMENT;
+
+/* Transparency modes. */
+typedef enum _gce2D_TRANSPARENCY
+{
+ /* Valid only for PE 2.0 */
+ gcv2D_OPAQUE = 0,
+ gcv2D_KEYED,
+ gcv2D_MASKED
+}
+gce2D_TRANSPARENCY;
+
+/* Mono packing modes. */
+typedef enum _gceSURF_MONOPACK
+{
+ gcvSURF_PACKED8 = 0,
+ gcvSURF_PACKED16,
+ gcvSURF_PACKED32,
+ gcvSURF_UNPACKED,
+}
+gceSURF_MONOPACK;
+
+/* Blending modes. */
+typedef enum _gceSURF_BLEND_MODE
+{
+ /* Porter-Duff blending modes. */
+ /* Fsrc Fdst */
+ gcvBLEND_CLEAR = 0, /* 0 0 */
+ gcvBLEND_SRC, /* 1 0 */
+ gcvBLEND_DST, /* 0 1 */
+ gcvBLEND_SRC_OVER_DST, /* 1 1 - Asrc */
+ gcvBLEND_DST_OVER_SRC, /* 1 - Adst 1 */
+ gcvBLEND_SRC_IN_DST, /* Adst 0 */
+ gcvBLEND_DST_IN_SRC, /* 0 Asrc */
+ gcvBLEND_SRC_OUT_DST, /* 1 - Adst 0 */
+ gcvBLEND_DST_OUT_SRC, /* 0 1 - Asrc */
+ gcvBLEND_SRC_ATOP_DST, /* Adst 1 - Asrc */
+ gcvBLEND_DST_ATOP_SRC, /* 1 - Adst Asrc */
+ gcvBLEND_SRC_XOR_DST, /* 1 - Adst 1 - Asrc */
+
+ /* Special blending modes. */
+ gcvBLEND_SET, /* DST = 1 */
+ gcvBLEND_SUB /* DST = DST * (1 - SRC) */
+}
+gceSURF_BLEND_MODE;
+
+/* Per-pixel alpha modes. */
+typedef enum _gceSURF_PIXEL_ALPHA_MODE
+{
+ gcvSURF_PIXEL_ALPHA_STRAIGHT = 0,
+ gcvSURF_PIXEL_ALPHA_INVERSED
+}
+gceSURF_PIXEL_ALPHA_MODE;
+
+/* Global alpha modes. */
+typedef enum _gceSURF_GLOBAL_ALPHA_MODE
+{
+ gcvSURF_GLOBAL_ALPHA_OFF = 0,
+ gcvSURF_GLOBAL_ALPHA_ON,
+ gcvSURF_GLOBAL_ALPHA_SCALE
+}
+gceSURF_GLOBAL_ALPHA_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gceSURF_PIXEL_COLOR_MODE
+{
+ gcvSURF_COLOR_STRAIGHT = 0,
+ gcvSURF_COLOR_MULTIPLY
+}
+gceSURF_PIXEL_COLOR_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_PIXEL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_COLOR_MULTIPLY_DISABLE = 0,
+ gcv2D_COLOR_MULTIPLY_ENABLE
+}
+gce2D_PIXEL_COLOR_MULTIPLY_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_GLOBAL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_GLOBAL_COLOR_MULTIPLY_DISABLE = 0,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_ALPHA,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_COLOR
+}
+gce2D_GLOBAL_COLOR_MULTIPLY_MODE;
+
+/* Alpha blending factor modes. */
+typedef enum _gceSURF_BLEND_FACTOR_MODE
+{
+ gcvSURF_BLEND_ZERO = 0,
+ gcvSURF_BLEND_ONE,
+ gcvSURF_BLEND_STRAIGHT,
+ gcvSURF_BLEND_INVERSED,
+ gcvSURF_BLEND_COLOR,
+ gcvSURF_BLEND_COLOR_INVERSED,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED,
+ gcvSURF_BLEND_STRAIGHT_NO_CROSS,
+ gcvSURF_BLEND_INVERSED_NO_CROSS,
+ gcvSURF_BLEND_COLOR_NO_CROSS,
+ gcvSURF_BLEND_COLOR_INVERSED_NO_CROSS,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED_CROSS
+}
+gceSURF_BLEND_FACTOR_MODE;
+
+/* Alpha blending porter duff rules. */
+typedef enum _gce2D_PORTER_DUFF_RULE
+{
+ gcvPD_CLEAR = 0,
+ gcvPD_SRC,
+ gcvPD_SRC_OVER,
+ gcvPD_DST_OVER,
+ gcvPD_SRC_IN,
+ gcvPD_DST_IN,
+ gcvPD_SRC_OUT,
+ gcvPD_DST_OUT,
+ gcvPD_SRC_ATOP,
+ gcvPD_DST_ATOP,
+ gcvPD_ADD,
+ gcvPD_XOR,
+ gcvPD_DST
+}
+gce2D_PORTER_DUFF_RULE;
+
+/* Alpha blending factor modes. */
+typedef enum _gce2D_YUV_COLOR_MODE
+{
+ gcv2D_YUV_601= 0,
+ gcv2D_YUV_709
+}
+gce2D_YUV_COLOR_MODE;
+
+/* 2D Rotation and flipping. */
+typedef enum _gce2D_ORIENTATION
+{
+ gcv2D_0_DEGREE = 0,
+ gcv2D_90_DEGREE,
+ gcv2D_180_DEGREE,
+ gcv2D_270_DEGREE,
+ gcv2D_X_FLIP,
+ gcv2D_Y_FLIP
+}
+gce2D_ORIENTATION;
+
+typedef enum _gce2D_COMMAND
+{
+ gcv2D_CLEAR = 0,
+ gcv2D_LINE,
+ gcv2D_BLT,
+ gcv2D_STRETCH,
+ gcv2D_HOR_FILTER,
+ gcv2D_VER_FILTER,
+ gcv2D_MULTI_SOURCE_BLT,
+}
+gce2D_COMMAND;
+
+#ifndef VIVANTE_NO_3D
+/* Texture functions. */
+typedef enum _gceTEXTURE_FUNCTION
+{
+ gcvTEXTURE_DUMMY = 0,
+ gcvTEXTURE_REPLACE = 0,
+ gcvTEXTURE_MODULATE,
+ gcvTEXTURE_ADD,
+ gcvTEXTURE_ADD_SIGNED,
+ gcvTEXTURE_INTERPOLATE,
+ gcvTEXTURE_SUBTRACT,
+ gcvTEXTURE_DOT3
+}
+gceTEXTURE_FUNCTION;
+
+/* Texture sources. */
+typedef enum _gceTEXTURE_SOURCE
+{
+ gcvCOLOR_FROM_TEXTURE = 0,
+ gcvCOLOR_FROM_CONSTANT_COLOR,
+ gcvCOLOR_FROM_PRIMARY_COLOR,
+ gcvCOLOR_FROM_PREVIOUS_COLOR
+}
+gceTEXTURE_SOURCE;
+
+/* Texture source channels. */
+typedef enum _gceTEXTURE_CHANNEL
+{
+ gcvFROM_COLOR = 0,
+ gcvFROM_ONE_MINUS_COLOR,
+ gcvFROM_ALPHA,
+ gcvFROM_ONE_MINUS_ALPHA
+}
+gceTEXTURE_CHANNEL;
+#endif /* VIVANTE_NO_3D */
+
+/* Filter types. */
+typedef enum _gceFILTER_TYPE
+{
+ gcvFILTER_SYNC = 0,
+ gcvFILTER_BLUR,
+ gcvFILTER_USER
+}
+gceFILTER_TYPE;
+
+/* Filter pass types. */
+typedef enum _gceFILTER_PASS_TYPE
+{
+ gcvFILTER_HOR_PASS = 0,
+ gcvFILTER_VER_PASS
+}
+gceFILTER_PASS_TYPE;
+
+/* Endian hints. */
+typedef enum _gceENDIAN_HINT
+{
+ gcvENDIAN_NO_SWAP = 0,
+ gcvENDIAN_SWAP_WORD,
+ gcvENDIAN_SWAP_DWORD
+}
+gceENDIAN_HINT;
+
+/* Tiling modes. */
+typedef enum _gceTILING
+{
+ gcvLINEAR = 0,
+ gcvTILED,
+ gcvSUPERTILED,
+ gcvMULTI_TILED,
+ gcvMULTI_SUPERTILED,
+ gcvMINORTILED,
+}
+gceTILING;
+
+/* 2D pattern type. */
+typedef enum _gce2D_PATTERN
+{
+ gcv2D_PATTERN_SOLID = 0,
+ gcv2D_PATTERN_MONO,
+ gcv2D_PATTERN_COLOR,
+ gcv2D_PATTERN_INVALID
+}
+gce2D_PATTERN;
+
+/* 2D source type. */
+typedef enum _gce2D_SOURCE
+{
+ gcv2D_SOURCE_MASKED = 0,
+ gcv2D_SOURCE_MONO,
+ gcv2D_SOURCE_COLOR,
+ gcv2D_SOURCE_INVALID
+}
+gce2D_SOURCE;
+
+/* Pipes. */
+typedef enum _gcePIPE_SELECT
+{
+ gcvPIPE_INVALID = ~0,
+ gcvPIPE_3D = 0,
+ gcvPIPE_2D
+}
+gcePIPE_SELECT;
+
+/* Hardware type. */
+typedef enum _gceHARDWARE_TYPE
+{
+ gcvHARDWARE_INVALID = 0x00,
+ gcvHARDWARE_3D = 0x01,
+ gcvHARDWARE_2D = 0x02,
+ gcvHARDWARE_VG = 0x04,
+
+ gcvHARDWARE_3D2D = gcvHARDWARE_3D | gcvHARDWARE_2D
+}
+gceHARDWARE_TYPE;
+
+#define gcdCHIP_COUNT 3
+
+typedef enum _gceMMU_MODE
+{
+ gcvMMU_MODE_1K,
+ gcvMMU_MODE_4K,
+} gceMMU_MODE;
+
+/* User signal command codes. */
+typedef enum _gceUSER_SIGNAL_COMMAND_CODES
+{
+ gcvUSER_SIGNAL_CREATE,
+ gcvUSER_SIGNAL_DESTROY,
+ gcvUSER_SIGNAL_SIGNAL,
+ gcvUSER_SIGNAL_WAIT,
+ gcvUSER_SIGNAL_MAP,
+ gcvUSER_SIGNAL_UNMAP,
+}
+gceUSER_SIGNAL_COMMAND_CODES;
+
+/* Event locations. */
+typedef enum _gceKERNEL_WHERE
+{
+ gcvKERNEL_COMMAND,
+ gcvKERNEL_VERTEX,
+ gcvKERNEL_TRIANGLE,
+ gcvKERNEL_TEXTURE,
+ gcvKERNEL_PIXEL,
+}
+gceKERNEL_WHERE;
+
+#if gcdENABLE_VG
+/* Hardware blocks. */
+typedef enum _gceBLOCK
+{
+ gcvBLOCK_COMMAND,
+ gcvBLOCK_TESSELLATOR,
+ gcvBLOCK_TESSELLATOR2,
+ gcvBLOCK_TESSELLATOR3,
+ gcvBLOCK_RASTER,
+ gcvBLOCK_VG,
+ gcvBLOCK_VG2,
+ gcvBLOCK_VG3,
+ gcvBLOCK_PIXEL,
+
+ /* Number of defined blocks. */
+ gcvBLOCK_COUNT
+}
+gceBLOCK;
+#endif
+
+/* gcdDUMP message type. */
+typedef enum _gceDEBUG_MESSAGE_TYPE
+{
+ gcvMESSAGE_TEXT,
+ gcvMESSAGE_DUMP
+}
+gceDEBUG_MESSAGE_TYPE;
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gckCONTEXT * gckCONTEXT;
+typedef struct _gcoCMDBUF * gcoCMDBUF;
+typedef struct _gcsSTATE_DELTA * gcsSTATE_DELTA_PTR;
+typedef struct _gcsQUEUE * gcsQUEUE_PTR;
+typedef struct _gcoQUEUE * gcoQUEUE;
+typedef struct _gcsHAL_INTERFACE * gcsHAL_INTERFACE_PTR;
+typedef struct _gcs2D_PROFILE * gcs2D_PROFILE_PTR;
+
+#if gcdENABLE_VG
+typedef struct _gcoVGHARDWARE * gcoVGHARDWARE;
+typedef struct _gcoVGBUFFER * gcoVGBUFFER;
+typedef struct _gckVGHARDWARE * gckVGHARDWARE;
+typedef struct _gcsVGCONTEXT * gcsVGCONTEXT_PTR;
+typedef struct _gcsVGCONTEXT_MAP * gcsVGCONTEXT_MAP_PTR;
+typedef struct _gcsVGCMDQUEUE * gcsVGCMDQUEUE_PTR;
+typedef struct _gcsTASK_MASTER_TABLE * gcsTASK_MASTER_TABLE_PTR;
+typedef struct _gckVGKERNEL * gckVGKERNEL;
+typedef void * gctTHREAD;
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_enum_h_ */
diff --git a/src/include_imx6/gc_hal_kernel.h b/src/include_imx6/gc_hal_kernel.h
new file mode 100644
index 0000000..0be0c22
--- /dev/null
+++ b/src/include_imx6/gc_hal_kernel.h
@@ -0,0 +1,789 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_h_
+#define __gc_hal_kernel_h_
+
+#include "gc_hal.h"
+#include "gc_hal_kernel_hardware.h"
+#include "gc_hal_driver.h"
+
+#if gcdENABLE_VG
+#include "gc_hal_kernel_vg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*******************************************************************************
+***** New MMU Defination *******************************************************/
+#define gcdMMU_MTLB_SHIFT 22
+#define gcdMMU_STLB_4K_SHIFT 12
+#define gcdMMU_STLB_64K_SHIFT 16
+
+#define gcdMMU_MTLB_BITS (32 - gcdMMU_MTLB_SHIFT)
+#define gcdMMU_PAGE_4K_BITS gcdMMU_STLB_4K_SHIFT
+#define gcdMMU_STLB_4K_BITS (32 - gcdMMU_MTLB_BITS - gcdMMU_PAGE_4K_BITS)
+#define gcdMMU_PAGE_64K_BITS gcdMMU_STLB_64K_SHIFT
+#define gcdMMU_STLB_64K_BITS (32 - gcdMMU_MTLB_BITS - gcdMMU_PAGE_64K_BITS)
+
+#define gcdMMU_MTLB_ENTRY_NUM (1 << gcdMMU_MTLB_BITS)
+#define gcdMMU_MTLB_SIZE (gcdMMU_MTLB_ENTRY_NUM << 2)
+#define gcdMMU_STLB_4K_ENTRY_NUM (1 << gcdMMU_STLB_4K_BITS)
+#define gcdMMU_STLB_4K_SIZE (gcdMMU_STLB_4K_ENTRY_NUM << 2)
+#define gcdMMU_PAGE_4K_SIZE (1 << gcdMMU_STLB_4K_SHIFT)
+#define gcdMMU_STLB_64K_ENTRY_NUM (1 << gcdMMU_STLB_64K_BITS)
+#define gcdMMU_STLB_64K_SIZE (gcdMMU_STLB_64K_ENTRY_NUM << 2)
+#define gcdMMU_PAGE_64K_SIZE (1 << gcdMMU_STLB_64K_SHIFT)
+
+#define gcdMMU_MTLB_MASK (~((1U << gcdMMU_MTLB_SHIFT)-1))
+#define gcdMMU_STLB_4K_MASK ((~0U << gcdMMU_STLB_4K_SHIFT) ^ gcdMMU_MTLB_MASK)
+#define gcdMMU_PAGE_4K_MASK (gcdMMU_PAGE_4K_SIZE - 1)
+#define gcdMMU_STLB_64K_MASK ((~((1U << gcdMMU_STLB_64K_SHIFT)-1)) ^ gcdMMU_MTLB_MASK)
+#define gcdMMU_PAGE_64K_MASK (gcdMMU_PAGE_64K_SIZE - 1)
+
+/*******************************************************************************
+***** Process Secure Cache ****************************************************/
+
+#define gcdSECURE_CACHE_LRU 1
+#define gcdSECURE_CACHE_LINEAR 2
+#define gcdSECURE_CACHE_HASH 3
+#define gcdSECURE_CACHE_TABLE 4
+
+typedef struct _gcskLOGICAL_CACHE * gcskLOGICAL_CACHE_PTR;
+typedef struct _gcskLOGICAL_CACHE gcskLOGICAL_CACHE;
+struct _gcskLOGICAL_CACHE
+{
+ /* Logical address. */
+ gctPOINTER logical;
+
+ /* DMAable address. */
+ gctUINT32 dma;
+
+#if gcdSECURE_CACHE_METHOD == gcdSECURE_CACHE_HASH
+ /* Pointer to the previous and next hash tables. */
+ gcskLOGICAL_CACHE_PTR nextHash;
+ gcskLOGICAL_CACHE_PTR prevHash;
+#endif
+
+#if gcdSECURE_CACHE_METHOD != gcdSECURE_CACHE_TABLE
+ /* Pointer to the previous and next slot. */
+ gcskLOGICAL_CACHE_PTR next;
+ gcskLOGICAL_CACHE_PTR prev;
+#endif
+
+#if gcdSECURE_CACHE_METHOD == gcdSECURE_CACHE_LINEAR
+ /* Time stamp. */
+ gctUINT64 stamp;
+#endif
+};
+
+typedef struct _gcskSECURE_CACHE * gcskSECURE_CACHE_PTR;
+typedef struct _gcskSECURE_CACHE
+{
+ /* Cache memory. */
+ gcskLOGICAL_CACHE cache[1 + gcdSECURE_CACHE_SLOTS];
+
+ /* Last known index for LINEAR mode. */
+ gcskLOGICAL_CACHE_PTR cacheIndex;
+
+ /* Current free slot for LINEAR mode. */
+ gctUINT32 cacheFree;
+
+ /* Time stamp for LINEAR mode. */
+ gctUINT64 cacheStamp;
+
+#if gcdSECURE_CACHE_METHOD == gcdSECURE_CACHE_HASH
+ /* Hash table for HASH mode. */
+ gcskLOGICAL_CACHE hash[256];
+#endif
+}
+gcskSECURE_CACHE;
+
+/*******************************************************************************
+***** Process Database Management *********************************************/
+
+typedef enum _gceDATABASE_TYPE
+{
+ gcvDB_VIDEO_MEMORY = 1, /* Video memory created. */
+ gcvDB_NON_PAGED, /* Non paged memory. */
+ gcvDB_CONTIGUOUS, /* Contiguous memory. */
+ gcvDB_SIGNAL, /* Signal. */
+ gcvDB_VIDEO_MEMORY_LOCKED, /* Video memory locked. */
+ gcvDB_CONTEXT, /* Context */
+ gcvDB_IDLE, /* GPU idle. */
+ gcvDB_MAP_MEMORY, /* Map memory */
+ gcvDB_SHARED_INFO, /* Private data */
+ gcvDB_MAP_USER_MEMORY /* Map user memory */
+}
+gceDATABASE_TYPE;
+
+typedef struct _gcsDATABASE_RECORD * gcsDATABASE_RECORD_PTR;
+typedef struct _gcsDATABASE_RECORD
+{
+ /* Pointer to kernel. */
+ gckKERNEL kernel;
+
+ /* Pointer to next database record. */
+ gcsDATABASE_RECORD_PTR next;
+
+ /* Type of record. */
+ gceDATABASE_TYPE type;
+
+ /* Data for record. */
+ gctPOINTER data;
+ gctPHYS_ADDR physical;
+ gctSIZE_T bytes;
+}
+gcsDATABASE_RECORD;
+
+typedef struct _gcsDATABASE * gcsDATABASE_PTR;
+typedef struct _gcsDATABASE
+{
+ /* Pointer to next entry is hash list. */
+ gcsDATABASE_PTR next;
+ gctSIZE_T slot;
+
+ /* Process ID. */
+ gctUINT32 processID;
+
+ /* Sizes to query. */
+ gcsDATABASE_COUNTERS vidMem;
+ gcsDATABASE_COUNTERS nonPaged;
+ gcsDATABASE_COUNTERS contiguous;
+ gcsDATABASE_COUNTERS mapUserMemory;
+ gcsDATABASE_COUNTERS mapMemory;
+
+ /* Idle time management. */
+ gctUINT64 lastIdle;
+ gctUINT64 idle;
+
+ /* Pointer to database. */
+ gcsDATABASE_RECORD_PTR list;
+
+#if gcdSECURE_USER
+ /* Secure cache. */
+ gcskSECURE_CACHE cache;
+#endif
+}
+gcsDATABASE;
+
+/* Create a process database that will contain all its allocations. */
+gceSTATUS
+gckKERNEL_CreateProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID
+ );
+
+/* Add a record to the process database. */
+gceSTATUS
+gckKERNEL_AddProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID,
+ IN gceDATABASE_TYPE Type,
+ IN gctPOINTER Pointer,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Size
+ );
+
+/* Remove a record to the process database. */
+gceSTATUS
+gckKERNEL_RemoveProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID,
+ IN gceDATABASE_TYPE Type,
+ IN gctPOINTER Pointer
+ );
+
+/* Destroy the process database. */
+gceSTATUS
+gckKERNEL_DestroyProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID
+ );
+
+/* Find a record to the process database. */
+gceSTATUS
+gckKERNEL_FindProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID,
+ IN gctUINT32 ThreadID,
+ IN gceDATABASE_TYPE Type,
+ IN gctPOINTER Pointer,
+ OUT gcsDATABASE_RECORD_PTR Record
+ );
+
+/* Query the process database. */
+gceSTATUS
+gckKERNEL_QueryProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID,
+ IN gctBOOL LastProcessID,
+ IN gceDATABASE_TYPE Type,
+ OUT gcuDATABASE_INFO * Info
+ );
+
+#if gcdSECURE_USER
+/* Get secure cache from the process database. */
+gceSTATUS
+gckKERNEL_GetProcessDBCache(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID,
+ OUT gcskSECURE_CACHE_PTR * Cache
+ );
+#endif
+
+/*******************************************************************************
+********* Timer Management ****************************************************/
+typedef struct _gcsTIMER * gcsTIMER_PTR;
+typedef struct _gcsTIMER
+{
+ /* Start and Stop time holders. */
+ gctUINT64 startTime;
+ gctUINT64 stopTime;
+}
+gcsTIMER;
+
+/******************************************************************************\
+********************************** Structures **********************************
+\******************************************************************************/
+
+/* gckDB object. */
+struct _gckDB
+{
+ /* Database management. */
+ gcsDATABASE_PTR db[16];
+ gctPOINTER dbMutex;
+ gcsDATABASE_PTR freeDatabase;
+ gcsDATABASE_RECORD_PTR freeRecord;
+ gcsDATABASE_PTR lastDatabase;
+ gctUINT32 lastProcessID;
+ gctUINT64 lastIdle;
+ gctUINT64 idleTime;
+ gctUINT64 lastSlowdown;
+ gctUINT64 lastSlowdownIdle;
+};
+
+/* gckKERNEL object. */
+struct _gckKERNEL
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Core */
+ gceCORE core;
+
+ /* Pointer to gckHARDWARE object. */
+ gckHARDWARE hardware;
+
+ /* Pointer to gckCOMMAND object. */
+ gckCOMMAND command;
+
+ /* Pointer to gckEVENT object. */
+ gckEVENT eventObj;
+
+ /* Pointer to context. */
+ gctPOINTER context;
+
+ /* Pointer to gckMMU object. */
+ gckMMU mmu;
+
+ /* Arom holding number of clients. */
+ gctPOINTER atomClients;
+
+#if VIVANTE_PROFILER
+ /* Enable profiling */
+ gctBOOL profileEnable;
+
+ /* The profile file name */
+ gctCHAR profileFileName[gcdMAX_PROFILE_FILE_NAME];
+#endif
+
+#ifdef QNX_SINGLE_THREADED_DEBUGGING
+ gctPOINTER debugMutex;
+#endif
+
+ /* Database management. */
+ gckDB db;
+ gctBOOL dbCreated;
+
+ /* Pointer to gckEVENT object. */
+ gcsTIMER timers[8];
+ gctUINT32 timeOut;
+
+#if gcdENABLE_VG
+ gckVGKERNEL vg;
+#endif
+};
+
+/* gckCOMMAND object. */
+struct _gckCOMMAND
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to required object. */
+ gckKERNEL kernel;
+ gckOS os;
+
+ /* Number of bytes per page. */
+ gctSIZE_T pageSize;
+
+ /* Current pipe select. */
+ gcePIPE_SELECT pipeSelect;
+
+ /* Command queue running flag. */
+ gctBOOL running;
+
+ /* Idle flag and commit stamp. */
+ gctBOOL idle;
+ gctUINT64 commitStamp;
+
+ /* Command queue mutex. */
+ gctPOINTER mutexQueue;
+
+ /* Context switching mutex. */
+ gctPOINTER mutexContext;
+
+ /* Command queue power semaphore. */
+ gctPOINTER powerSemaphore;
+
+ /* Current command queue. */
+ struct _gcskCOMMAND_QUEUE
+ {
+ gctSIGNAL signal;
+ gctPHYS_ADDR physical;
+ gctPOINTER logical;
+ }
+ queues[gcdCOMMAND_QUEUES];
+
+ gctPHYS_ADDR physical;
+ gctPOINTER logical;
+ gctUINT32 offset;
+ gctINT index;
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+ gctUINT wrapCount;
+#endif
+
+ /* The command queue is new. */
+ gctBOOL newQueue;
+
+ /* Context management. */
+ gckCONTEXT currContext;
+
+ /* Pointer to last WAIT command. */
+ gctPHYS_ADDR waitPhysical;
+ gctPOINTER waitLogical;
+ gctSIZE_T waitSize;
+
+ /* Command buffer alignment. */
+ gctSIZE_T alignment;
+ gctSIZE_T reservedHead;
+ gctSIZE_T reservedTail;
+
+ /* Commit counter. */
+ gctPOINTER atomCommit;
+
+ /* Kernel process ID. */
+ gctUINT32 kernelProcessID;
+
+ /* End Event signal. */
+ gctSIGNAL endEventSignal;
+
+#if gcdSECURE_USER
+ /* Hint array copy buffer. */
+ gctBOOL hintArrayAllocated;
+ gctUINT hintArraySize;
+ gctUINT32_PTR hintArray;
+#endif
+};
+
+typedef struct _gcsEVENT * gcsEVENT_PTR;
+
+/* Structure holding one event to be processed. */
+typedef struct _gcsEVENT
+{
+ /* Pointer to next event in queue. */
+ gcsEVENT_PTR next;
+
+ /* Event information. */
+ gcsHAL_INTERFACE info;
+
+ /* Process ID owning the event. */
+ gctUINT32 processID;
+
+#ifdef __QNXNTO__
+ /* Kernel. */
+ gckKERNEL kernel;
+#endif
+}
+gcsEVENT;
+
+/* Structure holding a list of events to be processed by an interrupt. */
+typedef struct _gcsEVENT_QUEUE * gcsEVENT_QUEUE_PTR;
+typedef struct _gcsEVENT_QUEUE
+{
+ /* Time stamp. */
+ gctUINT64 stamp;
+
+ /* Source of the event. */
+ gceKERNEL_WHERE source;
+
+ /* Pointer to head of event queue. */
+ gcsEVENT_PTR head;
+
+ /* Pointer to tail of event queue. */
+ gcsEVENT_PTR tail;
+
+ /* Next list of events. */
+ gcsEVENT_QUEUE_PTR next;
+}
+gcsEVENT_QUEUE;
+
+/*
+ gcdREPO_LIST_COUNT defines the maximum number of event queues with different
+ hardware module sources that may coexist at the same time. Only two sources
+ are supported - gcvKERNEL_COMMAND and gcvKERNEL_PIXEL. gcvKERNEL_COMMAND
+ source is used only for managing the kernel command queue and is only issued
+ when the current command queue gets full. Since we commit event queues every
+ time we commit command buffers, in the worst case we can have up to three
+ pending event queues:
+ - gcvKERNEL_PIXEL
+ - gcvKERNEL_COMMAND (queue overflow)
+ - gcvKERNEL_PIXEL
+*/
+#define gcdREPO_LIST_COUNT 3
+
+/* gckEVENT object. */
+struct _gckEVENT
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to required objects. */
+ gckOS os;
+ gckKERNEL kernel;
+
+ /* Time stamp. */
+ gctUINT64 stamp;
+ gctUINT64 lastCommitStamp;
+
+ /* Queue mutex. */
+ gctPOINTER eventQueueMutex;
+
+ /* Array of event queues. */
+ gcsEVENT_QUEUE queues[30];
+ gctUINT8 lastID;
+ gctPOINTER freeAtom;
+
+ /* Pending events. */
+#if gcdSMP
+ gctPOINTER pending;
+#else
+ volatile gctUINT pending;
+#endif
+
+ /* List of free event structures and its mutex. */
+ gcsEVENT_PTR freeEventList;
+ gctSIZE_T freeEventCount;
+ gctPOINTER freeEventMutex;
+
+ /* Event queues. */
+ gcsEVENT_QUEUE_PTR queueHead;
+ gcsEVENT_QUEUE_PTR queueTail;
+ gcsEVENT_QUEUE_PTR freeList;
+ gcsEVENT_QUEUE repoList[gcdREPO_LIST_COUNT];
+ gctPOINTER eventListMutex;
+};
+
+/* Free all events belonging to a process. */
+gceSTATUS
+gckEVENT_FreeProcess(
+ IN gckEVENT Event,
+ IN gctUINT32 ProcessID
+ );
+
+gceSTATUS
+gckEVENT_Stop(
+ IN gckEVENT Event,
+ IN gctUINT32 ProcessID,
+ IN gctPHYS_ADDR Handle,
+ IN gctPOINTER Logical,
+ IN gctSIGNAL Signal,
+ IN OUT gctSIZE_T * waitSize
+ );
+
+/* gcuVIDMEM_NODE structure. */
+typedef union _gcuVIDMEM_NODE
+{
+ /* Allocated from gckVIDMEM. */
+ struct _gcsVIDMEM_NODE_VIDMEM
+ {
+ /* Owner of this node. */
+ gckVIDMEM memory;
+
+ /* Dual-linked list of nodes. */
+ gcuVIDMEM_NODE_PTR next;
+ gcuVIDMEM_NODE_PTR prev;
+
+ /* Dual linked list of free nodes. */
+ gcuVIDMEM_NODE_PTR nextFree;
+ gcuVIDMEM_NODE_PTR prevFree;
+
+ /* Information for this node. */
+ gctUINT32 offset;
+ gctSIZE_T bytes;
+ gctUINT32 alignment;
+
+#ifdef __QNXNTO__
+ /* Client/server vaddr (mapped using mmap_join). */
+ gctPOINTER logical;
+#endif
+
+ /* Locked counter. */
+ gctINT32 locked;
+
+ /* Memory pool. */
+ gcePOOL pool;
+ gctUINT32 physical;
+
+ /* Process ID owning this memory. */
+ gctUINT32 processID;
+
+ /* Prevent compositor from freeing until client unlocks. */
+ gctBOOL freePending;
+
+ /* */
+ gcsVIDMEM_NODE_SHARED_INFO sharedInfo;
+
+#if gcdDYNAMIC_MAP_RESERVED_MEMORY && gcdENABLE_VG
+ gctPOINTER kernelVirtual;
+#endif
+ }
+ VidMem;
+
+ /* Allocated from gckOS. */
+ struct _gcsVIDMEM_NODE_VIRTUAL
+ {
+ /* Pointer to gckKERNEL object. */
+ gckKERNEL kernel;
+
+ /* Information for this node. */
+ /* Contiguously allocated? */
+ gctBOOL contiguous;
+ /* mdl record pointer... a kmalloc address. Process agnostic. */
+ gctPHYS_ADDR physical;
+ gctSIZE_T bytes;
+ /* do_mmap_pgoff address... mapped per-process. */
+ gctPOINTER logical;
+
+ /* Page table information. */
+ /* Used only when node is not contiguous */
+ gctSIZE_T pageCount;
+
+ /* Used only when node is not contiguous */
+ gctPOINTER pageTables[gcdCORE_COUNT];
+ /* Pointer to gckKERNEL object who lock this. */
+ gckKERNEL lockKernels[gcdCORE_COUNT];
+ /* Actual physical address */
+ gctUINT32 addresses[gcdCORE_COUNT];
+
+ /* Mutex. */
+ gctPOINTER mutex;
+
+ /* Locked counter. */
+ gctINT32 lockeds[gcdCORE_COUNT];
+
+#ifdef __QNXNTO__
+ /* Single linked list of nodes. */
+ gcuVIDMEM_NODE_PTR next;
+
+ /* Unlock pending flag. */
+ gctBOOL unlockPendings[gcdCORE_COUNT];
+
+ /* Free pending flag. */
+ gctBOOL freePending;
+#endif
+
+ /* Process ID owning this memory. */
+ gctUINT32 processID;
+
+ /* Owner process sets freed to true
+ * when it trys to free a locked
+ * node */
+ gctBOOL freed;
+
+ /* */
+ gcsVIDMEM_NODE_SHARED_INFO sharedInfo;
+ }
+ Virtual;
+}
+gcuVIDMEM_NODE;
+
+/* gckVIDMEM object. */
+struct _gckVIDMEM
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Information for this video memory heap. */
+ gctUINT32 baseAddress;
+ gctSIZE_T bytes;
+ gctSIZE_T freeBytes;
+
+ /* Mapping for each type of surface. */
+ gctINT mapping[gcvSURF_NUM_TYPES];
+
+ /* Sentinel nodes for up to 8 banks. */
+ gcuVIDMEM_NODE sentinel[8];
+
+ /* Allocation threshold. */
+ gctSIZE_T threshold;
+
+ /* The heap mutex. */
+ gctPOINTER mutex;
+
+#if gcdUSE_VIDMEM_PER_PID
+ /* The Pid this VidMem belongs to. */
+ gctUINT32 pid;
+
+ struct _gckVIDMEM* next;
+#endif
+};
+
+/* gckMMU object. */
+struct _gckMMU
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Pointer to gckHARDWARE object. */
+ gckHARDWARE hardware;
+
+ /* The page table mutex. */
+ gctPOINTER pageTableMutex;
+
+ /* Page table information. */
+ gctSIZE_T pageTableSize;
+ gctPHYS_ADDR pageTablePhysical;
+ gctUINT32_PTR pageTableLogical;
+ gctUINT32 pageTableEntries;
+
+ /* Master TLB information. */
+ gctSIZE_T mtlbSize;
+ gctPHYS_ADDR mtlbPhysical;
+ gctUINT32_PTR mtlbLogical;
+ gctUINT32 mtlbEntries;
+
+ /* Free entries. */
+ gctUINT32 heapList;
+ gctBOOL freeNodes;
+
+ gctPOINTER staticSTLB;
+ gctBOOL enabled;
+
+ gctUINT32 dynamicMappingStart;
+
+#ifdef __QNXNTO__
+ /* Single linked list of all allocated nodes. */
+ gctPOINTER nodeMutex;
+ gcuVIDMEM_NODE_PTR nodeList;
+#endif
+};
+
+gceSTATUS
+gckKERNEL_AttachProcess(
+ IN gckKERNEL Kernel,
+ IN gctBOOL Attach
+ );
+
+gceSTATUS
+gckKERNEL_AttachProcessEx(
+ IN gckKERNEL Kernel,
+ IN gctBOOL Attach,
+ IN gctUINT32 PID
+ );
+
+#if gcdSECURE_USER
+gceSTATUS
+gckKERNEL_MapLogicalToPhysical(
+ IN gckKERNEL Kernel,
+ IN gcskSECURE_CACHE_PTR Cache,
+ IN OUT gctPOINTER * Data
+ );
+
+gceSTATUS
+gckKERNEL_FlushTranslationCache(
+ IN gckKERNEL Kernel,
+ IN gcskSECURE_CACHE_PTR Cache,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+#endif
+
+gceSTATUS
+gckHARDWARE_QueryIdle(
+ IN gckHARDWARE Hardware,
+ OUT gctBOOL_PTR IsIdle
+ );
+
+/******************************************************************************\
+******************************* gckCONTEXT Object *******************************
+\******************************************************************************/
+
+gceSTATUS
+gckCONTEXT_Construct(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 ProcessID,
+ OUT gckCONTEXT * Context
+ );
+
+gceSTATUS
+gckCONTEXT_Destroy(
+ IN gckCONTEXT Context
+ );
+
+gceSTATUS
+gckCONTEXT_Update(
+ IN gckCONTEXT Context,
+ IN gctUINT32 ProcessID,
+ IN gcsSTATE_DELTA_PTR StateDelta
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_h_ */
diff --git a/src/include_imx6/gc_hal_kernel_buffer.h b/src/include_imx6/gc_hal_kernel_buffer.h
new file mode 100644
index 0000000..24edc0b
--- /dev/null
+++ b/src/include_imx6/gc_hal_kernel_buffer.h
@@ -0,0 +1,192 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_buffer_h_
+#define __gc_hal_kernel_buffer_h_
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+************************ Command Buffer and Event Objects **********************
+\******************************************************************************/
+
+/* The number of context buffers per user. */
+#define gcdCONTEXT_BUFFER_COUNT 2
+
+/* State delta record. */
+typedef struct _gcsSTATE_DELTA_RECORD * gcsSTATE_DELTA_RECORD_PTR;
+typedef struct _gcsSTATE_DELTA_RECORD
+{
+ /* State address. */
+ gctUINT address;
+
+ /* State mask. */
+ gctUINT32 mask;
+
+ /* State data. */
+ gctUINT32 data;
+}
+gcsSTATE_DELTA_RECORD;
+
+/* State delta. */
+typedef struct _gcsSTATE_DELTA
+{
+ /* For debugging: the number of delta in the order of creation. */
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+ gctUINT num;
+#endif
+
+ /* For dumping. */
+#if gcdDUMP
+ gcoOS os;
+#endif
+
+ /* Main state delta ID. Every time state delta structure gets reinitialized,
+ main ID is incremented. If main state ID overflows, all map entry IDs get
+ reinitialized to make sure there is no potential erroneous match after
+ the overflow.*/
+ gctUINT id;
+
+ /* The number of contexts pending modification by the delta. */
+ gctINT refCount;
+
+ /* Vertex element count for the delta buffer. */
+ gctUINT elementCount;
+
+ /* Number of states currently stored in the record array. */
+ gctUINT recordCount;
+
+ /* Record array; holds all modified states. */
+ gcsSTATE_DELTA_RECORD_PTR recordArray;
+
+ /* Map entry ID is used for map entry validation. If map entry ID does not
+ match the main state delta ID, the entry and the corresponding state are
+ considered not in use. */
+ gctUINT_PTR mapEntryID;
+ gctUINT mapEntryIDSize;
+
+ /* If the map entry ID matches the main state delta ID, index points to
+ the state record in the record array. */
+ gctUINT_PTR mapEntryIndex;
+
+ /* Previous and next state deltas. */
+ gcsSTATE_DELTA_PTR prev;
+ gcsSTATE_DELTA_PTR next;
+}
+gcsSTATE_DELTA;
+
+/* Command buffer object. */
+struct _gcoCMDBUF
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Command buffer entry and exit pipes. */
+ gcePIPE_SELECT entryPipe;
+ gcePIPE_SELECT exitPipe;
+
+ /* Feature usage flags. */
+ gctBOOL using2D;
+ gctBOOL using3D;
+ gctBOOL usingFilterBlit;
+ gctBOOL usingPalette;
+
+ /* Physical address of command buffer. */
+ gctPHYS_ADDR physical;
+
+ /* Logical address of command buffer. */
+ gctPOINTER logical;
+
+ /* Number of bytes in command buffer. */
+ gctSIZE_T bytes;
+
+ /* Start offset into the command buffer. */
+ gctUINT32 startOffset;
+
+ /* Current offset into the command buffer. */
+ gctUINT32 offset;
+
+ /* Number of free bytes in command buffer. */
+ gctSIZE_T free;
+
+ /* Location of the last reserved area. */
+ gctPOINTER lastReserve;
+ gctUINT lastOffset;
+
+#if gcdSECURE_USER
+ /* Hint array for the current command buffer. */
+ gctUINT hintArraySize;
+ gctUINT32_PTR hintArray;
+ gctUINT32_PTR hintArrayTail;
+#endif
+
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+ /* Last load state command location and hardware address. */
+ gctUINT32_PTR lastLoadStatePtr;
+ gctUINT32 lastLoadStateAddress;
+ gctUINT32 lastLoadStateCount;
+#endif
+};
+
+typedef struct _gcsQUEUE
+{
+ /* Pointer to next gcsQUEUE structure. */
+ gcsQUEUE_PTR next;
+
+ /* Event information. */
+ gcsHAL_INTERFACE iface;
+}
+gcsQUEUE;
+
+/* Event queue. */
+struct _gcoQUEUE
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to current event queue. */
+ gcsQUEUE_PTR head;
+ gcsQUEUE_PTR tail;
+
+#ifdef __QNXNTO__
+ /* Buffer for records. */
+ gcsQUEUE_PTR records;
+ gctUINT32 freeBytes;
+ gctUINT32 offset;
+#else
+ /* List of free records. */
+ gcsQUEUE_PTR freeList;
+#endif
+ #define gcdIN_QUEUE_RECORD_LIMIT 16
+ /* Number of records currently in queue */
+ gctUINT32 recordCount;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_buffer_h_ */
diff --git a/src/include_imx6/gc_hal_kernel_context.h b/src/include_imx6/gc_hal_kernel_context.h
new file mode 100644
index 0000000..a5030de
--- /dev/null
+++ b/src/include_imx6/gc_hal_kernel_context.h
@@ -0,0 +1,146 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_context_h_
+#define __gc_hal_kernel_context_h_
+
+#include "gc_hal_kernel_buffer.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Maps state locations within the context buffer. */
+typedef struct _gcsSTATE_MAP * gcsSTATE_MAP_PTR;
+typedef struct _gcsSTATE_MAP
+{
+ /* Index of the state in the context buffer. */
+ gctUINT index;
+
+ /* State mask. */
+ gctUINT32 mask;
+}
+gcsSTATE_MAP;
+
+/* Context buffer. */
+typedef struct _gcsCONTEXT * gcsCONTEXT_PTR;
+typedef struct _gcsCONTEXT
+{
+ /* For debugging: the number of context buffer in the order of creation. */
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+ gctUINT num;
+#endif
+
+ /* Pointer to gckEVENT object. */
+ gckEVENT eventObj;
+
+ /* Context busy signal. */
+ gctSIGNAL signal;
+
+ /* Physical address of the context buffer. */
+ gctPHYS_ADDR physical;
+
+ /* Logical address of the context buffer. */
+ gctUINT32_PTR logical;
+
+ /* Pointer to the LINK commands. */
+ gctPOINTER link2D;
+ gctPOINTER link3D;
+
+ /* The number of pending state deltas. */
+ gctUINT deltaCount;
+
+ /* Pointer to the first delta to be applied. */
+ gcsSTATE_DELTA_PTR delta;
+
+ /* Next context buffer. */
+ gcsCONTEXT_PTR next;
+}
+gcsCONTEXT;
+
+/* gckCONTEXT structure that hold the current context. */
+struct _gckCONTEXT
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Pointer to gckHARDWARE object. */
+ gckHARDWARE hardware;
+
+ /* Command buffer alignment. */
+ gctSIZE_T alignment;
+ gctSIZE_T reservedHead;
+ gctSIZE_T reservedTail;
+
+ /* Context buffer metrics. */
+ gctSIZE_T stateCount;
+ gctSIZE_T totalSize;
+ gctSIZE_T bufferSize;
+ gctUINT32 linkIndex2D;
+ gctUINT32 linkIndex3D;
+ gctUINT32 linkIndexXD;
+ gctUINT32 entryOffset3D;
+ gctUINT32 entryOffsetXDFrom2D;
+ gctUINT32 entryOffsetXDFrom3D;
+
+ /* Dirty flags. */
+ gctBOOL dirty;
+ gctBOOL dirty2D;
+ gctBOOL dirty3D;
+ gcsCONTEXT_PTR dirtyBuffer;
+
+ /* State mapping. */
+ gcsSTATE_MAP_PTR map;
+
+ /* List of context buffers. */
+ gcsCONTEXT_PTR buffer;
+
+ /* A copy of the user record array. */
+ gctUINT recordArraySize;
+ gcsSTATE_DELTA_RECORD_PTR recordArray;
+
+ /* Requested pipe select for context. */
+ gcePIPE_SELECT entryPipe;
+ gcePIPE_SELECT exitPipe;
+
+ /* Variables used for building state buffer. */
+ gctUINT32 lastAddress;
+ gctSIZE_T lastSize;
+ gctUINT32 lastIndex;
+ gctBOOL lastFixed;
+
+ /* Hint array. */
+#if gcdSECURE_USER
+ gctBOOL_PTR hint;
+#endif
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_context_h_ */
+
diff --git a/src/include_imx6/gc_hal_kernel_debug.h b/src/include_imx6/gc_hal_kernel_debug.h
new file mode 100644
index 0000000..5bbc893
--- /dev/null
+++ b/src/include_imx6/gc_hal_kernel_debug.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_debug_h_
+#define __gc_hal_kernel_debug_h_
+
+#include <gc_hal_kernel_linux.h>
+#include <linux/spinlock.h>
+#include <linux/time.h>
+#include <stdarg.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** OS-dependent Macros *****************************
+\******************************************************************************/
+
+typedef va_list gctARGUMENTS;
+
+#define gcmkARGUMENTS_START(Arguments, Pointer) \
+ va_start(Arguments, Pointer)
+
+#define gcmkARGUMENTS_END(Arguments) \
+ va_end(Arguments)
+
+#define gcmkDECLARE_LOCK(__spinLock__) \
+ static DEFINE_SPINLOCK(__spinLock__);
+
+#define gcmkLOCKSECTION(__spinLock__) \
+ spin_lock(&__spinLock__)
+
+#define gcmkUNLOCKSECTION(__spinLock__) \
+ spin_unlock(&__spinLock__)
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+# define gcmkGETPROCESSID() \
+ task_tgid_vnr(current)
+#else
+# define gcmkGETPROCESSID() \
+ current->tgid
+#endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+# define gcmkGETTHREADID() \
+ task_pid_vnr(current)
+#else
+# define gcmkGETTHREADID() \
+ current->pid
+#endif
+
+#define gcmkOUTPUT_STRING(String) \
+ printk(String); \
+ touch_softlockup_watchdog()
+
+#define gcmkSPRINTF(Destination, Size, Message, Value) \
+ snprintf(Destination, Size, Message, Value)
+
+#define gcmkSPRINTF2(Destination, Size, Message, Value1, Value2) \
+ snprintf(Destination, Size, Message, Value1, Value2)
+
+#define gcmkSPRINTF3(Destination, Size, Message, Value1, Value2, Value3) \
+ snprintf(Destination, Size, Message, Value1, Value2, Value3)
+
+#define gcmkVSPRINTF(Destination, Size, Message, Arguments) \
+ vsnprintf(Destination, Size, Message, *(va_list *) &Arguments)
+
+#define gcmkSTRCAT(Destination, Size, String) \
+ strncat(Destination, String, Size)
+
+/* If not zero, forces data alignment in the variable argument list
+ by its individual size. */
+#define gcdALIGNBYSIZE 1
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_debug_h_ */
diff --git a/src/include_imx6/gc_hal_kernel_device.h b/src/include_imx6/gc_hal_kernel_device.h
new file mode 100644
index 0000000..5bbbd66
--- /dev/null
+++ b/src/include_imx6/gc_hal_kernel_device.h
@@ -0,0 +1,177 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_device_h_
+#define __gc_hal_kernel_device_h_
+
+#ifdef ANDROID
+#define gcdkREPORT_VIDMEM_LEAK 0
+#else
+#define gcdkREPORT_VIDMEM_LEAK 1
+#endif
+
+/******************************************************************************\
+******************************* gckGALDEVICE Structure *******************************
+\******************************************************************************/
+
+typedef struct _gckGALDEVICE
+{
+ /* Objects. */
+ gckOS os;
+ gckKERNEL kernels[gcdCORE_COUNT];
+
+ /* Attributes. */
+ gctSIZE_T internalSize;
+ gctPHYS_ADDR internalPhysical;
+ gctPOINTER internalLogical;
+ gckVIDMEM internalVidMem;
+ gctSIZE_T externalSize;
+ gctPHYS_ADDR externalPhysical;
+ gctPOINTER externalLogical;
+ gckVIDMEM externalVidMem;
+ gckVIDMEM contiguousVidMem;
+ gctPOINTER contiguousBase;
+ gctPHYS_ADDR contiguousPhysical;
+ gctSIZE_T contiguousSize;
+ gctBOOL contiguousMapped;
+ gctPOINTER contiguousMappedUser;
+ gctSIZE_T systemMemorySize;
+ gctUINT32 systemMemoryBaseAddress;
+ gctPOINTER registerBases[gcdCORE_COUNT];
+ gctSIZE_T registerSizes[gcdCORE_COUNT];
+ gctUINT32 baseAddress;
+ gctUINT32 requestedRegisterMemBases[gcdCORE_COUNT];
+ gctSIZE_T requestedRegisterMemSizes[gcdCORE_COUNT];
+ gctUINT32 requestedContiguousBase;
+ gctSIZE_T requestedContiguousSize;
+
+ /* IRQ management. */
+ gctINT irqLines[gcdCORE_COUNT];
+ gctBOOL isrInitializeds[gcdCORE_COUNT];
+ gctBOOL dataReadys[gcdCORE_COUNT];
+
+ /* Thread management. */
+ struct task_struct *threadCtxts[gcdCORE_COUNT];
+ struct semaphore semas[gcdCORE_COUNT];
+ gctBOOL threadInitializeds[gcdCORE_COUNT];
+ gctBOOL killThread;
+
+ /* Signal management. */
+ gctINT signal;
+
+ /* Core mapping */
+ gceCORE coreMapping[8];
+
+ /* States before suspend. */
+ gceCHIPPOWERSTATE statesStored[gcdCORE_COUNT];
+
+ /* Clock management.*/
+ struct clk *clk_3d_core;
+ struct clk *clk_3d_shader;
+ struct clk *clk_2d_core;
+ struct clk *clk_2d_axi;
+ struct clk *clk_vg_axi;
+
+#if gcdPOWEROFF_TIMEOUT
+ struct task_struct *pmThreadCtxts[gcdCORE_COUNT];
+ gctBOOL pmThreadInitializeds[gcdCORE_COUNT];
+#endif
+}
+* gckGALDEVICE;
+
+typedef struct _gcsHAL_PRIVATE_DATA
+{
+ gckGALDEVICE device;
+ gctPOINTER mappedMemory;
+ gctPOINTER contiguousLogical;
+ /* The process opening the device may not be the same as the one that closes it. */
+ gctUINT32 pidOpen;
+}
+gcsHAL_PRIVATE_DATA, * gcsHAL_PRIVATE_DATA_PTR;
+
+gceSTATUS gckGALDEVICE_Setup_ISR(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Setup_ISR_2D(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Setup_ISR_VG(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Release_ISR(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Release_ISR_2D(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Release_ISR_VG(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Start_Threads(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Stop_Threads(
+ gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Start(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Stop(
+ gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Construct(
+ IN gctINT IrqLine,
+ IN gctUINT32 RegisterMemBase,
+ IN gctSIZE_T RegisterMemSize,
+ IN gctINT IrqLine2D,
+ IN gctUINT32 RegisterMemBase2D,
+ IN gctSIZE_T RegisterMemSize2D,
+ IN gctINT IrqLineVG,
+ IN gctUINT32 RegisterMemBaseVG,
+ IN gctSIZE_T RegisterMemSizeVG,
+ IN gctUINT32 ContiguousBase,
+ IN gctSIZE_T ContiguousSize,
+ IN gctSIZE_T BankSize,
+ IN gctINT FastClear,
+ IN gctINT Compression,
+ IN gctUINT32 PhysBaseAddr,
+ IN gctUINT32 PhysSize,
+ IN gctINT Signal,
+ OUT gckGALDEVICE *Device
+ );
+
+gceSTATUS gckGALDEVICE_Destroy(
+ IN gckGALDEVICE Device
+ );
+
+#endif /* __gc_hal_kernel_device_h_ */
diff --git a/src/include_imx6/gc_hal_kernel_hardware.h b/src/include_imx6/gc_hal_kernel_hardware.h
new file mode 100644
index 0000000..9472b82
--- /dev/null
+++ b/src/include_imx6/gc_hal_kernel_hardware.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_hardware_h_
+#define __gc_hal_kernel_hardware_h_
+
+#if gcdENABLE_VG
+#include "gc_hal_kernel_hardware_vg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* gckHARDWARE object. */
+struct _gckHARDWARE
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gctKERNEL object. */
+ gckKERNEL kernel;
+
+ /* Pointer to gctOS object. */
+ gckOS os;
+
+ /* Core */
+ gceCORE core;
+
+ /* Chip characteristics. */
+ gcsHAL_QUERY_CHIP_IDENTITY identity;
+ gctBOOL allowFastClear;
+ gctBOOL allowCompression;
+ gctUINT32 powerBaseAddress;
+ gctBOOL extraEventStates;
+
+ /* Big endian */
+ gctBOOL bigEndian;
+
+ /* Chip status */
+ gctPOINTER powerMutex;
+ gctUINT32 powerProcess;
+ gctUINT32 powerThread;
+ gceCHIPPOWERSTATE chipPowerState;
+ gctUINT32 lastWaitLink;
+ gctBOOL clockState;
+ gctBOOL powerState;
+ gctPOINTER globalSemaphore;
+
+ gctISRMANAGERFUNC startIsr;
+ gctISRMANAGERFUNC stopIsr;
+ gctPOINTER isrContext;
+
+ gctUINT32 mmuVersion;
+
+ /* Type */
+ gceHARDWARE_TYPE type;
+
+#if gcdPOWEROFF_TIMEOUT
+ gctUINT32 powerOffTime;
+ gctSIGNAL powerOffSignal;
+ gctUINT32 powerOffTimeout;
+#endif
+
+ gctPOINTER pageTableDirty;
+};
+
+gceSTATUS
+gckHARDWARE_GetBaseAddress(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+gceSTATUS
+gckHARDWARE_NeedBaseAddress(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 State,
+ OUT gctBOOL_PTR NeedBase
+ );
+
+gceSTATUS
+gckHARDWARE_GetFrameInfo(
+ IN gckHARDWARE Hardware,
+ OUT gcsHAL_FRAME_INFO * FrameInfo
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_hardware_h_ */
+
diff --git a/src/include_imx6/gc_hal_kernel_hardware_command_vg.h b/src/include_imx6/gc_hal_kernel_hardware_command_vg.h
new file mode 100644
index 0000000..a60bead
--- /dev/null
+++ b/src/include_imx6/gc_hal_kernel_hardware_command_vg.h
@@ -0,0 +1,323 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+
+
+#ifndef __gc_hal_kernel_hardware_command_vg_h_
+#define __gc_hal_kernel_hardware_command_vg_h_
+
+/******************************************************************************\
+******************* Task and Interrupt Management Structures. ******************
+\******************************************************************************/
+
+/* Task storage header. */
+typedef struct _gcsTASK_STORAGE * gcsTASK_STORAGE_PTR;
+typedef struct _gcsTASK_STORAGE
+{
+ /* Next allocated storage buffer. */
+ gcsTASK_STORAGE_PTR next;
+}
+gcsTASK_STORAGE;
+
+/* Task container header. */
+typedef struct _gcsTASK_CONTAINER * gcsTASK_CONTAINER_PTR;
+typedef struct _gcsTASK_CONTAINER
+{
+ /* The number of tasks left to be processed in the container. */
+ gctINT referenceCount;
+
+ /* Size of the buffer. */
+ gctUINT size;
+
+ /* Link to the previous and the next allocated containers. */
+ gcsTASK_CONTAINER_PTR allocPrev;
+ gcsTASK_CONTAINER_PTR allocNext;
+
+ /* Link to the previous and the next containers in the free list. */
+ gcsTASK_CONTAINER_PTR freePrev;
+ gcsTASK_CONTAINER_PTR freeNext;
+}
+gcsTASK_CONTAINER;
+
+/* Kernel space task master table entry. */
+typedef struct _gcsBLOCK_TASK_ENTRY * gcsBLOCK_TASK_ENTRY_PTR;
+typedef struct _gcsBLOCK_TASK_ENTRY
+{
+ /* Pointer to the current task container for the block. */
+ gcsTASK_CONTAINER_PTR container;
+
+ /* Pointer to the current task data within the container. */
+ gcsTASK_HEADER_PTR task;
+
+ /* Pointer to the last link task within the container. */
+ gcsTASK_LINK_PTR link;
+
+ /* Number of interrupts allocated for this block. */
+ gctUINT interruptCount;
+
+ /* The index of the current interrupt. */
+ gctUINT interruptIndex;
+
+ /* Interrupt semaphore. */
+ gctSEMAPHORE interruptSemaphore;
+
+ /* Interrupt value array. */
+ gctINT32 interruptArray[32];
+}
+gcsBLOCK_TASK_ENTRY;
+
+
+/******************************************************************************\
+********************* Command Queue Management Structures. *********************
+\******************************************************************************/
+
+/* Command queue kernel element pointer. */
+typedef struct _gcsKERNEL_CMDQUEUE * gcsKERNEL_CMDQUEUE_PTR;
+
+/* Command queue object handler function type. */
+typedef gceSTATUS (* gctOBJECT_HANDLER) (
+ gckVGKERNEL Kernel,
+ gcsKERNEL_CMDQUEUE_PTR Entry
+ );
+
+/* Command queue kernel element. */
+typedef struct _gcsKERNEL_CMDQUEUE
+{
+ /* The number of buffers in the queue. */
+ gcsCMDBUFFER_PTR commandBuffer;
+
+ /* Pointer to the object handler function. */
+ gctOBJECT_HANDLER handler;
+}
+gcsKERNEL_CMDQUEUE;
+
+/* Command queue header. */
+typedef struct _gcsKERNEL_QUEUE_HEADER * gcsKERNEL_QUEUE_HEADER_PTR;
+typedef struct _gcsKERNEL_QUEUE_HEADER
+{
+ /* The size of the buffer in bytes. */
+ gctUINT size;
+
+ /* The number of pending entries to be processed. */
+ volatile gctUINT pending;
+
+ /* The current command queue entry. */
+ gcsKERNEL_CMDQUEUE_PTR currentEntry;
+
+ /* Next buffer. */
+ gcsKERNEL_QUEUE_HEADER_PTR next;
+}
+gcsKERNEL_QUEUE_HEADER;
+
+
+/******************************************************************************\
+******************************* gckVGCOMMAND Object *******************************
+\******************************************************************************/
+
+/* gckVGCOMMAND object. */
+struct _gckVGCOMMAND
+{
+ /***************************************************************************
+ ** Object data and pointers.
+ */
+
+ gcsOBJECT object;
+ gckVGKERNEL kernel;
+ gckOS os;
+ gckVGHARDWARE hardware;
+
+ /* Features. */
+ gctBOOL fe20;
+ gctBOOL vg20;
+ gctBOOL vg21;
+
+
+ /***************************************************************************
+ ** Enable command queue dumping.
+ */
+
+ gctBOOL enableDumping;
+
+
+ /***************************************************************************
+ ** Bus Error interrupt.
+ */
+
+ gctINT32 busErrorInt;
+
+
+ /***************************************************************************
+ ** Command buffer information.
+ */
+
+ gcsCOMMAND_BUFFER_INFO info;
+
+
+ /***************************************************************************
+ ** Synchronization objects.
+ */
+
+ gctPOINTER queueMutex;
+ gctPOINTER taskMutex;
+ gctPOINTER commitMutex;
+
+
+ /***************************************************************************
+ ** Task management.
+ */
+
+ /* The head of the storage buffer linked list. */
+ gcsTASK_STORAGE_PTR taskStorage;
+
+ /* Allocation size. */
+ gctUINT taskStorageGranularity;
+ gctUINT taskStorageUsable;
+
+ /* The free container list. */
+ gcsTASK_CONTAINER_PTR taskFreeHead;
+ gcsTASK_CONTAINER_PTR taskFreeTail;
+
+ /* Task table */
+ gcsBLOCK_TASK_ENTRY taskTable[gcvBLOCK_COUNT];
+
+
+ /***************************************************************************
+ ** Command queue.
+ */
+
+ /* Pointer to the allocated queue memory. */
+ gcsKERNEL_QUEUE_HEADER_PTR queue;
+
+ /* Pointer to the current available queue from which new queue entries
+ will be allocated. */
+ gcsKERNEL_QUEUE_HEADER_PTR queueHead;
+
+ /* If different from queueHead, points to the command queue which is
+ currently being executed by the hardware. */
+ gcsKERNEL_QUEUE_HEADER_PTR queueTail;
+
+ /* Points to the queue to merge the tail with when the tail is processed. */
+ gcsKERNEL_QUEUE_HEADER_PTR mergeQueue;
+
+ /* Queue overflow counter. */
+ gctUINT queueOverflow;
+
+
+ /***************************************************************************
+ ** Context.
+ */
+
+ /* Context counter used for unique ID. */
+ gctUINT64 contextCounter;
+
+ /* Current context ID. */
+ gctUINT64 currentContext;
+
+ /* Command queue power semaphore. */
+ gctPOINTER powerSemaphore;
+ gctINT32 powerStallInt;
+ gcsCMDBUFFER_PTR powerStallBuffer;
+ gctSIGNAL powerStallSignal;
+
+};
+
+/******************************************************************************\
+************************ gckVGCOMMAND Object Internal API. ***********************
+\******************************************************************************/
+
+/* Initialize architecture dependent command buffer information. */
+gceSTATUS
+gckVGCOMMAND_InitializeInfo(
+ IN gckVGCOMMAND Command
+ );
+
+/* Form a STATE command at the specified location in the command buffer. */
+gceSTATUS
+gckVGCOMMAND_StateCommand(
+ IN gckVGCOMMAND Command,
+ IN gctUINT32 Pipe,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Address,
+ IN gctSIZE_T Count,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Form a RESTART command at the specified location in the command buffer. */
+gceSTATUS
+gckVGCOMMAND_RestartCommand(
+ IN gckVGCOMMAND Command,
+ IN gctPOINTER Logical,
+ IN gctUINT32 FetchAddress,
+ IN gctUINT FetchCount,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Form a FETCH command at the specified location in the command buffer. */
+gceSTATUS
+gckVGCOMMAND_FetchCommand(
+ IN gckVGCOMMAND Command,
+ IN gctPOINTER Logical,
+ IN gctUINT32 FetchAddress,
+ IN gctUINT FetchCount,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Form a CALL command at the specified location in the command buffer. */
+gceSTATUS
+gckVGCOMMAND_CallCommand(
+ IN gckVGCOMMAND Command,
+ IN gctPOINTER Logical,
+ IN gctUINT32 FetchAddress,
+ IN gctUINT FetchCount,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Form a RETURN command at the specified location in the command buffer. */
+gceSTATUS
+gckVGCOMMAND_ReturnCommand(
+ IN gckVGCOMMAND Command,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Form an EVENT command at the specified location in the command buffer. */
+gceSTATUS
+gckVGCOMMAND_EventCommand(
+ IN gckVGCOMMAND Command,
+ IN gctPOINTER Logical,
+ IN gceBLOCK Block,
+ IN gctINT32 InterruptId,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Form an END command at the specified location in the command buffer. */
+gceSTATUS
+gckVGCOMMAND_EndCommand(
+ IN gckVGCOMMAND Command,
+ IN gctPOINTER Logical,
+ IN gctINT32 InterruptId,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+#endif /* __gc_hal_kernel_hardware_command_h_ */
+
diff --git a/src/include_imx6/gc_hal_kernel_hardware_vg.h b/src/include_imx6/gc_hal_kernel_hardware_vg.h
new file mode 100644
index 0000000..0b2742d
--- /dev/null
+++ b/src/include_imx6/gc_hal_kernel_hardware_vg.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+
+
+#ifndef __gc_hal_kernel_hardware_vg_h_
+#define __gc_hal_kernel_hardware_vg_h_
+
+/* gckHARDWARE object. */
+struct _gckVGHARDWARE
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckKERNEL object. */
+ gckVGKERNEL kernel;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Chip characteristics. */
+ gceCHIPMODEL chipModel;
+ gctUINT32 chipRevision;
+ gctUINT32 chipFeatures;
+ gctUINT32 chipMinorFeatures;
+ gctUINT32 chipMinorFeatures2;
+ gctBOOL allowFastClear;
+
+ /* Features. */
+ gctBOOL fe20;
+ gctBOOL vg20;
+ gctBOOL vg21;
+
+ /* Event mask. */
+ gctUINT32 eventMask;
+
+ gctBOOL clockState;
+ gctBOOL powerState;
+ gctPOINTER powerMutex;
+ gctSIGNAL idleSignal;
+ gctUINT32 powerProcess;
+ gctUINT32 powerThread;
+ gceCHIPPOWERSTATE chipPowerState;
+ gceCHIPPOWERSTATE chipPowerStateGlobal;
+ gctISRMANAGERFUNC startIsr;
+ gctISRMANAGERFUNC stopIsr;
+ gctPOINTER isrContext;
+ gctUINT32 powerOffTime;
+ gctUINT32 powerOffTimeout;
+ gctTHREAD timeIdleThread;
+ gctBOOL killThread;
+
+};
+
+#endif /* __gc_hal_kernel_hardware_h_ */
+
diff --git a/src/include_imx6/gc_hal_kernel_linux.h b/src/include_imx6/gc_hal_kernel_linux.h
new file mode 100644
index 0000000..6b69f0c
--- /dev/null
+++ b/src/include_imx6/gc_hal_kernel_linux.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_linux_h_
+#define __gc_hal_kernel_linux_h_
+
+#include <linux/version.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/mm.h>
+#include <linux/sched.h>
+#include <linux/signal.h>
+#ifdef FLAREON
+# include <asm/arch-realview/dove_gpio_irq.h>
+#endif
+#include <linux/interrupt.h>
+#include <linux/vmalloc.h>
+#include <linux/dma-mapping.h>
+#include <linux/kthread.h>
+
+#ifdef MODVERSIONS
+# include <linux/modversions.h>
+#endif
+#include <asm/io.h>
+#include <asm/uaccess.h>
+
+#if ENABLE_GPU_CLOCK_BY_DRIVER && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
+#include <linux/clk.h>
+#endif
+
+#define NTSTRSAFE_NO_CCH_FUNCTIONS
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_kernel.h"
+#include "gc_hal_kernel_device.h"
+#include "gc_hal_kernel_os.h"
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+#define FIND_TASK_BY_PID(x) pid_task(find_vpid(x), PIDTYPE_PID)
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
+#define FIND_TASK_BY_PID(x) find_task_by_vpid(x)
+#else
+#define FIND_TASK_BY_PID(x) find_task_by_pid(x)
+#endif
+
+#define _WIDE(string) L##string
+#define WIDE(string) _WIDE(string)
+
+#define countof(a) (sizeof(a) / sizeof(a[0]))
+
+#define DRV_NAME "galcore"
+
+#define GetPageCount(size, offset) ((((size) + ((offset) & ~PAGE_CACHE_MASK)) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT)
+
+static inline gctINT
+GetOrder(
+ IN gctINT numPages
+ )
+{
+ gctINT order = 0;
+
+ while ((1 << order) < numPages) order++;
+
+ return order;
+}
+
+#endif /* __gc_hal_kernel_linux_h_ */
diff --git a/src/include_imx6/gc_hal_kernel_os.h b/src/include_imx6/gc_hal_kernel_os.h
new file mode 100644
index 0000000..021e77f
--- /dev/null
+++ b/src/include_imx6/gc_hal_kernel_os.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_os_h_
+#define __gc_hal_kernel_os_h_
+
+typedef struct _LINUX_MDL_MAP
+{
+ gctINT pid;
+ gctPOINTER vmaAddr;
+ struct vm_area_struct * vma;
+ struct _LINUX_MDL_MAP * next;
+}
+LINUX_MDL_MAP;
+
+typedef struct _LINUX_MDL_MAP * PLINUX_MDL_MAP;
+
+typedef struct _LINUX_MDL
+{
+ gctINT pid;
+ char * addr;
+
+ union _pages
+ {
+ /* Pointer to a array of pages. */
+ struct page * contiguousPages;
+ /* Pointer to a array of pointers to page. */
+ struct page ** nonContiguousPages;
+ }
+ u;
+
+#ifdef NO_DMA_COHERENT
+ gctPOINTER kaddr;
+#endif /* NO_DMA_COHERENT */
+
+ gctINT numPages;
+ gctINT pagedMem;
+ gctBOOL contiguous;
+ dma_addr_t dmaHandle;
+ PLINUX_MDL_MAP maps;
+ struct _LINUX_MDL * prev;
+ struct _LINUX_MDL * next;
+}
+LINUX_MDL, *PLINUX_MDL;
+
+extern PLINUX_MDL_MAP
+FindMdlMap(
+ IN PLINUX_MDL Mdl,
+ IN gctINT PID
+ );
+
+typedef struct _DRIVER_ARGS
+{
+ gctPOINTER InputBuffer;
+ gctUINT32 InputBufferSize;
+ gctPOINTER OutputBuffer;
+ gctUINT32 OutputBufferSize;
+}
+DRIVER_ARGS;
+
+/* Cleanup the signal table. */
+gceSTATUS
+gckOS_CleanProcessSignal(
+ gckOS Os,
+ gctHANDLE Process
+ );
+
+#endif /* __gc_hal_kernel_os_h_ */
diff --git a/src/include_imx6/gc_hal_kernel_precomp.h b/src/include_imx6/gc_hal_kernel_precomp.h
new file mode 100644
index 0000000..004e6bd
--- /dev/null
+++ b/src/include_imx6/gc_hal_kernel_precomp.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_precomp_h_
+#define __gc_hal_kernel_precomp_h_
+
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_kernel.h"
+
+#endif /* __gc_hal_kernel_precomp_h_ */
diff --git a/src/include_imx6/gc_hal_kernel_vg.h b/src/include_imx6/gc_hal_kernel_vg.h
new file mode 100644
index 0000000..04fccf4
--- /dev/null
+++ b/src/include_imx6/gc_hal_kernel_vg.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+
+
+#ifndef __gc_hal_kernel_vg_h_
+#define __gc_hal_kernel_vg_h_
+
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_kernel_hardware.h"
+
+/******************************************************************************\
+********************************** Structures **********************************
+\******************************************************************************/
+
+
+/* gckKERNEL object. */
+struct _gckVGKERNEL
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Pointer to gckHARDWARE object. */
+ gckVGHARDWARE hardware;
+
+ /* Pointer to gckINTERRUPT object. */
+ gckVGINTERRUPT interrupt;
+
+ /* Pointer to gckCOMMAND object. */
+ gckVGCOMMAND command;
+
+ /* Pointer to context. */
+ gctPOINTER context;
+
+ /* Pointer to gckMMU object. */
+ gckVGMMU mmu;
+
+ gckKERNEL kernel;
+};
+
+/* gckMMU object. */
+struct _gckVGMMU
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Pointer to gckHARDWARE object. */
+ gckVGHARDWARE hardware;
+
+ /* The page table mutex. */
+ gctPOINTER mutex;
+
+ /* Page table information. */
+ gctSIZE_T pageTableSize;
+ gctPHYS_ADDR pageTablePhysical;
+ gctPOINTER pageTableLogical;
+
+ /* Allocation index. */
+ gctUINT32 entryCount;
+ gctUINT32 entry;
+};
+
+#endif /* __gc_hal_kernel_h_ */
diff --git a/src/include_imx6/gc_hal_md5.h b/src/include_imx6/gc_hal_md5.h
new file mode 100644
index 0000000..bc56d95
--- /dev/null
+++ b/src/include_imx6/gc_hal_md5.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+/*
+ Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved.
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ L. Peter Deutsch
+ ghost@aladdin.com
+
+ */
+/* $Id: gc_hal_md5.h,v 1.1.4.1 2012/02/08 23:31:39 semih.demirer Exp $ */
+/*
+ Independent implementation of MD5 (RFC 1321).
+
+ This code implements the MD5 Algorithm defined in RFC 1321, whose
+ text is available at
+ http://www.ietf.org/rfc/rfc1321.txt
+ The code is derived from the text of the RFC, including the test suite
+ (section A.5) but excluding the rest of Appendix A. It does not include
+ any code or documentation that is identified in the RFC as being
+ copyrighted.
+
+ The original and principal author of md5.h is L. Peter Deutsch
+ <ghost@aladdin.com>. Other authors are noted in the change history
+ that follows (in reverse chronological order):
+
+ 2002-04-13 lpd Removed support for non-ANSI compilers; removed
+ references to Ghostscript; clarified derivation from RFC 1321;
+ now handles byte order either statically or dynamically.
+ 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
+ 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
+ added conditionalization for C++ compilation from Martin
+ Purschke <purschke@bnl.gov>.
+ 1999-05-03 lpd Original version.
+ */
+
+
+#ifndef __gc_hal_md5_h_
+#define __gc_hal_md5_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This package supports both compile-time and run-time determination of CPU
+ * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
+ * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is
+ * defined as non-zero, the code will be compiled to run only on big-endian
+ * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to
+ * run on either big- or little-endian CPUs, but will run slightly less
+ * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.
+ */
+
+typedef unsigned char gctMD5_Byte; /* 8-bit byte */
+typedef unsigned int gctMD5_Word; /* 32-bit word */
+
+/* Define the state of the MD5 Algorithm. */
+typedef struct _gcsMD5_State {
+ gctMD5_Word count[2]; /* message length in bits, lsw first */
+ gctMD5_Word abcd[4]; /* digest buffer */
+ gctMD5_Byte buf[64]; /* accumulate block */
+} gcsMD5_State;
+
+/* Initialize the algorithm. */
+void gcoMD5_Init(gcsMD5_State *pms);
+
+/* Append a string to the message. */
+void gcoMD5_Append(gcsMD5_State *pms, const gctMD5_Byte *data, int nbytes);
+
+/* Finish the message and return the digest. */
+void gcoMD5_Finish(gcsMD5_State *pms, gctMD5_Byte digest[16]);
+
+#ifdef __cplusplus
+} /* end extern "C" */
+#endif
+
+#endif /* md5_INCLUDED */
diff --git a/src/include_imx6/gc_hal_mem.h b/src/include_imx6/gc_hal_mem.h
new file mode 100644
index 0000000..e64f7e7
--- /dev/null
+++ b/src/include_imx6/gc_hal_mem.h
@@ -0,0 +1,532 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+/*
+** Include file for the local memory management.
+*/
+
+#ifndef __gc_hal_mem_h_
+#define __gc_hal_mem_h_
+#ifndef VIVANTE_NO_3D
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*******************************************************************************
+** Usage:
+
+ The macros to declare MemPool type and functions are
+ gcmMEM_DeclareFSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareVSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix)
+
+ The data structures for MemPool are
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+
+ The MemPool constructor and destructor functions are
+ gcfMEM_InitFSMemPool(gcsMEM_FS_MEM_POOL *, gcoOS, gctUINT, gctUINT);
+ gcfMEM_FreeFSMemPool(gcsMEM_FS_MEM_POOL *);
+ gcfMEM_InitVSMemPool(gcsMEM_VS_MEM_POOL *, gcoOS, gctUINT, gctBOOL);
+ gcfMEM_FreeVSMemPool(gcsMEM_VS_MEM_POOL *);
+ gcfMEM_InitAFSMemPool(gcsMEM_AFS_MEM_POOL *, gcoOS, gctUINT);
+ gcfMEM_FreeAFSMemPool(gcsMEM_AFS_MEM_POOL *);
+
+ FS: for Fixed-Size data structures
+ VS: for Variable-size data structures
+ AFS: for Array of Fixed-Size data structures
+
+
+ // Example 1: For a fixed-size data structure, struct gcsNode.
+ // It is used locally in a file, so the functions are static without prefix.
+ // At top level, declear allocate and free functions.
+ // The first argument is the data type.
+ // The second armument is the short name used in the fuctions.
+ gcmMEM_DeclareFSMemPool(struct gcsNode, Node, );
+
+ // The previous macro creates two inline functions,
+ // _AllocateNode and _FreeNode.
+
+ // In function or struct
+ gcsMEM_FS_MEM_POOL nodeMemPool;
+
+ // In function,
+ struct gcsNode * node;
+ gceSTATUS status;
+
+ // Before using the memory pool, initialize it.
+ // The second argument is the gcoOS object.
+ // The third argument is the number of data structures to allocate for each chunk.
+ status = gcfMEM_InitFSMemPool(&nodeMemPool, os, 100, sizeof(struct gcsNode));
+ ...
+
+ // Allocate a node.
+ status = _AllocateNode(nodeMemPool, &node);
+ ...
+ // Free a node.
+ _FreeNode(nodeMemPool, node);
+
+ // After using the memory pool, free it.
+ gcfMEM_FreeFSMemPool(&nodeMemPool);
+
+
+ // Example 2: For array of fixed-size data structures, struct gcsNode.
+ // It is used in several files, so the functions are extern with prefix.
+ // At top level, declear allocate and free functions.
+ // The first argument is the data type, and the second one is the short name
+ // used in the fuctions.
+ gcmMEM_DeclareAFSMemPool(struct gcsNode, NodeArray, gcfOpt);
+
+ // The previous macro creates two inline functions,
+ // gcfOpt_AllocateNodeArray and gcfOpt_FreeNodeArray.
+
+ // In function or struct
+ gcsMEM_AFS_MEM_POOL nodeArrayMemPool;
+
+ // In function,
+ struct gcsNode * nodeArray;
+ gceSTATUS status;
+
+ // Before using the array memory pool, initialize it.
+ // The second argument is the gcoOS object, the third is the number of data
+ // structures to allocate for each chunk.
+ status = gcfMEM_InitAFSMemPool(&nodeArrayMemPool, os, sizeof(struct gcsNode));
+ ...
+
+ // Allocate a node array of size 100.
+ status = gcfOpt_AllocateNodeArray(nodeArrayMemPool, &nodeArray, 100);
+ ...
+ // Free a node array.
+ gcfOpt_FreeNodeArray(&nodeArrayMemPool, nodeArray);
+
+ // After using the array memory pool, free it.
+ gcfMEM_FreeAFSMemPool(&nodeArrayMemPool);
+
+*******************************************************************************/
+
+/*******************************************************************************
+** To switch back to use gcoOS_Allocate and gcoOS_Free, add
+** #define USE_LOCAL_MEMORY_POOL 0
+** before including this file.
+*******************************************************************************/
+#ifndef USE_LOCAL_MEMORY_POOL
+/*
+ USE_LOCAL_MEMORY_POOL
+
+ This define enables the local memory management to improve performance.
+*/
+#define USE_LOCAL_MEMORY_POOL 1
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Structures
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+#else
+ typedef gcoOS gcsMEM_FS_MEM_POOL;
+ typedef gcoOS gcsMEM_VS_MEM_POOL;
+ typedef gcoOS gcsMEM_AFS_MEM_POOL;
+#endif
+
+/*******************************************************************************
+** Memory Pool Macros
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ gcmERR_RETURN(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type))); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcfMEM_FSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName##List( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * FirstPointer, \
+ Type * LastPointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x FirstPointer=0x%x LastPointer=0x%x", MemPool, FirstPointer, LastPointer); \
+ status = gcfMEM_FSMemPoolFreeAList(MemPool, (gctPOINTER) FirstPointer, (gctPOINTER) LastPointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status;\
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ status = gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+ Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ gcmERR_RETURN(gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, size)); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pinter); \
+ status = gcfMEM_VSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ status = gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ gcmERR_RETURN(gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type))); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcfMEM_AFSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#else
+
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type))); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcmOS_SAFE_FREE(MemPool, Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ status = gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Size)); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcmOS_SAFE_FREE(MemPool, Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ status = gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type))); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcmOS_SAFE_FREE(MemPool, Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Functions
+*******************************************************************************/
+gceSTATUS
+gcfMEM_InitFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolGetANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeAList(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER FirstNode,
+ IN gctPOINTER LastNode
+ );
+
+gceSTATUS
+gcfMEM_InitVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT BlockSize,
+ IN gctBOOL RecycleFreeNode
+ );
+
+gceSTATUS
+gcfMEM_FreeVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolGetANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctUINT Size,
+ IN gctUINT Alignment,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolFreeANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_InitAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolGetANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctUINT Count,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolFreeANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VIVANTE_NO_3D */
+#endif /* __gc_hal_mem_h_ */
diff --git a/src/include_imx6/gc_hal_options.h b/src/include_imx6/gc_hal_options.h
new file mode 100644
index 0000000..bcc3186
--- /dev/null
+++ b/src/include_imx6/gc_hal_options.h
@@ -0,0 +1,756 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_options_h_
+#define __gc_hal_options_h_
+
+/*
+ gcdPRINT_VERSION
+
+ Print HAL version.
+*/
+#ifndef gcdPRINT_VERSION
+# define gcdPRINT_VERSION 0
+#endif
+
+/*
+ USE_NEW_LINUX_SIGNAL
+
+ This define enables the Linux kernel signaling between kernel and user.
+*/
+#ifndef USE_NEW_LINUX_SIGNAL
+# define USE_NEW_LINUX_SIGNAL 0
+#endif
+
+/*
+ NO_USER_DIRECT_ACCESS_FROM_KERNEL
+
+ This define enables the Linux kernel behavior accessing user memory.
+*/
+#ifndef NO_USER_DIRECT_ACCESS_FROM_KERNEL
+# define NO_USER_DIRECT_ACCESS_FROM_KERNEL 0
+#endif
+
+/*
+ VIVANTE_PROFILER
+
+ This define enables the profiler.
+*/
+#ifndef VIVANTE_PROFILER
+# define VIVANTE_PROFILER 0
+#endif
+
+/*
+ gcdUSE_VG
+
+ Enable VG HAL layer (only for GC350).
+*/
+#ifndef gcdUSE_VG
+# define gcdUSE_VG 0
+#endif
+
+/*
+ USE_SW_FB
+
+ Set to 1 if the frame buffer memory cannot be accessed by the GPU.
+*/
+#ifndef USE_SW_FB
+# define USE_SW_FB 0
+#endif
+
+/*
+ USE_SUPER_SAMPLING
+
+ This define enables super-sampling support.
+*/
+#define USE_SUPER_SAMPLING 0
+
+/*
+ PROFILE_HAL_COUNTERS
+
+ This define enables HAL counter profiling support. HW and SHADER
+ counter profiling depends on this.
+*/
+#ifndef PROFILE_HAL_COUNTERS
+# define PROFILE_HAL_COUNTERS 1
+#endif
+
+/*
+ PROFILE_HW_COUNTERS
+
+ This define enables HW counter profiling support.
+*/
+#ifndef PROFILE_HW_COUNTERS
+# define PROFILE_HW_COUNTERS 1
+#endif
+
+/*
+ PROFILE_SHADER_COUNTERS
+
+ This define enables SHADER counter profiling support.
+*/
+#ifndef PROFILE_SHADER_COUNTERS
+# define PROFILE_SHADER_COUNTERS 1
+#endif
+
+/*
+ COMMAND_PROCESSOR_VERSION
+
+ The version of the command buffer and task manager.
+*/
+#define COMMAND_PROCESSOR_VERSION 1
+
+/*
+ gcdDUMP
+
+ When set to 1, a dump of all states and memory uploads, as well as other
+ hardware related execution will be printed to the debug console. This
+ data can be used for playing back applications.
+*/
+#ifndef gcdDUMP
+# define gcdDUMP 0
+#endif
+
+/*
+ gcdDUMP_API
+
+ When set to 1, a high level dump of the EGL and GL/VG APs's are
+ captured.
+*/
+#ifndef gcdDUMP_API
+# define gcdDUMP_API 0
+#endif
+
+/*
+ gcdDUMP_FRAMERATE
+ When set to a value other than zero, averaqe frame rate will be dumped.
+ The value set is the starting frame that the average will be calculated.
+ This is needed because sometimes first few frames are too slow to be included
+ in the average. Frame count starts from 1.
+*/
+#ifndef gcdDUMP_FRAMERATE
+# define gcdDUMP_FRAMERATE 0
+#endif
+
+
+/*
+ gcdDUMP_IN_KERNEL
+
+ When set to 1, all dumps will happen in the kernel. This is handy if
+ you want the kernel to dump its command buffers as well and the data
+ needs to be in sync.
+*/
+#ifndef gcdDUMP_IN_KERNEL
+# define gcdDUMP_IN_KERNEL 0
+#endif
+
+/*
+ gcdDUMP_COMMAND
+
+ When set to non-zero, the command queue will dump all incoming command
+ and context buffers as well as all other modifications to the command
+ queue.
+*/
+#ifndef gcdDUMP_COMMAND
+# define gcdDUMP_COMMAND 0
+#endif
+
+/*
+ gcdDUMP_FRAME_TGA
+
+ When set to a value other than 0, a dump of the frame specified by the value,
+ will be done into frame.tga. Frame count starts from 1.
+ */
+#ifndef gcdDUMP_FRAME_TGA
+#define gcdDUMP_FRAME_TGA 0
+#endif
+/*
+ gcdNULL_DRIVER
+
+ Set to 1 for infinite speed hardware.
+ Set to 2 for bypassing the HAL.
+ Set to 3 for bypassing the drivers.
+*/
+#ifndef gcdNULL_DRIVER
+# define gcdNULL_DRIVER 0
+#endif
+
+/*
+ gcdENABLE_TIMEOUT_DETECTION
+
+ Enable timeout detection.
+*/
+#ifndef gcdENABLE_TIMEOUT_DETECTION
+# define gcdENABLE_TIMEOUT_DETECTION 0
+#endif
+
+/*
+ gcdCMD_BUFFER_SIZE
+
+ Number of bytes in a command buffer.
+*/
+#ifndef gcdCMD_BUFFER_SIZE
+# define gcdCMD_BUFFER_SIZE (128 << 10)
+#endif
+
+/*
+ gcdCMD_BUFFERS
+
+ Number of command buffers to use per client.
+*/
+#ifndef gcdCMD_BUFFERS
+# define gcdCMD_BUFFERS 2
+#endif
+
+/*
+ gcdMAX_CMD_BUFFERS
+
+ Maximum number of command buffers to use per client.
+*/
+#ifndef gcdMAX_CMD_BUFFERS
+# define gcdMAX_CMD_BUFFERS 8
+#endif
+
+/*
+ gcdCOMMAND_QUEUES
+
+ Number of command queues in the kernel.
+*/
+#ifndef gcdCOMMAND_QUEUES
+# define gcdCOMMAND_QUEUES 2
+#endif
+
+/*
+ gcdPOWER_CONTROL_DELAY
+
+ The delay in milliseconds required to wait until the GPU has woke up
+ from a suspend or power-down state. This is system dependent because
+ the bus clock also needs to stabalize.
+*/
+#ifndef gcdPOWER_CONTROL_DELAY
+# define gcdPOWER_CONTROL_DELAY 0
+#endif
+
+/*
+ gcdMMU_SIZE
+
+ Size of the MMU page table in bytes. Each 4 bytes can hold 4kB worth of
+ virtual data.
+*/
+#ifndef gcdMMU_SIZE
+# define gcdMMU_SIZE (128 << 10)
+#endif
+
+/*
+ gcdSECURE_USER
+
+ Use logical addresses instead of physical addresses in user land. In
+ this case a hint table is created for both command buffers and context
+ buffers, and that hint table will be used to patch up those buffers in
+ the kernel when they are ready to submit.
+*/
+#ifndef gcdSECURE_USER
+# define gcdSECURE_USER 0
+#endif
+
+/*
+ gcdSECURE_CACHE_SLOTS
+
+ Number of slots in the logical to DMA address cache table. Each time a
+ logical address needs to be translated into a DMA address for the GPU,
+ this cache will be walked. The replacement scheme is LRU.
+*/
+#ifndef gcdSECURE_CACHE_SLOTS
+# define gcdSECURE_CACHE_SLOTS 1024
+#endif
+
+/*
+ gcdSECURE_CACHE_METHOD
+
+ Replacement scheme used for Secure Cache. The following options are
+ available:
+
+ gcdSECURE_CACHE_LRU
+ A standard LRU cache.
+
+ gcdSECURE_CACHE_LINEAR
+ A linear walker with the idea that an application will always
+ render the scene in a similar way, so the next entry in the
+ cache should be a hit most of the time.
+
+ gcdSECURE_CACHE_HASH
+ A 256-entry hash table.
+
+ gcdSECURE_CACHE_TABLE
+ A simple cache but with potential of a lot of cache replacement.
+*/
+#ifndef gcdSECURE_CACHE_METHOD
+# define gcdSECURE_CACHE_METHOD gcdSECURE_CACHE_HASH
+#endif
+
+/*
+ gcdREGISTER_ACCESS_FROM_USER
+
+ Set to 1 to allow IOCTL calls to get through from user land. This
+ should only be in debug or development drops.
+*/
+#ifndef gcdREGISTER_ACCESS_FROM_USER
+# define gcdREGISTER_ACCESS_FROM_USER 1
+#endif
+
+/*
+ gcdHEAP_SIZE
+
+ Set the allocation size for the internal heaps. Each time a heap is
+ full, a new heap will be allocated with this minmimum amount of bytes.
+ The bigger this size, the fewer heaps there are to allocate, the better
+ the performance. However, heaps won't be freed until they are
+ completely free, so there might be some more memory waste if the size is
+ too big.
+*/
+#ifndef gcdHEAP_SIZE
+# define gcdHEAP_SIZE (64 << 10)
+#endif
+
+/*
+ gcdPOWER_MANAGEMENT
+
+ This define enables the power management code.
+*/
+#ifndef gcdPOWER_MANAGEMENT
+# define gcdPOWER_MANAGEMENT 1
+#endif
+
+/*
+ gcdFPGA_BUILD
+
+ This define enables work arounds for FPGA images.
+*/
+#ifndef gcdFPGA_BUILD
+# define gcdFPGA_BUILD 0
+#endif
+
+/*
+ gcdGPU_TIMEOUT
+
+ This define specified the number of milliseconds the system will wait
+ before it broadcasts the GPU is stuck. In other words, it will define
+ the timeout of any operation that needs to wait for the GPU.
+
+ If the value is 0, no timeout will be checked for.
+*/
+#ifndef gcdGPU_TIMEOUT
+# if gcdFPGA_BUILD
+# define gcdGPU_TIMEOUT 0
+# else
+# define gcdGPU_TIMEOUT (2000 * 5)
+# endif
+#endif
+
+/*
+ gcdGPU_ADVANCETIMER
+
+ it is advance timer.
+*/
+#ifndef gcdGPU_ADVANCETIMER
+# define gcdGPU_ADVANCETIMER 250
+#endif
+
+/*
+ gcdSTATIC_LINK
+
+ This define disalbes static linking;
+*/
+#ifndef gcdSTATIC_LINK
+# define gcdSTATIC_LINK 0
+#endif
+
+/*
+ gcdUSE_NEW_HEAP
+
+ Setting this define to 1 enables new heap.
+*/
+#ifndef gcdUSE_NEW_HEAP
+# define gcdUSE_NEW_HEAP 0
+#endif
+
+/*
+ gcdCMD_NO_2D_CONTEXT
+
+ This define enables no-context 2D command buffer.
+*/
+#ifndef gcdCMD_NO_2D_CONTEXT
+# define gcdCMD_NO_2D_CONTEXT 1
+#endif
+
+/*
+ gcdENABLE_BANK_ALIGNMENT
+
+ When enabled, video memory is allocated bank aligned. The vendor can modify
+ _GetSurfaceBankAlignment() and gcoSURF_GetBankOffsetBytes() to define how
+ different types of allocations are bank and channel aligned.
+ When disabled (default), no bank alignment is done.
+*/
+#ifndef gcdENABLE_BANK_ALIGNMENT
+# define gcdENABLE_BANK_ALIGNMENT 0
+#endif
+
+/*
+ gcdBANK_BIT_START
+
+ Specifies the start bit of the bank (inclusive).
+*/
+#ifndef gcdBANK_BIT_START
+# define gcdBANK_BIT_START 12
+#endif
+
+/*
+ gcdBANK_BIT_END
+
+ Specifies the end bit of the bank (inclusive).
+*/
+#ifndef gcdBANK_BIT_END
+# define gcdBANK_BIT_END 14
+#endif
+
+/*
+ gcdBANK_CHANNEL_BIT
+
+ When set, video memory when allocated bank aligned is allocated such that
+ render and depth buffer addresses alternate on the channel bit specified.
+ This option has an effect only when gcdENABLE_BANK_ALIGNMENT is enabled.
+ When disabled (default), no alteration is done.
+*/
+#ifndef gcdBANK_CHANNEL_BIT
+# define gcdBANK_CHANNEL_BIT 7
+#endif
+
+/*
+ gcdDYNAMIC_SPEED
+
+ When non-zero, it informs the kernel driver to use the speed throttling
+ broadcasting functions to inform the system the GPU should be spet up or
+ slowed down. It will send a broadcast for slowdown each "interval"
+ specified by this define in milliseconds
+ (gckOS_BroadcastCalibrateSpeed).
+*/
+#ifndef gcdDYNAMIC_SPEED
+# define gcdDYNAMIC_SPEED 2000
+#endif
+
+/*
+ gcdDYNAMIC_EVENT_THRESHOLD
+
+ When non-zero, it specifies the maximum number of available events at
+ which the kernel driver will issue a broadcast to speed up the GPU
+ (gckOS_BroadcastHurry).
+*/
+#ifndef gcdDYNAMIC_EVENT_THRESHOLD
+# define gcdDYNAMIC_EVENT_THRESHOLD 5
+#endif
+
+/*
+ gcdENABLE_PROFILING
+
+ Enable profiling macros.
+*/
+#ifndef gcdENABLE_PROFILING
+# define gcdENABLE_PROFILING 0
+#endif
+
+/*
+ gcdENABLE_128B_MERGE
+
+ Enable 128B merge for the BUS control.
+*/
+#ifndef gcdENABLE_128B_MERGE
+# define gcdENABLE_128B_MERGE 0
+#endif
+
+/*
+ gcdFRAME_DB
+
+ When non-zero, it specified the number of frames inside the frame
+ database. The frame DB will collect per-frame timestamps and hardware
+ counters.
+*/
+#ifndef gcdFRAME_DB
+# define gcdFRAME_DB 0
+# define gcdFRAME_DB_RESET 0
+# define gcdFRAME_DB_NAME "/var/log/frameDB.log"
+#endif
+
+/*
+ gcdENABLE_VG
+ enable the 2D openVG
+*/
+
+#ifndef gcdENABLE_VG
+# define gcdENABLE_VG 0
+#endif
+
+/*
+ gcdDYNAMIC_MAP_RESERVED_MEMORY
+
+ When gcvPOOL_SYSTEM is constructed from RESERVED memory,
+ driver can map the whole reserved memory to kernel space
+ at the beginning, or just map a piece of memory when need
+ to access.
+
+ Notice:
+ - It's only for the 2D openVG. For other cores, there is
+ _NO_ need to map reserved memory to kernel.
+ - It's meaningless when memory is allocated by
+ gckOS_AllocateContiguous, in that case, memory is always
+ mapped by system when allocated.
+*/
+#ifndef gcdDYNAMIC_MAP_RESERVED_MEMORY
+# define gcdDYNAMIC_MAP_RESERVED_MEMORY 1
+#endif
+
+/*
+ gcdPAGED_MEMORY_CACHEABLE
+
+ When non-zero, paged memory will be cacheable.
+
+ Normally, driver will detemines whether a video memory
+ is cacheable or not. When cacheable is not neccessary,
+ it will be writecombine.
+
+ This option is only for those SOC which can't enable
+ writecombine without enabling cacheable.
+*/
+
+#ifndef gcdPAGED_MEMORY_CACHEABLE
+# define gcdPAGED_MEMORY_CACHEABLE 0
+#endif
+
+/*
+ gcdNONPAGED_MEMORY_CACHEABLE
+
+ When non-zero, non paged memory will be cacheable.
+*/
+
+#ifndef gcdNONPAGED_MEMORY_CACHEABLE
+# define gcdNONPAGED_MEMORY_CACHEABLE 0
+#endif
+
+/*
+ gcdNONPAGED_MEMORY_BUFFERABLE
+
+ When non-zero, non paged memory will be bufferable.
+ gcdNONPAGED_MEMORY_BUFFERABLE and gcdNONPAGED_MEMORY_CACHEABLE
+ can't be set 1 at same time
+*/
+
+#ifndef gcdNONPAGED_MEMORY_BUFFERABLE
+# define gcdNONPAGED_MEMORY_BUFFERABLE 1
+#endif
+
+/*
+ gcdENABLE_INFINITE_SPEED_HW
+ enable the Infinte HW , this is for 2D openVG
+*/
+
+#ifndef gcdENABLE_INFINITE_SPEED_HW
+# define gcdENABLE_INFINITE_SPEED_HW 0
+#endif
+
+/*
+ gcdENABLE_TS_DOUBLE_BUFFER
+ enable the TS double buffer, this is for 2D openVG
+*/
+
+#ifndef gcdENABLE_TS_DOUBLE_BUFFER
+# define gcdENABLE_TS_DOUBLE_BUFFER 1
+#endif
+
+/*
+ gcd6000_SUPPORT
+
+ Temporary define to enable/disable 6000 support.
+ */
+#ifndef gcd6000_SUPPORT
+# define gcd6000_SUPPORT 0
+#endif
+
+/*
+ gcdPOWEROFF_TIMEOUT
+
+ When non-zero, GPU will power off automatically from
+ idle state, and gcdPOWEROFF_TIMEOUT is also the default
+ timeout value.
+ */
+
+#ifndef gcdPOWEROFF_TIMEOUT
+# define gcdPOWEROFF_TIMEOUT 5000
+#endif
+
+/*
+ gcdUSE_VIDMEM_PER_PID
+*/
+#ifndef gcdUSE_VIDMEM_PER_PID
+# define gcdUSE_VIDMEM_PER_PID 0
+#endif
+
+/*
+ QNX_SINGLE_THREADED_DEBUGGING
+*/
+#ifndef QNX_SINGLE_THREADED_DEBUGGING
+# define QNX_SINGLE_THREADED_DEBUGGING 0
+#endif
+
+/*
+ gcdENABLE_RECOVERY
+
+ This define enables the recovery code.
+*/
+#ifndef gcdENABLE_RECOVERY
+# define gcdENABLE_RECOVERY 1
+#endif
+
+/*
+ gcdRENDER_THREADS
+
+ Number of render threads. Make it zero, and there will be no render
+ threads.
+*/
+#ifndef gcdRENDER_THREADS
+# define gcdRENDER_THREADS 0
+#endif
+
+/*
+ gcdSMP
+
+ This define enables SMP support.
+
+ Currently, it only works on Linux/Android,
+ Kbuild will config it according to whether
+ CONFIG_SMP is set.
+
+*/
+#ifndef gcdSMP
+# define gcdSMP 0
+#endif
+
+/*
+ gcdSUPPORT_SWAP_RECTANGLE
+
+ Support swap with a specific rectangle.
+
+ Set the rectangle with eglSetSwapRectangleANDROID api.
+*/
+#ifndef gcdSUPPORT_SWAP_RECTANGLE
+# define gcdSUPPORT_SWAP_RECTANGLE 0
+#endif
+
+/*
+ gcdDEFER_RESOLVES
+
+ Support deferred resolves for 3D apps.
+*/
+#ifndef gcdDEFER_RESOLVES
+# define gcdDEFER_RESOLVES 0
+#endif
+
+/*
+ gcdCOPYBLT_OPTIMIZATION
+
+ Combine dirty areas resulting from Android's copyBlt.
+*/
+#ifndef gcdCOPYBLT_OPTIMIZATION
+# define gcdCOPYBLT_OPTIMIZATION 0
+#endif
+
+/*
+ gcdGPU_LINEAR_BUFFER_ENABLED
+
+ Use linear buffer for GPU apps so HWC can do 2D composition.
+*/
+#ifndef gcdGPU_LINEAR_BUFFER_ENABLED
+# define gcdGPU_LINEAR_BUFFER_ENABLED 0
+#endif
+
+/*
+ gcdSHARED_RESOLVE_BUFFER_ENABLED
+
+ Use shared resolve buffer for all app buffers.
+*/
+#ifndef gcdSHARED_RESOLVE_BUFFER_ENABLED
+# define gcdSHARED_RESOLVE_BUFFER_ENABLED 0
+#endif
+
+/*
+ gcdUSE_TRIANGLE_STRIP_PATCH
+ */
+#ifndef gcdUSE_TRIANGLE_STRIP_PATCH
+# define gcdUSE_TRIANGLE_STRIP_PATCH 1
+#endif
+
+/*
+ gcdENABLE_OUTER_CACHE_PATCH
+
+ Enable the outer cache patch.
+*/
+#ifndef gcdENABLE_OUTER_CACHE_PATCH
+# define gcdENABLE_OUTER_CACHE_PATCH 0
+#endif
+
+#ifndef gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST
+# define gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST 0
+#endif
+
+#ifndef gcdSHARED_PAGETABLE
+# define gcdSHARED_PAGETABLE 1
+#endif
+
+#ifndef gcdUSE_OPENCL
+# define gcdUSE_OPENCL 0
+#endif
+
+/*
+ gcdBLOB_CACHE_ENABLED
+ When non-zero, Android blob cache extension will be enabled.
+ Otherwise, caching will be by-passed.
+ */
+
+#ifndef gcdBLOB_CACHE_ENABLED
+# define gcdBLOB_CACHE_ENABLED 0
+#endif
+
+/*
+ gcdSMALL_BLOCK_SIZE
+
+ When non-zero, a part of VIDMEM will be reserved for requests
+ whose requesting size is less than gcdSMALL_BLOCK_SIZE.
+
+ For Linux, it's the size of a page. If this requeset fallbacks
+ to gcvPOOL_CONTIGUOUS or gcvPOOL_VIRTUAL, memory will be wasted
+ because they allocate a page at least.
+ */
+#ifndef gcdSMALL_BLOCK_SIZE
+# define gcdSMALL_BLOCK_SIZE 4096
+# define gcdRATIO_FOR_SMALL_MEMORY 32
+#endif
+
+#endif /* __gc_hal_options_h_ */
diff --git a/src/include_imx6/gc_hal_profiler.h b/src/include_imx6/gc_hal_profiler.h
new file mode 100644
index 0000000..ee4a2ce
--- /dev/null
+++ b/src/include_imx6/gc_hal_profiler.h
@@ -0,0 +1,1311 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_profiler_h_
+#define __gc_hal_profiler_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define GLVERTEX_OBJECT 10
+#define GLVERTEX_OBJECT_BYTES 11
+
+#define GLINDEX_OBJECT 20
+#define GLINDEX_OBJECT_BYTES 21
+
+#define GLTEXTURE_OBJECT 30
+#define GLTEXTURE_OBJECT_BYTES 31
+
+#if VIVANTE_PROFILER
+#define gcmPROFILE_GC(Enum, Value) gcoPROFILER_Count(gcvNULL, Enum, Value)
+#else
+#define gcmPROFILE_GC(Enum, Value) do { } while (gcvFALSE)
+#endif
+
+#ifndef gcdNEW_PROFILER_FILE
+#define gcdNEW_PROFILER_FILE 1
+#endif
+
+/* OpenGL ES11 API IDs. */
+#define ES11_ACTIVETEXTURE 1
+#define ES11_ALPHAFUNC (ES11_ACTIVETEXTURE + 1)
+#define ES11_ALPHAFUNCX (ES11_ALPHAFUNC + 1)
+#define ES11_BINDBUFFER (ES11_ALPHAFUNCX + 1)
+#define ES11_BINDTEXTURE (ES11_BINDBUFFER + 1)
+#define ES11_BLENDFUNC (ES11_BINDTEXTURE + 1)
+#define ES11_BUFFERDATA (ES11_BLENDFUNC + 1)
+#define ES11_BUFFERSUBDATA (ES11_BUFFERDATA + 1)
+#define ES11_CLEAR (ES11_BUFFERSUBDATA + 1)
+#define ES11_CLEARCOLOR (ES11_CLEAR + 1)
+#define ES11_CLEARCOLORX (ES11_CLEARCOLOR + 1)
+#define ES11_CLEARDEPTHF (ES11_CLEARCOLORX + 1)
+#define ES11_CLEARDEPTHX (ES11_CLEARDEPTHF + 1)
+#define ES11_CLEARSTENCIL (ES11_CLEARDEPTHX + 1)
+#define ES11_CLIENTACTIVETEXTURE (ES11_CLEARSTENCIL + 1)
+#define ES11_CLIPPLANEF (ES11_CLIENTACTIVETEXTURE + 1)
+#define ES11_CLIPPLANEX (ES11_CLIPPLANEF + 1)
+#define ES11_COLOR4F (ES11_CLIPPLANEX + 1)
+#define ES11_COLOR4UB (ES11_COLOR4F + 1)
+#define ES11_COLOR4X (ES11_COLOR4UB + 1)
+#define ES11_COLORMASK (ES11_COLOR4X + 1)
+#define ES11_COLORPOINTER (ES11_COLORMASK + 1)
+#define ES11_COMPRESSEDTEXIMAGE2D (ES11_COLORPOINTER + 1)
+#define ES11_COMPRESSEDTEXSUBIMAGE2D (ES11_COMPRESSEDTEXIMAGE2D + 1)
+#define ES11_COPYTEXIMAGE2D (ES11_COMPRESSEDTEXSUBIMAGE2D + 1)
+#define ES11_COPYTEXSUBIMAGE2D (ES11_COPYTEXIMAGE2D + 1)
+#define ES11_CULLFACE (ES11_COPYTEXSUBIMAGE2D + 1)
+#define ES11_DELETEBUFFERS (ES11_CULLFACE + 1)
+#define ES11_DELETETEXTURES (ES11_DELETEBUFFERS + 1)
+#define ES11_DEPTHFUNC (ES11_DELETETEXTURES + 1)
+#define ES11_DEPTHMASK (ES11_DEPTHFUNC + 1)
+#define ES11_DEPTHRANGEF (ES11_DEPTHMASK + 1)
+#define ES11_DEPTHRANGEX (ES11_DEPTHRANGEF + 1)
+#define ES11_DISABLE (ES11_DEPTHRANGEX + 1)
+#define ES11_DISABLECLIENTSTATE (ES11_DISABLE + 1)
+#define ES11_DRAWARRAYS (ES11_DISABLECLIENTSTATE + 1)
+#define ES11_DRAWELEMENTS (ES11_DRAWARRAYS + 1)
+#define ES11_ENABLE (ES11_DRAWELEMENTS + 1)
+#define ES11_ENABLECLIENTSTATE (ES11_ENABLE + 1)
+#define ES11_FINISH (ES11_ENABLECLIENTSTATE + 1)
+#define ES11_FLUSH (ES11_FINISH + 1)
+#define ES11_FOGF (ES11_FLUSH + 1)
+#define ES11_FOGFV (ES11_FOGF + 1)
+#define ES11_FOGX (ES11_FOGFV + 1)
+#define ES11_FOGXV (ES11_FOGX + 1)
+#define ES11_FRONTFACE (ES11_FOGXV + 1)
+#define ES11_FRUSTUMF (ES11_FRONTFACE + 1)
+#define ES11_FRUSTUMX (ES11_FRUSTUMF + 1)
+#define ES11_GENBUFFERS (ES11_FRUSTUMX + 1)
+#define ES11_GENTEXTURES (ES11_GENBUFFERS + 1)
+#define ES11_GETBOOLEANV (ES11_GENTEXTURES + 1)
+#define ES11_GETBUFFERPARAMETERIV (ES11_GETBOOLEANV + 1)
+#define ES11_GETCLIPPLANEF (ES11_GETBUFFERPARAMETERIV + 1)
+#define ES11_GETCLIPPLANEX (ES11_GETCLIPPLANEF + 1)
+#define ES11_GETERROR (ES11_GETCLIPPLANEX + 1)
+#define ES11_GETFIXEDV (ES11_GETERROR + 1)
+#define ES11_GETFLOATV (ES11_GETFIXEDV + 1)
+#define ES11_GETINTEGERV (ES11_GETFLOATV + 1)
+#define ES11_GETLIGHTFV (ES11_GETINTEGERV + 1)
+#define ES11_GETLIGHTXV (ES11_GETLIGHTFV + 1)
+#define ES11_GETMATERIALFV (ES11_GETLIGHTXV + 1)
+#define ES11_GETMATERIALXV (ES11_GETMATERIALFV + 1)
+#define ES11_GETPOINTERV (ES11_GETMATERIALXV + 1)
+#define ES11_GETSTRING (ES11_GETPOINTERV + 1)
+#define ES11_GETTEXENVFV (ES11_GETSTRING + 1)
+#define ES11_GETTEXENVIV (ES11_GETTEXENVFV + 1)
+#define ES11_GETTEXENVXV (ES11_GETTEXENVIV + 1)
+#define ES11_GETTEXPARAMETERFV (ES11_GETTEXENVXV + 1)
+#define ES11_GETTEXPARAMETERIV (ES11_GETTEXPARAMETERFV + 1)
+#define ES11_GETTEXPARAMETERXV (ES11_GETTEXPARAMETERIV + 1)
+#define ES11_HINT (ES11_GETTEXPARAMETERXV + 1)
+#define ES11_ISBUFFER (ES11_HINT + 1)
+#define ES11_ISENABLED (ES11_ISBUFFER + 1)
+#define ES11_ISTEXTURE (ES11_ISENABLED + 1)
+#define ES11_LIGHTF (ES11_ISTEXTURE + 1)
+#define ES11_LIGHTFV (ES11_LIGHTF + 1)
+#define ES11_LIGHTMODELF (ES11_LIGHTFV + 1)
+#define ES11_LIGHTMODELFV (ES11_LIGHTMODELF + 1)
+#define ES11_LIGHTMODELX (ES11_LIGHTMODELFV + 1)
+#define ES11_LIGHTMODELXV (ES11_LIGHTMODELX + 1)
+#define ES11_LIGHTX (ES11_LIGHTMODELXV + 1)
+#define ES11_LIGHTXV (ES11_LIGHTX + 1)
+#define ES11_LINEWIDTH (ES11_LIGHTXV + 1)
+#define ES11_LINEWIDTHX (ES11_LINEWIDTH + 1)
+#define ES11_LOADIDENTITY (ES11_LINEWIDTHX + 1)
+#define ES11_LOADMATRIXF (ES11_LOADIDENTITY + 1)
+#define ES11_LOADMATRIXX (ES11_LOADMATRIXF + 1)
+#define ES11_LOGICOP (ES11_LOADMATRIXX + 1)
+#define ES11_MATERIALF (ES11_LOGICOP + 1)
+#define ES11_MATERIALFV (ES11_MATERIALF + 1)
+#define ES11_MATERIALX (ES11_MATERIALFV + 1)
+#define ES11_MATERIALXV (ES11_MATERIALX + 1)
+#define ES11_MATRIXMODE (ES11_MATERIALXV + 1)
+#define ES11_MULTITEXCOORD4F (ES11_MATRIXMODE + 1)
+#define ES11_MULTITEXCOORD4X (ES11_MULTITEXCOORD4F + 1)
+#define ES11_MULTMATRIXF (ES11_MULTITEXCOORD4X + 1)
+#define ES11_MULTMATRIXX (ES11_MULTMATRIXF + 1)
+#define ES11_NORMAL3F (ES11_MULTMATRIXX + 1)
+#define ES11_NORMAL3X (ES11_NORMAL3F + 1)
+#define ES11_NORMALPOINTER (ES11_NORMAL3X + 1)
+#define ES11_ORTHOF (ES11_NORMALPOINTER + 1)
+#define ES11_ORTHOX (ES11_ORTHOF + 1)
+#define ES11_PIXELSTOREI (ES11_ORTHOX + 1)
+#define ES11_POINTPARAMETERF (ES11_PIXELSTOREI + 1)
+#define ES11_POINTPARAMETERFV (ES11_POINTPARAMETERF + 1)
+#define ES11_POINTPARAMETERX (ES11_POINTPARAMETERFV + 1)
+#define ES11_POINTPARAMETERXV (ES11_POINTPARAMETERX + 1)
+#define ES11_POINTSIZE (ES11_POINTPARAMETERXV + 1)
+#define ES11_POINTSIZEX (ES11_POINTSIZE + 1)
+#define ES11_POLYGONOFFSET (ES11_POINTSIZEX + 1)
+#define ES11_POLYGONOFFSETX (ES11_POLYGONOFFSET + 1)
+#define ES11_POPMATRIX (ES11_POLYGONOFFSETX + 1)
+#define ES11_PUSHMATRIX (ES11_POPMATRIX + 1)
+#define ES11_READPIXELS (ES11_PUSHMATRIX + 1)
+#define ES11_ROTATEF (ES11_READPIXELS + 1)
+#define ES11_ROTATEX (ES11_ROTATEF + 1)
+#define ES11_SAMPLECOVERAGE (ES11_ROTATEX + 1)
+#define ES11_SAMPLECOVERAGEX (ES11_SAMPLECOVERAGE + 1)
+#define ES11_SCALEF (ES11_SAMPLECOVERAGEX + 1)
+#define ES11_SCALEX (ES11_SCALEF + 1)
+#define ES11_SCISSOR (ES11_SCALEX + 1)
+#define ES11_SHADEMODEL (ES11_SCISSOR + 1)
+#define ES11_STENCILFUNC (ES11_SHADEMODEL + 1)
+#define ES11_STENCILMASK (ES11_STENCILFUNC + 1)
+#define ES11_STENCILOP (ES11_STENCILMASK + 1)
+#define ES11_TEXCOORDPOINTER (ES11_STENCILOP + 1)
+#define ES11_TEXENVF (ES11_TEXCOORDPOINTER + 1)
+#define ES11_TEXENVFV (ES11_TEXENVF + 1)
+#define ES11_TEXENVI (ES11_TEXENVFV + 1)
+#define ES11_TEXENVIV (ES11_TEXENVI + 1)
+#define ES11_TEXENVX (ES11_TEXENVIV + 1)
+#define ES11_TEXENVXV (ES11_TEXENVX + 1)
+#define ES11_TEXIMAGE2D (ES11_TEXENVXV + 1)
+#define ES11_TEXPARAMETERF (ES11_TEXIMAGE2D + 1)
+#define ES11_TEXPARAMETERFV (ES11_TEXPARAMETERF + 1)
+#define ES11_TEXPARAMETERI (ES11_TEXPARAMETERFV + 1)
+#define ES11_TEXPARAMETERIV (ES11_TEXPARAMETERI + 1)
+#define ES11_TEXPARAMETERX (ES11_TEXPARAMETERIV + 1)
+#define ES11_TEXPARAMETERXV (ES11_TEXPARAMETERX + 1)
+#define ES11_TEXSUBIMAGE2D (ES11_TEXPARAMETERXV + 1)
+#define ES11_TRANSLATEF (ES11_TEXSUBIMAGE2D + 1)
+#define ES11_TRANSLATEX (ES11_TRANSLATEF + 1)
+#define ES11_VERTEXPOINTER (ES11_TRANSLATEX + 1)
+#define ES11_VIEWPORT (ES11_VERTEXPOINTER + 1)
+#define ES11_BLENDEQUATIONOES (ES11_VIEWPORT + 1)
+#define ES11_BLENDFUNCSEPERATEOES (ES11_BLENDEQUATIONOES + 1)
+#define ES11_BLENDEQUATIONSEPARATEOES (ES11_BLENDFUNCSEPERATEOES + 1)
+#define ES11_GLMAPBUFFEROES (ES11_BLENDEQUATIONSEPARATEOES + 1)
+#define ES11_GLUNMAPBUFFEROES (ES11_GLMAPBUFFEROES + 1)
+#define ES11_GLGETBUFFERPOINTERVOES (ES11_GLUNMAPBUFFEROES + 1)
+#define ES11_CALLS (ES11_GLGETBUFFERPOINTERVOES + 1)
+#define ES11_DRAWCALLS (ES11_CALLS + 1)
+#define ES11_STATECHANGECALLS (ES11_DRAWCALLS + 1)
+#define ES11_POINTCOUNT (ES11_STATECHANGECALLS + 1)
+#define ES11_LINECOUNT (ES11_POINTCOUNT + 1)
+#define ES11_TRIANGLECOUNT (ES11_LINECOUNT + 1)
+
+/* OpenGL ES2X API IDs. */
+#define ES20_ACTIVETEXTURE 1
+#define ES20_ATTACHSHADER (ES20_ACTIVETEXTURE + 1)
+#define ES20_BINDATTRIBLOCATION (ES20_ATTACHSHADER + 1)
+#define ES20_BINDBUFFER (ES20_BINDATTRIBLOCATION + 1)
+#define ES20_BINDFRAMEBUFFER (ES20_BINDBUFFER + 1)
+#define ES20_BINDRENDERBUFFER (ES20_BINDFRAMEBUFFER + 1)
+#define ES20_BINDTEXTURE (ES20_BINDRENDERBUFFER + 1)
+#define ES20_BLENDCOLOR (ES20_BINDTEXTURE + 1)
+#define ES20_BLENDEQUATION (ES20_BLENDCOLOR + 1)
+#define ES20_BLENDEQUATIONSEPARATE (ES20_BLENDEQUATION + 1)
+#define ES20_BLENDFUNC (ES20_BLENDEQUATIONSEPARATE + 1)
+#define ES20_BLENDFUNCSEPARATE (ES20_BLENDFUNC + 1)
+#define ES20_BUFFERDATA (ES20_BLENDFUNCSEPARATE + 1)
+#define ES20_BUFFERSUBDATA (ES20_BUFFERDATA + 1)
+#define ES20_CHECKFRAMEBUFFERSTATUS (ES20_BUFFERSUBDATA + 1)
+#define ES20_CLEAR (ES20_CHECKFRAMEBUFFERSTATUS + 1)
+#define ES20_CLEARCOLOR (ES20_CLEAR + 1)
+#define ES20_CLEARDEPTHF (ES20_CLEARCOLOR + 1)
+#define ES20_CLEARSTENCIL (ES20_CLEARDEPTHF + 1)
+#define ES20_COLORMASK (ES20_CLEARSTENCIL + 1)
+#define ES20_COMPILESHADER (ES20_COLORMASK + 1)
+#define ES20_COMPRESSEDTEXIMAGE2D (ES20_COMPILESHADER + 1)
+#define ES20_COMPRESSEDTEXSUBIMAGE2D (ES20_COMPRESSEDTEXIMAGE2D + 1)
+#define ES20_COPYTEXIMAGE2D (ES20_COMPRESSEDTEXSUBIMAGE2D + 1)
+#define ES20_COPYTEXSUBIMAGE2D (ES20_COPYTEXIMAGE2D + 1)
+#define ES20_CREATEPROGRAM (ES20_COPYTEXSUBIMAGE2D + 1)
+#define ES20_CREATESHADER (ES20_CREATEPROGRAM + 1)
+#define ES20_CULLFACE (ES20_CREATESHADER + 1)
+#define ES20_DELETEBUFFERS (ES20_CULLFACE + 1)
+#define ES20_DELETEFRAMEBUFFERS (ES20_DELETEBUFFERS + 1)
+#define ES20_DELETEPROGRAM (ES20_DELETEFRAMEBUFFERS + 1)
+#define ES20_DELETERENDERBUFFERS (ES20_DELETEPROGRAM + 1)
+#define ES20_DELETESHADER (ES20_DELETERENDERBUFFERS + 1)
+#define ES20_DELETETEXTURES (ES20_DELETESHADER + 1)
+#define ES20_DEPTHFUNC (ES20_DELETETEXTURES + 1)
+#define ES20_DEPTHMASK (ES20_DEPTHFUNC + 1)
+#define ES20_DEPTHRANGEF (ES20_DEPTHMASK + 1)
+#define ES20_DETACHSHADER (ES20_DEPTHRANGEF + 1)
+#define ES20_DISABLE (ES20_DETACHSHADER + 1)
+#define ES20_DISABLEVERTEXATTRIBARRAY (ES20_DISABLE + 1)
+#define ES20_DRAWARRAYS (ES20_DISABLEVERTEXATTRIBARRAY + 1)
+#define ES20_DRAWELEMENTS (ES20_DRAWARRAYS + 1)
+#define ES20_ENABLE (ES20_DRAWELEMENTS + 1)
+#define ES20_ENABLEVERTEXATTRIBARRAY (ES20_ENABLE + 1)
+#define ES20_FINISH (ES20_ENABLEVERTEXATTRIBARRAY + 1)
+#define ES20_FLUSH (ES20_FINISH + 1)
+#define ES20_FRAMEBUFFERRENDERBUFFER (ES20_FLUSH + 1)
+#define ES20_FRAMEBUFFERTEXTURE2D (ES20_FRAMEBUFFERRENDERBUFFER + 1)
+#define ES20_FRONTFACE (ES20_FRAMEBUFFERTEXTURE2D + 1)
+#define ES20_GENBUFFERS (ES20_FRONTFACE + 1)
+#define ES20_GENERATEMIPMAP (ES20_GENBUFFERS + 1)
+#define ES20_GENFRAMEBUFFERS (ES20_GENERATEMIPMAP + 1)
+#define ES20_GENRENDERBUFFERS (ES20_GENFRAMEBUFFERS + 1)
+#define ES20_GENTEXTURES (ES20_GENRENDERBUFFERS + 1)
+#define ES20_GETACTIVEATTRIB (ES20_GENTEXTURES + 1)
+#define ES20_GETACTIVEUNIFORM (ES20_GETACTIVEATTRIB + 1)
+#define ES20_GETATTACHEDSHADERS (ES20_GETACTIVEUNIFORM + 1)
+#define ES20_GETATTRIBLOCATION (ES20_GETATTACHEDSHADERS + 1)
+#define ES20_GETBOOLEANV (ES20_GETATTRIBLOCATION + 1)
+#define ES20_GETBUFFERPARAMETERIV (ES20_GETBOOLEANV + 1)
+#define ES20_GETERROR (ES20_GETBUFFERPARAMETERIV + 1)
+#define ES20_GETFLOATV (ES20_GETERROR + 1)
+#define ES20_GETFRAMEBUFFERATTACHMENTPARAMETERIV (ES20_GETFLOATV + 1)
+#define ES20_GETINTEGERV (ES20_GETFRAMEBUFFERATTACHMENTPARAMETERIV + 1)
+#define ES20_GETPROGRAMIV (ES20_GETINTEGERV + 1)
+#define ES20_GETPROGRAMINFOLOG (ES20_GETPROGRAMIV + 1)
+#define ES20_GETRENDERBUFFERPARAMETERIV (ES20_GETPROGRAMINFOLOG + 1)
+#define ES20_GETSHADERIV (ES20_GETRENDERBUFFERPARAMETERIV + 1)
+#define ES20_GETSHADERINFOLOG (ES20_GETSHADERIV + 1)
+#define ES20_GETSHADERPRECISIONFORMAT (ES20_GETSHADERINFOLOG + 1)
+#define ES20_GETSHADERSOURCE (ES20_GETSHADERPRECISIONFORMAT + 1)
+#define ES20_GETSTRING (ES20_GETSHADERSOURCE + 1)
+#define ES20_GETTEXPARAMETERFV (ES20_GETSTRING + 1)
+#define ES20_GETTEXPARAMETERIV (ES20_GETTEXPARAMETERFV + 1)
+#define ES20_GETUNIFORMFV (ES20_GETTEXPARAMETERIV + 1)
+#define ES20_GETUNIFORMIV (ES20_GETUNIFORMFV + 1)
+#define ES20_GETUNIFORMLOCATION (ES20_GETUNIFORMIV + 1)
+#define ES20_GETVERTEXATTRIBFV (ES20_GETUNIFORMLOCATION + 1)
+#define ES20_GETVERTEXATTRIBIV (ES20_GETVERTEXATTRIBFV + 1)
+#define ES20_GETVERTEXATTRIBPOINTERV (ES20_GETVERTEXATTRIBIV + 1)
+#define ES20_HINT (ES20_GETVERTEXATTRIBPOINTERV + 1)
+#define ES20_ISBUFFER (ES20_HINT + 1)
+#define ES20_ISENABLED (ES20_ISBUFFER + 1)
+#define ES20_ISFRAMEBUFFER (ES20_ISENABLED + 1)
+#define ES20_ISPROGRAM (ES20_ISFRAMEBUFFER + 1)
+#define ES20_ISRENDERBUFFER (ES20_ISPROGRAM + 1)
+#define ES20_ISSHADER (ES20_ISRENDERBUFFER + 1)
+#define ES20_ISTEXTURE (ES20_ISSHADER + 1)
+#define ES20_LINEWIDTH (ES20_ISTEXTURE + 1)
+#define ES20_LINKPROGRAM (ES20_LINEWIDTH + 1)
+#define ES20_PIXELSTOREI (ES20_LINKPROGRAM + 1)
+#define ES20_POLYGONOFFSET (ES20_PIXELSTOREI + 1)
+#define ES20_READPIXELS (ES20_POLYGONOFFSET + 1)
+#define ES20_RELEASESHADERCOMPILER (ES20_READPIXELS + 1)
+#define ES20_RENDERBUFFERSTORAGE (ES20_RELEASESHADERCOMPILER + 1)
+#define ES20_SAMPLECOVERAGE (ES20_RENDERBUFFERSTORAGE + 1)
+#define ES20_SCISSOR (ES20_SAMPLECOVERAGE + 1)
+#define ES20_SHADERBINARY (ES20_SCISSOR + 1)
+#define ES20_SHADERSOURCE (ES20_SHADERBINARY + 1)
+#define ES20_STENCILFUNC (ES20_SHADERSOURCE + 1)
+#define ES20_STENCILFUNCSEPARATE (ES20_STENCILFUNC + 1)
+#define ES20_STENCILMASK (ES20_STENCILFUNCSEPARATE + 1)
+#define ES20_STENCILMASKSEPARATE (ES20_STENCILMASK + 1)
+#define ES20_STENCILOP (ES20_STENCILMASKSEPARATE + 1)
+#define ES20_STENCILOPSEPARATE (ES20_STENCILOP + 1)
+#define ES20_TEXIMAGE2D (ES20_STENCILOPSEPARATE + 1)
+#define ES20_TEXPARAMETERF (ES20_TEXIMAGE2D + 1)
+#define ES20_TEXPARAMETERFV (ES20_TEXPARAMETERF + 1)
+#define ES20_TEXPARAMETERI (ES20_TEXPARAMETERFV + 1)
+#define ES20_TEXPARAMETERIV (ES20_TEXPARAMETERI + 1)
+#define ES20_TEXSUBIMAGE2D (ES20_TEXPARAMETERIV + 1)
+#define ES20_UNIFORM1F (ES20_TEXSUBIMAGE2D + 1)
+#define ES20_UNIFORM1FV (ES20_UNIFORM1F + 1)
+#define ES20_UNIFORM1I (ES20_UNIFORM1FV + 1)
+#define ES20_UNIFORM1IV (ES20_UNIFORM1I + 1)
+#define ES20_UNIFORM2F (ES20_UNIFORM1IV + 1)
+#define ES20_UNIFORM2FV (ES20_UNIFORM2F + 1)
+#define ES20_UNIFORM2I (ES20_UNIFORM2FV + 1)
+#define ES20_UNIFORM2IV (ES20_UNIFORM2I + 1)
+#define ES20_UNIFORM3F (ES20_UNIFORM2IV + 1)
+#define ES20_UNIFORM3FV (ES20_UNIFORM3F + 1)
+#define ES20_UNIFORM3I (ES20_UNIFORM3FV + 1)
+#define ES20_UNIFORM3IV (ES20_UNIFORM3I + 1)
+#define ES20_UNIFORM4F (ES20_UNIFORM3IV + 1)
+#define ES20_UNIFORM4FV (ES20_UNIFORM4F + 1)
+#define ES20_UNIFORM4I (ES20_UNIFORM4FV + 1)
+#define ES20_UNIFORM4IV (ES20_UNIFORM4I + 1)
+#define ES20_UNIFORMMATRIX2FV (ES20_UNIFORM4IV + 1)
+#define ES20_UNIFORMMATRIX3FV (ES20_UNIFORMMATRIX2FV + 1)
+#define ES20_UNIFORMMATRIX4FV (ES20_UNIFORMMATRIX3FV + 1)
+#define ES20_USEPROGRAM (ES20_UNIFORMMATRIX4FV + 1)
+#define ES20_VALIDATEPROGRAM (ES20_USEPROGRAM + 1)
+#define ES20_VERTEXATTRIB1F (ES20_VALIDATEPROGRAM + 1)
+#define ES20_VERTEXATTRIB1FV (ES20_VERTEXATTRIB1F + 1)
+#define ES20_VERTEXATTRIB2F (ES20_VERTEXATTRIB1FV + 1)
+#define ES20_VERTEXATTRIB2FV (ES20_VERTEXATTRIB2F + 1)
+#define ES20_VERTEXATTRIB3F (ES20_VERTEXATTRIB2FV + 1)
+#define ES20_VERTEXATTRIB3FV (ES20_VERTEXATTRIB3F + 1)
+#define ES20_VERTEXATTRIB4F (ES20_VERTEXATTRIB3FV + 1)
+#define ES20_VERTEXATTRIB4FV (ES20_VERTEXATTRIB4F + 1)
+#define ES20_VERTEXATTRIBPOINTER (ES20_VERTEXATTRIB4FV + 1)
+#define ES20_VIEWPORT (ES20_VERTEXATTRIBPOINTER + 1)
+#define ES20_GETPROGRAMBINARYOES (ES20_VIEWPORT + 1)
+#define ES20_PROGRAMBINARYOES (ES20_GETPROGRAMBINARYOES + 1)
+#define ES20_TEXIMAGE3DOES (ES20_PROGRAMBINARYOES + 1)
+#define ES20_TEXSUBIMAGE3DOES (ES20_TEXIMAGE3DOES + 1)
+#define ES20_COPYSUBIMAGE3DOES (ES20_TEXSUBIMAGE3DOES + 1)
+#define ES20_COMPRESSEDTEXIMAGE3DOES (ES20_COPYSUBIMAGE3DOES + 1)
+#define ES20_COMPRESSEDTEXSUBIMAGE3DOES (ES20_COMPRESSEDTEXIMAGE3DOES + 1)
+#define ES20_FRAMEBUFFERTEXTURE3DOES (ES20_COMPRESSEDTEXSUBIMAGE3DOES + 1)
+#define ES20_BINDVERTEXARRAYOES (ES20_FRAMEBUFFERTEXTURE3DOES + 1)
+#define ES20_GENVERTEXARRAYOES (ES20_BINDVERTEXARRAYOES + 1)
+#define ES20_ISVERTEXARRAYOES (ES20_GENVERTEXARRAYOES + 1)
+#define ES20_DELETEVERTEXARRAYOES (ES20_ISVERTEXARRAYOES + 1)
+#define ES20_GLMAPBUFFEROES (ES20_DELETEVERTEXARRAYOES + 1)
+#define ES20_GLUNMAPBUFFEROES (ES20_GLMAPBUFFEROES + 1)
+#define ES20_GLGETBUFFERPOINTERVOES (ES20_GLUNMAPBUFFEROES + 1)
+#define ES20_CALLS (ES20_GLGETBUFFERPOINTERVOES + 1)
+#define ES20_DRAWCALLS (ES20_CALLS + 1)
+#define ES20_STATECHANGECALLS (ES20_DRAWCALLS + 1)
+#define ES20_POINTCOUNT (ES20_STATECHANGECALLS + 1)
+#define ES20_LINECOUNT (ES20_POINTCOUNT + 1)
+#define ES20_TRIANGLECOUNT (ES20_LINECOUNT + 1)
+
+/* OpenVG API IDs. */
+#define VG11_APPENDPATH 1
+#define VG11_APPENDPATHDATA (VG11_APPENDPATH + 1)
+#define VG11_CHILDIMAGE (VG11_APPENDPATHDATA + 1)
+#define VG11_CLEAR (VG11_CHILDIMAGE + 1)
+#define VG11_CLEARGLYPH (VG11_CLEAR + 1)
+#define VG11_CLEARIMAGE (VG11_CLEARGLYPH + 1)
+#define VG11_CLEARPATH (VG11_CLEARIMAGE + 1)
+#define VG11_COLORMATRIX (VG11_CLEARPATH + 1)
+#define VG11_CONVOLVE (VG11_COLORMATRIX + 1)
+#define VG11_COPYIMAGE (VG11_CONVOLVE + 1)
+#define VG11_COPYMASK (VG11_COPYIMAGE + 1)
+#define VG11_COPYPIXELS (VG11_COPYMASK + 1)
+#define VG11_CREATEFONT (VG11_COPYPIXELS + 1)
+#define VG11_CREATEIMAGE (VG11_CREATEFONT + 1)
+#define VG11_CREATEMASKLAYER (VG11_CREATEIMAGE + 1)
+#define VG11_CREATEPAINT (VG11_CREATEMASKLAYER + 1)
+#define VG11_CREATEPATH (VG11_CREATEPAINT + 1)
+#define VG11_DESTROYFONT (VG11_CREATEPATH + 1)
+#define VG11_DESTROYIMAGE (VG11_DESTROYFONT + 1)
+#define VG11_DESTROYMASKLAYER (VG11_DESTROYIMAGE + 1)
+#define VG11_DESTROYPAINT (VG11_DESTROYMASKLAYER + 1)
+#define VG11_DESTROYPATH (VG11_DESTROYPAINT + 1)
+#define VG11_DRAWGLYPH (VG11_DESTROYPATH + 1)
+#define VG11_DRAWGLYPHS (VG11_DRAWGLYPH + 1)
+#define VG11_DRAWIMAGE (VG11_DRAWGLYPHS + 1)
+#define VG11_DRAWPATH (VG11_DRAWIMAGE + 1)
+#define VG11_FILLMASKLAYER (VG11_DRAWPATH + 1)
+#define VG11_FINISH (VG11_FILLMASKLAYER + 1)
+#define VG11_FLUSH (VG11_FINISH + 1)
+#define VG11_GAUSSIANBLUR (VG11_FLUSH + 1)
+#define VG11_GETCOLOR (VG11_GAUSSIANBLUR + 1)
+#define VG11_GETERROR (VG11_GETCOLOR + 1)
+#define VG11_GETF (VG11_GETERROR + 1)
+#define VG11_GETFV (VG11_GETF + 1)
+#define VG11_GETI (VG11_GETFV + 1)
+#define VG11_GETIMAGESUBDATA (VG11_GETI + 1)
+#define VG11_GETIV (VG11_GETIMAGESUBDATA + 1)
+#define VG11_GETMATRIX (VG11_GETIV + 1)
+#define VG11_GETPAINT (VG11_GETMATRIX + 1)
+#define VG11_GETPARAMETERF (VG11_GETPAINT + 1)
+#define VG11_GETPARAMETERFV (VG11_GETPARAMETERF + 1)
+#define VG11_GETPARAMETERI (VG11_GETPARAMETERFV + 1)
+#define VG11_GETPARAMETERIV (VG11_GETPARAMETERI + 1)
+#define VG11_GETPARAMETERVECTORSIZE (VG11_GETPARAMETERIV + 1)
+#define VG11_GETPARENT (VG11_GETPARAMETERVECTORSIZE + 1)
+#define VG11_GETPATHCAPABILITIES (VG11_GETPARENT + 1)
+#define VG11_GETPIXELS (VG11_GETPATHCAPABILITIES + 1)
+#define VG11_GETSTRING (VG11_GETPIXELS + 1)
+#define VG11_GETVECTORSIZE (VG11_GETSTRING + 1)
+#define VG11_HARDWAREQUERY (VG11_GETVECTORSIZE + 1)
+#define VG11_IMAGESUBDATA (VG11_HARDWAREQUERY + 1)
+#define VG11_INTERPOLATEPATH (VG11_IMAGESUBDATA + 1)
+#define VG11_LOADIDENTITY (VG11_INTERPOLATEPATH + 1)
+#define VG11_LOADMATRIX (VG11_LOADIDENTITY + 1)
+#define VG11_LOOKUP (VG11_LOADMATRIX + 1)
+#define VG11_LOOKUPSINGLE (VG11_LOOKUP + 1)
+#define VG11_MASK (VG11_LOOKUPSINGLE + 1)
+#define VG11_MODIFYPATHCOORDS (VG11_MASK + 1)
+#define VG11_MULTMATRIX (VG11_MODIFYPATHCOORDS + 1)
+#define VG11_PAINTPATTERN (VG11_MULTMATRIX + 1)
+#define VG11_PATHBOUNDS (VG11_PAINTPATTERN + 1)
+#define VG11_PATHLENGTH (VG11_PATHBOUNDS + 1)
+#define VG11_PATHTRANSFORMEDBOUNDS (VG11_PATHLENGTH + 1)
+#define VG11_POINTALONGPATH (VG11_PATHTRANSFORMEDBOUNDS + 1)
+#define VG11_READPIXELS (VG11_POINTALONGPATH + 1)
+#define VG11_REMOVEPATHCAPABILITIES (VG11_READPIXELS + 1)
+#define VG11_RENDERTOMASK (VG11_REMOVEPATHCAPABILITIES + 1)
+#define VG11_ROTATE (VG11_RENDERTOMASK + 1)
+#define VG11_SCALE (VG11_ROTATE + 1)
+#define VG11_SEPARABLECONVOLVE (VG11_SCALE + 1)
+#define VG11_SETCOLOR (VG11_SEPARABLECONVOLVE + 1)
+#define VG11_SETF (VG11_SETCOLOR + 1)
+#define VG11_SETFV (VG11_SETF + 1)
+#define VG11_SETGLYPHTOIMAGE (VG11_SETFV + 1)
+#define VG11_SETGLYPHTOPATH (VG11_SETGLYPHTOIMAGE + 1)
+#define VG11_SETI (VG11_SETGLYPHTOPATH + 1)
+#define VG11_SETIV (VG11_SETI + 1)
+#define VG11_SETPAINT (VG11_SETIV + 1)
+#define VG11_SETPARAMETERF (VG11_SETPAINT + 1)
+#define VG11_SETPARAMETERFV (VG11_SETPARAMETERF + 1)
+#define VG11_SETPARAMETERI (VG11_SETPARAMETERFV + 1)
+#define VG11_SETPARAMETERIV (VG11_SETPARAMETERI + 1)
+#define VG11_SETPIXELS (VG11_SETPARAMETERIV + 1)
+#define VG11_SHEAR (VG11_SETPIXELS + 1)
+#define VG11_TRANSFORMPATH (VG11_SHEAR + 1)
+#define VG11_TRANSLATE (VG11_TRANSFORMPATH + 1)
+#define VG11_WRITEPIXELS (VG11_TRANSLATE + 1)
+#define VG11_CALLS (VG11_WRITEPIXELS + 1)
+#define VG11_DRAWCALLS (VG11_CALLS + 1)
+#define VG11_STATECHANGECALLS (VG11_DRAWCALLS + 1)
+#define VG11_FILLCOUNT (VG11_STATECHANGECALLS + 1)
+#define VG11_STROKECOUNT (VG11_FILLCOUNT + 1)
+/* End of Driver API ID Definitions. */
+
+/* HAL & MISC IDs. */
+#define HAL_VERTBUFNEWBYTEALLOC 1
+#define HAL_VERTBUFTOTALBYTEALLOC (HAL_VERTBUFNEWBYTEALLOC + 1)
+#define HAL_VERTBUFNEWOBJALLOC (HAL_VERTBUFTOTALBYTEALLOC + 1)
+#define HAL_VERTBUFTOTALOBJALLOC (HAL_VERTBUFNEWOBJALLOC + 1)
+#define HAL_INDBUFNEWBYTEALLOC (HAL_VERTBUFTOTALOBJALLOC + 1)
+#define HAL_INDBUFTOTALBYTEALLOC (HAL_INDBUFNEWBYTEALLOC + 1)
+#define HAL_INDBUFNEWOBJALLOC (HAL_INDBUFTOTALBYTEALLOC + 1)
+#define HAL_INDBUFTOTALOBJALLOC (HAL_INDBUFNEWOBJALLOC + 1)
+#define HAL_TEXBUFNEWBYTEALLOC (HAL_INDBUFTOTALOBJALLOC + 1)
+#define HAL_TEXBUFTOTALBYTEALLOC (HAL_TEXBUFNEWBYTEALLOC + 1)
+#define HAL_TEXBUFNEWOBJALLOC (HAL_TEXBUFTOTALBYTEALLOC + 1)
+#define HAL_TEXBUFTOTALOBJALLOC (HAL_TEXBUFNEWOBJALLOC + 1)
+
+#define GPU_CYCLES 1
+#define GPU_READ64BYTE (GPU_CYCLES + 1)
+#define GPU_WRITE64BYTE (GPU_READ64BYTE + 1)
+
+#define VS_INSTCOUNT 1
+#define VS_BRANCHINSTCOUNT (VS_INSTCOUNT + 1)
+#define VS_TEXLDINSTCOUNT (VS_BRANCHINSTCOUNT + 1)
+#define VS_RENDEREDVERTCOUNT (VS_TEXLDINSTCOUNT + 1)
+
+#define PS_INSTCOUNT 1
+#define PS_BRANCHINSTCOUNT (PS_INSTCOUNT + 1)
+#define PS_TEXLDINSTCOUNT (PS_BRANCHINSTCOUNT + 1)
+#define PS_RENDEREDPIXCOUNT (PS_TEXLDINSTCOUNT + 1)
+
+#define PA_INVERTCOUNT 1
+#define PA_INPRIMCOUNT (PA_INVERTCOUNT + 1)
+#define PA_OUTPRIMCOUNT (PA_INPRIMCOUNT + 1)
+#define PA_DEPTHCLIPCOUNT (PA_OUTPRIMCOUNT + 1)
+#define PA_TRIVIALREJCOUNT (PA_DEPTHCLIPCOUNT + 1)
+#define PA_CULLCOUNT (PA_TRIVIALREJCOUNT + 1)
+
+#define SE_TRIANGLECOUNT 1
+#define SE_LINECOUNT (SE_TRIANGLECOUNT + 1)
+
+#define RA_VALIDPIXCOUNT 1
+#define RA_TOTALQUADCOUNT (RA_VALIDPIXCOUNT + 1)
+#define RA_VALIDQUADCOUNTEZ (RA_TOTALQUADCOUNT + 1)
+#define RA_TOTALPRIMCOUNT (RA_VALIDQUADCOUNTEZ + 1)
+#define RA_PIPECACHEMISSCOUNT (RA_TOTALPRIMCOUNT + 1)
+#define RA_PREFCACHEMISSCOUNT (RA_PIPECACHEMISSCOUNT + 1)
+#define RA_EEZCULLCOUNT (RA_PREFCACHEMISSCOUNT + 1)
+
+#define TX_TOTBILINEARREQ 1
+#define TX_TOTTRILINEARREQ (TX_TOTBILINEARREQ + 1)
+#define TX_TOTDISCARDTEXREQ (TX_TOTTRILINEARREQ + 1)
+#define TX_TOTTEXREQ (TX_TOTDISCARDTEXREQ + 1)
+#define TX_MEMREADCOUNT (TX_TOTTEXREQ + 1)
+#define TX_MEMREADIN8BCOUNT (TX_MEMREADCOUNT + 1)
+#define TX_CACHEMISSCOUNT (TX_MEMREADIN8BCOUNT + 1)
+#define TX_CACHEHITTEXELCOUNT (TX_CACHEMISSCOUNT + 1)
+#define TX_CACHEMISSTEXELCOUNT (TX_CACHEHITTEXELCOUNT + 1)
+
+#define PE_KILLEDBYCOLOR 1
+#define PE_KILLEDBYDEPTH (PE_KILLEDBYCOLOR + 1)
+#define PE_DRAWNBYCOLOR (PE_KILLEDBYDEPTH + 1)
+#define PE_DRAWNBYDEPTH (PE_DRAWNBYCOLOR + 1)
+
+#define MC_READREQ8BPIPE 1
+#define MC_READREQ8BIP (MC_READREQ8BPIPE + 1)
+#define MC_WRITEREQ8BPIPE (MC_READREQ8BIP + 1)
+
+#define AXI_READREQSTALLED 1
+#define AXI_WRITEREQSTALLED (AXI_READREQSTALLED + 1)
+#define AXI_WRITEDATASTALLED (AXI_WRITEREQSTALLED + 1)
+
+#define PVS_INSTRCOUNT 1
+#define PVS_ALUINSTRCOUNT (PVS_INSTRCOUNT + 1)
+#define PVS_TEXINSTRCOUNT (PVS_ALUINSTRCOUNT + 1)
+#define PVS_ATTRIBCOUNT (PVS_TEXINSTRCOUNT + 1)
+#define PVS_UNIFORMCOUNT (PVS_ATTRIBCOUNT + 1)
+#define PVS_FUNCTIONCOUNT (PVS_UNIFORMCOUNT + 1)
+
+#define PPS_INSTRCOUNT 1
+#define PPS_ALUINSTRCOUNT (PPS_INSTRCOUNT + 1)
+#define PPS_TEXINSTRCOUNT (PPS_ALUINSTRCOUNT + 1)
+#define PPS_ATTRIBCOUNT (PPS_TEXINSTRCOUNT + 1)
+#define PPS_UNIFORMCOUNT (PPS_ATTRIBCOUNT + 1)
+#define PPS_FUNCTIONCOUNT (PPS_UNIFORMCOUNT + 1)
+/* End of MISC Counter IDs. */
+
+#ifdef gcdNEW_PROFILER_FILE
+
+/* Category Constants. */
+#define VPHEADER 0x010000
+#define VPG_INFO 0x020000
+#define VPG_TIME 0x030000
+#define VPG_MEM 0x040000
+#define VPG_ES11 0x050000
+#define VPG_ES20 0x060000
+#define VPG_VG11 0x070000
+#define VPG_HAL 0x080000
+#define VPG_HW 0x090000
+#define VPG_GPU 0x0a0000
+#define VPG_VS 0x0b0000
+#define VPG_PS 0x0c0000
+#define VPG_PA 0x0d0000
+#define VPG_SETUP 0x0e0000
+#define VPG_RA 0x0f0000
+#define VPG_TX 0x100000
+#define VPG_PE 0x110000
+#define VPG_MC 0x120000
+#define VPG_AXI 0x130000
+#define VPG_PROG 0x140000
+#define VPG_PVS 0x150000
+#define VPG_PPS 0x160000
+#define VPG_FRAME 0x170000
+#define VPG_END 0xff0000
+
+/* Info. */
+#define VPC_INFOCOMPANY (VPG_INFO + 1)
+#define VPC_INFOVERSION (VPC_INFOCOMPANY + 1)
+#define VPC_INFORENDERER (VPC_INFOVERSION + 1)
+#define VPC_INFOREVISION (VPC_INFORENDERER + 1)
+#define VPC_INFODRIVER (VPC_INFOREVISION + 1)
+#define VPC_INFODRIVERMODE (VPC_INFODRIVER + 1)
+#define VPC_INFOSCREENSIZE (VPC_INFODRIVERMODE + 1)
+
+/* Counter Constants. */
+#define VPC_ELAPSETIME (VPG_TIME + 1)
+#define VPC_CPUTIME (VPC_ELAPSETIME + 1)
+
+#define VPC_MEMMAXRES (VPG_MEM + 1)
+#define VPC_MEMSHARED (VPC_MEMMAXRES + 1)
+#define VPC_MEMUNSHAREDDATA (VPC_MEMSHARED + 1)
+#define VPC_MEMUNSHAREDSTACK (VPC_MEMUNSHAREDDATA + 1)
+
+/* OpenGL ES11 Counters. */
+#define VPC_ES11ACTIVETEXTURE (VPG_ES11 + ES11_ACTIVETEXTURE)
+#define VPC_ES11ALPHAFUNC (VPG_ES11 + ES11_ALPHAFUNC)
+#define VPC_ES11ALPHAFUNCX (VPG_ES11 + ES11_ALPHAFUNCX)
+#define VPC_ES11BINDBUFFER (VPG_ES11 + ES11_BINDBUFFER)
+#define VPC_ES11BINDTEXTURE (VPG_ES11 + ES11_BINDTEXTURE)
+#define VPC_ES11BLENDFUNC (VPG_ES11 + ES11_BLENDFUNC)
+#define VPC_ES11BUFFERDATA (VPG_ES11 + ES11_BUFFERDATA)
+#define VPC_ES11BUFFERSUBDATA (VPG_ES11 + ES11_BUFFERSUBDATA)
+#define VPC_ES11CLEAR (VPG_ES11 + ES11_CLEAR)
+#define VPC_ES11CLEARCOLOR (VPG_ES11 + ES11_CLEARCOLOR)
+#define VPC_ES11CLEARCOLORX (VPG_ES11 + ES11_CLEARCOLORX)
+#define VPC_ES11CLEARDEPTHF (VPG_ES11 + ES11_CLEARDEPTHF)
+#define VPC_ES11CLEARDEPTHX (VPG_ES11 + ES11_CLEARDEPTHX)
+#define VPC_ES11CLEARSTENCIL (VPG_ES11 + ES11_CLEARSTENCIL)
+#define VPC_ES11CLIENTACTIVETEXTURE (VPG_ES11 + ES11_CLIENTACTIVETEXTURE)
+#define VPC_ES11CLIPPLANEF (VPG_ES11 + ES11_CLIPPLANEF)
+#define VPC_ES11CLIPPLANEX (VPG_ES11 + ES11_CLIPPLANEX)
+#define VPC_ES11COLOR4F (VPG_ES11 + ES11_COLOR4F)
+#define VPC_ES11COLOR4UB (VPG_ES11 + ES11_COLOR4UB)
+#define VPC_ES11COLOR4X (VPG_ES11 + ES11_COLOR4X)
+#define VPC_ES11COLORMASK (VPG_ES11 + ES11_COLORMASK)
+#define VPC_ES11COLORPOINTER (VPG_ES11 + ES11_COLORPOINTER)
+#define VPC_ES11COMPRESSEDTEXIMAGE2D (VPG_ES11 + ES11_COMPRESSEDTEXIMAGE2D)
+#define VPC_ES11COMPRESSEDTEXSUBIMAGE2D (VPG_ES11 + ES11_COMPRESSEDTEXSUBIMAGE2D)
+#define VPC_ES11COPYTEXIMAGE2D (VPG_ES11 + ES11_COPYTEXIMAGE2D)
+#define VPC_ES11COPYTEXSUBIMAGE2D (VPG_ES11 + ES11_COPYTEXSUBIMAGE2D)
+#define VPC_ES11CULLFACE (VPG_ES11 + ES11_CULLFACE)
+#define VPC_ES11DELETEBUFFERS (VPG_ES11 + ES11_DELETEBUFFERS)
+#define VPC_ES11DELETETEXTURES (VPG_ES11 + ES11_DELETETEXTURES)
+#define VPC_ES11DEPTHFUNC (VPG_ES11 + ES11_DEPTHFUNC)
+#define VPC_ES11DEPTHMASK (VPG_ES11 + ES11_DEPTHMASK)
+#define VPC_ES11DEPTHRANGEF (VPG_ES11 + ES11_DEPTHRANGEF)
+#define VPC_ES11DEPTHRANGEX (VPG_ES11 + ES11_DEPTHRANGEX)
+#define VPC_ES11DISABLE (VPG_ES11 + ES11_DISABLE)
+#define VPC_ES11DISABLECLIENTSTATE (VPG_ES11 + ES11_DISABLECLIENTSTATE)
+#define VPC_ES11DRAWARRAYS (VPG_ES11 + ES11_DRAWARRAYS)
+#define VPC_ES11DRAWELEMENTS (VPG_ES11 + ES11_DRAWELEMENTS)
+#define VPC_ES11ENABLE (VPG_ES11 + ES11_ENABLE)
+#define VPC_ES11ENABLECLIENTSTATE (VPG_ES11 + ES11_ENABLECLIENTSTATE)
+#define VPC_ES11FINISH (VPG_ES11 + ES11_FINISH)
+#define VPC_ES11FLUSH (VPG_ES11 + ES11_FLUSH)
+#define VPC_ES11FOGF (VPG_ES11 + ES11_FOGF)
+#define VPC_ES11FOGFV (VPG_ES11 + ES11_FOGFV)
+#define VPC_ES11FOGX (VPG_ES11 + ES11_FOGX)
+#define VPC_ES11FOGXV (VPG_ES11 + ES11_FOGXV)
+#define VPC_ES11FRONTFACE (VPG_ES11 + ES11_FRONTFACE)
+#define VPC_ES11FRUSTUMF (VPG_ES11 + ES11_FRUSTUMF)
+#define VPC_ES11FRUSTUMX (VPG_ES11 + ES11_FRUSTUMX)
+#define VPC_ES11GENBUFFERS (VPG_ES11 + ES11_GENBUFFERS)
+#define VPC_ES11GENTEXTURES (VPG_ES11 + ES11_GENTEXTURES)
+#define VPC_ES11GETBOOLEANV (VPG_ES11 + ES11_GETBOOLEANV)
+#define VPC_ES11GETBUFFERPARAMETERIV (VPG_ES11 + ES11_GETBUFFERPARAMETERIV)
+#define VPC_ES11GETCLIPPLANEF (VPG_ES11 + ES11_GETCLIPPLANEF)
+#define VPC_ES11GETCLIPPLANEX (VPG_ES11 + ES11_GETCLIPPLANEX)
+#define VPC_ES11GETERROR (VPG_ES11 + ES11_GETERROR)
+#define VPC_ES11GETFIXEDV (VPG_ES11 + ES11_GETFIXEDV)
+#define VPC_ES11GETFLOATV (VPG_ES11 + ES11_GETFLOATV)
+#define VPC_ES11GETINTEGERV (VPG_ES11 + ES11_GETINTEGERV)
+#define VPC_ES11GETLIGHTFV (VPG_ES11 + ES11_GETLIGHTFV)
+#define VPC_ES11GETLIGHTXV (VPG_ES11 + ES11_GETLIGHTXV)
+#define VPC_ES11GETMATERIALFV (VPG_ES11 + ES11_GETMATERIALFV)
+#define VPC_ES11GETMATERIALXV (VPG_ES11 + ES11_GETMATERIALXV)
+#define VPC_ES11GETPOINTERV (VPG_ES11 + ES11_GETPOINTERV)
+#define VPC_ES11GETSTRING (VPG_ES11 + ES11_GETSTRING)
+#define VPC_ES11GETTEXENVFV (VPG_ES11 + ES11_GETTEXENVFV)
+#define VPC_ES11GETTEXENVIV (VPG_ES11 + ES11_GETTEXENVIV)
+#define VPC_ES11GETTEXENVXV (VPG_ES11 + ES11_GETTEXENVXV)
+#define VPC_ES11GETTEXPARAMETERFV (VPG_ES11 + ES11_GETTEXPARAMETERFV)
+#define VPC_ES11GETTEXPARAMETERIV (VPG_ES11 + ES11_GETTEXPARAMETERIV)
+#define VPC_ES11GETTEXPARAMETERXV (VPG_ES11 + ES11_GETTEXPARAMETERXV)
+#define VPC_ES11HINT (VPG_ES11 + ES11_HINT)
+#define VPC_ES11ISBUFFER (VPG_ES11 + ES11_ISBUFFER)
+#define VPC_ES11ISENABLED (VPG_ES11 + ES11_ISENABLED)
+#define VPC_ES11ISTEXTURE (VPG_ES11 + ES11_ISTEXTURE)
+#define VPC_ES11LIGHTF (VPG_ES11 + ES11_LIGHTF)
+#define VPC_ES11LIGHTFV (VPG_ES11 + ES11_LIGHTFV)
+#define VPC_ES11LIGHTMODELF (VPG_ES11 + ES11_LIGHTMODELF)
+#define VPC_ES11LIGHTMODELFV (VPG_ES11 + ES11_LIGHTMODELFV)
+#define VPC_ES11LIGHTMODELX (VPG_ES11 + ES11_LIGHTMODELX)
+#define VPC_ES11LIGHTMODELXV (VPG_ES11 + ES11_LIGHTMODELXV)
+#define VPC_ES11LIGHTX (VPG_ES11 + ES11_LIGHTX)
+#define VPC_ES11LIGHTXV (VPG_ES11 + ES11_LIGHTXV)
+#define VPC_ES11LINEWIDTH (VPG_ES11 + ES11_LINEWIDTH)
+#define VPC_ES11LINEWIDTHX (VPG_ES11 + ES11_LINEWIDTHX)
+#define VPC_ES11LOADIDENTITY (VPG_ES11 + ES11_LOADIDENTITY)
+#define VPC_ES11LOADMATRIXF (VPG_ES11 + ES11_LOADMATRIXF)
+#define VPC_ES11LOADMATRIXX (VPG_ES11 + ES11_LOADMATRIXX)
+#define VPC_ES11LOGICOP (VPG_ES11 + ES11_LOGICOP)
+#define VPC_ES11MATERIALF (VPG_ES11 + ES11_MATERIALF)
+#define VPC_ES11MATERIALFV (VPG_ES11 + ES11_MATERIALFV)
+#define VPC_ES11MATERIALX (VPG_ES11 + ES11_MATERIALX)
+#define VPC_ES11MATERIALXV (VPG_ES11 + ES11_MATERIALXV)
+#define VPC_ES11MATRIXMODE (VPG_ES11 + ES11_MATRIXMODE)
+#define VPC_ES11MULTITEXCOORD4F (VPG_ES11 + ES11_MULTITEXCOORD4F)
+#define VPC_ES11MULTITEXCOORD4X (VPG_ES11 + ES11_MULTITEXCOORD4X)
+#define VPC_ES11MULTMATRIXF (VPG_ES11 + ES11_MULTMATRIXF)
+#define VPC_ES11MULTMATRIXX (VPG_ES11 + ES11_MULTMATRIXX)
+#define VPC_ES11NORMAL3F (VPG_ES11 + ES11_NORMAL3F)
+#define VPC_ES11NORMAL3X (VPG_ES11 + ES11_NORMAL3X)
+#define VPC_ES11NORMALPOINTER (VPG_ES11 + ES11_NORMALPOINTER)
+#define VPC_ES11ORTHOF (VPG_ES11 + ES11_ORTHOF)
+#define VPC_ES11ORTHOX (VPG_ES11 + ES11_ORTHOX)
+#define VPC_ES11PIXELSTOREI (VPG_ES11 + ES11_PIXELSTOREI)
+#define VPC_ES11POINTPARAMETERF (VPG_ES11 + ES11_POINTPARAMETERF)
+#define VPC_ES11POINTPARAMETERFV (VPG_ES11 + ES11_POINTPARAMETERFV)
+#define VPC_ES11POINTPARAMETERX (VPG_ES11 + ES11_POINTPARAMETERX)
+#define VPC_ES11POINTPARAMETERXV (VPG_ES11 + ES11_POINTPARAMETERXV)
+#define VPC_ES11POINTSIZE (VPG_ES11 + ES11_POINTSIZE)
+#define VPC_ES11POINTSIZEX (VPG_ES11 + ES11_POINTSIZEX)
+#define VPC_ES11POLYGONOFFSET (VPG_ES11 + ES11_POLYGONOFFSET)
+#define VPC_ES11POLYGONOFFSETX (VPG_ES11 + ES11_POLYGONOFFSETX)
+#define VPC_ES11POPMATRIX (VPG_ES11 + ES11_POPMATRIX)
+#define VPC_ES11PUSHMATRIX (VPG_ES11 + ES11_PUSHMATRIX)
+#define VPC_ES11READPIXELS (VPG_ES11 + ES11_READPIXELS)
+#define VPC_ES11ROTATEF (VPG_ES11 + ES11_ROTATEF)
+#define VPC_ES11ROTATEX (VPG_ES11 + ES11_ROTATEX)
+#define VPC_ES11SAMPLECOVERAGE (VPG_ES11 + ES11_SAMPLECOVERAGE)
+#define VPC_ES11SAMPLECOVERAGEX (VPG_ES11 + ES11_SAMPLECOVERAGEX)
+#define VPC_ES11SCALEF (VPG_ES11 + ES11_SCALEF)
+#define VPC_ES11SCALEX (VPG_ES11 + ES11_SCALEX)
+#define VPC_ES11SCISSOR (VPG_ES11 + ES11_SCISSOR)
+#define VPC_ES11SHADEMODEL (VPG_ES11 + ES11_SHADEMODEL)
+#define VPC_ES11STENCILFUNC (VPG_ES11 + ES11_STENCILFUNC)
+#define VPC_ES11STENCILMASK (VPG_ES11 + ES11_STENCILMASK)
+#define VPC_ES11STENCILOP (VPG_ES11 + ES11_STENCILOP)
+#define VPC_ES11TEXCOORDPOINTER (VPG_ES11 + ES11_TEXCOORDPOINTER)
+#define VPC_ES11TEXENVF (VPG_ES11 + ES11_TEXENVF)
+#define VPC_ES11TEXENVFV (VPG_ES11 + ES11_TEXENVFV)
+#define VPC_ES11TEXENVI (VPG_ES11 + ES11_TEXENVI)
+#define VPC_ES11TEXENVIV (VPG_ES11 + ES11_TEXENVIV)
+#define VPC_ES11TEXENVX (VPG_ES11 + ES11_TEXENVX)
+#define VPC_ES11TEXENVXV (VPG_ES11 + ES11_TEXENVXV)
+#define VPC_ES11TEXIMAGE2D (VPG_ES11 + ES11_TEXIMAGE2D)
+#define VPC_ES11TEXPARAMETERF (VPG_ES11 + ES11_TEXPARAMETERF)
+#define VPC_ES11TEXPARAMETERFV (VPG_ES11 + ES11_TEXPARAMETERFV)
+#define VPC_ES11TEXPARAMETERI (VPG_ES11 + ES11_TEXPARAMETERI)
+#define VPC_ES11TEXPARAMETERIV (VPG_ES11 + ES11_TEXPARAMETERIV)
+#define VPC_ES11TEXPARAMETERX (VPG_ES11 + ES11_TEXPARAMETERX)
+#define VPC_ES11TEXPARAMETERXV (VPG_ES11 + ES11_TEXPARAMETERXV)
+#define VPC_ES11TEXSUBIMAGE2D (VPG_ES11 + ES11_TEXSUBIMAGE2D)
+#define VPC_ES11TRANSLATEF (VPG_ES11 + ES11_TRANSLATEF)
+#define VPC_ES11TRANSLATEX (VPG_ES11 + ES11_TRANSLATEX)
+#define VPC_ES11VERTEXPOINTER (VPG_ES11 + ES11_VERTEXPOINTER)
+#define VPC_ES11VIEWPORT (VPG_ES11 + ES11_VIEWPORT)
+/* OpenGL ES11 Statics Counter IDs. */
+#define VPC_ES11CALLS (VPG_ES11 + ES11_CALLS)
+#define VPC_ES11DRAWCALLS (VPG_ES11 + ES11_DRAWCALLS)
+#define VPC_ES11STATECHANGECALLS (VPG_ES11 + ES11_STATECHANGECALLS)
+#define VPC_ES11POINTCOUNT (VPG_ES11 + ES11_POINTCOUNT)
+#define VPC_ES11LINECOUNT (VPG_ES11 + ES11_LINECOUNT)
+#define VPC_ES11TRIANGLECOUNT (VPG_ES11 + ES11_TRIANGLECOUNT)
+
+/* OpenGLES 2.x */
+#define VPC_ES20ACTIVETEXTURE (VPG_ES20 + ES20_ACTIVETEXTURE)
+#define VPC_ES20ATTACHSHADER (VPG_ES20 + ES20_ATTACHSHADER)
+#define VPC_ES20BINDATTRIBLOCATION (VPG_ES20 + ES20_BINDATTRIBLOCATION)
+#define VPC_ES20BINDBUFFER (VPG_ES20 + ES20_BINDBUFFER)
+#define VPC_ES20BINDFRAMEBUFFER (VPG_ES20 + ES20_BINDFRAMEBUFFER)
+#define VPC_ES20BINDRENDERBUFFER (VPG_ES20 + ES20_BINDRENDERBUFFER)
+#define VPC_ES20BINDTEXTURE (VPG_ES20 + ES20_BINDTEXTURE)
+#define VPC_ES20BLENDCOLOR (VPG_ES20 + ES20_BLENDCOLOR)
+#define VPC_ES20BLENDEQUATION (VPG_ES20 + ES20_BLENDEQUATION)
+#define VPC_ES20BLENDEQUATIONSEPARATE (VPG_ES20 + ES20_BLENDEQUATIONSEPARATE)
+#define VPC_ES20BLENDFUNC (VPG_ES20 + ES20_BLENDFUNC)
+#define VPC_ES20BLENDFUNCSEPARATE (VPG_ES20 + ES20_BLENDFUNCSEPARATE)
+#define VPC_ES20BUFFERDATA (VPG_ES20 + ES20_BUFFERDATA)
+#define VPC_ES20BUFFERSUBDATA (VPG_ES20 + ES20_BUFFERSUBDATA)
+#define VPC_ES20CHECKFRAMEBUFFERSTATUS (VPG_ES20 + ES20_CHECKFRAMEBUFFERSTATUS)
+#define VPC_ES20CLEAR (VPG_ES20 + ES20_CLEAR)
+#define VPC_ES20CLEARCOLOR (VPG_ES20 + ES20_CLEARCOLOR)
+#define VPC_ES20CLEARDEPTHF (VPG_ES20 + ES20_CLEARDEPTHF)
+#define VPC_ES20CLEARSTENCIL (VPG_ES20 + ES20_CLEARSTENCIL)
+#define VPC_ES20COLORMASK (VPG_ES20 + ES20_COLORMASK)
+#define VPC_ES20COMPILESHADER (VPG_ES20 + ES20_COMPILESHADER)
+#define VPC_ES20COMPRESSEDTEXIMAGE2D (VPG_ES20 + ES20_COMPRESSEDTEXIMAGE2D)
+#define VPC_ES20COMPRESSEDTEXSUBIMAGE2D (VPG_ES20 + ES20_COMPRESSEDTEXSUBIMAGE2D)
+#define VPC_ES20COPYTEXIMAGE2D (VPG_ES20 + ES20_COPYTEXIMAGE2D)
+#define VPC_ES20COPYTEXSUBIMAGE2D (VPG_ES20 + ES20_COPYTEXSUBIMAGE2D)
+#define VPC_ES20CREATEPROGRAM (VPG_ES20 + ES20_CREATEPROGRAM)
+#define VPC_ES20CREATESHADER (VPG_ES20 + ES20_CREATESHADER)
+#define VPC_ES20CULLFACE (VPG_ES20 + ES20_CULLFACE)
+#define VPC_ES20DELETEBUFFERS (VPG_ES20 + ES20_DELETEBUFFERS)
+#define VPC_ES20DELETEFRAMEBUFFERS (VPG_ES20 + ES20_DELETEFRAMEBUFFERS)
+#define VPC_ES20DELETEPROGRAM (VPG_ES20 + ES20_DELETEPROGRAM)
+#define VPC_ES20DELETERENDERBUFFERS (VPG_ES20 + ES20_DELETERENDERBUFFERS)
+#define VPC_ES20DELETESHADER (VPG_ES20 + ES20_DELETESHADER)
+#define VPC_ES20DELETETEXTURES (VPG_ES20 + ES20_DELETETEXTURES)
+#define VPC_ES20DEPTHFUNC (VPG_ES20 + ES20_DEPTHFUNC)
+#define VPC_ES20DEPTHMASK (VPG_ES20 + ES20_DEPTHMASK)
+#define VPC_ES20DEPTHRANGEF (VPG_ES20 + ES20_DEPTHRANGEF)
+#define VPC_ES20DETACHSHADER (VPG_ES20 + ES20_DETACHSHADER)
+#define VPC_ES20DISABLE (VPG_ES20 + ES20_DISABLE)
+#define VPC_ES20DISABLEVERTEXATTRIBARRAY (VPG_ES20 + ES20_DISABLEVERTEXATTRIBARRAY)
+#define VPC_ES20DRAWARRAYS (VPG_ES20 + ES20_DRAWARRAYS)
+#define VPC_ES20DRAWELEMENTS (VPG_ES20 + ES20_DRAWELEMENTS)
+#define VPC_ES20ENABLE (VPG_ES20 + ES20_ENABLE)
+#define VPC_ES20ENABLEVERTEXATTRIBARRAY (VPG_ES20 + ES20_ENABLEVERTEXATTRIBARRAY)
+#define VPC_ES20FINISH (VPG_ES20 + ES20_FINISH)
+#define VPC_ES20FLUSH (VPG_ES20 + ES20_FLUSH)
+#define VPC_ES20FRAMEBUFFERRENDERBUFFER (VPG_ES20 + ES20_FRAMEBUFFERRENDERBUFFER)
+#define VPC_ES20FRAMEBUFFERTEXTURE2D (VPG_ES20 + ES20_FRAMEBUFFERTEXTURE2D)
+#define VPC_ES20FRONTFACE (VPG_ES20 + ES20_FRONTFACE)
+#define VPC_ES20GENBUFFERS (VPG_ES20 + ES20_GENBUFFERS)
+#define VPC_ES20GENERATEMIPMAP (VPG_ES20 + ES20_GENERATEMIPMAP)
+#define VPC_ES20GENFRAMEBUFFERS (VPG_ES20 + ES20_GENFRAMEBUFFERS)
+#define VPC_ES20GENRENDERBUFFERS (VPG_ES20 + ES20_GENRENDERBUFFERS)
+#define VPC_ES20GENTEXTURES (VPG_ES20 + ES20_GENTEXTURES)
+#define VPC_ES20GETACTIVEATTRIB (VPG_ES20 + ES20_GETACTIVEATTRIB)
+#define VPC_ES20GETACTIVEUNIFORM (VPG_ES20 + ES20_GETACTIVEUNIFORM)
+#define VPC_ES20GETATTACHEDSHADERS (VPG_ES20 + ES20_GETATTACHEDSHADERS)
+#define VPC_ES20GETATTRIBLOCATION (VPG_ES20 + ES20_GETATTRIBLOCATION)
+#define VPC_ES20GETBOOLEANV (VPG_ES20 + ES20_GETBOOLEANV)
+#define VPC_ES20GETBUFFERPARAMETERIV (VPG_ES20 + ES20_GETBUFFERPARAMETERIV)
+#define VPC_ES20GETERROR (VPG_ES20 + ES20_GETERROR)
+#define VPC_ES20GETFLOATV (VPG_ES20 + ES20_GETFLOATV)
+#define VPC_ES20GETFRAMEBUFFERATTACHMENTPARAMETERIV (VPG_ES20 + ES20_GETFRAMEBUFFERATTACHMENTPARAMETERIV)
+#define VPC_ES20GETINTEGERV (VPG_ES20 + ES20_GETINTEGERV)
+#define VPC_ES20GETPROGRAMIV (VPG_ES20 + ES20_GETPROGRAMIV)
+#define VPC_ES20GETPROGRAMINFOLOG (VPG_ES20 + ES20_GETPROGRAMINFOLOG)
+#define VPC_ES20GETRENDERBUFFERPARAMETERIV (VPG_ES20 + ES20_GETRENDERBUFFERPARAMETERIV)
+#define VPC_ES20GETSHADERIV (VPG_ES20 + ES20_GETSHADERIV)
+#define VPC_ES20GETSHADERINFOLOG (VPG_ES20 + ES20_GETSHADERINFOLOG)
+#define VPC_ES20GETSHADERPRECISIONFORMAT (VPG_ES20 + ES20_GETSHADERPRECISIONFORMAT)
+#define VPC_ES20GETSHADERSOURCE (VPG_ES20 + ES20_GETSHADERSOURCE)
+#define VPC_ES20GETSTRING (VPG_ES20 + ES20_GETSTRING)
+#define VPC_ES20GETTEXPARAMETERFV (VPG_ES20 + ES20_GETTEXPARAMETERFV)
+#define VPC_ES20GETTEXPARAMETERIV (VPG_ES20 + ES20_GETTEXPARAMETERIV)
+#define VPC_ES20GETUNIFORMFV (VPG_ES20 + ES20_GETUNIFORMFV)
+#define VPC_ES20GETUNIFORMIV (VPG_ES20 + ES20_GETUNIFORMIV)
+#define VPC_ES20GETUNIFORMLOCATION (VPG_ES20 + ES20_GETUNIFORMLOCATION)
+#define VPC_ES20GETVERTEXATTRIBFV (VPG_ES20 + ES20_GETVERTEXATTRIBFV)
+#define VPC_ES20GETVERTEXATTRIBIV (VPG_ES20 + ES20_GETVERTEXATTRIBIV)
+#define VPC_ES20GETVERTEXATTRIBPOINTERV (VPG_ES20 + ES20_GETVERTEXATTRIBPOINTERV)
+#define VPC_ES20HINT (VPG_ES20 + ES20_HINT)
+#define VPC_ES20ISBUFFER (VPG_ES20 + ES20_ISBUFFER)
+#define VPC_ES20ISENABLED (VPG_ES20 + ES20_ISENABLED)
+#define VPC_ES20ISFRAMEBUFFER (VPG_ES20 + ES20_ISFRAMEBUFFER)
+#define VPC_ES20ISPROGRAM (VPG_ES20 + ES20_ISPROGRAM)
+#define VPC_ES20ISRENDERBUFFER (VPG_ES20 + ES20_ISRENDERBUFFER)
+#define VPC_ES20ISSHADER (VPG_ES20 + ES20_ISSHADER)
+#define VPC_ES20ISTEXTURE (VPG_ES20 + ES20_ISTEXTURE)
+#define VPC_ES20LINEWIDTH (VPG_ES20 + ES20_LINEWIDTH)
+#define VPC_ES20LINKPROGRAM (VPG_ES20 + ES20_LINKPROGRAM)
+#define VPC_ES20PIXELSTOREI (VPG_ES20 + ES20_PIXELSTOREI)
+#define VPC_ES20POLYGONOFFSET (VPG_ES20 + ES20_POLYGONOFFSET)
+#define VPC_ES20READPIXELS (VPG_ES20 + ES20_READPIXELS)
+#define VPC_ES20RELEASESHADERCOMPILER (VPG_ES20 + ES20_RELEASESHADERCOMPILER)
+#define VPC_ES20RENDERBUFFERSTORAGE (VPG_ES20 + ES20_RENDERBUFFERSTORAGE)
+#define VPC_ES20SAMPLECOVERAGE (VPG_ES20 + ES20_SAMPLECOVERAGE)
+#define VPC_ES20SCISSOR (VPG_ES20 + ES20_SCISSOR)
+#define VPC_ES20SHADERBINARY (VPG_ES20 + ES20_SHADERBINARY)
+#define VPC_ES20SHADERSOURCE (VPG_ES20 + ES20_SHADERSOURCE)
+#define VPC_ES20STENCILFUNC (VPG_ES20 + ES20_STENCILFUNC)
+#define VPC_ES20STENCILFUNCSEPARATE (VPG_ES20 + ES20_STENCILFUNCSEPARATE)
+#define VPC_ES20STENCILMASK (VPG_ES20 + ES20_STENCILMASK)
+#define VPC_ES20STENCILMASKSEPARATE (VPG_ES20 + ES20_STENCILMASKSEPARATE)
+#define VPC_ES20STENCILOP (VPG_ES20 + ES20_STENCILOP)
+#define VPC_ES20STENCILOPSEPARATE (VPG_ES20 + ES20_STENCILOPSEPARATE)
+#define VPC_ES20TEXIMAGE2D (VPG_ES20 + ES20_TEXIMAGE2D)
+#define VPC_ES20TEXPARAMETERF (VPG_ES20 + ES20_TEXPARAMETERF)
+#define VPC_ES20TEXPARAMETERFV (VPG_ES20 + ES20_TEXPARAMETERFV)
+#define VPC_ES20TEXPARAMETERI (VPG_ES20 + ES20_TEXPARAMETERI)
+#define VPC_ES20TEXPARAMETERIV (VPG_ES20 + ES20_TEXPARAMETERIV)
+#define VPC_ES20TEXSUBIMAGE2D (VPG_ES20 + ES20_TEXSUBIMAGE2D)
+#define VPC_ES20UNIFORM1F (VPG_ES20 + ES20_UNIFORM1F)
+#define VPC_ES20UNIFORM1FV (VPG_ES20 + ES20_UNIFORM1FV)
+#define VPC_ES20UNIFORM1I (VPG_ES20 + ES20_UNIFORM1I)
+#define VPC_ES20UNIFORM1IV (VPG_ES20 + ES20_UNIFORM1IV)
+#define VPC_ES20UNIFORM2F (VPG_ES20 + ES20_UNIFORM2F)
+#define VPC_ES20UNIFORM2FV (VPG_ES20 + ES20_UNIFORM2FV)
+#define VPC_ES20UNIFORM2I (VPG_ES20 + ES20_UNIFORM2I)
+#define VPC_ES20UNIFORM2IV (VPG_ES20 + ES20_UNIFORM2IV)
+#define VPC_ES20UNIFORM3F (VPG_ES20 + ES20_UNIFORM3F)
+#define VPC_ES20UNIFORM3FV (VPG_ES20 + ES20_UNIFORM3FV)
+#define VPC_ES20UNIFORM3I (VPG_ES20 + ES20_UNIFORM3I)
+#define VPC_ES20UNIFORM3IV (VPG_ES20 + ES20_UNIFORM3IV)
+#define VPC_ES20UNIFORM4F (VPG_ES20 + ES20_UNIFORM4F)
+#define VPC_ES20UNIFORM4FV (VPG_ES20 + ES20_UNIFORM4FV)
+#define VPC_ES20UNIFORM4I (VPG_ES20 + ES20_UNIFORM4I)
+#define VPC_ES20UNIFORM4IV (VPG_ES20 + ES20_UNIFORM4IV)
+#define VPC_ES20UNIFORMMATRIX2FV (VPG_ES20 + ES20_UNIFORMMATRIX2FV)
+#define VPC_ES20UNIFORMMATRIX3FV (VPG_ES20 + ES20_UNIFORMMATRIX3FV)
+#define VPC_ES20UNIFORMMATRIX4FV (VPG_ES20 + ES20_UNIFORMMATRIX4FV)
+#define VPC_ES20USEPROGRAM (VPG_ES20 + ES20_USEPROGRAM)
+#define VPC_ES20VALIDATEPROGRAM (VPG_ES20 + ES20_VALIDATEPROGRAM)
+#define VPC_ES20VERTEXATTRIB1F (VPG_ES20 + ES20_VERTEXATTRIB1F)
+#define VPC_ES20VERTEXATTRIB1FV (VPG_ES20 + ES20_VERTEXATTRIB1FV)
+#define VPC_ES20VERTEXATTRIB2F (VPG_ES20 + ES20_VERTEXATTRIB2F)
+#define VPC_ES20VERTEXATTRIB2FV (VPG_ES20 + ES20_VERTEXATTRIB2FV)
+#define VPC_ES20VERTEXATTRIB3F (VPG_ES20 + ES20_VERTEXATTRIB3F)
+#define VPC_ES20VERTEXATTRIB3FV (VPG_ES20 + ES20_VERTEXATTRIB3FV)
+#define VPC_ES20VERTEXATTRIB4F (VPG_ES20 + ES20_VERTEXATTRIB4F)
+#define VPC_ES20VERTEXATTRIB4FV (VPG_ES20 + ES20_VERTEXATTRIB4FV)
+#define VPC_ES20VERTEXATTRIBPOINTER (VPG_ES20 + ES20_VERTEXATTRIBPOINTER)
+#define VPC_ES20VIEWPORT (VPG_ES20 + ES20_VIEWPORT)
+/* OpenGL ES20 Statistics Counter IDs. */
+#define VPC_ES20CALLS (VPG_ES20 + ES20_CALLS)
+#define VPC_ES20DRAWCALLS (VPG_ES20 + ES20_DRAWCALLS)
+#define VPC_ES20STATECHANGECALLS (VPG_ES20 + ES20_STATECHANGECALLS)
+#define VPC_ES20POINTCOUNT (VPG_ES20 + ES20_POINTCOUNT)
+#define VPC_ES20LINECOUNT (VPG_ES20 + ES20_LINECOUNT)
+#define VPC_ES20TRIANGLECOUNT (VPG_ES20 + ES20_TRIANGLECOUNT)
+
+/* VG11 Counters. */
+#define VPC_VG11APPENDPATH (VPG_VG11 + VG11_APPENDPATH)
+#define VPC_VG11APPENDPATHDATA (VPG_VG11 + VG11_APPENDPATHDATA)
+#define VPC_VG11CHILDIMAGE (VPG_VG11 + VG11_CHILDIMAGE)
+#define VPC_VG11CLEAR (VPG_VG11 + VG11_CLEAR)
+#define VPC_VG11CLEARGLYPH (VPG_VG11 + VG11_CLEARGLYPH)
+#define VPC_VG11CLEARIMAGE (VPG_VG11 + VG11_CLEARIMAGE)
+#define VPC_VG11CLEARPATH (VPG_VG11 + VG11_CLEARPATH)
+#define VPC_VG11COLORMATRIX (VPG_VG11 + VG11_COLORMATRIX)
+#define VPC_VG11CONVOLVE (VPG_VG11 + VG11_CONVOLVE)
+#define VPC_VG11COPYIMAGE (VPG_VG11 + VG11_COPYIMAGE)
+#define VPC_VG11COPYMASK (VPG_VG11 + VG11_COPYMASK)
+#define VPC_VG11COPYPIXELS (VPG_VG11 + VG11_COPYPIXELS)
+#define VPC_VG11CREATEFONT (VPG_VG11 + VG11_CREATEFONT)
+#define VPC_VG11CREATEIMAGE (VPG_VG11 + VG11_CREATEIMAGE)
+#define VPC_VG11CREATEMASKLAYER (VPG_VG11 + VG11_CREATEMASKLAYER)
+#define VPC_VG11CREATEPAINT (VPG_VG11 + VG11_CREATEPAINT)
+#define VPC_VG11CREATEPATH (VPG_VG11 + VG11_CREATEPATH)
+#define VPC_VG11DESTROYFONT (VPG_VG11 + VG11_DESTROYFONT)
+#define VPC_VG11DESTROYIMAGE (VPG_VG11 + VG11_DESTROYIMAGE)
+#define VPC_VG11DESTROYMASKLAYER (VPG_VG11 + VG11_DESTROYMASKLAYER)
+#define VPC_VG11DESTROYPAINT (VPG_VG11 + VG11_DESTROYPAINT)
+#define VPC_VG11DESTROYPATH (VPG_VG11 + VG11_DESTROYPATH)
+#define VPC_VG11DRAWGLYPH (VPG_VG11 + VG11_DRAWGLYPH)
+#define VPC_VG11DRAWGLYPHS (VPG_VG11 + VG11_DRAWGLYPHS)
+#define VPC_VG11DRAWIMAGE (VPG_VG11 + VG11_DRAWIMAGE)
+#define VPC_VG11DRAWPATH (VPG_VG11 + VG11_DRAWPATH)
+#define VPC_VG11FILLMASKLAYER (VPG_VG11 + VG11_FILLMASKLAYER)
+#define VPC_VG11FINISH (VPG_VG11 + VG11_FINISH)
+#define VPC_VG11FLUSH (VPG_VG11 + VG11_FLUSH)
+#define VPC_VG11GAUSSIANBLUR (VPG_VG11 + VG11_GAUSSIANBLUR)
+#define VPC_VG11GETCOLOR (VPG_VG11 + VG11_GETCOLOR)
+#define VPC_VG11GETERROR (VPG_VG11 + VG11_GETERROR)
+#define VPC_VG11GETF (VPG_VG11 + VG11_GETF)
+#define VPC_VG11GETFV (VPG_VG11 + VG11_GETFV)
+#define VPC_VG11GETI (VPG_VG11 + VG11_GETI)
+#define VPC_VG11GETIMAGESUBDATA (VPG_VG11 + VG11_GETIMAGESUBDATA)
+#define VPC_VG11GETIV (VPG_VG11 + VG11_GETIV)
+#define VPC_VG11GETMATRIX (VPG_VG11 + VG11_GETMATRIX)
+#define VPC_VG11GETPAINT (VPG_VG11 + VG11_GETPAINT)
+#define VPC_VG11GETPARAMETERF (VPG_VG11 + VG11_GETPARAMETERF)
+#define VPC_VG11GETPARAMETERFV (VPG_VG11 + VG11_GETPARAMETERFV)
+#define VPC_VG11GETPARAMETERI (VPG_VG11 + VG11_GETPARAMETERI)
+#define VPC_VG11GETPARAMETERIV (VPG_VG11 + VG11_GETPARAMETERIV)
+#define VPC_VG11GETPARAMETERVECTORSIZE (VPG_VG11 + VG11_GETPARAMETERVECTORSIZE)
+#define VPC_VG11GETPARENT (VPG_VG11 + VG11_GETPARENT)
+#define VPC_VG11GETPATHCAPABILITIES (VPG_VG11 + VG11_GETPATHCAPABILITIES)
+#define VPC_VG11GETPIXELS (VPG_VG11 + VG11_GETPIXELS)
+#define VPC_VG11GETSTRING (VPG_VG11 + VG11_GETSTRING)
+#define VPC_VG11GETVECTORSIZE (VPG_VG11 + VG11_GETVECTORSIZE)
+#define VPC_VG11HARDWAREQUERY (VPG_VG11 + VG11_HARDWAREQUERY)
+#define VPC_VG11IMAGESUBDATA (VPG_VG11 + VG11_IMAGESUBDATA)
+#define VPC_VG11INTERPOLATEPATH (VPG_VG11 + VG11_INTERPOLATEPATH)
+#define VPC_VG11LOADIDENTITY (VPG_VG11 + VG11_LOADIDENTITY)
+#define VPC_VG11LOADMATRIX (VPG_VG11 + VG11_LOADMATRIX)
+#define VPC_VG11LOOKUP (VPG_VG11 + VG11_LOOKUP)
+#define VPC_VG11LOOKUPSINGLE (VPG_VG11 + VG11_LOOKUPSINGLE)
+#define VPC_VG11MASK (VPG_VG11 + VG11_MASK)
+#define VPC_VG11MODIFYPATHCOORDS (VPG_VG11 + VG11_MODIFYPATHCOORDS)
+#define VPC_VG11MULTMATRIX (VPG_VG11 + VG11_MULTMATRIX)
+#define VPC_VG11PAINTPATTERN (VPG_VG11 + VG11_PAINTPATTERN)
+#define VPC_VG11PATHBOUNDS (VPG_VG11 + VG11_PATHBOUNDS)
+#define VPC_VG11PATHLENGTH (VPG_VG11 + VG11_PATHLENGTH)
+#define VPC_VG11PATHTRANSFORMEDBOUNDS (VPG_VG11 + VG11_PATHTRANSFORMEDBOUNDS)
+#define VPC_VG11POINTALONGPATH (VPG_VG11 + VG11_POINTALONGPATH)
+#define VPC_VG11READPIXELS (VPG_VG11 + VG11_READPIXELS)
+#define VPC_VG11REMOVEPATHCAPABILITIES (VPG_VG11 + VG11_REMOVEPATHCAPABILITIES)
+#define VPC_VG11RENDERTOMASK (VPG_VG11 + VG11_RENDERTOMASK)
+#define VPC_VG11ROTATE (VPG_VG11 + VG11_ROTATE)
+#define VPC_VG11SCALE (VPG_VG11 + VG11_SCALE)
+#define VPC_VG11SEPARABLECONVOLVE (VPG_VG11 + VG11_SEPARABLECONVOLVE)
+#define VPC_VG11SETCOLOR (VPG_VG11 + VG11_SETCOLOR)
+#define VPC_VG11SETF (VPG_VG11 + VG11_SETF)
+#define VPC_VG11SETFV (VPG_VG11 + VG11_SETFV)
+#define VPC_VG11SETGLYPHTOIMAGE (VPG_VG11 + VG11_SETGLYPHTOIMAGE)
+#define VPC_VG11SETGLYPHTOPATH (VPG_VG11 + VG11_SETGLYPHTOPATH)
+#define VPC_VG11SETI (VPG_VG11 + VG11_SETI)
+#define VPC_VG11SETIV (VPG_VG11 + VG11_SETIV)
+#define VPC_VG11SETPAINT (VPG_VG11 + VG11_SETPAINT)
+#define VPC_VG11SETPARAMETERF (VPG_VG11 + VG11_SETPARAMETERF)
+#define VPC_VG11SETPARAMETERFV (VPG_VG11 + VG11_SETPARAMETERFV)
+#define VPC_VG11SETPARAMETERI (VPG_VG11 + VG11_SETPARAMETERI)
+#define VPC_VG11SETPARAMETERIV (VPG_VG11 + VG11_SETPARAMETERIV)
+#define VPC_VG11SETPIXELS (VPG_VG11 + VG11_SETPIXELS)
+#define VPC_VG11SHEAR (VPG_VG11 + VG11_SHEAR)
+#define VPC_VG11TRANSFORMPATH (VPG_VG11 + VG11_TRANSFORMPATH)
+#define VPC_VG11TRANSLATE (VPG_VG11 + VG11_TRANSLATE)
+#define VPC_VG11WRITEPIXELS (VPG_VG11 + VG11_WRITEPIXELS)
+/* OpenVG Statistics Counter IDs. */
+#define VPC_VG11CALLS (VPG_VG11 + VG11_CALLS)
+#define VPC_VG11DRAWCALLS (VPG_VG11 + VG11_DRAWCALLS)
+#define VPC_VG11STATECHANGECALLS (VPG_VG11 + VG11_STATECHANGECALLS)
+#define VPC_VG11FILLCOUNT (VPG_VG11 + VG11_FILLCOUNT)
+#define VPC_VG11STROKECOUNT (VPG_VG11 + VG11_STROKECOUNT)
+
+/* HAL Counters. */
+#define VPC_HALVERTBUFNEWBYTEALLOC (VPG_HAL + HAL_VERTBUFNEWBYTEALLOC)
+#define VPC_HALVERTBUFTOTALBYTEALLOC (VPG_HAL + HAL_VERTBUFTOTALBYTEALLOC)
+#define VPC_HALVERTBUFNEWOBJALLOC (VPG_HAL + HAL_VERTBUFNEWOBJALLOC)
+#define VPC_HALVERTBUFTOTALOBJALLOC (VPG_HAL + HAL_VERTBUFTOTALOBJALLOC)
+#define VPC_HALINDBUFNEWBYTEALLOC (VPG_HAL + HAL_INDBUFNEWBYTEALLOC)
+#define VPC_HALINDBUFTOTALBYTEALLOC (VPG_HAL + HAL_INDBUFTOTALBYTEALLOC)
+#define VPC_HALINDBUFNEWOBJALLOC (VPG_HAL + HAL_INDBUFNEWOBJALLOC)
+#define VPC_HALINDBUFTOTALOBJALLOC (VPG_HAL + HAL_INDBUFTOTALOBJALLOC)
+#define VPC_HALTEXBUFNEWBYTEALLOC (VPG_HAL + HAL_TEXBUFNEWBYTEALLOC)
+#define VPC_HALTEXBUFTOTALBYTEALLOC (VPG_HAL + HAL_TEXBUFTOTALBYTEALLOC)
+#define VPC_HALTEXBUFNEWOBJALLOC (VPG_HAL + HAL_TEXBUFNEWOBJALLOC)
+#define VPC_HALTEXBUFTOTALOBJALLOC (VPG_HAL + HAL_TEXBUFTOTALOBJALLOC)
+
+/* HW: GPU Counters. */
+#define VPC_GPUCYCLES (VPG_GPU + GPU_CYCLES)
+#define VPC_GPUREAD64BYTE (VPG_GPU + GPU_READ64BYTE)
+#define VPC_GPUWRITE64BYTE (VPG_GPU + GPU_WRITE64BYTE)
+
+/* HW: Shader Counters. */
+#define VPC_VSINSTCOUNT (VPG_VS + VS_INSTCOUNT)
+#define VPC_VSBRANCHINSTCOUNT (VPG_VS + VS_BRANCHINSTCOUNT)
+#define VPC_VSTEXLDINSTCOUNT (VPG_VS + VS_TEXLDINSTCOUNT)
+#define VPC_VSRENDEREDVERTCOUNT (VPG_VS + VS_RENDEREDVERTCOUNT)
+/* HW: PS Count. */
+#define VPC_PSINSTCOUNT (VPG_PS + PS_INSTCOUNT)
+#define VPC_PSBRANCHINSTCOUNT (VPG_PS + PS_BRANCHINSTCOUNT)
+#define VPC_PSTEXLDINSTCOUNT (VPG_PS + PS_TEXLDINSTCOUNT)
+#define VPC_PSRENDEREDPIXCOUNT (VPG_PS + PS_RENDEREDPIXCOUNT)
+
+
+/* HW: PA Counters. */
+#define VPC_PAINVERTCOUNT (VPG_PA + PA_INVERTCOUNT)
+#define VPC_PAINPRIMCOUNT (VPG_PA + PA_INPRIMCOUNT)
+#define VPC_PAOUTPRIMCOUNT (VPG_PA + PA_OUTPRIMCOUNT)
+#define VPC_PADEPTHCLIPCOUNT (VPG_PA + PA_DEPTHCLIPCOUNT)
+#define VPC_PATRIVIALREJCOUNT (VPG_PA + PA_TRIVIALREJCOUNT)
+#define VPC_PACULLCOUNT (VPG_PA + PA_CULLCOUNT)
+
+/* HW: Setup Counters. */
+#define VPC_SETRIANGLECOUNT (VPG_SETUP + SE_TRIANGLECOUNT)
+#define VPC_SELINECOUNT (VPG_SETUP + SE_LINECOUNT)
+
+/* HW: RA Counters. */
+#define VPC_RAVALIDPIXCOUNT (VPG_RA + RA_VALIDPIXCOUNT)
+#define VPC_RATOTALQUADCOUNT (VPG_RA + RA_TOTALQUADCOUNT)
+#define VPC_RAVALIDQUADCOUNTEZ (VPG_RA + RA_VALIDQUADCOUNTEZ)
+#define VPC_RATOTALPRIMCOUNT (VPG_RA + RA_TOTALPRIMCOUNT)
+#define VPC_RAPIPECACHEMISSCOUNT (VPG_RA + RA_PIPECACHEMISSCOUNT)
+#define VPC_RAPREFCACHEMISSCOUNT (VPG_RA + RA_PREFCACHEMISSCOUNT)
+#define VPC_RAEEZCULLCOUNT (VPG_RA + RA_EEZCULLCOUNT)
+
+/* HW: TEX Counters. */
+#define VPC_TXTOTBILINEARREQ (VPG_TX + TX_TOTBILINEARREQ)
+#define VPC_TXTOTTRILINEARREQ (VPG_TX + TX_TOTTRILINEARREQ)
+#define VPC_TXTOTDISCARDTEXREQ (VPG_TX + TX_TOTDISCARDTEXREQ)
+#define VPC_TXTOTTEXREQ (VPG_TX + TX_TOTTEXREQ)
+#define VPC_TXMEMREADCOUNT (VPG_TX + TX_MEMREADCOUNT)
+#define VPC_TXMEMREADIN8BCOUNT (VPG_TX + TX_MEMREADIN8BCOUNT)
+#define VPC_TXCACHEMISSCOUNT (VPG_TX + TX_CACHEMISSCOUNT)
+#define VPC_TXCACHEHITTEXELCOUNT (VPG_TX + TX_CACHEHITTEXELCOUNT)
+#define VPC_TXCACHEMISSTEXELCOUNT (VPG_TX + TX_CACHEMISSTEXELCOUNT)
+
+/* HW: PE Counters. */
+#define VPC_PEKILLEDBYCOLOR (VPG_PE + PE_KILLEDBYCOLOR)
+#define VPC_PEKILLEDBYDEPTH (VPG_PE + PE_KILLEDBYDEPTH)
+#define VPC_PEDRAWNBYCOLOR (VPG_PE + PE_DRAWNBYCOLOR)
+#define VPC_PEDRAWNBYDEPTH (VPG_PE + PE_DRAWNBYDEPTH)
+
+/* HW: MC Counters. */
+#define VPC_MCREADREQ8BPIPE (VPG_MC + MC_READREQ8BPIPE)
+#define VPC_MCREADREQ8BIP (VPG_MC + MC_READREQ8BIP)
+#define VPC_MCWRITEREQ8BPIPE (VPG_MC + MC_WRITEREQ8BPIPE)
+
+/* HW: AXI Counters. */
+#define VPC_AXIREADREQSTALLED (VPG_AXI + AXI_READREQSTALLED)
+#define VPC_AXIWRITEREQSTALLED (VPG_AXI + AXI_WRITEREQSTALLED)
+#define VPC_AXIWRITEDATASTALLED (VPG_AXI + AXI_WRITEDATASTALLED)
+
+/* PROGRAM: Shader program counters. */
+#define VPC_PVSINSTRCOUNT (VPG_PVS + PVS_INSTRCOUNT)
+#define VPC_PVSALUINSTRCOUNT (VPG_PVS + PVS_ALUINSTRCOUNT)
+#define VPC_PVSTEXINSTRCOUNT (VPG_PVS + PVS_TEXINSTRCOUNT)
+#define VPC_PVSATTRIBCOUNT (VPG_PVS + PVS_ATTRIBCOUNT)
+#define VPC_PVSUNIFORMCOUNT (VPG_PVS + PVS_UNIFORMCOUNT)
+#define VPC_PVSFUNCTIONCOUNT (VPG_PVS + PVS_FUNCTIONCOUNT)
+
+#define VPC_PPSINSTRCOUNT (VPG_PPS + PPS_INSTRCOUNT)
+#define VPC_PPSALUINSTRCOUNT (VPG_PPS + PPS_ALUINSTRCOUNT)
+#define VPC_PPSTEXINSTRCOUNT (VPG_PPS + PPS_TEXINSTRCOUNT)
+#define VPC_PPSATTRIBCOUNT (VPG_PPS + PPS_ATTRIBCOUNT)
+#define VPC_PPSUNIFORMCOUNT (VPG_PPS + PPS_UNIFORMCOUNT)
+#define VPC_PPSFUNCTIONCOUNT (VPG_PPS + PPS_FUNCTIONCOUNT)
+
+#endif
+
+
+/* HW profile information. */
+typedef struct _gcsPROFILER_COUNTERS
+{
+ /* HW static counters. */
+ gctUINT32 gpuClock;
+ gctUINT32 axiClock;
+ gctUINT32 shaderClock;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuClockStart;
+ gctUINT32 gpuClockEnd;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuCyclesCounter;
+ gctUINT32 gpuTotalRead64BytesPerFrame;
+ gctUINT32 gpuTotalWrite64BytesPerFrame;
+
+ /* PE */
+ gctUINT32 pe_pixel_count_killed_by_color_pipe;
+ gctUINT32 pe_pixel_count_killed_by_depth_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_color_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_depth_pipe;
+
+ /* SH */
+ gctUINT32 ps_inst_counter;
+ gctUINT32 rendered_pixel_counter;
+ gctUINT32 vs_inst_counter;
+ gctUINT32 rendered_vertice_counter;
+ gctUINT32 vtx_branch_inst_counter;
+ gctUINT32 vtx_texld_inst_counter;
+ gctUINT32 pxl_branch_inst_counter;
+ gctUINT32 pxl_texld_inst_counter;
+
+ /* PA */
+ gctUINT32 pa_input_vtx_counter;
+ gctUINT32 pa_input_prim_counter;
+ gctUINT32 pa_output_prim_counter;
+ gctUINT32 pa_depth_clipped_counter;
+ gctUINT32 pa_trivial_rejected_counter;
+ gctUINT32 pa_culled_counter;
+
+ /* SE */
+ gctUINT32 se_culled_triangle_count;
+ gctUINT32 se_culled_lines_count;
+
+ /* RA */
+ gctUINT32 ra_valid_pixel_count;
+ gctUINT32 ra_total_quad_count;
+ gctUINT32 ra_valid_quad_count_after_early_z;
+ gctUINT32 ra_total_primitive_count;
+ gctUINT32 ra_pipe_cache_miss_counter;
+ gctUINT32 ra_prefetch_cache_miss_counter;
+ gctUINT32 ra_eez_culled_counter;
+
+ /* TX */
+ gctUINT32 tx_total_bilinear_requests;
+ gctUINT32 tx_total_trilinear_requests;
+ gctUINT32 tx_total_discarded_texture_requests;
+ gctUINT32 tx_total_texture_requests;
+ gctUINT32 tx_mem_read_count;
+ gctUINT32 tx_mem_read_in_8B_count;
+ gctUINT32 tx_cache_miss_count;
+ gctUINT32 tx_cache_hit_texel_count;
+ gctUINT32 tx_cache_miss_texel_count;
+
+ /* MC */
+ gctUINT32 mc_total_read_req_8B_from_pipeline;
+ gctUINT32 mc_total_read_req_8B_from_IP;
+ gctUINT32 mc_total_write_req_8B_from_pipeline;
+
+ /* HI */
+ gctUINT32 hi_axi_cycles_read_request_stalled;
+ gctUINT32 hi_axi_cycles_write_request_stalled;
+ gctUINT32 hi_axi_cycles_write_data_stalled;
+}
+gcsPROFILER_COUNTERS;
+
+/* HAL profile information. */
+typedef struct _gcsPROFILER
+{
+ gctUINT32 enable;
+ gctBOOL enableHal;
+ gctBOOL enableHW;
+ gctBOOL enableSH;
+
+ gctBOOL useSocket;
+ gctINT sockFd;
+
+ gctFILE file;
+
+ /* Aggregate Information */
+
+ /* Clock Info */
+ gctUINT64 frameStart;
+ gctUINT64 frameEnd;
+
+ /* Current frame information */
+ gctUINT32 frameNumber;
+ gctUINT64 frameStartTimeusec;
+ gctUINT64 frameEndTimeusec;
+ gctUINT64 frameStartCPUTimeusec;
+ gctUINT64 frameEndCPUTimeusec;
+
+#if PROFILE_HAL_COUNTERS
+ gctUINT32 vertexBufferTotalBytesAlloc;
+ gctUINT32 vertexBufferNewBytesAlloc;
+ int vertexBufferTotalObjectsAlloc;
+ int vertexBufferNewObjectsAlloc;
+
+ gctUINT32 indexBufferTotalBytesAlloc;
+ gctUINT32 indexBufferNewBytesAlloc;
+ int indexBufferTotalObjectsAlloc;
+ int indexBufferNewObjectsAlloc;
+
+ gctUINT32 textureBufferTotalBytesAlloc;
+ gctUINT32 textureBufferNewBytesAlloc;
+ int textureBufferTotalObjectsAlloc;
+ int textureBufferNewObjectsAlloc;
+
+ gctUINT32 numCommits;
+ gctUINT32 drawPointCount;
+ gctUINT32 drawLineCount;
+ gctUINT32 drawTriangleCount;
+ gctUINT32 drawVertexCount;
+ gctUINT32 redundantStateChangeCalls;
+#endif
+
+ gctUINT32 prevVSInstCount;
+ gctUINT32 prevVSBranchInstCount;
+ gctUINT32 prevVSTexInstCount;
+ gctUINT32 prevVSVertexCount;
+ gctUINT32 prevPSInstCount;
+ gctUINT32 prevPSBranchInstCount;
+ gctUINT32 prevPSTexInstCount;
+ gctUINT32 prevPSPixelCount;
+
+}
+gcsPROFILER;
+
+/* Memory profile information. */
+struct _gcsMemProfile
+{
+ /* Memory Usage */
+ gctUINT32 videoMemUsed;
+ gctUINT32 systemMemUsed;
+ gctUINT32 commitBufferSize;
+ gctUINT32 contextBufferCopyBytes;
+};
+
+/* Shader profile information. */
+struct _gcsSHADER_PROFILER
+{
+ gctUINT32 shaderLength;
+ gctUINT32 shaderALUCycles;
+ gctUINT32 shaderTexLoadCycles;
+ gctUINT32 shaderTempRegCount;
+ gctUINT32 shaderSamplerRegCount;
+ gctUINT32 shaderInputRegCount;
+ gctUINT32 shaderOutputRegCount;
+};
+
+/* Initialize the gcsProfiler. */
+gceSTATUS
+gcoPROFILER_Initialize(
+ IN gcoHAL Hal
+ );
+
+/* Destroy the gcProfiler. */
+gceSTATUS
+gcoPROFILER_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Write data to profiler. */
+gceSTATUS
+gcoPROFILER_Write(
+ IN gcoHAL Hal,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Flush data out. */
+gceSTATUS
+gcoPROFILER_Flush(
+ IN gcoHAL Hal
+ );
+
+/* Call to signal end of frame. */
+gceSTATUS
+gcoPROFILER_EndFrame(
+ IN gcoHAL Hal
+ );
+
+/* Increase profile counter Enum by Value. */
+gceSTATUS
+gcoPROFILER_Count(
+ IN gcoHAL Hal,
+ IN gctUINT32 Enum,
+ IN gctINT Value
+ );
+
+/* Profile input vertex shader. */
+gceSTATUS
+gcoPROFILER_ShaderVS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Vs
+ );
+
+/* Profile input fragment shader. */
+gceSTATUS
+gcoPROFILER_ShaderFS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Fs
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_profiler_h_ */
diff --git a/src/include_imx6/gc_hal_raster.h b/src/include_imx6/gc_hal_raster.h
new file mode 100644
index 0000000..c303462
--- /dev/null
+++ b/src/include_imx6/gc_hal_raster.h
@@ -0,0 +1,933 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_raster_h_
+#define __gc_hal_raster_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoBRUSH * gcoBRUSH;
+typedef struct _gcoBRUSH_CACHE * gcoBRUSH_CACHE;
+
+/******************************************************************************\
+******************************** gcoBRUSH Object *******************************
+\******************************************************************************/
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructSingleColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructMonochrome(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Destroy an gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_Destroy(
+ IN gcoBRUSH Brush
+ );
+
+/******************************************************************************\
+******************************** gcoSURF Object *******************************
+\******************************************************************************/
+
+/* Set cipping rectangle. */
+gceSTATUS
+gcoSURF_SetClipping(
+ IN gcoSURF Surface
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gcoSURF_Clear2D(
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 LoColor,
+ IN gctUINT32 HiColor
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gcoSURF_Line(
+ IN gcoSURF Surface,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop
+ );
+
+/* Generic rectangular blit. */
+gceSTATUS
+gcoSURF_Blit(
+ IN OPTIONAL gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN OPTIONAL gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN OPTIONAL gceSURF_TRANSPARENCY Transparency,
+ IN OPTIONAL gctUINT32 TransparencyColor,
+ IN OPTIONAL gctPOINTER Mask,
+ IN OPTIONAL gceSURF_MONOPACK MaskPack
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gcoSURF_MonoBlit(
+ IN gcoSURF DestSurface,
+ IN gctPOINTER Source,
+ IN gceSURF_MONOPACK SourcePack,
+ IN gcsPOINT_PTR SourceSize,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Filter blit. */
+gceSTATUS
+gcoSURF_FilterBlit(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gcoSURF_EnableAlphaBlend(
+ IN gcoSURF Surface,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gcoSURF_DisableAlphaBlend(
+ IN gcoSURF Surface
+ );
+
+/* Copy a rectangular area with format conversion. */
+gceSTATUS
+gcoSURF_CopyPixels(
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctINT SourceX,
+ IN gctINT SourceY,
+ IN gctINT TargetX,
+ IN gctINT TargetY,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+/* Read surface pixel. */
+gceSTATUS
+gcoSURF_ReadPixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ OUT gctPOINTER PixelValue
+ );
+
+/* Write surface pixel. */
+gceSTATUS
+gcoSURF_WritePixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ IN gctPOINTER PixelValue
+ );
+
+gceSTATUS
+gcoSURF_SetDither(
+ IN gcoSURF Surface,
+ IN gctBOOL Dither
+ );
+/******************************************************************************\
+********************************** gco2D Object *********************************
+\******************************************************************************/
+
+/* Construct a new gco2D object. */
+gceSTATUS
+gco2D_Construct(
+ IN gcoHAL Hal,
+ OUT gco2D * Hardware
+ );
+
+/* Destroy an gco2D object. */
+gceSTATUS
+gco2D_Destroy(
+ IN gco2D Hardware
+ );
+
+/* Sets the maximum number of brushes in the brush cache. */
+gceSTATUS
+gco2D_SetBrushLimit(
+ IN gco2D Hardware,
+ IN gctUINT MaxCount
+ );
+
+/* Flush the brush. */
+gceSTATUS
+gco2D_FlushBrush(
+ IN gco2D Engine,
+ IN gcoBRUSH Brush,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Program the specified solid color brush. */
+gceSTATUS
+gco2D_LoadSolidBrush(
+ IN gco2D Engine,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask
+ );
+
+gceSTATUS
+gco2D_LoadMonochromeBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask
+ );
+
+gceSTATUS
+gco2D_LoadColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask
+ );
+
+/* Configure monochrome source. */
+gceSTATUS
+gco2D_SetMonochromeSource(
+ IN gco2D Engine,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_MONOPACK DataPack,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source extension for full rotation. */
+gceSTATUS
+gco2D_SetColorSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSourceAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative
+ );
+
+gceSTATUS
+gco2D_SetColorSourceN(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctUINT32 SurfaceNumber
+ );
+
+/* Configure masked color source. */
+gceSTATUS
+gco2D_SetMaskedSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack
+ );
+
+/* Configure masked color source extension for full rotation. */
+gceSTATUS
+gco2D_SetMaskedSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Setup the source rectangle. */
+gceSTATUS
+gco2D_SetSource(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect
+ );
+
+/* Set clipping rectangle. */
+gceSTATUS
+gco2D_SetClipping(
+ IN gco2D Engine,
+ IN gcsRECT_PTR Rect
+ );
+
+/* Configure destination. */
+gceSTATUS
+gco2D_SetTarget(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth
+ );
+
+/* Configure destination extension for full rotation. */
+gceSTATUS
+gco2D_SetTargetEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Calculate and program the stretch factors. */
+gceSTATUS
+gco2D_SetStretchFactors(
+ IN gco2D Engine,
+ IN gctUINT32 HorFactor,
+ IN gctUINT32 VerFactor
+ );
+
+/* Calculate and program the stretch factors based on the rectangles. */
+gceSTATUS
+gco2D_SetStretchRectFactors(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect
+ );
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructSingleColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructMonochromeBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gco2D_Clear(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gco2D_Line(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines based on the 32-bit color. */
+gceSTATUS
+gco2D_ColorLine(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Generic blit. */
+gceSTATUS
+gco2D_Blit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+gceSTATUS
+gco2D_Blend(
+ IN gco2D Engine,
+ IN gctUINT32 SrcCount,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Batch blit. */
+gceSTATUS
+gco2D_BatchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Stretch blit. */
+gceSTATUS
+gco2D_StretchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gco2D_MonoBlit(
+ IN gco2D Engine,
+ IN gctPOINTER StreamBits,
+ IN gcsPOINT_PTR StreamSize,
+ IN gcsRECT_PTR StreamRect,
+ IN gceSURF_MONOPACK SrcStreamPack,
+ IN gceSURF_MONOPACK DestStreamPack,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 FgRop,
+ IN gctUINT32 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Set kernel size. */
+gceSTATUS
+gco2D_SetKernelSize(
+ IN gco2D Engine,
+ IN gctUINT8 HorKernelSize,
+ IN gctUINT8 VerKernelSize
+ );
+
+/* Set filter type. */
+gceSTATUS
+gco2D_SetFilterType(
+ IN gco2D Engine,
+ IN gceFILTER_TYPE FilterType
+ );
+
+/* Set the filter kernel by user. */
+gceSTATUS
+gco2D_SetUserFilterKernel(
+ IN gco2D Engine,
+ IN gceFILTER_PASS_TYPE PassType,
+ IN gctUINT16_PTR KernelArray
+ );
+
+/* Select the pass(es) to be done for user defined filter. */
+gceSTATUS
+gco2D_EnableUserFilterPasses(
+ IN gco2D Engine,
+ IN gctBOOL HorPass,
+ IN gctBOOL VerPass
+ );
+
+/* Frees the temporary buffer allocated by filter blit operation. */
+gceSTATUS
+gco2D_FreeFilterBuffer(
+ IN gco2D Engine
+ );
+
+/* Filter blit. */
+gceSTATUS
+gco2D_FilterBlit(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Filter blit extension for full rotation. */
+gceSTATUS
+gco2D_FilterBlitEx(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gctUINT32 SrcSurfaceHeight,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gctUINT32 DestSurfaceHeight,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+gceSTATUS
+gco2D_FilterBlitEx2(
+ IN gco2D Engine,
+ IN gctUINT32_PTR SrcAddresses,
+ IN gctUINT32 SrcAddressNum,
+ IN gctUINT32_PTR SrcStrides,
+ IN gctUINT32 SrcStrideNum,
+ IN gceTILING SrcTiling,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gctUINT32 SrcSurfaceHeight,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32_PTR DestAddresses,
+ IN gctUINT32 DestAddressNum,
+ IN gctUINT32_PTR DestStrides,
+ IN gctUINT32 DestStrideNum,
+ IN gceTILING DestTiling,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gctUINT32 DestSurfaceHeight,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gco2D_EnableAlphaBlend(
+ IN gco2D Engine,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Enable alpha blending engine in the hardware. */
+gceSTATUS
+gco2D_EnableAlphaBlendAdvanced(
+ IN gco2D Engine,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode
+ );
+
+/* Enable alpha blending engine with Porter Duff rule. */
+gceSTATUS
+gco2D_SetPorterDuffBlending(
+ IN gco2D Engine,
+ IN gce2D_PORTER_DUFF_RULE Rule
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gco2D_DisableAlphaBlend(
+ IN gco2D Engine
+ );
+
+/* Retrieve the maximum number of 32-bit data chunks for a single DE command. */
+gctUINT32
+gco2D_GetMaximumDataCount(
+ void
+ );
+
+/* Retrieve the maximum number of rectangles, that can be passed in a single DE command. */
+gctUINT32
+gco2D_GetMaximumRectCount(
+ void
+ );
+
+/* Returns the pixel alignment of the surface. */
+gceSTATUS
+gco2D_GetPixelAlignment(
+ gceSURF_FORMAT Format,
+ gcsPOINT_PTR Alignment
+ );
+
+/* Retrieve monochrome stream pack size. */
+gceSTATUS
+gco2D_GetPackSize(
+ IN gceSURF_MONOPACK StreamPack,
+ OUT gctUINT32 * PackWidth,
+ OUT gctUINT32 * PackHeight
+ );
+
+/* Flush the 2D pipeline. */
+gceSTATUS
+gco2D_Flush(
+ IN gco2D Engine
+ );
+
+/* Load 256-entry color table for INDEX8 source surfaces. */
+gceSTATUS
+gco2D_LoadPalette(
+ IN gco2D Engine,
+ IN gctUINT FirstIndex,
+ IN gctUINT IndexCount,
+ IN gctPOINTER ColorTable,
+ IN gctBOOL ColorConvert
+ );
+
+/* Enable/disable 2D BitBlt mirrorring. */
+gceSTATUS
+gco2D_SetBitBlitMirror(
+ IN gco2D Engine,
+ IN gctBOOL HorizontalMirror,
+ IN gctBOOL VerticalMirror
+ );
+
+/*
+ * Set the transparency for source, destination and pattern.
+ * It also enable or disable the DFB color key mode.
+ */
+gceSTATUS
+gco2D_SetTransparencyAdvancedEx(
+ IN gco2D Engine,
+ IN gce2D_TRANSPARENCY SrcTransparency,
+ IN gce2D_TRANSPARENCY DstTransparency,
+ IN gce2D_TRANSPARENCY PatTransparency,
+ IN gctBOOL EnableDFBColorKeyMode
+ );
+
+/* Set the transparency for source, destination and pattern. */
+gceSTATUS
+gco2D_SetTransparencyAdvanced(
+ IN gco2D Engine,
+ IN gce2D_TRANSPARENCY SrcTransparency,
+ IN gce2D_TRANSPARENCY DstTransparency,
+ IN gce2D_TRANSPARENCY PatTransparency
+ );
+
+/* Set the source color key. */
+gceSTATUS
+gco2D_SetSourceColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the source color key range. */
+gceSTATUS
+gco2D_SetSourceColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the target color key. */
+gceSTATUS
+gco2D_SetTargetColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the target color key range. */
+gceSTATUS
+gco2D_SetTargetColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the YUV color space mode. */
+gceSTATUS
+gco2D_SetYUVColorMode(
+ IN gco2D Engine,
+ IN gce2D_YUV_COLOR_MODE Mode
+ );
+
+/* Setup the source global color value in ARGB8 format. */
+gceSTATUS gco2D_SetSourceGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the target global color value in ARGB8 format. */
+gceSTATUS gco2D_SetTargetGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the source and target pixel multiply modes. */
+gceSTATUS
+gco2D_SetPixelMultiplyModeAdvanced(
+ IN gco2D Engine,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE SrcPremultiplySrcAlpha,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstPremultiplyDstAlpha,
+ IN gce2D_GLOBAL_COLOR_MULTIPLY_MODE SrcPremultiplyGlobalMode,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstDemultiplyDstAlpha
+ );
+
+/* Set the GPU clock cycles after which the idle engine will keep auto-flushing. */
+gceSTATUS
+gco2D_SetAutoFlushCycles(
+ IN gco2D Engine,
+ IN gctUINT32 Cycles
+ );
+
+#if VIVANTE_PROFILER
+/* Read the profile registers available in the 2D engine and sets them in the profile.
+ The function will also reset the pixelsRendered counter every time.
+*/
+gceSTATUS
+gco2D_ProfileEngine(
+ IN gco2D Engine,
+ OPTIONAL gcs2D_PROFILE_PTR Profile
+ );
+#endif
+
+/* Enable or disable 2D dithering. */
+gceSTATUS
+gco2D_EnableDither(
+ IN gco2D Engine,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gco2D_SetGenericSource(
+ IN gco2D Engine,
+ IN gctUINT32_PTR Addresses,
+ IN gctUINT32 AddressNum,
+ IN gctUINT32_PTR Strides,
+ IN gctUINT32 StrideNum,
+ IN gceTILING Tiling,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+);
+
+gceSTATUS
+gco2D_SetGenericTarget(
+ IN gco2D Engine,
+ IN gctUINT32_PTR Addresses,
+ IN gctUINT32 AddressNum,
+ IN gctUINT32_PTR Strides,
+ IN gctUINT32 StrideNum,
+ IN gceTILING Tiling,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+);
+
+gceSTATUS
+gco2D_SetCurrentSourceIndex(
+ IN gco2D Engine,
+ IN gctUINT32 SrcIndex
+ );
+
+gceSTATUS
+gco2D_MultiSourceBlit(
+ IN gco2D Engine,
+ IN gctUINT32 SourceMask,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 RectCount
+ );
+
+gceSTATUS
+gco2D_SetROP(
+ IN gco2D Engine,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop
+ );
+
+gceSTATUS
+gco2D_SetGdiStretchMode(
+ IN gco2D Engine,
+ IN gctBOOL Enable
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_raster_h_ */
diff --git a/src/include_imx6/gc_hal_rename.h b/src/include_imx6/gc_hal_rename.h
new file mode 100644
index 0000000..ed6718d
--- /dev/null
+++ b/src/include_imx6/gc_hal_rename.h
@@ -0,0 +1,250 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_rename_h_
+#define __gc_hal_rename_h_
+
+
+#if defined(_HAL2D_APPENDIX)
+
+#define _HAL2D_RENAME_2(api, appendix) api ## appendix
+#define _HAL2D_RENAME_1(api, appendix) _HAL2D_RENAME_2(api, appendix)
+#define gcmHAL2D(api) _HAL2D_RENAME_1(api, _HAL2D_APPENDIX)
+
+
+#define gckOS_Construct gcmHAL2D(gckOS_Construct)
+#define gckOS_Destroy gcmHAL2D(gckOS_Destroy)
+#define gckOS_QueryVideoMemory gcmHAL2D(gckOS_QueryVideoMemory)
+#define gckOS_Allocate gcmHAL2D(gckOS_Allocate)
+#define gckOS_Free gcmHAL2D(gckOS_Free)
+#define gckOS_AllocateMemory gcmHAL2D(gckOS_AllocateMemory)
+#define gckOS_FreeMemory gcmHAL2D(gckOS_FreeMemory)
+#define gckOS_AllocatePagedMemory gcmHAL2D(gckOS_AllocatePagedMemory)
+#define gckOS_AllocatePagedMemoryEx gcmHAL2D(gckOS_AllocatePagedMemoryEx)
+#define gckOS_LockPages gcmHAL2D(gckOS_LockPages)
+#define gckOS_MapPages gcmHAL2D(gckOS_MapPages)
+#define gckOS_UnlockPages gcmHAL2D(gckOS_UnlockPages)
+#define gckOS_FreePagedMemory gcmHAL2D(gckOS_FreePagedMemory)
+#define gckOS_AllocateNonPagedMemory gcmHAL2D(gckOS_AllocateNonPagedMemory)
+#define gckOS_FreeNonPagedMemory gcmHAL2D(gckOS_FreeNonPagedMemory)
+#define gckOS_AllocateContiguous gcmHAL2D(gckOS_AllocateContiguous)
+#define gckOS_FreeContiguous gcmHAL2D(gckOS_FreeContiguous)
+#define gckOS_GetPageSize gcmHAL2D(gckOS_GetPageSize)
+#define gckOS_GetPhysicalAddress gcmHAL2D(gckOS_GetPhysicalAddress)
+#define gckOS_GetPhysicalAddressProcess gcmHAL2D(gckOS_GetPhysicalAddressProcess)
+#define gckOS_MapPhysical gcmHAL2D(gckOS_MapPhysical)
+#define gckOS_UnmapPhysical gcmHAL2D(gckOS_UnmapPhysical)
+#define gckOS_ReadRegister gcmHAL2D(gckOS_ReadRegister)
+#define gckOS_WriteRegister gcmHAL2D(gckOS_WriteRegister)
+#define gckOS_WriteMemory gcmHAL2D(gckOS_WriteMemory)
+#define gckOS_MapMemory gcmHAL2D(gckOS_MapMemory)
+#define gckOS_UnmapMemory gcmHAL2D(gckOS_UnmapMemory)
+#define gckOS_UnmapMemoryEx gcmHAL2D(gckOS_UnmapMemoryEx)
+#define gckOS_CreateMutex gcmHAL2D(gckOS_CreateMutex)
+#define gckOS_DeleteMutex gcmHAL2D(gckOS_DeleteMutex)
+#define gckOS_AcquireMutex gcmHAL2D(gckOS_AcquireMutex)
+#define gckOS_ReleaseMutex gcmHAL2D(gckOS_ReleaseMutex)
+#define gckOS_AtomicExchange gcmHAL2D(gckOS_AtomicExchange)
+#define gckOS_AtomicExchangePtr gcmHAL2D(gckOS_AtomicExchangePtr)
+#define gckOS_AtomConstruct gcmHAL2D(gckOS_AtomConstruct)
+#define gckOS_AtomDestroy gcmHAL2D(gckOS_AtomDestroy)
+#define gckOS_AtomGet gcmHAL2D(gckOS_AtomGet)
+#define gckOS_AtomIncrement gcmHAL2D(gckOS_AtomIncrement)
+#define gckOS_AtomDecrement gcmHAL2D(gckOS_AtomDecrement)
+#define gckOS_Delay gcmHAL2D(gckOS_Delay)
+#define gckOS_GetTime gcmHAL2D(gckOS_GetTime)
+#define gckOS_MemoryBarrier gcmHAL2D(gckOS_MemoryBarrier)
+#define gckOS_MapUserPointer gcmHAL2D(gckOS_MapUserPointer)
+#define gckOS_UnmapUserPointer gcmHAL2D(gckOS_UnmapUserPointer)
+#define gckOS_QueryNeedCopy gcmHAL2D(gckOS_QueryNeedCopy)
+#define gckOS_CopyFromUserData gcmHAL2D(gckOS_CopyFromUserData)
+#define gckOS_CopyToUserData gcmHAL2D(gckOS_CopyToUserData)
+#define gckOS_MapUserPhysical gcmHAL2D(gckOS_MapUserPhysical)
+#define gckOS_SuspendInterrupt gcmHAL2D(gckOS_SuspendInterrupt)
+#define gckOS_ResumeInterrupt gcmHAL2D(gckOS_ResumeInterrupt)
+#define gckOS_GetBaseAddress gcmHAL2D(gckOS_GetBaseAddress)
+#define gckOS_MemCopy gcmHAL2D(gckOS_MemCopy)
+#define gckOS_ZeroMemory gcmHAL2D(gckOS_ZeroMemory)
+#define gckOS_DeviceControl gcmHAL2D(gckOS_DeviceControl)
+#define gckOS_GetProcessID gcmHAL2D(gckOS_GetProcessID)
+#define gckOS_GetThreadID gcmHAL2D(gckOS_GetThreadID)
+#define gckOS_CreateSignal gcmHAL2D(gckOS_CreateSignal)
+#define gckOS_DestroySignal gcmHAL2D(gckOS_DestroySignal)
+#define gckOS_Signal gcmHAL2D(gckOS_Signal)
+#define gckOS_WaitSignal gcmHAL2D(gckOS_WaitSignal)
+#define gckOS_MapSignal gcmHAL2D(gckOS_MapSignal)
+#define gckOS_MapUserMemory gcmHAL2D(gckOS_MapUserMemory)
+#define gckOS_UnmapUserMemory gcmHAL2D(gckOS_UnmapUserMemory)
+#define gckOS_CreateUserSignal gcmHAL2D(gckOS_CreateUserSignal)
+#define gckOS_DestroyUserSignal gcmHAL2D(gckOS_DestroyUserSignal)
+#define gckOS_WaitUserSignal gcmHAL2D(gckOS_WaitUserSignal)
+#define gckOS_SignalUserSignal gcmHAL2D(gckOS_SignalUserSignal)
+#define gckOS_UserSignal gcmHAL2D(gckOS_UserSignal)
+#define gckOS_UserSignal gcmHAL2D(gckOS_UserSignal)
+#define gckOS_CacheClean gcmHAL2D(gckOS_CacheClean)
+#define gckOS_CacheFlush gcmHAL2D(gckOS_CacheFlush)
+#define gckOS_SetDebugLevel gcmHAL2D(gckOS_SetDebugLevel)
+#define gckOS_SetDebugZone gcmHAL2D(gckOS_SetDebugZone)
+#define gckOS_SetDebugLevelZone gcmHAL2D(gckOS_SetDebugLevelZone)
+#define gckOS_SetDebugZones gcmHAL2D(gckOS_SetDebugZones)
+#define gckOS_SetDebugFile gcmHAL2D(gckOS_SetDebugFile)
+#define gckOS_Broadcast gcmHAL2D(gckOS_Broadcast)
+#define gckOS_SetGPUPower gcmHAL2D(gckOS_SetGPUPower)
+#define gckOS_CreateSemaphore gcmHAL2D(gckOS_CreateSemaphore)
+#define gckOS_DestroySemaphore gcmHAL2D(gckOS_DestroySemaphore)
+#define gckOS_AcquireSemaphore gcmHAL2D(gckOS_AcquireSemaphore)
+#define gckOS_ReleaseSemaphore gcmHAL2D(gckOS_ReleaseSemaphore)
+#define gckHEAP_Construct gcmHAL2D(gckHEAP_Construct)
+#define gckHEAP_Destroy gcmHAL2D(gckHEAP_Destroy)
+#define gckHEAP_Allocate gcmHAL2D(gckHEAP_Allocate)
+#define gckHEAP_Free gcmHAL2D(gckHEAP_Free)
+#define gckHEAP_ProfileStart gcmHAL2D(gckHEAP_ProfileStart)
+#define gckHEAP_ProfileEnd gcmHAL2D(gckHEAP_ProfileEnd)
+#define gckHEAP_Test gcmHAL2D(gckHEAP_Test)
+#define gckVIDMEM_Construct gcmHAL2D(gckVIDMEM_Construct)
+#define gckVIDMEM_Destroy gcmHAL2D(gckVIDMEM_Destroy)
+#define gckVIDMEM_Allocate gcmHAL2D(gckVIDMEM_Allocate)
+#define gckVIDMEM_AllocateLinear gcmHAL2D(gckVIDMEM_AllocateLinear)
+#define gckVIDMEM_Free gcmHAL2D(gckVIDMEM_Free)
+#define gckVIDMEM_Lock gcmHAL2D(gckVIDMEM_Lock)
+#define gckVIDMEM_Unlock gcmHAL2D(gckVIDMEM_Unlock)
+#define gckVIDMEM_ConstructVirtual gcmHAL2D(gckVIDMEM_ConstructVirtual)
+#define gckVIDMEM_DestroyVirtual gcmHAL2D(gckVIDMEM_DestroyVirtual)
+#define gckKERNEL_Construct gcmHAL2D(gckKERNEL_Construct)
+#define gckKERNEL_Destroy gcmHAL2D(gckKERNEL_Destroy)
+#define gckKERNEL_Dispatch gcmHAL2D(gckKERNEL_Dispatch)
+#define gckKERNEL_QueryVideoMemory gcmHAL2D(gckKERNEL_QueryVideoMemory)
+#define gckKERNEL_GetVideoMemoryPool gcmHAL2D(gckKERNEL_GetVideoMemoryPool)
+#define gckKERNEL_MapVideoMemory gcmHAL2D(gckKERNEL_MapVideoMemory)
+#define gckKERNEL_UnmapVideoMemory gcmHAL2D(gckKERNEL_UnmapVideoMemory)
+#define gckKERNEL_MapMemory gcmHAL2D(gckKERNEL_MapMemory)
+#define gckKERNEL_UnmapMemory gcmHAL2D(gckKERNEL_UnmapMemory)
+#define gckKERNEL_Notify gcmHAL2D(gckKERNEL_Notify)
+#define gckKERNEL_QuerySettings gcmHAL2D(gckKERNEL_QuerySettings)
+#define gckKERNEL_Recovery gcmHAL2D(gckKERNEL_Recovery)
+#define gckKERNEL_OpenUserData gcmHAL2D(gckKERNEL_OpenUserData)
+#define gckKERNEL_CloseUserData gcmHAL2D(gckKERNEL_CloseUserData)
+#define gckHARDWARE_Construct gcmHAL2D(gckHARDWARE_Construct)
+#define gckHARDWARE_Destroy gcmHAL2D(gckHARDWARE_Destroy)
+#define gckHARDWARE_QuerySystemMemory gcmHAL2D(gckHARDWARE_QuerySystemMemory)
+#define gckHARDWARE_BuildVirtualAddress gcmHAL2D(gckHARDWARE_BuildVirtualAddress)
+#define gckHARDWARE_QueryCommandBuffer gcmHAL2D(gckHARDWARE_QueryCommandBuffer)
+#define gckHARDWARE_WaitLink gcmHAL2D(gckHARDWARE_WaitLink)
+#define gckHARDWARE_Execute gcmHAL2D(gckHARDWARE_Execute)
+#define gckHARDWARE_End gcmHAL2D(gckHARDWARE_End)
+#define gckHARDWARE_Nop gcmHAL2D(gckHARDWARE_Nop)
+#define gckHARDWARE_Wait gcmHAL2D(gckHARDWARE_Wait)
+#define gckHARDWARE_PipeSelect gcmHAL2D(gckHARDWARE_PipeSelect)
+#define gckHARDWARE_Link gcmHAL2D(gckHARDWARE_Link)
+#define gckHARDWARE_Event gcmHAL2D(gckHARDWARE_Event)
+#define gckHARDWARE_QueryMemory gcmHAL2D(gckHARDWARE_QueryMemory)
+#define gckHARDWARE_QueryChipIdentity gcmHAL2D(gckHARDWARE_QueryChipIdentity)
+#define gckHARDWARE_QueryChipSpecs gcmHAL2D(gckHARDWARE_QueryChipSpecs)
+#define gckHARDWARE_QueryShaderCaps gcmHAL2D(gckHARDWARE_QueryShaderCaps)
+#define gckHARDWARE_ConvertFormat gcmHAL2D(gckHARDWARE_ConvertFormat)
+#define gckHARDWARE_SplitMemory gcmHAL2D(gckHARDWARE_SplitMemory)
+#define gckHARDWARE_AlignToTile gcmHAL2D(gckHARDWARE_AlignToTile)
+#define gckHARDWARE_UpdateQueueTail gcmHAL2D(gckHARDWARE_UpdateQueueTail)
+#define gckHARDWARE_ConvertLogical gcmHAL2D(gckHARDWARE_ConvertLogical)
+#define gckHARDWARE_ConvertPhysical gcmHAL2D(gckHARDWARE_ConvertPhysical)
+#define gckHARDWARE_Interrupt gcmHAL2D(gckHARDWARE_Interrupt)
+#define gckHARDWARE_SetMMU gcmHAL2D(gckHARDWARE_SetMMU)
+#define gckHARDWARE_FlushMMU gcmHAL2D(gckHARDWARE_FlushMMU)
+#define gckHARDWARE_GetIdle gcmHAL2D(gckHARDWARE_GetIdle)
+#define gckHARDWARE_Flush gcmHAL2D(gckHARDWARE_Flush)
+#define gckHARDWARE_SetFastClear gcmHAL2D(gckHARDWARE_SetFastClear)
+#define gckHARDWARE_ReadInterrupt gcmHAL2D(gckHARDWARE_ReadInterrupt)
+#define gckHARDWARE_SetPowerManagementState gcmHAL2D(gckHARDWARE_SetPowerManagementState)
+#define gckHARDWARE_QueryPowerManagementState gcmHAL2D(gckHARDWARE_QueryPowerManagementState)
+#define gckHARDWARE_ProfileEngine2D gcmHAL2D(gckHARDWARE_ProfileEngine2D)
+#define gckHARDWARE_InitializeHardware gcmHAL2D(gckHARDWARE_InitializeHardware)
+#define gckHARDWARE_Reset gcmHAL2D(gckHARDWARE_Reset)
+#define gckINTERRUPT_Construct gcmHAL2D(gckINTERRUPT_Construct)
+#define gckINTERRUPT_Destroy gcmHAL2D(gckINTERRUPT_Destroy)
+#define gckINTERRUPT_SetHandler gcmHAL2D(gckINTERRUPT_SetHandler)
+#define gckINTERRUPT_Notify gcmHAL2D(gckINTERRUPT_Notify)
+#define gckEVENT_Construct gcmHAL2D(gckEVENT_Construct)
+#define gckEVENT_Destroy gcmHAL2D(gckEVENT_Destroy)
+#define gckEVENT_AddList gcmHAL2D(gckEVENT_AddList)
+#define gckEVENT_FreeNonPagedMemory gcmHAL2D(gckEVENT_FreeNonPagedMemory)
+#define gckEVENT_FreeContiguousMemory gcmHAL2D(gckEVENT_FreeContiguousMemory)
+#define gckEVENT_FreeVideoMemory gcmHAL2D(gckEVENT_FreeVideoMemory)
+#define gckEVENT_Signal gcmHAL2D(gckEVENT_Signal)
+#define gckEVENT_Unlock gcmHAL2D(gckEVENT_Unlock)
+#define gckEVENT_Submit gcmHAL2D(gckEVENT_Submit)
+#define gckEVENT_Commit gcmHAL2D(gckEVENT_Commit)
+#define gckEVENT_Notify gcmHAL2D(gckEVENT_Notify)
+#define gckEVENT_Interrupt gcmHAL2D(gckEVENT_Interrupt)
+#define gckCOMMAND_Construct gcmHAL2D(gckCOMMAND_Construct)
+#define gckCOMMAND_Destroy gcmHAL2D(gckCOMMAND_Destroy)
+#define gckCOMMAND_EnterCommit gcmHAL2D(gckCOMMAND_EnterCommit)
+#define gckCOMMAND_ExitCommit gcmHAL2D(gckCOMMAND_ExitCommit)
+#define gckCOMMAND_Start gcmHAL2D(gckCOMMAND_Start)
+#define gckCOMMAND_Stop gcmHAL2D(gckCOMMAND_Stop)
+#define gckCOMMAND_Commit gcmHAL2D(gckCOMMAND_Commit)
+#define gckCOMMAND_Reserve gcmHAL2D(gckCOMMAND_Reserve)
+#define gckCOMMAND_Execute gcmHAL2D(gckCOMMAND_Execute)
+#define gckCOMMAND_Stall gcmHAL2D(gckCOMMAND_Stall)
+#define gckCOMMAND_Attach gcmHAL2D(gckCOMMAND_Attach)
+#define gckCOMMAND_Detach gcmHAL2D(gckCOMMAND_Detach)
+#define gckMMU_Construct gcmHAL2D(gckMMU_Construct)
+#define gckMMU_Destroy gcmHAL2D(gckMMU_Destroy)
+#define gckMMU_AllocatePages gcmHAL2D(gckMMU_AllocatePages)
+#define gckMMU_FreePages gcmHAL2D(gckMMU_FreePages)
+#define gckMMU_InsertNode gcmHAL2D(gckMMU_InsertNode)
+#define gckMMU_RemoveNode gcmHAL2D(gckMMU_RemoveNode)
+#define gckMMU_FreeHandleMemory gcmHAL2D(gckMMU_FreeHandleMemory)
+#define gckMMU_Test gcmHAL2D(gckMMU_Test)
+#define gckHARDWARE_QueryProfileRegisters gcmHAL2D(gckHARDWARE_QueryProfileRegisters)
+
+
+#define FindMdlMap gcmHAL2D(FindMdlMap)
+#define OnProcessExit gcmHAL2D(OnProcessExit)
+
+#define gckGALDEVICE_Destroy gcmHAL2D(gckGALDEVICE_Destroy)
+#define gckOS_Print gcmHAL2D(gckOS_Print)
+#define gckGALDEVICE_FreeMemory gcmHAL2D(gckGALDEVICE_FreeMemory)
+#define gckGALDEVICE_AllocateMemory gcmHAL2D(gckGALDEVICE_AllocateMemory)
+#define gckOS_DebugBreak gcmHAL2D(gckOS_DebugBreak)
+#define gckGALDEVICE_Release_ISR gcmHAL2D(gckGALDEVICE_Release_ISR)
+#define gckOS_Verify gcmHAL2D(gckOS_Verify)
+#define gckCOMMAND_Release gcmHAL2D(gckCOMMAND_Release)
+#define gckGALDEVICE_Stop gcmHAL2D(gckGALDEVICE_Stop)
+#define gckGALDEVICE_Construct gcmHAL2D(gckGALDEVICE_Construct)
+#define gckOS_DebugFatal gcmHAL2D(gckOS_DebugFatal)
+#define gckOS_DebugTrace gcmHAL2D(gckOS_DebugTrace)
+#define gckHARDWARE_GetBaseAddress gcmHAL2D(gckHARDWARE_GetBaseAddress)
+#define gckGALDEVICE_Setup_ISR gcmHAL2D(gckGALDEVICE_Setup_ISR)
+#define gckKERNEL_AttachProcess gcmHAL2D(gckKERNEL_AttachProcess)
+#define gckKERNEL_AttachProcessEx gcmHAL2D(gckKERNEL_AttachProcessEx)
+#define gckGALDEVICE_Start_Thread gcmHAL2D(gckGALDEVICE_Start_Thread)
+#define gckHARDWARE_QueryIdle gcmHAL2D(gckHARDWARE_QueryIdle)
+#define gckGALDEVICE_Start gcmHAL2D(gckGALDEVICE_Start)
+#define gckOS_GetKernelLogical gcmHAL2D(gckOS_GetKernelLogical)
+#define gckOS_DebugTraceZone gcmHAL2D(gckOS_DebugTraceZone)
+#define gckGALDEVICE_Stop_Thread gcmHAL2D(gckGALDEVICE_Stop_Thread)
+#define gckHARDWARE_NeedBaseAddress gcmHAL2D(gckHARDWARE_NeedBaseAddress)
+
+#endif
+
+#endif /* __gc_hal_rename_h_ */
diff --git a/src/include_imx6/gc_hal_types.h b/src/include_imx6/gc_hal_types.h
new file mode 100644
index 0000000..e6d38c1
--- /dev/null
+++ b/src/include_imx6/gc_hal_types.h
@@ -0,0 +1,970 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_types_h_
+#define __gc_hal_types_h_
+
+#include "gc_hal_version.h"
+#include "gc_hal_options.h"
+
+#ifdef _WIN32
+#pragma warning(disable:4127) /* Conditional expression is constant (do { }
+ ** while(0)). */
+#pragma warning(disable:4100) /* Unreferenced formal parameter. */
+#pragma warning(disable:4204) /* Non-constant aggregate initializer (C99). */
+#pragma warning(disable:4131) /* Uses old-style declarator (for Bison and
+ ** Flex generated files). */
+#pragma warning(disable:4206) /* Translation unit is empty. */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+** Platform macros.
+*/
+
+#if defined(__GNUC__)
+# define gcdHAS_ELLIPSES 1 /* GCC always has it. */
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+# define gcdHAS_ELLIPSES 1 /* C99 has it. */
+#elif defined(_MSC_VER) && (_MSC_VER >= 1500)
+# define gcdHAS_ELLIPSES 1 /* MSVC 2007+ has it. */
+#elif defined(UNDER_CE)
+#if UNDER_CE >= 600
+# define gcdHAS_ELLIPSES 1
+# else
+# define gcdHAS_ELLIPSES 0
+# endif
+#else
+# error "gcdHAS_ELLIPSES: Platform could not be determined"
+#endif
+
+/******************************************************************************\
+************************************ Keyword ***********************************
+\******************************************************************************/
+
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
+# define gcmINLINE inline /* C99 keyword. */
+#elif defined(__GNUC__)
+# define gcmINLINE __inline__ /* GNU keyword. */
+#elif defined(_MSC_VER) || defined(UNDER_CE)
+# define gcmINLINE __inline /* Internal keyword. */
+#else
+# error "gcmINLINE: Platform could not be determined"
+#endif
+
+/* Possible debug flags. */
+#define gcdDEBUG_NONE 0
+#define gcdDEBUG_ALL (1 << 0)
+#define gcdDEBUG_FATAL (1 << 1)
+#define gcdDEBUG_TRACE (1 << 2)
+#define gcdDEBUG_BREAK (1 << 3)
+#define gcdDEBUG_ASSERT (1 << 4)
+#define gcdDEBUG_CODE (1 << 5)
+#define gcdDEBUG_STACK (1 << 6)
+
+#define gcmIS_DEBUG(flag) ( gcdDEBUG & (flag | gcdDEBUG_ALL) )
+
+#ifndef gcdDEBUG
+#if (defined(DBG) && DBG) || defined(DEBUG) || defined(_DEBUG)
+# define gcdDEBUG gcdDEBUG_ALL
+# else
+# define gcdDEBUG gcdDEBUG_NONE
+# endif
+#endif
+
+#ifdef _USRDLL
+#ifdef _MSC_VER
+#ifdef HAL_EXPORTS
+# define HALAPI __declspec(dllexport)
+# else
+# define HALAPI __declspec(dllimport)
+# endif
+# define HALDECL __cdecl
+# else
+#ifdef HAL_EXPORTS
+# define HALAPI
+# else
+# define HALAPI extern
+# endif
+# endif
+#else
+# define HALAPI
+# define HALDECL
+#endif
+
+/******************************************************************************\
+********************************** Common Types ********************************
+\******************************************************************************/
+
+#define gcvFALSE 0
+#define gcvTRUE 1
+
+#define gcvINFINITE ((gctUINT32) ~0U)
+
+#define gcvINVALID_HANDLE ((gctHANDLE) ~0U)
+
+typedef int gctBOOL;
+typedef gctBOOL * gctBOOL_PTR;
+
+typedef int gctINT;
+typedef signed char gctINT8;
+typedef signed short gctINT16;
+typedef signed int gctINT32;
+typedef signed long long gctINT64;
+
+typedef gctINT * gctINT_PTR;
+typedef gctINT8 * gctINT8_PTR;
+typedef gctINT16 * gctINT16_PTR;
+typedef gctINT32 * gctINT32_PTR;
+typedef gctINT64 * gctINT64_PTR;
+
+typedef unsigned int gctUINT;
+typedef unsigned char gctUINT8;
+typedef unsigned short gctUINT16;
+typedef unsigned int gctUINT32;
+typedef unsigned long long gctUINT64;
+
+typedef gctUINT * gctUINT_PTR;
+typedef gctUINT8 * gctUINT8_PTR;
+typedef gctUINT16 * gctUINT16_PTR;
+typedef gctUINT32 * gctUINT32_PTR;
+typedef gctUINT64 * gctUINT64_PTR;
+
+typedef unsigned long gctSIZE_T;
+typedef gctSIZE_T * gctSIZE_T_PTR;
+
+#ifdef __cplusplus
+# define gcvNULL 0
+#else
+# define gcvNULL ((void *) 0)
+#endif
+
+typedef float gctFLOAT;
+typedef signed int gctFIXED_POINT;
+typedef float * gctFLOAT_PTR;
+
+typedef void * gctPHYS_ADDR;
+typedef void * gctHANDLE;
+typedef void * gctFILE;
+typedef void * gctSIGNAL;
+typedef void * gctWINDOW;
+typedef void * gctIMAGE;
+
+typedef void * gctSEMAPHORE;
+
+typedef void * gctPOINTER;
+typedef const void * gctCONST_POINTER;
+
+typedef char gctCHAR;
+typedef char * gctSTRING;
+typedef const char * gctCONST_STRING;
+
+typedef struct _gcsCOUNT_STRING
+{
+ gctSIZE_T Length;
+ gctCONST_STRING String;
+}
+gcsCOUNT_STRING;
+
+typedef union _gcuFLOAT_UINT32
+{
+ gctFLOAT f;
+ gctUINT32 u;
+}
+gcuFLOAT_UINT32;
+
+/* Fixed point constants. */
+#define gcvZERO_X ((gctFIXED_POINT) 0x00000000)
+#define gcvHALF_X ((gctFIXED_POINT) 0x00008000)
+#define gcvONE_X ((gctFIXED_POINT) 0x00010000)
+#define gcvNEGONE_X ((gctFIXED_POINT) 0xFFFF0000)
+#define gcvTWO_X ((gctFIXED_POINT) 0x00020000)
+
+/* Stringizing macro. */
+#define gcmSTRING(Value) #Value
+
+/******************************************************************************\
+******************************* Fixed Point Math *******************************
+\******************************************************************************/
+
+#define gcmXMultiply(x1, x2) gcoMATH_MultiplyFixed(x1, x2)
+#define gcmXDivide(x1, x2) gcoMATH_DivideFixed(x1, x2)
+#define gcmXMultiplyDivide(x1, x2, x3) gcoMATH_MultiplyDivideFixed(x1, x2, x3)
+
+/* 2D Engine profile. */
+typedef struct _gcs2D_PROFILE
+{
+ /* Cycle count.
+ 32bit counter incremented every 2D clock cycle.
+ Wraps back to 0 when the counter overflows.
+ */
+ gctUINT32 cycleCount;
+
+ /* Pixels rendered by the 2D engine.
+ Resets to 0 every time it is read. */
+ gctUINT32 pixelsRendered;
+}
+gcs2D_PROFILE;
+
+/* Macro to combine four characters into a Charcater Code. */
+#define gcmCC(c1, c2, c3, c4) \
+( \
+ (char) (c1) \
+ | \
+ ((char) (c2) << 8) \
+ | \
+ ((char) (c3) << 16) \
+ | \
+ ((char) (c4) << 24) \
+)
+
+#define gcmPRINTABLE(c) ((((c) >= ' ') && ((c) <= '}')) ? ((c) != '%' ? (c) : ' ') : ' ')
+
+#define gcmCC_PRINT(cc) \
+ gcmPRINTABLE((char) ( (cc) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 8) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 16) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 24) & 0xFF))
+
+/******************************************************************************\
+****************************** Function Parameters *****************************
+\******************************************************************************/
+
+#define IN
+#define OUT
+#define OPTIONAL
+
+/******************************************************************************\
+********************************* Status Codes *********************************
+\******************************************************************************/
+
+typedef enum _gceSTATUS
+{
+ gcvSTATUS_OK = 0,
+ gcvSTATUS_FALSE = 0,
+ gcvSTATUS_TRUE = 1,
+ gcvSTATUS_NO_MORE_DATA = 2,
+ gcvSTATUS_CACHED = 3,
+ gcvSTATUS_MIPMAP_TOO_LARGE = 4,
+ gcvSTATUS_NAME_NOT_FOUND = 5,
+ gcvSTATUS_NOT_OUR_INTERRUPT = 6,
+ gcvSTATUS_MISMATCH = 7,
+ gcvSTATUS_MIPMAP_TOO_SMALL = 8,
+ gcvSTATUS_LARGER = 9,
+ gcvSTATUS_SMALLER = 10,
+ gcvSTATUS_CHIP_NOT_READY = 11,
+ gcvSTATUS_NEED_CONVERSION = 12,
+ gcvSTATUS_SKIP = 13,
+ gcvSTATUS_DATA_TOO_LARGE = 14,
+ gcvSTATUS_INVALID_CONFIG = 15,
+ gcvSTATUS_CHANGED = 16,
+ gcvSTATUS_NOT_SUPPORT_DITHER = 17,
+ gcvSTATUS_EXECUTED = 18,
+ gcvSTATUS_TERMINATE = 19,
+
+ gcvSTATUS_INVALID_ARGUMENT = -1,
+ gcvSTATUS_INVALID_OBJECT = -2,
+ gcvSTATUS_OUT_OF_MEMORY = -3,
+ gcvSTATUS_MEMORY_LOCKED = -4,
+ gcvSTATUS_MEMORY_UNLOCKED = -5,
+ gcvSTATUS_HEAP_CORRUPTED = -6,
+ gcvSTATUS_GENERIC_IO = -7,
+ gcvSTATUS_INVALID_ADDRESS = -8,
+ gcvSTATUS_CONTEXT_LOSSED = -9,
+ gcvSTATUS_TOO_COMPLEX = -10,
+ gcvSTATUS_BUFFER_TOO_SMALL = -11,
+ gcvSTATUS_INTERFACE_ERROR = -12,
+ gcvSTATUS_NOT_SUPPORTED = -13,
+ gcvSTATUS_MORE_DATA = -14,
+ gcvSTATUS_TIMEOUT = -15,
+ gcvSTATUS_OUT_OF_RESOURCES = -16,
+ gcvSTATUS_INVALID_DATA = -17,
+ gcvSTATUS_INVALID_MIPMAP = -18,
+ gcvSTATUS_NOT_FOUND = -19,
+ gcvSTATUS_NOT_ALIGNED = -20,
+ gcvSTATUS_INVALID_REQUEST = -21,
+ gcvSTATUS_GPU_NOT_RESPONDING = -22,
+ gcvSTATUS_TIMER_OVERFLOW = -23,
+ gcvSTATUS_VERSION_MISMATCH = -24,
+ gcvSTATUS_LOCKED = -25,
+ gcvSTATUS_INTERRUPTED = -26,
+ gcvSTATUS_DEVICE = -27,
+
+ /* Linker errors. */
+ gcvSTATUS_GLOBAL_TYPE_MISMATCH = -1000,
+ gcvSTATUS_TOO_MANY_ATTRIBUTES = -1001,
+ gcvSTATUS_TOO_MANY_UNIFORMS = -1002,
+ gcvSTATUS_TOO_MANY_VARYINGS = -1003,
+ gcvSTATUS_UNDECLARED_VARYING = -1004,
+ gcvSTATUS_VARYING_TYPE_MISMATCH = -1005,
+ gcvSTATUS_MISSING_MAIN = -1006,
+ gcvSTATUS_NAME_MISMATCH = -1007,
+ gcvSTATUS_INVALID_INDEX = -1008,
+ gcvSTATUS_UNIFORM_TYPE_MISMATCH = -1009,
+}
+gceSTATUS;
+
+/******************************************************************************\
+********************************* Status Macros ********************************
+\******************************************************************************/
+
+#define gcmIS_ERROR(status) (status < 0)
+#define gcmNO_ERROR(status) (status >= 0)
+#define gcmIS_SUCCESS(status) (status == gcvSTATUS_OK)
+
+/******************************************************************************\
+********************************* Field Macros *********************************
+\******************************************************************************/
+
+#define __gcmSTART(reg_field) \
+ (0 ? reg_field)
+
+#define __gcmEND(reg_field) \
+ (1 ? reg_field)
+
+#define __gcmGETSIZE(reg_field) \
+ (__gcmEND(reg_field) - __gcmSTART(reg_field) + 1)
+
+#define __gcmALIGN(data, reg_field) \
+ (((gctUINT32) (data)) << __gcmSTART(reg_field))
+
+#define __gcmMASK(reg_field) \
+ ((gctUINT32) ((__gcmGETSIZE(reg_field) == 32) \
+ ? ~0 \
+ : (~(~0 << __gcmGETSIZE(reg_field)))))
+
+/*******************************************************************************
+**
+** gcmFIELDMASK
+**
+** Get aligned field mask.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmFIELDMASK(reg, field) \
+( \
+ __gcmALIGN(__gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmGETFIELD
+**
+** Extract the value of a field from specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmGETFIELD(data, reg, field) \
+( \
+ ((((gctUINT32) (data)) >> __gcmSTART(reg##_##field)) \
+ & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELD
+**
+** Set the value of a field within specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETFIELD(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN((gctUINT32) (value) \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELDVALUE
+**
+** Set the value of a field within specified data with a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmSETFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN(reg##_##field##_##value \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmGETMASKEDFIELDMASK
+**
+** Determine field mask of a masked field.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmGETMASKEDFIELDMASK(reg, field) \
+( \
+ gcmSETFIELD(0, reg, field, ~0) | \
+ gcmSETFIELD(0, reg, MASK_ ## field, ~0) \
+)
+
+/*******************************************************************************
+**
+** gcmSETMASKEDFIELD
+**
+** Set the value of a masked field with specified data.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETMASKEDFIELD(reg, field, value) \
+( \
+ gcmSETFIELD (~0, reg, field, value) & \
+ gcmSETFIELDVALUE(~0, reg, MASK_ ## field, ENABLED) \
+)
+
+/*******************************************************************************
+**
+** gcmSETMASKEDFIELDVALUE
+**
+** Set the value of a masked field with specified data.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETMASKEDFIELDVALUE(reg, field, value) \
+( \
+ gcmSETFIELDVALUE(~0, reg, field, value) & \
+ gcmSETFIELDVALUE(~0, reg, MASK_ ## field, ENABLED) \
+)
+
+/*******************************************************************************
+**
+** gcmVERIFYFIELDVALUE
+**
+** Verify if the value of a field within specified data equals a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmVERIFYFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) >> __gcmSTART(reg##_##field) & \
+ __gcmMASK(reg##_##field)) \
+ == \
+ (reg##_##field##_##value & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+** Bit field macros.
+*/
+
+#define __gcmSTARTBIT(Field) \
+ ( 1 ? Field )
+
+#define __gcmBITSIZE(Field) \
+ ( 0 ? Field )
+
+#define __gcmBITMASK(Field) \
+( \
+ (1 << __gcmBITSIZE(Field)) - 1 \
+)
+
+#define gcmGETBITS(Value, Type, Field) \
+( \
+ ( ((Type) (Value)) >> __gcmSTARTBIT(Field) ) \
+ & \
+ __gcmBITMASK(Field) \
+)
+
+#define gcmSETBITS(Value, Type, Field, NewValue) \
+( \
+ ( ((Type) (Value)) \
+ & ~(__gcmBITMASK(Field) << __gcmSTARTBIT(Field)) \
+ ) \
+ | \
+ ( ( ((Type) (NewValue)) \
+ & __gcmBITMASK(Field) \
+ ) << __gcmSTARTBIT(Field) \
+ ) \
+)
+
+/*******************************************************************************
+**
+** gcmISINREGRANGE
+**
+** Verify whether the specified address is in the register range.
+**
+** ARGUMENTS:
+**
+** Address Address to be verified.
+** Name Name of a register.
+*/
+
+#define gcmISINREGRANGE(Address, Name) \
+( \
+ ((Address & (~0U << Name ## _LSB)) == (Name ## _Address >> 2)) \
+)
+
+/*******************************************************************************
+**
+** A set of macros to aid state loading.
+**
+** ARGUMENTS:
+**
+** CommandBuffer Pointer to a gcoCMDBUF object.
+** StateDelta Pointer to a gcsSTATE_DELTA state delta structure.
+** Memory Destination memory pointer of gctUINT32_PTR type.
+** PartOfContext Whether or not the state is a part of the context.
+** FixedPoint Whether or not the state is of the fixed point format.
+** Count Number of consecutive states to be loaded.
+** Address State address.
+** Data Data to be set to the state.
+*/
+
+/*----------------------------------------------------------------------------*/
+
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+
+# define gcmSTORELOADSTATE(CommandBuffer, Memory, Address, Count) \
+ CommandBuffer->lastLoadStatePtr = Memory; \
+ CommandBuffer->lastLoadStateAddress = Address; \
+ CommandBuffer->lastLoadStateCount = Count
+
+# define gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address) \
+ gcmASSERT( \
+ (gctUINT) (Memory - CommandBuffer->lastLoadStatePtr - 1) \
+ == \
+ (gctUINT) (Address - CommandBuffer->lastLoadStateAddress) \
+ ); \
+ \
+ gcmASSERT(CommandBuffer->lastLoadStateCount > 0); \
+ \
+ CommandBuffer->lastLoadStateCount -= 1
+
+# define gcmVERIFYLOADSTATEDONE(CommandBuffer) \
+ gcmASSERT(CommandBuffer->lastLoadStateCount == 0)
+
+#else
+
+# define gcmSTORELOADSTATE(CommandBuffer, Memory, Address, Count)
+# define gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address)
+# define gcmVERIFYLOADSTATEDONE(CommandBuffer)
+
+#endif
+
+#if gcdSECURE_USER
+
+# define gcmDEFINESECUREUSER() \
+ gctUINT __secure_user_offset__; \
+ gctUINT32_PTR __secure_user_hintArray__;
+
+# define gcmBEGINSECUREUSER() \
+ __secure_user_offset__ = reserve->lastOffset; \
+ \
+ __secure_user_hintArray__ = reserve->hintArrayTail
+
+# define gcmENDSECUREUSER() \
+ reserve->hintArrayTail = __secure_user_hintArray__
+
+# define gcmSKIPSECUREUSER() \
+ __secure_user_offset__ += gcmSIZEOF(gctUINT32)
+
+# define gcmUPDATESECUREUSER() \
+ *__secure_user_hintArray__ = __secure_user_offset__; \
+ \
+ __secure_user_offset__ += gcmSIZEOF(gctUINT32); \
+ __secure_user_hintArray__ += 1
+
+#else
+
+# define gcmDEFINESECUREUSER()
+# define gcmBEGINSECUREUSER()
+# define gcmENDSECUREUSER()
+# define gcmSKIPSECUREUSER()
+# define gcmUPDATESECUREUSER()
+
+#endif
+
+/*----------------------------------------------------------------------------*/
+
+#if gcdDUMP
+# define gcmDUMPSTATEDATA(StateDelta, FixedPoint, Address, Data) \
+ if (FixedPoint) \
+ { \
+ gcmDUMP(gcvNULL, "@[state.x 0x%04X 0x%08X]", \
+ Address, Data \
+ ); \
+ } \
+ else \
+ { \
+ gcmDUMP(gcvNULL, "@[state 0x%04X 0x%08X]", \
+ Address, Data \
+ ); \
+ }
+#else
+# define gcmDUMPSTATEDATA(StateDelta, FixedPoint, Address, Data)
+#endif
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmDEFINESTATEBUFFER(CommandBuffer, StateDelta, Memory, ReserveSize) \
+ gcmDEFINESECUREUSER() \
+ gctSIZE_T ReserveSize; \
+ gcoCMDBUF CommandBuffer; \
+ gctUINT32_PTR Memory; \
+ gcsSTATE_DELTA_PTR StateDelta
+
+#define gcmBEGINSTATEBUFFER(Hardware, CommandBuffer, StateDelta, Memory, ReserveSize) \
+{ \
+ gcmONERROR(gcoBUFFER_Reserve( \
+ Hardware->buffer, ReserveSize, gcvTRUE, &CommandBuffer \
+ )); \
+ \
+ Memory = (gctUINT32_PTR) CommandBuffer->lastReserve; \
+ \
+ StateDelta = Hardware->delta; \
+ \
+ gcmBEGINSECUREUSER(); \
+}
+
+#define gcmENDSTATEBUFFER(CommandBuffer, Memory, ReserveSize) \
+{ \
+ gcmENDSECUREUSER(); \
+ \
+ gcmASSERT( \
+ ((gctUINT8_PTR) CommandBuffer->lastReserve) + ReserveSize \
+ == \
+ (gctUINT8_PTR) Memory \
+ ); \
+}
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmBEGINSTATEBATCH(CommandBuffer, Memory, FixedPoint, Address, Count) \
+{ \
+ gcmASSERT(((Memory - (gctUINT32_PTR) CommandBuffer->lastReserve) & 1) == 0); \
+ \
+ gcmVERIFYLOADSTATEDONE(CommandBuffer); \
+ \
+ gcmSTORELOADSTATE(CommandBuffer, Memory, Address, Count); \
+ \
+ *Memory++ \
+ = gcmSETFIELDVALUE(0, AQ_COMMAND_LOAD_STATE_COMMAND, OPCODE, LOAD_STATE) \
+ | gcmSETFIELD (0, AQ_COMMAND_LOAD_STATE_COMMAND, FLOAT, FixedPoint) \
+ | gcmSETFIELD (0, AQ_COMMAND_LOAD_STATE_COMMAND, COUNT, Count) \
+ | gcmSETFIELD (0, AQ_COMMAND_LOAD_STATE_COMMAND, ADDRESS, Address); \
+ \
+ gcmSKIPSECUREUSER(); \
+}
+
+#define gcmENDSTATEBATCH(CommandBuffer, Memory) \
+{ \
+ gcmVERIFYLOADSTATEDONE(CommandBuffer); \
+ \
+ gcmASSERT(((Memory - (gctUINT32_PTR) CommandBuffer->lastReserve) & 1) == 0); \
+}
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmSETSTATEDATA(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data) \
+{ \
+ gctUINT32 __temp_data32__; \
+ \
+ gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address); \
+ \
+ __temp_data32__ = Data; \
+ \
+ *Memory++ = __temp_data32__; \
+ \
+ gcoHARDWARE_UpdateDelta( \
+ StateDelta, FixedPoint, Address, 0, __temp_data32__ \
+ ); \
+ \
+ gcmDUMPSTATEDATA(StateDelta, FixedPoint, Address, __temp_data32__); \
+ \
+ gcmUPDATESECUREUSER(); \
+}
+
+#define gcmSETCTRLSTATE(StateDelta, CommandBuffer, Memory, Address, Data) \
+{ \
+ gctUINT32 __temp_data32__; \
+ \
+ gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address); \
+ \
+ __temp_data32__ = Data; \
+ \
+ *Memory++ = __temp_data32__; \
+ \
+ gcmDUMPSTATEDATA(StateDelta, gcvFALSE, Address, __temp_data32__); \
+ \
+ gcmSKIPSECUREUSER(); \
+}
+
+#define gcmSETFILLER(CommandBuffer, Memory) \
+{ \
+ gcmVERIFYLOADSTATEDONE(CommandBuffer); \
+ \
+ Memory += 1; \
+ \
+ gcmSKIPSECUREUSER(); \
+}
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmSETSINGLESTATE(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data) \
+{ \
+ gcmBEGINSTATEBATCH(CommandBuffer, Memory, FixedPoint, Address, 1); \
+ gcmSETSTATEDATA(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data); \
+ gcmENDSTATEBATCH(CommandBuffer, Memory); \
+}
+
+#define gcmSETSINGLECTRLSTATE(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data) \
+{ \
+ gcmBEGINSTATEBATCH(CommandBuffer, Memory, FixedPoint, Address, 1); \
+ gcmSETCTRLSTATE(StateDelta, CommandBuffer, Memory, Address, Data); \
+ gcmENDSTATEBATCH(CommandBuffer, Memory); \
+}
+
+
+/*******************************************************************************
+**
+** gcmSETSTARTDECOMMAND
+**
+** Form a START_DE command.
+**
+** ARGUMENTS:
+**
+** Memory Destination memory pointer of gctUINT32_PTR type.
+** Count Number of the rectangles.
+*/
+
+#define gcmSETSTARTDECOMMAND(Memory, Count) \
+{ \
+ *Memory++ \
+ = gcmSETFIELDVALUE(0, AQ_COMMAND_START_DE_COMMAND, OPCODE, START_DE) \
+ | gcmSETFIELD (0, AQ_COMMAND_START_DE_COMMAND, COUNT, Count) \
+ | gcmSETFIELD (0, AQ_COMMAND_START_DE_COMMAND, DATA_COUNT, 0); \
+ \
+ *Memory++ = 0xDEADDEED; \
+}
+
+/******************************************************************************\
+******************************** Ceiling Macro ********************************
+\******************************************************************************/
+#define gcmCEIL(x) ((x - (gctUINT32)x) == 0 ? (gctUINT32)x : (gctUINT32)x + 1)
+
+/******************************************************************************\
+******************************** Min/Max Macros ********************************
+\******************************************************************************/
+
+#define gcmMIN(x, y) (((x) <= (y)) ? (x) : (y))
+#define gcmMAX(x, y) (((x) >= (y)) ? (x) : (y))
+#define gcmCLAMP(x, min, max) (((x) < (min)) ? (min) : \
+ ((x) > (max)) ? (max) : (x))
+#define gcmABS(x) (((x) < 0) ? -(x) : (x))
+#define gcmNEG(x) (((x) < 0) ? (x) : -(x))
+
+/*******************************************************************************
+**
+** gcmPTR2INT
+**
+** Convert a pointer to an integer value.
+**
+** ARGUMENTS:
+**
+** p Pointer value.
+*/
+#if defined(_WIN32) || (defined(__LP64__) && __LP64__)
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (gctUINT64) (p) \
+ )
+#else
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (p) \
+ )
+#endif
+
+/*******************************************************************************
+**
+** gcmINT2PTR
+**
+** Convert an integer value into a pointer.
+**
+** ARGUMENTS:
+**
+** v Integer value.
+*/
+#ifdef __LP64__
+# define gcmINT2PTR(i) \
+ ( \
+ (gctPOINTER) (gctINT64) (i) \
+ )
+#else
+# define gcmINT2PTR(i) \
+ ( \
+ (gctPOINTER) (i) \
+ )
+#endif
+
+/*******************************************************************************
+**
+** gcmOFFSETOF
+**
+** Compute the byte offset of a field inside a structure.
+**
+** ARGUMENTS:
+**
+** s Structure name.
+** field Field name.
+*/
+#define gcmOFFSETOF(s, field) \
+( \
+ gcmPTR2INT(& (((struct s *) 0)->field)) \
+)
+
+/*******************************************************************************
+***** Database ****************************************************************/
+
+typedef struct _gcsDATABASE_COUNTERS
+{
+ /* Number of currently allocated bytes. */
+ gctSIZE_T bytes;
+
+ /* Maximum number of bytes allocated (memory footprint). */
+ gctSIZE_T maxBytes;
+
+ /* Total number of bytes allocated. */
+ gctSIZE_T totalBytes;
+}
+gcsDATABASE_COUNTERS;
+
+typedef struct _gcuDATABASE_INFO
+{
+ /* Counters. */
+ gcsDATABASE_COUNTERS counters;
+
+ /* Time value. */
+ gctUINT64 time;
+}
+gcuDATABASE_INFO;
+
+/*******************************************************************************
+***** Frame database **********************************************************/
+
+/* gcsHAL_FRAME_INFO */
+typedef struct _gcsHAL_FRAME_INFO
+{
+ /* Current timer tick. */
+ OUT gctUINT64 ticks;
+
+ /* Bandwidth counters. */
+ OUT gctUINT readBytes8[8];
+ OUT gctUINT writeBytes8[8];
+
+ /* Counters. */
+ OUT gctUINT cycles[8];
+ OUT gctUINT idleCycles[8];
+ OUT gctUINT mcCycles[8];
+ OUT gctUINT readRequests[8];
+ OUT gctUINT writeRequests[8];
+
+ /* 3D counters. */
+ OUT gctUINT vertexCount;
+ OUT gctUINT primitiveCount;
+ OUT gctUINT rejectedPrimitives;
+ OUT gctUINT culledPrimitives;
+ OUT gctUINT clippedPrimitives;
+ OUT gctUINT outPrimitives;
+ OUT gctUINT inPrimitives;
+ OUT gctUINT culledQuadCount;
+ OUT gctUINT totalQuadCount;
+ OUT gctUINT quadCount;
+ OUT gctUINT totalPixelCount;
+
+ /* PE counters. */
+ OUT gctUINT colorKilled[8];
+ OUT gctUINT colorDrawn[8];
+ OUT gctUINT depthKilled[8];
+ OUT gctUINT depthDrawn[8];
+
+ /* Shader counters. */
+ OUT gctUINT shaderCycles;
+ OUT gctUINT vsInstructionCount;
+ OUT gctUINT vsTextureCount;
+ OUT gctUINT psInstructionCount;
+ OUT gctUINT psTextureCount;
+
+ /* Texture counters. */
+ OUT gctUINT bilinearRequests;
+ OUT gctUINT trilinearRequests;
+ OUT gctUINT txBytes8;
+ OUT gctUINT txHitCount;
+ OUT gctUINT txMissCount;
+}
+gcsHAL_FRAME_INFO;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_types_h_ */
diff --git a/src/include_imx6/gc_hal_version.h b/src/include_imx6/gc_hal_version.h
new file mode 100644
index 0000000..83db422
--- /dev/null
+++ b/src/include_imx6/gc_hal_version.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_version_h_
+#define __gc_hal_version_h_
+
+#define gcvVERSION_MAJOR 4
+
+#define gcvVERSION_MINOR 6
+
+#define gcvVERSION_PATCH 6
+
+#define gcvVERSION_BUILD 1381
+
+#define gcvVERSION_DATE __DATE__
+
+#define gcvVERSION_TIME __TIME__
+
+#endif /* __gc_hal_version_h_ */
diff --git a/src/include_imx6/gc_hal_vg.h b/src/include_imx6/gc_hal_vg.h
new file mode 100644
index 0000000..2060170
--- /dev/null
+++ b/src/include_imx6/gc_hal_vg.h
@@ -0,0 +1,933 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+
+
+#ifndef __gc_hal_vg_h_
+#define __gc_hal_vg_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "gc_hal_rename.h"
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+#include "gc_hal_base.h"
+
+#if gcdENABLE_VG
+
+/* Thread routine type. */
+#if defined(LINUX)
+ typedef gctINT gctTHREADFUNCRESULT;
+ typedef gctPOINTER gctTHREADFUNCPARAMETER;
+# define gctTHREADFUNCTYPE
+#elif defined(WIN32)
+ typedef gctUINT gctTHREADFUNCRESULT;
+ typedef gctPOINTER gctTHREADFUNCPARAMETER;
+# define gctTHREADFUNCTYPE __stdcall
+#elif defined(__QNXNTO__)
+ typedef void * gctTHREADFUNCRESULT;
+ typedef gctPOINTER gctTHREADFUNCPARAMETER;
+# define gctTHREADFUNCTYPE
+#endif
+
+typedef gctTHREADFUNCRESULT (gctTHREADFUNCTYPE * gctTHREADFUNC) (
+ gctTHREADFUNCPARAMETER ThreadParameter
+ );
+
+
+#if defined(gcvDEBUG)
+# undef gcvDEBUG
+#endif
+
+#define gcdFORCE_DEBUG 0
+#define gcdFORCE_MESSAGES 0
+
+
+#if DBG || defined(DEBUG) || defined(_DEBUG) || gcdFORCE_DEBUG
+# define gcvDEBUG 1
+#else
+# define gcvDEBUG 0
+#endif
+
+#define _gcmERROR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+
+#define gcmERROR_RETURN(func) _gcmERROR_RETURN(gcm, func)
+
+#define gcmLOG_LOCATION()
+
+#define gcmkIS_ERROR(status) (status < 0)
+
+#define gcmALIGNDOWN(n, align) \
+( \
+ (n) & ~((align) - 1) \
+)
+
+#define gcmIS_VALID_INDEX(Index, Array) \
+ (((gctUINT) (Index)) < gcmCOUNTOF(Array))
+
+
+#define gcmIS_NAN(x) \
+( \
+ ((* (gctUINT32_PTR) &(x)) & 0x7FFFFFFF) == 0x7FFFFFFF \
+)
+
+#define gcmLERP(v1, v2, w) \
+ ((v1) * (w) + (v2) * (1.0f - (w)))
+
+#define gcmINTERSECT(Start1, Start2, Length) \
+ (gcmABS((Start1) - (Start2)) < (Length))
+
+/*******************************************************************************
+**
+** gcmERR_GOTO
+**
+** Prints a message and terminates the current loop on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** Function
+** Function to evaluate.
+*/
+
+#define gcmERR_GOTO(Function) \
+ status = Function; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ gcmTRACE( \
+ gcvLEVEL_ERROR, \
+ "gcmERR_GOTO: status=%d @ line=%d in function %s.\n", \
+ status, __LINE__, __FUNCTION__ \
+ ); \
+ goto ErrorHandler; \
+ }
+
+#if gcvDEBUG || gcdFORCE_MESSAGES
+# define gcmVERIFY_BOOLEAN(Expression) \
+ gcmASSERT( \
+ ( (Expression) == gcvFALSE ) || \
+ ( (Expression) == gcvTRUE ) \
+ )
+#else
+# define gcmVERIFY_BOOLEAN(Expression)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFYFIELDFIT
+**
+** Verify whether the value fits in the field.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmVERIFYFIELDFIT(reg, field, value) \
+ gcmASSERT( \
+ (value) <= gcmFIELDMAX(reg, field) \
+ )
+/*******************************************************************************
+**
+** gcmFIELDMAX
+**
+** Get field maximum value.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmFIELDMAX(reg, field) \
+( \
+ (gctUINT32) \
+ ( \
+ (__gcmGETSIZE(reg##_##field) == 32) \
+ ? ~0 \
+ : (~(~0 << __gcmGETSIZE(reg##_##field))) \
+ ) \
+)
+
+
+/* ANSI C does not have the 'f' functions, define replacements here. */
+#define gcmSINF(x) ((gctFLOAT) sin(x))
+#define gcmCOSF(x) ((gctFLOAT) cos(x))
+#define gcmASINF(x) ((gctFLOAT) asin(x))
+#define gcmACOSF(x) ((gctFLOAT) acos(x))
+#define gcmSQRTF(x) ((gctFLOAT) sqrt(x))
+#define gcmFABSF(x) ((gctFLOAT) fabs(x))
+#define gcmFMODF(x, y) ((gctFLOAT) fmod((x), (y)))
+#define gcmCEILF(x) ((gctFLOAT) ceil(x))
+#define gcmFLOORF(x) ((gctFLOAT) floor(x))
+
+
+
+/* Fixed point constants. */
+#define gcvZERO_X ((gctFIXED_POINT) 0x00000000)
+#define gcvHALF_X ((gctFIXED_POINT) 0x00008000)
+#define gcvONE_X ((gctFIXED_POINT) 0x00010000)
+#define gcvNEGONE_X ((gctFIXED_POINT) 0xFFFF0000)
+#define gcvTWO_X ((gctFIXED_POINT) 0x00020000)
+
+/* Integer constants. */
+#define gcvMAX_POS_INT ((gctINT) 0x7FFFFFFF)
+#define gcvMAX_NEG_INT ((gctINT) 0x80000000)
+
+/* Float constants. */
+#define gcvMAX_POS_FLOAT ((gctFLOAT) 3.4028235e+038)
+#define gcvMAX_NEG_FLOAT ((gctFLOAT) -3.4028235e+038)
+
+/******************************************************************************\
+***************************** Miscellaneous Macro ******************************
+\******************************************************************************/
+
+#define gcmKB2BYTES(Kilobyte) \
+( \
+ (Kilobyte) << 10 \
+)
+
+#define gcmMB2BYTES(Megabyte) \
+( \
+ (Megabyte) << 20 \
+)
+
+#define gcmMAT(Matrix, Row, Column) \
+( \
+ (Matrix) [(Row) * 3 + (Column)] \
+)
+
+#define gcmMAKE2CHAR(Char1, Char2) \
+( \
+ ((gctUINT16) (gctUINT8) (Char1) << 0) | \
+ ((gctUINT16) (gctUINT8) (Char2) << 8) \
+)
+
+#define gcmMAKE4CHAR(Char1, Char2, Char3, Char4) \
+( \
+ ((gctUINT32)(gctUINT8) (Char1) << 0) | \
+ ((gctUINT32)(gctUINT8) (Char2) << 8) | \
+ ((gctUINT32)(gctUINT8) (Char3) << 16) | \
+ ((gctUINT32)(gctUINT8) (Char4) << 24) \
+)
+
+/* some platforms need to fix the physical address for HW to access*/
+#ifdef __QNXNTO__
+
+gcmINLINE static gctUINT32 _qnxFixAddress(gctUINT32 Address)
+{
+ gctUINT32 baseAddress = 0;
+
+ if (gcmIS_ERROR(gcoOS_GetBaseAddress(gcvNULL, &baseAddress)))
+ {
+ baseAddress = 0;
+ }
+
+ return Address + baseAddress;
+}
+
+#define gcmFIXADDRESS _qnxFixAddress
+
+gcmINLINE static gctUINT32 _qnxkFixAddress(gctUINT32 Address)
+{
+ extern unsigned long baseAddress;
+ return Address + baseAddress;
+}
+
+#define gcmkFIXADDRESS _qnxkFixAddress
+
+#else
+
+#define gcmFIXADDRESS(address) \
+(\
+ (address)\
+)
+
+#define gcmkFIXADDRESS(address) \
+(\
+ (address)\
+)
+
+#endif
+
+/******************************************************************************\
+****************************** Kernel Debug Macro ******************************
+\******************************************************************************/
+
+/* Set signal to signaled state for specified process. */
+gceSTATUS
+gckOS_SetSignal(
+ IN gckOS Os,
+ IN gctHANDLE Process,
+ IN gctSIGNAL Signal
+ );
+
+/* Return the kernel logical pointer for the given physical one. */
+gceSTATUS
+gckOS_GetKernelLogical(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Return the kernel logical pointer for the given physical one. */
+gceSTATUS
+gckOS_GetKernelLogicalEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT32 Address,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----------------------------- Semaphore Object -----------------------------*/
+
+/* Increment the value of a semaphore. */
+gceSTATUS
+gckOS_IncrementSemaphore(
+ IN gckOS Os,
+ IN gctSEMAPHORE Semaphore
+ );
+
+/* Decrement the value of a semaphore (waiting might occur). */
+gceSTATUS
+gckOS_DecrementSemaphore(
+ IN gckOS Os,
+ IN gctSEMAPHORE Semaphore
+ );
+
+
+/*----------------------------------------------------------------------------*/
+/*------------------------------- Thread Object ------------------------------*/
+
+/* Start a thread. */
+gceSTATUS
+gckOS_StartThread(
+ IN gckOS Os,
+ IN gctTHREADFUNC ThreadFunction,
+ IN gctPOINTER ThreadParameter,
+ OUT gctTHREAD * Thread
+ );
+
+/* Stop a thread. */
+gceSTATUS
+gckOS_StopThread(
+ IN gckOS Os,
+ IN gctTHREAD Thread
+ );
+
+/* Verify whether the thread is still running. */
+gceSTATUS
+gckOS_VerifyThread(
+ IN gckOS Os,
+ IN gctTHREAD Thread
+ );
+
+
+/* Construct a new gckVGKERNEL object. */
+gceSTATUS
+gckVGKERNEL_Construct(
+ IN gckOS Os,
+ IN gctPOINTER Context,
+ IN gckKERNEL inKernel,
+ OUT gckVGKERNEL * Kernel
+ );
+
+/* Destroy an gckVGKERNEL object. */
+gceSTATUS
+gckVGKERNEL_Destroy(
+ IN gckVGKERNEL Kernel
+ );
+
+/* Allocate linear video memory. */
+gceSTATUS
+gckKERNEL_AllocateLinearMemory(
+ IN gckKERNEL Kernel,
+ IN OUT gcePOOL * Pool,
+ IN gctSIZE_T Bytes,
+ IN gctSIZE_T Alignment,
+ IN gceSURF_TYPE Type,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Unmap memory. */
+gceSTATUS
+gckKERNEL_UnmapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Dispatch a user-level command. */
+gceSTATUS
+gckVGKERNEL_Dispatch(
+ IN gckKERNEL Kernel,
+ IN gctBOOL FromUser,
+ IN OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Query command buffer requirements. */
+gceSTATUS
+gckKERNEL_QueryCommandBuffer(
+ IN gckKERNEL Kernel,
+ OUT gcsCOMMAND_BUFFER_INFO_PTR Information
+ );
+
+#if gcdDYNAMIC_MAP_RESERVED_MEMORY
+gceSTATUS
+gckOS_MapReservedMemoryToKernel(
+ IN gckOS Os,
+ IN gctUINT32 Physical,
+ IN gctINT Bytes,
+ IN OUT gctPOINTER *Virtual
+ );
+
+gceSTATUS
+gckOS_UnmapReservedMemoryFromKernel(
+ IN gctPOINTER Virtual
+ );
+#endif
+
+/******************************************************************************\
+******************************* gckVGHARDWARE Object ******************************
+\******************************************************************************/
+
+/* Construct a new gckVGHARDWARE object. */
+gceSTATUS
+gckVGHARDWARE_Construct(
+ IN gckOS Os,
+ OUT gckVGHARDWARE * Hardware
+ );
+
+/* Destroy an gckVGHARDWARE object. */
+gceSTATUS
+gckVGHARDWARE_Destroy(
+ IN gckVGHARDWARE Hardware
+ );
+
+/* Query system memory requirements. */
+gceSTATUS
+gckVGHARDWARE_QuerySystemMemory(
+ IN gckVGHARDWARE Hardware,
+ OUT gctSIZE_T * SystemSize,
+ OUT gctUINT32 * SystemBaseAddress
+ );
+
+/* Build virtual address. */
+gceSTATUS
+gckVGHARDWARE_BuildVirtualAddress(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Index,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Kickstart the command processor. */
+gceSTATUS
+gckVGHARDWARE_Execute(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Address,
+ IN gctSIZE_T Count
+ );
+
+/* Query the available memory. */
+gceSTATUS
+gckVGHARDWARE_QueryMemory(
+ IN gckVGHARDWARE Hardware,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctUINT32 * InternalBaseAddress,
+ OUT gctUINT32 * InternalAlignment,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctUINT32 * ExternalBaseAddress,
+ OUT gctUINT32 * ExternalAlignment,
+ OUT gctUINT32 * HorizontalTileSize,
+ OUT gctUINT32 * VerticalTileSize
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gckVGHARDWARE_QueryChipIdentity(
+ IN gckVGHARDWARE Hardware,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures,
+ OUT gctUINT32* ChipMinorFeatures1
+ );
+
+/* Convert an API format. */
+gceSTATUS
+gckVGHARDWARE_ConvertFormat(
+ IN gckVGHARDWARE Hardware,
+ IN gceSURF_FORMAT Format,
+ OUT gctUINT32 * BitsPerPixel,
+ OUT gctUINT32 * BytesPerTile
+ );
+
+/* Split a harwdare specific address into API stuff. */
+gceSTATUS
+gckVGHARDWARE_SplitMemory(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Align size to tile boundary. */
+gceSTATUS
+gckVGHARDWARE_AlignToTile(
+ IN gckVGHARDWARE Hardware,
+ IN gceSURF_TYPE Type,
+ IN OUT gctUINT32_PTR Width,
+ IN OUT gctUINT32_PTR Height
+ );
+
+/* Convert logical address to hardware specific address. */
+gceSTATUS
+gckVGHARDWARE_ConvertLogical(
+ IN gckVGHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+/* Program MMU. */
+gceSTATUS
+gckVGHARDWARE_SetMMU(
+ IN gckVGHARDWARE Hardware,
+ IN gctPOINTER Logical
+ );
+
+/* Flush the MMU. */
+gceSTATUS
+gckVGHARDWARE_FlushMMU(
+ IN gckVGHARDWARE Hardware
+ );
+
+/* Get idle register. */
+gceSTATUS
+gckVGHARDWARE_GetIdle(
+ IN gckVGHARDWARE Hardware,
+ OUT gctUINT32 * Data
+ );
+
+/* Flush the caches. */
+gceSTATUS
+gckVGHARDWARE_Flush(
+ IN gckVGHARDWARE Hardware,
+ IN gceKERNEL_FLUSH Flush,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Enable/disable fast clear. */
+gceSTATUS
+gckVGHARDWARE_SetFastClear(
+ IN gckVGHARDWARE Hardware,
+ IN gctINT Enable
+ );
+
+gceSTATUS
+gckVGHARDWARE_ReadInterrupt(
+ IN gckVGHARDWARE Hardware,
+ OUT gctUINT32_PTR IDs
+ );
+
+/* Power management. */
+gceSTATUS
+gckVGHARDWARE_SetPowerManagementState(
+ IN gckVGHARDWARE Hardware,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gckVGHARDWARE_QueryPowerManagementState(
+ IN gckVGHARDWARE Hardware,
+ OUT gceCHIPPOWERSTATE* State
+ );
+
+gceSTATUS
+gckVGHARDWARE_SetPowerOffTimeout(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Timeout
+ );
+
+gceSTATUS
+gckVGHARDWARE_QueryPowerOffTimeout(
+ IN gckVGHARDWARE Hardware,
+ OUT gctUINT32* Timeout
+ );
+
+gceSTATUS
+gckVGHARDWARE_QueryIdle(
+ IN gckVGHARDWARE Hardware,
+ OUT gctBOOL_PTR IsIdle
+ );
+/******************************************************************************\
+*************************** Command Buffer Structures **************************
+\******************************************************************************/
+
+/* Vacant command buffer marker. */
+#define gcvVACANT_BUFFER ((gcsCOMPLETION_SIGNAL_PTR) (1))
+
+/* Command buffer header. */
+typedef struct _gcsCMDBUFFER * gcsCMDBUFFER_PTR;
+typedef struct _gcsCMDBUFFER
+{
+ /* Pointer to the completion signal. */
+ gcsCOMPLETION_SIGNAL_PTR completion;
+
+ /* The user sets this to the node of the container buffer whitin which
+ this particular command buffer resides. The kernel sets this to the
+ node of the internally allocated buffer. */
+ gcuVIDMEM_NODE_PTR node;
+
+ /* Command buffer hardware address. */
+ gctUINT32 address;
+
+ /* The offset of the buffer from the beginning of the header. */
+ gctUINT32 bufferOffset;
+
+ /* Size of the area allocated for the data portion of this particular
+ command buffer (headers and tail reserves are excluded). */
+ gctSIZE_T size;
+
+ /* Offset into the buffer [0..size]; reflects exactly how much data has
+ been put into the command buffer. */
+ gctUINT offset;
+
+ /* The number of command units in the buffer for the hardware to
+ execute. */
+ gctSIZE_T dataCount;
+
+ /* MANAGED BY : user HAL (gcoBUFFER object).
+ USED BY : user HAL (gcoBUFFER object).
+ Points to the immediate next allocated command buffer. */
+ gcsCMDBUFFER_PTR nextAllocated;
+
+ /* MANAGED BY : user layers (HAL and drivers).
+ USED BY : kernel HAL (gcoBUFFER object).
+ Points to the next subbuffer if any. A family of subbuffers are chained
+ together and are meant to be executed inseparably as a unit. Meaning
+ that context switching cannot occur while a chain of subbuffers is being
+ executed. */
+ gcsCMDBUFFER_PTR nextSubBuffer;
+}
+gcsCMDBUFFER;
+
+/* Command queue element. */
+typedef struct _gcsVGCMDQUEUE
+{
+ /* Pointer to the command buffer header. */
+ gcsCMDBUFFER_PTR commandBuffer;
+
+ /* Dynamic vs. static command buffer state. */
+ gctBOOL dynamic;
+}
+gcsVGCMDQUEUE;
+
+/* Context map entry. */
+typedef struct _gcsVGCONTEXT_MAP
+{
+ /* State index. */
+ gctUINT32 index;
+
+ /* New state value. */
+ gctUINT32 data;
+
+ /* Points to the next entry in the mod list. */
+ gcsVGCONTEXT_MAP_PTR next;
+}
+gcsVGCONTEXT_MAP;
+
+/* gcsVGCONTEXT structure that holds the current context. */
+typedef struct _gcsVGCONTEXT
+{
+ /* Context ID. */
+ gctUINT64 id;
+
+ /* State caching ebable flag. */
+ gctBOOL stateCachingEnabled;
+
+ /* Current pipe. */
+ gctUINT32 currentPipe;
+
+ /* State map/mod buffer. */
+ gctSIZE_T mapFirst;
+ gctSIZE_T mapLast;
+#ifdef __QNXNTO__
+ gctSIZE_T mapContainerSize;
+#endif
+ gcsVGCONTEXT_MAP_PTR mapContainer;
+ gcsVGCONTEXT_MAP_PTR mapPrev;
+ gcsVGCONTEXT_MAP_PTR mapCurr;
+ gcsVGCONTEXT_MAP_PTR firstPrevMap;
+ gcsVGCONTEXT_MAP_PTR firstCurrMap;
+
+ /* Main context buffer. */
+ gcsCMDBUFFER_PTR header;
+ gctUINT32_PTR buffer;
+
+ /* Completion signal. */
+ gctHANDLE process;
+ gctSIGNAL signal;
+
+#if defined(__QNXNTO__)
+ gctINT32 coid;
+ gctINT32 rcvid;
+#endif
+}
+gcsVGCONTEXT;
+
+/* User space task header. */
+typedef struct _gcsTASK * gcsTASK_PTR;
+typedef struct _gcsTASK
+{
+ /* Pointer to the next task for the same interrupt in user space. */
+ gcsTASK_PTR next;
+
+ /* Size of the task data that immediately follows the structure. */
+ gctUINT size;
+
+ /* Task data starts here. */
+ /* ... */
+}
+gcsTASK;
+
+/* User space task master table entry. */
+typedef struct _gcsTASK_MASTER_ENTRY * gcsTASK_MASTER_ENTRY_PTR;
+typedef struct _gcsTASK_MASTER_ENTRY
+{
+ /* Pointers to the head and to the tail of the task chain. */
+ gcsTASK_PTR head;
+ gcsTASK_PTR tail;
+}
+gcsTASK_MASTER_ENTRY;
+
+/* User space task master table entry. */
+typedef struct _gcsTASK_MASTER_TABLE
+{
+ /* Table with one entry per block. */
+ gcsTASK_MASTER_ENTRY table[gcvBLOCK_COUNT];
+
+ /* The total number of tasks sckeduled. */
+ gctUINT count;
+
+ /* The total size of event data in bytes. */
+ gctUINT size;
+
+#if defined(__QNXNTO__)
+ gctINT32 coid;
+ gctINT32 rcvid;
+#endif
+}
+gcsTASK_MASTER_TABLE;
+
+/******************************************************************************\
+***************************** gckVGINTERRUPT Object ******************************
+\******************************************************************************/
+
+typedef struct _gckVGINTERRUPT * gckVGINTERRUPT;
+
+typedef gceSTATUS (* gctINTERRUPT_HANDLER)(
+ IN gckVGKERNEL Kernel
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Construct(
+ IN gckVGKERNEL Kernel,
+ OUT gckVGINTERRUPT * Interrupt
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Destroy(
+ IN gckVGINTERRUPT Interrupt
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Enable(
+ IN gckVGINTERRUPT Interrupt,
+ IN OUT gctINT32_PTR Id,
+ IN gctINTERRUPT_HANDLER Handler
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Disable(
+ IN gckVGINTERRUPT Interrupt,
+ IN gctINT32 Id
+ );
+
+#ifndef __QNXNTO__
+
+gceSTATUS
+gckVGINTERRUPT_Enque(
+ IN gckVGINTERRUPT Interrupt
+ );
+
+#else
+
+gceSTATUS
+gckVGINTERRUPT_Enque(
+ IN gckVGINTERRUPT Interrupt,
+ OUT gckOS *Os,
+ OUT gctSEMAPHORE *Semaphore
+ );
+
+#endif
+
+gceSTATUS
+gckVGINTERRUPT_DumpState(
+ IN gckVGINTERRUPT Interrupt
+ );
+
+
+/******************************************************************************\
+******************************* gckVGCOMMAND Object *******************************
+\******************************************************************************/
+
+typedef struct _gckVGCOMMAND * gckVGCOMMAND;
+
+/* Construct a new gckVGCOMMAND object. */
+gceSTATUS
+gckVGCOMMAND_Construct(
+ IN gckVGKERNEL Kernel,
+ IN gctUINT TaskGranularity,
+ IN gctUINT QueueSize,
+ OUT gckVGCOMMAND * Command
+ );
+
+/* Destroy an gckVGCOMMAND object. */
+gceSTATUS
+gckVGCOMMAND_Destroy(
+ IN gckVGCOMMAND Command
+ );
+
+/* Query command buffer attributes. */
+gceSTATUS
+gckVGCOMMAND_QueryCommandBuffer(
+ IN gckVGCOMMAND Command,
+ OUT gcsCOMMAND_BUFFER_INFO_PTR Information
+ );
+
+/* Allocate a command queue. */
+gceSTATUS
+gckVGCOMMAND_Allocate(
+ IN gckVGCOMMAND Command,
+ IN gctSIZE_T Size,
+ OUT gcsCMDBUFFER_PTR * CommandBuffer,
+ OUT gctPOINTER * Data
+ );
+
+/* Release memory held by the command queue. */
+gceSTATUS
+gckVGCOMMAND_Free(
+ IN gckVGCOMMAND Command,
+ IN gcsCMDBUFFER_PTR CommandBuffer
+ );
+
+/* Schedule the command queue for execution. */
+gceSTATUS
+gckVGCOMMAND_Execute(
+ IN gckVGCOMMAND Command,
+ IN gcsCMDBUFFER_PTR CommandBuffer
+ );
+
+/* Commit a buffer to the command queue. */
+gceSTATUS
+gckVGCOMMAND_Commit(
+ IN gckVGCOMMAND Command,
+ IN gcsVGCONTEXT_PTR Context,
+ IN gcsVGCMDQUEUE_PTR Queue,
+ IN gctUINT EntryCount,
+ IN gcsTASK_MASTER_TABLE_PTR TaskTable
+ );
+
+/******************************************************************************\
+********************************* gckVGMMU Object ********************************
+\******************************************************************************/
+
+typedef struct _gckVGMMU * gckVGMMU;
+
+/* Construct a new gckVGMMU object. */
+gceSTATUS
+gckVGMMU_Construct(
+ IN gckVGKERNEL Kernel,
+ IN gctSIZE_T MmuSize,
+ OUT gckVGMMU * Mmu
+ );
+
+/* Destroy an gckVGMMU object. */
+gceSTATUS
+gckVGMMU_Destroy(
+ IN gckVGMMU Mmu
+ );
+
+/* Allocate pages inside the MMU. */
+gceSTATUS
+gckVGMMU_AllocatePages(
+ IN gckVGMMU Mmu,
+ IN gctSIZE_T PageCount,
+ OUT gctPOINTER * PageTable,
+ OUT gctUINT32 * Address
+ );
+
+/* Remove a page table from the MMU. */
+gceSTATUS
+gckVGMMU_FreePages(
+ IN gckVGMMU Mmu,
+ IN gctPOINTER PageTable,
+ IN gctSIZE_T PageCount
+ );
+
+/* Set the MMU page with info. */
+gceSTATUS
+gckVGMMU_SetPage(
+ IN gckVGMMU Mmu,
+ IN gctUINT32 PageAddress,
+ IN gctUINT32 *PageEntry
+ );
+
+#endif /* gcdENABLE_VG */
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __gc_hal_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_abi.h b/src/include_imx6_v4_0_0/gc_abi.h
new file mode 100644
index 0000000..81ffc98
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_abi.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/** Kernel ABI definition file for Etna **/
+#ifndef H_GCABI
+#define H_GCABI
+//#define GCABI_USER_SIGNAL_HAS_TYPE
+//#define GCABI_CONTEXT_HAS_PHYSICAL
+#define GCABI_HAS_MINOR_FEATURES_2
+#define GCABI_HAS_MINOR_FEATURES_3
+
+// One of these must be set:
+//#define GCABI_HAS_CONTEXT
+#define GCABI_HAS_STATE_DELTAS
+
+// Interface structure has hardware type (core id)
+#define GCABI_HAS_HARDWARE_TYPE
+
+// Chip identity has pixelPipes, instructionCount, numConstants, bufferSize
+#define GCABI_CHIPIDENTITY_EXT
+// Chip identity has varyings and layout style
+#define GCABI_CHIPIDENTITY_VARYINGS
+
+#define GCABI_UINT64_POINTERS
+
+/* IOCTL structure for userspace driver*/
+typedef struct
+{
+ unsigned long long *in_buf;
+ unsigned long long in_buf_size;
+ unsigned long long *out_buf;
+ unsigned long long out_buf_size;
+} vivante_ioctl_data_t;
+
+#include "gc_hal_base.h"
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_kernel_buffer.h"
+#include "gc_hal_types.h"
+#endif
+
diff --git a/src/include_imx6_v4_0_0/gc_hal.h b/src/include_imx6_v4_0_0/gc_hal.h
new file mode 100644
index 0000000..7077412
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal.h
@@ -0,0 +1,2573 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_h_
+#define __gc_hal_h_
+
+#include "gc_hal_rename.h"
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+#include "gc_hal_base.h"
+#include "gc_hal_profiler.h"
+#include "gc_hal_driver.h"
+#ifndef VIVANTE_NO_3D
+#include "gc_hal_statistics.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* Alignment Macros *******************************
+\******************************************************************************/
+
+#define gcmALIGN(n, align) \
+( \
+ ((n) + ((align) - 1)) & ~((align) - 1) \
+)
+
+#define gcmALIGN_BASE(n, align) \
+( \
+ ((n) & ~((align) - 1)) \
+)
+
+/******************************************************************************\
+***************************** Element Count Macro *****************************
+\******************************************************************************/
+
+#define gcmSIZEOF(a) \
+( \
+ (gctSIZE_T) (sizeof(a)) \
+)
+
+#define gcmCOUNTOF(a) \
+( \
+ sizeof(a) / sizeof(a[0]) \
+)
+
+/******************************************************************************\
+********************************* Cast Macro **********************************
+\******************************************************************************/
+#define gcmNAME_TO_PTR(na) \
+ gckKERNEL_QueryPointerFromName(kernel, gcmALL_TO_UINT32(na))
+
+#define gcmPTR_TO_NAME(ptr) \
+ gckKERNEL_AllocateNameFromPointer(kernel, ptr)
+
+#define gcmRELEASE_NAME(na) \
+ gckKERNEL_DeleteName(kernel, gcmALL_TO_UINT32(na))
+
+#ifdef __LP64__
+
+#define gcmALL_TO_UINT32(t) \
+( \
+ (gctUINT32) (gctUINTPTR_T) (t)\
+)
+
+#define gcmPTR_TO_UINT64(p) \
+( \
+ (gctUINT64) (p)\
+)
+
+#define gcmUINT64_TO_PTR(u) \
+( \
+ (gctPOINTER) (u)\
+)
+
+#else /* 32 bit */
+
+#define gcmALL_TO_UINT32(t) \
+( \
+ (gctUINT32) (t)\
+)
+
+#define gcmPTR_TO_UINT64(p) \
+( \
+ (gctUINT64) (gctUINTPTR_T) (p)\
+)
+
+#define gcmUINT64_TO_PTR(u) \
+( \
+ (gctPOINTER) (gctUINTPTR_T) (u)\
+)
+
+#endif
+
+#define gcmUINT64_TO_TYPE(u, t) \
+( \
+ (t) (gctUINTPTR_T) (u)\
+)
+
+/******************************************************************************\
+******************************** Useful Macro *********************************
+\******************************************************************************/
+
+#define gcvINVALID_ADDRESS ~0U
+
+/******************************************************************************\
+******************************** gcsOBJECT Object *******************************
+\******************************************************************************/
+
+/* Type of objects. */
+typedef enum _gceOBJECT_TYPE
+{
+ gcvOBJ_UNKNOWN = 0,
+ gcvOBJ_2D = gcmCC('2','D',' ',' '),
+ gcvOBJ_3D = gcmCC('3','D',' ',' '),
+ gcvOBJ_ATTRIBUTE = gcmCC('A','T','T','R'),
+ gcvOBJ_BRUSHCACHE = gcmCC('B','R','U','$'),
+ gcvOBJ_BRUSHNODE = gcmCC('B','R','U','n'),
+ gcvOBJ_BRUSH = gcmCC('B','R','U','o'),
+ gcvOBJ_BUFFER = gcmCC('B','U','F','R'),
+ gcvOBJ_COMMAND = gcmCC('C','M','D',' '),
+ gcvOBJ_COMMANDBUFFER = gcmCC('C','M','D','B'),
+ gcvOBJ_CONTEXT = gcmCC('C','T','X','T'),
+ gcvOBJ_DEVICE = gcmCC('D','E','V',' '),
+ gcvOBJ_DUMP = gcmCC('D','U','M','P'),
+ gcvOBJ_EVENT = gcmCC('E','V','N','T'),
+ gcvOBJ_FUNCTION = gcmCC('F','U','N','C'),
+ gcvOBJ_HAL = gcmCC('H','A','L',' '),
+ gcvOBJ_HARDWARE = gcmCC('H','A','R','D'),
+ gcvOBJ_HEAP = gcmCC('H','E','A','P'),
+ gcvOBJ_INDEX = gcmCC('I','N','D','X'),
+ gcvOBJ_INTERRUPT = gcmCC('I','N','T','R'),
+ gcvOBJ_KERNEL = gcmCC('K','E','R','N'),
+ gcvOBJ_KERNEL_FUNCTION = gcmCC('K','F','C','N'),
+ gcvOBJ_MEMORYBUFFER = gcmCC('M','E','M','B'),
+ gcvOBJ_MMU = gcmCC('M','M','U',' '),
+ gcvOBJ_OS = gcmCC('O','S',' ',' '),
+ gcvOBJ_OUTPUT = gcmCC('O','U','T','P'),
+ gcvOBJ_PAINT = gcmCC('P','N','T',' '),
+ gcvOBJ_PATH = gcmCC('P','A','T','H'),
+ gcvOBJ_QUEUE = gcmCC('Q','U','E',' '),
+ gcvOBJ_SAMPLER = gcmCC('S','A','M','P'),
+ gcvOBJ_SHADER = gcmCC('S','H','D','R'),
+ gcvOBJ_STREAM = gcmCC('S','T','R','M'),
+ gcvOBJ_SURF = gcmCC('S','U','R','F'),
+ gcvOBJ_TEXTURE = gcmCC('T','X','T','R'),
+ gcvOBJ_UNIFORM = gcmCC('U','N','I','F'),
+ gcvOBJ_VARIABLE = gcmCC('V','A','R','I'),
+ gcvOBJ_VERTEX = gcmCC('V','R','T','X'),
+ gcvOBJ_VIDMEM = gcmCC('V','M','E','M'),
+ gcvOBJ_VG = gcmCC('V','G',' ',' '),
+}
+gceOBJECT_TYPE;
+
+/* gcsOBJECT object defintinon. */
+typedef struct _gcsOBJECT
+{
+ /* Type of an object. */
+ gceOBJECT_TYPE type;
+}
+gcsOBJECT;
+
+typedef struct _gckHARDWARE * gckHARDWARE;
+
+/* CORE flags. */
+typedef enum _gceCORE
+{
+ gcvCORE_MAJOR = 0x0,
+ gcvCORE_2D = 0x1,
+ gcvCORE_VG = 0x2
+}
+gceCORE;
+
+#define gcdMAX_GPU_COUNT 3
+
+/*******************************************************************************
+**
+** gcmVERIFY_OBJECT
+**
+** Assert if an object is invalid or is not of the specified type. If the
+** object is invalid or not of the specified type, gcvSTATUS_INVALID_OBJECT
+** will be returned from the current function. In retail mode this macro
+** does nothing.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+#define _gcmVERIFY_OBJECT(prefix, obj, t) \
+ if ((obj) == gcvNULL) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: NULL"); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT((obj) != gcvNULL); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ } \
+ else if (((gcsOBJECT*) (obj))->type != t) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: %c%c%c%c", \
+ gcmCC_PRINT(((gcsOBJECT*) (obj))->type)); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT(((gcsOBJECT*)(obj))->type == t); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ }
+
+# define gcmVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcm, obj, t)
+# define gcmkVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcmk, obj, t)
+#else
+# define gcmVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+# define gcmkVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+#endif
+
+/******************************************************************************/
+/*VERIFY_OBJECT if special return expected*/
+/******************************************************************************/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_OBJECT_RETURN(prefix, obj, t, retVal) \
+ do \
+ { \
+ if ((obj) == gcvNULL) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT_RETURN failed: NULL"); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT((obj) != gcvNULL); \
+ prefix##FOOTER_ARG("retVal=%d", retVal); \
+ return retVal; \
+ } \
+ else if (((gcsOBJECT*) (obj))->type != t) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT_RETURN failed: %c%c%c%c", \
+ gcmCC_PRINT(((gcsOBJECT*) (obj))->type)); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT(((gcsOBJECT*)(obj))->type == t); \
+ prefix##FOOTER_ARG("retVal=%d", retVal); \
+ return retVal; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_OBJECT_RETURN(obj, t, retVal) \
+ _gcmVERIFY_OBJECT_RETURN(gcm, obj, t, retVal)
+# define gcmkVERIFY_OBJECT_RETURN(obj, t, retVal) \
+ _gcmVERIFY_OBJECT_RETURN(gcmk, obj, t, retVal)
+#else
+# define gcmVERIFY_OBJECT_RETURN(obj, t) do {} while (gcvFALSE)
+# define gcmVERIFY_OBJECT_RETURN(obj, t) do {} while (gcvFALSE)
+#endif
+
+/******************************************************************************\
+********************************** gckOS Object *********************************
+\******************************************************************************/
+
+/* Construct a new gckOS object. */
+gceSTATUS
+gckOS_Construct(
+ IN gctPOINTER Context,
+ OUT gckOS * Os
+ );
+
+/* Destroy an gckOS object. */
+gceSTATUS
+gckOS_Destroy(
+ IN gckOS Os
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckOS_QueryVideoMemory(
+ IN gckOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gckOS_Allocate(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gckOS_Free(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Wrapper for allocation memory.. */
+gceSTATUS
+gckOS_AllocateMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Wrapper for freeing memory. */
+gceSTATUS
+gckOS_FreeMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemoryEx(
+ IN gckOS Os,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Lock pages. */
+gceSTATUS
+gckOS_LockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Cacheable,
+ OUT gctPOINTER * Logical,
+ OUT gctSIZE_T * PageCount
+ );
+
+/* Map pages. */
+gceSTATUS
+gckOS_MapPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Logical,
+#endif
+ IN gctSIZE_T PageCount,
+ IN gctPOINTER PageTable
+ );
+
+/* Map pages. */
+gceSTATUS
+gckOS_MapPagesEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Logical,
+#endif
+ IN gctSIZE_T PageCount,
+ IN gctPOINTER PageTable
+ );
+
+/* Unlock pages. */
+gceSTATUS
+gckOS_UnlockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Free paged memory. */
+gceSTATUS
+gckOS_FreePagedMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Allocate non-paged memory. */
+gceSTATUS
+gckOS_AllocateNonPagedMemory(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non-paged memory. */
+gceSTATUS
+gckOS_FreeNonPagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gckOS_AllocateContiguous(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gckOS_FreeContiguous(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get the number fo bytes per page. */
+gceSTATUS
+gckOS_GetPageSize(
+ IN gckOS Os,
+ OUT gctSIZE_T * PageSize
+ );
+
+/* Get the physical address of a corresponding logical address. */
+gceSTATUS
+gckOS_GetPhysicalAddress(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+/* Get the physical address of a corresponding logical address. */
+gceSTATUS
+gckOS_GetPhysicalAddressProcess(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ IN gctUINT32 ProcessID,
+ OUT gctUINT32 * Address
+ );
+
+/* Map physical memory. */
+gceSTATUS
+gckOS_MapPhysical(
+ IN gckOS Os,
+ IN gctUINT32 Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap previously mapped physical memory. */
+gceSTATUS
+gckOS_UnmapPhysical(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Read data from a hardware register. */
+gceSTATUS
+gckOS_ReadRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+/* Read data from a hardware register. */
+gceSTATUS
+gckOS_ReadRegisterEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+/* Write data to a hardware register. */
+gceSTATUS
+gckOS_WriteRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Write data to a hardware register. */
+gceSTATUS
+gckOS_WriteRegisterEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Write data to a 32-bit memory location. */
+gceSTATUS
+gckOS_WriteMemory(
+ IN gckOS Os,
+ IN gctPOINTER Address,
+ IN gctUINT32 Data
+ );
+
+/* Map physical memory into the process space. */
+gceSTATUS
+gckOS_MapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap physical memory from the specified process space. */
+gceSTATUS
+gckOS_UnmapMemoryEx(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical,
+ IN gctUINT32 PID
+ );
+
+/* Unmap physical memory from the process space. */
+gceSTATUS
+gckOS_UnmapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Unmap user logical memory out of physical memory.
+ * This function is only supported in Linux currently.
+ */
+gceSTATUS
+gckOS_UnmapUserLogical(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Create a new mutex. */
+gceSTATUS
+gckOS_CreateMutex(
+ IN gckOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gckOS_DeleteMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gckOS_AcquireMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gckOS_ReleaseMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Atomically exchange a pair of 32-bit values. */
+gceSTATUS
+gckOS_AtomicExchange(
+ IN gckOS Os,
+ IN OUT gctUINT32_PTR Target,
+ IN gctUINT32 NewValue,
+ OUT gctUINT32_PTR OldValue
+ );
+
+/* Atomically exchange a pair of pointers. */
+gceSTATUS
+gckOS_AtomicExchangePtr(
+ IN gckOS Os,
+ IN OUT gctPOINTER * Target,
+ IN gctPOINTER NewValue,
+ OUT gctPOINTER * OldValue
+ );
+
+#if gcdSMP
+gceSTATUS
+gckOS_AtomSetMask(
+ IN gctPOINTER Atom,
+ IN gctUINT32 Mask
+ );
+
+gceSTATUS
+gckOS_AtomClearMask(
+ IN gctPOINTER Atom,
+ IN gctUINT32 Mask
+ );
+#endif
+
+gceSTATUS
+gckOS_DumpCallStack(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_GetProcessNameByPid(
+ IN gctINT Pid,
+ IN gctSIZE_T Length,
+ OUT gctUINT8_PTR String
+ );
+
+
+
+/*******************************************************************************
+**
+** gckOS_AtomConstruct
+**
+** Create an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** OUTPUT:
+**
+** gctPOINTER * Atom
+** Pointer to a variable receiving the constructed atom.
+*/
+gceSTATUS
+gckOS_AtomConstruct(
+ IN gckOS Os,
+ OUT gctPOINTER * Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDestroy
+**
+** Destroy an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom to destroy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_AtomDestroy(
+ IN gckOS Os,
+ OUT gctPOINTER Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomGet
+**
+** Get the 32-bit value protected by an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the value of the atom.
+*/
+gceSTATUS
+gckOS_AtomGet(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomSet
+**
+** Set the 32-bit value protected by an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** gctINT32 Value
+** The value of the atom.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_AtomSet(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ IN gctINT32 Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomIncrement
+**
+** Atomically increment the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomIncrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDecrement
+**
+** Atomically decrement the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomDecrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gckOS_Delay(
+ IN gckOS Os,
+ IN gctUINT32 Delay
+ );
+
+/* Get time in milliseconds. */
+gceSTATUS
+gckOS_GetTicks(
+ OUT gctUINT32_PTR Time
+ );
+
+/* Compare time value. */
+gceSTATUS
+gckOS_TicksAfter(
+ IN gctUINT32 Time1,
+ IN gctUINT32 Time2,
+ OUT gctBOOL_PTR IsAfter
+ );
+
+/* Get time in microseconds. */
+gceSTATUS
+gckOS_GetTime(
+ OUT gctUINT64_PTR Time
+ );
+
+/* Memory barrier. */
+gceSTATUS
+gckOS_MemoryBarrier(
+ IN gckOS Os,
+ IN gctPOINTER Address
+ );
+
+/* Map user pointer. */
+gceSTATUS
+gckOS_MapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Unmap user pointer. */
+gceSTATUS
+gckOS_UnmapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ IN gctPOINTER KernelPointer
+ );
+
+/*******************************************************************************
+**
+** gckOS_QueryNeedCopy
+**
+** Query whether the memory can be accessed or mapped directly or it has to be
+** copied.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to an gckOS object.
+**
+** gctUINT32 ProcessID
+** Process ID of the current process.
+**
+** OUTPUT:
+**
+** gctBOOL_PTR NeedCopy
+** Pointer to a boolean receiving gcvTRUE if the memory needs a copy or
+** gcvFALSE if the memory can be accessed or mapped dircetly.
+*/
+gceSTATUS
+gckOS_QueryNeedCopy(
+ IN gckOS Os,
+ IN gctUINT32 ProcessID,
+ OUT gctBOOL_PTR NeedCopy
+ );
+
+/*******************************************************************************
+**
+** gckOS_CopyFromUserData
+**
+** Copy data from user to kernel memory.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to an gckOS object.
+**
+** gctPOINTER KernelPointer
+** Pointer to kernel memory.
+**
+** gctPOINTER Pointer
+** Pointer to user memory.
+**
+** gctSIZE_T Size
+** Number of bytes to copy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_CopyFromUserData(
+ IN gckOS Os,
+ IN gctPOINTER KernelPointer,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size
+ );
+
+/*******************************************************************************
+**
+** gckOS_CopyToUserData
+**
+** Copy data from kernel to user memory.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to an gckOS object.
+**
+** gctPOINTER KernelPointer
+** Pointer to kernel memory.
+**
+** gctPOINTER Pointer
+** Pointer to user memory.
+**
+** gctSIZE_T Size
+** Number of bytes to copy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_CopyToUserData(
+ IN gckOS Os,
+ IN gctPOINTER KernelPointer,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size
+ );
+
+#ifdef __QNXNTO__
+/* Map user physical address. */
+gceSTATUS
+gckOS_MapUserPhysical(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Phys,
+ OUT gctPOINTER * KernelPointer
+ );
+#endif
+
+gceSTATUS
+gckOS_SuspendInterrupt(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_SuspendInterruptEx(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+gceSTATUS
+gckOS_ResumeInterrupt(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_ResumeInterruptEx(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gckOS_GetBaseAddress(
+ IN gckOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gckOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gckOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Device I/O control to the kernel HAL layer. */
+gceSTATUS
+gckOS_DeviceControl(
+ IN gckOS Os,
+ IN gctBOOL FromUser,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ OUT gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/*******************************************************************************
+**
+** gckOS_GetProcessID
+**
+** Get current process ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ProcessID
+** Pointer to the variable that receives the process ID.
+*/
+gceSTATUS
+gckOS_GetProcessID(
+ OUT gctUINT32_PTR ProcessID
+ );
+
+gceSTATUS
+gckOS_GetCurrentProcessID(
+ OUT gctUINT32_PTR ProcessID
+ );
+
+/*******************************************************************************
+**
+** gckOS_GetThreadID
+**
+** Get current thread ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ThreadID
+** Pointer to the variable that receives the thread ID.
+*/
+gceSTATUS
+gckOS_GetThreadID(
+ OUT gctUINT32_PTR ThreadID
+ );
+
+/******************************************************************************\
+********************************** Signal Object *********************************
+\******************************************************************************/
+
+/* Create a signal. */
+gceSTATUS
+gckOS_CreateSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gckOS_DestroySignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gckOS_Signal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gckOS_WaitSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Map a user signal to the kernel space. */
+gceSTATUS
+gckOS_MapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process,
+ OUT gctSIGNAL * MappedSignal
+ );
+
+/* Unmap a user signal */
+gceSTATUS
+gckOS_UnmapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Map user memory. */
+gceSTATUS
+gckOS_MapUserMemory(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPOINTER Memory,
+ IN gctUINT32 Physical,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gckOS_UnmapUserMemory(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+#if !USE_NEW_LINUX_SIGNAL
+/* Create signal to be used in the user space. */
+gceSTATUS
+gckOS_CreateUserSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctINT * SignalID
+ );
+
+/* Destroy signal used in the user space. */
+gceSTATUS
+gckOS_DestroyUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID
+ );
+
+/* Wait for signal used in the user space. */
+gceSTATUS
+gckOS_WaitUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctUINT32 Wait
+ );
+
+/* Signal a signal used in the user space. */
+gceSTATUS
+gckOS_SignalUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctBOOL State
+ );
+#endif /* USE_NEW_LINUX_SIGNAL */
+
+/* Set a signal owned by a process. */
+#if defined(__QNXNTO__)
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctINT Recvid,
+ IN gctINT Coid
+ );
+#else
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process
+ );
+#endif
+
+/******************************************************************************\
+** Cache Support
+*/
+
+gceSTATUS
+gckOS_CacheClean(
+ gckOS Os,
+ gctUINT32 ProcessID,
+ gctPHYS_ADDR Handle,
+ gctPOINTER Physical,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gckOS_CacheFlush(
+ gckOS Os,
+ gctUINT32 ProcessID,
+ gctPHYS_ADDR Handle,
+ gctPOINTER Physical,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gckOS_CacheInvalidate(
+ gckOS Os,
+ gctUINT32 ProcessID,
+ gctPHYS_ADDR Handle,
+ gctPOINTER Physical,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+** Debug Support
+*/
+
+void
+gckOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gckOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gckOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+/*******************************************************************************
+** Broadcast interface.
+*/
+
+typedef enum _gceBROADCAST
+{
+ /* GPU might be idle. */
+ gcvBROADCAST_GPU_IDLE,
+
+ /* A commit is going to happen. */
+ gcvBROADCAST_GPU_COMMIT,
+
+ /* GPU seems to be stuck. */
+ gcvBROADCAST_GPU_STUCK,
+
+ /* First process gets attached. */
+ gcvBROADCAST_FIRST_PROCESS,
+
+ /* Last process gets detached. */
+ gcvBROADCAST_LAST_PROCESS,
+
+ /* AXI bus error. */
+ gcvBROADCAST_AXI_BUS_ERROR,
+}
+gceBROADCAST;
+
+gceSTATUS
+gckOS_Broadcast(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gceBROADCAST Reason
+ );
+
+gceSTATUS
+gckOS_BroadcastHurry(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gctUINT Urgency
+ );
+
+gceSTATUS
+gckOS_BroadcastCalibrateSpeed(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gctUINT Idle,
+ IN gctUINT Time
+ );
+
+/*******************************************************************************
+**
+** gckOS_SetGPUPower
+**
+** Set the power of the GPU on or off.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.ß
+**
+** gckCORE Core
+** GPU whose power is set.
+**
+** gctBOOL Clock
+** gcvTRUE to turn on the clock, or gcvFALSE to turn off the clock.
+**
+** gctBOOL Power
+** gcvTRUE to turn on the power, or gcvFALSE to turn off the power.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_SetGPUPower(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctBOOL Clock,
+ IN gctBOOL Power
+ );
+
+gceSTATUS
+gckOS_ResetGPU(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+gceSTATUS
+gckOS_PrepareGPUFrequency(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+gceSTATUS
+gckOS_FinishGPUFrequency(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+gceSTATUS
+gckOS_QueryGPUFrequency(
+ IN gckOS Os,
+ IN gceCORE Core,
+ OUT gctUINT32 * Frequency,
+ OUT gctUINT8 * Scale
+ );
+
+gceSTATUS
+gckOS_SetGPUFrequency(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT8 Scale
+ );
+
+/*******************************************************************************
+** Semaphores.
+*/
+
+/* Create a new semaphore. */
+gceSTATUS
+gckOS_CreateSemaphore(
+ IN gckOS Os,
+ OUT gctPOINTER * Semaphore
+ );
+
+#if gcdENABLE_VG
+gceSTATUS
+gckOS_CreateSemaphoreVG(
+ IN gckOS Os,
+ OUT gctPOINTER * Semaphore
+ );
+#endif
+
+/* Delete a semahore. */
+gceSTATUS
+gckOS_DestroySemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Acquire a semahore. */
+gceSTATUS
+gckOS_AcquireSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Try to acquire a semahore. */
+gceSTATUS
+gckOS_TryAcquireSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Release a semahore. */
+gceSTATUS
+gckOS_ReleaseSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/*******************************************************************************
+** Timer API.
+*/
+
+typedef void (*gctTIMERFUNCTION)(gctPOINTER);
+
+/* Create a timer. */
+gceSTATUS
+gckOS_CreateTimer(
+ IN gckOS Os,
+ IN gctTIMERFUNCTION Function,
+ IN gctPOINTER Data,
+ OUT gctPOINTER * Timer
+ );
+
+/* Destory a timer. */
+gceSTATUS
+gckOS_DestroyTimer(
+ IN gckOS Os,
+ IN gctPOINTER Timer
+ );
+
+/* Start a timer. */
+gceSTATUS
+gckOS_StartTimer(
+ IN gckOS Os,
+ IN gctPOINTER Timer,
+ IN gctUINT32 Delay
+ );
+
+/* Stop a timer. */
+gceSTATUS
+gckOS_StopTimer(
+ IN gckOS Os,
+ IN gctPOINTER Timer
+ );
+
+/******************************************************************************\
+********************************* gckHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gckHEAP * gckHEAP;
+
+/* Construct a new gckHEAP object. */
+gceSTATUS
+gckHEAP_Construct(
+ IN gckOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gckHEAP * Heap
+ );
+
+/* Destroy an gckHEAP object. */
+gceSTATUS
+gckHEAP_Destroy(
+ IN gckHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gckHEAP_Allocate(
+ IN gckHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckHEAP_Free(
+ IN gckHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+/* Profile the heap. */
+gceSTATUS
+gckHEAP_ProfileStart(
+ IN gckHEAP Heap
+ );
+
+gceSTATUS
+gckHEAP_ProfileEnd(
+ IN gckHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+
+
+/******************************************************************************\
+******************************** gckVIDMEM Object ******************************
+\******************************************************************************/
+
+typedef struct _gckVIDMEM * gckVIDMEM;
+typedef struct _gckKERNEL * gckKERNEL;
+typedef struct _gckDB * gckDB;
+typedef struct _gckDVFS * gckDVFS;
+
+/* Construct a new gckVIDMEM object. */
+gceSTATUS
+gckVIDMEM_Construct(
+ IN gckOS Os,
+ IN gctUINT32 BaseAddress,
+ IN gctSIZE_T Bytes,
+ IN gctSIZE_T Threshold,
+ IN gctSIZE_T Banking,
+ OUT gckVIDMEM * Memory
+ );
+
+/* Destroy an gckVDIMEM object. */
+gceSTATUS
+gckVIDMEM_Destroy(
+ IN gckVIDMEM Memory
+ );
+
+/* Allocate rectangular memory. */
+gceSTATUS
+gckVIDMEM_Allocate(
+ IN gckVIDMEM Memory,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT BytesPerPixel,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Allocate linear memory. */
+gceSTATUS
+gckVIDMEM_AllocateLinear(
+ IN gckVIDMEM Memory,
+ IN gctSIZE_T Bytes,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckVIDMEM_Free(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/* Lock memory. */
+gceSTATUS
+gckVIDMEM_Lock(
+ IN gckKERNEL Kernel,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctBOOL Cacheable,
+ OUT gctUINT32 * Address
+ );
+
+/* Unlock memory. */
+gceSTATUS
+gckVIDMEM_Unlock(
+ IN gckKERNEL Kernel,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type,
+ IN OUT gctBOOL * Asynchroneous
+ );
+
+/* Construct a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_ConstructVirtual(
+ IN gckKERNEL Kernel,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Destroy a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_DestroyVirtual(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/******************************************************************************\
+******************************** gckKERNEL Object ******************************
+\******************************************************************************/
+
+struct _gcsHAL_INTERFACE;
+
+/* Notifications. */
+typedef enum _gceNOTIFY
+{
+ gcvNOTIFY_INTERRUPT,
+ gcvNOTIFY_COMMAND_QUEUE,
+}
+gceNOTIFY;
+
+/* Flush flags. */
+typedef enum _gceKERNEL_FLUSH
+{
+ gcvFLUSH_COLOR = 0x01,
+ gcvFLUSH_DEPTH = 0x02,
+ gcvFLUSH_TEXTURE = 0x04,
+ gcvFLUSH_2D = 0x08,
+ gcvFLUSH_ALL = gcvFLUSH_COLOR
+ | gcvFLUSH_DEPTH
+ | gcvFLUSH_TEXTURE
+ | gcvFLUSH_2D,
+}
+gceKERNEL_FLUSH;
+
+/* Construct a new gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Construct(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPOINTER Context,
+ IN gckDB SharedDB,
+ OUT gckKERNEL * Kernel
+ );
+
+/* Destroy an gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Destroy(
+ IN gckKERNEL Kernel
+ );
+
+/* Dispatch a user-level command. */
+gceSTATUS
+gckKERNEL_Dispatch(
+ IN gckKERNEL Kernel,
+ IN gctBOOL FromUser,
+ IN OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckKERNEL_QueryVideoMemory(
+ IN gckKERNEL Kernel,
+ OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Lookup the gckVIDMEM object for a pool. */
+gceSTATUS
+gckKERNEL_GetVideoMemoryPool(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+#if gcdUSE_VIDMEM_PER_PID
+gceSTATUS
+gckKERNEL_GetVideoMemoryPoolPid(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ IN gctUINT32 Pid,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+gceSTATUS
+gckKERNEL_CreateVideoMemoryPoolPid(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ IN gctUINT32 Pid,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+gceSTATUS
+gckKERNEL_RemoveVideoMemoryPoolPid(
+ IN gckKERNEL Kernel,
+ IN gckVIDMEM VideoMemory
+ );
+#endif
+
+/* Map video memory. */
+gceSTATUS
+gckKERNEL_MapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Address,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes,
+#endif
+ OUT gctPOINTER * Logical
+ );
+
+/* Map video memory. */
+gceSTATUS
+gckKERNEL_MapVideoMemoryEx(
+ IN gckKERNEL Kernel,
+ IN gceCORE Core,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Address,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes,
+#endif
+ OUT gctPOINTER * Logical
+ );
+
+#ifdef __QNXNTO__
+/* Unmap video memory. */
+gceSTATUS
+gckKERNEL_UnmapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes
+ );
+#endif
+
+/* Map memory. */
+gceSTATUS
+gckKERNEL_MapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap memory. */
+gceSTATUS
+gckKERNEL_UnmapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Notification of events. */
+gceSTATUS
+gckKERNEL_Notify(
+ IN gckKERNEL Kernel,
+ IN gceNOTIFY Notifcation,
+ IN gctBOOL Data
+ );
+
+gceSTATUS
+gckKERNEL_QuerySettings(
+ IN gckKERNEL Kernel,
+ OUT gcsKERNEL_SETTINGS * Settings
+ );
+
+/*******************************************************************************
+**
+** gckKERNEL_Recovery
+**
+** Try to recover the GPU from a fatal error.
+**
+** INPUT:
+**
+** gckKERNEL Kernel
+** Pointer to an gckKERNEL object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckKERNEL_Recovery(
+ IN gckKERNEL Kernel
+ );
+
+/* Set the value of timeout on HW operation. */
+void
+gckKERNEL_SetTimeOut(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 timeOut
+ );
+
+/* Get access to the user data. */
+gceSTATUS
+gckKERNEL_OpenUserData(
+ IN gckKERNEL Kernel,
+ IN gctBOOL NeedCopy,
+ IN gctPOINTER StaticStorage,
+ IN gctPOINTER UserPointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Release resources associated with the user data connection. */
+gceSTATUS
+gckKERNEL_CloseUserData(
+ IN gckKERNEL Kernel,
+ IN gctBOOL NeedCopy,
+ IN gctBOOL FlushData,
+ IN gctPOINTER UserPointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+gceSTATUS
+gckDVFS_Construct(
+ IN gckHARDWARE Hardware,
+ OUT gckDVFS * Frequency
+ );
+
+gceSTATUS
+gckDVFS_Destroy(
+ IN gckDVFS Dvfs
+ );
+
+gceSTATUS
+gckDVFS_Start(
+ IN gckDVFS Dvfs
+ );
+
+gceSTATUS
+gckDVFS_Stop(
+ IN gckDVFS Dvfs
+ );
+
+/******************************************************************************\
+******************************* gckHARDWARE Object *****************************
+\******************************************************************************/
+
+/* Construct a new gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Construct(
+ IN gckOS Os,
+ IN gceCORE Core,
+ OUT gckHARDWARE * Hardware
+ );
+
+/* Destroy an gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Destroy(
+ IN gckHARDWARE Hardware
+ );
+
+/* Get hardware type. */
+gceSTATUS
+gckHARDWARE_GetType(
+ IN gckHARDWARE Hardware,
+ OUT gceHARDWARE_TYPE * Type
+ );
+
+/* Query system memory requirements. */
+gceSTATUS
+gckHARDWARE_QuerySystemMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * SystemSize,
+ OUT gctUINT32 * SystemBaseAddress
+ );
+
+/* Build virtual address. */
+gceSTATUS
+gckHARDWARE_BuildVirtualAddress(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Index,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Query command buffer requirements. */
+gceSTATUS
+gckHARDWARE_QueryCommandBuffer(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * Alignment,
+ OUT gctSIZE_T * ReservedHead,
+ OUT gctSIZE_T * ReservedTail
+ );
+
+/* Add a WAIT/LINK pair in the command queue. */
+gceSTATUS
+gckHARDWARE_WaitLink(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctUINT32 * WaitOffset,
+ OUT gctSIZE_T * WaitBytes
+ );
+
+/* Kickstart the command processor. */
+gceSTATUS
+gckHARDWARE_Execute(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Physical,
+ IN gctBOOL PhysicalAddresses,
+#endif
+ IN gctSIZE_T Bytes
+ );
+
+/* Add an END command in the command queue. */
+gceSTATUS
+gckHARDWARE_End(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a NOP command in the command queue. */
+gceSTATUS
+gckHARDWARE_Nop(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a WAIT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Wait(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Count,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a PIPESELECT command in the command queue. */
+gceSTATUS
+gckHARDWARE_PipeSelect(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gcePIPE_SELECT Pipe,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a LINK command in the command queue. */
+gceSTATUS
+gckHARDWARE_Link(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctPOINTER FetchAddress,
+ IN gctSIZE_T FetchSize,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add an EVENT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Event(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT8 Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Query the available memory. */
+gceSTATUS
+gckHARDWARE_QueryMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctUINT32 * InternalBaseAddress,
+ OUT gctUINT32 * InternalAlignment,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctUINT32 * ExternalBaseAddress,
+ OUT gctUINT32 * ExternalAlignment,
+ OUT gctUINT32 * HorizontalTileSize,
+ OUT gctUINT32 * VerticalTileSize
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gckHARDWARE_QueryChipIdentity(
+ IN gckHARDWARE Hardware,
+ OUT gcsHAL_QUERY_CHIP_IDENTITY_PTR Identity
+ );
+
+/* Query the shader support. */
+gceSTATUS
+gckHARDWARE_QueryShaderCaps(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT * VertexUniforms,
+ OUT gctUINT * FragmentUniforms,
+ OUT gctUINT * Varyings
+ );
+
+/* Split a harwdare specific address into API stuff. */
+gceSTATUS
+gckHARDWARE_SplitMemory(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Update command queue tail pointer. */
+gceSTATUS
+gckHARDWARE_UpdateQueueTail(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset
+ );
+
+/* Convert logical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertLogical(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+#ifdef __QNXNTO__
+/* Convert physical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertPhysical(
+ IN gckHARDWARE Hardware,
+ IN gctPHYS_ADDR Physical,
+ OUT gctUINT32 * Address
+ );
+#endif
+
+/* Interrupt manager. */
+gceSTATUS
+gckHARDWARE_Interrupt(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL InterruptValid
+ );
+
+/* Program MMU. */
+gceSTATUS
+gckHARDWARE_SetMMU(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical
+ );
+
+/* Flush the MMU. */
+gceSTATUS
+gckHARDWARE_FlushMMU(
+ IN gckHARDWARE Hardware
+ );
+
+/* Set the page table base address. */
+gceSTATUS
+gckHARDWARE_SetMMUv2(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Enable,
+ IN gctPOINTER MtlbAddress,
+ IN gceMMU_MODE Mode,
+ IN gctPOINTER SafeAddress,
+ IN gctBOOL FromPower
+ );
+
+/* Get idle register. */
+gceSTATUS
+gckHARDWARE_GetIdle(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Wait,
+ OUT gctUINT32 * Data
+ );
+
+/* Flush the caches. */
+gceSTATUS
+gckHARDWARE_Flush(
+ IN gckHARDWARE Hardware,
+ IN gceKERNEL_FLUSH Flush,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Enable/disable fast clear. */
+gceSTATUS
+gckHARDWARE_SetFastClear(
+ IN gckHARDWARE Hardware,
+ IN gctINT Enable,
+ IN gctINT Compression
+ );
+
+gceSTATUS
+gckHARDWARE_ReadInterrupt(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR IDs
+ );
+
+/* Power management. */
+gceSTATUS
+gckHARDWARE_SetPowerManagementState(
+ IN gckHARDWARE Hardware,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gckHARDWARE_QueryPowerManagementState(
+ IN gckHARDWARE Hardware,
+ OUT gceCHIPPOWERSTATE* State
+ );
+
+#if gcdENABLE_FSCALE_VAL_ADJUST
+gceSTATUS
+gckHARDWARE_SetFscaleValue(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 FscaleValue
+ );
+
+gceSTATUS
+gckHARDWARE_GetFscaleValue(
+ IN gckHARDWARE Hardware,
+ IN gctUINT * FscaleValue,
+ IN gctUINT * MinFscaleValue,
+ IN gctUINT * MaxFscaleValue
+ );
+#endif
+
+#if gcdPOWEROFF_TIMEOUT
+gceSTATUS
+gckHARDWARE_SetPowerOffTimeout(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Timeout
+);
+
+gceSTATUS
+gckHARDWARE_QueryPowerOffTimeout(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32* Timeout
+);
+#endif
+
+/* Profile 2D Engine. */
+gceSTATUS
+gckHARDWARE_ProfileEngine2D(
+ IN gckHARDWARE Hardware,
+ OUT gcs2D_PROFILE_PTR Profile
+ );
+
+gceSTATUS
+gckHARDWARE_InitializeHardware(
+ IN gckHARDWARE Hardware
+ );
+
+gceSTATUS
+gckHARDWARE_Reset(
+ IN gckHARDWARE Hardware
+ );
+
+typedef gceSTATUS (*gctISRMANAGERFUNC)(gctPOINTER Context);
+
+gceSTATUS
+gckHARDWARE_SetIsrManager(
+ IN gckHARDWARE Hardware,
+ IN gctISRMANAGERFUNC StartIsr,
+ IN gctISRMANAGERFUNC StopIsr,
+ IN gctPOINTER Context
+ );
+
+/* Start a composition. */
+gceSTATUS
+gckHARDWARE_Compose(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 ProcessID,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Offset,
+ IN gctSIZE_T Size,
+ IN gctUINT8 EventID
+ );
+
+/* Check for Hardware features. */
+gceSTATUS
+gckHARDWARE_IsFeatureAvailable(
+ IN gckHARDWARE Hardware,
+ IN gceFEATURE Feature
+ );
+
+gceSTATUS
+gckHARDWARE_DumpMMUException(
+ IN gckHARDWARE Hardware
+ );
+
+gceSTATUS
+gckHARDWARE_DumpGPUState(
+ IN gckHARDWARE Hardware
+ );
+
+gceSTATUS
+gckHARDWARE_InitDVFS(
+ IN gckHARDWARE Hardware
+ );
+
+gceSTATUS
+gckHARDWARE_QueryLoad(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32 * Load
+ );
+
+gceSTATUS
+gckHARDWARE_SetDVFSPeroid(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Frequency
+ );
+
+#if !gcdENABLE_VG
+/******************************************************************************\
+***************************** gckINTERRUPT Object ******************************
+\******************************************************************************/
+
+typedef struct _gckINTERRUPT * gckINTERRUPT;
+
+typedef gceSTATUS (* gctINTERRUPT_HANDLER)(
+ IN gckKERNEL Kernel
+ );
+
+gceSTATUS
+gckINTERRUPT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckINTERRUPT * Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_Destroy(
+ IN gckINTERRUPT Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_SetHandler(
+ IN gckINTERRUPT Interrupt,
+ IN OUT gctINT32_PTR Id,
+ IN gctINTERRUPT_HANDLER Handler
+ );
+
+gceSTATUS
+gckINTERRUPT_Notify(
+ IN gckINTERRUPT Interrupt,
+ IN gctBOOL Valid
+ );
+#endif
+/******************************************************************************\
+******************************** gckEVENT Object *******************************
+\******************************************************************************/
+
+typedef struct _gckEVENT * gckEVENT;
+
+/* Construct a new gckEVENT object. */
+gceSTATUS
+gckEVENT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckEVENT * Event
+ );
+
+/* Destroy an gckEVENT object. */
+gceSTATUS
+gckEVENT_Destroy(
+ IN gckEVENT Event
+ );
+
+/* Reserve the next available hardware event. */
+gceSTATUS
+gckEVENT_GetEvent(
+ IN gckEVENT Event,
+ IN gctBOOL Wait,
+ OUT gctUINT8 * EventID,
+ IN gceKERNEL_WHERE Source
+ );
+
+/* Add a new event to the list of events. */
+gceSTATUS
+gckEVENT_AddList(
+ IN gckEVENT Event,
+ IN gcsHAL_INTERFACE_PTR Interface,
+ IN gceKERNEL_WHERE FromWhere,
+ IN gctBOOL AllocateAllowed,
+ IN gctBOOL FromKernel
+ );
+
+/* Schedule a FreeNonPagedMemory event. */
+gceSTATUS
+gckEVENT_FreeNonPagedMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeContiguousMemory event. */
+gceSTATUS
+gckEVENT_FreeContiguousMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeVideoMemory event. */
+gceSTATUS
+gckEVENT_FreeVideoMemory(
+ IN gckEVENT Event,
+ IN gcuVIDMEM_NODE_PTR VideoMemory,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a signal event. */
+gceSTATUS
+gckEVENT_Signal(
+ IN gckEVENT Event,
+ IN gctSIGNAL Signal,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule an Unlock event. */
+gceSTATUS
+gckEVENT_Unlock(
+ IN gckEVENT Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type
+ );
+
+gceSTATUS
+gckEVENT_CommitDone(
+ IN gckEVENT Event,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+#if gcdVIRTUAL_COMMAND_BUFFER
+/* Schedule a FreeVirtualCommandBuffer event. */
+gceSTATUS
+gckEVENT_DestroyVirtualCommandBuffer(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+#endif
+
+gceSTATUS
+gckEVENT_Submit(
+ IN gckEVENT Event,
+ IN gctBOOL Wait,
+ IN gctBOOL FromPower
+ );
+
+/* Commit an event queue. */
+gceSTATUS
+gckEVENT_Commit(
+ IN gckEVENT Event,
+ IN gcsQUEUE_PTR Queue
+ );
+
+/* Schedule a composition event. */
+gceSTATUS
+gckEVENT_Compose(
+ IN gckEVENT Event,
+ IN gcsHAL_COMPOSE_PTR Info
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Notify(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Interrupt(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+gceSTATUS
+gckEVENT_Dump(
+ IN gckEVENT Event
+ );
+/******************************************************************************\
+******************************* gckCOMMAND Object ******************************
+\******************************************************************************/
+
+typedef struct _gckCOMMAND * gckCOMMAND;
+
+/* Construct a new gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckCOMMAND * Command
+ );
+
+/* Destroy an gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Destroy(
+ IN gckCOMMAND Command
+ );
+
+/* Acquire command queue synchronization objects. */
+gceSTATUS
+gckCOMMAND_EnterCommit(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromPower
+ );
+
+/* Release command queue synchronization objects. */
+gceSTATUS
+gckCOMMAND_ExitCommit(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromPower
+ );
+
+/* Start the command queue. */
+gceSTATUS
+gckCOMMAND_Start(
+ IN gckCOMMAND Command
+ );
+
+/* Stop the command queue. */
+gceSTATUS
+gckCOMMAND_Stop(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromRecovery
+ );
+
+/* Commit a buffer to the command queue. */
+gceSTATUS
+gckCOMMAND_Commit(
+ IN gckCOMMAND Command,
+ IN gckCONTEXT Context,
+ IN gcoCMDBUF CommandBuffer,
+ IN gcsSTATE_DELTA_PTR StateDelta,
+ IN gcsQUEUE_PTR EventQueue,
+ IN gctUINT32 ProcessID
+ );
+
+/* Reserve space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Reserve(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequestedBytes,
+ OUT gctPOINTER * Buffer,
+ OUT gctSIZE_T * BufferSize
+ );
+
+/* Execute reserved space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Execute(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequstedBytes
+ );
+
+/* Stall the command queue. */
+gceSTATUS
+gckCOMMAND_Stall(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromPower
+ );
+
+/* Attach user process. */
+gceSTATUS
+gckCOMMAND_Attach(
+ IN gckCOMMAND Command,
+ OUT gckCONTEXT * Context,
+ OUT gctSIZE_T * StateCount,
+ IN gctUINT32 ProcessID
+ );
+
+/* Detach user process. */
+gceSTATUS
+gckCOMMAND_Detach(
+ IN gckCOMMAND Command,
+ IN gckCONTEXT Context
+ );
+
+#if gcdVIRTUAL_COMMAND_BUFFER
+gceSTATUS
+gckCOMMAND_DumpExecutingBuffer(
+ IN gckCOMMAND Command
+ );
+#endif
+
+/******************************************************************************\
+********************************* gckMMU Object ********************************
+\******************************************************************************/
+
+typedef struct _gckMMU * gckMMU;
+
+/* Construct a new gckMMU object. */
+gceSTATUS
+gckMMU_Construct(
+ IN gckKERNEL Kernel,
+ IN gctSIZE_T MmuSize,
+ OUT gckMMU * Mmu
+ );
+
+/* Destroy an gckMMU object. */
+gceSTATUS
+gckMMU_Destroy(
+ IN gckMMU Mmu
+ );
+
+/* Enable the MMU. */
+gceSTATUS
+gckMMU_Enable(
+ IN gckMMU Mmu,
+ IN gctUINT32 PhysBaseAddr,
+ IN gctUINT32 PhysSize
+ );
+
+/* Allocate pages inside the MMU. */
+gceSTATUS
+gckMMU_AllocatePages(
+ IN gckMMU Mmu,
+ IN gctSIZE_T PageCount,
+ OUT gctPOINTER * PageTable,
+ OUT gctUINT32 * Address
+ );
+
+/* Remove a page table from the MMU. */
+gceSTATUS
+gckMMU_FreePages(
+ IN gckMMU Mmu,
+ IN gctPOINTER PageTable,
+ IN gctSIZE_T PageCount
+ );
+
+/* Set the MMU page with info. */
+gceSTATUS
+gckMMU_SetPage(
+ IN gckMMU Mmu,
+ IN gctUINT32 PageAddress,
+ IN gctUINT32 *PageEntry
+ );
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_InsertNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+
+gceSTATUS
+gckMMU_RemoveNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+#endif
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_FreeHandleMemory(
+ IN gckKERNEL Kernel,
+ IN gckMMU Mmu,
+ IN gctUINT32 Pid
+ );
+#endif
+
+gceSTATUS
+gckMMU_Flush(
+ IN gckMMU Mmu
+ );
+
+gceSTATUS
+gckMMU_DumpPageTableEntry(
+ IN gckMMU Mmu,
+ IN gctUINT32 Address
+ );
+
+
+#if VIVANTE_PROFILER
+gceSTATUS
+gckHARDWARE_QueryProfileRegisters(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Clear,
+ OUT gcsPROFILER_COUNTERS * Counters
+ );
+#endif
+
+gceSTATUS
+gckOS_SignalQueryHardware(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ OUT gckHARDWARE * Hardware
+ );
+
+gceSTATUS
+gckOS_SignalSetHardware(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ gckHARDWARE Hardware
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#if gcdENABLE_VG
+#include "gc_hal_vg.h"
+#endif
+
+#endif /* __gc_hal_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_base.h b/src/include_imx6_v4_0_0/gc_hal_base.h
new file mode 100644
index 0000000..ac86399
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_base.h
@@ -0,0 +1,3732 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_base_h_
+#define __gc_hal_base_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#include "gc_hal_dump.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gckOS * gckOS;
+typedef struct _gcoHAL * gcoHAL;
+typedef struct _gcoOS * gcoOS;
+typedef struct _gco2D * gco2D;
+
+#ifndef VIVANTE_NO_3D
+typedef struct _gco3D * gco3D;
+#endif
+
+typedef struct _gcoSURF * gcoSURF;
+typedef struct _gcsSURF_INFO * gcsSURF_INFO_PTR;
+typedef struct _gcsSURF_NODE * gcsSURF_NODE_PTR;
+typedef struct _gcsSURF_FORMAT_INFO * gcsSURF_FORMAT_INFO_PTR;
+typedef struct _gcsPOINT * gcsPOINT_PTR;
+typedef struct _gcsSIZE * gcsSIZE_PTR;
+typedef struct _gcsRECT * gcsRECT_PTR;
+typedef struct _gcsBOUNDARY * gcsBOUNDARY_PTR;
+typedef struct _gcoDUMP * gcoDUMP;
+typedef struct _gcoHARDWARE * gcoHARDWARE;
+typedef union _gcuVIDMEM_NODE * gcuVIDMEM_NODE_PTR;
+
+typedef struct gcsATOM * gcsATOM_PTR;
+
+#if gcdENABLE_VG
+typedef struct _gcoVG * gcoVG;
+typedef struct _gcsCOMPLETION_SIGNAL * gcsCOMPLETION_SIGNAL_PTR;
+typedef struct _gcsCONTEXT_MAP * gcsCONTEXT_MAP_PTR;
+#else
+typedef void * gcoVG;
+#endif
+
+#if gcdSYNC
+typedef struct _gcoFENCE * gcoFENCE;
+typedef struct _gcsSYNC_CONTEXT * gcsSYNC_CONTEXT_PTR;
+#endif
+
+/******************************************************************************\
+******************************* Process local storage *************************
+\******************************************************************************/
+
+typedef struct _gcsPLS * gcsPLS_PTR;
+typedef struct _gcsPLS
+{
+ /* Global objects. */
+ gcoOS os;
+ gcoHAL hal;
+
+ /* Internal memory pool. */
+ gctSIZE_T internalSize;
+ gctPHYS_ADDR internalPhysical;
+ gctPOINTER internalLogical;
+
+ /* External memory pool. */
+ gctSIZE_T externalSize;
+ gctPHYS_ADDR externalPhysical;
+ gctPOINTER externalLogical;
+
+ /* Contiguous memory pool. */
+ gctSIZE_T contiguousSize;
+ gctPHYS_ADDR contiguousPhysical;
+ gctPOINTER contiguousLogical;
+
+ /* EGL-specific process-wide objects. */
+ gctPOINTER eglDisplayInfo;
+ gctPOINTER eglSurfaceInfo;
+ gceSURF_FORMAT eglConfigFormat;
+
+ /* PorcessID of the constrcutor process */
+ gctUINT32 processID;
+
+ /* Reference count for destructor. */
+ gcsATOM_PTR reference;
+#if gcdUSE_NPOT_PATCH
+ gctBOOL bNeedSupportNP2Texture;
+#endif
+
+}
+gcsPLS;
+
+extern gcsPLS gcPLS;
+
+/******************************************************************************\
+******************************* Thread local storage *************************
+\******************************************************************************/
+
+typedef struct _gcsTLS * gcsTLS_PTR;
+
+typedef void (* gctTLS_DESTRUCTOR) (
+ gcsTLS_PTR TLS
+ );
+
+typedef struct _gcsTLS
+{
+ gceHARDWARE_TYPE currentType;
+ gcoHARDWARE hardware;
+ /* Only for separated 3D and 2D */
+ gcoHARDWARE hardware2D;
+#if gcdENABLE_VG
+ gcoVGHARDWARE vg;
+ gcoVG engineVG;
+#endif /* gcdENABLE_VG */
+ gctPOINTER context;
+ gctTLS_DESTRUCTOR destructor;
+ gctBOOL ProcessExiting;
+
+#ifndef VIVANTE_NO_3D
+ gco3D engine3D;
+#endif
+#if gcdSYNC
+ gctBOOL fenceEnable;
+#endif
+ gco2D engine2D;
+ gctBOOL copied;
+}
+gcsTLS;
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+typedef enum _gcePLS_VALUE
+{
+ gcePLS_VALUE_EGL_DISPLAY_INFO,
+ gcePLS_VALUE_EGL_SURFACE_INFO,
+ gcePLS_VALUE_EGL_CONFIG_FORMAT_INFO,
+}
+gcePLS_VALUE;
+
+/* Video memory pool type. */
+typedef enum _gcePOOL
+{
+ gcvPOOL_UNKNOWN = 0,
+ gcvPOOL_DEFAULT,
+ gcvPOOL_LOCAL,
+ gcvPOOL_LOCAL_INTERNAL,
+ gcvPOOL_LOCAL_EXTERNAL,
+ gcvPOOL_UNIFIED,
+ gcvPOOL_SYSTEM,
+ gcvPOOL_VIRTUAL,
+ gcvPOOL_USER,
+ gcvPOOL_CONTIGUOUS,
+ gcvPOOL_DEFAULT_FORCE_CONTIGUOUS,
+ gcvPOOL_DEFAULT_FORCE_CONTIGUOUS_CACHEABLE,
+
+ gcvPOOL_NUMBER_OF_POOLS
+}
+gcePOOL;
+
+#ifndef VIVANTE_NO_3D
+/* Blending functions. */
+typedef enum _gceBLEND_FUNCTION
+{
+ gcvBLEND_ZERO,
+ gcvBLEND_ONE,
+ gcvBLEND_SOURCE_COLOR,
+ gcvBLEND_INV_SOURCE_COLOR,
+ gcvBLEND_SOURCE_ALPHA,
+ gcvBLEND_INV_SOURCE_ALPHA,
+ gcvBLEND_TARGET_COLOR,
+ gcvBLEND_INV_TARGET_COLOR,
+ gcvBLEND_TARGET_ALPHA,
+ gcvBLEND_INV_TARGET_ALPHA,
+ gcvBLEND_SOURCE_ALPHA_SATURATE,
+ gcvBLEND_CONST_COLOR,
+ gcvBLEND_INV_CONST_COLOR,
+ gcvBLEND_CONST_ALPHA,
+ gcvBLEND_INV_CONST_ALPHA,
+}
+gceBLEND_FUNCTION;
+
+/* Blending modes. */
+typedef enum _gceBLEND_MODE
+{
+ gcvBLEND_ADD,
+ gcvBLEND_SUBTRACT,
+ gcvBLEND_REVERSE_SUBTRACT,
+ gcvBLEND_MIN,
+ gcvBLEND_MAX,
+}
+gceBLEND_MODE;
+
+/* API flags. */
+typedef enum _gceAPI
+{
+ gcvAPI_D3D = 0x1,
+ gcvAPI_OPENGL = 0x2,
+ gcvAPI_OPENVG = 0x3,
+ gcvAPI_OPENCL = 0x4,
+}
+gceAPI;
+
+/* Depth modes. */
+typedef enum _gceDEPTH_MODE
+{
+ gcvDEPTH_NONE,
+ gcvDEPTH_Z,
+ gcvDEPTH_W,
+}
+gceDEPTH_MODE;
+#endif /* VIVANTE_NO_3D */
+
+typedef enum _gceWHERE
+{
+ gcvWHERE_COMMAND,
+ gcvWHERE_RASTER,
+ gcvWHERE_PIXEL,
+}
+gceWHERE;
+
+typedef enum _gceHOW
+{
+ gcvHOW_SEMAPHORE = 0x1,
+ gcvHOW_STALL = 0x2,
+ gcvHOW_SEMAPHORE_STALL = 0x3,
+}
+gceHOW;
+
+typedef enum _gceSignalHandlerType
+{
+ gcvHANDLE_SIGFPE_WHEN_SIGNAL_CODE_IS_0 = 0x1,
+}
+gceSignalHandlerType;
+
+
+#if gcdENABLE_VG
+/* gcsHAL_Limits*/
+typedef struct _gcsHAL_LIMITS
+{
+ /* chip info */
+ gceCHIPMODEL chipModel;
+ gctUINT32 chipRevision;
+ gctUINT32 featureCount;
+ gctUINT32 *chipFeatures;
+
+ /* target caps */
+ gctUINT32 maxWidth;
+ gctUINT32 maxHeight;
+ gctUINT32 multiTargetCount;
+ gctUINT32 maxSamples;
+
+}gcsHAL_LIMITS;
+#endif
+
+/******************************************************************************\
+*********** Generic Memory Allocation Optimization Using Containers ************
+\******************************************************************************/
+
+/* Generic container definition. */
+typedef struct _gcsCONTAINER_LINK * gcsCONTAINER_LINK_PTR;
+typedef struct _gcsCONTAINER_LINK
+{
+ /* Points to the next container. */
+ gcsCONTAINER_LINK_PTR next;
+}
+gcsCONTAINER_LINK;
+
+typedef struct _gcsCONTAINER_RECORD * gcsCONTAINER_RECORD_PTR;
+typedef struct _gcsCONTAINER_RECORD
+{
+ gcsCONTAINER_RECORD_PTR prev;
+ gcsCONTAINER_RECORD_PTR next;
+}
+gcsCONTAINER_RECORD;
+
+typedef struct _gcsCONTAINER * gcsCONTAINER_PTR;
+typedef struct _gcsCONTAINER
+{
+ gctUINT containerSize;
+ gctUINT recordSize;
+ gctUINT recordCount;
+ gcsCONTAINER_LINK_PTR containers;
+ gcsCONTAINER_RECORD freeList;
+ gcsCONTAINER_RECORD allocList;
+}
+gcsCONTAINER;
+
+gceSTATUS
+gcsCONTAINER_Construct(
+ IN gcsCONTAINER_PTR Container,
+ gctUINT RecordsPerContainer,
+ gctUINT RecordSize
+ );
+
+gceSTATUS
+gcsCONTAINER_Destroy(
+ IN gcsCONTAINER_PTR Container
+ );
+
+gceSTATUS
+gcsCONTAINER_AllocateRecord(
+ IN gcsCONTAINER_PTR Container,
+ OUT gctPOINTER * Record
+ );
+
+gceSTATUS
+gcsCONTAINER_FreeRecord(
+ IN gcsCONTAINER_PTR Container,
+ IN gctPOINTER Record
+ );
+
+gceSTATUS
+gcsCONTAINER_FreeAll(
+ IN gcsCONTAINER_PTR Container
+ );
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Construct a new gcoHAL object. */
+gceSTATUS
+gcoHAL_Construct(
+ IN gctPOINTER Context,
+ IN gcoOS Os,
+ OUT gcoHAL * Hal
+ );
+
+/* Destroy an gcoHAL object. */
+gceSTATUS
+gcoHAL_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Get pointer to gco2D object. */
+gceSTATUS
+gcoHAL_Get2DEngine(
+ IN gcoHAL Hal,
+ OUT gco2D * Engine
+ );
+
+gceSTATUS
+gcoHAL_SetFscaleValue(
+ IN gctUINT FscaleValue
+ );
+
+gceSTATUS
+gcoHAL_GetFscaleValue(
+ OUT gctUINT * FscaleValue,
+ OUT gctUINT * MinFscaleValue,
+ OUT gctUINT * MaxFscaleValue
+ );
+
+gceSTATUS
+gcoHAL_SetBltNP2Texture(
+ gctBOOL enable
+ );
+
+#ifndef VIVANTE_NO_3D
+/* Get pointer to gco3D object. */
+gceSTATUS
+gcoHAL_Get3DEngine(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+gceSTATUS
+gcoHAL_Query3DEngine(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+gceSTATUS
+gcoHAL_Set3DEngine(
+ IN gcoHAL Hal,
+ IN gco3D Engine
+ );
+
+gceSTATUS
+gcoHAL_Get3DHardware(
+ IN gcoHAL Hal,
+ OUT gcoHARDWARE * Hardware
+ );
+
+gceSTATUS
+gcoHAL_Set3DHardware(
+ IN gcoHAL Hal,
+ IN gcoHARDWARE Hardware
+ );
+
+
+#endif /* VIVANTE_NO_3D */
+
+/* Verify whether the specified feature is available in hardware. */
+gceSTATUS
+gcoHAL_IsFeatureAvailable(
+ IN gcoHAL Hal,
+ IN gceFEATURE Feature
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gcoHAL_QueryChipIdentity(
+ IN gcoHAL Hal,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the minor features of the hardware. */
+gceSTATUS gcoHAL_QueryChipMinorFeatures(
+ IN gcoHAL Hal,
+ OUT gctUINT32* NumFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the amount of video memory. */
+gceSTATUS
+gcoHAL_QueryVideoMemory(
+ IN gcoHAL Hal,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Map video memory. */
+gceSTATUS
+gcoHAL_MapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap video memory. */
+gceSTATUS
+gcoHAL_UnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a buffer mapped through its physical address. */
+gceSTATUS
+gcoHAL_ScheduleUnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Map user memory. */
+gceSTATUS
+gcoHAL_MapUserMemory(
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR GPUAddress
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gcoHAL_UnmapUserMemory(
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 GPUAddress
+ );
+
+/* Schedule an unmap of a user buffer using event mechanism. */
+gceSTATUS
+gcoHAL_ScheduleUnmapUserMemory(
+ IN gcoHAL Hal,
+ IN gctPOINTER Info,
+ IN gctSIZE_T Size,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory
+ );
+
+/* Commit the current command buffer. */
+gceSTATUS
+gcoHAL_Commit(
+ IN gcoHAL Hal,
+ IN gctBOOL Stall
+ );
+
+/* Query the tile capabilities. */
+gceSTATUS
+gcoHAL_QueryTiled(
+ IN gcoHAL Hal,
+ OUT gctINT32 * TileWidth2D,
+ OUT gctINT32 * TileHeight2D,
+ OUT gctINT32 * TileWidth3D,
+ OUT gctINT32 * TileHeight3D
+ );
+
+gceSTATUS
+gcoHAL_Compact(
+ IN gcoHAL Hal
+ );
+
+#if VIVANTE_PROFILER
+gceSTATUS
+gcoHAL_ProfileStart(
+ IN gcoHAL Hal
+ );
+
+gceSTATUS
+gcoHAL_ProfileEnd(
+ IN gcoHAL Hal,
+ IN gctCONST_STRING Title
+ );
+#endif
+
+/* Power Management */
+gceSTATUS
+gcoHAL_SetPowerManagementState(
+ IN gcoHAL Hal,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gcoHAL_QueryPowerManagementState(
+ IN gcoHAL Hal,
+ OUT gceCHIPPOWERSTATE *State
+ );
+
+/* Set the filter type for filter blit. */
+gceSTATUS
+gcoHAL_SetFilterType(
+ IN gcoHAL Hal,
+ IN gceFILTER_TYPE FilterType
+ );
+
+gceSTATUS
+gcoHAL_GetDump(
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Call the kernel HAL layer. */
+gceSTATUS
+gcoHAL_Call(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Schedule an event. */
+gceSTATUS
+gcoHAL_ScheduleEvent(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Destroy a surface. */
+gceSTATUS
+gcoHAL_DestroySurface(
+ IN gcoHAL Hal,
+ IN gcoSURF Surface
+ );
+
+/* Request a start/stop timestamp. */
+gceSTATUS
+gcoHAL_SetTimer(
+ IN gcoHAL Hal,
+ IN gctUINT32 Index,
+ IN gctBOOL Start
+ );
+
+/* Get Time delta from a Timer in microseconds. */
+gceSTATUS
+gcoHAL_GetTimerTime(
+ IN gcoHAL Hal,
+ IN gctUINT32 Timer,
+ OUT gctINT32_PTR TimeDelta
+ );
+
+/* set timeout value. */
+gceSTATUS
+gcoHAL_SetTimeOut(
+ IN gcoHAL Hal,
+ IN gctUINT32 timeOut
+ );
+
+gceSTATUS
+gcoHAL_SetHardwareType(
+ IN gcoHAL Hal,
+ IN gceHARDWARE_TYPE HardwardType
+ );
+
+gceSTATUS
+gcoHAL_GetHardwareType(
+ IN gcoHAL Hal,
+ OUT gceHARDWARE_TYPE * HardwardType
+ );
+
+gceSTATUS
+gcoHAL_QueryChipCount(
+ IN gcoHAL Hal,
+ OUT gctINT32 * Count
+ );
+
+gceSTATUS
+gcoHAL_QuerySeparated3D2D(
+ IN gcoHAL Hal
+ );
+
+/* Get pointer to gcoVG object. */
+gceSTATUS
+gcoHAL_GetVGEngine(
+ IN gcoHAL Hal,
+ OUT gcoVG * Engine
+ );
+
+#if gcdENABLE_VG
+gceSTATUS
+gcoHAL_QueryChipLimits(
+ IN gcoHAL Hal,
+ IN gctINT32 Chip,
+ OUT gcsHAL_LIMITS *Limits);
+
+gceSTATUS
+gcoHAL_QueryChipFeature(
+ IN gcoHAL Hal,
+ IN gctINT32 Chip,
+ IN gceFEATURE Feature);
+
+#endif
+
+
+/******************************************************************************\
+********************************** gcoOS Object *********************************
+\******************************************************************************/
+
+/* Get PLS value for given key */
+gctPOINTER
+gcoOS_GetPLSValue(
+ IN gcePLS_VALUE key
+ );
+
+/* Set PLS value of a given key */
+void
+gcoOS_SetPLSValue(
+ IN gcePLS_VALUE key,
+ OUT gctPOINTER value
+ );
+
+/* Get access to the thread local storage. */
+gceSTATUS
+gcoOS_GetTLS(
+ OUT gcsTLS_PTR * TLS
+ );
+
+ /* Copy the TLS from a source thread. */
+ gceSTATUS gcoOS_CopyTLS(IN gcsTLS_PTR Source);
+
+/* Destroy the objects associated with the current thread. */
+void
+gcoOS_FreeThreadData(
+ IN gctBOOL ProcessExiting
+ );
+
+/* Construct a new gcoOS object. */
+gceSTATUS
+gcoOS_Construct(
+ IN gctPOINTER Context,
+ OUT gcoOS * Os
+ );
+
+/* Destroy an gcoOS object. */
+gceSTATUS
+gcoOS_Destroy(
+ IN gcoOS Os
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gcoOS_GetBaseAddress(
+ IN gcoOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gcoOS_Allocate(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Get allocated memory size. */
+gceSTATUS
+gcoOS_GetMemorySize(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ OUT gctSIZE_T_PTR MemorySize
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gcoOS_Free(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoOS_AllocateMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoOS_FreeMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gcoOS_AllocateContiguous(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gcoOS_FreeContiguous(
+ IN gcoOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Allocate video memory. */
+gceSTATUS
+gcoOS_AllocateVideoMemory(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN gctBOOL InCacheable,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctUINT32 * Physical,
+ OUT gctPOINTER * Logical,
+ OUT gctPOINTER * Handle
+ );
+
+/* Free video memory. */
+gceSTATUS
+gcoOS_FreeVideoMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Handle
+ );
+
+#if gcdENABLE_BANK_ALIGNMENT
+gceSTATUS
+gcoSURF_GetBankOffsetBytes(
+ IN gcoSURF Surfce,
+ IN gceSURF_TYPE Type,
+ IN gctUINT32 Stride,
+ IN gctUINT32_PTR Bytes
+ );
+#endif
+
+/* Map user memory. */
+gceSTATUS
+gcoOS_MapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Map user memory. */
+gceSTATUS
+gcoOS_MapUserMemoryEx(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctUINT32 Physical,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gcoOS_UnmapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+/* Device I/O Control call to the kernel HAL layer. */
+gceSTATUS
+gcoOS_DeviceControl(
+ IN gcoOS Os,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ IN gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/* Allocate non paged memory. */
+gceSTATUS
+gcoOS_AllocateNonPagedMemory(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non paged memory. */
+gceSTATUS
+gcoOS_FreeNonPagedMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+#define gcmOS_SAFE_FREE(os, mem) \
+ gcoOS_Free(os, mem); \
+ mem = gcvNULL
+
+#define gcmkOS_SAFE_FREE(os, mem) \
+ gckOS_Free(os, mem); \
+ mem = gcvNULL
+
+typedef enum _gceFILE_MODE
+{
+ gcvFILE_CREATE = 0,
+ gcvFILE_APPEND,
+ gcvFILE_READ,
+ gcvFILE_CREATETEXT,
+ gcvFILE_APPENDTEXT,
+ gcvFILE_READTEXT,
+}
+gceFILE_MODE;
+
+/* Open a file. */
+gceSTATUS
+gcoOS_Open(
+ IN gcoOS Os,
+ IN gctCONST_STRING FileName,
+ IN gceFILE_MODE Mode,
+ OUT gctFILE * File
+ );
+
+/* Close a file. */
+gceSTATUS
+gcoOS_Close(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Read data from a file. */
+gceSTATUS
+gcoOS_Read(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctPOINTER Data,
+ OUT gctSIZE_T * ByteRead
+ );
+
+/* Write data to a file. */
+gceSTATUS
+gcoOS_Write(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Flush data to a file. */
+gceSTATUS
+gcoOS_Flush(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Create an endpoint for communication. */
+gceSTATUS
+gcoOS_Socket(
+ IN gcoOS Os,
+ IN gctINT Domain,
+ IN gctINT Type,
+ IN gctINT Protocol,
+ OUT gctINT *SockFd
+ );
+
+/* Close a socket. */
+gceSTATUS
+gcoOS_CloseSocket(
+ IN gcoOS Os,
+ IN gctINT SockFd
+ );
+
+/* Initiate a connection on a socket. */
+gceSTATUS
+gcoOS_Connect(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctCONST_POINTER HostName,
+ IN gctUINT Port);
+
+/* Shut down part of connection on a socket. */
+gceSTATUS
+gcoOS_Shutdown(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctINT How
+ );
+
+/* Send a message on a socket. */
+gceSTATUS
+gcoOS_Send(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data,
+ IN gctINT Flags
+ );
+
+/* Initiate a connection on a socket. */
+gceSTATUS
+gcoOS_WaitForSend(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctINT Seconds,
+ IN gctINT MicroSeconds);
+
+/* Get environment variable value. */
+gceSTATUS
+gcoOS_GetEnv(
+ IN gcoOS Os,
+ IN gctCONST_STRING VarName,
+ OUT gctSTRING * Value
+ );
+
+/* Get current working directory. */
+gceSTATUS
+gcoOS_GetCwd(
+ IN gcoOS Os,
+ IN gctINT SizeInBytes,
+ OUT gctSTRING Buffer
+ );
+
+/* Get file status info. */
+gceSTATUS
+gcoOS_Stat(
+ IN gcoOS Os,
+ IN gctCONST_STRING FileName,
+ OUT gctPOINTER Buffer
+ );
+
+typedef enum _gceFILE_WHENCE
+{
+ gcvFILE_SEEK_SET,
+ gcvFILE_SEEK_CUR,
+ gcvFILE_SEEK_END
+}
+gceFILE_WHENCE;
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_Seek(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Offset,
+ IN gceFILE_WHENCE Whence
+ );
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_SetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Position
+ );
+
+/* Get the current position of a file. */
+gceSTATUS
+gcoOS_GetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ OUT gctUINT32 * Position
+ );
+
+/* Same as strstr. */
+gceSTATUS
+gcoOS_StrStr(
+ IN gctCONST_STRING String,
+ IN gctCONST_STRING SubString,
+ OUT gctSTRING * Output
+ );
+
+/* Find the last occurance of a character inside a string. */
+gceSTATUS
+gcoOS_StrFindReverse(
+ IN gctCONST_STRING String,
+ IN gctINT8 Character,
+ OUT gctSTRING * Output
+ );
+
+gceSTATUS
+gcoOS_StrDup(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ OUT gctSTRING * Target
+ );
+
+/* Copy a string. */
+gceSTATUS
+gcoOS_StrCopySafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Append a string. */
+gceSTATUS
+gcoOS_StrCatSafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Compare two strings. */
+gceSTATUS
+gcoOS_StrCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2
+ );
+
+/* Compare characters of two strings. */
+gceSTATUS
+gcoOS_StrNCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2,
+ IN gctSIZE_T Count
+ );
+
+/* Convert string to float. */
+gceSTATUS
+gcoOS_StrToFloat(
+ IN gctCONST_STRING String,
+ OUT gctFLOAT * Float
+ );
+
+/* Convert hex string to integer. */
+gceSTATUS
+gcoOS_HexStrToInt(
+ IN gctCONST_STRING String,
+ OUT gctINT * Int
+ );
+
+/* Convert hex string to float. */
+gceSTATUS
+gcoOS_HexStrToFloat(
+ IN gctCONST_STRING String,
+ OUT gctFLOAT * Float
+ );
+
+/* Convert string to integer. */
+gceSTATUS
+gcoOS_StrToInt(
+ IN gctCONST_STRING String,
+ OUT gctINT * Int
+ );
+
+gceSTATUS
+gcoOS_MemCmp(
+ IN gctCONST_POINTER Memory1,
+ IN gctCONST_POINTER Memory2,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_PrintStrSafe(
+ OUT gctSTRING String,
+ IN gctSIZE_T StringSize,
+ IN OUT gctUINT * Offset,
+ IN gctCONST_STRING Format,
+ ...
+ );
+
+gceSTATUS
+gcoOS_LoadLibrary(
+ IN gcoOS Os,
+ IN gctCONST_STRING Library,
+ OUT gctHANDLE * Handle
+ );
+
+gceSTATUS
+gcoOS_FreeLibrary(
+ IN gcoOS Os,
+ IN gctHANDLE Handle
+ );
+
+gceSTATUS
+gcoOS_GetProcAddress(
+ IN gcoOS Os,
+ IN gctHANDLE Handle,
+ IN gctCONST_STRING Name,
+ OUT gctPOINTER * Function
+ );
+
+gceSTATUS
+gcoOS_Compact(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_AddSignalHandler (
+ IN gceSignalHandlerType SignalHandlerType
+ );
+
+#if VIVANTE_PROFILER
+gceSTATUS
+gcoOS_ProfileStart(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_ProfileEnd(
+ IN gcoOS Os,
+ IN gctCONST_STRING Title
+ );
+
+gceSTATUS
+gcoOS_SetProfileSetting(
+ IN gcoOS Os,
+ IN gctBOOL Enable,
+ IN gctCONST_STRING FileName
+ );
+#endif
+
+gctBOOL
+gcoOS_IsNeededSupportNP2Texture(
+ IN gctCHAR* ProcName
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gcoOS_QueryVideoMemory(
+ IN gcoOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Detect if the process is the executable specified. */
+gceSTATUS
+gcoOS_DetectProcessByNamePid(
+ IN gctCONST_STRING Name,
+ IN gctHANDLE Pid
+ );
+
+/* Detect if the current process is the executable specified. */
+gceSTATUS
+gcoOS_DetectProcessByName(
+ IN gctCONST_STRING Name
+ );
+
+gceSTATUS
+gcoOS_DetectProcessByEncryptedName(
+ IN gctCONST_STRING Name
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Atoms ----------------------------------------------------------------*/
+
+/* Construct an atom. */
+gceSTATUS
+gcoOS_AtomConstruct(
+ IN gcoOS Os,
+ OUT gcsATOM_PTR * Atom
+ );
+
+/* Destroy an atom. */
+gceSTATUS
+gcoOS_AtomDestroy(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom
+ );
+
+/* Increment an atom. */
+gceSTATUS
+gcoOS_AtomIncrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+/* Decrement an atom. */
+gceSTATUS
+gcoOS_AtomDecrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+gctHANDLE
+gcoOS_GetCurrentProcessID(
+ void
+ );
+
+gctHANDLE
+gcoOS_GetCurrentThreadID(
+ void
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Time -----------------------------------------------------------------*/
+
+/* Get the number of milliseconds since the system started. */
+gctUINT32
+gcoOS_GetTicks(
+ void
+ );
+
+/* Get time in microseconds. */
+gceSTATUS
+gcoOS_GetTime(
+ gctUINT64_PTR Time
+ );
+
+/* Get CPU usage in microseconds. */
+gceSTATUS
+gcoOS_GetCPUTime(
+ gctUINT64_PTR CPUTime
+ );
+
+/* Get memory usage. */
+gceSTATUS
+gcoOS_GetMemoryUsage(
+ gctUINT32_PTR MaxRSS,
+ gctUINT32_PTR IxRSS,
+ gctUINT32_PTR IdRSS,
+ gctUINT32_PTR IsRSS
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gcoOS_Delay(
+ IN gcoOS Os,
+ IN gctUINT32 Delay
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Threads --------------------------------------------------------------*/
+
+#ifdef _WIN32
+/* Cannot include windows.h here becuase "near" and "far"
+ * which are used in gcsDEPTH_INFO, are defined to nothing in WinDef.h.
+ * So, use the real value of DWORD and WINAPI, instead.
+ * DWORD is unsigned long, and WINAPI is __stdcall.
+ * If these two are change in WinDef.h, the following two typdefs
+ * need to be changed, too.
+ */
+typedef unsigned long gctTHREAD_RETURN;
+typedef unsigned long (__stdcall * gcTHREAD_ROUTINE)(void * Argument);
+#else
+typedef void * gctTHREAD_RETURN;
+typedef void * (* gcTHREAD_ROUTINE)(void *);
+#endif
+
+/* Create a new thread. */
+gceSTATUS
+gcoOS_CreateThread(
+ IN gcoOS Os,
+ IN gcTHREAD_ROUTINE Worker,
+ IN gctPOINTER Argument,
+ OUT gctPOINTER * Thread
+ );
+
+/* Close a thread. */
+gceSTATUS
+gcoOS_CloseThread(
+ IN gcoOS Os,
+ IN gctPOINTER Thread
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Mutexes --------------------------------------------------------------*/
+
+/* Create a new mutex. */
+gceSTATUS
+gcoOS_CreateMutex(
+ IN gcoOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gcoOS_DeleteMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gcoOS_AcquireMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gcoOS_ReleaseMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Signals --------------------------------------------------------------*/
+
+/* Create a signal. */
+gceSTATUS
+gcoOS_CreateSignal(
+ IN gcoOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gcoOS_DestroySignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gcoOS_Signal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gcoOS_WaitSignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Map a signal from another process */
+gceSTATUS
+gcoOS_MapSignal(
+ IN gctSIGNAL RemoteSignal,
+ OUT gctSIGNAL * LocalSignal
+ );
+
+/* Unmap a signal mapped from another process */
+gceSTATUS
+gcoOS_UnmapSignal(
+ IN gctSIGNAL Signal
+ );
+
+/* Write a register. */
+gceSTATUS
+gcoOS_WriteRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Read a register. */
+gceSTATUS
+gcoOS_ReadRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+gceSTATUS
+gcoOS_CacheClean(
+ IN gcoOS Os,
+ IN gctUINT64 Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_CacheFlush(
+ IN gcoOS Os,
+ IN gctUINT64 Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_CacheInvalidate(
+ IN gcoOS Os,
+ IN gctUINT64 Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_MemoryBarrier(
+ IN gcoOS Os,
+ IN gctPOINTER Logical
+ );
+
+
+/*----------------------------------------------------------------------------*/
+/*----- Profile --------------------------------------------------------------*/
+
+gceSTATUS
+gckOS_GetProfileTick(
+ OUT gctUINT64_PTR Tick
+ );
+
+gceSTATUS
+gckOS_QueryProfileTickRate(
+ OUT gctUINT64_PTR TickRate
+ );
+
+gctUINT32
+gckOS_ProfileToMS(
+ IN gctUINT64 Ticks
+ );
+
+gceSTATUS
+gcoOS_GetProfileTick(
+ OUT gctUINT64_PTR Tick
+ );
+
+gceSTATUS
+gcoOS_QueryProfileTickRate(
+ OUT gctUINT64_PTR TickRate
+ );
+
+#define _gcmPROFILE_INIT(prefix, freq, start) \
+ do { \
+ prefix ## OS_QueryProfileTickRate(&(freq)); \
+ prefix ## OS_GetProfileTick(&(start)); \
+ } while (gcvFALSE)
+
+#define _gcmPROFILE_QUERY(prefix, start, ticks) \
+ do { \
+ prefix ## OS_GetProfileTick(&(ticks)); \
+ (ticks) = ((ticks) > (start)) ? ((ticks) - (start)) \
+ : (~0ull - (start) + (ticks) + 1); \
+ } while (gcvFALSE)
+
+#if gcdENABLE_PROFILING
+# define gcmkPROFILE_INIT(freq, start) _gcmPROFILE_INIT(gck, freq, start)
+# define gcmkPROFILE_QUERY(start, ticks) _gcmPROFILE_QUERY(gck, start, ticks)
+# define gcmPROFILE_INIT(freq, start) _gcmPROFILE_INIT(gco, freq, start)
+# define gcmPROFILE_QUERY(start, ticks) _gcmPROFILE_QUERY(gco, start, ticks)
+# define gcmPROFILE_ONLY(x) x
+# define gcmPROFILE_ELSE(x) do { } while (gcvFALSE)
+# define gcmPROFILE_DECLARE_ONLY(x) x
+# define gcmPROFILE_DECLARE_ELSE(x) typedef x
+#else
+# define gcmkPROFILE_INIT(start, freq) do { } while (gcvFALSE)
+# define gcmkPROFILE_QUERY(start, ticks) do { } while (gcvFALSE)
+# define gcmPROFILE_INIT(start, freq) do { } while (gcvFALSE)
+# define gcmPROFILE_QUERY(start, ticks) do { } while (gcvFALSE)
+# define gcmPROFILE_ONLY(x) do { } while (gcvFALSE)
+# define gcmPROFILE_ELSE(x) x
+# define gcmPROFILE_DECLARE_ONLY(x) typedef x
+# define gcmPROFILE_DECLARE_ELSE(x) x
+#endif
+
+/*******************************************************************************
+** gcoMATH object
+*/
+
+#define gcdPI 3.14159265358979323846f
+
+/* Kernel. */
+gctINT
+gckMATH_ModuloInt(
+ IN gctINT X,
+ IN gctINT Y
+ );
+
+/* User. */
+gctUINT32
+gcoMATH_Log2in5dot5(
+ IN gctINT X
+ );
+
+
+gctFLOAT
+gcoMATH_UIntAsFloat(
+ IN gctUINT32 X
+ );
+
+gctUINT32
+gcoMATH_FloatAsUInt(
+ IN gctFLOAT X
+ );
+
+gctBOOL
+gcoMATH_CompareEqualF(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+gctUINT16
+gcoMATH_UInt8AsFloat16(
+ IN gctUINT8 X
+ );
+
+/******************************************************************************\
+**************************** Coordinate Structures *****************************
+\******************************************************************************/
+
+typedef struct _gcsPOINT
+{
+ gctINT32 x;
+ gctINT32 y;
+}
+gcsPOINT;
+
+typedef struct _gcsSIZE
+{
+ gctINT32 width;
+ gctINT32 height;
+}
+gcsSIZE;
+
+typedef struct _gcsRECT
+{
+ gctINT32 left;
+ gctINT32 top;
+ gctINT32 right;
+ gctINT32 bottom;
+}
+gcsRECT;
+
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*------------------------------- gcoSURF Common ------------------------------*/
+
+/* Color format classes. */
+typedef enum _gceFORMAT_CLASS
+{
+ gcvFORMAT_CLASS_RGBA = 4500,
+ gcvFORMAT_CLASS_YUV,
+ gcvFORMAT_CLASS_INDEX,
+ gcvFORMAT_CLASS_LUMINANCE,
+ gcvFORMAT_CLASS_BUMP,
+ gcvFORMAT_CLASS_DEPTH,
+}
+gceFORMAT_CLASS;
+
+/* Special enums for width field in gcsFORMAT_COMPONENT. */
+typedef enum _gceCOMPONENT_CONTROL
+{
+ gcvCOMPONENT_NOTPRESENT = 0x00,
+ gcvCOMPONENT_DONTCARE = 0x80,
+ gcvCOMPONENT_WIDTHMASK = 0x7F,
+ gcvCOMPONENT_ODD = 0x80
+}
+gceCOMPONENT_CONTROL;
+
+/* Color format component parameters. */
+typedef struct _gcsFORMAT_COMPONENT
+{
+ gctUINT8 start;
+ gctUINT8 width;
+}
+gcsFORMAT_COMPONENT;
+
+/* RGBA color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_RGBA
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT red;
+ gcsFORMAT_COMPONENT green;
+ gcsFORMAT_COMPONENT blue;
+}
+gcsFORMAT_CLASS_TYPE_RGBA;
+
+/* YUV color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_YUV
+{
+ gcsFORMAT_COMPONENT y;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT v;
+}
+gcsFORMAT_CLASS_TYPE_YUV;
+
+/* Index color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_INDEX
+{
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_INDEX;
+
+/* Luminance color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_LUMINANCE
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_LUMINANCE;
+
+/* Bump map color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_BUMP
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT l;
+ gcsFORMAT_COMPONENT v;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT q;
+ gcsFORMAT_COMPONENT w;
+}
+gcsFORMAT_CLASS_TYPE_BUMP;
+
+/* Depth and stencil format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_DEPTH
+{
+ gcsFORMAT_COMPONENT depth;
+ gcsFORMAT_COMPONENT stencil;
+}
+gcsFORMAT_CLASS_TYPE_DEPTH;
+
+/* Format parameters. */
+typedef struct _gcsSURF_FORMAT_INFO
+{
+ /* Format code and class. */
+ gceSURF_FORMAT format;
+ gceFORMAT_CLASS fmtClass;
+
+ /* The size of one pixel in bits. */
+ gctUINT8 bitsPerPixel;
+
+ /* Component swizzle. */
+ gceSURF_SWIZZLE swizzle;
+
+ /* Some formats have two neighbour pixels interleaved together. */
+ /* To describe such format, set the flag to 1 and add another */
+ /* like this one describing the odd pixel format. */
+ gctUINT8 interleaved;
+
+ /* Format components. */
+ union
+ {
+ gcsFORMAT_CLASS_TYPE_BUMP bump;
+ gcsFORMAT_CLASS_TYPE_RGBA rgba;
+ gcsFORMAT_CLASS_TYPE_YUV yuv;
+ gcsFORMAT_CLASS_TYPE_LUMINANCE lum;
+ gcsFORMAT_CLASS_TYPE_INDEX index;
+ gcsFORMAT_CLASS_TYPE_DEPTH depth;
+ } u;
+}
+gcsSURF_FORMAT_INFO;
+
+/* Frame buffer information. */
+typedef struct _gcsSURF_FRAMEBUFFER
+{
+ gctPOINTER logical;
+ gctUINT width, height;
+ gctINT stride;
+ gceSURF_FORMAT format;
+}
+gcsSURF_FRAMEBUFFER;
+
+typedef struct _gcsVIDMEM_NODE_SHARED_INFO
+{
+ gctBOOL tileStatusDisabled;
+ gcsPOINT SrcOrigin;
+ gcsPOINT DestOrigin;
+ gcsSIZE RectSize;
+ gctUINT32 clearValue;
+}
+gcsVIDMEM_NODE_SHARED_INFO;
+
+/* Generic pixel component descriptors. */
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XXX8;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XX8X;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_X8XX;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_8XXX;
+
+typedef enum _gceORIENTATION
+{
+ gcvORIENTATION_TOP_BOTTOM,
+ gcvORIENTATION_BOTTOM_TOP,
+}
+gceORIENTATION;
+
+
+/* Construct a new gcoSURF object. */
+gceSTATUS
+gcoSURF_Construct(
+ IN gcoHAL Hal,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+/* Destroy an gcoSURF object. */
+gceSTATUS
+gcoSURF_Destroy(
+ IN gcoSURF Surface
+ );
+
+/* Map user-allocated surface. */
+gceSTATUS
+gcoSURF_MapUserSurface(
+ IN gcoSURF Surface,
+ IN gctUINT Alignment,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Query vid mem node info. */
+gceSTATUS
+gcoSURF_QueryVidMemNode(
+ IN gcoSURF Surface,
+ OUT gctUINT64 * Node,
+ OUT gcePOOL * Pool,
+ OUT gctUINT_PTR Bytes
+ );
+
+/* Set usage attribute of a surface. */
+gceSTATUS
+gcoSURF_SetUsage(
+ IN gcoSURF Surface,
+ IN gceSURF_USAGE Usage
+ );
+
+/* Return usage attribute of a surface. */
+gceSTATUS
+gcoSURF_QueryUsage(
+ IN gcoSURF Surface,
+ OUT gceSURF_USAGE *Usage
+ );
+
+/* Set the color type of the surface. */
+gceSTATUS
+gcoSURF_SetColorType(
+ IN gcoSURF Surface,
+ IN gceSURF_COLOR_TYPE ColorType
+ );
+
+/* Get the color type of the surface. */
+gceSTATUS
+gcoSURF_GetColorType(
+ IN gcoSURF Surface,
+ OUT gceSURF_COLOR_TYPE *ColorType
+ );
+
+/* Set the surface ration angle. */
+gceSTATUS
+gcoSURF_SetRotation(
+ IN gcoSURF Surface,
+ IN gceSURF_ROTATION Rotation
+ );
+
+gceSTATUS
+gcoSURF_IsValid(
+ IN gcoSURF Surface
+ );
+
+#ifndef VIVANTE_NO_3D
+/* Verify and return the state of the tile status mechanism. */
+gceSTATUS
+gcoSURF_IsTileStatusSupported(
+ IN gcoSURF Surface
+ );
+
+/* Process tile status for the specified surface. */
+gceSTATUS
+gcoSURF_SetTileStatus(
+ IN gcoSURF Surface
+ );
+
+/* Enable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_EnableTileStatus(
+ IN gcoSURF Surface
+ );
+
+/* Disable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_DisableTileStatus(
+ IN gcoSURF Surface,
+ IN gctBOOL Decompress
+ );
+#endif /* VIVANTE_NO_3D */
+
+/* Get surface size. */
+gceSTATUS
+gcoSURF_GetSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctUINT * Depth
+ );
+
+/* Get surface aligned sizes. */
+gceSTATUS
+gcoSURF_GetAlignedSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctINT * Stride
+ );
+
+/* Get alignments. */
+gceSTATUS
+gcoSURF_GetAlignment(
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ OUT gctUINT * AddressAlignment,
+ OUT gctUINT * XAlignment,
+ OUT gctUINT * YAlignment
+ );
+
+/* Get surface type and format. */
+gceSTATUS
+gcoSURF_GetFormat(
+ IN gcoSURF Surface,
+ OUT gceSURF_TYPE * Type,
+ OUT gceSURF_FORMAT * Format
+ );
+
+/* Get surface tiling. */
+gceSTATUS
+gcoSURF_GetTiling(
+ IN gcoSURF Surface,
+ OUT gceTILING * Tiling
+ );
+
+/* Lock the surface. */
+gceSTATUS
+gcoSURF_Lock(
+ IN gcoSURF Surface,
+ IN OUT gctUINT32 * Address,
+ IN OUT gctPOINTER * Memory
+ );
+
+/* Unlock the surface. */
+gceSTATUS
+gcoSURF_Unlock(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory
+ );
+
+/* Return pixel format parameters. */
+gceSTATUS
+gcoSURF_QueryFormat(
+ IN gceSURF_FORMAT Format,
+ OUT gcsSURF_FORMAT_INFO_PTR * Info
+ );
+
+/* Compute the color pixel mask. */
+gceSTATUS
+gcoSURF_ComputeColorMask(
+ IN gcsSURF_FORMAT_INFO_PTR Format,
+ OUT gctUINT32_PTR ColorMask
+ );
+
+/* Flush the surface. */
+gceSTATUS
+gcoSURF_Flush(
+ IN gcoSURF Surface
+ );
+
+/* Fill surface from it's tile status buffer. */
+gceSTATUS
+gcoSURF_FillFromTile(
+ IN gcoSURF Surface
+ );
+
+/* Fill surface with a value. */
+gceSTATUS
+gcoSURF_Fill(
+ IN gcoSURF Surface,
+ IN gcsPOINT_PTR Origin,
+ IN gcsSIZE_PTR Size,
+ IN gctUINT32 Value,
+ IN gctUINT32 Mask
+ );
+
+/* Alpha blend two surfaces together. */
+gceSTATUS
+gcoSURF_Blend(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrig,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsSIZE_PTR Size,
+ IN gceSURF_BLEND_MODE Mode
+ );
+
+/* Create a new gcoSURF wrapper object. */
+gceSTATUS
+gcoSURF_ConstructWrapper(
+ IN gcoHAL Hal,
+ OUT gcoSURF * Surface
+ );
+
+/* Set the underlying buffer for the surface wrapper. */
+gceSTATUS
+gcoSURF_SetBuffer(
+ IN gcoSURF Surface,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Stride,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Set the size of the surface in pixels and map the underlying buffer. */
+gceSTATUS
+gcoSURF_SetWindow(
+ IN gcoSURF Surface,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height
+ );
+
+/* Increase reference count of the surface. */
+gceSTATUS
+gcoSURF_ReferenceSurface(
+ IN gcoSURF Surface
+ );
+
+/* Get surface reference count. */
+gceSTATUS
+gcoSURF_QueryReferenceCount(
+ IN gcoSURF Surface,
+ OUT gctINT32 * ReferenceCount
+ );
+
+/* Set surface orientation. */
+gceSTATUS
+gcoSURF_SetOrientation(
+ IN gcoSURF Surface,
+ IN gceORIENTATION Orientation
+ );
+
+/* Query surface orientation. */
+gceSTATUS
+gcoSURF_QueryOrientation(
+ IN gcoSURF Surface,
+ OUT gceORIENTATION * Orientation
+ );
+
+gceSTATUS
+gcoSURF_SetOffset(
+ IN gcoSURF Surface,
+ IN gctUINT Offset
+ );
+
+gceSTATUS
+gcoSURF_NODE_Cache(
+ IN gcsSURF_NODE_PTR Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes,
+ IN gceCACHEOPERATION Operation
+ );
+
+/* Perform CPU cache operation on surface */
+gceSTATUS
+gcoSURF_CPUCacheOperation(
+ IN gcoSURF Surface,
+ IN gceCACHEOPERATION Operation
+ );
+
+
+gceSTATUS
+gcoSURF_SetLinearResolveAddress(
+ IN gcoSURF Surface,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory
+ );
+
+ gceSTATUS
+ gcoSURF_Swap(IN gcoSURF Surface1, IN gcoSURF Surface2);
+
+/******************************************************************************\
+********************************* gcoDUMP Object ********************************
+\******************************************************************************/
+
+/* Construct a new gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Construct(
+ IN gcoOS Os,
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Destroy a gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Destroy(
+ IN gcoDUMP Dump
+ );
+
+/* Enable/disable dumping. */
+gceSTATUS
+gcoDUMP_Control(
+ IN gcoDUMP Dump,
+ IN gctSTRING FileName
+ );
+
+gceSTATUS
+gcoDUMP_IsEnabled(
+ IN gcoDUMP Dump,
+ OUT gctBOOL * Enabled
+ );
+
+/* Add surface. */
+gceSTATUS
+gcoDUMP_AddSurface(
+ IN gcoDUMP Dump,
+ IN gctINT32 Width,
+ IN gctINT32 Height,
+ IN gceSURF_FORMAT PixelFormat,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount
+ );
+
+/* Mark the beginning of a frame. */
+gceSTATUS
+gcoDUMP_FrameBegin(
+ IN gcoDUMP Dump
+ );
+
+/* Mark the end of a frame. */
+gceSTATUS
+gcoDUMP_FrameEnd(
+ IN gcoDUMP Dump
+ );
+
+/* Dump data. */
+gceSTATUS
+gcoDUMP_DumpData(
+ IN gcoDUMP Dump,
+ IN gceDUMP_TAG Type,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Delete an address. */
+gceSTATUS
+gcoDUMP_Delete(
+ IN gcoDUMP Dump,
+ IN gctUINT32 Address
+ );
+
+/* Enable dump or not. */
+gceSTATUS
+gcoDUMP_SetDumpFlag(
+ IN gctBOOL DumpState
+ );
+
+/******************************************************************************\
+******************************* gcsRECT Structure ******************************
+\******************************************************************************/
+
+/* Initialize rectangle structure. */
+gceSTATUS
+gcsRECT_Set(
+ OUT gcsRECT_PTR Rect,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Return the width of the rectangle. */
+gceSTATUS
+gcsRECT_Width(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Width
+ );
+
+/* Return the height of the rectangle. */
+gceSTATUS
+gcsRECT_Height(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Height
+ );
+
+/* Ensure that top left corner is to the left and above the right bottom. */
+gceSTATUS
+gcsRECT_Normalize(
+ IN OUT gcsRECT_PTR Rect
+ );
+
+/* Compare two rectangles. */
+gceSTATUS
+gcsRECT_IsEqual(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * Equal
+ );
+
+/* Compare the sizes of two rectangles. */
+gceSTATUS
+gcsRECT_IsOfEqualSize(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * EqualSize
+ );
+
+gceSTATUS
+gcsRECT_RelativeRotation(
+ IN gceSURF_ROTATION Orientation,
+ IN OUT gceSURF_ROTATION *Relation);
+
+gceSTATUS
+
+gcsRECT_Rotate(
+
+ IN OUT gcsRECT_PTR Rect,
+
+ IN gceSURF_ROTATION Rotation,
+
+ IN gceSURF_ROTATION toRotation,
+
+ IN gctINT32 SurfaceWidth,
+
+ IN gctINT32 SurfaceHeight
+
+ );
+
+/******************************************************************************\
+**************************** gcsBOUNDARY Structure *****************************
+\******************************************************************************/
+
+typedef struct _gcsBOUNDARY
+{
+ gctINT x;
+ gctINT y;
+ gctINT width;
+ gctINT height;
+}
+gcsBOUNDARY;
+
+/******************************************************************************\
+********************************* gcoHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gcoHEAP * gcoHEAP;
+
+/* Construct a new gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Construct(
+ IN gcoOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gcoHEAP * Heap
+ );
+
+/* Destroy an gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Destroy(
+ IN gcoHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoHEAP_Allocate(
+ IN gcoHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcoHEAP_GetMemorySize(
+ IN gcoHEAP Heap,
+ IN gctPOINTER Memory,
+ OUT gctSIZE_T_PTR MemorySize
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoHEAP_Free(
+ IN gcoHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+#if (VIVANTE_PROFILER || gcdDEBUG)
+/* Profile the heap. */
+gceSTATUS
+gcoHEAP_ProfileStart(
+ IN gcoHEAP Heap
+ );
+
+gceSTATUS
+gcoHEAP_ProfileEnd(
+ IN gcoHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+#endif
+
+
+/******************************************************************************\
+******************************* Debugging Macros *******************************
+\******************************************************************************/
+
+void
+gcoOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gcoOS_GetDebugLevel(
+ OUT gctUINT32_PTR DebugLevel
+ );
+
+void
+gcoOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_GetDebugZone(
+ IN gctUINT32 Zone,
+ OUT gctUINT32_PTR DebugZone
+ );
+
+void
+gcoOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gcoOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+gctFILE
+gcoOS_ReplaceDebugFile(
+ IN gctFILE fp
+ );
+
+/*******************************************************************************
+**
+** gcmFATAL
+**
+** Print a message to the debugger and execute a break point.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_FATAL)
+# define gcmFATAL gcoOS_DebugFatal
+# define gcmkFATAL gckOS_DebugFatal
+#elif gcdHAS_ELLIPSES
+# define gcmFATAL(...)
+# define gcmkFATAL(...)
+#else
+ gcmINLINE static void
+ __dummy_fatal(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmFATAL __dummy_fatal
+# define gcmkFATAL __dummy_fatal
+#endif
+
+#define gcmENUM2TEXT(e) case e: return #e
+
+/*******************************************************************************
+**
+** gcmTRACE
+**
+** Print a message to the debugfer if the correct level has been set. In
+** retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** level Level of message.
+** message Message.
+** ... Optional arguments.
+*/
+#define gcvLEVEL_NONE -1
+#define gcvLEVEL_ERROR 0
+#define gcvLEVEL_WARNING 1
+#define gcvLEVEL_INFO 2
+#define gcvLEVEL_VERBOSE 3
+
+void
+gckOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_DebugTraceN(
+ IN gctUINT32 Level,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+# define gcmTRACE gcoOS_DebugTrace
+# define gcmkTRACE gckOS_DebugTrace
+# define gcmkTRACE_N gckOS_DebugTraceN
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE(...)
+# define gcmkTRACE(...)
+# define gcmkTRACE_N(...)
+#else
+ gcmINLINE static void
+ __dummy_trace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+ gcmINLINE static void
+ __dummy_trace_n(
+ IN gctUINT32 Level,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+# define gcmTRACE __dummy_trace
+# define gcmkTRACE __dummy_trace
+# define gcmkTRACE_N __dummy_trace_n
+#endif
+
+/* Zones common for kernel and user. */
+#define gcvZONE_OS (1 << 0)
+#define gcvZONE_HARDWARE (1 << 1)
+#define gcvZONE_HEAP (1 << 2)
+#define gcvZONE_SIGNAL (1 << 27)
+
+/* Kernel zones. */
+#define gcvZONE_KERNEL (1 << 3)
+#define gcvZONE_VIDMEM (1 << 4)
+#define gcvZONE_COMMAND (1 << 5)
+#define gcvZONE_DRIVER (1 << 6)
+#define gcvZONE_CMODEL (1 << 7)
+#define gcvZONE_MMU (1 << 8)
+#define gcvZONE_EVENT (1 << 9)
+#define gcvZONE_DEVICE (1 << 10)
+#define gcvZONE_DATABASE (1 << 11)
+#define gcvZONE_INTERRUPT (1 << 12)
+#define gcvZONE_POWER (1 << 13)
+
+/* User zones. */
+#define gcvZONE_HAL (1 << 3)
+#define gcvZONE_BUFFER (1 << 4)
+#define gcvZONE_CONTEXT (1 << 5)
+#define gcvZONE_SURFACE (1 << 6)
+#define gcvZONE_INDEX (1 << 7)
+#define gcvZONE_STREAM (1 << 8)
+#define gcvZONE_TEXTURE (1 << 9)
+#define gcvZONE_2D (1 << 10)
+#define gcvZONE_3D (1 << 11)
+#define gcvZONE_COMPILER (1 << 12)
+#define gcvZONE_MEMORY (1 << 13)
+#define gcvZONE_STATE (1 << 14)
+#define gcvZONE_AUX (1 << 15)
+#define gcvZONE_VERTEX (1 << 16)
+#define gcvZONE_CL (1 << 17)
+#define gcvZONE_COMPOSITION (1 << 17)
+#define gcvZONE_VG (1 << 18)
+#define gcvZONE_IMAGE (1 << 19)
+#define gcvZONE_UTILITY (1 << 20)
+#define gcvZONE_PARAMETERS (1 << 21)
+
+/* API definitions. */
+#define gcvZONE_API_HAL (1 << 28)
+#define gcvZONE_API_EGL (2 << 28)
+#define gcvZONE_API_ES11 (3 << 28)
+#define gcvZONE_API_ES20 (4 << 28)
+#define gcvZONE_API_VG11 (5 << 28)
+#define gcvZONE_API_GL (6 << 28)
+#define gcvZONE_API_DFB (7 << 28)
+#define gcvZONE_API_GDI (8 << 28)
+#define gcvZONE_API_D3D (9 << 28)
+#define gcvZONE_API_ES30 (10 << 28)
+
+
+#define gcmZONE_GET_API(zone) ((zone) >> 28)
+/*Set gcdZONE_MASE like 0x0 | gcvZONE_API_EGL
+will enable print EGL module debug info*/
+#define gcdZONE_MASK 0x0FFFFFFF
+
+/* Handy zones. */
+#define gcvZONE_NONE 0
+#define gcvZONE_ALL 0x0FFFFFFF
+
+/*Dump API depth set 1 for API, 2 for API and API behavior*/
+#define gcvDUMP_API_DEPTH 1
+
+/*******************************************************************************
+**
+** gcmTRACE_ZONE
+**
+** Print a message to the debugger if the correct level and zone has been
+** set. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** Level Level of message.
+** Zone Zone of message.
+** Message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_DebugTraceZoneN(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+# define gcmTRACE_ZONE gcoOS_DebugTraceZone
+# define gcmkTRACE_ZONE gckOS_DebugTraceZone
+# define gcmkTRACE_ZONE_N gckOS_DebugTraceZoneN
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE_ZONE(...)
+# define gcmkTRACE_ZONE(...)
+# define gcmkTRACE_ZONE_N(...)
+#else
+ gcmINLINE static void
+ __dummy_trace_zone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+ gcmINLINE static void
+ __dummy_trace_zone_n(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+# define gcmTRACE_ZONE __dummy_trace_zone
+# define gcmkTRACE_ZONE __dummy_trace_zone
+# define gcmkTRACE_ZONE_N __dummy_trace_zone_n
+#endif
+
+/*******************************************************************************
+**
+** gcmDEBUG_ONLY
+**
+** Execute a statement or function only in DEBUG mode.
+**
+** ARGUMENTS:
+**
+** f Statement or function to execute.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+# define gcmDEBUG_ONLY(f) f
+#else
+# define gcmDEBUG_ONLY(f)
+#endif
+
+/*******************************************************************************
+**
+** gcmSTACK_PUSH
+** gcmSTACK_POP
+** gcmSTACK_DUMP
+**
+** Push or pop a function with entry arguments on the trace stack.
+**
+** ARGUMENTS:
+**
+** Function Name of function.
+** Line Line number.
+** Text Optional text.
+** ... Optional arguments for text.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_STACK)
+ void
+ gcoOS_StackPush(
+ IN gctCONST_STRING Function,
+ IN gctINT Line,
+ IN gctCONST_STRING Text,
+ ...
+ );
+ void
+ gcoOS_StackPop(
+ IN gctCONST_STRING Function
+ );
+ void
+ gcoOS_StackDump(
+ void
+ );
+# define gcmSTACK_PUSH gcoOS_StackPush
+# define gcmSTACK_POP gcoOS_StackPop
+# define gcmSTACK_DUMP gcoOS_StackDump
+#elif gcdHAS_ELLIPSES
+# define gcmSTACK_PUSH(...) do { } while (0)
+# define gcmSTACK_POP(Function) do { } while (0)
+# define gcmSTACK_DUMP() do { } while (0)
+#else
+ gcmINLINE static void
+ __dummy_stack_push(
+ IN gctCONST_STRING Function,
+ IN gctINT Line,
+ IN gctCONST_STRING Text, ...
+ )
+ {
+ }
+# define gcmSTACK_PUSH __dummy_stack_push
+# define gcmSTACK_POP(Function) do { } while (0)
+# define gcmSTACK_DUMP() do { } while (0)
+#endif
+
+/******************************************************************************\
+******************************** Logging Macros ********************************
+\******************************************************************************/
+
+#define gcdHEADER_LEVEL gcvLEVEL_VERBOSE
+
+
+#if gcdENABLE_PROFILING
+void
+gcoOS_ProfileDB(
+ IN gctCONST_STRING Function,
+ IN OUT gctBOOL_PTR Initialized
+ );
+
+#define gcmHEADER() \
+ static gctBOOL __profile__initialized__ = gcvFALSE; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, gcvNULL, gcvNULL); \
+ gcoOS_ProfileDB(__FUNCTION__, &__profile__initialized__)
+#define gcmHEADER_ARG(...) \
+ static gctBOOL __profile__initialized__ = gcvFALSE; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, Text, __VA_ARGS__); \
+ gcoOS_ProfileDB(__FUNCTION__, &__profile__initialized__)
+#define gcmFOOTER() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(__FUNCTION__, gcvNULL)
+#define gcmFOOTER_NO() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(__FUNCTION__, gcvNULL)
+#define gcmFOOTER_ARG(...) \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(__FUNCTION__, gcvNULL)
+#define gcmFOOTER_KILL() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(gcvNULL, gcvNULL)
+
+#else /* gcdENABLE_PROFILING */
+
+#if gcdHAS_ELLIPSES
+#define gcmHEADER() \
+ gctINT8 __user__ = 1; \
+ gctINT8_PTR __user_ptr__ = &__user__; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, gcvNULL, gcvNULL); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+#else
+ gcmINLINE static void
+ __dummy_header(void)
+ {
+ }
+# define gcmHEADER __dummy_header
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmHEADER_ARG(Text, ...) \
+ gctINT8 __user__ = 1; \
+ gctINT8_PTR __user_ptr__ = &__user__; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, Text, __VA_ARGS__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_header_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmHEADER_ARG __dummy_header_arg
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmFOOTER() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmPROFILE_ONLY(gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d) [%llu,%llu]: status=%d(%s)", \
+ __FUNCTION__, __LINE__, \
+ __ticks__, __total__, \
+ status, gcoOS_DebugStatus2Name(status))); \
+ gcmPROFILE_ELSE(gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d(%s)", \
+ __FUNCTION__, __LINE__, \
+ status, gcoOS_DebugStatus2Name(status))); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer(void)
+ {
+ }
+# define gcmFOOTER __dummy_footer
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmFOOTER_NO() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer_no(void)
+ {
+ }
+# define gcmFOOTER_NO __dummy_footer_no
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmFOOTER_KILL() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer_kill(void)
+ {
+ }
+# define gcmFOOTER_KILL __dummy_footer_kill
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmFOOTER_ARG(Text, ...) \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmFOOTER_ARG __dummy_footer_arg
+#endif
+
+#endif /* gcdENABLE_PROFILING */
+
+#if gcdHAS_ELLIPSES
+#define gcmkHEADER() \
+ gctINT8 __kernel__ = 1; \
+ gctINT8_PTR __kernel_ptr__ = &__kernel__; \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+#else
+ gcmINLINE static void
+ __dummy_kheader(void)
+ {
+ }
+# define gcmkHEADER __dummy_kheader
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmkHEADER_ARG(Text, ...) \
+ gctINT8 __kernel__ = 1; \
+ gctINT8_PTR __kernel_ptr__ = &__kernel__; \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_kheader_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkHEADER_ARG __dummy_kheader_arg
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmkFOOTER() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d(%s)", \
+ __FUNCTION__, __LINE__, status, gckOS_DebugStatus2Name(status)); \
+ *__kernel_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_kfooter(void)
+ {
+ }
+# define gcmkFOOTER __dummy_kfooter
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmkFOOTER_NO() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__); \
+ *__kernel_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_kfooter_no(void)
+ {
+ }
+# define gcmkFOOTER_NO __dummy_kfooter_no
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmkFOOTER_ARG(Text, ...) \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, \
+ __FUNCTION__, __LINE__, __VA_ARGS__); \
+ *__kernel_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_kfooter_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkFOOTER_ARG __dummy_kfooter_arg
+#endif
+
+#define gcmOPT_VALUE(ptr) (((ptr) == gcvNULL) ? 0 : *(ptr))
+#define gcmOPT_VALUE_INDEX(ptr, index) (((ptr) == gcvNULL) ? 0 : ptr[index])
+#define gcmOPT_POINTER(ptr) (((ptr) == gcvNULL) ? gcvNULL : *(ptr))
+#define gcmOPT_STRING(ptr) (((ptr) == gcvNULL) ? "(nil)" : (ptr))
+
+void
+gckOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_PrintN(
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_CopyPrint(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#define gcmPRINT gcoOS_Print
+#define gcmkPRINT gckOS_Print
+#define gcmkPRINT_N gckOS_PrintN
+
+#if gcdPRINT_VERSION
+# define gcmPRINT_VERSION() do { \
+ _gcmPRINT_VERSION(gcm); \
+ gcmSTACK_DUMP(); \
+ } while (0)
+# define gcmkPRINT_VERSION() _gcmPRINT_VERSION(gcmk)
+# define _gcmPRINT_VERSION(prefix) \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ "Vivante HAL version %d.%d.%d build %d %s %s", \
+ gcvVERSION_MAJOR, gcvVERSION_MINOR, gcvVERSION_PATCH, \
+ gcvVERSION_BUILD, gcvVERSION_DATE, gcvVERSION_TIME )
+#else
+# define gcmPRINT_VERSION() do { gcmSTACK_DUMP(); } while (gcvFALSE)
+# define gcmkPRINT_VERSION() do { } while (gcvFALSE)
+#endif
+
+typedef enum _gceDUMP_BUFFER
+{
+ gceDUMP_BUFFER_CONTEXT,
+ gceDUMP_BUFFER_USER,
+ gceDUMP_BUFFER_KERNEL,
+ gceDUMP_BUFFER_LINK,
+ gceDUMP_BUFFER_WAITLINK,
+ gceDUMP_BUFFER_FROM_USER,
+}
+gceDUMP_BUFFER;
+
+void
+gckOS_DumpBuffer(
+ IN gckOS Os,
+ IN gctPOINTER Buffer,
+ IN gctUINT Size,
+ IN gceDUMP_BUFFER Type,
+ IN gctBOOL CopyMessage
+ );
+
+#define gcmkDUMPBUFFER gckOS_DumpBuffer
+
+#if gcdDUMP_COMMAND
+# define gcmkDUMPCOMMAND(Os, Buffer, Size, Type, CopyMessage) \
+ gcmkDUMPBUFFER(Os, Buffer, Size, Type, CopyMessage)
+#else
+# define gcmkDUMPCOMMAND(Os, Buffer, Size, Type, CopyMessage)
+#endif
+
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+
+void
+gckOS_DebugFlush(
+ gctCONST_STRING CallerName,
+ gctUINT LineNumber,
+ gctUINT32 DmaAddress
+ );
+
+# define gcmkDEBUGFLUSH(DmaAddress) \
+ gckOS_DebugFlush(__FUNCTION__, __LINE__, DmaAddress)
+#else
+# define gcmkDEBUGFLUSH(DmaAddress)
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_FRAMERATE
+**
+** Print average frame rate
+**
+*/
+#if gcdDUMP_FRAMERATE
+ gceSTATUS
+ gcfDumpFrameRate(
+ void
+ );
+# define gcmDUMP_FRAMERATE gcfDumpFrameRate
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_FRAMERATE(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_frame_rate(
+ void
+ )
+ {
+ }
+# define gcmDUMP_FRAMERATE __dummy_dump_frame_rate
+#endif
+
+
+/*******************************************************************************
+**
+** gcmDUMP
+**
+** Print a dump message.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+#if gcdDUMP
+ gceSTATUS
+ gcfDump(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ ...
+ );
+# define gcmDUMP gcfDump
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP(...)
+#else
+ gcmINLINE static void
+ __dummy_dump(
+ IN gcoOS Os,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP __dummy_dump
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_DATA
+**
+** Add data to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP || gcdDUMP_COMMAND
+ gceSTATUS
+ gcfDumpData(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_DATA gcfDumpData
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_DATA(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_data(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_DATA __dummy_dump_data
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_BUFFER
+**
+** Print a buffer to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctUINT32 Physical
+** Physical address of buffer.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctUINT32 Offset
+** Offset into buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP || gcdDUMP_COMMAND
+gceSTATUS
+gcfDumpBuffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_BUFFER gcfDumpBuffer
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_BUFFER(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_buffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_BUFFER __dummy_dump_buffer
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API
+**
+** Print a dump message for a high level API prefixed by the function name.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+gceSTATUS gcfDumpApi(IN gctCONST_STRING String, ...);
+#if gcdDUMP_API
+# define gcmDUMP_API gcfDumpApi
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP_API __dummy_dump_api
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY
+**
+** Print an array of data.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Size.
+*/
+gceSTATUS gcfDumpArray(IN gctCONST_POINTER Data, IN gctUINT32 Size);
+#if gcdDUMP_API
+# define gcmDUMP_API_ARRAY gcfDumpArray
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Size
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY __dummy_dump_api_array
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY_TOKEN
+**
+** Print an array of data terminated by a token.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Termination.
+*/
+gceSTATUS gcfDumpArrayToken(IN gctCONST_POINTER Data, IN gctUINT32 Termination);
+#if gcdDUMP_API
+# define gcmDUMP_API_ARRAY_TOKEN gcfDumpArrayToken
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY_TOKEN(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array_token(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Termination
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY_TOKEN __dummy_dump_api_array_token
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_DATA
+**
+** Print an array of bytes.
+**
+** ARGUMENTS:
+**
+** gctCONST_POINTER Pointer to array.
+** gctSIZE_T Size.
+*/
+gceSTATUS gcfDumpApiData(IN gctCONST_POINTER Data, IN gctSIZE_T Size);
+#if gcdDUMP_API
+# define gcmDUMP_API_DATA gcfDumpApiData
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_DATA(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_data(
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Size
+ )
+ {
+ }
+# define gcmDUMP_API_DATA __dummy_dump_api_data
+#endif
+
+/*******************************************************************************
+**
+** gcmTRACE_RELEASE
+**
+** Print a message to the shader debugger.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+#define gcmTRACE_RELEASE gcoOS_DebugShaderTrace
+
+void
+gcoOS_DebugShaderTrace(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_SetDebugShaderFiles(
+ IN gctCONST_STRING VSFileName,
+ IN gctCONST_STRING FSFileName
+ );
+
+void
+gcoOS_SetDebugShaderFileType(
+ IN gctUINT32 ShaderType
+ );
+
+void
+gcoOS_EnableDebugBuffer(
+ IN gctBOOL Enable
+ );
+
+/*******************************************************************************
+**
+** gcmBREAK
+**
+** Break into the debugger. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** None.
+*/
+
+void
+gcoOS_DebugBreak(
+ void
+ );
+
+void
+gckOS_DebugBreak(
+ void
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_BREAK)
+# define gcmBREAK gcoOS_DebugBreak
+# define gcmkBREAK gckOS_DebugBreak
+#else
+# define gcmBREAK()
+# define gcmkBREAK()
+#endif
+
+/*******************************************************************************
+**
+** gcmASSERT
+**
+** Evaluate an expression and break into the debugger if the expression
+** evaluates to false. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_ASSERT)
+# define _gcmASSERT(prefix, exp) \
+ do \
+ { \
+ if (!(exp)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ASSERT at %s(%d)", \
+ __FUNCTION__, __LINE__); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ "(%s)", #exp); \
+ prefix##BREAK(); \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmASSERT(exp) _gcmASSERT(gcm, exp)
+# define gcmkASSERT(exp) _gcmASSERT(gcmk, exp)
+#else
+# define gcmASSERT(exp)
+# define gcmkASSERT(exp)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY
+**
+** Verify if an expression returns true. If the expression does not
+** evaluates to true, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_ASSERT)
+# define gcmVERIFY(exp) gcmASSERT(exp)
+# define gcmkVERIFY(exp) gcmkASSERT(exp)
+#else
+# define gcmVERIFY(exp) exp
+# define gcmkVERIFY(exp) exp
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY_OK
+**
+** Verify a fucntion returns gcvSTATUS_OK. If the function does not return
+** gcvSTATUS_OK, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+
+void
+gcoOS_Verify(
+ IN gceSTATUS Status
+ );
+
+void
+gckOS_Verify(
+ IN gceSTATUS Status
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_ASSERT)
+# define gcmVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ gcoOS_Verify(verifyStatus); \
+ if (verifyStatus != gcvSTATUS_OK) \
+ { \
+ gcmTRACE( \
+ gcvLEVEL_ERROR, \
+ "gcmVERIFY_OK(%d): function returned %d", \
+ __LINE__, verifyStatus \
+ ); \
+ } \
+ gcmASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+# define gcmkVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ if (verifyStatus != gcvSTATUS_OK) \
+ { \
+ gcmkTRACE( \
+ gcvLEVEL_ERROR, \
+ "gcmkVERIFY_OK(%d): function returned %d", \
+ __LINE__, verifyStatus \
+ ); \
+ } \
+ gckOS_Verify(verifyStatus); \
+ gcmkASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+#else
+# define gcmVERIFY_OK(func) func
+# define gcmkVERIFY_OK(func) func
+#endif
+
+gctCONST_STRING
+gcoOS_DebugStatus2Name(
+ gceSTATUS status
+ );
+
+gctCONST_STRING
+gckOS_DebugStatus2Name(
+ gceSTATUS status
+ );
+
+/*******************************************************************************
+**
+** gcmERR_BREAK
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_BREAK(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_BREAK: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+#define _gcmkERR_BREAK(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_BREAK: status=%d(%s) @ %s(%d)", \
+ status, gckOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_BREAK(func) _gcmERR_BREAK(gcm, func)
+#define gcmkERR_BREAK(func) _gcmkERR_BREAK(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmERR_RETURN
+**
+** Executes a return on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ prefix##FOOTER(); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+#define _gcmkERR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d(%s) @ %s(%d)", \
+ status, gckOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ prefix##FOOTER(); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_RETURN(func) _gcmERR_RETURN(gcm, func)
+#define gcmkERR_RETURN(func) _gcmkERR_RETURN(gcmk, func)
+
+
+/*******************************************************************************
+**
+** gcmONERROR
+**
+** Jump to the error handler in case there is an error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmONERROR(prefix, func) \
+ do \
+ { \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ONERROR: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ goto OnError; \
+ } \
+ } \
+ while (gcvFALSE)
+#define _gcmkONERROR(prefix, func) \
+ do \
+ { \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ONERROR: status=%d(%s) @ %s(%d)", \
+ status, gckOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ goto OnError; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmONERROR(func) _gcmONERROR(gcm, func)
+#define gcmkONERROR(func) _gcmkONERROR(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_LOCK
+**
+** Verifies whether the surface is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_LOCK(surfaceInfo) \
+ if (!surfaceInfo->node.valid) \
+ { \
+ gcmONERROR(gcvSTATUS_MEMORY_UNLOCKED); \
+ } \
+
+/*******************************************************************************
+**
+** gcmVERIFY_NODE_LOCK
+**
+** Verifies whether the surface node is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_NODE_LOCK(surfaceNode) \
+ if (!(surfaceNode)->valid) \
+ { \
+ status = gcvSTATUS_MEMORY_UNLOCKED; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmBADOBJECT_BREAK
+**
+** Executes a break statement on bad object.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#define gcmBADOBJECT_BREAK(obj, t) \
+ if ((obj == gcvNULL) \
+ || (((gcsOBJECT *)(obj))->type != t) \
+ ) \
+ { \
+ status = gcvSTATUS_INVALID_OBJECT; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmCHECK_STATUS
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmCHECK_STATUS(prefix, func) \
+ do \
+ { \
+ last = func; \
+ if (gcmIS_ERROR(last)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "CHECK_STATUS: status=%d(%s) @ %s(%d)", \
+ last, gcoOS_DebugStatus2Name(last), __FUNCTION__, __LINE__); \
+ status = last; \
+ } \
+ } \
+ while (gcvFALSE)
+#define _gcmkCHECK_STATUS(prefix, func) \
+ do \
+ { \
+ last = func; \
+ if (gcmIS_ERROR(last)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "CHECK_STATUS: status=%d(%s) @ %s(%d)", \
+ last, gckOS_DebugStatus2Name(last), __FUNCTION__, __LINE__); \
+ status = last; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmCHECK_STATUS(func) _gcmCHECK_STATUS(gcm, func)
+#define gcmkCHECK_STATUS(func) _gcmkCHECK_STATUS(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+# define _gcmVERIFY_ARGUMENT(prefix, arg) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, #prefix "VERIFY_ARGUMENT failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_ARGUMENT); \
+ return gcvSTATUS_INVALID_ARGUMENT; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcm, arg)
+# define gcmkVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcmk, arg)
+
+/*******************************************************************************
+**
+** gcmDEBUG_VERIFY_ARGUMENT
+**
+** Works just like gcmVERIFY_ARGUMENT, but is only valid in debug mode.
+** Use this to verify arguments inside non-public API functions.
+*/
+#if gcdDEBUG
+# define gcmDEBUG_VERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcm, arg)
+# define gcmkDEBUG_VERIFY_ARGUMENT(arg) _gcmkVERIFY_ARGUMENT(gcm, arg)
+#else
+# define gcmDEBUG_VERIFY_ARGUMENT(arg)
+# define gcmkDEBUG_VERIFY_ARGUMENT(arg)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT_RETURN
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+# define _gcmVERIFY_ARGUMENT_RETURN(prefix, arg, value) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "gcmVERIFY_ARGUMENT_RETURN failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("value=%d", value); \
+ return value; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcm, arg, value)
+# define gcmkVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcmk, arg, value)
+
+#define MAX_LOOP_COUNT 0x7FFFFFFF
+
+/******************************************************************************\
+****************************** User Debug Option ******************************
+\******************************************************************************/
+
+/* User option. */
+typedef enum _gceDEBUG_MSG
+{
+ gcvDEBUG_MSG_NONE,
+ gcvDEBUG_MSG_ERROR,
+ gcvDEBUG_MSG_WARNING
+}
+gceDEBUG_MSG;
+
+typedef struct _gcsUSER_DEBUG_OPTION
+{
+ gceDEBUG_MSG debugMsg;
+}
+gcsUSER_DEBUG_OPTION;
+
+gcsUSER_DEBUG_OPTION *
+gcGetUserDebugOption(
+ void
+ );
+
+#if gcdHAS_ELLIPSES
+#define gcmUSER_DEBUG_MSG(level, ...) \
+ do \
+ { \
+ if (level <= gcGetUserDebugOption()->debugMsg) \
+ { \
+ gcoOS_Print(__VA_ARGS__); \
+ } \
+ } while (gcvFALSE)
+
+#define gcmUSER_DEBUG_ERROR_MSG(...) gcmUSER_DEBUG_MSG(gcvDEBUG_MSG_ERROR, "Error: " __VA_ARGS__)
+#define gcmUSER_DEBUG_WARNING_MSG(...) gcmUSER_DEBUG_MSG(gcvDEBUG_MSG_WARNING, "Warring: " __VA_ARGS__)
+#else
+#define gcmUSER_DEBUG_MSG
+#define gcmUSER_DEBUG_ERROR_MSG
+#define gcmUSER_DEBUG_WARNING_MSG
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_base_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_compiler.h b/src/include_imx6_v4_0_0/gc_hal_compiler.h
new file mode 100644
index 0000000..4a0870f
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_compiler.h
@@ -0,0 +1,4130 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+/*
+** Include file the defines the front- and back-end compilers, as well as the
+** objects they use.
+*/
+
+#ifndef __gc_hal_compiler_h_
+#define __gc_hal_compiler_h_
+
+#ifndef VIVANTE_NO_3D
+#include "gc_hal_types.h"
+#include "gc_hal_engine.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef GC_ENABLE_LOADTIME_OPT
+#define GC_ENABLE_LOADTIME_OPT 1
+#endif
+
+#define TEMP_OPT_CONSTANT_TEXLD_COORD 1
+
+#define TEMP_SHADER_PATCH 1
+/******************************* IR VERSION ******************/
+#define gcdSL_IR_VERSION gcmCC('\0','\0','\0','\1')
+
+/******************************************************************************\
+|******************************* SHADER LANGUAGE ******************************|
+\******************************************************************************/
+
+ /* allocator/deallocator function pointer */
+typedef gceSTATUS (*gctAllocatorFunc)(
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+typedef gceSTATUS (*gctDeallocatorFunc)(
+ IN gctPOINTER Memory
+ );
+
+typedef gctBOOL (*compareFunc) (
+ IN void * data,
+ IN void * key
+ );
+
+typedef struct _gcsListNode gcsListNode;
+struct _gcsListNode
+{
+ gcsListNode * next;
+ void * data;
+};
+
+typedef struct _gcsAllocator
+{
+ gctAllocatorFunc allocate;
+ gctDeallocatorFunc deallocate;
+} gcsAllocator;
+
+/* simple map structure */
+typedef struct _SimpleMap SimpleMap;
+struct _SimpleMap
+{
+ gctUINT32 key;
+ gctUINT32 val;
+ SimpleMap *next;
+ gcsAllocator *allocator;
+
+};
+
+/* SimpleMap Operations */
+/* return -1 if not found, otherwise return the mapped value */
+gctUINT32
+gcSimpleMap_Find(
+ IN SimpleMap *Map,
+ IN gctUINT32 Key
+ );
+
+gceSTATUS
+gcSimpleMap_Destory(
+ IN SimpleMap * Map,
+ IN gcsAllocator * Allocator
+ );
+
+/* Add a pair <Key, Val> to the Map head, the user should be aware that the
+ * map pointer is always changed when adding a new node :
+ *
+ * gcSimpleMap_AddNode(&theMap, key, val, allocator);
+ *
+ */
+gceSTATUS
+gcSimpleMap_AddNode(
+ IN SimpleMap ** Map,
+ IN gctUINT32 Key,
+ IN gctUINT32 Val,
+ IN gcsAllocator * Allocator
+ );
+
+/* gcsList data structure and related operations */
+typedef struct _gcsList
+{
+ gcsListNode *head;
+ gcsListNode *tail;
+ gctINT count;
+ gcsAllocator *allocator;
+} gcsList;
+
+/* List operations */
+void
+gcList_Init(
+ IN gcsList *list,
+ IN gcsAllocator *allocator
+ );
+
+gceSTATUS
+gcList_CreateNode(
+ IN void * Data,
+ IN gctAllocatorFunc Allocator,
+ OUT gcsListNode ** ListNode
+ );
+
+gceSTATUS
+gcList_Clean(
+ IN gcsList * List,
+ IN gctBOOL FreeData
+ );
+
+gcsListNode *
+gcList_FindNode(
+ IN gcsList * List,
+ IN void * Key,
+ IN compareFunc compare
+ );
+
+gceSTATUS
+gcList_AddNode(
+ IN gcsList * List,
+ IN void * Data
+ );
+
+gceSTATUS
+gcList_RemoveNode(
+ IN gcsList * List,
+ IN gcsListNode * Node
+ );
+
+/* link list structure for code list */
+typedef gcsList gcsCodeList;
+typedef gcsCodeList * gctCodeList;
+typedef gcsListNode gcsCodeListNode;
+
+/* Possible shader language opcodes. */
+typedef enum _gcSL_OPCODE
+{
+ gcSL_NOP, /* 0x00 */
+ gcSL_MOV, /* 0x01 */
+ gcSL_SAT, /* 0x02 */
+ gcSL_DP3, /* 0x03 */
+ gcSL_DP4, /* 0x04 */
+ gcSL_ABS, /* 0x05 */
+ gcSL_JMP, /* 0x06 */
+ gcSL_ADD, /* 0x07 */
+ gcSL_MUL, /* 0x08 */
+ gcSL_RCP, /* 0x09 */
+ gcSL_SUB, /* 0x0A */
+ gcSL_KILL, /* 0x0B */
+ gcSL_TEXLD, /* 0x0C */
+ gcSL_CALL, /* 0x0D */
+ gcSL_RET, /* 0x0E */
+ gcSL_NORM, /* 0x0F */
+ gcSL_MAX, /* 0x10 */
+ gcSL_MIN, /* 0x11 */
+ gcSL_POW, /* 0x12 */
+ gcSL_RSQ, /* 0x13 */
+ gcSL_LOG, /* 0x14 */
+ gcSL_FRAC, /* 0x15 */
+ gcSL_FLOOR, /* 0x16 */
+ gcSL_CEIL, /* 0x17 */
+ gcSL_CROSS, /* 0x18 */
+ gcSL_TEXLDP, /* 0x19 */
+ gcSL_TEXBIAS, /* 0x1A */
+ gcSL_TEXGRAD, /* 0x1B */
+ gcSL_TEXLOD, /* 0x1C */
+ gcSL_SIN, /* 0x1D */
+ gcSL_COS, /* 0x1E */
+ gcSL_TAN, /* 0x1F */
+ gcSL_EXP, /* 0x20 */
+ gcSL_SIGN, /* 0x21 */
+ gcSL_STEP, /* 0x22 */
+ gcSL_SQRT, /* 0x23 */
+ gcSL_ACOS, /* 0x24 */
+ gcSL_ASIN, /* 0x25 */
+ gcSL_ATAN, /* 0x26 */
+ gcSL_SET, /* 0x27 */
+ gcSL_DSX, /* 0x28 */
+ gcSL_DSY, /* 0x29 */
+ gcSL_FWIDTH, /* 0x2A */
+ gcSL_DIV, /* 0x2B */
+ gcSL_MOD, /* 0x2C */
+ gcSL_AND_BITWISE, /* 0x2D */
+ gcSL_OR_BITWISE, /* 0x2E */
+ gcSL_XOR_BITWISE, /* 0x2F */
+ gcSL_NOT_BITWISE, /* 0x30 */
+ gcSL_LSHIFT, /* 0x31 */
+ gcSL_RSHIFT, /* 0x32 */
+ gcSL_ROTATE, /* 0x33 */
+ gcSL_BITSEL, /* 0x34 */
+ gcSL_LEADZERO, /* 0x35 */
+ gcSL_LOAD, /* 0x36 */
+ gcSL_STORE, /* 0x37 */
+ gcSL_BARRIER, /* 0x38 */
+ gcSL_STORE1, /* 0x39 */
+ gcSL_ATOMADD, /* 0x3A */
+ gcSL_ATOMSUB, /* 0x3B */
+ gcSL_ATOMXCHG, /* 0x3C */
+ gcSL_ATOMCMPXCHG, /* 0x3D */
+ gcSL_ATOMMIN, /* 0x3E */
+ gcSL_ATOMMAX, /* 0x3F */
+ gcSL_ATOMOR, /* 0x40 */
+ gcSL_ATOMAND, /* 0x41 */
+ gcSL_ATOMXOR, /* 0x42 */
+ /*gcSL_UNUSED, 0x43 */
+ /*gcSL_UNUSED, 0x44 */
+ /*gcSL_UNUSED, 0x45 */
+ /*gcSL_UNUSED, 0x46 */
+ /*gcSL_UNUSED, 0x47 */
+ /*gcSL_UNUSED, 0x48 */
+ /*gcSL_UNUSED, 0x49 */
+ /*gcSL_UNUSED, 0x4A */
+ /*gcSL_UNUSED, 0x4B */
+ /*gcSL_UNUSED, 0x4C */
+ /*gcSL_UNUSED, 0x4D */
+ /*gcSL_UNUSED, 0x4E */
+ /*gcSL_UNUSED, 0x4F */
+ /*gcSL_UNUSED, 0x50 */
+ /*gcSL_UNUSED, 0x51 */
+ /*gcSL_UNUSED, 0x52 */
+ gcSL_ADDLO = 0x53, /* 0x53 */ /* Float only. */
+ gcSL_MULLO, /* 0x54 */ /* Float only. */
+ gcSL_CONV, /* 0x55 */
+ gcSL_GETEXP, /* 0x56 */
+ gcSL_GETMANT, /* 0x57 */
+ gcSL_MULHI, /* 0x58 */ /* Integer only. */
+ gcSL_CMP, /* 0x59 */
+ gcSL_I2F, /* 0x5A */
+ gcSL_F2I, /* 0x5B */
+ gcSL_ADDSAT, /* 0x5C */ /* Integer only. */
+ gcSL_SUBSAT, /* 0x5D */ /* Integer only. */
+ gcSL_MULSAT, /* 0x5E */ /* Integer only. */
+ gcSL_MAXOPCODE
+}
+gcSL_OPCODE;
+
+typedef enum _gcSL_FORMAT
+{
+ gcSL_FLOAT = 0, /* 0 */
+ gcSL_INTEGER = 1, /* 1 */
+ gcSL_INT32 = 1, /* 1 */
+ gcSL_BOOLEAN = 2, /* 2 */
+ gcSL_UINT32 = 3, /* 3 */
+ gcSL_INT8, /* 4 */
+ gcSL_UINT8, /* 5 */
+ gcSL_INT16, /* 6 */
+ gcSL_UINT16, /* 7 */
+ gcSL_INT64, /* 8 */ /* Reserved for future enhancement. */
+ gcSL_UINT64, /* 9 */ /* Reserved for future enhancement. */
+ gcSL_INT128, /* 10 */ /* Reserved for future enhancement. */
+ gcSL_UINT128, /* 11 */ /* Reserved for future enhancement. */
+ gcSL_FLOAT16, /* 12 */
+ gcSL_FLOAT64, /* 13 */ /* Reserved for future enhancement. */
+ gcSL_FLOAT128, /* 14 */ /* Reserved for future enhancement. */
+}
+gcSL_FORMAT;
+
+/* Destination write enable bits. */
+typedef enum _gcSL_ENABLE
+{
+ gcSL_ENABLE_NONE = 0x0, /* none is enabled, error/uninitialized state */
+ gcSL_ENABLE_X = 0x1,
+ gcSL_ENABLE_Y = 0x2,
+ gcSL_ENABLE_Z = 0x4,
+ gcSL_ENABLE_W = 0x8,
+ /* Combinations. */
+ gcSL_ENABLE_XY = gcSL_ENABLE_X | gcSL_ENABLE_Y,
+ gcSL_ENABLE_XYZ = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XYZW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XYW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_XZ = gcSL_ENABLE_X | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XZW = gcSL_ENABLE_X | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XW = gcSL_ENABLE_X | gcSL_ENABLE_W,
+ gcSL_ENABLE_YZ = gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_YZW = gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_YW = gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_ZW = gcSL_ENABLE_Z | gcSL_ENABLE_W,
+}
+gcSL_ENABLE;
+
+/* Possible indices. */
+typedef enum _gcSL_INDEXED
+{
+ gcSL_NOT_INDEXED, /* 0 */
+ gcSL_INDEXED_X, /* 1 */
+ gcSL_INDEXED_Y, /* 2 */
+ gcSL_INDEXED_Z, /* 3 */
+ gcSL_INDEXED_W, /* 4 */
+}
+gcSL_INDEXED;
+
+/* Opcode conditions. */
+typedef enum _gcSL_CONDITION
+{
+ gcSL_ALWAYS, /* 0x0 */
+ gcSL_NOT_EQUAL, /* 0x1 */
+ gcSL_LESS_OR_EQUAL, /* 0x2 */
+ gcSL_LESS, /* 0x3 */
+ gcSL_EQUAL, /* 0x4 */
+ gcSL_GREATER, /* 0x5 */
+ gcSL_GREATER_OR_EQUAL, /* 0x6 */
+ gcSL_AND, /* 0x7 */
+ gcSL_OR, /* 0x8 */
+ gcSL_XOR, /* 0x9 */
+ gcSL_NOT_ZERO, /* 0xA */
+}
+gcSL_CONDITION;
+
+/* Possible source operand types. */
+typedef enum _gcSL_TYPE
+{
+ gcSL_NONE, /* 0x0 */
+ gcSL_TEMP, /* 0x1 */
+ gcSL_ATTRIBUTE, /* 0x2 */
+ gcSL_UNIFORM, /* 0x3 */
+ gcSL_SAMPLER, /* 0x4 */
+ gcSL_CONSTANT, /* 0x5 */
+ gcSL_OUTPUT, /* 0x6 */
+ gcSL_PHYSICAL, /* 0x7 */
+}
+gcSL_TYPE;
+
+/* Swizzle generator macro. */
+#define gcmSWIZZLE(Component1, Component2, Component3, Component4) \
+( \
+ (gcSL_SWIZZLE_ ## Component1 << 0) | \
+ (gcSL_SWIZZLE_ ## Component2 << 2) | \
+ (gcSL_SWIZZLE_ ## Component3 << 4) | \
+ (gcSL_SWIZZLE_ ## Component4 << 6) \
+)
+
+#define gcmExtractSwizzle(Swizzle, Index) \
+ ((gcSL_SWIZZLE) ((((Swizzle) >> (Index * 2)) & 0x3)))
+
+#define gcmComposeSwizzle(SwizzleX, SwizzleY, SwizzleZ, SwizzleW) \
+( \
+ ((SwizzleX) << 0) | \
+ ((SwizzleY) << 2) | \
+ ((SwizzleZ) << 4) | \
+ ((SwizzleW) << 6) \
+)
+
+/* Possible swizzle values. */
+typedef enum _gcSL_SWIZZLE
+{
+ gcSL_SWIZZLE_X, /* 0x0 */
+ gcSL_SWIZZLE_Y, /* 0x1 */
+ gcSL_SWIZZLE_Z, /* 0x2 */
+ gcSL_SWIZZLE_W, /* 0x3 */
+ /* Combinations. */
+ gcSL_SWIZZLE_XXXX = gcmSWIZZLE(X, X, X, X),
+ gcSL_SWIZZLE_YYYY = gcmSWIZZLE(Y, Y, Y, Y),
+ gcSL_SWIZZLE_ZZZZ = gcmSWIZZLE(Z, Z, Z, Z),
+ gcSL_SWIZZLE_WWWW = gcmSWIZZLE(W, W, W, W),
+ gcSL_SWIZZLE_XYYY = gcmSWIZZLE(X, Y, Y, Y),
+ gcSL_SWIZZLE_XZZZ = gcmSWIZZLE(X, Z, Z, Z),
+ gcSL_SWIZZLE_XWWW = gcmSWIZZLE(X, W, W, W),
+ gcSL_SWIZZLE_YZZZ = gcmSWIZZLE(Y, Z, Z, Z),
+ gcSL_SWIZZLE_YWWW = gcmSWIZZLE(Y, W, W, W),
+ gcSL_SWIZZLE_ZWWW = gcmSWIZZLE(Z, W, W, W),
+ gcSL_SWIZZLE_XYZZ = gcmSWIZZLE(X, Y, Z, Z),
+ gcSL_SWIZZLE_XYWW = gcmSWIZZLE(X, Y, W, W),
+ gcSL_SWIZZLE_XZWW = gcmSWIZZLE(X, Z, W, W),
+ gcSL_SWIZZLE_YZWW = gcmSWIZZLE(Y, Z, W, W),
+ gcSL_SWIZZLE_XXYZ = gcmSWIZZLE(X, X, Y, Z),
+ gcSL_SWIZZLE_XYZW = gcmSWIZZLE(X, Y, Z, W),
+ gcSL_SWIZZLE_XYXY = gcmSWIZZLE(X, Y, X, Y),
+ gcSL_SWIZZLE_YYZZ = gcmSWIZZLE(Y, Y, Z, Z),
+ gcSL_SWIZZLE_YYWW = gcmSWIZZLE(Y, Y, W, W),
+ gcSL_SWIZZLE_ZZZW = gcmSWIZZLE(Z, Z, Z, W),
+ gcSL_SWIZZLE_XZZW = gcmSWIZZLE(X, Z, Z, W),
+ gcSL_SWIZZLE_YYZW = gcmSWIZZLE(Y, Y, Z, W),
+
+ gcSL_SWIZZLE_INVALID = 0x7FFFFFFF
+}
+gcSL_SWIZZLE;
+
+typedef enum _gcSL_COMPONENT
+{
+ gcSL_COMPONENT_X, /* 0x0 */
+ gcSL_COMPONENT_Y, /* 0x1 */
+ gcSL_COMPONENT_Z, /* 0x2 */
+ gcSL_COMPONENT_W, /* 0x3 */
+ gcSL_COMPONENT_COUNT /* 0x4 */
+} gcSL_COMPONENT;
+
+#define gcmIsComponentEnabled(Enable, Component) (((Enable) & (1 << (Component))) != 0)
+
+/******************************************************************************\
+|*********************************** SHADERS **********************************|
+\******************************************************************************/
+
+/* Shader types. */
+typedef enum _gcSHADER_KIND {
+ gcSHADER_TYPE_UNKNOWN = 0,
+ gcSHADER_TYPE_VERTEX,
+ gcSHADER_TYPE_FRAGMENT,
+ gcSHADER_TYPE_CL,
+ gcSHADER_TYPE_PRECOMPILED,
+ gcSHADER_KIND_COUNT
+} gcSHADER_KIND;
+
+typedef enum _gcGL_DRIVER_VERSION {
+ gcGL_DRIVER_ES11, /* OpenGL ES 1.1 */
+ gcGL_DRIVER_ES20, /* OpenGL ES 2.0 */
+ gcGL_DRIVER_ES30 /* OpenGL ES 3.0 */
+} gcGL_DRIVER_VERSION;
+
+/* gcSHADER objects. */
+typedef struct _gcSHADER * gcSHADER;
+typedef struct _gcATTRIBUTE * gcATTRIBUTE;
+typedef struct _gcUNIFORM * gcUNIFORM;
+typedef struct _gcOUTPUT * gcOUTPUT;
+typedef struct _gcsFUNCTION * gcFUNCTION;
+typedef struct _gcsKERNEL_FUNCTION * gcKERNEL_FUNCTION;
+typedef struct _gcsHINT * gcsHINT_PTR;
+typedef struct _gcSHADER_PROFILER * gcSHADER_PROFILER;
+typedef struct _gcVARIABLE * gcVARIABLE;
+
+struct _gcsHINT
+{
+ /* Numbr of data transfers for Vertex Shader output. */
+ gctUINT32 vsOutputCount;
+
+ /* Flag whether the VS has point size or not. */
+ gctBOOL vsHasPointSize;
+
+#if gcdUSE_WCLIP_PATCH
+ /* Flag whether the VS gl_position.z depends on gl_position.w
+ it's a hint for wclipping */
+ gctBOOL vsPositionZDependsOnW;
+#endif
+
+ gctBOOL clipW;
+
+ /* Element count. */
+ gctUINT32 elementCount;
+
+ /* Component count. */
+ gctUINT32 componentCount;
+
+ /* Number of data transfers for Fragment Shader input. */
+ gctUINT32 fsInputCount;
+
+ /* Maximum number of temporary registers used in FS. */
+ gctUINT32 fsMaxTemp;
+
+ /* Maximum number of temporary registers used in VS. */
+ gctUINT32 vsMaxTemp;
+
+ /* Balance minimum. */
+ gctUINT32 balanceMin;
+
+ /* Balance maximum. */
+ gctUINT32 balanceMax;
+
+ /* Flag whether the PS outputs the depth value or not. */
+ gctBOOL psHasFragDepthOut;
+
+ /* Flag whether the ThreadWalker is in PS. */
+ gctBOOL threadWalkerInPS;
+
+#if gcdALPHA_KILL_IN_SHADER
+ /* States to set when alpha kill is enabled. */
+ gctUINT32 killStateAddress;
+ gctUINT32 alphaKillStateValue;
+ gctUINT32 colorKillStateValue;
+
+ /* Shader instructiuon. */
+ gctUINT32 killInstructionAddress;
+ gctUINT32 alphaKillInstruction[3];
+ gctUINT32 colorKillInstruction[3];
+#endif
+
+#if TEMP_SHADER_PATCH
+ gctUINT32 pachedShaderIdentifier;
+#endif
+};
+
+#if TEMP_SHADER_PATCH
+#define INVALID_SHADER_IDENTIFIER 0xFFFFFFFF
+#endif
+
+/* gcSHADER_TYPE enumeration. */
+typedef enum _gcSHADER_TYPE
+{
+ gcSHADER_FLOAT_X1 = 0, /* 0x00 */
+ gcSHADER_FLOAT_X2, /* 0x01 */
+ gcSHADER_FLOAT_X3, /* 0x02 */
+ gcSHADER_FLOAT_X4, /* 0x03 */
+ gcSHADER_FLOAT_2X2, /* 0x04 */
+ gcSHADER_FLOAT_3X3, /* 0x05 */
+ gcSHADER_FLOAT_4X4, /* 0x06 */
+ gcSHADER_BOOLEAN_X1, /* 0x07 */
+ gcSHADER_BOOLEAN_X2, /* 0x08 */
+ gcSHADER_BOOLEAN_X3, /* 0x09 */
+ gcSHADER_BOOLEAN_X4, /* 0x0A */
+ gcSHADER_INTEGER_X1, /* 0x0B */
+ gcSHADER_INTEGER_X2, /* 0x0C */
+ gcSHADER_INTEGER_X3, /* 0x0D */
+ gcSHADER_INTEGER_X4, /* 0x0E */
+ gcSHADER_SAMPLER_1D, /* 0x0F */
+ gcSHADER_SAMPLER_2D, /* 0x10 */
+ gcSHADER_SAMPLER_3D, /* 0x11 */
+ gcSHADER_SAMPLER_CUBIC, /* 0x12 */
+ gcSHADER_FIXED_X1, /* 0x13 */
+ gcSHADER_FIXED_X2, /* 0x14 */
+ gcSHADER_FIXED_X3, /* 0x15 */
+ gcSHADER_FIXED_X4, /* 0x16 */
+ gcSHADER_IMAGE_2D, /* 0x17 */ /* For OCL. */
+ gcSHADER_IMAGE_3D, /* 0x18 */ /* For OCL. */
+ gcSHADER_SAMPLER, /* 0x19 */ /* For OCL. */
+ gcSHADER_FLOAT_2X3, /* 0x1A */
+ gcSHADER_FLOAT_2X4, /* 0x1B */
+ gcSHADER_FLOAT_3X2, /* 0x1C */
+ gcSHADER_FLOAT_3X4, /* 0x1D */
+ gcSHADER_FLOAT_4X2, /* 0x1E */
+ gcSHADER_FLOAT_4X3, /* 0x1F */
+ gcSHADER_ISAMPLER_2D, /* 0x20 */
+ gcSHADER_ISAMPLER_3D, /* 0x21 */
+ gcSHADER_ISAMPLER_CUBIC, /* 0x22 */
+ gcSHADER_USAMPLER_2D, /* 0x23 */
+ gcSHADER_USAMPLER_3D, /* 0x24 */
+ gcSHADER_USAMPLER_CUBIC, /* 0x25 */
+ gcSHADER_SAMPLER_EXTERNAL_OES, /* 0x26 */
+
+ gcSHADER_UINT_X1, /* 0x27 */
+ gcSHADER_UINT_X2, /* 0x28 */
+ gcSHADER_UINT_X3, /* 0x29 */
+ gcSHADER_UINT_X4, /* 0x2A */
+
+ gcSHADER_UNKONWN_TYPE, /* do not add type after this */
+ gcSHADER_TYPE_COUNT /* must to change gcvShaderTypeInfo at the
+ * same time if you add any new type! */}
+gcSHADER_TYPE;
+
+typedef enum _gcSHADER_TYPE_KIND
+{
+ gceTK_UNKOWN,
+ gceTK_FLOAT,
+ gceTK_INT,
+ gceTK_UINT,
+ gceTK_BOOL,
+ gceTK_FIXED,
+ gceTK_SAMPLER,
+ gceTK_IMAGE,
+ gceTK_OTHER
+} gcSHADER_TYPE_KIND;
+
+typedef struct _gcSHADER_TYPEINFO
+{
+ gcSHADER_TYPE type; /* e.g. gcSHADER_FLOAT_2X4 */
+ gctINT components; /* e.g. 4 components */
+ gctINT rows; /* e.g. 2 rows */
+ gcSHADER_TYPE componentType; /* e.g. gcSHADER_FLOAT_X4 */
+ gcSHADER_TYPE_KIND kind; /* e.g. gceTK_FLOAT */
+ gctCONST_STRING name; /* e.g. "FLOAT_2X4" */
+} gcSHADER_TYPEINFO;
+
+extern gcSHADER_TYPEINFO gcvShaderTypeInfo[];
+
+#define gcmType_Comonents(Type) (gcvShaderTypeInfo[Type].components)
+#define gcmType_Rows(Type) (gcvShaderTypeInfo[Type].rows)
+#define gcmType_ComonentType(Type) (gcvShaderTypeInfo[Type].componentType)
+#define gcmType_Kind(Type) (gcvShaderTypeInfo[Type].kind)
+#define gcmType_Name(Type) (gcvShaderTypeInfo[Type].name)
+
+#define gcmType_isMatrix(type) (gcmType_Rows(type) > 1)
+
+typedef enum _gcSHADER_VAR_CATEGORY
+{
+ gcSHADER_VAR_CATEGORY_NORMAL = 0, /* primitive type and its array */
+ gcSHADER_VAR_CATEGORY_STRUCT = 1 /* structure */
+}
+gcSHADER_VAR_CATEGORY;
+
+typedef enum _gceTYPE_QUALIFIER
+{
+ gcvTYPE_QUALIFIER_NONE = 0x0, /* unqualified */
+ gcvTYPE_QUALIFIER_VOLATILE = 0x1, /* volatile */
+}gceTYPE_QUALIFIER;
+
+typedef gctUINT16 gctTYPE_QUALIFIER;
+
+#if GC_ENABLE_LOADTIME_OPT
+typedef struct _gcSHADER_TYPE_INFO
+{
+ gcSHADER_TYPE type; /* eg. gcSHADER_FLOAT_2X3 is the type */
+ gctCONST_STRING name; /* the name of the type: "gcSHADER_FLOAT_2X3" */
+ gcSHADER_TYPE baseType; /* its base type is gcSHADER_FLOAT_2 */
+ gctINT components; /* it has 2 components */
+ gctINT rows; /* and 3 rows */
+ gctINT size; /* the size in byte */
+} gcSHADER_TYPE_INFO;
+
+extern gcSHADER_TYPE_INFO shader_type_info[];
+
+enum gceLTCDumpOption {
+ gceLTC_DUMP_UNIFORM = 0x0001,
+ gceLTC_DUMP_EVALUATION = 0x0002,
+ gceLTC_DUMP_EXPESSION = 0x0004,
+ gceLTC_DUMP_COLLECTING = 0x0008,
+};
+
+gctBOOL gcDumpOption(gctINT Opt);
+
+#endif /* GC_ENABLE_LOADTIME_OPT */
+
+#define IS_MATRIX_TYPE(type) \
+ (((type >= gcSHADER_FLOAT_2X2) && (type <= gcSHADER_FLOAT_4X4)) || \
+ ((type >= gcSHADER_FLOAT_2X3) && (type <= gcSHADER_FLOAT_4X3)))
+
+/* gcSHADER_PRECISION enumeration. */
+typedef enum _gcSHADER_PRECISION
+{
+ gcSHADER_PRECISION_DEFAULT, /* 0x00 */
+ gcSHADER_PRECISION_HIGH, /* 0x01 */
+ gcSHADER_PRECISION_MEDIUM, /* 0x02 */
+ gcSHADER_PRECISION_LOW, /* 0x03 */
+}
+gcSHADER_PRECISION;
+
+/* Shader flags. */
+typedef enum _gceSHADER_FLAGS
+{
+ gcvSHADER_NO_OPTIMIZATION = 0x00,
+ gcvSHADER_DEAD_CODE = 0x01,
+ gcvSHADER_RESOURCE_USAGE = 0x02,
+ gcvSHADER_OPTIMIZER = 0x04,
+ gcvSHADER_USE_GL_Z = 0x08,
+ /*
+ The GC family of GPU cores model GC860 and under require the Z
+ to be from 0 <= z <= w.
+ However, OpenGL specifies the Z to be from -w <= z <= w. So we
+ have to a conversion here:
+
+ z = (z + w) / 2.
+
+ So here we append two instructions to the vertex shader.
+ */
+ gcvSHADER_USE_GL_POSITION = 0x10,
+ gcvSHADER_USE_GL_FACE = 0x20,
+ gcvSHADER_USE_GL_POINT_COORD = 0x40,
+ gcvSHADER_LOADTIME_OPTIMIZER = 0x80,
+#if gcdALPHA_KILL_IN_SHADER
+ gcvSHADER_USE_ALPHA_KILL = 0x100,
+#endif
+
+}
+gceSHADER_FLAGS;
+
+gceSTATUS
+gcSHADER_CheckClipW(
+ IN gctCONST_STRING VertexSource,
+ IN gctCONST_STRING FragmentSource,
+ OUT gctBOOL * clipW);
+
+/*******************************************************************************
+** gcOptimizer Data Structures
+*******************************************************************************/
+typedef enum _gceSHADER_OPTIMIZATION
+{
+ /* No optimization. */
+ gcvOPTIMIZATION_NONE,
+
+ /* Flow graph construction. */
+ gcvOPTIMIZATION_CONSTRUCTION = 1 << 0,
+
+ /* Dead code elimination. */
+ gcvOPTIMIZATION_DEAD_CODE = 1 << 1,
+
+ /* Redundant move instruction elimination. */
+ gcvOPTIMIZATION_REDUNDANT_MOVE = 1 << 2,
+
+ /* Inline expansion. */
+ gcvOPTIMIZATION_INLINE_EXPANSION = 1 << 3,
+
+ /* Constant propagation. */
+ gcvOPTIMIZATION_CONSTANT_PROPAGATION = 1 << 4,
+
+ /* Redundant bounds/checking elimination. */
+ gcvOPTIMIZATION_REDUNDANT_CHECKING = 1 << 5,
+
+ /* Loop invariant movement. */
+ gcvOPTIMIZATION_LOOP_INVARIANT = 1 << 6,
+
+ /* Induction variable removal. */
+ gcvOPTIMIZATION_INDUCTION_VARIABLE = 1 << 7,
+
+ /* Common subexpression elimination. */
+ gcvOPTIMIZATION_COMMON_SUBEXPRESSION = 1 << 8,
+
+ /* Control flow/banch optimization. */
+ gcvOPTIMIZATION_CONTROL_FLOW = 1 << 9,
+
+ /* Vector component operation merge. */
+ gcvOPTIMIZATION_VECTOR_INSTRUCTION_MERGE = 1 << 10,
+
+ /* Algebra simplificaton. */
+ gcvOPTIMIZATION_ALGEBRAIC_SIMPLIFICATION = 1 << 11,
+
+ /* Pattern matching and replacing. */
+ gcvOPTIMIZATION_PATTERN_MATCHING = 1 << 12,
+
+ /* Interprocedural constant propagation. */
+ gcvOPTIMIZATION_IP_CONSTANT_PROPAGATION = 1 << 13,
+
+ /* Interprecedural register optimization. */
+ gcvOPTIMIZATION_IP_REGISTRATION = 1 << 14,
+
+ /* Optimization option number. */
+ gcvOPTIMIZATION_OPTION_NUMBER = 1 << 15,
+
+ /* Loadtime constant. */
+ gcvOPTIMIZATION_LOADTIME_CONSTANT = 1 << 16,
+
+ /* MAD instruction optimization. */
+ gcvOPTIMIZATION_MAD_INSTRUCTION = 1 << 17,
+
+ /* Special optimization for LOAD SW workaround. */
+ gcvOPTIMIZATION_LOAD_SW_WORKAROUND = 1 << 18,
+
+ /* move code into conditional block if possile */
+ gcvOPTIMIZATION_CONDITIONALIZE = 1 << 19,
+
+ /* expriemental: power optimization mode
+ 1. add extra dummy texld to tune performance
+ 2. insert NOP after high power instrucitons
+ 3. split high power vec3/vec4 instruciton to vec2/vec1 operation
+ 4. ...
+ */
+ gcvOPTIMIZATION_POWER_OPTIMIZATION = 1 << 20,
+
+ /* optimize varying packing */
+ gcvOPTIMIZATION_VARYINGPACKING = 1 << 22,
+
+ /* Full optimization. */
+ /* Note that gcvOPTIMIZATION_LOAD_SW_WORKAROUND is off. */
+ gcvOPTIMIZATION_FULL = 0x7FFFFFFF &
+ ~gcvOPTIMIZATION_LOAD_SW_WORKAROUND &
+ ~gcvOPTIMIZATION_POWER_OPTIMIZATION,
+
+ /* Optimization Unit Test flag. */
+ gcvOPTIMIZATION_UNIT_TEST = 1 << 31
+}
+gceSHADER_OPTIMIZATION;
+
+typedef enum _gceOPTIMIZATION_VaryingPaking
+{
+ gcvOPTIMIZATION_VARYINGPACKING_NONE = 0,
+ gcvOPTIMIZATION_VARYINGPACKING_NOSPLIT,
+ gcvOPTIMIZATION_VARYINGPACKING_SPLIT
+} gceOPTIMIZATION_VaryingPaking;
+
+typedef struct _gcOPTIMIZER_OPTION
+{
+ gceSHADER_OPTIMIZATION optFlags;
+
+ /* debug & dump options:
+
+ VC_OPTION=-DUMP:SRC:OPT|:OPTV|:CG|:CGV:|ALL|ALLV
+
+ SRC: dump shader source code
+ OPT: dump incoming and final IR
+ OPTV: dump result IR in each optimization phase
+ CG: dump generated machine code
+ CGV: dump BE tree and optimization detail
+
+ ALL = SRC|OPT|CG
+ ALLV = SRC|OPT|OPTV|CG|CGV
+ */
+ gctBOOL dumpShaderSource; /* dump shader source code */
+ gctBOOL dumpOptimizer; /* dump incoming and final IR */
+ gctBOOL dumpOptimizerVerbose; /* dump result IR in each optimization phase */
+ gctBOOL dumpBEGenertedCode; /* dump generated machine code */
+ gctBOOL dumpBEVerbose; /* dump BE tree and optimization detail */
+
+ /* Code generation */
+
+ /* Varying Packing:
+
+ VC_OPTION=-PACKVARYING:[0-2]|:T[-]m[,n]|:LshaderIdx,min,max
+
+ 0: turn off varying packing
+ 1: pack varyings, donot split any varying
+ 2: pack varyings, may split to make fully packed output
+
+ Tm: only packing shader pair which vertex shader id is m
+ Tm,n: only packing shader pair which vertex shader id
+ is in range of [m, n]
+ T-m: do not packing shader pair which vertex shader id is m
+ T-m,n: do not packing shader pair which vertex shader id
+ is in range of [m, n]
+
+ LshaderIdx,min,max : set load balance (min, max) for shaderIdx
+ if shaderIdx is -1, all shaders are impacted
+ newMin = origMin * (min/100.);
+ newMax = origMax * (max/100.);
+ */
+ gceOPTIMIZATION_VaryingPaking packVarying;
+ gctINT _triageStart;
+ gctINT _triageEnd;
+ gctINT _loadBalanceShaderIdx;
+ gctINT _loadBalanceMin;
+ gctINT _loadBalanceMax;
+
+ /* Do not generate immdeiate
+
+ VC_OPTION=-NOIMM
+
+ Force generate immediate even the machine model don't support it,
+ for testing purpose only
+
+ VC_OPTION=-FORCEIMM
+ */
+ gctBOOL noImmediate;
+ gctBOOL forceImmediate;
+
+ /* Power reduction mode options */
+ gctBOOL needPowerOptimization;
+
+ /* Patch TEXLD instruction by adding dummy texld
+ (can be used to tune GPU power usage):
+ for every TEXLD we seen, add n dummy TEXLD
+
+ it can be enabled by environment variable:
+
+ VC_OPTION=-PATCH_TEXLD:M:N
+
+ (for each M texld, add N dummy texld)
+ */
+ gctINT patchEveryTEXLDs;
+ gctINT patchDummyTEXLDs;
+
+ /* Insert NOP after high power consumption instructions
+
+ VC_OPTION="-INSERTNOP:MUL:MULLO:DP3:DP4:SEENTEXLD"
+ */
+ gctBOOL insertNOP;
+ gctBOOL insertNOPAfterMUL;
+ gctBOOL insertNOPAfterMULLO;
+ gctBOOL insertNOPAfterDP3;
+ gctBOOL insertNOPAfterDP4;
+ gctBOOL insertNOPOnlyWhenTexldSeen;
+
+ /* split MAD to MUL and ADD:
+
+ VC_OPTION=-SPLITMAD
+ */
+ gctBOOL splitMAD;
+
+ /* Convert vect3/vec4 operations to multiple vec2/vec1 operations
+
+ VC_OPTION=-SPLITVEC:MUL:MULLO:DP3:DP4
+ */
+ gctBOOL splitVec;
+ gctBOOL splitVec4MUL;
+ gctBOOL splitVec4MULLO;
+ gctBOOL splitVec4DP3;
+ gctBOOL splitVec4DP4;
+
+ /* turn/off features:
+
+ VC_OPTION=-F:n,[0|1]
+ Note: n must be decimal number
+ */
+ gctUINT featureBits;
+
+ /* inline level (default 2 at O1):
+
+ VC_OPTION=-INLINELEVEL:[0-3]
+ 0: no inline
+ 1: only inline the function only called once or small function
+ 2: inline functions be called less than 5 times or medium size function
+ 3: inline everything possible
+ */
+ gctUINT inlineLevel;
+} gcOPTIMIZER_OPTION;
+
+extern gcOPTIMIZER_OPTION theOptimizerOption;
+#define gcmGetOptimizerOption() gcGetOptimizerOption()
+
+#define gcmOPT_DUMP_SHADER_SRC() \
+ (gcmGetOptimizerOption()->dumpShaderSource != 0)
+#define gcmOPT_DUMP_OPTIMIZER() \
+ (gcmGetOptimizerOption()->dumpOptimizer != 0 || \
+ gcmOPT_DUMP_OPTIMIZER_VERBOSE() )
+#define gcmOPT_DUMP_OPTIMIZER_VERBOSE() \
+ (gcmGetOptimizerOption()->dumpOptimizerVerbose != 0)
+#define gcmOPT_DUMP_CODEGEN() \
+ (gcmGetOptimizerOption()->dumpBEGenertedCode != 0 || \
+ gcmOPT_DUMP_CODEGEN_VERBOSE() )
+#define gcmOPT_DUMP_CODEGEN_VERBOSE() \
+ (gcmGetOptimizerOption()->dumpBEVerbose != 0)
+
+#define gcmOPT_SET_DUMP_SHADER_SRC(v) \
+ gcmGetOptimizerOption()->dumpShaderSource = (v)
+
+#define gcmOPT_PATCH_TEXLD() (gcmGetOptimizerOption()->patchDummyTEXLDs != 0)
+#define gcmOPT_INSERT_NOP() (gcmGetOptimizerOption()->insertNOP == gcvTRUE)
+#define gcmOPT_SPLITMAD() (gcmGetOptimizerOption()->splitMAD == gcvTRUE)
+#define gcmOPT_SPLITVEC() (gcmGetOptimizerOption()->splitVec == gcvTRUE)
+
+#define gcmOPT_NOIMMEDIATE() (gcmGetOptimizerOption()->noImmediate == gcvTRUE)
+#define gcmOPT_FORCEIMMEDIATE() (gcmGetOptimizerOption()->forceImmediate == gcvTRUE)
+
+#define gcmOPT_PACKVARYING() (gcmGetOptimizerOption()->packVarying)
+#define gcmOPT_PACKVARYING_triageStart() (gcmGetOptimizerOption()->_triageStart)
+#define gcmOPT_PACKVARYING_triageEnd() (gcmGetOptimizerOption()->_triageEnd)
+
+#define gcmOPT_INLINELEVEL() (gcmGetOptimizerOption()->inlineLevel)
+
+/* Setters */
+#define gcmOPT_SetPatchTexld(m,n) (gcmGetOptimizerOption()->patchEveryTEXLDs = (m),\
+ gcmGetOptimizerOption()->patchDummyTEXLDs = (n))
+#define gcmOPT_SetSplitVecMUL() (gcmGetOptimizerOption()->splitVec = gcvTRUE, \
+ gcmGetOptimizerOption()->splitVec4MUL = gcvTRUE)
+#define gcmOPT_SetSplitVecMULLO() (gcmGetOptimizerOption()->splitVec = gcvTRUE, \
+ gcmGetOptimizerOption()->splitVec4MULLO = gcvTRUE)
+#define gcmOPT_SetSplitVecDP3() (gcmGetOptimizerOption()->splitVec = gcvTRUE, \
+ gcmGetOptimizerOption()->splitVec4DP3 = gcvTRUE)
+#define gcmOPT_SetSplitVecDP4() (gcmGetOptimizerOption()->splitVec = gcvTRUE, \
+ gcmGetOptimizerOption()->splitVec4DP4 = gcvTRUE)
+
+#define gcmOPT_SetPackVarying(v) (gcmGetOptimizerOption()->packVarying = v)
+
+#define FB_LIVERANGE_FIX1 0x0001
+
+
+#define PredefinedDummySamplerId 8
+
+/* Function argument qualifier */
+typedef enum _gceINPUT_OUTPUT
+{
+ gcvFUNCTION_INPUT,
+ gcvFUNCTION_OUTPUT,
+ gcvFUNCTION_INOUT
+}
+gceINPUT_OUTPUT;
+
+/* Kernel function property flags. */
+typedef enum _gcePROPERTY_FLAGS
+{
+ gcvPROPERTY_REQD_WORK_GRP_SIZE = 0x01
+}
+gceKERNEL_FUNCTION_PROPERTY_FLAGS;
+
+/* Uniform flags. */
+typedef enum _gceUNIFORM_FLAGS
+{
+ gcvUNIFORM_KERNEL_ARG = 0x01,
+ gcvUNIFORM_KERNEL_ARG_LOCAL = 0x02,
+ gcvUNIFORM_KERNEL_ARG_SAMPLER = 0x04,
+ gcvUNIFORM_LOCAL_ADDRESS_SPACE = 0x08,
+ gcvUNIFORM_PRIVATE_ADDRESS_SPACE = 0x10,
+ gcvUNIFORM_CONSTANT_ADDRESS_SPACE = 0x20,
+ gcvUNIFORM_GLOBAL_SIZE = 0x40,
+ gcvUNIFORM_LOCAL_SIZE = 0x80,
+ gcvUNIFORM_NUM_GROUPS = 0x100,
+ gcvUNIFORM_GLOBAL_OFFSET = 0x200,
+ gcvUNIFORM_WORK_DIM = 0x400,
+ gcvUNIFORM_KERNEL_ARG_CONSTANT = 0x800,
+ gcvUNIFORM_KERNEL_ARG_LOCAL_MEM_SIZE = 0x1000,
+ gcvUNIFORM_KERNEL_ARG_PRIVATE = 0x2000,
+ gcvUNIFORM_LOADTIME_CONSTANT = 0x4000,
+ gcvUNIFORM_IS_ARRAY = 0x8000,
+}
+gceUNIFORM_FLAGS;
+
+#define gcdUNIFORM_KERNEL_ARG_MASK (gcvUNIFORM_KERNEL_ARG | \
+ gcvUNIFORM_KERNEL_ARG_LOCAL | \
+ gcvUNIFORM_KERNEL_ARG_SAMPLER | \
+ gcvUNIFORM_KERNEL_ARG_PRIVATE | \
+ gcvUNIFORM_KERNEL_ARG_CONSTANT)
+
+typedef enum _gceVARIABLE_UPDATE_FLAGS
+{
+ gcvVARIABLE_UPDATE_NOUPDATE = 0,
+ gcvVARIABLE_UPDATE_TEMPREG,
+ gcvVARIABLE_UPDATE_TYPE_QUALIFIER,
+}gceVARIABLE_UPDATE_FLAGS;
+
+typedef struct _gcMACHINE_INST
+{
+ gctUINT state0;
+ gctUINT state1;
+ gctUINT state2;
+ gctUINT state3;
+}gcMACHINE_INST, *gcMACHINE_INST_PTR;
+
+typedef struct _gcMACHINECODE
+{
+ gcMACHINE_INST_PTR pCode; /* machine code */
+ gctUINT instCount; /* 128-bit count */
+ gctUINT maxConstRegNo;
+ gctUINT maxTempRegNo;
+ gctUINT endPCOfMainRoutine;
+}gcMACHINECODE, *gcMACHINECODE_PTR;
+
+typedef enum NP2_ADDRESS_MODE
+{
+ NP2_ADDRESS_MODE_CLAMP = 0,
+ NP2_ADDRESS_MODE_REPEAT = 1,
+ NP2_ADDRESS_MODE_MIRROR = 2
+}NP2_ADDRESS_MODE;
+
+typedef struct _gcNPOT_PATCH_PARAM
+{
+ gctINT samplerSlot;
+ NP2_ADDRESS_MODE addressMode[3];
+ gctINT texDimension; /* 2 or 3 */
+}gcNPOT_PATCH_PARAM, *gcNPOT_PATCH_PARAM_PTR;
+
+void
+gcGetOptionFromEnv(
+ IN OUT gcOPTIMIZER_OPTION * Option
+ );
+
+void
+gcSetOptimizerOption(
+ IN gceSHADER_FLAGS Flags
+ );
+
+gcOPTIMIZER_OPTION *
+gcGetOptimizerOption();
+
+/*******************************************************************************
+** gcSHADER_SetCompilerVersion
+**
+** Set the compiler version of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to gcSHADER object
+**
+** gctINT *Version
+** Pointer to a two word version
+*/
+gceSTATUS
+gcSHADER_SetCompilerVersion(
+ IN gcSHADER Shader,
+ IN gctUINT32 *Version
+ );
+
+/*******************************************************************************
+** gcSHADER_GetCompilerVersion
+**
+** Get the compiler version of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR *CompilerVersion.
+** Pointer to holder of returned compilerVersion pointer
+*/
+gceSTATUS
+gcSHADER_GetCompilerVersion(
+ IN gcSHADER Shader,
+ OUT gctUINT32_PTR *CompilerVersion
+ );
+
+/*******************************************************************************
+** gcSHADER_GetType
+**
+** Get the gcSHADER object's type.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctINT *Type.
+** Pointer to return shader type.
+*/
+gceSTATUS
+gcSHADER_GetType(
+ IN gcSHADER Shader,
+ OUT gctINT *Type
+ );
+
+gctUINT
+gcSHADER_NextId();
+/*******************************************************************************
+** gcSHADER_Construct
+********************************************************************************
+**
+** Construct a new gcSHADER object.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Type of gcSHADER object to cerate. 'ShaderType' can be one of the
+** following:
+**
+** gcSHADER_TYPE_VERTEX Vertex shader.
+** gcSHADER_TYPE_FRAGMENT Fragment shader.
+**
+** OUTPUT:
+**
+** gcSHADER * Shader
+** Pointer to a variable receiving the gcSHADER object pointer.
+*/
+gceSTATUS
+gcSHADER_Construct(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ OUT gcSHADER * Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Destroy
+********************************************************************************
+**
+** Destroy a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Destroy(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Copy
+********************************************************************************
+**
+** Copy a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSHADER Source
+** Pointer to a gcSHADER object that will be copied.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Copy(
+ IN gcSHADER Shader,
+ IN gcSHADER Source
+ );
+
+/*******************************************************************************
+** gcSHADER_LoadHeader
+**
+** Load a gcSHADER object from a binary buffer. The binary buffer is layed out
+** as follows:
+** // Six word header
+** // Signature, must be 'S','H','D','R'.
+** gctINT8 signature[4];
+** gctUINT32 binFileVersion;
+** gctUINT32 compilerVersion[2];
+** gctUINT32 gcSLVersion;
+** gctUINT32 binarySize;
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+** Shader type will be returned if type in shader object is not gcSHADER_TYPE_PRECOMPILED
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containing the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+** nothing
+**
+*/
+gceSTATUS
+gcSHADER_LoadHeader(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize,
+ OUT gctUINT32 * ShaderVersion
+ );
+
+/*******************************************************************************
+** gcSHADER_LoadKernel
+**
+** Load a kernel function given by name into gcSHADER object
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSTRING KernelName
+** Pointer to a kernel function name
+**
+** OUTPUT:
+** nothing
+**
+*/
+gceSTATUS
+gcSHADER_LoadKernel(
+ IN gcSHADER Shader,
+ IN gctSTRING KernelName
+ );
+
+/*******************************************************************************
+** gcSHADER_Load
+********************************************************************************
+**
+** Load a gcSHADER object from a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containg the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Load(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_Save
+********************************************************************************
+**
+** Save a gcSHADER object to a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer to be used as storage for the gcSHADER
+** object. If 'Buffer' is gcvNULL, the gcSHADER object will not be saved,
+** but the number of bytes required to hold the binary output for the
+** gcSHADER object will be returned.
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable holding the number of bytes allocated in
+** 'Buffer'. Only valid if 'Buffer' is not gcvNULL.
+**
+** OUTPUT:
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable receiving the number of bytes required to hold
+** the binary form of the gcSHADER object.
+*/
+gceSTATUS
+gcSHADER_Save(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN OUT gctSIZE_T * BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_LoadEx
+********************************************************************************
+**
+** Load a gcSHADER object from a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containg the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_LoadEx(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_SaveEx
+********************************************************************************
+**
+** Save a gcSHADER object to a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer to be used as storage for the gcSHADER
+** object. If 'Buffer' is gcvNULL, the gcSHADER object will not be saved,
+** but the number of bytes required to hold the binary output for the
+** gcSHADER object will be returned.
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable holding the number of bytes allocated in
+** 'Buffer'. Only valid if 'Buffer' is not gcvNULL.
+**
+** OUTPUT:
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable receiving the number of bytes required to hold
+** the binary form of the gcSHADER object.
+*/
+gceSTATUS
+gcSHADER_SaveEx(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN OUT gctSIZE_T * BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateAttributes
+**
+** Reallocate an array of pointers to gcATTRIBUTE objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateAttributes(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddAttribute
+********************************************************************************
+**
+** Add an attribute to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the attribute to add.
+**
+** gcSHADER_TYPE Type
+** Type of the attribute to add.
+**
+** gctSIZE_T Length
+** Array length of the attribute to add. 'Length' must be at least 1.
+**
+** gctBOOL IsTexture
+** gcvTRUE if the attribute is used as a texture coordinate, gcvFALSE if not.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_AddAttribute(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctBOOL IsTexture,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttributeCount
+********************************************************************************
+**
+** Get the number of attributes for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of attributes.
+*/
+gceSTATUS
+gcSHADER_GetAttributeCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttribute
+********************************************************************************
+**
+** Get the gcATTRIBUTE object poniter for an indexed attribute for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the attribute to retrieve.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetAttribute(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateUniforms
+**
+** Reallocate an array of pointers to gcUNIFORM objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateUniforms(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddUniform
+********************************************************************************
+**
+** Add an uniform to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the uniform to add.
+**
+** gcSHADER_TYPE Type
+** Type of the uniform to add.
+**
+** gctSIZE_T Length
+** Array length of the uniform to add. 'Length' must be at least 1.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_AddUniform(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * Uniform
+ );
+
+
+/*******************************************************************************
+** gcSHADER_AddUniformEx
+********************************************************************************
+**
+** Add an uniform to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the uniform to add.
+**
+** gcSHADER_TYPE Type
+** Type of the uniform to add.
+**
+** gcSHADER_PRECISION precision
+** Precision of the uniform to add.
+**
+** gctSIZE_T Length
+** Array length of the uniform to add. 'Length' must be at least 1.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_AddUniformEx(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gcSHADER_PRECISION precision,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_AddUniformEx1
+********************************************************************************
+**
+** Add an uniform to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the uniform to add.
+**
+** gcSHADER_TYPE Type
+** Type of the uniform to add.
+**
+** gcSHADER_PRECISION precision
+** Precision of the uniform to add.
+**
+** gctSIZE_T Length
+** Array length of the uniform to add. 'Length' must be at least 1.
+**
+** gcSHADER_VAR_CATEGORY varCategory
+** Variable category, normal or struct.
+**
+** gctUINT16 numStructureElement
+** If struct, its element number.
+**
+** gctINT16 parent
+** If struct, parent index in gcSHADER.variables.
+**
+** gctINT16 prevSibling
+** If struct, previous sibling index in gcSHADER.variables.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+**
+** gctINT16* ThisUniformIndex
+** Returned value about uniform index in gcSHADER.
+*/
+gceSTATUS
+gcSHADER_AddUniformEx1(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gcSHADER_PRECISION precision,
+ IN gctSIZE_T Length,
+ IN gctINT IsArray,
+ IN gcSHADER_VAR_CATEGORY varCategory,
+ IN gctUINT16 numStructureElement,
+ IN gctINT16 parent,
+ IN gctINT16 prevSibling,
+ OUT gctINT16* ThisUniformIndex,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniformCount
+********************************************************************************
+**
+** Get the number of uniforms for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of uniforms.
+*/
+gceSTATUS
+gcSHADER_GetUniformCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniform
+********************************************************************************
+**
+** Get the gcUNIFORM object pointer for an indexed uniform for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the uniform to retrieve.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_GetUniform(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcUNIFORM * Uniform
+ );
+
+
+/*******************************************************************************
+** gcSHADER_GetUniformIndexingRange
+********************************************************************************
+**
+** Get the gcUNIFORM object pointer for an indexed uniform for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctINT uniformIndex
+** Index of the start uniform.
+**
+** gctINT offset
+** Offset to indexing.
+**
+** OUTPUT:
+**
+** gctINT * LastUniformIndex
+** Pointer to index of last uniform in indexing range.
+**
+** gctINT * OffsetUniformIndex
+** Pointer to index of uniform that indexing at offset.
+**
+** gctINT * DeviationInOffsetUniform
+** Pointer to offset in uniform picked up.
+*/
+gceSTATUS
+gcSHADER_GetUniformIndexingRange(
+ IN gcSHADER Shader,
+ IN gctINT uniformIndex,
+ IN gctINT offset,
+ OUT gctINT * LastUniformIndex,
+ OUT gctINT * OffsetUniformIndex,
+ OUT gctINT * DeviationInOffsetUniform
+ );
+
+/*******************************************************************************
+** gcSHADER_GetKernelFucntion
+**
+** Get the gcKERNEL_FUNCTION object pointer for an indexed kernel function for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of kernel function to retreive the name for.
+**
+** OUTPUT:
+**
+** gcKERNEL_FUNCTION * KernelFunction
+** Pointer to a variable receiving the gcKERNEL_FUNCTION object pointer.
+*/
+gceSTATUS
+gcSHADER_GetKernelFunction(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcKERNEL_FUNCTION * KernelFunction
+ );
+
+gceSTATUS
+gcSHADER_GetKernelFunctionByName(
+ IN gcSHADER Shader,
+ IN gctSTRING KernelName,
+ OUT gcKERNEL_FUNCTION * KernelFunction
+ );
+/*******************************************************************************
+** gcSHADER_GetKernelFunctionCount
+**
+** Get the number of kernel functions for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of kernel functions.
+*/
+gceSTATUS
+gcSHADER_GetKernelFunctionCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateOutputs
+**
+** Reallocate an array of pointers to gcOUTPUT objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateOutputs(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOutput
+********************************************************************************
+**
+** Add an output to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the output to add.
+**
+** gcSHADER_TYPE Type
+** Type of the output to add.
+**
+** gctSIZE_T Length
+** Array length of the output to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the output value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOutput(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+gceSTATUS
+gcSHADER_AddOutputIndexed(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gctSIZE_T Index,
+ IN gctUINT16 TempIndex
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutputCount
+********************************************************************************
+**
+** Get the number of outputs for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of outputs.
+*/
+gceSTATUS
+gcSHADER_GetOutputCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutput
+********************************************************************************
+**
+** Get the gcOUTPUT object pointer for an indexed output for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of output to retrieve.
+**
+** OUTPUT:
+**
+** gcOUTPUT * Output
+** Pointer to a variable receiving the gcOUTPUT object pointer.
+*/
+gceSTATUS
+gcSHADER_GetOutput(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcOUTPUT * Output
+ );
+
+
+/*******************************************************************************
+** gcSHADER_GetOutputByName
+********************************************************************************
+**
+** Get the gcOUTPUT object pointer for this shader by output name.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSTRING name
+** Name of output to retrieve.
+**
+** gctSIZE_T nameLength
+** Length of name to retrieve
+**
+** OUTPUT:
+**
+** gcOUTPUT * Output
+** Pointer to a variable receiving the gcOUTPUT object pointer.
+*/
+gceSTATUS
+gcSHADER_GetOutputByName(
+ IN gcSHADER Shader,
+ IN gctSTRING name,
+ IN gctSIZE_T nameLength,
+ OUT gcOUTPUT * Output
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateVariables
+**
+** Reallocate an array of pointers to gcVARIABLE objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateVariables(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddVariable
+********************************************************************************
+**
+** Add a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the variable to add.
+**
+** gcSHADER_TYPE Type
+** Type of the variable to add.
+**
+** gctSIZE_T Length
+** Array length of the variable to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the variable value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddVariable(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+
+/*******************************************************************************
+** gcSHADER_AddVariableEx
+********************************************************************************
+**
+** Add a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the variable to add.
+**
+** gcSHADER_TYPE Type
+** Type of the variable to add.
+**
+** gctSIZE_T Length
+** Array length of the variable to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the variable value.
+**
+** gcSHADER_VAR_CATEGORY varCategory
+** Variable category, normal or struct.
+**
+** gctUINT16 numStructureElement
+** If struct, its element number.
+**
+** gctINT16 parent
+** If struct, parent index in gcSHADER.variables.
+**
+** gctINT16 prevSibling
+** If struct, previous sibling index in gcSHADER.variables.
+**
+** OUTPUT:
+**
+** gctINT16* ThisVarIndex
+** Returned value about variable index in gcSHADER.
+*/
+gceSTATUS
+gcSHADER_AddVariableEx(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister,
+ IN gcSHADER_VAR_CATEGORY varCategory,
+ IN gctUINT16 numStructureElement,
+ IN gctINT16 parent,
+ IN gctINT16 prevSibling,
+ OUT gctINT16* ThisVarIndex
+ );
+
+/*******************************************************************************
+** gcSHADER_UpdateVariable
+********************************************************************************
+**
+** Update a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of variable to retrieve.
+**
+** gceVARIABLE_UPDATE_FLAGS flag
+** Flag which property of variable will be updated.
+**
+** gctUINT newValue
+** New value to update.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_UpdateVariable(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ IN gceVARIABLE_UPDATE_FLAGS flag,
+ IN gctUINT newValue
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariableCount
+********************************************************************************
+**
+** Get the number of variables for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of variables.
+*/
+gceSTATUS
+gcSHADER_GetVariableCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariable
+********************************************************************************
+**
+** Get the gcVARIABLE object pointer for an indexed variable for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of variable to retrieve.
+**
+** OUTPUT:
+**
+** gcVARIABLE * Variable
+** Pointer to a variable receiving the gcVARIABLE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetVariable(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcVARIABLE * Variable
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariableIndexingRange
+********************************************************************************
+**
+** Get the gcVARIABLE indexing range.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcVARIABLE variable
+** Start variable.
+**
+** gctBOOL whole
+** Indicate whether maximum indexing range is queried
+**
+** OUTPUT:
+**
+** gctUINT *Start
+** Pointer to range start (temp register index).
+**
+** gctUINT *End
+** Pointer to range end (temp register index).
+*/
+gceSTATUS
+gcSHADER_GetVariableIndexingRange(
+ IN gcSHADER Shader,
+ IN gcVARIABLE variable,
+ IN gctBOOL whole,
+ OUT gctUINT *Start,
+ OUT gctUINT *End
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcode
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the target
+** of the opcode.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcode(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddOpcode2(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeIndexed
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object that writes to an dynamically indexed
+** target.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the
+** target of the opcode.
+**
+** gcSL_INDEXED Mode
+** Location of the dynamic index inside the temporary register. Valid
+** values can be:
+**
+** gcSL_INDEXED_X - Use x component of the temporary register.
+** gcSL_INDEXED_Y - Use y component of the temporary register.
+** gcSL_INDEXED_Z - Use z component of the temporary register.
+** gcSL_INDEXED_W - Use w component of the temporary register.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditionIndexed
+**
+** Add an opcode to a gcSHADER object that writes to an dynamically indexed
+** target.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition to check.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the
+** target of the opcode.
+**
+** gcSL_INDEXED Indexed
+** Location of the dynamic index inside the temporary register. Valid
+** values can be:
+**
+** gcSL_INDEXED_X - Use x component of the temporary register.
+** gcSL_INDEXED_Y - Use y component of the temporary register.
+** gcSL_INDEXED_Z - Use z component of the temporary register.
+** gcSL_INDEXED_W - Use w component of the temporary register.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditionIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_INDEXED Indexed,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditional
+********************************************************************************
+**
+** Add an conditional opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditional(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditionalFormatted
+**
+** Add an conditional jump or call opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gcSL_FORMAT Format
+** Format of conditional operands
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditionalFormatted(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gcSL_FORMAT Format,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditionalFormattedEnable
+**
+** Add an conditional jump or call opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gcSL_FORMAT Format
+** Format of conditional operands
+**
+** gctUINT8 Enable
+** Write enable value for the target of the opcode.
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditionalFormattedEnable(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gcSL_FORMAT Format,
+ IN gctUINT8 Enable,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddLabel
+********************************************************************************
+**
+** Define a label at the current instruction of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Label
+** Label to define.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddLabel(
+ IN gcSHADER Shader,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSource
+********************************************************************************
+**
+** Add a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSource(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceIndexed
+********************************************************************************
+**
+** Add a dynamically indexed source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_INDEXED Mode
+** Addressing mode for the index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttribute
+********************************************************************************
+**
+** Add an attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttribute(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttributeIndexed
+********************************************************************************
+**
+** Add an indexed attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttributeIndexed(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniform
+********************************************************************************
+**
+** Add a uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniform(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniformIndexed
+********************************************************************************
+**
+** Add an indexed uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniformIndexed(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+gceSTATUS
+gcSHADER_AddSourceSamplerIndexed(
+ IN gcSHADER Shader,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+gceSTATUS
+gcSHADER_AddSourceAttributeFormatted(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceAttributeIndexedFormatted(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceUniformFormatted(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceUniformIndexedFormatted(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceSamplerIndexedFormatted(
+ IN gcSHADER Shader,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceConstant
+********************************************************************************
+**
+** Add a constant floating point value as a source operand to a gcSHADER
+** object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctFLOAT Constant
+** Floating point constant.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceConstant(
+ IN gcSHADER Shader,
+ IN gctFLOAT Constant
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceConstantFormatted
+********************************************************************************
+**
+** Add a constant value as a source operand to a gcSHADER
+** object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** void * Constant
+** Pointer to constant.
+**
+** gcSL_FORMAT Format
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceConstantFormatted(
+ IN gcSHADER Shader,
+ IN void *Constant,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_Pack
+********************************************************************************
+**
+** Pack a dynamically created gcSHADER object by trimming the allocated arrays
+** and resolving all the labeling.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Pack(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_SetOptimizationOption
+********************************************************************************
+**
+** Set optimization option of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT OptimizationOption
+** Optimization option. Can be one of the following:
+**
+** 0 - No optimization.
+** 1 - Full optimization.
+** Other value - For optimizer testing.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_SetOptimizationOption(
+ IN gcSHADER Shader,
+ IN gctUINT OptimizationOption
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateFunctions
+**
+** Reallocate an array of pointers to gcFUNCTION objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateFunctions(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcSHADER_AddFunction(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ OUT gcFUNCTION * Function
+ );
+
+gceSTATUS
+gcSHADER_ReallocateKernelFunctions(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcSHADER_AddKernelFunction(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ OUT gcKERNEL_FUNCTION * KernelFunction
+ );
+
+gceSTATUS
+gcSHADER_BeginFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+gceSTATUS
+gcSHADER_EndFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+gceSTATUS
+gcSHADER_BeginKernelFunction(
+ IN gcSHADER Shader,
+ IN gcKERNEL_FUNCTION KernelFunction
+ );
+
+gceSTATUS
+gcSHADER_EndKernelFunction(
+ IN gcSHADER Shader,
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctSIZE_T LocalMemorySize
+ );
+
+gceSTATUS
+gcSHADER_SetMaxKernelFunctionArgs(
+ IN gcSHADER Shader,
+ IN gctUINT32 MaxKernelFunctionArgs
+ );
+
+/*******************************************************************************
+** gcSHADER_SetConstantMemorySize
+**
+** Set the constant memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T ConstantMemorySize
+** Constant memory size in bytes
+**
+** gctCHAR *ConstantMemoryBuffer
+** Constant memory buffer
+*/
+gceSTATUS
+gcSHADER_SetConstantMemorySize(
+ IN gcSHADER Shader,
+ IN gctSIZE_T ConstantMemorySize,
+ IN gctCHAR * ConstantMemoryBuffer
+ );
+
+/*******************************************************************************
+** gcSHADER_GetConstantMemorySize
+**
+** Set the constant memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * ConstantMemorySize
+** Pointer to a variable receiving constant memory size in bytes
+**
+** gctCHAR **ConstantMemoryBuffer.
+** Pointer to a variable for returned shader constant memory buffer.
+*/
+gceSTATUS
+gcSHADER_GetConstantMemorySize(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * ConstantMemorySize,
+ OUT gctCHAR ** ConstantMemoryBuffer
+ );
+
+/*******************************************************************************
+** gcSHADER_SetPrivateMemorySize
+**
+** Set the private memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T PrivateMemorySize
+** Private memory size in bytes
+*/
+gceSTATUS
+gcSHADER_SetPrivateMemorySize(
+ IN gcSHADER Shader,
+ IN gctSIZE_T PrivateMemorySize
+ );
+
+/*******************************************************************************
+** gcSHADER_GetPrivateMemorySize
+**
+** Set the private memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * PrivateMemorySize
+** Pointer to a variable receiving private memory size in bytes
+*/
+gceSTATUS
+gcSHADER_GetPrivateMemorySize(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * PrivateMemorySize
+ );
+
+/*******************************************************************************
+** gcSHADER_SetLocalMemorySize
+**
+** Set the local memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T LocalMemorySize
+** Local memory size in bytes
+*/
+gceSTATUS
+gcSHADER_SetLocalMemorySize(
+ IN gcSHADER Shader,
+ IN gctSIZE_T LocalMemorySize
+ );
+
+/*******************************************************************************
+** gcSHADER_GetLocalMemorySize
+**
+** Set the local memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * LocalMemorySize
+** Pointer to a variable receiving lcoal memory size in bytes
+*/
+gceSTATUS
+gcSHADER_GetLocalMemorySize(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * LocalMemorySize
+ );
+
+
+/*******************************************************************************
+** gcSHADER_CheckValidity
+**
+** Check validity for a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+*/
+gceSTATUS
+gcSHADER_CheckValidity(
+ IN gcSHADER Shader
+ );
+
+#if gcdUSE_WCLIP_PATCH
+gceSTATUS
+gcATTRIBUTE_IsPosition(
+ IN gcATTRIBUTE Attribute,
+ OUT gctBOOL * IsPosition
+ );
+#endif
+
+/*******************************************************************************
+** gcATTRIBUTE_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the attribute. 'Type'
+** can be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** attribute was declared as an array. If the attribute was not
+** declared as an array, the array length will be 1. 'ArrayLength' can
+** be gcvNULL, in which case no array length will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetType(
+ IN gcATTRIBUTE Attribute,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_GetName
+********************************************************************************
+**
+** Get the name of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the attribute name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the attribute name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetName(
+ IN gcATTRIBUTE Attribute,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_IsEnabled
+********************************************************************************
+**
+** Query the enabled state of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctBOOL * Enabled
+** Pointer to a variable receiving the enabled state of the attribute.
+*/
+gceSTATUS
+gcATTRIBUTE_IsEnabled(
+ IN gcATTRIBUTE Attribute,
+ OUT gctBOOL * Enabled
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the uniform. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** uniform was declared as an array. If the uniform was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetType(
+ IN gcUNIFORM Uniform,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetTypeEx
+********************************************************************************
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the uniform. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gcSHADER_PRECISION * Precision
+** Pointer to a variable receiving the precision of the uniform. 'Precision' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** uniform was declared as an array. If the uniform was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetTypeEx(
+ IN gcUNIFORM Uniform,
+ OUT gcSHADER_TYPE * Type,
+ OUT gcSHADER_PRECISION * Precision,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetFlags
+********************************************************************************
+**
+** Get the flags of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gceUNIFORM_FLAGS * Flags
+** Pointer to a variable receiving the flags of the uniform.
+**
+*/
+gceSTATUS
+gcUNIFORM_GetFlags(
+ IN gcUNIFORM Uniform,
+ OUT gceUNIFORM_FLAGS * Flags
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetFlags
+********************************************************************************
+**
+** Set the flags of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gceUNIFORM_FLAGS Flags
+** Flags of the uniform to be set.
+**
+** OUTPUT:
+** Nothing.
+**
+*/
+gceSTATUS
+gcUNIFORM_SetFlags(
+ IN gcUNIFORM Uniform,
+ IN gceUNIFORM_FLAGS Flags
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetName
+********************************************************************************
+**
+** Get the name of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the uniform name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the uniform name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetName(
+ IN gcUNIFORM Uniform,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetSampler
+********************************************************************************
+**
+** Get the physical sampler number for a sampler gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctUINT32 * Sampler
+** Pointer to a variable receiving the physical sampler.
+*/
+gceSTATUS
+gcUNIFORM_GetSampler(
+ IN gcUNIFORM Uniform,
+ OUT gctUINT32 * Sampler
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetFormat
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSL_FORMAT * Format
+** Pointer to a variable receiving the format of element of the uniform.
+** 'Type' can be gcvNULL, in which case no type will be returned.
+**
+** gctBOOL * IsPointer
+** Pointer to a variable receiving the state wheter the uniform is a pointer.
+** 'IsPointer' can be gcvNULL, in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetFormat(
+ IN gcUNIFORM Uniform,
+ OUT gcSL_FORMAT * Format,
+ OUT gctBOOL * IsPointer
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetFormat
+**
+** Set the format and isPointer of a uniform.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gcSL_FORMAT Format
+** Format of element of the uniform shaderType.
+**
+** gctBOOL IsPointer
+** Wheter the uniform is a pointer.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetFormat(
+ IN gcUNIFORM Uniform,
+ IN gcSL_FORMAT Format,
+ IN gctBOOL IsPointer
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValue
+********************************************************************************
+**
+** Set the value of a uniform in integer.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctINT * Value
+** Pointer to a buffer holding the integer values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValue(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueX
+********************************************************************************
+**
+** Set the value of a uniform in fixed point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFIXED_POINT * Value
+** Pointer to a buffer holding the fixed point values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueX(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN gctFIXED_POINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueF
+********************************************************************************
+**
+** Set the value of a uniform in floating point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFLOAT * Value
+** Pointer to a buffer holding the floating point values for the
+** uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueF(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctFLOAT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetModelViewProjMatrix
+********************************************************************************
+**
+** Get the value of uniform modelViewProjMatrix ID if present.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gctUINT
+gcUNIFORM_GetModelViewProjMatrix(
+ IN gcUNIFORM Uniform
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the output. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** output was declared as an array. If the output was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetType(
+ IN gcOUTPUT Output,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetIndex
+********************************************************************************
+**
+** Get the index of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctUINT * Index
+** Pointer to a variable receiving the temporary register index of the
+** output. 'Index' can be gcvNULL,. in which case no index will be
+** returned.
+*/
+gceSTATUS
+gcOUTPUT_GetIndex(
+ IN gcOUTPUT Output,
+ OUT gctUINT * Index
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetName
+********************************************************************************
+**
+** Get the name of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the output name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the output name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetName(
+ IN gcOUTPUT Output,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+*********************************************************** F U N C T I O N S **
+*******************************************************************************/
+
+/*******************************************************************************
+** gcFUNCTION_ReallocateArguments
+**
+** Reallocate an array of gcsFUNCTION_ARGUMENT objects.
+**
+** INPUT:
+**
+** gcFUNCTION Function
+** Pointer to a gcFUNCTION object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcFUNCTION_ReallocateArguments(
+ IN gcFUNCTION Function,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcFUNCTION_AddArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 TempIndex,
+ IN gctUINT8 Enable,
+ IN gctUINT8 Qualifier
+ );
+
+gceSTATUS
+gcFUNCTION_GetArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 Index,
+ OUT gctUINT16_PTR Temp,
+ OUT gctUINT8_PTR Enable,
+ OUT gctUINT8_PTR Swizzle
+ );
+
+gceSTATUS
+gcFUNCTION_GetLabel(
+ IN gcFUNCTION Function,
+ OUT gctUINT_PTR Label
+ );
+
+/*******************************************************************************
+************************* K E R N E L P R O P E R T Y F U N C T I O N S **
+*******************************************************************************/
+/*******************************************************************************/
+gceSTATUS
+gcKERNEL_FUNCTION_AddKernelFunctionProperties(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctINT propertyType,
+ IN gctSIZE_T propertySize,
+ IN gctINT * values
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetPropertyCount(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetProperty(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT Index,
+ OUT gctSIZE_T * propertySize,
+ OUT gctINT * propertyType,
+ OUT gctINT * propertyValues
+ );
+
+
+/*******************************************************************************
+*******************************I M A G E S A M P L E R F U N C T I O N S **
+*******************************************************************************/
+/*******************************************************************************
+** gcKERNEL_FUNCTION_ReallocateImageSamplers
+**
+** Reallocate an array of pointers to image sampler pair.
+**
+** INPUT:
+**
+** gcKERNEL_FUNCTION KernelFunction
+** Pointer to a gcKERNEL_FUNCTION object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcKERNEL_FUNCTION_ReallocateImageSamplers(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_AddImageSampler(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT8 ImageNum,
+ IN gctBOOL IsConstantSamplerType,
+ IN gctUINT32 SamplerType
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetImageSamplerCount(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetImageSampler(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT Index,
+ OUT gctUINT8 *ImageNum,
+ OUT gctBOOL *IsConstantSamplerType,
+ OUT gctUINT32 *SamplerType
+ );
+
+/*******************************************************************************
+*********************************************K E R N E L F U N C T I O N S **
+*******************************************************************************/
+
+/*******************************************************************************
+** gcKERNEL_FUNCTION_ReallocateArguments
+**
+** Reallocate an array of gcsFUNCTION_ARGUMENT objects.
+**
+** INPUT:
+**
+** gcKERNEL_FUNCTION Function
+** Pointer to a gcKERNEL_FUNCTION object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcKERNEL_FUNCTION_ReallocateArguments(
+ IN gcKERNEL_FUNCTION Function,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_AddArgument(
+ IN gcKERNEL_FUNCTION Function,
+ IN gctUINT16 TempIndex,
+ IN gctUINT8 Enable,
+ IN gctUINT8 Qualifier
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetArgument(
+ IN gcKERNEL_FUNCTION Function,
+ IN gctUINT16 Index,
+ OUT gctUINT16_PTR Temp,
+ OUT gctUINT8_PTR Enable,
+ OUT gctUINT8_PTR Swizzle
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetLabel(
+ IN gcKERNEL_FUNCTION Function,
+ OUT gctUINT_PTR Label
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetName(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_ReallocateUniformArguments(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_AddUniformArgument(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * UniformArgument
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetUniformArgumentCount(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetUniformArgument(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT Index,
+ OUT gcUNIFORM * UniformArgument
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_SetCodeEnd(
+ IN gcKERNEL_FUNCTION KernelFunction
+ );
+
+/*******************************************************************************
+** gcCompileShader
+********************************************************************************
+**
+** Compile a shader.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Shader type to compile. Can be one of the following values:
+**
+** gcSHADER_TYPE_VERTEX
+** Compile a vertex shader.
+**
+** gcSHADER_TYPE_FRAGMENT
+** Compile a fragment shader.
+**
+** gctSIZE_T SourceSize
+** Size of the source buffer in bytes.
+**
+** gctCONST_STRING Source
+** Pointer to the buffer containing the shader source code.
+**
+** OUTPUT:
+**
+** gcSHADER * Binary
+** Pointer to a variable receiving the pointer to a gcSHADER object
+** containg the compiled shader code.
+**
+** gctSTRING * Log
+** Pointer to a variable receiving a string pointer containging the
+** compile log.
+*/
+gceSTATUS
+gcCompileShader(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ IN gctSIZE_T SourceSize,
+ IN gctCONST_STRING Source,
+ OUT gcSHADER * Binary,
+ OUT gctSTRING * Log
+ );
+
+/*******************************************************************************
+** gcOptimizeShader
+********************************************************************************
+**
+** Optimize a shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object holding information about the compiled
+** shader.
+**
+** gctFILE LogFile
+** Pointer to an open FILE object.
+*/
+gceSTATUS
+gcOptimizeShader(
+ IN gcSHADER Shader,
+ IN gctFILE LogFile
+ );
+
+/*******************************************************************************
+** gcLinkShaders
+********************************************************************************
+**
+** Link two shaders and generate a harwdare specific state buffer by compiling
+** the compiler generated code through the resource allocator and code
+** generator.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to a gcSHADER object holding information about the compiled
+** vertex shader.
+**
+** gcSHADER FragmentShader
+** Pointer to a gcSHADER object holding information about the compiled
+** fragment shader.
+**
+** gceSHADER_FLAGS Flags
+** Compiler flags. Can be any of the following:
+**
+** gcvSHADER_DEAD_CODE - Dead code elimination.
+** gcvSHADER_RESOURCE_USAGE - Resource usage optimizaion.
+** gcvSHADER_OPTIMIZER - Full optimization.
+** gcvSHADER_USE_GL_Z - Use OpenGL ES Z coordinate.
+** gcvSHADER_USE_GL_POSITION - Use OpenGL ES gl_Position.
+** gcvSHADER_USE_GL_FACE - Use OpenGL ES gl_FaceForward.
+**
+** OUTPUT:
+**
+** gctSIZE_T * StateBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'StateBuffer'.
+**
+** gctPOINTER * StateBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLinkShaders(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gceSHADER_FLAGS Flags,
+ OUT gctSIZE_T * StateBufferSize,
+ OUT gctPOINTER * StateBuffer,
+ OUT gcsHINT_PTR * Hints,
+ OUT gcMACHINECODE_PTR *ppVsMachineCode,
+ OUT gcMACHINECODE_PTR *ppFsMachineCode
+ );
+
+/*******************************************************************************
+** gcLoadShaders
+********************************************************************************
+**
+** Load a pre-compiled and pre-linked shader program into the hardware.
+**
+** INPUT:
+**
+** gcoHAL Hal
+** Pointer to a gcoHAL object.
+**
+** gctSIZE_T StateBufferSize
+** The number of bytes in the 'StateBuffer'.
+**
+** gctPOINTER StateBuffer
+** Pointer to the states that make up the shader program.
+**
+** gcsHINT_PTR Hints
+** Pointer to a gcsHINT structure that contains information required
+** when loading the shader states.
+*/
+gceSTATUS
+gcLoadShaders(
+ IN gcoHAL Hal,
+ IN gctSIZE_T StateBufferSize,
+ IN gctPOINTER StateBuffer,
+ IN gcsHINT_PTR Hints
+ );
+
+gceSTATUS
+gcRecompileShaders(
+ IN gcoHAL Hal,
+ IN gcMACHINECODE_PTR pVsMachineCode,
+ IN gcMACHINECODE_PTR pPsMachineCode,
+ /*Recompile variables*/
+ IN OUT gctPOINTER *ppRecompileStateBuffer,
+ IN OUT gctSIZE_T *pRecompileStateBufferSize,
+ IN OUT gcsHINT_PTR *ppRecompileHints,
+ /* natvie state*/
+ IN gctPOINTER pNativeStateBuffer,
+ IN gctSIZE_T nativeStateBufferSize,
+ IN gcsHINT_PTR pNativeHints,
+ /* npt info */
+ IN gctUINT32 Samplers,
+ IN gctUINT32 *SamplerWrapS,
+ IN gctUINT32 *SamplerWrapT
+ );
+/*******************************************************************************
+** gcSaveProgram
+********************************************************************************
+**
+** Save pre-compiled shaders and pre-linked programs to a binary file.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to vertex shader object.
+**
+** gcSHADER FragmentShader
+** Pointer to fragment shader object.
+**
+** gctSIZE_T ProgramBufferSize
+** Number of bytes in 'ProgramBuffer'.
+**
+** gctPOINTER ProgramBuffer
+** Pointer to buffer containing the program states.
+**
+** gcsHINT_PTR Hints
+** Pointer to HINTS structure for program states.
+**
+** OUTPUT:
+**
+** gctPOINTER * Binary
+** Pointer to a variable receiving the binary data to be saved.
+**
+** gctSIZE_T * BinarySize
+** Pointer to a variable receiving the number of bytes inside 'Binary'.
+*/
+gceSTATUS
+gcSaveProgram(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gctSIZE_T ProgramBufferSize,
+ IN gctPOINTER ProgramBuffer,
+ IN gcsHINT_PTR Hints,
+ OUT gctPOINTER * Binary,
+ OUT gctSIZE_T * BinarySize
+ );
+
+/*******************************************************************************
+** gcLoadProgram
+********************************************************************************
+**
+** Load pre-compiled shaders and pre-linked programs from a binary file.
+**
+** INPUT:
+**
+** gctPOINTER Binary
+** Pointer to the binary data loaded.
+**
+** gctSIZE_T BinarySize
+** Number of bytes in 'Binary'.
+**
+** OUTPUT:
+**
+** gcSHADER VertexShader
+** Pointer to a vertex shader object.
+**
+** gcSHADER FragmentShader
+** Pointer to a fragment shader object.
+**
+** gctSIZE_T * ProgramBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'ProgramBuffer'.
+**
+** gctPOINTER * ProgramBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLoadProgram(
+ IN gctPOINTER Binary,
+ IN gctSIZE_T BinarySize,
+ OUT gcSHADER VertexShader,
+ OUT gcSHADER FragmentShader,
+ OUT gctSIZE_T * ProgramBufferSize,
+ OUT gctPOINTER * ProgramBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+/*******************************************************************************
+** gcCompileKernel
+********************************************************************************
+**
+** Compile a OpenCL kernel shader.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctSIZE_T SourceSize
+** Size of the source buffer in bytes.
+**
+** gctCONST_STRING Source
+** Pointer to the buffer containing the shader source code.
+**
+** OUTPUT:
+**
+** gcSHADER * Binary
+** Pointer to a variable receiving the pointer to a gcSHADER object
+** containg the compiled shader code.
+**
+** gctSTRING * Log
+** Pointer to a variable receiving a string pointer containging the
+** compile log.
+*/
+gceSTATUS
+gcCompileKernel(
+ IN gcoHAL Hal,
+ IN gctSIZE_T SourceSize,
+ IN gctCONST_STRING Source,
+ IN gctCONST_STRING Options,
+ OUT gcSHADER * Binary,
+ OUT gctSTRING * Log
+ );
+
+/*******************************************************************************
+** gcLinkKernel
+********************************************************************************
+**
+** Link OpenCL kernel and generate a harwdare specific state buffer by compiling
+** the compiler generated code through the resource allocator and code
+** generator.
+**
+** INPUT:
+**
+** gcSHADER Kernel
+** Pointer to a gcSHADER object holding information about the compiled
+** OpenCL kernel.
+**
+** gceSHADER_FLAGS Flags
+** Compiler flags. Can be any of the following:
+**
+** gcvSHADER_DEAD_CODE - Dead code elimination.
+** gcvSHADER_RESOURCE_USAGE - Resource usage optimizaion.
+** gcvSHADER_OPTIMIZER - Full optimization.
+** gcvSHADER_USE_GL_Z - Use OpenGL ES Z coordinate.
+** gcvSHADER_USE_GL_POSITION - Use OpenGL ES gl_Position.
+** gcvSHADER_USE_GL_FACE - Use OpenGL ES gl_FaceForward.
+**
+** OUTPUT:
+**
+** gctSIZE_T * StateBufferSize
+** Pointer to a variable receiving the number of bytes in the buffer
+** returned in 'StateBuffer'.
+**
+** gctPOINTER * StateBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLinkKernel(
+ IN gcSHADER Kernel,
+ IN gceSHADER_FLAGS Flags,
+ OUT gctSIZE_T * StateBufferSize,
+ OUT gctPOINTER * StateBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+/*******************************************************************************
+** gcLoadKernel
+********************************************************************************
+**
+** Load a pre-compiled and pre-linked kernel program into the hardware.
+**
+** INPUT:
+**
+** gctSIZE_T StateBufferSize
+** The number of bytes in the 'StateBuffer'.
+**
+** gctPOINTER StateBuffer
+** Pointer to the states that make up the shader program.
+**
+** gcsHINT_PTR Hints
+** Pointer to a gcsHINT structure that contains information required
+** when loading the shader states.
+*/
+gceSTATUS
+gcLoadKernel(
+ IN gctSIZE_T StateBufferSize,
+ IN gctPOINTER StateBuffer,
+ IN gcsHINT_PTR Hints
+ );
+
+gceSTATUS
+gcInvokeThreadWalker(
+ IN gcsTHREAD_WALKER_INFO_PTR Info
+ );
+
+void
+gcTYPE_GetTypeInfo(
+ IN gcSHADER_TYPE Type,
+ OUT gctINT * Components,
+ OUT gctINT * Rows,
+ OUT gctCONST_STRING * Name
+ );
+
+gctBOOL
+gcOPT_doVaryingPackingForShader(
+ IN gcSHADER Shader
+ );
+
+gceSTATUS
+gcSHADER_PatchNPOTForMachineCode(
+ IN gcSHADER_KIND shaderType,
+ IN gcMACHINECODE_PTR pMachineCode,
+ IN gcNPOT_PATCH_PARAM_PTR pPatchParam,
+ IN gctUINT countOfPatchParam,
+ IN gctUINT hwSupportedInstCount,
+ OUT gctPOINTER* ppCmdBuffer,
+ OUT gctUINT32* pByteSizeOfCmdBuffer,
+ IN OUT gcsHINT_PTR pHints /* User needs copy original hints to this one, then passed this one in */
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VIVANTE_NO_3D */
+#endif /* __gc_hal_compiler_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_driver.h b/src/include_imx6_v4_0_0/gc_hal_driver.h
new file mode 100644
index 0000000..028bbd1
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_driver.h
@@ -0,0 +1,988 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_driver_h_
+#define __gc_hal_driver_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#if gcdENABLE_VG
+#include "gc_hal_driver_vg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* I/O Control Codes ******************************
+\******************************************************************************/
+
+#define gcvHAL_CLASS "galcore"
+#define IOCTL_GCHAL_INTERFACE 30000
+#define IOCTL_GCHAL_KERNEL_INTERFACE 30001
+#define IOCTL_GCHAL_TERMINATE 30002
+
+/******************************************************************************\
+********************************* Command Codes ********************************
+\******************************************************************************/
+
+typedef enum _gceHAL_COMMAND_CODES
+{
+ /* Generic query. */
+ gcvHAL_QUERY_VIDEO_MEMORY,
+ gcvHAL_QUERY_CHIP_IDENTITY,
+
+ /* Contiguous memory. */
+ gcvHAL_ALLOCATE_NON_PAGED_MEMORY,
+ gcvHAL_FREE_NON_PAGED_MEMORY,
+ gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY,
+ gcvHAL_FREE_CONTIGUOUS_MEMORY,
+
+ /* Video memory allocation. */
+ gcvHAL_ALLOCATE_VIDEO_MEMORY, /* Enforced alignment. */
+ gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY, /* No alignment. */
+ gcvHAL_FREE_VIDEO_MEMORY,
+
+ /* Physical-to-logical mapping. */
+ gcvHAL_MAP_MEMORY,
+ gcvHAL_UNMAP_MEMORY,
+
+ /* Logical-to-physical mapping. */
+ gcvHAL_MAP_USER_MEMORY,
+ gcvHAL_UNMAP_USER_MEMORY,
+
+ /* Surface lock/unlock. */
+ gcvHAL_LOCK_VIDEO_MEMORY,
+ gcvHAL_UNLOCK_VIDEO_MEMORY,
+
+ /* Event queue. */
+ gcvHAL_EVENT_COMMIT,
+
+ gcvHAL_USER_SIGNAL,
+ gcvHAL_SIGNAL,
+ gcvHAL_WRITE_DATA,
+
+ gcvHAL_COMMIT,
+ gcvHAL_STALL,
+
+ gcvHAL_READ_REGISTER,
+ gcvHAL_WRITE_REGISTER,
+
+ gcvHAL_GET_PROFILE_SETTING,
+ gcvHAL_SET_PROFILE_SETTING,
+
+ gcvHAL_READ_ALL_PROFILE_REGISTERS,
+ gcvHAL_PROFILE_REGISTERS_2D,
+#if VIVANTE_PROFILER_PERDRAW
+ gcvHAL_READ_PROFILER_REGISTER_SETTING,
+#endif
+
+ /* Power management. */
+ gcvHAL_SET_POWER_MANAGEMENT_STATE,
+ gcvHAL_QUERY_POWER_MANAGEMENT_STATE,
+
+ gcvHAL_GET_BASE_ADDRESS,
+
+ gcvHAL_SET_IDLE, /* reserved */
+
+ /* Queries. */
+ gcvHAL_QUERY_KERNEL_SETTINGS,
+
+ /* Reset. */
+ gcvHAL_RESET,
+
+ /* Map physical address into handle. */
+ gcvHAL_MAP_PHYSICAL,
+
+ /* Debugger stuff. */
+ gcvHAL_DEBUG,
+
+ /* Cache stuff. */
+ gcvHAL_CACHE,
+
+ /* TimeStamp */
+ gcvHAL_TIMESTAMP,
+
+ /* Database. */
+ gcvHAL_DATABASE,
+
+ /* Version. */
+ gcvHAL_VERSION,
+
+ /* Chip info */
+ gcvHAL_CHIP_INFO,
+
+ /* Process attaching/detaching. */
+ gcvHAL_ATTACH,
+ gcvHAL_DETACH,
+
+ /* Composition. */
+ gcvHAL_COMPOSE,
+
+ /* Set timeOut value */
+ gcvHAL_SET_TIMEOUT,
+
+ /* Frame database. */
+ gcvHAL_GET_FRAME_INFO,
+
+ /* Shared info for each process */
+ gcvHAL_GET_SHARED_INFO,
+ gcvHAL_SET_SHARED_INFO,
+ gcvHAL_QUERY_COMMAND_BUFFER,
+
+ gcvHAL_COMMIT_DONE,
+
+ /* GPU and event dump */
+ gcvHAL_DUMP_GPU_STATE,
+ gcvHAL_DUMP_EVENT,
+
+ /* Virtual command buffer. */
+ gcvHAL_ALLOCATE_VIRTUAL_COMMAND_BUFFER,
+ gcvHAL_FREE_VIRTUAL_COMMAND_BUFFER,
+
+ /* FSCALE_VAL. */
+ gcvHAL_SET_FSCALE_VALUE,
+ gcvHAL_GET_FSCALE_VALUE,
+
+ /* Reset time stamp. */
+ gcvHAL_QUERY_RESET_TIME_STAMP,
+}
+gceHAL_COMMAND_CODES;
+
+/******************************************************************************\
+****************************** Interface Structure *****************************
+\******************************************************************************/
+
+#define gcdMAX_PROFILE_FILE_NAME 128
+
+/* Kernel settings. */
+typedef struct _gcsKERNEL_SETTINGS
+{
+ /* Used RealTime signal between kernel and user. */
+ gctINT signal;
+}
+gcsKERNEL_SETTINGS;
+
+
+/* gcvHAL_QUERY_CHIP_IDENTITY */
+typedef struct _gcsHAL_QUERY_CHIP_IDENTITY * gcsHAL_QUERY_CHIP_IDENTITY_PTR;
+typedef struct _gcsHAL_QUERY_CHIP_IDENTITY
+{
+
+ /* Chip model. */
+ gceCHIPMODEL chipModel;
+
+ /* Revision value.*/
+ gctUINT32 chipRevision;
+
+ /* Supported feature fields. */
+ gctUINT32 chipFeatures;
+
+ /* Supported minor feature fields. */
+ gctUINT32 chipMinorFeatures;
+
+ /* Supported minor feature 1 fields. */
+ gctUINT32 chipMinorFeatures1;
+
+ /* Supported minor feature 2 fields. */
+ gctUINT32 chipMinorFeatures2;
+
+ /* Supported minor feature 3 fields. */
+ gctUINT32 chipMinorFeatures3;
+
+ /* Number of streams supported. */
+ gctUINT32 streamCount;
+
+ /* Total number of temporary registers per thread. */
+ gctUINT32 registerMax;
+
+ /* Maximum number of threads. */
+ gctUINT32 threadCount;
+
+ /* Number of shader cores. */
+ gctUINT32 shaderCoreCount;
+
+ /* Size of the vertex cache. */
+ gctUINT32 vertexCacheSize;
+
+ /* Number of entries in the vertex output buffer. */
+ gctUINT32 vertexOutputBufferSize;
+
+ /* Number of pixel pipes. */
+ gctUINT32 pixelPipes;
+
+ /* Number of instructions. */
+ gctUINT32 instructionCount;
+
+ /* Number of constants. */
+ gctUINT32 numConstants;
+
+ /* Buffer size */
+ gctUINT32 bufferSize;
+
+ /* Number of varyings */
+ gctUINT32 varyingsCount;
+
+ /* Supertile layout style in hardware */
+ gctUINT32 superTileMode;
+}
+gcsHAL_QUERY_CHIP_IDENTITY;
+
+/* gcvHAL_COMPOSE. */
+typedef struct _gcsHAL_COMPOSE * gcsHAL_COMPOSE_PTR;
+typedef struct _gcsHAL_COMPOSE
+{
+ /* Composition state buffer. */
+ gctUINT64 physical;
+ gctUINT64 logical;
+ gctUINT offset;
+ gctUINT size;
+
+ /* Composition end signal. */
+ gctUINT64 process;
+ gctUINT64 signal;
+
+ /* User signals. */
+ gctUINT64 userProcess;
+ gctUINT64 userSignal1;
+ gctUINT64 userSignal2;
+
+#if defined(__QNXNTO__)
+ /* Client pulse side-channel connection ID. */
+ gctINT32 coid;
+
+ /* Set by server. */
+ gctINT32 rcvid;
+#endif
+}
+gcsHAL_COMPOSE;
+
+
+typedef struct _gcsHAL_INTERFACE
+{
+ /* Command code. */
+ gceHAL_COMMAND_CODES command;
+
+ /* Hardware type. */
+ gceHARDWARE_TYPE hardwareType;
+
+ /* Status value. */
+ gceSTATUS status;
+
+ /* Handle to this interface channel. */
+ gctUINT64 handle;
+
+ /* Pid of the client. */
+ gctUINT32 pid;
+
+ /* Union of command structures. */
+ union _u
+ {
+ /* gcvHAL_GET_BASE_ADDRESS */
+ struct _gcsHAL_GET_BASE_ADDRESS
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctUINT32 baseAddress;
+ }
+ GetBaseAddress;
+
+ /* gcvHAL_QUERY_VIDEO_MEMORY */
+ struct _gcsHAL_QUERY_VIDEO_MEMORY
+ {
+ /* Physical memory address of internal memory. Just a name. */
+ OUT gctUINT32 internalPhysical;
+
+ /* Size in bytes of internal memory. */
+ OUT gctUINT64 internalSize;
+
+ /* Physical memory address of external memory. Just a name. */
+ OUT gctUINT32 externalPhysical;
+
+ /* Size in bytes of external memory.*/
+ OUT gctUINT64 externalSize;
+
+ /* Physical memory address of contiguous memory. Just a name. */
+ OUT gctUINT32 contiguousPhysical;
+
+ /* Size in bytes of contiguous memory.*/
+ OUT gctUINT64 contiguousSize;
+ }
+ QueryVideoMemory;
+
+ /* gcvHAL_QUERY_CHIP_IDENTITY */
+ gcsHAL_QUERY_CHIP_IDENTITY QueryChipIdentity;
+
+ /* gcvHAL_MAP_MEMORY */
+ struct _gcsHAL_MAP_MEMORY
+ {
+ /* Physical memory address to map. Just a name on Linux/Qnx. */
+ IN gctUINT32 physical;
+
+ /* Number of bytes in physical memory to map. */
+ IN gctUINT64 bytes;
+
+ /* Address of mapped memory. */
+ OUT gctUINT64 logical;
+ }
+ MapMemory;
+
+ /* gcvHAL_UNMAP_MEMORY */
+ struct _gcsHAL_UNMAP_MEMORY
+ {
+ /* Physical memory address to unmap. Just a name on Linux/Qnx. */
+ IN gctUINT32 physical;
+
+ /* Number of bytes in physical memory to unmap. */
+ IN gctUINT64 bytes;
+
+ /* Address of mapped memory to unmap. */
+ IN gctUINT64 logical;
+ }
+ UnmapMemory;
+
+ /* gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_LINEAR_VIDEO_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctUINT bytes;
+
+ /* Buffer alignment. */
+ IN gctUINT alignment;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory in gcuVIDMEM_NODE. */
+ OUT gctUINT64 node;
+ }
+ AllocateLinearVideoMemory;
+
+ /* gcvHAL_ALLOCATE_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_VIDEO_MEMORY
+ {
+ /* Width of rectangle to allocate. */
+ IN OUT gctUINT width;
+
+ /* Height of rectangle to allocate. */
+ IN OUT gctUINT height;
+
+ /* Depth of rectangle to allocate. */
+ IN gctUINT depth;
+
+ /* Format rectangle to allocate in gceSURF_FORMAT. */
+ IN gceSURF_FORMAT format;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory in gcuVIDMEM_NODE. */
+ OUT gctUINT64 node;
+ }
+ AllocateVideoMemory;
+
+ /* gcvHAL_FREE_VIDEO_MEMORY */
+ struct _gcsHAL_FREE_VIDEO_MEMORY
+ {
+ /* Allocated video memory in gcuVIDMEM_NODE. */
+ IN gctUINT64 node;
+
+#ifdef __QNXNTO__
+/* TODO: This is part of the unlock - why is it here? */
+ /* Mapped logical address to unmap in user space. */
+ OUT gctUINT64 memory;
+
+ /* Number of bytes to allocated. */
+ OUT gctUINT64 bytes;
+#endif
+ }
+ FreeVideoMemory;
+
+ /* gcvHAL_LOCK_VIDEO_MEMORY */
+ struct _gcsHAL_LOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory gcuVIDMEM_NODE gcuVIDMEM_NODE. */
+ IN gctUINT64 node;
+
+ /* Cache configuration. */
+ /* Only gcvPOOL_CONTIGUOUS and gcvPOOL_VIRUTAL
+ ** can be configured */
+ IN gctBOOL cacheable;
+
+ /* Hardware specific address. */
+ OUT gctUINT32 address;
+
+ /* Mapped logical address. */
+ OUT gctUINT64 memory;
+ }
+ LockVideoMemory;
+
+ /* gcvHAL_UNLOCK_VIDEO_MEMORY */
+ struct _gcsHAL_UNLOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory in gcuVIDMEM_NODE. */
+ IN gctUINT64 node;
+
+ /* Type of surface. */
+ IN gceSURF_TYPE type;
+
+ /* Flag to unlock surface asynchroneously. */
+ IN OUT gctBOOL asynchroneous;
+ }
+ UnlockVideoMemory;
+
+ /* gcvHAL_ALLOCATE_NON_PAGED_MEMORY */
+ struct _gcsHAL_ALLOCATE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctUINT64 bytes;
+
+ /* Physical address of allocation. Just a name. */
+ OUT gctUINT32 physical;
+
+ /* Logical address of allocation. */
+ OUT gctUINT64 logical;
+ }
+ AllocateNonPagedMemory;
+
+ /* gcvHAL_FREE_NON_PAGED_MEMORY */
+ struct _gcsHAL_FREE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctUINT64 bytes;
+
+ /* Physical address of allocation. Just a name. */
+ IN gctUINT32 physical;
+
+ /* Logical address of allocation. */
+ IN gctUINT64 logical;
+ }
+ FreeNonPagedMemory;
+
+ /* gcvHAL_ALLOCATE_NON_PAGED_MEMORY */
+ struct _gcsHAL_ALLOCATE_VIRTUAL_COMMAND_BUFFER
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctUINT64 bytes;
+
+ /* Physical address of allocation. Just a name. */
+ OUT gctUINT32 physical;
+
+ /* Logical address of allocation. */
+ OUT gctUINT64 logical;
+ }
+ AllocateVirtualCommandBuffer;
+
+ /* gcvHAL_FREE_NON_PAGED_MEMORY */
+ struct _gcsHAL_FREE_VIRTUAL_COMMAND_BUFFER
+ {
+ /* Number of bytes allocated. */
+ IN gctUINT64 bytes;
+
+ /* Physical address of allocation. Just a name. */
+ IN gctUINT32 physical;
+
+ /* Logical address of allocation. */
+ IN gctUINT64 logical;
+ }
+ FreeVirtualCommandBuffer;
+
+ /* gcvHAL_EVENT_COMMIT. */
+ struct _gcsHAL_EVENT_COMMIT
+ {
+ /* Event queue in gcsQUEUE. */
+ IN gctUINT64 queue;
+ }
+ Event;
+
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_COMMIT
+ {
+ /* Context buffer object gckCONTEXT. */
+ IN gctUINT64 context;
+
+ /* Command buffer gcoCMDBUF. */
+ IN gctUINT64 commandBuffer;
+
+ /* State delta buffer in gcsSTATE_DELTA. */
+ gctUINT64 delta;
+
+ /* Event queue in gcsQUEUE. */
+ IN gctUINT64 queue;
+ }
+ Commit;
+
+ /* gcvHAL_MAP_USER_MEMORY */
+ struct _gcsHAL_MAP_USER_MEMORY
+ {
+ /* Base address of user memory to map. */
+ IN gctUINT64 memory;
+
+ /* Physical address of user memory to map. */
+ IN gctUINT32 physical;
+
+ /* Size of user memory in bytes to map. */
+ IN gctUINT64 size;
+
+ /* Info record required by gcvHAL_UNMAP_USER_MEMORY. Just a name. */
+ OUT gctUINT32 info;
+
+ /* Physical address of mapped memory. */
+ OUT gctUINT32 address;
+ }
+ MapUserMemory;
+
+ /* gcvHAL_UNMAP_USER_MEMORY */
+ struct _gcsHAL_UNMAP_USER_MEMORY
+ {
+ /* Base address of user memory to unmap. */
+ IN gctUINT64 memory;
+
+ /* Size of user memory in bytes to unmap. */
+ IN gctUINT64 size;
+
+ /* Info record returned by gcvHAL_MAP_USER_MEMORY. Just a name. */
+ IN gctUINT32 info;
+
+ /* Physical address of mapped memory as returned by
+ gcvHAL_MAP_USER_MEMORY. */
+ IN gctUINT32 address;
+ }
+ UnmapUserMemory;
+#if !USE_NEW_LINUX_SIGNAL
+ /* gcsHAL_USER_SIGNAL */
+ struct _gcsHAL_USER_SIGNAL
+ {
+ /* Command. */
+ gceUSER_SIGNAL_COMMAND_CODES command;
+
+ /* Signal ID. */
+ IN OUT gctINT id;
+
+ /* Reset mode. */
+ IN gctBOOL manualReset;
+
+ /* Wait timedout. */
+ IN gctUINT32 wait;
+
+ /* State. */
+ IN gctBOOL state;
+ }
+ UserSignal;
+#endif
+
+ /* gcvHAL_SIGNAL. */
+ struct _gcsHAL_SIGNAL
+ {
+ /* Signal handle to signal gctSIGNAL. */
+ IN gctUINT64 signal;
+
+ /* Reserved gctSIGNAL. */
+ IN gctUINT64 auxSignal;
+
+ /* Process owning the signal gctHANDLE. */
+ IN gctUINT64 process;
+
+#if defined(__QNXNTO__)
+ /* Client pulse side-channel connection ID. Set by client in gcoOS_CreateSignal. */
+ IN gctINT32 coid;
+
+ /* Set by server. */
+ IN gctINT32 rcvid;
+#endif
+ /* Event generated from where of pipeline */
+ IN gceKERNEL_WHERE fromWhere;
+ }
+ Signal;
+
+ /* gcvHAL_WRITE_DATA. */
+ struct _gcsHAL_WRITE_DATA
+ {
+ /* Address to write data to. */
+ IN gctUINT32 address;
+
+ /* Data to write. */
+ IN gctUINT32 data;
+ }
+ WriteData;
+
+ /* gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_ALLOCATE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctUINT64 bytes;
+
+ /* Hardware address of allocation. */
+ OUT gctUINT32 address;
+
+ /* Physical address of allocation. Just a name. */
+ OUT gctUINT32 physical;
+
+ /* Logical address of allocation. */
+ OUT gctUINT64 logical;
+ }
+ AllocateContiguousMemory;
+
+ /* gcvHAL_FREE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_FREE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctUINT64 bytes;
+
+ /* Physical address of allocation. Just a name. */
+ IN gctUINT32 physical;
+
+ /* Logical address of allocation. */
+ IN gctUINT64 logical;
+ }
+ FreeContiguousMemory;
+
+ /* gcvHAL_READ_REGISTER */
+ struct _gcsHAL_READ_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ OUT gctUINT32 data;
+ }
+ ReadRegisterData;
+
+ /* gcvHAL_WRITE_REGISTER */
+ struct _gcsHAL_WRITE_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ IN gctUINT32 data;
+ }
+ WriteRegisterData;
+
+#if VIVANTE_PROFILER
+ /* gcvHAL_GET_PROFILE_SETTING */
+ struct _gcsHAL_GET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ OUT gctBOOL enable;
+
+ /* The profile file name */
+ OUT gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ GetProfileSetting;
+
+ /* gcvHAL_SET_PROFILE_SETTING */
+ struct _gcsHAL_SET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ IN gctBOOL enable;
+
+ /* The profile file name */
+ IN gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ SetProfileSetting;
+
+#if VIVANTE_PROFILER_PERDRAW
+ /* gcvHAL_READ_PROFILER_REGISTER_SETTING */
+ struct _gcsHAL_READ_PROFILER_REGISTER_SETTING
+ {
+ /*Should Clear Register*/
+ IN gctBOOL bclear;
+ }
+ SetProfilerRegisterClear;
+#endif
+
+ /* gcvHAL_READ_ALL_PROFILE_REGISTERS */
+ struct _gcsHAL_READ_ALL_PROFILE_REGISTERS
+ {
+ /* Data read. */
+ OUT gcsPROFILER_COUNTERS counters;
+ }
+ RegisterProfileData;
+
+ /* gcvHAL_PROFILE_REGISTERS_2D */
+ struct _gcsHAL_PROFILE_REGISTERS_2D
+ {
+ /* Data read in gcs2D_PROFILE. */
+ OUT gctUINT64 hwProfile2D;
+ }
+ RegisterProfileData2D;
+#endif
+ /* Power management. */
+ /* gcvHAL_SET_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_SET_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ IN gceCHIPPOWERSTATE state;
+ }
+ SetPowerManagement;
+
+ /* gcvHAL_QUERY_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_QUERY_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ OUT gceCHIPPOWERSTATE state;
+
+ /* Idle query. */
+ OUT gctBOOL isIdle;
+ }
+ QueryPowerManagement;
+
+ /* gcvHAL_QUERY_KERNEL_SETTINGS */
+ struct _gcsHAL_QUERY_KERNEL_SETTINGS
+ {
+ /* Settings.*/
+ OUT gcsKERNEL_SETTINGS settings;
+ }
+ QueryKernelSettings;
+
+ /* gcvHAL_MAP_PHYSICAL */
+ struct _gcsHAL_MAP_PHYSICAL
+ {
+ /* gcvTRUE to map, gcvFALSE to unmap. */
+ IN gctBOOL map;
+
+ /* Physical address. */
+ IN OUT gctUINT64 physical;
+ }
+ MapPhysical;
+
+ /* gcvHAL_DEBUG */
+ struct _gcsHAL_DEBUG
+ {
+ /* If gcvTRUE, set the debug information. */
+ IN gctBOOL set;
+ IN gctUINT32 level;
+ IN gctUINT32 zones;
+ IN gctBOOL enable;
+
+ IN gceDEBUG_MESSAGE_TYPE type;
+ IN gctUINT32 messageSize;
+
+ /* Message to print if not empty. */
+ IN gctCHAR message[80];
+ }
+ Debug;
+
+ /* gcvHAL_CACHE */
+ struct _gcsHAL_CACHE
+ {
+ IN gceCACHEOPERATION operation;
+ /* gctHANDLE */
+ IN gctUINT64 process;
+ IN gctUINT64 logical;
+ IN gctUINT64 bytes;
+ /* gcuVIDMEM_NODE_PTR */
+ IN gctUINT64 node;
+ }
+ Cache;
+
+ /* gcvHAL_TIMESTAMP */
+ struct _gcsHAL_TIMESTAMP
+ {
+ /* Timer select. */
+ IN gctUINT32 timer;
+
+ /* Timer request type (0-stop, 1-start, 2-send delta). */
+ IN gctUINT32 request;
+
+ /* Result of delta time in microseconds. */
+ OUT gctINT32 timeDelta;
+ }
+ TimeStamp;
+
+ /* gcvHAL_DATABASE */
+ struct _gcsHAL_DATABASE
+ {
+ /* Set to gcvTRUE if you want to query a particular process ID.
+ ** Set to gcvFALSE to query the last detached process. */
+ IN gctBOOL validProcessID;
+
+ /* Process ID to query. */
+ IN gctUINT32 processID;
+
+ /* Information. */
+ OUT gcuDATABASE_INFO vidMem;
+ OUT gcuDATABASE_INFO nonPaged;
+ OUT gcuDATABASE_INFO contiguous;
+ OUT gcuDATABASE_INFO gpuIdle;
+ }
+ Database;
+
+ /* gcvHAL_VERSION */
+ struct _gcsHAL_VERSION
+ {
+ /* Major version: N.n.n. */
+ OUT gctINT32 major;
+
+ /* Minor version: n.N.n. */
+ OUT gctINT32 minor;
+
+ /* Patch version: n.n.N. */
+ OUT gctINT32 patch;
+
+ /* Build version. */
+ OUT gctUINT32 build;
+ }
+ Version;
+
+ /* gcvHAL_CHIP_INFO */
+ struct _gcsHAL_CHIP_INFO
+ {
+ /* Chip count. */
+ OUT gctINT32 count;
+
+ /* Chip types. */
+ OUT gceHARDWARE_TYPE types[gcdCHIP_COUNT];
+ }
+ ChipInfo;
+
+ /* gcvHAL_ATTACH */
+ struct _gcsHAL_ATTACH
+ {
+ /* Context buffer object gckCONTEXT. Just a name. */
+ OUT gctUINT32 context;
+
+ /* Number of states in the buffer. */
+ OUT gctUINT64 stateCount;
+ }
+ Attach;
+
+ /* gcvHAL_DETACH */
+ struct _gcsHAL_DETACH
+ {
+ /* Context buffer object gckCONTEXT. Just a name. */
+ IN gctUINT32 context;
+ }
+ Detach;
+
+ /* gcvHAL_COMPOSE. */
+ gcsHAL_COMPOSE Compose;
+
+ /* gcvHAL_GET_FRAME_INFO. */
+ struct _gcsHAL_GET_FRAME_INFO
+ {
+ /* gcsHAL_FRAME_INFO* */
+ OUT gctUINT64 frameInfo;
+ }
+ GetFrameInfo;
+
+ /* gcvHAL_SET_TIME_OUT. */
+ struct _gcsHAL_SET_TIMEOUT
+ {
+ gctUINT32 timeOut;
+ }
+ SetTimeOut;
+
+#if gcdENABLE_VG
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_VGCOMMIT
+ {
+ /* Context buffer in gcsVGCONTEXT. */
+ IN gctUINT64 context;
+
+ /* Command queue in gcsVGCMDQUEUE. */
+ IN gctUINT64 queue;
+
+ /* Number of entries in the queue. */
+ IN gctUINT entryCount;
+
+ /* Task table in gcsTASK_MASTER_TABLE. */
+ IN gctUINT64 taskTable;
+ }
+ VGCommit;
+
+ /* gcvHAL_QUERY_COMMAND_BUFFER */
+ struct _gcsHAL_QUERY_COMMAND_BUFFER
+ {
+ /* Command buffer attributes. */
+ OUT gcsCOMMAND_BUFFER_INFO information;
+ }
+ QueryCommandBuffer;
+
+#endif
+
+ struct _gcsHAL_GET_SHARED_INFO
+ {
+ IN gctUINT32 pid;
+ IN gctUINT32 dataId;
+ /* gcuVIDMEM_NODE_PTR */
+ IN gctUINT64 node;
+ /* gctUINT8_PTR */
+ OUT gctUINT64 data;
+ /* fix size. gctUINT8_PTR*/
+ OUT gctUINT64 nodeData;
+ gctUINT64 size;
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE infoType;
+ }
+ GetSharedInfo;
+
+ struct _gcsHAL_SET_SHARED_INFO
+ {
+ IN gctUINT32 dataId;
+ /* gcuVIDMEM_NODE_PTR */
+ IN gctUINT64 node;
+ /* gctUINT8_PTR */
+ IN gctUINT64 data;
+ /* gctUINT8_PTR */
+ IN gctUINT64 nodeData;
+ IN gctUINT64 size;
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE infoType;
+ }
+ SetSharedInfo;
+
+ struct _gcsHAL_SET_FSCALE_VALUE
+ {
+ IN gctUINT value;
+ }
+ SetFscaleValue;
+
+ struct _gcsHAL_GET_FSCALE_VALUE
+ {
+ OUT gctUINT value;
+ OUT gctUINT minValue;
+ OUT gctUINT maxValue;
+ }
+ GetFscaleValue;
+
+ struct _gcsHAL_QUERY_RESET_TIME_STAMP
+ {
+ OUT gctUINT64 timeStamp;
+ }
+ QueryResetTimeStamp;
+ }
+ u;
+}
+gcsHAL_INTERFACE;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_driver_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_driver_vg.h b/src/include_imx6_v4_0_0/gc_hal_driver_vg.h
new file mode 100644
index 0000000..b54752f
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_driver_vg.h
@@ -0,0 +1,270 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_driver_vg_h_
+#define __gc_hal_driver_vg_h_
+
+
+
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* I/O Control Codes ******************************
+\******************************************************************************/
+
+#define gcvHAL_CLASS "galcore"
+#define IOCTL_GCHAL_INTERFACE 30000
+
+/******************************************************************************\
+********************************* Command Codes ********************************
+\******************************************************************************/
+
+/******************************************************************************\
+********************* Command buffer information structure. ********************
+\******************************************************************************/
+
+typedef struct _gcsCOMMAND_BUFFER_INFO * gcsCOMMAND_BUFFER_INFO_PTR;
+typedef struct _gcsCOMMAND_BUFFER_INFO
+{
+ /* FE command buffer interrupt ID. */
+ gctINT32 feBufferInt;
+
+ /* TS overflow interrupt ID. */
+ gctINT32 tsOverflowInt;
+
+ /* Alignment and mask for the buffer address. */
+ gctUINT addressMask;
+ gctSIZE_T addressAlignment;
+
+ /* Alignment for each command. */
+ gctSIZE_T commandAlignment;
+
+ /* Number of bytes required by the STATE command. */
+ gctSIZE_T stateCommandSize;
+
+ /* Number of bytes required by the RESTART command. */
+ gctSIZE_T restartCommandSize;
+
+ /* Number of bytes required by the FETCH command. */
+ gctSIZE_T fetchCommandSize;
+
+ /* Number of bytes required by the CALL command. */
+ gctSIZE_T callCommandSize;
+
+ /* Number of bytes required by the RETURN command. */
+ gctSIZE_T returnCommandSize;
+
+ /* Number of bytes required by the EVENT command. */
+ gctSIZE_T eventCommandSize;
+
+ /* Number of bytes required by the END command. */
+ gctSIZE_T endCommandSize;
+
+ /* Number of bytes reserved at the tail of a static command buffer. */
+ gctSIZE_T staticTailSize;
+
+ /* Number of bytes reserved at the tail of a dynamic command buffer. */
+ gctSIZE_T dynamicTailSize;
+}
+gcsCOMMAND_BUFFER_INFO;
+
+/******************************************************************************\
+******************************** Task Structures *******************************
+\******************************************************************************/
+
+typedef enum _gceTASK
+{
+ gcvTASK_LINK,
+ gcvTASK_CLUSTER,
+ gcvTASK_INCREMENT,
+ gcvTASK_DECREMENT,
+ gcvTASK_SIGNAL,
+ gcvTASK_LOCKDOWN,
+ gcvTASK_UNLOCK_VIDEO_MEMORY,
+ gcvTASK_FREE_VIDEO_MEMORY,
+ gcvTASK_FREE_CONTIGUOUS_MEMORY,
+ gcvTASK_UNMAP_USER_MEMORY
+}
+gceTASK;
+
+typedef struct _gcsTASK_HEADER * gcsTASK_HEADER_PTR;
+typedef struct _gcsTASK_HEADER
+{
+ /* Task ID. */
+ IN gceTASK id;
+}
+gcsTASK_HEADER;
+
+typedef struct _gcsTASK_LINK * gcsTASK_LINK_PTR;
+typedef struct _gcsTASK_LINK
+{
+ /* Task ID (gcvTASK_LINK). */
+ IN gceTASK id;
+
+ /* Pointer to the next task container. */
+ IN gctPOINTER cotainer;
+
+ /* Pointer to the next task from the next task container. */
+ IN gcsTASK_HEADER_PTR task;
+}
+gcsTASK_LINK;
+
+typedef struct _gcsTASK_CLUSTER * gcsTASK_CLUSTER_PTR;
+typedef struct _gcsTASK_CLUSTER
+{
+ /* Task ID (gcvTASK_CLUSTER). */
+ IN gceTASK id;
+
+ /* Number of tasks in the cluster. */
+ IN gctUINT taskCount;
+}
+gcsTASK_CLUSTER;
+
+typedef struct _gcsTASK_INCREMENT * gcsTASK_INCREMENT_PTR;
+typedef struct _gcsTASK_INCREMENT
+{
+ /* Task ID (gcvTASK_INCREMENT). */
+ IN gceTASK id;
+
+ /* Address of the variable to increment. */
+ IN gctUINT32 address;
+}
+gcsTASK_INCREMENT;
+
+typedef struct _gcsTASK_DECREMENT * gcsTASK_DECREMENT_PTR;
+typedef struct _gcsTASK_DECREMENT
+{
+ /* Task ID (gcvTASK_DECREMENT). */
+ IN gceTASK id;
+
+ /* Address of the variable to decrement. */
+ IN gctUINT32 address;
+}
+gcsTASK_DECREMENT;
+
+typedef struct _gcsTASK_SIGNAL * gcsTASK_SIGNAL_PTR;
+typedef struct _gcsTASK_SIGNAL
+{
+ /* Task ID (gcvTASK_SIGNAL). */
+ IN gceTASK id;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+
+#if defined(__QNXNTO__)
+ IN gctINT32 coid;
+ IN gctINT32 rcvid;
+#endif
+}
+gcsTASK_SIGNAL;
+
+typedef struct _gcsTASK_LOCKDOWN * gcsTASK_LOCKDOWN_PTR;
+typedef struct _gcsTASK_LOCKDOWN
+{
+ /* Task ID (gcvTASK_LOCKDOWN). */
+ IN gceTASK id;
+
+ /* Address of the user space counter. */
+ IN gctUINT32 userCounter;
+
+ /* Address of the kernel space counter. */
+ IN gctUINT32 kernelCounter;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+}
+gcsTASK_LOCKDOWN;
+
+typedef struct _gcsTASK_UNLOCK_VIDEO_MEMORY * gcsTASK_UNLOCK_VIDEO_MEMORY_PTR;
+typedef struct _gcsTASK_UNLOCK_VIDEO_MEMORY
+{
+ /* Task ID (gcvTASK_UNLOCK_VIDEO_MEMORY). */
+ IN gceTASK id;
+
+ /* Allocated video memory. */
+ IN gctUINT64 node;
+}
+gcsTASK_UNLOCK_VIDEO_MEMORY;
+
+typedef struct _gcsTASK_FREE_VIDEO_MEMORY * gcsTASK_FREE_VIDEO_MEMORY_PTR;
+typedef struct _gcsTASK_FREE_VIDEO_MEMORY
+{
+ /* Task ID (gcvTASK_FREE_VIDEO_MEMORY). */
+ IN gceTASK id;
+
+ /* Allocated video memory. */
+ IN gctUINT64 node;
+}
+gcsTASK_FREE_VIDEO_MEMORY;
+
+typedef struct _gcsTASK_FREE_CONTIGUOUS_MEMORY * gcsTASK_FREE_CONTIGUOUS_MEMORY_PTR;
+typedef struct _gcsTASK_FREE_CONTIGUOUS_MEMORY
+{
+ /* Task ID (gcvTASK_FREE_CONTIGUOUS_MEMORY). */
+ IN gceTASK id;
+
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+}
+gcsTASK_FREE_CONTIGUOUS_MEMORY;
+
+typedef struct _gcsTASK_UNMAP_USER_MEMORY * gcsTASK_UNMAP_USER_MEMORY_PTR;
+typedef struct _gcsTASK_UNMAP_USER_MEMORY
+{
+ /* Task ID (gcvTASK_UNMAP_USER_MEMORY). */
+ IN gceTASK id;
+
+ /* Base address of user memory to unmap. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to unmap. */
+ IN gctSIZE_T size;
+
+ /* Info record returned by gcvHAL_MAP_USER_MEMORY. */
+ IN gctPOINTER info;
+
+ /* Physical address of mapped memory as returned by
+ gcvHAL_MAP_USER_MEMORY. */
+ IN gctUINT32 address;
+}
+gcsTASK_UNMAP_USER_MEMORY;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_driver_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_dump.h b/src/include_imx6_v4_0_0/gc_hal_dump.h
new file mode 100644
index 0000000..ffd45e8
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_dump.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_dump_h_
+#define __gc_hal_dump_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** FILE LAYOUT:
+**
+** gcsDUMP_FILE structure
+**
+** gcsDUMP_DATA frame
+** gcsDUMP_DATA or gcDUMP_DATA_SIZE records rendingring the frame
+** gctUINT8 data[length]
+*/
+
+#define gcvDUMP_FILE_SIGNATURE gcmCC('g','c','D','B')
+
+typedef struct _gcsDUMP_FILE
+{
+ gctUINT32 signature; /* File signature */
+ gctSIZE_T length; /* Length of file */
+ gctUINT32 frames; /* Number of frames in file */
+}
+gcsDUMP_FILE;
+
+typedef enum _gceDUMP_TAG
+{
+ gcvTAG_SURFACE = gcmCC('s','u','r','f'),
+ gcvTAG_FRAME = gcmCC('f','r','m',' '),
+ gcvTAG_COMMAND = gcmCC('c','m','d',' '),
+ gcvTAG_INDEX = gcmCC('i','n','d','x'),
+ gcvTAG_STREAM = gcmCC('s','t','r','m'),
+ gcvTAG_TEXTURE = gcmCC('t','e','x','t'),
+ gcvTAG_RENDER_TARGET = gcmCC('r','n','d','r'),
+ gcvTAG_DEPTH = gcmCC('z','b','u','f'),
+ gcvTAG_RESOLVE = gcmCC('r','s','l','v'),
+ gcvTAG_DELETE = gcmCC('d','e','l',' '),
+}
+gceDUMP_TAG;
+
+typedef struct _gcsDUMP_SURFACE
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctUINT32 address; /* Address of the surface. */
+ gctINT16 width; /* Width of surface. */
+ gctINT16 height; /* Height of surface. */
+ gceSURF_FORMAT format; /* Surface pixel format. */
+ gctSIZE_T length; /* Number of bytes inside the surface. */
+}
+gcsDUMP_SURFACE;
+
+typedef struct _gcsDUMP_DATA
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctSIZE_T length; /* Number of bytes of data. */
+ gctUINT32 address; /* Address for the data. */
+}
+gcsDUMP_DATA;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_dump_h_ */
+
diff --git a/src/include_imx6_v4_0_0/gc_hal_eglplatform.h b/src/include_imx6_v4_0_0/gc_hal_eglplatform.h
new file mode 100644
index 0000000..496276e
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_eglplatform.h
@@ -0,0 +1,616 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_eglplatform_h_
+#define __gc_hal_eglplatform_h_
+
+/* Include VDK types. */
+#include "gc_hal_types.h"
+#include "gc_hal_base.h"
+#include "gc_hal_eglplatform_type.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+/* Win32 and Windows CE platforms. */
+#include <windows.h>
+typedef HDC HALNativeDisplayType;
+typedef HWND HALNativeWindowType;
+typedef HBITMAP HALNativePixmapType;
+
+typedef struct __BITFIELDINFO{
+ BITMAPINFO bmi;
+ RGBQUAD bmiColors[2];
+} BITFIELDINFO;
+
+#elif defined(LINUX) && defined(EGL_API_DFB) && !defined(__APPLE__)
+#include <directfb.h>
+typedef struct _DFBDisplay * HALNativeDisplayType;
+typedef IDirectFBWindow * HALNativeWindowType;
+typedef struct _DFBPixmap * HALNativePixmapType;
+
+#elif defined(LINUX) && defined(EGL_API_FB) && !defined(__APPLE__)
+
+#if defined(EGL_API_WL)
+/* Wayland platform. */
+#include "wayland-server.h"
+#include <wayland-egl.h>
+
+#define WL_EGL_NUM_BACKBUFFERS 2
+
+typedef struct _gcsWL_VIV_BUFFER
+{
+ struct wl_buffer wl_buffer;
+ gcoSURF surface;
+} gcsWL_VIV_BUFFER;
+
+typedef struct _gcsWL_EGL_DISPLAY
+{
+ struct wl_display* wl_display;
+ struct wl_viv* wl_viv;
+} gcsWL_EGL_DISPLAY;
+
+typedef struct _gcsWL_EGL_BUFFER_INFO
+{
+ gctINT32 width;
+ gctINT32 height;
+ gctINT32 stride;
+ gceSURF_FORMAT format;
+ gcuVIDMEM_NODE_PTR node;
+ gcePOOL pool;
+ gctUINT bytes;
+ gcoSURF surface;
+} gcsWL_EGL_BUFFER_INFO;
+
+typedef struct _gcsWL_EGL_BUFFER
+{
+ struct wl_buffer* wl_buffer;
+ gcsWL_EGL_BUFFER_INFO info;
+} gcsWL_EGL_BUFFER;
+
+typedef struct _gcsWL_EGL_WINDOW_INFO
+{
+ gctUINT width;
+ gctUINT height;
+ gceSURF_FORMAT format;
+ gctUINT bpp;
+} gcsWL_EGL_WINDOW_INFO;
+
+struct wl_egl_window
+{
+ gcsWL_EGL_BUFFER backbuffers[WL_EGL_NUM_BACKBUFFERS];
+ gcsWL_EGL_WINDOW_INFO info;
+ gctUINT current;
+ struct wl_surface* surface;
+ struct wl_callback* pending;
+};
+
+typedef void* HALNativeDisplayType;
+typedef void* HALNativeWindowType;
+typedef void* HALNativePixmapType;
+#else
+/* Linux platform for FBDEV. */
+typedef struct _FBDisplay * HALNativeDisplayType;
+typedef struct _FBWindow * HALNativeWindowType;
+typedef struct _FBPixmap * HALNativePixmapType;
+#endif
+#elif defined(__ANDROID__) || defined(ANDROID)
+
+struct egl_native_pixmap_t;
+
+#if ANDROID_SDK_VERSION >= 9
+ #include <android/native_window.h>
+
+ typedef struct ANativeWindow* HALNativeWindowType;
+ typedef struct egl_native_pixmap_t* HALNativePixmapType;
+ typedef void* HALNativeDisplayType;
+#else
+ struct android_native_window_t;
+ typedef struct android_native_window_t* HALNativeWindowType;
+ typedef struct egl_native_pixmap_t * HALNativePixmapType;
+ typedef void* HALNativeDisplayType;
+#endif
+
+#elif defined(LINUX) || defined(__APPLE__)
+/* X11 platform. */
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+typedef Display * HALNativeDisplayType;
+typedef Window HALNativeWindowType;
+
+#ifdef CUSTOM_PIXMAP
+typedef void * HALNativePixmapType;
+#else
+typedef Pixmap HALNativePixmapType;
+#endif /* CUSTOM_PIXMAP */
+
+/* Rename some badly named X defines. */
+#ifdef Status
+# define XStatus int
+# undef Status
+#endif
+#ifdef Always
+# define XAlways 2
+# undef Always
+#endif
+#ifdef CurrentTime
+# undef CurrentTime
+# define XCurrentTime 0
+#endif
+
+#elif defined(__QNXNTO__)
+#include <screen/screen.h>
+
+/* VOID */
+typedef int HALNativeDisplayType;
+typedef screen_window_t HALNativeWindowType;
+typedef screen_pixmap_t HALNativePixmapType;
+
+#else
+
+#error "Platform not recognized"
+
+/* VOID */
+typedef void * HALNativeDisplayType;
+typedef void * HALNativeWindowType;
+typedef void * HALNativePixmapType;
+
+#endif
+
+/* define DUMMY according to the system */
+#if defined(EGL_API_WL)
+# define WL_DUMMY (31415926)
+# define EGL_DUMMY WL_DUMMY
+#elif defined(__ANDROID__) || defined(ANDROID)
+# define ANDROID_DUMMY (31415926)
+# define EGL_DUMMY ANDROID_DUMMY
+#else
+# define EGL_DUMMY (31415926)
+#endif
+
+/*******************************************************************************
+** Display. ********************************************************************
+*/
+
+gceSTATUS
+gcoOS_GetDisplay(
+ OUT HALNativeDisplayType * Display,
+ IN gctPOINTER Context
+ );
+
+gceSTATUS
+gcoOS_GetDisplayByIndex(
+ IN gctINT DisplayIndex,
+ OUT HALNativeDisplayType * Display,
+ IN gctPOINTER Context
+ );
+
+gceSTATUS
+gcoOS_GetDisplayInfo(
+ IN HALNativeDisplayType Display,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctSIZE_T * Physical,
+ OUT gctINT * Stride,
+ OUT gctINT * BitsPerPixel
+ );
+
+
+
+gceSTATUS
+gcoOS_GetDisplayInfoEx(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctUINT DisplayInfoSize,
+ OUT halDISPLAY_INFO * DisplayInfo
+ );
+
+gceSTATUS
+gcoOS_GetNextDisplayInfoEx(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctUINT DisplayInfoSize,
+ OUT halDISPLAY_INFO * DisplayInfo
+ );
+
+gceSTATUS
+gcoOS_GetDisplayVirtual(
+ IN HALNativeDisplayType Display,
+ OUT gctINT * Width,
+ OUT gctINT * Height
+ );
+
+gceSTATUS
+gcoOS_GetDisplayBackbuffer(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ OUT gctPOINTER * context,
+ OUT gcoSURF * surface,
+ OUT gctUINT * Offset,
+ OUT gctINT * X,
+ OUT gctINT * Y
+ );
+
+gceSTATUS
+gcoOS_SetDisplayVirtual(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctUINT Offset,
+ IN gctINT X,
+ IN gctINT Y
+ );
+
+gceSTATUS
+gcoOS_SetDisplayVirtualEx(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctPOINTER Context,
+ IN gcoSURF Surface,
+ IN gctUINT Offset,
+ IN gctINT X,
+ IN gctINT Y
+ );
+
+gceSTATUS
+gcoOS_SetSwapInterval(
+ IN HALNativeDisplayType Display,
+ IN gctINT Interval
+);
+
+gceSTATUS
+gcoOS_GetSwapInterval(
+ IN HALNativeDisplayType Display,
+ IN gctINT_PTR Min,
+ IN gctINT_PTR Max
+);
+
+gceSTATUS
+gcoOS_DisplayBufferRegions(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctINT NumRects,
+ IN gctINT_PTR Rects
+ );
+
+gceSTATUS
+gcoOS_DestroyDisplay(
+ IN HALNativeDisplayType Display
+ );
+
+gceSTATUS
+gcoOS_InitLocalDisplayInfo(
+ IN HALNativeDisplayType Display,
+ IN OUT gctPOINTER * localDisplay
+ );
+
+gceSTATUS
+gcoOS_DeinitLocalDisplayInfo(
+ IN HALNativeDisplayType Display,
+ IN OUT gctPOINTER * localDisplay
+ );
+
+gceSTATUS
+gcoOS_GetDisplayInfoEx2(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctPOINTER localDisplay,
+ IN gctUINT DisplayInfoSize,
+ OUT halDISPLAY_INFO * DisplayInfo
+ );
+
+gceSTATUS
+gcoOS_GetDisplayBackbufferEx(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctPOINTER localDisplay,
+ OUT gctPOINTER * context,
+ OUT gcoSURF * surface,
+ OUT gctUINT * Offset,
+ OUT gctINT * X,
+ OUT gctINT * Y
+ );
+
+gceSTATUS
+gcoOS_IsValidDisplay(
+ IN HALNativeDisplayType Display
+ );
+
+gceSTATUS
+gcoOS_GetNativeVisualId(
+ IN HALNativeDisplayType Display,
+ OUT gctINT* nativeVisualId
+ );
+
+gctBOOL
+gcoOS_SynchronousFlip(
+ IN HALNativeDisplayType Display
+ );
+
+/*******************************************************************************
+** Windows. ********************************************************************
+*/
+
+gceSTATUS
+gcoOS_CreateWindow(
+ IN HALNativeDisplayType Display,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gctINT Width,
+ IN gctINT Height,
+ OUT HALNativeWindowType * Window
+ );
+
+gceSTATUS
+gcoOS_GetWindowInfo(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ OUT gctINT * X,
+ OUT gctINT * Y,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctINT * BitsPerPixel,
+ OUT gctUINT * Offset
+ );
+
+gceSTATUS
+gcoOS_DestroyWindow(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_DrawImage(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT BitsPerPixel,
+ IN gctPOINTER Bits
+ );
+
+gceSTATUS
+gcoOS_GetImage(
+ IN HALNativeWindowType Window,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ OUT gctINT * BitsPerPixel,
+ OUT gctPOINTER * Bits
+ );
+
+gceSTATUS
+gcoOS_GetWindowInfoEx(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ OUT gctINT * X,
+ OUT gctINT * Y,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctINT * BitsPerPixel,
+ OUT gctUINT * Offset,
+ OUT gceSURF_FORMAT * Format
+ );
+
+gceSTATUS
+gcoOS_DrawImageEx(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT BitsPerPixel,
+ IN gctPOINTER Bits,
+ IN gceSURF_FORMAT Format
+ );
+
+/*******************************************************************************
+** Pixmaps. ********************************************************************
+*/
+
+gceSTATUS
+gcoOS_CreatePixmap(
+ IN HALNativeDisplayType Display,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT BitsPerPixel,
+ OUT HALNativePixmapType * Pixmap
+ );
+
+gceSTATUS
+gcoOS_GetPixmapInfo(
+ IN HALNativeDisplayType Display,
+ IN HALNativePixmapType Pixmap,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctINT * BitsPerPixel,
+ OUT gctINT * Stride,
+ OUT gctPOINTER * Bits
+ );
+
+gceSTATUS
+gcoOS_DrawPixmap(
+ IN HALNativeDisplayType Display,
+ IN HALNativePixmapType Pixmap,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT BitsPerPixel,
+ IN gctPOINTER Bits
+ );
+
+gceSTATUS
+gcoOS_DestroyPixmap(
+ IN HALNativeDisplayType Display,
+ IN HALNativePixmapType Pixmap
+ );
+
+gceSTATUS
+gcoOS_GetPixmapInfoEx(
+ IN HALNativeDisplayType Display,
+ IN HALNativePixmapType Pixmap,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctINT * BitsPerPixel,
+ OUT gctINT * Stride,
+ OUT gctPOINTER * Bits,
+ OUT gceSURF_FORMAT * Format
+ );
+
+gceSTATUS
+gcoOS_CopyPixmapBits(
+ IN HALNativeDisplayType Display,
+ IN HALNativePixmapType Pixmap,
+ IN gctUINT DstWidth,
+ IN gctUINT DstHeight,
+ IN gctINT DstStride,
+ IN gceSURF_FORMAT DstFormat,
+ OUT gctPOINTER DstBits
+ );
+
+/*******************************************************************************
+** OS relative. ****************************************************************
+*/
+gceSTATUS
+gcoOS_LoadEGLLibrary(
+ OUT gctHANDLE * Handle
+ );
+
+gceSTATUS
+gcoOS_FreeEGLLibrary(
+ IN gctHANDLE Handle
+ );
+
+gceSTATUS
+gcoOS_ShowWindow(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_HideWindow(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_SetWindowTitle(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctCONST_STRING Title
+ );
+
+gceSTATUS
+gcoOS_CapturePointer(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_GetEvent(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ OUT halEvent * Event
+ );
+
+gceSTATUS
+gcoOS_CreateClientBuffer(
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT Format,
+ IN gctINT Type,
+ OUT gctPOINTER * ClientBuffer
+ );
+
+gceSTATUS
+gcoOS_GetClientBufferInfo(
+ IN gctPOINTER ClientBuffer,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctINT * Stride,
+ OUT gctPOINTER * Bits
+ );
+
+gceSTATUS
+gcoOS_DestroyClientBuffer(
+ IN gctPOINTER ClientBuffer
+ );
+
+gceSTATUS
+gcoOS_DestroyContext(
+ IN gctPOINTER Display,
+ IN gctPOINTER Context
+ );
+
+gceSTATUS
+gcoOS_CreateContext(
+ IN gctPOINTER LocalDisplay,
+ IN gctPOINTER Context
+ );
+
+gceSTATUS
+gcoOS_MakeCurrent(
+ IN gctPOINTER LocalDisplay,
+ IN HALNativeWindowType DrawDrawable,
+ IN HALNativeWindowType ReadDrawable,
+ IN gctPOINTER Context,
+ IN gcoSURF ResolveTarget
+ );
+
+gceSTATUS
+gcoOS_CreateDrawable(
+ IN gctPOINTER LocalDisplay,
+ IN HALNativeWindowType Drawable
+ );
+
+gceSTATUS
+gcoOS_DestroyDrawable(
+ IN gctPOINTER LocalDisplay,
+ IN HALNativeWindowType Drawable
+ );
+gceSTATUS
+gcoOS_SwapBuffers(
+ IN gctPOINTER LocalDisplay,
+ IN HALNativeWindowType Drawable,
+ IN gcoSURF RenderTarget,
+ IN gcoSURF ResolveTarget,
+ IN gctPOINTER ResolveBits,
+ OUT gctUINT *Width,
+ OUT gctUINT *Height
+ );
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_eglplatform_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_eglplatform_type.h b/src/include_imx6_v4_0_0/gc_hal_eglplatform_type.h
new file mode 100644
index 0000000..4f5c3ce
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_eglplatform_type.h
@@ -0,0 +1,286 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_eglplatform_type_h_
+#define __gc_hal_eglplatform_type_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*******************************************************************************
+** Events. *********************************************************************
+*/
+
+typedef enum _halEventType
+{
+ /* Keyboard event. */
+ HAL_KEYBOARD,
+
+ /* Mouse move event. */
+ HAL_POINTER,
+
+ /* Mouse button event. */
+ HAL_BUTTON,
+
+ /* Application close event. */
+ HAL_CLOSE,
+
+ /* Application window has been updated. */
+ HAL_WINDOW_UPDATE
+}
+halEventType;
+
+/* Scancodes for keyboard. */
+typedef enum _halKeys
+{
+ HAL_UNKNOWN = -1,
+
+ HAL_BACKSPACE = 0x08,
+ HAL_TAB,
+ HAL_ENTER = 0x0D,
+ HAL_ESCAPE = 0x1B,
+
+ HAL_SPACE = 0x20,
+ HAL_SINGLEQUOTE = 0x27,
+ HAL_PAD_ASTERISK = 0x2A,
+ HAL_COMMA = 0x2C,
+ HAL_HYPHEN,
+ HAL_PERIOD,
+ HAL_SLASH,
+ HAL_0,
+ HAL_1,
+ HAL_2,
+ HAL_3,
+ HAL_4,
+ HAL_5,
+ HAL_6,
+ HAL_7,
+ HAL_8,
+ HAL_9,
+ HAL_SEMICOLON = 0x3B,
+ HAL_EQUAL = 0x3D,
+ HAL_A = 0x41,
+ HAL_B,
+ HAL_C,
+ HAL_D,
+ HAL_E,
+ HAL_F,
+ HAL_G,
+ HAL_H,
+ HAL_I,
+ HAL_J,
+ HAL_K,
+ HAL_L,
+ HAL_M,
+ HAL_N,
+ HAL_O,
+ HAL_P,
+ HAL_Q,
+ HAL_R,
+ HAL_S,
+ HAL_T,
+ HAL_U,
+ HAL_V,
+ HAL_W,
+ HAL_X,
+ HAL_Y,
+ HAL_Z,
+ HAL_LBRACKET,
+ HAL_BACKSLASH,
+ HAL_RBRACKET,
+ HAL_BACKQUOTE = 0x60,
+
+ HAL_F1 = 0x80,
+ HAL_F2,
+ HAL_F3,
+ HAL_F4,
+ HAL_F5,
+ HAL_F6,
+ HAL_F7,
+ HAL_F8,
+ HAL_F9,
+ HAL_F10,
+ HAL_F11,
+ HAL_F12,
+
+ HAL_LCTRL,
+ HAL_RCTRL,
+ HAL_LSHIFT,
+ HAL_RSHIFT,
+ HAL_LALT,
+ HAL_RALT,
+ HAL_CAPSLOCK,
+ HAL_NUMLOCK,
+ HAL_SCROLLLOCK,
+ HAL_PAD_0,
+ HAL_PAD_1,
+ HAL_PAD_2,
+ HAL_PAD_3,
+ HAL_PAD_4,
+ HAL_PAD_5,
+ HAL_PAD_6,
+ HAL_PAD_7,
+ HAL_PAD_8,
+ HAL_PAD_9,
+ HAL_PAD_HYPHEN,
+ HAL_PAD_PLUS,
+ HAL_PAD_SLASH,
+ HAL_PAD_PERIOD,
+ HAL_PAD_ENTER,
+ HAL_SYSRQ,
+ HAL_PRNTSCRN,
+ HAL_BREAK,
+ HAL_UP,
+ HAL_LEFT,
+ HAL_RIGHT,
+ HAL_DOWN,
+ HAL_HOME,
+ HAL_END,
+ HAL_PGUP,
+ HAL_PGDN,
+ HAL_INSERT,
+ HAL_DELETE,
+ HAL_LWINDOW,
+ HAL_RWINDOW,
+ HAL_MENU,
+ HAL_POWER,
+ HAL_SLEEP,
+ HAL_WAKE
+}
+halKeys;
+
+/* Structure that defined keyboard mapping. */
+typedef struct _halKeyMap
+{
+ /* Normal key. */
+ halKeys normal;
+
+ /* Extended key. */
+ halKeys extended;
+}
+halKeyMap;
+
+/* Event structure. */
+typedef struct _halEvent
+{
+ /* Event type. */
+ halEventType type;
+
+ /* Event data union. */
+ union _halEventData
+ {
+ /* Event data for keyboard. */
+ struct _halKeyboard
+ {
+ /* Scancode. */
+ halKeys scancode;
+
+ /* ASCII characte of the key pressed. */
+ char key;
+
+ /* Flag whether the key was pressed (1) or released (0). */
+ char pressed;
+ }
+ keyboard;
+
+ /* Event data for pointer. */
+ struct _halPointer
+ {
+ /* Current pointer coordinate. */
+ int x;
+ int y;
+ }
+ pointer;
+
+ /* Event data for mouse buttons. */
+ struct _halButton
+ {
+ /* Left button state. */
+ int left;
+
+ /* Middle button state. */
+ int middle;
+
+ /* Right button state. */
+ int right;
+
+ /* Current pointer coordinate. */
+ int x;
+ int y;
+ }
+ button;
+ }
+ data;
+}
+halEvent;
+
+/* VFK_DISPLAY_INFO structure defining information returned by
+ vdkGetDisplayInfoEx. */
+typedef struct _halDISPLAY_INFO
+{
+ /* The size of the display in pixels. */
+ int width;
+ int height;
+
+ /* The stride of the dispay. -1 is returned if the stride is not known
+ ** for the specified display.*/
+ int stride;
+
+ /* The color depth of the display in bits per pixel. */
+ int bitsPerPixel;
+
+ /* The logical pointer to the display memory buffer. NULL is returned
+ ** if the pointer is not known for the specified display. */
+ void * logical;
+
+ /* The physical address of the display memory buffer. ~0 is returned
+ ** if the address is not known for the specified display. */
+ unsigned long physical;
+
+ int wrapFB; /* true if compositor, false otherwise. */
+
+#ifndef __QNXNTO__
+ /* 355_FB_MULTI_BUFFER */
+ int multiBuffer;
+ int backBufferY;
+#endif
+
+ /* The color info of the display. */
+ unsigned int alphaLength;
+ unsigned int alphaOffset;
+ unsigned int redLength;
+ unsigned int redOffset;
+ unsigned int greenLength;
+ unsigned int greenOffset;
+ unsigned int blueLength;
+ unsigned int blueOffset;
+
+ /* Display flip support. */
+ int flip;
+}
+halDISPLAY_INFO;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_eglplatform_type_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_engine.h b/src/include_imx6_v4_0_0/gc_hal_engine.h
new file mode 100644
index 0000000..d441d1d
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_engine.h
@@ -0,0 +1,2028 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_engine_h_
+#define __gc_hal_engine_h_
+
+#ifndef VIVANTE_NO_3D
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+
+#if gcdENABLE_VG
+#include "gc_hal_engine_vg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoSTREAM * gcoSTREAM;
+typedef struct _gcoVERTEX * gcoVERTEX;
+typedef struct _gcoTEXTURE * gcoTEXTURE;
+typedef struct _gcoINDEX * gcoINDEX;
+typedef struct _gcsVERTEX_ATTRIBUTES * gcsVERTEX_ATTRIBUTES_PTR;
+typedef struct _gcoVERTEXARRAY * gcoVERTEXARRAY;
+
+#define gcdATTRIBUTE_COUNT 16
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+/* Shading format. */
+typedef enum _gceSHADING
+{
+ gcvSHADING_SMOOTH,
+ gcvSHADING_FLAT_D3D,
+ gcvSHADING_FLAT_OPENGL,
+}
+gceSHADING;
+
+/* Culling modes. */
+typedef enum _gceCULL
+{
+ gcvCULL_NONE,
+ gcvCULL_CCW,
+ gcvCULL_CW,
+}
+gceCULL;
+
+/* Fill modes. */
+typedef enum _gceFILL
+{
+ gcvFILL_POINT,
+ gcvFILL_WIRE_FRAME,
+ gcvFILL_SOLID,
+}
+gceFILL;
+
+/* Compare modes. */
+typedef enum _gceCOMPARE
+{
+ gcvCOMPARE_NEVER,
+ gcvCOMPARE_NOT_EQUAL,
+ gcvCOMPARE_LESS,
+ gcvCOMPARE_LESS_OR_EQUAL,
+ gcvCOMPARE_EQUAL,
+ gcvCOMPARE_GREATER,
+ gcvCOMPARE_GREATER_OR_EQUAL,
+ gcvCOMPARE_ALWAYS,
+ gcvCOMPARE_INVALID = -1
+}
+gceCOMPARE;
+
+/* Stencil modes. */
+typedef enum _gceSTENCIL_MODE
+{
+ gcvSTENCIL_NONE,
+ gcvSTENCIL_SINGLE_SIDED,
+ gcvSTENCIL_DOUBLE_SIDED,
+}
+gceSTENCIL_MODE;
+
+/* Stencil operations. */
+typedef enum _gceSTENCIL_OPERATION
+{
+ gcvSTENCIL_KEEP,
+ gcvSTENCIL_REPLACE,
+ gcvSTENCIL_ZERO,
+ gcvSTENCIL_INVERT,
+ gcvSTENCIL_INCREMENT,
+ gcvSTENCIL_DECREMENT,
+ gcvSTENCIL_INCREMENT_SATURATE,
+ gcvSTENCIL_DECREMENT_SATURATE,
+ gcvSTENCIL_OPERATION_INVALID = -1
+}
+gceSTENCIL_OPERATION;
+
+/* Stencil selection. */
+typedef enum _gceSTENCIL_WHERE
+{
+ gcvSTENCIL_FRONT,
+ gcvSTENCIL_BACK,
+}
+gceSTENCIL_WHERE;
+
+/* Texture addressing selection. */
+typedef enum _gceTEXTURE_WHICH
+{
+ gcvTEXTURE_S,
+ gcvTEXTURE_T,
+ gcvTEXTURE_R,
+}
+gceTEXTURE_WHICH;
+
+/* Texture addressing modes. */
+typedef enum _gceTEXTURE_ADDRESSING
+{
+ gcvTEXTURE_WRAP,
+ gcvTEXTURE_CLAMP,
+ gcvTEXTURE_BORDER,
+ gcvTEXTURE_MIRROR,
+ gcvTEXTURE_MIRROR_ONCE,
+}
+gceTEXTURE_ADDRESSING;
+
+/* Texture filters. */
+typedef enum _gceTEXTURE_FILTER
+{
+ gcvTEXTURE_NONE,
+ gcvTEXTURE_POINT,
+ gcvTEXTURE_LINEAR,
+ gcvTEXTURE_ANISOTROPIC,
+}
+gceTEXTURE_FILTER;
+
+/* Primitive types. */
+typedef enum _gcePRIMITIVE
+{
+ gcvPRIMITIVE_POINT_LIST,
+ gcvPRIMITIVE_LINE_LIST,
+ gcvPRIMITIVE_LINE_STRIP,
+ gcvPRIMITIVE_LINE_LOOP,
+ gcvPRIMITIVE_TRIANGLE_LIST,
+ gcvPRIMITIVE_TRIANGLE_STRIP,
+ gcvPRIMITIVE_TRIANGLE_FAN,
+ gcvPRIMITIVE_RECTANGLE,
+}
+gcePRIMITIVE;
+
+/* Index types. */
+typedef enum _gceINDEX_TYPE
+{
+ gcvINDEX_8,
+ gcvINDEX_16,
+ gcvINDEX_32,
+}
+gceINDEX_TYPE;
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Query the target capabilities. */
+gceSTATUS
+gcoHAL_QueryTargetCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MultiTargetCount,
+ OUT gctUINT * MaxSamples
+ );
+
+gceSTATUS
+gcoHAL_SetDepthOnly(
+ IN gcoHAL Hal,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoHAL_QueryShaderCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * VertexUniforms,
+ OUT gctUINT * FragmentUniforms,
+ OUT gctUINT * Varyings
+ );
+
+gceSTATUS
+gcoHAL_QueryTextureCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoHAL_QueryTextureMaxAniso(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxAnisoValue
+ );
+
+gceSTATUS
+gcoHAL_QueryStreamCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT32 * MaxAttributes,
+ OUT gctUINT32 * MaxStreamSize,
+ OUT gctUINT32 * NumberOfStreams,
+ OUT gctUINT32 * Alignment
+ );
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*--------------------------------- gcoSURF 3D --------------------------------*/
+
+/* Copy surface. */
+gceSTATUS
+gcoSURF_Copy(
+ IN gcoSURF Surface,
+ IN gcoSURF Source
+ );
+
+/* Clear surface. */
+gceSTATUS
+gcoSURF_Clear(
+ IN gcoSURF Surface,
+ IN gctUINT Flags
+ );
+
+/* Set number of samples for a gcoSURF object. */
+gceSTATUS
+gcoSURF_SetSamples(
+ IN gcoSURF Surface,
+ IN gctUINT Samples
+ );
+
+/* Get the number of samples per pixel. */
+gceSTATUS
+gcoSURF_GetSamples(
+ IN gcoSURF Surface,
+ OUT gctUINT_PTR Samples
+ );
+
+/* Clear rectangular surface. */
+gceSTATUS
+gcoSURF_ClearRect(
+ IN gcoSURF Surface,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctUINT Flags
+ );
+
+/* TO BE REMOVED */
+ gceSTATUS
+ depr_gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight
+ );
+
+ gceSTATUS
+ depr_gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Resample surface. */
+gceSTATUS
+gcoSURF_Resample(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Resolve surface. */
+gceSTATUS
+gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Export the render target. */
+gceSTATUS
+gcoSURF_ExportRenderTarget(
+ IN gcoSURF SrcSurface
+);
+
+/* Import the render target. */
+gceSTATUS
+gcoSURF_ImportRenderTarget(
+ IN gctUINT32 Pid,
+ IN gcoSURF SrcSurface
+);
+
+/* Save the Resolve info to kernel. */
+gceSTATUS
+gcoSURF_PrepareRemoteResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Resolve using the rectangle info previously saved in the vid mem node. */
+gceSTATUS
+gcoSURF_ResolveFromStoredRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Using the info that Process Pid saved to do resolve. */
+gceSTATUS
+gcoSURF_RemoteResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctBOOL *resolveDiscarded
+ );
+
+/* Return the "resolve submitted indicator" signal. */
+gceSTATUS
+gcoSURF_GetRTSignal(
+ IN gcoSURF RTSurface,
+ OUT gctSIGNAL * resolveSubmittedSignal
+ );
+
+/* Resolve rectangular area of a surface. */
+gceSTATUS
+gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Set surface resolvability. */
+gceSTATUS
+gcoSURF_SetResolvability(
+ IN gcoSURF Surface,
+ IN gctBOOL Resolvable
+ );
+
+gceSTATUS
+gcoSURF_IsRenderable(
+ IN gcoSURF Surface
+ );
+
+#if gcdSYNC
+gceSTATUS
+gcoSURF_GetFence(
+ IN gcoSURF Surface
+ );
+gceSTATUS
+gcoSURF_WaitFence(
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoSTREAM_GetFence(
+ IN gcoSTREAM stream
+ );
+
+gceSTATUS
+gcoSTREAM_WaitFence(
+ IN gcoSTREAM stream
+ );
+
+gceSTATUS
+gcoINDEX_GetFence(
+ IN gcoINDEX index
+ );
+
+gceSTATUS
+gcoINDEX_WaitFence(
+ IN gcoINDEX index
+ );
+#endif
+
+/******************************************************************************\
+******************************** gcoINDEX Object *******************************
+\******************************************************************************/
+
+/* Construct a new gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoINDEX * Index
+ );
+
+/* Destroy a gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Destroy(
+ IN gcoINDEX Index
+ );
+
+/* Lock index in memory. */
+gceSTATUS
+gcoINDEX_Lock(
+ IN gcoINDEX Index,
+ OUT gctUINT32 * Address,
+ OUT gctPOINTER * Memory
+ );
+
+/* Unlock index that was previously locked with gcoINDEX_Lock. */
+gceSTATUS
+gcoINDEX_Unlock(
+ IN gcoINDEX Index
+ );
+
+/* Upload index data into the memory. */
+gceSTATUS
+gcoINDEX_Load(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE IndexType,
+ IN gctUINT32 IndexCount,
+ IN gctPOINTER IndexBuffer
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_Bind(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_BindOffset(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset
+ );
+
+/* Free existing index buffer. */
+gceSTATUS
+gcoINDEX_Free(
+ IN gcoINDEX Index
+ );
+
+/* Upload data into an index buffer. */
+gceSTATUS
+gcoINDEX_Upload(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/* Upload data into an index buffer starting at an offset. */
+gceSTATUS
+gcoINDEX_UploadOffset(
+ IN gcoINDEX Index,
+ IN gctUINT32 Offset,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/*Merge index2 to index1 from 0, index2 must subset of inex1*/
+gceSTATUS
+gcoINDEX_Merge(
+ IN gcoINDEX Index1,
+ IN gcoINDEX Index2
+ );
+
+/*check if index buffer is enough for this draw*/
+gctBOOL
+gcoINDEX_CheckRange(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctINT Count,
+ IN gctUINT32 Indices
+ );
+
+/* Query the index capabilities. */
+gceSTATUS
+gcoINDEX_QueryCaps(
+ OUT gctBOOL * Index8,
+ OUT gctBOOL * Index16,
+ OUT gctBOOL * Index32,
+ OUT gctUINT * MaxIndex
+ );
+
+/* Determine the index range in the current index buffer. */
+gceSTATUS
+gcoINDEX_GetIndexRange(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Count,
+ OUT gctUINT32 * MinimumIndex,
+ OUT gctUINT32 * MaximumIndex
+ );
+
+/* Dynamic buffer management. */
+gceSTATUS
+gcoINDEX_SetDynamic(
+ IN gcoINDEX Index,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+gceSTATUS
+gcoINDEX_UploadDynamic(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+********************************** gco3D Object *********************************
+\******************************************************************************/
+
+/* Clear flags. */
+typedef enum _gceCLEAR
+{
+ gcvCLEAR_COLOR = 0x1,
+ gcvCLEAR_DEPTH = 0x2,
+ gcvCLEAR_STENCIL = 0x4,
+ gcvCLEAR_HZ = 0x8,
+ gcvCLEAR_HAS_VAA = 0x10,
+}
+gceCLEAR;
+
+/* Blending targets. */
+typedef enum _gceBLEND_UNIT
+{
+ gcvBLEND_SOURCE,
+ gcvBLEND_TARGET,
+}
+gceBLEND_UNIT;
+
+/* Construct a new gco3D object. */
+gceSTATUS
+gco3D_Construct(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+/* Destroy an gco3D object. */
+gceSTATUS
+gco3D_Destroy(
+ IN gco3D Engine
+ );
+
+/* Set 3D API type. */
+gceSTATUS
+gco3D_SetAPI(
+ IN gco3D Engine,
+ IN gceAPI ApiType
+ );
+
+/* Set render target. */
+gceSTATUS
+gco3D_SetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset render target. */
+gceSTATUS
+gco3D_UnsetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set depth buffer. */
+gceSTATUS
+gco3D_SetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset depth buffer. */
+gceSTATUS
+gco3D_UnsetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set viewport. */
+gceSTATUS
+gco3D_SetViewport(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set scissors. */
+gceSTATUS
+gco3D_SetScissors(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set clear color. */
+gceSTATUS
+gco3D_SetClearColor(
+ IN gco3D Engine,
+ IN gctUINT8 Red,
+ IN gctUINT8 Green,
+ IN gctUINT8 Blue,
+ IN gctUINT8 Alpha
+ );
+
+/* Set fixed point clear color. */
+gceSTATUS
+gco3D_SetClearColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point clear color. */
+gceSTATUS
+gco3D_SetClearColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set fixed point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Depth
+ );
+
+/* Set floating point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthF(
+ IN gco3D Engine,
+ IN gctFLOAT Depth
+ );
+
+/* Set clear stencil. */
+gceSTATUS
+gco3D_SetClearStencil(
+ IN gco3D Engine,
+ IN gctUINT32 Stencil
+ );
+
+/* Clear a Rect sub-surface. */
+gceSTATUS
+gco3D_ClearRect(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+/* Clear surface. */
+gceSTATUS
+gco3D_Clear(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+
+/* Clear tile status. */
+gceSTATUS
+gco3D_ClearTileStatus(
+ IN gco3D Engine,
+ IN gcsSURF_INFO_PTR Surface,
+ IN gctUINT32 TileStatusAddress,
+ IN gctUINT32 Flags
+ );
+
+/* Set shading mode. */
+gceSTATUS
+gco3D_SetShading(
+ IN gco3D Engine,
+ IN gceSHADING Shading
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_EnableBlending(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set blending function. */
+gceSTATUS
+gco3D_SetBlendFunction(
+ IN gco3D Engine,
+ IN gceBLEND_UNIT Unit,
+ IN gceBLEND_FUNCTION FunctionRGB,
+ IN gceBLEND_FUNCTION FunctionAlpha
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_SetBlendMode(
+ IN gco3D Engine,
+ IN gceBLEND_MODE ModeRGB,
+ IN gceBLEND_MODE ModeAlpha
+ );
+
+/* Set blending color. */
+gceSTATUS
+gco3D_SetBlendColor(
+ IN gco3D Engine,
+ IN gctUINT Red,
+ IN gctUINT Green,
+ IN gctUINT Blue,
+ IN gctUINT Alpha
+ );
+
+/* Set fixed point blending color. */
+gceSTATUS
+gco3D_SetBlendColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point blending color. */
+gceSTATUS
+gco3D_SetBlendColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set culling mode. */
+gceSTATUS
+gco3D_SetCulling(
+ IN gco3D Engine,
+ IN gceCULL Mode
+ );
+
+/* Enable point size */
+gceSTATUS
+gco3D_SetPointSizeEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set point sprite */
+gceSTATUS
+gco3D_SetPointSprite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set fill mode. */
+gceSTATUS
+gco3D_SetFill(
+ IN gco3D Engine,
+ IN gceFILL Mode
+ );
+
+/* Set depth compare mode. */
+gceSTATUS
+gco3D_SetDepthCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Enable depth writing. */
+gceSTATUS
+gco3D_EnableDepthWrite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth mode. */
+gceSTATUS
+gco3D_SetDepthMode(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeX(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFIXED_POINT Near,
+ IN gctFIXED_POINT Far
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeF(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFLOAT Near,
+ IN gctFLOAT Far
+ );
+
+/* Set last pixel enable */
+gceSTATUS
+gco3D_SetLastPixelEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth Bias and Scale */
+gceSTATUS
+gco3D_SetDepthScaleBiasX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT DepthScale,
+ IN gctFIXED_POINT DepthBias
+ );
+
+gceSTATUS
+gco3D_SetDepthScaleBiasF(
+ IN gco3D Engine,
+ IN gctFLOAT DepthScale,
+ IN gctFLOAT DepthBias
+ );
+
+/* Set depth near and far clipping plane. */
+gceSTATUS
+gco3D_SetDepthPlaneF(
+ IN gco3D Engine,
+ IN gctFLOAT Near,
+ IN gctFLOAT Far
+ );
+
+/* Enable or disable dithering. */
+gceSTATUS
+gco3D_EnableDither(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set color write enable bits. */
+gceSTATUS
+gco3D_SetColorWrite(
+ IN gco3D Engine,
+ IN gctUINT8 Enable
+ );
+
+/* Enable or disable early depth. */
+gceSTATUS
+gco3D_SetEarlyDepth(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Enable or disable all early depth operations. */
+gceSTATUS
+gco3D_SetAllEarlyDepthModes(
+ IN gco3D Engine,
+ IN gctBOOL Disable
+ );
+
+/* Switch dynamic early mode */
+gceSTATUS
+gco3D_SwitchDynamicEarlyDepthMode(
+ IN gco3D Engine
+ );
+
+/* Set dynamic early mode */
+gceSTATUS
+gco3D_DisableDynamicEarlyDepthMode(
+ IN gco3D Engine,
+ IN gctBOOL Disable
+ );
+
+/* Enable or disable depth-only mode. */
+gceSTATUS
+gco3D_SetDepthOnly(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+typedef struct _gcsSTENCIL_INFO * gcsSTENCIL_INFO_PTR;
+typedef struct _gcsSTENCIL_INFO
+{
+ gceSTENCIL_MODE mode;
+
+ gctUINT8 maskFront;
+ gctUINT8 maskBack;
+ gctUINT8 writeMaskFront;
+ gctUINT8 writeMaskBack;
+
+ gctUINT8 referenceFront;
+
+ gceCOMPARE compareFront;
+ gceSTENCIL_OPERATION passFront;
+ gceSTENCIL_OPERATION failFront;
+ gceSTENCIL_OPERATION depthFailFront;
+
+ gctUINT8 referenceBack;
+ gceCOMPARE compareBack;
+ gceSTENCIL_OPERATION passBack;
+ gceSTENCIL_OPERATION failBack;
+ gceSTENCIL_OPERATION depthFailBack;
+}
+gcsSTENCIL_INFO;
+
+/* Set stencil mode. */
+gceSTATUS
+gco3D_SetStencilMode(
+ IN gco3D Engine,
+ IN gceSTENCIL_MODE Mode
+ );
+
+/* Set stencil mask. */
+gceSTATUS
+gco3D_SetStencilMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil back mask. */
+gceSTATUS
+gco3D_SetStencilMaskBack(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil write mask. */
+gceSTATUS
+gco3D_SetStencilWriteMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil back write mask. */
+gceSTATUS
+gco3D_SetStencilWriteMaskBack(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil reference. */
+gceSTATUS
+gco3D_SetStencilReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference,
+ IN gctBOOL Front
+ );
+
+/* Set stencil compare. */
+gceSTATUS
+gco3D_SetStencilCompare(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceCOMPARE Compare
+ );
+
+/* Set stencil operation on pass. */
+gceSTATUS
+gco3D_SetStencilPass(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on fail. */
+gceSTATUS
+gco3D_SetStencilFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on depth fail. */
+gceSTATUS
+gco3D_SetStencilDepthFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set all stencil states in one blow. */
+gceSTATUS
+gco3D_SetStencilAll(
+ IN gco3D Engine,
+ IN gcsSTENCIL_INFO_PTR Info
+ );
+
+typedef struct _gcsALPHA_INFO * gcsALPHA_INFO_PTR;
+typedef struct _gcsALPHA_INFO
+{
+ /* Alpha test states. */
+ gctBOOL test;
+ gceCOMPARE compare;
+ gctUINT8 reference;
+
+ /* Alpha blending states. */
+ gctBOOL blend;
+
+ gceBLEND_FUNCTION srcFuncColor;
+ gceBLEND_FUNCTION srcFuncAlpha;
+ gceBLEND_FUNCTION trgFuncColor;
+ gceBLEND_FUNCTION trgFuncAlpha;
+
+ gceBLEND_MODE modeColor;
+ gceBLEND_MODE modeAlpha;
+
+ gctUINT32 color;
+}
+gcsALPHA_INFO;
+
+/* Enable or disable alpha test. */
+gceSTATUS
+gco3D_SetAlphaTest(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set alpha test compare. */
+gceSTATUS
+gco3D_SetAlphaCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Set alpha test reference in unsigned integer. */
+gceSTATUS
+gco3D_SetAlphaReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference
+ );
+
+/* Set alpha test reference in fixed point. */
+gceSTATUS
+gco3D_SetAlphaReferenceX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Reference
+ );
+
+/* Set alpha test reference in floating point. */
+gceSTATUS
+gco3D_SetAlphaReferenceF(
+ IN gco3D Engine,
+ IN gctFLOAT Reference
+ );
+
+/* Enable/Disable anti-alias line. */
+gceSTATUS
+gco3D_SetAntiAliasLine(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set texture slot for anti-alias line. */
+gceSTATUS
+gco3D_SetAALineTexSlot(
+ IN gco3D Engine,
+ IN gctUINT TexSlot
+ );
+
+/* Set anti-alias line width scale. */
+gceSTATUS
+gco3D_SetAALineWidth(
+ IN gco3D Engine,
+ IN gctFLOAT Width
+ );
+
+/* Draw a number of primitives. */
+gceSTATUS
+gco3D_DrawPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT StartVertex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+gceSTATUS
+gco3D_DrawPrimitivesCount(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT* StartVertex,
+ IN gctSIZE_T* VertexCount,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+
+/* Draw a number of primitives using offsets. */
+gceSTATUS
+gco3D_DrawPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives. */
+gceSTATUS
+gco3D_DrawIndexedPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT BaseVertex,
+ IN gctINT StartIndex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives using offsets. */
+gceSTATUS
+gco3D_DrawIndexedPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 BaseOffset,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Enable or disable anti-aliasing. */
+gceSTATUS
+gco3D_SetAntiAlias(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Write data into the command buffer. */
+gceSTATUS
+gco3D_WriteBuffer(
+ IN gco3D Engine,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Aligned
+ );
+
+/* Send sempahore and stall until sempahore is signalled. */
+gceSTATUS
+gco3D_Semaphore(
+ IN gco3D Engine,
+ IN gceWHERE From,
+ IN gceWHERE To,
+ IN gceHOW How);
+
+/* Set the subpixels center. */
+gceSTATUS
+gco3D_SetCentroids(
+ IN gco3D Engine,
+ IN gctUINT32 Index,
+ IN gctPOINTER Centroids
+ );
+
+gceSTATUS
+gco3D_SetLogicOp(
+ IN gco3D Engine,
+ IN gctUINT8 Rop
+ );
+
+/* OCL thread walker information. */
+typedef struct _gcsTHREAD_WALKER_INFO * gcsTHREAD_WALKER_INFO_PTR;
+typedef struct _gcsTHREAD_WALKER_INFO
+{
+ gctUINT32 dimensions;
+ gctUINT32 traverseOrder;
+ gctUINT32 enableSwathX;
+ gctUINT32 enableSwathY;
+ gctUINT32 enableSwathZ;
+ gctUINT32 swathSizeX;
+ gctUINT32 swathSizeY;
+ gctUINT32 swathSizeZ;
+ gctUINT32 valueOrder;
+
+ gctUINT32 globalSizeX;
+ gctUINT32 globalOffsetX;
+ gctUINT32 globalSizeY;
+ gctUINT32 globalOffsetY;
+ gctUINT32 globalSizeZ;
+ gctUINT32 globalOffsetZ;
+
+ gctUINT32 workGroupSizeX;
+ gctUINT32 workGroupCountX;
+ gctUINT32 workGroupSizeY;
+ gctUINT32 workGroupCountY;
+ gctUINT32 workGroupSizeZ;
+ gctUINT32 workGroupCountZ;
+
+ gctUINT32 threadAllocation;
+}
+gcsTHREAD_WALKER_INFO;
+
+/* Start OCL thread walker. */
+gceSTATUS
+gco3D_InvokeThreadWalker(
+ IN gco3D Engine,
+ IN gcsTHREAD_WALKER_INFO_PTR Info
+ );
+
+/* Set w clip and w plane limit value. */
+gceSTATUS
+gco3D_SetWClipEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gco3D_GetWClipEnable(
+ IN gco3D Engine,
+ OUT gctBOOL * Enable
+ );
+
+gceSTATUS
+gco3D_SetWPlaneLimitF(
+ IN gco3D Engine,
+ IN gctFLOAT Value
+ );
+
+gceSTATUS
+gco3D_SetWPlaneLimitX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Value
+ );
+
+
+gceSTATUS
+gco3D_SetWPlaneLimit(
+ IN gco3D Engine,
+ IN gctFLOAT Value
+ );
+
+/*----------------------------------------------------------------------------*/
+/*-------------------------- gco3D Fragment Processor ------------------------*/
+
+/* Set the fragment processor configuration. */
+gceSTATUS
+gco3D_SetFragmentConfiguration(
+ IN gco3D Engine,
+ IN gctBOOL ColorFromStream,
+ IN gctBOOL EnableFog,
+ IN gctBOOL EnableSmoothPoint,
+ IN gctUINT32 ClipPlanes
+ );
+
+/* Enable/disable texture stage operation. */
+gceSTATUS
+gco3D_EnableTextureStage(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL Enable
+ );
+
+/* Program the channel enable masks for the color texture function. */
+gceSTATUS
+gco3D_SetTextureColorMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the channel enable masks for the alpha texture function. */
+gceSTATUS
+gco3D_SetTextureAlphaMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the constant fragment color. */
+gceSTATUS
+gco3D_SetFragmentColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFragmentColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant fog color. */
+gceSTATUS
+gco3D_SetFogColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFogColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant texture color. */
+gceSTATUS
+gco3D_SetTetxureColorX(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetTetxureColorF(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Configure color texture function. */
+gceSTATUS
+gco3D_SetColorTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+/* Configure alpha texture function. */
+gceSTATUS
+gco3D_SetAlphaTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+/* Invoke OCL thread walker. */
+gceSTATUS
+gcoHARDWARE_InvokeThreadWalker(
+ IN gcsTHREAD_WALKER_INFO_PTR Info
+ );
+
+/******************************************************************************\
+******************************* gcoTEXTURE Object *******************************
+\******************************************************************************/
+
+/* Cube faces. */
+typedef enum _gceTEXTURE_FACE
+{
+ gcvFACE_NONE,
+ gcvFACE_POSITIVE_X,
+ gcvFACE_NEGATIVE_X,
+ gcvFACE_POSITIVE_Y,
+ gcvFACE_NEGATIVE_Y,
+ gcvFACE_POSITIVE_Z,
+ gcvFACE_NEGATIVE_Z,
+}
+gceTEXTURE_FACE;
+
+typedef struct _gcsTEXTURE
+{
+ /* Addressing modes. */
+ gceTEXTURE_ADDRESSING s;
+ gceTEXTURE_ADDRESSING t;
+ gceTEXTURE_ADDRESSING r;
+
+ /* Border color. */
+ gctUINT8 border[4];
+
+ /* Filters. */
+ gceTEXTURE_FILTER minFilter;
+ gceTEXTURE_FILTER magFilter;
+ gceTEXTURE_FILTER mipFilter;
+ gctUINT anisoFilter;
+ gctBOOL forceTopLevel;
+ /* Level of detail. */
+ gctFIXED_POINT lodBias;
+ gctFIXED_POINT lodMin;
+ gctFIXED_POINT lodMax;
+}
+gcsTEXTURE, * gcsTEXTURE_PTR;
+
+/* Construct a new gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Construct(
+ IN gcoHAL Hal,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Construct a new sized gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_ConstructSized(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gctUINT MipMapCount,
+ IN gcePOOL Pool,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Destroy an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Destroy(
+ IN gcoTEXTURE Texture
+ );
+
+/* Replace a mipmap in gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_ReplaceMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctUINT Level,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctINT imageFormat,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gcePOOL Pool
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Upload(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadSub(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload compressed data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadCompressed(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Upload compressed sub data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadCompressedSub(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT XOffset,
+ IN gctUINT YOffset,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctSIZE_T Size
+ );
+
+/* GetImageFormat of texture. */
+gceSTATUS
+gcoTEXTURE_GetImageFormat(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ OUT gctINT * ImageFormat
+ );
+
+/* Get gcoSURF object for a mipmap level. */
+gceSTATUS
+gcoTEXTURE_GetMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ OUT gcoSURF * Surface
+ );
+
+/* Get gcoSURF object for a mipmap level and face offset. */
+gceSTATUS
+gcoTEXTURE_GetMipMapFace(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ OUT gcoSURF * Surface,
+ OUT gctUINT32_PTR Offset
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gctINT imageFormat,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromClient(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromSurface(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_SetMaxLevel(
+ IN gcoTEXTURE Texture,
+ IN gctUINT Levels
+ );
+
+gceSTATUS
+gcoTEXTURE_SetEndianHint(
+ IN gcoTEXTURE Texture,
+ IN gceENDIAN_HINT EndianHint
+ );
+
+gceSTATUS
+gcoTEXTURE_Disable(
+ IN gcoHAL Hal,
+ IN gctINT Sampler
+ );
+
+gceSTATUS
+gcoTEXTURE_Flush(
+ IN gcoTEXTURE Texture
+ );
+
+gceSTATUS
+gcoTEXTURE_QueryCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoTEXTURE_GetClosestFormat(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT InFormat,
+ OUT gceSURF_FORMAT* OutFormat
+ );
+
+gceSTATUS
+gcoTEXTURE_RenderIntoMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsRenderable(
+ IN gcoTEXTURE Texture,
+ IN gctUINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsComplete(
+ IN gcoTEXTURE Texture,
+ IN gctINT MaxLevel
+ );
+
+gceSTATUS
+gcoTEXTURE_BindTexture(
+ IN gcoTEXTURE Texture,
+ IN gctINT Target,
+ IN gctINT Sampler,
+ IN gcsTEXTURE_PTR Info
+ );
+
+/******************************************************************************\
+******************************* gcoSTREAM Object ******************************
+\******************************************************************************/
+
+typedef enum _gceVERTEX_FORMAT
+{
+ gcvVERTEX_BYTE,
+ gcvVERTEX_UNSIGNED_BYTE,
+ gcvVERTEX_SHORT,
+ gcvVERTEX_UNSIGNED_SHORT,
+ gcvVERTEX_INT,
+ gcvVERTEX_UNSIGNED_INT,
+ gcvVERTEX_FIXED,
+ gcvVERTEX_HALF,
+ gcvVERTEX_FLOAT,
+ gcvVERTEX_UNSIGNED_INT_10_10_10_2,
+ gcvVERTEX_INT_10_10_10_2,
+}
+gceVERTEX_FORMAT;
+
+gceSTATUS
+gcoSTREAM_Construct(
+ IN gcoHAL Hal,
+ OUT gcoSTREAM * Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Destroy(
+ IN gcoSTREAM Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Upload(
+ IN gcoSTREAM Stream,
+ IN gctCONST_POINTER Buffer,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Dynamic
+ );
+
+gceSTATUS
+gcoSTREAM_SetStride(
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoSTREAM_Lock(
+ IN gcoSTREAM Stream,
+ OUT gctPOINTER * Logical,
+ OUT gctUINT32 * Physical
+ );
+
+gceSTATUS
+gcoSTREAM_Unlock(
+ IN gcoSTREAM Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Reserve(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoSTREAM_Flush(
+ IN gcoSTREAM Stream
+ );
+
+/* Dynamic buffer API. */
+gceSTATUS
+gcoSTREAM_SetDynamic(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+typedef struct _gcsSTREAM_INFO
+{
+ gctUINT index;
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT components;
+ gctSIZE_T size;
+ gctCONST_POINTER data;
+ gctUINT stride;
+}
+gcsSTREAM_INFO, * gcsSTREAM_INFO_PTR;
+
+gceSTATUS
+gcoSTREAM_UploadDynamic(
+ IN gcoSTREAM Stream,
+ IN gctUINT VertexCount,
+ IN gctUINT InfoCount,
+ IN gcsSTREAM_INFO_PTR Info,
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoSTREAM_CPUCacheOperation(
+ IN gcoSTREAM Stream,
+ IN gceCACHEOPERATION Operation
+ );
+
+/******************************************************************************\
+******************************** gcoVERTEX Object ******************************
+\******************************************************************************/
+
+typedef struct _gcsVERTEX_ATTRIBUTES
+{
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT32 components;
+ gctSIZE_T size;
+ gctUINT32 stream;
+ gctUINT32 offset;
+ gctUINT32 stride;
+}
+gcsVERTEX_ATTRIBUTES;
+
+gceSTATUS
+gcoVERTEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVERTEX * Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Destroy(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Reset(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_EnableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index,
+ IN gceVERTEX_FORMAT Format,
+ IN gctBOOL Normalized,
+ IN gctUINT32 Components,
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoVERTEX_DisableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index
+ );
+
+gceSTATUS
+gcoVERTEX_Bind(
+ IN gcoVERTEX Vertex
+ );
+
+/*******************************************************************************
+***** gcoVERTEXARRAY Object ***************************************************/
+
+typedef struct _gcsVERTEXARRAY
+{
+ /* Enabled. */
+ gctBOOL enable;
+
+ /* Number of components. */
+ gctINT size;
+
+ /* Attribute format. */
+ gceVERTEX_FORMAT format;
+
+ /* Flag whether the attribute is normalized or not. */
+ gctBOOL normalized;
+
+ /* Stride of the component. */
+ gctUINT stride;
+
+ /* Pointer to the attribute data. */
+ gctCONST_POINTER pointer;
+
+ /* Stream object owning the attribute data. */
+ gcoSTREAM stream;
+
+ /* Generic values for attribute. */
+ gctFLOAT genericValue[4];
+
+ /* Generic size for attribute. */
+ gctINT genericSize;
+
+ /* Vertex shader linkage. */
+ gctUINT linkage;
+
+#if gcdUSE_WCLIP_PATCH
+ gctBOOL isPosition;
+#endif
+}
+gcsVERTEXARRAY,
+* gcsVERTEXARRAY_PTR;
+
+gceSTATUS
+gcoVERTEXARRAY_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVERTEXARRAY * Vertex
+ );
+
+gceSTATUS
+gcoVERTEXARRAY_Destroy(
+ IN gcoVERTEXARRAY Vertex
+ );
+
+gceSTATUS
+gcoVERTEXARRAY_Bind(
+ IN gcoVERTEXARRAY Vertex,
+ IN gctUINT32 EnableBits,
+ IN gcsVERTEXARRAY_PTR VertexArray,
+ IN gctUINT First,
+ IN gctSIZE_T Count,
+ IN gceINDEX_TYPE IndexType,
+ IN gcoINDEX IndexObject,
+ IN gctPOINTER IndexMemory,
+ IN OUT gcePRIMITIVE * PrimitiveType,
+#if gcdUSE_WCLIP_PATCH
+ IN OUT gctUINT * PrimitiveCount,
+ IN OUT gctFLOAT * wLimitRms,
+ IN OUT gctBOOL * wLimitDirty
+#else
+ IN OUT gctUINT * PrimitiveCount
+#endif
+ );
+
+gctUINT
+gcoVERTEXARRAY_GetMaxStream(
+ IN gcoVERTEXARRAY Vertex
+);
+
+gceSTATUS
+gcoVERTEXARRAY_SetMaxStream(
+ IN gcoVERTEXARRAY Vertex,
+ gctUINT maxStreams
+);
+/*******************************************************************************
+***** Composition *************************************************************/
+
+typedef enum _gceCOMPOSITION
+{
+ gcvCOMPOSE_CLEAR = 1,
+ gcvCOMPOSE_BLUR,
+ gcvCOMPOSE_DIM,
+ gcvCOMPOSE_LAYER
+}
+gceCOMPOSITION;
+
+typedef struct _gcsCOMPOSITION * gcsCOMPOSITION_PTR;
+typedef struct _gcsCOMPOSITION
+{
+ /* Structure size. */
+ gctUINT structSize;
+
+ /* Composition operation. */
+ gceCOMPOSITION operation;
+
+ /* Layer to be composed. */
+ gcoSURF layer;
+
+ /* Source and target coordinates. */
+ gcsRECT srcRect;
+ gcsRECT trgRect;
+
+ /* Target rectangle */
+ gcsPOINT v0;
+ gcsPOINT v1;
+ gcsPOINT v2;
+
+ /* Blending parameters. */
+ gctBOOL enableBlending;
+ gctBOOL premultiplied;
+ gctUINT8 alphaValue;
+
+ /* Clear color. */
+ gctFLOAT r;
+ gctFLOAT g;
+ gctFLOAT b;
+ gctFLOAT a;
+}
+gcsCOMPOSITION;
+
+gceSTATUS
+gco3D_ProbeComposition(
+ gctBOOL ResetIfEmpty
+ );
+
+gceSTATUS
+gco3D_CompositionBegin(
+ void
+ );
+
+gceSTATUS
+gco3D_ComposeLayer(
+ IN gcsCOMPOSITION_PTR Layer
+ );
+
+gceSTATUS
+gco3D_CompositionSignals(
+ IN gctHANDLE Process,
+ IN gctSIGNAL Signal1,
+ IN gctSIGNAL Signal2
+ );
+
+gceSTATUS
+gco3D_CompositionEnd(
+ IN gcoSURF Target,
+ IN gctBOOL Synchronous
+ );
+
+/* Frame Database */
+gceSTATUS
+gcoHAL_AddFrameDB(
+ void
+ );
+
+gceSTATUS
+gcoHAL_DumpFrameDB(
+ gctCONST_STRING Filename OPTIONAL
+ );
+
+gceSTATUS
+gcoHAL_GetSharedInfo(
+ IN gctUINT32 Pid,
+ IN gctUINT32 DataId,
+ OUT gctUINT8_PTR Data,
+ IN gctSIZE_T Bytes,
+ IN gctUINT64 Node,
+ OUT gctUINT8_PTR NodeData,
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE SharedInfoType
+ );
+
+gceSTATUS
+gcoHAL_SetSharedInfo(
+ IN gctUINT32 DataId,
+ IN gctUINT8_PTR Data,
+ IN gctSIZE_T Bytes,
+ IN gctUINT64 Node,
+ IN gctUINT8_PTR NodeData,
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE SharedInfoType
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VIVANTE_NO_3D */
+#endif /* __gc_hal_engine_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_engine_vg.h b/src/include_imx6_v4_0_0/gc_hal_engine_vg.h
new file mode 100644
index 0000000..4bb6772
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_engine_vg.h
@@ -0,0 +1,904 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_engine_vg_h_
+#define __gc_hal_engine_vg_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "gc_hal_types.h"
+
+/******************************************************************************\
+******************************** VG Enumerations *******************************
+\******************************************************************************/
+
+/**
+** @ingroup gcoVG
+**
+** @brief Tiling mode for painting and imagig.
+**
+** This enumeration defines the tiling modes supported by the HAL. This is
+** in fact a one-to-one mapping of the OpenVG 1.1 tile modes.
+*/
+typedef enum _gceTILE_MODE
+{
+ gcvTILE_FILL,
+ gcvTILE_PAD,
+ gcvTILE_REPEAT,
+ gcvTILE_REFLECT
+}
+gceTILE_MODE;
+
+/******************************************************************************/
+/** @ingroup gcoVG
+**
+** @brief The different paint modes.
+**
+** This enumeration lists the available paint modes.
+*/
+typedef enum _gcePAINT_TYPE
+{
+ /** Solid color. */
+ gcvPAINT_MODE_SOLID,
+
+ /** Linear gradient. */
+ gcvPAINT_MODE_LINEAR,
+
+ /** Radial gradient. */
+ gcvPAINT_MODE_RADIAL,
+
+ /** Pattern. */
+ gcvPAINT_MODE_PATTERN,
+
+ /** Mode count. */
+ gcvPAINT_MODE_COUNT
+}
+gcePAINT_TYPE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Types of path data supported by HAL.
+**
+** This enumeration defines the types of path data supported by the HAL.
+** This is in fact a one-to-one mapping of the OpenVG 1.1 path types.
+*/
+typedef enum _gcePATHTYPE
+{
+ gcePATHTYPE_UNKNOWN = -1,
+ gcePATHTYPE_INT8,
+ gcePATHTYPE_INT16,
+ gcePATHTYPE_INT32,
+ gcePATHTYPE_FLOAT
+}
+gcePATHTYPE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Supported path segment commands.
+**
+** This enumeration defines the path segment commands supported by the HAL.
+*/
+typedef enum _gceVGCMD
+{
+ gcvVGCMD_END, /* 0: GCCMD_TS_OPCODE_END */
+ gcvVGCMD_CLOSE, /* 1: GCCMD_TS_OPCODE_CLOSE */
+ gcvVGCMD_MOVE, /* 2: GCCMD_TS_OPCODE_MOVE */
+ gcvVGCMD_MOVE_REL, /* 3: GCCMD_TS_OPCODE_MOVE_REL */
+ gcvVGCMD_LINE, /* 4: GCCMD_TS_OPCODE_LINE */
+ gcvVGCMD_LINE_REL, /* 5: GCCMD_TS_OPCODE_LINE_REL */
+ gcvVGCMD_QUAD, /* 6: GCCMD_TS_OPCODE_QUADRATIC */
+ gcvVGCMD_QUAD_REL, /* 7: GCCMD_TS_OPCODE_QUADRATIC_REL */
+ gcvVGCMD_CUBIC, /* 8: GCCMD_TS_OPCODE_CUBIC */
+ gcvVGCMD_CUBIC_REL, /* 9: GCCMD_TS_OPCODE_CUBIC_REL */
+ gcvVGCMD_BREAK, /* 10: GCCMD_TS_OPCODE_BREAK */
+ gcvVGCMD_HLINE, /* 11: ******* R E S E R V E D *******/
+ gcvVGCMD_HLINE_REL, /* 12: ******* R E S E R V E D *******/
+ gcvVGCMD_VLINE, /* 13: ******* R E S E R V E D *******/
+ gcvVGCMD_VLINE_REL, /* 14: ******* R E S E R V E D *******/
+ gcvVGCMD_SQUAD, /* 15: ******* R E S E R V E D *******/
+ gcvVGCMD_SQUAD_REL, /* 16: ******* R E S E R V E D *******/
+ gcvVGCMD_SCUBIC, /* 17: ******* R E S E R V E D *******/
+ gcvVGCMD_SCUBIC_REL, /* 18: ******* R E S E R V E D *******/
+ gcvVGCMD_SCCWARC, /* 19: ******* R E S E R V E D *******/
+ gcvVGCMD_SCCWARC_REL, /* 20: ******* R E S E R V E D *******/
+ gcvVGCMD_SCWARC, /* 21: ******* R E S E R V E D *******/
+ gcvVGCMD_SCWARC_REL, /* 22: ******* R E S E R V E D *******/
+ gcvVGCMD_LCCWARC, /* 23: ******* R E S E R V E D *******/
+ gcvVGCMD_LCCWARC_REL, /* 24: ******* R E S E R V E D *******/
+ gcvVGCMD_LCWARC, /* 25: ******* R E S E R V E D *******/
+ gcvVGCMD_LCWARC_REL, /* 26: ******* R E S E R V E D *******/
+
+ /* The width of the command recognized by the hardware on bits. */
+ gcvVGCMD_WIDTH = 5,
+
+ /* Hardware command mask. */
+ gcvVGCMD_MASK = (1 << gcvVGCMD_WIDTH) - 1,
+
+ /* Command modifiers. */
+ gcvVGCMD_H_MOD = 1 << gcvVGCMD_WIDTH, /* = 32 */
+ gcvVGCMD_V_MOD = 2 << gcvVGCMD_WIDTH, /* = 64 */
+ gcvVGCMD_S_MOD = 3 << gcvVGCMD_WIDTH, /* = 96 */
+ gcvVGCMD_ARC_MOD = 4 << gcvVGCMD_WIDTH, /* = 128 */
+
+ /* Emulated LINE commands. */
+ gcvVGCMD_HLINE_EMUL = gcvVGCMD_H_MOD | gcvVGCMD_LINE, /* = 36 */
+ gcvVGCMD_HLINE_EMUL_REL = gcvVGCMD_H_MOD | gcvVGCMD_LINE_REL, /* = 37 */
+ gcvVGCMD_VLINE_EMUL = gcvVGCMD_V_MOD | gcvVGCMD_LINE, /* = 68 */
+ gcvVGCMD_VLINE_EMUL_REL = gcvVGCMD_V_MOD | gcvVGCMD_LINE_REL, /* = 69 */
+
+ /* Emulated SMOOTH commands. */
+ gcvVGCMD_SQUAD_EMUL = gcvVGCMD_S_MOD | gcvVGCMD_QUAD, /* = 102 */
+ gcvVGCMD_SQUAD_EMUL_REL = gcvVGCMD_S_MOD | gcvVGCMD_QUAD_REL, /* = 103 */
+ gcvVGCMD_SCUBIC_EMUL = gcvVGCMD_S_MOD | gcvVGCMD_CUBIC, /* = 104 */
+ gcvVGCMD_SCUBIC_EMUL_REL = gcvVGCMD_S_MOD | gcvVGCMD_CUBIC_REL, /* = 105 */
+
+ /* Emulation ARC commands. */
+ gcvVGCMD_ARC_LINE = gcvVGCMD_ARC_MOD | gcvVGCMD_LINE, /* = 132 */
+ gcvVGCMD_ARC_LINE_REL = gcvVGCMD_ARC_MOD | gcvVGCMD_LINE_REL, /* = 133 */
+ gcvVGCMD_ARC_QUAD = gcvVGCMD_ARC_MOD | gcvVGCMD_QUAD, /* = 134 */
+ gcvVGCMD_ARC_QUAD_REL = gcvVGCMD_ARC_MOD | gcvVGCMD_QUAD_REL /* = 135 */
+}
+gceVGCMD;
+typedef enum _gceVGCMD * gceVGCMD_PTR;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Blending modes supported by the HAL.
+**
+** This enumeration defines the blending modes supported by the HAL. This is
+** in fact a one-to-one mapping of the OpenVG 1.1 blending modes.
+*/
+typedef enum _gceVG_BLEND
+{
+ gcvVG_BLEND_SRC,
+ gcvVG_BLEND_SRC_OVER,
+ gcvVG_BLEND_DST_OVER,
+ gcvVG_BLEND_SRC_IN,
+ gcvVG_BLEND_DST_IN,
+ gcvVG_BLEND_MULTIPLY,
+ gcvVG_BLEND_SCREEN,
+ gcvVG_BLEND_DARKEN,
+ gcvVG_BLEND_LIGHTEN,
+ gcvVG_BLEND_ADDITIVE,
+ gcvVG_BLEND_SUBTRACT,
+ gcvVG_BLEND_FILTER
+}
+gceVG_BLEND;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Image modes supported by the HAL.
+**
+** This enumeration defines the image modes supported by the HAL. This is
+** in fact a one-to-one mapping of the OpenVG 1.1 image modes with the addition
+** of NO IMAGE.
+*/
+typedef enum _gceVG_IMAGE
+{
+ gcvVG_IMAGE_NONE,
+ gcvVG_IMAGE_NORMAL,
+ gcvVG_IMAGE_MULTIPLY,
+ gcvVG_IMAGE_STENCIL,
+ gcvVG_IMAGE_FILTER
+}
+gceVG_IMAGE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Filter mode patterns and imaging.
+**
+** This enumeration defines the filter modes supported by the HAL.
+*/
+typedef enum _gceIMAGE_FILTER
+{
+ gcvFILTER_POINT,
+ gcvFILTER_LINEAR,
+ gcvFILTER_BI_LINEAR
+}
+gceIMAGE_FILTER;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Primitive modes supported by the HAL.
+**
+** This enumeration defines the primitive modes supported by the HAL.
+*/
+typedef enum _gceVG_PRIMITIVE
+{
+ gcvVG_SCANLINE,
+ gcvVG_RECTANGLE,
+ gcvVG_TESSELLATED,
+ gcvVG_TESSELLATED_TILED
+}
+gceVG_PRIMITIVE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Rendering quality modes supported by the HAL.
+**
+** This enumeration defines the rendering quality modes supported by the HAL.
+*/
+typedef enum _gceRENDER_QUALITY
+{
+ gcvVG_NONANTIALIASED,
+ gcvVG_2X2_MSAA,
+ gcvVG_2X4_MSAA,
+ gcvVG_4X4_MSAA
+}
+gceRENDER_QUALITY;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Fill rules supported by the HAL.
+**
+** This enumeration defines the fill rules supported by the HAL.
+*/
+typedef enum _gceFILL_RULE
+{
+ gcvVG_EVEN_ODD,
+ gcvVG_NON_ZERO
+}
+gceFILL_RULE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Cap styles supported by the HAL.
+**
+** This enumeration defines the cap styles supported by the HAL.
+*/
+typedef enum _gceCAP_STYLE
+{
+ gcvCAP_BUTT,
+ gcvCAP_ROUND,
+ gcvCAP_SQUARE
+}
+gceCAP_STYLE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Join styles supported by the HAL.
+**
+** This enumeration defines the join styles supported by the HAL.
+*/
+typedef enum _gceJOIN_STYLE
+{
+ gcvJOIN_MITER,
+ gcvJOIN_ROUND,
+ gcvJOIN_BEVEL
+}
+gceJOIN_STYLE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Channel mask values.
+**
+** This enumeration defines the values for channel mask used in image
+** filtering.
+*/
+
+/* Base values for channel mask definitions. */
+#define gcvCHANNEL_X (0)
+#define gcvCHANNEL_R (1 << 0)
+#define gcvCHANNEL_G (1 << 1)
+#define gcvCHANNEL_B (1 << 2)
+#define gcvCHANNEL_A (1 << 3)
+
+typedef enum _gceCHANNEL
+{
+ gcvCHANNEL_XXXX = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_XXXA = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_XXBX = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_XXBA = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_A),
+
+ gcvCHANNEL_XGXX = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_XGXA = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_XGBX = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_XGBA = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_A),
+
+ gcvCHANNEL_RXXX = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_RXXA = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_RXBX = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_RXBA = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_A),
+
+ gcvCHANNEL_RGXX = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_RGXA = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_RGBX = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_RGBA = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_A),
+}
+gceCHANNEL;
+
+/******************************************************************************\
+******************************** VG Structures *******************************
+\******************************************************************************/
+
+/**
+** @ingroup gcoVG
+**
+** @brief Definition of the color ramp used by the gradient paints.
+**
+** The gcsCOLOR_RAMP structure defines the layout of one single color inside
+** a color ramp which is used by gradient paints.
+*/
+typedef struct _gcsCOLOR_RAMP
+{
+ /** Value for the color stop. */
+ gctFLOAT stop;
+
+ /** Red color channel value for the color stop. */
+ gctFLOAT red;
+
+ /** Green color channel value for the color stop. */
+ gctFLOAT green;
+
+ /** Blue color channel value for the color stop. */
+ gctFLOAT blue;
+
+ /** Alpha color channel value for the color stop. */
+ gctFLOAT alpha;
+}
+gcsCOLOR_RAMP, * gcsCOLOR_RAMP_PTR;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Definition of the color ramp used by the gradient paints in fixed form.
+**
+** The gcsCOLOR_RAMP structure defines the layout of one single color inside
+** a color ramp which is used by gradient paints.
+*/
+typedef struct _gcsFIXED_COLOR_RAMP
+{
+ /** Value for the color stop. */
+ gctFIXED_POINT stop;
+
+ /** Red color channel value for the color stop. */
+ gctFIXED_POINT red;
+
+ /** Green color channel value for the color stop. */
+ gctFIXED_POINT green;
+
+ /** Blue color channel value for the color stop. */
+ gctFIXED_POINT blue;
+
+ /** Alpha color channel value for the color stop. */
+ gctFIXED_POINT alpha;
+}
+gcsFIXED_COLOR_RAMP, * gcsFIXED_COLOR_RAMP_PTR;
+
+
+/**
+** @ingroup gcoVG
+**
+** @brief Rectangle structure used by the gcoVG object.
+**
+** This structure defines the layout of a rectangle. Make sure width and
+** height are larger than 0.
+*/
+typedef struct _gcsVG_RECT * gcsVG_RECT_PTR;
+typedef struct _gcsVG_RECT
+{
+ /** Left location of the rectangle. */
+ gctINT x;
+
+ /** Top location of the rectangle. */
+ gctINT y;
+
+ /** Width of the rectangle. */
+ gctINT width;
+
+ /** Height of the rectangle. */
+ gctINT height;
+}
+gcsVG_RECT;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Path command buffer attribute structure.
+**
+** The gcsPATH_BUFFER_INFO structure contains the specifics about
+** the layout of the path data command buffer.
+*/
+typedef struct _gcsPATH_BUFFER_INFO * gcsPATH_BUFFER_INFO_PTR;
+typedef struct _gcsPATH_BUFFER_INFO
+{
+ gctUINT reservedForHead;
+ gctUINT reservedForTail;
+}
+gcsPATH_BUFFER_INFO;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Definition of the path data container structure.
+**
+** The gcsPATH structure defines the layout of the path data container.
+*/
+typedef struct _gcsPATH_DATA * gcsPATH_DATA_PTR;
+typedef struct _gcsPATH_DATA
+{
+ /* Data container in command buffer format. */
+ gcsCMDBUFFER data;
+
+ /* Path data type. */
+ gcePATHTYPE dataType;
+}
+gcsPATH_DATA;
+
+
+/******************************************************************************\
+********************************* gcoHAL Object ********************************
+\******************************************************************************/
+
+/* Query path data storage attributes. */
+gceSTATUS
+gcoHAL_QueryPathStorage(
+ IN gcoHAL Hal,
+ OUT gcsPATH_BUFFER_INFO_PTR Information
+ );
+
+/* Associate a completion signal with the command buffer. */
+gceSTATUS
+gcoHAL_AssociateCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Release the current command buffer completion signal. */
+gceSTATUS
+gcoHAL_DeassociateCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Verify whether the command buffer is still in use. */
+gceSTATUS
+gcoHAL_CheckCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Wait until the command buffer is no longer in use. */
+gceSTATUS
+gcoHAL_WaitCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Flush the pixel cache. */
+gceSTATUS
+gcoHAL_Flush(
+ IN gcoHAL Hal
+ );
+
+/* Split a harwdare address into pool and offset. */
+gceSTATUS
+gcoHAL_SplitAddress(
+ IN gcoHAL Hal,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Combine pool and offset into a harwdare address. */
+gceSTATUS
+gcoHAL_CombineAddress(
+ IN gcoHAL Hal,
+ IN gcePOOL Pool,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Schedule to free linear video memory allocated. */
+gceSTATUS
+gcoHAL_ScheduleVideoMemory(
+ IN gcoHAL Hal,
+ IN gctUINT64 Node
+ );
+
+/* Free linear video memory allocated with gcoHAL_AllocateLinearVideoMemory. */
+gceSTATUS
+gcoHAL_FreeVideoMemory(
+ IN gcoHAL Hal,
+ IN gctUINT64 Node
+ );
+
+/* Query command buffer attributes. */
+gceSTATUS
+gcoHAL_QueryCommandBuffer(
+ IN gcoHAL Hal,
+ OUT gcsCOMMAND_BUFFER_INFO_PTR Information
+ );
+/* Allocate and lock linear video memory. */
+gceSTATUS
+gcoHAL_AllocateLinearVideoMemory(
+ IN gcoHAL Hal,
+ IN gctUINT Size,
+ IN gctUINT Alignment,
+ IN gcePOOL Pool,
+ OUT gctUINT64 * Node,
+ OUT gctUINT32 * Address,
+ OUT gctPOINTER * Memory
+ );
+
+/* Align the specified size accordingly to the hardware requirements. */
+gceSTATUS
+gcoHAL_GetAlignedSurfaceSize(
+ IN gcoHAL Hal,
+ IN gceSURF_TYPE Type,
+ IN OUT gctUINT32_PTR Width,
+ IN OUT gctUINT32_PTR Height
+ );
+
+gceSTATUS
+gcoHAL_ReserveTask(
+ IN gcoHAL Hal,
+ IN gceBLOCK Block,
+ IN gctUINT TaskCount,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+/******************************************************************************\
+********************************** gcoVG Object ********************************
+\******************************************************************************/
+
+/** @defgroup gcoVG gcoVG
+**
+** The gcoVG object abstracts the VG hardware pipe.
+*/
+
+gctBOOL
+gcoVG_IsMaskSupported(
+ IN gceSURF_FORMAT Format
+ );
+
+gctBOOL
+gcoVG_IsTargetSupported(
+ IN gceSURF_FORMAT Format
+ );
+
+gctBOOL
+gcoVG_IsImageSupported(
+ IN gceSURF_FORMAT Format
+ );
+
+gctUINT8 gcoVG_PackColorComponent(
+ gctFLOAT Value
+ );
+
+gceSTATUS
+gcoVG_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVG * Vg
+ );
+
+gceSTATUS
+gcoVG_Destroy(
+ IN gcoVG Vg
+ );
+
+gceSTATUS
+gcoVG_SetTarget(
+ IN gcoVG Vg,
+ IN gcoSURF Target
+ );
+
+gceSTATUS
+gcoVG_UnsetTarget(
+ IN gcoVG Vg,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoVG_SetUserToSurface(
+ IN gcoVG Vg,
+ IN gctFLOAT UserToSurface[9]
+ );
+
+gceSTATUS
+gcoVG_SetSurfaceToImage(
+ IN gcoVG Vg,
+ IN gctFLOAT SurfaceToImage[9]
+ );
+
+gceSTATUS
+gcoVG_EnableMask(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoVG_SetMask(
+ IN gcoVG Vg,
+ IN gcoSURF Mask
+ );
+
+gceSTATUS
+gcoVG_UnsetMask(
+ IN gcoVG Vg,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoVG_FlushMask(
+ IN gcoVG Vg
+ );
+
+gceSTATUS
+gcoVG_EnableScissor(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoVG_SetScissor(
+ IN gcoVG Vg,
+ IN gctSIZE_T RectangleCount,
+ IN gcsVG_RECT_PTR Rectangles
+ );
+
+gceSTATUS
+gcoVG_EnableColorTransform(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoVG_SetColorTransform(
+ IN gcoVG Vg,
+ IN gctFLOAT ColorTransform[8]
+ );
+
+gceSTATUS
+gcoVG_SetTileFillColor(
+ IN gcoVG Vg,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+gceSTATUS
+gcoVG_SetSolidPaint(
+ IN gcoVG Vg,
+ IN gctUINT8 Red,
+ IN gctUINT8 Green,
+ IN gctUINT8 Blue,
+ IN gctUINT8 Alpha
+ );
+
+gceSTATUS
+gcoVG_SetLinearPaint(
+ IN gcoVG Vg,
+ IN gctFLOAT Constant,
+ IN gctFLOAT StepX,
+ IN gctFLOAT StepY
+ );
+
+gceSTATUS
+gcoVG_SetRadialPaint(
+ IN gcoVG Vg,
+ IN gctFLOAT LinConstant,
+ IN gctFLOAT LinStepX,
+ IN gctFLOAT LinStepY,
+ IN gctFLOAT RadConstant,
+ IN gctFLOAT RadStepX,
+ IN gctFLOAT RadStepY,
+ IN gctFLOAT RadStepXX,
+ IN gctFLOAT RadStepYY,
+ IN gctFLOAT RadStepXY
+ );
+
+gceSTATUS
+gcoVG_SetPatternPaint(
+ IN gcoVG Vg,
+ IN gctFLOAT UConstant,
+ IN gctFLOAT UStepX,
+ IN gctFLOAT UStepY,
+ IN gctFLOAT VConstant,
+ IN gctFLOAT VStepX,
+ IN gctFLOAT VStepY,
+ IN gctBOOL Linear
+ );
+
+gceSTATUS
+gcoVG_SetColorRamp(
+ IN gcoVG Vg,
+ IN gcoSURF ColorRamp,
+ IN gceTILE_MODE ColorRampSpreadMode
+ );
+
+gceSTATUS
+gcoVG_SetPattern(
+ IN gcoVG Vg,
+ IN gcoSURF Pattern,
+ IN gceTILE_MODE TileMode,
+ IN gceIMAGE_FILTER Filter
+ );
+
+gceSTATUS
+gcoVG_SetImageMode(
+ IN gcoVG Vg,
+ IN gceVG_IMAGE Mode
+ );
+
+gceSTATUS
+gcoVG_SetBlendMode(
+ IN gcoVG Vg,
+ IN gceVG_BLEND Mode
+ );
+
+gceSTATUS
+gcoVG_SetRenderingQuality(
+ IN gcoVG Vg,
+ IN gceRENDER_QUALITY Quality
+ );
+
+gceSTATUS
+gcoVG_SetFillRule(
+ IN gcoVG Vg,
+ IN gceFILL_RULE FillRule
+ );
+
+gceSTATUS
+gcoVG_FinalizePath(
+ IN gcoVG Vg,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+gceSTATUS
+gcoVG_Clear(
+ IN gcoVG Vg,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_DrawPath(
+ IN gcoVG Vg,
+ IN gcsPATH_DATA_PTR PathData,
+ IN gctFLOAT Scale,
+ IN gctFLOAT Bias,
+ IN gctBOOL SoftwareTesselation
+ );
+
+gceSTATUS
+gcoVG_DrawImage(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gcsSIZE_PTR SourceSize,
+ IN gctINT SourceX,
+ IN gctINT SourceY,
+ IN gctINT TargetX,
+ IN gctINT TargetY,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctBOOL Mask
+ );
+
+gceSTATUS
+gcoVG_TesselateImage(
+ IN gcoVG Vg,
+ IN gcoSURF Image,
+ IN gcsVG_RECT_PTR Rectangle,
+ IN gceIMAGE_FILTER Filter,
+ IN gctBOOL Mask,
+ IN gctBOOL SoftwareTesselation
+ );
+
+gceSTATUS
+gcoVG_Blit(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gcsVG_RECT_PTR SrcRect,
+ IN gcsVG_RECT_PTR TrgRect,
+ IN gceIMAGE_FILTER Filter,
+ IN gceVG_BLEND Mode
+ );
+
+gceSTATUS
+gcoVG_ColorMatrix(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN const gctFLOAT * Matrix,
+ IN gceCHANNEL ColorChannels,
+ IN gctBOOL FilterLinear,
+ IN gctBOOL FilterPremultiplied,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_SeparableConvolve(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctINT KernelWidth,
+ IN gctINT KernelHeight,
+ IN gctINT ShiftX,
+ IN gctINT ShiftY,
+ IN const gctINT16 * KernelX,
+ IN const gctINT16 * KernelY,
+ IN gctFLOAT Scale,
+ IN gctFLOAT Bias,
+ IN gceTILE_MODE TilingMode,
+ IN gctFLOAT_PTR FillColor,
+ IN gceCHANNEL ColorChannels,
+ IN gctBOOL FilterLinear,
+ IN gctBOOL FilterPremultiplied,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gcsSIZE_PTR SourceSize,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_GaussianBlur(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctFLOAT StdDeviationX,
+ IN gctFLOAT StdDeviationY,
+ IN gceTILE_MODE TilingMode,
+ IN gctFLOAT_PTR FillColor,
+ IN gceCHANNEL ColorChannels,
+ IN gctBOOL FilterLinear,
+ IN gctBOOL FilterPremultiplied,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gcsSIZE_PTR SourceSize,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_EnableDither(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_vg_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_enum.h b/src/include_imx6_v4_0_0/gc_hal_enum.h
new file mode 100644
index 0000000..cf6b425
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_enum.h
@@ -0,0 +1,886 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_enum_h_
+#define __gc_hal_enum_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Chip models. */
+typedef enum _gceCHIPMODEL
+{
+ gcv300 = 0x0300,
+ gcv320 = 0x0320,
+ gcv350 = 0x0350,
+ gcv355 = 0x0355,
+ gcv400 = 0x0400,
+ gcv410 = 0x0410,
+ gcv420 = 0x0420,
+ gcv450 = 0x0450,
+ gcv500 = 0x0500,
+ gcv530 = 0x0530,
+ gcv600 = 0x0600,
+ gcv700 = 0x0700,
+ gcv800 = 0x0800,
+ gcv860 = 0x0860,
+ gcv880 = 0x0880,
+ gcv1000 = 0x1000,
+ gcv2000 = 0x2000,
+ gcv2100 = 0x2100,
+ gcv4000 = 0x4000,
+}
+gceCHIPMODEL;
+
+/* Chip features. */
+typedef enum _gceFEATURE
+{
+ gcvFEATURE_PIPE_2D = 0,
+ gcvFEATURE_PIPE_3D,
+ gcvFEATURE_PIPE_VG,
+ gcvFEATURE_DC,
+ gcvFEATURE_HIGH_DYNAMIC_RANGE,
+ gcvFEATURE_MODULE_CG,
+ gcvFEATURE_MIN_AREA,
+ gcvFEATURE_BUFFER_INTERLEAVING,
+ gcvFEATURE_BYTE_WRITE_2D,
+ gcvFEATURE_ENDIANNESS_CONFIG,
+ gcvFEATURE_DUAL_RETURN_BUS,
+ gcvFEATURE_DEBUG_MODE,
+ gcvFEATURE_YUY2_RENDER_TARGET,
+ gcvFEATURE_FRAGMENT_PROCESSOR,
+ gcvFEATURE_2DPE20,
+ gcvFEATURE_FAST_CLEAR,
+ gcvFEATURE_YUV420_TILER,
+ gcvFEATURE_YUY2_AVERAGING,
+ gcvFEATURE_FLIP_Y,
+ gcvFEATURE_EARLY_Z,
+ gcvFEATURE_Z_COMPRESSION,
+ gcvFEATURE_MSAA,
+ gcvFEATURE_SPECIAL_ANTI_ALIASING,
+ gcvFEATURE_SPECIAL_MSAA_LOD,
+ gcvFEATURE_422_TEXTURE_COMPRESSION,
+ gcvFEATURE_DXT_TEXTURE_COMPRESSION,
+ gcvFEATURE_ETC1_TEXTURE_COMPRESSION,
+ gcvFEATURE_CORRECT_TEXTURE_CONVERTER,
+ gcvFEATURE_TEXTURE_8K,
+ gcvFEATURE_SCALER,
+ gcvFEATURE_YUV420_SCALER,
+ gcvFEATURE_SHADER_HAS_W,
+ gcvFEATURE_SHADER_HAS_SIGN,
+ gcvFEATURE_SHADER_HAS_FLOOR,
+ gcvFEATURE_SHADER_HAS_CEIL,
+ gcvFEATURE_SHADER_HAS_SQRT,
+ gcvFEATURE_SHADER_HAS_TRIG,
+ gcvFEATURE_VAA,
+ gcvFEATURE_HZ,
+ gcvFEATURE_CORRECT_STENCIL,
+ gcvFEATURE_VG20,
+ gcvFEATURE_VG_FILTER,
+ gcvFEATURE_VG21,
+ gcvFEATURE_VG_DOUBLE_BUFFER,
+ gcvFEATURE_MC20,
+ gcvFEATURE_SUPER_TILED,
+ gcvFEATURE_2D_FILTERBLIT_PLUS_ALPHABLEND,
+ gcvFEATURE_2D_DITHER,
+ gcvFEATURE_2D_A8_TARGET,
+ gcvFEATURE_2D_FILTERBLIT_FULLROTATION,
+ gcvFEATURE_2D_BITBLIT_FULLROTATION,
+ gcvFEATURE_WIDE_LINE,
+ gcvFEATURE_FC_FLUSH_STALL,
+ gcvFEATURE_FULL_DIRECTFB,
+ gcvFEATURE_HALF_FLOAT_PIPE,
+ gcvFEATURE_LINE_LOOP,
+ gcvFEATURE_2D_YUV_BLIT,
+ gcvFEATURE_2D_TILING,
+ gcvFEATURE_NON_POWER_OF_TWO,
+ gcvFEATURE_3D_TEXTURE,
+ gcvFEATURE_TEXTURE_ARRAY,
+ gcvFEATURE_TILE_FILLER,
+ gcvFEATURE_LOGIC_OP,
+ gcvFEATURE_COMPOSITION,
+ gcvFEATURE_MIXED_STREAMS,
+ gcvFEATURE_2D_MULTI_SOURCE_BLT,
+ gcvFEATURE_END_EVENT,
+ gcvFEATURE_VERTEX_10_10_10_2,
+ gcvFEATURE_TEXTURE_10_10_10_2,
+ gcvFEATURE_TEXTURE_ANISOTROPIC_FILTERING,
+ gcvFEATURE_TEXTURE_FLOAT_HALF_FLOAT,
+ gcvFEATURE_2D_ROTATION_STALL_FIX,
+ gcvFEATURE_2D_MULTI_SOURCE_BLT_EX,
+ gcvFEATURE_BUG_FIXES10,
+ gcvFEATURE_2D_MINOR_TILING,
+ /* Supertiled compressed textures are supported. */
+ gcvFEATURE_TEX_COMPRRESSION_SUPERTILED,
+ gcvFEATURE_FAST_MSAA,
+ gcvFEATURE_BUG_FIXED_INDEXED_TRIANGLE_STRIP,
+ gcvFEATURE_TEXTURE_TILED_READ,
+ gcvFEATURE_DEPTH_BIAS_FIX,
+ gcvFEATURE_RECT_PRIMITIVE,
+ gcvFEATURE_BUG_FIXES11,
+ gcvFEATURE_SUPERTILED_TEXTURE,
+ gcvFEATURE_2D_NO_COLORBRUSH_INDEX8,
+ gcvFEATURE_RS_YUV_TARGET,
+ gcvFEATURE_2D_FC_SOURCE,
+ gcvFEATURE_PE_DITHER_FIX,
+ gcvFEATURE_2D_YUV_SEPARATE_STRIDE,
+ gcvFEATURE_FRUSTUM_CLIP_FIX,
+ gcvFEATURE_TEXTURE_LINEAR,
+ gcvFEATURE_TEXTURE_YUV_ASSEMBLER,
+ gcvFEATURE_DYNAMIC_FREQUENCY_SCALING,
+ gcvFEATURE_BUGFIX15,
+ gcvFEATURE_2D_MIRROR_EXTENSION,
+ gcvFEATURE_ELEMENT_INDEX_UINT,
+}
+gceFEATURE;
+
+/* Chip Power Status. */
+typedef enum _gceCHIPPOWERSTATE
+{
+ gcvPOWER_ON = 0,
+ gcvPOWER_OFF,
+ gcvPOWER_IDLE,
+ gcvPOWER_SUSPEND,
+ gcvPOWER_SUSPEND_ATPOWERON,
+ gcvPOWER_OFF_ATPOWERON,
+ gcvPOWER_IDLE_BROADCAST,
+ gcvPOWER_SUSPEND_BROADCAST,
+ gcvPOWER_OFF_BROADCAST,
+ gcvPOWER_OFF_RECOVERY,
+ gcvPOWER_OFF_TIMEOUT,
+ gcvPOWER_ON_AUTO
+}
+gceCHIPPOWERSTATE;
+
+/* CPU cache operations */
+typedef enum _gceCACHEOPERATION
+{
+ gcvCACHE_CLEAN = 0x01,
+ gcvCACHE_INVALIDATE = 0x02,
+ gcvCACHE_FLUSH = gcvCACHE_CLEAN | gcvCACHE_INVALIDATE,
+ gcvCACHE_MEMORY_BARRIER = 0x04
+}
+gceCACHEOPERATION;
+
+typedef enum _gceVIDMEM_NODE_SHARED_INFO_TYPE
+{
+ gcvVIDMEM_INFO_GENERIC,
+ gcvVIDMEM_INFO_DIRTY_RECTANGLE
+}
+gceVIDMEM_NODE_SHARED_INFO_TYPE;
+
+/* Surface types. */
+typedef enum _gceSURF_TYPE
+{
+ gcvSURF_TYPE_UNKNOWN = 0,
+ gcvSURF_INDEX,
+ gcvSURF_VERTEX,
+ gcvSURF_TEXTURE,
+ gcvSURF_RENDER_TARGET,
+ gcvSURF_DEPTH,
+ gcvSURF_BITMAP,
+ gcvSURF_TILE_STATUS,
+ gcvSURF_IMAGE,
+ gcvSURF_MASK,
+ gcvSURF_SCISSOR,
+ gcvSURF_HIERARCHICAL_DEPTH,
+ gcvSURF_NUM_TYPES, /* Make sure this is the last one! */
+
+ /* Combinations. */
+ gcvSURF_NO_TILE_STATUS = 0x100,
+ gcvSURF_NO_VIDMEM = 0x200, /* Used to allocate surfaces with no underlying vidmem node.
+ In Android, vidmem node is allocated by another process. */
+ gcvSURF_CACHEABLE = 0x400, /* Used to allocate a cacheable surface */
+#if gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST
+ gcvSURF_FLIP = 0x800, /* The Resolve Target the will been flip resolve from RT */
+#endif
+ gcvSURF_TILE_STATUS_DIRTY = 0x1000, /* Init tile status to all dirty */
+
+ gcvSURF_RENDER_TARGET_NO_TILE_STATUS = gcvSURF_RENDER_TARGET
+ | gcvSURF_NO_TILE_STATUS,
+
+ gcvSURF_RENDER_TARGET_TS_DIRTY = gcvSURF_RENDER_TARGET
+ | gcvSURF_TILE_STATUS_DIRTY,
+
+ gcvSURF_DEPTH_NO_TILE_STATUS = gcvSURF_DEPTH
+ | gcvSURF_NO_TILE_STATUS,
+
+ /* Supported surface types with no vidmem node. */
+ gcvSURF_BITMAP_NO_VIDMEM = gcvSURF_BITMAP
+ | gcvSURF_NO_VIDMEM,
+
+ gcvSURF_TEXTURE_NO_VIDMEM = gcvSURF_TEXTURE
+ | gcvSURF_NO_VIDMEM,
+
+ /* Cacheable surface types with no vidmem node. */
+ gcvSURF_CACHEABLE_BITMAP_NO_VIDMEM = gcvSURF_BITMAP_NO_VIDMEM
+ | gcvSURF_CACHEABLE,
+
+ gcvSURF_CACHEABLE_BITMAP = gcvSURF_BITMAP
+ | gcvSURF_CACHEABLE,
+
+#if gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST
+ gcvSURF_FLIP_BITMAP = gcvSURF_BITMAP
+ | gcvSURF_FLIP,
+#endif
+}
+gceSURF_TYPE;
+
+typedef enum _gceSURF_USAGE
+{
+ gcvSURF_USAGE_UNKNOWN,
+ gcvSURF_USAGE_RESOLVE_AFTER_CPU,
+ gcvSURF_USAGE_RESOLVE_AFTER_3D
+}
+gceSURF_USAGE;
+
+typedef enum _gceSURF_COLOR_TYPE
+{
+ gcvSURF_COLOR_UNKNOWN = 0,
+ gcvSURF_COLOR_LINEAR = 0x01,
+ gcvSURF_COLOR_ALPHA_PRE = 0x02,
+}
+gceSURF_COLOR_TYPE;
+
+/* Rotation. */
+typedef enum _gceSURF_ROTATION
+{
+ gcvSURF_0_DEGREE = 0,
+ gcvSURF_90_DEGREE,
+ gcvSURF_180_DEGREE,
+ gcvSURF_270_DEGREE,
+ gcvSURF_FLIP_X,
+ gcvSURF_FLIP_Y,
+}
+gceSURF_ROTATION;
+
+typedef enum _gceMIPMAP_IMAGE_FORMAT
+{
+ gcvUNKNOWN_MIPMAP_IMAGE_FORMAT = -2
+}
+gceMIPMAP_IMAGE_FORMAT;
+
+
+/* Surface formats. */
+typedef enum _gceSURF_FORMAT
+{
+ /* Unknown format. */
+ gcvSURF_UNKNOWN = 0,
+
+ /* Palettized formats. */
+ gcvSURF_INDEX1 = 100,
+ gcvSURF_INDEX4,
+ gcvSURF_INDEX8,
+
+ /* RGB formats. */
+ gcvSURF_A2R2G2B2 = 200,
+ gcvSURF_R3G3B2,
+ gcvSURF_A8R3G3B2,
+ gcvSURF_X4R4G4B4,
+ gcvSURF_A4R4G4B4,
+ gcvSURF_R4G4B4A4,
+ gcvSURF_X1R5G5B5,
+ gcvSURF_A1R5G5B5,
+ gcvSURF_R5G5B5A1,
+ gcvSURF_R5G6B5,
+ gcvSURF_R8G8B8,
+ gcvSURF_X8R8G8B8,
+ gcvSURF_A8R8G8B8,
+ gcvSURF_R8G8B8A8,
+ gcvSURF_G8R8G8B8,
+ gcvSURF_R8G8B8G8,
+ gcvSURF_X2R10G10B10,
+ gcvSURF_A2R10G10B10,
+ gcvSURF_X12R12G12B12,
+ gcvSURF_A12R12G12B12,
+ gcvSURF_X16R16G16B16,
+ gcvSURF_A16R16G16B16,
+ gcvSURF_A32R32G32B32,
+ gcvSURF_R8G8B8X8,
+ gcvSURF_R5G5B5X1,
+ gcvSURF_R4G4B4X4,
+
+ /* BGR formats. */
+ gcvSURF_A4B4G4R4 = 300,
+ gcvSURF_A1B5G5R5,
+ gcvSURF_B5G6R5,
+ gcvSURF_B8G8R8,
+ gcvSURF_B16G16R16,
+ gcvSURF_X8B8G8R8,
+ gcvSURF_A8B8G8R8,
+ gcvSURF_A2B10G10R10,
+ gcvSURF_X16B16G16R16,
+ gcvSURF_A16B16G16R16,
+ gcvSURF_B32G32R32,
+ gcvSURF_X32B32G32R32,
+ gcvSURF_A32B32G32R32,
+ gcvSURF_B4G4R4A4,
+ gcvSURF_B5G5R5A1,
+ gcvSURF_B8G8R8X8,
+ gcvSURF_B8G8R8A8,
+ gcvSURF_X4B4G4R4,
+ gcvSURF_X1B5G5R5,
+ gcvSURF_B4G4R4X4,
+ gcvSURF_B5G5R5X1,
+ gcvSURF_X2B10G10R10,
+
+ /* Compressed formats. */
+ gcvSURF_DXT1 = 400,
+ gcvSURF_DXT2,
+ gcvSURF_DXT3,
+ gcvSURF_DXT4,
+ gcvSURF_DXT5,
+ gcvSURF_CXV8U8,
+ gcvSURF_ETC1,
+ gcvSURF_R11_EAC,
+ gcvSURF_SIGNED_R11_EAC,
+ gcvSURF_RG11_EAC,
+ gcvSURF_SIGNED_RG11_EAC,
+ gcvSURF_RGB8_ETC2,
+ gcvSURF_SRGB8_ETC2,
+ gcvSURF_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
+ gcvSURF_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
+ gcvSURF_RGBA8_ETC2_EAC,
+ gcvSURF_SRGB8_ALPHA8_ETC2_EAC,
+
+ /* YUV formats. */
+ gcvSURF_YUY2 = 500,
+ gcvSURF_UYVY,
+ gcvSURF_YV12,
+ gcvSURF_I420,
+ gcvSURF_NV12,
+ gcvSURF_NV21,
+ gcvSURF_NV16,
+ gcvSURF_NV61,
+ gcvSURF_YVYU,
+ gcvSURF_VYUY,
+
+ /* Depth formats. */
+ gcvSURF_D16 = 600,
+ gcvSURF_D24S8,
+ gcvSURF_D32,
+ gcvSURF_D24X8,
+
+ /* Alpha formats. */
+ gcvSURF_A4 = 700,
+ gcvSURF_A8,
+ gcvSURF_A12,
+ gcvSURF_A16,
+ gcvSURF_A32,
+ gcvSURF_A1,
+
+ /* Luminance formats. */
+ gcvSURF_L4 = 800,
+ gcvSURF_L8,
+ gcvSURF_L12,
+ gcvSURF_L16,
+ gcvSURF_L32,
+ gcvSURF_L1,
+
+ /* Alpha/Luminance formats. */
+ gcvSURF_A4L4 = 900,
+ gcvSURF_A2L6,
+ gcvSURF_A8L8,
+ gcvSURF_A4L12,
+ gcvSURF_A12L12,
+ gcvSURF_A16L16,
+
+ /* Bump formats. */
+ gcvSURF_L6V5U5 = 1000,
+ gcvSURF_V8U8,
+ gcvSURF_X8L8V8U8,
+ gcvSURF_Q8W8V8U8,
+ gcvSURF_A2W10V10U10,
+ gcvSURF_V16U16,
+ gcvSURF_Q16W16V16U16,
+
+ /* R/RG/RA formats. */
+ gcvSURF_R8 = 1100,
+ gcvSURF_X8R8,
+ gcvSURF_G8R8,
+ gcvSURF_X8G8R8,
+ gcvSURF_A8R8,
+ gcvSURF_R16,
+ gcvSURF_X16R16,
+ gcvSURF_G16R16,
+ gcvSURF_X16G16R16,
+ gcvSURF_A16R16,
+ gcvSURF_R32,
+ gcvSURF_X32R32,
+ gcvSURF_G32R32,
+ gcvSURF_X32G32R32,
+ gcvSURF_A32R32,
+ gcvSURF_RG16,
+
+ /* Floating point formats. */
+ gcvSURF_R16F = 1200,
+ gcvSURF_X16R16F,
+ gcvSURF_G16R16F,
+ gcvSURF_X16G16R16F,
+ gcvSURF_B16G16R16F,
+ gcvSURF_X16B16G16R16F,
+ gcvSURF_A16B16G16R16F,
+ gcvSURF_R32F,
+ gcvSURF_X32R32F,
+ gcvSURF_G32R32F,
+ gcvSURF_X32G32R32F,
+ gcvSURF_B32G32R32F,
+ gcvSURF_X32B32G32R32F,
+ gcvSURF_A32B32G32R32F,
+ gcvSURF_A16F,
+ gcvSURF_L16F,
+ gcvSURF_A16L16F,
+ gcvSURF_A16R16F,
+ gcvSURF_A32F,
+ gcvSURF_L32F,
+ gcvSURF_A32L32F,
+ gcvSURF_A32R32F,
+
+}
+gceSURF_FORMAT;
+
+/* Pixel swizzle modes. */
+typedef enum _gceSURF_SWIZZLE
+{
+ gcvSURF_NOSWIZZLE = 0,
+ gcvSURF_ARGB,
+ gcvSURF_ABGR,
+ gcvSURF_RGBA,
+ gcvSURF_BGRA
+}
+gceSURF_SWIZZLE;
+
+/* Transparency modes. */
+typedef enum _gceSURF_TRANSPARENCY
+{
+ /* Valid only for PE 1.0 */
+ gcvSURF_OPAQUE = 0,
+ gcvSURF_SOURCE_MATCH,
+ gcvSURF_SOURCE_MASK,
+ gcvSURF_PATTERN_MASK,
+}
+gceSURF_TRANSPARENCY;
+
+/* Surface Alignment. */
+typedef enum _gceSURF_ALIGNMENT
+{
+ gcvSURF_FOUR = 0,
+ gcvSURF_SIXTEEN,
+ gcvSURF_SUPER_TILED,
+ gcvSURF_SPLIT_TILED,
+ gcvSURF_SPLIT_SUPER_TILED,
+}
+gceSURF_ALIGNMENT;
+
+
+/* Surface Addressing. */
+typedef enum _gceSURF_ADDRESSING
+{
+ gcvSURF_NO_STRIDE_TILED = 0,
+ gcvSURF_NO_STRIDE_LINEAR,
+ gcvSURF_STRIDE_TILED,
+ gcvSURF_STRIDE_LINEAR
+}
+gceSURF_ADDRESSING;
+
+/* Transparency modes. */
+typedef enum _gce2D_TRANSPARENCY
+{
+ /* Valid only for PE 2.0 */
+ gcv2D_OPAQUE = 0,
+ gcv2D_KEYED,
+ gcv2D_MASKED
+}
+gce2D_TRANSPARENCY;
+
+/* Mono packing modes. */
+typedef enum _gceSURF_MONOPACK
+{
+ gcvSURF_PACKED8 = 0,
+ gcvSURF_PACKED16,
+ gcvSURF_PACKED32,
+ gcvSURF_UNPACKED,
+}
+gceSURF_MONOPACK;
+
+/* Blending modes. */
+typedef enum _gceSURF_BLEND_MODE
+{
+ /* Porter-Duff blending modes. */
+ /* Fsrc Fdst */
+ gcvBLEND_CLEAR = 0, /* 0 0 */
+ gcvBLEND_SRC, /* 1 0 */
+ gcvBLEND_DST, /* 0 1 */
+ gcvBLEND_SRC_OVER_DST, /* 1 1 - Asrc */
+ gcvBLEND_DST_OVER_SRC, /* 1 - Adst 1 */
+ gcvBLEND_SRC_IN_DST, /* Adst 0 */
+ gcvBLEND_DST_IN_SRC, /* 0 Asrc */
+ gcvBLEND_SRC_OUT_DST, /* 1 - Adst 0 */
+ gcvBLEND_DST_OUT_SRC, /* 0 1 - Asrc */
+ gcvBLEND_SRC_ATOP_DST, /* Adst 1 - Asrc */
+ gcvBLEND_DST_ATOP_SRC, /* 1 - Adst Asrc */
+ gcvBLEND_SRC_XOR_DST, /* 1 - Adst 1 - Asrc */
+
+ /* Special blending modes. */
+ gcvBLEND_SET, /* DST = 1 */
+ gcvBLEND_SUB /* DST = DST * (1 - SRC) */
+}
+gceSURF_BLEND_MODE;
+
+/* Per-pixel alpha modes. */
+typedef enum _gceSURF_PIXEL_ALPHA_MODE
+{
+ gcvSURF_PIXEL_ALPHA_STRAIGHT = 0,
+ gcvSURF_PIXEL_ALPHA_INVERSED
+}
+gceSURF_PIXEL_ALPHA_MODE;
+
+/* Global alpha modes. */
+typedef enum _gceSURF_GLOBAL_ALPHA_MODE
+{
+ gcvSURF_GLOBAL_ALPHA_OFF = 0,
+ gcvSURF_GLOBAL_ALPHA_ON,
+ gcvSURF_GLOBAL_ALPHA_SCALE
+}
+gceSURF_GLOBAL_ALPHA_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gceSURF_PIXEL_COLOR_MODE
+{
+ gcvSURF_COLOR_STRAIGHT = 0,
+ gcvSURF_COLOR_MULTIPLY
+}
+gceSURF_PIXEL_COLOR_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_PIXEL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_COLOR_MULTIPLY_DISABLE = 0,
+ gcv2D_COLOR_MULTIPLY_ENABLE
+}
+gce2D_PIXEL_COLOR_MULTIPLY_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_GLOBAL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_GLOBAL_COLOR_MULTIPLY_DISABLE = 0,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_ALPHA,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_COLOR
+}
+gce2D_GLOBAL_COLOR_MULTIPLY_MODE;
+
+/* Alpha blending factor modes. */
+typedef enum _gceSURF_BLEND_FACTOR_MODE
+{
+ gcvSURF_BLEND_ZERO = 0,
+ gcvSURF_BLEND_ONE,
+ gcvSURF_BLEND_STRAIGHT,
+ gcvSURF_BLEND_INVERSED,
+ gcvSURF_BLEND_COLOR,
+ gcvSURF_BLEND_COLOR_INVERSED,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED,
+ gcvSURF_BLEND_STRAIGHT_NO_CROSS,
+ gcvSURF_BLEND_INVERSED_NO_CROSS,
+ gcvSURF_BLEND_COLOR_NO_CROSS,
+ gcvSURF_BLEND_COLOR_INVERSED_NO_CROSS,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED_CROSS
+}
+gceSURF_BLEND_FACTOR_MODE;
+
+/* Alpha blending porter duff rules. */
+typedef enum _gce2D_PORTER_DUFF_RULE
+{
+ gcvPD_CLEAR = 0,
+ gcvPD_SRC,
+ gcvPD_SRC_OVER,
+ gcvPD_DST_OVER,
+ gcvPD_SRC_IN,
+ gcvPD_DST_IN,
+ gcvPD_SRC_OUT,
+ gcvPD_DST_OUT,
+ gcvPD_SRC_ATOP,
+ gcvPD_DST_ATOP,
+ gcvPD_ADD,
+ gcvPD_XOR,
+ gcvPD_DST
+}
+gce2D_PORTER_DUFF_RULE;
+
+/* Alpha blending factor modes. */
+typedef enum _gce2D_YUV_COLOR_MODE
+{
+ gcv2D_YUV_601= 0,
+ gcv2D_YUV_709
+}
+gce2D_YUV_COLOR_MODE;
+
+/* 2D Rotation and flipping. */
+typedef enum _gce2D_ORIENTATION
+{
+ gcv2D_0_DEGREE = 0,
+ gcv2D_90_DEGREE,
+ gcv2D_180_DEGREE,
+ gcv2D_270_DEGREE,
+ gcv2D_X_FLIP,
+ gcv2D_Y_FLIP
+}
+gce2D_ORIENTATION;
+
+typedef enum _gce2D_COMMAND
+{
+ gcv2D_CLEAR = 0,
+ gcv2D_LINE,
+ gcv2D_BLT,
+ gcv2D_STRETCH,
+ gcv2D_HOR_FILTER,
+ gcv2D_VER_FILTER,
+ gcv2D_MULTI_SOURCE_BLT,
+}
+gce2D_COMMAND;
+
+typedef enum _gce2D_TILE_STATUS_CONFIG
+{
+ gcv2D_TSC_DISABLE = 0,
+ gcv2D_TSC_ENABLE = 0x00000001,
+ gcv2D_TSC_COMPRESSED = 0x00000002,
+ gcv2D_TSC_DOWN_SAMPLER = 0x00000004,
+}
+gce2D_TILE_STATUS_CONFIG;
+
+typedef enum _gce2D_QUERY
+{
+ gcv2D_QUERY_RGB_ADDRESS_MAX_ALIGN = 0,
+ gcv2D_QUERY_RGB_STRIDE_MAX_ALIGN,
+ gcv2D_QUERY_YUV_ADDRESS_MAX_ALIGN,
+ gcv2D_QUERY_YUV_STRIDE_MAX_ALIGN,
+}
+gce2D_QUERY;
+
+typedef enum _gce2D_STATE
+{
+ gcv2D_STATE_SPECIAL_FILTER_MIRROR_MODE = 1,
+}
+gce2D_STATE;
+
+#ifndef VIVANTE_NO_3D
+/* Texture functions. */
+typedef enum _gceTEXTURE_FUNCTION
+{
+ gcvTEXTURE_DUMMY = 0,
+ gcvTEXTURE_REPLACE = 0,
+ gcvTEXTURE_MODULATE,
+ gcvTEXTURE_ADD,
+ gcvTEXTURE_ADD_SIGNED,
+ gcvTEXTURE_INTERPOLATE,
+ gcvTEXTURE_SUBTRACT,
+ gcvTEXTURE_DOT3
+}
+gceTEXTURE_FUNCTION;
+
+/* Texture sources. */
+typedef enum _gceTEXTURE_SOURCE
+{
+ gcvCOLOR_FROM_TEXTURE = 0,
+ gcvCOLOR_FROM_CONSTANT_COLOR,
+ gcvCOLOR_FROM_PRIMARY_COLOR,
+ gcvCOLOR_FROM_PREVIOUS_COLOR
+}
+gceTEXTURE_SOURCE;
+
+/* Texture source channels. */
+typedef enum _gceTEXTURE_CHANNEL
+{
+ gcvFROM_COLOR = 0,
+ gcvFROM_ONE_MINUS_COLOR,
+ gcvFROM_ALPHA,
+ gcvFROM_ONE_MINUS_ALPHA
+}
+gceTEXTURE_CHANNEL;
+#endif /* VIVANTE_NO_3D */
+
+/* Filter types. */
+typedef enum _gceFILTER_TYPE
+{
+ gcvFILTER_SYNC = 0,
+ gcvFILTER_BLUR,
+ gcvFILTER_USER
+}
+gceFILTER_TYPE;
+
+/* Filter pass types. */
+typedef enum _gceFILTER_PASS_TYPE
+{
+ gcvFILTER_HOR_PASS = 0,
+ gcvFILTER_VER_PASS
+}
+gceFILTER_PASS_TYPE;
+
+/* Endian hints. */
+typedef enum _gceENDIAN_HINT
+{
+ gcvENDIAN_NO_SWAP = 0,
+ gcvENDIAN_SWAP_WORD,
+ gcvENDIAN_SWAP_DWORD
+}
+gceENDIAN_HINT;
+
+/* Tiling modes. */
+typedef enum _gceTILING
+{
+ gcvLINEAR = 0,
+ gcvTILED,
+ gcvSUPERTILED,
+ gcvMULTI_TILED,
+ gcvMULTI_SUPERTILED,
+ gcvMINORTILED,
+}
+gceTILING;
+
+/* 2D pattern type. */
+typedef enum _gce2D_PATTERN
+{
+ gcv2D_PATTERN_SOLID = 0,
+ gcv2D_PATTERN_MONO,
+ gcv2D_PATTERN_COLOR,
+ gcv2D_PATTERN_INVALID
+}
+gce2D_PATTERN;
+
+/* 2D source type. */
+typedef enum _gce2D_SOURCE
+{
+ gcv2D_SOURCE_MASKED = 0,
+ gcv2D_SOURCE_MONO,
+ gcv2D_SOURCE_COLOR,
+ gcv2D_SOURCE_INVALID
+}
+gce2D_SOURCE;
+
+/* Pipes. */
+typedef enum _gcePIPE_SELECT
+{
+ gcvPIPE_INVALID = ~0,
+ gcvPIPE_3D = 0,
+ gcvPIPE_2D
+}
+gcePIPE_SELECT;
+
+/* Hardware type. */
+typedef enum _gceHARDWARE_TYPE
+{
+ gcvHARDWARE_INVALID = 0x00,
+ gcvHARDWARE_3D = 0x01,
+ gcvHARDWARE_2D = 0x02,
+ gcvHARDWARE_VG = 0x04,
+
+ gcvHARDWARE_3D2D = gcvHARDWARE_3D | gcvHARDWARE_2D
+}
+gceHARDWARE_TYPE;
+
+#define gcdCHIP_COUNT 3
+
+typedef enum _gceMMU_MODE
+{
+ gcvMMU_MODE_1K,
+ gcvMMU_MODE_4K,
+} gceMMU_MODE;
+
+/* User signal command codes. */
+typedef enum _gceUSER_SIGNAL_COMMAND_CODES
+{
+ gcvUSER_SIGNAL_CREATE,
+ gcvUSER_SIGNAL_DESTROY,
+ gcvUSER_SIGNAL_SIGNAL,
+ gcvUSER_SIGNAL_WAIT,
+ gcvUSER_SIGNAL_MAP,
+ gcvUSER_SIGNAL_UNMAP,
+}
+gceUSER_SIGNAL_COMMAND_CODES;
+
+/* Event locations. */
+typedef enum _gceKERNEL_WHERE
+{
+ gcvKERNEL_COMMAND,
+ gcvKERNEL_VERTEX,
+ gcvKERNEL_TRIANGLE,
+ gcvKERNEL_TEXTURE,
+ gcvKERNEL_PIXEL,
+}
+gceKERNEL_WHERE;
+
+#if gcdENABLE_VG
+/* Hardware blocks. */
+typedef enum _gceBLOCK
+{
+ gcvBLOCK_COMMAND,
+ gcvBLOCK_TESSELLATOR,
+ gcvBLOCK_TESSELLATOR2,
+ gcvBLOCK_TESSELLATOR3,
+ gcvBLOCK_RASTER,
+ gcvBLOCK_VG,
+ gcvBLOCK_VG2,
+ gcvBLOCK_VG3,
+ gcvBLOCK_PIXEL,
+
+ /* Number of defined blocks. */
+ gcvBLOCK_COUNT
+}
+gceBLOCK;
+#endif
+
+/* gcdDUMP message type. */
+typedef enum _gceDEBUG_MESSAGE_TYPE
+{
+ gcvMESSAGE_TEXT,
+ gcvMESSAGE_DUMP
+}
+gceDEBUG_MESSAGE_TYPE;
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gckCONTEXT * gckCONTEXT;
+typedef struct _gcoCMDBUF * gcoCMDBUF;
+typedef struct _gcsSTATE_DELTA * gcsSTATE_DELTA_PTR;
+typedef struct _gcsQUEUE * gcsQUEUE_PTR;
+typedef struct _gcoQUEUE * gcoQUEUE;
+typedef struct _gcsHAL_INTERFACE * gcsHAL_INTERFACE_PTR;
+typedef struct _gcs2D_PROFILE * gcs2D_PROFILE_PTR;
+
+#if gcdENABLE_VG
+typedef struct _gcoVGHARDWARE * gcoVGHARDWARE;
+typedef struct _gcoVGBUFFER * gcoVGBUFFER;
+typedef struct _gckVGHARDWARE * gckVGHARDWARE;
+typedef struct _gcsVGCONTEXT * gcsVGCONTEXT_PTR;
+typedef struct _gcsVGCONTEXT_MAP * gcsVGCONTEXT_MAP_PTR;
+typedef struct _gcsVGCMDQUEUE * gcsVGCMDQUEUE_PTR;
+typedef struct _gcsTASK_MASTER_TABLE * gcsTASK_MASTER_TABLE_PTR;
+typedef struct _gckVGKERNEL * gckVGKERNEL;
+typedef void * gctTHREAD;
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_enum_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_kernel.h b/src/include_imx6_v4_0_0/gc_hal_kernel.h
new file mode 100644
index 0000000..1da80b7
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_kernel.h
@@ -0,0 +1,981 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_kernel_h_
+#define __gc_hal_kernel_h_
+
+#include "gc_hal.h"
+#include "gc_hal_kernel_hardware.h"
+#include "gc_hal_driver.h"
+
+#if gcdENABLE_VG
+#include "gc_hal_kernel_vg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*******************************************************************************
+***** New MMU Defination *******************************************************/
+#define gcdMMU_MTLB_SHIFT 22
+#define gcdMMU_STLB_4K_SHIFT 12
+#define gcdMMU_STLB_64K_SHIFT 16
+
+#define gcdMMU_MTLB_BITS (32 - gcdMMU_MTLB_SHIFT)
+#define gcdMMU_PAGE_4K_BITS gcdMMU_STLB_4K_SHIFT
+#define gcdMMU_STLB_4K_BITS (32 - gcdMMU_MTLB_BITS - gcdMMU_PAGE_4K_BITS)
+#define gcdMMU_PAGE_64K_BITS gcdMMU_STLB_64K_SHIFT
+#define gcdMMU_STLB_64K_BITS (32 - gcdMMU_MTLB_BITS - gcdMMU_PAGE_64K_BITS)
+
+#define gcdMMU_MTLB_ENTRY_NUM (1 << gcdMMU_MTLB_BITS)
+#define gcdMMU_MTLB_SIZE (gcdMMU_MTLB_ENTRY_NUM << 2)
+#define gcdMMU_STLB_4K_ENTRY_NUM (1 << gcdMMU_STLB_4K_BITS)
+#define gcdMMU_STLB_4K_SIZE (gcdMMU_STLB_4K_ENTRY_NUM << 2)
+#define gcdMMU_PAGE_4K_SIZE (1 << gcdMMU_STLB_4K_SHIFT)
+#define gcdMMU_STLB_64K_ENTRY_NUM (1 << gcdMMU_STLB_64K_BITS)
+#define gcdMMU_STLB_64K_SIZE (gcdMMU_STLB_64K_ENTRY_NUM << 2)
+#define gcdMMU_PAGE_64K_SIZE (1 << gcdMMU_STLB_64K_SHIFT)
+
+#define gcdMMU_MTLB_MASK (~((1U << gcdMMU_MTLB_SHIFT)-1))
+#define gcdMMU_STLB_4K_MASK ((~0U << gcdMMU_STLB_4K_SHIFT) ^ gcdMMU_MTLB_MASK)
+#define gcdMMU_PAGE_4K_MASK (gcdMMU_PAGE_4K_SIZE - 1)
+#define gcdMMU_STLB_64K_MASK ((~((1U << gcdMMU_STLB_64K_SHIFT)-1)) ^ gcdMMU_MTLB_MASK)
+#define gcdMMU_PAGE_64K_MASK (gcdMMU_PAGE_64K_SIZE - 1)
+
+/* Page offset definitions. */
+#define gcdMMU_OFFSET_4K_BITS (32 - gcdMMU_MTLB_BITS - gcdMMU_STLB_4K_BITS)
+#define gcdMMU_OFFSET_4K_MASK ((1U << gcdMMU_OFFSET_4K_BITS) - 1)
+#define gcdMMU_OFFSET_16K_BITS (32 - gcdMMU_MTLB_BITS - gcdMMU_STLB_16K_BITS)
+#define gcdMMU_OFFSET_16K_MASK ((1U << gcdMMU_OFFSET_16K_BITS) - 1)
+
+/*******************************************************************************
+***** Process Secure Cache ****************************************************/
+
+#define gcdSECURE_CACHE_LRU 1
+#define gcdSECURE_CACHE_LINEAR 2
+#define gcdSECURE_CACHE_HASH 3
+#define gcdSECURE_CACHE_TABLE 4
+
+typedef struct _gcskLOGICAL_CACHE * gcskLOGICAL_CACHE_PTR;
+typedef struct _gcskLOGICAL_CACHE gcskLOGICAL_CACHE;
+struct _gcskLOGICAL_CACHE
+{
+ /* Logical address. */
+ gctPOINTER logical;
+
+ /* DMAable address. */
+ gctUINT32 dma;
+
+#if gcdSECURE_CACHE_METHOD == gcdSECURE_CACHE_HASH
+ /* Pointer to the previous and next hash tables. */
+ gcskLOGICAL_CACHE_PTR nextHash;
+ gcskLOGICAL_CACHE_PTR prevHash;
+#endif
+
+#if gcdSECURE_CACHE_METHOD != gcdSECURE_CACHE_TABLE
+ /* Pointer to the previous and next slot. */
+ gcskLOGICAL_CACHE_PTR next;
+ gcskLOGICAL_CACHE_PTR prev;
+#endif
+
+#if gcdSECURE_CACHE_METHOD == gcdSECURE_CACHE_LINEAR
+ /* Time stamp. */
+ gctUINT64 stamp;
+#endif
+};
+
+typedef struct _gcskSECURE_CACHE * gcskSECURE_CACHE_PTR;
+typedef struct _gcskSECURE_CACHE
+{
+ /* Cache memory. */
+ gcskLOGICAL_CACHE cache[1 + gcdSECURE_CACHE_SLOTS];
+
+ /* Last known index for LINEAR mode. */
+ gcskLOGICAL_CACHE_PTR cacheIndex;
+
+ /* Current free slot for LINEAR mode. */
+ gctUINT32 cacheFree;
+
+ /* Time stamp for LINEAR mode. */
+ gctUINT64 cacheStamp;
+
+#if gcdSECURE_CACHE_METHOD == gcdSECURE_CACHE_HASH
+ /* Hash table for HASH mode. */
+ gcskLOGICAL_CACHE hash[256];
+#endif
+}
+gcskSECURE_CACHE;
+
+/*******************************************************************************
+***** Process Database Management *********************************************/
+
+typedef enum _gceDATABASE_TYPE
+{
+ gcvDB_VIDEO_MEMORY = 1, /* Video memory created. */
+ gcvDB_COMMAND_BUFFER, /* Command Buffer. */
+ gcvDB_NON_PAGED, /* Non paged memory. */
+ gcvDB_CONTIGUOUS, /* Contiguous memory. */
+ gcvDB_SIGNAL, /* Signal. */
+ gcvDB_VIDEO_MEMORY_LOCKED, /* Video memory locked. */
+ gcvDB_CONTEXT, /* Context */
+ gcvDB_IDLE, /* GPU idle. */
+ gcvDB_MAP_MEMORY, /* Map memory */
+ gcvDB_SHARED_INFO, /* Private data */
+ gcvDB_MAP_USER_MEMORY /* Map user memory */
+}
+gceDATABASE_TYPE;
+
+typedef struct _gcsDATABASE_RECORD * gcsDATABASE_RECORD_PTR;
+typedef struct _gcsDATABASE_RECORD
+{
+ /* Pointer to kernel. */
+ gckKERNEL kernel;
+
+ /* Pointer to next database record. */
+ gcsDATABASE_RECORD_PTR next;
+
+ /* Type of record. */
+ gceDATABASE_TYPE type;
+
+ /* Data for record. */
+ gctPOINTER data;
+ gctPHYS_ADDR physical;
+ gctSIZE_T bytes;
+}
+gcsDATABASE_RECORD;
+
+typedef struct _gcsDATABASE * gcsDATABASE_PTR;
+typedef struct _gcsDATABASE
+{
+ /* Pointer to next entry is hash list. */
+ gcsDATABASE_PTR next;
+ gctSIZE_T slot;
+
+ /* Process ID. */
+ gctUINT32 processID;
+
+ /* Sizes to query. */
+ gcsDATABASE_COUNTERS vidMem;
+ gcsDATABASE_COUNTERS nonPaged;
+ gcsDATABASE_COUNTERS contiguous;
+ gcsDATABASE_COUNTERS mapUserMemory;
+ gcsDATABASE_COUNTERS mapMemory;
+
+ /* Idle time management. */
+ gctUINT64 lastIdle;
+ gctUINT64 idle;
+
+ /* Pointer to database. */
+ gcsDATABASE_RECORD_PTR list;
+
+#if gcdSECURE_USER
+ /* Secure cache. */
+ gcskSECURE_CACHE cache;
+#endif
+
+ gctPOINTER handleDatabase;
+ gctPOINTER handleDatabaseMutex;
+}
+gcsDATABASE;
+
+/* Create a process database that will contain all its allocations. */
+gceSTATUS
+gckKERNEL_CreateProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID
+ );
+
+/* Add a record to the process database. */
+gceSTATUS
+gckKERNEL_AddProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID,
+ IN gceDATABASE_TYPE Type,
+ IN gctPOINTER Pointer,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Size
+ );
+
+/* Remove a record to the process database. */
+gceSTATUS
+gckKERNEL_RemoveProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID,
+ IN gceDATABASE_TYPE Type,
+ IN gctPOINTER Pointer
+ );
+
+/* Destroy the process database. */
+gceSTATUS
+gckKERNEL_DestroyProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID
+ );
+
+/* Find a record to the process database. */
+gceSTATUS
+gckKERNEL_FindProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID,
+ IN gctUINT32 ThreadID,
+ IN gceDATABASE_TYPE Type,
+ IN gctPOINTER Pointer,
+ OUT gcsDATABASE_RECORD_PTR Record
+ );
+
+/* Query the process database. */
+gceSTATUS
+gckKERNEL_QueryProcessDB(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID,
+ IN gctBOOL LastProcessID,
+ IN gceDATABASE_TYPE Type,
+ OUT gcuDATABASE_INFO * Info
+ );
+
+/* Dump the process database. */
+gceSTATUS
+gckKERNEL_DumpProcessDB(
+ IN gckKERNEL Kernel
+ );
+
+/* ID database */
+gceSTATUS
+gckKERNEL_CreateIntegerDatabase(
+ IN gckKERNEL Kernel,
+ OUT gctPOINTER * Database
+ );
+
+gceSTATUS
+gckKERNEL_DestroyIntegerDatabase(
+ IN gckKERNEL Kernel,
+ IN gctPOINTER Database
+ );
+
+gceSTATUS
+gckKERNEL_AllocateIntegerId(
+ IN gctPOINTER Database,
+ IN gctPOINTER Pointer,
+ OUT gctUINT32 * Id
+ );
+
+gceSTATUS
+gckKERNEL_FreeIntegerId(
+ IN gctPOINTER Database,
+ IN gctUINT32 Id
+ );
+
+gceSTATUS
+gckKERNEL_QueryIntegerId(
+ IN gctPOINTER Database,
+ IN gctUINT32 Id,
+ OUT gctPOINTER * Pointer
+ );
+
+gctUINT32
+gckKERNEL_AllocateNameFromPointer(
+ IN gckKERNEL Kernel,
+ IN gctPOINTER Pointer
+ );
+
+gctPOINTER
+gckKERNEL_QueryPointerFromName(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 Name
+ );
+
+gceSTATUS
+gckKERNEL_DeleteName(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 Name
+ );
+
+#if gcdSECURE_USER
+/* Get secure cache from the process database. */
+gceSTATUS
+gckKERNEL_GetProcessDBCache(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 ProcessID,
+ OUT gcskSECURE_CACHE_PTR * Cache
+ );
+#endif
+
+/*******************************************************************************
+********* Timer Management ****************************************************/
+typedef struct _gcsTIMER * gcsTIMER_PTR;
+typedef struct _gcsTIMER
+{
+ /* Start and Stop time holders. */
+ gctUINT64 startTime;
+ gctUINT64 stopTime;
+}
+gcsTIMER;
+
+/******************************************************************************\
+********************************** Structures **********************************
+\******************************************************************************/
+
+/* gckDB object. */
+struct _gckDB
+{
+ /* Database management. */
+ gcsDATABASE_PTR db[16];
+ gctPOINTER dbMutex;
+ gcsDATABASE_PTR freeDatabase;
+ gcsDATABASE_RECORD_PTR freeRecord;
+ gcsDATABASE_PTR lastDatabase;
+ gctUINT32 lastProcessID;
+ gctUINT64 lastIdle;
+ gctUINT64 idleTime;
+ gctUINT64 lastSlowdown;
+ gctUINT64 lastSlowdownIdle;
+ /* ID - Pointer database*/
+ gctPOINTER pointerDatabase;
+ gctPOINTER pointerDatabaseMutex;
+};
+
+#if gcdVIRTUAL_COMMAND_BUFFER
+typedef struct _gckVIRTUAL_COMMAND_BUFFER * gckVIRTUAL_COMMAND_BUFFER_PTR;
+typedef struct _gckVIRTUAL_COMMAND_BUFFER
+{
+ gctPHYS_ADDR physical;
+ gctPOINTER userLogical;
+ gctPOINTER kernelLogical;
+ gctSIZE_T pageCount;
+ gctPOINTER pageTable;
+ gctUINT32 gpuAddress;
+ gctUINT pid;
+ gckVIRTUAL_COMMAND_BUFFER_PTR next;
+ gckVIRTUAL_COMMAND_BUFFER_PTR prev;
+ gckKERNEL kernel;
+}
+gckVIRTUAL_COMMAND_BUFFER;
+#endif
+
+/* gckKERNEL object. */
+struct _gckKERNEL
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Core */
+ gceCORE core;
+
+ /* Pointer to gckHARDWARE object. */
+ gckHARDWARE hardware;
+
+ /* Pointer to gckCOMMAND object. */
+ gckCOMMAND command;
+
+ /* Pointer to gckEVENT object. */
+ gckEVENT eventObj;
+
+ /* Pointer to context. */
+ gctPOINTER context;
+
+ /* Pointer to gckMMU object. */
+ gckMMU mmu;
+
+ /* Arom holding number of clients. */
+ gctPOINTER atomClients;
+
+#if VIVANTE_PROFILER
+ /* Enable profiling */
+ gctBOOL profileEnable;
+
+ /* The profile file name */
+ gctCHAR profileFileName[gcdMAX_PROFILE_FILE_NAME];
+
+ /* Clear profile register or not*/
+ gctBOOL profileCleanRegister;
+
+#endif
+
+#ifdef QNX_SINGLE_THREADED_DEBUGGING
+ gctPOINTER debugMutex;
+#endif
+
+ /* Database management. */
+ gckDB db;
+ gctBOOL dbCreated;
+
+#if gcdENABLE_RECOVERY
+ gctPOINTER resetFlagClearTimer;
+ gctPOINTER resetAtom;
+ gctUINT64 resetTimeStamp;
+#endif
+
+ /* Pointer to gckEVENT object. */
+ gcsTIMER timers[8];
+ gctUINT32 timeOut;
+
+#if gcdENABLE_VG
+ gckVGKERNEL vg;
+#endif
+
+#if gcdVIRTUAL_COMMAND_BUFFER
+ gckVIRTUAL_COMMAND_BUFFER_PTR virtualBufferHead;
+ gckVIRTUAL_COMMAND_BUFFER_PTR virtualBufferTail;
+ gctPOINTER virtualBufferLock;
+#endif
+
+#if gcdDVFS
+ gckDVFS dvfs;
+#endif
+};
+
+struct _FrequencyHistory
+{
+ gctUINT32 frequency;
+ gctUINT32 count;
+};
+
+/* gckDVFS object. */
+struct _gckDVFS
+{
+ gckOS os;
+ gckHARDWARE hardware;
+ gctPOINTER timer;
+ gctUINT32 pollingTime;
+ gctBOOL stop;
+ gctUINT32 totalConfig;
+ gctUINT32 loads[8];
+ gctUINT8 currentScale;
+ struct _FrequencyHistory frequencyHistory[16];
+};
+
+/* gckCOMMAND object. */
+struct _gckCOMMAND
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to required object. */
+ gckKERNEL kernel;
+ gckOS os;
+
+ /* Number of bytes per page. */
+ gctSIZE_T pageSize;
+
+ /* Current pipe select. */
+ gcePIPE_SELECT pipeSelect;
+
+ /* Command queue running flag. */
+ gctBOOL running;
+
+ /* Idle flag and commit stamp. */
+ gctBOOL idle;
+ gctUINT64 commitStamp;
+
+ /* Command queue mutex. */
+ gctPOINTER mutexQueue;
+
+ /* Context switching mutex. */
+ gctPOINTER mutexContext;
+
+ /* Command queue power semaphore. */
+ gctPOINTER powerSemaphore;
+
+ /* Current command queue. */
+ struct _gcskCOMMAND_QUEUE
+ {
+ gctSIGNAL signal;
+ gctPHYS_ADDR physical;
+ gctPOINTER logical;
+ }
+ queues[gcdCOMMAND_QUEUES];
+
+ gctPHYS_ADDR physical;
+ gctPOINTER logical;
+ gctUINT32 offset;
+ gctINT index;
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+ gctUINT wrapCount;
+#endif
+
+ /* The command queue is new. */
+ gctBOOL newQueue;
+
+ /* Context management. */
+ gckCONTEXT currContext;
+
+ /* Pointer to last WAIT command. */
+ gctPHYS_ADDR waitPhysical;
+ gctPOINTER waitLogical;
+ gctSIZE_T waitSize;
+
+ /* Command buffer alignment. */
+ gctSIZE_T alignment;
+ gctSIZE_T reservedHead;
+ gctSIZE_T reservedTail;
+
+ /* Commit counter. */
+ gctPOINTER atomCommit;
+
+ /* Kernel process ID. */
+ gctUINT32 kernelProcessID;
+
+ /* End Event signal. */
+ gctSIGNAL endEventSignal;
+
+#if gcdSECURE_USER
+ /* Hint array copy buffer. */
+ gctBOOL hintArrayAllocated;
+ gctUINT hintArraySize;
+ gctUINT32_PTR hintArray;
+#endif
+};
+
+typedef struct _gcsEVENT * gcsEVENT_PTR;
+
+/* Structure holding one event to be processed. */
+typedef struct _gcsEVENT
+{
+ /* Pointer to next event in queue. */
+ gcsEVENT_PTR next;
+
+ /* Event information. */
+ gcsHAL_INTERFACE info;
+
+ /* Process ID owning the event. */
+ gctUINT32 processID;
+
+#ifdef __QNXNTO__
+ /* Kernel. */
+ gckKERNEL kernel;
+#endif
+
+ gctBOOL fromKernel;
+}
+gcsEVENT;
+
+/* Structure holding a list of events to be processed by an interrupt. */
+typedef struct _gcsEVENT_QUEUE * gcsEVENT_QUEUE_PTR;
+typedef struct _gcsEVENT_QUEUE
+{
+ /* Time stamp. */
+ gctUINT64 stamp;
+
+ /* Source of the event. */
+ gceKERNEL_WHERE source;
+
+ /* Pointer to head of event queue. */
+ gcsEVENT_PTR head;
+
+ /* Pointer to tail of event queue. */
+ gcsEVENT_PTR tail;
+
+ /* Next list of events. */
+ gcsEVENT_QUEUE_PTR next;
+}
+gcsEVENT_QUEUE;
+
+/*
+ gcdREPO_LIST_COUNT defines the maximum number of event queues with different
+ hardware module sources that may coexist at the same time. Only two sources
+ are supported - gcvKERNEL_COMMAND and gcvKERNEL_PIXEL. gcvKERNEL_COMMAND
+ source is used only for managing the kernel command queue and is only issued
+ when the current command queue gets full. Since we commit event queues every
+ time we commit command buffers, in the worst case we can have up to three
+ pending event queues:
+ - gcvKERNEL_PIXEL
+ - gcvKERNEL_COMMAND (queue overflow)
+ - gcvKERNEL_PIXEL
+*/
+#define gcdREPO_LIST_COUNT 3
+
+/* gckEVENT object. */
+struct _gckEVENT
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to required objects. */
+ gckOS os;
+ gckKERNEL kernel;
+
+ /* Time stamp. */
+ gctUINT64 stamp;
+ gctUINT64 lastCommitStamp;
+
+ /* Queue mutex. */
+ gctPOINTER eventQueueMutex;
+
+ /* Array of event queues. */
+ gcsEVENT_QUEUE queues[30];
+ gctUINT8 lastID;
+ gctPOINTER freeAtom;
+
+ /* Pending events. */
+#if gcdSMP
+ gctPOINTER pending;
+#else
+ volatile gctUINT pending;
+#endif
+
+ /* List of free event structures and its mutex. */
+ gcsEVENT_PTR freeEventList;
+ gctSIZE_T freeEventCount;
+ gctPOINTER freeEventMutex;
+
+ /* Event queues. */
+ gcsEVENT_QUEUE_PTR queueHead;
+ gcsEVENT_QUEUE_PTR queueTail;
+ gcsEVENT_QUEUE_PTR freeList;
+ gcsEVENT_QUEUE repoList[gcdREPO_LIST_COUNT];
+ gctPOINTER eventListMutex;
+
+ gctPOINTER submitTimer;
+};
+
+/* Free all events belonging to a process. */
+gceSTATUS
+gckEVENT_FreeProcess(
+ IN gckEVENT Event,
+ IN gctUINT32 ProcessID
+ );
+
+gceSTATUS
+gckEVENT_Stop(
+ IN gckEVENT Event,
+ IN gctUINT32 ProcessID,
+ IN gctPHYS_ADDR Handle,
+ IN gctPOINTER Logical,
+ IN gctSIGNAL Signal,
+ IN OUT gctSIZE_T * waitSize
+ );
+
+/* gcuVIDMEM_NODE structure. */
+typedef union _gcuVIDMEM_NODE
+{
+ /* Allocated from gckVIDMEM. */
+ struct _gcsVIDMEM_NODE_VIDMEM
+ {
+ /* Owner of this node. */
+ gckVIDMEM memory;
+
+ /* Dual-linked list of nodes. */
+ gcuVIDMEM_NODE_PTR next;
+ gcuVIDMEM_NODE_PTR prev;
+
+ /* Dual linked list of free nodes. */
+ gcuVIDMEM_NODE_PTR nextFree;
+ gcuVIDMEM_NODE_PTR prevFree;
+
+ /* Information for this node. */
+ gctUINT32 offset;
+ gctSIZE_T bytes;
+ gctUINT32 alignment;
+
+#ifdef __QNXNTO__
+ /* Client/server vaddr (mapped using mmap_join). */
+ gctPOINTER logical;
+#endif
+
+ /* Locked counter. */
+ gctINT32 locked;
+
+ /* Memory pool. */
+ gcePOOL pool;
+ gctUINT32 physical;
+
+ /* Process ID owning this memory. */
+ gctUINT32 processID;
+
+ /* Prevent compositor from freeing until client unlocks. */
+ gctBOOL freePending;
+
+ /* */
+ gcsVIDMEM_NODE_SHARED_INFO sharedInfo;
+
+#if gcdDYNAMIC_MAP_RESERVED_MEMORY && gcdENABLE_VG
+ gctPOINTER kernelVirtual;
+#endif
+ }
+ VidMem;
+
+ /* Allocated from gckOS. */
+ struct _gcsVIDMEM_NODE_VIRTUAL
+ {
+ /* Pointer to gckKERNEL object. */
+ gckKERNEL kernel;
+
+ /* Information for this node. */
+ /* Contiguously allocated? */
+ gctBOOL contiguous;
+ /* mdl record pointer... a kmalloc address. Process agnostic. */
+ gctPHYS_ADDR physical;
+ gctSIZE_T bytes;
+ /* do_mmap_pgoff address... mapped per-process. */
+ gctPOINTER logical;
+
+ /* Page table information. */
+ /* Used only when node is not contiguous */
+ gctSIZE_T pageCount;
+
+ /* Used only when node is not contiguous */
+ gctPOINTER pageTables[gcdMAX_GPU_COUNT];
+ /* Pointer to gckKERNEL object who lock this. */
+ gckKERNEL lockKernels[gcdMAX_GPU_COUNT];
+ /* Actual physical address */
+ gctUINT32 addresses[gcdMAX_GPU_COUNT];
+
+ /* Mutex. */
+ gctPOINTER mutex;
+
+ /* Locked counter. */
+ gctINT32 lockeds[gcdMAX_GPU_COUNT];
+
+#ifdef __QNXNTO__
+ /* Single linked list of nodes. */
+ gcuVIDMEM_NODE_PTR next;
+
+ /* Unlock pending flag. */
+ gctBOOL unlockPendings[gcdMAX_GPU_COUNT];
+
+ /* Free pending flag. */
+ gctBOOL freePending;
+#endif
+
+ /* Process ID owning this memory. */
+ gctUINT32 processID;
+
+ /* Owner process sets freed to true
+ * when it trys to free a locked
+ * node */
+ gctBOOL freed;
+
+ /* */
+ gcsVIDMEM_NODE_SHARED_INFO sharedInfo;
+ }
+ Virtual;
+}
+gcuVIDMEM_NODE;
+
+/* gckVIDMEM object. */
+struct _gckVIDMEM
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Information for this video memory heap. */
+ gctUINT32 baseAddress;
+ gctSIZE_T bytes;
+ gctSIZE_T freeBytes;
+
+ /* Mapping for each type of surface. */
+ gctINT mapping[gcvSURF_NUM_TYPES];
+
+ /* Sentinel nodes for up to 8 banks. */
+ gcuVIDMEM_NODE sentinel[8];
+
+ /* Allocation threshold. */
+ gctSIZE_T threshold;
+
+ /* The heap mutex. */
+ gctPOINTER mutex;
+
+#if gcdUSE_VIDMEM_PER_PID
+ /* The Pid this VidMem belongs to. */
+ gctUINT32 pid;
+
+ struct _gckVIDMEM* next;
+#endif
+};
+
+/* gckMMU object. */
+struct _gckMMU
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Pointer to gckHARDWARE object. */
+ gckHARDWARE hardware;
+
+ /* The page table mutex. */
+ gctPOINTER pageTableMutex;
+
+ /* Page table information. */
+ gctSIZE_T pageTableSize;
+ gctPHYS_ADDR pageTablePhysical;
+ gctUINT32_PTR pageTableLogical;
+ gctUINT32 pageTableEntries;
+
+ /* Master TLB information. */
+ gctSIZE_T mtlbSize;
+ gctPHYS_ADDR mtlbPhysical;
+ gctUINT32_PTR mtlbLogical;
+ gctUINT32 mtlbEntries;
+
+ /* Free entries. */
+ gctUINT32 heapList;
+ gctBOOL freeNodes;
+
+ gctPOINTER staticSTLB;
+ gctBOOL enabled;
+
+ gctUINT32 dynamicMappingStart;
+
+#ifdef __QNXNTO__
+ /* Single linked list of all allocated nodes. */
+ gctPOINTER nodeMutex;
+ gcuVIDMEM_NODE_PTR nodeList;
+#endif
+};
+
+#if gcdVIRTUAL_COMMAND_BUFFER
+gceSTATUS
+gckOS_CreateKernelVirtualMapping(
+ IN gctPHYS_ADDR Physical,
+ OUT gctSIZE_T * PageCount,
+ OUT gctPOINTER * Logical
+ );
+
+gceSTATUS
+gckOS_DestroyKernelVirtualMapping(
+ IN gctPOINTER Logical
+ );
+
+gceSTATUS
+gckKERNEL_AllocateVirtualCommandBuffer(
+ IN gckKERNEL Kernel,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+gceSTATUS
+gckKERNEL_DestroyVirtualCommandBuffer(
+ IN gckKERNEL Kernel,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+gceSTATUS
+gckKERNEL_GetGPUAddress(
+ IN gckKERNEL Kernel,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+gceSTATUS
+gckKERNEL_QueryGPUAddress(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 GpuAddress,
+ OUT gckVIRTUAL_COMMAND_BUFFER_PTR * Buffer
+ );
+#endif
+
+gceSTATUS
+gckKERNEL_AttachProcess(
+ IN gckKERNEL Kernel,
+ IN gctBOOL Attach
+ );
+
+gceSTATUS
+gckKERNEL_AttachProcessEx(
+ IN gckKERNEL Kernel,
+ IN gctBOOL Attach,
+ IN gctUINT32 PID
+ );
+
+#if gcdSECURE_USER
+gceSTATUS
+gckKERNEL_MapLogicalToPhysical(
+ IN gckKERNEL Kernel,
+ IN gcskSECURE_CACHE_PTR Cache,
+ IN OUT gctPOINTER * Data
+ );
+
+gceSTATUS
+gckKERNEL_FlushTranslationCache(
+ IN gckKERNEL Kernel,
+ IN gcskSECURE_CACHE_PTR Cache,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+#endif
+
+gceSTATUS
+gckHARDWARE_QueryIdle(
+ IN gckHARDWARE Hardware,
+ OUT gctBOOL_PTR IsIdle
+ );
+
+/******************************************************************************\
+******************************* gckCONTEXT Object *******************************
+\******************************************************************************/
+
+gceSTATUS
+gckCONTEXT_Construct(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 ProcessID,
+ OUT gckCONTEXT * Context
+ );
+
+gceSTATUS
+gckCONTEXT_Destroy(
+ IN gckCONTEXT Context
+ );
+
+gceSTATUS
+gckCONTEXT_Update(
+ IN gckCONTEXT Context,
+ IN gctUINT32 ProcessID,
+ IN gcsSTATE_DELTA_PTR StateDelta
+ );
+
+#if gcdLINK_QUEUE_SIZE
+void
+gckLINKQUEUE_Enqueue(
+ IN gckLINKQUEUE LinkQueue,
+ IN gctUINT32 start,
+ IN gctUINT32 end
+ );
+
+void
+gckLINKQUEUE_GetData(
+ IN gckLINKQUEUE LinkQueue,
+ IN gctUINT32 Index,
+ OUT gckLINKDATA * Data
+ );
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_kernel_buffer.h b/src/include_imx6_v4_0_0/gc_hal_kernel_buffer.h
new file mode 100644
index 0000000..0608e43
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_kernel_buffer.h
@@ -0,0 +1,185 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_kernel_buffer_h_
+#define __gc_hal_kernel_buffer_h_
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+************************ Command Buffer and Event Objects **********************
+\******************************************************************************/
+
+/* The number of context buffers per user. */
+#define gcdCONTEXT_BUFFER_COUNT 2
+
+/* State delta record. */
+typedef struct _gcsSTATE_DELTA_RECORD * gcsSTATE_DELTA_RECORD_PTR;
+typedef struct _gcsSTATE_DELTA_RECORD
+{
+ /* State address. */
+ gctUINT address;
+
+ /* State mask. */
+ gctUINT32 mask;
+
+ /* State data. */
+ gctUINT32 data;
+}
+gcsSTATE_DELTA_RECORD;
+
+/* State delta. */
+typedef struct _gcsSTATE_DELTA
+{
+ /* For debugging: the number of delta in the order of creation. */
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+ gctUINT num;
+#endif
+
+ /* Main state delta ID. Every time state delta structure gets reinitialized,
+ main ID is incremented. If main state ID overflows, all map entry IDs get
+ reinitialized to make sure there is no potential erroneous match after
+ the overflow.*/
+ gctUINT id;
+
+ /* The number of contexts pending modification by the delta. */
+ gctINT refCount;
+
+ /* Vertex element count for the delta buffer. */
+ gctUINT elementCount;
+
+ /* Number of states currently stored in the record array. */
+ gctUINT recordCount;
+
+ /* Record array; holds all modified states in gcsSTATE_DELTA_RECORD. */
+ gctUINT64 recordArray;
+
+ /* Map entry ID is used for map entry validation. If map entry ID does not
+ match the main state delta ID, the entry and the corresponding state are
+ considered not in use. */
+ gctUINT64 mapEntryID;
+ gctUINT mapEntryIDSize;
+
+ /* If the map entry ID matches the main state delta ID, index points to
+ the state record in the record array. */
+ gctUINT64 mapEntryIndex;
+
+ /* Previous and next state deltas in gcsSTATE_DELTA. */
+ gctUINT64 prev;
+ gctUINT64 next;
+}
+gcsSTATE_DELTA;
+
+/* Command buffer object. */
+struct _gcoCMDBUF
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Command buffer entry and exit pipes. */
+ gcePIPE_SELECT entryPipe;
+ gcePIPE_SELECT exitPipe;
+
+ /* Feature usage flags. */
+ gctBOOL using2D;
+ gctBOOL using3D;
+ gctBOOL usingFilterBlit;
+ gctBOOL usingPalette;
+
+ /* Physical address of command buffer. Just a name. */
+ gctUINT32 physical;
+
+ /* Logical address of command buffer. */
+ gctUINT64 logical;
+
+ /* Number of bytes in command buffer. */
+ gctUINT bytes;
+
+ /* Start offset into the command buffer. */
+ gctUINT startOffset;
+
+ /* Current offset into the command buffer. */
+ gctUINT offset;
+
+ /* Number of free bytes in command buffer. */
+ gctUINT free;
+
+ /* Location of the last reserved area. */
+ gctUINT64 lastReserve;
+ gctUINT lastOffset;
+
+#if gcdSECURE_USER
+ /* Hint array for the current command buffer. */
+ gctUINT hintArraySize;
+ gctUINT64 hintArray;
+ gctUINT64 hintArrayTail;
+#endif
+
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+ /* Last load state command location and hardware address. */
+ gctUINT64 lastLoadStatePtr;
+ gctUINT32 lastLoadStateAddress;
+ gctUINT32 lastLoadStateCount;
+#endif
+};
+
+typedef struct _gcsQUEUE
+{
+ /* Pointer to next gcsQUEUE structure in gcsQUEUE. */
+ gctUINT64 next;
+
+ /* Event information. */
+ gcsHAL_INTERFACE iface;
+}
+gcsQUEUE;
+
+/* Event queue. */
+struct _gcoQUEUE
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to current event queue. */
+ gcsQUEUE_PTR head;
+ gcsQUEUE_PTR tail;
+
+#ifdef __QNXNTO__
+ /* Buffer for records. */
+ gcsQUEUE_PTR records;
+ gctUINT32 freeBytes;
+ gctUINT32 offset;
+#else
+ /* List of free records. */
+ gcsQUEUE_PTR freeList;
+#endif
+ #define gcdIN_QUEUE_RECORD_LIMIT 16
+ /* Number of records currently in queue */
+ gctUINT32 recordCount;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_buffer_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_kernel_context.h b/src/include_imx6_v4_0_0/gc_hal_kernel_context.h
new file mode 100644
index 0000000..7554045
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_kernel_context.h
@@ -0,0 +1,144 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_kernel_context_h_
+#define __gc_hal_kernel_context_h_
+
+#include "gc_hal_kernel_buffer.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Maps state locations within the context buffer. */
+typedef struct _gcsSTATE_MAP * gcsSTATE_MAP_PTR;
+typedef struct _gcsSTATE_MAP
+{
+ /* Index of the state in the context buffer. */
+ gctUINT index;
+
+ /* State mask. */
+ gctUINT32 mask;
+}
+gcsSTATE_MAP;
+
+/* Context buffer. */
+typedef struct _gcsCONTEXT * gcsCONTEXT_PTR;
+typedef struct _gcsCONTEXT
+{
+ /* For debugging: the number of context buffer in the order of creation. */
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+ gctUINT num;
+#endif
+
+ /* Pointer to gckEVENT object. */
+ gckEVENT eventObj;
+
+ /* Context busy signal. */
+ gctSIGNAL signal;
+
+ /* Physical address of the context buffer. */
+ gctPHYS_ADDR physical;
+
+ /* Logical address of the context buffer. */
+ gctUINT32_PTR logical;
+
+ /* Pointer to the LINK commands. */
+ gctPOINTER link2D;
+ gctPOINTER link3D;
+
+ /* The number of pending state deltas. */
+ gctUINT deltaCount;
+
+ /* Pointer to the first delta to be applied. */
+ gcsSTATE_DELTA_PTR delta;
+
+ /* Next context buffer. */
+ gcsCONTEXT_PTR next;
+}
+gcsCONTEXT;
+
+/* gckCONTEXT structure that hold the current context. */
+struct _gckCONTEXT
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Pointer to gckHARDWARE object. */
+ gckHARDWARE hardware;
+
+ /* Command buffer alignment. */
+ gctSIZE_T alignment;
+ gctSIZE_T reservedHead;
+ gctSIZE_T reservedTail;
+
+ /* Context buffer metrics. */
+ gctSIZE_T stateCount;
+ gctSIZE_T totalSize;
+ gctSIZE_T bufferSize;
+ gctUINT32 linkIndex2D;
+ gctUINT32 linkIndex3D;
+ gctUINT32 linkIndexXD;
+ gctUINT32 entryOffset3D;
+ gctUINT32 entryOffsetXDFrom2D;
+ gctUINT32 entryOffsetXDFrom3D;
+
+ /* Dirty flags. */
+ gctBOOL dirty;
+ gctBOOL dirty2D;
+ gctBOOL dirty3D;
+ gcsCONTEXT_PTR dirtyBuffer;
+
+ /* State mapping. */
+ gcsSTATE_MAP_PTR map;
+
+ /* List of context buffers. */
+ gcsCONTEXT_PTR buffer;
+
+ /* A copy of the user record array. */
+ gctUINT recordArraySize;
+ gcsSTATE_DELTA_RECORD_PTR recordArray;
+
+ /* Requested pipe select for context. */
+ gcePIPE_SELECT entryPipe;
+ gcePIPE_SELECT exitPipe;
+
+ /* Variables used for building state buffer. */
+ gctUINT32 lastAddress;
+ gctSIZE_T lastSize;
+ gctUINT32 lastIndex;
+ gctBOOL lastFixed;
+
+ /* Hint array. */
+#if gcdSECURE_USER
+ gctBOOL_PTR hint;
+#endif
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_context_h_ */
+
diff --git a/src/include_imx6_v4_0_0/gc_hal_kernel_debug.h b/src/include_imx6_v4_0_0/gc_hal_kernel_debug.h
new file mode 100644
index 0000000..339dff4
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_kernel_debug.h
@@ -0,0 +1,102 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_kernel_debug_h_
+#define __gc_hal_kernel_debug_h_
+
+#include <gc_hal_kernel_linux.h>
+#include <linux/spinlock.h>
+#include <linux/time.h>
+#include <stdarg.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** OS-dependent Macros *****************************
+\******************************************************************************/
+
+typedef va_list gctARGUMENTS;
+
+#define gcmkARGUMENTS_START(Arguments, Pointer) \
+ va_start(Arguments, Pointer)
+
+#define gcmkARGUMENTS_END(Arguments) \
+ va_end(Arguments)
+
+#define gcmkDECLARE_LOCK(__spinLock__) \
+ static DEFINE_SPINLOCK(__spinLock__);
+
+#define gcmkLOCKSECTION(__spinLock__) \
+ spin_lock(&__spinLock__)
+
+#define gcmkUNLOCKSECTION(__spinLock__) \
+ spin_unlock(&__spinLock__)
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+# define gcmkGETPROCESSID() \
+ task_tgid_vnr(current)
+#else
+# define gcmkGETPROCESSID() \
+ current->tgid
+#endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+# define gcmkGETTHREADID() \
+ task_pid_vnr(current)
+#else
+# define gcmkGETTHREADID() \
+ current->pid
+#endif
+
+#define gcmkOUTPUT_STRING(String) \
+ if(gckDebugFileSystemIsEnabled()) \
+ gckDebugFileSystemPrint(String);\
+ else\
+ printk(String); \
+ touch_softlockup_watchdog()
+
+
+#define gcmkSPRINTF(Destination, Size, Message, Value) \
+ snprintf(Destination, Size, Message, Value)
+
+#define gcmkSPRINTF2(Destination, Size, Message, Value1, Value2) \
+ snprintf(Destination, Size, Message, Value1, Value2)
+
+#define gcmkSPRINTF3(Destination, Size, Message, Value1, Value2, Value3) \
+ snprintf(Destination, Size, Message, Value1, Value2, Value3)
+
+#define gcmkVSPRINTF(Destination, Size, Message, Arguments) \
+ vsnprintf(Destination, Size, Message, *(va_list *) &Arguments)
+
+#define gcmkSTRCAT(Destination, Size, String) \
+ strncat(Destination, String, Size)
+
+/* If not zero, forces data alignment in the variable argument list
+ by its individual size. */
+#define gcdALIGNBYSIZE 1
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_debug_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_kernel_debugfs.h b/src/include_imx6_v4_0_0/gc_hal_kernel_debugfs.h
new file mode 100644
index 0000000..78d8199
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_kernel_debugfs.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#include <stdarg.h>
+
+#ifndef __gc_hal_kernel_debugfs_h_
+#define __gc_hal_kernel_debugfs_h_
+
+ #define MAX_LINE_SIZE 768 /* Max bytes for a line of debug info */
+
+
+ typedef struct _gcsDebugFileSystemNode gcsDebugFileSystemNode ;
+
+
+/*******************************************************************************
+ **
+ ** System Related
+ **
+ *******************************************************************************/
+
+gctINT gckDebugFileSystemIsEnabled(void);
+
+gctINT gckDebugFileSystemInitialize(void);
+
+gctINT gckDebugFileSystemTerminate(void);
+
+
+/*******************************************************************************
+ **
+ ** Node Related
+ **
+ *******************************************************************************/
+
+gctINT gckDebugFileSystemCreateNode(
+ IN gctINT SizeInKB,
+ IN gctCONST_STRING ParentName ,
+ IN gctCONST_STRING NodeName,
+ OUT gcsDebugFileSystemNode **Node
+ );
+
+
+void gckDebugFileSystemFreeNode(
+ IN gcsDebugFileSystemNode * Node
+ );
+
+
+
+void gckDebugFileSystemSetCurrentNode(
+ IN gcsDebugFileSystemNode * Node
+ );
+
+
+
+void gckDebugFileSystemGetCurrentNode(
+ OUT gcsDebugFileSystemNode ** Node
+ );
+
+
+void gckDebugFileSystemPrint(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#endif
+
+
diff --git a/src/include_imx6_v4_0_0/gc_hal_kernel_device.h b/src/include_imx6_v4_0_0/gc_hal_kernel_device.h
new file mode 100644
index 0000000..460f022
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_kernel_device.h
@@ -0,0 +1,179 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_kernel_device_h_
+#define __gc_hal_kernel_device_h_
+
+/******************************************************************************\
+******************************* gckGALDEVICE Structure *******************************
+\******************************************************************************/
+
+typedef struct _gckGALDEVICE
+{
+ /* Objects. */
+ gckOS os;
+ gckKERNEL kernels[gcdMAX_GPU_COUNT];
+
+ /* Attributes. */
+ gctSIZE_T internalSize;
+ gctPHYS_ADDR internalPhysical;
+ gctUINT32 internalPhysicalName;
+ gctPOINTER internalLogical;
+ gckVIDMEM internalVidMem;
+ gctSIZE_T externalSize;
+ gctPHYS_ADDR externalPhysical;
+ gctUINT32 externalPhysicalName;
+ gctPOINTER externalLogical;
+ gckVIDMEM externalVidMem;
+ gckVIDMEM contiguousVidMem;
+ gctPOINTER contiguousBase;
+ gctPHYS_ADDR contiguousPhysical;
+ gctUINT32 contiguousPhysicalName;
+ gctSIZE_T contiguousSize;
+ gctBOOL contiguousMapped;
+ gctPOINTER contiguousMappedUser;
+ gctSIZE_T systemMemorySize;
+ gctUINT32 systemMemoryBaseAddress;
+ gctPOINTER registerBases[gcdMAX_GPU_COUNT];
+ gctSIZE_T registerSizes[gcdMAX_GPU_COUNT];
+ gctUINT32 baseAddress;
+ gctUINT32 requestedRegisterMemBases[gcdMAX_GPU_COUNT];
+ gctSIZE_T requestedRegisterMemSizes[gcdMAX_GPU_COUNT];
+ gctUINT32 requestedContiguousBase;
+ gctSIZE_T requestedContiguousSize;
+
+ /* IRQ management. */
+ gctINT irqLines[gcdMAX_GPU_COUNT];
+ gctBOOL isrInitializeds[gcdMAX_GPU_COUNT];
+ gctBOOL dataReadys[gcdMAX_GPU_COUNT];
+
+ /* Thread management. */
+ struct task_struct *threadCtxts[gcdMAX_GPU_COUNT];
+ struct semaphore semas[gcdMAX_GPU_COUNT];
+ gctBOOL threadInitializeds[gcdMAX_GPU_COUNT];
+ gctBOOL killThread;
+
+ /* Signal management. */
+ gctINT signal;
+
+ /* Core mapping */
+ gceCORE coreMapping[8];
+
+ /* States before suspend. */
+ gceCHIPPOWERSTATE statesStored[gcdMAX_GPU_COUNT];
+
+ /*Device Debug File System Entry in Kernel*/
+ struct _gcsDebugFileSystemNode * dbgnode;
+
+ /* Clock management.*/
+ struct clk *clk_3d_core;
+ struct clk *clk_3d_shader;
+ struct clk *clk_3d_axi;
+ struct clk *clk_2d_core;
+ struct clk *clk_2d_axi;
+ struct clk *clk_vg_axi;
+
+ /*Power management.*/
+ struct regulator *gpu_regulator;
+
+ /*Run time pm*/
+ struct device *pmdev;
+}
+* gckGALDEVICE;
+
+typedef struct _gcsHAL_PRIVATE_DATA
+{
+ gckGALDEVICE device;
+ gctPOINTER mappedMemory;
+ gctPOINTER contiguousLogical;
+ /* The process opening the device may not be the same as the one that closes it. */
+ gctUINT32 pidOpen;
+}
+gcsHAL_PRIVATE_DATA, * gcsHAL_PRIVATE_DATA_PTR;
+
+gceSTATUS gckGALDEVICE_Setup_ISR(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Setup_ISR_2D(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Setup_ISR_VG(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Release_ISR(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Release_ISR_2D(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Release_ISR_VG(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Start_Threads(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Stop_Threads(
+ gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Start(
+ IN gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Stop(
+ gckGALDEVICE Device
+ );
+
+gceSTATUS gckGALDEVICE_Construct(
+ IN gctINT IrqLine,
+ IN gctUINT32 RegisterMemBase,
+ IN gctSIZE_T RegisterMemSize,
+ IN gctINT IrqLine2D,
+ IN gctUINT32 RegisterMemBase2D,
+ IN gctSIZE_T RegisterMemSize2D,
+ IN gctINT IrqLineVG,
+ IN gctUINT32 RegisterMemBaseVG,
+ IN gctSIZE_T RegisterMemSizeVG,
+ IN gctUINT32 ContiguousBase,
+ IN gctSIZE_T ContiguousSize,
+ IN gctSIZE_T BankSize,
+ IN gctINT FastClear,
+ IN gctINT Compression,
+ IN gctUINT32 PhysBaseAddr,
+ IN gctUINT32 PhysSize,
+ IN gctINT Signal,
+ IN gctUINT LogFileSize,
+ IN struct device *pdev,
+ OUT gckGALDEVICE *Device
+ );
+
+gceSTATUS gckGALDEVICE_Destroy(
+ IN gckGALDEVICE Device
+ );
+
+#endif /* __gc_hal_kernel_device_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_kernel_hardware.h b/src/include_imx6_v4_0_0/gc_hal_kernel_hardware.h
new file mode 100644
index 0000000..517b35c
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_kernel_hardware.h
@@ -0,0 +1,133 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_kernel_hardware_h_
+#define __gc_hal_kernel_hardware_h_
+
+#if gcdENABLE_VG
+#include "gc_hal_kernel_hardware_vg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* gckHARDWARE object. */
+struct _gckHARDWARE
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gctKERNEL object. */
+ gckKERNEL kernel;
+
+ /* Pointer to gctOS object. */
+ gckOS os;
+
+ /* Core */
+ gceCORE core;
+
+ /* Chip characteristics. */
+ gcsHAL_QUERY_CHIP_IDENTITY identity;
+ gctBOOL allowFastClear;
+ gctBOOL allowCompression;
+ gctUINT32 powerBaseAddress;
+ gctBOOL extraEventStates;
+
+ /* Big endian */
+ gctBOOL bigEndian;
+
+ /* Chip status */
+ gctPOINTER powerMutex;
+ gctUINT32 powerProcess;
+ gctUINT32 powerThread;
+ gceCHIPPOWERSTATE chipPowerState;
+ gctUINT32 lastWaitLink;
+ gctBOOL clockState;
+ gctBOOL powerState;
+ gctPOINTER globalSemaphore;
+
+ gctISRMANAGERFUNC startIsr;
+ gctISRMANAGERFUNC stopIsr;
+ gctPOINTER isrContext;
+
+ gctUINT32 mmuVersion;
+
+ /* Type */
+ gceHARDWARE_TYPE type;
+
+#if gcdPOWEROFF_TIMEOUT
+ gctUINT32 powerOffTime;
+ gctUINT32 powerOffTimeout;
+ gctPOINTER powerOffTimer;
+#endif
+
+ gctPOINTER pageTableDirty;
+
+#if gcdENABLE_FSCALE_VAL_ADJUST
+ /* FSCALE_VAL when gcvPOWER_ON. */
+ gctUINT32 powerOnFscaleVal;
+#endif
+
+#if gcdLINK_QUEUE_SIZE
+ struct _gckLINKQUEUE linkQueue;
+#endif
+};
+
+gceSTATUS
+gckHARDWARE_GetBaseAddress(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+gceSTATUS
+gckHARDWARE_NeedBaseAddress(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 State,
+ OUT gctBOOL_PTR NeedBase
+ );
+
+gceSTATUS
+gckHARDWARE_GetFrameInfo(
+ IN gckHARDWARE Hardware,
+ OUT gcsHAL_FRAME_INFO * FrameInfo
+ );
+
+gceSTATUS
+gckHARDWARE_SetFscaleValue(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 FscaleValue
+ );
+
+gceSTATUS
+gckHARDWARE_GetFscaleValue(
+ IN gckHARDWARE Hardware,
+ IN gctUINT * FscaleValue,
+ IN gctUINT * MinFscaleValue,
+ IN gctUINT * MaxFscaleValue
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_hardware_h_ */
+
diff --git a/src/include_imx6_v4_0_0/gc_hal_kernel_hardware_command_vg.h b/src/include_imx6_v4_0_0/gc_hal_kernel_hardware_command_vg.h
new file mode 100644
index 0000000..aa767ee
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_kernel_hardware_command_vg.h
@@ -0,0 +1,319 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_kernel_hardware_command_vg_h_
+#define __gc_hal_kernel_hardware_command_vg_h_
+
+/******************************************************************************\
+******************* Task and Interrupt Management Structures. ******************
+\******************************************************************************/
+
+/* Task storage header. */
+typedef struct _gcsTASK_STORAGE * gcsTASK_STORAGE_PTR;
+typedef struct _gcsTASK_STORAGE
+{
+ /* Next allocated storage buffer. */
+ gcsTASK_STORAGE_PTR next;
+}
+gcsTASK_STORAGE;
+
+/* Task container header. */
+typedef struct _gcsTASK_CONTAINER * gcsTASK_CONTAINER_PTR;
+typedef struct _gcsTASK_CONTAINER
+{
+ /* The number of tasks left to be processed in the container. */
+ gctINT referenceCount;
+
+ /* Size of the buffer. */
+ gctUINT size;
+
+ /* Link to the previous and the next allocated containers. */
+ gcsTASK_CONTAINER_PTR allocPrev;
+ gcsTASK_CONTAINER_PTR allocNext;
+
+ /* Link to the previous and the next containers in the free list. */
+ gcsTASK_CONTAINER_PTR freePrev;
+ gcsTASK_CONTAINER_PTR freeNext;
+}
+gcsTASK_CONTAINER;
+
+/* Kernel space task master table entry. */
+typedef struct _gcsBLOCK_TASK_ENTRY * gcsBLOCK_TASK_ENTRY_PTR;
+typedef struct _gcsBLOCK_TASK_ENTRY
+{
+ /* Pointer to the current task container for the block. */
+ gcsTASK_CONTAINER_PTR container;
+
+ /* Pointer to the current task data within the container. */
+ gcsTASK_HEADER_PTR task;
+
+ /* Pointer to the last link task within the container. */
+ gcsTASK_LINK_PTR link;
+
+ /* Number of interrupts allocated for this block. */
+ gctUINT interruptCount;
+
+ /* The index of the current interrupt. */
+ gctUINT interruptIndex;
+
+ /* Interrupt semaphore. */
+ gctSEMAPHORE interruptSemaphore;
+
+ /* Interrupt value array. */
+ gctINT32 interruptArray[32];
+}
+gcsBLOCK_TASK_ENTRY;
+
+
+/******************************************************************************\
+********************* Command Queue Management Structures. *********************
+\******************************************************************************/
+
+/* Command queue kernel element pointer. */
+typedef struct _gcsKERNEL_CMDQUEUE * gcsKERNEL_CMDQUEUE_PTR;
+
+/* Command queue object handler function type. */
+typedef gceSTATUS (* gctOBJECT_HANDLER) (
+ gckVGKERNEL Kernel,
+ gcsKERNEL_CMDQUEUE_PTR Entry
+ );
+
+/* Command queue kernel element. */
+typedef struct _gcsKERNEL_CMDQUEUE
+{
+ /* The number of buffers in the queue. */
+ gcsCMDBUFFER_PTR commandBuffer;
+
+ /* Pointer to the object handler function. */
+ gctOBJECT_HANDLER handler;
+}
+gcsKERNEL_CMDQUEUE;
+
+/* Command queue header. */
+typedef struct _gcsKERNEL_QUEUE_HEADER * gcsKERNEL_QUEUE_HEADER_PTR;
+typedef struct _gcsKERNEL_QUEUE_HEADER
+{
+ /* The size of the buffer in bytes. */
+ gctUINT size;
+
+ /* The number of pending entries to be processed. */
+ volatile gctUINT pending;
+
+ /* The current command queue entry. */
+ gcsKERNEL_CMDQUEUE_PTR currentEntry;
+
+ /* Next buffer. */
+ gcsKERNEL_QUEUE_HEADER_PTR next;
+}
+gcsKERNEL_QUEUE_HEADER;
+
+
+/******************************************************************************\
+******************************* gckVGCOMMAND Object *******************************
+\******************************************************************************/
+
+/* gckVGCOMMAND object. */
+struct _gckVGCOMMAND
+{
+ /***************************************************************************
+ ** Object data and pointers.
+ */
+
+ gcsOBJECT object;
+ gckVGKERNEL kernel;
+ gckOS os;
+ gckVGHARDWARE hardware;
+
+ /* Features. */
+ gctBOOL fe20;
+ gctBOOL vg20;
+ gctBOOL vg21;
+
+
+ /***************************************************************************
+ ** Enable command queue dumping.
+ */
+
+ gctBOOL enableDumping;
+
+
+ /***************************************************************************
+ ** Bus Error interrupt.
+ */
+
+ gctINT32 busErrorInt;
+
+
+ /***************************************************************************
+ ** Command buffer information.
+ */
+
+ gcsCOMMAND_BUFFER_INFO info;
+
+
+ /***************************************************************************
+ ** Synchronization objects.
+ */
+
+ gctPOINTER queueMutex;
+ gctPOINTER taskMutex;
+ gctPOINTER commitMutex;
+
+
+ /***************************************************************************
+ ** Task management.
+ */
+
+ /* The head of the storage buffer linked list. */
+ gcsTASK_STORAGE_PTR taskStorage;
+
+ /* Allocation size. */
+ gctUINT taskStorageGranularity;
+ gctUINT taskStorageUsable;
+
+ /* The free container list. */
+ gcsTASK_CONTAINER_PTR taskFreeHead;
+ gcsTASK_CONTAINER_PTR taskFreeTail;
+
+ /* Task table */
+ gcsBLOCK_TASK_ENTRY taskTable[gcvBLOCK_COUNT];
+
+
+ /***************************************************************************
+ ** Command queue.
+ */
+
+ /* Pointer to the allocated queue memory. */
+ gcsKERNEL_QUEUE_HEADER_PTR queue;
+
+ /* Pointer to the current available queue from which new queue entries
+ will be allocated. */
+ gcsKERNEL_QUEUE_HEADER_PTR queueHead;
+
+ /* If different from queueHead, points to the command queue which is
+ currently being executed by the hardware. */
+ gcsKERNEL_QUEUE_HEADER_PTR queueTail;
+
+ /* Points to the queue to merge the tail with when the tail is processed. */
+ gcsKERNEL_QUEUE_HEADER_PTR mergeQueue;
+
+ /* Queue overflow counter. */
+ gctUINT queueOverflow;
+
+
+ /***************************************************************************
+ ** Context.
+ */
+
+ /* Context counter used for unique ID. */
+ gctUINT64 contextCounter;
+
+ /* Current context ID. */
+ gctUINT64 currentContext;
+
+ /* Command queue power semaphore. */
+ gctPOINTER powerSemaphore;
+ gctINT32 powerStallInt;
+ gcsCMDBUFFER_PTR powerStallBuffer;
+ gctSIGNAL powerStallSignal;
+
+};
+
+/******************************************************************************\
+************************ gckVGCOMMAND Object Internal API. ***********************
+\******************************************************************************/
+
+/* Initialize architecture dependent command buffer information. */
+gceSTATUS
+gckVGCOMMAND_InitializeInfo(
+ IN gckVGCOMMAND Command
+ );
+
+/* Form a STATE command at the specified location in the command buffer. */
+gceSTATUS
+gckVGCOMMAND_StateCommand(
+ IN gckVGCOMMAND Command,
+ IN gctUINT32 Pipe,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Address,
+ IN gctSIZE_T Count,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Form a RESTART command at the specified location in the command buffer. */
+gceSTATUS
+gckVGCOMMAND_RestartCommand(
+ IN gckVGCOMMAND Command,
+ IN gctPOINTER Logical,
+ IN gctUINT32 FetchAddress,
+ IN gctUINT FetchCount,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Form a FETCH command at the specified location in the command buffer. */
+gceSTATUS
+gckVGCOMMAND_FetchCommand(
+ IN gckVGCOMMAND Command,
+ IN gctPOINTER Logical,
+ IN gctUINT32 FetchAddress,
+ IN gctUINT FetchCount,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Form a CALL command at the specified location in the command buffer. */
+gceSTATUS
+gckVGCOMMAND_CallCommand(
+ IN gckVGCOMMAND Command,
+ IN gctPOINTER Logical,
+ IN gctUINT32 FetchAddress,
+ IN gctUINT FetchCount,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Form a RETURN command at the specified location in the command buffer. */
+gceSTATUS
+gckVGCOMMAND_ReturnCommand(
+ IN gckVGCOMMAND Command,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Form an EVENT command at the specified location in the command buffer. */
+gceSTATUS
+gckVGCOMMAND_EventCommand(
+ IN gckVGCOMMAND Command,
+ IN gctPOINTER Logical,
+ IN gceBLOCK Block,
+ IN gctINT32 InterruptId,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Form an END command at the specified location in the command buffer. */
+gceSTATUS
+gckVGCOMMAND_EndCommand(
+ IN gckVGCOMMAND Command,
+ IN gctPOINTER Logical,
+ IN gctINT32 InterruptId,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+#endif /* __gc_hal_kernel_hardware_command_h_ */
+
diff --git a/src/include_imx6_v4_0_0/gc_hal_kernel_hardware_vg.h b/src/include_imx6_v4_0_0/gc_hal_kernel_hardware_vg.h
new file mode 100644
index 0000000..83a603e
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_kernel_hardware_vg.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_kernel_hardware_vg_h_
+#define __gc_hal_kernel_hardware_vg_h_
+
+/* gckHARDWARE object. */
+struct _gckVGHARDWARE
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckKERNEL object. */
+ gckVGKERNEL kernel;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Chip characteristics. */
+ gceCHIPMODEL chipModel;
+ gctUINT32 chipRevision;
+ gctUINT32 chipFeatures;
+ gctUINT32 chipMinorFeatures;
+ gctUINT32 chipMinorFeatures2;
+ gctBOOL allowFastClear;
+
+ /* Features. */
+ gctBOOL fe20;
+ gctBOOL vg20;
+ gctBOOL vg21;
+
+ /* Event mask. */
+ gctUINT32 eventMask;
+
+ gctBOOL clockState;
+ gctBOOL powerState;
+ gctPOINTER powerMutex;
+ gctSIGNAL idleSignal;
+ gctUINT32 powerProcess;
+ gctUINT32 powerThread;
+ gceCHIPPOWERSTATE chipPowerState;
+ gceCHIPPOWERSTATE chipPowerStateGlobal;
+ gctISRMANAGERFUNC startIsr;
+ gctISRMANAGERFUNC stopIsr;
+ gctPOINTER isrContext;
+ gctUINT32 powerOffTime;
+ gctUINT32 powerOffTimeout;
+ gctTHREAD timeIdleThread;
+ gctBOOL killThread;
+ gctPOINTER pageTableDirty;
+};
+
+#endif /* __gc_hal_kernel_hardware_h_ */
+
diff --git a/src/include_imx6_v4_0_0/gc_hal_kernel_linux.h b/src/include_imx6_v4_0_0/gc_hal_kernel_linux.h
new file mode 100644
index 0000000..9c0bcd5
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_kernel_linux.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_kernel_linux_h_
+#define __gc_hal_kernel_linux_h_
+
+#include <linux/version.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/mm.h>
+#include <linux/sched.h>
+#include <linux/signal.h>
+#ifdef FLAREON
+# include <asm/arch-realview/dove_gpio_irq.h>
+#endif
+#include <linux/interrupt.h>
+#include <linux/vmalloc.h>
+#include <linux/dma-mapping.h>
+#include <linux/kthread.h>
+
+#ifdef MODVERSIONS
+# include <linux/modversions.h>
+#endif
+#include <asm/io.h>
+#include <asm/uaccess.h>
+
+#if ENABLE_GPU_CLOCK_BY_DRIVER && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
+#include <linux/clk.h>
+#include <linux/regulator/consumer.h>
+#endif
+
+#define NTSTRSAFE_NO_CCH_FUNCTIONS
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_kernel.h"
+#include "gc_hal_kernel_device.h"
+#include "gc_hal_kernel_os.h"
+#include "gc_hal_kernel_debugfs.h"
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+#define FIND_TASK_BY_PID(x) pid_task(find_vpid(x), PIDTYPE_PID)
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
+#define FIND_TASK_BY_PID(x) find_task_by_vpid(x)
+#else
+#define FIND_TASK_BY_PID(x) find_task_by_pid(x)
+#endif
+
+#define _WIDE(string) L##string
+#define WIDE(string) _WIDE(string)
+
+#define countof(a) (sizeof(a) / sizeof(a[0]))
+
+#define DRV_NAME "galcore"
+
+#define GetPageCount(size, offset) ((((size) + ((offset) & ~PAGE_CACHE_MASK)) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT)
+
+static inline gctINT
+GetOrder(
+ IN gctINT numPages
+ )
+{
+ gctINT order = 0;
+
+ while ((1 << order) < numPages) order++;
+
+ return order;
+}
+
+#endif /* __gc_hal_kernel_linux_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_kernel_os.h b/src/include_imx6_v4_0_0/gc_hal_kernel_os.h
new file mode 100644
index 0000000..e970477
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_kernel_os.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_kernel_os_h_
+#define __gc_hal_kernel_os_h_
+
+typedef struct _LINUX_MDL_MAP
+{
+ gctINT pid;
+ gctPOINTER vmaAddr;
+ struct vm_area_struct * vma;
+ struct _LINUX_MDL_MAP * next;
+}
+LINUX_MDL_MAP;
+
+typedef struct _LINUX_MDL_MAP * PLINUX_MDL_MAP;
+
+typedef struct _LINUX_MDL
+{
+ gctINT pid;
+ char * addr;
+
+ union _pages
+ {
+ /* Pointer to a array of pages. */
+ struct page * contiguousPages;
+ /* Pointer to a array of pointers to page. */
+ struct page ** nonContiguousPages;
+ }
+ u;
+
+#ifdef NO_DMA_COHERENT
+ gctPOINTER kaddr;
+#endif /* NO_DMA_COHERENT */
+
+ gctINT numPages;
+ gctINT pagedMem;
+ gctBOOL contiguous;
+ dma_addr_t dmaHandle;
+ PLINUX_MDL_MAP maps;
+ struct _LINUX_MDL * prev;
+ struct _LINUX_MDL * next;
+}
+LINUX_MDL, *PLINUX_MDL;
+
+extern PLINUX_MDL_MAP
+FindMdlMap(
+ IN PLINUX_MDL Mdl,
+ IN gctINT PID
+ );
+
+typedef struct _DRIVER_ARGS
+{
+ gctUINT64 InputBuffer;
+ gctUINT64 InputBufferSize;
+ gctUINT64 OutputBuffer;
+ gctUINT64 OutputBufferSize;
+}
+DRIVER_ARGS;
+
+#endif /* __gc_hal_kernel_os_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_kernel_precomp.h b/src/include_imx6_v4_0_0/gc_hal_kernel_precomp.h
new file mode 100644
index 0000000..1e764c2
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_kernel_precomp.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_kernel_precomp_h_
+#define __gc_hal_kernel_precomp_h_
+
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_kernel.h"
+
+#endif /* __gc_hal_kernel_precomp_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_kernel_vg.h b/src/include_imx6_v4_0_0/gc_hal_kernel_vg.h
new file mode 100644
index 0000000..b6c6d7e
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_kernel_vg.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_kernel_vg_h_
+#define __gc_hal_kernel_vg_h_
+
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_kernel_hardware.h"
+
+/******************************************************************************\
+********************************** Structures **********************************
+\******************************************************************************/
+
+/* gckKERNEL object. */
+struct _gckVGKERNEL
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Pointer to gckHARDWARE object. */
+ gckVGHARDWARE hardware;
+
+ /* Pointer to gckINTERRUPT object. */
+ gckVGINTERRUPT interrupt;
+
+ /* Pointer to gckCOMMAND object. */
+ gckVGCOMMAND command;
+
+ /* Pointer to context. */
+ gctPOINTER context;
+
+ /* Pointer to gckMMU object. */
+ gckVGMMU mmu;
+
+ gckKERNEL kernel;
+};
+
+/* gckMMU object. */
+struct _gckVGMMU
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to gckOS object. */
+ gckOS os;
+
+ /* Pointer to gckHARDWARE object. */
+ gckVGHARDWARE hardware;
+
+ /* The page table mutex. */
+ gctPOINTER mutex;
+
+ /* Page table information. */
+ gctSIZE_T pageTableSize;
+ gctPHYS_ADDR pageTablePhysical;
+ gctPOINTER pageTableLogical;
+
+ /* Allocation index. */
+ gctUINT32 entryCount;
+ gctUINT32 entry;
+};
+
+#endif /* __gc_hal_kernel_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_md5.h b/src/include_imx6_v4_0_0/gc_hal_md5.h
new file mode 100644
index 0000000..bc56d95
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_md5.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+/*
+ Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved.
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ L. Peter Deutsch
+ ghost@aladdin.com
+
+ */
+/* $Id: gc_hal_md5.h,v 1.1.4.1 2012/02/08 23:31:39 semih.demirer Exp $ */
+/*
+ Independent implementation of MD5 (RFC 1321).
+
+ This code implements the MD5 Algorithm defined in RFC 1321, whose
+ text is available at
+ http://www.ietf.org/rfc/rfc1321.txt
+ The code is derived from the text of the RFC, including the test suite
+ (section A.5) but excluding the rest of Appendix A. It does not include
+ any code or documentation that is identified in the RFC as being
+ copyrighted.
+
+ The original and principal author of md5.h is L. Peter Deutsch
+ <ghost@aladdin.com>. Other authors are noted in the change history
+ that follows (in reverse chronological order):
+
+ 2002-04-13 lpd Removed support for non-ANSI compilers; removed
+ references to Ghostscript; clarified derivation from RFC 1321;
+ now handles byte order either statically or dynamically.
+ 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
+ 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
+ added conditionalization for C++ compilation from Martin
+ Purschke <purschke@bnl.gov>.
+ 1999-05-03 lpd Original version.
+ */
+
+
+#ifndef __gc_hal_md5_h_
+#define __gc_hal_md5_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This package supports both compile-time and run-time determination of CPU
+ * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
+ * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is
+ * defined as non-zero, the code will be compiled to run only on big-endian
+ * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to
+ * run on either big- or little-endian CPUs, but will run slightly less
+ * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.
+ */
+
+typedef unsigned char gctMD5_Byte; /* 8-bit byte */
+typedef unsigned int gctMD5_Word; /* 32-bit word */
+
+/* Define the state of the MD5 Algorithm. */
+typedef struct _gcsMD5_State {
+ gctMD5_Word count[2]; /* message length in bits, lsw first */
+ gctMD5_Word abcd[4]; /* digest buffer */
+ gctMD5_Byte buf[64]; /* accumulate block */
+} gcsMD5_State;
+
+/* Initialize the algorithm. */
+void gcoMD5_Init(gcsMD5_State *pms);
+
+/* Append a string to the message. */
+void gcoMD5_Append(gcsMD5_State *pms, const gctMD5_Byte *data, int nbytes);
+
+/* Finish the message and return the digest. */
+void gcoMD5_Finish(gcsMD5_State *pms, gctMD5_Byte digest[16]);
+
+#ifdef __cplusplus
+} /* end extern "C" */
+#endif
+
+#endif /* md5_INCLUDED */
diff --git a/src/include_imx6_v4_0_0/gc_hal_mem.h b/src/include_imx6_v4_0_0/gc_hal_mem.h
new file mode 100644
index 0000000..9e32878
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_mem.h
@@ -0,0 +1,530 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+/*
+** Include file for the local memory management.
+*/
+
+#ifndef __gc_hal_mem_h_
+#define __gc_hal_mem_h_
+#ifndef VIVANTE_NO_3D
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*******************************************************************************
+** Usage:
+
+ The macros to declare MemPool type and functions are
+ gcmMEM_DeclareFSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareVSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix)
+
+ The data structures for MemPool are
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+
+ The MemPool constructor and destructor functions are
+ gcfMEM_InitFSMemPool(gcsMEM_FS_MEM_POOL *, gcoOS, gctUINT, gctUINT);
+ gcfMEM_FreeFSMemPool(gcsMEM_FS_MEM_POOL *);
+ gcfMEM_InitVSMemPool(gcsMEM_VS_MEM_POOL *, gcoOS, gctUINT, gctBOOL);
+ gcfMEM_FreeVSMemPool(gcsMEM_VS_MEM_POOL *);
+ gcfMEM_InitAFSMemPool(gcsMEM_AFS_MEM_POOL *, gcoOS, gctUINT);
+ gcfMEM_FreeAFSMemPool(gcsMEM_AFS_MEM_POOL *);
+
+ FS: for Fixed-Size data structures
+ VS: for Variable-size data structures
+ AFS: for Array of Fixed-Size data structures
+
+
+ // Example 1: For a fixed-size data structure, struct gcsNode.
+ // It is used locally in a file, so the functions are static without prefix.
+ // At top level, declear allocate and free functions.
+ // The first argument is the data type.
+ // The second armument is the short name used in the fuctions.
+ gcmMEM_DeclareFSMemPool(struct gcsNode, Node, );
+
+ // The previous macro creates two inline functions,
+ // _AllocateNode and _FreeNode.
+
+ // In function or struct
+ gcsMEM_FS_MEM_POOL nodeMemPool;
+
+ // In function,
+ struct gcsNode * node;
+ gceSTATUS status;
+
+ // Before using the memory pool, initialize it.
+ // The second argument is the gcoOS object.
+ // The third argument is the number of data structures to allocate for each chunk.
+ status = gcfMEM_InitFSMemPool(&nodeMemPool, os, 100, sizeof(struct gcsNode));
+ ...
+
+ // Allocate a node.
+ status = _AllocateNode(nodeMemPool, &node);
+ ...
+ // Free a node.
+ _FreeNode(nodeMemPool, node);
+
+ // After using the memory pool, free it.
+ gcfMEM_FreeFSMemPool(&nodeMemPool);
+
+
+ // Example 2: For array of fixed-size data structures, struct gcsNode.
+ // It is used in several files, so the functions are extern with prefix.
+ // At top level, declear allocate and free functions.
+ // The first argument is the data type, and the second one is the short name
+ // used in the fuctions.
+ gcmMEM_DeclareAFSMemPool(struct gcsNode, NodeArray, gcfOpt);
+
+ // The previous macro creates two inline functions,
+ // gcfOpt_AllocateNodeArray and gcfOpt_FreeNodeArray.
+
+ // In function or struct
+ gcsMEM_AFS_MEM_POOL nodeArrayMemPool;
+
+ // In function,
+ struct gcsNode * nodeArray;
+ gceSTATUS status;
+
+ // Before using the array memory pool, initialize it.
+ // The second argument is the gcoOS object, the third is the number of data
+ // structures to allocate for each chunk.
+ status = gcfMEM_InitAFSMemPool(&nodeArrayMemPool, os, sizeof(struct gcsNode));
+ ...
+
+ // Allocate a node array of size 100.
+ status = gcfOpt_AllocateNodeArray(nodeArrayMemPool, &nodeArray, 100);
+ ...
+ // Free a node array.
+ gcfOpt_FreeNodeArray(&nodeArrayMemPool, nodeArray);
+
+ // After using the array memory pool, free it.
+ gcfMEM_FreeAFSMemPool(&nodeArrayMemPool);
+
+*******************************************************************************/
+
+/*******************************************************************************
+** To switch back to use gcoOS_Allocate and gcoOS_Free, add
+** #define USE_LOCAL_MEMORY_POOL 0
+** before including this file.
+*******************************************************************************/
+#ifndef USE_LOCAL_MEMORY_POOL
+/*
+ USE_LOCAL_MEMORY_POOL
+
+ This define enables the local memory management to improve performance.
+*/
+#define USE_LOCAL_MEMORY_POOL 1
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Structures
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+#else
+ typedef gcoOS gcsMEM_FS_MEM_POOL;
+ typedef gcoOS gcsMEM_VS_MEM_POOL;
+ typedef gcoOS gcsMEM_AFS_MEM_POOL;
+#endif
+
+/*******************************************************************************
+** Memory Pool Macros
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ gcmERR_RETURN(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+ gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type)); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcfMEM_FSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName##List( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * FirstPointer, \
+ Type * LastPointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x FirstPointer=0x%x LastPointer=0x%x", MemPool, FirstPointer, LastPointer); \
+ status = gcfMEM_FSMemPoolFreeAList(MemPool, (gctPOINTER) FirstPointer, (gctPOINTER) LastPointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status;\
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ status = gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+ Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ gcmERR_RETURN(gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer)); \
+ gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, size); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pinter); \
+ status = gcfMEM_VSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ status = gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ gcmERR_RETURN(gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer)); \
+ gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type)); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcfMEM_AFSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#else
+
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type)); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcmOS_SAFE_FREE(MemPool, Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ status = gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer)); \
+ gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Size); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcmOS_SAFE_FREE(MemPool, Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ status = gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type)); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcmOS_SAFE_FREE(MemPool, Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Functions
+*******************************************************************************/
+gceSTATUS
+gcfMEM_InitFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolGetANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeAList(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER FirstNode,
+ IN gctPOINTER LastNode
+ );
+
+gceSTATUS
+gcfMEM_InitVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT BlockSize,
+ IN gctBOOL RecycleFreeNode
+ );
+
+gceSTATUS
+gcfMEM_FreeVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolGetANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctUINT Size,
+ IN gctUINT Alignment,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolFreeANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_InitAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolGetANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctUINT Count,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolFreeANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VIVANTE_NO_3D */
+#endif /* __gc_hal_mem_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_options.h b/src/include_imx6_v4_0_0/gc_hal_options.h
new file mode 100644
index 0000000..86e9133
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_options.h
@@ -0,0 +1,861 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_options_h_
+#define __gc_hal_options_h_
+
+/*
+ gcdPRINT_VERSION
+
+ Print HAL version.
+*/
+#ifndef gcdPRINT_VERSION
+# define gcdPRINT_VERSION 0
+#endif
+
+/*
+ USE_NEW_LINUX_SIGNAL
+
+ This define enables the Linux kernel signaling between kernel and user.
+*/
+#ifndef USE_NEW_LINUX_SIGNAL
+# define USE_NEW_LINUX_SIGNAL 0
+#endif
+
+/*
+ VIVANTE_PROFILER
+
+ This define enables the profiler.
+*/
+#ifndef VIVANTE_PROFILER
+# define VIVANTE_PROFILER 0
+#endif
+
+#ifndef VIVANTE_PROFILER_PERDRAW
+# define VIVANTE_PROFILER_PERDRAW 0
+#endif
+
+/*
+ gcdUSE_VG
+
+ Enable VG HAL layer (only for GC350).
+*/
+#ifndef gcdUSE_VG
+# define gcdUSE_VG 0
+#endif
+
+/*
+ USE_SW_FB
+
+ Set to 1 if the frame buffer memory cannot be accessed by the GPU.
+*/
+#ifndef USE_SW_FB
+# define USE_SW_FB 0
+#endif
+
+/*
+ USE_SUPER_SAMPLING
+
+ This define enables super-sampling support.
+*/
+#define USE_SUPER_SAMPLING 0
+
+/*
+ PROFILE_HAL_COUNTERS
+
+ This define enables HAL counter profiling support. HW and SHADER
+ counter profiling depends on this.
+*/
+#ifndef PROFILE_HAL_COUNTERS
+# define PROFILE_HAL_COUNTERS 1
+#endif
+
+/*
+ PROFILE_HW_COUNTERS
+
+ This define enables HW counter profiling support.
+*/
+#ifndef PROFILE_HW_COUNTERS
+# define PROFILE_HW_COUNTERS 1
+#endif
+
+/*
+ PROFILE_SHADER_COUNTERS
+
+ This define enables SHADER counter profiling support.
+*/
+#ifndef PROFILE_SHADER_COUNTERS
+# define PROFILE_SHADER_COUNTERS 1
+#endif
+
+/*
+ COMMAND_PROCESSOR_VERSION
+
+ The version of the command buffer and task manager.
+*/
+#define COMMAND_PROCESSOR_VERSION 1
+
+/*
+ gcdDUMP
+
+ When set to 1, a dump of all states and memory uploads, as well as other
+ hardware related execution will be printed to the debug console. This
+ data can be used for playing back applications.
+*/
+#ifndef gcdDUMP
+# define gcdDUMP 0
+#endif
+
+/*
+ gcdDUMP_API
+
+ When set to 1, a high level dump of the EGL and GL/VG APs's are
+ captured.
+*/
+#ifndef gcdDUMP_API
+# define gcdDUMP_API 0
+#endif
+
+/*
+ gcdDUMP_FRAMERATE
+ When set to a value other than zero, averaqe frame rate will be dumped.
+ The value set is the starting frame that the average will be calculated.
+ This is needed because sometimes first few frames are too slow to be included
+ in the average. Frame count starts from 1.
+*/
+#ifndef gcdDUMP_FRAMERATE
+# define gcdDUMP_FRAMERATE 0
+#endif
+
+/*
+ gcdVIRTUAL_COMMAND_BUFFER
+ When set to 1, user command buffer and context buffer will be allocated
+ from gcvPOOL_VIRTUAL.
+*/
+#ifndef gcdVIRTUAL_COMMAND_BUFFER
+# define gcdVIRTUAL_COMMAND_BUFFER 0
+#endif
+
+/*
+ gcdENABLE_FSCALE_VAL_ADJUST
+ When non-zero, FSCALE_VAL when gcvPOWER_ON can be adjusted externally.
+ */
+#ifndef gcdENABLE_FSCALE_VAL_ADJUST
+# define gcdENABLE_FSCALE_VAL_ADJUST 1
+#endif
+
+/*
+ gcdDUMP_IN_KERNEL
+
+ When set to 1, all dumps will happen in the kernel. This is handy if
+ you want the kernel to dump its command buffers as well and the data
+ needs to be in sync.
+*/
+#ifndef gcdDUMP_IN_KERNEL
+# define gcdDUMP_IN_KERNEL 0
+#endif
+
+/*
+ gcdDUMP_COMMAND
+
+ When set to non-zero, the command queue will dump all incoming command
+ and context buffers as well as all other modifications to the command
+ queue.
+*/
+#ifndef gcdDUMP_COMMAND
+# define gcdDUMP_COMMAND 0
+#endif
+
+/*
+ gcdDUMP_FRAME_TGA
+
+ When set to a value other than 0, a dump of the frame specified by the value,
+ will be done into frame.tga. Frame count starts from 1.
+ */
+#ifndef gcdDUMP_FRAME_TGA
+#define gcdDUMP_FRAME_TGA 0
+#endif
+/*
+ gcdNULL_DRIVER
+
+ Set to 1 for infinite speed hardware.
+ Set to 2 for bypassing the HAL.
+ Set to 3 for bypassing the drivers.
+*/
+#ifndef gcdNULL_DRIVER
+# define gcdNULL_DRIVER 0
+#endif
+
+/*
+ gcdENABLE_TIMEOUT_DETECTION
+
+ Enable timeout detection.
+*/
+#ifndef gcdENABLE_TIMEOUT_DETECTION
+# define gcdENABLE_TIMEOUT_DETECTION 0
+#endif
+
+/*
+ gcdCMD_BUFFER_SIZE
+
+ Number of bytes in a command buffer.
+*/
+#ifndef gcdCMD_BUFFER_SIZE
+# define gcdCMD_BUFFER_SIZE (128 << 10)
+#endif
+
+/*
+ gcdCMD_BUFFERS
+
+ Number of command buffers to use per client.
+*/
+#ifndef gcdCMD_BUFFERS
+# define gcdCMD_BUFFERS 2
+#endif
+
+/*
+ gcdMAX_CMD_BUFFERS
+
+ Maximum number of command buffers to use per client.
+*/
+#ifndef gcdMAX_CMD_BUFFERS
+# define gcdMAX_CMD_BUFFERS 8
+#endif
+
+/*
+ gcdCOMMAND_QUEUES
+
+ Number of command queues in the kernel.
+*/
+#ifndef gcdCOMMAND_QUEUES
+# define gcdCOMMAND_QUEUES 2
+#endif
+
+/*
+ gcdPOWER_CONTROL_DELAY
+
+ The delay in milliseconds required to wait until the GPU has woke up
+ from a suspend or power-down state. This is system dependent because
+ the bus clock also needs to stabalize.
+*/
+#ifndef gcdPOWER_CONTROL_DELAY
+# define gcdPOWER_CONTROL_DELAY 0
+#endif
+
+/*
+ gcdMIRROR_PAGETABLE
+
+ Enable it when GPUs with old MMU and new MMU exist at same SoC. It makes
+ each GPU use same virtual address to access same physical memory.
+*/
+#ifndef gcdMIRROR_PAGETABLE
+# define gcdMIRROR_PAGETABLE 0
+#endif
+
+/*
+ gcdMMU_SIZE
+
+ Size of the MMU page table in bytes. Each 4 bytes can hold 4kB worth of
+ virtual data.
+*/
+#ifndef gcdMMU_SIZE
+#if gcdMIRROR_PAGETABLE
+# define gcdMMU_SIZE 0x200000
+#else
+# define gcdMMU_SIZE (2048 << 10)
+#endif
+#endif
+
+/*
+ gcdSECURE_USER
+
+ Use logical addresses instead of physical addresses in user land. In
+ this case a hint table is created for both command buffers and context
+ buffers, and that hint table will be used to patch up those buffers in
+ the kernel when they are ready to submit.
+*/
+#ifndef gcdSECURE_USER
+# define gcdSECURE_USER 0
+#endif
+
+/*
+ gcdSECURE_CACHE_SLOTS
+
+ Number of slots in the logical to DMA address cache table. Each time a
+ logical address needs to be translated into a DMA address for the GPU,
+ this cache will be walked. The replacement scheme is LRU.
+*/
+#ifndef gcdSECURE_CACHE_SLOTS
+# define gcdSECURE_CACHE_SLOTS 1024
+#endif
+
+/*
+ gcdSECURE_CACHE_METHOD
+
+ Replacement scheme used for Secure Cache. The following options are
+ available:
+
+ gcdSECURE_CACHE_LRU
+ A standard LRU cache.
+
+ gcdSECURE_CACHE_LINEAR
+ A linear walker with the idea that an application will always
+ render the scene in a similar way, so the next entry in the
+ cache should be a hit most of the time.
+
+ gcdSECURE_CACHE_HASH
+ A 256-entry hash table.
+
+ gcdSECURE_CACHE_TABLE
+ A simple cache but with potential of a lot of cache replacement.
+*/
+#ifndef gcdSECURE_CACHE_METHOD
+# define gcdSECURE_CACHE_METHOD gcdSECURE_CACHE_HASH
+#endif
+
+/*
+ gcdREGISTER_ACCESS_FROM_USER
+
+ Set to 1 to allow IOCTL calls to get through from user land. This
+ should only be in debug or development drops.
+*/
+#ifndef gcdREGISTER_ACCESS_FROM_USER
+# define gcdREGISTER_ACCESS_FROM_USER 1
+#endif
+
+/*
+ gcdHEAP_SIZE
+
+ Set the allocation size for the internal heaps. Each time a heap is
+ full, a new heap will be allocated with this minmimum amount of bytes.
+ The bigger this size, the fewer heaps there are to allocate, the better
+ the performance. However, heaps won't be freed until they are
+ completely free, so there might be some more memory waste if the size is
+ too big.
+*/
+#ifndef gcdHEAP_SIZE
+# define gcdHEAP_SIZE (64 << 10)
+#endif
+
+/*
+ gcdPOWER_MANAGEMENT
+
+ This define enables the power management code.
+*/
+#ifndef gcdPOWER_MANAGEMENT
+# define gcdPOWER_MANAGEMENT 1
+#endif
+
+/*
+ gcdPOWER_SUSNPEND_WHEN_IDLE
+
+ Set to 1 to make GPU enter gcvPOWER_SUSPEND when idle detected,
+ otherwise GPU will enter gcvPOWER_IDLE.
+*/
+#ifndef gcdPOWER_SUSNPEND_WHEN_IDLE
+# define gcdPOWER_SUSNPEND_WHEN_IDLE 1
+#endif
+
+/*
+ gcdFPGA_BUILD
+
+ This define enables work arounds for FPGA images.
+*/
+#ifndef gcdFPGA_BUILD
+# define gcdFPGA_BUILD 0
+#endif
+
+/*
+ gcdGPU_TIMEOUT
+
+ This define specified the number of milliseconds the system will wait
+ before it broadcasts the GPU is stuck. In other words, it will define
+ the timeout of any operation that needs to wait for the GPU.
+
+ If the value is 0, no timeout will be checked for.
+*/
+#ifndef gcdGPU_TIMEOUT
+# if gcdFPGA_BUILD
+# define gcdGPU_TIMEOUT 0
+# else
+# define gcdGPU_TIMEOUT 20000
+# endif
+#endif
+
+/*
+ gcdGPU_ADVANCETIMER
+
+ it is advance timer.
+*/
+#ifndef gcdGPU_ADVANCETIMER
+# define gcdGPU_ADVANCETIMER 250
+#endif
+
+/*
+ gcdSTATIC_LINK
+
+ This define disalbes static linking;
+*/
+#ifndef gcdSTATIC_LINK
+# define gcdSTATIC_LINK 0
+#endif
+
+/*
+ gcdUSE_NEW_HEAP
+
+ Setting this define to 1 enables new heap.
+*/
+#ifndef gcdUSE_NEW_HEAP
+# define gcdUSE_NEW_HEAP 0
+#endif
+
+/*
+ gcdCMD_NO_2D_CONTEXT
+
+ This define enables no-context 2D command buffer.
+*/
+#ifndef gcdCMD_NO_2D_CONTEXT
+# define gcdCMD_NO_2D_CONTEXT 1
+#endif
+
+/*
+ gcdENABLE_BANK_ALIGNMENT
+
+ When enabled, video memory is allocated bank aligned. The vendor can modify
+ _GetSurfaceBankAlignment() and gcoSURF_GetBankOffsetBytes() to define how
+ different types of allocations are bank and channel aligned.
+ When disabled (default), no bank alignment is done.
+*/
+#ifndef gcdENABLE_BANK_ALIGNMENT
+# define gcdENABLE_BANK_ALIGNMENT 0
+#endif
+
+/*
+ gcdBANK_BIT_START
+
+ Specifies the start bit of the bank (inclusive).
+*/
+#ifndef gcdBANK_BIT_START
+# define gcdBANK_BIT_START 12
+#endif
+
+/*
+ gcdBANK_BIT_END
+
+ Specifies the end bit of the bank (inclusive).
+*/
+#ifndef gcdBANK_BIT_END
+# define gcdBANK_BIT_END 14
+#endif
+
+/*
+ gcdBANK_CHANNEL_BIT
+
+ When set, video memory when allocated bank aligned is allocated such that
+ render and depth buffer addresses alternate on the channel bit specified.
+ This option has an effect only when gcdENABLE_BANK_ALIGNMENT is enabled.
+ When disabled (default), no alteration is done.
+*/
+#ifndef gcdBANK_CHANNEL_BIT
+# define gcdBANK_CHANNEL_BIT 7
+#endif
+
+/*
+ gcdDYNAMIC_SPEED
+
+ When non-zero, it informs the kernel driver to use the speed throttling
+ broadcasting functions to inform the system the GPU should be spet up or
+ slowed down. It will send a broadcast for slowdown each "interval"
+ specified by this define in milliseconds
+ (gckOS_BroadcastCalibrateSpeed).
+*/
+#ifndef gcdDYNAMIC_SPEED
+# define gcdDYNAMIC_SPEED 2000
+#endif
+
+/*
+ gcdDYNAMIC_EVENT_THRESHOLD
+
+ When non-zero, it specifies the maximum number of available events at
+ which the kernel driver will issue a broadcast to speed up the GPU
+ (gckOS_BroadcastHurry).
+*/
+#ifndef gcdDYNAMIC_EVENT_THRESHOLD
+# define gcdDYNAMIC_EVENT_THRESHOLD 5
+#endif
+
+/*
+ gcdENABLE_PROFILING
+
+ Enable profiling macros.
+*/
+#ifndef gcdENABLE_PROFILING
+# define gcdENABLE_PROFILING 0
+#endif
+
+/*
+ gcdENABLE_128B_MERGE
+
+ Enable 128B merge for the BUS control.
+*/
+#ifndef gcdENABLE_128B_MERGE
+# define gcdENABLE_128B_MERGE 0
+#endif
+
+/*
+ gcdFRAME_DB
+
+ When non-zero, it specified the number of frames inside the frame
+ database. The frame DB will collect per-frame timestamps and hardware
+ counters.
+*/
+#ifndef gcdFRAME_DB
+# define gcdFRAME_DB 0
+# define gcdFRAME_DB_RESET 0
+# define gcdFRAME_DB_NAME "/var/log/frameDB.log"
+#endif
+
+/*
+ gcdENABLE_VG
+ enable the 2D openVG
+*/
+
+#ifndef gcdENABLE_VG
+# define gcdENABLE_VG 0
+#endif
+
+/*
+ gcdDYNAMIC_MAP_RESERVED_MEMORY
+
+ When gcvPOOL_SYSTEM is constructed from RESERVED memory,
+ driver can map the whole reserved memory to kernel space
+ at the beginning, or just map a piece of memory when need
+ to access.
+
+ Notice:
+ - It's only for the 2D openVG. For other cores, there is
+ _NO_ need to map reserved memory to kernel.
+ - It's meaningless when memory is allocated by
+ gckOS_AllocateContiguous, in that case, memory is always
+ mapped by system when allocated.
+*/
+#ifndef gcdDYNAMIC_MAP_RESERVED_MEMORY
+# define gcdDYNAMIC_MAP_RESERVED_MEMORY 1
+#endif
+
+/*
+ gcdPAGED_MEMORY_CACHEABLE
+
+ When non-zero, paged memory will be cacheable.
+
+ Normally, driver will detemines whether a video memory
+ is cacheable or not. When cacheable is not neccessary,
+ it will be writecombine.
+
+ This option is only for those SOC which can't enable
+ writecombine without enabling cacheable.
+*/
+
+#ifndef gcdPAGED_MEMORY_CACHEABLE
+# define gcdPAGED_MEMORY_CACHEABLE 0
+#endif
+
+/*
+ gcdNONPAGED_MEMORY_CACHEABLE
+
+ When non-zero, non paged memory will be cacheable.
+*/
+
+#ifndef gcdNONPAGED_MEMORY_CACHEABLE
+# define gcdNONPAGED_MEMORY_CACHEABLE 0
+#endif
+
+/*
+ gcdNONPAGED_MEMORY_BUFFERABLE
+
+ When non-zero, non paged memory will be bufferable.
+ gcdNONPAGED_MEMORY_BUFFERABLE and gcdNONPAGED_MEMORY_CACHEABLE
+ can't be set 1 at same time
+*/
+
+#ifndef gcdNONPAGED_MEMORY_BUFFERABLE
+# define gcdNONPAGED_MEMORY_BUFFERABLE 1
+#endif
+
+/*
+ gcdENABLE_INFINITE_SPEED_HW
+ enable the Infinte HW , this is for 2D openVG
+*/
+
+#ifndef gcdENABLE_INFINITE_SPEED_HW
+# define gcdENABLE_INFINITE_SPEED_HW 0
+#endif
+
+/*
+ gcdENABLE_TS_DOUBLE_BUFFER
+ enable the TS double buffer, this is for 2D openVG
+*/
+
+#ifndef gcdENABLE_TS_DOUBLE_BUFFER
+# define gcdENABLE_TS_DOUBLE_BUFFER 1
+#endif
+
+/*
+ gcd6000_SUPPORT
+
+ Temporary define to enable/disable 6000 support.
+ */
+#ifndef gcd6000_SUPPORT
+# define gcd6000_SUPPORT 0
+#endif
+
+/*
+ gcdPOWEROFF_TIMEOUT
+
+ When non-zero, GPU will power off automatically from
+ idle state, and gcdPOWEROFF_TIMEOUT is also the default
+ timeout in milliseconds.
+ */
+
+#ifndef gcdPOWEROFF_TIMEOUT
+# define gcdPOWEROFF_TIMEOUT 300
+#endif
+
+/*
+ gcdUSE_VIDMEM_PER_PID
+*/
+#ifndef gcdUSE_VIDMEM_PER_PID
+# define gcdUSE_VIDMEM_PER_PID 0
+#endif
+
+/*
+ QNX_SINGLE_THREADED_DEBUGGING
+*/
+#ifndef QNX_SINGLE_THREADED_DEBUGGING
+# define QNX_SINGLE_THREADED_DEBUGGING 0
+#endif
+
+/*
+ gcdENABLE_RECOVERY
+
+ This define enables the recovery code.
+*/
+#ifndef gcdENABLE_RECOVERY
+# define gcdENABLE_RECOVERY 1
+#endif
+
+/*
+ gcdRENDER_THREADS
+
+ Number of render threads. Make it zero, and there will be no render
+ threads.
+*/
+#ifndef gcdRENDER_THREADS
+# define gcdRENDER_THREADS 0
+#endif
+
+/*
+ gcdSMP
+
+ This define enables SMP support.
+
+ Currently, it only works on Linux/Android,
+ Kbuild will config it according to whether
+ CONFIG_SMP is set.
+
+*/
+#ifndef gcdSMP
+# define gcdSMP 0
+#endif
+
+/*
+ gcdSUPPORT_SWAP_RECTANGLE
+
+ Support swap with a specific rectangle.
+
+ Set the rectangle with eglSetSwapRectangleANDROID api.
+*/
+#ifndef gcdSUPPORT_SWAP_RECTANGLE
+# define gcdSUPPORT_SWAP_RECTANGLE 0
+#endif
+
+/*
+ gcdDEFER_RESOLVES
+
+ Support deferred resolves for 3D apps.
+*/
+#ifndef gcdDEFER_RESOLVES
+# define gcdDEFER_RESOLVES 0
+#endif
+
+/*
+ gcdCOPYBLT_OPTIMIZATION
+
+ Combine dirty areas resulting from Android's copyBlt.
+*/
+#ifndef gcdCOPYBLT_OPTIMIZATION
+# define gcdCOPYBLT_OPTIMIZATION 0
+#endif
+
+/*
+ gcdGPU_LINEAR_BUFFER_ENABLED
+
+ Use linear buffer for GPU apps so HWC can do 2D composition.
+*/
+#ifndef gcdGPU_LINEAR_BUFFER_ENABLED
+# define gcdGPU_LINEAR_BUFFER_ENABLED 0
+#endif
+
+/*
+ gcdSHARED_RESOLVE_BUFFER_ENABLED
+
+ Use shared resolve buffer for all app buffers.
+*/
+#ifndef gcdSHARED_RESOLVE_BUFFER_ENABLED
+# define gcdSHARED_RESOLVE_BUFFER_ENABLED 0
+#endif
+
+/*
+ gcdUSE_TRIANGLE_STRIP_PATCH
+ */
+#ifndef gcdUSE_TRIANGLE_STRIP_PATCH
+# define gcdUSE_TRIANGLE_STRIP_PATCH 1
+#endif
+
+/*
+ gcdENABLE_OUTER_CACHE_PATCH
+
+ Enable the outer cache patch.
+*/
+#ifndef gcdENABLE_OUTER_CACHE_PATCH
+# define gcdENABLE_OUTER_CACHE_PATCH 0
+#endif
+
+#ifndef gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST
+# define gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST 0
+#endif
+
+#ifndef gcdENABLE_PE_DITHER_FIX
+# define gcdENABLE_PE_DITHER_FIX 1
+#endif
+
+#ifndef gcdSHARED_PAGETABLE
+# define gcdSHARED_PAGETABLE 1
+#endif
+#ifndef gcdUSE_PVR
+# define gcdUSE_PVR 1
+#endif
+
+/*
+ gcdSMALL_BLOCK_SIZE
+
+ When non-zero, a part of VIDMEM will be reserved for requests
+ whose requesting size is less than gcdSMALL_BLOCK_SIZE.
+
+ For Linux, it's the size of a page. If this requeset fallbacks
+ to gcvPOOL_CONTIGUOUS or gcvPOOL_VIRTUAL, memory will be wasted
+ because they allocate a page at least.
+ */
+#ifndef gcdSMALL_BLOCK_SIZE
+# define gcdSMALL_BLOCK_SIZE 4096
+# define gcdRATIO_FOR_SMALL_MEMORY 32
+#endif
+
+/*
+ gcdCONTIGUOUS_SIZE_LIMIT
+ When non-zero, size of video node from gcvPOOL_CONTIGUOUS is
+ limited by gcdCONTIGUOUS_SIZE_LIMIT.
+ */
+#ifndef gcdCONTIGUOUS_SIZE_LIMIT
+# define gcdCONTIGUOUS_SIZE_LIMIT 0
+#endif
+
+#ifndef gcdDISALBE_EARLY_EARLY_Z
+# define gcdDISALBE_EARLY_EARLY_Z 1
+#endif
+
+/*
+ gcdLINK_QUEUE_SIZE
+
+ When non-zero, driver maintains a queue to record information of
+ latest lined context buffer and command buffer. Data in this queue
+ is be used to debug.
+*/
+#ifndef gcdLINK_QUEUE_SIZE
+# define gcdLINK_QUEUE_SIZE 0
+#endif
+
+/* gcdALPHA_KILL_IN_SHADER
+ *
+ * Enable alpha kill inside the shader. This will be set automatically by the
+ * HAL if certain states match a criteria.
+ */
+#ifndef gcdALPHA_KILL_IN_SHADER
+# define gcdALPHA_KILL_IN_SHADER 1
+#endif
+
+/* gcdHIGH_PRECISION_DELAY_ENABLE
+ *
+ * Enable high precision schedule delay with 1ms unit. otherwise schedule delay up to 10ms.
+ * Browser app performance will have obvious drop without this enablement
+ */
+#ifndef gcdHIGH_PRECISION_DELAY_ENABLE
+# define gcdHIGH_PRECISION_DELAY_ENABLE 1
+#endif
+
+#ifndef gcdUSE_WCLIP_PATCH
+# define gcdUSE_WCLIP_PATCH 1
+#endif
+
+#ifndef gcdHZ_L2_DISALBE
+# define gcdHZ_L2_DISALBE 1
+#endif
+
+#ifndef gcdBUGFIX15_DISABLE
+# define gcdBUGFIX15_DISABLE 1
+#endif
+
+#ifndef gcdDISABLE_HZ_FAST_CLEAR
+# define gcdDISABLE_HZ_FAST_CLEAR 1
+#endif
+
+#ifndef gcdUSE_NPOT_PATCH
+#define gcdUSE_NPOT_PATCH 1
+#endif
+
+
+#ifndef gcdSYNC
+# define gcdSYNC 1
+#endif
+
+/*
+ gcdDVFS
+
+ When non-zero, software will make use of dynamic voltage and
+ frequency feature.
+ */
+#ifndef gcdDVFS
+# define gcdDVFS 0
+# define gcdDVFS_ANAYLSE_WINDOW 4
+# define gcdDVFS_POLLING_TIME (gcdDVFS_ANAYLSE_WINDOW * 4)
+#endif
+
+#endif /* __gc_hal_options_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_profiler.h b/src/include_imx6_v4_0_0/gc_hal_profiler.h
new file mode 100644
index 0000000..3e450ba
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_profiler.h
@@ -0,0 +1,1336 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_profiler_h_
+#define __gc_hal_profiler_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define GLVERTEX_OBJECT 10
+#define GLVERTEX_OBJECT_BYTES 11
+
+#define GLINDEX_OBJECT 20
+#define GLINDEX_OBJECT_BYTES 21
+
+#define GLTEXTURE_OBJECT 30
+#define GLTEXTURE_OBJECT_BYTES 31
+
+#if VIVANTE_PROFILER
+#define gcmPROFILE_GC(Enum, Value) gcoPROFILER_Count(gcvNULL, Enum, Value)
+#else
+#define gcmPROFILE_GC(Enum, Value) do { } while (gcvFALSE)
+#endif
+
+#ifndef gcdNEW_PROFILER_FILE
+#define gcdNEW_PROFILER_FILE 1
+#endif
+
+/* OpenGL ES11 API IDs. */
+#define ES11_ACTIVETEXTURE 1
+#define ES11_ALPHAFUNC (ES11_ACTIVETEXTURE + 1)
+#define ES11_ALPHAFUNCX (ES11_ALPHAFUNC + 1)
+#define ES11_BINDBUFFER (ES11_ALPHAFUNCX + 1)
+#define ES11_BINDTEXTURE (ES11_BINDBUFFER + 1)
+#define ES11_BLENDFUNC (ES11_BINDTEXTURE + 1)
+#define ES11_BUFFERDATA (ES11_BLENDFUNC + 1)
+#define ES11_BUFFERSUBDATA (ES11_BUFFERDATA + 1)
+#define ES11_CLEAR (ES11_BUFFERSUBDATA + 1)
+#define ES11_CLEARCOLOR (ES11_CLEAR + 1)
+#define ES11_CLEARCOLORX (ES11_CLEARCOLOR + 1)
+#define ES11_CLEARDEPTHF (ES11_CLEARCOLORX + 1)
+#define ES11_CLEARDEPTHX (ES11_CLEARDEPTHF + 1)
+#define ES11_CLEARSTENCIL (ES11_CLEARDEPTHX + 1)
+#define ES11_CLIENTACTIVETEXTURE (ES11_CLEARSTENCIL + 1)
+#define ES11_CLIPPLANEF (ES11_CLIENTACTIVETEXTURE + 1)
+#define ES11_CLIPPLANEX (ES11_CLIPPLANEF + 1)
+#define ES11_COLOR4F (ES11_CLIPPLANEX + 1)
+#define ES11_COLOR4UB (ES11_COLOR4F + 1)
+#define ES11_COLOR4X (ES11_COLOR4UB + 1)
+#define ES11_COLORMASK (ES11_COLOR4X + 1)
+#define ES11_COLORPOINTER (ES11_COLORMASK + 1)
+#define ES11_COMPRESSEDTEXIMAGE2D (ES11_COLORPOINTER + 1)
+#define ES11_COMPRESSEDTEXSUBIMAGE2D (ES11_COMPRESSEDTEXIMAGE2D + 1)
+#define ES11_COPYTEXIMAGE2D (ES11_COMPRESSEDTEXSUBIMAGE2D + 1)
+#define ES11_COPYTEXSUBIMAGE2D (ES11_COPYTEXIMAGE2D + 1)
+#define ES11_CULLFACE (ES11_COPYTEXSUBIMAGE2D + 1)
+#define ES11_DELETEBUFFERS (ES11_CULLFACE + 1)
+#define ES11_DELETETEXTURES (ES11_DELETEBUFFERS + 1)
+#define ES11_DEPTHFUNC (ES11_DELETETEXTURES + 1)
+#define ES11_DEPTHMASK (ES11_DEPTHFUNC + 1)
+#define ES11_DEPTHRANGEF (ES11_DEPTHMASK + 1)
+#define ES11_DEPTHRANGEX (ES11_DEPTHRANGEF + 1)
+#define ES11_DISABLE (ES11_DEPTHRANGEX + 1)
+#define ES11_DISABLECLIENTSTATE (ES11_DISABLE + 1)
+#define ES11_DRAWARRAYS (ES11_DISABLECLIENTSTATE + 1)
+#define ES11_DRAWELEMENTS (ES11_DRAWARRAYS + 1)
+#define ES11_ENABLE (ES11_DRAWELEMENTS + 1)
+#define ES11_ENABLECLIENTSTATE (ES11_ENABLE + 1)
+#define ES11_FINISH (ES11_ENABLECLIENTSTATE + 1)
+#define ES11_FLUSH (ES11_FINISH + 1)
+#define ES11_FOGF (ES11_FLUSH + 1)
+#define ES11_FOGFV (ES11_FOGF + 1)
+#define ES11_FOGX (ES11_FOGFV + 1)
+#define ES11_FOGXV (ES11_FOGX + 1)
+#define ES11_FRONTFACE (ES11_FOGXV + 1)
+#define ES11_FRUSTUMF (ES11_FRONTFACE + 1)
+#define ES11_FRUSTUMX (ES11_FRUSTUMF + 1)
+#define ES11_GENBUFFERS (ES11_FRUSTUMX + 1)
+#define ES11_GENTEXTURES (ES11_GENBUFFERS + 1)
+#define ES11_GETBOOLEANV (ES11_GENTEXTURES + 1)
+#define ES11_GETBUFFERPARAMETERIV (ES11_GETBOOLEANV + 1)
+#define ES11_GETCLIPPLANEF (ES11_GETBUFFERPARAMETERIV + 1)
+#define ES11_GETCLIPPLANEX (ES11_GETCLIPPLANEF + 1)
+#define ES11_GETERROR (ES11_GETCLIPPLANEX + 1)
+#define ES11_GETFIXEDV (ES11_GETERROR + 1)
+#define ES11_GETFLOATV (ES11_GETFIXEDV + 1)
+#define ES11_GETINTEGERV (ES11_GETFLOATV + 1)
+#define ES11_GETLIGHTFV (ES11_GETINTEGERV + 1)
+#define ES11_GETLIGHTXV (ES11_GETLIGHTFV + 1)
+#define ES11_GETMATERIALFV (ES11_GETLIGHTXV + 1)
+#define ES11_GETMATERIALXV (ES11_GETMATERIALFV + 1)
+#define ES11_GETPOINTERV (ES11_GETMATERIALXV + 1)
+#define ES11_GETSTRING (ES11_GETPOINTERV + 1)
+#define ES11_GETTEXENVFV (ES11_GETSTRING + 1)
+#define ES11_GETTEXENVIV (ES11_GETTEXENVFV + 1)
+#define ES11_GETTEXENVXV (ES11_GETTEXENVIV + 1)
+#define ES11_GETTEXPARAMETERFV (ES11_GETTEXENVXV + 1)
+#define ES11_GETTEXPARAMETERIV (ES11_GETTEXPARAMETERFV + 1)
+#define ES11_GETTEXPARAMETERXV (ES11_GETTEXPARAMETERIV + 1)
+#define ES11_HINT (ES11_GETTEXPARAMETERXV + 1)
+#define ES11_ISBUFFER (ES11_HINT + 1)
+#define ES11_ISENABLED (ES11_ISBUFFER + 1)
+#define ES11_ISTEXTURE (ES11_ISENABLED + 1)
+#define ES11_LIGHTF (ES11_ISTEXTURE + 1)
+#define ES11_LIGHTFV (ES11_LIGHTF + 1)
+#define ES11_LIGHTMODELF (ES11_LIGHTFV + 1)
+#define ES11_LIGHTMODELFV (ES11_LIGHTMODELF + 1)
+#define ES11_LIGHTMODELX (ES11_LIGHTMODELFV + 1)
+#define ES11_LIGHTMODELXV (ES11_LIGHTMODELX + 1)
+#define ES11_LIGHTX (ES11_LIGHTMODELXV + 1)
+#define ES11_LIGHTXV (ES11_LIGHTX + 1)
+#define ES11_LINEWIDTH (ES11_LIGHTXV + 1)
+#define ES11_LINEWIDTHX (ES11_LINEWIDTH + 1)
+#define ES11_LOADIDENTITY (ES11_LINEWIDTHX + 1)
+#define ES11_LOADMATRIXF (ES11_LOADIDENTITY + 1)
+#define ES11_LOADMATRIXX (ES11_LOADMATRIXF + 1)
+#define ES11_LOGICOP (ES11_LOADMATRIXX + 1)
+#define ES11_MATERIALF (ES11_LOGICOP + 1)
+#define ES11_MATERIALFV (ES11_MATERIALF + 1)
+#define ES11_MATERIALX (ES11_MATERIALFV + 1)
+#define ES11_MATERIALXV (ES11_MATERIALX + 1)
+#define ES11_MATRIXMODE (ES11_MATERIALXV + 1)
+#define ES11_MULTITEXCOORD4F (ES11_MATRIXMODE + 1)
+#define ES11_MULTITEXCOORD4X (ES11_MULTITEXCOORD4F + 1)
+#define ES11_MULTMATRIXF (ES11_MULTITEXCOORD4X + 1)
+#define ES11_MULTMATRIXX (ES11_MULTMATRIXF + 1)
+#define ES11_NORMAL3F (ES11_MULTMATRIXX + 1)
+#define ES11_NORMAL3X (ES11_NORMAL3F + 1)
+#define ES11_NORMALPOINTER (ES11_NORMAL3X + 1)
+#define ES11_ORTHOF (ES11_NORMALPOINTER + 1)
+#define ES11_ORTHOX (ES11_ORTHOF + 1)
+#define ES11_PIXELSTOREI (ES11_ORTHOX + 1)
+#define ES11_POINTPARAMETERF (ES11_PIXELSTOREI + 1)
+#define ES11_POINTPARAMETERFV (ES11_POINTPARAMETERF + 1)
+#define ES11_POINTPARAMETERX (ES11_POINTPARAMETERFV + 1)
+#define ES11_POINTPARAMETERXV (ES11_POINTPARAMETERX + 1)
+#define ES11_POINTSIZE (ES11_POINTPARAMETERXV + 1)
+#define ES11_POINTSIZEX (ES11_POINTSIZE + 1)
+#define ES11_POLYGONOFFSET (ES11_POINTSIZEX + 1)
+#define ES11_POLYGONOFFSETX (ES11_POLYGONOFFSET + 1)
+#define ES11_POPMATRIX (ES11_POLYGONOFFSETX + 1)
+#define ES11_PUSHMATRIX (ES11_POPMATRIX + 1)
+#define ES11_READPIXELS (ES11_PUSHMATRIX + 1)
+#define ES11_ROTATEF (ES11_READPIXELS + 1)
+#define ES11_ROTATEX (ES11_ROTATEF + 1)
+#define ES11_SAMPLECOVERAGE (ES11_ROTATEX + 1)
+#define ES11_SAMPLECOVERAGEX (ES11_SAMPLECOVERAGE + 1)
+#define ES11_SCALEF (ES11_SAMPLECOVERAGEX + 1)
+#define ES11_SCALEX (ES11_SCALEF + 1)
+#define ES11_SCISSOR (ES11_SCALEX + 1)
+#define ES11_SHADEMODEL (ES11_SCISSOR + 1)
+#define ES11_STENCILFUNC (ES11_SHADEMODEL + 1)
+#define ES11_STENCILMASK (ES11_STENCILFUNC + 1)
+#define ES11_STENCILOP (ES11_STENCILMASK + 1)
+#define ES11_TEXCOORDPOINTER (ES11_STENCILOP + 1)
+#define ES11_TEXENVF (ES11_TEXCOORDPOINTER + 1)
+#define ES11_TEXENVFV (ES11_TEXENVF + 1)
+#define ES11_TEXENVI (ES11_TEXENVFV + 1)
+#define ES11_TEXENVIV (ES11_TEXENVI + 1)
+#define ES11_TEXENVX (ES11_TEXENVIV + 1)
+#define ES11_TEXENVXV (ES11_TEXENVX + 1)
+#define ES11_TEXIMAGE2D (ES11_TEXENVXV + 1)
+#define ES11_TEXPARAMETERF (ES11_TEXIMAGE2D + 1)
+#define ES11_TEXPARAMETERFV (ES11_TEXPARAMETERF + 1)
+#define ES11_TEXPARAMETERI (ES11_TEXPARAMETERFV + 1)
+#define ES11_TEXPARAMETERIV (ES11_TEXPARAMETERI + 1)
+#define ES11_TEXPARAMETERX (ES11_TEXPARAMETERIV + 1)
+#define ES11_TEXPARAMETERXV (ES11_TEXPARAMETERX + 1)
+#define ES11_TEXSUBIMAGE2D (ES11_TEXPARAMETERXV + 1)
+#define ES11_TRANSLATEF (ES11_TEXSUBIMAGE2D + 1)
+#define ES11_TRANSLATEX (ES11_TRANSLATEF + 1)
+#define ES11_VERTEXPOINTER (ES11_TRANSLATEX + 1)
+#define ES11_VIEWPORT (ES11_VERTEXPOINTER + 1)
+#define ES11_BLENDEQUATIONOES (ES11_VIEWPORT + 1)
+#define ES11_BLENDFUNCSEPERATEOES (ES11_BLENDEQUATIONOES + 1)
+#define ES11_BLENDEQUATIONSEPARATEOES (ES11_BLENDFUNCSEPERATEOES + 1)
+#define ES11_GLMAPBUFFEROES (ES11_BLENDEQUATIONSEPARATEOES + 1)
+#define ES11_GLUNMAPBUFFEROES (ES11_GLMAPBUFFEROES + 1)
+#define ES11_GLGETBUFFERPOINTERVOES (ES11_GLUNMAPBUFFEROES + 1)
+#define ES11_CALLS (ES11_GLGETBUFFERPOINTERVOES + 1)
+#define ES11_DRAWCALLS (ES11_CALLS + 1)
+#define ES11_STATECHANGECALLS (ES11_DRAWCALLS + 1)
+#define ES11_POINTCOUNT (ES11_STATECHANGECALLS + 1)
+#define ES11_LINECOUNT (ES11_POINTCOUNT + 1)
+#define ES11_TRIANGLECOUNT (ES11_LINECOUNT + 1)
+
+/* OpenGL ES2X API IDs. */
+#define ES20_ACTIVETEXTURE 1
+#define ES20_ATTACHSHADER (ES20_ACTIVETEXTURE + 1)
+#define ES20_BINDATTRIBLOCATION (ES20_ATTACHSHADER + 1)
+#define ES20_BINDBUFFER (ES20_BINDATTRIBLOCATION + 1)
+#define ES20_BINDFRAMEBUFFER (ES20_BINDBUFFER + 1)
+#define ES20_BINDRENDERBUFFER (ES20_BINDFRAMEBUFFER + 1)
+#define ES20_BINDTEXTURE (ES20_BINDRENDERBUFFER + 1)
+#define ES20_BLENDCOLOR (ES20_BINDTEXTURE + 1)
+#define ES20_BLENDEQUATION (ES20_BLENDCOLOR + 1)
+#define ES20_BLENDEQUATIONSEPARATE (ES20_BLENDEQUATION + 1)
+#define ES20_BLENDFUNC (ES20_BLENDEQUATIONSEPARATE + 1)
+#define ES20_BLENDFUNCSEPARATE (ES20_BLENDFUNC + 1)
+#define ES20_BUFFERDATA (ES20_BLENDFUNCSEPARATE + 1)
+#define ES20_BUFFERSUBDATA (ES20_BUFFERDATA + 1)
+#define ES20_CHECKFRAMEBUFFERSTATUS (ES20_BUFFERSUBDATA + 1)
+#define ES20_CLEAR (ES20_CHECKFRAMEBUFFERSTATUS + 1)
+#define ES20_CLEARCOLOR (ES20_CLEAR + 1)
+#define ES20_CLEARDEPTHF (ES20_CLEARCOLOR + 1)
+#define ES20_CLEARSTENCIL (ES20_CLEARDEPTHF + 1)
+#define ES20_COLORMASK (ES20_CLEARSTENCIL + 1)
+#define ES20_COMPILESHADER (ES20_COLORMASK + 1)
+#define ES20_COMPRESSEDTEXIMAGE2D (ES20_COMPILESHADER + 1)
+#define ES20_COMPRESSEDTEXSUBIMAGE2D (ES20_COMPRESSEDTEXIMAGE2D + 1)
+#define ES20_COPYTEXIMAGE2D (ES20_COMPRESSEDTEXSUBIMAGE2D + 1)
+#define ES20_COPYTEXSUBIMAGE2D (ES20_COPYTEXIMAGE2D + 1)
+#define ES20_CREATEPROGRAM (ES20_COPYTEXSUBIMAGE2D + 1)
+#define ES20_CREATESHADER (ES20_CREATEPROGRAM + 1)
+#define ES20_CULLFACE (ES20_CREATESHADER + 1)
+#define ES20_DELETEBUFFERS (ES20_CULLFACE + 1)
+#define ES20_DELETEFRAMEBUFFERS (ES20_DELETEBUFFERS + 1)
+#define ES20_DELETEPROGRAM (ES20_DELETEFRAMEBUFFERS + 1)
+#define ES20_DELETERENDERBUFFERS (ES20_DELETEPROGRAM + 1)
+#define ES20_DELETESHADER (ES20_DELETERENDERBUFFERS + 1)
+#define ES20_DELETETEXTURES (ES20_DELETESHADER + 1)
+#define ES20_DEPTHFUNC (ES20_DELETETEXTURES + 1)
+#define ES20_DEPTHMASK (ES20_DEPTHFUNC + 1)
+#define ES20_DEPTHRANGEF (ES20_DEPTHMASK + 1)
+#define ES20_DETACHSHADER (ES20_DEPTHRANGEF + 1)
+#define ES20_DISABLE (ES20_DETACHSHADER + 1)
+#define ES20_DISABLEVERTEXATTRIBARRAY (ES20_DISABLE + 1)
+#define ES20_DRAWARRAYS (ES20_DISABLEVERTEXATTRIBARRAY + 1)
+#define ES20_DRAWELEMENTS (ES20_DRAWARRAYS + 1)
+#define ES20_ENABLE (ES20_DRAWELEMENTS + 1)
+#define ES20_ENABLEVERTEXATTRIBARRAY (ES20_ENABLE + 1)
+#define ES20_FINISH (ES20_ENABLEVERTEXATTRIBARRAY + 1)
+#define ES20_FLUSH (ES20_FINISH + 1)
+#define ES20_FRAMEBUFFERRENDERBUFFER (ES20_FLUSH + 1)
+#define ES20_FRAMEBUFFERTEXTURE2D (ES20_FRAMEBUFFERRENDERBUFFER + 1)
+#define ES20_FRONTFACE (ES20_FRAMEBUFFERTEXTURE2D + 1)
+#define ES20_GENBUFFERS (ES20_FRONTFACE + 1)
+#define ES20_GENERATEMIPMAP (ES20_GENBUFFERS + 1)
+#define ES20_GENFRAMEBUFFERS (ES20_GENERATEMIPMAP + 1)
+#define ES20_GENRENDERBUFFERS (ES20_GENFRAMEBUFFERS + 1)
+#define ES20_GENTEXTURES (ES20_GENRENDERBUFFERS + 1)
+#define ES20_GETACTIVEATTRIB (ES20_GENTEXTURES + 1)
+#define ES20_GETACTIVEUNIFORM (ES20_GETACTIVEATTRIB + 1)
+#define ES20_GETATTACHEDSHADERS (ES20_GETACTIVEUNIFORM + 1)
+#define ES20_GETATTRIBLOCATION (ES20_GETATTACHEDSHADERS + 1)
+#define ES20_GETBOOLEANV (ES20_GETATTRIBLOCATION + 1)
+#define ES20_GETBUFFERPARAMETERIV (ES20_GETBOOLEANV + 1)
+#define ES20_GETERROR (ES20_GETBUFFERPARAMETERIV + 1)
+#define ES20_GETFLOATV (ES20_GETERROR + 1)
+#define ES20_GETFRAMEBUFFERATTACHMENTPARAMETERIV (ES20_GETFLOATV + 1)
+#define ES20_GETINTEGERV (ES20_GETFRAMEBUFFERATTACHMENTPARAMETERIV + 1)
+#define ES20_GETPROGRAMIV (ES20_GETINTEGERV + 1)
+#define ES20_GETPROGRAMINFOLOG (ES20_GETPROGRAMIV + 1)
+#define ES20_GETRENDERBUFFERPARAMETERIV (ES20_GETPROGRAMINFOLOG + 1)
+#define ES20_GETSHADERIV (ES20_GETRENDERBUFFERPARAMETERIV + 1)
+#define ES20_GETSHADERINFOLOG (ES20_GETSHADERIV + 1)
+#define ES20_GETSHADERPRECISIONFORMAT (ES20_GETSHADERINFOLOG + 1)
+#define ES20_GETSHADERSOURCE (ES20_GETSHADERPRECISIONFORMAT + 1)
+#define ES20_GETSTRING (ES20_GETSHADERSOURCE + 1)
+#define ES20_GETTEXPARAMETERFV (ES20_GETSTRING + 1)
+#define ES20_GETTEXPARAMETERIV (ES20_GETTEXPARAMETERFV + 1)
+#define ES20_GETUNIFORMFV (ES20_GETTEXPARAMETERIV + 1)
+#define ES20_GETUNIFORMIV (ES20_GETUNIFORMFV + 1)
+#define ES20_GETUNIFORMLOCATION (ES20_GETUNIFORMIV + 1)
+#define ES20_GETVERTEXATTRIBFV (ES20_GETUNIFORMLOCATION + 1)
+#define ES20_GETVERTEXATTRIBIV (ES20_GETVERTEXATTRIBFV + 1)
+#define ES20_GETVERTEXATTRIBPOINTERV (ES20_GETVERTEXATTRIBIV + 1)
+#define ES20_HINT (ES20_GETVERTEXATTRIBPOINTERV + 1)
+#define ES20_ISBUFFER (ES20_HINT + 1)
+#define ES20_ISENABLED (ES20_ISBUFFER + 1)
+#define ES20_ISFRAMEBUFFER (ES20_ISENABLED + 1)
+#define ES20_ISPROGRAM (ES20_ISFRAMEBUFFER + 1)
+#define ES20_ISRENDERBUFFER (ES20_ISPROGRAM + 1)
+#define ES20_ISSHADER (ES20_ISRENDERBUFFER + 1)
+#define ES20_ISTEXTURE (ES20_ISSHADER + 1)
+#define ES20_LINEWIDTH (ES20_ISTEXTURE + 1)
+#define ES20_LINKPROGRAM (ES20_LINEWIDTH + 1)
+#define ES20_PIXELSTOREI (ES20_LINKPROGRAM + 1)
+#define ES20_POLYGONOFFSET (ES20_PIXELSTOREI + 1)
+#define ES20_READPIXELS (ES20_POLYGONOFFSET + 1)
+#define ES20_RELEASESHADERCOMPILER (ES20_READPIXELS + 1)
+#define ES20_RENDERBUFFERSTORAGE (ES20_RELEASESHADERCOMPILER + 1)
+#define ES20_SAMPLECOVERAGE (ES20_RENDERBUFFERSTORAGE + 1)
+#define ES20_SCISSOR (ES20_SAMPLECOVERAGE + 1)
+#define ES20_SHADERBINARY (ES20_SCISSOR + 1)
+#define ES20_SHADERSOURCE (ES20_SHADERBINARY + 1)
+#define ES20_STENCILFUNC (ES20_SHADERSOURCE + 1)
+#define ES20_STENCILFUNCSEPARATE (ES20_STENCILFUNC + 1)
+#define ES20_STENCILMASK (ES20_STENCILFUNCSEPARATE + 1)
+#define ES20_STENCILMASKSEPARATE (ES20_STENCILMASK + 1)
+#define ES20_STENCILOP (ES20_STENCILMASKSEPARATE + 1)
+#define ES20_STENCILOPSEPARATE (ES20_STENCILOP + 1)
+#define ES20_TEXIMAGE2D (ES20_STENCILOPSEPARATE + 1)
+#define ES20_TEXPARAMETERF (ES20_TEXIMAGE2D + 1)
+#define ES20_TEXPARAMETERFV (ES20_TEXPARAMETERF + 1)
+#define ES20_TEXPARAMETERI (ES20_TEXPARAMETERFV + 1)
+#define ES20_TEXPARAMETERIV (ES20_TEXPARAMETERI + 1)
+#define ES20_TEXSUBIMAGE2D (ES20_TEXPARAMETERIV + 1)
+#define ES20_UNIFORM1F (ES20_TEXSUBIMAGE2D + 1)
+#define ES20_UNIFORM1FV (ES20_UNIFORM1F + 1)
+#define ES20_UNIFORM1I (ES20_UNIFORM1FV + 1)
+#define ES20_UNIFORM1IV (ES20_UNIFORM1I + 1)
+#define ES20_UNIFORM2F (ES20_UNIFORM1IV + 1)
+#define ES20_UNIFORM2FV (ES20_UNIFORM2F + 1)
+#define ES20_UNIFORM2I (ES20_UNIFORM2FV + 1)
+#define ES20_UNIFORM2IV (ES20_UNIFORM2I + 1)
+#define ES20_UNIFORM3F (ES20_UNIFORM2IV + 1)
+#define ES20_UNIFORM3FV (ES20_UNIFORM3F + 1)
+#define ES20_UNIFORM3I (ES20_UNIFORM3FV + 1)
+#define ES20_UNIFORM3IV (ES20_UNIFORM3I + 1)
+#define ES20_UNIFORM4F (ES20_UNIFORM3IV + 1)
+#define ES20_UNIFORM4FV (ES20_UNIFORM4F + 1)
+#define ES20_UNIFORM4I (ES20_UNIFORM4FV + 1)
+#define ES20_UNIFORM4IV (ES20_UNIFORM4I + 1)
+#define ES20_UNIFORMMATRIX2FV (ES20_UNIFORM4IV + 1)
+#define ES20_UNIFORMMATRIX3FV (ES20_UNIFORMMATRIX2FV + 1)
+#define ES20_UNIFORMMATRIX4FV (ES20_UNIFORMMATRIX3FV + 1)
+#define ES20_USEPROGRAM (ES20_UNIFORMMATRIX4FV + 1)
+#define ES20_VALIDATEPROGRAM (ES20_USEPROGRAM + 1)
+#define ES20_VERTEXATTRIB1F (ES20_VALIDATEPROGRAM + 1)
+#define ES20_VERTEXATTRIB1FV (ES20_VERTEXATTRIB1F + 1)
+#define ES20_VERTEXATTRIB2F (ES20_VERTEXATTRIB1FV + 1)
+#define ES20_VERTEXATTRIB2FV (ES20_VERTEXATTRIB2F + 1)
+#define ES20_VERTEXATTRIB3F (ES20_VERTEXATTRIB2FV + 1)
+#define ES20_VERTEXATTRIB3FV (ES20_VERTEXATTRIB3F + 1)
+#define ES20_VERTEXATTRIB4F (ES20_VERTEXATTRIB3FV + 1)
+#define ES20_VERTEXATTRIB4FV (ES20_VERTEXATTRIB4F + 1)
+#define ES20_VERTEXATTRIBPOINTER (ES20_VERTEXATTRIB4FV + 1)
+#define ES20_VIEWPORT (ES20_VERTEXATTRIBPOINTER + 1)
+#define ES20_GETPROGRAMBINARYOES (ES20_VIEWPORT + 1)
+#define ES20_PROGRAMBINARYOES (ES20_GETPROGRAMBINARYOES + 1)
+#define ES20_TEXIMAGE3DOES (ES20_PROGRAMBINARYOES + 1)
+#define ES20_TEXSUBIMAGE3DOES (ES20_TEXIMAGE3DOES + 1)
+#define ES20_COPYSUBIMAGE3DOES (ES20_TEXSUBIMAGE3DOES + 1)
+#define ES20_COMPRESSEDTEXIMAGE3DOES (ES20_COPYSUBIMAGE3DOES + 1)
+#define ES20_COMPRESSEDTEXSUBIMAGE3DOES (ES20_COMPRESSEDTEXIMAGE3DOES + 1)
+#define ES20_FRAMEBUFFERTEXTURE3DOES (ES20_COMPRESSEDTEXSUBIMAGE3DOES + 1)
+#define ES20_BINDVERTEXARRAYOES (ES20_FRAMEBUFFERTEXTURE3DOES + 1)
+#define ES20_GENVERTEXARRAYOES (ES20_BINDVERTEXARRAYOES + 1)
+#define ES20_ISVERTEXARRAYOES (ES20_GENVERTEXARRAYOES + 1)
+#define ES20_DELETEVERTEXARRAYOES (ES20_ISVERTEXARRAYOES + 1)
+#define ES20_GLMAPBUFFEROES (ES20_DELETEVERTEXARRAYOES + 1)
+#define ES20_GLUNMAPBUFFEROES (ES20_GLMAPBUFFEROES + 1)
+#define ES20_GLGETBUFFERPOINTERVOES (ES20_GLUNMAPBUFFEROES + 1)
+#define ES20_DISCARDFRAMEBUFFEREXT (ES20_GLGETBUFFERPOINTERVOES + 1)
+#define ES20_CALLS (ES20_DISCARDFRAMEBUFFEREXT + 1)
+#define ES20_DRAWCALLS (ES20_CALLS + 1)
+#define ES20_STATECHANGECALLS (ES20_DRAWCALLS + 1)
+#define ES20_POINTCOUNT (ES20_STATECHANGECALLS + 1)
+#define ES20_LINECOUNT (ES20_POINTCOUNT + 1)
+#define ES20_TRIANGLECOUNT (ES20_LINECOUNT + 1)
+
+/* OpenVG API IDs. */
+#define VG11_APPENDPATH 1
+#define VG11_APPENDPATHDATA (VG11_APPENDPATH + 1)
+#define VG11_CHILDIMAGE (VG11_APPENDPATHDATA + 1)
+#define VG11_CLEAR (VG11_CHILDIMAGE + 1)
+#define VG11_CLEARGLYPH (VG11_CLEAR + 1)
+#define VG11_CLEARIMAGE (VG11_CLEARGLYPH + 1)
+#define VG11_CLEARPATH (VG11_CLEARIMAGE + 1)
+#define VG11_COLORMATRIX (VG11_CLEARPATH + 1)
+#define VG11_CONVOLVE (VG11_COLORMATRIX + 1)
+#define VG11_COPYIMAGE (VG11_CONVOLVE + 1)
+#define VG11_COPYMASK (VG11_COPYIMAGE + 1)
+#define VG11_COPYPIXELS (VG11_COPYMASK + 1)
+#define VG11_CREATEFONT (VG11_COPYPIXELS + 1)
+#define VG11_CREATEIMAGE (VG11_CREATEFONT + 1)
+#define VG11_CREATEMASKLAYER (VG11_CREATEIMAGE + 1)
+#define VG11_CREATEPAINT (VG11_CREATEMASKLAYER + 1)
+#define VG11_CREATEPATH (VG11_CREATEPAINT + 1)
+#define VG11_DESTROYFONT (VG11_CREATEPATH + 1)
+#define VG11_DESTROYIMAGE (VG11_DESTROYFONT + 1)
+#define VG11_DESTROYMASKLAYER (VG11_DESTROYIMAGE + 1)
+#define VG11_DESTROYPAINT (VG11_DESTROYMASKLAYER + 1)
+#define VG11_DESTROYPATH (VG11_DESTROYPAINT + 1)
+#define VG11_DRAWGLYPH (VG11_DESTROYPATH + 1)
+#define VG11_DRAWGLYPHS (VG11_DRAWGLYPH + 1)
+#define VG11_DRAWIMAGE (VG11_DRAWGLYPHS + 1)
+#define VG11_DRAWPATH (VG11_DRAWIMAGE + 1)
+#define VG11_FILLMASKLAYER (VG11_DRAWPATH + 1)
+#define VG11_FINISH (VG11_FILLMASKLAYER + 1)
+#define VG11_FLUSH (VG11_FINISH + 1)
+#define VG11_GAUSSIANBLUR (VG11_FLUSH + 1)
+#define VG11_GETCOLOR (VG11_GAUSSIANBLUR + 1)
+#define VG11_GETERROR (VG11_GETCOLOR + 1)
+#define VG11_GETF (VG11_GETERROR + 1)
+#define VG11_GETFV (VG11_GETF + 1)
+#define VG11_GETI (VG11_GETFV + 1)
+#define VG11_GETIMAGESUBDATA (VG11_GETI + 1)
+#define VG11_GETIV (VG11_GETIMAGESUBDATA + 1)
+#define VG11_GETMATRIX (VG11_GETIV + 1)
+#define VG11_GETPAINT (VG11_GETMATRIX + 1)
+#define VG11_GETPARAMETERF (VG11_GETPAINT + 1)
+#define VG11_GETPARAMETERFV (VG11_GETPARAMETERF + 1)
+#define VG11_GETPARAMETERI (VG11_GETPARAMETERFV + 1)
+#define VG11_GETPARAMETERIV (VG11_GETPARAMETERI + 1)
+#define VG11_GETPARAMETERVECTORSIZE (VG11_GETPARAMETERIV + 1)
+#define VG11_GETPARENT (VG11_GETPARAMETERVECTORSIZE + 1)
+#define VG11_GETPATHCAPABILITIES (VG11_GETPARENT + 1)
+#define VG11_GETPIXELS (VG11_GETPATHCAPABILITIES + 1)
+#define VG11_GETSTRING (VG11_GETPIXELS + 1)
+#define VG11_GETVECTORSIZE (VG11_GETSTRING + 1)
+#define VG11_HARDWAREQUERY (VG11_GETVECTORSIZE + 1)
+#define VG11_IMAGESUBDATA (VG11_HARDWAREQUERY + 1)
+#define VG11_INTERPOLATEPATH (VG11_IMAGESUBDATA + 1)
+#define VG11_LOADIDENTITY (VG11_INTERPOLATEPATH + 1)
+#define VG11_LOADMATRIX (VG11_LOADIDENTITY + 1)
+#define VG11_LOOKUP (VG11_LOADMATRIX + 1)
+#define VG11_LOOKUPSINGLE (VG11_LOOKUP + 1)
+#define VG11_MASK (VG11_LOOKUPSINGLE + 1)
+#define VG11_MODIFYPATHCOORDS (VG11_MASK + 1)
+#define VG11_MULTMATRIX (VG11_MODIFYPATHCOORDS + 1)
+#define VG11_PAINTPATTERN (VG11_MULTMATRIX + 1)
+#define VG11_PATHBOUNDS (VG11_PAINTPATTERN + 1)
+#define VG11_PATHLENGTH (VG11_PATHBOUNDS + 1)
+#define VG11_PATHTRANSFORMEDBOUNDS (VG11_PATHLENGTH + 1)
+#define VG11_POINTALONGPATH (VG11_PATHTRANSFORMEDBOUNDS + 1)
+#define VG11_READPIXELS (VG11_POINTALONGPATH + 1)
+#define VG11_REMOVEPATHCAPABILITIES (VG11_READPIXELS + 1)
+#define VG11_RENDERTOMASK (VG11_REMOVEPATHCAPABILITIES + 1)
+#define VG11_ROTATE (VG11_RENDERTOMASK + 1)
+#define VG11_SCALE (VG11_ROTATE + 1)
+#define VG11_SEPARABLECONVOLVE (VG11_SCALE + 1)
+#define VG11_SETCOLOR (VG11_SEPARABLECONVOLVE + 1)
+#define VG11_SETF (VG11_SETCOLOR + 1)
+#define VG11_SETFV (VG11_SETF + 1)
+#define VG11_SETGLYPHTOIMAGE (VG11_SETFV + 1)
+#define VG11_SETGLYPHTOPATH (VG11_SETGLYPHTOIMAGE + 1)
+#define VG11_SETI (VG11_SETGLYPHTOPATH + 1)
+#define VG11_SETIV (VG11_SETI + 1)
+#define VG11_SETPAINT (VG11_SETIV + 1)
+#define VG11_SETPARAMETERF (VG11_SETPAINT + 1)
+#define VG11_SETPARAMETERFV (VG11_SETPARAMETERF + 1)
+#define VG11_SETPARAMETERI (VG11_SETPARAMETERFV + 1)
+#define VG11_SETPARAMETERIV (VG11_SETPARAMETERI + 1)
+#define VG11_SETPIXELS (VG11_SETPARAMETERIV + 1)
+#define VG11_SHEAR (VG11_SETPIXELS + 1)
+#define VG11_TRANSFORMPATH (VG11_SHEAR + 1)
+#define VG11_TRANSLATE (VG11_TRANSFORMPATH + 1)
+#define VG11_WRITEPIXELS (VG11_TRANSLATE + 1)
+#define VG11_CALLS (VG11_WRITEPIXELS + 1)
+#define VG11_DRAWCALLS (VG11_CALLS + 1)
+#define VG11_STATECHANGECALLS (VG11_DRAWCALLS + 1)
+#define VG11_FILLCOUNT (VG11_STATECHANGECALLS + 1)
+#define VG11_STROKECOUNT (VG11_FILLCOUNT + 1)
+/* End of Driver API ID Definitions. */
+
+/* HAL & MISC IDs. */
+#define HAL_VERTBUFNEWBYTEALLOC 1
+#define HAL_VERTBUFTOTALBYTEALLOC (HAL_VERTBUFNEWBYTEALLOC + 1)
+#define HAL_VERTBUFNEWOBJALLOC (HAL_VERTBUFTOTALBYTEALLOC + 1)
+#define HAL_VERTBUFTOTALOBJALLOC (HAL_VERTBUFNEWOBJALLOC + 1)
+#define HAL_INDBUFNEWBYTEALLOC (HAL_VERTBUFTOTALOBJALLOC + 1)
+#define HAL_INDBUFTOTALBYTEALLOC (HAL_INDBUFNEWBYTEALLOC + 1)
+#define HAL_INDBUFNEWOBJALLOC (HAL_INDBUFTOTALBYTEALLOC + 1)
+#define HAL_INDBUFTOTALOBJALLOC (HAL_INDBUFNEWOBJALLOC + 1)
+#define HAL_TEXBUFNEWBYTEALLOC (HAL_INDBUFTOTALOBJALLOC + 1)
+#define HAL_TEXBUFTOTALBYTEALLOC (HAL_TEXBUFNEWBYTEALLOC + 1)
+#define HAL_TEXBUFNEWOBJALLOC (HAL_TEXBUFTOTALBYTEALLOC + 1)
+#define HAL_TEXBUFTOTALOBJALLOC (HAL_TEXBUFNEWOBJALLOC + 1)
+
+#define GPU_CYCLES 1
+#define GPU_READ64BYTE (GPU_CYCLES + 1)
+#define GPU_WRITE64BYTE (GPU_READ64BYTE + 1)
+#define GPU_TOTALCYCLES (GPU_WRITE64BYTE + 1)
+#define GPU_IDLECYCLES (GPU_TOTALCYCLES + 1)
+
+#define VS_INSTCOUNT 1
+#define VS_BRANCHINSTCOUNT (VS_INSTCOUNT + 1)
+#define VS_TEXLDINSTCOUNT (VS_BRANCHINSTCOUNT + 1)
+#define VS_RENDEREDVERTCOUNT (VS_TEXLDINSTCOUNT + 1)
+
+#define PS_INSTCOUNT 1
+#define PS_BRANCHINSTCOUNT (PS_INSTCOUNT + 1)
+#define PS_TEXLDINSTCOUNT (PS_BRANCHINSTCOUNT + 1)
+#define PS_RENDEREDPIXCOUNT (PS_TEXLDINSTCOUNT + 1)
+
+#define PA_INVERTCOUNT 1
+#define PA_INPRIMCOUNT (PA_INVERTCOUNT + 1)
+#define PA_OUTPRIMCOUNT (PA_INPRIMCOUNT + 1)
+#define PA_DEPTHCLIPCOUNT (PA_OUTPRIMCOUNT + 1)
+#define PA_TRIVIALREJCOUNT (PA_DEPTHCLIPCOUNT + 1)
+#define PA_CULLCOUNT (PA_TRIVIALREJCOUNT + 1)
+
+#define SE_TRIANGLECOUNT 1
+#define SE_LINECOUNT (SE_TRIANGLECOUNT + 1)
+
+#define RA_VALIDPIXCOUNT 1
+#define RA_TOTALQUADCOUNT (RA_VALIDPIXCOUNT + 1)
+#define RA_VALIDQUADCOUNTEZ (RA_TOTALQUADCOUNT + 1)
+#define RA_TOTALPRIMCOUNT (RA_VALIDQUADCOUNTEZ + 1)
+#define RA_PIPECACHEMISSCOUNT (RA_TOTALPRIMCOUNT + 1)
+#define RA_PREFCACHEMISSCOUNT (RA_PIPECACHEMISSCOUNT + 1)
+#define RA_EEZCULLCOUNT (RA_PREFCACHEMISSCOUNT + 1)
+
+#define TX_TOTBILINEARREQ 1
+#define TX_TOTTRILINEARREQ (TX_TOTBILINEARREQ + 1)
+#define TX_TOTDISCARDTEXREQ (TX_TOTTRILINEARREQ + 1)
+#define TX_TOTTEXREQ (TX_TOTDISCARDTEXREQ + 1)
+#define TX_MEMREADCOUNT (TX_TOTTEXREQ + 1)
+#define TX_MEMREADIN8BCOUNT (TX_MEMREADCOUNT + 1)
+#define TX_CACHEMISSCOUNT (TX_MEMREADIN8BCOUNT + 1)
+#define TX_CACHEHITTEXELCOUNT (TX_CACHEMISSCOUNT + 1)
+#define TX_CACHEMISSTEXELCOUNT (TX_CACHEHITTEXELCOUNT + 1)
+
+#define PE_KILLEDBYCOLOR 1
+#define PE_KILLEDBYDEPTH (PE_KILLEDBYCOLOR + 1)
+#define PE_DRAWNBYCOLOR (PE_KILLEDBYDEPTH + 1)
+#define PE_DRAWNBYDEPTH (PE_DRAWNBYCOLOR + 1)
+
+#define MC_READREQ8BPIPE 1
+#define MC_READREQ8BIP (MC_READREQ8BPIPE + 1)
+#define MC_WRITEREQ8BPIPE (MC_READREQ8BIP + 1)
+
+#define AXI_READREQSTALLED 1
+#define AXI_WRITEREQSTALLED (AXI_READREQSTALLED + 1)
+#define AXI_WRITEDATASTALLED (AXI_WRITEREQSTALLED + 1)
+
+#define PVS_INSTRCOUNT 1
+#define PVS_ALUINSTRCOUNT (PVS_INSTRCOUNT + 1)
+#define PVS_TEXINSTRCOUNT (PVS_ALUINSTRCOUNT + 1)
+#define PVS_ATTRIBCOUNT (PVS_TEXINSTRCOUNT + 1)
+#define PVS_UNIFORMCOUNT (PVS_ATTRIBCOUNT + 1)
+#define PVS_FUNCTIONCOUNT (PVS_UNIFORMCOUNT + 1)
+
+#define PPS_INSTRCOUNT 1
+#define PPS_ALUINSTRCOUNT (PPS_INSTRCOUNT + 1)
+#define PPS_TEXINSTRCOUNT (PPS_ALUINSTRCOUNT + 1)
+#define PPS_ATTRIBCOUNT (PPS_TEXINSTRCOUNT + 1)
+#define PPS_UNIFORMCOUNT (PPS_ATTRIBCOUNT + 1)
+#define PPS_FUNCTIONCOUNT (PPS_UNIFORMCOUNT + 1)
+/* End of MISC Counter IDs. */
+
+#ifdef gcdNEW_PROFILER_FILE
+
+/* Category Constants. */
+#define VPHEADER 0x010000
+#define VPG_INFO 0x020000
+#define VPG_TIME 0x030000
+#define VPG_MEM 0x040000
+#define VPG_ES11 0x050000
+#define VPG_ES20 0x060000
+#define VPG_VG11 0x070000
+#define VPG_HAL 0x080000
+#define VPG_HW 0x090000
+#define VPG_GPU 0x0a0000
+#define VPG_VS 0x0b0000
+#define VPG_PS 0x0c0000
+#define VPG_PA 0x0d0000
+#define VPG_SETUP 0x0e0000
+#define VPG_RA 0x0f0000
+#define VPG_TX 0x100000
+#define VPG_PE 0x110000
+#define VPG_MC 0x120000
+#define VPG_AXI 0x130000
+#define VPG_PROG 0x140000
+#define VPG_PVS 0x150000
+#define VPG_PPS 0x160000
+#define VPG_ES11_TIME 0x170000
+#define VPG_ES20_TIME 0x180000
+#define VPG_FRAME 0x190000
+#define VPG_ES11_DRAW 0x200000
+#define VPG_ES20_DRAW 0x210000
+#define VPG_END 0xff0000
+
+/* Info. */
+#define VPC_INFOCOMPANY (VPG_INFO + 1)
+#define VPC_INFOVERSION (VPC_INFOCOMPANY + 1)
+#define VPC_INFORENDERER (VPC_INFOVERSION + 1)
+#define VPC_INFOREVISION (VPC_INFORENDERER + 1)
+#define VPC_INFODRIVER (VPC_INFOREVISION + 1)
+#define VPC_INFODRIVERMODE (VPC_INFODRIVER + 1)
+#define VPC_INFOSCREENSIZE (VPC_INFODRIVERMODE + 1)
+
+/* Counter Constants. */
+#define VPC_ELAPSETIME (VPG_TIME + 1)
+#define VPC_CPUTIME (VPC_ELAPSETIME + 1)
+
+#define VPC_MEMMAXRES (VPG_MEM + 1)
+#define VPC_MEMSHARED (VPC_MEMMAXRES + 1)
+#define VPC_MEMUNSHAREDDATA (VPC_MEMSHARED + 1)
+#define VPC_MEMUNSHAREDSTACK (VPC_MEMUNSHAREDDATA + 1)
+
+/* OpenGL ES11 Counters. */
+#define VPC_ES11ACTIVETEXTURE (VPG_ES11 + ES11_ACTIVETEXTURE)
+#define VPC_ES11ALPHAFUNC (VPG_ES11 + ES11_ALPHAFUNC)
+#define VPC_ES11ALPHAFUNCX (VPG_ES11 + ES11_ALPHAFUNCX)
+#define VPC_ES11BINDBUFFER (VPG_ES11 + ES11_BINDBUFFER)
+#define VPC_ES11BINDTEXTURE (VPG_ES11 + ES11_BINDTEXTURE)
+#define VPC_ES11BLENDFUNC (VPG_ES11 + ES11_BLENDFUNC)
+#define VPC_ES11BUFFERDATA (VPG_ES11 + ES11_BUFFERDATA)
+#define VPC_ES11BUFFERSUBDATA (VPG_ES11 + ES11_BUFFERSUBDATA)
+#define VPC_ES11CLEAR (VPG_ES11 + ES11_CLEAR)
+#define VPC_ES11CLEARCOLOR (VPG_ES11 + ES11_CLEARCOLOR)
+#define VPC_ES11CLEARCOLORX (VPG_ES11 + ES11_CLEARCOLORX)
+#define VPC_ES11CLEARDEPTHF (VPG_ES11 + ES11_CLEARDEPTHF)
+#define VPC_ES11CLEARDEPTHX (VPG_ES11 + ES11_CLEARDEPTHX)
+#define VPC_ES11CLEARSTENCIL (VPG_ES11 + ES11_CLEARSTENCIL)
+#define VPC_ES11CLIENTACTIVETEXTURE (VPG_ES11 + ES11_CLIENTACTIVETEXTURE)
+#define VPC_ES11CLIPPLANEF (VPG_ES11 + ES11_CLIPPLANEF)
+#define VPC_ES11CLIPPLANEX (VPG_ES11 + ES11_CLIPPLANEX)
+#define VPC_ES11COLOR4F (VPG_ES11 + ES11_COLOR4F)
+#define VPC_ES11COLOR4UB (VPG_ES11 + ES11_COLOR4UB)
+#define VPC_ES11COLOR4X (VPG_ES11 + ES11_COLOR4X)
+#define VPC_ES11COLORMASK (VPG_ES11 + ES11_COLORMASK)
+#define VPC_ES11COLORPOINTER (VPG_ES11 + ES11_COLORPOINTER)
+#define VPC_ES11COMPRESSEDTEXIMAGE2D (VPG_ES11 + ES11_COMPRESSEDTEXIMAGE2D)
+#define VPC_ES11COMPRESSEDTEXSUBIMAGE2D (VPG_ES11 + ES11_COMPRESSEDTEXSUBIMAGE2D)
+#define VPC_ES11COPYTEXIMAGE2D (VPG_ES11 + ES11_COPYTEXIMAGE2D)
+#define VPC_ES11COPYTEXSUBIMAGE2D (VPG_ES11 + ES11_COPYTEXSUBIMAGE2D)
+#define VPC_ES11CULLFACE (VPG_ES11 + ES11_CULLFACE)
+#define VPC_ES11DELETEBUFFERS (VPG_ES11 + ES11_DELETEBUFFERS)
+#define VPC_ES11DELETETEXTURES (VPG_ES11 + ES11_DELETETEXTURES)
+#define VPC_ES11DEPTHFUNC (VPG_ES11 + ES11_DEPTHFUNC)
+#define VPC_ES11DEPTHMASK (VPG_ES11 + ES11_DEPTHMASK)
+#define VPC_ES11DEPTHRANGEF (VPG_ES11 + ES11_DEPTHRANGEF)
+#define VPC_ES11DEPTHRANGEX (VPG_ES11 + ES11_DEPTHRANGEX)
+#define VPC_ES11DISABLE (VPG_ES11 + ES11_DISABLE)
+#define VPC_ES11DISABLECLIENTSTATE (VPG_ES11 + ES11_DISABLECLIENTSTATE)
+#define VPC_ES11DRAWARRAYS (VPG_ES11 + ES11_DRAWARRAYS)
+#define VPC_ES11DRAWELEMENTS (VPG_ES11 + ES11_DRAWELEMENTS)
+#define VPC_ES11ENABLE (VPG_ES11 + ES11_ENABLE)
+#define VPC_ES11ENABLECLIENTSTATE (VPG_ES11 + ES11_ENABLECLIENTSTATE)
+#define VPC_ES11FINISH (VPG_ES11 + ES11_FINISH)
+#define VPC_ES11FLUSH (VPG_ES11 + ES11_FLUSH)
+#define VPC_ES11FOGF (VPG_ES11 + ES11_FOGF)
+#define VPC_ES11FOGFV (VPG_ES11 + ES11_FOGFV)
+#define VPC_ES11FOGX (VPG_ES11 + ES11_FOGX)
+#define VPC_ES11FOGXV (VPG_ES11 + ES11_FOGXV)
+#define VPC_ES11FRONTFACE (VPG_ES11 + ES11_FRONTFACE)
+#define VPC_ES11FRUSTUMF (VPG_ES11 + ES11_FRUSTUMF)
+#define VPC_ES11FRUSTUMX (VPG_ES11 + ES11_FRUSTUMX)
+#define VPC_ES11GENBUFFERS (VPG_ES11 + ES11_GENBUFFERS)
+#define VPC_ES11GENTEXTURES (VPG_ES11 + ES11_GENTEXTURES)
+#define VPC_ES11GETBOOLEANV (VPG_ES11 + ES11_GETBOOLEANV)
+#define VPC_ES11GETBUFFERPARAMETERIV (VPG_ES11 + ES11_GETBUFFERPARAMETERIV)
+#define VPC_ES11GETCLIPPLANEF (VPG_ES11 + ES11_GETCLIPPLANEF)
+#define VPC_ES11GETCLIPPLANEX (VPG_ES11 + ES11_GETCLIPPLANEX)
+#define VPC_ES11GETERROR (VPG_ES11 + ES11_GETERROR)
+#define VPC_ES11GETFIXEDV (VPG_ES11 + ES11_GETFIXEDV)
+#define VPC_ES11GETFLOATV (VPG_ES11 + ES11_GETFLOATV)
+#define VPC_ES11GETINTEGERV (VPG_ES11 + ES11_GETINTEGERV)
+#define VPC_ES11GETLIGHTFV (VPG_ES11 + ES11_GETLIGHTFV)
+#define VPC_ES11GETLIGHTXV (VPG_ES11 + ES11_GETLIGHTXV)
+#define VPC_ES11GETMATERIALFV (VPG_ES11 + ES11_GETMATERIALFV)
+#define VPC_ES11GETMATERIALXV (VPG_ES11 + ES11_GETMATERIALXV)
+#define VPC_ES11GETPOINTERV (VPG_ES11 + ES11_GETPOINTERV)
+#define VPC_ES11GETSTRING (VPG_ES11 + ES11_GETSTRING)
+#define VPC_ES11GETTEXENVFV (VPG_ES11 + ES11_GETTEXENVFV)
+#define VPC_ES11GETTEXENVIV (VPG_ES11 + ES11_GETTEXENVIV)
+#define VPC_ES11GETTEXENVXV (VPG_ES11 + ES11_GETTEXENVXV)
+#define VPC_ES11GETTEXPARAMETERFV (VPG_ES11 + ES11_GETTEXPARAMETERFV)
+#define VPC_ES11GETTEXPARAMETERIV (VPG_ES11 + ES11_GETTEXPARAMETERIV)
+#define VPC_ES11GETTEXPARAMETERXV (VPG_ES11 + ES11_GETTEXPARAMETERXV)
+#define VPC_ES11HINT (VPG_ES11 + ES11_HINT)
+#define VPC_ES11ISBUFFER (VPG_ES11 + ES11_ISBUFFER)
+#define VPC_ES11ISENABLED (VPG_ES11 + ES11_ISENABLED)
+#define VPC_ES11ISTEXTURE (VPG_ES11 + ES11_ISTEXTURE)
+#define VPC_ES11LIGHTF (VPG_ES11 + ES11_LIGHTF)
+#define VPC_ES11LIGHTFV (VPG_ES11 + ES11_LIGHTFV)
+#define VPC_ES11LIGHTMODELF (VPG_ES11 + ES11_LIGHTMODELF)
+#define VPC_ES11LIGHTMODELFV (VPG_ES11 + ES11_LIGHTMODELFV)
+#define VPC_ES11LIGHTMODELX (VPG_ES11 + ES11_LIGHTMODELX)
+#define VPC_ES11LIGHTMODELXV (VPG_ES11 + ES11_LIGHTMODELXV)
+#define VPC_ES11LIGHTX (VPG_ES11 + ES11_LIGHTX)
+#define VPC_ES11LIGHTXV (VPG_ES11 + ES11_LIGHTXV)
+#define VPC_ES11LINEWIDTH (VPG_ES11 + ES11_LINEWIDTH)
+#define VPC_ES11LINEWIDTHX (VPG_ES11 + ES11_LINEWIDTHX)
+#define VPC_ES11LOADIDENTITY (VPG_ES11 + ES11_LOADIDENTITY)
+#define VPC_ES11LOADMATRIXF (VPG_ES11 + ES11_LOADMATRIXF)
+#define VPC_ES11LOADMATRIXX (VPG_ES11 + ES11_LOADMATRIXX)
+#define VPC_ES11LOGICOP (VPG_ES11 + ES11_LOGICOP)
+#define VPC_ES11MATERIALF (VPG_ES11 + ES11_MATERIALF)
+#define VPC_ES11MATERIALFV (VPG_ES11 + ES11_MATERIALFV)
+#define VPC_ES11MATERIALX (VPG_ES11 + ES11_MATERIALX)
+#define VPC_ES11MATERIALXV (VPG_ES11 + ES11_MATERIALXV)
+#define VPC_ES11MATRIXMODE (VPG_ES11 + ES11_MATRIXMODE)
+#define VPC_ES11MULTITEXCOORD4F (VPG_ES11 + ES11_MULTITEXCOORD4F)
+#define VPC_ES11MULTITEXCOORD4X (VPG_ES11 + ES11_MULTITEXCOORD4X)
+#define VPC_ES11MULTMATRIXF (VPG_ES11 + ES11_MULTMATRIXF)
+#define VPC_ES11MULTMATRIXX (VPG_ES11 + ES11_MULTMATRIXX)
+#define VPC_ES11NORMAL3F (VPG_ES11 + ES11_NORMAL3F)
+#define VPC_ES11NORMAL3X (VPG_ES11 + ES11_NORMAL3X)
+#define VPC_ES11NORMALPOINTER (VPG_ES11 + ES11_NORMALPOINTER)
+#define VPC_ES11ORTHOF (VPG_ES11 + ES11_ORTHOF)
+#define VPC_ES11ORTHOX (VPG_ES11 + ES11_ORTHOX)
+#define VPC_ES11PIXELSTOREI (VPG_ES11 + ES11_PIXELSTOREI)
+#define VPC_ES11POINTPARAMETERF (VPG_ES11 + ES11_POINTPARAMETERF)
+#define VPC_ES11POINTPARAMETERFV (VPG_ES11 + ES11_POINTPARAMETERFV)
+#define VPC_ES11POINTPARAMETERX (VPG_ES11 + ES11_POINTPARAMETERX)
+#define VPC_ES11POINTPARAMETERXV (VPG_ES11 + ES11_POINTPARAMETERXV)
+#define VPC_ES11POINTSIZE (VPG_ES11 + ES11_POINTSIZE)
+#define VPC_ES11POINTSIZEX (VPG_ES11 + ES11_POINTSIZEX)
+#define VPC_ES11POLYGONOFFSET (VPG_ES11 + ES11_POLYGONOFFSET)
+#define VPC_ES11POLYGONOFFSETX (VPG_ES11 + ES11_POLYGONOFFSETX)
+#define VPC_ES11POPMATRIX (VPG_ES11 + ES11_POPMATRIX)
+#define VPC_ES11PUSHMATRIX (VPG_ES11 + ES11_PUSHMATRIX)
+#define VPC_ES11READPIXELS (VPG_ES11 + ES11_READPIXELS)
+#define VPC_ES11ROTATEF (VPG_ES11 + ES11_ROTATEF)
+#define VPC_ES11ROTATEX (VPG_ES11 + ES11_ROTATEX)
+#define VPC_ES11SAMPLECOVERAGE (VPG_ES11 + ES11_SAMPLECOVERAGE)
+#define VPC_ES11SAMPLECOVERAGEX (VPG_ES11 + ES11_SAMPLECOVERAGEX)
+#define VPC_ES11SCALEF (VPG_ES11 + ES11_SCALEF)
+#define VPC_ES11SCALEX (VPG_ES11 + ES11_SCALEX)
+#define VPC_ES11SCISSOR (VPG_ES11 + ES11_SCISSOR)
+#define VPC_ES11SHADEMODEL (VPG_ES11 + ES11_SHADEMODEL)
+#define VPC_ES11STENCILFUNC (VPG_ES11 + ES11_STENCILFUNC)
+#define VPC_ES11STENCILMASK (VPG_ES11 + ES11_STENCILMASK)
+#define VPC_ES11STENCILOP (VPG_ES11 + ES11_STENCILOP)
+#define VPC_ES11TEXCOORDPOINTER (VPG_ES11 + ES11_TEXCOORDPOINTER)
+#define VPC_ES11TEXENVF (VPG_ES11 + ES11_TEXENVF)
+#define VPC_ES11TEXENVFV (VPG_ES11 + ES11_TEXENVFV)
+#define VPC_ES11TEXENVI (VPG_ES11 + ES11_TEXENVI)
+#define VPC_ES11TEXENVIV (VPG_ES11 + ES11_TEXENVIV)
+#define VPC_ES11TEXENVX (VPG_ES11 + ES11_TEXENVX)
+#define VPC_ES11TEXENVXV (VPG_ES11 + ES11_TEXENVXV)
+#define VPC_ES11TEXIMAGE2D (VPG_ES11 + ES11_TEXIMAGE2D)
+#define VPC_ES11TEXPARAMETERF (VPG_ES11 + ES11_TEXPARAMETERF)
+#define VPC_ES11TEXPARAMETERFV (VPG_ES11 + ES11_TEXPARAMETERFV)
+#define VPC_ES11TEXPARAMETERI (VPG_ES11 + ES11_TEXPARAMETERI)
+#define VPC_ES11TEXPARAMETERIV (VPG_ES11 + ES11_TEXPARAMETERIV)
+#define VPC_ES11TEXPARAMETERX (VPG_ES11 + ES11_TEXPARAMETERX)
+#define VPC_ES11TEXPARAMETERXV (VPG_ES11 + ES11_TEXPARAMETERXV)
+#define VPC_ES11TEXSUBIMAGE2D (VPG_ES11 + ES11_TEXSUBIMAGE2D)
+#define VPC_ES11TRANSLATEF (VPG_ES11 + ES11_TRANSLATEF)
+#define VPC_ES11TRANSLATEX (VPG_ES11 + ES11_TRANSLATEX)
+#define VPC_ES11VERTEXPOINTER (VPG_ES11 + ES11_VERTEXPOINTER)
+#define VPC_ES11VIEWPORT (VPG_ES11 + ES11_VIEWPORT)
+/* OpenGL ES11 Statics Counter IDs. */
+#define VPC_ES11CALLS (VPG_ES11 + ES11_CALLS)
+#define VPC_ES11DRAWCALLS (VPG_ES11 + ES11_DRAWCALLS)
+#define VPC_ES11STATECHANGECALLS (VPG_ES11 + ES11_STATECHANGECALLS)
+#define VPC_ES11POINTCOUNT (VPG_ES11 + ES11_POINTCOUNT)
+#define VPC_ES11LINECOUNT (VPG_ES11 + ES11_LINECOUNT)
+#define VPC_ES11TRIANGLECOUNT (VPG_ES11 + ES11_TRIANGLECOUNT)
+
+/* OpenGLES 2.x */
+#define VPC_ES20ACTIVETEXTURE (VPG_ES20 + ES20_ACTIVETEXTURE)
+#define VPC_ES20ATTACHSHADER (VPG_ES20 + ES20_ATTACHSHADER)
+#define VPC_ES20BINDATTRIBLOCATION (VPG_ES20 + ES20_BINDATTRIBLOCATION)
+#define VPC_ES20BINDBUFFER (VPG_ES20 + ES20_BINDBUFFER)
+#define VPC_ES20BINDFRAMEBUFFER (VPG_ES20 + ES20_BINDFRAMEBUFFER)
+#define VPC_ES20BINDRENDERBUFFER (VPG_ES20 + ES20_BINDRENDERBUFFER)
+#define VPC_ES20BINDTEXTURE (VPG_ES20 + ES20_BINDTEXTURE)
+#define VPC_ES20BLENDCOLOR (VPG_ES20 + ES20_BLENDCOLOR)
+#define VPC_ES20BLENDEQUATION (VPG_ES20 + ES20_BLENDEQUATION)
+#define VPC_ES20BLENDEQUATIONSEPARATE (VPG_ES20 + ES20_BLENDEQUATIONSEPARATE)
+#define VPC_ES20BLENDFUNC (VPG_ES20 + ES20_BLENDFUNC)
+#define VPC_ES20BLENDFUNCSEPARATE (VPG_ES20 + ES20_BLENDFUNCSEPARATE)
+#define VPC_ES20BUFFERDATA (VPG_ES20 + ES20_BUFFERDATA)
+#define VPC_ES20BUFFERSUBDATA (VPG_ES20 + ES20_BUFFERSUBDATA)
+#define VPC_ES20CHECKFRAMEBUFFERSTATUS (VPG_ES20 + ES20_CHECKFRAMEBUFFERSTATUS)
+#define VPC_ES20CLEAR (VPG_ES20 + ES20_CLEAR)
+#define VPC_ES20CLEARCOLOR (VPG_ES20 + ES20_CLEARCOLOR)
+#define VPC_ES20CLEARDEPTHF (VPG_ES20 + ES20_CLEARDEPTHF)
+#define VPC_ES20CLEARSTENCIL (VPG_ES20 + ES20_CLEARSTENCIL)
+#define VPC_ES20COLORMASK (VPG_ES20 + ES20_COLORMASK)
+#define VPC_ES20COMPILESHADER (VPG_ES20 + ES20_COMPILESHADER)
+#define VPC_ES20COMPRESSEDTEXIMAGE2D (VPG_ES20 + ES20_COMPRESSEDTEXIMAGE2D)
+#define VPC_ES20COMPRESSEDTEXSUBIMAGE2D (VPG_ES20 + ES20_COMPRESSEDTEXSUBIMAGE2D)
+#define VPC_ES20COPYTEXIMAGE2D (VPG_ES20 + ES20_COPYTEXIMAGE2D)
+#define VPC_ES20COPYTEXSUBIMAGE2D (VPG_ES20 + ES20_COPYTEXSUBIMAGE2D)
+#define VPC_ES20CREATEPROGRAM (VPG_ES20 + ES20_CREATEPROGRAM)
+#define VPC_ES20CREATESHADER (VPG_ES20 + ES20_CREATESHADER)
+#define VPC_ES20CULLFACE (VPG_ES20 + ES20_CULLFACE)
+#define VPC_ES20DELETEBUFFERS (VPG_ES20 + ES20_DELETEBUFFERS)
+#define VPC_ES20DELETEFRAMEBUFFERS (VPG_ES20 + ES20_DELETEFRAMEBUFFERS)
+#define VPC_ES20DELETEPROGRAM (VPG_ES20 + ES20_DELETEPROGRAM)
+#define VPC_ES20DELETERENDERBUFFERS (VPG_ES20 + ES20_DELETERENDERBUFFERS)
+#define VPC_ES20DELETESHADER (VPG_ES20 + ES20_DELETESHADER)
+#define VPC_ES20DELETETEXTURES (VPG_ES20 + ES20_DELETETEXTURES)
+#define VPC_ES20DEPTHFUNC (VPG_ES20 + ES20_DEPTHFUNC)
+#define VPC_ES20DEPTHMASK (VPG_ES20 + ES20_DEPTHMASK)
+#define VPC_ES20DEPTHRANGEF (VPG_ES20 + ES20_DEPTHRANGEF)
+#define VPC_ES20DETACHSHADER (VPG_ES20 + ES20_DETACHSHADER)
+#define VPC_ES20DISABLE (VPG_ES20 + ES20_DISABLE)
+#define VPC_ES20DISABLEVERTEXATTRIBARRAY (VPG_ES20 + ES20_DISABLEVERTEXATTRIBARRAY)
+#define VPC_ES20DRAWARRAYS (VPG_ES20 + ES20_DRAWARRAYS)
+#define VPC_ES20DRAWELEMENTS (VPG_ES20 + ES20_DRAWELEMENTS)
+#define VPC_ES20ENABLE (VPG_ES20 + ES20_ENABLE)
+#define VPC_ES20ENABLEVERTEXATTRIBARRAY (VPG_ES20 + ES20_ENABLEVERTEXATTRIBARRAY)
+#define VPC_ES20FINISH (VPG_ES20 + ES20_FINISH)
+#define VPC_ES20FLUSH (VPG_ES20 + ES20_FLUSH)
+#define VPC_ES20FRAMEBUFFERRENDERBUFFER (VPG_ES20 + ES20_FRAMEBUFFERRENDERBUFFER)
+#define VPC_ES20FRAMEBUFFERTEXTURE2D (VPG_ES20 + ES20_FRAMEBUFFERTEXTURE2D)
+#define VPC_ES20FRONTFACE (VPG_ES20 + ES20_FRONTFACE)
+#define VPC_ES20GENBUFFERS (VPG_ES20 + ES20_GENBUFFERS)
+#define VPC_ES20GENERATEMIPMAP (VPG_ES20 + ES20_GENERATEMIPMAP)
+#define VPC_ES20GENFRAMEBUFFERS (VPG_ES20 + ES20_GENFRAMEBUFFERS)
+#define VPC_ES20GENRENDERBUFFERS (VPG_ES20 + ES20_GENRENDERBUFFERS)
+#define VPC_ES20GENTEXTURES (VPG_ES20 + ES20_GENTEXTURES)
+#define VPC_ES20GETACTIVEATTRIB (VPG_ES20 + ES20_GETACTIVEATTRIB)
+#define VPC_ES20GETACTIVEUNIFORM (VPG_ES20 + ES20_GETACTIVEUNIFORM)
+#define VPC_ES20GETATTACHEDSHADERS (VPG_ES20 + ES20_GETATTACHEDSHADERS)
+#define VPC_ES20GETATTRIBLOCATION (VPG_ES20 + ES20_GETATTRIBLOCATION)
+#define VPC_ES20GETBOOLEANV (VPG_ES20 + ES20_GETBOOLEANV)
+#define VPC_ES20GETBUFFERPARAMETERIV (VPG_ES20 + ES20_GETBUFFERPARAMETERIV)
+#define VPC_ES20GETERROR (VPG_ES20 + ES20_GETERROR)
+#define VPC_ES20GETFLOATV (VPG_ES20 + ES20_GETFLOATV)
+#define VPC_ES20GETFRAMEBUFFERATTACHMENTPARAMETERIV (VPG_ES20 + ES20_GETFRAMEBUFFERATTACHMENTPARAMETERIV)
+#define VPC_ES20GETINTEGERV (VPG_ES20 + ES20_GETINTEGERV)
+#define VPC_ES20GETPROGRAMIV (VPG_ES20 + ES20_GETPROGRAMIV)
+#define VPC_ES20GETPROGRAMINFOLOG (VPG_ES20 + ES20_GETPROGRAMINFOLOG)
+#define VPC_ES20GETRENDERBUFFERPARAMETERIV (VPG_ES20 + ES20_GETRENDERBUFFERPARAMETERIV)
+#define VPC_ES20GETSHADERIV (VPG_ES20 + ES20_GETSHADERIV)
+#define VPC_ES20GETSHADERINFOLOG (VPG_ES20 + ES20_GETSHADERINFOLOG)
+#define VPC_ES20GETSHADERPRECISIONFORMAT (VPG_ES20 + ES20_GETSHADERPRECISIONFORMAT)
+#define VPC_ES20GETSHADERSOURCE (VPG_ES20 + ES20_GETSHADERSOURCE)
+#define VPC_ES20GETSTRING (VPG_ES20 + ES20_GETSTRING)
+#define VPC_ES20GETTEXPARAMETERFV (VPG_ES20 + ES20_GETTEXPARAMETERFV)
+#define VPC_ES20GETTEXPARAMETERIV (VPG_ES20 + ES20_GETTEXPARAMETERIV)
+#define VPC_ES20GETUNIFORMFV (VPG_ES20 + ES20_GETUNIFORMFV)
+#define VPC_ES20GETUNIFORMIV (VPG_ES20 + ES20_GETUNIFORMIV)
+#define VPC_ES20GETUNIFORMLOCATION (VPG_ES20 + ES20_GETUNIFORMLOCATION)
+#define VPC_ES20GETVERTEXATTRIBFV (VPG_ES20 + ES20_GETVERTEXATTRIBFV)
+#define VPC_ES20GETVERTEXATTRIBIV (VPG_ES20 + ES20_GETVERTEXATTRIBIV)
+#define VPC_ES20GETVERTEXATTRIBPOINTERV (VPG_ES20 + ES20_GETVERTEXATTRIBPOINTERV)
+#define VPC_ES20HINT (VPG_ES20 + ES20_HINT)
+#define VPC_ES20ISBUFFER (VPG_ES20 + ES20_ISBUFFER)
+#define VPC_ES20ISENABLED (VPG_ES20 + ES20_ISENABLED)
+#define VPC_ES20ISFRAMEBUFFER (VPG_ES20 + ES20_ISFRAMEBUFFER)
+#define VPC_ES20ISPROGRAM (VPG_ES20 + ES20_ISPROGRAM)
+#define VPC_ES20ISRENDERBUFFER (VPG_ES20 + ES20_ISRENDERBUFFER)
+#define VPC_ES20ISSHADER (VPG_ES20 + ES20_ISSHADER)
+#define VPC_ES20ISTEXTURE (VPG_ES20 + ES20_ISTEXTURE)
+#define VPC_ES20LINEWIDTH (VPG_ES20 + ES20_LINEWIDTH)
+#define VPC_ES20LINKPROGRAM (VPG_ES20 + ES20_LINKPROGRAM)
+#define VPC_ES20PIXELSTOREI (VPG_ES20 + ES20_PIXELSTOREI)
+#define VPC_ES20POLYGONOFFSET (VPG_ES20 + ES20_POLYGONOFFSET)
+#define VPC_ES20READPIXELS (VPG_ES20 + ES20_READPIXELS)
+#define VPC_ES20RELEASESHADERCOMPILER (VPG_ES20 + ES20_RELEASESHADERCOMPILER)
+#define VPC_ES20RENDERBUFFERSTORAGE (VPG_ES20 + ES20_RENDERBUFFERSTORAGE)
+#define VPC_ES20SAMPLECOVERAGE (VPG_ES20 + ES20_SAMPLECOVERAGE)
+#define VPC_ES20SCISSOR (VPG_ES20 + ES20_SCISSOR)
+#define VPC_ES20SHADERBINARY (VPG_ES20 + ES20_SHADERBINARY)
+#define VPC_ES20SHADERSOURCE (VPG_ES20 + ES20_SHADERSOURCE)
+#define VPC_ES20STENCILFUNC (VPG_ES20 + ES20_STENCILFUNC)
+#define VPC_ES20STENCILFUNCSEPARATE (VPG_ES20 + ES20_STENCILFUNCSEPARATE)
+#define VPC_ES20STENCILMASK (VPG_ES20 + ES20_STENCILMASK)
+#define VPC_ES20STENCILMASKSEPARATE (VPG_ES20 + ES20_STENCILMASKSEPARATE)
+#define VPC_ES20STENCILOP (VPG_ES20 + ES20_STENCILOP)
+#define VPC_ES20STENCILOPSEPARATE (VPG_ES20 + ES20_STENCILOPSEPARATE)
+#define VPC_ES20TEXIMAGE2D (VPG_ES20 + ES20_TEXIMAGE2D)
+#define VPC_ES20TEXPARAMETERF (VPG_ES20 + ES20_TEXPARAMETERF)
+#define VPC_ES20TEXPARAMETERFV (VPG_ES20 + ES20_TEXPARAMETERFV)
+#define VPC_ES20TEXPARAMETERI (VPG_ES20 + ES20_TEXPARAMETERI)
+#define VPC_ES20TEXPARAMETERIV (VPG_ES20 + ES20_TEXPARAMETERIV)
+#define VPC_ES20TEXSUBIMAGE2D (VPG_ES20 + ES20_TEXSUBIMAGE2D)
+#define VPC_ES20UNIFORM1F (VPG_ES20 + ES20_UNIFORM1F)
+#define VPC_ES20UNIFORM1FV (VPG_ES20 + ES20_UNIFORM1FV)
+#define VPC_ES20UNIFORM1I (VPG_ES20 + ES20_UNIFORM1I)
+#define VPC_ES20UNIFORM1IV (VPG_ES20 + ES20_UNIFORM1IV)
+#define VPC_ES20UNIFORM2F (VPG_ES20 + ES20_UNIFORM2F)
+#define VPC_ES20UNIFORM2FV (VPG_ES20 + ES20_UNIFORM2FV)
+#define VPC_ES20UNIFORM2I (VPG_ES20 + ES20_UNIFORM2I)
+#define VPC_ES20UNIFORM2IV (VPG_ES20 + ES20_UNIFORM2IV)
+#define VPC_ES20UNIFORM3F (VPG_ES20 + ES20_UNIFORM3F)
+#define VPC_ES20UNIFORM3FV (VPG_ES20 + ES20_UNIFORM3FV)
+#define VPC_ES20UNIFORM3I (VPG_ES20 + ES20_UNIFORM3I)
+#define VPC_ES20UNIFORM3IV (VPG_ES20 + ES20_UNIFORM3IV)
+#define VPC_ES20UNIFORM4F (VPG_ES20 + ES20_UNIFORM4F)
+#define VPC_ES20UNIFORM4FV (VPG_ES20 + ES20_UNIFORM4FV)
+#define VPC_ES20UNIFORM4I (VPG_ES20 + ES20_UNIFORM4I)
+#define VPC_ES20UNIFORM4IV (VPG_ES20 + ES20_UNIFORM4IV)
+#define VPC_ES20UNIFORMMATRIX2FV (VPG_ES20 + ES20_UNIFORMMATRIX2FV)
+#define VPC_ES20UNIFORMMATRIX3FV (VPG_ES20 + ES20_UNIFORMMATRIX3FV)
+#define VPC_ES20UNIFORMMATRIX4FV (VPG_ES20 + ES20_UNIFORMMATRIX4FV)
+#define VPC_ES20USEPROGRAM (VPG_ES20 + ES20_USEPROGRAM)
+#define VPC_ES20VALIDATEPROGRAM (VPG_ES20 + ES20_VALIDATEPROGRAM)
+#define VPC_ES20VERTEXATTRIB1F (VPG_ES20 + ES20_VERTEXATTRIB1F)
+#define VPC_ES20VERTEXATTRIB1FV (VPG_ES20 + ES20_VERTEXATTRIB1FV)
+#define VPC_ES20VERTEXATTRIB2F (VPG_ES20 + ES20_VERTEXATTRIB2F)
+#define VPC_ES20VERTEXATTRIB2FV (VPG_ES20 + ES20_VERTEXATTRIB2FV)
+#define VPC_ES20VERTEXATTRIB3F (VPG_ES20 + ES20_VERTEXATTRIB3F)
+#define VPC_ES20VERTEXATTRIB3FV (VPG_ES20 + ES20_VERTEXATTRIB3FV)
+#define VPC_ES20VERTEXATTRIB4F (VPG_ES20 + ES20_VERTEXATTRIB4F)
+#define VPC_ES20VERTEXATTRIB4FV (VPG_ES20 + ES20_VERTEXATTRIB4FV)
+#define VPC_ES20VERTEXATTRIBPOINTER (VPG_ES20 + ES20_VERTEXATTRIBPOINTER)
+#define VPC_ES20VIEWPORT (VPG_ES20 + ES20_VIEWPORT)
+/* OpenGL ES20 Statistics Counter IDs. */
+#define VPC_ES20CALLS (VPG_ES20 + ES20_CALLS)
+#define VPC_ES20DRAWCALLS (VPG_ES20 + ES20_DRAWCALLS)
+#define VPC_ES20STATECHANGECALLS (VPG_ES20 + ES20_STATECHANGECALLS)
+#define VPC_ES20POINTCOUNT (VPG_ES20 + ES20_POINTCOUNT)
+#define VPC_ES20LINECOUNT (VPG_ES20 + ES20_LINECOUNT)
+#define VPC_ES20TRIANGLECOUNT (VPG_ES20 + ES20_TRIANGLECOUNT)
+
+/* VG11 Counters. */
+#define VPC_VG11APPENDPATH (VPG_VG11 + VG11_APPENDPATH)
+#define VPC_VG11APPENDPATHDATA (VPG_VG11 + VG11_APPENDPATHDATA)
+#define VPC_VG11CHILDIMAGE (VPG_VG11 + VG11_CHILDIMAGE)
+#define VPC_VG11CLEAR (VPG_VG11 + VG11_CLEAR)
+#define VPC_VG11CLEARGLYPH (VPG_VG11 + VG11_CLEARGLYPH)
+#define VPC_VG11CLEARIMAGE (VPG_VG11 + VG11_CLEARIMAGE)
+#define VPC_VG11CLEARPATH (VPG_VG11 + VG11_CLEARPATH)
+#define VPC_VG11COLORMATRIX (VPG_VG11 + VG11_COLORMATRIX)
+#define VPC_VG11CONVOLVE (VPG_VG11 + VG11_CONVOLVE)
+#define VPC_VG11COPYIMAGE (VPG_VG11 + VG11_COPYIMAGE)
+#define VPC_VG11COPYMASK (VPG_VG11 + VG11_COPYMASK)
+#define VPC_VG11COPYPIXELS (VPG_VG11 + VG11_COPYPIXELS)
+#define VPC_VG11CREATEFONT (VPG_VG11 + VG11_CREATEFONT)
+#define VPC_VG11CREATEIMAGE (VPG_VG11 + VG11_CREATEIMAGE)
+#define VPC_VG11CREATEMASKLAYER (VPG_VG11 + VG11_CREATEMASKLAYER)
+#define VPC_VG11CREATEPAINT (VPG_VG11 + VG11_CREATEPAINT)
+#define VPC_VG11CREATEPATH (VPG_VG11 + VG11_CREATEPATH)
+#define VPC_VG11DESTROYFONT (VPG_VG11 + VG11_DESTROYFONT)
+#define VPC_VG11DESTROYIMAGE (VPG_VG11 + VG11_DESTROYIMAGE)
+#define VPC_VG11DESTROYMASKLAYER (VPG_VG11 + VG11_DESTROYMASKLAYER)
+#define VPC_VG11DESTROYPAINT (VPG_VG11 + VG11_DESTROYPAINT)
+#define VPC_VG11DESTROYPATH (VPG_VG11 + VG11_DESTROYPATH)
+#define VPC_VG11DRAWGLYPH (VPG_VG11 + VG11_DRAWGLYPH)
+#define VPC_VG11DRAWGLYPHS (VPG_VG11 + VG11_DRAWGLYPHS)
+#define VPC_VG11DRAWIMAGE (VPG_VG11 + VG11_DRAWIMAGE)
+#define VPC_VG11DRAWPATH (VPG_VG11 + VG11_DRAWPATH)
+#define VPC_VG11FILLMASKLAYER (VPG_VG11 + VG11_FILLMASKLAYER)
+#define VPC_VG11FINISH (VPG_VG11 + VG11_FINISH)
+#define VPC_VG11FLUSH (VPG_VG11 + VG11_FLUSH)
+#define VPC_VG11GAUSSIANBLUR (VPG_VG11 + VG11_GAUSSIANBLUR)
+#define VPC_VG11GETCOLOR (VPG_VG11 + VG11_GETCOLOR)
+#define VPC_VG11GETERROR (VPG_VG11 + VG11_GETERROR)
+#define VPC_VG11GETF (VPG_VG11 + VG11_GETF)
+#define VPC_VG11GETFV (VPG_VG11 + VG11_GETFV)
+#define VPC_VG11GETI (VPG_VG11 + VG11_GETI)
+#define VPC_VG11GETIMAGESUBDATA (VPG_VG11 + VG11_GETIMAGESUBDATA)
+#define VPC_VG11GETIV (VPG_VG11 + VG11_GETIV)
+#define VPC_VG11GETMATRIX (VPG_VG11 + VG11_GETMATRIX)
+#define VPC_VG11GETPAINT (VPG_VG11 + VG11_GETPAINT)
+#define VPC_VG11GETPARAMETERF (VPG_VG11 + VG11_GETPARAMETERF)
+#define VPC_VG11GETPARAMETERFV (VPG_VG11 + VG11_GETPARAMETERFV)
+#define VPC_VG11GETPARAMETERI (VPG_VG11 + VG11_GETPARAMETERI)
+#define VPC_VG11GETPARAMETERIV (VPG_VG11 + VG11_GETPARAMETERIV)
+#define VPC_VG11GETPARAMETERVECTORSIZE (VPG_VG11 + VG11_GETPARAMETERVECTORSIZE)
+#define VPC_VG11GETPARENT (VPG_VG11 + VG11_GETPARENT)
+#define VPC_VG11GETPATHCAPABILITIES (VPG_VG11 + VG11_GETPATHCAPABILITIES)
+#define VPC_VG11GETPIXELS (VPG_VG11 + VG11_GETPIXELS)
+#define VPC_VG11GETSTRING (VPG_VG11 + VG11_GETSTRING)
+#define VPC_VG11GETVECTORSIZE (VPG_VG11 + VG11_GETVECTORSIZE)
+#define VPC_VG11HARDWAREQUERY (VPG_VG11 + VG11_HARDWAREQUERY)
+#define VPC_VG11IMAGESUBDATA (VPG_VG11 + VG11_IMAGESUBDATA)
+#define VPC_VG11INTERPOLATEPATH (VPG_VG11 + VG11_INTERPOLATEPATH)
+#define VPC_VG11LOADIDENTITY (VPG_VG11 + VG11_LOADIDENTITY)
+#define VPC_VG11LOADMATRIX (VPG_VG11 + VG11_LOADMATRIX)
+#define VPC_VG11LOOKUP (VPG_VG11 + VG11_LOOKUP)
+#define VPC_VG11LOOKUPSINGLE (VPG_VG11 + VG11_LOOKUPSINGLE)
+#define VPC_VG11MASK (VPG_VG11 + VG11_MASK)
+#define VPC_VG11MODIFYPATHCOORDS (VPG_VG11 + VG11_MODIFYPATHCOORDS)
+#define VPC_VG11MULTMATRIX (VPG_VG11 + VG11_MULTMATRIX)
+#define VPC_VG11PAINTPATTERN (VPG_VG11 + VG11_PAINTPATTERN)
+#define VPC_VG11PATHBOUNDS (VPG_VG11 + VG11_PATHBOUNDS)
+#define VPC_VG11PATHLENGTH (VPG_VG11 + VG11_PATHLENGTH)
+#define VPC_VG11PATHTRANSFORMEDBOUNDS (VPG_VG11 + VG11_PATHTRANSFORMEDBOUNDS)
+#define VPC_VG11POINTALONGPATH (VPG_VG11 + VG11_POINTALONGPATH)
+#define VPC_VG11READPIXELS (VPG_VG11 + VG11_READPIXELS)
+#define VPC_VG11REMOVEPATHCAPABILITIES (VPG_VG11 + VG11_REMOVEPATHCAPABILITIES)
+#define VPC_VG11RENDERTOMASK (VPG_VG11 + VG11_RENDERTOMASK)
+#define VPC_VG11ROTATE (VPG_VG11 + VG11_ROTATE)
+#define VPC_VG11SCALE (VPG_VG11 + VG11_SCALE)
+#define VPC_VG11SEPARABLECONVOLVE (VPG_VG11 + VG11_SEPARABLECONVOLVE)
+#define VPC_VG11SETCOLOR (VPG_VG11 + VG11_SETCOLOR)
+#define VPC_VG11SETF (VPG_VG11 + VG11_SETF)
+#define VPC_VG11SETFV (VPG_VG11 + VG11_SETFV)
+#define VPC_VG11SETGLYPHTOIMAGE (VPG_VG11 + VG11_SETGLYPHTOIMAGE)
+#define VPC_VG11SETGLYPHTOPATH (VPG_VG11 + VG11_SETGLYPHTOPATH)
+#define VPC_VG11SETI (VPG_VG11 + VG11_SETI)
+#define VPC_VG11SETIV (VPG_VG11 + VG11_SETIV)
+#define VPC_VG11SETPAINT (VPG_VG11 + VG11_SETPAINT)
+#define VPC_VG11SETPARAMETERF (VPG_VG11 + VG11_SETPARAMETERF)
+#define VPC_VG11SETPARAMETERFV (VPG_VG11 + VG11_SETPARAMETERFV)
+#define VPC_VG11SETPARAMETERI (VPG_VG11 + VG11_SETPARAMETERI)
+#define VPC_VG11SETPARAMETERIV (VPG_VG11 + VG11_SETPARAMETERIV)
+#define VPC_VG11SETPIXELS (VPG_VG11 + VG11_SETPIXELS)
+#define VPC_VG11SHEAR (VPG_VG11 + VG11_SHEAR)
+#define VPC_VG11TRANSFORMPATH (VPG_VG11 + VG11_TRANSFORMPATH)
+#define VPC_VG11TRANSLATE (VPG_VG11 + VG11_TRANSLATE)
+#define VPC_VG11WRITEPIXELS (VPG_VG11 + VG11_WRITEPIXELS)
+/* OpenVG Statistics Counter IDs. */
+#define VPC_VG11CALLS (VPG_VG11 + VG11_CALLS)
+#define VPC_VG11DRAWCALLS (VPG_VG11 + VG11_DRAWCALLS)
+#define VPC_VG11STATECHANGECALLS (VPG_VG11 + VG11_STATECHANGECALLS)
+#define VPC_VG11FILLCOUNT (VPG_VG11 + VG11_FILLCOUNT)
+#define VPC_VG11STROKECOUNT (VPG_VG11 + VG11_STROKECOUNT)
+
+/* HAL Counters. */
+#define VPC_HALVERTBUFNEWBYTEALLOC (VPG_HAL + HAL_VERTBUFNEWBYTEALLOC)
+#define VPC_HALVERTBUFTOTALBYTEALLOC (VPG_HAL + HAL_VERTBUFTOTALBYTEALLOC)
+#define VPC_HALVERTBUFNEWOBJALLOC (VPG_HAL + HAL_VERTBUFNEWOBJALLOC)
+#define VPC_HALVERTBUFTOTALOBJALLOC (VPG_HAL + HAL_VERTBUFTOTALOBJALLOC)
+#define VPC_HALINDBUFNEWBYTEALLOC (VPG_HAL + HAL_INDBUFNEWBYTEALLOC)
+#define VPC_HALINDBUFTOTALBYTEALLOC (VPG_HAL + HAL_INDBUFTOTALBYTEALLOC)
+#define VPC_HALINDBUFNEWOBJALLOC (VPG_HAL + HAL_INDBUFNEWOBJALLOC)
+#define VPC_HALINDBUFTOTALOBJALLOC (VPG_HAL + HAL_INDBUFTOTALOBJALLOC)
+#define VPC_HALTEXBUFNEWBYTEALLOC (VPG_HAL + HAL_TEXBUFNEWBYTEALLOC)
+#define VPC_HALTEXBUFTOTALBYTEALLOC (VPG_HAL + HAL_TEXBUFTOTALBYTEALLOC)
+#define VPC_HALTEXBUFNEWOBJALLOC (VPG_HAL + HAL_TEXBUFNEWOBJALLOC)
+#define VPC_HALTEXBUFTOTALOBJALLOC (VPG_HAL + HAL_TEXBUFTOTALOBJALLOC)
+
+/* HW: GPU Counters. */
+#define VPC_GPUCYCLES (VPG_GPU + GPU_CYCLES)
+#define VPC_GPUREAD64BYTE (VPG_GPU + GPU_READ64BYTE)
+#define VPC_GPUWRITE64BYTE (VPG_GPU + GPU_WRITE64BYTE)
+#define VPC_GPUTOTALCYCLES (VPG_GPU + GPU_TOTALCYCLES)
+#define VPC_GPUIDLECYCLES (VPG_GPU + GPU_IDLECYCLES)
+
+/* HW: Shader Counters. */
+#define VPC_VSINSTCOUNT (VPG_VS + VS_INSTCOUNT)
+#define VPC_VSBRANCHINSTCOUNT (VPG_VS + VS_BRANCHINSTCOUNT)
+#define VPC_VSTEXLDINSTCOUNT (VPG_VS + VS_TEXLDINSTCOUNT)
+#define VPC_VSRENDEREDVERTCOUNT (VPG_VS + VS_RENDEREDVERTCOUNT)
+/* HW: PS Count. */
+#define VPC_PSINSTCOUNT (VPG_PS + PS_INSTCOUNT)
+#define VPC_PSBRANCHINSTCOUNT (VPG_PS + PS_BRANCHINSTCOUNT)
+#define VPC_PSTEXLDINSTCOUNT (VPG_PS + PS_TEXLDINSTCOUNT)
+#define VPC_PSRENDEREDPIXCOUNT (VPG_PS + PS_RENDEREDPIXCOUNT)
+
+
+/* HW: PA Counters. */
+#define VPC_PAINVERTCOUNT (VPG_PA + PA_INVERTCOUNT)
+#define VPC_PAINPRIMCOUNT (VPG_PA + PA_INPRIMCOUNT)
+#define VPC_PAOUTPRIMCOUNT (VPG_PA + PA_OUTPRIMCOUNT)
+#define VPC_PADEPTHCLIPCOUNT (VPG_PA + PA_DEPTHCLIPCOUNT)
+#define VPC_PATRIVIALREJCOUNT (VPG_PA + PA_TRIVIALREJCOUNT)
+#define VPC_PACULLCOUNT (VPG_PA + PA_CULLCOUNT)
+
+/* HW: Setup Counters. */
+#define VPC_SETRIANGLECOUNT (VPG_SETUP + SE_TRIANGLECOUNT)
+#define VPC_SELINECOUNT (VPG_SETUP + SE_LINECOUNT)
+
+/* HW: RA Counters. */
+#define VPC_RAVALIDPIXCOUNT (VPG_RA + RA_VALIDPIXCOUNT)
+#define VPC_RATOTALQUADCOUNT (VPG_RA + RA_TOTALQUADCOUNT)
+#define VPC_RAVALIDQUADCOUNTEZ (VPG_RA + RA_VALIDQUADCOUNTEZ)
+#define VPC_RATOTALPRIMCOUNT (VPG_RA + RA_TOTALPRIMCOUNT)
+#define VPC_RAPIPECACHEMISSCOUNT (VPG_RA + RA_PIPECACHEMISSCOUNT)
+#define VPC_RAPREFCACHEMISSCOUNT (VPG_RA + RA_PREFCACHEMISSCOUNT)
+#define VPC_RAEEZCULLCOUNT (VPG_RA + RA_EEZCULLCOUNT)
+
+/* HW: TEX Counters. */
+#define VPC_TXTOTBILINEARREQ (VPG_TX + TX_TOTBILINEARREQ)
+#define VPC_TXTOTTRILINEARREQ (VPG_TX + TX_TOTTRILINEARREQ)
+#define VPC_TXTOTDISCARDTEXREQ (VPG_TX + TX_TOTDISCARDTEXREQ)
+#define VPC_TXTOTTEXREQ (VPG_TX + TX_TOTTEXREQ)
+#define VPC_TXMEMREADCOUNT (VPG_TX + TX_MEMREADCOUNT)
+#define VPC_TXMEMREADIN8BCOUNT (VPG_TX + TX_MEMREADIN8BCOUNT)
+#define VPC_TXCACHEMISSCOUNT (VPG_TX + TX_CACHEMISSCOUNT)
+#define VPC_TXCACHEHITTEXELCOUNT (VPG_TX + TX_CACHEHITTEXELCOUNT)
+#define VPC_TXCACHEMISSTEXELCOUNT (VPG_TX + TX_CACHEMISSTEXELCOUNT)
+
+/* HW: PE Counters. */
+#define VPC_PEKILLEDBYCOLOR (VPG_PE + PE_KILLEDBYCOLOR)
+#define VPC_PEKILLEDBYDEPTH (VPG_PE + PE_KILLEDBYDEPTH)
+#define VPC_PEDRAWNBYCOLOR (VPG_PE + PE_DRAWNBYCOLOR)
+#define VPC_PEDRAWNBYDEPTH (VPG_PE + PE_DRAWNBYDEPTH)
+
+/* HW: MC Counters. */
+#define VPC_MCREADREQ8BPIPE (VPG_MC + MC_READREQ8BPIPE)
+#define VPC_MCREADREQ8BIP (VPG_MC + MC_READREQ8BIP)
+#define VPC_MCWRITEREQ8BPIPE (VPG_MC + MC_WRITEREQ8BPIPE)
+
+/* HW: AXI Counters. */
+#define VPC_AXIREADREQSTALLED (VPG_AXI + AXI_READREQSTALLED)
+#define VPC_AXIWRITEREQSTALLED (VPG_AXI + AXI_WRITEREQSTALLED)
+#define VPC_AXIWRITEDATASTALLED (VPG_AXI + AXI_WRITEDATASTALLED)
+
+/* PROGRAM: Shader program counters. */
+#define VPC_PVSINSTRCOUNT (VPG_PVS + PVS_INSTRCOUNT)
+#define VPC_PVSALUINSTRCOUNT (VPG_PVS + PVS_ALUINSTRCOUNT)
+#define VPC_PVSTEXINSTRCOUNT (VPG_PVS + PVS_TEXINSTRCOUNT)
+#define VPC_PVSATTRIBCOUNT (VPG_PVS + PVS_ATTRIBCOUNT)
+#define VPC_PVSUNIFORMCOUNT (VPG_PVS + PVS_UNIFORMCOUNT)
+#define VPC_PVSFUNCTIONCOUNT (VPG_PVS + PVS_FUNCTIONCOUNT)
+
+#define VPC_PPSINSTRCOUNT (VPG_PPS + PPS_INSTRCOUNT)
+#define VPC_PPSALUINSTRCOUNT (VPG_PPS + PPS_ALUINSTRCOUNT)
+#define VPC_PPSTEXINSTRCOUNT (VPG_PPS + PPS_TEXINSTRCOUNT)
+#define VPC_PPSATTRIBCOUNT (VPG_PPS + PPS_ATTRIBCOUNT)
+#define VPC_PPSUNIFORMCOUNT (VPG_PPS + PPS_UNIFORMCOUNT)
+#define VPC_PPSFUNCTIONCOUNT (VPG_PPS + PPS_FUNCTIONCOUNT)
+
+
+#define VPG_ES20_DRAW_NO (VPG_ES20_DRAW + 1)
+#define VPG_ES11_DRAW_NO (VPG_ES11_DRAW + 1)
+
+#define VPG_FRAME_USEVBO (VPG_FRAME + 1)
+
+#endif
+
+
+/* HW profile information. */
+typedef struct _gcsPROFILER_COUNTERS
+{
+ /* HW static counters. */
+ gctUINT32 gpuClock;
+ gctUINT32 axiClock;
+ gctUINT32 shaderClock;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuClockStart;
+ gctUINT32 gpuClockEnd;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuCyclesCounter;
+ gctUINT32 gpuTotalCyclesCounter;
+ gctUINT32 gpuIdleCyclesCounter;
+ gctUINT32 gpuTotalRead64BytesPerFrame;
+ gctUINT32 gpuTotalWrite64BytesPerFrame;
+
+ /* PE */
+ gctUINT32 pe_pixel_count_killed_by_color_pipe;
+ gctUINT32 pe_pixel_count_killed_by_depth_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_color_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_depth_pipe;
+
+ /* SH */
+ gctUINT32 ps_inst_counter;
+ gctUINT32 rendered_pixel_counter;
+ gctUINT32 vs_inst_counter;
+ gctUINT32 rendered_vertice_counter;
+ gctUINT32 vtx_branch_inst_counter;
+ gctUINT32 vtx_texld_inst_counter;
+ gctUINT32 pxl_branch_inst_counter;
+ gctUINT32 pxl_texld_inst_counter;
+
+ /* PA */
+ gctUINT32 pa_input_vtx_counter;
+ gctUINT32 pa_input_prim_counter;
+ gctUINT32 pa_output_prim_counter;
+ gctUINT32 pa_depth_clipped_counter;
+ gctUINT32 pa_trivial_rejected_counter;
+ gctUINT32 pa_culled_counter;
+
+ /* SE */
+ gctUINT32 se_culled_triangle_count;
+ gctUINT32 se_culled_lines_count;
+
+ /* RA */
+ gctUINT32 ra_valid_pixel_count;
+ gctUINT32 ra_total_quad_count;
+ gctUINT32 ra_valid_quad_count_after_early_z;
+ gctUINT32 ra_total_primitive_count;
+ gctUINT32 ra_pipe_cache_miss_counter;
+ gctUINT32 ra_prefetch_cache_miss_counter;
+ gctUINT32 ra_eez_culled_counter;
+
+ /* TX */
+ gctUINT32 tx_total_bilinear_requests;
+ gctUINT32 tx_total_trilinear_requests;
+ gctUINT32 tx_total_discarded_texture_requests;
+ gctUINT32 tx_total_texture_requests;
+ gctUINT32 tx_mem_read_count;
+ gctUINT32 tx_mem_read_in_8B_count;
+ gctUINT32 tx_cache_miss_count;
+ gctUINT32 tx_cache_hit_texel_count;
+ gctUINT32 tx_cache_miss_texel_count;
+
+ /* MC */
+ gctUINT32 mc_total_read_req_8B_from_pipeline;
+ gctUINT32 mc_total_read_req_8B_from_IP;
+ gctUINT32 mc_total_write_req_8B_from_pipeline;
+
+ /* HI */
+ gctUINT32 hi_axi_cycles_read_request_stalled;
+ gctUINT32 hi_axi_cycles_write_request_stalled;
+ gctUINT32 hi_axi_cycles_write_data_stalled;
+}
+gcsPROFILER_COUNTERS;
+
+/* HAL profile information. */
+typedef struct _gcsPROFILER
+{
+ gctUINT32 enable;
+ gctBOOL enableHal;
+ gctBOOL enableHW;
+ gctBOOL enableSH;
+ gctBOOL isSyncMode;
+
+ gctBOOL useSocket;
+ gctINT sockFd;
+
+ gctFILE file;
+
+ /* Aggregate Information */
+
+ /* Clock Info */
+ gctUINT64 frameStart;
+ gctUINT64 frameEnd;
+
+ /* Current frame information */
+ gctUINT32 frameNumber;
+ gctUINT64 frameStartTimeusec;
+ gctUINT64 frameEndTimeusec;
+ gctUINT64 frameStartCPUTimeusec;
+ gctUINT64 frameEndCPUTimeusec;
+
+#if PROFILE_HAL_COUNTERS
+ gctUINT32 vertexBufferTotalBytesAlloc;
+ gctUINT32 vertexBufferNewBytesAlloc;
+ int vertexBufferTotalObjectsAlloc;
+ int vertexBufferNewObjectsAlloc;
+
+ gctUINT32 indexBufferTotalBytesAlloc;
+ gctUINT32 indexBufferNewBytesAlloc;
+ int indexBufferTotalObjectsAlloc;
+ int indexBufferNewObjectsAlloc;
+
+ gctUINT32 textureBufferTotalBytesAlloc;
+ gctUINT32 textureBufferNewBytesAlloc;
+ int textureBufferTotalObjectsAlloc;
+ int textureBufferNewObjectsAlloc;
+
+ gctUINT32 numCommits;
+ gctUINT32 drawPointCount;
+ gctUINT32 drawLineCount;
+ gctUINT32 drawTriangleCount;
+ gctUINT32 drawVertexCount;
+ gctUINT32 redundantStateChangeCalls;
+#endif
+
+ gctUINT32 prevVSInstCount;
+ gctUINT32 prevVSBranchInstCount;
+ gctUINT32 prevVSTexInstCount;
+ gctUINT32 prevVSVertexCount;
+ gctUINT32 prevPSInstCount;
+ gctUINT32 prevPSBranchInstCount;
+ gctUINT32 prevPSTexInstCount;
+ gctUINT32 prevPSPixelCount;
+
+}
+gcsPROFILER;
+
+/* Memory profile information. */
+struct _gcsMemProfile
+{
+ /* Memory Usage */
+ gctUINT32 videoMemUsed;
+ gctUINT32 systemMemUsed;
+ gctUINT32 commitBufferSize;
+ gctUINT32 contextBufferCopyBytes;
+};
+
+/* Shader profile information. */
+struct _gcsSHADER_PROFILER
+{
+ gctUINT32 shaderLength;
+ gctUINT32 shaderALUCycles;
+ gctUINT32 shaderTexLoadCycles;
+ gctUINT32 shaderTempRegCount;
+ gctUINT32 shaderSamplerRegCount;
+ gctUINT32 shaderInputRegCount;
+ gctUINT32 shaderOutputRegCount;
+};
+
+/* Initialize the gcsProfiler. */
+gceSTATUS
+gcoPROFILER_Initialize(
+ IN gcoHAL Hal
+ );
+
+/* Destroy the gcProfiler. */
+gceSTATUS
+gcoPROFILER_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Write data to profiler. */
+gceSTATUS
+gcoPROFILER_Write(
+ IN gcoHAL Hal,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Flush data out. */
+gceSTATUS
+gcoPROFILER_Flush(
+ IN gcoHAL Hal
+ );
+
+/* Call to signal end of frame. */
+gceSTATUS
+gcoPROFILER_EndFrame(
+ IN gcoHAL Hal
+ );
+
+/* Call to signal end of draw. */
+gceSTATUS
+gcoPROFILER_EndDraw(
+ IN gcoHAL Hal,
+ IN gctBOOL FirstDraw
+ );
+
+/* Increase profile counter Enum by Value. */
+gceSTATUS
+gcoPROFILER_Count(
+ IN gcoHAL Hal,
+ IN gctUINT32 Enum,
+ IN gctINT Value
+ );
+
+/* Profile input vertex shader. */
+gceSTATUS
+gcoPROFILER_ShaderVS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Vs
+ );
+
+/* Profile input fragment shader. */
+gceSTATUS
+gcoPROFILER_ShaderFS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Fs
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_profiler_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_raster.h b/src/include_imx6_v4_0_0/gc_hal_raster.h
new file mode 100644
index 0000000..bc4171e
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_raster.h
@@ -0,0 +1,962 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_raster_h_
+#define __gc_hal_raster_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoBRUSH * gcoBRUSH;
+typedef struct _gcoBRUSH_CACHE * gcoBRUSH_CACHE;
+
+/******************************************************************************\
+******************************** gcoBRUSH Object *******************************
+\******************************************************************************/
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructSingleColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructMonochrome(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Destroy an gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_Destroy(
+ IN gcoBRUSH Brush
+ );
+
+/******************************************************************************\
+******************************** gcoSURF Object *******************************
+\******************************************************************************/
+
+/* Set cipping rectangle. */
+gceSTATUS
+gcoSURF_SetClipping(
+ IN gcoSURF Surface
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gcoSURF_Clear2D(
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 LoColor,
+ IN gctUINT32 HiColor
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gcoSURF_Line(
+ IN gcoSURF Surface,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop
+ );
+
+/* Generic rectangular blit. */
+gceSTATUS
+gcoSURF_Blit(
+ IN OPTIONAL gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN OPTIONAL gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN OPTIONAL gceSURF_TRANSPARENCY Transparency,
+ IN OPTIONAL gctUINT32 TransparencyColor,
+ IN OPTIONAL gctPOINTER Mask,
+ IN OPTIONAL gceSURF_MONOPACK MaskPack
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gcoSURF_MonoBlit(
+ IN gcoSURF DestSurface,
+ IN gctPOINTER Source,
+ IN gceSURF_MONOPACK SourcePack,
+ IN gcsPOINT_PTR SourceSize,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Filter blit. */
+gceSTATUS
+gcoSURF_FilterBlit(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gcoSURF_EnableAlphaBlend(
+ IN gcoSURF Surface,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gcoSURF_DisableAlphaBlend(
+ IN gcoSURF Surface
+ );
+
+/* Copy a rectangular area with format conversion. */
+gceSTATUS
+gcoSURF_CopyPixels(
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctINT SourceX,
+ IN gctINT SourceY,
+ IN gctINT TargetX,
+ IN gctINT TargetY,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+/* Read surface pixel. */
+gceSTATUS
+gcoSURF_ReadPixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ OUT gctPOINTER PixelValue
+ );
+
+/* Write surface pixel. */
+gceSTATUS
+gcoSURF_WritePixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ IN gctPOINTER PixelValue
+ );
+
+gceSTATUS
+gcoSURF_SetDither(
+ IN gcoSURF Surface,
+ IN gctBOOL Dither
+ );
+/******************************************************************************\
+********************************** gco2D Object *********************************
+\******************************************************************************/
+
+/* Construct a new gco2D object. */
+gceSTATUS
+gco2D_Construct(
+ IN gcoHAL Hal,
+ OUT gco2D * Hardware
+ );
+
+/* Destroy an gco2D object. */
+gceSTATUS
+gco2D_Destroy(
+ IN gco2D Hardware
+ );
+
+/* Sets the maximum number of brushes in the brush cache. */
+gceSTATUS
+gco2D_SetBrushLimit(
+ IN gco2D Hardware,
+ IN gctUINT MaxCount
+ );
+
+/* Flush the brush. */
+gceSTATUS
+gco2D_FlushBrush(
+ IN gco2D Engine,
+ IN gcoBRUSH Brush,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Program the specified solid color brush. */
+gceSTATUS
+gco2D_LoadSolidBrush(
+ IN gco2D Engine,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask
+ );
+
+gceSTATUS
+gco2D_LoadMonochromeBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask
+ );
+
+gceSTATUS
+gco2D_LoadColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask
+ );
+
+/* Configure monochrome source. */
+gceSTATUS
+gco2D_SetMonochromeSource(
+ IN gco2D Engine,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_MONOPACK DataPack,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source extension for full rotation. */
+gceSTATUS
+gco2D_SetColorSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSourceAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative
+ );
+
+gceSTATUS
+gco2D_SetColorSourceN(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctUINT32 SurfaceNumber
+ );
+
+/* Configure masked color source. */
+gceSTATUS
+gco2D_SetMaskedSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack
+ );
+
+/* Configure masked color source extension for full rotation. */
+gceSTATUS
+gco2D_SetMaskedSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Setup the source rectangle. */
+gceSTATUS
+gco2D_SetSource(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect
+ );
+
+/* Set clipping rectangle. */
+gceSTATUS
+gco2D_SetClipping(
+ IN gco2D Engine,
+ IN gcsRECT_PTR Rect
+ );
+
+/* Configure destination. */
+gceSTATUS
+gco2D_SetTarget(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth
+ );
+
+/* Configure destination extension for full rotation. */
+gceSTATUS
+gco2D_SetTargetEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Calculate and program the stretch factors. */
+gceSTATUS
+gco2D_CalcStretchFactor(
+ IN gco2D Engine,
+ IN gctINT32 SrcSize,
+ IN gctINT32 DestSize,
+ OUT gctUINT32_PTR Factor
+ );
+
+gceSTATUS
+gco2D_SetStretchFactors(
+ IN gco2D Engine,
+ IN gctUINT32 HorFactor,
+ IN gctUINT32 VerFactor
+ );
+
+/* Calculate and program the stretch factors based on the rectangles. */
+gceSTATUS
+gco2D_SetStretchRectFactors(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect
+ );
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructSingleColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructMonochromeBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gco2D_Clear(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gco2D_Line(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines based on the 32-bit color. */
+gceSTATUS
+gco2D_ColorLine(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Generic blit. */
+gceSTATUS
+gco2D_Blit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+gceSTATUS
+gco2D_Blend(
+ IN gco2D Engine,
+ IN gctUINT32 SrcCount,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Batch blit. */
+gceSTATUS
+gco2D_BatchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Stretch blit. */
+gceSTATUS
+gco2D_StretchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gco2D_MonoBlit(
+ IN gco2D Engine,
+ IN gctPOINTER StreamBits,
+ IN gcsPOINT_PTR StreamSize,
+ IN gcsRECT_PTR StreamRect,
+ IN gceSURF_MONOPACK SrcStreamPack,
+ IN gceSURF_MONOPACK DestStreamPack,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 FgRop,
+ IN gctUINT32 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Set kernel size. */
+gceSTATUS
+gco2D_SetKernelSize(
+ IN gco2D Engine,
+ IN gctUINT8 HorKernelSize,
+ IN gctUINT8 VerKernelSize
+ );
+
+/* Set filter type. */
+gceSTATUS
+gco2D_SetFilterType(
+ IN gco2D Engine,
+ IN gceFILTER_TYPE FilterType
+ );
+
+/* Set the filter kernel by user. */
+gceSTATUS
+gco2D_SetUserFilterKernel(
+ IN gco2D Engine,
+ IN gceFILTER_PASS_TYPE PassType,
+ IN gctUINT16_PTR KernelArray
+ );
+
+/* Select the pass(es) to be done for user defined filter. */
+gceSTATUS
+gco2D_EnableUserFilterPasses(
+ IN gco2D Engine,
+ IN gctBOOL HorPass,
+ IN gctBOOL VerPass
+ );
+
+/* Frees the temporary buffer allocated by filter blit operation. */
+gceSTATUS
+gco2D_FreeFilterBuffer(
+ IN gco2D Engine
+ );
+
+/* Filter blit. */
+gceSTATUS
+gco2D_FilterBlit(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Filter blit extension for full rotation. */
+gceSTATUS
+gco2D_FilterBlitEx(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gctUINT32 SrcSurfaceHeight,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gctUINT32 DestSurfaceHeight,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+gceSTATUS
+gco2D_FilterBlitEx2(
+ IN gco2D Engine,
+ IN gctUINT32_PTR SrcAddresses,
+ IN gctUINT32 SrcAddressNum,
+ IN gctUINT32_PTR SrcStrides,
+ IN gctUINT32 SrcStrideNum,
+ IN gceTILING SrcTiling,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gctUINT32 SrcSurfaceHeight,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32_PTR DestAddresses,
+ IN gctUINT32 DestAddressNum,
+ IN gctUINT32_PTR DestStrides,
+ IN gctUINT32 DestStrideNum,
+ IN gceTILING DestTiling,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gctUINT32 DestSurfaceHeight,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gco2D_EnableAlphaBlend(
+ IN gco2D Engine,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Enable alpha blending engine in the hardware. */
+gceSTATUS
+gco2D_EnableAlphaBlendAdvanced(
+ IN gco2D Engine,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode
+ );
+
+/* Enable alpha blending engine with Porter Duff rule. */
+gceSTATUS
+gco2D_SetPorterDuffBlending(
+ IN gco2D Engine,
+ IN gce2D_PORTER_DUFF_RULE Rule
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gco2D_DisableAlphaBlend(
+ IN gco2D Engine
+ );
+
+/* Retrieve the maximum number of 32-bit data chunks for a single DE command. */
+gctUINT32
+gco2D_GetMaximumDataCount(
+ void
+ );
+
+/* Retrieve the maximum number of rectangles, that can be passed in a single DE command. */
+gctUINT32
+gco2D_GetMaximumRectCount(
+ void
+ );
+
+/* Returns the pixel alignment of the surface. */
+gceSTATUS
+gco2D_GetPixelAlignment(
+ gceSURF_FORMAT Format,
+ gcsPOINT_PTR Alignment
+ );
+
+/* Retrieve monochrome stream pack size. */
+gceSTATUS
+gco2D_GetPackSize(
+ IN gceSURF_MONOPACK StreamPack,
+ OUT gctUINT32 * PackWidth,
+ OUT gctUINT32 * PackHeight
+ );
+
+/* Flush the 2D pipeline. */
+gceSTATUS
+gco2D_Flush(
+ IN gco2D Engine
+ );
+
+/* Load 256-entry color table for INDEX8 source surfaces. */
+gceSTATUS
+gco2D_LoadPalette(
+ IN gco2D Engine,
+ IN gctUINT FirstIndex,
+ IN gctUINT IndexCount,
+ IN gctPOINTER ColorTable,
+ IN gctBOOL ColorConvert
+ );
+
+/* Enable/disable 2D BitBlt mirrorring. */
+gceSTATUS
+gco2D_SetBitBlitMirror(
+ IN gco2D Engine,
+ IN gctBOOL HorizontalMirror,
+ IN gctBOOL VerticalMirror
+ );
+
+/*
+ * Set the transparency for source, destination and pattern.
+ * It also enable or disable the DFB color key mode.
+ */
+gceSTATUS
+gco2D_SetTransparencyAdvancedEx(
+ IN gco2D Engine,
+ IN gce2D_TRANSPARENCY SrcTransparency,
+ IN gce2D_TRANSPARENCY DstTransparency,
+ IN gce2D_TRANSPARENCY PatTransparency,
+ IN gctBOOL EnableDFBColorKeyMode
+ );
+
+/* Set the transparency for source, destination and pattern. */
+gceSTATUS
+gco2D_SetTransparencyAdvanced(
+ IN gco2D Engine,
+ IN gce2D_TRANSPARENCY SrcTransparency,
+ IN gce2D_TRANSPARENCY DstTransparency,
+ IN gce2D_TRANSPARENCY PatTransparency
+ );
+
+/* Set the source color key. */
+gceSTATUS
+gco2D_SetSourceColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the source color key range. */
+gceSTATUS
+gco2D_SetSourceColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the target color key. */
+gceSTATUS
+gco2D_SetTargetColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the target color key range. */
+gceSTATUS
+gco2D_SetTargetColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the YUV color space mode. */
+gceSTATUS
+gco2D_SetYUVColorMode(
+ IN gco2D Engine,
+ IN gce2D_YUV_COLOR_MODE Mode
+ );
+
+/* Setup the source global color value in ARGB8 format. */
+gceSTATUS gco2D_SetSourceGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the target global color value in ARGB8 format. */
+gceSTATUS gco2D_SetTargetGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the source and target pixel multiply modes. */
+gceSTATUS
+gco2D_SetPixelMultiplyModeAdvanced(
+ IN gco2D Engine,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE SrcPremultiplySrcAlpha,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstPremultiplyDstAlpha,
+ IN gce2D_GLOBAL_COLOR_MULTIPLY_MODE SrcPremultiplyGlobalMode,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstDemultiplyDstAlpha
+ );
+
+/* Set the GPU clock cycles after which the idle engine will keep auto-flushing. */
+gceSTATUS
+gco2D_SetAutoFlushCycles(
+ IN gco2D Engine,
+ IN gctUINT32 Cycles
+ );
+
+#if VIVANTE_PROFILER
+/* Read the profile registers available in the 2D engine and sets them in the profile.
+ The function will also reset the pixelsRendered counter every time.
+*/
+gceSTATUS
+gco2D_ProfileEngine(
+ IN gco2D Engine,
+ OPTIONAL gcs2D_PROFILE_PTR Profile
+ );
+#endif
+
+/* Enable or disable 2D dithering. */
+gceSTATUS
+gco2D_EnableDither(
+ IN gco2D Engine,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gco2D_SetGenericSource(
+ IN gco2D Engine,
+ IN gctUINT32_PTR Addresses,
+ IN gctUINT32 AddressNum,
+ IN gctUINT32_PTR Strides,
+ IN gctUINT32 StrideNum,
+ IN gceTILING Tiling,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+);
+
+gceSTATUS
+gco2D_SetGenericTarget(
+ IN gco2D Engine,
+ IN gctUINT32_PTR Addresses,
+ IN gctUINT32 AddressNum,
+ IN gctUINT32_PTR Strides,
+ IN gctUINT32 StrideNum,
+ IN gceTILING Tiling,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+);
+
+gceSTATUS
+gco2D_SetCurrentSourceIndex(
+ IN gco2D Engine,
+ IN gctUINT32 SrcIndex
+ );
+
+gceSTATUS
+gco2D_MultiSourceBlit(
+ IN gco2D Engine,
+ IN gctUINT32 SourceMask,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 RectCount
+ );
+
+gceSTATUS
+gco2D_SetROP(
+ IN gco2D Engine,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop
+ );
+
+gceSTATUS
+gco2D_SetGdiStretchMode(
+ IN gco2D Engine,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gco2D_SetSourceTileStatus(
+ IN gco2D Engine,
+ IN gce2D_TILE_STATUS_CONFIG TSControl,
+ IN gceSURF_FORMAT CompressedFormat,
+ IN gctUINT32 ClearValue,
+ IN gctUINT32 GpuAddress
+ );
+
+gceSTATUS
+gco2D_QueryU32(
+ IN gco2D Engine,
+ IN gce2D_QUERY Item,
+ OUT gctUINT32_PTR Value
+ );
+
+gceSTATUS
+gco2D_SetStateU32(
+ IN gco2D Engine,
+ IN gce2D_STATE State,
+ IN gctUINT32 Value
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_raster_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_rename.h b/src/include_imx6_v4_0_0/gc_hal_rename.h
new file mode 100644
index 0000000..6c10fbf
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_rename.h
@@ -0,0 +1,248 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_rename_h_
+#define __gc_hal_rename_h_
+
+
+#if defined(_HAL2D_APPENDIX)
+
+#define _HAL2D_RENAME_2(api, appendix) api ## appendix
+#define _HAL2D_RENAME_1(api, appendix) _HAL2D_RENAME_2(api, appendix)
+#define gcmHAL2D(api) _HAL2D_RENAME_1(api, _HAL2D_APPENDIX)
+
+
+#define gckOS_Construct gcmHAL2D(gckOS_Construct)
+#define gckOS_Destroy gcmHAL2D(gckOS_Destroy)
+#define gckOS_QueryVideoMemory gcmHAL2D(gckOS_QueryVideoMemory)
+#define gckOS_Allocate gcmHAL2D(gckOS_Allocate)
+#define gckOS_Free gcmHAL2D(gckOS_Free)
+#define gckOS_AllocateMemory gcmHAL2D(gckOS_AllocateMemory)
+#define gckOS_FreeMemory gcmHAL2D(gckOS_FreeMemory)
+#define gckOS_AllocatePagedMemory gcmHAL2D(gckOS_AllocatePagedMemory)
+#define gckOS_AllocatePagedMemoryEx gcmHAL2D(gckOS_AllocatePagedMemoryEx)
+#define gckOS_LockPages gcmHAL2D(gckOS_LockPages)
+#define gckOS_MapPages gcmHAL2D(gckOS_MapPages)
+#define gckOS_UnlockPages gcmHAL2D(gckOS_UnlockPages)
+#define gckOS_FreePagedMemory gcmHAL2D(gckOS_FreePagedMemory)
+#define gckOS_AllocateNonPagedMemory gcmHAL2D(gckOS_AllocateNonPagedMemory)
+#define gckOS_FreeNonPagedMemory gcmHAL2D(gckOS_FreeNonPagedMemory)
+#define gckOS_AllocateContiguous gcmHAL2D(gckOS_AllocateContiguous)
+#define gckOS_FreeContiguous gcmHAL2D(gckOS_FreeContiguous)
+#define gckOS_GetPageSize gcmHAL2D(gckOS_GetPageSize)
+#define gckOS_GetPhysicalAddress gcmHAL2D(gckOS_GetPhysicalAddress)
+#define gckOS_GetPhysicalAddressProcess gcmHAL2D(gckOS_GetPhysicalAddressProcess)
+#define gckOS_MapPhysical gcmHAL2D(gckOS_MapPhysical)
+#define gckOS_UnmapPhysical gcmHAL2D(gckOS_UnmapPhysical)
+#define gckOS_ReadRegister gcmHAL2D(gckOS_ReadRegister)
+#define gckOS_WriteRegister gcmHAL2D(gckOS_WriteRegister)
+#define gckOS_WriteMemory gcmHAL2D(gckOS_WriteMemory)
+#define gckOS_MapMemory gcmHAL2D(gckOS_MapMemory)
+#define gckOS_UnmapMemory gcmHAL2D(gckOS_UnmapMemory)
+#define gckOS_UnmapMemoryEx gcmHAL2D(gckOS_UnmapMemoryEx)
+#define gckOS_CreateMutex gcmHAL2D(gckOS_CreateMutex)
+#define gckOS_DeleteMutex gcmHAL2D(gckOS_DeleteMutex)
+#define gckOS_AcquireMutex gcmHAL2D(gckOS_AcquireMutex)
+#define gckOS_ReleaseMutex gcmHAL2D(gckOS_ReleaseMutex)
+#define gckOS_AtomicExchange gcmHAL2D(gckOS_AtomicExchange)
+#define gckOS_AtomicExchangePtr gcmHAL2D(gckOS_AtomicExchangePtr)
+#define gckOS_AtomConstruct gcmHAL2D(gckOS_AtomConstruct)
+#define gckOS_AtomDestroy gcmHAL2D(gckOS_AtomDestroy)
+#define gckOS_AtomGet gcmHAL2D(gckOS_AtomGet)
+#define gckOS_AtomIncrement gcmHAL2D(gckOS_AtomIncrement)
+#define gckOS_AtomDecrement gcmHAL2D(gckOS_AtomDecrement)
+#define gckOS_Delay gcmHAL2D(gckOS_Delay)
+#define gckOS_GetTime gcmHAL2D(gckOS_GetTime)
+#define gckOS_MemoryBarrier gcmHAL2D(gckOS_MemoryBarrier)
+#define gckOS_MapUserPointer gcmHAL2D(gckOS_MapUserPointer)
+#define gckOS_UnmapUserPointer gcmHAL2D(gckOS_UnmapUserPointer)
+#define gckOS_QueryNeedCopy gcmHAL2D(gckOS_QueryNeedCopy)
+#define gckOS_CopyFromUserData gcmHAL2D(gckOS_CopyFromUserData)
+#define gckOS_CopyToUserData gcmHAL2D(gckOS_CopyToUserData)
+#define gckOS_MapUserPhysical gcmHAL2D(gckOS_MapUserPhysical)
+#define gckOS_SuspendInterrupt gcmHAL2D(gckOS_SuspendInterrupt)
+#define gckOS_ResumeInterrupt gcmHAL2D(gckOS_ResumeInterrupt)
+#define gckOS_GetBaseAddress gcmHAL2D(gckOS_GetBaseAddress)
+#define gckOS_MemCopy gcmHAL2D(gckOS_MemCopy)
+#define gckOS_ZeroMemory gcmHAL2D(gckOS_ZeroMemory)
+#define gckOS_DeviceControl gcmHAL2D(gckOS_DeviceControl)
+#define gckOS_GetProcessID gcmHAL2D(gckOS_GetProcessID)
+#define gckOS_GetThreadID gcmHAL2D(gckOS_GetThreadID)
+#define gckOS_CreateSignal gcmHAL2D(gckOS_CreateSignal)
+#define gckOS_DestroySignal gcmHAL2D(gckOS_DestroySignal)
+#define gckOS_Signal gcmHAL2D(gckOS_Signal)
+#define gckOS_WaitSignal gcmHAL2D(gckOS_WaitSignal)
+#define gckOS_MapSignal gcmHAL2D(gckOS_MapSignal)
+#define gckOS_MapUserMemory gcmHAL2D(gckOS_MapUserMemory)
+#define gckOS_UnmapUserMemory gcmHAL2D(gckOS_UnmapUserMemory)
+#define gckOS_CreateUserSignal gcmHAL2D(gckOS_CreateUserSignal)
+#define gckOS_DestroyUserSignal gcmHAL2D(gckOS_DestroyUserSignal)
+#define gckOS_WaitUserSignal gcmHAL2D(gckOS_WaitUserSignal)
+#define gckOS_SignalUserSignal gcmHAL2D(gckOS_SignalUserSignal)
+#define gckOS_UserSignal gcmHAL2D(gckOS_UserSignal)
+#define gckOS_UserSignal gcmHAL2D(gckOS_UserSignal)
+#define gckOS_CacheClean gcmHAL2D(gckOS_CacheClean)
+#define gckOS_CacheFlush gcmHAL2D(gckOS_CacheFlush)
+#define gckOS_SetDebugLevel gcmHAL2D(gckOS_SetDebugLevel)
+#define gckOS_SetDebugZone gcmHAL2D(gckOS_SetDebugZone)
+#define gckOS_SetDebugLevelZone gcmHAL2D(gckOS_SetDebugLevelZone)
+#define gckOS_SetDebugZones gcmHAL2D(gckOS_SetDebugZones)
+#define gckOS_SetDebugFile gcmHAL2D(gckOS_SetDebugFile)
+#define gckOS_Broadcast gcmHAL2D(gckOS_Broadcast)
+#define gckOS_SetGPUPower gcmHAL2D(gckOS_SetGPUPower)
+#define gckOS_CreateSemaphore gcmHAL2D(gckOS_CreateSemaphore)
+#define gckOS_DestroySemaphore gcmHAL2D(gckOS_DestroySemaphore)
+#define gckOS_AcquireSemaphore gcmHAL2D(gckOS_AcquireSemaphore)
+#define gckOS_ReleaseSemaphore gcmHAL2D(gckOS_ReleaseSemaphore)
+#define gckHEAP_Construct gcmHAL2D(gckHEAP_Construct)
+#define gckHEAP_Destroy gcmHAL2D(gckHEAP_Destroy)
+#define gckHEAP_Allocate gcmHAL2D(gckHEAP_Allocate)
+#define gckHEAP_Free gcmHAL2D(gckHEAP_Free)
+#define gckHEAP_ProfileStart gcmHAL2D(gckHEAP_ProfileStart)
+#define gckHEAP_ProfileEnd gcmHAL2D(gckHEAP_ProfileEnd)
+#define gckHEAP_Test gcmHAL2D(gckHEAP_Test)
+#define gckVIDMEM_Construct gcmHAL2D(gckVIDMEM_Construct)
+#define gckVIDMEM_Destroy gcmHAL2D(gckVIDMEM_Destroy)
+#define gckVIDMEM_Allocate gcmHAL2D(gckVIDMEM_Allocate)
+#define gckVIDMEM_AllocateLinear gcmHAL2D(gckVIDMEM_AllocateLinear)
+#define gckVIDMEM_Free gcmHAL2D(gckVIDMEM_Free)
+#define gckVIDMEM_Lock gcmHAL2D(gckVIDMEM_Lock)
+#define gckVIDMEM_Unlock gcmHAL2D(gckVIDMEM_Unlock)
+#define gckVIDMEM_ConstructVirtual gcmHAL2D(gckVIDMEM_ConstructVirtual)
+#define gckVIDMEM_DestroyVirtual gcmHAL2D(gckVIDMEM_DestroyVirtual)
+#define gckKERNEL_Construct gcmHAL2D(gckKERNEL_Construct)
+#define gckKERNEL_Destroy gcmHAL2D(gckKERNEL_Destroy)
+#define gckKERNEL_Dispatch gcmHAL2D(gckKERNEL_Dispatch)
+#define gckKERNEL_QueryVideoMemory gcmHAL2D(gckKERNEL_QueryVideoMemory)
+#define gckKERNEL_GetVideoMemoryPool gcmHAL2D(gckKERNEL_GetVideoMemoryPool)
+#define gckKERNEL_MapVideoMemory gcmHAL2D(gckKERNEL_MapVideoMemory)
+#define gckKERNEL_UnmapVideoMemory gcmHAL2D(gckKERNEL_UnmapVideoMemory)
+#define gckKERNEL_MapMemory gcmHAL2D(gckKERNEL_MapMemory)
+#define gckKERNEL_UnmapMemory gcmHAL2D(gckKERNEL_UnmapMemory)
+#define gckKERNEL_Notify gcmHAL2D(gckKERNEL_Notify)
+#define gckKERNEL_QuerySettings gcmHAL2D(gckKERNEL_QuerySettings)
+#define gckKERNEL_Recovery gcmHAL2D(gckKERNEL_Recovery)
+#define gckKERNEL_OpenUserData gcmHAL2D(gckKERNEL_OpenUserData)
+#define gckKERNEL_CloseUserData gcmHAL2D(gckKERNEL_CloseUserData)
+#define gckHARDWARE_Construct gcmHAL2D(gckHARDWARE_Construct)
+#define gckHARDWARE_Destroy gcmHAL2D(gckHARDWARE_Destroy)
+#define gckHARDWARE_QuerySystemMemory gcmHAL2D(gckHARDWARE_QuerySystemMemory)
+#define gckHARDWARE_BuildVirtualAddress gcmHAL2D(gckHARDWARE_BuildVirtualAddress)
+#define gckHARDWARE_QueryCommandBuffer gcmHAL2D(gckHARDWARE_QueryCommandBuffer)
+#define gckHARDWARE_WaitLink gcmHAL2D(gckHARDWARE_WaitLink)
+#define gckHARDWARE_Execute gcmHAL2D(gckHARDWARE_Execute)
+#define gckHARDWARE_End gcmHAL2D(gckHARDWARE_End)
+#define gckHARDWARE_Nop gcmHAL2D(gckHARDWARE_Nop)
+#define gckHARDWARE_Wait gcmHAL2D(gckHARDWARE_Wait)
+#define gckHARDWARE_PipeSelect gcmHAL2D(gckHARDWARE_PipeSelect)
+#define gckHARDWARE_Link gcmHAL2D(gckHARDWARE_Link)
+#define gckHARDWARE_Event gcmHAL2D(gckHARDWARE_Event)
+#define gckHARDWARE_QueryMemory gcmHAL2D(gckHARDWARE_QueryMemory)
+#define gckHARDWARE_QueryChipIdentity gcmHAL2D(gckHARDWARE_QueryChipIdentity)
+#define gckHARDWARE_QueryChipSpecs gcmHAL2D(gckHARDWARE_QueryChipSpecs)
+#define gckHARDWARE_QueryShaderCaps gcmHAL2D(gckHARDWARE_QueryShaderCaps)
+#define gckHARDWARE_ConvertFormat gcmHAL2D(gckHARDWARE_ConvertFormat)
+#define gckHARDWARE_SplitMemory gcmHAL2D(gckHARDWARE_SplitMemory)
+#define gckHARDWARE_AlignToTile gcmHAL2D(gckHARDWARE_AlignToTile)
+#define gckHARDWARE_UpdateQueueTail gcmHAL2D(gckHARDWARE_UpdateQueueTail)
+#define gckHARDWARE_ConvertLogical gcmHAL2D(gckHARDWARE_ConvertLogical)
+#define gckHARDWARE_ConvertPhysical gcmHAL2D(gckHARDWARE_ConvertPhysical)
+#define gckHARDWARE_Interrupt gcmHAL2D(gckHARDWARE_Interrupt)
+#define gckHARDWARE_SetMMU gcmHAL2D(gckHARDWARE_SetMMU)
+#define gckHARDWARE_FlushMMU gcmHAL2D(gckHARDWARE_FlushMMU)
+#define gckHARDWARE_GetIdle gcmHAL2D(gckHARDWARE_GetIdle)
+#define gckHARDWARE_Flush gcmHAL2D(gckHARDWARE_Flush)
+#define gckHARDWARE_SetFastClear gcmHAL2D(gckHARDWARE_SetFastClear)
+#define gckHARDWARE_ReadInterrupt gcmHAL2D(gckHARDWARE_ReadInterrupt)
+#define gckHARDWARE_SetPowerManagementState gcmHAL2D(gckHARDWARE_SetPowerManagementState)
+#define gckHARDWARE_QueryPowerManagementState gcmHAL2D(gckHARDWARE_QueryPowerManagementState)
+#define gckHARDWARE_ProfileEngine2D gcmHAL2D(gckHARDWARE_ProfileEngine2D)
+#define gckHARDWARE_InitializeHardware gcmHAL2D(gckHARDWARE_InitializeHardware)
+#define gckHARDWARE_Reset gcmHAL2D(gckHARDWARE_Reset)
+#define gckINTERRUPT_Construct gcmHAL2D(gckINTERRUPT_Construct)
+#define gckINTERRUPT_Destroy gcmHAL2D(gckINTERRUPT_Destroy)
+#define gckINTERRUPT_SetHandler gcmHAL2D(gckINTERRUPT_SetHandler)
+#define gckINTERRUPT_Notify gcmHAL2D(gckINTERRUPT_Notify)
+#define gckEVENT_Construct gcmHAL2D(gckEVENT_Construct)
+#define gckEVENT_Destroy gcmHAL2D(gckEVENT_Destroy)
+#define gckEVENT_AddList gcmHAL2D(gckEVENT_AddList)
+#define gckEVENT_FreeNonPagedMemory gcmHAL2D(gckEVENT_FreeNonPagedMemory)
+#define gckEVENT_FreeContiguousMemory gcmHAL2D(gckEVENT_FreeContiguousMemory)
+#define gckEVENT_FreeVideoMemory gcmHAL2D(gckEVENT_FreeVideoMemory)
+#define gckEVENT_Signal gcmHAL2D(gckEVENT_Signal)
+#define gckEVENT_Unlock gcmHAL2D(gckEVENT_Unlock)
+#define gckEVENT_Submit gcmHAL2D(gckEVENT_Submit)
+#define gckEVENT_Commit gcmHAL2D(gckEVENT_Commit)
+#define gckEVENT_Notify gcmHAL2D(gckEVENT_Notify)
+#define gckEVENT_Interrupt gcmHAL2D(gckEVENT_Interrupt)
+#define gckCOMMAND_Construct gcmHAL2D(gckCOMMAND_Construct)
+#define gckCOMMAND_Destroy gcmHAL2D(gckCOMMAND_Destroy)
+#define gckCOMMAND_EnterCommit gcmHAL2D(gckCOMMAND_EnterCommit)
+#define gckCOMMAND_ExitCommit gcmHAL2D(gckCOMMAND_ExitCommit)
+#define gckCOMMAND_Start gcmHAL2D(gckCOMMAND_Start)
+#define gckCOMMAND_Stop gcmHAL2D(gckCOMMAND_Stop)
+#define gckCOMMAND_Commit gcmHAL2D(gckCOMMAND_Commit)
+#define gckCOMMAND_Reserve gcmHAL2D(gckCOMMAND_Reserve)
+#define gckCOMMAND_Execute gcmHAL2D(gckCOMMAND_Execute)
+#define gckCOMMAND_Stall gcmHAL2D(gckCOMMAND_Stall)
+#define gckCOMMAND_Attach gcmHAL2D(gckCOMMAND_Attach)
+#define gckCOMMAND_Detach gcmHAL2D(gckCOMMAND_Detach)
+#define gckMMU_Construct gcmHAL2D(gckMMU_Construct)
+#define gckMMU_Destroy gcmHAL2D(gckMMU_Destroy)
+#define gckMMU_AllocatePages gcmHAL2D(gckMMU_AllocatePages)
+#define gckMMU_FreePages gcmHAL2D(gckMMU_FreePages)
+#define gckMMU_InsertNode gcmHAL2D(gckMMU_InsertNode)
+#define gckMMU_RemoveNode gcmHAL2D(gckMMU_RemoveNode)
+#define gckMMU_FreeHandleMemory gcmHAL2D(gckMMU_FreeHandleMemory)
+#define gckMMU_Test gcmHAL2D(gckMMU_Test)
+#define gckHARDWARE_QueryProfileRegisters gcmHAL2D(gckHARDWARE_QueryProfileRegisters)
+
+
+#define FindMdlMap gcmHAL2D(FindMdlMap)
+#define OnProcessExit gcmHAL2D(OnProcessExit)
+
+#define gckGALDEVICE_Destroy gcmHAL2D(gckGALDEVICE_Destroy)
+#define gckOS_Print gcmHAL2D(gckOS_Print)
+#define gckGALDEVICE_FreeMemory gcmHAL2D(gckGALDEVICE_FreeMemory)
+#define gckGALDEVICE_AllocateMemory gcmHAL2D(gckGALDEVICE_AllocateMemory)
+#define gckOS_DebugBreak gcmHAL2D(gckOS_DebugBreak)
+#define gckGALDEVICE_Release_ISR gcmHAL2D(gckGALDEVICE_Release_ISR)
+#define gckOS_Verify gcmHAL2D(gckOS_Verify)
+#define gckCOMMAND_Release gcmHAL2D(gckCOMMAND_Release)
+#define gckGALDEVICE_Stop gcmHAL2D(gckGALDEVICE_Stop)
+#define gckGALDEVICE_Construct gcmHAL2D(gckGALDEVICE_Construct)
+#define gckOS_DebugFatal gcmHAL2D(gckOS_DebugFatal)
+#define gckOS_DebugTrace gcmHAL2D(gckOS_DebugTrace)
+#define gckHARDWARE_GetBaseAddress gcmHAL2D(gckHARDWARE_GetBaseAddress)
+#define gckGALDEVICE_Setup_ISR gcmHAL2D(gckGALDEVICE_Setup_ISR)
+#define gckKERNEL_AttachProcess gcmHAL2D(gckKERNEL_AttachProcess)
+#define gckKERNEL_AttachProcessEx gcmHAL2D(gckKERNEL_AttachProcessEx)
+#define gckGALDEVICE_Start_Thread gcmHAL2D(gckGALDEVICE_Start_Thread)
+#define gckHARDWARE_QueryIdle gcmHAL2D(gckHARDWARE_QueryIdle)
+#define gckGALDEVICE_Start gcmHAL2D(gckGALDEVICE_Start)
+#define gckOS_GetKernelLogical gcmHAL2D(gckOS_GetKernelLogical)
+#define gckOS_DebugTraceZone gcmHAL2D(gckOS_DebugTraceZone)
+#define gckGALDEVICE_Stop_Thread gcmHAL2D(gckGALDEVICE_Stop_Thread)
+#define gckHARDWARE_NeedBaseAddress gcmHAL2D(gckHARDWARE_NeedBaseAddress)
+
+#endif
+
+#endif /* __gc_hal_rename_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_statistics.h b/src/include_imx6_v4_0_0/gc_hal_statistics.h
new file mode 100644
index 0000000..82336e8
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_statistics.h
@@ -0,0 +1,115 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_statistics_h_
+#define __gc_hal_statistics_h_
+
+
+#define VIV_STAT_ENABLE_STATISTICS 0
+
+/* Toal number of frames for which the frame time is accounted. We have storage
+ to keep frame times for last this many frames.
+*/
+#define VIV_STAT_FRAME_BUFFER_SIZE 30
+
+/*
+ Total number of frames sampled for a mode. This means
+
+ # of frames for HZ Current : VIV_STAT_EARLY_Z_SAMPLE_FRAMES
+ # of frames for HZ Switched : VIV_STAT_EARLY_Z_SAMPLE_FRAMES
+ +
+ --------------------------------------------------------
+ : (2 * VIV_STAT_EARLY_Z_SAMPLE_FRAMES) frames needed
+
+ IMPORTANT: This total must be smaller than VIV_STAT_FRAME_BUFFER_SIZE
+*/
+#define VIV_STAT_EARLY_Z_SAMPLE_FRAMES 7
+#define VIV_STAT_EARLY_Z_LATENCY_FRAMES 2
+
+/* Multiplication factor for previous Hz off mode. Make it more than 1.0 to advertise HZ on.*/
+#define VIV_STAT_EARLY_Z_FACTOR (1.05f)
+
+/* Defines the statistical data keys monitored by the statistics module */
+typedef enum _gceSTATISTICS
+{
+ gcvFRAME_FPS = 1,
+}
+gceSTATISTICS;
+
+/* HAL statistics information. */
+typedef struct _gcsSTATISTICS_EARLYZ
+{
+ gctUINT switchBackCount;
+ gctUINT nextCheckPoint;
+ gctBOOL disabled;
+}
+gcsSTATISTICS_EARLYZ;
+
+
+/* Defines the statistical data keys monitored by the statistics module */
+typedef enum _gceSTATISTICS_Call
+{
+ gcvSTAT_ES11_GLDRAWELEMENTS = 1,
+}
+gceSTATISTICS_Call;
+
+
+/* HAL statistics information. */
+typedef struct _gcsSTATISTICS
+{
+ gctUINT64 frameTime[VIV_STAT_FRAME_BUFFER_SIZE];
+ gctUINT64 previousFrameTime;
+ gctUINT frame;
+ gcsSTATISTICS_EARLYZ earlyZ;
+ gctUINT ES11_drawElementsCount;
+ gctBOOL applyRTestVAFix;
+}
+gcsSTATISTICS;
+
+
+/* Add a frame based data into current statistics. */
+void
+gcfSTATISTICS_AddData(
+ IN gceSTATISTICS Key,
+ IN gctUINT Value
+ );
+
+/* Marks the frame end and triggers statistical calculations and decisions.*/
+void
+gcfSTATISTICS_MarkFrameEnd (
+ void
+ );
+
+/* Sets whether the dynmaic HZ is disabled or not .*/
+void
+gcfSTATISTICS_DisableDynamicEarlyZ (
+ IN gctBOOL Disabled
+ );
+
+/* Checks whether or not glDrawArray function call will be discarded */
+gctBOOL
+gcfSTATISTICS_DiscardCall(
+ gceSTATISTICS_Call Function
+ );
+
+
+#endif /*__gc_hal_statistics_h_ */
+
diff --git a/src/include_imx6_v4_0_0/gc_hal_types.h b/src/include_imx6_v4_0_0/gc_hal_types.h
new file mode 100644
index 0000000..5c0877d
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_types.h
@@ -0,0 +1,1002 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_types_h_
+#define __gc_hal_types_h_
+
+#include "gc_hal_version.h"
+#include "gc_hal_options.h"
+
+#ifdef _WIN32
+#pragma warning(disable:4127) /* Conditional expression is constant (do { }
+ ** while(0)). */
+#pragma warning(disable:4100) /* Unreferenced formal parameter. */
+#pragma warning(disable:4204) /* Non-constant aggregate initializer (C99). */
+#pragma warning(disable:4131) /* Uses old-style declarator (for Bison and
+ ** Flex generated files). */
+#pragma warning(disable:4206) /* Translation unit is empty. */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+** Platform macros.
+*/
+
+#if defined(__GNUC__)
+# define gcdHAS_ELLIPSES 1 /* GCC always has it. */
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+# define gcdHAS_ELLIPSES 1 /* C99 has it. */
+#elif defined(_MSC_VER) && (_MSC_VER >= 1500)
+# define gcdHAS_ELLIPSES 1 /* MSVC 2007+ has it. */
+#elif defined(UNDER_CE)
+#if UNDER_CE >= 600
+# define gcdHAS_ELLIPSES 1
+# else
+# define gcdHAS_ELLIPSES 0
+# endif
+#else
+# error "gcdHAS_ELLIPSES: Platform could not be determined"
+#endif
+
+/******************************************************************************\
+************************************ Keyword ***********************************
+\******************************************************************************/
+
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
+# define gcmINLINE inline /* C99 keyword. */
+#elif defined(__GNUC__)
+# define gcmINLINE __inline__ /* GNU keyword. */
+#elif defined(_MSC_VER) || defined(UNDER_CE)
+# define gcmINLINE __inline /* Internal keyword. */
+#else
+# error "gcmINLINE: Platform could not be determined"
+#endif
+
+/* Possible debug flags. */
+#define gcdDEBUG_NONE 0
+#define gcdDEBUG_ALL (1 << 0)
+#define gcdDEBUG_FATAL (1 << 1)
+#define gcdDEBUG_TRACE (1 << 2)
+#define gcdDEBUG_BREAK (1 << 3)
+#define gcdDEBUG_ASSERT (1 << 4)
+#define gcdDEBUG_CODE (1 << 5)
+#define gcdDEBUG_STACK (1 << 6)
+
+#define gcmIS_DEBUG(flag) ( gcdDEBUG & (flag | gcdDEBUG_ALL) )
+
+#ifndef gcdDEBUG
+#if (defined(DBG) && DBG) || defined(DEBUG) || defined(_DEBUG)
+# define gcdDEBUG gcdDEBUG_ALL
+# else
+# define gcdDEBUG gcdDEBUG_NONE
+# endif
+#endif
+
+#ifdef _USRDLL
+#ifdef _MSC_VER
+#ifdef HAL_EXPORTS
+# define HALAPI __declspec(dllexport)
+# else
+# define HALAPI __declspec(dllimport)
+# endif
+# define HALDECL __cdecl
+# else
+#ifdef HAL_EXPORTS
+# define HALAPI
+# else
+# define HALAPI extern
+# endif
+# endif
+#else
+# define HALAPI
+# define HALDECL
+#endif
+
+/******************************************************************************\
+********************************** Common Types ********************************
+\******************************************************************************/
+
+#define gcvFALSE 0
+#define gcvTRUE 1
+
+#define gcvINFINITE ((gctUINT32) ~0U)
+
+#define gcvINVALID_HANDLE ((gctHANDLE) ~0U)
+
+typedef int gctBOOL;
+typedef gctBOOL * gctBOOL_PTR;
+
+typedef int gctINT;
+typedef signed char gctINT8;
+typedef signed short gctINT16;
+typedef signed int gctINT32;
+typedef signed long long gctINT64;
+
+typedef gctINT * gctINT_PTR;
+typedef gctINT8 * gctINT8_PTR;
+typedef gctINT16 * gctINT16_PTR;
+typedef gctINT32 * gctINT32_PTR;
+typedef gctINT64 * gctINT64_PTR;
+
+typedef unsigned int gctUINT;
+typedef unsigned char gctUINT8;
+typedef unsigned short gctUINT16;
+typedef unsigned int gctUINT32;
+typedef unsigned long long gctUINT64;
+typedef unsigned long gctUINTPTR_T;
+
+typedef gctUINT * gctUINT_PTR;
+typedef gctUINT8 * gctUINT8_PTR;
+typedef gctUINT16 * gctUINT16_PTR;
+typedef gctUINT32 * gctUINT32_PTR;
+typedef gctUINT64 * gctUINT64_PTR;
+
+typedef unsigned long gctSIZE_T;
+typedef gctSIZE_T * gctSIZE_T_PTR;
+
+#ifdef __cplusplus
+# define gcvNULL 0
+#else
+# define gcvNULL ((void *) 0)
+#endif
+
+typedef float gctFLOAT;
+typedef signed int gctFIXED_POINT;
+typedef float * gctFLOAT_PTR;
+
+typedef void * gctPHYS_ADDR;
+typedef void * gctHANDLE;
+typedef void * gctFILE;
+typedef void * gctSIGNAL;
+typedef void * gctWINDOW;
+typedef void * gctIMAGE;
+
+typedef void * gctSEMAPHORE;
+
+typedef void * gctPOINTER;
+typedef const void * gctCONST_POINTER;
+
+typedef char gctCHAR;
+typedef char * gctSTRING;
+typedef const char * gctCONST_STRING;
+
+typedef struct _gcsCOUNT_STRING
+{
+ gctSIZE_T Length;
+ gctCONST_STRING String;
+}
+gcsCOUNT_STRING;
+
+typedef union _gcuFLOAT_UINT32
+{
+ gctFLOAT f;
+ gctUINT32 u;
+}
+gcuFLOAT_UINT32;
+
+/* Fixed point constants. */
+#define gcvZERO_X ((gctFIXED_POINT) 0x00000000)
+#define gcvHALF_X ((gctFIXED_POINT) 0x00008000)
+#define gcvONE_X ((gctFIXED_POINT) 0x00010000)
+#define gcvNEGONE_X ((gctFIXED_POINT) 0xFFFF0000)
+#define gcvTWO_X ((gctFIXED_POINT) 0x00020000)
+
+/* Stringizing macro. */
+#define gcmSTRING(Value) #Value
+
+/******************************************************************************\
+******************************* Fixed Point Math *******************************
+\******************************************************************************/
+
+#define gcmXMultiply(x1, x2) gcoMATH_MultiplyFixed(x1, x2)
+#define gcmXDivide(x1, x2) gcoMATH_DivideFixed(x1, x2)
+#define gcmXMultiplyDivide(x1, x2, x3) gcoMATH_MultiplyDivideFixed(x1, x2, x3)
+
+/* 2D Engine profile. */
+typedef struct _gcs2D_PROFILE
+{
+ /* Cycle count.
+ 32bit counter incremented every 2D clock cycle.
+ Wraps back to 0 when the counter overflows.
+ */
+ gctUINT32 cycleCount;
+
+ /* Pixels rendered by the 2D engine.
+ Resets to 0 every time it is read. */
+ gctUINT32 pixelsRendered;
+}
+gcs2D_PROFILE;
+
+/* Macro to combine four characters into a Charcater Code. */
+#define gcmCC(c1, c2, c3, c4) \
+( \
+ (char) (c1) \
+ | \
+ ((char) (c2) << 8) \
+ | \
+ ((char) (c3) << 16) \
+ | \
+ ((char) (c4) << 24) \
+)
+
+#define gcmPRINTABLE(c) ((((c) >= ' ') && ((c) <= '}')) ? ((c) != '%' ? (c) : ' ') : ' ')
+
+#define gcmCC_PRINT(cc) \
+ gcmPRINTABLE((char) ( (cc) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 8) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 16) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 24) & 0xFF))
+
+/******************************************************************************\
+****************************** Function Parameters *****************************
+\******************************************************************************/
+
+#define IN
+#define OUT
+#define OPTIONAL
+
+/******************************************************************************\
+********************************* Status Codes *********************************
+\******************************************************************************/
+
+typedef enum _gceSTATUS
+{
+ gcvSTATUS_OK = 0,
+ gcvSTATUS_FALSE = 0,
+ gcvSTATUS_TRUE = 1,
+ gcvSTATUS_NO_MORE_DATA = 2,
+ gcvSTATUS_CACHED = 3,
+ gcvSTATUS_MIPMAP_TOO_LARGE = 4,
+ gcvSTATUS_NAME_NOT_FOUND = 5,
+ gcvSTATUS_NOT_OUR_INTERRUPT = 6,
+ gcvSTATUS_MISMATCH = 7,
+ gcvSTATUS_MIPMAP_TOO_SMALL = 8,
+ gcvSTATUS_LARGER = 9,
+ gcvSTATUS_SMALLER = 10,
+ gcvSTATUS_CHIP_NOT_READY = 11,
+ gcvSTATUS_NEED_CONVERSION = 12,
+ gcvSTATUS_SKIP = 13,
+ gcvSTATUS_DATA_TOO_LARGE = 14,
+ gcvSTATUS_INVALID_CONFIG = 15,
+ gcvSTATUS_CHANGED = 16,
+ gcvSTATUS_NOT_SUPPORT_DITHER = 17,
+ gcvSTATUS_EXECUTED = 18,
+ gcvSTATUS_TERMINATE = 19,
+
+ gcvSTATUS_CONVERT_TO_SINGLE_STREAM = 20,
+
+ gcvSTATUS_INVALID_ARGUMENT = -1,
+ gcvSTATUS_INVALID_OBJECT = -2,
+ gcvSTATUS_OUT_OF_MEMORY = -3,
+ gcvSTATUS_MEMORY_LOCKED = -4,
+ gcvSTATUS_MEMORY_UNLOCKED = -5,
+ gcvSTATUS_HEAP_CORRUPTED = -6,
+ gcvSTATUS_GENERIC_IO = -7,
+ gcvSTATUS_INVALID_ADDRESS = -8,
+ gcvSTATUS_CONTEXT_LOSSED = -9,
+ gcvSTATUS_TOO_COMPLEX = -10,
+ gcvSTATUS_BUFFER_TOO_SMALL = -11,
+ gcvSTATUS_INTERFACE_ERROR = -12,
+ gcvSTATUS_NOT_SUPPORTED = -13,
+ gcvSTATUS_MORE_DATA = -14,
+ gcvSTATUS_TIMEOUT = -15,
+ gcvSTATUS_OUT_OF_RESOURCES = -16,
+ gcvSTATUS_INVALID_DATA = -17,
+ gcvSTATUS_INVALID_MIPMAP = -18,
+ gcvSTATUS_NOT_FOUND = -19,
+ gcvSTATUS_NOT_ALIGNED = -20,
+ gcvSTATUS_INVALID_REQUEST = -21,
+ gcvSTATUS_GPU_NOT_RESPONDING = -22,
+ gcvSTATUS_TIMER_OVERFLOW = -23,
+ gcvSTATUS_VERSION_MISMATCH = -24,
+ gcvSTATUS_LOCKED = -25,
+ gcvSTATUS_INTERRUPTED = -26,
+ gcvSTATUS_DEVICE = -27,
+ gcvSTATUS_NOT_MULTI_PIPE_ALIGNED = -28,
+
+ /* Linker errors. */
+ gcvSTATUS_GLOBAL_TYPE_MISMATCH = -1000,
+ gcvSTATUS_TOO_MANY_ATTRIBUTES = -1001,
+ gcvSTATUS_TOO_MANY_UNIFORMS = -1002,
+ gcvSTATUS_TOO_MANY_VARYINGS = -1003,
+ gcvSTATUS_UNDECLARED_VARYING = -1004,
+ gcvSTATUS_VARYING_TYPE_MISMATCH = -1005,
+ gcvSTATUS_MISSING_MAIN = -1006,
+ gcvSTATUS_NAME_MISMATCH = -1007,
+ gcvSTATUS_INVALID_INDEX = -1008,
+ gcvSTATUS_UNIFORM_TYPE_MISMATCH = -1009,
+
+ /* Compiler errors. */
+ gcvSTATUS_COMPILER_FE_PREPROCESSOR_ERROR = -2000,
+ gcvSTATUS_COMPILER_FE_PARSER_ERROR = -2001,
+}
+gceSTATUS;
+
+/******************************************************************************\
+********************************* Status Macros ********************************
+\******************************************************************************/
+
+#define gcmIS_ERROR(status) (status < 0)
+#define gcmNO_ERROR(status) (status >= 0)
+#define gcmIS_SUCCESS(status) (status == gcvSTATUS_OK)
+
+/******************************************************************************\
+********************************* Field Macros *********************************
+\******************************************************************************/
+
+#define __gcmSTART(reg_field) \
+ (0 ? reg_field)
+
+#define __gcmEND(reg_field) \
+ (1 ? reg_field)
+
+#define __gcmGETSIZE(reg_field) \
+ (__gcmEND(reg_field) - __gcmSTART(reg_field) + 1)
+
+#define __gcmALIGN(data, reg_field) \
+ (((gctUINT32) (data)) << __gcmSTART(reg_field))
+
+#define __gcmMASK(reg_field) \
+ ((gctUINT32) ((__gcmGETSIZE(reg_field) == 32) \
+ ? ~0 \
+ : (~(~0 << __gcmGETSIZE(reg_field)))))
+
+/*******************************************************************************
+**
+** gcmFIELDMASK
+**
+** Get aligned field mask.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmFIELDMASK(reg, field) \
+( \
+ __gcmALIGN(__gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmGETFIELD
+**
+** Extract the value of a field from specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmGETFIELD(data, reg, field) \
+( \
+ ((((gctUINT32) (data)) >> __gcmSTART(reg##_##field)) \
+ & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELD
+**
+** Set the value of a field within specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETFIELD(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN((gctUINT32) (value) \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELDVALUE
+**
+** Set the value of a field within specified data with a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmSETFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN(reg##_##field##_##value \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmGETMASKEDFIELDMASK
+**
+** Determine field mask of a masked field.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmGETMASKEDFIELDMASK(reg, field) \
+( \
+ gcmSETFIELD(0, reg, field, ~0) | \
+ gcmSETFIELD(0, reg, MASK_ ## field, ~0) \
+)
+
+/*******************************************************************************
+**
+** gcmSETMASKEDFIELD
+**
+** Set the value of a masked field with specified data.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETMASKEDFIELD(reg, field, value) \
+( \
+ gcmSETFIELD (~0, reg, field, value) & \
+ gcmSETFIELDVALUE(~0, reg, MASK_ ## field, ENABLED) \
+)
+
+/*******************************************************************************
+**
+** gcmSETMASKEDFIELDVALUE
+**
+** Set the value of a masked field with specified data.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETMASKEDFIELDVALUE(reg, field, value) \
+( \
+ gcmSETFIELDVALUE(~0, reg, field, value) & \
+ gcmSETFIELDVALUE(~0, reg, MASK_ ## field, ENABLED) \
+)
+
+/*******************************************************************************
+**
+** gcmVERIFYFIELDVALUE
+**
+** Verify if the value of a field within specified data equals a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmVERIFYFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) >> __gcmSTART(reg##_##field) & \
+ __gcmMASK(reg##_##field)) \
+ == \
+ (reg##_##field##_##value & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+** Bit field macros.
+*/
+
+#define __gcmSTARTBIT(Field) \
+ ( 1 ? Field )
+
+#define __gcmBITSIZE(Field) \
+ ( 0 ? Field )
+
+#define __gcmBITMASK(Field) \
+( \
+ (1 << __gcmBITSIZE(Field)) - 1 \
+)
+
+#define gcmGETBITS(Value, Type, Field) \
+( \
+ ( ((Type) (Value)) >> __gcmSTARTBIT(Field) ) \
+ & \
+ __gcmBITMASK(Field) \
+)
+
+#define gcmSETBITS(Value, Type, Field, NewValue) \
+( \
+ ( ((Type) (Value)) \
+ & ~(__gcmBITMASK(Field) << __gcmSTARTBIT(Field)) \
+ ) \
+ | \
+ ( ( ((Type) (NewValue)) \
+ & __gcmBITMASK(Field) \
+ ) << __gcmSTARTBIT(Field) \
+ ) \
+)
+
+/*******************************************************************************
+**
+** gcmISINREGRANGE
+**
+** Verify whether the specified address is in the register range.
+**
+** ARGUMENTS:
+**
+** Address Address to be verified.
+** Name Name of a register.
+*/
+
+#define gcmISINREGRANGE(Address, Name) \
+( \
+ ((Address & (~0U << Name ## _LSB)) == (Name ## _Address >> 2)) \
+)
+
+/*******************************************************************************
+**
+** A set of macros to aid state loading.
+**
+** ARGUMENTS:
+**
+** CommandBuffer Pointer to a gcoCMDBUF object.
+** StateDelta Pointer to a gcsSTATE_DELTA state delta structure.
+** Memory Destination memory pointer of gctUINT32_PTR type.
+** PartOfContext Whether or not the state is a part of the context.
+** FixedPoint Whether or not the state is of the fixed point format.
+** Count Number of consecutive states to be loaded.
+** Address State address.
+** Data Data to be set to the state.
+*/
+
+/*----------------------------------------------------------------------------*/
+
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+
+# define gcmSTORELOADSTATE(CommandBuffer, Memory, Address, Count) \
+ CommandBuffer->lastLoadStatePtr = gcmPTR_TO_UINT64(Memory); \
+ CommandBuffer->lastLoadStateAddress = Address; \
+ CommandBuffer->lastLoadStateCount = Count
+
+# define gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address) \
+ gcmASSERT( \
+ (gctUINT) (Memory - gcmUINT64_TO_TYPE(CommandBuffer->lastLoadStatePtr, gctUINT32_PTR) - 1) \
+ == \
+ (gctUINT) (Address - CommandBuffer->lastLoadStateAddress) \
+ ); \
+ \
+ gcmASSERT(CommandBuffer->lastLoadStateCount > 0); \
+ \
+ CommandBuffer->lastLoadStateCount -= 1
+
+# define gcmVERIFYLOADSTATEDONE(CommandBuffer) \
+ gcmASSERT(CommandBuffer->lastLoadStateCount == 0)
+
+#else
+
+# define gcmSTORELOADSTATE(CommandBuffer, Memory, Address, Count)
+# define gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address)
+# define gcmVERIFYLOADSTATEDONE(CommandBuffer)
+
+#endif
+
+#if gcdSECURE_USER
+
+# define gcmDEFINESECUREUSER() \
+ gctUINT __secure_user_offset__; \
+ gctUINT32_PTR __secure_user_hintArray__;
+
+# define gcmBEGINSECUREUSER() \
+ __secure_user_offset__ = reserve->lastOffset; \
+ \
+ __secure_user_hintArray__ = gcmUINT64_TO_PTR(reserve->hintArrayTail)
+
+# define gcmENDSECUREUSER() \
+ reserve->hintArrayTail = gcmPTR_TO_UINT64(__secure_user_hintArray__)
+
+# define gcmSKIPSECUREUSER() \
+ __secure_user_offset__ += gcmSIZEOF(gctUINT32)
+
+# define gcmUPDATESECUREUSER() \
+ *__secure_user_hintArray__ = __secure_user_offset__; \
+ \
+ __secure_user_offset__ += gcmSIZEOF(gctUINT32); \
+ __secure_user_hintArray__ += 1
+
+#else
+
+# define gcmDEFINESECUREUSER()
+# define gcmBEGINSECUREUSER()
+# define gcmENDSECUREUSER()
+# define gcmSKIPSECUREUSER()
+# define gcmUPDATESECUREUSER()
+
+#endif
+
+/*----------------------------------------------------------------------------*/
+
+#if gcdDUMP
+# define gcmDUMPSTATEDATA(StateDelta, FixedPoint, Address, Data) \
+ if (FixedPoint) \
+ { \
+ gcmDUMP(gcvNULL, "@[state.x 0x%04X 0x%08X]", \
+ Address, Data \
+ ); \
+ } \
+ else \
+ { \
+ gcmDUMP(gcvNULL, "@[state 0x%04X 0x%08X]", \
+ Address, Data \
+ ); \
+ }
+#else
+# define gcmDUMPSTATEDATA(StateDelta, FixedPoint, Address, Data)
+#endif
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmDEFINESTATEBUFFER(CommandBuffer, StateDelta, Memory, ReserveSize) \
+ gcmDEFINESECUREUSER() \
+ gctSIZE_T ReserveSize; \
+ gcoCMDBUF CommandBuffer; \
+ gctUINT32_PTR Memory; \
+ gcsSTATE_DELTA_PTR StateDelta
+
+#define gcmBEGINSTATEBUFFER(Hardware, CommandBuffer, StateDelta, Memory, ReserveSize) \
+{ \
+ gcmONERROR(gcoBUFFER_Reserve( \
+ Hardware->buffer, ReserveSize, gcvTRUE, &CommandBuffer \
+ )); \
+ \
+ Memory = gcmUINT64_TO_PTR(CommandBuffer->lastReserve); \
+ \
+ StateDelta = Hardware->delta; \
+ \
+ gcmBEGINSECUREUSER(); \
+}
+
+#define gcmENDSTATEBUFFER(CommandBuffer, Memory, ReserveSize) \
+{ \
+ gcmENDSECUREUSER(); \
+ \
+ gcmASSERT( \
+ gcmUINT64_TO_TYPE(CommandBuffer->lastReserve, gctUINT8_PTR) + ReserveSize \
+ == \
+ (gctUINT8_PTR) Memory \
+ ); \
+}
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmBEGINSTATEBATCH(CommandBuffer, Memory, FixedPoint, Address, Count) \
+{ \
+ gcmASSERT(((Memory - gcmUINT64_TO_TYPE(CommandBuffer->lastReserve, gctUINT32_PTR)) & 1) == 0); \
+ gcmASSERT((gctUINT32)Count <= 1024); \
+ \
+ gcmVERIFYLOADSTATEDONE(CommandBuffer); \
+ \
+ gcmSTORELOADSTATE(CommandBuffer, Memory, Address, Count); \
+ \
+ *Memory++ \
+ = gcmSETFIELDVALUE(0, AQ_COMMAND_LOAD_STATE_COMMAND, OPCODE, LOAD_STATE) \
+ | gcmSETFIELD (0, AQ_COMMAND_LOAD_STATE_COMMAND, FLOAT, FixedPoint) \
+ | gcmSETFIELD (0, AQ_COMMAND_LOAD_STATE_COMMAND, COUNT, Count) \
+ | gcmSETFIELD (0, AQ_COMMAND_LOAD_STATE_COMMAND, ADDRESS, Address); \
+ \
+ gcmSKIPSECUREUSER(); \
+}
+
+#define gcmENDSTATEBATCH(CommandBuffer, Memory) \
+{ \
+ gcmVERIFYLOADSTATEDONE(CommandBuffer); \
+ \
+ gcmASSERT(((Memory - gcmUINT64_TO_TYPE(CommandBuffer->lastReserve, gctUINT32_PTR)) & 1) == 0); \
+}
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmSETSTATEDATA(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data) \
+{ \
+ gctUINT32 __temp_data32__; \
+ \
+ gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address); \
+ \
+ __temp_data32__ = Data; \
+ \
+ *Memory++ = __temp_data32__; \
+ \
+ gcoHARDWARE_UpdateDelta( \
+ StateDelta, FixedPoint, Address, 0, __temp_data32__ \
+ ); \
+ \
+ gcmDUMPSTATEDATA(StateDelta, FixedPoint, Address, __temp_data32__); \
+ \
+ gcmUPDATESECUREUSER(); \
+}
+
+#define gcmSETCTRLSTATE(StateDelta, CommandBuffer, Memory, Address, Data) \
+{ \
+ gctUINT32 __temp_data32__; \
+ \
+ gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address); \
+ \
+ __temp_data32__ = Data; \
+ \
+ *Memory++ = __temp_data32__; \
+ \
+ gcmDUMPSTATEDATA(StateDelta, gcvFALSE, Address, __temp_data32__); \
+ \
+ gcmSKIPSECUREUSER(); \
+}
+
+#define gcmSETFILLER(CommandBuffer, Memory) \
+{ \
+ gcmVERIFYLOADSTATEDONE(CommandBuffer); \
+ \
+ Memory += 1; \
+ \
+ gcmSKIPSECUREUSER(); \
+}
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmSETSINGLESTATE(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data) \
+{ \
+ gcmBEGINSTATEBATCH(CommandBuffer, Memory, FixedPoint, Address, 1); \
+ gcmSETSTATEDATA(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data); \
+ gcmENDSTATEBATCH(CommandBuffer, Memory); \
+}
+
+#define gcmSETSINGLECTRLSTATE(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data) \
+{ \
+ gcmBEGINSTATEBATCH(CommandBuffer, Memory, FixedPoint, Address, 1); \
+ gcmSETCTRLSTATE(StateDelta, CommandBuffer, Memory, Address, Data); \
+ gcmENDSTATEBATCH(CommandBuffer, Memory); \
+}
+
+
+/*******************************************************************************
+**
+** gcmSETSTARTDECOMMAND
+**
+** Form a START_DE command.
+**
+** ARGUMENTS:
+**
+** Memory Destination memory pointer of gctUINT32_PTR type.
+** Count Number of the rectangles.
+*/
+
+#define gcmSETSTARTDECOMMAND(Memory, Count) \
+{ \
+ *Memory++ \
+ = gcmSETFIELDVALUE(0, AQ_COMMAND_START_DE_COMMAND, OPCODE, START_DE) \
+ | gcmSETFIELD (0, AQ_COMMAND_START_DE_COMMAND, COUNT, Count) \
+ | gcmSETFIELD (0, AQ_COMMAND_START_DE_COMMAND, DATA_COUNT, 0); \
+ \
+ *Memory++ = 0xDEADDEED; \
+}
+
+/******************************************************************************\
+******************************** Ceiling Macro ********************************
+\******************************************************************************/
+#define gcmCEIL(x) ((x - (gctUINT32)x) == 0 ? (gctUINT32)x : (gctUINT32)x + 1)
+
+/******************************************************************************\
+******************************** Min/Max Macros ********************************
+\******************************************************************************/
+
+#define gcmMIN(x, y) (((x) <= (y)) ? (x) : (y))
+#define gcmMAX(x, y) (((x) >= (y)) ? (x) : (y))
+#define gcmCLAMP(x, min, max) (((x) < (min)) ? (min) : \
+ ((x) > (max)) ? (max) : (x))
+#define gcmABS(x) (((x) < 0) ? -(x) : (x))
+#define gcmNEG(x) (((x) < 0) ? (x) : -(x))
+
+/*******************************************************************************
+**
+** gcmPTR2INT
+**
+** Convert a pointer to an integer value.
+**
+** ARGUMENTS:
+**
+** p Pointer value.
+*/
+#if defined(_WIN32) || (defined(__LP64__) && __LP64__)
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (gctUINT64) (p) \
+ )
+#else
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (p) \
+ )
+#endif
+
+/*******************************************************************************
+**
+** gcmINT2PTR
+**
+** Convert an integer value into a pointer.
+**
+** ARGUMENTS:
+**
+** v Integer value.
+*/
+#ifdef __LP64__
+# define gcmINT2PTR(i) \
+ ( \
+ (gctPOINTER) (gctINT64) (i) \
+ )
+#else
+# define gcmINT2PTR(i) \
+ ( \
+ (gctPOINTER) (i) \
+ )
+#endif
+
+/*******************************************************************************
+**
+** gcmOFFSETOF
+**
+** Compute the byte offset of a field inside a structure.
+**
+** ARGUMENTS:
+**
+** s Structure name.
+** field Field name.
+*/
+#define gcmOFFSETOF(s, field) \
+( \
+ gcmPTR2INT(& (((struct s *) 0)->field)) \
+)
+
+#define gcmSWAB32(x) ((gctUINT32)( \
+ (((gctUINT32)(x) & (gctUINT32)0x000000FFUL) << 24) | \
+ (((gctUINT32)(x) & (gctUINT32)0x0000FF00UL) << 8) | \
+ (((gctUINT32)(x) & (gctUINT32)0x00FF0000UL) >> 8) | \
+ (((gctUINT32)(x) & (gctUINT32)0xFF000000UL) >> 24)))
+
+/*******************************************************************************
+***** Database ****************************************************************/
+
+typedef struct _gcsDATABASE_COUNTERS
+{
+ /* Number of currently allocated bytes. */
+ gctUINT64 bytes;
+
+ /* Maximum number of bytes allocated (memory footprint). */
+ gctUINT64 maxBytes;
+
+ /* Total number of bytes allocated. */
+ gctUINT64 totalBytes;
+}
+gcsDATABASE_COUNTERS;
+
+typedef struct _gcuDATABASE_INFO
+{
+ /* Counters. */
+ gcsDATABASE_COUNTERS counters;
+
+ /* Time value. */
+ gctUINT64 time;
+}
+gcuDATABASE_INFO;
+
+/*******************************************************************************
+***** Frame database **********************************************************/
+
+/* gcsHAL_FRAME_INFO */
+typedef struct _gcsHAL_FRAME_INFO
+{
+ /* Current timer tick. */
+ OUT gctUINT64 ticks;
+
+ /* Bandwidth counters. */
+ OUT gctUINT readBytes8[8];
+ OUT gctUINT writeBytes8[8];
+
+ /* Counters. */
+ OUT gctUINT cycles[8];
+ OUT gctUINT idleCycles[8];
+ OUT gctUINT mcCycles[8];
+ OUT gctUINT readRequests[8];
+ OUT gctUINT writeRequests[8];
+
+ /* 3D counters. */
+ OUT gctUINT vertexCount;
+ OUT gctUINT primitiveCount;
+ OUT gctUINT rejectedPrimitives;
+ OUT gctUINT culledPrimitives;
+ OUT gctUINT clippedPrimitives;
+ OUT gctUINT outPrimitives;
+ OUT gctUINT inPrimitives;
+ OUT gctUINT culledQuadCount;
+ OUT gctUINT totalQuadCount;
+ OUT gctUINT quadCount;
+ OUT gctUINT totalPixelCount;
+
+ /* PE counters. */
+ OUT gctUINT colorKilled[8];
+ OUT gctUINT colorDrawn[8];
+ OUT gctUINT depthKilled[8];
+ OUT gctUINT depthDrawn[8];
+
+ /* Shader counters. */
+ OUT gctUINT shaderCycles;
+ OUT gctUINT vsInstructionCount;
+ OUT gctUINT vsTextureCount;
+ OUT gctUINT psInstructionCount;
+ OUT gctUINT psTextureCount;
+
+ /* Texture counters. */
+ OUT gctUINT bilinearRequests;
+ OUT gctUINT trilinearRequests;
+ OUT gctUINT txBytes8;
+ OUT gctUINT txHitCount;
+ OUT gctUINT txMissCount;
+}
+gcsHAL_FRAME_INFO;
+
+#if gcdLINK_QUEUE_SIZE
+typedef struct _gckLINKDATA * gckLINKDATA;
+struct _gckLINKDATA
+{
+ gctUINT32 start;
+ gctUINT32 end;
+ gctINT pid;
+};
+
+typedef struct _gckLINKQUEUE * gckLINKQUEUE;
+struct _gckLINKQUEUE
+{
+ struct _gckLINKDATA data[gcdLINK_QUEUE_SIZE];
+ gctUINT32 rear;
+ gctUINT32 front;
+ gctUINT32 count;
+};
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_types_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_version.h b/src/include_imx6_v4_0_0/gc_hal_version.h
new file mode 100644
index 0000000..2881604
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_version.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_version_h_
+#define __gc_hal_version_h_
+
+#define gcvVERSION_MAJOR 4
+
+#define gcvVERSION_MINOR 6
+
+#define gcvVERSION_PATCH 9
+
+#define gcvVERSION_BUILD 1210
+
+#define gcvVERSION_DATE __DATE__
+
+#define gcvVERSION_TIME __TIME__
+
+#endif /* __gc_hal_version_h_ */
diff --git a/src/include_imx6_v4_0_0/gc_hal_vg.h b/src/include_imx6_v4_0_0/gc_hal_vg.h
new file mode 100644
index 0000000..5ff0281
--- /dev/null
+++ b/src/include_imx6_v4_0_0/gc_hal_vg.h
@@ -0,0 +1,907 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_vg_h_
+#define __gc_hal_vg_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "gc_hal_rename.h"
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+#include "gc_hal_base.h"
+
+#if gcdENABLE_VG
+
+/* Thread routine type. */
+#if defined(LINUX)
+ typedef gctINT gctTHREADFUNCRESULT;
+ typedef gctPOINTER gctTHREADFUNCPARAMETER;
+# define gctTHREADFUNCTYPE
+#elif defined(WIN32)
+ typedef gctUINT gctTHREADFUNCRESULT;
+ typedef gctPOINTER gctTHREADFUNCPARAMETER;
+# define gctTHREADFUNCTYPE __stdcall
+#elif defined(__QNXNTO__)
+ typedef void * gctTHREADFUNCRESULT;
+ typedef gctPOINTER gctTHREADFUNCPARAMETER;
+# define gctTHREADFUNCTYPE
+#endif
+
+typedef gctTHREADFUNCRESULT (gctTHREADFUNCTYPE * gctTHREADFUNC) (
+ gctTHREADFUNCPARAMETER ThreadParameter
+ );
+
+
+#if defined(gcvDEBUG)
+# undef gcvDEBUG
+#endif
+
+#define gcdFORCE_DEBUG 0
+#define gcdFORCE_MESSAGES 0
+
+
+#if DBG || defined(DEBUG) || defined(_DEBUG) || gcdFORCE_DEBUG
+# define gcvDEBUG 1
+#else
+# define gcvDEBUG 0
+#endif
+
+#define _gcmERROR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+
+#define gcmERROR_RETURN(func) _gcmERROR_RETURN(gcm, func)
+
+#define gcmLOG_LOCATION()
+
+#define gcmkIS_ERROR(status) (status < 0)
+
+#define gcmALIGNDOWN(n, align) \
+( \
+ (n) & ~((align) - 1) \
+)
+
+#define gcmIS_VALID_INDEX(Index, Array) \
+ (((gctUINT) (Index)) < gcmCOUNTOF(Array))
+
+
+#define gcmIS_NAN(x) \
+( \
+ ((* (gctUINT32_PTR) &(x)) & 0x7FFFFFFF) == 0x7FFFFFFF \
+)
+
+#define gcmLERP(v1, v2, w) \
+ ((v1) * (w) + (v2) * (1.0f - (w)))
+
+#define gcmINTERSECT(Start1, Start2, Length) \
+ (gcmABS((Start1) - (Start2)) < (Length))
+
+/*******************************************************************************
+**
+** gcmERR_GOTO
+**
+** Prints a message and terminates the current loop on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** Function
+** Function to evaluate.
+*/
+
+#define gcmERR_GOTO(Function) \
+ status = Function; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ gcmTRACE( \
+ gcvLEVEL_ERROR, \
+ "gcmERR_GOTO: status=%d @ line=%d in function %s.\n", \
+ status, __LINE__, __FUNCTION__ \
+ ); \
+ goto ErrorHandler; \
+ }
+
+#if gcvDEBUG || gcdFORCE_MESSAGES
+# define gcmVERIFY_BOOLEAN(Expression) \
+ gcmASSERT( \
+ ( (Expression) == gcvFALSE ) || \
+ ( (Expression) == gcvTRUE ) \
+ )
+#else
+# define gcmVERIFY_BOOLEAN(Expression)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFYFIELDFIT
+**
+** Verify whether the value fits in the field.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmVERIFYFIELDFIT(reg, field, value) \
+ gcmASSERT( \
+ (value) <= gcmFIELDMAX(reg, field) \
+ )
+/*******************************************************************************
+**
+** gcmFIELDMAX
+**
+** Get field maximum value.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmFIELDMAX(reg, field) \
+( \
+ (gctUINT32) \
+ ( \
+ (__gcmGETSIZE(reg##_##field) == 32) \
+ ? ~0 \
+ : (~(~0 << __gcmGETSIZE(reg##_##field))) \
+ ) \
+)
+
+
+/* ANSI C does not have the 'f' functions, define replacements here. */
+#define gcmSINF(x) ((gctFLOAT) sin(x))
+#define gcmCOSF(x) ((gctFLOAT) cos(x))
+#define gcmASINF(x) ((gctFLOAT) asin(x))
+#define gcmACOSF(x) ((gctFLOAT) acos(x))
+#define gcmSQRTF(x) ((gctFLOAT) sqrt(x))
+#define gcmFABSF(x) ((gctFLOAT) fabs(x))
+#define gcmFMODF(x, y) ((gctFLOAT) fmod((x), (y)))
+#define gcmCEILF(x) ((gctFLOAT) ceil(x))
+#define gcmFLOORF(x) ((gctFLOAT) floor(x))
+
+
+
+/* Fixed point constants. */
+#define gcvZERO_X ((gctFIXED_POINT) 0x00000000)
+#define gcvHALF_X ((gctFIXED_POINT) 0x00008000)
+#define gcvONE_X ((gctFIXED_POINT) 0x00010000)
+#define gcvNEGONE_X ((gctFIXED_POINT) 0xFFFF0000)
+#define gcvTWO_X ((gctFIXED_POINT) 0x00020000)
+
+/* Integer constants. */
+#define gcvMAX_POS_INT ((gctINT) 0x7FFFFFFF)
+#define gcvMAX_NEG_INT ((gctINT) 0x80000000)
+
+/* Float constants. */
+#define gcvMAX_POS_FLOAT ((gctFLOAT) 3.4028235e+038)
+#define gcvMAX_NEG_FLOAT ((gctFLOAT) -3.4028235e+038)
+
+/******************************************************************************\
+***************************** Miscellaneous Macro ******************************
+\******************************************************************************/
+
+#define gcmKB2BYTES(Kilobyte) \
+( \
+ (Kilobyte) << 10 \
+)
+
+#define gcmMB2BYTES(Megabyte) \
+( \
+ (Megabyte) << 20 \
+)
+
+#define gcmMAT(Matrix, Row, Column) \
+( \
+ (Matrix) [(Row) * 3 + (Column)] \
+)
+
+#define gcmMAKE2CHAR(Char1, Char2) \
+( \
+ ((gctUINT16) (gctUINT8) (Char1) << 0) | \
+ ((gctUINT16) (gctUINT8) (Char2) << 8) \
+)
+
+#define gcmMAKE4CHAR(Char1, Char2, Char3, Char4) \
+( \
+ ((gctUINT32)(gctUINT8) (Char1) << 0) | \
+ ((gctUINT32)(gctUINT8) (Char2) << 8) | \
+ ((gctUINT32)(gctUINT8) (Char3) << 16) | \
+ ((gctUINT32)(gctUINT8) (Char4) << 24) \
+)
+
+/* some platforms need to fix the physical address for HW to access*/
+#define gcmFIXADDRESS(address) \
+(\
+ (address)\
+)
+
+#define gcmkFIXADDRESS(address) \
+(\
+ (address)\
+)
+
+/******************************************************************************\
+****************************** Kernel Debug Macro ******************************
+\******************************************************************************/
+
+/* Set signal to signaled state for specified process. */
+gceSTATUS
+gckOS_SetSignal(
+ IN gckOS Os,
+ IN gctHANDLE Process,
+ IN gctSIGNAL Signal
+ );
+
+/* Return the kernel logical pointer for the given physical one. */
+gceSTATUS
+gckOS_GetKernelLogical(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Return the kernel logical pointer for the given physical one. */
+gceSTATUS
+gckOS_GetKernelLogicalEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT32 Address,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----------------------------- Semaphore Object -----------------------------*/
+
+/* Increment the value of a semaphore. */
+gceSTATUS
+gckOS_IncrementSemaphore(
+ IN gckOS Os,
+ IN gctSEMAPHORE Semaphore
+ );
+
+/* Decrement the value of a semaphore (waiting might occur). */
+gceSTATUS
+gckOS_DecrementSemaphore(
+ IN gckOS Os,
+ IN gctSEMAPHORE Semaphore
+ );
+
+
+/*----------------------------------------------------------------------------*/
+/*------------------------------- Thread Object ------------------------------*/
+
+/* Start a thread. */
+gceSTATUS
+gckOS_StartThread(
+ IN gckOS Os,
+ IN gctTHREADFUNC ThreadFunction,
+ IN gctPOINTER ThreadParameter,
+ OUT gctTHREAD * Thread
+ );
+
+/* Stop a thread. */
+gceSTATUS
+gckOS_StopThread(
+ IN gckOS Os,
+ IN gctTHREAD Thread
+ );
+
+/* Verify whether the thread is still running. */
+gceSTATUS
+gckOS_VerifyThread(
+ IN gckOS Os,
+ IN gctTHREAD Thread
+ );
+
+
+/* Construct a new gckVGKERNEL object. */
+gceSTATUS
+gckVGKERNEL_Construct(
+ IN gckOS Os,
+ IN gctPOINTER Context,
+ IN gckKERNEL inKernel,
+ OUT gckVGKERNEL * Kernel
+ );
+
+/* Destroy an gckVGKERNEL object. */
+gceSTATUS
+gckVGKERNEL_Destroy(
+ IN gckVGKERNEL Kernel
+ );
+
+/* Allocate linear video memory. */
+gceSTATUS
+gckKERNEL_AllocateLinearMemory(
+ IN gckKERNEL Kernel,
+ IN OUT gcePOOL * Pool,
+ IN gctSIZE_T Bytes,
+ IN gctSIZE_T Alignment,
+ IN gceSURF_TYPE Type,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Unmap memory. */
+gceSTATUS
+gckKERNEL_UnmapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Dispatch a user-level command. */
+gceSTATUS
+gckVGKERNEL_Dispatch(
+ IN gckKERNEL Kernel,
+ IN gctBOOL FromUser,
+ IN OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Query command buffer requirements. */
+gceSTATUS
+gckKERNEL_QueryCommandBuffer(
+ IN gckKERNEL Kernel,
+ OUT gcsCOMMAND_BUFFER_INFO_PTR Information
+ );
+
+#if gcdDYNAMIC_MAP_RESERVED_MEMORY
+gceSTATUS
+gckOS_MapReservedMemoryToKernel(
+ IN gckOS Os,
+ IN gctUINT32 Physical,
+ IN gctINT Bytes,
+ IN OUT gctPOINTER *Virtual
+ );
+
+gceSTATUS
+gckOS_UnmapReservedMemoryFromKernel(
+ IN gctPOINTER Virtual
+ );
+#endif
+
+/******************************************************************************\
+******************************* gckVGHARDWARE Object ******************************
+\******************************************************************************/
+
+/* Construct a new gckVGHARDWARE object. */
+gceSTATUS
+gckVGHARDWARE_Construct(
+ IN gckOS Os,
+ OUT gckVGHARDWARE * Hardware
+ );
+
+/* Destroy an gckVGHARDWARE object. */
+gceSTATUS
+gckVGHARDWARE_Destroy(
+ IN gckVGHARDWARE Hardware
+ );
+
+/* Query system memory requirements. */
+gceSTATUS
+gckVGHARDWARE_QuerySystemMemory(
+ IN gckVGHARDWARE Hardware,
+ OUT gctSIZE_T * SystemSize,
+ OUT gctUINT32 * SystemBaseAddress
+ );
+
+/* Build virtual address. */
+gceSTATUS
+gckVGHARDWARE_BuildVirtualAddress(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Index,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Kickstart the command processor. */
+gceSTATUS
+gckVGHARDWARE_Execute(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Address,
+ IN gctSIZE_T Count
+ );
+
+/* Query the available memory. */
+gceSTATUS
+gckVGHARDWARE_QueryMemory(
+ IN gckVGHARDWARE Hardware,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctUINT32 * InternalBaseAddress,
+ OUT gctUINT32 * InternalAlignment,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctUINT32 * ExternalBaseAddress,
+ OUT gctUINT32 * ExternalAlignment,
+ OUT gctUINT32 * HorizontalTileSize,
+ OUT gctUINT32 * VerticalTileSize
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gckVGHARDWARE_QueryChipIdentity(
+ IN gckVGHARDWARE Hardware,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures,
+ OUT gctUINT32* ChipMinorFeatures1
+ );
+
+/* Convert an API format. */
+gceSTATUS
+gckVGHARDWARE_ConvertFormat(
+ IN gckVGHARDWARE Hardware,
+ IN gceSURF_FORMAT Format,
+ OUT gctUINT32 * BitsPerPixel,
+ OUT gctUINT32 * BytesPerTile
+ );
+
+/* Split a harwdare specific address into API stuff. */
+gceSTATUS
+gckVGHARDWARE_SplitMemory(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Align size to tile boundary. */
+gceSTATUS
+gckVGHARDWARE_AlignToTile(
+ IN gckVGHARDWARE Hardware,
+ IN gceSURF_TYPE Type,
+ IN OUT gctUINT32_PTR Width,
+ IN OUT gctUINT32_PTR Height
+ );
+
+/* Convert logical address to hardware specific address. */
+gceSTATUS
+gckVGHARDWARE_ConvertLogical(
+ IN gckVGHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+/* Program MMU. */
+gceSTATUS
+gckVGHARDWARE_SetMMU(
+ IN gckVGHARDWARE Hardware,
+ IN gctPOINTER Logical
+ );
+
+/* Flush the MMU. */
+gceSTATUS
+gckVGHARDWARE_FlushMMU(
+ IN gckVGHARDWARE Hardware
+ );
+
+/* Get idle register. */
+gceSTATUS
+gckVGHARDWARE_GetIdle(
+ IN gckVGHARDWARE Hardware,
+ OUT gctUINT32 * Data
+ );
+
+/* Flush the caches. */
+gceSTATUS
+gckVGHARDWARE_Flush(
+ IN gckVGHARDWARE Hardware,
+ IN gceKERNEL_FLUSH Flush,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Enable/disable fast clear. */
+gceSTATUS
+gckVGHARDWARE_SetFastClear(
+ IN gckVGHARDWARE Hardware,
+ IN gctINT Enable
+ );
+
+gceSTATUS
+gckVGHARDWARE_ReadInterrupt(
+ IN gckVGHARDWARE Hardware,
+ OUT gctUINT32_PTR IDs
+ );
+
+/* Power management. */
+gceSTATUS
+gckVGHARDWARE_SetPowerManagementState(
+ IN gckVGHARDWARE Hardware,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gckVGHARDWARE_QueryPowerManagementState(
+ IN gckVGHARDWARE Hardware,
+ OUT gceCHIPPOWERSTATE* State
+ );
+
+gceSTATUS
+gckVGHARDWARE_SetPowerOffTimeout(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Timeout
+ );
+
+gceSTATUS
+gckVGHARDWARE_QueryPowerOffTimeout(
+ IN gckVGHARDWARE Hardware,
+ OUT gctUINT32* Timeout
+ );
+
+gceSTATUS
+gckVGHARDWARE_QueryIdle(
+ IN gckVGHARDWARE Hardware,
+ OUT gctBOOL_PTR IsIdle
+ );
+/******************************************************************************\
+*************************** Command Buffer Structures **************************
+\******************************************************************************/
+
+/* Vacant command buffer marker. */
+#define gcvVACANT_BUFFER ((gcsCOMPLETION_SIGNAL_PTR) (1))
+
+/* Command buffer header. */
+typedef struct _gcsCMDBUFFER * gcsCMDBUFFER_PTR;
+typedef struct _gcsCMDBUFFER
+{
+ /* Pointer to the completion signal. */
+ gcsCOMPLETION_SIGNAL_PTR completion;
+
+ /* The user sets this to the node of the container buffer whitin which
+ this particular command buffer resides. The kernel sets this to the
+ node of the internally allocated buffer. */
+ gctUINT64 node;
+
+ /* Command buffer hardware address. */
+ gctUINT32 address;
+
+ /* The offset of the buffer from the beginning of the header. */
+ gctUINT32 bufferOffset;
+
+ /* Size of the area allocated for the data portion of this particular
+ command buffer (headers and tail reserves are excluded). */
+ gctSIZE_T size;
+
+ /* Offset into the buffer [0..size]; reflects exactly how much data has
+ been put into the command buffer. */
+ gctUINT offset;
+
+ /* The number of command units in the buffer for the hardware to
+ execute. */
+ gctSIZE_T dataCount;
+
+ /* MANAGED BY : user HAL (gcoBUFFER object).
+ USED BY : user HAL (gcoBUFFER object).
+ Points to the immediate next allocated command buffer. */
+ gcsCMDBUFFER_PTR nextAllocated;
+
+ /* MANAGED BY : user layers (HAL and drivers).
+ USED BY : kernel HAL (gcoBUFFER object).
+ Points to the next subbuffer if any. A family of subbuffers are chained
+ together and are meant to be executed inseparably as a unit. Meaning
+ that context switching cannot occur while a chain of subbuffers is being
+ executed. */
+ gcsCMDBUFFER_PTR nextSubBuffer;
+}
+gcsCMDBUFFER;
+
+/* Command queue element. */
+typedef struct _gcsVGCMDQUEUE
+{
+ /* Pointer to the command buffer header. */
+ gcsCMDBUFFER_PTR commandBuffer;
+
+ /* Dynamic vs. static command buffer state. */
+ gctBOOL dynamic;
+}
+gcsVGCMDQUEUE;
+
+/* Context map entry. */
+typedef struct _gcsVGCONTEXT_MAP
+{
+ /* State index. */
+ gctUINT32 index;
+
+ /* New state value. */
+ gctUINT32 data;
+
+ /* Points to the next entry in the mod list. */
+ gcsVGCONTEXT_MAP_PTR next;
+}
+gcsVGCONTEXT_MAP;
+
+/* gcsVGCONTEXT structure that holds the current context. */
+typedef struct _gcsVGCONTEXT
+{
+ /* Context ID. */
+ gctUINT64 id;
+
+ /* State caching ebable flag. */
+ gctBOOL stateCachingEnabled;
+
+ /* Current pipe. */
+ gctUINT32 currentPipe;
+
+ /* State map/mod buffer. */
+ gctSIZE_T mapFirst;
+ gctSIZE_T mapLast;
+#ifdef __QNXNTO__
+ gctSIZE_T mapContainerSize;
+#endif
+ gcsVGCONTEXT_MAP_PTR mapContainer;
+ gcsVGCONTEXT_MAP_PTR mapPrev;
+ gcsVGCONTEXT_MAP_PTR mapCurr;
+ gcsVGCONTEXT_MAP_PTR firstPrevMap;
+ gcsVGCONTEXT_MAP_PTR firstCurrMap;
+
+ /* Main context buffer. */
+ gcsCMDBUFFER_PTR header;
+ gctUINT32_PTR buffer;
+
+ /* Completion signal. */
+ gctHANDLE process;
+ gctSIGNAL signal;
+
+#if defined(__QNXNTO__)
+ gctINT32 coid;
+ gctINT32 rcvid;
+#endif
+}
+gcsVGCONTEXT;
+
+/* User space task header. */
+typedef struct _gcsTASK * gcsTASK_PTR;
+typedef struct _gcsTASK
+{
+ /* Pointer to the next task for the same interrupt in user space. */
+ gcsTASK_PTR next;
+
+ /* Size of the task data that immediately follows the structure. */
+ gctUINT size;
+
+ /* Task data starts here. */
+ /* ... */
+}
+gcsTASK;
+
+/* User space task master table entry. */
+typedef struct _gcsTASK_MASTER_ENTRY * gcsTASK_MASTER_ENTRY_PTR;
+typedef struct _gcsTASK_MASTER_ENTRY
+{
+ /* Pointers to the head and to the tail of the task chain. */
+ gcsTASK_PTR head;
+ gcsTASK_PTR tail;
+}
+gcsTASK_MASTER_ENTRY;
+
+/* User space task master table entry. */
+typedef struct _gcsTASK_MASTER_TABLE
+{
+ /* Table with one entry per block. */
+ gcsTASK_MASTER_ENTRY table[gcvBLOCK_COUNT];
+
+ /* The total number of tasks sckeduled. */
+ gctUINT count;
+
+ /* The total size of event data in bytes. */
+ gctUINT size;
+
+#if defined(__QNXNTO__)
+ gctINT32 coid;
+ gctINT32 rcvid;
+#endif
+}
+gcsTASK_MASTER_TABLE;
+
+/******************************************************************************\
+***************************** gckVGINTERRUPT Object ******************************
+\******************************************************************************/
+
+typedef struct _gckVGINTERRUPT * gckVGINTERRUPT;
+
+typedef gceSTATUS (* gctINTERRUPT_HANDLER)(
+ IN gckVGKERNEL Kernel
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Construct(
+ IN gckVGKERNEL Kernel,
+ OUT gckVGINTERRUPT * Interrupt
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Destroy(
+ IN gckVGINTERRUPT Interrupt
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Enable(
+ IN gckVGINTERRUPT Interrupt,
+ IN OUT gctINT32_PTR Id,
+ IN gctINTERRUPT_HANDLER Handler
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Disable(
+ IN gckVGINTERRUPT Interrupt,
+ IN gctINT32 Id
+ );
+
+#ifndef __QNXNTO__
+
+gceSTATUS
+gckVGINTERRUPT_Enque(
+ IN gckVGINTERRUPT Interrupt
+ );
+
+#else
+
+gceSTATUS
+gckVGINTERRUPT_Enque(
+ IN gckVGINTERRUPT Interrupt,
+ OUT gckOS *Os,
+ OUT gctSEMAPHORE *Semaphore
+ );
+
+#endif
+
+gceSTATUS
+gckVGINTERRUPT_DumpState(
+ IN gckVGINTERRUPT Interrupt
+ );
+
+
+/******************************************************************************\
+******************************* gckVGCOMMAND Object *******************************
+\******************************************************************************/
+
+typedef struct _gckVGCOMMAND * gckVGCOMMAND;
+
+/* Construct a new gckVGCOMMAND object. */
+gceSTATUS
+gckVGCOMMAND_Construct(
+ IN gckVGKERNEL Kernel,
+ IN gctUINT TaskGranularity,
+ IN gctUINT QueueSize,
+ OUT gckVGCOMMAND * Command
+ );
+
+/* Destroy an gckVGCOMMAND object. */
+gceSTATUS
+gckVGCOMMAND_Destroy(
+ IN gckVGCOMMAND Command
+ );
+
+/* Query command buffer attributes. */
+gceSTATUS
+gckVGCOMMAND_QueryCommandBuffer(
+ IN gckVGCOMMAND Command,
+ OUT gcsCOMMAND_BUFFER_INFO_PTR Information
+ );
+
+/* Allocate a command queue. */
+gceSTATUS
+gckVGCOMMAND_Allocate(
+ IN gckVGCOMMAND Command,
+ IN gctSIZE_T Size,
+ OUT gcsCMDBUFFER_PTR * CommandBuffer,
+ OUT gctPOINTER * Data
+ );
+
+/* Release memory held by the command queue. */
+gceSTATUS
+gckVGCOMMAND_Free(
+ IN gckVGCOMMAND Command,
+ IN gcsCMDBUFFER_PTR CommandBuffer
+ );
+
+/* Schedule the command queue for execution. */
+gceSTATUS
+gckVGCOMMAND_Execute(
+ IN gckVGCOMMAND Command,
+ IN gcsCMDBUFFER_PTR CommandBuffer
+ );
+
+/* Commit a buffer to the command queue. */
+gceSTATUS
+gckVGCOMMAND_Commit(
+ IN gckVGCOMMAND Command,
+ IN gcsVGCONTEXT_PTR Context,
+ IN gcsVGCMDQUEUE_PTR Queue,
+ IN gctUINT EntryCount,
+ IN gcsTASK_MASTER_TABLE_PTR TaskTable
+ );
+
+/******************************************************************************\
+********************************* gckVGMMU Object ********************************
+\******************************************************************************/
+
+typedef struct _gckVGMMU * gckVGMMU;
+
+/* Construct a new gckVGMMU object. */
+gceSTATUS
+gckVGMMU_Construct(
+ IN gckVGKERNEL Kernel,
+ IN gctSIZE_T MmuSize,
+ OUT gckVGMMU * Mmu
+ );
+
+/* Destroy an gckVGMMU object. */
+gceSTATUS
+gckVGMMU_Destroy(
+ IN gckVGMMU Mmu
+ );
+
+/* Allocate pages inside the MMU. */
+gceSTATUS
+gckVGMMU_AllocatePages(
+ IN gckVGMMU Mmu,
+ IN gctSIZE_T PageCount,
+ OUT gctPOINTER * PageTable,
+ OUT gctUINT32 * Address
+ );
+
+/* Remove a page table from the MMU. */
+gceSTATUS
+gckVGMMU_FreePages(
+ IN gckVGMMU Mmu,
+ IN gctPOINTER PageTable,
+ IN gctSIZE_T PageCount
+ );
+
+/* Set the MMU page with info. */
+gceSTATUS
+gckVGMMU_SetPage(
+ IN gckVGMMU Mmu,
+ IN gctUINT32 PageAddress,
+ IN gctUINT32 *PageEntry
+ );
+
+/* Flush MMU */
+gceSTATUS
+gckVGMMU_Flush(
+ IN gckVGMMU Mmu
+ );
+
+#endif /* gcdENABLE_VG */
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __gc_hal_h_ */
diff --git a/src/include_imx6_v4_1_0/gc_abi.h b/src/include_imx6_v4_1_0/gc_abi.h
new file mode 100644
index 0000000..88ccb20
--- /dev/null
+++ b/src/include_imx6_v4_1_0/gc_abi.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/** Kernel ABI definition file for Etna **/
+#ifndef H_GCABI
+#define H_GCABI
+//#define GCABI_USER_SIGNAL_HAS_TYPE
+//#define GCABI_CONTEXT_HAS_PHYSICAL
+#define GCABI_HAS_MINOR_FEATURES_2
+#define GCABI_HAS_MINOR_FEATURES_3
+
+// One of these must be set:
+//#define GCABI_HAS_CONTEXT
+#define GCABI_HAS_STATE_DELTAS
+
+// Interface structure has hardware type (core id)
+#define GCABI_HAS_HARDWARE_TYPE
+
+// Chip identity has pixelPipes, instructionCount, numConstants, bufferSize
+#define GCABI_CHIPIDENTITY_EXT
+// Chip identity has varyings and layout style
+#define GCABI_CHIPIDENTITY_VARYINGS
+
+#define GCABI_UINT64_POINTERS
+#define GCABI_UINT64_IOCTL_DATA
+
+/* IOCTL structure for userspace driver*/
+typedef struct
+{
+ unsigned long long in_buf;
+ unsigned long long in_buf_size;
+ unsigned long long out_buf;
+ unsigned long long out_buf_size;
+} vivante_ioctl_data_t;
+
+#include "gc_hal_base.h"
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_kernel_buffer.h"
+#include "gc_hal_types.h"
+#endif
+
diff --git a/src/include_imx6_v4_1_0/gc_hal.h b/src/include_imx6_v4_1_0/gc_hal.h
new file mode 100644
index 0000000..4406d7e
--- /dev/null
+++ b/src/include_imx6_v4_1_0/gc_hal.h
@@ -0,0 +1,2579 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_h_
+#define __gc_hal_h_
+
+#include "gc_hal_rename.h"
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+#include "gc_hal_base.h"
+#include "gc_hal_profiler.h"
+#include "gc_hal_driver.h"
+#ifndef VIVANTE_NO_3D
+#include "gc_hal_statistics.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* Alignment Macros *******************************
+\******************************************************************************/
+
+#define gcmALIGN(n, align) \
+( \
+ ((n) + ((align) - 1)) & ~((align) - 1) \
+)
+
+#define gcmALIGN_BASE(n, align) \
+( \
+ ((n) & ~((align) - 1)) \
+)
+
+/******************************************************************************\
+***************************** Element Count Macro *****************************
+\******************************************************************************/
+
+#define gcmSIZEOF(a) \
+( \
+ (gctSIZE_T) (sizeof(a)) \
+)
+
+#define gcmCOUNTOF(a) \
+( \
+ sizeof(a) / sizeof(a[0]) \
+)
+
+/******************************************************************************\
+********************************* Cast Macro **********************************
+\******************************************************************************/
+#define gcmNAME_TO_PTR(na) \
+ gckKERNEL_QueryPointerFromName(kernel, gcmALL_TO_UINT32(na))
+
+#define gcmPTR_TO_NAME(ptr) \
+ gckKERNEL_AllocateNameFromPointer(kernel, ptr)
+
+#define gcmRELEASE_NAME(na) \
+ gckKERNEL_DeleteName(kernel, gcmALL_TO_UINT32(na))
+
+#ifdef __LP64__
+
+#define gcmALL_TO_UINT32(t) \
+( \
+ (gctUINT32) (gctUINTPTR_T) (t)\
+)
+
+#define gcmPTR_TO_UINT64(p) \
+( \
+ (gctUINT64) (p)\
+)
+
+#define gcmUINT64_TO_PTR(u) \
+( \
+ (gctPOINTER) (u)\
+)
+
+#else /* 32 bit */
+
+#define gcmALL_TO_UINT32(t) \
+( \
+ (gctUINT32) (t)\
+)
+
+#define gcmPTR_TO_UINT64(p) \
+( \
+ (gctUINT64) (gctUINTPTR_T) (p)\
+)
+
+#define gcmUINT64_TO_PTR(u) \
+( \
+ (gctPOINTER) (gctUINTPTR_T) (u)\
+)
+
+#endif
+
+#define gcmUINT64_TO_TYPE(u, t) \
+( \
+ (t) (gctUINTPTR_T) (u)\
+)
+
+/******************************************************************************\
+******************************** Useful Macro *********************************
+\******************************************************************************/
+
+#define gcvINVALID_ADDRESS ~0U
+
+/******************************************************************************\
+******************************** gcsOBJECT Object *******************************
+\******************************************************************************/
+
+/* Type of objects. */
+typedef enum _gceOBJECT_TYPE
+{
+ gcvOBJ_UNKNOWN = 0,
+ gcvOBJ_2D = gcmCC('2','D',' ',' '),
+ gcvOBJ_3D = gcmCC('3','D',' ',' '),
+ gcvOBJ_ATTRIBUTE = gcmCC('A','T','T','R'),
+ gcvOBJ_BRUSHCACHE = gcmCC('B','R','U','$'),
+ gcvOBJ_BRUSHNODE = gcmCC('B','R','U','n'),
+ gcvOBJ_BRUSH = gcmCC('B','R','U','o'),
+ gcvOBJ_BUFFER = gcmCC('B','U','F','R'),
+ gcvOBJ_COMMAND = gcmCC('C','M','D',' '),
+ gcvOBJ_COMMANDBUFFER = gcmCC('C','M','D','B'),
+ gcvOBJ_CONTEXT = gcmCC('C','T','X','T'),
+ gcvOBJ_DEVICE = gcmCC('D','E','V',' '),
+ gcvOBJ_DUMP = gcmCC('D','U','M','P'),
+ gcvOBJ_EVENT = gcmCC('E','V','N','T'),
+ gcvOBJ_FUNCTION = gcmCC('F','U','N','C'),
+ gcvOBJ_HAL = gcmCC('H','A','L',' '),
+ gcvOBJ_HARDWARE = gcmCC('H','A','R','D'),
+ gcvOBJ_HEAP = gcmCC('H','E','A','P'),
+ gcvOBJ_INDEX = gcmCC('I','N','D','X'),
+ gcvOBJ_INTERRUPT = gcmCC('I','N','T','R'),
+ gcvOBJ_KERNEL = gcmCC('K','E','R','N'),
+ gcvOBJ_KERNEL_FUNCTION = gcmCC('K','F','C','N'),
+ gcvOBJ_MEMORYBUFFER = gcmCC('M','E','M','B'),
+ gcvOBJ_MMU = gcmCC('M','M','U',' '),
+ gcvOBJ_OS = gcmCC('O','S',' ',' '),
+ gcvOBJ_OUTPUT = gcmCC('O','U','T','P'),
+ gcvOBJ_PAINT = gcmCC('P','N','T',' '),
+ gcvOBJ_PATH = gcmCC('P','A','T','H'),
+ gcvOBJ_QUEUE = gcmCC('Q','U','E',' '),
+ gcvOBJ_SAMPLER = gcmCC('S','A','M','P'),
+ gcvOBJ_SHADER = gcmCC('S','H','D','R'),
+ gcvOBJ_STREAM = gcmCC('S','T','R','M'),
+ gcvOBJ_SURF = gcmCC('S','U','R','F'),
+ gcvOBJ_TEXTURE = gcmCC('T','X','T','R'),
+ gcvOBJ_UNIFORM = gcmCC('U','N','I','F'),
+ gcvOBJ_VARIABLE = gcmCC('V','A','R','I'),
+ gcvOBJ_VERTEX = gcmCC('V','R','T','X'),
+ gcvOBJ_VIDMEM = gcmCC('V','M','E','M'),
+ gcvOBJ_VG = gcmCC('V','G',' ',' '),
+}
+gceOBJECT_TYPE;
+
+/* gcsOBJECT object defintinon. */
+typedef struct _gcsOBJECT
+{
+ /* Type of an object. */
+ gceOBJECT_TYPE type;
+}
+gcsOBJECT;
+
+typedef struct _gckHARDWARE * gckHARDWARE;
+
+/* CORE flags. */
+typedef enum _gceCORE
+{
+ gcvCORE_MAJOR = 0x0,
+ gcvCORE_2D = 0x1,
+ gcvCORE_VG = 0x2
+}
+gceCORE;
+
+#define gcdMAX_GPU_COUNT 3
+
+/*******************************************************************************
+**
+** gcmVERIFY_OBJECT
+**
+** Assert if an object is invalid or is not of the specified type. If the
+** object is invalid or not of the specified type, gcvSTATUS_INVALID_OBJECT
+** will be returned from the current function. In retail mode this macro
+** does nothing.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+#define _gcmVERIFY_OBJECT(prefix, obj, t) \
+ if ((obj) == gcvNULL) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: NULL"); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT((obj) != gcvNULL); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ } \
+ else if (((gcsOBJECT*) (obj))->type != t) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: %c%c%c%c", \
+ gcmCC_PRINT(((gcsOBJECT*) (obj))->type)); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT(((gcsOBJECT*)(obj))->type == t); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ }
+
+# define gcmVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcm, obj, t)
+# define gcmkVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcmk, obj, t)
+#else
+# define gcmVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+# define gcmkVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+#endif
+
+/******************************************************************************/
+/*VERIFY_OBJECT if special return expected*/
+/******************************************************************************/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_OBJECT_RETURN(prefix, obj, t, retVal) \
+ do \
+ { \
+ if ((obj) == gcvNULL) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT_RETURN failed: NULL"); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT((obj) != gcvNULL); \
+ prefix##FOOTER_ARG("retVal=%d", retVal); \
+ return retVal; \
+ } \
+ else if (((gcsOBJECT*) (obj))->type != t) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT_RETURN failed: %c%c%c%c", \
+ gcmCC_PRINT(((gcsOBJECT*) (obj))->type)); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT(((gcsOBJECT*)(obj))->type == t); \
+ prefix##FOOTER_ARG("retVal=%d", retVal); \
+ return retVal; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_OBJECT_RETURN(obj, t, retVal) \
+ _gcmVERIFY_OBJECT_RETURN(gcm, obj, t, retVal)
+# define gcmkVERIFY_OBJECT_RETURN(obj, t, retVal) \
+ _gcmVERIFY_OBJECT_RETURN(gcmk, obj, t, retVal)
+#else
+# define gcmVERIFY_OBJECT_RETURN(obj, t) do {} while (gcvFALSE)
+# define gcmVERIFY_OBJECT_RETURN(obj, t) do {} while (gcvFALSE)
+#endif
+
+/******************************************************************************\
+********************************** gckOS Object *********************************
+\******************************************************************************/
+
+/* Construct a new gckOS object. */
+gceSTATUS
+gckOS_Construct(
+ IN gctPOINTER Context,
+ OUT gckOS * Os
+ );
+
+/* Destroy an gckOS object. */
+gceSTATUS
+gckOS_Destroy(
+ IN gckOS Os
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckOS_QueryVideoMemory(
+ IN gckOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gckOS_Allocate(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gckOS_Free(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Wrapper for allocation memory.. */
+gceSTATUS
+gckOS_AllocateMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Wrapper for freeing memory. */
+gceSTATUS
+gckOS_FreeMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemoryEx(
+ IN gckOS Os,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Lock pages. */
+gceSTATUS
+gckOS_LockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Cacheable,
+ OUT gctPOINTER * Logical,
+ OUT gctSIZE_T * PageCount
+ );
+
+/* Map pages. */
+gceSTATUS
+gckOS_MapPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Logical,
+#endif
+ IN gctSIZE_T PageCount,
+ IN gctPOINTER PageTable
+ );
+
+/* Map pages. */
+gceSTATUS
+gckOS_MapPagesEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Logical,
+#endif
+ IN gctSIZE_T PageCount,
+ IN gctPOINTER PageTable
+ );
+
+/* Unlock pages. */
+gceSTATUS
+gckOS_UnlockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Free paged memory. */
+gceSTATUS
+gckOS_FreePagedMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Allocate non-paged memory. */
+gceSTATUS
+gckOS_AllocateNonPagedMemory(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non-paged memory. */
+gceSTATUS
+gckOS_FreeNonPagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gckOS_AllocateContiguous(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gckOS_FreeContiguous(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get the number fo bytes per page. */
+gceSTATUS
+gckOS_GetPageSize(
+ IN gckOS Os,
+ OUT gctSIZE_T * PageSize
+ );
+
+/* Get the physical address of a corresponding logical address. */
+gceSTATUS
+gckOS_GetPhysicalAddress(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+/* Get the physical address of a corresponding logical address. */
+gceSTATUS
+gckOS_GetPhysicalAddressProcess(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ IN gctUINT32 ProcessID,
+ OUT gctUINT32 * Address
+ );
+
+/* Map physical memory. */
+gceSTATUS
+gckOS_MapPhysical(
+ IN gckOS Os,
+ IN gctUINT32 Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap previously mapped physical memory. */
+gceSTATUS
+gckOS_UnmapPhysical(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Read data from a hardware register. */
+gceSTATUS
+gckOS_ReadRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+/* Read data from a hardware register. */
+gceSTATUS
+gckOS_ReadRegisterEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+/* Write data to a hardware register. */
+gceSTATUS
+gckOS_WriteRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Write data to a hardware register. */
+gceSTATUS
+gckOS_WriteRegisterEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Write data to a 32-bit memory location. */
+gceSTATUS
+gckOS_WriteMemory(
+ IN gckOS Os,
+ IN gctPOINTER Address,
+ IN gctUINT32 Data
+ );
+
+/* Map physical memory into the process space. */
+gceSTATUS
+gckOS_MapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap physical memory from the specified process space. */
+gceSTATUS
+gckOS_UnmapMemoryEx(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical,
+ IN gctUINT32 PID
+ );
+
+/* Unmap physical memory from the process space. */
+gceSTATUS
+gckOS_UnmapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Unmap user logical memory out of physical memory.
+ * This function is only supported in Linux currently.
+ */
+gceSTATUS
+gckOS_UnmapUserLogical(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Create a new mutex. */
+gceSTATUS
+gckOS_CreateMutex(
+ IN gckOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gckOS_DeleteMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gckOS_AcquireMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gckOS_ReleaseMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Atomically exchange a pair of 32-bit values. */
+gceSTATUS
+gckOS_AtomicExchange(
+ IN gckOS Os,
+ IN OUT gctUINT32_PTR Target,
+ IN gctUINT32 NewValue,
+ OUT gctUINT32_PTR OldValue
+ );
+
+/* Atomically exchange a pair of pointers. */
+gceSTATUS
+gckOS_AtomicExchangePtr(
+ IN gckOS Os,
+ IN OUT gctPOINTER * Target,
+ IN gctPOINTER NewValue,
+ OUT gctPOINTER * OldValue
+ );
+
+#if gcdSMP
+gceSTATUS
+gckOS_AtomSetMask(
+ IN gctPOINTER Atom,
+ IN gctUINT32 Mask
+ );
+
+gceSTATUS
+gckOS_AtomClearMask(
+ IN gctPOINTER Atom,
+ IN gctUINT32 Mask
+ );
+#endif
+
+gceSTATUS
+gckOS_DumpCallStack(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_GetProcessNameByPid(
+ IN gctINT Pid,
+ IN gctSIZE_T Length,
+ OUT gctUINT8_PTR String
+ );
+
+
+
+/*******************************************************************************
+**
+** gckOS_AtomConstruct
+**
+** Create an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** OUTPUT:
+**
+** gctPOINTER * Atom
+** Pointer to a variable receiving the constructed atom.
+*/
+gceSTATUS
+gckOS_AtomConstruct(
+ IN gckOS Os,
+ OUT gctPOINTER * Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDestroy
+**
+** Destroy an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom to destroy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_AtomDestroy(
+ IN gckOS Os,
+ OUT gctPOINTER Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomGet
+**
+** Get the 32-bit value protected by an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the value of the atom.
+*/
+gceSTATUS
+gckOS_AtomGet(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomSet
+**
+** Set the 32-bit value protected by an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** gctINT32 Value
+** The value of the atom.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_AtomSet(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ IN gctINT32 Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomIncrement
+**
+** Atomically increment the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomIncrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDecrement
+**
+** Atomically decrement the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomDecrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gckOS_Delay(
+ IN gckOS Os,
+ IN gctUINT32 Delay
+ );
+
+/* Get time in milliseconds. */
+gceSTATUS
+gckOS_GetTicks(
+ OUT gctUINT32_PTR Time
+ );
+
+/* Compare time value. */
+gceSTATUS
+gckOS_TicksAfter(
+ IN gctUINT32 Time1,
+ IN gctUINT32 Time2,
+ OUT gctBOOL_PTR IsAfter
+ );
+
+/* Get time in microseconds. */
+gceSTATUS
+gckOS_GetTime(
+ OUT gctUINT64_PTR Time
+ );
+
+/* Memory barrier. */
+gceSTATUS
+gckOS_MemoryBarrier(
+ IN gckOS Os,
+ IN gctPOINTER Address
+ );
+
+/* Map user pointer. */
+gceSTATUS
+gckOS_MapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Unmap user pointer. */
+gceSTATUS
+gckOS_UnmapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ IN gctPOINTER KernelPointer
+ );
+
+/*******************************************************************************
+**
+** gckOS_QueryNeedCopy
+**
+** Query whether the memory can be accessed or mapped directly or it has to be
+** copied.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to an gckOS object.
+**
+** gctUINT32 ProcessID
+** Process ID of the current process.
+**
+** OUTPUT:
+**
+** gctBOOL_PTR NeedCopy
+** Pointer to a boolean receiving gcvTRUE if the memory needs a copy or
+** gcvFALSE if the memory can be accessed or mapped dircetly.
+*/
+gceSTATUS
+gckOS_QueryNeedCopy(
+ IN gckOS Os,
+ IN gctUINT32 ProcessID,
+ OUT gctBOOL_PTR NeedCopy
+ );
+
+/*******************************************************************************
+**
+** gckOS_CopyFromUserData
+**
+** Copy data from user to kernel memory.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to an gckOS object.
+**
+** gctPOINTER KernelPointer
+** Pointer to kernel memory.
+**
+** gctPOINTER Pointer
+** Pointer to user memory.
+**
+** gctSIZE_T Size
+** Number of bytes to copy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_CopyFromUserData(
+ IN gckOS Os,
+ IN gctPOINTER KernelPointer,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size
+ );
+
+/*******************************************************************************
+**
+** gckOS_CopyToUserData
+**
+** Copy data from kernel to user memory.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to an gckOS object.
+**
+** gctPOINTER KernelPointer
+** Pointer to kernel memory.
+**
+** gctPOINTER Pointer
+** Pointer to user memory.
+**
+** gctSIZE_T Size
+** Number of bytes to copy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_CopyToUserData(
+ IN gckOS Os,
+ IN gctPOINTER KernelPointer,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size
+ );
+
+#ifdef __QNXNTO__
+/* Map user physical address. */
+gceSTATUS
+gckOS_MapUserPhysical(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Phys,
+ OUT gctPOINTER * KernelPointer
+ );
+#endif
+
+gceSTATUS
+gckOS_SuspendInterrupt(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_SuspendInterruptEx(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+gceSTATUS
+gckOS_ResumeInterrupt(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_ResumeInterruptEx(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gckOS_GetBaseAddress(
+ IN gckOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gckOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gckOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Device I/O control to the kernel HAL layer. */
+gceSTATUS
+gckOS_DeviceControl(
+ IN gckOS Os,
+ IN gctBOOL FromUser,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ OUT gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/*******************************************************************************
+**
+** gckOS_GetProcessID
+**
+** Get current process ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ProcessID
+** Pointer to the variable that receives the process ID.
+*/
+gceSTATUS
+gckOS_GetProcessID(
+ OUT gctUINT32_PTR ProcessID
+ );
+
+gceSTATUS
+gckOS_GetCurrentProcessID(
+ OUT gctUINT32_PTR ProcessID
+ );
+
+/*******************************************************************************
+**
+** gckOS_GetThreadID
+**
+** Get current thread ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ThreadID
+** Pointer to the variable that receives the thread ID.
+*/
+gceSTATUS
+gckOS_GetThreadID(
+ OUT gctUINT32_PTR ThreadID
+ );
+
+/******************************************************************************\
+********************************** Signal Object *********************************
+\******************************************************************************/
+
+/* Create a signal. */
+gceSTATUS
+gckOS_CreateSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gckOS_DestroySignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gckOS_Signal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gckOS_WaitSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Map a user signal to the kernel space. */
+gceSTATUS
+gckOS_MapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process,
+ OUT gctSIGNAL * MappedSignal
+ );
+
+/* Unmap a user signal */
+gceSTATUS
+gckOS_UnmapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Map user memory. */
+gceSTATUS
+gckOS_MapUserMemory(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPOINTER Memory,
+ IN gctUINT32 Physical,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gckOS_UnmapUserMemory(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+#if !USE_NEW_LINUX_SIGNAL
+/* Create signal to be used in the user space. */
+gceSTATUS
+gckOS_CreateUserSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctINT * SignalID
+ );
+
+/* Destroy signal used in the user space. */
+gceSTATUS
+gckOS_DestroyUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID
+ );
+
+/* Wait for signal used in the user space. */
+gceSTATUS
+gckOS_WaitUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctUINT32 Wait
+ );
+
+/* Signal a signal used in the user space. */
+gceSTATUS
+gckOS_SignalUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctBOOL State
+ );
+#endif /* USE_NEW_LINUX_SIGNAL */
+
+/* Set a signal owned by a process. */
+#if defined(__QNXNTO__)
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctINT Recvid,
+ IN gctINT Coid
+ );
+#else
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process
+ );
+#endif
+
+/******************************************************************************\
+** Cache Support
+*/
+
+gceSTATUS
+gckOS_CacheClean(
+ gckOS Os,
+ gctUINT32 ProcessID,
+ gctPHYS_ADDR Handle,
+ gctPOINTER Physical,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gckOS_CacheFlush(
+ gckOS Os,
+ gctUINT32 ProcessID,
+ gctPHYS_ADDR Handle,
+ gctPOINTER Physical,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gckOS_CacheInvalidate(
+ gckOS Os,
+ gctUINT32 ProcessID,
+ gctPHYS_ADDR Handle,
+ gctPOINTER Physical,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+** Debug Support
+*/
+
+void
+gckOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gckOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gckOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+/*******************************************************************************
+** Broadcast interface.
+*/
+
+typedef enum _gceBROADCAST
+{
+ /* GPU might be idle. */
+ gcvBROADCAST_GPU_IDLE,
+
+ /* A commit is going to happen. */
+ gcvBROADCAST_GPU_COMMIT,
+
+ /* GPU seems to be stuck. */
+ gcvBROADCAST_GPU_STUCK,
+
+ /* First process gets attached. */
+ gcvBROADCAST_FIRST_PROCESS,
+
+ /* Last process gets detached. */
+ gcvBROADCAST_LAST_PROCESS,
+
+ /* AXI bus error. */
+ gcvBROADCAST_AXI_BUS_ERROR,
+}
+gceBROADCAST;
+
+gceSTATUS
+gckOS_Broadcast(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gceBROADCAST Reason
+ );
+
+gceSTATUS
+gckOS_BroadcastHurry(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gctUINT Urgency
+ );
+
+gceSTATUS
+gckOS_BroadcastCalibrateSpeed(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gctUINT Idle,
+ IN gctUINT Time
+ );
+
+/*******************************************************************************
+**
+** gckOS_SetGPUPower
+**
+** Set the power of the GPU on or off.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.ß
+**
+** gckCORE Core
+** GPU whose power is set.
+**
+** gctBOOL Clock
+** gcvTRUE to turn on the clock, or gcvFALSE to turn off the clock.
+**
+** gctBOOL Power
+** gcvTRUE to turn on the power, or gcvFALSE to turn off the power.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_SetGPUPower(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctBOOL Clock,
+ IN gctBOOL Power
+ );
+
+gceSTATUS
+gckOS_ResetGPU(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+gceSTATUS
+gckOS_PrepareGPUFrequency(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+gceSTATUS
+gckOS_FinishGPUFrequency(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+gceSTATUS
+gckOS_QueryGPUFrequency(
+ IN gckOS Os,
+ IN gceCORE Core,
+ OUT gctUINT32 * Frequency,
+ OUT gctUINT8 * Scale
+ );
+
+gceSTATUS
+gckOS_SetGPUFrequency(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT8 Scale
+ );
+
+/*******************************************************************************
+** Semaphores.
+*/
+
+/* Create a new semaphore. */
+gceSTATUS
+gckOS_CreateSemaphore(
+ IN gckOS Os,
+ OUT gctPOINTER * Semaphore
+ );
+
+#if gcdENABLE_VG
+gceSTATUS
+gckOS_CreateSemaphoreVG(
+ IN gckOS Os,
+ OUT gctPOINTER * Semaphore
+ );
+#endif
+
+/* Delete a semahore. */
+gceSTATUS
+gckOS_DestroySemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Acquire a semahore. */
+gceSTATUS
+gckOS_AcquireSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Try to acquire a semahore. */
+gceSTATUS
+gckOS_TryAcquireSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Release a semahore. */
+gceSTATUS
+gckOS_ReleaseSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/*******************************************************************************
+** Timer API.
+*/
+
+typedef void (*gctTIMERFUNCTION)(gctPOINTER);
+
+/* Create a timer. */
+gceSTATUS
+gckOS_CreateTimer(
+ IN gckOS Os,
+ IN gctTIMERFUNCTION Function,
+ IN gctPOINTER Data,
+ OUT gctPOINTER * Timer
+ );
+
+/* Destory a timer. */
+gceSTATUS
+gckOS_DestroyTimer(
+ IN gckOS Os,
+ IN gctPOINTER Timer
+ );
+
+/* Start a timer. */
+gceSTATUS
+gckOS_StartTimer(
+ IN gckOS Os,
+ IN gctPOINTER Timer,
+ IN gctUINT32 Delay
+ );
+
+/* Stop a timer. */
+gceSTATUS
+gckOS_StopTimer(
+ IN gckOS Os,
+ IN gctPOINTER Timer
+ );
+
+/******************************************************************************\
+********************************* gckHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gckHEAP * gckHEAP;
+
+/* Construct a new gckHEAP object. */
+gceSTATUS
+gckHEAP_Construct(
+ IN gckOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gckHEAP * Heap
+ );
+
+/* Destroy an gckHEAP object. */
+gceSTATUS
+gckHEAP_Destroy(
+ IN gckHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gckHEAP_Allocate(
+ IN gckHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckHEAP_Free(
+ IN gckHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+/* Profile the heap. */
+gceSTATUS
+gckHEAP_ProfileStart(
+ IN gckHEAP Heap
+ );
+
+gceSTATUS
+gckHEAP_ProfileEnd(
+ IN gckHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+
+
+/******************************************************************************\
+******************************** gckVIDMEM Object ******************************
+\******************************************************************************/
+
+typedef struct _gckVIDMEM * gckVIDMEM;
+typedef struct _gckKERNEL * gckKERNEL;
+typedef struct _gckDB * gckDB;
+typedef struct _gckDVFS * gckDVFS;
+
+/* Construct a new gckVIDMEM object. */
+gceSTATUS
+gckVIDMEM_Construct(
+ IN gckOS Os,
+ IN gctUINT32 BaseAddress,
+ IN gctSIZE_T Bytes,
+ IN gctSIZE_T Threshold,
+ IN gctSIZE_T Banking,
+ OUT gckVIDMEM * Memory
+ );
+
+/* Destroy an gckVDIMEM object. */
+gceSTATUS
+gckVIDMEM_Destroy(
+ IN gckVIDMEM Memory
+ );
+
+/* Allocate rectangular memory. */
+gceSTATUS
+gckVIDMEM_Allocate(
+ IN gckVIDMEM Memory,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT BytesPerPixel,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Allocate linear memory. */
+gceSTATUS
+gckVIDMEM_AllocateLinear(
+ IN gckVIDMEM Memory,
+ IN gctSIZE_T Bytes,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckVIDMEM_Free(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/* Lock memory. */
+gceSTATUS
+gckVIDMEM_Lock(
+ IN gckKERNEL Kernel,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctBOOL Cacheable,
+ OUT gctUINT32 * Address
+ );
+
+/* Unlock memory. */
+gceSTATUS
+gckVIDMEM_Unlock(
+ IN gckKERNEL Kernel,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type,
+ IN OUT gctBOOL * Asynchroneous
+ );
+
+/* Construct a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_ConstructVirtual(
+ IN gckKERNEL Kernel,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Destroy a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_DestroyVirtual(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/******************************************************************************\
+******************************** gckKERNEL Object ******************************
+\******************************************************************************/
+
+struct _gcsHAL_INTERFACE;
+
+/* Notifications. */
+typedef enum _gceNOTIFY
+{
+ gcvNOTIFY_INTERRUPT,
+ gcvNOTIFY_COMMAND_QUEUE,
+}
+gceNOTIFY;
+
+/* Flush flags. */
+typedef enum _gceKERNEL_FLUSH
+{
+ gcvFLUSH_COLOR = 0x01,
+ gcvFLUSH_DEPTH = 0x02,
+ gcvFLUSH_TEXTURE = 0x04,
+ gcvFLUSH_2D = 0x08,
+ gcvFLUSH_ALL = gcvFLUSH_COLOR
+ | gcvFLUSH_DEPTH
+ | gcvFLUSH_TEXTURE
+ | gcvFLUSH_2D,
+}
+gceKERNEL_FLUSH;
+
+/* Construct a new gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Construct(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPOINTER Context,
+ IN gckDB SharedDB,
+ OUT gckKERNEL * Kernel
+ );
+
+/* Destroy an gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Destroy(
+ IN gckKERNEL Kernel
+ );
+
+/* Dispatch a user-level command. */
+gceSTATUS
+gckKERNEL_Dispatch(
+ IN gckKERNEL Kernel,
+ IN gctBOOL FromUser,
+ IN OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckKERNEL_QueryVideoMemory(
+ IN gckKERNEL Kernel,
+ OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Lookup the gckVIDMEM object for a pool. */
+gceSTATUS
+gckKERNEL_GetVideoMemoryPool(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+#if gcdUSE_VIDMEM_PER_PID
+gceSTATUS
+gckKERNEL_GetVideoMemoryPoolPid(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ IN gctUINT32 Pid,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+gceSTATUS
+gckKERNEL_CreateVideoMemoryPoolPid(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ IN gctUINT32 Pid,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+gceSTATUS
+gckKERNEL_RemoveVideoMemoryPoolPid(
+ IN gckKERNEL Kernel,
+ IN gckVIDMEM VideoMemory
+ );
+#endif
+
+/* Map video memory. */
+gceSTATUS
+gckKERNEL_MapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Address,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes,
+#endif
+ OUT gctPOINTER * Logical
+ );
+
+/* Map video memory. */
+gceSTATUS
+gckKERNEL_MapVideoMemoryEx(
+ IN gckKERNEL Kernel,
+ IN gceCORE Core,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Address,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes,
+#endif
+ OUT gctPOINTER * Logical
+ );
+
+#ifdef __QNXNTO__
+/* Unmap video memory. */
+gceSTATUS
+gckKERNEL_UnmapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes
+ );
+#endif
+
+/* Map memory. */
+gceSTATUS
+gckKERNEL_MapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap memory. */
+gceSTATUS
+gckKERNEL_UnmapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Notification of events. */
+gceSTATUS
+gckKERNEL_Notify(
+ IN gckKERNEL Kernel,
+ IN gceNOTIFY Notifcation,
+ IN gctBOOL Data
+ );
+
+gceSTATUS
+gckKERNEL_QuerySettings(
+ IN gckKERNEL Kernel,
+ OUT gcsKERNEL_SETTINGS * Settings
+ );
+
+/*******************************************************************************
+**
+** gckKERNEL_Recovery
+**
+** Try to recover the GPU from a fatal error.
+**
+** INPUT:
+**
+** gckKERNEL Kernel
+** Pointer to an gckKERNEL object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckKERNEL_Recovery(
+ IN gckKERNEL Kernel
+ );
+
+/* Set the value of timeout on HW operation. */
+void
+gckKERNEL_SetTimeOut(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 timeOut
+ );
+
+/* Get access to the user data. */
+gceSTATUS
+gckKERNEL_OpenUserData(
+ IN gckKERNEL Kernel,
+ IN gctBOOL NeedCopy,
+ IN gctPOINTER StaticStorage,
+ IN gctPOINTER UserPointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Release resources associated with the user data connection. */
+gceSTATUS
+gckKERNEL_CloseUserData(
+ IN gckKERNEL Kernel,
+ IN gctBOOL NeedCopy,
+ IN gctBOOL FlushData,
+ IN gctPOINTER UserPointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+gceSTATUS
+gckDVFS_Construct(
+ IN gckHARDWARE Hardware,
+ OUT gckDVFS * Frequency
+ );
+
+gceSTATUS
+gckDVFS_Destroy(
+ IN gckDVFS Dvfs
+ );
+
+gceSTATUS
+gckDVFS_Start(
+ IN gckDVFS Dvfs
+ );
+
+gceSTATUS
+gckDVFS_Stop(
+ IN gckDVFS Dvfs
+ );
+
+/******************************************************************************\
+******************************* gckHARDWARE Object *****************************
+\******************************************************************************/
+
+/* Construct a new gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Construct(
+ IN gckOS Os,
+ IN gceCORE Core,
+ OUT gckHARDWARE * Hardware
+ );
+
+/* Destroy an gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Destroy(
+ IN gckHARDWARE Hardware
+ );
+
+/* Get hardware type. */
+gceSTATUS
+gckHARDWARE_GetType(
+ IN gckHARDWARE Hardware,
+ OUT gceHARDWARE_TYPE * Type
+ );
+
+/* Query system memory requirements. */
+gceSTATUS
+gckHARDWARE_QuerySystemMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * SystemSize,
+ OUT gctUINT32 * SystemBaseAddress
+ );
+
+/* Build virtual address. */
+gceSTATUS
+gckHARDWARE_BuildVirtualAddress(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Index,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Query command buffer requirements. */
+gceSTATUS
+gckHARDWARE_QueryCommandBuffer(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * Alignment,
+ OUT gctSIZE_T * ReservedHead,
+ OUT gctSIZE_T * ReservedTail
+ );
+
+/* Add a WAIT/LINK pair in the command queue. */
+gceSTATUS
+gckHARDWARE_WaitLink(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctUINT32 * WaitOffset,
+ OUT gctSIZE_T * WaitBytes
+ );
+
+/* Kickstart the command processor. */
+gceSTATUS
+gckHARDWARE_Execute(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Physical,
+ IN gctBOOL PhysicalAddresses,
+#endif
+ IN gctSIZE_T Bytes
+ );
+
+/* Add an END command in the command queue. */
+gceSTATUS
+gckHARDWARE_End(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a NOP command in the command queue. */
+gceSTATUS
+gckHARDWARE_Nop(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a WAIT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Wait(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Count,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a PIPESELECT command in the command queue. */
+gceSTATUS
+gckHARDWARE_PipeSelect(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gcePIPE_SELECT Pipe,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a LINK command in the command queue. */
+gceSTATUS
+gckHARDWARE_Link(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctPOINTER FetchAddress,
+ IN gctSIZE_T FetchSize,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add an EVENT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Event(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT8 Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Query the available memory. */
+gceSTATUS
+gckHARDWARE_QueryMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctUINT32 * InternalBaseAddress,
+ OUT gctUINT32 * InternalAlignment,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctUINT32 * ExternalBaseAddress,
+ OUT gctUINT32 * ExternalAlignment,
+ OUT gctUINT32 * HorizontalTileSize,
+ OUT gctUINT32 * VerticalTileSize
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gckHARDWARE_QueryChipIdentity(
+ IN gckHARDWARE Hardware,
+ OUT gcsHAL_QUERY_CHIP_IDENTITY_PTR Identity
+ );
+
+/* Query the shader support. */
+gceSTATUS
+gckHARDWARE_QueryShaderCaps(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT * VertexUniforms,
+ OUT gctUINT * FragmentUniforms,
+ OUT gctUINT * Varyings
+ );
+
+/* Split a harwdare specific address into API stuff. */
+gceSTATUS
+gckHARDWARE_SplitMemory(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Update command queue tail pointer. */
+gceSTATUS
+gckHARDWARE_UpdateQueueTail(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset
+ );
+
+/* Convert logical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertLogical(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+#ifdef __QNXNTO__
+/* Convert physical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertPhysical(
+ IN gckHARDWARE Hardware,
+ IN gctPHYS_ADDR Physical,
+ OUT gctUINT32 * Address
+ );
+#endif
+
+/* Interrupt manager. */
+gceSTATUS
+gckHARDWARE_Interrupt(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL InterruptValid
+ );
+
+/* Program MMU. */
+gceSTATUS
+gckHARDWARE_SetMMU(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical
+ );
+
+/* Flush the MMU. */
+gceSTATUS
+gckHARDWARE_FlushMMU(
+ IN gckHARDWARE Hardware
+ );
+
+/* Set the page table base address. */
+gceSTATUS
+gckHARDWARE_SetMMUv2(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Enable,
+ IN gctPOINTER MtlbAddress,
+ IN gceMMU_MODE Mode,
+ IN gctPOINTER SafeAddress,
+ IN gctBOOL FromPower
+ );
+
+/* Get idle register. */
+gceSTATUS
+gckHARDWARE_GetIdle(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Wait,
+ OUT gctUINT32 * Data
+ );
+
+/* Flush the caches. */
+gceSTATUS
+gckHARDWARE_Flush(
+ IN gckHARDWARE Hardware,
+ IN gceKERNEL_FLUSH Flush,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Enable/disable fast clear. */
+gceSTATUS
+gckHARDWARE_SetFastClear(
+ IN gckHARDWARE Hardware,
+ IN gctINT Enable,
+ IN gctINT Compression
+ );
+
+gceSTATUS
+gckHARDWARE_ReadInterrupt(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR IDs
+ );
+
+/* Power management. */
+gceSTATUS
+gckHARDWARE_SetPowerManagementState(
+ IN gckHARDWARE Hardware,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gckHARDWARE_QueryPowerManagementState(
+ IN gckHARDWARE Hardware,
+ OUT gceCHIPPOWERSTATE* State
+ );
+
+gceSTATUS
+gckHARDWARE_SetPowerManagement(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL PowerManagement
+ );
+
+#if gcdENABLE_FSCALE_VAL_ADJUST
+gceSTATUS
+gckHARDWARE_SetFscaleValue(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 FscaleValue
+ );
+
+gceSTATUS
+gckHARDWARE_GetFscaleValue(
+ IN gckHARDWARE Hardware,
+ IN gctUINT * FscaleValue,
+ IN gctUINT * MinFscaleValue,
+ IN gctUINT * MaxFscaleValue
+ );
+#endif
+
+#if gcdPOWEROFF_TIMEOUT
+gceSTATUS
+gckHARDWARE_SetPowerOffTimeout(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Timeout
+);
+
+gceSTATUS
+gckHARDWARE_QueryPowerOffTimeout(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32* Timeout
+);
+#endif
+
+/* Profile 2D Engine. */
+gceSTATUS
+gckHARDWARE_ProfileEngine2D(
+ IN gckHARDWARE Hardware,
+ OUT gcs2D_PROFILE_PTR Profile
+ );
+
+gceSTATUS
+gckHARDWARE_InitializeHardware(
+ IN gckHARDWARE Hardware
+ );
+
+gceSTATUS
+gckHARDWARE_Reset(
+ IN gckHARDWARE Hardware
+ );
+
+typedef gceSTATUS (*gctISRMANAGERFUNC)(gctPOINTER Context);
+
+gceSTATUS
+gckHARDWARE_SetIsrManager(
+ IN gckHARDWARE Hardware,
+ IN gctISRMANAGERFUNC StartIsr,
+ IN gctISRMANAGERFUNC StopIsr,
+ IN gctPOINTER Context
+ );
+
+/* Start a composition. */
+gceSTATUS
+gckHARDWARE_Compose(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 ProcessID,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Offset,
+ IN gctSIZE_T Size,
+ IN gctUINT8 EventID
+ );
+
+/* Check for Hardware features. */
+gceSTATUS
+gckHARDWARE_IsFeatureAvailable(
+ IN gckHARDWARE Hardware,
+ IN gceFEATURE Feature
+ );
+
+gceSTATUS
+gckHARDWARE_DumpMMUException(
+ IN gckHARDWARE Hardware
+ );
+
+gceSTATUS
+gckHARDWARE_DumpGPUState(
+ IN gckHARDWARE Hardware
+ );
+
+gceSTATUS
+gckHARDWARE_InitDVFS(
+ IN gckHARDWARE Hardware
+ );
+
+gceSTATUS
+gckHARDWARE_QueryLoad(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32 * Load
+ );
+
+gceSTATUS
+gckHARDWARE_SetDVFSPeroid(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Frequency
+ );
+
+#if !gcdENABLE_VG
+/******************************************************************************\
+***************************** gckINTERRUPT Object ******************************
+\******************************************************************************/
+
+typedef struct _gckINTERRUPT * gckINTERRUPT;
+
+typedef gceSTATUS (* gctINTERRUPT_HANDLER)(
+ IN gckKERNEL Kernel
+ );
+
+gceSTATUS
+gckINTERRUPT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckINTERRUPT * Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_Destroy(
+ IN gckINTERRUPT Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_SetHandler(
+ IN gckINTERRUPT Interrupt,
+ IN OUT gctINT32_PTR Id,
+ IN gctINTERRUPT_HANDLER Handler
+ );
+
+gceSTATUS
+gckINTERRUPT_Notify(
+ IN gckINTERRUPT Interrupt,
+ IN gctBOOL Valid
+ );
+#endif
+/******************************************************************************\
+******************************** gckEVENT Object *******************************
+\******************************************************************************/
+
+typedef struct _gckEVENT * gckEVENT;
+
+/* Construct a new gckEVENT object. */
+gceSTATUS
+gckEVENT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckEVENT * Event
+ );
+
+/* Destroy an gckEVENT object. */
+gceSTATUS
+gckEVENT_Destroy(
+ IN gckEVENT Event
+ );
+
+/* Reserve the next available hardware event. */
+gceSTATUS
+gckEVENT_GetEvent(
+ IN gckEVENT Event,
+ IN gctBOOL Wait,
+ OUT gctUINT8 * EventID,
+ IN gceKERNEL_WHERE Source
+ );
+
+/* Add a new event to the list of events. */
+gceSTATUS
+gckEVENT_AddList(
+ IN gckEVENT Event,
+ IN gcsHAL_INTERFACE_PTR Interface,
+ IN gceKERNEL_WHERE FromWhere,
+ IN gctBOOL AllocateAllowed,
+ IN gctBOOL FromKernel
+ );
+
+/* Schedule a FreeNonPagedMemory event. */
+gceSTATUS
+gckEVENT_FreeNonPagedMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeContiguousMemory event. */
+gceSTATUS
+gckEVENT_FreeContiguousMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeVideoMemory event. */
+gceSTATUS
+gckEVENT_FreeVideoMemory(
+ IN gckEVENT Event,
+ IN gcuVIDMEM_NODE_PTR VideoMemory,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a signal event. */
+gceSTATUS
+gckEVENT_Signal(
+ IN gckEVENT Event,
+ IN gctSIGNAL Signal,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule an Unlock event. */
+gceSTATUS
+gckEVENT_Unlock(
+ IN gckEVENT Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type
+ );
+
+gceSTATUS
+gckEVENT_CommitDone(
+ IN gckEVENT Event,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+#if gcdVIRTUAL_COMMAND_BUFFER
+/* Schedule a FreeVirtualCommandBuffer event. */
+gceSTATUS
+gckEVENT_DestroyVirtualCommandBuffer(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+#endif
+
+gceSTATUS
+gckEVENT_Submit(
+ IN gckEVENT Event,
+ IN gctBOOL Wait,
+ IN gctBOOL FromPower
+ );
+
+/* Commit an event queue. */
+gceSTATUS
+gckEVENT_Commit(
+ IN gckEVENT Event,
+ IN gcsQUEUE_PTR Queue
+ );
+
+/* Schedule a composition event. */
+gceSTATUS
+gckEVENT_Compose(
+ IN gckEVENT Event,
+ IN gcsHAL_COMPOSE_PTR Info
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Notify(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Interrupt(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+gceSTATUS
+gckEVENT_Dump(
+ IN gckEVENT Event
+ );
+/******************************************************************************\
+******************************* gckCOMMAND Object ******************************
+\******************************************************************************/
+
+typedef struct _gckCOMMAND * gckCOMMAND;
+
+/* Construct a new gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckCOMMAND * Command
+ );
+
+/* Destroy an gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Destroy(
+ IN gckCOMMAND Command
+ );
+
+/* Acquire command queue synchronization objects. */
+gceSTATUS
+gckCOMMAND_EnterCommit(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromPower
+ );
+
+/* Release command queue synchronization objects. */
+gceSTATUS
+gckCOMMAND_ExitCommit(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromPower
+ );
+
+/* Start the command queue. */
+gceSTATUS
+gckCOMMAND_Start(
+ IN gckCOMMAND Command
+ );
+
+/* Stop the command queue. */
+gceSTATUS
+gckCOMMAND_Stop(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromRecovery
+ );
+
+/* Commit a buffer to the command queue. */
+gceSTATUS
+gckCOMMAND_Commit(
+ IN gckCOMMAND Command,
+ IN gckCONTEXT Context,
+ IN gcoCMDBUF CommandBuffer,
+ IN gcsSTATE_DELTA_PTR StateDelta,
+ IN gcsQUEUE_PTR EventQueue,
+ IN gctUINT32 ProcessID
+ );
+
+/* Reserve space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Reserve(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequestedBytes,
+ OUT gctPOINTER * Buffer,
+ OUT gctSIZE_T * BufferSize
+ );
+
+/* Execute reserved space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Execute(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequstedBytes
+ );
+
+/* Stall the command queue. */
+gceSTATUS
+gckCOMMAND_Stall(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromPower
+ );
+
+/* Attach user process. */
+gceSTATUS
+gckCOMMAND_Attach(
+ IN gckCOMMAND Command,
+ OUT gckCONTEXT * Context,
+ OUT gctSIZE_T * StateCount,
+ IN gctUINT32 ProcessID
+ );
+
+/* Detach user process. */
+gceSTATUS
+gckCOMMAND_Detach(
+ IN gckCOMMAND Command,
+ IN gckCONTEXT Context
+ );
+
+#if gcdVIRTUAL_COMMAND_BUFFER
+gceSTATUS
+gckCOMMAND_DumpExecutingBuffer(
+ IN gckCOMMAND Command
+ );
+#endif
+
+/******************************************************************************\
+********************************* gckMMU Object ********************************
+\******************************************************************************/
+
+typedef struct _gckMMU * gckMMU;
+
+/* Construct a new gckMMU object. */
+gceSTATUS
+gckMMU_Construct(
+ IN gckKERNEL Kernel,
+ IN gctSIZE_T MmuSize,
+ OUT gckMMU * Mmu
+ );
+
+/* Destroy an gckMMU object. */
+gceSTATUS
+gckMMU_Destroy(
+ IN gckMMU Mmu
+ );
+
+/* Enable the MMU. */
+gceSTATUS
+gckMMU_Enable(
+ IN gckMMU Mmu,
+ IN gctUINT32 PhysBaseAddr,
+ IN gctUINT32 PhysSize
+ );
+
+/* Allocate pages inside the MMU. */
+gceSTATUS
+gckMMU_AllocatePages(
+ IN gckMMU Mmu,
+ IN gctSIZE_T PageCount,
+ OUT gctPOINTER * PageTable,
+ OUT gctUINT32 * Address
+ );
+
+/* Remove a page table from the MMU. */
+gceSTATUS
+gckMMU_FreePages(
+ IN gckMMU Mmu,
+ IN gctPOINTER PageTable,
+ IN gctSIZE_T PageCount
+ );
+
+/* Set the MMU page with info. */
+gceSTATUS
+gckMMU_SetPage(
+ IN gckMMU Mmu,
+ IN gctUINT32 PageAddress,
+ IN gctUINT32 *PageEntry
+ );
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_InsertNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+
+gceSTATUS
+gckMMU_RemoveNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+#endif
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_FreeHandleMemory(
+ IN gckKERNEL Kernel,
+ IN gckMMU Mmu,
+ IN gctUINT32 Pid
+ );
+#endif
+
+gceSTATUS
+gckMMU_Flush(
+ IN gckMMU Mmu
+ );
+
+gceSTATUS
+gckMMU_DumpPageTableEntry(
+ IN gckMMU Mmu,
+ IN gctUINT32 Address
+ );
+
+
+#if VIVANTE_PROFILER
+gceSTATUS
+gckHARDWARE_QueryProfileRegisters(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Clear,
+ OUT gcsPROFILER_COUNTERS * Counters
+ );
+#endif
+
+gceSTATUS
+gckOS_SignalQueryHardware(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ OUT gckHARDWARE * Hardware
+ );
+
+gceSTATUS
+gckOS_SignalSetHardware(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ gckHARDWARE Hardware
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#if gcdENABLE_VG
+#include "gc_hal_vg.h"
+#endif
+
+#endif /* __gc_hal_h_ */
diff --git a/src/include_imx6_v4_1_0/gc_hal_base.h b/src/include_imx6_v4_1_0/gc_hal_base.h
new file mode 100644
index 0000000..44689b0
--- /dev/null
+++ b/src/include_imx6_v4_1_0/gc_hal_base.h
@@ -0,0 +1,3730 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_base_h_
+#define __gc_hal_base_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#include "gc_hal_dump.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gckOS * gckOS;
+typedef struct _gcoHAL * gcoHAL;
+typedef struct _gcoOS * gcoOS;
+typedef struct _gco2D * gco2D;
+
+#ifndef VIVANTE_NO_3D
+typedef struct _gco3D * gco3D;
+#endif
+
+typedef struct _gcoSURF * gcoSURF;
+typedef struct _gcsSURF_INFO * gcsSURF_INFO_PTR;
+typedef struct _gcsSURF_NODE * gcsSURF_NODE_PTR;
+typedef struct _gcsSURF_FORMAT_INFO * gcsSURF_FORMAT_INFO_PTR;
+typedef struct _gcsPOINT * gcsPOINT_PTR;
+typedef struct _gcsSIZE * gcsSIZE_PTR;
+typedef struct _gcsRECT * gcsRECT_PTR;
+typedef struct _gcsBOUNDARY * gcsBOUNDARY_PTR;
+typedef struct _gcoDUMP * gcoDUMP;
+typedef struct _gcoHARDWARE * gcoHARDWARE;
+typedef union _gcuVIDMEM_NODE * gcuVIDMEM_NODE_PTR;
+
+typedef struct gcsATOM * gcsATOM_PTR;
+
+#if gcdENABLE_VG
+typedef struct _gcoVG * gcoVG;
+typedef struct _gcsCOMPLETION_SIGNAL * gcsCOMPLETION_SIGNAL_PTR;
+typedef struct _gcsCONTEXT_MAP * gcsCONTEXT_MAP_PTR;
+#else
+typedef void * gcoVG;
+#endif
+
+#if gcdSYNC
+typedef struct _gcoFENCE * gcoFENCE;
+typedef struct _gcsSYNC_CONTEXT * gcsSYNC_CONTEXT_PTR;
+#endif
+
+/******************************************************************************\
+******************************* Process local storage *************************
+\******************************************************************************/
+typedef struct _gcsPLS * gcsPLS_PTR;
+typedef struct _gcsPLS
+{
+ /* Global objects. */
+ gcoOS os;
+ gcoHAL hal;
+
+ /* Internal memory pool. */
+ gctSIZE_T internalSize;
+ gctPHYS_ADDR internalPhysical;
+ gctPOINTER internalLogical;
+
+ /* External memory pool. */
+ gctSIZE_T externalSize;
+ gctPHYS_ADDR externalPhysical;
+ gctPOINTER externalLogical;
+
+ /* Contiguous memory pool. */
+ gctSIZE_T contiguousSize;
+ gctPHYS_ADDR contiguousPhysical;
+ gctPOINTER contiguousLogical;
+
+ /* EGL-specific process-wide objects. */
+ gctPOINTER eglDisplayInfo;
+ gctPOINTER eglSurfaceInfo;
+ gceSURF_FORMAT eglConfigFormat;
+
+ /* PorcessID of the constrcutor process */
+ gctUINT32 processID;
+
+ /* Reference count for destructor. */
+ gcsATOM_PTR reference;
+ gctBOOL bKFS;
+#if gcdUSE_NPOT_PATCH
+ gctBOOL bNeedSupportNP2Texture;
+#endif
+
+}
+gcsPLS;
+
+extern gcsPLS gcPLS;
+
+/******************************************************************************\
+******************************* Thread local storage *************************
+\******************************************************************************/
+
+typedef struct _gcsTLS * gcsTLS_PTR;
+
+typedef void (* gctTLS_DESTRUCTOR) (
+ gcsTLS_PTR
+ );
+
+typedef struct _gcsTLS
+{
+ gceHARDWARE_TYPE currentType;
+ gcoHARDWARE hardware;
+ /* Only for separated 3D and 2D */
+ gcoHARDWARE hardware2D;
+#if gcdENABLE_VG
+ gcoVGHARDWARE vg;
+ gcoVG engineVG;
+#endif /* gcdENABLE_VG */
+ gctPOINTER context;
+ gctTLS_DESTRUCTOR destructor;
+ gctBOOL ProcessExiting;
+
+#ifndef VIVANTE_NO_3D
+ gco3D engine3D;
+#endif
+#if gcdSYNC
+ gctBOOL fenceEnable;
+#endif
+ gco2D engine2D;
+ gctBOOL copied;
+}
+gcsTLS;
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+typedef enum _gcePLS_VALUE
+{
+ gcePLS_VALUE_EGL_DISPLAY_INFO,
+ gcePLS_VALUE_EGL_SURFACE_INFO,
+ gcePLS_VALUE_EGL_CONFIG_FORMAT_INFO,
+}
+gcePLS_VALUE;
+
+/* Video memory pool type. */
+typedef enum _gcePOOL
+{
+ gcvPOOL_UNKNOWN = 0,
+ gcvPOOL_DEFAULT,
+ gcvPOOL_LOCAL,
+ gcvPOOL_LOCAL_INTERNAL,
+ gcvPOOL_LOCAL_EXTERNAL,
+ gcvPOOL_UNIFIED,
+ gcvPOOL_SYSTEM,
+ gcvPOOL_VIRTUAL,
+ gcvPOOL_USER,
+ gcvPOOL_CONTIGUOUS,
+ gcvPOOL_DEFAULT_FORCE_CONTIGUOUS,
+ gcvPOOL_DEFAULT_FORCE_CONTIGUOUS_CACHEABLE,
+
+ gcvPOOL_NUMBER_OF_POOLS
+}
+gcePOOL;
+
+#ifndef VIVANTE_NO_3D
+/* Blending functions. */
+typedef enum _gceBLEND_FUNCTION
+{
+ gcvBLEND_ZERO,
+ gcvBLEND_ONE,
+ gcvBLEND_SOURCE_COLOR,
+ gcvBLEND_INV_SOURCE_COLOR,
+ gcvBLEND_SOURCE_ALPHA,
+ gcvBLEND_INV_SOURCE_ALPHA,
+ gcvBLEND_TARGET_COLOR,
+ gcvBLEND_INV_TARGET_COLOR,
+ gcvBLEND_TARGET_ALPHA,
+ gcvBLEND_INV_TARGET_ALPHA,
+ gcvBLEND_SOURCE_ALPHA_SATURATE,
+ gcvBLEND_CONST_COLOR,
+ gcvBLEND_INV_CONST_COLOR,
+ gcvBLEND_CONST_ALPHA,
+ gcvBLEND_INV_CONST_ALPHA,
+}
+gceBLEND_FUNCTION;
+
+/* Blending modes. */
+typedef enum _gceBLEND_MODE
+{
+ gcvBLEND_ADD,
+ gcvBLEND_SUBTRACT,
+ gcvBLEND_REVERSE_SUBTRACT,
+ gcvBLEND_MIN,
+ gcvBLEND_MAX,
+}
+gceBLEND_MODE;
+
+/* API flags. */
+typedef enum _gceAPI
+{
+ gcvAPI_D3D = 0x1,
+ gcvAPI_OPENGL = 0x2,
+ gcvAPI_OPENVG = 0x3,
+ gcvAPI_OPENCL = 0x4,
+}
+gceAPI;
+
+/* Depth modes. */
+typedef enum _gceDEPTH_MODE
+{
+ gcvDEPTH_NONE,
+ gcvDEPTH_Z,
+ gcvDEPTH_W,
+}
+gceDEPTH_MODE;
+#endif /* VIVANTE_NO_3D */
+
+typedef enum _gceWHERE
+{
+ gcvWHERE_COMMAND,
+ gcvWHERE_RASTER,
+ gcvWHERE_PIXEL,
+}
+gceWHERE;
+
+typedef enum _gceHOW
+{
+ gcvHOW_SEMAPHORE = 0x1,
+ gcvHOW_STALL = 0x2,
+ gcvHOW_SEMAPHORE_STALL = 0x3,
+}
+gceHOW;
+
+typedef enum _gceSignalHandlerType
+{
+ gcvHANDLE_SIGFPE_WHEN_SIGNAL_CODE_IS_0 = 0x1,
+}
+gceSignalHandlerType;
+
+
+#if gcdENABLE_VG
+/* gcsHAL_Limits*/
+typedef struct _gcsHAL_LIMITS
+{
+ /* chip info */
+ gceCHIPMODEL chipModel;
+ gctUINT32 chipRevision;
+ gctUINT32 featureCount;
+ gctUINT32 *chipFeatures;
+
+ /* target caps */
+ gctUINT32 maxWidth;
+ gctUINT32 maxHeight;
+ gctUINT32 multiTargetCount;
+ gctUINT32 maxSamples;
+
+}gcsHAL_LIMITS;
+#endif
+
+/******************************************************************************\
+*********** Generic Memory Allocation Optimization Using Containers ************
+\******************************************************************************/
+
+/* Generic container definition. */
+typedef struct _gcsCONTAINER_LINK * gcsCONTAINER_LINK_PTR;
+typedef struct _gcsCONTAINER_LINK
+{
+ /* Points to the next container. */
+ gcsCONTAINER_LINK_PTR next;
+}
+gcsCONTAINER_LINK;
+
+typedef struct _gcsCONTAINER_RECORD * gcsCONTAINER_RECORD_PTR;
+typedef struct _gcsCONTAINER_RECORD
+{
+ gcsCONTAINER_RECORD_PTR prev;
+ gcsCONTAINER_RECORD_PTR next;
+}
+gcsCONTAINER_RECORD;
+
+typedef struct _gcsCONTAINER * gcsCONTAINER_PTR;
+typedef struct _gcsCONTAINER
+{
+ gctUINT containerSize;
+ gctUINT recordSize;
+ gctUINT recordCount;
+ gcsCONTAINER_LINK_PTR containers;
+ gcsCONTAINER_RECORD freeList;
+ gcsCONTAINER_RECORD allocList;
+}
+gcsCONTAINER;
+
+gceSTATUS
+gcsCONTAINER_Construct(
+ IN gcsCONTAINER_PTR Container,
+ gctUINT RecordsPerContainer,
+ gctUINT RecordSize
+ );
+
+gceSTATUS
+gcsCONTAINER_Destroy(
+ IN gcsCONTAINER_PTR Container
+ );
+
+gceSTATUS
+gcsCONTAINER_AllocateRecord(
+ IN gcsCONTAINER_PTR Container,
+ OUT gctPOINTER * Record
+ );
+
+gceSTATUS
+gcsCONTAINER_FreeRecord(
+ IN gcsCONTAINER_PTR Container,
+ IN gctPOINTER Record
+ );
+
+gceSTATUS
+gcsCONTAINER_FreeAll(
+ IN gcsCONTAINER_PTR Container
+ );
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Construct a new gcoHAL object. */
+gceSTATUS
+gcoHAL_Construct(
+ IN gctPOINTER Context,
+ IN gcoOS Os,
+ OUT gcoHAL * Hal
+ );
+
+/* Destroy an gcoHAL object. */
+gceSTATUS
+gcoHAL_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Get pointer to gco2D object. */
+gceSTATUS
+gcoHAL_Get2DEngine(
+ IN gcoHAL Hal,
+ OUT gco2D * Engine
+ );
+
+gceSTATUS
+gcoHAL_SetFscaleValue(
+ IN gctUINT FscaleValue
+ );
+
+gceSTATUS
+gcoHAL_GetFscaleValue(
+ OUT gctUINT * FscaleValue,
+ OUT gctUINT * MinFscaleValue,
+ OUT gctUINT * MaxFscaleValue
+ );
+
+gceSTATUS
+gcoHAL_SetBltNP2Texture(
+ gctBOOL enable
+ );
+
+#ifndef VIVANTE_NO_3D
+/* Get pointer to gco3D object. */
+gceSTATUS
+gcoHAL_Get3DEngine(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+gceSTATUS
+gcoHAL_Query3DEngine(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+gceSTATUS
+gcoHAL_Set3DEngine(
+ IN gcoHAL Hal,
+ IN gco3D Engine
+ );
+
+gceSTATUS
+gcoHAL_Get3DHardware(
+ IN gcoHAL Hal,
+ OUT gcoHARDWARE * Hardware
+ );
+
+gceSTATUS
+gcoHAL_Set3DHardware(
+ IN gcoHAL Hal,
+ IN gcoHARDWARE Hardware
+ );
+
+
+#endif /* VIVANTE_NO_3D */
+
+/* Verify whether the specified feature is available in hardware. */
+gceSTATUS
+gcoHAL_IsFeatureAvailable(
+ IN gcoHAL Hal,
+ IN gceFEATURE Feature
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gcoHAL_QueryChipIdentity(
+ IN gcoHAL Hal,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the minor features of the hardware. */
+gceSTATUS gcoHAL_QueryChipMinorFeatures(
+ IN gcoHAL Hal,
+ OUT gctUINT32* NumFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the amount of video memory. */
+gceSTATUS
+gcoHAL_QueryVideoMemory(
+ IN gcoHAL Hal,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Map video memory. */
+gceSTATUS
+gcoHAL_MapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap video memory. */
+gceSTATUS
+gcoHAL_UnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a buffer mapped through its physical address. */
+gceSTATUS
+gcoHAL_ScheduleUnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Map user memory. */
+gceSTATUS
+gcoHAL_MapUserMemory(
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR GPUAddress
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gcoHAL_UnmapUserMemory(
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 GPUAddress
+ );
+
+/* Schedule an unmap of a user buffer using event mechanism. */
+gceSTATUS
+gcoHAL_ScheduleUnmapUserMemory(
+ IN gcoHAL Hal,
+ IN gctPOINTER Info,
+ IN gctSIZE_T Size,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory
+ );
+
+/* Commit the current command buffer. */
+gceSTATUS
+gcoHAL_Commit(
+ IN gcoHAL Hal,
+ IN gctBOOL Stall
+ );
+
+/* Query the tile capabilities. */
+gceSTATUS
+gcoHAL_QueryTiled(
+ IN gcoHAL Hal,
+ OUT gctINT32 * TileWidth2D,
+ OUT gctINT32 * TileHeight2D,
+ OUT gctINT32 * TileWidth3D,
+ OUT gctINT32 * TileHeight3D
+ );
+
+gceSTATUS
+gcoHAL_Compact(
+ IN gcoHAL Hal
+ );
+
+#if VIVANTE_PROFILER
+gceSTATUS
+gcoHAL_ProfileStart(
+ IN gcoHAL Hal
+ );
+
+gceSTATUS
+gcoHAL_ProfileEnd(
+ IN gcoHAL Hal,
+ IN gctCONST_STRING Title
+ );
+#endif
+
+/* Power Management */
+gceSTATUS
+gcoHAL_SetPowerManagementState(
+ IN gcoHAL Hal,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gcoHAL_QueryPowerManagementState(
+ IN gcoHAL Hal,
+ OUT gceCHIPPOWERSTATE *State
+ );
+
+/* Set the filter type for filter blit. */
+gceSTATUS
+gcoHAL_SetFilterType(
+ IN gcoHAL Hal,
+ IN gceFILTER_TYPE FilterType
+ );
+
+gceSTATUS
+gcoHAL_GetDump(
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Call the kernel HAL layer. */
+gceSTATUS
+gcoHAL_Call(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Schedule an event. */
+gceSTATUS
+gcoHAL_ScheduleEvent(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Destroy a surface. */
+gceSTATUS
+gcoHAL_DestroySurface(
+ IN gcoHAL Hal,
+ IN gcoSURF Surface
+ );
+
+/* Request a start/stop timestamp. */
+gceSTATUS
+gcoHAL_SetTimer(
+ IN gcoHAL Hal,
+ IN gctUINT32 Index,
+ IN gctBOOL Start
+ );
+
+/* Get Time delta from a Timer in microseconds. */
+gceSTATUS
+gcoHAL_GetTimerTime(
+ IN gcoHAL Hal,
+ IN gctUINT32 Timer,
+ OUT gctINT32_PTR TimeDelta
+ );
+
+/* set timeout value. */
+gceSTATUS
+gcoHAL_SetTimeOut(
+ IN gcoHAL Hal,
+ IN gctUINT32 timeOut
+ );
+
+gceSTATUS
+gcoHAL_SetHardwareType(
+ IN gcoHAL Hal,
+ IN gceHARDWARE_TYPE HardwardType
+ );
+
+gceSTATUS
+gcoHAL_GetHardwareType(
+ IN gcoHAL Hal,
+ OUT gceHARDWARE_TYPE * HardwardType
+ );
+
+gceSTATUS
+gcoHAL_QueryChipCount(
+ IN gcoHAL Hal,
+ OUT gctINT32 * Count
+ );
+
+gceSTATUS
+gcoHAL_QuerySeparated3D2D(
+ IN gcoHAL Hal
+ );
+
+/* Get pointer to gcoVG object. */
+gceSTATUS
+gcoHAL_GetVGEngine(
+ IN gcoHAL Hal,
+ OUT gcoVG * Engine
+ );
+
+#if gcdENABLE_VG
+gceSTATUS
+gcoHAL_QueryChipLimits(
+ IN gcoHAL Hal,
+ IN gctINT32 Chip,
+ OUT gcsHAL_LIMITS *Limits);
+
+gceSTATUS
+gcoHAL_QueryChipFeature(
+ IN gcoHAL Hal,
+ IN gctINT32 Chip,
+ IN gceFEATURE Feature);
+
+#endif
+/******************************************************************************\
+********************************** gcoOS Object *********************************
+\******************************************************************************/
+
+/* Get PLS value for given key */
+gctPOINTER
+gcoOS_GetPLSValue(
+ IN gcePLS_VALUE key
+ );
+
+/* Set PLS value of a given key */
+void
+gcoOS_SetPLSValue(
+ IN gcePLS_VALUE key,
+ OUT gctPOINTER value
+ );
+
+/* Get access to the thread local storage. */
+gceSTATUS
+gcoOS_GetTLS(
+ OUT gcsTLS_PTR * TLS
+ );
+
+ /* Copy the TLS from a source thread. */
+ gceSTATUS gcoOS_CopyTLS(IN gcsTLS_PTR Source);
+
+/* Destroy the objects associated with the current thread. */
+void
+gcoOS_FreeThreadData(
+ IN gctBOOL ProcessExiting
+ );
+
+/* Construct a new gcoOS object. */
+gceSTATUS
+gcoOS_Construct(
+ IN gctPOINTER Context,
+ OUT gcoOS * Os
+ );
+
+/* Destroy an gcoOS object. */
+gceSTATUS
+gcoOS_Destroy(
+ IN gcoOS Os
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gcoOS_GetBaseAddress(
+ IN gcoOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gcoOS_Allocate(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Get allocated memory size. */
+gceSTATUS
+gcoOS_GetMemorySize(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ OUT gctSIZE_T_PTR MemorySize
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gcoOS_Free(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoOS_AllocateMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoOS_FreeMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gcoOS_AllocateContiguous(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gcoOS_FreeContiguous(
+ IN gcoOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Allocate video memory. */
+gceSTATUS
+gcoOS_AllocateVideoMemory(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN gctBOOL InCacheable,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctUINT32 * Physical,
+ OUT gctPOINTER * Logical,
+ OUT gctPOINTER * Handle
+ );
+
+/* Free video memory. */
+gceSTATUS
+gcoOS_FreeVideoMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Handle
+ );
+
+#if gcdENABLE_BANK_ALIGNMENT
+gceSTATUS
+gcoSURF_GetBankOffsetBytes(
+ IN gcoSURF Surfce,
+ IN gceSURF_TYPE Type,
+ IN gctUINT32 Stride,
+ IN gctUINT32_PTR Bytes
+ );
+#endif
+
+/* Map user memory. */
+gceSTATUS
+gcoOS_MapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Map user memory. */
+gceSTATUS
+gcoOS_MapUserMemoryEx(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctUINT32 Physical,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gcoOS_UnmapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+/* Device I/O Control call to the kernel HAL layer. */
+gceSTATUS
+gcoOS_DeviceControl(
+ IN gcoOS Os,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ IN gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/* Allocate non paged memory. */
+gceSTATUS
+gcoOS_AllocateNonPagedMemory(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non paged memory. */
+gceSTATUS
+gcoOS_FreeNonPagedMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+#define gcmOS_SAFE_FREE(os, mem) \
+ gcoOS_Free(os, mem); \
+ mem = gcvNULL
+
+#define gcmkOS_SAFE_FREE(os, mem) \
+ gckOS_Free(os, mem); \
+ mem = gcvNULL
+
+typedef enum _gceFILE_MODE
+{
+ gcvFILE_CREATE = 0,
+ gcvFILE_APPEND,
+ gcvFILE_READ,
+ gcvFILE_CREATETEXT,
+ gcvFILE_APPENDTEXT,
+ gcvFILE_READTEXT,
+}
+gceFILE_MODE;
+
+/* Open a file. */
+gceSTATUS
+gcoOS_Open(
+ IN gcoOS Os,
+ IN gctCONST_STRING FileName,
+ IN gceFILE_MODE Mode,
+ OUT gctFILE * File
+ );
+
+/* Close a file. */
+gceSTATUS
+gcoOS_Close(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Read data from a file. */
+gceSTATUS
+gcoOS_Read(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctPOINTER Data,
+ OUT gctSIZE_T * ByteRead
+ );
+
+/* Write data to a file. */
+gceSTATUS
+gcoOS_Write(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Flush data to a file. */
+gceSTATUS
+gcoOS_Flush(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Create an endpoint for communication. */
+gceSTATUS
+gcoOS_Socket(
+ IN gcoOS Os,
+ IN gctINT Domain,
+ IN gctINT Type,
+ IN gctINT Protocol,
+ OUT gctINT *SockFd
+ );
+
+/* Close a socket. */
+gceSTATUS
+gcoOS_CloseSocket(
+ IN gcoOS Os,
+ IN gctINT SockFd
+ );
+
+/* Initiate a connection on a socket. */
+gceSTATUS
+gcoOS_Connect(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctCONST_POINTER HostName,
+ IN gctUINT Port);
+
+/* Shut down part of connection on a socket. */
+gceSTATUS
+gcoOS_Shutdown(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctINT How
+ );
+
+/* Send a message on a socket. */
+gceSTATUS
+gcoOS_Send(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data,
+ IN gctINT Flags
+ );
+
+/* Initiate a connection on a socket. */
+gceSTATUS
+gcoOS_WaitForSend(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctINT Seconds,
+ IN gctINT MicroSeconds);
+
+/* Get environment variable value. */
+gceSTATUS
+gcoOS_GetEnv(
+ IN gcoOS Os,
+ IN gctCONST_STRING VarName,
+ OUT gctSTRING * Value
+ );
+
+/* Get current working directory. */
+gceSTATUS
+gcoOS_GetCwd(
+ IN gcoOS Os,
+ IN gctINT SizeInBytes,
+ OUT gctSTRING Buffer
+ );
+
+/* Get file status info. */
+gceSTATUS
+gcoOS_Stat(
+ IN gcoOS Os,
+ IN gctCONST_STRING FileName,
+ OUT gctPOINTER Buffer
+ );
+
+typedef enum _gceFILE_WHENCE
+{
+ gcvFILE_SEEK_SET,
+ gcvFILE_SEEK_CUR,
+ gcvFILE_SEEK_END
+}
+gceFILE_WHENCE;
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_Seek(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Offset,
+ IN gceFILE_WHENCE Whence
+ );
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_SetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Position
+ );
+
+/* Get the current position of a file. */
+gceSTATUS
+gcoOS_GetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ OUT gctUINT32 * Position
+ );
+
+/* Same as strstr. */
+gceSTATUS
+gcoOS_StrStr(
+ IN gctCONST_STRING String,
+ IN gctCONST_STRING SubString,
+ OUT gctSTRING * Output
+ );
+
+/* Find the last occurance of a character inside a string. */
+gceSTATUS
+gcoOS_StrFindReverse(
+ IN gctCONST_STRING String,
+ IN gctINT8 Character,
+ OUT gctSTRING * Output
+ );
+
+gceSTATUS
+gcoOS_StrDup(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ OUT gctSTRING * Target
+ );
+
+/* Copy a string. */
+gceSTATUS
+gcoOS_StrCopySafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Append a string. */
+gceSTATUS
+gcoOS_StrCatSafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Compare two strings. */
+gceSTATUS
+gcoOS_StrCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2
+ );
+
+/* Compare characters of two strings. */
+gceSTATUS
+gcoOS_StrNCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2,
+ IN gctSIZE_T Count
+ );
+
+/* Convert string to float. */
+gceSTATUS
+gcoOS_StrToFloat(
+ IN gctCONST_STRING String,
+ OUT gctFLOAT * Float
+ );
+
+/* Convert hex string to integer. */
+gceSTATUS
+gcoOS_HexStrToInt(
+ IN gctCONST_STRING String,
+ OUT gctINT * Int
+ );
+
+/* Convert hex string to float. */
+gceSTATUS
+gcoOS_HexStrToFloat(
+ IN gctCONST_STRING String,
+ OUT gctFLOAT * Float
+ );
+
+/* Convert string to integer. */
+gceSTATUS
+gcoOS_StrToInt(
+ IN gctCONST_STRING String,
+ OUT gctINT * Int
+ );
+
+gceSTATUS
+gcoOS_MemCmp(
+ IN gctCONST_POINTER Memory1,
+ IN gctCONST_POINTER Memory2,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_PrintStrSafe(
+ OUT gctSTRING String,
+ IN gctSIZE_T StringSize,
+ IN OUT gctUINT * Offset,
+ IN gctCONST_STRING Format,
+ ...
+ );
+
+gceSTATUS
+gcoOS_LoadLibrary(
+ IN gcoOS Os,
+ IN gctCONST_STRING Library,
+ OUT gctHANDLE * Handle
+ );
+
+gceSTATUS
+gcoOS_FreeLibrary(
+ IN gcoOS Os,
+ IN gctHANDLE Handle
+ );
+
+gceSTATUS
+gcoOS_GetProcAddress(
+ IN gcoOS Os,
+ IN gctHANDLE Handle,
+ IN gctCONST_STRING Name,
+ OUT gctPOINTER * Function
+ );
+
+gceSTATUS
+gcoOS_Compact(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_AddSignalHandler (
+ IN gceSignalHandlerType SignalHandlerType
+ );
+
+#if VIVANTE_PROFILER
+gceSTATUS
+gcoOS_ProfileStart(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_ProfileEnd(
+ IN gcoOS Os,
+ IN gctCONST_STRING Title
+ );
+
+gceSTATUS
+gcoOS_SetProfileSetting(
+ IN gcoOS Os,
+ IN gctBOOL Enable,
+ IN gctCONST_STRING FileName
+ );
+#endif
+
+gctBOOL
+gcoOS_IsNeededSupportNP2Texture(
+ IN gctCHAR* ProcName
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gcoOS_QueryVideoMemory(
+ IN gcoOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Detect if the process is the executable specified. */
+gceSTATUS
+gcoOS_DetectProcessByNamePid(
+ IN gctCONST_STRING Name,
+ IN gctHANDLE Pid
+ );
+
+/* Detect if the current process is the executable specified. */
+gceSTATUS
+gcoOS_DetectProcessByName(
+ IN gctCONST_STRING Name
+ );
+
+gceSTATUS
+gcoOS_DetectProcessByEncryptedName(
+ IN gctCONST_STRING Name
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Atoms ----------------------------------------------------------------*/
+
+/* Construct an atom. */
+gceSTATUS
+gcoOS_AtomConstruct(
+ IN gcoOS Os,
+ OUT gcsATOM_PTR * Atom
+ );
+
+/* Destroy an atom. */
+gceSTATUS
+gcoOS_AtomDestroy(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom
+ );
+
+/* Increment an atom. */
+gceSTATUS
+gcoOS_AtomIncrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+/* Decrement an atom. */
+gceSTATUS
+gcoOS_AtomDecrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+gctHANDLE
+gcoOS_GetCurrentProcessID(
+ void
+ );
+
+gctHANDLE
+gcoOS_GetCurrentThreadID(
+ void
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Time -----------------------------------------------------------------*/
+
+/* Get the number of milliseconds since the system started. */
+gctUINT32
+gcoOS_GetTicks(
+ void
+ );
+
+/* Get time in microseconds. */
+gceSTATUS
+gcoOS_GetTime(
+ gctUINT64_PTR Time
+ );
+
+/* Get CPU usage in microseconds. */
+gceSTATUS
+gcoOS_GetCPUTime(
+ gctUINT64_PTR CPUTime
+ );
+
+/* Get memory usage. */
+gceSTATUS
+gcoOS_GetMemoryUsage(
+ gctUINT32_PTR MaxRSS,
+ gctUINT32_PTR IxRSS,
+ gctUINT32_PTR IdRSS,
+ gctUINT32_PTR IsRSS
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gcoOS_Delay(
+ IN gcoOS Os,
+ IN gctUINT32 Delay
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Threads --------------------------------------------------------------*/
+
+#ifdef _WIN32
+/* Cannot include windows.h here becuase "near" and "far"
+ * which are used in gcsDEPTH_INFO, are defined to nothing in WinDef.h.
+ * So, use the real value of DWORD and WINAPI, instead.
+ * DWORD is unsigned long, and WINAPI is __stdcall.
+ * If these two are change in WinDef.h, the following two typdefs
+ * need to be changed, too.
+ */
+typedef unsigned long gctTHREAD_RETURN;
+typedef unsigned long (__stdcall * gcTHREAD_ROUTINE)(void * Argument);
+#else
+typedef void * gctTHREAD_RETURN;
+typedef void * (* gcTHREAD_ROUTINE)(void *);
+#endif
+
+/* Create a new thread. */
+gceSTATUS
+gcoOS_CreateThread(
+ IN gcoOS Os,
+ IN gcTHREAD_ROUTINE Worker,
+ IN gctPOINTER Argument,
+ OUT gctPOINTER * Thread
+ );
+
+/* Close a thread. */
+gceSTATUS
+gcoOS_CloseThread(
+ IN gcoOS Os,
+ IN gctPOINTER Thread
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Mutexes --------------------------------------------------------------*/
+
+/* Create a new mutex. */
+gceSTATUS
+gcoOS_CreateMutex(
+ IN gcoOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gcoOS_DeleteMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gcoOS_AcquireMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gcoOS_ReleaseMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Signals --------------------------------------------------------------*/
+
+/* Create a signal. */
+gceSTATUS
+gcoOS_CreateSignal(
+ IN gcoOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gcoOS_DestroySignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gcoOS_Signal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gcoOS_WaitSignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Map a signal from another process */
+gceSTATUS
+gcoOS_MapSignal(
+ IN gctSIGNAL RemoteSignal,
+ OUT gctSIGNAL * LocalSignal
+ );
+
+/* Unmap a signal mapped from another process */
+gceSTATUS
+gcoOS_UnmapSignal(
+ IN gctSIGNAL Signal
+ );
+
+/* Write a register. */
+gceSTATUS
+gcoOS_WriteRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Read a register. */
+gceSTATUS
+gcoOS_ReadRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+gceSTATUS
+gcoOS_CacheClean(
+ IN gcoOS Os,
+ IN gctUINT64 Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_CacheFlush(
+ IN gcoOS Os,
+ IN gctUINT64 Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_CacheInvalidate(
+ IN gcoOS Os,
+ IN gctUINT64 Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_MemoryBarrier(
+ IN gcoOS Os,
+ IN gctPOINTER Logical
+ );
+
+
+/*----------------------------------------------------------------------------*/
+/*----- Profile --------------------------------------------------------------*/
+
+gceSTATUS
+gckOS_GetProfileTick(
+ OUT gctUINT64_PTR Tick
+ );
+
+gceSTATUS
+gckOS_QueryProfileTickRate(
+ OUT gctUINT64_PTR TickRate
+ );
+
+gctUINT32
+gckOS_ProfileToMS(
+ IN gctUINT64 Ticks
+ );
+
+gceSTATUS
+gcoOS_GetProfileTick(
+ OUT gctUINT64_PTR Tick
+ );
+
+gceSTATUS
+gcoOS_QueryProfileTickRate(
+ OUT gctUINT64_PTR TickRate
+ );
+
+#define _gcmPROFILE_INIT(prefix, freq, start) \
+ do { \
+ prefix ## OS_QueryProfileTickRate(&(freq)); \
+ prefix ## OS_GetProfileTick(&(start)); \
+ } while (gcvFALSE)
+
+#define _gcmPROFILE_QUERY(prefix, start, ticks) \
+ do { \
+ prefix ## OS_GetProfileTick(&(ticks)); \
+ (ticks) = ((ticks) > (start)) ? ((ticks) - (start)) \
+ : (~0ull - (start) + (ticks) + 1); \
+ } while (gcvFALSE)
+
+#if gcdENABLE_PROFILING
+# define gcmkPROFILE_INIT(freq, start) _gcmPROFILE_INIT(gck, freq, start)
+# define gcmkPROFILE_QUERY(start, ticks) _gcmPROFILE_QUERY(gck, start, ticks)
+# define gcmPROFILE_INIT(freq, start) _gcmPROFILE_INIT(gco, freq, start)
+# define gcmPROFILE_QUERY(start, ticks) _gcmPROFILE_QUERY(gco, start, ticks)
+# define gcmPROFILE_ONLY(x) x
+# define gcmPROFILE_ELSE(x) do { } while (gcvFALSE)
+# define gcmPROFILE_DECLARE_ONLY(x) x
+# define gcmPROFILE_DECLARE_ELSE(x) typedef x
+#else
+# define gcmkPROFILE_INIT(start, freq) do { } while (gcvFALSE)
+# define gcmkPROFILE_QUERY(start, ticks) do { } while (gcvFALSE)
+# define gcmPROFILE_INIT(start, freq) do { } while (gcvFALSE)
+# define gcmPROFILE_QUERY(start, ticks) do { } while (gcvFALSE)
+# define gcmPROFILE_ONLY(x) do { } while (gcvFALSE)
+# define gcmPROFILE_ELSE(x) x
+# define gcmPROFILE_DECLARE_ONLY(x) typedef x
+# define gcmPROFILE_DECLARE_ELSE(x) x
+#endif
+
+/*******************************************************************************
+** gcoMATH object
+*/
+
+#define gcdPI 3.14159265358979323846f
+
+/* Kernel. */
+gctINT
+gckMATH_ModuloInt(
+ IN gctINT X,
+ IN gctINT Y
+ );
+
+/* User. */
+gctUINT32
+gcoMATH_Log2in5dot5(
+ IN gctINT X
+ );
+
+
+gctFLOAT
+gcoMATH_UIntAsFloat(
+ IN gctUINT32 X
+ );
+
+gctUINT32
+gcoMATH_FloatAsUInt(
+ IN gctFLOAT X
+ );
+
+gctBOOL
+gcoMATH_CompareEqualF(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+gctUINT16
+gcoMATH_UInt8AsFloat16(
+ IN gctUINT8 X
+ );
+
+/******************************************************************************\
+**************************** Coordinate Structures *****************************
+\******************************************************************************/
+
+typedef struct _gcsPOINT
+{
+ gctINT32 x;
+ gctINT32 y;
+}
+gcsPOINT;
+
+typedef struct _gcsSIZE
+{
+ gctINT32 width;
+ gctINT32 height;
+}
+gcsSIZE;
+
+typedef struct _gcsRECT
+{
+ gctINT32 left;
+ gctINT32 top;
+ gctINT32 right;
+ gctINT32 bottom;
+}
+gcsRECT;
+
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*------------------------------- gcoSURF Common ------------------------------*/
+
+/* Color format classes. */
+typedef enum _gceFORMAT_CLASS
+{
+ gcvFORMAT_CLASS_RGBA = 4500,
+ gcvFORMAT_CLASS_YUV,
+ gcvFORMAT_CLASS_INDEX,
+ gcvFORMAT_CLASS_LUMINANCE,
+ gcvFORMAT_CLASS_BUMP,
+ gcvFORMAT_CLASS_DEPTH,
+}
+gceFORMAT_CLASS;
+
+/* Special enums for width field in gcsFORMAT_COMPONENT. */
+typedef enum _gceCOMPONENT_CONTROL
+{
+ gcvCOMPONENT_NOTPRESENT = 0x00,
+ gcvCOMPONENT_DONTCARE = 0x80,
+ gcvCOMPONENT_WIDTHMASK = 0x7F,
+ gcvCOMPONENT_ODD = 0x80
+}
+gceCOMPONENT_CONTROL;
+
+/* Color format component parameters. */
+typedef struct _gcsFORMAT_COMPONENT
+{
+ gctUINT8 start;
+ gctUINT8 width;
+}
+gcsFORMAT_COMPONENT;
+
+/* RGBA color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_RGBA
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT red;
+ gcsFORMAT_COMPONENT green;
+ gcsFORMAT_COMPONENT blue;
+}
+gcsFORMAT_CLASS_TYPE_RGBA;
+
+/* YUV color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_YUV
+{
+ gcsFORMAT_COMPONENT y;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT v;
+}
+gcsFORMAT_CLASS_TYPE_YUV;
+
+/* Index color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_INDEX
+{
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_INDEX;
+
+/* Luminance color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_LUMINANCE
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_LUMINANCE;
+
+/* Bump map color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_BUMP
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT l;
+ gcsFORMAT_COMPONENT v;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT q;
+ gcsFORMAT_COMPONENT w;
+}
+gcsFORMAT_CLASS_TYPE_BUMP;
+
+/* Depth and stencil format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_DEPTH
+{
+ gcsFORMAT_COMPONENT depth;
+ gcsFORMAT_COMPONENT stencil;
+}
+gcsFORMAT_CLASS_TYPE_DEPTH;
+
+/* Format parameters. */
+typedef struct _gcsSURF_FORMAT_INFO
+{
+ /* Format code and class. */
+ gceSURF_FORMAT format;
+ gceFORMAT_CLASS fmtClass;
+
+ /* The size of one pixel in bits. */
+ gctUINT8 bitsPerPixel;
+
+ /* Component swizzle. */
+ gceSURF_SWIZZLE swizzle;
+
+ /* Some formats have two neighbour pixels interleaved together. */
+ /* To describe such format, set the flag to 1 and add another */
+ /* like this one describing the odd pixel format. */
+ gctUINT8 interleaved;
+
+ /* Format components. */
+ union
+ {
+ gcsFORMAT_CLASS_TYPE_BUMP bump;
+ gcsFORMAT_CLASS_TYPE_RGBA rgba;
+ gcsFORMAT_CLASS_TYPE_YUV yuv;
+ gcsFORMAT_CLASS_TYPE_LUMINANCE lum;
+ gcsFORMAT_CLASS_TYPE_INDEX index;
+ gcsFORMAT_CLASS_TYPE_DEPTH depth;
+ } u;
+}
+gcsSURF_FORMAT_INFO;
+
+/* Frame buffer information. */
+typedef struct _gcsSURF_FRAMEBUFFER
+{
+ gctPOINTER logical;
+ gctUINT width, height;
+ gctINT stride;
+ gceSURF_FORMAT format;
+}
+gcsSURF_FRAMEBUFFER;
+
+typedef struct _gcsVIDMEM_NODE_SHARED_INFO
+{
+ gctBOOL tileStatusDisabled;
+ gcsPOINT SrcOrigin;
+ gcsPOINT DestOrigin;
+ gcsSIZE RectSize;
+ gctUINT32 clearValue;
+}
+gcsVIDMEM_NODE_SHARED_INFO;
+
+/* Generic pixel component descriptors. */
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XXX8;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XX8X;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_X8XX;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_8XXX;
+
+typedef enum _gceORIENTATION
+{
+ gcvORIENTATION_TOP_BOTTOM,
+ gcvORIENTATION_BOTTOM_TOP,
+}
+gceORIENTATION;
+
+
+/* Construct a new gcoSURF object. */
+gceSTATUS
+gcoSURF_Construct(
+ IN gcoHAL Hal,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+/* Destroy an gcoSURF object. */
+gceSTATUS
+gcoSURF_Destroy(
+ IN gcoSURF Surface
+ );
+
+/* Map user-allocated surface. */
+gceSTATUS
+gcoSURF_MapUserSurface(
+ IN gcoSURF Surface,
+ IN gctUINT Alignment,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Query vid mem node info. */
+gceSTATUS
+gcoSURF_QueryVidMemNode(
+ IN gcoSURF Surface,
+ OUT gctUINT64 * Node,
+ OUT gcePOOL * Pool,
+ OUT gctUINT_PTR Bytes
+ );
+
+/* Set the color type of the surface. */
+gceSTATUS
+gcoSURF_SetColorType(
+ IN gcoSURF Surface,
+ IN gceSURF_COLOR_TYPE ColorType
+ );
+
+/* Get the color type of the surface. */
+gceSTATUS
+gcoSURF_GetColorType(
+ IN gcoSURF Surface,
+ OUT gceSURF_COLOR_TYPE *ColorType
+ );
+
+/* Set the surface ration angle. */
+gceSTATUS
+gcoSURF_SetRotation(
+ IN gcoSURF Surface,
+ IN gceSURF_ROTATION Rotation
+ );
+
+gceSTATUS
+gcoSURF_IsValid(
+ IN gcoSURF Surface
+ );
+
+#ifndef VIVANTE_NO_3D
+/* Verify and return the state of the tile status mechanism. */
+gceSTATUS
+gcoSURF_IsTileStatusSupported(
+ IN gcoSURF Surface
+ );
+
+/* Process tile status for the specified surface. */
+gceSTATUS
+gcoSURF_SetTileStatus(
+ IN gcoSURF Surface
+ );
+
+/* Enable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_EnableTileStatus(
+ IN gcoSURF Surface
+ );
+
+/* Disable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_DisableTileStatus(
+ IN gcoSURF Surface,
+ IN gctBOOL Decompress
+ );
+#endif /* VIVANTE_NO_3D */
+
+/* Get surface size. */
+gceSTATUS
+gcoSURF_GetSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctUINT * Depth
+ );
+
+/* Get surface aligned sizes. */
+gceSTATUS
+gcoSURF_GetAlignedSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctINT * Stride
+ );
+
+/* Get alignments. */
+gceSTATUS
+gcoSURF_GetAlignment(
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ OUT gctUINT * AddressAlignment,
+ OUT gctUINT * XAlignment,
+ OUT gctUINT * YAlignment
+ );
+
+/* Get surface type and format. */
+gceSTATUS
+gcoSURF_GetFormat(
+ IN gcoSURF Surface,
+ OUT gceSURF_TYPE * Type,
+ OUT gceSURF_FORMAT * Format
+ );
+
+/* Get surface tiling. */
+gceSTATUS
+gcoSURF_GetTiling(
+ IN gcoSURF Surface,
+ OUT gceTILING * Tiling
+ );
+
+/* Lock the surface. */
+gceSTATUS
+gcoSURF_Lock(
+ IN gcoSURF Surface,
+ IN OUT gctUINT32 * Address,
+ IN OUT gctPOINTER * Memory
+ );
+
+/* Unlock the surface. */
+gceSTATUS
+gcoSURF_Unlock(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory
+ );
+
+/* Return pixel format parameters. */
+gceSTATUS
+gcoSURF_QueryFormat(
+ IN gceSURF_FORMAT Format,
+ OUT gcsSURF_FORMAT_INFO_PTR * Info
+ );
+
+/* Compute the color pixel mask. */
+gceSTATUS
+gcoSURF_ComputeColorMask(
+ IN gcsSURF_FORMAT_INFO_PTR Format,
+ OUT gctUINT32_PTR ColorMask
+ );
+
+/* Flush the surface. */
+gceSTATUS
+gcoSURF_Flush(
+ IN gcoSURF Surface
+ );
+
+/* Fill surface from it's tile status buffer. */
+gceSTATUS
+gcoSURF_FillFromTile(
+ IN gcoSURF Surface
+ );
+
+/* Fill surface with a value. */
+gceSTATUS
+gcoSURF_Fill(
+ IN gcoSURF Surface,
+ IN gcsPOINT_PTR Origin,
+ IN gcsSIZE_PTR Size,
+ IN gctUINT32 Value,
+ IN gctUINT32 Mask
+ );
+
+/* Alpha blend two surfaces together. */
+gceSTATUS
+gcoSURF_Blend(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrig,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsSIZE_PTR Size,
+ IN gceSURF_BLEND_MODE Mode
+ );
+
+/* Create a new gcoSURF wrapper object. */
+gceSTATUS
+gcoSURF_ConstructWrapper(
+ IN gcoHAL Hal,
+ OUT gcoSURF * Surface
+ );
+
+/* Set the underlying buffer for the surface wrapper. */
+gceSTATUS
+gcoSURF_SetBuffer(
+ IN gcoSURF Surface,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Stride,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Set the size of the surface in pixels and map the underlying buffer. */
+gceSTATUS
+gcoSURF_SetWindow(
+ IN gcoSURF Surface,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height
+ );
+
+/* Set width/height alignment of the surface directly and calculate stride/size. This is only for dri backend now. Please be careful before use. */
+gceSTATUS
+gcoSURF_SetAlignment(
+ IN gcoSURF Surface,
+ IN gctUINT Width,
+ IN gctUINT Height
+ );
+
+/* Increase reference count of the surface. */
+gceSTATUS
+gcoSURF_ReferenceSurface(
+ IN gcoSURF Surface
+ );
+
+/* Get surface reference count. */
+gceSTATUS
+gcoSURF_QueryReferenceCount(
+ IN gcoSURF Surface,
+ OUT gctINT32 * ReferenceCount
+ );
+
+/* Set surface orientation. */
+gceSTATUS
+gcoSURF_SetOrientation(
+ IN gcoSURF Surface,
+ IN gceORIENTATION Orientation
+ );
+
+/* Query surface orientation. */
+gceSTATUS
+gcoSURF_QueryOrientation(
+ IN gcoSURF Surface,
+ OUT gceORIENTATION * Orientation
+ );
+
+gceSTATUS
+gcoSURF_SetOffset(
+ IN gcoSURF Surface,
+ IN gctUINT Offset
+ );
+
+gceSTATUS
+gcoSURF_GetOffset(
+ IN gcoSURF Surface,
+ OUT gctUINT *Offset
+ );
+
+gceSTATUS
+gcoSURF_NODE_Cache(
+ IN gcsSURF_NODE_PTR Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes,
+ IN gceCACHEOPERATION Operation
+ );
+
+/* Perform CPU cache operation on surface */
+gceSTATUS
+gcoSURF_CPUCacheOperation(
+ IN gcoSURF Surface,
+ IN gceCACHEOPERATION Operation
+ );
+
+
+gceSTATUS
+gcoSURF_SetLinearResolveAddress(
+ IN gcoSURF Surface,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory
+ );
+
+ gceSTATUS
+ gcoSURF_Swap(IN gcoSURF Surface1, IN gcoSURF Surface2);
+
+/******************************************************************************\
+********************************* gcoDUMP Object ********************************
+\******************************************************************************/
+
+/* Construct a new gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Construct(
+ IN gcoOS Os,
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Destroy a gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Destroy(
+ IN gcoDUMP Dump
+ );
+
+/* Enable/disable dumping. */
+gceSTATUS
+gcoDUMP_Control(
+ IN gcoDUMP Dump,
+ IN gctSTRING FileName
+ );
+
+gceSTATUS
+gcoDUMP_IsEnabled(
+ IN gcoDUMP Dump,
+ OUT gctBOOL * Enabled
+ );
+
+/* Add surface. */
+gceSTATUS
+gcoDUMP_AddSurface(
+ IN gcoDUMP Dump,
+ IN gctINT32 Width,
+ IN gctINT32 Height,
+ IN gceSURF_FORMAT PixelFormat,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount
+ );
+
+/* Mark the beginning of a frame. */
+gceSTATUS
+gcoDUMP_FrameBegin(
+ IN gcoDUMP Dump
+ );
+
+/* Mark the end of a frame. */
+gceSTATUS
+gcoDUMP_FrameEnd(
+ IN gcoDUMP Dump
+ );
+
+/* Dump data. */
+gceSTATUS
+gcoDUMP_DumpData(
+ IN gcoDUMP Dump,
+ IN gceDUMP_TAG Type,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Delete an address. */
+gceSTATUS
+gcoDUMP_Delete(
+ IN gcoDUMP Dump,
+ IN gctUINT32 Address
+ );
+
+/* Enable dump or not. */
+gceSTATUS
+gcoDUMP_SetDumpFlag(
+ IN gctBOOL DumpState
+ );
+
+/******************************************************************************\
+******************************* gcsRECT Structure ******************************
+\******************************************************************************/
+
+/* Initialize rectangle structure. */
+gceSTATUS
+gcsRECT_Set(
+ OUT gcsRECT_PTR Rect,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Return the width of the rectangle. */
+gceSTATUS
+gcsRECT_Width(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Width
+ );
+
+/* Return the height of the rectangle. */
+gceSTATUS
+gcsRECT_Height(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Height
+ );
+
+/* Ensure that top left corner is to the left and above the right bottom. */
+gceSTATUS
+gcsRECT_Normalize(
+ IN OUT gcsRECT_PTR Rect
+ );
+
+/* Compare two rectangles. */
+gceSTATUS
+gcsRECT_IsEqual(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * Equal
+ );
+
+/* Compare the sizes of two rectangles. */
+gceSTATUS
+gcsRECT_IsOfEqualSize(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * EqualSize
+ );
+
+gceSTATUS
+gcsRECT_RelativeRotation(
+ IN gceSURF_ROTATION Orientation,
+ IN OUT gceSURF_ROTATION *Relation);
+
+gceSTATUS
+
+gcsRECT_Rotate(
+
+ IN OUT gcsRECT_PTR Rect,
+
+ IN gceSURF_ROTATION Rotation,
+
+ IN gceSURF_ROTATION toRotation,
+
+ IN gctINT32 SurfaceWidth,
+
+ IN gctINT32 SurfaceHeight
+
+ );
+
+/******************************************************************************\
+**************************** gcsBOUNDARY Structure *****************************
+\******************************************************************************/
+
+typedef struct _gcsBOUNDARY
+{
+ gctINT x;
+ gctINT y;
+ gctINT width;
+ gctINT height;
+}
+gcsBOUNDARY;
+
+/******************************************************************************\
+********************************* gcoHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gcoHEAP * gcoHEAP;
+
+/* Construct a new gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Construct(
+ IN gcoOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gcoHEAP * Heap
+ );
+
+/* Destroy an gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Destroy(
+ IN gcoHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoHEAP_Allocate(
+ IN gcoHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcoHEAP_GetMemorySize(
+ IN gcoHEAP Heap,
+ IN gctPOINTER Memory,
+ OUT gctSIZE_T_PTR MemorySize
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoHEAP_Free(
+ IN gcoHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+#if (VIVANTE_PROFILER || gcdDEBUG)
+/* Profile the heap. */
+gceSTATUS
+gcoHEAP_ProfileStart(
+ IN gcoHEAP Heap
+ );
+
+gceSTATUS
+gcoHEAP_ProfileEnd(
+ IN gcoHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+#endif
+
+
+/******************************************************************************\
+******************************* Debugging Macros *******************************
+\******************************************************************************/
+
+void
+gcoOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gcoOS_GetDebugLevel(
+ OUT gctUINT32_PTR DebugLevel
+ );
+
+void
+gcoOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_GetDebugZone(
+ IN gctUINT32 Zone,
+ OUT gctUINT32_PTR DebugZone
+ );
+
+void
+gcoOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gcoOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+gctFILE
+gcoOS_ReplaceDebugFile(
+ IN gctFILE fp
+ );
+
+/*******************************************************************************
+**
+** gcmFATAL
+**
+** Print a message to the debugger and execute a break point.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_FATAL)
+# define gcmFATAL gcoOS_DebugFatal
+# define gcmkFATAL gckOS_DebugFatal
+#elif gcdHAS_ELLIPSES
+# define gcmFATAL(...)
+# define gcmkFATAL(...)
+#else
+ gcmINLINE static void
+ __dummy_fatal(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmFATAL __dummy_fatal
+# define gcmkFATAL __dummy_fatal
+#endif
+
+#define gcmENUM2TEXT(e) case e: return #e
+
+/*******************************************************************************
+**
+** gcmTRACE
+**
+** Print a message to the debugfer if the correct level has been set. In
+** retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** level Level of message.
+** message Message.
+** ... Optional arguments.
+*/
+#define gcvLEVEL_NONE -1
+#define gcvLEVEL_ERROR 0
+#define gcvLEVEL_WARNING 1
+#define gcvLEVEL_INFO 2
+#define gcvLEVEL_VERBOSE 3
+
+void
+gckOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_DebugTraceN(
+ IN gctUINT32 Level,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+# define gcmTRACE gcoOS_DebugTrace
+# define gcmkTRACE gckOS_DebugTrace
+# define gcmkTRACE_N gckOS_DebugTraceN
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE(...)
+# define gcmkTRACE(...)
+# define gcmkTRACE_N(...)
+#else
+ gcmINLINE static void
+ __dummy_trace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+ gcmINLINE static void
+ __dummy_trace_n(
+ IN gctUINT32 Level,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+# define gcmTRACE __dummy_trace
+# define gcmkTRACE __dummy_trace
+# define gcmkTRACE_N __dummy_trace_n
+#endif
+
+/* Zones common for kernel and user. */
+#define gcvZONE_OS (1 << 0)
+#define gcvZONE_HARDWARE (1 << 1)
+#define gcvZONE_HEAP (1 << 2)
+#define gcvZONE_SIGNAL (1 << 27)
+
+/* Kernel zones. */
+#define gcvZONE_KERNEL (1 << 3)
+#define gcvZONE_VIDMEM (1 << 4)
+#define gcvZONE_COMMAND (1 << 5)
+#define gcvZONE_DRIVER (1 << 6)
+#define gcvZONE_CMODEL (1 << 7)
+#define gcvZONE_MMU (1 << 8)
+#define gcvZONE_EVENT (1 << 9)
+#define gcvZONE_DEVICE (1 << 10)
+#define gcvZONE_DATABASE (1 << 11)
+#define gcvZONE_INTERRUPT (1 << 12)
+#define gcvZONE_POWER (1 << 13)
+
+/* User zones. */
+#define gcvZONE_HAL (1 << 3)
+#define gcvZONE_BUFFER (1 << 4)
+#define gcvZONE_CONTEXT (1 << 5)
+#define gcvZONE_SURFACE (1 << 6)
+#define gcvZONE_INDEX (1 << 7)
+#define gcvZONE_STREAM (1 << 8)
+#define gcvZONE_TEXTURE (1 << 9)
+#define gcvZONE_2D (1 << 10)
+#define gcvZONE_3D (1 << 11)
+#define gcvZONE_COMPILER (1 << 12)
+#define gcvZONE_MEMORY (1 << 13)
+#define gcvZONE_STATE (1 << 14)
+#define gcvZONE_AUX (1 << 15)
+#define gcvZONE_VERTEX (1 << 16)
+#define gcvZONE_CL (1 << 17)
+#define gcvZONE_COMPOSITION (1 << 17)
+#define gcvZONE_VG (1 << 18)
+#define gcvZONE_IMAGE (1 << 19)
+#define gcvZONE_UTILITY (1 << 20)
+#define gcvZONE_PARAMETERS (1 << 21)
+
+/* API definitions. */
+#define gcvZONE_API_HAL (1 << 28)
+#define gcvZONE_API_EGL (2 << 28)
+#define gcvZONE_API_ES11 (3 << 28)
+#define gcvZONE_API_ES20 (4 << 28)
+#define gcvZONE_API_VG11 (5 << 28)
+#define gcvZONE_API_GL (6 << 28)
+#define gcvZONE_API_DFB (7 << 28)
+#define gcvZONE_API_GDI (8 << 28)
+#define gcvZONE_API_D3D (9 << 28)
+#define gcvZONE_API_ES30 (10 << 28)
+
+
+#define gcmZONE_GET_API(zone) ((zone) >> 28)
+/*Set gcdZONE_MASE like 0x0 | gcvZONE_API_EGL
+will enable print EGL module debug info*/
+#define gcdZONE_MASK 0x0FFFFFFF
+
+/* Handy zones. */
+#define gcvZONE_NONE 0
+#define gcvZONE_ALL 0x0FFFFFFF
+
+/*Dump API depth set 1 for API, 2 for API and API behavior*/
+#define gcvDUMP_API_DEPTH 1
+
+/*******************************************************************************
+**
+** gcmTRACE_ZONE
+**
+** Print a message to the debugger if the correct level and zone has been
+** set. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** Level Level of message.
+** Zone Zone of message.
+** Message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_DebugTraceZoneN(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+# define gcmTRACE_ZONE gcoOS_DebugTraceZone
+# define gcmkTRACE_ZONE gckOS_DebugTraceZone
+# define gcmkTRACE_ZONE_N gckOS_DebugTraceZoneN
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE_ZONE(...)
+# define gcmkTRACE_ZONE(...)
+# define gcmkTRACE_ZONE_N(...)
+#else
+ gcmINLINE static void
+ __dummy_trace_zone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+ gcmINLINE static void
+ __dummy_trace_zone_n(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+# define gcmTRACE_ZONE __dummy_trace_zone
+# define gcmkTRACE_ZONE __dummy_trace_zone
+# define gcmkTRACE_ZONE_N __dummy_trace_zone_n
+#endif
+
+/*******************************************************************************
+**
+** gcmDEBUG_ONLY
+**
+** Execute a statement or function only in DEBUG mode.
+**
+** ARGUMENTS:
+**
+** f Statement or function to execute.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+# define gcmDEBUG_ONLY(f) f
+#else
+# define gcmDEBUG_ONLY(f)
+#endif
+
+/*******************************************************************************
+**
+** gcmSTACK_PUSH
+** gcmSTACK_POP
+** gcmSTACK_DUMP
+**
+** Push or pop a function with entry arguments on the trace stack.
+**
+** ARGUMENTS:
+**
+** Function Name of function.
+** Line Line number.
+** Text Optional text.
+** ... Optional arguments for text.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_STACK)
+ void
+ gcoOS_StackPush(
+ IN gctCONST_STRING Function,
+ IN gctINT Line,
+ IN gctCONST_STRING Text,
+ ...
+ );
+ void
+ gcoOS_StackPop(
+ IN gctCONST_STRING Function
+ );
+ void
+ gcoOS_StackDump(
+ void
+ );
+# define gcmSTACK_PUSH gcoOS_StackPush
+# define gcmSTACK_POP gcoOS_StackPop
+# define gcmSTACK_DUMP gcoOS_StackDump
+#elif gcdHAS_ELLIPSES
+# define gcmSTACK_PUSH(...) do { } while (0)
+# define gcmSTACK_POP(Function) do { } while (0)
+# define gcmSTACK_DUMP() do { } while (0)
+#else
+ gcmINLINE static void
+ __dummy_stack_push(
+ IN gctCONST_STRING Function,
+ IN gctINT Line,
+ IN gctCONST_STRING Text, ...
+ )
+ {
+ }
+# define gcmSTACK_PUSH __dummy_stack_push
+# define gcmSTACK_POP(Function) do { } while (0)
+# define gcmSTACK_DUMP() do { } while (0)
+#endif
+
+/******************************************************************************\
+******************************** Logging Macros ********************************
+\******************************************************************************/
+
+#define gcdHEADER_LEVEL gcvLEVEL_VERBOSE
+
+
+#if gcdENABLE_PROFILING
+void
+gcoOS_ProfileDB(
+ IN gctCONST_STRING Function,
+ IN OUT gctBOOL_PTR Initialized
+ );
+
+#define gcmHEADER() \
+ static gctBOOL __profile__initialized__ = gcvFALSE; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, gcvNULL, gcvNULL); \
+ gcoOS_ProfileDB(__FUNCTION__, &__profile__initialized__)
+#define gcmHEADER_ARG(...) \
+ static gctBOOL __profile__initialized__ = gcvFALSE; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, Text, __VA_ARGS__); \
+ gcoOS_ProfileDB(__FUNCTION__, &__profile__initialized__)
+#define gcmFOOTER() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(__FUNCTION__, gcvNULL)
+#define gcmFOOTER_NO() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(__FUNCTION__, gcvNULL)
+#define gcmFOOTER_ARG(...) \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(__FUNCTION__, gcvNULL)
+#define gcmFOOTER_KILL() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(gcvNULL, gcvNULL)
+
+#else /* gcdENABLE_PROFILING */
+
+#if gcdHAS_ELLIPSES
+#define gcmHEADER() \
+ gctINT8 __user__ = 1; \
+ gctINT8_PTR __user_ptr__ = &__user__; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, gcvNULL, gcvNULL); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+#else
+ gcmINLINE static void
+ __dummy_header(void)
+ {
+ }
+# define gcmHEADER __dummy_header
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmHEADER_ARG(Text, ...) \
+ gctINT8 __user__ = 1; \
+ gctINT8_PTR __user_ptr__ = &__user__; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, Text, __VA_ARGS__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_header_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmHEADER_ARG __dummy_header_arg
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmFOOTER() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmPROFILE_ONLY(gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d) [%llu,%llu]: status=%d(%s)", \
+ __FUNCTION__, __LINE__, \
+ __ticks__, __total__, \
+ status, gcoOS_DebugStatus2Name(status))); \
+ gcmPROFILE_ELSE(gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d(%s)", \
+ __FUNCTION__, __LINE__, \
+ status, gcoOS_DebugStatus2Name(status))); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer(void)
+ {
+ }
+# define gcmFOOTER __dummy_footer
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmFOOTER_NO() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer_no(void)
+ {
+ }
+# define gcmFOOTER_NO __dummy_footer_no
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmFOOTER_KILL() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer_kill(void)
+ {
+ }
+# define gcmFOOTER_KILL __dummy_footer_kill
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmFOOTER_ARG(Text, ...) \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmFOOTER_ARG __dummy_footer_arg
+#endif
+
+#endif /* gcdENABLE_PROFILING */
+
+#if gcdHAS_ELLIPSES
+#define gcmkHEADER() \
+ gctINT8 __kernel__ = 1; \
+ gctINT8_PTR __kernel_ptr__ = &__kernel__; \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+#else
+ gcmINLINE static void
+ __dummy_kheader(void)
+ {
+ }
+# define gcmkHEADER __dummy_kheader
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmkHEADER_ARG(Text, ...) \
+ gctINT8 __kernel__ = 1; \
+ gctINT8_PTR __kernel_ptr__ = &__kernel__; \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_kheader_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkHEADER_ARG __dummy_kheader_arg
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmkFOOTER() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d(%s)", \
+ __FUNCTION__, __LINE__, status, gckOS_DebugStatus2Name(status)); \
+ *__kernel_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_kfooter(void)
+ {
+ }
+# define gcmkFOOTER __dummy_kfooter
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmkFOOTER_NO() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__); \
+ *__kernel_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_kfooter_no(void)
+ {
+ }
+# define gcmkFOOTER_NO __dummy_kfooter_no
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmkFOOTER_ARG(Text, ...) \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, \
+ __FUNCTION__, __LINE__, __VA_ARGS__); \
+ *__kernel_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_kfooter_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkFOOTER_ARG __dummy_kfooter_arg
+#endif
+
+#define gcmOPT_VALUE(ptr) (((ptr) == gcvNULL) ? 0 : *(ptr))
+#define gcmOPT_VALUE_INDEX(ptr, index) (((ptr) == gcvNULL) ? 0 : ptr[index])
+#define gcmOPT_POINTER(ptr) (((ptr) == gcvNULL) ? gcvNULL : *(ptr))
+#define gcmOPT_STRING(ptr) (((ptr) == gcvNULL) ? "(nil)" : (ptr))
+
+void
+gckOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_PrintN(
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_CopyPrint(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#define gcmPRINT gcoOS_Print
+#define gcmkPRINT gckOS_Print
+#define gcmkPRINT_N gckOS_PrintN
+
+#if gcdPRINT_VERSION
+# define gcmPRINT_VERSION() do { \
+ _gcmPRINT_VERSION(gcm); \
+ gcmSTACK_DUMP(); \
+ } while (0)
+# define gcmkPRINT_VERSION() _gcmPRINT_VERSION(gcmk)
+# define _gcmPRINT_VERSION(prefix) \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ "Vivante HAL version %d.%d.%d build %d %s %s", \
+ gcvVERSION_MAJOR, gcvVERSION_MINOR, gcvVERSION_PATCH, \
+ gcvVERSION_BUILD, gcvVERSION_DATE, gcvVERSION_TIME )
+#else
+# define gcmPRINT_VERSION() do { gcmSTACK_DUMP(); } while (gcvFALSE)
+# define gcmkPRINT_VERSION() do { } while (gcvFALSE)
+#endif
+
+typedef enum _gceDUMP_BUFFER
+{
+ gceDUMP_BUFFER_CONTEXT,
+ gceDUMP_BUFFER_USER,
+ gceDUMP_BUFFER_KERNEL,
+ gceDUMP_BUFFER_LINK,
+ gceDUMP_BUFFER_WAITLINK,
+ gceDUMP_BUFFER_FROM_USER,
+}
+gceDUMP_BUFFER;
+
+void
+gckOS_DumpBuffer(
+ IN gckOS Os,
+ IN gctPOINTER Buffer,
+ IN gctUINT Size,
+ IN gceDUMP_BUFFER Type,
+ IN gctBOOL CopyMessage
+ );
+
+#define gcmkDUMPBUFFER gckOS_DumpBuffer
+
+#if gcdDUMP_COMMAND
+# define gcmkDUMPCOMMAND(Os, Buffer, Size, Type, CopyMessage) \
+ gcmkDUMPBUFFER(Os, Buffer, Size, Type, CopyMessage)
+#else
+# define gcmkDUMPCOMMAND(Os, Buffer, Size, Type, CopyMessage)
+#endif
+
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+
+void
+gckOS_DebugFlush(
+ gctCONST_STRING CallerName,
+ gctUINT LineNumber,
+ gctUINT32 DmaAddress
+ );
+
+# define gcmkDEBUGFLUSH(DmaAddress) \
+ gckOS_DebugFlush(__FUNCTION__, __LINE__, DmaAddress)
+#else
+# define gcmkDEBUGFLUSH(DmaAddress)
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_FRAMERATE
+**
+** Print average frame rate
+**
+*/
+#if gcdDUMP_FRAMERATE
+ gceSTATUS
+ gcfDumpFrameRate(
+ void
+ );
+# define gcmDUMP_FRAMERATE gcfDumpFrameRate
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_FRAMERATE(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_frame_rate(
+ void
+ )
+ {
+ }
+# define gcmDUMP_FRAMERATE __dummy_dump_frame_rate
+#endif
+
+
+/*******************************************************************************
+**
+** gcmDUMP
+**
+** Print a dump message.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+#if gcdDUMP
+ gceSTATUS
+ gcfDump(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ ...
+ );
+# define gcmDUMP gcfDump
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP(...)
+#else
+ gcmINLINE static void
+ __dummy_dump(
+ IN gcoOS Os,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP __dummy_dump
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_DATA
+**
+** Add data to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP || gcdDUMP_COMMAND
+ gceSTATUS
+ gcfDumpData(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_DATA gcfDumpData
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_DATA(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_data(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_DATA __dummy_dump_data
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_BUFFER
+**
+** Print a buffer to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctUINT32 Physical
+** Physical address of buffer.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctUINT32 Offset
+** Offset into buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP || gcdDUMP_COMMAND
+gceSTATUS
+gcfDumpBuffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_BUFFER gcfDumpBuffer
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_BUFFER(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_buffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_BUFFER __dummy_dump_buffer
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API
+**
+** Print a dump message for a high level API prefixed by the function name.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+gceSTATUS gcfDumpApi(IN gctCONST_STRING String, ...);
+#if gcdDUMP_API
+# define gcmDUMP_API gcfDumpApi
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP_API __dummy_dump_api
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY
+**
+** Print an array of data.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Size.
+*/
+gceSTATUS gcfDumpArray(IN gctCONST_POINTER Data, IN gctUINT32 Size);
+#if gcdDUMP_API
+# define gcmDUMP_API_ARRAY gcfDumpArray
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Size
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY __dummy_dump_api_array
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY_TOKEN
+**
+** Print an array of data terminated by a token.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Termination.
+*/
+gceSTATUS gcfDumpArrayToken(IN gctCONST_POINTER Data, IN gctUINT32 Termination);
+#if gcdDUMP_API
+# define gcmDUMP_API_ARRAY_TOKEN gcfDumpArrayToken
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY_TOKEN(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array_token(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Termination
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY_TOKEN __dummy_dump_api_array_token
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_DATA
+**
+** Print an array of bytes.
+**
+** ARGUMENTS:
+**
+** gctCONST_POINTER Pointer to array.
+** gctSIZE_T Size.
+*/
+gceSTATUS gcfDumpApiData(IN gctCONST_POINTER Data, IN gctSIZE_T Size);
+#if gcdDUMP_API
+# define gcmDUMP_API_DATA gcfDumpApiData
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_DATA(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_data(
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Size
+ )
+ {
+ }
+# define gcmDUMP_API_DATA __dummy_dump_api_data
+#endif
+
+/*******************************************************************************
+**
+** gcmTRACE_RELEASE
+**
+** Print a message to the shader debugger.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+#define gcmTRACE_RELEASE gcoOS_DebugShaderTrace
+
+void
+gcoOS_DebugShaderTrace(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_SetDebugShaderFiles(
+ IN gctCONST_STRING VSFileName,
+ IN gctCONST_STRING FSFileName
+ );
+
+void
+gcoOS_SetDebugShaderFileType(
+ IN gctUINT32 ShaderType
+ );
+
+void
+gcoOS_EnableDebugBuffer(
+ IN gctBOOL Enable
+ );
+
+/*******************************************************************************
+**
+** gcmBREAK
+**
+** Break into the debugger. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** None.
+*/
+
+void
+gcoOS_DebugBreak(
+ void
+ );
+
+void
+gckOS_DebugBreak(
+ void
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_BREAK)
+# define gcmBREAK gcoOS_DebugBreak
+# define gcmkBREAK gckOS_DebugBreak
+#else
+# define gcmBREAK()
+# define gcmkBREAK()
+#endif
+
+/*******************************************************************************
+**
+** gcmASSERT
+**
+** Evaluate an expression and break into the debugger if the expression
+** evaluates to false. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_ASSERT)
+# define _gcmASSERT(prefix, exp) \
+ do \
+ { \
+ if (!(exp)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ASSERT at %s(%d)", \
+ __FUNCTION__, __LINE__); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ "(%s)", #exp); \
+ prefix##BREAK(); \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmASSERT(exp) _gcmASSERT(gcm, exp)
+# define gcmkASSERT(exp) _gcmASSERT(gcmk, exp)
+#else
+# define gcmASSERT(exp)
+# define gcmkASSERT(exp)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY
+**
+** Verify if an expression returns true. If the expression does not
+** evaluates to true, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_ASSERT)
+# define gcmVERIFY(exp) gcmASSERT(exp)
+# define gcmkVERIFY(exp) gcmkASSERT(exp)
+#else
+# define gcmVERIFY(exp) exp
+# define gcmkVERIFY(exp) exp
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY_OK
+**
+** Verify a fucntion returns gcvSTATUS_OK. If the function does not return
+** gcvSTATUS_OK, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+
+void
+gcoOS_Verify(
+ IN gceSTATUS Status
+ );
+
+void
+gckOS_Verify(
+ IN gceSTATUS Status
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_ASSERT)
+# define gcmVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ gcoOS_Verify(verifyStatus); \
+ if (verifyStatus != gcvSTATUS_OK) \
+ { \
+ gcmTRACE( \
+ gcvLEVEL_ERROR, \
+ "gcmVERIFY_OK(%d): function returned %d", \
+ __LINE__, verifyStatus \
+ ); \
+ } \
+ gcmASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+# define gcmkVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ if (verifyStatus != gcvSTATUS_OK) \
+ { \
+ gcmkTRACE( \
+ gcvLEVEL_ERROR, \
+ "gcmkVERIFY_OK(%d): function returned %d", \
+ __LINE__, verifyStatus \
+ ); \
+ } \
+ gckOS_Verify(verifyStatus); \
+ gcmkASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+#else
+# define gcmVERIFY_OK(func) func
+# define gcmkVERIFY_OK(func) func
+#endif
+
+gctCONST_STRING
+gcoOS_DebugStatus2Name(
+ gceSTATUS status
+ );
+
+gctCONST_STRING
+gckOS_DebugStatus2Name(
+ gceSTATUS status
+ );
+
+/*******************************************************************************
+**
+** gcmERR_BREAK
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_BREAK(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_BREAK: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+#define _gcmkERR_BREAK(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_BREAK: status=%d(%s) @ %s(%d)", \
+ status, gckOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_BREAK(func) _gcmERR_BREAK(gcm, func)
+#define gcmkERR_BREAK(func) _gcmkERR_BREAK(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmERR_RETURN
+**
+** Executes a return on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ prefix##FOOTER(); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+#define _gcmkERR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d(%s) @ %s(%d)", \
+ status, gckOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ prefix##FOOTER(); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_RETURN(func) _gcmERR_RETURN(gcm, func)
+#define gcmkERR_RETURN(func) _gcmkERR_RETURN(gcmk, func)
+
+
+/*******************************************************************************
+**
+** gcmONERROR
+**
+** Jump to the error handler in case there is an error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmONERROR(prefix, func) \
+ do \
+ { \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ONERROR: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ goto OnError; \
+ } \
+ } \
+ while (gcvFALSE)
+#define _gcmkONERROR(prefix, func) \
+ do \
+ { \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ONERROR: status=%d(%s) @ %s(%d)", \
+ status, gckOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ goto OnError; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmONERROR(func) _gcmONERROR(gcm, func)
+#define gcmkONERROR(func) _gcmkONERROR(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_LOCK
+**
+** Verifies whether the surface is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_LOCK(surfaceInfo) \
+ if (!surfaceInfo->node.valid) \
+ { \
+ gcmONERROR(gcvSTATUS_MEMORY_UNLOCKED); \
+ } \
+
+/*******************************************************************************
+**
+** gcmVERIFY_NODE_LOCK
+**
+** Verifies whether the surface node is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_NODE_LOCK(surfaceNode) \
+ if (!(surfaceNode)->valid) \
+ { \
+ status = gcvSTATUS_MEMORY_UNLOCKED; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmBADOBJECT_BREAK
+**
+** Executes a break statement on bad object.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#define gcmBADOBJECT_BREAK(obj, t) \
+ if ((obj == gcvNULL) \
+ || (((gcsOBJECT *)(obj))->type != t) \
+ ) \
+ { \
+ status = gcvSTATUS_INVALID_OBJECT; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmCHECK_STATUS
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmCHECK_STATUS(prefix, func) \
+ do \
+ { \
+ last = func; \
+ if (gcmIS_ERROR(last)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "CHECK_STATUS: status=%d(%s) @ %s(%d)", \
+ last, gcoOS_DebugStatus2Name(last), __FUNCTION__, __LINE__); \
+ status = last; \
+ } \
+ } \
+ while (gcvFALSE)
+#define _gcmkCHECK_STATUS(prefix, func) \
+ do \
+ { \
+ last = func; \
+ if (gcmIS_ERROR(last)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "CHECK_STATUS: status=%d(%s) @ %s(%d)", \
+ last, gckOS_DebugStatus2Name(last), __FUNCTION__, __LINE__); \
+ status = last; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmCHECK_STATUS(func) _gcmCHECK_STATUS(gcm, func)
+#define gcmkCHECK_STATUS(func) _gcmkCHECK_STATUS(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+# define _gcmVERIFY_ARGUMENT(prefix, arg) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, #prefix "VERIFY_ARGUMENT failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_ARGUMENT); \
+ return gcvSTATUS_INVALID_ARGUMENT; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcm, arg)
+# define gcmkVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcmk, arg)
+
+/*******************************************************************************
+**
+** gcmDEBUG_VERIFY_ARGUMENT
+**
+** Works just like gcmVERIFY_ARGUMENT, but is only valid in debug mode.
+** Use this to verify arguments inside non-public API functions.
+*/
+#if gcdDEBUG
+# define gcmDEBUG_VERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcm, arg)
+# define gcmkDEBUG_VERIFY_ARGUMENT(arg) _gcmkVERIFY_ARGUMENT(gcm, arg)
+#else
+# define gcmDEBUG_VERIFY_ARGUMENT(arg)
+# define gcmkDEBUG_VERIFY_ARGUMENT(arg)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT_RETURN
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+# define _gcmVERIFY_ARGUMENT_RETURN(prefix, arg, value) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "gcmVERIFY_ARGUMENT_RETURN failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("value=%d", value); \
+ return value; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcm, arg, value)
+# define gcmkVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcmk, arg, value)
+
+#define MAX_LOOP_COUNT 0x7FFFFFFF
+
+/******************************************************************************\
+****************************** User Debug Option ******************************
+\******************************************************************************/
+
+/* User option. */
+typedef enum _gceDEBUG_MSG
+{
+ gcvDEBUG_MSG_NONE,
+ gcvDEBUG_MSG_ERROR,
+ gcvDEBUG_MSG_WARNING
+}
+gceDEBUG_MSG;
+
+typedef struct _gcsUSER_DEBUG_OPTION
+{
+ gceDEBUG_MSG debugMsg;
+}
+gcsUSER_DEBUG_OPTION;
+
+gcsUSER_DEBUG_OPTION *
+gcGetUserDebugOption(
+ void
+ );
+
+#if gcdHAS_ELLIPSES
+#define gcmUSER_DEBUG_MSG(level, ...) \
+ do \
+ { \
+ if (level <= gcGetUserDebugOption()->debugMsg) \
+ { \
+ gcoOS_Print(__VA_ARGS__); \
+ } \
+ } while (gcvFALSE)
+
+#define gcmUSER_DEBUG_ERROR_MSG(...) gcmUSER_DEBUG_MSG(gcvDEBUG_MSG_ERROR, "Error: " __VA_ARGS__)
+#define gcmUSER_DEBUG_WARNING_MSG(...) gcmUSER_DEBUG_MSG(gcvDEBUG_MSG_WARNING, "Warring: " __VA_ARGS__)
+#else
+#define gcmUSER_DEBUG_MSG
+#define gcmUSER_DEBUG_ERROR_MSG
+#define gcmUSER_DEBUG_WARNING_MSG
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_base_h_ */
diff --git a/src/include_imx6_v4_1_0/gc_hal_driver.h b/src/include_imx6_v4_1_0/gc_hal_driver.h
new file mode 100644
index 0000000..b056c52
--- /dev/null
+++ b/src/include_imx6_v4_1_0/gc_hal_driver.h
@@ -0,0 +1,991 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_driver_h_
+#define __gc_hal_driver_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#if gcdENABLE_VG
+#include "gc_hal_driver_vg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* I/O Control Codes ******************************
+\******************************************************************************/
+
+#define gcvHAL_CLASS "galcore"
+#define IOCTL_GCHAL_INTERFACE 30000
+#define IOCTL_GCHAL_KERNEL_INTERFACE 30001
+#define IOCTL_GCHAL_TERMINATE 30002
+
+/******************************************************************************\
+********************************* Command Codes ********************************
+\******************************************************************************/
+
+typedef enum _gceHAL_COMMAND_CODES
+{
+ /* Generic query. */
+ gcvHAL_QUERY_VIDEO_MEMORY,
+ gcvHAL_QUERY_CHIP_IDENTITY,
+
+ /* Contiguous memory. */
+ gcvHAL_ALLOCATE_NON_PAGED_MEMORY,
+ gcvHAL_FREE_NON_PAGED_MEMORY,
+ gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY,
+ gcvHAL_FREE_CONTIGUOUS_MEMORY,
+
+ /* Video memory allocation. */
+ gcvHAL_ALLOCATE_VIDEO_MEMORY, /* Enforced alignment. */
+ gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY, /* No alignment. */
+ gcvHAL_FREE_VIDEO_MEMORY,
+
+ /* Physical-to-logical mapping. */
+ gcvHAL_MAP_MEMORY,
+ gcvHAL_UNMAP_MEMORY,
+
+ /* Logical-to-physical mapping. */
+ gcvHAL_MAP_USER_MEMORY,
+ gcvHAL_UNMAP_USER_MEMORY,
+
+ /* Surface lock/unlock. */
+ gcvHAL_LOCK_VIDEO_MEMORY,
+ gcvHAL_UNLOCK_VIDEO_MEMORY,
+
+ /* Event queue. */
+ gcvHAL_EVENT_COMMIT,
+
+ gcvHAL_USER_SIGNAL,
+ gcvHAL_SIGNAL,
+ gcvHAL_WRITE_DATA,
+
+ gcvHAL_COMMIT,
+ gcvHAL_STALL,
+
+ gcvHAL_READ_REGISTER,
+ gcvHAL_WRITE_REGISTER,
+
+ gcvHAL_GET_PROFILE_SETTING,
+ gcvHAL_SET_PROFILE_SETTING,
+
+ gcvHAL_READ_ALL_PROFILE_REGISTERS,
+ gcvHAL_PROFILE_REGISTERS_2D,
+#if VIVANTE_PROFILER_PERDRAW
+ gcvHAL_READ_PROFILER_REGISTER_SETTING,
+#endif
+
+ /* Power management. */
+ gcvHAL_SET_POWER_MANAGEMENT_STATE,
+ gcvHAL_QUERY_POWER_MANAGEMENT_STATE,
+
+ gcvHAL_GET_BASE_ADDRESS,
+
+ gcvHAL_SET_IDLE, /* reserved */
+
+ /* Queries. */
+ gcvHAL_QUERY_KERNEL_SETTINGS,
+
+ /* Reset. */
+ gcvHAL_RESET,
+
+ /* Map physical address into handle. */
+ gcvHAL_MAP_PHYSICAL,
+
+ /* Debugger stuff. */
+ gcvHAL_DEBUG,
+
+ /* Cache stuff. */
+ gcvHAL_CACHE,
+
+ /* TimeStamp */
+ gcvHAL_TIMESTAMP,
+
+ /* Database. */
+ gcvHAL_DATABASE,
+
+ /* Version. */
+ gcvHAL_VERSION,
+
+ /* Chip info */
+ gcvHAL_CHIP_INFO,
+
+ /* Process attaching/detaching. */
+ gcvHAL_ATTACH,
+ gcvHAL_DETACH,
+
+ /* Composition. */
+ gcvHAL_COMPOSE,
+
+ /* Set timeOut value */
+ gcvHAL_SET_TIMEOUT,
+
+ /* Frame database. */
+ gcvHAL_GET_FRAME_INFO,
+
+ /* Shared info for each process */
+ gcvHAL_GET_SHARED_INFO,
+ gcvHAL_SET_SHARED_INFO,
+ gcvHAL_QUERY_COMMAND_BUFFER,
+
+ gcvHAL_COMMIT_DONE,
+
+ /* GPU and event dump */
+ gcvHAL_DUMP_GPU_STATE,
+ gcvHAL_DUMP_EVENT,
+
+ /* Virtual command buffer. */
+ gcvHAL_ALLOCATE_VIRTUAL_COMMAND_BUFFER,
+ gcvHAL_FREE_VIRTUAL_COMMAND_BUFFER,
+
+ /* FSCALE_VAL. */
+ gcvHAL_SET_FSCALE_VALUE,
+ gcvHAL_GET_FSCALE_VALUE,
+
+ /* Reset time stamp. */
+ gcvHAL_QUERY_RESET_TIME_STAMP,
+}
+gceHAL_COMMAND_CODES;
+
+/******************************************************************************\
+****************************** Interface Structure *****************************
+\******************************************************************************/
+
+#define gcdMAX_PROFILE_FILE_NAME 128
+
+/* Kernel settings. */
+typedef struct _gcsKERNEL_SETTINGS
+{
+ /* Used RealTime signal between kernel and user. */
+ gctINT signal;
+}
+gcsKERNEL_SETTINGS;
+
+
+/* gcvHAL_QUERY_CHIP_IDENTITY */
+typedef struct _gcsHAL_QUERY_CHIP_IDENTITY * gcsHAL_QUERY_CHIP_IDENTITY_PTR;
+typedef struct _gcsHAL_QUERY_CHIP_IDENTITY
+{
+
+ /* Chip model. */
+ gceCHIPMODEL chipModel;
+
+ /* Revision value.*/
+ gctUINT32 chipRevision;
+
+ /* Supported feature fields. */
+ gctUINT32 chipFeatures;
+
+ /* Supported minor feature fields. */
+ gctUINT32 chipMinorFeatures;
+
+ /* Supported minor feature 1 fields. */
+ gctUINT32 chipMinorFeatures1;
+
+ /* Supported minor feature 2 fields. */
+ gctUINT32 chipMinorFeatures2;
+
+ /* Supported minor feature 3 fields. */
+ gctUINT32 chipMinorFeatures3;
+
+ /* Supported minor feature 4 fields. */
+ gctUINT32 chipMinorFeatures4;
+
+ /* Number of streams supported. */
+ gctUINT32 streamCount;
+
+ /* Total number of temporary registers per thread. */
+ gctUINT32 registerMax;
+
+ /* Maximum number of threads. */
+ gctUINT32 threadCount;
+
+ /* Number of shader cores. */
+ gctUINT32 shaderCoreCount;
+
+ /* Size of the vertex cache. */
+ gctUINT32 vertexCacheSize;
+
+ /* Number of entries in the vertex output buffer. */
+ gctUINT32 vertexOutputBufferSize;
+
+ /* Number of pixel pipes. */
+ gctUINT32 pixelPipes;
+
+ /* Number of instructions. */
+ gctUINT32 instructionCount;
+
+ /* Number of constants. */
+ gctUINT32 numConstants;
+
+ /* Buffer size */
+ gctUINT32 bufferSize;
+
+ /* Number of varyings */
+ gctUINT32 varyingsCount;
+
+ /* Supertile layout style in hardware */
+ gctUINT32 superTileMode;
+}
+gcsHAL_QUERY_CHIP_IDENTITY;
+
+/* gcvHAL_COMPOSE. */
+typedef struct _gcsHAL_COMPOSE * gcsHAL_COMPOSE_PTR;
+typedef struct _gcsHAL_COMPOSE
+{
+ /* Composition state buffer. */
+ gctUINT64 physical;
+ gctUINT64 logical;
+ gctUINT offset;
+ gctUINT size;
+
+ /* Composition end signal. */
+ gctUINT64 process;
+ gctUINT64 signal;
+
+ /* User signals. */
+ gctUINT64 userProcess;
+ gctUINT64 userSignal1;
+ gctUINT64 userSignal2;
+
+#if defined(__QNXNTO__)
+ /* Client pulse side-channel connection ID. */
+ gctINT32 coid;
+
+ /* Set by server. */
+ gctINT32 rcvid;
+#endif
+}
+gcsHAL_COMPOSE;
+
+
+typedef struct _gcsHAL_INTERFACE
+{
+ /* Command code. */
+ gceHAL_COMMAND_CODES command;
+
+ /* Hardware type. */
+ gceHARDWARE_TYPE hardwareType;
+
+ /* Status value. */
+ gceSTATUS status;
+
+ /* Handle to this interface channel. */
+ gctUINT64 handle;
+
+ /* Pid of the client. */
+ gctUINT32 pid;
+
+ /* Union of command structures. */
+ union _u
+ {
+ /* gcvHAL_GET_BASE_ADDRESS */
+ struct _gcsHAL_GET_BASE_ADDRESS
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctUINT32 baseAddress;
+ }
+ GetBaseAddress;
+
+ /* gcvHAL_QUERY_VIDEO_MEMORY */
+ struct _gcsHAL_QUERY_VIDEO_MEMORY
+ {
+ /* Physical memory address of internal memory. Just a name. */
+ OUT gctUINT32 internalPhysical;
+
+ /* Size in bytes of internal memory. */
+ OUT gctUINT64 internalSize;
+
+ /* Physical memory address of external memory. Just a name. */
+ OUT gctUINT32 externalPhysical;
+
+ /* Size in bytes of external memory.*/
+ OUT gctUINT64 externalSize;
+
+ /* Physical memory address of contiguous memory. Just a name. */
+ OUT gctUINT32 contiguousPhysical;
+
+ /* Size in bytes of contiguous memory.*/
+ OUT gctUINT64 contiguousSize;
+ }
+ QueryVideoMemory;
+
+ /* gcvHAL_QUERY_CHIP_IDENTITY */
+ gcsHAL_QUERY_CHIP_IDENTITY QueryChipIdentity;
+
+ /* gcvHAL_MAP_MEMORY */
+ struct _gcsHAL_MAP_MEMORY
+ {
+ /* Physical memory address to map. Just a name on Linux/Qnx. */
+ IN gctUINT32 physical;
+
+ /* Number of bytes in physical memory to map. */
+ IN gctUINT64 bytes;
+
+ /* Address of mapped memory. */
+ OUT gctUINT64 logical;
+ }
+ MapMemory;
+
+ /* gcvHAL_UNMAP_MEMORY */
+ struct _gcsHAL_UNMAP_MEMORY
+ {
+ /* Physical memory address to unmap. Just a name on Linux/Qnx. */
+ IN gctUINT32 physical;
+
+ /* Number of bytes in physical memory to unmap. */
+ IN gctUINT64 bytes;
+
+ /* Address of mapped memory to unmap. */
+ IN gctUINT64 logical;
+ }
+ UnmapMemory;
+
+ /* gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_LINEAR_VIDEO_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctUINT bytes;
+
+ /* Buffer alignment. */
+ IN gctUINT alignment;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory in gcuVIDMEM_NODE. */
+ OUT gctUINT64 node;
+ }
+ AllocateLinearVideoMemory;
+
+ /* gcvHAL_ALLOCATE_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_VIDEO_MEMORY
+ {
+ /* Width of rectangle to allocate. */
+ IN OUT gctUINT width;
+
+ /* Height of rectangle to allocate. */
+ IN OUT gctUINT height;
+
+ /* Depth of rectangle to allocate. */
+ IN gctUINT depth;
+
+ /* Format rectangle to allocate in gceSURF_FORMAT. */
+ IN gceSURF_FORMAT format;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory in gcuVIDMEM_NODE. */
+ OUT gctUINT64 node;
+ }
+ AllocateVideoMemory;
+
+ /* gcvHAL_FREE_VIDEO_MEMORY */
+ struct _gcsHAL_FREE_VIDEO_MEMORY
+ {
+ /* Allocated video memory in gcuVIDMEM_NODE. */
+ IN gctUINT64 node;
+
+#ifdef __QNXNTO__
+/* TODO: This is part of the unlock - why is it here? */
+ /* Mapped logical address to unmap in user space. */
+ OUT gctUINT64 memory;
+
+ /* Number of bytes to allocated. */
+ OUT gctUINT64 bytes;
+#endif
+ }
+ FreeVideoMemory;
+
+ /* gcvHAL_LOCK_VIDEO_MEMORY */
+ struct _gcsHAL_LOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory gcuVIDMEM_NODE gcuVIDMEM_NODE. */
+ IN gctUINT64 node;
+
+ /* Cache configuration. */
+ /* Only gcvPOOL_CONTIGUOUS and gcvPOOL_VIRUTAL
+ ** can be configured */
+ IN gctBOOL cacheable;
+
+ /* Hardware specific address. */
+ OUT gctUINT32 address;
+
+ /* Mapped logical address. */
+ OUT gctUINT64 memory;
+ }
+ LockVideoMemory;
+
+ /* gcvHAL_UNLOCK_VIDEO_MEMORY */
+ struct _gcsHAL_UNLOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory in gcuVIDMEM_NODE. */
+ IN gctUINT64 node;
+
+ /* Type of surface. */
+ IN gceSURF_TYPE type;
+
+ /* Flag to unlock surface asynchroneously. */
+ IN OUT gctBOOL asynchroneous;
+ }
+ UnlockVideoMemory;
+
+ /* gcvHAL_ALLOCATE_NON_PAGED_MEMORY */
+ struct _gcsHAL_ALLOCATE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctUINT64 bytes;
+
+ /* Physical address of allocation. Just a name. */
+ OUT gctUINT32 physical;
+
+ /* Logical address of allocation. */
+ OUT gctUINT64 logical;
+ }
+ AllocateNonPagedMemory;
+
+ /* gcvHAL_FREE_NON_PAGED_MEMORY */
+ struct _gcsHAL_FREE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctUINT64 bytes;
+
+ /* Physical address of allocation. Just a name. */
+ IN gctUINT32 physical;
+
+ /* Logical address of allocation. */
+ IN gctUINT64 logical;
+ }
+ FreeNonPagedMemory;
+
+ /* gcvHAL_ALLOCATE_NON_PAGED_MEMORY */
+ struct _gcsHAL_ALLOCATE_VIRTUAL_COMMAND_BUFFER
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctUINT64 bytes;
+
+ /* Physical address of allocation. Just a name. */
+ OUT gctUINT32 physical;
+
+ /* Logical address of allocation. */
+ OUT gctUINT64 logical;
+ }
+ AllocateVirtualCommandBuffer;
+
+ /* gcvHAL_FREE_NON_PAGED_MEMORY */
+ struct _gcsHAL_FREE_VIRTUAL_COMMAND_BUFFER
+ {
+ /* Number of bytes allocated. */
+ IN gctUINT64 bytes;
+
+ /* Physical address of allocation. Just a name. */
+ IN gctUINT32 physical;
+
+ /* Logical address of allocation. */
+ IN gctUINT64 logical;
+ }
+ FreeVirtualCommandBuffer;
+
+ /* gcvHAL_EVENT_COMMIT. */
+ struct _gcsHAL_EVENT_COMMIT
+ {
+ /* Event queue in gcsQUEUE. */
+ IN gctUINT64 queue;
+ }
+ Event;
+
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_COMMIT
+ {
+ /* Context buffer object gckCONTEXT. */
+ IN gctUINT64 context;
+
+ /* Command buffer gcoCMDBUF. */
+ IN gctUINT64 commandBuffer;
+
+ /* State delta buffer in gcsSTATE_DELTA. */
+ gctUINT64 delta;
+
+ /* Event queue in gcsQUEUE. */
+ IN gctUINT64 queue;
+ }
+ Commit;
+
+ /* gcvHAL_MAP_USER_MEMORY */
+ struct _gcsHAL_MAP_USER_MEMORY
+ {
+ /* Base address of user memory to map. */
+ IN gctUINT64 memory;
+
+ /* Physical address of user memory to map. */
+ IN gctUINT32 physical;
+
+ /* Size of user memory in bytes to map. */
+ IN gctUINT64 size;
+
+ /* Info record required by gcvHAL_UNMAP_USER_MEMORY. Just a name. */
+ OUT gctUINT32 info;
+
+ /* Physical address of mapped memory. */
+ OUT gctUINT32 address;
+ }
+ MapUserMemory;
+
+ /* gcvHAL_UNMAP_USER_MEMORY */
+ struct _gcsHAL_UNMAP_USER_MEMORY
+ {
+ /* Base address of user memory to unmap. */
+ IN gctUINT64 memory;
+
+ /* Size of user memory in bytes to unmap. */
+ IN gctUINT64 size;
+
+ /* Info record returned by gcvHAL_MAP_USER_MEMORY. Just a name. */
+ IN gctUINT32 info;
+
+ /* Physical address of mapped memory as returned by
+ gcvHAL_MAP_USER_MEMORY. */
+ IN gctUINT32 address;
+ }
+ UnmapUserMemory;
+#if !USE_NEW_LINUX_SIGNAL
+ /* gcsHAL_USER_SIGNAL */
+ struct _gcsHAL_USER_SIGNAL
+ {
+ /* Command. */
+ gceUSER_SIGNAL_COMMAND_CODES command;
+
+ /* Signal ID. */
+ IN OUT gctINT id;
+
+ /* Reset mode. */
+ IN gctBOOL manualReset;
+
+ /* Wait timedout. */
+ IN gctUINT32 wait;
+
+ /* State. */
+ IN gctBOOL state;
+ }
+ UserSignal;
+#endif
+
+ /* gcvHAL_SIGNAL. */
+ struct _gcsHAL_SIGNAL
+ {
+ /* Signal handle to signal gctSIGNAL. */
+ IN gctUINT64 signal;
+
+ /* Reserved gctSIGNAL. */
+ IN gctUINT64 auxSignal;
+
+ /* Process owning the signal gctHANDLE. */
+ IN gctUINT64 process;
+
+#if defined(__QNXNTO__)
+ /* Client pulse side-channel connection ID. Set by client in gcoOS_CreateSignal. */
+ IN gctINT32 coid;
+
+ /* Set by server. */
+ IN gctINT32 rcvid;
+#endif
+ /* Event generated from where of pipeline */
+ IN gceKERNEL_WHERE fromWhere;
+ }
+ Signal;
+
+ /* gcvHAL_WRITE_DATA. */
+ struct _gcsHAL_WRITE_DATA
+ {
+ /* Address to write data to. */
+ IN gctUINT32 address;
+
+ /* Data to write. */
+ IN gctUINT32 data;
+ }
+ WriteData;
+
+ /* gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_ALLOCATE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctUINT64 bytes;
+
+ /* Hardware address of allocation. */
+ OUT gctUINT32 address;
+
+ /* Physical address of allocation. Just a name. */
+ OUT gctUINT32 physical;
+
+ /* Logical address of allocation. */
+ OUT gctUINT64 logical;
+ }
+ AllocateContiguousMemory;
+
+ /* gcvHAL_FREE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_FREE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctUINT64 bytes;
+
+ /* Physical address of allocation. Just a name. */
+ IN gctUINT32 physical;
+
+ /* Logical address of allocation. */
+ IN gctUINT64 logical;
+ }
+ FreeContiguousMemory;
+
+ /* gcvHAL_READ_REGISTER */
+ struct _gcsHAL_READ_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ OUT gctUINT32 data;
+ }
+ ReadRegisterData;
+
+ /* gcvHAL_WRITE_REGISTER */
+ struct _gcsHAL_WRITE_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ IN gctUINT32 data;
+ }
+ WriteRegisterData;
+
+#if VIVANTE_PROFILER
+ /* gcvHAL_GET_PROFILE_SETTING */
+ struct _gcsHAL_GET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ OUT gctBOOL enable;
+
+ /* The profile file name */
+ OUT gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ GetProfileSetting;
+
+ /* gcvHAL_SET_PROFILE_SETTING */
+ struct _gcsHAL_SET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ IN gctBOOL enable;
+
+ /* The profile file name */
+ IN gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ SetProfileSetting;
+
+#if VIVANTE_PROFILER_PERDRAW
+ /* gcvHAL_READ_PROFILER_REGISTER_SETTING */
+ struct _gcsHAL_READ_PROFILER_REGISTER_SETTING
+ {
+ /*Should Clear Register*/
+ IN gctBOOL bclear;
+ }
+ SetProfilerRegisterClear;
+#endif
+
+ /* gcvHAL_READ_ALL_PROFILE_REGISTERS */
+ struct _gcsHAL_READ_ALL_PROFILE_REGISTERS
+ {
+ /* Data read. */
+ OUT gcsPROFILER_COUNTERS counters;
+ }
+ RegisterProfileData;
+
+ /* gcvHAL_PROFILE_REGISTERS_2D */
+ struct _gcsHAL_PROFILE_REGISTERS_2D
+ {
+ /* Data read in gcs2D_PROFILE. */
+ OUT gctUINT64 hwProfile2D;
+ }
+ RegisterProfileData2D;
+#endif
+ /* Power management. */
+ /* gcvHAL_SET_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_SET_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ IN gceCHIPPOWERSTATE state;
+ }
+ SetPowerManagement;
+
+ /* gcvHAL_QUERY_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_QUERY_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ OUT gceCHIPPOWERSTATE state;
+
+ /* Idle query. */
+ OUT gctBOOL isIdle;
+ }
+ QueryPowerManagement;
+
+ /* gcvHAL_QUERY_KERNEL_SETTINGS */
+ struct _gcsHAL_QUERY_KERNEL_SETTINGS
+ {
+ /* Settings.*/
+ OUT gcsKERNEL_SETTINGS settings;
+ }
+ QueryKernelSettings;
+
+ /* gcvHAL_MAP_PHYSICAL */
+ struct _gcsHAL_MAP_PHYSICAL
+ {
+ /* gcvTRUE to map, gcvFALSE to unmap. */
+ IN gctBOOL map;
+
+ /* Physical address. */
+ IN OUT gctUINT64 physical;
+ }
+ MapPhysical;
+
+ /* gcvHAL_DEBUG */
+ struct _gcsHAL_DEBUG
+ {
+ /* If gcvTRUE, set the debug information. */
+ IN gctBOOL set;
+ IN gctUINT32 level;
+ IN gctUINT32 zones;
+ IN gctBOOL enable;
+
+ IN gceDEBUG_MESSAGE_TYPE type;
+ IN gctUINT32 messageSize;
+
+ /* Message to print if not empty. */
+ IN gctCHAR message[80];
+ }
+ Debug;
+
+ /* gcvHAL_CACHE */
+ struct _gcsHAL_CACHE
+ {
+ IN gceCACHEOPERATION operation;
+ /* gctHANDLE */
+ IN gctUINT64 process;
+ IN gctUINT64 logical;
+ IN gctUINT64 bytes;
+ /* gcuVIDMEM_NODE_PTR */
+ IN gctUINT64 node;
+ }
+ Cache;
+
+ /* gcvHAL_TIMESTAMP */
+ struct _gcsHAL_TIMESTAMP
+ {
+ /* Timer select. */
+ IN gctUINT32 timer;
+
+ /* Timer request type (0-stop, 1-start, 2-send delta). */
+ IN gctUINT32 request;
+
+ /* Result of delta time in microseconds. */
+ OUT gctINT32 timeDelta;
+ }
+ TimeStamp;
+
+ /* gcvHAL_DATABASE */
+ struct _gcsHAL_DATABASE
+ {
+ /* Set to gcvTRUE if you want to query a particular process ID.
+ ** Set to gcvFALSE to query the last detached process. */
+ IN gctBOOL validProcessID;
+
+ /* Process ID to query. */
+ IN gctUINT32 processID;
+
+ /* Information. */
+ OUT gcuDATABASE_INFO vidMem;
+ OUT gcuDATABASE_INFO nonPaged;
+ OUT gcuDATABASE_INFO contiguous;
+ OUT gcuDATABASE_INFO gpuIdle;
+ }
+ Database;
+
+ /* gcvHAL_VERSION */
+ struct _gcsHAL_VERSION
+ {
+ /* Major version: N.n.n. */
+ OUT gctINT32 major;
+
+ /* Minor version: n.N.n. */
+ OUT gctINT32 minor;
+
+ /* Patch version: n.n.N. */
+ OUT gctINT32 patch;
+
+ /* Build version. */
+ OUT gctUINT32 build;
+ }
+ Version;
+
+ /* gcvHAL_CHIP_INFO */
+ struct _gcsHAL_CHIP_INFO
+ {
+ /* Chip count. */
+ OUT gctINT32 count;
+
+ /* Chip types. */
+ OUT gceHARDWARE_TYPE types[gcdCHIP_COUNT];
+ }
+ ChipInfo;
+
+ /* gcvHAL_ATTACH */
+ struct _gcsHAL_ATTACH
+ {
+ /* Context buffer object gckCONTEXT. Just a name. */
+ OUT gctUINT32 context;
+
+ /* Number of states in the buffer. */
+ OUT gctUINT64 stateCount;
+ }
+ Attach;
+
+ /* gcvHAL_DETACH */
+ struct _gcsHAL_DETACH
+ {
+ /* Context buffer object gckCONTEXT. Just a name. */
+ IN gctUINT32 context;
+ }
+ Detach;
+
+ /* gcvHAL_COMPOSE. */
+ gcsHAL_COMPOSE Compose;
+
+ /* gcvHAL_GET_FRAME_INFO. */
+ struct _gcsHAL_GET_FRAME_INFO
+ {
+ /* gcsHAL_FRAME_INFO* */
+ OUT gctUINT64 frameInfo;
+ }
+ GetFrameInfo;
+
+ /* gcvHAL_SET_TIME_OUT. */
+ struct _gcsHAL_SET_TIMEOUT
+ {
+ gctUINT32 timeOut;
+ }
+ SetTimeOut;
+
+#if gcdENABLE_VG
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_VGCOMMIT
+ {
+ /* Context buffer in gcsVGCONTEXT. */
+ IN gctUINT64 context;
+
+ /* Command queue in gcsVGCMDQUEUE. */
+ IN gctUINT64 queue;
+
+ /* Number of entries in the queue. */
+ IN gctUINT entryCount;
+
+ /* Task table in gcsTASK_MASTER_TABLE. */
+ IN gctUINT64 taskTable;
+ }
+ VGCommit;
+
+ /* gcvHAL_QUERY_COMMAND_BUFFER */
+ struct _gcsHAL_QUERY_COMMAND_BUFFER
+ {
+ /* Command buffer attributes. */
+ OUT gcsCOMMAND_BUFFER_INFO information;
+ }
+ QueryCommandBuffer;
+
+#endif
+
+ struct _gcsHAL_GET_SHARED_INFO
+ {
+ /* Process id. */
+ IN gctUINT32 pid;
+
+ /* Data id. */
+ IN gctUINT32 dataId;
+
+ /* Data size. */
+ IN gctSIZE_T bytes;
+
+ /* Pointer to save the shared data. */
+ OUT gctPOINTER data;
+ }
+ GetSharedInfo;
+
+ struct _gcsHAL_SET_SHARED_INFO
+ {
+ /* Data id. */
+ IN gctUINT32 dataId;
+
+ /* Data to be shared. */
+ IN gctPOINTER data;
+
+ /* Data size. */
+ IN gctSIZE_T bytes;
+ }
+ SetSharedInfo;
+
+ struct _gcsHAL_SET_FSCALE_VALUE
+ {
+ IN gctUINT value;
+ }
+ SetFscaleValue;
+
+ struct _gcsHAL_GET_FSCALE_VALUE
+ {
+ OUT gctUINT value;
+ OUT gctUINT minValue;
+ OUT gctUINT maxValue;
+ }
+ GetFscaleValue;
+
+ struct _gcsHAL_QUERY_RESET_TIME_STAMP
+ {
+ OUT gctUINT64 timeStamp;
+ }
+ QueryResetTimeStamp;
+ }
+ u;
+}
+gcsHAL_INTERFACE;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_driver_h_ */
diff --git a/src/include_imx6_v4_1_0/gc_hal_dump.h b/src/include_imx6_v4_1_0/gc_hal_dump.h
new file mode 100644
index 0000000..ffd45e8
--- /dev/null
+++ b/src/include_imx6_v4_1_0/gc_hal_dump.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_dump_h_
+#define __gc_hal_dump_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** FILE LAYOUT:
+**
+** gcsDUMP_FILE structure
+**
+** gcsDUMP_DATA frame
+** gcsDUMP_DATA or gcDUMP_DATA_SIZE records rendingring the frame
+** gctUINT8 data[length]
+*/
+
+#define gcvDUMP_FILE_SIGNATURE gcmCC('g','c','D','B')
+
+typedef struct _gcsDUMP_FILE
+{
+ gctUINT32 signature; /* File signature */
+ gctSIZE_T length; /* Length of file */
+ gctUINT32 frames; /* Number of frames in file */
+}
+gcsDUMP_FILE;
+
+typedef enum _gceDUMP_TAG
+{
+ gcvTAG_SURFACE = gcmCC('s','u','r','f'),
+ gcvTAG_FRAME = gcmCC('f','r','m',' '),
+ gcvTAG_COMMAND = gcmCC('c','m','d',' '),
+ gcvTAG_INDEX = gcmCC('i','n','d','x'),
+ gcvTAG_STREAM = gcmCC('s','t','r','m'),
+ gcvTAG_TEXTURE = gcmCC('t','e','x','t'),
+ gcvTAG_RENDER_TARGET = gcmCC('r','n','d','r'),
+ gcvTAG_DEPTH = gcmCC('z','b','u','f'),
+ gcvTAG_RESOLVE = gcmCC('r','s','l','v'),
+ gcvTAG_DELETE = gcmCC('d','e','l',' '),
+}
+gceDUMP_TAG;
+
+typedef struct _gcsDUMP_SURFACE
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctUINT32 address; /* Address of the surface. */
+ gctINT16 width; /* Width of surface. */
+ gctINT16 height; /* Height of surface. */
+ gceSURF_FORMAT format; /* Surface pixel format. */
+ gctSIZE_T length; /* Number of bytes inside the surface. */
+}
+gcsDUMP_SURFACE;
+
+typedef struct _gcsDUMP_DATA
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctSIZE_T length; /* Number of bytes of data. */
+ gctUINT32 address; /* Address for the data. */
+}
+gcsDUMP_DATA;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_dump_h_ */
+
diff --git a/src/include_imx6_v4_1_0/gc_hal_enum.h b/src/include_imx6_v4_1_0/gc_hal_enum.h
new file mode 100644
index 0000000..a1d9ae5
--- /dev/null
+++ b/src/include_imx6_v4_1_0/gc_hal_enum.h
@@ -0,0 +1,879 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_enum_h_
+#define __gc_hal_enum_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Chip models. */
+typedef enum _gceCHIPMODEL
+{
+ gcv300 = 0x0300,
+ gcv320 = 0x0320,
+ gcv350 = 0x0350,
+ gcv355 = 0x0355,
+ gcv400 = 0x0400,
+ gcv410 = 0x0410,
+ gcv420 = 0x0420,
+ gcv450 = 0x0450,
+ gcv500 = 0x0500,
+ gcv530 = 0x0530,
+ gcv600 = 0x0600,
+ gcv700 = 0x0700,
+ gcv800 = 0x0800,
+ gcv860 = 0x0860,
+ gcv880 = 0x0880,
+ gcv1000 = 0x1000,
+ gcv2000 = 0x2000,
+ gcv2100 = 0x2100,
+ gcv4000 = 0x4000,
+}
+gceCHIPMODEL;
+
+/* Chip features. */
+typedef enum _gceFEATURE
+{
+ gcvFEATURE_PIPE_2D = 0,
+ gcvFEATURE_PIPE_3D,
+ gcvFEATURE_PIPE_VG,
+ gcvFEATURE_DC,
+ gcvFEATURE_HIGH_DYNAMIC_RANGE,
+ gcvFEATURE_MODULE_CG,
+ gcvFEATURE_MIN_AREA,
+ gcvFEATURE_BUFFER_INTERLEAVING,
+ gcvFEATURE_BYTE_WRITE_2D,
+ gcvFEATURE_ENDIANNESS_CONFIG,
+ gcvFEATURE_DUAL_RETURN_BUS,
+ gcvFEATURE_DEBUG_MODE,
+ gcvFEATURE_YUY2_RENDER_TARGET,
+ gcvFEATURE_FRAGMENT_PROCESSOR,
+ gcvFEATURE_2DPE20,
+ gcvFEATURE_FAST_CLEAR,
+ gcvFEATURE_YUV420_TILER,
+ gcvFEATURE_YUY2_AVERAGING,
+ gcvFEATURE_FLIP_Y,
+ gcvFEATURE_EARLY_Z,
+ gcvFEATURE_Z_COMPRESSION,
+ gcvFEATURE_MSAA,
+ gcvFEATURE_SPECIAL_ANTI_ALIASING,
+ gcvFEATURE_SPECIAL_MSAA_LOD,
+ gcvFEATURE_422_TEXTURE_COMPRESSION,
+ gcvFEATURE_DXT_TEXTURE_COMPRESSION,
+ gcvFEATURE_ETC1_TEXTURE_COMPRESSION,
+ gcvFEATURE_CORRECT_TEXTURE_CONVERTER,
+ gcvFEATURE_TEXTURE_8K,
+ gcvFEATURE_SCALER,
+ gcvFEATURE_YUV420_SCALER,
+ gcvFEATURE_SHADER_HAS_W,
+ gcvFEATURE_SHADER_HAS_SIGN,
+ gcvFEATURE_SHADER_HAS_FLOOR,
+ gcvFEATURE_SHADER_HAS_CEIL,
+ gcvFEATURE_SHADER_HAS_SQRT,
+ gcvFEATURE_SHADER_HAS_TRIG,
+ gcvFEATURE_VAA,
+ gcvFEATURE_HZ,
+ gcvFEATURE_CORRECT_STENCIL,
+ gcvFEATURE_VG20,
+ gcvFEATURE_VG_FILTER,
+ gcvFEATURE_VG21,
+ gcvFEATURE_VG_DOUBLE_BUFFER,
+ gcvFEATURE_MC20,
+ gcvFEATURE_SUPER_TILED,
+ gcvFEATURE_2D_FILTERBLIT_PLUS_ALPHABLEND,
+ gcvFEATURE_2D_DITHER,
+ gcvFEATURE_2D_A8_TARGET,
+ gcvFEATURE_2D_FILTERBLIT_FULLROTATION,
+ gcvFEATURE_2D_BITBLIT_FULLROTATION,
+ gcvFEATURE_WIDE_LINE,
+ gcvFEATURE_FC_FLUSH_STALL,
+ gcvFEATURE_FULL_DIRECTFB,
+ gcvFEATURE_HALF_FLOAT_PIPE,
+ gcvFEATURE_LINE_LOOP,
+ gcvFEATURE_2D_YUV_BLIT,
+ gcvFEATURE_2D_TILING,
+ gcvFEATURE_NON_POWER_OF_TWO,
+ gcvFEATURE_3D_TEXTURE,
+ gcvFEATURE_TEXTURE_ARRAY,
+ gcvFEATURE_TILE_FILLER,
+ gcvFEATURE_LOGIC_OP,
+ gcvFEATURE_COMPOSITION,
+ gcvFEATURE_MIXED_STREAMS,
+ gcvFEATURE_2D_MULTI_SOURCE_BLT,
+ gcvFEATURE_END_EVENT,
+ gcvFEATURE_VERTEX_10_10_10_2,
+ gcvFEATURE_TEXTURE_10_10_10_2,
+ gcvFEATURE_TEXTURE_ANISOTROPIC_FILTERING,
+ gcvFEATURE_TEXTURE_FLOAT_HALF_FLOAT,
+ gcvFEATURE_2D_ROTATION_STALL_FIX,
+ gcvFEATURE_2D_MULTI_SOURCE_BLT_EX,
+ gcvFEATURE_BUG_FIXES10,
+ gcvFEATURE_2D_MINOR_TILING,
+ /* Supertiled compressed textures are supported. */
+ gcvFEATURE_TEX_COMPRRESSION_SUPERTILED,
+ gcvFEATURE_FAST_MSAA,
+ gcvFEATURE_BUG_FIXED_INDEXED_TRIANGLE_STRIP,
+ gcvFEATURE_TEXTURE_TILED_READ,
+ gcvFEATURE_DEPTH_BIAS_FIX,
+ gcvFEATURE_RECT_PRIMITIVE,
+ gcvFEATURE_BUG_FIXES11,
+ gcvFEATURE_SUPERTILED_TEXTURE,
+ gcvFEATURE_2D_NO_COLORBRUSH_INDEX8,
+ gcvFEATURE_RS_YUV_TARGET,
+ gcvFEATURE_2D_FC_SOURCE,
+ gcvFEATURE_PE_DITHER_FIX,
+ gcvFEATURE_2D_YUV_SEPARATE_STRIDE,
+ gcvFEATURE_FRUSTUM_CLIP_FIX,
+ gcvFEATURE_TEXTURE_LINEAR,
+ gcvFEATURE_TEXTURE_YUV_ASSEMBLER,
+ gcvFEATURE_DYNAMIC_FREQUENCY_SCALING,
+ gcvFEATURE_BUGFIX15,
+ gcvFEATURE_2D_MIRROR_EXTENSION,
+ gcvFEATURE_ELEMENT_INDEX_UINT,
+}
+gceFEATURE;
+
+/* Chip Power Status. */
+typedef enum _gceCHIPPOWERSTATE
+{
+ gcvPOWER_ON = 0,
+ gcvPOWER_OFF,
+ gcvPOWER_IDLE,
+ gcvPOWER_SUSPEND,
+ gcvPOWER_SUSPEND_ATPOWERON,
+ gcvPOWER_OFF_ATPOWERON,
+ gcvPOWER_IDLE_BROADCAST,
+ gcvPOWER_SUSPEND_BROADCAST,
+ gcvPOWER_OFF_BROADCAST,
+ gcvPOWER_OFF_RECOVERY,
+ gcvPOWER_OFF_TIMEOUT,
+ gcvPOWER_ON_AUTO
+}
+gceCHIPPOWERSTATE;
+
+/* CPU cache operations */
+typedef enum _gceCACHEOPERATION
+{
+ gcvCACHE_CLEAN = 0x01,
+ gcvCACHE_INVALIDATE = 0x02,
+ gcvCACHE_FLUSH = gcvCACHE_CLEAN | gcvCACHE_INVALIDATE,
+ gcvCACHE_MEMORY_BARRIER = 0x04
+}
+gceCACHEOPERATION;
+
+/* Surface types. */
+typedef enum _gceSURF_TYPE
+{
+ gcvSURF_TYPE_UNKNOWN = 0,
+ gcvSURF_INDEX,
+ gcvSURF_VERTEX,
+ gcvSURF_TEXTURE,
+ gcvSURF_RENDER_TARGET,
+ gcvSURF_DEPTH,
+ gcvSURF_BITMAP,
+ gcvSURF_TILE_STATUS,
+ gcvSURF_IMAGE,
+ gcvSURF_MASK,
+ gcvSURF_SCISSOR,
+ gcvSURF_HIERARCHICAL_DEPTH,
+ gcvSURF_NUM_TYPES, /* Make sure this is the last one! */
+
+ /* Combinations. */
+ gcvSURF_NO_TILE_STATUS = 0x100,
+ gcvSURF_NO_VIDMEM = 0x200, /* Used to allocate surfaces with no underlying vidmem node.
+ In Android, vidmem node is allocated by another process. */
+ gcvSURF_CACHEABLE = 0x400, /* Used to allocate a cacheable surface */
+#if gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST
+ gcvSURF_FLIP = 0x800, /* The Resolve Target the will been flip resolve from RT */
+#endif
+ gcvSURF_TILE_STATUS_DIRTY = 0x1000, /* Init tile status to all dirty */
+
+ gcvSURF_RENDER_TARGET_NO_TILE_STATUS = gcvSURF_RENDER_TARGET
+ | gcvSURF_NO_TILE_STATUS,
+
+ gcvSURF_RENDER_TARGET_TS_DIRTY = gcvSURF_RENDER_TARGET
+ | gcvSURF_TILE_STATUS_DIRTY,
+
+ gcvSURF_DEPTH_NO_TILE_STATUS = gcvSURF_DEPTH
+ | gcvSURF_NO_TILE_STATUS,
+
+ /* Supported surface types with no vidmem node. */
+ gcvSURF_BITMAP_NO_VIDMEM = gcvSURF_BITMAP
+ | gcvSURF_NO_VIDMEM,
+
+ gcvSURF_TEXTURE_NO_VIDMEM = gcvSURF_TEXTURE
+ | gcvSURF_NO_VIDMEM,
+
+ /* Cacheable surface types with no vidmem node. */
+ gcvSURF_CACHEABLE_BITMAP_NO_VIDMEM = gcvSURF_BITMAP_NO_VIDMEM
+ | gcvSURF_CACHEABLE,
+
+ gcvSURF_CACHEABLE_BITMAP = gcvSURF_BITMAP
+ | gcvSURF_CACHEABLE,
+
+#if gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST
+ gcvSURF_FLIP_BITMAP = gcvSURF_BITMAP
+ | gcvSURF_FLIP,
+#endif
+}
+gceSURF_TYPE;
+
+typedef enum _gceSURF_USAGE
+{
+ gcvSURF_USAGE_UNKNOWN,
+ gcvSURF_USAGE_RESOLVE_AFTER_CPU,
+ gcvSURF_USAGE_RESOLVE_AFTER_3D
+}
+gceSURF_USAGE;
+
+typedef enum _gceSURF_COLOR_TYPE
+{
+ gcvSURF_COLOR_UNKNOWN = 0,
+ gcvSURF_COLOR_LINEAR = 0x01,
+ gcvSURF_COLOR_ALPHA_PRE = 0x02,
+}
+gceSURF_COLOR_TYPE;
+
+/* Rotation. */
+typedef enum _gceSURF_ROTATION
+{
+ gcvSURF_0_DEGREE = 0,
+ gcvSURF_90_DEGREE,
+ gcvSURF_180_DEGREE,
+ gcvSURF_270_DEGREE,
+ gcvSURF_FLIP_X,
+ gcvSURF_FLIP_Y,
+}
+gceSURF_ROTATION;
+
+typedef enum _gceMIPMAP_IMAGE_FORMAT
+{
+ gcvUNKNOWN_MIPMAP_IMAGE_FORMAT = -2
+}
+gceMIPMAP_IMAGE_FORMAT;
+
+
+/* Surface formats. */
+typedef enum _gceSURF_FORMAT
+{
+ /* Unknown format. */
+ gcvSURF_UNKNOWN = 0,
+
+ /* Palettized formats. */
+ gcvSURF_INDEX1 = 100,
+ gcvSURF_INDEX4,
+ gcvSURF_INDEX8,
+
+ /* RGB formats. */
+ gcvSURF_A2R2G2B2 = 200,
+ gcvSURF_R3G3B2,
+ gcvSURF_A8R3G3B2,
+ gcvSURF_X4R4G4B4,
+ gcvSURF_A4R4G4B4,
+ gcvSURF_R4G4B4A4,
+ gcvSURF_X1R5G5B5,
+ gcvSURF_A1R5G5B5,
+ gcvSURF_R5G5B5A1,
+ gcvSURF_R5G6B5,
+ gcvSURF_R8G8B8,
+ gcvSURF_X8R8G8B8,
+ gcvSURF_A8R8G8B8,
+ gcvSURF_R8G8B8A8,
+ gcvSURF_G8R8G8B8,
+ gcvSURF_R8G8B8G8,
+ gcvSURF_X2R10G10B10,
+ gcvSURF_A2R10G10B10,
+ gcvSURF_X12R12G12B12,
+ gcvSURF_A12R12G12B12,
+ gcvSURF_X16R16G16B16,
+ gcvSURF_A16R16G16B16,
+ gcvSURF_A32R32G32B32,
+ gcvSURF_R8G8B8X8,
+ gcvSURF_R5G5B5X1,
+ gcvSURF_R4G4B4X4,
+
+ /* BGR formats. */
+ gcvSURF_A4B4G4R4 = 300,
+ gcvSURF_A1B5G5R5,
+ gcvSURF_B5G6R5,
+ gcvSURF_B8G8R8,
+ gcvSURF_B16G16R16,
+ gcvSURF_X8B8G8R8,
+ gcvSURF_A8B8G8R8,
+ gcvSURF_A2B10G10R10,
+ gcvSURF_X16B16G16R16,
+ gcvSURF_A16B16G16R16,
+ gcvSURF_B32G32R32,
+ gcvSURF_X32B32G32R32,
+ gcvSURF_A32B32G32R32,
+ gcvSURF_B4G4R4A4,
+ gcvSURF_B5G5R5A1,
+ gcvSURF_B8G8R8X8,
+ gcvSURF_B8G8R8A8,
+ gcvSURF_X4B4G4R4,
+ gcvSURF_X1B5G5R5,
+ gcvSURF_B4G4R4X4,
+ gcvSURF_B5G5R5X1,
+ gcvSURF_X2B10G10R10,
+
+ /* Compressed formats. */
+ gcvSURF_DXT1 = 400,
+ gcvSURF_DXT2,
+ gcvSURF_DXT3,
+ gcvSURF_DXT4,
+ gcvSURF_DXT5,
+ gcvSURF_CXV8U8,
+ gcvSURF_ETC1,
+ gcvSURF_R11_EAC,
+ gcvSURF_SIGNED_R11_EAC,
+ gcvSURF_RG11_EAC,
+ gcvSURF_SIGNED_RG11_EAC,
+ gcvSURF_RGB8_ETC2,
+ gcvSURF_SRGB8_ETC2,
+ gcvSURF_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
+ gcvSURF_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
+ gcvSURF_RGBA8_ETC2_EAC,
+ gcvSURF_SRGB8_ALPHA8_ETC2_EAC,
+
+ /* YUV formats. */
+ gcvSURF_YUY2 = 500,
+ gcvSURF_UYVY,
+ gcvSURF_YV12,
+ gcvSURF_I420,
+ gcvSURF_NV12,
+ gcvSURF_NV21,
+ gcvSURF_NV16,
+ gcvSURF_NV61,
+ gcvSURF_YVYU,
+ gcvSURF_VYUY,
+
+ /* Depth formats. */
+ gcvSURF_D16 = 600,
+ gcvSURF_D24S8,
+ gcvSURF_D32,
+ gcvSURF_D24X8,
+
+ /* Alpha formats. */
+ gcvSURF_A4 = 700,
+ gcvSURF_A8,
+ gcvSURF_A12,
+ gcvSURF_A16,
+ gcvSURF_A32,
+ gcvSURF_A1,
+
+ /* Luminance formats. */
+ gcvSURF_L4 = 800,
+ gcvSURF_L8,
+ gcvSURF_L12,
+ gcvSURF_L16,
+ gcvSURF_L32,
+ gcvSURF_L1,
+
+ /* Alpha/Luminance formats. */
+ gcvSURF_A4L4 = 900,
+ gcvSURF_A2L6,
+ gcvSURF_A8L8,
+ gcvSURF_A4L12,
+ gcvSURF_A12L12,
+ gcvSURF_A16L16,
+
+ /* Bump formats. */
+ gcvSURF_L6V5U5 = 1000,
+ gcvSURF_V8U8,
+ gcvSURF_X8L8V8U8,
+ gcvSURF_Q8W8V8U8,
+ gcvSURF_A2W10V10U10,
+ gcvSURF_V16U16,
+ gcvSURF_Q16W16V16U16,
+
+ /* R/RG/RA formats. */
+ gcvSURF_R8 = 1100,
+ gcvSURF_X8R8,
+ gcvSURF_G8R8,
+ gcvSURF_X8G8R8,
+ gcvSURF_A8R8,
+ gcvSURF_R16,
+ gcvSURF_X16R16,
+ gcvSURF_G16R16,
+ gcvSURF_X16G16R16,
+ gcvSURF_A16R16,
+ gcvSURF_R32,
+ gcvSURF_X32R32,
+ gcvSURF_G32R32,
+ gcvSURF_X32G32R32,
+ gcvSURF_A32R32,
+ gcvSURF_RG16,
+
+ /* Floating point formats. */
+ gcvSURF_R16F = 1200,
+ gcvSURF_X16R16F,
+ gcvSURF_G16R16F,
+ gcvSURF_X16G16R16F,
+ gcvSURF_B16G16R16F,
+ gcvSURF_X16B16G16R16F,
+ gcvSURF_A16B16G16R16F,
+ gcvSURF_R32F,
+ gcvSURF_X32R32F,
+ gcvSURF_G32R32F,
+ gcvSURF_X32G32R32F,
+ gcvSURF_B32G32R32F,
+ gcvSURF_X32B32G32R32F,
+ gcvSURF_A32B32G32R32F,
+ gcvSURF_A16F,
+ gcvSURF_L16F,
+ gcvSURF_A16L16F,
+ gcvSURF_A16R16F,
+ gcvSURF_A32F,
+ gcvSURF_L32F,
+ gcvSURF_A32L32F,
+ gcvSURF_A32R32F,
+
+}
+gceSURF_FORMAT;
+
+/* Pixel swizzle modes. */
+typedef enum _gceSURF_SWIZZLE
+{
+ gcvSURF_NOSWIZZLE = 0,
+ gcvSURF_ARGB,
+ gcvSURF_ABGR,
+ gcvSURF_RGBA,
+ gcvSURF_BGRA
+}
+gceSURF_SWIZZLE;
+
+/* Transparency modes. */
+typedef enum _gceSURF_TRANSPARENCY
+{
+ /* Valid only for PE 1.0 */
+ gcvSURF_OPAQUE = 0,
+ gcvSURF_SOURCE_MATCH,
+ gcvSURF_SOURCE_MASK,
+ gcvSURF_PATTERN_MASK,
+}
+gceSURF_TRANSPARENCY;
+
+/* Surface Alignment. */
+typedef enum _gceSURF_ALIGNMENT
+{
+ gcvSURF_FOUR = 0,
+ gcvSURF_SIXTEEN,
+ gcvSURF_SUPER_TILED,
+ gcvSURF_SPLIT_TILED,
+ gcvSURF_SPLIT_SUPER_TILED,
+}
+gceSURF_ALIGNMENT;
+
+
+/* Surface Addressing. */
+typedef enum _gceSURF_ADDRESSING
+{
+ gcvSURF_NO_STRIDE_TILED = 0,
+ gcvSURF_NO_STRIDE_LINEAR,
+ gcvSURF_STRIDE_TILED,
+ gcvSURF_STRIDE_LINEAR
+}
+gceSURF_ADDRESSING;
+
+/* Transparency modes. */
+typedef enum _gce2D_TRANSPARENCY
+{
+ /* Valid only for PE 2.0 */
+ gcv2D_OPAQUE = 0,
+ gcv2D_KEYED,
+ gcv2D_MASKED
+}
+gce2D_TRANSPARENCY;
+
+/* Mono packing modes. */
+typedef enum _gceSURF_MONOPACK
+{
+ gcvSURF_PACKED8 = 0,
+ gcvSURF_PACKED16,
+ gcvSURF_PACKED32,
+ gcvSURF_UNPACKED,
+}
+gceSURF_MONOPACK;
+
+/* Blending modes. */
+typedef enum _gceSURF_BLEND_MODE
+{
+ /* Porter-Duff blending modes. */
+ /* Fsrc Fdst */
+ gcvBLEND_CLEAR = 0, /* 0 0 */
+ gcvBLEND_SRC, /* 1 0 */
+ gcvBLEND_DST, /* 0 1 */
+ gcvBLEND_SRC_OVER_DST, /* 1 1 - Asrc */
+ gcvBLEND_DST_OVER_SRC, /* 1 - Adst 1 */
+ gcvBLEND_SRC_IN_DST, /* Adst 0 */
+ gcvBLEND_DST_IN_SRC, /* 0 Asrc */
+ gcvBLEND_SRC_OUT_DST, /* 1 - Adst 0 */
+ gcvBLEND_DST_OUT_SRC, /* 0 1 - Asrc */
+ gcvBLEND_SRC_ATOP_DST, /* Adst 1 - Asrc */
+ gcvBLEND_DST_ATOP_SRC, /* 1 - Adst Asrc */
+ gcvBLEND_SRC_XOR_DST, /* 1 - Adst 1 - Asrc */
+
+ /* Special blending modes. */
+ gcvBLEND_SET, /* DST = 1 */
+ gcvBLEND_SUB /* DST = DST * (1 - SRC) */
+}
+gceSURF_BLEND_MODE;
+
+/* Per-pixel alpha modes. */
+typedef enum _gceSURF_PIXEL_ALPHA_MODE
+{
+ gcvSURF_PIXEL_ALPHA_STRAIGHT = 0,
+ gcvSURF_PIXEL_ALPHA_INVERSED
+}
+gceSURF_PIXEL_ALPHA_MODE;
+
+/* Global alpha modes. */
+typedef enum _gceSURF_GLOBAL_ALPHA_MODE
+{
+ gcvSURF_GLOBAL_ALPHA_OFF = 0,
+ gcvSURF_GLOBAL_ALPHA_ON,
+ gcvSURF_GLOBAL_ALPHA_SCALE
+}
+gceSURF_GLOBAL_ALPHA_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gceSURF_PIXEL_COLOR_MODE
+{
+ gcvSURF_COLOR_STRAIGHT = 0,
+ gcvSURF_COLOR_MULTIPLY
+}
+gceSURF_PIXEL_COLOR_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_PIXEL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_COLOR_MULTIPLY_DISABLE = 0,
+ gcv2D_COLOR_MULTIPLY_ENABLE
+}
+gce2D_PIXEL_COLOR_MULTIPLY_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_GLOBAL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_GLOBAL_COLOR_MULTIPLY_DISABLE = 0,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_ALPHA,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_COLOR
+}
+gce2D_GLOBAL_COLOR_MULTIPLY_MODE;
+
+/* Alpha blending factor modes. */
+typedef enum _gceSURF_BLEND_FACTOR_MODE
+{
+ gcvSURF_BLEND_ZERO = 0,
+ gcvSURF_BLEND_ONE,
+ gcvSURF_BLEND_STRAIGHT,
+ gcvSURF_BLEND_INVERSED,
+ gcvSURF_BLEND_COLOR,
+ gcvSURF_BLEND_COLOR_INVERSED,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED,
+ gcvSURF_BLEND_STRAIGHT_NO_CROSS,
+ gcvSURF_BLEND_INVERSED_NO_CROSS,
+ gcvSURF_BLEND_COLOR_NO_CROSS,
+ gcvSURF_BLEND_COLOR_INVERSED_NO_CROSS,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED_CROSS
+}
+gceSURF_BLEND_FACTOR_MODE;
+
+/* Alpha blending porter duff rules. */
+typedef enum _gce2D_PORTER_DUFF_RULE
+{
+ gcvPD_CLEAR = 0,
+ gcvPD_SRC,
+ gcvPD_SRC_OVER,
+ gcvPD_DST_OVER,
+ gcvPD_SRC_IN,
+ gcvPD_DST_IN,
+ gcvPD_SRC_OUT,
+ gcvPD_DST_OUT,
+ gcvPD_SRC_ATOP,
+ gcvPD_DST_ATOP,
+ gcvPD_ADD,
+ gcvPD_XOR,
+ gcvPD_DST
+}
+gce2D_PORTER_DUFF_RULE;
+
+/* Alpha blending factor modes. */
+typedef enum _gce2D_YUV_COLOR_MODE
+{
+ gcv2D_YUV_601= 0,
+ gcv2D_YUV_709
+}
+gce2D_YUV_COLOR_MODE;
+
+/* 2D Rotation and flipping. */
+typedef enum _gce2D_ORIENTATION
+{
+ gcv2D_0_DEGREE = 0,
+ gcv2D_90_DEGREE,
+ gcv2D_180_DEGREE,
+ gcv2D_270_DEGREE,
+ gcv2D_X_FLIP,
+ gcv2D_Y_FLIP
+}
+gce2D_ORIENTATION;
+
+typedef enum _gce2D_COMMAND
+{
+ gcv2D_CLEAR = 0,
+ gcv2D_LINE,
+ gcv2D_BLT,
+ gcv2D_STRETCH,
+ gcv2D_HOR_FILTER,
+ gcv2D_VER_FILTER,
+ gcv2D_MULTI_SOURCE_BLT,
+}
+gce2D_COMMAND;
+
+typedef enum _gce2D_TILE_STATUS_CONFIG
+{
+ gcv2D_TSC_DISABLE = 0,
+ gcv2D_TSC_ENABLE = 0x00000001,
+ gcv2D_TSC_COMPRESSED = 0x00000002,
+ gcv2D_TSC_DOWN_SAMPLER = 0x00000004,
+}
+gce2D_TILE_STATUS_CONFIG;
+
+typedef enum _gce2D_QUERY
+{
+ gcv2D_QUERY_RGB_ADDRESS_MAX_ALIGN = 0,
+ gcv2D_QUERY_RGB_STRIDE_MAX_ALIGN,
+ gcv2D_QUERY_YUV_ADDRESS_MAX_ALIGN,
+ gcv2D_QUERY_YUV_STRIDE_MAX_ALIGN,
+}
+gce2D_QUERY;
+
+typedef enum _gce2D_STATE
+{
+ gcv2D_STATE_SPECIAL_FILTER_MIRROR_MODE = 1,
+}
+gce2D_STATE;
+
+#ifndef VIVANTE_NO_3D
+/* Texture functions. */
+typedef enum _gceTEXTURE_FUNCTION
+{
+ gcvTEXTURE_DUMMY = 0,
+ gcvTEXTURE_REPLACE = 0,
+ gcvTEXTURE_MODULATE,
+ gcvTEXTURE_ADD,
+ gcvTEXTURE_ADD_SIGNED,
+ gcvTEXTURE_INTERPOLATE,
+ gcvTEXTURE_SUBTRACT,
+ gcvTEXTURE_DOT3
+}
+gceTEXTURE_FUNCTION;
+
+/* Texture sources. */
+typedef enum _gceTEXTURE_SOURCE
+{
+ gcvCOLOR_FROM_TEXTURE = 0,
+ gcvCOLOR_FROM_CONSTANT_COLOR,
+ gcvCOLOR_FROM_PRIMARY_COLOR,
+ gcvCOLOR_FROM_PREVIOUS_COLOR
+}
+gceTEXTURE_SOURCE;
+
+/* Texture source channels. */
+typedef enum _gceTEXTURE_CHANNEL
+{
+ gcvFROM_COLOR = 0,
+ gcvFROM_ONE_MINUS_COLOR,
+ gcvFROM_ALPHA,
+ gcvFROM_ONE_MINUS_ALPHA
+}
+gceTEXTURE_CHANNEL;
+#endif /* VIVANTE_NO_3D */
+
+/* Filter types. */
+typedef enum _gceFILTER_TYPE
+{
+ gcvFILTER_SYNC = 0,
+ gcvFILTER_BLUR,
+ gcvFILTER_USER
+}
+gceFILTER_TYPE;
+
+/* Filter pass types. */
+typedef enum _gceFILTER_PASS_TYPE
+{
+ gcvFILTER_HOR_PASS = 0,
+ gcvFILTER_VER_PASS
+}
+gceFILTER_PASS_TYPE;
+
+/* Endian hints. */
+typedef enum _gceENDIAN_HINT
+{
+ gcvENDIAN_NO_SWAP = 0,
+ gcvENDIAN_SWAP_WORD,
+ gcvENDIAN_SWAP_DWORD
+}
+gceENDIAN_HINT;
+
+/* Tiling modes. */
+typedef enum _gceTILING
+{
+ gcvLINEAR = 0,
+ gcvTILED,
+ gcvSUPERTILED,
+ gcvMULTI_TILED,
+ gcvMULTI_SUPERTILED,
+ gcvMINORTILED,
+}
+gceTILING;
+
+/* 2D pattern type. */
+typedef enum _gce2D_PATTERN
+{
+ gcv2D_PATTERN_SOLID = 0,
+ gcv2D_PATTERN_MONO,
+ gcv2D_PATTERN_COLOR,
+ gcv2D_PATTERN_INVALID
+}
+gce2D_PATTERN;
+
+/* 2D source type. */
+typedef enum _gce2D_SOURCE
+{
+ gcv2D_SOURCE_MASKED = 0,
+ gcv2D_SOURCE_MONO,
+ gcv2D_SOURCE_COLOR,
+ gcv2D_SOURCE_INVALID
+}
+gce2D_SOURCE;
+
+/* Pipes. */
+typedef enum _gcePIPE_SELECT
+{
+ gcvPIPE_INVALID = ~0,
+ gcvPIPE_3D = 0,
+ gcvPIPE_2D
+}
+gcePIPE_SELECT;
+
+/* Hardware type. */
+typedef enum _gceHARDWARE_TYPE
+{
+ gcvHARDWARE_INVALID = 0x00,
+ gcvHARDWARE_3D = 0x01,
+ gcvHARDWARE_2D = 0x02,
+ gcvHARDWARE_VG = 0x04,
+
+ gcvHARDWARE_3D2D = gcvHARDWARE_3D | gcvHARDWARE_2D
+}
+gceHARDWARE_TYPE;
+
+#define gcdCHIP_COUNT 3
+
+typedef enum _gceMMU_MODE
+{
+ gcvMMU_MODE_1K,
+ gcvMMU_MODE_4K,
+} gceMMU_MODE;
+
+/* User signal command codes. */
+typedef enum _gceUSER_SIGNAL_COMMAND_CODES
+{
+ gcvUSER_SIGNAL_CREATE,
+ gcvUSER_SIGNAL_DESTROY,
+ gcvUSER_SIGNAL_SIGNAL,
+ gcvUSER_SIGNAL_WAIT,
+ gcvUSER_SIGNAL_MAP,
+ gcvUSER_SIGNAL_UNMAP,
+}
+gceUSER_SIGNAL_COMMAND_CODES;
+
+/* Event locations. */
+typedef enum _gceKERNEL_WHERE
+{
+ gcvKERNEL_COMMAND,
+ gcvKERNEL_VERTEX,
+ gcvKERNEL_TRIANGLE,
+ gcvKERNEL_TEXTURE,
+ gcvKERNEL_PIXEL,
+}
+gceKERNEL_WHERE;
+
+#if gcdENABLE_VG
+/* Hardware blocks. */
+typedef enum _gceBLOCK
+{
+ gcvBLOCK_COMMAND,
+ gcvBLOCK_TESSELLATOR,
+ gcvBLOCK_TESSELLATOR2,
+ gcvBLOCK_TESSELLATOR3,
+ gcvBLOCK_RASTER,
+ gcvBLOCK_VG,
+ gcvBLOCK_VG2,
+ gcvBLOCK_VG3,
+ gcvBLOCK_PIXEL,
+
+ /* Number of defined blocks. */
+ gcvBLOCK_COUNT
+}
+gceBLOCK;
+#endif
+
+/* gcdDUMP message type. */
+typedef enum _gceDEBUG_MESSAGE_TYPE
+{
+ gcvMESSAGE_TEXT,
+ gcvMESSAGE_DUMP
+}
+gceDEBUG_MESSAGE_TYPE;
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gckCONTEXT * gckCONTEXT;
+typedef struct _gcoCMDBUF * gcoCMDBUF;
+typedef struct _gcsSTATE_DELTA * gcsSTATE_DELTA_PTR;
+typedef struct _gcsQUEUE * gcsQUEUE_PTR;
+typedef struct _gcoQUEUE * gcoQUEUE;
+typedef struct _gcsHAL_INTERFACE * gcsHAL_INTERFACE_PTR;
+typedef struct _gcs2D_PROFILE * gcs2D_PROFILE_PTR;
+
+#if gcdENABLE_VG
+typedef struct _gcoVGHARDWARE * gcoVGHARDWARE;
+typedef struct _gcoVGBUFFER * gcoVGBUFFER;
+typedef struct _gckVGHARDWARE * gckVGHARDWARE;
+typedef struct _gcsVGCONTEXT * gcsVGCONTEXT_PTR;
+typedef struct _gcsVGCONTEXT_MAP * gcsVGCONTEXT_MAP_PTR;
+typedef struct _gcsVGCMDQUEUE * gcsVGCMDQUEUE_PTR;
+typedef struct _gcsTASK_MASTER_TABLE * gcsTASK_MASTER_TABLE_PTR;
+typedef struct _gckVGKERNEL * gckVGKERNEL;
+typedef void * gctTHREAD;
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_enum_h_ */
diff --git a/src/include_imx6_v4_1_0/gc_hal_kernel_buffer.h b/src/include_imx6_v4_1_0/gc_hal_kernel_buffer.h
new file mode 100644
index 0000000..0608e43
--- /dev/null
+++ b/src/include_imx6_v4_1_0/gc_hal_kernel_buffer.h
@@ -0,0 +1,185 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_kernel_buffer_h_
+#define __gc_hal_kernel_buffer_h_
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+************************ Command Buffer and Event Objects **********************
+\******************************************************************************/
+
+/* The number of context buffers per user. */
+#define gcdCONTEXT_BUFFER_COUNT 2
+
+/* State delta record. */
+typedef struct _gcsSTATE_DELTA_RECORD * gcsSTATE_DELTA_RECORD_PTR;
+typedef struct _gcsSTATE_DELTA_RECORD
+{
+ /* State address. */
+ gctUINT address;
+
+ /* State mask. */
+ gctUINT32 mask;
+
+ /* State data. */
+ gctUINT32 data;
+}
+gcsSTATE_DELTA_RECORD;
+
+/* State delta. */
+typedef struct _gcsSTATE_DELTA
+{
+ /* For debugging: the number of delta in the order of creation. */
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+ gctUINT num;
+#endif
+
+ /* Main state delta ID. Every time state delta structure gets reinitialized,
+ main ID is incremented. If main state ID overflows, all map entry IDs get
+ reinitialized to make sure there is no potential erroneous match after
+ the overflow.*/
+ gctUINT id;
+
+ /* The number of contexts pending modification by the delta. */
+ gctINT refCount;
+
+ /* Vertex element count for the delta buffer. */
+ gctUINT elementCount;
+
+ /* Number of states currently stored in the record array. */
+ gctUINT recordCount;
+
+ /* Record array; holds all modified states in gcsSTATE_DELTA_RECORD. */
+ gctUINT64 recordArray;
+
+ /* Map entry ID is used for map entry validation. If map entry ID does not
+ match the main state delta ID, the entry and the corresponding state are
+ considered not in use. */
+ gctUINT64 mapEntryID;
+ gctUINT mapEntryIDSize;
+
+ /* If the map entry ID matches the main state delta ID, index points to
+ the state record in the record array. */
+ gctUINT64 mapEntryIndex;
+
+ /* Previous and next state deltas in gcsSTATE_DELTA. */
+ gctUINT64 prev;
+ gctUINT64 next;
+}
+gcsSTATE_DELTA;
+
+/* Command buffer object. */
+struct _gcoCMDBUF
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Command buffer entry and exit pipes. */
+ gcePIPE_SELECT entryPipe;
+ gcePIPE_SELECT exitPipe;
+
+ /* Feature usage flags. */
+ gctBOOL using2D;
+ gctBOOL using3D;
+ gctBOOL usingFilterBlit;
+ gctBOOL usingPalette;
+
+ /* Physical address of command buffer. Just a name. */
+ gctUINT32 physical;
+
+ /* Logical address of command buffer. */
+ gctUINT64 logical;
+
+ /* Number of bytes in command buffer. */
+ gctUINT bytes;
+
+ /* Start offset into the command buffer. */
+ gctUINT startOffset;
+
+ /* Current offset into the command buffer. */
+ gctUINT offset;
+
+ /* Number of free bytes in command buffer. */
+ gctUINT free;
+
+ /* Location of the last reserved area. */
+ gctUINT64 lastReserve;
+ gctUINT lastOffset;
+
+#if gcdSECURE_USER
+ /* Hint array for the current command buffer. */
+ gctUINT hintArraySize;
+ gctUINT64 hintArray;
+ gctUINT64 hintArrayTail;
+#endif
+
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+ /* Last load state command location and hardware address. */
+ gctUINT64 lastLoadStatePtr;
+ gctUINT32 lastLoadStateAddress;
+ gctUINT32 lastLoadStateCount;
+#endif
+};
+
+typedef struct _gcsQUEUE
+{
+ /* Pointer to next gcsQUEUE structure in gcsQUEUE. */
+ gctUINT64 next;
+
+ /* Event information. */
+ gcsHAL_INTERFACE iface;
+}
+gcsQUEUE;
+
+/* Event queue. */
+struct _gcoQUEUE
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to current event queue. */
+ gcsQUEUE_PTR head;
+ gcsQUEUE_PTR tail;
+
+#ifdef __QNXNTO__
+ /* Buffer for records. */
+ gcsQUEUE_PTR records;
+ gctUINT32 freeBytes;
+ gctUINT32 offset;
+#else
+ /* List of free records. */
+ gcsQUEUE_PTR freeList;
+#endif
+ #define gcdIN_QUEUE_RECORD_LIMIT 16
+ /* Number of records currently in queue */
+ gctUINT32 recordCount;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_buffer_h_ */
diff --git a/src/include_imx6_v4_1_0/gc_hal_options.h b/src/include_imx6_v4_1_0/gc_hal_options.h
new file mode 100644
index 0000000..9e2a8db
--- /dev/null
+++ b/src/include_imx6_v4_1_0/gc_hal_options.h
@@ -0,0 +1,869 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_options_h_
+#define __gc_hal_options_h_
+
+/*
+ gcdPRINT_VERSION
+
+ Print HAL version.
+*/
+#ifndef gcdPRINT_VERSION
+# define gcdPRINT_VERSION 0
+#endif
+
+/*
+ USE_NEW_LINUX_SIGNAL
+
+ This define enables the Linux kernel signaling between kernel and user.
+*/
+#ifndef USE_NEW_LINUX_SIGNAL
+# define USE_NEW_LINUX_SIGNAL 0
+#endif
+
+/*
+ VIVANTE_PROFILER
+
+ This define enables the profiler.
+*/
+#ifndef VIVANTE_PROFILER
+# define VIVANTE_PROFILER 0
+#endif
+
+#ifndef VIVANTE_PROFILER_PERDRAW
+# define VIVANTE_PROFILER_PERDRAW 0
+#endif
+
+/*
+ gcdUSE_VG
+
+ Enable VG HAL layer (only for GC350).
+*/
+#ifndef gcdUSE_VG
+# define gcdUSE_VG 0
+#endif
+
+/*
+ USE_SW_FB
+
+ Set to 1 if the frame buffer memory cannot be accessed by the GPU.
+*/
+#ifndef USE_SW_FB
+# define USE_SW_FB 0
+#endif
+
+/*
+ USE_SUPER_SAMPLING
+
+ This define enables super-sampling support.
+*/
+#define USE_SUPER_SAMPLING 0
+
+/*
+ PROFILE_HAL_COUNTERS
+
+ This define enables HAL counter profiling support. HW and SHADER
+ counter profiling depends on this.
+*/
+#ifndef PROFILE_HAL_COUNTERS
+# define PROFILE_HAL_COUNTERS 1
+#endif
+
+/*
+ PROFILE_HW_COUNTERS
+
+ This define enables HW counter profiling support.
+*/
+#ifndef PROFILE_HW_COUNTERS
+# define PROFILE_HW_COUNTERS 1
+#endif
+
+/*
+ PROFILE_SHADER_COUNTERS
+
+ This define enables SHADER counter profiling support.
+*/
+#ifndef PROFILE_SHADER_COUNTERS
+# define PROFILE_SHADER_COUNTERS 1
+#endif
+
+/*
+ COMMAND_PROCESSOR_VERSION
+
+ The version of the command buffer and task manager.
+*/
+#define COMMAND_PROCESSOR_VERSION 1
+
+/*
+ gcdDUMP_KEY
+
+ Set this to a string that appears in 'cat /proc/<pid>/cmdline'. E.g. 'camera'.
+ HAL will create dumps for the processes matching this key.
+*/
+#ifndef gcdDUMP_KEY
+# define gcdDUMP_KEY "process"
+#endif
+
+/*
+ gcdDUMP_PATH
+
+ The dump file location. Some processes cannot write to the sdcard.
+ Try apps' data dir, e.g. /data/data/com.android.launcher
+*/
+#ifndef gcdDUMP_PATH
+#if defined(ANDROID)
+# define gcdDUMP_PATH "/mnt/sdcard/"
+#else
+# define gcdDUMP_PATH "./"
+#endif
+#endif
+
+/*
+ gcdDUMP
+
+ When set to 1, a dump of all states and memory uploads, as well as other
+ hardware related execution will be printed to the debug console. This
+ data can be used for playing back applications.
+*/
+#ifndef gcdDUMP
+# define gcdDUMP 0
+#endif
+
+/*
+ gcdDUMP_API
+
+ When set to 1, a high level dump of the EGL and GL/VG APs's are
+ captured.
+*/
+#ifndef gcdDUMP_API
+# define gcdDUMP_API 0
+#endif
+
+/*
+ gcdDUMP_FRAMERATE
+ When set to a value other than zero, averaqe frame rate will be dumped.
+ The value set is the starting frame that the average will be calculated.
+ This is needed because sometimes first few frames are too slow to be included
+ in the average. Frame count starts from 1.
+*/
+#ifndef gcdDUMP_FRAMERATE
+# define gcdDUMP_FRAMERATE 0
+#endif
+
+/*
+ gcdVIRTUAL_COMMAND_BUFFER
+ When set to 1, user command buffer and context buffer will be allocated
+ from gcvPOOL_VIRTUAL.
+*/
+#ifndef gcdVIRTUAL_COMMAND_BUFFER
+# define gcdVIRTUAL_COMMAND_BUFFER 0
+#endif
+
+/*
+ gcdENABLE_FSCALE_VAL_ADJUST
+ When non-zero, FSCALE_VAL when gcvPOWER_ON can be adjusted externally.
+ */
+#ifndef gcdENABLE_FSCALE_VAL_ADJUST
+# define gcdENABLE_FSCALE_VAL_ADJUST 1
+#endif
+
+/*
+ gcdDUMP_IN_KERNEL
+
+ When set to 1, all dumps will happen in the kernel. This is handy if
+ you want the kernel to dump its command buffers as well and the data
+ needs to be in sync.
+*/
+#ifndef gcdDUMP_IN_KERNEL
+# define gcdDUMP_IN_KERNEL 0
+#endif
+
+/*
+ gcdDUMP_COMMAND
+
+ When set to non-zero, the command queue will dump all incoming command
+ and context buffers as well as all other modifications to the command
+ queue.
+*/
+#ifndef gcdDUMP_COMMAND
+# define gcdDUMP_COMMAND 0
+#endif
+
+/*
+ gcdDUMP_FRAME_TGA
+
+ When set to a value other than 0, a dump of the frame specified by the value,
+ will be done into frame.tga. Frame count starts from 1.
+ */
+#ifndef gcdDUMP_FRAME_TGA
+#define gcdDUMP_FRAME_TGA 0
+#endif
+/*
+ gcdNULL_DRIVER
+
+ Set to 1 for infinite speed hardware.
+ Set to 2 for bypassing the HAL.
+ Set to 3 for bypassing the drivers.
+*/
+#ifndef gcdNULL_DRIVER
+# define gcdNULL_DRIVER 0
+#endif
+
+/*
+ gcdENABLE_TIMEOUT_DETECTION
+
+ Enable timeout detection.
+*/
+#ifndef gcdENABLE_TIMEOUT_DETECTION
+# define gcdENABLE_TIMEOUT_DETECTION 0
+#endif
+
+/*
+ gcdCMD_BUFFER_SIZE
+
+ Number of bytes in a command buffer.
+*/
+#ifndef gcdCMD_BUFFER_SIZE
+# define gcdCMD_BUFFER_SIZE (128 << 10)
+#endif
+
+/*
+ gcdCMD_BUFFERS
+
+ Number of command buffers to use per client.
+*/
+#ifndef gcdCMD_BUFFERS
+# define gcdCMD_BUFFERS 2
+#endif
+
+/*
+ gcdMAX_CMD_BUFFERS
+
+ Maximum number of command buffers to use per client.
+*/
+#ifndef gcdMAX_CMD_BUFFERS
+# define gcdMAX_CMD_BUFFERS 8
+#endif
+
+/*
+ gcdCOMMAND_QUEUES
+
+ Number of command queues in the kernel.
+*/
+#ifndef gcdCOMMAND_QUEUES
+# define gcdCOMMAND_QUEUES 2
+#endif
+
+/*
+ gcdPOWER_CONTROL_DELAY
+
+ The delay in milliseconds required to wait until the GPU has woke up
+ from a suspend or power-down state. This is system dependent because
+ the bus clock also needs to stabalize.
+*/
+#ifndef gcdPOWER_CONTROL_DELAY
+# define gcdPOWER_CONTROL_DELAY 0
+#endif
+
+/*
+ gcdMIRROR_PAGETABLE
+
+ Enable it when GPUs with old MMU and new MMU exist at same SoC. It makes
+ each GPU use same virtual address to access same physical memory.
+*/
+#ifndef gcdMIRROR_PAGETABLE
+# define gcdMIRROR_PAGETABLE 0
+#endif
+
+/*
+ gcdMMU_SIZE
+
+ Size of the MMU page table in bytes. Each 4 bytes can hold 4kB worth of
+ virtual data.
+*/
+#ifndef gcdMMU_SIZE
+#if gcdMIRROR_PAGETABLE
+# define gcdMMU_SIZE 0x200000
+#else
+# define gcdMMU_SIZE (2048 << 10)
+#endif
+#endif
+
+/*
+ gcdSECURE_USER
+
+ Use logical addresses instead of physical addresses in user land. In
+ this case a hint table is created for both command buffers and context
+ buffers, and that hint table will be used to patch up those buffers in
+ the kernel when they are ready to submit.
+*/
+#ifndef gcdSECURE_USER
+# define gcdSECURE_USER 0
+#endif
+
+/*
+ gcdSECURE_CACHE_SLOTS
+
+ Number of slots in the logical to DMA address cache table. Each time a
+ logical address needs to be translated into a DMA address for the GPU,
+ this cache will be walked. The replacement scheme is LRU.
+*/
+#ifndef gcdSECURE_CACHE_SLOTS
+# define gcdSECURE_CACHE_SLOTS 1024
+#endif
+
+/*
+ gcdSECURE_CACHE_METHOD
+
+ Replacement scheme used for Secure Cache. The following options are
+ available:
+
+ gcdSECURE_CACHE_LRU
+ A standard LRU cache.
+
+ gcdSECURE_CACHE_LINEAR
+ A linear walker with the idea that an application will always
+ render the scene in a similar way, so the next entry in the
+ cache should be a hit most of the time.
+
+ gcdSECURE_CACHE_HASH
+ A 256-entry hash table.
+
+ gcdSECURE_CACHE_TABLE
+ A simple cache but with potential of a lot of cache replacement.
+*/
+#ifndef gcdSECURE_CACHE_METHOD
+# define gcdSECURE_CACHE_METHOD gcdSECURE_CACHE_HASH
+#endif
+
+/*
+ gcdREGISTER_ACCESS_FROM_USER
+
+ Set to 1 to allow IOCTL calls to get through from user land. This
+ should only be in debug or development drops.
+*/
+#ifndef gcdREGISTER_ACCESS_FROM_USER
+# define gcdREGISTER_ACCESS_FROM_USER 1
+#endif
+
+/*
+ gcdUSER_HEAP_ALLOCATOR
+
+ Set to 1 to enable user mode heap allocator for fast memory allocation
+ and destroying. Otherwise, memory allocation/destroying in user mode
+ will be directly managed by system. Only for linux for now.
+*/
+#ifndef gcdUSER_HEAP_ALLOCATOR
+# define gcdUSER_HEAP_ALLOCATOR 1
+#endif
+
+/*
+ gcdHEAP_SIZE
+
+ Set the allocation size for the internal heaps. Each time a heap is
+ full, a new heap will be allocated with this minmimum amount of bytes.
+ The bigger this size, the fewer heaps there are to allocate, the better
+ the performance. However, heaps won't be freed until they are
+ completely free, so there might be some more memory waste if the size is
+ too big.
+*/
+#ifndef gcdHEAP_SIZE
+# define gcdHEAP_SIZE (64 << 10)
+#endif
+
+/*
+ gcdPOWER_SUSNPEND_WHEN_IDLE
+
+ Set to 1 to make GPU enter gcvPOWER_SUSPEND when idle detected,
+ otherwise GPU will enter gcvPOWER_IDLE.
+*/
+#ifndef gcdPOWER_SUSNPEND_WHEN_IDLE
+# define gcdPOWER_SUSNPEND_WHEN_IDLE 1
+#endif
+
+/*
+ gcdFPGA_BUILD
+
+ This define enables work arounds for FPGA images.
+*/
+#ifndef gcdFPGA_BUILD
+# define gcdFPGA_BUILD 0
+#endif
+
+/*
+ gcdGPU_TIMEOUT
+
+ This define specified the number of milliseconds the system will wait
+ before it broadcasts the GPU is stuck. In other words, it will define
+ the timeout of any operation that needs to wait for the GPU.
+
+ If the value is 0, no timeout will be checked for.
+*/
+#ifndef gcdGPU_TIMEOUT
+#if gcdFPGA_BUILD
+# define gcdGPU_TIMEOUT 0
+# else
+# define gcdGPU_TIMEOUT 20000
+# endif
+#endif
+
+/*
+ gcdGPU_ADVANCETIMER
+
+ it is advance timer.
+*/
+#ifndef gcdGPU_ADVANCETIMER
+# define gcdGPU_ADVANCETIMER 250
+#endif
+
+/*
+ gcdSTATIC_LINK
+
+ This define disalbes static linking;
+*/
+#ifndef gcdSTATIC_LINK
+# define gcdSTATIC_LINK 0
+#endif
+
+/*
+ gcdUSE_NEW_HEAP
+
+ Setting this define to 1 enables new heap.
+*/
+#ifndef gcdUSE_NEW_HEAP
+# define gcdUSE_NEW_HEAP 0
+#endif
+
+/*
+ gcdCMD_NO_2D_CONTEXT
+
+ This define enables no-context 2D command buffer.
+*/
+#ifndef gcdCMD_NO_2D_CONTEXT
+# define gcdCMD_NO_2D_CONTEXT 1
+#endif
+
+/*
+ gcdENABLE_BANK_ALIGNMENT
+
+ When enabled, video memory is allocated bank aligned. The vendor can modify
+ _GetSurfaceBankAlignment() and gcoSURF_GetBankOffsetBytes() to define how
+ different types of allocations are bank and channel aligned.
+ When disabled (default), no bank alignment is done.
+*/
+#ifndef gcdENABLE_BANK_ALIGNMENT
+# define gcdENABLE_BANK_ALIGNMENT 0
+#endif
+
+/*
+ gcdBANK_BIT_START
+
+ Specifies the start bit of the bank (inclusive).
+*/
+#ifndef gcdBANK_BIT_START
+# define gcdBANK_BIT_START 12
+#endif
+
+/*
+ gcdBANK_BIT_END
+
+ Specifies the end bit of the bank (inclusive).
+*/
+#ifndef gcdBANK_BIT_END
+# define gcdBANK_BIT_END 14
+#endif
+
+/*
+ gcdBANK_CHANNEL_BIT
+
+ When set, video memory when allocated bank aligned is allocated such that
+ render and depth buffer addresses alternate on the channel bit specified.
+ This option has an effect only when gcdENABLE_BANK_ALIGNMENT is enabled.
+ When disabled (default), no alteration is done.
+*/
+#ifndef gcdBANK_CHANNEL_BIT
+# define gcdBANK_CHANNEL_BIT 7
+#endif
+
+/*
+ gcdDYNAMIC_SPEED
+
+ When non-zero, it informs the kernel driver to use the speed throttling
+ broadcasting functions to inform the system the GPU should be spet up or
+ slowed down. It will send a broadcast for slowdown each "interval"
+ specified by this define in milliseconds
+ (gckOS_BroadcastCalibrateSpeed).
+*/
+#ifndef gcdDYNAMIC_SPEED
+# define gcdDYNAMIC_SPEED 2000
+#endif
+
+/*
+ gcdDYNAMIC_EVENT_THRESHOLD
+
+ When non-zero, it specifies the maximum number of available events at
+ which the kernel driver will issue a broadcast to speed up the GPU
+ (gckOS_BroadcastHurry).
+*/
+#ifndef gcdDYNAMIC_EVENT_THRESHOLD
+# define gcdDYNAMIC_EVENT_THRESHOLD 5
+#endif
+
+/*
+ gcdENABLE_PROFILING
+
+ Enable profiling macros.
+*/
+#ifndef gcdENABLE_PROFILING
+# define gcdENABLE_PROFILING 0
+#endif
+
+/*
+ gcdENABLE_128B_MERGE
+
+ Enable 128B merge for the BUS control.
+*/
+#ifndef gcdENABLE_128B_MERGE
+# define gcdENABLE_128B_MERGE 0
+#endif
+
+/*
+ gcdFRAME_DB
+
+ When non-zero, it specified the number of frames inside the frame
+ database. The frame DB will collect per-frame timestamps and hardware
+ counters.
+*/
+#ifndef gcdFRAME_DB
+# define gcdFRAME_DB 0
+# define gcdFRAME_DB_RESET 0
+# define gcdFRAME_DB_NAME "/var/log/frameDB.log"
+#endif
+
+/*
+ gcdENABLE_VG
+ enable the 2D openVG
+*/
+
+#ifndef gcdENABLE_VG
+# define gcdENABLE_VG 0
+#endif
+
+/*
+ gcdDYNAMIC_MAP_RESERVED_MEMORY
+
+ When gcvPOOL_SYSTEM is constructed from RESERVED memory,
+ driver can map the whole reserved memory to kernel space
+ at the beginning, or just map a piece of memory when need
+ to access.
+
+ Notice:
+ - It's only for the 2D openVG. For other cores, there is
+ _NO_ need to map reserved memory to kernel.
+ - It's meaningless when memory is allocated by
+ gckOS_AllocateContiguous, in that case, memory is always
+ mapped by system when allocated.
+*/
+#ifndef gcdDYNAMIC_MAP_RESERVED_MEMORY
+# define gcdDYNAMIC_MAP_RESERVED_MEMORY 1
+#endif
+
+/*
+ gcdPAGED_MEMORY_CACHEABLE
+
+ When non-zero, paged memory will be cacheable.
+
+ Normally, driver will detemines whether a video memory
+ is cacheable or not. When cacheable is not neccessary,
+ it will be writecombine.
+
+ This option is only for those SOC which can't enable
+ writecombine without enabling cacheable.
+*/
+
+#ifndef gcdPAGED_MEMORY_CACHEABLE
+# define gcdPAGED_MEMORY_CACHEABLE 0
+#endif
+
+/*
+ gcdNONPAGED_MEMORY_CACHEABLE
+
+ When non-zero, non paged memory will be cacheable.
+*/
+
+#ifndef gcdNONPAGED_MEMORY_CACHEABLE
+# define gcdNONPAGED_MEMORY_CACHEABLE 0
+#endif
+
+/*
+ gcdNONPAGED_MEMORY_BUFFERABLE
+
+ When non-zero, non paged memory will be bufferable.
+ gcdNONPAGED_MEMORY_BUFFERABLE and gcdNONPAGED_MEMORY_CACHEABLE
+ can't be set 1 at same time
+*/
+
+#ifndef gcdNONPAGED_MEMORY_BUFFERABLE
+# define gcdNONPAGED_MEMORY_BUFFERABLE 1
+#endif
+
+/*
+ gcdENABLE_INFINITE_SPEED_HW
+ enable the Infinte HW , this is for 2D openVG
+*/
+
+#ifndef gcdENABLE_INFINITE_SPEED_HW
+# define gcdENABLE_INFINITE_SPEED_HW 0
+#endif
+
+/*
+ gcdENABLE_TS_DOUBLE_BUFFER
+ enable the TS double buffer, this is for 2D openVG
+*/
+
+#ifndef gcdENABLE_TS_DOUBLE_BUFFER
+# define gcdENABLE_TS_DOUBLE_BUFFER 1
+#endif
+
+/*
+ gcd6000_SUPPORT
+
+ Temporary define to enable/disable 6000 support.
+ */
+#ifndef gcd6000_SUPPORT
+# define gcd6000_SUPPORT 0
+#endif
+
+/*
+ gcdPOWEROFF_TIMEOUT
+
+ When non-zero, GPU will power off automatically from
+ idle state, and gcdPOWEROFF_TIMEOUT is also the default
+ timeout in milliseconds.
+ */
+
+#ifndef gcdPOWEROFF_TIMEOUT
+# define gcdPOWEROFF_TIMEOUT 300
+#endif
+
+/*
+ gcdUSE_VIDMEM_PER_PID
+*/
+#ifndef gcdUSE_VIDMEM_PER_PID
+# define gcdUSE_VIDMEM_PER_PID 0
+#endif
+
+/*
+ QNX_SINGLE_THREADED_DEBUGGING
+*/
+#ifndef QNX_SINGLE_THREADED_DEBUGGING
+# define QNX_SINGLE_THREADED_DEBUGGING 0
+#endif
+
+/*
+ gcdENABLE_RECOVERY
+
+ This define enables the recovery code.
+*/
+#ifndef gcdENABLE_RECOVERY
+# define gcdENABLE_RECOVERY 1
+#endif
+
+/*
+ gcdRENDER_THREADS
+
+ Number of render threads. Make it zero, and there will be no render
+ threads.
+*/
+#ifndef gcdRENDER_THREADS
+# define gcdRENDER_THREADS 0
+#endif
+
+/*
+ gcdSMP
+
+ This define enables SMP support.
+
+ Currently, it only works on Linux/Android,
+ Kbuild will config it according to whether
+ CONFIG_SMP is set.
+
+*/
+#ifndef gcdSMP
+# define gcdSMP 0
+#endif
+
+/*
+ gcdSUPPORT_SWAP_RECTANGLE
+
+ Support swap with a specific rectangle.
+
+ Set the rectangle with eglSetSwapRectangleVIV api.
+*/
+#ifndef gcdSUPPORT_SWAP_RECTANGLE
+# define gcdSUPPORT_SWAP_RECTANGLE 0
+#endif
+
+/*
+ gcdGPU_LINEAR_BUFFER_ENABLED
+
+ Use linear buffer for GPU apps so HWC can do 2D composition.
+*/
+#ifndef gcdGPU_LINEAR_BUFFER_ENABLED
+# define gcdGPU_LINEAR_BUFFER_ENABLED 0
+#endif
+
+/*
+ gcdSHARED_RESOLVE_BUFFER_ENABLED
+
+ Use shared resolve buffer for all app buffers.
+*/
+#ifndef gcdSHARED_RESOLVE_BUFFER_ENABLED
+# define gcdSHARED_RESOLVE_BUFFER_ENABLED 0
+#endif
+
+/*
+ gcdUSE_TRIANGLE_STRIP_PATCH
+ */
+#ifndef gcdUSE_TRIANGLE_STRIP_PATCH
+# define gcdUSE_TRIANGLE_STRIP_PATCH 1
+#endif
+
+/*
+ gcdENABLE_OUTER_CACHE_PATCH
+
+ Enable the outer cache patch.
+*/
+#ifndef gcdENABLE_OUTER_CACHE_PATCH
+# define gcdENABLE_OUTER_CACHE_PATCH 0
+#endif
+
+#ifndef gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST
+# define gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST 0
+#endif
+
+#ifndef gcdENABLE_PE_DITHER_FIX
+# define gcdENABLE_PE_DITHER_FIX 1
+#endif
+
+#ifndef gcdSHARED_PAGETABLE
+# define gcdSHARED_PAGETABLE 1
+#endif
+#ifndef gcdUSE_PVR
+# define gcdUSE_PVR 1
+#endif
+
+/*
+ gcdSMALL_BLOCK_SIZE
+
+ When non-zero, a part of VIDMEM will be reserved for requests
+ whose requesting size is less than gcdSMALL_BLOCK_SIZE.
+
+ For Linux, it's the size of a page. If this requeset fallbacks
+ to gcvPOOL_CONTIGUOUS or gcvPOOL_VIRTUAL, memory will be wasted
+ because they allocate a page at least.
+ */
+#ifndef gcdSMALL_BLOCK_SIZE
+# define gcdSMALL_BLOCK_SIZE 4096
+# define gcdRATIO_FOR_SMALL_MEMORY 32
+#endif
+
+/*
+ gcdCONTIGUOUS_SIZE_LIMIT
+ When non-zero, size of video node from gcvPOOL_CONTIGUOUS is
+ limited by gcdCONTIGUOUS_SIZE_LIMIT.
+ */
+#ifndef gcdCONTIGUOUS_SIZE_LIMIT
+# define gcdCONTIGUOUS_SIZE_LIMIT 0
+#endif
+
+#ifndef gcdDISALBE_EARLY_EARLY_Z
+# define gcdDISALBE_EARLY_EARLY_Z 1
+#endif
+
+/*
+ gcdLINK_QUEUE_SIZE
+
+ When non-zero, driver maintains a queue to record information of
+ latest lined context buffer and command buffer. Data in this queue
+ is be used to debug.
+*/
+#ifndef gcdLINK_QUEUE_SIZE
+# define gcdLINK_QUEUE_SIZE 0
+#endif
+
+/* gcdALPHA_KILL_IN_SHADER
+ *
+ * Enable alpha kill inside the shader. This will be set automatically by the
+ * HAL if certain states match a criteria.
+ */
+#ifndef gcdALPHA_KILL_IN_SHADER
+# define gcdALPHA_KILL_IN_SHADER 1
+#endif
+
+/* gcdHIGH_PRECISION_DELAY_ENABLE
+ *
+ * Enable high precision schedule delay with 1ms unit. otherwise schedule delay up to 10ms.
+ * Browser app performance will have obvious drop without this enablement
+ */
+#ifndef gcdHIGH_PRECISION_DELAY_ENABLE
+# define gcdHIGH_PRECISION_DELAY_ENABLE 1
+#endif
+
+#ifndef gcdUSE_WCLIP_PATCH
+# define gcdUSE_WCLIP_PATCH 1
+#endif
+
+#ifndef gcdHZ_L2_DISALBE
+# define gcdHZ_L2_DISALBE 1
+#endif
+
+#ifndef gcdBUGFIX15_DISABLE
+# define gcdBUGFIX15_DISABLE 1
+#endif
+
+#ifndef gcdDISABLE_HZ_FAST_CLEAR
+# define gcdDISABLE_HZ_FAST_CLEAR 1
+#endif
+
+#ifndef gcdUSE_NPOT_PATCH
+#define gcdUSE_NPOT_PATCH 1
+#endif
+
+
+#ifndef gcdSYNC
+# define gcdSYNC 1
+#endif
+
+/*
+ gcdDVFS
+
+ When non-zero, software will make use of dynamic voltage and
+ frequency feature.
+ */
+#ifndef gcdDVFS
+# define gcdDVFS 0
+# define gcdDVFS_ANAYLSE_WINDOW 4
+# define gcdDVFS_POLLING_TIME (gcdDVFS_ANAYLSE_WINDOW * 4)
+#endif
+
+#endif /* __gc_hal_options_h_ */
diff --git a/src/include_imx6_v4_1_0/gc_hal_profiler.h b/src/include_imx6_v4_1_0/gc_hal_profiler.h
new file mode 100644
index 0000000..3e450ba
--- /dev/null
+++ b/src/include_imx6_v4_1_0/gc_hal_profiler.h
@@ -0,0 +1,1336 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_profiler_h_
+#define __gc_hal_profiler_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define GLVERTEX_OBJECT 10
+#define GLVERTEX_OBJECT_BYTES 11
+
+#define GLINDEX_OBJECT 20
+#define GLINDEX_OBJECT_BYTES 21
+
+#define GLTEXTURE_OBJECT 30
+#define GLTEXTURE_OBJECT_BYTES 31
+
+#if VIVANTE_PROFILER
+#define gcmPROFILE_GC(Enum, Value) gcoPROFILER_Count(gcvNULL, Enum, Value)
+#else
+#define gcmPROFILE_GC(Enum, Value) do { } while (gcvFALSE)
+#endif
+
+#ifndef gcdNEW_PROFILER_FILE
+#define gcdNEW_PROFILER_FILE 1
+#endif
+
+/* OpenGL ES11 API IDs. */
+#define ES11_ACTIVETEXTURE 1
+#define ES11_ALPHAFUNC (ES11_ACTIVETEXTURE + 1)
+#define ES11_ALPHAFUNCX (ES11_ALPHAFUNC + 1)
+#define ES11_BINDBUFFER (ES11_ALPHAFUNCX + 1)
+#define ES11_BINDTEXTURE (ES11_BINDBUFFER + 1)
+#define ES11_BLENDFUNC (ES11_BINDTEXTURE + 1)
+#define ES11_BUFFERDATA (ES11_BLENDFUNC + 1)
+#define ES11_BUFFERSUBDATA (ES11_BUFFERDATA + 1)
+#define ES11_CLEAR (ES11_BUFFERSUBDATA + 1)
+#define ES11_CLEARCOLOR (ES11_CLEAR + 1)
+#define ES11_CLEARCOLORX (ES11_CLEARCOLOR + 1)
+#define ES11_CLEARDEPTHF (ES11_CLEARCOLORX + 1)
+#define ES11_CLEARDEPTHX (ES11_CLEARDEPTHF + 1)
+#define ES11_CLEARSTENCIL (ES11_CLEARDEPTHX + 1)
+#define ES11_CLIENTACTIVETEXTURE (ES11_CLEARSTENCIL + 1)
+#define ES11_CLIPPLANEF (ES11_CLIENTACTIVETEXTURE + 1)
+#define ES11_CLIPPLANEX (ES11_CLIPPLANEF + 1)
+#define ES11_COLOR4F (ES11_CLIPPLANEX + 1)
+#define ES11_COLOR4UB (ES11_COLOR4F + 1)
+#define ES11_COLOR4X (ES11_COLOR4UB + 1)
+#define ES11_COLORMASK (ES11_COLOR4X + 1)
+#define ES11_COLORPOINTER (ES11_COLORMASK + 1)
+#define ES11_COMPRESSEDTEXIMAGE2D (ES11_COLORPOINTER + 1)
+#define ES11_COMPRESSEDTEXSUBIMAGE2D (ES11_COMPRESSEDTEXIMAGE2D + 1)
+#define ES11_COPYTEXIMAGE2D (ES11_COMPRESSEDTEXSUBIMAGE2D + 1)
+#define ES11_COPYTEXSUBIMAGE2D (ES11_COPYTEXIMAGE2D + 1)
+#define ES11_CULLFACE (ES11_COPYTEXSUBIMAGE2D + 1)
+#define ES11_DELETEBUFFERS (ES11_CULLFACE + 1)
+#define ES11_DELETETEXTURES (ES11_DELETEBUFFERS + 1)
+#define ES11_DEPTHFUNC (ES11_DELETETEXTURES + 1)
+#define ES11_DEPTHMASK (ES11_DEPTHFUNC + 1)
+#define ES11_DEPTHRANGEF (ES11_DEPTHMASK + 1)
+#define ES11_DEPTHRANGEX (ES11_DEPTHRANGEF + 1)
+#define ES11_DISABLE (ES11_DEPTHRANGEX + 1)
+#define ES11_DISABLECLIENTSTATE (ES11_DISABLE + 1)
+#define ES11_DRAWARRAYS (ES11_DISABLECLIENTSTATE + 1)
+#define ES11_DRAWELEMENTS (ES11_DRAWARRAYS + 1)
+#define ES11_ENABLE (ES11_DRAWELEMENTS + 1)
+#define ES11_ENABLECLIENTSTATE (ES11_ENABLE + 1)
+#define ES11_FINISH (ES11_ENABLECLIENTSTATE + 1)
+#define ES11_FLUSH (ES11_FINISH + 1)
+#define ES11_FOGF (ES11_FLUSH + 1)
+#define ES11_FOGFV (ES11_FOGF + 1)
+#define ES11_FOGX (ES11_FOGFV + 1)
+#define ES11_FOGXV (ES11_FOGX + 1)
+#define ES11_FRONTFACE (ES11_FOGXV + 1)
+#define ES11_FRUSTUMF (ES11_FRONTFACE + 1)
+#define ES11_FRUSTUMX (ES11_FRUSTUMF + 1)
+#define ES11_GENBUFFERS (ES11_FRUSTUMX + 1)
+#define ES11_GENTEXTURES (ES11_GENBUFFERS + 1)
+#define ES11_GETBOOLEANV (ES11_GENTEXTURES + 1)
+#define ES11_GETBUFFERPARAMETERIV (ES11_GETBOOLEANV + 1)
+#define ES11_GETCLIPPLANEF (ES11_GETBUFFERPARAMETERIV + 1)
+#define ES11_GETCLIPPLANEX (ES11_GETCLIPPLANEF + 1)
+#define ES11_GETERROR (ES11_GETCLIPPLANEX + 1)
+#define ES11_GETFIXEDV (ES11_GETERROR + 1)
+#define ES11_GETFLOATV (ES11_GETFIXEDV + 1)
+#define ES11_GETINTEGERV (ES11_GETFLOATV + 1)
+#define ES11_GETLIGHTFV (ES11_GETINTEGERV + 1)
+#define ES11_GETLIGHTXV (ES11_GETLIGHTFV + 1)
+#define ES11_GETMATERIALFV (ES11_GETLIGHTXV + 1)
+#define ES11_GETMATERIALXV (ES11_GETMATERIALFV + 1)
+#define ES11_GETPOINTERV (ES11_GETMATERIALXV + 1)
+#define ES11_GETSTRING (ES11_GETPOINTERV + 1)
+#define ES11_GETTEXENVFV (ES11_GETSTRING + 1)
+#define ES11_GETTEXENVIV (ES11_GETTEXENVFV + 1)
+#define ES11_GETTEXENVXV (ES11_GETTEXENVIV + 1)
+#define ES11_GETTEXPARAMETERFV (ES11_GETTEXENVXV + 1)
+#define ES11_GETTEXPARAMETERIV (ES11_GETTEXPARAMETERFV + 1)
+#define ES11_GETTEXPARAMETERXV (ES11_GETTEXPARAMETERIV + 1)
+#define ES11_HINT (ES11_GETTEXPARAMETERXV + 1)
+#define ES11_ISBUFFER (ES11_HINT + 1)
+#define ES11_ISENABLED (ES11_ISBUFFER + 1)
+#define ES11_ISTEXTURE (ES11_ISENABLED + 1)
+#define ES11_LIGHTF (ES11_ISTEXTURE + 1)
+#define ES11_LIGHTFV (ES11_LIGHTF + 1)
+#define ES11_LIGHTMODELF (ES11_LIGHTFV + 1)
+#define ES11_LIGHTMODELFV (ES11_LIGHTMODELF + 1)
+#define ES11_LIGHTMODELX (ES11_LIGHTMODELFV + 1)
+#define ES11_LIGHTMODELXV (ES11_LIGHTMODELX + 1)
+#define ES11_LIGHTX (ES11_LIGHTMODELXV + 1)
+#define ES11_LIGHTXV (ES11_LIGHTX + 1)
+#define ES11_LINEWIDTH (ES11_LIGHTXV + 1)
+#define ES11_LINEWIDTHX (ES11_LINEWIDTH + 1)
+#define ES11_LOADIDENTITY (ES11_LINEWIDTHX + 1)
+#define ES11_LOADMATRIXF (ES11_LOADIDENTITY + 1)
+#define ES11_LOADMATRIXX (ES11_LOADMATRIXF + 1)
+#define ES11_LOGICOP (ES11_LOADMATRIXX + 1)
+#define ES11_MATERIALF (ES11_LOGICOP + 1)
+#define ES11_MATERIALFV (ES11_MATERIALF + 1)
+#define ES11_MATERIALX (ES11_MATERIALFV + 1)
+#define ES11_MATERIALXV (ES11_MATERIALX + 1)
+#define ES11_MATRIXMODE (ES11_MATERIALXV + 1)
+#define ES11_MULTITEXCOORD4F (ES11_MATRIXMODE + 1)
+#define ES11_MULTITEXCOORD4X (ES11_MULTITEXCOORD4F + 1)
+#define ES11_MULTMATRIXF (ES11_MULTITEXCOORD4X + 1)
+#define ES11_MULTMATRIXX (ES11_MULTMATRIXF + 1)
+#define ES11_NORMAL3F (ES11_MULTMATRIXX + 1)
+#define ES11_NORMAL3X (ES11_NORMAL3F + 1)
+#define ES11_NORMALPOINTER (ES11_NORMAL3X + 1)
+#define ES11_ORTHOF (ES11_NORMALPOINTER + 1)
+#define ES11_ORTHOX (ES11_ORTHOF + 1)
+#define ES11_PIXELSTOREI (ES11_ORTHOX + 1)
+#define ES11_POINTPARAMETERF (ES11_PIXELSTOREI + 1)
+#define ES11_POINTPARAMETERFV (ES11_POINTPARAMETERF + 1)
+#define ES11_POINTPARAMETERX (ES11_POINTPARAMETERFV + 1)
+#define ES11_POINTPARAMETERXV (ES11_POINTPARAMETERX + 1)
+#define ES11_POINTSIZE (ES11_POINTPARAMETERXV + 1)
+#define ES11_POINTSIZEX (ES11_POINTSIZE + 1)
+#define ES11_POLYGONOFFSET (ES11_POINTSIZEX + 1)
+#define ES11_POLYGONOFFSETX (ES11_POLYGONOFFSET + 1)
+#define ES11_POPMATRIX (ES11_POLYGONOFFSETX + 1)
+#define ES11_PUSHMATRIX (ES11_POPMATRIX + 1)
+#define ES11_READPIXELS (ES11_PUSHMATRIX + 1)
+#define ES11_ROTATEF (ES11_READPIXELS + 1)
+#define ES11_ROTATEX (ES11_ROTATEF + 1)
+#define ES11_SAMPLECOVERAGE (ES11_ROTATEX + 1)
+#define ES11_SAMPLECOVERAGEX (ES11_SAMPLECOVERAGE + 1)
+#define ES11_SCALEF (ES11_SAMPLECOVERAGEX + 1)
+#define ES11_SCALEX (ES11_SCALEF + 1)
+#define ES11_SCISSOR (ES11_SCALEX + 1)
+#define ES11_SHADEMODEL (ES11_SCISSOR + 1)
+#define ES11_STENCILFUNC (ES11_SHADEMODEL + 1)
+#define ES11_STENCILMASK (ES11_STENCILFUNC + 1)
+#define ES11_STENCILOP (ES11_STENCILMASK + 1)
+#define ES11_TEXCOORDPOINTER (ES11_STENCILOP + 1)
+#define ES11_TEXENVF (ES11_TEXCOORDPOINTER + 1)
+#define ES11_TEXENVFV (ES11_TEXENVF + 1)
+#define ES11_TEXENVI (ES11_TEXENVFV + 1)
+#define ES11_TEXENVIV (ES11_TEXENVI + 1)
+#define ES11_TEXENVX (ES11_TEXENVIV + 1)
+#define ES11_TEXENVXV (ES11_TEXENVX + 1)
+#define ES11_TEXIMAGE2D (ES11_TEXENVXV + 1)
+#define ES11_TEXPARAMETERF (ES11_TEXIMAGE2D + 1)
+#define ES11_TEXPARAMETERFV (ES11_TEXPARAMETERF + 1)
+#define ES11_TEXPARAMETERI (ES11_TEXPARAMETERFV + 1)
+#define ES11_TEXPARAMETERIV (ES11_TEXPARAMETERI + 1)
+#define ES11_TEXPARAMETERX (ES11_TEXPARAMETERIV + 1)
+#define ES11_TEXPARAMETERXV (ES11_TEXPARAMETERX + 1)
+#define ES11_TEXSUBIMAGE2D (ES11_TEXPARAMETERXV + 1)
+#define ES11_TRANSLATEF (ES11_TEXSUBIMAGE2D + 1)
+#define ES11_TRANSLATEX (ES11_TRANSLATEF + 1)
+#define ES11_VERTEXPOINTER (ES11_TRANSLATEX + 1)
+#define ES11_VIEWPORT (ES11_VERTEXPOINTER + 1)
+#define ES11_BLENDEQUATIONOES (ES11_VIEWPORT + 1)
+#define ES11_BLENDFUNCSEPERATEOES (ES11_BLENDEQUATIONOES + 1)
+#define ES11_BLENDEQUATIONSEPARATEOES (ES11_BLENDFUNCSEPERATEOES + 1)
+#define ES11_GLMAPBUFFEROES (ES11_BLENDEQUATIONSEPARATEOES + 1)
+#define ES11_GLUNMAPBUFFEROES (ES11_GLMAPBUFFEROES + 1)
+#define ES11_GLGETBUFFERPOINTERVOES (ES11_GLUNMAPBUFFEROES + 1)
+#define ES11_CALLS (ES11_GLGETBUFFERPOINTERVOES + 1)
+#define ES11_DRAWCALLS (ES11_CALLS + 1)
+#define ES11_STATECHANGECALLS (ES11_DRAWCALLS + 1)
+#define ES11_POINTCOUNT (ES11_STATECHANGECALLS + 1)
+#define ES11_LINECOUNT (ES11_POINTCOUNT + 1)
+#define ES11_TRIANGLECOUNT (ES11_LINECOUNT + 1)
+
+/* OpenGL ES2X API IDs. */
+#define ES20_ACTIVETEXTURE 1
+#define ES20_ATTACHSHADER (ES20_ACTIVETEXTURE + 1)
+#define ES20_BINDATTRIBLOCATION (ES20_ATTACHSHADER + 1)
+#define ES20_BINDBUFFER (ES20_BINDATTRIBLOCATION + 1)
+#define ES20_BINDFRAMEBUFFER (ES20_BINDBUFFER + 1)
+#define ES20_BINDRENDERBUFFER (ES20_BINDFRAMEBUFFER + 1)
+#define ES20_BINDTEXTURE (ES20_BINDRENDERBUFFER + 1)
+#define ES20_BLENDCOLOR (ES20_BINDTEXTURE + 1)
+#define ES20_BLENDEQUATION (ES20_BLENDCOLOR + 1)
+#define ES20_BLENDEQUATIONSEPARATE (ES20_BLENDEQUATION + 1)
+#define ES20_BLENDFUNC (ES20_BLENDEQUATIONSEPARATE + 1)
+#define ES20_BLENDFUNCSEPARATE (ES20_BLENDFUNC + 1)
+#define ES20_BUFFERDATA (ES20_BLENDFUNCSEPARATE + 1)
+#define ES20_BUFFERSUBDATA (ES20_BUFFERDATA + 1)
+#define ES20_CHECKFRAMEBUFFERSTATUS (ES20_BUFFERSUBDATA + 1)
+#define ES20_CLEAR (ES20_CHECKFRAMEBUFFERSTATUS + 1)
+#define ES20_CLEARCOLOR (ES20_CLEAR + 1)
+#define ES20_CLEARDEPTHF (ES20_CLEARCOLOR + 1)
+#define ES20_CLEARSTENCIL (ES20_CLEARDEPTHF + 1)
+#define ES20_COLORMASK (ES20_CLEARSTENCIL + 1)
+#define ES20_COMPILESHADER (ES20_COLORMASK + 1)
+#define ES20_COMPRESSEDTEXIMAGE2D (ES20_COMPILESHADER + 1)
+#define ES20_COMPRESSEDTEXSUBIMAGE2D (ES20_COMPRESSEDTEXIMAGE2D + 1)
+#define ES20_COPYTEXIMAGE2D (ES20_COMPRESSEDTEXSUBIMAGE2D + 1)
+#define ES20_COPYTEXSUBIMAGE2D (ES20_COPYTEXIMAGE2D + 1)
+#define ES20_CREATEPROGRAM (ES20_COPYTEXSUBIMAGE2D + 1)
+#define ES20_CREATESHADER (ES20_CREATEPROGRAM + 1)
+#define ES20_CULLFACE (ES20_CREATESHADER + 1)
+#define ES20_DELETEBUFFERS (ES20_CULLFACE + 1)
+#define ES20_DELETEFRAMEBUFFERS (ES20_DELETEBUFFERS + 1)
+#define ES20_DELETEPROGRAM (ES20_DELETEFRAMEBUFFERS + 1)
+#define ES20_DELETERENDERBUFFERS (ES20_DELETEPROGRAM + 1)
+#define ES20_DELETESHADER (ES20_DELETERENDERBUFFERS + 1)
+#define ES20_DELETETEXTURES (ES20_DELETESHADER + 1)
+#define ES20_DEPTHFUNC (ES20_DELETETEXTURES + 1)
+#define ES20_DEPTHMASK (ES20_DEPTHFUNC + 1)
+#define ES20_DEPTHRANGEF (ES20_DEPTHMASK + 1)
+#define ES20_DETACHSHADER (ES20_DEPTHRANGEF + 1)
+#define ES20_DISABLE (ES20_DETACHSHADER + 1)
+#define ES20_DISABLEVERTEXATTRIBARRAY (ES20_DISABLE + 1)
+#define ES20_DRAWARRAYS (ES20_DISABLEVERTEXATTRIBARRAY + 1)
+#define ES20_DRAWELEMENTS (ES20_DRAWARRAYS + 1)
+#define ES20_ENABLE (ES20_DRAWELEMENTS + 1)
+#define ES20_ENABLEVERTEXATTRIBARRAY (ES20_ENABLE + 1)
+#define ES20_FINISH (ES20_ENABLEVERTEXATTRIBARRAY + 1)
+#define ES20_FLUSH (ES20_FINISH + 1)
+#define ES20_FRAMEBUFFERRENDERBUFFER (ES20_FLUSH + 1)
+#define ES20_FRAMEBUFFERTEXTURE2D (ES20_FRAMEBUFFERRENDERBUFFER + 1)
+#define ES20_FRONTFACE (ES20_FRAMEBUFFERTEXTURE2D + 1)
+#define ES20_GENBUFFERS (ES20_FRONTFACE + 1)
+#define ES20_GENERATEMIPMAP (ES20_GENBUFFERS + 1)
+#define ES20_GENFRAMEBUFFERS (ES20_GENERATEMIPMAP + 1)
+#define ES20_GENRENDERBUFFERS (ES20_GENFRAMEBUFFERS + 1)
+#define ES20_GENTEXTURES (ES20_GENRENDERBUFFERS + 1)
+#define ES20_GETACTIVEATTRIB (ES20_GENTEXTURES + 1)
+#define ES20_GETACTIVEUNIFORM (ES20_GETACTIVEATTRIB + 1)
+#define ES20_GETATTACHEDSHADERS (ES20_GETACTIVEUNIFORM + 1)
+#define ES20_GETATTRIBLOCATION (ES20_GETATTACHEDSHADERS + 1)
+#define ES20_GETBOOLEANV (ES20_GETATTRIBLOCATION + 1)
+#define ES20_GETBUFFERPARAMETERIV (ES20_GETBOOLEANV + 1)
+#define ES20_GETERROR (ES20_GETBUFFERPARAMETERIV + 1)
+#define ES20_GETFLOATV (ES20_GETERROR + 1)
+#define ES20_GETFRAMEBUFFERATTACHMENTPARAMETERIV (ES20_GETFLOATV + 1)
+#define ES20_GETINTEGERV (ES20_GETFRAMEBUFFERATTACHMENTPARAMETERIV + 1)
+#define ES20_GETPROGRAMIV (ES20_GETINTEGERV + 1)
+#define ES20_GETPROGRAMINFOLOG (ES20_GETPROGRAMIV + 1)
+#define ES20_GETRENDERBUFFERPARAMETERIV (ES20_GETPROGRAMINFOLOG + 1)
+#define ES20_GETSHADERIV (ES20_GETRENDERBUFFERPARAMETERIV + 1)
+#define ES20_GETSHADERINFOLOG (ES20_GETSHADERIV + 1)
+#define ES20_GETSHADERPRECISIONFORMAT (ES20_GETSHADERINFOLOG + 1)
+#define ES20_GETSHADERSOURCE (ES20_GETSHADERPRECISIONFORMAT + 1)
+#define ES20_GETSTRING (ES20_GETSHADERSOURCE + 1)
+#define ES20_GETTEXPARAMETERFV (ES20_GETSTRING + 1)
+#define ES20_GETTEXPARAMETERIV (ES20_GETTEXPARAMETERFV + 1)
+#define ES20_GETUNIFORMFV (ES20_GETTEXPARAMETERIV + 1)
+#define ES20_GETUNIFORMIV (ES20_GETUNIFORMFV + 1)
+#define ES20_GETUNIFORMLOCATION (ES20_GETUNIFORMIV + 1)
+#define ES20_GETVERTEXATTRIBFV (ES20_GETUNIFORMLOCATION + 1)
+#define ES20_GETVERTEXATTRIBIV (ES20_GETVERTEXATTRIBFV + 1)
+#define ES20_GETVERTEXATTRIBPOINTERV (ES20_GETVERTEXATTRIBIV + 1)
+#define ES20_HINT (ES20_GETVERTEXATTRIBPOINTERV + 1)
+#define ES20_ISBUFFER (ES20_HINT + 1)
+#define ES20_ISENABLED (ES20_ISBUFFER + 1)
+#define ES20_ISFRAMEBUFFER (ES20_ISENABLED + 1)
+#define ES20_ISPROGRAM (ES20_ISFRAMEBUFFER + 1)
+#define ES20_ISRENDERBUFFER (ES20_ISPROGRAM + 1)
+#define ES20_ISSHADER (ES20_ISRENDERBUFFER + 1)
+#define ES20_ISTEXTURE (ES20_ISSHADER + 1)
+#define ES20_LINEWIDTH (ES20_ISTEXTURE + 1)
+#define ES20_LINKPROGRAM (ES20_LINEWIDTH + 1)
+#define ES20_PIXELSTOREI (ES20_LINKPROGRAM + 1)
+#define ES20_POLYGONOFFSET (ES20_PIXELSTOREI + 1)
+#define ES20_READPIXELS (ES20_POLYGONOFFSET + 1)
+#define ES20_RELEASESHADERCOMPILER (ES20_READPIXELS + 1)
+#define ES20_RENDERBUFFERSTORAGE (ES20_RELEASESHADERCOMPILER + 1)
+#define ES20_SAMPLECOVERAGE (ES20_RENDERBUFFERSTORAGE + 1)
+#define ES20_SCISSOR (ES20_SAMPLECOVERAGE + 1)
+#define ES20_SHADERBINARY (ES20_SCISSOR + 1)
+#define ES20_SHADERSOURCE (ES20_SHADERBINARY + 1)
+#define ES20_STENCILFUNC (ES20_SHADERSOURCE + 1)
+#define ES20_STENCILFUNCSEPARATE (ES20_STENCILFUNC + 1)
+#define ES20_STENCILMASK (ES20_STENCILFUNCSEPARATE + 1)
+#define ES20_STENCILMASKSEPARATE (ES20_STENCILMASK + 1)
+#define ES20_STENCILOP (ES20_STENCILMASKSEPARATE + 1)
+#define ES20_STENCILOPSEPARATE (ES20_STENCILOP + 1)
+#define ES20_TEXIMAGE2D (ES20_STENCILOPSEPARATE + 1)
+#define ES20_TEXPARAMETERF (ES20_TEXIMAGE2D + 1)
+#define ES20_TEXPARAMETERFV (ES20_TEXPARAMETERF + 1)
+#define ES20_TEXPARAMETERI (ES20_TEXPARAMETERFV + 1)
+#define ES20_TEXPARAMETERIV (ES20_TEXPARAMETERI + 1)
+#define ES20_TEXSUBIMAGE2D (ES20_TEXPARAMETERIV + 1)
+#define ES20_UNIFORM1F (ES20_TEXSUBIMAGE2D + 1)
+#define ES20_UNIFORM1FV (ES20_UNIFORM1F + 1)
+#define ES20_UNIFORM1I (ES20_UNIFORM1FV + 1)
+#define ES20_UNIFORM1IV (ES20_UNIFORM1I + 1)
+#define ES20_UNIFORM2F (ES20_UNIFORM1IV + 1)
+#define ES20_UNIFORM2FV (ES20_UNIFORM2F + 1)
+#define ES20_UNIFORM2I (ES20_UNIFORM2FV + 1)
+#define ES20_UNIFORM2IV (ES20_UNIFORM2I + 1)
+#define ES20_UNIFORM3F (ES20_UNIFORM2IV + 1)
+#define ES20_UNIFORM3FV (ES20_UNIFORM3F + 1)
+#define ES20_UNIFORM3I (ES20_UNIFORM3FV + 1)
+#define ES20_UNIFORM3IV (ES20_UNIFORM3I + 1)
+#define ES20_UNIFORM4F (ES20_UNIFORM3IV + 1)
+#define ES20_UNIFORM4FV (ES20_UNIFORM4F + 1)
+#define ES20_UNIFORM4I (ES20_UNIFORM4FV + 1)
+#define ES20_UNIFORM4IV (ES20_UNIFORM4I + 1)
+#define ES20_UNIFORMMATRIX2FV (ES20_UNIFORM4IV + 1)
+#define ES20_UNIFORMMATRIX3FV (ES20_UNIFORMMATRIX2FV + 1)
+#define ES20_UNIFORMMATRIX4FV (ES20_UNIFORMMATRIX3FV + 1)
+#define ES20_USEPROGRAM (ES20_UNIFORMMATRIX4FV + 1)
+#define ES20_VALIDATEPROGRAM (ES20_USEPROGRAM + 1)
+#define ES20_VERTEXATTRIB1F (ES20_VALIDATEPROGRAM + 1)
+#define ES20_VERTEXATTRIB1FV (ES20_VERTEXATTRIB1F + 1)
+#define ES20_VERTEXATTRIB2F (ES20_VERTEXATTRIB1FV + 1)
+#define ES20_VERTEXATTRIB2FV (ES20_VERTEXATTRIB2F + 1)
+#define ES20_VERTEXATTRIB3F (ES20_VERTEXATTRIB2FV + 1)
+#define ES20_VERTEXATTRIB3FV (ES20_VERTEXATTRIB3F + 1)
+#define ES20_VERTEXATTRIB4F (ES20_VERTEXATTRIB3FV + 1)
+#define ES20_VERTEXATTRIB4FV (ES20_VERTEXATTRIB4F + 1)
+#define ES20_VERTEXATTRIBPOINTER (ES20_VERTEXATTRIB4FV + 1)
+#define ES20_VIEWPORT (ES20_VERTEXATTRIBPOINTER + 1)
+#define ES20_GETPROGRAMBINARYOES (ES20_VIEWPORT + 1)
+#define ES20_PROGRAMBINARYOES (ES20_GETPROGRAMBINARYOES + 1)
+#define ES20_TEXIMAGE3DOES (ES20_PROGRAMBINARYOES + 1)
+#define ES20_TEXSUBIMAGE3DOES (ES20_TEXIMAGE3DOES + 1)
+#define ES20_COPYSUBIMAGE3DOES (ES20_TEXSUBIMAGE3DOES + 1)
+#define ES20_COMPRESSEDTEXIMAGE3DOES (ES20_COPYSUBIMAGE3DOES + 1)
+#define ES20_COMPRESSEDTEXSUBIMAGE3DOES (ES20_COMPRESSEDTEXIMAGE3DOES + 1)
+#define ES20_FRAMEBUFFERTEXTURE3DOES (ES20_COMPRESSEDTEXSUBIMAGE3DOES + 1)
+#define ES20_BINDVERTEXARRAYOES (ES20_FRAMEBUFFERTEXTURE3DOES + 1)
+#define ES20_GENVERTEXARRAYOES (ES20_BINDVERTEXARRAYOES + 1)
+#define ES20_ISVERTEXARRAYOES (ES20_GENVERTEXARRAYOES + 1)
+#define ES20_DELETEVERTEXARRAYOES (ES20_ISVERTEXARRAYOES + 1)
+#define ES20_GLMAPBUFFEROES (ES20_DELETEVERTEXARRAYOES + 1)
+#define ES20_GLUNMAPBUFFEROES (ES20_GLMAPBUFFEROES + 1)
+#define ES20_GLGETBUFFERPOINTERVOES (ES20_GLUNMAPBUFFEROES + 1)
+#define ES20_DISCARDFRAMEBUFFEREXT (ES20_GLGETBUFFERPOINTERVOES + 1)
+#define ES20_CALLS (ES20_DISCARDFRAMEBUFFEREXT + 1)
+#define ES20_DRAWCALLS (ES20_CALLS + 1)
+#define ES20_STATECHANGECALLS (ES20_DRAWCALLS + 1)
+#define ES20_POINTCOUNT (ES20_STATECHANGECALLS + 1)
+#define ES20_LINECOUNT (ES20_POINTCOUNT + 1)
+#define ES20_TRIANGLECOUNT (ES20_LINECOUNT + 1)
+
+/* OpenVG API IDs. */
+#define VG11_APPENDPATH 1
+#define VG11_APPENDPATHDATA (VG11_APPENDPATH + 1)
+#define VG11_CHILDIMAGE (VG11_APPENDPATHDATA + 1)
+#define VG11_CLEAR (VG11_CHILDIMAGE + 1)
+#define VG11_CLEARGLYPH (VG11_CLEAR + 1)
+#define VG11_CLEARIMAGE (VG11_CLEARGLYPH + 1)
+#define VG11_CLEARPATH (VG11_CLEARIMAGE + 1)
+#define VG11_COLORMATRIX (VG11_CLEARPATH + 1)
+#define VG11_CONVOLVE (VG11_COLORMATRIX + 1)
+#define VG11_COPYIMAGE (VG11_CONVOLVE + 1)
+#define VG11_COPYMASK (VG11_COPYIMAGE + 1)
+#define VG11_COPYPIXELS (VG11_COPYMASK + 1)
+#define VG11_CREATEFONT (VG11_COPYPIXELS + 1)
+#define VG11_CREATEIMAGE (VG11_CREATEFONT + 1)
+#define VG11_CREATEMASKLAYER (VG11_CREATEIMAGE + 1)
+#define VG11_CREATEPAINT (VG11_CREATEMASKLAYER + 1)
+#define VG11_CREATEPATH (VG11_CREATEPAINT + 1)
+#define VG11_DESTROYFONT (VG11_CREATEPATH + 1)
+#define VG11_DESTROYIMAGE (VG11_DESTROYFONT + 1)
+#define VG11_DESTROYMASKLAYER (VG11_DESTROYIMAGE + 1)
+#define VG11_DESTROYPAINT (VG11_DESTROYMASKLAYER + 1)
+#define VG11_DESTROYPATH (VG11_DESTROYPAINT + 1)
+#define VG11_DRAWGLYPH (VG11_DESTROYPATH + 1)
+#define VG11_DRAWGLYPHS (VG11_DRAWGLYPH + 1)
+#define VG11_DRAWIMAGE (VG11_DRAWGLYPHS + 1)
+#define VG11_DRAWPATH (VG11_DRAWIMAGE + 1)
+#define VG11_FILLMASKLAYER (VG11_DRAWPATH + 1)
+#define VG11_FINISH (VG11_FILLMASKLAYER + 1)
+#define VG11_FLUSH (VG11_FINISH + 1)
+#define VG11_GAUSSIANBLUR (VG11_FLUSH + 1)
+#define VG11_GETCOLOR (VG11_GAUSSIANBLUR + 1)
+#define VG11_GETERROR (VG11_GETCOLOR + 1)
+#define VG11_GETF (VG11_GETERROR + 1)
+#define VG11_GETFV (VG11_GETF + 1)
+#define VG11_GETI (VG11_GETFV + 1)
+#define VG11_GETIMAGESUBDATA (VG11_GETI + 1)
+#define VG11_GETIV (VG11_GETIMAGESUBDATA + 1)
+#define VG11_GETMATRIX (VG11_GETIV + 1)
+#define VG11_GETPAINT (VG11_GETMATRIX + 1)
+#define VG11_GETPARAMETERF (VG11_GETPAINT + 1)
+#define VG11_GETPARAMETERFV (VG11_GETPARAMETERF + 1)
+#define VG11_GETPARAMETERI (VG11_GETPARAMETERFV + 1)
+#define VG11_GETPARAMETERIV (VG11_GETPARAMETERI + 1)
+#define VG11_GETPARAMETERVECTORSIZE (VG11_GETPARAMETERIV + 1)
+#define VG11_GETPARENT (VG11_GETPARAMETERVECTORSIZE + 1)
+#define VG11_GETPATHCAPABILITIES (VG11_GETPARENT + 1)
+#define VG11_GETPIXELS (VG11_GETPATHCAPABILITIES + 1)
+#define VG11_GETSTRING (VG11_GETPIXELS + 1)
+#define VG11_GETVECTORSIZE (VG11_GETSTRING + 1)
+#define VG11_HARDWAREQUERY (VG11_GETVECTORSIZE + 1)
+#define VG11_IMAGESUBDATA (VG11_HARDWAREQUERY + 1)
+#define VG11_INTERPOLATEPATH (VG11_IMAGESUBDATA + 1)
+#define VG11_LOADIDENTITY (VG11_INTERPOLATEPATH + 1)
+#define VG11_LOADMATRIX (VG11_LOADIDENTITY + 1)
+#define VG11_LOOKUP (VG11_LOADMATRIX + 1)
+#define VG11_LOOKUPSINGLE (VG11_LOOKUP + 1)
+#define VG11_MASK (VG11_LOOKUPSINGLE + 1)
+#define VG11_MODIFYPATHCOORDS (VG11_MASK + 1)
+#define VG11_MULTMATRIX (VG11_MODIFYPATHCOORDS + 1)
+#define VG11_PAINTPATTERN (VG11_MULTMATRIX + 1)
+#define VG11_PATHBOUNDS (VG11_PAINTPATTERN + 1)
+#define VG11_PATHLENGTH (VG11_PATHBOUNDS + 1)
+#define VG11_PATHTRANSFORMEDBOUNDS (VG11_PATHLENGTH + 1)
+#define VG11_POINTALONGPATH (VG11_PATHTRANSFORMEDBOUNDS + 1)
+#define VG11_READPIXELS (VG11_POINTALONGPATH + 1)
+#define VG11_REMOVEPATHCAPABILITIES (VG11_READPIXELS + 1)
+#define VG11_RENDERTOMASK (VG11_REMOVEPATHCAPABILITIES + 1)
+#define VG11_ROTATE (VG11_RENDERTOMASK + 1)
+#define VG11_SCALE (VG11_ROTATE + 1)
+#define VG11_SEPARABLECONVOLVE (VG11_SCALE + 1)
+#define VG11_SETCOLOR (VG11_SEPARABLECONVOLVE + 1)
+#define VG11_SETF (VG11_SETCOLOR + 1)
+#define VG11_SETFV (VG11_SETF + 1)
+#define VG11_SETGLYPHTOIMAGE (VG11_SETFV + 1)
+#define VG11_SETGLYPHTOPATH (VG11_SETGLYPHTOIMAGE + 1)
+#define VG11_SETI (VG11_SETGLYPHTOPATH + 1)
+#define VG11_SETIV (VG11_SETI + 1)
+#define VG11_SETPAINT (VG11_SETIV + 1)
+#define VG11_SETPARAMETERF (VG11_SETPAINT + 1)
+#define VG11_SETPARAMETERFV (VG11_SETPARAMETERF + 1)
+#define VG11_SETPARAMETERI (VG11_SETPARAMETERFV + 1)
+#define VG11_SETPARAMETERIV (VG11_SETPARAMETERI + 1)
+#define VG11_SETPIXELS (VG11_SETPARAMETERIV + 1)
+#define VG11_SHEAR (VG11_SETPIXELS + 1)
+#define VG11_TRANSFORMPATH (VG11_SHEAR + 1)
+#define VG11_TRANSLATE (VG11_TRANSFORMPATH + 1)
+#define VG11_WRITEPIXELS (VG11_TRANSLATE + 1)
+#define VG11_CALLS (VG11_WRITEPIXELS + 1)
+#define VG11_DRAWCALLS (VG11_CALLS + 1)
+#define VG11_STATECHANGECALLS (VG11_DRAWCALLS + 1)
+#define VG11_FILLCOUNT (VG11_STATECHANGECALLS + 1)
+#define VG11_STROKECOUNT (VG11_FILLCOUNT + 1)
+/* End of Driver API ID Definitions. */
+
+/* HAL & MISC IDs. */
+#define HAL_VERTBUFNEWBYTEALLOC 1
+#define HAL_VERTBUFTOTALBYTEALLOC (HAL_VERTBUFNEWBYTEALLOC + 1)
+#define HAL_VERTBUFNEWOBJALLOC (HAL_VERTBUFTOTALBYTEALLOC + 1)
+#define HAL_VERTBUFTOTALOBJALLOC (HAL_VERTBUFNEWOBJALLOC + 1)
+#define HAL_INDBUFNEWBYTEALLOC (HAL_VERTBUFTOTALOBJALLOC + 1)
+#define HAL_INDBUFTOTALBYTEALLOC (HAL_INDBUFNEWBYTEALLOC + 1)
+#define HAL_INDBUFNEWOBJALLOC (HAL_INDBUFTOTALBYTEALLOC + 1)
+#define HAL_INDBUFTOTALOBJALLOC (HAL_INDBUFNEWOBJALLOC + 1)
+#define HAL_TEXBUFNEWBYTEALLOC (HAL_INDBUFTOTALOBJALLOC + 1)
+#define HAL_TEXBUFTOTALBYTEALLOC (HAL_TEXBUFNEWBYTEALLOC + 1)
+#define HAL_TEXBUFNEWOBJALLOC (HAL_TEXBUFTOTALBYTEALLOC + 1)
+#define HAL_TEXBUFTOTALOBJALLOC (HAL_TEXBUFNEWOBJALLOC + 1)
+
+#define GPU_CYCLES 1
+#define GPU_READ64BYTE (GPU_CYCLES + 1)
+#define GPU_WRITE64BYTE (GPU_READ64BYTE + 1)
+#define GPU_TOTALCYCLES (GPU_WRITE64BYTE + 1)
+#define GPU_IDLECYCLES (GPU_TOTALCYCLES + 1)
+
+#define VS_INSTCOUNT 1
+#define VS_BRANCHINSTCOUNT (VS_INSTCOUNT + 1)
+#define VS_TEXLDINSTCOUNT (VS_BRANCHINSTCOUNT + 1)
+#define VS_RENDEREDVERTCOUNT (VS_TEXLDINSTCOUNT + 1)
+
+#define PS_INSTCOUNT 1
+#define PS_BRANCHINSTCOUNT (PS_INSTCOUNT + 1)
+#define PS_TEXLDINSTCOUNT (PS_BRANCHINSTCOUNT + 1)
+#define PS_RENDEREDPIXCOUNT (PS_TEXLDINSTCOUNT + 1)
+
+#define PA_INVERTCOUNT 1
+#define PA_INPRIMCOUNT (PA_INVERTCOUNT + 1)
+#define PA_OUTPRIMCOUNT (PA_INPRIMCOUNT + 1)
+#define PA_DEPTHCLIPCOUNT (PA_OUTPRIMCOUNT + 1)
+#define PA_TRIVIALREJCOUNT (PA_DEPTHCLIPCOUNT + 1)
+#define PA_CULLCOUNT (PA_TRIVIALREJCOUNT + 1)
+
+#define SE_TRIANGLECOUNT 1
+#define SE_LINECOUNT (SE_TRIANGLECOUNT + 1)
+
+#define RA_VALIDPIXCOUNT 1
+#define RA_TOTALQUADCOUNT (RA_VALIDPIXCOUNT + 1)
+#define RA_VALIDQUADCOUNTEZ (RA_TOTALQUADCOUNT + 1)
+#define RA_TOTALPRIMCOUNT (RA_VALIDQUADCOUNTEZ + 1)
+#define RA_PIPECACHEMISSCOUNT (RA_TOTALPRIMCOUNT + 1)
+#define RA_PREFCACHEMISSCOUNT (RA_PIPECACHEMISSCOUNT + 1)
+#define RA_EEZCULLCOUNT (RA_PREFCACHEMISSCOUNT + 1)
+
+#define TX_TOTBILINEARREQ 1
+#define TX_TOTTRILINEARREQ (TX_TOTBILINEARREQ + 1)
+#define TX_TOTDISCARDTEXREQ (TX_TOTTRILINEARREQ + 1)
+#define TX_TOTTEXREQ (TX_TOTDISCARDTEXREQ + 1)
+#define TX_MEMREADCOUNT (TX_TOTTEXREQ + 1)
+#define TX_MEMREADIN8BCOUNT (TX_MEMREADCOUNT + 1)
+#define TX_CACHEMISSCOUNT (TX_MEMREADIN8BCOUNT + 1)
+#define TX_CACHEHITTEXELCOUNT (TX_CACHEMISSCOUNT + 1)
+#define TX_CACHEMISSTEXELCOUNT (TX_CACHEHITTEXELCOUNT + 1)
+
+#define PE_KILLEDBYCOLOR 1
+#define PE_KILLEDBYDEPTH (PE_KILLEDBYCOLOR + 1)
+#define PE_DRAWNBYCOLOR (PE_KILLEDBYDEPTH + 1)
+#define PE_DRAWNBYDEPTH (PE_DRAWNBYCOLOR + 1)
+
+#define MC_READREQ8BPIPE 1
+#define MC_READREQ8BIP (MC_READREQ8BPIPE + 1)
+#define MC_WRITEREQ8BPIPE (MC_READREQ8BIP + 1)
+
+#define AXI_READREQSTALLED 1
+#define AXI_WRITEREQSTALLED (AXI_READREQSTALLED + 1)
+#define AXI_WRITEDATASTALLED (AXI_WRITEREQSTALLED + 1)
+
+#define PVS_INSTRCOUNT 1
+#define PVS_ALUINSTRCOUNT (PVS_INSTRCOUNT + 1)
+#define PVS_TEXINSTRCOUNT (PVS_ALUINSTRCOUNT + 1)
+#define PVS_ATTRIBCOUNT (PVS_TEXINSTRCOUNT + 1)
+#define PVS_UNIFORMCOUNT (PVS_ATTRIBCOUNT + 1)
+#define PVS_FUNCTIONCOUNT (PVS_UNIFORMCOUNT + 1)
+
+#define PPS_INSTRCOUNT 1
+#define PPS_ALUINSTRCOUNT (PPS_INSTRCOUNT + 1)
+#define PPS_TEXINSTRCOUNT (PPS_ALUINSTRCOUNT + 1)
+#define PPS_ATTRIBCOUNT (PPS_TEXINSTRCOUNT + 1)
+#define PPS_UNIFORMCOUNT (PPS_ATTRIBCOUNT + 1)
+#define PPS_FUNCTIONCOUNT (PPS_UNIFORMCOUNT + 1)
+/* End of MISC Counter IDs. */
+
+#ifdef gcdNEW_PROFILER_FILE
+
+/* Category Constants. */
+#define VPHEADER 0x010000
+#define VPG_INFO 0x020000
+#define VPG_TIME 0x030000
+#define VPG_MEM 0x040000
+#define VPG_ES11 0x050000
+#define VPG_ES20 0x060000
+#define VPG_VG11 0x070000
+#define VPG_HAL 0x080000
+#define VPG_HW 0x090000
+#define VPG_GPU 0x0a0000
+#define VPG_VS 0x0b0000
+#define VPG_PS 0x0c0000
+#define VPG_PA 0x0d0000
+#define VPG_SETUP 0x0e0000
+#define VPG_RA 0x0f0000
+#define VPG_TX 0x100000
+#define VPG_PE 0x110000
+#define VPG_MC 0x120000
+#define VPG_AXI 0x130000
+#define VPG_PROG 0x140000
+#define VPG_PVS 0x150000
+#define VPG_PPS 0x160000
+#define VPG_ES11_TIME 0x170000
+#define VPG_ES20_TIME 0x180000
+#define VPG_FRAME 0x190000
+#define VPG_ES11_DRAW 0x200000
+#define VPG_ES20_DRAW 0x210000
+#define VPG_END 0xff0000
+
+/* Info. */
+#define VPC_INFOCOMPANY (VPG_INFO + 1)
+#define VPC_INFOVERSION (VPC_INFOCOMPANY + 1)
+#define VPC_INFORENDERER (VPC_INFOVERSION + 1)
+#define VPC_INFOREVISION (VPC_INFORENDERER + 1)
+#define VPC_INFODRIVER (VPC_INFOREVISION + 1)
+#define VPC_INFODRIVERMODE (VPC_INFODRIVER + 1)
+#define VPC_INFOSCREENSIZE (VPC_INFODRIVERMODE + 1)
+
+/* Counter Constants. */
+#define VPC_ELAPSETIME (VPG_TIME + 1)
+#define VPC_CPUTIME (VPC_ELAPSETIME + 1)
+
+#define VPC_MEMMAXRES (VPG_MEM + 1)
+#define VPC_MEMSHARED (VPC_MEMMAXRES + 1)
+#define VPC_MEMUNSHAREDDATA (VPC_MEMSHARED + 1)
+#define VPC_MEMUNSHAREDSTACK (VPC_MEMUNSHAREDDATA + 1)
+
+/* OpenGL ES11 Counters. */
+#define VPC_ES11ACTIVETEXTURE (VPG_ES11 + ES11_ACTIVETEXTURE)
+#define VPC_ES11ALPHAFUNC (VPG_ES11 + ES11_ALPHAFUNC)
+#define VPC_ES11ALPHAFUNCX (VPG_ES11 + ES11_ALPHAFUNCX)
+#define VPC_ES11BINDBUFFER (VPG_ES11 + ES11_BINDBUFFER)
+#define VPC_ES11BINDTEXTURE (VPG_ES11 + ES11_BINDTEXTURE)
+#define VPC_ES11BLENDFUNC (VPG_ES11 + ES11_BLENDFUNC)
+#define VPC_ES11BUFFERDATA (VPG_ES11 + ES11_BUFFERDATA)
+#define VPC_ES11BUFFERSUBDATA (VPG_ES11 + ES11_BUFFERSUBDATA)
+#define VPC_ES11CLEAR (VPG_ES11 + ES11_CLEAR)
+#define VPC_ES11CLEARCOLOR (VPG_ES11 + ES11_CLEARCOLOR)
+#define VPC_ES11CLEARCOLORX (VPG_ES11 + ES11_CLEARCOLORX)
+#define VPC_ES11CLEARDEPTHF (VPG_ES11 + ES11_CLEARDEPTHF)
+#define VPC_ES11CLEARDEPTHX (VPG_ES11 + ES11_CLEARDEPTHX)
+#define VPC_ES11CLEARSTENCIL (VPG_ES11 + ES11_CLEARSTENCIL)
+#define VPC_ES11CLIENTACTIVETEXTURE (VPG_ES11 + ES11_CLIENTACTIVETEXTURE)
+#define VPC_ES11CLIPPLANEF (VPG_ES11 + ES11_CLIPPLANEF)
+#define VPC_ES11CLIPPLANEX (VPG_ES11 + ES11_CLIPPLANEX)
+#define VPC_ES11COLOR4F (VPG_ES11 + ES11_COLOR4F)
+#define VPC_ES11COLOR4UB (VPG_ES11 + ES11_COLOR4UB)
+#define VPC_ES11COLOR4X (VPG_ES11 + ES11_COLOR4X)
+#define VPC_ES11COLORMASK (VPG_ES11 + ES11_COLORMASK)
+#define VPC_ES11COLORPOINTER (VPG_ES11 + ES11_COLORPOINTER)
+#define VPC_ES11COMPRESSEDTEXIMAGE2D (VPG_ES11 + ES11_COMPRESSEDTEXIMAGE2D)
+#define VPC_ES11COMPRESSEDTEXSUBIMAGE2D (VPG_ES11 + ES11_COMPRESSEDTEXSUBIMAGE2D)
+#define VPC_ES11COPYTEXIMAGE2D (VPG_ES11 + ES11_COPYTEXIMAGE2D)
+#define VPC_ES11COPYTEXSUBIMAGE2D (VPG_ES11 + ES11_COPYTEXSUBIMAGE2D)
+#define VPC_ES11CULLFACE (VPG_ES11 + ES11_CULLFACE)
+#define VPC_ES11DELETEBUFFERS (VPG_ES11 + ES11_DELETEBUFFERS)
+#define VPC_ES11DELETETEXTURES (VPG_ES11 + ES11_DELETETEXTURES)
+#define VPC_ES11DEPTHFUNC (VPG_ES11 + ES11_DEPTHFUNC)
+#define VPC_ES11DEPTHMASK (VPG_ES11 + ES11_DEPTHMASK)
+#define VPC_ES11DEPTHRANGEF (VPG_ES11 + ES11_DEPTHRANGEF)
+#define VPC_ES11DEPTHRANGEX (VPG_ES11 + ES11_DEPTHRANGEX)
+#define VPC_ES11DISABLE (VPG_ES11 + ES11_DISABLE)
+#define VPC_ES11DISABLECLIENTSTATE (VPG_ES11 + ES11_DISABLECLIENTSTATE)
+#define VPC_ES11DRAWARRAYS (VPG_ES11 + ES11_DRAWARRAYS)
+#define VPC_ES11DRAWELEMENTS (VPG_ES11 + ES11_DRAWELEMENTS)
+#define VPC_ES11ENABLE (VPG_ES11 + ES11_ENABLE)
+#define VPC_ES11ENABLECLIENTSTATE (VPG_ES11 + ES11_ENABLECLIENTSTATE)
+#define VPC_ES11FINISH (VPG_ES11 + ES11_FINISH)
+#define VPC_ES11FLUSH (VPG_ES11 + ES11_FLUSH)
+#define VPC_ES11FOGF (VPG_ES11 + ES11_FOGF)
+#define VPC_ES11FOGFV (VPG_ES11 + ES11_FOGFV)
+#define VPC_ES11FOGX (VPG_ES11 + ES11_FOGX)
+#define VPC_ES11FOGXV (VPG_ES11 + ES11_FOGXV)
+#define VPC_ES11FRONTFACE (VPG_ES11 + ES11_FRONTFACE)
+#define VPC_ES11FRUSTUMF (VPG_ES11 + ES11_FRUSTUMF)
+#define VPC_ES11FRUSTUMX (VPG_ES11 + ES11_FRUSTUMX)
+#define VPC_ES11GENBUFFERS (VPG_ES11 + ES11_GENBUFFERS)
+#define VPC_ES11GENTEXTURES (VPG_ES11 + ES11_GENTEXTURES)
+#define VPC_ES11GETBOOLEANV (VPG_ES11 + ES11_GETBOOLEANV)
+#define VPC_ES11GETBUFFERPARAMETERIV (VPG_ES11 + ES11_GETBUFFERPARAMETERIV)
+#define VPC_ES11GETCLIPPLANEF (VPG_ES11 + ES11_GETCLIPPLANEF)
+#define VPC_ES11GETCLIPPLANEX (VPG_ES11 + ES11_GETCLIPPLANEX)
+#define VPC_ES11GETERROR (VPG_ES11 + ES11_GETERROR)
+#define VPC_ES11GETFIXEDV (VPG_ES11 + ES11_GETFIXEDV)
+#define VPC_ES11GETFLOATV (VPG_ES11 + ES11_GETFLOATV)
+#define VPC_ES11GETINTEGERV (VPG_ES11 + ES11_GETINTEGERV)
+#define VPC_ES11GETLIGHTFV (VPG_ES11 + ES11_GETLIGHTFV)
+#define VPC_ES11GETLIGHTXV (VPG_ES11 + ES11_GETLIGHTXV)
+#define VPC_ES11GETMATERIALFV (VPG_ES11 + ES11_GETMATERIALFV)
+#define VPC_ES11GETMATERIALXV (VPG_ES11 + ES11_GETMATERIALXV)
+#define VPC_ES11GETPOINTERV (VPG_ES11 + ES11_GETPOINTERV)
+#define VPC_ES11GETSTRING (VPG_ES11 + ES11_GETSTRING)
+#define VPC_ES11GETTEXENVFV (VPG_ES11 + ES11_GETTEXENVFV)
+#define VPC_ES11GETTEXENVIV (VPG_ES11 + ES11_GETTEXENVIV)
+#define VPC_ES11GETTEXENVXV (VPG_ES11 + ES11_GETTEXENVXV)
+#define VPC_ES11GETTEXPARAMETERFV (VPG_ES11 + ES11_GETTEXPARAMETERFV)
+#define VPC_ES11GETTEXPARAMETERIV (VPG_ES11 + ES11_GETTEXPARAMETERIV)
+#define VPC_ES11GETTEXPARAMETERXV (VPG_ES11 + ES11_GETTEXPARAMETERXV)
+#define VPC_ES11HINT (VPG_ES11 + ES11_HINT)
+#define VPC_ES11ISBUFFER (VPG_ES11 + ES11_ISBUFFER)
+#define VPC_ES11ISENABLED (VPG_ES11 + ES11_ISENABLED)
+#define VPC_ES11ISTEXTURE (VPG_ES11 + ES11_ISTEXTURE)
+#define VPC_ES11LIGHTF (VPG_ES11 + ES11_LIGHTF)
+#define VPC_ES11LIGHTFV (VPG_ES11 + ES11_LIGHTFV)
+#define VPC_ES11LIGHTMODELF (VPG_ES11 + ES11_LIGHTMODELF)
+#define VPC_ES11LIGHTMODELFV (VPG_ES11 + ES11_LIGHTMODELFV)
+#define VPC_ES11LIGHTMODELX (VPG_ES11 + ES11_LIGHTMODELX)
+#define VPC_ES11LIGHTMODELXV (VPG_ES11 + ES11_LIGHTMODELXV)
+#define VPC_ES11LIGHTX (VPG_ES11 + ES11_LIGHTX)
+#define VPC_ES11LIGHTXV (VPG_ES11 + ES11_LIGHTXV)
+#define VPC_ES11LINEWIDTH (VPG_ES11 + ES11_LINEWIDTH)
+#define VPC_ES11LINEWIDTHX (VPG_ES11 + ES11_LINEWIDTHX)
+#define VPC_ES11LOADIDENTITY (VPG_ES11 + ES11_LOADIDENTITY)
+#define VPC_ES11LOADMATRIXF (VPG_ES11 + ES11_LOADMATRIXF)
+#define VPC_ES11LOADMATRIXX (VPG_ES11 + ES11_LOADMATRIXX)
+#define VPC_ES11LOGICOP (VPG_ES11 + ES11_LOGICOP)
+#define VPC_ES11MATERIALF (VPG_ES11 + ES11_MATERIALF)
+#define VPC_ES11MATERIALFV (VPG_ES11 + ES11_MATERIALFV)
+#define VPC_ES11MATERIALX (VPG_ES11 + ES11_MATERIALX)
+#define VPC_ES11MATERIALXV (VPG_ES11 + ES11_MATERIALXV)
+#define VPC_ES11MATRIXMODE (VPG_ES11 + ES11_MATRIXMODE)
+#define VPC_ES11MULTITEXCOORD4F (VPG_ES11 + ES11_MULTITEXCOORD4F)
+#define VPC_ES11MULTITEXCOORD4X (VPG_ES11 + ES11_MULTITEXCOORD4X)
+#define VPC_ES11MULTMATRIXF (VPG_ES11 + ES11_MULTMATRIXF)
+#define VPC_ES11MULTMATRIXX (VPG_ES11 + ES11_MULTMATRIXX)
+#define VPC_ES11NORMAL3F (VPG_ES11 + ES11_NORMAL3F)
+#define VPC_ES11NORMAL3X (VPG_ES11 + ES11_NORMAL3X)
+#define VPC_ES11NORMALPOINTER (VPG_ES11 + ES11_NORMALPOINTER)
+#define VPC_ES11ORTHOF (VPG_ES11 + ES11_ORTHOF)
+#define VPC_ES11ORTHOX (VPG_ES11 + ES11_ORTHOX)
+#define VPC_ES11PIXELSTOREI (VPG_ES11 + ES11_PIXELSTOREI)
+#define VPC_ES11POINTPARAMETERF (VPG_ES11 + ES11_POINTPARAMETERF)
+#define VPC_ES11POINTPARAMETERFV (VPG_ES11 + ES11_POINTPARAMETERFV)
+#define VPC_ES11POINTPARAMETERX (VPG_ES11 + ES11_POINTPARAMETERX)
+#define VPC_ES11POINTPARAMETERXV (VPG_ES11 + ES11_POINTPARAMETERXV)
+#define VPC_ES11POINTSIZE (VPG_ES11 + ES11_POINTSIZE)
+#define VPC_ES11POINTSIZEX (VPG_ES11 + ES11_POINTSIZEX)
+#define VPC_ES11POLYGONOFFSET (VPG_ES11 + ES11_POLYGONOFFSET)
+#define VPC_ES11POLYGONOFFSETX (VPG_ES11 + ES11_POLYGONOFFSETX)
+#define VPC_ES11POPMATRIX (VPG_ES11 + ES11_POPMATRIX)
+#define VPC_ES11PUSHMATRIX (VPG_ES11 + ES11_PUSHMATRIX)
+#define VPC_ES11READPIXELS (VPG_ES11 + ES11_READPIXELS)
+#define VPC_ES11ROTATEF (VPG_ES11 + ES11_ROTATEF)
+#define VPC_ES11ROTATEX (VPG_ES11 + ES11_ROTATEX)
+#define VPC_ES11SAMPLECOVERAGE (VPG_ES11 + ES11_SAMPLECOVERAGE)
+#define VPC_ES11SAMPLECOVERAGEX (VPG_ES11 + ES11_SAMPLECOVERAGEX)
+#define VPC_ES11SCALEF (VPG_ES11 + ES11_SCALEF)
+#define VPC_ES11SCALEX (VPG_ES11 + ES11_SCALEX)
+#define VPC_ES11SCISSOR (VPG_ES11 + ES11_SCISSOR)
+#define VPC_ES11SHADEMODEL (VPG_ES11 + ES11_SHADEMODEL)
+#define VPC_ES11STENCILFUNC (VPG_ES11 + ES11_STENCILFUNC)
+#define VPC_ES11STENCILMASK (VPG_ES11 + ES11_STENCILMASK)
+#define VPC_ES11STENCILOP (VPG_ES11 + ES11_STENCILOP)
+#define VPC_ES11TEXCOORDPOINTER (VPG_ES11 + ES11_TEXCOORDPOINTER)
+#define VPC_ES11TEXENVF (VPG_ES11 + ES11_TEXENVF)
+#define VPC_ES11TEXENVFV (VPG_ES11 + ES11_TEXENVFV)
+#define VPC_ES11TEXENVI (VPG_ES11 + ES11_TEXENVI)
+#define VPC_ES11TEXENVIV (VPG_ES11 + ES11_TEXENVIV)
+#define VPC_ES11TEXENVX (VPG_ES11 + ES11_TEXENVX)
+#define VPC_ES11TEXENVXV (VPG_ES11 + ES11_TEXENVXV)
+#define VPC_ES11TEXIMAGE2D (VPG_ES11 + ES11_TEXIMAGE2D)
+#define VPC_ES11TEXPARAMETERF (VPG_ES11 + ES11_TEXPARAMETERF)
+#define VPC_ES11TEXPARAMETERFV (VPG_ES11 + ES11_TEXPARAMETERFV)
+#define VPC_ES11TEXPARAMETERI (VPG_ES11 + ES11_TEXPARAMETERI)
+#define VPC_ES11TEXPARAMETERIV (VPG_ES11 + ES11_TEXPARAMETERIV)
+#define VPC_ES11TEXPARAMETERX (VPG_ES11 + ES11_TEXPARAMETERX)
+#define VPC_ES11TEXPARAMETERXV (VPG_ES11 + ES11_TEXPARAMETERXV)
+#define VPC_ES11TEXSUBIMAGE2D (VPG_ES11 + ES11_TEXSUBIMAGE2D)
+#define VPC_ES11TRANSLATEF (VPG_ES11 + ES11_TRANSLATEF)
+#define VPC_ES11TRANSLATEX (VPG_ES11 + ES11_TRANSLATEX)
+#define VPC_ES11VERTEXPOINTER (VPG_ES11 + ES11_VERTEXPOINTER)
+#define VPC_ES11VIEWPORT (VPG_ES11 + ES11_VIEWPORT)
+/* OpenGL ES11 Statics Counter IDs. */
+#define VPC_ES11CALLS (VPG_ES11 + ES11_CALLS)
+#define VPC_ES11DRAWCALLS (VPG_ES11 + ES11_DRAWCALLS)
+#define VPC_ES11STATECHANGECALLS (VPG_ES11 + ES11_STATECHANGECALLS)
+#define VPC_ES11POINTCOUNT (VPG_ES11 + ES11_POINTCOUNT)
+#define VPC_ES11LINECOUNT (VPG_ES11 + ES11_LINECOUNT)
+#define VPC_ES11TRIANGLECOUNT (VPG_ES11 + ES11_TRIANGLECOUNT)
+
+/* OpenGLES 2.x */
+#define VPC_ES20ACTIVETEXTURE (VPG_ES20 + ES20_ACTIVETEXTURE)
+#define VPC_ES20ATTACHSHADER (VPG_ES20 + ES20_ATTACHSHADER)
+#define VPC_ES20BINDATTRIBLOCATION (VPG_ES20 + ES20_BINDATTRIBLOCATION)
+#define VPC_ES20BINDBUFFER (VPG_ES20 + ES20_BINDBUFFER)
+#define VPC_ES20BINDFRAMEBUFFER (VPG_ES20 + ES20_BINDFRAMEBUFFER)
+#define VPC_ES20BINDRENDERBUFFER (VPG_ES20 + ES20_BINDRENDERBUFFER)
+#define VPC_ES20BINDTEXTURE (VPG_ES20 + ES20_BINDTEXTURE)
+#define VPC_ES20BLENDCOLOR (VPG_ES20 + ES20_BLENDCOLOR)
+#define VPC_ES20BLENDEQUATION (VPG_ES20 + ES20_BLENDEQUATION)
+#define VPC_ES20BLENDEQUATIONSEPARATE (VPG_ES20 + ES20_BLENDEQUATIONSEPARATE)
+#define VPC_ES20BLENDFUNC (VPG_ES20 + ES20_BLENDFUNC)
+#define VPC_ES20BLENDFUNCSEPARATE (VPG_ES20 + ES20_BLENDFUNCSEPARATE)
+#define VPC_ES20BUFFERDATA (VPG_ES20 + ES20_BUFFERDATA)
+#define VPC_ES20BUFFERSUBDATA (VPG_ES20 + ES20_BUFFERSUBDATA)
+#define VPC_ES20CHECKFRAMEBUFFERSTATUS (VPG_ES20 + ES20_CHECKFRAMEBUFFERSTATUS)
+#define VPC_ES20CLEAR (VPG_ES20 + ES20_CLEAR)
+#define VPC_ES20CLEARCOLOR (VPG_ES20 + ES20_CLEARCOLOR)
+#define VPC_ES20CLEARDEPTHF (VPG_ES20 + ES20_CLEARDEPTHF)
+#define VPC_ES20CLEARSTENCIL (VPG_ES20 + ES20_CLEARSTENCIL)
+#define VPC_ES20COLORMASK (VPG_ES20 + ES20_COLORMASK)
+#define VPC_ES20COMPILESHADER (VPG_ES20 + ES20_COMPILESHADER)
+#define VPC_ES20COMPRESSEDTEXIMAGE2D (VPG_ES20 + ES20_COMPRESSEDTEXIMAGE2D)
+#define VPC_ES20COMPRESSEDTEXSUBIMAGE2D (VPG_ES20 + ES20_COMPRESSEDTEXSUBIMAGE2D)
+#define VPC_ES20COPYTEXIMAGE2D (VPG_ES20 + ES20_COPYTEXIMAGE2D)
+#define VPC_ES20COPYTEXSUBIMAGE2D (VPG_ES20 + ES20_COPYTEXSUBIMAGE2D)
+#define VPC_ES20CREATEPROGRAM (VPG_ES20 + ES20_CREATEPROGRAM)
+#define VPC_ES20CREATESHADER (VPG_ES20 + ES20_CREATESHADER)
+#define VPC_ES20CULLFACE (VPG_ES20 + ES20_CULLFACE)
+#define VPC_ES20DELETEBUFFERS (VPG_ES20 + ES20_DELETEBUFFERS)
+#define VPC_ES20DELETEFRAMEBUFFERS (VPG_ES20 + ES20_DELETEFRAMEBUFFERS)
+#define VPC_ES20DELETEPROGRAM (VPG_ES20 + ES20_DELETEPROGRAM)
+#define VPC_ES20DELETERENDERBUFFERS (VPG_ES20 + ES20_DELETERENDERBUFFERS)
+#define VPC_ES20DELETESHADER (VPG_ES20 + ES20_DELETESHADER)
+#define VPC_ES20DELETETEXTURES (VPG_ES20 + ES20_DELETETEXTURES)
+#define VPC_ES20DEPTHFUNC (VPG_ES20 + ES20_DEPTHFUNC)
+#define VPC_ES20DEPTHMASK (VPG_ES20 + ES20_DEPTHMASK)
+#define VPC_ES20DEPTHRANGEF (VPG_ES20 + ES20_DEPTHRANGEF)
+#define VPC_ES20DETACHSHADER (VPG_ES20 + ES20_DETACHSHADER)
+#define VPC_ES20DISABLE (VPG_ES20 + ES20_DISABLE)
+#define VPC_ES20DISABLEVERTEXATTRIBARRAY (VPG_ES20 + ES20_DISABLEVERTEXATTRIBARRAY)
+#define VPC_ES20DRAWARRAYS (VPG_ES20 + ES20_DRAWARRAYS)
+#define VPC_ES20DRAWELEMENTS (VPG_ES20 + ES20_DRAWELEMENTS)
+#define VPC_ES20ENABLE (VPG_ES20 + ES20_ENABLE)
+#define VPC_ES20ENABLEVERTEXATTRIBARRAY (VPG_ES20 + ES20_ENABLEVERTEXATTRIBARRAY)
+#define VPC_ES20FINISH (VPG_ES20 + ES20_FINISH)
+#define VPC_ES20FLUSH (VPG_ES20 + ES20_FLUSH)
+#define VPC_ES20FRAMEBUFFERRENDERBUFFER (VPG_ES20 + ES20_FRAMEBUFFERRENDERBUFFER)
+#define VPC_ES20FRAMEBUFFERTEXTURE2D (VPG_ES20 + ES20_FRAMEBUFFERTEXTURE2D)
+#define VPC_ES20FRONTFACE (VPG_ES20 + ES20_FRONTFACE)
+#define VPC_ES20GENBUFFERS (VPG_ES20 + ES20_GENBUFFERS)
+#define VPC_ES20GENERATEMIPMAP (VPG_ES20 + ES20_GENERATEMIPMAP)
+#define VPC_ES20GENFRAMEBUFFERS (VPG_ES20 + ES20_GENFRAMEBUFFERS)
+#define VPC_ES20GENRENDERBUFFERS (VPG_ES20 + ES20_GENRENDERBUFFERS)
+#define VPC_ES20GENTEXTURES (VPG_ES20 + ES20_GENTEXTURES)
+#define VPC_ES20GETACTIVEATTRIB (VPG_ES20 + ES20_GETACTIVEATTRIB)
+#define VPC_ES20GETACTIVEUNIFORM (VPG_ES20 + ES20_GETACTIVEUNIFORM)
+#define VPC_ES20GETATTACHEDSHADERS (VPG_ES20 + ES20_GETATTACHEDSHADERS)
+#define VPC_ES20GETATTRIBLOCATION (VPG_ES20 + ES20_GETATTRIBLOCATION)
+#define VPC_ES20GETBOOLEANV (VPG_ES20 + ES20_GETBOOLEANV)
+#define VPC_ES20GETBUFFERPARAMETERIV (VPG_ES20 + ES20_GETBUFFERPARAMETERIV)
+#define VPC_ES20GETERROR (VPG_ES20 + ES20_GETERROR)
+#define VPC_ES20GETFLOATV (VPG_ES20 + ES20_GETFLOATV)
+#define VPC_ES20GETFRAMEBUFFERATTACHMENTPARAMETERIV (VPG_ES20 + ES20_GETFRAMEBUFFERATTACHMENTPARAMETERIV)
+#define VPC_ES20GETINTEGERV (VPG_ES20 + ES20_GETINTEGERV)
+#define VPC_ES20GETPROGRAMIV (VPG_ES20 + ES20_GETPROGRAMIV)
+#define VPC_ES20GETPROGRAMINFOLOG (VPG_ES20 + ES20_GETPROGRAMINFOLOG)
+#define VPC_ES20GETRENDERBUFFERPARAMETERIV (VPG_ES20 + ES20_GETRENDERBUFFERPARAMETERIV)
+#define VPC_ES20GETSHADERIV (VPG_ES20 + ES20_GETSHADERIV)
+#define VPC_ES20GETSHADERINFOLOG (VPG_ES20 + ES20_GETSHADERINFOLOG)
+#define VPC_ES20GETSHADERPRECISIONFORMAT (VPG_ES20 + ES20_GETSHADERPRECISIONFORMAT)
+#define VPC_ES20GETSHADERSOURCE (VPG_ES20 + ES20_GETSHADERSOURCE)
+#define VPC_ES20GETSTRING (VPG_ES20 + ES20_GETSTRING)
+#define VPC_ES20GETTEXPARAMETERFV (VPG_ES20 + ES20_GETTEXPARAMETERFV)
+#define VPC_ES20GETTEXPARAMETERIV (VPG_ES20 + ES20_GETTEXPARAMETERIV)
+#define VPC_ES20GETUNIFORMFV (VPG_ES20 + ES20_GETUNIFORMFV)
+#define VPC_ES20GETUNIFORMIV (VPG_ES20 + ES20_GETUNIFORMIV)
+#define VPC_ES20GETUNIFORMLOCATION (VPG_ES20 + ES20_GETUNIFORMLOCATION)
+#define VPC_ES20GETVERTEXATTRIBFV (VPG_ES20 + ES20_GETVERTEXATTRIBFV)
+#define VPC_ES20GETVERTEXATTRIBIV (VPG_ES20 + ES20_GETVERTEXATTRIBIV)
+#define VPC_ES20GETVERTEXATTRIBPOINTERV (VPG_ES20 + ES20_GETVERTEXATTRIBPOINTERV)
+#define VPC_ES20HINT (VPG_ES20 + ES20_HINT)
+#define VPC_ES20ISBUFFER (VPG_ES20 + ES20_ISBUFFER)
+#define VPC_ES20ISENABLED (VPG_ES20 + ES20_ISENABLED)
+#define VPC_ES20ISFRAMEBUFFER (VPG_ES20 + ES20_ISFRAMEBUFFER)
+#define VPC_ES20ISPROGRAM (VPG_ES20 + ES20_ISPROGRAM)
+#define VPC_ES20ISRENDERBUFFER (VPG_ES20 + ES20_ISRENDERBUFFER)
+#define VPC_ES20ISSHADER (VPG_ES20 + ES20_ISSHADER)
+#define VPC_ES20ISTEXTURE (VPG_ES20 + ES20_ISTEXTURE)
+#define VPC_ES20LINEWIDTH (VPG_ES20 + ES20_LINEWIDTH)
+#define VPC_ES20LINKPROGRAM (VPG_ES20 + ES20_LINKPROGRAM)
+#define VPC_ES20PIXELSTOREI (VPG_ES20 + ES20_PIXELSTOREI)
+#define VPC_ES20POLYGONOFFSET (VPG_ES20 + ES20_POLYGONOFFSET)
+#define VPC_ES20READPIXELS (VPG_ES20 + ES20_READPIXELS)
+#define VPC_ES20RELEASESHADERCOMPILER (VPG_ES20 + ES20_RELEASESHADERCOMPILER)
+#define VPC_ES20RENDERBUFFERSTORAGE (VPG_ES20 + ES20_RENDERBUFFERSTORAGE)
+#define VPC_ES20SAMPLECOVERAGE (VPG_ES20 + ES20_SAMPLECOVERAGE)
+#define VPC_ES20SCISSOR (VPG_ES20 + ES20_SCISSOR)
+#define VPC_ES20SHADERBINARY (VPG_ES20 + ES20_SHADERBINARY)
+#define VPC_ES20SHADERSOURCE (VPG_ES20 + ES20_SHADERSOURCE)
+#define VPC_ES20STENCILFUNC (VPG_ES20 + ES20_STENCILFUNC)
+#define VPC_ES20STENCILFUNCSEPARATE (VPG_ES20 + ES20_STENCILFUNCSEPARATE)
+#define VPC_ES20STENCILMASK (VPG_ES20 + ES20_STENCILMASK)
+#define VPC_ES20STENCILMASKSEPARATE (VPG_ES20 + ES20_STENCILMASKSEPARATE)
+#define VPC_ES20STENCILOP (VPG_ES20 + ES20_STENCILOP)
+#define VPC_ES20STENCILOPSEPARATE (VPG_ES20 + ES20_STENCILOPSEPARATE)
+#define VPC_ES20TEXIMAGE2D (VPG_ES20 + ES20_TEXIMAGE2D)
+#define VPC_ES20TEXPARAMETERF (VPG_ES20 + ES20_TEXPARAMETERF)
+#define VPC_ES20TEXPARAMETERFV (VPG_ES20 + ES20_TEXPARAMETERFV)
+#define VPC_ES20TEXPARAMETERI (VPG_ES20 + ES20_TEXPARAMETERI)
+#define VPC_ES20TEXPARAMETERIV (VPG_ES20 + ES20_TEXPARAMETERIV)
+#define VPC_ES20TEXSUBIMAGE2D (VPG_ES20 + ES20_TEXSUBIMAGE2D)
+#define VPC_ES20UNIFORM1F (VPG_ES20 + ES20_UNIFORM1F)
+#define VPC_ES20UNIFORM1FV (VPG_ES20 + ES20_UNIFORM1FV)
+#define VPC_ES20UNIFORM1I (VPG_ES20 + ES20_UNIFORM1I)
+#define VPC_ES20UNIFORM1IV (VPG_ES20 + ES20_UNIFORM1IV)
+#define VPC_ES20UNIFORM2F (VPG_ES20 + ES20_UNIFORM2F)
+#define VPC_ES20UNIFORM2FV (VPG_ES20 + ES20_UNIFORM2FV)
+#define VPC_ES20UNIFORM2I (VPG_ES20 + ES20_UNIFORM2I)
+#define VPC_ES20UNIFORM2IV (VPG_ES20 + ES20_UNIFORM2IV)
+#define VPC_ES20UNIFORM3F (VPG_ES20 + ES20_UNIFORM3F)
+#define VPC_ES20UNIFORM3FV (VPG_ES20 + ES20_UNIFORM3FV)
+#define VPC_ES20UNIFORM3I (VPG_ES20 + ES20_UNIFORM3I)
+#define VPC_ES20UNIFORM3IV (VPG_ES20 + ES20_UNIFORM3IV)
+#define VPC_ES20UNIFORM4F (VPG_ES20 + ES20_UNIFORM4F)
+#define VPC_ES20UNIFORM4FV (VPG_ES20 + ES20_UNIFORM4FV)
+#define VPC_ES20UNIFORM4I (VPG_ES20 + ES20_UNIFORM4I)
+#define VPC_ES20UNIFORM4IV (VPG_ES20 + ES20_UNIFORM4IV)
+#define VPC_ES20UNIFORMMATRIX2FV (VPG_ES20 + ES20_UNIFORMMATRIX2FV)
+#define VPC_ES20UNIFORMMATRIX3FV (VPG_ES20 + ES20_UNIFORMMATRIX3FV)
+#define VPC_ES20UNIFORMMATRIX4FV (VPG_ES20 + ES20_UNIFORMMATRIX4FV)
+#define VPC_ES20USEPROGRAM (VPG_ES20 + ES20_USEPROGRAM)
+#define VPC_ES20VALIDATEPROGRAM (VPG_ES20 + ES20_VALIDATEPROGRAM)
+#define VPC_ES20VERTEXATTRIB1F (VPG_ES20 + ES20_VERTEXATTRIB1F)
+#define VPC_ES20VERTEXATTRIB1FV (VPG_ES20 + ES20_VERTEXATTRIB1FV)
+#define VPC_ES20VERTEXATTRIB2F (VPG_ES20 + ES20_VERTEXATTRIB2F)
+#define VPC_ES20VERTEXATTRIB2FV (VPG_ES20 + ES20_VERTEXATTRIB2FV)
+#define VPC_ES20VERTEXATTRIB3F (VPG_ES20 + ES20_VERTEXATTRIB3F)
+#define VPC_ES20VERTEXATTRIB3FV (VPG_ES20 + ES20_VERTEXATTRIB3FV)
+#define VPC_ES20VERTEXATTRIB4F (VPG_ES20 + ES20_VERTEXATTRIB4F)
+#define VPC_ES20VERTEXATTRIB4FV (VPG_ES20 + ES20_VERTEXATTRIB4FV)
+#define VPC_ES20VERTEXATTRIBPOINTER (VPG_ES20 + ES20_VERTEXATTRIBPOINTER)
+#define VPC_ES20VIEWPORT (VPG_ES20 + ES20_VIEWPORT)
+/* OpenGL ES20 Statistics Counter IDs. */
+#define VPC_ES20CALLS (VPG_ES20 + ES20_CALLS)
+#define VPC_ES20DRAWCALLS (VPG_ES20 + ES20_DRAWCALLS)
+#define VPC_ES20STATECHANGECALLS (VPG_ES20 + ES20_STATECHANGECALLS)
+#define VPC_ES20POINTCOUNT (VPG_ES20 + ES20_POINTCOUNT)
+#define VPC_ES20LINECOUNT (VPG_ES20 + ES20_LINECOUNT)
+#define VPC_ES20TRIANGLECOUNT (VPG_ES20 + ES20_TRIANGLECOUNT)
+
+/* VG11 Counters. */
+#define VPC_VG11APPENDPATH (VPG_VG11 + VG11_APPENDPATH)
+#define VPC_VG11APPENDPATHDATA (VPG_VG11 + VG11_APPENDPATHDATA)
+#define VPC_VG11CHILDIMAGE (VPG_VG11 + VG11_CHILDIMAGE)
+#define VPC_VG11CLEAR (VPG_VG11 + VG11_CLEAR)
+#define VPC_VG11CLEARGLYPH (VPG_VG11 + VG11_CLEARGLYPH)
+#define VPC_VG11CLEARIMAGE (VPG_VG11 + VG11_CLEARIMAGE)
+#define VPC_VG11CLEARPATH (VPG_VG11 + VG11_CLEARPATH)
+#define VPC_VG11COLORMATRIX (VPG_VG11 + VG11_COLORMATRIX)
+#define VPC_VG11CONVOLVE (VPG_VG11 + VG11_CONVOLVE)
+#define VPC_VG11COPYIMAGE (VPG_VG11 + VG11_COPYIMAGE)
+#define VPC_VG11COPYMASK (VPG_VG11 + VG11_COPYMASK)
+#define VPC_VG11COPYPIXELS (VPG_VG11 + VG11_COPYPIXELS)
+#define VPC_VG11CREATEFONT (VPG_VG11 + VG11_CREATEFONT)
+#define VPC_VG11CREATEIMAGE (VPG_VG11 + VG11_CREATEIMAGE)
+#define VPC_VG11CREATEMASKLAYER (VPG_VG11 + VG11_CREATEMASKLAYER)
+#define VPC_VG11CREATEPAINT (VPG_VG11 + VG11_CREATEPAINT)
+#define VPC_VG11CREATEPATH (VPG_VG11 + VG11_CREATEPATH)
+#define VPC_VG11DESTROYFONT (VPG_VG11 + VG11_DESTROYFONT)
+#define VPC_VG11DESTROYIMAGE (VPG_VG11 + VG11_DESTROYIMAGE)
+#define VPC_VG11DESTROYMASKLAYER (VPG_VG11 + VG11_DESTROYMASKLAYER)
+#define VPC_VG11DESTROYPAINT (VPG_VG11 + VG11_DESTROYPAINT)
+#define VPC_VG11DESTROYPATH (VPG_VG11 + VG11_DESTROYPATH)
+#define VPC_VG11DRAWGLYPH (VPG_VG11 + VG11_DRAWGLYPH)
+#define VPC_VG11DRAWGLYPHS (VPG_VG11 + VG11_DRAWGLYPHS)
+#define VPC_VG11DRAWIMAGE (VPG_VG11 + VG11_DRAWIMAGE)
+#define VPC_VG11DRAWPATH (VPG_VG11 + VG11_DRAWPATH)
+#define VPC_VG11FILLMASKLAYER (VPG_VG11 + VG11_FILLMASKLAYER)
+#define VPC_VG11FINISH (VPG_VG11 + VG11_FINISH)
+#define VPC_VG11FLUSH (VPG_VG11 + VG11_FLUSH)
+#define VPC_VG11GAUSSIANBLUR (VPG_VG11 + VG11_GAUSSIANBLUR)
+#define VPC_VG11GETCOLOR (VPG_VG11 + VG11_GETCOLOR)
+#define VPC_VG11GETERROR (VPG_VG11 + VG11_GETERROR)
+#define VPC_VG11GETF (VPG_VG11 + VG11_GETF)
+#define VPC_VG11GETFV (VPG_VG11 + VG11_GETFV)
+#define VPC_VG11GETI (VPG_VG11 + VG11_GETI)
+#define VPC_VG11GETIMAGESUBDATA (VPG_VG11 + VG11_GETIMAGESUBDATA)
+#define VPC_VG11GETIV (VPG_VG11 + VG11_GETIV)
+#define VPC_VG11GETMATRIX (VPG_VG11 + VG11_GETMATRIX)
+#define VPC_VG11GETPAINT (VPG_VG11 + VG11_GETPAINT)
+#define VPC_VG11GETPARAMETERF (VPG_VG11 + VG11_GETPARAMETERF)
+#define VPC_VG11GETPARAMETERFV (VPG_VG11 + VG11_GETPARAMETERFV)
+#define VPC_VG11GETPARAMETERI (VPG_VG11 + VG11_GETPARAMETERI)
+#define VPC_VG11GETPARAMETERIV (VPG_VG11 + VG11_GETPARAMETERIV)
+#define VPC_VG11GETPARAMETERVECTORSIZE (VPG_VG11 + VG11_GETPARAMETERVECTORSIZE)
+#define VPC_VG11GETPARENT (VPG_VG11 + VG11_GETPARENT)
+#define VPC_VG11GETPATHCAPABILITIES (VPG_VG11 + VG11_GETPATHCAPABILITIES)
+#define VPC_VG11GETPIXELS (VPG_VG11 + VG11_GETPIXELS)
+#define VPC_VG11GETSTRING (VPG_VG11 + VG11_GETSTRING)
+#define VPC_VG11GETVECTORSIZE (VPG_VG11 + VG11_GETVECTORSIZE)
+#define VPC_VG11HARDWAREQUERY (VPG_VG11 + VG11_HARDWAREQUERY)
+#define VPC_VG11IMAGESUBDATA (VPG_VG11 + VG11_IMAGESUBDATA)
+#define VPC_VG11INTERPOLATEPATH (VPG_VG11 + VG11_INTERPOLATEPATH)
+#define VPC_VG11LOADIDENTITY (VPG_VG11 + VG11_LOADIDENTITY)
+#define VPC_VG11LOADMATRIX (VPG_VG11 + VG11_LOADMATRIX)
+#define VPC_VG11LOOKUP (VPG_VG11 + VG11_LOOKUP)
+#define VPC_VG11LOOKUPSINGLE (VPG_VG11 + VG11_LOOKUPSINGLE)
+#define VPC_VG11MASK (VPG_VG11 + VG11_MASK)
+#define VPC_VG11MODIFYPATHCOORDS (VPG_VG11 + VG11_MODIFYPATHCOORDS)
+#define VPC_VG11MULTMATRIX (VPG_VG11 + VG11_MULTMATRIX)
+#define VPC_VG11PAINTPATTERN (VPG_VG11 + VG11_PAINTPATTERN)
+#define VPC_VG11PATHBOUNDS (VPG_VG11 + VG11_PATHBOUNDS)
+#define VPC_VG11PATHLENGTH (VPG_VG11 + VG11_PATHLENGTH)
+#define VPC_VG11PATHTRANSFORMEDBOUNDS (VPG_VG11 + VG11_PATHTRANSFORMEDBOUNDS)
+#define VPC_VG11POINTALONGPATH (VPG_VG11 + VG11_POINTALONGPATH)
+#define VPC_VG11READPIXELS (VPG_VG11 + VG11_READPIXELS)
+#define VPC_VG11REMOVEPATHCAPABILITIES (VPG_VG11 + VG11_REMOVEPATHCAPABILITIES)
+#define VPC_VG11RENDERTOMASK (VPG_VG11 + VG11_RENDERTOMASK)
+#define VPC_VG11ROTATE (VPG_VG11 + VG11_ROTATE)
+#define VPC_VG11SCALE (VPG_VG11 + VG11_SCALE)
+#define VPC_VG11SEPARABLECONVOLVE (VPG_VG11 + VG11_SEPARABLECONVOLVE)
+#define VPC_VG11SETCOLOR (VPG_VG11 + VG11_SETCOLOR)
+#define VPC_VG11SETF (VPG_VG11 + VG11_SETF)
+#define VPC_VG11SETFV (VPG_VG11 + VG11_SETFV)
+#define VPC_VG11SETGLYPHTOIMAGE (VPG_VG11 + VG11_SETGLYPHTOIMAGE)
+#define VPC_VG11SETGLYPHTOPATH (VPG_VG11 + VG11_SETGLYPHTOPATH)
+#define VPC_VG11SETI (VPG_VG11 + VG11_SETI)
+#define VPC_VG11SETIV (VPG_VG11 + VG11_SETIV)
+#define VPC_VG11SETPAINT (VPG_VG11 + VG11_SETPAINT)
+#define VPC_VG11SETPARAMETERF (VPG_VG11 + VG11_SETPARAMETERF)
+#define VPC_VG11SETPARAMETERFV (VPG_VG11 + VG11_SETPARAMETERFV)
+#define VPC_VG11SETPARAMETERI (VPG_VG11 + VG11_SETPARAMETERI)
+#define VPC_VG11SETPARAMETERIV (VPG_VG11 + VG11_SETPARAMETERIV)
+#define VPC_VG11SETPIXELS (VPG_VG11 + VG11_SETPIXELS)
+#define VPC_VG11SHEAR (VPG_VG11 + VG11_SHEAR)
+#define VPC_VG11TRANSFORMPATH (VPG_VG11 + VG11_TRANSFORMPATH)
+#define VPC_VG11TRANSLATE (VPG_VG11 + VG11_TRANSLATE)
+#define VPC_VG11WRITEPIXELS (VPG_VG11 + VG11_WRITEPIXELS)
+/* OpenVG Statistics Counter IDs. */
+#define VPC_VG11CALLS (VPG_VG11 + VG11_CALLS)
+#define VPC_VG11DRAWCALLS (VPG_VG11 + VG11_DRAWCALLS)
+#define VPC_VG11STATECHANGECALLS (VPG_VG11 + VG11_STATECHANGECALLS)
+#define VPC_VG11FILLCOUNT (VPG_VG11 + VG11_FILLCOUNT)
+#define VPC_VG11STROKECOUNT (VPG_VG11 + VG11_STROKECOUNT)
+
+/* HAL Counters. */
+#define VPC_HALVERTBUFNEWBYTEALLOC (VPG_HAL + HAL_VERTBUFNEWBYTEALLOC)
+#define VPC_HALVERTBUFTOTALBYTEALLOC (VPG_HAL + HAL_VERTBUFTOTALBYTEALLOC)
+#define VPC_HALVERTBUFNEWOBJALLOC (VPG_HAL + HAL_VERTBUFNEWOBJALLOC)
+#define VPC_HALVERTBUFTOTALOBJALLOC (VPG_HAL + HAL_VERTBUFTOTALOBJALLOC)
+#define VPC_HALINDBUFNEWBYTEALLOC (VPG_HAL + HAL_INDBUFNEWBYTEALLOC)
+#define VPC_HALINDBUFTOTALBYTEALLOC (VPG_HAL + HAL_INDBUFTOTALBYTEALLOC)
+#define VPC_HALINDBUFNEWOBJALLOC (VPG_HAL + HAL_INDBUFNEWOBJALLOC)
+#define VPC_HALINDBUFTOTALOBJALLOC (VPG_HAL + HAL_INDBUFTOTALOBJALLOC)
+#define VPC_HALTEXBUFNEWBYTEALLOC (VPG_HAL + HAL_TEXBUFNEWBYTEALLOC)
+#define VPC_HALTEXBUFTOTALBYTEALLOC (VPG_HAL + HAL_TEXBUFTOTALBYTEALLOC)
+#define VPC_HALTEXBUFNEWOBJALLOC (VPG_HAL + HAL_TEXBUFNEWOBJALLOC)
+#define VPC_HALTEXBUFTOTALOBJALLOC (VPG_HAL + HAL_TEXBUFTOTALOBJALLOC)
+
+/* HW: GPU Counters. */
+#define VPC_GPUCYCLES (VPG_GPU + GPU_CYCLES)
+#define VPC_GPUREAD64BYTE (VPG_GPU + GPU_READ64BYTE)
+#define VPC_GPUWRITE64BYTE (VPG_GPU + GPU_WRITE64BYTE)
+#define VPC_GPUTOTALCYCLES (VPG_GPU + GPU_TOTALCYCLES)
+#define VPC_GPUIDLECYCLES (VPG_GPU + GPU_IDLECYCLES)
+
+/* HW: Shader Counters. */
+#define VPC_VSINSTCOUNT (VPG_VS + VS_INSTCOUNT)
+#define VPC_VSBRANCHINSTCOUNT (VPG_VS + VS_BRANCHINSTCOUNT)
+#define VPC_VSTEXLDINSTCOUNT (VPG_VS + VS_TEXLDINSTCOUNT)
+#define VPC_VSRENDEREDVERTCOUNT (VPG_VS + VS_RENDEREDVERTCOUNT)
+/* HW: PS Count. */
+#define VPC_PSINSTCOUNT (VPG_PS + PS_INSTCOUNT)
+#define VPC_PSBRANCHINSTCOUNT (VPG_PS + PS_BRANCHINSTCOUNT)
+#define VPC_PSTEXLDINSTCOUNT (VPG_PS + PS_TEXLDINSTCOUNT)
+#define VPC_PSRENDEREDPIXCOUNT (VPG_PS + PS_RENDEREDPIXCOUNT)
+
+
+/* HW: PA Counters. */
+#define VPC_PAINVERTCOUNT (VPG_PA + PA_INVERTCOUNT)
+#define VPC_PAINPRIMCOUNT (VPG_PA + PA_INPRIMCOUNT)
+#define VPC_PAOUTPRIMCOUNT (VPG_PA + PA_OUTPRIMCOUNT)
+#define VPC_PADEPTHCLIPCOUNT (VPG_PA + PA_DEPTHCLIPCOUNT)
+#define VPC_PATRIVIALREJCOUNT (VPG_PA + PA_TRIVIALREJCOUNT)
+#define VPC_PACULLCOUNT (VPG_PA + PA_CULLCOUNT)
+
+/* HW: Setup Counters. */
+#define VPC_SETRIANGLECOUNT (VPG_SETUP + SE_TRIANGLECOUNT)
+#define VPC_SELINECOUNT (VPG_SETUP + SE_LINECOUNT)
+
+/* HW: RA Counters. */
+#define VPC_RAVALIDPIXCOUNT (VPG_RA + RA_VALIDPIXCOUNT)
+#define VPC_RATOTALQUADCOUNT (VPG_RA + RA_TOTALQUADCOUNT)
+#define VPC_RAVALIDQUADCOUNTEZ (VPG_RA + RA_VALIDQUADCOUNTEZ)
+#define VPC_RATOTALPRIMCOUNT (VPG_RA + RA_TOTALPRIMCOUNT)
+#define VPC_RAPIPECACHEMISSCOUNT (VPG_RA + RA_PIPECACHEMISSCOUNT)
+#define VPC_RAPREFCACHEMISSCOUNT (VPG_RA + RA_PREFCACHEMISSCOUNT)
+#define VPC_RAEEZCULLCOUNT (VPG_RA + RA_EEZCULLCOUNT)
+
+/* HW: TEX Counters. */
+#define VPC_TXTOTBILINEARREQ (VPG_TX + TX_TOTBILINEARREQ)
+#define VPC_TXTOTTRILINEARREQ (VPG_TX + TX_TOTTRILINEARREQ)
+#define VPC_TXTOTDISCARDTEXREQ (VPG_TX + TX_TOTDISCARDTEXREQ)
+#define VPC_TXTOTTEXREQ (VPG_TX + TX_TOTTEXREQ)
+#define VPC_TXMEMREADCOUNT (VPG_TX + TX_MEMREADCOUNT)
+#define VPC_TXMEMREADIN8BCOUNT (VPG_TX + TX_MEMREADIN8BCOUNT)
+#define VPC_TXCACHEMISSCOUNT (VPG_TX + TX_CACHEMISSCOUNT)
+#define VPC_TXCACHEHITTEXELCOUNT (VPG_TX + TX_CACHEHITTEXELCOUNT)
+#define VPC_TXCACHEMISSTEXELCOUNT (VPG_TX + TX_CACHEMISSTEXELCOUNT)
+
+/* HW: PE Counters. */
+#define VPC_PEKILLEDBYCOLOR (VPG_PE + PE_KILLEDBYCOLOR)
+#define VPC_PEKILLEDBYDEPTH (VPG_PE + PE_KILLEDBYDEPTH)
+#define VPC_PEDRAWNBYCOLOR (VPG_PE + PE_DRAWNBYCOLOR)
+#define VPC_PEDRAWNBYDEPTH (VPG_PE + PE_DRAWNBYDEPTH)
+
+/* HW: MC Counters. */
+#define VPC_MCREADREQ8BPIPE (VPG_MC + MC_READREQ8BPIPE)
+#define VPC_MCREADREQ8BIP (VPG_MC + MC_READREQ8BIP)
+#define VPC_MCWRITEREQ8BPIPE (VPG_MC + MC_WRITEREQ8BPIPE)
+
+/* HW: AXI Counters. */
+#define VPC_AXIREADREQSTALLED (VPG_AXI + AXI_READREQSTALLED)
+#define VPC_AXIWRITEREQSTALLED (VPG_AXI + AXI_WRITEREQSTALLED)
+#define VPC_AXIWRITEDATASTALLED (VPG_AXI + AXI_WRITEDATASTALLED)
+
+/* PROGRAM: Shader program counters. */
+#define VPC_PVSINSTRCOUNT (VPG_PVS + PVS_INSTRCOUNT)
+#define VPC_PVSALUINSTRCOUNT (VPG_PVS + PVS_ALUINSTRCOUNT)
+#define VPC_PVSTEXINSTRCOUNT (VPG_PVS + PVS_TEXINSTRCOUNT)
+#define VPC_PVSATTRIBCOUNT (VPG_PVS + PVS_ATTRIBCOUNT)
+#define VPC_PVSUNIFORMCOUNT (VPG_PVS + PVS_UNIFORMCOUNT)
+#define VPC_PVSFUNCTIONCOUNT (VPG_PVS + PVS_FUNCTIONCOUNT)
+
+#define VPC_PPSINSTRCOUNT (VPG_PPS + PPS_INSTRCOUNT)
+#define VPC_PPSALUINSTRCOUNT (VPG_PPS + PPS_ALUINSTRCOUNT)
+#define VPC_PPSTEXINSTRCOUNT (VPG_PPS + PPS_TEXINSTRCOUNT)
+#define VPC_PPSATTRIBCOUNT (VPG_PPS + PPS_ATTRIBCOUNT)
+#define VPC_PPSUNIFORMCOUNT (VPG_PPS + PPS_UNIFORMCOUNT)
+#define VPC_PPSFUNCTIONCOUNT (VPG_PPS + PPS_FUNCTIONCOUNT)
+
+
+#define VPG_ES20_DRAW_NO (VPG_ES20_DRAW + 1)
+#define VPG_ES11_DRAW_NO (VPG_ES11_DRAW + 1)
+
+#define VPG_FRAME_USEVBO (VPG_FRAME + 1)
+
+#endif
+
+
+/* HW profile information. */
+typedef struct _gcsPROFILER_COUNTERS
+{
+ /* HW static counters. */
+ gctUINT32 gpuClock;
+ gctUINT32 axiClock;
+ gctUINT32 shaderClock;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuClockStart;
+ gctUINT32 gpuClockEnd;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuCyclesCounter;
+ gctUINT32 gpuTotalCyclesCounter;
+ gctUINT32 gpuIdleCyclesCounter;
+ gctUINT32 gpuTotalRead64BytesPerFrame;
+ gctUINT32 gpuTotalWrite64BytesPerFrame;
+
+ /* PE */
+ gctUINT32 pe_pixel_count_killed_by_color_pipe;
+ gctUINT32 pe_pixel_count_killed_by_depth_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_color_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_depth_pipe;
+
+ /* SH */
+ gctUINT32 ps_inst_counter;
+ gctUINT32 rendered_pixel_counter;
+ gctUINT32 vs_inst_counter;
+ gctUINT32 rendered_vertice_counter;
+ gctUINT32 vtx_branch_inst_counter;
+ gctUINT32 vtx_texld_inst_counter;
+ gctUINT32 pxl_branch_inst_counter;
+ gctUINT32 pxl_texld_inst_counter;
+
+ /* PA */
+ gctUINT32 pa_input_vtx_counter;
+ gctUINT32 pa_input_prim_counter;
+ gctUINT32 pa_output_prim_counter;
+ gctUINT32 pa_depth_clipped_counter;
+ gctUINT32 pa_trivial_rejected_counter;
+ gctUINT32 pa_culled_counter;
+
+ /* SE */
+ gctUINT32 se_culled_triangle_count;
+ gctUINT32 se_culled_lines_count;
+
+ /* RA */
+ gctUINT32 ra_valid_pixel_count;
+ gctUINT32 ra_total_quad_count;
+ gctUINT32 ra_valid_quad_count_after_early_z;
+ gctUINT32 ra_total_primitive_count;
+ gctUINT32 ra_pipe_cache_miss_counter;
+ gctUINT32 ra_prefetch_cache_miss_counter;
+ gctUINT32 ra_eez_culled_counter;
+
+ /* TX */
+ gctUINT32 tx_total_bilinear_requests;
+ gctUINT32 tx_total_trilinear_requests;
+ gctUINT32 tx_total_discarded_texture_requests;
+ gctUINT32 tx_total_texture_requests;
+ gctUINT32 tx_mem_read_count;
+ gctUINT32 tx_mem_read_in_8B_count;
+ gctUINT32 tx_cache_miss_count;
+ gctUINT32 tx_cache_hit_texel_count;
+ gctUINT32 tx_cache_miss_texel_count;
+
+ /* MC */
+ gctUINT32 mc_total_read_req_8B_from_pipeline;
+ gctUINT32 mc_total_read_req_8B_from_IP;
+ gctUINT32 mc_total_write_req_8B_from_pipeline;
+
+ /* HI */
+ gctUINT32 hi_axi_cycles_read_request_stalled;
+ gctUINT32 hi_axi_cycles_write_request_stalled;
+ gctUINT32 hi_axi_cycles_write_data_stalled;
+}
+gcsPROFILER_COUNTERS;
+
+/* HAL profile information. */
+typedef struct _gcsPROFILER
+{
+ gctUINT32 enable;
+ gctBOOL enableHal;
+ gctBOOL enableHW;
+ gctBOOL enableSH;
+ gctBOOL isSyncMode;
+
+ gctBOOL useSocket;
+ gctINT sockFd;
+
+ gctFILE file;
+
+ /* Aggregate Information */
+
+ /* Clock Info */
+ gctUINT64 frameStart;
+ gctUINT64 frameEnd;
+
+ /* Current frame information */
+ gctUINT32 frameNumber;
+ gctUINT64 frameStartTimeusec;
+ gctUINT64 frameEndTimeusec;
+ gctUINT64 frameStartCPUTimeusec;
+ gctUINT64 frameEndCPUTimeusec;
+
+#if PROFILE_HAL_COUNTERS
+ gctUINT32 vertexBufferTotalBytesAlloc;
+ gctUINT32 vertexBufferNewBytesAlloc;
+ int vertexBufferTotalObjectsAlloc;
+ int vertexBufferNewObjectsAlloc;
+
+ gctUINT32 indexBufferTotalBytesAlloc;
+ gctUINT32 indexBufferNewBytesAlloc;
+ int indexBufferTotalObjectsAlloc;
+ int indexBufferNewObjectsAlloc;
+
+ gctUINT32 textureBufferTotalBytesAlloc;
+ gctUINT32 textureBufferNewBytesAlloc;
+ int textureBufferTotalObjectsAlloc;
+ int textureBufferNewObjectsAlloc;
+
+ gctUINT32 numCommits;
+ gctUINT32 drawPointCount;
+ gctUINT32 drawLineCount;
+ gctUINT32 drawTriangleCount;
+ gctUINT32 drawVertexCount;
+ gctUINT32 redundantStateChangeCalls;
+#endif
+
+ gctUINT32 prevVSInstCount;
+ gctUINT32 prevVSBranchInstCount;
+ gctUINT32 prevVSTexInstCount;
+ gctUINT32 prevVSVertexCount;
+ gctUINT32 prevPSInstCount;
+ gctUINT32 prevPSBranchInstCount;
+ gctUINT32 prevPSTexInstCount;
+ gctUINT32 prevPSPixelCount;
+
+}
+gcsPROFILER;
+
+/* Memory profile information. */
+struct _gcsMemProfile
+{
+ /* Memory Usage */
+ gctUINT32 videoMemUsed;
+ gctUINT32 systemMemUsed;
+ gctUINT32 commitBufferSize;
+ gctUINT32 contextBufferCopyBytes;
+};
+
+/* Shader profile information. */
+struct _gcsSHADER_PROFILER
+{
+ gctUINT32 shaderLength;
+ gctUINT32 shaderALUCycles;
+ gctUINT32 shaderTexLoadCycles;
+ gctUINT32 shaderTempRegCount;
+ gctUINT32 shaderSamplerRegCount;
+ gctUINT32 shaderInputRegCount;
+ gctUINT32 shaderOutputRegCount;
+};
+
+/* Initialize the gcsProfiler. */
+gceSTATUS
+gcoPROFILER_Initialize(
+ IN gcoHAL Hal
+ );
+
+/* Destroy the gcProfiler. */
+gceSTATUS
+gcoPROFILER_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Write data to profiler. */
+gceSTATUS
+gcoPROFILER_Write(
+ IN gcoHAL Hal,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Flush data out. */
+gceSTATUS
+gcoPROFILER_Flush(
+ IN gcoHAL Hal
+ );
+
+/* Call to signal end of frame. */
+gceSTATUS
+gcoPROFILER_EndFrame(
+ IN gcoHAL Hal
+ );
+
+/* Call to signal end of draw. */
+gceSTATUS
+gcoPROFILER_EndDraw(
+ IN gcoHAL Hal,
+ IN gctBOOL FirstDraw
+ );
+
+/* Increase profile counter Enum by Value. */
+gceSTATUS
+gcoPROFILER_Count(
+ IN gcoHAL Hal,
+ IN gctUINT32 Enum,
+ IN gctINT Value
+ );
+
+/* Profile input vertex shader. */
+gceSTATUS
+gcoPROFILER_ShaderVS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Vs
+ );
+
+/* Profile input fragment shader. */
+gceSTATUS
+gcoPROFILER_ShaderFS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Fs
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_profiler_h_ */
diff --git a/src/include_imx6_v4_1_0/gc_hal_rename.h b/src/include_imx6_v4_1_0/gc_hal_rename.h
new file mode 100644
index 0000000..6c10fbf
--- /dev/null
+++ b/src/include_imx6_v4_1_0/gc_hal_rename.h
@@ -0,0 +1,248 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_rename_h_
+#define __gc_hal_rename_h_
+
+
+#if defined(_HAL2D_APPENDIX)
+
+#define _HAL2D_RENAME_2(api, appendix) api ## appendix
+#define _HAL2D_RENAME_1(api, appendix) _HAL2D_RENAME_2(api, appendix)
+#define gcmHAL2D(api) _HAL2D_RENAME_1(api, _HAL2D_APPENDIX)
+
+
+#define gckOS_Construct gcmHAL2D(gckOS_Construct)
+#define gckOS_Destroy gcmHAL2D(gckOS_Destroy)
+#define gckOS_QueryVideoMemory gcmHAL2D(gckOS_QueryVideoMemory)
+#define gckOS_Allocate gcmHAL2D(gckOS_Allocate)
+#define gckOS_Free gcmHAL2D(gckOS_Free)
+#define gckOS_AllocateMemory gcmHAL2D(gckOS_AllocateMemory)
+#define gckOS_FreeMemory gcmHAL2D(gckOS_FreeMemory)
+#define gckOS_AllocatePagedMemory gcmHAL2D(gckOS_AllocatePagedMemory)
+#define gckOS_AllocatePagedMemoryEx gcmHAL2D(gckOS_AllocatePagedMemoryEx)
+#define gckOS_LockPages gcmHAL2D(gckOS_LockPages)
+#define gckOS_MapPages gcmHAL2D(gckOS_MapPages)
+#define gckOS_UnlockPages gcmHAL2D(gckOS_UnlockPages)
+#define gckOS_FreePagedMemory gcmHAL2D(gckOS_FreePagedMemory)
+#define gckOS_AllocateNonPagedMemory gcmHAL2D(gckOS_AllocateNonPagedMemory)
+#define gckOS_FreeNonPagedMemory gcmHAL2D(gckOS_FreeNonPagedMemory)
+#define gckOS_AllocateContiguous gcmHAL2D(gckOS_AllocateContiguous)
+#define gckOS_FreeContiguous gcmHAL2D(gckOS_FreeContiguous)
+#define gckOS_GetPageSize gcmHAL2D(gckOS_GetPageSize)
+#define gckOS_GetPhysicalAddress gcmHAL2D(gckOS_GetPhysicalAddress)
+#define gckOS_GetPhysicalAddressProcess gcmHAL2D(gckOS_GetPhysicalAddressProcess)
+#define gckOS_MapPhysical gcmHAL2D(gckOS_MapPhysical)
+#define gckOS_UnmapPhysical gcmHAL2D(gckOS_UnmapPhysical)
+#define gckOS_ReadRegister gcmHAL2D(gckOS_ReadRegister)
+#define gckOS_WriteRegister gcmHAL2D(gckOS_WriteRegister)
+#define gckOS_WriteMemory gcmHAL2D(gckOS_WriteMemory)
+#define gckOS_MapMemory gcmHAL2D(gckOS_MapMemory)
+#define gckOS_UnmapMemory gcmHAL2D(gckOS_UnmapMemory)
+#define gckOS_UnmapMemoryEx gcmHAL2D(gckOS_UnmapMemoryEx)
+#define gckOS_CreateMutex gcmHAL2D(gckOS_CreateMutex)
+#define gckOS_DeleteMutex gcmHAL2D(gckOS_DeleteMutex)
+#define gckOS_AcquireMutex gcmHAL2D(gckOS_AcquireMutex)
+#define gckOS_ReleaseMutex gcmHAL2D(gckOS_ReleaseMutex)
+#define gckOS_AtomicExchange gcmHAL2D(gckOS_AtomicExchange)
+#define gckOS_AtomicExchangePtr gcmHAL2D(gckOS_AtomicExchangePtr)
+#define gckOS_AtomConstruct gcmHAL2D(gckOS_AtomConstruct)
+#define gckOS_AtomDestroy gcmHAL2D(gckOS_AtomDestroy)
+#define gckOS_AtomGet gcmHAL2D(gckOS_AtomGet)
+#define gckOS_AtomIncrement gcmHAL2D(gckOS_AtomIncrement)
+#define gckOS_AtomDecrement gcmHAL2D(gckOS_AtomDecrement)
+#define gckOS_Delay gcmHAL2D(gckOS_Delay)
+#define gckOS_GetTime gcmHAL2D(gckOS_GetTime)
+#define gckOS_MemoryBarrier gcmHAL2D(gckOS_MemoryBarrier)
+#define gckOS_MapUserPointer gcmHAL2D(gckOS_MapUserPointer)
+#define gckOS_UnmapUserPointer gcmHAL2D(gckOS_UnmapUserPointer)
+#define gckOS_QueryNeedCopy gcmHAL2D(gckOS_QueryNeedCopy)
+#define gckOS_CopyFromUserData gcmHAL2D(gckOS_CopyFromUserData)
+#define gckOS_CopyToUserData gcmHAL2D(gckOS_CopyToUserData)
+#define gckOS_MapUserPhysical gcmHAL2D(gckOS_MapUserPhysical)
+#define gckOS_SuspendInterrupt gcmHAL2D(gckOS_SuspendInterrupt)
+#define gckOS_ResumeInterrupt gcmHAL2D(gckOS_ResumeInterrupt)
+#define gckOS_GetBaseAddress gcmHAL2D(gckOS_GetBaseAddress)
+#define gckOS_MemCopy gcmHAL2D(gckOS_MemCopy)
+#define gckOS_ZeroMemory gcmHAL2D(gckOS_ZeroMemory)
+#define gckOS_DeviceControl gcmHAL2D(gckOS_DeviceControl)
+#define gckOS_GetProcessID gcmHAL2D(gckOS_GetProcessID)
+#define gckOS_GetThreadID gcmHAL2D(gckOS_GetThreadID)
+#define gckOS_CreateSignal gcmHAL2D(gckOS_CreateSignal)
+#define gckOS_DestroySignal gcmHAL2D(gckOS_DestroySignal)
+#define gckOS_Signal gcmHAL2D(gckOS_Signal)
+#define gckOS_WaitSignal gcmHAL2D(gckOS_WaitSignal)
+#define gckOS_MapSignal gcmHAL2D(gckOS_MapSignal)
+#define gckOS_MapUserMemory gcmHAL2D(gckOS_MapUserMemory)
+#define gckOS_UnmapUserMemory gcmHAL2D(gckOS_UnmapUserMemory)
+#define gckOS_CreateUserSignal gcmHAL2D(gckOS_CreateUserSignal)
+#define gckOS_DestroyUserSignal gcmHAL2D(gckOS_DestroyUserSignal)
+#define gckOS_WaitUserSignal gcmHAL2D(gckOS_WaitUserSignal)
+#define gckOS_SignalUserSignal gcmHAL2D(gckOS_SignalUserSignal)
+#define gckOS_UserSignal gcmHAL2D(gckOS_UserSignal)
+#define gckOS_UserSignal gcmHAL2D(gckOS_UserSignal)
+#define gckOS_CacheClean gcmHAL2D(gckOS_CacheClean)
+#define gckOS_CacheFlush gcmHAL2D(gckOS_CacheFlush)
+#define gckOS_SetDebugLevel gcmHAL2D(gckOS_SetDebugLevel)
+#define gckOS_SetDebugZone gcmHAL2D(gckOS_SetDebugZone)
+#define gckOS_SetDebugLevelZone gcmHAL2D(gckOS_SetDebugLevelZone)
+#define gckOS_SetDebugZones gcmHAL2D(gckOS_SetDebugZones)
+#define gckOS_SetDebugFile gcmHAL2D(gckOS_SetDebugFile)
+#define gckOS_Broadcast gcmHAL2D(gckOS_Broadcast)
+#define gckOS_SetGPUPower gcmHAL2D(gckOS_SetGPUPower)
+#define gckOS_CreateSemaphore gcmHAL2D(gckOS_CreateSemaphore)
+#define gckOS_DestroySemaphore gcmHAL2D(gckOS_DestroySemaphore)
+#define gckOS_AcquireSemaphore gcmHAL2D(gckOS_AcquireSemaphore)
+#define gckOS_ReleaseSemaphore gcmHAL2D(gckOS_ReleaseSemaphore)
+#define gckHEAP_Construct gcmHAL2D(gckHEAP_Construct)
+#define gckHEAP_Destroy gcmHAL2D(gckHEAP_Destroy)
+#define gckHEAP_Allocate gcmHAL2D(gckHEAP_Allocate)
+#define gckHEAP_Free gcmHAL2D(gckHEAP_Free)
+#define gckHEAP_ProfileStart gcmHAL2D(gckHEAP_ProfileStart)
+#define gckHEAP_ProfileEnd gcmHAL2D(gckHEAP_ProfileEnd)
+#define gckHEAP_Test gcmHAL2D(gckHEAP_Test)
+#define gckVIDMEM_Construct gcmHAL2D(gckVIDMEM_Construct)
+#define gckVIDMEM_Destroy gcmHAL2D(gckVIDMEM_Destroy)
+#define gckVIDMEM_Allocate gcmHAL2D(gckVIDMEM_Allocate)
+#define gckVIDMEM_AllocateLinear gcmHAL2D(gckVIDMEM_AllocateLinear)
+#define gckVIDMEM_Free gcmHAL2D(gckVIDMEM_Free)
+#define gckVIDMEM_Lock gcmHAL2D(gckVIDMEM_Lock)
+#define gckVIDMEM_Unlock gcmHAL2D(gckVIDMEM_Unlock)
+#define gckVIDMEM_ConstructVirtual gcmHAL2D(gckVIDMEM_ConstructVirtual)
+#define gckVIDMEM_DestroyVirtual gcmHAL2D(gckVIDMEM_DestroyVirtual)
+#define gckKERNEL_Construct gcmHAL2D(gckKERNEL_Construct)
+#define gckKERNEL_Destroy gcmHAL2D(gckKERNEL_Destroy)
+#define gckKERNEL_Dispatch gcmHAL2D(gckKERNEL_Dispatch)
+#define gckKERNEL_QueryVideoMemory gcmHAL2D(gckKERNEL_QueryVideoMemory)
+#define gckKERNEL_GetVideoMemoryPool gcmHAL2D(gckKERNEL_GetVideoMemoryPool)
+#define gckKERNEL_MapVideoMemory gcmHAL2D(gckKERNEL_MapVideoMemory)
+#define gckKERNEL_UnmapVideoMemory gcmHAL2D(gckKERNEL_UnmapVideoMemory)
+#define gckKERNEL_MapMemory gcmHAL2D(gckKERNEL_MapMemory)
+#define gckKERNEL_UnmapMemory gcmHAL2D(gckKERNEL_UnmapMemory)
+#define gckKERNEL_Notify gcmHAL2D(gckKERNEL_Notify)
+#define gckKERNEL_QuerySettings gcmHAL2D(gckKERNEL_QuerySettings)
+#define gckKERNEL_Recovery gcmHAL2D(gckKERNEL_Recovery)
+#define gckKERNEL_OpenUserData gcmHAL2D(gckKERNEL_OpenUserData)
+#define gckKERNEL_CloseUserData gcmHAL2D(gckKERNEL_CloseUserData)
+#define gckHARDWARE_Construct gcmHAL2D(gckHARDWARE_Construct)
+#define gckHARDWARE_Destroy gcmHAL2D(gckHARDWARE_Destroy)
+#define gckHARDWARE_QuerySystemMemory gcmHAL2D(gckHARDWARE_QuerySystemMemory)
+#define gckHARDWARE_BuildVirtualAddress gcmHAL2D(gckHARDWARE_BuildVirtualAddress)
+#define gckHARDWARE_QueryCommandBuffer gcmHAL2D(gckHARDWARE_QueryCommandBuffer)
+#define gckHARDWARE_WaitLink gcmHAL2D(gckHARDWARE_WaitLink)
+#define gckHARDWARE_Execute gcmHAL2D(gckHARDWARE_Execute)
+#define gckHARDWARE_End gcmHAL2D(gckHARDWARE_End)
+#define gckHARDWARE_Nop gcmHAL2D(gckHARDWARE_Nop)
+#define gckHARDWARE_Wait gcmHAL2D(gckHARDWARE_Wait)
+#define gckHARDWARE_PipeSelect gcmHAL2D(gckHARDWARE_PipeSelect)
+#define gckHARDWARE_Link gcmHAL2D(gckHARDWARE_Link)
+#define gckHARDWARE_Event gcmHAL2D(gckHARDWARE_Event)
+#define gckHARDWARE_QueryMemory gcmHAL2D(gckHARDWARE_QueryMemory)
+#define gckHARDWARE_QueryChipIdentity gcmHAL2D(gckHARDWARE_QueryChipIdentity)
+#define gckHARDWARE_QueryChipSpecs gcmHAL2D(gckHARDWARE_QueryChipSpecs)
+#define gckHARDWARE_QueryShaderCaps gcmHAL2D(gckHARDWARE_QueryShaderCaps)
+#define gckHARDWARE_ConvertFormat gcmHAL2D(gckHARDWARE_ConvertFormat)
+#define gckHARDWARE_SplitMemory gcmHAL2D(gckHARDWARE_SplitMemory)
+#define gckHARDWARE_AlignToTile gcmHAL2D(gckHARDWARE_AlignToTile)
+#define gckHARDWARE_UpdateQueueTail gcmHAL2D(gckHARDWARE_UpdateQueueTail)
+#define gckHARDWARE_ConvertLogical gcmHAL2D(gckHARDWARE_ConvertLogical)
+#define gckHARDWARE_ConvertPhysical gcmHAL2D(gckHARDWARE_ConvertPhysical)
+#define gckHARDWARE_Interrupt gcmHAL2D(gckHARDWARE_Interrupt)
+#define gckHARDWARE_SetMMU gcmHAL2D(gckHARDWARE_SetMMU)
+#define gckHARDWARE_FlushMMU gcmHAL2D(gckHARDWARE_FlushMMU)
+#define gckHARDWARE_GetIdle gcmHAL2D(gckHARDWARE_GetIdle)
+#define gckHARDWARE_Flush gcmHAL2D(gckHARDWARE_Flush)
+#define gckHARDWARE_SetFastClear gcmHAL2D(gckHARDWARE_SetFastClear)
+#define gckHARDWARE_ReadInterrupt gcmHAL2D(gckHARDWARE_ReadInterrupt)
+#define gckHARDWARE_SetPowerManagementState gcmHAL2D(gckHARDWARE_SetPowerManagementState)
+#define gckHARDWARE_QueryPowerManagementState gcmHAL2D(gckHARDWARE_QueryPowerManagementState)
+#define gckHARDWARE_ProfileEngine2D gcmHAL2D(gckHARDWARE_ProfileEngine2D)
+#define gckHARDWARE_InitializeHardware gcmHAL2D(gckHARDWARE_InitializeHardware)
+#define gckHARDWARE_Reset gcmHAL2D(gckHARDWARE_Reset)
+#define gckINTERRUPT_Construct gcmHAL2D(gckINTERRUPT_Construct)
+#define gckINTERRUPT_Destroy gcmHAL2D(gckINTERRUPT_Destroy)
+#define gckINTERRUPT_SetHandler gcmHAL2D(gckINTERRUPT_SetHandler)
+#define gckINTERRUPT_Notify gcmHAL2D(gckINTERRUPT_Notify)
+#define gckEVENT_Construct gcmHAL2D(gckEVENT_Construct)
+#define gckEVENT_Destroy gcmHAL2D(gckEVENT_Destroy)
+#define gckEVENT_AddList gcmHAL2D(gckEVENT_AddList)
+#define gckEVENT_FreeNonPagedMemory gcmHAL2D(gckEVENT_FreeNonPagedMemory)
+#define gckEVENT_FreeContiguousMemory gcmHAL2D(gckEVENT_FreeContiguousMemory)
+#define gckEVENT_FreeVideoMemory gcmHAL2D(gckEVENT_FreeVideoMemory)
+#define gckEVENT_Signal gcmHAL2D(gckEVENT_Signal)
+#define gckEVENT_Unlock gcmHAL2D(gckEVENT_Unlock)
+#define gckEVENT_Submit gcmHAL2D(gckEVENT_Submit)
+#define gckEVENT_Commit gcmHAL2D(gckEVENT_Commit)
+#define gckEVENT_Notify gcmHAL2D(gckEVENT_Notify)
+#define gckEVENT_Interrupt gcmHAL2D(gckEVENT_Interrupt)
+#define gckCOMMAND_Construct gcmHAL2D(gckCOMMAND_Construct)
+#define gckCOMMAND_Destroy gcmHAL2D(gckCOMMAND_Destroy)
+#define gckCOMMAND_EnterCommit gcmHAL2D(gckCOMMAND_EnterCommit)
+#define gckCOMMAND_ExitCommit gcmHAL2D(gckCOMMAND_ExitCommit)
+#define gckCOMMAND_Start gcmHAL2D(gckCOMMAND_Start)
+#define gckCOMMAND_Stop gcmHAL2D(gckCOMMAND_Stop)
+#define gckCOMMAND_Commit gcmHAL2D(gckCOMMAND_Commit)
+#define gckCOMMAND_Reserve gcmHAL2D(gckCOMMAND_Reserve)
+#define gckCOMMAND_Execute gcmHAL2D(gckCOMMAND_Execute)
+#define gckCOMMAND_Stall gcmHAL2D(gckCOMMAND_Stall)
+#define gckCOMMAND_Attach gcmHAL2D(gckCOMMAND_Attach)
+#define gckCOMMAND_Detach gcmHAL2D(gckCOMMAND_Detach)
+#define gckMMU_Construct gcmHAL2D(gckMMU_Construct)
+#define gckMMU_Destroy gcmHAL2D(gckMMU_Destroy)
+#define gckMMU_AllocatePages gcmHAL2D(gckMMU_AllocatePages)
+#define gckMMU_FreePages gcmHAL2D(gckMMU_FreePages)
+#define gckMMU_InsertNode gcmHAL2D(gckMMU_InsertNode)
+#define gckMMU_RemoveNode gcmHAL2D(gckMMU_RemoveNode)
+#define gckMMU_FreeHandleMemory gcmHAL2D(gckMMU_FreeHandleMemory)
+#define gckMMU_Test gcmHAL2D(gckMMU_Test)
+#define gckHARDWARE_QueryProfileRegisters gcmHAL2D(gckHARDWARE_QueryProfileRegisters)
+
+
+#define FindMdlMap gcmHAL2D(FindMdlMap)
+#define OnProcessExit gcmHAL2D(OnProcessExit)
+
+#define gckGALDEVICE_Destroy gcmHAL2D(gckGALDEVICE_Destroy)
+#define gckOS_Print gcmHAL2D(gckOS_Print)
+#define gckGALDEVICE_FreeMemory gcmHAL2D(gckGALDEVICE_FreeMemory)
+#define gckGALDEVICE_AllocateMemory gcmHAL2D(gckGALDEVICE_AllocateMemory)
+#define gckOS_DebugBreak gcmHAL2D(gckOS_DebugBreak)
+#define gckGALDEVICE_Release_ISR gcmHAL2D(gckGALDEVICE_Release_ISR)
+#define gckOS_Verify gcmHAL2D(gckOS_Verify)
+#define gckCOMMAND_Release gcmHAL2D(gckCOMMAND_Release)
+#define gckGALDEVICE_Stop gcmHAL2D(gckGALDEVICE_Stop)
+#define gckGALDEVICE_Construct gcmHAL2D(gckGALDEVICE_Construct)
+#define gckOS_DebugFatal gcmHAL2D(gckOS_DebugFatal)
+#define gckOS_DebugTrace gcmHAL2D(gckOS_DebugTrace)
+#define gckHARDWARE_GetBaseAddress gcmHAL2D(gckHARDWARE_GetBaseAddress)
+#define gckGALDEVICE_Setup_ISR gcmHAL2D(gckGALDEVICE_Setup_ISR)
+#define gckKERNEL_AttachProcess gcmHAL2D(gckKERNEL_AttachProcess)
+#define gckKERNEL_AttachProcessEx gcmHAL2D(gckKERNEL_AttachProcessEx)
+#define gckGALDEVICE_Start_Thread gcmHAL2D(gckGALDEVICE_Start_Thread)
+#define gckHARDWARE_QueryIdle gcmHAL2D(gckHARDWARE_QueryIdle)
+#define gckGALDEVICE_Start gcmHAL2D(gckGALDEVICE_Start)
+#define gckOS_GetKernelLogical gcmHAL2D(gckOS_GetKernelLogical)
+#define gckOS_DebugTraceZone gcmHAL2D(gckOS_DebugTraceZone)
+#define gckGALDEVICE_Stop_Thread gcmHAL2D(gckGALDEVICE_Stop_Thread)
+#define gckHARDWARE_NeedBaseAddress gcmHAL2D(gckHARDWARE_NeedBaseAddress)
+
+#endif
+
+#endif /* __gc_hal_rename_h_ */
diff --git a/src/include_imx6_v4_1_0/gc_hal_statistics.h b/src/include_imx6_v4_1_0/gc_hal_statistics.h
new file mode 100644
index 0000000..82336e8
--- /dev/null
+++ b/src/include_imx6_v4_1_0/gc_hal_statistics.h
@@ -0,0 +1,115 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_statistics_h_
+#define __gc_hal_statistics_h_
+
+
+#define VIV_STAT_ENABLE_STATISTICS 0
+
+/* Toal number of frames for which the frame time is accounted. We have storage
+ to keep frame times for last this many frames.
+*/
+#define VIV_STAT_FRAME_BUFFER_SIZE 30
+
+/*
+ Total number of frames sampled for a mode. This means
+
+ # of frames for HZ Current : VIV_STAT_EARLY_Z_SAMPLE_FRAMES
+ # of frames for HZ Switched : VIV_STAT_EARLY_Z_SAMPLE_FRAMES
+ +
+ --------------------------------------------------------
+ : (2 * VIV_STAT_EARLY_Z_SAMPLE_FRAMES) frames needed
+
+ IMPORTANT: This total must be smaller than VIV_STAT_FRAME_BUFFER_SIZE
+*/
+#define VIV_STAT_EARLY_Z_SAMPLE_FRAMES 7
+#define VIV_STAT_EARLY_Z_LATENCY_FRAMES 2
+
+/* Multiplication factor for previous Hz off mode. Make it more than 1.0 to advertise HZ on.*/
+#define VIV_STAT_EARLY_Z_FACTOR (1.05f)
+
+/* Defines the statistical data keys monitored by the statistics module */
+typedef enum _gceSTATISTICS
+{
+ gcvFRAME_FPS = 1,
+}
+gceSTATISTICS;
+
+/* HAL statistics information. */
+typedef struct _gcsSTATISTICS_EARLYZ
+{
+ gctUINT switchBackCount;
+ gctUINT nextCheckPoint;
+ gctBOOL disabled;
+}
+gcsSTATISTICS_EARLYZ;
+
+
+/* Defines the statistical data keys monitored by the statistics module */
+typedef enum _gceSTATISTICS_Call
+{
+ gcvSTAT_ES11_GLDRAWELEMENTS = 1,
+}
+gceSTATISTICS_Call;
+
+
+/* HAL statistics information. */
+typedef struct _gcsSTATISTICS
+{
+ gctUINT64 frameTime[VIV_STAT_FRAME_BUFFER_SIZE];
+ gctUINT64 previousFrameTime;
+ gctUINT frame;
+ gcsSTATISTICS_EARLYZ earlyZ;
+ gctUINT ES11_drawElementsCount;
+ gctBOOL applyRTestVAFix;
+}
+gcsSTATISTICS;
+
+
+/* Add a frame based data into current statistics. */
+void
+gcfSTATISTICS_AddData(
+ IN gceSTATISTICS Key,
+ IN gctUINT Value
+ );
+
+/* Marks the frame end and triggers statistical calculations and decisions.*/
+void
+gcfSTATISTICS_MarkFrameEnd (
+ void
+ );
+
+/* Sets whether the dynmaic HZ is disabled or not .*/
+void
+gcfSTATISTICS_DisableDynamicEarlyZ (
+ IN gctBOOL Disabled
+ );
+
+/* Checks whether or not glDrawArray function call will be discarded */
+gctBOOL
+gcfSTATISTICS_DiscardCall(
+ gceSTATISTICS_Call Function
+ );
+
+
+#endif /*__gc_hal_statistics_h_ */
+
diff --git a/src/include_imx6_v4_1_0/gc_hal_types.h b/src/include_imx6_v4_1_0/gc_hal_types.h
new file mode 100644
index 0000000..5c0877d
--- /dev/null
+++ b/src/include_imx6_v4_1_0/gc_hal_types.h
@@ -0,0 +1,1002 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_types_h_
+#define __gc_hal_types_h_
+
+#include "gc_hal_version.h"
+#include "gc_hal_options.h"
+
+#ifdef _WIN32
+#pragma warning(disable:4127) /* Conditional expression is constant (do { }
+ ** while(0)). */
+#pragma warning(disable:4100) /* Unreferenced formal parameter. */
+#pragma warning(disable:4204) /* Non-constant aggregate initializer (C99). */
+#pragma warning(disable:4131) /* Uses old-style declarator (for Bison and
+ ** Flex generated files). */
+#pragma warning(disable:4206) /* Translation unit is empty. */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+** Platform macros.
+*/
+
+#if defined(__GNUC__)
+# define gcdHAS_ELLIPSES 1 /* GCC always has it. */
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+# define gcdHAS_ELLIPSES 1 /* C99 has it. */
+#elif defined(_MSC_VER) && (_MSC_VER >= 1500)
+# define gcdHAS_ELLIPSES 1 /* MSVC 2007+ has it. */
+#elif defined(UNDER_CE)
+#if UNDER_CE >= 600
+# define gcdHAS_ELLIPSES 1
+# else
+# define gcdHAS_ELLIPSES 0
+# endif
+#else
+# error "gcdHAS_ELLIPSES: Platform could not be determined"
+#endif
+
+/******************************************************************************\
+************************************ Keyword ***********************************
+\******************************************************************************/
+
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
+# define gcmINLINE inline /* C99 keyword. */
+#elif defined(__GNUC__)
+# define gcmINLINE __inline__ /* GNU keyword. */
+#elif defined(_MSC_VER) || defined(UNDER_CE)
+# define gcmINLINE __inline /* Internal keyword. */
+#else
+# error "gcmINLINE: Platform could not be determined"
+#endif
+
+/* Possible debug flags. */
+#define gcdDEBUG_NONE 0
+#define gcdDEBUG_ALL (1 << 0)
+#define gcdDEBUG_FATAL (1 << 1)
+#define gcdDEBUG_TRACE (1 << 2)
+#define gcdDEBUG_BREAK (1 << 3)
+#define gcdDEBUG_ASSERT (1 << 4)
+#define gcdDEBUG_CODE (1 << 5)
+#define gcdDEBUG_STACK (1 << 6)
+
+#define gcmIS_DEBUG(flag) ( gcdDEBUG & (flag | gcdDEBUG_ALL) )
+
+#ifndef gcdDEBUG
+#if (defined(DBG) && DBG) || defined(DEBUG) || defined(_DEBUG)
+# define gcdDEBUG gcdDEBUG_ALL
+# else
+# define gcdDEBUG gcdDEBUG_NONE
+# endif
+#endif
+
+#ifdef _USRDLL
+#ifdef _MSC_VER
+#ifdef HAL_EXPORTS
+# define HALAPI __declspec(dllexport)
+# else
+# define HALAPI __declspec(dllimport)
+# endif
+# define HALDECL __cdecl
+# else
+#ifdef HAL_EXPORTS
+# define HALAPI
+# else
+# define HALAPI extern
+# endif
+# endif
+#else
+# define HALAPI
+# define HALDECL
+#endif
+
+/******************************************************************************\
+********************************** Common Types ********************************
+\******************************************************************************/
+
+#define gcvFALSE 0
+#define gcvTRUE 1
+
+#define gcvINFINITE ((gctUINT32) ~0U)
+
+#define gcvINVALID_HANDLE ((gctHANDLE) ~0U)
+
+typedef int gctBOOL;
+typedef gctBOOL * gctBOOL_PTR;
+
+typedef int gctINT;
+typedef signed char gctINT8;
+typedef signed short gctINT16;
+typedef signed int gctINT32;
+typedef signed long long gctINT64;
+
+typedef gctINT * gctINT_PTR;
+typedef gctINT8 * gctINT8_PTR;
+typedef gctINT16 * gctINT16_PTR;
+typedef gctINT32 * gctINT32_PTR;
+typedef gctINT64 * gctINT64_PTR;
+
+typedef unsigned int gctUINT;
+typedef unsigned char gctUINT8;
+typedef unsigned short gctUINT16;
+typedef unsigned int gctUINT32;
+typedef unsigned long long gctUINT64;
+typedef unsigned long gctUINTPTR_T;
+
+typedef gctUINT * gctUINT_PTR;
+typedef gctUINT8 * gctUINT8_PTR;
+typedef gctUINT16 * gctUINT16_PTR;
+typedef gctUINT32 * gctUINT32_PTR;
+typedef gctUINT64 * gctUINT64_PTR;
+
+typedef unsigned long gctSIZE_T;
+typedef gctSIZE_T * gctSIZE_T_PTR;
+
+#ifdef __cplusplus
+# define gcvNULL 0
+#else
+# define gcvNULL ((void *) 0)
+#endif
+
+typedef float gctFLOAT;
+typedef signed int gctFIXED_POINT;
+typedef float * gctFLOAT_PTR;
+
+typedef void * gctPHYS_ADDR;
+typedef void * gctHANDLE;
+typedef void * gctFILE;
+typedef void * gctSIGNAL;
+typedef void * gctWINDOW;
+typedef void * gctIMAGE;
+
+typedef void * gctSEMAPHORE;
+
+typedef void * gctPOINTER;
+typedef const void * gctCONST_POINTER;
+
+typedef char gctCHAR;
+typedef char * gctSTRING;
+typedef const char * gctCONST_STRING;
+
+typedef struct _gcsCOUNT_STRING
+{
+ gctSIZE_T Length;
+ gctCONST_STRING String;
+}
+gcsCOUNT_STRING;
+
+typedef union _gcuFLOAT_UINT32
+{
+ gctFLOAT f;
+ gctUINT32 u;
+}
+gcuFLOAT_UINT32;
+
+/* Fixed point constants. */
+#define gcvZERO_X ((gctFIXED_POINT) 0x00000000)
+#define gcvHALF_X ((gctFIXED_POINT) 0x00008000)
+#define gcvONE_X ((gctFIXED_POINT) 0x00010000)
+#define gcvNEGONE_X ((gctFIXED_POINT) 0xFFFF0000)
+#define gcvTWO_X ((gctFIXED_POINT) 0x00020000)
+
+/* Stringizing macro. */
+#define gcmSTRING(Value) #Value
+
+/******************************************************************************\
+******************************* Fixed Point Math *******************************
+\******************************************************************************/
+
+#define gcmXMultiply(x1, x2) gcoMATH_MultiplyFixed(x1, x2)
+#define gcmXDivide(x1, x2) gcoMATH_DivideFixed(x1, x2)
+#define gcmXMultiplyDivide(x1, x2, x3) gcoMATH_MultiplyDivideFixed(x1, x2, x3)
+
+/* 2D Engine profile. */
+typedef struct _gcs2D_PROFILE
+{
+ /* Cycle count.
+ 32bit counter incremented every 2D clock cycle.
+ Wraps back to 0 when the counter overflows.
+ */
+ gctUINT32 cycleCount;
+
+ /* Pixels rendered by the 2D engine.
+ Resets to 0 every time it is read. */
+ gctUINT32 pixelsRendered;
+}
+gcs2D_PROFILE;
+
+/* Macro to combine four characters into a Charcater Code. */
+#define gcmCC(c1, c2, c3, c4) \
+( \
+ (char) (c1) \
+ | \
+ ((char) (c2) << 8) \
+ | \
+ ((char) (c3) << 16) \
+ | \
+ ((char) (c4) << 24) \
+)
+
+#define gcmPRINTABLE(c) ((((c) >= ' ') && ((c) <= '}')) ? ((c) != '%' ? (c) : ' ') : ' ')
+
+#define gcmCC_PRINT(cc) \
+ gcmPRINTABLE((char) ( (cc) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 8) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 16) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 24) & 0xFF))
+
+/******************************************************************************\
+****************************** Function Parameters *****************************
+\******************************************************************************/
+
+#define IN
+#define OUT
+#define OPTIONAL
+
+/******************************************************************************\
+********************************* Status Codes *********************************
+\******************************************************************************/
+
+typedef enum _gceSTATUS
+{
+ gcvSTATUS_OK = 0,
+ gcvSTATUS_FALSE = 0,
+ gcvSTATUS_TRUE = 1,
+ gcvSTATUS_NO_MORE_DATA = 2,
+ gcvSTATUS_CACHED = 3,
+ gcvSTATUS_MIPMAP_TOO_LARGE = 4,
+ gcvSTATUS_NAME_NOT_FOUND = 5,
+ gcvSTATUS_NOT_OUR_INTERRUPT = 6,
+ gcvSTATUS_MISMATCH = 7,
+ gcvSTATUS_MIPMAP_TOO_SMALL = 8,
+ gcvSTATUS_LARGER = 9,
+ gcvSTATUS_SMALLER = 10,
+ gcvSTATUS_CHIP_NOT_READY = 11,
+ gcvSTATUS_NEED_CONVERSION = 12,
+ gcvSTATUS_SKIP = 13,
+ gcvSTATUS_DATA_TOO_LARGE = 14,
+ gcvSTATUS_INVALID_CONFIG = 15,
+ gcvSTATUS_CHANGED = 16,
+ gcvSTATUS_NOT_SUPPORT_DITHER = 17,
+ gcvSTATUS_EXECUTED = 18,
+ gcvSTATUS_TERMINATE = 19,
+
+ gcvSTATUS_CONVERT_TO_SINGLE_STREAM = 20,
+
+ gcvSTATUS_INVALID_ARGUMENT = -1,
+ gcvSTATUS_INVALID_OBJECT = -2,
+ gcvSTATUS_OUT_OF_MEMORY = -3,
+ gcvSTATUS_MEMORY_LOCKED = -4,
+ gcvSTATUS_MEMORY_UNLOCKED = -5,
+ gcvSTATUS_HEAP_CORRUPTED = -6,
+ gcvSTATUS_GENERIC_IO = -7,
+ gcvSTATUS_INVALID_ADDRESS = -8,
+ gcvSTATUS_CONTEXT_LOSSED = -9,
+ gcvSTATUS_TOO_COMPLEX = -10,
+ gcvSTATUS_BUFFER_TOO_SMALL = -11,
+ gcvSTATUS_INTERFACE_ERROR = -12,
+ gcvSTATUS_NOT_SUPPORTED = -13,
+ gcvSTATUS_MORE_DATA = -14,
+ gcvSTATUS_TIMEOUT = -15,
+ gcvSTATUS_OUT_OF_RESOURCES = -16,
+ gcvSTATUS_INVALID_DATA = -17,
+ gcvSTATUS_INVALID_MIPMAP = -18,
+ gcvSTATUS_NOT_FOUND = -19,
+ gcvSTATUS_NOT_ALIGNED = -20,
+ gcvSTATUS_INVALID_REQUEST = -21,
+ gcvSTATUS_GPU_NOT_RESPONDING = -22,
+ gcvSTATUS_TIMER_OVERFLOW = -23,
+ gcvSTATUS_VERSION_MISMATCH = -24,
+ gcvSTATUS_LOCKED = -25,
+ gcvSTATUS_INTERRUPTED = -26,
+ gcvSTATUS_DEVICE = -27,
+ gcvSTATUS_NOT_MULTI_PIPE_ALIGNED = -28,
+
+ /* Linker errors. */
+ gcvSTATUS_GLOBAL_TYPE_MISMATCH = -1000,
+ gcvSTATUS_TOO_MANY_ATTRIBUTES = -1001,
+ gcvSTATUS_TOO_MANY_UNIFORMS = -1002,
+ gcvSTATUS_TOO_MANY_VARYINGS = -1003,
+ gcvSTATUS_UNDECLARED_VARYING = -1004,
+ gcvSTATUS_VARYING_TYPE_MISMATCH = -1005,
+ gcvSTATUS_MISSING_MAIN = -1006,
+ gcvSTATUS_NAME_MISMATCH = -1007,
+ gcvSTATUS_INVALID_INDEX = -1008,
+ gcvSTATUS_UNIFORM_TYPE_MISMATCH = -1009,
+
+ /* Compiler errors. */
+ gcvSTATUS_COMPILER_FE_PREPROCESSOR_ERROR = -2000,
+ gcvSTATUS_COMPILER_FE_PARSER_ERROR = -2001,
+}
+gceSTATUS;
+
+/******************************************************************************\
+********************************* Status Macros ********************************
+\******************************************************************************/
+
+#define gcmIS_ERROR(status) (status < 0)
+#define gcmNO_ERROR(status) (status >= 0)
+#define gcmIS_SUCCESS(status) (status == gcvSTATUS_OK)
+
+/******************************************************************************\
+********************************* Field Macros *********************************
+\******************************************************************************/
+
+#define __gcmSTART(reg_field) \
+ (0 ? reg_field)
+
+#define __gcmEND(reg_field) \
+ (1 ? reg_field)
+
+#define __gcmGETSIZE(reg_field) \
+ (__gcmEND(reg_field) - __gcmSTART(reg_field) + 1)
+
+#define __gcmALIGN(data, reg_field) \
+ (((gctUINT32) (data)) << __gcmSTART(reg_field))
+
+#define __gcmMASK(reg_field) \
+ ((gctUINT32) ((__gcmGETSIZE(reg_field) == 32) \
+ ? ~0 \
+ : (~(~0 << __gcmGETSIZE(reg_field)))))
+
+/*******************************************************************************
+**
+** gcmFIELDMASK
+**
+** Get aligned field mask.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmFIELDMASK(reg, field) \
+( \
+ __gcmALIGN(__gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmGETFIELD
+**
+** Extract the value of a field from specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmGETFIELD(data, reg, field) \
+( \
+ ((((gctUINT32) (data)) >> __gcmSTART(reg##_##field)) \
+ & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELD
+**
+** Set the value of a field within specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETFIELD(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN((gctUINT32) (value) \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELDVALUE
+**
+** Set the value of a field within specified data with a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmSETFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN(reg##_##field##_##value \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmGETMASKEDFIELDMASK
+**
+** Determine field mask of a masked field.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmGETMASKEDFIELDMASK(reg, field) \
+( \
+ gcmSETFIELD(0, reg, field, ~0) | \
+ gcmSETFIELD(0, reg, MASK_ ## field, ~0) \
+)
+
+/*******************************************************************************
+**
+** gcmSETMASKEDFIELD
+**
+** Set the value of a masked field with specified data.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETMASKEDFIELD(reg, field, value) \
+( \
+ gcmSETFIELD (~0, reg, field, value) & \
+ gcmSETFIELDVALUE(~0, reg, MASK_ ## field, ENABLED) \
+)
+
+/*******************************************************************************
+**
+** gcmSETMASKEDFIELDVALUE
+**
+** Set the value of a masked field with specified data.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETMASKEDFIELDVALUE(reg, field, value) \
+( \
+ gcmSETFIELDVALUE(~0, reg, field, value) & \
+ gcmSETFIELDVALUE(~0, reg, MASK_ ## field, ENABLED) \
+)
+
+/*******************************************************************************
+**
+** gcmVERIFYFIELDVALUE
+**
+** Verify if the value of a field within specified data equals a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmVERIFYFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) >> __gcmSTART(reg##_##field) & \
+ __gcmMASK(reg##_##field)) \
+ == \
+ (reg##_##field##_##value & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+** Bit field macros.
+*/
+
+#define __gcmSTARTBIT(Field) \
+ ( 1 ? Field )
+
+#define __gcmBITSIZE(Field) \
+ ( 0 ? Field )
+
+#define __gcmBITMASK(Field) \
+( \
+ (1 << __gcmBITSIZE(Field)) - 1 \
+)
+
+#define gcmGETBITS(Value, Type, Field) \
+( \
+ ( ((Type) (Value)) >> __gcmSTARTBIT(Field) ) \
+ & \
+ __gcmBITMASK(Field) \
+)
+
+#define gcmSETBITS(Value, Type, Field, NewValue) \
+( \
+ ( ((Type) (Value)) \
+ & ~(__gcmBITMASK(Field) << __gcmSTARTBIT(Field)) \
+ ) \
+ | \
+ ( ( ((Type) (NewValue)) \
+ & __gcmBITMASK(Field) \
+ ) << __gcmSTARTBIT(Field) \
+ ) \
+)
+
+/*******************************************************************************
+**
+** gcmISINREGRANGE
+**
+** Verify whether the specified address is in the register range.
+**
+** ARGUMENTS:
+**
+** Address Address to be verified.
+** Name Name of a register.
+*/
+
+#define gcmISINREGRANGE(Address, Name) \
+( \
+ ((Address & (~0U << Name ## _LSB)) == (Name ## _Address >> 2)) \
+)
+
+/*******************************************************************************
+**
+** A set of macros to aid state loading.
+**
+** ARGUMENTS:
+**
+** CommandBuffer Pointer to a gcoCMDBUF object.
+** StateDelta Pointer to a gcsSTATE_DELTA state delta structure.
+** Memory Destination memory pointer of gctUINT32_PTR type.
+** PartOfContext Whether or not the state is a part of the context.
+** FixedPoint Whether or not the state is of the fixed point format.
+** Count Number of consecutive states to be loaded.
+** Address State address.
+** Data Data to be set to the state.
+*/
+
+/*----------------------------------------------------------------------------*/
+
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+
+# define gcmSTORELOADSTATE(CommandBuffer, Memory, Address, Count) \
+ CommandBuffer->lastLoadStatePtr = gcmPTR_TO_UINT64(Memory); \
+ CommandBuffer->lastLoadStateAddress = Address; \
+ CommandBuffer->lastLoadStateCount = Count
+
+# define gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address) \
+ gcmASSERT( \
+ (gctUINT) (Memory - gcmUINT64_TO_TYPE(CommandBuffer->lastLoadStatePtr, gctUINT32_PTR) - 1) \
+ == \
+ (gctUINT) (Address - CommandBuffer->lastLoadStateAddress) \
+ ); \
+ \
+ gcmASSERT(CommandBuffer->lastLoadStateCount > 0); \
+ \
+ CommandBuffer->lastLoadStateCount -= 1
+
+# define gcmVERIFYLOADSTATEDONE(CommandBuffer) \
+ gcmASSERT(CommandBuffer->lastLoadStateCount == 0)
+
+#else
+
+# define gcmSTORELOADSTATE(CommandBuffer, Memory, Address, Count)
+# define gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address)
+# define gcmVERIFYLOADSTATEDONE(CommandBuffer)
+
+#endif
+
+#if gcdSECURE_USER
+
+# define gcmDEFINESECUREUSER() \
+ gctUINT __secure_user_offset__; \
+ gctUINT32_PTR __secure_user_hintArray__;
+
+# define gcmBEGINSECUREUSER() \
+ __secure_user_offset__ = reserve->lastOffset; \
+ \
+ __secure_user_hintArray__ = gcmUINT64_TO_PTR(reserve->hintArrayTail)
+
+# define gcmENDSECUREUSER() \
+ reserve->hintArrayTail = gcmPTR_TO_UINT64(__secure_user_hintArray__)
+
+# define gcmSKIPSECUREUSER() \
+ __secure_user_offset__ += gcmSIZEOF(gctUINT32)
+
+# define gcmUPDATESECUREUSER() \
+ *__secure_user_hintArray__ = __secure_user_offset__; \
+ \
+ __secure_user_offset__ += gcmSIZEOF(gctUINT32); \
+ __secure_user_hintArray__ += 1
+
+#else
+
+# define gcmDEFINESECUREUSER()
+# define gcmBEGINSECUREUSER()
+# define gcmENDSECUREUSER()
+# define gcmSKIPSECUREUSER()
+# define gcmUPDATESECUREUSER()
+
+#endif
+
+/*----------------------------------------------------------------------------*/
+
+#if gcdDUMP
+# define gcmDUMPSTATEDATA(StateDelta, FixedPoint, Address, Data) \
+ if (FixedPoint) \
+ { \
+ gcmDUMP(gcvNULL, "@[state.x 0x%04X 0x%08X]", \
+ Address, Data \
+ ); \
+ } \
+ else \
+ { \
+ gcmDUMP(gcvNULL, "@[state 0x%04X 0x%08X]", \
+ Address, Data \
+ ); \
+ }
+#else
+# define gcmDUMPSTATEDATA(StateDelta, FixedPoint, Address, Data)
+#endif
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmDEFINESTATEBUFFER(CommandBuffer, StateDelta, Memory, ReserveSize) \
+ gcmDEFINESECUREUSER() \
+ gctSIZE_T ReserveSize; \
+ gcoCMDBUF CommandBuffer; \
+ gctUINT32_PTR Memory; \
+ gcsSTATE_DELTA_PTR StateDelta
+
+#define gcmBEGINSTATEBUFFER(Hardware, CommandBuffer, StateDelta, Memory, ReserveSize) \
+{ \
+ gcmONERROR(gcoBUFFER_Reserve( \
+ Hardware->buffer, ReserveSize, gcvTRUE, &CommandBuffer \
+ )); \
+ \
+ Memory = gcmUINT64_TO_PTR(CommandBuffer->lastReserve); \
+ \
+ StateDelta = Hardware->delta; \
+ \
+ gcmBEGINSECUREUSER(); \
+}
+
+#define gcmENDSTATEBUFFER(CommandBuffer, Memory, ReserveSize) \
+{ \
+ gcmENDSECUREUSER(); \
+ \
+ gcmASSERT( \
+ gcmUINT64_TO_TYPE(CommandBuffer->lastReserve, gctUINT8_PTR) + ReserveSize \
+ == \
+ (gctUINT8_PTR) Memory \
+ ); \
+}
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmBEGINSTATEBATCH(CommandBuffer, Memory, FixedPoint, Address, Count) \
+{ \
+ gcmASSERT(((Memory - gcmUINT64_TO_TYPE(CommandBuffer->lastReserve, gctUINT32_PTR)) & 1) == 0); \
+ gcmASSERT((gctUINT32)Count <= 1024); \
+ \
+ gcmVERIFYLOADSTATEDONE(CommandBuffer); \
+ \
+ gcmSTORELOADSTATE(CommandBuffer, Memory, Address, Count); \
+ \
+ *Memory++ \
+ = gcmSETFIELDVALUE(0, AQ_COMMAND_LOAD_STATE_COMMAND, OPCODE, LOAD_STATE) \
+ | gcmSETFIELD (0, AQ_COMMAND_LOAD_STATE_COMMAND, FLOAT, FixedPoint) \
+ | gcmSETFIELD (0, AQ_COMMAND_LOAD_STATE_COMMAND, COUNT, Count) \
+ | gcmSETFIELD (0, AQ_COMMAND_LOAD_STATE_COMMAND, ADDRESS, Address); \
+ \
+ gcmSKIPSECUREUSER(); \
+}
+
+#define gcmENDSTATEBATCH(CommandBuffer, Memory) \
+{ \
+ gcmVERIFYLOADSTATEDONE(CommandBuffer); \
+ \
+ gcmASSERT(((Memory - gcmUINT64_TO_TYPE(CommandBuffer->lastReserve, gctUINT32_PTR)) & 1) == 0); \
+}
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmSETSTATEDATA(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data) \
+{ \
+ gctUINT32 __temp_data32__; \
+ \
+ gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address); \
+ \
+ __temp_data32__ = Data; \
+ \
+ *Memory++ = __temp_data32__; \
+ \
+ gcoHARDWARE_UpdateDelta( \
+ StateDelta, FixedPoint, Address, 0, __temp_data32__ \
+ ); \
+ \
+ gcmDUMPSTATEDATA(StateDelta, FixedPoint, Address, __temp_data32__); \
+ \
+ gcmUPDATESECUREUSER(); \
+}
+
+#define gcmSETCTRLSTATE(StateDelta, CommandBuffer, Memory, Address, Data) \
+{ \
+ gctUINT32 __temp_data32__; \
+ \
+ gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address); \
+ \
+ __temp_data32__ = Data; \
+ \
+ *Memory++ = __temp_data32__; \
+ \
+ gcmDUMPSTATEDATA(StateDelta, gcvFALSE, Address, __temp_data32__); \
+ \
+ gcmSKIPSECUREUSER(); \
+}
+
+#define gcmSETFILLER(CommandBuffer, Memory) \
+{ \
+ gcmVERIFYLOADSTATEDONE(CommandBuffer); \
+ \
+ Memory += 1; \
+ \
+ gcmSKIPSECUREUSER(); \
+}
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmSETSINGLESTATE(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data) \
+{ \
+ gcmBEGINSTATEBATCH(CommandBuffer, Memory, FixedPoint, Address, 1); \
+ gcmSETSTATEDATA(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data); \
+ gcmENDSTATEBATCH(CommandBuffer, Memory); \
+}
+
+#define gcmSETSINGLECTRLSTATE(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data) \
+{ \
+ gcmBEGINSTATEBATCH(CommandBuffer, Memory, FixedPoint, Address, 1); \
+ gcmSETCTRLSTATE(StateDelta, CommandBuffer, Memory, Address, Data); \
+ gcmENDSTATEBATCH(CommandBuffer, Memory); \
+}
+
+
+/*******************************************************************************
+**
+** gcmSETSTARTDECOMMAND
+**
+** Form a START_DE command.
+**
+** ARGUMENTS:
+**
+** Memory Destination memory pointer of gctUINT32_PTR type.
+** Count Number of the rectangles.
+*/
+
+#define gcmSETSTARTDECOMMAND(Memory, Count) \
+{ \
+ *Memory++ \
+ = gcmSETFIELDVALUE(0, AQ_COMMAND_START_DE_COMMAND, OPCODE, START_DE) \
+ | gcmSETFIELD (0, AQ_COMMAND_START_DE_COMMAND, COUNT, Count) \
+ | gcmSETFIELD (0, AQ_COMMAND_START_DE_COMMAND, DATA_COUNT, 0); \
+ \
+ *Memory++ = 0xDEADDEED; \
+}
+
+/******************************************************************************\
+******************************** Ceiling Macro ********************************
+\******************************************************************************/
+#define gcmCEIL(x) ((x - (gctUINT32)x) == 0 ? (gctUINT32)x : (gctUINT32)x + 1)
+
+/******************************************************************************\
+******************************** Min/Max Macros ********************************
+\******************************************************************************/
+
+#define gcmMIN(x, y) (((x) <= (y)) ? (x) : (y))
+#define gcmMAX(x, y) (((x) >= (y)) ? (x) : (y))
+#define gcmCLAMP(x, min, max) (((x) < (min)) ? (min) : \
+ ((x) > (max)) ? (max) : (x))
+#define gcmABS(x) (((x) < 0) ? -(x) : (x))
+#define gcmNEG(x) (((x) < 0) ? (x) : -(x))
+
+/*******************************************************************************
+**
+** gcmPTR2INT
+**
+** Convert a pointer to an integer value.
+**
+** ARGUMENTS:
+**
+** p Pointer value.
+*/
+#if defined(_WIN32) || (defined(__LP64__) && __LP64__)
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (gctUINT64) (p) \
+ )
+#else
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (p) \
+ )
+#endif
+
+/*******************************************************************************
+**
+** gcmINT2PTR
+**
+** Convert an integer value into a pointer.
+**
+** ARGUMENTS:
+**
+** v Integer value.
+*/
+#ifdef __LP64__
+# define gcmINT2PTR(i) \
+ ( \
+ (gctPOINTER) (gctINT64) (i) \
+ )
+#else
+# define gcmINT2PTR(i) \
+ ( \
+ (gctPOINTER) (i) \
+ )
+#endif
+
+/*******************************************************************************
+**
+** gcmOFFSETOF
+**
+** Compute the byte offset of a field inside a structure.
+**
+** ARGUMENTS:
+**
+** s Structure name.
+** field Field name.
+*/
+#define gcmOFFSETOF(s, field) \
+( \
+ gcmPTR2INT(& (((struct s *) 0)->field)) \
+)
+
+#define gcmSWAB32(x) ((gctUINT32)( \
+ (((gctUINT32)(x) & (gctUINT32)0x000000FFUL) << 24) | \
+ (((gctUINT32)(x) & (gctUINT32)0x0000FF00UL) << 8) | \
+ (((gctUINT32)(x) & (gctUINT32)0x00FF0000UL) >> 8) | \
+ (((gctUINT32)(x) & (gctUINT32)0xFF000000UL) >> 24)))
+
+/*******************************************************************************
+***** Database ****************************************************************/
+
+typedef struct _gcsDATABASE_COUNTERS
+{
+ /* Number of currently allocated bytes. */
+ gctUINT64 bytes;
+
+ /* Maximum number of bytes allocated (memory footprint). */
+ gctUINT64 maxBytes;
+
+ /* Total number of bytes allocated. */
+ gctUINT64 totalBytes;
+}
+gcsDATABASE_COUNTERS;
+
+typedef struct _gcuDATABASE_INFO
+{
+ /* Counters. */
+ gcsDATABASE_COUNTERS counters;
+
+ /* Time value. */
+ gctUINT64 time;
+}
+gcuDATABASE_INFO;
+
+/*******************************************************************************
+***** Frame database **********************************************************/
+
+/* gcsHAL_FRAME_INFO */
+typedef struct _gcsHAL_FRAME_INFO
+{
+ /* Current timer tick. */
+ OUT gctUINT64 ticks;
+
+ /* Bandwidth counters. */
+ OUT gctUINT readBytes8[8];
+ OUT gctUINT writeBytes8[8];
+
+ /* Counters. */
+ OUT gctUINT cycles[8];
+ OUT gctUINT idleCycles[8];
+ OUT gctUINT mcCycles[8];
+ OUT gctUINT readRequests[8];
+ OUT gctUINT writeRequests[8];
+
+ /* 3D counters. */
+ OUT gctUINT vertexCount;
+ OUT gctUINT primitiveCount;
+ OUT gctUINT rejectedPrimitives;
+ OUT gctUINT culledPrimitives;
+ OUT gctUINT clippedPrimitives;
+ OUT gctUINT outPrimitives;
+ OUT gctUINT inPrimitives;
+ OUT gctUINT culledQuadCount;
+ OUT gctUINT totalQuadCount;
+ OUT gctUINT quadCount;
+ OUT gctUINT totalPixelCount;
+
+ /* PE counters. */
+ OUT gctUINT colorKilled[8];
+ OUT gctUINT colorDrawn[8];
+ OUT gctUINT depthKilled[8];
+ OUT gctUINT depthDrawn[8];
+
+ /* Shader counters. */
+ OUT gctUINT shaderCycles;
+ OUT gctUINT vsInstructionCount;
+ OUT gctUINT vsTextureCount;
+ OUT gctUINT psInstructionCount;
+ OUT gctUINT psTextureCount;
+
+ /* Texture counters. */
+ OUT gctUINT bilinearRequests;
+ OUT gctUINT trilinearRequests;
+ OUT gctUINT txBytes8;
+ OUT gctUINT txHitCount;
+ OUT gctUINT txMissCount;
+}
+gcsHAL_FRAME_INFO;
+
+#if gcdLINK_QUEUE_SIZE
+typedef struct _gckLINKDATA * gckLINKDATA;
+struct _gckLINKDATA
+{
+ gctUINT32 start;
+ gctUINT32 end;
+ gctINT pid;
+};
+
+typedef struct _gckLINKQUEUE * gckLINKQUEUE;
+struct _gckLINKQUEUE
+{
+ struct _gckLINKDATA data[gcdLINK_QUEUE_SIZE];
+ gctUINT32 rear;
+ gctUINT32 front;
+ gctUINT32 count;
+};
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_types_h_ */
diff --git a/src/include_imx6_v4_1_0/gc_hal_version.h b/src/include_imx6_v4_1_0/gc_hal_version.h
new file mode 100644
index 0000000..03cb4d6
--- /dev/null
+++ b/src/include_imx6_v4_1_0/gc_hal_version.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2013 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_version_h_
+#define __gc_hal_version_h_
+
+#define gcvVERSION_MAJOR 4
+
+#define gcvVERSION_MINOR 6
+
+#define gcvVERSION_PATCH 9
+
+#define gcvVERSION_BUILD 6622
+
+#define gcvVERSION_DATE __DATE__
+
+#define gcvVERSION_TIME __TIME__
+
+#endif /* __gc_hal_version_h_ */
diff --git a/src/include_v2/gc_abi.h b/src/include_v2/gc_abi.h
new file mode 100644
index 0000000..03a02cd
--- /dev/null
+++ b/src/include_v2/gc_abi.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/** Kernel ABI definition file for Etna **/
+#ifndef H_GCABI
+#define H_GCABI
+//#define GCABI_USER_SIGNAL_HAS_TYPE
+#define GCABI_CONTEXT_HAS_PHYSICAL
+#define GCABI_HAS_MINOR_FEATURES_2
+//#define GCABI_HAS_MINOR_FEATURES_3
+
+// One of these must be set:
+#define GCABI_HAS_CONTEXT
+//#define GCABI_HAS_STATE_DELTAS
+
+/* IOCTL structure for userspace driver*/
+typedef struct
+{
+ void *in_buf;
+ unsigned int in_buf_size;
+ void *out_buf;
+ unsigned int out_buf_size;
+} vivante_ioctl_data_t;
+
+#define _gcs2D_PROFILE gcs2D_PROFILE
+
+#include "gc_hal_base.h"
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_user_context.h"
+#include "gc_hal_types.h"
+#endif
+
diff --git a/src/include_v2/gc_hal.h b/src/include_v2/gc_hal.h
new file mode 100644
index 0000000..1829e7d
--- /dev/null
+++ b/src/include_v2/gc_hal.h
@@ -0,0 +1,1900 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_h_
+#define __gc_hal_h_
+
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+#include "gc_hal_base.h"
+#include "gc_hal_profiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* Alignment Macros *******************************
+\******************************************************************************/
+
+#define gcmALIGN(n, align) \
+( \
+ ((n) + ((align) - 1)) & ~((align) - 1) \
+)
+
+/******************************************************************************\
+***************************** Element Count Macro *****************************
+\******************************************************************************/
+
+#define gcmSIZEOF(a) \
+( \
+ (gctSIZE_T) (sizeof(a)) \
+)
+
+#define gcmCOUNTOF(a) \
+( \
+ sizeof(a) / sizeof(a[0]) \
+)
+
+/******************************************************************************\
+******************************** gcsOBJECT Object *******************************
+\******************************************************************************/
+
+/* Type of objects. */
+typedef enum _gceOBJECT_TYPE
+{
+ gcvOBJ_UNKNOWN = 0,
+ gcvOBJ_2D = gcmCC('2','D',' ',' '),
+ gcvOBJ_3D = gcmCC('3','D',' ',' '),
+ gcvOBJ_ATTRIBUTE = gcmCC('A','T','T','R'),
+ gcvOBJ_BRUSHCACHE = gcmCC('B','R','U','$'),
+ gcvOBJ_BRUSHNODE = gcmCC('B','R','U','n'),
+ gcvOBJ_BRUSH = gcmCC('B','R','U','o'),
+ gcvOBJ_BUFFER = gcmCC('B','U','F','R'),
+ gcvOBJ_COMMAND = gcmCC('C','M','D',' '),
+ gcvOBJ_COMMANDBUFFER = gcmCC('C','M','D','B'),
+ gcvOBJ_CONTEXT = gcmCC('C','T','X','T'),
+ gcvOBJ_DEVICE = gcmCC('D','E','V',' '),
+ gcvOBJ_DUMP = gcmCC('D','U','M','P'),
+ gcvOBJ_EVENT = gcmCC('E','V','N','T'),
+ gcvOBJ_FUNCTION = gcmCC('F','U','N','C'),
+ gcvOBJ_HAL = gcmCC('H','A','L',' '),
+ gcvOBJ_HARDWARE = gcmCC('H','A','R','D'),
+ gcvOBJ_HEAP = gcmCC('H','E','A','P'),
+ gcvOBJ_INDEX = gcmCC('I','N','D','X'),
+ gcvOBJ_INTERRUPT = gcmCC('I','N','T','R'),
+ gcvOBJ_KERNEL = gcmCC('K','E','R','N'),
+ gcvOBJ_MEMORYBUFFER = gcmCC('M','E','M','B'),
+ gcvOBJ_MMU = gcmCC('M','M','U',' '),
+ gcvOBJ_OS = gcmCC('O','S',' ',' '),
+ gcvOBJ_OUTPUT = gcmCC('O','U','T','P'),
+ gcvOBJ_PAINT = gcmCC('P','N','T',' '),
+ gcvOBJ_PATH = gcmCC('P','A','T','H'),
+ gcvOBJ_QUEUE = gcmCC('Q','U','E',' '),
+ gcvOBJ_SAMPLER = gcmCC('S','A','M','P'),
+ gcvOBJ_SHADER = gcmCC('S','H','D','R'),
+ gcvOBJ_STREAM = gcmCC('S','T','R','M'),
+ gcvOBJ_SURF = gcmCC('S','U','R','F'),
+ gcvOBJ_TEXTURE = gcmCC('T','X','T','R'),
+ gcvOBJ_UNIFORM = gcmCC('U','N','I','F'),
+ gcvOBJ_VARIABLE = gcmCC('V','A','R','I'),
+ gcvOBJ_VERTEX = gcmCC('V','R','T','X'),
+ gcvOBJ_VIDMEM = gcmCC('V','M','E','M'),
+ gcvOBJ_VG = gcmCC('V','G',' ',' '),
+}
+gceOBJECT_TYPE;
+
+/* gcsOBJECT object defintinon. */
+typedef struct _gcsOBJECT
+{
+ /* Type of an object. */
+ gceOBJECT_TYPE type;
+}
+gcsOBJECT;
+
+/* Kernel settings. */
+typedef struct _gcsKERNEL_SETTINGS
+{
+ /* Used RealTime signal between kernel and user. */
+ gctINT signal;
+}
+gcsKERNEL_SETTINGS;
+
+typedef struct _gckHARDWARE * gckHARDWARE;
+
+/*******************************************************************************
+**
+** gcmVERIFY_OBJECT
+**
+** Assert if an object is invalid or is not of the specified type. If the
+** object is invalid or not of the specified type, gcvSTATUS_INVALID_OBJECT
+** will be returned from the current function. In retail mode this macro
+** does nothing.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_OBJECT(prefix, obj, t) \
+ do \
+ { \
+ if ((obj) == gcvNULL) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: NULL"); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT((obj) != gcvNULL); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ } \
+ else if (((gcsOBJECT*) (obj))->type != t) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: %c%c%c%c", \
+ gcmCC_PRINT(((gcsOBJECT*) (obj))->type)); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT(((gcsOBJECT*)(obj))->type == t); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcm, obj, t)
+# define gcmkVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcmk, obj, t)
+#else
+# define gcmVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+# define gcmkVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+#endif
+
+/******************************************************************************\
+********************************** gckOS Object *********************************
+\******************************************************************************/
+
+typedef struct _gckOS * gckOS;
+
+/* Construct a new gckOS object. */
+gceSTATUS
+gckOS_Construct(
+ IN gctPOINTER Context,
+ OUT gckOS * Os
+ );
+
+/* Destroy an gckOS object. */
+gceSTATUS
+gckOS_Destroy(
+ IN gckOS Os
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckOS_QueryVideoMemory(
+ IN gckOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gckOS_Allocate(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gckOS_Free(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Wrapper for allocation memory.. */
+gceSTATUS
+gckOS_AllocateMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Wrapper for freeing memory. */
+gceSTATUS
+gckOS_FreeMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocateVirtualMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Wrapper for freeing virtual memory. */
+gceSTATUS
+gckOS_FreeVirtualMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemoryEx(
+ IN gckOS Os,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Lock pages. */
+gceSTATUS
+gckOS_LockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+#endif
+ OUT gctPOINTER * Logical,
+ OUT gctSIZE_T * PageCount
+ );
+
+/* Map pages. */
+gceSTATUS
+gckOS_MapPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Logical,
+#endif
+ IN gctSIZE_T PageCount,
+ IN gctPOINTER PageTable
+ );
+
+/* Unlock pages. */
+gceSTATUS
+gckOS_UnlockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+#endif
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Free paged memory. */
+gceSTATUS
+gckOS_FreePagedMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Allocate non-paged memory. */
+gceSTATUS
+gckOS_AllocateNonPagedMemory(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non-paged memory. */
+gceSTATUS
+gckOS_FreeNonPagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gckOS_AllocateContiguous(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gckOS_FreeContiguous(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get the number fo bytes per page. */
+gceSTATUS
+gckOS_GetPageSize(
+ IN gckOS Os,
+ OUT gctSIZE_T * PageSize
+ );
+
+/* Get the physical address of a corresponding logical address. */
+gceSTATUS
+gckOS_GetPhysicalAddress(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+/* Map physical memory. */
+gceSTATUS
+gckOS_MapPhysical(
+ IN gckOS Os,
+ IN gctUINT32 Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap previously mapped physical memory. */
+gceSTATUS
+gckOS_UnmapPhysical(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Read data from a hardware register. */
+gceSTATUS
+gckOS_ReadRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+/* Write data to a hardware register. */
+gceSTATUS
+gckOS_WriteRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Write data to a 32-bit memory location. */
+gceSTATUS
+gckOS_WriteMemory(
+ IN gckOS Os,
+ IN gctPOINTER Address,
+ IN gctUINT32 Data
+ );
+
+/* Map physical memory into the process space. */
+gceSTATUS
+gckOS_MapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap physical memory from the process space. */
+gceSTATUS
+gckOS_UnmapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Create a new mutex. */
+gceSTATUS
+gckOS_CreateMutex(
+ IN gckOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gckOS_DeleteMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gckOS_AcquireMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gckOS_ReleaseMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Atomically exchange a pair of 32-bit values. */
+gceSTATUS
+gckOS_AtomicExchange(
+ IN gckOS Os,
+ IN OUT gctUINT32_PTR Target,
+ IN gctUINT32 NewValue,
+ OUT gctUINT32_PTR OldValue
+ );
+
+/* Atomically exchange a pair of pointers. */
+gceSTATUS
+gckOS_AtomicExchangePtr(
+ IN gckOS Os,
+ IN OUT gctPOINTER * Target,
+ IN gctPOINTER NewValue,
+ OUT gctPOINTER * OldValue
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomConstruct
+**
+** Create an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** OUTPUT:
+**
+** gctPOINTER * Atom
+** Pointer to a variable receiving the constructed atom.
+*/
+gceSTATUS
+gckOS_AtomConstruct(
+ IN gckOS Os,
+ OUT gctPOINTER * Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDestroy
+**
+** Destroy an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom to destroy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_AtomDestroy(
+ IN gckOS Os,
+ OUT gctPOINTER Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomGet
+**
+** Get the 32-bit value protected by an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the value of the atom.
+*/
+gceSTATUS
+gckOS_AtomGet(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomIncrement
+**
+** Atomically increment the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomIncrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDecrement
+**
+** Atomically decrement the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomDecrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gckOS_Delay(
+ IN gckOS Os,
+ IN gctUINT32 Delay
+ );
+
+/* Memory barrier. */
+gceSTATUS
+gckOS_MemoryBarrier(
+ IN gckOS Os,
+ IN gctPOINTER Address
+ );
+
+/* Map user pointer. */
+gceSTATUS
+gckOS_MapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Unmap user pointer. */
+gceSTATUS
+gckOS_UnmapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ IN gctPOINTER KernelPointer
+ );
+
+#ifdef __QNXNTO__
+/* Map user physical address. */
+gceSTATUS
+gckOS_MapUserPhysical(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Phys,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Allocate from user's shared pool. */
+gceSTATUS
+gckOS_AllocateNonPagedMemoryShmPool(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Pid,
+ IN gctHANDLE Handle,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+#endif
+
+gceSTATUS
+gckOS_SuspendInterrupt(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_ResumeInterrupt(
+ IN gckOS Os
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gckOS_GetBaseAddress(
+ IN gckOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gckOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gckOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Device I/O control to the kernel HAL layer. */
+gceSTATUS
+gckOS_DeviceControl(
+ IN gckOS Os,
+ IN gctBOOL FromUser,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ OUT gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/*******************************************************************************
+**
+** gckOS_GetProcessID
+**
+** Get current process ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ProcessID
+** Pointer to the variable that receives the process ID.
+*/
+gceSTATUS
+gckOS_GetProcessID(
+ OUT gctUINT32_PTR ProcessID
+ );
+
+/*******************************************************************************
+**
+** gckOS_GetThreadID
+**
+** Get current thread ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ThreadID
+** Pointer to the variable that receives the thread ID.
+*/
+gceSTATUS
+gckOS_GetThreadID(
+ OUT gctUINT32_PTR ThreadID
+ );
+
+/******************************************************************************\
+********************************** Signal Object *********************************
+\******************************************************************************/
+
+/* User signal command codes. */
+typedef enum _gceUSER_SIGNAL_COMMAND_CODES
+{
+ gcvUSER_SIGNAL_CREATE,
+ gcvUSER_SIGNAL_DESTROY,
+ gcvUSER_SIGNAL_SIGNAL,
+ gcvUSER_SIGNAL_WAIT,
+}
+gceUSER_SIGNAL_COMMAND_CODES;
+
+/* Create a signal. */
+gceSTATUS
+gckOS_CreateSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gckOS_DestroySignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gckOS_Signal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gckOS_WaitSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Wait for a signal uninterruptibly. */
+gceSTATUS
+gckOS_WaitSignalUninterruptible(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Map a user signal to the kernel space. */
+gceSTATUS
+gckOS_MapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process,
+ OUT gctSIGNAL * MappedSignal
+ );
+
+/* Unmap a user signal */
+gceSTATUS
+gckOS_UnmapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL MappedSignal
+ );
+
+/* Map user memory. */
+gceSTATUS
+gckOS_MapUserMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gckOS_UnmapUserMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+#if !USE_NEW_LINUX_SIGNAL
+/* Create signal to be used in the user space. */
+gceSTATUS
+gckOS_CreateUserSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctINT * SignalID
+ );
+
+/* Destroy signal used in the user space. */
+gceSTATUS
+gckOS_DestroyUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID
+ );
+
+/* Wait for signal used in the user space. */
+gceSTATUS
+gckOS_WaitUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctUINT32 Wait
+ );
+
+/* Signal a signal used in the user space. */
+gceSTATUS
+gckOS_SignalUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctBOOL State
+ );
+#endif /* USE_NEW_LINUX_SIGNAL */
+
+/* Set a signal owned by a process. */
+#if defined(__QNXNTO__)
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctINT Recvid,
+ IN gctINT Coid
+ );
+#else
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process
+ );
+#endif
+
+/******************************************************************************\
+** Cache Support
+*/
+
+gceSTATUS
+gckOS_CacheFlush(
+ gckOS Os,
+ gctHANDLE ProcessId,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gckOS_CacheInvalidate(
+ gckOS Os,
+ gctHANDLE ProcessId,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+** Debug Support
+*/
+
+void
+gckOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gckOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gckOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+/*******************************************************************************
+** Broadcast interface.
+*/
+
+typedef enum _gceBROADCAST
+{
+ /* GPU might be idle. */
+ gcvBROADCAST_GPU_IDLE,
+
+ /* A commit is going to happen. */
+ gcvBROADCAST_GPU_COMMIT,
+
+ /* GPU seems to be stuck. */
+ gcvBROADCAST_GPU_STUCK,
+
+ /* First process gets attached. */
+ gcvBROADCAST_FIRST_PROCESS,
+
+ /* Last process gets detached. */
+ gcvBROADCAST_LAST_PROCESS,
+
+ /* AXI bus error. */
+ gcvBROADCAST_AXI_BUS_ERROR,
+}
+gceBROADCAST;
+
+gceSTATUS
+gckOS_Broadcast(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gceBROADCAST Reason
+ );
+
+/*******************************************************************************
+**
+** gckOS_SetGPUPower
+**
+** Set the power of the GPU on or off.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.ß
+**
+** gctBOOL Clock
+** gcvTRUE to turn on the clock, or gcvFALSE to turn off the clock.
+**
+** gctBOOL Power
+** gcvTRUE to turn on the power, or gcvFALSE to turn off the power.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_SetGPUPower(
+ IN gckOS Os,
+ IN gctBOOL Clock,
+ IN gctBOOL Power
+ );
+
+/*******************************************************************************
+** Semaphores.
+*/
+
+/* Create a new semaphore. */
+gceSTATUS
+gckOS_CreateSemaphore(
+ IN gckOS Os,
+ OUT gctPOINTER * Semaphore
+ );
+
+/* Delete a semahore. */
+gceSTATUS
+gckOS_DestroySemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Acquire a semahore. */
+gceSTATUS
+gckOS_AcquireSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Release a semahore. */
+gceSTATUS
+gckOS_ReleaseSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/******************************************************************************\
+********************************* gckHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gckHEAP * gckHEAP;
+
+/* Construct a new gckHEAP object. */
+gceSTATUS
+gckHEAP_Construct(
+ IN gckOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gckHEAP * Heap
+ );
+
+/* Destroy an gckHEAP object. */
+gceSTATUS
+gckHEAP_Destroy(
+ IN gckHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gckHEAP_Allocate(
+ IN gckHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckHEAP_Free(
+ IN gckHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+/* Profile the heap. */
+gceSTATUS
+gckHEAP_ProfileStart(
+ IN gckHEAP Heap
+ );
+
+gceSTATUS
+gckHEAP_ProfileEnd(
+ IN gckHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+
+#if defined gcdHAL_TEST
+gceSTATUS
+gckHEAP_Test(
+ IN gckHEAP Heap,
+ IN gctSIZE_T Vectors,
+ IN gctSIZE_T MaxSize
+ );
+#endif
+
+/******************************************************************************\
+******************************** gckVIDMEM Object ******************************
+\******************************************************************************/
+
+typedef struct _gckVIDMEM * gckVIDMEM;
+typedef union _gcuVIDMEM_NODE * gcuVIDMEM_NODE_PTR;
+typedef struct _gckKERNEL * gckKERNEL;
+
+/* Construct a new gckVIDMEM object. */
+gceSTATUS
+gckVIDMEM_Construct(
+ IN gckOS Os,
+ IN gctUINT32 BaseAddress,
+ IN gctSIZE_T Bytes,
+ IN gctSIZE_T Threshold,
+ IN gctSIZE_T Banking,
+ OUT gckVIDMEM * Memory
+ );
+
+/* Destroy an gckVDIMEM object. */
+gceSTATUS
+gckVIDMEM_Destroy(
+ IN gckVIDMEM Memory
+ );
+
+/* Allocate rectangular memory. */
+gceSTATUS
+gckVIDMEM_Allocate(
+ IN gckVIDMEM Memory,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT BytesPerPixel,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+#ifdef __QNXNTO__
+ IN gctHANDLE Handle,
+#endif
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Allocate linear memory. */
+gceSTATUS
+gckVIDMEM_AllocateLinear(
+ IN gckVIDMEM Memory,
+ IN gctSIZE_T Bytes,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+#ifdef __QNXNTO__
+ IN gctHANDLE Handle,
+#endif
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckVIDMEM_Free(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/* Lock memory. */
+gceSTATUS
+gckVIDMEM_Lock(
+ IN gcuVIDMEM_NODE_PTR Node,
+ OUT gctUINT32 * Address
+ );
+
+/* Unlock memory. */
+gceSTATUS
+gckVIDMEM_Unlock(
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type,
+ IN OUT gctBOOL * Asynchroneous
+ );
+
+/* Construct a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_ConstructVirtual(
+ IN gckKERNEL Kernel,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+#ifdef __QNXNTO__
+ IN gctHANDLE Handle,
+#endif
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Destroy a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_DestroyVirtual(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+#ifdef __QNXNTO__
+/* Set the allocating process' PID for this node. */
+gceSTATUS
+gckVIDMEM_SetPID(
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctUINT32 Pid);
+#endif
+
+/******************************************************************************\
+******************************** gckKERNEL Object ******************************
+\******************************************************************************/
+
+struct _gcsHAL_INTERFACE;
+
+/* Notifications. */
+typedef enum _gceNOTIFY
+{
+ gcvNOTIFY_INTERRUPT,
+ gcvNOTIFY_COMMAND_QUEUE,
+}
+gceNOTIFY;
+
+/* Event locations. */
+typedef enum _gceKERNEL_WHERE
+{
+ gcvKERNEL_COMMAND,
+ gcvKERNEL_VERTEX,
+ gcvKERNEL_TRIANGLE,
+ gcvKERNEL_TEXTURE,
+ gcvKERNEL_PIXEL,
+}
+gceKERNEL_WHERE;
+
+/* Flush flags. */
+typedef enum _gceKERNEL_FLUSH
+{
+ gcvFLUSH_COLOR = 0x01,
+ gcvFLUSH_DEPTH = 0x02,
+ gcvFLUSH_TEXTURE = 0x04,
+ gcvFLUSH_2D = 0x08,
+ gcvFLUSH_ALL = gcvFLUSH_COLOR
+ | gcvFLUSH_DEPTH
+ | gcvFLUSH_TEXTURE
+ | gcvFLUSH_2D,
+}
+gceKERNEL_FLUSH;
+
+/* Construct a new gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Construct(
+ IN gckOS Os,
+ IN gctPOINTER Context,
+ OUT gckKERNEL * Kernel
+ );
+
+/* Destroy an gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Destroy(
+ IN gckKERNEL Kernel
+ );
+
+/* Dispatch a user-level command. */
+gceSTATUS
+gckKERNEL_Dispatch(
+ IN gckKERNEL Kernel,
+ IN gctBOOL FromUser,
+ IN OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckKERNEL_QueryVideoMemory(
+ IN gckKERNEL Kernel,
+ OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Lookup the gckVIDMEM object for a pool. */
+gceSTATUS
+gckKERNEL_GetVideoMemoryPool(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+/* Map video memory. */
+gceSTATUS
+gckKERNEL_MapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Address,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes,
+#endif
+ OUT gctPOINTER * Logical
+ );
+
+#ifdef __QNXNTO__
+/* Unmap video memory. */
+gceSTATUS
+gckKERNEL_UnmapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes
+ );
+#endif
+
+/* Map memory. */
+gceSTATUS
+gckKERNEL_MapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap memory. */
+gceSTATUS
+gckKERNEL_UnmapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Notification of events. */
+gceSTATUS
+gckKERNEL_Notify(
+ IN gckKERNEL Kernel,
+ IN gceNOTIFY Notifcation,
+ IN gctBOOL Data
+ );
+
+gceSTATUS
+gckKERNEL_QuerySettings(
+ IN gckKERNEL Kernel,
+ OUT gcsKERNEL_SETTINGS * Settings
+ );
+
+/*******************************************************************************
+**
+** gckKERNEL_Recovery
+**
+** Try to recover the GPU from a fatal error.
+**
+** INPUT:
+**
+** gckKERNEL Kernel
+** Pointer to an gckKERNEL object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckKERNEL_Recovery(
+ IN gckKERNEL Kernel
+ );
+
+/******************************************************************************\
+******************************* gckHARDWARE Object *****************************
+\******************************************************************************/
+
+/* Construct a new gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Construct(
+ IN gckOS Os,
+ OUT gckHARDWARE * Hardware
+ );
+
+/* Destroy an gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Destroy(
+ IN gckHARDWARE Hardware
+ );
+
+/* Query system memory requirements. */
+gceSTATUS
+gckHARDWARE_QuerySystemMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * SystemSize,
+ OUT gctUINT32 * SystemBaseAddress
+ );
+
+/* Build virtual address. */
+gceSTATUS
+gckHARDWARE_BuildVirtualAddress(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Index,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Query command buffer requirements. */
+gceSTATUS
+gckHARDWARE_QueryCommandBuffer(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * Alignment,
+ OUT gctSIZE_T * ReservedHead,
+ OUT gctSIZE_T * ReservedTail
+ );
+
+/* Add a WAIT/LINK pair in the command queue. */
+gceSTATUS
+gckHARDWARE_WaitLink(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPOINTER * Wait,
+ OUT gctSIZE_T * WaitBytes
+ );
+
+/* Kickstart the command processor. */
+gceSTATUS
+gckHARDWARE_Execute(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Physical,
+ IN gctBOOL PhysicalAddresses,
+#endif
+ IN gctSIZE_T Bytes
+ );
+
+/* Add an END command in the command queue. */
+gceSTATUS
+gckHARDWARE_End(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a NOP command in the command queue. */
+gceSTATUS
+gckHARDWARE_Nop(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a WAIT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Wait(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Count,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a PIPESELECT command in the command queue. */
+gceSTATUS
+gckHARDWARE_PipeSelect(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Pipe,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a LINK command in the command queue. */
+gceSTATUS
+gckHARDWARE_Link(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctPOINTER FetchAddress,
+ IN gctSIZE_T FetchSize,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add an EVENT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Event(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT8 Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Query the available memory. */
+gceSTATUS
+gckHARDWARE_QueryMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctUINT32 * InternalBaseAddress,
+ OUT gctUINT32 * InternalAlignment,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctUINT32 * ExternalBaseAddress,
+ OUT gctUINT32 * ExternalAlignment,
+ OUT gctUINT32 * HorizontalTileSize,
+ OUT gctUINT32 * VerticalTileSize
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gckHARDWARE_QueryChipIdentity(
+ IN gckHARDWARE Hardware,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures,
+ OUT gctUINT32* ChipMinorFeatures1,
+ OUT gctUINT32* ChipMinorFeatures2
+ );
+
+/* Query the specifications sof the hardware. */
+gceSTATUS
+gckHARDWARE_QueryChipSpecs(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR StreamCount,
+ OUT gctUINT32_PTR RegisterMax,
+ OUT gctUINT32_PTR ThreadCount,
+ OUT gctUINT32_PTR ShaderCoreCount,
+ OUT gctUINT32_PTR VertexCacheSize,
+ OUT gctUINT32_PTR VertexOutputBufferSize
+ );
+
+/* Convert an API format. */
+gceSTATUS
+gckHARDWARE_ConvertFormat(
+ IN gckHARDWARE Hardware,
+ IN gceSURF_FORMAT Format,
+ OUT gctUINT32 * BitsPerPixel,
+ OUT gctUINT32 * BytesPerTile
+ );
+
+/* Split a harwdare specific address into API stuff. */
+gceSTATUS
+gckHARDWARE_SplitMemory(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Align size to tile boundary. */
+gceSTATUS
+gckHARDWARE_AlignToTile(
+ IN gckHARDWARE Hardware,
+ IN gceSURF_TYPE Type,
+ IN OUT gctUINT32_PTR Width,
+ IN OUT gctUINT32_PTR Height,
+ OUT gctBOOL_PTR SuperTiled
+ );
+
+/* Update command queue tail pointer. */
+gceSTATUS
+gckHARDWARE_UpdateQueueTail(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset
+ );
+
+/* Convert logical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertLogical(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+#ifdef __QNXNTO__
+/* Convert physical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertPhysical(
+ IN gckHARDWARE Hardware,
+ IN gctPHYS_ADDR Physical,
+ OUT gctUINT32 * Address
+ );
+#endif
+
+/* Interrupt manager. */
+gceSTATUS
+gckHARDWARE_Interrupt(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL InterruptValid
+ );
+
+/* Program MMU. */
+gceSTATUS
+gckHARDWARE_SetMMU(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical
+ );
+
+/* Flush the MMU. */
+gceSTATUS
+gckHARDWARE_FlushMMU(
+ IN gckHARDWARE Hardware
+ );
+
+/* Get idle register. */
+gceSTATUS
+gckHARDWARE_GetIdle(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Wait,
+ OUT gctUINT32 * Data
+ );
+
+/* Flush the caches. */
+gceSTATUS
+gckHARDWARE_Flush(
+ IN gckHARDWARE Hardware,
+ IN gceKERNEL_FLUSH Flush,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Enable/disable fast clear. */
+gceSTATUS
+gckHARDWARE_SetFastClear(
+ IN gckHARDWARE Hardware,
+ IN gctINT Enable,
+ IN gctINT Compression
+ );
+
+gceSTATUS
+gckHARDWARE_ReadInterrupt(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR IDs
+ );
+
+/* Power management. */
+gceSTATUS
+gckHARDWARE_SetPowerManagementState(
+ IN gckHARDWARE Hardware,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gckHARDWARE_QueryPowerManagementState(
+ IN gckHARDWARE Hardware,
+ OUT gceCHIPPOWERSTATE* State
+ );
+
+/* Profile 2D Engine. */
+gceSTATUS
+gckHARDWARE_ProfileEngine2D(
+ IN gckHARDWARE Hardware,
+ OUT gcs2D_PROFILE_PTR Profile
+ );
+
+gceSTATUS
+gckHARDWARE_InitializeHardware(
+ IN gckHARDWARE Hardware
+ );
+
+gceSTATUS
+gckHARDWARE_Reset(
+ IN gckHARDWARE Hardware
+ );
+
+typedef gceSTATUS (*gctISRMANAGERFUNC)(gctPOINTER Context);
+
+gceSTATUS
+gckHARDWARE_SetIsrManager(
+ IN gckHARDWARE Hardware,
+ IN gctISRMANAGERFUNC StartIsr,
+ IN gctISRMANAGERFUNC StopIsr,
+ IN gctPOINTER Context
+ );
+
+/******************************************************************************\
+***************************** gckINTERRUPT Object ******************************
+\******************************************************************************/
+
+typedef struct _gckINTERRUPT * gckINTERRUPT;
+
+typedef gceSTATUS (* gctINTERRUPT_HANDLER)(
+ IN gckKERNEL Kernel
+ );
+
+gceSTATUS
+gckINTERRUPT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckINTERRUPT * Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_Destroy(
+ IN gckINTERRUPT Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_SetHandler(
+ IN gckINTERRUPT Interrupt,
+ IN OUT gctINT32_PTR Id,
+ IN gctINTERRUPT_HANDLER Handler
+ );
+
+gceSTATUS
+gckINTERRUPT_Notify(
+ IN gckINTERRUPT Interrupt,
+ IN gctBOOL Valid
+ );
+
+/******************************************************************************\
+******************************** gckEVENT Object *******************************
+\******************************************************************************/
+
+typedef struct _gckEVENT * gckEVENT;
+
+/* Construct a new gckEVENT object. */
+gceSTATUS
+gckEVENT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckEVENT * Event
+ );
+
+/* Destroy an gckEVENT object. */
+gceSTATUS
+gckEVENT_Destroy(
+ IN gckEVENT Event
+ );
+
+/* Schedule a FreeNonPagedMemory event. */
+gceSTATUS
+gckEVENT_FreeNonPagedMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeContiguousMemory event. */
+gceSTATUS
+gckEVENT_FreeContiguousMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeVideoMemory event. */
+gceSTATUS
+gckEVENT_FreeVideoMemory(
+ IN gckEVENT Event,
+ IN gcuVIDMEM_NODE_PTR VideoMemory,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a signal event. */
+gceSTATUS
+gckEVENT_Signal(
+ IN gckEVENT Event,
+ IN gctSIGNAL Signal,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule an Unlock event. */
+gceSTATUS
+gckEVENT_Unlock(
+ IN gckEVENT Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type
+ );
+
+gceSTATUS
+gckEVENT_Submit(
+ IN gckEVENT Event,
+ IN gctBOOL Wait
+ );
+
+struct _gcsQUEUE;
+
+/* Commit an event queue. */
+gceSTATUS
+gckEVENT_Commit(
+ IN gckEVENT Event,
+ IN struct _gcsQUEUE * Queue
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Notify(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Interrupt(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+/******************************************************************************\
+******************************* gckCOMMAND Object ******************************
+\******************************************************************************/
+
+typedef struct _gckCOMMAND * gckCOMMAND;
+
+/* Construct a new gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckCOMMAND * Command
+ );
+
+/* Destroy an gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Destroy(
+ IN gckCOMMAND Command
+ );
+
+/* Start the command queue. */
+gceSTATUS
+gckCOMMAND_Start(
+ IN gckCOMMAND Command
+ );
+
+/* Stop the command queue. */
+gceSTATUS
+gckCOMMAND_Stop(
+ IN gckCOMMAND Command
+ );
+
+/* Commit a buffer to the command queue. */
+gceSTATUS
+gckCOMMAND_Commit(
+ IN gckCOMMAND Command,
+ IN gcoCMDBUF CommandBuffer,
+ IN gcoCONTEXT Context,
+ IN gctHANDLE Process
+ );
+
+/* Reserve space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Reserve(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequestedBytes,
+ OUT gctPOINTER * Buffer,
+ OUT gctSIZE_T * BufferSize
+ );
+
+/* Release reserved space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Release(
+ IN gckCOMMAND Command
+ );
+
+/* Execute reserved space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Execute(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequstedBytes
+ );
+
+/* Stall the command queue. */
+gceSTATUS
+gckCOMMAND_Stall(
+ IN gckCOMMAND Command
+ );
+
+/******************************************************************************\
+********************************* gckMMU Object ********************************
+\******************************************************************************/
+
+typedef struct _gckMMU * gckMMU;
+
+/* Construct a new gckMMU object. */
+gceSTATUS
+gckMMU_Construct(
+ IN gckKERNEL Kernel,
+ IN gctSIZE_T MmuSize,
+ OUT gckMMU * Mmu
+ );
+
+/* Destroy an gckMMU object. */
+gceSTATUS
+gckMMU_Destroy(
+ IN gckMMU Mmu
+ );
+
+/* Allocate pages inside the MMU. */
+gceSTATUS
+gckMMU_AllocatePages(
+ IN gckMMU Mmu,
+ IN gctSIZE_T PageCount,
+ OUT gctPOINTER * PageTable,
+ OUT gctUINT32 * Address
+ );
+
+/* Remove a page table from the MMU. */
+gceSTATUS
+gckMMU_FreePages(
+ IN gckMMU Mmu,
+ IN gctPOINTER PageTable,
+ IN gctSIZE_T PageCount
+ );
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_InsertNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+
+gceSTATUS
+gckMMU_RemoveNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+#endif
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_FreeHandleMemory(
+ IN gckMMU Mmu,
+ IN gctHANDLE Handle
+ );
+#endif
+
+#if defined gcdHAL_TEST
+gceSTATUS
+gckMMU_Test(
+ IN gckMMU Mmu,
+ IN gctSIZE_T Vectors,
+ IN gctINT MaxSize
+ );
+#endif
+
+gceSTATUS
+gckHARDWARE_QueryProfileRegisters(
+ IN gckHARDWARE Hardware,
+ OUT gcsPROFILER_COUNTERS * Counters
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_h_ */
+
diff --git a/src/include_v2/gc_hal_base.h b/src/include_v2/gc_hal_base.h
new file mode 100644
index 0000000..d224b11
--- /dev/null
+++ b/src/include_v2/gc_hal_base.h
@@ -0,0 +1,2573 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_base_h_
+#define __gc_hal_base_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+#include "gc_hal_dump.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoHAL * gcoHAL;
+typedef struct _gcoOS * gcoOS;
+typedef struct _gco2D * gco2D;
+typedef struct _gcoVG * gcoVG;
+typedef struct _gco3D * gco3D;
+typedef struct _gcoSURF * gcoSURF;
+typedef struct _gcsSURF_INFO * gcsSURF_INFO_PTR;
+typedef struct _gcsSURF_NODE * gcsSURF_NODE_PTR;
+typedef struct _gcsSURF_FORMAT_INFO * gcsSURF_FORMAT_INFO_PTR;
+typedef struct _gcsPOINT * gcsPOINT_PTR;
+typedef struct _gcsSIZE * gcsSIZE_PTR;
+typedef struct _gcsRECT * gcsRECT_PTR;
+typedef struct _gcsBOUNDARY * gcsBOUNDARY_PTR;
+typedef struct _gcoDUMP * gcoDUMP;
+typedef struct _gcoHARDWARE * gcoHARDWARE;
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+/* Video memory pool type. */
+typedef enum _gcePOOL
+{
+ gcvPOOL_UNKNOWN,
+ gcvPOOL_DEFAULT,
+ gcvPOOL_LOCAL,
+ gcvPOOL_LOCAL_INTERNAL,
+ gcvPOOL_LOCAL_EXTERNAL,
+ gcvPOOL_UNIFIED,
+ gcvPOOL_SYSTEM,
+ gcvPOOL_VIRTUAL,
+ gcvPOOL_USER,
+ gcvPOOL_CONTIGUOUS
+}
+gcePOOL;
+
+/* Blending functions. */
+typedef enum _gceBLEND_FUNCTION
+{
+ gcvBLEND_ZERO,
+ gcvBLEND_ONE,
+ gcvBLEND_SOURCE_COLOR,
+ gcvBLEND_INV_SOURCE_COLOR,
+ gcvBLEND_SOURCE_ALPHA,
+ gcvBLEND_INV_SOURCE_ALPHA,
+ gcvBLEND_TARGET_COLOR,
+ gcvBLEND_INV_TARGET_COLOR,
+ gcvBLEND_TARGET_ALPHA,
+ gcvBLEND_INV_TARGET_ALPHA,
+ gcvBLEND_SOURCE_ALPHA_SATURATE,
+ gcvBLEND_CONST_COLOR,
+ gcvBLEND_INV_CONST_COLOR,
+ gcvBLEND_CONST_ALPHA,
+ gcvBLEND_INV_CONST_ALPHA,
+}
+gceBLEND_FUNCTION;
+
+/* Blending modes. */
+typedef enum _gceBLEND_MODE
+{
+ gcvBLEND_ADD,
+ gcvBLEND_SUBTRACT,
+ gcvBLEND_REVERSE_SUBTRACT,
+ gcvBLEND_MIN,
+ gcvBLEND_MAX,
+}
+gceBLEND_MODE;
+
+/* API flags. */
+typedef enum _gceAPI
+{
+ gcvAPI_D3D = 0x1,
+ gcvAPI_OPENGL = 0x2,
+}
+gceAPI;
+
+/* Depth modes. */
+typedef enum _gceDEPTH_MODE
+{
+ gcvDEPTH_NONE,
+ gcvDEPTH_Z,
+ gcvDEPTH_W,
+}
+gceDEPTH_MODE;
+
+typedef enum _gceWHERE
+{
+ gcvWHERE_COMMAND,
+ gcvWHERE_RASTER,
+ gcvWHERE_PIXEL,
+}
+gceWHERE;
+
+typedef enum _gceHOW
+{
+ gcvHOW_SEMAPHORE = 0x1,
+ gcvHOW_STALL = 0x2,
+ gcvHOW_SEMAPHORE_STALL = 0x3,
+}
+gceHOW;
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Construct a new gcoHAL object. */
+gceSTATUS
+gcoHAL_Construct(
+ IN gctPOINTER Context,
+ IN gcoOS Os,
+ OUT gcoHAL * Hal
+ );
+
+/* Destroy an gcoHAL object. */
+gceSTATUS
+gcoHAL_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Get pointer to gco2D object. */
+gceSTATUS
+gcoHAL_Get2DEngine(
+ IN gcoHAL Hal,
+ OUT gco2D * Engine
+ );
+
+/* Get pointer to gcoVG object. */
+gceSTATUS
+gcoHAL_GetVGEngine(
+ IN gcoHAL Hal,
+ OUT gcoVG * Engine
+ );
+
+/* Get pointer to gco3D object. */
+gceSTATUS
+gcoHAL_Get3DEngine(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+/* Verify whether the specified feature is available in hardware. */
+gceSTATUS
+gcoHAL_IsFeatureAvailable(
+ IN gcoHAL Hal,
+ IN gceFEATURE Feature
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gcoHAL_QueryChipIdentity(
+ IN gcoHAL Hal,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the minor features of the hardware. */
+gceSTATUS gcoHAL_QueryChipMinorFeatures(
+ IN gcoHAL Hal,
+ OUT gctUINT32* NumFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the amount of video memory. */
+gceSTATUS
+gcoHAL_QueryVideoMemory(
+ IN gcoHAL Hal,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Map video memory. */
+gceSTATUS
+gcoHAL_MapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap video memory. */
+gceSTATUS
+gcoHAL_UnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a buffer mapped through its physical address. */
+gceSTATUS
+gcoHAL_ScheduleUnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a user buffer using event mechanism. */
+gceSTATUS
+gcoHAL_ScheduleUnmapUserMemory(
+ IN gcoHAL Hal,
+ IN gctPOINTER Info,
+ IN gctSIZE_T Size,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory
+ );
+
+/* Commit the current command buffer. */
+gceSTATUS
+gcoHAL_Commit(
+ IN gcoHAL Hal,
+ IN gctBOOL Stall
+ );
+
+/* Query the tile capabilities. */
+gceSTATUS
+gcoHAL_QueryTiled(
+ IN gcoHAL Hal,
+ OUT gctINT32 * TileWidth2D,
+ OUT gctINT32 * TileHeight2D,
+ OUT gctINT32 * TileWidth3D,
+ OUT gctINT32 * TileHeight3D
+ );
+
+gceSTATUS
+gcoHAL_Compact(
+ IN gcoHAL Hal
+ );
+
+gceSTATUS
+gcoHAL_ProfileStart(
+ IN gcoHAL Hal
+ );
+
+gceSTATUS
+gcoHAL_ProfileEnd(
+ IN gcoHAL Hal,
+ IN gctCONST_STRING Title
+ );
+
+/* Power Management */
+gceSTATUS
+gcoHAL_SetPowerManagementState(
+ IN gcoHAL Hal,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gcoHAL_QueryPowerManagementState(
+ IN gcoHAL Hal,
+ OUT gceCHIPPOWERSTATE *State
+ );
+
+/* Set the filter type for filter blit. */
+gceSTATUS
+gcoHAL_SetFilterType(
+ IN gcoHAL Hal,
+ IN gceFILTER_TYPE FilterType
+ );
+
+gceSTATUS
+gcoHAL_GetDump(
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Call the kernel HAL layer. */
+gceSTATUS
+gcoHAL_Call(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Schedule an event. */
+gceSTATUS
+gcoHAL_ScheduleEvent(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Destroy a surface. */
+gceSTATUS
+gcoHAL_DestroySurface(
+ IN gcoHAL Hal,
+ IN gcoSURF Surface
+ );
+
+/* Wait for a signal from GPU. */
+gceSTATUS
+gcoHAL_WaitSignalFromGPU(
+ IN gcoHAL Hal,
+ IN gctSIGNAL Signal
+ );
+
+/******************************************************************************\
+********************************** gcoOS Object *********************************
+\******************************************************************************/
+
+/* Construct a new gcoOS object. */
+gceSTATUS
+gcoOS_Construct(
+ IN gctPOINTER Context,
+ OUT gcoOS * Os
+ );
+
+/* Destroy an gcoOS object. */
+gceSTATUS
+gcoOS_Destroy(
+ IN gcoOS Os
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gcoOS_GetBaseAddress(
+ IN gcoOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gcoOS_Allocate(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gcoOS_Free(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoOS_AllocateMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoOS_FreeMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gcoOS_AllocateContiguous(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gcoOS_FreeContiguous(
+ IN gcoOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Map user memory. */
+gceSTATUS
+gcoOS_MapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gcoOS_UnmapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+/* Device I/O Control call to the kernel HAL layer. */
+gceSTATUS
+gcoOS_DeviceControl(
+ IN gcoOS Os,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ IN gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/* Allocate non paged memory. */
+gceSTATUS gcoOS_AllocateNonPagedMemory(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non paged memory. */
+gceSTATUS gcoOS_FreeNonPagedMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+typedef enum _gceFILE_MODE
+{
+ gcvFILE_CREATE = 0,
+ gcvFILE_APPEND,
+ gcvFILE_READ,
+ gcvFILE_CREATETEXT,
+ gcvFILE_APPENDTEXT,
+ gcvFILE_READTEXT,
+}
+gceFILE_MODE;
+
+/* Open a file. */
+gceSTATUS
+gcoOS_Open(
+ IN gcoOS Os,
+ IN gctCONST_STRING FileName,
+ IN gceFILE_MODE Mode,
+ OUT gctFILE * File
+ );
+
+/* Close a file. */
+gceSTATUS
+gcoOS_Close(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Read data from a file. */
+gceSTATUS
+gcoOS_Read(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctPOINTER Data,
+ OUT gctSIZE_T * ByteRead
+ );
+
+/* Write data to a file. */
+gceSTATUS
+gcoOS_Write(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Flush data to a file. */
+gceSTATUS
+gcoOS_Flush(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Create an endpoint for communication. */
+gceSTATUS
+gcoOS_Socket(
+ IN gcoOS Os,
+ IN gctINT Domain,
+ IN gctINT Type,
+ IN gctINT Protocol,
+ OUT gctINT *SockFd
+ );
+
+/* Close a socket. */
+gceSTATUS
+gcoOS_CloseSocket(
+ IN gcoOS Os,
+ IN gctINT SockFd
+ );
+
+/* Initiate a connection on a socket. */
+gceSTATUS
+gcoOS_Connect(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctCONST_POINTER HostName,
+ IN gctUINT Port);
+
+/* Shut down part of connection on a socket. */
+gceSTATUS
+gcoOS_Shutdown(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctINT How
+ );
+
+/* Send a message on a socket. */
+gceSTATUS
+gcoOS_Send(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data,
+ IN gctINT Flags
+ );
+
+/* Initiate a connection on a socket. */
+gceSTATUS
+gcoOS_WaitForSend(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctINT Seconds,
+ IN gctINT MicroSeconds);
+
+/* Get environment variable value. */
+gceSTATUS
+gcoOS_GetEnv(
+ IN gcoOS Os,
+ IN gctCONST_STRING VarName,
+ OUT gctSTRING * Value
+ );
+
+typedef enum _gceFILE_WHENCE
+{
+ gcvFILE_SEEK_SET,
+ gcvFILE_SEEK_CUR,
+ gcvFILE_SEEK_END
+}
+gceFILE_WHENCE;
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_Seek(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Offset,
+ IN gceFILE_WHENCE Whence
+ );
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_SetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Position
+ );
+
+/* Get the current position of a file. */
+gceSTATUS
+gcoOS_GetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ OUT gctUINT32 * Position
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gcoOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Perform a memory fill. */
+gceSTATUS
+gcoOS_MemFill(
+ IN gctPOINTER Destination,
+ IN gctUINT8 Filler,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gcoOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Find the last occurance of a character inside a string. */
+gceSTATUS
+gcoOS_StrFindReverse(
+ IN gctCONST_STRING String,
+ IN gctINT8 Character,
+ OUT gctSTRING * Output
+ );
+
+gceSTATUS
+gcoOS_StrLen(
+ IN gctCONST_STRING String,
+ OUT gctSIZE_T * Length
+ );
+
+gceSTATUS
+gcoOS_StrDup(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ OUT gctSTRING * Target
+ );
+
+/* Copy a string. */
+gceSTATUS
+gcoOS_StrCopySafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Append a string. */
+gceSTATUS
+gcoOS_StrCatSafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Compare two strings. */
+gceSTATUS
+gcoOS_StrCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2
+ );
+
+/* Compare characters of two strings. */
+gceSTATUS
+gcoOS_StrNCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2,
+ IN gctSIZE_T Count
+ );
+
+/* Convert string to float. */
+gceSTATUS
+gcoOS_StrToFloat(
+ IN gctCONST_STRING String,
+ OUT gctFLOAT * Float
+ );
+
+/* Convert string to integer. */
+gceSTATUS
+gcoOS_StrToInt(
+ IN gctCONST_STRING String,
+ OUT gctINT * Int
+ );
+
+gceSTATUS
+gcoOS_MemCmp(
+ IN gctCONST_POINTER Memory1,
+ IN gctCONST_POINTER Memory2,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_PrintStrSafe(
+ OUT gctSTRING String,
+ IN gctSIZE_T StringSize,
+ IN OUT gctUINT * Offset,
+ IN gctCONST_STRING Format,
+ ...
+ );
+
+gceSTATUS
+gcoOS_PrintStrVSafe(
+ OUT gctSTRING String,
+ IN gctSIZE_T StringSize,
+ IN OUT gctUINT * Offset,
+ IN gctCONST_STRING Format,
+ IN gctPOINTER Arguments
+ );
+
+gceSTATUS
+gcoOS_LoadLibrary(
+ IN gcoOS Os,
+ IN gctCONST_STRING Library,
+ OUT gctHANDLE * Handle
+ );
+
+gceSTATUS
+gcoOS_FreeLibrary(
+ IN gcoOS Os,
+ IN gctHANDLE Handle
+ );
+
+gceSTATUS
+gcoOS_GetProcAddress(
+ IN gcoOS Os,
+ IN gctHANDLE Handle,
+ IN gctCONST_STRING Name,
+ OUT gctPOINTER * Function
+ );
+
+gceSTATUS
+gcoOS_Compact(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_ProfileStart(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_ProfileEnd(
+ IN gcoOS Os,
+ IN gctCONST_STRING Title
+ );
+
+gceSTATUS
+gcoOS_SetProfileSetting(
+ IN gcoOS Os,
+ IN gctBOOL Enable,
+ IN gctCONST_STRING FileName
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gcoOS_QueryVideoMemory(
+ IN gcoOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Atoms ----------------------------------------------------------------*/
+
+typedef struct gcsATOM * gcsATOM_PTR;
+
+/* Construct an atom. */
+gceSTATUS
+gcoOS_AtomConstruct(
+ IN gcoOS Os,
+ OUT gcsATOM_PTR * Atom
+ );
+
+/* Destroy an atom. */
+gceSTATUS
+gcoOS_AtomDestroy(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom
+ );
+
+/* Increment an atom. */
+gceSTATUS
+gcoOS_AtomIncrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+/* Decrement an atom. */
+gceSTATUS
+gcoOS_AtomDecrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+gctHANDLE
+gcoOS_GetCurrentProcessID(
+ void
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Time -----------------------------------------------------------------*/
+
+/* Get the number of milliseconds since the system started. */
+gctUINT32
+gcoOS_GetTicks(
+ void
+ );
+
+/* Get time in microseconds. */
+gceSTATUS
+gcoOS_GetTime(
+ gctUINT64_PTR Time
+ );
+
+/* Get CPU usage in microseconds. */
+gceSTATUS
+gcoOS_GetCPUTime(
+ gctUINT64_PTR CPUTime
+ );
+
+/* Get memory usage. */
+gceSTATUS
+gcoOS_GetMemoryUsage(
+ gctUINT32_PTR MaxRSS,
+ gctUINT32_PTR IxRSS,
+ gctUINT32_PTR IdRSS,
+ gctUINT32_PTR IsRSS
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gcoOS_Delay(
+ IN gcoOS Os,
+ IN gctUINT32 Delay
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Mutexes --------------------------------------------------------------*/
+
+/* Create a new mutex. */
+gceSTATUS
+gcoOS_CreateMutex(
+ IN gcoOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gcoOS_DeleteMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gcoOS_AcquireMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gcoOS_ReleaseMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Signals --------------------------------------------------------------*/
+
+/* Create a signal. */
+gceSTATUS
+gcoOS_CreateSignal(
+ IN gcoOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gcoOS_DestroySignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gcoOS_Signal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gcoOS_WaitSignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Write a register. */
+gceSTATUS
+gcoOS_WriteRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Read a register. */
+gceSTATUS
+gcoOS_ReadRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+gceSTATUS
+gcoOS_CacheFlush(
+ IN gcoOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_CacheInvalidate(
+ IN gcoOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/*******************************************************************************
+** gcoMATH object
+*/
+
+#define gcdPI 3.14159265358979323846f
+
+gctUINT32
+gcoMATH_Log2in5dot5(
+ IN gctINT X
+ );
+
+gctFLOAT
+gcoMATH_Sine(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Cosine(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Floor(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Ceiling(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_SquareRoot(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Log2(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Power(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+gctFLOAT
+gcoMATH_Modulo(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+gctFLOAT
+gcoMATH_Exp(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Absolute(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_ArcCosine(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Tangent(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_UInt2Float(
+ IN gctUINT X
+ );
+
+gctUINT
+gcoMATH_Float2UInt(
+ IN gctFLOAT X
+ );
+
+gctFLOAT
+gcoMATH_Multiply(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+/******************************************************************************\
+**************************** Coordinate Structures *****************************
+\******************************************************************************/
+
+typedef struct _gcsPOINT
+{
+ gctINT32 x;
+ gctINT32 y;
+}
+gcsPOINT;
+
+typedef struct _gcsSIZE
+{
+ gctINT32 width;
+ gctINT32 height;
+}
+gcsSIZE;
+
+typedef struct _gcsRECT
+{
+ gctINT32 left;
+ gctINT32 top;
+ gctINT32 right;
+ gctINT32 bottom;
+}
+gcsRECT;
+
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*------------------------------- gcoSURF Common ------------------------------*/
+
+/* Color format classes. */
+typedef enum _gceFORMAT_CLASS
+{
+ gcvFORMAT_CLASS_RGBA = 4500,
+ gcvFORMAT_CLASS_YUV,
+ gcvFORMAT_CLASS_INDEX,
+ gcvFORMAT_CLASS_LUMINANCE,
+ gcvFORMAT_CLASS_BUMP,
+ gcvFORMAT_CLASS_DEPTH,
+}
+gceFORMAT_CLASS;
+
+/* Special enums for width field in gcsFORMAT_COMPONENT. */
+typedef enum _gceCOMPONENT_CONTROL
+{
+ gcvCOMPONENT_NOTPRESENT = 0x00,
+ gcvCOMPONENT_DONTCARE = 0x80,
+ gcvCOMPONENT_WIDTHMASK = 0x7F,
+ gcvCOMPONENT_ODD = 0x80
+}
+gceCOMPONENT_CONTROL;
+
+/* Color format component parameters. */
+typedef struct _gcsFORMAT_COMPONENT
+{
+ gctUINT8 start;
+ gctUINT8 width;
+}
+gcsFORMAT_COMPONENT;
+
+/* RGBA color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_RGBA
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT red;
+ gcsFORMAT_COMPONENT green;
+ gcsFORMAT_COMPONENT blue;
+}
+gcsFORMAT_CLASS_TYPE_RGBA;
+
+/* YUV color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_YUV
+{
+ gcsFORMAT_COMPONENT y;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT v;
+}
+gcsFORMAT_CLASS_TYPE_YUV;
+
+/* Index color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_INDEX
+{
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_INDEX;
+
+/* Luminance color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_LUMINANCE
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_LUMINANCE;
+
+/* Bump map color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_BUMP
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT l;
+ gcsFORMAT_COMPONENT v;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT q;
+ gcsFORMAT_COMPONENT w;
+}
+gcsFORMAT_CLASS_TYPE_BUMP;
+
+/* Depth and stencil format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_DEPTH
+{
+ gcsFORMAT_COMPONENT depth;
+ gcsFORMAT_COMPONENT stencil;
+}
+gcsFORMAT_CLASS_TYPE_DEPTH;
+
+/* Format parameters. */
+typedef struct _gcsSURF_FORMAT_INFO
+{
+ /* Format code and class. */
+ gceSURF_FORMAT format;
+ gceFORMAT_CLASS fmtClass;
+
+ /* The size of one pixel in bits. */
+ gctUINT8 bitsPerPixel;
+
+ /* Component swizzle. */
+ gceSURF_SWIZZLE swizzle;
+
+ /* Some formats have two neighbour pixels interleaved together. */
+ /* To describe such format, set the flag to 1 and add another */
+ /* like this one describing the odd pixel format. */
+ gctUINT8 interleaved;
+
+ /* Format components. */
+ union
+ {
+ gcsFORMAT_CLASS_TYPE_BUMP bump;
+ gcsFORMAT_CLASS_TYPE_RGBA rgba;
+ gcsFORMAT_CLASS_TYPE_YUV yuv;
+ gcsFORMAT_CLASS_TYPE_LUMINANCE lum;
+ gcsFORMAT_CLASS_TYPE_INDEX index;
+ gcsFORMAT_CLASS_TYPE_DEPTH depth;
+ } u;
+}
+gcsSURF_FORMAT_INFO;
+
+/* Frame buffer information. */
+typedef struct _gcsSURF_FRAMEBUFFER
+{
+ gctPOINTER logical;
+ gctUINT width, height;
+ gctINT stride;
+ gceSURF_FORMAT format;
+}
+gcsSURF_FRAMEBUFFER;
+
+/* Generic pixel component descriptors. */
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XXX8;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XX8X;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_X8XX;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_8XXX;
+
+typedef enum _gceORIENTATION
+{
+ gcvORIENTATION_TOP_BOTTOM,
+ gcvORIENTATION_BOTTOM_TOP,
+}
+gceORIENTATION;
+
+
+/* Construct a new gcoSURF object. */
+gceSTATUS
+gcoSURF_Construct(
+ IN gcoHAL Hal,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+/* Destroy an gcoSURF object. */
+gceSTATUS
+gcoSURF_Destroy(
+ IN gcoSURF Surface
+ );
+
+/* Map user-allocated surface. */
+gceSTATUS
+gcoSURF_MapUserSurface(
+ IN gcoSURF Surface,
+ IN gctUINT Alignment,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Set the color type of the surface. */
+gceSTATUS
+gcoSURF_SetColorType(
+ IN gcoSURF Surface,
+ IN gceSURF_COLOR_TYPE ColorType
+ );
+
+/* Get the color type of the surface. */
+gceSTATUS
+gcoSURF_GetColorType(
+ IN gcoSURF Surface,
+ OUT gceSURF_COLOR_TYPE *ColorType
+ );
+
+/* Set the surface ration angle. */
+gceSTATUS
+gcoSURF_SetRotation(
+ IN gcoSURF Surface,
+ IN gceSURF_ROTATION Rotation
+ );
+
+/* Verify and return the state of the tile status mechanism. */
+gceSTATUS
+gcoSURF_IsTileStatusSupported(
+ IN gcoSURF Surface
+ );
+
+/* Enable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_EnableTileStatus(
+ IN gcoSURF Surface
+ );
+
+/* Disable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_DisableTileStatus(
+ IN gcoSURF Surface,
+ IN gctBOOL Decompress
+ );
+
+/* Get surface size. */
+gceSTATUS
+gcoSURF_GetSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctUINT * Depth
+ );
+
+/* Get surface aligned sizes. */
+gceSTATUS
+gcoSURF_GetAlignedSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctINT * Stride
+ );
+
+/* Get surface type and format. */
+gceSTATUS
+gcoSURF_GetFormat(
+ IN gcoSURF Surface,
+ OUT gceSURF_TYPE * Type,
+ OUT gceSURF_FORMAT * Format
+ );
+
+/* Lock the surface. */
+gceSTATUS
+gcoSURF_Lock(
+ IN gcoSURF Surface,
+ IN OUT gctUINT32 * Address,
+ IN OUT gctPOINTER * Memory
+ );
+
+/* Unlock the surface. */
+gceSTATUS
+gcoSURF_Unlock(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory
+ );
+
+/* Return pixel format parameters. */
+gceSTATUS
+gcoSURF_QueryFormat(
+ IN gceSURF_FORMAT Format,
+ OUT gcsSURF_FORMAT_INFO_PTR * Info
+ );
+
+/* Compute the color pixel mask. */
+gceSTATUS
+gcoSURF_ComputeColorMask(
+ IN gcsSURF_FORMAT_INFO_PTR Format,
+ OUT gctUINT32_PTR ColorMask
+ );
+
+/* Flush the surface. */
+gceSTATUS
+gcoSURF_Flush(
+ IN gcoSURF Surface
+ );
+
+/* Fill surface with a value. */
+gceSTATUS
+gcoSURF_Fill(
+ IN gcoSURF Surface,
+ IN gcsPOINT_PTR Origin,
+ IN gcsSIZE_PTR Size,
+ IN gctUINT32 Value,
+ IN gctUINT32 Mask
+ );
+
+/* Alpha blend two surfaces together. */
+gceSTATUS
+gcoSURF_Blend(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrig,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsSIZE_PTR Size,
+ IN gceSURF_BLEND_MODE Mode
+ );
+
+/* Create a new gcoSURF wrapper object. */
+gceSTATUS
+gcoSURF_ConstructWrapper(
+ IN gcoHAL Hal,
+ OUT gcoSURF * Surface
+ );
+
+/* Set the underlying buffer for the surface wrapper. */
+gceSTATUS
+gcoSURF_SetBuffer(
+ IN gcoSURF Surface,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Stride,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Set the size of the surface in pixels and map the underlying buffer. */
+gceSTATUS
+gcoSURF_SetWindow(
+ IN gcoSURF Surface,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height
+ );
+
+/* Increase reference count of the surface. */
+gceSTATUS
+gcoSURF_ReferenceSurface(
+ IN gcoSURF Surface
+ );
+
+/* Get surface reference count. */
+gceSTATUS
+gcoSURF_QueryReferenceCount(
+ IN gcoSURF Surface,
+ OUT gctINT32 * ReferenceCount
+ );
+
+/* Set surface orientation. */
+gceSTATUS
+gcoSURF_SetOrientation(
+ IN gcoSURF Surface,
+ IN gceORIENTATION Orientation
+ );
+
+/* Query surface orientation. */
+gceSTATUS
+gcoSURF_QueryOrientation(
+ IN gcoSURF Surface,
+ OUT gceORIENTATION * Orientation
+ );
+
+/*Reset the hal member of a surface*/
+gceSTATUS
+gcoSURF_ResetHal(
+ IN gcoSURF Surface,
+ IN gcoHAL Hal
+ );
+
+/******************************************************************************\
+********************************* gcoDUMP Object ********************************
+\******************************************************************************/
+
+/* Construct a new gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Construct(
+ IN gcoOS Os,
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Destroy a gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Destroy(
+ IN gcoDUMP Dump
+ );
+
+/* Enable/disable dumping. */
+gceSTATUS
+gcoDUMP_Control(
+ IN gcoDUMP Dump,
+ IN gctSTRING FileName
+ );
+
+gceSTATUS
+gcoDUMP_IsEnabled(
+ IN gcoDUMP Dump,
+ OUT gctBOOL * Enabled
+ );
+
+/* Add surface. */
+gceSTATUS
+gcoDUMP_AddSurface(
+ IN gcoDUMP Dump,
+ IN gctINT32 Width,
+ IN gctINT32 Height,
+ IN gceSURF_FORMAT PixelFormat,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount
+ );
+
+/* Mark the beginning of a frame. */
+gceSTATUS
+gcoDUMP_FrameBegin(
+ IN gcoDUMP Dump
+ );
+
+/* Mark the end of a frame. */
+gceSTATUS
+gcoDUMP_FrameEnd(
+ IN gcoDUMP Dump
+ );
+
+/* Dump data. */
+gceSTATUS
+gcoDUMP_DumpData(
+ IN gcoDUMP Dump,
+ IN gceDUMP_TAG Type,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Delete an address. */
+gceSTATUS
+gcoDUMP_Delete(
+ IN gcoDUMP Dump,
+ IN gctUINT32 Address
+ );
+
+/******************************************************************************\
+******************************* gcsRECT Structure ******************************
+\******************************************************************************/
+
+/* Initialize rectangle structure. */
+gceSTATUS
+gcsRECT_Set(
+ OUT gcsRECT_PTR Rect,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Return the width of the rectangle. */
+gceSTATUS
+gcsRECT_Width(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Width
+ );
+
+/* Return the height of the rectangle. */
+gceSTATUS
+gcsRECT_Height(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Height
+ );
+
+/* Ensure that top left corner is to the left and above the right bottom. */
+gceSTATUS
+gcsRECT_Normalize(
+ IN OUT gcsRECT_PTR Rect
+ );
+
+/* Compare two rectangles. */
+gceSTATUS
+gcsRECT_IsEqual(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * Equal
+ );
+
+/* Compare the sizes of two rectangles. */
+gceSTATUS
+gcsRECT_IsOfEqualSize(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * EqualSize
+ );
+
+
+/******************************************************************************\
+**************************** gcsBOUNDARY Structure *****************************
+\******************************************************************************/
+
+typedef struct _gcsBOUNDARY
+{
+ gctINT x;
+ gctINT y;
+ gctINT width;
+ gctINT height;
+}
+gcsBOUNDARY;
+
+/******************************************************************************\
+********************************* gcoHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gcoHEAP * gcoHEAP;
+
+/* Construct a new gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Construct(
+ IN gcoOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gcoHEAP * Heap
+ );
+
+/* Destroy an gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Destroy(
+ IN gcoHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoHEAP_Allocate(
+ IN gcoHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoHEAP_Free(
+ IN gcoHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+/* Profile the heap. */
+gceSTATUS
+gcoHEAP_ProfileStart(
+ IN gcoHEAP Heap
+ );
+
+gceSTATUS
+gcoHEAP_ProfileEnd(
+ IN gcoHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+
+#if defined gcdHAL_TEST
+gceSTATUS
+gcoHEAP_Test(
+ IN gcoHEAP Heap,
+ IN gctSIZE_T Vectors,
+ IN gctSIZE_T MaxSize
+ );
+#endif
+
+/******************************************************************************\
+******************************* Debugging Macros *******************************
+\******************************************************************************/
+
+void
+gcoOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gcoOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gcoOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+/*******************************************************************************
+**
+** gcmFATAL
+**
+** Print a message to the debugger and execute a break point.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcdDEBUG
+# define gcmFATAL gcoOS_DebugFatal
+# define gcmkFATAL gckOS_DebugFatal
+#elif gcdHAS_ELLIPSES
+# define gcmFATAL(...)
+# define gcmkFATAL(...)
+#else
+ gcmINLINE static void
+ __dummy_fatal(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmFATAL __dummy_fatal
+# define gcmkFATAL __dummy_fatal
+#endif
+
+#define gcmENUM2TEXT(e) case e: return #e
+
+/*******************************************************************************
+**
+** gcmTRACE
+**
+** Print a message to the debugfer if the correct level has been set. In
+** retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** level Level of message.
+** message Message.
+** ... Optional arguments.
+*/
+#define gcvLEVEL_NONE -1
+#define gcvLEVEL_ERROR 0
+#define gcvLEVEL_WARNING 1
+#define gcvLEVEL_INFO 2
+#define gcvLEVEL_VERBOSE 3
+
+void
+gckOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+void
+
+gcoOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcdDEBUG
+# define gcmTRACE gcoOS_DebugTrace
+# define gcmkTRACE gckOS_DebugTrace
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE(...)
+# define gcmkTRACE(...)
+#else
+ gcmINLINE static void
+ __dummy_trace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmTRACE __dummy_trace
+# define gcmkTRACE __dummy_trace
+#endif
+
+/* Debug zones. */
+#define gcvZONE_OS (1 << 0)
+#define gcvZONE_HARDWARE (1 << 1)
+#define gcvZONE_HEAP (1 << 2)
+
+/* Kernel zones. */
+#define gcvZONE_KERNEL (1 << 3)
+#define gcvZONE_VIDMEM (1 << 4)
+#define gcvZONE_COMMAND (1 << 5)
+#define gcvZONE_DRIVER (1 << 6)
+#define gcvZONE_CMODEL (1 << 7)
+#define gcvZONE_MMU (1 << 8)
+#define gcvZONE_EVENT (1 << 9)
+#define gcvZONE_DEVICE (1 << 10)
+
+/* User zones. */
+#define gcvZONE_HAL (1 << 3)
+#define gcvZONE_BUFFER (1 << 4)
+#define gcvZONE_CONTEXT (1 << 5)
+#define gcvZONE_SURFACE (1 << 6)
+#define gcvZONE_INDEX (1 << 7)
+#define gcvZONE_STREAM (1 << 8)
+#define gcvZONE_TEXTURE (1 << 9)
+#define gcvZONE_2D (1 << 10)
+#define gcvZONE_3D (1 << 11)
+#define gcvZONE_COMPILER (1 << 12)
+#define gcvZONE_MEMORY (1 << 13)
+#define gcvZONE_STATE (1 << 14)
+#define gcvZONE_AUX (1 << 15)
+
+/* API definitions. */
+#define gcvZONE_API_HAL (0 << 28)
+#define gcvZONE_API_EGL (1 << 28)
+#define gcvZONE_API_ES11 (2 << 28)
+#define gcvZONE_API_ES20 (3 << 28)
+#define gcvZONE_API_VG11 (4 << 28)
+#define gcvZONE_API_GL (5 << 28)
+#define gcvZONE_API_DFB (6 << 28)
+#define gcvZONE_API_GDI (7 << 28)
+#define gcvZONE_API_D3D (8 << 28)
+
+#define gcmZONE_GET_API(zone) ((zone) >> 28)
+#define gcdZONE_MASK 0x0FFFFFFF
+
+/* Handy zones. */
+#define gcvZONE_NONE 0
+#define gcvZONE_ALL gcdZONE_MASK
+
+/*******************************************************************************
+**
+** gcmTRACE_ZONE
+**
+** Print a message to the debugger if the correct level and zone has been
+** set. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** Level Level of message.
+** Zone Zone of message.
+** Message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcdDEBUG
+# define gcmTRACE_ZONE gcoOS_DebugTraceZone
+# define gcmkTRACE_ZONE gckOS_DebugTraceZone
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE_ZONE(...)
+# define gcmkTRACE_ZONE(...)
+#else
+ gcmINLINE static void
+ __dummy_trace_zone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmTRACE_ZONE __dummy_trace_zone
+# define gcmkTRACE_ZONE __dummy_trace_zone
+#endif
+
+/******************************************************************************\
+******************************** Logging Macros ********************************
+\******************************************************************************/
+
+#define gcdHEADER_LEVEL gcvLEVEL_VERBOSE
+
+#define gcmHEADER() \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmHEADER_ARG(Text, ...) \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_header_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmHEADER_ARG __dummy_header_arg
+#endif
+
+#define gcmFOOTER() \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d", \
+ __FUNCTION__, __LINE__, status)
+
+#define gcmFOOTER_NO() \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmFOOTER_ARG(Text, ...) \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, \
+ __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_footer_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmFOOTER_ARG __dummy_footer_arg
+#endif
+
+#define gcmkHEADER() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmkHEADER_ARG(Text, ...) \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_kheader_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkHEADER_ARG __dummy_kheader_arg
+#endif
+
+#define gcmkFOOTER() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d", \
+ __FUNCTION__, __LINE__, status)
+
+#define gcmkFOOTER_NO() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__)
+
+#if gcdHAS_ELLIPSES
+# define gcmkFOOTER_ARG(Text, ...) \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, \
+ __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_kfooter_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkFOOTER_ARG __dummy_kfooter_arg
+#endif
+
+#define gcmOPT_VALUE(ptr) (((ptr) == gcvNULL) ? 0 : *(ptr))
+#define gcmOPT_POINTER(ptr) (((ptr) == gcvNULL) ? gcvNULL : *(ptr))
+#define gcmOPT_STRING(ptr) (((ptr) == gcvNULL) ? "(nil)" : (ptr))
+
+void
+gcoOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+void
+gckOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+#define gcmPRINT gcoOS_Print
+#define gcmkPRINT gckOS_Print
+
+/*******************************************************************************
+**
+** gcmDUMP
+**
+** Print a dump message.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+#if gcdDUMP
+ gceSTATUS
+ gcfDump(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ ...
+ );
+# define gcmDUMP gcfDump
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP(...)
+#else
+ gcmINLINE static void
+ __dummy_dump(
+ IN gcoOS Os,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP __dummy_dump
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_DATA
+**
+** Add data to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP
+ gceSTATUS
+ gcfDumpData(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_DATA gcfDumpData
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_DATA(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_data(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_DATA __dummy_dump_data
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_BUFFER
+**
+** Print a buffer to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctUINT32 Physical
+** Physical address of buffer.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctUINT32 Offset
+** Offset into buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP
+gceSTATUS
+gcfDumpBuffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_BUFFER gcfDumpBuffer
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_BUFFER(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_buffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_BUFFER __dummy_dump_buffer
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API
+**
+** Print a dump message for a high level API prefixed by the function name.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpApi(
+ IN gctCONST_STRING String,
+ ...
+ );
+# define gcmDUMP_API gcfDumpApi
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP_API __dummy_dump_api
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY
+**
+** Print an array of data.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Size.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpArray(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Size
+ );
+# define gcmDUMP_API_ARRAY gcfDumpArray
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Size
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY __dummy_dump_api_array
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY_TOKEN
+**
+** Print an array of data terminated by a token.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Termination.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpArrayToken(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Termination
+ );
+# define gcmDUMP_API_ARRAY_TOKEN gcfDumpArrayToken
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY_TOKEN(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array_token(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Termination
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY_TOKEN __dummy_dump_api_array_token
+#endif
+
+/*******************************************************************************
+**
+** gcmTRACE_RELEASE
+**
+** Print a message to the shader debugger.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+#define gcmTRACE_RELEASE gcoOS_DebugShaderTrace
+
+void
+gcoOS_DebugShaderTrace(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_SetDebugShaderFiles(
+ IN gctCONST_STRING VSFileName,
+ IN gctCONST_STRING FSFileName
+ );
+
+void
+gcoOS_SetDebugShaderFileType(
+ IN gctUINT32 ShaderType
+ );
+
+/*******************************************************************************
+**
+** gcmBREAK
+**
+** Break into the debugger. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** None.
+*/
+
+void
+gcoOS_DebugBreak(
+ void
+ );
+
+void
+gckOS_DebugBreak(
+ void
+ );
+
+#if gcdDEBUG
+# define gcmBREAK gcoOS_DebugBreak
+# define gcmkBREAK gckOS_DebugBreak
+#else
+# define gcmBREAK()
+# define gcmkBREAK()
+#endif
+
+/*******************************************************************************
+**
+** gcmASSERT
+**
+** Evaluate an expression and break into the debugger if the expression
+** evaluates to false. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcdDEBUG
+# define _gcmASSERT(prefix, exp) \
+ do \
+ { \
+ if (!(exp)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ASSERT at %s(%d) in " __FILE__, \
+ __FUNCTION__, __LINE__); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ "(%s)", #exp); \
+ prefix##BREAK(); \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmASSERT(exp) _gcmASSERT(gcm, exp)
+# define gcmkASSERT(exp) _gcmASSERT(gcmk, exp)
+#else
+# define gcmASSERT(exp)
+# define gcmkASSERT(exp)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY
+**
+** Verify if an expression returns true. If the expression does not
+** evaluates to true, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcdDEBUG
+# define gcmVERIFY(exp) gcmASSERT(exp)
+# define gcmkVERIFY(exp) gcmkASSERT(exp)
+#else
+# define gcmVERIFY(exp) exp
+# define gcmkVERIFY(exp) exp
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY_OK
+**
+** Verify a fucntion returns gcvSTATUS_OK. If the function does not return
+** gcvSTATUS_OK, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+
+void
+gcoOS_Verify(
+ IN gceSTATUS Status
+ );
+
+void
+gckOS_Verify(
+ IN gceSTATUS Status
+ );
+
+#if gcdDEBUG
+# define gcmVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ gcoOS_Verify(verifyStatus); \
+ gcmASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+# define gcmkVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ gckOS_Verify(verifyStatus); \
+ gcmkASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+#else
+# define gcmVERIFY_OK(func) func
+# define gcmkVERIFY_OK(func) func
+#endif
+
+/*******************************************************************************
+**
+** gcmERR_BREAK
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_BREAK(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_BREAK: status=%d @ %s(%d) in " __FILE__, \
+ status, __FUNCTION__, __LINE__); \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_BREAK(func) _gcmERR_BREAK(gcm, func)
+#define gcmkERR_BREAK(func) _gcmERR_BREAK(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmERR_RETURN
+**
+** Executes a return on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d @ %s(%d) in " __FILE__, \
+ status, __FUNCTION__, __LINE__); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_RETURN(func) _gcmERR_RETURN(gcm, func)
+#define gcmkERR_RETURN(func) _gcmERR_RETURN(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmONERROR
+**
+** Jump to the error handler in case there is an error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmONERROR(prefix, func) \
+ do \
+ { \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ONERROR: status=%d @ %s(%d) in " __FILE__, \
+ status, __FUNCTION__, __LINE__); \
+ goto OnError; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmONERROR(func) _gcmONERROR(gcm, func)
+#define gcmkONERROR(func) _gcmONERROR(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_LOCK
+**
+** Verifies whether the surface is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_LOCK(surfaceInfo) \
+ if (!surfaceInfo->node.valid) \
+ { \
+ status = gcvSTATUS_MEMORY_UNLOCKED; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmVERIFY_NODE_LOCK
+**
+** Verifies whether the surface node is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_NODE_LOCK(surfaceNode) \
+ if (!surfaceNode->valid) \
+ { \
+ status = gcvSTATUS_MEMORY_UNLOCKED; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmBADOBJECT_BREAK
+**
+** Executes a break statement on bad object.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#define gcmBADOBJECT_BREAK(obj, t) \
+ if ((obj == gcvNULL) \
+ || (((gcsOBJECT *)(obj))->type != t) \
+ ) \
+ { \
+ status = gcvSTATUS_INVALID_OBJECT; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmCHECK_STATUS
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmCHECK_STATUS(prefix, func) \
+ do \
+ { \
+ last = func; \
+ if (gcmIS_ERROR(last)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "CHECK_STATUS: status=%d @ %s(%d) in " __FILE__, \
+ last, __FUNCTION__, __LINE__); \
+ status = last; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmCHECK_STATUS(func) _gcmCHECK_STATUS(gcm, func)
+#define gcmkCHECK_STATUS(func) _gcmCHECK_STATUS(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_ARGUMENT(prefix, arg) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, #prefix "VERIFY_ARGUMENT failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_ARGUMENT); \
+ return gcvSTATUS_INVALID_ARGUMENT; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcm, arg)
+# define gcmkVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcmk, arg)
+#else
+# define gcmVERIFY_ARGUMENT(arg)
+# define gcmkVERIFY_ARGUMENT(arg)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT_RETURN
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_ARGUMENT_RETURN(prefix, arg, value) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "gcmVERIFY_ARGUMENT_RETURN failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("value=%d", value); \
+ return value; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcm, arg, value)
+# define gcmkVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcmk, arg, value)
+#else
+# define gcmVERIFY_ARGUMENT_RETURN(arg, value)
+# define gcmkVERIFY_ARGUMENT_RETURN(arg, value)
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_base_h_ */
+
diff --git a/src/include_v2/gc_hal_compiler.h b/src/include_v2/gc_hal_compiler.h
new file mode 100644
index 0000000..d237cc3
--- /dev/null
+++ b/src/include_v2/gc_hal_compiler.h
@@ -0,0 +1,1955 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+/*
+** Include file the defines the front- and back-end compilers, as well as the
+** objects they use.
+*/
+
+#ifndef __gc_hal_compiler_h_
+#define __gc_hal_compiler_h_
+
+#include "gc_hal_types.h"
+#include "gc_hal_engine.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+|******************************* SHADER LANGUAGE ******************************|
+\******************************************************************************/
+
+/* Possible shader language opcodes. */
+typedef enum _gcSL_OPCODE
+{
+ gcSL_NOP, /* 0x00 */
+ gcSL_MOV, /* 0x01 */
+ gcSL_SAT, /* 0x02 */
+ gcSL_DP3, /* 0x03 */
+ gcSL_DP4, /* 0x04 */
+ gcSL_ABS, /* 0x05 */
+ gcSL_JMP, /* 0x06 */
+ gcSL_ADD, /* 0x07 */
+ gcSL_MUL, /* 0x08 */
+ gcSL_RCP, /* 0x09 */
+ gcSL_SUB, /* 0x0A */
+ gcSL_KILL, /* 0x0B */
+ gcSL_TEXLD, /* 0x0C */
+ gcSL_CALL, /* 0x0D */
+ gcSL_RET, /* 0x0E */
+ gcSL_NORM, /* 0x0F */
+ gcSL_MAX, /* 0x10 */
+ gcSL_MIN, /* 0x11 */
+ gcSL_POW, /* 0x12 */
+ gcSL_RSQ, /* 0x13 */
+ gcSL_LOG, /* 0x14 */
+ gcSL_FRAC, /* 0x15 */
+ gcSL_FLOOR, /* 0x16 */
+ gcSL_CEIL, /* 0x17 */
+ gcSL_CROSS, /* 0x18 */
+ gcSL_TEXLDP, /* 0x19 */
+ gcSL_TEXBIAS, /* 0x1A */
+ gcSL_TEXGRAD, /* 0x1B */
+ gcSL_TEXLOD, /* 0x1C */
+ gcSL_SIN, /* 0x1D */
+ gcSL_COS, /* 0x1E */
+ gcSL_TAN, /* 0x1F */
+ gcSL_EXP, /* 0x20 */
+ gcSL_SIGN, /* 0x21 */
+ gcSL_STEP, /* 0x22 */
+ gcSL_SQRT, /* 0x23 */
+ gcSL_ACOS, /* 0x24 */
+ gcSL_ASIN, /* 0x25 */
+ gcSL_ATAN, /* 0x26 */
+ gcSL_SET, /* 0x27 */
+ gcSL_DSX, /* 0x28 */
+ gcSL_DSY, /* 0x29 */
+ gcSL_FWIDTH, /* 0x2A */
+}
+gcSL_OPCODE;
+
+typedef enum _gcSL_FORMAT
+{
+ gcSL_FLOAT, /* 0 */
+ gcSL_INTEGER, /* 1 */
+ gcSL_BOOLEAN, /* 2 */
+}
+gcSL_FORMAT;
+
+/* Destination write enable bits. */
+typedef enum _gcSL_ENABLE
+{
+ gcSL_ENABLE_X = 0x1,
+ gcSL_ENABLE_Y = 0x2,
+ gcSL_ENABLE_Z = 0x4,
+ gcSL_ENABLE_W = 0x8,
+ /* Combinations. */
+ gcSL_ENABLE_XY = gcSL_ENABLE_X | gcSL_ENABLE_Y,
+ gcSL_ENABLE_XYZ = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XYZW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XYW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_XZ = gcSL_ENABLE_X | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XZW = gcSL_ENABLE_X | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XW = gcSL_ENABLE_X | gcSL_ENABLE_W,
+ gcSL_ENABLE_YZ = gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_YZW = gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_YW = gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_ZW = gcSL_ENABLE_Z | gcSL_ENABLE_W,
+}
+gcSL_ENABLE;
+
+/* Possible indices. */
+typedef enum _gcSL_INDEXED
+{
+ gcSL_NOT_INDEXED, /* 0 */
+ gcSL_INDEXED_X, /* 1 */
+ gcSL_INDEXED_Y, /* 2 */
+ gcSL_INDEXED_Z, /* 3 */
+ gcSL_INDEXED_W, /* 4 */
+}
+gcSL_INDEXED;
+
+/* Opcode conditions. */
+typedef enum _gcSL_CONDITION
+{
+ gcSL_ALWAYS, /* 0x0 */
+ gcSL_NOT_EQUAL, /* 0x1 */
+ gcSL_LESS_OR_EQUAL, /* 0x2 */
+ gcSL_LESS, /* 0x3 */
+ gcSL_EQUAL, /* 0x4 */
+ gcSL_GREATER, /* 0x5 */
+ gcSL_GREATER_OR_EQUAL, /* 0x6 */
+ gcSL_AND, /* 0x7 */
+ gcSL_OR, /* 0x8 */
+ gcSL_XOR, /* 0x9 */
+}
+gcSL_CONDITION;
+
+/* Possible source operand types. */
+typedef enum _gcSL_TYPE
+{
+ gcSL_NONE, /* 0x0 */
+ gcSL_TEMP, /* 0x1 */
+ gcSL_ATTRIBUTE, /* 0x2 */
+ gcSL_UNIFORM, /* 0x3 */
+ gcSL_SAMPLER, /* 0x4 */
+ gcSL_CONSTANT, /* 0x5 */
+ gcSL_OUTPUT, /* 0x6 */
+ gcSL_PHYSICAL, /* 0x7 */
+}
+gcSL_TYPE;
+
+/* Swizzle generator macro. */
+#define gcmSWIZZLE(Component1, Component2, Component3, Component4) \
+( \
+ (gcSL_SWIZZLE_ ## Component1 << 0) | \
+ (gcSL_SWIZZLE_ ## Component2 << 2) | \
+ (gcSL_SWIZZLE_ ## Component3 << 4) | \
+ (gcSL_SWIZZLE_ ## Component4 << 6) \
+)
+
+/* Possible swizzle values. */
+typedef enum _gcSL_SWIZZLE
+{
+ gcSL_SWIZZLE_X, /* 0x0 */
+ gcSL_SWIZZLE_Y, /* 0x1 */
+ gcSL_SWIZZLE_Z, /* 0x2 */
+ gcSL_SWIZZLE_W, /* 0x3 */
+ /* Combinations. */
+ gcSL_SWIZZLE_XXXX = gcmSWIZZLE(X, X, X, X),
+ gcSL_SWIZZLE_YYYY = gcmSWIZZLE(Y, Y, Y, Y),
+ gcSL_SWIZZLE_ZZZZ = gcmSWIZZLE(Z, Z, Z, Z),
+ gcSL_SWIZZLE_WWWW = gcmSWIZZLE(W, W, W, W),
+ gcSL_SWIZZLE_XYYY = gcmSWIZZLE(X, Y, Y, Y),
+ gcSL_SWIZZLE_XZZZ = gcmSWIZZLE(X, Z, Z, Z),
+ gcSL_SWIZZLE_XWWW = gcmSWIZZLE(X, W, W, W),
+ gcSL_SWIZZLE_YZZZ = gcmSWIZZLE(Y, Z, Z, Z),
+ gcSL_SWIZZLE_YWWW = gcmSWIZZLE(Y, W, W, W),
+ gcSL_SWIZZLE_ZWWW = gcmSWIZZLE(Z, W, W, W),
+ gcSL_SWIZZLE_XYZZ = gcmSWIZZLE(X, Y, Z, Z),
+ gcSL_SWIZZLE_XYWW = gcmSWIZZLE(X, Y, W, W),
+ gcSL_SWIZZLE_XZWW = gcmSWIZZLE(X, Z, W, W),
+ gcSL_SWIZZLE_YZWW = gcmSWIZZLE(Y, Z, W, W),
+ gcSL_SWIZZLE_XXYZ = gcmSWIZZLE(X, X, Y, Z),
+ gcSL_SWIZZLE_XYZW = gcmSWIZZLE(X, Y, Z, W),
+ gcSL_SWIZZLE_XYXY = gcmSWIZZLE(X, Y, X, Y),
+}
+gcSL_SWIZZLE;
+
+
+/******************************************************************************\
+|*********************************** SHADERS **********************************|
+\******************************************************************************/
+
+/* Shader types. */
+#define gcSHADER_TYPE_UNKNOWN 0
+#define gcSHADER_TYPE_VERTEX 1
+#define gcSHADER_TYPE_FRAGMENT 2
+
+/* gcSHADER objects. */
+typedef struct _gcSHADER * gcSHADER;
+typedef struct _gcATTRIBUTE * gcATTRIBUTE;
+typedef struct _gcUNIFORM * gcUNIFORM;
+typedef struct _gcOUTPUT * gcOUTPUT;
+typedef struct _gcsFUNCTION * gcFUNCTION;
+typedef struct _gcsHINT * gcsHINT_PTR;
+typedef struct _gcSHADER_PROFILER * gcSHADER_PROFILER;
+typedef struct _gcVARIABLE * gcVARIABLE;
+
+/* gcSHADER_TYPE enumeration. */
+typedef enum _gcSHADER_TYPE
+{
+ gcSHADER_FLOAT_X1, /* 0x00 */
+ gcSHADER_FLOAT_X2, /* 0x01 */
+ gcSHADER_FLOAT_X3, /* 0x02 */
+ gcSHADER_FLOAT_X4, /* 0x03 */
+ gcSHADER_FLOAT_2X2, /* 0x04 */
+ gcSHADER_FLOAT_3X3, /* 0x05 */
+ gcSHADER_FLOAT_4X4, /* 0x06 */
+ gcSHADER_BOOLEAN_X1, /* 0x07 */
+ gcSHADER_BOOLEAN_X2, /* 0x08 */
+ gcSHADER_BOOLEAN_X3, /* 0x09 */
+ gcSHADER_BOOLEAN_X4, /* 0x0A */
+ gcSHADER_INTEGER_X1, /* 0x0B */
+ gcSHADER_INTEGER_X2, /* 0x0C */
+ gcSHADER_INTEGER_X3, /* 0x0D */
+ gcSHADER_INTEGER_X4, /* 0x0E */
+ gcSHADER_SAMPLER_1D, /* 0x0F */
+ gcSHADER_SAMPLER_2D, /* 0x10 */
+ gcSHADER_SAMPLER_3D, /* 0x11 */
+ gcSHADER_SAMPLER_CUBIC, /* 0x12 */
+ gcSHADER_FIXED_X1, /* 0x13 */
+ gcSHADER_FIXED_X2, /* 0x14 */
+ gcSHADER_FIXED_X3, /* 0x15 */
+ gcSHADER_FIXED_X4, /* 0x16 */
+}
+gcSHADER_TYPE;
+
+/* Shader flags. */
+typedef enum _gceSHADER_FLAGS
+{
+ gcvSHADER_DEAD_CODE = 0x01,
+ gcvSHADER_RESOURCE_USAGE = 0x02,
+ gcvSHADER_OPTIMIZER = 0x04,
+ gcvSHADER_USE_GL_Z = 0x08,
+ gcvSHADER_USE_GL_POSITION = 0x10,
+ gcvSHADER_USE_GL_FACE = 0x20,
+ gcvSHADER_USE_GL_POINT_COORD = 0x40,
+}
+gceSHADER_FLAGS;
+
+/* Function argument qualifier */
+typedef enum _gceINPUT_OUTPUT
+{
+ gcvFUNCTION_INPUT,
+ gcvFUNCTION_OUTPUT,
+ gcvFUNCTION_INOUT
+}
+gceINPUT_OUTPUT;
+
+/*******************************************************************************
+** gcSHADER_Construct
+********************************************************************************
+**
+** Construct a new gcSHADER object.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Type of gcSHADER object to cerate. 'ShaderType' can be one of the
+** following:
+**
+** gcSHADER_TYPE_VERTEX Vertex shader.
+** gcSHADER_TYPE_FRAGMENT Fragment shader.
+**
+** OUTPUT:
+**
+** gcSHADER * Shader
+** Pointer to a variable receiving the gcSHADER object pointer.
+*/
+gceSTATUS
+gcSHADER_Construct(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ OUT gcSHADER * Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Destroy
+********************************************************************************
+**
+** Destroy a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Destroy(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Load
+********************************************************************************
+**
+** Load a gcSHADER object from a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containg the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Load(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_Save
+********************************************************************************
+**
+** Save a gcSHADER object to a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer to be used as storage for the gcSHADER
+** object. If 'Buffer' is gcvNULL, the gcSHADER object will not be saved,
+** but the number of bytes required to hold the binary output for the
+** gcSHADER object will be returned.
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable holding the number of bytes allocated in
+** 'Buffer'. Only valid if 'Buffer' is not gcvNULL.
+**
+** OUTPUT:
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable receiving the number of bytes required to hold
+** the binary form of the gcSHADER object.
+*/
+gceSTATUS
+gcSHADER_Save(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN OUT gctSIZE_T * BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateAttributes
+**
+** Reallocate an array of pointers to gcATTRIBUTE objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateAttributes(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddAttribute
+********************************************************************************
+**
+** Add an attribute to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the attribute to add.
+**
+** gcSHADER_TYPE Type
+** Type of the attribute to add.
+**
+** gctSIZE_T Length
+** Array length of the attribute to add. 'Length' must be at least 1.
+**
+** gctBOOL IsTexture
+** gcvTRUE if the attribute is used as a texture coordinate, gcvFALSE if not.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_AddAttribute(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctBOOL IsTexture,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttributeCount
+********************************************************************************
+**
+** Get the number of attributes for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of attributes.
+*/
+gceSTATUS
+gcSHADER_GetAttributeCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttribute
+********************************************************************************
+**
+** Get the gcATTRIBUTE object poniter for an indexed attribute for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the attribute to retrieve.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetAttribute(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_GetPositionAttribute
+********************************************************************************
+**
+** Get the gcATTRIBUTE object pointer for the attribute that defines the
+** position.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctUINT * Index
+** Pointer to a variable receiving the index of te gcATTRIBUTE object
+** used as a position.
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetPositionAttribute(
+ IN gcSHADER Shader,
+ OUT gctUINT * Index,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateUniforms
+**
+** Reallocate an array of pointers to gcUNIFORM objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateUniforms(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddUniform
+********************************************************************************
+**
+** Add an uniform to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the uniform to add.
+**
+** gcSHADER_TYPE Type
+** Type of the uniform to add.
+**
+** gctSIZE_T Length
+** Array length of the uniform to add. 'Length' must be at least 1.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_AddUniform(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniformCount
+********************************************************************************
+**
+** Get the number of uniforms for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of uniforms.
+*/
+gceSTATUS
+gcSHADER_GetUniformCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniform
+********************************************************************************
+**
+** Get the gcUNIFORM object pointer for an indexed uniform for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the uniform to retrieve.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_GetUniform(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateOutputs
+**
+** Reallocate an array of pointers to gcOUTPUT objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateOutputs(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOutput
+********************************************************************************
+**
+** Add an output to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the output to add.
+**
+** gcSHADER_TYPE Type
+** Type of the output to add.
+**
+** gctSIZE_T Length
+** Array length of the output to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the output value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOutput(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+gceSTATUS
+gcSHADER_AddOutputIndexed(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gctSIZE_T Index,
+ IN gctUINT16 TempIndex
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutputCount
+********************************************************************************
+**
+** Get the number of outputs for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of outputs.
+*/
+gceSTATUS
+gcSHADER_GetOutputCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutput
+********************************************************************************
+**
+** Get the gcOUTPUT object pointer for an indexed output for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of output to retrieve.
+**
+** OUTPUT:
+**
+** gcOUTPUT * Output
+** Pointer to a variable receiving the gcOUTPUT object pointer.
+*/
+gceSTATUS
+gcSHADER_GetOutput(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcOUTPUT * Output
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateVariables
+**
+** Reallocate an array of pointers to gcVARIABLE objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateVariables(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddVariable
+********************************************************************************
+**
+** Add a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the variable to add.
+**
+** gcSHADER_TYPE Type
+** Type of the variable to add.
+**
+** gctSIZE_T Length
+** Array length of the variable to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the variable value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddVariable(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariableCount
+********************************************************************************
+**
+** Get the number of variables for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of variables.
+*/
+gceSTATUS
+gcSHADER_GetVariableCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariable
+********************************************************************************
+**
+** Get the gcVARIABLE object pointer for an indexed variable for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of variable to retrieve.
+**
+** OUTPUT:
+**
+** gcVARIABLE * Variable
+** Pointer to a variable receiving the gcVARIABLE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetVariable(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcVARIABLE * Variable
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcode
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the target
+** of the opcode.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcode(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddOpcode2(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeIndexed
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object that writes to an dynamically indexed
+** target.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the
+** target of the opcode.
+**
+** gcSL_INDEXED Mode
+** Location of the dynamic index inside the temporary register. Valid
+** values can be:
+**
+** gcSL_INDEXED_X - Use x component of the temporary register.
+** gcSL_INDEXED_Y - Use y component of the temporary register.
+** gcSL_INDEXED_Z - Use z component of the temporary register.
+** gcSL_INDEXED_W - Use w component of the temporary register.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditional
+********************************************************************************
+**
+** Add an conditional opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditional(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddLabel
+********************************************************************************
+**
+** Define a label at the current instruction of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Label
+** Label to define.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddLabel(
+ IN gcSHADER Shader,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSource
+********************************************************************************
+**
+** Add a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSource(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceIndexed
+********************************************************************************
+**
+** Add a dynamically indexed source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_INDEXED Mode
+** Addressing mode for the index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttribute
+********************************************************************************
+**
+** Add an attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttribute(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttributeIndexed
+********************************************************************************
+**
+** Add an indexed attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttributeIndexed(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniform
+********************************************************************************
+**
+** Add a uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniform(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniformIndexed
+********************************************************************************
+**
+** Add an indexed uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniformIndexed(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+gceSTATUS
+gcSHADER_AddSourceSamplerIndexed(
+ IN gcSHADER Shader,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceConstant
+********************************************************************************
+**
+** Add a constant floating pointer value as a source operand to a gcSHADER
+** object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctFLOAT Constant
+** Floating pointer constant.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceConstant(
+ IN gcSHADER Shader,
+ IN gctFLOAT Constant
+ );
+
+/*******************************************************************************
+** gcSHADER_Pack
+********************************************************************************
+**
+** Pack a dynamically created gcSHADER object by trimming the allocated arrays
+** and resolving all the labeling.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Pack(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_SetOptimizationOption
+********************************************************************************
+**
+** Set optimization option of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT OptimizationOption
+** Optimization option. Can be one of the following:
+**
+** 0 - No optimization.
+** 1 - Full optimization.
+** Other value - For optimizer testing.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_SetOptimizationOption(
+ IN gcSHADER Shader,
+ IN gctUINT OptimizationOption
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateFunctions
+**
+** Reallocate an array of pointers to gcFUNCTION objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateFunctions(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcSHADER_AddFunction(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ OUT gcFUNCTION * Function
+ );
+
+gceSTATUS
+gcSHADER_BeginFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+gceSTATUS
+gcSHADER_EndFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the attribute. 'Type'
+** can be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** attribute was declared as an array. If the attribute was not
+** declared as an array, the array length will be 1. 'ArrayLength' can
+** be gcvNULL, in which case no array length will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetType(
+ IN gcATTRIBUTE Attribute,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_GetName
+********************************************************************************
+**
+** Get the name of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the attribute name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the attribute name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetName(
+ IN gcATTRIBUTE Attribute,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_IsEnabled
+********************************************************************************
+**
+** Query the enabled state of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctBOOL * Enabled
+** Pointer to a variable receiving the enabled state of the attribute.
+*/
+gceSTATUS
+gcATTRIBUTE_IsEnabled(
+ IN gcATTRIBUTE Attribute,
+ OUT gctBOOL * Enabled
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the uniform. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** uniform was declared as an array. If the uniform was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetType(
+ IN gcUNIFORM Uniform,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetName
+********************************************************************************
+**
+** Get the name of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the uniform name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the uniform name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetName(
+ IN gcUNIFORM Uniform,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetSampler
+********************************************************************************
+**
+** Get the physical sampler number for a sampler gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctUINT32 * Sampler
+** Pointer to a variable receiving the physical sampler.
+*/
+gceSTATUS
+gcUNIFORM_GetSampler(
+ IN gcUNIFORM Uniform,
+ OUT gctUINT32 * Sampler
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValue
+********************************************************************************
+**
+** Set the value of a uniform in integer.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctINT * Value
+** Pointer to a buffer holding the integer values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValue(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueX
+********************************************************************************
+**
+** Set the value of a uniform in fixed point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFIXED_POINT * Value
+** Pointer to a buffer holding the fixed point values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueX(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN gctFIXED_POINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueF
+********************************************************************************
+**
+** Set the value of a uniform in floating point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFLOAT * Value
+** Pointer to a buffer holding the floating point values for the
+** uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueF(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctFLOAT * Value
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the output. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** output was declared as an array. If the output was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetType(
+ IN gcOUTPUT Output,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetIndex
+********************************************************************************
+**
+** Get the index of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctUINT * Index
+** Pointer to a variable receiving the temporary register index of the
+** output. 'Index' can be gcvNULL,. in which case no index will be
+** returned.
+*/
+gceSTATUS
+gcOUTPUT_GetIndex(
+ IN gcOUTPUT Output,
+ OUT gctUINT * Index
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetName
+********************************************************************************
+**
+** Get the name of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the output name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the output name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetName(
+ IN gcOUTPUT Output,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+*********************************************************** F U N C T I O N S **
+*******************************************************************************/
+
+/*******************************************************************************
+** gcFUNCTION_ReallocateArguments
+**
+** Reallocate an array of gcsFUNCTION_ARGUMENT objects.
+**
+** INPUT:
+**
+** gcFUNCTION Function
+** Pointer to a gcFUNCTION object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcFUNCTION_ReallocateArguments(
+ IN gcFUNCTION Function,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcFUNCTION_AddArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 TempIndex,
+ IN gctUINT8 Enable,
+ IN gctUINT8 Qualifier
+ );
+
+gceSTATUS
+gcFUNCTION_GetArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 Index,
+ OUT gctUINT16_PTR Temp,
+ OUT gctUINT8_PTR Enable,
+ OUT gctUINT8_PTR Swizzle
+ );
+
+gceSTATUS
+gcFUNCTION_GetLabel(
+ IN gcFUNCTION Function,
+ OUT gctUINT_PTR Label
+ );
+
+/*******************************************************************************
+** gcCompileShader
+********************************************************************************
+**
+** Compile a shader.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Shader type to compile. Can be one of the following values:
+**
+** gcSHADER_TYPE_VERTEX
+** Compile a vertex shader.
+**
+** gcSHADER_TYPE_FRAGMENT
+** Compile a fragment shader.
+**
+** gctSIZE_T SourceSize
+** Size of the source buffer in bytes.
+**
+** gctCONST_STRING Source
+** Pointer to the buffer containing the shader source code.
+**
+** OUTPUT:
+**
+** gcSHADER * Binary
+** Pointer to a variable receiving the pointer to a gcSHADER object
+** containg the compiled shader code.
+**
+** gctSTRING * Log
+** Pointer to a variable receiving a string pointer containging the
+** compile log.
+*/
+gceSTATUS
+gcCompileShader(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ IN gctSIZE_T SourceSize,
+ IN gctCONST_STRING Source,
+ OUT gcSHADER * Binary,
+ OUT gctSTRING * Log
+ );
+
+/*******************************************************************************
+** gcOptimizeShader
+********************************************************************************
+**
+** Optimize a shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object holding information about the compiled
+** shader.
+**
+** gctFILE LogFile
+** Pointer to an open FILE object.
+*/
+gceSTATUS
+gcOptimizeShader(
+ IN gcSHADER Shader,
+ IN gctFILE LogFile
+ );
+
+/*******************************************************************************
+** gcLinkShaders
+********************************************************************************
+**
+** Link two shaders and generate a harwdare specific state buffer by compiling
+** the compiler generated code through the resource allocator and code
+** generator.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to a gcSHADER object holding information about the compiled
+** vertex shader.
+**
+** gcSHADER FragmentShader
+** Pointer to a gcSHADER object holding information about the compiled
+** fragment shader.
+**
+** gceSHADER_FLAGS Flags
+** Compiler flags. Can be any of the following:
+**
+** gcvSHADER_DEAD_CODE - Dead code elimination.
+** gcvSHADER_RESOURCE_USAGE - Resource usage optimizaion.
+** gcvSHADER_OPTIMIZER - Full optimization.
+** gcvSHADER_USE_GL_Z - Use OpenGL ES Z coordinate.
+** gcvSHADER_USE_GL_POSITION - Use OpenGL ES gl_Position.
+** gcvSHADER_USE_GL_FACE - Use OpenGL ES gl_FaceForward.
+**
+** OUTPUT:
+**
+** gctSIZE_T * StateBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'StateBuffer'.
+**
+** gctPOINTER * StateBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLinkShaders(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gceSHADER_FLAGS Flags,
+ OUT gctSIZE_T * StateBufferSize,
+ OUT gctPOINTER * StateBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+/*******************************************************************************
+** gcLoadShaders
+********************************************************************************
+**
+** Load a pre-compiled and pre-linked shader program into the hardware.
+**
+** INPUT:
+**
+** gcoHAL Hal
+** Pointer to a gcoHAL object.
+**
+** gctSIZE_T StateBufferSize
+** The number of bytes in the 'StateBuffer'.
+**
+** gctPOINTER StateBuffer
+** Pointer to the states that make up the shader program.
+**
+** gcsHINT_PTR Hints
+** Pointer to a gcsHINT structure that contains information required
+** when loading the shader states.
+**
+** gcePRIMITIVE PrimitiveType
+** Primitive type to be rendered.
+*/
+gceSTATUS
+gcLoadShaders(
+ IN gcoHAL Hal,
+ IN gctSIZE_T StateBufferSize,
+ IN gctPOINTER StateBuffer,
+ IN gcsHINT_PTR Hints,
+ IN gcePRIMITIVE PrimitiveType
+ );
+
+/*******************************************************************************
+** gcSaveProgram
+********************************************************************************
+**
+** Save pre-compiled shaders and pre-linked programs to a binary file.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to vertex shader object.
+**
+** gcSHADER FragmentShader
+** Pointer to fragment shader object.
+**
+** gctSIZE_T ProgramBufferSize
+** Number of bytes in 'ProgramBuffer'.
+**
+** gctPOINTER ProgramBuffer
+** Pointer to buffer containing the program states.
+**
+** gcsHINT_PTR Hints
+** Pointer to HINTS structure for program states.
+**
+** OUTPUT:
+**
+** gctPOINTER * Binary
+** Pointer to a variable receiving the binary data to be saved.
+**
+** gctSIZE_T * BinarySize
+** Pointer to a variable receiving the number of bytes inside 'Binary'.
+*/
+gceSTATUS
+gcSaveProgram(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gctSIZE_T ProgramBufferSize,
+ IN gctPOINTER ProgramBuffer,
+ IN gcsHINT_PTR Hints,
+ OUT gctPOINTER * Binary,
+ OUT gctSIZE_T * BinarySize
+ );
+
+/*******************************************************************************
+** gcLoadProgram
+********************************************************************************
+**
+** Load pre-compiled shaders and pre-linked programs from a binary file.
+**
+** INPUT:
+**
+** gctPOINTER Binary
+** Pointer to the binary data loaded.
+**
+** gctSIZE_T BinarySize
+** Number of bytes in 'Binary'.
+**
+** OUTPUT:
+**
+** gcSHADER * VertexShader
+** Pointer to a variable receiving the vertex shader object.
+**
+** gcSHADER * FragmentShader
+** Pointer to a variable receiving the fragment shader object.
+**
+** gctSIZE_T * ProgramBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'ProgramBuffer'.
+**
+** gctPOINTER * ProgramBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLoadProgram(
+ IN gctPOINTER Binary,
+ IN gctSIZE_T BinarySize,
+ OUT gcSHADER * VertexShader,
+ OUT gcSHADER * FragmentShader,
+ OUT gctSIZE_T * ProgramBufferSize,
+ OUT gctPOINTER * ProgramBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_compiler_h_ */
+
diff --git a/src/include_v2/gc_hal_driver.h b/src/include_v2/gc_hal_driver.h
new file mode 100644
index 0000000..7a44306
--- /dev/null
+++ b/src/include_v2/gc_hal_driver.h
@@ -0,0 +1,641 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_driver_h_
+#define __gc_hal_driver_h_
+
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* I/O Control Codes ******************************
+\******************************************************************************/
+
+#define gcvHAL_CLASS "galcore"
+#define IOCTL_GCHAL_INTERFACE 30000
+#define IOCTL_GCHAL_KERNEL_INTERFACE 30001
+#define IOCTL_GCHAL_TERMINATE 30002
+
+/******************************************************************************\
+********************************* Command Codes ********************************
+\******************************************************************************/
+
+typedef enum _gceHAL_COMMAND_CODES
+{
+ /* Generic query. */
+ gcvHAL_QUERY_VIDEO_MEMORY,
+ gcvHAL_QUERY_CHIP_IDENTITY,
+
+ /* Contiguous memory. */
+ gcvHAL_ALLOCATE_NON_PAGED_MEMORY,
+ gcvHAL_FREE_NON_PAGED_MEMORY,
+ gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY,
+ gcvHAL_FREE_CONTIGUOUS_MEMORY,
+
+ /* Video memory allocation. */
+ gcvHAL_ALLOCATE_VIDEO_MEMORY, /* Enforced alignment. */
+ gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY, /* No alignment. */
+ gcvHAL_FREE_VIDEO_MEMORY,
+
+ /* Physical-to-logical mapping. */
+ gcvHAL_MAP_MEMORY,
+ gcvHAL_UNMAP_MEMORY,
+
+ /* Logical-to-physical mapping. */
+ gcvHAL_MAP_USER_MEMORY,
+ gcvHAL_UNMAP_USER_MEMORY,
+
+ /* Surface lock/unlock. */
+ gcvHAL_LOCK_VIDEO_MEMORY,
+ gcvHAL_UNLOCK_VIDEO_MEMORY,
+
+ /* Event queue. */
+ gcvHAL_EVENT_COMMIT,
+
+ gcvHAL_USER_SIGNAL,
+ gcvHAL_SIGNAL,
+ gcvHAL_WRITE_DATA,
+
+ gcvHAL_COMMIT,
+ gcvHAL_STALL,
+
+ gcvHAL_READ_REGISTER,
+ gcvHAL_WRITE_REGISTER,
+
+ gcvHAL_GET_PROFILE_SETTING,
+ gcvHAL_SET_PROFILE_SETTING,
+
+ gcvHAL_READ_ALL_PROFILE_REGISTERS,
+ gcvHAL_PROFILE_REGISTERS_2D,
+
+ /* Power management. */
+ gcvHAL_SET_POWER_MANAGEMENT_STATE,
+ gcvHAL_QUERY_POWER_MANAGEMENT_STATE,
+
+ gcvHAL_GET_BASE_ADDRESS,
+
+ gcvHAL_SET_IDLE, /* reserved */
+
+ /* Queries. */
+ gcvHAL_QUERY_KERNEL_SETTINGS,
+
+ /* Reset. */
+ gcvHAL_RESET,
+
+ /* Map physical address into handle. */
+ gcvHAL_MAP_PHYSICAL,
+
+ /* Debugger stuff. */
+ gcvHAL_DEBUG,
+
+ /* Cache stuff. */
+ gcvHAL_CACHE,
+
+#if gcdGPU_TIMEOUT
+ /* Broadcast GPU stuck */
+ gcvHAL_BROADCAST_GPU_STUCK,
+#endif
+}
+gceHAL_COMMAND_CODES;
+
+/******************************************************************************\
+****************************** Interface Structure *****************************
+\******************************************************************************/
+
+#define gcdMAX_PROFILE_FILE_NAME 128
+
+typedef struct _gcsHAL_INTERFACE
+{
+ /* Command code. */
+ gceHAL_COMMAND_CODES command;
+
+ /* Status value. */
+ gceSTATUS status;
+
+ /* Handle to this interface channel. */
+ gctHANDLE handle;
+
+ /* Pid of the client. */
+ gctUINT32 pid;
+
+ /* Union of command structures. */
+ union _u
+ {
+ /* gcvHAL_GET_BASE_ADDRESS */
+ struct _gcsHAL_GET_BASE_ADDRESS
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctUINT32 baseAddress;
+ }
+ GetBaseAddress;
+
+ /* gcvHAL_QUERY_VIDEO_MEMORY */
+ struct _gcsHAL_QUERY_VIDEO_MEMORY
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctPHYS_ADDR internalPhysical;
+
+ /* Size in bytes of internal memory.*/
+ OUT gctSIZE_T internalSize;
+
+ /* Physical memory address of external memory. */
+ OUT gctPHYS_ADDR externalPhysical;
+
+ /* Size in bytes of external memory.*/
+ OUT gctSIZE_T externalSize;
+
+ /* Physical memory address of contiguous memory. */
+ OUT gctPHYS_ADDR contiguousPhysical;
+
+ /* Size in bytes of contiguous memory.*/
+ OUT gctSIZE_T contiguousSize;
+ }
+ QueryVideoMemory;
+
+ /* gcvHAL_QUERY_CHIP_IDENTITY */
+ struct _gcsHAL_QUERY_CHIP_IDENTITY
+ {
+
+ /* Chip model. */
+ OUT gceCHIPMODEL chipModel;
+
+ /* Revision value.*/
+ OUT gctUINT32 chipRevision;
+
+ /* Supported feature fields. */
+ OUT gctUINT32 chipFeatures;
+
+ /* Supported minor feature fields. */
+ OUT gctUINT32 chipMinorFeatures;
+
+ /* Supported minor feature 1 fields. */
+ OUT gctUINT32 chipMinorFeatures1;
+
+ /* Supported minor feature 2 fields. */
+ OUT gctUINT32 chipMinorFeatures2;
+
+ /* Number of streams supported. */
+ OUT gctUINT32 streamCount;
+
+ /* Total number of temporary registers per thread. */
+ OUT gctUINT32 registerMax;
+
+ /* Maximum number of threads. */
+ OUT gctUINT32 threadCount;
+
+ /* Number of shader cores. */
+ OUT gctUINT32 shaderCoreCount;
+
+ /* Size of the vertex cache. */
+ OUT gctUINT32 vertexCacheSize;
+
+ /* Number of entries in the vertex output buffer. */
+ OUT gctUINT32 vertexOutputBufferSize;
+ }
+ QueryChipIdentity;
+
+ /* gcvHAL_MAP_MEMORY */
+ struct _gcsHAL_MAP_MEMORY
+ {
+ /* Physical memory address to map. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to map. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory. */
+ OUT gctPOINTER logical;
+ }
+ MapMemory;
+
+ /* gcvHAL_UNMAP_MEMORY */
+ struct _gcsHAL_UNMAP_MEMORY
+ {
+ /* Physical memory address to unmap. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to unmap. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory to unmap. */
+ IN gctPOINTER logical;
+ }
+ UnmapMemory;
+
+ /* gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_LINEAR_VIDEO_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctUINT bytes;
+
+ /* Buffer alignment. */
+ IN gctUINT alignment;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateLinearVideoMemory;
+
+ /* gcvHAL_ALLOCATE_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_VIDEO_MEMORY
+ {
+ /* Width of rectangle to allocate. */
+ IN OUT gctUINT width;
+
+ /* Height of rectangle to allocate. */
+ IN OUT gctUINT height;
+
+ /* Depth of rectangle to allocate. */
+ IN gctUINT depth;
+
+ /* Format rectangle to allocate in gceSURF_FORMAT. */
+ IN gceSURF_FORMAT format;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateVideoMemory;
+
+ /* gcvHAL_FREE_VIDEO_MEMORY */
+ struct _gcsHAL_FREE_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+#ifdef __QNXNTO__
+/* TODO: This is part of the unlock - why is it here? */
+ /* Mapped logical address to unmap in user space. */
+ OUT gctPOINTER memory;
+
+ /* Number of bytes to allocated. */
+ OUT gctSIZE_T bytes;
+#endif
+ }
+ FreeVideoMemory;
+
+ /* gcvHAL_LOCK_VIDEO_MEMORY */
+ struct _gcsHAL_LOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Hardware specific address. */
+ OUT gctUINT32 address;
+
+ /* Mapped logical address. */
+ OUT gctPOINTER memory;
+ }
+ LockVideoMemory;
+
+ /* gcvHAL_UNLOCK_VIDEO_MEMORY */
+ struct _gcsHAL_UNLOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Type of surface. */
+ IN gceSURF_TYPE type;
+
+ /* Flag to unlock surface asynchroneously. */
+ IN OUT gctBOOL asynchroneous;
+ }
+ UnlockVideoMemory;
+
+ /* gcvHAL_ALLOCATE_NON_PAGED_MEMORY */
+ struct _gcsHAL_ALLOCATE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT gctPOINTER logical;
+ }
+ AllocateNonPagedMemory;
+
+ /* gcvHAL_FREE_NON_PAGED_MEMORY */
+ struct _gcsHAL_FREE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+ }
+ FreeNonPagedMemory;
+
+ /* gcvHAL_EVENT_COMMIT. */
+ struct _gcsHAL_EVENT_COMMIT
+ {
+ /* Event queue. */
+ IN struct _gcsQUEUE * queue;
+ }
+ Event;
+
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_COMMIT
+ {
+ /* Command buffer. */
+ IN gcoCMDBUF commandBuffer;
+
+ /* Context buffer. */
+ IN gcoCONTEXT contextBuffer;
+
+ /* Process handle. */
+ IN gctHANDLE process;
+ }
+ Commit;
+
+ /* gcvHAL_MAP_USER_MEMORY */
+ struct _gcsHAL_MAP_USER_MEMORY
+ {
+ /* Base address of user memory to map. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to map. */
+ IN gctSIZE_T size;
+
+ /* Info record required by gcvHAL_UNMAP_USER_MEMORY. */
+ OUT gctPOINTER info;
+
+ /* Physical address of mapped memory. */
+ OUT gctUINT32 address;
+ }
+ MapUserMemory;
+
+ /* gcvHAL_UNMAP_USER_MEMORY */
+ struct _gcsHAL_UNMAP_USER_MEMORY
+ {
+ /* Base address of user memory to unmap. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to unmap. */
+ IN gctSIZE_T size;
+
+ /* Info record returned by gcvHAL_MAP_USER_MEMORY. */
+ IN gctPOINTER info;
+
+ /* Physical address of mapped memory as returned by
+ gcvHAL_MAP_USER_MEMORY. */
+ IN gctUINT32 address;
+ }
+ UnmapUserMemory;
+
+#if !USE_NEW_LINUX_SIGNAL
+ /* gcsHAL_USER_SIGNAL */
+ struct _gcsHAL_USER_SIGNAL
+ {
+ /* Command. */
+ gceUSER_SIGNAL_COMMAND_CODES command;
+
+ /* Signal ID. */
+ IN OUT gctINT id;
+
+ /* Reset mode. */
+ IN gctBOOL manualReset;
+
+ /* Wait timedout. */
+ IN gctUINT32 wait;
+
+ /* State. */
+ IN gctBOOL state;
+ }
+ UserSignal;
+#endif
+
+ /* gcvHAL_SIGNAL. */
+ struct _gcsHAL_SIGNAL
+ {
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+
+ /* Reserved. */
+ IN gctSIGNAL auxSignal;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+#if defined(__QNXNTO__)
+ /* Client pulse side-channel connection ID. Set by client in gcoOS_CreateSignal. */
+ IN gctINT32 coid;
+
+ /* Set by server. */
+ IN gctINT32 rcvid;
+#endif
+ /* Event generated from where of pipeline */
+ IN gceKERNEL_WHERE fromWhere;
+ }
+ Signal;
+
+ /* gcvHAL_WRITE_DATA. */
+ struct _gcsHAL_WRITE_DATA
+ {
+ /* Address to write data to. */
+ IN gctUINT32 address;
+
+ /* Data to write. */
+ IN gctUINT32 data;
+ }
+ WriteData;
+
+ /* gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_ALLOCATE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT gctPOINTER logical;
+
+ }
+ AllocateContiguousMemory;
+
+ /* gcvHAL_FREE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_FREE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+ }
+ FreeContiguousMemory;
+
+ /* gcvHAL_READ_REGISTER */
+ struct _gcsHAL_READ_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ OUT gctUINT32 data;
+ }
+ ReadRegisterData;
+
+ /* gcvHAL_WRITE_REGISTER */
+ struct _gcsHAL_WRITE_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ IN gctUINT32 data;
+ }
+ WriteRegisterData;
+
+ /* gcvHAL_GET_PROFILE_SETTING */
+ struct _gcsHAL_GET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ OUT gctBOOL enable;
+
+ /* The profile file name */
+ OUT gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ GetProfileSetting;
+
+ /* gcvHAL_SET_PROFILE_SETTING */
+ struct _gcsHAL_SET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ IN gctBOOL enable;
+
+ /* The profile file name */
+ IN gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ SetProfileSetting;
+
+ /* gcvHAL_READ_ALL_PROFILE_REGISTERS */
+ struct _gcsHAL_READ_ALL_PROFILE_REGISTERS
+ {
+ /* Data read. */
+ OUT gcsPROFILER_COUNTERS counters;
+ }
+ RegisterProfileData;
+
+ /* gcvHAL_PROFILE_REGISTERS_2D */
+ struct _gcsHAL_PROFILE_REGISTERS_2D
+ {
+ /* Data read. */
+ OUT gcs2D_PROFILE_PTR hwProfile2D;
+ }
+ RegisterProfileData2D;
+
+ /* Power management. */
+ /* gcvHAL_SET_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_SET_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ IN gceCHIPPOWERSTATE state;
+ }
+ SetPowerManagement;
+
+ /* gcvHAL_QUERY_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_QUERY_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ OUT gceCHIPPOWERSTATE state;
+
+ /* Idle query. */
+ OUT gctBOOL isIdle;
+ }
+ QueryPowerManagement;
+
+ /* gcvHAL_QUERY_KERNEL_SETTINGS */
+ struct _gcsHAL_QUERY_KERNEL_SETTINGS
+ {
+ /* Settings.*/
+ OUT gcsKERNEL_SETTINGS settings;
+ }
+ QueryKernelSettings;
+
+ /* gcvHAL_MAP_PHYSICAL */
+ struct _gcsHAL_MAP_PHYSICAL
+ {
+ /* gcvTRUE to map, gcvFALSE to unmap. */
+ IN gctBOOL map;
+
+ /* Physical address. */
+ IN OUT gctPHYS_ADDR physical;
+ }
+ MapPhysical;
+
+ /* gcvHAL_DEBUG */
+ struct _gcsHAL_DEBUG
+ {
+ /* If gcvTRUE, set the debug information. */
+ IN gctBOOL set;
+ IN gctUINT32 level;
+ IN gctUINT32 zones;
+ IN gctBOOL enable;
+
+ /* Message to print if not empty. */
+ IN gctCHAR message[80];
+ }
+ Debug;
+
+ struct _gcsHAL_CACHE
+ {
+ IN gctBOOL invalidate;
+ IN gctHANDLE process;
+ IN gctPOINTER logical;
+ IN gctSIZE_T bytes;
+ }
+ Cache;
+ }
+ u;
+}
+gcsHAL_INTERFACE;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_driver_h_ */
+
diff --git a/src/include_v2/gc_hal_dump.h b/src/include_v2/gc_hal_dump.h
new file mode 100644
index 0000000..570218c
--- /dev/null
+++ b/src/include_v2/gc_hal_dump.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_dump_h_
+#define __gc_hal_dump_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** FILE LAYOUT:
+**
+** gcsDUMP_FILE structure
+**
+** gcsDUMP_DATA frame
+** gcsDUMP_DATA or gcDUMP_DATA_SIZE records rendingring the frame
+** gctUINT8 data[length]
+*/
+
+#define gcvDUMP_FILE_SIGNATURE gcmCC('g','c','D','B')
+
+typedef struct _gcsDUMP_FILE
+{
+ gctUINT32 signature; /* File signature */
+ gctSIZE_T length; /* Length of file */
+ gctUINT32 frames; /* Number of frames in file */
+}
+gcsDUMP_FILE;
+
+typedef enum _gceDUMP_TAG
+{
+ gcvTAG_SURFACE = gcmCC('s','u','r','f'),
+ gcvTAG_FRAME = gcmCC('f','r','m',' '),
+ gcvTAG_COMMAND = gcmCC('c','m','d',' '),
+ gcvTAG_INDEX = gcmCC('i','n','d','x'),
+ gcvTAG_STREAM = gcmCC('s','t','r','m'),
+ gcvTAG_TEXTURE = gcmCC('t','e','x','t'),
+ gcvTAG_RENDER_TARGET = gcmCC('r','n','d','r'),
+ gcvTAG_DEPTH = gcmCC('z','b','u','f'),
+ gcvTAG_RESOLVE = gcmCC('r','s','l','v'),
+ gcvTAG_DELETE = gcmCC('d','e','l',' '),
+}
+gceDUMP_TAG;
+
+typedef struct _gcsDUMP_SURFACE
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctUINT32 address; /* Address of the surface. */
+ gctINT16 width; /* Width of surface. */
+ gctINT16 height; /* Height of surface. */
+ gceSURF_FORMAT format; /* Surface pixel format. */
+ gctSIZE_T length; /* Number of bytes inside the surface. */
+}
+gcsDUMP_SURFACE;
+
+typedef struct _gcsDUMP_DATA
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctSIZE_T length; /* Number of bytes of data. */
+ gctUINT32 address; /* Address for the data. */
+}
+gcsDUMP_DATA;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_dump_h_ */
+
diff --git a/src/include_v2/gc_hal_engine.h b/src/include_v2/gc_hal_engine.h
new file mode 100644
index 0000000..0382081
--- /dev/null
+++ b/src/include_v2/gc_hal_engine.h
@@ -0,0 +1,1597 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_engine_h_
+#define __gc_hal_engine_h_
+
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoSTREAM * gcoSTREAM;
+typedef struct _gcoVERTEX * gcoVERTEX;
+typedef struct _gcoTEXTURE * gcoTEXTURE;
+typedef struct _gcoINDEX * gcoINDEX;
+typedef struct _gcsVERTEX_ATTRIBUTES * gcsVERTEX_ATTRIBUTES_PTR;
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+/* Shading format. */
+typedef enum _gceSHADING
+{
+ gcvSHADING_SMOOTH,
+ gcvSHADING_FLAT_D3D,
+ gcvSHADING_FLAT_OPENGL,
+}
+gceSHADING;
+
+/* Culling modes. */
+typedef enum _gceCULL
+{
+ gcvCULL_NONE,
+ gcvCULL_CCW,
+ gcvCULL_CW,
+}
+gceCULL;
+
+/* Fill modes. */
+typedef enum _gceFILL
+{
+ gcvFILL_POINT,
+ gcvFILL_WIRE_FRAME,
+ gcvFILL_SOLID,
+}
+gceFILL;
+
+/* Compare modes. */
+typedef enum _gceCOMPARE
+{
+ gcvCOMPARE_NEVER,
+ gcvCOMPARE_NOT_EQUAL,
+ gcvCOMPARE_LESS,
+ gcvCOMPARE_LESS_OR_EQUAL,
+ gcvCOMPARE_EQUAL,
+ gcvCOMPARE_GREATER,
+ gcvCOMPARE_GREATER_OR_EQUAL,
+ gcvCOMPARE_ALWAYS,
+}
+gceCOMPARE;
+
+/* Stencil modes. */
+typedef enum _gceSTENCIL_MODE
+{
+ gcvSTENCIL_NONE,
+ gcvSTENCIL_SINGLE_SIDED,
+ gcvSTENCIL_DOUBLE_SIDED,
+}
+gceSTENCIL_MODE;
+
+/* Stencil operations. */
+typedef enum _gceSTENCIL_OPERATION
+{
+ gcvSTENCIL_KEEP,
+ gcvSTENCIL_REPLACE,
+ gcvSTENCIL_ZERO,
+ gcvSTENCIL_INVERT,
+ gcvSTENCIL_INCREMENT,
+ gcvSTENCIL_DECREMENT,
+ gcvSTENCIL_INCREMENT_SATURATE,
+ gcvSTENCIL_DECREMENT_SATURATE,
+}
+gceSTENCIL_OPERATION;
+
+/* Stencil selection. */
+typedef enum _gceSTENCIL_WHERE
+{
+ gcvSTENCIL_FRONT,
+ gcvSTENCIL_BACK,
+}
+gceSTENCIL_WHERE;
+
+/* Texture addressing selection. */
+typedef enum _gceTEXTURE_WHICH
+{
+ gcvTEXTURE_S,
+ gcvTEXTURE_T,
+ gcvTEXTURE_R,
+}
+gceTEXTURE_WHICH;
+
+/* Texture addressing modes. */
+typedef enum _gceTEXTURE_ADDRESSING
+{
+ gcvTEXTURE_WRAP,
+ gcvTEXTURE_CLAMP,
+ gcvTEXTURE_BORDER,
+ gcvTEXTURE_MIRROR,
+ gcvTEXTURE_MIRROR_ONCE,
+}
+gceTEXTURE_ADDRESSING;
+
+/* Texture filters. */
+typedef enum _gceTEXTURE_FILTER
+{
+ gcvTEXTURE_NONE,
+ gcvTEXTURE_POINT,
+ gcvTEXTURE_LINEAR,
+ gcvTEXTURE_ANISOTROPIC,
+}
+gceTEXTURE_FILTER;
+
+/* Primitive types. */
+typedef enum _gcePRIMITIVE
+{
+ gcvPRIMITIVE_POINT_LIST,
+ gcvPRIMITIVE_LINE_LIST,
+ gcvPRIMITIVE_LINE_STRIP,
+ gcvPRIMITIVE_LINE_LOOP,
+ gcvPRIMITIVE_TRIANGLE_LIST,
+ gcvPRIMITIVE_TRIANGLE_STRIP,
+ gcvPRIMITIVE_TRIANGLE_FAN,
+}
+gcePRIMITIVE;
+
+/* Index types. */
+typedef enum _gceINDEX_TYPE
+{
+ gcvINDEX_8,
+ gcvINDEX_16,
+ gcvINDEX_32,
+}
+gceINDEX_TYPE;
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Query the target capabilities. */
+gceSTATUS
+gcoHAL_QueryTargetCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MultiTargetCount,
+ OUT gctUINT * MaxSamples
+ );
+
+gceSTATUS
+gcoHAL_SetDepthOnly(
+ IN gcoHAL Hal,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoHAL_QueryShaderCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * VertexUniforms,
+ OUT gctUINT * FragmentUniforms,
+ OUT gctUINT * Varyings
+ );
+
+gceSTATUS
+gcoHAL_QueryTextureCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoHAL_QueryStreamCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT32 * MaxAttributes,
+ OUT gctUINT32 * MaxStreamSize,
+ OUT gctUINT32 * NumberOfStreams,
+ OUT gctUINT32 * Alignment
+ );
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*--------------------------------- gcoSURF 3D --------------------------------*/
+
+/* Copy surface. */
+gceSTATUS
+gcoSURF_Copy(
+ IN gcoSURF Surface,
+ IN gcoSURF Source
+ );
+
+/* Clear surface. */
+gceSTATUS
+gcoSURF_Clear(
+ IN gcoSURF Surface,
+ IN gctUINT Flags
+ );
+
+/* Set number of samples for a gcoSURF object. */
+gceSTATUS
+gcoSURF_SetSamples(
+ IN gcoSURF Surface,
+ IN gctUINT Samples
+ );
+
+/* Get the number of samples per pixel. */
+gceSTATUS
+gcoSURF_GetSamples(
+ IN gcoSURF Surface,
+ OUT gctUINT_PTR Samples
+ );
+
+/* Clear rectangular surface. */
+gceSTATUS
+gcoSURF_ClearRect(
+ IN gcoSURF Surface,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctUINT Flags
+ );
+
+/* TO BE REMOVED */
+#if 1
+ gceSTATUS
+ depr_gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight
+ );
+
+ gceSTATUS
+ depr_gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+#endif
+
+/* Resample surface. */
+gceSTATUS
+gcoSURF_Resample(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Resolve surface. */
+gceSTATUS
+gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Resolve rectangular area of a surface. */
+gceSTATUS
+gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Set surface resolvability. */
+gceSTATUS
+gcoSURF_SetResolvability(
+ IN gcoSURF Surface,
+ IN gctBOOL Resolvable
+ );
+
+/******************************************************************************\
+******************************** gcoINDEX Object *******************************
+\******************************************************************************/
+
+/* Construct a new gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoINDEX * Index
+ );
+
+/* Destroy a gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Destroy(
+ IN gcoINDEX Index
+ );
+
+/* Lock index in memory. */
+gceSTATUS
+gcoINDEX_Lock(
+ IN gcoINDEX Index,
+ OUT gctUINT32 * Address,
+ OUT gctPOINTER * Memory
+ );
+
+/* Unlock index that was previously locked with gcoINDEX_Lock. */
+gceSTATUS
+gcoINDEX_Unlock(
+ IN gcoINDEX Index
+ );
+
+/* Upload index data into the memory. */
+gceSTATUS
+gcoINDEX_Load(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE IndexType,
+ IN gctUINT32 IndexCount,
+ IN gctPOINTER IndexBuffer
+ );
+
+/* Bind an index object to the hardware, for neocore hacking*/
+gceSTATUS
+gcoINDEX_LoadHack(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE IndexType,
+ IN gctUINT32 IndexCount,
+ IN gctPOINTER IndexBuffer
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_Bind(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_BindOffset(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset
+ );
+
+/* Free existing index buffer. */
+gceSTATUS
+gcoINDEX_Free(
+ IN gcoINDEX Index
+ );
+
+/* Upload data into an index buffer. */
+gceSTATUS
+gcoINDEX_Upload(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/* Upload data into an index buffer starting at an offset. */
+gceSTATUS
+gcoINDEX_UploadOffset(
+ IN gcoINDEX Index,
+ IN gctUINT32 Offset,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/* Query the index capabilities. */
+gceSTATUS
+gcoINDEX_QueryCaps(
+ OUT gctBOOL * Index8,
+ OUT gctBOOL * Index16,
+ OUT gctBOOL * Index32,
+ OUT gctUINT * MaxIndex
+ );
+
+/* Determine the index range in the current index buffer. */
+gceSTATUS
+gcoINDEX_GetIndexRange(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Count,
+ OUT gctUINT32 * MinimumIndex,
+ OUT gctUINT32 * MaximumIndex
+ );
+
+/* Dynamic buffer management. */
+gceSTATUS
+gcoINDEX_SetDynamic(
+ IN gcoINDEX Index,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+gceSTATUS
+gcoINDEX_UploadDynamic(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+********************************** gco3D Object *********************************
+\******************************************************************************/
+
+/* Clear flags. */
+typedef enum _gceCLEAR
+{
+ gcvCLEAR_COLOR = 0x1,
+ gcvCLEAR_DEPTH = 0x2,
+ gcvCLEAR_STENCIL = 0x4,
+ gcvCLEAR_HZ = 0x8,
+ gcvCLEAR_HAS_VAA = 0x10,
+}
+gceCLEAR;
+
+/* Blending targets. */
+typedef enum _gceBLEND_UNIT
+{
+ gcvBLEND_SOURCE,
+ gcvBLEND_TARGET,
+}
+gceBLEND_UNIT;
+
+/* Construct a new gco3D object. */
+gceSTATUS
+gco3D_Construct(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+/* Destroy an gco3D object. */
+gceSTATUS
+gco3D_Destroy(
+ IN gco3D Engine
+ );
+
+/* Set 3D API type. */
+gceSTATUS
+gco3D_SetAPI(
+ IN gco3D Engine,
+ IN gceAPI ApiType
+ );
+
+/* Set render target. */
+gceSTATUS
+gco3D_SetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset render target. */
+gceSTATUS
+gco3D_UnsetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set depth buffer. */
+gceSTATUS
+gco3D_SetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset depth buffer. */
+gceSTATUS
+gco3D_UnsetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set viewport. */
+gceSTATUS
+gco3D_SetViewport(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set scissors. */
+gceSTATUS
+gco3D_SetScissors(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set clear color. */
+gceSTATUS
+gco3D_SetClearColor(
+ IN gco3D Engine,
+ IN gctUINT8 Red,
+ IN gctUINT8 Green,
+ IN gctUINT8 Blue,
+ IN gctUINT8 Alpha
+ );
+
+/* Set fixed point clear color. */
+gceSTATUS
+gco3D_SetClearColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point clear color. */
+gceSTATUS
+gco3D_SetClearColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set fixed point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Depth
+ );
+
+/* Set floating point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthF(
+ IN gco3D Engine,
+ IN gctFLOAT Depth
+ );
+
+/* Set clear stencil. */
+gceSTATUS
+gco3D_SetClearStencil(
+ IN gco3D Engine,
+ IN gctUINT32 Stencil
+ );
+
+/* Clear a Rect sub-surface. */
+gceSTATUS
+gco3D_ClearRect(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+/* Clear surface. */
+gceSTATUS
+gco3D_Clear(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+
+/* Clear tile status. */
+gceSTATUS
+gco3D_ClearTileStatus(
+ IN gco3D Engine,
+ IN gcsSURF_INFO_PTR Surface,
+ IN gctUINT32 TileStatusAddress,
+ IN gctUINT32 Flags
+ );
+
+/* Set shading mode. */
+gceSTATUS
+gco3D_SetShading(
+ IN gco3D Engine,
+ IN gceSHADING Shading
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_EnableBlending(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set blending function. */
+gceSTATUS
+gco3D_SetBlendFunction(
+ IN gco3D Engine,
+ IN gceBLEND_UNIT Unit,
+ IN gceBLEND_FUNCTION FunctionRGB,
+ IN gceBLEND_FUNCTION FunctionAlpha
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_SetBlendMode(
+ IN gco3D Engine,
+ IN gceBLEND_MODE ModeRGB,
+ IN gceBLEND_MODE ModeAlpha
+ );
+
+/* Set blending color. */
+gceSTATUS
+gco3D_SetBlendColor(
+ IN gco3D Engine,
+ IN gctUINT Red,
+ IN gctUINT Green,
+ IN gctUINT Blue,
+ IN gctUINT Alpha
+ );
+
+/* Set fixed point blending color. */
+gceSTATUS
+gco3D_SetBlendColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point blending color. */
+gceSTATUS
+gco3D_SetBlendColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set culling mode. */
+gceSTATUS
+gco3D_SetCulling(
+ IN gco3D Engine,
+ IN gceCULL Mode
+ );
+
+/* Enable point size */
+gceSTATUS
+gco3D_SetPointSizeEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set point sprite */
+gceSTATUS
+gco3D_SetPointSprite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set fill mode. */
+gceSTATUS
+gco3D_SetFill(
+ IN gco3D Engine,
+ IN gceFILL Mode
+ );
+
+/* Set depth compare mode. */
+gceSTATUS
+gco3D_SetDepthCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Enable depth writing. */
+gceSTATUS
+gco3D_EnableDepthWrite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth mode. */
+gceSTATUS
+gco3D_SetDepthMode(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeX(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFIXED_POINT Near,
+ IN gctFIXED_POINT Far
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeF(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFLOAT Near,
+ IN gctFLOAT Far
+ );
+
+/* Set last pixel enable */
+gceSTATUS
+gco3D_SetLastPixelEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth Bias and Scale */
+gceSTATUS
+gco3D_SetDepthScaleBiasX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT DepthScale,
+ IN gctFIXED_POINT DepthBias
+ );
+
+gceSTATUS
+gco3D_SetDepthScaleBiasF(
+ IN gco3D Engine,
+ IN gctFLOAT DepthScale,
+ IN gctFLOAT DepthBias
+ );
+
+/* Enable or disable dithering. */
+gceSTATUS
+gco3D_EnableDither(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set color write enable bits. */
+gceSTATUS
+gco3D_SetColorWrite(
+ IN gco3D Engine,
+ IN gctUINT8 Enable
+ );
+
+/* Enable or disable early depth. */
+gceSTATUS
+gco3D_SetEarlyDepth(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Enable or disable depth-only mode. */
+gceSTATUS
+gco3D_SetDepthOnly(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set stencil mode. */
+gceSTATUS
+gco3D_SetStencilMode(
+ IN gco3D Engine,
+ IN gceSTENCIL_MODE Mode
+ );
+
+/* Set stencil mask. */
+gceSTATUS
+gco3D_SetStencilMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil write mask. */
+gceSTATUS
+gco3D_SetStencilWriteMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil reference. */
+gceSTATUS
+gco3D_SetStencilReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference,
+ IN gctBOOL Front
+ );
+
+/* Set stencil compare. */
+gceSTATUS
+gco3D_SetStencilCompare(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceCOMPARE Compare
+ );
+
+/* Set stencil operation on pass. */
+gceSTATUS
+gco3D_SetStencilPass(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on fail. */
+gceSTATUS
+gco3D_SetStencilFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on depth fail. */
+gceSTATUS
+gco3D_SetStencilDepthFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Enable or disable alpha test. */
+gceSTATUS
+gco3D_SetAlphaTest(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set alpha test compare. */
+gceSTATUS
+gco3D_SetAlphaCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Set alpha test reference in unsigned integer. */
+gceSTATUS
+gco3D_SetAlphaReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference
+ );
+
+/* Set alpha test reference in fixed point. */
+gceSTATUS
+gco3D_SetAlphaReferenceX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Reference
+ );
+
+/* Set alpha test reference in floating point. */
+gceSTATUS
+gco3D_SetAlphaReferenceF(
+ IN gco3D Engine,
+ IN gctFLOAT Reference
+ );
+
+/* Enable/Disable anti-alias line. */
+gceSTATUS
+gco3D_SetAntiAliasLine(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set texture slot for anti-alias line. */
+gceSTATUS
+gco3D_SetAALineTexSlot(
+ IN gco3D Engine,
+ IN gctUINT TexSlot
+ );
+
+/* Set anti-alias line width scale. */
+gceSTATUS
+gco3D_SetAALineWidth(
+ IN gco3D Engine,
+ IN gctFLOAT Width
+ );
+
+/* Draw a number of primitives. */
+gceSTATUS
+gco3D_DrawPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT StartVertex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of primitives using offsets. */
+gceSTATUS
+gco3D_DrawPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives. */
+gceSTATUS
+gco3D_DrawIndexedPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT BaseVertex,
+ IN gctINT StartIndex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives using offsets. */
+gceSTATUS
+gco3D_DrawIndexedPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 BaseOffset,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Enable or disable anti-aliasing. */
+gceSTATUS
+gco3D_SetAntiAlias(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Write data into the command buffer. */
+gceSTATUS
+gco3D_WriteBuffer(
+ IN gco3D Engine,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Aligned
+ );
+
+/*Send sempahore and stall until sempahore is signalled.*/
+gceSTATUS
+gco3D_Semaphore(
+ IN gco3D Engine,
+ IN gceWHERE From,
+ IN gceWHERE To,
+ IN gceHOW How);
+
+/*Set the subpixels center .*/
+gceSTATUS
+gco3D_SetCentroids(
+ IN gco3D Engine,
+ IN gctUINT32 Index,
+ IN gctPOINTER Centroids
+ );
+/*----------------------------------------------------------------------------*/
+/*-------------------------- gco3D Fragment Processor ------------------------*/
+
+/* Set the fragment processor configuration. */
+gceSTATUS
+gco3D_SetFragmentConfiguration(
+ IN gco3D Engine,
+ IN gctBOOL ColorFromStream,
+ IN gctBOOL EnableFog,
+ IN gctBOOL EnableSmoothPoint,
+ IN gctUINT32 ClipPlanes
+ );
+
+/* Enable/disable texture stage operation. */
+gceSTATUS
+gco3D_EnableTextureStage(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL Enable
+ );
+
+/* Program the channel enable masks for the color texture function. */
+gceSTATUS
+gco3D_SetTextureColorMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the channel enable masks for the alpha texture function. */
+gceSTATUS
+gco3D_SetTextureAlphaMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the constant fragment color. */
+gceSTATUS
+gco3D_SetFragmentColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFragmentColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant fog color. */
+gceSTATUS
+gco3D_SetFogColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFogColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant texture color. */
+gceSTATUS
+gco3D_SetTetxureColorX(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetTetxureColorF(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Configure color texture function. */
+gceSTATUS
+gco3D_SetColorTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+/* Configure alpha texture function. */
+gceSTATUS
+gco3D_SetAlphaTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+
+/******************************************************************************\
+******************************* gcoTEXTURE Object *******************************
+\******************************************************************************/
+
+/* Cube faces. */
+typedef enum _gceTEXTURE_FACE
+{
+ gcvFACE_NONE,
+ gcvFACE_POSITIVE_X,
+ gcvFACE_NEGATIVE_X,
+ gcvFACE_POSITIVE_Y,
+ gcvFACE_NEGATIVE_Y,
+ gcvFACE_POSITIVE_Z,
+ gcvFACE_NEGATIVE_Z,
+}
+gceTEXTURE_FACE;
+
+typedef struct _gcsTEXTURE
+{
+ /* Addressing modes. */
+ gceTEXTURE_ADDRESSING s;
+ gceTEXTURE_ADDRESSING t;
+ gceTEXTURE_ADDRESSING r;
+
+ /* Border color. */
+ gctUINT8 border[4];
+
+ /* Filters. */
+ gceTEXTURE_FILTER minFilter;
+ gceTEXTURE_FILTER magFilter;
+ gceTEXTURE_FILTER mipFilter;
+
+ /* Level of detail. */
+ gctFIXED_POINT lodBias;
+ gctFIXED_POINT lodMin;
+ gctFIXED_POINT lodMax;
+}
+gcsTEXTURE, * gcsTEXTURE_PTR;
+
+
+/* Construct a new gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Construct(
+ IN gcoHAL Hal,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Construct a new sized gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_ConstructSized(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gctUINT MipMapCount,
+ IN gcePOOL Pool,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Destroy an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Destroy(
+ IN gcoTEXTURE Texture
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Upload(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadSub(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload compressed data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadCompressed(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get gcoSURF object for a mipmap level. */
+gceSTATUS
+gcoTEXTURE_GetMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ OUT gcoSURF * Surface
+ );
+
+/* Get gcoSURF object for a mipmap level and face offset. */
+gceSTATUS
+gcoTEXTURE_GetMipMapFace(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ OUT gcoSURF * Surface,
+ OUT gctUINT32_PTR Offset
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromClient(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromSurface(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_SetEndianHint(
+ IN gcoTEXTURE Texture,
+ IN gceENDIAN_HINT EndianHint
+ );
+
+gceSTATUS
+gcoTEXTURE_SetAddressingMode(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_WHICH Which,
+ IN gceTEXTURE_ADDRESSING Mode
+ );
+
+gceSTATUS
+gcoTEXTURE_SetBorderColor(
+ IN gcoTEXTURE Texture,
+ IN gctUINT Red,
+ IN gctUINT Green,
+ IN gctUINT Blue,
+ IN gctUINT Alpha
+ );
+
+gceSTATUS
+gcoTEXTURE_SetBorderColorX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gcoTEXTURE_SetBorderColorF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+gceSTATUS
+gcoTEXTURE_SetMinFilter(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FILTER Filter
+ );
+
+gceSTATUS
+gcoTEXTURE_SetMagFilter(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FILTER Filter
+ );
+
+gceSTATUS
+gcoTEXTURE_SetMipFilter(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FILTER Filter
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODBiasX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT Bias
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODBiasF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT Bias
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMinX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMinF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMaxX(
+ IN gcoTEXTURE Texture,
+ IN gctFIXED_POINT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_SetLODMaxF(
+ IN gcoTEXTURE Texture,
+ IN gctFLOAT LevelOfDetail
+ );
+
+gceSTATUS
+gcoTEXTURE_Bind(
+ IN gcoTEXTURE Texture,
+ IN gctINT Sampler
+ );
+
+gceSTATUS
+gcoTEXTURE_Disable(
+ IN gcoHAL Hal,
+ IN gctINT Sampler
+ );
+
+gceSTATUS
+gcoTEXTURE_Flush(
+ IN gcoTEXTURE Texture
+ );
+
+gceSTATUS
+gcoTEXTURE_QueryCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoTEXTURE_GetClosestFormat(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT InFormat,
+ OUT gceSURF_FORMAT* OutFormat
+ );
+
+gceSTATUS
+gcoTEXTURE_RenderIntoMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsRenderable(
+ IN gcoTEXTURE Texture,
+ IN gctUINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsComplete(
+ IN gcoTEXTURE Texture,
+ IN gctINT MaxLevel
+ );
+
+gceSTATUS
+gcoTEXTURE_BindTexture(
+ IN gcoTEXTURE Texture,
+ IN gctINT Sampler,
+ IN gcsTEXTURE_PTR Info
+ );
+
+/******************************************************************************\
+******************************* gcoSTREAM Object ******************************
+\******************************************************************************/
+
+typedef enum _gceVERTEX_FORMAT
+{
+ gcvVERTEX_BYTE,
+ gcvVERTEX_UNSIGNED_BYTE,
+ gcvVERTEX_SHORT,
+ gcvVERTEX_UNSIGNED_SHORT,
+ gcvVERTEX_INT,
+ gcvVERTEX_UNSIGNED_INT,
+ gcvVERTEX_FIXED,
+ gcvVERTEX_HALF,
+ gcvVERTEX_FLOAT,
+}
+gceVERTEX_FORMAT;
+
+gceSTATUS
+gcoSTREAM_Construct(
+ IN gcoHAL Hal,
+ OUT gcoSTREAM * Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Destroy(
+ IN gcoSTREAM Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Upload(
+ IN gcoSTREAM Stream,
+ IN gctCONST_POINTER Buffer,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Dynamic
+ );
+
+gceSTATUS
+gcoSTREAM_SetStride(
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoSTREAM_Lock(
+ IN gcoSTREAM Stream,
+ OUT gctPOINTER * Logical,
+ OUT gctUINT32 * Physical
+ );
+
+gceSTATUS
+gcoSTREAM_Unlock(
+ IN gcoSTREAM Stream);
+
+gceSTATUS
+gcoSTREAM_Reserve(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoSTREAM_Flush(
+ IN gcoSTREAM Stream
+ );
+
+/* Dynamic buffer API. */
+gceSTATUS
+gcoSTREAM_SetDynamic(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+typedef struct _gcsSTREAM_INFO
+{
+ gctUINT index;
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT components;
+ gctSIZE_T size;
+ gctCONST_POINTER data;
+ gctUINT stride;
+}
+gcsSTREAM_INFO, * gcsSTREAM_INFO_PTR;
+
+gceSTATUS
+gcoSTREAM_UploadDynamic(
+ IN gcoSTREAM Stream,
+ IN gctUINT VertexCount,
+ IN gctUINT InfoCount,
+ IN gcsSTREAM_INFO_PTR Info,
+ IN gcoVERTEX Vertex
+ );
+
+/******************************************************************************\
+******************************** gcoVERTEX Object ******************************
+\******************************************************************************/
+
+typedef struct _gcsVERTEX_ATTRIBUTES
+{
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT32 components;
+ gctSIZE_T size;
+ gctUINT32 stream;
+ gctUINT32 offset;
+ gctUINT32 stride;
+}
+gcsVERTEX_ATTRIBUTES;
+
+gceSTATUS
+gcoVERTEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVERTEX * Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Destroy(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Reset(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_EnableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index,
+ IN gceVERTEX_FORMAT Format,
+ IN gctBOOL Normalized,
+ IN gctUINT32 Components,
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoVERTEX_DisableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index
+ );
+
+gceSTATUS
+gcoVERTEX_Bind(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_BindHack(
+ IN gctUINT32 ActiveAttributeCount,
+ IN gctUINT32 TotalStride,
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Address
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_engine_h_ */
+
diff --git a/src/include_v2/gc_hal_enum.h b/src/include_v2/gc_hal_enum.h
new file mode 100644
index 0000000..0f6ccf8
--- /dev/null
+++ b/src/include_v2/gc_hal_enum.h
@@ -0,0 +1,608 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_enum_h_
+#define __gc_hal_enum_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Chip models. */
+typedef enum _gceCHIPMODEL
+{
+ gcv300 = 0x0300,
+ gcv400 = 0x0400,
+ gcv410 = 0x0410,
+ gcv450 = 0x0450,
+ gcv500 = 0x0500,
+ gcv530 = 0x0530,
+ gcv600 = 0x0600,
+ gcv700 = 0x0700,
+ gcv800 = 0x0800,
+ gcv860 = 0x0860,
+ gcv1000 = 0x1000,
+}
+gceCHIPMODEL;
+
+/* Chip features. */
+typedef enum _gceFEATURE
+{
+ gcvFEATURE_PIPE_2D,
+ gcvFEATURE_PIPE_3D,
+ gcvFEATURE_PIPE_VG,
+ gcvFEATURE_DC,
+ gcvFEATURE_HIGH_DYNAMIC_RANGE,
+ gcvFEATURE_MODULE_CG,
+ gcvFEATURE_MIN_AREA,
+ gcvFEATURE_BUFFER_INTERLEAVING,
+ gcvFEATURE_BYTE_WRITE_2D,
+ gcvFEATURE_ENDIANNESS_CONFIG,
+ gcvFEATURE_DUAL_RETURN_BUS,
+ gcvFEATURE_DEBUG_MODE,
+ gcvFEATURE_YUY2_RENDER_TARGET,
+ gcvFEATURE_FRAGMENT_PROCESSOR,
+ gcvFEATURE_2DPE20,
+ gcvFEATURE_FAST_CLEAR,
+ gcvFEATURE_YUV420_TILER,
+ gcvFEATURE_YUY2_AVERAGING,
+ gcvFEATURE_FLIP_Y,
+ gcvFEATURE_EARLY_Z,
+ gcvFEATURE_Z_COMPRESSION,
+ gcvFEATURE_MSAA,
+ gcvFEATURE_SPECIAL_ANTI_ALIASING,
+ gcvFEATURE_SPECIAL_MSAA_LOD,
+ gcvFEATURE_422_TEXTURE_COMPRESSION,
+ gcvFEATURE_DXT_TEXTURE_COMPRESSION,
+ gcvFEATURE_ETC1_TEXTURE_COMPRESSION,
+ gcvFEATURE_CORRECT_TEXTURE_CONVERTER,
+ gcvFEATURE_TEXTURE_8K,
+ gcvFEATURE_SCALER,
+ gcvFEATURE_YUV420_SCALER,
+ gcvFEATURE_SHADER_HAS_W,
+ gcvFEATURE_SHADER_HAS_SIGN,
+ gcvFEATURE_SHADER_HAS_FLOOR,
+ gcvFEATURE_SHADER_HAS_CEIL,
+ gcvFEATURE_SHADER_HAS_SQRT,
+ gcvFEATURE_SHADER_HAS_TRIG,
+ gcvFEATURE_VAA,
+ gcvFEATURE_HZ,
+ gcvFEATURE_CORRECT_STENCIL,
+ gcvFEATURE_VG20,
+ gcvFEATURE_VG_FILTER,
+ gcvFEATURE_VG21,
+ gcvFEATURE_VG_DOUBLE_BUFFER,
+ gcvFEATURE_MC20,
+ gcvFEATURE_SUPER_TILED,
+
+ gcvFEATURE_2D_FILTERBLIT_PLUS_ALPHABLEND,
+ gcvFEATURE_2D_DITHER,
+ gcvFEATURE_2D_A8_TARGET,
+ gcvFEATURE_2D_FILTERBLIT_FULLROTATION,
+ gcvFEATURE_2D_BITBLIT_FULLROTATION,
+
+ gcvFEATURE_WIDE_LINE,
+ gcvFEATURE_FC_FLUSH_STALL,
+
+ gcvFEATURE_FULL_DIRECTFB,
+ gcvFEATURE_HALF_FLOAT_PIPE,
+ gcvFEATURE_LINE_LOOP,
+ gcvFEATURE_2D_YUV_BLIT,
+ gcvFEATURE_2D_TILING,
+}
+gceFEATURE;
+
+/* Chip Power Status. */
+typedef enum _gceCHIPPOWERSTATE
+{
+ gcvPOWER_ON,
+ gcvPOWER_OFF,
+ gcvPOWER_IDLE,
+ gcvPOWER_SUSPEND,
+ gcvPOWER_ON_BROADCAST,
+ gcvPOWER_SUSPEND_ATPOWERON,
+ gcvPOWER_OFF_ATPOWERON,
+ gcvPOWER_IDLE_BROADCAST,
+ gcvPOWER_SUSPEND_BROADCAST,
+ gcvPOWER_OFF_BROADCAST,
+ gcvPOWER_OFF_RECOVERY,
+}
+gceCHIPPOWERSTATE;
+
+/* Surface types. */
+typedef enum _gceSURF_TYPE
+{
+ gcvSURF_TYPE_UNKNOWN,
+ gcvSURF_INDEX,
+ gcvSURF_VERTEX,
+ gcvSURF_TEXTURE,
+ gcvSURF_RENDER_TARGET,
+ gcvSURF_DEPTH,
+ gcvSURF_BITMAP,
+ gcvSURF_TILE_STATUS,
+ gcvSURF_MASK,
+ gcvSURF_SCISSOR,
+ gcvSURF_HIERARCHICAL_DEPTH,
+ gcvSURF_NUM_TYPES, /* Make sure this is the last one! */
+
+ /* Combinations. */
+ gcvSURF_NO_TILE_STATUS = 0x100,
+ gcvSURF_RENDER_TARGET_NO_TILE_STATUS = gcvSURF_RENDER_TARGET
+ | gcvSURF_NO_TILE_STATUS,
+ gcvSURF_DEPTH_NO_TILE_STATUS = gcvSURF_DEPTH
+ | gcvSURF_NO_TILE_STATUS,
+}
+gceSURF_TYPE;
+
+typedef enum _gceSURF_COLOR_TYPE
+{
+ gcvSURF_COLOR_UNKNOWN,
+ gcvSURF_COLOR_LINEAR = 0x01,
+ gcvSURF_COLOR_ALPHA_PRE = 0x02,
+}
+gceSURF_COLOR_TYPE;
+
+/* Rotation. */
+typedef enum _gceSURF_ROTATION
+{
+ gcvSURF_0_DEGREE,
+ gcvSURF_90_DEGREE,
+ gcvSURF_180_DEGREE,
+ gcvSURF_270_DEGREE,
+ gcvSURF_FLIP_X,
+ gcvSURF_FLIP_Y,
+}
+gceSURF_ROTATION;
+
+/* Surface formats. */
+typedef enum _gceSURF_FORMAT
+{
+ /* Unknown format. */
+ gcvSURF_UNKNOWN,
+
+ /* Palettized formats. */
+ gcvSURF_INDEX1 = 100,
+ gcvSURF_INDEX4,
+ gcvSURF_INDEX8,
+
+ /* RGB formats. */
+ gcvSURF_A2R2G2B2 = 200,
+ gcvSURF_R3G3B2,
+ gcvSURF_A8R3G3B2,
+ gcvSURF_X4R4G4B4,
+ gcvSURF_A4R4G4B4,
+ gcvSURF_R4G4B4A4,
+ gcvSURF_X1R5G5B5,
+ gcvSURF_A1R5G5B5,
+ gcvSURF_R5G5B5A1,
+ gcvSURF_R5G6B5,
+ gcvSURF_R8G8B8,
+ gcvSURF_X8R8G8B8,
+ gcvSURF_A8R8G8B8,
+ gcvSURF_R8G8B8A8,
+ gcvSURF_G8R8G8B8,
+ gcvSURF_R8G8B8G8,
+ gcvSURF_X2R10G10B10,
+ gcvSURF_A2R10G10B10,
+ gcvSURF_X12R12G12B12,
+ gcvSURF_A12R12G12B12,
+ gcvSURF_X16R16G16B16,
+ gcvSURF_A16R16G16B16,
+ gcvSURF_R8G8B8X8,
+ gcvSURF_R5G5B5X1,
+ gcvSURF_R4G4B4X4,
+
+ /* BGR formats. */
+ gcvSURF_A4B4G4R4 = 300,
+ gcvSURF_A1B5G5R5,
+ gcvSURF_B5G6R5,
+ gcvSURF_B8G8R8,
+ gcvSURF_X8B8G8R8,
+ gcvSURF_A8B8G8R8,
+ gcvSURF_A2B10G10R10,
+ gcvSURF_A16B16G16R16,
+ gcvSURF_G16R16,
+ gcvSURF_B4G4R4A4,
+ gcvSURF_B5G5R5A1,
+ gcvSURF_B8G8R8X8,
+ gcvSURF_B8G8R8A8,
+ gcvSURF_X4B4G4R4,
+ gcvSURF_X1B5G5R5,
+ gcvSURF_B4G4R4X4,
+ gcvSURF_B5G5R5X1,
+
+ /* Compressed formats. */
+ gcvSURF_DXT1 = 400,
+ gcvSURF_DXT2,
+ gcvSURF_DXT3,
+ gcvSURF_DXT4,
+ gcvSURF_DXT5,
+ gcvSURF_CXV8U8,
+ gcvSURF_ETC1,
+
+ /* YUV formats. */
+ gcvSURF_YUY2 = 500,
+ gcvSURF_UYVY,
+ gcvSURF_YV12,
+ gcvSURF_I420,
+ gcvSURF_NV12,
+ gcvSURF_NV21,
+ gcvSURF_NV16,
+ gcvSURF_NV61,
+ gcvSURF_YVYU,
+ gcvSURF_VYUY,
+
+ /* Depth formats. */
+ gcvSURF_D16 = 600,
+ gcvSURF_D24S8,
+ gcvSURF_D32,
+ gcvSURF_D24X8,
+
+ /* Alpha formats. */
+ gcvSURF_A4 = 700,
+ gcvSURF_A8,
+ gcvSURF_A12,
+ gcvSURF_A16,
+ gcvSURF_A32,
+ gcvSURF_A1,
+
+ /* Luminance formats. */
+ gcvSURF_L4 = 800,
+ gcvSURF_L8,
+ gcvSURF_L12,
+ gcvSURF_L16,
+ gcvSURF_L32,
+ gcvSURF_L1,
+
+ /* Alpha/Luminance formats. */
+ gcvSURF_A4L4 = 900,
+ gcvSURF_A2L6,
+ gcvSURF_A8L8,
+ gcvSURF_A4L12,
+ gcvSURF_A12L12,
+ gcvSURF_A16L16,
+
+ /* Bump formats. */
+ gcvSURF_L6V5U5 = 1000,
+ gcvSURF_V8U8,
+ gcvSURF_X8L8V8U8,
+ gcvSURF_Q8W8V8U8,
+ gcvSURF_A2W10V10U10,
+ gcvSURF_V16U16,
+ gcvSURF_Q16W16V16U16,
+
+ /* Floating point formats. */
+ gcvSURF_R16F = 1100,
+ gcvSURF_G16R16F,
+ gcvSURF_A16B16G16R16F,
+ gcvSURF_R32F,
+ gcvSURF_G32R32F,
+ gcvSURF_A32B32G32R32F,
+
+#if 0
+ /* FIXME: remove HDR support for now. */
+ /* HDR formats. */
+ gcvSURF_HDR7E3 = 1200,
+ gcvSURF_HDR6E4,
+ gcvSURF_HDR5E5,
+ gcvSURF_HDR6E5,
+#endif
+}
+gceSURF_FORMAT;
+
+/* Pixel swizzle modes. */
+typedef enum _gceSURF_SWIZZLE
+{
+ gcvSURF_NOSWIZZLE,
+ gcvSURF_ARGB,
+ gcvSURF_ABGR,
+ gcvSURF_RGBA,
+ gcvSURF_BGRA
+}
+gceSURF_SWIZZLE;
+
+/* Transparency modes. */
+typedef enum _gceSURF_TRANSPARENCY
+{
+ /* Valid only for PE 1.0 */
+ gcvSURF_OPAQUE,
+ gcvSURF_SOURCE_MATCH,
+ gcvSURF_SOURCE_MASK,
+ gcvSURF_PATTERN_MASK,
+}
+gceSURF_TRANSPARENCY;
+
+/* Transparency modes. */
+typedef enum _gce2D_TRANSPARENCY
+{
+ /* Valid only for PE 2.0 */
+ gcv2D_OPAQUE,
+ gcv2D_KEYED,
+ gcv2D_MASKED
+}
+gce2D_TRANSPARENCY;
+
+/* Mono packing modes. */
+typedef enum _gceSURF_MONOPACK
+{
+ gcvSURF_PACKED8,
+ gcvSURF_PACKED16,
+ gcvSURF_PACKED32,
+ gcvSURF_UNPACKED,
+}
+gceSURF_MONOPACK;
+
+/* Blending modes. */
+typedef enum _gceSURF_BLEND_MODE
+{
+ /* Porter-Duff blending modes. */
+ /* Fsrc Fdst */
+ gcvBLEND_CLEAR, /* 0 0 */
+ gcvBLEND_SRC, /* 1 0 */
+ gcvBLEND_DST, /* 0 1 */
+ gcvBLEND_SRC_OVER_DST, /* 1 1 - Asrc */
+ gcvBLEND_DST_OVER_SRC, /* 1 - Adst 1 */
+ gcvBLEND_SRC_IN_DST, /* Adst 0 */
+ gcvBLEND_DST_IN_SRC, /* 0 Asrc */
+ gcvBLEND_SRC_OUT_DST, /* 1 - Adst 0 */
+ gcvBLEND_DST_OUT_SRC, /* 0 1 - Asrc */
+ gcvBLEND_SRC_ATOP_DST, /* Adst 1 - Asrc */
+ gcvBLEND_DST_ATOP_SRC, /* 1 - Adst Asrc */
+ gcvBLEND_SRC_XOR_DST, /* 1 - Adst 1 - Asrc */
+
+ /* Special blending modes. */
+ gcvBLEND_SET, /* DST = 1 */
+ gcvBLEND_SUB /* DST = DST * (1 - SRC) */
+}
+gceSURF_BLEND_MODE;
+
+/* Per-pixel alpha modes. */
+typedef enum _gceSURF_PIXEL_ALPHA_MODE
+{
+ gcvSURF_PIXEL_ALPHA_STRAIGHT,
+ gcvSURF_PIXEL_ALPHA_INVERSED
+}
+gceSURF_PIXEL_ALPHA_MODE;
+
+/* Global alpha modes. */
+typedef enum _gceSURF_GLOBAL_ALPHA_MODE
+{
+ gcvSURF_GLOBAL_ALPHA_OFF,
+ gcvSURF_GLOBAL_ALPHA_ON,
+ gcvSURF_GLOBAL_ALPHA_SCALE
+}
+gceSURF_GLOBAL_ALPHA_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gceSURF_PIXEL_COLOR_MODE
+{
+ gcvSURF_COLOR_STRAIGHT,
+ gcvSURF_COLOR_MULTIPLY
+}
+gceSURF_PIXEL_COLOR_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_PIXEL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_COLOR_MULTIPLY_DISABLE,
+ gcv2D_COLOR_MULTIPLY_ENABLE
+}
+gce2D_PIXEL_COLOR_MULTIPLY_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_GLOBAL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_GLOBAL_COLOR_MULTIPLY_DISABLE,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_ALPHA,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_COLOR
+}
+gce2D_GLOBAL_COLOR_MULTIPLY_MODE;
+
+/* Alpha blending factor modes. */
+typedef enum _gceSURF_BLEND_FACTOR_MODE
+{
+ gcvSURF_BLEND_ZERO,
+ gcvSURF_BLEND_ONE,
+ gcvSURF_BLEND_STRAIGHT,
+ gcvSURF_BLEND_INVERSED,
+ gcvSURF_BLEND_COLOR,
+ gcvSURF_BLEND_COLOR_INVERSED,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED,
+ gcvSURF_BLEND_STRAIGHT_NO_CROSS,
+ gcvSURF_BLEND_INVERSED_NO_CROSS,
+ gcvSURF_BLEND_COLOR_NO_CROSS,
+ gcvSURF_BLEND_COLOR_INVERSED_NO_CROSS,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED_CROSS
+}
+gceSURF_BLEND_FACTOR_MODE;
+
+/* Alpha blending porter duff rules. */
+typedef enum _gce2D_PORTER_DUFF_RULE
+{
+ gcvPD_CLEAR,
+ gcvPD_SRC,
+ gcvPD_SRC_OVER,
+ gcvPD_DST_OVER,
+ gcvPD_SRC_IN,
+ gcvPD_DST_IN,
+ gcvPD_SRC_OUT,
+ gcvPD_DST_OUT,
+ gcvPD_SRC_ATOP,
+ gcvPD_DST_ATOP,
+ gcvPD_ADD,
+ gcvPD_XOR,
+ gcvPD_DST
+}
+gce2D_PORTER_DUFF_RULE;
+
+/* Alpha blending factor modes. */
+typedef enum _gce2D_YUV_COLOR_MODE
+{
+ gcv2D_YUV_601,
+ gcv2D_YUV_709
+}
+gce2D_YUV_COLOR_MODE;
+
+/* 2D Rotation and flipping. */
+typedef enum _gce2D_ORIENTATION
+{
+ gcv2D_0_DEGREE,
+ gcv2D_90_DEGREE,
+ gcv2D_180_DEGREE,
+ gcv2D_270_DEGREE,
+ gcv2D_X_FLIP,
+ gcv2D_Y_FLIP
+}
+gce2D_ORIENTATION;
+
+typedef enum _gce2D_COMMAND
+{
+ gcv2D_CLEAR,
+ gcv2D_LINE,
+ gcv2D_BLT,
+ gcv2D_STRETCH,
+ gcv2D_HOR_FILTER,
+ gcv2D_VER_FILTER,
+ gcv2D_MULTI_SOURCE_BLEND,
+}
+gce2D_COMMAND;
+
+#ifndef VIVANTE_NO_3D
+/* Texture functions. */
+typedef enum _gceTEXTURE_FUNCTION
+{
+ gcvTEXTURE_DUMMY = 0,
+ gcvTEXTURE_REPLACE = 0,
+ gcvTEXTURE_MODULATE,
+ gcvTEXTURE_ADD,
+ gcvTEXTURE_ADD_SIGNED,
+ gcvTEXTURE_INTERPOLATE,
+ gcvTEXTURE_SUBTRACT,
+ gcvTEXTURE_DOT3
+}
+gceTEXTURE_FUNCTION;
+
+/* Texture sources. */
+typedef enum _gceTEXTURE_SOURCE
+{
+ gcvCOLOR_FROM_TEXTURE,
+ gcvCOLOR_FROM_CONSTANT_COLOR,
+ gcvCOLOR_FROM_PRIMARY_COLOR,
+ gcvCOLOR_FROM_PREVIOUS_COLOR
+}
+gceTEXTURE_SOURCE;
+
+/* Texture source channels. */
+typedef enum _gceTEXTURE_CHANNEL
+{
+ gcvFROM_COLOR,
+ gcvFROM_ONE_MINUS_COLOR,
+ gcvFROM_ALPHA,
+ gcvFROM_ONE_MINUS_ALPHA
+}
+gceTEXTURE_CHANNEL;
+#endif /* VIVANTE_NO_3D */
+
+/* Filter types. */
+typedef enum _gceFILTER_TYPE
+{
+ gcvFILTER_SYNC,
+ gcvFILTER_BLUR,
+ gcvFILTER_USER
+}
+gceFILTER_TYPE;
+
+/* Filter pass types. */
+typedef enum _gceFILTER_PASS_TYPE
+{
+ gcvFILTER_HOR_PASS,
+ gcvFILTER_VER_PASS
+}
+gceFILTER_PASS_TYPE;
+
+/* Endian hints. */
+typedef enum _gceENDIAN_HINT
+{
+ gcvENDIAN_NO_SWAP = 0,
+ gcvENDIAN_SWAP_WORD,
+ gcvENDIAN_SWAP_DWORD
+}
+gceENDIAN_HINT;
+
+/* Tiling modes. */
+typedef enum _gceTILING
+{
+ gcvLINEAR,
+ gcvTILED,
+ gcvSUPERTILED,
+ gcvMULTI_TILED,
+ gcvMULTI_SUPERTILED,
+}
+gceTILING;
+
+/* 2D pattern type. */
+typedef enum _gce2D_PATTERN
+{
+ gcv2D_PATTERN_SOLID = 0,
+ gcv2D_PATTERN_MONO,
+ gcv2D_PATTERN_COLOR,
+ gcv2D_PATTERN_INVALID
+}
+gce2D_PATTERN;
+
+/* 2D source type. */
+typedef enum _gce2D_SOURCE
+{
+ gcv2D_SOURCE_MASKED = 0,
+ gcv2D_SOURCE_MONO,
+ gcv2D_SOURCE_COLOR,
+ gcv2D_SOURCE_INVALID
+}
+gce2D_SOURCE;
+
+/* Pipes. */
+typedef enum _gcePIPE_SELECT
+{
+ gcvPIPE_INVALID = ~0,
+ gcvPIPE_3D = 0,
+ gcvPIPE_2D
+}
+gcePIPE_SELECT;
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoCONTEXT * gcoCONTEXT;
+typedef struct _gcoCMDBUF * gcoCMDBUF;
+typedef struct _gcoQUEUE * gcoQUEUE;
+typedef struct _gcsHAL_INTERFACE * gcsHAL_INTERFACE_PTR;
+typedef struct gcs2D_PROFILE * gcs2D_PROFILE_PTR;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_enum_h_ */
+
+
diff --git a/src/include_v2/gc_hal_mem.h b/src/include_v2/gc_hal_mem.h
new file mode 100644
index 0000000..bf0c40f
--- /dev/null
+++ b/src/include_v2/gc_hal_mem.h
@@ -0,0 +1,471 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+/*
+** Include file for the local memory management.
+*/
+
+#ifndef __gc_hal_mem_h_
+#define __gc_hal_mem_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*******************************************************************************
+** Usage:
+
+ The macros to declare MemPool type and functions are
+ gcmMEM_DeclareFSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareVSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix)
+
+ The data structures for MemPool are
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+
+ The MemPool constructor and destructor functions are
+ gcfMEM_InitFSMemPool(gcsMEM_FS_MEM_POOL *, gcoOS, gctUINT, gctUINT);
+ gcfMEM_FreeFSMemPool(gcsMEM_FS_MEM_POOL *);
+ gcfMEM_InitVSMemPool(gcsMEM_VS_MEM_POOL *, gcoOS, gctUINT, gctBOOL);
+ gcfMEM_FreeVSMemPool(gcsMEM_VS_MEM_POOL *);
+ gcfMEM_InitAFSMemPool(gcsMEM_AFS_MEM_POOL *, gcoOS, gctUINT);
+ gcfMEM_FreeAFSMemPool(gcsMEM_AFS_MEM_POOL *);
+
+ FS: for Fixed-Size data structures
+ VS: for Variable-size data structures
+ AFS: for Array of Fixed-Size data structures
+
+
+ // Example 1: For a fixed-size data structure, struct gcsNode.
+ // It is used locally in a file, so the functions are static without prefix.
+ // At top level, declear allocate and free functions.
+ // The first argument is the data type.
+ // The second armument is the short name used in the fuctions.
+ gcmMEM_DeclareFSMemPool(struct gcsNode, Node, );
+
+ // The previous macro creates two inline functions,
+ // _AllocateNode and _FreeNode.
+
+ // In function or struct
+ gcsMEM_FS_MEM_POOL nodeMemPool;
+
+ // In function,
+ struct gcsNode * node;
+ gceSTATUS status;
+
+ // Before using the memory pool, initialize it.
+ // The second argument is the gcoOS object.
+ // The third argument is the number of data structures to allocate for each chunk.
+ status = gcfMEM_InitFSMemPool(&nodeMemPool, os, 100, sizeof(struct gcsNode));
+ ...
+
+ // Allocate a node.
+ status = _AllocateNode(nodeMemPool, &node);
+ ...
+ // Free a node.
+ _FreeNode(nodeMemPool, node);
+
+ // After using the memory pool, free it.
+ gcfMEM_FreeFSMemPool(&nodeMemPool);
+
+
+ // Example 2: For array of fixed-size data structures, struct gcsNode.
+ // It is used in several files, so the functions are extern with prefix.
+ // At top level, declear allocate and free functions.
+ // The first argument is the data type, and the second one is the short name
+ // used in the fuctions.
+ gcmMEM_DeclareAFSMemPool(struct gcsNode, NodeArray, gcfOpt);
+
+ // The previous macro creates two inline functions,
+ // gcfOpt_AllocateNodeArray and gcfOpt_FreeNodeArray.
+
+ // In function or struct
+ gcsMEM_AFS_MEM_POOL nodeArrayMemPool;
+
+ // In function,
+ struct gcsNode * nodeArray;
+ gceSTATUS status;
+
+ // Before using the array memory pool, initialize it.
+ // The second argument is the gcoOS object, the third is the number of data
+ // structures to allocate for each chunk.
+ status = gcfMEM_InitAFSMemPool(&nodeArrayMemPool, os, sizeof(struct gcsNode));
+ ...
+
+ // Allocate a node array of size 100.
+ status = gcfOpt_AllocateNodeArray(nodeArrayMemPool, &nodeArray, 100);
+ ...
+ // Free a node array.
+ gcfOpt_FreeNodeArray(&nodeArrayMemPool, nodeArray);
+
+ // After using the array memory pool, free it.
+ gcfMEM_FreeAFSMemPool(&nodeArrayMemPool);
+
+*******************************************************************************/
+
+/*******************************************************************************
+** To switch back to use gcoOS_Allocate and gcoOS_Free, add
+** #define USE_LOCAL_MEMORY_POOL 0
+** before including this file.
+*******************************************************************************/
+#ifndef USE_LOCAL_MEMORY_POOL
+/*
+ USE_LOCAL_MEMORY_POOL
+
+ This define enables the local memory management to improve performance.
+*/
+#define USE_LOCAL_MEMORY_POOL 1
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Structures
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+#else
+ typedef gcoOS gcsMEM_FS_MEM_POOL;
+ typedef gcoOS gcsMEM_VS_MEM_POOL;
+ typedef gcoOS gcsMEM_AFS_MEM_POOL;
+#endif
+
+/*******************************************************************************
+** Memory Pool Macros
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName##List( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * FirstPointer, \
+ Type * LastPointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolFreeAList(MemPool, (gctPOINTER) FirstPointer, (gctPOINTER) LastPointer)); \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ return(gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+ Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, size)); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcfMEM_VSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer)); \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ return(gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcfMEM_AFSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer)); \
+}
+
+#else
+
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ return(gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcoOS_Free(MemPool, Pointer)); \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ return(gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Size)); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcoOS_Free(MemPool, Pointer)); \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ return(gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type))); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ return(gcoOS_Free(MemPool, Pointer)); \
+}
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Functions
+*******************************************************************************/
+gceSTATUS
+gcfMEM_InitFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolGetANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeAList(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER FirstNode,
+ IN gctPOINTER LastNode
+ );
+
+gceSTATUS
+gcfMEM_InitVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT BlockSize,
+ IN gctBOOL RecycleFreeNode
+ );
+
+gceSTATUS
+gcfMEM_FreeVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolGetANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctUINT Size,
+ IN gctUINT Alignment,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolFreeANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_InitAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolGetANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctUINT Count,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolFreeANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_mem_h_ */
+
diff --git a/src/include_v2/gc_hal_options.h b/src/include_v2/gc_hal_options.h
new file mode 100644
index 0000000..6c4ca99
--- /dev/null
+++ b/src/include_v2/gc_hal_options.h
@@ -0,0 +1,263 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_options_h_
+#define __gc_hal_options_h_
+
+/*
+ USE_NEW_LINUX_SIGNAL
+
+ This define enables the Linux kernel signaling between kernel and user.
+*/
+#ifndef USE_NEW_LINUX_SIGNAL
+# define USE_NEW_LINUX_SIGNAL 0
+#endif
+
+/*
+ NO_USER_DIRECT_ACCESS_FROM_KERNEL
+
+ This define enables the Linux kernel behavior accessing user memory.
+*/
+#ifndef NO_USER_DIRECT_ACCESS_FROM_KERNEL
+# define NO_USER_DIRECT_ACCESS_FROM_KERNEL 0
+#endif
+
+/*
+ VIVANTE_PROFILER
+
+ This define enables the profiler.
+*/
+#ifndef VIVANTE_PROFILER
+# define VIVANTE_PROFILER 0
+#endif
+
+/*
+ gcdUSE_VG
+
+ Enable VG HAL layer (only for GC350).
+*/
+#ifndef gcdUSE_VG
+# define gcdUSE_VG 0
+#endif
+
+/*
+ USE_SW_FB
+
+ Set to 1 if the frame buffer memory cannot be accessed by the GPU.
+*/
+#ifndef USE_SW_FB
+#define USE_SW_FB 0
+#endif
+
+/*
+ USE_SHADER_SYMBOL_TABLE
+
+ This define enables the symbol table in shader object.
+*/
+#define USE_SHADER_SYMBOL_TABLE 1
+
+/*
+ USE_SUPER_SAMPLING
+
+ This define enables super-sampling support.
+*/
+#define USE_SUPER_SAMPLING 0
+
+/* PROFILE_HAL_COUNTERS, PROFILE_HW_COUNTERS, PROFILE_SHADER_COUNTERS are not runtime configurable. */
+/*
+ PROFILE_HAL_COUNTERS
+
+ This define enables HAL counter profiling support.
+ HW and SHADER Counter profiling depends on this.
+*/
+/*
+#define PROFILE_HAL_COUNTERS 1
+*/
+/*
+ PROFILE_HW_COUNTERS
+
+ This define enables HW counter profiling support.
+*/
+/*
+#define PROFILE_HW_COUNTERS 1
+*/
+/*
+ PROFILE_SHADER_COUNTERS
+
+ This define enables SHADER counter profiling support.
+*/
+/*
+#define PROFILE_SHADER_COUNTERS 1
+*/
+/*
+ COMMAND_PROCESSOR_VERSION
+
+ The version of the command buffer and task manager.
+*/
+#define COMMAND_PROCESSOR_VERSION 1
+
+/*
+ gcdDUMP
+
+ When set to 1, a dump of all states and memory uploads, as well as other
+ hardware related execution will be printed to the debug console. This
+ data can be used for playing back applications.
+*/
+#define gcdDUMP 0
+
+/*
+ gcdDUMP_API
+
+ When set to 1, a high level dump of the EGL and GL/VG APs's are
+ captured.
+*/
+#define gcdDUMP_API 0
+
+/*
+ gcdDUMP_IN_KERNEL
+
+ When set to 1, all dumps will happen in the kernel. This is handy if
+ you want the kernel to dump its command buffers as well and the data
+ needs to be in sync.
+*/
+#define gcdDUMP_IN_KERNEL 0
+
+/*
+ gcdDUMP_COMMAND
+
+ When set to non-zero, the command queue will dump all incoming command
+ and context buffers as well as all other modifications to the command
+ queue.
+*/
+#define gcdDUMP_COMMAND 0
+
+/*
+ gcdNULL_DRIVER
+*/
+#define gcdNULL_DRIVER 0
+
+/*
+ gcdENABLE_TIMEOUT_DETECTION
+
+ Enable timeout detection.
+*/
+#define gcdENABLE_TIMEOUT_DETECTION 0
+
+/*
+ gcdCMD_BUFFERS
+
+ Number of command buffers to use per client. Each command buffer is 32kB in
+ size.
+*/
+#define gcdCMD_BUFFERS 2
+
+/*
+ gcdPOWER_CONTROL_DELAY
+
+ The delay in milliseconds required to wait until the GPU has woke up from a
+ suspend or power-down state. This is system dependent because the bus clock
+ also needs to be stabalize.
+*/
+#define gcdPOWER_CONTROL_DELAY 1
+
+/*
+ gcdMMU_SIZE
+
+ Size of the MMU page table in bytes. Each 4 bytes can hold 4kB worth of
+ virtual data.
+*/
+#define gcdMMU_SIZE (128 << 10)
+
+/*
+ gcdSECURE_USER
+
+ Use logical addresses instead of physical addresses in user land. In this
+ case a hint table is created for both command buffers and context buffers,
+ and that hint table will be used to patch up those buffers in the kernel
+ when they are ready to submit.
+*/
+#define gcdSECURE_USER 1
+
+/*
+ gcdSECURE_CACHE_SLOTS
+
+ Number of slots in the logical to DMA address cache table. Each time a
+ logical address needs to be translated into a DMA address for the GPU, this
+ cache will be walked. The replacement scheme is LRU.
+*/
+#define gcdSECURE_CACHE_SLOTS 64
+
+/*
+ gcdREGISTER_ACCESS_FROM_USER
+
+ Set to 1 to allow IOCTL calls to get through from user land. This should
+ only be in debug or development drops.
+*/
+#ifndef gcdREGISTER_ACCESS_FROM_USER
+# define gcdREGISTER_ACCESS_FROM_USER 1
+#endif
+
+/*
+ gcdHEAP_SIZE
+
+ Set the allocation size for the internal heaps. Each time a heap is full,
+ a new heap will be allocated with this minmimum amount of bytes. The bigger
+ this size, the fewer heaps there are to allocate, the better the
+ performance. However, heaps won't be freed until they are completely free,
+ so there might be some more memory waste if the size is too big.
+*/
+#define gcdHEAP_SIZE (64 << 10)
+
+/*
+ gcdNO_POWER_MANAGEMENT
+
+ This define disables the power management code.
+*/
+#ifndef gcdNO_POWER_MANAGEMENT
+# define gcdNO_POWER_MANAGEMENT 0
+#endif
+
+/*
+ gcdFPGA_BUILD
+
+ This define enables work arounds for FPGA images.
+*/
+#if !defined(gcdFPGA_BUILD)
+# define gcdFPGA_BUILD 0
+#endif
+
+/*
+ gcdGPU_TIMEOUT
+
+ This define specified the number of milliseconds the system will wait before
+ it broadcasts the GPU is stuck. In other words, it will define the timeout
+ of any operation that needs to wait for the GPU.
+
+ If the value is 0, no timeout will be checked for.
+*/
+#if !defined(gcdGPU_TIMEOUT)
+# define gcdGPU_TIMEOUT 0
+#endif
+
+#endif /* __gc_hal_options_h_ */
+
diff --git a/src/include_v2/gc_hal_profiler.h b/src/include_v2/gc_hal_profiler.h
new file mode 100644
index 0000000..70d0c69
--- /dev/null
+++ b/src/include_v2/gc_hal_profiler.h
@@ -0,0 +1,817 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_profiler_h_
+#define __gc_hal_profiler_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define GLVERTEX_OBJECT 10
+#define GLVERTEX_OBJECT_BYTES 11
+
+#define GLINDEX_OBJECT 20
+#define GLINDEX_OBJECT_BYTES 21
+
+#define GLTEXTURE_OBJECT 30
+#define GLTEXTURE_OBJECT_BYTES 31
+
+#if VIVANTE_PROFILER
+#define gcmPROFILE_GC(Hal, Enum, Value) gcoPROFILER_Count(Hal, Enum, Value)
+#else
+#define gcmPROFILE_GC(Hal, Enum, Value) do { } while (gcvFALSE)
+#endif
+
+#ifndef gcdNEW_PROFILER_FILE
+#define gcdNEW_PROFILER_FILE 1
+#endif
+
+#ifdef gcdNEW_PROFILER_FILE
+
+/* Category Constants. */
+#define VPHEADER 0x010000
+#define VPG_INFO 0x020000
+#define VPG_TIME 0x030000
+#define VPG_MEM 0x040000
+#define VPG_ES11 0x050000
+#define VPG_ES20 0x060000
+#define VPG_VG11 0x070000
+#define VPG_HAL 0x080000
+#define VPG_HW 0x090000
+#define VPG_GPU 0x0a0000
+#define VPG_VS 0x0b0000
+#define VPG_PS 0x0c0000
+#define VPG_PA 0x0d0000
+#define VPG_SETUP 0x0e0000
+#define VPG_RA 0x0f0000
+#define VPG_TX 0x100000
+#define VPG_PE 0x110000
+#define VPG_MC 0x120000
+#define VPG_AXI 0x130000
+#define VPG_PROG 0x140000
+#define VPG_PVS 0x150000
+#define VPG_PPS 0x160000
+#define VPG_FRAME 0x170000
+#define VPG_END 0xff0000
+
+/* Info. */
+#define VPC_INFOCOMPANY (VPG_INFO + 1)
+#define VPC_INFOVERSION (VPG_INFO + 2)
+#define VPC_INFORENDERER (VPG_INFO + 3)
+#define VPC_INFOREVISION (VPG_INFO + 4)
+#define VPC_INFODRIVER (VPG_INFO + 5)
+
+/* Counter Constants. */
+#define VPC_ELAPSETIME 0x030001
+#define VPC_CPUTIME 0x030002
+
+#define VPC_MEMMAXRES 0x040001
+#define VPC_MEMSHARED 0x040002
+#define VPC_MEMUNSHAREDDATA 0x040003
+#define VPC_MEMUNSHAREDSTACK 0x040004
+
+/* OpenGL ES11 Counters. */
+#define VPC_ES11ACTIVETEXTURE (VPG_ES11 + 1)
+#define VPC_ES11ALPHAFUNC (VPG_ES11 + 2)
+#define VPC_ES11ALPHAFUNCX (VPG_ES11 + 3)
+#define VPC_ES11BINDBUFFER (VPG_ES11 + 4)
+#define VPC_ES11BINDTEXTURE (VPG_ES11 + 5)
+#define VPC_ES11BLENDFUNC (VPG_ES11 + 6)
+#define VPC_ES11BUFFERDATA (VPG_ES11 + 7)
+#define VPC_ES11BUFFERSUBDATA (VPG_ES11 + 8)
+#define VPC_ES11CLEAR (VPG_ES11 + 9)
+#define VPC_ES11CLEARCOLOR (VPG_ES11 + 10)
+#define VPC_ES11CLEARCOLORX (VPG_ES11 + 11)
+#define VPC_ES11CLEARDEPTHF (VPG_ES11 + 12)
+#define VPC_ES11CLEARDEPTHX (VPG_ES11 + 13)
+#define VPC_ES11CLEARSTENCIL (VPG_ES11 + 14)
+#define VPC_ES11CLIENTACTIVETEXTURE (VPG_ES11 + 15)
+#define VPC_ES11CLIPPLANEF (VPG_ES11 + 16)
+#define VPC_ES11CLIPPLANEX (VPG_ES11 + 17)
+#define VPC_ES11COLOR4F (VPG_ES11 + 18)
+#define VPC_ES11COLOR4UB (VPG_ES11 + 19)
+#define VPC_ES11COLOR4X (VPG_ES11 + 20)
+#define VPC_ES11COLORMASK (VPG_ES11 + 21)
+#define VPC_ES11COLORPOINTER (VPG_ES11 + 22)
+#define VPC_ES11COMPRESSEDTEXIMAGE2D (VPG_ES11 + 23)
+#define VPC_ES11COMPRESSEDTEXSUBIMAGE2D (VPG_ES11 + 24)
+#define VPC_ES11COPYTEXIMAGE2D (VPG_ES11 + 25)
+#define VPC_ES11COPYTEXSUBIMAGE2D (VPG_ES11 + 26)
+#define VPC_ES11CULLFACE (VPG_ES11 + 27)
+#define VPC_ES11DELETEBUFFERS (VPG_ES11 + 28)
+#define VPC_ES11DELETETEXTURES (VPG_ES11 + 29)
+#define VPC_ES11DEPTHFUNC (VPG_ES11 + 30)
+#define VPC_ES11DEPTHMASK (VPG_ES11 + 31)
+#define VPC_ES11DEPTHRANGEF (VPG_ES11 + 32)
+#define VPC_ES11DEPTHRANGEX (VPG_ES11 + 33)
+#define VPC_ES11DISABLE (VPG_ES11 + 34)
+#define VPC_ES11DISABLECLIENTSTATE (VPG_ES11 + 35)
+#define VPC_ES11DRAWARRAYS (VPG_ES11 + 36)
+#define VPC_ES11DRAWELEMENTS (VPG_ES11 + 37)
+#define VPC_ES11ENABLE (VPG_ES11 + 38)
+#define VPC_ES11ENABLECLIENTSTATE (VPG_ES11 + 39)
+#define VPC_ES11FINISH (VPG_ES11 + 40)
+#define VPC_ES11FLUSH (VPG_ES11 + 41)
+#define VPC_ES11FOGF (VPG_ES11 + 42)
+#define VPC_ES11FOGFV (VPG_ES11 + 43)
+#define VPC_ES11FOGX (VPG_ES11 + 44)
+#define VPC_ES11FOGXV (VPG_ES11 + 45)
+#define VPC_ES11FRONTFACE (VPG_ES11 + 46)
+#define VPC_ES11FRUSTUMF (VPG_ES11 + 47)
+#define VPC_ES11FRUSTUMX (VPG_ES11 + 48)
+#define VPC_ES11GENBUFFERS (VPG_ES11 + 49)
+#define VPC_ES11GENTEXTURES (VPG_ES11 + 50)
+#define VPC_ES11GETBOOLEANV (VPG_ES11 + 51)
+#define VPC_ES11GETBUFFERPARAMETERIV (VPG_ES11 + 52)
+#define VPC_ES11GETCLIPPLANEF (VPG_ES11 + 53)
+#define VPC_ES11GETCLIPPLANEX (VPG_ES11 + 54)
+#define VPC_ES11GETERROR (VPG_ES11 + 55)
+#define VPC_ES11GETFIXEDV (VPG_ES11 + 56)
+#define VPC_ES11GETFLOATV (VPG_ES11 + 57)
+#define VPC_ES11GETINTEGERV (VPG_ES11 + 58)
+#define VPC_ES11GETLIGHTFV (VPG_ES11 + 59)
+#define VPC_ES11GETLIGHTXV (VPG_ES11 + 60)
+#define VPC_ES11GETMATERIALFV (VPG_ES11 + 61)
+#define VPC_ES11GETMATERIALXV (VPG_ES11 + 62)
+#define VPC_ES11GETPOINTERV (VPG_ES11 + 63)
+#define VPC_ES11GETSTRING (VPG_ES11 + 64)
+#define VPC_ES11GETTEXENVFV (VPG_ES11 + 65)
+#define VPC_ES11GETTEXENVIV (VPG_ES11 + 66)
+#define VPC_ES11GETTEXENVXV (VPG_ES11 + 67)
+#define VPC_ES11GETTEXPARAMETERFV (VPG_ES11 + 68)
+#define VPC_ES11GETTEXPARAMETERIV (VPG_ES11 + 69)
+#define VPC_ES11GETTEXPARAMETERXV (VPG_ES11 + 70)
+#define VPC_ES11HINT (VPG_ES11 + 71)
+#define VPC_ES11ISBUFFER (VPG_ES11 + 72)
+#define VPC_ES11ISENABLED (VPG_ES11 + 73)
+#define VPC_ES11ISTEXTURE (VPG_ES11 + 74)
+#define VPC_ES11LIGHTF (VPG_ES11 + 75)
+#define VPC_ES11LIGHTFV (VPG_ES11 + 76)
+#define VPC_ES11LIGHTMODELF (VPG_ES11 + 77)
+#define VPC_ES11LIGHTMODELFV (VPG_ES11 + 78)
+#define VPC_ES11LIGHTMODELX (VPG_ES11 + 79)
+#define VPC_ES11LIGHTMODELXV (VPG_ES11 + 80)
+#define VPC_ES11LIGHTX (VPG_ES11 + 81)
+#define VPC_ES11LIGHTXV (VPG_ES11 + 82)
+#define VPC_ES11LINEWIDTH (VPG_ES11 + 83)
+#define VPC_ES11LINEWIDTHX (VPG_ES11 + 84)
+#define VPC_ES11LOADIDENTITY (VPG_ES11 + 85)
+#define VPC_ES11LOADMATRIXF (VPG_ES11 + 86)
+#define VPC_ES11LOADMATRIXX (VPG_ES11 + 87)
+#define VPC_ES11LOGICOP (VPG_ES11 + 88)
+#define VPC_ES11MATERIALF (VPG_ES11 + 89)
+#define VPC_ES11MATERIALFV (VPG_ES11 + 90)
+#define VPC_ES11MATERIALX (VPG_ES11 + 91)
+#define VPC_ES11MATERIALXV (VPG_ES11 + 92)
+#define VPC_ES11MATRIXMODE (VPG_ES11 + 93)
+#define VPC_ES11MULTITEXCOORD4F (VPG_ES11 + 94)
+#define VPC_ES11MULTITEXCOORD4X (VPG_ES11 + 95)
+#define VPC_ES11MULTMATRIXF (VPG_ES11 + 96)
+#define VPC_ES11MULTMATRIXX (VPG_ES11 + 97)
+#define VPC_ES11NORMAL3F (VPG_ES11 + 98)
+#define VPC_ES11NORMAL3X (VPG_ES11 + 99)
+#define VPC_ES11NORMALPOINTER (VPG_ES11 + 100)
+#define VPC_ES11ORTHOF (VPG_ES11 + 101)
+#define VPC_ES11ORTHOX (VPG_ES11 + 102)
+#define VPC_ES11PIXELSTOREI (VPG_ES11 + 103)
+#define VPC_ES11POINTPARAMETERF (VPG_ES11 + 104)
+#define VPC_ES11POINTPARAMETERFV (VPG_ES11 + 105)
+#define VPC_ES11POINTPARAMETERX (VPG_ES11 + 106)
+#define VPC_ES11POINTPARAMETERXV (VPG_ES11 + 107)
+#define VPC_ES11POINTSIZE (VPG_ES11 + 108)
+#define VPC_ES11POINTSIZEX (VPG_ES11 + 109)
+#define VPC_ES11POLYGONOFFSET (VPG_ES11 + 110)
+#define VPC_ES11POLYGONOFFSETX (VPG_ES11 + 111)
+#define VPC_ES11POPMATRIX (VPG_ES11 + 112)
+#define VPC_ES11PUSHMATRIX (VPG_ES11 + 113)
+#define VPC_ES11READPIXELS (VPG_ES11 + 114)
+#define VPC_ES11ROTATEF (VPG_ES11 + 115)
+#define VPC_ES11ROTATEX (VPG_ES11 + 116)
+#define VPC_ES11SAMPLECOVERAGE (VPG_ES11 + 117)
+#define VPC_ES11SAMPLECOVERAGEX (VPG_ES11 + 118)
+#define VPC_ES11SCALEF (VPG_ES11 + 119)
+#define VPC_ES11SCALEX (VPG_ES11 + 120)
+#define VPC_ES11SCISSOR (VPG_ES11 + 121)
+#define VPC_ES11SHADEMODEL (VPG_ES11 + 122)
+#define VPC_ES11STENCILFUNC (VPG_ES11 + 123)
+#define VPC_ES11STENCILMASK (VPG_ES11 + 124)
+#define VPC_ES11STENCILOP (VPG_ES11 + 125)
+#define VPC_ES11TEXCOORDPOINTER (VPG_ES11 + 126)
+#define VPC_ES11TEXENVF (VPG_ES11 + 127)
+#define VPC_ES11TEXENVFV (VPG_ES11 + 128)
+#define VPC_ES11TEXENVI (VPG_ES11 + 129)
+#define VPC_ES11TEXENVIV (VPG_ES11 + 130)
+#define VPC_ES11TEXENVX (VPG_ES11 + 131)
+#define VPC_ES11TEXENVXV (VPG_ES11 + 132)
+#define VPC_ES11TEXIMAGE2D (VPG_ES11 + 133)
+#define VPC_ES11TEXPARAMETERF (VPG_ES11 + 134)
+#define VPC_ES11TEXPARAMETERFV (VPG_ES11 + 135)
+#define VPC_ES11TEXPARAMETERI (VPG_ES11 + 136)
+#define VPC_ES11TEXPARAMETERIV (VPG_ES11 + 137)
+#define VPC_ES11TEXPARAMETERX (VPG_ES11 + 138)
+#define VPC_ES11TEXPARAMETERXV (VPG_ES11 + 139)
+#define VPC_ES11TEXSUBIMAGE2D (VPG_ES11 + 140)
+#define VPC_ES11TRANSLATEF (VPG_ES11 + 141)
+#define VPC_ES11TRANSLATEX (VPG_ES11 + 142)
+#define VPC_ES11VERTEXPOINTER (VPG_ES11 + 143)
+#define VPC_ES11VIEWPORT (VPG_ES11 + 144)
+#define VPC_ES11CALLS (VPG_ES11 + 145)
+#define VPC_ES11DRAWCALLS (VPG_ES11 + 146)
+#define VPC_ES11STATECHANGECALLS (VPG_ES11 + 147)
+#define VPC_ES11POINTCOUNT (VPG_ES11 + 148)
+#define VPC_ES11LINECOUNT (VPG_ES11 + 149)
+#define VPC_ES11TRIANGLECOUNT (VPG_ES11 + 150)
+
+/* OpenGLES 2.x */
+#define VPC_ES20ACTIVETEXTURE (VPG_ES20 + 1)
+#define VPC_ES20ATTACHSHADER (VPG_ES20 + 2)
+#define VPC_ES20BINDATTRIBLOCATION (VPG_ES20 + 3)
+#define VPC_ES20BINDBUFFER (VPG_ES20 + 4)
+#define VPC_ES20BINDFRAMEBUFFER (VPG_ES20 + 5)
+#define VPC_ES20BINDRENDERBUFFER (VPG_ES20 + 6)
+#define VPC_ES20BINDTEXTURE (VPG_ES20 + 7)
+#define VPC_ES20BLENDCOLOR (VPG_ES20 + 8)
+#define VPC_ES20BLENDEQUATION (VPG_ES20 + 9)
+#define VPC_ES20BLENDEQUATIONSEPARATE (VPG_ES20 + 10)
+#define VPC_ES20BLENDFUNC (VPG_ES20 + 11)
+#define VPC_ES20BLENDFUNCSEPARATE (VPG_ES20 + 12)
+#define VPC_ES20BUFFERDATA (VPG_ES20 + 13)
+#define VPC_ES20BUFFERSUBDATA (VPG_ES20 + 14)
+#define VPC_ES20CHECKFRAMEBUFFERSTATUS (VPG_ES20 + 15)
+#define VPC_ES20CLEAR (VPG_ES20 + 16)
+#define VPC_ES20CLEARCOLOR (VPG_ES20 + 17)
+#define VPC_ES20CLEARDEPTHF (VPG_ES20 + 18)
+#define VPC_ES20CLEARSTENCIL (VPG_ES20 + 19)
+#define VPC_ES20COLORMASK (VPG_ES20 + 20)
+#define VPC_ES20COMPILESHADER (VPG_ES20 + 21)
+#define VPC_ES20COMPRESSEDTEXIMAGE2D (VPG_ES20 + 22)
+#define VPC_ES20COMPRESSEDTEXSUBIMAGE2D (VPG_ES20 + 23)
+#define VPC_ES20COPYTEXIMAGE2D (VPG_ES20 + 24)
+#define VPC_ES20COPYTEXSUBIMAGE2D (VPG_ES20 + 25)
+#define VPC_ES20CREATEPROGRAM (VPG_ES20 + 26)
+#define VPC_ES20CREATESHADER (VPG_ES20 + 27)
+#define VPC_ES20CULLFACE (VPG_ES20 + 28)
+#define VPC_ES20DELETEBUFFERS (VPG_ES20 + 29)
+#define VPC_ES20DELETEFRAMEBUFFERS (VPG_ES20 + 30)
+#define VPC_ES20DELETEPROGRAM (VPG_ES20 + 31)
+#define VPC_ES20DELETERENDERBUFFERS (VPG_ES20 + 32)
+#define VPC_ES20DELETESHADER (VPG_ES20 + 33)
+#define VPC_ES20DELETETEXTURES (VPG_ES20 + 34)
+#define VPC_ES20DEPTHFUNC (VPG_ES20 + 35)
+#define VPC_ES20DEPTHMASK (VPG_ES20 + 36)
+#define VPC_ES20DEPTHRANGEF (VPG_ES20 + 37)
+#define VPC_ES20DETACHSHADER (VPG_ES20 + 38)
+#define VPC_ES20DISABLE (VPG_ES20 + 39)
+#define VPC_ES20DISABLEVERTEXATTRIBARRAY (VPG_ES20 + 40)
+#define VPC_ES20DRAWARRAYS (VPG_ES20 + 41)
+#define VPC_ES20DRAWELEMENTS (VPG_ES20 + 42)
+#define VPC_ES20ENABLE (VPG_ES20 + 43)
+#define VPC_ES20ENABLEVERTEXATTRIBARRAY (VPG_ES20 + 44)
+#define VPC_ES20FINISH (VPG_ES20 + 45)
+#define VPC_ES20FLUSH (VPG_ES20 + 46)
+#define VPC_ES20FRAMEBUFFERRENDERBUFFER (VPG_ES20 + 47)
+#define VPC_ES20FRAMEBUFFERTEXTURE2D (VPG_ES20 + 48)
+#define VPC_ES20FRONTFACE (VPG_ES20 + 49)
+#define VPC_ES20GENBUFFERS (VPG_ES20 + 50)
+#define VPC_ES20GENERATEMIPMAP (VPG_ES20 + 51)
+#define VPC_ES20GENFRAMEBUFFERS (VPG_ES20 + 52)
+#define VPC_ES20GENRENDERBUFFERS (VPG_ES20 + 53)
+#define VPC_ES20GENTEXTURES (VPG_ES20 + 54)
+#define VPC_ES20GETACTIVEATTRIB (VPG_ES20 + 55)
+#define VPC_ES20GETACTIVEUNIFORM (VPG_ES20 + 56)
+#define VPC_ES20GETATTACHEDSHADERS (VPG_ES20 + 57)
+#define VPC_ES20GETATTRIBLOCATION (VPG_ES20 + 58)
+#define VPC_ES20GETBOOLEANV (VPG_ES20 + 59)
+#define VPC_ES20GETBUFFERPARAMETERIV (VPG_ES20 + 60)
+#define VPC_ES20GETERROR (VPG_ES20 + 61)
+#define VPC_ES20GETFLOATV (VPG_ES20 + 62)
+#define VPC_ES20GETFRAMEBUFFERATTACHMENTPARAMETERIV (VPG_ES20 + 63)
+#define VPC_ES20GETINTEGERV (VPG_ES20 + 64)
+#define VPC_ES20GETPROGRAMIV (VPG_ES20 + 65)
+#define VPC_ES20GETPROGRAMINFOLOG (VPG_ES20 + 66)
+#define VPC_ES20GETRENDERBUFFERPARAMETERIV (VPG_ES20 + 67)
+#define VPC_ES20GETSHADERIV (VPG_ES20 + 68)
+#define VPC_ES20GETSHADERINFOLOG (VPG_ES20 + 69)
+#define VPC_ES20GETSHADERPRECISIONFORMAT (VPG_ES20 + 70)
+#define VPC_ES20GETSHADERSOURCE (VPG_ES20 + 71)
+#define VPC_ES20GETSTRING (VPG_ES20 + 72)
+#define VPC_ES20GETTEXPARAMETERFV (VPG_ES20 + 73)
+#define VPC_ES20GETTEXPARAMETERIV (VPG_ES20 + 74)
+#define VPC_ES20GETUNIFORMFV (VPG_ES20 + 75)
+#define VPC_ES20GETUNIFORMIV (VPG_ES20 + 76)
+#define VPC_ES20GETUNIFORMLOCATION (VPG_ES20 + 77)
+#define VPC_ES20GETVERTEXATTRIBFV (VPG_ES20 + 78)
+#define VPC_ES20GETVERTEXATTRIBIV (VPG_ES20 + 79)
+#define VPC_ES20GETVERTEXATTRIBPOINTERV (VPG_ES20 + 80)
+#define VPC_ES20HINT (VPG_ES20 + 81)
+#define VPC_ES20ISBUFFER (VPG_ES20 + 82)
+#define VPC_ES20ISENABLED (VPG_ES20 + 83)
+#define VPC_ES20ISFRAMEBUFFER (VPG_ES20 + 84)
+#define VPC_ES20ISPROGRAM (VPG_ES20 + 85)
+#define VPC_ES20ISRENDERBUFFER (VPG_ES20 + 86)
+#define VPC_ES20ISSHADER (VPG_ES20 + 87)
+#define VPC_ES20ISTEXTURE (VPG_ES20 + 88)
+#define VPC_ES20LINEWIDTH (VPG_ES20 + 89)
+#define VPC_ES20LINKPROGRAM (VPG_ES20 + 90)
+#define VPC_ES20PIXELSTOREI (VPG_ES20 + 91)
+#define VPC_ES20POLYGONOFFSET (VPG_ES20 + 92)
+#define VPC_ES20READPIXELS (VPG_ES20 + 93)
+#define VPC_ES20RELEASESHADERCOMPILER (VPG_ES20 + 94)
+#define VPC_ES20RENDERBUFFERSTORAGE (VPG_ES20 + 95)
+#define VPC_ES20SAMPLECOVERAGE (VPG_ES20 + 96)
+#define VPC_ES20SCISSOR (VPG_ES20 + 97)
+#define VPC_ES20SHADERBINARY (VPG_ES20 + 98)
+#define VPC_ES20SHADERSOURCE (VPG_ES20 + 99)
+#define VPC_ES20STENCILFUNC (VPG_ES20 + 100)
+#define VPC_ES20STENCILFUNCSEPARATE (VPG_ES20 + 101)
+#define VPC_ES20STENCILMASK (VPG_ES20 + 102)
+#define VPC_ES20STENCILMASKSEPARATE (VPG_ES20 + 103)
+#define VPC_ES20STENCILOP (VPG_ES20 + 104)
+#define VPC_ES20STENCILOPSEPARATE (VPG_ES20 + 105)
+#define VPC_ES20TEXIMAGE2D (VPG_ES20 + 106)
+#define VPC_ES20TEXPARAMETERF (VPG_ES20 + 107)
+#define VPC_ES20TEXPARAMETERFV (VPG_ES20 + 108)
+#define VPC_ES20TEXPARAMETERI (VPG_ES20 + 109)
+#define VPC_ES20TEXPARAMETERIV (VPG_ES20 + 110)
+#define VPC_ES20TEXSUBIMAGE2D (VPG_ES20 + 111)
+#define VPC_ES20UNIFORM1F (VPG_ES20 + 112)
+#define VPC_ES20UNIFORM1FV (VPG_ES20 + 113)
+#define VPC_ES20UNIFORM1I (VPG_ES20 + 114)
+#define VPC_ES20UNIFORM1IV (VPG_ES20 + 115)
+#define VPC_ES20UNIFORM2F (VPG_ES20 + 116)
+#define VPC_ES20UNIFORM2FV (VPG_ES20 + 117)
+#define VPC_ES20UNIFORM2I (VPG_ES20 + 118)
+#define VPC_ES20UNIFORM2IV (VPG_ES20 + 119)
+#define VPC_ES20UNIFORM3F (VPG_ES20 + 120)
+#define VPC_ES20UNIFORM3FV (VPG_ES20 + 121)
+#define VPC_ES20UNIFORM3I (VPG_ES20 + 122)
+#define VPC_ES20UNIFORM3IV (VPG_ES20 + 123)
+#define VPC_ES20UNIFORM4F (VPG_ES20 + 124)
+#define VPC_ES20UNIFORM4FV (VPG_ES20 + 125)
+#define VPC_ES20UNIFORM4I (VPG_ES20 + 126)
+#define VPC_ES20UNIFORM4IV (VPG_ES20 + 127)
+#define VPC_ES20UNIFORMMATRIX2FV (VPG_ES20 + 128)
+#define VPC_ES20UNIFORMMATRIX3FV (VPG_ES20 + 129)
+#define VPC_ES20UNIFORMMATRIX4FV (VPG_ES20 + 130)
+#define VPC_ES20USEPROGRAM (VPG_ES20 + 131)
+#define VPC_ES20VALIDATEPROGRAM (VPG_ES20 + 132)
+#define VPC_ES20VERTEXATTRIB1F (VPG_ES20 + 133)
+#define VPC_ES20VERTEXATTRIB1FV (VPG_ES20 + 134)
+#define VPC_ES20VERTEXATTRIB2F (VPG_ES20 + 135)
+#define VPC_ES20VERTEXATTRIB2FV (VPG_ES20 + 136)
+#define VPC_ES20VERTEXATTRIB3F (VPG_ES20 + 137)
+#define VPC_ES20VERTEXATTRIB3FV (VPG_ES20 + 138)
+#define VPC_ES20VERTEXATTRIB4F (VPG_ES20 + 139)
+#define VPC_ES20VERTEXATTRIB4FV (VPG_ES20 + 140)
+#define VPC_ES20VERTEXATTRIBPOINTER (VPG_ES20 + 141)
+#define VPC_ES20VIEWPORT (VPG_ES20 + 142)
+#define VPC_ES20CALLS (VPG_ES20 + 143)
+#define VPC_ES20DRAWCALLS (VPG_ES20 + 144)
+#define VPC_ES20STATECHANGECALLS (VPG_ES20 + 145)
+#define VPC_ES20POINTCOUNT (VPG_ES20 + 146)
+#define VPC_ES20LINECOUNT (VPG_ES20 + 147)
+#define VPC_ES20TRIANGLECOUNT (VPG_ES20 + 148)
+
+/* VG11 Counters. */
+#define VPC_VG11APPENDPATH (VPG_VG11 + 1)
+#define VPC_VG11APPENDPATHDATA (VPG_VG11 + 2)
+#define VPC_VG11CHILDIMAGE (VPG_VG11 + 3)
+#define VPC_VG11CLEAR (VPG_VG11 + 4)
+#define VPC_VG11CLEARGLYPH (VPG_VG11 + 5)
+#define VPC_VG11CLEARIMAGE (VPG_VG11 + 6)
+#define VPC_VG11CLEARPATH (VPG_VG11 + 7)
+#define VPC_VG11COLORMATRIX (VPG_VG11 + 8)
+#define VPC_VG11CONVOLVE (VPG_VG11 + 9)
+#define VPC_VG11COPYIMAGE (VPG_VG11 + 10)
+#define VPC_VG11COPYMASK (VPG_VG11 + 11)
+#define VPC_VG11COPYPIXELS (VPG_VG11 + 12)
+#define VPC_VG11CREATEFONT (VPG_VG11 + 13)
+#define VPC_VG11CREATEIMAGE (VPG_VG11 + 14)
+#define VPC_VG11CREATEMASKLAYER (VPG_VG11 + 15)
+#define VPC_VG11CREATEPAINT (VPG_VG11 + 16)
+#define VPC_VG11CREATEPATH (VPG_VG11 + 17)
+#define VPC_VG11DESTROYFONT (VPG_VG11 + 18)
+#define VPC_VG11DESTROYIMAGE (VPG_VG11 + 19)
+#define VPC_VG11DESTROYMASKLAYER (VPG_VG11 + 20)
+#define VPC_VG11DESTROYPAINT (VPG_VG11 + 21)
+#define VPC_VG11DESTROYPATH (VPG_VG11 + 22)
+#define VPC_VG11DRAWGLYPH (VPG_VG11 + 23)
+#define VPC_VG11DRAWGLYPHS (VPG_VG11 + 24)
+#define VPC_VG11DRAWIMAGE (VPG_VG11 + 25)
+#define VPC_VG11DRAWPATH (VPG_VG11 + 26)
+#define VPC_VG11FILLMASKLAYER (VPG_VG11 + 27)
+#define VPC_VG11FINISH (VPG_VG11 + 28)
+#define VPC_VG11FLUSH (VPG_VG11 + 29)
+#define VPC_VG11GAUSSIANBLUR (VPG_VG11 + 30)
+#define VPC_VG11GETCOLOR (VPG_VG11 + 31)
+#define VPC_VG11GETERROR (VPG_VG11 + 32)
+#define VPC_VG11GETF (VPG_VG11 + 33)
+#define VPC_VG11GETFV (VPG_VG11 + 34)
+#define VPC_VG11GETI (VPG_VG11 + 35)
+#define VPC_VG11GETIMAGESUBDATA (VPG_VG11 + 36)
+#define VPC_VG11GETIV (VPG_VG11 + 37)
+#define VPC_VG11GETMATRIX (VPG_VG11 + 38)
+#define VPC_VG11GETPAINT (VPG_VG11 + 39)
+#define VPC_VG11GETPARAMETERF (VPG_VG11 + 40)
+#define VPC_VG11GETPARAMETERFV (VPG_VG11 + 41)
+#define VPC_VG11GETPARAMETERI (VPG_VG11 + 42)
+#define VPC_VG11GETPARAMETERIV (VPG_VG11 + 43)
+#define VPC_VG11GETPARAMETERVECTORSIZE (VPG_VG11 + 44)
+#define VPC_VG11GETPARENT (VPG_VG11 + 45)
+#define VPC_VG11GETPATHCAPABILITIES (VPG_VG11 + 46)
+#define VPC_VG11GETPIXELS (VPG_VG11 + 47)
+#define VPC_VG11GETSTRING (VPG_VG11 + 48)
+#define VPC_VG11GETVECTORSIZE (VPG_VG11 + 49)
+#define VPC_VG11HARDWAREQUERY (VPG_VG11 + 50)
+#define VPC_VG11IMAGESUBDATA (VPG_VG11 + 51)
+#define VPC_VG11INTERPOLATEPATH (VPG_VG11 + 52)
+#define VPC_VG11LOADIDENTITY (VPG_VG11 + 53)
+#define VPC_VG11LOADMATRIX (VPG_VG11 + 54)
+#define VPC_VG11LOOKUP (VPG_VG11 + 55)
+#define VPC_VG11LOOKUPSINGLE (VPG_VG11 + 56)
+#define VPC_VG11MASK (VPG_VG11 + 57)
+#define VPC_VG11MODIFYPATHCOORDS (VPG_VG11 + 58)
+#define VPC_VG11MULTMATRIX (VPG_VG11 + 59)
+#define VPC_VG11PAINTPATTERN (VPG_VG11 + 60)
+#define VPC_VG11PATHBOUNDS (VPG_VG11 + 61)
+#define VPC_VG11PATHLENGTH (VPG_VG11 + 62)
+#define VPC_VG11PATHTRANSFORMEDBOUNDS (VPG_VG11 + 63)
+#define VPC_VG11POINTALONGPATH (VPG_VG11 + 64)
+#define VPC_VG11READPIXELS (VPG_VG11 + 65)
+#define VPC_VG11REMOVEPATHCAPABILITIES (VPG_VG11 + 66)
+#define VPC_VG11RENDERTOMASK (VPG_VG11 + 67)
+#define VPC_VG11ROTATE (VPG_VG11 + 68)
+#define VPC_VG11SCALE (VPG_VG11 + 69)
+#define VPC_VG11SEPARABLECONVOLVE (VPG_VG11 + 70)
+#define VPC_VG11SETCOLOR (VPG_VG11 + 71)
+#define VPC_VG11SETF (VPG_VG11 + 72)
+#define VPC_VG11SETFV (VPG_VG11 + 73)
+#define VPC_VG11SETGLYPHTOIMAGE (VPG_VG11 + 74)
+#define VPC_VG11SETGLYPHTOPATH (VPG_VG11 + 75)
+#define VPC_VG11SETI (VPG_VG11 + 76)
+#define VPC_VG11SETIV (VPG_VG11 + 77)
+#define VPC_VG11SETPAINT (VPG_VG11 + 78)
+#define VPC_VG11SETPARAMETERF (VPG_VG11 + 79)
+#define VPC_VG11SETPARAMETERFV (VPG_VG11 + 80)
+#define VPC_VG11SETPARAMETERI (VPG_VG11 + 81)
+#define VPC_VG11SETPARAMETERIV (VPG_VG11 + 82)
+#define VPC_VG11SETPIXELS (VPG_VG11 + 83)
+#define VPC_VG11SHEAR (VPG_VG11 + 84)
+#define VPC_VG11TRANSFORMPATH (VPG_VG11 + 85)
+#define VPC_VG11TRANSLATE (VPG_VG11 + 86)
+#define VPC_VG11WRITEPIXELS (VPG_VG11 + 87)
+#define VPC_VG11CALLS (VPG_VG11 + 88)
+#define VPC_VG11DRAWCALLS (VPG_VG11 + 89)
+#define VPC_VG11STATECHANGECALLS (VPG_VG11 + 90)
+#define VPC_VG11FILLCOUNT (VPG_VG11 + 91)
+#define VPC_VG11STROKECOUNT (VPG_VG11 + 92)
+
+/* HAL Counters. */
+#define VPC_HALVERTBUFNEWBYTEALLOC (VPG_HAL + 1)
+#define VPC_HALVERTBUFTOTALBYTEALLOC (VPG_HAL + 2)
+#define VPC_HALVERTBUFNEWOBJALLOC (VPG_HAL + 3)
+#define VPC_HALVERTBUFTOTALOBJALLOC (VPG_HAL + 4)
+#define VPC_HALINDBUFNEWBYTEALLOC (VPG_HAL + 5)
+#define VPC_HALINDBUFTOTALBYTEALLOC (VPG_HAL + 6)
+#define VPC_HALINDBUFNEWOBJALLOC (VPG_HAL + 7)
+#define VPC_HALINDBUFTOTALOBJALLOC (VPG_HAL + 8)
+#define VPC_HALTEXBUFNEWBYTEALLOC (VPG_HAL + 9)
+#define VPC_HALTEXBUFTOTALBYTEALLOC (VPG_HAL + 10)
+#define VPC_HALTEXBUFNEWOBJALLOC (VPG_HAL + 11)
+#define VPC_HALTEXBUFTOTALOBJALLOC (VPG_HAL + 12)
+
+#define VPC_VG11TRANSLATE (VPG_VG11 + 86)
+#define VPC_VG11WRITEPIXELS (VPG_VG11 + 87)
+#define VPC_VG11CALLS (VPG_VG11 + 88)
+#define VPC_VG11DRAWCALLS (VPG_VG11 + 89)
+#define VPC_VG11STATECHANGECALLS (VPG_VG11 + 90)
+#define VPC_VG11FILLCOUNT (VPG_VG11 + 91)
+#define VPC_VG11STROKECOUNT (VPG_VG11 + 92)
+
+/* HAL Counters. */
+#define VPC_HALVERTBUFNEWBYTEALLOC (VPG_HAL + 1)
+#define VPC_HALVERTBUFTOTALBYTEALLOC (VPG_HAL + 2)
+#define VPC_HALVERTBUFNEWOBJALLOC (VPG_HAL + 3)
+#define VPC_HALVERTBUFTOTALOBJALLOC (VPG_HAL + 4)
+#define VPC_HALINDBUFNEWBYTEALLOC (VPG_HAL + 5)
+#define VPC_HALINDBUFTOTALBYTEALLOC (VPG_HAL + 6)
+#define VPC_HALINDBUFNEWOBJALLOC (VPG_HAL + 7)
+#define VPC_HALINDBUFTOTALOBJALLOC (VPG_HAL + 8)
+#define VPC_HALTEXBUFNEWBYTEALLOC (VPG_HAL + 9)
+#define VPC_HALTEXBUFTOTALBYTEALLOC (VPG_HAL + 10)
+#define VPC_HALTEXBUFNEWOBJALLOC (VPG_HAL + 11)
+#define VPC_HALTEXBUFTOTALOBJALLOC (VPG_HAL + 12)
+
+/* HW: GPU Counters. */
+#define VPC_GPUCYCLES (VPG_GPU + 1)
+#define VPC_GPUREAD64BYTE (VPG_GPU + 2)
+#define VPC_GPUWRITE64BYTE (VPG_GPU + 3)
+
+/* HW: Shader Counters. */
+#define VPC_VSINSTCOUNT (VPG_VS + 1)
+#define VPC_VSBRANCHINSTCOUNT (VPG_VS + 2)
+#define VPC_VSTEXLDINSTCOUNT (VPG_VS + 3)
+#define VPC_VSRENDEREDVERTCOUNT (VPG_VS + 4)
+/* HW: PS Count. */
+#define VPC_PSINSTCOUNT (VPG_PS + 1)
+#define VPC_PSBRANCHINSTCOUNT (VPG_PS + 2)
+#define VPC_PSTEXLDINSTCOUNT (VPG_PS + 3)
+#define VPC_PSRENDEREDPIXCOUNT (VPG_PS + 4)
+
+
+/* HW: PA Counters. */
+#define VPC_PAINVERTCOUNT (VPG_PA + 1)
+#define VPC_PAINPRIMCOUNT (VPG_PA + 2)
+#define VPC_PAOUTPRIMCOUNT (VPG_PA + 3)
+#define VPC_PADEPTHCLIPCOUNT (VPG_PA + 4)
+#define VPC_PATRIVIALREJCOUNT (VPG_PA + 5)
+#define VPC_PACULLCOUNT (VPG_PA + 6)
+
+/* HW: Setup Counters. */
+#define VPC_SETRIANGLECOUNT (VPG_SETUP + 1)
+#define VPC_SELINECOUNT (VPG_SETUP + 2)
+
+/* HW: RA Counters. */
+#define VPC_RAVALIDPIXCOUNT (VPG_RA + 1)
+#define VPC_RATOTALQUADCOUNT (VPG_RA + 2)
+#define VPC_RAVALIDQUADCOUNTEZ (VPG_RA + 3)
+#define VPC_RATOTALPRIMCOUNT (VPG_RA + 4)
+#define VPC_RAPIPECACHEMISSCOUNT (VPG_RA + 5)
+#define VPC_RAPREFCACHEMISSCOUNT (VPG_RA + 6)
+#define VPC_RAEEZCULLCOUNT (VPG_RA + 7)
+
+/* HW: TEX Counters. */
+#define VPC_TXTOTBILINEARREQ (VPG_TX + 1)
+#define VPC_TXTOTTRILINEARREQ (VPG_TX + 2)
+#define VPC_TXTOTDISCARDTEXREQ (VPG_TX + 3)
+#define VPC_TXTOTTEXREQ (VPG_TX + 4)
+#define VPC_TXMEMREADCOUNT (VPG_TX + 5)
+#define VPC_TXMEMREADIN8BCOUNT (VPG_TX + 6)
+#define VPC_TXCACHEMISSCOUNT (VPG_TX + 7)
+#define VPC_TXCACHEHITTEXELCOUNT (VPG_TX + 8)
+#define VPC_TXCACHEMISSTEXELCOUNT (VPG_TX + 9)
+
+/* HW: PE Counters. */
+#define VPC_PEKILLEDBYCOLOR (VPG_PE + 1)
+#define VPC_PEKILLEDBYDEPTH (VPG_PE + 2)
+#define VPC_PEDRAWNBYCOLOR (VPG_PE + 3)
+#define VPC_PEDRAWNBYDEPTH (VPG_PE + 4)
+
+/* HW: MC Counters. */
+#define VPC_MCREADREQ8BPIPE (VPG_MC + 1)
+#define VPC_MCREADREQ8BIP (VPG_MC + 2)
+#define VPC_MCWRITEREQ8BPIPE (VPG_MC + 3)
+
+/* HW: AXI Counters. */
+#define VPC_AXIREADREQSTALLED (VPG_AXI + 1)
+#define VPC_AXIWRITEREQSTALLED (VPG_AXI + 2)
+#define VPC_AXIWRITEDATASTALLED (VPG_AXI + 3)
+
+/* PROGRAM: Shader program counters. */
+#define VPC_PVSINSTRCOUNT (VPG_PVS + 1)
+#define VPC_PVSALUINSTRCOUNT (VPG_PVS + 2)
+#define VPC_PVSTEXINSTRCOUNT (VPG_PVS + 3)
+#define VPC_PVSATTRIBCOUNT (VPG_PVS + 4)
+#define VPC_PVSUNIFORMCOUNT (VPG_PVS + 5)
+#define VPC_PVSFUNCTIONCOUNT (VPG_PVS + 6)
+
+#define VPC_PPSINSTRCOUNT (VPG_PPS + 1)
+#define VPC_PPSALUINSTRCOUNT (VPG_PPS + 2)
+#define VPC_PPSTEXINSTRCOUNT (VPG_PPS + 3)
+#define VPC_PPSATTRIBCOUNT (VPG_PPS + 4)
+#define VPC_PPSUNIFORMCOUNT (VPG_PPS + 5)
+#define VPC_PPSFUNCTIONCOUNT (VPG_PPS + 6)
+
+#endif
+
+
+/* HW profile information. */
+typedef struct _gcsPROFILER_COUNTERS
+{
+ /* HW static counters. */
+ gctUINT32 gpuClock;
+ gctUINT32 axiClock;
+ gctUINT32 shaderClock;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuClockStart;
+ gctUINT32 gpuClockEnd;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuCyclesCounter;
+ gctUINT32 gpuTotalRead64BytesPerFrame;
+ gctUINT32 gpuTotalWrite64BytesPerFrame;
+
+ /* PE */
+ gctUINT32 pe_pixel_count_killed_by_color_pipe;
+ gctUINT32 pe_pixel_count_killed_by_depth_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_color_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_depth_pipe;
+
+ /* SH */
+ gctUINT32 ps_inst_counter;
+ gctUINT32 rendered_pixel_counter;
+ gctUINT32 vs_inst_counter;
+ gctUINT32 rendered_vertice_counter;
+ gctUINT32 vtx_branch_inst_counter;
+ gctUINT32 vtx_texld_inst_counter;
+ gctUINT32 pxl_branch_inst_counter;
+ gctUINT32 pxl_texld_inst_counter;
+
+ /* PA */
+ gctUINT32 pa_input_vtx_counter;
+ gctUINT32 pa_input_prim_counter;
+ gctUINT32 pa_output_prim_counter;
+ gctUINT32 pa_depth_clipped_counter;
+ gctUINT32 pa_trivial_rejected_counter;
+ gctUINT32 pa_culled_counter;
+
+ /* SE */
+ gctUINT32 se_culled_triangle_count;
+ gctUINT32 se_culled_lines_count;
+
+ /* RA */
+ gctUINT32 ra_valid_pixel_count;
+ gctUINT32 ra_total_quad_count;
+ gctUINT32 ra_valid_quad_count_after_early_z;
+ gctUINT32 ra_total_primitive_count;
+ gctUINT32 ra_pipe_cache_miss_counter;
+ gctUINT32 ra_prefetch_cache_miss_counter;
+ gctUINT32 ra_eez_culled_counter;
+
+ /* TX */
+ gctUINT32 tx_total_bilinear_requests;
+ gctUINT32 tx_total_trilinear_requests;
+ gctUINT32 tx_total_discarded_texture_requests;
+ gctUINT32 tx_total_texture_requests;
+ gctUINT32 tx_mem_read_count;
+ gctUINT32 tx_mem_read_in_8B_count;
+ gctUINT32 tx_cache_miss_count;
+ gctUINT32 tx_cache_hit_texel_count;
+ gctUINT32 tx_cache_miss_texel_count;
+
+ /* MC */
+ gctUINT32 mc_total_read_req_8B_from_pipeline;
+ gctUINT32 mc_total_read_req_8B_from_IP;
+ gctUINT32 mc_total_write_req_8B_from_pipeline;
+
+ /* HI */
+ gctUINT32 hi_axi_cycles_read_request_stalled;
+ gctUINT32 hi_axi_cycles_write_request_stalled;
+ gctUINT32 hi_axi_cycles_write_data_stalled;
+}
+gcsPROFILER_COUNTERS;
+
+/* HAL profile information. */
+typedef struct _gcsPROFILER
+{
+ gctUINT32 enable;
+ gctBOOL enableHal;
+ gctBOOL enableHW;
+ gctBOOL enableSH;
+
+ gctBOOL useSocket;
+ gctINT sockFd;
+
+ gctFILE file;
+
+ /* Aggregate Information */
+
+ /* Clock Info */
+ gctUINT64 frameStart;
+ gctUINT64 frameEnd;
+
+ /* Current frame information */
+ gctUINT32 frameNumber;
+ gctUINT64 frameStartTimeusec;
+ gctUINT64 frameEndTimeusec;
+ gctUINT64 frameStartCPUTimeusec;
+ gctUINT64 frameEndCPUTimeusec;
+
+/* #if PROFILE_HAL_COUNTERS */
+ gctUINT32 vertexBufferTotalBytesAlloc;
+ gctUINT32 vertexBufferNewBytesAlloc;
+ int vertexBufferTotalObjectsAlloc;
+ int vertexBufferNewObjectsAlloc;
+
+ gctUINT32 indexBufferTotalBytesAlloc;
+ gctUINT32 indexBufferNewBytesAlloc;
+ int indexBufferTotalObjectsAlloc;
+ int indexBufferNewObjectsAlloc;
+
+ gctUINT32 textureBufferTotalBytesAlloc;
+ gctUINT32 textureBufferNewBytesAlloc;
+ int textureBufferTotalObjectsAlloc;
+ int textureBufferNewObjectsAlloc;
+
+ gctUINT32 numCommits;
+ gctUINT32 drawPointCount;
+ gctUINT32 drawLineCount;
+ gctUINT32 drawTriangleCount;
+ gctUINT32 drawVertexCount;
+ gctUINT32 redundantStateChangeCalls;
+/* #endif */
+}
+gcsPROFILER;
+
+/* Memory profile information. */
+struct _gcsMemProfile
+{
+ /* Memory Usage */
+ gctUINT32 videoMemUsed;
+ gctUINT32 systemMemUsed;
+ gctUINT32 commitBufferSize;
+ gctUINT32 contextBufferCopyBytes;
+};
+
+/* Shader profile information. */
+struct _gcsSHADER_PROFILER
+{
+ gctUINT32 shaderLength;
+ gctUINT32 shaderALUCycles;
+ gctUINT32 shaderTexLoadCycles;
+ gctUINT32 shaderTempRegCount;
+ gctUINT32 shaderSamplerRegCount;
+ gctUINT32 shaderInputRegCount;
+ gctUINT32 shaderOutputRegCount;
+};
+
+/* Initialize the gcsProfiler. */
+gceSTATUS
+gcoPROFILER_Initialize(
+ IN gcoHAL Hal
+ );
+
+/* Destroy the gcProfiler. */
+gceSTATUS
+gcoPROFILER_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Write data to profiler. */
+gceSTATUS
+gcoPROFILER_Write(
+ IN gcoHAL Hal,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Flush data out. */
+gceSTATUS
+gcoPROFILER_Flush(
+ IN gcoHAL Hal
+ );
+
+/* Call to signal end of frame. */
+gceSTATUS
+gcoPROFILER_EndFrame(
+ IN gcoHAL Hal
+ );
+
+/* Increase profile counter Enum by Value. */
+gceSTATUS
+gcoPROFILER_Count(
+ IN gcoHAL Hal,
+ IN gctUINT32 Enum,
+ IN gctINT Value
+ );
+
+/* Profile input vertex shader. */
+gceSTATUS
+gcoPROFILER_ShaderVS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Vs
+ );
+
+/* Profile input fragment shader. */
+gceSTATUS
+gcoPROFILER_ShaderFS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Fs
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_profiler_h_ */
+
diff --git a/src/include_v2/gc_hal_raster.h b/src/include_v2/gc_hal_raster.h
new file mode 100644
index 0000000..4f1d374
--- /dev/null
+++ b/src/include_v2/gc_hal_raster.h
@@ -0,0 +1,842 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_raster_h_
+#define __gc_hal_raster_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoBRUSH * gcoBRUSH;
+typedef struct _gcoBRUSH_CACHE * gcoBRUSH_CACHE;
+
+/******************************************************************************\
+******************************** gcoBRUSH Object *******************************
+\******************************************************************************/
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructSingleColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructMonochrome(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Destroy an gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_Destroy(
+ IN gcoBRUSH Brush
+ );
+
+/******************************************************************************\
+******************************** gcoSURF Object *******************************
+\******************************************************************************/
+
+/* Set cipping rectangle. */
+gceSTATUS
+gcoSURF_SetClipping(
+ IN gcoSURF Surface
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gcoSURF_Clear2D(
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 LoColor,
+ IN gctUINT32 HiColor
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gcoSURF_Line(
+ IN gcoSURF Surface,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop
+ );
+
+/* Generic rectangular blit. */
+gceSTATUS
+gcoSURF_Blit(
+ IN OPTIONAL gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN OPTIONAL gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN OPTIONAL gceSURF_TRANSPARENCY Transparency,
+ IN OPTIONAL gctUINT32 TransparencyColor,
+ IN OPTIONAL gctPOINTER Mask,
+ IN OPTIONAL gceSURF_MONOPACK MaskPack
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gcoSURF_MonoBlit(
+ IN gcoSURF DestSurface,
+ IN gctPOINTER Source,
+ IN gceSURF_MONOPACK SourcePack,
+ IN gcsPOINT_PTR SourceSize,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Filter blit. */
+gceSTATUS
+gcoSURF_FilterBlit(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gcoSURF_EnableAlphaBlend(
+ IN gcoSURF Surface,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gcoSURF_DisableAlphaBlend(
+ IN gcoSURF Surface
+ );
+
+/* Copy a rectangular area with format conversion. */
+gceSTATUS
+gcoSURF_CopyPixels(
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctINT SourceX,
+ IN gctINT SourceY,
+ IN gctINT TargetX,
+ IN gctINT TargetY,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+/* Read surface pixel. */
+gceSTATUS
+gcoSURF_ReadPixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ OUT gctPOINTER PixelValue
+ );
+
+/* Write surface pixel. */
+gceSTATUS
+gcoSURF_WritePixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ IN gctPOINTER PixelValue
+ );
+
+/******************************************************************************\
+********************************** gco2D Object *********************************
+\******************************************************************************/
+
+/* Construct a new gco2D object. */
+gceSTATUS
+gco2D_Construct(
+ IN gcoHAL Hal,
+ OUT gco2D * Hardware
+ );
+
+/* Destroy an gco2D object. */
+gceSTATUS
+gco2D_Destroy(
+ IN gco2D Hardware
+ );
+
+/* Sets the maximum number of brushes in the brush cache. */
+gceSTATUS
+gco2D_SetBrushLimit(
+ IN gco2D Hardware,
+ IN gctUINT MaxCount
+ );
+
+/* Flush the brush. */
+gceSTATUS
+gco2D_FlushBrush(
+ IN gco2D Engine,
+ IN gcoBRUSH Brush,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Program the specified solid color brush. */
+gceSTATUS
+gco2D_LoadSolidBrush(
+ IN gco2D Engine,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask
+ );
+
+/* Configure monochrome source. */
+gceSTATUS
+gco2D_SetMonochromeSource(
+ IN gco2D Engine,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_MONOPACK DataPack,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source extension for full rotation. */
+gceSTATUS
+gco2D_SetColorSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSourceAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative
+ );
+
+/* Configure masked color source. */
+gceSTATUS
+gco2D_SetMaskedSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack
+ );
+
+/* Configure masked color source extension for full rotation. */
+gceSTATUS
+gco2D_SetMaskedSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Setup the source rectangle. */
+gceSTATUS
+gco2D_SetSource(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect
+ );
+
+/* Set clipping rectangle. */
+gceSTATUS
+gco2D_SetClipping(
+ IN gco2D Engine,
+ IN gcsRECT_PTR Rect
+ );
+
+/* Configure destination. */
+gceSTATUS
+gco2D_SetTarget(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth
+ );
+
+/* Configure destination extension for full rotation. */
+gceSTATUS
+gco2D_SetTargetEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Calculate and program the stretch factors. */
+gceSTATUS
+gco2D_SetStretchFactors(
+ IN gco2D Engine,
+ IN gctUINT32 HorFactor,
+ IN gctUINT32 VerFactor
+ );
+
+/* Calculate and program the stretch factors based on the rectangles. */
+gceSTATUS
+gco2D_SetStretchRectFactors(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect
+ );
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructSingleColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructMonochromeBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gco2D_Clear(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gco2D_Line(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines based on the 32-bit color. */
+gceSTATUS
+gco2D_ColorLine(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Generic blit. */
+gceSTATUS
+gco2D_Blit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Batch blit. */
+gceSTATUS
+gco2D_BatchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Stretch blit. */
+gceSTATUS
+gco2D_StretchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gco2D_MonoBlit(
+ IN gco2D Engine,
+ IN gctPOINTER StreamBits,
+ IN gcsPOINT_PTR StreamSize,
+ IN gcsRECT_PTR StreamRect,
+ IN gceSURF_MONOPACK SrcStreamPack,
+ IN gceSURF_MONOPACK DestStreamPack,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 FgRop,
+ IN gctUINT32 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Set kernel size. */
+gceSTATUS
+gco2D_SetKernelSize(
+ IN gco2D Engine,
+ IN gctUINT8 HorKernelSize,
+ IN gctUINT8 VerKernelSize
+ );
+
+/* Set filter type. */
+gceSTATUS
+gco2D_SetFilterType(
+ IN gco2D Engine,
+ IN gceFILTER_TYPE FilterType
+ );
+
+/* Set the filter kernel by user. */
+gceSTATUS
+gco2D_SetUserFilterKernel(
+ IN gco2D Engine,
+ IN gceFILTER_PASS_TYPE PassType,
+ IN gctUINT16_PTR KernelArray
+ );
+
+/* Select the pass(es) to be done for user defined filter. */
+gceSTATUS
+gco2D_EnableUserFilterPasses(
+ IN gco2D Engine,
+ IN gctBOOL HorPass,
+ IN gctBOOL VerPass
+ );
+
+/* Frees the temporary buffer allocated by filter blit operation. */
+gceSTATUS
+gco2D_FreeFilterBuffer(
+ IN gco2D Engine
+ );
+
+/* Filter blit. */
+gceSTATUS
+gco2D_FilterBlit(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Filter blit extension for full rotation. */
+gceSTATUS
+gco2D_FilterBlitEx(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gctUINT32 SrcSurfaceHeight,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gctUINT32 DestSurfaceHeight,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+gceSTATUS
+gco2D_FilterBlitEx2(
+ IN gco2D Engine,
+ IN gctUINT32_PTR SrcAddresses,
+ IN gctUINT32 SrcAddressNum,
+ IN gctUINT32_PTR SrcStrides,
+ IN gctUINT32 SrcStrideNum,
+ IN gceTILING SrcTiling,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gctUINT32 SrcSurfaceHeight,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32_PTR DestAddresses,
+ IN gctUINT32 DestAddressNum,
+ IN gctUINT32_PTR DestStrides,
+ IN gctUINT32 DestStrideNum,
+ IN gceTILING DestTiling,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gctUINT32 DestSurfaceHeight,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gco2D_EnableAlphaBlend(
+ IN gco2D Engine,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Enable alpha blending engine in the hardware. */
+gceSTATUS
+gco2D_EnableAlphaBlendAdvanced(
+ IN gco2D Engine,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode
+ );
+
+/* Enable alpha blending engine with Porter Duff rule. */
+gceSTATUS
+gco2D_SetPorterDuffBlending(
+ IN gco2D Engine,
+ IN gce2D_PORTER_DUFF_RULE Rule
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gco2D_DisableAlphaBlend(
+ IN gco2D Engine
+ );
+
+/* Retrieve the maximum number of 32-bit data chunks for a single DE command. */
+gctUINT32
+gco2D_GetMaximumDataCount(
+ void
+ );
+
+/* Retrieve the maximum number of rectangles, that can be passed in a single DE command. */
+gctUINT32
+gco2D_GetMaximumRectCount(
+ void
+ );
+
+/* Returns the pixel alignment of the surface. */
+gceSTATUS
+gco2D_GetPixelAlignment(
+ gceSURF_FORMAT Format,
+ gcsPOINT_PTR Alignment
+ );
+
+/* Retrieve monochrome stream pack size. */
+gceSTATUS
+gco2D_GetPackSize(
+ IN gceSURF_MONOPACK StreamPack,
+ OUT gctUINT32 * PackWidth,
+ OUT gctUINT32 * PackHeight
+ );
+
+/* Flush the 2D pipeline. */
+gceSTATUS
+gco2D_Flush(
+ IN gco2D Engine
+ );
+
+/* Load 256-entry color table for INDEX8 source surfaces. */
+gceSTATUS
+gco2D_LoadPalette(
+ IN gco2D Engine,
+ IN gctUINT FirstIndex,
+ IN gctUINT IndexCount,
+ IN gctPOINTER ColorTable,
+ IN gctBOOL ColorConvert
+ );
+
+/* Enable/disable 2D BitBlt mirrorring. */
+gceSTATUS
+gco2D_SetBitBlitMirror(
+ IN gco2D Engine,
+ IN gctBOOL HorizontalMirror,
+ IN gctBOOL VerticalMirror
+ );
+
+/* Set the transparency for source, destination and pattern. */
+gceSTATUS
+gco2D_SetTransparencyAdvanced(
+ IN gco2D Engine,
+ IN gce2D_TRANSPARENCY SrcTransparency,
+ IN gce2D_TRANSPARENCY DstTransparency,
+ IN gce2D_TRANSPARENCY PatTransparency
+ );
+
+/* Set the source color key. */
+gceSTATUS
+gco2D_SetSourceColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the source color key range. */
+gceSTATUS
+gco2D_SetSourceColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the target color key. */
+gceSTATUS
+gco2D_SetTargetColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the target color key range. */
+gceSTATUS
+gco2D_SetTargetColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the YUV color space mode. */
+gceSTATUS
+gco2D_SetYUVColorMode(
+ IN gco2D Engine,
+ IN gce2D_YUV_COLOR_MODE Mode
+ );
+
+/* Setup the source global color value in ARGB8 format. */
+gceSTATUS gco2D_SetSourceGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the target global color value in ARGB8 format. */
+gceSTATUS gco2D_SetTargetGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the source and target pixel multiply modes. */
+gceSTATUS
+gco2D_SetPixelMultiplyModeAdvanced(
+ IN gco2D Engine,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE SrcPremultiplySrcAlpha,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstPremultiplyDstAlpha,
+ IN gce2D_GLOBAL_COLOR_MULTIPLY_MODE SrcPremultiplyGlobalMode,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstDemultiplyDstAlpha
+ );
+
+/* Set the GPU clock cycles after which the idle engine will keep auto-flushing. */
+gceSTATUS
+gco2D_SetAutoFlushCycles(
+ IN gco2D Engine,
+ IN gctUINT32 Cycles
+ );
+
+/* Read the profile registers available in the 2D engine and sets them in the profile.
+ The function will also reset the pixelsRendered counter every time.
+*/
+gceSTATUS
+gco2D_ProfileEngine(
+ IN gco2D Engine,
+ OPTIONAL gcs2D_PROFILE_PTR Profile
+ );
+
+/* Enable or disable 2D dithering. */
+gceSTATUS
+gco2D_EnableDither(
+ IN gco2D Engine,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gco2D_SetGenericSource(
+ IN gco2D Engine,
+ IN gctUINT32_PTR Addresses,
+ IN gctUINT32 AddressNum,
+ IN gctUINT32_PTR Strides,
+ IN gctUINT32 StrideNum,
+ IN gceTILING Tiling,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+);
+
+gceSTATUS
+gco2D_SetGenericTarget(
+ IN gco2D Engine,
+ IN gctUINT32_PTR Addresses,
+ IN gctUINT32 AddressNum,
+ IN gctUINT32_PTR Strides,
+ IN gctUINT32 StrideNum,
+ IN gceTILING Tiling,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_raster_h_ */
+
diff --git a/src/include_v2/gc_hal_types.h b/src/include_v2/gc_hal_types.h
new file mode 100644
index 0000000..b66595e
--- /dev/null
+++ b/src/include_v2/gc_hal_types.h
@@ -0,0 +1,545 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_types_h_
+#define __gc_hal_types_h_
+
+#include "gc_hal_options.h"
+
+#ifdef _WIN32
+#pragma warning(disable:4127) /* Conditional expression is constant (do { }
+ ** while(0)). */
+#pragma warning(disable:4100) /* Unreferenced formal parameter. */
+#pragma warning(disable:4204) /* Non-constant aggregate initializer (C99). */
+#pragma warning(disable:4131) /* Uses old-style declarator (for Bison and
+ ** Flex generated files). */
+#pragma warning(disable:4206) /* Translation unit is empty. */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+** Platform macros.
+*/
+
+#if defined(__GNUC__)
+# define gcdHAS_ELLIPSES 1 /* GCC always has it. */
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+# define gcdHAS_ELLIPSES 1 /* C99 has it. */
+#elif defined(_MSC_VER) && (_MSC_VER >= 1500)
+# define gcdHAS_ELLIPSES 1 /* MSVC 2007+ has it. */
+#elif defined(UNDER_CE)
+# define gcdHAS_ELLIPSES 0 /* Windows CE doesn't have it. */
+#else
+# error "gcdHAS_ELLIPSES: Platform could not be determined"
+#endif
+
+/******************************************************************************\
+************************************ Keyword ***********************************
+\******************************************************************************/
+
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
+# define gcmINLINE inline /* C99 keyword. */
+#elif defined(__GNUC__)
+# define gcmINLINE __inline__ /* GNU keyword. */
+#elif defined(_MSC_VER) || defined(UNDER_CE)
+# define gcmINLINE __inline /* Internal keyword. */
+#else
+# error "gcmINLINE: Platform could not be determined"
+#endif
+
+#ifndef gcdDEBUG
+# if (defined(DBG) && DBG) || defined(DEBUG) || defined(_DEBUG)
+# define gcdDEBUG 1
+# else
+# define gcdDEBUG 0
+# endif
+#endif
+
+#ifdef _USRDLL
+# ifdef _MSC_VER
+# ifdef HAL_EXPORTS
+# define HALAPI __declspec(dllexport)
+# else
+# define HALAPI __declspec(dllimport)
+# endif
+# define HALDECL __cdecl
+# else
+# ifdef HAL_EXPORTS
+# define HALAPI
+# else
+# define HALAPI extern
+# endif
+# endif
+#else
+# define HALAPI
+# define HALDECL
+#endif
+
+/******************************************************************************\
+********************************** Common Types ********************************
+\******************************************************************************/
+
+#define gcvFALSE 0
+#define gcvTRUE 1
+
+#define gcvINFINITE ((gctUINT32) ~0U)
+
+typedef int gctBOOL;
+typedef gctBOOL * gctBOOL_PTR;
+
+typedef int gctINT;
+typedef signed char gctINT8;
+typedef signed short gctINT16;
+typedef signed int gctINT32;
+typedef signed long long gctINT64;
+
+typedef gctINT * gctINT_PTR;
+typedef gctINT8 * gctINT8_PTR;
+typedef gctINT16 * gctINT16_PTR;
+typedef gctINT32 * gctINT32_PTR;
+typedef gctINT64 * gctINT64_PTR;
+
+typedef unsigned int gctUINT;
+typedef unsigned char gctUINT8;
+typedef unsigned short gctUINT16;
+typedef unsigned int gctUINT32;
+typedef unsigned long long gctUINT64;
+
+typedef gctUINT * gctUINT_PTR;
+typedef gctUINT8 * gctUINT8_PTR;
+typedef gctUINT16 * gctUINT16_PTR;
+typedef gctUINT32 * gctUINT32_PTR;
+typedef gctUINT64 * gctUINT64_PTR;
+
+typedef unsigned long gctSIZE_T;
+typedef gctSIZE_T * gctSIZE_T_PTR;
+
+#ifdef __cplusplus
+# define gcvNULL 0
+#else
+# define gcvNULL ((void *) 0)
+#endif
+
+typedef float gctFLOAT;
+typedef signed int gctFIXED_POINT;
+typedef float * gctFLOAT_PTR;
+
+typedef void * gctPHYS_ADDR;
+typedef void * gctHANDLE;
+typedef void * gctFILE;
+typedef void * gctSIGNAL;
+typedef void * gctWINDOW;
+typedef void * gctIMAGE;
+
+typedef void * gctPOINTER;
+typedef const void * gctCONST_POINTER;
+
+typedef char gctCHAR;
+typedef char * gctSTRING;
+typedef const char * gctCONST_STRING;
+
+typedef struct _gcsCOUNT_STRING
+{
+ gctSIZE_T Length;
+ gctCONST_STRING String;
+}
+gcsCOUNT_STRING;
+
+/* Fixed point constants. */
+#define gcvZERO_X ((gctFIXED_POINT) 0x00000000)
+#define gcvHALF_X ((gctFIXED_POINT) 0x00008000)
+#define gcvONE_X ((gctFIXED_POINT) 0x00010000)
+#define gcvNEGONE_X ((gctFIXED_POINT) 0xFFFF0000)
+#define gcvTWO_X ((gctFIXED_POINT) 0x00020000)
+
+/******************************************************************************\
+******************************* Fixed Point Math *******************************
+\******************************************************************************/
+
+#define gcmXMultiply(x1, x2) \
+ (gctFIXED_POINT) (((gctINT64) (x1) * (x2)) >> 16)
+
+#define gcmXDivide(x1, x2) \
+ (gctFIXED_POINT) ((((gctINT64) (x1)) << 16) / (x2))
+
+#define gcmXMultiplyDivide(x1, x2, x3) \
+ (gctFIXED_POINT) ((gctINT64) (x1) * (x2) / (x3))
+
+/* 2D Engine profile. */
+struct gcs2D_PROFILE
+{
+ /* Cycle count.
+ 32bit counter incremented every 2D clock cycle.
+ Wraps back to 0 when the counter overflows.
+ */
+ gctUINT32 cycleCount;
+
+ /* Pixels rendered by the 2D engine.
+ Resets to 0 every time it is read. */
+ gctUINT32 pixelsRendered;
+};
+
+
+/* Macro to combine four characters into a Charcater Code. */
+#define gcmCC(c1, c2, c3, c4) \
+( \
+ (char) (c1) \
+ | \
+ ((char) (c2) << 8) \
+ | \
+ ((char) (c3) << 16) \
+ | \
+ ((char) (c4) << 24) \
+)
+
+#define gcmPRINTABLE(c) ((((c) >= ' ') && ((c) <= '}')) ? (c) : ' ')
+
+#define gcmCC_PRINT(cc) \
+ gcmPRINTABLE((char) ( (cc) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 8) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 16) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 24) & 0xFF))
+
+/******************************************************************************\
+****************************** Function Parameters *****************************
+\******************************************************************************/
+
+#define IN
+#define OUT
+#define OPTIONAL
+
+/******************************************************************************\
+********************************* Status Codes *********************************
+\******************************************************************************/
+
+typedef enum _gceSTATUS
+{
+ gcvSTATUS_OK = 0,
+ gcvSTATUS_FALSE = 0,
+ gcvSTATUS_TRUE = 1,
+ gcvSTATUS_NO_MORE_DATA = 2,
+ gcvSTATUS_CACHED = 3,
+ gcvSTATUS_MIPMAP_TOO_LARGE = 4,
+ gcvSTATUS_NAME_NOT_FOUND = 5,
+ gcvSTATUS_NOT_OUR_INTERRUPT = 6,
+ gcvSTATUS_MISMATCH = 7,
+ gcvSTATUS_MIPMAP_TOO_SMALL = 8,
+ gcvSTATUS_LARGER = 9,
+ gcvSTATUS_SMALLER = 10,
+ gcvSTATUS_CHIP_NOT_READY = 11,
+ gcvSTATUS_NEED_CONVERSION = 12,
+ gcvSTATUS_SKIP = 13,
+ gcvSTATUS_DATA_TOO_LARGE = 14,
+ gcvSTATUS_INVALID_CONFIG = 15,
+ gcvSTATUS_CHANGED = 16,
+ gcvSTATUS_NOT_SUPPORT_DITHER = 17,
+
+ gcvSTATUS_INVALID_ARGUMENT = -1,
+ gcvSTATUS_INVALID_OBJECT = -2,
+ gcvSTATUS_OUT_OF_MEMORY = -3,
+ gcvSTATUS_MEMORY_LOCKED = -4,
+ gcvSTATUS_MEMORY_UNLOCKED = -5,
+ gcvSTATUS_HEAP_CORRUPTED = -6,
+ gcvSTATUS_GENERIC_IO = -7,
+ gcvSTATUS_INVALID_ADDRESS = -8,
+ gcvSTATUS_CONTEXT_LOSSED = -9,
+ gcvSTATUS_TOO_COMPLEX = -10,
+ gcvSTATUS_BUFFER_TOO_SMALL = -11,
+ gcvSTATUS_INTERFACE_ERROR = -12,
+ gcvSTATUS_NOT_SUPPORTED = -13,
+ gcvSTATUS_MORE_DATA = -14,
+ gcvSTATUS_TIMEOUT = -15,
+ gcvSTATUS_OUT_OF_RESOURCES = -16,
+ gcvSTATUS_INVALID_DATA = -17,
+ gcvSTATUS_INVALID_MIPMAP = -18,
+ gcvSTATUS_NOT_FOUND = -19,
+ gcvSTATUS_NOT_ALIGNED = -20,
+ gcvSTATUS_INVALID_REQUEST = -21,
+ gcvSTATUS_GPU_NOT_RESPONDING = -22,
+
+ /* Linker errors. */
+ gcvSTATUS_GLOBAL_TYPE_MISMATCH = -1000,
+ gcvSTATUS_TOO_MANY_ATTRIBUTES = -1001,
+ gcvSTATUS_TOO_MANY_UNIFORMS = -1002,
+ gcvSTATUS_TOO_MANY_VARYINGS = -1003,
+ gcvSTATUS_UNDECLARED_VARYING = -1004,
+ gcvSTATUS_VARYING_TYPE_MISMATCH = -1005,
+ gcvSTATUS_MISSING_MAIN = -1006,
+ gcvSTATUS_NAME_MISMATCH = -1007,
+ gcvSTATUS_INVALID_INDEX = -1008,
+}
+gceSTATUS;
+
+/******************************************************************************\
+********************************* Status Macros ********************************
+\******************************************************************************/
+
+#define gcmIS_ERROR(status) (status < 0)
+#define gcmNO_ERROR(status) (status >= 0)
+#define gcmIS_SUCCESS(status) (status == gcvSTATUS_OK)
+
+/******************************************************************************\
+********************************* Field Macros *********************************
+\******************************************************************************/
+
+#define __gcmSTART(reg_field) \
+ (0 ? reg_field)
+
+#define __gcmEND(reg_field) \
+ (1 ? reg_field)
+
+#define __gcmGETSIZE(reg_field) \
+ (__gcmEND(reg_field) - __gcmSTART(reg_field) + 1)
+
+#define __gcmALIGN(data, reg_field) \
+ (((gctUINT32) (data)) << __gcmSTART(reg_field))
+
+#define __gcmMASK(reg_field) \
+ ((gctUINT32) ((__gcmGETSIZE(reg_field) == 32) \
+ ? ~0 \
+ : (~(~0 << __gcmGETSIZE(reg_field)))))
+
+/*******************************************************************************
+**
+** gcmFIELDMASK
+**
+** Get aligned field mask.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmFIELDMASK(reg, field) \
+( \
+ __gcmALIGN(__gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmGETFIELD
+**
+** Extract the value of a field from specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmGETFIELD(data, reg, field) \
+( \
+ ((((gctUINT32) (data)) >> __gcmSTART(reg##_##field)) \
+ & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELD
+**
+** Set the value of a field within specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETFIELD(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN((gctUINT32) (value) \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELDVALUE
+**
+** Set the value of a field within specified data with a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmSETFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN(reg##_##field##_##value \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmSETMASKEDFIELD
+**
+** Set the value of a masked field with specified data.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETMASKEDFIELD(reg, field, value) \
+( \
+ ((((gctUINT32) (~0)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? reg_field) - (0 ? reg_field) + 1) == 32) ? ~0 : (~(~0 << ((1 ? reg_field) - (0 ? reg_field) + 1))))))) << (0 ? reg_field))) | (((gctUINT32) ((gctUINT32) (value) & ((gctUINT32) ((((1 ? reg_field) - (0 ? reg_field) + 1) == 32) ? ~0 : (~(~0 << ((1 ? reg_field) - (0 ? reg_field) + 1))))))) << (0 ? reg_field)))&\
+ ((((gctUINT32) (~0)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? reg_MASK_##field) - (0 ? reg_MASK_##field) + 1) == 32) ? ~0 : (~(~0 << ((1 ? reg_MASK_##field) - (0 ? reg_MASK_##field) + 1))))))) << (0 ? reg_MASK_##field))) | (((gctUINT32) (reg_MASK_##field_ENABLED&((gctUINT32)((((1?reg_MASK_##field)-(0?reg_MASK_##field)+1)==32)?~0:(~(~0<<((1?reg_MASK_##field)-(0?reg_MASK_##field)+1)))))))<<(0?reg_MASK_##field)))\
+)
+
+/*******************************************************************************
+**
+** gcmVERIFYFIELDVALUE
+**
+** Verify if the value of a field within specified data equals a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmVERIFYFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) >> __gcmSTART(reg##_##field) & \
+ __gcmMASK(reg##_##field)) \
+ == \
+ (reg##_##field##_##value & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+** Bit field macros.
+*/
+
+#define __gcmSTARTBIT(Field) \
+ ( 1 ? Field )
+
+#define __gcmBITSIZE(Field) \
+ ( 0 ? Field )
+
+#define __gcmBITMASK(Field) \
+( \
+ (1 << __gcmBITSIZE(Field)) - 1 \
+)
+
+#define gcmGETBITS(Value, Type, Field) \
+( \
+ ( ((Type) (Value)) >> __gcmSTARTBIT(Field) ) \
+ & \
+ __gcmBITMASK(Field) \
+)
+
+#define gcmSETBITS(Value, Type, Field, NewValue) \
+( \
+ ( ((Type) (Value)) \
+ & ~(__gcmBITMASK(Field) << __gcmSTARTBIT(Field)) \
+ ) \
+ | \
+ ( ( ((Type) (NewValue)) \
+ & __gcmBITMASK(Field) \
+ ) << __gcmSTARTBIT(Field) \
+ ) \
+)
+
+/******************************************************************************\
+******************************** Min/Max Macros ********************************
+\******************************************************************************/
+
+#define gcmMIN(x, y) (((x) <= (y)) ? (x) : (y))
+#define gcmMAX(x, y) (((x) >= (y)) ? (x) : (y))
+#define gcmCLAMP(x, min, max) (((x) < (min)) ? (min) : \
+ ((x) > (max)) ? (max) : (x))
+#define gcmABS(x) (((x) < 0) ? -(x) : (x))
+#define gcmNEG(x) (((x) < 0) ? (x) : -(x))
+
+/*******************************************************************************
+**
+** gcmPTR2INT
+**
+** Convert a pointer to an integer value.
+**
+** ARGUMENTS:
+**
+** p Pointer value.
+*/
+#if defined(_WIN32) || (defined(__LP64__) && __LP64__)
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (gctUINT64) (p) \
+ )
+#else
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (p) \
+ )
+#endif
+
+/*******************************************************************************
+**
+** gcmINT2PTR
+**
+** Convert an integer value into a pointer.
+**
+** ARGUMENTS:
+**
+** v Integer value.
+*/
+#define gcmINT2PTR(i) \
+( \
+ (gctPOINTER) (i) \
+)
+
+/*******************************************************************************
+**
+** gcmOFFSETOF
+**
+** Compute the byte offset of a field inside a structure.
+**
+** ARGUMENTS:
+**
+** s Structure name.
+** field Field name.
+*/
+#define gcmOFFSETOF(s, field) \
+( \
+ gcmPTR2INT(& (((struct s *) 0)->field)) \
+)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_types_h_ */
+
diff --git a/src/include_v2/gc_hal_user_context.h b/src/include_v2/gc_hal_user_context.h
new file mode 100644
index 0000000..abc1481
--- /dev/null
+++ b/src/include_v2/gc_hal_user_context.h
@@ -0,0 +1,170 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2011 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_user_context_h_
+#define __gc_hal_user_context_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* gcoCONTEXT structure that hold the current context. */
+struct _gcoCONTEXT
+{
+ /* Object. */
+ gcsOBJECT object;
+
+ /* Pointer to gcoOS object. */
+ gcoOS os;
+
+ /* Pointer to gcoHARDWARE object. */
+ gcoHARDWARE hardware;
+
+ /* Context ID. */
+ gctUINT64 id;
+
+ /* State mapping. */
+ gctUINT32_PTR map;
+ gctSIZE_T stateCount;
+
+ /* State hinting. */
+ gctUINT8_PTR hint;
+ gctUINT8 hintValue;
+ gctSIZE_T hintCount;
+
+ /* Context buffer. */
+ gctUINT32_PTR buffer;
+ gctUINT32 pipe3DIndex;
+ gctUINT32 pipe2DIndex;
+ gctUINT32 linkIndex;
+ gctUINT32 inUseIndex;
+ gctSIZE_T bufferSize;
+
+ /* Context buffer used for commitment. */
+ gctSIZE_T bytes;
+ gctPHYS_ADDR physical;
+ gctPOINTER logical;
+
+ /* Pointer to final LINK command. */
+ gctPOINTER link;
+
+ /* Requested pipe select for context. */
+ gctUINT32 initialPipe;
+ gctUINT32 entryPipe;
+ gctUINT32 currentPipe;
+
+ /* Flag to specify whether PostCommit needs to be called. */
+ gctBOOL postCommit;
+
+ /* Busy flag. */
+ volatile gctBOOL * inUse;
+
+ /* Variables used for building state buffer. */
+ gctUINT32 lastAddress;
+ gctSIZE_T lastSize;
+ gctUINT32 lastIndex;
+ gctBOOL lastFixed;
+
+ /* Hint array. */
+ gctUINT32_PTR hintArray;
+ gctUINT32_PTR hintIndex;
+};
+
+struct _gcoCMDBUF
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to gcoOS object. */
+ gcoOS os;
+
+ /* Pointer to gcoHARDWARE object. */
+ gcoHARDWARE hardware;
+
+ /* Physical address of command buffer. */
+ gctPHYS_ADDR physical;
+
+ /* Logical address of command buffer. */
+ gctPOINTER logical;
+
+ /* Number of bytes in command buffer. */
+ gctSIZE_T bytes;
+
+ /* Start offset into the command buffer. */
+ gctUINT32 startOffset;
+
+ /* Current offset into the command buffer. */
+ gctUINT32 offset;
+
+ /* Number of free bytes in command buffer. */
+ gctSIZE_T free;
+
+#if gcdSECURE_USER
+ /* Table of offsets that define the physical addresses to be mapped. */
+ gctUINT32_PTR hintTable;
+
+ /* Current index into map table. */
+ gctUINT32_PTR hintIndex;
+
+ /* Commit index for map table. */
+ gctUINT32_PTR hintCommit;
+#endif
+};
+
+typedef struct _gcsQUEUE * gcsQUEUE_PTR;
+
+typedef struct _gcsQUEUE
+{
+ /* Pointer to next gcsQUEUE structure. */
+ gcsQUEUE_PTR next;
+
+#ifdef __QNXNTO__
+ /* Size of this object. */
+ gctSIZE_T bytes;
+#endif
+
+ /* Event information. */
+ gcsHAL_INTERFACE iface;
+}
+gcsQUEUE;
+
+/* Event queue. */
+struct _gcoQUEUE
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to gcoOS object. */
+ gcoOS os;
+
+ /* Pointer to current event queue. */
+ gcsQUEUE_PTR head;
+ gcsQUEUE_PTR tail;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_user_context_h_ */
+
diff --git a/src/include_v4/gc_abi.h b/src/include_v4/gc_abi.h
new file mode 100644
index 0000000..d04a79a
--- /dev/null
+++ b/src/include_v4/gc_abi.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/** Kernel ABI definition file for Etna **/
+#ifndef H_GCABI
+#define H_GCABI
+//#define GCABI_USER_SIGNAL_HAS_TYPE
+//#define GCABI_CONTEXT_HAS_PHYSICAL
+#define GCABI_HAS_MINOR_FEATURES_2
+#define GCABI_HAS_MINOR_FEATURES_3
+
+#define GCABI_CHIPIDENTITY_EXT
+
+// One of these must be set:
+//#define GCABI_HAS_CONTEXT
+#define GCABI_HAS_STATE_DELTAS
+
+#define GCABI_HAS_HARDWARE_TYPE
+
+/* IOCTL structure for userspace driver*/
+typedef struct
+{
+ void *in_buf;
+ unsigned int in_buf_size;
+ void *out_buf;
+ unsigned int out_buf_size;
+} vivante_ioctl_data_t;
+
+#include "gc_hal_base.h"
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#include "gc_hal_kernel_buffer.h"
+#include "gc_hal_types.h"
+#endif
+
diff --git a/src/include_v4/gc_hal.h b/src/include_v4/gc_hal.h
new file mode 100644
index 0000000..c87bb1e
--- /dev/null
+++ b/src/include_v4/gc_hal.h
@@ -0,0 +1,2372 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_h_
+#define __gc_hal_h_
+
+#include "gc_hal_rename.h"
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+#include "gc_hal_base.h"
+#include "gc_hal_profiler.h"
+#include "gc_hal_driver.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* Alignment Macros *******************************
+\******************************************************************************/
+
+#define gcmALIGN(n, align) \
+( \
+ ((n) + ((align) - 1)) & ~((align) - 1) \
+)
+
+#define gcmALIGN_BASE(n, align) \
+( \
+ (n) & ~((align) - 1) \
+)
+
+/******************************************************************************\
+***************************** Element Count Macro *****************************
+\******************************************************************************/
+
+#define gcmSIZEOF(a) \
+( \
+ (gctSIZE_T) (sizeof(a)) \
+)
+
+#define gcmCOUNTOF(a) \
+( \
+ sizeof(a) / sizeof(a[0]) \
+)
+
+/******************************************************************************\
+******************************** gcsOBJECT Object *******************************
+\******************************************************************************/
+
+/* Type of objects. */
+typedef enum _gceOBJECT_TYPE
+{
+ gcvOBJ_UNKNOWN = 0,
+ gcvOBJ_2D = gcmCC('2','D',' ',' '),
+ gcvOBJ_3D = gcmCC('3','D',' ',' '),
+ gcvOBJ_ATTRIBUTE = gcmCC('A','T','T','R'),
+ gcvOBJ_BRUSHCACHE = gcmCC('B','R','U','$'),
+ gcvOBJ_BRUSHNODE = gcmCC('B','R','U','n'),
+ gcvOBJ_BRUSH = gcmCC('B','R','U','o'),
+ gcvOBJ_BUFFER = gcmCC('B','U','F','R'),
+ gcvOBJ_COMMAND = gcmCC('C','M','D',' '),
+ gcvOBJ_COMMANDBUFFER = gcmCC('C','M','D','B'),
+ gcvOBJ_CONTEXT = gcmCC('C','T','X','T'),
+ gcvOBJ_DEVICE = gcmCC('D','E','V',' '),
+ gcvOBJ_DUMP = gcmCC('D','U','M','P'),
+ gcvOBJ_EVENT = gcmCC('E','V','N','T'),
+ gcvOBJ_FUNCTION = gcmCC('F','U','N','C'),
+ gcvOBJ_HAL = gcmCC('H','A','L',' '),
+ gcvOBJ_HARDWARE = gcmCC('H','A','R','D'),
+ gcvOBJ_HEAP = gcmCC('H','E','A','P'),
+ gcvOBJ_INDEX = gcmCC('I','N','D','X'),
+ gcvOBJ_INTERRUPT = gcmCC('I','N','T','R'),
+ gcvOBJ_KERNEL = gcmCC('K','E','R','N'),
+ gcvOBJ_KERNEL_FUNCTION = gcmCC('K','F','C','N'),
+ gcvOBJ_MEMORYBUFFER = gcmCC('M','E','M','B'),
+ gcvOBJ_MMU = gcmCC('M','M','U',' '),
+ gcvOBJ_OS = gcmCC('O','S',' ',' '),
+ gcvOBJ_OUTPUT = gcmCC('O','U','T','P'),
+ gcvOBJ_PAINT = gcmCC('P','N','T',' '),
+ gcvOBJ_PATH = gcmCC('P','A','T','H'),
+ gcvOBJ_QUEUE = gcmCC('Q','U','E',' '),
+ gcvOBJ_SAMPLER = gcmCC('S','A','M','P'),
+ gcvOBJ_SHADER = gcmCC('S','H','D','R'),
+ gcvOBJ_STREAM = gcmCC('S','T','R','M'),
+ gcvOBJ_SURF = gcmCC('S','U','R','F'),
+ gcvOBJ_TEXTURE = gcmCC('T','X','T','R'),
+ gcvOBJ_UNIFORM = gcmCC('U','N','I','F'),
+ gcvOBJ_VARIABLE = gcmCC('V','A','R','I'),
+ gcvOBJ_VERTEX = gcmCC('V','R','T','X'),
+ gcvOBJ_VIDMEM = gcmCC('V','M','E','M'),
+ gcvOBJ_VG = gcmCC('V','G',' ',' '),
+}
+gceOBJECT_TYPE;
+
+/* gcsOBJECT object defintinon. */
+typedef struct _gcsOBJECT
+{
+ /* Type of an object. */
+ gceOBJECT_TYPE type;
+}
+gcsOBJECT;
+
+typedef struct _gckHARDWARE * gckHARDWARE;
+
+/* CORE flags. */
+typedef enum _gceCORE
+{
+ gcvCORE_MAJOR = 0x0,
+ gcvCORE_2D = 0x1,
+ gcvCORE_VG = 0x2
+}
+gceCORE;
+
+#define gcdCORE_COUNT 3
+
+/*******************************************************************************
+**
+** gcmVERIFY_OBJECT
+**
+** Assert if an object is invalid or is not of the specified type. If the
+** object is invalid or not of the specified type, gcvSTATUS_INVALID_OBJECT
+** will be returned from the current function. In retail mode this macro
+** does nothing.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+#define _gcmVERIFY_OBJECT(prefix, obj, t) \
+ if ((obj) == gcvNULL) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: NULL"); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT((obj) != gcvNULL); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ } \
+ else if (((gcsOBJECT*) (obj))->type != t) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT failed: %c%c%c%c", \
+ gcmCC_PRINT(((gcsOBJECT*) (obj))->type)); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT(((gcsOBJECT*)(obj))->type == t); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_OBJECT); \
+ return gcvSTATUS_INVALID_OBJECT; \
+ }
+
+# define gcmVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcm, obj, t)
+# define gcmkVERIFY_OBJECT(obj, t) _gcmVERIFY_OBJECT(gcmk, obj, t)
+#else
+# define gcmVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+# define gcmkVERIFY_OBJECT(obj, t) do {} while (gcvFALSE)
+#endif
+
+/******************************************************************************/
+/*VERIFY_OBJECT if special return expected*/
+/******************************************************************************/
+#ifndef EGL_API_ANDROID
+# define _gcmVERIFY_OBJECT_RETURN(prefix, obj, t, retVal) \
+ do \
+ { \
+ if ((obj) == gcvNULL) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT_RETURN failed: NULL"); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT((obj) != gcvNULL); \
+ prefix##FOOTER_ARG("retVal=%d", retVal); \
+ return retVal; \
+ } \
+ else if (((gcsOBJECT*) (obj))->type != t) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "VERIFY_OBJECT_RETURN failed: %c%c%c%c", \
+ gcmCC_PRINT(((gcsOBJECT*) (obj))->type)); \
+ prefix##TRACE(gcvLEVEL_ERROR, " expected: %c%c%c%c", \
+ gcmCC_PRINT(t)); \
+ prefix##ASSERT(((gcsOBJECT*)(obj))->type == t); \
+ prefix##FOOTER_ARG("retVal=%d", retVal); \
+ return retVal; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_OBJECT_RETURN(obj, t, retVal) \
+ _gcmVERIFY_OBJECT_RETURN(gcm, obj, t, retVal)
+# define gcmkVERIFY_OBJECT_RETURN(obj, t, retVal) \
+ _gcmVERIFY_OBJECT_RETURN(gcmk, obj, t, retVal)
+#else
+# define gcmVERIFY_OBJECT_RETURN(obj, t) do {} while (gcvFALSE)
+# define gcmVERIFY_OBJECT_RETURN(obj, t) do {} while (gcvFALSE)
+#endif
+
+/******************************************************************************\
+********************************** gckOS Object *********************************
+\******************************************************************************/
+
+/* Construct a new gckOS object. */
+gceSTATUS
+gckOS_Construct(
+ IN gctPOINTER Context,
+ OUT gckOS * Os
+ );
+
+/* Destroy an gckOS object. */
+gceSTATUS
+gckOS_Destroy(
+ IN gckOS Os
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckOS_QueryVideoMemory(
+ IN gckOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gckOS_Allocate(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gckOS_Free(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Wrapper for allocation memory.. */
+gceSTATUS
+gckOS_AllocateMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Wrapper for freeing memory. */
+gceSTATUS
+gckOS_FreeMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Allocate paged memory. */
+gceSTATUS
+gckOS_AllocatePagedMemoryEx(
+ IN gckOS Os,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+ OUT gctPHYS_ADDR * Physical
+ );
+
+/* Lock pages. */
+gceSTATUS
+gckOS_LockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Cacheable,
+ OUT gctPOINTER * Logical,
+ OUT gctSIZE_T * PageCount
+ );
+
+/* Map pages. */
+gceSTATUS
+gckOS_MapPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Logical,
+#endif
+ IN gctSIZE_T PageCount,
+ IN gctPOINTER PageTable
+ );
+
+/* Map pages. */
+gceSTATUS
+gckOS_MapPagesEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPHYS_ADDR Physical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Logical,
+#endif
+ IN gctSIZE_T PageCount,
+ IN gctPOINTER PageTable
+ );
+
+/* Unlock pages. */
+gceSTATUS
+gckOS_UnlockPages(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Free paged memory. */
+gceSTATUS
+gckOS_FreePagedMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Allocate non-paged memory. */
+gceSTATUS
+gckOS_AllocateNonPagedMemory(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non-paged memory. */
+gceSTATUS
+gckOS_FreeNonPagedMemory(
+ IN gckOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gckOS_AllocateContiguous(
+ IN gckOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gckOS_FreeContiguous(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get the number fo bytes per page. */
+gceSTATUS
+gckOS_GetPageSize(
+ IN gckOS Os,
+ OUT gctSIZE_T * PageSize
+ );
+
+/* Get the physical address of a corresponding logical address. */
+gceSTATUS
+gckOS_GetPhysicalAddress(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+/* Get the physical address of a corresponding logical address. */
+gceSTATUS
+gckOS_GetPhysicalAddressProcess(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ IN gctUINT32 ProcessID,
+ OUT gctUINT32 * Address
+ );
+
+/* Map physical memory. */
+gceSTATUS
+gckOS_MapPhysical(
+ IN gckOS Os,
+ IN gctUINT32 Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap previously mapped physical memory. */
+gceSTATUS
+gckOS_UnmapPhysical(
+ IN gckOS Os,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+/* Read data from a hardware register. */
+gceSTATUS
+gckOS_ReadRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+/* Read data from a hardware register. */
+gceSTATUS
+gckOS_ReadRegisterEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+/* Write data to a hardware register. */
+gceSTATUS
+gckOS_WriteRegister(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Write data to a hardware register. */
+gceSTATUS
+gckOS_WriteRegisterEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Write data to a 32-bit memory location. */
+gceSTATUS
+gckOS_WriteMemory(
+ IN gckOS Os,
+ IN gctPOINTER Address,
+ IN gctUINT32 Data
+ );
+
+/* Map physical memory into the process space. */
+gceSTATUS
+gckOS_MapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap physical memory from the specified process space. */
+gceSTATUS
+gckOS_UnmapMemoryEx(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical,
+ IN gctUINT32 PID
+ );
+
+/* Unmap physical memory from the process space. */
+gceSTATUS
+gckOS_UnmapMemory(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Create a new mutex. */
+gceSTATUS
+gckOS_CreateMutex(
+ IN gckOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gckOS_DeleteMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gckOS_AcquireMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gckOS_ReleaseMutex(
+ IN gckOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Atomically exchange a pair of 32-bit values. */
+gceSTATUS
+gckOS_AtomicExchange(
+ IN gckOS Os,
+ IN OUT gctUINT32_PTR Target,
+ IN gctUINT32 NewValue,
+ OUT gctUINT32_PTR OldValue
+ );
+
+/* Atomically exchange a pair of pointers. */
+gceSTATUS
+gckOS_AtomicExchangePtr(
+ IN gckOS Os,
+ IN OUT gctPOINTER * Target,
+ IN gctPOINTER NewValue,
+ OUT gctPOINTER * OldValue
+ );
+
+#if gcdSMP
+gceSTATUS
+gckOS_AtomSetMask(
+ IN gctPOINTER Atom,
+ IN gctUINT32 Mask
+ );
+
+gceSTATUS
+gckOS_AtomClearMask(
+ IN gctPOINTER Atom,
+ IN gctUINT32 Mask
+ );
+#endif
+
+gceSTATUS
+gckOS_DumpGPUState(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomConstruct
+**
+** Create an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** OUTPUT:
+**
+** gctPOINTER * Atom
+** Pointer to a variable receiving the constructed atom.
+*/
+gceSTATUS
+gckOS_AtomConstruct(
+ IN gckOS Os,
+ OUT gctPOINTER * Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDestroy
+**
+** Destroy an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom to destroy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_AtomDestroy(
+ IN gckOS Os,
+ OUT gctPOINTER Atom
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomGet
+**
+** Get the 32-bit value protected by an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the value of the atom.
+*/
+gceSTATUS
+gckOS_AtomGet(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomSet
+**
+** Set the 32-bit value protected by an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** gctINT32 Value
+** The value of the atom.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_AtomSet(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ IN gctINT32 Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomIncrement
+**
+** Atomically increment the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomIncrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/*******************************************************************************
+**
+** gckOS_AtomDecrement
+**
+** Atomically decrement the 32-bit integer value inside an atom.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.
+**
+** gctPOINTER Atom
+** Pointer to the atom.
+**
+** OUTPUT:
+**
+** gctINT32_PTR Value
+** Pointer to a variable the receives the original value of the atom.
+*/
+gceSTATUS
+gckOS_AtomDecrement(
+ IN gckOS Os,
+ IN gctPOINTER Atom,
+ OUT gctINT32_PTR Value
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gckOS_Delay(
+ IN gckOS Os,
+ IN gctUINT32 Delay
+ );
+
+/* Get time in milliseconds. */
+gceSTATUS
+gckOS_GetTicks(
+ OUT gctUINT32_PTR Time
+ );
+
+/* Compare time value. */
+gceSTATUS
+gckOS_TicksAfter(
+ IN gctUINT32 Time1,
+ IN gctUINT32 Time2,
+ OUT gctBOOL_PTR IsAfter
+ );
+
+/* Get time in microseconds. */
+gceSTATUS
+gckOS_GetTime(
+ OUT gctUINT64_PTR Time
+ );
+
+/* Memory barrier. */
+gceSTATUS
+gckOS_MemoryBarrier(
+ IN gckOS Os,
+ IN gctPOINTER Address
+ );
+
+/* Map user pointer. */
+gceSTATUS
+gckOS_MapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Unmap user pointer. */
+gceSTATUS
+gckOS_UnmapUserPointer(
+ IN gckOS Os,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size,
+ IN gctPOINTER KernelPointer
+ );
+
+/*******************************************************************************
+**
+** gckOS_QueryNeedCopy
+**
+** Query whether the memory can be accessed or mapped directly or it has to be
+** copied.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to an gckOS object.
+**
+** gctUINT32 ProcessID
+** Process ID of the current process.
+**
+** OUTPUT:
+**
+** gctBOOL_PTR NeedCopy
+** Pointer to a boolean receiving gcvTRUE if the memory needs a copy or
+** gcvFALSE if the memory can be accessed or mapped dircetly.
+*/
+gceSTATUS
+gckOS_QueryNeedCopy(
+ IN gckOS Os,
+ IN gctUINT32 ProcessID,
+ OUT gctBOOL_PTR NeedCopy
+ );
+
+/*******************************************************************************
+**
+** gckOS_CopyFromUserData
+**
+** Copy data from user to kernel memory.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to an gckOS object.
+**
+** gctPOINTER KernelPointer
+** Pointer to kernel memory.
+**
+** gctPOINTER Pointer
+** Pointer to user memory.
+**
+** gctSIZE_T Size
+** Number of bytes to copy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_CopyFromUserData(
+ IN gckOS Os,
+ IN gctPOINTER KernelPointer,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size
+ );
+
+/*******************************************************************************
+**
+** gckOS_CopyToUserData
+**
+** Copy data from kernel to user memory.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to an gckOS object.
+**
+** gctPOINTER KernelPointer
+** Pointer to kernel memory.
+**
+** gctPOINTER Pointer
+** Pointer to user memory.
+**
+** gctSIZE_T Size
+** Number of bytes to copy.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_CopyToUserData(
+ IN gckOS Os,
+ IN gctPOINTER KernelPointer,
+ IN gctPOINTER Pointer,
+ IN gctSIZE_T Size
+ );
+
+#ifdef __QNXNTO__
+/* Map user physical address. */
+gceSTATUS
+gckOS_MapUserPhysical(
+ IN gckOS Os,
+ IN gctPHYS_ADDR Phys,
+ OUT gctPOINTER * KernelPointer
+ );
+#endif
+
+gceSTATUS
+gckOS_SuspendInterrupt(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_SuspendInterruptEx(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+gceSTATUS
+gckOS_ResumeInterrupt(
+ IN gckOS Os
+ );
+
+gceSTATUS
+gckOS_ResumeInterruptEx(
+ IN gckOS Os,
+ IN gceCORE Core
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gckOS_GetBaseAddress(
+ IN gckOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gckOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gckOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Device I/O control to the kernel HAL layer. */
+gceSTATUS
+gckOS_DeviceControl(
+ IN gckOS Os,
+ IN gctBOOL FromUser,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ OUT gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/*******************************************************************************
+**
+** gckOS_GetProcessID
+**
+** Get current process ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ProcessID
+** Pointer to the variable that receives the process ID.
+*/
+gceSTATUS
+gckOS_GetProcessID(
+ OUT gctUINT32_PTR ProcessID
+ );
+
+gceSTATUS
+gckOS_GetCurrentProcessID(
+ OUT gctUINT32_PTR ProcessID
+ );
+
+/*******************************************************************************
+**
+** gckOS_GetThreadID
+**
+** Get current thread ID.
+**
+** INPUT:
+**
+** Nothing.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR ThreadID
+** Pointer to the variable that receives the thread ID.
+*/
+gceSTATUS
+gckOS_GetThreadID(
+ OUT gctUINT32_PTR ThreadID
+ );
+
+/******************************************************************************\
+********************************** Signal Object *********************************
+\******************************************************************************/
+
+/* Create a signal. */
+gceSTATUS
+gckOS_CreateSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gckOS_DestroySignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gckOS_Signal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gckOS_WaitSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Map a user signal to the kernel space. */
+gceSTATUS
+gckOS_MapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process,
+ OUT gctSIGNAL * MappedSignal
+ );
+
+/* Unmap a user signal */
+gceSTATUS
+gckOS_UnmapSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Map user memory. */
+gceSTATUS
+gckOS_MapUserMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Map user memory. */
+gceSTATUS
+gckOS_MapUserMemoryEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gckOS_UnmapUserMemory(
+ IN gckOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gckOS_UnmapUserMemoryEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+#if !USE_NEW_LINUX_SIGNAL
+/* Create signal to be used in the user space. */
+gceSTATUS
+gckOS_CreateUserSignal(
+ IN gckOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctINT * SignalID
+ );
+
+/* Destroy signal used in the user space. */
+gceSTATUS
+gckOS_DestroyUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID
+ );
+
+/* Wait for signal used in the user space. */
+gceSTATUS
+gckOS_WaitUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctUINT32 Wait
+ );
+
+/* Signal a signal used in the user space. */
+gceSTATUS
+gckOS_SignalUserSignal(
+ IN gckOS Os,
+ IN gctINT SignalID,
+ IN gctBOOL State
+ );
+#endif /* USE_NEW_LINUX_SIGNAL */
+
+/* Set a signal owned by a process. */
+#if defined(__QNXNTO__)
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctINT Recvid,
+ IN gctINT Coid
+ );
+#else
+gceSTATUS
+gckOS_UserSignal(
+ IN gckOS Os,
+ IN gctSIGNAL Signal,
+ IN gctHANDLE Process
+ );
+#endif
+
+/******************************************************************************\
+** Cache Support
+*/
+
+gceSTATUS
+gckOS_CacheClean(
+ gckOS Os,
+ gctUINT32 ProcessID,
+ gctPHYS_ADDR Handle,
+ gctPOINTER Physical,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gckOS_CacheFlush(
+ gckOS Os,
+ gctUINT32 ProcessID,
+ gctPHYS_ADDR Handle,
+ gctPOINTER Physical,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gckOS_CacheInvalidate(
+ gckOS Os,
+ gctUINT32 ProcessID,
+ gctPHYS_ADDR Handle,
+ gctPOINTER Physical,
+ gctPOINTER Logical,
+ gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+** Debug Support
+*/
+
+void
+gckOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gckOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gckOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gckOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+/*******************************************************************************
+** Broadcast interface.
+*/
+
+typedef enum _gceBROADCAST
+{
+ /* GPU might be idle. */
+ gcvBROADCAST_GPU_IDLE,
+
+ /* A commit is going to happen. */
+ gcvBROADCAST_GPU_COMMIT,
+
+ /* GPU seems to be stuck. */
+ gcvBROADCAST_GPU_STUCK,
+
+ /* First process gets attached. */
+ gcvBROADCAST_FIRST_PROCESS,
+
+ /* Last process gets detached. */
+ gcvBROADCAST_LAST_PROCESS,
+
+ /* AXI bus error. */
+ gcvBROADCAST_AXI_BUS_ERROR,
+}
+gceBROADCAST;
+
+gceSTATUS
+gckOS_Broadcast(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gceBROADCAST Reason
+ );
+
+gceSTATUS
+gckOS_BroadcastHurry(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gctUINT Urgency
+ );
+
+gceSTATUS
+gckOS_BroadcastCalibrateSpeed(
+ IN gckOS Os,
+ IN gckHARDWARE Hardware,
+ IN gctUINT Idle,
+ IN gctUINT Time
+ );
+
+/*******************************************************************************
+**
+** gckOS_SetGPUPower
+**
+** Set the power of the GPU on or off.
+**
+** INPUT:
+**
+** gckOS Os
+** Pointer to a gckOS object.ß
+**
+** gctBOOL Clock
+** gcvTRUE to turn on the clock, or gcvFALSE to turn off the clock.
+**
+** gctBOOL Power
+** gcvTRUE to turn on the power, or gcvFALSE to turn off the power.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckOS_SetGPUPower(
+ IN gckOS Os,
+ IN gctBOOL Clock,
+ IN gctBOOL Power
+ );
+
+/*******************************************************************************
+** Semaphores.
+*/
+
+/* Create a new semaphore. */
+gceSTATUS
+gckOS_CreateSemaphore(
+ IN gckOS Os,
+ OUT gctPOINTER * Semaphore
+ );
+
+#if gcdENABLE_VG
+gceSTATUS
+gckOS_CreateSemaphoreVG(
+ IN gckOS Os,
+ OUT gctPOINTER * Semaphore
+ );
+#endif
+
+/* Delete a semahore. */
+gceSTATUS
+gckOS_DestroySemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Acquire a semahore. */
+gceSTATUS
+gckOS_AcquireSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Try to acquire a semahore. */
+gceSTATUS
+gckOS_TryAcquireSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/* Release a semahore. */
+gceSTATUS
+gckOS_ReleaseSemaphore(
+ IN gckOS Os,
+ IN gctPOINTER Semaphore
+ );
+
+/*******************************************************************************
+** Timer API.
+*/
+
+typedef void (*gctTIMERFUNCTION)(gctPOINTER);
+
+/* Create a timer. */
+gceSTATUS
+gckOS_CreateTimer(
+ IN gckOS Os,
+ IN gctTIMERFUNCTION Function,
+ IN gctPOINTER Data,
+ OUT gctPOINTER * Timer
+ );
+
+/* Destory a timer. */
+gceSTATUS
+gckOS_DestoryTimer(
+ IN gckOS Os,
+ IN gctPOINTER Timer
+ );
+
+/* Start a timer. */
+gceSTATUS
+gckOS_StartTimer(
+ IN gckOS Os,
+ IN gctPOINTER Timer,
+ IN gctUINT32 Delay
+ );
+
+/* Stop a timer. */
+gceSTATUS
+gckOS_StopTimer(
+ IN gckOS Os,
+ IN gctPOINTER Timer
+ );
+
+/******************************************************************************\
+********************************* gckHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gckHEAP * gckHEAP;
+
+/* Construct a new gckHEAP object. */
+gceSTATUS
+gckHEAP_Construct(
+ IN gckOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gckHEAP * Heap
+ );
+
+/* Destroy an gckHEAP object. */
+gceSTATUS
+gckHEAP_Destroy(
+ IN gckHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gckHEAP_Allocate(
+ IN gckHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckHEAP_Free(
+ IN gckHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+/* Profile the heap. */
+gceSTATUS
+gckHEAP_ProfileStart(
+ IN gckHEAP Heap
+ );
+
+gceSTATUS
+gckHEAP_ProfileEnd(
+ IN gckHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+
+
+/******************************************************************************\
+******************************** gckVIDMEM Object ******************************
+\******************************************************************************/
+
+typedef struct _gckVIDMEM * gckVIDMEM;
+typedef struct _gckKERNEL * gckKERNEL;
+typedef struct _gckDB * gckDB;
+
+/* Construct a new gckVIDMEM object. */
+gceSTATUS
+gckVIDMEM_Construct(
+ IN gckOS Os,
+ IN gctUINT32 BaseAddress,
+ IN gctSIZE_T Bytes,
+ IN gctSIZE_T Threshold,
+ IN gctSIZE_T Banking,
+ OUT gckVIDMEM * Memory
+ );
+
+/* Destroy an gckVDIMEM object. */
+gceSTATUS
+gckVIDMEM_Destroy(
+ IN gckVIDMEM Memory
+ );
+
+/* Allocate rectangular memory. */
+gceSTATUS
+gckVIDMEM_Allocate(
+ IN gckVIDMEM Memory,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT BytesPerPixel,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Allocate linear memory. */
+gceSTATUS
+gckVIDMEM_AllocateLinear(
+ IN gckVIDMEM Memory,
+ IN gctSIZE_T Bytes,
+ IN gctUINT32 Alignment,
+ IN gceSURF_TYPE Type,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Free memory. */
+gceSTATUS
+gckVIDMEM_Free(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/* Lock memory. */
+gceSTATUS
+gckVIDMEM_Lock(
+ IN gckKERNEL Kernel,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctBOOL Cacheable,
+ OUT gctUINT32 * Address
+ );
+
+/* Unlock memory. */
+gceSTATUS
+gckVIDMEM_Unlock(
+ IN gckKERNEL Kernel,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type,
+ IN OUT gctBOOL * Asynchroneous
+ );
+
+/* Construct a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_ConstructVirtual(
+ IN gckKERNEL Kernel,
+ IN gctBOOL Contiguous,
+ IN gctSIZE_T Bytes,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Destroy a gcuVIDMEM_NODE union for virtual memory. */
+gceSTATUS
+gckVIDMEM_DestroyVirtual(
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/******************************************************************************\
+******************************** gckKERNEL Object ******************************
+\******************************************************************************/
+
+struct _gcsHAL_INTERFACE;
+
+/* Notifications. */
+typedef enum _gceNOTIFY
+{
+ gcvNOTIFY_INTERRUPT,
+ gcvNOTIFY_COMMAND_QUEUE,
+}
+gceNOTIFY;
+
+/* Flush flags. */
+typedef enum _gceKERNEL_FLUSH
+{
+ gcvFLUSH_COLOR = 0x01,
+ gcvFLUSH_DEPTH = 0x02,
+ gcvFLUSH_TEXTURE = 0x04,
+ gcvFLUSH_2D = 0x08,
+ gcvFLUSH_ALL = gcvFLUSH_COLOR
+ | gcvFLUSH_DEPTH
+ | gcvFLUSH_TEXTURE
+ | gcvFLUSH_2D,
+}
+gceKERNEL_FLUSH;
+
+/* Construct a new gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Construct(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctPOINTER Context,
+ IN gckDB SharedDB,
+ OUT gckKERNEL * Kernel
+ );
+
+/* Destroy an gckKERNEL object. */
+gceSTATUS
+gckKERNEL_Destroy(
+ IN gckKERNEL Kernel
+ );
+
+/* Dispatch a user-level command. */
+gceSTATUS
+gckKERNEL_Dispatch(
+ IN gckKERNEL Kernel,
+ IN gctBOOL FromUser,
+ IN OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Query the video memory. */
+gceSTATUS
+gckKERNEL_QueryVideoMemory(
+ IN gckKERNEL Kernel,
+ OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Lookup the gckVIDMEM object for a pool. */
+gceSTATUS
+gckKERNEL_GetVideoMemoryPool(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+#if gcdUSE_VIDMEM_PER_PID
+gceSTATUS
+gckKERNEL_GetVideoMemoryPoolPid(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ IN gctUINT32 Pid,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+gceSTATUS
+gckKERNEL_CreateVideoMemoryPoolPid(
+ IN gckKERNEL Kernel,
+ IN gcePOOL Pool,
+ IN gctUINT32 Pid,
+ OUT gckVIDMEM * VideoMemory
+ );
+
+gceSTATUS
+gckKERNEL_RemoveVideoMemoryPoolPid(
+ IN gckKERNEL Kernel,
+ IN gckVIDMEM VideoMemory
+ );
+#endif
+
+/* Map video memory. */
+gceSTATUS
+gckKERNEL_MapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Address,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes,
+#endif
+ OUT gctPOINTER * Logical
+ );
+
+/* Map video memory. */
+gceSTATUS
+gckKERNEL_MapVideoMemoryEx(
+ IN gckKERNEL Kernel,
+ IN gceCORE Core,
+ IN gctBOOL InUserSpace,
+ IN gctUINT32 Address,
+#ifdef __QNXNTO__
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes,
+#endif
+ OUT gctPOINTER * Logical
+ );
+
+#ifdef __QNXNTO__
+/* Unmap video memory. */
+gceSTATUS
+gckKERNEL_UnmapVideoMemory(
+ IN gckKERNEL Kernel,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Pid,
+ IN gctUINT32 Bytes
+ );
+#endif
+
+/* Map memory. */
+gceSTATUS
+gckKERNEL_MapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap memory. */
+gceSTATUS
+gckKERNEL_UnmapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Notification of events. */
+gceSTATUS
+gckKERNEL_Notify(
+ IN gckKERNEL Kernel,
+ IN gceNOTIFY Notifcation,
+ IN gctBOOL Data
+ );
+
+gceSTATUS
+gckKERNEL_QuerySettings(
+ IN gckKERNEL Kernel,
+ OUT gcsKERNEL_SETTINGS * Settings
+ );
+
+/*******************************************************************************
+**
+** gckKERNEL_Recovery
+**
+** Try to recover the GPU from a fatal error.
+**
+** INPUT:
+**
+** gckKERNEL Kernel
+** Pointer to an gckKERNEL object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gckKERNEL_Recovery(
+ IN gckKERNEL Kernel
+ );
+
+/* Set the value of timeout on HW operation. */
+void
+gckKERNEL_SetTimeOut(
+ IN gckKERNEL Kernel,
+ IN gctUINT32 timeOut
+ );
+
+/* Get access to the user data. */
+gceSTATUS
+gckKERNEL_OpenUserData(
+ IN gckKERNEL Kernel,
+ IN gctBOOL NeedCopy,
+ IN gctPOINTER StaticStorage,
+ IN gctPOINTER UserPointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Release resources associated with the user data connection. */
+gceSTATUS
+gckKERNEL_CloseUserData(
+ IN gckKERNEL Kernel,
+ IN gctBOOL NeedCopy,
+ IN gctBOOL FlushData,
+ IN gctPOINTER UserPointer,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/******************************************************************************\
+******************************* gckHARDWARE Object *****************************
+\******************************************************************************/
+
+/* Construct a new gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Construct(
+ IN gckOS Os,
+ IN gceCORE Core,
+ OUT gckHARDWARE * Hardware
+ );
+
+/* Destroy an gckHARDWARE object. */
+gceSTATUS
+gckHARDWARE_Destroy(
+ IN gckHARDWARE Hardware
+ );
+
+/* Get hardware type. */
+gceSTATUS
+gckHARDWARE_GetType(
+ IN gckHARDWARE Hardware,
+ OUT gceHARDWARE_TYPE * Type
+ );
+
+/* Query system memory requirements. */
+gceSTATUS
+gckHARDWARE_QuerySystemMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * SystemSize,
+ OUT gctUINT32 * SystemBaseAddress
+ );
+
+/* Build virtual address. */
+gceSTATUS
+gckHARDWARE_BuildVirtualAddress(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Index,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Query command buffer requirements. */
+gceSTATUS
+gckHARDWARE_QueryCommandBuffer(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * Alignment,
+ OUT gctSIZE_T * ReservedHead,
+ OUT gctSIZE_T * ReservedTail
+ );
+
+/* Add a WAIT/LINK pair in the command queue. */
+gceSTATUS
+gckHARDWARE_WaitLink(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctUINT32 * WaitOffset,
+ OUT gctSIZE_T * WaitBytes
+ );
+
+/* Kickstart the command processor. */
+gceSTATUS
+gckHARDWARE_Execute(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+#ifdef __QNXNTO__
+ IN gctPOINTER Physical,
+ IN gctBOOL PhysicalAddresses,
+#endif
+ IN gctSIZE_T Bytes
+ );
+
+/* Add an END command in the command queue. */
+gceSTATUS
+gckHARDWARE_End(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a NOP command in the command queue. */
+gceSTATUS
+gckHARDWARE_Nop(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a WAIT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Wait(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Count,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a PIPESELECT command in the command queue. */
+gceSTATUS
+gckHARDWARE_PipeSelect(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gcePIPE_SELECT Pipe,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add a LINK command in the command queue. */
+gceSTATUS
+gckHARDWARE_Link(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctPOINTER FetchAddress,
+ IN gctSIZE_T FetchSize,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Add an EVENT command in the command queue. */
+gceSTATUS
+gckHARDWARE_Event(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT8 Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Query the available memory. */
+gceSTATUS
+gckHARDWARE_QueryMemory(
+ IN gckHARDWARE Hardware,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctUINT32 * InternalBaseAddress,
+ OUT gctUINT32 * InternalAlignment,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctUINT32 * ExternalBaseAddress,
+ OUT gctUINT32 * ExternalAlignment,
+ OUT gctUINT32 * HorizontalTileSize,
+ OUT gctUINT32 * VerticalTileSize
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gckHARDWARE_QueryChipIdentity(
+ IN gckHARDWARE Hardware,
+ OUT gcsHAL_QUERY_CHIP_IDENTITY_PTR Identity
+ );
+
+/* Query the shader support. */
+gceSTATUS
+gckHARDWARE_QueryShaderCaps(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT * VertexUniforms,
+ OUT gctUINT * FragmentUniforms,
+ OUT gctUINT * Varyings
+ );
+
+/* Split a harwdare specific address into API stuff. */
+gceSTATUS
+gckHARDWARE_SplitMemory(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Update command queue tail pointer. */
+gceSTATUS
+gckHARDWARE_UpdateQueueTail(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset
+ );
+
+/* Convert logical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertLogical(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+#ifdef __QNXNTO__
+/* Convert physical address to hardware specific address. */
+gceSTATUS
+gckHARDWARE_ConvertPhysical(
+ IN gckHARDWARE Hardware,
+ IN gctPHYS_ADDR Physical,
+ OUT gctUINT32 * Address
+ );
+#endif
+
+/* Interrupt manager. */
+gceSTATUS
+gckHARDWARE_Interrupt(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL InterruptValid
+ );
+
+/* Program MMU. */
+gceSTATUS
+gckHARDWARE_SetMMU(
+ IN gckHARDWARE Hardware,
+ IN gctPOINTER Logical
+ );
+
+/* Flush the MMU. */
+gceSTATUS
+gckHARDWARE_FlushMMU(
+ IN gckHARDWARE Hardware
+ );
+
+/* Set the page table base address. */
+gceSTATUS
+gckHARDWARE_SetMMUv2(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Enable,
+ IN gctPOINTER MtlbAddress,
+ IN gceMMU_MODE Mode,
+ IN gctPOINTER SafeAddress,
+ IN gctBOOL FromPower
+ );
+
+/* Get idle register. */
+gceSTATUS
+gckHARDWARE_GetIdle(
+ IN gckHARDWARE Hardware,
+ IN gctBOOL Wait,
+ OUT gctUINT32 * Data
+ );
+
+/* Flush the caches. */
+gceSTATUS
+gckHARDWARE_Flush(
+ IN gckHARDWARE Hardware,
+ IN gceKERNEL_FLUSH Flush,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Enable/disable fast clear. */
+gceSTATUS
+gckHARDWARE_SetFastClear(
+ IN gckHARDWARE Hardware,
+ IN gctINT Enable,
+ IN gctINT Compression
+ );
+
+gceSTATUS
+gckHARDWARE_ReadInterrupt(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32_PTR IDs
+ );
+
+/* Power management. */
+gceSTATUS
+gckHARDWARE_SetPowerManagementState(
+ IN gckHARDWARE Hardware,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gckHARDWARE_QueryPowerManagementState(
+ IN gckHARDWARE Hardware,
+ OUT gceCHIPPOWERSTATE* State
+ );
+
+#if gcdPOWEROFF_TIMEOUT
+gceSTATUS
+gckHARDWARE_SetPowerOffTimeout(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 Timeout
+);
+
+gceSTATUS
+gckHARDWARE_QueryPowerOffTimeout(
+ IN gckHARDWARE Hardware,
+ OUT gctUINT32* Timeout
+);
+#endif
+
+/* Profile 2D Engine. */
+gceSTATUS
+gckHARDWARE_ProfileEngine2D(
+ IN gckHARDWARE Hardware,
+ OUT gcs2D_PROFILE_PTR Profile
+ );
+
+gceSTATUS
+gckHARDWARE_InitializeHardware(
+ IN gckHARDWARE Hardware
+ );
+
+gceSTATUS
+gckHARDWARE_Reset(
+ IN gckHARDWARE Hardware
+ );
+
+typedef gceSTATUS (*gctISRMANAGERFUNC)(gctPOINTER Context);
+
+gceSTATUS
+gckHARDWARE_SetIsrManager(
+ IN gckHARDWARE Hardware,
+ IN gctISRMANAGERFUNC StartIsr,
+ IN gctISRMANAGERFUNC StopIsr,
+ IN gctPOINTER Context
+ );
+
+/* Start a composition. */
+gceSTATUS
+gckHARDWARE_Compose(
+ IN gckHARDWARE Hardware,
+ IN gctUINT32 ProcessID,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Offset,
+ IN gctSIZE_T Size,
+ IN gctUINT8 EventID
+ );
+
+/* Check for Hardware features. */
+gceSTATUS
+gckHARDWARE_IsFeatureAvailable(
+ IN gckHARDWARE Hardware,
+ IN gceFEATURE Feature
+ );
+
+#if !gcdENABLE_VG
+/******************************************************************************\
+***************************** gckINTERRUPT Object ******************************
+\******************************************************************************/
+
+typedef struct _gckINTERRUPT * gckINTERRUPT;
+
+typedef gceSTATUS (* gctINTERRUPT_HANDLER)(
+ IN gckKERNEL Kernel
+ );
+
+gceSTATUS
+gckINTERRUPT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckINTERRUPT * Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_Destroy(
+ IN gckINTERRUPT Interrupt
+ );
+
+gceSTATUS
+gckINTERRUPT_SetHandler(
+ IN gckINTERRUPT Interrupt,
+ IN OUT gctINT32_PTR Id,
+ IN gctINTERRUPT_HANDLER Handler
+ );
+
+gceSTATUS
+gckINTERRUPT_Notify(
+ IN gckINTERRUPT Interrupt,
+ IN gctBOOL Valid
+ );
+#endif
+/******************************************************************************\
+******************************** gckEVENT Object *******************************
+\******************************************************************************/
+
+typedef struct _gckEVENT * gckEVENT;
+
+/* Construct a new gckEVENT object. */
+gceSTATUS
+gckEVENT_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckEVENT * Event
+ );
+
+/* Destroy an gckEVENT object. */
+gceSTATUS
+gckEVENT_Destroy(
+ IN gckEVENT Event
+ );
+
+/* Reserve the next available hardware event. */
+gceSTATUS
+gckEVENT_GetEvent(
+ IN gckEVENT Event,
+ IN gctBOOL Wait,
+ OUT gctUINT8 * EventID,
+ IN gceKERNEL_WHERE Source
+ );
+
+/* Add a new event to the list of events. */
+gceSTATUS
+gckEVENT_AddList(
+ IN gckEVENT Event,
+ IN gcsHAL_INTERFACE_PTR Interface,
+ IN gceKERNEL_WHERE FromWhere,
+ IN gctBOOL AllocateAllowed
+ );
+
+/* Schedule a FreeNonPagedMemory event. */
+gceSTATUS
+gckEVENT_FreeNonPagedMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeContiguousMemory event. */
+gceSTATUS
+gckEVENT_FreeContiguousMemory(
+ IN gckEVENT Event,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a FreeVideoMemory event. */
+gceSTATUS
+gckEVENT_FreeVideoMemory(
+ IN gckEVENT Event,
+ IN gcuVIDMEM_NODE_PTR VideoMemory,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule a signal event. */
+gceSTATUS
+gckEVENT_Signal(
+ IN gckEVENT Event,
+ IN gctSIGNAL Signal,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+/* Schedule an Unlock event. */
+gceSTATUS
+gckEVENT_Unlock(
+ IN gckEVENT Event,
+ IN gceKERNEL_WHERE FromWhere,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gceSURF_TYPE Type
+ );
+
+gceSTATUS
+gckEVENT_CommitDone(
+ IN gckEVENT Event,
+ IN gceKERNEL_WHERE FromWhere
+ );
+
+gceSTATUS
+gckEVENT_Submit(
+ IN gckEVENT Event,
+ IN gctBOOL Wait,
+ IN gctBOOL FromPower
+ );
+
+/* Commit an event queue. */
+gceSTATUS
+gckEVENT_Commit(
+ IN gckEVENT Event,
+ IN gcsQUEUE_PTR Queue
+ );
+
+/* Schedule a composition event. */
+gceSTATUS
+gckEVENT_Compose(
+ IN gckEVENT Event,
+ IN gcsHAL_COMPOSE_PTR Info
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Notify(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+/* Event callback routine. */
+gceSTATUS
+gckEVENT_Interrupt(
+ IN gckEVENT Event,
+ IN gctUINT32 IDs
+ );
+
+gceSTATUS
+gckEVENT_Dump(
+ IN gckEVENT Event
+ );
+/******************************************************************************\
+******************************* gckCOMMAND Object ******************************
+\******************************************************************************/
+
+typedef struct _gckCOMMAND * gckCOMMAND;
+
+/* Construct a new gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Construct(
+ IN gckKERNEL Kernel,
+ OUT gckCOMMAND * Command
+ );
+
+/* Destroy an gckCOMMAND object. */
+gceSTATUS
+gckCOMMAND_Destroy(
+ IN gckCOMMAND Command
+ );
+
+/* Acquire command queue synchronization objects. */
+gceSTATUS
+gckCOMMAND_EnterCommit(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromPower
+ );
+
+/* Release command queue synchronization objects. */
+gceSTATUS
+gckCOMMAND_ExitCommit(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromPower
+ );
+
+/* Start the command queue. */
+gceSTATUS
+gckCOMMAND_Start(
+ IN gckCOMMAND Command
+ );
+
+/* Stop the command queue. */
+gceSTATUS
+gckCOMMAND_Stop(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromRecovery
+ );
+
+/* Commit a buffer to the command queue. */
+gceSTATUS
+gckCOMMAND_Commit(
+ IN gckCOMMAND Command,
+ IN gckCONTEXT Context,
+ IN gcoCMDBUF CommandBuffer,
+ IN gcsSTATE_DELTA_PTR StateDelta,
+ IN gcsQUEUE_PTR EventQueue,
+ IN gctUINT32 ProcessID
+ );
+
+/* Reserve space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Reserve(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequestedBytes,
+ OUT gctPOINTER * Buffer,
+ OUT gctSIZE_T * BufferSize
+ );
+
+/* Execute reserved space in the command buffer. */
+gceSTATUS
+gckCOMMAND_Execute(
+ IN gckCOMMAND Command,
+ IN gctSIZE_T RequstedBytes
+ );
+
+/* Stall the command queue. */
+gceSTATUS
+gckCOMMAND_Stall(
+ IN gckCOMMAND Command,
+ IN gctBOOL FromPower
+ );
+
+/* Attach user process. */
+gceSTATUS
+gckCOMMAND_Attach(
+ IN gckCOMMAND Command,
+ OUT gckCONTEXT * Context,
+ OUT gctSIZE_T * StateCount,
+ IN gctUINT32 ProcessID
+ );
+
+/* Detach user process. */
+gceSTATUS
+gckCOMMAND_Detach(
+ IN gckCOMMAND Command,
+ IN gckCONTEXT Context
+ );
+
+/******************************************************************************\
+********************************* gckMMU Object ********************************
+\******************************************************************************/
+
+typedef struct _gckMMU * gckMMU;
+
+/* Construct a new gckMMU object. */
+gceSTATUS
+gckMMU_Construct(
+ IN gckKERNEL Kernel,
+ IN gctSIZE_T MmuSize,
+ OUT gckMMU * Mmu
+ );
+
+/* Destroy an gckMMU object. */
+gceSTATUS
+gckMMU_Destroy(
+ IN gckMMU Mmu
+ );
+
+/* Enable the MMU. */
+gceSTATUS
+gckMMU_Enable(
+ IN gckMMU Mmu,
+ IN gctUINT32 PhysBaseAddr,
+ IN gctUINT32 PhysSize
+ );
+
+/* Allocate pages inside the MMU. */
+gceSTATUS
+gckMMU_AllocatePages(
+ IN gckMMU Mmu,
+ IN gctSIZE_T PageCount,
+ OUT gctPOINTER * PageTable,
+ OUT gctUINT32 * Address
+ );
+
+/* Remove a page table from the MMU. */
+gceSTATUS
+gckMMU_FreePages(
+ IN gckMMU Mmu,
+ IN gctPOINTER PageTable,
+ IN gctSIZE_T PageCount
+ );
+
+/* Set the MMU page with info. */
+gceSTATUS
+gckMMU_SetPage(
+ IN gckMMU Mmu,
+ IN gctUINT32 PageAddress,
+ IN gctUINT32 *PageEntry
+ );
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_InsertNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+
+gceSTATUS
+gckMMU_RemoveNode(
+ IN gckMMU Mmu,
+ IN gcuVIDMEM_NODE_PTR Node);
+#endif
+
+#ifdef __QNXNTO__
+gceSTATUS
+gckMMU_FreeHandleMemory(
+ IN gckKERNEL Kernel,
+ IN gckMMU Mmu,
+ IN gctUINT32 Pid
+ );
+#endif
+
+gceSTATUS
+gckMMU_Flush(
+ IN gckMMU Mmu
+ );
+
+
+#if VIVANTE_PROFILER
+gceSTATUS
+gckHARDWARE_QueryProfileRegisters(
+ IN gckHARDWARE Hardware,
+ OUT gcsPROFILER_COUNTERS * Counters
+ );
+#endif
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#if gcdENABLE_VG
+#include "gc_hal_vg.h"
+#endif
+
+#endif /* __gc_hal_h_ */
diff --git a/src/include_v4/gc_hal_base.h b/src/include_v4/gc_hal_base.h
new file mode 100644
index 0000000..72e23ad
--- /dev/null
+++ b/src/include_v4/gc_hal_base.h
@@ -0,0 +1,3612 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_base_h_
+#define __gc_hal_base_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#include "gc_hal_dump.h"
+#include "gc_hal_md5.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gckOS * gckOS;
+typedef struct _gcoHAL * gcoHAL;
+typedef struct _gcoOS * gcoOS;
+typedef struct _gco2D * gco2D;
+
+#ifndef VIVANTE_NO_3D
+typedef struct _gco3D * gco3D;
+#endif
+
+typedef struct _gcoSURF * gcoSURF;
+typedef struct _gcsSURF_INFO * gcsSURF_INFO_PTR;
+typedef struct _gcsSURF_NODE * gcsSURF_NODE_PTR;
+typedef struct _gcsSURF_FORMAT_INFO * gcsSURF_FORMAT_INFO_PTR;
+typedef struct _gcsPOINT * gcsPOINT_PTR;
+typedef struct _gcsSIZE * gcsSIZE_PTR;
+typedef struct _gcsRECT * gcsRECT_PTR;
+typedef struct _gcsBOUNDARY * gcsBOUNDARY_PTR;
+typedef struct _gcoDUMP * gcoDUMP;
+typedef struct _gcoHARDWARE * gcoHARDWARE;
+typedef union _gcuVIDMEM_NODE * gcuVIDMEM_NODE_PTR;
+
+#if gcdENABLE_VG
+typedef struct _gcoVG * gcoVG;
+typedef struct _gcsCOMPLETION_SIGNAL * gcsCOMPLETION_SIGNAL_PTR;
+typedef struct _gcsCONTEXT_MAP * gcsCONTEXT_MAP_PTR;
+#else
+typedef void * gcoVG;
+#endif
+
+/******************************************************************************\
+******************************* Process local storage *************************
+\******************************************************************************/
+
+typedef struct _gcsPLS * gcsPLS_PTR;
+typedef struct _gcsPLS
+{
+ /* Global objects. */
+ gcoOS os;
+ gcoHAL hal;
+
+ /* Internal memory pool. */
+ gctSIZE_T internalSize;
+ gctPHYS_ADDR internalPhysical;
+ gctPOINTER internalLogical;
+
+ /* External memory pool. */
+ gctSIZE_T externalSize;
+ gctPHYS_ADDR externalPhysical;
+ gctPOINTER externalLogical;
+
+ /* Contiguous memory pool. */
+ gctSIZE_T contiguousSize;
+ gctPHYS_ADDR contiguousPhysical;
+ gctPOINTER contiguousLogical;
+
+ /* EGL-specific process-wide objects. */
+ gctPOINTER eglDisplayInfo;
+ gctPOINTER eglSurfaceInfo;
+}
+gcsPLS;
+
+extern gcsPLS gcPLS;
+
+/******************************************************************************\
+******************************* Thread local storage *************************
+\******************************************************************************/
+
+typedef struct _gcsTLS * gcsTLS_PTR;
+
+typedef void (* gctTLS_DESTRUCTOR) (
+ gcsTLS_PTR TLS
+ );
+
+typedef struct _gcsTLS
+{
+ gceHARDWARE_TYPE currentType;
+ gcoHARDWARE hardware;
+ /* Only for separated 3D and 2D */
+ gcoHARDWARE hardware2D;
+#if gcdENABLE_VG
+ gcoVGHARDWARE vg;
+ gcoVG engineVG;
+#endif /* gcdENABLE_VG */
+ gctPOINTER context;
+ gctTLS_DESTRUCTOR destructor;
+ gctBOOL ProcessExiting;
+
+#ifndef VIVANTE_NO_3D
+ gco3D engine3D;
+#endif
+ gco2D engine2D;
+}
+gcsTLS;
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+typedef enum _gcePLS_VALUE
+{
+ gcePLS_VALUE_EGL_DISPLAY_INFO,
+ gcePLS_VALUE_EGL_SURFACE_INFO
+}
+gcePLS_VALUE;
+
+/* Video memory pool type. */
+typedef enum _gcePOOL
+{
+ gcvPOOL_UNKNOWN = 0,
+ gcvPOOL_DEFAULT,
+ gcvPOOL_LOCAL,
+ gcvPOOL_LOCAL_INTERNAL,
+ gcvPOOL_LOCAL_EXTERNAL,
+ gcvPOOL_UNIFIED,
+ gcvPOOL_SYSTEM,
+ gcvPOOL_VIRTUAL,
+ gcvPOOL_USER,
+ gcvPOOL_CONTIGUOUS,
+
+ gcvPOOL_NUMBER_OF_POOLS
+}
+gcePOOL;
+
+#ifndef VIVANTE_NO_3D
+/* Blending functions. */
+typedef enum _gceBLEND_FUNCTION
+{
+ gcvBLEND_ZERO,
+ gcvBLEND_ONE,
+ gcvBLEND_SOURCE_COLOR,
+ gcvBLEND_INV_SOURCE_COLOR,
+ gcvBLEND_SOURCE_ALPHA,
+ gcvBLEND_INV_SOURCE_ALPHA,
+ gcvBLEND_TARGET_COLOR,
+ gcvBLEND_INV_TARGET_COLOR,
+ gcvBLEND_TARGET_ALPHA,
+ gcvBLEND_INV_TARGET_ALPHA,
+ gcvBLEND_SOURCE_ALPHA_SATURATE,
+ gcvBLEND_CONST_COLOR,
+ gcvBLEND_INV_CONST_COLOR,
+ gcvBLEND_CONST_ALPHA,
+ gcvBLEND_INV_CONST_ALPHA,
+}
+gceBLEND_FUNCTION;
+
+/* Blending modes. */
+typedef enum _gceBLEND_MODE
+{
+ gcvBLEND_ADD,
+ gcvBLEND_SUBTRACT,
+ gcvBLEND_REVERSE_SUBTRACT,
+ gcvBLEND_MIN,
+ gcvBLEND_MAX,
+}
+gceBLEND_MODE;
+
+/* API flags. */
+typedef enum _gceAPI
+{
+ gcvAPI_D3D = 0x1,
+ gcvAPI_OPENGL = 0x2,
+ gcvAPI_OPENVG = 0x3,
+ gcvAPI_OPENCL = 0x4,
+}
+gceAPI;
+
+/* Depth modes. */
+typedef enum _gceDEPTH_MODE
+{
+ gcvDEPTH_NONE,
+ gcvDEPTH_Z,
+ gcvDEPTH_W,
+}
+gceDEPTH_MODE;
+#endif /* VIVANTE_NO_3D */
+
+typedef enum _gceWHERE
+{
+ gcvWHERE_COMMAND,
+ gcvWHERE_RASTER,
+ gcvWHERE_PIXEL,
+}
+gceWHERE;
+
+typedef enum _gceHOW
+{
+ gcvHOW_SEMAPHORE = 0x1,
+ gcvHOW_STALL = 0x2,
+ gcvHOW_SEMAPHORE_STALL = 0x3,
+}
+gceHOW;
+
+typedef enum _gceSignalHandlerType
+{
+ gcvHANDLE_SIGFPE_WHEN_SIGNAL_CODE_IS_0 = 0x1,
+}
+gceSignalHandlerType;
+
+
+#if gcdENABLE_VG
+/* gcsHAL_Limits*/
+typedef struct _gcsHAL_LIMITS
+{
+ /* chip info */
+ gceCHIPMODEL chipModel;
+ gctUINT32 chipRevision;
+ gctUINT32 featureCount;
+ gctUINT32 *chipFeatures;
+
+ /* target caps */
+ gctUINT32 maxWidth;
+ gctUINT32 maxHeight;
+ gctUINT32 multiTargetCount;
+ gctUINT32 maxSamples;
+
+}gcsHAL_LIMITS;
+#endif
+
+/******************************************************************************\
+*********** Generic Memory Allocation Optimization Using Containers ************
+\******************************************************************************/
+
+/* Generic container definition. */
+typedef struct _gcsCONTAINER_LINK * gcsCONTAINER_LINK_PTR;
+typedef struct _gcsCONTAINER_LINK
+{
+ /* Points to the next container. */
+ gcsCONTAINER_LINK_PTR next;
+}
+gcsCONTAINER_LINK;
+
+typedef struct _gcsCONTAINER_RECORD * gcsCONTAINER_RECORD_PTR;
+typedef struct _gcsCONTAINER_RECORD
+{
+ gcsCONTAINER_RECORD_PTR prev;
+ gcsCONTAINER_RECORD_PTR next;
+}
+gcsCONTAINER_RECORD;
+
+typedef struct _gcsCONTAINER * gcsCONTAINER_PTR;
+typedef struct _gcsCONTAINER
+{
+ gctUINT containerSize;
+ gctUINT recordSize;
+ gctUINT recordCount;
+ gcsCONTAINER_LINK_PTR containers;
+ gcsCONTAINER_RECORD freeList;
+ gcsCONTAINER_RECORD allocList;
+}
+gcsCONTAINER;
+
+gceSTATUS
+gcsCONTAINER_Construct(
+ IN gcsCONTAINER_PTR Container,
+ gctUINT RecordsPerContainer,
+ gctUINT RecordSize
+ );
+
+gceSTATUS
+gcsCONTAINER_Destroy(
+ IN gcsCONTAINER_PTR Container
+ );
+
+gceSTATUS
+gcsCONTAINER_AllocateRecord(
+ IN gcsCONTAINER_PTR Container,
+ OUT gctPOINTER * Record
+ );
+
+gceSTATUS
+gcsCONTAINER_FreeRecord(
+ IN gcsCONTAINER_PTR Container,
+ IN gctPOINTER Record
+ );
+
+gceSTATUS
+gcsCONTAINER_FreeAll(
+ IN gcsCONTAINER_PTR Container
+ );
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Construct a new gcoHAL object. */
+gceSTATUS
+gcoHAL_Construct(
+ IN gctPOINTER Context,
+ IN gcoOS Os,
+ OUT gcoHAL * Hal
+ );
+
+/* Destroy an gcoHAL object. */
+gceSTATUS
+gcoHAL_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Get pointer to gco2D object. */
+gceSTATUS
+gcoHAL_Get2DEngine(
+ IN gcoHAL Hal,
+ OUT gco2D * Engine
+ );
+
+#ifndef VIVANTE_NO_3D
+/* Get pointer to gco3D object. */
+gceSTATUS
+gcoHAL_Get3DEngine(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+gceSTATUS
+gcoHAL_Query3DEngine(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+gceSTATUS
+gcoHAL_Set3DEngine(
+ IN gcoHAL Hal,
+ IN gco3D Engine
+ );
+
+gceSTATUS
+gcoHAL_Get3DHardware(
+ IN gcoHAL Hal,
+ OUT gcoHARDWARE * Hardware
+ );
+
+gceSTATUS
+gcoHAL_Set3DHardware(
+ IN gcoHAL Hal,
+ IN gcoHARDWARE Hardware
+ );
+
+
+#endif /* VIVANTE_NO_3D */
+
+/* Verify whether the specified feature is available in hardware. */
+gceSTATUS
+gcoHAL_IsFeatureAvailable(
+ IN gcoHAL Hal,
+ IN gceFEATURE Feature
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gcoHAL_QueryChipIdentity(
+ IN gcoHAL Hal,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the minor features of the hardware. */
+gceSTATUS gcoHAL_QueryChipMinorFeatures(
+ IN gcoHAL Hal,
+ OUT gctUINT32* NumFeatures,
+ OUT gctUINT32* ChipMinorFeatures
+ );
+
+/* Query the amount of video memory. */
+gceSTATUS
+gcoHAL_QueryVideoMemory(
+ IN gcoHAL Hal,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Map video memory. */
+gceSTATUS
+gcoHAL_MapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ OUT gctPOINTER * Logical
+ );
+
+/* Unmap video memory. */
+gceSTATUS
+gcoHAL_UnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a buffer mapped through its physical address. */
+gceSTATUS
+gcoHAL_ScheduleUnmapMemory(
+ IN gcoHAL Hal,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T NumberOfBytes,
+ IN gctPOINTER Logical
+ );
+
+/* Schedule an unmap of a user buffer using event mechanism. */
+gceSTATUS
+gcoHAL_ScheduleUnmapUserMemory(
+ IN gcoHAL Hal,
+ IN gctPOINTER Info,
+ IN gctSIZE_T Size,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory
+ );
+
+/* Commit the current command buffer. */
+gceSTATUS
+gcoHAL_Commit(
+ IN gcoHAL Hal,
+ IN gctBOOL Stall
+ );
+
+/* Query the tile capabilities. */
+gceSTATUS
+gcoHAL_QueryTiled(
+ IN gcoHAL Hal,
+ OUT gctINT32 * TileWidth2D,
+ OUT gctINT32 * TileHeight2D,
+ OUT gctINT32 * TileWidth3D,
+ OUT gctINT32 * TileHeight3D
+ );
+
+gceSTATUS
+gcoHAL_Compact(
+ IN gcoHAL Hal
+ );
+
+#if VIVANTE_PROFILER /*gcdENABLE_PROFILING*/
+gceSTATUS
+gcoHAL_ProfileStart(
+ IN gcoHAL Hal
+ );
+
+gceSTATUS
+gcoHAL_ProfileEnd(
+ IN gcoHAL Hal,
+ IN gctCONST_STRING Title
+ );
+#endif
+
+/* Power Management */
+gceSTATUS
+gcoHAL_SetPowerManagementState(
+ IN gcoHAL Hal,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gcoHAL_QueryPowerManagementState(
+ IN gcoHAL Hal,
+ OUT gceCHIPPOWERSTATE *State
+ );
+
+/* Set the filter type for filter blit. */
+gceSTATUS
+gcoHAL_SetFilterType(
+ IN gcoHAL Hal,
+ IN gceFILTER_TYPE FilterType
+ );
+
+gceSTATUS
+gcoHAL_GetDump(
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Call the kernel HAL layer. */
+gceSTATUS
+gcoHAL_Call(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Schedule an event. */
+gceSTATUS
+gcoHAL_ScheduleEvent(
+ IN gcoHAL Hal,
+ IN OUT gcsHAL_INTERFACE_PTR Interface
+ );
+
+/* Destroy a surface. */
+gceSTATUS
+gcoHAL_DestroySurface(
+ IN gcoHAL Hal,
+ IN gcoSURF Surface
+ );
+
+/* Request a start/stop timestamp. */
+gceSTATUS
+gcoHAL_SetTimer(
+ IN gcoHAL Hal,
+ IN gctUINT32 Index,
+ IN gctBOOL Start
+ );
+
+/* Get Time delta from a Timer in microseconds. */
+gceSTATUS
+gcoHAL_GetTimerTime(
+ IN gcoHAL Hal,
+ IN gctUINT32 Timer,
+ OUT gctINT32_PTR TimeDelta
+ );
+
+/* set timeout value. */
+gceSTATUS
+gcoHAL_SetTimeOut(
+ IN gcoHAL Hal,
+ IN gctUINT32 timeOut
+ );
+
+gceSTATUS
+gcoHAL_SetHardwareType(
+ IN gcoHAL Hal,
+ IN gceHARDWARE_TYPE HardwardType
+ );
+
+gceSTATUS
+gcoHAL_GetHardwareType(
+ IN gcoHAL Hal,
+ OUT gceHARDWARE_TYPE * HardwardType
+ );
+
+gceSTATUS
+gcoHAL_QueryChipCount(
+ IN gcoHAL Hal,
+ OUT gctINT32 * Count
+ );
+
+gceSTATUS
+gcoHAL_QuerySeparated3D2D(
+ IN gcoHAL Hal
+ );
+
+/* Get pointer to gcoVG object. */
+gceSTATUS
+gcoHAL_GetVGEngine(
+ IN gcoHAL Hal,
+ OUT gcoVG * Engine
+ );
+
+#if gcdENABLE_VG
+gceSTATUS
+gcoHAL_QueryChipLimits(
+ IN gcoHAL Hal,
+ IN gctINT32 Chip,
+ OUT gcsHAL_LIMITS *Limits);
+
+gceSTATUS
+gcoHAL_QueryChipFeature(
+ IN gcoHAL Hal,
+ IN gctINT32 Chip,
+ IN gceFEATURE Feature);
+
+#endif
+/******************************************************************************\
+********************************** gcoOS Object *********************************
+\******************************************************************************/
+
+/* Get PLS value for given key */
+gctPOINTER
+gcoOS_GetPLSValue(
+ IN gcePLS_VALUE key
+ );
+
+/* Set PLS value of a given key */
+void
+gcoOS_SetPLSValue(
+ IN gcePLS_VALUE key,
+ OUT gctPOINTER value
+ );
+
+/* Get access to the thread local storage. */
+gceSTATUS
+gcoOS_GetTLS(
+ OUT gcsTLS_PTR * TLS
+ );
+
+/* Destroy the objects associated with the current thread. */
+void
+gcoOS_FreeThreadData(
+ IN gctBOOL ProcessExiting
+ );
+
+/* Construct a new gcoOS object. */
+gceSTATUS
+gcoOS_Construct(
+ IN gctPOINTER Context,
+ OUT gcoOS * Os
+ );
+
+/* Destroy an gcoOS object. */
+gceSTATUS
+gcoOS_Destroy(
+ IN gcoOS Os
+ );
+
+/* Get the base address for the physical memory. */
+gceSTATUS
+gcoOS_GetBaseAddress(
+ IN gcoOS Os,
+ OUT gctUINT32_PTR BaseAddress
+ );
+
+/* Allocate memory from the heap. */
+gceSTATUS
+gcoOS_Allocate(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Get allocated memory size. */
+gceSTATUS
+gcoOS_GetMemorySize(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ OUT gctSIZE_T_PTR MemorySize
+ );
+
+/* Free allocated memory. */
+gceSTATUS
+gcoOS_Free(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoOS_AllocateMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoOS_FreeMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory
+ );
+
+/* Allocate contiguous memory. */
+gceSTATUS
+gcoOS_AllocateContiguous(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free contiguous memory. */
+gceSTATUS
+gcoOS_FreeContiguous(
+ IN gcoOS Os,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+#if gcdENABLE_BANK_ALIGNMENT
+gceSTATUS
+gcoSURF_GetBankOffsetBytes(
+ IN gcoSURF Surfce,
+ IN gceSURF_TYPE Type,
+ IN gctUINT32 Stride,
+ IN gctUINT32_PTR Bytes
+ );
+#endif
+
+/* Map user memory. */
+gceSTATUS
+gcoOS_MapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ OUT gctPOINTER * Info,
+ OUT gctUINT32_PTR Address
+ );
+
+/* Unmap user memory. */
+gceSTATUS
+gcoOS_UnmapUserMemory(
+ IN gcoOS Os,
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Size,
+ IN gctPOINTER Info,
+ IN gctUINT32 Address
+ );
+
+/* Device I/O Control call to the kernel HAL layer. */
+gceSTATUS
+gcoOS_DeviceControl(
+ IN gcoOS Os,
+ IN gctUINT32 IoControlCode,
+ IN gctPOINTER InputBuffer,
+ IN gctSIZE_T InputBufferSize,
+ IN gctPOINTER OutputBuffer,
+ IN gctSIZE_T OutputBufferSize
+ );
+
+/* Allocate non paged memory. */
+gceSTATUS
+gcoOS_AllocateNonPagedMemory(
+ IN gcoOS Os,
+ IN gctBOOL InUserSpace,
+ IN OUT gctSIZE_T * Bytes,
+ OUT gctPHYS_ADDR * Physical,
+ OUT gctPOINTER * Logical
+ );
+
+/* Free non paged memory. */
+gceSTATUS
+gcoOS_FreeNonPagedMemory(
+ IN gcoOS Os,
+ IN gctSIZE_T Bytes,
+ IN gctPHYS_ADDR Physical,
+ IN gctPOINTER Logical
+ );
+
+#define gcmOS_SAFE_FREE(os, mem) \
+ gcoOS_Free(os, mem); \
+ mem = gcvNULL
+
+#define gcmkOS_SAFE_FREE(os, mem) \
+ gckOS_Free(os, mem); \
+ mem = gcvNULL
+
+typedef enum _gceFILE_MODE
+{
+ gcvFILE_CREATE = 0,
+ gcvFILE_APPEND,
+ gcvFILE_READ,
+ gcvFILE_CREATETEXT,
+ gcvFILE_APPENDTEXT,
+ gcvFILE_READTEXT,
+}
+gceFILE_MODE;
+
+/* Open a file. */
+gceSTATUS
+gcoOS_Open(
+ IN gcoOS Os,
+ IN gctCONST_STRING FileName,
+ IN gceFILE_MODE Mode,
+ OUT gctFILE * File
+ );
+
+/* Close a file. */
+gceSTATUS
+gcoOS_Close(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Read data from a file. */
+gceSTATUS
+gcoOS_Read(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctPOINTER Data,
+ OUT gctSIZE_T * ByteRead
+ );
+
+/* Write data to a file. */
+gceSTATUS
+gcoOS_Write(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Flush data to a file. */
+gceSTATUS
+gcoOS_Flush(
+ IN gcoOS Os,
+ IN gctFILE File
+ );
+
+/* Create an endpoint for communication. */
+gceSTATUS
+gcoOS_Socket(
+ IN gcoOS Os,
+ IN gctINT Domain,
+ IN gctINT Type,
+ IN gctINT Protocol,
+ OUT gctINT *SockFd
+ );
+
+/* Close a socket. */
+gceSTATUS
+gcoOS_CloseSocket(
+ IN gcoOS Os,
+ IN gctINT SockFd
+ );
+
+/* Initiate a connection on a socket. */
+gceSTATUS
+gcoOS_Connect(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctCONST_POINTER HostName,
+ IN gctUINT Port);
+
+/* Shut down part of connection on a socket. */
+gceSTATUS
+gcoOS_Shutdown(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctINT How
+ );
+
+/* Send a message on a socket. */
+gceSTATUS
+gcoOS_Send(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data,
+ IN gctINT Flags
+ );
+
+/* Initiate a connection on a socket. */
+gceSTATUS
+gcoOS_WaitForSend(
+ IN gcoOS Os,
+ IN gctINT SockFd,
+ IN gctINT Seconds,
+ IN gctINT MicroSeconds);
+
+/* Get environment variable value. */
+gceSTATUS
+gcoOS_GetEnv(
+ IN gcoOS Os,
+ IN gctCONST_STRING VarName,
+ OUT gctSTRING * Value
+ );
+
+/* Get current working directory. */
+gceSTATUS
+gcoOS_GetCwd(
+ IN gcoOS Os,
+ IN gctINT SizeInBytes,
+ OUT gctSTRING Buffer
+ );
+
+/* Get file status info. */
+gceSTATUS
+gcoOS_Stat(
+ IN gcoOS Os,
+ IN gctCONST_STRING FileName,
+ OUT gctPOINTER Buffer
+ );
+
+typedef enum _gceFILE_WHENCE
+{
+ gcvFILE_SEEK_SET,
+ gcvFILE_SEEK_CUR,
+ gcvFILE_SEEK_END
+}
+gceFILE_WHENCE;
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_Seek(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Offset,
+ IN gceFILE_WHENCE Whence
+ );
+
+/* Set the current position of a file. */
+gceSTATUS
+gcoOS_SetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ IN gctUINT32 Position
+ );
+
+/* Get the current position of a file. */
+gceSTATUS
+gcoOS_GetPos(
+ IN gcoOS Os,
+ IN gctFILE File,
+ OUT gctUINT32 * Position
+ );
+
+/* Perform a memory copy. */
+gceSTATUS
+gcoOS_MemCopy(
+ IN gctPOINTER Destination,
+ IN gctCONST_POINTER Source,
+ IN gctSIZE_T Bytes
+ );
+
+/* Perform a memory fill. */
+gceSTATUS
+gcoOS_MemFill(
+ IN gctPOINTER Destination,
+ IN gctUINT8 Filler,
+ IN gctSIZE_T Bytes
+ );
+
+/* Zero memory. */
+gceSTATUS
+gcoOS_ZeroMemory(
+ IN gctPOINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Same as strstr. */
+gceSTATUS
+gcoOS_StrStr(
+ IN gctCONST_STRING String,
+ IN gctCONST_STRING SubString,
+ OUT gctSTRING * Output
+ );
+
+/* Find the last occurance of a character inside a string. */
+gceSTATUS
+gcoOS_StrFindReverse(
+ IN gctCONST_STRING String,
+ IN gctINT8 Character,
+ OUT gctSTRING * Output
+ );
+
+gceSTATUS
+gcoOS_StrLen(
+ IN gctCONST_STRING String,
+ OUT gctSIZE_T * Length
+ );
+
+gceSTATUS
+gcoOS_StrDup(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ OUT gctSTRING * Target
+ );
+
+/* Copy a string. */
+gceSTATUS
+gcoOS_StrCopySafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Append a string. */
+gceSTATUS
+gcoOS_StrCatSafe(
+ IN gctSTRING Destination,
+ IN gctSIZE_T DestinationSize,
+ IN gctCONST_STRING Source
+ );
+
+/* Compare two strings. */
+gceSTATUS
+gcoOS_StrCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2
+ );
+
+/* Compare characters of two strings. */
+gceSTATUS
+gcoOS_StrNCmp(
+ IN gctCONST_STRING String1,
+ IN gctCONST_STRING String2,
+ IN gctSIZE_T Count
+ );
+
+/* Convert string to float. */
+gceSTATUS
+gcoOS_StrToFloat(
+ IN gctCONST_STRING String,
+ OUT gctFLOAT * Float
+ );
+
+/* Convert hex string to integer. */
+gceSTATUS gcoOS_HexStrToInt(
+ IN gctCONST_STRING String,
+ OUT gctINT * Int
+ );
+
+/* Convert hex string to float. */
+gceSTATUS gcoOS_HexStrToFloat(
+ IN gctCONST_STRING String,
+ OUT gctFLOAT * Float
+ );
+
+/* Convert string to integer. */
+gceSTATUS
+gcoOS_StrToInt(
+ IN gctCONST_STRING String,
+ OUT gctINT * Int
+ );
+
+gceSTATUS
+gcoOS_MemCmp(
+ IN gctCONST_POINTER Memory1,
+ IN gctCONST_POINTER Memory2,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_PrintStrSafe(
+ OUT gctSTRING String,
+ IN gctSIZE_T StringSize,
+ IN OUT gctUINT * Offset,
+ IN gctCONST_STRING Format,
+ ...
+ );
+
+gceSTATUS
+gcoOS_LoadLibrary(
+ IN gcoOS Os,
+ IN gctCONST_STRING Library,
+ OUT gctHANDLE * Handle
+ );
+
+gceSTATUS
+gcoOS_FreeLibrary(
+ IN gcoOS Os,
+ IN gctHANDLE Handle
+ );
+
+gceSTATUS
+gcoOS_GetProcAddress(
+ IN gcoOS Os,
+ IN gctHANDLE Handle,
+ IN gctCONST_STRING Name,
+ OUT gctPOINTER * Function
+ );
+
+gceSTATUS
+gcoOS_Compact(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_AddSignalHandler (
+ IN gceSignalHandlerType SignalHandlerType
+ );
+
+#if VIVANTE_PROFILER /*gcdENABLE_PROFILING*/
+gceSTATUS
+gcoOS_ProfileStart(
+ IN gcoOS Os
+ );
+
+gceSTATUS
+gcoOS_ProfileEnd(
+ IN gcoOS Os,
+ IN gctCONST_STRING Title
+ );
+
+gceSTATUS
+gcoOS_SetProfileSetting(
+ IN gcoOS Os,
+ IN gctBOOL Enable,
+ IN gctCONST_STRING FileName
+ );
+#endif
+
+/* Query the video memory. */
+gceSTATUS
+gcoOS_QueryVideoMemory(
+ IN gcoOS Os,
+ OUT gctPHYS_ADDR * InternalAddress,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctPHYS_ADDR * ExternalAddress,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctPHYS_ADDR * ContiguousAddress,
+ OUT gctSIZE_T * ContiguousSize
+ );
+
+/* Detect if the process is the executable specified. */
+gceSTATUS
+gcoOS_DetectProcessByName(
+ IN gctCONST_STRING Name
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Atoms ----------------------------------------------------------------*/
+
+typedef struct gcsATOM * gcsATOM_PTR;
+
+/* Construct an atom. */
+gceSTATUS
+gcoOS_AtomConstruct(
+ IN gcoOS Os,
+ OUT gcsATOM_PTR * Atom
+ );
+
+/* Destroy an atom. */
+gceSTATUS
+gcoOS_AtomDestroy(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom
+ );
+
+/* Increment an atom. */
+gceSTATUS
+gcoOS_AtomIncrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+/* Decrement an atom. */
+gceSTATUS
+gcoOS_AtomDecrement(
+ IN gcoOS Os,
+ IN gcsATOM_PTR Atom,
+ OUT gctINT32_PTR OldValue
+ );
+
+gctHANDLE
+gcoOS_GetCurrentProcessID(
+ void
+ );
+
+gctHANDLE
+gcoOS_GetCurrentThreadID(
+ void
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Time -----------------------------------------------------------------*/
+
+/* Get the number of milliseconds since the system started. */
+gctUINT32
+gcoOS_GetTicks(
+ void
+ );
+
+/* Get time in microseconds. */
+gceSTATUS
+gcoOS_GetTime(
+ gctUINT64_PTR Time
+ );
+
+/* Get CPU usage in microseconds. */
+gceSTATUS
+gcoOS_GetCPUTime(
+ gctUINT64_PTR CPUTime
+ );
+
+/* Get memory usage. */
+gceSTATUS
+gcoOS_GetMemoryUsage(
+ gctUINT32_PTR MaxRSS,
+ gctUINT32_PTR IxRSS,
+ gctUINT32_PTR IdRSS,
+ gctUINT32_PTR IsRSS
+ );
+
+/* Delay a number of microseconds. */
+gceSTATUS
+gcoOS_Delay(
+ IN gcoOS Os,
+ IN gctUINT32 Delay
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Threads --------------------------------------------------------------*/
+
+#ifdef _WIN32
+/* Cannot include windows.h here becuase "near" and "far"
+ * which are used in gcsDEPTH_INFO, are defined to nothing in WinDef.h.
+ * So, use the real value of DWORD and WINAPI, instead.
+ * DWORD is unsigned long, and WINAPI is __stdcall.
+ * If these two are change in WinDef.h, the following two typdefs
+ * need to be changed, too.
+ */
+typedef unsigned long gctTHREAD_RETURN;
+typedef unsigned long (__stdcall * gcTHREAD_ROUTINE)(void * Argument);
+#else
+typedef void * gctTHREAD_RETURN;
+typedef void * (* gcTHREAD_ROUTINE)(void *);
+#endif
+
+/* Create a new thread. */
+gceSTATUS
+gcoOS_CreateThread(
+ IN gcoOS Os,
+ IN gcTHREAD_ROUTINE Worker,
+ IN gctPOINTER Argument,
+ OUT gctPOINTER * Thread
+ );
+
+/* Close a thread. */
+gceSTATUS
+gcoOS_CloseThread(
+ IN gcoOS Os,
+ IN gctPOINTER Thread
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Mutexes --------------------------------------------------------------*/
+
+/* Create a new mutex. */
+gceSTATUS
+gcoOS_CreateMutex(
+ IN gcoOS Os,
+ OUT gctPOINTER * Mutex
+ );
+
+/* Delete a mutex. */
+gceSTATUS
+gcoOS_DeleteMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/* Acquire a mutex. */
+gceSTATUS
+gcoOS_AcquireMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex,
+ IN gctUINT32 Timeout
+ );
+
+/* Release a mutex. */
+gceSTATUS
+gcoOS_ReleaseMutex(
+ IN gcoOS Os,
+ IN gctPOINTER Mutex
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----- Signals --------------------------------------------------------------*/
+
+/* Create a signal. */
+gceSTATUS
+gcoOS_CreateSignal(
+ IN gcoOS Os,
+ IN gctBOOL ManualReset,
+ OUT gctSIGNAL * Signal
+ );
+
+/* Destroy a signal. */
+gceSTATUS
+gcoOS_DestroySignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal
+ );
+
+/* Signal a signal. */
+gceSTATUS
+gcoOS_Signal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctBOOL State
+ );
+
+/* Wait for a signal. */
+gceSTATUS
+gcoOS_WaitSignal(
+ IN gcoOS Os,
+ IN gctSIGNAL Signal,
+ IN gctUINT32 Wait
+ );
+
+/* Map a signal from another process */
+gceSTATUS
+gcoOS_MapSignal(
+ IN gctSIGNAL RemoteSignal,
+ OUT gctSIGNAL * LocalSignal
+ );
+
+/* Unmap a signal mapped from another process */
+gceSTATUS
+gcoOS_UnmapSignal(
+ IN gctSIGNAL Signal
+ );
+
+/* Write a register. */
+gceSTATUS
+gcoOS_WriteRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ IN gctUINT32 Data
+ );
+
+/* Read a register. */
+gceSTATUS
+gcoOS_ReadRegister(
+ IN gcoOS Os,
+ IN gctUINT32 Address,
+ OUT gctUINT32 * Data
+ );
+
+gceSTATUS
+gcoOS_CacheClean(
+ IN gcoOS Os,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_CacheFlush(
+ IN gcoOS Os,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_CacheInvalidate(
+ IN gcoOS Os,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoOS_MemoryBarrier(
+ IN gcoOS Os,
+ IN gctPOINTER Logical
+ );
+
+
+/*----------------------------------------------------------------------------*/
+/*----- Profile --------------------------------------------------------------*/
+
+gceSTATUS
+gckOS_GetProfileTick(
+ OUT gctUINT64_PTR Tick
+ );
+
+gceSTATUS
+gckOS_QueryProfileTickRate(
+ OUT gctUINT64_PTR TickRate
+ );
+
+gctUINT32
+gckOS_ProfileToMS(
+ IN gctUINT64 Ticks
+ );
+
+gceSTATUS
+gcoOS_GetProfileTick(
+ OUT gctUINT64_PTR Tick
+ );
+
+gceSTATUS
+gcoOS_QueryProfileTickRate(
+ OUT gctUINT64_PTR TickRate
+ );
+
+#define _gcmPROFILE_INIT(prefix, freq, start) \
+ do { \
+ prefix ## OS_QueryProfileTickRate(&(freq)); \
+ prefix ## OS_GetProfileTick(&(start)); \
+ } while (gcvFALSE)
+
+#define _gcmPROFILE_QUERY(prefix, start, ticks) \
+ do { \
+ prefix ## OS_GetProfileTick(&(ticks)); \
+ (ticks) = ((ticks) > (start)) ? ((ticks) - (start)) \
+ : (~0ull - (start) + (ticks) + 1); \
+ } while (gcvFALSE)
+
+#if gcdENABLE_PROFILING
+# define gcmkPROFILE_INIT(freq, start) _gcmPROFILE_INIT(gck, freq, start)
+# define gcmkPROFILE_QUERY(start, ticks) _gcmPROFILE_QUERY(gck, start, ticks)
+# define gcmPROFILE_INIT(freq, start) _gcmPROFILE_INIT(gco, freq, start)
+# define gcmPROFILE_QUERY(start, ticks) _gcmPROFILE_QUERY(gco, start, ticks)
+# define gcmPROFILE_ONLY(x) x
+# define gcmPROFILE_ELSE(x) do { } while (gcvFALSE)
+# define gcmPROFILE_DECLARE_ONLY(x) x
+# define gcmPROFILE_DECLARE_ELSE(x) typedef x
+#else
+# define gcmkPROFILE_INIT(start, freq) do { } while (gcvFALSE)
+# define gcmkPROFILE_QUERY(start, ticks) do { } while (gcvFALSE)
+# define gcmPROFILE_INIT(start, freq) do { } while (gcvFALSE)
+# define gcmPROFILE_QUERY(start, ticks) do { } while (gcvFALSE)
+# define gcmPROFILE_ONLY(x) do { } while (gcvFALSE)
+# define gcmPROFILE_ELSE(x) x
+# define gcmPROFILE_DECLARE_ONLY(x) typedef x
+# define gcmPROFILE_DECLARE_ELSE(x) x
+#endif
+
+/*******************************************************************************
+** gcoMATH object
+*/
+
+#define gcdPI 3.14159265358979323846f
+
+/* Kernel. */
+gctINT
+gckMATH_ModuloInt(
+ IN gctINT X,
+ IN gctINT Y
+ );
+
+/* User. */
+gctUINT32
+gcoMATH_Log2in5dot5(
+ IN gctINT X
+ );
+
+
+gctFLOAT
+gcoMATH_UIntAsFloat(
+ IN gctUINT32 X
+ );
+
+gctUINT32
+gcoMATH_FloatAsUInt(
+ IN gctFLOAT X
+ );
+
+gctBOOL
+gcoMATH_CompareEqualF(
+ IN gctFLOAT X,
+ IN gctFLOAT Y
+ );
+
+gctUINT16
+gcoMATH_UInt8AsFloat16(
+ IN gctUINT8 X
+ );
+
+/******************************************************************************\
+**************************** Coordinate Structures *****************************
+\******************************************************************************/
+
+typedef struct _gcsPOINT
+{
+ gctINT32 x;
+ gctINT32 y;
+}
+gcsPOINT;
+
+typedef struct _gcsSIZE
+{
+ gctINT32 width;
+ gctINT32 height;
+}
+gcsSIZE;
+
+typedef struct _gcsRECT
+{
+ gctINT32 left;
+ gctINT32 top;
+ gctINT32 right;
+ gctINT32 bottom;
+}
+gcsRECT;
+
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*------------------------------- gcoSURF Common ------------------------------*/
+
+/* Color format classes. */
+typedef enum _gceFORMAT_CLASS
+{
+ gcvFORMAT_CLASS_RGBA = 4500,
+ gcvFORMAT_CLASS_YUV,
+ gcvFORMAT_CLASS_INDEX,
+ gcvFORMAT_CLASS_LUMINANCE,
+ gcvFORMAT_CLASS_BUMP,
+ gcvFORMAT_CLASS_DEPTH,
+}
+gceFORMAT_CLASS;
+
+/* Special enums for width field in gcsFORMAT_COMPONENT. */
+typedef enum _gceCOMPONENT_CONTROL
+{
+ gcvCOMPONENT_NOTPRESENT = 0x00,
+ gcvCOMPONENT_DONTCARE = 0x80,
+ gcvCOMPONENT_WIDTHMASK = 0x7F,
+ gcvCOMPONENT_ODD = 0x80
+}
+gceCOMPONENT_CONTROL;
+
+/* Color format component parameters. */
+typedef struct _gcsFORMAT_COMPONENT
+{
+ gctUINT8 start;
+ gctUINT8 width;
+}
+gcsFORMAT_COMPONENT;
+
+/* RGBA color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_RGBA
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT red;
+ gcsFORMAT_COMPONENT green;
+ gcsFORMAT_COMPONENT blue;
+}
+gcsFORMAT_CLASS_TYPE_RGBA;
+
+/* YUV color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_YUV
+{
+ gcsFORMAT_COMPONENT y;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT v;
+}
+gcsFORMAT_CLASS_TYPE_YUV;
+
+/* Index color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_INDEX
+{
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_INDEX;
+
+/* Luminance color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_LUMINANCE
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT value;
+}
+gcsFORMAT_CLASS_TYPE_LUMINANCE;
+
+/* Bump map color format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_BUMP
+{
+ gcsFORMAT_COMPONENT alpha;
+ gcsFORMAT_COMPONENT l;
+ gcsFORMAT_COMPONENT v;
+ gcsFORMAT_COMPONENT u;
+ gcsFORMAT_COMPONENT q;
+ gcsFORMAT_COMPONENT w;
+}
+gcsFORMAT_CLASS_TYPE_BUMP;
+
+/* Depth and stencil format class. */
+typedef struct _gcsFORMAT_CLASS_TYPE_DEPTH
+{
+ gcsFORMAT_COMPONENT depth;
+ gcsFORMAT_COMPONENT stencil;
+}
+gcsFORMAT_CLASS_TYPE_DEPTH;
+
+/* Format parameters. */
+typedef struct _gcsSURF_FORMAT_INFO
+{
+ /* Format code and class. */
+ gceSURF_FORMAT format;
+ gceFORMAT_CLASS fmtClass;
+
+ /* The size of one pixel in bits. */
+ gctUINT8 bitsPerPixel;
+
+ /* Component swizzle. */
+ gceSURF_SWIZZLE swizzle;
+
+ /* Some formats have two neighbour pixels interleaved together. */
+ /* To describe such format, set the flag to 1 and add another */
+ /* like this one describing the odd pixel format. */
+ gctUINT8 interleaved;
+
+ /* Format components. */
+ union
+ {
+ gcsFORMAT_CLASS_TYPE_BUMP bump;
+ gcsFORMAT_CLASS_TYPE_RGBA rgba;
+ gcsFORMAT_CLASS_TYPE_YUV yuv;
+ gcsFORMAT_CLASS_TYPE_LUMINANCE lum;
+ gcsFORMAT_CLASS_TYPE_INDEX index;
+ gcsFORMAT_CLASS_TYPE_DEPTH depth;
+ } u;
+}
+gcsSURF_FORMAT_INFO;
+
+/* Frame buffer information. */
+typedef struct _gcsSURF_FRAMEBUFFER
+{
+ gctPOINTER logical;
+ gctUINT width, height;
+ gctINT stride;
+ gceSURF_FORMAT format;
+}
+gcsSURF_FRAMEBUFFER;
+
+typedef struct _gcsVIDMEM_NODE_SHARED_INFO
+{
+ gctBOOL tileStatusDisabled;
+ gcsPOINT SrcOrigin;
+ gcsPOINT DestOrigin;
+ gcsSIZE RectSize;
+ gctUINT32 clearValue;
+}
+gcsVIDMEM_NODE_SHARED_INFO;
+
+/* Generic pixel component descriptors. */
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XXX8;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_XX8X;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_X8XX;
+extern gcsFORMAT_COMPONENT gcvPIXEL_COMP_8XXX;
+
+typedef enum _gceORIENTATION
+{
+ gcvORIENTATION_TOP_BOTTOM,
+ gcvORIENTATION_BOTTOM_TOP,
+}
+gceORIENTATION;
+
+
+/* Construct a new gcoSURF object. */
+gceSTATUS
+gcoSURF_Construct(
+ IN gcoHAL Hal,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+/* Destroy an gcoSURF object. */
+gceSTATUS
+gcoSURF_Destroy(
+ IN gcoSURF Surface
+ );
+
+/* Map user-allocated surface. */
+gceSTATUS
+gcoSURF_MapUserSurface(
+ IN gcoSURF Surface,
+ IN gctUINT Alignment,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Query vid mem node info. */
+gceSTATUS
+gcoSURF_QueryVidMemNode(
+ IN gcoSURF Surface,
+ OUT gcuVIDMEM_NODE_PTR * Node,
+ OUT gcePOOL * Pool,
+ OUT gctUINT_PTR Bytes
+ );
+
+/* Set usage attribute of a surface. */
+gceSTATUS
+gcoSURF_SetUsage(
+ IN gcoSURF Surface,
+ IN gceSURF_USAGE Usage
+ );
+
+/* Return usage attribute of a surface. */
+gceSTATUS
+gcoSURF_QueryUsage(
+ IN gcoSURF Surface,
+ OUT gceSURF_USAGE *Usage
+ );
+
+/* Set the color type of the surface. */
+gceSTATUS
+gcoSURF_SetColorType(
+ IN gcoSURF Surface,
+ IN gceSURF_COLOR_TYPE ColorType
+ );
+
+/* Get the color type of the surface. */
+gceSTATUS
+gcoSURF_GetColorType(
+ IN gcoSURF Surface,
+ OUT gceSURF_COLOR_TYPE *ColorType
+ );
+
+/* Set the surface ration angle. */
+gceSTATUS
+gcoSURF_SetRotation(
+ IN gcoSURF Surface,
+ IN gceSURF_ROTATION Rotation
+ );
+
+gceSTATUS
+gcoSURF_IsValid(
+ IN gcoSURF Surface
+ );
+
+#ifndef VIVANTE_NO_3D
+/* Verify and return the state of the tile status mechanism. */
+gceSTATUS
+gcoSURF_IsTileStatusSupported(
+ IN gcoSURF Surface
+ );
+
+/* Process tile status for the specified surface. */
+gceSTATUS
+gcoSURF_SetTileStatus(
+ IN gcoSURF Surface
+ );
+
+/* Enable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_EnableTileStatus(
+ IN gcoSURF Surface
+ );
+
+/* Disable tile status for the specified surface. */
+gceSTATUS
+gcoSURF_DisableTileStatus(
+ IN gcoSURF Surface,
+ IN gctBOOL Decompress
+ );
+#endif /* VIVANTE_NO_3D */
+
+/* Get surface size. */
+gceSTATUS
+gcoSURF_GetSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctUINT * Depth
+ );
+
+/* Get surface aligned sizes. */
+gceSTATUS
+gcoSURF_GetAlignedSize(
+ IN gcoSURF Surface,
+ OUT gctUINT * Width,
+ OUT gctUINT * Height,
+ OUT gctINT * Stride
+ );
+
+/* Get alignments. */
+gceSTATUS
+gcoSURF_GetAlignment(
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ OUT gctUINT * AddressAlignment,
+ OUT gctUINT * XAlignment,
+ OUT gctUINT * YAlignment
+ );
+
+/* Get surface type and format. */
+gceSTATUS
+gcoSURF_GetFormat(
+ IN gcoSURF Surface,
+ OUT gceSURF_TYPE * Type,
+ OUT gceSURF_FORMAT * Format
+ );
+
+/* Get surface tiling. */
+gceSTATUS
+gcoSURF_GetTiling(
+ IN gcoSURF Surface,
+ OUT gceTILING * Tiling
+ );
+
+/* Lock the surface. */
+gceSTATUS
+gcoSURF_Lock(
+ IN gcoSURF Surface,
+ IN OUT gctUINT32 * Address,
+ IN OUT gctPOINTER * Memory
+ );
+
+/* Unlock the surface. */
+gceSTATUS
+gcoSURF_Unlock(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory
+ );
+
+/* Return pixel format parameters. */
+gceSTATUS
+gcoSURF_QueryFormat(
+ IN gceSURF_FORMAT Format,
+ OUT gcsSURF_FORMAT_INFO_PTR * Info
+ );
+
+/* Compute the color pixel mask. */
+gceSTATUS
+gcoSURF_ComputeColorMask(
+ IN gcsSURF_FORMAT_INFO_PTR Format,
+ OUT gctUINT32_PTR ColorMask
+ );
+
+/* Flush the surface. */
+gceSTATUS
+gcoSURF_Flush(
+ IN gcoSURF Surface
+ );
+
+/* Fill surface from it's tile status buffer. */
+gceSTATUS
+gcoSURF_FillFromTile(
+ IN gcoSURF Surface
+ );
+
+/* Fill surface with a value. */
+gceSTATUS
+gcoSURF_Fill(
+ IN gcoSURF Surface,
+ IN gcsPOINT_PTR Origin,
+ IN gcsSIZE_PTR Size,
+ IN gctUINT32 Value,
+ IN gctUINT32 Mask
+ );
+
+/* Alpha blend two surfaces together. */
+gceSTATUS
+gcoSURF_Blend(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrig,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsSIZE_PTR Size,
+ IN gceSURF_BLEND_MODE Mode
+ );
+
+/* Create a new gcoSURF wrapper object. */
+gceSTATUS
+gcoSURF_ConstructWrapper(
+ IN gcoHAL Hal,
+ OUT gcoSURF * Surface
+ );
+
+/* Set the underlying buffer for the surface wrapper. */
+gceSTATUS
+gcoSURF_SetBuffer(
+ IN gcoSURF Surface,
+ IN gceSURF_TYPE Type,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Stride,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Physical
+ );
+
+/* Set the size of the surface in pixels and map the underlying buffer. */
+gceSTATUS
+gcoSURF_SetWindow(
+ IN gcoSURF Surface,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height
+ );
+
+/* Increase reference count of the surface. */
+gceSTATUS
+gcoSURF_ReferenceSurface(
+ IN gcoSURF Surface
+ );
+
+/* Get surface reference count. */
+gceSTATUS
+gcoSURF_QueryReferenceCount(
+ IN gcoSURF Surface,
+ OUT gctINT32 * ReferenceCount
+ );
+
+/* Set surface orientation. */
+gceSTATUS
+gcoSURF_SetOrientation(
+ IN gcoSURF Surface,
+ IN gceORIENTATION Orientation
+ );
+
+/* Query surface orientation. */
+gceSTATUS
+gcoSURF_QueryOrientation(
+ IN gcoSURF Surface,
+ OUT gceORIENTATION * Orientation
+ );
+
+gceSTATUS
+gcoSURF_SetOffset(
+ IN gcoSURF Surface,
+ IN gctUINT Offset
+ );
+
+gceSTATUS
+gcoSURF_NODE_Cache(
+ IN gcsSURF_NODE_PTR Node,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes,
+ IN gceCACHEOPERATION Operation
+ );
+
+/* Perform CPU cache operation on surface */
+gceSTATUS
+gcoSURF_CPUCacheOperation(
+ IN gcoSURF Surface,
+ IN gceCACHEOPERATION Operation
+ );
+
+
+gceSTATUS
+gcoSURF_SetLinearResolveAddress(
+ IN gcoSURF Surface,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory
+ );
+/******************************************************************************\
+********************************* gcoDUMP Object ********************************
+\******************************************************************************/
+
+/* Construct a new gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Construct(
+ IN gcoOS Os,
+ IN gcoHAL Hal,
+ OUT gcoDUMP * Dump
+ );
+
+/* Destroy a gcoDUMP object. */
+gceSTATUS
+gcoDUMP_Destroy(
+ IN gcoDUMP Dump
+ );
+
+/* Enable/disable dumping. */
+gceSTATUS
+gcoDUMP_Control(
+ IN gcoDUMP Dump,
+ IN gctSTRING FileName
+ );
+
+gceSTATUS
+gcoDUMP_IsEnabled(
+ IN gcoDUMP Dump,
+ OUT gctBOOL * Enabled
+ );
+
+/* Add surface. */
+gceSTATUS
+gcoDUMP_AddSurface(
+ IN gcoDUMP Dump,
+ IN gctINT32 Width,
+ IN gctINT32 Height,
+ IN gceSURF_FORMAT PixelFormat,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount
+ );
+
+/* Mark the beginning of a frame. */
+gceSTATUS
+gcoDUMP_FrameBegin(
+ IN gcoDUMP Dump
+ );
+
+/* Mark the end of a frame. */
+gceSTATUS
+gcoDUMP_FrameEnd(
+ IN gcoDUMP Dump
+ );
+
+/* Dump data. */
+gceSTATUS
+gcoDUMP_DumpData(
+ IN gcoDUMP Dump,
+ IN gceDUMP_TAG Type,
+ IN gctUINT32 Address,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Delete an address. */
+gceSTATUS
+gcoDUMP_Delete(
+ IN gcoDUMP Dump,
+ IN gctUINT32 Address
+ );
+
+
+/******************************************************************************\
+******************************* gcsRECT Structure ******************************
+\******************************************************************************/
+
+/* Initialize rectangle structure. */
+gceSTATUS
+gcsRECT_Set(
+ OUT gcsRECT_PTR Rect,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Return the width of the rectangle. */
+gceSTATUS
+gcsRECT_Width(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Width
+ );
+
+/* Return the height of the rectangle. */
+gceSTATUS
+gcsRECT_Height(
+ IN gcsRECT_PTR Rect,
+ OUT gctINT32 * Height
+ );
+
+/* Ensure that top left corner is to the left and above the right bottom. */
+gceSTATUS
+gcsRECT_Normalize(
+ IN OUT gcsRECT_PTR Rect
+ );
+
+/* Compare two rectangles. */
+gceSTATUS
+gcsRECT_IsEqual(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * Equal
+ );
+
+/* Compare the sizes of two rectangles. */
+gceSTATUS
+gcsRECT_IsOfEqualSize(
+ IN gcsRECT_PTR Rect1,
+ IN gcsRECT_PTR Rect2,
+ OUT gctBOOL * EqualSize
+ );
+
+gceSTATUS
+gcsRECT_RelativeRotation(
+ IN gceSURF_ROTATION Orientation,
+ IN OUT gceSURF_ROTATION *Relation);
+
+gceSTATUS
+
+gcsRECT_Rotate(
+
+ IN OUT gcsRECT_PTR Rect,
+
+ IN gceSURF_ROTATION Rotation,
+
+ IN gceSURF_ROTATION toRotation,
+
+ IN gctINT32 SurfaceWidth,
+
+ IN gctINT32 SurfaceHeight
+
+ );
+
+/******************************************************************************\
+**************************** gcsBOUNDARY Structure *****************************
+\******************************************************************************/
+
+typedef struct _gcsBOUNDARY
+{
+ gctINT x;
+ gctINT y;
+ gctINT width;
+ gctINT height;
+}
+gcsBOUNDARY;
+
+/******************************************************************************\
+********************************* gcoHEAP Object ********************************
+\******************************************************************************/
+
+typedef struct _gcoHEAP * gcoHEAP;
+
+/* Construct a new gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Construct(
+ IN gcoOS Os,
+ IN gctSIZE_T AllocationSize,
+ OUT gcoHEAP * Heap
+ );
+
+/* Destroy an gcoHEAP object. */
+gceSTATUS
+gcoHEAP_Destroy(
+ IN gcoHEAP Heap
+ );
+
+/* Allocate memory. */
+gceSTATUS
+gcoHEAP_Allocate(
+ IN gcoHEAP Heap,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcoHEAP_GetMemorySize(
+ IN gcoHEAP Heap,
+ IN gctPOINTER Memory,
+ OUT gctSIZE_T_PTR MemorySize
+ );
+
+/* Free memory. */
+gceSTATUS
+gcoHEAP_Free(
+ IN gcoHEAP Heap,
+ IN gctPOINTER Node
+ );
+
+#if (VIVANTE_PROFILER /*gcdENABLE_PROFILING*/ || gcdDEBUG)
+/* Profile the heap. */
+gceSTATUS
+gcoHEAP_ProfileStart(
+ IN gcoHEAP Heap
+ );
+
+gceSTATUS
+gcoHEAP_ProfileEnd(
+ IN gcoHEAP Heap,
+ IN gctCONST_STRING Title
+ );
+#endif
+
+
+/******************************************************************************\
+******************************* Debugging Macros *******************************
+\******************************************************************************/
+
+void
+gcoOS_SetDebugLevel(
+ IN gctUINT32 Level
+ );
+
+void
+gcoOS_GetDebugLevel(
+ OUT gctUINT32_PTR DebugLevel
+ );
+
+void
+gcoOS_SetDebugZone(
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_GetDebugZone(
+ IN gctUINT32 Zone,
+ OUT gctUINT32_PTR DebugZone
+ );
+
+void
+gcoOS_SetDebugLevelZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone
+ );
+
+void
+gcoOS_SetDebugZones(
+ IN gctUINT32 Zones,
+ IN gctBOOL Enable
+ );
+
+void
+gcoOS_SetDebugFile(
+ IN gctCONST_STRING FileName
+ );
+
+gctFILE
+gcoOS_ReplaceDebugFile(
+ IN gctFILE fp
+ );
+
+/*******************************************************************************
+**
+** gcmFATAL
+**
+** Print a message to the debugger and execute a break point.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugFatal(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_FATAL)
+# define gcmFATAL gcoOS_DebugFatal
+# define gcmkFATAL gckOS_DebugFatal
+#elif gcdHAS_ELLIPSES
+# define gcmFATAL(...)
+# define gcmkFATAL(...)
+#else
+ gcmINLINE static void
+ __dummy_fatal(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmFATAL __dummy_fatal
+# define gcmkFATAL __dummy_fatal
+#endif
+
+#define gcmENUM2TEXT(e) case e: return #e
+
+/*******************************************************************************
+**
+** gcmTRACE
+**
+** Print a message to the debugfer if the correct level has been set. In
+** retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** level Level of message.
+** message Message.
+** ... Optional arguments.
+*/
+#define gcvLEVEL_NONE -1
+#define gcvLEVEL_ERROR 0
+#define gcvLEVEL_WARNING 1
+#define gcvLEVEL_INFO 2
+#define gcvLEVEL_VERBOSE 3
+
+void
+gckOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_DebugTraceN(
+ IN gctUINT32 Level,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugTrace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+# define gcmTRACE gcoOS_DebugTrace
+# define gcmkTRACE gckOS_DebugTrace
+# define gcmkTRACE_N gckOS_DebugTraceN
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE(...)
+# define gcmkTRACE(...)
+# define gcmkTRACE_N(...)
+#else
+ gcmINLINE static void
+ __dummy_trace(
+ IN gctUINT32 Level,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+ gcmINLINE static void
+ __dummy_trace_n(
+ IN gctUINT32 Level,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+# define gcmTRACE __dummy_trace
+# define gcmkTRACE __dummy_trace
+# define gcmkTRACE_N __dummy_trace_n
+#endif
+
+/* Zones common for kernel and user. */
+#define gcvZONE_OS (1 << 0)
+#define gcvZONE_HARDWARE (1 << 1)
+#define gcvZONE_HEAP (1 << 2)
+#define gcvZONE_SIGNAL (1 << 27)
+
+/* Kernel zones. */
+#define gcvZONE_KERNEL (1 << 3)
+#define gcvZONE_VIDMEM (1 << 4)
+#define gcvZONE_COMMAND (1 << 5)
+#define gcvZONE_DRIVER (1 << 6)
+#define gcvZONE_CMODEL (1 << 7)
+#define gcvZONE_MMU (1 << 8)
+#define gcvZONE_EVENT (1 << 9)
+#define gcvZONE_DEVICE (1 << 10)
+#define gcvZONE_DATABASE (1 << 11)
+#define gcvZONE_INTERRUPT (1 << 12)
+
+/* User zones. */
+#define gcvZONE_HAL (1 << 3)
+#define gcvZONE_BUFFER (1 << 4)
+#define gcvZONE_CONTEXT (1 << 5)
+#define gcvZONE_SURFACE (1 << 6)
+#define gcvZONE_INDEX (1 << 7)
+#define gcvZONE_STREAM (1 << 8)
+#define gcvZONE_TEXTURE (1 << 9)
+#define gcvZONE_2D (1 << 10)
+#define gcvZONE_3D (1 << 11)
+#define gcvZONE_COMPILER (1 << 12)
+#define gcvZONE_MEMORY (1 << 13)
+#define gcvZONE_STATE (1 << 14)
+#define gcvZONE_AUX (1 << 15)
+#define gcvZONE_VERTEX (1 << 16)
+#define gcvZONE_CL (1 << 17)
+#define gcvZONE_COMPOSITION (1 << 17)
+#define gcvZONE_VG (1 << 18)
+#define gcvZONE_IMAGE (1 << 19)
+#define gcvZONE_UTILITY (1 << 20)
+#define gcvZONE_PARAMETERS (1 << 21)
+
+/* API definitions. */
+#define gcvZONE_API_HAL (1 << 28)
+#define gcvZONE_API_EGL (2 << 28)
+#define gcvZONE_API_ES11 (3 << 28)
+#define gcvZONE_API_ES20 (4 << 28)
+#define gcvZONE_API_VG11 (5 << 28)
+#define gcvZONE_API_GL (6 << 28)
+#define gcvZONE_API_DFB (7 << 28)
+#define gcvZONE_API_GDI (8 << 28)
+#define gcvZONE_API_D3D (9 << 28)
+
+
+#define gcmZONE_GET_API(zone) ((zone) >> 28)
+/*Set gcdZONE_MASE like 0x0 | gcvZONE_API_EGL
+will enable print EGL module debug info*/
+#define gcdZONE_MASK 0x0FFFFFFF
+
+/* Handy zones. */
+#define gcvZONE_NONE 0
+#define gcvZONE_ALL 0x0FFFFFFF
+
+/*Dump API depth set 1 for API, 2 for API and API behavior*/
+#define gcvDUMP_API_DEPTH 1
+
+/*******************************************************************************
+**
+** gcmTRACE_ZONE
+**
+** Print a message to the debugger if the correct level and zone has been
+** set. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** Level Level of message.
+** Zone Zone of message.
+** Message Message.
+** ... Optional arguments.
+*/
+
+void
+gckOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_DebugTraceZoneN(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_DebugTraceZone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_TRACE)
+# define gcmTRACE_ZONE gcoOS_DebugTraceZone
+# define gcmkTRACE_ZONE gckOS_DebugTraceZone
+# define gcmkTRACE_ZONE_N gckOS_DebugTraceZoneN
+#elif gcdHAS_ELLIPSES
+# define gcmTRACE_ZONE(...)
+# define gcmkTRACE_ZONE(...)
+# define gcmkTRACE_ZONE_N(...)
+#else
+ gcmINLINE static void
+ __dummy_trace_zone(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+ gcmINLINE static void
+ __dummy_trace_zone_n(
+ IN gctUINT32 Level,
+ IN gctUINT32 Zone,
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+
+# define gcmTRACE_ZONE __dummy_trace_zone
+# define gcmkTRACE_ZONE __dummy_trace_zone
+# define gcmkTRACE_ZONE_N __dummy_trace_zone_n
+#endif
+
+/*******************************************************************************
+**
+** gcmDEBUG_ONLY
+**
+** Execute a statement or function only in DEBUG mode.
+**
+** ARGUMENTS:
+**
+** f Statement or function to execute.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+# define gcmDEBUG_ONLY(f) f
+#else
+# define gcmDEBUG_ONLY(f)
+#endif
+
+/*******************************************************************************
+**
+** gcmSTACK_PUSH
+** gcmSTACK_POP
+** gcmSTACK_DUMP
+**
+** Push or pop a function with entry arguments on the trace stack.
+**
+** ARGUMENTS:
+**
+** Function Name of function.
+** Line Line number.
+** Text Optional text.
+** ... Optional arguments for text.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_STACK)
+ void
+ gcoOS_StackPush(
+ IN gctCONST_STRING Function,
+ IN gctINT Line,
+ IN gctCONST_STRING Text,
+ ...
+ );
+ void
+ gcoOS_StackPop(
+ IN gctCONST_STRING Function
+ );
+ void
+ gcoOS_StackDump(
+ void
+ );
+# define gcmSTACK_PUSH gcoOS_StackPush
+# define gcmSTACK_POP gcoOS_StackPop
+# define gcmSTACK_DUMP gcoOS_StackDump
+#elif gcdHAS_ELLIPSES
+# define gcmSTACK_PUSH(...) do { } while (0)
+# define gcmSTACK_POP(Function) do { } while (0)
+# define gcmSTACK_DUMP() do { } while (0)
+#else
+ gcmINLINE static void
+ __dummy_stack_push(
+ IN gctCONST_STRING Function,
+ IN gctINT Line,
+ IN gctCONST_STRING Text, ...
+ )
+ {
+ }
+# define gcmSTACK_PUSH __dummy_stack_push
+# define gcmSTACK_POP(Function) do { } while (0)
+# define gcmSTACK_DUMP() do { } while (0)
+#endif
+
+/******************************************************************************\
+******************************** Logging Macros ********************************
+\******************************************************************************/
+
+#define gcdHEADER_LEVEL gcvLEVEL_VERBOSE
+
+
+#if gcdENABLE_PROFILING
+void
+gcoOS_ProfileDB(
+ IN gctCONST_STRING Function,
+ IN OUT gctBOOL_PTR Initialized
+ );
+
+#define gcmHEADER() \
+ static gctBOOL __profile__initialized__ = gcvFALSE; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, gcvNULL, gcvNULL); \
+ gcoOS_ProfileDB(__FUNCTION__, &__profile__initialized__)
+#define gcmHEADER_ARG(...) \
+ static gctBOOL __profile__initialized__ = gcvFALSE; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, Text, __VA_ARGS__); \
+ gcoOS_ProfileDB(__FUNCTION__, &__profile__initialized__)
+#define gcmFOOTER() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(__FUNCTION__, gcvNULL)
+#define gcmFOOTER_NO() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(__FUNCTION__, gcvNULL)
+#define gcmFOOTER_ARG(...) \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(__FUNCTION__, gcvNULL)
+#define gcmFOOTER_KILL() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcoOS_ProfileDB(gcvNULL, gcvNULL)
+
+#else /* gcdENABLE_PROFILING */
+
+#if gcdHAS_ELLIPSES
+#define gcmHEADER() \
+ gctINT8 __user__ = 1; \
+ gctINT8_PTR __user_ptr__ = &__user__; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, gcvNULL, gcvNULL); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+#else
+ gcmINLINE static void
+ __dummy_header(void)
+ {
+ }
+# define gcmHEADER __dummy_header
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmHEADER_ARG(Text, ...) \
+ gctINT8 __user__ = 1; \
+ gctINT8_PTR __user_ptr__ = &__user__; \
+ gcmSTACK_PUSH(__FUNCTION__, __LINE__, Text, __VA_ARGS__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_header_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmHEADER_ARG __dummy_header_arg
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmFOOTER() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmPROFILE_ONLY(gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d) [%llu,%llu]: status=%d(%s)", \
+ __FUNCTION__, __LINE__, \
+ __ticks__, __total__, \
+ status, gcoOS_DebugStatus2Name(status))); \
+ gcmPROFILE_ELSE(gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d(%s)", \
+ __FUNCTION__, __LINE__, \
+ status, gcoOS_DebugStatus2Name(status))); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer(void)
+ {
+ }
+# define gcmFOOTER __dummy_footer
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmFOOTER_NO() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer_no(void)
+ {
+ }
+# define gcmFOOTER_NO __dummy_footer_no
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmFOOTER_KILL() \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer_kill(void)
+ {
+ }
+# define gcmFOOTER_KILL __dummy_footer_kill
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmFOOTER_ARG(Text, ...) \
+ gcmSTACK_POP(__FUNCTION__); \
+ gcmTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__); \
+ *__user_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_footer_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmFOOTER_ARG __dummy_footer_arg
+#endif
+
+#endif /* gcdENABLE_PROFILING */
+
+#if gcdHAS_ELLIPSES
+#define gcmkHEADER() \
+ gctINT8 __kernel__ = 1; \
+ gctINT8_PTR __kernel_ptr__ = &__kernel__; \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d)", __FUNCTION__, __LINE__)
+#else
+ gcmINLINE static void
+ __dummy_kheader(void)
+ {
+ }
+# define gcmkHEADER __dummy_kheader
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmkHEADER_ARG(Text, ...) \
+ gctINT8 __kernel__ = 1; \
+ gctINT8_PTR __kernel_ptr__ = &__kernel__; \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "++%s(%d): " Text, __FUNCTION__, __LINE__, __VA_ARGS__)
+#else
+ gcmINLINE static void
+ __dummy_kheader_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkHEADER_ARG __dummy_kheader_arg
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmkFOOTER() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): status=%d(%s)", \
+ __FUNCTION__, __LINE__, status, gckOS_DebugStatus2Name(status)); \
+ *__kernel_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_kfooter(void)
+ {
+ }
+# define gcmkFOOTER __dummy_kfooter
+#endif
+
+#if gcdHAS_ELLIPSES
+#define gcmkFOOTER_NO() \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d)", __FUNCTION__, __LINE__); \
+ *__kernel_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_kfooter_no(void)
+ {
+ }
+# define gcmkFOOTER_NO __dummy_kfooter_no
+#endif
+
+#if gcdHAS_ELLIPSES
+# define gcmkFOOTER_ARG(Text, ...) \
+ gcmkTRACE_ZONE(gcdHEADER_LEVEL, _GC_OBJ_ZONE, \
+ "--%s(%d): " Text, \
+ __FUNCTION__, __LINE__, __VA_ARGS__); \
+ *__kernel_ptr__ -= 1
+#else
+ gcmINLINE static void
+ __dummy_kfooter_arg(
+ IN gctCONST_STRING Text,
+ ...
+ )
+ {
+ }
+# define gcmkFOOTER_ARG __dummy_kfooter_arg
+#endif
+
+#define gcmOPT_VALUE(ptr) (((ptr) == gcvNULL) ? 0 : *(ptr))
+#define gcmOPT_POINTER(ptr) (((ptr) == gcvNULL) ? gcvNULL : *(ptr))
+#define gcmOPT_STRING(ptr) (((ptr) == gcvNULL) ? "(nil)" : (ptr))
+
+void
+gckOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_PrintN(
+ IN gctUINT ArgumentSize,
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gckOS_CopyPrint(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_Print(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+#define gcmPRINT gcoOS_Print
+#define gcmkPRINT gckOS_Print
+#define gcmkPRINT_N gckOS_PrintN
+
+#if gcdPRINT_VERSION
+# define gcmPRINT_VERSION() do { \
+ _gcmPRINT_VERSION(gcm); \
+ gcmSTACK_DUMP(); \
+ } while (0)
+# define gcmkPRINT_VERSION() _gcmPRINT_VERSION(gcmk)
+# define _gcmPRINT_VERSION(prefix) \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ "Vivante HAL version %d.%d.%d build %d %s %s", \
+ gcvVERSION_MAJOR, gcvVERSION_MINOR, gcvVERSION_PATCH, \
+ gcvVERSION_BUILD, gcvVERSION_DATE, gcvVERSION_TIME )
+#else
+# define gcmPRINT_VERSION() do { gcmSTACK_DUMP(); } while (gcvFALSE)
+# define gcmkPRINT_VERSION() do { } while (gcvFALSE)
+#endif
+
+typedef enum _gceDUMP_BUFFER
+{
+ gceDUMP_BUFFER_CONTEXT,
+ gceDUMP_BUFFER_USER,
+ gceDUMP_BUFFER_KERNEL,
+ gceDUMP_BUFFER_LINK,
+ gceDUMP_BUFFER_WAITLINK,
+ gceDUMP_BUFFER_FROM_USER,
+}
+gceDUMP_BUFFER;
+
+void
+gckOS_DumpBuffer(
+ IN gckOS Os,
+ IN gctPOINTER Buffer,
+ IN gctUINT Size,
+ IN gceDUMP_BUFFER Type,
+ IN gctBOOL CopyMessage
+ );
+
+#define gcmkDUMPBUFFER gckOS_DumpBuffer
+
+#if gcdDUMP_COMMAND
+# define gcmkDUMPCOMMAND(Os, Buffer, Size, Type, CopyMessage) \
+ gcmkDUMPBUFFER(Os, Buffer, Size, Type, CopyMessage)
+#else
+# define gcmkDUMPCOMMAND(Os, Buffer, Size, Type, CopyMessage)
+#endif
+
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+
+void
+gckOS_DebugFlush(
+ gctCONST_STRING CallerName,
+ gctUINT LineNumber,
+ gctUINT32 DmaAddress
+ );
+
+# define gcmkDEBUGFLUSH(DmaAddress) \
+ gckOS_DebugFlush(__FUNCTION__, __LINE__, DmaAddress)
+#else
+# define gcmkDEBUGFLUSH(DmaAddress)
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_FRAMERATE
+**
+** Print average frame rate
+**
+*/
+#if gcdDUMP_FRAMERATE
+ gceSTATUS
+ gcfDumpFrameRate(
+ void
+ );
+# define gcmDUMP_FRAMERATE gcfDumpFrameRate
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_FRAMERATE(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_frame_rate(
+ void
+ )
+ {
+ }
+# define gcmDUMP_FRAMERATE __dummy_dump_frame_rate
+#endif
+
+
+/*******************************************************************************
+**
+** gcmDUMP
+**
+** Print a dump message.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+#if gcdDUMP
+ gceSTATUS
+ gcfDump(
+ IN gcoOS Os,
+ IN gctCONST_STRING String,
+ ...
+ );
+# define gcmDUMP gcfDump
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP(...)
+#else
+ gcmINLINE static void
+ __dummy_dump(
+ IN gcoOS Os,
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP __dummy_dump
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_DATA
+**
+** Add data to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP || gcdDUMP_COMMAND
+ gceSTATUS
+ gcfDumpData(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_DATA gcfDumpData
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_DATA(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_data(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctPOINTER Logical,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_DATA __dummy_dump_data
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_BUFFER
+**
+** Print a buffer to the dump.
+**
+** ARGUMENTS:
+**
+** gctSTRING Tag
+** Tag for dump.
+**
+** gctUINT32 Physical
+** Physical address of buffer.
+**
+** gctPOINTER Logical
+** Logical address of buffer.
+**
+** gctUINT32 Offset
+** Offset into buffer.
+**
+** gctSIZE_T Bytes
+** Number of bytes.
+*/
+
+#if gcdDUMP || gcdDUMP_COMMAND
+gceSTATUS
+gcfDumpBuffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ );
+# define gcmDUMP_BUFFER gcfDumpBuffer
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_BUFFER(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_buffer(
+ IN gcoOS Os,
+ IN gctSTRING Tag,
+ IN gctUINT32 Physical,
+ IN gctPOINTER Logical,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes
+ )
+ {
+ }
+# define gcmDUMP_BUFFER __dummy_dump_buffer
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API
+**
+** Print a dump message for a high level API prefixed by the function name.
+**
+** ARGUMENTS:
+**
+** gctSTRING Message.
+**
+** ... Optional arguments.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpApi(
+ IN gctCONST_STRING String,
+ ...
+ );
+# define gcmDUMP_API gcfDumpApi
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api(
+ IN gctCONST_STRING Message,
+ ...
+ )
+ {
+ }
+# define gcmDUMP_API __dummy_dump_api
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY
+**
+** Print an array of data.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Size.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpArray(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Size
+ );
+# define gcmDUMP_API_ARRAY gcfDumpArray
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Size
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY __dummy_dump_api_array
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_ARRAY_TOKEN
+**
+** Print an array of data terminated by a token.
+**
+** ARGUMENTS:
+**
+** gctUINT32_PTR Pointer to array.
+** gctUINT32 Termination.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpArrayToken(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Termination
+ );
+# define gcmDUMP_API_ARRAY_TOKEN gcfDumpArrayToken
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_ARRAY_TOKEN(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_array_token(
+ IN gctCONST_POINTER Data,
+ IN gctUINT32 Termination
+ )
+ {
+ }
+# define gcmDUMP_API_ARRAY_TOKEN __dummy_dump_api_array_token
+#endif
+
+/*******************************************************************************
+**
+** gcmDUMP_API_DATA
+**
+** Print an array of bytes.
+**
+** ARGUMENTS:
+**
+** gctCONST_POINTER Pointer to array.
+** gctSIZE_T Size.
+*/
+#if gcdDUMP_API
+ gceSTATUS
+ gcfDumpApiData(
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Size
+ );
+# define gcmDUMP_API_DATA gcfDumpApiData
+#elif gcdHAS_ELLIPSES
+# define gcmDUMP_API_DATA(...)
+#else
+ gcmINLINE static void
+ __dummy_dump_api_data(
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Size
+ )
+ {
+ }
+# define gcmDUMP_API_DATA __dummy_dump_api_data
+#endif
+
+/*******************************************************************************
+**
+** gcmTRACE_RELEASE
+**
+** Print a message to the shader debugger.
+**
+** ARGUMENTS:
+**
+** message Message.
+** ... Optional arguments.
+*/
+
+#define gcmTRACE_RELEASE gcoOS_DebugShaderTrace
+
+void
+gcoOS_DebugShaderTrace(
+ IN gctCONST_STRING Message,
+ ...
+ );
+
+void
+gcoOS_SetDebugShaderFiles(
+ IN gctCONST_STRING VSFileName,
+ IN gctCONST_STRING FSFileName
+ );
+
+void
+gcoOS_SetDebugShaderFileType(
+ IN gctUINT32 ShaderType
+ );
+
+void
+gcoOS_EnableDebugBuffer(
+ IN gctBOOL Enable
+ );
+
+/*******************************************************************************
+**
+** gcmBREAK
+**
+** Break into the debugger. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** None.
+*/
+
+void
+gcoOS_DebugBreak(
+ void
+ );
+
+void
+gckOS_DebugBreak(
+ void
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_BREAK)
+# define gcmBREAK gcoOS_DebugBreak
+# define gcmkBREAK gckOS_DebugBreak
+#else
+# define gcmBREAK()
+# define gcmkBREAK()
+#endif
+
+/*******************************************************************************
+**
+** gcmASSERT
+**
+** Evaluate an expression and break into the debugger if the expression
+** evaluates to false. In retail mode this macro does nothing.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_ASSERT)
+# define _gcmASSERT(prefix, exp) \
+ do \
+ { \
+ if (!(exp)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ASSERT at %s(%d)", \
+ __FUNCTION__, __LINE__); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ "(%s)", #exp); \
+ prefix##BREAK(); \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmASSERT(exp) _gcmASSERT(gcm, exp)
+# define gcmkASSERT(exp) _gcmASSERT(gcmk, exp)
+#else
+# define gcmASSERT(exp)
+# define gcmkASSERT(exp)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY
+**
+** Verify if an expression returns true. If the expression does not
+** evaluates to true, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** exp Expression to evaluate.
+*/
+#if gcmIS_DEBUG(gcdDEBUG_ASSERT)
+# define gcmVERIFY(exp) gcmASSERT(exp)
+# define gcmkVERIFY(exp) gcmkASSERT(exp)
+#else
+# define gcmVERIFY(exp) exp
+# define gcmkVERIFY(exp) exp
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFY_OK
+**
+** Verify a fucntion returns gcvSTATUS_OK. If the function does not return
+** gcvSTATUS_OK, an assertion will happen in debug mode.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+
+void
+gcoOS_Verify(
+ IN gceSTATUS Status
+ );
+
+void
+gckOS_Verify(
+ IN gceSTATUS Status
+ );
+
+#if gcmIS_DEBUG(gcdDEBUG_ASSERT)
+# define gcmVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ gcoOS_Verify(verifyStatus); \
+ if (verifyStatus != gcvSTATUS_OK) \
+ { \
+ gcmTRACE( \
+ gcvLEVEL_ERROR, \
+ "gcmVERIFY_OK(%d): function returned %d", \
+ __LINE__, verifyStatus \
+ ); \
+ } \
+ gcmASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+# define gcmkVERIFY_OK(func) \
+ do \
+ { \
+ gceSTATUS verifyStatus = func; \
+ if (verifyStatus != gcvSTATUS_OK) \
+ { \
+ gcmkTRACE( \
+ gcvLEVEL_ERROR, \
+ "gcmkVERIFY_OK(%d): function returned %d", \
+ __LINE__, verifyStatus \
+ ); \
+ } \
+ gckOS_Verify(verifyStatus); \
+ gcmkASSERT(verifyStatus == gcvSTATUS_OK); \
+ } \
+ while (gcvFALSE)
+#else
+# define gcmVERIFY_OK(func) func
+# define gcmkVERIFY_OK(func) func
+#endif
+
+gctCONST_STRING
+gcoOS_DebugStatus2Name(
+ gceSTATUS status
+ );
+
+gctCONST_STRING
+gckOS_DebugStatus2Name(
+ gceSTATUS status
+ );
+
+/*******************************************************************************
+**
+** gcmERR_BREAK
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_BREAK(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_BREAK: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+#define _gcmkERR_BREAK(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_BREAK: status=%d(%s) @ %s(%d)", \
+ status, gckOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_BREAK(func) _gcmERR_BREAK(gcm, func)
+#define gcmkERR_BREAK(func) _gcmkERR_BREAK(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmERR_RETURN
+**
+** Executes a return on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmERR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ prefix##FOOTER(); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+#define _gcmkERR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d(%s) @ %s(%d)", \
+ status, gckOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ prefix##FOOTER(); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+#define gcmERR_RETURN(func) _gcmERR_RETURN(gcm, func)
+#define gcmkERR_RETURN(func) _gcmkERR_RETURN(gcmk, func)
+
+
+/*******************************************************************************
+**
+** gcmONERROR
+**
+** Jump to the error handler in case there is an error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmONERROR(prefix, func) \
+ do \
+ { \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ONERROR: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ goto OnError; \
+ } \
+ } \
+ while (gcvFALSE)
+#define _gcmkONERROR(prefix, func) \
+ do \
+ { \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ONERROR: status=%d(%s) @ %s(%d)", \
+ status, gckOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ goto OnError; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmONERROR(func) _gcmONERROR(gcm, func)
+#define gcmkONERROR(func) _gcmkONERROR(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_LOCK
+**
+** Verifies whether the surface is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_LOCK(surfaceInfo) \
+ if (!surfaceInfo->node.valid) \
+ { \
+ gcmONERROR(gcvSTATUS_MEMORY_UNLOCKED); \
+ } \
+
+/*******************************************************************************
+**
+** gcmVERIFY_NODE_LOCK
+**
+** Verifies whether the surface node is locked.
+**
+** ARGUMENTS:
+**
+** surfaceInfo Pointer to the surface iniformational structure.
+*/
+#define gcmVERIFY_NODE_LOCK(surfaceNode) \
+ if (!surfaceNode->valid) \
+ { \
+ status = gcvSTATUS_MEMORY_UNLOCKED; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmBADOBJECT_BREAK
+**
+** Executes a break statement on bad object.
+**
+** ARGUMENTS:
+**
+** obj Object to test.
+** t Expected type of the object.
+*/
+#define gcmBADOBJECT_BREAK(obj, t) \
+ if ((obj == gcvNULL) \
+ || (((gcsOBJECT *)(obj))->type != t) \
+ ) \
+ { \
+ status = gcvSTATUS_INVALID_OBJECT; \
+ break; \
+ } \
+ do { } while (gcvFALSE)
+
+/*******************************************************************************
+**
+** gcmCHECK_STATUS
+**
+** Executes a break statement on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** func Function to evaluate.
+*/
+#define _gcmCHECK_STATUS(prefix, func) \
+ do \
+ { \
+ last = func; \
+ if (gcmIS_ERROR(last)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "CHECK_STATUS: status=%d(%s) @ %s(%d)", \
+ last, gcoOS_DebugStatus2Name(last), __FUNCTION__, __LINE__); \
+ status = last; \
+ } \
+ } \
+ while (gcvFALSE)
+#define _gcmkCHECK_STATUS(prefix, func) \
+ do \
+ { \
+ last = func; \
+ if (gcmIS_ERROR(last)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "CHECK_STATUS: status=%d(%s) @ %s(%d)", \
+ last, gckOS_DebugStatus2Name(last), __FUNCTION__, __LINE__); \
+ status = last; \
+ } \
+ } \
+ while (gcvFALSE)
+#define gcmCHECK_STATUS(func) _gcmCHECK_STATUS(gcm, func)
+#define gcmkCHECK_STATUS(func) _gcmkCHECK_STATUS(gcmk, func)
+
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+# define _gcmVERIFY_ARGUMENT(prefix, arg) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, #prefix "VERIFY_ARGUMENT failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("status=%d", gcvSTATUS_INVALID_ARGUMENT); \
+ return gcvSTATUS_INVALID_ARGUMENT; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcm, arg)
+# define gcmkVERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcmk, arg)
+
+/*******************************************************************************
+**
+** gcmDEBUG_VERIFY_ARGUMENT
+**
+** Works just like gcmVERIFY_ARGUMENT, but is only valid in debug mode.
+** Use this to verify arguments inside non-public API functions.
+*/
+#if gcdDEBUG
+# define gcmDEBUG_VERIFY_ARGUMENT(arg) _gcmVERIFY_ARGUMENT(gcm, arg)
+# define gcmkDEBUG_VERIFY_ARGUMENT(arg) _gcmkVERIFY_ARGUMENT(gcm, arg)
+#else
+# define gcmDEBUG_VERIFY_ARGUMENT(arg)
+# define gcmkDEBUG_VERIFY_ARGUMENT(arg)
+#endif
+/*******************************************************************************
+**
+** gcmVERIFY_ARGUMENT_RETURN
+**
+** Assert if an argument does not apply to the specified expression. If
+** the argument evaluates to false, gcvSTATUS_INVALID_ARGUMENT will be
+** returned from the current function. In retail mode this macro does
+** nothing.
+**
+** ARGUMENTS:
+**
+** arg Argument to evaluate.
+*/
+# define _gcmVERIFY_ARGUMENT_RETURN(prefix, arg, value) \
+ do \
+ { \
+ if (!(arg)) \
+ { \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "gcmVERIFY_ARGUMENT_RETURN failed:"); \
+ prefix##ASSERT(arg); \
+ prefix##FOOTER_ARG("value=%d", value); \
+ return value; \
+ } \
+ } \
+ while (gcvFALSE)
+# define gcmVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcm, arg, value)
+# define gcmkVERIFY_ARGUMENT_RETURN(arg, value) \
+ _gcmVERIFY_ARGUMENT_RETURN(gcmk, arg, value)
+
+#define MAX_LOOP_COUNT 0x7FFFFFFF
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_base_h_ */
diff --git a/src/include_v4/gc_hal_compiler.h b/src/include_v4/gc_hal_compiler.h
new file mode 100644
index 0000000..ecdb763
--- /dev/null
+++ b/src/include_v4/gc_hal_compiler.h
@@ -0,0 +1,3400 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+/*
+** Include file the defines the front- and back-end compilers, as well as the
+** objects they use.
+*/
+
+#ifndef __gc_hal_compiler_h_
+#define __gc_hal_compiler_h_
+
+#ifndef VIVANTE_NO_3D
+#include "gc_hal_types.h"
+#include "gc_hal_engine.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef GC_ENABLE_LOADTIME_OPT
+#define GC_ENABLE_LOADTIME_OPT 1
+#endif
+
+/******************************* IR VERSION ******************/
+#define gcdSL_IR_VERSION gcmCC('\0','\0','\0','\1')
+
+/******************************************************************************\
+|******************************* SHADER LANGUAGE ******************************|
+\******************************************************************************/
+
+/* Possible shader language opcodes. */
+typedef enum _gcSL_OPCODE
+{
+ gcSL_NOP, /* 0x00 */
+ gcSL_MOV, /* 0x01 */
+ gcSL_SAT, /* 0x02 */
+ gcSL_DP3, /* 0x03 */
+ gcSL_DP4, /* 0x04 */
+ gcSL_ABS, /* 0x05 */
+ gcSL_JMP, /* 0x06 */
+ gcSL_ADD, /* 0x07 */
+ gcSL_MUL, /* 0x08 */
+ gcSL_RCP, /* 0x09 */
+ gcSL_SUB, /* 0x0A */
+ gcSL_KILL, /* 0x0B */
+ gcSL_TEXLD, /* 0x0C */
+ gcSL_CALL, /* 0x0D */
+ gcSL_RET, /* 0x0E */
+ gcSL_NORM, /* 0x0F */
+ gcSL_MAX, /* 0x10 */
+ gcSL_MIN, /* 0x11 */
+ gcSL_POW, /* 0x12 */
+ gcSL_RSQ, /* 0x13 */
+ gcSL_LOG, /* 0x14 */
+ gcSL_FRAC, /* 0x15 */
+ gcSL_FLOOR, /* 0x16 */
+ gcSL_CEIL, /* 0x17 */
+ gcSL_CROSS, /* 0x18 */
+ gcSL_TEXLDP, /* 0x19 */
+ gcSL_TEXBIAS, /* 0x1A */
+ gcSL_TEXGRAD, /* 0x1B */
+ gcSL_TEXLOD, /* 0x1C */
+ gcSL_SIN, /* 0x1D */
+ gcSL_COS, /* 0x1E */
+ gcSL_TAN, /* 0x1F */
+ gcSL_EXP, /* 0x20 */
+ gcSL_SIGN, /* 0x21 */
+ gcSL_STEP, /* 0x22 */
+ gcSL_SQRT, /* 0x23 */
+ gcSL_ACOS, /* 0x24 */
+ gcSL_ASIN, /* 0x25 */
+ gcSL_ATAN, /* 0x26 */
+ gcSL_SET, /* 0x27 */
+ gcSL_DSX, /* 0x28 */
+ gcSL_DSY, /* 0x29 */
+ gcSL_FWIDTH, /* 0x2A */
+ gcSL_DIV, /* 0x2B */
+ gcSL_MOD, /* 0x2C */
+ gcSL_AND_BITWISE, /* 0x2D */
+ gcSL_OR_BITWISE, /* 0x2E */
+ gcSL_XOR_BITWISE, /* 0x2F */
+ gcSL_NOT_BITWISE, /* 0x30 */
+ gcSL_LSHIFT, /* 0x31 */
+ gcSL_RSHIFT, /* 0x32 */
+ gcSL_ROTATE, /* 0x33 */
+ gcSL_BITSEL, /* 0x34 */
+ gcSL_LEADZERO, /* 0x35 */
+ gcSL_LOAD, /* 0x36 */
+ gcSL_STORE, /* 0x37 */
+ gcSL_BARRIER, /* 0x38 */
+ gcSL_STORE1, /* 0x39 */
+ gcSL_ATOMADD, /* 0x3A */
+ gcSL_ATOMSUB, /* 0x3B */
+ gcSL_ATOMXCHG, /* 0x3C */
+ gcSL_ATOMCMPXCHG, /* 0x3D */
+ gcSL_ATOMMIN, /* 0x3E */
+ gcSL_ATOMMAX, /* 0x3F */
+ gcSL_ATOMOR, /* 0x40 */
+ gcSL_ATOMAND, /* 0x41 */
+ gcSL_ATOMXOR, /* 0x42 */
+ /*gcSL_UNUSED, 0x43 */
+ /*gcSL_UNUSED, 0x44 */
+ /*gcSL_UNUSED, 0x45 */
+ /*gcSL_UNUSED, 0x46 */
+ /*gcSL_UNUSED, 0x47 */
+ /*gcSL_UNUSED, 0x48 */
+ /*gcSL_UNUSED, 0x49 */
+ /*gcSL_UNUSED, 0x4A */
+ /*gcSL_UNUSED, 0x4B */
+ /*gcSL_UNUSED, 0x4C */
+ /*gcSL_UNUSED, 0x4D */
+ /*gcSL_UNUSED, 0x4E */
+ /*gcSL_UNUSED, 0x4F */
+ /*gcSL_UNUSED, 0x50 */
+ /*gcSL_UNUSED, 0x51 */
+ /*gcSL_UNUSED, 0x52 */
+ gcSL_ADDLO = 0x53, /* 0x53 */ /* Float only. */
+ gcSL_MULLO, /* 0x54 */ /* Float only. */
+ gcSL_CONV, /* 0x55 */
+ gcSL_GETEXP, /* 0x56 */
+ gcSL_GETMANT, /* 0x57 */
+ gcSL_MULHI, /* 0x58 */ /* Integer only. */
+ gcSL_CMP, /* 0x59 */
+ gcSL_I2F, /* 0x5A */
+ gcSL_F2I, /* 0x5B */
+ gcSL_ADDSAT, /* 0x5C */ /* Integer only. */
+ gcSL_SUBSAT, /* 0x5D */ /* Integer only. */
+ gcSL_MULSAT, /* 0x5E */ /* Integer only. */
+}
+gcSL_OPCODE;
+
+typedef enum _gcSL_FORMAT
+{
+ gcSL_FLOAT = 0, /* 0 */
+ gcSL_INTEGER = 1, /* 1 */
+ gcSL_INT32 = 1, /* 1 */
+ gcSL_BOOLEAN = 2, /* 2 */
+ gcSL_UINT32 = 3, /* 3 */
+ gcSL_INT8, /* 4 */
+ gcSL_UINT8, /* 5 */
+ gcSL_INT16, /* 6 */
+ gcSL_UINT16, /* 7 */
+ gcSL_INT64, /* 8 */ /* Reserved for future enhancement. */
+ gcSL_UINT64, /* 9 */ /* Reserved for future enhancement. */
+ gcSL_INT128, /* 10 */ /* Reserved for future enhancement. */
+ gcSL_UINT128, /* 11 */ /* Reserved for future enhancement. */
+ gcSL_FLOAT16, /* 12 */
+ gcSL_FLOAT64, /* 13 */ /* Reserved for future enhancement. */
+ gcSL_FLOAT128, /* 14 */ /* Reserved for future enhancement. */
+}
+gcSL_FORMAT;
+
+/* Destination write enable bits. */
+typedef enum _gcSL_ENABLE
+{
+ gcSL_ENABLE_NONE = 0x0, /* none is enabled, error/uninitialized state */
+ gcSL_ENABLE_X = 0x1,
+ gcSL_ENABLE_Y = 0x2,
+ gcSL_ENABLE_Z = 0x4,
+ gcSL_ENABLE_W = 0x8,
+ /* Combinations. */
+ gcSL_ENABLE_XY = gcSL_ENABLE_X | gcSL_ENABLE_Y,
+ gcSL_ENABLE_XYZ = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XYZW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XYW = gcSL_ENABLE_X | gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_XZ = gcSL_ENABLE_X | gcSL_ENABLE_Z,
+ gcSL_ENABLE_XZW = gcSL_ENABLE_X | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_XW = gcSL_ENABLE_X | gcSL_ENABLE_W,
+ gcSL_ENABLE_YZ = gcSL_ENABLE_Y | gcSL_ENABLE_Z,
+ gcSL_ENABLE_YZW = gcSL_ENABLE_Y | gcSL_ENABLE_Z | gcSL_ENABLE_W,
+ gcSL_ENABLE_YW = gcSL_ENABLE_Y | gcSL_ENABLE_W,
+ gcSL_ENABLE_ZW = gcSL_ENABLE_Z | gcSL_ENABLE_W,
+}
+gcSL_ENABLE;
+
+/* Possible indices. */
+typedef enum _gcSL_INDEXED
+{
+ gcSL_NOT_INDEXED, /* 0 */
+ gcSL_INDEXED_X, /* 1 */
+ gcSL_INDEXED_Y, /* 2 */
+ gcSL_INDEXED_Z, /* 3 */
+ gcSL_INDEXED_W, /* 4 */
+}
+gcSL_INDEXED;
+
+/* Opcode conditions. */
+typedef enum _gcSL_CONDITION
+{
+ gcSL_ALWAYS, /* 0x0 */
+ gcSL_NOT_EQUAL, /* 0x1 */
+ gcSL_LESS_OR_EQUAL, /* 0x2 */
+ gcSL_LESS, /* 0x3 */
+ gcSL_EQUAL, /* 0x4 */
+ gcSL_GREATER, /* 0x5 */
+ gcSL_GREATER_OR_EQUAL, /* 0x6 */
+ gcSL_AND, /* 0x7 */
+ gcSL_OR, /* 0x8 */
+ gcSL_XOR, /* 0x9 */
+ gcSL_NOT_ZERO, /* 0xA */
+}
+gcSL_CONDITION;
+
+/* Possible source operand types. */
+typedef enum _gcSL_TYPE
+{
+ gcSL_NONE, /* 0x0 */
+ gcSL_TEMP, /* 0x1 */
+ gcSL_ATTRIBUTE, /* 0x2 */
+ gcSL_UNIFORM, /* 0x3 */
+ gcSL_SAMPLER, /* 0x4 */
+ gcSL_CONSTANT, /* 0x5 */
+ gcSL_OUTPUT, /* 0x6 */
+ gcSL_PHYSICAL, /* 0x7 */
+}
+gcSL_TYPE;
+
+/* Swizzle generator macro. */
+#define gcmSWIZZLE(Component1, Component2, Component3, Component4) \
+( \
+ (gcSL_SWIZZLE_ ## Component1 << 0) | \
+ (gcSL_SWIZZLE_ ## Component2 << 2) | \
+ (gcSL_SWIZZLE_ ## Component3 << 4) | \
+ (gcSL_SWIZZLE_ ## Component4 << 6) \
+)
+
+#define gcmExtractSwizzle(Swizzle, Index) \
+ ((gcSL_SWIZZLE) ((((Swizzle) >> (Index * 2)) & 0x3)))
+
+#define gcmComposeSwizzle(SwizzleX, SwizzleY, SwizzleZ, SwizzleW) \
+( \
+ ((SwizzleX) << 0) | \
+ ((SwizzleY) << 2) | \
+ ((SwizzleZ) << 4) | \
+ ((SwizzleW) << 6) \
+)
+
+/* Possible swizzle values. */
+typedef enum _gcSL_SWIZZLE
+{
+ gcSL_SWIZZLE_X, /* 0x0 */
+ gcSL_SWIZZLE_Y, /* 0x1 */
+ gcSL_SWIZZLE_Z, /* 0x2 */
+ gcSL_SWIZZLE_W, /* 0x3 */
+ /* Combinations. */
+ gcSL_SWIZZLE_XXXX = gcmSWIZZLE(X, X, X, X),
+ gcSL_SWIZZLE_YYYY = gcmSWIZZLE(Y, Y, Y, Y),
+ gcSL_SWIZZLE_ZZZZ = gcmSWIZZLE(Z, Z, Z, Z),
+ gcSL_SWIZZLE_WWWW = gcmSWIZZLE(W, W, W, W),
+ gcSL_SWIZZLE_XYYY = gcmSWIZZLE(X, Y, Y, Y),
+ gcSL_SWIZZLE_XZZZ = gcmSWIZZLE(X, Z, Z, Z),
+ gcSL_SWIZZLE_XWWW = gcmSWIZZLE(X, W, W, W),
+ gcSL_SWIZZLE_YZZZ = gcmSWIZZLE(Y, Z, Z, Z),
+ gcSL_SWIZZLE_YWWW = gcmSWIZZLE(Y, W, W, W),
+ gcSL_SWIZZLE_ZWWW = gcmSWIZZLE(Z, W, W, W),
+ gcSL_SWIZZLE_XYZZ = gcmSWIZZLE(X, Y, Z, Z),
+ gcSL_SWIZZLE_XYWW = gcmSWIZZLE(X, Y, W, W),
+ gcSL_SWIZZLE_XZWW = gcmSWIZZLE(X, Z, W, W),
+ gcSL_SWIZZLE_YZWW = gcmSWIZZLE(Y, Z, W, W),
+ gcSL_SWIZZLE_XXYZ = gcmSWIZZLE(X, X, Y, Z),
+ gcSL_SWIZZLE_XYZW = gcmSWIZZLE(X, Y, Z, W),
+ gcSL_SWIZZLE_XYXY = gcmSWIZZLE(X, Y, X, Y),
+ gcSL_SWIZZLE_YYZZ = gcmSWIZZLE(Y, Y, Z, Z),
+ gcSL_SWIZZLE_YYWW = gcmSWIZZLE(Y, Y, W, W),
+ gcSL_SWIZZLE_ZZZW = gcmSWIZZLE(Z, Z, Z, W),
+ gcSL_SWIZZLE_XZZW = gcmSWIZZLE(X, Z, Z, W),
+ gcSL_SWIZZLE_YYZW = gcmSWIZZLE(Y, Y, Z, W),
+
+ gcSL_SWIZZLE_INVALID = 0x7FFFFFFF
+}
+gcSL_SWIZZLE;
+
+typedef enum _gcSL_COMPONENT
+{
+ gcSL_COMPONENT_X, /* 0x0 */
+ gcSL_COMPONENT_Y, /* 0x1 */
+ gcSL_COMPONENT_Z, /* 0x2 */
+ gcSL_COMPONENT_W, /* 0x3 */
+ gcSL_COMPONENT_COUNT /* 0x4 */
+} gcSL_COMPONENT;
+
+#define gcmIsComponentEnabled(Enable, Component) (((Enable) & (1 << (Component))) != 0)
+
+/******************************************************************************\
+|*********************************** SHADERS **********************************|
+\******************************************************************************/
+
+/* Shader types. */
+typedef enum _gcSHADER_KIND {
+ gcSHADER_TYPE_UNKNOWN = 0,
+ gcSHADER_TYPE_VERTEX,
+ gcSHADER_TYPE_FRAGMENT,
+ gcSHADER_TYPE_CL,
+ gcSHADER_TYPE_PRECOMPILED,
+ gcSHADER_KIND_COUNT
+} gcSHADER_KIND;
+
+typedef enum _gcGL_DRIVER_VERSION {
+ gcGL_DRIVER_ES11, /* OpenGL ES 1.1 */
+ gcGL_DRIVER_ES20, /* OpenGL ES 2.0 */
+ gcGL_DRIVER_ES30 /* OpenGL ES 3.0 */
+} gcGL_DRIVER_VERSION;
+
+#define gcm
+/* gcSHADER objects. */
+typedef struct _gcSHADER * gcSHADER;
+typedef struct _gcATTRIBUTE * gcATTRIBUTE;
+typedef struct _gcUNIFORM * gcUNIFORM;
+typedef struct _gcOUTPUT * gcOUTPUT;
+typedef struct _gcsFUNCTION * gcFUNCTION;
+typedef struct _gcsKERNEL_FUNCTION * gcKERNEL_FUNCTION;
+typedef struct _gcsHINT * gcsHINT_PTR;
+typedef struct _gcSHADER_PROFILER * gcSHADER_PROFILER;
+typedef struct _gcVARIABLE * gcVARIABLE;
+
+struct _gcsHINT
+{
+ /* Numbr of data transfers for Vertex Shader output. */
+ gctUINT32 vsOutputCount;
+
+ /* Flag whether the VS has point size or not. */
+ gctBOOL vsHasPointSize;
+
+ /* Element count. */
+ gctUINT32 elementCount;
+
+ /* Component count. */
+ gctUINT32 componentCount;
+
+ /* Number of data transfers for Fragment Shader input. */
+ gctUINT32 fsInputCount;
+
+ /* Maximum number of temporary registers used in FS. */
+ gctUINT32 fsMaxTemp;
+
+ /* Maximum number of temporary registers used in VS. */
+ gctUINT32 vsMaxTemp;
+
+ /* Balance minimum. */
+ gctUINT32 balanceMin;
+
+ /* Balance maximum. */
+ gctUINT32 balanceMax;
+
+ /* Flag whether the PS outputs the depth value or not. */
+ gctBOOL psHasFragDepthOut;
+
+ /* Flag whether the ThreadWalker is in PS. */
+ gctBOOL threadWalkerInPS;
+
+};
+
+/* gcSHADER_TYPE enumeration. */
+typedef enum _gcSHADER_TYPE
+{
+ gcSHADER_FLOAT_X1, /* 0x00 */
+ gcSHADER_FLOAT_X2, /* 0x01 */
+ gcSHADER_FLOAT_X3, /* 0x02 */
+ gcSHADER_FLOAT_X4, /* 0x03 */
+ gcSHADER_FLOAT_2X2, /* 0x04 */
+ gcSHADER_FLOAT_3X3, /* 0x05 */
+ gcSHADER_FLOAT_4X4, /* 0x06 */
+ gcSHADER_BOOLEAN_X1, /* 0x07 */
+ gcSHADER_BOOLEAN_X2, /* 0x08 */
+ gcSHADER_BOOLEAN_X3, /* 0x09 */
+ gcSHADER_BOOLEAN_X4, /* 0x0A */
+ gcSHADER_INTEGER_X1, /* 0x0B */
+ gcSHADER_INTEGER_X2, /* 0x0C */
+ gcSHADER_INTEGER_X3, /* 0x0D */
+ gcSHADER_INTEGER_X4, /* 0x0E */
+ gcSHADER_SAMPLER_1D, /* 0x0F */
+ gcSHADER_SAMPLER_2D, /* 0x10 */
+ gcSHADER_SAMPLER_3D, /* 0x11 */
+ gcSHADER_SAMPLER_CUBIC, /* 0x12 */
+ gcSHADER_FIXED_X1, /* 0x13 */
+ gcSHADER_FIXED_X2, /* 0x14 */
+ gcSHADER_FIXED_X3, /* 0x15 */
+ gcSHADER_FIXED_X4, /* 0x16 */
+ gcSHADER_IMAGE_2D, /* 0x17 */ /* For OCL. */
+ gcSHADER_IMAGE_3D, /* 0x18 */ /* For OCL. */
+ gcSHADER_SAMPLER, /* 0x19 */ /* For OCL. */
+ gcSHADER_FLOAT_2X3, /* 0x1A */
+ gcSHADER_FLOAT_2X4, /* 0x1B */
+ gcSHADER_FLOAT_3X2, /* 0x1C */
+ gcSHADER_FLOAT_3X4, /* 0x1D */
+ gcSHADER_FLOAT_4X2, /* 0x1E */
+ gcSHADER_FLOAT_4X3, /* 0x1F */
+ gcSHADER_ISAMPLER_2D, /* 0x20 */
+ gcSHADER_ISAMPLER_3D, /* 0x21 */
+ gcSHADER_ISAMPLER_CUBIC, /* 0x22 */
+ gcSHADER_USAMPLER_2D, /* 0x23 */
+ gcSHADER_USAMPLER_3D, /* 0x24 */
+ gcSHADER_USAMPLER_CUBIC, /* 0x25 */
+ gcSHADER_SAMPLER_EXTERNAL_OES, /* 0x26 */
+ gcSHADER_TYPE_COUNT
+}
+gcSHADER_TYPE;
+
+typedef enum _gcSHADER_VAR_CATEGORY
+{
+ gcSHADER_VAR_CATEGORY_NORMAL = 0, /* primitive type and its array */
+ gcSHADER_VAR_CATEGORY_STRUCT = 1 /* structure */
+}
+gcSHADER_VAR_CATEGORY;
+
+#if GC_ENABLE_LOADTIME_OPT
+
+typedef struct _gcSHADER_TYPE_INFO
+{
+ gcSHADER_TYPE type; /* eg. gcSHADER_FLOAT_2X3 is the type */
+ gctCONST_STRING name; /* the name of the type: "gcSHADER_FLOAT_2X3" */
+ gcSHADER_TYPE baseType; /* its base type is gcSHADER_FLOAT_2 */
+ gctINT components; /* it has 2 components */
+ gctINT rows; /* and 3 rows */
+ gctINT size; /* the size in byte */
+} gcSHADER_TYPE_INFO;
+
+enum gceLTCDumpOption {
+ gceLTC_DUMP_UNIFORM = 0x0001,
+ gceLTC_DUMP_EVALUATION = 0x0002,
+ gceLTC_DUMP_EXPESSION = 0x0004,
+ gceLTC_DUMP_COLLECTING = 0x0008,
+};
+
+gctBOOL gcDumpOption(gctINT Opt);
+
+extern gcSHADER_TYPE_INFO shader_type_info[];
+
+#endif /* GC_ENABLE_LOADTIME_OPT */
+
+
+#define IS_MATRIX_TYPE(type) \
+ (((type >= gcSHADER_FLOAT_2X2) && (type <= gcSHADER_FLOAT_4X4)) || \
+ ((type >= gcSHADER_FLOAT_2X3) && (type <= gcSHADER_FLOAT_4X3)))
+
+/* gcSHADER_PRECISION enumeration. */
+typedef enum _gcSHADER_PRECISION
+{
+ gcSHADER_PRECISION_DEFAULT, /* 0x00 */
+ gcSHADER_PRECISION_HIGH, /* 0x01 */
+ gcSHADER_PRECISION_MEDIUM, /* 0x02 */
+ gcSHADER_PRECISION_LOW, /* 0x03 */
+}
+gcSHADER_PRECISION;
+
+/* Shader flags. */
+typedef enum _gceSHADER_FLAGS
+{
+ gcvSHADER_NO_OPTIMIZATION = 0x00,
+ gcvSHADER_DEAD_CODE = 0x01,
+ gcvSHADER_RESOURCE_USAGE = 0x02,
+ gcvSHADER_OPTIMIZER = 0x04,
+ gcvSHADER_USE_GL_Z = 0x08,
+ /*
+ The GC family of GPU cores model GC860 and under require the Z
+ to be from 0 <= z <= w.
+ However, OpenGL specifies the Z to be from -w <= z <= w. So we
+ have to a conversion here:
+
+ z = (z + w) / 2.
+
+ So here we append two instructions to the vertex shader.
+ */
+ gcvSHADER_USE_GL_POSITION = 0x10,
+ gcvSHADER_USE_GL_FACE = 0x20,
+ gcvSHADER_USE_GL_POINT_COORD = 0x40,
+ gcvSHADER_LOADTIME_OPTIMIZER = 0x80,
+}
+gceSHADER_FLAGS;
+
+/* Function argument qualifier */
+typedef enum _gceINPUT_OUTPUT
+{
+ gcvFUNCTION_INPUT,
+ gcvFUNCTION_OUTPUT,
+ gcvFUNCTION_INOUT
+}
+gceINPUT_OUTPUT;
+
+/* Kernel function property flags. */
+typedef enum _gcePROPERTY_FLAGS
+{
+ gcvPROPERTY_REQD_WORK_GRP_SIZE = 0x01
+}
+gceKERNEL_FUNCTION_PROPERTY_FLAGS;
+
+/* Uniform flags. */
+typedef enum _gceUNIFORM_FLAGS
+{
+ gcvUNIFORM_KERNEL_ARG = 0x01,
+ gcvUNIFORM_KERNEL_ARG_LOCAL = 0x02,
+ gcvUNIFORM_KERNEL_ARG_SAMPLER = 0x04,
+ gcvUNIFORM_LOCAL_ADDRESS_SPACE = 0x08,
+ gcvUNIFORM_PRIVATE_ADDRESS_SPACE = 0x10,
+ gcvUNIFORM_CONSTANT_ADDRESS_SPACE = 0x20,
+ gcvUNIFORM_GLOBAL_SIZE = 0x40,
+ gcvUNIFORM_LOCAL_SIZE = 0x80,
+ gcvUNIFORM_NUM_GROUPS = 0x100,
+ gcvUNIFORM_GLOBAL_OFFSET = 0x200,
+ gcvUNIFORM_WORK_DIM = 0x400,
+ gcvUNIFORM_KERNEL_ARG_CONSTANT = 0x800,
+ gcvUNIFORM_KERNEL_ARG_LOCAL_MEM_SIZE = 0x1000,
+ gcvUNIFORM_KERNEL_ARG_PRIVATE = 0x2000,
+ gcvUNIFORM_LOADTIME_CONSTANT = 0x4000,
+}
+gceUNIFORM_FLAGS;
+
+#define gcdUNIFORM_KERNEL_ARG_MASK (gcvUNIFORM_KERNEL_ARG | \
+ gcvUNIFORM_KERNEL_ARG_LOCAL | \
+ gcvUNIFORM_KERNEL_ARG_SAMPLER | \
+ gcvUNIFORM_KERNEL_ARG_PRIVATE | \
+ gcvUNIFORM_KERNEL_ARG_CONSTANT)
+
+typedef enum _gceVARIABLE_UPDATE_FLAGS
+{
+ gceVARIABLE_UPDATE_NOUPDATE = 0,
+ gceVARIABLE_UPDATE_TEMPREG,
+}gceVARIABLE_UPDATE_FLAGS;
+
+/*******************************************************************************
+** gcSHADER_SetCompilerVersion
+**
+** Set the compiler version of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to gcSHADER object
+**
+** gctINT *Version
+** Pointer to a two word version
+*/
+gceSTATUS
+gcSHADER_SetCompilerVersion(
+ IN gcSHADER Shader,
+ IN gctUINT32 *Version
+ );
+
+/*******************************************************************************
+** gcSHADER_GetCompilerVersion
+**
+** Get the compiler version of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctUINT32_PTR *CompilerVersion.
+** Pointer to holder of returned compilerVersion pointer
+*/
+gceSTATUS
+gcSHADER_GetCompilerVersion(
+ IN gcSHADER Shader,
+ OUT gctUINT32_PTR *CompilerVersion
+ );
+
+/*******************************************************************************
+** gcSHADER_GetType
+**
+** Get the gcSHADER object's type.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctINT *Type.
+** Pointer to return shader type.
+*/
+gceSTATUS
+gcSHADER_GetType(
+ IN gcSHADER Shader,
+ OUT gctINT *Type
+ );
+/*******************************************************************************
+** gcSHADER_Construct
+********************************************************************************
+**
+** Construct a new gcSHADER object.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Type of gcSHADER object to cerate. 'ShaderType' can be one of the
+** following:
+**
+** gcSHADER_TYPE_VERTEX Vertex shader.
+** gcSHADER_TYPE_FRAGMENT Fragment shader.
+**
+** OUTPUT:
+**
+** gcSHADER * Shader
+** Pointer to a variable receiving the gcSHADER object pointer.
+*/
+gceSTATUS
+gcSHADER_Construct(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ OUT gcSHADER * Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Destroy
+********************************************************************************
+**
+** Destroy a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Destroy(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_Copy
+********************************************************************************
+**
+** Copy a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSHADER Source
+** Pointer to a gcSHADER object that will be copied.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Copy(
+ IN gcSHADER Shader,
+ IN gcSHADER Source
+ );
+
+/*******************************************************************************
+** gcSHADER_LoadHeader
+**
+** Load a gcSHADER object from a binary buffer. The binary buffer is layed out
+** as follows:
+** // Six word header
+** // Signature, must be 'S','H','D','R'.
+** gctINT8 signature[4];
+** gctUINT32 binFileVersion;
+** gctUINT32 compilerVersion[2];
+** gctUINT32 gcSLVersion;
+** gctUINT32 binarySize;
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+** Shader type will be returned if type in shader object is not gcSHADER_TYPE_PRECOMPILED
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containing the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+** nothing
+**
+*/
+gceSTATUS
+gcSHADER_LoadHeader(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize,
+ OUT gctUINT32 * ShaderVersion
+ );
+
+/*******************************************************************************
+** gcSHADER_LoadKernel
+**
+** Load a kernel function given by name into gcSHADER object
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSTRING KernelName
+** Pointer to a kernel function name
+**
+** OUTPUT:
+** nothing
+**
+*/
+gceSTATUS
+gcSHADER_LoadKernel(
+ IN gcSHADER Shader,
+ IN gctSTRING KernelName
+ );
+
+/*******************************************************************************
+** gcSHADER_Load
+********************************************************************************
+**
+** Load a gcSHADER object from a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containg the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Load(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_Save
+********************************************************************************
+**
+** Save a gcSHADER object to a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer to be used as storage for the gcSHADER
+** object. If 'Buffer' is gcvNULL, the gcSHADER object will not be saved,
+** but the number of bytes required to hold the binary output for the
+** gcSHADER object will be returned.
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable holding the number of bytes allocated in
+** 'Buffer'. Only valid if 'Buffer' is not gcvNULL.
+**
+** OUTPUT:
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable receiving the number of bytes required to hold
+** the binary form of the gcSHADER object.
+*/
+gceSTATUS
+gcSHADER_Save(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN OUT gctSIZE_T * BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_LoadEx
+********************************************************************************
+**
+** Load a gcSHADER object from a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer containg the shader data to load.
+**
+** gctSIZE_T BufferSize
+** Number of bytes inside the binary buffer pointed to by 'Buffer'.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_LoadEx(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN gctSIZE_T BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_SaveEx
+********************************************************************************
+**
+** Save a gcSHADER object to a binary buffer.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctPOINTER Buffer
+** Pointer to a binary buffer to be used as storage for the gcSHADER
+** object. If 'Buffer' is gcvNULL, the gcSHADER object will not be saved,
+** but the number of bytes required to hold the binary output for the
+** gcSHADER object will be returned.
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable holding the number of bytes allocated in
+** 'Buffer'. Only valid if 'Buffer' is not gcvNULL.
+**
+** OUTPUT:
+**
+** gctSIZE_T * BufferSize
+** Pointer to a variable receiving the number of bytes required to hold
+** the binary form of the gcSHADER object.
+*/
+gceSTATUS
+gcSHADER_SaveEx(
+ IN gcSHADER Shader,
+ IN gctPOINTER Buffer,
+ IN OUT gctSIZE_T * BufferSize
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateAttributes
+**
+** Reallocate an array of pointers to gcATTRIBUTE objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateAttributes(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddAttribute
+********************************************************************************
+**
+** Add an attribute to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the attribute to add.
+**
+** gcSHADER_TYPE Type
+** Type of the attribute to add.
+**
+** gctSIZE_T Length
+** Array length of the attribute to add. 'Length' must be at least 1.
+**
+** gctBOOL IsTexture
+** gcvTRUE if the attribute is used as a texture coordinate, gcvFALSE if not.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_AddAttribute(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctBOOL IsTexture,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttributeCount
+********************************************************************************
+**
+** Get the number of attributes for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of attributes.
+*/
+gceSTATUS
+gcSHADER_GetAttributeCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetAttribute
+********************************************************************************
+**
+** Get the gcATTRIBUTE object poniter for an indexed attribute for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the attribute to retrieve.
+**
+** OUTPUT:
+**
+** gcATTRIBUTE * Attribute
+** Pointer to a variable receiving the gcATTRIBUTE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetAttribute(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcATTRIBUTE * Attribute
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateUniforms
+**
+** Reallocate an array of pointers to gcUNIFORM objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateUniforms(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddUniform
+********************************************************************************
+**
+** Add an uniform to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the uniform to add.
+**
+** gcSHADER_TYPE Type
+** Type of the uniform to add.
+**
+** gctSIZE_T Length
+** Array length of the uniform to add. 'Length' must be at least 1.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_AddUniform(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * Uniform
+ );
+
+
+/*******************************************************************************
+** gcSHADER_AddUniformEx
+********************************************************************************
+**
+** Add an uniform to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the uniform to add.
+**
+** gcSHADER_TYPE Type
+** Type of the uniform to add.
+**
+** gcSHADER_PRECISION precision
+** Precision of the uniform to add.
+**
+** gctSIZE_T Length
+** Array length of the uniform to add. 'Length' must be at least 1.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_AddUniformEx(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gcSHADER_PRECISION precision,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniformCount
+********************************************************************************
+**
+** Get the number of uniforms for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of uniforms.
+*/
+gceSTATUS
+gcSHADER_GetUniformCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetUniform
+********************************************************************************
+**
+** Get the gcUNIFORM object pointer for an indexed uniform for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of the uniform to retrieve.
+**
+** OUTPUT:
+**
+** gcUNIFORM * Uniform
+** Pointer to a variable receiving the gcUNIFORM object pointer.
+*/
+gceSTATUS
+gcSHADER_GetUniform(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcUNIFORM * Uniform
+ );
+
+/*******************************************************************************
+** gcSHADER_GetKernelFucntion
+**
+** Get the gcKERNEL_FUNCTION object pointer for an indexed kernel function for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of kernel function to retreive the name for.
+**
+** OUTPUT:
+**
+** gcKERNEL_FUNCTION * KernelFunction
+** Pointer to a variable receiving the gcKERNEL_FUNCTION object pointer.
+*/
+gceSTATUS
+gcSHADER_GetKernelFunction(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcKERNEL_FUNCTION * KernelFunction
+ );
+
+gceSTATUS
+gcSHADER_GetKernelFunctionByName(
+ IN gcSHADER Shader,
+ IN gctSTRING KernelName,
+ OUT gcKERNEL_FUNCTION * KernelFunction
+ );
+/*******************************************************************************
+** gcSHADER_GetKernelFunctionCount
+**
+** Get the number of kernel functions for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of kernel functions.
+*/
+gceSTATUS
+gcSHADER_GetKernelFunctionCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateOutputs
+**
+** Reallocate an array of pointers to gcOUTPUT objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateOutputs(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOutput
+********************************************************************************
+**
+** Add an output to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the output to add.
+**
+** gcSHADER_TYPE Type
+** Type of the output to add.
+**
+** gctSIZE_T Length
+** Array length of the output to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the output value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOutput(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+gceSTATUS
+gcSHADER_AddOutputIndexed(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gctSIZE_T Index,
+ IN gctUINT16 TempIndex
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutputCount
+********************************************************************************
+**
+** Get the number of outputs for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of outputs.
+*/
+gceSTATUS
+gcSHADER_GetOutputCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetOutput
+********************************************************************************
+**
+** Get the gcOUTPUT object pointer for an indexed output for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of output to retrieve.
+**
+** OUTPUT:
+**
+** gcOUTPUT * Output
+** Pointer to a variable receiving the gcOUTPUT object pointer.
+*/
+gceSTATUS
+gcSHADER_GetOutput(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcOUTPUT * Output
+ );
+
+
+/*******************************************************************************
+** gcSHADER_GetOutputByName
+********************************************************************************
+**
+** Get the gcOUTPUT object pointer for this shader by output name.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSTRING name
+** Name of output to retrieve.
+**
+** gctSIZE_T nameLength
+** Length of name to retrieve
+**
+** OUTPUT:
+**
+** gcOUTPUT * Output
+** Pointer to a variable receiving the gcOUTPUT object pointer.
+*/
+gceSTATUS
+gcSHADER_GetOutputByName(
+ IN gcSHADER Shader,
+ IN gctSTRING name,
+ IN gctSIZE_T nameLength,
+ OUT gcOUTPUT * Output
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateVariables
+**
+** Reallocate an array of pointers to gcVARIABLE objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateVariables(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+/*******************************************************************************
+** gcSHADER_AddVariable
+********************************************************************************
+**
+** Add a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the variable to add.
+**
+** gcSHADER_TYPE Type
+** Type of the variable to add.
+**
+** gctSIZE_T Length
+** Array length of the variable to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the variable value.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddVariable(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister
+ );
+
+
+/*******************************************************************************
+** gcSHADER_AddVariableEx
+********************************************************************************
+**
+** Add a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctCONST_STRING Name
+** Name of the variable to add.
+**
+** gcSHADER_TYPE Type
+** Type of the variable to add.
+**
+** gctSIZE_T Length
+** Array length of the variable to add. 'Length' must be at least 1.
+**
+** gctUINT16 TempRegister
+** Temporary register index that holds the variable value.
+**
+** gcSHADER_VAR_CATEGORY varCategory
+** Variable category, normal or struct.
+**
+** gctUINT16 numStructureElement
+** If struct, its element number.
+**
+** gctINT16 parent
+** If struct, parent index in gcSHADER.variables.
+**
+** gctINT16 preSibling
+** If struct, previous sibling index in gcSHADER.variables.
+**
+** gctINT16* ThisVarIndex
+** Returned value about variable index in gcSHADER.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddVariableEx(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ IN gctUINT16 TempRegister,
+ IN gcSHADER_VAR_CATEGORY varCategory,
+ IN gctUINT16 numStructureElement,
+ IN gctINT16 parent,
+ IN gctINT16 preSibling,
+ OUT gctINT16* ThisVarIndex
+ );
+
+/*******************************************************************************
+** gcSHADER_UpdateVariable
+********************************************************************************
+**
+** Update a variable to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of variable to retrieve.
+**
+** gceVARIABLE_UPDATE_FLAGS flag
+** Flag which property of variable will be updated.
+**
+** gctUINT16 newValue
+** New value to update.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_UpdateVariable(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ IN gceVARIABLE_UPDATE_FLAGS flag,
+ IN gctUINT16 newValue
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariableCount
+********************************************************************************
+**
+** Get the number of variables for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Count
+** Pointer to a variable receiving the number of variables.
+*/
+gceSTATUS
+gcSHADER_GetVariableCount(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * Count
+ );
+
+/*******************************************************************************
+** gcSHADER_GetVariable
+********************************************************************************
+**
+** Get the gcVARIABLE object pointer for an indexed variable for this shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Index
+** Index of variable to retrieve.
+**
+** OUTPUT:
+**
+** gcVARIABLE * Variable
+** Pointer to a variable receiving the gcVARIABLE object pointer.
+*/
+gceSTATUS
+gcSHADER_GetVariable(
+ IN gcSHADER Shader,
+ IN gctUINT Index,
+ OUT gcVARIABLE * Variable
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcode
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the target
+** of the opcode.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcode(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddOpcode2(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeIndexed
+********************************************************************************
+**
+** Add an opcode to a gcSHADER object that writes to an dynamically indexed
+** target.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the
+** target of the opcode.
+**
+** gcSL_INDEXED Mode
+** Location of the dynamic index inside the temporary register. Valid
+** values can be:
+**
+** gcSL_INDEXED_X - Use x component of the temporary register.
+** gcSL_INDEXED_Y - Use y component of the temporary register.
+** gcSL_INDEXED_Z - Use z component of the temporary register.
+** gcSL_INDEXED_W - Use w component of the temporary register.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the temporary register.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditionIndexed
+**
+** Add an opcode to a gcSHADER object that writes to an dynamically indexed
+** target.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition to check.
+**
+** gctUINT16 TempRegister
+** Temporary register index that acts as the target of the opcode.
+**
+** gctUINT8 Enable
+** Write enable bits for the temporary register that acts as the
+** target of the opcode.
+**
+** gcSL_INDEXED Indexed
+** Location of the dynamic index inside the temporary register. Valid
+** values can be:
+**
+** gcSL_INDEXED_X - Use x component of the temporary register.
+** gcSL_INDEXED_Y - Use y component of the temporary register.
+** gcSL_INDEXED_Z - Use z component of the temporary register.
+** gcSL_INDEXED_W - Use w component of the temporary register.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditionIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT16 TempRegister,
+ IN gctUINT8 Enable,
+ IN gcSL_INDEXED Indexed,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditional
+********************************************************************************
+**
+** Add an conditional opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditional(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditionalFormatted
+**
+** Add an conditional jump or call opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gcSL_FORMAT Format
+** Format of conditional operands
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditionalFormatted(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gcSL_FORMAT Format,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddOpcodeConditionalFormattedEnable
+**
+** Add an conditional jump or call opcode to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_OPCODE Opcode
+** Opcode to add.
+**
+** gcSL_CONDITION Condition
+** Condition that needs to evaluate to gcvTRUE in order for the opcode to
+** execute.
+**
+** gcSL_FORMAT Format
+** Format of conditional operands
+**
+** gctUINT8 Enable
+** Write enable value for the target of the opcode.
+**
+** gctUINT Label
+** Target label if 'Condition' evaluates to gcvTRUE.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddOpcodeConditionalFormattedEnable(
+ IN gcSHADER Shader,
+ IN gcSL_OPCODE Opcode,
+ IN gcSL_CONDITION Condition,
+ IN gcSL_FORMAT Format,
+ IN gctUINT8 Enable,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddLabel
+********************************************************************************
+**
+** Define a label at the current instruction of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT Label
+** Label to define.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddLabel(
+ IN gcSHADER Shader,
+ IN gctUINT Label
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSource
+********************************************************************************
+**
+** Add a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSource(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceIndexed
+********************************************************************************
+**
+** Add a dynamically indexed source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcSL_TYPE Type
+** Type of the source operand.
+**
+** gctUINT16 SourceIndex
+** Index of the source operand.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gcSL_INDEXED Mode
+** Addressing mode for the index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** gcSL_FORMAT Format
+** Format of the source operand.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceIndexed(
+ IN gcSHADER Shader,
+ IN gcSL_TYPE Type,
+ IN gctUINT16 SourceIndex,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttribute
+********************************************************************************
+**
+** Add an attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttribute(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceAttributeIndexed
+********************************************************************************
+**
+** Add an indexed attribute as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the attribute in case the attribute is a matrix
+** or array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceAttributeIndexed(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniform
+********************************************************************************
+**
+** Add a uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniform(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceUniformIndexed
+********************************************************************************
+**
+** Add an indexed uniform as a source operand to a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctUINT8 Swizzle
+** x, y, z, and w swizzle values packed into one 8-bit value.
+**
+** gctINT Index
+** Static index into the uniform in case the uniform is a matrix or
+** array.
+**
+** gcSL_INDEXED Mode
+** Addressing mode of the dynamic index.
+**
+** gctUINT16 IndexRegister
+** Temporary register index that holds the dynamic index.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceUniformIndexed(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+gceSTATUS
+gcSHADER_AddSourceSamplerIndexed(
+ IN gcSHADER Shader,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister
+ );
+
+gceSTATUS
+gcSHADER_AddSourceAttributeFormatted(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceAttributeIndexedFormatted(
+ IN gcSHADER Shader,
+ IN gcATTRIBUTE Attribute,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceUniformFormatted(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceUniformIndexedFormatted(
+ IN gcSHADER Shader,
+ IN gcUNIFORM Uniform,
+ IN gctUINT8 Swizzle,
+ IN gctINT Index,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+gceSTATUS
+gcSHADER_AddSourceSamplerIndexedFormatted(
+ IN gcSHADER Shader,
+ IN gctUINT8 Swizzle,
+ IN gcSL_INDEXED Mode,
+ IN gctUINT16 IndexRegister,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceConstant
+********************************************************************************
+**
+** Add a constant floating point value as a source operand to a gcSHADER
+** object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctFLOAT Constant
+** Floating point constant.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceConstant(
+ IN gcSHADER Shader,
+ IN gctFLOAT Constant
+ );
+
+/*******************************************************************************
+** gcSHADER_AddSourceConstantFormatted
+********************************************************************************
+**
+** Add a constant value as a source operand to a gcSHADER
+** object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** void * Constant
+** Pointer to constant.
+**
+** gcSL_FORMAT Format
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_AddSourceConstantFormatted(
+ IN gcSHADER Shader,
+ IN void *Constant,
+ IN gcSL_FORMAT Format
+ );
+
+/*******************************************************************************
+** gcSHADER_Pack
+********************************************************************************
+**
+** Pack a dynamically created gcSHADER object by trimming the allocated arrays
+** and resolving all the labeling.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_Pack(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcSHADER_SetOptimizationOption
+********************************************************************************
+**
+** Set optimization option of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctUINT OptimizationOption
+** Optimization option. Can be one of the following:
+**
+** 0 - No optimization.
+** 1 - Full optimization.
+** Other value - For optimizer testing.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcSHADER_SetOptimizationOption(
+ IN gcSHADER Shader,
+ IN gctUINT OptimizationOption
+ );
+
+/*******************************************************************************
+** gcSHADER_ReallocateFunctions
+**
+** Reallocate an array of pointers to gcFUNCTION objects.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcSHADER_ReallocateFunctions(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcSHADER_AddFunction(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ OUT gcFUNCTION * Function
+ );
+
+gceSTATUS
+gcSHADER_ReallocateKernelFunctions(
+ IN gcSHADER Shader,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcSHADER_AddKernelFunction(
+ IN gcSHADER Shader,
+ IN gctCONST_STRING Name,
+ OUT gcKERNEL_FUNCTION * KernelFunction
+ );
+
+gceSTATUS
+gcSHADER_BeginFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+gceSTATUS
+gcSHADER_EndFunction(
+ IN gcSHADER Shader,
+ IN gcFUNCTION Function
+ );
+
+gceSTATUS
+gcSHADER_BeginKernelFunction(
+ IN gcSHADER Shader,
+ IN gcKERNEL_FUNCTION KernelFunction
+ );
+
+gceSTATUS
+gcSHADER_EndKernelFunction(
+ IN gcSHADER Shader,
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctSIZE_T LocalMemorySize
+ );
+
+gceSTATUS
+gcSHADER_SetMaxKernelFunctionArgs(
+ IN gcSHADER Shader,
+ IN gctUINT32 MaxKernelFunctionArgs
+ );
+
+/*******************************************************************************
+** gcSHADER_SetConstantMemorySize
+**
+** Set the constant memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T ConstantMemorySize
+** Constant memory size in bytes
+**
+** gctCHAR *ConstantMemoryBuffer
+** Constant memory buffer
+*/
+gceSTATUS
+gcSHADER_SetConstantMemorySize(
+ IN gcSHADER Shader,
+ IN gctSIZE_T ConstantMemorySize,
+ IN gctCHAR * ConstantMemoryBuffer
+ );
+
+/*******************************************************************************
+** gcSHADER_GetConstantMemorySize
+**
+** Set the constant memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * ConstantMemorySize
+** Pointer to a variable receiving constant memory size in bytes
+**
+** gctCHAR **ConstantMemoryBuffer.
+** Pointer to a variable for returned shader constant memory buffer.
+*/
+gceSTATUS
+gcSHADER_GetConstantMemorySize(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * ConstantMemorySize,
+ OUT gctCHAR ** ConstantMemoryBuffer
+ );
+
+/*******************************************************************************
+** gcSHADER_SetPrivateMemorySize
+**
+** Set the private memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T PrivateMemorySize
+** Private memory size in bytes
+*/
+gceSTATUS
+gcSHADER_SetPrivateMemorySize(
+ IN gcSHADER Shader,
+ IN gctSIZE_T PrivateMemorySize
+ );
+
+/*******************************************************************************
+** gcSHADER_GetPrivateMemorySize
+**
+** Set the private memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * PrivateMemorySize
+** Pointer to a variable receiving private memory size in bytes
+*/
+gceSTATUS
+gcSHADER_GetPrivateMemorySize(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * PrivateMemorySize
+ );
+
+/*******************************************************************************
+** gcSHADER_SetLocalMemorySize
+**
+** Set the local memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** gctSIZE_T LocalMemorySize
+** Local memory size in bytes
+*/
+gceSTATUS
+gcSHADER_SetLocalMemorySize(
+ IN gcSHADER Shader,
+ IN gctSIZE_T LocalMemorySize
+ );
+
+/*******************************************************************************
+** gcSHADER_GetLocalMemorySize
+**
+** Set the local memory address space size of a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * LocalMemorySize
+** Pointer to a variable receiving lcoal memory size in bytes
+*/
+gceSTATUS
+gcSHADER_GetLocalMemorySize(
+ IN gcSHADER Shader,
+ OUT gctSIZE_T * LocalMemorySize
+ );
+
+
+/*******************************************************************************
+** gcSHADER_CheckValidity
+**
+** Check validity for a gcSHADER object.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object.
+**
+*/
+gceSTATUS
+gcSHADER_CheckValidity(
+ IN gcSHADER Shader
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the attribute. 'Type'
+** can be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** attribute was declared as an array. If the attribute was not
+** declared as an array, the array length will be 1. 'ArrayLength' can
+** be gcvNULL, in which case no array length will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetType(
+ IN gcATTRIBUTE Attribute,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_GetName
+********************************************************************************
+**
+** Get the name of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the attribute name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the attribute name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcATTRIBUTE_GetName(
+ IN gcATTRIBUTE Attribute,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcATTRIBUTE_IsEnabled
+********************************************************************************
+**
+** Query the enabled state of a gcATTRIBUTE object.
+**
+** INPUT:
+**
+** gcATTRIBUTE Attribute
+** Pointer to a gcATTRIBUTE object.
+**
+** OUTPUT:
+**
+** gctBOOL * Enabled
+** Pointer to a variable receiving the enabled state of the attribute.
+*/
+gceSTATUS
+gcATTRIBUTE_IsEnabled(
+ IN gcATTRIBUTE Attribute,
+ OUT gctBOOL * Enabled
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the uniform. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** uniform was declared as an array. If the uniform was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetType(
+ IN gcUNIFORM Uniform,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetTypeEx
+********************************************************************************
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the uniform. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gcSHADER_PRECISION * Precision
+** Pointer to a variable receiving the precision of the uniform. 'Precision' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** uniform was declared as an array. If the uniform was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetTypeEx(
+ IN gcUNIFORM Uniform,
+ OUT gcSHADER_TYPE * Type,
+ OUT gcSHADER_PRECISION * Precision,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetFlags
+********************************************************************************
+**
+** Get the flags of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gceUNIFORM_FLAGS * Flags
+** Pointer to a variable receiving the flags of the uniform.
+**
+*/
+gceSTATUS
+gcUNIFORM_GetFlags(
+ IN gcUNIFORM Uniform,
+ OUT gceUNIFORM_FLAGS * Flags
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetFlags
+********************************************************************************
+**
+** Set the flags of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gceUNIFORM_FLAGS Flags
+** Flags of the uniform to be set.
+**
+** OUTPUT:
+** Nothing.
+**
+*/
+gceSTATUS
+gcUNIFORM_SetFlags(
+ IN gcUNIFORM Uniform,
+ IN gceUNIFORM_FLAGS Flags
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetName
+********************************************************************************
+**
+** Get the name of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the uniform name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the uniform name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetName(
+ IN gcUNIFORM Uniform,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetSampler
+********************************************************************************
+**
+** Get the physical sampler number for a sampler gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gctUINT32 * Sampler
+** Pointer to a variable receiving the physical sampler.
+*/
+gceSTATUS
+gcUNIFORM_GetSampler(
+ IN gcUNIFORM Uniform,
+ OUT gctUINT32 * Sampler
+ );
+
+/*******************************************************************************
+** gcUNIFORM_GetFormat
+**
+** Get the type and array length of a gcUNIFORM object.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** OUTPUT:
+**
+** gcSL_FORMAT * Format
+** Pointer to a variable receiving the format of element of the uniform.
+** 'Type' can be gcvNULL, in which case no type will be returned.
+**
+** gctBOOL * IsPointer
+** Pointer to a variable receiving the state wheter the uniform is a pointer.
+** 'IsPointer' can be gcvNULL, in which case no array length will be returned.
+*/
+gceSTATUS
+gcUNIFORM_GetFormat(
+ IN gcUNIFORM Uniform,
+ OUT gcSL_FORMAT * Format,
+ OUT gctBOOL * IsPointer
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetFormat
+**
+** Set the format and isPointer of a uniform.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gcSL_FORMAT Format
+** Format of element of the uniform shaderType.
+**
+** gctBOOL IsPointer
+** Wheter the uniform is a pointer.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetFormat(
+ IN gcUNIFORM Uniform,
+ IN gcSL_FORMAT Format,
+ IN gctBOOL IsPointer
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValue
+********************************************************************************
+**
+** Set the value of a uniform in integer.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctINT * Value
+** Pointer to a buffer holding the integer values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValue(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueX
+********************************************************************************
+**
+** Set the value of a uniform in fixed point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFIXED_POINT * Value
+** Pointer to a buffer holding the fixed point values for the uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueX(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN gctFIXED_POINT * Value
+ );
+
+/*******************************************************************************
+** gcUNIFORM_SetValueF
+********************************************************************************
+**
+** Set the value of a uniform in floating point.
+**
+** INPUT:
+**
+** gcUNIFORM Uniform
+** Pointer to a gcUNIFORM object.
+**
+** gctSIZE_T Count
+** Number of entries to program if the uniform has been declared as an
+** array.
+**
+** const gctFLOAT * Value
+** Pointer to a buffer holding the floating point values for the
+** uniform.
+**
+** OUTPUT:
+**
+** Nothing.
+*/
+gceSTATUS
+gcUNIFORM_SetValueF(
+ IN gcUNIFORM Uniform,
+ IN gctSIZE_T Count,
+ IN const gctFLOAT * Value
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetType
+********************************************************************************
+**
+** Get the type and array length of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gcSHADER_TYPE * Type
+** Pointer to a variable receiving the type of the output. 'Type' can
+** be gcvNULL, in which case no type will be returned.
+**
+** gctSIZE_T * ArrayLength
+** Pointer to a variable receiving the length of the array if the
+** output was declared as an array. If the output was not declared
+** as an array, the array length will be 1. 'ArrayLength' can be gcvNULL,
+** in which case no array length will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetType(
+ IN gcOUTPUT Output,
+ OUT gcSHADER_TYPE * Type,
+ OUT gctSIZE_T * ArrayLength
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetIndex
+********************************************************************************
+**
+** Get the index of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctUINT * Index
+** Pointer to a variable receiving the temporary register index of the
+** output. 'Index' can be gcvNULL,. in which case no index will be
+** returned.
+*/
+gceSTATUS
+gcOUTPUT_GetIndex(
+ IN gcOUTPUT Output,
+ OUT gctUINT * Index
+ );
+
+/*******************************************************************************
+** gcOUTPUT_GetName
+********************************************************************************
+**
+** Get the name of a gcOUTPUT object.
+**
+** INPUT:
+**
+** gcOUTPUT Output
+** Pointer to a gcOUTPUT object.
+**
+** OUTPUT:
+**
+** gctSIZE_T * Length
+** Pointer to a variable receiving the length of the output name.
+** 'Length' can be gcvNULL, in which case no length will be returned.
+**
+** gctCONST_STRING * Name
+** Pointer to a variable receiving the pointer to the output name.
+** 'Name' can be gcvNULL, in which case no name will be returned.
+*/
+gceSTATUS
+gcOUTPUT_GetName(
+ IN gcOUTPUT Output,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+/*******************************************************************************
+*********************************************************** F U N C T I O N S **
+*******************************************************************************/
+
+/*******************************************************************************
+** gcFUNCTION_ReallocateArguments
+**
+** Reallocate an array of gcsFUNCTION_ARGUMENT objects.
+**
+** INPUT:
+**
+** gcFUNCTION Function
+** Pointer to a gcFUNCTION object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcFUNCTION_ReallocateArguments(
+ IN gcFUNCTION Function,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcFUNCTION_AddArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 TempIndex,
+ IN gctUINT8 Enable,
+ IN gctUINT8 Qualifier
+ );
+
+gceSTATUS
+gcFUNCTION_GetArgument(
+ IN gcFUNCTION Function,
+ IN gctUINT16 Index,
+ OUT gctUINT16_PTR Temp,
+ OUT gctUINT8_PTR Enable,
+ OUT gctUINT8_PTR Swizzle
+ );
+
+gceSTATUS
+gcFUNCTION_GetLabel(
+ IN gcFUNCTION Function,
+ OUT gctUINT_PTR Label
+ );
+
+/*******************************************************************************
+************************* K E R N E L P R O P E R T Y F U N C T I O N S **
+*******************************************************************************/
+/*******************************************************************************/
+gceSTATUS
+gcKERNEL_FUNCTION_AddKernelFunctionProperties(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctINT propertyType,
+ IN gctSIZE_T propertySize,
+ IN gctINT * values
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetPropertyCount(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetProperty(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT Index,
+ OUT gctSIZE_T * propertySize,
+ OUT gctINT * propertyType,
+ OUT gctINT * propertyValues
+ );
+
+
+/*******************************************************************************
+*******************************I M A G E S A M P L E R F U N C T I O N S **
+*******************************************************************************/
+/*******************************************************************************
+** gcKERNEL_FUNCTION_ReallocateImageSamplers
+**
+** Reallocate an array of pointers to image sampler pair.
+**
+** INPUT:
+**
+** gcKERNEL_FUNCTION KernelFunction
+** Pointer to a gcKERNEL_FUNCTION object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcKERNEL_FUNCTION_ReallocateImageSamplers(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_AddImageSampler(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT8 ImageNum,
+ IN gctBOOL IsConstantSamplerType,
+ IN gctUINT32 SamplerType
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetImageSamplerCount(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetImageSampler(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT Index,
+ OUT gctUINT8 *ImageNum,
+ OUT gctBOOL *IsConstantSamplerType,
+ OUT gctUINT32 *SamplerType
+ );
+
+/*******************************************************************************
+*********************************************K E R N E L F U N C T I O N S **
+*******************************************************************************/
+
+/*******************************************************************************
+** gcKERNEL_FUNCTION_ReallocateArguments
+**
+** Reallocate an array of gcsFUNCTION_ARGUMENT objects.
+**
+** INPUT:
+**
+** gcKERNEL_FUNCTION Function
+** Pointer to a gcKERNEL_FUNCTION object.
+**
+** gctSIZE_T Count
+** Array count to reallocate. 'Count' must be at least 1.
+*/
+gceSTATUS
+gcKERNEL_FUNCTION_ReallocateArguments(
+ IN gcKERNEL_FUNCTION Function,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_AddArgument(
+ IN gcKERNEL_FUNCTION Function,
+ IN gctUINT16 TempIndex,
+ IN gctUINT8 Enable,
+ IN gctUINT8 Qualifier
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetArgument(
+ IN gcKERNEL_FUNCTION Function,
+ IN gctUINT16 Index,
+ OUT gctUINT16_PTR Temp,
+ OUT gctUINT8_PTR Enable,
+ OUT gctUINT8_PTR Swizzle
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetLabel(
+ IN gcKERNEL_FUNCTION Function,
+ OUT gctUINT_PTR Label
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetName(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Length,
+ OUT gctCONST_STRING * Name
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_ReallocateUniformArguments(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctSIZE_T Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_AddUniformArgument(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctCONST_STRING Name,
+ IN gcSHADER_TYPE Type,
+ IN gctSIZE_T Length,
+ OUT gcUNIFORM * UniformArgument
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetUniformArgumentCount(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ OUT gctSIZE_T * Count
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_GetUniformArgument(
+ IN gcKERNEL_FUNCTION KernelFunction,
+ IN gctUINT Index,
+ OUT gcUNIFORM * UniformArgument
+ );
+
+gceSTATUS
+gcKERNEL_FUNCTION_SetCodeEnd(
+ IN gcKERNEL_FUNCTION KernelFunction
+ );
+
+/*******************************************************************************
+** gcCompileShader
+********************************************************************************
+**
+** Compile a shader.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctINT ShaderType
+** Shader type to compile. Can be one of the following values:
+**
+** gcSHADER_TYPE_VERTEX
+** Compile a vertex shader.
+**
+** gcSHADER_TYPE_FRAGMENT
+** Compile a fragment shader.
+**
+** gctSIZE_T SourceSize
+** Size of the source buffer in bytes.
+**
+** gctCONST_STRING Source
+** Pointer to the buffer containing the shader source code.
+**
+** OUTPUT:
+**
+** gcSHADER * Binary
+** Pointer to a variable receiving the pointer to a gcSHADER object
+** containg the compiled shader code.
+**
+** gctSTRING * Log
+** Pointer to a variable receiving a string pointer containging the
+** compile log.
+*/
+gceSTATUS
+gcCompileShader(
+ IN gcoHAL Hal,
+ IN gctINT ShaderType,
+ IN gctSIZE_T SourceSize,
+ IN gctCONST_STRING Source,
+ OUT gcSHADER * Binary,
+ OUT gctSTRING * Log
+ );
+
+/*******************************************************************************
+** gcOptimizeShader
+********************************************************************************
+**
+** Optimize a shader.
+**
+** INPUT:
+**
+** gcSHADER Shader
+** Pointer to a gcSHADER object holding information about the compiled
+** shader.
+**
+** gctFILE LogFile
+** Pointer to an open FILE object.
+*/
+gceSTATUS
+gcOptimizeShader(
+ IN gcSHADER Shader,
+ IN gctFILE LogFile
+ );
+
+/*******************************************************************************
+** gcLinkShaders
+********************************************************************************
+**
+** Link two shaders and generate a harwdare specific state buffer by compiling
+** the compiler generated code through the resource allocator and code
+** generator.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to a gcSHADER object holding information about the compiled
+** vertex shader.
+**
+** gcSHADER FragmentShader
+** Pointer to a gcSHADER object holding information about the compiled
+** fragment shader.
+**
+** gceSHADER_FLAGS Flags
+** Compiler flags. Can be any of the following:
+**
+** gcvSHADER_DEAD_CODE - Dead code elimination.
+** gcvSHADER_RESOURCE_USAGE - Resource usage optimizaion.
+** gcvSHADER_OPTIMIZER - Full optimization.
+** gcvSHADER_USE_GL_Z - Use OpenGL ES Z coordinate.
+** gcvSHADER_USE_GL_POSITION - Use OpenGL ES gl_Position.
+** gcvSHADER_USE_GL_FACE - Use OpenGL ES gl_FaceForward.
+**
+** OUTPUT:
+**
+** gctSIZE_T * StateBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'StateBuffer'.
+**
+** gctPOINTER * StateBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLinkShaders(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gceSHADER_FLAGS Flags,
+ OUT gctSIZE_T * StateBufferSize,
+ OUT gctPOINTER * StateBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+/*******************************************************************************
+** gcLoadShaders
+********************************************************************************
+**
+** Load a pre-compiled and pre-linked shader program into the hardware.
+**
+** INPUT:
+**
+** gcoHAL Hal
+** Pointer to a gcoHAL object.
+**
+** gctSIZE_T StateBufferSize
+** The number of bytes in the 'StateBuffer'.
+**
+** gctPOINTER StateBuffer
+** Pointer to the states that make up the shader program.
+**
+** gcsHINT_PTR Hints
+** Pointer to a gcsHINT structure that contains information required
+** when loading the shader states.
+*/
+gceSTATUS
+gcLoadShaders(
+ IN gcoHAL Hal,
+ IN gctSIZE_T StateBufferSize,
+ IN gctPOINTER StateBuffer,
+ IN gcsHINT_PTR Hints
+ );
+
+/*******************************************************************************
+** gcSaveProgram
+********************************************************************************
+**
+** Save pre-compiled shaders and pre-linked programs to a binary file.
+**
+** INPUT:
+**
+** gcSHADER VertexShader
+** Pointer to vertex shader object.
+**
+** gcSHADER FragmentShader
+** Pointer to fragment shader object.
+**
+** gctSIZE_T ProgramBufferSize
+** Number of bytes in 'ProgramBuffer'.
+**
+** gctPOINTER ProgramBuffer
+** Pointer to buffer containing the program states.
+**
+** gcsHINT_PTR Hints
+** Pointer to HINTS structure for program states.
+**
+** OUTPUT:
+**
+** gctPOINTER * Binary
+** Pointer to a variable receiving the binary data to be saved.
+**
+** gctSIZE_T * BinarySize
+** Pointer to a variable receiving the number of bytes inside 'Binary'.
+*/
+gceSTATUS
+gcSaveProgram(
+ IN gcSHADER VertexShader,
+ IN gcSHADER FragmentShader,
+ IN gctSIZE_T ProgramBufferSize,
+ IN gctPOINTER ProgramBuffer,
+ IN gcsHINT_PTR Hints,
+ OUT gctPOINTER * Binary,
+ OUT gctSIZE_T * BinarySize
+ );
+
+/*******************************************************************************
+** gcLoadProgram
+********************************************************************************
+**
+** Load pre-compiled shaders and pre-linked programs from a binary file.
+**
+** INPUT:
+**
+** gctPOINTER Binary
+** Pointer to the binary data loaded.
+**
+** gctSIZE_T BinarySize
+** Number of bytes in 'Binary'.
+**
+** OUTPUT:
+**
+** gcSHADER VertexShader
+** Pointer to a vertex shader object.
+**
+** gcSHADER FragmentShader
+** Pointer to a fragment shader object.
+**
+** gctSIZE_T * ProgramBufferSize
+** Pointer to a variable receicing the number of bytes in the buffer
+** returned in 'ProgramBuffer'.
+**
+** gctPOINTER * ProgramBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLoadProgram(
+ IN gctPOINTER Binary,
+ IN gctSIZE_T BinarySize,
+ OUT gcSHADER VertexShader,
+ OUT gcSHADER FragmentShader,
+ OUT gctSIZE_T * ProgramBufferSize,
+ OUT gctPOINTER * ProgramBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+/*******************************************************************************
+** gcCompileKernel
+********************************************************************************
+**
+** Compile a OpenCL kernel shader.
+**
+** INPUT:
+**
+** gcoOS Hal
+** Pointer to an gcoHAL object.
+**
+** gctSIZE_T SourceSize
+** Size of the source buffer in bytes.
+**
+** gctCONST_STRING Source
+** Pointer to the buffer containing the shader source code.
+**
+** OUTPUT:
+**
+** gcSHADER * Binary
+** Pointer to a variable receiving the pointer to a gcSHADER object
+** containg the compiled shader code.
+**
+** gctSTRING * Log
+** Pointer to a variable receiving a string pointer containging the
+** compile log.
+*/
+gceSTATUS
+gcCompileKernel(
+ IN gcoHAL Hal,
+ IN gctSIZE_T SourceSize,
+ IN gctCONST_STRING Source,
+ IN gctCONST_STRING Options,
+ OUT gcSHADER * Binary,
+ OUT gctSTRING * Log
+ );
+
+/*******************************************************************************
+** gcLinkKernel
+********************************************************************************
+**
+** Link OpenCL kernel and generate a harwdare specific state buffer by compiling
+** the compiler generated code through the resource allocator and code
+** generator.
+**
+** INPUT:
+**
+** gcSHADER Kernel
+** Pointer to a gcSHADER object holding information about the compiled
+** OpenCL kernel.
+**
+** gceSHADER_FLAGS Flags
+** Compiler flags. Can be any of the following:
+**
+** gcvSHADER_DEAD_CODE - Dead code elimination.
+** gcvSHADER_RESOURCE_USAGE - Resource usage optimizaion.
+** gcvSHADER_OPTIMIZER - Full optimization.
+** gcvSHADER_USE_GL_Z - Use OpenGL ES Z coordinate.
+** gcvSHADER_USE_GL_POSITION - Use OpenGL ES gl_Position.
+** gcvSHADER_USE_GL_FACE - Use OpenGL ES gl_FaceForward.
+**
+** OUTPUT:
+**
+** gctSIZE_T * StateBufferSize
+** Pointer to a variable receiving the number of bytes in the buffer
+** returned in 'StateBuffer'.
+**
+** gctPOINTER * StateBuffer
+** Pointer to a variable receiving a buffer pointer that contains the
+** states required to download the shaders into the hardware.
+**
+** gcsHINT_PTR * Hints
+** Pointer to a variable receiving a gcsHINT structure pointer that
+** contains information required when loading the shader states.
+*/
+gceSTATUS
+gcLinkKernel(
+ IN gcSHADER Kernel,
+ IN gceSHADER_FLAGS Flags,
+ OUT gctSIZE_T * StateBufferSize,
+ OUT gctPOINTER * StateBuffer,
+ OUT gcsHINT_PTR * Hints
+ );
+
+/*******************************************************************************
+** gcLoadKernel
+********************************************************************************
+**
+** Load a pre-compiled and pre-linked kernel program into the hardware.
+**
+** INPUT:
+**
+** gctSIZE_T StateBufferSize
+** The number of bytes in the 'StateBuffer'.
+**
+** gctPOINTER StateBuffer
+** Pointer to the states that make up the shader program.
+**
+** gcsHINT_PTR Hints
+** Pointer to a gcsHINT structure that contains information required
+** when loading the shader states.
+*/
+gceSTATUS
+gcLoadKernel(
+ IN gctSIZE_T StateBufferSize,
+ IN gctPOINTER StateBuffer,
+ IN gcsHINT_PTR Hints
+ );
+
+gceSTATUS
+gcInvokeThreadWalker(
+ IN gcsTHREAD_WALKER_INFO_PTR Info
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VIVANTE_NO_3D */
+#endif /* __gc_hal_compiler_h_ */
diff --git a/src/include_v4/gc_hal_driver.h b/src/include_v4/gc_hal_driver.h
new file mode 100644
index 0000000..7c9d163
--- /dev/null
+++ b/src/include_v4/gc_hal_driver.h
@@ -0,0 +1,901 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_driver_h_
+#define __gc_hal_driver_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#if gcdENABLE_VG
+#include "gc_hal_driver_vg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* I/O Control Codes ******************************
+\******************************************************************************/
+
+#define gcvHAL_CLASS "galcore"
+#define IOCTL_GCHAL_INTERFACE 30000
+#define IOCTL_GCHAL_KERNEL_INTERFACE 30001
+#define IOCTL_GCHAL_TERMINATE 30002
+
+/******************************************************************************\
+********************************* Command Codes ********************************
+\******************************************************************************/
+
+typedef enum _gceHAL_COMMAND_CODES
+{
+ /* Generic query. */
+ gcvHAL_QUERY_VIDEO_MEMORY,
+ gcvHAL_QUERY_CHIP_IDENTITY,
+
+ /* Contiguous memory. */
+ gcvHAL_ALLOCATE_NON_PAGED_MEMORY,
+ gcvHAL_FREE_NON_PAGED_MEMORY,
+ gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY,
+ gcvHAL_FREE_CONTIGUOUS_MEMORY,
+
+ /* Video memory allocation. */
+ gcvHAL_ALLOCATE_VIDEO_MEMORY, /* Enforced alignment. */
+ gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY, /* No alignment. */
+ gcvHAL_FREE_VIDEO_MEMORY,
+
+ /* Physical-to-logical mapping. */
+ gcvHAL_MAP_MEMORY,
+ gcvHAL_UNMAP_MEMORY,
+
+ /* Logical-to-physical mapping. */
+ gcvHAL_MAP_USER_MEMORY,
+ gcvHAL_UNMAP_USER_MEMORY,
+
+ /* Surface lock/unlock. */
+ gcvHAL_LOCK_VIDEO_MEMORY,
+ gcvHAL_UNLOCK_VIDEO_MEMORY,
+
+ /* Event queue. */
+ gcvHAL_EVENT_COMMIT,
+
+ gcvHAL_USER_SIGNAL,
+ gcvHAL_SIGNAL,
+ gcvHAL_WRITE_DATA,
+
+ gcvHAL_COMMIT,
+ gcvHAL_STALL,
+
+ gcvHAL_READ_REGISTER,
+ gcvHAL_WRITE_REGISTER,
+
+ gcvHAL_GET_PROFILE_SETTING,
+ gcvHAL_SET_PROFILE_SETTING,
+
+ gcvHAL_READ_ALL_PROFILE_REGISTERS,
+ gcvHAL_PROFILE_REGISTERS_2D,
+
+ /* Power management. */
+ gcvHAL_SET_POWER_MANAGEMENT_STATE,
+ gcvHAL_QUERY_POWER_MANAGEMENT_STATE,
+
+ gcvHAL_GET_BASE_ADDRESS,
+
+ gcvHAL_SET_IDLE, /* reserved */
+
+ /* Queries. */
+ gcvHAL_QUERY_KERNEL_SETTINGS,
+
+ /* Reset. */
+ gcvHAL_RESET,
+
+ /* Map physical address into handle. */
+ gcvHAL_MAP_PHYSICAL,
+
+ /* Debugger stuff. */
+ gcvHAL_DEBUG,
+
+ /* Cache stuff. */
+ gcvHAL_CACHE,
+
+ /* TimeStamp */
+ gcvHAL_TIMESTAMP,
+
+ /* Database. */
+ gcvHAL_DATABASE,
+
+ /* Version. */
+ gcvHAL_VERSION,
+
+ /* Chip info */
+ gcvHAL_CHIP_INFO,
+
+ /* Process attaching/detaching. */
+ gcvHAL_ATTACH,
+ gcvHAL_DETACH,
+
+ /* Composition. */
+ gcvHAL_COMPOSE,
+
+ /* Set timeOut value */
+ gcvHAL_SET_TIMEOUT,
+
+ /* Frame database. */
+ gcvHAL_GET_FRAME_INFO,
+
+ /* Shared info for each process */
+ gcvHAL_GET_SHARED_INFO,
+ gcvHAL_SET_SHARED_INFO,
+ gcvHAL_QUERY_COMMAND_BUFFER,
+
+ gcvHAL_COMMIT_DONE,
+
+ /* GPU and event dump */
+ gcvHAL_DUMP_GPU_STATE,
+ gcvHAL_DUMP_EVENT
+}
+gceHAL_COMMAND_CODES;
+
+/******************************************************************************\
+****************************** Interface Structure *****************************
+\******************************************************************************/
+
+#define gcdMAX_PROFILE_FILE_NAME 128
+
+/* Kernel settings. */
+typedef struct _gcsKERNEL_SETTINGS
+{
+ /* Used RealTime signal between kernel and user. */
+ gctINT signal;
+}
+gcsKERNEL_SETTINGS;
+
+
+/* gcvHAL_QUERY_CHIP_IDENTITY */
+typedef struct _gcsHAL_QUERY_CHIP_IDENTITY * gcsHAL_QUERY_CHIP_IDENTITY_PTR;
+typedef struct _gcsHAL_QUERY_CHIP_IDENTITY
+{
+
+ /* Chip model. */
+ gceCHIPMODEL chipModel;
+
+ /* Revision value.*/
+ gctUINT32 chipRevision;
+
+ /* Supported feature fields. */
+ gctUINT32 chipFeatures;
+
+ /* Supported minor feature fields. */
+ gctUINT32 chipMinorFeatures;
+
+ /* Supported minor feature 1 fields. */
+ gctUINT32 chipMinorFeatures1;
+
+ /* Supported minor feature 2 fields. */
+ gctUINT32 chipMinorFeatures2;
+
+ /* Supported minor feature 3 fields. */
+ gctUINT32 chipMinorFeatures3;
+
+ /* Number of streams supported. */
+ gctUINT32 streamCount;
+
+ /* Total number of temporary registers per thread. */
+ gctUINT32 registerMax;
+
+ /* Maximum number of threads. */
+ gctUINT32 threadCount;
+
+ /* Number of shader cores. */
+ gctUINT32 shaderCoreCount;
+
+ /* Size of the vertex cache. */
+ gctUINT32 vertexCacheSize;
+
+ /* Number of entries in the vertex output buffer. */
+ gctUINT32 vertexOutputBufferSize;
+
+ /* Number of pixel pipes. */
+ gctUINT32 pixelPipes;
+
+ /* Number of instructions. */
+ gctUINT32 instructionCount;
+
+ /* Number of constants. */
+ gctUINT32 numConstants;
+
+ /* Buffer size */
+ gctUINT32 bufferSize;
+
+}
+gcsHAL_QUERY_CHIP_IDENTITY;
+
+/* gcvHAL_COMPOSE. */
+typedef struct _gcsHAL_COMPOSE * gcsHAL_COMPOSE_PTR;
+typedef struct _gcsHAL_COMPOSE
+{
+ /* Composition state buffer. */
+ gctPHYS_ADDR physical;
+ gctPOINTER logical;
+ gctSIZE_T offset;
+ gctSIZE_T size;
+
+ /* Composition end signal. */
+ gctHANDLE process;
+ gctSIGNAL signal;
+
+ /* User signals. */
+ gctHANDLE userProcess;
+ gctSIGNAL userSignal1;
+ gctSIGNAL userSignal2;
+
+#if defined(__QNXNTO__)
+ /* Client pulse side-channel connection ID. */
+ gctINT32 coid;
+
+ /* Set by server. */
+ gctINT32 rcvid;
+#endif
+}
+gcsHAL_COMPOSE;
+
+typedef struct _gcsHAL_INTERFACE
+{
+ /* Command code. */
+ gceHAL_COMMAND_CODES command;
+
+ /* Hardware type. */
+ gceHARDWARE_TYPE hardwareType;
+
+ /* Status value. */
+ gceSTATUS status;
+
+ /* Handle to this interface channel. */
+ gctHANDLE handle;
+
+ /* Pid of the client. */
+ gctUINT32 pid;
+
+ /* Union of command structures. */
+ union _u
+ {
+ /* gcvHAL_GET_BASE_ADDRESS */
+ struct _gcsHAL_GET_BASE_ADDRESS
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctUINT32 baseAddress;
+ }
+ GetBaseAddress;
+
+ /* gcvHAL_QUERY_VIDEO_MEMORY */
+ struct _gcsHAL_QUERY_VIDEO_MEMORY
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctPHYS_ADDR internalPhysical;
+
+ /* Size in bytes of internal memory.*/
+ OUT gctSIZE_T internalSize;
+
+ /* Physical memory address of external memory. */
+ OUT gctPHYS_ADDR externalPhysical;
+
+ /* Size in bytes of external memory.*/
+ OUT gctSIZE_T externalSize;
+
+ /* Physical memory address of contiguous memory. */
+ OUT gctPHYS_ADDR contiguousPhysical;
+
+ /* Size in bytes of contiguous memory.*/
+ OUT gctSIZE_T contiguousSize;
+ }
+ QueryVideoMemory;
+
+ /* gcvHAL_QUERY_CHIP_IDENTITY */
+ gcsHAL_QUERY_CHIP_IDENTITY QueryChipIdentity;
+
+ /* gcvHAL_MAP_MEMORY */
+ struct _gcsHAL_MAP_MEMORY
+ {
+ /* Physical memory address to map. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to map. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory. */
+ OUT gctPOINTER logical;
+ }
+ MapMemory;
+
+ /* gcvHAL_UNMAP_MEMORY */
+ struct _gcsHAL_UNMAP_MEMORY
+ {
+ /* Physical memory address to unmap. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to unmap. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory to unmap. */
+ IN gctPOINTER logical;
+ }
+ UnmapMemory;
+
+ /* gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_LINEAR_VIDEO_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctUINT bytes;
+
+ /* Buffer alignment. */
+ IN gctUINT alignment;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateLinearVideoMemory;
+
+ /* gcvHAL_ALLOCATE_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_VIDEO_MEMORY
+ {
+ /* Width of rectangle to allocate. */
+ IN OUT gctUINT width;
+
+ /* Height of rectangle to allocate. */
+ IN OUT gctUINT height;
+
+ /* Depth of rectangle to allocate. */
+ IN gctUINT depth;
+
+ /* Format rectangle to allocate in gceSURF_FORMAT. */
+ IN gceSURF_FORMAT format;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateVideoMemory;
+
+ /* gcvHAL_FREE_VIDEO_MEMORY */
+ struct _gcsHAL_FREE_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+#ifdef __QNXNTO__
+/* TODO: This is part of the unlock - why is it here? */
+ /* Mapped logical address to unmap in user space. */
+ OUT gctPOINTER memory;
+
+ /* Number of bytes to allocated. */
+ OUT gctSIZE_T bytes;
+#endif
+ }
+ FreeVideoMemory;
+
+ /* gcvHAL_LOCK_VIDEO_MEMORY */
+ struct _gcsHAL_LOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Cache configuration. */
+ /* Only gcvPOOL_CONTIGUOUS and gcvPOOL_VIRUTAL
+ ** can be configured */
+ IN gctBOOL cacheable;
+
+ /* Hardware specific address. */
+ OUT gctUINT32 address;
+
+ /* Mapped logical address. */
+ OUT gctPOINTER memory;
+ }
+ LockVideoMemory;
+
+ /* gcvHAL_UNLOCK_VIDEO_MEMORY */
+ struct _gcsHAL_UNLOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Type of surface. */
+ IN gceSURF_TYPE type;
+
+ /* Flag to unlock surface asynchroneously. */
+ IN OUT gctBOOL asynchroneous;
+ }
+ UnlockVideoMemory;
+
+ /* gcvHAL_ALLOCATE_NON_PAGED_MEMORY */
+ struct _gcsHAL_ALLOCATE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT gctPOINTER logical;
+ }
+ AllocateNonPagedMemory;
+
+ /* gcvHAL_FREE_NON_PAGED_MEMORY */
+ struct _gcsHAL_FREE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+ }
+ FreeNonPagedMemory;
+
+ /* gcvHAL_EVENT_COMMIT. */
+ struct _gcsHAL_EVENT_COMMIT
+ {
+ /* Event queue. */
+ IN gcsQUEUE_PTR queue;
+ }
+ Event;
+
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_COMMIT
+ {
+ /* Context buffer object. */
+ IN gckCONTEXT context;
+
+ /* Command buffer. */
+ IN gcoCMDBUF commandBuffer;
+
+ /* State delta buffer. */
+ gcsSTATE_DELTA_PTR delta;
+
+ /* Event queue. */
+ IN gcsQUEUE_PTR queue;
+ }
+ Commit;
+
+ /* gcvHAL_MAP_USER_MEMORY */
+ struct _gcsHAL_MAP_USER_MEMORY
+ {
+ /* Base address of user memory to map. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to map. */
+ IN gctSIZE_T size;
+
+ /* Info record required by gcvHAL_UNMAP_USER_MEMORY. */
+ OUT gctPOINTER info;
+
+ /* Physical address of mapped memory. */
+ OUT gctUINT32 address;
+ }
+ MapUserMemory;
+
+ /* gcvHAL_UNMAP_USER_MEMORY */
+ struct _gcsHAL_UNMAP_USER_MEMORY
+ {
+ /* Base address of user memory to unmap. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to unmap. */
+ IN gctSIZE_T size;
+
+ /* Info record returned by gcvHAL_MAP_USER_MEMORY. */
+ IN gctPOINTER info;
+
+ /* Physical address of mapped memory as returned by
+ gcvHAL_MAP_USER_MEMORY. */
+ IN gctUINT32 address;
+ }
+ UnmapUserMemory;
+#if !USE_NEW_LINUX_SIGNAL
+ /* gcsHAL_USER_SIGNAL */
+ struct _gcsHAL_USER_SIGNAL
+ {
+ /* Command. */
+ gceUSER_SIGNAL_COMMAND_CODES command;
+
+ /* Signal ID. */
+ IN OUT gctINT id;
+
+ /* Reset mode. */
+ IN gctBOOL manualReset;
+
+ /* Wait timedout. */
+ IN gctUINT32 wait;
+
+ /* State. */
+ IN gctBOOL state;
+ }
+ UserSignal;
+#endif
+
+ /* gcvHAL_SIGNAL. */
+ struct _gcsHAL_SIGNAL
+ {
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+
+ /* Reserved. */
+ IN gctSIGNAL auxSignal;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+#if defined(__QNXNTO__)
+ /* Client pulse side-channel connection ID. Set by client in gcoOS_CreateSignal. */
+ IN gctINT32 coid;
+
+ /* Set by server. */
+ IN gctINT32 rcvid;
+#endif
+ /* Event generated from where of pipeline */
+ IN gceKERNEL_WHERE fromWhere;
+ }
+ Signal;
+
+ /* gcvHAL_WRITE_DATA. */
+ struct _gcsHAL_WRITE_DATA
+ {
+ /* Address to write data to. */
+ IN gctUINT32 address;
+
+ /* Data to write. */
+ IN gctUINT32 data;
+ }
+ WriteData;
+
+ /* gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_ALLOCATE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT gctSIZE_T bytes;
+
+ /* Hardware address of allocation. */
+ OUT gctUINT32 address;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT gctPOINTER logical;
+ }
+ AllocateContiguousMemory;
+
+ /* gcvHAL_FREE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_FREE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+ }
+ FreeContiguousMemory;
+
+ /* gcvHAL_READ_REGISTER */
+ struct _gcsHAL_READ_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ OUT gctUINT32 data;
+ }
+ ReadRegisterData;
+
+ /* gcvHAL_WRITE_REGISTER */
+ struct _gcsHAL_WRITE_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN gctUINT32 address;
+
+ /* Data read. */
+ IN gctUINT32 data;
+ }
+ WriteRegisterData;
+
+#if VIVANTE_PROFILER
+ /* gcvHAL_GET_PROFILE_SETTING */
+ struct _gcsHAL_GET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ OUT gctBOOL enable;
+
+ /* The profile file name */
+ OUT gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ GetProfileSetting;
+
+ /* gcvHAL_SET_PROFILE_SETTING */
+ struct _gcsHAL_SET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ IN gctBOOL enable;
+
+ /* The profile file name */
+ IN gctCHAR fileName[gcdMAX_PROFILE_FILE_NAME];
+ }
+ SetProfileSetting;
+
+ /* gcvHAL_READ_ALL_PROFILE_REGISTERS */
+ struct _gcsHAL_READ_ALL_PROFILE_REGISTERS
+ {
+ /* Data read. */
+ OUT gcsPROFILER_COUNTERS counters;
+ }
+ RegisterProfileData;
+
+ /* gcvHAL_PROFILE_REGISTERS_2D */
+ struct _gcsHAL_PROFILE_REGISTERS_2D
+ {
+ /* Data read. */
+ OUT gcs2D_PROFILE_PTR hwProfile2D;
+ }
+ RegisterProfileData2D;
+#endif
+ /* Power management. */
+ /* gcvHAL_SET_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_SET_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ IN gceCHIPPOWERSTATE state;
+ }
+ SetPowerManagement;
+
+ /* gcvHAL_QUERY_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_QUERY_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ OUT gceCHIPPOWERSTATE state;
+
+ /* Idle query. */
+ OUT gctBOOL isIdle;
+ }
+ QueryPowerManagement;
+
+ /* gcvHAL_QUERY_KERNEL_SETTINGS */
+ struct _gcsHAL_QUERY_KERNEL_SETTINGS
+ {
+ /* Settings.*/
+ OUT gcsKERNEL_SETTINGS settings;
+ }
+ QueryKernelSettings;
+
+ /* gcvHAL_MAP_PHYSICAL */
+ struct _gcsHAL_MAP_PHYSICAL
+ {
+ /* gcvTRUE to map, gcvFALSE to unmap. */
+ IN gctBOOL map;
+
+ /* Physical address. */
+ IN OUT gctPHYS_ADDR physical;
+ }
+ MapPhysical;
+
+ /* gcvHAL_DEBUG */
+ struct _gcsHAL_DEBUG
+ {
+ /* If gcvTRUE, set the debug information. */
+ IN gctBOOL set;
+ IN gctUINT32 level;
+ IN gctUINT32 zones;
+ IN gctBOOL enable;
+
+ IN gceDEBUG_MESSAGE_TYPE type;
+ IN gctUINT32 messageSize;
+
+ /* Message to print if not empty. */
+ IN gctCHAR message[80];
+ }
+ Debug;
+
+ /* gcvHAL_CACHE */
+ struct _gcsHAL_CACHE
+ {
+ IN gceCACHEOPERATION operation;
+ IN gctHANDLE process;
+ IN gctPOINTER logical;
+ IN gctSIZE_T bytes;
+ IN gcuVIDMEM_NODE_PTR node;
+ }
+ Cache;
+
+ /* gcvHAL_TIMESTAMP */
+ struct _gcsHAL_TIMESTAMP
+ {
+ /* Timer select. */
+ IN gctUINT32 timer;
+
+ /* Timer request type (0-stop, 1-start, 2-send delta). */
+ IN gctUINT32 request;
+
+ /* Result of delta time in microseconds. */
+ OUT gctINT32 timeDelta;
+ }
+ TimeStamp;
+
+ /* gcvHAL_DATABASE */
+ struct _gcsHAL_DATABASE
+ {
+ /* Set to gcvTRUE if you want to query a particular process ID.
+ ** Set to gcvFALSE to query the last detached process. */
+ IN gctBOOL validProcessID;
+
+ /* Process ID to query. */
+ IN gctUINT32 processID;
+
+ /* Information. */
+ OUT gcuDATABASE_INFO vidMem;
+ OUT gcuDATABASE_INFO nonPaged;
+ OUT gcuDATABASE_INFO contiguous;
+ OUT gcuDATABASE_INFO gpuIdle;
+ }
+ Database;
+
+ /* gcvHAL_VERSION */
+ struct _gcsHAL_VERSION
+ {
+ /* Major version: N.n.n. */
+ OUT gctINT32 major;
+
+ /* Minor version: n.N.n. */
+ OUT gctINT32 minor;
+
+ /* Patch version: n.n.N. */
+ OUT gctINT32 patch;
+
+ /* Build version. */
+ OUT gctUINT32 build;
+ }
+ Version;
+
+ /* gcvHAL_CHIP_INFO */
+ struct _gcsHAL_CHIP_INFO
+ {
+ /* Chip count. */
+ OUT gctINT32 count;
+
+ /* Chip types. */
+ OUT gceHARDWARE_TYPE types[gcdCHIP_COUNT];
+ }
+ ChipInfo;
+
+ /* gcvHAL_ATTACH */
+ struct _gcsHAL_ATTACH
+ {
+ /* Context buffer object. */
+ OUT gckCONTEXT context;
+
+ /* Number of states in the buffer. */
+ OUT gctSIZE_T stateCount;
+ }
+ Attach;
+
+ /* gcvHAL_DETACH */
+ struct _gcsHAL_DETACH
+ {
+ /* Context buffer object. */
+ IN gckCONTEXT context;
+ }
+ Detach;
+
+ /* gcvHAL_COMPOSE. */
+ gcsHAL_COMPOSE Compose;
+
+ /* gcvHAL_GET_FRAME_INFO. */
+ struct _gcsHAL_GET_FRAME_INFO
+ {
+ OUT gcsHAL_FRAME_INFO * frameInfo;
+ }
+ GetFrameInfo;
+
+ /* gcvHAL_SET_TIME_OUT. */
+ struct _gcsHAL_SET_TIMEOUT
+ {
+ gctUINT32 timeOut;
+ }
+ SetTimeOut;
+
+#if gcdENABLE_VG
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_VGCOMMIT
+ {
+ /* Context buffer. */
+ IN gcsVGCONTEXT_PTR context;
+
+ /* Command queue. */
+ IN gcsVGCMDQUEUE_PTR queue;
+
+ /* Number of entries in the queue. */
+ IN gctUINT entryCount;
+
+ /* Task table. */
+ IN gcsTASK_MASTER_TABLE_PTR taskTable;
+ }
+ VGCommit;
+
+ /* gcvHAL_QUERY_COMMAND_BUFFER */
+ struct _gcsHAL_QUERY_COMMAND_BUFFER
+ {
+ /* Command buffer attributes. */
+ OUT gcsCOMMAND_BUFFER_INFO information;
+ }
+ QueryCommandBuffer;
+
+#endif
+
+ struct _gcsHAL_GET_SHARED_INFO
+ {
+ IN gctUINT32 pid;
+ IN gctUINT32 dataId;
+ IN gcuVIDMEM_NODE_PTR node;
+ OUT gctUINT8_PTR data;
+ /* fix size */
+ OUT gctUINT8_PTR nodeData;
+ gctSIZE_T size;
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE infoType;
+ }
+ GetSharedInfo;
+
+ struct _gcsHAL_SET_SHARED_INFO
+ {
+ IN gctUINT32 dataId;
+ IN gcuVIDMEM_NODE_PTR node;
+ IN gctUINT8_PTR data;
+ IN gctUINT8_PTR nodeData;
+ IN gctSIZE_T size;
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE infoType;
+ }
+ SetSharedInfo;
+ }
+ u;
+}
+gcsHAL_INTERFACE;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_driver_h_ */
diff --git a/src/include_v4/gc_hal_driver_vg.h b/src/include_v4/gc_hal_driver_vg.h
new file mode 100644
index 0000000..fe57968
--- /dev/null
+++ b/src/include_v4/gc_hal_driver_vg.h
@@ -0,0 +1,292 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+
+
+#ifndef __gc_hal_driver_vg_h_
+#define __gc_hal_driver_vg_h_
+
+
+
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+******************************* I/O Control Codes ******************************
+\******************************************************************************/
+
+#define gcvHAL_CLASS "galcore"
+#define IOCTL_GCHAL_INTERFACE 30000
+
+/******************************************************************************\
+********************************* Command Codes ********************************
+\******************************************************************************/
+
+/******************************************************************************\
+********************* Command buffer information structure. ********************
+\******************************************************************************/
+
+typedef struct _gcsCOMMAND_BUFFER_INFO * gcsCOMMAND_BUFFER_INFO_PTR;
+typedef struct _gcsCOMMAND_BUFFER_INFO
+{
+ /* FE command buffer interrupt ID. */
+ gctINT32 feBufferInt;
+
+ /* TS overflow interrupt ID. */
+ gctINT32 tsOverflowInt;
+
+ /* Alignment and mask for the buffer address. */
+ gctUINT addressMask;
+ gctSIZE_T addressAlignment;
+
+ /* Alignment for each command. */
+ gctSIZE_T commandAlignment;
+
+ /* Number of bytes required by the STATE command. */
+ gctSIZE_T stateCommandSize;
+
+ /* Number of bytes required by the RESTART command. */
+ gctSIZE_T restartCommandSize;
+
+ /* Number of bytes required by the FETCH command. */
+ gctSIZE_T fetchCommandSize;
+
+ /* Number of bytes required by the CALL command. */
+ gctSIZE_T callCommandSize;
+
+ /* Number of bytes required by the RETURN command. */
+ gctSIZE_T returnCommandSize;
+
+ /* Number of bytes required by the EVENT command. */
+ gctSIZE_T eventCommandSize;
+
+ /* Number of bytes required by the END command. */
+ gctSIZE_T endCommandSize;
+
+ /* Number of bytes reserved at the tail of a static command buffer. */
+ gctSIZE_T staticTailSize;
+
+ /* Number of bytes reserved at the tail of a dynamic command buffer. */
+ gctSIZE_T dynamicTailSize;
+}
+gcsCOMMAND_BUFFER_INFO;
+
+/******************************************************************************\
+******************************** Task Structures *******************************
+\******************************************************************************/
+
+typedef enum _gceTASK
+{
+ gcvTASK_LINK,
+ gcvTASK_CLUSTER,
+ gcvTASK_INCREMENT,
+ gcvTASK_DECREMENT,
+ gcvTASK_SIGNAL,
+ gcvTASK_LOCKDOWN,
+ gcvTASK_UNLOCK_VIDEO_MEMORY,
+ gcvTASK_FREE_VIDEO_MEMORY,
+ gcvTASK_FREE_CONTIGUOUS_MEMORY,
+ gcvTASK_UNMAP_USER_MEMORY,
+ gcvTASK_UNMAP_MEMORY
+}
+gceTASK;
+
+typedef struct _gcsTASK_HEADER * gcsTASK_HEADER_PTR;
+typedef struct _gcsTASK_HEADER
+{
+ /* Task ID. */
+ IN gceTASK id;
+}
+gcsTASK_HEADER;
+
+typedef struct _gcsTASK_LINK * gcsTASK_LINK_PTR;
+typedef struct _gcsTASK_LINK
+{
+ /* Task ID (gcvTASK_LINK). */
+ IN gceTASK id;
+
+ /* Pointer to the next task container. */
+ IN gctPOINTER cotainer;
+
+ /* Pointer to the next task from the next task container. */
+ IN gcsTASK_HEADER_PTR task;
+}
+gcsTASK_LINK;
+
+typedef struct _gcsTASK_CLUSTER * gcsTASK_CLUSTER_PTR;
+typedef struct _gcsTASK_CLUSTER
+{
+ /* Task ID (gcvTASK_CLUSTER). */
+ IN gceTASK id;
+
+ /* Number of tasks in the cluster. */
+ IN gctUINT taskCount;
+}
+gcsTASK_CLUSTER;
+
+typedef struct _gcsTASK_INCREMENT * gcsTASK_INCREMENT_PTR;
+typedef struct _gcsTASK_INCREMENT
+{
+ /* Task ID (gcvTASK_INCREMENT). */
+ IN gceTASK id;
+
+ /* Address of the variable to increment. */
+ IN gctUINT32 address;
+}
+gcsTASK_INCREMENT;
+
+typedef struct _gcsTASK_DECREMENT * gcsTASK_DECREMENT_PTR;
+typedef struct _gcsTASK_DECREMENT
+{
+ /* Task ID (gcvTASK_DECREMENT). */
+ IN gceTASK id;
+
+ /* Address of the variable to decrement. */
+ IN gctUINT32 address;
+}
+gcsTASK_DECREMENT;
+
+typedef struct _gcsTASK_SIGNAL * gcsTASK_SIGNAL_PTR;
+typedef struct _gcsTASK_SIGNAL
+{
+ /* Task ID (gcvTASK_SIGNAL). */
+ IN gceTASK id;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+
+#if defined(__QNXNTO__)
+ IN gctINT32 coid;
+ IN gctINT32 rcvid;
+#endif
+}
+gcsTASK_SIGNAL;
+
+typedef struct _gcsTASK_LOCKDOWN * gcsTASK_LOCKDOWN_PTR;
+typedef struct _gcsTASK_LOCKDOWN
+{
+ /* Task ID (gcvTASK_LOCKDOWN). */
+ IN gceTASK id;
+
+ /* Address of the user space counter. */
+ IN gctUINT32 userCounter;
+
+ /* Address of the kernel space counter. */
+ IN gctUINT32 kernelCounter;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+}
+gcsTASK_LOCKDOWN;
+
+typedef struct _gcsTASK_UNLOCK_VIDEO_MEMORY * gcsTASK_UNLOCK_VIDEO_MEMORY_PTR;
+typedef struct _gcsTASK_UNLOCK_VIDEO_MEMORY
+{
+ /* Task ID (gcvTASK_UNLOCK_VIDEO_MEMORY). */
+ IN gceTASK id;
+
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+}
+gcsTASK_UNLOCK_VIDEO_MEMORY;
+
+typedef struct _gcsTASK_FREE_VIDEO_MEMORY * gcsTASK_FREE_VIDEO_MEMORY_PTR;
+typedef struct _gcsTASK_FREE_VIDEO_MEMORY
+{
+ /* Task ID (gcvTASK_FREE_VIDEO_MEMORY). */
+ IN gceTASK id;
+
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+}
+gcsTASK_FREE_VIDEO_MEMORY;
+
+typedef struct _gcsTASK_FREE_CONTIGUOUS_MEMORY * gcsTASK_FREE_CONTIGUOUS_MEMORY_PTR;
+typedef struct _gcsTASK_FREE_CONTIGUOUS_MEMORY
+{
+ /* Task ID (gcvTASK_FREE_CONTIGUOUS_MEMORY). */
+ IN gceTASK id;
+
+ /* Number of bytes allocated. */
+ IN gctSIZE_T bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN gctPOINTER logical;
+}
+gcsTASK_FREE_CONTIGUOUS_MEMORY;
+
+typedef struct _gcsTASK_UNMAP_USER_MEMORY * gcsTASK_UNMAP_USER_MEMORY_PTR;
+typedef struct _gcsTASK_UNMAP_USER_MEMORY
+{
+ /* Task ID (gcvTASK_UNMAP_USER_MEMORY). */
+ IN gceTASK id;
+
+ /* Base address of user memory to unmap. */
+ IN gctPOINTER memory;
+
+ /* Size of user memory in bytes to unmap. */
+ IN gctSIZE_T size;
+
+ /* Info record returned by gcvHAL_MAP_USER_MEMORY. */
+ IN gctPOINTER info;
+
+ /* Physical address of mapped memory as returned by
+ gcvHAL_MAP_USER_MEMORY. */
+ IN gctUINT32 address;
+}
+gcsTASK_UNMAP_USER_MEMORY;
+
+typedef struct _gcsTASK_UNMAP_MEMORY * gcsTASK_UNMAP_MEMORY_PTR;
+typedef struct _gcsTASK_UNMAP_MEMORY
+{
+ /* Task ID (gcvTASK_UNMAP_MEMORY). */
+ IN gceTASK id;
+
+ /* Physical memory address to unmap. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to unmap. */
+ IN gctSIZE_T bytes;
+
+ /* Address of mapped memory to unmap. */
+ IN gctPOINTER logical;
+}
+gcsTASK_UNMAP_MEMORY;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_driver_h_ */
diff --git a/src/include_v4/gc_hal_dump.h b/src/include_v4/gc_hal_dump.h
new file mode 100644
index 0000000..9b2db22
--- /dev/null
+++ b/src/include_v4/gc_hal_dump.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+#ifndef __gc_hal_dump_h_
+#define __gc_hal_dump_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** FILE LAYOUT:
+**
+** gcsDUMP_FILE structure
+**
+** gcsDUMP_DATA frame
+** gcsDUMP_DATA or gcDUMP_DATA_SIZE records rendingring the frame
+** gctUINT8 data[length]
+*/
+
+#define gcvDUMP_FILE_SIGNATURE gcmCC('g','c','D','B')
+
+typedef struct _gcsDUMP_FILE
+{
+ gctUINT32 signature; /* File signature */
+ gctSIZE_T length; /* Length of file */
+ gctUINT32 frames; /* Number of frames in file */
+}
+gcsDUMP_FILE;
+
+typedef enum _gceDUMP_TAG
+{
+ gcvTAG_SURFACE = gcmCC('s','u','r','f'),
+ gcvTAG_FRAME = gcmCC('f','r','m',' '),
+ gcvTAG_COMMAND = gcmCC('c','m','d',' '),
+ gcvTAG_INDEX = gcmCC('i','n','d','x'),
+ gcvTAG_STREAM = gcmCC('s','t','r','m'),
+ gcvTAG_TEXTURE = gcmCC('t','e','x','t'),
+ gcvTAG_RENDER_TARGET = gcmCC('r','n','d','r'),
+ gcvTAG_DEPTH = gcmCC('z','b','u','f'),
+ gcvTAG_RESOLVE = gcmCC('r','s','l','v'),
+ gcvTAG_DELETE = gcmCC('d','e','l',' '),
+}
+gceDUMP_TAG;
+
+typedef struct _gcsDUMP_SURFACE
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctUINT32 address; /* Address of the surface. */
+ gctINT16 width; /* Width of surface. */
+ gctINT16 height; /* Height of surface. */
+ gceSURF_FORMAT format; /* Surface pixel format. */
+ gctSIZE_T length; /* Number of bytes inside the surface. */
+}
+gcsDUMP_SURFACE;
+
+typedef struct _gcsDUMP_DATA
+{
+ gceDUMP_TAG type; /* Type of record. */
+ gctSIZE_T length; /* Number of bytes of data. */
+ gctUINT32 address; /* Address for the data. */
+}
+gcsDUMP_DATA;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_dump_h_ */
+
diff --git a/src/include_v4/gc_hal_eglplatform.h b/src/include_v4/gc_hal_eglplatform.h
new file mode 100644
index 0000000..e0efba4
--- /dev/null
+++ b/src/include_v4/gc_hal_eglplatform.h
@@ -0,0 +1,621 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_eglplatform_h_
+#define __gc_hal_eglplatform_h_
+
+/* Include VDK types. */
+#include "gc_hal_types.h"
+#include "gc_hal_base.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*******************************************************************************
+** Events. *********************************************************************
+*/
+
+typedef enum _halEventType
+{
+ /* Keyboard event. */
+ HAL_KEYBOARD,
+
+ /* Mouse move event. */
+ HAL_POINTER,
+
+ /* Mouse button event. */
+ HAL_BUTTON,
+
+ /* Application close event. */
+ HAL_CLOSE,
+
+ /* Application window has been updated. */
+ HAL_WINDOW_UPDATE
+}
+halEventType;
+
+/* Scancodes for keyboard. */
+typedef enum _halKeys
+{
+ HAL_UNKNOWN = -1,
+
+ HAL_BACKSPACE = 0x08,
+ HAL_TAB,
+ HAL_ENTER = 0x0D,
+ HAL_ESCAPE = 0x1B,
+
+ HAL_SPACE = 0x20,
+ HAL_SINGLEQUOTE = 0x27,
+ HAL_PAD_ASTERISK = 0x2A,
+ HAL_COMMA = 0x2C,
+ HAL_HYPHEN,
+ HAL_PERIOD,
+ HAL_SLASH,
+ HAL_0,
+ HAL_1,
+ HAL_2,
+ HAL_3,
+ HAL_4,
+ HAL_5,
+ HAL_6,
+ HAL_7,
+ HAL_8,
+ HAL_9,
+ HAL_SEMICOLON = 0x3B,
+ HAL_EQUAL = 0x3D,
+ HAL_A = 0x41,
+ HAL_B,
+ HAL_C,
+ HAL_D,
+ HAL_E,
+ HAL_F,
+ HAL_G,
+ HAL_H,
+ HAL_I,
+ HAL_J,
+ HAL_K,
+ HAL_L,
+ HAL_M,
+ HAL_N,
+ HAL_O,
+ HAL_P,
+ HAL_Q,
+ HAL_R,
+ HAL_S,
+ HAL_T,
+ HAL_U,
+ HAL_V,
+ HAL_W,
+ HAL_X,
+ HAL_Y,
+ HAL_Z,
+ HAL_LBRACKET,
+ HAL_BACKSLASH,
+ HAL_RBRACKET,
+ HAL_BACKQUOTE = 0x60,
+
+ HAL_F1 = 0x80,
+ HAL_F2,
+ HAL_F3,
+ HAL_F4,
+ HAL_F5,
+ HAL_F6,
+ HAL_F7,
+ HAL_F8,
+ HAL_F9,
+ HAL_F10,
+ HAL_F11,
+ HAL_F12,
+
+ HAL_LCTRL,
+ HAL_RCTRL,
+ HAL_LSHIFT,
+ HAL_RSHIFT,
+ HAL_LALT,
+ HAL_RALT,
+ HAL_CAPSLOCK,
+ HAL_NUMLOCK,
+ HAL_SCROLLLOCK,
+ HAL_PAD_0,
+ HAL_PAD_1,
+ HAL_PAD_2,
+ HAL_PAD_3,
+ HAL_PAD_4,
+ HAL_PAD_5,
+ HAL_PAD_6,
+ HAL_PAD_7,
+ HAL_PAD_8,
+ HAL_PAD_9,
+ HAL_PAD_HYPHEN,
+ HAL_PAD_PLUS,
+ HAL_PAD_SLASH,
+ HAL_PAD_PERIOD,
+ HAL_PAD_ENTER,
+ HAL_SYSRQ,
+ HAL_PRNTSCRN,
+ HAL_BREAK,
+ HAL_UP,
+ HAL_LEFT,
+ HAL_RIGHT,
+ HAL_DOWN,
+ HAL_HOME,
+ HAL_END,
+ HAL_PGUP,
+ HAL_PGDN,
+ HAL_INSERT,
+ HAL_DELETE,
+ HAL_LWINDOW,
+ HAL_RWINDOW,
+ HAL_MENU,
+ HAL_POWER,
+ HAL_SLEEP,
+ HAL_WAKE
+}
+halKeys;
+
+/* Structure that defined keyboard mapping. */
+typedef struct _halKeyMap
+{
+ /* Normal key. */
+ halKeys normal;
+
+ /* Extended key. */
+ halKeys extended;
+}
+halKeyMap;
+
+/* Event structure. */
+typedef struct _halEvent
+{
+ /* Event type. */
+ halEventType type;
+
+ /* Event data union. */
+ union _halEventData
+ {
+ /* Event data for keyboard. */
+ struct _halKeyboard
+ {
+ /* Scancode. */
+ halKeys scancode;
+
+ /* ASCII characte of the key pressed. */
+ gctCHAR key;
+
+ /* Flag whether the key was pressed (1) or released (0). */
+ gctCHAR pressed;
+ }
+ keyboard;
+
+ /* Event data for pointer. */
+ struct _halPointer
+ {
+ /* Current pointer coordinate. */
+ gctINT x;
+ gctINT y;
+ }
+ pointer;
+
+ /* Event data for mouse buttons. */
+ struct _halButton
+ {
+ /* Left button state. */
+ gctINT left;
+
+ /* Middle button state. */
+ gctINT middle;
+
+ /* Right button state. */
+ gctINT right;
+
+ /* Current pointer coordinate. */
+ gctINT x;
+ gctINT y;
+ }
+ button;
+ }
+ data;
+}
+halEvent;
+
+#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+/* Win32 and Windows CE platforms. */
+#include <windows.h>
+typedef HDC HALNativeDisplayType;
+typedef HWND HALNativeWindowType;
+typedef HBITMAP HALNativePixmapType;
+
+#elif defined(LINUX) && defined(EGL_API_FB) && !defined(__APPLE__)
+/* Linux platform for FBDEV. */
+typedef struct _FBDisplay * HALNativeDisplayType;
+typedef struct _FBWindow * HALNativeWindowType;
+typedef struct _FBPixmap * HALNativePixmapType;
+
+#elif defined(__ANDROID__) || defined(ANDROID)
+
+struct egl_native_pixmap_t;
+
+#if ANDROID_SDK_VERSION >= 9
+ #include <android/native_window.h>
+
+ typedef struct ANativeWindow* HALNativeWindowType;
+ typedef struct egl_native_pixmap_t* HALNativePixmapType;
+ typedef void* HALNativeDisplayType;
+#else
+ struct android_native_window_t;
+ typedef struct android_native_window_t* HALNativeWindowType;
+ typedef struct egl_native_pixmap_t * HALNativePixmapType;
+ typedef void* HALNativeDisplayType;
+#endif
+
+#elif defined(LINUX) || defined(__APPLE__)
+/* X11 platform. */
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+typedef Display * HALNativeDisplayType;
+typedef Window HALNativeWindowType;
+
+#ifdef CUSTOM_PIXMAP
+typedef void * HALNativePixmapType;
+#else
+typedef Pixmap HALNativePixmapType;
+#endif /* CUSTOM_PIXMAP */
+
+/* Rename some badly named X defines. */
+#ifdef Status
+# define XStatus int
+# undef Status
+#endif
+#ifdef Always
+# define XAlways 2
+# undef Always
+#endif
+#ifdef CurrentTime
+# undef CurrentTime
+# define XCurrentTime 0
+#endif
+
+#elif defined(__QNXNTO__)
+
+/* VOID */
+typedef void * HALNativeDisplayType;
+typedef void * HALNativeWindowType;
+typedef void * HALNativePixmapType;
+
+#else
+
+#error "Platform not recognized"
+
+/* VOID */
+typedef void * HALNativeDisplayType;
+typedef void * HALNativeWindowType;
+typedef void * HALNativePixmapType;
+
+#endif
+
+
+
+/*******************************************************************************
+** Display. ********************************************************************
+*/
+
+gceSTATUS
+gcoOS_GetDisplay(
+ OUT HALNativeDisplayType * Display
+ );
+
+gceSTATUS
+gcoOS_GetDisplayByIndex(
+ IN gctINT DisplayIndex,
+ OUT HALNativeDisplayType * Display
+ );
+
+gceSTATUS
+gcoOS_GetDisplayInfo(
+ IN HALNativeDisplayType Display,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctSIZE_T * Physical,
+ OUT gctINT * Stride,
+ OUT gctINT * BitsPerPixel
+ );
+
+/* VFK_DISPLAY_INFO structure defining information returned by
+ vdkGetDisplayInfoEx. */
+typedef struct _halDISPLAY_INFO
+{
+ /* The size of the display in pixels. */
+ gctINT width;
+ gctINT height;
+
+ /* The stride of the dispay. -1 is returned if the stride is not known
+ ** for the specified display.*/
+ gctINT stride;
+
+ /* The color depth of the display in bits per pixel. */
+ gctINT bitsPerPixel;
+
+ /* The logical pointer to the display memory buffer. NULL is returned
+ ** if the pointer is not known for the specified display. */
+ gctPOINTER logical;
+
+ /* The physical address of the display memory buffer. ~0 is returned
+ ** if the address is not known for the specified display. */
+ gctSIZE_T physical;
+
+#ifndef __QNXNTO__
+ /* 355_FB_MULTI_BUFFER */
+ gctINT multiBuffer;
+ gctINT backBufferY;
+#endif
+
+ /* The color info of the display. */
+ gctUINT alphaLength;
+ gctUINT alphaOffset;
+ gctUINT redLength;
+ gctUINT redOffset;
+ gctUINT greenLength;
+ gctUINT greenOffset;
+ gctUINT blueLength;
+ gctUINT blueOffset;
+
+ /* Display flip support. */
+ gctINT flip;
+}
+halDISPLAY_INFO;
+
+gceSTATUS
+gcoOS_GetDisplayInfoEx(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctUINT DisplayInfoSize,
+ OUT halDISPLAY_INFO * DisplayInfo
+ );
+
+gceSTATUS
+gcoOS_GetNextDisplayInfoEx(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctUINT DisplayInfoSize,
+ OUT halDISPLAY_INFO * DisplayInfo
+ );
+
+gceSTATUS
+gcoOS_GetDisplayVirtual(
+ IN HALNativeDisplayType Display,
+ OUT gctINT * Width,
+ OUT gctINT * Height
+ );
+
+gceSTATUS
+gcoOS_GetDisplayBackbuffer(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctPOINTER context,
+ IN gcoSURF surface,
+ OUT gctUINT * Offset,
+ OUT gctINT * X,
+ OUT gctINT * Y
+ );
+
+gceSTATUS
+gcoOS_SetDisplayVirtual(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctUINT Offset,
+ IN gctINT X,
+ IN gctINT Y
+ );
+
+gceSTATUS
+gcoOS_DisplayBufferRegions(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctINT NumRects,
+ IN gctINT_PTR Rects
+ );
+
+gceSTATUS
+gcoOS_DestroyDisplay(
+ IN HALNativeDisplayType Display
+ );
+
+/*******************************************************************************
+** Windows. ********************************************************************
+*/
+
+gceSTATUS
+gcoOS_CreateWindow(
+ IN HALNativeDisplayType Display,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gctINT Width,
+ IN gctINT Height,
+ OUT HALNativeWindowType * Window
+ );
+
+gceSTATUS
+gcoOS_GetWindowInfo(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ OUT gctINT * X,
+ OUT gctINT * Y,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctINT * BitsPerPixel,
+#ifdef __QNXNTO__
+ OUT gctINT * Format,
+#endif
+ OUT gctUINT * Offset
+ );
+
+gceSTATUS
+gcoOS_DestroyWindow(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_DrawImage(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT BitsPerPixel,
+ IN gctPOINTER Bits
+ );
+
+gceSTATUS
+gcoOS_GetImage(
+ IN HALNativeWindowType Window,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ OUT gctINT * BitsPerPixel,
+ OUT gctPOINTER * Bits
+ );
+
+/*******************************************************************************
+** Pixmaps. ********************************************************************
+*/
+
+gceSTATUS
+gcoOS_CreatePixmap(
+ IN HALNativeDisplayType Display,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT BitsPerPixel,
+ OUT HALNativePixmapType * Pixmap
+ );
+
+gceSTATUS
+gcoOS_GetPixmapInfo(
+ IN HALNativeDisplayType Display,
+ IN HALNativePixmapType Pixmap,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctINT * BitsPerPixel,
+ OUT gctINT * Stride,
+ OUT gctPOINTER * Bits
+ );
+
+gceSTATUS
+gcoOS_DrawPixmap(
+ IN HALNativeDisplayType Display,
+ IN HALNativePixmapType Pixmap,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT BitsPerPixel,
+ IN gctPOINTER Bits
+ );
+
+gceSTATUS
+gcoOS_DestroyPixmap(
+ IN HALNativeDisplayType Display,
+ IN HALNativePixmapType Pixmap
+ );
+
+/*******************************************************************************
+** OS relative. ****************************************************************
+*/
+gceSTATUS
+gcoOS_LoadEGLLibrary(
+ OUT gctHANDLE * Handle
+ );
+
+gceSTATUS
+gcoOS_FreeEGLLibrary(
+ IN gctHANDLE Handle
+ );
+
+gceSTATUS
+gcoOS_ShowWindow(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_HideWindow(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_SetWindowTitle(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ IN gctCONST_STRING Title
+ );
+
+gceSTATUS
+gcoOS_CapturePointer(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window
+ );
+
+gceSTATUS
+gcoOS_GetEvent(
+ IN HALNativeDisplayType Display,
+ IN HALNativeWindowType Window,
+ OUT halEvent * Event
+ );
+
+gceSTATUS
+gcoOS_CreateClientBuffer(
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctINT Format,
+ IN gctINT Type,
+ OUT gctPOINTER * ClientBuffer
+ );
+
+gceSTATUS
+gcoOS_GetClientBufferInfo(
+ IN gctPOINTER ClientBuffer,
+ OUT gctINT * Width,
+ OUT gctINT * Height,
+ OUT gctINT * Stride,
+ OUT gctPOINTER * Bits
+ );
+
+gceSTATUS
+gcoOS_DestroyClientBuffer(
+ IN gctPOINTER ClientBuffer
+ );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_eglplatform_h_ */
diff --git a/src/include_v4/gc_hal_engine.h b/src/include_v4/gc_hal_engine.h
new file mode 100644
index 0000000..22cdc2f
--- /dev/null
+++ b/src/include_v4/gc_hal_engine.h
@@ -0,0 +1,1847 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_engine_h_
+#define __gc_hal_engine_h_
+
+#ifndef VIVANTE_NO_3D
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+
+#if gcdENABLE_VG
+#include "gc_hal_engine_vg.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoSTREAM * gcoSTREAM;
+typedef struct _gcoVERTEX * gcoVERTEX;
+typedef struct _gcoTEXTURE * gcoTEXTURE;
+typedef struct _gcoINDEX * gcoINDEX;
+typedef struct _gcsVERTEX_ATTRIBUTES * gcsVERTEX_ATTRIBUTES_PTR;
+typedef struct _gcoVERTEXARRAY * gcoVERTEXARRAY;
+
+#define gcdATTRIBUTE_COUNT 16
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+/* Shading format. */
+typedef enum _gceSHADING
+{
+ gcvSHADING_SMOOTH,
+ gcvSHADING_FLAT_D3D,
+ gcvSHADING_FLAT_OPENGL,
+}
+gceSHADING;
+
+/* Culling modes. */
+typedef enum _gceCULL
+{
+ gcvCULL_NONE,
+ gcvCULL_CCW,
+ gcvCULL_CW,
+}
+gceCULL;
+
+/* Fill modes. */
+typedef enum _gceFILL
+{
+ gcvFILL_POINT,
+ gcvFILL_WIRE_FRAME,
+ gcvFILL_SOLID,
+}
+gceFILL;
+
+/* Compare modes. */
+typedef enum _gceCOMPARE
+{
+ gcvCOMPARE_NEVER,
+ gcvCOMPARE_NOT_EQUAL,
+ gcvCOMPARE_LESS,
+ gcvCOMPARE_LESS_OR_EQUAL,
+ gcvCOMPARE_EQUAL,
+ gcvCOMPARE_GREATER,
+ gcvCOMPARE_GREATER_OR_EQUAL,
+ gcvCOMPARE_ALWAYS,
+ gcvCOMPARE_INVALID = -1
+}
+gceCOMPARE;
+
+/* Stencil modes. */
+typedef enum _gceSTENCIL_MODE
+{
+ gcvSTENCIL_NONE,
+ gcvSTENCIL_SINGLE_SIDED,
+ gcvSTENCIL_DOUBLE_SIDED,
+}
+gceSTENCIL_MODE;
+
+/* Stencil operations. */
+typedef enum _gceSTENCIL_OPERATION
+{
+ gcvSTENCIL_KEEP,
+ gcvSTENCIL_REPLACE,
+ gcvSTENCIL_ZERO,
+ gcvSTENCIL_INVERT,
+ gcvSTENCIL_INCREMENT,
+ gcvSTENCIL_DECREMENT,
+ gcvSTENCIL_INCREMENT_SATURATE,
+ gcvSTENCIL_DECREMENT_SATURATE,
+ gcvSTENCIL_OPERATION_INVALID = -1
+}
+gceSTENCIL_OPERATION;
+
+/* Stencil selection. */
+typedef enum _gceSTENCIL_WHERE
+{
+ gcvSTENCIL_FRONT,
+ gcvSTENCIL_BACK,
+}
+gceSTENCIL_WHERE;
+
+/* Texture addressing selection. */
+typedef enum _gceTEXTURE_WHICH
+{
+ gcvTEXTURE_S,
+ gcvTEXTURE_T,
+ gcvTEXTURE_R,
+}
+gceTEXTURE_WHICH;
+
+/* Texture addressing modes. */
+typedef enum _gceTEXTURE_ADDRESSING
+{
+ gcvTEXTURE_WRAP,
+ gcvTEXTURE_CLAMP,
+ gcvTEXTURE_BORDER,
+ gcvTEXTURE_MIRROR,
+ gcvTEXTURE_MIRROR_ONCE,
+}
+gceTEXTURE_ADDRESSING;
+
+/* Texture filters. */
+typedef enum _gceTEXTURE_FILTER
+{
+ gcvTEXTURE_NONE,
+ gcvTEXTURE_POINT,
+ gcvTEXTURE_LINEAR,
+ gcvTEXTURE_ANISOTROPIC,
+}
+gceTEXTURE_FILTER;
+
+/* Primitive types. */
+typedef enum _gcePRIMITIVE
+{
+ gcvPRIMITIVE_POINT_LIST,
+ gcvPRIMITIVE_LINE_LIST,
+ gcvPRIMITIVE_LINE_STRIP,
+ gcvPRIMITIVE_LINE_LOOP,
+ gcvPRIMITIVE_TRIANGLE_LIST,
+ gcvPRIMITIVE_TRIANGLE_STRIP,
+ gcvPRIMITIVE_TRIANGLE_FAN,
+ gcvPRIMITIVE_RECTANGLE,
+}
+gcePRIMITIVE;
+
+/* Index types. */
+typedef enum _gceINDEX_TYPE
+{
+ gcvINDEX_8,
+ gcvINDEX_16,
+ gcvINDEX_32,
+}
+gceINDEX_TYPE;
+
+/******************************************************************************\
+********************************* gcoHAL Object *********************************
+\******************************************************************************/
+
+/* Query the target capabilities. */
+gceSTATUS
+gcoHAL_QueryTargetCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MultiTargetCount,
+ OUT gctUINT * MaxSamples
+ );
+
+gceSTATUS
+gcoHAL_SetDepthOnly(
+ IN gcoHAL Hal,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoHAL_QueryShaderCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * VertexUniforms,
+ OUT gctUINT * FragmentUniforms,
+ OUT gctUINT * Varyings
+ );
+
+gceSTATUS
+gcoHAL_QueryTextureCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoHAL_QueryTextureMaxAniso(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxAnisoValue
+ );
+
+gceSTATUS
+gcoHAL_QueryStreamCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT32 * MaxAttributes,
+ OUT gctUINT32 * MaxStreamSize,
+ OUT gctUINT32 * NumberOfStreams,
+ OUT gctUINT32 * Alignment
+ );
+
+/******************************************************************************\
+********************************* gcoSURF Object ********************************
+\******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+/*--------------------------------- gcoSURF 3D --------------------------------*/
+
+/* Copy surface. */
+gceSTATUS
+gcoSURF_Copy(
+ IN gcoSURF Surface,
+ IN gcoSURF Source
+ );
+
+/* Clear surface. */
+gceSTATUS
+gcoSURF_Clear(
+ IN gcoSURF Surface,
+ IN gctUINT Flags
+ );
+
+/* Set number of samples for a gcoSURF object. */
+gceSTATUS
+gcoSURF_SetSamples(
+ IN gcoSURF Surface,
+ IN gctUINT Samples
+ );
+
+/* Get the number of samples per pixel. */
+gceSTATUS
+gcoSURF_GetSamples(
+ IN gcoSURF Surface,
+ OUT gctUINT_PTR Samples
+ );
+
+/* Clear rectangular surface. */
+gceSTATUS
+gcoSURF_ClearRect(
+ IN gcoSURF Surface,
+ IN gctINT Left,
+ IN gctINT Top,
+ IN gctINT Right,
+ IN gctINT Bottom,
+ IN gctUINT Flags
+ );
+
+/* TO BE REMOVED */
+ gceSTATUS
+ depr_gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight
+ );
+
+ gceSTATUS
+ depr_gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 DestAddress,
+ IN gctPOINTER DestBits,
+ IN gctINT DestStride,
+ IN gceSURF_TYPE DestType,
+ IN gceSURF_FORMAT DestFormat,
+ IN gctUINT DestWidth,
+ IN gctUINT DestHeight,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Resample surface. */
+gceSTATUS
+gcoSURF_Resample(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Resolve surface. */
+gceSTATUS
+gcoSURF_Resolve(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Export the render target. */
+gceSTATUS
+gcoSURF_ExportRenderTarget(
+ IN gcoSURF SrcSurface
+);
+
+/* Import the render target. */
+gceSTATUS
+gcoSURF_ImportRenderTarget(
+ IN gctUINT32 Pid,
+ IN gcoSURF SrcSurface
+);
+
+/* Save the Resolve info to kernel. */
+gceSTATUS
+gcoSURF_PrepareRemoteResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Resolve using the rectangle info previously saved in the vid mem node. */
+gceSTATUS
+gcoSURF_ResolveFromStoredRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface
+ );
+
+/* Using the info that Process Pid saved to do resolve. */
+gceSTATUS
+gcoSURF_RemoteResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctBOOL *resolveDiscarded
+ );
+
+/* Return the "resolve submitted indicator" signal. */
+gceSTATUS
+gcoSURF_GetRTSignal(
+ IN gcoSURF RTSurface,
+ OUT gctSIGNAL * resolveSubmittedSignal
+ );
+
+/* Resolve rectangular area of a surface. */
+gceSTATUS
+gcoSURF_ResolveRect(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsPOINT_PTR SrcOrigin,
+ IN gcsPOINT_PTR DestOrigin,
+ IN gcsPOINT_PTR RectSize
+ );
+
+/* Set surface resolvability. */
+gceSTATUS
+gcoSURF_SetResolvability(
+ IN gcoSURF Surface,
+ IN gctBOOL Resolvable
+ );
+
+gceSTATUS
+gcoSURF_IsRenderable(
+ IN gcoSURF Surface
+ );
+
+/******************************************************************************\
+******************************** gcoINDEX Object *******************************
+\******************************************************************************/
+
+/* Construct a new gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoINDEX * Index
+ );
+
+/* Destroy a gcoINDEX object. */
+gceSTATUS
+gcoINDEX_Destroy(
+ IN gcoINDEX Index
+ );
+
+/* Lock index in memory. */
+gceSTATUS
+gcoINDEX_Lock(
+ IN gcoINDEX Index,
+ OUT gctUINT32 * Address,
+ OUT gctPOINTER * Memory
+ );
+
+/* Unlock index that was previously locked with gcoINDEX_Lock. */
+gceSTATUS
+gcoINDEX_Unlock(
+ IN gcoINDEX Index
+ );
+
+/* Upload index data into the memory. */
+gceSTATUS
+gcoINDEX_Load(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE IndexType,
+ IN gctUINT32 IndexCount,
+ IN gctPOINTER IndexBuffer
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_Bind(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type
+ );
+
+/* Bind an index object to the hardware. */
+gceSTATUS
+gcoINDEX_BindOffset(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset
+ );
+
+/* Free existing index buffer. */
+gceSTATUS
+gcoINDEX_Free(
+ IN gcoINDEX Index
+ );
+
+/* Upload data into an index buffer. */
+gceSTATUS
+gcoINDEX_Upload(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/* Upload data into an index buffer starting at an offset. */
+gceSTATUS
+gcoINDEX_UploadOffset(
+ IN gcoINDEX Index,
+ IN gctUINT32 Offset,
+ IN gctCONST_POINTER Buffer,
+ IN gctSIZE_T Bytes
+ );
+
+/* Query the index capabilities. */
+gceSTATUS
+gcoINDEX_QueryCaps(
+ OUT gctBOOL * Index8,
+ OUT gctBOOL * Index16,
+ OUT gctBOOL * Index32,
+ OUT gctUINT * MaxIndex
+ );
+
+/* Determine the index range in the current index buffer. */
+gceSTATUS
+gcoINDEX_GetIndexRange(
+ IN gcoINDEX Index,
+ IN gceINDEX_TYPE Type,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Count,
+ OUT gctUINT32 * MinimumIndex,
+ OUT gctUINT32 * MaximumIndex
+ );
+
+/* Dynamic buffer management. */
+gceSTATUS
+gcoINDEX_SetDynamic(
+ IN gcoINDEX Index,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+gceSTATUS
+gcoINDEX_UploadDynamic(
+ IN gcoINDEX Index,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes
+ );
+
+/******************************************************************************\
+********************************** gco3D Object *********************************
+\******************************************************************************/
+
+/* Clear flags. */
+typedef enum _gceCLEAR
+{
+ gcvCLEAR_COLOR = 0x1,
+ gcvCLEAR_DEPTH = 0x2,
+ gcvCLEAR_STENCIL = 0x4,
+ gcvCLEAR_HZ = 0x8,
+ gcvCLEAR_HAS_VAA = 0x10,
+}
+gceCLEAR;
+
+/* Blending targets. */
+typedef enum _gceBLEND_UNIT
+{
+ gcvBLEND_SOURCE,
+ gcvBLEND_TARGET,
+}
+gceBLEND_UNIT;
+
+/* Construct a new gco3D object. */
+gceSTATUS
+gco3D_Construct(
+ IN gcoHAL Hal,
+ OUT gco3D * Engine
+ );
+
+/* Destroy an gco3D object. */
+gceSTATUS
+gco3D_Destroy(
+ IN gco3D Engine
+ );
+
+/* Set 3D API type. */
+gceSTATUS
+gco3D_SetAPI(
+ IN gco3D Engine,
+ IN gceAPI ApiType
+ );
+
+/* Set render target. */
+gceSTATUS
+gco3D_SetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset render target. */
+gceSTATUS
+gco3D_UnsetTarget(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set depth buffer. */
+gceSTATUS
+gco3D_SetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Unset depth buffer. */
+gceSTATUS
+gco3D_UnsetDepth(
+ IN gco3D Engine,
+ IN gcoSURF Surface
+ );
+
+/* Set viewport. */
+gceSTATUS
+gco3D_SetViewport(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set scissors. */
+gceSTATUS
+gco3D_SetScissors(
+ IN gco3D Engine,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom
+ );
+
+/* Set clear color. */
+gceSTATUS
+gco3D_SetClearColor(
+ IN gco3D Engine,
+ IN gctUINT8 Red,
+ IN gctUINT8 Green,
+ IN gctUINT8 Blue,
+ IN gctUINT8 Alpha
+ );
+
+/* Set fixed point clear color. */
+gceSTATUS
+gco3D_SetClearColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point clear color. */
+gceSTATUS
+gco3D_SetClearColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set fixed point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Depth
+ );
+
+/* Set floating point clear depth. */
+gceSTATUS
+gco3D_SetClearDepthF(
+ IN gco3D Engine,
+ IN gctFLOAT Depth
+ );
+
+/* Set clear stencil. */
+gceSTATUS
+gco3D_SetClearStencil(
+ IN gco3D Engine,
+ IN gctUINT32 Stencil
+ );
+
+/* Clear a Rect sub-surface. */
+gceSTATUS
+gco3D_ClearRect(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctPOINTER Memory,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctINT32 Left,
+ IN gctINT32 Top,
+ IN gctINT32 Right,
+ IN gctINT32 Bottom,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+/* Clear surface. */
+gceSTATUS
+gco3D_Clear(
+ IN gco3D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 Width,
+ IN gctUINT32 Height,
+ IN gctUINT32 Flags
+ );
+
+
+/* Clear tile status. */
+gceSTATUS
+gco3D_ClearTileStatus(
+ IN gco3D Engine,
+ IN gcsSURF_INFO_PTR Surface,
+ IN gctUINT32 TileStatusAddress,
+ IN gctUINT32 Flags
+ );
+
+/* Set shading mode. */
+gceSTATUS
+gco3D_SetShading(
+ IN gco3D Engine,
+ IN gceSHADING Shading
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_EnableBlending(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set blending function. */
+gceSTATUS
+gco3D_SetBlendFunction(
+ IN gco3D Engine,
+ IN gceBLEND_UNIT Unit,
+ IN gceBLEND_FUNCTION FunctionRGB,
+ IN gceBLEND_FUNCTION FunctionAlpha
+ );
+
+/* Set blending mode. */
+gceSTATUS
+gco3D_SetBlendMode(
+ IN gco3D Engine,
+ IN gceBLEND_MODE ModeRGB,
+ IN gceBLEND_MODE ModeAlpha
+ );
+
+/* Set blending color. */
+gceSTATUS
+gco3D_SetBlendColor(
+ IN gco3D Engine,
+ IN gctUINT Red,
+ IN gctUINT Green,
+ IN gctUINT Blue,
+ IN gctUINT Alpha
+ );
+
+/* Set fixed point blending color. */
+gceSTATUS
+gco3D_SetBlendColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+/* Set floating point blending color. */
+gceSTATUS
+gco3D_SetBlendColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Set culling mode. */
+gceSTATUS
+gco3D_SetCulling(
+ IN gco3D Engine,
+ IN gceCULL Mode
+ );
+
+/* Enable point size */
+gceSTATUS
+gco3D_SetPointSizeEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set point sprite */
+gceSTATUS
+gco3D_SetPointSprite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set fill mode. */
+gceSTATUS
+gco3D_SetFill(
+ IN gco3D Engine,
+ IN gceFILL Mode
+ );
+
+/* Set depth compare mode. */
+gceSTATUS
+gco3D_SetDepthCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Enable depth writing. */
+gceSTATUS
+gco3D_EnableDepthWrite(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth mode. */
+gceSTATUS
+gco3D_SetDepthMode(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeX(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFIXED_POINT Near,
+ IN gctFIXED_POINT Far
+ );
+
+/* Set depth range. */
+gceSTATUS
+gco3D_SetDepthRangeF(
+ IN gco3D Engine,
+ IN gceDEPTH_MODE Mode,
+ IN gctFLOAT Near,
+ IN gctFLOAT Far
+ );
+
+/* Set last pixel enable */
+gceSTATUS
+gco3D_SetLastPixelEnable(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set depth Bias and Scale */
+gceSTATUS
+gco3D_SetDepthScaleBiasX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT DepthScale,
+ IN gctFIXED_POINT DepthBias
+ );
+
+gceSTATUS
+gco3D_SetDepthScaleBiasF(
+ IN gco3D Engine,
+ IN gctFLOAT DepthScale,
+ IN gctFLOAT DepthBias
+ );
+
+/* Enable or disable dithering. */
+gceSTATUS
+gco3D_EnableDither(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set color write enable bits. */
+gceSTATUS
+gco3D_SetColorWrite(
+ IN gco3D Engine,
+ IN gctUINT8 Enable
+ );
+
+/* Enable or disable early depth. */
+gceSTATUS
+gco3D_SetEarlyDepth(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Enable or disable all early depth operations. */
+gceSTATUS
+gco3D_SetAllEarlyDepthModes(
+ IN gco3D Engine,
+ IN gctBOOL Disable
+ );
+
+/* Enable or disable depth-only mode. */
+gceSTATUS
+gco3D_SetDepthOnly(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+typedef struct _gcsSTENCIL_INFO * gcsSTENCIL_INFO_PTR;
+typedef struct _gcsSTENCIL_INFO
+{
+ gceSTENCIL_MODE mode;
+
+ gctUINT8 mask;
+ gctUINT8 writeMask;
+
+ gctUINT8 referenceFront;
+
+ gceCOMPARE compareFront;
+ gceSTENCIL_OPERATION passFront;
+ gceSTENCIL_OPERATION failFront;
+ gceSTENCIL_OPERATION depthFailFront;
+
+ gctUINT8 referenceBack;
+ gceCOMPARE compareBack;
+ gceSTENCIL_OPERATION passBack;
+ gceSTENCIL_OPERATION failBack;
+ gceSTENCIL_OPERATION depthFailBack;
+}
+gcsSTENCIL_INFO;
+
+/* Set stencil mode. */
+gceSTATUS
+gco3D_SetStencilMode(
+ IN gco3D Engine,
+ IN gceSTENCIL_MODE Mode
+ );
+
+/* Set stencil mask. */
+gceSTATUS
+gco3D_SetStencilMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil write mask. */
+gceSTATUS
+gco3D_SetStencilWriteMask(
+ IN gco3D Engine,
+ IN gctUINT8 Mask
+ );
+
+/* Set stencil reference. */
+gceSTATUS
+gco3D_SetStencilReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference,
+ IN gctBOOL Front
+ );
+
+/* Set stencil compare. */
+gceSTATUS
+gco3D_SetStencilCompare(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceCOMPARE Compare
+ );
+
+/* Set stencil operation on pass. */
+gceSTATUS
+gco3D_SetStencilPass(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on fail. */
+gceSTATUS
+gco3D_SetStencilFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set stencil operation on depth fail. */
+gceSTATUS
+gco3D_SetStencilDepthFail(
+ IN gco3D Engine,
+ IN gceSTENCIL_WHERE Where,
+ IN gceSTENCIL_OPERATION Operation
+ );
+
+/* Set all stencil states in one blow. */
+gceSTATUS
+gco3D_SetStencilAll(
+ IN gco3D Engine,
+ IN gcsSTENCIL_INFO_PTR Info
+ );
+
+typedef struct _gcsALPHA_INFO * gcsALPHA_INFO_PTR;
+typedef struct _gcsALPHA_INFO
+{
+ /* Alpha test states. */
+ gctBOOL test;
+ gceCOMPARE compare;
+ gctUINT8 reference;
+
+ /* Alpha blending states. */
+ gctBOOL blend;
+
+ gceBLEND_FUNCTION srcFuncColor;
+ gceBLEND_FUNCTION srcFuncAlpha;
+ gceBLEND_FUNCTION trgFuncColor;
+ gceBLEND_FUNCTION trgFuncAlpha;
+
+ gceBLEND_MODE modeColor;
+ gceBLEND_MODE modeAlpha;
+
+ gctUINT32 color;
+}
+gcsALPHA_INFO;
+
+/* Enable or disable alpha test. */
+gceSTATUS
+gco3D_SetAlphaTest(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set alpha test compare. */
+gceSTATUS
+gco3D_SetAlphaCompare(
+ IN gco3D Engine,
+ IN gceCOMPARE Compare
+ );
+
+/* Set alpha test reference in unsigned integer. */
+gceSTATUS
+gco3D_SetAlphaReference(
+ IN gco3D Engine,
+ IN gctUINT8 Reference
+ );
+
+/* Set alpha test reference in fixed point. */
+gceSTATUS
+gco3D_SetAlphaReferenceX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Reference
+ );
+
+/* Set alpha test reference in floating point. */
+gceSTATUS
+gco3D_SetAlphaReferenceF(
+ IN gco3D Engine,
+ IN gctFLOAT Reference
+ );
+
+/* Enable/Disable anti-alias line. */
+gceSTATUS
+gco3D_SetAntiAliasLine(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Set texture slot for anti-alias line. */
+gceSTATUS
+gco3D_SetAALineTexSlot(
+ IN gco3D Engine,
+ IN gctUINT TexSlot
+ );
+
+/* Set anti-alias line width scale. */
+gceSTATUS
+gco3D_SetAALineWidth(
+ IN gco3D Engine,
+ IN gctFLOAT Width
+ );
+
+/* Draw a number of primitives. */
+gceSTATUS
+gco3D_DrawPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT StartVertex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+gceSTATUS
+gco3D_DrawPrimitivesCount(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT* StartVertex,
+ IN gctSIZE_T* VertexCount,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+
+/* Draw a number of primitives using offsets. */
+gceSTATUS
+gco3D_DrawPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives. */
+gceSTATUS
+gco3D_DrawIndexedPrimitives(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT BaseVertex,
+ IN gctINT StartIndex,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Draw a number of indexed primitives using offsets. */
+gceSTATUS
+gco3D_DrawIndexedPrimitivesOffset(
+ IN gco3D Engine,
+ IN gcePRIMITIVE Type,
+ IN gctINT32 BaseOffset,
+ IN gctINT32 StartOffset,
+ IN gctSIZE_T PrimitiveCount
+ );
+
+/* Enable or disable anti-aliasing. */
+gceSTATUS
+gco3D_SetAntiAlias(
+ IN gco3D Engine,
+ IN gctBOOL Enable
+ );
+
+/* Write data into the command buffer. */
+gceSTATUS
+gco3D_WriteBuffer(
+ IN gco3D Engine,
+ IN gctCONST_POINTER Data,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Aligned
+ );
+
+/* Send sempahore and stall until sempahore is signalled. */
+gceSTATUS
+gco3D_Semaphore(
+ IN gco3D Engine,
+ IN gceWHERE From,
+ IN gceWHERE To,
+ IN gceHOW How);
+
+/* Set the subpixels center. */
+gceSTATUS
+gco3D_SetCentroids(
+ IN gco3D Engine,
+ IN gctUINT32 Index,
+ IN gctPOINTER Centroids
+ );
+
+gceSTATUS
+gco3D_SetLogicOp(
+ IN gco3D Engine,
+ IN gctUINT8 Rop
+ );
+
+/* OCL thread walker information. */
+typedef struct _gcsTHREAD_WALKER_INFO * gcsTHREAD_WALKER_INFO_PTR;
+typedef struct _gcsTHREAD_WALKER_INFO
+{
+ gctUINT32 dimensions;
+ gctUINT32 traverseOrder;
+ gctUINT32 enableSwathX;
+ gctUINT32 enableSwathY;
+ gctUINT32 enableSwathZ;
+ gctUINT32 swathSizeX;
+ gctUINT32 swathSizeY;
+ gctUINT32 swathSizeZ;
+ gctUINT32 valueOrder;
+
+ gctUINT32 globalSizeX;
+ gctUINT32 globalOffsetX;
+ gctUINT32 globalSizeY;
+ gctUINT32 globalOffsetY;
+ gctUINT32 globalSizeZ;
+ gctUINT32 globalOffsetZ;
+
+ gctUINT32 workGroupSizeX;
+ gctUINT32 workGroupCountX;
+ gctUINT32 workGroupSizeY;
+ gctUINT32 workGroupCountY;
+ gctUINT32 workGroupSizeZ;
+ gctUINT32 workGroupCountZ;
+
+ gctUINT32 threadAllocation;
+}
+gcsTHREAD_WALKER_INFO;
+
+/* Start OCL thread walker. */
+gceSTATUS
+gco3D_InvokeThreadWalker(
+ IN gco3D Engine,
+ IN gcsTHREAD_WALKER_INFO_PTR Info
+ );
+
+/*----------------------------------------------------------------------------*/
+/*-------------------------- gco3D Fragment Processor ------------------------*/
+
+/* Set the fragment processor configuration. */
+gceSTATUS
+gco3D_SetFragmentConfiguration(
+ IN gco3D Engine,
+ IN gctBOOL ColorFromStream,
+ IN gctBOOL EnableFog,
+ IN gctBOOL EnableSmoothPoint,
+ IN gctUINT32 ClipPlanes
+ );
+
+/* Enable/disable texture stage operation. */
+gceSTATUS
+gco3D_EnableTextureStage(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL Enable
+ );
+
+/* Program the channel enable masks for the color texture function. */
+gceSTATUS
+gco3D_SetTextureColorMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the channel enable masks for the alpha texture function. */
+gceSTATUS
+gco3D_SetTextureAlphaMask(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctBOOL ColorEnabled,
+ IN gctBOOL AlphaEnabled
+ );
+
+/* Program the constant fragment color. */
+gceSTATUS
+gco3D_SetFragmentColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFragmentColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant fog color. */
+gceSTATUS
+gco3D_SetFogColorX(
+ IN gco3D Engine,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetFogColorF(
+ IN gco3D Engine,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Program the constant texture color. */
+gceSTATUS
+gco3D_SetTetxureColorX(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFIXED_POINT Red,
+ IN gctFIXED_POINT Green,
+ IN gctFIXED_POINT Blue,
+ IN gctFIXED_POINT Alpha
+ );
+
+gceSTATUS
+gco3D_SetTetxureColorF(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+/* Configure color texture function. */
+gceSTATUS
+gco3D_SetColorTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+/* Configure alpha texture function. */
+gceSTATUS
+gco3D_SetAlphaTextureFunction(
+ IN gco3D Engine,
+ IN gctINT Stage,
+ IN gceTEXTURE_FUNCTION Function,
+ IN gceTEXTURE_SOURCE Source0,
+ IN gceTEXTURE_CHANNEL Channel0,
+ IN gceTEXTURE_SOURCE Source1,
+ IN gceTEXTURE_CHANNEL Channel1,
+ IN gceTEXTURE_SOURCE Source2,
+ IN gceTEXTURE_CHANNEL Channel2,
+ IN gctINT Scale
+ );
+
+/* Invoke OCL thread walker. */
+gceSTATUS
+gcoHARDWARE_InvokeThreadWalker(
+ IN gcsTHREAD_WALKER_INFO_PTR Info
+ );
+
+/******************************************************************************\
+******************************* gcoTEXTURE Object *******************************
+\******************************************************************************/
+
+/* Cube faces. */
+typedef enum _gceTEXTURE_FACE
+{
+ gcvFACE_NONE,
+ gcvFACE_POSITIVE_X,
+ gcvFACE_NEGATIVE_X,
+ gcvFACE_POSITIVE_Y,
+ gcvFACE_NEGATIVE_Y,
+ gcvFACE_POSITIVE_Z,
+ gcvFACE_NEGATIVE_Z,
+}
+gceTEXTURE_FACE;
+
+typedef struct _gcsTEXTURE
+{
+ /* Addressing modes. */
+ gceTEXTURE_ADDRESSING s;
+ gceTEXTURE_ADDRESSING t;
+ gceTEXTURE_ADDRESSING r;
+
+ /* Border color. */
+ gctUINT8 border[4];
+
+ /* Filters. */
+ gceTEXTURE_FILTER minFilter;
+ gceTEXTURE_FILTER magFilter;
+ gceTEXTURE_FILTER mipFilter;
+ gctUINT anisoFilter;
+
+ /* Level of detail. */
+ gctFIXED_POINT lodBias;
+ gctFIXED_POINT lodMin;
+ gctFIXED_POINT lodMax;
+}
+gcsTEXTURE, * gcsTEXTURE_PTR;
+
+/* Construct a new gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Construct(
+ IN gcoHAL Hal,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Construct a new sized gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_ConstructSized(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gctUINT MipMapCount,
+ IN gcePOOL Pool,
+ OUT gcoTEXTURE * Texture
+ );
+
+/* Destroy an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Destroy(
+ IN gcoTEXTURE Texture
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_Upload(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadSub(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT X,
+ IN gctUINT Y,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctINT Stride,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Upload compressed data to an gcoTEXTURE object. */
+gceSTATUS
+gcoTEXTURE_UploadCompressed(
+ IN gcoTEXTURE Texture,
+ IN gceTEXTURE_FACE Face,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Slice,
+ IN gctCONST_POINTER Memory,
+ IN gctSIZE_T Bytes
+ );
+
+/* Get gcoSURF object for a mipmap level. */
+gceSTATUS
+gcoTEXTURE_GetMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ OUT gcoSURF * Surface
+ );
+
+/* Get gcoSURF object for a mipmap level and face offset. */
+gceSTATUS
+gcoTEXTURE_GetMipMapFace(
+ IN gcoTEXTURE Texture,
+ IN gctUINT MipMap,
+ IN gceTEXTURE_FACE Face,
+ OUT gcoSURF * Surface,
+ OUT gctUINT32_PTR Offset
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT Width,
+ IN gctUINT Height,
+ IN gctUINT Depth,
+ IN gctUINT Faces,
+ IN gcePOOL Pool,
+ OUT gcoSURF * Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromClient(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_AddMipMapFromSurface(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoTEXTURE_SetEndianHint(
+ IN gcoTEXTURE Texture,
+ IN gceENDIAN_HINT EndianHint
+ );
+
+gceSTATUS
+gcoTEXTURE_Disable(
+ IN gcoHAL Hal,
+ IN gctINT Sampler
+ );
+
+gceSTATUS
+gcoTEXTURE_Flush(
+ IN gcoTEXTURE Texture
+ );
+
+gceSTATUS
+gcoTEXTURE_QueryCaps(
+ IN gcoHAL Hal,
+ OUT gctUINT * MaxWidth,
+ OUT gctUINT * MaxHeight,
+ OUT gctUINT * MaxDepth,
+ OUT gctBOOL * Cubic,
+ OUT gctBOOL * NonPowerOfTwo,
+ OUT gctUINT * VertexSamplers,
+ OUT gctUINT * PixelSamplers
+ );
+
+gceSTATUS
+gcoTEXTURE_GetClosestFormat(
+ IN gcoHAL Hal,
+ IN gceSURF_FORMAT InFormat,
+ OUT gceSURF_FORMAT* OutFormat
+ );
+
+gceSTATUS
+gcoTEXTURE_RenderIntoMipMap(
+ IN gcoTEXTURE Texture,
+ IN gctINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsRenderable(
+ IN gcoTEXTURE Texture,
+ IN gctUINT Level
+ );
+
+gceSTATUS
+gcoTEXTURE_IsComplete(
+ IN gcoTEXTURE Texture,
+ IN gctINT MaxLevel
+ );
+
+gceSTATUS
+gcoTEXTURE_BindTexture(
+ IN gcoTEXTURE Texture,
+ IN gctINT Target,
+ IN gctINT Sampler,
+ IN gcsTEXTURE_PTR Info
+ );
+
+/******************************************************************************\
+******************************* gcoSTREAM Object ******************************
+\******************************************************************************/
+
+typedef enum _gceVERTEX_FORMAT
+{
+ gcvVERTEX_BYTE,
+ gcvVERTEX_UNSIGNED_BYTE,
+ gcvVERTEX_SHORT,
+ gcvVERTEX_UNSIGNED_SHORT,
+ gcvVERTEX_INT,
+ gcvVERTEX_UNSIGNED_INT,
+ gcvVERTEX_FIXED,
+ gcvVERTEX_HALF,
+ gcvVERTEX_FLOAT,
+ gcvVERTEX_UNSIGNED_INT_10_10_10_2,
+ gcvVERTEX_INT_10_10_10_2,
+}
+gceVERTEX_FORMAT;
+
+gceSTATUS
+gcoSTREAM_Construct(
+ IN gcoHAL Hal,
+ OUT gcoSTREAM * Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Destroy(
+ IN gcoSTREAM Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Upload(
+ IN gcoSTREAM Stream,
+ IN gctCONST_POINTER Buffer,
+ IN gctUINT32 Offset,
+ IN gctSIZE_T Bytes,
+ IN gctBOOL Dynamic
+ );
+
+gceSTATUS
+gcoSTREAM_SetStride(
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoSTREAM_Lock(
+ IN gcoSTREAM Stream,
+ OUT gctPOINTER * Logical,
+ OUT gctUINT32 * Physical
+ );
+
+gceSTATUS
+gcoSTREAM_Unlock(
+ IN gcoSTREAM Stream
+ );
+
+gceSTATUS
+gcoSTREAM_Reserve(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes
+ );
+
+gceSTATUS
+gcoSTREAM_Flush(
+ IN gcoSTREAM Stream
+ );
+
+/* Dynamic buffer API. */
+gceSTATUS
+gcoSTREAM_SetDynamic(
+ IN gcoSTREAM Stream,
+ IN gctSIZE_T Bytes,
+ IN gctUINT Buffers
+ );
+
+typedef struct _gcsSTREAM_INFO
+{
+ gctUINT index;
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT components;
+ gctSIZE_T size;
+ gctCONST_POINTER data;
+ gctUINT stride;
+}
+gcsSTREAM_INFO, * gcsSTREAM_INFO_PTR;
+
+gceSTATUS
+gcoSTREAM_UploadDynamic(
+ IN gcoSTREAM Stream,
+ IN gctUINT VertexCount,
+ IN gctUINT InfoCount,
+ IN gcsSTREAM_INFO_PTR Info,
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoSTREAM_CPUCacheOperation(
+ IN gcoSTREAM Stream,
+ IN gceCACHEOPERATION Operation
+ );
+
+/******************************************************************************\
+******************************** gcoVERTEX Object ******************************
+\******************************************************************************/
+
+typedef struct _gcsVERTEX_ATTRIBUTES
+{
+ gceVERTEX_FORMAT format;
+ gctBOOL normalized;
+ gctUINT32 components;
+ gctSIZE_T size;
+ gctUINT32 stream;
+ gctUINT32 offset;
+ gctUINT32 stride;
+}
+gcsVERTEX_ATTRIBUTES;
+
+gceSTATUS
+gcoVERTEX_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVERTEX * Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Destroy(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_Reset(
+ IN gcoVERTEX Vertex
+ );
+
+gceSTATUS
+gcoVERTEX_EnableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index,
+ IN gceVERTEX_FORMAT Format,
+ IN gctBOOL Normalized,
+ IN gctUINT32 Components,
+ IN gcoSTREAM Stream,
+ IN gctUINT32 Offset,
+ IN gctUINT32 Stride
+ );
+
+gceSTATUS
+gcoVERTEX_DisableAttribute(
+ IN gcoVERTEX Vertex,
+ IN gctUINT32 Index
+ );
+
+gceSTATUS
+gcoVERTEX_Bind(
+ IN gcoVERTEX Vertex
+ );
+
+/*******************************************************************************
+***** gcoVERTEXARRAY Object ***************************************************/
+
+typedef struct _gcsVERTEXARRAY
+{
+ /* Enabled. */
+ gctBOOL enable;
+
+ /* Number of components. */
+ gctINT size;
+
+ /* Attribute format. */
+ gceVERTEX_FORMAT format;
+
+ /* Flag whether the attribute is normalized or not. */
+ gctBOOL normalized;
+
+ /* Stride of the component. */
+ gctUINT stride;
+
+ /* Pointer to the attribute data. */
+ gctCONST_POINTER pointer;
+
+ /* Stream object owning the attribute data. */
+ gcoSTREAM stream;
+
+ /* Generic values for attribute. */
+ gctFLOAT genericValue[4];
+
+ /* Vertex shader linkage. */
+ gctUINT linkage;
+}
+gcsVERTEXARRAY,
+* gcsVERTEXARRAY_PTR;
+
+gceSTATUS
+gcoVERTEXARRAY_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVERTEXARRAY * Vertex
+ );
+
+gceSTATUS
+gcoVERTEXARRAY_Destroy(
+ IN gcoVERTEXARRAY Vertex
+ );
+
+gceSTATUS
+gcoVERTEXARRAY_Bind(
+ IN gcoVERTEXARRAY Vertex,
+ IN gctUINT32 EnableBits,
+ IN gcsVERTEXARRAY_PTR VertexArray,
+ IN gctUINT First,
+ IN gctSIZE_T Count,
+ IN gceINDEX_TYPE IndexType,
+ IN gcoINDEX IndexObject,
+ IN gctPOINTER IndexMemory,
+ IN OUT gcePRIMITIVE * PrimitiveType,
+ IN OUT gctUINT * PrimitiveCount
+ );
+
+/*******************************************************************************
+***** Composition *************************************************************/
+
+typedef enum _gceCOMPOSITION
+{
+ gcvCOMPOSE_CLEAR = 1,
+ gcvCOMPOSE_BLUR,
+ gcvCOMPOSE_DIM,
+ gcvCOMPOSE_LAYER
+}
+gceCOMPOSITION;
+
+typedef struct _gcsCOMPOSITION * gcsCOMPOSITION_PTR;
+typedef struct _gcsCOMPOSITION
+{
+ /* Structure size. */
+ gctUINT structSize;
+
+ /* Composition operation. */
+ gceCOMPOSITION operation;
+
+ /* Layer to be composed. */
+ gcoSURF layer;
+
+ /* Source and target coordinates. */
+ gcsRECT srcRect;
+ gcsRECT trgRect;
+
+ /* Target rectangle */
+ gcsPOINT v0;
+ gcsPOINT v1;
+ gcsPOINT v2;
+
+ /* Blending parameters. */
+ gctBOOL enableBlending;
+ gctBOOL premultiplied;
+ gctUINT8 alphaValue;
+
+ /* Clear color. */
+ gctFLOAT r;
+ gctFLOAT g;
+ gctFLOAT b;
+ gctFLOAT a;
+}
+gcsCOMPOSITION;
+
+gceSTATUS
+gco3D_ProbeComposition(
+ gctBOOL ResetIfEmpty
+ );
+
+gceSTATUS
+gco3D_CompositionBegin(
+ void
+ );
+
+gceSTATUS
+gco3D_ComposeLayer(
+ IN gcsCOMPOSITION_PTR Layer
+ );
+
+gceSTATUS
+gco3D_CompositionSignals(
+ IN gctHANDLE Process,
+ IN gctSIGNAL Signal1,
+ IN gctSIGNAL Signal2
+ );
+
+gceSTATUS
+gco3D_CompositionEnd(
+ IN gcoSURF Target,
+ IN gctBOOL Synchronous
+ );
+
+/* Frame Database */
+gceSTATUS
+gcoHAL_AddFrameDB(
+ void
+ );
+
+gceSTATUS
+gcoHAL_DumpFrameDB(
+ gctCONST_STRING Filename OPTIONAL
+ );
+
+gceSTATUS
+gcoHAL_GetSharedInfo(
+ IN gctUINT32 Pid,
+ IN gctUINT32 DataId,
+ OUT gctUINT8_PTR Data,
+ IN gctSIZE_T Bytes,
+ IN gcuVIDMEM_NODE_PTR Node,
+ OUT gctUINT8_PTR NodeData,
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE SharedInfoType
+ );
+
+gceSTATUS
+gcoHAL_SetSharedInfo(
+ IN gctUINT32 DataId,
+ IN gctUINT8_PTR Data,
+ IN gctSIZE_T Bytes,
+ IN gcuVIDMEM_NODE_PTR Node,
+ IN gctUINT8_PTR NodeData,
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE SharedInfoType
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VIVANTE_NO_3D */
+#endif /* __gc_hal_engine_h_ */
diff --git a/src/include_v4/gc_hal_engine_vg.h b/src/include_v4/gc_hal_engine_vg.h
new file mode 100644
index 0000000..571e03e
--- /dev/null
+++ b/src/include_v4/gc_hal_engine_vg.h
@@ -0,0 +1,908 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+
+
+#ifndef __gc_hal_engine_vg_h_
+#define __gc_hal_engine_vg_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "gc_hal_types.h"
+
+/******************************************************************************\
+******************************** VG Enumerations *******************************
+\******************************************************************************/
+
+/**
+** @ingroup gcoVG
+**
+** @brief Tiling mode for painting and imagig.
+**
+** This enumeration defines the tiling modes supported by the HAL. This is
+** in fact a one-to-one mapping of the OpenVG 1.1 tile modes.
+*/
+typedef enum _gceTILE_MODE
+{
+ gcvTILE_FILL,
+ gcvTILE_PAD,
+ gcvTILE_REPEAT,
+ gcvTILE_REFLECT
+}
+gceTILE_MODE;
+
+/******************************************************************************/
+/** @ingroup gcoVG
+**
+** @brief The different paint modes.
+**
+** This enumeration lists the available paint modes.
+*/
+typedef enum _gcePAINT_TYPE
+{
+ /** Solid color. */
+ gcvPAINT_MODE_SOLID,
+
+ /** Linear gradient. */
+ gcvPAINT_MODE_LINEAR,
+
+ /** Radial gradient. */
+ gcvPAINT_MODE_RADIAL,
+
+ /** Pattern. */
+ gcvPAINT_MODE_PATTERN,
+
+ /** Mode count. */
+ gcvPAINT_MODE_COUNT
+}
+gcePAINT_TYPE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Types of path data supported by HAL.
+**
+** This enumeration defines the types of path data supported by the HAL.
+** This is in fact a one-to-one mapping of the OpenVG 1.1 path types.
+*/
+typedef enum _gcePATHTYPE
+{
+ gcePATHTYPE_UNKNOWN = -1,
+ gcePATHTYPE_INT8,
+ gcePATHTYPE_INT16,
+ gcePATHTYPE_INT32,
+ gcePATHTYPE_FLOAT
+}
+gcePATHTYPE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Supported path segment commands.
+**
+** This enumeration defines the path segment commands supported by the HAL.
+*/
+typedef enum _gceVGCMD
+{
+ gcvVGCMD_END, /* 0: GCCMD_TS_OPCODE_END */
+ gcvVGCMD_CLOSE, /* 1: GCCMD_TS_OPCODE_CLOSE */
+ gcvVGCMD_MOVE, /* 2: GCCMD_TS_OPCODE_MOVE */
+ gcvVGCMD_MOVE_REL, /* 3: GCCMD_TS_OPCODE_MOVE_REL */
+ gcvVGCMD_LINE, /* 4: GCCMD_TS_OPCODE_LINE */
+ gcvVGCMD_LINE_REL, /* 5: GCCMD_TS_OPCODE_LINE_REL */
+ gcvVGCMD_QUAD, /* 6: GCCMD_TS_OPCODE_QUADRATIC */
+ gcvVGCMD_QUAD_REL, /* 7: GCCMD_TS_OPCODE_QUADRATIC_REL */
+ gcvVGCMD_CUBIC, /* 8: GCCMD_TS_OPCODE_CUBIC */
+ gcvVGCMD_CUBIC_REL, /* 9: GCCMD_TS_OPCODE_CUBIC_REL */
+ gcvVGCMD_BREAK, /* 10: GCCMD_TS_OPCODE_BREAK */
+ gcvVGCMD_HLINE, /* 11: ******* R E S E R V E D *******/
+ gcvVGCMD_HLINE_REL, /* 12: ******* R E S E R V E D *******/
+ gcvVGCMD_VLINE, /* 13: ******* R E S E R V E D *******/
+ gcvVGCMD_VLINE_REL, /* 14: ******* R E S E R V E D *******/
+ gcvVGCMD_SQUAD, /* 15: ******* R E S E R V E D *******/
+ gcvVGCMD_SQUAD_REL, /* 16: ******* R E S E R V E D *******/
+ gcvVGCMD_SCUBIC, /* 17: ******* R E S E R V E D *******/
+ gcvVGCMD_SCUBIC_REL, /* 18: ******* R E S E R V E D *******/
+ gcvVGCMD_SCCWARC, /* 19: ******* R E S E R V E D *******/
+ gcvVGCMD_SCCWARC_REL, /* 20: ******* R E S E R V E D *******/
+ gcvVGCMD_SCWARC, /* 21: ******* R E S E R V E D *******/
+ gcvVGCMD_SCWARC_REL, /* 22: ******* R E S E R V E D *******/
+ gcvVGCMD_LCCWARC, /* 23: ******* R E S E R V E D *******/
+ gcvVGCMD_LCCWARC_REL, /* 24: ******* R E S E R V E D *******/
+ gcvVGCMD_LCWARC, /* 25: ******* R E S E R V E D *******/
+ gcvVGCMD_LCWARC_REL, /* 26: ******* R E S E R V E D *******/
+
+ /* The width of the command recognized by the hardware on bits. */
+ gcvVGCMD_WIDTH = 5,
+
+ /* Hardware command mask. */
+ gcvVGCMD_MASK = (1 << gcvVGCMD_WIDTH) - 1,
+
+ /* Command modifiers. */
+ gcvVGCMD_H_MOD = 1 << gcvVGCMD_WIDTH, /* = 32 */
+ gcvVGCMD_V_MOD = 2 << gcvVGCMD_WIDTH, /* = 64 */
+ gcvVGCMD_S_MOD = 3 << gcvVGCMD_WIDTH, /* = 96 */
+ gcvVGCMD_ARC_MOD = 4 << gcvVGCMD_WIDTH, /* = 128 */
+
+ /* Emulated LINE commands. */
+ gcvVGCMD_HLINE_EMUL = gcvVGCMD_H_MOD | gcvVGCMD_LINE, /* = 36 */
+ gcvVGCMD_HLINE_EMUL_REL = gcvVGCMD_H_MOD | gcvVGCMD_LINE_REL, /* = 37 */
+ gcvVGCMD_VLINE_EMUL = gcvVGCMD_V_MOD | gcvVGCMD_LINE, /* = 68 */
+ gcvVGCMD_VLINE_EMUL_REL = gcvVGCMD_V_MOD | gcvVGCMD_LINE_REL, /* = 69 */
+
+ /* Emulated SMOOTH commands. */
+ gcvVGCMD_SQUAD_EMUL = gcvVGCMD_S_MOD | gcvVGCMD_QUAD, /* = 102 */
+ gcvVGCMD_SQUAD_EMUL_REL = gcvVGCMD_S_MOD | gcvVGCMD_QUAD_REL, /* = 103 */
+ gcvVGCMD_SCUBIC_EMUL = gcvVGCMD_S_MOD | gcvVGCMD_CUBIC, /* = 104 */
+ gcvVGCMD_SCUBIC_EMUL_REL = gcvVGCMD_S_MOD | gcvVGCMD_CUBIC_REL, /* = 105 */
+
+ /* Emulation ARC commands. */
+ gcvVGCMD_ARC_LINE = gcvVGCMD_ARC_MOD | gcvVGCMD_LINE, /* = 132 */
+ gcvVGCMD_ARC_LINE_REL = gcvVGCMD_ARC_MOD | gcvVGCMD_LINE_REL, /* = 133 */
+ gcvVGCMD_ARC_QUAD = gcvVGCMD_ARC_MOD | gcvVGCMD_QUAD, /* = 134 */
+ gcvVGCMD_ARC_QUAD_REL = gcvVGCMD_ARC_MOD | gcvVGCMD_QUAD_REL /* = 135 */
+}
+gceVGCMD;
+typedef enum _gceVGCMD * gceVGCMD_PTR;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Blending modes supported by the HAL.
+**
+** This enumeration defines the blending modes supported by the HAL. This is
+** in fact a one-to-one mapping of the OpenVG 1.1 blending modes.
+*/
+typedef enum _gceVG_BLEND
+{
+ gcvVG_BLEND_SRC,
+ gcvVG_BLEND_SRC_OVER,
+ gcvVG_BLEND_DST_OVER,
+ gcvVG_BLEND_SRC_IN,
+ gcvVG_BLEND_DST_IN,
+ gcvVG_BLEND_MULTIPLY,
+ gcvVG_BLEND_SCREEN,
+ gcvVG_BLEND_DARKEN,
+ gcvVG_BLEND_LIGHTEN,
+ gcvVG_BLEND_ADDITIVE,
+ gcvVG_BLEND_SUBTRACT,
+ gcvVG_BLEND_FILTER
+}
+gceVG_BLEND;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Image modes supported by the HAL.
+**
+** This enumeration defines the image modes supported by the HAL. This is
+** in fact a one-to-one mapping of the OpenVG 1.1 image modes with the addition
+** of NO IMAGE.
+*/
+typedef enum _gceVG_IMAGE
+{
+ gcvVG_IMAGE_NONE,
+ gcvVG_IMAGE_NORMAL,
+ gcvVG_IMAGE_MULTIPLY,
+ gcvVG_IMAGE_STENCIL,
+ gcvVG_IMAGE_FILTER
+}
+gceVG_IMAGE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Filter mode patterns and imaging.
+**
+** This enumeration defines the filter modes supported by the HAL.
+*/
+typedef enum _gceIMAGE_FILTER
+{
+ gcvFILTER_POINT,
+ gcvFILTER_LINEAR,
+ gcvFILTER_BI_LINEAR
+}
+gceIMAGE_FILTER;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Primitive modes supported by the HAL.
+**
+** This enumeration defines the primitive modes supported by the HAL.
+*/
+typedef enum _gceVG_PRIMITIVE
+{
+ gcvVG_SCANLINE,
+ gcvVG_RECTANGLE,
+ gcvVG_TESSELLATED,
+ gcvVG_TESSELLATED_TILED
+}
+gceVG_PRIMITIVE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Rendering quality modes supported by the HAL.
+**
+** This enumeration defines the rendering quality modes supported by the HAL.
+*/
+typedef enum _gceRENDER_QUALITY
+{
+ gcvVG_NONANTIALIASED,
+ gcvVG_2X2_MSAA,
+ gcvVG_2X4_MSAA,
+ gcvVG_4X4_MSAA
+}
+gceRENDER_QUALITY;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Fill rules supported by the HAL.
+**
+** This enumeration defines the fill rules supported by the HAL.
+*/
+typedef enum _gceFILL_RULE
+{
+ gcvVG_EVEN_ODD,
+ gcvVG_NON_ZERO
+}
+gceFILL_RULE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Cap styles supported by the HAL.
+**
+** This enumeration defines the cap styles supported by the HAL.
+*/
+typedef enum _gceCAP_STYLE
+{
+ gcvCAP_BUTT,
+ gcvCAP_ROUND,
+ gcvCAP_SQUARE
+}
+gceCAP_STYLE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Join styles supported by the HAL.
+**
+** This enumeration defines the join styles supported by the HAL.
+*/
+typedef enum _gceJOIN_STYLE
+{
+ gcvJOIN_MITER,
+ gcvJOIN_ROUND,
+ gcvJOIN_BEVEL
+}
+gceJOIN_STYLE;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Channel mask values.
+**
+** This enumeration defines the values for channel mask used in image
+** filtering.
+*/
+
+/* Base values for channel mask definitions. */
+#define gcvCHANNEL_X (0)
+#define gcvCHANNEL_R (1 << 0)
+#define gcvCHANNEL_G (1 << 1)
+#define gcvCHANNEL_B (1 << 2)
+#define gcvCHANNEL_A (1 << 3)
+
+typedef enum _gceCHANNEL
+{
+ gcvCHANNEL_XXXX = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_XXXA = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_XXBX = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_XXBA = (gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_A),
+
+ gcvCHANNEL_XGXX = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_XGXA = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_XGBX = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_XGBA = (gcvCHANNEL_X | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_A),
+
+ gcvCHANNEL_RXXX = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_RXXA = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_RXBX = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_RXBA = (gcvCHANNEL_R | gcvCHANNEL_X | gcvCHANNEL_B | gcvCHANNEL_A),
+
+ gcvCHANNEL_RGXX = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_X),
+ gcvCHANNEL_RGXA = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_X | gcvCHANNEL_A),
+ gcvCHANNEL_RGBX = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_X),
+ gcvCHANNEL_RGBA = (gcvCHANNEL_R | gcvCHANNEL_G | gcvCHANNEL_B | gcvCHANNEL_A),
+}
+gceCHANNEL;
+
+/******************************************************************************\
+******************************** VG Structures *******************************
+\******************************************************************************/
+
+/**
+** @ingroup gcoVG
+**
+** @brief Definition of the color ramp used by the gradient paints.
+**
+** The gcsCOLOR_RAMP structure defines the layout of one single color inside
+** a color ramp which is used by gradient paints.
+*/
+typedef struct _gcsCOLOR_RAMP
+{
+ /** Value for the color stop. */
+ gctFLOAT stop;
+
+ /** Red color channel value for the color stop. */
+ gctFLOAT red;
+
+ /** Green color channel value for the color stop. */
+ gctFLOAT green;
+
+ /** Blue color channel value for the color stop. */
+ gctFLOAT blue;
+
+ /** Alpha color channel value for the color stop. */
+ gctFLOAT alpha;
+}
+gcsCOLOR_RAMP, * gcsCOLOR_RAMP_PTR;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Definition of the color ramp used by the gradient paints in fixed form.
+**
+** The gcsCOLOR_RAMP structure defines the layout of one single color inside
+** a color ramp which is used by gradient paints.
+*/
+typedef struct _gcsFIXED_COLOR_RAMP
+{
+ /** Value for the color stop. */
+ gctFIXED_POINT stop;
+
+ /** Red color channel value for the color stop. */
+ gctFIXED_POINT red;
+
+ /** Green color channel value for the color stop. */
+ gctFIXED_POINT green;
+
+ /** Blue color channel value for the color stop. */
+ gctFIXED_POINT blue;
+
+ /** Alpha color channel value for the color stop. */
+ gctFIXED_POINT alpha;
+}
+gcsFIXED_COLOR_RAMP, * gcsFIXED_COLOR_RAMP_PTR;
+
+
+/**
+** @ingroup gcoVG
+**
+** @brief Rectangle structure used by the gcoVG object.
+**
+** This structure defines the layout of a rectangle. Make sure width and
+** height are larger than 0.
+*/
+typedef struct _gcsVG_RECT * gcsVG_RECT_PTR;
+typedef struct _gcsVG_RECT
+{
+ /** Left location of the rectangle. */
+ gctINT x;
+
+ /** Top location of the rectangle. */
+ gctINT y;
+
+ /** Width of the rectangle. */
+ gctINT width;
+
+ /** Height of the rectangle. */
+ gctINT height;
+}
+gcsVG_RECT;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Path command buffer attribute structure.
+**
+** The gcsPATH_BUFFER_INFO structure contains the specifics about
+** the layout of the path data command buffer.
+*/
+typedef struct _gcsPATH_BUFFER_INFO * gcsPATH_BUFFER_INFO_PTR;
+typedef struct _gcsPATH_BUFFER_INFO
+{
+ gctUINT reservedForHead;
+ gctUINT reservedForTail;
+}
+gcsPATH_BUFFER_INFO;
+
+/**
+** @ingroup gcoVG
+**
+** @brief Definition of the path data container structure.
+**
+** The gcsPATH structure defines the layout of the path data container.
+*/
+typedef struct _gcsPATH_DATA * gcsPATH_DATA_PTR;
+typedef struct _gcsPATH_DATA
+{
+ /* Data container in command buffer format. */
+ gcsCMDBUFFER data;
+
+ /* Path data type. */
+ gcePATHTYPE dataType;
+}
+gcsPATH_DATA;
+
+
+/******************************************************************************\
+********************************* gcoHAL Object ********************************
+\******************************************************************************/
+
+/* Query path data storage attributes. */
+gceSTATUS
+gcoHAL_QueryPathStorage(
+ IN gcoHAL Hal,
+ OUT gcsPATH_BUFFER_INFO_PTR Information
+ );
+
+/* Associate a completion signal with the command buffer. */
+gceSTATUS
+gcoHAL_AssociateCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Release the current command buffer completion signal. */
+gceSTATUS
+gcoHAL_DeassociateCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Verify whether the command buffer is still in use. */
+gceSTATUS
+gcoHAL_CheckCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Wait until the command buffer is no longer in use. */
+gceSTATUS
+gcoHAL_WaitCompletion(
+ IN gcoHAL Hal,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+/* Flush the pixel cache. */
+gceSTATUS
+gcoHAL_Flush(
+ IN gcoHAL Hal
+ );
+
+/* Split a harwdare address into pool and offset. */
+gceSTATUS
+gcoHAL_SplitAddress(
+ IN gcoHAL Hal,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Combine pool and offset into a harwdare address. */
+gceSTATUS
+gcoHAL_CombineAddress(
+ IN gcoHAL Hal,
+ IN gcePOOL Pool,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Schedule to free linear video memory allocated. */
+gceSTATUS
+gcoHAL_ScheduleVideoMemory(
+ IN gcoHAL Hal,
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/* Free linear video memory allocated with gcoHAL_AllocateLinearVideoMemory. */
+gceSTATUS
+gcoHAL_FreeVideoMemory(
+ IN gcoHAL Hal,
+ IN gcuVIDMEM_NODE_PTR Node
+ );
+
+/* Query command buffer attributes. */
+gceSTATUS
+gcoHAL_QueryCommandBuffer(
+ IN gcoHAL Hal,
+ OUT gcsCOMMAND_BUFFER_INFO_PTR Information
+ );
+/* Allocate and lock linear video memory. */
+gceSTATUS
+gcoHAL_AllocateLinearVideoMemory(
+ IN gcoHAL Hal,
+ IN gctUINT Size,
+ IN gctUINT Alignment,
+ IN gcePOOL Pool,
+ OUT gcuVIDMEM_NODE_PTR * Node,
+ OUT gctUINT32 * Address,
+ OUT gctPOINTER * Memory
+ );
+
+/* Align the specified size accordingly to the hardware requirements. */
+gceSTATUS
+gcoHAL_GetAlignedSurfaceSize(
+ IN gcoHAL Hal,
+ IN gceSURF_TYPE Type,
+ IN OUT gctUINT32_PTR Width,
+ IN OUT gctUINT32_PTR Height
+ );
+
+gceSTATUS
+gcoHAL_ReserveTask(
+ IN gcoHAL Hal,
+ IN gceBLOCK Block,
+ IN gctUINT TaskCount,
+ IN gctSIZE_T Bytes,
+ OUT gctPOINTER * Memory
+ );
+/******************************************************************************\
+********************************** gcoVG Object ********************************
+\******************************************************************************/
+
+/** @defgroup gcoVG gcoVG
+**
+** The gcoVG object abstracts the VG hardware pipe.
+*/
+
+gctBOOL
+gcoVG_IsMaskSupported(
+ IN gceSURF_FORMAT Format
+ );
+
+gctBOOL
+gcoVG_IsTargetSupported(
+ IN gceSURF_FORMAT Format
+ );
+
+gctBOOL
+gcoVG_IsImageSupported(
+ IN gceSURF_FORMAT Format
+ );
+
+gctUINT8 gcoVG_PackColorComponent(
+ gctFLOAT Value
+ );
+
+gceSTATUS
+gcoVG_Construct(
+ IN gcoHAL Hal,
+ OUT gcoVG * Vg
+ );
+
+gceSTATUS
+gcoVG_Destroy(
+ IN gcoVG Vg
+ );
+
+gceSTATUS
+gcoVG_SetTarget(
+ IN gcoVG Vg,
+ IN gcoSURF Target
+ );
+
+gceSTATUS
+gcoVG_UnsetTarget(
+ IN gcoVG Vg,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoVG_SetUserToSurface(
+ IN gcoVG Vg,
+ IN gctFLOAT UserToSurface[9]
+ );
+
+gceSTATUS
+gcoVG_SetSurfaceToImage(
+ IN gcoVG Vg,
+ IN gctFLOAT SurfaceToImage[9]
+ );
+
+gceSTATUS
+gcoVG_EnableMask(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoVG_SetMask(
+ IN gcoVG Vg,
+ IN gcoSURF Mask
+ );
+
+gceSTATUS
+gcoVG_UnsetMask(
+ IN gcoVG Vg,
+ IN gcoSURF Surface
+ );
+
+gceSTATUS
+gcoVG_FlushMask(
+ IN gcoVG Vg
+ );
+
+gceSTATUS
+gcoVG_EnableScissor(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoVG_SetScissor(
+ IN gcoVG Vg,
+ IN gctSIZE_T RectangleCount,
+ IN gcsVG_RECT_PTR Rectangles
+ );
+
+gceSTATUS
+gcoVG_EnableColorTransform(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gcoVG_SetColorTransform(
+ IN gcoVG Vg,
+ IN gctFLOAT ColorTransform[8]
+ );
+
+gceSTATUS
+gcoVG_SetTileFillColor(
+ IN gcoVG Vg,
+ IN gctFLOAT Red,
+ IN gctFLOAT Green,
+ IN gctFLOAT Blue,
+ IN gctFLOAT Alpha
+ );
+
+gceSTATUS
+gcoVG_SetSolidPaint(
+ IN gcoVG Vg,
+ IN gctUINT8 Red,
+ IN gctUINT8 Green,
+ IN gctUINT8 Blue,
+ IN gctUINT8 Alpha
+ );
+
+gceSTATUS
+gcoVG_SetLinearPaint(
+ IN gcoVG Vg,
+ IN gctFLOAT Constant,
+ IN gctFLOAT StepX,
+ IN gctFLOAT StepY
+ );
+
+gceSTATUS
+gcoVG_SetRadialPaint(
+ IN gcoVG Vg,
+ IN gctFLOAT LinConstant,
+ IN gctFLOAT LinStepX,
+ IN gctFLOAT LinStepY,
+ IN gctFLOAT RadConstant,
+ IN gctFLOAT RadStepX,
+ IN gctFLOAT RadStepY,
+ IN gctFLOAT RadStepXX,
+ IN gctFLOAT RadStepYY,
+ IN gctFLOAT RadStepXY
+ );
+
+gceSTATUS
+gcoVG_SetPatternPaint(
+ IN gcoVG Vg,
+ IN gctFLOAT UConstant,
+ IN gctFLOAT UStepX,
+ IN gctFLOAT UStepY,
+ IN gctFLOAT VConstant,
+ IN gctFLOAT VStepX,
+ IN gctFLOAT VStepY,
+ IN gctBOOL Linear
+ );
+
+gceSTATUS
+gcoVG_SetColorRamp(
+ IN gcoVG Vg,
+ IN gcoSURF ColorRamp,
+ IN gceTILE_MODE ColorRampSpreadMode
+ );
+
+gceSTATUS
+gcoVG_SetPattern(
+ IN gcoVG Vg,
+ IN gcoSURF Pattern,
+ IN gceTILE_MODE TileMode,
+ IN gceIMAGE_FILTER Filter
+ );
+
+gceSTATUS
+gcoVG_SetImageMode(
+ IN gcoVG Vg,
+ IN gceVG_IMAGE Mode
+ );
+
+gceSTATUS
+gcoVG_SetBlendMode(
+ IN gcoVG Vg,
+ IN gceVG_BLEND Mode
+ );
+
+gceSTATUS
+gcoVG_SetRenderingQuality(
+ IN gcoVG Vg,
+ IN gceRENDER_QUALITY Quality
+ );
+
+gceSTATUS
+gcoVG_SetFillRule(
+ IN gcoVG Vg,
+ IN gceFILL_RULE FillRule
+ );
+
+gceSTATUS
+gcoVG_FinalizePath(
+ IN gcoVG Vg,
+ IN gcsPATH_DATA_PTR PathData
+ );
+
+gceSTATUS
+gcoVG_Clear(
+ IN gcoVG Vg,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_DrawPath(
+ IN gcoVG Vg,
+ IN gcsPATH_DATA_PTR PathData,
+ IN gctFLOAT Scale,
+ IN gctFLOAT Bias,
+ IN gctBOOL SoftwareTesselation
+ );
+
+gceSTATUS
+gcoVG_DrawImage(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gcsSIZE_PTR SourceSize,
+ IN gctINT SourceX,
+ IN gctINT SourceY,
+ IN gctINT TargetX,
+ IN gctINT TargetY,
+ IN gctINT Width,
+ IN gctINT Height,
+ IN gctBOOL Mask
+ );
+
+gceSTATUS
+gcoVG_TesselateImage(
+ IN gcoVG Vg,
+ IN gcoSURF Image,
+ IN gcsVG_RECT_PTR Rectangle,
+ IN gceIMAGE_FILTER Filter,
+ IN gctBOOL Mask,
+ IN gctBOOL SoftwareTesselation
+ );
+
+gceSTATUS
+gcoVG_Blit(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gcsVG_RECT_PTR SrcRect,
+ IN gcsVG_RECT_PTR TrgRect,
+ IN gceIMAGE_FILTER Filter,
+ IN gceVG_BLEND Mode
+ );
+
+gceSTATUS
+gcoVG_ColorMatrix(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN const gctFLOAT * Matrix,
+ IN gceCHANNEL ColorChannels,
+ IN gctBOOL FilterLinear,
+ IN gctBOOL FilterPremultiplied,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_SeparableConvolve(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctINT KernelWidth,
+ IN gctINT KernelHeight,
+ IN gctINT ShiftX,
+ IN gctINT ShiftY,
+ IN const gctINT16 * KernelX,
+ IN const gctINT16 * KernelY,
+ IN gctFLOAT Scale,
+ IN gctFLOAT Bias,
+ IN gceTILE_MODE TilingMode,
+ IN gctFLOAT_PTR FillColor,
+ IN gceCHANNEL ColorChannels,
+ IN gctBOOL FilterLinear,
+ IN gctBOOL FilterPremultiplied,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gcsSIZE_PTR SourceSize,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_GaussianBlur(
+ IN gcoVG Vg,
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctFLOAT StdDeviationX,
+ IN gctFLOAT StdDeviationY,
+ IN gceTILE_MODE TilingMode,
+ IN gctFLOAT_PTR FillColor,
+ IN gceCHANNEL ColorChannels,
+ IN gctBOOL FilterLinear,
+ IN gctBOOL FilterPremultiplied,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsPOINT_PTR TargetOrigin,
+ IN gcsSIZE_PTR SourceSize,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+gceSTATUS
+gcoVG_EnableDither(
+ IN gcoVG Vg,
+ IN gctBOOL Enable
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_vg_h_ */
diff --git a/src/include_v4/gc_hal_enum.h b/src/include_v4/gc_hal_enum.h
new file mode 100644
index 0000000..7d67828
--- /dev/null
+++ b/src/include_v4/gc_hal_enum.h
@@ -0,0 +1,823 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_enum_h_
+#define __gc_hal_enum_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Chip models. */
+typedef enum _gceCHIPMODEL
+{
+ gcv300 = 0x0300,
+ gcv320 = 0x0320,
+ gcv350 = 0x0350,
+ gcv355 = 0x0355,
+ gcv400 = 0x0400,
+ gcv410 = 0x0410,
+ gcv420 = 0x0420,
+ gcv450 = 0x0450,
+ gcv500 = 0x0500,
+ gcv530 = 0x0530,
+ gcv600 = 0x0600,
+ gcv700 = 0x0700,
+ gcv800 = 0x0800,
+ gcv860 = 0x0860,
+ gcv880 = 0x0880,
+ gcv1000 = 0x1000,
+ gcv2000 = 0x2000,
+ gcv2100 = 0x2100,
+ gcv4000 = 0x4000,
+}
+gceCHIPMODEL;
+
+/* Chip features. */
+typedef enum _gceFEATURE
+{
+ gcvFEATURE_PIPE_2D = 0,
+ gcvFEATURE_PIPE_3D,
+ gcvFEATURE_PIPE_VG,
+ gcvFEATURE_DC,
+ gcvFEATURE_HIGH_DYNAMIC_RANGE,
+ gcvFEATURE_MODULE_CG,
+ gcvFEATURE_MIN_AREA,
+ gcvFEATURE_BUFFER_INTERLEAVING,
+ gcvFEATURE_BYTE_WRITE_2D,
+ gcvFEATURE_ENDIANNESS_CONFIG,
+ gcvFEATURE_DUAL_RETURN_BUS,
+ gcvFEATURE_DEBUG_MODE,
+ gcvFEATURE_YUY2_RENDER_TARGET,
+ gcvFEATURE_FRAGMENT_PROCESSOR,
+ gcvFEATURE_2DPE20,
+ gcvFEATURE_FAST_CLEAR,
+ gcvFEATURE_YUV420_TILER,
+ gcvFEATURE_YUY2_AVERAGING,
+ gcvFEATURE_FLIP_Y,
+ gcvFEATURE_EARLY_Z,
+ gcvFEATURE_Z_COMPRESSION,
+ gcvFEATURE_MSAA,
+ gcvFEATURE_SPECIAL_ANTI_ALIASING,
+ gcvFEATURE_SPECIAL_MSAA_LOD,
+ gcvFEATURE_422_TEXTURE_COMPRESSION,
+ gcvFEATURE_DXT_TEXTURE_COMPRESSION,
+ gcvFEATURE_ETC1_TEXTURE_COMPRESSION,
+ gcvFEATURE_CORRECT_TEXTURE_CONVERTER,
+ gcvFEATURE_TEXTURE_8K,
+ gcvFEATURE_SCALER,
+ gcvFEATURE_YUV420_SCALER,
+ gcvFEATURE_SHADER_HAS_W,
+ gcvFEATURE_SHADER_HAS_SIGN,
+ gcvFEATURE_SHADER_HAS_FLOOR,
+ gcvFEATURE_SHADER_HAS_CEIL,
+ gcvFEATURE_SHADER_HAS_SQRT,
+ gcvFEATURE_SHADER_HAS_TRIG,
+ gcvFEATURE_VAA,
+ gcvFEATURE_HZ,
+ gcvFEATURE_CORRECT_STENCIL,
+ gcvFEATURE_VG20,
+ gcvFEATURE_VG_FILTER,
+ gcvFEATURE_VG21,
+ gcvFEATURE_VG_DOUBLE_BUFFER,
+ gcvFEATURE_MC20,
+ gcvFEATURE_SUPER_TILED,
+ gcvFEATURE_2D_FILTERBLIT_PLUS_ALPHABLEND,
+ gcvFEATURE_2D_DITHER,
+ gcvFEATURE_2D_A8_TARGET,
+ gcvFEATURE_2D_FILTERBLIT_FULLROTATION,
+ gcvFEATURE_2D_BITBLIT_FULLROTATION,
+ gcvFEATURE_WIDE_LINE,
+ gcvFEATURE_FC_FLUSH_STALL,
+ gcvFEATURE_FULL_DIRECTFB,
+ gcvFEATURE_HALF_FLOAT_PIPE,
+ gcvFEATURE_LINE_LOOP,
+ gcvFEATURE_2D_YUV_BLIT,
+ gcvFEATURE_2D_TILING,
+ gcvFEATURE_NON_POWER_OF_TWO,
+ gcvFEATURE_3D_TEXTURE,
+ gcvFEATURE_TEXTURE_ARRAY,
+ gcvFEATURE_TILE_FILLER,
+ gcvFEATURE_LOGIC_OP,
+ gcvFEATURE_COMPOSITION,
+ gcvFEATURE_MIXED_STREAMS,
+ gcvFEATURE_2D_MULTI_SOURCE_BLT,
+ gcvFEATURE_END_EVENT,
+ gcvFEATURE_VERTEX_10_10_10_2,
+ gcvFEATURE_TEXTURE_10_10_10_2,
+ gcvFEATURE_TEXTURE_ANISOTROPIC_FILTERING,
+ gcvFEATURE_TEXTURE_FLOAT_HALF_FLOAT,
+ gcvFEATURE_2D_ROTATION_STALL_FIX,
+ gcvFEATURE_2D_MULTI_SOURCE_BLT_EX,
+ gcvFEATURE_BUG_FIXES10,
+ gcvFEATURE_2D_MINOR_TILING,
+ /* Supertiled compressed textures are supported. */
+ gcvFEATURE_TEX_COMPRRESSION_SUPERTILED,
+ gcvFEATURE_FAST_MSAA,
+ gcvFEATURE_BUG_FIXED_INDEXED_TRIANGLE_STRIP,
+ gcvFEATURE_TEXTURE_TILED_READ,
+ gcvFEATURE_DEPTH_BIAS_FIX,
+ gcvFEATURE_RECT_PRIMITIVE,
+ gcvFEATURE_BUG_FIXES11,
+ gcvFEATURE_SUPERTILED_TEXTURE,
+ gcvFEATURE_2D_NO_COLORBRUSH_INDEX8
+}
+gceFEATURE;
+
+/* Chip Power Status. */
+typedef enum _gceCHIPPOWERSTATE
+{
+ gcvPOWER_ON = 0,
+ gcvPOWER_OFF,
+ gcvPOWER_IDLE,
+ gcvPOWER_SUSPEND,
+ gcvPOWER_SUSPEND_ATPOWERON,
+ gcvPOWER_OFF_ATPOWERON,
+ gcvPOWER_IDLE_BROADCAST,
+ gcvPOWER_SUSPEND_BROADCAST,
+ gcvPOWER_OFF_BROADCAST,
+ gcvPOWER_OFF_RECOVERY,
+#if gcdPOWEROFF_TIMEOUT
+ gcvPOWER_OFF_TIMEOUT,
+#endif
+ gcvPOWER_ON_AUTO
+}
+gceCHIPPOWERSTATE;
+
+/* CPU cache operations */
+typedef enum _gceCACHEOPERATION
+{
+ gcvCACHE_CLEAN = 0x01,
+ gcvCACHE_INVALIDATE = 0x02,
+ gcvCACHE_FLUSH = gcvCACHE_CLEAN | gcvCACHE_INVALIDATE,
+ gcvCACHE_MEMORY_BARRIER = 0x04
+}
+gceCACHEOPERATION;
+
+typedef enum _gceVIDMEM_NODE_SHARED_INFO_TYPE
+{
+ gcvVIDMEM_INFO_GENERIC,
+ gcvVIDMEM_INFO_DIRTY_RECTANGLE
+}
+gceVIDMEM_NODE_SHARED_INFO_TYPE;
+
+/* Surface types. */
+typedef enum _gceSURF_TYPE
+{
+ gcvSURF_TYPE_UNKNOWN = 0,
+ gcvSURF_INDEX,
+ gcvSURF_VERTEX,
+ gcvSURF_TEXTURE,
+ gcvSURF_RENDER_TARGET,
+ gcvSURF_DEPTH,
+ gcvSURF_BITMAP,
+ gcvSURF_TILE_STATUS,
+ gcvSURF_IMAGE,
+ gcvSURF_MASK,
+ gcvSURF_SCISSOR,
+ gcvSURF_HIERARCHICAL_DEPTH,
+ gcvSURF_NUM_TYPES, /* Make sure this is the last one! */
+
+ /* Combinations. */
+ gcvSURF_NO_TILE_STATUS = 0x100,
+ gcvSURF_NO_VIDMEM = 0x200, /* Used to allocate surfaces with no underlying vidmem node.
+ In Android, vidmem node is allocated by another process. */
+ gcvSURF_CACHEABLE = 0x400, /* Used to allocate a cacheable surface */
+#if gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST
+ gcvSURF_FLIP = 0x800, /* The Resolve Target the will been flip resolve from RT */
+#endif
+
+ gcvSURF_RENDER_TARGET_NO_TILE_STATUS = gcvSURF_RENDER_TARGET
+ | gcvSURF_NO_TILE_STATUS,
+
+ gcvSURF_DEPTH_NO_TILE_STATUS = gcvSURF_DEPTH
+ | gcvSURF_NO_TILE_STATUS,
+
+ /* Supported surface types with no vidmem node. */
+ gcvSURF_BITMAP_NO_VIDMEM = gcvSURF_BITMAP
+ | gcvSURF_NO_VIDMEM,
+
+ gcvSURF_TEXTURE_NO_VIDMEM = gcvSURF_TEXTURE
+ | gcvSURF_NO_VIDMEM,
+
+ /* Cacheable surface types with no vidmem node. */
+ gcvSURF_CACHEABLE_BITMAP_NO_VIDMEM = gcvSURF_BITMAP_NO_VIDMEM
+ | gcvSURF_CACHEABLE,
+
+ gcvSURF_CACHEABLE_BITMAP = gcvSURF_BITMAP
+ | gcvSURF_CACHEABLE,
+
+#if gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST
+ gcvSURF_FLIP_BITMAP = gcvSURF_BITMAP
+ | gcvSURF_FLIP,
+#endif
+}
+gceSURF_TYPE;
+
+typedef enum _gceSURF_USAGE
+{
+ gcvSURF_USAGE_UNKNOWN,
+ gcvSURF_USAGE_RESOLVE_AFTER_CPU,
+ gcvSURF_USAGE_RESOLVE_AFTER_3D
+}
+gceSURF_USAGE;
+
+typedef enum _gceSURF_COLOR_TYPE
+{
+ gcvSURF_COLOR_UNKNOWN = 0,
+ gcvSURF_COLOR_LINEAR = 0x01,
+ gcvSURF_COLOR_ALPHA_PRE = 0x02,
+}
+gceSURF_COLOR_TYPE;
+
+/* Rotation. */
+typedef enum _gceSURF_ROTATION
+{
+ gcvSURF_0_DEGREE = 0,
+ gcvSURF_90_DEGREE,
+ gcvSURF_180_DEGREE,
+ gcvSURF_270_DEGREE,
+ gcvSURF_FLIP_X,
+ gcvSURF_FLIP_Y,
+}
+gceSURF_ROTATION;
+
+/* Surface formats. */
+typedef enum _gceSURF_FORMAT
+{
+ /* Unknown format. */
+ gcvSURF_UNKNOWN = 0,
+
+ /* Palettized formats. */
+ gcvSURF_INDEX1 = 100,
+ gcvSURF_INDEX4,
+ gcvSURF_INDEX8,
+
+ /* RGB formats. */
+ gcvSURF_A2R2G2B2 = 200,
+ gcvSURF_R3G3B2,
+ gcvSURF_A8R3G3B2,
+ gcvSURF_X4R4G4B4,
+ gcvSURF_A4R4G4B4,
+ gcvSURF_R4G4B4A4,
+ gcvSURF_X1R5G5B5,
+ gcvSURF_A1R5G5B5,
+ gcvSURF_R5G5B5A1,
+ gcvSURF_R5G6B5,
+ gcvSURF_R8G8B8,
+ gcvSURF_X8R8G8B8,
+ gcvSURF_A8R8G8B8,
+ gcvSURF_R8G8B8A8,
+ gcvSURF_G8R8G8B8,
+ gcvSURF_R8G8B8G8,
+ gcvSURF_X2R10G10B10,
+ gcvSURF_A2R10G10B10,
+ gcvSURF_X12R12G12B12,
+ gcvSURF_A12R12G12B12,
+ gcvSURF_X16R16G16B16,
+ gcvSURF_A16R16G16B16,
+ gcvSURF_A32R32G32B32,
+ gcvSURF_R8G8B8X8,
+ gcvSURF_R5G5B5X1,
+ gcvSURF_R4G4B4X4,
+
+ /* BGR formats. */
+ gcvSURF_A4B4G4R4 = 300,
+ gcvSURF_A1B5G5R5,
+ gcvSURF_B5G6R5,
+ gcvSURF_B8G8R8,
+ gcvSURF_B16G16R16,
+ gcvSURF_X8B8G8R8,
+ gcvSURF_A8B8G8R8,
+ gcvSURF_A2B10G10R10,
+ gcvSURF_X16B16G16R16,
+ gcvSURF_A16B16G16R16,
+ gcvSURF_B32G32R32,
+ gcvSURF_X32B32G32R32,
+ gcvSURF_A32B32G32R32,
+ gcvSURF_B4G4R4A4,
+ gcvSURF_B5G5R5A1,
+ gcvSURF_B8G8R8X8,
+ gcvSURF_B8G8R8A8,
+ gcvSURF_X4B4G4R4,
+ gcvSURF_X1B5G5R5,
+ gcvSURF_B4G4R4X4,
+ gcvSURF_B5G5R5X1,
+ gcvSURF_X2B10G10R10,
+
+ /* Compressed formats. */
+ gcvSURF_DXT1 = 400,
+ gcvSURF_DXT2,
+ gcvSURF_DXT3,
+ gcvSURF_DXT4,
+ gcvSURF_DXT5,
+ gcvSURF_CXV8U8,
+ gcvSURF_ETC1,
+
+ /* YUV formats. */
+ gcvSURF_YUY2 = 500,
+ gcvSURF_UYVY,
+ gcvSURF_YV12,
+ gcvSURF_I420,
+ gcvSURF_NV12,
+ gcvSURF_NV21,
+ gcvSURF_NV16,
+ gcvSURF_NV61,
+ gcvSURF_YVYU,
+ gcvSURF_VYUY,
+
+ /* Depth formats. */
+ gcvSURF_D16 = 600,
+ gcvSURF_D24S8,
+ gcvSURF_D32,
+ gcvSURF_D24X8,
+
+ /* Alpha formats. */
+ gcvSURF_A4 = 700,
+ gcvSURF_A8,
+ gcvSURF_A12,
+ gcvSURF_A16,
+ gcvSURF_A32,
+ gcvSURF_A1,
+
+ /* Luminance formats. */
+ gcvSURF_L4 = 800,
+ gcvSURF_L8,
+ gcvSURF_L12,
+ gcvSURF_L16,
+ gcvSURF_L32,
+ gcvSURF_L1,
+
+ /* Alpha/Luminance formats. */
+ gcvSURF_A4L4 = 900,
+ gcvSURF_A2L6,
+ gcvSURF_A8L8,
+ gcvSURF_A4L12,
+ gcvSURF_A12L12,
+ gcvSURF_A16L16,
+
+ /* Bump formats. */
+ gcvSURF_L6V5U5 = 1000,
+ gcvSURF_V8U8,
+ gcvSURF_X8L8V8U8,
+ gcvSURF_Q8W8V8U8,
+ gcvSURF_A2W10V10U10,
+ gcvSURF_V16U16,
+ gcvSURF_Q16W16V16U16,
+
+ /* R/RG/RA formats. */
+ gcvSURF_R8 = 1100,
+ gcvSURF_X8R8,
+ gcvSURF_G8R8,
+ gcvSURF_X8G8R8,
+ gcvSURF_A8R8,
+ gcvSURF_R16,
+ gcvSURF_X16R16,
+ gcvSURF_G16R16,
+ gcvSURF_X16G16R16,
+ gcvSURF_A16R16,
+ gcvSURF_R32,
+ gcvSURF_X32R32,
+ gcvSURF_G32R32,
+ gcvSURF_X32G32R32,
+ gcvSURF_A32R32,
+ gcvSURF_RG16,
+
+ /* Floating point formats. */
+ gcvSURF_R16F = 1200,
+ gcvSURF_X16R16F,
+ gcvSURF_G16R16F,
+ gcvSURF_X16G16R16F,
+ gcvSURF_B16G16R16F,
+ gcvSURF_X16B16G16R16F,
+ gcvSURF_A16B16G16R16F,
+ gcvSURF_R32F,
+ gcvSURF_X32R32F,
+ gcvSURF_G32R32F,
+ gcvSURF_X32G32R32F,
+ gcvSURF_B32G32R32F,
+ gcvSURF_X32B32G32R32F,
+ gcvSURF_A32B32G32R32F,
+ gcvSURF_A16F,
+ gcvSURF_L16F,
+ gcvSURF_A16L16F,
+ gcvSURF_A16R16F,
+ gcvSURF_A32F,
+ gcvSURF_L32F,
+ gcvSURF_A32L32F,
+ gcvSURF_A32R32F,
+
+}
+gceSURF_FORMAT;
+
+/* Pixel swizzle modes. */
+typedef enum _gceSURF_SWIZZLE
+{
+ gcvSURF_NOSWIZZLE = 0,
+ gcvSURF_ARGB,
+ gcvSURF_ABGR,
+ gcvSURF_RGBA,
+ gcvSURF_BGRA
+}
+gceSURF_SWIZZLE;
+
+/* Transparency modes. */
+typedef enum _gceSURF_TRANSPARENCY
+{
+ /* Valid only for PE 1.0 */
+ gcvSURF_OPAQUE = 0,
+ gcvSURF_SOURCE_MATCH,
+ gcvSURF_SOURCE_MASK,
+ gcvSURF_PATTERN_MASK,
+}
+gceSURF_TRANSPARENCY;
+
+/* Surface Alignment. */
+typedef enum _gceSURF_ALIGNMENT
+{
+ gcvSURF_FOUR = 0,
+ gcvSURF_SIXTEEN,
+ gcvSURF_SUPER_TILED,
+ gcvSURF_SPLIT_TILED,
+ gcvSURF_SPLIT_SUPER_TILED,
+}
+gceSURF_ALIGNMENT;
+
+/* Transparency modes. */
+typedef enum _gce2D_TRANSPARENCY
+{
+ /* Valid only for PE 2.0 */
+ gcv2D_OPAQUE = 0,
+ gcv2D_KEYED,
+ gcv2D_MASKED
+}
+gce2D_TRANSPARENCY;
+
+/* Mono packing modes. */
+typedef enum _gceSURF_MONOPACK
+{
+ gcvSURF_PACKED8 = 0,
+ gcvSURF_PACKED16,
+ gcvSURF_PACKED32,
+ gcvSURF_UNPACKED,
+}
+gceSURF_MONOPACK;
+
+/* Blending modes. */
+typedef enum _gceSURF_BLEND_MODE
+{
+ /* Porter-Duff blending modes. */
+ /* Fsrc Fdst */
+ gcvBLEND_CLEAR = 0, /* 0 0 */
+ gcvBLEND_SRC, /* 1 0 */
+ gcvBLEND_DST, /* 0 1 */
+ gcvBLEND_SRC_OVER_DST, /* 1 1 - Asrc */
+ gcvBLEND_DST_OVER_SRC, /* 1 - Adst 1 */
+ gcvBLEND_SRC_IN_DST, /* Adst 0 */
+ gcvBLEND_DST_IN_SRC, /* 0 Asrc */
+ gcvBLEND_SRC_OUT_DST, /* 1 - Adst 0 */
+ gcvBLEND_DST_OUT_SRC, /* 0 1 - Asrc */
+ gcvBLEND_SRC_ATOP_DST, /* Adst 1 - Asrc */
+ gcvBLEND_DST_ATOP_SRC, /* 1 - Adst Asrc */
+ gcvBLEND_SRC_XOR_DST, /* 1 - Adst 1 - Asrc */
+
+ /* Special blending modes. */
+ gcvBLEND_SET, /* DST = 1 */
+ gcvBLEND_SUB /* DST = DST * (1 - SRC) */
+}
+gceSURF_BLEND_MODE;
+
+/* Per-pixel alpha modes. */
+typedef enum _gceSURF_PIXEL_ALPHA_MODE
+{
+ gcvSURF_PIXEL_ALPHA_STRAIGHT = 0,
+ gcvSURF_PIXEL_ALPHA_INVERSED
+}
+gceSURF_PIXEL_ALPHA_MODE;
+
+/* Global alpha modes. */
+typedef enum _gceSURF_GLOBAL_ALPHA_MODE
+{
+ gcvSURF_GLOBAL_ALPHA_OFF = 0,
+ gcvSURF_GLOBAL_ALPHA_ON,
+ gcvSURF_GLOBAL_ALPHA_SCALE
+}
+gceSURF_GLOBAL_ALPHA_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gceSURF_PIXEL_COLOR_MODE
+{
+ gcvSURF_COLOR_STRAIGHT = 0,
+ gcvSURF_COLOR_MULTIPLY
+}
+gceSURF_PIXEL_COLOR_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_PIXEL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_COLOR_MULTIPLY_DISABLE = 0,
+ gcv2D_COLOR_MULTIPLY_ENABLE
+}
+gce2D_PIXEL_COLOR_MULTIPLY_MODE;
+
+/* Color component modes for alpha blending. */
+typedef enum _gce2D_GLOBAL_COLOR_MULTIPLY_MODE
+{
+ gcv2D_GLOBAL_COLOR_MULTIPLY_DISABLE = 0,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_ALPHA,
+ gcv2D_GLOBAL_COLOR_MULTIPLY_COLOR
+}
+gce2D_GLOBAL_COLOR_MULTIPLY_MODE;
+
+/* Alpha blending factor modes. */
+typedef enum _gceSURF_BLEND_FACTOR_MODE
+{
+ gcvSURF_BLEND_ZERO = 0,
+ gcvSURF_BLEND_ONE,
+ gcvSURF_BLEND_STRAIGHT,
+ gcvSURF_BLEND_INVERSED,
+ gcvSURF_BLEND_COLOR,
+ gcvSURF_BLEND_COLOR_INVERSED,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED,
+ gcvSURF_BLEND_STRAIGHT_NO_CROSS,
+ gcvSURF_BLEND_INVERSED_NO_CROSS,
+ gcvSURF_BLEND_COLOR_NO_CROSS,
+ gcvSURF_BLEND_COLOR_INVERSED_NO_CROSS,
+ gcvSURF_BLEND_SRC_ALPHA_SATURATED_CROSS
+}
+gceSURF_BLEND_FACTOR_MODE;
+
+/* Alpha blending porter duff rules. */
+typedef enum _gce2D_PORTER_DUFF_RULE
+{
+ gcvPD_CLEAR = 0,
+ gcvPD_SRC,
+ gcvPD_SRC_OVER,
+ gcvPD_DST_OVER,
+ gcvPD_SRC_IN,
+ gcvPD_DST_IN,
+ gcvPD_SRC_OUT,
+ gcvPD_DST_OUT,
+ gcvPD_SRC_ATOP,
+ gcvPD_DST_ATOP,
+ gcvPD_ADD,
+ gcvPD_XOR,
+ gcvPD_DST
+}
+gce2D_PORTER_DUFF_RULE;
+
+/* Alpha blending factor modes. */
+typedef enum _gce2D_YUV_COLOR_MODE
+{
+ gcv2D_YUV_601= 0,
+ gcv2D_YUV_709
+}
+gce2D_YUV_COLOR_MODE;
+
+/* 2D Rotation and flipping. */
+typedef enum _gce2D_ORIENTATION
+{
+ gcv2D_0_DEGREE = 0,
+ gcv2D_90_DEGREE,
+ gcv2D_180_DEGREE,
+ gcv2D_270_DEGREE,
+ gcv2D_X_FLIP,
+ gcv2D_Y_FLIP
+}
+gce2D_ORIENTATION;
+
+typedef enum _gce2D_COMMAND
+{
+ gcv2D_CLEAR = 0,
+ gcv2D_LINE,
+ gcv2D_BLT,
+ gcv2D_STRETCH,
+ gcv2D_HOR_FILTER,
+ gcv2D_VER_FILTER,
+ gcv2D_MULTI_SOURCE_BLT,
+}
+gce2D_COMMAND;
+
+#ifndef VIVANTE_NO_3D
+/* Texture functions. */
+typedef enum _gceTEXTURE_FUNCTION
+{
+ gcvTEXTURE_DUMMY = 0,
+ gcvTEXTURE_REPLACE = 0,
+ gcvTEXTURE_MODULATE,
+ gcvTEXTURE_ADD,
+ gcvTEXTURE_ADD_SIGNED,
+ gcvTEXTURE_INTERPOLATE,
+ gcvTEXTURE_SUBTRACT,
+ gcvTEXTURE_DOT3
+}
+gceTEXTURE_FUNCTION;
+
+/* Texture sources. */
+typedef enum _gceTEXTURE_SOURCE
+{
+ gcvCOLOR_FROM_TEXTURE = 0,
+ gcvCOLOR_FROM_CONSTANT_COLOR,
+ gcvCOLOR_FROM_PRIMARY_COLOR,
+ gcvCOLOR_FROM_PREVIOUS_COLOR
+}
+gceTEXTURE_SOURCE;
+
+/* Texture source channels. */
+typedef enum _gceTEXTURE_CHANNEL
+{
+ gcvFROM_COLOR = 0,
+ gcvFROM_ONE_MINUS_COLOR,
+ gcvFROM_ALPHA,
+ gcvFROM_ONE_MINUS_ALPHA
+}
+gceTEXTURE_CHANNEL;
+#endif /* VIVANTE_NO_3D */
+
+/* Filter types. */
+typedef enum _gceFILTER_TYPE
+{
+ gcvFILTER_SYNC = 0,
+ gcvFILTER_BLUR,
+ gcvFILTER_USER
+}
+gceFILTER_TYPE;
+
+/* Filter pass types. */
+typedef enum _gceFILTER_PASS_TYPE
+{
+ gcvFILTER_HOR_PASS = 0,
+ gcvFILTER_VER_PASS
+}
+gceFILTER_PASS_TYPE;
+
+/* Endian hints. */
+typedef enum _gceENDIAN_HINT
+{
+ gcvENDIAN_NO_SWAP = 0,
+ gcvENDIAN_SWAP_WORD,
+ gcvENDIAN_SWAP_DWORD
+}
+gceENDIAN_HINT;
+
+/* Tiling modes. */
+typedef enum _gceTILING
+{
+ gcvLINEAR = 0,
+ gcvTILED,
+ gcvSUPERTILED,
+ gcvMULTI_TILED,
+ gcvMULTI_SUPERTILED,
+ gcvMINORTILED,
+}
+gceTILING;
+
+/* 2D pattern type. */
+typedef enum _gce2D_PATTERN
+{
+ gcv2D_PATTERN_SOLID = 0,
+ gcv2D_PATTERN_MONO,
+ gcv2D_PATTERN_COLOR,
+ gcv2D_PATTERN_INVALID
+}
+gce2D_PATTERN;
+
+/* 2D source type. */
+typedef enum _gce2D_SOURCE
+{
+ gcv2D_SOURCE_MASKED = 0,
+ gcv2D_SOURCE_MONO,
+ gcv2D_SOURCE_COLOR,
+ gcv2D_SOURCE_INVALID
+}
+gce2D_SOURCE;
+
+/* Pipes. */
+typedef enum _gcePIPE_SELECT
+{
+ gcvPIPE_INVALID = ~0,
+ gcvPIPE_3D = 0,
+ gcvPIPE_2D
+}
+gcePIPE_SELECT;
+
+/* Hardware type. */
+typedef enum _gceHARDWARE_TYPE
+{
+ gcvHARDWARE_INVALID = 0x00,
+ gcvHARDWARE_3D = 0x01,
+ gcvHARDWARE_2D = 0x02,
+ gcvHARDWARE_VG = 0x04,
+
+ gcvHARDWARE_3D2D = gcvHARDWARE_3D | gcvHARDWARE_2D
+}
+gceHARDWARE_TYPE;
+
+#define gcdCHIP_COUNT 3
+
+typedef enum _gceMMU_MODE
+{
+ gcvMMU_MODE_1K,
+ gcvMMU_MODE_4K,
+} gceMMU_MODE;
+
+/* User signal command codes. */
+typedef enum _gceUSER_SIGNAL_COMMAND_CODES
+{
+ gcvUSER_SIGNAL_CREATE,
+ gcvUSER_SIGNAL_DESTROY,
+ gcvUSER_SIGNAL_SIGNAL,
+ gcvUSER_SIGNAL_WAIT,
+ gcvUSER_SIGNAL_MAP,
+ gcvUSER_SIGNAL_UNMAP,
+}
+gceUSER_SIGNAL_COMMAND_CODES;
+
+/* Event locations. */
+typedef enum _gceKERNEL_WHERE
+{
+ gcvKERNEL_COMMAND,
+ gcvKERNEL_VERTEX,
+ gcvKERNEL_TRIANGLE,
+ gcvKERNEL_TEXTURE,
+ gcvKERNEL_PIXEL,
+}
+gceKERNEL_WHERE;
+
+#if gcdENABLE_VG
+/* Hardware blocks. */
+typedef enum _gceBLOCK
+{
+ gcvBLOCK_COMMAND,
+ gcvBLOCK_TESSELLATOR,
+ gcvBLOCK_TESSELLATOR2,
+ gcvBLOCK_TESSELLATOR3,
+ gcvBLOCK_RASTER,
+ gcvBLOCK_VG,
+ gcvBLOCK_VG2,
+ gcvBLOCK_VG3,
+ gcvBLOCK_PIXEL,
+
+ /* Number of defined blocks. */
+ gcvBLOCK_COUNT
+}
+gceBLOCK;
+#endif
+
+/* gcdDUMP message type. */
+typedef enum _gceDEBUG_MESSAGE_TYPE
+{
+ gcvMESSAGE_TEXT,
+ gcvMESSAGE_DUMP
+}
+gceDEBUG_MESSAGE_TYPE;
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gckCONTEXT * gckCONTEXT;
+typedef struct _gcoCMDBUF * gcoCMDBUF;
+typedef struct _gcsSTATE_DELTA * gcsSTATE_DELTA_PTR;
+typedef struct _gcsQUEUE * gcsQUEUE_PTR;
+typedef struct _gcoQUEUE * gcoQUEUE;
+typedef struct _gcsHAL_INTERFACE * gcsHAL_INTERFACE_PTR;
+typedef struct _gcs2D_PROFILE * gcs2D_PROFILE_PTR;
+
+#if gcdENABLE_VG
+typedef struct _gcoVGHARDWARE * gcoVGHARDWARE;
+typedef struct _gcoVGBUFFER * gcoVGBUFFER;
+typedef struct _gckVGHARDWARE * gckVGHARDWARE;
+typedef struct _gcsVGCONTEXT * gcsVGCONTEXT_PTR;
+typedef struct _gcsVGCONTEXT_MAP * gcsVGCONTEXT_MAP_PTR;
+typedef struct _gcsVGCMDQUEUE * gcsVGCMDQUEUE_PTR;
+typedef struct _gcsTASK_MASTER_TABLE * gcsTASK_MASTER_TABLE_PTR;
+typedef struct _gckVGKERNEL * gckVGKERNEL;
+typedef void * gctTHREAD;
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_enum_h_ */
diff --git a/src/include_v4/gc_hal_kernel_buffer.h b/src/include_v4/gc_hal_kernel_buffer.h
new file mode 100644
index 0000000..24edc0b
--- /dev/null
+++ b/src/include_v4/gc_hal_kernel_buffer.h
@@ -0,0 +1,192 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_kernel_buffer_h_
+#define __gc_hal_kernel_buffer_h_
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+************************ Command Buffer and Event Objects **********************
+\******************************************************************************/
+
+/* The number of context buffers per user. */
+#define gcdCONTEXT_BUFFER_COUNT 2
+
+/* State delta record. */
+typedef struct _gcsSTATE_DELTA_RECORD * gcsSTATE_DELTA_RECORD_PTR;
+typedef struct _gcsSTATE_DELTA_RECORD
+{
+ /* State address. */
+ gctUINT address;
+
+ /* State mask. */
+ gctUINT32 mask;
+
+ /* State data. */
+ gctUINT32 data;
+}
+gcsSTATE_DELTA_RECORD;
+
+/* State delta. */
+typedef struct _gcsSTATE_DELTA
+{
+ /* For debugging: the number of delta in the order of creation. */
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+ gctUINT num;
+#endif
+
+ /* For dumping. */
+#if gcdDUMP
+ gcoOS os;
+#endif
+
+ /* Main state delta ID. Every time state delta structure gets reinitialized,
+ main ID is incremented. If main state ID overflows, all map entry IDs get
+ reinitialized to make sure there is no potential erroneous match after
+ the overflow.*/
+ gctUINT id;
+
+ /* The number of contexts pending modification by the delta. */
+ gctINT refCount;
+
+ /* Vertex element count for the delta buffer. */
+ gctUINT elementCount;
+
+ /* Number of states currently stored in the record array. */
+ gctUINT recordCount;
+
+ /* Record array; holds all modified states. */
+ gcsSTATE_DELTA_RECORD_PTR recordArray;
+
+ /* Map entry ID is used for map entry validation. If map entry ID does not
+ match the main state delta ID, the entry and the corresponding state are
+ considered not in use. */
+ gctUINT_PTR mapEntryID;
+ gctUINT mapEntryIDSize;
+
+ /* If the map entry ID matches the main state delta ID, index points to
+ the state record in the record array. */
+ gctUINT_PTR mapEntryIndex;
+
+ /* Previous and next state deltas. */
+ gcsSTATE_DELTA_PTR prev;
+ gcsSTATE_DELTA_PTR next;
+}
+gcsSTATE_DELTA;
+
+/* Command buffer object. */
+struct _gcoCMDBUF
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Command buffer entry and exit pipes. */
+ gcePIPE_SELECT entryPipe;
+ gcePIPE_SELECT exitPipe;
+
+ /* Feature usage flags. */
+ gctBOOL using2D;
+ gctBOOL using3D;
+ gctBOOL usingFilterBlit;
+ gctBOOL usingPalette;
+
+ /* Physical address of command buffer. */
+ gctPHYS_ADDR physical;
+
+ /* Logical address of command buffer. */
+ gctPOINTER logical;
+
+ /* Number of bytes in command buffer. */
+ gctSIZE_T bytes;
+
+ /* Start offset into the command buffer. */
+ gctUINT32 startOffset;
+
+ /* Current offset into the command buffer. */
+ gctUINT32 offset;
+
+ /* Number of free bytes in command buffer. */
+ gctSIZE_T free;
+
+ /* Location of the last reserved area. */
+ gctPOINTER lastReserve;
+ gctUINT lastOffset;
+
+#if gcdSECURE_USER
+ /* Hint array for the current command buffer. */
+ gctUINT hintArraySize;
+ gctUINT32_PTR hintArray;
+ gctUINT32_PTR hintArrayTail;
+#endif
+
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+ /* Last load state command location and hardware address. */
+ gctUINT32_PTR lastLoadStatePtr;
+ gctUINT32 lastLoadStateAddress;
+ gctUINT32 lastLoadStateCount;
+#endif
+};
+
+typedef struct _gcsQUEUE
+{
+ /* Pointer to next gcsQUEUE structure. */
+ gcsQUEUE_PTR next;
+
+ /* Event information. */
+ gcsHAL_INTERFACE iface;
+}
+gcsQUEUE;
+
+/* Event queue. */
+struct _gcoQUEUE
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Pointer to current event queue. */
+ gcsQUEUE_PTR head;
+ gcsQUEUE_PTR tail;
+
+#ifdef __QNXNTO__
+ /* Buffer for records. */
+ gcsQUEUE_PTR records;
+ gctUINT32 freeBytes;
+ gctUINT32 offset;
+#else
+ /* List of free records. */
+ gcsQUEUE_PTR freeList;
+#endif
+ #define gcdIN_QUEUE_RECORD_LIMIT 16
+ /* Number of records currently in queue */
+ gctUINT32 recordCount;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_kernel_buffer_h_ */
diff --git a/src/include_v4/gc_hal_md5.h b/src/include_v4/gc_hal_md5.h
new file mode 100644
index 0000000..ac0f973
--- /dev/null
+++ b/src/include_v4/gc_hal_md5.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+/*
+ Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved.
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ L. Peter Deutsch
+ ghost@aladdin.com
+
+ */
+/* $Id: gc_hal_md5.h,v 1.1.6.1 2012/02/09 00:22:42 semih.demirer Exp $ */
+/*
+ Independent implementation of MD5 (RFC 1321).
+
+ This code implements the MD5 Algorithm defined in RFC 1321, whose
+ text is available at
+ http://www.ietf.org/rfc/rfc1321.txt
+ The code is derived from the text of the RFC, including the test suite
+ (section A.5) but excluding the rest of Appendix A. It does not include
+ any code or documentation that is identified in the RFC as being
+ copyrighted.
+
+ The original and principal author of md5.h is L. Peter Deutsch
+ <ghost@aladdin.com>. Other authors are noted in the change history
+ that follows (in reverse chronological order):
+
+ 2002-04-13 lpd Removed support for non-ANSI compilers; removed
+ references to Ghostscript; clarified derivation from RFC 1321;
+ now handles byte order either statically or dynamically.
+ 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
+ 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
+ added conditionalization for C++ compilation from Martin
+ Purschke <purschke@bnl.gov>.
+ 1999-05-03 lpd Original version.
+ */
+
+
+#ifndef __gc_hal_md5_h_
+#define __gc_hal_md5_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This package supports both compile-time and run-time determination of CPU
+ * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
+ * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is
+ * defined as non-zero, the code will be compiled to run only on big-endian
+ * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to
+ * run on either big- or little-endian CPUs, but will run slightly less
+ * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.
+ */
+
+typedef unsigned char gctMD5_Byte; /* 8-bit byte */
+typedef unsigned int gctMD5_Word; /* 32-bit word */
+
+/* Define the state of the MD5 Algorithm. */
+typedef struct _gcsMD5_State {
+ gctMD5_Word count[2]; /* message length in bits, lsw first */
+ gctMD5_Word abcd[4]; /* digest buffer */
+ gctMD5_Byte buf[64]; /* accumulate block */
+} gcsMD5_State;
+
+/* Initialize the algorithm. */
+void gcoMD5_Init(gcsMD5_State *pms);
+
+/* Append a string to the message. */
+void gcoMD5_Append(gcsMD5_State *pms, const gctMD5_Byte *data, int nbytes);
+
+/* Finish the message and return the digest. */
+void gcoMD5_Finish(gcsMD5_State *pms, gctMD5_Byte digest[16]);
+
+#ifdef __cplusplus
+} /* end extern "C" */
+#endif
+
+#endif /* md5_INCLUDED */
diff --git a/src/include_v4/gc_hal_mem.h b/src/include_v4/gc_hal_mem.h
new file mode 100644
index 0000000..e64f7e7
--- /dev/null
+++ b/src/include_v4/gc_hal_mem.h
@@ -0,0 +1,532 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+/*
+** Include file for the local memory management.
+*/
+
+#ifndef __gc_hal_mem_h_
+#define __gc_hal_mem_h_
+#ifndef VIVANTE_NO_3D
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*******************************************************************************
+** Usage:
+
+ The macros to declare MemPool type and functions are
+ gcmMEM_DeclareFSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareVSMemPool (Type, TypeName, Prefix)
+ gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix)
+
+ The data structures for MemPool are
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+
+ The MemPool constructor and destructor functions are
+ gcfMEM_InitFSMemPool(gcsMEM_FS_MEM_POOL *, gcoOS, gctUINT, gctUINT);
+ gcfMEM_FreeFSMemPool(gcsMEM_FS_MEM_POOL *);
+ gcfMEM_InitVSMemPool(gcsMEM_VS_MEM_POOL *, gcoOS, gctUINT, gctBOOL);
+ gcfMEM_FreeVSMemPool(gcsMEM_VS_MEM_POOL *);
+ gcfMEM_InitAFSMemPool(gcsMEM_AFS_MEM_POOL *, gcoOS, gctUINT);
+ gcfMEM_FreeAFSMemPool(gcsMEM_AFS_MEM_POOL *);
+
+ FS: for Fixed-Size data structures
+ VS: for Variable-size data structures
+ AFS: for Array of Fixed-Size data structures
+
+
+ // Example 1: For a fixed-size data structure, struct gcsNode.
+ // It is used locally in a file, so the functions are static without prefix.
+ // At top level, declear allocate and free functions.
+ // The first argument is the data type.
+ // The second armument is the short name used in the fuctions.
+ gcmMEM_DeclareFSMemPool(struct gcsNode, Node, );
+
+ // The previous macro creates two inline functions,
+ // _AllocateNode and _FreeNode.
+
+ // In function or struct
+ gcsMEM_FS_MEM_POOL nodeMemPool;
+
+ // In function,
+ struct gcsNode * node;
+ gceSTATUS status;
+
+ // Before using the memory pool, initialize it.
+ // The second argument is the gcoOS object.
+ // The third argument is the number of data structures to allocate for each chunk.
+ status = gcfMEM_InitFSMemPool(&nodeMemPool, os, 100, sizeof(struct gcsNode));
+ ...
+
+ // Allocate a node.
+ status = _AllocateNode(nodeMemPool, &node);
+ ...
+ // Free a node.
+ _FreeNode(nodeMemPool, node);
+
+ // After using the memory pool, free it.
+ gcfMEM_FreeFSMemPool(&nodeMemPool);
+
+
+ // Example 2: For array of fixed-size data structures, struct gcsNode.
+ // It is used in several files, so the functions are extern with prefix.
+ // At top level, declear allocate and free functions.
+ // The first argument is the data type, and the second one is the short name
+ // used in the fuctions.
+ gcmMEM_DeclareAFSMemPool(struct gcsNode, NodeArray, gcfOpt);
+
+ // The previous macro creates two inline functions,
+ // gcfOpt_AllocateNodeArray and gcfOpt_FreeNodeArray.
+
+ // In function or struct
+ gcsMEM_AFS_MEM_POOL nodeArrayMemPool;
+
+ // In function,
+ struct gcsNode * nodeArray;
+ gceSTATUS status;
+
+ // Before using the array memory pool, initialize it.
+ // The second argument is the gcoOS object, the third is the number of data
+ // structures to allocate for each chunk.
+ status = gcfMEM_InitAFSMemPool(&nodeArrayMemPool, os, sizeof(struct gcsNode));
+ ...
+
+ // Allocate a node array of size 100.
+ status = gcfOpt_AllocateNodeArray(nodeArrayMemPool, &nodeArray, 100);
+ ...
+ // Free a node array.
+ gcfOpt_FreeNodeArray(&nodeArrayMemPool, nodeArray);
+
+ // After using the array memory pool, free it.
+ gcfMEM_FreeAFSMemPool(&nodeArrayMemPool);
+
+*******************************************************************************/
+
+/*******************************************************************************
+** To switch back to use gcoOS_Allocate and gcoOS_Free, add
+** #define USE_LOCAL_MEMORY_POOL 0
+** before including this file.
+*******************************************************************************/
+#ifndef USE_LOCAL_MEMORY_POOL
+/*
+ USE_LOCAL_MEMORY_POOL
+
+ This define enables the local memory management to improve performance.
+*/
+#define USE_LOCAL_MEMORY_POOL 1
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Structures
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+ typedef struct _gcsMEM_FS_MEM_POOL * gcsMEM_FS_MEM_POOL;
+ typedef struct _gcsMEM_VS_MEM_POOL * gcsMEM_VS_MEM_POOL;
+ typedef struct _gcsMEM_AFS_MEM_POOL * gcsMEM_AFS_MEM_POOL;
+#else
+ typedef gcoOS gcsMEM_FS_MEM_POOL;
+ typedef gcoOS gcsMEM_VS_MEM_POOL;
+ typedef gcoOS gcsMEM_AFS_MEM_POOL;
+#endif
+
+/*******************************************************************************
+** Memory Pool Macros
+*******************************************************************************/
+#if USE_LOCAL_MEMORY_POOL
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ return(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ gcmERR_RETURN(gcfMEM_FSMemPoolGetANode(MemPool, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type))); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcfMEM_FSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName##List( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * FirstPointer, \
+ Type * LastPointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x FirstPointer=0x%x LastPointer=0x%x", MemPool, FirstPointer, LastPointer); \
+ status = gcfMEM_FSMemPoolFreeAList(MemPool, (gctPOINTER) FirstPointer, (gctPOINTER) LastPointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status;\
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ status = gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+ Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ gcmERR_RETURN(gcfMEM_VSMemPoolGetANode(MemPool, Size, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, size)); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pinter); \
+ status = gcfMEM_VSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ status = gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ gcmERR_RETURN(gcfMEM_AFSMemPoolGetANode(MemPool, Count, (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type))); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcfMEM_AFSMemPoolFreeANode(MemPool, (gctPOINTER) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#else
+
+#define gcmMEM_DeclareFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type ** Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, gcmSIZEOF(Type))); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_FS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcmOS_SAFE_FREE(MemPool, Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareVSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ status = gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Size \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Size=%u", MemPool, Pointer, Size); \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Size, \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Size)); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_VS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcmOS_SAFE_FREE(MemPool, Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+
+#define gcmMEM_DeclareAFSMemPool(Type, TypeName, Prefix) \
+gceSTATUS \
+Prefix##_Allocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ status = gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer); \
+ gcmFOOTER(); \
+ return status; \
+} \
+ \
+gceSTATUS \
+Prefix##_CAllocate##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type ** Pointer, \
+ gctUINT Count \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x Count=%u", MemPool, Pointer, Count); \
+ gcmERR_RETURN(gcoOS_Allocate(MemPool, \
+ Count * gcmSIZEOF(Type), \
+ (gctPOINTER *) Pointer)); \
+ gcmVERIFY_OK(gcoOS_ZeroMemory(*(gctPOINTER *) Pointer, Count * gcmSIZEOF(Type))); \
+ gcmFOOTER(); \
+ return gcvSTATUS_OK; \
+} \
+ \
+gceSTATUS \
+Prefix##_Free##TypeName( \
+ gcsMEM_AFS_MEM_POOL MemPool, \
+ Type * Pointer \
+ ) \
+{ \
+ gceSTATUS status; \
+ gcmHEADER_ARG("MemPool=0x%x Pointer=0x%x", MemPool, Pointer); \
+ status = gcmOS_SAFE_FREE(MemPool, Pointer); \
+ gcmFOOTER(); \
+ return status; \
+}
+#endif
+
+/*******************************************************************************
+** Memory Pool Data Functions
+*******************************************************************************/
+gceSTATUS
+gcfMEM_InitFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeFSMemPool(
+ IN gcsMEM_FS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolGetANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeANode(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_FSMemPoolFreeAList(
+ IN gcsMEM_FS_MEM_POOL MemPool,
+ IN gctPOINTER FirstNode,
+ IN gctPOINTER LastNode
+ );
+
+gceSTATUS
+gcfMEM_InitVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool,
+ IN gcoOS OS,
+ IN gctUINT BlockSize,
+ IN gctBOOL RecycleFreeNode
+ );
+
+gceSTATUS
+gcfMEM_FreeVSMemPool(
+ IN gcsMEM_VS_MEM_POOL * MemPool
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolGetANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctUINT Size,
+ IN gctUINT Alignment,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_VSMemPoolFreeANode(
+ IN gcsMEM_VS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+gceSTATUS
+gcfMEM_InitAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool,
+ IN gcoOS OS,
+ IN gctUINT NodeCount,
+ IN gctUINT NodeSize
+ );
+
+gceSTATUS
+gcfMEM_FreeAFSMemPool(
+ IN gcsMEM_AFS_MEM_POOL *MemPool
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolGetANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctUINT Count,
+ OUT gctPOINTER * Node
+ );
+
+gceSTATUS
+gcfMEM_AFSMemPoolFreeANode(
+ IN gcsMEM_AFS_MEM_POOL MemPool,
+ IN gctPOINTER Node
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VIVANTE_NO_3D */
+#endif /* __gc_hal_mem_h_ */
diff --git a/src/include_v4/gc_hal_options.h b/src/include_v4/gc_hal_options.h
new file mode 100644
index 0000000..d01804f
--- /dev/null
+++ b/src/include_v4/gc_hal_options.h
@@ -0,0 +1,756 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_options_h_
+#define __gc_hal_options_h_
+
+/*
+ gcdPRINT_VERSION
+
+ Print HAL version.
+*/
+#ifndef gcdPRINT_VERSION
+# define gcdPRINT_VERSION 0
+#endif
+
+/*
+ USE_NEW_LINUX_SIGNAL
+
+ This define enables the Linux kernel signaling between kernel and user.
+*/
+#ifndef USE_NEW_LINUX_SIGNAL
+# define USE_NEW_LINUX_SIGNAL 0
+#endif
+
+/*
+ NO_USER_DIRECT_ACCESS_FROM_KERNEL
+
+ This define enables the Linux kernel behavior accessing user memory.
+*/
+#ifndef NO_USER_DIRECT_ACCESS_FROM_KERNEL
+# define NO_USER_DIRECT_ACCESS_FROM_KERNEL 0
+#endif
+
+/*
+ VIVANTE_PROFILER
+
+ This define enables the profiler.
+*/
+#ifndef VIVANTE_PROFILER
+# define VIVANTE_PROFILER 0
+#endif
+
+/*
+ gcdUSE_VG
+
+ Enable VG HAL layer (only for GC350).
+*/
+#ifndef gcdUSE_VG
+# define gcdUSE_VG 0
+#endif
+
+/*
+ USE_SW_FB
+
+ Set to 1 if the frame buffer memory cannot be accessed by the GPU.
+*/
+#ifndef USE_SW_FB
+# define USE_SW_FB 0
+#endif
+
+/*
+ USE_SUPER_SAMPLING
+
+ This define enables super-sampling support.
+*/
+#define USE_SUPER_SAMPLING 0
+
+/*
+ PROFILE_HAL_COUNTERS
+
+ This define enables HAL counter profiling support. HW and SHADER
+ counter profiling depends on this.
+*/
+#ifndef PROFILE_HAL_COUNTERS
+# define PROFILE_HAL_COUNTERS 1
+#endif
+
+/*
+ PROFILE_HW_COUNTERS
+
+ This define enables HW counter profiling support.
+*/
+#ifndef PROFILE_HW_COUNTERS
+# define PROFILE_HW_COUNTERS 1
+#endif
+
+/*
+ PROFILE_SHADER_COUNTERS
+
+ This define enables SHADER counter profiling support.
+*/
+#ifndef PROFILE_SHADER_COUNTERS
+# define PROFILE_SHADER_COUNTERS 1
+#endif
+
+/*
+ COMMAND_PROCESSOR_VERSION
+
+ The version of the command buffer and task manager.
+*/
+#define COMMAND_PROCESSOR_VERSION 1
+
+/*
+ gcdDUMP
+
+ When set to 1, a dump of all states and memory uploads, as well as other
+ hardware related execution will be printed to the debug console. This
+ data can be used for playing back applications.
+*/
+#ifndef gcdDUMP
+# define gcdDUMP 0
+#endif
+
+/*
+ gcdDUMP_API
+
+ When set to 1, a high level dump of the EGL and GL/VG APs's are
+ captured.
+*/
+#ifndef gcdDUMP_API
+# define gcdDUMP_API 0
+#endif
+
+/*
+ gcdDUMP_FRAMERATE
+ When set to a value other than zero, averaqe frame rate will be dumped.
+ The value set is the starting frame that the average will be calculated.
+ This is needed because sometimes first few frames are too slow to be included
+ in the average. Frame count starts from 1.
+*/
+#ifndef gcdDUMP_FRAMERATE
+# define gcdDUMP_FRAMERATE 0
+#endif
+
+
+/*
+ gcdDUMP_IN_KERNEL
+
+ When set to 1, all dumps will happen in the kernel. This is handy if
+ you want the kernel to dump its command buffers as well and the data
+ needs to be in sync.
+*/
+#ifndef gcdDUMP_IN_KERNEL
+# define gcdDUMP_IN_KERNEL 0
+#endif
+
+/*
+ gcdDUMP_COMMAND
+
+ When set to non-zero, the command queue will dump all incoming command
+ and context buffers as well as all other modifications to the command
+ queue.
+*/
+#ifndef gcdDUMP_COMMAND
+# define gcdDUMP_COMMAND 0
+#endif
+
+/*
+ gcdDUMP_FRAME_TGA
+
+ When set to a value other than 0, a dump of the frame specified by the value,
+ will be done into frame.tga. Frame count starts from 1.
+ */
+#ifndef gcdDUMP_FRAME_TGA
+#define gcdDUMP_FRAME_TGA 0
+#endif
+/*
+ gcdNULL_DRIVER
+
+ Set to 1 for infinite speed hardware.
+ Set to 2 for bypassing the HAL.
+ Set to 3 for bypassing the drivers.
+*/
+#ifndef gcdNULL_DRIVER
+# define gcdNULL_DRIVER 0
+#endif
+
+/*
+ gcdENABLE_TIMEOUT_DETECTION
+
+ Enable timeout detection.
+*/
+#ifndef gcdENABLE_TIMEOUT_DETECTION
+# define gcdENABLE_TIMEOUT_DETECTION 0
+#endif
+
+/*
+ gcdCMD_BUFFER_SIZE
+
+ Number of bytes in a command buffer.
+*/
+#ifndef gcdCMD_BUFFER_SIZE
+# define gcdCMD_BUFFER_SIZE (128 << 10)
+#endif
+
+/*
+ gcdCMD_BUFFERS
+
+ Number of command buffers to use per client.
+*/
+#ifndef gcdCMD_BUFFERS
+# define gcdCMD_BUFFERS 2
+#endif
+
+/*
+ gcdMAX_CMD_BUFFERS
+
+ Maximum number of command buffers to use per client.
+*/
+#ifndef gcdMAX_CMD_BUFFERS
+# define gcdMAX_CMD_BUFFERS 8
+#endif
+
+/*
+ gcdCOMMAND_QUEUES
+
+ Number of command queues in the kernel.
+*/
+#ifndef gcdCOMMAND_QUEUES
+# define gcdCOMMAND_QUEUES 2
+#endif
+
+/*
+ gcdPOWER_CONTROL_DELAY
+
+ The delay in milliseconds required to wait until the GPU has woke up
+ from a suspend or power-down state. This is system dependent because
+ the bus clock also needs to stabalize.
+*/
+#ifndef gcdPOWER_CONTROL_DELAY
+# define gcdPOWER_CONTROL_DELAY 0
+#endif
+
+/*
+ gcdMMU_SIZE
+
+ Size of the MMU page table in bytes. Each 4 bytes can hold 4kB worth of
+ virtual data.
+*/
+#ifndef gcdMMU_SIZE
+# define gcdMMU_SIZE (128 << 10)
+#endif
+
+/*
+ gcdSECURE_USER
+
+ Use logical addresses instead of physical addresses in user land. In
+ this case a hint table is created for both command buffers and context
+ buffers, and that hint table will be used to patch up those buffers in
+ the kernel when they are ready to submit.
+*/
+#ifndef gcdSECURE_USER
+# define gcdSECURE_USER 0
+#endif
+
+/*
+ gcdSECURE_CACHE_SLOTS
+
+ Number of slots in the logical to DMA address cache table. Each time a
+ logical address needs to be translated into a DMA address for the GPU,
+ this cache will be walked. The replacement scheme is LRU.
+*/
+#ifndef gcdSECURE_CACHE_SLOTS
+# define gcdSECURE_CACHE_SLOTS 1024
+#endif
+
+/*
+ gcdSECURE_CACHE_METHOD
+
+ Replacement scheme used for Secure Cache. The following options are
+ available:
+
+ gcdSECURE_CACHE_LRU
+ A standard LRU cache.
+
+ gcdSECURE_CACHE_LINEAR
+ A linear walker with the idea that an application will always
+ render the scene in a similar way, so the next entry in the
+ cache should be a hit most of the time.
+
+ gcdSECURE_CACHE_HASH
+ A 256-entry hash table.
+
+ gcdSECURE_CACHE_TABLE
+ A simple cache but with potential of a lot of cache replacement.
+*/
+#ifndef gcdSECURE_CACHE_METHOD
+# define gcdSECURE_CACHE_METHOD gcdSECURE_CACHE_HASH
+#endif
+
+/*
+ gcdREGISTER_ACCESS_FROM_USER
+
+ Set to 1 to allow IOCTL calls to get through from user land. This
+ should only be in debug or development drops.
+*/
+#ifndef gcdREGISTER_ACCESS_FROM_USER
+# define gcdREGISTER_ACCESS_FROM_USER 1
+#endif
+
+/*
+ gcdHEAP_SIZE
+
+ Set the allocation size for the internal heaps. Each time a heap is
+ full, a new heap will be allocated with this minmimum amount of bytes.
+ The bigger this size, the fewer heaps there are to allocate, the better
+ the performance. However, heaps won't be freed until they are
+ completely free, so there might be some more memory waste if the size is
+ too big.
+*/
+#ifndef gcdHEAP_SIZE
+# define gcdHEAP_SIZE (64 << 10)
+#endif
+
+/*
+ gcdPOWER_MANAGEMENT
+
+ This define enables the power management code.
+*/
+#ifndef gcdPOWER_MANAGEMENT
+# define gcdPOWER_MANAGEMENT 1
+#endif
+
+/*
+ gcdFPGA_BUILD
+
+ This define enables work arounds for FPGA images.
+*/
+#ifndef gcdFPGA_BUILD
+# define gcdFPGA_BUILD 0
+#endif
+
+/*
+ gcdGPU_TIMEOUT
+
+ This define specified the number of milliseconds the system will wait
+ before it broadcasts the GPU is stuck. In other words, it will define
+ the timeout of any operation that needs to wait for the GPU.
+
+ If the value is 0, no timeout will be checked for.
+*/
+#ifndef gcdGPU_TIMEOUT
+# if gcdFPGA_BUILD
+# define gcdGPU_TIMEOUT 0
+# else
+# define gcdGPU_TIMEOUT (2000 * 5)
+# endif
+#endif
+
+/*
+ gcdGPU_ADVANCETIMER
+
+ it is advance timer.
+*/
+#ifndef gcdGPU_ADVANCETIMER
+# define gcdGPU_ADVANCETIMER 250
+#endif
+
+/*
+ gcdSTATIC_LINK
+
+ This define disalbes static linking;
+*/
+#ifndef gcdSTATIC_LINK
+# define gcdSTATIC_LINK 0
+#endif
+
+/*
+ gcdUSE_NEW_HEAP
+
+ Setting this define to 1 enables new heap.
+*/
+#ifndef gcdUSE_NEW_HEAP
+# define gcdUSE_NEW_HEAP 0
+#endif
+
+/*
+ gcdCMD_NO_2D_CONTEXT
+
+ This define enables no-context 2D command buffer.
+*/
+#ifndef gcdCMD_NO_2D_CONTEXT
+# define gcdCMD_NO_2D_CONTEXT 1
+#endif
+
+/*
+ gcdENABLE_BANK_ALIGNMENT
+
+ When enabled, video memory is allocated bank aligned. The vendor can modify
+ _GetSurfaceBankAlignment() and gcoSURF_GetBankOffsetBytes() to define how
+ different types of allocations are bank and channel aligned.
+ When disabled (default), no bank alignment is done.
+*/
+#ifndef gcdENABLE_BANK_ALIGNMENT
+# define gcdENABLE_BANK_ALIGNMENT 0
+#endif
+
+/*
+ gcdBANK_BIT_START
+
+ Specifies the start bit of the bank (inclusive).
+*/
+#ifndef gcdBANK_BIT_START
+# define gcdBANK_BIT_START 12
+#endif
+
+/*
+ gcdBANK_BIT_END
+
+ Specifies the end bit of the bank (inclusive).
+*/
+#ifndef gcdBANK_BIT_END
+# define gcdBANK_BIT_END 14
+#endif
+
+/*
+ gcdBANK_CHANNEL_BIT
+
+ When set, video memory when allocated bank aligned is allocated such that
+ render and depth buffer addresses alternate on the channel bit specified.
+ This option has an effect only when gcdENABLE_BANK_ALIGNMENT is enabled.
+ When disabled (default), no alteration is done.
+*/
+#ifndef gcdBANK_CHANNEL_BIT
+# define gcdBANK_CHANNEL_BIT 7
+#endif
+
+/*
+ gcdDYNAMIC_SPEED
+
+ When non-zero, it informs the kernel driver to use the speed throttling
+ broadcasting functions to inform the system the GPU should be spet up or
+ slowed down. It will send a broadcast for slowdown each "interval"
+ specified by this define in milliseconds
+ (gckOS_BroadcastCalibrateSpeed).
+*/
+#ifndef gcdDYNAMIC_SPEED
+# define gcdDYNAMIC_SPEED 2000
+#endif
+
+/*
+ gcdDYNAMIC_EVENT_THRESHOLD
+
+ When non-zero, it specifies the maximum number of available events at
+ which the kernel driver will issue a broadcast to speed up the GPU
+ (gckOS_BroadcastHurry).
+*/
+#ifndef gcdDYNAMIC_EVENT_THRESHOLD
+# define gcdDYNAMIC_EVENT_THRESHOLD 5
+#endif
+
+/*
+ gcdENABLE_PROFILING
+
+ Enable profiling macros.
+*/
+#ifndef gcdENABLE_PROFILING
+# define gcdENABLE_PROFILING 0
+#endif
+
+/*
+ gcdENABLE_128B_MERGE
+
+ Enable 128B merge for the BUS control.
+*/
+#ifndef gcdENABLE_128B_MERGE
+# define gcdENABLE_128B_MERGE 0
+#endif
+
+/*
+ gcdFRAME_DB
+
+ When non-zero, it specified the number of frames inside the frame
+ database. The frame DB will collect per-frame timestamps and hardware
+ counters.
+*/
+#ifndef gcdFRAME_DB
+# define gcdFRAME_DB 0
+# define gcdFRAME_DB_RESET 0
+# define gcdFRAME_DB_NAME "/var/log/frameDB.log"
+#endif
+
+/*
+ gcdENABLE_VG
+ enable the 2D openVG
+*/
+
+#ifndef gcdENABLE_VG
+# define gcdENABLE_VG 0
+#endif
+
+/*
+ gcdDYNAMIC_MAP_RESERVED_MEMORY
+
+ When gcvPOOL_SYSTEM is constructed from RESERVED memory,
+ driver can map the whole reserved memory to kernel space
+ at the beginning, or just map a piece of memory when need
+ to access.
+
+ Notice:
+ - It's only for the 2D openVG. For other cores, there is
+ _NO_ need to map reserved memory to kernel.
+ - It's meaningless when memory is allocated by
+ gckOS_AllocateContiguous, in that case, memory is always
+ mapped by system when allocated.
+*/
+#ifndef gcdDYNAMIC_MAP_RESERVED_MEMORY
+# define gcdDYNAMIC_MAP_RESERVED_MEMORY 1
+#endif
+
+/*
+ gcdPAGED_MEMORY_CACHEABLE
+
+ When non-zero, paged memory will be cacheable.
+
+ Normally, driver will detemines whether a video memory
+ is cacheable or not. When cacheable is not neccessary,
+ it will be writecombine.
+
+ This option is only for those SOC which can't enable
+ writecombine without enabling cacheable.
+*/
+
+#ifndef gcdPAGED_MEMORY_CACHEABLE
+# define gcdPAGED_MEMORY_CACHEABLE 0
+#endif
+
+/*
+ gcdNONPAGED_MEMORY_CACHEABLE
+
+ When non-zero, non paged memory will be cacheable.
+*/
+
+#ifndef gcdNONPAGED_MEMORY_CACHEABLE
+# define gcdNONPAGED_MEMORY_CACHEABLE 0
+#endif
+
+/*
+ gcdNONPAGED_MEMORY_BUFFERABLE
+
+ When non-zero, non paged memory will be bufferable.
+ gcdNONPAGED_MEMORY_BUFFERABLE and gcdNONPAGED_MEMORY_CACHEABLE
+ can't be set 1 at same time
+*/
+
+#ifndef gcdNONPAGED_MEMORY_BUFFERABLE
+# define gcdNONPAGED_MEMORY_BUFFERABLE 1
+#endif
+
+/*
+ gcdENABLE_INFINITE_SPEED_HW
+ enable the Infinte HW , this is for 2D openVG
+*/
+
+#ifndef gcdENABLE_INFINITE_SPEED_HW
+# define gcdENABLE_INFINITE_SPEED_HW 0
+#endif
+
+/*
+ gcdENABLE_TS_DOUBLE_BUFFER
+ enable the TS double buffer, this is for 2D openVG
+*/
+
+#ifndef gcdENABLE_TS_DOUBLE_BUFFER
+# define gcdENABLE_TS_DOUBLE_BUFFER 1
+#endif
+
+/*
+ gcd6000_SUPPORT
+
+ Temporary define to enable/disable 6000 support.
+ */
+#ifndef gcd6000_SUPPORT
+# define gcd6000_SUPPORT 0
+#endif
+
+/*
+ gcdPOWEROFF_TIMEOUT
+
+ When non-zero, GPU will power off automatically from
+ idle state, and gcdPOWEROFF_TIMEOUT is also the default
+ timeout in milliseconds.
+ */
+
+#ifndef gcdPOWEROFF_TIMEOUT
+# define gcdPOWEROFF_TIMEOUT 300
+#endif
+
+/*
+ gcdUSE_VIDMEM_PER_PID
+*/
+#ifndef gcdUSE_VIDMEM_PER_PID
+# define gcdUSE_VIDMEM_PER_PID 0
+#endif
+
+/*
+ QNX_SINGLE_THREADED_DEBUGGING
+*/
+#ifndef QNX_SINGLE_THREADED_DEBUGGING
+# define QNX_SINGLE_THREADED_DEBUGGING 0
+#endif
+
+/*
+ gcdENABLE_RECOVERY
+
+ This define enables the recovery code.
+*/
+#ifndef gcdENABLE_RECOVERY
+# define gcdENABLE_RECOVERY 1
+#endif
+
+/*
+ gcdRENDER_THREADS
+
+ Number of render threads. Make it zero, and there will be no render
+ threads.
+*/
+#ifndef gcdRENDER_THREADS
+# define gcdRENDER_THREADS 0
+#endif
+
+/*
+ gcdSMP
+
+ This define enables SMP support.
+
+ Currently, it only works on Linux/Android,
+ Kbuild will config it according to whether
+ CONFIG_SMP is set.
+
+*/
+#ifndef gcdSMP
+# define gcdSMP 0
+#endif
+
+/*
+ gcdSUPPORT_SWAP_RECTANGLE
+
+ Support swap with a specific rectangle.
+
+ Set the rectangle with eglSetSwapRectangleANDROID api.
+*/
+#ifndef gcdSUPPORT_SWAP_RECTANGLE
+# define gcdSUPPORT_SWAP_RECTANGLE 0
+#endif
+
+/*
+ gcdDEFER_RESOLVES
+
+ Support deferred resolves for 3D apps.
+*/
+#ifndef gcdDEFER_RESOLVES
+# define gcdDEFER_RESOLVES 0
+#endif
+
+/*
+ gcdCOPYBLT_OPTIMIZATION
+
+ Combine dirty areas resulting from Android's copyBlt.
+*/
+#ifndef gcdCOPYBLT_OPTIMIZATION
+# define gcdCOPYBLT_OPTIMIZATION 0
+#endif
+
+/*
+ gcdGPU_LINEAR_BUFFER_ENABLED
+
+ Use linear buffer for GPU apps so HWC can do 2D composition.
+*/
+#ifndef gcdGPU_LINEAR_BUFFER_ENABLED
+# define gcdGPU_LINEAR_BUFFER_ENABLED 0
+#endif
+
+/*
+ gcdSHARED_RESOLVE_BUFFER_ENABLED
+
+ Use shared resolve buffer for all app buffers.
+*/
+#ifndef gcdSHARED_RESOLVE_BUFFER_ENABLED
+# define gcdSHARED_RESOLVE_BUFFER_ENABLED 0
+#endif
+
+/*
+ gcdUSE_TRIANGLE_STRIP_PATCH
+ */
+#ifndef gcdUSE_TRIANGLE_STRIP_PATCH
+# define gcdUSE_TRIANGLE_STRIP_PATCH 1
+#endif
+
+/*
+ gcdENABLE_OUTER_CACHE_PATCH
+
+ Enable the outer cache patch.
+*/
+#ifndef gcdENABLE_OUTER_CACHE_PATCH
+# define gcdENABLE_OUTER_CACHE_PATCH 0
+#endif
+
+#ifndef gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST
+# define gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST 0
+#endif
+
+#ifndef gcdSHARED_PAGETABLE
+# define gcdSHARED_PAGETABLE 1
+#endif
+
+#ifndef gcdUSE_OPENCL
+# define gcdUSE_OPENCL 0
+#endif
+
+/*
+ gcdBLOB_CACHE_ENABLED
+ When non-zero, Android blob cache extension will be enabled.
+ Otherwise, caching will be by-passed.
+ */
+
+#ifndef gcdBLOB_CACHE_ENABLED
+# define gcdBLOB_CACHE_ENABLED 0
+#endif
+
+/*
+ gcdSMALL_BLOCK_SIZE
+
+ When non-zero, a part of VIDMEM will be reserved for requests
+ whose requesting size is less than gcdSMALL_BLOCK_SIZE.
+
+ For Linux, it's the size of a page. If this requeset fallbacks
+ to gcvPOOL_CONTIGUOUS or gcvPOOL_VIRTUAL, memory will be wasted
+ because they allocate a page at least.
+ */
+#ifndef gcdSMALL_BLOCK_SIZE
+# define gcdSMALL_BLOCK_SIZE 4096
+# define gcdRATIO_FOR_SMALL_MEMORY 32
+#endif
+
+#endif /* __gc_hal_options_h_ */
diff --git a/src/include_v4/gc_hal_profiler.h b/src/include_v4/gc_hal_profiler.h
new file mode 100644
index 0000000..ee4a2ce
--- /dev/null
+++ b/src/include_v4/gc_hal_profiler.h
@@ -0,0 +1,1311 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+#ifndef __gc_hal_profiler_h_
+#define __gc_hal_profiler_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define GLVERTEX_OBJECT 10
+#define GLVERTEX_OBJECT_BYTES 11
+
+#define GLINDEX_OBJECT 20
+#define GLINDEX_OBJECT_BYTES 21
+
+#define GLTEXTURE_OBJECT 30
+#define GLTEXTURE_OBJECT_BYTES 31
+
+#if VIVANTE_PROFILER
+#define gcmPROFILE_GC(Enum, Value) gcoPROFILER_Count(gcvNULL, Enum, Value)
+#else
+#define gcmPROFILE_GC(Enum, Value) do { } while (gcvFALSE)
+#endif
+
+#ifndef gcdNEW_PROFILER_FILE
+#define gcdNEW_PROFILER_FILE 1
+#endif
+
+/* OpenGL ES11 API IDs. */
+#define ES11_ACTIVETEXTURE 1
+#define ES11_ALPHAFUNC (ES11_ACTIVETEXTURE + 1)
+#define ES11_ALPHAFUNCX (ES11_ALPHAFUNC + 1)
+#define ES11_BINDBUFFER (ES11_ALPHAFUNCX + 1)
+#define ES11_BINDTEXTURE (ES11_BINDBUFFER + 1)
+#define ES11_BLENDFUNC (ES11_BINDTEXTURE + 1)
+#define ES11_BUFFERDATA (ES11_BLENDFUNC + 1)
+#define ES11_BUFFERSUBDATA (ES11_BUFFERDATA + 1)
+#define ES11_CLEAR (ES11_BUFFERSUBDATA + 1)
+#define ES11_CLEARCOLOR (ES11_CLEAR + 1)
+#define ES11_CLEARCOLORX (ES11_CLEARCOLOR + 1)
+#define ES11_CLEARDEPTHF (ES11_CLEARCOLORX + 1)
+#define ES11_CLEARDEPTHX (ES11_CLEARDEPTHF + 1)
+#define ES11_CLEARSTENCIL (ES11_CLEARDEPTHX + 1)
+#define ES11_CLIENTACTIVETEXTURE (ES11_CLEARSTENCIL + 1)
+#define ES11_CLIPPLANEF (ES11_CLIENTACTIVETEXTURE + 1)
+#define ES11_CLIPPLANEX (ES11_CLIPPLANEF + 1)
+#define ES11_COLOR4F (ES11_CLIPPLANEX + 1)
+#define ES11_COLOR4UB (ES11_COLOR4F + 1)
+#define ES11_COLOR4X (ES11_COLOR4UB + 1)
+#define ES11_COLORMASK (ES11_COLOR4X + 1)
+#define ES11_COLORPOINTER (ES11_COLORMASK + 1)
+#define ES11_COMPRESSEDTEXIMAGE2D (ES11_COLORPOINTER + 1)
+#define ES11_COMPRESSEDTEXSUBIMAGE2D (ES11_COMPRESSEDTEXIMAGE2D + 1)
+#define ES11_COPYTEXIMAGE2D (ES11_COMPRESSEDTEXSUBIMAGE2D + 1)
+#define ES11_COPYTEXSUBIMAGE2D (ES11_COPYTEXIMAGE2D + 1)
+#define ES11_CULLFACE (ES11_COPYTEXSUBIMAGE2D + 1)
+#define ES11_DELETEBUFFERS (ES11_CULLFACE + 1)
+#define ES11_DELETETEXTURES (ES11_DELETEBUFFERS + 1)
+#define ES11_DEPTHFUNC (ES11_DELETETEXTURES + 1)
+#define ES11_DEPTHMASK (ES11_DEPTHFUNC + 1)
+#define ES11_DEPTHRANGEF (ES11_DEPTHMASK + 1)
+#define ES11_DEPTHRANGEX (ES11_DEPTHRANGEF + 1)
+#define ES11_DISABLE (ES11_DEPTHRANGEX + 1)
+#define ES11_DISABLECLIENTSTATE (ES11_DISABLE + 1)
+#define ES11_DRAWARRAYS (ES11_DISABLECLIENTSTATE + 1)
+#define ES11_DRAWELEMENTS (ES11_DRAWARRAYS + 1)
+#define ES11_ENABLE (ES11_DRAWELEMENTS + 1)
+#define ES11_ENABLECLIENTSTATE (ES11_ENABLE + 1)
+#define ES11_FINISH (ES11_ENABLECLIENTSTATE + 1)
+#define ES11_FLUSH (ES11_FINISH + 1)
+#define ES11_FOGF (ES11_FLUSH + 1)
+#define ES11_FOGFV (ES11_FOGF + 1)
+#define ES11_FOGX (ES11_FOGFV + 1)
+#define ES11_FOGXV (ES11_FOGX + 1)
+#define ES11_FRONTFACE (ES11_FOGXV + 1)
+#define ES11_FRUSTUMF (ES11_FRONTFACE + 1)
+#define ES11_FRUSTUMX (ES11_FRUSTUMF + 1)
+#define ES11_GENBUFFERS (ES11_FRUSTUMX + 1)
+#define ES11_GENTEXTURES (ES11_GENBUFFERS + 1)
+#define ES11_GETBOOLEANV (ES11_GENTEXTURES + 1)
+#define ES11_GETBUFFERPARAMETERIV (ES11_GETBOOLEANV + 1)
+#define ES11_GETCLIPPLANEF (ES11_GETBUFFERPARAMETERIV + 1)
+#define ES11_GETCLIPPLANEX (ES11_GETCLIPPLANEF + 1)
+#define ES11_GETERROR (ES11_GETCLIPPLANEX + 1)
+#define ES11_GETFIXEDV (ES11_GETERROR + 1)
+#define ES11_GETFLOATV (ES11_GETFIXEDV + 1)
+#define ES11_GETINTEGERV (ES11_GETFLOATV + 1)
+#define ES11_GETLIGHTFV (ES11_GETINTEGERV + 1)
+#define ES11_GETLIGHTXV (ES11_GETLIGHTFV + 1)
+#define ES11_GETMATERIALFV (ES11_GETLIGHTXV + 1)
+#define ES11_GETMATERIALXV (ES11_GETMATERIALFV + 1)
+#define ES11_GETPOINTERV (ES11_GETMATERIALXV + 1)
+#define ES11_GETSTRING (ES11_GETPOINTERV + 1)
+#define ES11_GETTEXENVFV (ES11_GETSTRING + 1)
+#define ES11_GETTEXENVIV (ES11_GETTEXENVFV + 1)
+#define ES11_GETTEXENVXV (ES11_GETTEXENVIV + 1)
+#define ES11_GETTEXPARAMETERFV (ES11_GETTEXENVXV + 1)
+#define ES11_GETTEXPARAMETERIV (ES11_GETTEXPARAMETERFV + 1)
+#define ES11_GETTEXPARAMETERXV (ES11_GETTEXPARAMETERIV + 1)
+#define ES11_HINT (ES11_GETTEXPARAMETERXV + 1)
+#define ES11_ISBUFFER (ES11_HINT + 1)
+#define ES11_ISENABLED (ES11_ISBUFFER + 1)
+#define ES11_ISTEXTURE (ES11_ISENABLED + 1)
+#define ES11_LIGHTF (ES11_ISTEXTURE + 1)
+#define ES11_LIGHTFV (ES11_LIGHTF + 1)
+#define ES11_LIGHTMODELF (ES11_LIGHTFV + 1)
+#define ES11_LIGHTMODELFV (ES11_LIGHTMODELF + 1)
+#define ES11_LIGHTMODELX (ES11_LIGHTMODELFV + 1)
+#define ES11_LIGHTMODELXV (ES11_LIGHTMODELX + 1)
+#define ES11_LIGHTX (ES11_LIGHTMODELXV + 1)
+#define ES11_LIGHTXV (ES11_LIGHTX + 1)
+#define ES11_LINEWIDTH (ES11_LIGHTXV + 1)
+#define ES11_LINEWIDTHX (ES11_LINEWIDTH + 1)
+#define ES11_LOADIDENTITY (ES11_LINEWIDTHX + 1)
+#define ES11_LOADMATRIXF (ES11_LOADIDENTITY + 1)
+#define ES11_LOADMATRIXX (ES11_LOADMATRIXF + 1)
+#define ES11_LOGICOP (ES11_LOADMATRIXX + 1)
+#define ES11_MATERIALF (ES11_LOGICOP + 1)
+#define ES11_MATERIALFV (ES11_MATERIALF + 1)
+#define ES11_MATERIALX (ES11_MATERIALFV + 1)
+#define ES11_MATERIALXV (ES11_MATERIALX + 1)
+#define ES11_MATRIXMODE (ES11_MATERIALXV + 1)
+#define ES11_MULTITEXCOORD4F (ES11_MATRIXMODE + 1)
+#define ES11_MULTITEXCOORD4X (ES11_MULTITEXCOORD4F + 1)
+#define ES11_MULTMATRIXF (ES11_MULTITEXCOORD4X + 1)
+#define ES11_MULTMATRIXX (ES11_MULTMATRIXF + 1)
+#define ES11_NORMAL3F (ES11_MULTMATRIXX + 1)
+#define ES11_NORMAL3X (ES11_NORMAL3F + 1)
+#define ES11_NORMALPOINTER (ES11_NORMAL3X + 1)
+#define ES11_ORTHOF (ES11_NORMALPOINTER + 1)
+#define ES11_ORTHOX (ES11_ORTHOF + 1)
+#define ES11_PIXELSTOREI (ES11_ORTHOX + 1)
+#define ES11_POINTPARAMETERF (ES11_PIXELSTOREI + 1)
+#define ES11_POINTPARAMETERFV (ES11_POINTPARAMETERF + 1)
+#define ES11_POINTPARAMETERX (ES11_POINTPARAMETERFV + 1)
+#define ES11_POINTPARAMETERXV (ES11_POINTPARAMETERX + 1)
+#define ES11_POINTSIZE (ES11_POINTPARAMETERXV + 1)
+#define ES11_POINTSIZEX (ES11_POINTSIZE + 1)
+#define ES11_POLYGONOFFSET (ES11_POINTSIZEX + 1)
+#define ES11_POLYGONOFFSETX (ES11_POLYGONOFFSET + 1)
+#define ES11_POPMATRIX (ES11_POLYGONOFFSETX + 1)
+#define ES11_PUSHMATRIX (ES11_POPMATRIX + 1)
+#define ES11_READPIXELS (ES11_PUSHMATRIX + 1)
+#define ES11_ROTATEF (ES11_READPIXELS + 1)
+#define ES11_ROTATEX (ES11_ROTATEF + 1)
+#define ES11_SAMPLECOVERAGE (ES11_ROTATEX + 1)
+#define ES11_SAMPLECOVERAGEX (ES11_SAMPLECOVERAGE + 1)
+#define ES11_SCALEF (ES11_SAMPLECOVERAGEX + 1)
+#define ES11_SCALEX (ES11_SCALEF + 1)
+#define ES11_SCISSOR (ES11_SCALEX + 1)
+#define ES11_SHADEMODEL (ES11_SCISSOR + 1)
+#define ES11_STENCILFUNC (ES11_SHADEMODEL + 1)
+#define ES11_STENCILMASK (ES11_STENCILFUNC + 1)
+#define ES11_STENCILOP (ES11_STENCILMASK + 1)
+#define ES11_TEXCOORDPOINTER (ES11_STENCILOP + 1)
+#define ES11_TEXENVF (ES11_TEXCOORDPOINTER + 1)
+#define ES11_TEXENVFV (ES11_TEXENVF + 1)
+#define ES11_TEXENVI (ES11_TEXENVFV + 1)
+#define ES11_TEXENVIV (ES11_TEXENVI + 1)
+#define ES11_TEXENVX (ES11_TEXENVIV + 1)
+#define ES11_TEXENVXV (ES11_TEXENVX + 1)
+#define ES11_TEXIMAGE2D (ES11_TEXENVXV + 1)
+#define ES11_TEXPARAMETERF (ES11_TEXIMAGE2D + 1)
+#define ES11_TEXPARAMETERFV (ES11_TEXPARAMETERF + 1)
+#define ES11_TEXPARAMETERI (ES11_TEXPARAMETERFV + 1)
+#define ES11_TEXPARAMETERIV (ES11_TEXPARAMETERI + 1)
+#define ES11_TEXPARAMETERX (ES11_TEXPARAMETERIV + 1)
+#define ES11_TEXPARAMETERXV (ES11_TEXPARAMETERX + 1)
+#define ES11_TEXSUBIMAGE2D (ES11_TEXPARAMETERXV + 1)
+#define ES11_TRANSLATEF (ES11_TEXSUBIMAGE2D + 1)
+#define ES11_TRANSLATEX (ES11_TRANSLATEF + 1)
+#define ES11_VERTEXPOINTER (ES11_TRANSLATEX + 1)
+#define ES11_VIEWPORT (ES11_VERTEXPOINTER + 1)
+#define ES11_BLENDEQUATIONOES (ES11_VIEWPORT + 1)
+#define ES11_BLENDFUNCSEPERATEOES (ES11_BLENDEQUATIONOES + 1)
+#define ES11_BLENDEQUATIONSEPARATEOES (ES11_BLENDFUNCSEPERATEOES + 1)
+#define ES11_GLMAPBUFFEROES (ES11_BLENDEQUATIONSEPARATEOES + 1)
+#define ES11_GLUNMAPBUFFEROES (ES11_GLMAPBUFFEROES + 1)
+#define ES11_GLGETBUFFERPOINTERVOES (ES11_GLUNMAPBUFFEROES + 1)
+#define ES11_CALLS (ES11_GLGETBUFFERPOINTERVOES + 1)
+#define ES11_DRAWCALLS (ES11_CALLS + 1)
+#define ES11_STATECHANGECALLS (ES11_DRAWCALLS + 1)
+#define ES11_POINTCOUNT (ES11_STATECHANGECALLS + 1)
+#define ES11_LINECOUNT (ES11_POINTCOUNT + 1)
+#define ES11_TRIANGLECOUNT (ES11_LINECOUNT + 1)
+
+/* OpenGL ES2X API IDs. */
+#define ES20_ACTIVETEXTURE 1
+#define ES20_ATTACHSHADER (ES20_ACTIVETEXTURE + 1)
+#define ES20_BINDATTRIBLOCATION (ES20_ATTACHSHADER + 1)
+#define ES20_BINDBUFFER (ES20_BINDATTRIBLOCATION + 1)
+#define ES20_BINDFRAMEBUFFER (ES20_BINDBUFFER + 1)
+#define ES20_BINDRENDERBUFFER (ES20_BINDFRAMEBUFFER + 1)
+#define ES20_BINDTEXTURE (ES20_BINDRENDERBUFFER + 1)
+#define ES20_BLENDCOLOR (ES20_BINDTEXTURE + 1)
+#define ES20_BLENDEQUATION (ES20_BLENDCOLOR + 1)
+#define ES20_BLENDEQUATIONSEPARATE (ES20_BLENDEQUATION + 1)
+#define ES20_BLENDFUNC (ES20_BLENDEQUATIONSEPARATE + 1)
+#define ES20_BLENDFUNCSEPARATE (ES20_BLENDFUNC + 1)
+#define ES20_BUFFERDATA (ES20_BLENDFUNCSEPARATE + 1)
+#define ES20_BUFFERSUBDATA (ES20_BUFFERDATA + 1)
+#define ES20_CHECKFRAMEBUFFERSTATUS (ES20_BUFFERSUBDATA + 1)
+#define ES20_CLEAR (ES20_CHECKFRAMEBUFFERSTATUS + 1)
+#define ES20_CLEARCOLOR (ES20_CLEAR + 1)
+#define ES20_CLEARDEPTHF (ES20_CLEARCOLOR + 1)
+#define ES20_CLEARSTENCIL (ES20_CLEARDEPTHF + 1)
+#define ES20_COLORMASK (ES20_CLEARSTENCIL + 1)
+#define ES20_COMPILESHADER (ES20_COLORMASK + 1)
+#define ES20_COMPRESSEDTEXIMAGE2D (ES20_COMPILESHADER + 1)
+#define ES20_COMPRESSEDTEXSUBIMAGE2D (ES20_COMPRESSEDTEXIMAGE2D + 1)
+#define ES20_COPYTEXIMAGE2D (ES20_COMPRESSEDTEXSUBIMAGE2D + 1)
+#define ES20_COPYTEXSUBIMAGE2D (ES20_COPYTEXIMAGE2D + 1)
+#define ES20_CREATEPROGRAM (ES20_COPYTEXSUBIMAGE2D + 1)
+#define ES20_CREATESHADER (ES20_CREATEPROGRAM + 1)
+#define ES20_CULLFACE (ES20_CREATESHADER + 1)
+#define ES20_DELETEBUFFERS (ES20_CULLFACE + 1)
+#define ES20_DELETEFRAMEBUFFERS (ES20_DELETEBUFFERS + 1)
+#define ES20_DELETEPROGRAM (ES20_DELETEFRAMEBUFFERS + 1)
+#define ES20_DELETERENDERBUFFERS (ES20_DELETEPROGRAM + 1)
+#define ES20_DELETESHADER (ES20_DELETERENDERBUFFERS + 1)
+#define ES20_DELETETEXTURES (ES20_DELETESHADER + 1)
+#define ES20_DEPTHFUNC (ES20_DELETETEXTURES + 1)
+#define ES20_DEPTHMASK (ES20_DEPTHFUNC + 1)
+#define ES20_DEPTHRANGEF (ES20_DEPTHMASK + 1)
+#define ES20_DETACHSHADER (ES20_DEPTHRANGEF + 1)
+#define ES20_DISABLE (ES20_DETACHSHADER + 1)
+#define ES20_DISABLEVERTEXATTRIBARRAY (ES20_DISABLE + 1)
+#define ES20_DRAWARRAYS (ES20_DISABLEVERTEXATTRIBARRAY + 1)
+#define ES20_DRAWELEMENTS (ES20_DRAWARRAYS + 1)
+#define ES20_ENABLE (ES20_DRAWELEMENTS + 1)
+#define ES20_ENABLEVERTEXATTRIBARRAY (ES20_ENABLE + 1)
+#define ES20_FINISH (ES20_ENABLEVERTEXATTRIBARRAY + 1)
+#define ES20_FLUSH (ES20_FINISH + 1)
+#define ES20_FRAMEBUFFERRENDERBUFFER (ES20_FLUSH + 1)
+#define ES20_FRAMEBUFFERTEXTURE2D (ES20_FRAMEBUFFERRENDERBUFFER + 1)
+#define ES20_FRONTFACE (ES20_FRAMEBUFFERTEXTURE2D + 1)
+#define ES20_GENBUFFERS (ES20_FRONTFACE + 1)
+#define ES20_GENERATEMIPMAP (ES20_GENBUFFERS + 1)
+#define ES20_GENFRAMEBUFFERS (ES20_GENERATEMIPMAP + 1)
+#define ES20_GENRENDERBUFFERS (ES20_GENFRAMEBUFFERS + 1)
+#define ES20_GENTEXTURES (ES20_GENRENDERBUFFERS + 1)
+#define ES20_GETACTIVEATTRIB (ES20_GENTEXTURES + 1)
+#define ES20_GETACTIVEUNIFORM (ES20_GETACTIVEATTRIB + 1)
+#define ES20_GETATTACHEDSHADERS (ES20_GETACTIVEUNIFORM + 1)
+#define ES20_GETATTRIBLOCATION (ES20_GETATTACHEDSHADERS + 1)
+#define ES20_GETBOOLEANV (ES20_GETATTRIBLOCATION + 1)
+#define ES20_GETBUFFERPARAMETERIV (ES20_GETBOOLEANV + 1)
+#define ES20_GETERROR (ES20_GETBUFFERPARAMETERIV + 1)
+#define ES20_GETFLOATV (ES20_GETERROR + 1)
+#define ES20_GETFRAMEBUFFERATTACHMENTPARAMETERIV (ES20_GETFLOATV + 1)
+#define ES20_GETINTEGERV (ES20_GETFRAMEBUFFERATTACHMENTPARAMETERIV + 1)
+#define ES20_GETPROGRAMIV (ES20_GETINTEGERV + 1)
+#define ES20_GETPROGRAMINFOLOG (ES20_GETPROGRAMIV + 1)
+#define ES20_GETRENDERBUFFERPARAMETERIV (ES20_GETPROGRAMINFOLOG + 1)
+#define ES20_GETSHADERIV (ES20_GETRENDERBUFFERPARAMETERIV + 1)
+#define ES20_GETSHADERINFOLOG (ES20_GETSHADERIV + 1)
+#define ES20_GETSHADERPRECISIONFORMAT (ES20_GETSHADERINFOLOG + 1)
+#define ES20_GETSHADERSOURCE (ES20_GETSHADERPRECISIONFORMAT + 1)
+#define ES20_GETSTRING (ES20_GETSHADERSOURCE + 1)
+#define ES20_GETTEXPARAMETERFV (ES20_GETSTRING + 1)
+#define ES20_GETTEXPARAMETERIV (ES20_GETTEXPARAMETERFV + 1)
+#define ES20_GETUNIFORMFV (ES20_GETTEXPARAMETERIV + 1)
+#define ES20_GETUNIFORMIV (ES20_GETUNIFORMFV + 1)
+#define ES20_GETUNIFORMLOCATION (ES20_GETUNIFORMIV + 1)
+#define ES20_GETVERTEXATTRIBFV (ES20_GETUNIFORMLOCATION + 1)
+#define ES20_GETVERTEXATTRIBIV (ES20_GETVERTEXATTRIBFV + 1)
+#define ES20_GETVERTEXATTRIBPOINTERV (ES20_GETVERTEXATTRIBIV + 1)
+#define ES20_HINT (ES20_GETVERTEXATTRIBPOINTERV + 1)
+#define ES20_ISBUFFER (ES20_HINT + 1)
+#define ES20_ISENABLED (ES20_ISBUFFER + 1)
+#define ES20_ISFRAMEBUFFER (ES20_ISENABLED + 1)
+#define ES20_ISPROGRAM (ES20_ISFRAMEBUFFER + 1)
+#define ES20_ISRENDERBUFFER (ES20_ISPROGRAM + 1)
+#define ES20_ISSHADER (ES20_ISRENDERBUFFER + 1)
+#define ES20_ISTEXTURE (ES20_ISSHADER + 1)
+#define ES20_LINEWIDTH (ES20_ISTEXTURE + 1)
+#define ES20_LINKPROGRAM (ES20_LINEWIDTH + 1)
+#define ES20_PIXELSTOREI (ES20_LINKPROGRAM + 1)
+#define ES20_POLYGONOFFSET (ES20_PIXELSTOREI + 1)
+#define ES20_READPIXELS (ES20_POLYGONOFFSET + 1)
+#define ES20_RELEASESHADERCOMPILER (ES20_READPIXELS + 1)
+#define ES20_RENDERBUFFERSTORAGE (ES20_RELEASESHADERCOMPILER + 1)
+#define ES20_SAMPLECOVERAGE (ES20_RENDERBUFFERSTORAGE + 1)
+#define ES20_SCISSOR (ES20_SAMPLECOVERAGE + 1)
+#define ES20_SHADERBINARY (ES20_SCISSOR + 1)
+#define ES20_SHADERSOURCE (ES20_SHADERBINARY + 1)
+#define ES20_STENCILFUNC (ES20_SHADERSOURCE + 1)
+#define ES20_STENCILFUNCSEPARATE (ES20_STENCILFUNC + 1)
+#define ES20_STENCILMASK (ES20_STENCILFUNCSEPARATE + 1)
+#define ES20_STENCILMASKSEPARATE (ES20_STENCILMASK + 1)
+#define ES20_STENCILOP (ES20_STENCILMASKSEPARATE + 1)
+#define ES20_STENCILOPSEPARATE (ES20_STENCILOP + 1)
+#define ES20_TEXIMAGE2D (ES20_STENCILOPSEPARATE + 1)
+#define ES20_TEXPARAMETERF (ES20_TEXIMAGE2D + 1)
+#define ES20_TEXPARAMETERFV (ES20_TEXPARAMETERF + 1)
+#define ES20_TEXPARAMETERI (ES20_TEXPARAMETERFV + 1)
+#define ES20_TEXPARAMETERIV (ES20_TEXPARAMETERI + 1)
+#define ES20_TEXSUBIMAGE2D (ES20_TEXPARAMETERIV + 1)
+#define ES20_UNIFORM1F (ES20_TEXSUBIMAGE2D + 1)
+#define ES20_UNIFORM1FV (ES20_UNIFORM1F + 1)
+#define ES20_UNIFORM1I (ES20_UNIFORM1FV + 1)
+#define ES20_UNIFORM1IV (ES20_UNIFORM1I + 1)
+#define ES20_UNIFORM2F (ES20_UNIFORM1IV + 1)
+#define ES20_UNIFORM2FV (ES20_UNIFORM2F + 1)
+#define ES20_UNIFORM2I (ES20_UNIFORM2FV + 1)
+#define ES20_UNIFORM2IV (ES20_UNIFORM2I + 1)
+#define ES20_UNIFORM3F (ES20_UNIFORM2IV + 1)
+#define ES20_UNIFORM3FV (ES20_UNIFORM3F + 1)
+#define ES20_UNIFORM3I (ES20_UNIFORM3FV + 1)
+#define ES20_UNIFORM3IV (ES20_UNIFORM3I + 1)
+#define ES20_UNIFORM4F (ES20_UNIFORM3IV + 1)
+#define ES20_UNIFORM4FV (ES20_UNIFORM4F + 1)
+#define ES20_UNIFORM4I (ES20_UNIFORM4FV + 1)
+#define ES20_UNIFORM4IV (ES20_UNIFORM4I + 1)
+#define ES20_UNIFORMMATRIX2FV (ES20_UNIFORM4IV + 1)
+#define ES20_UNIFORMMATRIX3FV (ES20_UNIFORMMATRIX2FV + 1)
+#define ES20_UNIFORMMATRIX4FV (ES20_UNIFORMMATRIX3FV + 1)
+#define ES20_USEPROGRAM (ES20_UNIFORMMATRIX4FV + 1)
+#define ES20_VALIDATEPROGRAM (ES20_USEPROGRAM + 1)
+#define ES20_VERTEXATTRIB1F (ES20_VALIDATEPROGRAM + 1)
+#define ES20_VERTEXATTRIB1FV (ES20_VERTEXATTRIB1F + 1)
+#define ES20_VERTEXATTRIB2F (ES20_VERTEXATTRIB1FV + 1)
+#define ES20_VERTEXATTRIB2FV (ES20_VERTEXATTRIB2F + 1)
+#define ES20_VERTEXATTRIB3F (ES20_VERTEXATTRIB2FV + 1)
+#define ES20_VERTEXATTRIB3FV (ES20_VERTEXATTRIB3F + 1)
+#define ES20_VERTEXATTRIB4F (ES20_VERTEXATTRIB3FV + 1)
+#define ES20_VERTEXATTRIB4FV (ES20_VERTEXATTRIB4F + 1)
+#define ES20_VERTEXATTRIBPOINTER (ES20_VERTEXATTRIB4FV + 1)
+#define ES20_VIEWPORT (ES20_VERTEXATTRIBPOINTER + 1)
+#define ES20_GETPROGRAMBINARYOES (ES20_VIEWPORT + 1)
+#define ES20_PROGRAMBINARYOES (ES20_GETPROGRAMBINARYOES + 1)
+#define ES20_TEXIMAGE3DOES (ES20_PROGRAMBINARYOES + 1)
+#define ES20_TEXSUBIMAGE3DOES (ES20_TEXIMAGE3DOES + 1)
+#define ES20_COPYSUBIMAGE3DOES (ES20_TEXSUBIMAGE3DOES + 1)
+#define ES20_COMPRESSEDTEXIMAGE3DOES (ES20_COPYSUBIMAGE3DOES + 1)
+#define ES20_COMPRESSEDTEXSUBIMAGE3DOES (ES20_COMPRESSEDTEXIMAGE3DOES + 1)
+#define ES20_FRAMEBUFFERTEXTURE3DOES (ES20_COMPRESSEDTEXSUBIMAGE3DOES + 1)
+#define ES20_BINDVERTEXARRAYOES (ES20_FRAMEBUFFERTEXTURE3DOES + 1)
+#define ES20_GENVERTEXARRAYOES (ES20_BINDVERTEXARRAYOES + 1)
+#define ES20_ISVERTEXARRAYOES (ES20_GENVERTEXARRAYOES + 1)
+#define ES20_DELETEVERTEXARRAYOES (ES20_ISVERTEXARRAYOES + 1)
+#define ES20_GLMAPBUFFEROES (ES20_DELETEVERTEXARRAYOES + 1)
+#define ES20_GLUNMAPBUFFEROES (ES20_GLMAPBUFFEROES + 1)
+#define ES20_GLGETBUFFERPOINTERVOES (ES20_GLUNMAPBUFFEROES + 1)
+#define ES20_CALLS (ES20_GLGETBUFFERPOINTERVOES + 1)
+#define ES20_DRAWCALLS (ES20_CALLS + 1)
+#define ES20_STATECHANGECALLS (ES20_DRAWCALLS + 1)
+#define ES20_POINTCOUNT (ES20_STATECHANGECALLS + 1)
+#define ES20_LINECOUNT (ES20_POINTCOUNT + 1)
+#define ES20_TRIANGLECOUNT (ES20_LINECOUNT + 1)
+
+/* OpenVG API IDs. */
+#define VG11_APPENDPATH 1
+#define VG11_APPENDPATHDATA (VG11_APPENDPATH + 1)
+#define VG11_CHILDIMAGE (VG11_APPENDPATHDATA + 1)
+#define VG11_CLEAR (VG11_CHILDIMAGE + 1)
+#define VG11_CLEARGLYPH (VG11_CLEAR + 1)
+#define VG11_CLEARIMAGE (VG11_CLEARGLYPH + 1)
+#define VG11_CLEARPATH (VG11_CLEARIMAGE + 1)
+#define VG11_COLORMATRIX (VG11_CLEARPATH + 1)
+#define VG11_CONVOLVE (VG11_COLORMATRIX + 1)
+#define VG11_COPYIMAGE (VG11_CONVOLVE + 1)
+#define VG11_COPYMASK (VG11_COPYIMAGE + 1)
+#define VG11_COPYPIXELS (VG11_COPYMASK + 1)
+#define VG11_CREATEFONT (VG11_COPYPIXELS + 1)
+#define VG11_CREATEIMAGE (VG11_CREATEFONT + 1)
+#define VG11_CREATEMASKLAYER (VG11_CREATEIMAGE + 1)
+#define VG11_CREATEPAINT (VG11_CREATEMASKLAYER + 1)
+#define VG11_CREATEPATH (VG11_CREATEPAINT + 1)
+#define VG11_DESTROYFONT (VG11_CREATEPATH + 1)
+#define VG11_DESTROYIMAGE (VG11_DESTROYFONT + 1)
+#define VG11_DESTROYMASKLAYER (VG11_DESTROYIMAGE + 1)
+#define VG11_DESTROYPAINT (VG11_DESTROYMASKLAYER + 1)
+#define VG11_DESTROYPATH (VG11_DESTROYPAINT + 1)
+#define VG11_DRAWGLYPH (VG11_DESTROYPATH + 1)
+#define VG11_DRAWGLYPHS (VG11_DRAWGLYPH + 1)
+#define VG11_DRAWIMAGE (VG11_DRAWGLYPHS + 1)
+#define VG11_DRAWPATH (VG11_DRAWIMAGE + 1)
+#define VG11_FILLMASKLAYER (VG11_DRAWPATH + 1)
+#define VG11_FINISH (VG11_FILLMASKLAYER + 1)
+#define VG11_FLUSH (VG11_FINISH + 1)
+#define VG11_GAUSSIANBLUR (VG11_FLUSH + 1)
+#define VG11_GETCOLOR (VG11_GAUSSIANBLUR + 1)
+#define VG11_GETERROR (VG11_GETCOLOR + 1)
+#define VG11_GETF (VG11_GETERROR + 1)
+#define VG11_GETFV (VG11_GETF + 1)
+#define VG11_GETI (VG11_GETFV + 1)
+#define VG11_GETIMAGESUBDATA (VG11_GETI + 1)
+#define VG11_GETIV (VG11_GETIMAGESUBDATA + 1)
+#define VG11_GETMATRIX (VG11_GETIV + 1)
+#define VG11_GETPAINT (VG11_GETMATRIX + 1)
+#define VG11_GETPARAMETERF (VG11_GETPAINT + 1)
+#define VG11_GETPARAMETERFV (VG11_GETPARAMETERF + 1)
+#define VG11_GETPARAMETERI (VG11_GETPARAMETERFV + 1)
+#define VG11_GETPARAMETERIV (VG11_GETPARAMETERI + 1)
+#define VG11_GETPARAMETERVECTORSIZE (VG11_GETPARAMETERIV + 1)
+#define VG11_GETPARENT (VG11_GETPARAMETERVECTORSIZE + 1)
+#define VG11_GETPATHCAPABILITIES (VG11_GETPARENT + 1)
+#define VG11_GETPIXELS (VG11_GETPATHCAPABILITIES + 1)
+#define VG11_GETSTRING (VG11_GETPIXELS + 1)
+#define VG11_GETVECTORSIZE (VG11_GETSTRING + 1)
+#define VG11_HARDWAREQUERY (VG11_GETVECTORSIZE + 1)
+#define VG11_IMAGESUBDATA (VG11_HARDWAREQUERY + 1)
+#define VG11_INTERPOLATEPATH (VG11_IMAGESUBDATA + 1)
+#define VG11_LOADIDENTITY (VG11_INTERPOLATEPATH + 1)
+#define VG11_LOADMATRIX (VG11_LOADIDENTITY + 1)
+#define VG11_LOOKUP (VG11_LOADMATRIX + 1)
+#define VG11_LOOKUPSINGLE (VG11_LOOKUP + 1)
+#define VG11_MASK (VG11_LOOKUPSINGLE + 1)
+#define VG11_MODIFYPATHCOORDS (VG11_MASK + 1)
+#define VG11_MULTMATRIX (VG11_MODIFYPATHCOORDS + 1)
+#define VG11_PAINTPATTERN (VG11_MULTMATRIX + 1)
+#define VG11_PATHBOUNDS (VG11_PAINTPATTERN + 1)
+#define VG11_PATHLENGTH (VG11_PATHBOUNDS + 1)
+#define VG11_PATHTRANSFORMEDBOUNDS (VG11_PATHLENGTH + 1)
+#define VG11_POINTALONGPATH (VG11_PATHTRANSFORMEDBOUNDS + 1)
+#define VG11_READPIXELS (VG11_POINTALONGPATH + 1)
+#define VG11_REMOVEPATHCAPABILITIES (VG11_READPIXELS + 1)
+#define VG11_RENDERTOMASK (VG11_REMOVEPATHCAPABILITIES + 1)
+#define VG11_ROTATE (VG11_RENDERTOMASK + 1)
+#define VG11_SCALE (VG11_ROTATE + 1)
+#define VG11_SEPARABLECONVOLVE (VG11_SCALE + 1)
+#define VG11_SETCOLOR (VG11_SEPARABLECONVOLVE + 1)
+#define VG11_SETF (VG11_SETCOLOR + 1)
+#define VG11_SETFV (VG11_SETF + 1)
+#define VG11_SETGLYPHTOIMAGE (VG11_SETFV + 1)
+#define VG11_SETGLYPHTOPATH (VG11_SETGLYPHTOIMAGE + 1)
+#define VG11_SETI (VG11_SETGLYPHTOPATH + 1)
+#define VG11_SETIV (VG11_SETI + 1)
+#define VG11_SETPAINT (VG11_SETIV + 1)
+#define VG11_SETPARAMETERF (VG11_SETPAINT + 1)
+#define VG11_SETPARAMETERFV (VG11_SETPARAMETERF + 1)
+#define VG11_SETPARAMETERI (VG11_SETPARAMETERFV + 1)
+#define VG11_SETPARAMETERIV (VG11_SETPARAMETERI + 1)
+#define VG11_SETPIXELS (VG11_SETPARAMETERIV + 1)
+#define VG11_SHEAR (VG11_SETPIXELS + 1)
+#define VG11_TRANSFORMPATH (VG11_SHEAR + 1)
+#define VG11_TRANSLATE (VG11_TRANSFORMPATH + 1)
+#define VG11_WRITEPIXELS (VG11_TRANSLATE + 1)
+#define VG11_CALLS (VG11_WRITEPIXELS + 1)
+#define VG11_DRAWCALLS (VG11_CALLS + 1)
+#define VG11_STATECHANGECALLS (VG11_DRAWCALLS + 1)
+#define VG11_FILLCOUNT (VG11_STATECHANGECALLS + 1)
+#define VG11_STROKECOUNT (VG11_FILLCOUNT + 1)
+/* End of Driver API ID Definitions. */
+
+/* HAL & MISC IDs. */
+#define HAL_VERTBUFNEWBYTEALLOC 1
+#define HAL_VERTBUFTOTALBYTEALLOC (HAL_VERTBUFNEWBYTEALLOC + 1)
+#define HAL_VERTBUFNEWOBJALLOC (HAL_VERTBUFTOTALBYTEALLOC + 1)
+#define HAL_VERTBUFTOTALOBJALLOC (HAL_VERTBUFNEWOBJALLOC + 1)
+#define HAL_INDBUFNEWBYTEALLOC (HAL_VERTBUFTOTALOBJALLOC + 1)
+#define HAL_INDBUFTOTALBYTEALLOC (HAL_INDBUFNEWBYTEALLOC + 1)
+#define HAL_INDBUFNEWOBJALLOC (HAL_INDBUFTOTALBYTEALLOC + 1)
+#define HAL_INDBUFTOTALOBJALLOC (HAL_INDBUFNEWOBJALLOC + 1)
+#define HAL_TEXBUFNEWBYTEALLOC (HAL_INDBUFTOTALOBJALLOC + 1)
+#define HAL_TEXBUFTOTALBYTEALLOC (HAL_TEXBUFNEWBYTEALLOC + 1)
+#define HAL_TEXBUFNEWOBJALLOC (HAL_TEXBUFTOTALBYTEALLOC + 1)
+#define HAL_TEXBUFTOTALOBJALLOC (HAL_TEXBUFNEWOBJALLOC + 1)
+
+#define GPU_CYCLES 1
+#define GPU_READ64BYTE (GPU_CYCLES + 1)
+#define GPU_WRITE64BYTE (GPU_READ64BYTE + 1)
+
+#define VS_INSTCOUNT 1
+#define VS_BRANCHINSTCOUNT (VS_INSTCOUNT + 1)
+#define VS_TEXLDINSTCOUNT (VS_BRANCHINSTCOUNT + 1)
+#define VS_RENDEREDVERTCOUNT (VS_TEXLDINSTCOUNT + 1)
+
+#define PS_INSTCOUNT 1
+#define PS_BRANCHINSTCOUNT (PS_INSTCOUNT + 1)
+#define PS_TEXLDINSTCOUNT (PS_BRANCHINSTCOUNT + 1)
+#define PS_RENDEREDPIXCOUNT (PS_TEXLDINSTCOUNT + 1)
+
+#define PA_INVERTCOUNT 1
+#define PA_INPRIMCOUNT (PA_INVERTCOUNT + 1)
+#define PA_OUTPRIMCOUNT (PA_INPRIMCOUNT + 1)
+#define PA_DEPTHCLIPCOUNT (PA_OUTPRIMCOUNT + 1)
+#define PA_TRIVIALREJCOUNT (PA_DEPTHCLIPCOUNT + 1)
+#define PA_CULLCOUNT (PA_TRIVIALREJCOUNT + 1)
+
+#define SE_TRIANGLECOUNT 1
+#define SE_LINECOUNT (SE_TRIANGLECOUNT + 1)
+
+#define RA_VALIDPIXCOUNT 1
+#define RA_TOTALQUADCOUNT (RA_VALIDPIXCOUNT + 1)
+#define RA_VALIDQUADCOUNTEZ (RA_TOTALQUADCOUNT + 1)
+#define RA_TOTALPRIMCOUNT (RA_VALIDQUADCOUNTEZ + 1)
+#define RA_PIPECACHEMISSCOUNT (RA_TOTALPRIMCOUNT + 1)
+#define RA_PREFCACHEMISSCOUNT (RA_PIPECACHEMISSCOUNT + 1)
+#define RA_EEZCULLCOUNT (RA_PREFCACHEMISSCOUNT + 1)
+
+#define TX_TOTBILINEARREQ 1
+#define TX_TOTTRILINEARREQ (TX_TOTBILINEARREQ + 1)
+#define TX_TOTDISCARDTEXREQ (TX_TOTTRILINEARREQ + 1)
+#define TX_TOTTEXREQ (TX_TOTDISCARDTEXREQ + 1)
+#define TX_MEMREADCOUNT (TX_TOTTEXREQ + 1)
+#define TX_MEMREADIN8BCOUNT (TX_MEMREADCOUNT + 1)
+#define TX_CACHEMISSCOUNT (TX_MEMREADIN8BCOUNT + 1)
+#define TX_CACHEHITTEXELCOUNT (TX_CACHEMISSCOUNT + 1)
+#define TX_CACHEMISSTEXELCOUNT (TX_CACHEHITTEXELCOUNT + 1)
+
+#define PE_KILLEDBYCOLOR 1
+#define PE_KILLEDBYDEPTH (PE_KILLEDBYCOLOR + 1)
+#define PE_DRAWNBYCOLOR (PE_KILLEDBYDEPTH + 1)
+#define PE_DRAWNBYDEPTH (PE_DRAWNBYCOLOR + 1)
+
+#define MC_READREQ8BPIPE 1
+#define MC_READREQ8BIP (MC_READREQ8BPIPE + 1)
+#define MC_WRITEREQ8BPIPE (MC_READREQ8BIP + 1)
+
+#define AXI_READREQSTALLED 1
+#define AXI_WRITEREQSTALLED (AXI_READREQSTALLED + 1)
+#define AXI_WRITEDATASTALLED (AXI_WRITEREQSTALLED + 1)
+
+#define PVS_INSTRCOUNT 1
+#define PVS_ALUINSTRCOUNT (PVS_INSTRCOUNT + 1)
+#define PVS_TEXINSTRCOUNT (PVS_ALUINSTRCOUNT + 1)
+#define PVS_ATTRIBCOUNT (PVS_TEXINSTRCOUNT + 1)
+#define PVS_UNIFORMCOUNT (PVS_ATTRIBCOUNT + 1)
+#define PVS_FUNCTIONCOUNT (PVS_UNIFORMCOUNT + 1)
+
+#define PPS_INSTRCOUNT 1
+#define PPS_ALUINSTRCOUNT (PPS_INSTRCOUNT + 1)
+#define PPS_TEXINSTRCOUNT (PPS_ALUINSTRCOUNT + 1)
+#define PPS_ATTRIBCOUNT (PPS_TEXINSTRCOUNT + 1)
+#define PPS_UNIFORMCOUNT (PPS_ATTRIBCOUNT + 1)
+#define PPS_FUNCTIONCOUNT (PPS_UNIFORMCOUNT + 1)
+/* End of MISC Counter IDs. */
+
+#ifdef gcdNEW_PROFILER_FILE
+
+/* Category Constants. */
+#define VPHEADER 0x010000
+#define VPG_INFO 0x020000
+#define VPG_TIME 0x030000
+#define VPG_MEM 0x040000
+#define VPG_ES11 0x050000
+#define VPG_ES20 0x060000
+#define VPG_VG11 0x070000
+#define VPG_HAL 0x080000
+#define VPG_HW 0x090000
+#define VPG_GPU 0x0a0000
+#define VPG_VS 0x0b0000
+#define VPG_PS 0x0c0000
+#define VPG_PA 0x0d0000
+#define VPG_SETUP 0x0e0000
+#define VPG_RA 0x0f0000
+#define VPG_TX 0x100000
+#define VPG_PE 0x110000
+#define VPG_MC 0x120000
+#define VPG_AXI 0x130000
+#define VPG_PROG 0x140000
+#define VPG_PVS 0x150000
+#define VPG_PPS 0x160000
+#define VPG_FRAME 0x170000
+#define VPG_END 0xff0000
+
+/* Info. */
+#define VPC_INFOCOMPANY (VPG_INFO + 1)
+#define VPC_INFOVERSION (VPC_INFOCOMPANY + 1)
+#define VPC_INFORENDERER (VPC_INFOVERSION + 1)
+#define VPC_INFOREVISION (VPC_INFORENDERER + 1)
+#define VPC_INFODRIVER (VPC_INFOREVISION + 1)
+#define VPC_INFODRIVERMODE (VPC_INFODRIVER + 1)
+#define VPC_INFOSCREENSIZE (VPC_INFODRIVERMODE + 1)
+
+/* Counter Constants. */
+#define VPC_ELAPSETIME (VPG_TIME + 1)
+#define VPC_CPUTIME (VPC_ELAPSETIME + 1)
+
+#define VPC_MEMMAXRES (VPG_MEM + 1)
+#define VPC_MEMSHARED (VPC_MEMMAXRES + 1)
+#define VPC_MEMUNSHAREDDATA (VPC_MEMSHARED + 1)
+#define VPC_MEMUNSHAREDSTACK (VPC_MEMUNSHAREDDATA + 1)
+
+/* OpenGL ES11 Counters. */
+#define VPC_ES11ACTIVETEXTURE (VPG_ES11 + ES11_ACTIVETEXTURE)
+#define VPC_ES11ALPHAFUNC (VPG_ES11 + ES11_ALPHAFUNC)
+#define VPC_ES11ALPHAFUNCX (VPG_ES11 + ES11_ALPHAFUNCX)
+#define VPC_ES11BINDBUFFER (VPG_ES11 + ES11_BINDBUFFER)
+#define VPC_ES11BINDTEXTURE (VPG_ES11 + ES11_BINDTEXTURE)
+#define VPC_ES11BLENDFUNC (VPG_ES11 + ES11_BLENDFUNC)
+#define VPC_ES11BUFFERDATA (VPG_ES11 + ES11_BUFFERDATA)
+#define VPC_ES11BUFFERSUBDATA (VPG_ES11 + ES11_BUFFERSUBDATA)
+#define VPC_ES11CLEAR (VPG_ES11 + ES11_CLEAR)
+#define VPC_ES11CLEARCOLOR (VPG_ES11 + ES11_CLEARCOLOR)
+#define VPC_ES11CLEARCOLORX (VPG_ES11 + ES11_CLEARCOLORX)
+#define VPC_ES11CLEARDEPTHF (VPG_ES11 + ES11_CLEARDEPTHF)
+#define VPC_ES11CLEARDEPTHX (VPG_ES11 + ES11_CLEARDEPTHX)
+#define VPC_ES11CLEARSTENCIL (VPG_ES11 + ES11_CLEARSTENCIL)
+#define VPC_ES11CLIENTACTIVETEXTURE (VPG_ES11 + ES11_CLIENTACTIVETEXTURE)
+#define VPC_ES11CLIPPLANEF (VPG_ES11 + ES11_CLIPPLANEF)
+#define VPC_ES11CLIPPLANEX (VPG_ES11 + ES11_CLIPPLANEX)
+#define VPC_ES11COLOR4F (VPG_ES11 + ES11_COLOR4F)
+#define VPC_ES11COLOR4UB (VPG_ES11 + ES11_COLOR4UB)
+#define VPC_ES11COLOR4X (VPG_ES11 + ES11_COLOR4X)
+#define VPC_ES11COLORMASK (VPG_ES11 + ES11_COLORMASK)
+#define VPC_ES11COLORPOINTER (VPG_ES11 + ES11_COLORPOINTER)
+#define VPC_ES11COMPRESSEDTEXIMAGE2D (VPG_ES11 + ES11_COMPRESSEDTEXIMAGE2D)
+#define VPC_ES11COMPRESSEDTEXSUBIMAGE2D (VPG_ES11 + ES11_COMPRESSEDTEXSUBIMAGE2D)
+#define VPC_ES11COPYTEXIMAGE2D (VPG_ES11 + ES11_COPYTEXIMAGE2D)
+#define VPC_ES11COPYTEXSUBIMAGE2D (VPG_ES11 + ES11_COPYTEXSUBIMAGE2D)
+#define VPC_ES11CULLFACE (VPG_ES11 + ES11_CULLFACE)
+#define VPC_ES11DELETEBUFFERS (VPG_ES11 + ES11_DELETEBUFFERS)
+#define VPC_ES11DELETETEXTURES (VPG_ES11 + ES11_DELETETEXTURES)
+#define VPC_ES11DEPTHFUNC (VPG_ES11 + ES11_DEPTHFUNC)
+#define VPC_ES11DEPTHMASK (VPG_ES11 + ES11_DEPTHMASK)
+#define VPC_ES11DEPTHRANGEF (VPG_ES11 + ES11_DEPTHRANGEF)
+#define VPC_ES11DEPTHRANGEX (VPG_ES11 + ES11_DEPTHRANGEX)
+#define VPC_ES11DISABLE (VPG_ES11 + ES11_DISABLE)
+#define VPC_ES11DISABLECLIENTSTATE (VPG_ES11 + ES11_DISABLECLIENTSTATE)
+#define VPC_ES11DRAWARRAYS (VPG_ES11 + ES11_DRAWARRAYS)
+#define VPC_ES11DRAWELEMENTS (VPG_ES11 + ES11_DRAWELEMENTS)
+#define VPC_ES11ENABLE (VPG_ES11 + ES11_ENABLE)
+#define VPC_ES11ENABLECLIENTSTATE (VPG_ES11 + ES11_ENABLECLIENTSTATE)
+#define VPC_ES11FINISH (VPG_ES11 + ES11_FINISH)
+#define VPC_ES11FLUSH (VPG_ES11 + ES11_FLUSH)
+#define VPC_ES11FOGF (VPG_ES11 + ES11_FOGF)
+#define VPC_ES11FOGFV (VPG_ES11 + ES11_FOGFV)
+#define VPC_ES11FOGX (VPG_ES11 + ES11_FOGX)
+#define VPC_ES11FOGXV (VPG_ES11 + ES11_FOGXV)
+#define VPC_ES11FRONTFACE (VPG_ES11 + ES11_FRONTFACE)
+#define VPC_ES11FRUSTUMF (VPG_ES11 + ES11_FRUSTUMF)
+#define VPC_ES11FRUSTUMX (VPG_ES11 + ES11_FRUSTUMX)
+#define VPC_ES11GENBUFFERS (VPG_ES11 + ES11_GENBUFFERS)
+#define VPC_ES11GENTEXTURES (VPG_ES11 + ES11_GENTEXTURES)
+#define VPC_ES11GETBOOLEANV (VPG_ES11 + ES11_GETBOOLEANV)
+#define VPC_ES11GETBUFFERPARAMETERIV (VPG_ES11 + ES11_GETBUFFERPARAMETERIV)
+#define VPC_ES11GETCLIPPLANEF (VPG_ES11 + ES11_GETCLIPPLANEF)
+#define VPC_ES11GETCLIPPLANEX (VPG_ES11 + ES11_GETCLIPPLANEX)
+#define VPC_ES11GETERROR (VPG_ES11 + ES11_GETERROR)
+#define VPC_ES11GETFIXEDV (VPG_ES11 + ES11_GETFIXEDV)
+#define VPC_ES11GETFLOATV (VPG_ES11 + ES11_GETFLOATV)
+#define VPC_ES11GETINTEGERV (VPG_ES11 + ES11_GETINTEGERV)
+#define VPC_ES11GETLIGHTFV (VPG_ES11 + ES11_GETLIGHTFV)
+#define VPC_ES11GETLIGHTXV (VPG_ES11 + ES11_GETLIGHTXV)
+#define VPC_ES11GETMATERIALFV (VPG_ES11 + ES11_GETMATERIALFV)
+#define VPC_ES11GETMATERIALXV (VPG_ES11 + ES11_GETMATERIALXV)
+#define VPC_ES11GETPOINTERV (VPG_ES11 + ES11_GETPOINTERV)
+#define VPC_ES11GETSTRING (VPG_ES11 + ES11_GETSTRING)
+#define VPC_ES11GETTEXENVFV (VPG_ES11 + ES11_GETTEXENVFV)
+#define VPC_ES11GETTEXENVIV (VPG_ES11 + ES11_GETTEXENVIV)
+#define VPC_ES11GETTEXENVXV (VPG_ES11 + ES11_GETTEXENVXV)
+#define VPC_ES11GETTEXPARAMETERFV (VPG_ES11 + ES11_GETTEXPARAMETERFV)
+#define VPC_ES11GETTEXPARAMETERIV (VPG_ES11 + ES11_GETTEXPARAMETERIV)
+#define VPC_ES11GETTEXPARAMETERXV (VPG_ES11 + ES11_GETTEXPARAMETERXV)
+#define VPC_ES11HINT (VPG_ES11 + ES11_HINT)
+#define VPC_ES11ISBUFFER (VPG_ES11 + ES11_ISBUFFER)
+#define VPC_ES11ISENABLED (VPG_ES11 + ES11_ISENABLED)
+#define VPC_ES11ISTEXTURE (VPG_ES11 + ES11_ISTEXTURE)
+#define VPC_ES11LIGHTF (VPG_ES11 + ES11_LIGHTF)
+#define VPC_ES11LIGHTFV (VPG_ES11 + ES11_LIGHTFV)
+#define VPC_ES11LIGHTMODELF (VPG_ES11 + ES11_LIGHTMODELF)
+#define VPC_ES11LIGHTMODELFV (VPG_ES11 + ES11_LIGHTMODELFV)
+#define VPC_ES11LIGHTMODELX (VPG_ES11 + ES11_LIGHTMODELX)
+#define VPC_ES11LIGHTMODELXV (VPG_ES11 + ES11_LIGHTMODELXV)
+#define VPC_ES11LIGHTX (VPG_ES11 + ES11_LIGHTX)
+#define VPC_ES11LIGHTXV (VPG_ES11 + ES11_LIGHTXV)
+#define VPC_ES11LINEWIDTH (VPG_ES11 + ES11_LINEWIDTH)
+#define VPC_ES11LINEWIDTHX (VPG_ES11 + ES11_LINEWIDTHX)
+#define VPC_ES11LOADIDENTITY (VPG_ES11 + ES11_LOADIDENTITY)
+#define VPC_ES11LOADMATRIXF (VPG_ES11 + ES11_LOADMATRIXF)
+#define VPC_ES11LOADMATRIXX (VPG_ES11 + ES11_LOADMATRIXX)
+#define VPC_ES11LOGICOP (VPG_ES11 + ES11_LOGICOP)
+#define VPC_ES11MATERIALF (VPG_ES11 + ES11_MATERIALF)
+#define VPC_ES11MATERIALFV (VPG_ES11 + ES11_MATERIALFV)
+#define VPC_ES11MATERIALX (VPG_ES11 + ES11_MATERIALX)
+#define VPC_ES11MATERIALXV (VPG_ES11 + ES11_MATERIALXV)
+#define VPC_ES11MATRIXMODE (VPG_ES11 + ES11_MATRIXMODE)
+#define VPC_ES11MULTITEXCOORD4F (VPG_ES11 + ES11_MULTITEXCOORD4F)
+#define VPC_ES11MULTITEXCOORD4X (VPG_ES11 + ES11_MULTITEXCOORD4X)
+#define VPC_ES11MULTMATRIXF (VPG_ES11 + ES11_MULTMATRIXF)
+#define VPC_ES11MULTMATRIXX (VPG_ES11 + ES11_MULTMATRIXX)
+#define VPC_ES11NORMAL3F (VPG_ES11 + ES11_NORMAL3F)
+#define VPC_ES11NORMAL3X (VPG_ES11 + ES11_NORMAL3X)
+#define VPC_ES11NORMALPOINTER (VPG_ES11 + ES11_NORMALPOINTER)
+#define VPC_ES11ORTHOF (VPG_ES11 + ES11_ORTHOF)
+#define VPC_ES11ORTHOX (VPG_ES11 + ES11_ORTHOX)
+#define VPC_ES11PIXELSTOREI (VPG_ES11 + ES11_PIXELSTOREI)
+#define VPC_ES11POINTPARAMETERF (VPG_ES11 + ES11_POINTPARAMETERF)
+#define VPC_ES11POINTPARAMETERFV (VPG_ES11 + ES11_POINTPARAMETERFV)
+#define VPC_ES11POINTPARAMETERX (VPG_ES11 + ES11_POINTPARAMETERX)
+#define VPC_ES11POINTPARAMETERXV (VPG_ES11 + ES11_POINTPARAMETERXV)
+#define VPC_ES11POINTSIZE (VPG_ES11 + ES11_POINTSIZE)
+#define VPC_ES11POINTSIZEX (VPG_ES11 + ES11_POINTSIZEX)
+#define VPC_ES11POLYGONOFFSET (VPG_ES11 + ES11_POLYGONOFFSET)
+#define VPC_ES11POLYGONOFFSETX (VPG_ES11 + ES11_POLYGONOFFSETX)
+#define VPC_ES11POPMATRIX (VPG_ES11 + ES11_POPMATRIX)
+#define VPC_ES11PUSHMATRIX (VPG_ES11 + ES11_PUSHMATRIX)
+#define VPC_ES11READPIXELS (VPG_ES11 + ES11_READPIXELS)
+#define VPC_ES11ROTATEF (VPG_ES11 + ES11_ROTATEF)
+#define VPC_ES11ROTATEX (VPG_ES11 + ES11_ROTATEX)
+#define VPC_ES11SAMPLECOVERAGE (VPG_ES11 + ES11_SAMPLECOVERAGE)
+#define VPC_ES11SAMPLECOVERAGEX (VPG_ES11 + ES11_SAMPLECOVERAGEX)
+#define VPC_ES11SCALEF (VPG_ES11 + ES11_SCALEF)
+#define VPC_ES11SCALEX (VPG_ES11 + ES11_SCALEX)
+#define VPC_ES11SCISSOR (VPG_ES11 + ES11_SCISSOR)
+#define VPC_ES11SHADEMODEL (VPG_ES11 + ES11_SHADEMODEL)
+#define VPC_ES11STENCILFUNC (VPG_ES11 + ES11_STENCILFUNC)
+#define VPC_ES11STENCILMASK (VPG_ES11 + ES11_STENCILMASK)
+#define VPC_ES11STENCILOP (VPG_ES11 + ES11_STENCILOP)
+#define VPC_ES11TEXCOORDPOINTER (VPG_ES11 + ES11_TEXCOORDPOINTER)
+#define VPC_ES11TEXENVF (VPG_ES11 + ES11_TEXENVF)
+#define VPC_ES11TEXENVFV (VPG_ES11 + ES11_TEXENVFV)
+#define VPC_ES11TEXENVI (VPG_ES11 + ES11_TEXENVI)
+#define VPC_ES11TEXENVIV (VPG_ES11 + ES11_TEXENVIV)
+#define VPC_ES11TEXENVX (VPG_ES11 + ES11_TEXENVX)
+#define VPC_ES11TEXENVXV (VPG_ES11 + ES11_TEXENVXV)
+#define VPC_ES11TEXIMAGE2D (VPG_ES11 + ES11_TEXIMAGE2D)
+#define VPC_ES11TEXPARAMETERF (VPG_ES11 + ES11_TEXPARAMETERF)
+#define VPC_ES11TEXPARAMETERFV (VPG_ES11 + ES11_TEXPARAMETERFV)
+#define VPC_ES11TEXPARAMETERI (VPG_ES11 + ES11_TEXPARAMETERI)
+#define VPC_ES11TEXPARAMETERIV (VPG_ES11 + ES11_TEXPARAMETERIV)
+#define VPC_ES11TEXPARAMETERX (VPG_ES11 + ES11_TEXPARAMETERX)
+#define VPC_ES11TEXPARAMETERXV (VPG_ES11 + ES11_TEXPARAMETERXV)
+#define VPC_ES11TEXSUBIMAGE2D (VPG_ES11 + ES11_TEXSUBIMAGE2D)
+#define VPC_ES11TRANSLATEF (VPG_ES11 + ES11_TRANSLATEF)
+#define VPC_ES11TRANSLATEX (VPG_ES11 + ES11_TRANSLATEX)
+#define VPC_ES11VERTEXPOINTER (VPG_ES11 + ES11_VERTEXPOINTER)
+#define VPC_ES11VIEWPORT (VPG_ES11 + ES11_VIEWPORT)
+/* OpenGL ES11 Statics Counter IDs. */
+#define VPC_ES11CALLS (VPG_ES11 + ES11_CALLS)
+#define VPC_ES11DRAWCALLS (VPG_ES11 + ES11_DRAWCALLS)
+#define VPC_ES11STATECHANGECALLS (VPG_ES11 + ES11_STATECHANGECALLS)
+#define VPC_ES11POINTCOUNT (VPG_ES11 + ES11_POINTCOUNT)
+#define VPC_ES11LINECOUNT (VPG_ES11 + ES11_LINECOUNT)
+#define VPC_ES11TRIANGLECOUNT (VPG_ES11 + ES11_TRIANGLECOUNT)
+
+/* OpenGLES 2.x */
+#define VPC_ES20ACTIVETEXTURE (VPG_ES20 + ES20_ACTIVETEXTURE)
+#define VPC_ES20ATTACHSHADER (VPG_ES20 + ES20_ATTACHSHADER)
+#define VPC_ES20BINDATTRIBLOCATION (VPG_ES20 + ES20_BINDATTRIBLOCATION)
+#define VPC_ES20BINDBUFFER (VPG_ES20 + ES20_BINDBUFFER)
+#define VPC_ES20BINDFRAMEBUFFER (VPG_ES20 + ES20_BINDFRAMEBUFFER)
+#define VPC_ES20BINDRENDERBUFFER (VPG_ES20 + ES20_BINDRENDERBUFFER)
+#define VPC_ES20BINDTEXTURE (VPG_ES20 + ES20_BINDTEXTURE)
+#define VPC_ES20BLENDCOLOR (VPG_ES20 + ES20_BLENDCOLOR)
+#define VPC_ES20BLENDEQUATION (VPG_ES20 + ES20_BLENDEQUATION)
+#define VPC_ES20BLENDEQUATIONSEPARATE (VPG_ES20 + ES20_BLENDEQUATIONSEPARATE)
+#define VPC_ES20BLENDFUNC (VPG_ES20 + ES20_BLENDFUNC)
+#define VPC_ES20BLENDFUNCSEPARATE (VPG_ES20 + ES20_BLENDFUNCSEPARATE)
+#define VPC_ES20BUFFERDATA (VPG_ES20 + ES20_BUFFERDATA)
+#define VPC_ES20BUFFERSUBDATA (VPG_ES20 + ES20_BUFFERSUBDATA)
+#define VPC_ES20CHECKFRAMEBUFFERSTATUS (VPG_ES20 + ES20_CHECKFRAMEBUFFERSTATUS)
+#define VPC_ES20CLEAR (VPG_ES20 + ES20_CLEAR)
+#define VPC_ES20CLEARCOLOR (VPG_ES20 + ES20_CLEARCOLOR)
+#define VPC_ES20CLEARDEPTHF (VPG_ES20 + ES20_CLEARDEPTHF)
+#define VPC_ES20CLEARSTENCIL (VPG_ES20 + ES20_CLEARSTENCIL)
+#define VPC_ES20COLORMASK (VPG_ES20 + ES20_COLORMASK)
+#define VPC_ES20COMPILESHADER (VPG_ES20 + ES20_COMPILESHADER)
+#define VPC_ES20COMPRESSEDTEXIMAGE2D (VPG_ES20 + ES20_COMPRESSEDTEXIMAGE2D)
+#define VPC_ES20COMPRESSEDTEXSUBIMAGE2D (VPG_ES20 + ES20_COMPRESSEDTEXSUBIMAGE2D)
+#define VPC_ES20COPYTEXIMAGE2D (VPG_ES20 + ES20_COPYTEXIMAGE2D)
+#define VPC_ES20COPYTEXSUBIMAGE2D (VPG_ES20 + ES20_COPYTEXSUBIMAGE2D)
+#define VPC_ES20CREATEPROGRAM (VPG_ES20 + ES20_CREATEPROGRAM)
+#define VPC_ES20CREATESHADER (VPG_ES20 + ES20_CREATESHADER)
+#define VPC_ES20CULLFACE (VPG_ES20 + ES20_CULLFACE)
+#define VPC_ES20DELETEBUFFERS (VPG_ES20 + ES20_DELETEBUFFERS)
+#define VPC_ES20DELETEFRAMEBUFFERS (VPG_ES20 + ES20_DELETEFRAMEBUFFERS)
+#define VPC_ES20DELETEPROGRAM (VPG_ES20 + ES20_DELETEPROGRAM)
+#define VPC_ES20DELETERENDERBUFFERS (VPG_ES20 + ES20_DELETERENDERBUFFERS)
+#define VPC_ES20DELETESHADER (VPG_ES20 + ES20_DELETESHADER)
+#define VPC_ES20DELETETEXTURES (VPG_ES20 + ES20_DELETETEXTURES)
+#define VPC_ES20DEPTHFUNC (VPG_ES20 + ES20_DEPTHFUNC)
+#define VPC_ES20DEPTHMASK (VPG_ES20 + ES20_DEPTHMASK)
+#define VPC_ES20DEPTHRANGEF (VPG_ES20 + ES20_DEPTHRANGEF)
+#define VPC_ES20DETACHSHADER (VPG_ES20 + ES20_DETACHSHADER)
+#define VPC_ES20DISABLE (VPG_ES20 + ES20_DISABLE)
+#define VPC_ES20DISABLEVERTEXATTRIBARRAY (VPG_ES20 + ES20_DISABLEVERTEXATTRIBARRAY)
+#define VPC_ES20DRAWARRAYS (VPG_ES20 + ES20_DRAWARRAYS)
+#define VPC_ES20DRAWELEMENTS (VPG_ES20 + ES20_DRAWELEMENTS)
+#define VPC_ES20ENABLE (VPG_ES20 + ES20_ENABLE)
+#define VPC_ES20ENABLEVERTEXATTRIBARRAY (VPG_ES20 + ES20_ENABLEVERTEXATTRIBARRAY)
+#define VPC_ES20FINISH (VPG_ES20 + ES20_FINISH)
+#define VPC_ES20FLUSH (VPG_ES20 + ES20_FLUSH)
+#define VPC_ES20FRAMEBUFFERRENDERBUFFER (VPG_ES20 + ES20_FRAMEBUFFERRENDERBUFFER)
+#define VPC_ES20FRAMEBUFFERTEXTURE2D (VPG_ES20 + ES20_FRAMEBUFFERTEXTURE2D)
+#define VPC_ES20FRONTFACE (VPG_ES20 + ES20_FRONTFACE)
+#define VPC_ES20GENBUFFERS (VPG_ES20 + ES20_GENBUFFERS)
+#define VPC_ES20GENERATEMIPMAP (VPG_ES20 + ES20_GENERATEMIPMAP)
+#define VPC_ES20GENFRAMEBUFFERS (VPG_ES20 + ES20_GENFRAMEBUFFERS)
+#define VPC_ES20GENRENDERBUFFERS (VPG_ES20 + ES20_GENRENDERBUFFERS)
+#define VPC_ES20GENTEXTURES (VPG_ES20 + ES20_GENTEXTURES)
+#define VPC_ES20GETACTIVEATTRIB (VPG_ES20 + ES20_GETACTIVEATTRIB)
+#define VPC_ES20GETACTIVEUNIFORM (VPG_ES20 + ES20_GETACTIVEUNIFORM)
+#define VPC_ES20GETATTACHEDSHADERS (VPG_ES20 + ES20_GETATTACHEDSHADERS)
+#define VPC_ES20GETATTRIBLOCATION (VPG_ES20 + ES20_GETATTRIBLOCATION)
+#define VPC_ES20GETBOOLEANV (VPG_ES20 + ES20_GETBOOLEANV)
+#define VPC_ES20GETBUFFERPARAMETERIV (VPG_ES20 + ES20_GETBUFFERPARAMETERIV)
+#define VPC_ES20GETERROR (VPG_ES20 + ES20_GETERROR)
+#define VPC_ES20GETFLOATV (VPG_ES20 + ES20_GETFLOATV)
+#define VPC_ES20GETFRAMEBUFFERATTACHMENTPARAMETERIV (VPG_ES20 + ES20_GETFRAMEBUFFERATTACHMENTPARAMETERIV)
+#define VPC_ES20GETINTEGERV (VPG_ES20 + ES20_GETINTEGERV)
+#define VPC_ES20GETPROGRAMIV (VPG_ES20 + ES20_GETPROGRAMIV)
+#define VPC_ES20GETPROGRAMINFOLOG (VPG_ES20 + ES20_GETPROGRAMINFOLOG)
+#define VPC_ES20GETRENDERBUFFERPARAMETERIV (VPG_ES20 + ES20_GETRENDERBUFFERPARAMETERIV)
+#define VPC_ES20GETSHADERIV (VPG_ES20 + ES20_GETSHADERIV)
+#define VPC_ES20GETSHADERINFOLOG (VPG_ES20 + ES20_GETSHADERINFOLOG)
+#define VPC_ES20GETSHADERPRECISIONFORMAT (VPG_ES20 + ES20_GETSHADERPRECISIONFORMAT)
+#define VPC_ES20GETSHADERSOURCE (VPG_ES20 + ES20_GETSHADERSOURCE)
+#define VPC_ES20GETSTRING (VPG_ES20 + ES20_GETSTRING)
+#define VPC_ES20GETTEXPARAMETERFV (VPG_ES20 + ES20_GETTEXPARAMETERFV)
+#define VPC_ES20GETTEXPARAMETERIV (VPG_ES20 + ES20_GETTEXPARAMETERIV)
+#define VPC_ES20GETUNIFORMFV (VPG_ES20 + ES20_GETUNIFORMFV)
+#define VPC_ES20GETUNIFORMIV (VPG_ES20 + ES20_GETUNIFORMIV)
+#define VPC_ES20GETUNIFORMLOCATION (VPG_ES20 + ES20_GETUNIFORMLOCATION)
+#define VPC_ES20GETVERTEXATTRIBFV (VPG_ES20 + ES20_GETVERTEXATTRIBFV)
+#define VPC_ES20GETVERTEXATTRIBIV (VPG_ES20 + ES20_GETVERTEXATTRIBIV)
+#define VPC_ES20GETVERTEXATTRIBPOINTERV (VPG_ES20 + ES20_GETVERTEXATTRIBPOINTERV)
+#define VPC_ES20HINT (VPG_ES20 + ES20_HINT)
+#define VPC_ES20ISBUFFER (VPG_ES20 + ES20_ISBUFFER)
+#define VPC_ES20ISENABLED (VPG_ES20 + ES20_ISENABLED)
+#define VPC_ES20ISFRAMEBUFFER (VPG_ES20 + ES20_ISFRAMEBUFFER)
+#define VPC_ES20ISPROGRAM (VPG_ES20 + ES20_ISPROGRAM)
+#define VPC_ES20ISRENDERBUFFER (VPG_ES20 + ES20_ISRENDERBUFFER)
+#define VPC_ES20ISSHADER (VPG_ES20 + ES20_ISSHADER)
+#define VPC_ES20ISTEXTURE (VPG_ES20 + ES20_ISTEXTURE)
+#define VPC_ES20LINEWIDTH (VPG_ES20 + ES20_LINEWIDTH)
+#define VPC_ES20LINKPROGRAM (VPG_ES20 + ES20_LINKPROGRAM)
+#define VPC_ES20PIXELSTOREI (VPG_ES20 + ES20_PIXELSTOREI)
+#define VPC_ES20POLYGONOFFSET (VPG_ES20 + ES20_POLYGONOFFSET)
+#define VPC_ES20READPIXELS (VPG_ES20 + ES20_READPIXELS)
+#define VPC_ES20RELEASESHADERCOMPILER (VPG_ES20 + ES20_RELEASESHADERCOMPILER)
+#define VPC_ES20RENDERBUFFERSTORAGE (VPG_ES20 + ES20_RENDERBUFFERSTORAGE)
+#define VPC_ES20SAMPLECOVERAGE (VPG_ES20 + ES20_SAMPLECOVERAGE)
+#define VPC_ES20SCISSOR (VPG_ES20 + ES20_SCISSOR)
+#define VPC_ES20SHADERBINARY (VPG_ES20 + ES20_SHADERBINARY)
+#define VPC_ES20SHADERSOURCE (VPG_ES20 + ES20_SHADERSOURCE)
+#define VPC_ES20STENCILFUNC (VPG_ES20 + ES20_STENCILFUNC)
+#define VPC_ES20STENCILFUNCSEPARATE (VPG_ES20 + ES20_STENCILFUNCSEPARATE)
+#define VPC_ES20STENCILMASK (VPG_ES20 + ES20_STENCILMASK)
+#define VPC_ES20STENCILMASKSEPARATE (VPG_ES20 + ES20_STENCILMASKSEPARATE)
+#define VPC_ES20STENCILOP (VPG_ES20 + ES20_STENCILOP)
+#define VPC_ES20STENCILOPSEPARATE (VPG_ES20 + ES20_STENCILOPSEPARATE)
+#define VPC_ES20TEXIMAGE2D (VPG_ES20 + ES20_TEXIMAGE2D)
+#define VPC_ES20TEXPARAMETERF (VPG_ES20 + ES20_TEXPARAMETERF)
+#define VPC_ES20TEXPARAMETERFV (VPG_ES20 + ES20_TEXPARAMETERFV)
+#define VPC_ES20TEXPARAMETERI (VPG_ES20 + ES20_TEXPARAMETERI)
+#define VPC_ES20TEXPARAMETERIV (VPG_ES20 + ES20_TEXPARAMETERIV)
+#define VPC_ES20TEXSUBIMAGE2D (VPG_ES20 + ES20_TEXSUBIMAGE2D)
+#define VPC_ES20UNIFORM1F (VPG_ES20 + ES20_UNIFORM1F)
+#define VPC_ES20UNIFORM1FV (VPG_ES20 + ES20_UNIFORM1FV)
+#define VPC_ES20UNIFORM1I (VPG_ES20 + ES20_UNIFORM1I)
+#define VPC_ES20UNIFORM1IV (VPG_ES20 + ES20_UNIFORM1IV)
+#define VPC_ES20UNIFORM2F (VPG_ES20 + ES20_UNIFORM2F)
+#define VPC_ES20UNIFORM2FV (VPG_ES20 + ES20_UNIFORM2FV)
+#define VPC_ES20UNIFORM2I (VPG_ES20 + ES20_UNIFORM2I)
+#define VPC_ES20UNIFORM2IV (VPG_ES20 + ES20_UNIFORM2IV)
+#define VPC_ES20UNIFORM3F (VPG_ES20 + ES20_UNIFORM3F)
+#define VPC_ES20UNIFORM3FV (VPG_ES20 + ES20_UNIFORM3FV)
+#define VPC_ES20UNIFORM3I (VPG_ES20 + ES20_UNIFORM3I)
+#define VPC_ES20UNIFORM3IV (VPG_ES20 + ES20_UNIFORM3IV)
+#define VPC_ES20UNIFORM4F (VPG_ES20 + ES20_UNIFORM4F)
+#define VPC_ES20UNIFORM4FV (VPG_ES20 + ES20_UNIFORM4FV)
+#define VPC_ES20UNIFORM4I (VPG_ES20 + ES20_UNIFORM4I)
+#define VPC_ES20UNIFORM4IV (VPG_ES20 + ES20_UNIFORM4IV)
+#define VPC_ES20UNIFORMMATRIX2FV (VPG_ES20 + ES20_UNIFORMMATRIX2FV)
+#define VPC_ES20UNIFORMMATRIX3FV (VPG_ES20 + ES20_UNIFORMMATRIX3FV)
+#define VPC_ES20UNIFORMMATRIX4FV (VPG_ES20 + ES20_UNIFORMMATRIX4FV)
+#define VPC_ES20USEPROGRAM (VPG_ES20 + ES20_USEPROGRAM)
+#define VPC_ES20VALIDATEPROGRAM (VPG_ES20 + ES20_VALIDATEPROGRAM)
+#define VPC_ES20VERTEXATTRIB1F (VPG_ES20 + ES20_VERTEXATTRIB1F)
+#define VPC_ES20VERTEXATTRIB1FV (VPG_ES20 + ES20_VERTEXATTRIB1FV)
+#define VPC_ES20VERTEXATTRIB2F (VPG_ES20 + ES20_VERTEXATTRIB2F)
+#define VPC_ES20VERTEXATTRIB2FV (VPG_ES20 + ES20_VERTEXATTRIB2FV)
+#define VPC_ES20VERTEXATTRIB3F (VPG_ES20 + ES20_VERTEXATTRIB3F)
+#define VPC_ES20VERTEXATTRIB3FV (VPG_ES20 + ES20_VERTEXATTRIB3FV)
+#define VPC_ES20VERTEXATTRIB4F (VPG_ES20 + ES20_VERTEXATTRIB4F)
+#define VPC_ES20VERTEXATTRIB4FV (VPG_ES20 + ES20_VERTEXATTRIB4FV)
+#define VPC_ES20VERTEXATTRIBPOINTER (VPG_ES20 + ES20_VERTEXATTRIBPOINTER)
+#define VPC_ES20VIEWPORT (VPG_ES20 + ES20_VIEWPORT)
+/* OpenGL ES20 Statistics Counter IDs. */
+#define VPC_ES20CALLS (VPG_ES20 + ES20_CALLS)
+#define VPC_ES20DRAWCALLS (VPG_ES20 + ES20_DRAWCALLS)
+#define VPC_ES20STATECHANGECALLS (VPG_ES20 + ES20_STATECHANGECALLS)
+#define VPC_ES20POINTCOUNT (VPG_ES20 + ES20_POINTCOUNT)
+#define VPC_ES20LINECOUNT (VPG_ES20 + ES20_LINECOUNT)
+#define VPC_ES20TRIANGLECOUNT (VPG_ES20 + ES20_TRIANGLECOUNT)
+
+/* VG11 Counters. */
+#define VPC_VG11APPENDPATH (VPG_VG11 + VG11_APPENDPATH)
+#define VPC_VG11APPENDPATHDATA (VPG_VG11 + VG11_APPENDPATHDATA)
+#define VPC_VG11CHILDIMAGE (VPG_VG11 + VG11_CHILDIMAGE)
+#define VPC_VG11CLEAR (VPG_VG11 + VG11_CLEAR)
+#define VPC_VG11CLEARGLYPH (VPG_VG11 + VG11_CLEARGLYPH)
+#define VPC_VG11CLEARIMAGE (VPG_VG11 + VG11_CLEARIMAGE)
+#define VPC_VG11CLEARPATH (VPG_VG11 + VG11_CLEARPATH)
+#define VPC_VG11COLORMATRIX (VPG_VG11 + VG11_COLORMATRIX)
+#define VPC_VG11CONVOLVE (VPG_VG11 + VG11_CONVOLVE)
+#define VPC_VG11COPYIMAGE (VPG_VG11 + VG11_COPYIMAGE)
+#define VPC_VG11COPYMASK (VPG_VG11 + VG11_COPYMASK)
+#define VPC_VG11COPYPIXELS (VPG_VG11 + VG11_COPYPIXELS)
+#define VPC_VG11CREATEFONT (VPG_VG11 + VG11_CREATEFONT)
+#define VPC_VG11CREATEIMAGE (VPG_VG11 + VG11_CREATEIMAGE)
+#define VPC_VG11CREATEMASKLAYER (VPG_VG11 + VG11_CREATEMASKLAYER)
+#define VPC_VG11CREATEPAINT (VPG_VG11 + VG11_CREATEPAINT)
+#define VPC_VG11CREATEPATH (VPG_VG11 + VG11_CREATEPATH)
+#define VPC_VG11DESTROYFONT (VPG_VG11 + VG11_DESTROYFONT)
+#define VPC_VG11DESTROYIMAGE (VPG_VG11 + VG11_DESTROYIMAGE)
+#define VPC_VG11DESTROYMASKLAYER (VPG_VG11 + VG11_DESTROYMASKLAYER)
+#define VPC_VG11DESTROYPAINT (VPG_VG11 + VG11_DESTROYPAINT)
+#define VPC_VG11DESTROYPATH (VPG_VG11 + VG11_DESTROYPATH)
+#define VPC_VG11DRAWGLYPH (VPG_VG11 + VG11_DRAWGLYPH)
+#define VPC_VG11DRAWGLYPHS (VPG_VG11 + VG11_DRAWGLYPHS)
+#define VPC_VG11DRAWIMAGE (VPG_VG11 + VG11_DRAWIMAGE)
+#define VPC_VG11DRAWPATH (VPG_VG11 + VG11_DRAWPATH)
+#define VPC_VG11FILLMASKLAYER (VPG_VG11 + VG11_FILLMASKLAYER)
+#define VPC_VG11FINISH (VPG_VG11 + VG11_FINISH)
+#define VPC_VG11FLUSH (VPG_VG11 + VG11_FLUSH)
+#define VPC_VG11GAUSSIANBLUR (VPG_VG11 + VG11_GAUSSIANBLUR)
+#define VPC_VG11GETCOLOR (VPG_VG11 + VG11_GETCOLOR)
+#define VPC_VG11GETERROR (VPG_VG11 + VG11_GETERROR)
+#define VPC_VG11GETF (VPG_VG11 + VG11_GETF)
+#define VPC_VG11GETFV (VPG_VG11 + VG11_GETFV)
+#define VPC_VG11GETI (VPG_VG11 + VG11_GETI)
+#define VPC_VG11GETIMAGESUBDATA (VPG_VG11 + VG11_GETIMAGESUBDATA)
+#define VPC_VG11GETIV (VPG_VG11 + VG11_GETIV)
+#define VPC_VG11GETMATRIX (VPG_VG11 + VG11_GETMATRIX)
+#define VPC_VG11GETPAINT (VPG_VG11 + VG11_GETPAINT)
+#define VPC_VG11GETPARAMETERF (VPG_VG11 + VG11_GETPARAMETERF)
+#define VPC_VG11GETPARAMETERFV (VPG_VG11 + VG11_GETPARAMETERFV)
+#define VPC_VG11GETPARAMETERI (VPG_VG11 + VG11_GETPARAMETERI)
+#define VPC_VG11GETPARAMETERIV (VPG_VG11 + VG11_GETPARAMETERIV)
+#define VPC_VG11GETPARAMETERVECTORSIZE (VPG_VG11 + VG11_GETPARAMETERVECTORSIZE)
+#define VPC_VG11GETPARENT (VPG_VG11 + VG11_GETPARENT)
+#define VPC_VG11GETPATHCAPABILITIES (VPG_VG11 + VG11_GETPATHCAPABILITIES)
+#define VPC_VG11GETPIXELS (VPG_VG11 + VG11_GETPIXELS)
+#define VPC_VG11GETSTRING (VPG_VG11 + VG11_GETSTRING)
+#define VPC_VG11GETVECTORSIZE (VPG_VG11 + VG11_GETVECTORSIZE)
+#define VPC_VG11HARDWAREQUERY (VPG_VG11 + VG11_HARDWAREQUERY)
+#define VPC_VG11IMAGESUBDATA (VPG_VG11 + VG11_IMAGESUBDATA)
+#define VPC_VG11INTERPOLATEPATH (VPG_VG11 + VG11_INTERPOLATEPATH)
+#define VPC_VG11LOADIDENTITY (VPG_VG11 + VG11_LOADIDENTITY)
+#define VPC_VG11LOADMATRIX (VPG_VG11 + VG11_LOADMATRIX)
+#define VPC_VG11LOOKUP (VPG_VG11 + VG11_LOOKUP)
+#define VPC_VG11LOOKUPSINGLE (VPG_VG11 + VG11_LOOKUPSINGLE)
+#define VPC_VG11MASK (VPG_VG11 + VG11_MASK)
+#define VPC_VG11MODIFYPATHCOORDS (VPG_VG11 + VG11_MODIFYPATHCOORDS)
+#define VPC_VG11MULTMATRIX (VPG_VG11 + VG11_MULTMATRIX)
+#define VPC_VG11PAINTPATTERN (VPG_VG11 + VG11_PAINTPATTERN)
+#define VPC_VG11PATHBOUNDS (VPG_VG11 + VG11_PATHBOUNDS)
+#define VPC_VG11PATHLENGTH (VPG_VG11 + VG11_PATHLENGTH)
+#define VPC_VG11PATHTRANSFORMEDBOUNDS (VPG_VG11 + VG11_PATHTRANSFORMEDBOUNDS)
+#define VPC_VG11POINTALONGPATH (VPG_VG11 + VG11_POINTALONGPATH)
+#define VPC_VG11READPIXELS (VPG_VG11 + VG11_READPIXELS)
+#define VPC_VG11REMOVEPATHCAPABILITIES (VPG_VG11 + VG11_REMOVEPATHCAPABILITIES)
+#define VPC_VG11RENDERTOMASK (VPG_VG11 + VG11_RENDERTOMASK)
+#define VPC_VG11ROTATE (VPG_VG11 + VG11_ROTATE)
+#define VPC_VG11SCALE (VPG_VG11 + VG11_SCALE)
+#define VPC_VG11SEPARABLECONVOLVE (VPG_VG11 + VG11_SEPARABLECONVOLVE)
+#define VPC_VG11SETCOLOR (VPG_VG11 + VG11_SETCOLOR)
+#define VPC_VG11SETF (VPG_VG11 + VG11_SETF)
+#define VPC_VG11SETFV (VPG_VG11 + VG11_SETFV)
+#define VPC_VG11SETGLYPHTOIMAGE (VPG_VG11 + VG11_SETGLYPHTOIMAGE)
+#define VPC_VG11SETGLYPHTOPATH (VPG_VG11 + VG11_SETGLYPHTOPATH)
+#define VPC_VG11SETI (VPG_VG11 + VG11_SETI)
+#define VPC_VG11SETIV (VPG_VG11 + VG11_SETIV)
+#define VPC_VG11SETPAINT (VPG_VG11 + VG11_SETPAINT)
+#define VPC_VG11SETPARAMETERF (VPG_VG11 + VG11_SETPARAMETERF)
+#define VPC_VG11SETPARAMETERFV (VPG_VG11 + VG11_SETPARAMETERFV)
+#define VPC_VG11SETPARAMETERI (VPG_VG11 + VG11_SETPARAMETERI)
+#define VPC_VG11SETPARAMETERIV (VPG_VG11 + VG11_SETPARAMETERIV)
+#define VPC_VG11SETPIXELS (VPG_VG11 + VG11_SETPIXELS)
+#define VPC_VG11SHEAR (VPG_VG11 + VG11_SHEAR)
+#define VPC_VG11TRANSFORMPATH (VPG_VG11 + VG11_TRANSFORMPATH)
+#define VPC_VG11TRANSLATE (VPG_VG11 + VG11_TRANSLATE)
+#define VPC_VG11WRITEPIXELS (VPG_VG11 + VG11_WRITEPIXELS)
+/* OpenVG Statistics Counter IDs. */
+#define VPC_VG11CALLS (VPG_VG11 + VG11_CALLS)
+#define VPC_VG11DRAWCALLS (VPG_VG11 + VG11_DRAWCALLS)
+#define VPC_VG11STATECHANGECALLS (VPG_VG11 + VG11_STATECHANGECALLS)
+#define VPC_VG11FILLCOUNT (VPG_VG11 + VG11_FILLCOUNT)
+#define VPC_VG11STROKECOUNT (VPG_VG11 + VG11_STROKECOUNT)
+
+/* HAL Counters. */
+#define VPC_HALVERTBUFNEWBYTEALLOC (VPG_HAL + HAL_VERTBUFNEWBYTEALLOC)
+#define VPC_HALVERTBUFTOTALBYTEALLOC (VPG_HAL + HAL_VERTBUFTOTALBYTEALLOC)
+#define VPC_HALVERTBUFNEWOBJALLOC (VPG_HAL + HAL_VERTBUFNEWOBJALLOC)
+#define VPC_HALVERTBUFTOTALOBJALLOC (VPG_HAL + HAL_VERTBUFTOTALOBJALLOC)
+#define VPC_HALINDBUFNEWBYTEALLOC (VPG_HAL + HAL_INDBUFNEWBYTEALLOC)
+#define VPC_HALINDBUFTOTALBYTEALLOC (VPG_HAL + HAL_INDBUFTOTALBYTEALLOC)
+#define VPC_HALINDBUFNEWOBJALLOC (VPG_HAL + HAL_INDBUFNEWOBJALLOC)
+#define VPC_HALINDBUFTOTALOBJALLOC (VPG_HAL + HAL_INDBUFTOTALOBJALLOC)
+#define VPC_HALTEXBUFNEWBYTEALLOC (VPG_HAL + HAL_TEXBUFNEWBYTEALLOC)
+#define VPC_HALTEXBUFTOTALBYTEALLOC (VPG_HAL + HAL_TEXBUFTOTALBYTEALLOC)
+#define VPC_HALTEXBUFNEWOBJALLOC (VPG_HAL + HAL_TEXBUFNEWOBJALLOC)
+#define VPC_HALTEXBUFTOTALOBJALLOC (VPG_HAL + HAL_TEXBUFTOTALOBJALLOC)
+
+/* HW: GPU Counters. */
+#define VPC_GPUCYCLES (VPG_GPU + GPU_CYCLES)
+#define VPC_GPUREAD64BYTE (VPG_GPU + GPU_READ64BYTE)
+#define VPC_GPUWRITE64BYTE (VPG_GPU + GPU_WRITE64BYTE)
+
+/* HW: Shader Counters. */
+#define VPC_VSINSTCOUNT (VPG_VS + VS_INSTCOUNT)
+#define VPC_VSBRANCHINSTCOUNT (VPG_VS + VS_BRANCHINSTCOUNT)
+#define VPC_VSTEXLDINSTCOUNT (VPG_VS + VS_TEXLDINSTCOUNT)
+#define VPC_VSRENDEREDVERTCOUNT (VPG_VS + VS_RENDEREDVERTCOUNT)
+/* HW: PS Count. */
+#define VPC_PSINSTCOUNT (VPG_PS + PS_INSTCOUNT)
+#define VPC_PSBRANCHINSTCOUNT (VPG_PS + PS_BRANCHINSTCOUNT)
+#define VPC_PSTEXLDINSTCOUNT (VPG_PS + PS_TEXLDINSTCOUNT)
+#define VPC_PSRENDEREDPIXCOUNT (VPG_PS + PS_RENDEREDPIXCOUNT)
+
+
+/* HW: PA Counters. */
+#define VPC_PAINVERTCOUNT (VPG_PA + PA_INVERTCOUNT)
+#define VPC_PAINPRIMCOUNT (VPG_PA + PA_INPRIMCOUNT)
+#define VPC_PAOUTPRIMCOUNT (VPG_PA + PA_OUTPRIMCOUNT)
+#define VPC_PADEPTHCLIPCOUNT (VPG_PA + PA_DEPTHCLIPCOUNT)
+#define VPC_PATRIVIALREJCOUNT (VPG_PA + PA_TRIVIALREJCOUNT)
+#define VPC_PACULLCOUNT (VPG_PA + PA_CULLCOUNT)
+
+/* HW: Setup Counters. */
+#define VPC_SETRIANGLECOUNT (VPG_SETUP + SE_TRIANGLECOUNT)
+#define VPC_SELINECOUNT (VPG_SETUP + SE_LINECOUNT)
+
+/* HW: RA Counters. */
+#define VPC_RAVALIDPIXCOUNT (VPG_RA + RA_VALIDPIXCOUNT)
+#define VPC_RATOTALQUADCOUNT (VPG_RA + RA_TOTALQUADCOUNT)
+#define VPC_RAVALIDQUADCOUNTEZ (VPG_RA + RA_VALIDQUADCOUNTEZ)
+#define VPC_RATOTALPRIMCOUNT (VPG_RA + RA_TOTALPRIMCOUNT)
+#define VPC_RAPIPECACHEMISSCOUNT (VPG_RA + RA_PIPECACHEMISSCOUNT)
+#define VPC_RAPREFCACHEMISSCOUNT (VPG_RA + RA_PREFCACHEMISSCOUNT)
+#define VPC_RAEEZCULLCOUNT (VPG_RA + RA_EEZCULLCOUNT)
+
+/* HW: TEX Counters. */
+#define VPC_TXTOTBILINEARREQ (VPG_TX + TX_TOTBILINEARREQ)
+#define VPC_TXTOTTRILINEARREQ (VPG_TX + TX_TOTTRILINEARREQ)
+#define VPC_TXTOTDISCARDTEXREQ (VPG_TX + TX_TOTDISCARDTEXREQ)
+#define VPC_TXTOTTEXREQ (VPG_TX + TX_TOTTEXREQ)
+#define VPC_TXMEMREADCOUNT (VPG_TX + TX_MEMREADCOUNT)
+#define VPC_TXMEMREADIN8BCOUNT (VPG_TX + TX_MEMREADIN8BCOUNT)
+#define VPC_TXCACHEMISSCOUNT (VPG_TX + TX_CACHEMISSCOUNT)
+#define VPC_TXCACHEHITTEXELCOUNT (VPG_TX + TX_CACHEHITTEXELCOUNT)
+#define VPC_TXCACHEMISSTEXELCOUNT (VPG_TX + TX_CACHEMISSTEXELCOUNT)
+
+/* HW: PE Counters. */
+#define VPC_PEKILLEDBYCOLOR (VPG_PE + PE_KILLEDBYCOLOR)
+#define VPC_PEKILLEDBYDEPTH (VPG_PE + PE_KILLEDBYDEPTH)
+#define VPC_PEDRAWNBYCOLOR (VPG_PE + PE_DRAWNBYCOLOR)
+#define VPC_PEDRAWNBYDEPTH (VPG_PE + PE_DRAWNBYDEPTH)
+
+/* HW: MC Counters. */
+#define VPC_MCREADREQ8BPIPE (VPG_MC + MC_READREQ8BPIPE)
+#define VPC_MCREADREQ8BIP (VPG_MC + MC_READREQ8BIP)
+#define VPC_MCWRITEREQ8BPIPE (VPG_MC + MC_WRITEREQ8BPIPE)
+
+/* HW: AXI Counters. */
+#define VPC_AXIREADREQSTALLED (VPG_AXI + AXI_READREQSTALLED)
+#define VPC_AXIWRITEREQSTALLED (VPG_AXI + AXI_WRITEREQSTALLED)
+#define VPC_AXIWRITEDATASTALLED (VPG_AXI + AXI_WRITEDATASTALLED)
+
+/* PROGRAM: Shader program counters. */
+#define VPC_PVSINSTRCOUNT (VPG_PVS + PVS_INSTRCOUNT)
+#define VPC_PVSALUINSTRCOUNT (VPG_PVS + PVS_ALUINSTRCOUNT)
+#define VPC_PVSTEXINSTRCOUNT (VPG_PVS + PVS_TEXINSTRCOUNT)
+#define VPC_PVSATTRIBCOUNT (VPG_PVS + PVS_ATTRIBCOUNT)
+#define VPC_PVSUNIFORMCOUNT (VPG_PVS + PVS_UNIFORMCOUNT)
+#define VPC_PVSFUNCTIONCOUNT (VPG_PVS + PVS_FUNCTIONCOUNT)
+
+#define VPC_PPSINSTRCOUNT (VPG_PPS + PPS_INSTRCOUNT)
+#define VPC_PPSALUINSTRCOUNT (VPG_PPS + PPS_ALUINSTRCOUNT)
+#define VPC_PPSTEXINSTRCOUNT (VPG_PPS + PPS_TEXINSTRCOUNT)
+#define VPC_PPSATTRIBCOUNT (VPG_PPS + PPS_ATTRIBCOUNT)
+#define VPC_PPSUNIFORMCOUNT (VPG_PPS + PPS_UNIFORMCOUNT)
+#define VPC_PPSFUNCTIONCOUNT (VPG_PPS + PPS_FUNCTIONCOUNT)
+
+#endif
+
+
+/* HW profile information. */
+typedef struct _gcsPROFILER_COUNTERS
+{
+ /* HW static counters. */
+ gctUINT32 gpuClock;
+ gctUINT32 axiClock;
+ gctUINT32 shaderClock;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuClockStart;
+ gctUINT32 gpuClockEnd;
+
+ /* HW vairable counters. */
+ gctUINT32 gpuCyclesCounter;
+ gctUINT32 gpuTotalRead64BytesPerFrame;
+ gctUINT32 gpuTotalWrite64BytesPerFrame;
+
+ /* PE */
+ gctUINT32 pe_pixel_count_killed_by_color_pipe;
+ gctUINT32 pe_pixel_count_killed_by_depth_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_color_pipe;
+ gctUINT32 pe_pixel_count_drawn_by_depth_pipe;
+
+ /* SH */
+ gctUINT32 ps_inst_counter;
+ gctUINT32 rendered_pixel_counter;
+ gctUINT32 vs_inst_counter;
+ gctUINT32 rendered_vertice_counter;
+ gctUINT32 vtx_branch_inst_counter;
+ gctUINT32 vtx_texld_inst_counter;
+ gctUINT32 pxl_branch_inst_counter;
+ gctUINT32 pxl_texld_inst_counter;
+
+ /* PA */
+ gctUINT32 pa_input_vtx_counter;
+ gctUINT32 pa_input_prim_counter;
+ gctUINT32 pa_output_prim_counter;
+ gctUINT32 pa_depth_clipped_counter;
+ gctUINT32 pa_trivial_rejected_counter;
+ gctUINT32 pa_culled_counter;
+
+ /* SE */
+ gctUINT32 se_culled_triangle_count;
+ gctUINT32 se_culled_lines_count;
+
+ /* RA */
+ gctUINT32 ra_valid_pixel_count;
+ gctUINT32 ra_total_quad_count;
+ gctUINT32 ra_valid_quad_count_after_early_z;
+ gctUINT32 ra_total_primitive_count;
+ gctUINT32 ra_pipe_cache_miss_counter;
+ gctUINT32 ra_prefetch_cache_miss_counter;
+ gctUINT32 ra_eez_culled_counter;
+
+ /* TX */
+ gctUINT32 tx_total_bilinear_requests;
+ gctUINT32 tx_total_trilinear_requests;
+ gctUINT32 tx_total_discarded_texture_requests;
+ gctUINT32 tx_total_texture_requests;
+ gctUINT32 tx_mem_read_count;
+ gctUINT32 tx_mem_read_in_8B_count;
+ gctUINT32 tx_cache_miss_count;
+ gctUINT32 tx_cache_hit_texel_count;
+ gctUINT32 tx_cache_miss_texel_count;
+
+ /* MC */
+ gctUINT32 mc_total_read_req_8B_from_pipeline;
+ gctUINT32 mc_total_read_req_8B_from_IP;
+ gctUINT32 mc_total_write_req_8B_from_pipeline;
+
+ /* HI */
+ gctUINT32 hi_axi_cycles_read_request_stalled;
+ gctUINT32 hi_axi_cycles_write_request_stalled;
+ gctUINT32 hi_axi_cycles_write_data_stalled;
+}
+gcsPROFILER_COUNTERS;
+
+/* HAL profile information. */
+typedef struct _gcsPROFILER
+{
+ gctUINT32 enable;
+ gctBOOL enableHal;
+ gctBOOL enableHW;
+ gctBOOL enableSH;
+
+ gctBOOL useSocket;
+ gctINT sockFd;
+
+ gctFILE file;
+
+ /* Aggregate Information */
+
+ /* Clock Info */
+ gctUINT64 frameStart;
+ gctUINT64 frameEnd;
+
+ /* Current frame information */
+ gctUINT32 frameNumber;
+ gctUINT64 frameStartTimeusec;
+ gctUINT64 frameEndTimeusec;
+ gctUINT64 frameStartCPUTimeusec;
+ gctUINT64 frameEndCPUTimeusec;
+
+#if PROFILE_HAL_COUNTERS
+ gctUINT32 vertexBufferTotalBytesAlloc;
+ gctUINT32 vertexBufferNewBytesAlloc;
+ int vertexBufferTotalObjectsAlloc;
+ int vertexBufferNewObjectsAlloc;
+
+ gctUINT32 indexBufferTotalBytesAlloc;
+ gctUINT32 indexBufferNewBytesAlloc;
+ int indexBufferTotalObjectsAlloc;
+ int indexBufferNewObjectsAlloc;
+
+ gctUINT32 textureBufferTotalBytesAlloc;
+ gctUINT32 textureBufferNewBytesAlloc;
+ int textureBufferTotalObjectsAlloc;
+ int textureBufferNewObjectsAlloc;
+
+ gctUINT32 numCommits;
+ gctUINT32 drawPointCount;
+ gctUINT32 drawLineCount;
+ gctUINT32 drawTriangleCount;
+ gctUINT32 drawVertexCount;
+ gctUINT32 redundantStateChangeCalls;
+#endif
+
+ gctUINT32 prevVSInstCount;
+ gctUINT32 prevVSBranchInstCount;
+ gctUINT32 prevVSTexInstCount;
+ gctUINT32 prevVSVertexCount;
+ gctUINT32 prevPSInstCount;
+ gctUINT32 prevPSBranchInstCount;
+ gctUINT32 prevPSTexInstCount;
+ gctUINT32 prevPSPixelCount;
+
+}
+gcsPROFILER;
+
+/* Memory profile information. */
+struct _gcsMemProfile
+{
+ /* Memory Usage */
+ gctUINT32 videoMemUsed;
+ gctUINT32 systemMemUsed;
+ gctUINT32 commitBufferSize;
+ gctUINT32 contextBufferCopyBytes;
+};
+
+/* Shader profile information. */
+struct _gcsSHADER_PROFILER
+{
+ gctUINT32 shaderLength;
+ gctUINT32 shaderALUCycles;
+ gctUINT32 shaderTexLoadCycles;
+ gctUINT32 shaderTempRegCount;
+ gctUINT32 shaderSamplerRegCount;
+ gctUINT32 shaderInputRegCount;
+ gctUINT32 shaderOutputRegCount;
+};
+
+/* Initialize the gcsProfiler. */
+gceSTATUS
+gcoPROFILER_Initialize(
+ IN gcoHAL Hal
+ );
+
+/* Destroy the gcProfiler. */
+gceSTATUS
+gcoPROFILER_Destroy(
+ IN gcoHAL Hal
+ );
+
+/* Write data to profiler. */
+gceSTATUS
+gcoPROFILER_Write(
+ IN gcoHAL Hal,
+ IN gctSIZE_T ByteCount,
+ IN gctCONST_POINTER Data
+ );
+
+/* Flush data out. */
+gceSTATUS
+gcoPROFILER_Flush(
+ IN gcoHAL Hal
+ );
+
+/* Call to signal end of frame. */
+gceSTATUS
+gcoPROFILER_EndFrame(
+ IN gcoHAL Hal
+ );
+
+/* Increase profile counter Enum by Value. */
+gceSTATUS
+gcoPROFILER_Count(
+ IN gcoHAL Hal,
+ IN gctUINT32 Enum,
+ IN gctINT Value
+ );
+
+/* Profile input vertex shader. */
+gceSTATUS
+gcoPROFILER_ShaderVS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Vs
+ );
+
+/* Profile input fragment shader. */
+gceSTATUS
+gcoPROFILER_ShaderFS(
+ IN gcoHAL Hal,
+ IN gctPOINTER Fs
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_profiler_h_ */
diff --git a/src/include_v4/gc_hal_raster.h b/src/include_v4/gc_hal_raster.h
new file mode 100644
index 0000000..c303462
--- /dev/null
+++ b/src/include_v4/gc_hal_raster.h
@@ -0,0 +1,933 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_raster_h_
+#define __gc_hal_raster_h_
+
+#include "gc_hal_enum.h"
+#include "gc_hal_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef struct _gcoBRUSH * gcoBRUSH;
+typedef struct _gcoBRUSH_CACHE * gcoBRUSH_CACHE;
+
+/******************************************************************************\
+******************************** gcoBRUSH Object *******************************
+\******************************************************************************/
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructSingleColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructMonochrome(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_ConstructColor(
+ IN gcoHAL Hal,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Destroy an gcoBRUSH object. */
+gceSTATUS
+gcoBRUSH_Destroy(
+ IN gcoBRUSH Brush
+ );
+
+/******************************************************************************\
+******************************** gcoSURF Object *******************************
+\******************************************************************************/
+
+/* Set cipping rectangle. */
+gceSTATUS
+gcoSURF_SetClipping(
+ IN gcoSURF Surface
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gcoSURF_Clear2D(
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 LoColor,
+ IN gctUINT32 HiColor
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gcoSURF_Line(
+ IN gcoSURF Surface,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop
+ );
+
+/* Generic rectangular blit. */
+gceSTATUS
+gcoSURF_Blit(
+ IN OPTIONAL gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gctUINT32 RectCount,
+ IN OPTIONAL gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN OPTIONAL gceSURF_TRANSPARENCY Transparency,
+ IN OPTIONAL gctUINT32 TransparencyColor,
+ IN OPTIONAL gctPOINTER Mask,
+ IN OPTIONAL gceSURF_MONOPACK MaskPack
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gcoSURF_MonoBlit(
+ IN gcoSURF DestSurface,
+ IN gctPOINTER Source,
+ IN gceSURF_MONOPACK SourcePack,
+ IN gcsPOINT_PTR SourceSize,
+ IN gcsPOINT_PTR SourceOrigin,
+ IN gcsRECT_PTR DestRect,
+ IN OPTIONAL gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Filter blit. */
+gceSTATUS
+gcoSURF_FilterBlit(
+ IN gcoSURF SrcSurface,
+ IN gcoSURF DestSurface,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gcoSURF_EnableAlphaBlend(
+ IN gcoSURF Surface,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gcoSURF_DisableAlphaBlend(
+ IN gcoSURF Surface
+ );
+
+/* Copy a rectangular area with format conversion. */
+gceSTATUS
+gcoSURF_CopyPixels(
+ IN gcoSURF Source,
+ IN gcoSURF Target,
+ IN gctINT SourceX,
+ IN gctINT SourceY,
+ IN gctINT TargetX,
+ IN gctINT TargetY,
+ IN gctINT Width,
+ IN gctINT Height
+ );
+
+/* Read surface pixel. */
+gceSTATUS
+gcoSURF_ReadPixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ OUT gctPOINTER PixelValue
+ );
+
+/* Write surface pixel. */
+gceSTATUS
+gcoSURF_WritePixel(
+ IN gcoSURF Surface,
+ IN gctPOINTER Memory,
+ IN gctINT X,
+ IN gctINT Y,
+ IN gceSURF_FORMAT Format,
+ IN gctPOINTER PixelValue
+ );
+
+gceSTATUS
+gcoSURF_SetDither(
+ IN gcoSURF Surface,
+ IN gctBOOL Dither
+ );
+/******************************************************************************\
+********************************** gco2D Object *********************************
+\******************************************************************************/
+
+/* Construct a new gco2D object. */
+gceSTATUS
+gco2D_Construct(
+ IN gcoHAL Hal,
+ OUT gco2D * Hardware
+ );
+
+/* Destroy an gco2D object. */
+gceSTATUS
+gco2D_Destroy(
+ IN gco2D Hardware
+ );
+
+/* Sets the maximum number of brushes in the brush cache. */
+gceSTATUS
+gco2D_SetBrushLimit(
+ IN gco2D Hardware,
+ IN gctUINT MaxCount
+ );
+
+/* Flush the brush. */
+gceSTATUS
+gco2D_FlushBrush(
+ IN gco2D Engine,
+ IN gcoBRUSH Brush,
+ IN gceSURF_FORMAT Format
+ );
+
+/* Program the specified solid color brush. */
+gceSTATUS
+gco2D_LoadSolidBrush(
+ IN gco2D Engine,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask
+ );
+
+gceSTATUS
+gco2D_LoadMonochromeBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask
+ );
+
+gceSTATUS
+gco2D_LoadColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask
+ );
+
+/* Configure monochrome source. */
+gceSTATUS
+gco2D_SetMonochromeSource(
+ IN gco2D Engine,
+ IN gctBOOL ColorConvert,
+ IN gctUINT8 MonoTransparency,
+ IN gceSURF_MONOPACK DataPack,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source extension for full rotation. */
+gceSTATUS
+gco2D_SetColorSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_TRANSPARENCY Transparency,
+ IN gctUINT32 TransparencyColor
+ );
+
+/* Configure color source. */
+gceSTATUS
+gco2D_SetColorSourceAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctBOOL CoordRelative
+ );
+
+gceSTATUS
+gco2D_SetColorSourceN(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight,
+ IN gctUINT32 SurfaceNumber
+ );
+
+/* Configure masked color source. */
+gceSTATUS
+gco2D_SetMaskedSource(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack
+ );
+
+/* Configure masked color source extension for full rotation. */
+gceSTATUS
+gco2D_SetMaskedSourceEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_FORMAT Format,
+ IN gctBOOL CoordRelative,
+ IN gceSURF_MONOPACK MaskPack,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Setup the source rectangle. */
+gceSTATUS
+gco2D_SetSource(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect
+ );
+
+/* Set clipping rectangle. */
+gceSTATUS
+gco2D_SetClipping(
+ IN gco2D Engine,
+ IN gcsRECT_PTR Rect
+ );
+
+/* Configure destination. */
+gceSTATUS
+gco2D_SetTarget(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth
+ );
+
+/* Configure destination extension for full rotation. */
+gceSTATUS
+gco2D_SetTargetEx(
+ IN gco2D Engine,
+ IN gctUINT32 Address,
+ IN gctUINT32 Stride,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+ );
+
+/* Calculate and program the stretch factors. */
+gceSTATUS
+gco2D_SetStretchFactors(
+ IN gco2D Engine,
+ IN gctUINT32 HorFactor,
+ IN gctUINT32 VerFactor
+ );
+
+/* Calculate and program the stretch factors based on the rectangles. */
+gceSTATUS
+gco2D_SetStretchRectFactors(
+ IN gco2D Engine,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect
+ );
+
+/* Create a new solid color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructSingleColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 Color,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a new monochrome gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructMonochromeBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctUINT32 ColorConvert,
+ IN gctUINT32 FgColor,
+ IN gctUINT32 BgColor,
+ IN gctUINT64 Bits,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Create a color gcoBRUSH object. */
+gceSTATUS
+gco2D_ConstructColorBrush(
+ IN gco2D Engine,
+ IN gctUINT32 OriginX,
+ IN gctUINT32 OriginY,
+ IN gctPOINTER Address,
+ IN gceSURF_FORMAT Format,
+ IN gctUINT64 Mask,
+ gcoBRUSH * Brush
+ );
+
+/* Clear one or more rectangular areas. */
+gceSTATUS
+gco2D_Clear(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines. */
+gceSTATUS
+gco2D_Line(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gcoBRUSH Brush,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Draw one or more Bresenham lines based on the 32-bit color. */
+gceSTATUS
+gco2D_ColorLine(
+ IN gco2D Engine,
+ IN gctUINT32 LineCount,
+ IN gcsRECT_PTR Position,
+ IN gctUINT32 Color32,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Generic blit. */
+gceSTATUS
+gco2D_Blit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+gceSTATUS
+gco2D_Blend(
+ IN gco2D Engine,
+ IN gctUINT32 SrcCount,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Batch blit. */
+gceSTATUS
+gco2D_BatchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR SrcRect,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Stretch blit. */
+gceSTATUS
+gco2D_StretchBlit(
+ IN gco2D Engine,
+ IN gctUINT32 RectCount,
+ IN gcsRECT_PTR Rect,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Monochrome blit. */
+gceSTATUS
+gco2D_MonoBlit(
+ IN gco2D Engine,
+ IN gctPOINTER StreamBits,
+ IN gcsPOINT_PTR StreamSize,
+ IN gcsRECT_PTR StreamRect,
+ IN gceSURF_MONOPACK SrcStreamPack,
+ IN gceSURF_MONOPACK DestStreamPack,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 FgRop,
+ IN gctUINT32 BgRop,
+ IN gceSURF_FORMAT DestFormat
+ );
+
+/* Set kernel size. */
+gceSTATUS
+gco2D_SetKernelSize(
+ IN gco2D Engine,
+ IN gctUINT8 HorKernelSize,
+ IN gctUINT8 VerKernelSize
+ );
+
+/* Set filter type. */
+gceSTATUS
+gco2D_SetFilterType(
+ IN gco2D Engine,
+ IN gceFILTER_TYPE FilterType
+ );
+
+/* Set the filter kernel by user. */
+gceSTATUS
+gco2D_SetUserFilterKernel(
+ IN gco2D Engine,
+ IN gceFILTER_PASS_TYPE PassType,
+ IN gctUINT16_PTR KernelArray
+ );
+
+/* Select the pass(es) to be done for user defined filter. */
+gceSTATUS
+gco2D_EnableUserFilterPasses(
+ IN gco2D Engine,
+ IN gctBOOL HorPass,
+ IN gctBOOL VerPass
+ );
+
+/* Frees the temporary buffer allocated by filter blit operation. */
+gceSTATUS
+gco2D_FreeFilterBuffer(
+ IN gco2D Engine
+ );
+
+/* Filter blit. */
+gceSTATUS
+gco2D_FilterBlit(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Filter blit extension for full rotation. */
+gceSTATUS
+gco2D_FilterBlitEx(
+ IN gco2D Engine,
+ IN gctUINT32 SrcAddress,
+ IN gctUINT SrcStride,
+ IN gctUINT32 SrcUAddress,
+ IN gctUINT SrcUStride,
+ IN gctUINT32 SrcVAddress,
+ IN gctUINT SrcVStride,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gctUINT32 SrcSurfaceHeight,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32 DestAddress,
+ IN gctUINT DestStride,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gctUINT32 DestSurfaceHeight,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+gceSTATUS
+gco2D_FilterBlitEx2(
+ IN gco2D Engine,
+ IN gctUINT32_PTR SrcAddresses,
+ IN gctUINT32 SrcAddressNum,
+ IN gctUINT32_PTR SrcStrides,
+ IN gctUINT32 SrcStrideNum,
+ IN gceTILING SrcTiling,
+ IN gceSURF_FORMAT SrcFormat,
+ IN gceSURF_ROTATION SrcRotation,
+ IN gctUINT32 SrcSurfaceWidth,
+ IN gctUINT32 SrcSurfaceHeight,
+ IN gcsRECT_PTR SrcRect,
+ IN gctUINT32_PTR DestAddresses,
+ IN gctUINT32 DestAddressNum,
+ IN gctUINT32_PTR DestStrides,
+ IN gctUINT32 DestStrideNum,
+ IN gceTILING DestTiling,
+ IN gceSURF_FORMAT DestFormat,
+ IN gceSURF_ROTATION DestRotation,
+ IN gctUINT32 DestSurfaceWidth,
+ IN gctUINT32 DestSurfaceHeight,
+ IN gcsRECT_PTR DestRect,
+ IN gcsRECT_PTR DestSubRect
+ );
+
+/* Enable alpha blending engine in the hardware and disengage the ROP engine. */
+gceSTATUS
+gco2D_EnableAlphaBlend(
+ IN gco2D Engine,
+ IN gctUINT8 SrcGlobalAlphaValue,
+ IN gctUINT8 DstGlobalAlphaValue,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode,
+ IN gceSURF_PIXEL_COLOR_MODE SrcColorMode,
+ IN gceSURF_PIXEL_COLOR_MODE DstColorMode
+ );
+
+/* Enable alpha blending engine in the hardware. */
+gceSTATUS
+gco2D_EnableAlphaBlendAdvanced(
+ IN gco2D Engine,
+ IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode,
+ IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode,
+ IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode,
+ IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode,
+ IN gceSURF_BLEND_FACTOR_MODE DstFactorMode
+ );
+
+/* Enable alpha blending engine with Porter Duff rule. */
+gceSTATUS
+gco2D_SetPorterDuffBlending(
+ IN gco2D Engine,
+ IN gce2D_PORTER_DUFF_RULE Rule
+ );
+
+/* Disable alpha blending engine in the hardware and engage the ROP engine. */
+gceSTATUS
+gco2D_DisableAlphaBlend(
+ IN gco2D Engine
+ );
+
+/* Retrieve the maximum number of 32-bit data chunks for a single DE command. */
+gctUINT32
+gco2D_GetMaximumDataCount(
+ void
+ );
+
+/* Retrieve the maximum number of rectangles, that can be passed in a single DE command. */
+gctUINT32
+gco2D_GetMaximumRectCount(
+ void
+ );
+
+/* Returns the pixel alignment of the surface. */
+gceSTATUS
+gco2D_GetPixelAlignment(
+ gceSURF_FORMAT Format,
+ gcsPOINT_PTR Alignment
+ );
+
+/* Retrieve monochrome stream pack size. */
+gceSTATUS
+gco2D_GetPackSize(
+ IN gceSURF_MONOPACK StreamPack,
+ OUT gctUINT32 * PackWidth,
+ OUT gctUINT32 * PackHeight
+ );
+
+/* Flush the 2D pipeline. */
+gceSTATUS
+gco2D_Flush(
+ IN gco2D Engine
+ );
+
+/* Load 256-entry color table for INDEX8 source surfaces. */
+gceSTATUS
+gco2D_LoadPalette(
+ IN gco2D Engine,
+ IN gctUINT FirstIndex,
+ IN gctUINT IndexCount,
+ IN gctPOINTER ColorTable,
+ IN gctBOOL ColorConvert
+ );
+
+/* Enable/disable 2D BitBlt mirrorring. */
+gceSTATUS
+gco2D_SetBitBlitMirror(
+ IN gco2D Engine,
+ IN gctBOOL HorizontalMirror,
+ IN gctBOOL VerticalMirror
+ );
+
+/*
+ * Set the transparency for source, destination and pattern.
+ * It also enable or disable the DFB color key mode.
+ */
+gceSTATUS
+gco2D_SetTransparencyAdvancedEx(
+ IN gco2D Engine,
+ IN gce2D_TRANSPARENCY SrcTransparency,
+ IN gce2D_TRANSPARENCY DstTransparency,
+ IN gce2D_TRANSPARENCY PatTransparency,
+ IN gctBOOL EnableDFBColorKeyMode
+ );
+
+/* Set the transparency for source, destination and pattern. */
+gceSTATUS
+gco2D_SetTransparencyAdvanced(
+ IN gco2D Engine,
+ IN gce2D_TRANSPARENCY SrcTransparency,
+ IN gce2D_TRANSPARENCY DstTransparency,
+ IN gce2D_TRANSPARENCY PatTransparency
+ );
+
+/* Set the source color key. */
+gceSTATUS
+gco2D_SetSourceColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the source color key range. */
+gceSTATUS
+gco2D_SetSourceColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the target color key. */
+gceSTATUS
+gco2D_SetTargetColorKeyAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKey
+ );
+
+/* Set the target color key range. */
+gceSTATUS
+gco2D_SetTargetColorKeyRangeAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 ColorKeyLow,
+ IN gctUINT32 ColorKeyHigh
+ );
+
+/* Set the YUV color space mode. */
+gceSTATUS
+gco2D_SetYUVColorMode(
+ IN gco2D Engine,
+ IN gce2D_YUV_COLOR_MODE Mode
+ );
+
+/* Setup the source global color value in ARGB8 format. */
+gceSTATUS gco2D_SetSourceGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the target global color value in ARGB8 format. */
+gceSTATUS gco2D_SetTargetGlobalColorAdvanced(
+ IN gco2D Engine,
+ IN gctUINT32 Color32
+ );
+
+/* Setup the source and target pixel multiply modes. */
+gceSTATUS
+gco2D_SetPixelMultiplyModeAdvanced(
+ IN gco2D Engine,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE SrcPremultiplySrcAlpha,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstPremultiplyDstAlpha,
+ IN gce2D_GLOBAL_COLOR_MULTIPLY_MODE SrcPremultiplyGlobalMode,
+ IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstDemultiplyDstAlpha
+ );
+
+/* Set the GPU clock cycles after which the idle engine will keep auto-flushing. */
+gceSTATUS
+gco2D_SetAutoFlushCycles(
+ IN gco2D Engine,
+ IN gctUINT32 Cycles
+ );
+
+#if VIVANTE_PROFILER
+/* Read the profile registers available in the 2D engine and sets them in the profile.
+ The function will also reset the pixelsRendered counter every time.
+*/
+gceSTATUS
+gco2D_ProfileEngine(
+ IN gco2D Engine,
+ OPTIONAL gcs2D_PROFILE_PTR Profile
+ );
+#endif
+
+/* Enable or disable 2D dithering. */
+gceSTATUS
+gco2D_EnableDither(
+ IN gco2D Engine,
+ IN gctBOOL Enable
+ );
+
+gceSTATUS
+gco2D_SetGenericSource(
+ IN gco2D Engine,
+ IN gctUINT32_PTR Addresses,
+ IN gctUINT32 AddressNum,
+ IN gctUINT32_PTR Strides,
+ IN gctUINT32 StrideNum,
+ IN gceTILING Tiling,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+);
+
+gceSTATUS
+gco2D_SetGenericTarget(
+ IN gco2D Engine,
+ IN gctUINT32_PTR Addresses,
+ IN gctUINT32 AddressNum,
+ IN gctUINT32_PTR Strides,
+ IN gctUINT32 StrideNum,
+ IN gceTILING Tiling,
+ IN gceSURF_FORMAT Format,
+ IN gceSURF_ROTATION Rotation,
+ IN gctUINT32 SurfaceWidth,
+ IN gctUINT32 SurfaceHeight
+);
+
+gceSTATUS
+gco2D_SetCurrentSourceIndex(
+ IN gco2D Engine,
+ IN gctUINT32 SrcIndex
+ );
+
+gceSTATUS
+gco2D_MultiSourceBlit(
+ IN gco2D Engine,
+ IN gctUINT32 SourceMask,
+ IN gcsRECT_PTR DestRect,
+ IN gctUINT32 RectCount
+ );
+
+gceSTATUS
+gco2D_SetROP(
+ IN gco2D Engine,
+ IN gctUINT8 FgRop,
+ IN gctUINT8 BgRop
+ );
+
+gceSTATUS
+gco2D_SetGdiStretchMode(
+ IN gco2D Engine,
+ IN gctBOOL Enable
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_raster_h_ */
diff --git a/src/include_v4/gc_hal_rename.h b/src/include_v4/gc_hal_rename.h
new file mode 100644
index 0000000..ed6718d
--- /dev/null
+++ b/src/include_v4/gc_hal_rename.h
@@ -0,0 +1,250 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_rename_h_
+#define __gc_hal_rename_h_
+
+
+#if defined(_HAL2D_APPENDIX)
+
+#define _HAL2D_RENAME_2(api, appendix) api ## appendix
+#define _HAL2D_RENAME_1(api, appendix) _HAL2D_RENAME_2(api, appendix)
+#define gcmHAL2D(api) _HAL2D_RENAME_1(api, _HAL2D_APPENDIX)
+
+
+#define gckOS_Construct gcmHAL2D(gckOS_Construct)
+#define gckOS_Destroy gcmHAL2D(gckOS_Destroy)
+#define gckOS_QueryVideoMemory gcmHAL2D(gckOS_QueryVideoMemory)
+#define gckOS_Allocate gcmHAL2D(gckOS_Allocate)
+#define gckOS_Free gcmHAL2D(gckOS_Free)
+#define gckOS_AllocateMemory gcmHAL2D(gckOS_AllocateMemory)
+#define gckOS_FreeMemory gcmHAL2D(gckOS_FreeMemory)
+#define gckOS_AllocatePagedMemory gcmHAL2D(gckOS_AllocatePagedMemory)
+#define gckOS_AllocatePagedMemoryEx gcmHAL2D(gckOS_AllocatePagedMemoryEx)
+#define gckOS_LockPages gcmHAL2D(gckOS_LockPages)
+#define gckOS_MapPages gcmHAL2D(gckOS_MapPages)
+#define gckOS_UnlockPages gcmHAL2D(gckOS_UnlockPages)
+#define gckOS_FreePagedMemory gcmHAL2D(gckOS_FreePagedMemory)
+#define gckOS_AllocateNonPagedMemory gcmHAL2D(gckOS_AllocateNonPagedMemory)
+#define gckOS_FreeNonPagedMemory gcmHAL2D(gckOS_FreeNonPagedMemory)
+#define gckOS_AllocateContiguous gcmHAL2D(gckOS_AllocateContiguous)
+#define gckOS_FreeContiguous gcmHAL2D(gckOS_FreeContiguous)
+#define gckOS_GetPageSize gcmHAL2D(gckOS_GetPageSize)
+#define gckOS_GetPhysicalAddress gcmHAL2D(gckOS_GetPhysicalAddress)
+#define gckOS_GetPhysicalAddressProcess gcmHAL2D(gckOS_GetPhysicalAddressProcess)
+#define gckOS_MapPhysical gcmHAL2D(gckOS_MapPhysical)
+#define gckOS_UnmapPhysical gcmHAL2D(gckOS_UnmapPhysical)
+#define gckOS_ReadRegister gcmHAL2D(gckOS_ReadRegister)
+#define gckOS_WriteRegister gcmHAL2D(gckOS_WriteRegister)
+#define gckOS_WriteMemory gcmHAL2D(gckOS_WriteMemory)
+#define gckOS_MapMemory gcmHAL2D(gckOS_MapMemory)
+#define gckOS_UnmapMemory gcmHAL2D(gckOS_UnmapMemory)
+#define gckOS_UnmapMemoryEx gcmHAL2D(gckOS_UnmapMemoryEx)
+#define gckOS_CreateMutex gcmHAL2D(gckOS_CreateMutex)
+#define gckOS_DeleteMutex gcmHAL2D(gckOS_DeleteMutex)
+#define gckOS_AcquireMutex gcmHAL2D(gckOS_AcquireMutex)
+#define gckOS_ReleaseMutex gcmHAL2D(gckOS_ReleaseMutex)
+#define gckOS_AtomicExchange gcmHAL2D(gckOS_AtomicExchange)
+#define gckOS_AtomicExchangePtr gcmHAL2D(gckOS_AtomicExchangePtr)
+#define gckOS_AtomConstruct gcmHAL2D(gckOS_AtomConstruct)
+#define gckOS_AtomDestroy gcmHAL2D(gckOS_AtomDestroy)
+#define gckOS_AtomGet gcmHAL2D(gckOS_AtomGet)
+#define gckOS_AtomIncrement gcmHAL2D(gckOS_AtomIncrement)
+#define gckOS_AtomDecrement gcmHAL2D(gckOS_AtomDecrement)
+#define gckOS_Delay gcmHAL2D(gckOS_Delay)
+#define gckOS_GetTime gcmHAL2D(gckOS_GetTime)
+#define gckOS_MemoryBarrier gcmHAL2D(gckOS_MemoryBarrier)
+#define gckOS_MapUserPointer gcmHAL2D(gckOS_MapUserPointer)
+#define gckOS_UnmapUserPointer gcmHAL2D(gckOS_UnmapUserPointer)
+#define gckOS_QueryNeedCopy gcmHAL2D(gckOS_QueryNeedCopy)
+#define gckOS_CopyFromUserData gcmHAL2D(gckOS_CopyFromUserData)
+#define gckOS_CopyToUserData gcmHAL2D(gckOS_CopyToUserData)
+#define gckOS_MapUserPhysical gcmHAL2D(gckOS_MapUserPhysical)
+#define gckOS_SuspendInterrupt gcmHAL2D(gckOS_SuspendInterrupt)
+#define gckOS_ResumeInterrupt gcmHAL2D(gckOS_ResumeInterrupt)
+#define gckOS_GetBaseAddress gcmHAL2D(gckOS_GetBaseAddress)
+#define gckOS_MemCopy gcmHAL2D(gckOS_MemCopy)
+#define gckOS_ZeroMemory gcmHAL2D(gckOS_ZeroMemory)
+#define gckOS_DeviceControl gcmHAL2D(gckOS_DeviceControl)
+#define gckOS_GetProcessID gcmHAL2D(gckOS_GetProcessID)
+#define gckOS_GetThreadID gcmHAL2D(gckOS_GetThreadID)
+#define gckOS_CreateSignal gcmHAL2D(gckOS_CreateSignal)
+#define gckOS_DestroySignal gcmHAL2D(gckOS_DestroySignal)
+#define gckOS_Signal gcmHAL2D(gckOS_Signal)
+#define gckOS_WaitSignal gcmHAL2D(gckOS_WaitSignal)
+#define gckOS_MapSignal gcmHAL2D(gckOS_MapSignal)
+#define gckOS_MapUserMemory gcmHAL2D(gckOS_MapUserMemory)
+#define gckOS_UnmapUserMemory gcmHAL2D(gckOS_UnmapUserMemory)
+#define gckOS_CreateUserSignal gcmHAL2D(gckOS_CreateUserSignal)
+#define gckOS_DestroyUserSignal gcmHAL2D(gckOS_DestroyUserSignal)
+#define gckOS_WaitUserSignal gcmHAL2D(gckOS_WaitUserSignal)
+#define gckOS_SignalUserSignal gcmHAL2D(gckOS_SignalUserSignal)
+#define gckOS_UserSignal gcmHAL2D(gckOS_UserSignal)
+#define gckOS_UserSignal gcmHAL2D(gckOS_UserSignal)
+#define gckOS_CacheClean gcmHAL2D(gckOS_CacheClean)
+#define gckOS_CacheFlush gcmHAL2D(gckOS_CacheFlush)
+#define gckOS_SetDebugLevel gcmHAL2D(gckOS_SetDebugLevel)
+#define gckOS_SetDebugZone gcmHAL2D(gckOS_SetDebugZone)
+#define gckOS_SetDebugLevelZone gcmHAL2D(gckOS_SetDebugLevelZone)
+#define gckOS_SetDebugZones gcmHAL2D(gckOS_SetDebugZones)
+#define gckOS_SetDebugFile gcmHAL2D(gckOS_SetDebugFile)
+#define gckOS_Broadcast gcmHAL2D(gckOS_Broadcast)
+#define gckOS_SetGPUPower gcmHAL2D(gckOS_SetGPUPower)
+#define gckOS_CreateSemaphore gcmHAL2D(gckOS_CreateSemaphore)
+#define gckOS_DestroySemaphore gcmHAL2D(gckOS_DestroySemaphore)
+#define gckOS_AcquireSemaphore gcmHAL2D(gckOS_AcquireSemaphore)
+#define gckOS_ReleaseSemaphore gcmHAL2D(gckOS_ReleaseSemaphore)
+#define gckHEAP_Construct gcmHAL2D(gckHEAP_Construct)
+#define gckHEAP_Destroy gcmHAL2D(gckHEAP_Destroy)
+#define gckHEAP_Allocate gcmHAL2D(gckHEAP_Allocate)
+#define gckHEAP_Free gcmHAL2D(gckHEAP_Free)
+#define gckHEAP_ProfileStart gcmHAL2D(gckHEAP_ProfileStart)
+#define gckHEAP_ProfileEnd gcmHAL2D(gckHEAP_ProfileEnd)
+#define gckHEAP_Test gcmHAL2D(gckHEAP_Test)
+#define gckVIDMEM_Construct gcmHAL2D(gckVIDMEM_Construct)
+#define gckVIDMEM_Destroy gcmHAL2D(gckVIDMEM_Destroy)
+#define gckVIDMEM_Allocate gcmHAL2D(gckVIDMEM_Allocate)
+#define gckVIDMEM_AllocateLinear gcmHAL2D(gckVIDMEM_AllocateLinear)
+#define gckVIDMEM_Free gcmHAL2D(gckVIDMEM_Free)
+#define gckVIDMEM_Lock gcmHAL2D(gckVIDMEM_Lock)
+#define gckVIDMEM_Unlock gcmHAL2D(gckVIDMEM_Unlock)
+#define gckVIDMEM_ConstructVirtual gcmHAL2D(gckVIDMEM_ConstructVirtual)
+#define gckVIDMEM_DestroyVirtual gcmHAL2D(gckVIDMEM_DestroyVirtual)
+#define gckKERNEL_Construct gcmHAL2D(gckKERNEL_Construct)
+#define gckKERNEL_Destroy gcmHAL2D(gckKERNEL_Destroy)
+#define gckKERNEL_Dispatch gcmHAL2D(gckKERNEL_Dispatch)
+#define gckKERNEL_QueryVideoMemory gcmHAL2D(gckKERNEL_QueryVideoMemory)
+#define gckKERNEL_GetVideoMemoryPool gcmHAL2D(gckKERNEL_GetVideoMemoryPool)
+#define gckKERNEL_MapVideoMemory gcmHAL2D(gckKERNEL_MapVideoMemory)
+#define gckKERNEL_UnmapVideoMemory gcmHAL2D(gckKERNEL_UnmapVideoMemory)
+#define gckKERNEL_MapMemory gcmHAL2D(gckKERNEL_MapMemory)
+#define gckKERNEL_UnmapMemory gcmHAL2D(gckKERNEL_UnmapMemory)
+#define gckKERNEL_Notify gcmHAL2D(gckKERNEL_Notify)
+#define gckKERNEL_QuerySettings gcmHAL2D(gckKERNEL_QuerySettings)
+#define gckKERNEL_Recovery gcmHAL2D(gckKERNEL_Recovery)
+#define gckKERNEL_OpenUserData gcmHAL2D(gckKERNEL_OpenUserData)
+#define gckKERNEL_CloseUserData gcmHAL2D(gckKERNEL_CloseUserData)
+#define gckHARDWARE_Construct gcmHAL2D(gckHARDWARE_Construct)
+#define gckHARDWARE_Destroy gcmHAL2D(gckHARDWARE_Destroy)
+#define gckHARDWARE_QuerySystemMemory gcmHAL2D(gckHARDWARE_QuerySystemMemory)
+#define gckHARDWARE_BuildVirtualAddress gcmHAL2D(gckHARDWARE_BuildVirtualAddress)
+#define gckHARDWARE_QueryCommandBuffer gcmHAL2D(gckHARDWARE_QueryCommandBuffer)
+#define gckHARDWARE_WaitLink gcmHAL2D(gckHARDWARE_WaitLink)
+#define gckHARDWARE_Execute gcmHAL2D(gckHARDWARE_Execute)
+#define gckHARDWARE_End gcmHAL2D(gckHARDWARE_End)
+#define gckHARDWARE_Nop gcmHAL2D(gckHARDWARE_Nop)
+#define gckHARDWARE_Wait gcmHAL2D(gckHARDWARE_Wait)
+#define gckHARDWARE_PipeSelect gcmHAL2D(gckHARDWARE_PipeSelect)
+#define gckHARDWARE_Link gcmHAL2D(gckHARDWARE_Link)
+#define gckHARDWARE_Event gcmHAL2D(gckHARDWARE_Event)
+#define gckHARDWARE_QueryMemory gcmHAL2D(gckHARDWARE_QueryMemory)
+#define gckHARDWARE_QueryChipIdentity gcmHAL2D(gckHARDWARE_QueryChipIdentity)
+#define gckHARDWARE_QueryChipSpecs gcmHAL2D(gckHARDWARE_QueryChipSpecs)
+#define gckHARDWARE_QueryShaderCaps gcmHAL2D(gckHARDWARE_QueryShaderCaps)
+#define gckHARDWARE_ConvertFormat gcmHAL2D(gckHARDWARE_ConvertFormat)
+#define gckHARDWARE_SplitMemory gcmHAL2D(gckHARDWARE_SplitMemory)
+#define gckHARDWARE_AlignToTile gcmHAL2D(gckHARDWARE_AlignToTile)
+#define gckHARDWARE_UpdateQueueTail gcmHAL2D(gckHARDWARE_UpdateQueueTail)
+#define gckHARDWARE_ConvertLogical gcmHAL2D(gckHARDWARE_ConvertLogical)
+#define gckHARDWARE_ConvertPhysical gcmHAL2D(gckHARDWARE_ConvertPhysical)
+#define gckHARDWARE_Interrupt gcmHAL2D(gckHARDWARE_Interrupt)
+#define gckHARDWARE_SetMMU gcmHAL2D(gckHARDWARE_SetMMU)
+#define gckHARDWARE_FlushMMU gcmHAL2D(gckHARDWARE_FlushMMU)
+#define gckHARDWARE_GetIdle gcmHAL2D(gckHARDWARE_GetIdle)
+#define gckHARDWARE_Flush gcmHAL2D(gckHARDWARE_Flush)
+#define gckHARDWARE_SetFastClear gcmHAL2D(gckHARDWARE_SetFastClear)
+#define gckHARDWARE_ReadInterrupt gcmHAL2D(gckHARDWARE_ReadInterrupt)
+#define gckHARDWARE_SetPowerManagementState gcmHAL2D(gckHARDWARE_SetPowerManagementState)
+#define gckHARDWARE_QueryPowerManagementState gcmHAL2D(gckHARDWARE_QueryPowerManagementState)
+#define gckHARDWARE_ProfileEngine2D gcmHAL2D(gckHARDWARE_ProfileEngine2D)
+#define gckHARDWARE_InitializeHardware gcmHAL2D(gckHARDWARE_InitializeHardware)
+#define gckHARDWARE_Reset gcmHAL2D(gckHARDWARE_Reset)
+#define gckINTERRUPT_Construct gcmHAL2D(gckINTERRUPT_Construct)
+#define gckINTERRUPT_Destroy gcmHAL2D(gckINTERRUPT_Destroy)
+#define gckINTERRUPT_SetHandler gcmHAL2D(gckINTERRUPT_SetHandler)
+#define gckINTERRUPT_Notify gcmHAL2D(gckINTERRUPT_Notify)
+#define gckEVENT_Construct gcmHAL2D(gckEVENT_Construct)
+#define gckEVENT_Destroy gcmHAL2D(gckEVENT_Destroy)
+#define gckEVENT_AddList gcmHAL2D(gckEVENT_AddList)
+#define gckEVENT_FreeNonPagedMemory gcmHAL2D(gckEVENT_FreeNonPagedMemory)
+#define gckEVENT_FreeContiguousMemory gcmHAL2D(gckEVENT_FreeContiguousMemory)
+#define gckEVENT_FreeVideoMemory gcmHAL2D(gckEVENT_FreeVideoMemory)
+#define gckEVENT_Signal gcmHAL2D(gckEVENT_Signal)
+#define gckEVENT_Unlock gcmHAL2D(gckEVENT_Unlock)
+#define gckEVENT_Submit gcmHAL2D(gckEVENT_Submit)
+#define gckEVENT_Commit gcmHAL2D(gckEVENT_Commit)
+#define gckEVENT_Notify gcmHAL2D(gckEVENT_Notify)
+#define gckEVENT_Interrupt gcmHAL2D(gckEVENT_Interrupt)
+#define gckCOMMAND_Construct gcmHAL2D(gckCOMMAND_Construct)
+#define gckCOMMAND_Destroy gcmHAL2D(gckCOMMAND_Destroy)
+#define gckCOMMAND_EnterCommit gcmHAL2D(gckCOMMAND_EnterCommit)
+#define gckCOMMAND_ExitCommit gcmHAL2D(gckCOMMAND_ExitCommit)
+#define gckCOMMAND_Start gcmHAL2D(gckCOMMAND_Start)
+#define gckCOMMAND_Stop gcmHAL2D(gckCOMMAND_Stop)
+#define gckCOMMAND_Commit gcmHAL2D(gckCOMMAND_Commit)
+#define gckCOMMAND_Reserve gcmHAL2D(gckCOMMAND_Reserve)
+#define gckCOMMAND_Execute gcmHAL2D(gckCOMMAND_Execute)
+#define gckCOMMAND_Stall gcmHAL2D(gckCOMMAND_Stall)
+#define gckCOMMAND_Attach gcmHAL2D(gckCOMMAND_Attach)
+#define gckCOMMAND_Detach gcmHAL2D(gckCOMMAND_Detach)
+#define gckMMU_Construct gcmHAL2D(gckMMU_Construct)
+#define gckMMU_Destroy gcmHAL2D(gckMMU_Destroy)
+#define gckMMU_AllocatePages gcmHAL2D(gckMMU_AllocatePages)
+#define gckMMU_FreePages gcmHAL2D(gckMMU_FreePages)
+#define gckMMU_InsertNode gcmHAL2D(gckMMU_InsertNode)
+#define gckMMU_RemoveNode gcmHAL2D(gckMMU_RemoveNode)
+#define gckMMU_FreeHandleMemory gcmHAL2D(gckMMU_FreeHandleMemory)
+#define gckMMU_Test gcmHAL2D(gckMMU_Test)
+#define gckHARDWARE_QueryProfileRegisters gcmHAL2D(gckHARDWARE_QueryProfileRegisters)
+
+
+#define FindMdlMap gcmHAL2D(FindMdlMap)
+#define OnProcessExit gcmHAL2D(OnProcessExit)
+
+#define gckGALDEVICE_Destroy gcmHAL2D(gckGALDEVICE_Destroy)
+#define gckOS_Print gcmHAL2D(gckOS_Print)
+#define gckGALDEVICE_FreeMemory gcmHAL2D(gckGALDEVICE_FreeMemory)
+#define gckGALDEVICE_AllocateMemory gcmHAL2D(gckGALDEVICE_AllocateMemory)
+#define gckOS_DebugBreak gcmHAL2D(gckOS_DebugBreak)
+#define gckGALDEVICE_Release_ISR gcmHAL2D(gckGALDEVICE_Release_ISR)
+#define gckOS_Verify gcmHAL2D(gckOS_Verify)
+#define gckCOMMAND_Release gcmHAL2D(gckCOMMAND_Release)
+#define gckGALDEVICE_Stop gcmHAL2D(gckGALDEVICE_Stop)
+#define gckGALDEVICE_Construct gcmHAL2D(gckGALDEVICE_Construct)
+#define gckOS_DebugFatal gcmHAL2D(gckOS_DebugFatal)
+#define gckOS_DebugTrace gcmHAL2D(gckOS_DebugTrace)
+#define gckHARDWARE_GetBaseAddress gcmHAL2D(gckHARDWARE_GetBaseAddress)
+#define gckGALDEVICE_Setup_ISR gcmHAL2D(gckGALDEVICE_Setup_ISR)
+#define gckKERNEL_AttachProcess gcmHAL2D(gckKERNEL_AttachProcess)
+#define gckKERNEL_AttachProcessEx gcmHAL2D(gckKERNEL_AttachProcessEx)
+#define gckGALDEVICE_Start_Thread gcmHAL2D(gckGALDEVICE_Start_Thread)
+#define gckHARDWARE_QueryIdle gcmHAL2D(gckHARDWARE_QueryIdle)
+#define gckGALDEVICE_Start gcmHAL2D(gckGALDEVICE_Start)
+#define gckOS_GetKernelLogical gcmHAL2D(gckOS_GetKernelLogical)
+#define gckOS_DebugTraceZone gcmHAL2D(gckOS_DebugTraceZone)
+#define gckGALDEVICE_Stop_Thread gcmHAL2D(gckGALDEVICE_Stop_Thread)
+#define gckHARDWARE_NeedBaseAddress gcmHAL2D(gckHARDWARE_NeedBaseAddress)
+
+#endif
+
+#endif /* __gc_hal_rename_h_ */
diff --git a/src/include_v4/gc_hal_types.h b/src/include_v4/gc_hal_types.h
new file mode 100644
index 0000000..e6d38c1
--- /dev/null
+++ b/src/include_v4/gc_hal_types.h
@@ -0,0 +1,970 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_types_h_
+#define __gc_hal_types_h_
+
+#include "gc_hal_version.h"
+#include "gc_hal_options.h"
+
+#ifdef _WIN32
+#pragma warning(disable:4127) /* Conditional expression is constant (do { }
+ ** while(0)). */
+#pragma warning(disable:4100) /* Unreferenced formal parameter. */
+#pragma warning(disable:4204) /* Non-constant aggregate initializer (C99). */
+#pragma warning(disable:4131) /* Uses old-style declarator (for Bison and
+ ** Flex generated files). */
+#pragma warning(disable:4206) /* Translation unit is empty. */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************\
+** Platform macros.
+*/
+
+#if defined(__GNUC__)
+# define gcdHAS_ELLIPSES 1 /* GCC always has it. */
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+# define gcdHAS_ELLIPSES 1 /* C99 has it. */
+#elif defined(_MSC_VER) && (_MSC_VER >= 1500)
+# define gcdHAS_ELLIPSES 1 /* MSVC 2007+ has it. */
+#elif defined(UNDER_CE)
+#if UNDER_CE >= 600
+# define gcdHAS_ELLIPSES 1
+# else
+# define gcdHAS_ELLIPSES 0
+# endif
+#else
+# error "gcdHAS_ELLIPSES: Platform could not be determined"
+#endif
+
+/******************************************************************************\
+************************************ Keyword ***********************************
+\******************************************************************************/
+
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
+# define gcmINLINE inline /* C99 keyword. */
+#elif defined(__GNUC__)
+# define gcmINLINE __inline__ /* GNU keyword. */
+#elif defined(_MSC_VER) || defined(UNDER_CE)
+# define gcmINLINE __inline /* Internal keyword. */
+#else
+# error "gcmINLINE: Platform could not be determined"
+#endif
+
+/* Possible debug flags. */
+#define gcdDEBUG_NONE 0
+#define gcdDEBUG_ALL (1 << 0)
+#define gcdDEBUG_FATAL (1 << 1)
+#define gcdDEBUG_TRACE (1 << 2)
+#define gcdDEBUG_BREAK (1 << 3)
+#define gcdDEBUG_ASSERT (1 << 4)
+#define gcdDEBUG_CODE (1 << 5)
+#define gcdDEBUG_STACK (1 << 6)
+
+#define gcmIS_DEBUG(flag) ( gcdDEBUG & (flag | gcdDEBUG_ALL) )
+
+#ifndef gcdDEBUG
+#if (defined(DBG) && DBG) || defined(DEBUG) || defined(_DEBUG)
+# define gcdDEBUG gcdDEBUG_ALL
+# else
+# define gcdDEBUG gcdDEBUG_NONE
+# endif
+#endif
+
+#ifdef _USRDLL
+#ifdef _MSC_VER
+#ifdef HAL_EXPORTS
+# define HALAPI __declspec(dllexport)
+# else
+# define HALAPI __declspec(dllimport)
+# endif
+# define HALDECL __cdecl
+# else
+#ifdef HAL_EXPORTS
+# define HALAPI
+# else
+# define HALAPI extern
+# endif
+# endif
+#else
+# define HALAPI
+# define HALDECL
+#endif
+
+/******************************************************************************\
+********************************** Common Types ********************************
+\******************************************************************************/
+
+#define gcvFALSE 0
+#define gcvTRUE 1
+
+#define gcvINFINITE ((gctUINT32) ~0U)
+
+#define gcvINVALID_HANDLE ((gctHANDLE) ~0U)
+
+typedef int gctBOOL;
+typedef gctBOOL * gctBOOL_PTR;
+
+typedef int gctINT;
+typedef signed char gctINT8;
+typedef signed short gctINT16;
+typedef signed int gctINT32;
+typedef signed long long gctINT64;
+
+typedef gctINT * gctINT_PTR;
+typedef gctINT8 * gctINT8_PTR;
+typedef gctINT16 * gctINT16_PTR;
+typedef gctINT32 * gctINT32_PTR;
+typedef gctINT64 * gctINT64_PTR;
+
+typedef unsigned int gctUINT;
+typedef unsigned char gctUINT8;
+typedef unsigned short gctUINT16;
+typedef unsigned int gctUINT32;
+typedef unsigned long long gctUINT64;
+
+typedef gctUINT * gctUINT_PTR;
+typedef gctUINT8 * gctUINT8_PTR;
+typedef gctUINT16 * gctUINT16_PTR;
+typedef gctUINT32 * gctUINT32_PTR;
+typedef gctUINT64 * gctUINT64_PTR;
+
+typedef unsigned long gctSIZE_T;
+typedef gctSIZE_T * gctSIZE_T_PTR;
+
+#ifdef __cplusplus
+# define gcvNULL 0
+#else
+# define gcvNULL ((void *) 0)
+#endif
+
+typedef float gctFLOAT;
+typedef signed int gctFIXED_POINT;
+typedef float * gctFLOAT_PTR;
+
+typedef void * gctPHYS_ADDR;
+typedef void * gctHANDLE;
+typedef void * gctFILE;
+typedef void * gctSIGNAL;
+typedef void * gctWINDOW;
+typedef void * gctIMAGE;
+
+typedef void * gctSEMAPHORE;
+
+typedef void * gctPOINTER;
+typedef const void * gctCONST_POINTER;
+
+typedef char gctCHAR;
+typedef char * gctSTRING;
+typedef const char * gctCONST_STRING;
+
+typedef struct _gcsCOUNT_STRING
+{
+ gctSIZE_T Length;
+ gctCONST_STRING String;
+}
+gcsCOUNT_STRING;
+
+typedef union _gcuFLOAT_UINT32
+{
+ gctFLOAT f;
+ gctUINT32 u;
+}
+gcuFLOAT_UINT32;
+
+/* Fixed point constants. */
+#define gcvZERO_X ((gctFIXED_POINT) 0x00000000)
+#define gcvHALF_X ((gctFIXED_POINT) 0x00008000)
+#define gcvONE_X ((gctFIXED_POINT) 0x00010000)
+#define gcvNEGONE_X ((gctFIXED_POINT) 0xFFFF0000)
+#define gcvTWO_X ((gctFIXED_POINT) 0x00020000)
+
+/* Stringizing macro. */
+#define gcmSTRING(Value) #Value
+
+/******************************************************************************\
+******************************* Fixed Point Math *******************************
+\******************************************************************************/
+
+#define gcmXMultiply(x1, x2) gcoMATH_MultiplyFixed(x1, x2)
+#define gcmXDivide(x1, x2) gcoMATH_DivideFixed(x1, x2)
+#define gcmXMultiplyDivide(x1, x2, x3) gcoMATH_MultiplyDivideFixed(x1, x2, x3)
+
+/* 2D Engine profile. */
+typedef struct _gcs2D_PROFILE
+{
+ /* Cycle count.
+ 32bit counter incremented every 2D clock cycle.
+ Wraps back to 0 when the counter overflows.
+ */
+ gctUINT32 cycleCount;
+
+ /* Pixels rendered by the 2D engine.
+ Resets to 0 every time it is read. */
+ gctUINT32 pixelsRendered;
+}
+gcs2D_PROFILE;
+
+/* Macro to combine four characters into a Charcater Code. */
+#define gcmCC(c1, c2, c3, c4) \
+( \
+ (char) (c1) \
+ | \
+ ((char) (c2) << 8) \
+ | \
+ ((char) (c3) << 16) \
+ | \
+ ((char) (c4) << 24) \
+)
+
+#define gcmPRINTABLE(c) ((((c) >= ' ') && ((c) <= '}')) ? ((c) != '%' ? (c) : ' ') : ' ')
+
+#define gcmCC_PRINT(cc) \
+ gcmPRINTABLE((char) ( (cc) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 8) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 16) & 0xFF)), \
+ gcmPRINTABLE((char) (((cc) >> 24) & 0xFF))
+
+/******************************************************************************\
+****************************** Function Parameters *****************************
+\******************************************************************************/
+
+#define IN
+#define OUT
+#define OPTIONAL
+
+/******************************************************************************\
+********************************* Status Codes *********************************
+\******************************************************************************/
+
+typedef enum _gceSTATUS
+{
+ gcvSTATUS_OK = 0,
+ gcvSTATUS_FALSE = 0,
+ gcvSTATUS_TRUE = 1,
+ gcvSTATUS_NO_MORE_DATA = 2,
+ gcvSTATUS_CACHED = 3,
+ gcvSTATUS_MIPMAP_TOO_LARGE = 4,
+ gcvSTATUS_NAME_NOT_FOUND = 5,
+ gcvSTATUS_NOT_OUR_INTERRUPT = 6,
+ gcvSTATUS_MISMATCH = 7,
+ gcvSTATUS_MIPMAP_TOO_SMALL = 8,
+ gcvSTATUS_LARGER = 9,
+ gcvSTATUS_SMALLER = 10,
+ gcvSTATUS_CHIP_NOT_READY = 11,
+ gcvSTATUS_NEED_CONVERSION = 12,
+ gcvSTATUS_SKIP = 13,
+ gcvSTATUS_DATA_TOO_LARGE = 14,
+ gcvSTATUS_INVALID_CONFIG = 15,
+ gcvSTATUS_CHANGED = 16,
+ gcvSTATUS_NOT_SUPPORT_DITHER = 17,
+ gcvSTATUS_EXECUTED = 18,
+ gcvSTATUS_TERMINATE = 19,
+
+ gcvSTATUS_INVALID_ARGUMENT = -1,
+ gcvSTATUS_INVALID_OBJECT = -2,
+ gcvSTATUS_OUT_OF_MEMORY = -3,
+ gcvSTATUS_MEMORY_LOCKED = -4,
+ gcvSTATUS_MEMORY_UNLOCKED = -5,
+ gcvSTATUS_HEAP_CORRUPTED = -6,
+ gcvSTATUS_GENERIC_IO = -7,
+ gcvSTATUS_INVALID_ADDRESS = -8,
+ gcvSTATUS_CONTEXT_LOSSED = -9,
+ gcvSTATUS_TOO_COMPLEX = -10,
+ gcvSTATUS_BUFFER_TOO_SMALL = -11,
+ gcvSTATUS_INTERFACE_ERROR = -12,
+ gcvSTATUS_NOT_SUPPORTED = -13,
+ gcvSTATUS_MORE_DATA = -14,
+ gcvSTATUS_TIMEOUT = -15,
+ gcvSTATUS_OUT_OF_RESOURCES = -16,
+ gcvSTATUS_INVALID_DATA = -17,
+ gcvSTATUS_INVALID_MIPMAP = -18,
+ gcvSTATUS_NOT_FOUND = -19,
+ gcvSTATUS_NOT_ALIGNED = -20,
+ gcvSTATUS_INVALID_REQUEST = -21,
+ gcvSTATUS_GPU_NOT_RESPONDING = -22,
+ gcvSTATUS_TIMER_OVERFLOW = -23,
+ gcvSTATUS_VERSION_MISMATCH = -24,
+ gcvSTATUS_LOCKED = -25,
+ gcvSTATUS_INTERRUPTED = -26,
+ gcvSTATUS_DEVICE = -27,
+
+ /* Linker errors. */
+ gcvSTATUS_GLOBAL_TYPE_MISMATCH = -1000,
+ gcvSTATUS_TOO_MANY_ATTRIBUTES = -1001,
+ gcvSTATUS_TOO_MANY_UNIFORMS = -1002,
+ gcvSTATUS_TOO_MANY_VARYINGS = -1003,
+ gcvSTATUS_UNDECLARED_VARYING = -1004,
+ gcvSTATUS_VARYING_TYPE_MISMATCH = -1005,
+ gcvSTATUS_MISSING_MAIN = -1006,
+ gcvSTATUS_NAME_MISMATCH = -1007,
+ gcvSTATUS_INVALID_INDEX = -1008,
+ gcvSTATUS_UNIFORM_TYPE_MISMATCH = -1009,
+}
+gceSTATUS;
+
+/******************************************************************************\
+********************************* Status Macros ********************************
+\******************************************************************************/
+
+#define gcmIS_ERROR(status) (status < 0)
+#define gcmNO_ERROR(status) (status >= 0)
+#define gcmIS_SUCCESS(status) (status == gcvSTATUS_OK)
+
+/******************************************************************************\
+********************************* Field Macros *********************************
+\******************************************************************************/
+
+#define __gcmSTART(reg_field) \
+ (0 ? reg_field)
+
+#define __gcmEND(reg_field) \
+ (1 ? reg_field)
+
+#define __gcmGETSIZE(reg_field) \
+ (__gcmEND(reg_field) - __gcmSTART(reg_field) + 1)
+
+#define __gcmALIGN(data, reg_field) \
+ (((gctUINT32) (data)) << __gcmSTART(reg_field))
+
+#define __gcmMASK(reg_field) \
+ ((gctUINT32) ((__gcmGETSIZE(reg_field) == 32) \
+ ? ~0 \
+ : (~(~0 << __gcmGETSIZE(reg_field)))))
+
+/*******************************************************************************
+**
+** gcmFIELDMASK
+**
+** Get aligned field mask.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmFIELDMASK(reg, field) \
+( \
+ __gcmALIGN(__gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmGETFIELD
+**
+** Extract the value of a field from specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmGETFIELD(data, reg, field) \
+( \
+ ((((gctUINT32) (data)) >> __gcmSTART(reg##_##field)) \
+ & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELD
+**
+** Set the value of a field within specified data.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETFIELD(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN((gctUINT32) (value) \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmSETFIELDVALUE
+**
+** Set the value of a field within specified data with a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmSETFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) \
+ & ~__gcmALIGN(__gcmMASK(reg##_##field), reg##_##field)) \
+ | __gcmALIGN(reg##_##field##_##value \
+ & __gcmMASK(reg##_##field), reg##_##field) \
+)
+
+/*******************************************************************************
+**
+** gcmGETMASKEDFIELDMASK
+**
+** Determine field mask of a masked field.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmGETMASKEDFIELDMASK(reg, field) \
+( \
+ gcmSETFIELD(0, reg, field, ~0) | \
+ gcmSETFIELD(0, reg, MASK_ ## field, ~0) \
+)
+
+/*******************************************************************************
+**
+** gcmSETMASKEDFIELD
+**
+** Set the value of a masked field with specified data.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETMASKEDFIELD(reg, field, value) \
+( \
+ gcmSETFIELD (~0, reg, field, value) & \
+ gcmSETFIELDVALUE(~0, reg, MASK_ ## field, ENABLED) \
+)
+
+/*******************************************************************************
+**
+** gcmSETMASKEDFIELDVALUE
+**
+** Set the value of a masked field with specified data.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmSETMASKEDFIELDVALUE(reg, field, value) \
+( \
+ gcmSETFIELDVALUE(~0, reg, field, value) & \
+ gcmSETFIELDVALUE(~0, reg, MASK_ ## field, ENABLED) \
+)
+
+/*******************************************************************************
+**
+** gcmVERIFYFIELDVALUE
+**
+** Verify if the value of a field within specified data equals a
+** predefined value.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Name of the value within the field.
+*/
+#define gcmVERIFYFIELDVALUE(data, reg, field, value) \
+( \
+ (((gctUINT32) (data)) >> __gcmSTART(reg##_##field) & \
+ __gcmMASK(reg##_##field)) \
+ == \
+ (reg##_##field##_##value & __gcmMASK(reg##_##field)) \
+)
+
+/*******************************************************************************
+** Bit field macros.
+*/
+
+#define __gcmSTARTBIT(Field) \
+ ( 1 ? Field )
+
+#define __gcmBITSIZE(Field) \
+ ( 0 ? Field )
+
+#define __gcmBITMASK(Field) \
+( \
+ (1 << __gcmBITSIZE(Field)) - 1 \
+)
+
+#define gcmGETBITS(Value, Type, Field) \
+( \
+ ( ((Type) (Value)) >> __gcmSTARTBIT(Field) ) \
+ & \
+ __gcmBITMASK(Field) \
+)
+
+#define gcmSETBITS(Value, Type, Field, NewValue) \
+( \
+ ( ((Type) (Value)) \
+ & ~(__gcmBITMASK(Field) << __gcmSTARTBIT(Field)) \
+ ) \
+ | \
+ ( ( ((Type) (NewValue)) \
+ & __gcmBITMASK(Field) \
+ ) << __gcmSTARTBIT(Field) \
+ ) \
+)
+
+/*******************************************************************************
+**
+** gcmISINREGRANGE
+**
+** Verify whether the specified address is in the register range.
+**
+** ARGUMENTS:
+**
+** Address Address to be verified.
+** Name Name of a register.
+*/
+
+#define gcmISINREGRANGE(Address, Name) \
+( \
+ ((Address & (~0U << Name ## _LSB)) == (Name ## _Address >> 2)) \
+)
+
+/*******************************************************************************
+**
+** A set of macros to aid state loading.
+**
+** ARGUMENTS:
+**
+** CommandBuffer Pointer to a gcoCMDBUF object.
+** StateDelta Pointer to a gcsSTATE_DELTA state delta structure.
+** Memory Destination memory pointer of gctUINT32_PTR type.
+** PartOfContext Whether or not the state is a part of the context.
+** FixedPoint Whether or not the state is of the fixed point format.
+** Count Number of consecutive states to be loaded.
+** Address State address.
+** Data Data to be set to the state.
+*/
+
+/*----------------------------------------------------------------------------*/
+
+#if gcmIS_DEBUG(gcdDEBUG_CODE)
+
+# define gcmSTORELOADSTATE(CommandBuffer, Memory, Address, Count) \
+ CommandBuffer->lastLoadStatePtr = Memory; \
+ CommandBuffer->lastLoadStateAddress = Address; \
+ CommandBuffer->lastLoadStateCount = Count
+
+# define gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address) \
+ gcmASSERT( \
+ (gctUINT) (Memory - CommandBuffer->lastLoadStatePtr - 1) \
+ == \
+ (gctUINT) (Address - CommandBuffer->lastLoadStateAddress) \
+ ); \
+ \
+ gcmASSERT(CommandBuffer->lastLoadStateCount > 0); \
+ \
+ CommandBuffer->lastLoadStateCount -= 1
+
+# define gcmVERIFYLOADSTATEDONE(CommandBuffer) \
+ gcmASSERT(CommandBuffer->lastLoadStateCount == 0)
+
+#else
+
+# define gcmSTORELOADSTATE(CommandBuffer, Memory, Address, Count)
+# define gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address)
+# define gcmVERIFYLOADSTATEDONE(CommandBuffer)
+
+#endif
+
+#if gcdSECURE_USER
+
+# define gcmDEFINESECUREUSER() \
+ gctUINT __secure_user_offset__; \
+ gctUINT32_PTR __secure_user_hintArray__;
+
+# define gcmBEGINSECUREUSER() \
+ __secure_user_offset__ = reserve->lastOffset; \
+ \
+ __secure_user_hintArray__ = reserve->hintArrayTail
+
+# define gcmENDSECUREUSER() \
+ reserve->hintArrayTail = __secure_user_hintArray__
+
+# define gcmSKIPSECUREUSER() \
+ __secure_user_offset__ += gcmSIZEOF(gctUINT32)
+
+# define gcmUPDATESECUREUSER() \
+ *__secure_user_hintArray__ = __secure_user_offset__; \
+ \
+ __secure_user_offset__ += gcmSIZEOF(gctUINT32); \
+ __secure_user_hintArray__ += 1
+
+#else
+
+# define gcmDEFINESECUREUSER()
+# define gcmBEGINSECUREUSER()
+# define gcmENDSECUREUSER()
+# define gcmSKIPSECUREUSER()
+# define gcmUPDATESECUREUSER()
+
+#endif
+
+/*----------------------------------------------------------------------------*/
+
+#if gcdDUMP
+# define gcmDUMPSTATEDATA(StateDelta, FixedPoint, Address, Data) \
+ if (FixedPoint) \
+ { \
+ gcmDUMP(gcvNULL, "@[state.x 0x%04X 0x%08X]", \
+ Address, Data \
+ ); \
+ } \
+ else \
+ { \
+ gcmDUMP(gcvNULL, "@[state 0x%04X 0x%08X]", \
+ Address, Data \
+ ); \
+ }
+#else
+# define gcmDUMPSTATEDATA(StateDelta, FixedPoint, Address, Data)
+#endif
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmDEFINESTATEBUFFER(CommandBuffer, StateDelta, Memory, ReserveSize) \
+ gcmDEFINESECUREUSER() \
+ gctSIZE_T ReserveSize; \
+ gcoCMDBUF CommandBuffer; \
+ gctUINT32_PTR Memory; \
+ gcsSTATE_DELTA_PTR StateDelta
+
+#define gcmBEGINSTATEBUFFER(Hardware, CommandBuffer, StateDelta, Memory, ReserveSize) \
+{ \
+ gcmONERROR(gcoBUFFER_Reserve( \
+ Hardware->buffer, ReserveSize, gcvTRUE, &CommandBuffer \
+ )); \
+ \
+ Memory = (gctUINT32_PTR) CommandBuffer->lastReserve; \
+ \
+ StateDelta = Hardware->delta; \
+ \
+ gcmBEGINSECUREUSER(); \
+}
+
+#define gcmENDSTATEBUFFER(CommandBuffer, Memory, ReserveSize) \
+{ \
+ gcmENDSECUREUSER(); \
+ \
+ gcmASSERT( \
+ ((gctUINT8_PTR) CommandBuffer->lastReserve) + ReserveSize \
+ == \
+ (gctUINT8_PTR) Memory \
+ ); \
+}
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmBEGINSTATEBATCH(CommandBuffer, Memory, FixedPoint, Address, Count) \
+{ \
+ gcmASSERT(((Memory - (gctUINT32_PTR) CommandBuffer->lastReserve) & 1) == 0); \
+ \
+ gcmVERIFYLOADSTATEDONE(CommandBuffer); \
+ \
+ gcmSTORELOADSTATE(CommandBuffer, Memory, Address, Count); \
+ \
+ *Memory++ \
+ = gcmSETFIELDVALUE(0, AQ_COMMAND_LOAD_STATE_COMMAND, OPCODE, LOAD_STATE) \
+ | gcmSETFIELD (0, AQ_COMMAND_LOAD_STATE_COMMAND, FLOAT, FixedPoint) \
+ | gcmSETFIELD (0, AQ_COMMAND_LOAD_STATE_COMMAND, COUNT, Count) \
+ | gcmSETFIELD (0, AQ_COMMAND_LOAD_STATE_COMMAND, ADDRESS, Address); \
+ \
+ gcmSKIPSECUREUSER(); \
+}
+
+#define gcmENDSTATEBATCH(CommandBuffer, Memory) \
+{ \
+ gcmVERIFYLOADSTATEDONE(CommandBuffer); \
+ \
+ gcmASSERT(((Memory - (gctUINT32_PTR) CommandBuffer->lastReserve) & 1) == 0); \
+}
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmSETSTATEDATA(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data) \
+{ \
+ gctUINT32 __temp_data32__; \
+ \
+ gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address); \
+ \
+ __temp_data32__ = Data; \
+ \
+ *Memory++ = __temp_data32__; \
+ \
+ gcoHARDWARE_UpdateDelta( \
+ StateDelta, FixedPoint, Address, 0, __temp_data32__ \
+ ); \
+ \
+ gcmDUMPSTATEDATA(StateDelta, FixedPoint, Address, __temp_data32__); \
+ \
+ gcmUPDATESECUREUSER(); \
+}
+
+#define gcmSETCTRLSTATE(StateDelta, CommandBuffer, Memory, Address, Data) \
+{ \
+ gctUINT32 __temp_data32__; \
+ \
+ gcmVERIFYLOADSTATE(CommandBuffer, Memory, Address); \
+ \
+ __temp_data32__ = Data; \
+ \
+ *Memory++ = __temp_data32__; \
+ \
+ gcmDUMPSTATEDATA(StateDelta, gcvFALSE, Address, __temp_data32__); \
+ \
+ gcmSKIPSECUREUSER(); \
+}
+
+#define gcmSETFILLER(CommandBuffer, Memory) \
+{ \
+ gcmVERIFYLOADSTATEDONE(CommandBuffer); \
+ \
+ Memory += 1; \
+ \
+ gcmSKIPSECUREUSER(); \
+}
+
+/*----------------------------------------------------------------------------*/
+
+#define gcmSETSINGLESTATE(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data) \
+{ \
+ gcmBEGINSTATEBATCH(CommandBuffer, Memory, FixedPoint, Address, 1); \
+ gcmSETSTATEDATA(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data); \
+ gcmENDSTATEBATCH(CommandBuffer, Memory); \
+}
+
+#define gcmSETSINGLECTRLSTATE(StateDelta, CommandBuffer, Memory, FixedPoint, \
+ Address, Data) \
+{ \
+ gcmBEGINSTATEBATCH(CommandBuffer, Memory, FixedPoint, Address, 1); \
+ gcmSETCTRLSTATE(StateDelta, CommandBuffer, Memory, Address, Data); \
+ gcmENDSTATEBATCH(CommandBuffer, Memory); \
+}
+
+
+/*******************************************************************************
+**
+** gcmSETSTARTDECOMMAND
+**
+** Form a START_DE command.
+**
+** ARGUMENTS:
+**
+** Memory Destination memory pointer of gctUINT32_PTR type.
+** Count Number of the rectangles.
+*/
+
+#define gcmSETSTARTDECOMMAND(Memory, Count) \
+{ \
+ *Memory++ \
+ = gcmSETFIELDVALUE(0, AQ_COMMAND_START_DE_COMMAND, OPCODE, START_DE) \
+ | gcmSETFIELD (0, AQ_COMMAND_START_DE_COMMAND, COUNT, Count) \
+ | gcmSETFIELD (0, AQ_COMMAND_START_DE_COMMAND, DATA_COUNT, 0); \
+ \
+ *Memory++ = 0xDEADDEED; \
+}
+
+/******************************************************************************\
+******************************** Ceiling Macro ********************************
+\******************************************************************************/
+#define gcmCEIL(x) ((x - (gctUINT32)x) == 0 ? (gctUINT32)x : (gctUINT32)x + 1)
+
+/******************************************************************************\
+******************************** Min/Max Macros ********************************
+\******************************************************************************/
+
+#define gcmMIN(x, y) (((x) <= (y)) ? (x) : (y))
+#define gcmMAX(x, y) (((x) >= (y)) ? (x) : (y))
+#define gcmCLAMP(x, min, max) (((x) < (min)) ? (min) : \
+ ((x) > (max)) ? (max) : (x))
+#define gcmABS(x) (((x) < 0) ? -(x) : (x))
+#define gcmNEG(x) (((x) < 0) ? (x) : -(x))
+
+/*******************************************************************************
+**
+** gcmPTR2INT
+**
+** Convert a pointer to an integer value.
+**
+** ARGUMENTS:
+**
+** p Pointer value.
+*/
+#if defined(_WIN32) || (defined(__LP64__) && __LP64__)
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (gctUINT64) (p) \
+ )
+#else
+# define gcmPTR2INT(p) \
+ ( \
+ (gctUINT32) (p) \
+ )
+#endif
+
+/*******************************************************************************
+**
+** gcmINT2PTR
+**
+** Convert an integer value into a pointer.
+**
+** ARGUMENTS:
+**
+** v Integer value.
+*/
+#ifdef __LP64__
+# define gcmINT2PTR(i) \
+ ( \
+ (gctPOINTER) (gctINT64) (i) \
+ )
+#else
+# define gcmINT2PTR(i) \
+ ( \
+ (gctPOINTER) (i) \
+ )
+#endif
+
+/*******************************************************************************
+**
+** gcmOFFSETOF
+**
+** Compute the byte offset of a field inside a structure.
+**
+** ARGUMENTS:
+**
+** s Structure name.
+** field Field name.
+*/
+#define gcmOFFSETOF(s, field) \
+( \
+ gcmPTR2INT(& (((struct s *) 0)->field)) \
+)
+
+/*******************************************************************************
+***** Database ****************************************************************/
+
+typedef struct _gcsDATABASE_COUNTERS
+{
+ /* Number of currently allocated bytes. */
+ gctSIZE_T bytes;
+
+ /* Maximum number of bytes allocated (memory footprint). */
+ gctSIZE_T maxBytes;
+
+ /* Total number of bytes allocated. */
+ gctSIZE_T totalBytes;
+}
+gcsDATABASE_COUNTERS;
+
+typedef struct _gcuDATABASE_INFO
+{
+ /* Counters. */
+ gcsDATABASE_COUNTERS counters;
+
+ /* Time value. */
+ gctUINT64 time;
+}
+gcuDATABASE_INFO;
+
+/*******************************************************************************
+***** Frame database **********************************************************/
+
+/* gcsHAL_FRAME_INFO */
+typedef struct _gcsHAL_FRAME_INFO
+{
+ /* Current timer tick. */
+ OUT gctUINT64 ticks;
+
+ /* Bandwidth counters. */
+ OUT gctUINT readBytes8[8];
+ OUT gctUINT writeBytes8[8];
+
+ /* Counters. */
+ OUT gctUINT cycles[8];
+ OUT gctUINT idleCycles[8];
+ OUT gctUINT mcCycles[8];
+ OUT gctUINT readRequests[8];
+ OUT gctUINT writeRequests[8];
+
+ /* 3D counters. */
+ OUT gctUINT vertexCount;
+ OUT gctUINT primitiveCount;
+ OUT gctUINT rejectedPrimitives;
+ OUT gctUINT culledPrimitives;
+ OUT gctUINT clippedPrimitives;
+ OUT gctUINT outPrimitives;
+ OUT gctUINT inPrimitives;
+ OUT gctUINT culledQuadCount;
+ OUT gctUINT totalQuadCount;
+ OUT gctUINT quadCount;
+ OUT gctUINT totalPixelCount;
+
+ /* PE counters. */
+ OUT gctUINT colorKilled[8];
+ OUT gctUINT colorDrawn[8];
+ OUT gctUINT depthKilled[8];
+ OUT gctUINT depthDrawn[8];
+
+ /* Shader counters. */
+ OUT gctUINT shaderCycles;
+ OUT gctUINT vsInstructionCount;
+ OUT gctUINT vsTextureCount;
+ OUT gctUINT psInstructionCount;
+ OUT gctUINT psTextureCount;
+
+ /* Texture counters. */
+ OUT gctUINT bilinearRequests;
+ OUT gctUINT trilinearRequests;
+ OUT gctUINT txBytes8;
+ OUT gctUINT txHitCount;
+ OUT gctUINT txMissCount;
+}
+gcsHAL_FRAME_INFO;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gc_hal_types_h_ */
diff --git a/src/include_v4/gc_hal_version.h b/src/include_v4/gc_hal_version.h
new file mode 100644
index 0000000..83db422
--- /dev/null
+++ b/src/include_v4/gc_hal_version.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+#ifndef __gc_hal_version_h_
+#define __gc_hal_version_h_
+
+#define gcvVERSION_MAJOR 4
+
+#define gcvVERSION_MINOR 6
+
+#define gcvVERSION_PATCH 6
+
+#define gcvVERSION_BUILD 1381
+
+#define gcvVERSION_DATE __DATE__
+
+#define gcvVERSION_TIME __TIME__
+
+#endif /* __gc_hal_version_h_ */
diff --git a/src/include_v4/gc_hal_vg.h b/src/include_v4/gc_hal_vg.h
new file mode 100644
index 0000000..2060170
--- /dev/null
+++ b/src/include_v4/gc_hal_vg.h
@@ -0,0 +1,933 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+
+
+
+
+
+
+#ifndef __gc_hal_vg_h_
+#define __gc_hal_vg_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "gc_hal_rename.h"
+#include "gc_hal_types.h"
+#include "gc_hal_enum.h"
+#include "gc_hal_base.h"
+
+#if gcdENABLE_VG
+
+/* Thread routine type. */
+#if defined(LINUX)
+ typedef gctINT gctTHREADFUNCRESULT;
+ typedef gctPOINTER gctTHREADFUNCPARAMETER;
+# define gctTHREADFUNCTYPE
+#elif defined(WIN32)
+ typedef gctUINT gctTHREADFUNCRESULT;
+ typedef gctPOINTER gctTHREADFUNCPARAMETER;
+# define gctTHREADFUNCTYPE __stdcall
+#elif defined(__QNXNTO__)
+ typedef void * gctTHREADFUNCRESULT;
+ typedef gctPOINTER gctTHREADFUNCPARAMETER;
+# define gctTHREADFUNCTYPE
+#endif
+
+typedef gctTHREADFUNCRESULT (gctTHREADFUNCTYPE * gctTHREADFUNC) (
+ gctTHREADFUNCPARAMETER ThreadParameter
+ );
+
+
+#if defined(gcvDEBUG)
+# undef gcvDEBUG
+#endif
+
+#define gcdFORCE_DEBUG 0
+#define gcdFORCE_MESSAGES 0
+
+
+#if DBG || defined(DEBUG) || defined(_DEBUG) || gcdFORCE_DEBUG
+# define gcvDEBUG 1
+#else
+# define gcvDEBUG 0
+#endif
+
+#define _gcmERROR_RETURN(prefix, func) \
+ status = func; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ prefix##PRINT_VERSION(); \
+ prefix##TRACE(gcvLEVEL_ERROR, \
+ #prefix "ERR_RETURN: status=%d(%s) @ %s(%d)", \
+ status, gcoOS_DebugStatus2Name(status), __FUNCTION__, __LINE__); \
+ return status; \
+ } \
+ do { } while (gcvFALSE)
+
+#define gcmERROR_RETURN(func) _gcmERROR_RETURN(gcm, func)
+
+#define gcmLOG_LOCATION()
+
+#define gcmkIS_ERROR(status) (status < 0)
+
+#define gcmALIGNDOWN(n, align) \
+( \
+ (n) & ~((align) - 1) \
+)
+
+#define gcmIS_VALID_INDEX(Index, Array) \
+ (((gctUINT) (Index)) < gcmCOUNTOF(Array))
+
+
+#define gcmIS_NAN(x) \
+( \
+ ((* (gctUINT32_PTR) &(x)) & 0x7FFFFFFF) == 0x7FFFFFFF \
+)
+
+#define gcmLERP(v1, v2, w) \
+ ((v1) * (w) + (v2) * (1.0f - (w)))
+
+#define gcmINTERSECT(Start1, Start2, Length) \
+ (gcmABS((Start1) - (Start2)) < (Length))
+
+/*******************************************************************************
+**
+** gcmERR_GOTO
+**
+** Prints a message and terminates the current loop on error.
+**
+** ASSUMPTIONS:
+**
+** 'status' variable of gceSTATUS type must be defined.
+**
+** ARGUMENTS:
+**
+** Function
+** Function to evaluate.
+*/
+
+#define gcmERR_GOTO(Function) \
+ status = Function; \
+ if (gcmIS_ERROR(status)) \
+ { \
+ gcmTRACE( \
+ gcvLEVEL_ERROR, \
+ "gcmERR_GOTO: status=%d @ line=%d in function %s.\n", \
+ status, __LINE__, __FUNCTION__ \
+ ); \
+ goto ErrorHandler; \
+ }
+
+#if gcvDEBUG || gcdFORCE_MESSAGES
+# define gcmVERIFY_BOOLEAN(Expression) \
+ gcmASSERT( \
+ ( (Expression) == gcvFALSE ) || \
+ ( (Expression) == gcvTRUE ) \
+ )
+#else
+# define gcmVERIFY_BOOLEAN(Expression)
+#endif
+
+/*******************************************************************************
+**
+** gcmVERIFYFIELDFIT
+**
+** Verify whether the value fits in the field.
+**
+** ARGUMENTS:
+**
+** data Data value.
+** reg Name of register.
+** field Name of field within register.
+** value Value for field.
+*/
+#define gcmVERIFYFIELDFIT(reg, field, value) \
+ gcmASSERT( \
+ (value) <= gcmFIELDMAX(reg, field) \
+ )
+/*******************************************************************************
+**
+** gcmFIELDMAX
+**
+** Get field maximum value.
+**
+** ARGUMENTS:
+**
+** reg Name of register.
+** field Name of field within register.
+*/
+#define gcmFIELDMAX(reg, field) \
+( \
+ (gctUINT32) \
+ ( \
+ (__gcmGETSIZE(reg##_##field) == 32) \
+ ? ~0 \
+ : (~(~0 << __gcmGETSIZE(reg##_##field))) \
+ ) \
+)
+
+
+/* ANSI C does not have the 'f' functions, define replacements here. */
+#define gcmSINF(x) ((gctFLOAT) sin(x))
+#define gcmCOSF(x) ((gctFLOAT) cos(x))
+#define gcmASINF(x) ((gctFLOAT) asin(x))
+#define gcmACOSF(x) ((gctFLOAT) acos(x))
+#define gcmSQRTF(x) ((gctFLOAT) sqrt(x))
+#define gcmFABSF(x) ((gctFLOAT) fabs(x))
+#define gcmFMODF(x, y) ((gctFLOAT) fmod((x), (y)))
+#define gcmCEILF(x) ((gctFLOAT) ceil(x))
+#define gcmFLOORF(x) ((gctFLOAT) floor(x))
+
+
+
+/* Fixed point constants. */
+#define gcvZERO_X ((gctFIXED_POINT) 0x00000000)
+#define gcvHALF_X ((gctFIXED_POINT) 0x00008000)
+#define gcvONE_X ((gctFIXED_POINT) 0x00010000)
+#define gcvNEGONE_X ((gctFIXED_POINT) 0xFFFF0000)
+#define gcvTWO_X ((gctFIXED_POINT) 0x00020000)
+
+/* Integer constants. */
+#define gcvMAX_POS_INT ((gctINT) 0x7FFFFFFF)
+#define gcvMAX_NEG_INT ((gctINT) 0x80000000)
+
+/* Float constants. */
+#define gcvMAX_POS_FLOAT ((gctFLOAT) 3.4028235e+038)
+#define gcvMAX_NEG_FLOAT ((gctFLOAT) -3.4028235e+038)
+
+/******************************************************************************\
+***************************** Miscellaneous Macro ******************************
+\******************************************************************************/
+
+#define gcmKB2BYTES(Kilobyte) \
+( \
+ (Kilobyte) << 10 \
+)
+
+#define gcmMB2BYTES(Megabyte) \
+( \
+ (Megabyte) << 20 \
+)
+
+#define gcmMAT(Matrix, Row, Column) \
+( \
+ (Matrix) [(Row) * 3 + (Column)] \
+)
+
+#define gcmMAKE2CHAR(Char1, Char2) \
+( \
+ ((gctUINT16) (gctUINT8) (Char1) << 0) | \
+ ((gctUINT16) (gctUINT8) (Char2) << 8) \
+)
+
+#define gcmMAKE4CHAR(Char1, Char2, Char3, Char4) \
+( \
+ ((gctUINT32)(gctUINT8) (Char1) << 0) | \
+ ((gctUINT32)(gctUINT8) (Char2) << 8) | \
+ ((gctUINT32)(gctUINT8) (Char3) << 16) | \
+ ((gctUINT32)(gctUINT8) (Char4) << 24) \
+)
+
+/* some platforms need to fix the physical address for HW to access*/
+#ifdef __QNXNTO__
+
+gcmINLINE static gctUINT32 _qnxFixAddress(gctUINT32 Address)
+{
+ gctUINT32 baseAddress = 0;
+
+ if (gcmIS_ERROR(gcoOS_GetBaseAddress(gcvNULL, &baseAddress)))
+ {
+ baseAddress = 0;
+ }
+
+ return Address + baseAddress;
+}
+
+#define gcmFIXADDRESS _qnxFixAddress
+
+gcmINLINE static gctUINT32 _qnxkFixAddress(gctUINT32 Address)
+{
+ extern unsigned long baseAddress;
+ return Address + baseAddress;
+}
+
+#define gcmkFIXADDRESS _qnxkFixAddress
+
+#else
+
+#define gcmFIXADDRESS(address) \
+(\
+ (address)\
+)
+
+#define gcmkFIXADDRESS(address) \
+(\
+ (address)\
+)
+
+#endif
+
+/******************************************************************************\
+****************************** Kernel Debug Macro ******************************
+\******************************************************************************/
+
+/* Set signal to signaled state for specified process. */
+gceSTATUS
+gckOS_SetSignal(
+ IN gckOS Os,
+ IN gctHANDLE Process,
+ IN gctSIGNAL Signal
+ );
+
+/* Return the kernel logical pointer for the given physical one. */
+gceSTATUS
+gckOS_GetKernelLogical(
+ IN gckOS Os,
+ IN gctUINT32 Address,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/* Return the kernel logical pointer for the given physical one. */
+gceSTATUS
+gckOS_GetKernelLogicalEx(
+ IN gckOS Os,
+ IN gceCORE Core,
+ IN gctUINT32 Address,
+ OUT gctPOINTER * KernelPointer
+ );
+
+/*----------------------------------------------------------------------------*/
+/*----------------------------- Semaphore Object -----------------------------*/
+
+/* Increment the value of a semaphore. */
+gceSTATUS
+gckOS_IncrementSemaphore(
+ IN gckOS Os,
+ IN gctSEMAPHORE Semaphore
+ );
+
+/* Decrement the value of a semaphore (waiting might occur). */
+gceSTATUS
+gckOS_DecrementSemaphore(
+ IN gckOS Os,
+ IN gctSEMAPHORE Semaphore
+ );
+
+
+/*----------------------------------------------------------------------------*/
+/*------------------------------- Thread Object ------------------------------*/
+
+/* Start a thread. */
+gceSTATUS
+gckOS_StartThread(
+ IN gckOS Os,
+ IN gctTHREADFUNC ThreadFunction,
+ IN gctPOINTER ThreadParameter,
+ OUT gctTHREAD * Thread
+ );
+
+/* Stop a thread. */
+gceSTATUS
+gckOS_StopThread(
+ IN gckOS Os,
+ IN gctTHREAD Thread
+ );
+
+/* Verify whether the thread is still running. */
+gceSTATUS
+gckOS_VerifyThread(
+ IN gckOS Os,
+ IN gctTHREAD Thread
+ );
+
+
+/* Construct a new gckVGKERNEL object. */
+gceSTATUS
+gckVGKERNEL_Construct(
+ IN gckOS Os,
+ IN gctPOINTER Context,
+ IN gckKERNEL inKernel,
+ OUT gckVGKERNEL * Kernel
+ );
+
+/* Destroy an gckVGKERNEL object. */
+gceSTATUS
+gckVGKERNEL_Destroy(
+ IN gckVGKERNEL Kernel
+ );
+
+/* Allocate linear video memory. */
+gceSTATUS
+gckKERNEL_AllocateLinearMemory(
+ IN gckKERNEL Kernel,
+ IN OUT gcePOOL * Pool,
+ IN gctSIZE_T Bytes,
+ IN gctSIZE_T Alignment,
+ IN gceSURF_TYPE Type,
+ OUT gcuVIDMEM_NODE_PTR * Node
+ );
+
+/* Unmap memory. */
+gceSTATUS
+gckKERNEL_UnmapMemory(
+ IN gckKERNEL Kernel,
+ IN gctPHYS_ADDR Physical,
+ IN gctSIZE_T Bytes,
+ IN gctPOINTER Logical
+ );
+
+/* Dispatch a user-level command. */
+gceSTATUS
+gckVGKERNEL_Dispatch(
+ IN gckKERNEL Kernel,
+ IN gctBOOL FromUser,
+ IN OUT struct _gcsHAL_INTERFACE * Interface
+ );
+
+/* Query command buffer requirements. */
+gceSTATUS
+gckKERNEL_QueryCommandBuffer(
+ IN gckKERNEL Kernel,
+ OUT gcsCOMMAND_BUFFER_INFO_PTR Information
+ );
+
+#if gcdDYNAMIC_MAP_RESERVED_MEMORY
+gceSTATUS
+gckOS_MapReservedMemoryToKernel(
+ IN gckOS Os,
+ IN gctUINT32 Physical,
+ IN gctINT Bytes,
+ IN OUT gctPOINTER *Virtual
+ );
+
+gceSTATUS
+gckOS_UnmapReservedMemoryFromKernel(
+ IN gctPOINTER Virtual
+ );
+#endif
+
+/******************************************************************************\
+******************************* gckVGHARDWARE Object ******************************
+\******************************************************************************/
+
+/* Construct a new gckVGHARDWARE object. */
+gceSTATUS
+gckVGHARDWARE_Construct(
+ IN gckOS Os,
+ OUT gckVGHARDWARE * Hardware
+ );
+
+/* Destroy an gckVGHARDWARE object. */
+gceSTATUS
+gckVGHARDWARE_Destroy(
+ IN gckVGHARDWARE Hardware
+ );
+
+/* Query system memory requirements. */
+gceSTATUS
+gckVGHARDWARE_QuerySystemMemory(
+ IN gckVGHARDWARE Hardware,
+ OUT gctSIZE_T * SystemSize,
+ OUT gctUINT32 * SystemBaseAddress
+ );
+
+/* Build virtual address. */
+gceSTATUS
+gckVGHARDWARE_BuildVirtualAddress(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Index,
+ IN gctUINT32 Offset,
+ OUT gctUINT32 * Address
+ );
+
+/* Kickstart the command processor. */
+gceSTATUS
+gckVGHARDWARE_Execute(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Address,
+ IN gctSIZE_T Count
+ );
+
+/* Query the available memory. */
+gceSTATUS
+gckVGHARDWARE_QueryMemory(
+ IN gckVGHARDWARE Hardware,
+ OUT gctSIZE_T * InternalSize,
+ OUT gctUINT32 * InternalBaseAddress,
+ OUT gctUINT32 * InternalAlignment,
+ OUT gctSIZE_T * ExternalSize,
+ OUT gctUINT32 * ExternalBaseAddress,
+ OUT gctUINT32 * ExternalAlignment,
+ OUT gctUINT32 * HorizontalTileSize,
+ OUT gctUINT32 * VerticalTileSize
+ );
+
+/* Query the identity of the hardware. */
+gceSTATUS
+gckVGHARDWARE_QueryChipIdentity(
+ IN gckVGHARDWARE Hardware,
+ OUT gceCHIPMODEL* ChipModel,
+ OUT gctUINT32* ChipRevision,
+ OUT gctUINT32* ChipFeatures,
+ OUT gctUINT32* ChipMinorFeatures,
+ OUT gctUINT32* ChipMinorFeatures1
+ );
+
+/* Convert an API format. */
+gceSTATUS
+gckVGHARDWARE_ConvertFormat(
+ IN gckVGHARDWARE Hardware,
+ IN gceSURF_FORMAT Format,
+ OUT gctUINT32 * BitsPerPixel,
+ OUT gctUINT32 * BytesPerTile
+ );
+
+/* Split a harwdare specific address into API stuff. */
+gceSTATUS
+gckVGHARDWARE_SplitMemory(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Address,
+ OUT gcePOOL * Pool,
+ OUT gctUINT32 * Offset
+ );
+
+/* Align size to tile boundary. */
+gceSTATUS
+gckVGHARDWARE_AlignToTile(
+ IN gckVGHARDWARE Hardware,
+ IN gceSURF_TYPE Type,
+ IN OUT gctUINT32_PTR Width,
+ IN OUT gctUINT32_PTR Height
+ );
+
+/* Convert logical address to hardware specific address. */
+gceSTATUS
+gckVGHARDWARE_ConvertLogical(
+ IN gckVGHARDWARE Hardware,
+ IN gctPOINTER Logical,
+ OUT gctUINT32 * Address
+ );
+
+/* Program MMU. */
+gceSTATUS
+gckVGHARDWARE_SetMMU(
+ IN gckVGHARDWARE Hardware,
+ IN gctPOINTER Logical
+ );
+
+/* Flush the MMU. */
+gceSTATUS
+gckVGHARDWARE_FlushMMU(
+ IN gckVGHARDWARE Hardware
+ );
+
+/* Get idle register. */
+gceSTATUS
+gckVGHARDWARE_GetIdle(
+ IN gckVGHARDWARE Hardware,
+ OUT gctUINT32 * Data
+ );
+
+/* Flush the caches. */
+gceSTATUS
+gckVGHARDWARE_Flush(
+ IN gckVGHARDWARE Hardware,
+ IN gceKERNEL_FLUSH Flush,
+ IN gctPOINTER Logical,
+ IN OUT gctSIZE_T * Bytes
+ );
+
+/* Enable/disable fast clear. */
+gceSTATUS
+gckVGHARDWARE_SetFastClear(
+ IN gckVGHARDWARE Hardware,
+ IN gctINT Enable
+ );
+
+gceSTATUS
+gckVGHARDWARE_ReadInterrupt(
+ IN gckVGHARDWARE Hardware,
+ OUT gctUINT32_PTR IDs
+ );
+
+/* Power management. */
+gceSTATUS
+gckVGHARDWARE_SetPowerManagementState(
+ IN gckVGHARDWARE Hardware,
+ IN gceCHIPPOWERSTATE State
+ );
+
+gceSTATUS
+gckVGHARDWARE_QueryPowerManagementState(
+ IN gckVGHARDWARE Hardware,
+ OUT gceCHIPPOWERSTATE* State
+ );
+
+gceSTATUS
+gckVGHARDWARE_SetPowerOffTimeout(
+ IN gckVGHARDWARE Hardware,
+ IN gctUINT32 Timeout
+ );
+
+gceSTATUS
+gckVGHARDWARE_QueryPowerOffTimeout(
+ IN gckVGHARDWARE Hardware,
+ OUT gctUINT32* Timeout
+ );
+
+gceSTATUS
+gckVGHARDWARE_QueryIdle(
+ IN gckVGHARDWARE Hardware,
+ OUT gctBOOL_PTR IsIdle
+ );
+/******************************************************************************\
+*************************** Command Buffer Structures **************************
+\******************************************************************************/
+
+/* Vacant command buffer marker. */
+#define gcvVACANT_BUFFER ((gcsCOMPLETION_SIGNAL_PTR) (1))
+
+/* Command buffer header. */
+typedef struct _gcsCMDBUFFER * gcsCMDBUFFER_PTR;
+typedef struct _gcsCMDBUFFER
+{
+ /* Pointer to the completion signal. */
+ gcsCOMPLETION_SIGNAL_PTR completion;
+
+ /* The user sets this to the node of the container buffer whitin which
+ this particular command buffer resides. The kernel sets this to the
+ node of the internally allocated buffer. */
+ gcuVIDMEM_NODE_PTR node;
+
+ /* Command buffer hardware address. */
+ gctUINT32 address;
+
+ /* The offset of the buffer from the beginning of the header. */
+ gctUINT32 bufferOffset;
+
+ /* Size of the area allocated for the data portion of this particular
+ command buffer (headers and tail reserves are excluded). */
+ gctSIZE_T size;
+
+ /* Offset into the buffer [0..size]; reflects exactly how much data has
+ been put into the command buffer. */
+ gctUINT offset;
+
+ /* The number of command units in the buffer for the hardware to
+ execute. */
+ gctSIZE_T dataCount;
+
+ /* MANAGED BY : user HAL (gcoBUFFER object).
+ USED BY : user HAL (gcoBUFFER object).
+ Points to the immediate next allocated command buffer. */
+ gcsCMDBUFFER_PTR nextAllocated;
+
+ /* MANAGED BY : user layers (HAL and drivers).
+ USED BY : kernel HAL (gcoBUFFER object).
+ Points to the next subbuffer if any. A family of subbuffers are chained
+ together and are meant to be executed inseparably as a unit. Meaning
+ that context switching cannot occur while a chain of subbuffers is being
+ executed. */
+ gcsCMDBUFFER_PTR nextSubBuffer;
+}
+gcsCMDBUFFER;
+
+/* Command queue element. */
+typedef struct _gcsVGCMDQUEUE
+{
+ /* Pointer to the command buffer header. */
+ gcsCMDBUFFER_PTR commandBuffer;
+
+ /* Dynamic vs. static command buffer state. */
+ gctBOOL dynamic;
+}
+gcsVGCMDQUEUE;
+
+/* Context map entry. */
+typedef struct _gcsVGCONTEXT_MAP
+{
+ /* State index. */
+ gctUINT32 index;
+
+ /* New state value. */
+ gctUINT32 data;
+
+ /* Points to the next entry in the mod list. */
+ gcsVGCONTEXT_MAP_PTR next;
+}
+gcsVGCONTEXT_MAP;
+
+/* gcsVGCONTEXT structure that holds the current context. */
+typedef struct _gcsVGCONTEXT
+{
+ /* Context ID. */
+ gctUINT64 id;
+
+ /* State caching ebable flag. */
+ gctBOOL stateCachingEnabled;
+
+ /* Current pipe. */
+ gctUINT32 currentPipe;
+
+ /* State map/mod buffer. */
+ gctSIZE_T mapFirst;
+ gctSIZE_T mapLast;
+#ifdef __QNXNTO__
+ gctSIZE_T mapContainerSize;
+#endif
+ gcsVGCONTEXT_MAP_PTR mapContainer;
+ gcsVGCONTEXT_MAP_PTR mapPrev;
+ gcsVGCONTEXT_MAP_PTR mapCurr;
+ gcsVGCONTEXT_MAP_PTR firstPrevMap;
+ gcsVGCONTEXT_MAP_PTR firstCurrMap;
+
+ /* Main context buffer. */
+ gcsCMDBUFFER_PTR header;
+ gctUINT32_PTR buffer;
+
+ /* Completion signal. */
+ gctHANDLE process;
+ gctSIGNAL signal;
+
+#if defined(__QNXNTO__)
+ gctINT32 coid;
+ gctINT32 rcvid;
+#endif
+}
+gcsVGCONTEXT;
+
+/* User space task header. */
+typedef struct _gcsTASK * gcsTASK_PTR;
+typedef struct _gcsTASK
+{
+ /* Pointer to the next task for the same interrupt in user space. */
+ gcsTASK_PTR next;
+
+ /* Size of the task data that immediately follows the structure. */
+ gctUINT size;
+
+ /* Task data starts here. */
+ /* ... */
+}
+gcsTASK;
+
+/* User space task master table entry. */
+typedef struct _gcsTASK_MASTER_ENTRY * gcsTASK_MASTER_ENTRY_PTR;
+typedef struct _gcsTASK_MASTER_ENTRY
+{
+ /* Pointers to the head and to the tail of the task chain. */
+ gcsTASK_PTR head;
+ gcsTASK_PTR tail;
+}
+gcsTASK_MASTER_ENTRY;
+
+/* User space task master table entry. */
+typedef struct _gcsTASK_MASTER_TABLE
+{
+ /* Table with one entry per block. */
+ gcsTASK_MASTER_ENTRY table[gcvBLOCK_COUNT];
+
+ /* The total number of tasks sckeduled. */
+ gctUINT count;
+
+ /* The total size of event data in bytes. */
+ gctUINT size;
+
+#if defined(__QNXNTO__)
+ gctINT32 coid;
+ gctINT32 rcvid;
+#endif
+}
+gcsTASK_MASTER_TABLE;
+
+/******************************************************************************\
+***************************** gckVGINTERRUPT Object ******************************
+\******************************************************************************/
+
+typedef struct _gckVGINTERRUPT * gckVGINTERRUPT;
+
+typedef gceSTATUS (* gctINTERRUPT_HANDLER)(
+ IN gckVGKERNEL Kernel
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Construct(
+ IN gckVGKERNEL Kernel,
+ OUT gckVGINTERRUPT * Interrupt
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Destroy(
+ IN gckVGINTERRUPT Interrupt
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Enable(
+ IN gckVGINTERRUPT Interrupt,
+ IN OUT gctINT32_PTR Id,
+ IN gctINTERRUPT_HANDLER Handler
+ );
+
+gceSTATUS
+gckVGINTERRUPT_Disable(
+ IN gckVGINTERRUPT Interrupt,
+ IN gctINT32 Id
+ );
+
+#ifndef __QNXNTO__
+
+gceSTATUS
+gckVGINTERRUPT_Enque(
+ IN gckVGINTERRUPT Interrupt
+ );
+
+#else
+
+gceSTATUS
+gckVGINTERRUPT_Enque(
+ IN gckVGINTERRUPT Interrupt,
+ OUT gckOS *Os,
+ OUT gctSEMAPHORE *Semaphore
+ );
+
+#endif
+
+gceSTATUS
+gckVGINTERRUPT_DumpState(
+ IN gckVGINTERRUPT Interrupt
+ );
+
+
+/******************************************************************************\
+******************************* gckVGCOMMAND Object *******************************
+\******************************************************************************/
+
+typedef struct _gckVGCOMMAND * gckVGCOMMAND;
+
+/* Construct a new gckVGCOMMAND object. */
+gceSTATUS
+gckVGCOMMAND_Construct(
+ IN gckVGKERNEL Kernel,
+ IN gctUINT TaskGranularity,
+ IN gctUINT QueueSize,
+ OUT gckVGCOMMAND * Command
+ );
+
+/* Destroy an gckVGCOMMAND object. */
+gceSTATUS
+gckVGCOMMAND_Destroy(
+ IN gckVGCOMMAND Command
+ );
+
+/* Query command buffer attributes. */
+gceSTATUS
+gckVGCOMMAND_QueryCommandBuffer(
+ IN gckVGCOMMAND Command,
+ OUT gcsCOMMAND_BUFFER_INFO_PTR Information
+ );
+
+/* Allocate a command queue. */
+gceSTATUS
+gckVGCOMMAND_Allocate(
+ IN gckVGCOMMAND Command,
+ IN gctSIZE_T Size,
+ OUT gcsCMDBUFFER_PTR * CommandBuffer,
+ OUT gctPOINTER * Data
+ );
+
+/* Release memory held by the command queue. */
+gceSTATUS
+gckVGCOMMAND_Free(
+ IN gckVGCOMMAND Command,
+ IN gcsCMDBUFFER_PTR CommandBuffer
+ );
+
+/* Schedule the command queue for execution. */
+gceSTATUS
+gckVGCOMMAND_Execute(
+ IN gckVGCOMMAND Command,
+ IN gcsCMDBUFFER_PTR CommandBuffer
+ );
+
+/* Commit a buffer to the command queue. */
+gceSTATUS
+gckVGCOMMAND_Commit(
+ IN gckVGCOMMAND Command,
+ IN gcsVGCONTEXT_PTR Context,
+ IN gcsVGCMDQUEUE_PTR Queue,
+ IN gctUINT EntryCount,
+ IN gcsTASK_MASTER_TABLE_PTR TaskTable
+ );
+
+/******************************************************************************\
+********************************* gckVGMMU Object ********************************
+\******************************************************************************/
+
+typedef struct _gckVGMMU * gckVGMMU;
+
+/* Construct a new gckVGMMU object. */
+gceSTATUS
+gckVGMMU_Construct(
+ IN gckVGKERNEL Kernel,
+ IN gctSIZE_T MmuSize,
+ OUT gckVGMMU * Mmu
+ );
+
+/* Destroy an gckVGMMU object. */
+gceSTATUS
+gckVGMMU_Destroy(
+ IN gckVGMMU Mmu
+ );
+
+/* Allocate pages inside the MMU. */
+gceSTATUS
+gckVGMMU_AllocatePages(
+ IN gckVGMMU Mmu,
+ IN gctSIZE_T PageCount,
+ OUT gctPOINTER * PageTable,
+ OUT gctUINT32 * Address
+ );
+
+/* Remove a page table from the MMU. */
+gceSTATUS
+gckVGMMU_FreePages(
+ IN gckVGMMU Mmu,
+ IN gctPOINTER PageTable,
+ IN gctSIZE_T PageCount
+ );
+
+/* Set the MMU page with info. */
+gceSTATUS
+gckVGMMU_SetPage(
+ IN gckVGMMU Mmu,
+ IN gctUINT32 PageAddress,
+ IN gctUINT32 *PageEntry
+ );
+
+#endif /* gcdENABLE_VG */
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __gc_hal_h_ */
diff --git a/src/include_v4_uapi/gc_abi.h b/src/include_v4_uapi/gc_abi.h
new file mode 100644
index 0000000..bfcf37a
--- /dev/null
+++ b/src/include_v4_uapi/gc_abi.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/** Kernel ABI definition file for Etna **/
+//#define GCABI_USER_SIGNAL_HAS_TYPE
+//#define GCABI_CONTEXT_HAS_PHYSICAL
+#define GCABI_HAS_MINOR_FEATURES_2
+#define GCABI_HAS_MINOR_FEATURES_3
+
+#define GCABI_CHIPIDENTITY_EXT
+
+// One of these must be set:
+//#define GCABI_HAS_CONTEXT
+#define GCABI_HAS_STATE_DELTAS
+
+#define GCABI_HAS_HARDWARE_TYPE
+
+/* IOCTL structure for userspace driver*/
+typedef struct
+{
+ void *in_buf;
+ unsigned int in_buf_size;
+ void *out_buf;
+ unsigned int out_buf_size;
+} vivante_ioctl_data_t;
+
+#include "gc_hal.h"
+
diff --git a/src/include_v4_uapi/gc_hal.h b/src/include_v4_uapi/gc_hal.h
new file mode 100644
index 0000000..88e54d0
--- /dev/null
+++ b/src/include_v4_uapi/gc_hal.h
@@ -0,0 +1,1595 @@
+/****************************************************************************
+*
+* Copyright (C) 2005 - 2012 by Vivante Corp.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the license, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*****************************************************************************/
+#ifndef __gc_hal_h_
+#define __gc_hal_h_
+
+#include <linux/types.h>
+
+/* Mark dummy fields, this can be defined to empty to remove unnecessary
+ * fields, but that will lose compatibilty with the blob */
+#define VIV_DUMMY(type, name) type name##_dummy;
+/* Documentation-only defines */
+#define IN
+#define OUT
+#define OPTIONAL
+
+/******************************************************************************\
+*********************************** Options ***********************************
+\******************************************************************************/
+
+/* The number of context buffers per user. */
+#define gcdCONTEXT_BUFFER_COUNT 2
+
+/* Length of profile file name */
+#define gcdMAX_PROFILE_FILE_NAME 128
+
+/*
+ VIVANTE_PROFILER
+
+ This define enables the profiler.
+*/
+#ifndef VIVANTE_PROFILER
+# define VIVANTE_PROFILER 0
+#endif
+
+/*
+ gcdSECURE_USER
+
+ Use logical addresses instead of physical addresses in user land. In
+ this case a hint table is created for both command buffers and context
+ buffers, and that hint table will be used to patch up those buffers in
+ the kernel when they are ready to submit.
+*/
+#ifndef gcdSECURE_USER
+# define gcdSECURE_USER 0
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef union _gcuVIDMEM_NODE *gcuVIDMEM_NODE_PTR;
+typedef void *gctPHYS_ADDR;
+typedef void *gctHANDLE;
+typedef void *gctSIGNAL;
+typedef struct _gckCONTEXT *gckCONTEXT;
+typedef struct _gcoCMDBUF *gcoCMDBUF;
+
+/******************************************************************************\
+******************************* I/O Control Codes ******************************
+\******************************************************************************/
+
+#define IOCTL_GCHAL_INTERFACE 30000
+#define IOCTL_GCHAL_KERNEL_INTERFACE 30001
+#define IOCTL_GCHAL_TERMINATE 30002
+
+/******************************************************************************\
+********************************* Command Codes ********************************
+\******************************************************************************/
+
+typedef enum _gceHAL_COMMAND_CODES
+{
+ /* Generic query. */
+ gcvHAL_QUERY_VIDEO_MEMORY,
+ gcvHAL_QUERY_CHIP_IDENTITY,
+
+ /* Contiguous memory. */
+ gcvHAL_ALLOCATE_NON_PAGED_MEMORY,
+ gcvHAL_FREE_NON_PAGED_MEMORY,
+ gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY,
+ gcvHAL_FREE_CONTIGUOUS_MEMORY,
+
+ /* Video memory allocation. */
+ gcvHAL_ALLOCATE_VIDEO_MEMORY, /* Enforced alignment. */
+ gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY, /* No alignment. */
+ gcvHAL_FREE_VIDEO_MEMORY,
+
+ /* Physical-to-logical mapping. */
+ gcvHAL_MAP_MEMORY,
+ gcvHAL_UNMAP_MEMORY,
+
+ /* Logical-to-physical mapping. */
+ gcvHAL_MAP_USER_MEMORY,
+ gcvHAL_UNMAP_USER_MEMORY,
+
+ /* Surface lock/unlock. */
+ gcvHAL_LOCK_VIDEO_MEMORY,
+ gcvHAL_UNLOCK_VIDEO_MEMORY,
+
+ /* Event queue. */
+ gcvHAL_EVENT_COMMIT,
+
+ gcvHAL_USER_SIGNAL,
+ gcvHAL_SIGNAL,
+ gcvHAL_WRITE_DATA,
+
+ gcvHAL_COMMIT,
+ gcvHAL_STALL,
+
+ gcvHAL_READ_REGISTER,
+ gcvHAL_WRITE_REGISTER,
+
+ gcvHAL_GET_PROFILE_SETTING,
+ gcvHAL_SET_PROFILE_SETTING,
+
+ gcvHAL_READ_ALL_PROFILE_REGISTERS,
+ gcvHAL_PROFILE_REGISTERS_2D,
+
+ /* Power management. */
+ gcvHAL_SET_POWER_MANAGEMENT_STATE,
+ gcvHAL_QUERY_POWER_MANAGEMENT_STATE,
+
+ gcvHAL_GET_BASE_ADDRESS,
+
+ gcvHAL_SET_IDLE, /* reserved */
+
+ /* Queries. */
+ gcvHAL_QUERY_KERNEL_SETTINGS,
+
+ /* Reset. */
+ gcvHAL_RESET,
+
+ /* Map physical address into handle. */
+ gcvHAL_MAP_PHYSICAL,
+
+ /* Debugger stuff. */
+ gcvHAL_DEBUG,
+
+ /* Cache stuff. */
+ gcvHAL_CACHE,
+
+ /* TimeStamp */
+ gcvHAL_TIMESTAMP,
+
+ /* Database. */
+ gcvHAL_DATABASE,
+
+ /* Version. */
+ gcvHAL_VERSION,
+
+ /* Chip info */
+ gcvHAL_CHIP_INFO,
+
+ /* Process attaching/detaching. */
+ gcvHAL_ATTACH,
+ gcvHAL_DETACH,
+
+ /* Composition. */
+ gcvHAL_COMPOSE,
+
+ /* Set timeOut value */
+ gcvHAL_SET_TIMEOUT,
+
+ /* Frame database. */
+ gcvHAL_GET_FRAME_INFO,
+
+ /* Shared info for each process */
+ gcvHAL_GET_SHARED_INFO,
+ gcvHAL_SET_SHARED_INFO,
+ gcvHAL_QUERY_COMMAND_BUFFER,
+
+ gcvHAL_COMMIT_DONE,
+
+ /* GPU and event dump */
+ gcvHAL_DUMP_GPU_STATE,
+ gcvHAL_DUMP_EVENT
+}
+gceHAL_COMMAND_CODES;
+
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+/* Status codes */
+typedef enum _gceSTATUS
+{
+ gcvSTATUS_OK = 0,
+ gcvSTATUS_FALSE = 0,
+ gcvSTATUS_TRUE = 1,
+ gcvSTATUS_NO_MORE_DATA = 2,
+ gcvSTATUS_CACHED = 3,
+ gcvSTATUS_MIPMAP_TOO_LARGE = 4,
+ gcvSTATUS_NAME_NOT_FOUND = 5,
+ gcvSTATUS_NOT_OUR_INTERRUPT = 6,
+ gcvSTATUS_MISMATCH = 7,
+ gcvSTATUS_MIPMAP_TOO_SMALL = 8,
+ gcvSTATUS_LARGER = 9,
+ gcvSTATUS_SMALLER = 10,
+ gcvSTATUS_CHIP_NOT_READY = 11,
+ gcvSTATUS_NEED_CONVERSION = 12,
+ gcvSTATUS_SKIP = 13,
+ gcvSTATUS_DATA_TOO_LARGE = 14,
+ gcvSTATUS_INVALID_CONFIG = 15,
+ gcvSTATUS_CHANGED = 16,
+ gcvSTATUS_NOT_SUPPORT_DITHER = 17,
+ gcvSTATUS_EXECUTED = 18,
+ gcvSTATUS_TERMINATE = 19,
+
+ gcvSTATUS_INVALID_ARGUMENT = -1,
+ gcvSTATUS_INVALID_OBJECT = -2,
+ gcvSTATUS_OUT_OF_MEMORY = -3,
+ gcvSTATUS_MEMORY_LOCKED = -4,
+ gcvSTATUS_MEMORY_UNLOCKED = -5,
+ gcvSTATUS_HEAP_CORRUPTED = -6,
+ gcvSTATUS_GENERIC_IO = -7,
+ gcvSTATUS_INVALID_ADDRESS = -8,
+ gcvSTATUS_CONTEXT_LOSSED = -9,
+ gcvSTATUS_TOO_COMPLEX = -10,
+ gcvSTATUS_BUFFER_TOO_SMALL = -11,
+ gcvSTATUS_INTERFACE_ERROR = -12,
+ gcvSTATUS_NOT_SUPPORTED = -13,
+ gcvSTATUS_MORE_DATA = -14,
+ gcvSTATUS_TIMEOUT = -15,
+ gcvSTATUS_OUT_OF_RESOURCES = -16,
+ gcvSTATUS_INVALID_DATA = -17,
+ gcvSTATUS_INVALID_MIPMAP = -18,
+ gcvSTATUS_NOT_FOUND = -19,
+ gcvSTATUS_NOT_ALIGNED = -20,
+ gcvSTATUS_INVALID_REQUEST = -21,
+ gcvSTATUS_GPU_NOT_RESPONDING = -22,
+ gcvSTATUS_TIMER_OVERFLOW = -23,
+ gcvSTATUS_VERSION_MISMATCH = -24,
+ gcvSTATUS_LOCKED = -25,
+ gcvSTATUS_INTERRUPTED = -26,
+ gcvSTATUS_DEVICE = -27,
+
+ /* Linker errors. */
+ gcvSTATUS_GLOBAL_TYPE_MISMATCH = -1000,
+ gcvSTATUS_TOO_MANY_ATTRIBUTES = -1001,
+ gcvSTATUS_TOO_MANY_UNIFORMS = -1002,
+ gcvSTATUS_TOO_MANY_VARYINGS = -1003,
+ gcvSTATUS_UNDECLARED_VARYING = -1004,
+ gcvSTATUS_VARYING_TYPE_MISMATCH = -1005,
+ gcvSTATUS_MISSING_MAIN = -1006,
+ gcvSTATUS_NAME_MISMATCH = -1007,
+ gcvSTATUS_INVALID_INDEX = -1008,
+ gcvSTATUS_UNIFORM_TYPE_MISMATCH = -1009,
+}
+gceSTATUS;
+
+/* Video memory pool type. */
+typedef enum _gcePOOL
+{
+ gcvPOOL_UNKNOWN = 0,
+ gcvPOOL_DEFAULT,
+ gcvPOOL_LOCAL,
+ gcvPOOL_LOCAL_INTERNAL,
+ gcvPOOL_LOCAL_EXTERNAL,
+ gcvPOOL_UNIFIED,
+ gcvPOOL_SYSTEM,
+ gcvPOOL_VIRTUAL,
+ gcvPOOL_USER,
+ gcvPOOL_CONTIGUOUS,
+
+ gcvPOOL_NUMBER_OF_POOLS
+}
+gcePOOL;
+
+/* Chip models. */
+typedef enum _gceCHIPMODEL
+{
+ gcv300 = 0x0300,
+ gcv320 = 0x0320,
+ gcv350 = 0x0350,
+ gcv355 = 0x0355,
+ gcv400 = 0x0400,
+ gcv410 = 0x0410,
+ gcv420 = 0x0420,
+ gcv450 = 0x0450,
+ gcv500 = 0x0500,
+ gcv530 = 0x0530,
+ gcv600 = 0x0600,
+ gcv700 = 0x0700,
+ gcv800 = 0x0800,
+ gcv860 = 0x0860,
+ gcv880 = 0x0880,
+ gcv1000 = 0x1000,
+ gcv2000 = 0x2000,
+ gcv2100 = 0x2100,
+ gcv4000 = 0x4000,
+}
+gceCHIPMODEL;
+
+/* Chip Power Status. */
+typedef enum _gceCHIPPOWERSTATE
+{
+ gcvPOWER_ON = 0,
+ gcvPOWER_OFF,
+ gcvPOWER_IDLE,
+ gcvPOWER_SUSPEND,
+ gcvPOWER_SUSPEND_ATPOWERON,
+ gcvPOWER_OFF_ATPOWERON,
+ gcvPOWER_IDLE_BROADCAST,
+ gcvPOWER_SUSPEND_BROADCAST,
+ gcvPOWER_OFF_BROADCAST,
+ gcvPOWER_OFF_RECOVERY,
+ gcvPOWER_OFF_TIMEOUT,
+ gcvPOWER_ON_AUTO
+}
+gceCHIPPOWERSTATE;
+
+/* CPU cache operations */
+typedef enum _gceCACHEOPERATION
+{
+ gcvCACHE_CLEAN = 0x01,
+ gcvCACHE_INVALIDATE = 0x02,
+ gcvCACHE_FLUSH = gcvCACHE_CLEAN | gcvCACHE_INVALIDATE,
+ gcvCACHE_MEMORY_BARRIER = 0x04
+}
+gceCACHEOPERATION;
+
+typedef enum _gceVIDMEM_NODE_SHARED_INFO_TYPE
+{
+ gcvVIDMEM_INFO_GENERIC,
+ gcvVIDMEM_INFO_DIRTY_RECTANGLE
+}
+gceVIDMEM_NODE_SHARED_INFO_TYPE;
+
+/* Surface types. */
+typedef enum _gceSURF_TYPE
+{
+ gcvSURF_TYPE_UNKNOWN = 0,
+ gcvSURF_INDEX,
+ gcvSURF_VERTEX,
+ gcvSURF_TEXTURE,
+ gcvSURF_RENDER_TARGET,
+ gcvSURF_DEPTH,
+ gcvSURF_BITMAP,
+ gcvSURF_TILE_STATUS,
+ gcvSURF_IMAGE,
+ gcvSURF_MASK,
+ gcvSURF_SCISSOR,
+ gcvSURF_HIERARCHICAL_DEPTH,
+ gcvSURF_NUM_TYPES, /* Make sure this is the last one! */
+
+ /* Combinations. */
+ gcvSURF_NO_TILE_STATUS = 0x100,
+ gcvSURF_NO_VIDMEM = 0x200, /* Used to allocate surfaces with no underlying vidmem node.
+ In Android, vidmem node is allocated by another process. */
+ gcvSURF_CACHEABLE = 0x400, /* Used to allocate a cacheable surface */
+
+ gcvSURF_RENDER_TARGET_NO_TILE_STATUS = gcvSURF_RENDER_TARGET
+ | gcvSURF_NO_TILE_STATUS,
+
+ gcvSURF_DEPTH_NO_TILE_STATUS = gcvSURF_DEPTH
+ | gcvSURF_NO_TILE_STATUS,
+
+ /* Supported surface types with no vidmem node. */
+ gcvSURF_BITMAP_NO_VIDMEM = gcvSURF_BITMAP
+ | gcvSURF_NO_VIDMEM,
+
+ gcvSURF_TEXTURE_NO_VIDMEM = gcvSURF_TEXTURE
+ | gcvSURF_NO_VIDMEM,
+
+ /* Cacheable surface types with no vidmem node. */
+ gcvSURF_CACHEABLE_BITMAP_NO_VIDMEM = gcvSURF_BITMAP_NO_VIDMEM
+ | gcvSURF_CACHEABLE,
+
+ gcvSURF_CACHEABLE_BITMAP = gcvSURF_BITMAP
+ | gcvSURF_CACHEABLE,
+}
+gceSURF_TYPE;
+
+/* Surface formats. */
+typedef enum _gceSURF_FORMAT
+{
+ /* Unknown format. */
+ gcvSURF_UNKNOWN = 0,
+
+ /* Palettized formats. */
+ gcvSURF_INDEX1 = 100,
+ gcvSURF_INDEX4,
+ gcvSURF_INDEX8,
+
+ /* RGB formats. */
+ gcvSURF_A2R2G2B2 = 200,
+ gcvSURF_R3G3B2,
+ gcvSURF_A8R3G3B2,
+ gcvSURF_X4R4G4B4,
+ gcvSURF_A4R4G4B4,
+ gcvSURF_R4G4B4A4,
+ gcvSURF_X1R5G5B5,
+ gcvSURF_A1R5G5B5,
+ gcvSURF_R5G5B5A1,
+ gcvSURF_R5G6B5,
+ gcvSURF_R8G8B8,
+ gcvSURF_X8R8G8B8,
+ gcvSURF_A8R8G8B8,
+ gcvSURF_R8G8B8A8,
+ gcvSURF_G8R8G8B8,
+ gcvSURF_R8G8B8G8,
+ gcvSURF_X2R10G10B10,
+ gcvSURF_A2R10G10B10,
+ gcvSURF_X12R12G12B12,
+ gcvSURF_A12R12G12B12,
+ gcvSURF_X16R16G16B16,
+ gcvSURF_A16R16G16B16,
+ gcvSURF_A32R32G32B32,
+ gcvSURF_R8G8B8X8,
+ gcvSURF_R5G5B5X1,
+ gcvSURF_R4G4B4X4,
+
+ /* BGR formats. */
+ gcvSURF_A4B4G4R4 = 300,
+ gcvSURF_A1B5G5R5,
+ gcvSURF_B5G6R5,
+ gcvSURF_B8G8R8,
+ gcvSURF_B16G16R16,
+ gcvSURF_X8B8G8R8,
+ gcvSURF_A8B8G8R8,
+ gcvSURF_A2B10G10R10,
+ gcvSURF_X16B16G16R16,
+ gcvSURF_A16B16G16R16,
+ gcvSURF_B32G32R32,
+ gcvSURF_X32B32G32R32,
+ gcvSURF_A32B32G32R32,
+ gcvSURF_B4G4R4A4,
+ gcvSURF_B5G5R5A1,
+ gcvSURF_B8G8R8X8,
+ gcvSURF_B8G8R8A8,
+ gcvSURF_X4B4G4R4,
+ gcvSURF_X1B5G5R5,
+ gcvSURF_B4G4R4X4,
+ gcvSURF_B5G5R5X1,
+ gcvSURF_X2B10G10R10,
+
+ /* Compressed formats. */
+ gcvSURF_DXT1 = 400,
+ gcvSURF_DXT2,
+ gcvSURF_DXT3,
+ gcvSURF_DXT4,
+ gcvSURF_DXT5,
+ gcvSURF_CXV8U8,
+ gcvSURF_ETC1,
+
+ /* YUV formats. */
+ gcvSURF_YUY2 = 500,
+ gcvSURF_UYVY,
+ gcvSURF_YV12,
+ gcvSURF_I420,
+ gcvSURF_NV12,
+ gcvSURF_NV21,
+ gcvSURF_NV16,
+ gcvSURF_NV61,
+ gcvSURF_YVYU,
+ gcvSURF_VYUY,
+
+ /* Depth formats. */
+ gcvSURF_D16 = 600,
+ gcvSURF_D24S8,
+ gcvSURF_D32,
+ gcvSURF_D24X8,
+
+ /* Alpha formats. */
+ gcvSURF_A4 = 700,
+ gcvSURF_A8,
+ gcvSURF_A12,
+ gcvSURF_A16,
+ gcvSURF_A32,
+ gcvSURF_A1,
+
+ /* Luminance formats. */
+ gcvSURF_L4 = 800,
+ gcvSURF_L8,
+ gcvSURF_L12,
+ gcvSURF_L16,
+ gcvSURF_L32,
+ gcvSURF_L1,
+
+ /* Alpha/Luminance formats. */
+ gcvSURF_A4L4 = 900,
+ gcvSURF_A2L6,
+ gcvSURF_A8L8,
+ gcvSURF_A4L12,
+ gcvSURF_A12L12,
+ gcvSURF_A16L16,
+
+ /* Bump formats. */
+ gcvSURF_L6V5U5 = 1000,
+ gcvSURF_V8U8,
+ gcvSURF_X8L8V8U8,
+ gcvSURF_Q8W8V8U8,
+ gcvSURF_A2W10V10U10,
+ gcvSURF_V16U16,
+ gcvSURF_Q16W16V16U16,
+
+ /* R/RG/RA formats. */
+ gcvSURF_R8 = 1100,
+ gcvSURF_X8R8,
+ gcvSURF_G8R8,
+ gcvSURF_X8G8R8,
+ gcvSURF_A8R8,
+ gcvSURF_R16,
+ gcvSURF_X16R16,
+ gcvSURF_G16R16,
+ gcvSURF_X16G16R16,
+ gcvSURF_A16R16,
+ gcvSURF_R32,
+ gcvSURF_X32R32,
+ gcvSURF_G32R32,
+ gcvSURF_X32G32R32,
+ gcvSURF_A32R32,
+ gcvSURF_RG16,
+
+ /* Floating point formats. */
+ gcvSURF_R16F = 1200,
+ gcvSURF_X16R16F,
+ gcvSURF_G16R16F,
+ gcvSURF_X16G16R16F,
+ gcvSURF_B16G16R16F,
+ gcvSURF_X16B16G16R16F,
+ gcvSURF_A16B16G16R16F,
+ gcvSURF_R32F,
+ gcvSURF_X32R32F,
+ gcvSURF_G32R32F,
+ gcvSURF_X32G32R32F,
+ gcvSURF_B32G32R32F,
+ gcvSURF_X32B32G32R32F,
+ gcvSURF_A32B32G32R32F,
+ gcvSURF_A16F,
+ gcvSURF_L16F,
+ gcvSURF_A16L16F,
+ gcvSURF_A16R16F,
+ gcvSURF_A32F,
+ gcvSURF_L32F,
+ gcvSURF_A32L32F,
+ gcvSURF_A32R32F,
+
+}
+gceSURF_FORMAT;
+
+/* Pipes. */
+typedef enum _gcePIPE_SELECT
+{
+ gcvPIPE_INVALID = ~0,
+ gcvPIPE_3D = 0,
+ gcvPIPE_2D
+}
+gcePIPE_SELECT;
+
+/* Hardware type. */
+typedef enum _gceHARDWARE_TYPE
+{
+ gcvHARDWARE_INVALID = 0x00,
+ gcvHARDWARE_3D = 0x01,
+ gcvHARDWARE_2D = 0x02,
+ gcvHARDWARE_VG = 0x04,
+
+ gcvHARDWARE_3D2D = gcvHARDWARE_3D | gcvHARDWARE_2D
+}
+gceHARDWARE_TYPE;
+
+#define gcdCHIP_COUNT 3
+
+/* User signal command codes. */
+typedef enum _gceUSER_SIGNAL_COMMAND_CODES
+{
+ gcvUSER_SIGNAL_CREATE,
+ gcvUSER_SIGNAL_DESTROY,
+ gcvUSER_SIGNAL_SIGNAL,
+ gcvUSER_SIGNAL_WAIT,
+ gcvUSER_SIGNAL_MAP,
+ gcvUSER_SIGNAL_UNMAP,
+}
+gceUSER_SIGNAL_COMMAND_CODES;
+
+/* Event locations. */
+typedef enum _gceKERNEL_WHERE
+{
+ gcvKERNEL_COMMAND,
+ gcvKERNEL_VERTEX,
+ gcvKERNEL_TRIANGLE,
+ gcvKERNEL_TEXTURE,
+ gcvKERNEL_PIXEL,
+}
+gceKERNEL_WHERE;
+
+/* gcdDUMP message type. */
+typedef enum _gceDEBUG_MESSAGE_TYPE
+{
+ gcvMESSAGE_TEXT,
+ gcvMESSAGE_DUMP
+}
+gceDEBUG_MESSAGE_TYPE;
+
+/* Macro to combine four characters into a Character Code. */
+#define gcmCC(c1, c2, c3, c4) \
+( \
+ (char) (c1) \
+ | \
+ ((char) (c2) << 8) \
+ | \
+ ((char) (c3) << 16) \
+ | \
+ ((char) (c4) << 24) \
+)
+
+/* Type of objects. */
+typedef enum _gceOBJECT_TYPE
+{
+ gcvOBJ_UNKNOWN = 0,
+ gcvOBJ_BUFFER = gcmCC('B','U','F','R'),
+ gcvOBJ_COMMAND = gcmCC('C','M','D',' '),
+ gcvOBJ_COMMANDBUFFER = gcmCC('C','M','D','B'),
+ gcvOBJ_CONTEXT = gcmCC('C','T','X','T'),
+ gcvOBJ_DEVICE = gcmCC('D','E','V',' '),
+ gcvOBJ_EVENT = gcmCC('E','V','N','T'),
+ gcvOBJ_HARDWARE = gcmCC('H','A','R','D'),
+ gcvOBJ_KERNEL = gcmCC('K','E','R','N'),
+ gcvOBJ_MMU = gcmCC('M','M','U',' '),
+ gcvOBJ_OS = gcmCC('O','S',' ',' '),
+ gcvOBJ_VIDMEM = gcmCC('V','M','E','M'),
+}
+gceOBJECT_TYPE;
+
+/******************************************************************************\
+****************************** Interface Structure *****************************
+\******************************************************************************/
+
+/* Kernel settings. */
+typedef struct _gcsKERNEL_SETTINGS
+{
+ /* Used RealTime signal between kernel and user. */
+ int signal;
+}
+gcsKERNEL_SETTINGS;
+
+
+/* gcvHAL_QUERY_CHIP_IDENTITY */
+typedef struct _gcsHAL_QUERY_CHIP_IDENTITY
+{
+
+ /* Chip model. */
+ gceCHIPMODEL chipModel;
+
+ /* Revision value.*/
+ __u32 chipRevision;
+
+ /* Supported feature fields. */
+ __u32 chipFeatures;
+
+ /* Supported minor feature fields. */
+ __u32 chipMinorFeatures;
+
+ /* Supported minor feature 1 fields. */
+ __u32 chipMinorFeatures1;
+
+ /* Supported minor feature 2 fields. */
+ __u32 chipMinorFeatures2;
+
+ /* Supported minor feature 3 fields. */
+ __u32 chipMinorFeatures3;
+
+ /* Number of streams supported. */
+ __u32 streamCount;
+
+ /* Total number of temporary registers per thread. */
+ __u32 registerMax;
+
+ /* Maximum number of threads. */
+ __u32 threadCount;
+
+ /* Number of shader cores. */
+ __u32 shaderCoreCount;
+
+ /* Size of the vertex cache. */
+ __u32 vertexCacheSize;
+
+ /* Number of entries in the vertex output buffer. */
+ __u32 vertexOutputBufferSize;
+
+ /* Number of pixel pipes. */
+ __u32 pixelPipes;
+
+ /* Number of instructions. */
+ __u32 instructionCount;
+
+ /* Number of constants. */
+ __u32 numConstants;
+
+ /* Buffer size */
+ __u32 bufferSize;
+
+}
+gcsHAL_QUERY_CHIP_IDENTITY;
+
+/* gcvHAL_COMPOSE. */
+typedef struct _gcsHAL_COMPOSE
+{
+ /* Composition state buffer. */
+ gctPHYS_ADDR physical;
+ void * logical;
+ size_t offset;
+ size_t size;
+
+ /* Composition end signal. */
+ gctHANDLE process;
+ gctSIGNAL signal;
+
+ /* User signals. */
+ gctHANDLE userProcess;
+ gctSIGNAL userSignal1;
+ gctSIGNAL userSignal2;
+}
+gcsHAL_COMPOSE;
+
+/* HW profile information. */
+typedef struct _gcsPROFILER_COUNTERS
+{
+ /* HW static counters. */
+ VIV_DUMMY(__u32, gpuClock);
+ VIV_DUMMY(__u32, axiClock);
+ VIV_DUMMY(__u32, shaderClock);
+
+ /* HW vairable counters. */
+ VIV_DUMMY(__u32, gpuClockStart);
+ VIV_DUMMY(__u32, gpuClockEnd);
+
+ /* HW vairable counters. */
+ __u32 gpuCyclesCounter;
+ __u32 gpuTotalRead64BytesPerFrame;
+ __u32 gpuTotalWrite64BytesPerFrame;
+
+ /* PE */
+ __u32 pe_pixel_count_killed_by_color_pipe;
+ __u32 pe_pixel_count_killed_by_depth_pipe;
+ __u32 pe_pixel_count_drawn_by_color_pipe;
+ __u32 pe_pixel_count_drawn_by_depth_pipe;
+
+ /* SH */
+ __u32 ps_inst_counter;
+ __u32 rendered_pixel_counter;
+ __u32 vs_inst_counter;
+ __u32 rendered_vertice_counter;
+ __u32 vtx_branch_inst_counter;
+ __u32 vtx_texld_inst_counter;
+ __u32 pxl_branch_inst_counter;
+ __u32 pxl_texld_inst_counter;
+
+ /* PA */
+ __u32 pa_input_vtx_counter;
+ __u32 pa_input_prim_counter;
+ __u32 pa_output_prim_counter;
+ __u32 pa_depth_clipped_counter;
+ __u32 pa_trivial_rejected_counter;
+ __u32 pa_culled_counter;
+
+ /* SE */
+ __u32 se_culled_triangle_count;
+ __u32 se_culled_lines_count;
+
+ /* RA */
+ __u32 ra_valid_pixel_count;
+ __u32 ra_total_quad_count;
+ __u32 ra_valid_quad_count_after_early_z;
+ __u32 ra_total_primitive_count;
+ __u32 ra_pipe_cache_miss_counter;
+ __u32 ra_prefetch_cache_miss_counter;
+ __u32 ra_eez_culled_counter;
+
+ /* TX */
+ __u32 tx_total_bilinear_requests;
+ __u32 tx_total_trilinear_requests;
+ __u32 tx_total_discarded_texture_requests;
+ __u32 tx_total_texture_requests;
+ __u32 tx_mem_read_count;
+ __u32 tx_mem_read_in_8B_count;
+ __u32 tx_cache_miss_count;
+ __u32 tx_cache_hit_texel_count;
+ __u32 tx_cache_miss_texel_count;
+
+ /* MC */
+ __u32 mc_total_read_req_8B_from_pipeline;
+ __u32 mc_total_read_req_8B_from_IP;
+ __u32 mc_total_write_req_8B_from_pipeline;
+
+ /* HI */
+ __u32 hi_axi_cycles_read_request_stalled;
+ __u32 hi_axi_cycles_write_request_stalled;
+ __u32 hi_axi_cycles_write_data_stalled;
+}
+gcsPROFILER_COUNTERS;
+
+/* 2D Engine profile. */
+typedef struct _gcs2D_PROFILE
+{
+ /* Cycle count.
+ 32bit counter incremented every 2D clock cycle.
+ Wraps back to 0 when the counter overflows.
+ */
+ __u32 cycleCount;
+
+ /* Pixels rendered by the 2D engine.
+ Resets to 0 every time it is read. */
+ __u32 pixelsRendered;
+}
+gcs2D_PROFILE;
+
+typedef struct _gcsDATABASE_COUNTERS
+{
+ /* Number of currently allocated bytes. */
+ size_t bytes;
+
+ /* Maximum number of bytes allocated (memory footprint). */
+ size_t maxBytes;
+
+ /* Total number of bytes allocated. */
+ size_t totalBytes;
+}
+gcsDATABASE_COUNTERS;
+
+typedef struct _gcuDATABASE_INFO
+{
+ /* Counters. */
+ gcsDATABASE_COUNTERS counters;
+
+ /* Time value. */
+ __u64 time;
+}
+gcuDATABASE_INFO;
+
+/* gcsHAL_FRAME_INFO */
+typedef struct _gcsHAL_FRAME_INFO
+{
+ /* Current timer tick. */
+ OUT __u64 ticks;
+
+ /* Bandwidth counters. */
+ OUT unsigned int readBytes8[8];
+ OUT unsigned int writeBytes8[8];
+
+ /* Counters. */
+ OUT unsigned int cycles[8];
+ OUT unsigned int idleCycles[8];
+ OUT unsigned int mcCycles[8];
+ OUT unsigned int readRequests[8];
+ OUT unsigned int writeRequests[8];
+
+ /* 3D counters. */
+ OUT unsigned int vertexCount;
+ OUT unsigned int primitiveCount;
+ OUT unsigned int rejectedPrimitives;
+ OUT unsigned int culledPrimitives;
+ OUT unsigned int clippedPrimitives;
+ OUT unsigned int outPrimitives;
+ OUT unsigned int inPrimitives;
+ OUT unsigned int culledQuadCount;
+ OUT unsigned int totalQuadCount;
+ OUT unsigned int quadCount;
+ OUT unsigned int totalPixelCount;
+
+ /* PE counters. */
+ OUT unsigned int colorKilled[8];
+ OUT unsigned int colorDrawn[8];
+ OUT unsigned int depthKilled[8];
+ OUT unsigned int depthDrawn[8];
+
+ /* Shader counters. */
+ OUT unsigned int shaderCycles;
+ OUT unsigned int vsInstructionCount;
+ OUT unsigned int vsTextureCount;
+ OUT unsigned int psInstructionCount;
+ OUT unsigned int psTextureCount;
+
+ /* Texture counters. */
+ OUT unsigned int bilinearRequests;
+ OUT unsigned int trilinearRequests;
+ OUT unsigned int txBytes8;
+ OUT unsigned int txHitCount;
+ OUT unsigned int txMissCount;
+}
+gcsHAL_FRAME_INFO;
+
+/* gcsOBJECT object defintinon. */
+typedef struct _gcsOBJECT
+{
+ /* Type of an object. */
+ gceOBJECT_TYPE type;
+}
+gcsOBJECT;
+
+/* State delta record. */
+typedef struct _gcsSTATE_DELTA_RECORD
+{
+ /* State address. */
+ unsigned int address;
+
+ /* State mask. */
+ __u32 mask;
+
+ /* State data. */
+ __u32 data;
+}
+gcsSTATE_DELTA_RECORD;
+
+/* State delta. */
+typedef struct _gcsSTATE_DELTA
+{
+ /* Main state delta ID. Every time state delta structure gets reinitialized,
+ main ID is incremented. If main state ID overflows, all map entry IDs get
+ reinitialized to make sure there is no potential erroneous match after
+ the overflow.*/
+ unsigned int id;
+
+ /* The number of contexts pending modification by the delta. */
+ int refCount;
+
+ /* Vertex element count for the delta buffer. */
+ unsigned int elementCount;
+
+ /* Number of states currently stored in the record array. */
+ unsigned int recordCount;
+
+ /* Record array; holds all modified states. */
+ struct _gcsSTATE_DELTA_RECORD *recordArray;
+
+ VIV_DUMMY(unsigned int *, mapEntryID);
+ VIV_DUMMY(unsigned int , mapEntryIDSize);
+ VIV_DUMMY(unsigned int *, mapEntryIndex);
+
+ /* Previous and next state deltas. */
+ struct _gcsSTATE_DELTA * prev;
+ struct _gcsSTATE_DELTA * next;
+}
+gcsSTATE_DELTA;
+
+/* Command buffer object. */
+struct _gcoCMDBUF
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Command buffer entry and exit pipes. */
+ gcePIPE_SELECT entryPipe;
+ gcePIPE_SELECT exitPipe;
+
+ /* Feature usage flags. */
+ int using2D;
+ int using3D;
+ VIV_DUMMY(int, usingFilterBlit);
+ VIV_DUMMY(int, usingPalette);
+
+ /* Physical address of command buffer. */
+ VIV_DUMMY(gctPHYS_ADDR, physical);
+
+ /* Logical address of command buffer. */
+ void * logical;
+
+ /* Number of bytes in command buffer. */
+ size_t bytes_dummy;
+
+ /* Start offset into the command buffer. */
+ __u32 startOffset;
+
+ /* Current offset into the command buffer. */
+ __u32 offset;
+
+ /* Number of free bytes in command buffer. */
+ VIV_DUMMY(size_t, free);
+ VIV_DUMMY(void *, lastReserve);
+ VIV_DUMMY(unsigned int, lastOffset);
+
+#if gcdSECURE_USER
+ /* Hint array for the current command buffer. */
+ unsigned int hintArraySize;
+ __u32 * hintArray;
+ __u32 * hintArrayTail;
+#endif
+};
+
+/******************************************************************************\
+*************************** Interface structure *******************************
+\******************************************************************************/
+
+typedef struct _gcsHAL_INTERFACE
+{
+ /* Command code. */
+ gceHAL_COMMAND_CODES command;
+
+ /* Hardware type. */
+ gceHARDWARE_TYPE hardwareType;
+
+ /* Status value. */
+ gceSTATUS status;
+
+ VIV_DUMMY(gctHANDLE, handle);
+ VIV_DUMMY(__u32, pid);
+
+ /* Union of command structures. */
+ union _u
+ {
+ /* gcvHAL_GET_BASE_ADDRESS */
+ struct _gcsHAL_GET_BASE_ADDRESS
+ {
+ /* Physical memory address of internal memory. */
+ OUT __u32 baseAddress;
+ }
+ GetBaseAddress;
+
+ /* gcvHAL_QUERY_VIDEO_MEMORY */
+ struct _gcsHAL_QUERY_VIDEO_MEMORY
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctPHYS_ADDR internalPhysical;
+
+ /* Size in bytes of internal memory.*/
+ OUT size_t internalSize;
+
+ /* Physical memory address of external memory. */
+ OUT gctPHYS_ADDR externalPhysical;
+
+ /* Size in bytes of external memory.*/
+ OUT size_t externalSize;
+
+ /* Physical memory address of contiguous memory. */
+ OUT gctPHYS_ADDR contiguousPhysical;
+
+ /* Size in bytes of contiguous memory.*/
+ OUT size_t contiguousSize;
+ }
+ QueryVideoMemory;
+
+ /* gcvHAL_QUERY_CHIP_IDENTITY */
+ gcsHAL_QUERY_CHIP_IDENTITY QueryChipIdentity;
+
+ /* gcvHAL_MAP_MEMORY */
+ struct _gcsHAL_MAP_MEMORY
+ {
+ /* Physical memory address to map. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to map. */
+ IN size_t bytes;
+
+ /* Address of mapped memory. */
+ OUT void * logical;
+ }
+ MapMemory;
+
+ /* gcvHAL_UNMAP_MEMORY */
+ struct _gcsHAL_UNMAP_MEMORY
+ {
+ /* Physical memory address to unmap. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to unmap. */
+ IN size_t bytes;
+
+ /* Address of mapped memory to unmap. */
+ IN void * logical;
+ }
+ UnmapMemory;
+
+ /* gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_LINEAR_VIDEO_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT unsigned int bytes;
+
+ /* Buffer alignment. */
+ IN unsigned int alignment;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateLinearVideoMemory;
+
+ /* gcvHAL_ALLOCATE_VIDEO_MEMORY */
+ VIV_DUMMY(struct _gcsHAL_ALLOCATE_VIDEO_MEMORY
+ {
+ /* Width of rectangle to allocate. */
+ IN OUT unsigned int width;
+
+ /* Height of rectangle to allocate. */
+ IN OUT unsigned int height;
+
+ /* Depth of rectangle to allocate. */
+ IN unsigned int depth;
+
+ /* Format rectangle to allocate in gceSURF_FORMAT. */
+ IN gceSURF_FORMAT format;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }, AllocateVideoMemory);
+
+ /* gcvHAL_FREE_VIDEO_MEMORY */
+ struct _gcsHAL_FREE_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+ }
+ FreeVideoMemory;
+
+ /* gcvHAL_LOCK_VIDEO_MEMORY */
+ struct _gcsHAL_LOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Cache configuration. */
+ /* Only gcvPOOL_CONTIGUOUS and gcvPOOL_VIRUTAL
+ ** can be configured */
+ IN int cacheable;
+
+ /* Hardware specific address. */
+ OUT __u32 address;
+
+ /* Mapped logical address. */
+ OUT void * memory;
+ }
+ LockVideoMemory;
+
+ /* gcvHAL_UNLOCK_VIDEO_MEMORY */
+ struct _gcsHAL_UNLOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Type of surface. */
+ IN gceSURF_TYPE type;
+
+ /* Flag to unlock surface asynchroneously. */
+ IN OUT int asynchroneous;
+ }
+ UnlockVideoMemory;
+
+ /* gcvHAL_ALLOCATE_NON_PAGED_MEMORY */
+ struct _gcsHAL_ALLOCATE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT size_t bytes;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT void * logical;
+ }
+ AllocateNonPagedMemory;
+
+ /* gcvHAL_FREE_NON_PAGED_MEMORY */
+ struct _gcsHAL_FREE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN size_t bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN void * logical;
+ }
+ FreeNonPagedMemory;
+
+ /* gcvHAL_EVENT_COMMIT. */
+ struct _gcsHAL_EVENT_COMMIT
+ {
+ /* Event queue. */
+ IN struct _gcsQUEUE * queue;
+ }
+ Event;
+
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_COMMIT
+ {
+ /* Context buffer object. */
+ IN gckCONTEXT context;
+
+ /* Command buffer. */
+ IN gcoCMDBUF commandBuffer;
+
+ /* State delta buffer. */
+ struct _gcsSTATE_DELTA * delta;
+
+ /* Event queue. */
+ IN struct _gcsQUEUE * queue;
+ }
+ Commit;
+
+ /* gcvHAL_MAP_USER_MEMORY */
+ struct _gcsHAL_MAP_USER_MEMORY
+ {
+ /* Base address of user memory to map. */
+ IN void * memory;
+
+ /* Size of user memory in bytes to map. */
+ IN size_t size;
+
+ /* Info record required by gcvHAL_UNMAP_USER_MEMORY. */
+ OUT void * info;
+
+ /* Physical address of mapped memory. */
+ OUT __u32 address;
+ }
+ MapUserMemory;
+
+ /* gcvHAL_UNMAP_USER_MEMORY */
+ struct _gcsHAL_UNMAP_USER_MEMORY
+ {
+ /* Base address of user memory to unmap. */
+ IN void * memory;
+
+ /* Size of user memory in bytes to unmap. */
+ IN size_t size;
+
+ /* Info record returned by gcvHAL_MAP_USER_MEMORY. */
+ IN void * info;
+
+ /* Physical address of mapped memory as returned by
+ gcvHAL_MAP_USER_MEMORY. */
+ IN __u32 address;
+ }
+ UnmapUserMemory;
+
+ /* gcsHAL_USER_SIGNAL */
+ struct _gcsHAL_USER_SIGNAL
+ {
+ /* Command. */
+ gceUSER_SIGNAL_COMMAND_CODES command;
+
+ /* Signal ID. */
+ IN OUT int id;
+
+ /* Reset mode. */
+ IN int manualReset;
+
+ /* Wait timedout. */
+ IN __u32 wait;
+
+ /* State. */
+ IN int state;
+ }
+ UserSignal;
+
+ /* gcvHAL_SIGNAL. */
+ struct _gcsHAL_SIGNAL
+ {
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+
+ /* Reserved. */
+ IN gctSIGNAL auxSignal;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+ /* Event generated from where of pipeline */
+ IN gceKERNEL_WHERE fromWhere;
+ }
+ Signal;
+
+ /* gcvHAL_WRITE_DATA. */
+ struct _gcsHAL_WRITE_DATA
+ {
+ /* Address to write data to. */
+ IN __u32 address;
+
+ /* Data to write. */
+ IN __u32 data;
+ }
+ WriteData;
+
+ /* gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_ALLOCATE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT size_t bytes;
+
+ /* Hardware address of allocation. */
+ OUT __u32 address;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT void * logical;
+ }
+ AllocateContiguousMemory;
+
+ /* gcvHAL_FREE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_FREE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN size_t bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN void * logical;
+ }
+ FreeContiguousMemory;
+
+ /* gcvHAL_READ_REGISTER */
+ struct _gcsHAL_READ_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN __u32 address;
+
+ /* Data read. */
+ OUT __u32 data;
+ }
+ ReadRegisterData;
+
+ /* gcvHAL_WRITE_REGISTER */
+ struct _gcsHAL_WRITE_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN __u32 address;
+
+ /* Data read. */
+ IN __u32 data;
+ }
+ WriteRegisterData;
+
+#if VIVANTE_PROFILER
+ /* gcvHAL_GET_PROFILE_SETTING */
+ VIV_DUMMY(struct _gcsHAL_GET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ OUT int enable;
+
+ /* The profile file name */
+ OUT char fileName[gcdMAX_PROFILE_FILE_NAME];
+ }, GetProfileSetting);
+
+ /* gcvHAL_SET_PROFILE_SETTING */
+ VIV_DUMMY(struct _gcsHAL_SET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ IN int enable;
+
+ /* The profile file name */
+ IN char fileName[gcdMAX_PROFILE_FILE_NAME];
+ }, SetProfileSetting);
+
+ /* gcvHAL_READ_ALL_PROFILE_REGISTERS */
+ struct _gcsHAL_READ_ALL_PROFILE_REGISTERS
+ {
+ /* Data read. */
+ OUT gcsPROFILER_COUNTERS counters;
+ }
+ RegisterProfileData;
+
+ /* gcvHAL_PROFILE_REGISTERS_2D */
+ struct _gcsHAL_PROFILE_REGISTERS_2D
+ {
+ /* Data read. */
+ OUT struct _gcs2D_PROFILE * hwProfile2D;
+ }
+ RegisterProfileData2D;
+#endif
+ /* Power management. */
+ /* gcvHAL_SET_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_SET_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ IN gceCHIPPOWERSTATE state;
+ }
+ SetPowerManagement;
+
+ /* gcvHAL_QUERY_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_QUERY_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ OUT gceCHIPPOWERSTATE state;
+
+ /* Idle query. */
+ OUT int isIdle;
+ }
+ QueryPowerManagement;
+
+ /* gcvHAL_QUERY_KERNEL_SETTINGS */
+ struct _gcsHAL_QUERY_KERNEL_SETTINGS
+ {
+ /* Settings.*/
+ OUT gcsKERNEL_SETTINGS settings;
+ }
+ QueryKernelSettings;
+
+ /* gcvHAL_MAP_PHYSICAL */
+ VIV_DUMMY(struct _gcsHAL_MAP_PHYSICAL
+ {
+ /* gcvTRUE to map, gcvFALSE to unmap. */
+ IN int map;
+
+ /* Physical address. */
+ IN OUT gctPHYS_ADDR physical;
+ }, MapPhysical);
+
+ /* gcvHAL_DEBUG */
+ struct _gcsHAL_DEBUG
+ {
+ /* If gcvTRUE, set the debug information. */
+ IN int set;
+ IN __u32 level;
+ IN __u32 zones;
+ IN int enable;
+
+ IN gceDEBUG_MESSAGE_TYPE type;
+ IN __u32 messageSize;
+
+ /* Message to print if not empty. */
+ IN char message[80];
+ }
+ Debug;
+
+ /* gcvHAL_CACHE */
+ struct _gcsHAL_CACHE
+ {
+ IN gceCACHEOPERATION operation;
+ IN gctHANDLE process;
+ IN void * logical;
+ IN size_t bytes;
+ IN gcuVIDMEM_NODE_PTR node;
+ }
+ Cache;
+
+ /* gcvHAL_TIMESTAMP */
+ struct _gcsHAL_TIMESTAMP
+ {
+ /* Timer select. */
+ IN __u32 timer;
+
+ /* Timer request type (0-stop, 1-start, 2-send delta). */
+ IN __u32 request;
+
+ /* Result of delta time in microseconds. */
+ OUT __s32 timeDelta;
+ }
+ TimeStamp;
+
+ /* gcvHAL_DATABASE */
+ struct _gcsHAL_DATABASE
+ {
+ /* Set to gcvTRUE if you want to query a particular process ID.
+ ** Set to gcvFALSE to query the last detached process. */
+ IN int validProcessID;
+
+ /* Process ID to query. */
+ IN __u32 processID;
+
+ /* Information. */
+ OUT gcuDATABASE_INFO vidMem;
+ OUT gcuDATABASE_INFO nonPaged;
+ OUT gcuDATABASE_INFO contiguous;
+ OUT gcuDATABASE_INFO gpuIdle;
+ }
+ Database;
+
+ /* gcvHAL_VERSION */
+ struct _gcsHAL_VERSION
+ {
+ /* Major version: N.n.n. */
+ OUT __s32 major;
+
+ /* Minor version: n.N.n. */
+ OUT __s32 minor;
+
+ /* Patch version: n.n.N. */
+ OUT __s32 patch;
+
+ /* Build version. */
+ OUT __u32 build;
+ }
+ Version;
+
+ /* gcvHAL_CHIP_INFO */
+ struct _gcsHAL_CHIP_INFO
+ {
+ /* Chip count. */
+ OUT __s32 count;
+
+ /* Chip types. */
+ OUT gceHARDWARE_TYPE types[gcdCHIP_COUNT];
+ }
+ ChipInfo;
+
+ /* gcvHAL_ATTACH */
+ struct _gcsHAL_ATTACH
+ {
+ /* Context buffer object. */
+ OUT gckCONTEXT context;
+
+ /* Number of states in the buffer. */
+ OUT size_t stateCount;
+ }
+ Attach;
+
+ /* gcvHAL_DETACH */
+ struct _gcsHAL_DETACH
+ {
+ /* Context buffer object. */
+ IN gckCONTEXT context;
+ }
+ Detach;
+
+ /* gcvHAL_COMPOSE. */
+ gcsHAL_COMPOSE Compose;
+
+ /* gcvHAL_GET_FRAME_INFO. */
+ struct _gcsHAL_GET_FRAME_INFO
+ {
+ OUT gcsHAL_FRAME_INFO * frameInfo;
+ }
+ GetFrameInfo;
+
+ /* gcvHAL_SET_TIME_OUT. */
+ struct _gcsHAL_SET_TIMEOUT
+ {
+ __u32 timeOut;
+ }
+ SetTimeOut;
+
+ struct _gcsHAL_GET_SHARED_INFO
+ {
+ IN __u32 pid;
+ IN __u32 dataId;
+ IN gcuVIDMEM_NODE_PTR node;
+ OUT __u8 * data;
+ /* fix size */
+ OUT __u8 * nodeData;
+ size_t size;
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE infoType;
+ }
+ GetSharedInfo;
+
+ struct _gcsHAL_SET_SHARED_INFO
+ {
+ IN __u32 dataId;
+ IN gcuVIDMEM_NODE_PTR node;
+ IN __u8 * data;
+ IN __u8 * nodeData;
+ IN size_t size;
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE infoType;
+ }
+ SetSharedInfo;
+ }
+ u;
+}
+gcsHAL_INTERFACE;
+
+typedef struct _gcsQUEUE
+{
+ /* Pointer to next gcsQUEUE structure. */
+ struct _gcsQUEUE * next;
+
+ /* Event information. */
+ gcsHAL_INTERFACE iface;
+}
+gcsQUEUE;
+
+#undef VIV_DUMMY
+
+#endif /* __gc_hal_h_ */
diff --git a/src/lib/dds.c b/src/lib/dds.c
new file mode 100644
index 0000000..a3ec71b
--- /dev/null
+++ b/src/lib/dds.c
@@ -0,0 +1,341 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* DDS loader - Vaguely based on code by Jon Watte 2002 */
+/* Permission granted to use freely, as long as Jon Watte */
+/* is held harmless for all possible damages resulting from */
+/* your use or failure to use this code. */
+/* No warranty is expressed or implied. Use at your own risk, */
+/* or not at all. */
+
+#include "dds.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+#define DEBUG
+
+// little-endian, of course
+#define DDS_MAGIC 0x20534444
+
+// DDS_header.dwFlags
+#define DDSD_CAPS 0x00000001
+#define DDSD_HEIGHT 0x00000002
+#define DDSD_WIDTH 0x00000004
+#define DDSD_PITCH 0x00000008
+#define DDSD_PIXELFORMAT 0x00001000
+#define DDSD_MIPMAPCOUNT 0x00020000
+#define DDSD_LINEARSIZE 0x00080000
+#define DDSD_DEPTH 0x00800000
+
+// DDS_header.sPixelFormat.dwFlags
+#define DDPF_ALPHAPIXELS 0x00000001
+#define DDPF_ALPHA 0x00000002
+#define DDPF_FOURCC 0x00000004
+#define DDPF_INDEXED 0x00000020
+#define DDPF_RGB 0x00000040
+#define DDPF_LUMINANCE 0x00020000
+
+// DDS_header.sCaps.dwCaps1
+#define DDSCAPS_COMPLEX 0x00000008
+#define DDSCAPS_TEXTURE 0x00001000
+#define DDSCAPS_MIPMAP 0x00400000
+
+// DDS_header.sCaps.dwCaps2
+#define DDSCAPS2_CUBEMAP 0x00000200
+#define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400
+#define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800
+#define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000
+#define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000
+#define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000
+#define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000
+#define DDSCAPS2_VOLUME 0x00200000
+
+#define MAKEFOURCC(ch0, ch1, ch2, ch3) \
+ (uint32_t)( \
+ (((uint32_t)(uint8_t)(ch3) << 24) & 0xFF000000) | \
+ (((uint32_t)(uint8_t)(ch2) << 16) & 0x00FF0000) | \
+ (((uint32_t)(uint8_t)(ch1) << 8) & 0x0000FF00) | \
+ ((uint32_t)(uint8_t)(ch0) & 0x000000FF) )
+
+#define D3DFMT_DXT1 MAKEFOURCC('D','X','T','1') // DXT1 compression texture format
+#define D3DFMT_DXT2 MAKEFOURCC('D','X','T','2') // DXT2 compression texture format
+#define D3DFMT_DXT3 MAKEFOURCC('D','X','T','3') // DXT3 compression texture format
+#define D3DFMT_DXT4 MAKEFOURCC('D','X','T','4') // DXT4 compression texture format
+#define D3DFMT_DXT5 MAKEFOURCC('D','X','T','5') // DXT5 compression texture format
+#define D3DFMT_ETC1 MAKEFOURCC('E','T','C','1') // Custom (Ericcson Texture Compression)
+
+struct _DDS_pixelformat {
+ unsigned int dwSize;
+ unsigned int dwFlags;
+ unsigned int dwFourCC;
+ unsigned int dwRGBBitCount;
+ unsigned int dwRBitMask;
+ unsigned int dwGBitMask;
+ unsigned int dwBBitMask;
+ unsigned int dwAlphaBitMask;
+};
+
+typedef union _DDS_header {
+ struct {
+ unsigned int dwMagic;
+ unsigned int dwSize;
+ unsigned int dwFlags;
+ unsigned int dwHeight;
+ unsigned int dwWidth;
+ unsigned int dwPitchOrLinearSize;
+ unsigned int dwDepth;
+ unsigned int dwMipMapCount;
+ unsigned int dwReserved1[ 11 ];
+
+ // DDPIXELFORMAT
+ struct _DDS_pixelformat sPixelFormat;
+
+ // DDCAPS2
+ struct {
+ unsigned int dwCaps1;
+ unsigned int dwCaps2;
+ unsigned int dwDDSX;
+ unsigned int dwReserved;
+ } sCaps;
+ unsigned int dwReserved2;
+ };
+ char data[ 128 ];
+} DDS_header;
+
+typedef struct _DdsLoadInfo {
+ bool compressed;
+ unsigned int divSize;
+ unsigned int blockBytes;
+ uint32_t flags;
+ int bitcount;
+ uint32_t rmask;
+ uint32_t gmask;
+ uint32_t bmask;
+ uint32_t amask;
+} DdsLoadInfo;
+
+static DdsLoadInfo loadInfo[] = {
+ [FMT_A8R8G8B8] = {false, 1, 4, DDPF_RGB, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000},
+ [FMT_X8R8G8B8] = {false, 1, 4, DDPF_RGB, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000},
+ [FMT_R8G8B8] = {false, 1, 3, DDPF_RGB, 24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000},
+ [FMT_A1R5G5B5] = {false, 1, 2, DDPF_RGB, 16, 0x00007c00, 0x000003e0, 0x0000001f, 0x00008000},
+ [FMT_X1R5G5B5] = {false, 1, 2, DDPF_RGB, 16, 0x00007c00, 0x000003e0, 0x0000001f, 0x00000000},
+ [FMT_R5G6B5] = {false, 1, 2, DDPF_RGB, 16, 0x0000f800, 0x000007e0, 0x0000001f, 0x00000000},
+ [FMT_A8] = {false, 1, 1, DDPF_ALPHA, 8, 0x00000000, 0, 0, 0x000000ff},
+ [FMT_L8] = {false, 1, 1, DDPF_LUMINANCE, 8, 0x000000ff, 0, 0, 0x00000000},
+ [FMT_A8L8] = {false, 1, 2, DDPF_LUMINANCE, 16, 0x000000ff, 0, 0, 0x0000ff00},
+ [FMT_DXT1] = {true, 4, 8, DDPF_FOURCC, 0, D3DFMT_DXT1},
+ [FMT_DXT3] = {true, 4, 16, DDPF_FOURCC, 0, D3DFMT_DXT3},
+ [FMT_DXT5] = {true, 4, 16, DDPF_FOURCC, 0, D3DFMT_DXT5},
+ [FMT_ETC1] = {true, 4, 8, DDPF_FOURCC, 0, D3DFMT_ETC1}
+};
+#define NUM_FORMATS (sizeof(loadInfo) / sizeof(DdsLoadInfo))
+
+static inline int max(int a, int b) { return a > b ? a : b; }
+static inline int min(int a, int b) { return a < b ? a : b; }
+
+static int find_fmt(struct _DDS_pixelformat *pf)
+{
+ int fmt=0;
+ for(fmt=0; fmt<NUM_FORMATS; ++fmt)
+ {
+ DdsLoadInfo *li = &loadInfo[fmt];
+ if(pf->dwFlags & DDPF_FOURCC)
+ {
+ if(li->flags == DDPF_FOURCC && li->bitcount == 0 && li->rmask == pf->dwFourCC)
+ {
+ return fmt;
+ }
+ }
+ else if(pf->dwFlags & DDPF_RGB)
+ {
+ if((li->flags == DDPF_RGB) &&
+ (li->bitcount == pf->dwRGBBitCount) &&
+ (li->rmask == pf->dwRBitMask) && (li->gmask == pf->dwGBitMask) &&
+ (li->bmask == pf->dwBBitMask) && (li->amask == ((pf->dwFlags & DDPF_ALPHAPIXELS)?pf->dwAlphaBitMask:0)))
+ {
+ return fmt;
+ }
+ }
+ else if(pf->dwFlags & DDPF_LUMINANCE)
+ {
+ bool formatHasAlpha = pf->dwAlphaBitMask != 0;
+ bool ddsHasAlpha = (pf->dwFlags & DDPF_ALPHAPIXELS) != 0;
+ if(li->flags == DDPF_LUMINANCE &&
+ li->bitcount == pf->dwRGBBitCount &&
+ formatHasAlpha == ddsHasAlpha)
+ {
+ return fmt;
+ }
+ }
+ else if(pf->dwFlags & DDPF_ALPHA)
+ {
+ if(li->flags == DDPF_ALPHA &&
+ li->bitcount == pf->dwRGBBitCount)
+ {
+ return fmt;
+ }
+ }
+ }
+ return -1;
+}
+
+bool dds_load_file(FILE *f, dds_texture **out)
+{
+ DDS_header hdr;
+ unsigned int x = 0;
+ unsigned int y = 0;
+ unsigned int mipMapCount = 0;
+ if(f == NULL || out == NULL)
+ return false;
+ fread( &hdr, sizeof( hdr ), 1, f );
+ assert( hdr.dwMagic == DDS_MAGIC );
+ assert( hdr.dwSize == 124 );
+
+ if( hdr.dwMagic != DDS_MAGIC || hdr.dwSize != 124 ||
+ !(hdr.dwFlags & DDSD_PIXELFORMAT) || !(hdr.dwFlags & DDSD_CAPS) )
+ {
+ goto failure;
+ }
+
+ unsigned int xSize = hdr.dwWidth;
+ unsigned int ySize = hdr.dwHeight;
+ int fmt = find_fmt(&hdr.sPixelFormat);
+ if(fmt == -1) {
+#ifdef DEBUG
+ printf("Unknown format\n");
+#endif
+ goto failure;
+ }
+ DdsLoadInfo *li = &loadInfo[fmt];
+ dds_texture *rv = (dds_texture*)malloc(sizeof(dds_texture));
+ if(!rv)
+ goto failure;
+
+ //fixme: do cube maps later
+ //fixme: do 3d later
+ x = xSize;
+ y = ySize;
+ mipMapCount = (hdr.dwFlags & DDSD_MIPMAPCOUNT) ? hdr.dwMipMapCount : 1;
+#ifdef DEBUG
+ printf("Base size: %ix%i, %i mips\n", x, y, mipMapCount);
+#endif
+
+ // size of first mip
+ size_t size = max(li->divSize, x)/li->divSize * max(li->divSize, y)/li->divSize * li->blockBytes;
+ if((hdr.dwFlags & DDSD_LINEARSIZE) && (hdr.dwPitchOrLinearSize != size))
+ {
+#ifdef DEBUG
+ printf("Size mismatch: %i versus %i\n", hdr.dwPitchOrLinearSize, size);
+#endif
+ goto failure;
+ }
+ if((hdr.dwFlags & DDSD_PITCH) && (hdr.dwPitchOrLinearSize != x*li->blockBytes))
+ goto failure;
+
+ rv->fmt = fmt;
+ rv->num_slices = 1;
+ rv->num_mipmaps = mipMapCount;
+ rv->div_size = li->divSize;
+ rv->block_bytes = li->blockBytes;
+ rv->slices = malloc(sizeof(dds_mipmap*) * rv->num_slices);
+ rv->slices[0] = malloc(sizeof(dds_mipmap) * rv->num_mipmaps);
+#ifdef DEBUG
+ printf("(format %i, %i mipmaps)\n", rv->fmt, rv->num_mipmaps);
+#endif
+
+ /* compute offsets */
+ size_t offset = 0;
+ for(unsigned int ix = 0; ix < mipMapCount; ++ix)
+ {
+ dds_mipmap *mip = &rv->slices[0][ix];
+ mip->width = x;
+ mip->height = y;
+ mip->stride = max( li->divSize, x )/li->divSize * li->blockBytes;
+ mip->offset = offset;
+ mip->size = size;
+#ifdef DEBUG
+ printf("%08x Loading mipmap %i: %ix%i (%i) stride=%i\n",
+ (int)mip->offset, ix, (int)mip->width, (int)mip->height, (int)mip->size,
+ (int)mip->stride);
+#endif
+ offset += size;
+ if(x != 1)
+ x = x >> 1;
+ if(y != 1)
+ y = y >> 1;
+ size = max( li->divSize, x )/li->divSize * max( li->divSize, y )/li->divSize * li->blockBytes;
+ }
+ rv->data = malloc(offset);
+ rv->size = offset;
+ if(!rv->data)
+ goto failure;
+ fread(rv->data, rv->size, 1, f);
+ for(unsigned int ix = 0; ix < mipMapCount; ++ix)
+ {
+ rv->slices[0][ix].data = (void*)((size_t)rv->data + rv->slices[0][ix].offset);
+ }
+ *out = rv;
+
+ return true;
+failure:
+ return false;
+}
+
+bool dds_load(const char *filename, dds_texture **out)
+{
+ FILE *f = fopen(filename, "rb");
+ if(f == NULL)
+ {
+#ifdef DEBUG
+ printf("Cannot open texture file\n");
+#endif
+ return false;
+ }
+ bool ret = dds_load_file(f, out);
+ fclose(f);
+ return ret;
+}
+
+void dds_free(dds_texture *tex)
+{
+ if(tex == NULL)
+ return;
+ free(tex->slices);
+ free(tex->data);
+ free(tex);
+}
+#if 0
+int main(int argc, char **argv)
+{
+ dds_texture *tex = 0;
+ if(dds_load(argv[1], &tex))
+ {
+ printf("Succesfully loaded\n");
+ }
+}
+#endif
diff --git a/src/lib/dds.h b/src/lib/dds.h
new file mode 100644
index 0000000..851ec60
--- /dev/null
+++ b/src/lib/dds.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#if !defined( DDS_H )
+#define DDS_H
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <stdio.h>
+
+/* Formats */
+#define FMT_A8R8G8B8 0
+#define FMT_X8R8G8B8 1
+#define FMT_R8G8B8 2
+#define FMT_A1R5G5B5 3
+#define FMT_X1R5G5B5 4
+#define FMT_R5G6B5 5
+#define FMT_DXT1 6
+#define FMT_DXT3 7
+#define FMT_DXT5 8
+#define FMT_ETC1 9
+#define FMT_A8 10
+#define FMT_L8 11
+#define FMT_A8L8 12
+
+typedef struct _dds_mipmap
+{
+ unsigned int width, height, stride, size;
+ void *data;
+ size_t offset;
+} dds_mipmap;
+
+typedef struct _dds_texture
+{
+ int fmt;
+ unsigned int div_size;
+ unsigned int block_bytes;
+ int num_slices; /* number of faces or slices */
+ int num_mipmaps; /* number of mipmaps */
+ dds_mipmap **slices;
+ void *data;
+ size_t size;
+} dds_texture;
+
+bool dds_load(const char *filename, dds_texture **out);
+bool dds_load_file(FILE *f, dds_texture **out);
+void dds_free(dds_texture *tex);
+
+#endif
+
diff --git a/src/lib/dump_gl_screen.c b/src/lib/dump_gl_screen.c
new file mode 100644
index 0000000..c4cc210
--- /dev/null
+++ b/src/lib/dump_gl_screen.c
@@ -0,0 +1,22 @@
+#include "dump_gl_screen.h"
+#include "write_bmp.h"
+
+#include <stdlib.h>
+
+void dump_gl_screen(const char *filename, GLsizei width, GLsizei height)
+{
+ void *data;
+
+ if(width==0 || height==0)
+ return;
+
+ data = malloc(width * height * 4);
+ if(!data)
+ return;
+
+ glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data);
+
+ bmp_dump32((char*)data, width, height, false, filename);
+ free(data);
+}
+
diff --git a/src/lib/dump_gl_screen.h b/src/lib/dump_gl_screen.h
new file mode 100644
index 0000000..0fe2df5
--- /dev/null
+++ b/src/lib/dump_gl_screen.h
@@ -0,0 +1,9 @@
+#ifndef H_DUMP_GL_SCREEN
+#define H_DUMP_GL_SCREEN
+
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+
+void dump_gl_screen(const char *filename, GLsizei width, GLsizei height);
+
+#endif
diff --git a/src/lib/eglutil.c b/src/lib/eglutil.c
new file mode 100644
index 0000000..4edbca7
--- /dev/null
+++ b/src/lib/eglutil.c
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2011-2012 Luc Verhaegen <libv@codethink.co.uk>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdbool.h>
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+#include "eglutil.h"
+char *
+eglStrError(EGLint error)
+{
+ printf("Error: %d\n", error);
+
+ switch (error) {
+ case EGL_SUCCESS:
+ return "EGL_SUCCESS";
+ case EGL_BAD_ALLOC:
+ return "EGL_BAD_ALLOC";
+ case EGL_BAD_CONFIG:
+ return "EGL_BAD_CONFIG";
+ case EGL_BAD_PARAMETER:
+ return "EGL_BAD_PARAMETER";
+ case EGL_BAD_MATCH:
+ return "EGL_BAD_MATCH";
+ case EGL_BAD_ATTRIBUTE:
+ return "EGL_BAD_ATTRIBUTE";
+ default:
+ return "UNKNOWN";
+ }
+}
+
+void printEGLConfig(EGLDisplay display, EGLConfig config)
+{
+ EGLint red, green, blue, alpha, depth, stencil;
+ EGLint samples, sampleBuffers;
+ eglGetConfigAttrib(display, config, EGL_RED_SIZE, &red);
+ eglGetConfigAttrib(display, config, EGL_GREEN_SIZE, &green);
+ eglGetConfigAttrib(display, config, EGL_BLUE_SIZE, &blue);
+ eglGetConfigAttrib(display, config, EGL_ALPHA_SIZE, &alpha);
+ eglGetConfigAttrib(display, config, EGL_DEPTH_SIZE, &depth);
+ eglGetConfigAttrib(display, config, EGL_STENCIL_SIZE, &stencil);
+ eglGetConfigAttrib(display, config, EGL_SAMPLE_BUFFERS, &sampleBuffers);
+ eglGetConfigAttrib(display, config, EGL_SAMPLES, &samples);
+ printf("EGL config: R%i G%i B%i A%i D%i S%i BUFFERS=%i SAMPLES=%i\n",
+ red, green, blue, alpha, depth, stencil, sampleBuffers, samples);
+}
+
diff --git a/src/lib/eglutil.h b/src/lib/eglutil.h
new file mode 100644
index 0000000..986837b
--- /dev/null
+++ b/src/lib/eglutil.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2011-2012 Luc Verhaegen <libv@codethink.co.uk>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#ifndef H_EGLUTIL
+#include <EGL/egl.h>
+
+/* Get string for EGL error */
+char *eglStrError(EGLint error);
+
+/* Print basic information about EGL configuration */
+void printEGLConfig(EGLDisplay display, EGLConfig config);
+
+#endif
+
diff --git a/src/lib/elf_hook.c b/src/lib/elf_hook.c
new file mode 100644
index 0000000..f5674b5
--- /dev/null
+++ b/src/lib/elf_hook.c
@@ -0,0 +1,498 @@
+// Based on https://github.com/shoumikhin/ELF-Hook by Anthony Shoumikhin
+// http://www.codeproject.com/Articles/70302/Redirecting-functions-in-shared-ELF-libraries
+//
+#include "elf_hook.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <dlfcn.h>
+#include <elf.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <unistd.h>
+#include <errno.h>
+//rename standard types for convenience
+#ifdef __x86_64
+ #define Elf_Ehdr Elf64_Ehdr
+ #define Elf_Shdr Elf64_Shdr
+ #define Elf_Sym Elf64_Sym
+ #define Elf_Rel Elf64_Rela
+ #define ELF_R_SYM ELF64_R_SYM
+ #define REL_DYN ".rela.dyn"
+ #define REL_PLT ".rela.plt"
+#else
+ #define Elf_Ehdr Elf32_Ehdr
+ #define Elf_Shdr Elf32_Shdr
+ #define Elf_Sym Elf32_Sym
+ #define Elf_Rel Elf32_Rel
+ #define ELF_R_SYM ELF32_R_SYM
+ #define REL_DYN ".rel.dyn"
+ #define REL_PLT ".rel.plt"
+#endif
+//==================================================================================================
+#define BUFSIZE 4096
+/**
+ * In /proc/x/maps find base address and full name of library that contains "libname"
+ * This is a workaround for android dladdr not returning the full path to the library, making
+ * it hard to find what file to open.
+ */
+int parse_maps(char *libname, char **fullpath, void **base)
+{
+ char name[100] = "";
+ char maps[BUFSIZE];
+ int fd = 0, size = 0, rv = 0;
+ int line = 0;
+ snprintf(name, sizeof(name), "/proc/%i/maps", getpid());
+ fd = open(name, O_RDONLY);
+ if(fd<0) return errno;
+ do {
+ rv = read(fd, &maps[size], BUFSIZE - size);
+ if(rv == -1)
+ {
+ perror("read");
+ close(fd);
+ return errno;
+ }
+ size += rv;
+ line = 0;
+ while(1)
+ {
+ size_t start, end;
+ char flags[32];
+ unsigned long long file_offset, inode;
+ int dev_major, dev_minor;
+ int line_end = line;
+ int num,ptr;
+ while(line_end < size && maps[line_end] != '\n')
+ line_end++;
+ if(line_end == size)
+ break; // Incomplete line
+ maps[line_end] = 0;
+ num = sscanf(&maps[line],"%zx-%zx %31s %Lx %x:%x %Lu %n", &start, &end, flags, &file_offset, &dev_major, &dev_minor, &inode, &ptr);
+ if(num == 7 && strstr(&maps[line+ptr], libname) != NULL)
+ {
+ *base = (void*) start - file_offset;
+ *fullpath = strdup(&maps[line+ptr]);
+ return 0;
+ }
+ line = line_end + 1;
+ }
+ // Move uncompleted line
+ memmove(maps, &maps[line], size - line);
+ size = size - line;
+ if(size == BUFSIZE)
+ return 1; // Line longer than buffer
+ } while(rv != 0);
+ close(fd);
+ return 1; // Not found
+}
+
+//==================================================================================================
+int symbol_library_info(const char *symbol, const char **fname, void **fbase)
+{
+ Dl_info info;
+ void *addr;
+ addr = dlsym(RTLD_DEFAULT, symbol);
+ if(addr == NULL)
+ {
+ fprintf(stderr, "Unable to find test symbol\n");
+ return 1;
+ }
+ if(!dladdr(addr, &info))
+ {
+ fprintf(stderr, "Error getting information about %p\n", addr);
+ return 1;
+ }
+ printf("Library found: %s at address %p\n", info.dli_fname, info.dli_fbase);
+ if(fname) /* This is supposed to return the full path, but doesn't on android :( */
+ *fname = info.dli_fname;
+ if(fbase)
+ *fbase = info.dli_fbase;
+ return 0;
+}
+
+//==================================================================================================
+static int read_header(int d, Elf_Ehdr **header)
+{
+ *header = (Elf_Ehdr *)malloc(sizeof(Elf_Ehdr));
+
+ if (lseek(d, 0, SEEK_SET) < 0)
+ {
+ free(*header);
+
+ return errno;
+ }
+
+ if (read(d, *header, sizeof(Elf_Ehdr)) <= 0)
+ {
+ free(*header);
+
+ return errno = EINVAL;
+ }
+
+ return 0;
+}
+//--------------------------------------------------------------------------------------------------
+static int read_section_table(int d, Elf_Ehdr const *header, Elf_Shdr **table)
+{
+ size_t size;
+
+ if (NULL == header)
+ return EINVAL;
+
+ size = header->e_shnum * sizeof(Elf_Shdr);
+ *table = (Elf_Shdr *)malloc(size);
+
+ if (lseek(d, header->e_shoff, SEEK_SET) < 0)
+ {
+ free(*table);
+
+ return errno;
+ }
+
+ if (read(d, *table, size) <= 0)
+ {
+ free(*table);
+
+ return errno = EINVAL;
+ }
+
+ return 0;
+}
+//--------------------------------------------------------------------------------------------------
+static int read_string_table(int d, Elf_Shdr const *section, char const **strings)
+{
+ if (NULL == section)
+ return EINVAL;
+
+ *strings = (char const *)malloc(section->sh_size);
+
+ if (lseek(d, section->sh_offset, SEEK_SET) < 0)
+ {
+ free((void *)*strings);
+
+ return errno;
+ }
+
+ if (read(d, (char *)*strings, section->sh_size) <= 0)
+ {
+ free((void *)*strings);
+
+ return errno = EINVAL;
+ }
+
+ return 0;
+}
+//--------------------------------------------------------------------------------------------------
+static int read_symbol_table(int d, Elf_Shdr const *section, Elf_Sym **table)
+{
+ if (NULL == section)
+ return EINVAL;
+
+ *table = (Elf_Sym *)malloc(section->sh_size);
+
+ if (lseek(d, section->sh_offset, SEEK_SET) < 0)
+ {
+ free(*table);
+
+ return errno;
+ }
+
+ if (read(d, *table, section->sh_size) <= 0)
+ {
+ free(*table);
+
+ return errno = EINVAL;
+ }
+
+ return 0;
+}
+//--------------------------------------------------------------------------------------------------
+static int section_by_index(int d, size_t const index, Elf_Shdr **section)
+{
+ Elf_Ehdr *header = NULL;
+ Elf_Shdr *sections = NULL;
+
+ *section = NULL;
+
+ if (
+ read_header(d, &header) ||
+ read_section_table(d, header, &sections)
+ )
+ return errno;
+
+ if (index < header->e_shnum)
+ {
+ *section = (Elf_Shdr *)malloc(sizeof(Elf_Shdr));
+
+ if (NULL == *section)
+ {
+ free(header);
+ free(sections);
+
+ return errno;
+ }
+
+ memcpy(*section, sections + index, sizeof(Elf_Shdr));
+ }
+ else
+ return EINVAL;
+
+ free(header);
+ free(sections);
+
+ return 0;
+}
+//--------------------------------------------------------------------------------------------------
+static int section_by_type(int d, size_t const section_type, Elf_Shdr **section)
+{
+ Elf_Ehdr *header = NULL;
+ Elf_Shdr *sections = NULL;
+ size_t i;
+
+ *section = NULL;
+
+ if (
+ read_header(d, &header) ||
+ read_section_table(d, header, &sections)
+ )
+ return errno;
+
+ for (i = 0; i < header->e_shnum; ++i)
+ if (section_type == sections[i].sh_type)
+ {
+ *section = (Elf_Shdr *)malloc(sizeof(Elf_Shdr));
+
+ if (NULL == *section)
+ {
+ free(header);
+ free(sections);
+
+ return errno;
+ }
+
+ memcpy(*section, sections + i, sizeof(Elf_Shdr));
+
+ break;
+ }
+
+ free(header);
+ free(sections);
+
+ return 0;
+}
+//--------------------------------------------------------------------------------------------------
+static int section_by_name(int d, char const *section_name, Elf_Shdr **section)
+{
+ Elf_Ehdr *header = NULL;
+ Elf_Shdr *sections = NULL;
+ char const *strings = NULL;
+ size_t i;
+
+ *section = NULL;
+
+ if (
+ read_header(d, &header) ||
+ read_section_table(d, header, &sections) ||
+ read_string_table(d, &sections[header->e_shstrndx], &strings)
+ )
+ return errno;
+
+ for (i = 0; i < header->e_shnum; ++i)
+ if (!strcmp(section_name, &strings[sections[i].sh_name]))
+ {
+ *section = (Elf_Shdr *)malloc(sizeof(Elf_Shdr));
+
+ if (NULL == *section)
+ {
+ free(header);
+ free(sections);
+ free((void *)strings);
+
+ return errno;
+ }
+
+ memcpy(*section, sections + i, sizeof(Elf_Shdr));
+
+ break;
+ }
+
+ free(header);
+ free(sections);
+ free((void *)strings);
+
+ return 0;
+}
+//--------------------------------------------------------------------------------------------------
+static int symbol_by_name(int d, Elf_Shdr *section, char const *name, Elf_Sym **symbol, size_t *index)
+{
+ Elf_Shdr *strings_section = NULL;
+ char const *strings = NULL;
+ Elf_Sym *symbols = NULL;
+ size_t i, amount;
+
+ *symbol = NULL;
+ *index = 0;
+
+ if (
+ section_by_index(d, section->sh_link, &strings_section) ||
+ read_string_table(d, strings_section, &strings) ||
+ read_symbol_table(d, section, &symbols)
+ )
+ return errno;
+
+ amount = section->sh_size / sizeof(Elf_Sym);
+
+ for (i = 0; i < amount; ++i)
+ if (!strcmp(name, &strings[symbols[i].st_name]))
+ {
+ *symbol = (Elf_Sym *)malloc(sizeof(Elf_Sym));
+
+ if (NULL == *symbol)
+ {
+ free(strings_section);
+ free((void *)strings);
+ free(symbols);
+
+ return errno;
+ }
+
+ memcpy(*symbol, symbols + i, sizeof(Elf_Sym));
+ *index = i;
+
+ break;
+ }
+
+ free(strings_section);
+ free((void *)strings);
+ free(symbols);
+
+ return 0;
+}
+//--------------------------------------------------------------------------------------------------
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+void *elf_hook(char const *module_filename, void const *module_address, char const *name, void const *substitution)
+{
+ static size_t pagesize;
+
+ int descriptor; //file descriptor of shared module
+
+ Elf_Shdr
+ *dynsym = NULL, // ".dynsym" section header
+ *rel_plt = NULL, // ".rel.plt" section header
+ *rel_dyn = NULL; // ".rel.dyn" section header
+
+ Elf_Sym
+ *symbol = NULL; //symbol table entry for symbol named "name"
+
+ Elf_Rel
+ *rel_plt_table = NULL, //array with ".rel.plt" entries
+ *rel_dyn_table = NULL; //array with ".rel.dyn" entries
+
+ size_t
+ i,
+ name_index, //index of symbol named "name" in ".dyn.sym"
+ rel_plt_amount, // amount of ".rel.plt" entries
+ rel_dyn_amount, // amount of ".rel.dyn" entries
+ *name_address = NULL; //address of relocation for symbol named "name"
+
+ void *original = NULL; //address of the symbol being substituted
+
+ if (NULL == module_address || NULL == name || NULL == substitution)
+ return original;
+
+ if (!pagesize)
+ pagesize = sysconf(_SC_PAGESIZE);
+
+ descriptor = open(module_filename, O_RDONLY);
+
+ if (descriptor < 0)
+ return original;
+
+ if (
+ section_by_type(descriptor, SHT_DYNSYM, &dynsym) || //get ".dynsym" section
+ symbol_by_name(descriptor, dynsym, name, &symbol, &name_index) || //actually, we need only the index of symbol named "name" in the ".dynsym" table
+ section_by_name(descriptor, REL_PLT, &rel_plt) || //get ".rel.plt" (for 32-bit) or ".rela.plt" (for 64-bit) section
+ section_by_name(descriptor, REL_DYN, &rel_dyn) //get ".rel.dyn" (for 32-bit) or ".rela.dyn" (for 64-bit) section
+ )
+ { //if something went wrong
+ free(dynsym);
+ free(rel_plt);
+ free(rel_dyn);
+ free(symbol);
+ close(descriptor);
+
+ return original;
+ }
+//release the data used
+ free(dynsym);
+ free(symbol);
+
+ rel_plt_table = (Elf_Rel *)(((size_t)module_address) + rel_plt->sh_addr); //init the ".rel.plt" array
+ rel_plt_amount = rel_plt->sh_size / sizeof(Elf_Rel); //and get its size
+
+ rel_dyn_table = (Elf_Rel *)(((size_t)module_address) + rel_dyn->sh_addr); //init the ".rel.dyn" array
+ rel_dyn_amount = rel_dyn->sh_size / sizeof(Elf_Rel); //and get its size
+//release the data used
+ free(rel_plt);
+ free(rel_dyn);
+//and descriptor
+ close(descriptor);
+
+//now we've got ".rel.plt" (needed for PIC) table and ".rel.dyn" (for non-PIC) table and the symbol's index
+ for (i = 0; i < rel_plt_amount; ++i) //lookup the ".rel.plt" table
+ if (ELF_R_SYM(rel_plt_table[i].r_info) == name_index) //if we found the symbol to substitute in ".rel.plt"
+ {
+ name_address = (size_t *)(((size_t)module_address) + rel_plt_table[i].r_offset);
+ original = (void *)*name_address;
+ mprotect((void *)(((size_t)name_address) & (((size_t)-1) ^ (pagesize - 1))), pagesize, PROT_READ | PROT_WRITE | PROT_EXEC); //mark a memory page that contains the relocation as writable
+ *name_address = (size_t)substitution; //and replace it with the substitutional
+ // Removing write protection works on some platforms (such as Android), on others the LD linker
+ // itself uses writability of the plt memory. As security is not a concern here, leave it writable.
+ //mprotect((void *)(((size_t)name_address) & (((size_t)-1) ^ (pagesize - 1))), pagesize, PROT_READ | PROT_EXEC); //mark a memory page that contains the relocation as executable
+#ifdef DEBUG
+ printf("Replaced %p at %p with %p\n", original, name_address, substitution);
+#endif
+ break; //the target symbol appears in ".rel.plt" only once
+ }
+
+ if (original)
+ return original;
+#ifdef DEBUG
+ printf("non-PIC module: fallback\n");
+#endif
+//we will get here only with 32-bit non-PIC module
+ for (i = 0; i < rel_dyn_amount; ++i) //lookup the ".rel.dyn" table
+ if (ELF_R_SYM(rel_dyn_table[i].r_info) == name_index) //if we found the symbol to substitute in ".rel.dyn"
+ {
+ name_address = (size_t *)(((size_t)module_address) + rel_dyn_table[i].r_offset); //get the relocation address (address of a relative CALL (0xE8) instruction's argument)
+
+ if (!original)
+ original = (void *)(*name_address + (size_t)name_address + sizeof(size_t)); //calculate an address of the original function by a relative CALL (0xE8) instruction's argument
+
+ mprotect((void *)(((size_t)name_address) & (((size_t)-1) ^ (pagesize - 1))), pagesize, PROT_READ | PROT_WRITE); //mark a memory page that contains the relocation as writable
+
+ if (errno)
+ return NULL;
+
+ *name_address = (size_t)substitution - (size_t)name_address - sizeof(size_t); //calculate a new relative CALL (0xE8) instruction's argument for the substitutional function and write it down
+
+ mprotect((void *)(((size_t)name_address) & (((size_t)-1) ^ (pagesize - 1))), pagesize, PROT_READ | PROT_EXEC); //mark a memory page that contains the relocation back as executable
+
+ if (errno) //if something went wrong
+ {
+ *name_address = (size_t)original - (size_t)name_address - sizeof(size_t); //then restore the original function address
+
+ return NULL;
+ }
+ }
+
+ return original;
+}
+#ifdef __cplusplus
+}
+#endif
+//==================================================================================================
diff --git a/src/lib/elf_hook.h b/src/lib/elf_hook.h
new file mode 100644
index 0000000..fd3a6eb
--- /dev/null
+++ b/src/lib/elf_hook.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+int parse_maps(char *libname, char **fullpath, void **base);
+int symbol_library_info(const char *symbol, const char **fname, void **fbase);
+int get_module_base_address(char const *module_filename, void *handle, void **base);
+void *elf_hook(char const *module_filename, void const *module_address, char const *name, void const *substitution);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/lib/esShader.c b/src/lib/esShader.c
new file mode 100644
index 0000000..4ea2cbc
--- /dev/null
+++ b/src/lib/esShader.c
@@ -0,0 +1,155 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// ESShader.c
+//
+// Utility functions for loading shaders and creating program objects.
+//
+
+///
+// Includes
+//
+#include "esUtil.h"
+#include <stdlib.h>
+
+//////////////////////////////////////////////////////////////////
+//
+// Private Functions
+//
+//
+
+
+
+//////////////////////////////////////////////////////////////////
+//
+// Public Functions
+//
+//
+
+//
+///
+/// \brief Load a shader, check for compile errors, print error messages to output log
+/// \param type Type of shader (GL_VERTEX_SHADER or GL_FRAGMENT_SHADER)
+/// \param shaderSrc Shader source string
+/// \return A new shader object on success, 0 on failure
+//
+GLuint ESUTIL_API esLoadShader ( GLenum type, const char *shaderSrc )
+{
+ GLuint shader;
+ GLint compiled;
+
+ // Create the shader object
+ shader = glCreateShader ( type );
+
+ if ( shader == 0 )
+ return 0;
+
+ // Load the shader source
+ glShaderSource ( shader, 1, &shaderSrc, NULL );
+
+ // Compile the shader
+ glCompileShader ( shader );
+
+ // Check the compile status
+ glGetShaderiv ( shader, GL_COMPILE_STATUS, &compiled );
+
+ if ( !compiled )
+ {
+ GLint infoLen = 0;
+
+ glGetShaderiv ( shader, GL_INFO_LOG_LENGTH, &infoLen );
+
+ if ( infoLen > 1 )
+ {
+ char* infoLog = malloc (sizeof(char) * infoLen );
+
+ glGetShaderInfoLog ( shader, infoLen, NULL, infoLog );
+ esLogMessage ( "Error compiling shader:\n%s\n", infoLog );
+
+ free ( infoLog );
+ }
+
+ glDeleteShader ( shader );
+ return 0;
+ }
+
+ return shader;
+
+}
+
+
+//
+///
+/// \brief Load a vertex and fragment shader, create a program object, link program.
+// Errors output to log.
+/// \param vertShaderSrc Vertex shader source code
+/// \param fragShaderSrc Fragment shader source code
+/// \return A new program object linked with the vertex/fragment shader pair, 0 on failure
+//
+GLuint ESUTIL_API esLoadProgram ( const char *vertShaderSrc, const char *fragShaderSrc )
+{
+ GLuint vertexShader;
+ GLuint fragmentShader;
+ GLuint programObject;
+ GLint linked;
+
+ // Load the vertex/fragment shaders
+ vertexShader = esLoadShader ( GL_VERTEX_SHADER, vertShaderSrc );
+ if ( vertexShader == 0 )
+ return 0;
+
+ fragmentShader = esLoadShader ( GL_FRAGMENT_SHADER, fragShaderSrc );
+ if ( fragmentShader == 0 )
+ {
+ glDeleteShader( vertexShader );
+ return 0;
+ }
+
+ // Create the program object
+ programObject = glCreateProgram ( );
+
+ if ( programObject == 0 )
+ return 0;
+
+ glAttachShader ( programObject, vertexShader );
+ glAttachShader ( programObject, fragmentShader );
+
+ // Link the program
+ glLinkProgram ( programObject );
+
+ // Check the link status
+ glGetProgramiv ( programObject, GL_LINK_STATUS, &linked );
+
+ if ( !linked )
+ {
+ GLint infoLen = 0;
+
+ glGetProgramiv ( programObject, GL_INFO_LOG_LENGTH, &infoLen );
+
+ if ( infoLen > 1 )
+ {
+ char* infoLog = malloc (sizeof(char) * infoLen );
+
+ glGetProgramInfoLog ( programObject, infoLen, NULL, infoLog );
+ esLogMessage ( "Error linking program:\n%s\n", infoLog );
+
+ free ( infoLog );
+ }
+
+ glDeleteProgram ( programObject );
+ return 0;
+ }
+
+ // Free up no longer needed shader resources
+ glDeleteShader ( vertexShader );
+ glDeleteShader ( fragmentShader );
+
+ return programObject;
+} \ No newline at end of file
diff --git a/src/lib/esShader.h b/src/lib/esShader.h
new file mode 100644
index 0000000..a9def9c
--- /dev/null
+++ b/src/lib/esShader.h
@@ -0,0 +1,72 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+/*
+ * (c) 2009 Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef ESSHADER_H
+#define ESSHADER_H
+
+///
+// Includes
+//
+#include <GLES2/gl2.h>
+#include <EGL/egl.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ESUTIL_API
+
+//
+///
+/// \brief Load a shader, check for compile errors, print error messages to output log
+/// \param type Type of shader (GL_VERTEX_SHADER or GL_FRAGMENT_SHADER)
+/// \param shaderSrc Shader source string
+/// \return A new shader object on success, 0 on failure
+//
+GLuint ESUTIL_API esLoadShader ( GLenum type, const char *shaderSrc );
+
+//
+///
+/// \brief Load a vertex and fragment shader, create a program object, link program.
+/// Errors output to log.
+/// \param vertShaderSrc Vertex shader source code
+/// \param fragShaderSrc Fragment shader source code
+/// \return A new program object linked with the vertex/fragment shader pair, 0 on failure
+//
+GLuint ESUTIL_API esLoadProgram ( const char *vertShaderSrc, const char *fragShaderSrc );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ESSHAPES_H
+
diff --git a/src/lib/esShapes.c b/src/lib/esShapes.c
new file mode 100644
index 0000000..4dafbbe
--- /dev/null
+++ b/src/lib/esShapes.c
@@ -0,0 +1,290 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// ESShapes.c
+//
+// Utility functions for generating shapes
+//
+
+///
+// Includes
+//
+#include "esShapes.h"
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+///
+// Defines
+//
+#define ES_PI (3.14159265f)
+
+//////////////////////////////////////////////////////////////////
+//
+// Private Functions
+//
+//
+
+
+
+//////////////////////////////////////////////////////////////////
+//
+// Public Functions
+//
+//
+
+//
+/// \brief Generates geometry for a sphere. Allocates memory for the vertex data and stores
+/// the results in the arrays. Generate index list for a TRIANGLE_STRIP
+/// \param numSlices The number of slices in the sphere
+/// \param vertices If not NULL, will contain array of float3 positions
+/// \param normals If not NULL, will contain array of float3 normals
+/// \param texCoords If not NULL, will contain array of float2 texCoords
+/// \param indices If not NULL, will contain the array of indices for the triangle strip
+/// \return The number of indices required for rendering the buffers (the number of indices stored in the indices array
+/// if it is not NULL ) as a GL_TRIANGLE_STRIP
+//
+int ESUTIL_API esGenSphere ( int numSlices, float radius, float **vertices, float **normals,
+ float **texCoords, uint16_t **indices, int *numVertices_out)
+{
+ int i;
+ int j;
+ int numParallels = numSlices / 2;
+ int numVertices = ( numParallels + 1 ) * ( numSlices + 1 );
+ int numIndices = numParallels * numSlices * 6;
+ float angleStep = (2.0f * ES_PI) / ((float) numSlices);
+
+ // Allocate memory for buffers
+ if ( vertices != NULL )
+ *vertices = malloc ( sizeof(float) * 3 * numVertices );
+
+ if ( normals != NULL )
+ *normals = malloc ( sizeof(float) * 3 * numVertices );
+
+ if ( texCoords != NULL )
+ *texCoords = malloc ( sizeof(float) * 2 * numVertices );
+
+ if ( indices != NULL )
+ *indices = malloc ( sizeof(uint16_t) * numIndices );
+
+ for ( i = 0; i < numParallels + 1; i++ )
+ {
+ for ( j = 0; j < numSlices + 1; j++ )
+ {
+ int vertex = ( i * (numSlices + 1) + j ) * 3;
+
+ if ( vertices )
+ {
+ (*vertices)[vertex + 0] = radius * sinf ( angleStep * (float)i ) *
+ sinf ( angleStep * (float)j );
+ (*vertices)[vertex + 1] = radius * cosf ( angleStep * (float)i );
+ (*vertices)[vertex + 2] = radius * sinf ( angleStep * (float)i ) *
+ cosf ( angleStep * (float)j );
+ }
+
+ if ( normals )
+ {
+ (*normals)[vertex + 0] = (*vertices)[vertex + 0] / radius;
+ (*normals)[vertex + 1] = (*vertices)[vertex + 1] / radius;
+ (*normals)[vertex + 2] = (*vertices)[vertex + 2] / radius;
+ }
+
+ if ( texCoords )
+ {
+ int texIndex = ( i * (numSlices + 1) + j ) * 2;
+ (*texCoords)[texIndex + 0] = (float) j / (float) numSlices;
+ (*texCoords)[texIndex + 1] = 1.0f - ((float) i / (float) (numParallels));
+ }
+ }
+ }
+
+ // Generate the indices
+ if ( indices != NULL )
+ {
+ uint16_t *indexBuf = (*indices);
+ for ( i = 0; i < numParallels ; i++ )
+ {
+ for ( j = 0; j < numSlices; j++ )
+ {
+ *indexBuf++ = i * ( numSlices + 1 ) + j;
+ *indexBuf++ = ( i + 1 ) * ( numSlices + 1 ) + j;
+ *indexBuf++ = ( i + 1 ) * ( numSlices + 1 ) + ( j + 1 );
+
+ *indexBuf++ = i * ( numSlices + 1 ) + j;
+ *indexBuf++ = ( i + 1 ) * ( numSlices + 1 ) + ( j + 1 );
+ *indexBuf++ = i * ( numSlices + 1 ) + ( j + 1 );
+ }
+ }
+ }
+
+ if(numVertices_out)
+ {
+ *numVertices_out = numVertices;
+ }
+
+ return numIndices;
+}
+
+//
+/// \brief Generates geometry for a cube. Allocates memory for the vertex data and stores
+/// the results in the arrays. Generate index list for a TRIANGLES
+/// \param scale The size of the cube, use 1.0 for a unit cube.
+/// \param vertices If not NULL, will contain array of float3 positions
+/// \param normals If not NULL, will contain array of float3 normals
+/// \param texCoords If not NULL, will contain array of float2 texCoords
+/// \param indices If not NULL, will contain the array of indices for the triangle strip
+/// \return The number of indices required for rendering the buffers (the number of indices stored in the indices array
+/// if it is not NULL ) as a GL_TRIANGLE_STRIP
+//
+int ESUTIL_API esGenCube ( float scale, float **vertices, float **normals,
+ float **texCoords, uint16_t **indices, int *numVertices_out )
+{
+ int i;
+ int numVertices = 24;
+ int numIndices = 36;
+
+ float cubeVerts[] =
+ {
+ -0.5f, -0.5f, -0.5f,
+ -0.5f, -0.5f, 0.5f,
+ 0.5f, -0.5f, 0.5f,
+ 0.5f, -0.5f, -0.5f,
+ -0.5f, 0.5f, -0.5f,
+ -0.5f, 0.5f, 0.5f,
+ 0.5f, 0.5f, 0.5f,
+ 0.5f, 0.5f, -0.5f,
+ -0.5f, -0.5f, -0.5f,
+ -0.5f, 0.5f, -0.5f,
+ 0.5f, 0.5f, -0.5f,
+ 0.5f, -0.5f, -0.5f,
+ -0.5f, -0.5f, 0.5f,
+ -0.5f, 0.5f, 0.5f,
+ 0.5f, 0.5f, 0.5f,
+ 0.5f, -0.5f, 0.5f,
+ -0.5f, -0.5f, -0.5f,
+ -0.5f, -0.5f, 0.5f,
+ -0.5f, 0.5f, 0.5f,
+ -0.5f, 0.5f, -0.5f,
+ 0.5f, -0.5f, -0.5f,
+ 0.5f, -0.5f, 0.5f,
+ 0.5f, 0.5f, 0.5f,
+ 0.5f, 0.5f, -0.5f,
+ };
+
+ float cubeNormals[] =
+ {
+ 0.0f, -1.0f, 0.0f,
+ 0.0f, -1.0f, 0.0f,
+ 0.0f, -1.0f, 0.0f,
+ 0.0f, -1.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f,
+ 0.0f, 0.0f, -1.0f,
+ 0.0f, 0.0f, -1.0f,
+ 0.0f, 0.0f, -1.0f,
+ 0.0f, 0.0f, -1.0f,
+ 0.0f, 0.0f, 1.0f,
+ 0.0f, 0.0f, 1.0f,
+ 0.0f, 0.0f, 1.0f,
+ 0.0f, 0.0f, 1.0f,
+ -1.0f, 0.0f, 0.0f,
+ -1.0f, 0.0f, 0.0f,
+ -1.0f, 0.0f, 0.0f,
+ -1.0f, 0.0f, 0.0f,
+ 1.0f, 0.0f, 0.0f,
+ 1.0f, 0.0f, 0.0f,
+ 1.0f, 0.0f, 0.0f,
+ 1.0f, 0.0f, 0.0f,
+ };
+
+ float cubeTex[] =
+ {
+ 0.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ 1.0f, 0.0f,
+ 1.0f, 0.0f,
+ 1.0f, 1.0f,
+ 0.0f, 1.0f,
+ 0.0f, 0.0f,
+ 0.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ 1.0f, 0.0f,
+ 0.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ 1.0f, 0.0f,
+ 0.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ 1.0f, 0.0f,
+ 0.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ 1.0f, 0.0f,
+ };
+
+ // Allocate memory for buffers
+ if ( vertices != NULL )
+ {
+ *vertices = malloc ( sizeof(float) * 3 * numVertices );
+ memcpy( *vertices, cubeVerts, sizeof( cubeVerts ) );
+ for ( i = 0; i < numVertices * 3; i++ )
+ {
+ (*vertices)[i] *= scale;
+ }
+ }
+
+ if ( normals != NULL )
+ {
+ *normals = malloc ( sizeof(float) * 3 * numVertices );
+ memcpy( *normals, cubeNormals, sizeof( cubeNormals ) );
+ }
+
+ if ( texCoords != NULL )
+ {
+ *texCoords = malloc ( sizeof(float) * 2 * numVertices );
+ memcpy( *texCoords, cubeTex, sizeof( cubeTex ) ) ;
+ }
+
+
+ // Generate the indices
+ if ( indices != NULL )
+ {
+ uint16_t cubeIndices[] =
+ {
+ 0, 2, 1,
+ 0, 3, 2,
+ 4, 5, 6,
+ 4, 6, 7,
+ 8, 9, 10,
+ 8, 10, 11,
+ 12, 15, 14,
+ 12, 14, 13,
+ 16, 17, 18,
+ 16, 18, 19,
+ 20, 23, 22,
+ 20, 22, 21
+ };
+
+ *indices = malloc ( sizeof(uint16_t) * numIndices );
+ memcpy( *indices, cubeIndices, sizeof( cubeIndices ) );
+ }
+
+ if(numVertices_out)
+ {
+ *numVertices_out = numVertices;
+ }
+
+ return numIndices;
+}
diff --git a/src/lib/esShapes.h b/src/lib/esShapes.h
new file mode 100644
index 0000000..84d540a
--- /dev/null
+++ b/src/lib/esShapes.h
@@ -0,0 +1,58 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+/*
+ * (c) 2009 Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef ESSHAPES_H
+#define ESSHAPES_H
+
+///
+// Includes
+//
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ESUTIL_API
+
+int ESUTIL_API esGenSphere ( int numSlices, float radius, float **vertices, float **normals,
+ float **texCoords, uint16_t **indices, int *numVertices_out );
+int ESUTIL_API esGenCube ( float scale, float **vertices, float **normals,
+ float **texCoords, uint16_t **indices, int *numVertices_out );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ESSHAPES_H
+
diff --git a/src/lib/esTransform.c b/src/lib/esTransform.c
new file mode 100644
index 0000000..907ada2
--- /dev/null
+++ b/src/lib/esTransform.c
@@ -0,0 +1,293 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+/*
+ * (c) 2009 Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include "esTransform.h"
+#include <math.h>
+#include <string.h>
+
+#define PI 3.1415926535897932384626433832795f
+
+void ESUTIL_API
+esScale(ESMatrix *result, float sx, float sy, float sz)
+{
+ result->m[0][0] *= sx;
+ result->m[0][1] *= sx;
+ result->m[0][2] *= sx;
+ result->m[0][3] *= sx;
+
+ result->m[1][0] *= sy;
+ result->m[1][1] *= sy;
+ result->m[1][2] *= sy;
+ result->m[1][3] *= sy;
+
+ result->m[2][0] *= sz;
+ result->m[2][1] *= sz;
+ result->m[2][2] *= sz;
+ result->m[2][3] *= sz;
+}
+
+void ESUTIL_API
+esTranslate(ESMatrix *result, float tx, float ty, float tz)
+{
+ result->m[3][0] += (result->m[0][0] * tx + result->m[1][0] * ty + result->m[2][0] * tz);
+ result->m[3][1] += (result->m[0][1] * tx + result->m[1][1] * ty + result->m[2][1] * tz);
+ result->m[3][2] += (result->m[0][2] * tx + result->m[1][2] * ty + result->m[2][2] * tz);
+ result->m[3][3] += (result->m[0][3] * tx + result->m[1][3] * ty + result->m[2][3] * tz);
+}
+
+void ESUTIL_API
+esRotate(ESMatrix *result, float angle, float x, float y, float z)
+{
+ float sinAngle, cosAngle;
+ float mag = sqrtf(x * x + y * y + z * z);
+
+ sinAngle = sinf ( angle * PI / 180.0f );
+ cosAngle = cosf ( angle * PI / 180.0f );
+ if ( mag > 0.0f )
+ {
+ float xx, yy, zz, xy, yz, zx, xs, ys, zs;
+ float oneMinusCos;
+ ESMatrix rotMat;
+
+ x /= mag;
+ y /= mag;
+ z /= mag;
+
+ xx = x * x;
+ yy = y * y;
+ zz = z * z;
+ xy = x * y;
+ yz = y * z;
+ zx = z * x;
+ xs = x * sinAngle;
+ ys = y * sinAngle;
+ zs = z * sinAngle;
+ oneMinusCos = 1.0f - cosAngle;
+
+ rotMat.m[0][0] = (oneMinusCos * xx) + cosAngle;
+ rotMat.m[0][1] = (oneMinusCos * xy) - zs;
+ rotMat.m[0][2] = (oneMinusCos * zx) + ys;
+ rotMat.m[0][3] = 0.0F;
+
+ rotMat.m[1][0] = (oneMinusCos * xy) + zs;
+ rotMat.m[1][1] = (oneMinusCos * yy) + cosAngle;
+ rotMat.m[1][2] = (oneMinusCos * yz) - xs;
+ rotMat.m[1][3] = 0.0F;
+
+ rotMat.m[2][0] = (oneMinusCos * zx) - ys;
+ rotMat.m[2][1] = (oneMinusCos * yz) + xs;
+ rotMat.m[2][2] = (oneMinusCos * zz) + cosAngle;
+ rotMat.m[2][3] = 0.0F;
+
+ rotMat.m[3][0] = 0.0F;
+ rotMat.m[3][1] = 0.0F;
+ rotMat.m[3][2] = 0.0F;
+ rotMat.m[3][3] = 1.0F;
+
+ esMatrixMultiply( result, &rotMat, result );
+ }
+}
+
+void ESUTIL_API
+esFrustum(ESMatrix *result, float left, float right, float bottom, float top, float nearZ, float farZ)
+{
+ float deltaX = right - left;
+ float deltaY = top - bottom;
+ float deltaZ = farZ - nearZ;
+ ESMatrix frust;
+
+ if ( (nearZ <= 0.0f) || (farZ <= 0.0f) ||
+ (deltaX <= 0.0f) || (deltaY <= 0.0f) || (deltaZ <= 0.0f) )
+ return;
+
+ frust.m[0][0] = 2.0f * nearZ / deltaX;
+ frust.m[0][1] = frust.m[0][2] = frust.m[0][3] = 0.0f;
+
+ frust.m[1][1] = 2.0f * nearZ / deltaY;
+ frust.m[1][0] = frust.m[1][2] = frust.m[1][3] = 0.0f;
+
+ frust.m[2][0] = (right + left) / deltaX;
+ frust.m[2][1] = (top + bottom) / deltaY;
+ frust.m[2][2] = -(nearZ + farZ) / deltaZ;
+ frust.m[2][3] = -1.0f;
+
+ frust.m[3][2] = -2.0f * nearZ * farZ / deltaZ;
+ frust.m[3][0] = frust.m[3][1] = frust.m[3][3] = 0.0f;
+
+ esMatrixMultiply(result, &frust, result);
+}
+
+
+void ESUTIL_API
+esPerspective(ESMatrix *result, float fovy, float aspect, float nearZ, float farZ)
+{
+ float frustumW, frustumH;
+
+ frustumH = tanf( fovy / 360.0f * PI ) * nearZ;
+ frustumW = frustumH * aspect;
+
+ esFrustum( result, -frustumW, frustumW, -frustumH, frustumH, nearZ, farZ );
+}
+
+void ESUTIL_API
+esOrtho(ESMatrix *result, float left, float right, float bottom, float top, float nearZ, float farZ)
+{
+ float deltaX = right - left;
+ float deltaY = top - bottom;
+ float deltaZ = farZ - nearZ;
+ ESMatrix ortho;
+
+ if ( (deltaX == 0.0f) || (deltaY == 0.0f) || (deltaZ == 0.0f) )
+ return;
+
+ esMatrixLoadIdentity(&ortho);
+ ortho.m[0][0] = 2.0f / deltaX;
+ ortho.m[3][0] = -(right + left) / deltaX;
+ ortho.m[1][1] = 2.0f / deltaY;
+ ortho.m[3][1] = -(top + bottom) / deltaY;
+ ortho.m[2][2] = -2.0f / deltaZ;
+ ortho.m[3][2] = -(nearZ + farZ) / deltaZ;
+
+ esMatrixMultiply(result, &ortho, result);
+}
+
+
+void ESUTIL_API
+esMatrixMultiply(ESMatrix *result, ESMatrix *srcA, ESMatrix *srcB)
+{
+ ESMatrix tmp;
+ int i;
+
+ for (i=0; i<4; i++)
+ {
+ tmp.m[i][0] = (srcA->m[i][0] * srcB->m[0][0]) +
+ (srcA->m[i][1] * srcB->m[1][0]) +
+ (srcA->m[i][2] * srcB->m[2][0]) +
+ (srcA->m[i][3] * srcB->m[3][0]) ;
+
+ tmp.m[i][1] = (srcA->m[i][0] * srcB->m[0][1]) +
+ (srcA->m[i][1] * srcB->m[1][1]) +
+ (srcA->m[i][2] * srcB->m[2][1]) +
+ (srcA->m[i][3] * srcB->m[3][1]) ;
+
+ tmp.m[i][2] = (srcA->m[i][0] * srcB->m[0][2]) +
+ (srcA->m[i][1] * srcB->m[1][2]) +
+ (srcA->m[i][2] * srcB->m[2][2]) +
+ (srcA->m[i][3] * srcB->m[3][2]) ;
+
+ tmp.m[i][3] = (srcA->m[i][0] * srcB->m[0][3]) +
+ (srcA->m[i][1] * srcB->m[1][3]) +
+ (srcA->m[i][2] * srcB->m[2][3]) +
+ (srcA->m[i][3] * srcB->m[3][3]) ;
+ }
+ memcpy(result, &tmp, sizeof(ESMatrix));
+}
+
+
+void ESUTIL_API
+esMatrixLoadIdentity(ESMatrix *result)
+{
+ memset(result, 0x0, sizeof(ESMatrix));
+ result->m[0][0] = 1.0f;
+ result->m[1][1] = 1.0f;
+ result->m[2][2] = 1.0f;
+ result->m[3][3] = 1.0f;
+}
+
+// From Ogre3D
+void ESUTIL_API esMatrixInverse3x3(ESMatrix *result, ESMatrix *input)
+{
+ // Invert a 3x3 using cofactors. This is about 8 times faster than
+ // the Numerical Recipes code which uses Gaussian elimination.
+
+ result->m[0][0] = input->m[1][1]*input->m[2][2] -
+ input->m[1][2]*input->m[2][1];
+ result->m[0][1] = input->m[0][2]*input->m[2][1] -
+ input->m[0][1]*input->m[2][2];
+ result->m[0][2] = input->m[0][1]*input->m[1][2] -
+ input->m[0][2]*input->m[1][1];
+ result->m[0][3] = 0.0f;
+ result->m[1][0] = input->m[1][2]*input->m[2][0] -
+ input->m[1][0]*input->m[2][2];
+ result->m[1][1] = input->m[0][0]*input->m[2][2] -
+ input->m[0][2]*input->m[2][0];
+ result->m[1][2] = input->m[0][2]*input->m[1][0] -
+ input->m[0][0]*input->m[1][2];
+ result->m[1][3] = 0.0f;
+ result->m[2][0] = input->m[1][0]*input->m[2][1] -
+ input->m[1][1]*input->m[2][0];
+ result->m[2][1] = input->m[0][1]*input->m[2][0] -
+ input->m[0][0]*input->m[2][1];
+ result->m[2][2] = input->m[0][0]*input->m[1][1] -
+ input->m[0][1]*input->m[1][0];
+ result->m[2][3] = 0.0f;
+ result->m[3][0] = 0.0f;
+ result->m[3][1] = 0.0f;
+ result->m[3][2] = 0.0f;
+ result->m[3][3] = 1.0f;
+
+ float fDet =
+ input->m[0][0]*result->m[0][0] +
+ input->m[0][1]*result->m[1][0]+
+ input->m[0][2]*result->m[2][0];
+
+ if ( fabsf(fDet) <= 1e-6 )
+ return;
+
+ float fInvDet = 1.0f/fDet;
+ for (size_t iRow = 0; iRow < 3; iRow++)
+ {
+ for (size_t iCol = 0; iCol < 3; iCol++)
+ result->m[iRow][iCol] *= fInvDet;
+ }
+}
+
+void ESUTIL_API esMatrixTranspose(ESMatrix *result, ESMatrix *input)
+{
+ result->m[0][0] = input->m[0][0];
+ result->m[0][1] = input->m[1][0];
+ result->m[0][2] = input->m[2][0];
+ result->m[0][3] = input->m[3][0];
+ result->m[1][0] = input->m[0][1];
+ result->m[1][1] = input->m[1][1];
+ result->m[1][2] = input->m[2][1];
+ result->m[1][3] = input->m[3][1];
+ result->m[2][0] = input->m[0][2];
+ result->m[2][1] = input->m[1][2];
+ result->m[2][2] = input->m[2][2];
+ result->m[2][3] = input->m[3][2];
+ result->m[3][0] = input->m[0][3];
+ result->m[3][1] = input->m[1][3];
+ result->m[3][2] = input->m[2][3];
+ result->m[3][3] = input->m[3][3];
+}
+
diff --git a/src/lib/esTransform.h b/src/lib/esTransform.h
new file mode 100644
index 0000000..27bc080
--- /dev/null
+++ b/src/lib/esTransform.h
@@ -0,0 +1,125 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+/*
+ * (c) 2009 Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef ESTRANSFORM_H
+#define ESTRANSFORM_H
+
+///
+// Includes
+//
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ESUTIL_API
+
+///
+// Types
+//
+
+typedef struct
+{
+ float m[4][4];
+} ESMatrix;
+
+//
+/// \brief multiply matrix specified by result with a scaling matrix and return new matrix in result
+/// \param result Specifies the input matrix. Scaled matrix is returned in result.
+/// \param sx, sy, sz Scale factors along the x, y and z axes respectively
+//
+void ESUTIL_API esScale(ESMatrix *result, float sx, float sy, float sz);
+
+//
+/// \brief multiply matrix specified by result with a translation matrix and return new matrix in result
+/// \param result Specifies the input matrix. Translated matrix is returned in result.
+/// \param tx, ty, tz Scale factors along the x, y and z axes respectively
+//
+void ESUTIL_API esTranslate(ESMatrix *result, float tx, float ty, float tz);
+
+//
+/// \brief multiply matrix specified by result with a rotation matrix and return new matrix in result
+/// \param result Specifies the input matrix. Rotated matrix is returned in result.
+/// \param angle Specifies the angle of rotation, in degrees.
+/// \param x, y, z Specify the x, y and z coordinates of a vector, respectively
+//
+void ESUTIL_API esRotate(ESMatrix *result, float angle, float x, float y, float z);
+
+//
+// \brief multiply matrix specified by result with a perspective matrix and return new matrix in result
+/// \param result Specifies the input matrix. new matrix is returned in result.
+/// \param left, right Coordinates for the left and right vertical clipping planes
+/// \param bottom, top Coordinates for the bottom and top horizontal clipping planes
+/// \param nearZ, farZ Distances to the near and far depth clipping planes. Both distances must be positive.
+//
+void ESUTIL_API esFrustum(ESMatrix *result, float left, float right, float bottom, float top, float nearZ, float farZ);
+
+//
+/// \brief multiply matrix specified by result with a perspective matrix and return new matrix in result
+/// \param result Specifies the input matrix. new matrix is returned in result.
+/// \param fovy Field of view y angle in degrees
+/// \param aspect Aspect ratio of screen
+/// \param nearZ Near plane distance
+/// \param farZ Far plane distance
+//
+void ESUTIL_API esPerspective(ESMatrix *result, float fovy, float aspect, float nearZ, float farZ);
+
+//
+/// \brief multiply matrix specified by result with a perspective matrix and return new matrix in result
+/// \param result Specifies the input matrix. new matrix is returned in result.
+/// \param left, right Coordinates for the left and right vertical clipping planes
+/// \param bottom, top Coordinates for the bottom and top horizontal clipping planes
+/// \param nearZ, farZ Distances to the near and far depth clipping planes. These values are negative if plane is behind the viewer
+//
+void ESUTIL_API esOrtho(ESMatrix *result, float left, float right, float bottom, float top, float nearZ, float farZ);
+
+//
+/// \brief perform the following operation - result matrix = srcA matrix * srcB matrix
+/// \param result Returns multiplied matrix
+/// \param srcA, srcB Input matrices to be multiplied
+//
+void ESUTIL_API esMatrixMultiply(ESMatrix *result, ESMatrix *srcA, ESMatrix *srcB);
+
+//
+//// \brief return an indentity matrix
+//// \param result returns identity matrix
+//
+void ESUTIL_API esMatrixLoadIdentity(ESMatrix *result);
+
+void ESUTIL_API esMatrixInverse3x3(ESMatrix *result, ESMatrix *input);
+void ESUTIL_API esMatrixTranspose(ESMatrix *result, ESMatrix *input);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ESUTIL_H
diff --git a/src/lib/esUtil.c b/src/lib/esUtil.c
new file mode 100644
index 0000000..9c157c9
--- /dev/null
+++ b/src/lib/esUtil.c
@@ -0,0 +1,107 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// ESUtil.c
+//
+// A utility library for OpenGL ES. This library provides a
+// basic common framework for the example applications in the
+// OpenGL ES 2.0 Programming Guide.
+//
+
+///
+// Includes
+//
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <sys/time.h>
+#include "esUtil.h"
+
+///
+// esLogMessage()
+//
+// Log an error message to the debug output for the platform
+//
+void ESUTIL_API esLogMessage ( const char *formatStr, ... )
+{
+ va_list params;
+ char buf[BUFSIZ];
+
+ va_start ( params, formatStr );
+ vsprintf ( buf, formatStr, params );
+
+ printf ( "%s", buf );
+
+ va_end ( params );
+}
+
+
+///
+// esLoadTGA()
+//
+// Loads a 24-bit TGA image from a file. This is probably the simplest TGA loader ever.
+// Does not support loading of compressed TGAs nor TGAa with alpha channel. But for the
+// sake of the examples, this is sufficient.
+//
+
+char* ESUTIL_API esLoadTGA ( char *fileName, int *width, int *height )
+{
+ char *buffer = NULL;
+ FILE *f;
+ unsigned char tgaheader[12];
+ unsigned char attributes[6];
+ unsigned int imagesize;
+
+ f = fopen(fileName, "rb");
+ if(f == NULL) return NULL;
+
+ if(fread(&tgaheader, sizeof(tgaheader), 1, f) == 0)
+ {
+ fclose(f);
+ return NULL;
+ }
+
+ if(fread(attributes, sizeof(attributes), 1, f) == 0)
+ {
+ fclose(f);
+ return 0;
+ }
+
+ *width = attributes[1] * 256 + attributes[0];
+ *height = attributes[3] * 256 + attributes[2];
+ imagesize = attributes[4] / 8 * *width * *height;
+ buffer = malloc(imagesize);
+ if (buffer == NULL)
+ {
+ fclose(f);
+ return 0;
+ }
+
+ if(fread(buffer, 1, imagesize, f) != imagesize)
+ {
+ free(buffer);
+ return NULL;
+ }
+ fclose(f);
+ return buffer;
+}
+
+double esNow(void)
+{
+ struct timeval tv;
+#ifdef __VMS
+ (void) gettimeofday(&tv, NULL );
+#else
+ (void) gettimeofday(&tv, NULL);
+#endif
+ return tv.tv_sec * 1.0 + tv.tv_usec / 1000000.0;
+}
+
diff --git a/src/lib/esUtil.h b/src/lib/esUtil.h
new file mode 100644
index 0000000..8b59990
--- /dev/null
+++ b/src/lib/esUtil.h
@@ -0,0 +1,51 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+//
+/// \file ESUtil.h
+/// \brief A utility library for OpenGL ES. This library provides a
+/// basic common framework for the example applications in the
+/// OpenGL ES 2.0 Programming Guide.
+//
+#ifndef ESUTIL_H
+#define ESUTIL_H
+
+///
+// Includes
+//
+#include <stdint.h>
+
+#ifdef __cplusplus
+
+extern "C" {
+#endif
+
+///
+// Macros
+//
+#define ESUTIL_API
+#define ESCALLBACK
+
+//
+/// \brief Log a message to the debug output for the platform
+/// \param formatStr Format string for error log.
+//
+void ESUTIL_API esLogMessage ( const char *formatStr, ... );
+
+char* ESUTIL_API esLoadTGA ( char *fileName, int *width, int *height );
+
+/* return current time (in seconds) */
+double ESUTIL_API esNow(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ESUTIL_H
diff --git a/src/lib/esWindow.c b/src/lib/esWindow.c
new file mode 100644
index 0000000..1e97f15
--- /dev/null
+++ b/src/lib/esWindow.c
@@ -0,0 +1,349 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// ESUtil.c
+//
+// A utility library for OpenGL ES. This library provides a
+// basic common framework for the example applications in the
+// OpenGL ES 2.0 Programming Guide.
+//
+
+///
+// Includes
+//
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <sys/time.h>
+#include <GLES2/gl2.h>
+#include <EGL/egl.h>
+#include "esUtil.h"
+#include "esWindow.h"
+
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/Xutil.h>
+
+// X11 related local variables
+static Display *x_display = NULL;
+
+///
+// CreateEGLContext()
+//
+// Creates an EGL rendering context and all associated elements
+//
+EGLBoolean CreateEGLContext ( EGLNativeWindowType hWnd, EGLDisplay* eglDisplay,
+ EGLContext* eglContext, EGLSurface* eglSurface,
+ EGLint attribList[])
+{
+ EGLint numConfigs;
+ EGLint majorVersion;
+ EGLint minorVersion;
+ EGLDisplay display;
+ EGLContext context;
+ EGLSurface surface;
+ EGLConfig config;
+ EGLint contextAttribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE, EGL_NONE };
+
+ // Get Display
+ display = eglGetDisplay((EGLNativeDisplayType)x_display);
+ if ( display == EGL_NO_DISPLAY )
+ {
+ return EGL_FALSE;
+ }
+
+ // Initialize EGL
+ if ( !eglInitialize(display, &majorVersion, &minorVersion) )
+ {
+ return EGL_FALSE;
+ }
+
+ // Get configs
+ if ( !eglGetConfigs(display, NULL, 0, &numConfigs) )
+ {
+ return EGL_FALSE;
+ }
+
+ // Choose config
+ if ( !eglChooseConfig(display, attribList, &config, 1, &numConfigs) )
+ {
+ return EGL_FALSE;
+ }
+
+ // Create a surface
+ surface = eglCreateWindowSurface(display, config, (EGLNativeWindowType)hWnd, NULL);
+ if ( surface == EGL_NO_SURFACE )
+ {
+ return EGL_FALSE;
+ }
+
+ // Create a GL context
+ context = eglCreateContext(display, config, EGL_NO_CONTEXT, contextAttribs );
+ if ( context == EGL_NO_CONTEXT )
+ {
+ return EGL_FALSE;
+ }
+
+ // Make the context current
+ if ( !eglMakeCurrent(display, surface, surface, context) )
+ {
+ return EGL_FALSE;
+ }
+
+ *eglDisplay = display;
+ *eglSurface = surface;
+ *eglContext = context;
+ return EGL_TRUE;
+}
+
+
+///
+// WinCreate()
+//
+// This function initialized the native X11 display and window for EGL
+//
+EGLBoolean WinCreate(ESContext *esContext, const char *title)
+{
+ Window root;
+ XSetWindowAttributes swa;
+ XSetWindowAttributes xattr;
+ Atom wm_state;
+ XWMHints hints;
+ XEvent xev;
+ Window win;
+
+ /*
+ * X11 native display initialization
+ */
+
+ x_display = XOpenDisplay(NULL);
+ if ( x_display == NULL )
+ {
+ return EGL_FALSE;
+ }
+
+ root = DefaultRootWindow(x_display);
+
+ swa.event_mask = ExposureMask | PointerMotionMask | KeyPressMask;
+ win = XCreateWindow(
+ x_display, root,
+ 0, 0, esContext->width, esContext->height, 0,
+ CopyFromParent, InputOutput,
+ CopyFromParent, CWEventMask,
+ &swa );
+
+ xattr.override_redirect = FALSE;
+ XChangeWindowAttributes ( x_display, win, CWOverrideRedirect, &xattr );
+
+ hints.input = TRUE;
+ hints.flags = InputHint;
+ XSetWMHints(x_display, win, &hints);
+
+ // make the window visible on the screen
+ XMapWindow (x_display, win);
+ XStoreName (x_display, win, title);
+
+ // get identifiers for the provided atom name strings
+ wm_state = XInternAtom (x_display, "_NET_WM_STATE", FALSE);
+
+ memset ( &xev, 0, sizeof(xev) );
+ xev.type = ClientMessage;
+ xev.xclient.window = win;
+ xev.xclient.message_type = wm_state;
+ xev.xclient.format = 32;
+ xev.xclient.data.l[0] = 1;
+ xev.xclient.data.l[1] = FALSE;
+ XSendEvent (
+ x_display,
+ DefaultRootWindow ( x_display ),
+ FALSE,
+ SubstructureNotifyMask,
+ &xev );
+
+ esContext->hWnd = (EGLNativeWindowType) win;
+ return EGL_TRUE;
+}
+
+
+///
+// userInterrupt()
+//
+// Reads from X11 event loop and interrupt program if there is a keypress, or
+// window close action.
+//
+GLboolean userInterrupt(ESContext *esContext)
+{
+ XEvent xev;
+ KeySym key;
+ GLboolean userinterrupt = GL_FALSE;
+ char text;
+
+ // Pump all messages from X server. Keypresses are directed to keyfunc (if defined)
+ while ( XPending ( x_display ) )
+ {
+ XNextEvent( x_display, &xev );
+ if ( xev.type == KeyPress )
+ {
+ if (XLookupString(&xev.xkey,&text,1,&key,0)==1)
+ {
+ if (esContext->keyFunc != NULL)
+ esContext->keyFunc(esContext, text, 0, 0);
+ }
+ }
+ if ( xev.type == DestroyNotify )
+ userinterrupt = GL_TRUE;
+ }
+ return userinterrupt;
+}
+
+
+//////////////////////////////////////////////////////////////////
+//
+// Public Functions
+//
+//
+
+///
+// esInitContext()
+//
+// Initialize ES utility context. This must be called before calling any other
+// functions.
+//
+void ESUTIL_API esInitContext ( ESContext *esContext )
+{
+ if ( esContext != NULL )
+ {
+ memset( esContext, 0, sizeof( ESContext) );
+ }
+}
+
+
+///
+// esCreateWindow()
+//
+// title - name for title bar of window
+// width - width of window to create
+// height - height of window to create
+// flags - bitwise or of window creation flags
+// ES_WINDOW_ALPHA - specifies that the framebuffer should have alpha
+// ES_WINDOW_DEPTH - specifies that a depth buffer should be created
+// ES_WINDOW_STENCIL - specifies that a stencil buffer should be created
+// ES_WINDOW_MULTISAMPLE - specifies that a multi-sample buffer should be created
+//
+GLboolean ESUTIL_API esCreateWindow ( ESContext *esContext, const char* title, GLint width, GLint height, GLuint flags )
+{
+ EGLint attribList[] =
+ {
+ EGL_RED_SIZE, 5,
+ EGL_GREEN_SIZE, 6,
+ EGL_BLUE_SIZE, 5,
+ EGL_ALPHA_SIZE, (flags & ES_WINDOW_ALPHA) ? 8 : EGL_DONT_CARE,
+ EGL_DEPTH_SIZE, (flags & ES_WINDOW_DEPTH) ? 8 : EGL_DONT_CARE,
+ EGL_STENCIL_SIZE, (flags & ES_WINDOW_STENCIL) ? 8 : EGL_DONT_CARE,
+ EGL_SAMPLE_BUFFERS, (flags & ES_WINDOW_MULTISAMPLE) ? 1 : 0,
+ EGL_NONE
+ };
+
+ if ( esContext == NULL )
+ {
+ return GL_FALSE;
+ }
+
+ esContext->width = width;
+ esContext->height = height;
+
+ if ( !WinCreate ( esContext, title) )
+ {
+ return GL_FALSE;
+ }
+
+
+ if ( !CreateEGLContext ( esContext->hWnd,
+ &esContext->eglDisplay,
+ &esContext->eglContext,
+ &esContext->eglSurface,
+ attribList) )
+ {
+ return GL_FALSE;
+ }
+
+
+ return GL_TRUE;
+}
+
+
+///
+// esMainLoop()
+//
+// Start the main loop for the OpenGL ES application
+//
+
+void ESUTIL_API esMainLoop ( ESContext *esContext )
+{
+ struct timeval t1, t2;
+ float deltatime;
+ float totaltime = 0.0f;
+ unsigned int frames = 0;
+
+ gettimeofday (&t1 , NULL);
+
+ while(userInterrupt(esContext) == GL_FALSE && !esContext->terminate)
+ {
+ gettimeofday(&t2, NULL);
+ deltatime = (float)(t2.tv_sec - t1.tv_sec + (t2.tv_usec - t1.tv_usec) * 1e-6);
+ t1 = t2;
+
+ if (esContext->updateFunc != NULL)
+ esContext->updateFunc(esContext, deltatime);
+ if (esContext->drawFunc != NULL)
+ esContext->drawFunc(esContext);
+
+ eglSwapBuffers(esContext->eglDisplay, esContext->eglSurface);
+
+ totaltime += deltatime;
+ frames++;
+ if (totaltime > 2.0f)
+ {
+ printf("%4d frames rendered in %1.4f seconds -> FPS=%3.4f\n", frames, totaltime, frames/totaltime);
+ totaltime -= 2.0f;
+ frames = 0;
+ }
+ }
+}
+
+
+///
+// esRegisterDrawFunc()
+//
+void ESUTIL_API esRegisterDrawFunc ( ESContext *esContext, void (ESCALLBACK *drawFunc) (ESContext* ) )
+{
+ esContext->drawFunc = drawFunc;
+}
+
+
+///
+// esRegisterUpdateFunc()
+//
+void ESUTIL_API esRegisterUpdateFunc ( ESContext *esContext, void (ESCALLBACK *updateFunc) ( ESContext*, float ) )
+{
+ esContext->updateFunc = updateFunc;
+}
+
+
+///
+// esRegisterKeyFunc()
+//
+void ESUTIL_API esRegisterKeyFunc ( ESContext *esContext,
+ void (ESCALLBACK *keyFunc) (ESContext*, unsigned char, int, int ) )
+{
+ esContext->keyFunc = keyFunc;
+}
+
diff --git a/src/lib/esWindow.h b/src/lib/esWindow.h
new file mode 100644
index 0000000..fb650bf
--- /dev/null
+++ b/src/lib/esWindow.h
@@ -0,0 +1,154 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+//
+/// \file ESWindow.h
+/// \brief A utility library for OpenGL ES. This library provides a
+/// basic common framework for the example applications in the
+/// OpenGL ES 2.0 Programming Guide.
+//
+#ifndef ESWINDOW_H
+#define ESWINDOW_H
+
+///
+// Includes
+//
+#include <GLES2/gl2.h>
+#include <EGL/egl.h>
+
+#ifdef __cplusplus
+
+extern "C" {
+#endif
+
+
+///
+// Macros
+//
+#define ESUTIL_API
+#define ESCALLBACK
+
+
+/// esCreateWindow flag - RGB color buffer
+#define ES_WINDOW_RGB 0
+/// esCreateWindow flag - ALPHA color buffer
+#define ES_WINDOW_ALPHA 1
+/// esCreateWindow flag - depth buffer
+#define ES_WINDOW_DEPTH 2
+/// esCreateWindow flag - stencil buffer
+#define ES_WINDOW_STENCIL 4
+/// esCreateWindow flat - multi-sample buffer
+#define ES_WINDOW_MULTISAMPLE 8
+
+
+///
+// Types
+//
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+typedef struct _escontext
+{
+ /// Put your user data here...
+ void* userData;
+
+ /// Window width
+ GLint width;
+
+ /// Window height
+ GLint height;
+
+ /// Window handle
+ EGLNativeWindowType hWnd;
+
+ /// EGL display
+ EGLDisplay eglDisplay;
+
+ /// EGL context
+ EGLContext eglContext;
+
+ /// EGL surface
+ EGLSurface eglSurface;
+
+ /// Exit flag
+ int terminate;
+
+ /// Callbacks
+ void (ESCALLBACK *drawFunc) ( struct _escontext * );
+ void (ESCALLBACK *keyFunc) ( struct _escontext *, unsigned char, int, int );
+ void (ESCALLBACK *updateFunc) ( struct _escontext *, float deltaTime );
+} ESContext;
+
+
+///
+// Public Functions
+//
+
+//
+///
+/// \brief Initialize ES framework context. This must be called before calling any other functions.
+/// \param esContext Application context
+//
+void ESUTIL_API esInitContext ( ESContext *esContext );
+
+//
+/// \brief Create a window with the specified parameters
+/// \param esContext Application context
+/// \param title Name for title bar of window
+/// \param width Width in pixels of window to create
+/// \param height Height in pixels of window to create
+/// \param flags Bitfield for the window creation flags
+/// ES_WINDOW_RGB - specifies that the color buffer should have R,G,B channels
+/// ES_WINDOW_ALPHA - specifies that the color buffer should have alpha
+/// ES_WINDOW_DEPTH - specifies that a depth buffer should be created
+/// ES_WINDOW_STENCIL - specifies that a stencil buffer should be created
+/// ES_WINDOW_MULTISAMPLE - specifies that a multi-sample buffer should be created
+/// \return GL_TRUE if window creation is succesful, GL_FALSE otherwise
+GLboolean ESUTIL_API esCreateWindow ( ESContext *esContext, const char *title, GLint width, GLint height, GLuint flags );
+
+//
+/// \brief Start the main loop for the OpenGL ES application
+/// \param esContext Application context
+//
+void ESUTIL_API esMainLoop ( ESContext *esContext );
+
+//
+/// \brief Register a draw callback function to be used to render each frame
+/// \param esContext Application context
+/// \param drawFunc Draw callback function that will be used to render the scene
+//
+void ESUTIL_API esRegisterDrawFunc ( ESContext *esContext, void (ESCALLBACK *drawFunc) ( ESContext* ) );
+
+//
+/// \brief Register an update callback function to be used to update on each time step
+/// \param esContext Application context
+/// \param updateFunc Update callback function that will be used to render the scene
+//
+void ESUTIL_API esRegisterUpdateFunc ( ESContext *esContext, void (ESCALLBACK *updateFunc) ( ESContext*, float ) );
+
+//
+/// \brief Register an keyboard input processing callback function
+/// \param esContext Application context
+/// \param keyFunc Key callback function for application processing of keyboard input
+//
+void ESUTIL_API esRegisterKeyFunc ( ESContext *esContext,
+ void (ESCALLBACK *drawFunc) ( ESContext*, unsigned char, int, int ) );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ESWINDOW_H
+
diff --git a/src/lib/etna_bswap.c b/src/lib/etna_bswap.c
new file mode 100644
index 0000000..9a19527
--- /dev/null
+++ b/src/lib/etna_bswap.c
@@ -0,0 +1,195 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Buffer-swapping implementation */
+
+/* Creates synchronization primitives for each buffer, both at the user space
+ * and kernel side. The application can signal when it finished rendering to a buffer,
+ * after which a synchronization signal will be queued to the kernel when the
+ * rendering is finished. A thread waits for these synchronization signals and
+ * displays the buffer when ready.
+ */
+#include "etna_bswap.h"
+
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_queue.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+
+#include "util/u_memory.h"
+
+#include <stdio.h>
+#include <assert.h>
+
+static int etna_bswap_init_buffer(struct viv_conn *conn, struct etna_bswap_buffer *buf)
+{
+ pthread_mutex_init(&buf->available_mutex, NULL);
+ pthread_cond_init(&buf->available_cond, NULL);
+ buf->is_available = 1;
+ if(viv_user_signal_create(conn, 0, &buf->sig_id_ready) != 0)
+ {
+#ifdef DEBUG
+ fprintf(stderr, "Cannot create user signal for framebuffer sync\n");
+#endif
+ return ETNA_INTERNAL_ERROR;
+ }
+ return ETNA_OK;
+}
+
+static void etna_bswap_destroy_buffer(struct viv_conn *conn, struct etna_bswap_buffer *buf)
+{
+ (void)pthread_mutex_destroy(&buf->available_mutex);
+ (void)pthread_cond_destroy(&buf->available_cond);
+ (void)viv_user_signal_destroy(conn, buf->sig_id_ready);
+}
+
+static void etna_bswap_thread(struct etna_bswap_buffers *bufs)
+{
+ int cur = 0;
+ while(!bufs->terminate)
+ {
+ /* wait for "buffer ready" signal for buffer X (and clear it) */
+ if(viv_user_signal_wait(bufs->conn, bufs->buf[cur].sig_id_ready, VIV_WAIT_INDEFINITE) != 0)
+ {
+#ifdef DEBUG
+ fprintf(stderr, "Error waiting for framebuffer sync signal\n");
+#endif
+ return; // ?
+ }
+ /* switch buffers */
+ bufs->set_buffer(bufs->userptr, cur);
+ bufs->frontbuffer = cur;
+ /* X = (X+1)%buffers */
+ cur = (cur+1) % bufs->num_buffers;
+ /* set "buffer available" for buffer X, signal condition */
+ pthread_mutex_lock(&bufs->buf[cur].available_mutex);
+ bufs->buf[cur].is_available = 1;
+ pthread_cond_signal(&bufs->buf[cur].available_cond);
+ pthread_mutex_unlock(&bufs->buf[cur].available_mutex);
+ }
+}
+
+int etna_bswap_create(struct etna_ctx *ctx, struct etna_bswap_buffers **bufs_out,
+ int num_buffers,
+ etna_set_buffer_cb_t set_buffer,
+ etna_copy_buffer_cb_t copy_buffer,
+ void *userptr)
+{
+ if(ctx == NULL || bufs_out == NULL)
+ return ETNA_INVALID_ADDR;
+ struct etna_bswap_buffers *bufs = CALLOC_STRUCT(etna_bswap_buffers);
+ if(bufs == NULL)
+ return ETNA_INTERNAL_ERROR;
+ bufs->conn = ctx->conn;
+ bufs->ctx = ctx;
+ bufs->num_buffers = etna_umin(ETNA_BSWAP_NUM_BUFFERS, num_buffers);
+ bufs->set_buffer = set_buffer;
+ bufs->copy_buffer = copy_buffer;
+ bufs->userptr = userptr;
+ bufs->frontbuffer = 0;
+ bufs->backbuffer = (bufs->frontbuffer + 1) % bufs->num_buffers;
+ bufs->terminate = false;
+ bufs->set_buffer(bufs->userptr, bufs->frontbuffer);
+
+ for(int idx=0; idx<bufs->num_buffers; ++idx)
+ etna_bswap_init_buffer(bufs->conn, &bufs->buf[idx]);
+ if(bufs->num_buffers > 1)
+ pthread_create(&bufs->thread, NULL, (void * (*)(void *))&etna_bswap_thread, bufs);
+
+ *bufs_out = bufs;
+ return ETNA_OK;
+}
+
+int etna_bswap_free(struct etna_bswap_buffers *bufs)
+{
+ bufs->terminate = true;
+ /* signal ready signals, to prevent thread from waiting forever for buffer to become ready */
+ for(int idx=0; idx<bufs->num_buffers; ++idx)
+ (void)viv_user_signal_signal(bufs->conn, bufs->buf[idx].sig_id_ready, 1);
+ if(bufs->thread)
+ {
+ (void)pthread_join(bufs->thread, NULL);
+ }
+ for(int idx=0; idx<bufs->num_buffers; ++idx)
+ etna_bswap_destroy_buffer(bufs->conn, &bufs->buf[idx]);
+ FREE(bufs);
+ return ETNA_OK;
+}
+
+/* wait until current backbuffer is available to render to */
+int etna_bswap_wait_available(struct etna_bswap_buffers *bufs)
+{
+ struct etna_bswap_buffer *buf = &bufs->buf[bufs->backbuffer];
+ /* Wait until buffer buf is available */
+ pthread_mutex_lock(&buf->available_mutex);
+ if(!buf->is_available) /* if we're going to wait anyway, flush so that GPU is not idle */
+ {
+ etna_flush(bufs->ctx);
+ }
+ while(!buf->is_available)
+ {
+ pthread_cond_wait(&buf->available_cond, &buf->available_mutex);
+ }
+ buf->is_available = 0;
+ pthread_mutex_unlock(&buf->available_mutex);
+ return ETNA_OK;
+}
+
+/* queue buffer swap when GPU ready with rendering to buf */
+int etna_bswap_queue_swap(struct etna_bswap_buffers *bufs)
+{
+ int rv;
+ if(etna_queue_signal(bufs->ctx->queue, bufs->buf[bufs->backbuffer].sig_id_ready, VIV_WHERE_PIXEL) != 0)
+ {
+#ifdef DEBUG
+ fprintf(stderr, "Unable to queue framebuffer sync signal\n");
+#endif
+ return ETNA_INTERNAL_ERROR;
+ }
+ if((rv=etna_flush(bufs->ctx)) != ETNA_OK)
+ return rv;
+ bufs->backbuffer = (bufs->backbuffer + 1) % bufs->num_buffers;
+ return ETNA_OK;
+}
+
+int etna_swap_buffers(struct etna_bswap_buffers *bufs)
+{
+ assert(bufs->copy_buffer);
+ /* this flush is really needed, otherwise some quads will have pieces undrawn */
+ etna_set_state(bufs->ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ if(bufs->num_buffers > 1)
+ {
+ /* copy to screen */
+ etna_bswap_wait_available(bufs);
+
+ bufs->copy_buffer(bufs->userptr, bufs->ctx, bufs->backbuffer);
+
+ etna_bswap_queue_swap(bufs);
+ } else { /* single buffer fallback */
+ bufs->copy_buffer(bufs->userptr, bufs->ctx, 0);
+ }
+
+ return 0;
+}
+
+
diff --git a/src/lib/etna_bswap.h b/src/lib/etna_bswap.h
new file mode 100644
index 0000000..d2bdd8d
--- /dev/null
+++ b/src/lib/etna_bswap.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Automatic buffer swapping */
+#ifndef H_ETNA_BUFSWAP
+#define H_ETNA_BUFSWAP
+
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_rs.h>
+
+#include <pthread.h>
+#include <stdbool.h>
+
+/* maximum number of buffers supported (triple) */
+#define ETNA_BSWAP_NUM_BUFFERS 3
+
+struct etna_bswap_buffer {
+ pthread_mutex_t available_mutex;
+ pthread_cond_t available_cond;
+ bool is_available;
+ int sig_id_ready;
+};
+
+typedef int (*etna_set_buffer_cb_t)(void *, int);
+typedef int (*etna_copy_buffer_cb_t)(void *, struct etna_ctx *, int);
+
+struct etna_bswap_buffers {
+ struct viv_conn *conn;
+ struct etna_ctx *ctx;
+ pthread_t thread;
+ int num_buffers;
+ int backbuffer, frontbuffer;
+ bool terminate;
+
+ etna_set_buffer_cb_t set_buffer;
+ etna_copy_buffer_cb_t copy_buffer;
+ void *userptr;
+ struct etna_bswap_buffer buf[ETNA_BSWAP_NUM_BUFFERS];
+};
+
+int etna_bswap_create(struct etna_ctx *ctx, struct etna_bswap_buffers **bufs_out,
+ int num_buffers,
+ etna_set_buffer_cb_t set_buffer,
+ etna_copy_buffer_cb_t copy_buffer,
+ void *userptr);
+
+int etna_bswap_free(struct etna_bswap_buffers *bufs);
+
+int etna_bswap_wait_available(struct etna_bswap_buffers *bufs);
+
+int etna_bswap_queue_swap(struct etna_bswap_buffers *bufs);
+
+/* analogous to eglSwapBuffers */
+int etna_swap_buffers(struct etna_bswap_buffers *bufs);
+
+#endif
+
diff --git a/src/lib/etna_rawshader.c b/src/lib/etna_rawshader.c
new file mode 100644
index 0000000..72a7d69
--- /dev/null
+++ b/src/lib/etna_rawshader.c
@@ -0,0 +1,164 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Raw shader state handling (for testing and debugging).
+ */
+#include "etna_rawshader.h"
+
+#include "etna_pipe.h"
+#include "etna_compiler.h"
+#include "etna_debug.h"
+
+#include "util/u_memory.h"
+#include "util/u_math.h"
+
+#include <etnaviv/state_3d.xml.h>
+
+#define SET_STATE(addr, value) cs->addr = (value)
+#define SET_STATE_FIXP(addr, value) cs->addr = (value)
+#define SET_STATE_F32(addr, value) cs->addr = etna_f32_to_u32(value)
+
+void *etna_create_shader_state(struct pipe_context *pipe, const struct etna_shader_program *rs)
+{
+ struct compiled_shader_state *cs = CALLOC_STRUCT(compiled_shader_state);
+ /* set last_varying_2x flag if the last varying has 1 or 2 components */
+ bool last_varying_2x = false;
+ if(rs->num_varyings>0 && rs->varyings[rs->num_varyings-1].num_components <= 2)
+ last_varying_2x = true;
+
+ SET_STATE(RA_CONTROL, VIVS_RA_CONTROL_UNK0 |
+ (last_varying_2x ? VIVS_RA_CONTROL_LAST_VARYING_2X : 0));
+
+ SET_STATE(PA_ATTRIBUTE_ELEMENT_COUNT, VIVS_PA_ATTRIBUTE_ELEMENT_COUNT_COUNT(rs->num_varyings));
+ for(int idx=0; idx<rs->num_varyings; ++idx)
+ SET_STATE(PA_SHADER_ATTRIBUTES[idx], rs->varyings[idx].pa_attributes);
+
+ SET_STATE(VS_END_PC, rs->vs_code_size / 4);
+ SET_STATE(VS_OUTPUT_COUNT, rs->num_varyings + 1); /* position + varyings */
+ SET_STATE(VS_INPUT_COUNT, VIVS_VS_INPUT_COUNT_UNK8(1)); /// XXX what is this
+ SET_STATE(VS_TEMP_REGISTER_CONTROL,
+ VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS(rs->vs_num_temps));
+
+ /* vs outputs (varyings) */
+ uint32_t vs_output[16] = {0};
+ int varid = 0;
+ vs_output[varid++] = rs->vs_pos_out_reg;
+ for(int idx=0; idx<rs->num_varyings; ++idx)
+ vs_output[varid++] = rs->varyings[idx].vs_reg;
+ vs_output[varid++] = rs->vs_pointsize_out_reg; /* pointsize is last */
+
+ for(int idx=0; idx<4; ++idx)
+ {
+ SET_STATE(VS_OUTPUT[idx], vs_output[idx*4] | (vs_output[idx*4+1] << 8) |
+ (vs_output[idx*4+2] << 16) | (vs_output[idx*4+3] << 24));
+ }
+
+ /* vs inputs (attributes) */
+ uint32_t vs_input[4] = {0};
+ for(int idx=0; idx<rs->num_inputs; ++idx)
+ vs_input[idx/4] |= rs->inputs[idx].vs_reg << ((idx%4)*8);
+ for(int idx=0; idx<4; ++idx)
+ SET_STATE(VS_INPUT[idx], vs_input[idx]);
+
+ SET_STATE(VS_LOAD_BALANCING, rs->vs_load_balancing);
+ SET_STATE(VS_START_PC, 0);
+
+ SET_STATE(PS_END_PC, rs->ps_code_size / 4);
+ SET_STATE(PS_OUTPUT_REG, rs->ps_color_out_reg);
+ SET_STATE(PS_INPUT_COUNT, VIVS_PS_INPUT_COUNT_COUNT(rs->num_varyings + 1) |
+ VIVS_PS_INPUT_COUNT_UNK8(31));
+ SET_STATE(PS_TEMP_REGISTER_CONTROL,
+ VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS(rs->ps_num_temps));
+ SET_STATE(PS_CONTROL, VIVS_PS_CONTROL_UNK1);
+ SET_STATE(PS_START_PC, 0);
+
+ uint32_t total_components = 0;
+ uint32_t num_components = 0;
+ uint32_t component_use[2] = {0};
+ for(int idx=0; idx<rs->num_varyings; ++idx)
+ {
+ num_components |= rs->varyings[idx].num_components << ((idx%8)*4);
+ for(int comp=0; comp<rs->varyings[idx].num_components; ++comp)
+ {
+ int compid = total_components + comp;
+ unsigned use = VARYING_COMPONENT_USE_USED;
+ if(rs->varyings[idx].special == ETNA_VARYING_POINTCOORD)
+ {
+ if(comp == 0)
+ use = VARYING_COMPONENT_USE_POINTCOORD_X;
+ else if(comp == 1)
+ use = VARYING_COMPONENT_USE_POINTCOORD_Y;
+ }
+ component_use[compid/16] |= use << ((compid%16)*2);
+ }
+ total_components += rs->varyings[idx].num_components;
+ }
+ SET_STATE(GL_VARYING_TOTAL_COMPONENTS, VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM(align(total_components, 2)));
+ SET_STATE(GL_VARYING_NUM_COMPONENTS, num_components);
+ SET_STATE(GL_VARYING_COMPONENT_USE[0], component_use[0]);
+ SET_STATE(GL_VARYING_COMPONENT_USE[1], component_use[1]);
+
+ cs->vs_inst_mem_size = rs->vs_code_size;
+ cs->vs_uniforms_size = rs->vs_uniforms_size;
+ cs->ps_inst_mem_size = rs->ps_code_size;
+ cs->ps_uniforms_size = rs->ps_uniforms_size;
+ cs->VS_INST_MEM = mem_dup(rs->vs_code, rs->vs_code_size * 4);
+ cs->PS_INST_MEM = mem_dup(rs->ps_code, rs->ps_code_size * 4);
+ memcpy(cs->VS_UNIFORMS, rs->vs_uniforms, rs->vs_uniforms_size*4);
+ memcpy(cs->PS_UNIFORMS, rs->ps_uniforms, rs->ps_uniforms_size*4);
+
+ return cs;
+}
+
+void etna_bind_shader_state(struct pipe_context *pipe, void *sh)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ priv->dirty_bits |= ETNA_STATE_SHADER | ETNA_STATE_PS_UNIFORMS | ETNA_STATE_VS_UNIFORMS;
+ priv->shader_state = *((struct compiled_shader_state*)sh);
+}
+
+void etna_delete_shader_state(struct pipe_context *pipe, void *sh_)
+{
+ struct compiled_shader_state *sh = (struct compiled_shader_state*)sh_;
+ FREE(sh->VS_INST_MEM);
+ FREE(sh->PS_INST_MEM);
+ FREE(sh);
+}
+
+void etna_set_uniforms(struct pipe_context *pipe, unsigned type, unsigned offset, unsigned count, const uint32_t *values)
+{
+ struct etna_pipe_context *priv = etna_pipe_context(pipe);
+ assert((offset + count) <= ETNA_MAX_UNIFORMS*4);
+ switch(type)
+ {
+ case PIPE_SHADER_VERTEX:
+ memcpy(&priv->shader_state.VS_UNIFORMS[offset], values, count*4);
+ priv->dirty_bits |= ETNA_STATE_VS_UNIFORMS;
+ break;
+ case PIPE_SHADER_FRAGMENT:
+ memcpy(&priv->shader_state.PS_UNIFORMS[offset], values, count*4);
+ priv->dirty_bits |= ETNA_STATE_PS_UNIFORMS;
+ break;
+ default: printf("Unhandled shader type %i\n", type);
+ }
+}
+
diff --git a/src/lib/etna_rawshader.h b/src/lib/etna_rawshader.h
new file mode 100644
index 0000000..cb65b88
--- /dev/null
+++ b/src/lib/etna_rawshader.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Raw shader state handling (for testing and debugging).
+ */
+#ifndef H_ETNA_RAWSHADER
+
+#include "pipe/p_state.h"
+#include "etna_pipe.h"
+
+struct etna_shader_program
+{
+ unsigned num_inputs;
+ struct etna_shader_input inputs[ETNA_NUM_INPUTS];
+ unsigned num_varyings;
+ struct etna_shader_varying varyings[ETNA_NUM_VARYINGS];
+
+ unsigned vs_code_size; /* Vertex shader code size in words */
+ uint32_t *vs_code;
+ unsigned vs_pos_out_reg; /* VS position output */
+ unsigned vs_pointsize_out_reg; /* VS point size output */
+ unsigned vs_load_balancing;
+ unsigned vs_num_temps; /* number of temporaries, can never be less than num_varyings+1 */
+ unsigned vs_uniforms_size; /* Size of uniforms (in words) */
+ uint32_t *vs_uniforms; /* Initial values for VS uniforms */
+
+ unsigned ps_code_size; /* Pixel shader code size in words */
+ uint32_t *ps_code;
+ unsigned ps_color_out_reg; /* color output register */
+ unsigned ps_num_temps; /* number of temporaries, can never be less than num_varyings+1 */;
+ unsigned ps_uniforms_size; /* Size of uniforms (in words) */
+ uint32_t *ps_uniforms; /* Initial values for VS uniforms */
+};
+
+/* raw shader methods -- used by fb_rawshader demos */
+void *etna_create_shader_state(struct pipe_context *pipe, const struct etna_shader_program *rs);
+void etna_bind_shader_state(struct pipe_context *pipe, void *sh);
+void etna_delete_shader_state(struct pipe_context *pipe, void *sh_);
+void etna_set_uniforms(struct pipe_context *pipe, unsigned type, unsigned offset, unsigned count, const uint32_t *values);
+
+#endif
+
diff --git a/src/lib/fbdemos.c b/src/lib/fbdemos.c
new file mode 100644
index 0000000..c4f3ddd
--- /dev/null
+++ b/src/lib/fbdemos.c
@@ -0,0 +1,326 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#include "fbdemos.h"
+
+#include "etna_pipe.h"
+#include "etna_translate.h"
+#include "etna_screen.h"
+#include "util/u_memory.h"
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include <errno.h>
+
+#ifdef ANDROID
+#define FBDEV_DEV "/dev/graphics/fb%i"
+#else
+#define FBDEV_DEV "/dev/fb%i"
+#endif
+struct fbdemos_scaffold *_fbs; /* for gdb */
+int fbdemos_msaa_samples = 0;
+
+void fbdemo_init(struct fbdemos_scaffold **out)
+{
+ struct fbdemos_scaffold *fbs = CALLOC_STRUCT(fbdemos_scaffold);
+ int rv;
+
+ rv = fb_open(0, &fbs->fb);
+ if(rv!=0)
+ {
+ exit(1);
+ }
+ fbs->width = fbs->fb.fb_var.xres;
+ fbs->height = fbs->fb.fb_var.yres;
+
+ if(getenv("ETNA_MSAA_SAMPLES"))
+ fbdemos_msaa_samples = atoi(getenv("ETNA_MSAA_SAMPLES"));
+
+ rv = viv_open(VIV_HW_3D, &fbs->conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ /* Create screen */
+ if((fbs->screen = etna_screen_create(fbs->conn)) == NULL)
+ {
+ printf("Unable to create screen context\n");
+ exit(1);
+ }
+
+ if((fbs->pipe = fbs->screen->context_create(fbs->screen, NULL)) == NULL)
+ {
+ printf("Unable to create etna context\n");
+ exit(1);
+ }
+ fbs->ctx = etna_pipe_context(fbs->pipe)->ctx;
+
+ if(etna_bswap_create(fbs->ctx, &fbs->buffers, fbs->fb.num_buffers, (etna_set_buffer_cb_t)&fb_set_buffer, (etna_copy_buffer_cb_t)&etna_fb_copy_buffer, &fbs->fb) != ETNA_OK)
+ {
+ printf("Unable to create buffer swapper\n");
+ exit(1);
+ }
+ _fbs = fbs;
+ *out = fbs;
+}
+
+void fbdemo_free(struct fbdemos_scaffold *fbs)
+{
+ etna_bswap_free(fbs->buffers);
+ etna_free(fbs->ctx);
+ viv_close(fbs->conn);
+ free(fbs);
+}
+
+struct pipe_resource *fbdemo_create_2d(struct pipe_screen *screen, unsigned bind, unsigned format, unsigned width, unsigned height, unsigned max_mip_level)
+{
+ return screen->resource_create(screen, &(struct pipe_resource){
+ .target = PIPE_TEXTURE_2D,
+ .format = format,
+ .width0 = width,
+ .height0 = height,
+ .depth0 = 1,
+ .array_size = 1,
+ .last_level = max_mip_level,
+ .nr_samples = ((bind == PIPE_BIND_DEPTH_STENCIL || bind == PIPE_BIND_RENDER_TARGET) ? fbdemos_msaa_samples : 1),
+ .usage = PIPE_USAGE_IMMUTABLE,
+ .bind = bind,
+ .flags = 0,
+ });
+}
+
+struct pipe_resource *fbdemo_create_cube(struct pipe_screen *screen, unsigned bind, unsigned format, unsigned width, unsigned height, unsigned max_mip_level)
+{
+ return screen->resource_create(screen, &(struct pipe_resource){
+ .target = PIPE_TEXTURE_CUBE,
+ .format = format,
+ .width0 = width,
+ .height0 = height,
+ .depth0 = 1,
+ .array_size = 6,
+ .last_level = max_mip_level,
+ .nr_samples = 1,
+ .usage = PIPE_USAGE_IMMUTABLE,
+ .bind = bind,
+ .flags = 0,
+ });
+}
+
+void etna_pipe_inline_write(struct pipe_context *pipe, struct pipe_resource *resource, unsigned layer, unsigned level, void *data, size_t size)
+{
+ uint stride, layer_stride;
+ struct pipe_box box;
+ struct etna_resource *eresource = etna_resource(resource);
+
+ box.x = 0;
+ box.y = 0;
+ box.z = layer;
+ box.width = eresource->levels[level].width;
+ box.height = eresource->levels[level].height;
+ box.depth = 1;
+ stride = eresource->levels[level].stride;
+ layer_stride = eresource->levels[level].layer_stride;
+
+ pipe->transfer_inline_write(pipe, resource, level,
+ (PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED), &box, data, stride, layer_stride);
+}
+
+void etna_convert_r8g8b8_to_b8g8r8x8(uint32_t *dst, const uint8_t *src, unsigned num_pixels)
+{
+ for(unsigned idx=0; idx<num_pixels; ++idx)
+ {
+ dst[idx] = ((0xFF) << 24) | (src[idx*3+0] << 16) | (src[idx*3+1] << 8) | src[idx*3+2];
+ }
+}
+
+/* Open framebuffer and get information */
+int fb_open(int num, struct fb_info *out)
+{
+ char devname[256];
+ memset(out, 0, sizeof(struct fb_info));
+
+ snprintf(devname, 256, FBDEV_DEV, num);
+
+ int fd = open(devname, O_RDWR);
+ if (fd == -1) {
+ printf("Error: failed to open %s: %s\n",
+ devname, strerror(errno));
+ return errno;
+ }
+
+ if (ioctl(fd, FBIOGET_VSCREENINFO, &out->fb_var) ||
+ ioctl(fd, FBIOGET_FSCREENINFO, &out->fb_fix)) {
+ printf("Error: failed to run ioctl on %s: %s\n",
+ devname, strerror(errno));
+ close(fd);
+ return errno;
+ }
+
+ printf("fix smem_start %08x\n", (unsigned)out->fb_fix.smem_start);
+ printf(" smem_len %08x\n", (unsigned)out->fb_fix.smem_len);
+ printf(" line_length %08x\n", (unsigned)out->fb_fix.line_length);
+ printf("\n");
+ printf("var x_res %i\n", (unsigned)out->fb_var.xres);
+ printf(" y_res %i\n", (unsigned)out->fb_var.yres);
+ printf(" x_res_virtual %i\n", (unsigned)out->fb_var.xres_virtual);
+ printf(" y_res_virtual %i\n", (unsigned)out->fb_var.yres_virtual);
+ printf(" bits_per_pixel %i\n", (unsigned)out->fb_var.bits_per_pixel);
+ printf(" red.offset %i\n", (unsigned)out->fb_var.red.offset);
+ printf(" red.length %i\n", (unsigned)out->fb_var.red.length);
+ printf(" green.offset %i\n", (unsigned)out->fb_var.green.offset);
+ printf(" green.length %i\n", (unsigned)out->fb_var.green.length);
+ printf(" blue.offset %i\n", (unsigned)out->fb_var.blue.offset);
+ printf(" blue.length %i\n", (unsigned)out->fb_var.blue.length);
+ printf(" transp.offset %i\n", (unsigned)out->fb_var.transp.offset);
+ printf(" transp.length %i\n", (unsigned)out->fb_var.transp.length);
+
+ out->fd = fd;
+ out->stride = out->fb_fix.line_length;
+ out->buffer_stride = out->stride * out->fb_var.yres;
+ out->num_buffers = out->fb_fix.smem_len / out->buffer_stride;
+ out->map = mmap(NULL, out->fb_fix.smem_len, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+ printf(" mmap: %p\n", out->map);
+
+ if(out->num_buffers > ETNA_FB_MAX_BUFFERS)
+ out->num_buffers = ETNA_FB_MAX_BUFFERS;
+ char *num_buffers_str = getenv("EGL_FBDEV_BUFFERS");
+ if(num_buffers_str != NULL)
+ {
+ int num_buffers_env = atoi(num_buffers_str);
+ if(num_buffers_env >= 1 && out->num_buffers > num_buffers_env)
+ out->num_buffers = num_buffers_env;
+ }
+
+ for(int idx=0; idx<out->num_buffers; ++idx)
+ {
+ out->physical[idx] = out->fb_fix.smem_start + idx * out->buffer_stride;
+ out->logical[idx] = (void*)((size_t)out->map + idx * out->buffer_stride);
+ }
+ printf("number of fb buffers: %i\n", out->num_buffers);
+ int req_virth = (out->num_buffers * out->fb_var.yres);
+ if(out->fb_var.yres_virtual < req_virth)
+ {
+ printf("required virtual h is %i, current virtual h is %i: requesting change",
+ req_virth, out->fb_var.yres_virtual);
+ out->fb_var.yres_virtual = req_virth;
+ if (ioctl(out->fd, FBIOPUT_VSCREENINFO, &out->fb_var))
+ {
+ printf("Warning: failed to run ioctl to change virtual height for buffering: %s. Rendering may fail.\n", strerror(errno));
+ }
+ }
+
+ /* determine resolve format */
+ if(!etna_fb_get_format(&out->fb_var, (unsigned*)&out->rs_format, &out->swap_rb))
+ {
+ /* no match */
+ out->rs_format = -1;
+ out->swap_rb = false;
+ }
+
+ return 0;
+}
+
+/* Set currently visible buffer id */
+int fb_set_buffer(struct fb_info *fb, int buffer)
+{
+ fb->fb_var.yoffset = buffer * fb->fb_var.yres;
+ /* Android uses FBIOPUT_VSCREENINFO for this; however on some hardware this does a
+ * reconfiguration of the DC every time it is called which causes flicker and slowness.
+ * On the other hand, FBIOPAN_DISPLAY causes a smooth scroll on some hardware,
+ * according to the Android rationale. Choose the least of both evils.
+ */
+ if (ioctl(fb->fd, FBIOPAN_DISPLAY, &fb->fb_var))
+ {
+ printf("Error: failed to run ioctl to pan display: %s\n", strerror(errno));
+ return errno;
+ }
+ return 0;
+}
+
+int fb_close(struct fb_info *fb)
+{
+ if(fb->map)
+ munmap(fb->map, fb->fb_fix.smem_len);
+ close(fb->fd);
+ return 0;
+}
+
+
+int etna_fb_bind_resource(struct fb_info *fb, struct pipe_resource *rt_resource_)
+{
+ struct etna_resource *rt_resource = etna_resource(rt_resource_);
+ fb->resource = rt_resource;
+ assert(rt_resource->base.width0 <= fb->fb_var.xres && rt_resource->base.height0 <= fb->fb_var.yres);
+ int msaa_xscale=1, msaa_yscale=1;
+ if(!translate_samples_to_xyscale(rt_resource_->nr_samples, &msaa_xscale, &msaa_yscale, NULL))
+ abort();
+
+ for(int bi=0; bi<ETNA_FB_MAX_BUFFERS; ++bi)
+ {
+ etna_compile_rs_state(&fb->copy_to_screen[bi], &(struct rs_state){
+ .source_format = translate_rt_format(rt_resource->base.format, false),
+ .source_tiling = rt_resource->layout,
+ .source_addr = rt_resource->levels[0].address,
+ .source_stride = rt_resource->levels[0].stride,
+ .dest_format = fb->rs_format,
+ .dest_tiling = ETNA_LAYOUT_LINEAR,
+ .dest_addr = fb->physical[bi],
+ .dest_stride = fb->fb_fix.line_length,
+ .downsample_x = msaa_xscale > 1,
+ .downsample_y = msaa_yscale > 1,
+ .swap_rb = fb->swap_rb,
+ .dither = {0xffffffff, 0xffffffff}, // XXX dither when going from 24 to 16 bit?
+ .clear_mode = VIVS_RS_CLEAR_CONTROL_MODE_DISABLED,
+ .width = fb->fb_var.xres * msaa_xscale,
+ .height = fb->fb_var.yres * msaa_yscale
+ });
+ }
+ return 0;
+}
+
+int etna_fb_copy_buffer(struct fb_info *fb, struct etna_ctx *ctx, int buffer)
+{
+ assert(fb->resource && fb->rs_format != -1);
+ /* XXX assumes TS is still set up correctly for the resource to be copied
+ * from. Currently this is not the case when another render target has been selected
+ * before calling this function.
+ */
+ etna_submit_rs_state(ctx, &fb->copy_to_screen[buffer]);
+ /* Flush RS */
+ etna_set_state(ctx, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH);
+
+ return 0;
+}
+
diff --git a/src/lib/fbdemos.h b/src/lib/fbdemos.h
new file mode 100644
index 0000000..9079fea
--- /dev/null
+++ b/src/lib/fbdemos.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Utilities for framebuffer demos */
+#ifndef H_FBDEMOS
+#define H_FBDEMOS
+
+#include <etnaviv/etna_fb.h>
+#include "etna_bswap.h"
+
+#define ETNA_FB_MAX_BUFFERS (2) /* double buffering is enough */
+struct pipe_resource;
+struct fb_info
+{
+ int fd;
+ int num_buffers;
+ /* GPU addresses of buffers */
+ size_t physical[ETNA_FB_MAX_BUFFERS];
+ /* CPU addresses of buffers */
+ void *logical[ETNA_FB_MAX_BUFFERS];
+ size_t stride;
+ size_t buffer_stride;
+ struct fb_var_screeninfo fb_var;
+ struct fb_fix_screeninfo fb_fix;
+ void *map;
+
+ struct etna_resource *resource;
+ struct compiled_rs_state copy_to_screen[ETNA_FB_MAX_BUFFERS];
+
+ /* Resolve format (-1 if no match), and swap red/blue bit */
+ int rs_format;
+ bool swap_rb;
+};
+
+struct fbdemos_scaffold
+{
+ int width;
+ int height;
+
+ struct fb_info fb;
+ struct viv_conn *conn;
+ struct etna_ctx *ctx;
+ struct pipe_context *pipe;
+ struct etna_bswap_buffers *buffers;
+ struct pipe_screen *screen;
+};
+
+void fbdemo_init(struct fbdemos_scaffold **out);
+void fbdemo_free(struct fbdemos_scaffold *fbs);
+struct pipe_resource *fbdemo_create_2d(struct pipe_screen *screen, unsigned flags, unsigned format, unsigned width, unsigned height, unsigned max_mip_level);
+struct pipe_resource *fbdemo_create_cube(struct pipe_screen *screen, unsigned flags, unsigned format, unsigned width, unsigned height, unsigned max_mip_level);
+
+/**
+ * One-shot write to texture or buffer, similar to gallium transfer_inline_write but somewhat more limited right now.
+ * Does tiling if needed.
+ * XXX no stride parameter, assumes that data is tightly packed.
+ */
+void etna_pipe_inline_write(struct pipe_context *pipe, struct pipe_resource *resource, unsigned layer, unsigned level, void *data, size_t size);
+
+void etna_convert_r8g8b8_to_b8g8r8x8(uint32_t *dst, const uint8_t *src, unsigned num_pixels);
+
+/* Open framebuffer and get information */
+int fb_open(int num, struct fb_info *out);
+
+/* Set currently visible buffer id */
+int fb_set_buffer(struct fb_info *fb, int buffer);
+
+/* Close framebuffer */
+int fb_close(struct fb_info *fb);
+
+/* Bind framebuffer to render target resource */
+int etna_fb_bind_resource(struct fb_info *fb, struct pipe_resource *rt_resource);
+
+/* Copy framebuffer from bound render target resource */
+int etna_fb_copy_buffer(struct fb_info *fb, struct etna_ctx *ctx, int buffer);
+
+
+#endif
+
diff --git a/src/lib/flightrecorder.cpp b/src/lib/flightrecorder.cpp
new file mode 100644
index 0000000..10f6d32
--- /dev/null
+++ b/src/lib/flightrecorder.cpp
@@ -0,0 +1,413 @@
+/*
+ * Copyright (c) 2012-2013 Wladimir J. van der Laan
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Implemented in C++ because I don't have the time to implement
+ * all the data structures in C.
+ */
+#include "flightrecorder.h"
+#include "interval.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <string.h>
+#include <fcntl.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <pthread.h>
+
+//#define DEBUG
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+#include <vector>
+#include <string>
+
+const uint32_t FDR_MAGIC = 0x8e1aaa8f;
+const uint32_t FDR_VERSION = 1;
+
+typedef enum {
+ RTYPE_RANGE_DATA = 0,
+ RTYPE_RANGE_TEMP_DATA = 1,
+ RTYPE_ADD_UPDATED_RANGE = 2,
+ RTYPE_REMOVE_UPDATED_RANGE = 3,
+ RTYPE_EVENT = 4,
+ RTYPE_COMMENT = 5
+} fdr_record_type;
+
+#define ID_LEN (255+1)
+typedef struct {
+ char name[ID_LEN]; /* short id of max 255 bytes */
+ size_t value;
+} fdr_parameters;
+
+/* can use a standard set/map, as long as we promise not to overlap intervals,
+ * otherwise a structure such as an interval tree would be suitable
+ */
+typedef Interval<size_t> MemInterval;
+typedef std::set<MemInterval> MemIntervalSet;
+typedef std::map<MemInterval, void*> FlightRecStorage;
+typedef std::vector<fdr_parameters> ParameterList;
+
+inline void write_record_type(int fd, uint8_t record_type)
+{
+ (void)write(fd, &record_type, sizeof(uint8_t));
+}
+
+class Event {
+ bool valid;
+public:
+ char event_type[ID_LEN];
+ /* temporary ranges */
+ MemIntervalSet temp;
+ ParameterList parameters;
+
+ Event(const char *event_type): valid(true) {
+ strncpy(this->event_type, event_type, ID_LEN);
+ this->event_type[ID_LEN-1] = 0;
+ }
+ ~Event() {}
+
+ bool is_valid() const { return valid; }
+
+ flightrec_status add_parameter(const char *name, size_t value)
+ {
+ fdr_parameters params = {};
+ strncpy(params.name, name, ID_LEN);
+ params.name[ID_LEN-1] = 0;
+ params.value = value;
+ parameters.push_back(params);
+ return FDR_OK;
+ }
+ flightrec_status add_oneshot_range(size_t addr_start, size_t addr_end)
+ {
+ MemInterval r(addr_start, addr_end);
+ flightrec_status ret = FDR_OK;
+
+ std::pair<MemIntervalSet::iterator, bool> rv = temp.insert(MemInterval(addr_start, addr_end));
+ if(!rv.second)
+ {
+ /* overlaps with already existing temporary range; bounce it */
+ ret = FDR_OVERLAP;
+ }
+ return ret;
+ }
+};
+
+class FlightRecorder {
+ /* mutex protecting data structure */
+ pthread_mutex_t mutex;
+ /* stored data */
+ FlightRecStorage stored;
+ /* persistent ranges */
+ MemIntervalSet persistent;
+ /* file descriptor for output */
+ int fd;
+ bool valid;
+
+ static const size_t diff_granularity = 256;
+
+ /* check all monitored ranges, and log changes */
+ void write_mem_range(size_t start, size_t end)
+ {
+ write_record_type(fd, RTYPE_RANGE_DATA);
+ (void)write(fd, &start, sizeof(size_t));
+ (void)write(fd, &end, sizeof(size_t));
+ (void)write(fd, (void*)start, end - start);
+ }
+
+ /* Binary diff between two memory areas.
+ * Log all found differences to output file.
+ */
+ void bdiff(size_t from, size_t to, size_t size, size_t granularity)
+ {
+ size_t mismatch_start = 0;
+ size_t mismatch_end = 0;
+ bool in_difference = false;
+#ifdef DEBUG
+ //printf("bdiff %08x %08x %08x %08x\n", (uint32_t)from, (uint32_t)to, (uint32_t)size, (uint32_t)granularity);
+#endif
+ for(size_t ptr = 0; ptr < size; ptr += granularity)
+ {
+ size_t compsize = std::min(size-ptr, granularity);
+ if(memcmp((void*)(from + ptr), (void*)(to + ptr), compsize) != 0)
+ {
+ //printf("mismatch %08x %08x %08x\n", (uint32_t)(from + ptr), (uint32_t)(to + ptr), (uint32_t)compsize);
+ if(!in_difference) /* start new difference? */
+ {
+ mismatch_start = ptr;
+ in_difference = true;
+ }
+ mismatch_end = ptr + compsize; /* extend end of differing area */
+ }
+ else /* Block matches */
+ {
+ if(in_difference) /* write previous difference to log */
+ {
+ write_mem_range(to + mismatch_start, to + mismatch_end);
+ in_difference = false;
+ }
+ }
+ }
+ if(in_difference)
+ {
+ /* Write last block mismatch */
+ write_mem_range(to + mismatch_start, to + mismatch_end);
+ }
+ }
+
+ /* Perform binary difference on all monitored ranges */
+ void check_monitored_ranges()
+ {
+ /* incremental update */
+ for(MemIntervalSet::const_iterator i=persistent.begin(); i!=persistent.end(); ++i)
+ {
+ /* Check whether range is already stored */
+ FlightRecStorage::iterator j = stored.find(*i);
+ if(j == stored.end())
+ {
+ /* Not in storage at all, write whole block. */
+ //printf("Not in storage at all, write whole block.\n");
+ write_mem_range(i->start, i->end);
+ /* Copy memory block to newly allocated storage,
+ * so that we can compare against it later. */
+ void *block = malloc(i->end - i->start);
+ memcpy(block, (void*)i->start, i->end - i->start);
+#ifdef DEBUG
+ printf("storing %p: %p %p\n", block, i->start, i->end);
+#endif
+ stored.insert(std::make_pair(*i, block));
+ } else {
+ if(j->first.start != i->start || j->first.end != i->end)
+ {
+ /* Huh? Not exactly the same range, could do an intersection here but
+ * currently this is not supported, write the entire range */
+ //printf("Warning: stored block mismatch start1=%p start2=%p end1=%p end2=%p\n", j->first.start, i->start, j->first.end, i->end);
+ write_mem_range(i->start, i->end);
+ } else {
+ /* compare ranges and write differences */
+ /* copy new values to storage */
+ bdiff((size_t)j->second, i->start, i->end - i->start, diff_granularity);
+ memcpy(j->second, (void*)i->start, i->end - i->start);
+ }
+ }
+ }
+ }
+public:
+ FlightRecorder(const char *name):
+ fd(-1), valid(false)
+ {
+ if(pthread_mutex_init(&mutex, NULL))
+ return;
+
+ fd = open(name, O_CREAT|O_WRONLY|O_TRUNC, 0777);
+ if(fd == -1)
+ {
+ pthread_mutex_destroy(&mutex);
+ return;
+ }
+ if(write(fd, &FDR_MAGIC, sizeof(FDR_MAGIC)) < 0 ||
+ write(fd, &FDR_VERSION, sizeof(FDR_VERSION)) < 0)
+ {
+ pthread_mutex_destroy(&mutex);
+ close(fd);
+ return;
+ }
+
+ valid = true;
+ // Postcondition is either: fully valid object, or invalid object
+ // with no initialized fields AT ALL.
+ }
+
+ ~FlightRecorder()
+ {
+ if(valid)
+ {
+ close(fd);
+ pthread_mutex_destroy(&mutex);
+ // Free comparison blocks in stored
+ for(FlightRecStorage::iterator i=stored.begin(); i!=stored.end(); ++i)
+ {
+ free(i->second);
+ }
+ }
+ }
+
+ bool is_valid() const { return valid; }
+
+ flightrec_status add_monitored_range(size_t addr_start, size_t addr_end)
+ {
+ pthread_mutex_lock(&mutex);
+#ifdef DEBUG
+ printf("-> add_monitored_range %p %p\n", addr_start, addr_end);
+#endif
+ std::pair<MemIntervalSet::iterator, bool> rv = persistent.insert(MemInterval(addr_start, addr_end));
+ if(rv.second)
+ {
+ write_record_type(fd, RTYPE_ADD_UPDATED_RANGE);
+ (void)write(fd, &addr_start, sizeof(size_t));
+ (void)write(fd, &addr_end, sizeof(size_t));
+ }
+ pthread_mutex_unlock(&mutex);
+ return rv.second ? FDR_OK : FDR_OVERLAP;
+ }
+
+ flightrec_status remove_monitored_range(size_t addr_start, size_t addr_end)
+ {
+ pthread_mutex_lock(&mutex);
+ // XXX currently assumes a complete match, partial munmaps are not supported
+ size_t ret = persistent.erase(MemInterval(addr_start, addr_end));
+ if(ret)
+ {
+ write_record_type(fd, RTYPE_REMOVE_UPDATED_RANGE);
+ (void)write(fd, &addr_start, sizeof(size_t));
+ (void)write(fd, &addr_end, sizeof(size_t));
+ }
+ pthread_mutex_unlock(&mutex);
+ return ret ? FDR_OK : FDR_NOT_FOUND;
+ }
+
+ flightrec_status log_event(Event *context)
+ {
+ /* count parameters */
+ uint32_t num_parameters = context->parameters.size();
+
+ pthread_mutex_lock(&mutex);
+ /* log updates to monitored ranges */
+ check_monitored_ranges();
+
+ /* log temp ranges */
+ for(MemIntervalSet::const_iterator i=context->temp.begin(); i!=context->temp.end(); ++i)
+ {
+ write_record_type(fd, RTYPE_RANGE_TEMP_DATA);
+ (void)write(fd, &i->start, sizeof(size_t));
+ (void)write(fd, &i->end, sizeof(size_t));
+ (void)write(fd, (void*)i->start, i->end - i->start);
+ }
+
+ write_record_type(fd, RTYPE_EVENT);
+ uint8_t name_len = strlen(context->event_type);
+ (void)write(fd, &name_len, sizeof(uint8_t));
+ (void)write(fd, context->event_type, name_len);
+
+ /* log parameters */
+ (void)write(fd, &num_parameters, sizeof(uint32_t));
+ for(size_t i=0; i<num_parameters; ++i)
+ {
+ uint8_t name_len = strlen(context->parameters[i].name);
+ (void)write(fd, &name_len, sizeof(uint8_t));
+ (void)write(fd, context->parameters[i].name, name_len);
+ (void)write(fd, &context->parameters[i].value, sizeof(size_t));
+ }
+ delete context;
+ pthread_mutex_unlock(&mutex);
+ return FDR_OK;
+ }
+
+ flightrec_status log_comment(const char *data, size_t size)
+ {
+ pthread_mutex_lock(&mutex);
+ write_record_type(fd, RTYPE_COMMENT);
+ (void)write(fd, &size, sizeof(size_t));
+ (void)write(fd, data, size);
+ pthread_mutex_unlock(&mutex);
+ return FDR_OK;
+ }
+};
+
+extern "C" {
+
+flightrec_t fdr_open(const char *filename)
+{
+ FlightRecorder *rv = new FlightRecorder(filename);
+ if(rv->is_valid()) {
+ return (flightrec_t) rv;
+ } else {
+ delete rv;
+ return NULL;
+ }
+}
+
+flightrec_status fdr_add_monitored_range(flightrec_t self, void *addr_start, size_t size)
+{
+ if(self == NULL)
+ return FDR_ERROR;
+ return ((FlightRecorder*)self)->add_monitored_range((size_t)addr_start, ((size_t)addr_start)+size);
+}
+
+flightrec_status fdr_remove_monitored_range(flightrec_t self, void *addr_start, size_t size)
+{
+ if(self == NULL)
+ return FDR_ERROR;
+ return ((FlightRecorder*)self)->remove_monitored_range((size_t)addr_start, ((size_t)addr_start)+size);
+}
+
+flightrec_event_t fdr_new_event(flightrec_t self, const char *event_type)
+{
+ if(self == NULL)
+ return NULL;
+ Event *rv = new Event(event_type);
+ if(rv->is_valid()) {
+ return (flightrec_event_t) rv;
+ } else {
+ delete rv;
+ return NULL;
+ }
+}
+
+flightrec_status fdr_event_add_parameter(flightrec_event_t self, const char *name, size_t value)
+{
+ if(self == NULL)
+ return FDR_ERROR;
+ return ((Event*)self)->add_parameter(name, value);
+}
+
+flightrec_status fdr_event_add_oneshot_range(flightrec_event_t self, void *addr_start, size_t size)
+{
+ if(self == NULL)
+ return FDR_ERROR;
+ return ((Event*)self)->add_oneshot_range((size_t)addr_start, ((size_t)addr_start)+size);
+}
+
+flightrec_status fdr_log_event(flightrec_t self, flightrec_event_t context)
+{
+ if(self == NULL)
+ return FDR_ERROR;
+ return ((FlightRecorder*)self)->log_event((Event*)context);
+}
+
+flightrec_status fdr_log_comment(flightrec_t self, const char *data, size_t size)
+{
+ if(self == NULL)
+ return FDR_ERROR;
+ return ((FlightRecorder*)self)->log_comment(data, size);
+}
+
+flightrec_status fdr_close(flightrec_t self)
+{
+ delete (FlightRecorder*)self;
+ return FDR_OK;
+}
+
+}
+
diff --git a/src/lib/flightrecorder.h b/src/lib/flightrecorder.h
new file mode 100644
index 0000000..4b7af96
--- /dev/null
+++ b/src/lib/flightrecorder.h
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 2012-2013 Wladimir J. van der Laan
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#ifndef H_FLIGHTRECORDER
+#define H_FLIGHTRECORDER
+/* In-process "flight recorder"
+
+The idea is to log discrete events with their context.
+
+- A list of memory ranges to monitor. At every event, these ranges
+ will be checked for differences, and all differences will be logged.
+ Memory ranges to monitor can be added and removed at any point.
+
+ There are two kinds of ranges:
+ - Temporary: specific to this event, these will be stored (if modified) only for
+ this event.
+ - Persistent: checked for every event, for example mmapped areas
+
+- The event itself consists of a list of ranges that are "up to date",
+ a list of pointers to the root ranges (such as the command structure), and
+ possibly metadata such as a sequence id and the current time.
+
+Underlying data structure needs to be a representation of the entire memory range, over time,
+initialized as "empty" (undefined).
+
+Ie, start with empty range 0x00000000-0xFFFFFFFF
+0x00004000 - 0x00008000 is updated for event 1
+0x00006000 - 0x00008000 is updated for event 2
+...
+
+Need to quickly answer queries of the form "what are the last known values of range X-Y".
+Then write ranges that changed.
+
+Need a certain granularity to prevent overkill (lower than page-level, but higher than byte, maybe 16 bytes)
+
+In-memory representation:
+ list of non-overlapping ranges [(A1-B1,ptr1),(A2-B2,ptr2)] where ptr1,ptr2 are pointers into the file.
+ Ranges may need to be split when the middle is updated.
+
+ Could just keep the current state of the memory in memory, that will make implementation easier (and faster)
+ but would be kind of a memory leak over time (at least with no way to forget old ranges, maybe
+ forget current memory contents on REMOVE_UPDATED_RANGE immediately?).
+
+ Merge consecutive and overlapping ranges. Split ranges if the middle is removed.
+
+ As the ranges are non-overlapping a binary search tree can be used.
+
+Changed ranges are simply written to the end of the file.
+ RANGE_DATA Addr_begin Addr_end <data>
+ ADD_UPDATED_RANGE <A-B> (add range to ranges that are kept up-to-date for every event)
+ REMOVE_UPDATED_RANGE <A-B> (remove range from ranges that are kept up-to-date for every event)
+ EVENT <metadata>
+ ROOT <metadata> <addr>
+ ...
+ COMMENT <data> (allow inserting arbitrary markers into stream)
+
+For metadata, just use a 64-bit tag for now containing the event type etc.
+ event type: (mmap, munmap, open, close, ioctl)
+
+API is thread-safe.
+
+On-disk format is simple:
+
+HEADER:
+ magic uint32 0x8e1aaa8f
+ version uint32 1
+
+REPEATED:
+ record_type uint8 One of RTYPE_* (see flightrecorder.cpp)
+ <data for record_type>
+
+RTYPE_RANGE_DATA: Change in memory range
+ start size_t Start address of range
+ end size_t End address of range
+ data uint8[end-start] Data of memory range
+
+RTYPE_RANGE_TEMP_DATA: Temporary memory range (only for this event)
+ start size_t Start address of range
+ end size_t End address of range
+ data uint8[end-start] Data of memory range
+
+RTYPE_ADD_UPDATED_RANGE: Add persistent monitored range
+ start size_t Start address of range
+ end size_t End address of range
+
+RTYPE_REMOVE_UPDATED_RANGE: Remove persistent monitored range
+ start size_t Start address of range
+ end size_t End address of range
+
+RTYPE_EVENT: Event
+ event_type short_string Event type id
+ num_parameters uint32_t Number of parameters
+ REPEATED:
+ name short_string Event parameter id
+ value size_t Event parameter value
+
+RTYPE_COMMENT:
+ size size_t Size of comment
+ comment uint8[size] Comment data
+
+*/
+#include <stdint.h>
+#include <stdlib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ FDR_OK,
+ FDR_ERROR,
+ FDR_OVERLAP,
+ FDR_NOT_FOUND
+} flightrec_status;
+
+typedef void * flightrec_t;
+typedef void * flightrec_event_t;
+
+flightrec_t fdr_open(const char *filename);
+/**
+ * Add a memory range to monitor. Changes to this range will be detected and logged
+ * for every event.
+ */
+flightrec_status fdr_add_monitored_range(flightrec_t self, void *addr_start, size_t size);
+/**
+ * Remove a memory range previously added with fdr_add_monitored_range.
+ */
+flightrec_status fdr_remove_monitored_range(flightrec_t self, void *addr_start, size_t size);
+
+/**
+ * Start a new event.
+ * @param[in] event_type A short identifier of the event, of max 255 bytes
+ * @returns Event context, use this to add temporary memory ranges.
+ */
+flightrec_event_t fdr_new_event(flightrec_t self, const char *event_type);
+
+/**
+ * Add a parameter to the next event.
+ */
+flightrec_status fdr_event_add_parameter(flightrec_event_t self, const char *name, size_t value);
+
+/**
+ * Add a memory range just for the duration of the the next event.
+ */
+flightrec_status fdr_event_add_oneshot_range(flightrec_event_t self, void *addr_start, size_t size);
+
+/**
+ * Main entry point for logging an event.
+ * Takes ownership of passed event context.
+ */
+flightrec_status fdr_log_event(flightrec_t self, flightrec_event_t context);
+
+/**
+ * Log a comment. Contents can be arbitrary binary data.
+ */
+flightrec_status fdr_log_comment(flightrec_t self, const char *data, size_t size);
+/**
+ * Close FDR stream.
+ */
+flightrec_status fdr_close(flightrec_t self);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/lib/interval.h b/src/lib/interval.h
new file mode 100644
index 0000000..bbe8642
--- /dev/null
+++ b/src/lib/interval.h
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2013 Wladimir J. van der Laan
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#ifndef H_INTERVAL
+
+#include <map>
+#include <set>
+
+template <typename T> struct Interval {
+ /* [start,end) */
+ T start;
+ T end;
+
+ Interval(T start, T end):
+ start(start), end(end)
+ {
+ }
+
+ bool operator<(const Interval &b) const
+ {
+ return start < b.start && end < b.end;
+ }
+ bool operator==(const Interval &b) const
+ {
+ // Ranges overlap
+ return end > b.start && b.end > start;
+ }
+ bool empty() const
+ {
+ return start == end;
+ }
+
+ // Return merged (bounding) interval
+ Interval<T> merge(const Interval<T> &o)
+ {
+ return Interval<T>(std::min(start, o.start), std::max(end, o.end));
+ }
+};
+
+template <typename T,typename U> std::pair<typename T::iterator,typename T::iterator> intersecting_intervals(
+ T &s, const Interval<U> &r)
+{
+ if(r.empty())
+ return make_pair(s.end(), s.end());
+ typename T::iterator i = s.lower_bound(Interval<U>(r.start,r.start+1));
+ typename T::iterator j = s.upper_bound(Interval<U>(r.end-1,r.end));
+ return make_pair(i,j);
+}
+
+template <typename T,typename U> std::pair<typename T::const_iterator,typename T::const_iterator> intersecting_intervals(
+ const T &s, const Interval<U> &r)
+{
+ if(r.empty())
+ return make_pair(s.end(), s.end());
+ typename T::const_iterator i = s.lower_bound(Interval<U>(r.start,r.start+1));
+ typename T::const_iterator j = s.upper_bound(Interval<U>(r.end-1,r.end));
+ return make_pair(i,j);
+}
+
+template <typename T, typename U> void intervalset_merge(
+ T &s, const Interval<U> &r)
+{
+ if(s.find(r) != s.end())
+ {
+ /* overlaps with at least one current interval */
+ /* get intervals that overlap with r */
+ std::pair<typename T::iterator, typename T::iterator> overlap = intersecting_intervals(s, r);
+ Interval<U> span(overlap.first->start, overlap.second->end);
+ s.erase(overlap.first, overlap.second);
+ s.insert(span.merge(r));
+ }
+ else
+ {
+ /* completely new interval, just add it */
+ s.insert(r);
+ }
+}
+
+template <typename T, typename U> void intervalset_remove(
+ T &s, const Interval<U> &r)
+{
+ if(s.find(r) != s.end())
+ {
+ /* overlaps with at least one current interval */
+ /* remove intervals that are completely contained within the removed interval */
+ /* may need to split up an interval if r divides it */
+
+ /* get intervals that overlap with r */
+ std::pair<typename T::iterator, typename T::iterator> overlap = intersecting_intervals(s, r);
+ Interval<U> span(overlap.first->start, overlap.second->end);
+ s.erase(overlap.first, overlap.second);
+ s.insert(span.merge(r));
+ }
+ else
+ {
+ /* completely new interval nothing to do */
+ }
+}
+
+#endif
+
diff --git a/src/lib/interval_test.cpp b/src/lib/interval_test.cpp
new file mode 100644
index 0000000..4ca0661
--- /dev/null
+++ b/src/lib/interval_test.cpp
@@ -0,0 +1,38 @@
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "interval.h"
+
+typedef std::set<Interval<size_t> > IntervalSet;
+
+void print_set(const IntervalSet &s)
+{
+ for(IntervalSet::const_iterator i=s.begin(); i!=s.end(); ++i)
+ {
+ printf("%i-%i ", (int)i->start, (int)i->end);
+ }
+ printf("\n");
+}
+
+int main()
+{
+ IntervalSet s;
+ s.insert(Interval<size_t>(1,10));
+ s.insert(Interval<size_t>(10,20));
+ s.insert(Interval<size_t>(20,30));
+ s.insert(Interval<size_t>(30,40));
+
+ print_set(s);
+
+ printf("Matching intervals:\n");
+ std::pair<IntervalSet::const_iterator,IntervalSet::const_iterator> ir = intersecting_intervals(s, Interval<size_t>(10,25));
+ for(IntervalSet::const_iterator i=ir.first; i!=ir.second; ++i)
+ {
+ printf("%i-%i ", (int)i->start, (int)i->end);
+ }
+ printf("\n");
+
+ intervalset_merge(s, Interval<size_t>(25, 50));
+ print_set(s);
+}
+
diff --git a/src/lib/read_png.c b/src/lib/read_png.c
new file mode 100644
index 0000000..04b173d
--- /dev/null
+++ b/src/lib/read_png.c
@@ -0,0 +1,158 @@
+/* Based on a gist by Morten Nobel
+ * https://gist.github.com/mortennobel/5299151
+ */
+#include "read_png.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <png.h>
+
+bool read_png(char *name, int row_align, int *outStride, int *outWidth, int *outHeight, uint32_t **outData)
+{
+ png_structp png_ptr;
+ png_infop info_ptr;
+ unsigned int sig_read = 0;
+ int color_type, interlace_type;
+ FILE *fp;
+
+ if ((fp = fopen(name, "rb")) == NULL)
+ return false;
+
+ /* Create and initialize the png_struct
+ * with the desired error handler
+ * functions. If you want to use the
+ * default stderr and longjump method,
+ * you can supply NULL for the last
+ * three parameters. We also supply the
+ * the compiler header file version, so
+ * that we know if the application
+ * was compiled with a compatible version
+ * of the library. REQUIRED
+ */
+ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
+ NULL, NULL, NULL);
+
+ if (png_ptr == NULL) {
+ fclose(fp);
+ return false;
+ }
+
+ /* Allocate/initialize the memory
+ * for image information. REQUIRED. */
+ info_ptr = png_create_info_struct(png_ptr);
+ if (info_ptr == NULL) {
+ fclose(fp);
+ png_destroy_read_struct(&png_ptr, NULL, NULL);
+ return false;
+ }
+
+ /* Set error handling if you are
+ * using the setjmp/longjmp method
+ * (this is the normal method of
+ * doing things with libpng).
+ * REQUIRED unless you set up
+ * your own error handlers in
+ * the png_create_read_struct()
+ * earlier.
+ */
+ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* Free all of the memory associated
+ * with the png_ptr and info_ptr */
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ fclose(fp);
+ /* If we get here, we had a
+ * problem reading the file */
+ return false;
+ }
+
+ /* Set up the output control if
+ * you are using standard C streams */
+ png_init_io(png_ptr, fp);
+
+ /* If we have already
+ * read some of the signature */
+ png_set_sig_bytes(png_ptr, sig_read);
+
+ /*
+ * If you have enough memory to read
+ * in the entire image at once, and
+ * you need to specify only
+ * transforms that can be controlled
+ * with one of the PNG_TRANSFORM_*
+ * bits (this presently excludes
+ * dithering, filling, setting
+ * background, and doing gamma
+ * adjustment), then you can read the
+ * entire image (including pixels)
+ * into the info structure with this
+ * call
+ *
+ * PNG_TRANSFORM_STRIP_16 |
+ * PNG_TRANSFORM_PACKING forces 8 bit
+ * PNG_TRANSFORM_EXPAND forces to
+ * expand a palette into RGB
+ */
+ png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_PACKING | PNG_TRANSFORM_EXPAND, NULL);
+
+ png_uint_32 width, height, stride;
+ int bit_depth;
+ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
+ &interlace_type, NULL, NULL);
+
+ unsigned int channels = png_get_channels(png_ptr, info_ptr);
+ uint32_t *data = NULL;
+
+ png_bytepp row_pointers = png_get_rows(png_ptr, info_ptr);
+
+ stride = (width * 4 + row_align - 1) & ~(row_align-1);
+ data = malloc(stride * height);
+
+ switch(channels)
+ {
+ case 3: /* Convert bytewise RGB to A8R8G8B8 */
+ for (int i = 0; i < height; i++)
+ {
+ for(int j = 0; j < width; j++)
+ {
+ data[(stride/4) * i + j] =
+ 0xff000000 |
+ (row_pointers[i][j*3 + 0] << 16) |
+ (row_pointers[i][j*3 + 1] << 8) |
+ (row_pointers[i][j*3 + 2]);
+ }
+ }
+ break;
+ case 4: /* Convert bytewise RGBA to A8R8G8B8 */
+ for (int i = 0; i < height; i++)
+ {
+ for(int j = 0; j < width; j++)
+ {
+ data[(stride/4) * i + j] =
+ (row_pointers[i][j*3 + 3] << 24) |
+ (row_pointers[i][j*3 + 0] << 16) |
+ (row_pointers[i][j*3 + 1] << 8) |
+ (row_pointers[i][j*3 + 2]);
+ }
+ }
+ break;
+ default: /* Invalid number of channels */
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ free(data);
+ return false;
+ }
+
+ /* Clean up after the read,
+ * and free any memory allocated */
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+
+ /* Close the file */
+ fclose(fp);
+
+ /* That's it */
+ *outWidth = width;
+ *outHeight = height;
+ *outStride = stride;
+ *outData = data;
+ return true;
+}
+
diff --git a/src/lib/read_png.h b/src/lib/read_png.h
new file mode 100644
index 0000000..2b8d8cd
--- /dev/null
+++ b/src/lib/read_png.h
@@ -0,0 +1,11 @@
+#ifndef H_READ_PNG
+#define H_READ_PNG
+
+#include <stdbool.h>
+#include <stdint.h>
+
+/* Read PNG, return pixels in A8R8G8B8 format */
+bool read_png(char *name, int row_align, int *outStride, int *outWidth, int *outHeight, uint32_t **outData);
+
+#endif
+
diff --git a/src/lib/viv_hook.c b/src/lib/viv_hook.c
new file mode 100644
index 0000000..0db5c46
--- /dev/null
+++ b/src/lib/viv_hook.c
@@ -0,0 +1,369 @@
+/*
+ * Copyright (c) 2012-2013 Wladimir J. van der Laan
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#include "viv_hook.h"
+#include "elf_hook.h"
+#include "flightrecorder.h"
+/* hooking / logging functionality for Vivante GL driver
+ */
+#include "gc_abi.h"
+#include "gc_hal_base.h"
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+
+#ifdef GCABI_HAS_STATE_DELTAS
+#include "gc_hal_kernel_buffer.h"
+#else /* V2 */
+#include "gc_hal_user_context.h"
+#endif
+
+#include "gc_hal_types.h"
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <stdint.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <pthread.h>
+
+flightrec_t _fdr;
+
+static int _galcore_handle = 0;
+
+/* keep track of mapped video memory (not mapped through mmap) */
+#define MAX_MAPPINGS 128
+typedef struct
+{
+ void *node;
+ void *logical;
+ size_t bytes;
+} mapping_t;
+static mapping_t mappings[MAX_MAPPINGS];
+
+int my_open(const char* path, int flags, ...)
+{
+ int ret=0;
+ if (flags & O_CREAT)
+ {
+ int mode=0;
+ va_list args;
+
+ va_start(args, flags);
+ mode = (mode_t) va_arg(args, int);
+ va_end(args);
+
+ ret = open(path, flags, mode);
+ } else {
+ ret = open(path, flags);
+ }
+
+ if(ret >= 0 && (!strcmp(path, "/dev/gal3d") || !strcmp(path, "/dev/galcore") || !strcmp(path, "/dev/graphics/galcore")))
+ {
+ _galcore_handle = ret;
+ printf("opened galcore: %i\n", ret);
+ }
+
+ return ret;
+}
+
+void *my_mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset)
+{
+ if(_fdr != NULL && fd == _galcore_handle)
+ {
+ flightrec_event_t evctx = fdr_new_event(_fdr, "MMAP_BEFORE");
+ fdr_event_add_parameter(evctx, "addr",(size_t)addr);
+ fdr_event_add_parameter(evctx, "length",(size_t)length);
+ fdr_event_add_parameter(evctx, "prot",(size_t)prot);
+ fdr_event_add_parameter(evctx, "flags",(size_t)flags);
+ fdr_event_add_parameter(evctx, "fd",(size_t)fd);
+ fdr_event_add_parameter(evctx, "offset",(size_t)offset);
+ fdr_event_add_parameter(evctx, "thread", (size_t)pthread_self());
+ fdr_log_event(_fdr, evctx);
+ }
+ void *ret = mmap(addr, length, prot, flags, fd, offset);
+ if(_fdr != NULL && fd == _galcore_handle)
+ {
+ printf("new mapping %p %d\n", ret, (int)length);
+ flightrec_event_t evctx = fdr_new_event(_fdr, "MMAP_AFTER");
+ fdr_event_add_parameter(evctx, "addr",(size_t)addr);
+ fdr_event_add_parameter(evctx, "length",(size_t)length);
+ fdr_event_add_parameter(evctx, "prot",(size_t)prot);
+ fdr_event_add_parameter(evctx, "flags",(size_t)flags);
+ fdr_event_add_parameter(evctx, "fd",(size_t)fd);
+ fdr_event_add_parameter(evctx, "offset",(size_t)offset);
+ fdr_event_add_parameter(evctx, "thread", (size_t)pthread_self());
+ fdr_event_add_parameter(evctx, "ret", (size_t)ret);
+ if(ret)
+ {
+ /* monitor new mmapped range */
+ /* Only small ranges, tracking the 128MB range that vivante maps is waaay
+ too slow (and in the current way things are done, needs all memory that
+ the device has to detect changes) */
+ /*
+ fdr_add_monitored_range(_fdr, ret, length);
+ */
+ }
+ fdr_log_event(_fdr, evctx);
+ }
+ return ret;
+}
+
+int my_munmap(void *addr, size_t length)
+{
+ if(_fdr != NULL)
+ {
+ flightrec_event_t evctx = fdr_new_event(_fdr, "MUNMAP_BEFORE");
+ fdr_event_add_parameter(evctx, "addr",(size_t)addr);
+ fdr_event_add_parameter(evctx, "length",(size_t)length);
+ fdr_event_add_parameter(evctx, "thread", (size_t)pthread_self());
+ fdr_log_event(_fdr, evctx);
+ }
+
+ printf("removed mapping %p %d\n", addr, (int)length);
+ //fdr_remove_monitored_range(_fdr, addr, length);
+ int ret = munmap(addr, length);
+
+ if(_fdr != NULL)
+ {
+ flightrec_event_t evctx = fdr_new_event(_fdr, "MUNMAP_AFTER");
+ fdr_event_add_parameter(evctx, "addr",(size_t)addr);
+ fdr_event_add_parameter(evctx, "length",(size_t)length);
+ fdr_event_add_parameter(evctx, "thread", (size_t)pthread_self());
+ fdr_event_add_parameter(evctx, "ret", (size_t)ret);
+ fdr_log_event(_fdr, evctx);
+ }
+ return ret;
+}
+
+/* Log contents of HAL_INTERFACE (input) child pointers.
+ * Assumes that the parent structure id was already added. */
+static void log_interface_in(flightrec_event_t evctx, gcsHAL_INTERFACE *id)
+{
+ switch(id->command)
+ {
+ case gcvHAL_COMMIT:
+ fdr_event_add_oneshot_range(evctx, id->u.Commit.commandBuffer, sizeof(struct _gcoCMDBUF));
+ //fdr_event_add_oneshot_range(evctx, id->u.Commit.commandBuffer->logical, id->u.Commit.commandBuffer->offset);
+#ifndef GCABI_HAS_STATE_DELTAS
+ fdr_event_add_oneshot_range(evctx, id->u.Commit.contextBuffer, sizeof(struct _gcoCONTEXT));
+ if(id->u.Commit.contextBuffer->map) /* state map */
+ fdr_event_add_oneshot_range(evctx, id->u.Commit.contextBuffer->map, id->u.Commit.contextBuffer->stateCount*4);
+ if(id->u.Commit.contextBuffer->buffer) /* context command temp buffer */
+ fdr_event_add_oneshot_range(evctx, id->u.Commit.contextBuffer->buffer, id->u.Commit.contextBuffer->bufferSize);
+#endif
+ break;
+ case gcvHAL_EVENT_COMMIT: { /* log entire event chain */
+ struct _gcsQUEUE *queue = id->u.Event.queue;
+ while(queue != NULL)
+ {
+ fdr_event_add_oneshot_range(evctx, queue, sizeof(struct _gcsQUEUE));
+ log_interface_in(evctx, &queue->iface);
+ queue = queue->next;
+ }
+ }
+ case gcvHAL_FREE_VIDEO_MEMORY:
+ for(int idx=0; idx<MAX_MAPPINGS; ++idx)
+ {
+ if(mappings[idx].node == id->u.FreeVideoMemory.node)
+ {
+ mappings[idx].node = 0;
+ mappings[idx].bytes = 0;
+ mappings[idx].logical = 0;
+ break;
+ }
+ }
+ break;
+ case gcvHAL_UNLOCK_VIDEO_MEMORY:
+ for(int idx=0; idx<MAX_MAPPINGS; ++idx)
+ {
+ if(mappings[idx].node == id->u.UnlockVideoMemory.node)
+ {
+ printf("remove_range %p %08x\n", mappings[idx].logical, mappings[idx].bytes);
+ fdr_remove_monitored_range(_fdr, mappings[idx].logical, mappings[idx].bytes);
+ mappings[idx].logical = 0;
+ break;
+ }
+ }
+ break;
+ case gcvHAL_FREE_CONTIGUOUS_MEMORY:
+ fdr_remove_monitored_range(_fdr, id->u.FreeContiguousMemory.logical, id->u.FreeContiguousMemory.bytes);
+ break;
+ default:
+ break;
+ }
+}
+
+/* Log contents of HAL_INTERFACE (output) child pointers.
+ * Assumes that the parent structure id was already added. */
+static void log_interface_out(flightrec_event_t evctx, gcsHAL_INTERFACE *id)
+{
+ switch(id->command)
+ {
+ case gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY:
+ printf("vidalloc %p %08x\n", id->u.AllocateLinearVideoMemory.node, id->u.AllocateLinearVideoMemory.bytes);
+ for(int idx=0; idx<MAX_MAPPINGS; ++idx)
+ {
+ if(mappings[idx].node == NULL)
+ {
+ mappings[idx].node = id->u.AllocateLinearVideoMemory.node;
+ mappings[idx].bytes = id->u.AllocateLinearVideoMemory.bytes;
+ mappings[idx].logical = NULL;
+ break;
+ }
+ }
+ break;
+ case gcvHAL_LOCK_VIDEO_MEMORY:
+ for(int idx=0; idx<MAX_MAPPINGS; ++idx)
+ {
+ if(mappings[idx].node == id->u.LockVideoMemory.node)
+ {
+ mappings[idx].logical = id->u.LockVideoMemory.memory;
+ printf("add_range %p %08x\n", mappings[idx].logical, mappings[idx].bytes);
+ fdr_add_monitored_range(_fdr, mappings[idx].logical, mappings[idx].bytes);
+ break;
+ }
+ }
+ break;
+ case gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY:
+ fdr_add_monitored_range(_fdr, id->u.AllocateContiguousMemory.logical, id->u.AllocateContiguousMemory.bytes);
+ break;
+ default:
+ break;
+ }
+}
+
+int my_ioctl(int d, int request, void *ptr_)
+{
+ vivante_ioctl_data_t *ptr = (vivante_ioctl_data_t*) ptr_;
+#if 0 /* UGH, this handle gets passed in some other way instead of open() for i.mx6 blobster */
+ if(d != _galcore_handle)
+ {
+ printf("unhandled ioctl %08x on fd %i\n", request, d);
+ return -1;
+ }
+#endif
+ int ret=0;
+ if(_fdr != NULL)
+ {
+ if(request == IOCTL_GCHAL_INTERFACE)
+ {
+ flightrec_event_t evctx = fdr_new_event(_fdr, "IOCTL_BEFORE");
+ fdr_event_add_parameter(evctx, "d", (size_t)d);
+ fdr_event_add_parameter(evctx, "request",(size_t)request);
+ fdr_event_add_parameter(evctx, "ptr",(size_t)ptr);
+ fdr_event_add_parameter(evctx, "thread", (size_t)pthread_self());
+ fdr_event_add_oneshot_range(evctx, ptr, sizeof(vivante_ioctl_data_t));
+ fdr_event_add_oneshot_range(evctx, ptr->in_buf, ptr->in_buf_size);
+ log_interface_in(evctx, ptr->in_buf);
+ fdr_log_event(_fdr, evctx);
+ } else {
+ printf("unhandled ioctl %08x on fd %i\n", request, d);
+ return -1;
+ }
+ }
+ ret = ioctl(d, request, ptr);
+ if(_fdr != NULL)
+ {
+ if(request == IOCTL_GCHAL_INTERFACE)
+ {
+ flightrec_event_t evctx = fdr_new_event(_fdr, "IOCTL_AFTER");
+ fdr_event_add_parameter(evctx, "d", (size_t)d);
+ fdr_event_add_parameter(evctx, "request",(size_t)request);
+ fdr_event_add_parameter(evctx, "ptr",(size_t)ptr);
+ fdr_event_add_parameter(evctx, "thread", (size_t)pthread_self());
+ fdr_event_add_parameter(evctx, "ret", (size_t)ret);
+ fdr_event_add_oneshot_range(evctx, ptr, sizeof(vivante_ioctl_data_t));
+ fdr_event_add_oneshot_range(evctx, ptr->out_buf, ptr->out_buf_size);
+ log_interface_out(evctx, ptr->out_buf);
+ fdr_log_event(_fdr, evctx);
+ }
+ }
+ return ret;
+}
+
+void hook_start_logging(const char *filename)
+{
+ if(_fdr == NULL)
+ {
+ printf("viv_hook: logging to %s\n", filename);
+ _fdr = fdr_open(filename);
+ }
+}
+
+void the_hook(const char *filename)
+{
+ char *mali_path = NULL; // path to libMali.so
+ void *mali_base = NULL;
+ char *gal_names[] = {"libGAL.so", "libGAL-fb.so", 0};
+
+ hook_start_logging(filename);
+
+ int i=0;
+ while (gal_names[i] != 0)
+ {
+ if(parse_maps(gal_names[i], &mali_path, &mali_base) == 0)
+ break;
+ i++;
+ }
+
+ if (gal_names[i] == 0)
+ {
+ fprintf(stderr, "Could not find libGAL library in process map\n");
+ return;
+ }
+
+ printf("Hooking %s at %p\n", mali_path, mali_base);
+ if(elf_hook(mali_path, mali_base, "open", &my_open) == NULL)
+ {
+ fprintf(stderr, "Hooking open failed\n");
+ return;
+ }
+ if(elf_hook(mali_path, mali_base, "ioctl", &my_ioctl) == NULL)
+ {
+ fprintf(stderr, "Hooking ioctl failed\n");
+ return;
+ }
+ if(elf_hook(mali_path, mali_base, "mmap", &my_mmap) == NULL)
+ {
+ fprintf(stderr, "Hooking mmap failed\n");
+ return;
+ }
+ if(elf_hook(mali_path, mali_base, "munmap", &my_munmap) == NULL)
+ {
+ fprintf(stderr, "Hooking munmap failed\n");
+ return;
+ }
+ printf("Hook succeeded!\n");
+}
+
+void close_hook()
+{
+ fdr_close(_fdr);
+ _fdr = 0;
+}
+
diff --git a/src/lib/viv_hook.h b/src/lib/viv_hook.h
new file mode 100644
index 0000000..02354ec
--- /dev/null
+++ b/src/lib/viv_hook.h
@@ -0,0 +1,16 @@
+#ifndef H_VIV_HOOK
+#define H_VIV_HOOK
+
+#include <sys/mman.h>
+
+extern void the_hook(const char *filename);
+extern void close_hook(void);
+extern void hook_start_logging(const char *filename);
+
+extern int my_open(const char* path, int flags, ...);
+extern void *my_mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
+extern int my_munmap(void *addr, size_t length);
+extern int my_ioctl(int d, int request, void *ptr);
+
+#endif
+
diff --git a/src/lib/write_bmp.c b/src/lib/write_bmp.c
new file mode 100644
index 0000000..40de84e
--- /dev/null
+++ b/src/lib/write_bmp.c
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2011 Luc Verhaegen <libv@codethink.co.uk>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+/*
+ * Quick 'n Dirty bitmap dumper.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <string.h>
+#include <errno.h>
+
+#include "write_bmp.h"
+
+#define FILENAME_SIZE 1024
+
+struct bmp_header {
+ unsigned short magic;
+ unsigned int size;
+ unsigned int unused;
+ unsigned int start;
+} __attribute__((__packed__));
+
+struct dib_header {
+ unsigned int size;
+ unsigned int width;
+ unsigned int height;
+ unsigned short planes;
+ unsigned short bpp;
+ unsigned int compression;
+ unsigned int data_size;
+ unsigned int h_res;
+ unsigned int v_res;
+ unsigned int colours;
+ unsigned int important_colours;
+ unsigned int red_mask;
+ unsigned int green_mask;
+ unsigned int blue_mask;
+ unsigned int alpha_mask;
+ unsigned int colour_space;
+ unsigned int unused[12];
+} __attribute__((__packed__));
+
+static int
+bmp_header_write(int fd, int width, int height, int bgra, int noflip, int alpha)
+{
+ struct bmp_header bmp_header = {
+ .magic = 0x4d42,
+ .size = (width * height * 4) +
+ sizeof(struct bmp_header) + sizeof(struct dib_header),
+ .start = sizeof(struct bmp_header) + sizeof(struct dib_header),
+ };
+ struct dib_header dib_header = {
+ .size = sizeof(struct dib_header),
+ .width = width,
+ .height = noflip ? -height : height,
+ .planes = 1,
+ .bpp = 32,
+ .compression = 3,
+ .data_size = 4 * width * height,
+ .h_res = 0xB13,
+ .v_res = 0xB13,
+ .colours = 0,
+ .important_colours = 0,
+ .red_mask = 0x000000FF,
+ .green_mask = 0x0000FF00,
+ .blue_mask = 0x00FF0000,
+ .alpha_mask = alpha ? 0xFF000000 : 0x00000000,
+ .colour_space = 0x57696E20,
+ };
+
+ if (bgra) {
+ dib_header.red_mask = 0x00FF0000;
+ dib_header.blue_mask = 0x000000FF;
+ }
+
+ write(fd, &bmp_header, sizeof(struct bmp_header));
+ write(fd, &dib_header, sizeof(struct dib_header));
+
+ return 0;
+}
+
+void
+bmp_dump32(char *buffer, unsigned width, unsigned height, bool bgra, const char *filename)
+{
+ int fd;
+
+ fd = open(filename, O_WRONLY| O_TRUNC | O_CREAT, 0666);
+ if (fd == -1) {
+ printf("Failed to open %s: %s\n", filename, strerror(errno));
+ return;
+ }
+
+ bmp_header_write(fd, width, height, bgra, false, true);
+
+ write(fd, buffer, width * height * 4);
+}
+
+void
+bmp_dump32_noflip(char *buffer, unsigned width, unsigned height, bool bgra, const char *filename)
+{
+ int fd;
+
+ fd = open(filename, O_WRONLY| O_TRUNC | O_CREAT, 0666);
+ if (fd == -1) {
+ printf("Failed to open %s: %s\n", filename, strerror(errno));
+ return;
+ }
+
+ bmp_header_write(fd, width, height, bgra, true, true);
+
+ write(fd, buffer, width * height * 4);
+}
+
+void
+bmp_dump32_ex(char *buffer, unsigned width, unsigned height, bool flip, bool bgra, bool alpha, const char *filename)
+{
+ int fd;
+
+ fd = open(filename, O_WRONLY| O_TRUNC | O_CREAT, 0666);
+ if (fd == -1) {
+ printf("Failed to open %s: %s\n", filename, strerror(errno));
+ return;
+ }
+
+ bmp_header_write(fd, width, height, bgra, flip, alpha);
+
+ write(fd, buffer, width * height * 4);
+}
+
diff --git a/src/lib/write_bmp.h b/src/lib/write_bmp.h
new file mode 100644
index 0000000..667fa87
--- /dev/null
+++ b/src/lib/write_bmp.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2011 Luc Verhaegen <libv@codethink.co.uk>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+#ifndef BMP_DUMP_H
+#define BMP_DUMP_H 1
+#include <stdbool.h>
+/* write 32-bit image (y axis upwards) */
+void bmp_dump32(char *buffer, unsigned width, unsigned height, bool bgra, const char *filename);
+/* write 32-bit image (y axis downwards) */
+void bmp_dump32_noflip(char *buffer, unsigned width, unsigned height, bool bgra, const char *filename);
+/* write 32-bit image */
+void bmp_dump32_ex(char *buffer, unsigned width, unsigned height, bool flip, bool bgra, bool alpha, const char *filename);
+
+#endif /* BMP_DUMP_H */
diff --git a/src/minigallium/.gitignore b/src/minigallium/.gitignore
new file mode 100644
index 0000000..91c8ee9
--- /dev/null
+++ b/src/minigallium/.gitignore
@@ -0,0 +1,3 @@
+test
+libminigallium.a
+
diff --git a/src/minigallium/Makefile b/src/minigallium/Makefile
new file mode 100644
index 0000000..92c3454
--- /dev/null
+++ b/src/minigallium/Makefile
@@ -0,0 +1,73 @@
+TOP=..
+
+include $(TOP)/Makefile.inc
+
+COMMON_FLAGS += -Iauxiliary -Iinclude -DDEBUG
+LDFLAGS +=
+GALLIUM_OBJS = auxiliary/tgsi/tgsi_dump.o \
+ auxiliary/tgsi/tgsi_iterate.o \
+ auxiliary/tgsi/tgsi_strings.o \
+ auxiliary/tgsi/tgsi_info.o \
+ auxiliary/tgsi/tgsi_parse.o \
+ auxiliary/tgsi/tgsi_text.o \
+ auxiliary/tgsi/tgsi_build.o \
+ auxiliary/tgsi/tgsi_sanity.o \
+ auxiliary/tgsi/tgsi_ureg.o \
+ auxiliary/tgsi/tgsi_util.o \
+ auxiliary/util/u_blitter.o \
+ auxiliary/util/u_debug.o \
+ auxiliary/util/u_format.o \
+ auxiliary/util/u_format_etc.o \
+ auxiliary/util/u_format_latc.o \
+ auxiliary/util/u_format_other.o \
+ auxiliary/util/u_format_rgtc.o \
+ auxiliary/util/u_format_s3tc.o \
+ auxiliary/util/u_format_srgb.o \
+ auxiliary/util/u_format_table.o \
+ auxiliary/util/u_format_tests.o \
+ auxiliary/util/u_format_yuv.o \
+ auxiliary/util/u_format_zs.o \
+ auxiliary/util/u_surface.o \
+ auxiliary/util/u_tile.o \
+ auxiliary/util/u_transfer.o \
+ auxiliary/util/u_slab.o \
+ auxiliary/util/u_helpers.o \
+ auxiliary/util/u_framebuffer.o \
+ auxiliary/util/u_simple_shaders.o \
+ auxiliary/util/u_bitmask.o \
+ auxiliary/util/u_debug_refcnt.o \
+ auxiliary/util/u_debug_describe.o \
+ auxiliary/util/u_debug_stack.o \
+ auxiliary/util/u_debug_memory.o \
+ auxiliary/util/u_debug_symbol.o \
+ auxiliary/util/u_upload_mgr.o \
+ auxiliary/util/u_draw.o \
+ auxiliary/util/u_draw_quad.o \
+ auxiliary/util/u_hash_table.o \
+ auxiliary/util/u_texture.o \
+ auxiliary/util/u_vbuf.o \
+ auxiliary/util/u_gen_mipmap.o \
+ auxiliary/os/os_misc.o \
+ auxiliary/cso_cache/cso_hash.o \
+ auxiliary/cso_cache/cso_cache.o \
+ auxiliary/cso_cache/cso_context.o \
+ auxiliary/translate/translate.o \
+ auxiliary/translate/translate_cache.o \
+ auxiliary/translate/translate_generic.o \
+ auxiliary/translate/translate_sse.o \
+ targets/graw-null/graw_util.o
+
+TARGETS = libminigallium.a
+
+all: $(TARGETS)
+
+clean:
+ rm -f $(GALLIUM_OBJS)
+ rm -f $(TARGETS) *.o
+
+libminigallium.a: $(GALLIUM_OBJS)
+ $(AR) rcs $@ $^
+
+test: test.o ../driver/etna_asm.o ../driver/etna_shader.o libminigallium.a
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
diff --git a/src/minigallium/README.md b/src/minigallium/README.md
new file mode 100644
index 0000000..bff705c
--- /dev/null
+++ b/src/minigallium/README.md
@@ -0,0 +1,6 @@
+Subset of gallium, for tgsi support, tests and utilities.
+
+Keeping this within `etna_viv` tree for now for easy experimentation.
+
+Based on mesa/gallium commit a1b6e69
+
diff --git a/src/minigallium/auxiliary/cso_cache/cso_cache.c b/src/minigallium/auxiliary/cso_cache/cso_cache.c
new file mode 100644
index 0000000..e276fd1
--- /dev/null
+++ b/src/minigallium/auxiliary/cso_cache/cso_cache.c
@@ -0,0 +1,322 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/* Authors: Zack Rusin <zack@tungstengraphics.com>
+ */
+
+#include "util/u_debug.h"
+
+#include "util/u_memory.h"
+
+#include "cso_cache.h"
+#include "cso_hash.h"
+
+
+struct cso_cache {
+ struct cso_hash *hashes[CSO_CACHE_MAX];
+ int max_size;
+
+ cso_sanitize_callback sanitize_cb;
+ void *sanitize_data;
+};
+
+#if 1
+static unsigned hash_key(const void *key, unsigned key_size)
+{
+ unsigned *ikey = (unsigned *)key;
+ unsigned hash = 0, i;
+
+ assert(key_size % 4 == 0);
+
+ /* I'm sure this can be improved on:
+ */
+ for (i = 0; i < key_size/4; i++)
+ hash ^= ikey[i];
+
+ return hash;
+}
+#else
+static unsigned hash_key(const unsigned char *p, int n)
+{
+ unsigned h = 0;
+ unsigned g;
+
+ while (n--) {
+ h = (h << 4) + *p++;
+ if ((g = (h & 0xf0000000)) != 0)
+ h ^= g >> 23;
+ h &= ~g;
+ }
+ return h;
+}
+#endif
+
+unsigned cso_construct_key(void *item, int item_size)
+{
+ return hash_key((item), item_size);
+}
+
+static INLINE struct cso_hash *_cso_hash_for_type(struct cso_cache *sc, enum cso_cache_type type)
+{
+ struct cso_hash *hash;
+ hash = sc->hashes[type];
+ return hash;
+}
+
+static void delete_blend_state(void *state, void *data)
+{
+ struct cso_blend *cso = (struct cso_blend *)state;
+ if (cso->delete_state)
+ cso->delete_state(cso->context, cso->data);
+ FREE(state);
+}
+
+static void delete_depth_stencil_state(void *state, void *data)
+{
+ struct cso_depth_stencil_alpha *cso = (struct cso_depth_stencil_alpha *)state;
+ if (cso->delete_state)
+ cso->delete_state(cso->context, cso->data);
+ FREE(state);
+}
+
+static void delete_sampler_state(void *state, void *data)
+{
+ struct cso_sampler *cso = (struct cso_sampler *)state;
+ if (cso->delete_state)
+ cso->delete_state(cso->context, cso->data);
+ FREE(state);
+}
+
+static void delete_rasterizer_state(void *state, void *data)
+{
+ struct cso_rasterizer *cso = (struct cso_rasterizer *)state;
+ if (cso->delete_state)
+ cso->delete_state(cso->context, cso->data);
+ FREE(state);
+}
+
+static void delete_velements(void *state, void *data)
+{
+ struct cso_velements *cso = (struct cso_velements *)state;
+ if (cso->delete_state)
+ cso->delete_state(cso->context, cso->data);
+ FREE(state);
+}
+
+static INLINE void delete_cso(void *state, enum cso_cache_type type)
+{
+ switch (type) {
+ case CSO_BLEND:
+ delete_blend_state(state, 0);
+ break;
+ case CSO_SAMPLER:
+ delete_sampler_state(state, 0);
+ break;
+ case CSO_DEPTH_STENCIL_ALPHA:
+ delete_depth_stencil_state(state, 0);
+ break;
+ case CSO_RASTERIZER:
+ delete_rasterizer_state(state, 0);
+ break;
+ case CSO_VELEMENTS:
+ delete_velements(state, 0);
+ break;
+ default:
+ assert(0);
+ FREE(state);
+ }
+}
+
+
+static INLINE void sanitize_hash(struct cso_cache *sc,
+ struct cso_hash *hash,
+ enum cso_cache_type type,
+ int max_size)
+{
+ if (sc->sanitize_cb)
+ sc->sanitize_cb(hash, type, max_size, sc->sanitize_data);
+}
+
+
+static INLINE void sanitize_cb(struct cso_hash *hash, enum cso_cache_type type,
+ int max_size, void *user_data)
+{
+ /* if we're approach the maximum size, remove fourth of the entries
+ * otherwise every subsequent call will go through the same */
+ int hash_size = cso_hash_size(hash);
+ int max_entries = (max_size > hash_size) ? max_size : hash_size;
+ int to_remove = (max_size < max_entries) * max_entries/4;
+ if (hash_size > max_size)
+ to_remove += hash_size - max_size;
+ while (to_remove) {
+ /*remove elements until we're good */
+ /*fixme: currently we pick the nodes to remove at random*/
+ struct cso_hash_iter iter = cso_hash_first_node(hash);
+ void *cso = cso_hash_take(hash, cso_hash_iter_key(iter));
+ delete_cso(cso, type);
+ --to_remove;
+ }
+}
+
+struct cso_hash_iter
+cso_insert_state(struct cso_cache *sc,
+ unsigned hash_key, enum cso_cache_type type,
+ void *state)
+{
+ struct cso_hash *hash = _cso_hash_for_type(sc, type);
+ sanitize_hash(sc, hash, type, sc->max_size);
+
+ return cso_hash_insert(hash, hash_key, state);
+}
+
+struct cso_hash_iter
+cso_find_state(struct cso_cache *sc,
+ unsigned hash_key, enum cso_cache_type type)
+{
+ struct cso_hash *hash = _cso_hash_for_type(sc, type);
+
+ return cso_hash_find(hash, hash_key);
+}
+
+
+void *cso_hash_find_data_from_template( struct cso_hash *hash,
+ unsigned hash_key,
+ void *templ,
+ int size )
+{
+ struct cso_hash_iter iter = cso_hash_find(hash, hash_key);
+ while (!cso_hash_iter_is_null(iter)) {
+ void *iter_data = cso_hash_iter_data(iter);
+ if (!memcmp(iter_data, templ, size)) {
+ /* We found a match
+ */
+ return iter_data;
+ }
+ iter = cso_hash_iter_next(iter);
+ }
+ return NULL;
+}
+
+
+struct cso_hash_iter cso_find_state_template(struct cso_cache *sc,
+ unsigned hash_key, enum cso_cache_type type,
+ void *templ, unsigned size)
+{
+ struct cso_hash_iter iter = cso_find_state(sc, hash_key, type);
+ while (!cso_hash_iter_is_null(iter)) {
+ void *iter_data = cso_hash_iter_data(iter);
+ if (!memcmp(iter_data, templ, size))
+ return iter;
+ iter = cso_hash_iter_next(iter);
+ }
+ return iter;
+}
+
+void * cso_take_state(struct cso_cache *sc,
+ unsigned hash_key, enum cso_cache_type type)
+{
+ struct cso_hash *hash = _cso_hash_for_type(sc, type);
+ return cso_hash_take(hash, hash_key);
+}
+
+struct cso_cache *cso_cache_create(void)
+{
+ struct cso_cache *sc = MALLOC_STRUCT(cso_cache);
+ int i;
+ if (sc == NULL)
+ return NULL;
+
+ sc->max_size = 4096;
+ for (i = 0; i < CSO_CACHE_MAX; i++)
+ sc->hashes[i] = cso_hash_create();
+
+ sc->sanitize_cb = sanitize_cb;
+ sc->sanitize_data = 0;
+
+ return sc;
+}
+
+void cso_for_each_state(struct cso_cache *sc, enum cso_cache_type type,
+ cso_state_callback func, void *user_data)
+{
+ struct cso_hash *hash = _cso_hash_for_type(sc, type);
+ struct cso_hash_iter iter;
+
+ iter = cso_hash_first_node(hash);
+ while (!cso_hash_iter_is_null(iter)) {
+ void *state = cso_hash_iter_data(iter);
+ iter = cso_hash_iter_next(iter);
+ if (state) {
+ func(state, user_data);
+ }
+ }
+}
+
+void cso_cache_delete(struct cso_cache *sc)
+{
+ int i;
+ assert(sc);
+
+ if (!sc)
+ return;
+
+ /* delete driver data */
+ cso_for_each_state(sc, CSO_BLEND, delete_blend_state, 0);
+ cso_for_each_state(sc, CSO_DEPTH_STENCIL_ALPHA, delete_depth_stencil_state, 0);
+ cso_for_each_state(sc, CSO_RASTERIZER, delete_rasterizer_state, 0);
+ cso_for_each_state(sc, CSO_SAMPLER, delete_sampler_state, 0);
+ cso_for_each_state(sc, CSO_VELEMENTS, delete_velements, 0);
+
+ for (i = 0; i < CSO_CACHE_MAX; i++)
+ cso_hash_delete(sc->hashes[i]);
+
+ FREE(sc);
+}
+
+void cso_set_maximum_cache_size(struct cso_cache *sc, int number)
+{
+ int i;
+
+ sc->max_size = number;
+
+ for (i = 0; i < CSO_CACHE_MAX; i++)
+ sanitize_hash(sc, sc->hashes[i], i, sc->max_size);
+}
+
+int cso_maximum_cache_size(const struct cso_cache *sc)
+{
+ return sc->max_size;
+}
+
+void cso_cache_set_sanitize_callback(struct cso_cache *sc,
+ cso_sanitize_callback cb,
+ void *user_data)
+{
+ sc->sanitize_cb = cb;
+ sc->sanitize_data = user_data;
+}
+
diff --git a/src/minigallium/auxiliary/cso_cache/cso_cache.h b/src/minigallium/auxiliary/cso_cache/cso_cache.h
new file mode 100644
index 0000000..cc1f1c0
--- /dev/null
+++ b/src/minigallium/auxiliary/cso_cache/cso_cache.h
@@ -0,0 +1,175 @@
+/**************************************************************************
+ *
+ * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+ /**
+ * @file
+ * Constant State Object (CSO) cache.
+ *
+ * The basic idea is that the states are created via the
+ * create_state/bind_state/delete_state semantics. The driver is expected to
+ * perform as much of the Gallium state translation to whatever its internal
+ * representation is during the create call. Gallium then has a caching
+ * mechanism where it stores the created states. When the pipeline needs an
+ * actual state change, a bind call is issued. In the bind call the driver
+ * gets its already translated representation.
+ *
+ * Those semantics mean that the driver doesn't do the repeated translations
+ * of states on every frame, but only once, when a new state is actually
+ * created.
+ *
+ * Even on hardware that doesn't do any kind of state cache, it makes the
+ * driver look a lot neater, plus it avoids all the redundant state
+ * translations on every frame.
+ *
+ * Currently our constant state objects are:
+ * - alpha test
+ * - blend
+ * - depth stencil
+ * - fragment shader
+ * - rasterizer (old setup)
+ * - sampler
+ * - vertex shader
+ * - vertex elements
+ *
+ * Things that are not constant state objects include:
+ * - blend_color
+ * - clip_state
+ * - clear_color_state
+ * - constant_buffer
+ * - feedback_state
+ * - framebuffer_state
+ * - polygon_stipple
+ * - scissor_state
+ * - texture_state
+ * - viewport_state
+ *
+ * @author Zack Rusin <zack@tungstengraphics.com>
+ */
+
+#ifndef CSO_CACHE_H
+#define CSO_CACHE_H
+
+#include "pipe/p_context.h"
+#include "pipe/p_state.h"
+
+/* cso_hash.h is necessary for cso_hash_iter, as MSVC requires structures
+ * returned by value to be fully defined */
+#include "cso_hash.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum cso_cache_type {
+ CSO_RASTERIZER,
+ CSO_BLEND,
+ CSO_DEPTH_STENCIL_ALPHA,
+ CSO_SAMPLER,
+ CSO_VELEMENTS,
+ CSO_CACHE_MAX,
+};
+
+typedef void (*cso_state_callback)(void *ctx, void *obj);
+
+typedef void (*cso_sanitize_callback)(struct cso_hash *hash,
+ enum cso_cache_type type,
+ int max_size,
+ void *user_data);
+
+struct cso_cache;
+
+struct cso_blend {
+ struct pipe_blend_state state;
+ void *data;
+ cso_state_callback delete_state;
+ struct pipe_context *context;
+};
+
+struct cso_depth_stencil_alpha {
+ struct pipe_depth_stencil_alpha_state state;
+ void *data;
+ cso_state_callback delete_state;
+ struct pipe_context *context;
+};
+
+struct cso_rasterizer {
+ struct pipe_rasterizer_state state;
+ void *data;
+ cso_state_callback delete_state;
+ struct pipe_context *context;
+};
+
+struct cso_sampler {
+ struct pipe_sampler_state state;
+ void *data;
+ cso_state_callback delete_state;
+ struct pipe_context *context;
+};
+
+struct cso_velems_state {
+ unsigned count;
+ struct pipe_vertex_element velems[PIPE_MAX_ATTRIBS];
+};
+
+struct cso_velements {
+ struct cso_velems_state state;
+ void *data;
+ cso_state_callback delete_state;
+ struct pipe_context *context;
+};
+
+unsigned cso_construct_key(void *item, int item_size);
+
+struct cso_cache *cso_cache_create(void);
+void cso_cache_delete(struct cso_cache *sc);
+
+void cso_cache_set_sanitize_callback(struct cso_cache *sc,
+ cso_sanitize_callback cb,
+ void *user_data);
+
+struct cso_hash_iter cso_insert_state(struct cso_cache *sc,
+ unsigned hash_key, enum cso_cache_type type,
+ void *state);
+struct cso_hash_iter cso_find_state(struct cso_cache *sc,
+ unsigned hash_key, enum cso_cache_type type);
+struct cso_hash_iter cso_find_state_template(struct cso_cache *sc,
+ unsigned hash_key, enum cso_cache_type type,
+ void *templ, unsigned size);
+void cso_for_each_state(struct cso_cache *sc, enum cso_cache_type type,
+ cso_state_callback func, void *user_data);
+void * cso_take_state(struct cso_cache *sc, unsigned hash_key,
+ enum cso_cache_type type);
+
+void cso_set_maximum_cache_size(struct cso_cache *sc, int number);
+int cso_maximum_cache_size(const struct cso_cache *sc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/minigallium/auxiliary/cso_cache/cso_context.c b/src/minigallium/auxiliary/cso_cache/cso_context.c
new file mode 100644
index 0000000..6805427
--- /dev/null
+++ b/src/minigallium/auxiliary/cso_cache/cso_context.c
@@ -0,0 +1,1431 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+ /**
+ * @file
+ *
+ * Wrap the cso cache & hash mechanisms in a simplified
+ * pipe-driver-specific interface.
+ *
+ * @author Zack Rusin <zack@tungstengraphics.com>
+ * @author Keith Whitwell <keith@tungstengraphics.com>
+ */
+
+#include "pipe/p_state.h"
+#include "util/u_draw.h"
+#include "util/u_framebuffer.h"
+#include "util/u_inlines.h"
+#include "util/u_math.h"
+#include "util/u_memory.h"
+#include "util/u_vbuf.h"
+#include "tgsi/tgsi_parse.h"
+
+#include "cso_cache/cso_context.h"
+#include "cso_cache/cso_cache.h"
+#include "cso_cache/cso_hash.h"
+#include "cso_context.h"
+
+
+/**
+ * Info related to samplers and sampler views.
+ * We have one of these for fragment samplers and another for vertex samplers.
+ */
+struct sampler_info
+{
+ struct {
+ void *samplers[PIPE_MAX_SAMPLERS];
+ unsigned nr_samplers;
+ } hw;
+
+ void *samplers[PIPE_MAX_SAMPLERS];
+ unsigned nr_samplers;
+
+ void *samplers_saved[PIPE_MAX_SAMPLERS];
+ unsigned nr_samplers_saved;
+
+ struct pipe_sampler_view *views[PIPE_MAX_SAMPLERS];
+ unsigned nr_views;
+
+ struct pipe_sampler_view *views_saved[PIPE_MAX_SAMPLERS];
+ unsigned nr_views_saved;
+};
+
+
+
+struct cso_context {
+ struct pipe_context *pipe;
+ struct cso_cache *cache;
+ struct u_vbuf *vbuf;
+
+ boolean has_geometry_shader;
+ boolean has_streamout;
+
+ struct sampler_info samplers[PIPE_SHADER_TYPES];
+
+ struct pipe_vertex_buffer aux_vertex_buffer_current;
+ struct pipe_vertex_buffer aux_vertex_buffer_saved;
+ unsigned aux_vertex_buffer_index;
+
+ struct pipe_constant_buffer aux_constbuf_current[PIPE_SHADER_TYPES];
+ struct pipe_constant_buffer aux_constbuf_saved[PIPE_SHADER_TYPES];
+
+ unsigned nr_so_targets;
+ struct pipe_stream_output_target *so_targets[PIPE_MAX_SO_BUFFERS];
+
+ unsigned nr_so_targets_saved;
+ struct pipe_stream_output_target *so_targets_saved[PIPE_MAX_SO_BUFFERS];
+
+ /** Current and saved state.
+ * The saved state is used as a 1-deep stack.
+ */
+ void *blend, *blend_saved;
+ void *depth_stencil, *depth_stencil_saved;
+ void *rasterizer, *rasterizer_saved;
+ void *fragment_shader, *fragment_shader_saved;
+ void *vertex_shader, *vertex_shader_saved;
+ void *geometry_shader, *geometry_shader_saved;
+ void *velements, *velements_saved;
+ struct pipe_query *render_condition, *render_condition_saved;
+ uint render_condition_mode, render_condition_mode_saved;
+ boolean render_condition_cond, render_condition_cond_saved;
+
+ struct pipe_clip_state clip;
+ struct pipe_clip_state clip_saved;
+
+ struct pipe_framebuffer_state fb, fb_saved;
+ struct pipe_viewport_state vp, vp_saved;
+ struct pipe_blend_color blend_color;
+ unsigned sample_mask, sample_mask_saved;
+ struct pipe_stencil_ref stencil_ref, stencil_ref_saved;
+};
+
+
+static boolean delete_blend_state(struct cso_context *ctx, void *state)
+{
+ struct cso_blend *cso = (struct cso_blend *)state;
+
+ if (ctx->blend == cso->data)
+ return FALSE;
+
+ if (cso->delete_state)
+ cso->delete_state(cso->context, cso->data);
+ FREE(state);
+ return TRUE;
+}
+
+static boolean delete_depth_stencil_state(struct cso_context *ctx, void *state)
+{
+ struct cso_depth_stencil_alpha *cso =
+ (struct cso_depth_stencil_alpha *)state;
+
+ if (ctx->depth_stencil == cso->data)
+ return FALSE;
+
+ if (cso->delete_state)
+ cso->delete_state(cso->context, cso->data);
+ FREE(state);
+
+ return TRUE;
+}
+
+static boolean delete_sampler_state(struct cso_context *ctx, void *state)
+{
+ struct cso_sampler *cso = (struct cso_sampler *)state;
+ if (cso->delete_state)
+ cso->delete_state(cso->context, cso->data);
+ FREE(state);
+ return TRUE;
+}
+
+static boolean delete_rasterizer_state(struct cso_context *ctx, void *state)
+{
+ struct cso_rasterizer *cso = (struct cso_rasterizer *)state;
+
+ if (ctx->rasterizer == cso->data)
+ return FALSE;
+ if (cso->delete_state)
+ cso->delete_state(cso->context, cso->data);
+ FREE(state);
+ return TRUE;
+}
+
+static boolean delete_vertex_elements(struct cso_context *ctx,
+ void *state)
+{
+ struct cso_velements *cso = (struct cso_velements *)state;
+
+ if (ctx->velements == cso->data)
+ return FALSE;
+
+ if (cso->delete_state)
+ cso->delete_state(cso->context, cso->data);
+ FREE(state);
+ return TRUE;
+}
+
+
+static INLINE boolean delete_cso(struct cso_context *ctx,
+ void *state, enum cso_cache_type type)
+{
+ switch (type) {
+ case CSO_BLEND:
+ return delete_blend_state(ctx, state);
+ case CSO_SAMPLER:
+ return delete_sampler_state(ctx, state);
+ case CSO_DEPTH_STENCIL_ALPHA:
+ return delete_depth_stencil_state(ctx, state);
+ case CSO_RASTERIZER:
+ return delete_rasterizer_state(ctx, state);
+ case CSO_VELEMENTS:
+ return delete_vertex_elements(ctx, state);
+ default:
+ assert(0);
+ FREE(state);
+ }
+ return FALSE;
+}
+
+static INLINE void
+sanitize_hash(struct cso_hash *hash, enum cso_cache_type type,
+ int max_size, void *user_data)
+{
+ struct cso_context *ctx = (struct cso_context *)user_data;
+ /* if we're approach the maximum size, remove fourth of the entries
+ * otherwise every subsequent call will go through the same */
+ int hash_size = cso_hash_size(hash);
+ int max_entries = (max_size > hash_size) ? max_size : hash_size;
+ int to_remove = (max_size < max_entries) * max_entries/4;
+ struct cso_hash_iter iter = cso_hash_first_node(hash);
+ if (hash_size > max_size)
+ to_remove += hash_size - max_size;
+ while (to_remove) {
+ /*remove elements until we're good */
+ /*fixme: currently we pick the nodes to remove at random*/
+ void *cso = cso_hash_iter_data(iter);
+ if (delete_cso(ctx, cso, type)) {
+ iter = cso_hash_erase(hash, iter);
+ --to_remove;
+ } else
+ iter = cso_hash_iter_next(iter);
+ }
+}
+
+static void cso_init_vbuf(struct cso_context *cso)
+{
+ struct u_vbuf_caps caps;
+
+ u_vbuf_get_caps(cso->pipe->screen, &caps);
+
+ /* Install u_vbuf if there is anything unsupported. */
+ if (!caps.buffer_offset_unaligned ||
+ !caps.buffer_stride_unaligned ||
+ !caps.velem_src_offset_unaligned ||
+ !caps.format_fixed32 ||
+ !caps.format_float16 ||
+ !caps.format_float64 ||
+ !caps.format_norm32 ||
+ !caps.format_scaled32 ||
+ !caps.user_vertex_buffers) {
+ cso->vbuf = u_vbuf_create(cso->pipe, &caps,
+ cso->aux_vertex_buffer_index);
+ }
+}
+
+struct cso_context *cso_create_context( struct pipe_context *pipe )
+{
+ struct cso_context *ctx = CALLOC_STRUCT(cso_context);
+ if (ctx == NULL)
+ goto out;
+
+ ctx->cache = cso_cache_create();
+ if (ctx->cache == NULL)
+ goto out;
+ cso_cache_set_sanitize_callback(ctx->cache,
+ sanitize_hash,
+ ctx);
+
+ ctx->pipe = pipe;
+ ctx->sample_mask_saved = ~0;
+
+ ctx->aux_vertex_buffer_index = 0; /* 0 for now */
+
+ cso_init_vbuf(ctx);
+
+ /* Enable for testing: */
+ if (0) cso_set_maximum_cache_size( ctx->cache, 4 );
+
+ if (pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_GEOMETRY,
+ PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) {
+ ctx->has_geometry_shader = TRUE;
+ }
+ if (pipe->screen->get_param(pipe->screen,
+ PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS) != 0) {
+ ctx->has_streamout = TRUE;
+ }
+
+ return ctx;
+
+out:
+ cso_destroy_context( ctx );
+ return NULL;
+}
+
+/**
+ * Prior to context destruction, this function unbinds all state objects.
+ */
+void cso_release_all( struct cso_context *ctx )
+{
+ unsigned i, shader;
+
+ if (ctx->pipe) {
+ ctx->pipe->bind_blend_state( ctx->pipe, NULL );
+ ctx->pipe->bind_rasterizer_state( ctx->pipe, NULL );
+ ctx->pipe->bind_fragment_sampler_states( ctx->pipe, 0, NULL );
+ if (ctx->pipe->bind_vertex_sampler_states)
+ ctx->pipe->bind_vertex_sampler_states(ctx->pipe, 0, NULL);
+ ctx->pipe->bind_depth_stencil_alpha_state( ctx->pipe, NULL );
+ ctx->pipe->bind_fs_state( ctx->pipe, NULL );
+ ctx->pipe->bind_vs_state( ctx->pipe, NULL );
+ ctx->pipe->bind_vertex_elements_state( ctx->pipe, NULL );
+ ctx->pipe->set_fragment_sampler_views(ctx->pipe, 0, NULL);
+ if (ctx->pipe->set_vertex_sampler_views)
+ ctx->pipe->set_vertex_sampler_views(ctx->pipe, 0, NULL);
+ if (ctx->pipe->set_stream_output_targets)
+ ctx->pipe->set_stream_output_targets(ctx->pipe, 0, NULL, 0);
+ }
+
+ /* free fragment samplers, views */
+ for (shader = 0; shader < Elements(ctx->samplers); shader++) {
+ struct sampler_info *info = &ctx->samplers[shader];
+ for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
+ pipe_sampler_view_reference(&info->views[i], NULL);
+ pipe_sampler_view_reference(&info->views_saved[i], NULL);
+ }
+ }
+
+ util_unreference_framebuffer_state(&ctx->fb);
+ util_unreference_framebuffer_state(&ctx->fb_saved);
+
+ pipe_resource_reference(&ctx->aux_vertex_buffer_current.buffer, NULL);
+ pipe_resource_reference(&ctx->aux_vertex_buffer_saved.buffer, NULL);
+
+ for (i = 0; i < PIPE_SHADER_TYPES; i++) {
+ pipe_resource_reference(&ctx->aux_constbuf_current[i].buffer, NULL);
+ pipe_resource_reference(&ctx->aux_constbuf_saved[i].buffer, NULL);
+ }
+
+ for (i = 0; i < PIPE_MAX_SO_BUFFERS; i++) {
+ pipe_so_target_reference(&ctx->so_targets[i], NULL);
+ pipe_so_target_reference(&ctx->so_targets_saved[i], NULL);
+ }
+
+ if (ctx->cache) {
+ cso_cache_delete( ctx->cache );
+ ctx->cache = NULL;
+ }
+}
+
+
+/**
+ * Free the CSO context. NOTE: the state tracker should have previously called
+ * cso_release_all().
+ */
+void cso_destroy_context( struct cso_context *ctx )
+{
+ if (ctx) {
+ if (ctx->vbuf)
+ u_vbuf_destroy(ctx->vbuf);
+ FREE( ctx );
+ }
+}
+
+
+/* Those function will either find the state of the given template
+ * in the cache or they will create a new state from the given
+ * template, insert it in the cache and return it.
+ */
+
+/*
+ * If the driver returns 0 from the create method then they will assign
+ * the data member of the cso to be the template itself.
+ */
+
+enum pipe_error cso_set_blend(struct cso_context *ctx,
+ const struct pipe_blend_state *templ)
+{
+ unsigned key_size, hash_key;
+ struct cso_hash_iter iter;
+ void *handle;
+
+ key_size = templ->independent_blend_enable ?
+ sizeof(struct pipe_blend_state) :
+ (char *)&(templ->rt[1]) - (char *)templ;
+ hash_key = cso_construct_key((void*)templ, key_size);
+ iter = cso_find_state_template(ctx->cache, hash_key, CSO_BLEND,
+ (void*)templ, key_size);
+
+ if (cso_hash_iter_is_null(iter)) {
+ struct cso_blend *cso = MALLOC(sizeof(struct cso_blend));
+ if (!cso)
+ return PIPE_ERROR_OUT_OF_MEMORY;
+
+ memset(&cso->state, 0, sizeof cso->state);
+ memcpy(&cso->state, templ, key_size);
+ cso->data = ctx->pipe->create_blend_state(ctx->pipe, &cso->state);
+ cso->delete_state = (cso_state_callback)ctx->pipe->delete_blend_state;
+ cso->context = ctx->pipe;
+
+ iter = cso_insert_state(ctx->cache, hash_key, CSO_BLEND, cso);
+ if (cso_hash_iter_is_null(iter)) {
+ FREE(cso);
+ return PIPE_ERROR_OUT_OF_MEMORY;
+ }
+
+ handle = cso->data;
+ }
+ else {
+ handle = ((struct cso_blend *)cso_hash_iter_data(iter))->data;
+ }
+
+ if (ctx->blend != handle) {
+ ctx->blend = handle;
+ ctx->pipe->bind_blend_state(ctx->pipe, handle);
+ }
+ return PIPE_OK;
+}
+
+void cso_save_blend(struct cso_context *ctx)
+{
+ assert(!ctx->blend_saved);
+ ctx->blend_saved = ctx->blend;
+}
+
+void cso_restore_blend(struct cso_context *ctx)
+{
+ if (ctx->blend != ctx->blend_saved) {
+ ctx->blend = ctx->blend_saved;
+ ctx->pipe->bind_blend_state(ctx->pipe, ctx->blend_saved);
+ }
+ ctx->blend_saved = NULL;
+}
+
+
+
+enum pipe_error
+cso_set_depth_stencil_alpha(struct cso_context *ctx,
+ const struct pipe_depth_stencil_alpha_state *templ)
+{
+ unsigned key_size = sizeof(struct pipe_depth_stencil_alpha_state);
+ unsigned hash_key = cso_construct_key((void*)templ, key_size);
+ struct cso_hash_iter iter = cso_find_state_template(ctx->cache,
+ hash_key,
+ CSO_DEPTH_STENCIL_ALPHA,
+ (void*)templ, key_size);
+ void *handle;
+
+ if (cso_hash_iter_is_null(iter)) {
+ struct cso_depth_stencil_alpha *cso =
+ MALLOC(sizeof(struct cso_depth_stencil_alpha));
+ if (!cso)
+ return PIPE_ERROR_OUT_OF_MEMORY;
+
+ memcpy(&cso->state, templ, sizeof(*templ));
+ cso->data = ctx->pipe->create_depth_stencil_alpha_state(ctx->pipe,
+ &cso->state);
+ cso->delete_state =
+ (cso_state_callback)ctx->pipe->delete_depth_stencil_alpha_state;
+ cso->context = ctx->pipe;
+
+ iter = cso_insert_state(ctx->cache, hash_key,
+ CSO_DEPTH_STENCIL_ALPHA, cso);
+ if (cso_hash_iter_is_null(iter)) {
+ FREE(cso);
+ return PIPE_ERROR_OUT_OF_MEMORY;
+ }
+
+ handle = cso->data;
+ }
+ else {
+ handle = ((struct cso_depth_stencil_alpha *)
+ cso_hash_iter_data(iter))->data;
+ }
+
+ if (ctx->depth_stencil != handle) {
+ ctx->depth_stencil = handle;
+ ctx->pipe->bind_depth_stencil_alpha_state(ctx->pipe, handle);
+ }
+ return PIPE_OK;
+}
+
+void cso_save_depth_stencil_alpha(struct cso_context *ctx)
+{
+ assert(!ctx->depth_stencil_saved);
+ ctx->depth_stencil_saved = ctx->depth_stencil;
+}
+
+void cso_restore_depth_stencil_alpha(struct cso_context *ctx)
+{
+ if (ctx->depth_stencil != ctx->depth_stencil_saved) {
+ ctx->depth_stencil = ctx->depth_stencil_saved;
+ ctx->pipe->bind_depth_stencil_alpha_state(ctx->pipe,
+ ctx->depth_stencil_saved);
+ }
+ ctx->depth_stencil_saved = NULL;
+}
+
+
+
+enum pipe_error cso_set_rasterizer(struct cso_context *ctx,
+ const struct pipe_rasterizer_state *templ)
+{
+ unsigned key_size = sizeof(struct pipe_rasterizer_state);
+ unsigned hash_key = cso_construct_key((void*)templ, key_size);
+ struct cso_hash_iter iter = cso_find_state_template(ctx->cache,
+ hash_key,
+ CSO_RASTERIZER,
+ (void*)templ, key_size);
+ void *handle = NULL;
+
+ if (cso_hash_iter_is_null(iter)) {
+ struct cso_rasterizer *cso = MALLOC(sizeof(struct cso_rasterizer));
+ if (!cso)
+ return PIPE_ERROR_OUT_OF_MEMORY;
+
+ memcpy(&cso->state, templ, sizeof(*templ));
+ cso->data = ctx->pipe->create_rasterizer_state(ctx->pipe, &cso->state);
+ cso->delete_state =
+ (cso_state_callback)ctx->pipe->delete_rasterizer_state;
+ cso->context = ctx->pipe;
+
+ iter = cso_insert_state(ctx->cache, hash_key, CSO_RASTERIZER, cso);
+ if (cso_hash_iter_is_null(iter)) {
+ FREE(cso);
+ return PIPE_ERROR_OUT_OF_MEMORY;
+ }
+
+ handle = cso->data;
+ }
+ else {
+ handle = ((struct cso_rasterizer *)cso_hash_iter_data(iter))->data;
+ }
+
+ if (ctx->rasterizer != handle) {
+ ctx->rasterizer = handle;
+ ctx->pipe->bind_rasterizer_state(ctx->pipe, handle);
+ }
+ return PIPE_OK;
+}
+
+void cso_save_rasterizer(struct cso_context *ctx)
+{
+ assert(!ctx->rasterizer_saved);
+ ctx->rasterizer_saved = ctx->rasterizer;
+}
+
+void cso_restore_rasterizer(struct cso_context *ctx)
+{
+ if (ctx->rasterizer != ctx->rasterizer_saved) {
+ ctx->rasterizer = ctx->rasterizer_saved;
+ ctx->pipe->bind_rasterizer_state(ctx->pipe, ctx->rasterizer_saved);
+ }
+ ctx->rasterizer_saved = NULL;
+}
+
+
+void cso_set_fragment_shader_handle(struct cso_context *ctx, void *handle )
+{
+ if (ctx->fragment_shader != handle) {
+ ctx->fragment_shader = handle;
+ ctx->pipe->bind_fs_state(ctx->pipe, handle);
+ }
+}
+
+void cso_delete_fragment_shader(struct cso_context *ctx, void *handle )
+{
+ if (handle == ctx->fragment_shader) {
+ /* unbind before deleting */
+ ctx->pipe->bind_fs_state(ctx->pipe, NULL);
+ ctx->fragment_shader = NULL;
+ }
+ ctx->pipe->delete_fs_state(ctx->pipe, handle);
+}
+
+void cso_save_fragment_shader(struct cso_context *ctx)
+{
+ assert(!ctx->fragment_shader_saved);
+ ctx->fragment_shader_saved = ctx->fragment_shader;
+}
+
+void cso_restore_fragment_shader(struct cso_context *ctx)
+{
+ if (ctx->fragment_shader_saved != ctx->fragment_shader) {
+ ctx->pipe->bind_fs_state(ctx->pipe, ctx->fragment_shader_saved);
+ ctx->fragment_shader = ctx->fragment_shader_saved;
+ }
+ ctx->fragment_shader_saved = NULL;
+}
+
+
+void cso_set_vertex_shader_handle(struct cso_context *ctx, void *handle)
+{
+ if (ctx->vertex_shader != handle) {
+ ctx->vertex_shader = handle;
+ ctx->pipe->bind_vs_state(ctx->pipe, handle);
+ }
+}
+
+void cso_delete_vertex_shader(struct cso_context *ctx, void *handle )
+{
+ if (handle == ctx->vertex_shader) {
+ /* unbind before deleting */
+ ctx->pipe->bind_vs_state(ctx->pipe, NULL);
+ ctx->vertex_shader = NULL;
+ }
+ ctx->pipe->delete_vs_state(ctx->pipe, handle);
+}
+
+void cso_save_vertex_shader(struct cso_context *ctx)
+{
+ assert(!ctx->vertex_shader_saved);
+ ctx->vertex_shader_saved = ctx->vertex_shader;
+}
+
+void cso_restore_vertex_shader(struct cso_context *ctx)
+{
+ if (ctx->vertex_shader_saved != ctx->vertex_shader) {
+ ctx->pipe->bind_vs_state(ctx->pipe, ctx->vertex_shader_saved);
+ ctx->vertex_shader = ctx->vertex_shader_saved;
+ }
+ ctx->vertex_shader_saved = NULL;
+}
+
+
+void cso_set_framebuffer(struct cso_context *ctx,
+ const struct pipe_framebuffer_state *fb)
+{
+ if (memcmp(&ctx->fb, fb, sizeof(*fb)) != 0) {
+ util_copy_framebuffer_state(&ctx->fb, fb);
+ ctx->pipe->set_framebuffer_state(ctx->pipe, fb);
+ }
+}
+
+void cso_save_framebuffer(struct cso_context *ctx)
+{
+ util_copy_framebuffer_state(&ctx->fb_saved, &ctx->fb);
+}
+
+void cso_restore_framebuffer(struct cso_context *ctx)
+{
+ if (memcmp(&ctx->fb, &ctx->fb_saved, sizeof(ctx->fb))) {
+ util_copy_framebuffer_state(&ctx->fb, &ctx->fb_saved);
+ ctx->pipe->set_framebuffer_state(ctx->pipe, &ctx->fb);
+ util_unreference_framebuffer_state(&ctx->fb_saved);
+ }
+}
+
+
+void cso_set_viewport(struct cso_context *ctx,
+ const struct pipe_viewport_state *vp)
+{
+ if (memcmp(&ctx->vp, vp, sizeof(*vp))) {
+ ctx->vp = *vp;
+ ctx->pipe->set_viewport_states(ctx->pipe, 0, 1, vp);
+ }
+}
+
+void cso_save_viewport(struct cso_context *ctx)
+{
+ ctx->vp_saved = ctx->vp;
+}
+
+
+void cso_restore_viewport(struct cso_context *ctx)
+{
+ if (memcmp(&ctx->vp, &ctx->vp_saved, sizeof(ctx->vp))) {
+ ctx->vp = ctx->vp_saved;
+ ctx->pipe->set_viewport_states(ctx->pipe, 0, 1, &ctx->vp);
+ }
+}
+
+
+void cso_set_blend_color(struct cso_context *ctx,
+ const struct pipe_blend_color *bc)
+{
+ if (memcmp(&ctx->blend_color, bc, sizeof(ctx->blend_color))) {
+ ctx->blend_color = *bc;
+ ctx->pipe->set_blend_color(ctx->pipe, bc);
+ }
+}
+
+void cso_set_sample_mask(struct cso_context *ctx, unsigned sample_mask)
+{
+ if (ctx->sample_mask != sample_mask) {
+ ctx->sample_mask = sample_mask;
+ ctx->pipe->set_sample_mask(ctx->pipe, sample_mask);
+ }
+}
+
+void cso_save_sample_mask(struct cso_context *ctx)
+{
+ ctx->sample_mask_saved = ctx->sample_mask;
+}
+
+void cso_restore_sample_mask(struct cso_context *ctx)
+{
+ cso_set_sample_mask(ctx, ctx->sample_mask_saved);
+}
+
+void cso_set_stencil_ref(struct cso_context *ctx,
+ const struct pipe_stencil_ref *sr)
+{
+ if (memcmp(&ctx->stencil_ref, sr, sizeof(ctx->stencil_ref))) {
+ ctx->stencil_ref = *sr;
+ ctx->pipe->set_stencil_ref(ctx->pipe, sr);
+ }
+}
+
+void cso_save_stencil_ref(struct cso_context *ctx)
+{
+ ctx->stencil_ref_saved = ctx->stencil_ref;
+}
+
+
+void cso_restore_stencil_ref(struct cso_context *ctx)
+{
+ if (memcmp(&ctx->stencil_ref, &ctx->stencil_ref_saved,
+ sizeof(ctx->stencil_ref))) {
+ ctx->stencil_ref = ctx->stencil_ref_saved;
+ ctx->pipe->set_stencil_ref(ctx->pipe, &ctx->stencil_ref);
+ }
+}
+
+void cso_set_render_condition(struct cso_context *ctx,
+ struct pipe_query *query,
+ boolean condition, uint mode)
+{
+ struct pipe_context *pipe = ctx->pipe;
+
+ if (ctx->render_condition != query ||
+ ctx->render_condition_mode != mode ||
+ ctx->render_condition_cond != condition) {
+ pipe->render_condition(pipe, query, condition, mode);
+ ctx->render_condition = query;
+ ctx->render_condition_cond = condition;
+ ctx->render_condition_mode = mode;
+ }
+}
+
+void cso_save_render_condition(struct cso_context *ctx)
+{
+ ctx->render_condition_saved = ctx->render_condition;
+ ctx->render_condition_cond_saved = ctx->render_condition_cond;
+ ctx->render_condition_mode_saved = ctx->render_condition_mode;
+}
+
+void cso_restore_render_condition(struct cso_context *ctx)
+{
+ cso_set_render_condition(ctx, ctx->render_condition_saved,
+ ctx->render_condition_cond_saved,
+ ctx->render_condition_mode_saved);
+}
+
+void cso_set_geometry_shader_handle(struct cso_context *ctx, void *handle)
+{
+ assert(ctx->has_geometry_shader || !handle);
+
+ if (ctx->has_geometry_shader && ctx->geometry_shader != handle) {
+ ctx->geometry_shader = handle;
+ ctx->pipe->bind_gs_state(ctx->pipe, handle);
+ }
+}
+
+void cso_delete_geometry_shader(struct cso_context *ctx, void *handle)
+{
+ if (handle == ctx->geometry_shader) {
+ /* unbind before deleting */
+ ctx->pipe->bind_gs_state(ctx->pipe, NULL);
+ ctx->geometry_shader = NULL;
+ }
+ ctx->pipe->delete_gs_state(ctx->pipe, handle);
+}
+
+void cso_save_geometry_shader(struct cso_context *ctx)
+{
+ if (!ctx->has_geometry_shader) {
+ return;
+ }
+
+ assert(!ctx->geometry_shader_saved);
+ ctx->geometry_shader_saved = ctx->geometry_shader;
+}
+
+void cso_restore_geometry_shader(struct cso_context *ctx)
+{
+ if (!ctx->has_geometry_shader) {
+ return;
+ }
+
+ if (ctx->geometry_shader_saved != ctx->geometry_shader) {
+ ctx->pipe->bind_gs_state(ctx->pipe, ctx->geometry_shader_saved);
+ ctx->geometry_shader = ctx->geometry_shader_saved;
+ }
+ ctx->geometry_shader_saved = NULL;
+}
+
+/* clip state */
+
+static INLINE void
+clip_state_cpy(struct pipe_clip_state *dst,
+ const struct pipe_clip_state *src)
+{
+ memcpy(dst->ucp, src->ucp, sizeof(dst->ucp));
+}
+
+static INLINE int
+clip_state_cmp(const struct pipe_clip_state *a,
+ const struct pipe_clip_state *b)
+{
+ return memcmp(a->ucp, b->ucp, sizeof(a->ucp));
+}
+
+void
+cso_set_clip(struct cso_context *ctx,
+ const struct pipe_clip_state *clip)
+{
+ if (clip_state_cmp(&ctx->clip, clip)) {
+ clip_state_cpy(&ctx->clip, clip);
+ ctx->pipe->set_clip_state(ctx->pipe, clip);
+ }
+}
+
+void
+cso_save_clip(struct cso_context *ctx)
+{
+ clip_state_cpy(&ctx->clip_saved, &ctx->clip);
+}
+
+void
+cso_restore_clip(struct cso_context *ctx)
+{
+ if (clip_state_cmp(&ctx->clip, &ctx->clip_saved)) {
+ clip_state_cpy(&ctx->clip, &ctx->clip_saved);
+ ctx->pipe->set_clip_state(ctx->pipe, &ctx->clip_saved);
+ }
+}
+
+enum pipe_error
+cso_set_vertex_elements(struct cso_context *ctx,
+ unsigned count,
+ const struct pipe_vertex_element *states)
+{
+ struct u_vbuf *vbuf = ctx->vbuf;
+ unsigned key_size, hash_key;
+ struct cso_hash_iter iter;
+ void *handle;
+ struct cso_velems_state velems_state;
+
+ if (vbuf) {
+ u_vbuf_set_vertex_elements(vbuf, count, states);
+ return PIPE_OK;
+ }
+
+ /* Need to include the count into the stored state data too.
+ * Otherwise first few count pipe_vertex_elements could be identical
+ * even if count is different, and there's no guarantee the hash would
+ * be different in that case neither.
+ */
+ key_size = sizeof(struct pipe_vertex_element) * count + sizeof(unsigned);
+ velems_state.count = count;
+ memcpy(velems_state.velems, states,
+ sizeof(struct pipe_vertex_element) * count);
+ hash_key = cso_construct_key((void*)&velems_state, key_size);
+ iter = cso_find_state_template(ctx->cache, hash_key, CSO_VELEMENTS,
+ (void*)&velems_state, key_size);
+
+ if (cso_hash_iter_is_null(iter)) {
+ struct cso_velements *cso = MALLOC(sizeof(struct cso_velements));
+ if (!cso)
+ return PIPE_ERROR_OUT_OF_MEMORY;
+
+ memcpy(&cso->state, &velems_state, key_size);
+ cso->data = ctx->pipe->create_vertex_elements_state(ctx->pipe, count,
+ &cso->state.velems[0]);
+ cso->delete_state =
+ (cso_state_callback) ctx->pipe->delete_vertex_elements_state;
+ cso->context = ctx->pipe;
+
+ iter = cso_insert_state(ctx->cache, hash_key, CSO_VELEMENTS, cso);
+ if (cso_hash_iter_is_null(iter)) {
+ FREE(cso);
+ return PIPE_ERROR_OUT_OF_MEMORY;
+ }
+
+ handle = cso->data;
+ }
+ else {
+ handle = ((struct cso_velements *)cso_hash_iter_data(iter))->data;
+ }
+
+ if (ctx->velements != handle) {
+ ctx->velements = handle;
+ ctx->pipe->bind_vertex_elements_state(ctx->pipe, handle);
+ }
+ return PIPE_OK;
+}
+
+void cso_save_vertex_elements(struct cso_context *ctx)
+{
+ struct u_vbuf *vbuf = ctx->vbuf;
+
+ if (vbuf) {
+ u_vbuf_save_vertex_elements(vbuf);
+ return;
+ }
+
+ assert(!ctx->velements_saved);
+ ctx->velements_saved = ctx->velements;
+}
+
+void cso_restore_vertex_elements(struct cso_context *ctx)
+{
+ struct u_vbuf *vbuf = ctx->vbuf;
+
+ if (vbuf) {
+ u_vbuf_restore_vertex_elements(vbuf);
+ return;
+ }
+
+ if (ctx->velements != ctx->velements_saved) {
+ ctx->velements = ctx->velements_saved;
+ ctx->pipe->bind_vertex_elements_state(ctx->pipe, ctx->velements_saved);
+ }
+ ctx->velements_saved = NULL;
+}
+
+/* vertex buffers */
+
+void cso_set_vertex_buffers(struct cso_context *ctx,
+ unsigned start_slot, unsigned count,
+ const struct pipe_vertex_buffer *buffers)
+{
+ struct u_vbuf *vbuf = ctx->vbuf;
+
+ if (vbuf) {
+ u_vbuf_set_vertex_buffers(vbuf, start_slot, count, buffers);
+ return;
+ }
+
+ /* Save what's in the auxiliary slot, so that we can save and restore it
+ * for meta ops. */
+ if (start_slot <= ctx->aux_vertex_buffer_index &&
+ start_slot+count > ctx->aux_vertex_buffer_index) {
+ if (buffers) {
+ const struct pipe_vertex_buffer *vb =
+ buffers + (ctx->aux_vertex_buffer_index - start_slot);
+
+ pipe_resource_reference(&ctx->aux_vertex_buffer_current.buffer,
+ vb->buffer);
+ memcpy(&ctx->aux_vertex_buffer_current, vb,
+ sizeof(struct pipe_vertex_buffer));
+ }
+ else {
+ pipe_resource_reference(&ctx->aux_vertex_buffer_current.buffer,
+ NULL);
+ ctx->aux_vertex_buffer_current.user_buffer = NULL;
+ }
+ }
+
+ ctx->pipe->set_vertex_buffers(ctx->pipe, start_slot, count, buffers);
+}
+
+void cso_save_aux_vertex_buffer_slot(struct cso_context *ctx)
+{
+ struct u_vbuf *vbuf = ctx->vbuf;
+
+ if (vbuf) {
+ u_vbuf_save_aux_vertex_buffer_slot(vbuf);
+ return;
+ }
+
+ pipe_resource_reference(&ctx->aux_vertex_buffer_saved.buffer,
+ ctx->aux_vertex_buffer_current.buffer);
+ memcpy(&ctx->aux_vertex_buffer_saved, &ctx->aux_vertex_buffer_current,
+ sizeof(struct pipe_vertex_buffer));
+}
+
+void cso_restore_aux_vertex_buffer_slot(struct cso_context *ctx)
+{
+ struct u_vbuf *vbuf = ctx->vbuf;
+
+ if (vbuf) {
+ u_vbuf_restore_aux_vertex_buffer_slot(vbuf);
+ return;
+ }
+
+ cso_set_vertex_buffers(ctx, ctx->aux_vertex_buffer_index, 1,
+ &ctx->aux_vertex_buffer_saved);
+ pipe_resource_reference(&ctx->aux_vertex_buffer_saved.buffer, NULL);
+}
+
+unsigned cso_get_aux_vertex_buffer_slot(struct cso_context *ctx)
+{
+ return ctx->aux_vertex_buffer_index;
+}
+
+
+/**************** fragment/vertex sampler view state *************************/
+
+static enum pipe_error
+single_sampler(struct cso_context *ctx,
+ struct sampler_info *info,
+ unsigned idx,
+ const struct pipe_sampler_state *templ)
+{
+ void *handle = NULL;
+
+ if (templ != NULL) {
+ unsigned key_size = sizeof(struct pipe_sampler_state);
+ unsigned hash_key = cso_construct_key((void*)templ, key_size);
+ struct cso_hash_iter iter =
+ cso_find_state_template(ctx->cache,
+ hash_key, CSO_SAMPLER,
+ (void *) templ, key_size);
+
+ if (cso_hash_iter_is_null(iter)) {
+ struct cso_sampler *cso = MALLOC(sizeof(struct cso_sampler));
+ if (!cso)
+ return PIPE_ERROR_OUT_OF_MEMORY;
+
+ memcpy(&cso->state, templ, sizeof(*templ));
+ cso->data = ctx->pipe->create_sampler_state(ctx->pipe, &cso->state);
+ cso->delete_state =
+ (cso_state_callback) ctx->pipe->delete_sampler_state;
+ cso->context = ctx->pipe;
+
+ iter = cso_insert_state(ctx->cache, hash_key, CSO_SAMPLER, cso);
+ if (cso_hash_iter_is_null(iter)) {
+ FREE(cso);
+ return PIPE_ERROR_OUT_OF_MEMORY;
+ }
+
+ handle = cso->data;
+ }
+ else {
+ handle = ((struct cso_sampler *)cso_hash_iter_data(iter))->data;
+ }
+ }
+
+ info->samplers[idx] = handle;
+
+ return PIPE_OK;
+}
+
+enum pipe_error
+cso_single_sampler(struct cso_context *ctx,
+ unsigned shader_stage,
+ unsigned idx,
+ const struct pipe_sampler_state *templ)
+{
+ return single_sampler(ctx, &ctx->samplers[shader_stage], idx, templ);
+}
+
+
+
+static void
+single_sampler_done(struct cso_context *ctx, unsigned shader_stage)
+{
+ struct sampler_info *info = &ctx->samplers[shader_stage];
+ unsigned i;
+
+ /* find highest non-null sampler */
+ for (i = PIPE_MAX_SAMPLERS; i > 0; i--) {
+ if (info->samplers[i - 1] != NULL)
+ break;
+ }
+
+ info->nr_samplers = i;
+
+ if (info->hw.nr_samplers != info->nr_samplers ||
+ memcmp(info->hw.samplers,
+ info->samplers,
+ info->nr_samplers * sizeof(void *)) != 0)
+ {
+ memcpy(info->hw.samplers,
+ info->samplers,
+ info->nr_samplers * sizeof(void *));
+ info->hw.nr_samplers = info->nr_samplers;
+
+ switch (shader_stage) {
+ case PIPE_SHADER_FRAGMENT:
+ ctx->pipe->bind_fragment_sampler_states(ctx->pipe,
+ info->nr_samplers,
+ info->samplers);
+ break;
+ case PIPE_SHADER_VERTEX:
+ ctx->pipe->bind_vertex_sampler_states(ctx->pipe,
+ info->nr_samplers,
+ info->samplers);
+ break;
+ case PIPE_SHADER_GEOMETRY:
+ ctx->pipe->bind_geometry_sampler_states(ctx->pipe,
+ info->nr_samplers,
+ info->samplers);
+ break;
+ default:
+ assert(!"bad shader type in single_sampler_done()");
+ }
+ }
+}
+
+void
+cso_single_sampler_done(struct cso_context *ctx, unsigned shader_stage)
+{
+ single_sampler_done(ctx, shader_stage);
+}
+
+
+/*
+ * If the function encouters any errors it will return the
+ * last one. Done to always try to set as many samplers
+ * as possible.
+ */
+enum pipe_error
+cso_set_samplers(struct cso_context *ctx,
+ unsigned shader_stage,
+ unsigned nr,
+ const struct pipe_sampler_state **templates)
+{
+ struct sampler_info *info = &ctx->samplers[shader_stage];
+ unsigned i;
+ enum pipe_error temp, error = PIPE_OK;
+
+ /* TODO: fastpath
+ */
+
+ for (i = 0; i < nr; i++) {
+ temp = single_sampler(ctx, info, i, templates[i]);
+ if (temp != PIPE_OK)
+ error = temp;
+ }
+
+ for ( ; i < info->nr_samplers; i++) {
+ temp = single_sampler(ctx, info, i, NULL);
+ if (temp != PIPE_OK)
+ error = temp;
+ }
+
+ single_sampler_done(ctx, shader_stage);
+
+ return error;
+}
+
+void
+cso_save_samplers(struct cso_context *ctx, unsigned shader_stage)
+{
+ struct sampler_info *info = &ctx->samplers[shader_stage];
+ info->nr_samplers_saved = info->nr_samplers;
+ memcpy(info->samplers_saved, info->samplers, sizeof(info->samplers));
+}
+
+
+void
+cso_restore_samplers(struct cso_context *ctx, unsigned shader_stage)
+{
+ struct sampler_info *info = &ctx->samplers[shader_stage];
+ info->nr_samplers = info->nr_samplers_saved;
+ memcpy(info->samplers, info->samplers_saved, sizeof(info->samplers));
+ single_sampler_done(ctx, shader_stage);
+}
+
+
+void
+cso_set_sampler_views(struct cso_context *ctx,
+ unsigned shader_stage,
+ unsigned count,
+ struct pipe_sampler_view **views)
+{
+ struct sampler_info *info = &ctx->samplers[shader_stage];
+ unsigned i;
+
+ /* reference new views */
+ for (i = 0; i < count; i++) {
+ pipe_sampler_view_reference(&info->views[i], views[i]);
+ }
+ /* unref extra old views, if any */
+ for (; i < info->nr_views; i++) {
+ pipe_sampler_view_reference(&info->views[i], NULL);
+ }
+
+ info->nr_views = count;
+
+ /* bind the new sampler views */
+ switch (shader_stage) {
+ case PIPE_SHADER_FRAGMENT:
+ ctx->pipe->set_fragment_sampler_views(ctx->pipe, count, info->views);
+ break;
+ case PIPE_SHADER_VERTEX:
+ ctx->pipe->set_vertex_sampler_views(ctx->pipe, count, info->views);
+ break;
+ case PIPE_SHADER_GEOMETRY:
+ ctx->pipe->set_geometry_sampler_views(ctx->pipe, count, info->views);
+ break;
+ default:
+ assert(!"bad shader type in cso_set_sampler_views()");
+ }
+}
+
+
+void
+cso_save_sampler_views(struct cso_context *ctx, unsigned shader_stage)
+{
+ struct sampler_info *info = &ctx->samplers[shader_stage];
+ unsigned i;
+
+ info->nr_views_saved = info->nr_views;
+
+ for (i = 0; i < info->nr_views; i++) {
+ assert(!info->views_saved[i]);
+ pipe_sampler_view_reference(&info->views_saved[i], info->views[i]);
+ }
+}
+
+
+void
+cso_restore_sampler_views(struct cso_context *ctx, unsigned shader_stage)
+{
+ struct sampler_info *info = &ctx->samplers[shader_stage];
+ unsigned i, nr_saved = info->nr_views_saved;
+
+ for (i = 0; i < nr_saved; i++) {
+ pipe_sampler_view_reference(&info->views[i], NULL);
+ /* move the reference from one pointer to another */
+ info->views[i] = info->views_saved[i];
+ info->views_saved[i] = NULL;
+ }
+ for (; i < info->nr_views; i++) {
+ pipe_sampler_view_reference(&info->views[i], NULL);
+ }
+
+ /* bind the old/saved sampler views */
+ switch (shader_stage) {
+ case PIPE_SHADER_FRAGMENT:
+ ctx->pipe->set_fragment_sampler_views(ctx->pipe, nr_saved, info->views);
+ break;
+ case PIPE_SHADER_VERTEX:
+ ctx->pipe->set_vertex_sampler_views(ctx->pipe, nr_saved, info->views);
+ break;
+ case PIPE_SHADER_GEOMETRY:
+ ctx->pipe->set_geometry_sampler_views(ctx->pipe, nr_saved, info->views);
+ break;
+ default:
+ assert(!"bad shader type in cso_restore_sampler_views()");
+ }
+
+ info->nr_views = nr_saved;
+ info->nr_views_saved = 0;
+}
+
+
+void
+cso_set_stream_outputs(struct cso_context *ctx,
+ unsigned num_targets,
+ struct pipe_stream_output_target **targets,
+ unsigned append_bitmask)
+{
+ struct pipe_context *pipe = ctx->pipe;
+ uint i;
+
+ if (!ctx->has_streamout) {
+ assert(num_targets == 0);
+ return;
+ }
+
+ if (ctx->nr_so_targets == 0 && num_targets == 0) {
+ /* Nothing to do. */
+ return;
+ }
+
+ /* reference new targets */
+ for (i = 0; i < num_targets; i++) {
+ pipe_so_target_reference(&ctx->so_targets[i], targets[i]);
+ }
+ /* unref extra old targets, if any */
+ for (; i < ctx->nr_so_targets; i++) {
+ pipe_so_target_reference(&ctx->so_targets[i], NULL);
+ }
+
+ pipe->set_stream_output_targets(pipe, num_targets, targets,
+ append_bitmask);
+ ctx->nr_so_targets = num_targets;
+}
+
+void
+cso_save_stream_outputs(struct cso_context *ctx)
+{
+ uint i;
+
+ if (!ctx->has_streamout) {
+ return;
+ }
+
+ ctx->nr_so_targets_saved = ctx->nr_so_targets;
+
+ for (i = 0; i < ctx->nr_so_targets; i++) {
+ assert(!ctx->so_targets_saved[i]);
+ pipe_so_target_reference(&ctx->so_targets_saved[i], ctx->so_targets[i]);
+ }
+}
+
+void
+cso_restore_stream_outputs(struct cso_context *ctx)
+{
+ struct pipe_context *pipe = ctx->pipe;
+ uint i;
+
+ if (!ctx->has_streamout) {
+ return;
+ }
+
+ if (ctx->nr_so_targets == 0 && ctx->nr_so_targets_saved == 0) {
+ /* Nothing to do. */
+ return;
+ }
+
+ for (i = 0; i < ctx->nr_so_targets_saved; i++) {
+ pipe_so_target_reference(&ctx->so_targets[i], NULL);
+ /* move the reference from one pointer to another */
+ ctx->so_targets[i] = ctx->so_targets_saved[i];
+ ctx->so_targets_saved[i] = NULL;
+ }
+ for (; i < ctx->nr_so_targets; i++) {
+ pipe_so_target_reference(&ctx->so_targets[i], NULL);
+ }
+
+ /* ~0 means append */
+ pipe->set_stream_output_targets(pipe, ctx->nr_so_targets_saved,
+ ctx->so_targets, ~0);
+
+ ctx->nr_so_targets = ctx->nr_so_targets_saved;
+ ctx->nr_so_targets_saved = 0;
+}
+
+/* constant buffers */
+
+void
+cso_set_constant_buffer(struct cso_context *cso, unsigned shader_stage,
+ unsigned index, struct pipe_constant_buffer *cb)
+{
+ struct pipe_context *pipe = cso->pipe;
+
+ pipe->set_constant_buffer(pipe, shader_stage, index, cb);
+
+ if (index == 0) {
+ util_copy_constant_buffer(&cso->aux_constbuf_current[shader_stage], cb);
+ }
+}
+
+void
+cso_set_constant_buffer_resource(struct cso_context *cso,
+ unsigned shader_stage,
+ unsigned index,
+ struct pipe_resource *buffer)
+{
+ if (buffer) {
+ struct pipe_constant_buffer cb;
+ cb.buffer = buffer;
+ cb.buffer_offset = 0;
+ cb.buffer_size = buffer->width0;
+ cb.user_buffer = NULL;
+ cso_set_constant_buffer(cso, shader_stage, index, &cb);
+ } else {
+ cso_set_constant_buffer(cso, shader_stage, index, NULL);
+ }
+}
+
+void
+cso_save_constant_buffer_slot0(struct cso_context *cso,
+ unsigned shader_stage)
+{
+ util_copy_constant_buffer(&cso->aux_constbuf_saved[shader_stage],
+ &cso->aux_constbuf_current[shader_stage]);
+}
+
+void
+cso_restore_constant_buffer_slot0(struct cso_context *cso,
+ unsigned shader_stage)
+{
+ cso_set_constant_buffer(cso, shader_stage, 0,
+ &cso->aux_constbuf_saved[shader_stage]);
+ pipe_resource_reference(&cso->aux_constbuf_saved[shader_stage].buffer,
+ NULL);
+}
+
+/* drawing */
+
+void
+cso_set_index_buffer(struct cso_context *cso,
+ const struct pipe_index_buffer *ib)
+{
+ struct u_vbuf *vbuf = cso->vbuf;
+
+ if (vbuf) {
+ u_vbuf_set_index_buffer(vbuf, ib);
+ } else {
+ struct pipe_context *pipe = cso->pipe;
+ pipe->set_index_buffer(pipe, ib);
+ }
+}
+
+void
+cso_draw_vbo(struct cso_context *cso,
+ const struct pipe_draw_info *info)
+{
+ struct u_vbuf *vbuf = cso->vbuf;
+
+ if (vbuf) {
+ u_vbuf_draw_vbo(vbuf, info);
+ } else {
+ struct pipe_context *pipe = cso->pipe;
+ pipe->draw_vbo(pipe, info);
+ }
+}
+
+void
+cso_draw_arrays(struct cso_context *cso, uint mode, uint start, uint count)
+{
+ struct pipe_draw_info info;
+
+ util_draw_init_info(&info);
+
+ info.mode = mode;
+ info.start = start;
+ info.count = count;
+ info.min_index = start;
+ info.max_index = start + count - 1;
+
+ cso_draw_vbo(cso, &info);
+}
diff --git a/src/minigallium/auxiliary/cso_cache/cso_context.h b/src/minigallium/auxiliary/cso_cache/cso_context.h
new file mode 100644
index 0000000..82c8e18
--- /dev/null
+++ b/src/minigallium/auxiliary/cso_cache/cso_context.h
@@ -0,0 +1,239 @@
+/**************************************************************************
+ *
+ * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#ifndef CSO_CONTEXT_H
+#define CSO_CONTEXT_H
+
+#include "pipe/p_context.h"
+#include "pipe/p_state.h"
+#include "pipe/p_defines.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct cso_context;
+struct u_vbuf;
+
+struct cso_context *cso_create_context( struct pipe_context *pipe );
+
+void cso_release_all( struct cso_context *ctx );
+
+void cso_destroy_context( struct cso_context *cso );
+
+
+
+enum pipe_error cso_set_blend( struct cso_context *cso,
+ const struct pipe_blend_state *blend );
+void cso_save_blend(struct cso_context *cso);
+void cso_restore_blend(struct cso_context *cso);
+
+
+
+enum pipe_error cso_set_depth_stencil_alpha( struct cso_context *cso,
+ const struct pipe_depth_stencil_alpha_state *dsa );
+void cso_save_depth_stencil_alpha(struct cso_context *cso);
+void cso_restore_depth_stencil_alpha(struct cso_context *cso);
+
+
+
+enum pipe_error cso_set_rasterizer( struct cso_context *cso,
+ const struct pipe_rasterizer_state *rasterizer );
+void cso_save_rasterizer(struct cso_context *cso);
+void cso_restore_rasterizer(struct cso_context *cso);
+
+
+enum pipe_error
+cso_set_samplers(struct cso_context *cso,
+ unsigned shader_stage,
+ unsigned count,
+ const struct pipe_sampler_state **states);
+
+void
+cso_save_samplers(struct cso_context *cso, unsigned shader_stage);
+
+void
+cso_restore_samplers(struct cso_context *cso, unsigned shader_stage);
+
+/* Alternate interface to support state trackers that like to modify
+ * samplers one at a time:
+ */
+enum pipe_error
+cso_single_sampler(struct cso_context *cso,
+ unsigned shader_stage,
+ unsigned count,
+ const struct pipe_sampler_state *states);
+
+void
+cso_single_sampler_done(struct cso_context *cso, unsigned shader_stage);
+
+
+enum pipe_error cso_set_vertex_elements(struct cso_context *ctx,
+ unsigned count,
+ const struct pipe_vertex_element *states);
+void cso_save_vertex_elements(struct cso_context *ctx);
+void cso_restore_vertex_elements(struct cso_context *ctx);
+
+
+void cso_set_vertex_buffers(struct cso_context *ctx,
+ unsigned start_slot, unsigned count,
+ const struct pipe_vertex_buffer *buffers);
+
+/* One vertex buffer slot is provided with the save/restore functionality.
+ * cso_context chooses the slot, it can be non-zero. */
+void cso_save_aux_vertex_buffer_slot(struct cso_context *ctx);
+void cso_restore_aux_vertex_buffer_slot(struct cso_context *ctx);
+unsigned cso_get_aux_vertex_buffer_slot(struct cso_context *ctx);
+
+
+void cso_set_stream_outputs(struct cso_context *ctx,
+ unsigned num_targets,
+ struct pipe_stream_output_target **targets,
+ unsigned append_bitmask);
+void cso_save_stream_outputs(struct cso_context *ctx);
+void cso_restore_stream_outputs(struct cso_context *ctx);
+
+
+/*
+ * We don't provide shader caching in CSO. Most of the time the api provides
+ * object semantics for shaders anyway, and the cases where it doesn't
+ * (eg mesa's internally-generated texenv programs), it will be up to
+ * the state tracker to implement their own specialized caching.
+ */
+
+void cso_set_fragment_shader_handle(struct cso_context *ctx, void *handle);
+void cso_delete_fragment_shader(struct cso_context *ctx, void *handle );
+void cso_save_fragment_shader(struct cso_context *cso);
+void cso_restore_fragment_shader(struct cso_context *cso);
+
+
+void cso_set_vertex_shader_handle(struct cso_context *ctx, void *handle);
+void cso_delete_vertex_shader(struct cso_context *ctx, void *handle );
+void cso_save_vertex_shader(struct cso_context *cso);
+void cso_restore_vertex_shader(struct cso_context *cso);
+
+
+void cso_set_geometry_shader_handle(struct cso_context *ctx, void *handle);
+void cso_delete_geometry_shader(struct cso_context *ctx, void *handle);
+void cso_save_geometry_shader(struct cso_context *cso);
+void cso_restore_geometry_shader(struct cso_context *cso);
+
+
+void cso_set_framebuffer(struct cso_context *cso,
+ const struct pipe_framebuffer_state *fb);
+void cso_save_framebuffer(struct cso_context *cso);
+void cso_restore_framebuffer(struct cso_context *cso);
+
+
+void cso_set_viewport(struct cso_context *cso,
+ const struct pipe_viewport_state *vp);
+void cso_save_viewport(struct cso_context *cso);
+void cso_restore_viewport(struct cso_context *cso);
+
+
+void cso_set_blend_color(struct cso_context *cso,
+ const struct pipe_blend_color *bc);
+
+void cso_set_sample_mask(struct cso_context *cso, unsigned stencil_mask);
+void cso_save_sample_mask(struct cso_context *ctx);
+void cso_restore_sample_mask(struct cso_context *ctx);
+
+void cso_set_stencil_ref(struct cso_context *cso,
+ const struct pipe_stencil_ref *sr);
+void cso_save_stencil_ref(struct cso_context *cso);
+void cso_restore_stencil_ref(struct cso_context *cso);
+
+void cso_set_render_condition(struct cso_context *cso,
+ struct pipe_query *query,
+ boolean condition, uint mode);
+void cso_save_render_condition(struct cso_context *cso);
+void cso_restore_render_condition(struct cso_context *cso);
+
+
+/* clip state */
+
+void
+cso_set_clip(struct cso_context *cso,
+ const struct pipe_clip_state *clip);
+
+void
+cso_save_clip(struct cso_context *cso);
+
+void
+cso_restore_clip(struct cso_context *cso);
+
+
+/* sampler view state */
+
+void
+cso_set_sampler_views(struct cso_context *cso,
+ unsigned shader_stage,
+ unsigned count,
+ struct pipe_sampler_view **views);
+
+void
+cso_save_sampler_views(struct cso_context *cso, unsigned shader_stage);
+
+void
+cso_restore_sampler_views(struct cso_context *cso, unsigned shader_stage);
+
+
+/* constant buffers */
+
+void cso_set_constant_buffer(struct cso_context *cso, unsigned shader_stage,
+ unsigned index, struct pipe_constant_buffer *cb);
+void cso_set_constant_buffer_resource(struct cso_context *cso,
+ unsigned shader_stage,
+ unsigned index,
+ struct pipe_resource *buffer);
+void cso_save_constant_buffer_slot0(struct cso_context *cso,
+ unsigned shader_stage);
+void cso_restore_constant_buffer_slot0(struct cso_context *cso,
+ unsigned shader_stage);
+
+
+/* drawing */
+
+void
+cso_set_index_buffer(struct cso_context *cso,
+ const struct pipe_index_buffer *ib);
+
+void
+cso_draw_vbo(struct cso_context *cso,
+ const struct pipe_draw_info *info);
+
+/* helper drawing function */
+void
+cso_draw_arrays(struct cso_context *cso, uint mode, uint start, uint count);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/minigallium/auxiliary/cso_cache/cso_hash.c b/src/minigallium/auxiliary/cso_cache/cso_hash.c
new file mode 100644
index 0000000..288cef7
--- /dev/null
+++ b/src/minigallium/auxiliary/cso_cache/cso_hash.c
@@ -0,0 +1,439 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+ /*
+ * Authors:
+ * Zack Rusin <zack@tungstengraphics.com>
+ */
+
+#include "util/u_debug.h"
+#include "util/u_memory.h"
+
+#include "cso_hash.h"
+
+#define MAX(a, b) ((a > b) ? (a) : (b))
+
+static const int MinNumBits = 4;
+
+static const unsigned char prime_deltas[] = {
+ 0, 0, 1, 3, 1, 5, 3, 3, 1, 9, 7, 5, 3, 9, 25, 3,
+ 1, 21, 3, 21, 7, 15, 9, 5, 3, 29, 15, 0, 0, 0, 0, 0
+};
+
+static int primeForNumBits(int numBits)
+{
+ return (1 << numBits) + prime_deltas[numBits];
+}
+
+/*
+ Returns the smallest integer n such that
+ primeForNumBits(n) >= hint.
+*/
+static int countBits(int hint)
+{
+ int numBits = 0;
+ int bits = hint;
+
+ while (bits > 1) {
+ bits >>= 1;
+ numBits++;
+ }
+
+ if (numBits >= (int)sizeof(prime_deltas)) {
+ numBits = sizeof(prime_deltas) - 1;
+ } else if (primeForNumBits(numBits) < hint) {
+ ++numBits;
+ }
+ return numBits;
+}
+
+struct cso_node {
+ struct cso_node *next;
+ unsigned key;
+ void *value;
+};
+
+struct cso_hash_data {
+ struct cso_node *fakeNext;
+ struct cso_node **buckets;
+ int size;
+ int nodeSize;
+ short userNumBits;
+ short numBits;
+ int numBuckets;
+};
+
+struct cso_hash {
+ union {
+ struct cso_hash_data *d;
+ struct cso_node *e;
+ } data;
+};
+
+static void *cso_data_allocate_node(struct cso_hash_data *hash)
+{
+ return MALLOC(hash->nodeSize);
+}
+
+static void cso_free_node(struct cso_node *node)
+{
+ FREE(node);
+}
+
+static struct cso_node *
+cso_hash_create_node(struct cso_hash *hash,
+ unsigned akey, void *avalue,
+ struct cso_node **anextNode)
+{
+ struct cso_node *node = cso_data_allocate_node(hash->data.d);
+
+ if (!node)
+ return NULL;
+
+ node->key = akey;
+ node->value = avalue;
+
+ node->next = (struct cso_node*)(*anextNode);
+ *anextNode = node;
+ ++hash->data.d->size;
+ return node;
+}
+
+static void cso_data_rehash(struct cso_hash_data *hash, int hint)
+{
+ if (hint < 0) {
+ hint = countBits(-hint);
+ if (hint < MinNumBits)
+ hint = MinNumBits;
+ hash->userNumBits = (short)hint;
+ while (primeForNumBits(hint) < (hash->size >> 1))
+ ++hint;
+ } else if (hint < MinNumBits) {
+ hint = MinNumBits;
+ }
+
+ if (hash->numBits != hint) {
+ struct cso_node *e = (struct cso_node *)(hash);
+ struct cso_node **oldBuckets = hash->buckets;
+ int oldNumBuckets = hash->numBuckets;
+ int i = 0;
+
+ hash->numBits = (short)hint;
+ hash->numBuckets = primeForNumBits(hint);
+ hash->buckets = MALLOC(sizeof(struct cso_node*) * hash->numBuckets);
+ for (i = 0; i < hash->numBuckets; ++i)
+ hash->buckets[i] = e;
+
+ for (i = 0; i < oldNumBuckets; ++i) {
+ struct cso_node *firstNode = oldBuckets[i];
+ while (firstNode != e) {
+ unsigned h = firstNode->key;
+ struct cso_node *lastNode = firstNode;
+ struct cso_node *afterLastNode;
+ struct cso_node **beforeFirstNode;
+
+ while (lastNode->next != e && lastNode->next->key == h)
+ lastNode = lastNode->next;
+
+ afterLastNode = lastNode->next;
+ beforeFirstNode = &hash->buckets[h % hash->numBuckets];
+ while (*beforeFirstNode != e)
+ beforeFirstNode = &(*beforeFirstNode)->next;
+ lastNode->next = *beforeFirstNode;
+ *beforeFirstNode = firstNode;
+ firstNode = afterLastNode;
+ }
+ }
+ FREE(oldBuckets);
+ }
+}
+
+static void cso_data_might_grow(struct cso_hash_data *hash)
+{
+ if (hash->size >= hash->numBuckets)
+ cso_data_rehash(hash, hash->numBits + 1);
+}
+
+static void cso_data_has_shrunk(struct cso_hash_data *hash)
+{
+ if (hash->size <= (hash->numBuckets >> 3) &&
+ hash->numBits > hash->userNumBits) {
+ int max = MAX(hash->numBits-2, hash->userNumBits);
+ cso_data_rehash(hash, max);
+ }
+}
+
+static struct cso_node *cso_data_first_node(struct cso_hash_data *hash)
+{
+ struct cso_node *e = (struct cso_node *)(hash);
+ struct cso_node **bucket = hash->buckets;
+ int n = hash->numBuckets;
+ while (n--) {
+ if (*bucket != e)
+ return *bucket;
+ ++bucket;
+ }
+ return e;
+}
+
+static struct cso_node **cso_hash_find_node(struct cso_hash *hash, unsigned akey)
+{
+ struct cso_node **node;
+
+ if (hash->data.d->numBuckets) {
+ node = (struct cso_node **)(&hash->data.d->buckets[akey % hash->data.d->numBuckets]);
+ assert(*node == hash->data.e || (*node)->next);
+ while (*node != hash->data.e && (*node)->key != akey)
+ node = &(*node)->next;
+ } else {
+ node = (struct cso_node **)((const struct cso_node * const *)(&hash->data.e));
+ }
+ return node;
+}
+
+struct cso_hash_iter cso_hash_insert(struct cso_hash *hash,
+ unsigned key, void *data)
+{
+ cso_data_might_grow(hash->data.d);
+
+ {
+ struct cso_node **nextNode = cso_hash_find_node(hash, key);
+ struct cso_node *node = cso_hash_create_node(hash, key, data, nextNode);
+ if (!node) {
+ struct cso_hash_iter null_iter = {hash, 0};
+ return null_iter;
+ }
+
+ {
+ struct cso_hash_iter iter = {hash, node};
+ return iter;
+ }
+ }
+}
+
+struct cso_hash * cso_hash_create(void)
+{
+ struct cso_hash *hash = MALLOC_STRUCT(cso_hash);
+ if (!hash)
+ return NULL;
+
+ hash->data.d = MALLOC_STRUCT(cso_hash_data);
+ if (!hash->data.d) {
+ FREE(hash);
+ return NULL;
+ }
+
+ hash->data.d->fakeNext = 0;
+ hash->data.d->buckets = 0;
+ hash->data.d->size = 0;
+ hash->data.d->nodeSize = sizeof(struct cso_node);
+ hash->data.d->userNumBits = (short)MinNumBits;
+ hash->data.d->numBits = 0;
+ hash->data.d->numBuckets = 0;
+
+ return hash;
+}
+
+void cso_hash_delete(struct cso_hash *hash)
+{
+ struct cso_node *e_for_x = (struct cso_node *)(hash->data.d);
+ struct cso_node **bucket = (struct cso_node **)(hash->data.d->buckets);
+ int n = hash->data.d->numBuckets;
+ while (n--) {
+ struct cso_node *cur = *bucket++;
+ while (cur != e_for_x) {
+ struct cso_node *next = cur->next;
+ cso_free_node(cur);
+ cur = next;
+ }
+ }
+ FREE(hash->data.d->buckets);
+ FREE(hash->data.d);
+ FREE(hash);
+}
+
+struct cso_hash_iter cso_hash_find(struct cso_hash *hash,
+ unsigned key)
+{
+ struct cso_node **nextNode = cso_hash_find_node(hash, key);
+ struct cso_hash_iter iter = {hash, *nextNode};
+ return iter;
+}
+
+unsigned cso_hash_iter_key(struct cso_hash_iter iter)
+{
+ if (!iter.node || iter.hash->data.e == iter.node)
+ return 0;
+ return iter.node->key;
+}
+
+void * cso_hash_iter_data(struct cso_hash_iter iter)
+{
+ if (!iter.node || iter.hash->data.e == iter.node)
+ return 0;
+ return iter.node->value;
+}
+
+static struct cso_node *cso_hash_data_next(struct cso_node *node)
+{
+ union {
+ struct cso_node *next;
+ struct cso_node *e;
+ struct cso_hash_data *d;
+ } a;
+ int start;
+ struct cso_node **bucket;
+ int n;
+
+ a.next = node->next;
+ if (!a.next) {
+ debug_printf("iterating beyond the last element\n");
+ return 0;
+ }
+ if (a.next->next)
+ return a.next;
+
+ start = (node->key % a.d->numBuckets) + 1;
+ bucket = a.d->buckets + start;
+ n = a.d->numBuckets - start;
+ while (n--) {
+ if (*bucket != a.e)
+ return *bucket;
+ ++bucket;
+ }
+ return a.e;
+}
+
+
+static struct cso_node *cso_hash_data_prev(struct cso_node *node)
+{
+ union {
+ struct cso_node *e;
+ struct cso_hash_data *d;
+ } a;
+ int start;
+ struct cso_node *sentinel;
+ struct cso_node **bucket;
+
+ a.e = node;
+ while (a.e->next)
+ a.e = a.e->next;
+
+ if (node == a.e)
+ start = a.d->numBuckets - 1;
+ else
+ start = node->key % a.d->numBuckets;
+
+ sentinel = node;
+ bucket = a.d->buckets + start;
+ while (start >= 0) {
+ if (*bucket != sentinel) {
+ struct cso_node *prev = *bucket;
+ while (prev->next != sentinel)
+ prev = prev->next;
+ return prev;
+ }
+
+ sentinel = a.e;
+ --bucket;
+ --start;
+ }
+ debug_printf("iterating backward beyond first element\n");
+ return a.e;
+}
+
+struct cso_hash_iter cso_hash_iter_next(struct cso_hash_iter iter)
+{
+ struct cso_hash_iter next = {iter.hash, cso_hash_data_next(iter.node)};
+ return next;
+}
+
+int cso_hash_iter_is_null(struct cso_hash_iter iter)
+{
+ if (!iter.node || iter.node == iter.hash->data.e)
+ return 1;
+ return 0;
+}
+
+void * cso_hash_take(struct cso_hash *hash,
+ unsigned akey)
+{
+ struct cso_node **node = cso_hash_find_node(hash, akey);
+ if (*node != hash->data.e) {
+ void *t = (*node)->value;
+ struct cso_node *next = (*node)->next;
+ cso_free_node(*node);
+ *node = next;
+ --hash->data.d->size;
+ cso_data_has_shrunk(hash->data.d);
+ return t;
+ }
+ return 0;
+}
+
+struct cso_hash_iter cso_hash_iter_prev(struct cso_hash_iter iter)
+{
+ struct cso_hash_iter prev = {iter.hash,
+ cso_hash_data_prev(iter.node)};
+ return prev;
+}
+
+struct cso_hash_iter cso_hash_first_node(struct cso_hash *hash)
+{
+ struct cso_hash_iter iter = {hash, cso_data_first_node(hash->data.d)};
+ return iter;
+}
+
+int cso_hash_size(struct cso_hash *hash)
+{
+ return hash->data.d->size;
+}
+
+struct cso_hash_iter cso_hash_erase(struct cso_hash *hash, struct cso_hash_iter iter)
+{
+ struct cso_hash_iter ret = iter;
+ struct cso_node *node = iter.node;
+ struct cso_node **node_ptr;
+
+ if (node == hash->data.e)
+ return iter;
+
+ ret = cso_hash_iter_next(ret);
+ node_ptr = (struct cso_node**)(&hash->data.d->buckets[node->key % hash->data.d->numBuckets]);
+ while (*node_ptr != node)
+ node_ptr = &(*node_ptr)->next;
+ *node_ptr = node->next;
+ cso_free_node(node);
+ --hash->data.d->size;
+ return ret;
+}
+
+boolean cso_hash_contains(struct cso_hash *hash, unsigned key)
+{
+ struct cso_node **node = cso_hash_find_node(hash, key);
+ return (*node != hash->data.e);
+}
diff --git a/src/minigallium/auxiliary/cso_cache/cso_hash.h b/src/minigallium/auxiliary/cso_cache/cso_hash.h
new file mode 100644
index 0000000..5891c32
--- /dev/null
+++ b/src/minigallium/auxiliary/cso_cache/cso_hash.h
@@ -0,0 +1,129 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Hash table implementation.
+ *
+ * This file provides a hash implementation that is capable of dealing
+ * with collisions. It stores colliding entries in linked list. All
+ * functions operating on the hash return an iterator. The iterator
+ * itself points to the collision list. If there wasn't any collision
+ * the list will have just one entry, otherwise client code should
+ * iterate over the entries to find the exact entry among ones that
+ * had the same key (e.g. memcmp could be used on the data to check
+ * that)
+ *
+ * @author Zack Rusin <zack@tungstengraphics.com>
+ */
+
+#ifndef CSO_HASH_H
+#define CSO_HASH_H
+
+#include "pipe/p_compiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+struct cso_hash;
+struct cso_node;
+
+
+struct cso_hash_iter {
+ struct cso_hash *hash;
+ struct cso_node *node;
+};
+
+
+struct cso_hash *cso_hash_create(void);
+void cso_hash_delete(struct cso_hash *hash);
+
+
+int cso_hash_size(struct cso_hash *hash);
+
+
+/**
+ * Adds a data with the given key to the hash. If entry with the given
+ * key is already in the hash, this current entry is instered before it
+ * in the collision list.
+ * Function returns iterator pointing to the inserted item in the hash.
+ */
+struct cso_hash_iter cso_hash_insert(struct cso_hash *hash, unsigned key,
+ void *data);
+/**
+ * Removes the item pointed to by the current iterator from the hash.
+ * Note that the data itself is not erased and if it was a malloc'ed pointer
+ * it will have to be freed after calling this function by the callee.
+ * Function returns iterator pointing to the item after the removed one in
+ * the hash.
+ */
+struct cso_hash_iter cso_hash_erase(struct cso_hash *hash, struct cso_hash_iter iter);
+
+void *cso_hash_take(struct cso_hash *hash, unsigned key);
+
+
+
+struct cso_hash_iter cso_hash_first_node(struct cso_hash *hash);
+
+/**
+ * Return an iterator pointing to the first entry in the collision list.
+ */
+struct cso_hash_iter cso_hash_find(struct cso_hash *hash, unsigned key);
+
+/**
+ * Returns true if a value with the given key exists in the hash
+ */
+boolean cso_hash_contains(struct cso_hash *hash, unsigned key);
+
+
+int cso_hash_iter_is_null(struct cso_hash_iter iter);
+unsigned cso_hash_iter_key(struct cso_hash_iter iter);
+void *cso_hash_iter_data(struct cso_hash_iter iter);
+
+
+struct cso_hash_iter cso_hash_iter_next(struct cso_hash_iter iter);
+struct cso_hash_iter cso_hash_iter_prev(struct cso_hash_iter iter);
+
+
+/**
+ * Convenience routine to iterate over the collision list while doing a memory
+ * comparison to see which entry in the list is a direct copy of our template
+ * and returns that entry.
+ */
+void *cso_hash_find_data_from_template( struct cso_hash *hash,
+ unsigned hash_key,
+ void *templ,
+ int size );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/minigallium/auxiliary/os/os_memory.h b/src/minigallium/auxiliary/os/os_memory.h
new file mode 100644
index 0000000..46a6b6e
--- /dev/null
+++ b/src/minigallium/auxiliary/os/os_memory.h
@@ -0,0 +1,80 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Vmware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+/*
+ * OS memory management abstractions
+ */
+
+
+#ifndef _OS_MEMORY_H_
+#define _OS_MEMORY_H_
+
+
+#include "pipe/p_config.h"
+#include "pipe/p_compiler.h"
+
+
+#if defined(PIPE_SUBSYSTEM_EMBEDDED)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void *
+os_malloc(size_t size);
+
+void *
+os_calloc(size_t count, size_t size);
+
+void
+os_free(void *ptr);
+
+void *
+os_realloc(void *ptr, size_t old_size, size_t new_size);
+
+void *
+os_malloc_aligned(size_t size, size_t alignment);
+
+void
+os_free_aligned(void *ptr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#elif defined(PIPE_OS_WINDOWS) && defined(DEBUG) && !defined(DEBUG_MEMORY_IMPLEMENTATION)
+
+# include "os_memory_debug.h"
+
+#else
+
+# include "os_memory_stdc.h"
+
+#endif
+
+#endif /* _OS_MEMORY_H_ */
diff --git a/src/minigallium/auxiliary/os/os_memory_aligned.h b/src/minigallium/auxiliary/os/os_memory_aligned.h
new file mode 100644
index 0000000..72c5cf6
--- /dev/null
+++ b/src/minigallium/auxiliary/os/os_memory_aligned.h
@@ -0,0 +1,72 @@
+/**************************************************************************
+ *
+ * Copyright 2008-2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+/*
+ * Memory alignment wrappers.
+ */
+
+
+#ifndef _OS_MEMORY_H_
+#error "Must not be included directly. Include os_memory.h instead"
+#endif
+
+
+#include "pipe/p_compiler.h"
+
+
+/**
+ * Return memory on given byte alignment
+ */
+static INLINE void *
+os_malloc_aligned(size_t size, size_t alignment)
+{
+ char *ptr, *buf;
+
+ ptr = (char *) os_malloc(size + alignment + sizeof(void *));
+ if (!ptr)
+ return NULL;
+
+ buf = (char *)(((uintptr_t)ptr + sizeof(void *) + alignment - 1) & ~((uintptr_t)(alignment - 1)));
+ *(char **)(buf - sizeof(void *)) = ptr;
+
+ return buf;
+}
+
+
+/**
+ * Free memory returned by align_malloc().
+ */
+static INLINE void
+os_free_aligned(void *ptr)
+{
+ if (ptr) {
+ void **cubbyHole = (void **) ((char *) ptr - sizeof(void *));
+ void *realAddr = *cubbyHole;
+ os_free(realAddr);
+ }
+}
diff --git a/src/minigallium/auxiliary/os/os_memory_debug.h b/src/minigallium/auxiliary/os/os_memory_debug.h
new file mode 100644
index 0000000..9a487de
--- /dev/null
+++ b/src/minigallium/auxiliary/os/os_memory_debug.h
@@ -0,0 +1,92 @@
+/**************************************************************************
+ *
+ * Copyright 2008-2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+/*
+ * Debugging wrappers for OS memory management abstractions.
+ */
+
+
+#ifndef _OS_MEMORY_H_
+#error "Must not be included directly. Include os_memory.h instead"
+#endif
+
+
+#include "pipe/p_compiler.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+void *
+debug_malloc(const char *file, unsigned line, const char *function,
+ size_t size);
+
+void *
+debug_calloc(const char *file, unsigned line, const char *function,
+ size_t count, size_t size );
+
+void
+debug_free(const char *file, unsigned line, const char *function,
+ void *ptr);
+
+void *
+debug_realloc(const char *file, unsigned line, const char *function,
+ void *old_ptr, size_t old_size, size_t new_size );
+
+void
+debug_memory_tag(void *ptr, unsigned tag);
+
+void
+debug_memory_check_block(void *ptr);
+
+void
+debug_memory_check(void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#ifndef DEBUG_MEMORY_IMPLEMENTATION
+
+#define os_malloc( _size ) \
+ debug_malloc( __FILE__, __LINE__, __FUNCTION__, _size )
+#define os_calloc( _count, _size ) \
+ debug_calloc(__FILE__, __LINE__, __FUNCTION__, _count, _size )
+#define os_free( _ptr ) \
+ debug_free( __FILE__, __LINE__, __FUNCTION__, _ptr )
+#define os_realloc( _ptr, _old_size, _new_size ) \
+ debug_realloc( __FILE__, __LINE__, __FUNCTION__, _ptr, _old_size, _new_size )
+
+/* TODO: wrap os_malloc_aligned() and os_free_aligned() too */
+#include "os_memory_aligned.h"
+
+#endif /* !DEBUG_MEMORY_IMPLEMENTATION */
diff --git a/src/minigallium/auxiliary/os/os_memory_stdc.h b/src/minigallium/auxiliary/os/os_memory_stdc.h
new file mode 100644
index 0000000..806e536
--- /dev/null
+++ b/src/minigallium/auxiliary/os/os_memory_stdc.h
@@ -0,0 +1,76 @@
+/**************************************************************************
+ *
+ * Copyright 2008-2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+/*
+ * OS memory management abstractions for the standard C library.
+ */
+
+
+#ifndef _OS_MEMORY_H_
+#error "Must not be included directly. Include os_memory.h instead"
+#endif
+
+#include <stdlib.h>
+
+#include "pipe/p_compiler.h"
+
+
+#define os_malloc(_size) malloc(_size)
+#define os_calloc(_count, _size ) calloc(_count, _size )
+#define os_free(_ptr) free(_ptr)
+
+#define os_realloc( _old_ptr, _old_size, _new_size) \
+ realloc(_old_ptr, _new_size + 0*(_old_size))
+
+
+#if defined(HAVE_POSIX_MEMALIGN)
+
+static INLINE void *
+os_malloc_aligned(size_t size, size_t alignment)
+{
+ void *ptr;
+ alignment = (alignment + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
+ if(posix_memalign(&ptr, alignment, size) != 0)
+ return NULL;
+ return ptr;
+}
+
+#define os_free_aligned(_ptr) free(_ptr)
+
+#elif defined(PIPE_OS_WINDOWS)
+
+#include <malloc.h>
+
+#define os_malloc_aligned(_size, _align) _aligned_malloc(_size, _align)
+#define os_free_aligned(_ptr) _aligned_free(_ptr)
+
+#else
+
+#include "os_memory_aligned.h"
+
+#endif
diff --git a/src/minigallium/auxiliary/os/os_misc.c b/src/minigallium/auxiliary/os/os_misc.c
new file mode 100644
index 0000000..447e720
--- /dev/null
+++ b/src/minigallium/auxiliary/os/os_misc.c
@@ -0,0 +1,91 @@
+/**************************************************************************
+ *
+ * Copyright 2008-2010 Vmware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#include "os_misc.h"
+
+#include <stdarg.h>
+
+
+#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+#endif
+#include <windows.h>
+#include <stdio.h>
+
+#else
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#endif
+
+
+void
+os_log_message(const char *message)
+{
+ /* If the GALLIUM_LOG_FILE environment variable is set to a valid filename,
+ * write all messages to that file.
+ */
+ static FILE *fout = NULL;
+
+ if (!fout) {
+ /* one-time init */
+ const char *filename = os_get_option("GALLIUM_LOG_FILE");
+ if (filename)
+ fout = fopen(filename, "w");
+ if (!fout)
+ fout = stderr;
+ }
+
+#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+ OutputDebugStringA(message);
+ if(GetConsoleWindow() && !IsDebuggerPresent()) {
+ fflush(stdout);
+ fputs(message, fout);
+ fflush(fout);
+ }
+ else if (fout != stderr) {
+ fputs(message, fout);
+ fflush(fout);
+ }
+#else /* !PIPE_SUBSYSTEM_WINDOWS */
+ fflush(stdout);
+ fputs(message, fout);
+ fflush(fout);
+#endif
+}
+
+
+const char *
+os_get_option(const char *name)
+{
+ return getenv(name);
+}
+
diff --git a/src/minigallium/auxiliary/os/os_misc.h b/src/minigallium/auxiliary/os/os_misc.h
new file mode 100644
index 0000000..5029ab9
--- /dev/null
+++ b/src/minigallium/auxiliary/os/os_misc.h
@@ -0,0 +1,95 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Vmware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+/*
+ * Miscellaneous OS services.
+ */
+
+
+#ifndef _OS_MISC_H_
+#define _OS_MISC_H_
+
+
+#include "pipe/p_compiler.h"
+
+
+#if defined(PIPE_OS_UNIX)
+# include <signal.h> /* for kill() */
+# include <unistd.h> /* getpid() */
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+ * Trap into the debugger.
+ */
+#if (defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)) && defined(PIPE_CC_GCC)
+# define os_break() __asm("int3")
+#elif defined(PIPE_CC_MSVC)
+# define os_break() __debugbreak()
+#elif defined(PIPE_OS_UNIX)
+# define os_break() kill(getpid(), SIGTRAP)
+#else
+# define os_break() abort()
+#endif
+
+
+/*
+ * Abort the program.
+ */
+#if defined(DEBUG)
+# define os_abort() os_break()
+#else
+# define os_abort() abort()
+#endif
+
+
+/*
+ * Output a message. Message should preferably end in a newline.
+ */
+void
+os_log_message(const char *message);
+
+
+/*
+ * Get an option. Should return NULL if specified option is not set.
+ */
+const char *
+os_get_option(const char *name);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _OS_MISC_H_ */
diff --git a/src/minigallium/auxiliary/os/os_mman.h b/src/minigallium/auxiliary/os/os_mman.h
new file mode 100644
index 0000000..b48eb05
--- /dev/null
+++ b/src/minigallium/auxiliary/os/os_mman.h
@@ -0,0 +1,87 @@
+/**************************************************************************
+ *
+ * Copyright 2011 LunarG, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * OS independent memory mapping (with large file support).
+ *
+ * @author Chia-I Wu <olvaffe@gmail.com>
+ */
+
+#ifndef _OS_MMAN_H_
+#define _OS_MMAN_H_
+
+
+#include "pipe/p_config.h"
+#include "pipe/p_compiler.h"
+
+#if defined(PIPE_OS_UNIX)
+# ifndef _FILE_OFFSET_BITS
+# error _FILE_OFFSET_BITS must be defined to 64
+# endif
+# include <sys/mman.h>
+#else
+# error Unsupported OS
+#endif
+
+#if defined(PIPE_OS_ANDROID)
+# include <errno.h> /* for EINVAL */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if defined(PIPE_OS_ANDROID)
+
+extern void *__mmap2(void *, size_t, int, int, int, size_t);
+
+static INLINE void *os_mmap(void *addr, size_t length, int prot, int flags, int fd, loff_t offset)
+{
+ /* offset must be aligned to 4096 (not necessarily the page size) */
+ if (unlikely(offset & 4095)) {
+ errno = EINVAL;
+ return MAP_FAILED;
+ }
+
+ return __mmap2(addr, length, prot, flags, fd, (size_t) (offset >> 12));
+}
+
+#else
+/* assume large file support exists */
+# define os_mmap(addr, length, prot, flags, fd, offset) mmap(addr, length, prot, flags, fd, offset)
+#endif
+
+#define os_munmap(addr, length) munmap(addr, length)
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OS_MMAN_H_ */
diff --git a/src/minigallium/auxiliary/os/os_thread.h b/src/minigallium/auxiliary/os/os_thread.h
new file mode 100644
index 0000000..e153ab4
--- /dev/null
+++ b/src/minigallium/auxiliary/os/os_thread.h
@@ -0,0 +1,510 @@
+/**************************************************************************
+ *
+ * Copyright 1999-2006 Brian Paul
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+/**
+ * @file
+ *
+ * Thread, mutex, condition variable, barrier, semaphore and
+ * thread-specific data functions.
+ */
+
+
+#ifndef OS_THREAD_H_
+#define OS_THREAD_H_
+
+
+#include "pipe/p_compiler.h"
+#include "util/u_debug.h" /* for assert */
+
+
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN)
+
+#include <pthread.h> /* POSIX threads headers */
+#include <stdio.h> /* for perror() */
+#include <signal.h>
+
+
+/* pipe_thread
+ */
+typedef pthread_t pipe_thread;
+
+#define PIPE_THREAD_ROUTINE( name, param ) \
+ void *name( void *param )
+
+static INLINE pipe_thread pipe_thread_create( void *(* routine)( void *), void *param )
+{
+ pipe_thread thread;
+ sigset_t saved_set, new_set;
+ int ret;
+
+ sigfillset(&new_set);
+ pthread_sigmask(SIG_SETMASK, &new_set, &saved_set);
+ ret = pthread_create( &thread, NULL, routine, param );
+ pthread_sigmask(SIG_SETMASK, &saved_set, NULL);
+ if (ret)
+ return 0;
+ return thread;
+}
+
+static INLINE int pipe_thread_wait( pipe_thread thread )
+{
+ return pthread_join( thread, NULL );
+}
+
+static INLINE int pipe_thread_destroy( pipe_thread thread )
+{
+ return pthread_detach( thread );
+}
+
+
+/* pipe_mutex
+ */
+typedef pthread_mutex_t pipe_mutex;
+
+#define pipe_static_mutex(mutex) \
+ static pipe_mutex mutex = PTHREAD_MUTEX_INITIALIZER
+
+#define pipe_mutex_init(mutex) \
+ (void) pthread_mutex_init(&(mutex), NULL)
+
+#define pipe_mutex_destroy(mutex) \
+ pthread_mutex_destroy(&(mutex))
+
+#define pipe_mutex_lock(mutex) \
+ (void) pthread_mutex_lock(&(mutex))
+
+#define pipe_mutex_unlock(mutex) \
+ (void) pthread_mutex_unlock(&(mutex))
+
+
+/* pipe_condvar
+ */
+typedef pthread_cond_t pipe_condvar;
+
+#define pipe_static_condvar(mutex) \
+ static pipe_condvar mutex = PTHREAD_COND_INITIALIZER
+
+#define pipe_condvar_init(cond) \
+ pthread_cond_init(&(cond), NULL)
+
+#define pipe_condvar_destroy(cond) \
+ pthread_cond_destroy(&(cond))
+
+#define pipe_condvar_wait(cond, mutex) \
+ pthread_cond_wait(&(cond), &(mutex))
+
+#define pipe_condvar_signal(cond) \
+ pthread_cond_signal(&(cond))
+
+#define pipe_condvar_broadcast(cond) \
+ pthread_cond_broadcast(&(cond))
+
+
+
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+
+#include <windows.h>
+
+/* pipe_thread
+ */
+typedef HANDLE pipe_thread;
+
+#define PIPE_THREAD_ROUTINE( name, param ) \
+ void * WINAPI name( void *param )
+
+static INLINE pipe_thread pipe_thread_create( void *(WINAPI * routine)( void *), void *param )
+{
+ DWORD id;
+ return CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE) routine, param, 0, &id );
+}
+
+static INLINE int pipe_thread_wait( pipe_thread thread )
+{
+ if (WaitForSingleObject( thread, INFINITE ) == WAIT_OBJECT_0)
+ return 0;
+ return -1;
+}
+
+static INLINE int pipe_thread_destroy( pipe_thread thread )
+{
+ if (CloseHandle( thread ))
+ return 0;
+ return -1;
+}
+
+
+/* pipe_mutex
+ */
+typedef CRITICAL_SECTION pipe_mutex;
+
+/* http://locklessinc.com/articles/pthreads_on_windows/ */
+#define pipe_static_mutex(mutex) \
+ static pipe_mutex mutex = {(PCRITICAL_SECTION_DEBUG)-1, -1, 0, 0, 0, 0}
+
+#define pipe_mutex_init(mutex) \
+ InitializeCriticalSection(&mutex)
+
+#define pipe_mutex_destroy(mutex) \
+ DeleteCriticalSection(&mutex)
+
+#define pipe_mutex_lock(mutex) \
+ EnterCriticalSection(&mutex)
+
+#define pipe_mutex_unlock(mutex) \
+ LeaveCriticalSection(&mutex)
+
+/* TODO: Need a macro to declare "I don't care about WinXP compatibilty" */
+#if 0 && defined (_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+/* CONDITION_VARIABLE is only available on newer versions of Windows
+ * (Server 2008/Vista or later).
+ * http://msdn.microsoft.com/en-us/library/ms682052(VS.85).aspx
+ *
+ * pipe_condvar
+ */
+typedef CONDITION_VARIABLE pipe_condvar;
+
+#define pipe_static_condvar(cond) \
+ /*static*/ pipe_condvar cond = CONDITION_VARIABLE_INIT
+
+#define pipe_condvar_init(cond) \
+ InitializeConditionVariable(&(cond))
+
+#define pipe_condvar_destroy(cond) \
+ (void) cond /* nothing to do */
+
+#define pipe_condvar_wait(cond, mutex) \
+ SleepConditionVariableCS(&(cond), &(mutex), INFINITE)
+
+#define pipe_condvar_signal(cond) \
+ WakeConditionVariable(&(cond))
+
+#define pipe_condvar_broadcast(cond) \
+ WakeAllConditionVariable(&(cond))
+
+#else /* need compatibility with pre-Vista Win32 */
+
+/* pipe_condvar (XXX FIX THIS)
+ * See http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
+ * for potential pitfalls in implementation.
+ */
+typedef DWORD pipe_condvar;
+
+#define pipe_static_condvar(cond) \
+ /*static*/ pipe_condvar cond = 1
+
+#define pipe_condvar_init(cond) \
+ (void) (cond = 1)
+
+#define pipe_condvar_destroy(cond) \
+ (void) cond
+
+/* Poor man's pthread_cond_wait():
+ Just release the mutex and sleep for one millisecond.
+ The caller's while() loop does all the work. */
+#define pipe_condvar_wait(cond, mutex) \
+ do { pipe_mutex_unlock(mutex); \
+ Sleep(cond); \
+ pipe_mutex_lock(mutex); \
+ } while (0)
+
+#define pipe_condvar_signal(cond) \
+ (void) cond
+
+#define pipe_condvar_broadcast(cond) \
+ (void) cond
+
+#endif /* pre-Vista win32 */
+
+#else
+
+#include "os/os_time.h"
+
+/** Dummy definitions */
+
+typedef unsigned pipe_thread;
+
+#define PIPE_THREAD_ROUTINE( name, param ) \
+ void * name( void *param )
+
+static INLINE pipe_thread pipe_thread_create( void *(* routine)( void *), void *param )
+{
+ return 0;
+}
+
+static INLINE int pipe_thread_wait( pipe_thread thread )
+{
+ return -1;
+}
+
+static INLINE int pipe_thread_destroy( pipe_thread thread )
+{
+ return -1;
+}
+
+typedef unsigned pipe_mutex;
+
+#define pipe_static_mutex(mutex) \
+ static pipe_mutex mutex = 0
+
+#define pipe_mutex_init(mutex) \
+ (void) mutex
+
+#define pipe_mutex_destroy(mutex) \
+ (void) mutex
+
+#define pipe_mutex_lock(mutex) \
+ (void) mutex
+
+#define pipe_mutex_unlock(mutex) \
+ (void) mutex
+
+typedef int64_t pipe_condvar;
+
+#define pipe_static_condvar(condvar) \
+ static pipe_condvar condvar = 1000
+
+#define pipe_condvar_init(condvar) \
+ (void) (condvar = 1000)
+
+#define pipe_condvar_destroy(condvar) \
+ (void) condvar
+
+/* Poor man's pthread_cond_wait():
+ Just release the mutex and sleep for one millisecond.
+ The caller's while() loop does all the work. */
+#define pipe_condvar_wait(condvar, mutex) \
+ do { pipe_mutex_unlock(mutex); \
+ os_time_sleep(condvar); \
+ pipe_mutex_lock(mutex); \
+ } while (0)
+
+#define pipe_condvar_signal(condvar) \
+ (void) condvar
+
+#define pipe_condvar_broadcast(condvar) \
+ (void) condvar
+
+
+#endif /* PIPE_OS_? */
+
+
+/*
+ * pipe_barrier
+ */
+
+#if (defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS)) && !defined(PIPE_OS_ANDROID)
+
+typedef pthread_barrier_t pipe_barrier;
+
+static INLINE void pipe_barrier_init(pipe_barrier *barrier, unsigned count)
+{
+ pthread_barrier_init(barrier, NULL, count);
+}
+
+static INLINE void pipe_barrier_destroy(pipe_barrier *barrier)
+{
+ pthread_barrier_destroy(barrier);
+}
+
+static INLINE void pipe_barrier_wait(pipe_barrier *barrier)
+{
+ pthread_barrier_wait(barrier);
+}
+
+
+#else /* If the OS doesn't have its own, implement barriers using a mutex and a condvar */
+
+typedef struct {
+ unsigned count;
+ unsigned waiters;
+ uint64_t sequence;
+ pipe_mutex mutex;
+ pipe_condvar condvar;
+} pipe_barrier;
+
+static INLINE void pipe_barrier_init(pipe_barrier *barrier, unsigned count)
+{
+ barrier->count = count;
+ barrier->waiters = 0;
+ barrier->sequence = 0;
+ pipe_mutex_init(barrier->mutex);
+ pipe_condvar_init(barrier->condvar);
+}
+
+static INLINE void pipe_barrier_destroy(pipe_barrier *barrier)
+{
+ assert(barrier->waiters == 0);
+ pipe_mutex_destroy(barrier->mutex);
+ pipe_condvar_destroy(barrier->condvar);
+}
+
+static INLINE void pipe_barrier_wait(pipe_barrier *barrier)
+{
+ pipe_mutex_lock(barrier->mutex);
+
+ assert(barrier->waiters < barrier->count);
+ barrier->waiters++;
+
+ if (barrier->waiters < barrier->count) {
+ uint64_t sequence = barrier->sequence;
+
+ do {
+ pipe_condvar_wait(barrier->condvar, barrier->mutex);
+ } while (sequence == barrier->sequence);
+ } else {
+ barrier->waiters = 0;
+ barrier->sequence++;
+ pipe_condvar_broadcast(barrier->condvar);
+ }
+
+ pipe_mutex_unlock(barrier->mutex);
+}
+
+
+#endif
+
+
+/*
+ * Semaphores
+ */
+
+typedef struct
+{
+ pipe_mutex mutex;
+ pipe_condvar cond;
+ int counter;
+} pipe_semaphore;
+
+
+static INLINE void
+pipe_semaphore_init(pipe_semaphore *sema, int init_val)
+{
+ pipe_mutex_init(sema->mutex);
+ pipe_condvar_init(sema->cond);
+ sema->counter = init_val;
+}
+
+static INLINE void
+pipe_semaphore_destroy(pipe_semaphore *sema)
+{
+ pipe_mutex_destroy(sema->mutex);
+ pipe_condvar_destroy(sema->cond);
+}
+
+/** Signal/increment semaphore counter */
+static INLINE void
+pipe_semaphore_signal(pipe_semaphore *sema)
+{
+ pipe_mutex_lock(sema->mutex);
+ sema->counter++;
+ pipe_condvar_signal(sema->cond);
+ pipe_mutex_unlock(sema->mutex);
+}
+
+/** Wait for semaphore counter to be greater than zero */
+static INLINE void
+pipe_semaphore_wait(pipe_semaphore *sema)
+{
+ pipe_mutex_lock(sema->mutex);
+ while (sema->counter <= 0) {
+ pipe_condvar_wait(sema->cond, sema->mutex);
+ }
+ sema->counter--;
+ pipe_mutex_unlock(sema->mutex);
+}
+
+
+
+/*
+ * Thread-specific data.
+ */
+
+typedef struct {
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN)
+ pthread_key_t key;
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+ DWORD key;
+#endif
+ int initMagic;
+} pipe_tsd;
+
+
+#define PIPE_TSD_INIT_MAGIC 0xff8adc98
+
+
+static INLINE void
+pipe_tsd_init(pipe_tsd *tsd)
+{
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN)
+ if (pthread_key_create(&tsd->key, NULL/*free*/) != 0) {
+ perror("pthread_key_create(): failed to allocate key for thread specific data");
+ exit(-1);
+ }
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+ assert(0);
+#endif
+ tsd->initMagic = PIPE_TSD_INIT_MAGIC;
+}
+
+static INLINE void *
+pipe_tsd_get(pipe_tsd *tsd)
+{
+ if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) {
+ pipe_tsd_init(tsd);
+ }
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN)
+ return pthread_getspecific(tsd->key);
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+ assert(0);
+ return NULL;
+#else
+ assert(0);
+ return NULL;
+#endif
+}
+
+static INLINE void
+pipe_tsd_set(pipe_tsd *tsd, void *value)
+{
+ if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) {
+ pipe_tsd_init(tsd);
+ }
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN)
+ if (pthread_setspecific(tsd->key, value) != 0) {
+ perror("pthread_set_specific() failed");
+ exit(-1);
+ }
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+ assert(0);
+#else
+ assert(0);
+#endif
+}
+
+
+
+#endif /* OS_THREAD_H_ */
diff --git a/src/minigallium/auxiliary/os/os_time.c b/src/minigallium/auxiliary/os/os_time.c
new file mode 100644
index 0000000..f7e4ca4
--- /dev/null
+++ b/src/minigallium/auxiliary/os/os_time.c
@@ -0,0 +1,94 @@
+/**************************************************************************
+ *
+ * Copyright 2008-2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * OS independent time-manipulation functions.
+ *
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+
+#include "pipe/p_config.h"
+
+#if defined(PIPE_OS_UNIX)
+# include <time.h> /* timeval */
+# include <sys/time.h> /* timeval */
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+# include <windows.h>
+#else
+# error Unsupported OS
+#endif
+
+#include "os_time.h"
+
+
+int64_t
+os_time_get_nano(void)
+{
+#if defined(PIPE_OS_LINUX)
+
+ struct timespec tv;
+ clock_gettime(CLOCK_MONOTONIC, &tv);
+ return tv.tv_nsec + tv.tv_sec*INT64_C(1000000000);
+
+#elif defined(PIPE_OS_UNIX)
+
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return tv.tv_usec*INT64_C(1000) + tv.tv_sec*INT64_C(1000000000);
+
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+
+ static LARGE_INTEGER frequency;
+ LARGE_INTEGER counter;
+ if(!frequency.QuadPart)
+ QueryPerformanceFrequency(&frequency);
+ QueryPerformanceCounter(&counter);
+ return counter.QuadPart*INT64_C(1000000000)/frequency.QuadPart;
+
+#else
+
+#error Unsupported OS
+
+#endif
+}
+
+
+#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+
+void
+os_time_sleep(int64_t usecs)
+{
+ DWORD dwMilliseconds = (DWORD) ((usecs + 999) / 1000);
+ /* Avoid Sleep(O) as that would cause to sleep for an undetermined duration */
+ if (dwMilliseconds) {
+ Sleep(dwMilliseconds);
+ }
+}
+
+#endif
diff --git a/src/minigallium/auxiliary/os/os_time.h b/src/minigallium/auxiliary/os/os_time.h
new file mode 100644
index 0000000..4fab03c
--- /dev/null
+++ b/src/minigallium/auxiliary/os/os_time.h
@@ -0,0 +1,101 @@
+/**************************************************************************
+ *
+ * Copyright 2008-2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * OS independent time-manipulation functions.
+ *
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+#ifndef _OS_TIME_H_
+#define _OS_TIME_H_
+
+
+#include "pipe/p_config.h"
+
+#if defined(PIPE_OS_UNIX)
+# include <unistd.h> /* usleep */
+#endif
+
+#include "pipe/p_compiler.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+ * Get the current time in nanoseconds from an unknown base.
+ */
+int64_t
+os_time_get_nano(void);
+
+
+/*
+ * Get the current time in microseconds from an unknown base.
+ */
+static INLINE int64_t
+os_time_get(void) {
+ return os_time_get_nano() / 1000;
+}
+
+
+/*
+ * Sleep.
+ */
+#if defined(PIPE_OS_UNIX)
+#define os_time_sleep(_usecs) usleep(_usecs)
+#else
+void
+os_time_sleep(int64_t usecs);
+#endif
+
+
+/*
+ * Helper function for detecting time outs, taking in account overflow.
+ *
+ * Returns true if the current time has elapsed beyond the specified interval.
+ */
+static INLINE boolean
+os_time_timeout(int64_t start,
+ int64_t end,
+ int64_t curr)
+{
+ if(start <= end)
+ return !(start <= curr && curr < end);
+ else
+ return !((start <= curr) || (curr < end));
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OS_TIME_H_ */
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_build.c b/src/minigallium/auxiliary/tgsi/tgsi_build.c
new file mode 100644
index 0000000..f4add02
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_build.c
@@ -0,0 +1,1373 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "util/u_debug.h"
+#include "pipe/p_format.h"
+#include "pipe/p_shader_tokens.h"
+#include "tgsi_build.h"
+#include "tgsi_parse.h"
+
+
+/*
+ * header
+ */
+
+struct tgsi_header
+tgsi_build_header( void )
+{
+ struct tgsi_header header;
+
+ header.HeaderSize = 1;
+ header.BodySize = 0;
+
+ return header;
+}
+
+static void
+header_headersize_grow( struct tgsi_header *header )
+{
+ assert( header->HeaderSize < 0xFF );
+ assert( header->BodySize == 0 );
+
+ header->HeaderSize++;
+}
+
+static void
+header_bodysize_grow( struct tgsi_header *header )
+{
+ assert( header->BodySize < 0xFFFFFF );
+
+ header->BodySize++;
+}
+
+struct tgsi_processor
+tgsi_build_processor(
+ unsigned type,
+ struct tgsi_header *header )
+{
+ struct tgsi_processor processor;
+
+ processor.Processor = type;
+ processor.Padding = 0;
+
+ header_headersize_grow( header );
+
+ return processor;
+}
+
+/*
+ * declaration
+ */
+
+static void
+declaration_grow(
+ struct tgsi_declaration *declaration,
+ struct tgsi_header *header )
+{
+ assert( declaration->NrTokens < 0xFF );
+
+ declaration->NrTokens++;
+
+ header_bodysize_grow( header );
+}
+
+static struct tgsi_declaration
+tgsi_default_declaration( void )
+{
+ struct tgsi_declaration declaration;
+
+ declaration.Type = TGSI_TOKEN_TYPE_DECLARATION;
+ declaration.NrTokens = 1;
+ declaration.File = TGSI_FILE_NULL;
+ declaration.UsageMask = TGSI_WRITEMASK_XYZW;
+ declaration.Interpolate = 0;
+ declaration.Dimension = 0;
+ declaration.Semantic = 0;
+ declaration.Invariant = 0;
+ declaration.Local = 0;
+ declaration.Array = 0;
+ declaration.Padding = 0;
+
+ return declaration;
+}
+
+static struct tgsi_declaration
+tgsi_build_declaration(
+ unsigned file,
+ unsigned usage_mask,
+ unsigned interpolate,
+ unsigned dimension,
+ unsigned semantic,
+ unsigned invariant,
+ unsigned local,
+ unsigned array,
+ struct tgsi_header *header )
+{
+ struct tgsi_declaration declaration;
+
+ assert( file < TGSI_FILE_COUNT );
+ assert( interpolate < TGSI_INTERPOLATE_COUNT );
+
+ declaration = tgsi_default_declaration();
+ declaration.File = file;
+ declaration.UsageMask = usage_mask;
+ declaration.Interpolate = interpolate;
+ declaration.Dimension = dimension;
+ declaration.Semantic = semantic;
+ declaration.Invariant = invariant;
+ declaration.Local = local;
+ declaration.Array = array;
+ header_bodysize_grow( header );
+
+ return declaration;
+}
+
+static struct tgsi_declaration_range
+tgsi_default_declaration_range( void )
+{
+ struct tgsi_declaration_range dr;
+
+ dr.First = 0;
+ dr.Last = 0;
+
+ return dr;
+}
+
+static struct tgsi_declaration_range
+tgsi_build_declaration_range(
+ unsigned first,
+ unsigned last,
+ struct tgsi_declaration *declaration,
+ struct tgsi_header *header )
+{
+ struct tgsi_declaration_range declaration_range;
+
+ assert( last >= first );
+ assert( last <= 0xFFFF );
+
+ declaration_range.First = first;
+ declaration_range.Last = last;
+
+ declaration_grow( declaration, header );
+
+ return declaration_range;
+}
+
+static struct tgsi_declaration_dimension
+tgsi_build_declaration_dimension(unsigned index_2d,
+ struct tgsi_declaration *declaration,
+ struct tgsi_header *header)
+{
+ struct tgsi_declaration_dimension dd;
+
+ assert(index_2d <= 0xFFFF);
+
+ dd.Index2D = index_2d;
+ dd.Padding = 0;
+
+ declaration_grow(declaration, header);
+
+ return dd;
+}
+
+static struct tgsi_declaration_interp
+tgsi_default_declaration_interp( void )
+{
+ struct tgsi_declaration_interp di;
+
+ di.Interpolate = TGSI_INTERPOLATE_CONSTANT;
+ di.Centroid = 0;
+ di.CylindricalWrap = 0;
+ di.Padding = 0;
+
+ return di;
+}
+
+static struct tgsi_declaration_interp
+tgsi_build_declaration_interp(unsigned interpolate,
+ unsigned centroid,
+ unsigned cylindrical_wrap,
+ struct tgsi_declaration *declaration,
+ struct tgsi_header *header)
+{
+ struct tgsi_declaration_interp di;
+
+ di.Interpolate = interpolate;
+ di.Centroid = centroid;
+ di.CylindricalWrap = cylindrical_wrap;
+ di.Padding = 0;
+
+ declaration_grow(declaration, header);
+
+ return di;
+}
+
+static struct tgsi_declaration_semantic
+tgsi_default_declaration_semantic( void )
+{
+ struct tgsi_declaration_semantic ds;
+
+ ds.Name = TGSI_SEMANTIC_POSITION;
+ ds.Index = 0;
+ ds.Padding = 0;
+
+ return ds;
+}
+
+static struct tgsi_declaration_semantic
+tgsi_build_declaration_semantic(
+ unsigned semantic_name,
+ unsigned semantic_index,
+ struct tgsi_declaration *declaration,
+ struct tgsi_header *header )
+{
+ struct tgsi_declaration_semantic ds;
+
+ assert( semantic_name <= TGSI_SEMANTIC_COUNT );
+ assert( semantic_index <= 0xFFFF );
+
+ ds.Name = semantic_name;
+ ds.Index = semantic_index;
+ ds.Padding = 0;
+
+ declaration_grow( declaration, header );
+
+ return ds;
+}
+
+static struct tgsi_declaration_resource
+tgsi_default_declaration_resource(void)
+{
+ struct tgsi_declaration_resource dr;
+
+ dr.Resource = TGSI_TEXTURE_BUFFER;
+ dr.Raw = 0;
+ dr.Writable = 0;
+ dr.Padding = 0;
+
+ return dr;
+}
+
+static struct tgsi_declaration_resource
+tgsi_build_declaration_resource(unsigned texture,
+ unsigned raw,
+ unsigned writable,
+ struct tgsi_declaration *declaration,
+ struct tgsi_header *header)
+{
+ struct tgsi_declaration_resource dr;
+
+ dr = tgsi_default_declaration_resource();
+ dr.Resource = texture;
+ dr.Raw = raw;
+ dr.Writable = writable;
+
+ declaration_grow(declaration, header);
+
+ return dr;
+}
+
+static struct tgsi_declaration_sampler_view
+tgsi_default_declaration_sampler_view(void)
+{
+ struct tgsi_declaration_sampler_view dsv;
+
+ dsv.Resource = TGSI_TEXTURE_BUFFER;
+ dsv.ReturnTypeX = PIPE_TYPE_UNORM;
+ dsv.ReturnTypeY = PIPE_TYPE_UNORM;
+ dsv.ReturnTypeZ = PIPE_TYPE_UNORM;
+ dsv.ReturnTypeW = PIPE_TYPE_UNORM;
+
+ return dsv;
+}
+
+static struct tgsi_declaration_sampler_view
+tgsi_build_declaration_sampler_view(unsigned texture,
+ unsigned return_type_x,
+ unsigned return_type_y,
+ unsigned return_type_z,
+ unsigned return_type_w,
+ struct tgsi_declaration *declaration,
+ struct tgsi_header *header)
+{
+ struct tgsi_declaration_sampler_view dsv;
+
+ dsv = tgsi_default_declaration_sampler_view();
+ dsv.Resource = texture;
+ dsv.ReturnTypeX = return_type_x;
+ dsv.ReturnTypeY = return_type_y;
+ dsv.ReturnTypeZ = return_type_z;
+ dsv.ReturnTypeW = return_type_w;
+
+ declaration_grow(declaration, header);
+
+ return dsv;
+}
+
+
+static struct tgsi_declaration_array
+tgsi_default_declaration_array( void )
+{
+ struct tgsi_declaration_array a;
+
+ a.ArrayID = 0;
+ a.Padding = 0;
+
+ return a;
+}
+
+static struct tgsi_declaration_array
+tgsi_build_declaration_array(unsigned arrayid,
+ struct tgsi_declaration *declaration,
+ struct tgsi_header *header)
+{
+ struct tgsi_declaration_array da;
+
+ da = tgsi_default_declaration_array();
+ da.ArrayID = arrayid;
+
+ declaration_grow(declaration, header);
+
+ return da;
+}
+
+struct tgsi_full_declaration
+tgsi_default_full_declaration( void )
+{
+ struct tgsi_full_declaration full_declaration;
+
+ full_declaration.Declaration = tgsi_default_declaration();
+ full_declaration.Range = tgsi_default_declaration_range();
+ full_declaration.Semantic = tgsi_default_declaration_semantic();
+ full_declaration.Interp = tgsi_default_declaration_interp();
+ full_declaration.Resource = tgsi_default_declaration_resource();
+ full_declaration.SamplerView = tgsi_default_declaration_sampler_view();
+ full_declaration.Array = tgsi_default_declaration_array();
+
+ return full_declaration;
+}
+
+unsigned
+tgsi_build_full_declaration(
+ const struct tgsi_full_declaration *full_decl,
+ struct tgsi_token *tokens,
+ struct tgsi_header *header,
+ unsigned maxsize )
+{
+ unsigned size = 0;
+ struct tgsi_declaration *declaration;
+ struct tgsi_declaration_range *dr;
+
+ if( maxsize <= size )
+ return 0;
+ declaration = (struct tgsi_declaration *) &tokens[size];
+ size++;
+
+ *declaration = tgsi_build_declaration(
+ full_decl->Declaration.File,
+ full_decl->Declaration.UsageMask,
+ full_decl->Declaration.Interpolate,
+ full_decl->Declaration.Dimension,
+ full_decl->Declaration.Semantic,
+ full_decl->Declaration.Invariant,
+ full_decl->Declaration.Local,
+ full_decl->Declaration.Array,
+ header );
+
+ if (maxsize <= size)
+ return 0;
+ dr = (struct tgsi_declaration_range *) &tokens[size];
+ size++;
+
+ *dr = tgsi_build_declaration_range(
+ full_decl->Range.First,
+ full_decl->Range.Last,
+ declaration,
+ header );
+
+ if (full_decl->Declaration.Dimension) {
+ struct tgsi_declaration_dimension *dd;
+
+ if (maxsize <= size) {
+ return 0;
+ }
+ dd = (struct tgsi_declaration_dimension *)&tokens[size];
+ size++;
+
+ *dd = tgsi_build_declaration_dimension(full_decl->Dim.Index2D,
+ declaration,
+ header);
+ }
+
+ if (full_decl->Declaration.Interpolate) {
+ struct tgsi_declaration_interp *di;
+
+ if (maxsize <= size) {
+ return 0;
+ }
+ di = (struct tgsi_declaration_interp *)&tokens[size];
+ size++;
+
+ *di = tgsi_build_declaration_interp(full_decl->Interp.Interpolate,
+ full_decl->Interp.Centroid,
+ full_decl->Interp.CylindricalWrap,
+ declaration,
+ header);
+ }
+
+ if( full_decl->Declaration.Semantic ) {
+ struct tgsi_declaration_semantic *ds;
+
+ if( maxsize <= size )
+ return 0;
+ ds = (struct tgsi_declaration_semantic *) &tokens[size];
+ size++;
+
+ *ds = tgsi_build_declaration_semantic(
+ full_decl->Semantic.Name,
+ full_decl->Semantic.Index,
+ declaration,
+ header );
+ }
+
+ if (full_decl->Declaration.File == TGSI_FILE_RESOURCE) {
+ struct tgsi_declaration_resource *dr;
+
+ if (maxsize <= size) {
+ return 0;
+ }
+ dr = (struct tgsi_declaration_resource *)&tokens[size];
+ size++;
+
+ *dr = tgsi_build_declaration_resource(full_decl->Resource.Resource,
+ full_decl->Resource.Raw,
+ full_decl->Resource.Writable,
+ declaration,
+ header);
+ }
+
+ if (full_decl->Declaration.File == TGSI_FILE_SAMPLER_VIEW) {
+ struct tgsi_declaration_sampler_view *dsv;
+
+ if (maxsize <= size) {
+ return 0;
+ }
+ dsv = (struct tgsi_declaration_sampler_view *)&tokens[size];
+ size++;
+
+ *dsv = tgsi_build_declaration_sampler_view(
+ full_decl->SamplerView.Resource,
+ full_decl->SamplerView.ReturnTypeX,
+ full_decl->SamplerView.ReturnTypeY,
+ full_decl->SamplerView.ReturnTypeZ,
+ full_decl->SamplerView.ReturnTypeW,
+ declaration,
+ header);
+ }
+
+ if (full_decl->Declaration.Array) {
+ struct tgsi_declaration_array *da;
+
+ if (maxsize <= size) {
+ return 0;
+ }
+ da = (struct tgsi_declaration_array *)&tokens[size];
+ size++;
+ *da = tgsi_build_declaration_array(
+ full_decl->Array.ArrayID,
+ declaration,
+ header);
+ }
+ return size;
+}
+
+/*
+ * immediate
+ */
+
+static struct tgsi_immediate
+tgsi_default_immediate( void )
+{
+ struct tgsi_immediate immediate;
+
+ immediate.Type = TGSI_TOKEN_TYPE_IMMEDIATE;
+ immediate.NrTokens = 1;
+ immediate.DataType = TGSI_IMM_FLOAT32;
+ immediate.Padding = 0;
+
+ return immediate;
+}
+
+static struct tgsi_immediate
+tgsi_build_immediate(
+ struct tgsi_header *header,
+ unsigned type )
+{
+ struct tgsi_immediate immediate;
+
+ immediate = tgsi_default_immediate();
+ immediate.DataType = type;
+
+ header_bodysize_grow( header );
+
+ return immediate;
+}
+
+struct tgsi_full_immediate
+tgsi_default_full_immediate( void )
+{
+ struct tgsi_full_immediate fullimm;
+
+ fullimm.Immediate = tgsi_default_immediate();
+ fullimm.u[0].Float = 0.0f;
+ fullimm.u[1].Float = 0.0f;
+ fullimm.u[2].Float = 0.0f;
+ fullimm.u[3].Float = 0.0f;
+
+ return fullimm;
+}
+
+static void
+immediate_grow(
+ struct tgsi_immediate *immediate,
+ struct tgsi_header *header )
+{
+ assert( immediate->NrTokens < 0xFF );
+
+ immediate->NrTokens++;
+
+ header_bodysize_grow( header );
+}
+
+unsigned
+tgsi_build_full_immediate(
+ const struct tgsi_full_immediate *full_imm,
+ struct tgsi_token *tokens,
+ struct tgsi_header *header,
+ unsigned maxsize )
+{
+ unsigned size = 0, i;
+ struct tgsi_immediate *immediate;
+
+ if( maxsize <= size )
+ return 0;
+ immediate = (struct tgsi_immediate *) &tokens[size];
+ size++;
+
+ *immediate = tgsi_build_immediate( header, full_imm->Immediate.DataType );
+
+ assert( full_imm->Immediate.NrTokens <= 4 + 1 );
+
+ for( i = 0; i < full_imm->Immediate.NrTokens - 1; i++ ) {
+ union tgsi_immediate_data *data;
+
+ if( maxsize <= size )
+ return 0;
+
+ data = (union tgsi_immediate_data *) &tokens[size];
+ *data = full_imm->u[i];
+
+ immediate_grow( immediate, header );
+ size++;
+ }
+
+ return size;
+}
+
+/*
+ * instruction
+ */
+
+struct tgsi_instruction
+tgsi_default_instruction( void )
+{
+ struct tgsi_instruction instruction;
+
+ instruction.Type = TGSI_TOKEN_TYPE_INSTRUCTION;
+ instruction.NrTokens = 0;
+ instruction.Opcode = TGSI_OPCODE_MOV;
+ instruction.Saturate = TGSI_SAT_NONE;
+ instruction.Predicate = 0;
+ instruction.NumDstRegs = 1;
+ instruction.NumSrcRegs = 1;
+ instruction.Label = 0;
+ instruction.Texture = 0;
+ instruction.Padding = 0;
+
+ return instruction;
+}
+
+static struct tgsi_instruction
+tgsi_build_instruction(unsigned opcode,
+ unsigned saturate,
+ unsigned predicate,
+ unsigned num_dst_regs,
+ unsigned num_src_regs,
+ struct tgsi_header *header)
+{
+ struct tgsi_instruction instruction;
+
+ assert (opcode <= TGSI_OPCODE_LAST);
+ assert (saturate <= TGSI_SAT_MINUS_PLUS_ONE);
+ assert (num_dst_regs <= 3);
+ assert (num_src_regs <= 15);
+
+ instruction = tgsi_default_instruction();
+ instruction.Opcode = opcode;
+ instruction.Saturate = saturate;
+ instruction.Predicate = predicate;
+ instruction.NumDstRegs = num_dst_regs;
+ instruction.NumSrcRegs = num_src_regs;
+
+ header_bodysize_grow( header );
+
+ return instruction;
+}
+
+static void
+instruction_grow(
+ struct tgsi_instruction *instruction,
+ struct tgsi_header *header )
+{
+ assert (instruction->NrTokens < 0xFF);
+
+ instruction->NrTokens++;
+
+ header_bodysize_grow( header );
+}
+
+struct tgsi_instruction_predicate
+tgsi_default_instruction_predicate(void)
+{
+ struct tgsi_instruction_predicate instruction_predicate;
+
+ instruction_predicate.SwizzleX = TGSI_SWIZZLE_X;
+ instruction_predicate.SwizzleY = TGSI_SWIZZLE_Y;
+ instruction_predicate.SwizzleZ = TGSI_SWIZZLE_Z;
+ instruction_predicate.SwizzleW = TGSI_SWIZZLE_W;
+ instruction_predicate.Negate = 0;
+ instruction_predicate.Index = 0;
+ instruction_predicate.Padding = 0;
+
+ return instruction_predicate;
+}
+
+static struct tgsi_instruction_predicate
+tgsi_build_instruction_predicate(int index,
+ unsigned negate,
+ unsigned swizzleX,
+ unsigned swizzleY,
+ unsigned swizzleZ,
+ unsigned swizzleW,
+ struct tgsi_instruction *instruction,
+ struct tgsi_header *header)
+{
+ struct tgsi_instruction_predicate instruction_predicate;
+
+ instruction_predicate = tgsi_default_instruction_predicate();
+ instruction_predicate.SwizzleX = swizzleX;
+ instruction_predicate.SwizzleY = swizzleY;
+ instruction_predicate.SwizzleZ = swizzleZ;
+ instruction_predicate.SwizzleW = swizzleW;
+ instruction_predicate.Negate = negate;
+ instruction_predicate.Index = index;
+
+ instruction_grow(instruction, header);
+
+ return instruction_predicate;
+}
+
+static struct tgsi_instruction_label
+tgsi_default_instruction_label( void )
+{
+ struct tgsi_instruction_label instruction_label;
+
+ instruction_label.Label = 0;
+ instruction_label.Padding = 0;
+
+ return instruction_label;
+}
+
+static struct tgsi_instruction_label
+tgsi_build_instruction_label(
+ unsigned label,
+ struct tgsi_token *prev_token,
+ struct tgsi_instruction *instruction,
+ struct tgsi_header *header )
+{
+ struct tgsi_instruction_label instruction_label;
+
+ instruction_label.Label = label;
+ instruction_label.Padding = 0;
+ instruction->Label = 1;
+
+ instruction_grow( instruction, header );
+
+ return instruction_label;
+}
+
+static struct tgsi_instruction_texture
+tgsi_default_instruction_texture( void )
+{
+ struct tgsi_instruction_texture instruction_texture;
+
+ instruction_texture.Texture = TGSI_TEXTURE_UNKNOWN;
+ instruction_texture.NumOffsets = 0;
+ instruction_texture.Padding = 0;
+
+ return instruction_texture;
+}
+
+static struct tgsi_instruction_texture
+tgsi_build_instruction_texture(
+ unsigned texture,
+ unsigned num_offsets,
+ struct tgsi_token *prev_token,
+ struct tgsi_instruction *instruction,
+ struct tgsi_header *header )
+{
+ struct tgsi_instruction_texture instruction_texture;
+
+ instruction_texture.Texture = texture;
+ instruction_texture.NumOffsets = num_offsets;
+ instruction_texture.Padding = 0;
+ instruction->Texture = 1;
+
+ instruction_grow( instruction, header );
+
+ return instruction_texture;
+}
+
+
+static struct tgsi_texture_offset
+tgsi_default_texture_offset( void )
+{
+ struct tgsi_texture_offset texture_offset;
+
+ texture_offset.Index = 0;
+ texture_offset.File = 0;
+ texture_offset.SwizzleX = 0;
+ texture_offset.SwizzleY = 0;
+ texture_offset.SwizzleZ = 0;
+ texture_offset.Padding = 0;
+
+ return texture_offset;
+}
+
+static struct tgsi_texture_offset
+tgsi_build_texture_offset(
+ int index, int file, int swizzle_x, int swizzle_y, int swizzle_z,
+ struct tgsi_token *prev_token,
+ struct tgsi_instruction *instruction,
+ struct tgsi_header *header )
+{
+ struct tgsi_texture_offset texture_offset;
+
+ texture_offset.Index = index;
+ texture_offset.File = file;
+ texture_offset.SwizzleX = swizzle_x;
+ texture_offset.SwizzleY = swizzle_y;
+ texture_offset.SwizzleZ = swizzle_z;
+ texture_offset.Padding = 0;
+
+ instruction_grow( instruction, header );
+
+ return texture_offset;
+}
+
+static struct tgsi_src_register
+tgsi_default_src_register( void )
+{
+ struct tgsi_src_register src_register;
+
+ src_register.File = TGSI_FILE_NULL;
+ src_register.SwizzleX = TGSI_SWIZZLE_X;
+ src_register.SwizzleY = TGSI_SWIZZLE_Y;
+ src_register.SwizzleZ = TGSI_SWIZZLE_Z;
+ src_register.SwizzleW = TGSI_SWIZZLE_W;
+ src_register.Negate = 0;
+ src_register.Absolute = 0;
+ src_register.Indirect = 0;
+ src_register.Dimension = 0;
+ src_register.Index = 0;
+
+ return src_register;
+}
+
+static struct tgsi_src_register
+tgsi_build_src_register(
+ unsigned file,
+ unsigned swizzle_x,
+ unsigned swizzle_y,
+ unsigned swizzle_z,
+ unsigned swizzle_w,
+ unsigned negate,
+ unsigned absolute,
+ unsigned indirect,
+ unsigned dimension,
+ int index,
+ struct tgsi_instruction *instruction,
+ struct tgsi_header *header )
+{
+ struct tgsi_src_register src_register;
+
+ assert( file < TGSI_FILE_COUNT );
+ assert( swizzle_x <= TGSI_SWIZZLE_W );
+ assert( swizzle_y <= TGSI_SWIZZLE_W );
+ assert( swizzle_z <= TGSI_SWIZZLE_W );
+ assert( swizzle_w <= TGSI_SWIZZLE_W );
+ assert( negate <= 1 );
+ assert( index >= -0x8000 && index <= 0x7FFF );
+
+ src_register.File = file;
+ src_register.SwizzleX = swizzle_x;
+ src_register.SwizzleY = swizzle_y;
+ src_register.SwizzleZ = swizzle_z;
+ src_register.SwizzleW = swizzle_w;
+ src_register.Negate = negate;
+ src_register.Absolute = absolute;
+ src_register.Indirect = indirect;
+ src_register.Dimension = dimension;
+ src_register.Index = index;
+
+ instruction_grow( instruction, header );
+
+ return src_register;
+}
+
+static struct tgsi_ind_register
+tgsi_default_ind_register( void )
+{
+ struct tgsi_ind_register ind_register;
+
+ ind_register.File = TGSI_FILE_NULL;
+ ind_register.Index = 0;
+ ind_register.Swizzle = TGSI_SWIZZLE_X;
+ ind_register.ArrayID = 0;
+
+ return ind_register;
+}
+
+static struct tgsi_ind_register
+tgsi_build_ind_register(
+ unsigned file,
+ unsigned swizzle,
+ int index,
+ unsigned arrayid,
+ struct tgsi_instruction *instruction,
+ struct tgsi_header *header )
+{
+ struct tgsi_ind_register ind_register;
+
+ assert( file < TGSI_FILE_COUNT );
+ assert( swizzle <= TGSI_SWIZZLE_W );
+ assert( index >= -0x8000 && index <= 0x7FFF );
+
+ ind_register.File = file;
+ ind_register.Swizzle = swizzle;
+ ind_register.Index = index;
+ ind_register.ArrayID = arrayid;
+
+ instruction_grow( instruction, header );
+
+ return ind_register;
+}
+
+static struct tgsi_dimension
+tgsi_default_dimension( void )
+{
+ struct tgsi_dimension dimension;
+
+ dimension.Indirect = 0;
+ dimension.Dimension = 0;
+ dimension.Padding = 0;
+ dimension.Index = 0;
+
+ return dimension;
+}
+
+static struct tgsi_full_src_register
+tgsi_default_full_src_register( void )
+{
+ struct tgsi_full_src_register full_src_register;
+
+ full_src_register.Register = tgsi_default_src_register();
+ full_src_register.Indirect = tgsi_default_ind_register();
+ full_src_register.Dimension = tgsi_default_dimension();
+ full_src_register.DimIndirect = tgsi_default_ind_register();
+
+ return full_src_register;
+}
+
+static struct tgsi_dimension
+tgsi_build_dimension(
+ unsigned indirect,
+ unsigned index,
+ struct tgsi_instruction *instruction,
+ struct tgsi_header *header )
+{
+ struct tgsi_dimension dimension;
+
+ dimension.Indirect = indirect;
+ dimension.Dimension = 0;
+ dimension.Padding = 0;
+ dimension.Index = index;
+
+ instruction_grow( instruction, header );
+
+ return dimension;
+}
+
+static struct tgsi_dst_register
+tgsi_default_dst_register( void )
+{
+ struct tgsi_dst_register dst_register;
+
+ dst_register.File = TGSI_FILE_NULL;
+ dst_register.WriteMask = TGSI_WRITEMASK_XYZW;
+ dst_register.Indirect = 0;
+ dst_register.Dimension = 0;
+ dst_register.Index = 0;
+ dst_register.Padding = 0;
+
+ return dst_register;
+}
+
+static struct tgsi_dst_register
+tgsi_build_dst_register(
+ unsigned file,
+ unsigned mask,
+ unsigned indirect,
+ unsigned dimension,
+ int index,
+ struct tgsi_instruction *instruction,
+ struct tgsi_header *header )
+{
+ struct tgsi_dst_register dst_register;
+
+ assert( file < TGSI_FILE_COUNT );
+ assert( mask <= TGSI_WRITEMASK_XYZW );
+ assert( index >= -32768 && index <= 32767 );
+
+ dst_register.File = file;
+ dst_register.WriteMask = mask;
+ dst_register.Indirect = indirect;
+ dst_register.Dimension = dimension;
+ dst_register.Index = index;
+ dst_register.Padding = 0;
+
+ instruction_grow( instruction, header );
+
+ return dst_register;
+}
+
+static struct tgsi_full_dst_register
+tgsi_default_full_dst_register( void )
+{
+ struct tgsi_full_dst_register full_dst_register;
+
+ full_dst_register.Register = tgsi_default_dst_register();
+ full_dst_register.Indirect = tgsi_default_ind_register();
+ full_dst_register.Dimension = tgsi_default_dimension();
+ full_dst_register.DimIndirect = tgsi_default_ind_register();
+
+ return full_dst_register;
+}
+
+struct tgsi_full_instruction
+tgsi_default_full_instruction( void )
+{
+ struct tgsi_full_instruction full_instruction;
+ unsigned i;
+
+ full_instruction.Instruction = tgsi_default_instruction();
+ full_instruction.Predicate = tgsi_default_instruction_predicate();
+ full_instruction.Label = tgsi_default_instruction_label();
+ full_instruction.Texture = tgsi_default_instruction_texture();
+ for( i = 0; i < TGSI_FULL_MAX_TEX_OFFSETS; i++ ) {
+ full_instruction.TexOffsets[i] = tgsi_default_texture_offset();
+ }
+ for( i = 0; i < TGSI_FULL_MAX_DST_REGISTERS; i++ ) {
+ full_instruction.Dst[i] = tgsi_default_full_dst_register();
+ }
+ for( i = 0; i < TGSI_FULL_MAX_SRC_REGISTERS; i++ ) {
+ full_instruction.Src[i] = tgsi_default_full_src_register();
+ }
+
+ return full_instruction;
+}
+
+unsigned
+tgsi_build_full_instruction(
+ const struct tgsi_full_instruction *full_inst,
+ struct tgsi_token *tokens,
+ struct tgsi_header *header,
+ unsigned maxsize )
+{
+ unsigned size = 0;
+ unsigned i;
+ struct tgsi_instruction *instruction;
+ struct tgsi_token *prev_token;
+
+ if( maxsize <= size )
+ return 0;
+ instruction = (struct tgsi_instruction *) &tokens[size];
+ size++;
+
+ *instruction = tgsi_build_instruction(full_inst->Instruction.Opcode,
+ full_inst->Instruction.Saturate,
+ full_inst->Instruction.Predicate,
+ full_inst->Instruction.NumDstRegs,
+ full_inst->Instruction.NumSrcRegs,
+ header);
+ prev_token = (struct tgsi_token *) instruction;
+
+ if (full_inst->Instruction.Predicate) {
+ struct tgsi_instruction_predicate *instruction_predicate;
+
+ if (maxsize <= size) {
+ return 0;
+ }
+ instruction_predicate = (struct tgsi_instruction_predicate *)&tokens[size];
+ size++;
+
+ *instruction_predicate =
+ tgsi_build_instruction_predicate(full_inst->Predicate.Index,
+ full_inst->Predicate.Negate,
+ full_inst->Predicate.SwizzleX,
+ full_inst->Predicate.SwizzleY,
+ full_inst->Predicate.SwizzleZ,
+ full_inst->Predicate.SwizzleW,
+ instruction,
+ header);
+ }
+
+ if (full_inst->Instruction.Label) {
+ struct tgsi_instruction_label *instruction_label;
+
+ if( maxsize <= size )
+ return 0;
+ instruction_label =
+ (struct tgsi_instruction_label *) &tokens[size];
+ size++;
+
+ *instruction_label = tgsi_build_instruction_label(
+ full_inst->Label.Label,
+ prev_token,
+ instruction,
+ header );
+ prev_token = (struct tgsi_token *) instruction_label;
+ }
+
+ if (full_inst->Instruction.Texture) {
+ struct tgsi_instruction_texture *instruction_texture;
+
+ if( maxsize <= size )
+ return 0;
+ instruction_texture =
+ (struct tgsi_instruction_texture *) &tokens[size];
+ size++;
+
+ *instruction_texture = tgsi_build_instruction_texture(
+ full_inst->Texture.Texture,
+ full_inst->Texture.NumOffsets,
+ prev_token,
+ instruction,
+ header );
+ prev_token = (struct tgsi_token *) instruction_texture;
+
+ for (i = 0; i < full_inst->Texture.NumOffsets; i++) {
+ struct tgsi_texture_offset *texture_offset;
+
+ if ( maxsize <= size )
+ return 0;
+ texture_offset = (struct tgsi_texture_offset *)&tokens[size];
+ size++;
+ *texture_offset = tgsi_build_texture_offset(
+ full_inst->TexOffsets[i].Index,
+ full_inst->TexOffsets[i].File,
+ full_inst->TexOffsets[i].SwizzleX,
+ full_inst->TexOffsets[i].SwizzleY,
+ full_inst->TexOffsets[i].SwizzleZ,
+ prev_token,
+ instruction,
+ header);
+ prev_token = (struct tgsi_token *) texture_offset;
+ }
+ }
+ for( i = 0; i < full_inst->Instruction.NumDstRegs; i++ ) {
+ const struct tgsi_full_dst_register *reg = &full_inst->Dst[i];
+ struct tgsi_dst_register *dst_register;
+
+ if( maxsize <= size )
+ return 0;
+ dst_register = (struct tgsi_dst_register *) &tokens[size];
+ size++;
+
+ *dst_register = tgsi_build_dst_register(
+ reg->Register.File,
+ reg->Register.WriteMask,
+ reg->Register.Indirect,
+ reg->Register.Dimension,
+ reg->Register.Index,
+ instruction,
+ header );
+
+ if( reg->Register.Indirect ) {
+ struct tgsi_ind_register *ind;
+
+ if( maxsize <= size )
+ return 0;
+ ind = (struct tgsi_ind_register *) &tokens[size];
+ size++;
+
+ *ind = tgsi_build_ind_register(
+ reg->Indirect.File,
+ reg->Indirect.Swizzle,
+ reg->Indirect.Index,
+ reg->Indirect.ArrayID,
+ instruction,
+ header );
+ }
+
+ if( reg->Register.Dimension ) {
+ struct tgsi_dimension *dim;
+
+ assert( !reg->Dimension.Dimension );
+
+ if( maxsize <= size )
+ return 0;
+ dim = (struct tgsi_dimension *) &tokens[size];
+ size++;
+
+ *dim = tgsi_build_dimension(
+ reg->Dimension.Indirect,
+ reg->Dimension.Index,
+ instruction,
+ header );
+
+ if( reg->Dimension.Indirect ) {
+ struct tgsi_ind_register *ind;
+
+ if( maxsize <= size )
+ return 0;
+ ind = (struct tgsi_ind_register *) &tokens[size];
+ size++;
+
+ *ind = tgsi_build_ind_register(
+ reg->DimIndirect.File,
+ reg->DimIndirect.Swizzle,
+ reg->DimIndirect.Index,
+ reg->DimIndirect.ArrayID,
+ instruction,
+ header );
+ }
+ }
+ }
+
+ for( i = 0; i < full_inst->Instruction.NumSrcRegs; i++ ) {
+ const struct tgsi_full_src_register *reg = &full_inst->Src[i];
+ struct tgsi_src_register *src_register;
+
+ if( maxsize <= size )
+ return 0;
+ src_register = (struct tgsi_src_register *) &tokens[size];
+ size++;
+
+ *src_register = tgsi_build_src_register(
+ reg->Register.File,
+ reg->Register.SwizzleX,
+ reg->Register.SwizzleY,
+ reg->Register.SwizzleZ,
+ reg->Register.SwizzleW,
+ reg->Register.Negate,
+ reg->Register.Absolute,
+ reg->Register.Indirect,
+ reg->Register.Dimension,
+ reg->Register.Index,
+ instruction,
+ header );
+
+ if( reg->Register.Indirect ) {
+ struct tgsi_ind_register *ind;
+
+ if( maxsize <= size )
+ return 0;
+ ind = (struct tgsi_ind_register *) &tokens[size];
+ size++;
+
+ *ind = tgsi_build_ind_register(
+ reg->Indirect.File,
+ reg->Indirect.Swizzle,
+ reg->Indirect.Index,
+ reg->Indirect.ArrayID,
+ instruction,
+ header );
+ }
+
+ if( reg->Register.Dimension ) {
+ struct tgsi_dimension *dim;
+
+ assert( !reg->Dimension.Dimension );
+
+ if( maxsize <= size )
+ return 0;
+ dim = (struct tgsi_dimension *) &tokens[size];
+ size++;
+
+ *dim = tgsi_build_dimension(
+ reg->Dimension.Indirect,
+ reg->Dimension.Index,
+ instruction,
+ header );
+
+ if( reg->Dimension.Indirect ) {
+ struct tgsi_ind_register *ind;
+
+ if( maxsize <= size )
+ return 0;
+ ind = (struct tgsi_ind_register *) &tokens[size];
+ size++;
+
+ *ind = tgsi_build_ind_register(
+ reg->DimIndirect.File,
+ reg->DimIndirect.Swizzle,
+ reg->DimIndirect.Index,
+ reg->DimIndirect.ArrayID,
+ instruction,
+ header );
+ }
+ }
+ }
+
+ return size;
+}
+
+static struct tgsi_property
+tgsi_default_property( void )
+{
+ struct tgsi_property property;
+
+ property.Type = TGSI_TOKEN_TYPE_PROPERTY;
+ property.NrTokens = 1;
+ property.PropertyName = TGSI_PROPERTY_GS_INPUT_PRIM;
+ property.Padding = 0;
+
+ return property;
+}
+
+static struct tgsi_property
+tgsi_build_property(unsigned property_name,
+ struct tgsi_header *header)
+{
+ struct tgsi_property property;
+
+ property = tgsi_default_property();
+ property.PropertyName = property_name;
+
+ header_bodysize_grow( header );
+
+ return property;
+}
+
+
+struct tgsi_full_property
+tgsi_default_full_property( void )
+{
+ struct tgsi_full_property full_property;
+
+ full_property.Property = tgsi_default_property();
+ memset(full_property.u, 0,
+ sizeof(struct tgsi_property_data) * 8);
+
+ return full_property;
+}
+
+static void
+property_grow(
+ struct tgsi_property *property,
+ struct tgsi_header *header )
+{
+ assert( property->NrTokens < 0xFF );
+
+ property->NrTokens++;
+
+ header_bodysize_grow( header );
+}
+
+static struct tgsi_property_data
+tgsi_build_property_data(
+ unsigned value,
+ struct tgsi_property *property,
+ struct tgsi_header *header )
+{
+ struct tgsi_property_data property_data;
+
+ property_data.Data = value;
+
+ property_grow( property, header );
+
+ return property_data;
+}
+
+unsigned
+tgsi_build_full_property(
+ const struct tgsi_full_property *full_prop,
+ struct tgsi_token *tokens,
+ struct tgsi_header *header,
+ unsigned maxsize )
+{
+ unsigned size = 0, i;
+ struct tgsi_property *property;
+
+ if( maxsize <= size )
+ return 0;
+ property = (struct tgsi_property *) &tokens[size];
+ size++;
+
+ *property = tgsi_build_property(
+ full_prop->Property.PropertyName,
+ header );
+
+ assert( full_prop->Property.NrTokens <= 8 + 1 );
+
+ for( i = 0; i < full_prop->Property.NrTokens - 1; i++ ) {
+ struct tgsi_property_data *data;
+
+ if( maxsize <= size )
+ return 0;
+ data = (struct tgsi_property_data *) &tokens[size];
+ size++;
+
+ *data = tgsi_build_property_data(
+ full_prop->u[i].Data,
+ property,
+ header );
+ }
+
+ return size;
+}
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_build.h b/src/minigallium/auxiliary/tgsi/tgsi_build.h
new file mode 100644
index 0000000..3f236a9
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_build.h
@@ -0,0 +1,118 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef TGSI_BUILD_H
+#define TGSI_BUILD_H
+
+
+struct tgsi_token;
+
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+
+/*
+ * header
+ */
+
+struct tgsi_header
+tgsi_build_header( void );
+
+struct tgsi_processor
+tgsi_build_processor(
+ unsigned processor,
+ struct tgsi_header *header );
+
+/*
+ * declaration
+ */
+
+struct tgsi_full_declaration
+tgsi_default_full_declaration( void );
+
+unsigned
+tgsi_build_full_declaration(
+ const struct tgsi_full_declaration *full_decl,
+ struct tgsi_token *tokens,
+ struct tgsi_header *header,
+ unsigned maxsize );
+
+/*
+ * immediate
+ */
+
+struct tgsi_full_immediate
+tgsi_default_full_immediate( void );
+
+unsigned
+tgsi_build_full_immediate(
+ const struct tgsi_full_immediate *full_imm,
+ struct tgsi_token *tokens,
+ struct tgsi_header *header,
+ unsigned maxsize );
+
+/*
+ * properties
+ */
+
+struct tgsi_full_property
+tgsi_default_full_property( void );
+
+unsigned
+tgsi_build_full_property(
+ const struct tgsi_full_property *full_prop,
+ struct tgsi_token *tokens,
+ struct tgsi_header *header,
+ unsigned maxsize );
+
+/*
+ * instruction
+ */
+
+struct tgsi_instruction
+tgsi_default_instruction( void );
+
+struct tgsi_full_instruction
+tgsi_default_full_instruction( void );
+
+unsigned
+tgsi_build_full_instruction(
+ const struct tgsi_full_instruction *full_inst,
+ struct tgsi_token *tokens,
+ struct tgsi_header *header,
+ unsigned maxsize );
+
+struct tgsi_instruction_predicate
+tgsi_default_instruction_predicate(void);
+
+#if defined __cplusplus
+}
+#endif
+
+#endif /* TGSI_BUILD_H */
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_dump.c b/src/minigallium/auxiliary/tgsi/tgsi_dump.c
new file mode 100644
index 0000000..7f6a3d8
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_dump.c
@@ -0,0 +1,723 @@
+/**************************************************************************
+ *
+ * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "util/u_debug.h"
+#include "util/u_string.h"
+#include "util/u_math.h"
+#include "util/u_memory.h"
+#include "tgsi_dump.h"
+#include "tgsi_info.h"
+#include "tgsi_iterate.h"
+#include "tgsi_strings.h"
+
+
+/** Number of spaces to indent for IF/LOOP/etc */
+static const int indent_spaces = 3;
+
+
+struct dump_ctx
+{
+ struct tgsi_iterate_context iter;
+
+ uint instno;
+ uint immno;
+ int indent;
+
+ uint indentation;
+
+ void (*dump_printf)(struct dump_ctx *ctx, const char *format, ...);
+};
+
+static void
+dump_ctx_printf(struct dump_ctx *ctx, const char *format, ...)
+{
+ va_list ap;
+ (void)ctx;
+ va_start(ap, format);
+ _debug_vprintf(format, ap);
+ va_end(ap);
+}
+
+static void
+dump_enum(
+ struct dump_ctx *ctx,
+ uint e,
+ const char **enums,
+ uint enum_count )
+{
+ if (e >= enum_count)
+ ctx->dump_printf( ctx, "%u", e );
+ else
+ ctx->dump_printf( ctx, "%s", enums[e] );
+}
+
+#define EOL() ctx->dump_printf( ctx, "\n" )
+#define TXT(S) ctx->dump_printf( ctx, "%s", S )
+#define CHR(C) ctx->dump_printf( ctx, "%c", C )
+#define UIX(I) ctx->dump_printf( ctx, "0x%x", I )
+#define UID(I) ctx->dump_printf( ctx, "%u", I )
+#define INSTID(I) ctx->dump_printf( ctx, "% 3u", I )
+#define SID(I) ctx->dump_printf( ctx, "%d", I )
+#define FLT(F) ctx->dump_printf( ctx, "%10.4f", F )
+#define ENM(E,ENUMS) dump_enum( ctx, E, ENUMS, sizeof( ENUMS ) / sizeof( *ENUMS ) )
+
+const char *
+tgsi_swizzle_names[4] =
+{
+ "x",
+ "y",
+ "z",
+ "w"
+};
+
+static void
+_dump_register_src(
+ struct dump_ctx *ctx,
+ const struct tgsi_full_src_register *src )
+{
+ TXT(tgsi_file_name(src->Register.File));
+ if (src->Register.Dimension) {
+ if (src->Dimension.Indirect) {
+ CHR( '[' );
+ TXT(tgsi_file_name(src->DimIndirect.File));
+ CHR( '[' );
+ SID( src->DimIndirect.Index );
+ TXT( "]." );
+ ENM( src->DimIndirect.Swizzle, tgsi_swizzle_names );
+ if (src->Dimension.Index != 0) {
+ if (src->Dimension.Index > 0)
+ CHR( '+' );
+ SID( src->Dimension.Index );
+ }
+ CHR( ']' );
+ if (src->DimIndirect.ArrayID) {
+ CHR( '(' );
+ SID( src->DimIndirect.ArrayID );
+ CHR( ')' );
+ }
+ } else {
+ CHR('[');
+ SID(src->Dimension.Index);
+ CHR(']');
+ }
+ }
+ if (src->Register.Indirect) {
+ CHR( '[' );
+ TXT(tgsi_file_name(src->Indirect.File));
+ CHR( '[' );
+ SID( src->Indirect.Index );
+ TXT( "]." );
+ ENM( src->Indirect.Swizzle, tgsi_swizzle_names );
+ if (src->Register.Index != 0) {
+ if (src->Register.Index > 0)
+ CHR( '+' );
+ SID( src->Register.Index );
+ }
+ CHR( ']' );
+ if (src->Indirect.ArrayID) {
+ CHR( '(' );
+ SID( src->Indirect.ArrayID );
+ CHR( ')' );
+ }
+ } else {
+ CHR( '[' );
+ SID( src->Register.Index );
+ CHR( ']' );
+ }
+}
+
+
+static void
+_dump_register_dst(
+ struct dump_ctx *ctx,
+ const struct tgsi_full_dst_register *dst )
+{
+ TXT(tgsi_file_name(dst->Register.File));
+ if (dst->Register.Dimension) {
+ if (dst->Dimension.Indirect) {
+ CHR( '[' );
+ TXT(tgsi_file_name(dst->DimIndirect.File));
+ CHR( '[' );
+ SID( dst->DimIndirect.Index );
+ TXT( "]." );
+ ENM( dst->DimIndirect.Swizzle, tgsi_swizzle_names );
+ if (dst->Dimension.Index != 0) {
+ if (dst->Dimension.Index > 0)
+ CHR( '+' );
+ SID( dst->Dimension.Index );
+ }
+ CHR( ']' );
+ if (dst->DimIndirect.ArrayID) {
+ CHR( '(' );
+ SID( dst->DimIndirect.ArrayID );
+ CHR( ')' );
+ }
+ } else {
+ CHR('[');
+ SID(dst->Dimension.Index);
+ CHR(']');
+ }
+ }
+ if (dst->Register.Indirect) {
+ CHR( '[' );
+ TXT(tgsi_file_name(dst->Indirect.File));
+ CHR( '[' );
+ SID( dst->Indirect.Index );
+ TXT( "]." );
+ ENM( dst->Indirect.Swizzle, tgsi_swizzle_names );
+ if (dst->Register.Index != 0) {
+ if (dst->Register.Index > 0)
+ CHR( '+' );
+ SID( dst->Register.Index );
+ }
+ CHR( ']' );
+ if (dst->Indirect.ArrayID) {
+ CHR( '(' );
+ SID( dst->Indirect.ArrayID );
+ CHR( ')' );
+ }
+ } else {
+ CHR( '[' );
+ SID( dst->Register.Index );
+ CHR( ']' );
+ }
+}
+static void
+_dump_writemask(
+ struct dump_ctx *ctx,
+ uint writemask )
+{
+ if (writemask != TGSI_WRITEMASK_XYZW) {
+ CHR( '.' );
+ if (writemask & TGSI_WRITEMASK_X)
+ CHR( 'x' );
+ if (writemask & TGSI_WRITEMASK_Y)
+ CHR( 'y' );
+ if (writemask & TGSI_WRITEMASK_Z)
+ CHR( 'z' );
+ if (writemask & TGSI_WRITEMASK_W)
+ CHR( 'w' );
+ }
+}
+
+static void
+dump_imm_data(struct tgsi_iterate_context *iter,
+ union tgsi_immediate_data *data,
+ unsigned num_tokens,
+ unsigned data_type)
+{
+ struct dump_ctx *ctx = (struct dump_ctx *)iter;
+ unsigned i ;
+
+ TXT( " {" );
+
+ assert( num_tokens <= 4 );
+ for (i = 0; i < num_tokens; i++) {
+ switch (data_type) {
+ case TGSI_IMM_FLOAT32:
+ FLT( data[i].Float );
+ break;
+ case TGSI_IMM_UINT32:
+ UID(data[i].Uint);
+ break;
+ case TGSI_IMM_INT32:
+ SID(data[i].Int);
+ break;
+ default:
+ assert( 0 );
+ }
+
+ if (i < num_tokens - 1)
+ TXT( ", " );
+ }
+ TXT( "}" );
+}
+
+static boolean
+iter_declaration(
+ struct tgsi_iterate_context *iter,
+ struct tgsi_full_declaration *decl )
+{
+ struct dump_ctx *ctx = (struct dump_ctx *)iter;
+
+ TXT( "DCL " );
+
+ TXT(tgsi_file_name(decl->Declaration.File));
+
+ /* all geometry shader inputs are two dimensional */
+ if (decl->Declaration.File == TGSI_FILE_INPUT &&
+ iter->processor.Processor == TGSI_PROCESSOR_GEOMETRY) {
+ TXT("[]");
+ }
+
+ if (decl->Declaration.Dimension) {
+ CHR('[');
+ SID(decl->Dim.Index2D);
+ CHR(']');
+ }
+
+ CHR('[');
+ SID(decl->Range.First);
+ if (decl->Range.First != decl->Range.Last) {
+ TXT("..");
+ SID(decl->Range.Last);
+ }
+ CHR(']');
+
+ _dump_writemask(
+ ctx,
+ decl->Declaration.UsageMask );
+
+ if (decl->Declaration.Array) {
+ TXT( ", ARRAY(" );
+ SID(decl->Array.ArrayID);
+ CHR(')');
+ }
+
+ if (decl->Declaration.Local)
+ TXT( ", LOCAL" );
+
+ if (decl->Declaration.Semantic) {
+ TXT( ", " );
+ ENM( decl->Semantic.Name, tgsi_semantic_names );
+ if (decl->Semantic.Index != 0 ||
+ decl->Semantic.Name == TGSI_SEMANTIC_TEXCOORD ||
+ decl->Semantic.Name == TGSI_SEMANTIC_GENERIC) {
+ CHR( '[' );
+ UID( decl->Semantic.Index );
+ CHR( ']' );
+ }
+ }
+
+ if (decl->Declaration.File == TGSI_FILE_RESOURCE) {
+ TXT(", ");
+ ENM(decl->Resource.Resource, tgsi_texture_names);
+ if (decl->Resource.Writable)
+ TXT(", WR");
+ if (decl->Resource.Raw)
+ TXT(", RAW");
+ }
+
+ if (decl->Declaration.File == TGSI_FILE_SAMPLER_VIEW) {
+ TXT(", ");
+ ENM(decl->SamplerView.Resource, tgsi_texture_names);
+ TXT(", ");
+ if ((decl->SamplerView.ReturnTypeX == decl->SamplerView.ReturnTypeY) &&
+ (decl->SamplerView.ReturnTypeX == decl->SamplerView.ReturnTypeZ) &&
+ (decl->SamplerView.ReturnTypeX == decl->SamplerView.ReturnTypeW)) {
+ ENM(decl->SamplerView.ReturnTypeX, tgsi_type_names);
+ } else {
+ ENM(decl->SamplerView.ReturnTypeX, tgsi_type_names);
+ TXT(", ");
+ ENM(decl->SamplerView.ReturnTypeY, tgsi_type_names);
+ TXT(", ");
+ ENM(decl->SamplerView.ReturnTypeZ, tgsi_type_names);
+ TXT(", ");
+ ENM(decl->SamplerView.ReturnTypeW, tgsi_type_names);
+ }
+ }
+
+ if (decl->Declaration.Interpolate) {
+ if (iter->processor.Processor == TGSI_PROCESSOR_FRAGMENT &&
+ decl->Declaration.File == TGSI_FILE_INPUT)
+ {
+ TXT( ", " );
+ ENM( decl->Interp.Interpolate, tgsi_interpolate_names );
+ }
+
+ if (decl->Interp.Centroid) {
+ TXT( ", CENTROID" );
+ }
+
+ if (decl->Interp.CylindricalWrap) {
+ TXT(", CYLWRAP_");
+ if (decl->Interp.CylindricalWrap & TGSI_CYLINDRICAL_WRAP_X) {
+ CHR('X');
+ }
+ if (decl->Interp.CylindricalWrap & TGSI_CYLINDRICAL_WRAP_Y) {
+ CHR('Y');
+ }
+ if (decl->Interp.CylindricalWrap & TGSI_CYLINDRICAL_WRAP_Z) {
+ CHR('Z');
+ }
+ if (decl->Interp.CylindricalWrap & TGSI_CYLINDRICAL_WRAP_W) {
+ CHR('W');
+ }
+ }
+ }
+
+ if (decl->Declaration.Invariant) {
+ TXT( ", INVARIANT" );
+ }
+
+ EOL();
+
+ return TRUE;
+}
+
+void
+tgsi_dump_declaration(
+ const struct tgsi_full_declaration *decl )
+{
+ struct dump_ctx ctx;
+
+ ctx.dump_printf = dump_ctx_printf;
+
+ iter_declaration( &ctx.iter, (struct tgsi_full_declaration *)decl );
+}
+
+static boolean
+iter_property(
+ struct tgsi_iterate_context *iter,
+ struct tgsi_full_property *prop )
+{
+ unsigned i;
+ struct dump_ctx *ctx = (struct dump_ctx *)iter;
+
+ TXT( "PROPERTY " );
+ ENM(prop->Property.PropertyName, tgsi_property_names);
+
+ if (prop->Property.NrTokens > 1)
+ TXT(" ");
+
+ for (i = 0; i < prop->Property.NrTokens - 1; ++i) {
+ switch (prop->Property.PropertyName) {
+ case TGSI_PROPERTY_GS_INPUT_PRIM:
+ case TGSI_PROPERTY_GS_OUTPUT_PRIM:
+ ENM(prop->u[i].Data, tgsi_primitive_names);
+ break;
+ case TGSI_PROPERTY_FS_COORD_ORIGIN:
+ ENM(prop->u[i].Data, tgsi_fs_coord_origin_names);
+ break;
+ case TGSI_PROPERTY_FS_COORD_PIXEL_CENTER:
+ ENM(prop->u[i].Data, tgsi_fs_coord_pixel_center_names);
+ break;
+ default:
+ SID( prop->u[i].Data );
+ break;
+ }
+ if (i < prop->Property.NrTokens - 2)
+ TXT( ", " );
+ }
+ EOL();
+
+ return TRUE;
+}
+
+void tgsi_dump_property(
+ const struct tgsi_full_property *prop )
+{
+ struct dump_ctx ctx;
+
+ ctx.dump_printf = dump_ctx_printf;
+
+ iter_property( &ctx.iter, (struct tgsi_full_property *)prop );
+}
+
+static boolean
+iter_immediate(
+ struct tgsi_iterate_context *iter,
+ struct tgsi_full_immediate *imm )
+{
+ struct dump_ctx *ctx = (struct dump_ctx *) iter;
+
+ TXT( "IMM[" );
+ SID( ctx->immno++ );
+ TXT( "] " );
+ ENM( imm->Immediate.DataType, tgsi_immediate_type_names );
+
+ dump_imm_data(iter, imm->u, imm->Immediate.NrTokens - 1,
+ imm->Immediate.DataType);
+
+ EOL();
+
+ return TRUE;
+}
+
+void
+tgsi_dump_immediate(
+ const struct tgsi_full_immediate *imm )
+{
+ struct dump_ctx ctx;
+
+ ctx.dump_printf = dump_ctx_printf;
+
+ iter_immediate( &ctx.iter, (struct tgsi_full_immediate *)imm );
+}
+
+static boolean
+iter_instruction(
+ struct tgsi_iterate_context *iter,
+ struct tgsi_full_instruction *inst )
+{
+ struct dump_ctx *ctx = (struct dump_ctx *) iter;
+ uint instno = ctx->instno++;
+ const struct tgsi_opcode_info *info = tgsi_get_opcode_info( inst->Instruction.Opcode );
+ uint i;
+ boolean first_reg = TRUE;
+
+ INSTID( instno );
+ TXT( ": " );
+
+ ctx->indent -= info->pre_dedent;
+ for(i = 0; (int)i < ctx->indent; ++i)
+ TXT( " " );
+ ctx->indent += info->post_indent;
+
+ if (inst->Instruction.Predicate) {
+ CHR( '(' );
+
+ if (inst->Predicate.Negate)
+ CHR( '!' );
+
+ TXT( "PRED[" );
+ SID( inst->Predicate.Index );
+ CHR( ']' );
+
+ if (inst->Predicate.SwizzleX != TGSI_SWIZZLE_X ||
+ inst->Predicate.SwizzleY != TGSI_SWIZZLE_Y ||
+ inst->Predicate.SwizzleZ != TGSI_SWIZZLE_Z ||
+ inst->Predicate.SwizzleW != TGSI_SWIZZLE_W) {
+ CHR( '.' );
+ ENM( inst->Predicate.SwizzleX, tgsi_swizzle_names );
+ ENM( inst->Predicate.SwizzleY, tgsi_swizzle_names );
+ ENM( inst->Predicate.SwizzleZ, tgsi_swizzle_names );
+ ENM( inst->Predicate.SwizzleW, tgsi_swizzle_names );
+ }
+
+ TXT( ") " );
+ }
+
+ TXT( info->mnemonic );
+
+ switch (inst->Instruction.Saturate) {
+ case TGSI_SAT_NONE:
+ break;
+ case TGSI_SAT_ZERO_ONE:
+ TXT( "_SAT" );
+ break;
+ case TGSI_SAT_MINUS_PLUS_ONE:
+ TXT( "_SATNV" );
+ break;
+ default:
+ assert( 0 );
+ }
+
+ for (i = 0; i < inst->Instruction.NumDstRegs; i++) {
+ const struct tgsi_full_dst_register *dst = &inst->Dst[i];
+
+ if (!first_reg)
+ CHR( ',' );
+ CHR( ' ' );
+
+ _dump_register_dst( ctx, dst );
+ _dump_writemask( ctx, dst->Register.WriteMask );
+
+ first_reg = FALSE;
+ }
+
+ for (i = 0; i < inst->Instruction.NumSrcRegs; i++) {
+ const struct tgsi_full_src_register *src = &inst->Src[i];
+
+ if (!first_reg)
+ CHR( ',' );
+ CHR( ' ' );
+
+ if (src->Register.Negate)
+ CHR( '-' );
+ if (src->Register.Absolute)
+ CHR( '|' );
+
+ _dump_register_src(ctx, src);
+
+ if (src->Register.SwizzleX != TGSI_SWIZZLE_X ||
+ src->Register.SwizzleY != TGSI_SWIZZLE_Y ||
+ src->Register.SwizzleZ != TGSI_SWIZZLE_Z ||
+ src->Register.SwizzleW != TGSI_SWIZZLE_W) {
+ CHR( '.' );
+ ENM( src->Register.SwizzleX, tgsi_swizzle_names );
+ ENM( src->Register.SwizzleY, tgsi_swizzle_names );
+ ENM( src->Register.SwizzleZ, tgsi_swizzle_names );
+ ENM( src->Register.SwizzleW, tgsi_swizzle_names );
+ }
+
+ if (src->Register.Absolute)
+ CHR( '|' );
+
+ first_reg = FALSE;
+ }
+
+ if (inst->Instruction.Texture) {
+ TXT( ", " );
+ ENM( inst->Texture.Texture, tgsi_texture_names );
+ for (i = 0; i < inst->Texture.NumOffsets; i++) {
+ TXT( ", " );
+ TXT(tgsi_file_name(inst->TexOffsets[i].File));
+ CHR( '[' );
+ SID( inst->TexOffsets[i].Index );
+ CHR( ']' );
+ CHR( '.' );
+ ENM( inst->TexOffsets[i].SwizzleX, tgsi_swizzle_names);
+ ENM( inst->TexOffsets[i].SwizzleY, tgsi_swizzle_names);
+ ENM( inst->TexOffsets[i].SwizzleZ, tgsi_swizzle_names);
+ }
+ }
+
+ switch (inst->Instruction.Opcode) {
+ case TGSI_OPCODE_IF:
+ case TGSI_OPCODE_UIF:
+ case TGSI_OPCODE_ELSE:
+ case TGSI_OPCODE_BGNLOOP:
+ case TGSI_OPCODE_ENDLOOP:
+ case TGSI_OPCODE_CAL:
+ TXT( " :" );
+ UID( inst->Label.Label );
+ break;
+ }
+
+ /* update indentation */
+ if (inst->Instruction.Opcode == TGSI_OPCODE_IF ||
+ inst->Instruction.Opcode == TGSI_OPCODE_UIF ||
+ inst->Instruction.Opcode == TGSI_OPCODE_ELSE ||
+ inst->Instruction.Opcode == TGSI_OPCODE_BGNLOOP) {
+ ctx->indentation += indent_spaces;
+ }
+
+ EOL();
+
+ return TRUE;
+}
+
+void
+tgsi_dump_instruction(
+ const struct tgsi_full_instruction *inst,
+ uint instno )
+{
+ struct dump_ctx ctx;
+
+ ctx.instno = instno;
+ ctx.immno = instno;
+ ctx.indent = 0;
+ ctx.dump_printf = dump_ctx_printf;
+ ctx.indentation = 0;
+
+ iter_instruction( &ctx.iter, (struct tgsi_full_instruction *)inst );
+}
+
+static boolean
+prolog(
+ struct tgsi_iterate_context *iter )
+{
+ struct dump_ctx *ctx = (struct dump_ctx *) iter;
+ ENM( iter->processor.Processor, tgsi_processor_type_names );
+ EOL();
+ return TRUE;
+}
+
+void
+tgsi_dump(
+ const struct tgsi_token *tokens,
+ uint flags )
+{
+ struct dump_ctx ctx;
+
+ ctx.iter.prolog = prolog;
+ ctx.iter.iterate_instruction = iter_instruction;
+ ctx.iter.iterate_declaration = iter_declaration;
+ ctx.iter.iterate_immediate = iter_immediate;
+ ctx.iter.iterate_property = iter_property;
+ ctx.iter.epilog = NULL;
+
+ ctx.instno = 0;
+ ctx.immno = 0;
+ ctx.indent = 0;
+ ctx.dump_printf = dump_ctx_printf;
+ ctx.indentation = 0;
+
+ tgsi_iterate_shader( tokens, &ctx.iter );
+}
+
+struct str_dump_ctx
+{
+ struct dump_ctx base;
+ char *str;
+ char *ptr;
+ int left;
+};
+
+static void
+str_dump_ctx_printf(struct dump_ctx *ctx, const char *format, ...)
+{
+ struct str_dump_ctx *sctx = (struct str_dump_ctx *)ctx;
+
+ if(sctx->left > 1) {
+ int written;
+ va_list ap;
+ va_start(ap, format);
+ written = util_vsnprintf(sctx->ptr, sctx->left, format, ap);
+ va_end(ap);
+
+ /* Some complicated logic needed to handle the return value of
+ * vsnprintf:
+ */
+ if (written > 0) {
+ written = MIN2(sctx->left, written);
+ sctx->ptr += written;
+ sctx->left -= written;
+ }
+ }
+}
+
+void
+tgsi_dump_str(
+ const struct tgsi_token *tokens,
+ uint flags,
+ char *str,
+ size_t size)
+{
+ struct str_dump_ctx ctx;
+
+ ctx.base.iter.prolog = prolog;
+ ctx.base.iter.iterate_instruction = iter_instruction;
+ ctx.base.iter.iterate_declaration = iter_declaration;
+ ctx.base.iter.iterate_immediate = iter_immediate;
+ ctx.base.iter.iterate_property = iter_property;
+ ctx.base.iter.epilog = NULL;
+
+ ctx.base.instno = 0;
+ ctx.base.immno = 0;
+ ctx.base.indent = 0;
+ ctx.base.dump_printf = &str_dump_ctx_printf;
+ ctx.base.indentation = 0;
+
+ ctx.str = str;
+ ctx.str[0] = 0;
+ ctx.ptr = str;
+ ctx.left = (int)size;
+
+ tgsi_iterate_shader( tokens, &ctx.base.iter );
+}
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_dump.h b/src/minigallium/auxiliary/tgsi/tgsi_dump.h
new file mode 100644
index 0000000..adaef9d
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_dump.h
@@ -0,0 +1,77 @@
+/**************************************************************************
+ *
+ * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef TGSI_DUMP_H
+#define TGSI_DUMP_H
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_shader_tokens.h"
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+void
+tgsi_dump_str(
+ const struct tgsi_token *tokens,
+ uint flags,
+ char *str,
+ size_t size);
+
+void
+tgsi_dump(
+ const struct tgsi_token *tokens,
+ uint flags );
+
+struct tgsi_full_immediate;
+struct tgsi_full_instruction;
+struct tgsi_full_declaration;
+struct tgsi_full_property;
+
+void
+tgsi_dump_immediate(
+ const struct tgsi_full_immediate *imm );
+
+void
+tgsi_dump_instruction(
+ const struct tgsi_full_instruction *inst,
+ uint instno );
+
+void
+tgsi_dump_declaration(
+ const struct tgsi_full_declaration *decl );
+
+void
+tgsi_dump_property(
+ const struct tgsi_full_property *prop );
+
+#if defined __cplusplus
+}
+#endif
+
+#endif /* TGSI_DUMP_H */
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_exec.c b/src/minigallium/auxiliary/tgsi/tgsi_exec.c
new file mode 100644
index 0000000..0750a50
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_exec.c
@@ -0,0 +1,4536 @@
+/**************************************************************************
+ *
+ * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ * Copyright 2009-2010 VMware, Inc. All rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * TGSI interpreter/executor.
+ *
+ * Flow control information:
+ *
+ * Since we operate on 'quads' (4 pixels or 4 vertices in parallel)
+ * flow control statements (IF/ELSE/ENDIF, LOOP/ENDLOOP) require special
+ * care since a condition may be true for some quad components but false
+ * for other components.
+ *
+ * We basically execute all statements (even if they're in the part of
+ * an IF/ELSE clause that's "not taken") and use a special mask to
+ * control writing to destination registers. This is the ExecMask.
+ * See store_dest().
+ *
+ * The ExecMask is computed from three other masks (CondMask, LoopMask and
+ * ContMask) which are controlled by the flow control instructions (namely:
+ * (IF/ELSE/ENDIF, LOOP/ENDLOOP and CONT).
+ *
+ *
+ * Authors:
+ * Michal Krol
+ * Brian Paul
+ */
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_state.h"
+#include "pipe/p_shader_tokens.h"
+#include "tgsi/tgsi_dump.h"
+#include "tgsi/tgsi_parse.h"
+#include "tgsi/tgsi_util.h"
+#include "tgsi_exec.h"
+#include "util/u_memory.h"
+#include "util/u_math.h"
+
+
+#define DEBUG_EXECUTION 0
+
+
+#define FAST_MATH 0
+
+#define TILE_TOP_LEFT 0
+#define TILE_TOP_RIGHT 1
+#define TILE_BOTTOM_LEFT 2
+#define TILE_BOTTOM_RIGHT 3
+
+static void
+micro_abs(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->f[0] = fabsf(src->f[0]);
+ dst->f[1] = fabsf(src->f[1]);
+ dst->f[2] = fabsf(src->f[2]);
+ dst->f[3] = fabsf(src->f[3]);
+}
+
+static void
+micro_arl(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->i[0] = (int)floorf(src->f[0]);
+ dst->i[1] = (int)floorf(src->f[1]);
+ dst->i[2] = (int)floorf(src->f[2]);
+ dst->i[3] = (int)floorf(src->f[3]);
+}
+
+static void
+micro_arr(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->i[0] = (int)floorf(src->f[0] + 0.5f);
+ dst->i[1] = (int)floorf(src->f[1] + 0.5f);
+ dst->i[2] = (int)floorf(src->f[2] + 0.5f);
+ dst->i[3] = (int)floorf(src->f[3] + 0.5f);
+}
+
+static void
+micro_ceil(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->f[0] = ceilf(src->f[0]);
+ dst->f[1] = ceilf(src->f[1]);
+ dst->f[2] = ceilf(src->f[2]);
+ dst->f[3] = ceilf(src->f[3]);
+}
+
+static void
+micro_clamp(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1,
+ const union tgsi_exec_channel *src2)
+{
+ dst->f[0] = src0->f[0] < src1->f[0] ? src1->f[0] : src0->f[0] > src2->f[0] ? src2->f[0] : src0->f[0];
+ dst->f[1] = src0->f[1] < src1->f[1] ? src1->f[1] : src0->f[1] > src2->f[1] ? src2->f[1] : src0->f[1];
+ dst->f[2] = src0->f[2] < src1->f[2] ? src1->f[2] : src0->f[2] > src2->f[2] ? src2->f[2] : src0->f[2];
+ dst->f[3] = src0->f[3] < src1->f[3] ? src1->f[3] : src0->f[3] > src2->f[3] ? src2->f[3] : src0->f[3];
+}
+
+static void
+micro_cmp(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1,
+ const union tgsi_exec_channel *src2)
+{
+ dst->f[0] = src0->f[0] < 0.0f ? src1->f[0] : src2->f[0];
+ dst->f[1] = src0->f[1] < 0.0f ? src1->f[1] : src2->f[1];
+ dst->f[2] = src0->f[2] < 0.0f ? src1->f[2] : src2->f[2];
+ dst->f[3] = src0->f[3] < 0.0f ? src1->f[3] : src2->f[3];
+}
+
+static void
+micro_cnd(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1,
+ const union tgsi_exec_channel *src2)
+{
+ dst->f[0] = src2->f[0] > 0.5f ? src0->f[0] : src1->f[0];
+ dst->f[1] = src2->f[1] > 0.5f ? src0->f[1] : src1->f[1];
+ dst->f[2] = src2->f[2] > 0.5f ? src0->f[2] : src1->f[2];
+ dst->f[3] = src2->f[3] > 0.5f ? src0->f[3] : src1->f[3];
+}
+
+static void
+micro_cos(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->f[0] = cosf(src->f[0]);
+ dst->f[1] = cosf(src->f[1]);
+ dst->f[2] = cosf(src->f[2]);
+ dst->f[3] = cosf(src->f[3]);
+}
+
+static void
+micro_ddx(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->f[0] =
+ dst->f[1] =
+ dst->f[2] =
+ dst->f[3] = src->f[TILE_BOTTOM_RIGHT] - src->f[TILE_BOTTOM_LEFT];
+}
+
+static void
+micro_ddy(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->f[0] =
+ dst->f[1] =
+ dst->f[2] =
+ dst->f[3] = src->f[TILE_BOTTOM_LEFT] - src->f[TILE_TOP_LEFT];
+}
+
+static void
+micro_exp2(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+#if FAST_MATH
+ dst->f[0] = util_fast_exp2(src->f[0]);
+ dst->f[1] = util_fast_exp2(src->f[1]);
+ dst->f[2] = util_fast_exp2(src->f[2]);
+ dst->f[3] = util_fast_exp2(src->f[3]);
+#else
+#if DEBUG
+ /* Inf is okay for this instruction, so clamp it to silence assertions. */
+ uint i;
+ union tgsi_exec_channel clamped;
+
+ for (i = 0; i < 4; i++) {
+ if (src->f[i] > 127.99999f) {
+ clamped.f[i] = 127.99999f;
+ } else if (src->f[i] < -126.99999f) {
+ clamped.f[i] = -126.99999f;
+ } else {
+ clamped.f[i] = src->f[i];
+ }
+ }
+ src = &clamped;
+#endif /* DEBUG */
+
+ dst->f[0] = powf(2.0f, src->f[0]);
+ dst->f[1] = powf(2.0f, src->f[1]);
+ dst->f[2] = powf(2.0f, src->f[2]);
+ dst->f[3] = powf(2.0f, src->f[3]);
+#endif /* FAST_MATH */
+}
+
+static void
+micro_flr(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->f[0] = floorf(src->f[0]);
+ dst->f[1] = floorf(src->f[1]);
+ dst->f[2] = floorf(src->f[2]);
+ dst->f[3] = floorf(src->f[3]);
+}
+
+static void
+micro_frc(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->f[0] = src->f[0] - floorf(src->f[0]);
+ dst->f[1] = src->f[1] - floorf(src->f[1]);
+ dst->f[2] = src->f[2] - floorf(src->f[2]);
+ dst->f[3] = src->f[3] - floorf(src->f[3]);
+}
+
+static void
+micro_iabs(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->i[0] = src->i[0] >= 0 ? src->i[0] : -src->i[0];
+ dst->i[1] = src->i[1] >= 0 ? src->i[1] : -src->i[1];
+ dst->i[2] = src->i[2] >= 0 ? src->i[2] : -src->i[2];
+ dst->i[3] = src->i[3] >= 0 ? src->i[3] : -src->i[3];
+}
+
+static void
+micro_ineg(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->i[0] = -src->i[0];
+ dst->i[1] = -src->i[1];
+ dst->i[2] = -src->i[2];
+ dst->i[3] = -src->i[3];
+}
+
+static void
+micro_lg2(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+#if FAST_MATH
+ dst->f[0] = util_fast_log2(src->f[0]);
+ dst->f[1] = util_fast_log2(src->f[1]);
+ dst->f[2] = util_fast_log2(src->f[2]);
+ dst->f[3] = util_fast_log2(src->f[3]);
+#else
+ dst->f[0] = logf(src->f[0]) * 1.442695f;
+ dst->f[1] = logf(src->f[1]) * 1.442695f;
+ dst->f[2] = logf(src->f[2]) * 1.442695f;
+ dst->f[3] = logf(src->f[3]) * 1.442695f;
+#endif
+}
+
+static void
+micro_lrp(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1,
+ const union tgsi_exec_channel *src2)
+{
+ dst->f[0] = src0->f[0] * (src1->f[0] - src2->f[0]) + src2->f[0];
+ dst->f[1] = src0->f[1] * (src1->f[1] - src2->f[1]) + src2->f[1];
+ dst->f[2] = src0->f[2] * (src1->f[2] - src2->f[2]) + src2->f[2];
+ dst->f[3] = src0->f[3] * (src1->f[3] - src2->f[3]) + src2->f[3];
+}
+
+static void
+micro_mad(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1,
+ const union tgsi_exec_channel *src2)
+{
+ dst->f[0] = src0->f[0] * src1->f[0] + src2->f[0];
+ dst->f[1] = src0->f[1] * src1->f[1] + src2->f[1];
+ dst->f[2] = src0->f[2] * src1->f[2] + src2->f[2];
+ dst->f[3] = src0->f[3] * src1->f[3] + src2->f[3];
+}
+
+static void
+micro_mov(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->u[0] = src->u[0];
+ dst->u[1] = src->u[1];
+ dst->u[2] = src->u[2];
+ dst->u[3] = src->u[3];
+}
+
+static void
+micro_rcp(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+#if 0 /* for debugging */
+ assert(src->f[0] != 0.0f);
+ assert(src->f[1] != 0.0f);
+ assert(src->f[2] != 0.0f);
+ assert(src->f[3] != 0.0f);
+#endif
+ dst->f[0] = 1.0f / src->f[0];
+ dst->f[1] = 1.0f / src->f[1];
+ dst->f[2] = 1.0f / src->f[2];
+ dst->f[3] = 1.0f / src->f[3];
+}
+
+static void
+micro_rnd(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->f[0] = floorf(src->f[0] + 0.5f);
+ dst->f[1] = floorf(src->f[1] + 0.5f);
+ dst->f[2] = floorf(src->f[2] + 0.5f);
+ dst->f[3] = floorf(src->f[3] + 0.5f);
+}
+
+static void
+micro_rsq(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+#if 0 /* for debugging */
+ assert(src->f[0] != 0.0f);
+ assert(src->f[1] != 0.0f);
+ assert(src->f[2] != 0.0f);
+ assert(src->f[3] != 0.0f);
+#endif
+ dst->f[0] = 1.0f / sqrtf(src->f[0]);
+ dst->f[1] = 1.0f / sqrtf(src->f[1]);
+ dst->f[2] = 1.0f / sqrtf(src->f[2]);
+ dst->f[3] = 1.0f / sqrtf(src->f[3]);
+}
+
+static void
+micro_sqrt(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->f[0] = sqrtf(src->f[0]);
+ dst->f[1] = sqrtf(src->f[1]);
+ dst->f[2] = sqrtf(src->f[2]);
+ dst->f[3] = sqrtf(src->f[3]);
+}
+
+static void
+micro_seq(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->f[0] = src0->f[0] == src1->f[0] ? 1.0f : 0.0f;
+ dst->f[1] = src0->f[1] == src1->f[1] ? 1.0f : 0.0f;
+ dst->f[2] = src0->f[2] == src1->f[2] ? 1.0f : 0.0f;
+ dst->f[3] = src0->f[3] == src1->f[3] ? 1.0f : 0.0f;
+}
+
+static void
+micro_sge(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->f[0] = src0->f[0] >= src1->f[0] ? 1.0f : 0.0f;
+ dst->f[1] = src0->f[1] >= src1->f[1] ? 1.0f : 0.0f;
+ dst->f[2] = src0->f[2] >= src1->f[2] ? 1.0f : 0.0f;
+ dst->f[3] = src0->f[3] >= src1->f[3] ? 1.0f : 0.0f;
+}
+
+static void
+micro_sgn(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->f[0] = src->f[0] < 0.0f ? -1.0f : src->f[0] > 0.0f ? 1.0f : 0.0f;
+ dst->f[1] = src->f[1] < 0.0f ? -1.0f : src->f[1] > 0.0f ? 1.0f : 0.0f;
+ dst->f[2] = src->f[2] < 0.0f ? -1.0f : src->f[2] > 0.0f ? 1.0f : 0.0f;
+ dst->f[3] = src->f[3] < 0.0f ? -1.0f : src->f[3] > 0.0f ? 1.0f : 0.0f;
+}
+
+static void
+micro_isgn(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->i[0] = src->i[0] < 0 ? -1 : src->i[0] > 0 ? 1 : 0;
+ dst->i[1] = src->i[1] < 0 ? -1 : src->i[1] > 0 ? 1 : 0;
+ dst->i[2] = src->i[2] < 0 ? -1 : src->i[2] > 0 ? 1 : 0;
+ dst->i[3] = src->i[3] < 0 ? -1 : src->i[3] > 0 ? 1 : 0;
+}
+
+static void
+micro_sgt(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->f[0] = src0->f[0] > src1->f[0] ? 1.0f : 0.0f;
+ dst->f[1] = src0->f[1] > src1->f[1] ? 1.0f : 0.0f;
+ dst->f[2] = src0->f[2] > src1->f[2] ? 1.0f : 0.0f;
+ dst->f[3] = src0->f[3] > src1->f[3] ? 1.0f : 0.0f;
+}
+
+static void
+micro_sin(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->f[0] = sinf(src->f[0]);
+ dst->f[1] = sinf(src->f[1]);
+ dst->f[2] = sinf(src->f[2]);
+ dst->f[3] = sinf(src->f[3]);
+}
+
+static void
+micro_sle(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->f[0] = src0->f[0] <= src1->f[0] ? 1.0f : 0.0f;
+ dst->f[1] = src0->f[1] <= src1->f[1] ? 1.0f : 0.0f;
+ dst->f[2] = src0->f[2] <= src1->f[2] ? 1.0f : 0.0f;
+ dst->f[3] = src0->f[3] <= src1->f[3] ? 1.0f : 0.0f;
+}
+
+static void
+micro_slt(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->f[0] = src0->f[0] < src1->f[0] ? 1.0f : 0.0f;
+ dst->f[1] = src0->f[1] < src1->f[1] ? 1.0f : 0.0f;
+ dst->f[2] = src0->f[2] < src1->f[2] ? 1.0f : 0.0f;
+ dst->f[3] = src0->f[3] < src1->f[3] ? 1.0f : 0.0f;
+}
+
+static void
+micro_sne(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->f[0] = src0->f[0] != src1->f[0] ? 1.0f : 0.0f;
+ dst->f[1] = src0->f[1] != src1->f[1] ? 1.0f : 0.0f;
+ dst->f[2] = src0->f[2] != src1->f[2] ? 1.0f : 0.0f;
+ dst->f[3] = src0->f[3] != src1->f[3] ? 1.0f : 0.0f;
+}
+
+static void
+micro_sfl(union tgsi_exec_channel *dst)
+{
+ dst->f[0] = 0.0f;
+ dst->f[1] = 0.0f;
+ dst->f[2] = 0.0f;
+ dst->f[3] = 0.0f;
+}
+
+static void
+micro_str(union tgsi_exec_channel *dst)
+{
+ dst->f[0] = 1.0f;
+ dst->f[1] = 1.0f;
+ dst->f[2] = 1.0f;
+ dst->f[3] = 1.0f;
+}
+
+static void
+micro_trunc(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->f[0] = (float)(int)src->f[0];
+ dst->f[1] = (float)(int)src->f[1];
+ dst->f[2] = (float)(int)src->f[2];
+ dst->f[3] = (float)(int)src->f[3];
+}
+
+
+enum tgsi_exec_datatype {
+ TGSI_EXEC_DATA_FLOAT,
+ TGSI_EXEC_DATA_INT,
+ TGSI_EXEC_DATA_UINT
+};
+
+/*
+ * Shorthand locations of various utility registers (_I = Index, _C = Channel)
+ */
+#define TEMP_KILMASK_I TGSI_EXEC_TEMP_KILMASK_I
+#define TEMP_KILMASK_C TGSI_EXEC_TEMP_KILMASK_C
+#define TEMP_OUTPUT_I TGSI_EXEC_TEMP_OUTPUT_I
+#define TEMP_OUTPUT_C TGSI_EXEC_TEMP_OUTPUT_C
+#define TEMP_PRIMITIVE_I TGSI_EXEC_TEMP_PRIMITIVE_I
+#define TEMP_PRIMITIVE_C TGSI_EXEC_TEMP_PRIMITIVE_C
+
+
+/** The execution mask depends on the conditional mask and the loop mask */
+#define UPDATE_EXEC_MASK(MACH) \
+ MACH->ExecMask = MACH->CondMask & MACH->LoopMask & MACH->ContMask & MACH->Switch.mask & MACH->FuncMask
+
+
+static const union tgsi_exec_channel ZeroVec =
+ { { 0.0, 0.0, 0.0, 0.0 } };
+
+static const union tgsi_exec_channel OneVec = {
+ {1.0f, 1.0f, 1.0f, 1.0f}
+};
+
+static const union tgsi_exec_channel P128Vec = {
+ {128.0f, 128.0f, 128.0f, 128.0f}
+};
+
+static const union tgsi_exec_channel M128Vec = {
+ {-128.0f, -128.0f, -128.0f, -128.0f}
+};
+
+
+/**
+ * Assert that none of the float values in 'chan' are infinite or NaN.
+ * NaN and Inf may occur normally during program execution and should
+ * not lead to crashes, etc. But when debugging, it's helpful to catch
+ * them.
+ */
+static INLINE void
+check_inf_or_nan(const union tgsi_exec_channel *chan)
+{
+ assert(!util_is_inf_or_nan((chan)->f[0]));
+ assert(!util_is_inf_or_nan((chan)->f[1]));
+ assert(!util_is_inf_or_nan((chan)->f[2]));
+ assert(!util_is_inf_or_nan((chan)->f[3]));
+}
+
+
+#ifdef DEBUG
+static void
+print_chan(const char *msg, const union tgsi_exec_channel *chan)
+{
+ debug_printf("%s = {%f, %f, %f, %f}\n",
+ msg, chan->f[0], chan->f[1], chan->f[2], chan->f[3]);
+}
+#endif
+
+
+#ifdef DEBUG
+static void
+print_temp(const struct tgsi_exec_machine *mach, uint index)
+{
+ const struct tgsi_exec_vector *tmp = &mach->Temps[index];
+ int i;
+ debug_printf("Temp[%u] =\n", index);
+ for (i = 0; i < 4; i++) {
+ debug_printf(" %c: { %f, %f, %f, %f }\n",
+ "XYZW"[i],
+ tmp->xyzw[i].f[0],
+ tmp->xyzw[i].f[1],
+ tmp->xyzw[i].f[2],
+ tmp->xyzw[i].f[3]);
+ }
+}
+#endif
+
+
+void
+tgsi_exec_set_constant_buffers(struct tgsi_exec_machine *mach,
+ unsigned num_bufs,
+ const void **bufs,
+ const unsigned *buf_sizes)
+{
+ unsigned i;
+
+ for (i = 0; i < num_bufs; i++) {
+ mach->Consts[i] = bufs[i];
+ mach->ConstsSize[i] = buf_sizes[i];
+ }
+}
+
+
+/**
+ * Check if there's a potential src/dst register data dependency when
+ * using SOA execution.
+ * Example:
+ * MOV T, T.yxwz;
+ * This would expand into:
+ * MOV t0, t1;
+ * MOV t1, t0;
+ * MOV t2, t3;
+ * MOV t3, t2;
+ * The second instruction will have the wrong value for t0 if executed as-is.
+ */
+boolean
+tgsi_check_soa_dependencies(const struct tgsi_full_instruction *inst)
+{
+ uint i, chan;
+
+ uint writemask = inst->Dst[0].Register.WriteMask;
+ if (writemask == TGSI_WRITEMASK_X ||
+ writemask == TGSI_WRITEMASK_Y ||
+ writemask == TGSI_WRITEMASK_Z ||
+ writemask == TGSI_WRITEMASK_W ||
+ writemask == TGSI_WRITEMASK_NONE) {
+ /* no chance of data dependency */
+ return FALSE;
+ }
+
+ /* loop over src regs */
+ for (i = 0; i < inst->Instruction.NumSrcRegs; i++) {
+ if ((inst->Src[i].Register.File ==
+ inst->Dst[0].Register.File) &&
+ ((inst->Src[i].Register.Index ==
+ inst->Dst[0].Register.Index) ||
+ inst->Src[i].Register.Indirect ||
+ inst->Dst[0].Register.Indirect)) {
+ /* loop over dest channels */
+ uint channelsWritten = 0x0;
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ /* check if we're reading a channel that's been written */
+ uint swizzle = tgsi_util_get_full_src_register_swizzle(&inst->Src[i], chan);
+ if (channelsWritten & (1 << swizzle)) {
+ return TRUE;
+ }
+
+ channelsWritten |= (1 << chan);
+ }
+ }
+ }
+ }
+ return FALSE;
+}
+
+
+/**
+ * Initialize machine state by expanding tokens to full instructions,
+ * allocating temporary storage, setting up constants, etc.
+ * After this, we can call tgsi_exec_machine_run() many times.
+ */
+void
+tgsi_exec_machine_bind_shader(
+ struct tgsi_exec_machine *mach,
+ const struct tgsi_token *tokens,
+ struct tgsi_sampler *sampler)
+{
+ uint k;
+ struct tgsi_parse_context parse;
+ struct tgsi_full_instruction *instructions;
+ struct tgsi_full_declaration *declarations;
+ uint maxInstructions = 10, numInstructions = 0;
+ uint maxDeclarations = 10, numDeclarations = 0;
+
+#if 0
+ tgsi_dump(tokens, 0);
+#endif
+
+ util_init_math();
+
+
+ mach->Tokens = tokens;
+ mach->Sampler = sampler;
+
+ if (!tokens) {
+ /* unbind and free all */
+ FREE(mach->Declarations);
+ mach->Declarations = NULL;
+ mach->NumDeclarations = 0;
+
+ FREE(mach->Instructions);
+ mach->Instructions = NULL;
+ mach->NumInstructions = 0;
+
+ return;
+ }
+
+ k = tgsi_parse_init (&parse, mach->Tokens);
+ if (k != TGSI_PARSE_OK) {
+ debug_printf( "Problem parsing!\n" );
+ return;
+ }
+
+ mach->Processor = parse.FullHeader.Processor.Processor;
+ mach->ImmLimit = 0;
+ mach->NumOutputs = 0;
+
+ if (mach->Processor == TGSI_PROCESSOR_GEOMETRY &&
+ !mach->UsedGeometryShader) {
+ struct tgsi_exec_vector *inputs;
+ struct tgsi_exec_vector *outputs;
+
+ inputs = align_malloc(sizeof(struct tgsi_exec_vector) *
+ TGSI_MAX_PRIM_VERTICES * PIPE_MAX_ATTRIBS,
+ 16);
+
+ if (!inputs)
+ return;
+
+ outputs = align_malloc(sizeof(struct tgsi_exec_vector) *
+ TGSI_MAX_TOTAL_VERTICES, 16);
+
+ if (!outputs) {
+ align_free(inputs);
+ return;
+ }
+
+ align_free(mach->Inputs);
+ align_free(mach->Outputs);
+
+ mach->Inputs = inputs;
+ mach->Outputs = outputs;
+ mach->UsedGeometryShader = TRUE;
+ }
+
+ declarations = (struct tgsi_full_declaration *)
+ MALLOC( maxDeclarations * sizeof(struct tgsi_full_declaration) );
+
+ if (!declarations) {
+ return;
+ }
+
+ instructions = (struct tgsi_full_instruction *)
+ MALLOC( maxInstructions * sizeof(struct tgsi_full_instruction) );
+
+ if (!instructions) {
+ FREE( declarations );
+ return;
+ }
+
+ while( !tgsi_parse_end_of_tokens( &parse ) ) {
+ uint i;
+
+ tgsi_parse_token( &parse );
+ switch( parse.FullToken.Token.Type ) {
+ case TGSI_TOKEN_TYPE_DECLARATION:
+ /* save expanded declaration */
+ if (numDeclarations == maxDeclarations) {
+ declarations = REALLOC(declarations,
+ maxDeclarations
+ * sizeof(struct tgsi_full_declaration),
+ (maxDeclarations + 10)
+ * sizeof(struct tgsi_full_declaration));
+ maxDeclarations += 10;
+ }
+ if (parse.FullToken.FullDeclaration.Declaration.File == TGSI_FILE_OUTPUT) {
+ unsigned reg;
+ for (reg = parse.FullToken.FullDeclaration.Range.First;
+ reg <= parse.FullToken.FullDeclaration.Range.Last;
+ ++reg) {
+ ++mach->NumOutputs;
+ }
+ }
+ memcpy(declarations + numDeclarations,
+ &parse.FullToken.FullDeclaration,
+ sizeof(declarations[0]));
+ numDeclarations++;
+ break;
+
+ case TGSI_TOKEN_TYPE_IMMEDIATE:
+ {
+ uint size = parse.FullToken.FullImmediate.Immediate.NrTokens - 1;
+ assert( size <= 4 );
+ assert( mach->ImmLimit + 1 <= TGSI_EXEC_NUM_IMMEDIATES );
+
+ for( i = 0; i < size; i++ ) {
+ mach->Imms[mach->ImmLimit][i] =
+ parse.FullToken.FullImmediate.u[i].Float;
+ }
+ mach->ImmLimit += 1;
+ }
+ break;
+
+ case TGSI_TOKEN_TYPE_INSTRUCTION:
+
+ /* save expanded instruction */
+ if (numInstructions == maxInstructions) {
+ instructions = REALLOC(instructions,
+ maxInstructions
+ * sizeof(struct tgsi_full_instruction),
+ (maxInstructions + 10)
+ * sizeof(struct tgsi_full_instruction));
+ maxInstructions += 10;
+ }
+
+ memcpy(instructions + numInstructions,
+ &parse.FullToken.FullInstruction,
+ sizeof(instructions[0]));
+
+ numInstructions++;
+ break;
+
+ case TGSI_TOKEN_TYPE_PROPERTY:
+ break;
+
+ default:
+ assert( 0 );
+ }
+ }
+ tgsi_parse_free (&parse);
+
+ FREE(mach->Declarations);
+ mach->Declarations = declarations;
+ mach->NumDeclarations = numDeclarations;
+
+ FREE(mach->Instructions);
+ mach->Instructions = instructions;
+ mach->NumInstructions = numInstructions;
+}
+
+
+struct tgsi_exec_machine *
+tgsi_exec_machine_create( void )
+{
+ struct tgsi_exec_machine *mach;
+ uint i;
+
+ mach = align_malloc( sizeof *mach, 16 );
+ if (!mach)
+ goto fail;
+
+ memset(mach, 0, sizeof(*mach));
+
+ mach->Addrs = &mach->Temps[TGSI_EXEC_TEMP_ADDR];
+ mach->MaxGeometryShaderOutputs = TGSI_MAX_TOTAL_VERTICES;
+ mach->Predicates = &mach->Temps[TGSI_EXEC_TEMP_P0];
+
+ mach->Inputs = align_malloc(sizeof(struct tgsi_exec_vector) * PIPE_MAX_ATTRIBS, 16);
+ mach->Outputs = align_malloc(sizeof(struct tgsi_exec_vector) * PIPE_MAX_ATTRIBS, 16);
+ if (!mach->Inputs || !mach->Outputs)
+ goto fail;
+
+ /* Setup constants needed by the SSE2 executor. */
+ for( i = 0; i < 4; i++ ) {
+ mach->Temps[TGSI_EXEC_TEMP_00000000_I].xyzw[TGSI_EXEC_TEMP_00000000_C].u[i] = 0x00000000;
+ mach->Temps[TGSI_EXEC_TEMP_7FFFFFFF_I].xyzw[TGSI_EXEC_TEMP_7FFFFFFF_C].u[i] = 0x7FFFFFFF;
+ mach->Temps[TGSI_EXEC_TEMP_80000000_I].xyzw[TGSI_EXEC_TEMP_80000000_C].u[i] = 0x80000000;
+ mach->Temps[TGSI_EXEC_TEMP_FFFFFFFF_I].xyzw[TGSI_EXEC_TEMP_FFFFFFFF_C].u[i] = 0xFFFFFFFF; /* not used */
+ mach->Temps[TGSI_EXEC_TEMP_ONE_I].xyzw[TGSI_EXEC_TEMP_ONE_C].f[i] = 1.0f;
+ mach->Temps[TGSI_EXEC_TEMP_TWO_I].xyzw[TGSI_EXEC_TEMP_TWO_C].f[i] = 2.0f; /* not used */
+ mach->Temps[TGSI_EXEC_TEMP_128_I].xyzw[TGSI_EXEC_TEMP_128_C].f[i] = 128.0f;
+ mach->Temps[TGSI_EXEC_TEMP_MINUS_128_I].xyzw[TGSI_EXEC_TEMP_MINUS_128_C].f[i] = -128.0f;
+ mach->Temps[TGSI_EXEC_TEMP_THREE_I].xyzw[TGSI_EXEC_TEMP_THREE_C].f[i] = 3.0f;
+ mach->Temps[TGSI_EXEC_TEMP_HALF_I].xyzw[TGSI_EXEC_TEMP_HALF_C].f[i] = 0.5f;
+ }
+
+#ifdef DEBUG
+ /* silence warnings */
+ (void) print_chan;
+ (void) print_temp;
+#endif
+
+ return mach;
+
+fail:
+ if (mach) {
+ align_free(mach->Inputs);
+ align_free(mach->Outputs);
+ align_free(mach);
+ }
+ return NULL;
+}
+
+
+void
+tgsi_exec_machine_destroy(struct tgsi_exec_machine *mach)
+{
+ if (mach) {
+ FREE(mach->Instructions);
+ FREE(mach->Declarations);
+
+ align_free(mach->Inputs);
+ align_free(mach->Outputs);
+
+ align_free(mach);
+ }
+}
+
+static void
+micro_add(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->f[0] = src0->f[0] + src1->f[0];
+ dst->f[1] = src0->f[1] + src1->f[1];
+ dst->f[2] = src0->f[2] + src1->f[2];
+ dst->f[3] = src0->f[3] + src1->f[3];
+}
+
+static void
+micro_div(
+ union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1 )
+{
+ if (src1->f[0] != 0) {
+ dst->f[0] = src0->f[0] / src1->f[0];
+ }
+ if (src1->f[1] != 0) {
+ dst->f[1] = src0->f[1] / src1->f[1];
+ }
+ if (src1->f[2] != 0) {
+ dst->f[2] = src0->f[2] / src1->f[2];
+ }
+ if (src1->f[3] != 0) {
+ dst->f[3] = src0->f[3] / src1->f[3];
+ }
+}
+
+static void
+micro_rcc(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ uint i;
+
+ for (i = 0; i < 4; i++) {
+ float recip = 1.0f / src->f[i];
+
+ if (recip > 0.0f) {
+ if (recip > 1.884467e+019f) {
+ dst->f[i] = 1.884467e+019f;
+ }
+ else if (recip < 5.42101e-020f) {
+ dst->f[i] = 5.42101e-020f;
+ }
+ else {
+ dst->f[i] = recip;
+ }
+ }
+ else {
+ if (recip < -1.884467e+019f) {
+ dst->f[i] = -1.884467e+019f;
+ }
+ else if (recip > -5.42101e-020f) {
+ dst->f[i] = -5.42101e-020f;
+ }
+ else {
+ dst->f[i] = recip;
+ }
+ }
+ }
+}
+
+static void
+micro_lt(
+ union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1,
+ const union tgsi_exec_channel *src2,
+ const union tgsi_exec_channel *src3 )
+{
+ dst->f[0] = src0->f[0] < src1->f[0] ? src2->f[0] : src3->f[0];
+ dst->f[1] = src0->f[1] < src1->f[1] ? src2->f[1] : src3->f[1];
+ dst->f[2] = src0->f[2] < src1->f[2] ? src2->f[2] : src3->f[2];
+ dst->f[3] = src0->f[3] < src1->f[3] ? src2->f[3] : src3->f[3];
+}
+
+static void
+micro_max(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->f[0] = src0->f[0] > src1->f[0] ? src0->f[0] : src1->f[0];
+ dst->f[1] = src0->f[1] > src1->f[1] ? src0->f[1] : src1->f[1];
+ dst->f[2] = src0->f[2] > src1->f[2] ? src0->f[2] : src1->f[2];
+ dst->f[3] = src0->f[3] > src1->f[3] ? src0->f[3] : src1->f[3];
+}
+
+static void
+micro_min(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->f[0] = src0->f[0] < src1->f[0] ? src0->f[0] : src1->f[0];
+ dst->f[1] = src0->f[1] < src1->f[1] ? src0->f[1] : src1->f[1];
+ dst->f[2] = src0->f[2] < src1->f[2] ? src0->f[2] : src1->f[2];
+ dst->f[3] = src0->f[3] < src1->f[3] ? src0->f[3] : src1->f[3];
+}
+
+static void
+micro_mul(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->f[0] = src0->f[0] * src1->f[0];
+ dst->f[1] = src0->f[1] * src1->f[1];
+ dst->f[2] = src0->f[2] * src1->f[2];
+ dst->f[3] = src0->f[3] * src1->f[3];
+}
+
+static void
+micro_neg(
+ union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src )
+{
+ dst->f[0] = -src->f[0];
+ dst->f[1] = -src->f[1];
+ dst->f[2] = -src->f[2];
+ dst->f[3] = -src->f[3];
+}
+
+static void
+micro_pow(
+ union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1 )
+{
+#if FAST_MATH
+ dst->f[0] = util_fast_pow( src0->f[0], src1->f[0] );
+ dst->f[1] = util_fast_pow( src0->f[1], src1->f[1] );
+ dst->f[2] = util_fast_pow( src0->f[2], src1->f[2] );
+ dst->f[3] = util_fast_pow( src0->f[3], src1->f[3] );
+#else
+ dst->f[0] = powf( src0->f[0], src1->f[0] );
+ dst->f[1] = powf( src0->f[1], src1->f[1] );
+ dst->f[2] = powf( src0->f[2], src1->f[2] );
+ dst->f[3] = powf( src0->f[3], src1->f[3] );
+#endif
+}
+
+static void
+micro_sub(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->f[0] = src0->f[0] - src1->f[0];
+ dst->f[1] = src0->f[1] - src1->f[1];
+ dst->f[2] = src0->f[2] - src1->f[2];
+ dst->f[3] = src0->f[3] - src1->f[3];
+}
+
+static void
+fetch_src_file_channel(const struct tgsi_exec_machine *mach,
+ const uint chan_index,
+ const uint file,
+ const uint swizzle,
+ const union tgsi_exec_channel *index,
+ const union tgsi_exec_channel *index2D,
+ union tgsi_exec_channel *chan)
+{
+ uint i;
+
+ assert(swizzle < 4);
+
+ switch (file) {
+ case TGSI_FILE_CONSTANT:
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ assert(index2D->i[i] >= 0 && index2D->i[i] < PIPE_MAX_CONSTANT_BUFFERS);
+ assert(mach->Consts[index2D->i[i]]);
+
+ if (index->i[i] < 0) {
+ chan->u[i] = 0;
+ } else {
+ /* NOTE: copying the const value as a uint instead of float */
+ const uint constbuf = index2D->i[i];
+ const uint *buf = (const uint *)mach->Consts[constbuf];
+ const int pos = index->i[i] * 4 + swizzle;
+ /* const buffer bounds check */
+ if (pos < 0 || pos >= (int) mach->ConstsSize[constbuf]) {
+ if (0) {
+ /* Debug: print warning */
+ static int count = 0;
+ if (count++ < 100)
+ debug_printf("TGSI Exec: const buffer index %d"
+ " out of bounds\n", pos);
+ }
+ chan->u[i] = 0;
+ }
+ else
+ chan->u[i] = buf[pos];
+ }
+ }
+ break;
+
+ case TGSI_FILE_INPUT:
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ /*
+ if (TGSI_PROCESSOR_GEOMETRY == mach->Processor) {
+ debug_printf("Fetching Input[%d] (2d=%d, 1d=%d)\n",
+ index2D->i[i] * TGSI_EXEC_MAX_INPUT_ATTRIBS + index->i[i],
+ index2D->i[i], index->i[i]);
+ }*/
+ int pos = index2D->i[i] * TGSI_EXEC_MAX_INPUT_ATTRIBS + index->i[i];
+ assert(pos >= 0);
+ assert(pos < TGSI_MAX_PRIM_VERTICES * PIPE_MAX_ATTRIBS);
+ chan->u[i] = mach->Inputs[pos].xyzw[swizzle].u[i];
+ }
+ break;
+
+ case TGSI_FILE_SYSTEM_VALUE:
+ /* XXX no swizzling at this point. Will be needed if we put
+ * gl_FragCoord, for example, in a sys value register.
+ */
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ chan->u[i] = mach->SystemValue[index->i[i]].u[i];
+ }
+ break;
+
+ case TGSI_FILE_TEMPORARY:
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ assert(index->i[i] < TGSI_EXEC_NUM_TEMPS);
+ assert(index2D->i[i] == 0);
+
+ chan->u[i] = mach->Temps[index->i[i]].xyzw[swizzle].u[i];
+ }
+ break;
+
+ case TGSI_FILE_IMMEDIATE:
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ assert(index->i[i] >= 0 && index->i[i] < (int)mach->ImmLimit);
+ assert(index2D->i[i] == 0);
+
+ chan->f[i] = mach->Imms[index->i[i]][swizzle];
+ }
+ break;
+
+ case TGSI_FILE_ADDRESS:
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ assert(index->i[i] >= 0);
+ assert(index2D->i[i] == 0);
+
+ chan->u[i] = mach->Addrs[index->i[i]].xyzw[swizzle].u[i];
+ }
+ break;
+
+ case TGSI_FILE_PREDICATE:
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ assert(index->i[i] >= 0 && index->i[i] < TGSI_EXEC_NUM_PREDS);
+ assert(index2D->i[i] == 0);
+
+ chan->u[i] = mach->Predicates[0].xyzw[swizzle].u[i];
+ }
+ break;
+
+ case TGSI_FILE_OUTPUT:
+ /* vertex/fragment output vars can be read too */
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ assert(index->i[i] >= 0);
+ assert(index2D->i[i] == 0);
+
+ chan->u[i] = mach->Outputs[index->i[i]].xyzw[swizzle].u[i];
+ }
+ break;
+
+ default:
+ assert(0);
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ chan->u[i] = 0;
+ }
+ }
+}
+
+static void
+fetch_source(const struct tgsi_exec_machine *mach,
+ union tgsi_exec_channel *chan,
+ const struct tgsi_full_src_register *reg,
+ const uint chan_index,
+ enum tgsi_exec_datatype src_datatype)
+{
+ union tgsi_exec_channel index;
+ union tgsi_exec_channel index2D;
+ uint swizzle;
+
+ /* We start with a direct index into a register file.
+ *
+ * file[1],
+ * where:
+ * file = Register.File
+ * [1] = Register.Index
+ */
+ index.i[0] =
+ index.i[1] =
+ index.i[2] =
+ index.i[3] = reg->Register.Index;
+
+ /* There is an extra source register that indirectly subscripts
+ * a register file. The direct index now becomes an offset
+ * that is being added to the indirect register.
+ *
+ * file[ind[2].x+1],
+ * where:
+ * ind = Indirect.File
+ * [2] = Indirect.Index
+ * .x = Indirect.SwizzleX
+ */
+ if (reg->Register.Indirect) {
+ union tgsi_exec_channel index2;
+ union tgsi_exec_channel indir_index;
+ const uint execmask = mach->ExecMask;
+ uint i;
+
+ /* which address register (always zero now) */
+ index2.i[0] =
+ index2.i[1] =
+ index2.i[2] =
+ index2.i[3] = reg->Indirect.Index;
+ /* get current value of address register[swizzle] */
+ swizzle = reg->Indirect.Swizzle;
+ fetch_src_file_channel(mach,
+ chan_index,
+ reg->Indirect.File,
+ swizzle,
+ &index2,
+ &ZeroVec,
+ &indir_index);
+
+ /* add value of address register to the offset */
+ index.i[0] += indir_index.i[0];
+ index.i[1] += indir_index.i[1];
+ index.i[2] += indir_index.i[2];
+ index.i[3] += indir_index.i[3];
+
+ /* for disabled execution channels, zero-out the index to
+ * avoid using a potential garbage value.
+ */
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ if ((execmask & (1 << i)) == 0)
+ index.i[i] = 0;
+ }
+ }
+
+ /* There is an extra source register that is a second
+ * subscript to a register file. Effectively it means that
+ * the register file is actually a 2D array of registers.
+ *
+ * file[3][1],
+ * where:
+ * [3] = Dimension.Index
+ */
+ if (reg->Register.Dimension) {
+ index2D.i[0] =
+ index2D.i[1] =
+ index2D.i[2] =
+ index2D.i[3] = reg->Dimension.Index;
+
+ /* Again, the second subscript index can be addressed indirectly
+ * identically to the first one.
+ * Nothing stops us from indirectly addressing the indirect register,
+ * but there is no need for that, so we won't exercise it.
+ *
+ * file[ind[4].y+3][1],
+ * where:
+ * ind = DimIndirect.File
+ * [4] = DimIndirect.Index
+ * .y = DimIndirect.SwizzleX
+ */
+ if (reg->Dimension.Indirect) {
+ union tgsi_exec_channel index2;
+ union tgsi_exec_channel indir_index;
+ const uint execmask = mach->ExecMask;
+ uint i;
+
+ index2.i[0] =
+ index2.i[1] =
+ index2.i[2] =
+ index2.i[3] = reg->DimIndirect.Index;
+
+ swizzle = reg->DimIndirect.Swizzle;
+ fetch_src_file_channel(mach,
+ chan_index,
+ reg->DimIndirect.File,
+ swizzle,
+ &index2,
+ &ZeroVec,
+ &indir_index);
+
+ index2D.i[0] += indir_index.i[0];
+ index2D.i[1] += indir_index.i[1];
+ index2D.i[2] += indir_index.i[2];
+ index2D.i[3] += indir_index.i[3];
+
+ /* for disabled execution channels, zero-out the index to
+ * avoid using a potential garbage value.
+ */
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ if ((execmask & (1 << i)) == 0) {
+ index2D.i[i] = 0;
+ }
+ }
+ }
+
+ /* If by any chance there was a need for a 3D array of register
+ * files, we would have to check whether Dimension is followed
+ * by a dimension register and continue the saga.
+ */
+ } else {
+ index2D.i[0] =
+ index2D.i[1] =
+ index2D.i[2] =
+ index2D.i[3] = 0;
+ }
+
+ swizzle = tgsi_util_get_full_src_register_swizzle( reg, chan_index );
+ fetch_src_file_channel(mach,
+ chan_index,
+ reg->Register.File,
+ swizzle,
+ &index,
+ &index2D,
+ chan);
+
+ if (reg->Register.Absolute) {
+ if (src_datatype == TGSI_EXEC_DATA_FLOAT) {
+ micro_abs(chan, chan);
+ } else {
+ micro_iabs(chan, chan);
+ }
+ }
+
+ if (reg->Register.Negate) {
+ if (src_datatype == TGSI_EXEC_DATA_FLOAT) {
+ micro_neg(chan, chan);
+ } else {
+ micro_ineg(chan, chan);
+ }
+ }
+}
+
+static void
+store_dest(struct tgsi_exec_machine *mach,
+ const union tgsi_exec_channel *chan,
+ const struct tgsi_full_dst_register *reg,
+ const struct tgsi_full_instruction *inst,
+ uint chan_index,
+ enum tgsi_exec_datatype dst_datatype)
+{
+ uint i;
+ union tgsi_exec_channel null;
+ union tgsi_exec_channel *dst;
+ union tgsi_exec_channel index2D;
+ uint execmask = mach->ExecMask;
+ int offset = 0; /* indirection offset */
+ int index;
+
+ /* for debugging */
+ if (0 && dst_datatype == TGSI_EXEC_DATA_FLOAT) {
+ check_inf_or_nan(chan);
+ }
+
+ /* There is an extra source register that indirectly subscripts
+ * a register file. The direct index now becomes an offset
+ * that is being added to the indirect register.
+ *
+ * file[ind[2].x+1],
+ * where:
+ * ind = Indirect.File
+ * [2] = Indirect.Index
+ * .x = Indirect.SwizzleX
+ */
+ if (reg->Register.Indirect) {
+ union tgsi_exec_channel index;
+ union tgsi_exec_channel indir_index;
+ uint swizzle;
+
+ /* which address register (always zero for now) */
+ index.i[0] =
+ index.i[1] =
+ index.i[2] =
+ index.i[3] = reg->Indirect.Index;
+
+ /* get current value of address register[swizzle] */
+ swizzle = reg->Indirect.Swizzle;
+
+ /* fetch values from the address/indirection register */
+ fetch_src_file_channel(mach,
+ chan_index,
+ reg->Indirect.File,
+ swizzle,
+ &index,
+ &ZeroVec,
+ &indir_index);
+
+ /* save indirection offset */
+ offset = indir_index.i[0];
+ }
+
+ /* There is an extra source register that is a second
+ * subscript to a register file. Effectively it means that
+ * the register file is actually a 2D array of registers.
+ *
+ * file[3][1],
+ * where:
+ * [3] = Dimension.Index
+ */
+ if (reg->Register.Dimension) {
+ index2D.i[0] =
+ index2D.i[1] =
+ index2D.i[2] =
+ index2D.i[3] = reg->Dimension.Index;
+
+ /* Again, the second subscript index can be addressed indirectly
+ * identically to the first one.
+ * Nothing stops us from indirectly addressing the indirect register,
+ * but there is no need for that, so we won't exercise it.
+ *
+ * file[ind[4].y+3][1],
+ * where:
+ * ind = DimIndirect.File
+ * [4] = DimIndirect.Index
+ * .y = DimIndirect.SwizzleX
+ */
+ if (reg->Dimension.Indirect) {
+ union tgsi_exec_channel index2;
+ union tgsi_exec_channel indir_index;
+ const uint execmask = mach->ExecMask;
+ unsigned swizzle;
+ uint i;
+
+ index2.i[0] =
+ index2.i[1] =
+ index2.i[2] =
+ index2.i[3] = reg->DimIndirect.Index;
+
+ swizzle = reg->DimIndirect.Swizzle;
+ fetch_src_file_channel(mach,
+ chan_index,
+ reg->DimIndirect.File,
+ swizzle,
+ &index2,
+ &ZeroVec,
+ &indir_index);
+
+ index2D.i[0] += indir_index.i[0];
+ index2D.i[1] += indir_index.i[1];
+ index2D.i[2] += indir_index.i[2];
+ index2D.i[3] += indir_index.i[3];
+
+ /* for disabled execution channels, zero-out the index to
+ * avoid using a potential garbage value.
+ */
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ if ((execmask & (1 << i)) == 0) {
+ index2D.i[i] = 0;
+ }
+ }
+ }
+
+ /* If by any chance there was a need for a 3D array of register
+ * files, we would have to check whether Dimension is followed
+ * by a dimension register and continue the saga.
+ */
+ } else {
+ index2D.i[0] =
+ index2D.i[1] =
+ index2D.i[2] =
+ index2D.i[3] = 0;
+ }
+
+ switch (reg->Register.File) {
+ case TGSI_FILE_NULL:
+ dst = &null;
+ break;
+
+ case TGSI_FILE_OUTPUT:
+ index = mach->Temps[TEMP_OUTPUT_I].xyzw[TEMP_OUTPUT_C].u[0]
+ + reg->Register.Index;
+ dst = &mach->Outputs[offset + index].xyzw[chan_index];
+#if 0
+ debug_printf("NumOutputs = %d, TEMP_O_C/I = %d, redindex = %d\n",
+ mach->NumOutputs, mach->Temps[TEMP_OUTPUT_I].xyzw[TEMP_OUTPUT_C].u[0],
+ reg->Register.Index);
+ if (TGSI_PROCESSOR_GEOMETRY == mach->Processor) {
+ debug_printf("STORING OUT[%d] mask(%d), = (", offset + index, execmask);
+ for (i = 0; i < TGSI_QUAD_SIZE; i++)
+ if (execmask & (1 << i))
+ debug_printf("%f, ", chan->f[i]);
+ debug_printf(")\n");
+ }
+#endif
+ break;
+
+ case TGSI_FILE_TEMPORARY:
+ index = reg->Register.Index;
+ assert( index < TGSI_EXEC_NUM_TEMPS );
+ dst = &mach->Temps[offset + index].xyzw[chan_index];
+ break;
+
+ case TGSI_FILE_ADDRESS:
+ index = reg->Register.Index;
+ dst = &mach->Addrs[index].xyzw[chan_index];
+ break;
+
+ case TGSI_FILE_PREDICATE:
+ index = reg->Register.Index;
+ assert(index < TGSI_EXEC_NUM_PREDS);
+ dst = &mach->Predicates[index].xyzw[chan_index];
+ break;
+
+ default:
+ assert( 0 );
+ return;
+ }
+
+ if (inst->Instruction.Predicate) {
+ uint swizzle;
+ union tgsi_exec_channel *pred;
+
+ switch (chan_index) {
+ case TGSI_CHAN_X:
+ swizzle = inst->Predicate.SwizzleX;
+ break;
+ case TGSI_CHAN_Y:
+ swizzle = inst->Predicate.SwizzleY;
+ break;
+ case TGSI_CHAN_Z:
+ swizzle = inst->Predicate.SwizzleZ;
+ break;
+ case TGSI_CHAN_W:
+ swizzle = inst->Predicate.SwizzleW;
+ break;
+ default:
+ assert(0);
+ return;
+ }
+
+ assert(inst->Predicate.Index == 0);
+
+ pred = &mach->Predicates[inst->Predicate.Index].xyzw[swizzle];
+
+ if (inst->Predicate.Negate) {
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ if (pred->u[i]) {
+ execmask &= ~(1 << i);
+ }
+ }
+ } else {
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ if (!pred->u[i]) {
+ execmask &= ~(1 << i);
+ }
+ }
+ }
+ }
+
+ switch (inst->Instruction.Saturate) {
+ case TGSI_SAT_NONE:
+ for (i = 0; i < TGSI_QUAD_SIZE; i++)
+ if (execmask & (1 << i))
+ dst->i[i] = chan->i[i];
+ break;
+
+ case TGSI_SAT_ZERO_ONE:
+ for (i = 0; i < TGSI_QUAD_SIZE; i++)
+ if (execmask & (1 << i)) {
+ if (chan->f[i] < 0.0f)
+ dst->f[i] = 0.0f;
+ else if (chan->f[i] > 1.0f)
+ dst->f[i] = 1.0f;
+ else
+ dst->i[i] = chan->i[i];
+ }
+ break;
+
+ case TGSI_SAT_MINUS_PLUS_ONE:
+ for (i = 0; i < TGSI_QUAD_SIZE; i++)
+ if (execmask & (1 << i)) {
+ if (chan->f[i] < -1.0f)
+ dst->f[i] = -1.0f;
+ else if (chan->f[i] > 1.0f)
+ dst->f[i] = 1.0f;
+ else
+ dst->i[i] = chan->i[i];
+ }
+ break;
+
+ default:
+ assert( 0 );
+ }
+}
+
+#define FETCH(VAL,INDEX,CHAN)\
+ fetch_source(mach, VAL, &inst->Src[INDEX], CHAN, TGSI_EXEC_DATA_FLOAT)
+
+#define IFETCH(VAL,INDEX,CHAN)\
+ fetch_source(mach, VAL, &inst->Src[INDEX], CHAN, TGSI_EXEC_DATA_INT)
+
+
+/**
+ * Execute ARB-style KIL which is predicated by a src register.
+ * Kill fragment if any of the four values is less than zero.
+ */
+static void
+exec_kill_if(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ uint uniquemask;
+ uint chan_index;
+ uint kilmask = 0; /* bit 0 = pixel 0, bit 1 = pixel 1, etc */
+ union tgsi_exec_channel r[1];
+
+ /* This mask stores component bits that were already tested. */
+ uniquemask = 0;
+
+ for (chan_index = 0; chan_index < 4; chan_index++)
+ {
+ uint swizzle;
+ uint i;
+
+ /* unswizzle channel */
+ swizzle = tgsi_util_get_full_src_register_swizzle (
+ &inst->Src[0],
+ chan_index);
+
+ /* check if the component has not been already tested */
+ if (uniquemask & (1 << swizzle))
+ continue;
+ uniquemask |= 1 << swizzle;
+
+ FETCH(&r[0], 0, chan_index);
+ for (i = 0; i < 4; i++)
+ if (r[0].f[i] < 0.0f)
+ kilmask |= 1 << i;
+ }
+
+ mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] |= kilmask;
+}
+
+/**
+ * Unconditional fragment kill/discard.
+ */
+static void
+exec_kill(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ uint kilmask; /* bit 0 = pixel 0, bit 1 = pixel 1, etc */
+
+ /* kill fragment for all fragments currently executing */
+ kilmask = mach->ExecMask;
+ mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] |= kilmask;
+}
+
+static void
+emit_vertex(struct tgsi_exec_machine *mach)
+{
+ /* FIXME: check for exec mask correctly
+ unsigned i;
+ for (i = 0; i < TGSI_QUAD_SIZE; ++i) {
+ if ((mach->ExecMask & (1 << i)))
+ */
+ if (mach->ExecMask) {
+ mach->Temps[TEMP_OUTPUT_I].xyzw[TEMP_OUTPUT_C].u[0] += mach->NumOutputs;
+ mach->Primitives[mach->Temps[TEMP_PRIMITIVE_I].xyzw[TEMP_PRIMITIVE_C].u[0]]++;
+ }
+}
+
+static void
+emit_primitive(struct tgsi_exec_machine *mach)
+{
+ unsigned *prim_count = &mach->Temps[TEMP_PRIMITIVE_I].xyzw[TEMP_PRIMITIVE_C].u[0];
+ /* FIXME: check for exec mask correctly
+ unsigned i;
+ for (i = 0; i < TGSI_QUAD_SIZE; ++i) {
+ if ((mach->ExecMask & (1 << i)))
+ */
+ if (mach->ExecMask) {
+ ++(*prim_count);
+ debug_assert((*prim_count * mach->NumOutputs) < mach->MaxGeometryShaderOutputs);
+ mach->Primitives[*prim_count] = 0;
+ }
+}
+
+static void
+conditional_emit_primitive(struct tgsi_exec_machine *mach)
+{
+ if (TGSI_PROCESSOR_GEOMETRY == mach->Processor) {
+ int emitted_verts =
+ mach->Primitives[mach->Temps[TEMP_PRIMITIVE_I].xyzw[TEMP_PRIMITIVE_C].u[0]];
+ if (emitted_verts) {
+ emit_primitive(mach);
+ }
+ }
+}
+
+
+/*
+ * Fetch four texture samples using STR texture coordinates.
+ */
+static void
+fetch_texel( struct tgsi_sampler *sampler,
+ const unsigned sview_idx,
+ const unsigned sampler_idx,
+ const union tgsi_exec_channel *s,
+ const union tgsi_exec_channel *t,
+ const union tgsi_exec_channel *p,
+ const union tgsi_exec_channel *c0,
+ const union tgsi_exec_channel *c1,
+ float derivs[3][2][TGSI_QUAD_SIZE],
+ const int8_t offset[3],
+ enum tgsi_sampler_control control,
+ union tgsi_exec_channel *r,
+ union tgsi_exec_channel *g,
+ union tgsi_exec_channel *b,
+ union tgsi_exec_channel *a )
+{
+ uint j;
+ float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE];
+
+ /* FIXME: handle explicit derivs, offsets */
+ sampler->get_samples(sampler, sview_idx, sampler_idx,
+ s->f, t->f, p->f, c0->f, c1->f, derivs, offset, control, rgba);
+
+ for (j = 0; j < 4; j++) {
+ r->f[j] = rgba[0][j];
+ g->f[j] = rgba[1][j];
+ b->f[j] = rgba[2][j];
+ a->f[j] = rgba[3][j];
+ }
+}
+
+
+#define TEX_MODIFIER_NONE 0
+#define TEX_MODIFIER_PROJECTED 1
+#define TEX_MODIFIER_LOD_BIAS 2
+#define TEX_MODIFIER_EXPLICIT_LOD 3
+#define TEX_MODIFIER_LEVEL_ZERO 4
+
+
+/*
+ * Fetch all 3 (for s,t,r coords) texel offsets, put them into int array.
+ */
+static void
+fetch_texel_offsets(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst,
+ int8_t offsets[3])
+{
+ if (inst->Texture.NumOffsets == 1) {
+ union tgsi_exec_channel index;
+ union tgsi_exec_channel offset[3];
+ index.i[0] = index.i[1] = index.i[2] = index.i[3] = inst->TexOffsets[0].Index;
+ fetch_src_file_channel(mach, 0, inst->TexOffsets[0].File,
+ inst->TexOffsets[0].SwizzleX, &index, &ZeroVec, &offset[0]);
+ fetch_src_file_channel(mach, 0, inst->TexOffsets[0].File,
+ inst->TexOffsets[0].SwizzleY, &index, &ZeroVec, &offset[1]);
+ fetch_src_file_channel(mach, 0, inst->TexOffsets[0].File,
+ inst->TexOffsets[0].SwizzleZ, &index, &ZeroVec, &offset[2]);
+ offsets[0] = offset[0].i[0];
+ offsets[1] = offset[1].i[0];
+ offsets[2] = offset[2].i[0];
+ } else {
+ assert(inst->Texture.NumOffsets == 0);
+ offsets[0] = offsets[1] = offsets[2] = 0;
+ }
+}
+
+
+/*
+ * Fetch dx and dy values for one channel (s, t or r).
+ * Put dx values into one float array, dy values into another.
+ */
+static void
+fetch_assign_deriv_channel(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst,
+ unsigned regdsrcx,
+ unsigned chan,
+ float derivs[2][TGSI_QUAD_SIZE])
+{
+ union tgsi_exec_channel d;
+ FETCH(&d, regdsrcx, chan);
+ derivs[0][0] = d.f[0];
+ derivs[0][1] = d.f[1];
+ derivs[0][2] = d.f[2];
+ derivs[0][3] = d.f[3];
+ FETCH(&d, regdsrcx + 1, chan);
+ derivs[1][0] = d.f[0];
+ derivs[1][1] = d.f[1];
+ derivs[1][2] = d.f[2];
+ derivs[1][3] = d.f[3];
+}
+
+
+/*
+ * execute a texture instruction.
+ *
+ * modifier is used to control the channel routing for the\
+ * instruction variants like proj, lod, and texture with lod bias.
+ * sampler indicates which src register the sampler is contained in.
+ */
+static void
+exec_tex(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst,
+ uint modifier, uint sampler)
+{
+ const uint unit = inst->Src[sampler].Register.Index;
+ const union tgsi_exec_channel *args[5], *proj = NULL;
+ union tgsi_exec_channel r[5];
+ enum tgsi_sampler_control control = tgsi_sampler_lod_none;
+ uint chan;
+ int8_t offsets[3];
+ int dim, shadow_ref, i;
+
+ /* always fetch all 3 offsets, overkill but keeps code simple */
+ fetch_texel_offsets(mach, inst, offsets);
+
+ assert(modifier != TEX_MODIFIER_LEVEL_ZERO);
+ assert(inst->Texture.Texture != TGSI_TEXTURE_BUFFER);
+
+ dim = tgsi_util_get_texture_coord_dim(inst->Texture.Texture, &shadow_ref);
+
+ assert(dim <= 4);
+ if (shadow_ref >= 0)
+ assert(shadow_ref >= dim && shadow_ref < Elements(args));
+
+ /* fetch modifier to the last argument */
+ if (modifier != TEX_MODIFIER_NONE) {
+ const int last = Elements(args) - 1;
+
+ /* fetch modifier from src0.w or src1.x */
+ if (sampler == 1) {
+ assert(dim <= TGSI_CHAN_W && shadow_ref != TGSI_CHAN_W);
+ FETCH(&r[last], 0, TGSI_CHAN_W);
+ }
+ else {
+ assert(shadow_ref != 4);
+ FETCH(&r[last], 1, TGSI_CHAN_X);
+ }
+
+ if (modifier != TEX_MODIFIER_PROJECTED) {
+ args[last] = &r[last];
+ }
+ else {
+ proj = &r[last];
+ args[last] = &ZeroVec;
+ }
+
+ /* point unused arguments to zero vector */
+ for (i = dim; i < last; i++)
+ args[i] = &ZeroVec;
+
+ if (modifier == TEX_MODIFIER_EXPLICIT_LOD)
+ control = tgsi_sampler_lod_explicit;
+ else if (modifier == TEX_MODIFIER_LOD_BIAS)
+ control = tgsi_sampler_lod_bias;
+ }
+ else {
+ for (i = dim; i < Elements(args); i++)
+ args[i] = &ZeroVec;
+ }
+
+ /* fetch coordinates */
+ for (i = 0; i < dim; i++) {
+ FETCH(&r[i], 0, TGSI_CHAN_X + i);
+
+ if (proj)
+ micro_div(&r[i], &r[i], proj);
+
+ args[i] = &r[i];
+ }
+
+ /* fetch reference value */
+ if (shadow_ref >= 0) {
+ FETCH(&r[shadow_ref], shadow_ref / 4, TGSI_CHAN_X + (shadow_ref % 4));
+
+ if (proj)
+ micro_div(&r[shadow_ref], &r[shadow_ref], proj);
+
+ args[shadow_ref] = &r[shadow_ref];
+ }
+
+ fetch_texel(mach->Sampler, unit, unit,
+ args[0], args[1], args[2], args[3], args[4],
+ NULL, offsets, control,
+ &r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
+
+#if 0
+ debug_printf("fetch r: %g %g %g %g\n",
+ r[0].f[0], r[0].f[1], r[0].f[2], r[0].f[3]);
+ debug_printf("fetch g: %g %g %g %g\n",
+ r[1].f[0], r[1].f[1], r[1].f[2], r[1].f[3]);
+ debug_printf("fetch b: %g %g %g %g\n",
+ r[2].f[0], r[2].f[1], r[2].f[2], r[2].f[3]);
+ debug_printf("fetch a: %g %g %g %g\n",
+ r[3].f[0], r[3].f[1], r[3].f[2], r[3].f[3]);
+#endif
+
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &r[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+}
+
+
+static void
+exec_txd(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ const uint unit = inst->Src[3].Register.Index;
+ union tgsi_exec_channel r[4];
+ float derivs[3][2][TGSI_QUAD_SIZE];
+ uint chan;
+ int8_t offsets[3];
+
+ /* always fetch all 3 offsets, overkill but keeps code simple */
+ fetch_texel_offsets(mach, inst, offsets);
+
+ switch (inst->Texture.Texture) {
+ case TGSI_TEXTURE_1D:
+ FETCH(&r[0], 0, TGSI_CHAN_X);
+
+ fetch_assign_deriv_channel(mach, inst, 1, TGSI_CHAN_X, derivs[0]);
+
+ fetch_texel(mach->Sampler, unit, unit,
+ &r[0], &ZeroVec, &ZeroVec, &ZeroVec, &ZeroVec, /* S, T, P, C, LOD */
+ derivs, offsets, tgsi_sampler_derivs_explicit,
+ &r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
+ break;
+
+ case TGSI_TEXTURE_SHADOW1D:
+ case TGSI_TEXTURE_1D_ARRAY:
+ case TGSI_TEXTURE_SHADOW1D_ARRAY:
+ /* SHADOW1D/1D_ARRAY would not need Y/Z respectively, but don't bother */
+ FETCH(&r[0], 0, TGSI_CHAN_X);
+ FETCH(&r[1], 0, TGSI_CHAN_Y);
+ FETCH(&r[2], 0, TGSI_CHAN_Z);
+
+ fetch_assign_deriv_channel(mach, inst, 1, TGSI_CHAN_X, derivs[0]);
+
+ fetch_texel(mach->Sampler, unit, unit,
+ &r[0], &r[1], &r[2], &ZeroVec, &ZeroVec, /* S, T, P, C, LOD */
+ derivs, offsets, tgsi_sampler_derivs_explicit,
+ &r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
+ break;
+
+ case TGSI_TEXTURE_2D:
+ case TGSI_TEXTURE_RECT:
+ FETCH(&r[0], 0, TGSI_CHAN_X);
+ FETCH(&r[1], 0, TGSI_CHAN_Y);
+
+ fetch_assign_deriv_channel(mach, inst, 1, TGSI_CHAN_X, derivs[0]);
+ fetch_assign_deriv_channel(mach, inst, 1, TGSI_CHAN_Y, derivs[1]);
+
+ fetch_texel(mach->Sampler, unit, unit,
+ &r[0], &r[1], &ZeroVec, &ZeroVec, &ZeroVec, /* S, T, P, C, LOD */
+ derivs, offsets, tgsi_sampler_derivs_explicit,
+ &r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
+ break;
+
+
+ case TGSI_TEXTURE_SHADOW2D:
+ case TGSI_TEXTURE_SHADOWRECT:
+ case TGSI_TEXTURE_2D_ARRAY:
+ case TGSI_TEXTURE_SHADOW2D_ARRAY:
+ /* only SHADOW2D_ARRAY actually needs W */
+ FETCH(&r[0], 0, TGSI_CHAN_X);
+ FETCH(&r[1], 0, TGSI_CHAN_Y);
+ FETCH(&r[2], 0, TGSI_CHAN_Z);
+ FETCH(&r[3], 0, TGSI_CHAN_W);
+
+ fetch_assign_deriv_channel(mach, inst, 1, TGSI_CHAN_X, derivs[0]);
+ fetch_assign_deriv_channel(mach, inst, 1, TGSI_CHAN_Y, derivs[1]);
+
+ fetch_texel(mach->Sampler, unit, unit,
+ &r[0], &r[1], &r[2], &r[3], &ZeroVec, /* inputs */
+ derivs, offsets, tgsi_sampler_derivs_explicit,
+ &r[0], &r[1], &r[2], &r[3]); /* outputs */
+ break;
+
+ case TGSI_TEXTURE_3D:
+ case TGSI_TEXTURE_CUBE:
+ case TGSI_TEXTURE_CUBE_ARRAY:
+ /* only TEXTURE_CUBE_ARRAY actually needs W */
+ FETCH(&r[0], 0, TGSI_CHAN_X);
+ FETCH(&r[1], 0, TGSI_CHAN_Y);
+ FETCH(&r[2], 0, TGSI_CHAN_Z);
+ FETCH(&r[3], 0, TGSI_CHAN_W);
+
+ fetch_assign_deriv_channel(mach, inst, 1, TGSI_CHAN_X, derivs[0]);
+ fetch_assign_deriv_channel(mach, inst, 1, TGSI_CHAN_Y, derivs[1]);
+ fetch_assign_deriv_channel(mach, inst, 1, TGSI_CHAN_Z, derivs[2]);
+
+ fetch_texel(mach->Sampler, unit, unit,
+ &r[0], &r[1], &r[2], &r[3], &ZeroVec, /* inputs */
+ derivs, offsets, tgsi_sampler_derivs_explicit,
+ &r[0], &r[1], &r[2], &r[3]); /* outputs */
+ break;
+
+ default:
+ assert(0);
+ }
+
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &r[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+}
+
+
+static void
+exec_txf(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ const uint unit = inst->Src[1].Register.Index;
+ union tgsi_exec_channel r[4];
+ uint chan;
+ float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE];
+ int j;
+ int8_t offsets[3];
+ unsigned target;
+
+ /* always fetch all 3 offsets, overkill but keeps code simple */
+ fetch_texel_offsets(mach, inst, offsets);
+
+ IFETCH(&r[3], 0, TGSI_CHAN_W);
+
+ if (inst->Instruction.Opcode == TGSI_OPCODE_SAMPLE_I) {
+ target = mach->SamplerViews[unit].Resource;
+ }
+ else {
+ target = inst->Texture.Texture;
+ }
+ switch(target) {
+ case TGSI_TEXTURE_3D:
+ case TGSI_TEXTURE_2D_ARRAY:
+ case TGSI_TEXTURE_SHADOW2D_ARRAY:
+ IFETCH(&r[2], 0, TGSI_CHAN_Z);
+ /* fallthrough */
+ case TGSI_TEXTURE_2D:
+ case TGSI_TEXTURE_RECT:
+ case TGSI_TEXTURE_SHADOW1D_ARRAY:
+ case TGSI_TEXTURE_SHADOW2D:
+ case TGSI_TEXTURE_SHADOWRECT:
+ case TGSI_TEXTURE_1D_ARRAY:
+ IFETCH(&r[1], 0, TGSI_CHAN_Y);
+ /* fallthrough */
+ case TGSI_TEXTURE_BUFFER:
+ case TGSI_TEXTURE_1D:
+ case TGSI_TEXTURE_SHADOW1D:
+ IFETCH(&r[0], 0, TGSI_CHAN_X);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+
+ mach->Sampler->get_texel(mach->Sampler, unit, r[0].i, r[1].i, r[2].i, r[3].i,
+ offsets, rgba);
+
+ for (j = 0; j < TGSI_QUAD_SIZE; j++) {
+ r[0].f[j] = rgba[0][j];
+ r[1].f[j] = rgba[1][j];
+ r[2].f[j] = rgba[2][j];
+ r[3].f[j] = rgba[3][j];
+ }
+
+ if (inst->Instruction.Opcode == TGSI_OPCODE_SAMPLE_I) {
+ unsigned char swizzles[4];
+ swizzles[0] = inst->Src[1].Register.SwizzleX;
+ swizzles[1] = inst->Src[1].Register.SwizzleY;
+ swizzles[2] = inst->Src[1].Register.SwizzleZ;
+ swizzles[3] = inst->Src[1].Register.SwizzleW;
+
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &r[swizzles[chan]],
+ &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+ }
+ else {
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &r[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+ }
+}
+
+static void
+exec_txq(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ const uint unit = inst->Src[1].Register.Index;
+ int result[4];
+ union tgsi_exec_channel r[4], src;
+ uint chan;
+ int i,j;
+
+ fetch_source(mach, &src, &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_INT);
+
+ /* XXX: This interface can't return per-pixel values */
+ mach->Sampler->get_dims(mach->Sampler, unit, src.i[0], result);
+
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ for (j = 0; j < 4; j++) {
+ r[j].i[i] = result[j];
+ }
+ }
+
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &r[chan], &inst->Dst[0], inst, chan,
+ TGSI_EXEC_DATA_INT);
+ }
+ }
+}
+
+static void
+exec_sample(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst,
+ uint modifier, boolean compare)
+{
+ const uint resource_unit = inst->Src[1].Register.Index;
+ const uint sampler_unit = inst->Src[2].Register.Index;
+ union tgsi_exec_channel r[4], c1;
+ const union tgsi_exec_channel *lod = &ZeroVec;
+ enum tgsi_sampler_control control = tgsi_sampler_lod_none;
+ uint chan;
+ unsigned char swizzles[4];
+ int8_t offsets[3];
+
+ /* always fetch all 3 offsets, overkill but keeps code simple */
+ fetch_texel_offsets(mach, inst, offsets);
+
+ assert(modifier != TEX_MODIFIER_PROJECTED);
+
+ if (modifier != TEX_MODIFIER_NONE) {
+ if (modifier == TEX_MODIFIER_LOD_BIAS) {
+ FETCH(&c1, 3, TGSI_CHAN_X);
+ lod = &c1;
+ control = tgsi_sampler_lod_bias;
+ }
+ else if (modifier == TEX_MODIFIER_EXPLICIT_LOD) {
+ FETCH(&c1, 3, TGSI_CHAN_X);
+ lod = &c1;
+ control = tgsi_sampler_lod_explicit;
+ }
+ else {
+ assert(modifier == TEX_MODIFIER_LEVEL_ZERO);
+ control = tgsi_sampler_lod_zero;
+ }
+ }
+
+ FETCH(&r[0], 0, TGSI_CHAN_X);
+
+ switch (mach->SamplerViews[resource_unit].Resource) {
+ case TGSI_TEXTURE_1D:
+ if (compare) {
+ FETCH(&r[2], 3, TGSI_CHAN_X);
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
+ &r[0], &ZeroVec, &r[2], &ZeroVec, lod, /* S, T, P, C, LOD */
+ NULL, offsets, control,
+ &r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
+ }
+ else {
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
+ &r[0], &ZeroVec, &ZeroVec, &ZeroVec, lod, /* S, T, P, C, LOD */
+ NULL, offsets, control,
+ &r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
+ }
+ break;
+
+ case TGSI_TEXTURE_1D_ARRAY:
+ case TGSI_TEXTURE_2D:
+ case TGSI_TEXTURE_RECT:
+ FETCH(&r[1], 0, TGSI_CHAN_Y);
+ if (compare) {
+ FETCH(&r[2], 3, TGSI_CHAN_X);
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
+ &r[0], &r[1], &r[2], &ZeroVec, lod, /* S, T, P, C, LOD */
+ NULL, offsets, control,
+ &r[0], &r[1], &r[2], &r[3]); /* outputs */
+ }
+ else {
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
+ &r[0], &r[1], &ZeroVec, &ZeroVec, lod, /* S, T, P, C, LOD */
+ NULL, offsets, control,
+ &r[0], &r[1], &r[2], &r[3]); /* outputs */
+ }
+ break;
+
+ case TGSI_TEXTURE_2D_ARRAY:
+ case TGSI_TEXTURE_3D:
+ case TGSI_TEXTURE_CUBE:
+ FETCH(&r[1], 0, TGSI_CHAN_Y);
+ FETCH(&r[2], 0, TGSI_CHAN_Z);
+ if(compare) {
+ FETCH(&r[3], 3, TGSI_CHAN_X);
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
+ &r[0], &r[1], &r[2], &r[3], lod,
+ NULL, offsets, control,
+ &r[0], &r[1], &r[2], &r[3]);
+ }
+ else {
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
+ &r[0], &r[1], &r[2], &ZeroVec, lod,
+ NULL, offsets, control,
+ &r[0], &r[1], &r[2], &r[3]);
+ }
+ break;
+
+ case TGSI_TEXTURE_CUBE_ARRAY:
+ FETCH(&r[1], 0, TGSI_CHAN_Y);
+ FETCH(&r[2], 0, TGSI_CHAN_Z);
+ FETCH(&r[3], 0, TGSI_CHAN_W);
+ if(compare) {
+ FETCH(&r[4], 3, TGSI_CHAN_X);
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
+ &r[0], &r[1], &r[2], &r[3], &r[4],
+ NULL, offsets, control,
+ &r[0], &r[1], &r[2], &r[3]);
+ }
+ else {
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
+ &r[0], &r[1], &r[2], &r[3], lod,
+ NULL, offsets, control,
+ &r[0], &r[1], &r[2], &r[3]);
+ }
+ break;
+
+
+ default:
+ assert(0);
+ }
+
+ swizzles[0] = inst->Src[1].Register.SwizzleX;
+ swizzles[1] = inst->Src[1].Register.SwizzleY;
+ swizzles[2] = inst->Src[1].Register.SwizzleZ;
+ swizzles[3] = inst->Src[1].Register.SwizzleW;
+
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &r[swizzles[chan]],
+ &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+}
+
+static void
+exec_sample_d(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ const uint resource_unit = inst->Src[1].Register.Index;
+ const uint sampler_unit = inst->Src[2].Register.Index;
+ union tgsi_exec_channel r[4];
+ float derivs[3][2][TGSI_QUAD_SIZE];
+ uint chan;
+ unsigned char swizzles[4];
+ int8_t offsets[3];
+
+ /* always fetch all 3 offsets, overkill but keeps code simple */
+ fetch_texel_offsets(mach, inst, offsets);
+
+ FETCH(&r[0], 0, TGSI_CHAN_X);
+
+ switch (mach->SamplerViews[resource_unit].Resource) {
+ case TGSI_TEXTURE_1D:
+ case TGSI_TEXTURE_1D_ARRAY:
+ /* only 1D array actually needs Y */
+ FETCH(&r[1], 0, TGSI_CHAN_Y);
+
+ fetch_assign_deriv_channel(mach, inst, 3, TGSI_CHAN_X, derivs[0]);
+
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
+ &r[0], &r[1], &ZeroVec, &ZeroVec, &ZeroVec, /* S, T, P, C, LOD */
+ derivs, offsets, tgsi_sampler_derivs_explicit,
+ &r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
+ break;
+
+ case TGSI_TEXTURE_2D:
+ case TGSI_TEXTURE_RECT:
+ case TGSI_TEXTURE_2D_ARRAY:
+ /* only 2D array actually needs Z */
+ FETCH(&r[1], 0, TGSI_CHAN_Y);
+ FETCH(&r[2], 0, TGSI_CHAN_Z);
+
+ fetch_assign_deriv_channel(mach, inst, 3, TGSI_CHAN_X, derivs[0]);
+ fetch_assign_deriv_channel(mach, inst, 3, TGSI_CHAN_Y, derivs[1]);
+
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
+ &r[0], &r[1], &r[2], &ZeroVec, &ZeroVec, /* inputs */
+ derivs, offsets, tgsi_sampler_derivs_explicit,
+ &r[0], &r[1], &r[2], &r[3]); /* outputs */
+ break;
+
+ case TGSI_TEXTURE_3D:
+ case TGSI_TEXTURE_CUBE:
+ case TGSI_TEXTURE_CUBE_ARRAY:
+ /* only cube array actually needs W */
+ FETCH(&r[1], 0, TGSI_CHAN_Y);
+ FETCH(&r[2], 0, TGSI_CHAN_Z);
+ FETCH(&r[3], 0, TGSI_CHAN_W);
+
+ fetch_assign_deriv_channel(mach, inst, 3, TGSI_CHAN_X, derivs[0]);
+ fetch_assign_deriv_channel(mach, inst, 3, TGSI_CHAN_Y, derivs[1]);
+ fetch_assign_deriv_channel(mach, inst, 3, TGSI_CHAN_Z, derivs[2]);
+
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
+ &r[0], &r[1], &r[2], &r[3], &ZeroVec,
+ derivs, offsets, tgsi_sampler_derivs_explicit,
+ &r[0], &r[1], &r[2], &r[3]);
+ break;
+
+ default:
+ assert(0);
+ }
+
+ swizzles[0] = inst->Src[1].Register.SwizzleX;
+ swizzles[1] = inst->Src[1].Register.SwizzleY;
+ swizzles[2] = inst->Src[1].Register.SwizzleZ;
+ swizzles[3] = inst->Src[1].Register.SwizzleW;
+
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &r[swizzles[chan]],
+ &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+}
+
+
+/**
+ * Evaluate a constant-valued coefficient at the position of the
+ * current quad.
+ */
+static void
+eval_constant_coef(
+ struct tgsi_exec_machine *mach,
+ unsigned attrib,
+ unsigned chan )
+{
+ unsigned i;
+
+ for( i = 0; i < TGSI_QUAD_SIZE; i++ ) {
+ mach->Inputs[attrib].xyzw[chan].f[i] = mach->InterpCoefs[attrib].a0[chan];
+ }
+}
+
+/**
+ * Evaluate a linear-valued coefficient at the position of the
+ * current quad.
+ */
+static void
+eval_linear_coef(
+ struct tgsi_exec_machine *mach,
+ unsigned attrib,
+ unsigned chan )
+{
+ const float x = mach->QuadPos.xyzw[0].f[0];
+ const float y = mach->QuadPos.xyzw[1].f[0];
+ const float dadx = mach->InterpCoefs[attrib].dadx[chan];
+ const float dady = mach->InterpCoefs[attrib].dady[chan];
+ const float a0 = mach->InterpCoefs[attrib].a0[chan] + dadx * x + dady * y;
+ mach->Inputs[attrib].xyzw[chan].f[0] = a0;
+ mach->Inputs[attrib].xyzw[chan].f[1] = a0 + dadx;
+ mach->Inputs[attrib].xyzw[chan].f[2] = a0 + dady;
+ mach->Inputs[attrib].xyzw[chan].f[3] = a0 + dadx + dady;
+}
+
+/**
+ * Evaluate a perspective-valued coefficient at the position of the
+ * current quad.
+ */
+static void
+eval_perspective_coef(
+ struct tgsi_exec_machine *mach,
+ unsigned attrib,
+ unsigned chan )
+{
+ const float x = mach->QuadPos.xyzw[0].f[0];
+ const float y = mach->QuadPos.xyzw[1].f[0];
+ const float dadx = mach->InterpCoefs[attrib].dadx[chan];
+ const float dady = mach->InterpCoefs[attrib].dady[chan];
+ const float a0 = mach->InterpCoefs[attrib].a0[chan] + dadx * x + dady * y;
+ const float *w = mach->QuadPos.xyzw[3].f;
+ /* divide by W here */
+ mach->Inputs[attrib].xyzw[chan].f[0] = a0 / w[0];
+ mach->Inputs[attrib].xyzw[chan].f[1] = (a0 + dadx) / w[1];
+ mach->Inputs[attrib].xyzw[chan].f[2] = (a0 + dady) / w[2];
+ mach->Inputs[attrib].xyzw[chan].f[3] = (a0 + dadx + dady) / w[3];
+}
+
+
+typedef void (* eval_coef_func)(
+ struct tgsi_exec_machine *mach,
+ unsigned attrib,
+ unsigned chan );
+
+static void
+exec_declaration(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_declaration *decl)
+{
+ if (decl->Declaration.File == TGSI_FILE_SAMPLER_VIEW) {
+ mach->SamplerViews[decl->Range.First] = decl->SamplerView;
+ return;
+ }
+
+ if (mach->Processor == TGSI_PROCESSOR_FRAGMENT) {
+ if (decl->Declaration.File == TGSI_FILE_INPUT) {
+ uint first, last, mask;
+
+ first = decl->Range.First;
+ last = decl->Range.Last;
+ mask = decl->Declaration.UsageMask;
+
+ /* XXX we could remove this special-case code since
+ * mach->InterpCoefs[first].a0 should already have the
+ * front/back-face value. But we should first update the
+ * ureg code to emit the right UsageMask value (WRITEMASK_X).
+ * Then, we could remove the tgsi_exec_machine::Face field.
+ */
+ /* XXX make FACE a system value */
+ if (decl->Semantic.Name == TGSI_SEMANTIC_FACE) {
+ uint i;
+
+ assert(decl->Semantic.Index == 0);
+ assert(first == last);
+
+ for (i = 0; i < TGSI_QUAD_SIZE; i++) {
+ mach->Inputs[first].xyzw[0].f[i] = mach->Face;
+ }
+ } else {
+ eval_coef_func eval;
+ uint i, j;
+
+ switch (decl->Interp.Interpolate) {
+ case TGSI_INTERPOLATE_CONSTANT:
+ eval = eval_constant_coef;
+ break;
+
+ case TGSI_INTERPOLATE_LINEAR:
+ eval = eval_linear_coef;
+ break;
+
+ case TGSI_INTERPOLATE_PERSPECTIVE:
+ eval = eval_perspective_coef;
+ break;
+
+ case TGSI_INTERPOLATE_COLOR:
+ eval = mach->flatshade_color ? eval_constant_coef : eval_perspective_coef;
+ break;
+
+ default:
+ assert(0);
+ return;
+ }
+
+ for (j = 0; j < TGSI_NUM_CHANNELS; j++) {
+ if (mask & (1 << j)) {
+ for (i = first; i <= last; i++) {
+ eval(mach, i, j);
+ }
+ }
+ }
+ }
+
+ if (DEBUG_EXECUTION) {
+ uint i, j;
+ for (i = first; i <= last; ++i) {
+ debug_printf("IN[%2u] = ", i);
+ for (j = 0; j < TGSI_NUM_CHANNELS; j++) {
+ if (j > 0) {
+ debug_printf(" ");
+ }
+ debug_printf("(%6f %u, %6f %u, %6f %u, %6f %u)\n",
+ mach->Inputs[i].xyzw[0].f[j], mach->Inputs[i].xyzw[0].u[j],
+ mach->Inputs[i].xyzw[1].f[j], mach->Inputs[i].xyzw[1].u[j],
+ mach->Inputs[i].xyzw[2].f[j], mach->Inputs[i].xyzw[2].u[j],
+ mach->Inputs[i].xyzw[3].f[j], mach->Inputs[i].xyzw[3].u[j]);
+ }
+ }
+ }
+ }
+ }
+
+ if (decl->Declaration.File == TGSI_FILE_SYSTEM_VALUE) {
+ mach->SysSemanticToIndex[decl->Declaration.Semantic] = decl->Range.First;
+ }
+}
+
+
+typedef void (* micro_op)(union tgsi_exec_channel *dst);
+
+static void
+exec_vector(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst,
+ micro_op op,
+ enum tgsi_exec_datatype dst_datatype)
+{
+ unsigned int chan;
+
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ union tgsi_exec_channel dst;
+
+ op(&dst);
+ store_dest(mach, &dst, &inst->Dst[0], inst, chan, dst_datatype);
+ }
+ }
+}
+
+typedef void (* micro_unary_op)(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src);
+
+static void
+exec_scalar_unary(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst,
+ micro_unary_op op,
+ enum tgsi_exec_datatype dst_datatype,
+ enum tgsi_exec_datatype src_datatype)
+{
+ unsigned int chan;
+ union tgsi_exec_channel src;
+ union tgsi_exec_channel dst;
+
+ fetch_source(mach, &src, &inst->Src[0], TGSI_CHAN_X, src_datatype);
+ op(&dst, &src);
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &dst, &inst->Dst[0], inst, chan, dst_datatype);
+ }
+ }
+}
+
+static void
+exec_vector_unary(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst,
+ micro_unary_op op,
+ enum tgsi_exec_datatype dst_datatype,
+ enum tgsi_exec_datatype src_datatype)
+{
+ unsigned int chan;
+ struct tgsi_exec_vector dst;
+
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ union tgsi_exec_channel src;
+
+ fetch_source(mach, &src, &inst->Src[0], chan, src_datatype);
+ op(&dst.xyzw[chan], &src);
+ }
+ }
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &dst.xyzw[chan], &inst->Dst[0], inst, chan, dst_datatype);
+ }
+ }
+}
+
+typedef void (* micro_binary_op)(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1);
+
+static void
+exec_scalar_binary(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst,
+ micro_binary_op op,
+ enum tgsi_exec_datatype dst_datatype,
+ enum tgsi_exec_datatype src_datatype)
+{
+ unsigned int chan;
+ union tgsi_exec_channel src[2];
+ union tgsi_exec_channel dst;
+
+ fetch_source(mach, &src[0], &inst->Src[0], TGSI_CHAN_X, src_datatype);
+ fetch_source(mach, &src[1], &inst->Src[1], TGSI_CHAN_X, src_datatype);
+ op(&dst, &src[0], &src[1]);
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &dst, &inst->Dst[0], inst, chan, dst_datatype);
+ }
+ }
+}
+
+static void
+exec_vector_binary(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst,
+ micro_binary_op op,
+ enum tgsi_exec_datatype dst_datatype,
+ enum tgsi_exec_datatype src_datatype)
+{
+ unsigned int chan;
+ struct tgsi_exec_vector dst;
+
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ union tgsi_exec_channel src[2];
+
+ fetch_source(mach, &src[0], &inst->Src[0], chan, src_datatype);
+ fetch_source(mach, &src[1], &inst->Src[1], chan, src_datatype);
+ op(&dst.xyzw[chan], &src[0], &src[1]);
+ }
+ }
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &dst.xyzw[chan], &inst->Dst[0], inst, chan, dst_datatype);
+ }
+ }
+}
+
+typedef void (* micro_trinary_op)(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1,
+ const union tgsi_exec_channel *src2);
+
+static void
+exec_vector_trinary(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst,
+ micro_trinary_op op,
+ enum tgsi_exec_datatype dst_datatype,
+ enum tgsi_exec_datatype src_datatype)
+{
+ unsigned int chan;
+ struct tgsi_exec_vector dst;
+
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ union tgsi_exec_channel src[3];
+
+ fetch_source(mach, &src[0], &inst->Src[0], chan, src_datatype);
+ fetch_source(mach, &src[1], &inst->Src[1], chan, src_datatype);
+ fetch_source(mach, &src[2], &inst->Src[2], chan, src_datatype);
+ op(&dst.xyzw[chan], &src[0], &src[1], &src[2]);
+ }
+ }
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &dst.xyzw[chan], &inst->Dst[0], inst, chan, dst_datatype);
+ }
+ }
+}
+
+static void
+exec_dp3(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ unsigned int chan;
+ union tgsi_exec_channel arg[3];
+
+ fetch_source(mach, &arg[0], &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ fetch_source(mach, &arg[1], &inst->Src[1], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&arg[2], &arg[0], &arg[1]);
+
+ for (chan = TGSI_CHAN_Y; chan <= TGSI_CHAN_Z; chan++) {
+ fetch_source(mach, &arg[0], &inst->Src[0], chan, TGSI_EXEC_DATA_FLOAT);
+ fetch_source(mach, &arg[1], &inst->Src[1], chan, TGSI_EXEC_DATA_FLOAT);
+ micro_mad(&arg[2], &arg[0], &arg[1], &arg[2]);
+ }
+
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &arg[2], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+}
+
+static void
+exec_dp4(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ unsigned int chan;
+ union tgsi_exec_channel arg[3];
+
+ fetch_source(mach, &arg[0], &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ fetch_source(mach, &arg[1], &inst->Src[1], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&arg[2], &arg[0], &arg[1]);
+
+ for (chan = TGSI_CHAN_Y; chan <= TGSI_CHAN_W; chan++) {
+ fetch_source(mach, &arg[0], &inst->Src[0], chan, TGSI_EXEC_DATA_FLOAT);
+ fetch_source(mach, &arg[1], &inst->Src[1], chan, TGSI_EXEC_DATA_FLOAT);
+ micro_mad(&arg[2], &arg[0], &arg[1], &arg[2]);
+ }
+
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &arg[2], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+}
+
+static void
+exec_dp2a(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ unsigned int chan;
+ union tgsi_exec_channel arg[3];
+
+ fetch_source(mach, &arg[0], &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ fetch_source(mach, &arg[1], &inst->Src[1], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&arg[2], &arg[0], &arg[1]);
+
+ fetch_source(mach, &arg[0], &inst->Src[0], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ fetch_source(mach, &arg[1], &inst->Src[1], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ micro_mad(&arg[0], &arg[0], &arg[1], &arg[2]);
+
+ fetch_source(mach, &arg[1], &inst->Src[2], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ micro_add(&arg[0], &arg[0], &arg[1]);
+
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &arg[0], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+}
+
+static void
+exec_dph(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ unsigned int chan;
+ union tgsi_exec_channel arg[3];
+
+ fetch_source(mach, &arg[0], &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ fetch_source(mach, &arg[1], &inst->Src[1], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&arg[2], &arg[0], &arg[1]);
+
+ fetch_source(mach, &arg[0], &inst->Src[0], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ fetch_source(mach, &arg[1], &inst->Src[1], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ micro_mad(&arg[2], &arg[0], &arg[1], &arg[2]);
+
+ fetch_source(mach, &arg[0], &inst->Src[0], TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+ fetch_source(mach, &arg[1], &inst->Src[1], TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+ micro_mad(&arg[0], &arg[0], &arg[1], &arg[2]);
+
+ fetch_source(mach, &arg[1], &inst->Src[1], TGSI_CHAN_W, TGSI_EXEC_DATA_FLOAT);
+ micro_add(&arg[0], &arg[0], &arg[1]);
+
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &arg[0], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+}
+
+static void
+exec_dp2(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ unsigned int chan;
+ union tgsi_exec_channel arg[3];
+
+ fetch_source(mach, &arg[0], &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ fetch_source(mach, &arg[1], &inst->Src[1], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&arg[2], &arg[0], &arg[1]);
+
+ fetch_source(mach, &arg[0], &inst->Src[0], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ fetch_source(mach, &arg[1], &inst->Src[1], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ micro_mad(&arg[2], &arg[0], &arg[1], &arg[2]);
+
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &arg[2], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+}
+
+static void
+exec_nrm4(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ unsigned int chan;
+ union tgsi_exec_channel arg[4];
+ union tgsi_exec_channel scale;
+
+ fetch_source(mach, &arg[0], &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&scale, &arg[0], &arg[0]);
+
+ for (chan = TGSI_CHAN_Y; chan <= TGSI_CHAN_W; chan++) {
+ union tgsi_exec_channel product;
+
+ fetch_source(mach, &arg[chan], &inst->Src[0], chan, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&product, &arg[chan], &arg[chan]);
+ micro_add(&scale, &scale, &product);
+ }
+
+ micro_rsq(&scale, &scale);
+
+ for (chan = TGSI_CHAN_X; chan <= TGSI_CHAN_W; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ micro_mul(&arg[chan], &arg[chan], &scale);
+ store_dest(mach, &arg[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+}
+
+static void
+exec_nrm3(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_XYZ) {
+ unsigned int chan;
+ union tgsi_exec_channel arg[3];
+ union tgsi_exec_channel scale;
+
+ fetch_source(mach, &arg[0], &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&scale, &arg[0], &arg[0]);
+
+ for (chan = TGSI_CHAN_Y; chan <= TGSI_CHAN_Z; chan++) {
+ union tgsi_exec_channel product;
+
+ fetch_source(mach, &arg[chan], &inst->Src[0], chan, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&product, &arg[chan], &arg[chan]);
+ micro_add(&scale, &scale, &product);
+ }
+
+ micro_rsq(&scale, &scale);
+
+ for (chan = TGSI_CHAN_X; chan <= TGSI_CHAN_Z; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ micro_mul(&arg[chan], &arg[chan], &scale);
+ store_dest(mach, &arg[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+ }
+
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) {
+ store_dest(mach, &OneVec, &inst->Dst[0], inst, TGSI_CHAN_W, TGSI_EXEC_DATA_FLOAT);
+ }
+}
+
+static void
+exec_scs(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_XY) {
+ union tgsi_exec_channel arg;
+ union tgsi_exec_channel result;
+
+ fetch_source(mach, &arg, &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) {
+ micro_cos(&result, &arg);
+ store_dest(mach, &result, &inst->Dst[0], inst, TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) {
+ micro_sin(&result, &arg);
+ store_dest(mach, &result, &inst->Dst[0], inst, TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) {
+ store_dest(mach, &ZeroVec, &inst->Dst[0], inst, TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) {
+ store_dest(mach, &OneVec, &inst->Dst[0], inst, TGSI_CHAN_W, TGSI_EXEC_DATA_FLOAT);
+ }
+}
+
+static void
+exec_x2d(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ union tgsi_exec_channel r[4];
+ union tgsi_exec_channel d[2];
+
+ fetch_source(mach, &r[0], &inst->Src[1], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ fetch_source(mach, &r[1], &inst->Src[1], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_XZ) {
+ fetch_source(mach, &r[2], &inst->Src[2], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&r[2], &r[2], &r[0]);
+ fetch_source(mach, &r[3], &inst->Src[2], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&r[3], &r[3], &r[1]);
+ micro_add(&r[2], &r[2], &r[3]);
+ fetch_source(mach, &r[3], &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ micro_add(&d[0], &r[2], &r[3]);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_YW) {
+ fetch_source(mach, &r[2], &inst->Src[2], TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&r[2], &r[2], &r[0]);
+ fetch_source(mach, &r[3], &inst->Src[2], TGSI_CHAN_W, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&r[3], &r[3], &r[1]);
+ micro_add(&r[2], &r[2], &r[3]);
+ fetch_source(mach, &r[3], &inst->Src[0], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ micro_add(&d[1], &r[2], &r[3]);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) {
+ store_dest(mach, &d[0], &inst->Dst[0], inst, TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) {
+ store_dest(mach, &d[1], &inst->Dst[0], inst, TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) {
+ store_dest(mach, &d[0], &inst->Dst[0], inst, TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) {
+ store_dest(mach, &d[1], &inst->Dst[0], inst, TGSI_CHAN_W, TGSI_EXEC_DATA_FLOAT);
+ }
+}
+
+static void
+exec_rfl(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ union tgsi_exec_channel r[9];
+
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_XYZ) {
+ /* r0 = dp3(src0, src0) */
+ fetch_source(mach, &r[2], &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&r[0], &r[2], &r[2]);
+ fetch_source(mach, &r[4], &inst->Src[0], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&r[8], &r[4], &r[4]);
+ micro_add(&r[0], &r[0], &r[8]);
+ fetch_source(mach, &r[6], &inst->Src[0], TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&r[8], &r[6], &r[6]);
+ micro_add(&r[0], &r[0], &r[8]);
+
+ /* r1 = dp3(src0, src1) */
+ fetch_source(mach, &r[3], &inst->Src[1], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&r[1], &r[2], &r[3]);
+ fetch_source(mach, &r[5], &inst->Src[1], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&r[8], &r[4], &r[5]);
+ micro_add(&r[1], &r[1], &r[8]);
+ fetch_source(mach, &r[7], &inst->Src[1], TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&r[8], &r[6], &r[7]);
+ micro_add(&r[1], &r[1], &r[8]);
+
+ /* r1 = 2 * r1 / r0 */
+ micro_add(&r[1], &r[1], &r[1]);
+ micro_div(&r[1], &r[1], &r[0]);
+
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) {
+ micro_mul(&r[2], &r[2], &r[1]);
+ micro_sub(&r[2], &r[2], &r[3]);
+ store_dest(mach, &r[2], &inst->Dst[0], inst, TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) {
+ micro_mul(&r[4], &r[4], &r[1]);
+ micro_sub(&r[4], &r[4], &r[5]);
+ store_dest(mach, &r[4], &inst->Dst[0], inst, TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) {
+ micro_mul(&r[6], &r[6], &r[1]);
+ micro_sub(&r[6], &r[6], &r[7]);
+ store_dest(mach, &r[6], &inst->Dst[0], inst, TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) {
+ store_dest(mach, &OneVec, &inst->Dst[0], inst, TGSI_CHAN_W, TGSI_EXEC_DATA_FLOAT);
+ }
+}
+
+static void
+exec_xpd(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ union tgsi_exec_channel r[6];
+ union tgsi_exec_channel d[3];
+
+ fetch_source(mach, &r[0], &inst->Src[0], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ fetch_source(mach, &r[1], &inst->Src[1], TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+
+ micro_mul(&r[2], &r[0], &r[1]);
+
+ fetch_source(mach, &r[3], &inst->Src[0], TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+ fetch_source(mach, &r[4], &inst->Src[1], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+
+ micro_mul(&r[5], &r[3], &r[4] );
+ micro_sub(&d[TGSI_CHAN_X], &r[2], &r[5]);
+
+ fetch_source(mach, &r[2], &inst->Src[1], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+
+ micro_mul(&r[3], &r[3], &r[2]);
+
+ fetch_source(mach, &r[5], &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+
+ micro_mul(&r[1], &r[1], &r[5]);
+ micro_sub(&d[TGSI_CHAN_Y], &r[3], &r[1]);
+
+ micro_mul(&r[5], &r[5], &r[4]);
+ micro_mul(&r[0], &r[0], &r[2]);
+ micro_sub(&d[TGSI_CHAN_Z], &r[5], &r[0]);
+
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) {
+ store_dest(mach, &d[TGSI_CHAN_X], &inst->Dst[0], inst, TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) {
+ store_dest(mach, &d[TGSI_CHAN_Y], &inst->Dst[0], inst, TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) {
+ store_dest(mach, &d[TGSI_CHAN_Z], &inst->Dst[0], inst, TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) {
+ store_dest(mach, &OneVec, &inst->Dst[0], inst, TGSI_CHAN_W, TGSI_EXEC_DATA_FLOAT);
+ }
+}
+
+static void
+exec_dst(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ union tgsi_exec_channel r[2];
+ union tgsi_exec_channel d[4];
+
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) {
+ fetch_source(mach, &r[0], &inst->Src[0], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ fetch_source(mach, &r[1], &inst->Src[1], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ micro_mul(&d[TGSI_CHAN_Y], &r[0], &r[1]);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) {
+ fetch_source(mach, &d[TGSI_CHAN_Z], &inst->Src[0], TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) {
+ fetch_source(mach, &d[TGSI_CHAN_W], &inst->Src[1], TGSI_CHAN_W, TGSI_EXEC_DATA_FLOAT);
+ }
+
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) {
+ store_dest(mach, &OneVec, &inst->Dst[0], inst, TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) {
+ store_dest(mach, &d[TGSI_CHAN_Y], &inst->Dst[0], inst, TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) {
+ store_dest(mach, &d[TGSI_CHAN_Z], &inst->Dst[0], inst, TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) {
+ store_dest(mach, &d[TGSI_CHAN_W], &inst->Dst[0], inst, TGSI_CHAN_W, TGSI_EXEC_DATA_FLOAT);
+ }
+}
+
+static void
+exec_log(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ union tgsi_exec_channel r[3];
+
+ fetch_source(mach, &r[0], &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ micro_abs(&r[2], &r[0]); /* r2 = abs(r0) */
+ micro_lg2(&r[1], &r[2]); /* r1 = lg2(r2) */
+ micro_flr(&r[0], &r[1]); /* r0 = floor(r1) */
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) {
+ store_dest(mach, &r[0], &inst->Dst[0], inst, TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) {
+ micro_exp2(&r[0], &r[0]); /* r0 = 2 ^ r0 */
+ micro_div(&r[0], &r[2], &r[0]); /* r0 = r2 / r0 */
+ store_dest(mach, &r[0], &inst->Dst[0], inst, TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) {
+ store_dest(mach, &r[1], &inst->Dst[0], inst, TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) {
+ store_dest(mach, &OneVec, &inst->Dst[0], inst, TGSI_CHAN_W, TGSI_EXEC_DATA_FLOAT);
+ }
+}
+
+static void
+exec_exp(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ union tgsi_exec_channel r[3];
+
+ fetch_source(mach, &r[0], &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ micro_flr(&r[1], &r[0]); /* r1 = floor(r0) */
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) {
+ micro_exp2(&r[2], &r[1]); /* r2 = 2 ^ r1 */
+ store_dest(mach, &r[2], &inst->Dst[0], inst, TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) {
+ micro_sub(&r[2], &r[0], &r[1]); /* r2 = r0 - r1 */
+ store_dest(mach, &r[2], &inst->Dst[0], inst, TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) {
+ micro_exp2(&r[2], &r[0]); /* r2 = 2 ^ r0 */
+ store_dest(mach, &r[2], &inst->Dst[0], inst, TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) {
+ store_dest(mach, &OneVec, &inst->Dst[0], inst, TGSI_CHAN_W, TGSI_EXEC_DATA_FLOAT);
+ }
+}
+
+static void
+exec_lit(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ union tgsi_exec_channel r[3];
+ union tgsi_exec_channel d[3];
+
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_YZ) {
+ fetch_source(mach, &r[0], &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) {
+ fetch_source(mach, &r[1], &inst->Src[0], TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ micro_max(&r[1], &r[1], &ZeroVec);
+
+ fetch_source(mach, &r[2], &inst->Src[0], TGSI_CHAN_W, TGSI_EXEC_DATA_FLOAT);
+ micro_min(&r[2], &r[2], &P128Vec);
+ micro_max(&r[2], &r[2], &M128Vec);
+ micro_pow(&r[1], &r[1], &r[2]);
+ micro_lt(&d[TGSI_CHAN_Z], &ZeroVec, &r[0], &r[1], &ZeroVec);
+ store_dest(mach, &d[TGSI_CHAN_Z], &inst->Dst[0], inst, TGSI_CHAN_Z, TGSI_EXEC_DATA_FLOAT);
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) {
+ micro_max(&d[TGSI_CHAN_Y], &r[0], &ZeroVec);
+ store_dest(mach, &d[TGSI_CHAN_Y], &inst->Dst[0], inst, TGSI_CHAN_Y, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) {
+ store_dest(mach, &OneVec, &inst->Dst[0], inst, TGSI_CHAN_X, TGSI_EXEC_DATA_FLOAT);
+ }
+
+ if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) {
+ store_dest(mach, &OneVec, &inst->Dst[0], inst, TGSI_CHAN_W, TGSI_EXEC_DATA_FLOAT);
+ }
+}
+
+static void
+exec_break(struct tgsi_exec_machine *mach)
+{
+ if (mach->BreakType == TGSI_EXEC_BREAK_INSIDE_LOOP) {
+ /* turn off loop channels for each enabled exec channel */
+ mach->LoopMask &= ~mach->ExecMask;
+ /* Todo: if mach->LoopMask == 0, jump to end of loop */
+ UPDATE_EXEC_MASK(mach);
+ } else {
+ assert(mach->BreakType == TGSI_EXEC_BREAK_INSIDE_SWITCH);
+
+ mach->Switch.mask = 0x0;
+
+ UPDATE_EXEC_MASK(mach);
+ }
+}
+
+static void
+exec_switch(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ assert(mach->SwitchStackTop < TGSI_EXEC_MAX_SWITCH_NESTING);
+ assert(mach->BreakStackTop < TGSI_EXEC_MAX_BREAK_STACK);
+
+ mach->SwitchStack[mach->SwitchStackTop++] = mach->Switch;
+ fetch_source(mach, &mach->Switch.selector, &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_UINT);
+ mach->Switch.mask = 0x0;
+ mach->Switch.defaultMask = 0x0;
+
+ mach->BreakStack[mach->BreakStackTop++] = mach->BreakType;
+ mach->BreakType = TGSI_EXEC_BREAK_INSIDE_SWITCH;
+
+ UPDATE_EXEC_MASK(mach);
+}
+
+static void
+exec_case(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ uint prevMask = mach->SwitchStack[mach->SwitchStackTop - 1].mask;
+ union tgsi_exec_channel src;
+ uint mask = 0;
+
+ fetch_source(mach, &src, &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_UINT);
+
+ if (mach->Switch.selector.u[0] == src.u[0]) {
+ mask |= 0x1;
+ }
+ if (mach->Switch.selector.u[1] == src.u[1]) {
+ mask |= 0x2;
+ }
+ if (mach->Switch.selector.u[2] == src.u[2]) {
+ mask |= 0x4;
+ }
+ if (mach->Switch.selector.u[3] == src.u[3]) {
+ mask |= 0x8;
+ }
+
+ mach->Switch.defaultMask |= mask;
+
+ mach->Switch.mask |= mask & prevMask;
+
+ UPDATE_EXEC_MASK(mach);
+}
+
+/* FIXME: this will only work if default is last */
+static void
+exec_default(struct tgsi_exec_machine *mach)
+{
+ uint prevMask = mach->SwitchStack[mach->SwitchStackTop - 1].mask;
+
+ mach->Switch.mask |= ~mach->Switch.defaultMask & prevMask;
+
+ UPDATE_EXEC_MASK(mach);
+}
+
+static void
+exec_endswitch(struct tgsi_exec_machine *mach)
+{
+ mach->Switch = mach->SwitchStack[--mach->SwitchStackTop];
+ mach->BreakType = mach->BreakStack[--mach->BreakStackTop];
+
+ UPDATE_EXEC_MASK(mach);
+}
+
+static void
+micro_i2f(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->f[0] = (float)src->i[0];
+ dst->f[1] = (float)src->i[1];
+ dst->f[2] = (float)src->i[2];
+ dst->f[3] = (float)src->i[3];
+}
+
+static void
+micro_not(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->u[0] = ~src->u[0];
+ dst->u[1] = ~src->u[1];
+ dst->u[2] = ~src->u[2];
+ dst->u[3] = ~src->u[3];
+}
+
+static void
+micro_shl(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ unsigned masked_count;
+ masked_count = src1->u[0] & 0x1f;
+ dst->u[0] = src0->u[0] << masked_count;
+ masked_count = src1->u[1] & 0x1f;
+ dst->u[1] = src0->u[1] << masked_count;
+ masked_count = src1->u[2] & 0x1f;
+ dst->u[2] = src0->u[2] << masked_count;
+ masked_count = src1->u[3] & 0x1f;
+ dst->u[3] = src0->u[3] << masked_count;
+}
+
+static void
+micro_and(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src0->u[0] & src1->u[0];
+ dst->u[1] = src0->u[1] & src1->u[1];
+ dst->u[2] = src0->u[2] & src1->u[2];
+ dst->u[3] = src0->u[3] & src1->u[3];
+}
+
+static void
+micro_or(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src0->u[0] | src1->u[0];
+ dst->u[1] = src0->u[1] | src1->u[1];
+ dst->u[2] = src0->u[2] | src1->u[2];
+ dst->u[3] = src0->u[3] | src1->u[3];
+}
+
+static void
+micro_xor(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src0->u[0] ^ src1->u[0];
+ dst->u[1] = src0->u[1] ^ src1->u[1];
+ dst->u[2] = src0->u[2] ^ src1->u[2];
+ dst->u[3] = src0->u[3] ^ src1->u[3];
+}
+
+static void
+micro_mod(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->i[0] = src0->i[0] % src1->i[0];
+ dst->i[1] = src0->i[1] % src1->i[1];
+ dst->i[2] = src0->i[2] % src1->i[2];
+ dst->i[3] = src0->i[3] % src1->i[3];
+}
+
+static void
+micro_f2i(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->i[0] = (int)src->f[0];
+ dst->i[1] = (int)src->f[1];
+ dst->i[2] = (int)src->f[2];
+ dst->i[3] = (int)src->f[3];
+}
+
+static void
+micro_fseq(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src0->f[0] == src1->f[0] ? ~0 : 0;
+ dst->u[1] = src0->f[1] == src1->f[1] ? ~0 : 0;
+ dst->u[2] = src0->f[2] == src1->f[2] ? ~0 : 0;
+ dst->u[3] = src0->f[3] == src1->f[3] ? ~0 : 0;
+}
+
+static void
+micro_fsge(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src0->f[0] >= src1->f[0] ? ~0 : 0;
+ dst->u[1] = src0->f[1] >= src1->f[1] ? ~0 : 0;
+ dst->u[2] = src0->f[2] >= src1->f[2] ? ~0 : 0;
+ dst->u[3] = src0->f[3] >= src1->f[3] ? ~0 : 0;
+}
+
+static void
+micro_fslt(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src0->f[0] < src1->f[0] ? ~0 : 0;
+ dst->u[1] = src0->f[1] < src1->f[1] ? ~0 : 0;
+ dst->u[2] = src0->f[2] < src1->f[2] ? ~0 : 0;
+ dst->u[3] = src0->f[3] < src1->f[3] ? ~0 : 0;
+}
+
+static void
+micro_fsne(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src0->f[0] != src1->f[0] ? ~0 : 0;
+ dst->u[1] = src0->f[1] != src1->f[1] ? ~0 : 0;
+ dst->u[2] = src0->f[2] != src1->f[2] ? ~0 : 0;
+ dst->u[3] = src0->f[3] != src1->f[3] ? ~0 : 0;
+}
+
+static void
+micro_idiv(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->i[0] = src0->i[0] / src1->i[0];
+ dst->i[1] = src0->i[1] / src1->i[1];
+ dst->i[2] = src0->i[2] / src1->i[2];
+ dst->i[3] = src0->i[3] / src1->i[3];
+}
+
+static void
+micro_imax(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->i[0] = src0->i[0] > src1->i[0] ? src0->i[0] : src1->i[0];
+ dst->i[1] = src0->i[1] > src1->i[1] ? src0->i[1] : src1->i[1];
+ dst->i[2] = src0->i[2] > src1->i[2] ? src0->i[2] : src1->i[2];
+ dst->i[3] = src0->i[3] > src1->i[3] ? src0->i[3] : src1->i[3];
+}
+
+static void
+micro_imin(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->i[0] = src0->i[0] < src1->i[0] ? src0->i[0] : src1->i[0];
+ dst->i[1] = src0->i[1] < src1->i[1] ? src0->i[1] : src1->i[1];
+ dst->i[2] = src0->i[2] < src1->i[2] ? src0->i[2] : src1->i[2];
+ dst->i[3] = src0->i[3] < src1->i[3] ? src0->i[3] : src1->i[3];
+}
+
+static void
+micro_isge(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->i[0] = src0->i[0] >= src1->i[0] ? -1 : 0;
+ dst->i[1] = src0->i[1] >= src1->i[1] ? -1 : 0;
+ dst->i[2] = src0->i[2] >= src1->i[2] ? -1 : 0;
+ dst->i[3] = src0->i[3] >= src1->i[3] ? -1 : 0;
+}
+
+static void
+micro_ishr(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ unsigned masked_count;
+ masked_count = src1->i[0] & 0x1f;
+ dst->i[0] = src0->i[0] >> masked_count;
+ masked_count = src1->i[1] & 0x1f;
+ dst->i[1] = src0->i[1] >> masked_count;
+ masked_count = src1->i[2] & 0x1f;
+ dst->i[2] = src0->i[2] >> masked_count;
+ masked_count = src1->i[3] & 0x1f;
+ dst->i[3] = src0->i[3] >> masked_count;
+}
+
+static void
+micro_islt(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->i[0] = src0->i[0] < src1->i[0] ? -1 : 0;
+ dst->i[1] = src0->i[1] < src1->i[1] ? -1 : 0;
+ dst->i[2] = src0->i[2] < src1->i[2] ? -1 : 0;
+ dst->i[3] = src0->i[3] < src1->i[3] ? -1 : 0;
+}
+
+static void
+micro_f2u(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->u[0] = (uint)src->f[0];
+ dst->u[1] = (uint)src->f[1];
+ dst->u[2] = (uint)src->f[2];
+ dst->u[3] = (uint)src->f[3];
+}
+
+static void
+micro_u2f(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->f[0] = (float)src->u[0];
+ dst->f[1] = (float)src->u[1];
+ dst->f[2] = (float)src->u[2];
+ dst->f[3] = (float)src->u[3];
+}
+
+static void
+micro_uadd(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src0->u[0] + src1->u[0];
+ dst->u[1] = src0->u[1] + src1->u[1];
+ dst->u[2] = src0->u[2] + src1->u[2];
+ dst->u[3] = src0->u[3] + src1->u[3];
+}
+
+static void
+micro_udiv(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src1->u[0] ? src0->u[0] / src1->u[0] : ~0u;
+ dst->u[1] = src1->u[1] ? src0->u[1] / src1->u[1] : ~0u;
+ dst->u[2] = src1->u[2] ? src0->u[2] / src1->u[2] : ~0u;
+ dst->u[3] = src1->u[3] ? src0->u[3] / src1->u[3] : ~0u;
+}
+
+static void
+micro_umad(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1,
+ const union tgsi_exec_channel *src2)
+{
+ dst->u[0] = src0->u[0] * src1->u[0] + src2->u[0];
+ dst->u[1] = src0->u[1] * src1->u[1] + src2->u[1];
+ dst->u[2] = src0->u[2] * src1->u[2] + src2->u[2];
+ dst->u[3] = src0->u[3] * src1->u[3] + src2->u[3];
+}
+
+static void
+micro_umax(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src0->u[0] > src1->u[0] ? src0->u[0] : src1->u[0];
+ dst->u[1] = src0->u[1] > src1->u[1] ? src0->u[1] : src1->u[1];
+ dst->u[2] = src0->u[2] > src1->u[2] ? src0->u[2] : src1->u[2];
+ dst->u[3] = src0->u[3] > src1->u[3] ? src0->u[3] : src1->u[3];
+}
+
+static void
+micro_umin(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src0->u[0] < src1->u[0] ? src0->u[0] : src1->u[0];
+ dst->u[1] = src0->u[1] < src1->u[1] ? src0->u[1] : src1->u[1];
+ dst->u[2] = src0->u[2] < src1->u[2] ? src0->u[2] : src1->u[2];
+ dst->u[3] = src0->u[3] < src1->u[3] ? src0->u[3] : src1->u[3];
+}
+
+static void
+micro_umod(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src1->u[0] ? src0->u[0] % src1->u[0] : ~0u;
+ dst->u[1] = src1->u[1] ? src0->u[1] % src1->u[1] : ~0u;
+ dst->u[2] = src1->u[2] ? src0->u[2] % src1->u[2] : ~0u;
+ dst->u[3] = src1->u[3] ? src0->u[3] % src1->u[3] : ~0u;
+}
+
+static void
+micro_umul(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src0->u[0] * src1->u[0];
+ dst->u[1] = src0->u[1] * src1->u[1];
+ dst->u[2] = src0->u[2] * src1->u[2];
+ dst->u[3] = src0->u[3] * src1->u[3];
+}
+
+static void
+micro_useq(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src0->u[0] == src1->u[0] ? ~0 : 0;
+ dst->u[1] = src0->u[1] == src1->u[1] ? ~0 : 0;
+ dst->u[2] = src0->u[2] == src1->u[2] ? ~0 : 0;
+ dst->u[3] = src0->u[3] == src1->u[3] ? ~0 : 0;
+}
+
+static void
+micro_usge(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src0->u[0] >= src1->u[0] ? ~0 : 0;
+ dst->u[1] = src0->u[1] >= src1->u[1] ? ~0 : 0;
+ dst->u[2] = src0->u[2] >= src1->u[2] ? ~0 : 0;
+ dst->u[3] = src0->u[3] >= src1->u[3] ? ~0 : 0;
+}
+
+static void
+micro_ushr(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ unsigned masked_count;
+ masked_count = src1->u[0] & 0x1f;
+ dst->u[0] = src0->u[0] >> masked_count;
+ masked_count = src1->u[1] & 0x1f;
+ dst->u[1] = src0->u[1] >> masked_count;
+ masked_count = src1->u[2] & 0x1f;
+ dst->u[2] = src0->u[2] >> masked_count;
+ masked_count = src1->u[3] & 0x1f;
+ dst->u[3] = src0->u[3] >> masked_count;
+}
+
+static void
+micro_uslt(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src0->u[0] < src1->u[0] ? ~0 : 0;
+ dst->u[1] = src0->u[1] < src1->u[1] ? ~0 : 0;
+ dst->u[2] = src0->u[2] < src1->u[2] ? ~0 : 0;
+ dst->u[3] = src0->u[3] < src1->u[3] ? ~0 : 0;
+}
+
+static void
+micro_usne(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1)
+{
+ dst->u[0] = src0->u[0] != src1->u[0] ? ~0 : 0;
+ dst->u[1] = src0->u[1] != src1->u[1] ? ~0 : 0;
+ dst->u[2] = src0->u[2] != src1->u[2] ? ~0 : 0;
+ dst->u[3] = src0->u[3] != src1->u[3] ? ~0 : 0;
+}
+
+static void
+micro_uarl(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->i[0] = src->u[0];
+ dst->i[1] = src->u[1];
+ dst->i[2] = src->u[2];
+ dst->i[3] = src->u[3];
+}
+
+static void
+micro_ucmp(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1,
+ const union tgsi_exec_channel *src2)
+{
+ dst->u[0] = src0->u[0] ? src1->u[0] : src2->u[0];
+ dst->u[1] = src0->u[1] ? src1->u[1] : src2->u[1];
+ dst->u[2] = src0->u[2] ? src1->u[2] : src2->u[2];
+ dst->u[3] = src0->u[3] ? src1->u[3] : src2->u[3];
+}
+
+static void
+exec_instruction(
+ struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst,
+ int *pc )
+{
+ union tgsi_exec_channel r[10];
+
+ (*pc)++;
+
+ switch (inst->Instruction.Opcode) {
+ case TGSI_OPCODE_ARL:
+ exec_vector_unary(mach, inst, micro_arl, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_MOV:
+ exec_vector_unary(mach, inst, micro_mov, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_LIT:
+ exec_lit(mach, inst);
+ break;
+
+ case TGSI_OPCODE_RCP:
+ exec_scalar_unary(mach, inst, micro_rcp, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_RSQ:
+ exec_scalar_unary(mach, inst, micro_rsq, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_EXP:
+ exec_exp(mach, inst);
+ break;
+
+ case TGSI_OPCODE_LOG:
+ exec_log(mach, inst);
+ break;
+
+ case TGSI_OPCODE_MUL:
+ exec_vector_binary(mach, inst, micro_mul, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_ADD:
+ exec_vector_binary(mach, inst, micro_add, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_DP3:
+ exec_dp3(mach, inst);
+ break;
+
+ case TGSI_OPCODE_DP4:
+ exec_dp4(mach, inst);
+ break;
+
+ case TGSI_OPCODE_DST:
+ exec_dst(mach, inst);
+ break;
+
+ case TGSI_OPCODE_MIN:
+ exec_vector_binary(mach, inst, micro_min, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_MAX:
+ exec_vector_binary(mach, inst, micro_max, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_SLT:
+ exec_vector_binary(mach, inst, micro_slt, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_SGE:
+ exec_vector_binary(mach, inst, micro_sge, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_MAD:
+ exec_vector_trinary(mach, inst, micro_mad, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_SUB:
+ exec_vector_binary(mach, inst, micro_sub, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_LRP:
+ exec_vector_trinary(mach, inst, micro_lrp, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_CND:
+ exec_vector_trinary(mach, inst, micro_cnd, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_SQRT:
+ exec_scalar_unary(mach, inst, micro_sqrt, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_DP2A:
+ exec_dp2a(mach, inst);
+ break;
+
+ case TGSI_OPCODE_FRC:
+ exec_vector_unary(mach, inst, micro_frc, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_CLAMP:
+ exec_vector_trinary(mach, inst, micro_clamp, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_FLR:
+ exec_vector_unary(mach, inst, micro_flr, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_ROUND:
+ exec_vector_unary(mach, inst, micro_rnd, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_EX2:
+ exec_scalar_unary(mach, inst, micro_exp2, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_LG2:
+ exec_scalar_unary(mach, inst, micro_lg2, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_POW:
+ exec_scalar_binary(mach, inst, micro_pow, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_XPD:
+ exec_xpd(mach, inst);
+ break;
+
+ case TGSI_OPCODE_ABS:
+ exec_vector_unary(mach, inst, micro_abs, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_RCC:
+ exec_scalar_unary(mach, inst, micro_rcc, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_DPH:
+ exec_dph(mach, inst);
+ break;
+
+ case TGSI_OPCODE_COS:
+ exec_scalar_unary(mach, inst, micro_cos, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_DDX:
+ exec_vector_unary(mach, inst, micro_ddx, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_DDY:
+ exec_vector_unary(mach, inst, micro_ddy, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_KILL:
+ exec_kill (mach, inst);
+ break;
+
+ case TGSI_OPCODE_KILL_IF:
+ exec_kill_if (mach, inst);
+ break;
+
+ case TGSI_OPCODE_PK2H:
+ assert (0);
+ break;
+
+ case TGSI_OPCODE_PK2US:
+ assert (0);
+ break;
+
+ case TGSI_OPCODE_PK4B:
+ assert (0);
+ break;
+
+ case TGSI_OPCODE_PK4UB:
+ assert (0);
+ break;
+
+ case TGSI_OPCODE_RFL:
+ exec_rfl(mach, inst);
+ break;
+
+ case TGSI_OPCODE_SEQ:
+ exec_vector_binary(mach, inst, micro_seq, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_SFL:
+ exec_vector(mach, inst, micro_sfl, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_SGT:
+ exec_vector_binary(mach, inst, micro_sgt, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_SIN:
+ exec_scalar_unary(mach, inst, micro_sin, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_SLE:
+ exec_vector_binary(mach, inst, micro_sle, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_SNE:
+ exec_vector_binary(mach, inst, micro_sne, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_STR:
+ exec_vector(mach, inst, micro_str, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_TEX:
+ /* simple texture lookup */
+ /* src[0] = texcoord */
+ /* src[1] = sampler unit */
+ exec_tex(mach, inst, TEX_MODIFIER_NONE, 1);
+ break;
+
+ case TGSI_OPCODE_TXB:
+ /* Texture lookup with lod bias */
+ /* src[0] = texcoord (src[0].w = LOD bias) */
+ /* src[1] = sampler unit */
+ exec_tex(mach, inst, TEX_MODIFIER_LOD_BIAS, 1);
+ break;
+
+ case TGSI_OPCODE_TXD:
+ /* Texture lookup with explict partial derivatives */
+ /* src[0] = texcoord */
+ /* src[1] = d[strq]/dx */
+ /* src[2] = d[strq]/dy */
+ /* src[3] = sampler unit */
+ exec_txd(mach, inst);
+ break;
+
+ case TGSI_OPCODE_TXL:
+ /* Texture lookup with explit LOD */
+ /* src[0] = texcoord (src[0].w = LOD) */
+ /* src[1] = sampler unit */
+ exec_tex(mach, inst, TEX_MODIFIER_EXPLICIT_LOD, 1);
+ break;
+
+ case TGSI_OPCODE_TXP:
+ /* Texture lookup with projection */
+ /* src[0] = texcoord (src[0].w = projection) */
+ /* src[1] = sampler unit */
+ exec_tex(mach, inst, TEX_MODIFIER_PROJECTED, 1);
+ break;
+
+ case TGSI_OPCODE_UP2H:
+ assert (0);
+ break;
+
+ case TGSI_OPCODE_UP2US:
+ assert (0);
+ break;
+
+ case TGSI_OPCODE_UP4B:
+ assert (0);
+ break;
+
+ case TGSI_OPCODE_UP4UB:
+ assert (0);
+ break;
+
+ case TGSI_OPCODE_X2D:
+ exec_x2d(mach, inst);
+ break;
+
+ case TGSI_OPCODE_ARA:
+ assert (0);
+ break;
+
+ case TGSI_OPCODE_ARR:
+ exec_vector_unary(mach, inst, micro_arr, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_BRA:
+ assert (0);
+ break;
+
+ case TGSI_OPCODE_CAL:
+ /* skip the call if no execution channels are enabled */
+ if (mach->ExecMask) {
+ /* do the call */
+
+ /* First, record the depths of the execution stacks.
+ * This is important for deeply nested/looped return statements.
+ * We have to unwind the stacks by the correct amount. For a
+ * real code generator, we could determine the number of entries
+ * to pop off each stack with simple static analysis and avoid
+ * implementing this data structure at run time.
+ */
+ mach->CallStack[mach->CallStackTop].CondStackTop = mach->CondStackTop;
+ mach->CallStack[mach->CallStackTop].LoopStackTop = mach->LoopStackTop;
+ mach->CallStack[mach->CallStackTop].ContStackTop = mach->ContStackTop;
+ mach->CallStack[mach->CallStackTop].SwitchStackTop = mach->SwitchStackTop;
+ mach->CallStack[mach->CallStackTop].BreakStackTop = mach->BreakStackTop;
+ /* note that PC was already incremented above */
+ mach->CallStack[mach->CallStackTop].ReturnAddr = *pc;
+
+ mach->CallStackTop++;
+
+ /* Second, push the Cond, Loop, Cont, Func stacks */
+ assert(mach->CondStackTop < TGSI_EXEC_MAX_COND_NESTING);
+ assert(mach->LoopStackTop < TGSI_EXEC_MAX_LOOP_NESTING);
+ assert(mach->ContStackTop < TGSI_EXEC_MAX_LOOP_NESTING);
+ assert(mach->SwitchStackTop < TGSI_EXEC_MAX_SWITCH_NESTING);
+ assert(mach->BreakStackTop < TGSI_EXEC_MAX_BREAK_STACK);
+ assert(mach->FuncStackTop < TGSI_EXEC_MAX_CALL_NESTING);
+
+ mach->CondStack[mach->CondStackTop++] = mach->CondMask;
+ mach->LoopStack[mach->LoopStackTop++] = mach->LoopMask;
+ mach->ContStack[mach->ContStackTop++] = mach->ContMask;
+ mach->SwitchStack[mach->SwitchStackTop++] = mach->Switch;
+ mach->BreakStack[mach->BreakStackTop++] = mach->BreakType;
+ mach->FuncStack[mach->FuncStackTop++] = mach->FuncMask;
+
+ /* Finally, jump to the subroutine */
+ *pc = inst->Label.Label;
+ }
+ break;
+
+ case TGSI_OPCODE_RET:
+ mach->FuncMask &= ~mach->ExecMask;
+ UPDATE_EXEC_MASK(mach);
+
+ if (mach->FuncMask == 0x0) {
+ /* really return now (otherwise, keep executing */
+
+ if (mach->CallStackTop == 0) {
+ /* returning from main() */
+ mach->CondStackTop = 0;
+ mach->LoopStackTop = 0;
+ *pc = -1;
+ return;
+ }
+
+ assert(mach->CallStackTop > 0);
+ mach->CallStackTop--;
+
+ mach->CondStackTop = mach->CallStack[mach->CallStackTop].CondStackTop;
+ mach->CondMask = mach->CondStack[mach->CondStackTop];
+
+ mach->LoopStackTop = mach->CallStack[mach->CallStackTop].LoopStackTop;
+ mach->LoopMask = mach->LoopStack[mach->LoopStackTop];
+
+ mach->ContStackTop = mach->CallStack[mach->CallStackTop].ContStackTop;
+ mach->ContMask = mach->ContStack[mach->ContStackTop];
+
+ mach->SwitchStackTop = mach->CallStack[mach->CallStackTop].SwitchStackTop;
+ mach->Switch = mach->SwitchStack[mach->SwitchStackTop];
+
+ mach->BreakStackTop = mach->CallStack[mach->CallStackTop].BreakStackTop;
+ mach->BreakType = mach->BreakStack[mach->BreakStackTop];
+
+ assert(mach->FuncStackTop > 0);
+ mach->FuncMask = mach->FuncStack[--mach->FuncStackTop];
+
+ *pc = mach->CallStack[mach->CallStackTop].ReturnAddr;
+
+ UPDATE_EXEC_MASK(mach);
+ }
+ break;
+
+ case TGSI_OPCODE_SSG:
+ exec_vector_unary(mach, inst, micro_sgn, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_CMP:
+ exec_vector_trinary(mach, inst, micro_cmp, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_SCS:
+ exec_scs(mach, inst);
+ break;
+
+ case TGSI_OPCODE_NRM:
+ exec_nrm3(mach, inst);
+ break;
+
+ case TGSI_OPCODE_NRM4:
+ exec_nrm4(mach, inst);
+ break;
+
+ case TGSI_OPCODE_DIV:
+ exec_vector_binary(mach, inst, micro_div, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_DP2:
+ exec_dp2(mach, inst);
+ break;
+
+ case TGSI_OPCODE_IF:
+ /* push CondMask */
+ assert(mach->CondStackTop < TGSI_EXEC_MAX_COND_NESTING);
+ mach->CondStack[mach->CondStackTop++] = mach->CondMask;
+ FETCH( &r[0], 0, TGSI_CHAN_X );
+ /* update CondMask */
+ if( ! r[0].f[0] ) {
+ mach->CondMask &= ~0x1;
+ }
+ if( ! r[0].f[1] ) {
+ mach->CondMask &= ~0x2;
+ }
+ if( ! r[0].f[2] ) {
+ mach->CondMask &= ~0x4;
+ }
+ if( ! r[0].f[3] ) {
+ mach->CondMask &= ~0x8;
+ }
+ UPDATE_EXEC_MASK(mach);
+ /* Todo: If CondMask==0, jump to ELSE */
+ break;
+
+ case TGSI_OPCODE_UIF:
+ /* push CondMask */
+ assert(mach->CondStackTop < TGSI_EXEC_MAX_COND_NESTING);
+ mach->CondStack[mach->CondStackTop++] = mach->CondMask;
+ IFETCH( &r[0], 0, TGSI_CHAN_X );
+ /* update CondMask */
+ if( ! r[0].u[0] ) {
+ mach->CondMask &= ~0x1;
+ }
+ if( ! r[0].u[1] ) {
+ mach->CondMask &= ~0x2;
+ }
+ if( ! r[0].u[2] ) {
+ mach->CondMask &= ~0x4;
+ }
+ if( ! r[0].u[3] ) {
+ mach->CondMask &= ~0x8;
+ }
+ UPDATE_EXEC_MASK(mach);
+ /* Todo: If CondMask==0, jump to ELSE */
+ break;
+
+ case TGSI_OPCODE_ELSE:
+ /* invert CondMask wrt previous mask */
+ {
+ uint prevMask;
+ assert(mach->CondStackTop > 0);
+ prevMask = mach->CondStack[mach->CondStackTop - 1];
+ mach->CondMask = ~mach->CondMask & prevMask;
+ UPDATE_EXEC_MASK(mach);
+ /* Todo: If CondMask==0, jump to ENDIF */
+ }
+ break;
+
+ case TGSI_OPCODE_ENDIF:
+ /* pop CondMask */
+ assert(mach->CondStackTop > 0);
+ mach->CondMask = mach->CondStack[--mach->CondStackTop];
+ UPDATE_EXEC_MASK(mach);
+ break;
+
+ case TGSI_OPCODE_END:
+ /* make sure we end primitives which haven't
+ * been explicitly emitted */
+ conditional_emit_primitive(mach);
+ /* halt execution */
+ *pc = -1;
+ break;
+
+ case TGSI_OPCODE_PUSHA:
+ assert (0);
+ break;
+
+ case TGSI_OPCODE_POPA:
+ assert (0);
+ break;
+
+ case TGSI_OPCODE_CEIL:
+ exec_vector_unary(mach, inst, micro_ceil, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_I2F:
+ exec_vector_unary(mach, inst, micro_i2f, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_INT);
+ break;
+
+ case TGSI_OPCODE_NOT:
+ exec_vector_unary(mach, inst, micro_not, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_TRUNC:
+ exec_vector_unary(mach, inst, micro_trunc, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_SHL:
+ exec_vector_binary(mach, inst, micro_shl, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_AND:
+ exec_vector_binary(mach, inst, micro_and, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_OR:
+ exec_vector_binary(mach, inst, micro_or, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_MOD:
+ exec_vector_binary(mach, inst, micro_mod, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT);
+ break;
+
+ case TGSI_OPCODE_XOR:
+ exec_vector_binary(mach, inst, micro_xor, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_SAD:
+ assert (0);
+ break;
+
+ case TGSI_OPCODE_TXF:
+ exec_txf(mach, inst);
+ break;
+
+ case TGSI_OPCODE_TXQ:
+ exec_txq(mach, inst);
+ break;
+
+ case TGSI_OPCODE_EMIT:
+ emit_vertex(mach);
+ break;
+
+ case TGSI_OPCODE_ENDPRIM:
+ emit_primitive(mach);
+ break;
+
+ case TGSI_OPCODE_BGNLOOP:
+ /* push LoopMask and ContMasks */
+ assert(mach->LoopStackTop < TGSI_EXEC_MAX_LOOP_NESTING);
+ assert(mach->ContStackTop < TGSI_EXEC_MAX_LOOP_NESTING);
+ assert(mach->LoopLabelStackTop < TGSI_EXEC_MAX_LOOP_NESTING);
+ assert(mach->BreakStackTop < TGSI_EXEC_MAX_BREAK_STACK);
+
+ mach->LoopStack[mach->LoopStackTop++] = mach->LoopMask;
+ mach->ContStack[mach->ContStackTop++] = mach->ContMask;
+ mach->LoopLabelStack[mach->LoopLabelStackTop++] = *pc - 1;
+ mach->BreakStack[mach->BreakStackTop++] = mach->BreakType;
+ mach->BreakType = TGSI_EXEC_BREAK_INSIDE_LOOP;
+ break;
+
+ case TGSI_OPCODE_ENDLOOP:
+ /* Restore ContMask, but don't pop */
+ assert(mach->ContStackTop > 0);
+ mach->ContMask = mach->ContStack[mach->ContStackTop - 1];
+ UPDATE_EXEC_MASK(mach);
+ if (mach->ExecMask) {
+ /* repeat loop: jump to instruction just past BGNLOOP */
+ assert(mach->LoopLabelStackTop > 0);
+ *pc = mach->LoopLabelStack[mach->LoopLabelStackTop - 1] + 1;
+ }
+ else {
+ /* exit loop: pop LoopMask */
+ assert(mach->LoopStackTop > 0);
+ mach->LoopMask = mach->LoopStack[--mach->LoopStackTop];
+ /* pop ContMask */
+ assert(mach->ContStackTop > 0);
+ mach->ContMask = mach->ContStack[--mach->ContStackTop];
+ assert(mach->LoopLabelStackTop > 0);
+ --mach->LoopLabelStackTop;
+
+ mach->BreakType = mach->BreakStack[--mach->BreakStackTop];
+ }
+ UPDATE_EXEC_MASK(mach);
+ break;
+
+ case TGSI_OPCODE_BRK:
+ exec_break(mach);
+ break;
+
+ case TGSI_OPCODE_CONT:
+ /* turn off cont channels for each enabled exec channel */
+ mach->ContMask &= ~mach->ExecMask;
+ /* Todo: if mach->LoopMask == 0, jump to end of loop */
+ UPDATE_EXEC_MASK(mach);
+ break;
+
+ case TGSI_OPCODE_BGNSUB:
+ /* no-op */
+ break;
+
+ case TGSI_OPCODE_ENDSUB:
+ /*
+ * XXX: This really should be a no-op. We should never reach this opcode.
+ */
+
+ assert(mach->CallStackTop > 0);
+ mach->CallStackTop--;
+
+ mach->CondStackTop = mach->CallStack[mach->CallStackTop].CondStackTop;
+ mach->CondMask = mach->CondStack[mach->CondStackTop];
+
+ mach->LoopStackTop = mach->CallStack[mach->CallStackTop].LoopStackTop;
+ mach->LoopMask = mach->LoopStack[mach->LoopStackTop];
+
+ mach->ContStackTop = mach->CallStack[mach->CallStackTop].ContStackTop;
+ mach->ContMask = mach->ContStack[mach->ContStackTop];
+
+ mach->SwitchStackTop = mach->CallStack[mach->CallStackTop].SwitchStackTop;
+ mach->Switch = mach->SwitchStack[mach->SwitchStackTop];
+
+ mach->BreakStackTop = mach->CallStack[mach->CallStackTop].BreakStackTop;
+ mach->BreakType = mach->BreakStack[mach->BreakStackTop];
+
+ assert(mach->FuncStackTop > 0);
+ mach->FuncMask = mach->FuncStack[--mach->FuncStackTop];
+
+ *pc = mach->CallStack[mach->CallStackTop].ReturnAddr;
+
+ UPDATE_EXEC_MASK(mach);
+ break;
+
+ case TGSI_OPCODE_NOP:
+ break;
+
+ case TGSI_OPCODE_BREAKC:
+ IFETCH(&r[0], 0, TGSI_CHAN_X);
+ /* update CondMask */
+ if (r[0].u[0] && (mach->ExecMask & 0x1)) {
+ mach->LoopMask &= ~0x1;
+ }
+ if (r[0].u[1] && (mach->ExecMask & 0x2)) {
+ mach->LoopMask &= ~0x2;
+ }
+ if (r[0].u[2] && (mach->ExecMask & 0x4)) {
+ mach->LoopMask &= ~0x4;
+ }
+ if (r[0].u[3] && (mach->ExecMask & 0x8)) {
+ mach->LoopMask &= ~0x8;
+ }
+ /* Todo: if mach->LoopMask == 0, jump to end of loop */
+ UPDATE_EXEC_MASK(mach);
+ break;
+
+ case TGSI_OPCODE_F2I:
+ exec_vector_unary(mach, inst, micro_f2i, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_FSEQ:
+ exec_vector_binary(mach, inst, micro_fseq, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_FSGE:
+ exec_vector_binary(mach, inst, micro_fsge, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_FSLT:
+ exec_vector_binary(mach, inst, micro_fslt, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_FSNE:
+ exec_vector_binary(mach, inst, micro_fsne, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_IDIV:
+ exec_vector_binary(mach, inst, micro_idiv, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT);
+ break;
+
+ case TGSI_OPCODE_IMAX:
+ exec_vector_binary(mach, inst, micro_imax, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT);
+ break;
+
+ case TGSI_OPCODE_IMIN:
+ exec_vector_binary(mach, inst, micro_imin, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT);
+ break;
+
+ case TGSI_OPCODE_INEG:
+ exec_vector_unary(mach, inst, micro_ineg, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT);
+ break;
+
+ case TGSI_OPCODE_ISGE:
+ exec_vector_binary(mach, inst, micro_isge, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT);
+ break;
+
+ case TGSI_OPCODE_ISHR:
+ exec_vector_binary(mach, inst, micro_ishr, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT);
+ break;
+
+ case TGSI_OPCODE_ISLT:
+ exec_vector_binary(mach, inst, micro_islt, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT);
+ break;
+
+ case TGSI_OPCODE_F2U:
+ exec_vector_unary(mach, inst, micro_f2u, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
+ case TGSI_OPCODE_U2F:
+ exec_vector_unary(mach, inst, micro_u2f, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_UADD:
+ exec_vector_binary(mach, inst, micro_uadd, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT);
+ break;
+
+ case TGSI_OPCODE_UDIV:
+ exec_vector_binary(mach, inst, micro_udiv, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_UMAD:
+ exec_vector_trinary(mach, inst, micro_umad, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_UMAX:
+ exec_vector_binary(mach, inst, micro_umax, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_UMIN:
+ exec_vector_binary(mach, inst, micro_umin, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_UMOD:
+ exec_vector_binary(mach, inst, micro_umod, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_UMUL:
+ exec_vector_binary(mach, inst, micro_umul, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_USEQ:
+ exec_vector_binary(mach, inst, micro_useq, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_USGE:
+ exec_vector_binary(mach, inst, micro_usge, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_USHR:
+ exec_vector_binary(mach, inst, micro_ushr, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_USLT:
+ exec_vector_binary(mach, inst, micro_uslt, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_USNE:
+ exec_vector_binary(mach, inst, micro_usne, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_SWITCH:
+ exec_switch(mach, inst);
+ break;
+
+ case TGSI_OPCODE_CASE:
+ exec_case(mach, inst);
+ break;
+
+ case TGSI_OPCODE_DEFAULT:
+ exec_default(mach);
+ break;
+
+ case TGSI_OPCODE_ENDSWITCH:
+ exec_endswitch(mach);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_I:
+ exec_txf(mach, inst);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_I_MS:
+ assert(0);
+ break;
+
+ case TGSI_OPCODE_SAMPLE:
+ exec_sample(mach, inst, TEX_MODIFIER_NONE, FALSE);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_B:
+ exec_sample(mach, inst, TEX_MODIFIER_LOD_BIAS, FALSE);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_C:
+ exec_sample(mach, inst, TEX_MODIFIER_NONE, TRUE);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_C_LZ:
+ exec_sample(mach, inst, TEX_MODIFIER_LEVEL_ZERO, TRUE);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_D:
+ exec_sample_d(mach, inst);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_L:
+ exec_sample(mach, inst, TEX_MODIFIER_EXPLICIT_LOD, FALSE);
+ break;
+
+ case TGSI_OPCODE_GATHER4:
+ assert(0);
+ break;
+
+ case TGSI_OPCODE_SVIEWINFO:
+ exec_txq(mach, inst);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_POS:
+ assert(0);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_INFO:
+ assert(0);
+ break;
+
+ case TGSI_OPCODE_UARL:
+ exec_vector_unary(mach, inst, micro_uarl, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_UCMP:
+ exec_vector_trinary(mach, inst, micro_ucmp, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
+ break;
+
+ case TGSI_OPCODE_IABS:
+ exec_vector_unary(mach, inst, micro_iabs, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT);
+ break;
+
+ case TGSI_OPCODE_ISSG:
+ exec_vector_unary(mach, inst, micro_isgn, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT);
+ break;
+
+ case TGSI_OPCODE_TEX2:
+ /* simple texture lookup */
+ /* src[0] = texcoord */
+ /* src[1] = compare */
+ /* src[2] = sampler unit */
+ exec_tex(mach, inst, TEX_MODIFIER_NONE, 2);
+ break;
+ case TGSI_OPCODE_TXB2:
+ /* simple texture lookup */
+ /* src[0] = texcoord */
+ /* src[1] = bias */
+ /* src[2] = sampler unit */
+ exec_tex(mach, inst, TEX_MODIFIER_LOD_BIAS, 2);
+ break;
+ case TGSI_OPCODE_TXL2:
+ /* simple texture lookup */
+ /* src[0] = texcoord */
+ /* src[1] = lod */
+ /* src[2] = sampler unit */
+ exec_tex(mach, inst, TEX_MODIFIER_EXPLICIT_LOD, 2);
+ break;
+ default:
+ assert( 0 );
+ }
+}
+
+
+/**
+ * Run TGSI interpreter.
+ * \return bitmask of "alive" quad components
+ */
+uint
+tgsi_exec_machine_run( struct tgsi_exec_machine *mach )
+{
+ uint i;
+ int pc = 0;
+ uint default_mask = 0xf;
+
+ mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] = 0;
+ mach->Temps[TEMP_OUTPUT_I].xyzw[TEMP_OUTPUT_C].u[0] = 0;
+
+ if( mach->Processor == TGSI_PROCESSOR_GEOMETRY ) {
+ mach->Temps[TEMP_PRIMITIVE_I].xyzw[TEMP_PRIMITIVE_C].u[0] = 0;
+ mach->Primitives[0] = 0;
+ /* GS runs on a single primitive for now */
+ default_mask = 0x1;
+ }
+
+ mach->CondMask = default_mask;
+ mach->LoopMask = default_mask;
+ mach->ContMask = default_mask;
+ mach->FuncMask = default_mask;
+ mach->ExecMask = default_mask;
+
+ mach->Switch.mask = default_mask;
+
+ assert(mach->CondStackTop == 0);
+ assert(mach->LoopStackTop == 0);
+ assert(mach->ContStackTop == 0);
+ assert(mach->SwitchStackTop == 0);
+ assert(mach->BreakStackTop == 0);
+ assert(mach->CallStackTop == 0);
+
+
+ /* execute declarations (interpolants) */
+ for (i = 0; i < mach->NumDeclarations; i++) {
+ exec_declaration( mach, mach->Declarations+i );
+ }
+
+ {
+#if DEBUG_EXECUTION
+ struct tgsi_exec_vector temps[TGSI_EXEC_NUM_TEMPS + TGSI_EXEC_NUM_TEMP_EXTRAS];
+ struct tgsi_exec_vector outputs[PIPE_MAX_ATTRIBS];
+ uint inst = 1;
+
+ memset(mach->Temps, 0, sizeof(temps));
+ memset(mach->Outputs, 0, sizeof(outputs));
+ memset(temps, 0, sizeof(temps));
+ memset(outputs, 0, sizeof(outputs));
+#endif
+
+ /* execute instructions, until pc is set to -1 */
+ while (pc != -1) {
+
+#if DEBUG_EXECUTION
+ uint i;
+
+ tgsi_dump_instruction(&mach->Instructions[pc], inst++);
+#endif
+
+ assert(pc < (int) mach->NumInstructions);
+ exec_instruction(mach, mach->Instructions + pc, &pc);
+
+#if DEBUG_EXECUTION
+ for (i = 0; i < TGSI_EXEC_NUM_TEMPS + TGSI_EXEC_NUM_TEMP_EXTRAS; i++) {
+ if (memcmp(&temps[i], &mach->Temps[i], sizeof(temps[i]))) {
+ uint j;
+
+ memcpy(&temps[i], &mach->Temps[i], sizeof(temps[i]));
+ debug_printf("TEMP[%2u] = ", i);
+ for (j = 0; j < 4; j++) {
+ if (j > 0) {
+ debug_printf(" ");
+ }
+ debug_printf("(%6f %u, %6f %u, %6f %u, %6f %u)\n",
+ temps[i].xyzw[0].f[j], temps[i].xyzw[0].u[j],
+ temps[i].xyzw[1].f[j], temps[i].xyzw[1].u[j],
+ temps[i].xyzw[2].f[j], temps[i].xyzw[2].u[j],
+ temps[i].xyzw[3].f[j], temps[i].xyzw[3].u[j]);
+ }
+ }
+ }
+ for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
+ if (memcmp(&outputs[i], &mach->Outputs[i], sizeof(outputs[i]))) {
+ uint j;
+
+ memcpy(&outputs[i], &mach->Outputs[i], sizeof(outputs[i]));
+ debug_printf("OUT[%2u] = ", i);
+ for (j = 0; j < 4; j++) {
+ if (j > 0) {
+ debug_printf(" ");
+ }
+ debug_printf("(%6f %u, %6f %u, %6f %u, %6f %u)\n",
+ outputs[i].xyzw[0].f[j], outputs[i].xyzw[0].u[j],
+ outputs[i].xyzw[1].f[j], outputs[i].xyzw[1].u[j],
+ outputs[i].xyzw[2].f[j], outputs[i].xyzw[2].u[j],
+ outputs[i].xyzw[3].f[j], outputs[i].xyzw[3].u[j]);
+ }
+ }
+ }
+#endif
+ }
+ }
+
+#if 0
+ /* we scale from floats in [0,1] to Zbuffer ints in sp_quad_depth_test.c */
+ if (mach->Processor == TGSI_PROCESSOR_FRAGMENT) {
+ /*
+ * Scale back depth component.
+ */
+ for (i = 0; i < 4; i++)
+ mach->Outputs[0].xyzw[2].f[i] *= ctx->DrawBuffer->_DepthMaxF;
+ }
+#endif
+
+ /* Strictly speaking, these assertions aren't really needed but they
+ * can potentially catch some bugs in the control flow code.
+ */
+ assert(mach->CondStackTop == 0);
+ assert(mach->LoopStackTop == 0);
+ assert(mach->ContStackTop == 0);
+ assert(mach->SwitchStackTop == 0);
+ assert(mach->BreakStackTop == 0);
+ assert(mach->CallStackTop == 0);
+
+ return ~mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0];
+}
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_exec.h b/src/minigallium/auxiliary/tgsi/tgsi_exec.h
new file mode 100644
index 0000000..b14fa2e
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_exec.h
@@ -0,0 +1,463 @@
+/**************************************************************************
+ *
+ * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ * Copyright 2009-2010 VMware, Inc. All rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef TGSI_EXEC_H
+#define TGSI_EXEC_H
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_state.h"
+#include "pipe/p_shader_tokens.h"
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+#define TGSI_CHAN_X 0
+#define TGSI_CHAN_Y 1
+#define TGSI_CHAN_Z 2
+#define TGSI_CHAN_W 3
+
+#define TGSI_NUM_CHANNELS 4 /* R,G,B,A */
+#define TGSI_QUAD_SIZE 4 /* 4 pixel/quad */
+
+#define TGSI_FOR_EACH_CHANNEL( CHAN )\
+ for (CHAN = 0; CHAN < TGSI_NUM_CHANNELS; CHAN++)
+
+#define TGSI_IS_DST0_CHANNEL_ENABLED( INST, CHAN )\
+ ((INST)->Dst[0].Register.WriteMask & (1 << (CHAN)))
+
+#define TGSI_IF_IS_DST0_CHANNEL_ENABLED( INST, CHAN )\
+ if (TGSI_IS_DST0_CHANNEL_ENABLED( INST, CHAN ))
+
+#define TGSI_FOR_EACH_DST0_ENABLED_CHANNEL( INST, CHAN )\
+ TGSI_FOR_EACH_CHANNEL( CHAN )\
+ TGSI_IF_IS_DST0_CHANNEL_ENABLED( INST, CHAN )
+
+
+/**
+ * Registers may be treated as float, signed int or unsigned int.
+ */
+union tgsi_exec_channel
+{
+ float f[TGSI_QUAD_SIZE];
+ int i[TGSI_QUAD_SIZE];
+ unsigned u[TGSI_QUAD_SIZE];
+};
+
+/**
+ * A vector[RGBA] of channels[4 pixels]
+ */
+struct tgsi_exec_vector
+{
+ union tgsi_exec_channel xyzw[TGSI_NUM_CHANNELS];
+};
+
+/**
+ * For fragment programs, information for computing fragment input
+ * values from plane equation of the triangle/line.
+ */
+struct tgsi_interp_coef
+{
+ float a0[TGSI_NUM_CHANNELS]; /* in an xyzw layout */
+ float dadx[TGSI_NUM_CHANNELS];
+ float dady[TGSI_NUM_CHANNELS];
+};
+
+enum tgsi_sampler_control {
+ tgsi_sampler_lod_none,
+ tgsi_sampler_lod_bias,
+ tgsi_sampler_lod_explicit,
+ tgsi_sampler_lod_zero,
+ tgsi_sampler_derivs_explicit
+};
+
+/**
+ * Information for sampling textures, which must be implemented
+ * by code outside the TGSI executor.
+ */
+struct tgsi_sampler
+{
+ /** Get samples for four fragments in a quad */
+ /* this interface contains 5 sets of channels that vary
+ * depending on the sampler.
+ * s - the first texture coordinate for sampling.
+ * t - the second texture coordinate for sampling - unused for 1D,
+ layer for 1D arrays.
+ * r - the third coordinate for sampling for 3D, cube, cube arrays,
+ * layer for 2D arrays. Compare value for 1D/2D shadows.
+ * c0 - Compare value for shadow cube and shadow 2d arrays,
+ * layer for cube arrays.
+ * derivs - explicit derivatives.
+ * offset - texel offsets
+ * lod - lod value, except for shadow cube arrays (compare value there).
+ */
+ void (*get_samples)(struct tgsi_sampler *sampler,
+ const unsigned sview_index,
+ const unsigned sampler_index,
+ const float s[TGSI_QUAD_SIZE],
+ const float t[TGSI_QUAD_SIZE],
+ const float r[TGSI_QUAD_SIZE],
+ const float c0[TGSI_QUAD_SIZE],
+ const float c1[TGSI_QUAD_SIZE],
+ float derivs[3][2][TGSI_QUAD_SIZE],
+ const int8_t offset[3],
+ enum tgsi_sampler_control control,
+ float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE]);
+ void (*get_dims)(struct tgsi_sampler *sampler,
+ const unsigned sview_index,
+ int level, int dims[4]);
+ void (*get_texel)(struct tgsi_sampler *sampler,
+ const unsigned sview_index,
+ const int i[TGSI_QUAD_SIZE],
+ const int j[TGSI_QUAD_SIZE], const int k[TGSI_QUAD_SIZE],
+ const int lod[TGSI_QUAD_SIZE], const int8_t offset[3],
+ float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE]);
+};
+
+#define TGSI_EXEC_NUM_TEMPS 4096
+#define TGSI_EXEC_NUM_IMMEDIATES 256
+
+/*
+ * Locations of various utility registers (_I = Index, _C = Channel)
+ */
+#define TGSI_EXEC_TEMP_00000000_I (TGSI_EXEC_NUM_TEMPS + 0)
+#define TGSI_EXEC_TEMP_00000000_C 0
+
+#define TGSI_EXEC_TEMP_7FFFFFFF_I (TGSI_EXEC_NUM_TEMPS + 0)
+#define TGSI_EXEC_TEMP_7FFFFFFF_C 1
+
+#define TGSI_EXEC_TEMP_80000000_I (TGSI_EXEC_NUM_TEMPS + 0)
+#define TGSI_EXEC_TEMP_80000000_C 2
+
+#define TGSI_EXEC_TEMP_FFFFFFFF_I (TGSI_EXEC_NUM_TEMPS + 0)
+#define TGSI_EXEC_TEMP_FFFFFFFF_C 3
+
+#define TGSI_EXEC_TEMP_ONE_I (TGSI_EXEC_NUM_TEMPS + 1)
+#define TGSI_EXEC_TEMP_ONE_C 0
+
+#define TGSI_EXEC_TEMP_TWO_I (TGSI_EXEC_NUM_TEMPS + 1)
+#define TGSI_EXEC_TEMP_TWO_C 1
+
+#define TGSI_EXEC_TEMP_128_I (TGSI_EXEC_NUM_TEMPS + 1)
+#define TGSI_EXEC_TEMP_128_C 2
+
+#define TGSI_EXEC_TEMP_MINUS_128_I (TGSI_EXEC_NUM_TEMPS + 1)
+#define TGSI_EXEC_TEMP_MINUS_128_C 3
+
+#define TGSI_EXEC_TEMP_KILMASK_I (TGSI_EXEC_NUM_TEMPS + 2)
+#define TGSI_EXEC_TEMP_KILMASK_C 0
+
+#define TGSI_EXEC_TEMP_OUTPUT_I (TGSI_EXEC_NUM_TEMPS + 2)
+#define TGSI_EXEC_TEMP_OUTPUT_C 1
+
+#define TGSI_EXEC_TEMP_PRIMITIVE_I (TGSI_EXEC_NUM_TEMPS + 2)
+#define TGSI_EXEC_TEMP_PRIMITIVE_C 2
+
+#define TGSI_EXEC_TEMP_THREE_I (TGSI_EXEC_NUM_TEMPS + 2)
+#define TGSI_EXEC_TEMP_THREE_C 3
+
+#define TGSI_EXEC_TEMP_HALF_I (TGSI_EXEC_NUM_TEMPS + 3)
+#define TGSI_EXEC_TEMP_HALF_C 0
+
+/* execution mask, each value is either 0 or ~0 */
+#define TGSI_EXEC_MASK_I (TGSI_EXEC_NUM_TEMPS + 3)
+#define TGSI_EXEC_MASK_C 1
+
+/* 4 register buffer for various purposes */
+#define TGSI_EXEC_TEMP_R0 (TGSI_EXEC_NUM_TEMPS + 4)
+#define TGSI_EXEC_NUM_TEMP_R 4
+
+#define TGSI_EXEC_TEMP_ADDR (TGSI_EXEC_NUM_TEMPS + 8)
+#define TGSI_EXEC_NUM_ADDRS 1
+
+/* predicate register */
+#define TGSI_EXEC_TEMP_P0 (TGSI_EXEC_NUM_TEMPS + 9)
+#define TGSI_EXEC_NUM_PREDS 1
+
+#define TGSI_EXEC_NUM_TEMP_EXTRAS 10
+
+
+
+#define TGSI_EXEC_MAX_NESTING 32
+#define TGSI_EXEC_MAX_COND_NESTING TGSI_EXEC_MAX_NESTING
+#define TGSI_EXEC_MAX_LOOP_NESTING TGSI_EXEC_MAX_NESTING
+#define TGSI_EXEC_MAX_SWITCH_NESTING TGSI_EXEC_MAX_NESTING
+#define TGSI_EXEC_MAX_CALL_NESTING TGSI_EXEC_MAX_NESTING
+
+/* The maximum number of input attributes per vertex. For 2D
+ * input register files, this is the stride between two 1D
+ * arrays.
+ */
+#define TGSI_EXEC_MAX_INPUT_ATTRIBS 17
+
+/* The maximum number of constant vectors per constant buffer.
+ */
+#define TGSI_EXEC_MAX_CONST_BUFFER 4096
+
+/* The maximum number of vertices per primitive */
+#define TGSI_MAX_PRIM_VERTICES 6
+
+/* The maximum number of primitives to be generated */
+#define TGSI_MAX_PRIMITIVES 64
+
+/* The maximum total number of vertices */
+#define TGSI_MAX_TOTAL_VERTICES (TGSI_MAX_PRIM_VERTICES * TGSI_MAX_PRIMITIVES * PIPE_MAX_ATTRIBS)
+
+#define TGSI_MAX_MISC_INPUTS 8
+
+/** function call/activation record */
+struct tgsi_call_record
+{
+ uint CondStackTop;
+ uint LoopStackTop;
+ uint ContStackTop;
+ int SwitchStackTop;
+ int BreakStackTop;
+ uint ReturnAddr;
+};
+
+
+/* Switch-case block state. */
+struct tgsi_switch_record {
+ uint mask; /**< execution mask */
+ union tgsi_exec_channel selector; /**< a value case statements are compared to */
+ uint defaultMask; /**< non-execute mask for default case */
+};
+
+
+enum tgsi_break_type {
+ TGSI_EXEC_BREAK_INSIDE_LOOP,
+ TGSI_EXEC_BREAK_INSIDE_SWITCH
+};
+
+
+#define TGSI_EXEC_MAX_BREAK_STACK (TGSI_EXEC_MAX_LOOP_NESTING + TGSI_EXEC_MAX_SWITCH_NESTING)
+
+
+/**
+ * Run-time virtual machine state for executing TGSI shader.
+ */
+struct tgsi_exec_machine
+{
+ /* Total = program temporaries + internal temporaries
+ */
+ struct tgsi_exec_vector Temps[TGSI_EXEC_NUM_TEMPS +
+ TGSI_EXEC_NUM_TEMP_EXTRAS];
+
+ float Imms[TGSI_EXEC_NUM_IMMEDIATES][4];
+
+ float ImmArray[TGSI_EXEC_NUM_IMMEDIATES][4];
+
+ struct tgsi_exec_vector *Inputs;
+ struct tgsi_exec_vector *Outputs;
+
+ /* System values */
+ unsigned SysSemanticToIndex[TGSI_SEMANTIC_COUNT];
+ union tgsi_exec_channel SystemValue[TGSI_MAX_MISC_INPUTS];
+
+ struct tgsi_exec_vector *Addrs;
+ struct tgsi_exec_vector *Predicates;
+
+ struct tgsi_sampler *Sampler;
+
+ unsigned ImmLimit;
+
+ const void *Consts[PIPE_MAX_CONSTANT_BUFFERS];
+ unsigned ConstsSize[PIPE_MAX_CONSTANT_BUFFERS];
+
+ const struct tgsi_token *Tokens; /**< Declarations, instructions */
+ unsigned Processor; /**< TGSI_PROCESSOR_x */
+
+ /* GEOMETRY processor only. */
+ unsigned *Primitives;
+ unsigned NumOutputs;
+ unsigned MaxGeometryShaderOutputs;
+
+ /* FRAGMENT processor only. */
+ const struct tgsi_interp_coef *InterpCoefs;
+ struct tgsi_exec_vector QuadPos;
+ float Face; /**< +1 if front facing, -1 if back facing */
+ bool flatshade_color;
+ /* Conditional execution masks */
+ uint CondMask; /**< For IF/ELSE/ENDIF */
+ uint LoopMask; /**< For BGNLOOP/ENDLOOP */
+ uint ContMask; /**< For loop CONT statements */
+ uint FuncMask; /**< For function calls */
+ uint ExecMask; /**< = CondMask & LoopMask */
+
+ /* Current switch-case state. */
+ struct tgsi_switch_record Switch;
+
+ /* Current break type. */
+ enum tgsi_break_type BreakType;
+
+ /** Condition mask stack (for nested conditionals) */
+ uint CondStack[TGSI_EXEC_MAX_COND_NESTING];
+ int CondStackTop;
+
+ /** Loop mask stack (for nested loops) */
+ uint LoopStack[TGSI_EXEC_MAX_LOOP_NESTING];
+ int LoopStackTop;
+
+ /** Loop label stack */
+ uint LoopLabelStack[TGSI_EXEC_MAX_LOOP_NESTING];
+ int LoopLabelStackTop;
+
+ /** Loop continue mask stack (see comments in tgsi_exec.c) */
+ uint ContStack[TGSI_EXEC_MAX_LOOP_NESTING];
+ int ContStackTop;
+
+ /** Switch case stack */
+ struct tgsi_switch_record SwitchStack[TGSI_EXEC_MAX_SWITCH_NESTING];
+ int SwitchStackTop;
+
+ enum tgsi_break_type BreakStack[TGSI_EXEC_MAX_BREAK_STACK];
+ int BreakStackTop;
+
+ /** Function execution mask stack (for executing subroutine code) */
+ uint FuncStack[TGSI_EXEC_MAX_CALL_NESTING];
+ int FuncStackTop;
+
+ /** Function call stack for saving/restoring the program counter */
+ struct tgsi_call_record CallStack[TGSI_EXEC_MAX_CALL_NESTING];
+ int CallStackTop;
+
+ struct tgsi_full_instruction *Instructions;
+ uint NumInstructions;
+
+ struct tgsi_full_declaration *Declarations;
+ uint NumDeclarations;
+
+ struct tgsi_declaration_sampler_view
+ SamplerViews[PIPE_MAX_SHADER_SAMPLER_VIEWS];
+
+ boolean UsedGeometryShader;
+};
+
+struct tgsi_exec_machine *
+tgsi_exec_machine_create( void );
+
+void
+tgsi_exec_machine_destroy(struct tgsi_exec_machine *mach);
+
+
+void
+tgsi_exec_machine_bind_shader(
+ struct tgsi_exec_machine *mach,
+ const struct tgsi_token *tokens,
+ struct tgsi_sampler *sampler);
+
+uint
+tgsi_exec_machine_run(
+ struct tgsi_exec_machine *mach );
+
+
+void
+tgsi_exec_machine_free_data(struct tgsi_exec_machine *mach);
+
+
+boolean
+tgsi_check_soa_dependencies(const struct tgsi_full_instruction *inst);
+
+
+static INLINE void
+tgsi_set_kill_mask(struct tgsi_exec_machine *mach, unsigned mask)
+{
+ mach->Temps[TGSI_EXEC_TEMP_KILMASK_I].xyzw[TGSI_EXEC_TEMP_KILMASK_C].u[0] =
+ mask;
+}
+
+
+/** Set execution mask values prior to executing the shader */
+static INLINE void
+tgsi_set_exec_mask(struct tgsi_exec_machine *mach,
+ boolean ch0, boolean ch1, boolean ch2, boolean ch3)
+{
+ int *mask = mach->Temps[TGSI_EXEC_MASK_I].xyzw[TGSI_EXEC_MASK_C].i;
+ mask[0] = ch0 ? ~0 : 0;
+ mask[1] = ch1 ? ~0 : 0;
+ mask[2] = ch2 ? ~0 : 0;
+ mask[3] = ch3 ? ~0 : 0;
+}
+
+
+extern void
+tgsi_exec_set_constant_buffers(struct tgsi_exec_machine *mach,
+ unsigned num_bufs,
+ const void **bufs,
+ const unsigned *buf_sizes);
+
+
+static INLINE int
+tgsi_exec_get_shader_param(enum pipe_shader_cap param)
+{
+ switch(param) {
+ case PIPE_SHADER_CAP_MAX_INSTRUCTIONS:
+ case PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS:
+ case PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS:
+ case PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS:
+ return INT_MAX;
+ case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH:
+ return TGSI_EXEC_MAX_NESTING;
+ case PIPE_SHADER_CAP_MAX_INPUTS:
+ return TGSI_EXEC_MAX_INPUT_ATTRIBS;
+ case PIPE_SHADER_CAP_MAX_CONSTS:
+ return TGSI_EXEC_MAX_CONST_BUFFER;
+ case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
+ return PIPE_MAX_CONSTANT_BUFFERS;
+ case PIPE_SHADER_CAP_MAX_TEMPS:
+ return TGSI_EXEC_NUM_TEMPS;
+ case PIPE_SHADER_CAP_MAX_ADDRS:
+ return TGSI_EXEC_NUM_ADDRS;
+ case PIPE_SHADER_CAP_MAX_PREDS:
+ return TGSI_EXEC_NUM_PREDS;
+ case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED:
+ return 1;
+ case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR:
+ case PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR:
+ case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR:
+ case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR:
+ return 1;
+ case PIPE_SHADER_CAP_SUBROUTINES:
+ return 1;
+ case PIPE_SHADER_CAP_INTEGERS:
+ return 1;
+ case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
+ return PIPE_MAX_SAMPLERS;
+ case PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+#if defined __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* TGSI_EXEC_H */
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_info.c b/src/minigallium/auxiliary/tgsi/tgsi_info.c
new file mode 100644
index 0000000..7a5d18f
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_info.c
@@ -0,0 +1,368 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "util/u_debug.h"
+#include "util/u_memory.h"
+#include "tgsi_info.h"
+
+#define NONE TGSI_OUTPUT_NONE
+#define COMP TGSI_OUTPUT_COMPONENTWISE
+#define REPL TGSI_OUTPUT_REPLICATE
+#define CHAN TGSI_OUTPUT_CHAN_DEPENDENT
+#define OTHR TGSI_OUTPUT_OTHER
+
+static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
+{
+ { 1, 1, 0, 0, 0, 0, COMP, "ARL", TGSI_OPCODE_ARL },
+ { 1, 1, 0, 0, 0, 0, COMP, "MOV", TGSI_OPCODE_MOV },
+ { 1, 1, 0, 0, 0, 0, CHAN, "LIT", TGSI_OPCODE_LIT },
+ { 1, 1, 0, 0, 0, 0, REPL, "RCP", TGSI_OPCODE_RCP },
+ { 1, 1, 0, 0, 0, 0, REPL, "RSQ", TGSI_OPCODE_RSQ },
+ { 1, 1, 0, 0, 0, 0, CHAN, "EXP", TGSI_OPCODE_EXP },
+ { 1, 1, 0, 0, 0, 0, CHAN, "LOG", TGSI_OPCODE_LOG },
+ { 1, 2, 0, 0, 0, 0, COMP, "MUL", TGSI_OPCODE_MUL },
+ { 1, 2, 0, 0, 0, 0, COMP, "ADD", TGSI_OPCODE_ADD },
+ { 1, 2, 0, 0, 0, 0, REPL, "DP3", TGSI_OPCODE_DP3 },
+ { 1, 2, 0, 0, 0, 0, REPL, "DP4", TGSI_OPCODE_DP4 },
+ { 1, 2, 0, 0, 0, 0, CHAN, "DST", TGSI_OPCODE_DST },
+ { 1, 2, 0, 0, 0, 0, COMP, "MIN", TGSI_OPCODE_MIN },
+ { 1, 2, 0, 0, 0, 0, COMP, "MAX", TGSI_OPCODE_MAX },
+ { 1, 2, 0, 0, 0, 0, COMP, "SLT", TGSI_OPCODE_SLT },
+ { 1, 2, 0, 0, 0, 0, COMP, "SGE", TGSI_OPCODE_SGE },
+ { 1, 3, 0, 0, 0, 0, COMP, "MAD", TGSI_OPCODE_MAD },
+ { 1, 2, 0, 0, 0, 0, COMP, "SUB", TGSI_OPCODE_SUB },
+ { 1, 3, 0, 0, 0, 0, COMP, "LRP", TGSI_OPCODE_LRP },
+ { 1, 3, 0, 0, 0, 0, COMP, "CND", TGSI_OPCODE_CND },
+ { 1, 1, 0, 0, 0, 0, REPL, "SQRT", TGSI_OPCODE_SQRT },
+ { 1, 3, 0, 0, 0, 0, REPL, "DP2A", TGSI_OPCODE_DP2A },
+ { 0, 0, 0, 0, 0, 0, NONE, "", 22 }, /* removed */
+ { 0, 0, 0, 0, 0, 0, NONE, "", 23 }, /* removed */
+ { 1, 1, 0, 0, 0, 0, COMP, "FRC", TGSI_OPCODE_FRC },
+ { 1, 3, 0, 0, 0, 0, COMP, "CLAMP", TGSI_OPCODE_CLAMP },
+ { 1, 1, 0, 0, 0, 0, COMP, "FLR", TGSI_OPCODE_FLR },
+ { 1, 1, 0, 0, 0, 0, COMP, "ROUND", TGSI_OPCODE_ROUND },
+ { 1, 1, 0, 0, 0, 0, REPL, "EX2", TGSI_OPCODE_EX2 },
+ { 1, 1, 0, 0, 0, 0, REPL, "LG2", TGSI_OPCODE_LG2 },
+ { 1, 2, 0, 0, 0, 0, REPL, "POW", TGSI_OPCODE_POW },
+ { 1, 2, 0, 0, 0, 0, COMP, "XPD", TGSI_OPCODE_XPD },
+ { 0, 0, 0, 0, 0, 0, NONE, "", 32 }, /* removed */
+ { 1, 1, 0, 0, 0, 0, COMP, "ABS", TGSI_OPCODE_ABS },
+ { 1, 1, 0, 0, 0, 0, REPL, "RCC", TGSI_OPCODE_RCC },
+ { 1, 2, 0, 0, 0, 0, REPL, "DPH", TGSI_OPCODE_DPH },
+ { 1, 1, 0, 0, 0, 0, REPL, "COS", TGSI_OPCODE_COS },
+ { 1, 1, 0, 0, 0, 0, COMP, "DDX", TGSI_OPCODE_DDX },
+ { 1, 1, 0, 0, 0, 0, COMP, "DDY", TGSI_OPCODE_DDY },
+ { 0, 0, 0, 0, 0, 0, NONE, "KILL", TGSI_OPCODE_KILL },
+ { 1, 1, 0, 0, 0, 0, COMP, "PK2H", TGSI_OPCODE_PK2H },
+ { 1, 1, 0, 0, 0, 0, COMP, "PK2US", TGSI_OPCODE_PK2US },
+ { 1, 1, 0, 0, 0, 0, COMP, "PK4B", TGSI_OPCODE_PK4B },
+ { 1, 1, 0, 0, 0, 0, COMP, "PK4UB", TGSI_OPCODE_PK4UB },
+ { 1, 2, 0, 0, 0, 0, COMP, "RFL", TGSI_OPCODE_RFL },
+ { 1, 2, 0, 0, 0, 0, COMP, "SEQ", TGSI_OPCODE_SEQ },
+ { 1, 2, 0, 0, 0, 0, REPL, "SFL", TGSI_OPCODE_SFL },
+ { 1, 2, 0, 0, 0, 0, COMP, "SGT", TGSI_OPCODE_SGT },
+ { 1, 1, 0, 0, 0, 0, REPL, "SIN", TGSI_OPCODE_SIN },
+ { 1, 2, 0, 0, 0, 0, COMP, "SLE", TGSI_OPCODE_SLE },
+ { 1, 2, 0, 0, 0, 0, COMP, "SNE", TGSI_OPCODE_SNE },
+ { 1, 2, 0, 0, 0, 0, REPL, "STR", TGSI_OPCODE_STR },
+ { 1, 2, 1, 0, 0, 0, OTHR, "TEX", TGSI_OPCODE_TEX },
+ { 1, 4, 1, 0, 0, 0, OTHR, "TXD", TGSI_OPCODE_TXD },
+ { 1, 2, 1, 0, 0, 0, OTHR, "TXP", TGSI_OPCODE_TXP },
+ { 1, 1, 0, 0, 0, 0, COMP, "UP2H", TGSI_OPCODE_UP2H },
+ { 1, 1, 0, 0, 0, 0, COMP, "UP2US", TGSI_OPCODE_UP2US },
+ { 1, 1, 0, 0, 0, 0, COMP, "UP4B", TGSI_OPCODE_UP4B },
+ { 1, 1, 0, 0, 0, 0, COMP, "UP4UB", TGSI_OPCODE_UP4UB },
+ { 1, 3, 0, 0, 0, 0, COMP, "X2D", TGSI_OPCODE_X2D },
+ { 1, 1, 0, 0, 0, 0, COMP, "ARA", TGSI_OPCODE_ARA },
+ { 1, 1, 0, 0, 0, 0, COMP, "ARR", TGSI_OPCODE_ARR },
+ { 0, 1, 0, 0, 0, 0, NONE, "BRA", TGSI_OPCODE_BRA },
+ { 0, 0, 0, 1, 0, 0, NONE, "CAL", TGSI_OPCODE_CAL },
+ { 0, 0, 0, 0, 0, 0, NONE, "RET", TGSI_OPCODE_RET },
+ { 1, 1, 0, 0, 0, 0, COMP, "SSG", TGSI_OPCODE_SSG },
+ { 1, 3, 0, 0, 0, 0, COMP, "CMP", TGSI_OPCODE_CMP },
+ { 1, 1, 0, 0, 0, 0, CHAN, "SCS", TGSI_OPCODE_SCS },
+ { 1, 2, 1, 0, 0, 0, OTHR, "TXB", TGSI_OPCODE_TXB },
+ { 1, 1, 0, 0, 0, 0, COMP, "NRM", TGSI_OPCODE_NRM },
+ { 1, 2, 0, 0, 0, 0, COMP, "DIV", TGSI_OPCODE_DIV },
+ { 1, 2, 0, 0, 0, 0, REPL, "DP2", TGSI_OPCODE_DP2 },
+ { 1, 2, 1, 0, 0, 0, OTHR, "TXL", TGSI_OPCODE_TXL },
+ { 0, 0, 0, 0, 0, 0, NONE, "BRK", TGSI_OPCODE_BRK },
+ { 0, 1, 0, 1, 0, 1, NONE, "IF", TGSI_OPCODE_IF },
+ { 0, 1, 0, 1, 0, 1, NONE, "UIF", TGSI_OPCODE_UIF },
+ { 0, 1, 0, 0, 0, 1, NONE, "", 76 }, /* removed */
+ { 0, 0, 0, 1, 1, 1, NONE, "ELSE", TGSI_OPCODE_ELSE },
+ { 0, 0, 0, 0, 1, 0, NONE, "ENDIF", TGSI_OPCODE_ENDIF },
+ { 1, 0, 0, 0, 1, 0, NONE, "", 79 }, /* removed */
+ { 0, 0, 0, 0, 1, 0, NONE, "", 80 }, /* removed */
+ { 0, 1, 0, 0, 0, 0, NONE, "PUSHA", TGSI_OPCODE_PUSHA },
+ { 1, 0, 0, 0, 0, 0, NONE, "POPA", TGSI_OPCODE_POPA },
+ { 1, 1, 0, 0, 0, 0, COMP, "CEIL", TGSI_OPCODE_CEIL },
+ { 1, 1, 0, 0, 0, 0, COMP, "I2F", TGSI_OPCODE_I2F },
+ { 1, 1, 0, 0, 0, 0, COMP, "NOT", TGSI_OPCODE_NOT },
+ { 1, 1, 0, 0, 0, 0, COMP, "TRUNC", TGSI_OPCODE_TRUNC },
+ { 1, 2, 0, 0, 0, 0, COMP, "SHL", TGSI_OPCODE_SHL },
+ { 0, 0, 0, 0, 0, 0, NONE, "", 88 }, /* removed */
+ { 1, 2, 0, 0, 0, 0, COMP, "AND", TGSI_OPCODE_AND },
+ { 1, 2, 0, 0, 0, 0, COMP, "OR", TGSI_OPCODE_OR },
+ { 1, 2, 0, 0, 0, 0, COMP, "MOD", TGSI_OPCODE_MOD },
+ { 1, 2, 0, 0, 0, 0, COMP, "XOR", TGSI_OPCODE_XOR },
+ { 1, 3, 0, 0, 0, 0, COMP, "SAD", TGSI_OPCODE_SAD },
+ { 1, 2, 1, 0, 0, 0, OTHR, "TXF", TGSI_OPCODE_TXF },
+ { 1, 2, 1, 0, 0, 0, OTHR, "TXQ", TGSI_OPCODE_TXQ },
+ { 0, 0, 0, 0, 0, 0, NONE, "CONT", TGSI_OPCODE_CONT },
+ { 0, 0, 0, 0, 0, 0, NONE, "EMIT", TGSI_OPCODE_EMIT },
+ { 0, 0, 0, 0, 0, 0, NONE, "ENDPRIM", TGSI_OPCODE_ENDPRIM },
+ { 0, 0, 0, 1, 0, 1, NONE, "BGNLOOP", TGSI_OPCODE_BGNLOOP },
+ { 0, 0, 0, 0, 0, 1, NONE, "BGNSUB", TGSI_OPCODE_BGNSUB },
+ { 0, 0, 0, 1, 1, 0, NONE, "ENDLOOP", TGSI_OPCODE_ENDLOOP },
+ { 0, 0, 0, 0, 1, 0, NONE, "ENDSUB", TGSI_OPCODE_ENDSUB },
+ { 1, 1, 1, 0, 0, 0, OTHR, "TXQ_LZ", TGSI_OPCODE_TXQ_LZ },
+ { 0, 0, 0, 0, 0, 0, NONE, "", 104 }, /* removed */
+ { 0, 0, 0, 0, 0, 0, NONE, "", 105 }, /* removed */
+ { 0, 0, 0, 0, 0, 0, NONE, "", 106 }, /* removed */
+ { 0, 0, 0, 0, 0, 0, NONE, "NOP", TGSI_OPCODE_NOP },
+ { 1, 2, 0, 0, 0, 0, COMP, "FSEQ", TGSI_OPCODE_FSEQ },
+ { 1, 2, 0, 0, 0, 0, COMP, "FSGE", TGSI_OPCODE_FSGE },
+ { 1, 2, 0, 0, 0, 0, COMP, "FSLT", TGSI_OPCODE_FSLT },
+ { 1, 2, 0, 0, 0, 0, COMP, "FSNE", TGSI_OPCODE_FSNE },
+ { 1, 1, 0, 0, 0, 0, REPL, "NRM4", TGSI_OPCODE_NRM4 },
+ { 0, 1, 0, 0, 0, 0, NONE, "CALLNZ", TGSI_OPCODE_CALLNZ },
+ { 0, 1, 0, 0, 0, 0, NONE, "", 114 }, /* removed */
+ { 0, 1, 0, 0, 0, 0, NONE, "BREAKC", TGSI_OPCODE_BREAKC },
+ { 0, 1, 0, 0, 0, 0, NONE, "KILL_IF", TGSI_OPCODE_KILL_IF },
+ { 0, 0, 0, 0, 0, 0, NONE, "END", TGSI_OPCODE_END },
+ { 0, 0, 0, 0, 0, 0, NONE, "", 118 }, /* removed */
+ { 1, 1, 0, 0, 0, 0, COMP, "F2I", TGSI_OPCODE_F2I },
+ { 1, 2, 0, 0, 0, 0, COMP, "IDIV", TGSI_OPCODE_IDIV },
+ { 1, 2, 0, 0, 0, 0, COMP, "IMAX", TGSI_OPCODE_IMAX },
+ { 1, 2, 0, 0, 0, 0, COMP, "IMIN", TGSI_OPCODE_IMIN },
+ { 1, 1, 0, 0, 0, 0, COMP, "INEG", TGSI_OPCODE_INEG },
+ { 1, 2, 0, 0, 0, 0, COMP, "ISGE", TGSI_OPCODE_ISGE },
+ { 1, 2, 0, 0, 0, 0, COMP, "ISHR", TGSI_OPCODE_ISHR },
+ { 1, 2, 0, 0, 0, 0, COMP, "ISLT", TGSI_OPCODE_ISLT },
+ { 1, 1, 0, 0, 0, 0, COMP, "F2U", TGSI_OPCODE_F2U },
+ { 1, 1, 0, 0, 0, 0, COMP, "U2F", TGSI_OPCODE_U2F },
+ { 1, 2, 0, 0, 0, 0, COMP, "UADD", TGSI_OPCODE_UADD },
+ { 1, 2, 0, 0, 0, 0, COMP, "UDIV", TGSI_OPCODE_UDIV },
+ { 1, 3, 0, 0, 0, 0, COMP, "UMAD", TGSI_OPCODE_UMAD },
+ { 1, 2, 0, 0, 0, 0, COMP, "UMAX", TGSI_OPCODE_UMAX },
+ { 1, 2, 0, 0, 0, 0, COMP, "UMIN", TGSI_OPCODE_UMIN },
+ { 1, 2, 0, 0, 0, 0, COMP, "UMOD", TGSI_OPCODE_UMOD },
+ { 1, 2, 0, 0, 0, 0, COMP, "UMUL", TGSI_OPCODE_UMUL },
+ { 1, 2, 0, 0, 0, 0, COMP, "USEQ", TGSI_OPCODE_USEQ },
+ { 1, 2, 0, 0, 0, 0, COMP, "USGE", TGSI_OPCODE_USGE },
+ { 1, 2, 0, 0, 0, 0, COMP, "USHR", TGSI_OPCODE_USHR },
+ { 1, 2, 0, 0, 0, 0, COMP, "USLT", TGSI_OPCODE_USLT },
+ { 1, 2, 0, 0, 0, 0, COMP, "USNE", TGSI_OPCODE_USNE },
+ { 0, 1, 0, 0, 0, 0, NONE, "SWITCH", TGSI_OPCODE_SWITCH },
+ { 0, 1, 0, 0, 0, 0, NONE, "CASE", TGSI_OPCODE_CASE },
+ { 0, 0, 0, 0, 0, 0, NONE, "DEFAULT", TGSI_OPCODE_DEFAULT },
+ { 0, 0, 0, 0, 0, 0, NONE, "ENDSWITCH", TGSI_OPCODE_ENDSWITCH },
+
+ { 1, 3, 0, 0, 0, 0, OTHR, "SAMPLE", TGSI_OPCODE_SAMPLE },
+ { 1, 2, 0, 0, 0, 0, OTHR, "SAMPLE_I", TGSI_OPCODE_SAMPLE_I },
+ { 1, 3, 0, 0, 0, 0, OTHR, "SAMPLE_I_MS", TGSI_OPCODE_SAMPLE_I_MS },
+ { 1, 4, 0, 0, 0, 0, OTHR, "SAMPLE_B", TGSI_OPCODE_SAMPLE_B },
+ { 1, 4, 0, 0, 0, 0, OTHR, "SAMPLE_C", TGSI_OPCODE_SAMPLE_C },
+ { 1, 4, 0, 0, 0, 0, OTHR, "SAMPLE_C_LZ", TGSI_OPCODE_SAMPLE_C_LZ },
+ { 1, 5, 0, 0, 0, 0, OTHR, "SAMPLE_D", TGSI_OPCODE_SAMPLE_D },
+ { 1, 4, 0, 0, 0, 0, OTHR, "SAMPLE_L", TGSI_OPCODE_SAMPLE_L },
+ { 1, 3, 0, 0, 0, 0, OTHR, "GATHER4", TGSI_OPCODE_GATHER4 },
+ { 1, 2, 0, 0, 0, 0, OTHR, "SVIEWINFO", TGSI_OPCODE_SVIEWINFO },
+ { 1, 2, 0, 0, 0, 0, OTHR, "SAMPLE_POS", TGSI_OPCODE_SAMPLE_POS },
+ { 1, 2, 0, 0, 0, 0, OTHR, "SAMPLE_INFO", TGSI_OPCODE_SAMPLE_INFO },
+ { 1, 1, 0, 0, 0, 0, COMP, "UARL", TGSI_OPCODE_UARL },
+ { 1, 3, 0, 0, 0, 0, COMP, "UCMP", TGSI_OPCODE_UCMP },
+ { 1, 1, 0, 0, 0, 0, COMP, "IABS", TGSI_OPCODE_IABS },
+ { 1, 1, 0, 0, 0, 0, COMP, "ISSG", TGSI_OPCODE_ISSG },
+ { 1, 2, 0, 0, 0, 0, OTHR, "LOAD", TGSI_OPCODE_LOAD },
+ { 1, 2, 0, 0, 0, 0, OTHR, "STORE", TGSI_OPCODE_STORE },
+ { 1, 0, 0, 0, 0, 0, OTHR, "MFENCE", TGSI_OPCODE_MFENCE },
+ { 1, 0, 0, 0, 0, 0, OTHR, "LFENCE", TGSI_OPCODE_LFENCE },
+ { 1, 0, 0, 0, 0, 0, OTHR, "SFENCE", TGSI_OPCODE_SFENCE },
+ { 0, 0, 0, 0, 0, 0, OTHR, "BARRIER", TGSI_OPCODE_BARRIER },
+
+ { 1, 3, 0, 0, 0, 0, OTHR, "ATOMUADD", TGSI_OPCODE_ATOMUADD },
+ { 1, 3, 0, 0, 0, 0, OTHR, "ATOMXCHG", TGSI_OPCODE_ATOMXCHG },
+ { 1, 4, 0, 0, 0, 0, OTHR, "ATOMCAS", TGSI_OPCODE_ATOMCAS },
+ { 1, 3, 0, 0, 0, 0, OTHR, "ATOMAND", TGSI_OPCODE_ATOMAND },
+ { 1, 3, 0, 0, 0, 0, OTHR, "ATOMOR", TGSI_OPCODE_ATOMOR },
+ { 1, 3, 0, 0, 0, 0, OTHR, "ATOMXOR", TGSI_OPCODE_ATOMXOR },
+ { 1, 3, 0, 0, 0, 0, OTHR, "ATOMUMIN", TGSI_OPCODE_ATOMUMIN },
+ { 1, 3, 0, 0, 0, 0, OTHR, "ATOMUMAX", TGSI_OPCODE_ATOMUMAX },
+ { 1, 3, 0, 0, 0, 0, OTHR, "ATOMIMIN", TGSI_OPCODE_ATOMIMIN },
+ { 1, 3, 0, 0, 0, 0, OTHR, "ATOMIMAX", TGSI_OPCODE_ATOMIMAX },
+ { 1, 3, 1, 0, 0, 0, OTHR, "TEX2", TGSI_OPCODE_TEX2 },
+ { 1, 3, 1, 0, 0, 0, OTHR, "TXB2", TGSI_OPCODE_TXB2 },
+ { 1, 3, 1, 0, 0, 0, OTHR, "TXL2", TGSI_OPCODE_TXL2 },
+};
+
+const struct tgsi_opcode_info *
+tgsi_get_opcode_info( uint opcode )
+{
+ static boolean firsttime = 1;
+
+ if (firsttime) {
+ unsigned i;
+ firsttime = 0;
+ for (i = 0; i < Elements(opcode_info); i++)
+ assert(opcode_info[i].opcode == i);
+ }
+
+ if (opcode < TGSI_OPCODE_LAST)
+ return &opcode_info[opcode];
+
+ assert( 0 );
+ return NULL;
+}
+
+
+const char *
+tgsi_get_opcode_name( uint opcode )
+{
+ const struct tgsi_opcode_info *info = tgsi_get_opcode_info(opcode);
+ return info->mnemonic;
+}
+
+
+const char *
+tgsi_get_processor_name( uint processor )
+{
+ switch (processor) {
+ case TGSI_PROCESSOR_VERTEX:
+ return "vertex shader";
+ case TGSI_PROCESSOR_FRAGMENT:
+ return "fragment shader";
+ case TGSI_PROCESSOR_GEOMETRY:
+ return "geometry shader";
+ default:
+ return "unknown shader type!";
+ }
+}
+
+/**
+ * Infer the type (of the dst) of the opcode.
+ *
+ * MOV and UCMP is special so return VOID
+ */
+static INLINE enum tgsi_opcode_type
+tgsi_opcode_infer_type( uint opcode )
+{
+ switch (opcode) {
+ case TGSI_OPCODE_MOV:
+ case TGSI_OPCODE_UCMP:
+ return TGSI_TYPE_UNTYPED;
+ case TGSI_OPCODE_NOT:
+ case TGSI_OPCODE_SHL:
+ case TGSI_OPCODE_AND:
+ case TGSI_OPCODE_OR:
+ case TGSI_OPCODE_XOR:
+ case TGSI_OPCODE_SAD: /* XXX some src args may be signed for SAD ? */
+ case TGSI_OPCODE_TXQ:
+ case TGSI_OPCODE_TXQ_LZ:
+ case TGSI_OPCODE_F2U:
+ case TGSI_OPCODE_UDIV:
+ case TGSI_OPCODE_UMAD:
+ case TGSI_OPCODE_UMAX:
+ case TGSI_OPCODE_UMIN:
+ case TGSI_OPCODE_UMOD:
+ case TGSI_OPCODE_UMUL:
+ case TGSI_OPCODE_USEQ:
+ case TGSI_OPCODE_USGE:
+ case TGSI_OPCODE_USHR:
+ case TGSI_OPCODE_USLT:
+ case TGSI_OPCODE_USNE:
+ case TGSI_OPCODE_SVIEWINFO:
+ return TGSI_TYPE_UNSIGNED;
+ case TGSI_OPCODE_ARL:
+ case TGSI_OPCODE_ARR:
+ case TGSI_OPCODE_MOD:
+ case TGSI_OPCODE_F2I:
+ case TGSI_OPCODE_FSEQ:
+ case TGSI_OPCODE_FSGE:
+ case TGSI_OPCODE_FSLT:
+ case TGSI_OPCODE_FSNE:
+ case TGSI_OPCODE_IDIV:
+ case TGSI_OPCODE_IMAX:
+ case TGSI_OPCODE_IMIN:
+ case TGSI_OPCODE_INEG:
+ case TGSI_OPCODE_ISGE:
+ case TGSI_OPCODE_ISHR:
+ case TGSI_OPCODE_ISLT:
+ case TGSI_OPCODE_UADD:
+ case TGSI_OPCODE_UARL:
+ case TGSI_OPCODE_IABS:
+ case TGSI_OPCODE_ISSG:
+ return TGSI_TYPE_SIGNED;
+ default:
+ return TGSI_TYPE_FLOAT;
+ }
+}
+
+/*
+ * infer the source type of a TGSI opcode.
+ */
+enum tgsi_opcode_type
+tgsi_opcode_infer_src_type( uint opcode )
+{
+ switch (opcode) {
+ case TGSI_OPCODE_UIF:
+ case TGSI_OPCODE_TXF:
+ case TGSI_OPCODE_BREAKC:
+ case TGSI_OPCODE_U2F:
+ case TGSI_OPCODE_UADD:
+ case TGSI_OPCODE_SWITCH:
+ case TGSI_OPCODE_CASE:
+ case TGSI_OPCODE_SAMPLE_I:
+ case TGSI_OPCODE_SAMPLE_I_MS:
+ return TGSI_TYPE_UNSIGNED;
+ case TGSI_OPCODE_I2F:
+ return TGSI_TYPE_SIGNED;
+ case TGSI_OPCODE_ARL:
+ case TGSI_OPCODE_ARR:
+ case TGSI_OPCODE_TXQ_LZ:
+ case TGSI_OPCODE_F2I:
+ case TGSI_OPCODE_F2U:
+ case TGSI_OPCODE_FSEQ:
+ case TGSI_OPCODE_FSGE:
+ case TGSI_OPCODE_FSLT:
+ case TGSI_OPCODE_FSNE:
+ case TGSI_OPCODE_UCMP:
+ return TGSI_TYPE_FLOAT;
+ default:
+ return tgsi_opcode_infer_type(opcode);
+ }
+}
+
+/*
+ * infer the destination type of a TGSI opcode.
+ */
+enum tgsi_opcode_type
+tgsi_opcode_infer_dst_type( uint opcode )
+{
+ return tgsi_opcode_infer_type(opcode);
+}
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_info.h b/src/minigallium/auxiliary/tgsi/tgsi_info.h
new file mode 100644
index 0000000..44fe00b
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_info.h
@@ -0,0 +1,113 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef TGSI_INFO_H
+#define TGSI_INFO_H
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_shader_tokens.h"
+#include "util/u_format.h"
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+/* This enum describes how an opcode calculates its result. */
+enum tgsi_output_mode {
+ /** The opcode produces no result. */
+ TGSI_OUTPUT_NONE = 0,
+
+ /** When this opcode writes to a channel of the destination register,
+ * it takes as arguments values from the same channel of the source
+ * register(s).
+ *
+ * Example: TGSI_OPCODE_ADD
+ */
+ TGSI_OUTPUT_COMPONENTWISE = 1,
+
+ /** This opcode writes the same value to all enabled channels of the
+ * destination register.
+ *
+ * Example: TGSI_OPCODE_RSQ
+ */
+ TGSI_OUTPUT_REPLICATE = 2,
+
+ /** The operation performed by this opcode is dependent on which channel
+ * of the destination register is being written.
+ *
+ * Example: TGSI_OPCODE_LOG
+ */
+ TGSI_OUTPUT_CHAN_DEPENDENT = 3,
+
+ /**
+ * Example: TGSI_OPCODE_TEX
+ */
+ TGSI_OUTPUT_OTHER = 4
+};
+
+struct tgsi_opcode_info
+{
+ unsigned num_dst:3;
+ unsigned num_src:3;
+ unsigned is_tex:1;
+ unsigned is_branch:1;
+ int pre_dedent:2;
+ int post_indent:2;
+ enum tgsi_output_mode output_mode:3;
+ const char *mnemonic;
+ uint opcode;
+};
+
+const struct tgsi_opcode_info *
+tgsi_get_opcode_info( uint opcode );
+
+const char *
+tgsi_get_opcode_name( uint opcode );
+
+const char *
+tgsi_get_processor_name( uint processor );
+
+enum tgsi_opcode_type {
+ TGSI_TYPE_UNTYPED, /* for MOV */
+ TGSI_TYPE_VOID,
+ TGSI_TYPE_UNSIGNED,
+ TGSI_TYPE_SIGNED,
+ TGSI_TYPE_FLOAT,
+ TGSI_TYPE_DOUBLE
+};
+
+enum tgsi_opcode_type
+tgsi_opcode_infer_src_type( uint opcode );
+
+enum tgsi_opcode_type
+tgsi_opcode_infer_dst_type( uint opcode );
+
+#if defined __cplusplus
+}
+#endif
+
+#endif /* TGSI_INFO_H */
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_iterate.c b/src/minigallium/auxiliary/tgsi/tgsi_iterate.c
new file mode 100644
index 0000000..0ba5fe4
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_iterate.c
@@ -0,0 +1,90 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "util/u_debug.h"
+#include "tgsi_iterate.h"
+
+boolean
+tgsi_iterate_shader(
+ const struct tgsi_token *tokens,
+ struct tgsi_iterate_context *ctx )
+{
+ struct tgsi_parse_context parse;
+
+ if (tgsi_parse_init( &parse, tokens ) != TGSI_PARSE_OK)
+ return FALSE;
+
+ ctx->processor = parse.FullHeader.Processor;
+
+ if (ctx->prolog)
+ if (!ctx->prolog( ctx ))
+ goto fail;
+
+ while (!tgsi_parse_end_of_tokens( &parse )) {
+ tgsi_parse_token( &parse );
+
+ switch (parse.FullToken.Token.Type) {
+ case TGSI_TOKEN_TYPE_INSTRUCTION:
+ if (ctx->iterate_instruction)
+ if (!ctx->iterate_instruction( ctx, &parse.FullToken.FullInstruction ))
+ goto fail;
+ break;
+
+ case TGSI_TOKEN_TYPE_DECLARATION:
+ if (ctx->iterate_declaration)
+ if (!ctx->iterate_declaration( ctx, &parse.FullToken.FullDeclaration ))
+ goto fail;
+ break;
+
+ case TGSI_TOKEN_TYPE_IMMEDIATE:
+ if (ctx->iterate_immediate)
+ if (!ctx->iterate_immediate( ctx, &parse.FullToken.FullImmediate ))
+ goto fail;
+ break;
+
+ case TGSI_TOKEN_TYPE_PROPERTY:
+ if (ctx->iterate_property)
+ if (!ctx->iterate_property( ctx, &parse.FullToken.FullProperty ))
+ goto fail;
+ break;
+
+ default:
+ assert( 0 );
+ }
+ }
+
+ if (ctx->epilog)
+ if (!ctx->epilog( ctx ))
+ goto fail;
+
+ tgsi_parse_free( &parse );
+ return TRUE;
+
+fail:
+ tgsi_parse_free( &parse );
+ return FALSE;
+}
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_iterate.h b/src/minigallium/auxiliary/tgsi/tgsi_iterate.h
new file mode 100644
index 0000000..8d67f22
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_iterate.h
@@ -0,0 +1,80 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef TGSI_ITERATE_H
+#define TGSI_ITERATE_H
+
+#include "pipe/p_shader_tokens.h"
+#include "tgsi/tgsi_parse.h"
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+struct tgsi_iterate_context
+{
+ boolean
+ (* prolog)(
+ struct tgsi_iterate_context *ctx );
+
+ boolean
+ (* iterate_instruction)(
+ struct tgsi_iterate_context *ctx,
+ struct tgsi_full_instruction *inst );
+
+ boolean
+ (* iterate_declaration)(
+ struct tgsi_iterate_context *ctx,
+ struct tgsi_full_declaration *decl );
+
+ boolean
+ (* iterate_immediate)(
+ struct tgsi_iterate_context *ctx,
+ struct tgsi_full_immediate *imm );
+
+ boolean
+ (* iterate_property)(
+ struct tgsi_iterate_context *ctx,
+ struct tgsi_full_property *prop );
+
+ boolean
+ (* epilog)(
+ struct tgsi_iterate_context *ctx );
+
+ struct tgsi_processor processor;
+};
+
+boolean
+tgsi_iterate_shader(
+ const struct tgsi_token *tokens,
+ struct tgsi_iterate_context *ctx );
+
+#if defined __cplusplus
+}
+#endif
+
+#endif /* TGSI_ITERATE_H */
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_opcode_tmp.h b/src/minigallium/auxiliary/tgsi/tgsi_opcode_tmp.h
new file mode 100644
index 0000000..b8144a8
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_opcode_tmp.h
@@ -0,0 +1,231 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+#ifndef OP12_TEX
+#define OP12_TEX(a) OP12(a)
+#endif
+
+#ifndef OP14_TEX
+#define OP14_TEX(a) OP14(a)
+#endif
+
+#ifndef OP12_SAMPLE
+#define OP12_SAMPLE(a) OP12(a)
+#endif
+
+#ifndef OP13_SAMPLE
+#define OP13_SAMPLE(a) OP13(a)
+#endif
+
+#ifndef OP14_SAMPLE
+#define OP14_SAMPLE(a) OP14(a)
+#endif
+
+#ifndef OP15_SAMPLE
+#define OP15_SAMPLE(a) OP15(a)
+#endif
+
+#ifndef OP00_LBL
+#define OP00_LBL(a) OP00(a)
+#endif
+
+#ifndef OP01_LBL
+#define OP01_LBL(a) OP01(a)
+#endif
+
+OP11(ARL)
+OP11(MOV)
+OP11(LIT)
+OP11(RCP)
+OP11(RSQ)
+OP11(EXP)
+OP11(LOG)
+OP12(MUL)
+OP12(ADD)
+OP12(DP3)
+OP12(DP4)
+OP12(DST)
+OP12(MIN)
+OP12(MAX)
+OP12(SLT)
+OP12(SGE)
+OP13(MAD)
+OP12(SUB)
+OP13(LRP)
+OP13(CND)
+OP11(SQRT)
+OP13(DP2A)
+OP11(FRC)
+OP13(CLAMP)
+OP11(FLR)
+OP11(ROUND)
+OP11(EX2)
+OP11(LG2)
+OP12(POW)
+OP12(XPD)
+OP11(ABS)
+OP11(RCC)
+OP12(DPH)
+OP11(COS)
+OP11(DDX)
+OP11(DDY)
+OP00(KILL)
+OP11(PK2H)
+OP11(PK2US)
+OP11(PK4B)
+OP11(PK4UB)
+OP12(RFL)
+OP12(SEQ)
+OP12(SFL)
+OP12(SGT)
+OP11(SIN)
+OP12(SLE)
+OP12(SNE)
+OP12(STR)
+OP12_TEX(TEX)
+OP14_TEX(TXD)
+OP12_TEX(TXP)
+OP11(UP2H)
+OP11(UP2US)
+OP11(UP4B)
+OP11(UP4UB)
+OP13(X2D)
+OP11(ARA)
+OP11(ARR)
+OP01(BRA)
+OP00_LBL(CAL)
+OP00(RET)
+OP11(SSG)
+OP13(CMP)
+OP11(SCS)
+OP12_TEX(TXB)
+OP11(NRM)
+OP12(DIV)
+OP12(DP2)
+OP12_TEX(TXL)
+OP00(BRK)
+OP01_LBL(IF)
+OP01_LBL(UIF)
+OP00_LBL(ELSE)
+OP00(ENDIF)
+OP01(PUSHA)
+OP10(POPA)
+OP11(CEIL)
+OP11(I2F)
+OP11(NOT)
+OP11(TRUNC)
+OP12(SHL)
+OP12(AND)
+OP12(OR)
+OP12(MOD)
+OP12(XOR)
+OP13(SAD)
+OP12_TEX(TXF)
+OP12_TEX(TXQ)
+OP00(CONT)
+OP00(EMIT)
+OP00(ENDPRIM)
+OP00_LBL(BGNLOOP)
+OP00(BGNSUB)
+OP00_LBL(ENDLOOP)
+OP00(ENDSUB)
+OP00(NOP)
+OP11(NRM4)
+OP01(CALLNZ)
+OP01(BREAKC)
+OP01(KILL_IF)
+OP00(END)
+OP11(F2I)
+OP12(FSEQ)
+OP12(FSGE)
+OP12(FSLT)
+OP12(FSNE)
+OP12(IDIV)
+OP12(IMAX)
+OP12(IMIN)
+OP11(INEG)
+OP12(ISGE)
+OP12(ISHR)
+OP12(ISLT)
+OP11(F2U)
+OP11(U2F)
+OP12(UADD)
+OP12(UDIV)
+OP13(UMAD)
+OP12(UMAX)
+OP12(UMIN)
+OP12(UMOD)
+OP12(UMUL)
+OP12(USEQ)
+OP12(USGE)
+OP12(USHR)
+OP12(USLT)
+OP12(USNE)
+OP01(SWITCH)
+OP01(CASE)
+OP00(DEFAULT)
+OP00(ENDSWITCH)
+
+OP13_SAMPLE(SAMPLE)
+OP12_SAMPLE(SAMPLE_I)
+OP13_SAMPLE(SAMPLE_I_MS)
+OP14_SAMPLE(SAMPLE_B)
+OP14_SAMPLE(SAMPLE_C)
+OP14_SAMPLE(SAMPLE_C_LZ)
+OP15_SAMPLE(SAMPLE_D)
+OP14_SAMPLE(SAMPLE_L)
+OP13_SAMPLE(GATHER4)
+OP12(SVIEWINFO)
+OP13(SAMPLE_POS)
+OP12(SAMPLE_INFO)
+
+OP13(UCMP)
+
+#undef OP00
+#undef OP01
+#undef OP10
+#undef OP11
+#undef OP12
+#undef OP13
+
+#ifdef OP14
+#undef OP14
+#endif
+
+#ifdef OP15
+#undef OP15
+#endif
+
+#undef OP00_LBL
+#undef OP01_LBL
+
+#undef OP12_TEX
+#undef OP14_TEX
+
+#undef OP12_SAMPLE
+#undef OP13_SAMPLE
+#undef OP14_SAMPLE
+#undef OP15_SAMPLE
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_parse.c b/src/minigallium/auxiliary/tgsi/tgsi_parse.c
new file mode 100644
index 0000000..70c1cb2
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_parse.c
@@ -0,0 +1,307 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "util/u_debug.h"
+#include "pipe/p_shader_tokens.h"
+#include "tgsi_parse.h"
+#include "util/u_memory.h"
+
+unsigned
+tgsi_parse_init(
+ struct tgsi_parse_context *ctx,
+ const struct tgsi_token *tokens )
+{
+ ctx->FullHeader.Header = *(struct tgsi_header *) &tokens[0];
+ if( ctx->FullHeader.Header.HeaderSize >= 2 ) {
+ ctx->FullHeader.Processor = *(struct tgsi_processor *) &tokens[1];
+ }
+ else {
+ return TGSI_PARSE_ERROR;
+ }
+
+ ctx->Tokens = tokens;
+ ctx->Position = ctx->FullHeader.Header.HeaderSize;
+
+ return TGSI_PARSE_OK;
+}
+
+void
+tgsi_parse_free(
+ struct tgsi_parse_context *ctx )
+{
+}
+
+boolean
+tgsi_parse_end_of_tokens(
+ struct tgsi_parse_context *ctx )
+{
+ return ctx->Position >=
+ ctx->FullHeader.Header.HeaderSize + ctx->FullHeader.Header.BodySize;
+}
+
+
+/**
+ * This function is used to avoid and work-around type punning/aliasing
+ * warnings. The warnings seem harmless on x86 but on PPC they cause
+ * real failures.
+ */
+static INLINE void
+copy_token(void *dst, const void *src)
+{
+ memcpy(dst, src, 4);
+}
+
+
+/**
+ * Get next 4-byte token, return it at address specified by 'token'
+ */
+static void
+next_token(
+ struct tgsi_parse_context *ctx,
+ void *token )
+{
+ assert( !tgsi_parse_end_of_tokens( ctx ) );
+ copy_token(token, &ctx->Tokens[ctx->Position]);
+ ctx->Position++;
+}
+
+
+void
+tgsi_parse_token(
+ struct tgsi_parse_context *ctx )
+{
+ struct tgsi_token token;
+ unsigned i;
+
+ next_token( ctx, &token );
+
+ switch( token.Type ) {
+ case TGSI_TOKEN_TYPE_DECLARATION:
+ {
+ struct tgsi_full_declaration *decl = &ctx->FullToken.FullDeclaration;
+
+ memset(decl, 0, sizeof *decl);
+ copy_token(&decl->Declaration, &token);
+
+ next_token( ctx, &decl->Range );
+
+ if (decl->Declaration.Dimension) {
+ next_token(ctx, &decl->Dim);
+ }
+
+ if( decl->Declaration.Interpolate ) {
+ next_token( ctx, &decl->Interp );
+ }
+
+ if( decl->Declaration.Semantic ) {
+ next_token( ctx, &decl->Semantic );
+ }
+
+ if (decl->Declaration.File == TGSI_FILE_RESOURCE) {
+ next_token(ctx, &decl->Resource);
+ }
+
+ if (decl->Declaration.File == TGSI_FILE_SAMPLER_VIEW) {
+ next_token(ctx, &decl->SamplerView);
+ }
+
+ if( decl->Declaration.Array ) {
+ next_token(ctx, &decl->Array);
+ }
+
+ break;
+ }
+
+ case TGSI_TOKEN_TYPE_IMMEDIATE:
+ {
+ struct tgsi_full_immediate *imm = &ctx->FullToken.FullImmediate;
+ uint imm_count;
+
+ memset(imm, 0, sizeof *imm);
+ copy_token(&imm->Immediate, &token);
+
+ imm_count = imm->Immediate.NrTokens - 1;
+
+ switch (imm->Immediate.DataType) {
+ case TGSI_IMM_FLOAT32:
+ for (i = 0; i < imm_count; i++) {
+ next_token(ctx, &imm->u[i].Float);
+ }
+ break;
+
+ case TGSI_IMM_UINT32:
+ for (i = 0; i < imm_count; i++) {
+ next_token(ctx, &imm->u[i].Uint);
+ }
+ break;
+
+ case TGSI_IMM_INT32:
+ for (i = 0; i < imm_count; i++) {
+ next_token(ctx, &imm->u[i].Int);
+ }
+ break;
+
+ default:
+ assert( 0 );
+ }
+
+ break;
+ }
+
+ case TGSI_TOKEN_TYPE_INSTRUCTION:
+ {
+ struct tgsi_full_instruction *inst = &ctx->FullToken.FullInstruction;
+
+ memset(inst, 0, sizeof *inst);
+ copy_token(&inst->Instruction, &token);
+
+ if (inst->Instruction.Predicate) {
+ next_token(ctx, &inst->Predicate);
+ }
+
+ if (inst->Instruction.Label) {
+ next_token( ctx, &inst->Label);
+ }
+
+ if (inst->Instruction.Texture) {
+ next_token( ctx, &inst->Texture);
+ for( i = 0; i < inst->Texture.NumOffsets; i++ ) {
+ next_token( ctx, &inst->TexOffsets[i] );
+ }
+ }
+
+ assert( inst->Instruction.NumDstRegs <= TGSI_FULL_MAX_DST_REGISTERS );
+
+ for( i = 0; i < inst->Instruction.NumDstRegs; i++ ) {
+
+ next_token( ctx, &inst->Dst[i].Register );
+
+ if( inst->Dst[i].Register.Indirect )
+ next_token( ctx, &inst->Dst[i].Indirect );
+
+ if( inst->Dst[i].Register.Dimension ) {
+ next_token( ctx, &inst->Dst[i].Dimension );
+
+ /*
+ * No support for multi-dimensional addressing.
+ */
+ assert( !inst->Dst[i].Dimension.Dimension );
+
+ if( inst->Dst[i].Dimension.Indirect )
+ next_token( ctx, &inst->Dst[i].DimIndirect );
+ }
+ }
+
+ assert( inst->Instruction.NumSrcRegs <= TGSI_FULL_MAX_SRC_REGISTERS );
+
+ for( i = 0; i < inst->Instruction.NumSrcRegs; i++ ) {
+
+ next_token( ctx, &inst->Src[i].Register );
+
+ if( inst->Src[i].Register.Indirect )
+ next_token( ctx, &inst->Src[i].Indirect );
+
+ if( inst->Src[i].Register.Dimension ) {
+ next_token( ctx, &inst->Src[i].Dimension );
+
+ /*
+ * No support for multi-dimensional addressing.
+ */
+ assert( !inst->Src[i].Dimension.Dimension );
+
+ if( inst->Src[i].Dimension.Indirect )
+ next_token( ctx, &inst->Src[i].DimIndirect );
+ }
+ }
+
+ break;
+ }
+
+ case TGSI_TOKEN_TYPE_PROPERTY:
+ {
+ struct tgsi_full_property *prop = &ctx->FullToken.FullProperty;
+ uint prop_count;
+
+ memset(prop, 0, sizeof *prop);
+ copy_token(&prop->Property, &token);
+
+ prop_count = prop->Property.NrTokens - 1;
+ for (i = 0; i < prop_count; i++) {
+ next_token(ctx, &prop->u[i]);
+ }
+
+ break;
+ }
+
+ default:
+ assert( 0 );
+ }
+}
+
+
+
+
+/**
+ * Make a new copy of a token array.
+ */
+struct tgsi_token *
+tgsi_dup_tokens(const struct tgsi_token *tokens)
+{
+ unsigned n = tgsi_num_tokens(tokens);
+ unsigned bytes = n * sizeof(struct tgsi_token);
+ struct tgsi_token *new_tokens = (struct tgsi_token *) MALLOC(bytes);
+ if (new_tokens)
+ memcpy(new_tokens, tokens, bytes);
+ return new_tokens;
+}
+
+
+/**
+ * Allocate memory for num_tokens tokens.
+ */
+struct tgsi_token *
+tgsi_alloc_tokens(unsigned num_tokens)
+{
+ unsigned bytes = num_tokens * sizeof(struct tgsi_token);
+ return (struct tgsi_token *) MALLOC(bytes);
+}
+
+
+void
+tgsi_dump_tokens(const struct tgsi_token *tokens)
+{
+ const unsigned *dwords = (const unsigned *)tokens;
+ int nr = tgsi_num_tokens(tokens);
+ int i;
+
+ assert(sizeof(*tokens) == sizeof(unsigned));
+
+ debug_printf("const unsigned tokens[%d] = {\n", nr);
+ for (i = 0; i < nr; i++)
+ debug_printf("0x%08x,\n", dwords[i]);
+ debug_printf("};\n");
+}
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_parse.h b/src/minigallium/auxiliary/tgsi/tgsi_parse.h
new file mode 100644
index 0000000..808f31b
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_parse.h
@@ -0,0 +1,159 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef TGSI_PARSE_H
+#define TGSI_PARSE_H
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_shader_tokens.h"
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+struct tgsi_full_header
+{
+ struct tgsi_header Header;
+ struct tgsi_processor Processor;
+};
+
+struct tgsi_full_dst_register
+{
+ struct tgsi_dst_register Register;
+ struct tgsi_ind_register Indirect;
+ struct tgsi_dimension Dimension;
+ struct tgsi_ind_register DimIndirect;
+};
+
+struct tgsi_full_src_register
+{
+ struct tgsi_src_register Register;
+ struct tgsi_ind_register Indirect;
+ struct tgsi_dimension Dimension;
+ struct tgsi_ind_register DimIndirect;
+};
+
+struct tgsi_full_declaration
+{
+ struct tgsi_declaration Declaration;
+ struct tgsi_declaration_range Range;
+ struct tgsi_declaration_dimension Dim;
+ struct tgsi_declaration_interp Interp;
+ struct tgsi_declaration_semantic Semantic;
+ struct tgsi_declaration_resource Resource;
+ struct tgsi_declaration_sampler_view SamplerView;
+ struct tgsi_declaration_array Array;
+};
+
+struct tgsi_full_immediate
+{
+ struct tgsi_immediate Immediate;
+ union tgsi_immediate_data u[4];
+};
+
+struct tgsi_full_property
+{
+ struct tgsi_property Property;
+ struct tgsi_property_data u[8];
+};
+
+#define TGSI_FULL_MAX_DST_REGISTERS 2
+#define TGSI_FULL_MAX_SRC_REGISTERS 5 /* SAMPLE_D has 5 */
+#define TGSI_FULL_MAX_TEX_OFFSETS 4
+
+struct tgsi_full_instruction
+{
+ struct tgsi_instruction Instruction;
+ struct tgsi_instruction_predicate Predicate;
+ struct tgsi_instruction_label Label;
+ struct tgsi_instruction_texture Texture;
+ struct tgsi_full_dst_register Dst[TGSI_FULL_MAX_DST_REGISTERS];
+ struct tgsi_full_src_register Src[TGSI_FULL_MAX_SRC_REGISTERS];
+ struct tgsi_texture_offset TexOffsets[TGSI_FULL_MAX_TEX_OFFSETS];
+};
+
+union tgsi_full_token
+{
+ struct tgsi_token Token;
+ struct tgsi_full_declaration FullDeclaration;
+ struct tgsi_full_immediate FullImmediate;
+ struct tgsi_full_instruction FullInstruction;
+ struct tgsi_full_property FullProperty;
+};
+
+struct tgsi_parse_context
+{
+ const struct tgsi_token *Tokens;
+ unsigned Position;
+ struct tgsi_full_header FullHeader;
+ union tgsi_full_token FullToken;
+};
+
+#define TGSI_PARSE_OK 0
+#define TGSI_PARSE_ERROR 1
+
+unsigned
+tgsi_parse_init(
+ struct tgsi_parse_context *ctx,
+ const struct tgsi_token *tokens );
+
+void
+tgsi_parse_free(
+ struct tgsi_parse_context *ctx );
+
+boolean
+tgsi_parse_end_of_tokens(
+ struct tgsi_parse_context *ctx );
+
+void
+tgsi_parse_token(
+ struct tgsi_parse_context *ctx );
+
+static INLINE unsigned
+tgsi_num_tokens(const struct tgsi_token *tokens)
+{
+ struct tgsi_header header;
+ memcpy(&header, tokens, sizeof(header));
+ return header.HeaderSize + header.BodySize;
+}
+
+void
+tgsi_dump_tokens(const struct tgsi_token *tokens);
+
+struct tgsi_token *
+tgsi_dup_tokens(const struct tgsi_token *tokens);
+
+struct tgsi_token *
+tgsi_alloc_tokens(unsigned num_tokens);
+
+
+#if defined __cplusplus
+}
+#endif
+
+#endif /* TGSI_PARSE_H */
+
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_sanity.c b/src/minigallium/auxiliary/tgsi/tgsi_sanity.c
new file mode 100644
index 0000000..8a21e56
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_sanity.c
@@ -0,0 +1,562 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "util/u_debug.h"
+#include "util/u_memory.h"
+#include "util/u_prim.h"
+#include "cso_cache/cso_hash.h"
+#include "tgsi_sanity.h"
+#include "tgsi_info.h"
+#include "tgsi_iterate.h"
+
+
+DEBUG_GET_ONCE_BOOL_OPTION(print_sanity, "TGSI_PRINT_SANITY", FALSE)
+
+
+typedef struct {
+ uint file : 28;
+ /* max 2 dimensions */
+ uint dimensions : 4;
+ uint indices[2];
+} scan_register;
+
+struct sanity_check_ctx
+{
+ struct tgsi_iterate_context iter;
+ struct cso_hash *regs_decl;
+ struct cso_hash *regs_used;
+ struct cso_hash *regs_ind_used;
+
+ uint num_imms;
+ uint num_instructions;
+ uint index_of_END;
+
+ uint errors;
+ uint warnings;
+ uint implied_array_size;
+
+ boolean print;
+};
+
+static INLINE unsigned
+scan_register_key(const scan_register *reg)
+{
+ unsigned key = reg->file;
+ key |= (reg->indices[0] << 4);
+ key |= (reg->indices[1] << 18);
+
+ return key;
+}
+
+static void
+fill_scan_register1d(scan_register *reg,
+ uint file, uint index)
+{
+ reg->file = file;
+ reg->dimensions = 1;
+ reg->indices[0] = index;
+ reg->indices[1] = 0;
+}
+
+static void
+fill_scan_register2d(scan_register *reg,
+ uint file, uint index1, uint index2)
+{
+ reg->file = file;
+ reg->dimensions = 2;
+ reg->indices[0] = index1;
+ reg->indices[1] = index2;
+}
+
+static void
+scan_register_dst(scan_register *reg,
+ struct tgsi_full_dst_register *dst)
+{
+ if (dst->Register.Dimension) {
+ /*FIXME: right now we don't support indirect
+ * multidimensional addressing */
+ fill_scan_register2d(reg,
+ dst->Register.File,
+ dst->Register.Index,
+ dst->Dimension.Index);
+ } else {
+ fill_scan_register1d(reg,
+ dst->Register.File,
+ dst->Register.Index);
+ }
+}
+
+static void
+scan_register_src(scan_register *reg,
+ struct tgsi_full_src_register *src)
+{
+ if (src->Register.Dimension) {
+ /*FIXME: right now we don't support indirect
+ * multidimensional addressing */
+ fill_scan_register2d(reg,
+ src->Register.File,
+ src->Register.Index,
+ src->Dimension.Index);
+ } else {
+ fill_scan_register1d(reg,
+ src->Register.File,
+ src->Register.Index);
+ }
+}
+
+static scan_register *
+create_scan_register_src(struct tgsi_full_src_register *src)
+{
+ scan_register *reg = MALLOC(sizeof(scan_register));
+ scan_register_src(reg, src);
+
+ return reg;
+}
+
+static scan_register *
+create_scan_register_dst(struct tgsi_full_dst_register *dst)
+{
+ scan_register *reg = MALLOC(sizeof(scan_register));
+ scan_register_dst(reg, dst);
+
+ return reg;
+}
+
+static void
+report_error(
+ struct sanity_check_ctx *ctx,
+ const char *format,
+ ... )
+{
+ va_list args;
+
+ if (!ctx->print)
+ return;
+
+ debug_printf( "Error : " );
+ va_start( args, format );
+ _debug_vprintf( format, args );
+ va_end( args );
+ debug_printf( "\n" );
+ ctx->errors++;
+}
+
+static void
+report_warning(
+ struct sanity_check_ctx *ctx,
+ const char *format,
+ ... )
+{
+ va_list args;
+
+ if (!ctx->print)
+ return;
+
+ debug_printf( "Warning: " );
+ va_start( args, format );
+ _debug_vprintf( format, args );
+ va_end( args );
+ debug_printf( "\n" );
+ ctx->warnings++;
+}
+
+static boolean
+check_file_name(
+ struct sanity_check_ctx *ctx,
+ uint file )
+{
+ if (file <= TGSI_FILE_NULL || file >= TGSI_FILE_COUNT) {
+ report_error( ctx, "(%u): Invalid register file name", file );
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static boolean
+is_register_declared(
+ struct sanity_check_ctx *ctx,
+ const scan_register *reg)
+{
+ void *data = cso_hash_find_data_from_template(
+ ctx->regs_decl, scan_register_key(reg),
+ (void*)reg, sizeof(scan_register));
+ return data ? TRUE : FALSE;
+}
+
+static boolean
+is_any_register_declared(
+ struct sanity_check_ctx *ctx,
+ uint file )
+{
+ struct cso_hash_iter iter =
+ cso_hash_first_node(ctx->regs_decl);
+
+ while (!cso_hash_iter_is_null(iter)) {
+ scan_register *reg = (scan_register *)cso_hash_iter_data(iter);
+ if (reg->file == file)
+ return TRUE;
+ iter = cso_hash_iter_next(iter);
+ }
+
+ return FALSE;
+}
+
+static boolean
+is_register_used(
+ struct sanity_check_ctx *ctx,
+ scan_register *reg)
+{
+ void *data = cso_hash_find_data_from_template(
+ ctx->regs_used, scan_register_key(reg),
+ reg, sizeof(scan_register));
+ return data ? TRUE : FALSE;
+}
+
+
+static boolean
+is_ind_register_used(
+ struct sanity_check_ctx *ctx,
+ scan_register *reg)
+{
+ return cso_hash_contains(ctx->regs_ind_used, reg->file);
+}
+
+static const char *file_names[TGSI_FILE_COUNT] =
+{
+ "NULL",
+ "CONST",
+ "IN",
+ "OUT",
+ "TEMP",
+ "SAMP",
+ "ADDR",
+ "IMM",
+ "PRED",
+ "SV",
+ "RES"
+};
+
+static boolean
+check_register_usage(
+ struct sanity_check_ctx *ctx,
+ scan_register *reg,
+ const char *name,
+ boolean indirect_access )
+{
+ if (!check_file_name( ctx, reg->file )) {
+ FREE(reg);
+ return FALSE;
+ }
+
+ if (indirect_access) {
+ /* Note that 'index' is an offset relative to the value of the
+ * address register. No range checking done here.*/
+ reg->indices[0] = 0;
+ reg->indices[1] = 0;
+ if (!is_any_register_declared( ctx, reg->file ))
+ report_error( ctx, "%s: Undeclared %s register", file_names[reg->file], name );
+ if (!is_ind_register_used(ctx, reg))
+ cso_hash_insert(ctx->regs_ind_used, reg->file, reg);
+ else
+ FREE(reg);
+ }
+ else {
+ if (!is_register_declared( ctx, reg )) {
+ if (reg->dimensions == 2) {
+ report_error( ctx, "%s[%d][%d]: Undeclared %s register", file_names[reg->file],
+ reg->indices[0], reg->indices[1], name );
+ }
+ else {
+ report_error( ctx, "%s[%d]: Undeclared %s register", file_names[reg->file],
+ reg->indices[0], name );
+ }
+ }
+ if (!is_register_used( ctx, reg ))
+ cso_hash_insert(ctx->regs_used, scan_register_key(reg), reg);
+ else
+ FREE(reg);
+ }
+ return TRUE;
+}
+
+static boolean
+iter_instruction(
+ struct tgsi_iterate_context *iter,
+ struct tgsi_full_instruction *inst )
+{
+ struct sanity_check_ctx *ctx = (struct sanity_check_ctx *) iter;
+ const struct tgsi_opcode_info *info;
+ uint i;
+
+ if (inst->Instruction.Opcode == TGSI_OPCODE_END) {
+ if (ctx->index_of_END != ~0) {
+ report_error( ctx, "Too many END instructions" );
+ }
+ ctx->index_of_END = ctx->num_instructions;
+ }
+
+ info = tgsi_get_opcode_info( inst->Instruction.Opcode );
+ if (info == NULL) {
+ report_error( ctx, "(%u): Invalid instruction opcode", inst->Instruction.Opcode );
+ return TRUE;
+ }
+
+ if (info->num_dst != inst->Instruction.NumDstRegs) {
+ report_error( ctx, "%s: Invalid number of destination operands, should be %u", info->mnemonic, info->num_dst );
+ }
+ if (info->num_src != inst->Instruction.NumSrcRegs) {
+ report_error( ctx, "%s: Invalid number of source operands, should be %u", info->mnemonic, info->num_src );
+ }
+
+ /* Check destination and source registers' validity.
+ * Mark the registers as used.
+ */
+ for (i = 0; i < inst->Instruction.NumDstRegs; i++) {
+ scan_register *reg = create_scan_register_dst(&inst->Dst[i]);
+ check_register_usage(
+ ctx,
+ reg,
+ "destination",
+ FALSE );
+ if (!inst->Dst[i].Register.WriteMask) {
+ report_error(ctx, "Destination register has empty writemask");
+ }
+ }
+ for (i = 0; i < inst->Instruction.NumSrcRegs; i++) {
+ scan_register *reg = create_scan_register_src(&inst->Src[i]);
+ check_register_usage(
+ ctx,
+ reg,
+ "source",
+ (boolean)inst->Src[i].Register.Indirect );
+ if (inst->Src[i].Register.Indirect) {
+ scan_register *ind_reg = MALLOC(sizeof(scan_register));
+
+ fill_scan_register1d(ind_reg,
+ inst->Src[i].Indirect.File,
+ inst->Src[i].Indirect.Index);
+ check_register_usage(
+ ctx,
+ ind_reg,
+ "indirect",
+ FALSE );
+ }
+ }
+
+ ctx->num_instructions++;
+
+ return TRUE;
+}
+
+static void
+check_and_declare(struct sanity_check_ctx *ctx,
+ scan_register *reg)
+{
+ if (is_register_declared( ctx, reg))
+ report_error( ctx, "%s[%u]: The same register declared more than once",
+ file_names[reg->file], reg->indices[0] );
+ cso_hash_insert(ctx->regs_decl,
+ scan_register_key(reg),
+ reg);
+}
+
+
+static boolean
+iter_declaration(
+ struct tgsi_iterate_context *iter,
+ struct tgsi_full_declaration *decl )
+{
+ struct sanity_check_ctx *ctx = (struct sanity_check_ctx *) iter;
+ uint file;
+ uint i;
+
+ /* No declarations allowed after the first instruction.
+ */
+ if (ctx->num_instructions > 0)
+ report_error( ctx, "Instruction expected but declaration found" );
+
+ /* Check registers' validity.
+ * Mark the registers as declared.
+ */
+ file = decl->Declaration.File;
+ if (!check_file_name( ctx, file ))
+ return TRUE;
+ for (i = decl->Range.First; i <= decl->Range.Last; i++) {
+ /* declared TGSI_FILE_INPUT's for geometry processor
+ * have an implied second dimension */
+ if (file == TGSI_FILE_INPUT &&
+ ctx->iter.processor.Processor == TGSI_PROCESSOR_GEOMETRY) {
+ uint vert;
+ for (vert = 0; vert < ctx->implied_array_size; ++vert) {
+ scan_register *reg = MALLOC(sizeof(scan_register));
+ fill_scan_register2d(reg, file, i, vert);
+ check_and_declare(ctx, reg);
+ }
+ } else {
+ scan_register *reg = MALLOC(sizeof(scan_register));
+ if (decl->Declaration.Dimension) {
+ fill_scan_register2d(reg, file, i, decl->Dim.Index2D);
+ } else {
+ fill_scan_register1d(reg, file, i);
+ }
+ check_and_declare(ctx, reg);
+ }
+ }
+
+ return TRUE;
+}
+
+static boolean
+iter_immediate(
+ struct tgsi_iterate_context *iter,
+ struct tgsi_full_immediate *imm )
+{
+ struct sanity_check_ctx *ctx = (struct sanity_check_ctx *) iter;
+ scan_register *reg;
+
+ /* No immediates allowed after the first instruction.
+ */
+ if (ctx->num_instructions > 0)
+ report_error( ctx, "Instruction expected but immediate found" );
+
+ /* Mark the register as declared.
+ */
+ reg = MALLOC(sizeof(scan_register));
+ fill_scan_register1d(reg, TGSI_FILE_IMMEDIATE, ctx->num_imms);
+ cso_hash_insert(ctx->regs_decl, scan_register_key(reg), reg);
+ ctx->num_imms++;
+
+ /* Check data type validity.
+ */
+ if (imm->Immediate.DataType != TGSI_IMM_FLOAT32 &&
+ imm->Immediate.DataType != TGSI_IMM_UINT32 &&
+ imm->Immediate.DataType != TGSI_IMM_INT32) {
+ report_error( ctx, "(%u): Invalid immediate data type", imm->Immediate.DataType );
+ return TRUE;
+ }
+
+ return TRUE;
+}
+
+
+static boolean
+iter_property(
+ struct tgsi_iterate_context *iter,
+ struct tgsi_full_property *prop )
+{
+ struct sanity_check_ctx *ctx = (struct sanity_check_ctx *) iter;
+
+ if (iter->processor.Processor == TGSI_PROCESSOR_GEOMETRY &&
+ prop->Property.PropertyName == TGSI_PROPERTY_GS_INPUT_PRIM) {
+ ctx->implied_array_size = u_vertices_per_prim(prop->u[0].Data);
+ }
+ return TRUE;
+}
+
+static boolean
+epilog(
+ struct tgsi_iterate_context *iter )
+{
+ struct sanity_check_ctx *ctx = (struct sanity_check_ctx *) iter;
+
+ /* There must be an END instruction somewhere.
+ */
+ if (ctx->index_of_END == ~0) {
+ report_error( ctx, "Missing END instruction" );
+ }
+
+ /* Check if all declared registers were used.
+ */
+ {
+ struct cso_hash_iter iter =
+ cso_hash_first_node(ctx->regs_decl);
+
+ while (!cso_hash_iter_is_null(iter)) {
+ scan_register *reg = (scan_register *)cso_hash_iter_data(iter);
+ if (!is_register_used(ctx, reg) && !is_ind_register_used(ctx, reg)) {
+ report_warning( ctx, "%s[%u]: Register never used",
+ file_names[reg->file], reg->indices[0] );
+ }
+ iter = cso_hash_iter_next(iter);
+ }
+ }
+
+ /* Print totals, if any.
+ */
+ if (ctx->errors || ctx->warnings)
+ debug_printf( "%u errors, %u warnings\n", ctx->errors, ctx->warnings );
+
+ return TRUE;
+}
+
+static void
+regs_hash_destroy(struct cso_hash *hash)
+{
+ struct cso_hash_iter iter = cso_hash_first_node(hash);
+ while (!cso_hash_iter_is_null(iter)) {
+ scan_register *reg = (scan_register *)cso_hash_iter_data(iter);
+ iter = cso_hash_erase(hash, iter);
+ assert(reg->file < TGSI_FILE_COUNT);
+ FREE(reg);
+ }
+ cso_hash_delete(hash);
+}
+
+boolean
+tgsi_sanity_check(
+ const struct tgsi_token *tokens )
+{
+ struct sanity_check_ctx ctx;
+
+ ctx.iter.prolog = NULL;
+ ctx.iter.iterate_instruction = iter_instruction;
+ ctx.iter.iterate_declaration = iter_declaration;
+ ctx.iter.iterate_immediate = iter_immediate;
+ ctx.iter.iterate_property = iter_property;
+ ctx.iter.epilog = epilog;
+
+ ctx.regs_decl = cso_hash_create();
+ ctx.regs_used = cso_hash_create();
+ ctx.regs_ind_used = cso_hash_create();
+
+ ctx.num_imms = 0;
+ ctx.num_instructions = 0;
+ ctx.index_of_END = ~0;
+
+ ctx.errors = 0;
+ ctx.warnings = 0;
+ ctx.implied_array_size = 0;
+ ctx.print = debug_get_option_print_sanity();
+
+ if (!tgsi_iterate_shader( tokens, &ctx.iter ))
+ return FALSE;
+
+ regs_hash_destroy(ctx.regs_decl);
+ regs_hash_destroy(ctx.regs_used);
+ regs_hash_destroy(ctx.regs_ind_used);
+ return ctx.errors == 0;
+}
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_sanity.h b/src/minigallium/auxiliary/tgsi/tgsi_sanity.h
new file mode 100644
index 0000000..707d11e
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_sanity.h
@@ -0,0 +1,52 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef TGSI_SANITY_H
+#define TGSI_SANITY_H
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+#include "pipe/p_compiler.h"
+
+struct tgsi_token;
+
+/* Check the given token stream for errors and common mistakes.
+ * Diagnostic messages are printed out to the debug output, and is
+ * controlled by the debug option TGSI_PRINT_SANITY (default false).
+ * Returns TRUE if there are no errors, even though there could be some warnings.
+ */
+boolean
+tgsi_sanity_check(
+ const struct tgsi_token *tokens );
+
+#if defined __cplusplus
+}
+#endif
+
+#endif /* TGSI_SANITY_H */
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_scan.c b/src/minigallium/auxiliary/tgsi/tgsi_scan.c
new file mode 100644
index 0000000..05b7111
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_scan.c
@@ -0,0 +1,398 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ * Copyright 2008 VMware, Inc. All rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * TGSI program scan utility.
+ * Used to determine which registers and instructions are used by a shader.
+ *
+ * Authors: Brian Paul
+ */
+
+
+#include "util/u_debug.h"
+#include "util/u_math.h"
+#include "util/u_memory.h"
+#include "util/u_prim.h"
+#include "tgsi/tgsi_parse.h"
+#include "tgsi/tgsi_util.h"
+#include "tgsi/tgsi_scan.h"
+
+
+
+
+/**
+ * Scan the given TGSI shader to collect information such as number of
+ * registers used, special instructions used, etc.
+ * \return info the result of the scan
+ */
+void
+tgsi_scan_shader(const struct tgsi_token *tokens,
+ struct tgsi_shader_info *info)
+{
+ uint procType, i;
+ struct tgsi_parse_context parse;
+
+ memset(info, 0, sizeof(*info));
+ for (i = 0; i < TGSI_FILE_COUNT; i++)
+ info->file_max[i] = -1;
+
+ /**
+ ** Setup to begin parsing input shader
+ **/
+ if (tgsi_parse_init( &parse, tokens ) != TGSI_PARSE_OK) {
+ debug_printf("tgsi_parse_init() failed in tgsi_scan_shader()!\n");
+ return;
+ }
+ procType = parse.FullHeader.Processor.Processor;
+ assert(procType == TGSI_PROCESSOR_FRAGMENT ||
+ procType == TGSI_PROCESSOR_VERTEX ||
+ procType == TGSI_PROCESSOR_GEOMETRY ||
+ procType == TGSI_PROCESSOR_COMPUTE);
+ info->processor = procType;
+
+
+ /**
+ ** Loop over incoming program tokens/instructions
+ */
+ while( !tgsi_parse_end_of_tokens( &parse ) ) {
+
+ info->num_tokens++;
+
+ tgsi_parse_token( &parse );
+
+ switch( parse.FullToken.Token.Type ) {
+ case TGSI_TOKEN_TYPE_INSTRUCTION:
+ {
+ const struct tgsi_full_instruction *fullinst
+ = &parse.FullToken.FullInstruction;
+ uint i;
+
+ assert(fullinst->Instruction.Opcode < TGSI_OPCODE_LAST);
+ info->opcode_count[fullinst->Instruction.Opcode]++;
+
+ for (i = 0; i < fullinst->Instruction.NumSrcRegs; i++) {
+ const struct tgsi_full_src_register *src =
+ &fullinst->Src[i];
+ int ind = src->Register.Index;
+
+ /* Mark which inputs are effectively used */
+ if (src->Register.File == TGSI_FILE_INPUT) {
+ unsigned usage_mask;
+ usage_mask = tgsi_util_get_inst_usage_mask(fullinst, i);
+ if (src->Register.Indirect) {
+ for (ind = 0; ind < info->num_inputs; ++ind) {
+ info->input_usage_mask[ind] |= usage_mask;
+ }
+ } else {
+ assert(ind >= 0);
+ assert(ind < PIPE_MAX_SHADER_INPUTS);
+ info->input_usage_mask[ind] |= usage_mask;
+ }
+
+ if (procType == TGSI_PROCESSOR_FRAGMENT &&
+ info->reads_position &&
+ src->Register.Index == 0 &&
+ (src->Register.SwizzleX == TGSI_SWIZZLE_Z ||
+ src->Register.SwizzleY == TGSI_SWIZZLE_Z ||
+ src->Register.SwizzleZ == TGSI_SWIZZLE_Z ||
+ src->Register.SwizzleW == TGSI_SWIZZLE_Z)) {
+ info->reads_z = TRUE;
+ }
+ }
+
+ /* check for indirect register reads */
+ if (src->Register.Indirect) {
+ info->indirect_files |= (1 << src->Register.File);
+ }
+
+ /* MSAA samplers */
+ if (src->Register.File == TGSI_FILE_SAMPLER) {
+ assert(fullinst->Instruction.Texture);
+ assert(src->Register.Index < Elements(info->is_msaa_sampler));
+
+ if (fullinst->Instruction.Texture &&
+ (fullinst->Texture.Texture == TGSI_TEXTURE_2D_MSAA ||
+ fullinst->Texture.Texture == TGSI_TEXTURE_2D_ARRAY_MSAA)) {
+ info->is_msaa_sampler[src->Register.Index] = TRUE;
+ }
+ }
+ }
+
+ /* check for indirect register writes */
+ for (i = 0; i < fullinst->Instruction.NumDstRegs; i++) {
+ const struct tgsi_full_dst_register *dst = &fullinst->Dst[i];
+ if (dst->Register.Indirect) {
+ info->indirect_files |= (1 << dst->Register.File);
+ }
+ }
+
+ info->num_instructions++;
+ }
+ break;
+
+ case TGSI_TOKEN_TYPE_DECLARATION:
+ {
+ const struct tgsi_full_declaration *fulldecl
+ = &parse.FullToken.FullDeclaration;
+ const uint file = fulldecl->Declaration.File;
+ uint reg;
+ for (reg = fulldecl->Range.First;
+ reg <= fulldecl->Range.Last;
+ reg++) {
+ unsigned semName = fulldecl->Semantic.Name;
+ unsigned semIndex = fulldecl->Semantic.Index;
+
+ /* only first 32 regs will appear in this bitfield */
+ info->file_mask[file] |= (1 << reg);
+ info->file_count[file]++;
+ info->file_max[file] = MAX2(info->file_max[file], (int)reg);
+
+ if (file == TGSI_FILE_INPUT) {
+ info->input_semantic_name[reg] = (ubyte) semName;
+ info->input_semantic_index[reg] = (ubyte) semIndex;
+ info->input_interpolate[reg] = (ubyte)fulldecl->Interp.Interpolate;
+ info->input_centroid[reg] = (ubyte)fulldecl->Interp.Centroid;
+ info->input_cylindrical_wrap[reg] = (ubyte)fulldecl->Interp.CylindricalWrap;
+ info->num_inputs++;
+
+ if (procType == TGSI_PROCESSOR_FRAGMENT) {
+ if (semName == TGSI_SEMANTIC_POSITION)
+ info->reads_position = TRUE;
+ else if (semName == TGSI_SEMANTIC_PRIMID)
+ info->uses_primid = TRUE;
+ else if (semName == TGSI_SEMANTIC_FACE)
+ info->uses_frontface = TRUE;
+ }
+ }
+ else if (file == TGSI_FILE_SYSTEM_VALUE) {
+ unsigned index = fulldecl->Range.First;
+
+ info->system_value_semantic_name[index] = semName;
+ info->num_system_values = MAX2(info->num_system_values,
+ index + 1);
+
+ if (semName == TGSI_SEMANTIC_INSTANCEID) {
+ info->uses_instanceid = TRUE;
+ }
+ else if (semName == TGSI_SEMANTIC_VERTEXID) {
+ info->uses_vertexid = TRUE;
+ }
+ else if (semName == TGSI_SEMANTIC_PRIMID) {
+ info->uses_primid = TRUE;
+ }
+ }
+ else if (file == TGSI_FILE_OUTPUT) {
+ info->output_semantic_name[reg] = (ubyte) semName;
+ info->output_semantic_index[reg] = (ubyte) semIndex;
+ info->num_outputs++;
+
+ if (procType == TGSI_PROCESSOR_VERTEX ||
+ procType == TGSI_PROCESSOR_GEOMETRY) {
+ if (semName == TGSI_SEMANTIC_CLIPDIST) {
+ info->num_written_clipdistance +=
+ util_bitcount(fulldecl->Declaration.UsageMask);
+ }
+ else if (semName == TGSI_SEMANTIC_CULLDIST) {
+ info->num_written_culldistance +=
+ util_bitcount(fulldecl->Declaration.UsageMask);
+ }
+ }
+
+ if (procType == TGSI_PROCESSOR_FRAGMENT) {
+ if (semName == TGSI_SEMANTIC_POSITION) {
+ info->writes_z = TRUE;
+ }
+ else if (semName == TGSI_SEMANTIC_STENCIL) {
+ info->writes_stencil = TRUE;
+ }
+ }
+
+ if (procType == TGSI_PROCESSOR_VERTEX) {
+ if (semName == TGSI_SEMANTIC_EDGEFLAG) {
+ info->writes_edgeflag = TRUE;
+ }
+ }
+
+ if (procType == TGSI_PROCESSOR_GEOMETRY) {
+ if (semName == TGSI_SEMANTIC_VIEWPORT_INDEX) {
+ info->writes_viewport_index = TRUE;
+ }
+ else if (semName == TGSI_SEMANTIC_LAYER) {
+ info->writes_layer = TRUE;
+ }
+ }
+ }
+ }
+ }
+ break;
+
+ case TGSI_TOKEN_TYPE_IMMEDIATE:
+ {
+ uint reg = info->immediate_count++;
+ uint file = TGSI_FILE_IMMEDIATE;
+
+ info->file_mask[file] |= (1 << reg);
+ info->file_count[file]++;
+ info->file_max[file] = MAX2(info->file_max[file], (int)reg);
+ }
+ break;
+
+ case TGSI_TOKEN_TYPE_PROPERTY:
+ {
+ const struct tgsi_full_property *fullprop
+ = &parse.FullToken.FullProperty;
+
+ info->properties[info->num_properties].name =
+ fullprop->Property.PropertyName;
+ memcpy(info->properties[info->num_properties].data,
+ fullprop->u, 8 * sizeof(unsigned));;
+
+ ++info->num_properties;
+ }
+ break;
+
+ default:
+ assert( 0 );
+ }
+ }
+
+ info->uses_kill = (info->opcode_count[TGSI_OPCODE_KILL_IF] ||
+ info->opcode_count[TGSI_OPCODE_KILL]);
+
+ /* extract simple properties */
+ for (i = 0; i < info->num_properties; ++i) {
+ switch (info->properties[i].name) {
+ case TGSI_PROPERTY_FS_COORD_ORIGIN:
+ info->origin_lower_left = info->properties[i].data[0];
+ break;
+ case TGSI_PROPERTY_FS_COORD_PIXEL_CENTER:
+ info->pixel_center_integer = info->properties[i].data[0];
+ break;
+ case TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS:
+ info->color0_writes_all_cbufs = info->properties[i].data[0];
+ break;
+ case TGSI_PROPERTY_GS_INPUT_PRIM:
+ /* The dimensions of the IN decleration in geometry shader have
+ * to be deduced from the type of the input primitive.
+ */
+ if (procType == TGSI_PROCESSOR_GEOMETRY) {
+ unsigned input_primitive = info->properties[i].data[0];
+ int num_verts = u_vertices_per_prim(input_primitive);
+ int j;
+ info->file_count[TGSI_FILE_INPUT] = num_verts;
+ info->file_max[TGSI_FILE_INPUT] =
+ MAX2(info->file_max[TGSI_FILE_INPUT], num_verts - 1);
+ for (j = 0; j < num_verts; ++j) {
+ info->file_mask[TGSI_FILE_INPUT] |= (1 << j);
+ }
+ }
+ break;
+ default:
+ ;
+ }
+ }
+
+ tgsi_parse_free (&parse);
+}
+
+
+
+/**
+ * Check if the given shader is a "passthrough" shader consisting of only
+ * MOV instructions of the form: MOV OUT[n], IN[n]
+ *
+ */
+boolean
+tgsi_is_passthrough_shader(const struct tgsi_token *tokens)
+{
+ struct tgsi_parse_context parse;
+
+ /**
+ ** Setup to begin parsing input shader
+ **/
+ if (tgsi_parse_init(&parse, tokens) != TGSI_PARSE_OK) {
+ debug_printf("tgsi_parse_init() failed in tgsi_is_passthrough_shader()!\n");
+ return FALSE;
+ }
+
+ /**
+ ** Loop over incoming program tokens/instructions
+ */
+ while (!tgsi_parse_end_of_tokens(&parse)) {
+
+ tgsi_parse_token(&parse);
+
+ switch (parse.FullToken.Token.Type) {
+ case TGSI_TOKEN_TYPE_INSTRUCTION:
+ {
+ struct tgsi_full_instruction *fullinst =
+ &parse.FullToken.FullInstruction;
+ const struct tgsi_full_src_register *src =
+ &fullinst->Src[0];
+ const struct tgsi_full_dst_register *dst =
+ &fullinst->Dst[0];
+
+ /* Do a whole bunch of checks for a simple move */
+ if (fullinst->Instruction.Opcode != TGSI_OPCODE_MOV ||
+ (src->Register.File != TGSI_FILE_INPUT &&
+ src->Register.File != TGSI_FILE_SYSTEM_VALUE) ||
+ dst->Register.File != TGSI_FILE_OUTPUT ||
+ src->Register.Index != dst->Register.Index ||
+
+ src->Register.Negate ||
+ src->Register.Absolute ||
+
+ src->Register.SwizzleX != TGSI_SWIZZLE_X ||
+ src->Register.SwizzleY != TGSI_SWIZZLE_Y ||
+ src->Register.SwizzleZ != TGSI_SWIZZLE_Z ||
+ src->Register.SwizzleW != TGSI_SWIZZLE_W ||
+
+ dst->Register.WriteMask != TGSI_WRITEMASK_XYZW)
+ {
+ tgsi_parse_free(&parse);
+ return FALSE;
+ }
+ }
+ break;
+
+ case TGSI_TOKEN_TYPE_DECLARATION:
+ /* fall-through */
+ case TGSI_TOKEN_TYPE_IMMEDIATE:
+ /* fall-through */
+ case TGSI_TOKEN_TYPE_PROPERTY:
+ /* fall-through */
+ default:
+ ; /* no-op */
+ }
+ }
+
+ tgsi_parse_free(&parse);
+
+ /* if we get here, it's a pass-through shader */
+ return TRUE;
+}
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_scan.h b/src/minigallium/auxiliary/tgsi/tgsi_scan.h
new file mode 100644
index 0000000..d9147bd
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_scan.h
@@ -0,0 +1,109 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef TGSI_SCAN_H
+#define TGSI_SCAN_H
+
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_state.h"
+#include "pipe/p_shader_tokens.h"
+
+/**
+ * Shader summary info
+ */
+struct tgsi_shader_info
+{
+ uint num_tokens;
+
+ ubyte num_inputs;
+ ubyte num_outputs;
+ ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS]; /**< TGSI_SEMANTIC_x */
+ ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS];
+ ubyte input_interpolate[PIPE_MAX_SHADER_INPUTS];
+ ubyte input_centroid[PIPE_MAX_SHADER_INPUTS];
+ ubyte input_usage_mask[PIPE_MAX_SHADER_INPUTS];
+ ubyte input_cylindrical_wrap[PIPE_MAX_SHADER_INPUTS];
+ ubyte output_semantic_name[PIPE_MAX_SHADER_OUTPUTS]; /**< TGSI_SEMANTIC_x */
+ ubyte output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
+
+ ubyte num_system_values;
+ ubyte system_value_semantic_name[PIPE_MAX_SHADER_INPUTS];
+
+ ubyte processor;
+
+ uint file_mask[TGSI_FILE_COUNT]; /**< bitmask of declared registers */
+ uint file_count[TGSI_FILE_COUNT]; /**< number of declared registers */
+ int file_max[TGSI_FILE_COUNT]; /**< highest index of declared registers */
+
+ uint immediate_count; /**< number of immediates declared */
+ uint num_instructions;
+
+ uint opcode_count[TGSI_OPCODE_LAST]; /**< opcode histogram */
+
+ boolean reads_position; /**< does fragment shader read position? */
+ boolean reads_z; /**< does fragment shader read depth? */
+ boolean writes_z; /**< does fragment shader write Z value? */
+ boolean writes_stencil; /**< does fragment shader write stencil value? */
+ boolean writes_edgeflag; /**< vertex shader outputs edgeflag */
+ boolean uses_kill; /**< KILL or KILL_IF instruction used? */
+ boolean uses_instanceid;
+ boolean uses_vertexid;
+ boolean uses_primid;
+ boolean uses_frontface;
+ boolean origin_lower_left;
+ boolean pixel_center_integer;
+ boolean color0_writes_all_cbufs;
+ boolean writes_viewport_index;
+ boolean writes_layer;
+ boolean is_msaa_sampler[PIPE_MAX_SAMPLERS];
+
+ unsigned num_written_culldistance;
+ unsigned num_written_clipdistance;
+ /**
+ * Bitmask indicating which register files are accessed with
+ * indirect addressing. The bits are (1 << TGSI_FILE_x), etc.
+ */
+ unsigned indirect_files;
+
+ struct {
+ unsigned name;
+ unsigned data[8];
+ } properties[TGSI_PROPERTY_COUNT];
+ uint num_properties;
+};
+
+extern void
+tgsi_scan_shader(const struct tgsi_token *tokens,
+ struct tgsi_shader_info *info);
+
+
+extern boolean
+tgsi_is_passthrough_shader(const struct tgsi_token *tokens);
+
+
+#endif /* TGSI_SCAN_H */
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_strings.c b/src/minigallium/auxiliary/tgsi/tgsi_strings.c
new file mode 100644
index 0000000..6f244e5
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_strings.c
@@ -0,0 +1,201 @@
+/**************************************************************************
+ *
+ * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2012 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#include "pipe/p_compiler.h"
+#include "util/u_memory.h"
+#include "tgsi_strings.h"
+
+
+const char *tgsi_processor_type_names[4] =
+{
+ "FRAG",
+ "VERT",
+ "GEOM",
+ "COMP"
+};
+
+static const char *tgsi_file_names[] =
+{
+ "NULL",
+ "CONST",
+ "IN",
+ "OUT",
+ "TEMP",
+ "SAMP",
+ "ADDR",
+ "IMM",
+ "PRED",
+ "SV",
+ "RES",
+ "SVIEW"
+};
+
+const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT] =
+{
+ "POSITION",
+ "COLOR",
+ "BCOLOR",
+ "FOG",
+ "PSIZE",
+ "GENERIC",
+ "NORMAL",
+ "FACE",
+ "EDGEFLAG",
+ "PRIM_ID",
+ "INSTANCEID",
+ "VERTEXID",
+ "STENCIL",
+ "CLIPDIST",
+ "CLIPVERTEX",
+ "GRID_SIZE",
+ "BLOCK_ID",
+ "BLOCK_SIZE",
+ "THREAD_ID",
+ "TEXCOORD",
+ "PCOORD",
+ "VIEWPORT_INDEX",
+ "LAYER",
+ "CULLDIST"
+};
+
+const char *tgsi_texture_names[TGSI_TEXTURE_COUNT] =
+{
+ "BUFFER",
+ "1D",
+ "2D",
+ "3D",
+ "CUBE",
+ "RECT",
+ "SHADOW1D",
+ "SHADOW2D",
+ "SHADOWRECT",
+ "1D_ARRAY",
+ "2D_ARRAY",
+ "SHADOW1D_ARRAY",
+ "SHADOW2D_ARRAY",
+ "SHADOWCUBE",
+ "2D_MSAA",
+ "2D_ARRAY_MSAA",
+ "CUBEARRAY",
+ "SHADOWCUBEARRAY",
+ "UNKNOWN",
+};
+
+const char *tgsi_property_names[TGSI_PROPERTY_COUNT] =
+{
+ "GS_INPUT_PRIMITIVE",
+ "GS_OUTPUT_PRIMITIVE",
+ "GS_MAX_OUTPUT_VERTICES",
+ "FS_COORD_ORIGIN",
+ "FS_COORD_PIXEL_CENTER",
+ "FS_COLOR0_WRITES_ALL_CBUFS",
+ "FS_DEPTH_LAYOUT",
+ "VS_PROHIBIT_UCPS"
+};
+
+const char *tgsi_type_names[5] =
+{
+ "UNORM",
+ "SNORM",
+ "SINT",
+ "UINT",
+ "FLOAT"
+};
+
+const char *tgsi_interpolate_names[TGSI_INTERPOLATE_COUNT] =
+{
+ "CONSTANT",
+ "LINEAR",
+ "PERSPECTIVE",
+ "COLOR"
+};
+
+const char *tgsi_primitive_names[PIPE_PRIM_MAX] =
+{
+ "POINTS",
+ "LINES",
+ "LINE_LOOP",
+ "LINE_STRIP",
+ "TRIANGLES",
+ "TRIANGLE_STRIP",
+ "TRIANGLE_FAN",
+ "QUADS",
+ "QUAD_STRIP",
+ "POLYGON",
+ "LINES_ADJACENCY",
+ "LINE_STRIP_ADJACENCY",
+ "TRIANGLES_ADJACENCY",
+ "TRIANGLE_STRIP_ADJACENCY"
+};
+
+const char *tgsi_fs_coord_origin_names[2] =
+{
+ "UPPER_LEFT",
+ "LOWER_LEFT"
+};
+
+const char *tgsi_fs_coord_pixel_center_names[2] =
+{
+ "HALF_INTEGER",
+ "INTEGER"
+};
+
+const char *tgsi_immediate_type_names[3] =
+{
+ "FLT32",
+ "UINT32",
+ "INT32"
+};
+
+
+static INLINE void
+tgsi_strings_check(void)
+{
+ STATIC_ASSERT(Elements(tgsi_semantic_names) == TGSI_SEMANTIC_COUNT);
+ STATIC_ASSERT(Elements(tgsi_texture_names) == TGSI_TEXTURE_COUNT);
+ STATIC_ASSERT(Elements(tgsi_property_names) == TGSI_PROPERTY_COUNT);
+ STATIC_ASSERT(Elements(tgsi_primitive_names) == PIPE_PRIM_MAX);
+ STATIC_ASSERT(Elements(tgsi_interpolate_names) == TGSI_INTERPOLATE_COUNT);
+ (void) tgsi_processor_type_names;
+ (void) tgsi_type_names;
+ (void) tgsi_immediate_type_names;
+ (void) tgsi_fs_coord_origin_names;
+ (void) tgsi_fs_coord_pixel_center_names;
+}
+
+
+const char *
+tgsi_file_name(unsigned file)
+{
+ STATIC_ASSERT(Elements(tgsi_file_names) == TGSI_FILE_COUNT);
+ if (file < Elements(tgsi_file_names))
+ return tgsi_file_names[file];
+ else
+ return "invalid file";
+}
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_strings.h b/src/minigallium/auxiliary/tgsi/tgsi_strings.h
new file mode 100644
index 0000000..4357646
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_strings.h
@@ -0,0 +1,71 @@
+/**************************************************************************
+ *
+ * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2012 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef TGSI_STRINGS_H
+#define TGSI_STRINGS_H
+
+#include "pipe/p_shader_tokens.h"
+#include "pipe/p_state.h"
+
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+
+extern const char *tgsi_processor_type_names[4];
+
+extern const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT];
+
+extern const char *tgsi_texture_names[TGSI_TEXTURE_COUNT];
+
+extern const char *tgsi_property_names[TGSI_PROPERTY_COUNT];
+
+extern const char *tgsi_type_names[5];
+
+extern const char *tgsi_interpolate_names[TGSI_INTERPOLATE_COUNT];
+
+extern const char *tgsi_primitive_names[PIPE_PRIM_MAX];
+
+extern const char *tgsi_fs_coord_origin_names[2];
+
+extern const char *tgsi_fs_coord_pixel_center_names[2];
+
+extern const char *tgsi_immediate_type_names[3];
+
+
+const char *
+tgsi_file_name(unsigned file);
+
+
+#if defined __cplusplus
+}
+#endif
+
+
+#endif /* TGSI_STRINGS_H */
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_text.c b/src/minigallium/auxiliary/tgsi/tgsi_text.c
new file mode 100644
index 0000000..4c5ae4f
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_text.c
@@ -0,0 +1,1591 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "util/u_debug.h"
+#include "util/u_memory.h"
+#include "util/u_prim.h"
+#include "pipe/p_defines.h"
+#include "util/u_inlines.h"
+#include "tgsi_text.h"
+#include "tgsi_build.h"
+#include "tgsi_info.h"
+#include "tgsi_parse.h"
+#include "tgsi_sanity.h"
+#include "tgsi_strings.h"
+#include "tgsi_util.h"
+#include "tgsi_dump.h"
+
+static boolean is_alpha_underscore( const char *cur )
+{
+ return
+ (*cur >= 'a' && *cur <= 'z') ||
+ (*cur >= 'A' && *cur <= 'Z') ||
+ *cur == '_';
+}
+
+static boolean is_digit( const char *cur )
+{
+ return *cur >= '0' && *cur <= '9';
+}
+
+static boolean is_digit_alpha_underscore( const char *cur )
+{
+ return is_digit( cur ) || is_alpha_underscore( cur );
+}
+
+static char uprcase( char c )
+{
+ if (c >= 'a' && c <= 'z')
+ return c + 'A' - 'a';
+ return c;
+}
+
+/*
+ * Ignore case of str1 and assume str1 is already uppercase.
+ * Return TRUE iff str1 and str2 are equal.
+ */
+static int
+streq_nocase_uprcase(const char *str1,
+ const char *str2)
+{
+ while (*str1 && *str2) {
+ if (*str1 != uprcase(*str2))
+ return FALSE;
+ str1++;
+ str2++;
+ }
+ return *str1 == 0 && *str2 == 0;
+}
+
+/* Return TRUE if both strings match.
+ * The second string is terminated by zero.
+ * The pointer to the first string is moved at end of the read word
+ * on success.
+ */
+static boolean str_match_no_case( const char **pcur, const char *str )
+{
+ const char *cur = *pcur;
+
+ while (*str != '\0' && *str == uprcase( *cur )) {
+ str++;
+ cur++;
+ }
+ if (*str == '\0') {
+ *pcur = cur;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/* Return TRUE if both strings match.
+ * The first string is be terminated by a non-digit non-letter non-underscore
+ * character, the second string is terminated by zero.
+ * The pointer to the first string is moved at end of the read word
+ * on success.
+ */
+static boolean str_match_nocase_whole( const char **pcur, const char *str )
+{
+ const char *cur = *pcur;
+
+ if (str_match_no_case(&cur, str) &&
+ !is_digit_alpha_underscore(cur)) {
+ *pcur = cur;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/* Eat zero or more whitespaces.
+ */
+static void eat_opt_white( const char **pcur )
+{
+ while (**pcur == ' ' || **pcur == '\t' || **pcur == '\n')
+ (*pcur)++;
+}
+
+/* Eat one or more whitespaces.
+ * Return TRUE if at least one whitespace eaten.
+ */
+static boolean eat_white( const char **pcur )
+{
+ const char *cur = *pcur;
+
+ eat_opt_white( pcur );
+ return *pcur > cur;
+}
+
+/* Parse unsigned integer.
+ * No checks for overflow.
+ */
+static boolean parse_uint( const char **pcur, uint *val )
+{
+ const char *cur = *pcur;
+
+ if (is_digit( cur )) {
+ *val = *cur++ - '0';
+ while (is_digit( cur ))
+ *val = *val * 10 + *cur++ - '0';
+ *pcur = cur;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static boolean parse_int( const char **pcur, int *val )
+{
+ const char *cur = *pcur;
+ int sign = (*cur == '-' ? -1 : 1);
+
+ if (*cur == '+' || *cur == '-')
+ cur++;
+
+ if (parse_uint(&cur, (uint *)val)) {
+ *val *= sign;
+ *pcur = cur;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static boolean parse_identifier( const char **pcur, char *ret )
+{
+ const char *cur = *pcur;
+ int i = 0;
+ if (is_alpha_underscore( cur )) {
+ ret[i++] = *cur++;
+ while (is_alpha_underscore( cur ) || is_digit( cur ))
+ ret[i++] = *cur++;
+ ret[i++] = '\0';
+ *pcur = cur;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/* Parse floating point.
+ */
+static boolean parse_float( const char **pcur, float *val )
+{
+ const char *cur = *pcur;
+ boolean integral_part = FALSE;
+ boolean fractional_part = FALSE;
+
+ *val = (float) atof( cur );
+
+ if (*cur == '-' || *cur == '+')
+ cur++;
+ if (is_digit( cur )) {
+ cur++;
+ integral_part = TRUE;
+ while (is_digit( cur ))
+ cur++;
+ }
+ if (*cur == '.') {
+ cur++;
+ if (is_digit( cur )) {
+ cur++;
+ fractional_part = TRUE;
+ while (is_digit( cur ))
+ cur++;
+ }
+ }
+ if (!integral_part && !fractional_part)
+ return FALSE;
+ if (uprcase( *cur ) == 'E') {
+ cur++;
+ if (*cur == '-' || *cur == '+')
+ cur++;
+ if (is_digit( cur )) {
+ cur++;
+ while (is_digit( cur ))
+ cur++;
+ }
+ else
+ return FALSE;
+ }
+ *pcur = cur;
+ return TRUE;
+}
+
+struct translate_ctx
+{
+ const char *text;
+ const char *cur;
+ struct tgsi_token *tokens;
+ struct tgsi_token *tokens_cur;
+ struct tgsi_token *tokens_end;
+ struct tgsi_header *header;
+ unsigned processor : 4;
+ int implied_array_size : 5;
+ unsigned num_immediates;
+};
+
+static void report_error( struct translate_ctx *ctx, const char *msg )
+{
+ int line = 1;
+ int column = 1;
+ const char *itr = ctx->text;
+
+ while (itr != ctx->cur) {
+ if (*itr == '\n') {
+ column = 1;
+ ++line;
+ }
+ ++column;
+ ++itr;
+ }
+
+ debug_printf( "\nTGSI asm error: %s [%d : %d] \n", msg, line, column );
+}
+
+/* Parse shader header.
+ * Return TRUE for one of the following headers.
+ * FRAG
+ * GEOM
+ * VERT
+ */
+static boolean parse_header( struct translate_ctx *ctx )
+{
+ uint processor;
+
+ if (str_match_nocase_whole( &ctx->cur, "FRAG" ))
+ processor = TGSI_PROCESSOR_FRAGMENT;
+ else if (str_match_nocase_whole( &ctx->cur, "VERT" ))
+ processor = TGSI_PROCESSOR_VERTEX;
+ else if (str_match_nocase_whole( &ctx->cur, "GEOM" ))
+ processor = TGSI_PROCESSOR_GEOMETRY;
+ else if (str_match_nocase_whole( &ctx->cur, "COMP" ))
+ processor = TGSI_PROCESSOR_COMPUTE;
+ else {
+ report_error( ctx, "Unknown header" );
+ return FALSE;
+ }
+
+ if (ctx->tokens_cur >= ctx->tokens_end)
+ return FALSE;
+ ctx->header = (struct tgsi_header *) ctx->tokens_cur++;
+ *ctx->header = tgsi_build_header();
+
+ if (ctx->tokens_cur >= ctx->tokens_end)
+ return FALSE;
+ *(struct tgsi_processor *) ctx->tokens_cur++ = tgsi_build_processor( processor, ctx->header );
+ ctx->processor = processor;
+
+ return TRUE;
+}
+
+static boolean parse_label( struct translate_ctx *ctx, uint *val )
+{
+ const char *cur = ctx->cur;
+
+ if (parse_uint( &cur, val )) {
+ eat_opt_white( &cur );
+ if (*cur == ':') {
+ cur++;
+ ctx->cur = cur;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static boolean
+parse_file( const char **pcur, uint *file )
+{
+ uint i;
+
+ for (i = 0; i < TGSI_FILE_COUNT; i++) {
+ const char *cur = *pcur;
+
+ if (str_match_nocase_whole( &cur, tgsi_file_name(i) )) {
+ *pcur = cur;
+ *file = i;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static boolean
+parse_opt_writemask(
+ struct translate_ctx *ctx,
+ uint *writemask )
+{
+ const char *cur;
+
+ cur = ctx->cur;
+ eat_opt_white( &cur );
+ if (*cur == '.') {
+ cur++;
+ *writemask = TGSI_WRITEMASK_NONE;
+ eat_opt_white( &cur );
+ if (uprcase( *cur ) == 'X') {
+ cur++;
+ *writemask |= TGSI_WRITEMASK_X;
+ }
+ if (uprcase( *cur ) == 'Y') {
+ cur++;
+ *writemask |= TGSI_WRITEMASK_Y;
+ }
+ if (uprcase( *cur ) == 'Z') {
+ cur++;
+ *writemask |= TGSI_WRITEMASK_Z;
+ }
+ if (uprcase( *cur ) == 'W') {
+ cur++;
+ *writemask |= TGSI_WRITEMASK_W;
+ }
+
+ if (*writemask == TGSI_WRITEMASK_NONE) {
+ report_error( ctx, "Writemask expected" );
+ return FALSE;
+ }
+
+ ctx->cur = cur;
+ }
+ else {
+ *writemask = TGSI_WRITEMASK_XYZW;
+ }
+ return TRUE;
+}
+
+
+/* <register_file_bracket> ::= <file> `['
+ */
+static boolean
+parse_register_file_bracket(
+ struct translate_ctx *ctx,
+ uint *file )
+{
+ if (!parse_file( &ctx->cur, file )) {
+ report_error( ctx, "Unknown register file" );
+ return FALSE;
+ }
+ eat_opt_white( &ctx->cur );
+ if (*ctx->cur != '[') {
+ report_error( ctx, "Expected `['" );
+ return FALSE;
+ }
+ ctx->cur++;
+ return TRUE;
+}
+
+/* <register_file_bracket_index> ::= <register_file_bracket> <uint>
+ */
+static boolean
+parse_register_file_bracket_index(
+ struct translate_ctx *ctx,
+ uint *file,
+ int *index )
+{
+ uint uindex;
+
+ if (!parse_register_file_bracket( ctx, file ))
+ return FALSE;
+ eat_opt_white( &ctx->cur );
+ if (!parse_uint( &ctx->cur, &uindex )) {
+ report_error( ctx, "Expected literal unsigned integer" );
+ return FALSE;
+ }
+ *index = (int) uindex;
+ return TRUE;
+}
+
+/* Parse simple 1d register operand.
+ * <register_dst> ::= <register_file_bracket_index> `]'
+ */
+static boolean
+parse_register_1d(struct translate_ctx *ctx,
+ uint *file,
+ int *index )
+{
+ if (!parse_register_file_bracket_index( ctx, file, index ))
+ return FALSE;
+ eat_opt_white( &ctx->cur );
+ if (*ctx->cur != ']') {
+ report_error( ctx, "Expected `]'" );
+ return FALSE;
+ }
+ ctx->cur++;
+ return TRUE;
+}
+
+struct parsed_bracket {
+ int index;
+
+ uint ind_file;
+ int ind_index;
+ uint ind_comp;
+ uint ind_array;
+};
+
+
+static boolean
+parse_register_bracket(
+ struct translate_ctx *ctx,
+ struct parsed_bracket *brackets)
+{
+ const char *cur;
+ uint uindex;
+
+ memset(brackets, 0, sizeof(struct parsed_bracket));
+
+ eat_opt_white( &ctx->cur );
+
+ cur = ctx->cur;
+ if (parse_file( &cur, &brackets->ind_file )) {
+ if (!parse_register_1d( ctx, &brackets->ind_file,
+ &brackets->ind_index ))
+ return FALSE;
+ eat_opt_white( &ctx->cur );
+
+ if (*ctx->cur == '.') {
+ ctx->cur++;
+ eat_opt_white(&ctx->cur);
+
+ switch (uprcase(*ctx->cur)) {
+ case 'X':
+ brackets->ind_comp = TGSI_SWIZZLE_X;
+ break;
+ case 'Y':
+ brackets->ind_comp = TGSI_SWIZZLE_Y;
+ break;
+ case 'Z':
+ brackets->ind_comp = TGSI_SWIZZLE_Z;
+ break;
+ case 'W':
+ brackets->ind_comp = TGSI_SWIZZLE_W;
+ break;
+ default:
+ report_error(ctx, "Expected indirect register swizzle component `x', `y', `z' or `w'");
+ return FALSE;
+ }
+ ctx->cur++;
+ eat_opt_white(&ctx->cur);
+ }
+
+ if (*ctx->cur == '+' || *ctx->cur == '-')
+ parse_int( &ctx->cur, &brackets->index );
+ else
+ brackets->index = 0;
+ }
+ else {
+ if (!parse_uint( &ctx->cur, &uindex )) {
+ report_error( ctx, "Expected literal unsigned integer" );
+ return FALSE;
+ }
+ brackets->index = (int) uindex;
+ brackets->ind_file = TGSI_FILE_NULL;
+ brackets->ind_index = 0;
+ }
+ eat_opt_white( &ctx->cur );
+ if (*ctx->cur != ']') {
+ report_error( ctx, "Expected `]'" );
+ return FALSE;
+ }
+ ctx->cur++;
+ if (*ctx->cur == '(') {
+ ctx->cur++;
+ eat_opt_white( &ctx->cur );
+ if (!parse_uint( &ctx->cur, &brackets->ind_array )) {
+ report_error( ctx, "Expected literal unsigned integer" );
+ return FALSE;
+ }
+ eat_opt_white( &ctx->cur );
+ if (*ctx->cur != ')') {
+ report_error( ctx, "Expected `)'" );
+ return FALSE;
+ }
+ ctx->cur++;
+ }
+ return TRUE;
+}
+
+static boolean
+parse_opt_register_src_bracket(
+ struct translate_ctx *ctx,
+ struct parsed_bracket *brackets,
+ int *parsed_brackets)
+{
+ const char *cur = ctx->cur;
+
+ *parsed_brackets = 0;
+
+ eat_opt_white( &cur );
+ if (cur[0] == '[') {
+ ++cur;
+ ctx->cur = cur;
+
+ if (!parse_register_bracket(ctx, brackets))
+ return FALSE;
+
+ *parsed_brackets = 1;
+ }
+
+ return TRUE;
+}
+
+
+/* Parse source register operand.
+ * <register_src> ::= <register_file_bracket_index> `]' |
+ * <register_file_bracket> <register_dst> [`.' (`x' | `y' | `z' | `w')] `]' |
+ * <register_file_bracket> <register_dst> [`.' (`x' | `y' | `z' | `w')] `+' <uint> `]' |
+ * <register_file_bracket> <register_dst> [`.' (`x' | `y' | `z' | `w')] `-' <uint> `]'
+ */
+static boolean
+parse_register_src(
+ struct translate_ctx *ctx,
+ uint *file,
+ struct parsed_bracket *brackets)
+{
+ brackets->ind_comp = TGSI_SWIZZLE_X;
+ if (!parse_register_file_bracket( ctx, file ))
+ return FALSE;
+ if (!parse_register_bracket( ctx, brackets ))
+ return FALSE;
+
+ return TRUE;
+}
+
+struct parsed_dcl_bracket {
+ uint first;
+ uint last;
+};
+
+static boolean
+parse_register_dcl_bracket(
+ struct translate_ctx *ctx,
+ struct parsed_dcl_bracket *bracket)
+{
+ uint uindex;
+ memset(bracket, 0, sizeof(struct parsed_dcl_bracket));
+
+ eat_opt_white( &ctx->cur );
+
+ if (!parse_uint( &ctx->cur, &uindex )) {
+ /* it can be an empty bracket [] which means its range
+ * is from 0 to some implied size */
+ if (ctx->cur[0] == ']' && ctx->implied_array_size != 0) {
+ bracket->first = 0;
+ bracket->last = ctx->implied_array_size - 1;
+ goto cleanup;
+ }
+ report_error( ctx, "Expected literal unsigned integer" );
+ return FALSE;
+ }
+ bracket->first = uindex;
+
+ eat_opt_white( &ctx->cur );
+
+ if (ctx->cur[0] == '.' && ctx->cur[1] == '.') {
+ uint uindex;
+
+ ctx->cur += 2;
+ eat_opt_white( &ctx->cur );
+ if (!parse_uint( &ctx->cur, &uindex )) {
+ report_error( ctx, "Expected literal integer" );
+ return FALSE;
+ }
+ bracket->last = (int) uindex;
+ eat_opt_white( &ctx->cur );
+ }
+ else {
+ bracket->last = bracket->first;
+ }
+
+cleanup:
+ if (*ctx->cur != ']') {
+ report_error( ctx, "Expected `]' or `..'" );
+ return FALSE;
+ }
+ ctx->cur++;
+ return TRUE;
+}
+
+/* Parse register declaration.
+ * <register_dcl> ::= <register_file_bracket_index> `]' |
+ * <register_file_bracket_index> `..' <index> `]'
+ */
+static boolean
+parse_register_dcl(
+ struct translate_ctx *ctx,
+ uint *file,
+ struct parsed_dcl_bracket *brackets,
+ int *num_brackets)
+{
+ const char *cur;
+
+ *num_brackets = 0;
+
+ if (!parse_register_file_bracket( ctx, file ))
+ return FALSE;
+ if (!parse_register_dcl_bracket( ctx, &brackets[0] ))
+ return FALSE;
+
+ *num_brackets = 1;
+
+ cur = ctx->cur;
+ eat_opt_white( &cur );
+
+ if (cur[0] == '[') {
+ ++cur;
+ ctx->cur = cur;
+ if (!parse_register_dcl_bracket( ctx, &brackets[1] ))
+ return FALSE;
+ /* for geometry shader we don't really care about
+ * the first brackets it's always the size of the
+ * input primitive. so we want to declare just
+ * the index relevant to the semantics which is in
+ * the second bracket */
+ if (ctx->processor == TGSI_PROCESSOR_GEOMETRY && *file == TGSI_FILE_INPUT) {
+ brackets[0] = brackets[1];
+ *num_brackets = 1;
+ } else {
+ *num_brackets = 2;
+ }
+ }
+
+ return TRUE;
+}
+
+
+/* Parse destination register operand.*/
+static boolean
+parse_register_dst(
+ struct translate_ctx *ctx,
+ uint *file,
+ struct parsed_bracket *brackets)
+{
+ brackets->ind_comp = TGSI_SWIZZLE_X;
+ if (!parse_register_file_bracket( ctx, file ))
+ return FALSE;
+ if (!parse_register_bracket( ctx, brackets ))
+ return FALSE;
+
+ return TRUE;
+}
+
+static boolean
+parse_dst_operand(
+ struct translate_ctx *ctx,
+ struct tgsi_full_dst_register *dst )
+{
+ uint file;
+ uint writemask;
+ const char *cur;
+ struct parsed_bracket bracket[2];
+ int parsed_opt_brackets;
+
+ if (!parse_register_dst( ctx, &file, &bracket[0] ))
+ return FALSE;
+ if (!parse_opt_register_src_bracket(ctx, &bracket[1], &parsed_opt_brackets))
+ return FALSE;
+
+ cur = ctx->cur;
+ eat_opt_white( &cur );
+
+ if (!parse_opt_writemask( ctx, &writemask ))
+ return FALSE;
+
+ dst->Register.File = file;
+ if (parsed_opt_brackets) {
+ dst->Register.Dimension = 1;
+ dst->Dimension.Indirect = 0;
+ dst->Dimension.Dimension = 0;
+ dst->Dimension.Index = bracket[0].index;
+ bracket[0] = bracket[1];
+ }
+ dst->Register.Index = bracket[0].index;
+ dst->Register.WriteMask = writemask;
+ if (bracket[0].ind_file != TGSI_FILE_NULL) {
+ dst->Register.Indirect = 1;
+ dst->Indirect.File = bracket[0].ind_file;
+ dst->Indirect.Index = bracket[0].ind_index;
+ dst->Indirect.Swizzle = bracket[0].ind_comp;
+ dst->Indirect.ArrayID = bracket[0].ind_array;
+ }
+ return TRUE;
+}
+
+static boolean
+parse_optional_swizzle(
+ struct translate_ctx *ctx,
+ uint swizzle[4],
+ boolean *parsed_swizzle )
+{
+ const char *cur = ctx->cur;
+
+ *parsed_swizzle = FALSE;
+
+ eat_opt_white( &cur );
+ if (*cur == '.') {
+ uint i;
+
+ cur++;
+ eat_opt_white( &cur );
+ for (i = 0; i < 4; i++) {
+ if (uprcase( *cur ) == 'X')
+ swizzle[i] = TGSI_SWIZZLE_X;
+ else if (uprcase( *cur ) == 'Y')
+ swizzle[i] = TGSI_SWIZZLE_Y;
+ else if (uprcase( *cur ) == 'Z')
+ swizzle[i] = TGSI_SWIZZLE_Z;
+ else if (uprcase( *cur ) == 'W')
+ swizzle[i] = TGSI_SWIZZLE_W;
+ else {
+ report_error( ctx, "Expected register swizzle component `x', `y', `z' or `w'" );
+ return FALSE;
+ }
+ cur++;
+ }
+ *parsed_swizzle = TRUE;
+ ctx->cur = cur;
+ }
+ return TRUE;
+}
+
+static boolean
+parse_src_operand(
+ struct translate_ctx *ctx,
+ struct tgsi_full_src_register *src )
+{
+ uint file;
+ uint swizzle[4];
+ boolean parsed_swizzle;
+ struct parsed_bracket bracket[2];
+ int parsed_opt_brackets;
+
+ if (*ctx->cur == '-') {
+ ctx->cur++;
+ eat_opt_white( &ctx->cur );
+ src->Register.Negate = 1;
+ }
+
+ if (*ctx->cur == '|') {
+ ctx->cur++;
+ eat_opt_white( &ctx->cur );
+ src->Register.Absolute = 1;
+ }
+
+ if (!parse_register_src(ctx, &file, &bracket[0]))
+ return FALSE;
+ if (!parse_opt_register_src_bracket(ctx, &bracket[1], &parsed_opt_brackets))
+ return FALSE;
+
+ src->Register.File = file;
+ if (parsed_opt_brackets) {
+ src->Register.Dimension = 1;
+ src->Dimension.Indirect = 0;
+ src->Dimension.Dimension = 0;
+ src->Dimension.Index = bracket[0].index;
+ bracket[0] = bracket[1];
+ }
+ src->Register.Index = bracket[0].index;
+ if (bracket[0].ind_file != TGSI_FILE_NULL) {
+ src->Register.Indirect = 1;
+ src->Indirect.File = bracket[0].ind_file;
+ src->Indirect.Index = bracket[0].ind_index;
+ src->Indirect.Swizzle = bracket[0].ind_comp;
+ src->Indirect.ArrayID = bracket[0].ind_array;
+ }
+
+ /* Parse optional swizzle.
+ */
+ if (parse_optional_swizzle( ctx, swizzle, &parsed_swizzle )) {
+ if (parsed_swizzle) {
+ src->Register.SwizzleX = swizzle[0];
+ src->Register.SwizzleY = swizzle[1];
+ src->Register.SwizzleZ = swizzle[2];
+ src->Register.SwizzleW = swizzle[3];
+ }
+ }
+
+ if (src->Register.Absolute) {
+ eat_opt_white( &ctx->cur );
+ if (*ctx->cur != '|') {
+ report_error( ctx, "Expected `|'" );
+ return FALSE;
+ }
+ ctx->cur++;
+ }
+
+
+ return TRUE;
+}
+
+static boolean
+match_inst(const char **pcur,
+ unsigned *saturate,
+ const struct tgsi_opcode_info *info)
+{
+ const char *cur = *pcur;
+
+ /* simple case: the whole string matches the instruction name */
+ if (str_match_nocase_whole(&cur, info->mnemonic)) {
+ *pcur = cur;
+ *saturate = TGSI_SAT_NONE;
+ return TRUE;
+ }
+
+ if (str_match_no_case(&cur, info->mnemonic)) {
+ /* the instruction has a suffix, figure it out */
+ if (str_match_nocase_whole(&cur, "_SAT")) {
+ *pcur = cur;
+ *saturate = TGSI_SAT_ZERO_ONE;
+ return TRUE;
+ }
+
+ if (str_match_nocase_whole(&cur, "_SATNV")) {
+ *pcur = cur;
+ *saturate = TGSI_SAT_MINUS_PLUS_ONE;
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+static boolean
+parse_instruction(
+ struct translate_ctx *ctx,
+ boolean has_label )
+{
+ uint i;
+ uint saturate = TGSI_SAT_NONE;
+ const struct tgsi_opcode_info *info;
+ struct tgsi_full_instruction inst;
+ const char *cur;
+ uint advance;
+
+ inst = tgsi_default_full_instruction();
+
+ /* Parse predicate.
+ */
+ eat_opt_white( &ctx->cur );
+ if (*ctx->cur == '(') {
+ uint file;
+ int index;
+ uint swizzle[4];
+ boolean parsed_swizzle;
+
+ inst.Instruction.Predicate = 1;
+
+ ctx->cur++;
+ if (*ctx->cur == '!') {
+ ctx->cur++;
+ inst.Predicate.Negate = 1;
+ }
+
+ if (!parse_register_1d( ctx, &file, &index ))
+ return FALSE;
+
+ if (parse_optional_swizzle( ctx, swizzle, &parsed_swizzle )) {
+ if (parsed_swizzle) {
+ inst.Predicate.SwizzleX = swizzle[0];
+ inst.Predicate.SwizzleY = swizzle[1];
+ inst.Predicate.SwizzleZ = swizzle[2];
+ inst.Predicate.SwizzleW = swizzle[3];
+ }
+ }
+
+ if (*ctx->cur != ')') {
+ report_error( ctx, "Expected `)'" );
+ return FALSE;
+ }
+
+ ctx->cur++;
+ }
+
+ /* Parse instruction name.
+ */
+ eat_opt_white( &ctx->cur );
+ for (i = 0; i < TGSI_OPCODE_LAST; i++) {
+ cur = ctx->cur;
+
+ info = tgsi_get_opcode_info( i );
+ if (match_inst(&cur, &saturate, info)) {
+ if (info->num_dst + info->num_src + info->is_tex == 0) {
+ ctx->cur = cur;
+ break;
+ }
+ else if (*cur == '\0' || eat_white( &cur )) {
+ ctx->cur = cur;
+ break;
+ }
+ }
+ }
+ if (i == TGSI_OPCODE_LAST) {
+ if (has_label)
+ report_error( ctx, "Unknown opcode" );
+ else
+ report_error( ctx, "Expected `DCL', `IMM' or a label" );
+ return FALSE;
+ }
+
+ inst.Instruction.Opcode = i;
+ inst.Instruction.Saturate = saturate;
+ inst.Instruction.NumDstRegs = info->num_dst;
+ inst.Instruction.NumSrcRegs = info->num_src;
+
+ if (i >= TGSI_OPCODE_SAMPLE && i <= TGSI_OPCODE_GATHER4) {
+ /*
+ * These are not considered tex opcodes here (no additional
+ * target argument) however we're required to set the Texture
+ * bit so we can set the number of tex offsets (offsets aren't
+ * actually handled here yet in any case).
+ */
+ inst.Instruction.Texture = 1;
+ inst.Texture.Texture = TGSI_TEXTURE_UNKNOWN;
+ }
+
+ /* Parse instruction operands.
+ */
+ for (i = 0; i < info->num_dst + info->num_src + info->is_tex; i++) {
+ if (i > 0) {
+ eat_opt_white( &ctx->cur );
+ if (*ctx->cur != ',') {
+ report_error( ctx, "Expected `,'" );
+ return FALSE;
+ }
+ ctx->cur++;
+ eat_opt_white( &ctx->cur );
+ }
+
+ if (i < info->num_dst) {
+ if (!parse_dst_operand( ctx, &inst.Dst[i] ))
+ return FALSE;
+ }
+ else if (i < info->num_dst + info->num_src) {
+ if (!parse_src_operand( ctx, &inst.Src[i - info->num_dst] ))
+ return FALSE;
+ }
+ else {
+ uint j;
+
+ for (j = 0; j < TGSI_TEXTURE_COUNT; j++) {
+ if (str_match_nocase_whole( &ctx->cur, tgsi_texture_names[j] )) {
+ inst.Instruction.Texture = 1;
+ inst.Texture.Texture = j;
+ break;
+ }
+ }
+ if (j == TGSI_TEXTURE_COUNT) {
+ report_error( ctx, "Expected texture target" );
+ return FALSE;
+ }
+ }
+ }
+
+ cur = ctx->cur;
+ eat_opt_white( &cur );
+ if (info->is_branch && *cur == ':') {
+ uint target;
+
+ cur++;
+ eat_opt_white( &cur );
+ if (!parse_uint( &cur, &target )) {
+ report_error( ctx, "Expected a label" );
+ return FALSE;
+ }
+ inst.Instruction.Label = 1;
+ inst.Label.Label = target;
+ ctx->cur = cur;
+ }
+
+ advance = tgsi_build_full_instruction(
+ &inst,
+ ctx->tokens_cur,
+ ctx->header,
+ (uint) (ctx->tokens_end - ctx->tokens_cur) );
+ if (advance == 0)
+ return FALSE;
+ ctx->tokens_cur += advance;
+
+ return TRUE;
+}
+
+/* parses a 4-touple of the form {x, y, z, w}
+ * where x, y, z, w are numbers */
+static boolean parse_immediate_data(struct translate_ctx *ctx, unsigned type,
+ union tgsi_immediate_data *values)
+{
+ unsigned i;
+ int ret;
+
+ eat_opt_white( &ctx->cur );
+ if (*ctx->cur != '{') {
+ report_error( ctx, "Expected `{'" );
+ return FALSE;
+ }
+ ctx->cur++;
+ for (i = 0; i < 4; i++) {
+ eat_opt_white( &ctx->cur );
+ if (i > 0) {
+ if (*ctx->cur != ',') {
+ report_error( ctx, "Expected `,'" );
+ return FALSE;
+ }
+ ctx->cur++;
+ eat_opt_white( &ctx->cur );
+ }
+
+ switch (type) {
+ case TGSI_IMM_FLOAT32:
+ ret = parse_float(&ctx->cur, &values[i].Float);
+ break;
+ case TGSI_IMM_UINT32:
+ ret = parse_uint(&ctx->cur, &values[i].Uint);
+ break;
+ case TGSI_IMM_INT32:
+ ret = parse_int(&ctx->cur, &values[i].Int);
+ break;
+ default:
+ assert(0);
+ ret = FALSE;
+ break;
+ }
+
+ if (!ret) {
+ report_error( ctx, "Expected immediate constant" );
+ return FALSE;
+ }
+ }
+ eat_opt_white( &ctx->cur );
+ if (*ctx->cur != '}') {
+ report_error( ctx, "Expected `}'" );
+ return FALSE;
+ }
+ ctx->cur++;
+
+ return TRUE;
+}
+
+static boolean parse_declaration( struct translate_ctx *ctx )
+{
+ struct tgsi_full_declaration decl;
+ uint file;
+ struct parsed_dcl_bracket brackets[2];
+ int num_brackets;
+ uint writemask;
+ const char *cur, *cur2;
+ uint advance;
+ boolean is_vs_input;
+
+ if (!eat_white( &ctx->cur )) {
+ report_error( ctx, "Syntax error" );
+ return FALSE;
+ }
+ if (!parse_register_dcl( ctx, &file, brackets, &num_brackets))
+ return FALSE;
+ if (!parse_opt_writemask( ctx, &writemask ))
+ return FALSE;
+
+ decl = tgsi_default_full_declaration();
+ decl.Declaration.File = file;
+ decl.Declaration.UsageMask = writemask;
+
+ if (num_brackets == 1) {
+ decl.Range.First = brackets[0].first;
+ decl.Range.Last = brackets[0].last;
+ } else {
+ decl.Range.First = brackets[1].first;
+ decl.Range.Last = brackets[1].last;
+
+ decl.Declaration.Dimension = 1;
+ decl.Dim.Index2D = brackets[0].first;
+ }
+
+ is_vs_input = (file == TGSI_FILE_INPUT &&
+ ctx->processor == TGSI_PROCESSOR_VERTEX);
+
+ cur = ctx->cur;
+ eat_opt_white( &cur );
+ if (*cur == ',') {
+ cur2 = cur;
+ cur2++;
+ eat_opt_white( &cur2 );
+ if (str_match_nocase_whole( &cur2, "ARRAY" )) {
+ int arrayid;
+ if (*cur2 != '(') {
+ report_error( ctx, "Expected `('" );
+ return FALSE;
+ }
+ cur2++;
+ eat_opt_white( &cur2 );
+ if (!parse_int( &cur2, &arrayid )) {
+ report_error( ctx, "Expected `,'" );
+ return FALSE;
+ }
+ eat_opt_white( &cur2 );
+ if (*cur2 != ')') {
+ report_error( ctx, "Expected `)'" );
+ return FALSE;
+ }
+ cur2++;
+ decl.Declaration.Array = 1;
+ decl.Array.ArrayID = arrayid;
+ ctx->cur = cur = cur2;
+ }
+ }
+
+ if (*cur == ',' && !is_vs_input) {
+ uint i, j;
+
+ cur++;
+ eat_opt_white( &cur );
+ if (file == TGSI_FILE_RESOURCE) {
+ for (i = 0; i < TGSI_TEXTURE_COUNT; i++) {
+ if (str_match_nocase_whole(&cur, tgsi_texture_names[i])) {
+ decl.Resource.Resource = i;
+ break;
+ }
+ }
+ if (i == TGSI_TEXTURE_COUNT) {
+ report_error(ctx, "Expected texture target");
+ return FALSE;
+ }
+
+ cur2 = cur;
+ eat_opt_white(&cur2);
+ while (*cur2 == ',') {
+ cur2++;
+ eat_opt_white(&cur2);
+ if (str_match_nocase_whole(&cur2, "RAW")) {
+ decl.Resource.Raw = 1;
+
+ } else if (str_match_nocase_whole(&cur2, "WR")) {
+ decl.Resource.Writable = 1;
+
+ } else {
+ break;
+ }
+ cur = cur2;
+ eat_opt_white(&cur2);
+ }
+
+ ctx->cur = cur;
+
+ } else if (file == TGSI_FILE_SAMPLER_VIEW) {
+ for (i = 0; i < TGSI_TEXTURE_COUNT; i++) {
+ if (str_match_nocase_whole(&cur, tgsi_texture_names[i])) {
+ decl.SamplerView.Resource = i;
+ break;
+ }
+ }
+ if (i == TGSI_TEXTURE_COUNT) {
+ report_error(ctx, "Expected texture target");
+ return FALSE;
+ }
+ eat_opt_white( &cur );
+ if (*cur != ',') {
+ report_error( ctx, "Expected `,'" );
+ return FALSE;
+ }
+ ++cur;
+ eat_opt_white( &cur );
+ for (j = 0; j < 4; ++j) {
+ for (i = 0; i < PIPE_TYPE_COUNT; ++i) {
+ if (str_match_nocase_whole(&cur, tgsi_type_names[i])) {
+ switch (j) {
+ case 0:
+ decl.SamplerView.ReturnTypeX = i;
+ break;
+ case 1:
+ decl.SamplerView.ReturnTypeY = i;
+ break;
+ case 2:
+ decl.SamplerView.ReturnTypeZ = i;
+ break;
+ case 3:
+ decl.SamplerView.ReturnTypeW = i;
+ break;
+ default:
+ assert(0);
+ }
+ break;
+ }
+ }
+ if (i == PIPE_TYPE_COUNT) {
+ if (j == 0 || j > 2) {
+ report_error(ctx, "Expected type name");
+ return FALSE;
+ }
+ break;
+ } else {
+ cur2 = cur;
+ eat_opt_white( &cur2 );
+ if (*cur2 == ',') {
+ cur2++;
+ eat_opt_white( &cur2 );
+ cur = cur2;
+ continue;
+ } else
+ break;
+ }
+ }
+ if (j < 4) {
+ decl.SamplerView.ReturnTypeY =
+ decl.SamplerView.ReturnTypeZ =
+ decl.SamplerView.ReturnTypeW =
+ decl.SamplerView.ReturnTypeX;
+ }
+ ctx->cur = cur;
+ } else {
+ if (str_match_nocase_whole(&cur, "LOCAL")) {
+ decl.Declaration.Local = 1;
+ ctx->cur = cur;
+ }
+
+ cur = ctx->cur;
+ eat_opt_white( &cur );
+ if (*cur == ',') {
+ cur++;
+ eat_opt_white( &cur );
+
+ for (i = 0; i < TGSI_SEMANTIC_COUNT; i++) {
+ if (str_match_nocase_whole(&cur, tgsi_semantic_names[i])) {
+ uint index;
+
+ cur2 = cur;
+ eat_opt_white( &cur2 );
+ if (*cur2 == '[') {
+ cur2++;
+ eat_opt_white( &cur2 );
+ if (!parse_uint( &cur2, &index )) {
+ report_error( ctx, "Expected literal integer" );
+ return FALSE;
+ }
+ eat_opt_white( &cur2 );
+ if (*cur2 != ']') {
+ report_error( ctx, "Expected `]'" );
+ return FALSE;
+ }
+ cur2++;
+
+ decl.Semantic.Index = index;
+
+ cur = cur2;
+ }
+
+ decl.Declaration.Semantic = 1;
+ decl.Semantic.Name = i;
+
+ ctx->cur = cur;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ cur = ctx->cur;
+ eat_opt_white( &cur );
+ if (*cur == ',' && !is_vs_input) {
+ uint i;
+
+ cur++;
+ eat_opt_white( &cur );
+ for (i = 0; i < TGSI_INTERPOLATE_COUNT; i++) {
+ if (str_match_nocase_whole( &cur, tgsi_interpolate_names[i] )) {
+ decl.Declaration.Interpolate = 1;
+ decl.Interp.Interpolate = i;
+
+ ctx->cur = cur;
+ break;
+ }
+ }
+ if (i == TGSI_INTERPOLATE_COUNT) {
+ report_error( ctx, "Expected semantic or interpolate attribute" );
+ return FALSE;
+ }
+ }
+
+ advance = tgsi_build_full_declaration(
+ &decl,
+ ctx->tokens_cur,
+ ctx->header,
+ (uint) (ctx->tokens_end - ctx->tokens_cur) );
+
+ if (advance == 0)
+ return FALSE;
+ ctx->tokens_cur += advance;
+
+ return TRUE;
+}
+
+static boolean parse_immediate( struct translate_ctx *ctx )
+{
+ struct tgsi_full_immediate imm;
+ uint advance;
+ int type;
+
+ if (*ctx->cur == '[') {
+ uint uindex;
+
+ ++ctx->cur;
+
+ eat_opt_white( &ctx->cur );
+ if (!parse_uint( &ctx->cur, &uindex )) {
+ report_error( ctx, "Expected literal unsigned integer" );
+ return FALSE;
+ }
+
+ if (uindex != ctx->num_immediates) {
+ report_error( ctx, "Immediates must be sorted" );
+ return FALSE;
+ }
+
+ eat_opt_white( &ctx->cur );
+ if (*ctx->cur != ']') {
+ report_error( ctx, "Expected `]'" );
+ return FALSE;
+ }
+
+ ctx->cur++;
+ }
+
+ if (!eat_white( &ctx->cur )) {
+ report_error( ctx, "Syntax error" );
+ return FALSE;
+ }
+ for (type = 0; type < Elements(tgsi_immediate_type_names); ++type) {
+ if (str_match_nocase_whole(&ctx->cur, tgsi_immediate_type_names[type]))
+ break;
+ }
+ if (type == Elements(tgsi_immediate_type_names)) {
+ report_error( ctx, "Expected immediate type" );
+ return FALSE;
+ }
+
+ imm = tgsi_default_full_immediate();
+ imm.Immediate.NrTokens += 4;
+ imm.Immediate.DataType = type;
+ parse_immediate_data(ctx, type, imm.u);
+
+ advance = tgsi_build_full_immediate(
+ &imm,
+ ctx->tokens_cur,
+ ctx->header,
+ (uint) (ctx->tokens_end - ctx->tokens_cur) );
+ if (advance == 0)
+ return FALSE;
+ ctx->tokens_cur += advance;
+
+ ctx->num_immediates++;
+
+ return TRUE;
+}
+
+static boolean
+parse_primitive( const char **pcur, uint *primitive )
+{
+ uint i;
+
+ for (i = 0; i < PIPE_PRIM_MAX; i++) {
+ const char *cur = *pcur;
+
+ if (str_match_nocase_whole( &cur, tgsi_primitive_names[i])) {
+ *primitive = i;
+ *pcur = cur;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static boolean
+parse_fs_coord_origin( const char **pcur, uint *fs_coord_origin )
+{
+ uint i;
+
+ for (i = 0; i < Elements(tgsi_fs_coord_origin_names); i++) {
+ const char *cur = *pcur;
+
+ if (str_match_nocase_whole( &cur, tgsi_fs_coord_origin_names[i])) {
+ *fs_coord_origin = i;
+ *pcur = cur;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static boolean
+parse_fs_coord_pixel_center( const char **pcur, uint *fs_coord_pixel_center )
+{
+ uint i;
+
+ for (i = 0; i < Elements(tgsi_fs_coord_pixel_center_names); i++) {
+ const char *cur = *pcur;
+
+ if (str_match_nocase_whole( &cur, tgsi_fs_coord_pixel_center_names[i])) {
+ *fs_coord_pixel_center = i;
+ *pcur = cur;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+
+static boolean parse_property( struct translate_ctx *ctx )
+{
+ struct tgsi_full_property prop;
+ uint property_name;
+ uint values[8];
+ uint advance;
+ char id[64];
+
+ if (!eat_white( &ctx->cur )) {
+ report_error( ctx, "Syntax error" );
+ return FALSE;
+ }
+ if (!parse_identifier( &ctx->cur, id )) {
+ report_error( ctx, "Syntax error" );
+ return FALSE;
+ }
+ for (property_name = 0; property_name < TGSI_PROPERTY_COUNT;
+ ++property_name) {
+ if (streq_nocase_uprcase(tgsi_property_names[property_name], id)) {
+ break;
+ }
+ }
+ if (property_name >= TGSI_PROPERTY_COUNT) {
+ debug_printf( "\nError: Unknown property : '%s'", id );
+ return FALSE;
+ }
+
+ eat_opt_white( &ctx->cur );
+ switch(property_name) {
+ case TGSI_PROPERTY_GS_INPUT_PRIM:
+ case TGSI_PROPERTY_GS_OUTPUT_PRIM:
+ if (!parse_primitive(&ctx->cur, &values[0] )) {
+ report_error( ctx, "Unknown primitive name as property!" );
+ return FALSE;
+ }
+ if (property_name == TGSI_PROPERTY_GS_INPUT_PRIM &&
+ ctx->processor == TGSI_PROCESSOR_GEOMETRY) {
+ ctx->implied_array_size = u_vertices_per_prim(values[0]);
+ }
+ break;
+ case TGSI_PROPERTY_FS_COORD_ORIGIN:
+ if (!parse_fs_coord_origin(&ctx->cur, &values[0] )) {
+ report_error( ctx, "Unknown coord origin as property: must be UPPER_LEFT or LOWER_LEFT!" );
+ return FALSE;
+ }
+ break;
+ case TGSI_PROPERTY_FS_COORD_PIXEL_CENTER:
+ if (!parse_fs_coord_pixel_center(&ctx->cur, &values[0] )) {
+ report_error( ctx, "Unknown coord pixel center as property: must be HALF_INTEGER or INTEGER!" );
+ return FALSE;
+ }
+ break;
+ case TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS:
+ default:
+ if (!parse_uint(&ctx->cur, &values[0] )) {
+ report_error( ctx, "Expected unsigned integer as property!" );
+ return FALSE;
+ }
+ }
+
+ prop = tgsi_default_full_property();
+ prop.Property.PropertyName = property_name;
+ prop.Property.NrTokens += 1;
+ prop.u[0].Data = values[0];
+
+ advance = tgsi_build_full_property(
+ &prop,
+ ctx->tokens_cur,
+ ctx->header,
+ (uint) (ctx->tokens_end - ctx->tokens_cur) );
+ if (advance == 0)
+ return FALSE;
+ ctx->tokens_cur += advance;
+
+ return TRUE;
+}
+
+
+static boolean translate( struct translate_ctx *ctx )
+{
+ eat_opt_white( &ctx->cur );
+ if (!parse_header( ctx ))
+ return FALSE;
+
+ while (*ctx->cur != '\0') {
+ uint label_val = 0;
+ if (!eat_white( &ctx->cur )) {
+ report_error( ctx, "Syntax error" );
+ return FALSE;
+ }
+
+ if (*ctx->cur == '\0')
+ break;
+ if (parse_label( ctx, &label_val )) {
+ if (!parse_instruction( ctx, TRUE ))
+ return FALSE;
+ }
+ else if (str_match_nocase_whole( &ctx->cur, "DCL" )) {
+ if (!parse_declaration( ctx ))
+ return FALSE;
+ }
+ else if (str_match_nocase_whole( &ctx->cur, "IMM" )) {
+ if (!parse_immediate( ctx ))
+ return FALSE;
+ }
+ else if (str_match_nocase_whole( &ctx->cur, "PROPERTY" )) {
+ if (!parse_property( ctx ))
+ return FALSE;
+ }
+ else if (!parse_instruction( ctx, FALSE )) {
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+boolean
+tgsi_text_translate(
+ const char *text,
+ struct tgsi_token *tokens,
+ uint num_tokens )
+{
+ struct translate_ctx ctx = {0};
+
+ ctx.text = text;
+ ctx.cur = text;
+ ctx.tokens = tokens;
+ ctx.tokens_cur = tokens;
+ ctx.tokens_end = tokens + num_tokens;
+
+ if (!translate( &ctx ))
+ return FALSE;
+
+ return tgsi_sanity_check( tokens );
+}
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_text.h b/src/minigallium/auxiliary/tgsi/tgsi_text.h
new file mode 100644
index 0000000..5fe53cf
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_text.h
@@ -0,0 +1,49 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef TGSI_TEXT_H
+#define TGSI_TEXT_H
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+#include "pipe/p_compiler.h"
+
+struct tgsi_token;
+
+boolean
+tgsi_text_translate(
+ const char *text,
+ struct tgsi_token *tokens,
+ uint num_tokens );
+
+#if defined __cplusplus
+}
+#endif
+
+#endif /* TGSI_TEXT_H */
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_transform.c b/src/minigallium/auxiliary/tgsi/tgsi_transform.c
new file mode 100644
index 0000000..ae875f2
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_transform.c
@@ -0,0 +1,250 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * TGSI program transformation utility.
+ *
+ * Authors: Brian Paul
+ */
+
+#include "util/u_debug.h"
+
+#include "tgsi_transform.h"
+
+
+
+static void
+emit_instruction(struct tgsi_transform_context *ctx,
+ const struct tgsi_full_instruction *inst)
+{
+ uint ti = ctx->ti;
+
+ ti += tgsi_build_full_instruction(inst,
+ ctx->tokens_out + ti,
+ ctx->header,
+ ctx->max_tokens_out - ti);
+ ctx->ti = ti;
+}
+
+
+static void
+emit_declaration(struct tgsi_transform_context *ctx,
+ const struct tgsi_full_declaration *decl)
+{
+ uint ti = ctx->ti;
+
+ ti += tgsi_build_full_declaration(decl,
+ ctx->tokens_out + ti,
+ ctx->header,
+ ctx->max_tokens_out - ti);
+ ctx->ti = ti;
+}
+
+
+static void
+emit_immediate(struct tgsi_transform_context *ctx,
+ const struct tgsi_full_immediate *imm)
+{
+ uint ti = ctx->ti;
+
+ ti += tgsi_build_full_immediate(imm,
+ ctx->tokens_out + ti,
+ ctx->header,
+ ctx->max_tokens_out - ti);
+ ctx->ti = ti;
+}
+
+
+static void
+emit_property(struct tgsi_transform_context *ctx,
+ const struct tgsi_full_property *prop)
+{
+ uint ti = ctx->ti;
+
+ ti += tgsi_build_full_property(prop,
+ ctx->tokens_out + ti,
+ ctx->header,
+ ctx->max_tokens_out - ti);
+ ctx->ti = ti;
+}
+
+
+/**
+ * Apply user-defined transformations to the input shader to produce
+ * the output shader.
+ * For example, a register search-and-replace operation could be applied
+ * by defining a transform_instruction() callback that examined and changed
+ * the instruction src/dest regs.
+ *
+ * \return number of tokens emitted
+ */
+int
+tgsi_transform_shader(const struct tgsi_token *tokens_in,
+ struct tgsi_token *tokens_out,
+ uint max_tokens_out,
+ struct tgsi_transform_context *ctx)
+{
+ uint procType;
+
+ /* input shader */
+ struct tgsi_parse_context parse;
+
+ /* output shader */
+ struct tgsi_processor *processor;
+
+
+ /**
+ ** callback context init
+ **/
+ ctx->emit_instruction = emit_instruction;
+ ctx->emit_declaration = emit_declaration;
+ ctx->emit_immediate = emit_immediate;
+ ctx->emit_property = emit_property;
+ ctx->tokens_out = tokens_out;
+ ctx->max_tokens_out = max_tokens_out;
+
+
+ /**
+ ** Setup to begin parsing input shader
+ **/
+ if (tgsi_parse_init( &parse, tokens_in ) != TGSI_PARSE_OK) {
+ debug_printf("tgsi_parse_init() failed in tgsi_transform_shader()!\n");
+ return -1;
+ }
+ procType = parse.FullHeader.Processor.Processor;
+ assert(procType == TGSI_PROCESSOR_FRAGMENT ||
+ procType == TGSI_PROCESSOR_VERTEX ||
+ procType == TGSI_PROCESSOR_GEOMETRY);
+
+
+ /**
+ ** Setup output shader
+ **/
+ ctx->header = (struct tgsi_header *)tokens_out;
+ *ctx->header = tgsi_build_header();
+
+ processor = (struct tgsi_processor *) (tokens_out + 1);
+ *processor = tgsi_build_processor( procType, ctx->header );
+
+ ctx->ti = 2;
+
+
+ /**
+ ** Loop over incoming program tokens/instructions
+ */
+ while( !tgsi_parse_end_of_tokens( &parse ) ) {
+
+ tgsi_parse_token( &parse );
+
+ switch( parse.FullToken.Token.Type ) {
+ case TGSI_TOKEN_TYPE_INSTRUCTION:
+ {
+ struct tgsi_full_instruction *fullinst
+ = &parse.FullToken.FullInstruction;
+
+ if (ctx->transform_instruction)
+ ctx->transform_instruction(ctx, fullinst);
+ else
+ ctx->emit_instruction(ctx, fullinst);
+ }
+ break;
+
+ case TGSI_TOKEN_TYPE_DECLARATION:
+ {
+ struct tgsi_full_declaration *fulldecl
+ = &parse.FullToken.FullDeclaration;
+
+ if (ctx->transform_declaration)
+ ctx->transform_declaration(ctx, fulldecl);
+ else
+ ctx->emit_declaration(ctx, fulldecl);
+ }
+ break;
+
+ case TGSI_TOKEN_TYPE_IMMEDIATE:
+ {
+ struct tgsi_full_immediate *fullimm
+ = &parse.FullToken.FullImmediate;
+
+ if (ctx->transform_immediate)
+ ctx->transform_immediate(ctx, fullimm);
+ else
+ ctx->emit_immediate(ctx, fullimm);
+ }
+ break;
+ case TGSI_TOKEN_TYPE_PROPERTY:
+ {
+ struct tgsi_full_property *fullprop
+ = &parse.FullToken.FullProperty;
+
+ if (ctx->transform_property)
+ ctx->transform_property(ctx, fullprop);
+ else
+ ctx->emit_property(ctx, fullprop);
+ }
+ break;
+
+ default:
+ assert( 0 );
+ }
+ }
+
+ if (ctx->epilog) {
+ ctx->epilog(ctx);
+ }
+
+ tgsi_parse_free (&parse);
+
+ return ctx->ti;
+}
+
+
+#include "tgsi_text.h"
+
+extern int tgsi_transform_foo( struct tgsi_token *tokens_out,
+ uint max_tokens_out );
+
+/* This function exists only so that tgsi_text_translate() doesn't get
+ * magic-ed out of the libtgsi.a archive by the build system. Don't
+ * remove unless you know this has been fixed - check on mingw/scons
+ * builds as well.
+ */
+int
+tgsi_transform_foo( struct tgsi_token *tokens_out,
+ uint max_tokens_out )
+{
+ const char *text =
+ "FRAG\n"
+ "DCL IN[0], COLOR, CONSTANT\n"
+ "DCL OUT[0], COLOR\n"
+ " 0: MOV OUT[0], IN[0]\n"
+ " 1: END";
+
+ return tgsi_text_translate( text,
+ tokens_out,
+ max_tokens_out );
+}
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_transform.h b/src/minigallium/auxiliary/tgsi/tgsi_transform.h
new file mode 100644
index 0000000..818478e
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_transform.h
@@ -0,0 +1,96 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef TGSI_TRANSFORM_H
+#define TGSI_TRANSFORM_H
+
+
+#include "pipe/p_shader_tokens.h"
+#include "tgsi/tgsi_parse.h"
+#include "tgsi/tgsi_build.h"
+
+
+
+/**
+ * Subclass this to add caller-specific data
+ */
+struct tgsi_transform_context
+{
+/**** PUBLIC ***/
+
+ /**
+ * User-defined callbacks invoked per instruction.
+ */
+ void (*transform_instruction)(struct tgsi_transform_context *ctx,
+ struct tgsi_full_instruction *inst);
+
+ void (*transform_declaration)(struct tgsi_transform_context *ctx,
+ struct tgsi_full_declaration *decl);
+
+ void (*transform_immediate)(struct tgsi_transform_context *ctx,
+ struct tgsi_full_immediate *imm);
+ void (*transform_property)(struct tgsi_transform_context *ctx,
+ struct tgsi_full_property *prop);
+
+ /**
+ * Called at end of input program to allow caller to append extra
+ * instructions. Return number of tokens emitted.
+ */
+ void (*epilog)(struct tgsi_transform_context *ctx);
+
+
+/*** PRIVATE ***/
+
+ /**
+ * These are setup by tgsi_transform_shader() and cannot be overridden.
+ * Meant to be called from in the above user callback functions.
+ */
+ void (*emit_instruction)(struct tgsi_transform_context *ctx,
+ const struct tgsi_full_instruction *inst);
+ void (*emit_declaration)(struct tgsi_transform_context *ctx,
+ const struct tgsi_full_declaration *decl);
+ void (*emit_immediate)(struct tgsi_transform_context *ctx,
+ const struct tgsi_full_immediate *imm);
+ void (*emit_property)(struct tgsi_transform_context *ctx,
+ const struct tgsi_full_property *prop);
+
+ struct tgsi_header *header;
+ uint max_tokens_out;
+ struct tgsi_token *tokens_out;
+ uint ti;
+};
+
+
+
+extern int
+tgsi_transform_shader(const struct tgsi_token *tokens_in,
+ struct tgsi_token *tokens_out,
+ uint max_tokens_out,
+ struct tgsi_transform_context *ctx);
+
+
+#endif /* TGSI_TRANSFORM_H */
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_ureg.c b/src/minigallium/auxiliary/tgsi/tgsi_ureg.c
new file mode 100644
index 0000000..432ed00
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_ureg.c
@@ -0,0 +1,1795 @@
+/**************************************************************************
+ *
+ * Copyright 2009-2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE, INC AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#include "pipe/p_context.h"
+#include "pipe/p_state.h"
+#include "tgsi/tgsi_ureg.h"
+#include "tgsi/tgsi_build.h"
+#include "tgsi/tgsi_info.h"
+#include "tgsi/tgsi_dump.h"
+#include "tgsi/tgsi_sanity.h"
+#include "util/u_debug.h"
+#include "util/u_memory.h"
+#include "util/u_math.h"
+#include "util/u_bitmask.h"
+
+union tgsi_any_token {
+ struct tgsi_header header;
+ struct tgsi_processor processor;
+ struct tgsi_token token;
+ struct tgsi_property prop;
+ struct tgsi_property_data prop_data;
+ struct tgsi_declaration decl;
+ struct tgsi_declaration_range decl_range;
+ struct tgsi_declaration_dimension decl_dim;
+ struct tgsi_declaration_interp decl_interp;
+ struct tgsi_declaration_semantic decl_semantic;
+ struct tgsi_declaration_sampler_view decl_sampler_view;
+ struct tgsi_declaration_array array;
+ struct tgsi_immediate imm;
+ union tgsi_immediate_data imm_data;
+ struct tgsi_instruction insn;
+ struct tgsi_instruction_predicate insn_predicate;
+ struct tgsi_instruction_label insn_label;
+ struct tgsi_instruction_texture insn_texture;
+ struct tgsi_texture_offset insn_texture_offset;
+ struct tgsi_src_register src;
+ struct tgsi_ind_register ind;
+ struct tgsi_dimension dim;
+ struct tgsi_dst_register dst;
+ unsigned value;
+};
+
+
+struct ureg_tokens {
+ union tgsi_any_token *tokens;
+ unsigned size;
+ unsigned order;
+ unsigned count;
+};
+
+#define UREG_MAX_INPUT PIPE_MAX_ATTRIBS
+#define UREG_MAX_SYSTEM_VALUE PIPE_MAX_ATTRIBS
+#define UREG_MAX_OUTPUT PIPE_MAX_SHADER_OUTPUTS
+#define UREG_MAX_CONSTANT_RANGE 32
+#define UREG_MAX_IMMEDIATE 256
+#define UREG_MAX_ADDR 2
+#define UREG_MAX_PRED 1
+#define UREG_MAX_ARRAY_TEMPS 256
+
+struct const_decl {
+ struct {
+ unsigned first;
+ unsigned last;
+ } constant_range[UREG_MAX_CONSTANT_RANGE];
+ unsigned nr_constant_ranges;
+};
+
+#define DOMAIN_DECL 0
+#define DOMAIN_INSN 1
+
+struct ureg_program
+{
+ unsigned processor;
+ struct pipe_context *pipe;
+
+ struct {
+ unsigned semantic_name;
+ unsigned semantic_index;
+ unsigned interp;
+ unsigned char cylindrical_wrap;
+ unsigned char centroid;
+ } fs_input[UREG_MAX_INPUT];
+ unsigned nr_fs_inputs;
+
+ unsigned vs_inputs[UREG_MAX_INPUT/32];
+
+ struct {
+ unsigned index;
+ unsigned semantic_name;
+ unsigned semantic_index;
+ } gs_input[UREG_MAX_INPUT];
+ unsigned nr_gs_inputs;
+
+ struct {
+ unsigned index;
+ unsigned semantic_name;
+ unsigned semantic_index;
+ } system_value[UREG_MAX_SYSTEM_VALUE];
+ unsigned nr_system_values;
+
+ struct {
+ unsigned semantic_name;
+ unsigned semantic_index;
+ unsigned usage_mask; /* = TGSI_WRITEMASK_* */
+ } output[UREG_MAX_OUTPUT];
+ unsigned nr_outputs;
+
+ struct {
+ union {
+ float f[4];
+ unsigned u[4];
+ int i[4];
+ } value;
+ unsigned nr;
+ unsigned type;
+ } immediate[UREG_MAX_IMMEDIATE];
+ unsigned nr_immediates;
+
+ struct ureg_src sampler[PIPE_MAX_SAMPLERS];
+ unsigned nr_samplers;
+
+ struct {
+ unsigned index;
+ unsigned target;
+ unsigned return_type_x;
+ unsigned return_type_y;
+ unsigned return_type_z;
+ unsigned return_type_w;
+ } sampler_view[PIPE_MAX_SHADER_SAMPLER_VIEWS];
+ unsigned nr_sampler_views;
+
+ struct util_bitmask *free_temps;
+ struct util_bitmask *local_temps;
+ struct util_bitmask *decl_temps;
+ unsigned nr_temps;
+
+ unsigned array_temps[UREG_MAX_ARRAY_TEMPS];
+ unsigned nr_array_temps;
+
+ struct const_decl const_decls;
+ struct const_decl const_decls2D[PIPE_MAX_CONSTANT_BUFFERS];
+
+ unsigned property_gs_input_prim;
+ unsigned property_gs_output_prim;
+ unsigned property_gs_max_vertices;
+ unsigned char property_fs_coord_origin; /* = TGSI_FS_COORD_ORIGIN_* */
+ unsigned char property_fs_coord_pixel_center; /* = TGSI_FS_COORD_PIXEL_CENTER_* */
+ unsigned char property_fs_color0_writes_all_cbufs; /* = TGSI_FS_COLOR0_WRITES_ALL_CBUFS * */
+ unsigned char property_fs_depth_layout; /* TGSI_FS_DEPTH_LAYOUT */
+
+ unsigned nr_addrs;
+ unsigned nr_preds;
+ unsigned nr_instructions;
+
+ struct ureg_tokens domain[2];
+};
+
+static union tgsi_any_token error_tokens[32];
+
+static void tokens_error( struct ureg_tokens *tokens )
+{
+ if (tokens->tokens && tokens->tokens != error_tokens)
+ FREE(tokens->tokens);
+
+ tokens->tokens = error_tokens;
+ tokens->size = Elements(error_tokens);
+ tokens->count = 0;
+}
+
+
+static void tokens_expand( struct ureg_tokens *tokens,
+ unsigned count )
+{
+ unsigned old_size = tokens->size * sizeof(unsigned);
+
+ if (tokens->tokens == error_tokens) {
+ return;
+ }
+
+ while (tokens->count + count > tokens->size) {
+ tokens->size = (1 << ++tokens->order);
+ }
+
+ tokens->tokens = REALLOC(tokens->tokens,
+ old_size,
+ tokens->size * sizeof(unsigned));
+ if (tokens->tokens == NULL) {
+ tokens_error(tokens);
+ }
+}
+
+static void set_bad( struct ureg_program *ureg )
+{
+ tokens_error(&ureg->domain[0]);
+}
+
+
+
+static union tgsi_any_token *get_tokens( struct ureg_program *ureg,
+ unsigned domain,
+ unsigned count )
+{
+ struct ureg_tokens *tokens = &ureg->domain[domain];
+ union tgsi_any_token *result;
+
+ if (tokens->count + count > tokens->size)
+ tokens_expand(tokens, count);
+
+ result = &tokens->tokens[tokens->count];
+ tokens->count += count;
+ return result;
+}
+
+
+static union tgsi_any_token *retrieve_token( struct ureg_program *ureg,
+ unsigned domain,
+ unsigned nr )
+{
+ if (ureg->domain[domain].tokens == error_tokens)
+ return &error_tokens[0];
+
+ return &ureg->domain[domain].tokens[nr];
+}
+
+
+
+static INLINE struct ureg_dst
+ureg_dst_register( unsigned file,
+ unsigned index )
+{
+ struct ureg_dst dst;
+
+ dst.File = file;
+ dst.WriteMask = TGSI_WRITEMASK_XYZW;
+ dst.Indirect = 0;
+ dst.IndirectFile = TGSI_FILE_NULL;
+ dst.IndirectIndex = 0;
+ dst.IndirectSwizzle = 0;
+ dst.Saturate = 0;
+ dst.Predicate = 0;
+ dst.PredNegate = 0;
+ dst.PredSwizzleX = TGSI_SWIZZLE_X;
+ dst.PredSwizzleY = TGSI_SWIZZLE_Y;
+ dst.PredSwizzleZ = TGSI_SWIZZLE_Z;
+ dst.PredSwizzleW = TGSI_SWIZZLE_W;
+ dst.Index = index;
+ dst.ArrayID = 0;
+
+ return dst;
+}
+
+
+void
+ureg_property_gs_input_prim(struct ureg_program *ureg,
+ unsigned input_prim)
+{
+ ureg->property_gs_input_prim = input_prim;
+}
+
+void
+ureg_property_gs_output_prim(struct ureg_program *ureg,
+ unsigned output_prim)
+{
+ ureg->property_gs_output_prim = output_prim;
+}
+
+void
+ureg_property_gs_max_vertices(struct ureg_program *ureg,
+ unsigned max_vertices)
+{
+ ureg->property_gs_max_vertices = max_vertices;
+}
+
+void
+ureg_property_fs_coord_origin(struct ureg_program *ureg,
+ unsigned fs_coord_origin)
+{
+ ureg->property_fs_coord_origin = fs_coord_origin;
+}
+
+void
+ureg_property_fs_coord_pixel_center(struct ureg_program *ureg,
+ unsigned fs_coord_pixel_center)
+{
+ ureg->property_fs_coord_pixel_center = fs_coord_pixel_center;
+}
+
+void
+ureg_property_fs_color0_writes_all_cbufs(struct ureg_program *ureg,
+ unsigned fs_color0_writes_all_cbufs)
+{
+ ureg->property_fs_color0_writes_all_cbufs = fs_color0_writes_all_cbufs;
+}
+
+void
+ureg_property_fs_depth_layout(struct ureg_program *ureg,
+ unsigned fs_depth_layout)
+{
+ ureg->property_fs_depth_layout = fs_depth_layout;
+}
+
+struct ureg_src
+ureg_DECL_fs_input_cyl_centroid(struct ureg_program *ureg,
+ unsigned semantic_name,
+ unsigned semantic_index,
+ unsigned interp_mode,
+ unsigned cylindrical_wrap,
+ unsigned centroid)
+{
+ unsigned i;
+
+ for (i = 0; i < ureg->nr_fs_inputs; i++) {
+ if (ureg->fs_input[i].semantic_name == semantic_name &&
+ ureg->fs_input[i].semantic_index == semantic_index) {
+ goto out;
+ }
+ }
+
+ if (ureg->nr_fs_inputs < UREG_MAX_INPUT) {
+ ureg->fs_input[i].semantic_name = semantic_name;
+ ureg->fs_input[i].semantic_index = semantic_index;
+ ureg->fs_input[i].interp = interp_mode;
+ ureg->fs_input[i].cylindrical_wrap = cylindrical_wrap;
+ ureg->fs_input[i].centroid = centroid;
+ ureg->nr_fs_inputs++;
+ } else {
+ set_bad(ureg);
+ }
+
+out:
+ return ureg_src_register(TGSI_FILE_INPUT, i);
+}
+
+
+struct ureg_src
+ureg_DECL_vs_input( struct ureg_program *ureg,
+ unsigned index )
+{
+ assert(ureg->processor == TGSI_PROCESSOR_VERTEX);
+
+ ureg->vs_inputs[index/32] |= 1 << (index % 32);
+ return ureg_src_register( TGSI_FILE_INPUT, index );
+}
+
+
+struct ureg_src
+ureg_DECL_gs_input(struct ureg_program *ureg,
+ unsigned index,
+ unsigned semantic_name,
+ unsigned semantic_index)
+{
+ if (ureg->nr_gs_inputs < UREG_MAX_INPUT) {
+ ureg->gs_input[ureg->nr_gs_inputs].index = index;
+ ureg->gs_input[ureg->nr_gs_inputs].semantic_name = semantic_name;
+ ureg->gs_input[ureg->nr_gs_inputs].semantic_index = semantic_index;
+ ureg->nr_gs_inputs++;
+ } else {
+ set_bad(ureg);
+ }
+
+ /* XXX: Add suport for true 2D input registers. */
+ return ureg_src_register(TGSI_FILE_INPUT, index);
+}
+
+
+struct ureg_src
+ureg_DECL_system_value(struct ureg_program *ureg,
+ unsigned index,
+ unsigned semantic_name,
+ unsigned semantic_index)
+{
+ if (ureg->nr_system_values < UREG_MAX_SYSTEM_VALUE) {
+ ureg->system_value[ureg->nr_system_values].index = index;
+ ureg->system_value[ureg->nr_system_values].semantic_name = semantic_name;
+ ureg->system_value[ureg->nr_system_values].semantic_index = semantic_index;
+ ureg->nr_system_values++;
+ } else {
+ set_bad(ureg);
+ }
+
+ return ureg_src_register(TGSI_FILE_SYSTEM_VALUE, index);
+}
+
+
+struct ureg_dst
+ureg_DECL_output_masked( struct ureg_program *ureg,
+ unsigned name,
+ unsigned index,
+ unsigned usage_mask )
+{
+ unsigned i;
+
+ assert(usage_mask != 0);
+
+ for (i = 0; i < ureg->nr_outputs; i++) {
+ if (ureg->output[i].semantic_name == name &&
+ ureg->output[i].semantic_index == index) {
+ ureg->output[i].usage_mask |= usage_mask;
+ goto out;
+ }
+ }
+
+ if (ureg->nr_outputs < UREG_MAX_OUTPUT) {
+ ureg->output[i].semantic_name = name;
+ ureg->output[i].semantic_index = index;
+ ureg->output[i].usage_mask = usage_mask;
+ ureg->nr_outputs++;
+ }
+ else {
+ set_bad( ureg );
+ }
+
+out:
+ return ureg_dst_register( TGSI_FILE_OUTPUT, i );
+}
+
+
+struct ureg_dst
+ureg_DECL_output( struct ureg_program *ureg,
+ unsigned name,
+ unsigned index )
+{
+ return ureg_DECL_output_masked(ureg, name, index, TGSI_WRITEMASK_XYZW);
+}
+
+
+/* Returns a new constant register. Keep track of which have been
+ * referred to so that we can emit decls later.
+ *
+ * Constant operands declared with this function must be addressed
+ * with a two-dimensional index.
+ *
+ * There is nothing in this code to bind this constant to any tracked
+ * value or manage any constant_buffer contents -- that's the
+ * resposibility of the calling code.
+ */
+void
+ureg_DECL_constant2D(struct ureg_program *ureg,
+ unsigned first,
+ unsigned last,
+ unsigned index2D)
+{
+ struct const_decl *decl = &ureg->const_decls2D[index2D];
+
+ assert(index2D < PIPE_MAX_CONSTANT_BUFFERS);
+
+ if (decl->nr_constant_ranges < UREG_MAX_CONSTANT_RANGE) {
+ uint i = decl->nr_constant_ranges++;
+
+ decl->constant_range[i].first = first;
+ decl->constant_range[i].last = last;
+ }
+}
+
+
+/* A one-dimensional, depricated version of ureg_DECL_constant2D().
+ *
+ * Constant operands declared with this function must be addressed
+ * with a one-dimensional index.
+ */
+struct ureg_src
+ureg_DECL_constant(struct ureg_program *ureg,
+ unsigned index)
+{
+ struct const_decl *decl = &ureg->const_decls;
+ unsigned minconst = index, maxconst = index;
+ unsigned i;
+
+ /* Inside existing range?
+ */
+ for (i = 0; i < decl->nr_constant_ranges; i++) {
+ if (decl->constant_range[i].first <= index &&
+ decl->constant_range[i].last >= index) {
+ goto out;
+ }
+ }
+
+ /* Extend existing range?
+ */
+ for (i = 0; i < decl->nr_constant_ranges; i++) {
+ if (decl->constant_range[i].last == index - 1) {
+ decl->constant_range[i].last = index;
+ goto out;
+ }
+
+ if (decl->constant_range[i].first == index + 1) {
+ decl->constant_range[i].first = index;
+ goto out;
+ }
+
+ minconst = MIN2(minconst, decl->constant_range[i].first);
+ maxconst = MAX2(maxconst, decl->constant_range[i].last);
+ }
+
+ /* Create new range?
+ */
+ if (decl->nr_constant_ranges < UREG_MAX_CONSTANT_RANGE) {
+ i = decl->nr_constant_ranges++;
+ decl->constant_range[i].first = index;
+ decl->constant_range[i].last = index;
+ goto out;
+ }
+
+ /* Collapse all ranges down to one:
+ */
+ i = 0;
+ decl->constant_range[0].first = minconst;
+ decl->constant_range[0].last = maxconst;
+ decl->nr_constant_ranges = 1;
+
+out:
+ assert(i < decl->nr_constant_ranges);
+ assert(decl->constant_range[i].first <= index);
+ assert(decl->constant_range[i].last >= index);
+ return ureg_src_register(TGSI_FILE_CONSTANT, index);
+}
+
+static struct ureg_dst alloc_temporary( struct ureg_program *ureg,
+ boolean local )
+{
+ unsigned i;
+
+ /* Look for a released temporary.
+ */
+ for (i = util_bitmask_get_first_index(ureg->free_temps);
+ i != UTIL_BITMASK_INVALID_INDEX;
+ i = util_bitmask_get_next_index(ureg->free_temps, i + 1)) {
+ if (util_bitmask_get(ureg->local_temps, i) == local)
+ break;
+ }
+
+ /* Or allocate a new one.
+ */
+ if (i == UTIL_BITMASK_INVALID_INDEX) {
+ i = ureg->nr_temps++;
+
+ if (local)
+ util_bitmask_set(ureg->local_temps, i);
+
+ /* Start a new declaration when the local flag changes */
+ if (!i || util_bitmask_get(ureg->local_temps, i - 1) != local)
+ util_bitmask_set(ureg->decl_temps, i);
+ }
+
+ util_bitmask_clear(ureg->free_temps, i);
+
+ return ureg_dst_register( TGSI_FILE_TEMPORARY, i );
+}
+
+struct ureg_dst ureg_DECL_temporary( struct ureg_program *ureg )
+{
+ return alloc_temporary(ureg, FALSE);
+}
+
+struct ureg_dst ureg_DECL_local_temporary( struct ureg_program *ureg )
+{
+ return alloc_temporary(ureg, TRUE);
+}
+
+struct ureg_dst ureg_DECL_array_temporary( struct ureg_program *ureg,
+ unsigned size,
+ boolean local )
+{
+ unsigned i = ureg->nr_temps;
+ struct ureg_dst dst = ureg_dst_register( TGSI_FILE_TEMPORARY, i );
+
+ if (local)
+ util_bitmask_set(ureg->local_temps, i);
+
+ /* Always start a new declaration at the start */
+ util_bitmask_set(ureg->decl_temps, i);
+
+ ureg->nr_temps += size;
+
+ /* and also at the end of the array */
+ util_bitmask_set(ureg->decl_temps, ureg->nr_temps);
+
+ if (ureg->nr_array_temps < UREG_MAX_ARRAY_TEMPS) {
+ ureg->array_temps[ureg->nr_array_temps++] = i;
+ dst.ArrayID = ureg->nr_array_temps;
+ }
+
+ return dst;
+}
+
+void ureg_release_temporary( struct ureg_program *ureg,
+ struct ureg_dst tmp )
+{
+ if(tmp.File == TGSI_FILE_TEMPORARY)
+ util_bitmask_set(ureg->free_temps, tmp.Index);
+}
+
+
+/* Allocate a new address register.
+ */
+struct ureg_dst ureg_DECL_address( struct ureg_program *ureg )
+{
+ if (ureg->nr_addrs < UREG_MAX_ADDR)
+ return ureg_dst_register( TGSI_FILE_ADDRESS, ureg->nr_addrs++ );
+
+ assert( 0 );
+ return ureg_dst_register( TGSI_FILE_ADDRESS, 0 );
+}
+
+/* Allocate a new predicate register.
+ */
+struct ureg_dst
+ureg_DECL_predicate(struct ureg_program *ureg)
+{
+ if (ureg->nr_preds < UREG_MAX_PRED) {
+ return ureg_dst_register(TGSI_FILE_PREDICATE, ureg->nr_preds++);
+ }
+
+ assert(0);
+ return ureg_dst_register(TGSI_FILE_PREDICATE, 0);
+}
+
+/* Allocate a new sampler.
+ */
+struct ureg_src ureg_DECL_sampler( struct ureg_program *ureg,
+ unsigned nr )
+{
+ unsigned i;
+
+ for (i = 0; i < ureg->nr_samplers; i++)
+ if (ureg->sampler[i].Index == nr)
+ return ureg->sampler[i];
+
+ if (i < PIPE_MAX_SAMPLERS) {
+ ureg->sampler[i] = ureg_src_register( TGSI_FILE_SAMPLER, nr );
+ ureg->nr_samplers++;
+ return ureg->sampler[i];
+ }
+
+ assert( 0 );
+ return ureg->sampler[0];
+}
+
+/*
+ * Allocate a new shader sampler view.
+ */
+struct ureg_src
+ureg_DECL_sampler_view(struct ureg_program *ureg,
+ unsigned index,
+ unsigned target,
+ unsigned return_type_x,
+ unsigned return_type_y,
+ unsigned return_type_z,
+ unsigned return_type_w)
+{
+ struct ureg_src reg = ureg_src_register(TGSI_FILE_SAMPLER_VIEW, index);
+ uint i;
+
+ for (i = 0; i < ureg->nr_sampler_views; i++) {
+ if (ureg->sampler_view[i].index == index) {
+ return reg;
+ }
+ }
+
+ if (i < PIPE_MAX_SHADER_SAMPLER_VIEWS) {
+ ureg->sampler_view[i].index = index;
+ ureg->sampler_view[i].target = target;
+ ureg->sampler_view[i].return_type_x = return_type_x;
+ ureg->sampler_view[i].return_type_y = return_type_y;
+ ureg->sampler_view[i].return_type_z = return_type_z;
+ ureg->sampler_view[i].return_type_w = return_type_w;
+ ureg->nr_sampler_views++;
+ return reg;
+ }
+
+ assert(0);
+ return reg;
+}
+
+static int
+match_or_expand_immediate( const unsigned *v,
+ unsigned nr,
+ unsigned *v2,
+ unsigned *pnr2,
+ unsigned *swizzle )
+{
+ unsigned nr2 = *pnr2;
+ unsigned i, j;
+
+ *swizzle = 0;
+
+ for (i = 0; i < nr; i++) {
+ boolean found = FALSE;
+
+ for (j = 0; j < nr2 && !found; j++) {
+ if (v[i] == v2[j]) {
+ *swizzle |= j << (i * 2);
+ found = TRUE;
+ }
+ }
+
+ if (!found) {
+ if (nr2 >= 4) {
+ return FALSE;
+ }
+
+ v2[nr2] = v[i];
+ *swizzle |= nr2 << (i * 2);
+ nr2++;
+ }
+ }
+
+ /* Actually expand immediate only when fully succeeded.
+ */
+ *pnr2 = nr2;
+ return TRUE;
+}
+
+
+static struct ureg_src
+decl_immediate( struct ureg_program *ureg,
+ const unsigned *v,
+ unsigned nr,
+ unsigned type )
+{
+ unsigned i, j;
+ unsigned swizzle = 0;
+
+ /* Could do a first pass where we examine all existing immediates
+ * without expanding.
+ */
+
+ for (i = 0; i < ureg->nr_immediates; i++) {
+ if (ureg->immediate[i].type != type) {
+ continue;
+ }
+ if (match_or_expand_immediate(v,
+ nr,
+ ureg->immediate[i].value.u,
+ &ureg->immediate[i].nr,
+ &swizzle)) {
+ goto out;
+ }
+ }
+
+ if (ureg->nr_immediates < UREG_MAX_IMMEDIATE) {
+ i = ureg->nr_immediates++;
+ ureg->immediate[i].type = type;
+ if (match_or_expand_immediate(v,
+ nr,
+ ureg->immediate[i].value.u,
+ &ureg->immediate[i].nr,
+ &swizzle)) {
+ goto out;
+ }
+ }
+
+ set_bad(ureg);
+
+out:
+ /* Make sure that all referenced elements are from this immediate.
+ * Has the effect of making size-one immediates into scalars.
+ */
+ for (j = nr; j < 4; j++) {
+ swizzle |= (swizzle & 0x3) << (j * 2);
+ }
+
+ return ureg_swizzle(ureg_src_register(TGSI_FILE_IMMEDIATE, i),
+ (swizzle >> 0) & 0x3,
+ (swizzle >> 2) & 0x3,
+ (swizzle >> 4) & 0x3,
+ (swizzle >> 6) & 0x3);
+}
+
+
+struct ureg_src
+ureg_DECL_immediate( struct ureg_program *ureg,
+ const float *v,
+ unsigned nr )
+{
+ union {
+ float f[4];
+ unsigned u[4];
+ } fu;
+ unsigned int i;
+
+ for (i = 0; i < nr; i++) {
+ fu.f[i] = v[i];
+ }
+
+ return decl_immediate(ureg, fu.u, nr, TGSI_IMM_FLOAT32);
+}
+
+
+struct ureg_src
+ureg_DECL_immediate_uint( struct ureg_program *ureg,
+ const unsigned *v,
+ unsigned nr )
+{
+ return decl_immediate(ureg, v, nr, TGSI_IMM_UINT32);
+}
+
+
+struct ureg_src
+ureg_DECL_immediate_block_uint( struct ureg_program *ureg,
+ const unsigned *v,
+ unsigned nr )
+{
+ uint index;
+ uint i;
+
+ if (ureg->nr_immediates + (nr + 3) / 4 > UREG_MAX_IMMEDIATE) {
+ set_bad(ureg);
+ return ureg_src_register(TGSI_FILE_IMMEDIATE, 0);
+ }
+
+ index = ureg->nr_immediates;
+ ureg->nr_immediates += (nr + 3) / 4;
+
+ for (i = index; i < ureg->nr_immediates; i++) {
+ ureg->immediate[i].type = TGSI_IMM_UINT32;
+ ureg->immediate[i].nr = nr > 4 ? 4 : nr;
+ memcpy(ureg->immediate[i].value.u,
+ &v[(i - index) * 4],
+ ureg->immediate[i].nr * sizeof(uint));
+ nr -= 4;
+ }
+
+ return ureg_src_register(TGSI_FILE_IMMEDIATE, index);
+}
+
+
+struct ureg_src
+ureg_DECL_immediate_int( struct ureg_program *ureg,
+ const int *v,
+ unsigned nr )
+{
+ return decl_immediate(ureg, (const unsigned *)v, nr, TGSI_IMM_INT32);
+}
+
+
+void
+ureg_emit_src( struct ureg_program *ureg,
+ struct ureg_src src )
+{
+ unsigned size = 1 + (src.Indirect ? 1 : 0) +
+ (src.Dimension ? (src.DimIndirect ? 2 : 1) : 0);
+
+ union tgsi_any_token *out = get_tokens( ureg, DOMAIN_INSN, size );
+ unsigned n = 0;
+
+ assert(src.File != TGSI_FILE_NULL);
+ assert(src.File < TGSI_FILE_COUNT);
+
+ out[n].value = 0;
+ out[n].src.File = src.File;
+ out[n].src.SwizzleX = src.SwizzleX;
+ out[n].src.SwizzleY = src.SwizzleY;
+ out[n].src.SwizzleZ = src.SwizzleZ;
+ out[n].src.SwizzleW = src.SwizzleW;
+ out[n].src.Index = src.Index;
+ out[n].src.Negate = src.Negate;
+ out[0].src.Absolute = src.Absolute;
+ n++;
+
+ if (src.Indirect) {
+ out[0].src.Indirect = 1;
+ out[n].value = 0;
+ out[n].ind.File = src.IndirectFile;
+ out[n].ind.Swizzle = src.IndirectSwizzle;
+ out[n].ind.Index = src.IndirectIndex;
+ out[n].ind.ArrayID = src.ArrayID;
+ n++;
+ }
+
+ if (src.Dimension) {
+ out[0].src.Dimension = 1;
+ out[n].dim.Dimension = 0;
+ out[n].dim.Padding = 0;
+ if (src.DimIndirect) {
+ out[n].dim.Indirect = 1;
+ out[n].dim.Index = src.DimensionIndex;
+ n++;
+ out[n].value = 0;
+ out[n].ind.File = src.DimIndFile;
+ out[n].ind.Swizzle = src.DimIndSwizzle;
+ out[n].ind.Index = src.DimIndIndex;
+ out[n].ind.ArrayID = src.ArrayID;
+ } else {
+ out[n].dim.Indirect = 0;
+ out[n].dim.Index = src.DimensionIndex;
+ }
+ n++;
+ }
+
+ assert(n == size);
+}
+
+
+void
+ureg_emit_dst( struct ureg_program *ureg,
+ struct ureg_dst dst )
+{
+ unsigned size = (1 +
+ (dst.Indirect ? 1 : 0));
+
+ union tgsi_any_token *out = get_tokens( ureg, DOMAIN_INSN, size );
+ unsigned n = 0;
+
+ assert(dst.File != TGSI_FILE_NULL);
+ assert(dst.File != TGSI_FILE_CONSTANT);
+ assert(dst.File != TGSI_FILE_INPUT);
+ assert(dst.File != TGSI_FILE_SAMPLER);
+ assert(dst.File != TGSI_FILE_SAMPLER_VIEW);
+ assert(dst.File != TGSI_FILE_IMMEDIATE);
+ assert(dst.File < TGSI_FILE_COUNT);
+
+ out[n].value = 0;
+ out[n].dst.File = dst.File;
+ out[n].dst.WriteMask = dst.WriteMask;
+ out[n].dst.Indirect = dst.Indirect;
+ out[n].dst.Index = dst.Index;
+ n++;
+
+ if (dst.Indirect) {
+ out[n].value = 0;
+ out[n].ind.File = dst.IndirectFile;
+ out[n].ind.Swizzle = dst.IndirectSwizzle;
+ out[n].ind.Index = dst.IndirectIndex;
+ out[n].ind.ArrayID = dst.ArrayID;
+ n++;
+ }
+
+ assert(n == size);
+}
+
+
+static void validate( unsigned opcode,
+ unsigned nr_dst,
+ unsigned nr_src )
+{
+#ifdef DEBUG
+ const struct tgsi_opcode_info *info = tgsi_get_opcode_info( opcode );
+ assert(info);
+ if(info) {
+ assert(nr_dst == info->num_dst);
+ assert(nr_src == info->num_src);
+ }
+#endif
+}
+
+struct ureg_emit_insn_result
+ureg_emit_insn(struct ureg_program *ureg,
+ unsigned opcode,
+ boolean saturate,
+ boolean predicate,
+ boolean pred_negate,
+ unsigned pred_swizzle_x,
+ unsigned pred_swizzle_y,
+ unsigned pred_swizzle_z,
+ unsigned pred_swizzle_w,
+ unsigned num_dst,
+ unsigned num_src )
+{
+ union tgsi_any_token *out;
+ uint count = predicate ? 2 : 1;
+ struct ureg_emit_insn_result result;
+
+ validate( opcode, num_dst, num_src );
+
+ out = get_tokens( ureg, DOMAIN_INSN, count );
+ out[0].insn = tgsi_default_instruction();
+ out[0].insn.Opcode = opcode;
+ out[0].insn.Saturate = saturate;
+ out[0].insn.NumDstRegs = num_dst;
+ out[0].insn.NumSrcRegs = num_src;
+
+ result.insn_token = ureg->domain[DOMAIN_INSN].count - count;
+ result.extended_token = result.insn_token;
+
+ if (predicate) {
+ out[0].insn.Predicate = 1;
+ out[1].insn_predicate = tgsi_default_instruction_predicate();
+ out[1].insn_predicate.Negate = pred_negate;
+ out[1].insn_predicate.SwizzleX = pred_swizzle_x;
+ out[1].insn_predicate.SwizzleY = pred_swizzle_y;
+ out[1].insn_predicate.SwizzleZ = pred_swizzle_z;
+ out[1].insn_predicate.SwizzleW = pred_swizzle_w;
+ }
+
+ ureg->nr_instructions++;
+
+ return result;
+}
+
+
+void
+ureg_emit_label(struct ureg_program *ureg,
+ unsigned extended_token,
+ unsigned *label_token )
+{
+ union tgsi_any_token *out, *insn;
+
+ if(!label_token)
+ return;
+
+ out = get_tokens( ureg, DOMAIN_INSN, 1 );
+ out[0].value = 0;
+
+ insn = retrieve_token( ureg, DOMAIN_INSN, extended_token );
+ insn->insn.Label = 1;
+
+ *label_token = ureg->domain[DOMAIN_INSN].count - 1;
+}
+
+/* Will return a number which can be used in a label to point to the
+ * next instruction to be emitted.
+ */
+unsigned
+ureg_get_instruction_number( struct ureg_program *ureg )
+{
+ return ureg->nr_instructions;
+}
+
+/* Patch a given label (expressed as a token number) to point to a
+ * given instruction (expressed as an instruction number).
+ */
+void
+ureg_fixup_label(struct ureg_program *ureg,
+ unsigned label_token,
+ unsigned instruction_number )
+{
+ union tgsi_any_token *out = retrieve_token( ureg, DOMAIN_INSN, label_token );
+
+ out->insn_label.Label = instruction_number;
+}
+
+
+void
+ureg_emit_texture(struct ureg_program *ureg,
+ unsigned extended_token,
+ unsigned target, unsigned num_offsets)
+{
+ union tgsi_any_token *out, *insn;
+
+ out = get_tokens( ureg, DOMAIN_INSN, 1 );
+ insn = retrieve_token( ureg, DOMAIN_INSN, extended_token );
+
+ insn->insn.Texture = 1;
+
+ out[0].value = 0;
+ out[0].insn_texture.Texture = target;
+ out[0].insn_texture.NumOffsets = num_offsets;
+}
+
+void
+ureg_emit_texture_offset(struct ureg_program *ureg,
+ const struct tgsi_texture_offset *offset)
+{
+ union tgsi_any_token *out;
+
+ out = get_tokens( ureg, DOMAIN_INSN, 1);
+
+ out[0].value = 0;
+ out[0].insn_texture_offset = *offset;
+
+}
+
+
+void
+ureg_fixup_insn_size(struct ureg_program *ureg,
+ unsigned insn )
+{
+ union tgsi_any_token *out = retrieve_token( ureg, DOMAIN_INSN, insn );
+
+ assert(out->insn.Type == TGSI_TOKEN_TYPE_INSTRUCTION);
+ out->insn.NrTokens = ureg->domain[DOMAIN_INSN].count - insn - 1;
+}
+
+
+void
+ureg_insn(struct ureg_program *ureg,
+ unsigned opcode,
+ const struct ureg_dst *dst,
+ unsigned nr_dst,
+ const struct ureg_src *src,
+ unsigned nr_src )
+{
+ struct ureg_emit_insn_result insn;
+ unsigned i;
+ boolean saturate;
+ boolean predicate;
+ boolean negate = FALSE;
+ unsigned swizzle[4] = { 0 };
+
+ saturate = nr_dst ? dst[0].Saturate : FALSE;
+ predicate = nr_dst ? dst[0].Predicate : FALSE;
+ if (predicate) {
+ negate = dst[0].PredNegate;
+ swizzle[0] = dst[0].PredSwizzleX;
+ swizzle[1] = dst[0].PredSwizzleY;
+ swizzle[2] = dst[0].PredSwizzleZ;
+ swizzle[3] = dst[0].PredSwizzleW;
+ }
+
+ insn = ureg_emit_insn(ureg,
+ opcode,
+ saturate,
+ predicate,
+ negate,
+ swizzle[0],
+ swizzle[1],
+ swizzle[2],
+ swizzle[3],
+ nr_dst,
+ nr_src);
+
+ for (i = 0; i < nr_dst; i++)
+ ureg_emit_dst( ureg, dst[i] );
+
+ for (i = 0; i < nr_src; i++)
+ ureg_emit_src( ureg, src[i] );
+
+ ureg_fixup_insn_size( ureg, insn.insn_token );
+}
+
+void
+ureg_tex_insn(struct ureg_program *ureg,
+ unsigned opcode,
+ const struct ureg_dst *dst,
+ unsigned nr_dst,
+ unsigned target,
+ const struct tgsi_texture_offset *texoffsets,
+ unsigned nr_offset,
+ const struct ureg_src *src,
+ unsigned nr_src )
+{
+ struct ureg_emit_insn_result insn;
+ unsigned i;
+ boolean saturate;
+ boolean predicate;
+ boolean negate = FALSE;
+ unsigned swizzle[4] = { 0 };
+
+ saturate = nr_dst ? dst[0].Saturate : FALSE;
+ predicate = nr_dst ? dst[0].Predicate : FALSE;
+ if (predicate) {
+ negate = dst[0].PredNegate;
+ swizzle[0] = dst[0].PredSwizzleX;
+ swizzle[1] = dst[0].PredSwizzleY;
+ swizzle[2] = dst[0].PredSwizzleZ;
+ swizzle[3] = dst[0].PredSwizzleW;
+ }
+
+ insn = ureg_emit_insn(ureg,
+ opcode,
+ saturate,
+ predicate,
+ negate,
+ swizzle[0],
+ swizzle[1],
+ swizzle[2],
+ swizzle[3],
+ nr_dst,
+ nr_src);
+
+ ureg_emit_texture( ureg, insn.extended_token, target, nr_offset );
+
+ for (i = 0; i < nr_offset; i++)
+ ureg_emit_texture_offset( ureg, &texoffsets[i]);
+
+ for (i = 0; i < nr_dst; i++)
+ ureg_emit_dst( ureg, dst[i] );
+
+ for (i = 0; i < nr_src; i++)
+ ureg_emit_src( ureg, src[i] );
+
+ ureg_fixup_insn_size( ureg, insn.insn_token );
+}
+
+
+void
+ureg_label_insn(struct ureg_program *ureg,
+ unsigned opcode,
+ const struct ureg_src *src,
+ unsigned nr_src,
+ unsigned *label_token )
+{
+ struct ureg_emit_insn_result insn;
+ unsigned i;
+
+ insn = ureg_emit_insn(ureg,
+ opcode,
+ FALSE,
+ FALSE,
+ FALSE,
+ TGSI_SWIZZLE_X,
+ TGSI_SWIZZLE_Y,
+ TGSI_SWIZZLE_Z,
+ TGSI_SWIZZLE_W,
+ 0,
+ nr_src);
+
+ ureg_emit_label( ureg, insn.extended_token, label_token );
+
+ for (i = 0; i < nr_src; i++)
+ ureg_emit_src( ureg, src[i] );
+
+ ureg_fixup_insn_size( ureg, insn.insn_token );
+}
+
+
+static void
+emit_decl_semantic(struct ureg_program *ureg,
+ unsigned file,
+ unsigned index,
+ unsigned semantic_name,
+ unsigned semantic_index,
+ unsigned usage_mask)
+{
+ union tgsi_any_token *out = get_tokens(ureg, DOMAIN_DECL, 3);
+
+ out[0].value = 0;
+ out[0].decl.Type = TGSI_TOKEN_TYPE_DECLARATION;
+ out[0].decl.NrTokens = 3;
+ out[0].decl.File = file;
+ out[0].decl.UsageMask = usage_mask;
+ out[0].decl.Semantic = 1;
+
+ out[1].value = 0;
+ out[1].decl_range.First = index;
+ out[1].decl_range.Last = index;
+
+ out[2].value = 0;
+ out[2].decl_semantic.Name = semantic_name;
+ out[2].decl_semantic.Index = semantic_index;
+}
+
+
+static void
+emit_decl_fs(struct ureg_program *ureg,
+ unsigned file,
+ unsigned index,
+ unsigned semantic_name,
+ unsigned semantic_index,
+ unsigned interpolate,
+ unsigned cylindrical_wrap,
+ unsigned centroid)
+{
+ union tgsi_any_token *out = get_tokens(ureg, DOMAIN_DECL, 4);
+
+ out[0].value = 0;
+ out[0].decl.Type = TGSI_TOKEN_TYPE_DECLARATION;
+ out[0].decl.NrTokens = 4;
+ out[0].decl.File = file;
+ out[0].decl.UsageMask = TGSI_WRITEMASK_XYZW; /* FIXME! */
+ out[0].decl.Interpolate = 1;
+ out[0].decl.Semantic = 1;
+
+ out[1].value = 0;
+ out[1].decl_range.First = index;
+ out[1].decl_range.Last = index;
+
+ out[2].value = 0;
+ out[2].decl_interp.Interpolate = interpolate;
+ out[2].decl_interp.CylindricalWrap = cylindrical_wrap;
+ out[2].decl_interp.Centroid = centroid;
+
+ out[3].value = 0;
+ out[3].decl_semantic.Name = semantic_name;
+ out[3].decl_semantic.Index = semantic_index;
+}
+
+static void
+emit_decl_temps( struct ureg_program *ureg,
+ unsigned first, unsigned last,
+ boolean local,
+ unsigned arrayid )
+{
+ union tgsi_any_token *out = get_tokens( ureg, DOMAIN_DECL,
+ arrayid ? 3 : 2 );
+
+ out[0].value = 0;
+ out[0].decl.Type = TGSI_TOKEN_TYPE_DECLARATION;
+ out[0].decl.NrTokens = 2;
+ out[0].decl.File = TGSI_FILE_TEMPORARY;
+ out[0].decl.UsageMask = TGSI_WRITEMASK_XYZW;
+ out[0].decl.Local = local;
+
+ out[1].value = 0;
+ out[1].decl_range.First = first;
+ out[1].decl_range.Last = last;
+
+ if (arrayid) {
+ out[0].decl.Array = 1;
+ out[2].value = 0;
+ out[2].array.ArrayID = arrayid;
+ }
+}
+
+static void emit_decl_range( struct ureg_program *ureg,
+ unsigned file,
+ unsigned first,
+ unsigned count )
+{
+ union tgsi_any_token *out = get_tokens( ureg, DOMAIN_DECL, 2 );
+
+ out[0].value = 0;
+ out[0].decl.Type = TGSI_TOKEN_TYPE_DECLARATION;
+ out[0].decl.NrTokens = 2;
+ out[0].decl.File = file;
+ out[0].decl.UsageMask = TGSI_WRITEMASK_XYZW;
+ out[0].decl.Semantic = 0;
+
+ out[1].value = 0;
+ out[1].decl_range.First = first;
+ out[1].decl_range.Last = first + count - 1;
+}
+
+static void
+emit_decl_range2D(struct ureg_program *ureg,
+ unsigned file,
+ unsigned first,
+ unsigned last,
+ unsigned index2D)
+{
+ union tgsi_any_token *out = get_tokens(ureg, DOMAIN_DECL, 3);
+
+ out[0].value = 0;
+ out[0].decl.Type = TGSI_TOKEN_TYPE_DECLARATION;
+ out[0].decl.NrTokens = 3;
+ out[0].decl.File = file;
+ out[0].decl.UsageMask = TGSI_WRITEMASK_XYZW;
+ out[0].decl.Dimension = 1;
+
+ out[1].value = 0;
+ out[1].decl_range.First = first;
+ out[1].decl_range.Last = last;
+
+ out[2].value = 0;
+ out[2].decl_dim.Index2D = index2D;
+}
+
+static void
+emit_decl_sampler_view(struct ureg_program *ureg,
+ unsigned index,
+ unsigned target,
+ unsigned return_type_x,
+ unsigned return_type_y,
+ unsigned return_type_z,
+ unsigned return_type_w )
+{
+ union tgsi_any_token *out = get_tokens(ureg, DOMAIN_DECL, 3);
+
+ out[0].value = 0;
+ out[0].decl.Type = TGSI_TOKEN_TYPE_DECLARATION;
+ out[0].decl.NrTokens = 3;
+ out[0].decl.File = TGSI_FILE_SAMPLER_VIEW;
+ out[0].decl.UsageMask = 0xf;
+
+ out[1].value = 0;
+ out[1].decl_range.First = index;
+ out[1].decl_range.Last = index;
+
+ out[2].value = 0;
+ out[2].decl_sampler_view.Resource = target;
+ out[2].decl_sampler_view.ReturnTypeX = return_type_x;
+ out[2].decl_sampler_view.ReturnTypeY = return_type_y;
+ out[2].decl_sampler_view.ReturnTypeZ = return_type_z;
+ out[2].decl_sampler_view.ReturnTypeW = return_type_w;
+}
+
+static void
+emit_immediate( struct ureg_program *ureg,
+ const unsigned *v,
+ unsigned type )
+{
+ union tgsi_any_token *out = get_tokens( ureg, DOMAIN_DECL, 5 );
+
+ out[0].value = 0;
+ out[0].imm.Type = TGSI_TOKEN_TYPE_IMMEDIATE;
+ out[0].imm.NrTokens = 5;
+ out[0].imm.DataType = type;
+ out[0].imm.Padding = 0;
+
+ out[1].imm_data.Uint = v[0];
+ out[2].imm_data.Uint = v[1];
+ out[3].imm_data.Uint = v[2];
+ out[4].imm_data.Uint = v[3];
+}
+
+static void
+emit_property(struct ureg_program *ureg,
+ unsigned name,
+ unsigned data)
+{
+ union tgsi_any_token *out = get_tokens(ureg, DOMAIN_DECL, 2);
+
+ out[0].value = 0;
+ out[0].prop.Type = TGSI_TOKEN_TYPE_PROPERTY;
+ out[0].prop.NrTokens = 2;
+ out[0].prop.PropertyName = name;
+
+ out[1].prop_data.Data = data;
+}
+
+
+static void emit_decls( struct ureg_program *ureg )
+{
+ unsigned i;
+
+ if (ureg->property_gs_input_prim != ~0) {
+ assert(ureg->processor == TGSI_PROCESSOR_GEOMETRY);
+
+ emit_property(ureg,
+ TGSI_PROPERTY_GS_INPUT_PRIM,
+ ureg->property_gs_input_prim);
+ }
+
+ if (ureg->property_gs_output_prim != ~0) {
+ assert(ureg->processor == TGSI_PROCESSOR_GEOMETRY);
+
+ emit_property(ureg,
+ TGSI_PROPERTY_GS_OUTPUT_PRIM,
+ ureg->property_gs_output_prim);
+ }
+
+ if (ureg->property_gs_max_vertices != ~0) {
+ assert(ureg->processor == TGSI_PROCESSOR_GEOMETRY);
+
+ emit_property(ureg,
+ TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES,
+ ureg->property_gs_max_vertices);
+ }
+
+ if (ureg->property_fs_coord_origin) {
+ assert(ureg->processor == TGSI_PROCESSOR_FRAGMENT);
+
+ emit_property(ureg,
+ TGSI_PROPERTY_FS_COORD_ORIGIN,
+ ureg->property_fs_coord_origin);
+ }
+
+ if (ureg->property_fs_coord_pixel_center) {
+ assert(ureg->processor == TGSI_PROCESSOR_FRAGMENT);
+
+ emit_property(ureg,
+ TGSI_PROPERTY_FS_COORD_PIXEL_CENTER,
+ ureg->property_fs_coord_pixel_center);
+ }
+
+ if (ureg->property_fs_color0_writes_all_cbufs) {
+ assert(ureg->processor == TGSI_PROCESSOR_FRAGMENT);
+
+ emit_property(ureg,
+ TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS,
+ ureg->property_fs_color0_writes_all_cbufs);
+ }
+
+ if (ureg->property_fs_depth_layout) {
+ assert(ureg->processor == TGSI_PROCESSOR_FRAGMENT);
+
+ emit_property(ureg,
+ TGSI_PROPERTY_FS_DEPTH_LAYOUT,
+ ureg->property_fs_depth_layout);
+ }
+
+ if (ureg->processor == TGSI_PROCESSOR_VERTEX) {
+ for (i = 0; i < UREG_MAX_INPUT; i++) {
+ if (ureg->vs_inputs[i/32] & (1 << (i%32))) {
+ emit_decl_range( ureg, TGSI_FILE_INPUT, i, 1 );
+ }
+ }
+ } else if (ureg->processor == TGSI_PROCESSOR_FRAGMENT) {
+ for (i = 0; i < ureg->nr_fs_inputs; i++) {
+ emit_decl_fs(ureg,
+ TGSI_FILE_INPUT,
+ i,
+ ureg->fs_input[i].semantic_name,
+ ureg->fs_input[i].semantic_index,
+ ureg->fs_input[i].interp,
+ ureg->fs_input[i].cylindrical_wrap,
+ ureg->fs_input[i].centroid);
+ }
+ } else {
+ for (i = 0; i < ureg->nr_gs_inputs; i++) {
+ emit_decl_semantic(ureg,
+ TGSI_FILE_INPUT,
+ ureg->gs_input[i].index,
+ ureg->gs_input[i].semantic_name,
+ ureg->gs_input[i].semantic_index,
+ TGSI_WRITEMASK_XYZW);
+ }
+ }
+
+ for (i = 0; i < ureg->nr_system_values; i++) {
+ emit_decl_semantic(ureg,
+ TGSI_FILE_SYSTEM_VALUE,
+ ureg->system_value[i].index,
+ ureg->system_value[i].semantic_name,
+ ureg->system_value[i].semantic_index,
+ TGSI_WRITEMASK_XYZW);
+ }
+
+ for (i = 0; i < ureg->nr_outputs; i++) {
+ emit_decl_semantic(ureg,
+ TGSI_FILE_OUTPUT,
+ i,
+ ureg->output[i].semantic_name,
+ ureg->output[i].semantic_index,
+ ureg->output[i].usage_mask);
+ }
+
+ for (i = 0; i < ureg->nr_samplers; i++) {
+ emit_decl_range( ureg,
+ TGSI_FILE_SAMPLER,
+ ureg->sampler[i].Index, 1 );
+ }
+
+ for (i = 0; i < ureg->nr_sampler_views; i++) {
+ emit_decl_sampler_view(ureg,
+ ureg->sampler_view[i].index,
+ ureg->sampler_view[i].target,
+ ureg->sampler_view[i].return_type_x,
+ ureg->sampler_view[i].return_type_y,
+ ureg->sampler_view[i].return_type_z,
+ ureg->sampler_view[i].return_type_w);
+ }
+
+ if (ureg->const_decls.nr_constant_ranges) {
+ for (i = 0; i < ureg->const_decls.nr_constant_ranges; i++) {
+ emit_decl_range(ureg,
+ TGSI_FILE_CONSTANT,
+ ureg->const_decls.constant_range[i].first,
+ ureg->const_decls.constant_range[i].last - ureg->const_decls.constant_range[i].first + 1);
+ }
+ }
+
+ for (i = 0; i < PIPE_MAX_CONSTANT_BUFFERS; i++) {
+ struct const_decl *decl = &ureg->const_decls2D[i];
+
+ if (decl->nr_constant_ranges) {
+ uint j;
+
+ for (j = 0; j < decl->nr_constant_ranges; j++) {
+ emit_decl_range2D(ureg,
+ TGSI_FILE_CONSTANT,
+ decl->constant_range[j].first,
+ decl->constant_range[j].last,
+ i);
+ }
+ }
+ }
+
+ if (ureg->nr_temps) {
+ unsigned array = 0;
+ for (i = 0; i < ureg->nr_temps;) {
+ boolean local = util_bitmask_get(ureg->local_temps, i);
+ unsigned first = i;
+ i = util_bitmask_get_next_index(ureg->decl_temps, i + 1);
+ if (i == UTIL_BITMASK_INVALID_INDEX)
+ i = ureg->nr_temps;
+
+ if (array < ureg->nr_array_temps && ureg->array_temps[array] == first)
+ emit_decl_temps( ureg, first, i - 1, local, ++array );
+ else
+ emit_decl_temps( ureg, first, i - 1, local, 0 );
+ }
+ }
+
+ if (ureg->nr_addrs) {
+ emit_decl_range( ureg,
+ TGSI_FILE_ADDRESS,
+ 0, ureg->nr_addrs );
+ }
+
+ if (ureg->nr_preds) {
+ emit_decl_range(ureg,
+ TGSI_FILE_PREDICATE,
+ 0,
+ ureg->nr_preds);
+ }
+
+ for (i = 0; i < ureg->nr_immediates; i++) {
+ emit_immediate( ureg,
+ ureg->immediate[i].value.u,
+ ureg->immediate[i].type );
+ }
+}
+
+/* Append the instruction tokens onto the declarations to build a
+ * contiguous stream suitable to send to the driver.
+ */
+static void copy_instructions( struct ureg_program *ureg )
+{
+ unsigned nr_tokens = ureg->domain[DOMAIN_INSN].count;
+ union tgsi_any_token *out = get_tokens( ureg,
+ DOMAIN_DECL,
+ nr_tokens );
+
+ memcpy(out,
+ ureg->domain[DOMAIN_INSN].tokens,
+ nr_tokens * sizeof out[0] );
+}
+
+
+static void
+fixup_header_size(struct ureg_program *ureg)
+{
+ union tgsi_any_token *out = retrieve_token( ureg, DOMAIN_DECL, 0 );
+
+ out->header.BodySize = ureg->domain[DOMAIN_DECL].count - 2;
+}
+
+
+static void
+emit_header( struct ureg_program *ureg )
+{
+ union tgsi_any_token *out = get_tokens( ureg, DOMAIN_DECL, 2 );
+
+ out[0].header.HeaderSize = 2;
+ out[0].header.BodySize = 0;
+
+ out[1].processor.Processor = ureg->processor;
+ out[1].processor.Padding = 0;
+}
+
+
+const struct tgsi_token *ureg_finalize( struct ureg_program *ureg )
+{
+ const struct tgsi_token *tokens;
+
+ emit_header( ureg );
+ emit_decls( ureg );
+ copy_instructions( ureg );
+ fixup_header_size( ureg );
+
+ if (ureg->domain[0].tokens == error_tokens ||
+ ureg->domain[1].tokens == error_tokens) {
+ debug_printf("%s: error in generated shader\n", __FUNCTION__);
+ assert(0);
+ return NULL;
+ }
+
+ tokens = &ureg->domain[DOMAIN_DECL].tokens[0].token;
+
+ if (0) {
+ debug_printf("%s: emitted shader %d tokens:\n", __FUNCTION__,
+ ureg->domain[DOMAIN_DECL].count);
+ tgsi_dump( tokens, 0 );
+ }
+
+#if DEBUG
+ if (tokens && !tgsi_sanity_check(tokens)) {
+ debug_printf("tgsi_ureg.c, sanity check failed on generated tokens:\n");
+ tgsi_dump(tokens, 0);
+ assert(0);
+ }
+#endif
+
+
+ return tokens;
+}
+
+
+void *ureg_create_shader( struct ureg_program *ureg,
+ struct pipe_context *pipe,
+ const struct pipe_stream_output_info *so )
+{
+ struct pipe_shader_state state;
+
+ state.tokens = ureg_finalize(ureg);
+ if(!state.tokens)
+ return NULL;
+
+ if (so)
+ state.stream_output = *so;
+ else
+ memset(&state.stream_output, 0, sizeof(state.stream_output));
+
+ if (ureg->processor == TGSI_PROCESSOR_VERTEX)
+ return pipe->create_vs_state( pipe, &state );
+ else
+ return pipe->create_fs_state( pipe, &state );
+}
+
+
+const struct tgsi_token *ureg_get_tokens( struct ureg_program *ureg,
+ unsigned *nr_tokens )
+{
+ const struct tgsi_token *tokens;
+
+ ureg_finalize(ureg);
+
+ tokens = &ureg->domain[DOMAIN_DECL].tokens[0].token;
+
+ if (nr_tokens)
+ *nr_tokens = ureg->domain[DOMAIN_DECL].size;
+
+ ureg->domain[DOMAIN_DECL].tokens = 0;
+ ureg->domain[DOMAIN_DECL].size = 0;
+ ureg->domain[DOMAIN_DECL].order = 0;
+ ureg->domain[DOMAIN_DECL].count = 0;
+
+ return tokens;
+}
+
+
+void ureg_free_tokens( const struct tgsi_token *tokens )
+{
+ FREE((struct tgsi_token *)tokens);
+}
+
+
+struct ureg_program *ureg_create( unsigned processor )
+{
+ struct ureg_program *ureg = CALLOC_STRUCT( ureg_program );
+ if (ureg == NULL)
+ goto no_ureg;
+
+ ureg->processor = processor;
+ ureg->property_gs_input_prim = ~0;
+ ureg->property_gs_output_prim = ~0;
+ ureg->property_gs_max_vertices = ~0;
+
+ ureg->free_temps = util_bitmask_create();
+ if (ureg->free_temps == NULL)
+ goto no_free_temps;
+
+ ureg->local_temps = util_bitmask_create();
+ if (ureg->local_temps == NULL)
+ goto no_local_temps;
+
+ ureg->decl_temps = util_bitmask_create();
+ if (ureg->decl_temps == NULL)
+ goto no_decl_temps;
+
+ return ureg;
+
+no_decl_temps:
+ util_bitmask_destroy(ureg->local_temps);
+no_local_temps:
+ util_bitmask_destroy(ureg->free_temps);
+no_free_temps:
+ FREE(ureg);
+no_ureg:
+ return NULL;
+}
+
+
+const unsigned
+ureg_get_nr_outputs( const struct ureg_program *ureg )
+{
+ if (!ureg)
+ return 0;
+ return ureg->nr_outputs;
+}
+
+
+void ureg_destroy( struct ureg_program *ureg )
+{
+ unsigned i;
+
+ for (i = 0; i < Elements(ureg->domain); i++) {
+ if (ureg->domain[i].tokens &&
+ ureg->domain[i].tokens != error_tokens)
+ FREE(ureg->domain[i].tokens);
+ }
+
+ util_bitmask_destroy(ureg->free_temps);
+ util_bitmask_destroy(ureg->local_temps);
+ util_bitmask_destroy(ureg->decl_temps);
+
+ FREE(ureg);
+}
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_ureg.h b/src/minigallium/auxiliary/tgsi/tgsi_ureg.h
new file mode 100644
index 0000000..e104cd9
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_ureg.h
@@ -0,0 +1,1278 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE, INC AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef TGSI_UREG_H
+#define TGSI_UREG_H
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_shader_tokens.h"
+#include "util/u_debug.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct ureg_program;
+struct pipe_stream_output_info;
+
+/* Almost a tgsi_src_register, but we need to pull in the Absolute
+ * flag from the _ext token. Indirect flag always implies ADDR[0].
+ */
+struct ureg_src
+{
+ unsigned File : 4; /* TGSI_FILE_ */
+ unsigned SwizzleX : 2; /* TGSI_SWIZZLE_ */
+ unsigned SwizzleY : 2; /* TGSI_SWIZZLE_ */
+ unsigned SwizzleZ : 2; /* TGSI_SWIZZLE_ */
+ unsigned SwizzleW : 2; /* TGSI_SWIZZLE_ */
+ unsigned Indirect : 1; /* BOOL */
+ unsigned DimIndirect : 1; /* BOOL */
+ unsigned Dimension : 1; /* BOOL */
+ unsigned Absolute : 1; /* BOOL */
+ unsigned Negate : 1; /* BOOL */
+ unsigned IndirectFile : 4; /* TGSI_FILE_ */
+ unsigned IndirectSwizzle : 2; /* TGSI_SWIZZLE_ */
+ unsigned DimIndFile : 4; /* TGSI_FILE_ */
+ unsigned DimIndSwizzle : 2; /* TGSI_SWIZZLE_ */
+ int Index : 16; /* SINT */
+ int IndirectIndex : 16; /* SINT */
+ int DimensionIndex : 16; /* SINT */
+ int DimIndIndex : 16; /* SINT */
+ unsigned ArrayID : 10; /* UINT */
+};
+
+/* Very similar to a tgsi_dst_register, removing unsupported fields
+ * and adding a Saturate flag. It's easier to push saturate into the
+ * destination register than to try and create a _SAT variant of each
+ * instruction function.
+ */
+struct ureg_dst
+{
+ unsigned File : 4; /* TGSI_FILE_ */
+ unsigned WriteMask : 4; /* TGSI_WRITEMASK_ */
+ unsigned Indirect : 1; /* BOOL */
+ unsigned Saturate : 1; /* BOOL */
+ unsigned Predicate : 1;
+ unsigned PredNegate : 1; /* BOOL */
+ unsigned PredSwizzleX : 2; /* TGSI_SWIZZLE_ */
+ unsigned PredSwizzleY : 2; /* TGSI_SWIZZLE_ */
+ unsigned PredSwizzleZ : 2; /* TGSI_SWIZZLE_ */
+ unsigned PredSwizzleW : 2; /* TGSI_SWIZZLE_ */
+ int Index : 16; /* SINT */
+ int IndirectIndex : 16; /* SINT */
+ unsigned IndirectFile : 4; /* TGSI_FILE_ */
+ int IndirectSwizzle : 2; /* TGSI_SWIZZLE_ */
+ unsigned ArrayID : 10; /* UINT */
+};
+
+struct pipe_context;
+
+struct ureg_program *
+ureg_create( unsigned processor );
+
+const struct tgsi_token *
+ureg_finalize( struct ureg_program * );
+
+/* Create and return a shader:
+ */
+void *
+ureg_create_shader( struct ureg_program *,
+ struct pipe_context *pipe,
+ const struct pipe_stream_output_info *so );
+
+
+/* Alternately, return the built token stream and hand ownership of
+ * that memory to the caller:
+ */
+const struct tgsi_token *
+ureg_get_tokens( struct ureg_program *ureg,
+ unsigned *nr_tokens );
+
+/*
+ * Returns the number of currently declared outputs.
+ */
+const unsigned
+ureg_get_nr_outputs( const struct ureg_program *ureg );
+
+
+/* Free the tokens created by ureg_get_tokens() */
+void ureg_free_tokens( const struct tgsi_token *tokens );
+
+
+void
+ureg_destroy( struct ureg_program * );
+
+
+/***********************************************************************
+ * Convenience routine:
+ */
+static INLINE void *
+ureg_create_shader_with_so_and_destroy( struct ureg_program *p,
+ struct pipe_context *pipe,
+ const struct pipe_stream_output_info *so )
+{
+ void *result = ureg_create_shader( p, pipe, so );
+ ureg_destroy( p );
+ return result;
+}
+
+static INLINE void *
+ureg_create_shader_and_destroy( struct ureg_program *p,
+ struct pipe_context *pipe )
+{
+ return ureg_create_shader_with_so_and_destroy(p, pipe, NULL);
+}
+
+
+/***********************************************************************
+ * Build shader properties:
+ */
+
+void
+ureg_property_gs_input_prim(struct ureg_program *ureg,
+ unsigned input_prim);
+
+void
+ureg_property_gs_output_prim(struct ureg_program *ureg,
+ unsigned output_prim);
+
+void
+ureg_property_gs_max_vertices(struct ureg_program *ureg,
+ unsigned max_vertices);
+
+void
+ureg_property_fs_coord_origin(struct ureg_program *ureg,
+ unsigned fs_coord_origin);
+
+void
+ureg_property_fs_coord_pixel_center(struct ureg_program *ureg,
+ unsigned fs_coord_pixel_center);
+
+void
+ureg_property_fs_color0_writes_all_cbufs(struct ureg_program *ureg,
+ unsigned fs_color0_writes_all_cbufs);
+
+void
+ureg_property_fs_depth_layout(struct ureg_program *ureg,
+ unsigned fs_depth_layout);
+
+
+/***********************************************************************
+ * Build shader declarations:
+ */
+
+struct ureg_src
+ureg_DECL_fs_input_cyl_centroid(struct ureg_program *,
+ unsigned semantic_name,
+ unsigned semantic_index,
+ unsigned interp_mode,
+ unsigned cylindrical_wrap,
+ unsigned centroid);
+
+static INLINE struct ureg_src
+ureg_DECL_fs_input_cyl(struct ureg_program *ureg,
+ unsigned semantic_name,
+ unsigned semantic_index,
+ unsigned interp_mode,
+ unsigned cylindrical_wrap)
+{
+ return ureg_DECL_fs_input_cyl_centroid(ureg,
+ semantic_name,
+ semantic_index,
+ interp_mode,
+ cylindrical_wrap,
+ 0);
+}
+
+static INLINE struct ureg_src
+ureg_DECL_fs_input(struct ureg_program *ureg,
+ unsigned semantic_name,
+ unsigned semantic_index,
+ unsigned interp_mode)
+{
+ return ureg_DECL_fs_input_cyl_centroid(ureg,
+ semantic_name,
+ semantic_index,
+ interp_mode,
+ 0, 0);
+}
+
+struct ureg_src
+ureg_DECL_vs_input( struct ureg_program *,
+ unsigned index );
+
+struct ureg_src
+ureg_DECL_gs_input(struct ureg_program *,
+ unsigned index,
+ unsigned semantic_name,
+ unsigned semantic_index);
+
+struct ureg_src
+ureg_DECL_system_value(struct ureg_program *,
+ unsigned index,
+ unsigned semantic_name,
+ unsigned semantic_index);
+
+struct ureg_dst
+ureg_DECL_output_masked( struct ureg_program *,
+ unsigned semantic_name,
+ unsigned semantic_index,
+ unsigned usage_mask );
+
+struct ureg_dst
+ureg_DECL_output( struct ureg_program *,
+ unsigned semantic_name,
+ unsigned semantic_index );
+
+struct ureg_src
+ureg_DECL_immediate( struct ureg_program *,
+ const float *v,
+ unsigned nr );
+
+struct ureg_src
+ureg_DECL_immediate_uint( struct ureg_program *,
+ const unsigned *v,
+ unsigned nr );
+
+struct ureg_src
+ureg_DECL_immediate_block_uint( struct ureg_program *,
+ const unsigned *v,
+ unsigned nr );
+
+struct ureg_src
+ureg_DECL_immediate_int( struct ureg_program *,
+ const int *v,
+ unsigned nr );
+
+void
+ureg_DECL_constant2D(struct ureg_program *ureg,
+ unsigned first,
+ unsigned last,
+ unsigned index2D);
+
+struct ureg_src
+ureg_DECL_constant( struct ureg_program *,
+ unsigned index );
+
+struct ureg_dst
+ureg_DECL_temporary( struct ureg_program * );
+
+/**
+ * Emit a temporary with the LOCAL declaration flag set. For use when
+ * the register value is not required to be preserved across
+ * subroutine boundaries.
+ */
+struct ureg_dst
+ureg_DECL_local_temporary( struct ureg_program * );
+
+/**
+ * Declare "size" continuous temporary registers.
+ */
+struct ureg_dst
+ureg_DECL_array_temporary( struct ureg_program *,
+ unsigned size,
+ boolean local );
+
+void
+ureg_release_temporary( struct ureg_program *ureg,
+ struct ureg_dst tmp );
+
+struct ureg_dst
+ureg_DECL_address( struct ureg_program * );
+
+struct ureg_dst
+ureg_DECL_predicate(struct ureg_program *);
+
+/* Supply an index to the sampler declaration as this is the hook to
+ * the external pipe_sampler state. Users of this function probably
+ * don't want just any sampler, but a specific one which they've set
+ * up state for in the context.
+ */
+struct ureg_src
+ureg_DECL_sampler( struct ureg_program *,
+ unsigned index );
+
+struct ureg_src
+ureg_DECL_sampler_view(struct ureg_program *,
+ unsigned index,
+ unsigned target,
+ unsigned return_type_x,
+ unsigned return_type_y,
+ unsigned return_type_z,
+ unsigned return_type_w );
+
+
+static INLINE struct ureg_src
+ureg_imm4f( struct ureg_program *ureg,
+ float a, float b,
+ float c, float d)
+{
+ float v[4];
+ v[0] = a;
+ v[1] = b;
+ v[2] = c;
+ v[3] = d;
+ return ureg_DECL_immediate( ureg, v, 4 );
+}
+
+static INLINE struct ureg_src
+ureg_imm3f( struct ureg_program *ureg,
+ float a, float b,
+ float c)
+{
+ float v[3];
+ v[0] = a;
+ v[1] = b;
+ v[2] = c;
+ return ureg_DECL_immediate( ureg, v, 3 );
+}
+
+static INLINE struct ureg_src
+ureg_imm2f( struct ureg_program *ureg,
+ float a, float b)
+{
+ float v[2];
+ v[0] = a;
+ v[1] = b;
+ return ureg_DECL_immediate( ureg, v, 2 );
+}
+
+static INLINE struct ureg_src
+ureg_imm1f( struct ureg_program *ureg,
+ float a)
+{
+ float v[1];
+ v[0] = a;
+ return ureg_DECL_immediate( ureg, v, 1 );
+}
+
+static INLINE struct ureg_src
+ureg_imm4u( struct ureg_program *ureg,
+ unsigned a, unsigned b,
+ unsigned c, unsigned d)
+{
+ unsigned v[4];
+ v[0] = a;
+ v[1] = b;
+ v[2] = c;
+ v[3] = d;
+ return ureg_DECL_immediate_uint( ureg, v, 4 );
+}
+
+static INLINE struct ureg_src
+ureg_imm3u( struct ureg_program *ureg,
+ unsigned a, unsigned b,
+ unsigned c)
+{
+ unsigned v[3];
+ v[0] = a;
+ v[1] = b;
+ v[2] = c;
+ return ureg_DECL_immediate_uint( ureg, v, 3 );
+}
+
+static INLINE struct ureg_src
+ureg_imm2u( struct ureg_program *ureg,
+ unsigned a, unsigned b)
+{
+ unsigned v[2];
+ v[0] = a;
+ v[1] = b;
+ return ureg_DECL_immediate_uint( ureg, v, 2 );
+}
+
+static INLINE struct ureg_src
+ureg_imm1u( struct ureg_program *ureg,
+ unsigned a)
+{
+ return ureg_DECL_immediate_uint( ureg, &a, 1 );
+}
+
+static INLINE struct ureg_src
+ureg_imm4i( struct ureg_program *ureg,
+ int a, int b,
+ int c, int d)
+{
+ int v[4];
+ v[0] = a;
+ v[1] = b;
+ v[2] = c;
+ v[3] = d;
+ return ureg_DECL_immediate_int( ureg, v, 4 );
+}
+
+static INLINE struct ureg_src
+ureg_imm3i( struct ureg_program *ureg,
+ int a, int b,
+ int c)
+{
+ int v[3];
+ v[0] = a;
+ v[1] = b;
+ v[2] = c;
+ return ureg_DECL_immediate_int( ureg, v, 3 );
+}
+
+static INLINE struct ureg_src
+ureg_imm2i( struct ureg_program *ureg,
+ int a, int b)
+{
+ int v[2];
+ v[0] = a;
+ v[1] = b;
+ return ureg_DECL_immediate_int( ureg, v, 2 );
+}
+
+static INLINE struct ureg_src
+ureg_imm1i( struct ureg_program *ureg,
+ int a)
+{
+ return ureg_DECL_immediate_int( ureg, &a, 1 );
+}
+
+/***********************************************************************
+ * Functions for patching up labels
+ */
+
+
+/* Will return a number which can be used in a label to point to the
+ * next instruction to be emitted.
+ */
+unsigned
+ureg_get_instruction_number( struct ureg_program *ureg );
+
+
+/* Patch a given label (expressed as a token number) to point to a
+ * given instruction (expressed as an instruction number).
+ *
+ * Labels are obtained from instruction emitters, eg ureg_CAL().
+ * Instruction numbers are obtained from ureg_get_instruction_number(),
+ * above.
+ */
+void
+ureg_fixup_label(struct ureg_program *ureg,
+ unsigned label_token,
+ unsigned instruction_number );
+
+
+/* Generic instruction emitter. Use if you need to pass the opcode as
+ * a parameter, rather than using the emit_OP() variants below.
+ */
+void
+ureg_insn(struct ureg_program *ureg,
+ unsigned opcode,
+ const struct ureg_dst *dst,
+ unsigned nr_dst,
+ const struct ureg_src *src,
+ unsigned nr_src );
+
+
+void
+ureg_tex_insn(struct ureg_program *ureg,
+ unsigned opcode,
+ const struct ureg_dst *dst,
+ unsigned nr_dst,
+ unsigned target,
+ const struct tgsi_texture_offset *texoffsets,
+ unsigned nr_offset,
+ const struct ureg_src *src,
+ unsigned nr_src );
+
+
+void
+ureg_label_insn(struct ureg_program *ureg,
+ unsigned opcode,
+ const struct ureg_src *src,
+ unsigned nr_src,
+ unsigned *label);
+
+
+/***********************************************************************
+ * Internal instruction helpers, don't call these directly:
+ */
+
+struct ureg_emit_insn_result {
+ unsigned insn_token; /*< Used to fixup insn size. */
+ unsigned extended_token; /*< Used to set the Extended bit, usually the same as insn_token. */
+};
+
+struct ureg_emit_insn_result
+ureg_emit_insn(struct ureg_program *ureg,
+ unsigned opcode,
+ boolean saturate,
+ boolean predicate,
+ boolean pred_negate,
+ unsigned pred_swizzle_x,
+ unsigned pred_swizzle_y,
+ unsigned pred_swizzle_z,
+ unsigned pred_swizzle_w,
+ unsigned num_dst,
+ unsigned num_src );
+
+void
+ureg_emit_label(struct ureg_program *ureg,
+ unsigned insn_token,
+ unsigned *label_token );
+
+void
+ureg_emit_texture(struct ureg_program *ureg,
+ unsigned insn_token,
+ unsigned target, unsigned num_offsets);
+
+void
+ureg_emit_texture_offset(struct ureg_program *ureg,
+ const struct tgsi_texture_offset *offset);
+
+void
+ureg_emit_dst( struct ureg_program *ureg,
+ struct ureg_dst dst );
+
+void
+ureg_emit_src( struct ureg_program *ureg,
+ struct ureg_src src );
+
+void
+ureg_fixup_insn_size(struct ureg_program *ureg,
+ unsigned insn );
+
+
+#define OP00( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ unsigned insn = ureg_emit_insn(ureg, \
+ opcode, \
+ FALSE, \
+ FALSE, \
+ FALSE, \
+ TGSI_SWIZZLE_X, \
+ TGSI_SWIZZLE_Y, \
+ TGSI_SWIZZLE_Z, \
+ TGSI_SWIZZLE_W, \
+ 0, \
+ 0).insn_token; \
+ ureg_fixup_insn_size( ureg, insn ); \
+}
+
+#define OP01( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_src src ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ unsigned insn = ureg_emit_insn(ureg, \
+ opcode, \
+ FALSE, \
+ FALSE, \
+ FALSE, \
+ TGSI_SWIZZLE_X, \
+ TGSI_SWIZZLE_Y, \
+ TGSI_SWIZZLE_Z, \
+ TGSI_SWIZZLE_W, \
+ 0, \
+ 1).insn_token; \
+ ureg_emit_src( ureg, src ); \
+ ureg_fixup_insn_size( ureg, insn ); \
+}
+
+#define OP00_LBL( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ unsigned *label_token ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ struct ureg_emit_insn_result insn; \
+ insn = ureg_emit_insn(ureg, \
+ opcode, \
+ FALSE, \
+ FALSE, \
+ FALSE, \
+ TGSI_SWIZZLE_X, \
+ TGSI_SWIZZLE_Y, \
+ TGSI_SWIZZLE_Z, \
+ TGSI_SWIZZLE_W, \
+ 0, \
+ 0); \
+ ureg_emit_label( ureg, insn.extended_token, label_token ); \
+ ureg_fixup_insn_size( ureg, insn.insn_token ); \
+}
+
+#define OP01_LBL( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_src src, \
+ unsigned *label_token ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ struct ureg_emit_insn_result insn; \
+ insn = ureg_emit_insn(ureg, \
+ opcode, \
+ FALSE, \
+ FALSE, \
+ FALSE, \
+ TGSI_SWIZZLE_X, \
+ TGSI_SWIZZLE_Y, \
+ TGSI_SWIZZLE_Z, \
+ TGSI_SWIZZLE_W, \
+ 0, \
+ 1); \
+ ureg_emit_label( ureg, insn.extended_token, label_token ); \
+ ureg_emit_src( ureg, src ); \
+ ureg_fixup_insn_size( ureg, insn.insn_token ); \
+}
+
+#define OP10( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_dst dst ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ unsigned insn = ureg_emit_insn(ureg, \
+ opcode, \
+ dst.Saturate, \
+ dst.Predicate, \
+ dst.PredNegate, \
+ dst.PredSwizzleX, \
+ dst.PredSwizzleY, \
+ dst.PredSwizzleZ, \
+ dst.PredSwizzleW, \
+ 1, \
+ 0).insn_token; \
+ ureg_emit_dst( ureg, dst ); \
+ ureg_fixup_insn_size( ureg, insn ); \
+}
+
+
+#define OP11( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_dst dst, \
+ struct ureg_src src ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ unsigned insn = ureg_emit_insn(ureg, \
+ opcode, \
+ dst.Saturate, \
+ dst.Predicate, \
+ dst.PredNegate, \
+ dst.PredSwizzleX, \
+ dst.PredSwizzleY, \
+ dst.PredSwizzleZ, \
+ dst.PredSwizzleW, \
+ 1, \
+ 1).insn_token; \
+ ureg_emit_dst( ureg, dst ); \
+ ureg_emit_src( ureg, src ); \
+ ureg_fixup_insn_size( ureg, insn ); \
+}
+
+#define OP12( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_dst dst, \
+ struct ureg_src src0, \
+ struct ureg_src src1 ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ unsigned insn = ureg_emit_insn(ureg, \
+ opcode, \
+ dst.Saturate, \
+ dst.Predicate, \
+ dst.PredNegate, \
+ dst.PredSwizzleX, \
+ dst.PredSwizzleY, \
+ dst.PredSwizzleZ, \
+ dst.PredSwizzleW, \
+ 1, \
+ 2).insn_token; \
+ ureg_emit_dst( ureg, dst ); \
+ ureg_emit_src( ureg, src0 ); \
+ ureg_emit_src( ureg, src1 ); \
+ ureg_fixup_insn_size( ureg, insn ); \
+}
+
+#define OP12_TEX( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_dst dst, \
+ unsigned target, \
+ struct ureg_src src0, \
+ struct ureg_src src1 ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ struct ureg_emit_insn_result insn; \
+ insn = ureg_emit_insn(ureg, \
+ opcode, \
+ dst.Saturate, \
+ dst.Predicate, \
+ dst.PredNegate, \
+ dst.PredSwizzleX, \
+ dst.PredSwizzleY, \
+ dst.PredSwizzleZ, \
+ dst.PredSwizzleW, \
+ 1, \
+ 2); \
+ ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \
+ ureg_emit_dst( ureg, dst ); \
+ ureg_emit_src( ureg, src0 ); \
+ ureg_emit_src( ureg, src1 ); \
+ ureg_fixup_insn_size( ureg, insn.insn_token ); \
+}
+
+#define OP12_SAMPLE( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_dst dst, \
+ struct ureg_src src0, \
+ struct ureg_src src1 ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ unsigned target = TGSI_TEXTURE_UNKNOWN; \
+ struct ureg_emit_insn_result insn; \
+ insn = ureg_emit_insn(ureg, \
+ opcode, \
+ dst.Saturate, \
+ dst.Predicate, \
+ dst.PredNegate, \
+ dst.PredSwizzleX, \
+ dst.PredSwizzleY, \
+ dst.PredSwizzleZ, \
+ dst.PredSwizzleW, \
+ 1, \
+ 2); \
+ ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \
+ ureg_emit_dst( ureg, dst ); \
+ ureg_emit_src( ureg, src0 ); \
+ ureg_emit_src( ureg, src1 ); \
+ ureg_fixup_insn_size( ureg, insn.insn_token ); \
+}
+
+#define OP13( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_dst dst, \
+ struct ureg_src src0, \
+ struct ureg_src src1, \
+ struct ureg_src src2 ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ unsigned insn = ureg_emit_insn(ureg, \
+ opcode, \
+ dst.Saturate, \
+ dst.Predicate, \
+ dst.PredNegate, \
+ dst.PredSwizzleX, \
+ dst.PredSwizzleY, \
+ dst.PredSwizzleZ, \
+ dst.PredSwizzleW, \
+ 1, \
+ 3).insn_token; \
+ ureg_emit_dst( ureg, dst ); \
+ ureg_emit_src( ureg, src0 ); \
+ ureg_emit_src( ureg, src1 ); \
+ ureg_emit_src( ureg, src2 ); \
+ ureg_fixup_insn_size( ureg, insn ); \
+}
+
+#define OP13_SAMPLE( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_dst dst, \
+ struct ureg_src src0, \
+ struct ureg_src src1, \
+ struct ureg_src src2 ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ unsigned target = TGSI_TEXTURE_UNKNOWN; \
+ struct ureg_emit_insn_result insn; \
+ insn = ureg_emit_insn(ureg, \
+ opcode, \
+ dst.Saturate, \
+ dst.Predicate, \
+ dst.PredNegate, \
+ dst.PredSwizzleX, \
+ dst.PredSwizzleY, \
+ dst.PredSwizzleZ, \
+ dst.PredSwizzleW, \
+ 1, \
+ 3); \
+ ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \
+ ureg_emit_dst( ureg, dst ); \
+ ureg_emit_src( ureg, src0 ); \
+ ureg_emit_src( ureg, src1 ); \
+ ureg_emit_src( ureg, src2 ); \
+ ureg_fixup_insn_size( ureg, insn.insn_token ); \
+}
+
+#define OP14_TEX( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_dst dst, \
+ unsigned target, \
+ struct ureg_src src0, \
+ struct ureg_src src1, \
+ struct ureg_src src2, \
+ struct ureg_src src3 ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ struct ureg_emit_insn_result insn; \
+ insn = ureg_emit_insn(ureg, \
+ opcode, \
+ dst.Saturate, \
+ dst.Predicate, \
+ dst.PredNegate, \
+ dst.PredSwizzleX, \
+ dst.PredSwizzleY, \
+ dst.PredSwizzleZ, \
+ dst.PredSwizzleW, \
+ 1, \
+ 4); \
+ ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \
+ ureg_emit_dst( ureg, dst ); \
+ ureg_emit_src( ureg, src0 ); \
+ ureg_emit_src( ureg, src1 ); \
+ ureg_emit_src( ureg, src2 ); \
+ ureg_emit_src( ureg, src3 ); \
+ ureg_fixup_insn_size( ureg, insn.insn_token ); \
+}
+
+#define OP14_SAMPLE( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_dst dst, \
+ struct ureg_src src0, \
+ struct ureg_src src1, \
+ struct ureg_src src2, \
+ struct ureg_src src3 ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ unsigned target = TGSI_TEXTURE_UNKNOWN; \
+ struct ureg_emit_insn_result insn; \
+ insn = ureg_emit_insn(ureg, \
+ opcode, \
+ dst.Saturate, \
+ dst.Predicate, \
+ dst.PredNegate, \
+ dst.PredSwizzleX, \
+ dst.PredSwizzleY, \
+ dst.PredSwizzleZ, \
+ dst.PredSwizzleW, \
+ 1, \
+ 4); \
+ ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \
+ ureg_emit_dst( ureg, dst ); \
+ ureg_emit_src( ureg, src0 ); \
+ ureg_emit_src( ureg, src1 ); \
+ ureg_emit_src( ureg, src2 ); \
+ ureg_emit_src( ureg, src3 ); \
+ ureg_fixup_insn_size( ureg, insn.insn_token ); \
+}
+
+
+#define OP14( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_dst dst, \
+ struct ureg_src src0, \
+ struct ureg_src src1, \
+ struct ureg_src src2, \
+ struct ureg_src src3 ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ unsigned insn = ureg_emit_insn(ureg, \
+ opcode, \
+ dst.Saturate, \
+ dst.Predicate, \
+ dst.PredNegate, \
+ dst.PredSwizzleX, \
+ dst.PredSwizzleY, \
+ dst.PredSwizzleZ, \
+ dst.PredSwizzleW, \
+ 1, \
+ 4).insn_token; \
+ ureg_emit_dst( ureg, dst ); \
+ ureg_emit_src( ureg, src0 ); \
+ ureg_emit_src( ureg, src1 ); \
+ ureg_emit_src( ureg, src2 ); \
+ ureg_emit_src( ureg, src3 ); \
+ ureg_fixup_insn_size( ureg, insn ); \
+}
+
+
+#define OP15( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_dst dst, \
+ struct ureg_src src0, \
+ struct ureg_src src1, \
+ struct ureg_src src2, \
+ struct ureg_src src3, \
+ struct ureg_src src4 ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ unsigned insn = ureg_emit_insn(ureg, \
+ opcode, \
+ dst.Saturate, \
+ dst.Predicate, \
+ dst.PredNegate, \
+ dst.PredSwizzleX, \
+ dst.PredSwizzleY, \
+ dst.PredSwizzleZ, \
+ dst.PredSwizzleW, \
+ 1, \
+ 5).insn_token; \
+ ureg_emit_dst( ureg, dst ); \
+ ureg_emit_src( ureg, src0 ); \
+ ureg_emit_src( ureg, src1 ); \
+ ureg_emit_src( ureg, src2 ); \
+ ureg_emit_src( ureg, src3 ); \
+ ureg_emit_src( ureg, src4 ); \
+ ureg_fixup_insn_size( ureg, insn ); \
+}
+
+#define OP15_SAMPLE( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_dst dst, \
+ struct ureg_src src0, \
+ struct ureg_src src1, \
+ struct ureg_src src2, \
+ struct ureg_src src3, \
+ struct ureg_src src4 ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ unsigned target = TGSI_TEXTURE_UNKNOWN; \
+ struct ureg_emit_insn_result insn; \
+ insn = ureg_emit_insn(ureg, \
+ opcode, \
+ dst.Saturate, \
+ dst.Predicate, \
+ dst.PredNegate, \
+ dst.PredSwizzleX, \
+ dst.PredSwizzleY, \
+ dst.PredSwizzleZ, \
+ dst.PredSwizzleW, \
+ 1, \
+ 5); \
+ ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \
+ ureg_emit_dst( ureg, dst ); \
+ ureg_emit_src( ureg, src0 ); \
+ ureg_emit_src( ureg, src1 ); \
+ ureg_emit_src( ureg, src2 ); \
+ ureg_emit_src( ureg, src3 ); \
+ ureg_emit_src( ureg, src4 ); \
+ ureg_fixup_insn_size( ureg, insn.insn_token ); \
+}
+
+/* Use a template include to generate a correctly-typed ureg_OP()
+ * function for each TGSI opcode:
+ */
+#include "tgsi_opcode_tmp.h"
+
+
+/***********************************************************************
+ * Inline helpers for manipulating register structs:
+ */
+static INLINE struct ureg_src
+ureg_negate( struct ureg_src reg )
+{
+ assert(reg.File != TGSI_FILE_NULL);
+ reg.Negate ^= 1;
+ return reg;
+}
+
+static INLINE struct ureg_src
+ureg_abs( struct ureg_src reg )
+{
+ assert(reg.File != TGSI_FILE_NULL);
+ reg.Absolute = 1;
+ reg.Negate = 0;
+ return reg;
+}
+
+static INLINE struct ureg_src
+ureg_swizzle( struct ureg_src reg,
+ int x, int y, int z, int w )
+{
+ unsigned swz = ( (reg.SwizzleX << 0) |
+ (reg.SwizzleY << 2) |
+ (reg.SwizzleZ << 4) |
+ (reg.SwizzleW << 6));
+
+ assert(reg.File != TGSI_FILE_NULL);
+ assert(x < 4);
+ assert(y < 4);
+ assert(z < 4);
+ assert(w < 4);
+
+ reg.SwizzleX = (swz >> (x*2)) & 0x3;
+ reg.SwizzleY = (swz >> (y*2)) & 0x3;
+ reg.SwizzleZ = (swz >> (z*2)) & 0x3;
+ reg.SwizzleW = (swz >> (w*2)) & 0x3;
+ return reg;
+}
+
+static INLINE struct ureg_src
+ureg_scalar( struct ureg_src reg, int x )
+{
+ return ureg_swizzle(reg, x, x, x, x);
+}
+
+static INLINE struct ureg_dst
+ureg_writemask( struct ureg_dst reg,
+ unsigned writemask )
+{
+ assert(reg.File != TGSI_FILE_NULL);
+ reg.WriteMask &= writemask;
+ return reg;
+}
+
+static INLINE struct ureg_dst
+ureg_saturate( struct ureg_dst reg )
+{
+ assert(reg.File != TGSI_FILE_NULL);
+ reg.Saturate = 1;
+ return reg;
+}
+
+static INLINE struct ureg_dst
+ureg_predicate(struct ureg_dst reg,
+ boolean negate,
+ unsigned swizzle_x,
+ unsigned swizzle_y,
+ unsigned swizzle_z,
+ unsigned swizzle_w)
+{
+ assert(reg.File != TGSI_FILE_NULL);
+ reg.Predicate = 1;
+ reg.PredNegate = negate;
+ reg.PredSwizzleX = swizzle_x;
+ reg.PredSwizzleY = swizzle_y;
+ reg.PredSwizzleZ = swizzle_z;
+ reg.PredSwizzleW = swizzle_w;
+ return reg;
+}
+
+static INLINE struct ureg_dst
+ureg_dst_indirect( struct ureg_dst reg, struct ureg_src addr )
+{
+ assert(reg.File != TGSI_FILE_NULL);
+ assert(addr.File == TGSI_FILE_ADDRESS || addr.File == TGSI_FILE_TEMPORARY);
+ reg.Indirect = 1;
+ reg.IndirectFile = addr.File;
+ reg.IndirectIndex = addr.Index;
+ reg.IndirectSwizzle = addr.SwizzleX;
+ return reg;
+}
+
+static INLINE struct ureg_src
+ureg_src_indirect( struct ureg_src reg, struct ureg_src addr )
+{
+ assert(reg.File != TGSI_FILE_NULL);
+ assert(addr.File == TGSI_FILE_ADDRESS || addr.File == TGSI_FILE_TEMPORARY);
+ reg.Indirect = 1;
+ reg.IndirectFile = addr.File;
+ reg.IndirectIndex = addr.Index;
+ reg.IndirectSwizzle = addr.SwizzleX;
+ return reg;
+}
+
+static INLINE struct ureg_src
+ureg_src_dimension( struct ureg_src reg, int index )
+{
+ assert(reg.File != TGSI_FILE_NULL);
+ reg.Dimension = 1;
+ reg.DimIndirect = 0;
+ reg.DimensionIndex = index;
+ return reg;
+}
+
+
+static INLINE struct ureg_src
+ureg_src_dimension_indirect( struct ureg_src reg, struct ureg_src addr,
+ int index )
+{
+ assert(reg.File != TGSI_FILE_NULL);
+ reg.Dimension = 1;
+ reg.DimIndirect = 1;
+ reg.DimensionIndex = index;
+ reg.DimIndFile = addr.File;
+ reg.DimIndIndex = addr.Index;
+ reg.DimIndSwizzle = addr.SwizzleX;
+ return reg;
+}
+
+static INLINE struct ureg_dst
+ureg_dst_array_offset( struct ureg_dst reg, int offset )
+{
+ assert(reg.File == TGSI_FILE_TEMPORARY);
+ reg.Index += offset;
+ return reg;
+}
+
+static INLINE struct ureg_dst
+ureg_dst( struct ureg_src src )
+{
+ struct ureg_dst dst;
+
+ assert(!src.Indirect ||
+ (src.IndirectFile == TGSI_FILE_ADDRESS ||
+ src.IndirectFile == TGSI_FILE_TEMPORARY));
+
+ dst.File = src.File;
+ dst.WriteMask = TGSI_WRITEMASK_XYZW;
+ dst.IndirectFile = src.IndirectFile;
+ dst.Indirect = src.Indirect;
+ dst.IndirectIndex = src.IndirectIndex;
+ dst.IndirectSwizzle = src.IndirectSwizzle;
+ dst.Saturate = 0;
+ dst.Predicate = 0;
+ dst.PredNegate = 0;
+ dst.PredSwizzleX = TGSI_SWIZZLE_X;
+ dst.PredSwizzleY = TGSI_SWIZZLE_Y;
+ dst.PredSwizzleZ = TGSI_SWIZZLE_Z;
+ dst.PredSwizzleW = TGSI_SWIZZLE_W;
+ dst.Index = src.Index;
+ dst.ArrayID = src.ArrayID;
+
+ return dst;
+}
+
+static INLINE struct ureg_src
+ureg_src_register(unsigned file,
+ unsigned index)
+{
+ struct ureg_src src;
+
+ src.File = file;
+ src.SwizzleX = TGSI_SWIZZLE_X;
+ src.SwizzleY = TGSI_SWIZZLE_Y;
+ src.SwizzleZ = TGSI_SWIZZLE_Z;
+ src.SwizzleW = TGSI_SWIZZLE_W;
+ src.Indirect = 0;
+ src.IndirectFile = TGSI_FILE_NULL;
+ src.IndirectIndex = 0;
+ src.IndirectSwizzle = 0;
+ src.Absolute = 0;
+ src.Index = index;
+ src.Negate = 0;
+ src.Dimension = 0;
+ src.DimensionIndex = 0;
+ src.DimIndirect = 0;
+ src.DimIndFile = TGSI_FILE_NULL;
+ src.DimIndIndex = 0;
+ src.DimIndSwizzle = 0;
+ src.ArrayID = 0;
+
+ return src;
+}
+
+static INLINE struct ureg_src
+ureg_src( struct ureg_dst dst )
+{
+ struct ureg_src src;
+
+ src.File = dst.File;
+ src.SwizzleX = TGSI_SWIZZLE_X;
+ src.SwizzleY = TGSI_SWIZZLE_Y;
+ src.SwizzleZ = TGSI_SWIZZLE_Z;
+ src.SwizzleW = TGSI_SWIZZLE_W;
+ src.Indirect = dst.Indirect;
+ src.IndirectFile = dst.IndirectFile;
+ src.IndirectIndex = dst.IndirectIndex;
+ src.IndirectSwizzle = dst.IndirectSwizzle;
+ src.Absolute = 0;
+ src.Index = dst.Index;
+ src.Negate = 0;
+ src.Dimension = 0;
+ src.DimensionIndex = 0;
+ src.DimIndirect = 0;
+ src.DimIndFile = TGSI_FILE_NULL;
+ src.DimIndIndex = 0;
+ src.DimIndSwizzle = 0;
+ src.ArrayID = dst.ArrayID;
+
+ return src;
+}
+
+
+
+static INLINE struct ureg_dst
+ureg_dst_undef( void )
+{
+ struct ureg_dst dst;
+
+ dst.File = TGSI_FILE_NULL;
+ dst.WriteMask = 0;
+ dst.Indirect = 0;
+ dst.IndirectFile = TGSI_FILE_NULL;
+ dst.IndirectIndex = 0;
+ dst.IndirectSwizzle = 0;
+ dst.Saturate = 0;
+ dst.Predicate = 0;
+ dst.PredNegate = 0;
+ dst.PredSwizzleX = TGSI_SWIZZLE_X;
+ dst.PredSwizzleY = TGSI_SWIZZLE_Y;
+ dst.PredSwizzleZ = TGSI_SWIZZLE_Z;
+ dst.PredSwizzleW = TGSI_SWIZZLE_W;
+ dst.Index = 0;
+ dst.ArrayID = 0;
+
+ return dst;
+}
+
+static INLINE struct ureg_src
+ureg_src_undef( void )
+{
+ struct ureg_src src;
+
+ src.File = TGSI_FILE_NULL;
+ src.SwizzleX = 0;
+ src.SwizzleY = 0;
+ src.SwizzleZ = 0;
+ src.SwizzleW = 0;
+ src.Indirect = 0;
+ src.IndirectFile = TGSI_FILE_NULL;
+ src.IndirectIndex = 0;
+ src.IndirectSwizzle = 0;
+ src.Absolute = 0;
+ src.Index = 0;
+ src.Negate = 0;
+ src.Dimension = 0;
+ src.DimensionIndex = 0;
+ src.DimIndirect = 0;
+ src.DimIndFile = TGSI_FILE_NULL;
+ src.DimIndIndex = 0;
+ src.DimIndSwizzle = 0;
+ src.ArrayID = 0;
+
+ return src;
+}
+
+static INLINE boolean
+ureg_src_is_undef( struct ureg_src src )
+{
+ return src.File == TGSI_FILE_NULL;
+}
+
+static INLINE boolean
+ureg_dst_is_undef( struct ureg_dst dst )
+{
+ return dst.File == TGSI_FILE_NULL;
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_util.c b/src/minigallium/auxiliary/tgsi/tgsi_util.c
new file mode 100644
index 0000000..b3bc8f2
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_util.c
@@ -0,0 +1,461 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "util/u_debug.h"
+#include "pipe/p_shader_tokens.h"
+#include "tgsi_parse.h"
+#include "tgsi_util.h"
+
+union pointer_hack
+{
+ void *pointer;
+ uint64_t uint64;
+};
+
+void *
+tgsi_align_128bit(
+ void *unaligned )
+{
+ union pointer_hack ph;
+
+ ph.uint64 = 0;
+ ph.pointer = unaligned;
+ ph.uint64 = (ph.uint64 + 15) & ~15;
+ return ph.pointer;
+}
+
+unsigned
+tgsi_util_get_src_register_swizzle(
+ const struct tgsi_src_register *reg,
+ unsigned component )
+{
+ switch( component ) {
+ case 0:
+ return reg->SwizzleX;
+ case 1:
+ return reg->SwizzleY;
+ case 2:
+ return reg->SwizzleZ;
+ case 3:
+ return reg->SwizzleW;
+ default:
+ assert( 0 );
+ }
+ return 0;
+}
+
+
+unsigned
+tgsi_util_get_full_src_register_swizzle(
+ const struct tgsi_full_src_register *reg,
+ unsigned component )
+{
+ return tgsi_util_get_src_register_swizzle(
+ &reg->Register,
+ component );
+}
+
+void
+tgsi_util_set_src_register_swizzle(
+ struct tgsi_src_register *reg,
+ unsigned swizzle,
+ unsigned component )
+{
+ switch( component ) {
+ case 0:
+ reg->SwizzleX = swizzle;
+ break;
+ case 1:
+ reg->SwizzleY = swizzle;
+ break;
+ case 2:
+ reg->SwizzleZ = swizzle;
+ break;
+ case 3:
+ reg->SwizzleW = swizzle;
+ break;
+ default:
+ assert( 0 );
+ }
+}
+
+unsigned
+tgsi_util_get_full_src_register_sign_mode(
+ const struct tgsi_full_src_register *reg,
+ unsigned component )
+{
+ unsigned sign_mode;
+
+ if( reg->Register.Absolute ) {
+ /* Consider only the post-abs negation. */
+
+ if( reg->Register.Negate ) {
+ sign_mode = TGSI_UTIL_SIGN_SET;
+ }
+ else {
+ sign_mode = TGSI_UTIL_SIGN_CLEAR;
+ }
+ }
+ else {
+ if( reg->Register.Negate ) {
+ sign_mode = TGSI_UTIL_SIGN_TOGGLE;
+ }
+ else {
+ sign_mode = TGSI_UTIL_SIGN_KEEP;
+ }
+ }
+
+ return sign_mode;
+}
+
+void
+tgsi_util_set_full_src_register_sign_mode(
+ struct tgsi_full_src_register *reg,
+ unsigned sign_mode )
+{
+ switch (sign_mode)
+ {
+ case TGSI_UTIL_SIGN_CLEAR:
+ reg->Register.Negate = 0;
+ reg->Register.Absolute = 1;
+ break;
+
+ case TGSI_UTIL_SIGN_SET:
+ reg->Register.Absolute = 1;
+ reg->Register.Negate = 1;
+ break;
+
+ case TGSI_UTIL_SIGN_TOGGLE:
+ reg->Register.Negate = 1;
+ reg->Register.Absolute = 0;
+ break;
+
+ case TGSI_UTIL_SIGN_KEEP:
+ reg->Register.Negate = 0;
+ reg->Register.Absolute = 0;
+ break;
+
+ default:
+ assert( 0 );
+ }
+}
+
+/**
+ * Determine which channels of the specificed src register are effectively
+ * used by this instruction.
+ */
+unsigned
+tgsi_util_get_inst_usage_mask(const struct tgsi_full_instruction *inst,
+ unsigned src_idx)
+{
+ const struct tgsi_full_src_register *src = &inst->Src[src_idx];
+ unsigned write_mask = inst->Dst[0].Register.WriteMask;
+ unsigned read_mask;
+ unsigned usage_mask;
+ unsigned chan;
+
+ switch (inst->Instruction.Opcode) {
+ case TGSI_OPCODE_MOV:
+ case TGSI_OPCODE_ARL:
+ case TGSI_OPCODE_ARR:
+ case TGSI_OPCODE_RCP:
+ case TGSI_OPCODE_MUL:
+ case TGSI_OPCODE_DIV:
+ case TGSI_OPCODE_ADD:
+ case TGSI_OPCODE_MIN:
+ case TGSI_OPCODE_MAX:
+ case TGSI_OPCODE_SLT:
+ case TGSI_OPCODE_SGE:
+ case TGSI_OPCODE_MAD:
+ case TGSI_OPCODE_SUB:
+ case TGSI_OPCODE_LRP:
+ case TGSI_OPCODE_CND:
+ case TGSI_OPCODE_FRC:
+ case TGSI_OPCODE_CEIL:
+ case TGSI_OPCODE_CLAMP:
+ case TGSI_OPCODE_FLR:
+ case TGSI_OPCODE_ROUND:
+ case TGSI_OPCODE_POW:
+ case TGSI_OPCODE_ABS:
+ case TGSI_OPCODE_COS:
+ case TGSI_OPCODE_SIN:
+ case TGSI_OPCODE_DDX:
+ case TGSI_OPCODE_DDY:
+ case TGSI_OPCODE_SEQ:
+ case TGSI_OPCODE_SGT:
+ case TGSI_OPCODE_SLE:
+ case TGSI_OPCODE_SNE:
+ case TGSI_OPCODE_SSG:
+ case TGSI_OPCODE_CMP:
+ case TGSI_OPCODE_TRUNC:
+ case TGSI_OPCODE_NOT:
+ case TGSI_OPCODE_AND:
+ case TGSI_OPCODE_OR:
+ case TGSI_OPCODE_XOR:
+ case TGSI_OPCODE_SAD:
+ case TGSI_OPCODE_FSEQ:
+ case TGSI_OPCODE_FSGE:
+ case TGSI_OPCODE_FSLT:
+ case TGSI_OPCODE_FSNE:
+ case TGSI_OPCODE_F2I:
+ case TGSI_OPCODE_IDIV:
+ case TGSI_OPCODE_IMAX:
+ case TGSI_OPCODE_IMIN:
+ case TGSI_OPCODE_INEG:
+ case TGSI_OPCODE_ISGE:
+ case TGSI_OPCODE_ISHR:
+ case TGSI_OPCODE_ISLT:
+ case TGSI_OPCODE_F2U:
+ case TGSI_OPCODE_U2F:
+ case TGSI_OPCODE_UADD:
+ case TGSI_OPCODE_UDIV:
+ case TGSI_OPCODE_UMAD:
+ case TGSI_OPCODE_UMAX:
+ case TGSI_OPCODE_UMIN:
+ case TGSI_OPCODE_UMOD:
+ case TGSI_OPCODE_UMUL:
+ case TGSI_OPCODE_USEQ:
+ case TGSI_OPCODE_USGE:
+ case TGSI_OPCODE_USHR:
+ case TGSI_OPCODE_USLT:
+ case TGSI_OPCODE_USNE:
+ /* Channel-wise operations */
+ read_mask = write_mask;
+ break;
+
+ case TGSI_OPCODE_EX2:
+ case TGSI_OPCODE_LG2:
+ case TGSI_OPCODE_RCC:
+ read_mask = TGSI_WRITEMASK_X;
+ break;
+
+ case TGSI_OPCODE_SCS:
+ read_mask = write_mask & TGSI_WRITEMASK_XY ? TGSI_WRITEMASK_X : 0;
+ break;
+
+ case TGSI_OPCODE_EXP:
+ case TGSI_OPCODE_LOG:
+ read_mask = write_mask & TGSI_WRITEMASK_XYZ ? TGSI_WRITEMASK_X : 0;
+ break;
+
+ case TGSI_OPCODE_DP2A:
+ read_mask = src_idx == 2 ? TGSI_WRITEMASK_X : TGSI_WRITEMASK_XY;
+ break;
+
+ case TGSI_OPCODE_DP2:
+ read_mask = TGSI_WRITEMASK_XY;
+ break;
+
+ case TGSI_OPCODE_DP3:
+ read_mask = TGSI_WRITEMASK_XYZ;
+ break;
+
+ case TGSI_OPCODE_DP4:
+ read_mask = TGSI_WRITEMASK_XYZW;
+ break;
+
+ case TGSI_OPCODE_DPH:
+ read_mask = src_idx == 0 ? TGSI_WRITEMASK_XYZ : TGSI_WRITEMASK_XYZW;
+ break;
+
+ case TGSI_OPCODE_TEX:
+ case TGSI_OPCODE_TXD:
+ case TGSI_OPCODE_TXB:
+ case TGSI_OPCODE_TXL:
+ case TGSI_OPCODE_TXP:
+ if (src_idx == 0) {
+ /* Note that the SHADOW variants use the Z component too */
+ switch (inst->Texture.Texture) {
+ case TGSI_TEXTURE_1D:
+ read_mask = TGSI_WRITEMASK_X;
+ break;
+ case TGSI_TEXTURE_SHADOW1D:
+ read_mask = TGSI_WRITEMASK_XZ;
+ break;
+ case TGSI_TEXTURE_1D_ARRAY:
+ case TGSI_TEXTURE_2D:
+ case TGSI_TEXTURE_RECT:
+ read_mask = TGSI_WRITEMASK_XY;
+ break;
+ case TGSI_TEXTURE_SHADOW1D_ARRAY:
+ case TGSI_TEXTURE_SHADOW2D:
+ case TGSI_TEXTURE_SHADOWRECT:
+ case TGSI_TEXTURE_2D_ARRAY:
+ case TGSI_TEXTURE_3D:
+ case TGSI_TEXTURE_CUBE:
+ case TGSI_TEXTURE_2D_MSAA:
+ read_mask = TGSI_WRITEMASK_XYZ;
+ break;
+ case TGSI_TEXTURE_SHADOW2D_ARRAY:
+ case TGSI_TEXTURE_CUBE_ARRAY:
+ case TGSI_TEXTURE_SHADOWCUBE:
+ case TGSI_TEXTURE_2D_ARRAY_MSAA:
+ case TGSI_TEXTURE_SHADOWCUBE_ARRAY:
+ read_mask = TGSI_WRITEMASK_XYZW;
+ break;
+ default:
+ assert(0);
+ read_mask = 0;
+ }
+
+ if (inst->Instruction.Opcode != TGSI_OPCODE_TEX) {
+ read_mask |= TGSI_WRITEMASK_W;
+ }
+ } else {
+ /* A safe approximation */
+ read_mask = TGSI_WRITEMASK_XYZW;
+ }
+ break;
+
+ default:
+ /* Assume all channels are read */
+ read_mask = TGSI_WRITEMASK_XYZW;
+ break;
+ }
+
+ usage_mask = 0;
+ for (chan = 0; chan < 4; ++chan) {
+ if (read_mask & (1 << chan)) {
+ usage_mask |= 1 << tgsi_util_get_full_src_register_swizzle(src, chan);
+ }
+ }
+
+ return usage_mask;
+}
+
+/**
+ * Convert a tgsi_ind_register into a tgsi_src_register
+ */
+struct tgsi_src_register
+tgsi_util_get_src_from_ind(const struct tgsi_ind_register *reg)
+{
+ struct tgsi_src_register src = { 0 };
+
+ src.File = reg->File;
+ src.Index = reg->Index;
+ src.SwizzleX = reg->Swizzle;
+ src.SwizzleY = reg->Swizzle;
+ src.SwizzleZ = reg->Swizzle;
+ src.SwizzleW = reg->Swizzle;
+
+ return src;
+}
+
+/**
+ * Return the dimension of the texture coordinates (layer included for array
+ * textures), as well as the location of the shadow reference value or the
+ * sample index.
+ */
+int
+tgsi_util_get_texture_coord_dim(int tgsi_tex, int *shadow_or_sample)
+{
+ int dim;
+
+ /*
+ * Depending on the texture target, (src0.xyzw, src1.x) is interpreted
+ * differently:
+ *
+ * (s, X, X, X, X), for BUFFER
+ * (s, X, X, X, X), for 1D
+ * (s, t, X, X, X), for 2D, RECT
+ * (s, t, r, X, X), for 3D, CUBE
+ *
+ * (s, layer, X, X, X), for 1D_ARRAY
+ * (s, t, layer, X, X), for 2D_ARRAY
+ * (s, t, r, layer, X), for CUBE_ARRAY
+ *
+ * (s, X, shadow, X, X), for SHADOW1D
+ * (s, t, shadow, X, X), for SHADOW2D, SHADOWRECT
+ * (s, t, r, shadow, X), for SHADOWCUBE
+ *
+ * (s, layer, shadow, X, X), for SHADOW1D_ARRAY
+ * (s, t, layer, shadow, X), for SHADOW2D_ARRAY
+ * (s, t, r, layer, shadow), for SHADOWCUBE_ARRAY
+ *
+ * (s, t, sample, X, X), for 2D_MSAA
+ * (s, t, layer, sample, X), for 2D_ARRAY_MSAA
+ */
+ switch (tgsi_tex) {
+ case TGSI_TEXTURE_BUFFER:
+ case TGSI_TEXTURE_1D:
+ case TGSI_TEXTURE_SHADOW1D:
+ dim = 1;
+ break;
+ case TGSI_TEXTURE_2D:
+ case TGSI_TEXTURE_RECT:
+ case TGSI_TEXTURE_1D_ARRAY:
+ case TGSI_TEXTURE_SHADOW2D:
+ case TGSI_TEXTURE_SHADOWRECT:
+ case TGSI_TEXTURE_SHADOW1D_ARRAY:
+ case TGSI_TEXTURE_2D_MSAA:
+ dim = 2;
+ break;
+ case TGSI_TEXTURE_3D:
+ case TGSI_TEXTURE_CUBE:
+ case TGSI_TEXTURE_2D_ARRAY:
+ case TGSI_TEXTURE_SHADOWCUBE:
+ case TGSI_TEXTURE_SHADOW2D_ARRAY:
+ case TGSI_TEXTURE_2D_ARRAY_MSAA:
+ dim = 3;
+ break;
+ case TGSI_TEXTURE_CUBE_ARRAY:
+ case TGSI_TEXTURE_SHADOWCUBE_ARRAY:
+ dim = 4;
+ break;
+ default:
+ assert(!"unknown texture target");
+ dim = 0;
+ break;
+ }
+
+ if (shadow_or_sample) {
+ switch (tgsi_tex) {
+ case TGSI_TEXTURE_SHADOW1D:
+ /* there is a gap */
+ *shadow_or_sample = 2;
+ break;
+ case TGSI_TEXTURE_SHADOW2D:
+ case TGSI_TEXTURE_SHADOWRECT:
+ case TGSI_TEXTURE_SHADOWCUBE:
+ case TGSI_TEXTURE_SHADOW1D_ARRAY:
+ case TGSI_TEXTURE_SHADOW2D_ARRAY:
+ case TGSI_TEXTURE_SHADOWCUBE_ARRAY:
+ *shadow_or_sample = dim;
+ break;
+ case TGSI_TEXTURE_2D_MSAA:
+ case TGSI_TEXTURE_2D_ARRAY_MSAA:
+ *shadow_or_sample = 3;
+ break;
+ default:
+ /* no shadow nor sample */
+ *shadow_or_sample = -1;
+ break;
+ }
+ }
+
+ return dim;
+}
diff --git a/src/minigallium/auxiliary/tgsi/tgsi_util.h b/src/minigallium/auxiliary/tgsi/tgsi_util.h
new file mode 100644
index 0000000..c1184c8
--- /dev/null
+++ b/src/minigallium/auxiliary/tgsi/tgsi_util.h
@@ -0,0 +1,89 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef TGSI_UTIL_H
+#define TGSI_UTIL_H
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+struct tgsi_src_register;
+struct tgsi_full_src_register;
+struct tgsi_full_instruction;
+
+void *
+tgsi_align_128bit(
+ void *unaligned );
+
+unsigned
+tgsi_util_get_src_register_swizzle(
+ const struct tgsi_src_register *reg,
+ unsigned component );
+
+
+unsigned
+tgsi_util_get_full_src_register_swizzle(
+ const struct tgsi_full_src_register *reg,
+ unsigned component );
+
+void
+tgsi_util_set_src_register_swizzle(
+ struct tgsi_src_register *reg,
+ unsigned swizzle,
+ unsigned component );
+
+#define TGSI_UTIL_SIGN_CLEAR 0 /* Force positive */
+#define TGSI_UTIL_SIGN_SET 1 /* Force negative */
+#define TGSI_UTIL_SIGN_TOGGLE 2 /* Negate */
+#define TGSI_UTIL_SIGN_KEEP 3 /* No change */
+
+unsigned
+tgsi_util_get_full_src_register_sign_mode(
+ const struct tgsi_full_src_register *reg,
+ unsigned component );
+
+void
+tgsi_util_set_full_src_register_sign_mode(
+ struct tgsi_full_src_register *reg,
+ unsigned sign_mode );
+
+unsigned
+tgsi_util_get_inst_usage_mask(const struct tgsi_full_instruction *inst,
+ unsigned src_idx);
+
+struct tgsi_src_register
+tgsi_util_get_src_from_ind(const struct tgsi_ind_register *reg);
+
+int
+tgsi_util_get_texture_coord_dim(int tgsi_tex, int *shadow_or_sample);
+
+#if defined __cplusplus
+}
+#endif
+
+#endif /* TGSI_UTIL_H */
diff --git a/src/minigallium/auxiliary/translate/translate.c b/src/minigallium/auxiliary/translate/translate.c
new file mode 100644
index 0000000..73287b6
--- /dev/null
+++ b/src/minigallium/auxiliary/translate/translate.c
@@ -0,0 +1,55 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+ /*
+ * Authors:
+ * Keith Whitwell <keith@tungstengraphics.com>
+ */
+
+#include "pipe/p_config.h"
+#include "pipe/p_state.h"
+#include "translate.h"
+
+struct translate *translate_create( const struct translate_key *key )
+{
+ struct translate *translate = NULL;
+
+#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
+ translate = translate_sse2_create( key );
+ if (translate)
+ return translate;
+#else
+ (void)translate;
+#endif
+
+ return translate_generic_create( key );
+}
+
+boolean translate_is_output_format_supported(enum pipe_format format)
+{
+ return translate_generic_is_output_format_supported(format);
+}
diff --git a/src/minigallium/auxiliary/translate/translate.h b/src/minigallium/auxiliary/translate/translate.h
new file mode 100644
index 0000000..1132114
--- /dev/null
+++ b/src/minigallium/auxiliary/translate/translate.h
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2008 Tungsten Graphics, inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * TUNGSTEN GRAPHICS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/**
+ * Vertex fetch/store/convert code. This functionality is used in two places:
+ * 1. Vertex fetch/convert - to grab vertex data from incoming vertex
+ * arrays and convert to format needed by vertex shaders.
+ * 2. Vertex store/emit - to convert simple float[][4] vertex attributes
+ * (which is the organization used throughout the draw/prim pipeline) to
+ * hardware-specific formats and emit into hardware vertex buffers.
+ *
+ *
+ * Authors:
+ * Keith Whitwell <keithw@tungstengraphics.com>
+ */
+
+#ifndef _TRANSLATE_H
+#define _TRANSLATE_H
+
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_format.h"
+#include "pipe/p_state.h"
+
+enum translate_element_type {
+ TRANSLATE_ELEMENT_NORMAL,
+ TRANSLATE_ELEMENT_INSTANCE_ID
+};
+
+struct translate_element
+{
+ enum translate_element_type type;
+ enum pipe_format input_format;
+ enum pipe_format output_format;
+ unsigned input_buffer:8;
+ unsigned input_offset:24;
+ unsigned instance_divisor;
+ unsigned output_offset;
+};
+
+
+struct translate_key {
+ unsigned output_stride;
+ unsigned nr_elements;
+ struct translate_element element[PIPE_MAX_ATTRIBS + 1];
+};
+
+
+struct translate;
+
+
+typedef void (PIPE_CDECL *run_elts_func)(struct translate *,
+ const unsigned *elts,
+ unsigned count,
+ unsigned start_instance,
+ unsigned instance_id,
+ void *output_buffer);
+
+typedef void (PIPE_CDECL *run_elts16_func)(struct translate *,
+ const uint16_t *elts,
+ unsigned count,
+ unsigned start_instance,
+ unsigned instance_id,
+ void *output_buffer);
+
+typedef void (PIPE_CDECL *run_elts8_func)(struct translate *,
+ const uint8_t *elts,
+ unsigned count,
+ unsigned start_instance,
+ unsigned instance_id,
+ void *output_buffer);
+
+typedef void (PIPE_CDECL *run_func)(struct translate *,
+ unsigned start,
+ unsigned count,
+ unsigned start_instance,
+ unsigned instance_id,
+ void *output_buffer);
+
+struct translate {
+ struct translate_key key;
+
+ void (*release)( struct translate * );
+
+ void (*set_buffer)( struct translate *,
+ unsigned i,
+ const void *ptr,
+ unsigned stride,
+ unsigned max_index );
+
+ run_elts_func run_elts;
+ run_elts16_func run_elts16;
+ run_elts8_func run_elts8;
+ run_func run;
+};
+
+
+
+struct translate *translate_create( const struct translate_key *key );
+
+boolean translate_is_output_format_supported(enum pipe_format format);
+
+static INLINE int translate_keysize( const struct translate_key *key )
+{
+ return 2 * sizeof(int) + key->nr_elements * sizeof(struct translate_element);
+}
+
+static INLINE int translate_key_compare( const struct translate_key *a,
+ const struct translate_key *b )
+{
+ int keysize_a = translate_keysize(a);
+ int keysize_b = translate_keysize(b);
+
+ if (keysize_a != keysize_b) {
+ return keysize_a - keysize_b;
+ }
+ return memcmp(a, b, keysize_a);
+}
+
+
+static INLINE void translate_key_sanitize( struct translate_key *a )
+{
+ int keysize = translate_keysize(a);
+ char *ptr = (char *)a;
+ memset(ptr + keysize, 0, sizeof(*a) - keysize);
+}
+
+
+/*******************************************************************************
+ * Private:
+ */
+struct translate *translate_sse2_create( const struct translate_key *key );
+
+struct translate *translate_generic_create( const struct translate_key *key );
+
+boolean translate_generic_is_output_format_supported(enum pipe_format format);
+
+#endif
diff --git a/src/minigallium/auxiliary/translate/translate_cache.c b/src/minigallium/auxiliary/translate/translate_cache.c
new file mode 100644
index 0000000..3f1ecb6
--- /dev/null
+++ b/src/minigallium/auxiliary/translate/translate_cache.c
@@ -0,0 +1,106 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "util/u_memory.h"
+#include "pipe/p_state.h"
+#include "translate.h"
+#include "translate_cache.h"
+
+#include "cso_cache/cso_cache.h"
+#include "cso_cache/cso_hash.h"
+
+struct translate_cache {
+ struct cso_hash *hash;
+};
+
+struct translate_cache * translate_cache_create( void )
+{
+ struct translate_cache *cache = MALLOC_STRUCT(translate_cache);
+ if (cache == NULL) {
+ return NULL;
+ }
+
+ cache->hash = cso_hash_create();
+ return cache;
+}
+
+
+static INLINE void delete_translates(struct translate_cache *cache)
+{
+ struct cso_hash *hash = cache->hash;
+ struct cso_hash_iter iter = cso_hash_first_node(hash);
+ while (!cso_hash_iter_is_null(iter)) {
+ struct translate *state = (struct translate*)cso_hash_iter_data(iter);
+ iter = cso_hash_iter_next(iter);
+ if (state) {
+ state->release(state);
+ }
+ }
+}
+
+void translate_cache_destroy(struct translate_cache *cache)
+{
+ delete_translates(cache);
+ cso_hash_delete(cache->hash);
+ FREE(cache);
+}
+
+
+static INLINE unsigned translate_hash_key_size(struct translate_key *key)
+{
+ unsigned size = sizeof(struct translate_key) -
+ sizeof(struct translate_element) * (PIPE_MAX_ATTRIBS - key->nr_elements);
+ return size;
+}
+
+static INLINE unsigned create_key(struct translate_key *key)
+{
+ unsigned hash_key;
+ unsigned size = translate_hash_key_size(key);
+ /*debug_printf("key size = %d, (els = %d)\n",
+ size, key->nr_elements);*/
+ hash_key = cso_construct_key(key, size);
+ return hash_key;
+}
+
+struct translate * translate_cache_find(struct translate_cache *cache,
+ struct translate_key *key)
+{
+ unsigned hash_key = create_key(key);
+ struct translate *translate = (struct translate*)
+ cso_hash_find_data_from_template(cache->hash,
+ hash_key,
+ key, sizeof(*key));
+
+ if (!translate) {
+ /* create/insert */
+ translate = translate_create(key);
+ cso_hash_insert(cache->hash, hash_key, translate);
+ }
+
+ return translate;
+}
diff --git a/src/minigallium/auxiliary/translate/translate_cache.h b/src/minigallium/auxiliary/translate/translate_cache.h
new file mode 100644
index 0000000..7dba871
--- /dev/null
+++ b/src/minigallium/auxiliary/translate/translate_cache.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2008 Tungsten Graphics, inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * TUNGSTEN GRAPHICS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#ifndef _TRANSLATE_CACHE_H
+#define _TRANSLATE_CACHE_H
+
+
+/*******************************************************************************
+ * Translate cache.
+ * Simply used to cache created translates. Avoids unecessary creation of
+ * translate's if one suitable for a given translate_key has already been
+ * created.
+ *
+ * Note: this functionality depends and requires the CSO module.
+ */
+struct translate_cache;
+
+struct translate_key;
+struct translate;
+
+struct translate_cache *translate_cache_create( void );
+void translate_cache_destroy(struct translate_cache *cache);
+
+/**
+ * Will try to find a translate structure matched by the given key.
+ * If such a structure doesn't exist in the cache the function
+ * will automatically create it, insert it in the cache and
+ * return the created version.
+ *
+ */
+struct translate *translate_cache_find(struct translate_cache *cache,
+ struct translate_key *key);
+
+#endif
diff --git a/src/minigallium/auxiliary/translate/translate_generic.c b/src/minigallium/auxiliary/translate/translate_generic.c
new file mode 100644
index 0000000..fdab0f3
--- /dev/null
+++ b/src/minigallium/auxiliary/translate/translate_generic.c
@@ -0,0 +1,997 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+ /*
+ * Authors:
+ * Keith Whitwell <keith@tungstengraphics.com>
+ */
+
+#include "util/u_memory.h"
+#include "util/u_format.h"
+#include "util/u_half.h"
+#include "util/u_math.h"
+#include "pipe/p_state.h"
+#include "translate.h"
+
+
+#define DRAW_DBG 0
+
+typedef void (*fetch_func)(void *dst,
+ const uint8_t *src,
+ unsigned i, unsigned j);
+typedef void (*emit_func)(const void *attrib, void *ptr);
+
+
+
+struct translate_generic {
+ struct translate translate;
+
+ struct {
+ enum translate_element_type type;
+
+ fetch_func fetch;
+ unsigned buffer;
+ unsigned input_offset;
+ unsigned instance_divisor;
+
+ emit_func emit;
+ unsigned output_offset;
+
+ const uint8_t *input_ptr;
+ unsigned input_stride;
+ unsigned max_index;
+
+ /* this value is set to -1 if this is a normal element with output_format != input_format:
+ * in this case, u_format is used to do a full conversion
+ *
+ * this value is set to the format size in bytes if output_format == input_format or for 32-bit instance ids:
+ * in this case, memcpy is used to copy this amount of bytes
+ */
+ int copy_size;
+
+ } attrib[PIPE_MAX_ATTRIBS];
+
+ unsigned nr_attrib;
+};
+
+
+static struct translate_generic *translate_generic( struct translate *translate )
+{
+ return (struct translate_generic *)translate;
+}
+
+/**
+ * Fetch a dword[4] vertex attribute from memory, doing format/type
+ * conversion as needed.
+ *
+ * This is probably needed/dupliocated elsewhere, eg format
+ * conversion, texture sampling etc.
+ */
+#define ATTRIB( NAME, SZ, SRCTYPE, DSTTYPE, TO ) \
+static void \
+emit_##NAME(const void *attrib, void *ptr) \
+{ \
+ unsigned i; \
+ SRCTYPE *in = (SRCTYPE *)attrib; \
+ DSTTYPE *out = (DSTTYPE *)ptr; \
+ \
+ for (i = 0; i < SZ; i++) { \
+ out[i] = TO(in[i]); \
+ } \
+}
+
+
+#define TO_64_FLOAT(x) ((double) x)
+#define TO_32_FLOAT(x) (x)
+#define TO_16_FLOAT(x) util_float_to_half(x)
+
+#define TO_8_USCALED(x) ((unsigned char) x)
+#define TO_16_USCALED(x) ((unsigned short) x)
+#define TO_32_USCALED(x) ((unsigned int) x)
+
+#define TO_8_SSCALED(x) ((char) x)
+#define TO_16_SSCALED(x) ((short) x)
+#define TO_32_SSCALED(x) ((int) x)
+
+#define TO_8_UNORM(x) ((unsigned char) (x * 255.0f))
+#define TO_16_UNORM(x) ((unsigned short) (x * 65535.0f))
+#define TO_32_UNORM(x) ((unsigned int) (x * 4294967295.0f))
+
+#define TO_8_SNORM(x) ((char) (x * 127.0f))
+#define TO_16_SNORM(x) ((short) (x * 32767.0f))
+#define TO_32_SNORM(x) ((int) (x * 2147483647.0f))
+
+#define TO_32_FIXED(x) ((int) (x * 65536.0f))
+
+#define TO_INT(x) (x)
+
+
+ATTRIB( R64G64B64A64_FLOAT, 4, float, double, TO_64_FLOAT )
+ATTRIB( R64G64B64_FLOAT, 3, float, double, TO_64_FLOAT )
+ATTRIB( R64G64_FLOAT, 2, float, double, TO_64_FLOAT )
+ATTRIB( R64_FLOAT, 1, float, double, TO_64_FLOAT )
+
+ATTRIB( R32G32B32A32_FLOAT, 4, float, float, TO_32_FLOAT )
+ATTRIB( R32G32B32_FLOAT, 3, float, float, TO_32_FLOAT )
+ATTRIB( R32G32_FLOAT, 2, float, float, TO_32_FLOAT )
+ATTRIB( R32_FLOAT, 1, float, float, TO_32_FLOAT )
+
+ATTRIB( R16G16B16A16_FLOAT, 4, float, ushort, TO_16_FLOAT )
+ATTRIB( R16G16B16_FLOAT, 3, float, ushort, TO_16_FLOAT )
+ATTRIB( R16G16_FLOAT, 2, float, ushort, TO_16_FLOAT )
+ATTRIB( R16_FLOAT, 1, float, ushort, TO_16_FLOAT )
+
+ATTRIB( R32G32B32A32_USCALED, 4, float, unsigned, TO_32_USCALED )
+ATTRIB( R32G32B32_USCALED, 3, float, unsigned, TO_32_USCALED )
+ATTRIB( R32G32_USCALED, 2, float, unsigned, TO_32_USCALED )
+ATTRIB( R32_USCALED, 1, float, unsigned, TO_32_USCALED )
+
+ATTRIB( R32G32B32A32_SSCALED, 4, float, int, TO_32_SSCALED )
+ATTRIB( R32G32B32_SSCALED, 3, float, int, TO_32_SSCALED )
+ATTRIB( R32G32_SSCALED, 2, float, int, TO_32_SSCALED )
+ATTRIB( R32_SSCALED, 1, float, int, TO_32_SSCALED )
+
+ATTRIB( R32G32B32A32_UNORM, 4, float, unsigned, TO_32_UNORM )
+ATTRIB( R32G32B32_UNORM, 3, float, unsigned, TO_32_UNORM )
+ATTRIB( R32G32_UNORM, 2, float, unsigned, TO_32_UNORM )
+ATTRIB( R32_UNORM, 1, float, unsigned, TO_32_UNORM )
+
+ATTRIB( R32G32B32A32_SNORM, 4, float, int, TO_32_SNORM )
+ATTRIB( R32G32B32_SNORM, 3, float, int, TO_32_SNORM )
+ATTRIB( R32G32_SNORM, 2, float, int, TO_32_SNORM )
+ATTRIB( R32_SNORM, 1, float, int, TO_32_SNORM )
+
+ATTRIB( R16G16B16A16_USCALED, 4, float, ushort, TO_16_USCALED )
+ATTRIB( R16G16B16_USCALED, 3, float, ushort, TO_16_USCALED )
+ATTRIB( R16G16_USCALED, 2, float, ushort, TO_16_USCALED )
+ATTRIB( R16_USCALED, 1, float, ushort, TO_16_USCALED )
+
+ATTRIB( R16G16B16A16_SSCALED, 4, float, short, TO_16_SSCALED )
+ATTRIB( R16G16B16_SSCALED, 3, float, short, TO_16_SSCALED )
+ATTRIB( R16G16_SSCALED, 2, float, short, TO_16_SSCALED )
+ATTRIB( R16_SSCALED, 1, float, short, TO_16_SSCALED )
+
+ATTRIB( R16G16B16A16_UNORM, 4, float, ushort, TO_16_UNORM )
+ATTRIB( R16G16B16_UNORM, 3, float, ushort, TO_16_UNORM )
+ATTRIB( R16G16_UNORM, 2, float, ushort, TO_16_UNORM )
+ATTRIB( R16_UNORM, 1, float, ushort, TO_16_UNORM )
+
+ATTRIB( R16G16B16A16_SNORM, 4, float, short, TO_16_SNORM )
+ATTRIB( R16G16B16_SNORM, 3, float, short, TO_16_SNORM )
+ATTRIB( R16G16_SNORM, 2, float, short, TO_16_SNORM )
+ATTRIB( R16_SNORM, 1, float, short, TO_16_SNORM )
+
+ATTRIB( R8G8B8A8_USCALED, 4, float, ubyte, TO_8_USCALED )
+ATTRIB( R8G8B8_USCALED, 3, float, ubyte, TO_8_USCALED )
+ATTRIB( R8G8_USCALED, 2, float, ubyte, TO_8_USCALED )
+ATTRIB( R8_USCALED, 1, float, ubyte, TO_8_USCALED )
+
+ATTRIB( R8G8B8A8_SSCALED, 4, float, char, TO_8_SSCALED )
+ATTRIB( R8G8B8_SSCALED, 3, float, char, TO_8_SSCALED )
+ATTRIB( R8G8_SSCALED, 2, float, char, TO_8_SSCALED )
+ATTRIB( R8_SSCALED, 1, float, char, TO_8_SSCALED )
+
+ATTRIB( R8G8B8A8_UNORM, 4, float, ubyte, TO_8_UNORM )
+ATTRIB( R8G8B8_UNORM, 3, float, ubyte, TO_8_UNORM )
+ATTRIB( R8G8_UNORM, 2, float, ubyte, TO_8_UNORM )
+ATTRIB( R8_UNORM, 1, float, ubyte, TO_8_UNORM )
+
+ATTRIB( R8G8B8A8_SNORM, 4, float, char, TO_8_SNORM )
+ATTRIB( R8G8B8_SNORM, 3, float, char, TO_8_SNORM )
+ATTRIB( R8G8_SNORM, 2, float, char, TO_8_SNORM )
+ATTRIB( R8_SNORM, 1, float, char, TO_8_SNORM )
+
+ATTRIB( R32G32B32A32_UINT, 4, uint32_t, unsigned, TO_INT )
+ATTRIB( R32G32B32_UINT, 3, uint32_t, unsigned, TO_INT )
+ATTRIB( R32G32_UINT, 2, uint32_t, unsigned, TO_INT )
+ATTRIB( R32_UINT, 1, uint32_t, unsigned, TO_INT )
+
+ATTRIB( R16G16B16A16_UINT, 4, uint32_t, ushort, TO_INT )
+ATTRIB( R16G16B16_UINT, 3, uint32_t, ushort, TO_INT )
+ATTRIB( R16G16_UINT, 2, uint32_t, ushort, TO_INT )
+ATTRIB( R16_UINT, 1, uint32_t, ushort, TO_INT )
+
+ATTRIB( R8G8B8A8_UINT, 4, uint32_t, ubyte, TO_INT )
+ATTRIB( R8G8B8_UINT, 3, uint32_t, ubyte, TO_INT )
+ATTRIB( R8G8_UINT, 2, uint32_t, ubyte, TO_INT )
+ATTRIB( R8_UINT, 1, uint32_t, ubyte, TO_INT )
+
+ATTRIB( R32G32B32A32_SINT, 4, int32_t, int, TO_INT )
+ATTRIB( R32G32B32_SINT, 3, int32_t, int, TO_INT )
+ATTRIB( R32G32_SINT, 2, int32_t, int, TO_INT )
+ATTRIB( R32_SINT, 1, int32_t, int, TO_INT )
+
+ATTRIB( R16G16B16A16_SINT, 4, int32_t, short, TO_INT )
+ATTRIB( R16G16B16_SINT, 3, int32_t, short, TO_INT )
+ATTRIB( R16G16_SINT, 2, int32_t, short, TO_INT )
+ATTRIB( R16_SINT, 1, int32_t, short, TO_INT )
+
+ATTRIB( R8G8B8A8_SINT, 4, int32_t, char, TO_INT )
+ATTRIB( R8G8B8_SINT, 3, int32_t, char, TO_INT )
+ATTRIB( R8G8_SINT, 2, int32_t, char, TO_INT )
+ATTRIB( R8_SINT, 1, int32_t, char, TO_INT )
+
+static void
+emit_A8R8G8B8_UNORM( const void *attrib, void *ptr)
+{
+ float *in = (float *)attrib;
+ ubyte *out = (ubyte *)ptr;
+ out[0] = TO_8_UNORM(in[3]);
+ out[1] = TO_8_UNORM(in[0]);
+ out[2] = TO_8_UNORM(in[1]);
+ out[3] = TO_8_UNORM(in[2]);
+}
+
+static void
+emit_B8G8R8A8_UNORM( const void *attrib, void *ptr)
+{
+ float *in = (float *)attrib;
+ ubyte *out = (ubyte *)ptr;
+ out[2] = TO_8_UNORM(in[0]);
+ out[1] = TO_8_UNORM(in[1]);
+ out[0] = TO_8_UNORM(in[2]);
+ out[3] = TO_8_UNORM(in[3]);
+}
+
+static void
+emit_B10G10R10A2_UNORM( const void *attrib, void *ptr )
+{
+ float *src = (float *)ptr;
+ uint32_t value = 0;
+ value |= ((uint32_t)(CLAMP(src[2], 0, 1) * 0x3ff)) & 0x3ff;
+ value |= (((uint32_t)(CLAMP(src[1], 0, 1) * 0x3ff)) & 0x3ff) << 10;
+ value |= (((uint32_t)(CLAMP(src[0], 0, 1) * 0x3ff)) & 0x3ff) << 20;
+ value |= ((uint32_t)(CLAMP(src[3], 0, 1) * 0x3)) << 30;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *(uint32_t *)attrib = value;
+}
+
+static void
+emit_B10G10R10A2_USCALED( const void *attrib, void *ptr )
+{
+ float *src = (float *)ptr;
+ uint32_t value = 0;
+ value |= ((uint32_t)CLAMP(src[2], 0, 1023)) & 0x3ff;
+ value |= (((uint32_t)CLAMP(src[1], 0, 1023)) & 0x3ff) << 10;
+ value |= (((uint32_t)CLAMP(src[0], 0, 1023)) & 0x3ff) << 20;
+ value |= ((uint32_t)CLAMP(src[3], 0, 3)) << 30;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *(uint32_t *)attrib = value;
+}
+
+static void
+emit_B10G10R10A2_SNORM( const void *attrib, void *ptr )
+{
+ float *src = (float *)ptr;
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)(CLAMP(src[2], -1, 1) * 0x1ff)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)(CLAMP(src[1], -1, 1) * 0x1ff)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)(CLAMP(src[0], -1, 1) * 0x1ff)) & 0x3ff) << 20) ;
+ value |= (uint32_t)(((uint32_t)(CLAMP(src[3], -1, 1) * 0x1)) << 30) ;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *(uint32_t *)attrib = value;
+}
+
+static void
+emit_B10G10R10A2_SSCALED( const void *attrib, void *ptr )
+{
+ float *src = (float *)ptr;
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)CLAMP(src[2], -512, 511)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)CLAMP(src[1], -512, 511)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)CLAMP(src[0], -512, 511)) & 0x3ff) << 20) ;
+ value |= (uint32_t)(((uint32_t)CLAMP(src[3], -2, 1)) << 30) ;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *(uint32_t *)attrib = value;
+}
+
+static void
+emit_R10G10B10A2_UNORM( const void *attrib, void *ptr )
+{
+ float *src = (float *)ptr;
+ uint32_t value = 0;
+ value |= ((uint32_t)(CLAMP(src[0], 0, 1) * 0x3ff)) & 0x3ff;
+ value |= (((uint32_t)(CLAMP(src[1], 0, 1) * 0x3ff)) & 0x3ff) << 10;
+ value |= (((uint32_t)(CLAMP(src[2], 0, 1) * 0x3ff)) & 0x3ff) << 20;
+ value |= ((uint32_t)(CLAMP(src[3], 0, 1) * 0x3)) << 30;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *(uint32_t *)attrib = value;
+}
+
+static void
+emit_R10G10B10A2_USCALED( const void *attrib, void *ptr )
+{
+ float *src = (float *)ptr;
+ uint32_t value = 0;
+ value |= ((uint32_t)CLAMP(src[0], 0, 1023)) & 0x3ff;
+ value |= (((uint32_t)CLAMP(src[1], 0, 1023)) & 0x3ff) << 10;
+ value |= (((uint32_t)CLAMP(src[2], 0, 1023)) & 0x3ff) << 20;
+ value |= ((uint32_t)CLAMP(src[3], 0, 3)) << 30;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *(uint32_t *)attrib = value;
+}
+
+static void
+emit_R10G10B10A2_SNORM( const void *attrib, void *ptr )
+{
+ float *src = (float *)ptr;
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)(CLAMP(src[0], -1, 1) * 0x1ff)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)(CLAMP(src[1], -1, 1) * 0x1ff)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)(CLAMP(src[2], -1, 1) * 0x1ff)) & 0x3ff) << 20) ;
+ value |= (uint32_t)(((uint32_t)(CLAMP(src[3], -1, 1) * 0x1)) << 30) ;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *(uint32_t *)attrib = value;
+}
+
+static void
+emit_R10G10B10A2_SSCALED( const void *attrib, void *ptr)
+{
+ float *src = (float *)ptr;
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)CLAMP(src[0], -512, 511)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)CLAMP(src[1], -512, 511)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)CLAMP(src[2], -512, 511)) & 0x3ff) << 20) ;
+ value |= (uint32_t)(((uint32_t)CLAMP(src[3], -2, 1)) << 30) ;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *(uint32_t *)attrib = value;
+}
+
+static void
+emit_NULL( const void *attrib, void *ptr )
+{
+ /* do nothing is the only sensible option */
+}
+
+static emit_func get_emit_func( enum pipe_format format )
+{
+ switch (format) {
+ case PIPE_FORMAT_R64_FLOAT:
+ return &emit_R64_FLOAT;
+ case PIPE_FORMAT_R64G64_FLOAT:
+ return &emit_R64G64_FLOAT;
+ case PIPE_FORMAT_R64G64B64_FLOAT:
+ return &emit_R64G64B64_FLOAT;
+ case PIPE_FORMAT_R64G64B64A64_FLOAT:
+ return &emit_R64G64B64A64_FLOAT;
+
+ case PIPE_FORMAT_R32_FLOAT:
+ return &emit_R32_FLOAT;
+ case PIPE_FORMAT_R32G32_FLOAT:
+ return &emit_R32G32_FLOAT;
+ case PIPE_FORMAT_R32G32B32_FLOAT:
+ return &emit_R32G32B32_FLOAT;
+ case PIPE_FORMAT_R32G32B32A32_FLOAT:
+ return &emit_R32G32B32A32_FLOAT;
+
+ case PIPE_FORMAT_R16_FLOAT:
+ return &emit_R16_FLOAT;
+ case PIPE_FORMAT_R16G16_FLOAT:
+ return &emit_R16G16_FLOAT;
+ case PIPE_FORMAT_R16G16B16_FLOAT:
+ return &emit_R16G16B16_FLOAT;
+ case PIPE_FORMAT_R16G16B16A16_FLOAT:
+ return &emit_R16G16B16A16_FLOAT;
+
+ case PIPE_FORMAT_R32_UNORM:
+ return &emit_R32_UNORM;
+ case PIPE_FORMAT_R32G32_UNORM:
+ return &emit_R32G32_UNORM;
+ case PIPE_FORMAT_R32G32B32_UNORM:
+ return &emit_R32G32B32_UNORM;
+ case PIPE_FORMAT_R32G32B32A32_UNORM:
+ return &emit_R32G32B32A32_UNORM;
+
+ case PIPE_FORMAT_R32_USCALED:
+ return &emit_R32_USCALED;
+ case PIPE_FORMAT_R32G32_USCALED:
+ return &emit_R32G32_USCALED;
+ case PIPE_FORMAT_R32G32B32_USCALED:
+ return &emit_R32G32B32_USCALED;
+ case PIPE_FORMAT_R32G32B32A32_USCALED:
+ return &emit_R32G32B32A32_USCALED;
+
+ case PIPE_FORMAT_R32_SNORM:
+ return &emit_R32_SNORM;
+ case PIPE_FORMAT_R32G32_SNORM:
+ return &emit_R32G32_SNORM;
+ case PIPE_FORMAT_R32G32B32_SNORM:
+ return &emit_R32G32B32_SNORM;
+ case PIPE_FORMAT_R32G32B32A32_SNORM:
+ return &emit_R32G32B32A32_SNORM;
+
+ case PIPE_FORMAT_R32_SSCALED:
+ return &emit_R32_SSCALED;
+ case PIPE_FORMAT_R32G32_SSCALED:
+ return &emit_R32G32_SSCALED;
+ case PIPE_FORMAT_R32G32B32_SSCALED:
+ return &emit_R32G32B32_SSCALED;
+ case PIPE_FORMAT_R32G32B32A32_SSCALED:
+ return &emit_R32G32B32A32_SSCALED;
+
+ case PIPE_FORMAT_R16_UNORM:
+ return &emit_R16_UNORM;
+ case PIPE_FORMAT_R16G16_UNORM:
+ return &emit_R16G16_UNORM;
+ case PIPE_FORMAT_R16G16B16_UNORM:
+ return &emit_R16G16B16_UNORM;
+ case PIPE_FORMAT_R16G16B16A16_UNORM:
+ return &emit_R16G16B16A16_UNORM;
+
+ case PIPE_FORMAT_R16_USCALED:
+ return &emit_R16_USCALED;
+ case PIPE_FORMAT_R16G16_USCALED:
+ return &emit_R16G16_USCALED;
+ case PIPE_FORMAT_R16G16B16_USCALED:
+ return &emit_R16G16B16_USCALED;
+ case PIPE_FORMAT_R16G16B16A16_USCALED:
+ return &emit_R16G16B16A16_USCALED;
+
+ case PIPE_FORMAT_R16_SNORM:
+ return &emit_R16_SNORM;
+ case PIPE_FORMAT_R16G16_SNORM:
+ return &emit_R16G16_SNORM;
+ case PIPE_FORMAT_R16G16B16_SNORM:
+ return &emit_R16G16B16_SNORM;
+ case PIPE_FORMAT_R16G16B16A16_SNORM:
+ return &emit_R16G16B16A16_SNORM;
+
+ case PIPE_FORMAT_R16_SSCALED:
+ return &emit_R16_SSCALED;
+ case PIPE_FORMAT_R16G16_SSCALED:
+ return &emit_R16G16_SSCALED;
+ case PIPE_FORMAT_R16G16B16_SSCALED:
+ return &emit_R16G16B16_SSCALED;
+ case PIPE_FORMAT_R16G16B16A16_SSCALED:
+ return &emit_R16G16B16A16_SSCALED;
+
+ case PIPE_FORMAT_R8_UNORM:
+ return &emit_R8_UNORM;
+ case PIPE_FORMAT_R8G8_UNORM:
+ return &emit_R8G8_UNORM;
+ case PIPE_FORMAT_R8G8B8_UNORM:
+ return &emit_R8G8B8_UNORM;
+ case PIPE_FORMAT_R8G8B8A8_UNORM:
+ return &emit_R8G8B8A8_UNORM;
+
+ case PIPE_FORMAT_R8_USCALED:
+ return &emit_R8_USCALED;
+ case PIPE_FORMAT_R8G8_USCALED:
+ return &emit_R8G8_USCALED;
+ case PIPE_FORMAT_R8G8B8_USCALED:
+ return &emit_R8G8B8_USCALED;
+ case PIPE_FORMAT_R8G8B8A8_USCALED:
+ return &emit_R8G8B8A8_USCALED;
+
+ case PIPE_FORMAT_R8_SNORM:
+ return &emit_R8_SNORM;
+ case PIPE_FORMAT_R8G8_SNORM:
+ return &emit_R8G8_SNORM;
+ case PIPE_FORMAT_R8G8B8_SNORM:
+ return &emit_R8G8B8_SNORM;
+ case PIPE_FORMAT_R8G8B8A8_SNORM:
+ return &emit_R8G8B8A8_SNORM;
+
+ case PIPE_FORMAT_R8_SSCALED:
+ return &emit_R8_SSCALED;
+ case PIPE_FORMAT_R8G8_SSCALED:
+ return &emit_R8G8_SSCALED;
+ case PIPE_FORMAT_R8G8B8_SSCALED:
+ return &emit_R8G8B8_SSCALED;
+ case PIPE_FORMAT_R8G8B8A8_SSCALED:
+ return &emit_R8G8B8A8_SSCALED;
+
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ return &emit_B8G8R8A8_UNORM;
+
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
+ return &emit_A8R8G8B8_UNORM;
+
+ case PIPE_FORMAT_R32_UINT:
+ return &emit_R32_UINT;
+ case PIPE_FORMAT_R32G32_UINT:
+ return &emit_R32G32_UINT;
+ case PIPE_FORMAT_R32G32B32_UINT:
+ return &emit_R32G32B32_UINT;
+ case PIPE_FORMAT_R32G32B32A32_UINT:
+ return &emit_R32G32B32A32_UINT;
+
+ case PIPE_FORMAT_R16_UINT:
+ return &emit_R16_UINT;
+ case PIPE_FORMAT_R16G16_UINT:
+ return &emit_R16G16_UINT;
+ case PIPE_FORMAT_R16G16B16_UINT:
+ return &emit_R16G16B16_UINT;
+ case PIPE_FORMAT_R16G16B16A16_UINT:
+ return &emit_R16G16B16A16_UINT;
+
+ case PIPE_FORMAT_R8_UINT:
+ return &emit_R8_UINT;
+ case PIPE_FORMAT_R8G8_UINT:
+ return &emit_R8G8_UINT;
+ case PIPE_FORMAT_R8G8B8_UINT:
+ return &emit_R8G8B8_UINT;
+ case PIPE_FORMAT_R8G8B8A8_UINT:
+ return &emit_R8G8B8A8_UINT;
+
+ case PIPE_FORMAT_R32_SINT:
+ return &emit_R32_SINT;
+ case PIPE_FORMAT_R32G32_SINT:
+ return &emit_R32G32_SINT;
+ case PIPE_FORMAT_R32G32B32_SINT:
+ return &emit_R32G32B32_SINT;
+ case PIPE_FORMAT_R32G32B32A32_SINT:
+ return &emit_R32G32B32A32_SINT;
+
+ case PIPE_FORMAT_R16_SINT:
+ return &emit_R16_SINT;
+ case PIPE_FORMAT_R16G16_SINT:
+ return &emit_R16G16_SINT;
+ case PIPE_FORMAT_R16G16B16_SINT:
+ return &emit_R16G16B16_SINT;
+ case PIPE_FORMAT_R16G16B16A16_SINT:
+ return &emit_R16G16B16A16_SINT;
+
+ case PIPE_FORMAT_R8_SINT:
+ return &emit_R8_SINT;
+ case PIPE_FORMAT_R8G8_SINT:
+ return &emit_R8G8_SINT;
+ case PIPE_FORMAT_R8G8B8_SINT:
+ return &emit_R8G8B8_SINT;
+ case PIPE_FORMAT_R8G8B8A8_SINT:
+ return &emit_R8G8B8A8_SINT;
+
+ case PIPE_FORMAT_B10G10R10A2_UNORM:
+ return &emit_B10G10R10A2_UNORM;
+ case PIPE_FORMAT_B10G10R10A2_USCALED:
+ return &emit_B10G10R10A2_USCALED;
+ case PIPE_FORMAT_B10G10R10A2_SNORM:
+ return &emit_B10G10R10A2_SNORM;
+ case PIPE_FORMAT_B10G10R10A2_SSCALED:
+ return &emit_B10G10R10A2_SSCALED;
+
+ case PIPE_FORMAT_R10G10B10A2_UNORM:
+ return &emit_R10G10B10A2_UNORM;
+ case PIPE_FORMAT_R10G10B10A2_USCALED:
+ return &emit_R10G10B10A2_USCALED;
+ case PIPE_FORMAT_R10G10B10A2_SNORM:
+ return &emit_R10G10B10A2_SNORM;
+ case PIPE_FORMAT_R10G10B10A2_SSCALED:
+ return &emit_R10G10B10A2_SSCALED;
+
+ default:
+ assert(0);
+ return &emit_NULL;
+ }
+}
+
+static ALWAYS_INLINE void PIPE_CDECL generic_run_one( struct translate_generic *tg,
+ unsigned elt,
+ unsigned start_instance,
+ unsigned instance_id,
+ void *vert )
+{
+ unsigned nr_attrs = tg->nr_attrib;
+ unsigned attr;
+
+ for (attr = 0; attr < nr_attrs; attr++) {
+ float data[4];
+ uint8_t *dst = (uint8_t *)vert + tg->attrib[attr].output_offset;
+
+ if (tg->attrib[attr].type == TRANSLATE_ELEMENT_NORMAL) {
+ const uint8_t *src;
+ unsigned index;
+ int copy_size;
+
+ if (tg->attrib[attr].instance_divisor) {
+ index = start_instance;
+ index += (instance_id / tg->attrib[attr].instance_divisor);
+ /* XXX we need to clamp the index here too, but to a
+ * per-array max value, not the draw->pt.max_index value
+ * that's being given to us via translate->set_buffer().
+ */
+ }
+ else {
+ index = elt;
+ /* clamp to avoid going out of bounds */
+ index = MIN2(index, tg->attrib[attr].max_index);
+ }
+
+ src = tg->attrib[attr].input_ptr +
+ tg->attrib[attr].input_stride * index;
+
+ copy_size = tg->attrib[attr].copy_size;
+ if(likely(copy_size >= 0))
+ memcpy(dst, src, copy_size);
+ else
+ {
+ tg->attrib[attr].fetch( data, src, 0, 0 );
+
+ if (0)
+ debug_printf("Fetch linear attr %d from %p stride %d index %d: "
+ " %f, %f, %f, %f \n",
+ attr,
+ tg->attrib[attr].input_ptr,
+ tg->attrib[attr].input_stride,
+ index,
+ data[0], data[1],data[2], data[3]);
+
+ tg->attrib[attr].emit( data, dst );
+ }
+ } else {
+ if(likely(tg->attrib[attr].copy_size >= 0))
+ memcpy(data, &instance_id, 4);
+ else
+ {
+ data[0] = (float)instance_id;
+ tg->attrib[attr].emit( data, dst );
+ }
+ }
+ }
+}
+
+/**
+ * Fetch vertex attributes for 'count' vertices.
+ */
+static void PIPE_CDECL generic_run_elts( struct translate *translate,
+ const unsigned *elts,
+ unsigned count,
+ unsigned start_instance,
+ unsigned instance_id,
+ void *output_buffer )
+{
+ struct translate_generic *tg = translate_generic(translate);
+ char *vert = output_buffer;
+ unsigned i;
+
+ for (i = 0; i < count; i++) {
+ generic_run_one(tg, *elts++, start_instance, instance_id, vert);
+ vert += tg->translate.key.output_stride;
+ }
+}
+
+static void PIPE_CDECL generic_run_elts16( struct translate *translate,
+ const uint16_t *elts,
+ unsigned count,
+ unsigned start_instance,
+ unsigned instance_id,
+ void *output_buffer )
+{
+ struct translate_generic *tg = translate_generic(translate);
+ char *vert = output_buffer;
+ unsigned i;
+
+ for (i = 0; i < count; i++) {
+ generic_run_one(tg, *elts++, start_instance, instance_id, vert);
+ vert += tg->translate.key.output_stride;
+ }
+}
+
+static void PIPE_CDECL generic_run_elts8( struct translate *translate,
+ const uint8_t *elts,
+ unsigned count,
+ unsigned start_instance,
+ unsigned instance_id,
+ void *output_buffer )
+{
+ struct translate_generic *tg = translate_generic(translate);
+ char *vert = output_buffer;
+ unsigned i;
+
+ for (i = 0; i < count; i++) {
+ generic_run_one(tg, *elts++, start_instance, instance_id, vert);
+ vert += tg->translate.key.output_stride;
+ }
+}
+
+static void PIPE_CDECL generic_run( struct translate *translate,
+ unsigned start,
+ unsigned count,
+ unsigned start_instance,
+ unsigned instance_id,
+ void *output_buffer )
+{
+ struct translate_generic *tg = translate_generic(translate);
+ char *vert = output_buffer;
+ unsigned i;
+
+ for (i = 0; i < count; i++) {
+ generic_run_one(tg, start + i, start_instance, instance_id, vert);
+ vert += tg->translate.key.output_stride;
+ }
+}
+
+
+
+static void generic_set_buffer( struct translate *translate,
+ unsigned buf,
+ const void *ptr,
+ unsigned stride,
+ unsigned max_index )
+{
+ struct translate_generic *tg = translate_generic(translate);
+ unsigned i;
+
+ for (i = 0; i < tg->nr_attrib; i++) {
+ if (tg->attrib[i].buffer == buf) {
+ tg->attrib[i].input_ptr = ((const uint8_t *)ptr +
+ tg->attrib[i].input_offset);
+ tg->attrib[i].input_stride = stride;
+ tg->attrib[i].max_index = max_index;
+ }
+ }
+}
+
+
+static void generic_release( struct translate *translate )
+{
+ /* Refcount?
+ */
+ FREE(translate);
+}
+
+static boolean
+is_legal_int_format_combo( const struct util_format_description *src,
+ const struct util_format_description *dst )
+{
+ unsigned i;
+ unsigned nr = MIN2(src->nr_channels, dst->nr_channels);
+
+ for (i = 0; i < nr; i++) {
+ /* The signs must match. */
+ if (src->channel[i].type != dst->channel[i].type) {
+ return FALSE;
+ }
+
+ /* Integers must not lose precision at any point in the pipeline. */
+ if (src->channel[i].size > dst->channel[i].size) {
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
+struct translate *translate_generic_create( const struct translate_key *key )
+{
+ struct translate_generic *tg = CALLOC_STRUCT(translate_generic);
+ unsigned i;
+
+ if (tg == NULL)
+ return NULL;
+
+ tg->translate.key = *key;
+ tg->translate.release = generic_release;
+ tg->translate.set_buffer = generic_set_buffer;
+ tg->translate.run_elts = generic_run_elts;
+ tg->translate.run_elts16 = generic_run_elts16;
+ tg->translate.run_elts8 = generic_run_elts8;
+ tg->translate.run = generic_run;
+
+ for (i = 0; i < key->nr_elements; i++) {
+ const struct util_format_description *format_desc =
+ util_format_description(key->element[i].input_format);
+
+ assert(format_desc);
+
+ tg->attrib[i].type = key->element[i].type;
+
+ if (format_desc->channel[0].pure_integer) {
+ const struct util_format_description *out_format_desc =
+ util_format_description(key->element[i].output_format);
+
+ if (!is_legal_int_format_combo(format_desc, out_format_desc)) {
+ FREE(tg);
+ return NULL;
+ }
+
+ if (format_desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED) {
+ assert(format_desc->fetch_rgba_sint);
+ tg->attrib[i].fetch = (fetch_func)format_desc->fetch_rgba_sint;
+ } else {
+ assert(format_desc->fetch_rgba_uint);
+ tg->attrib[i].fetch = (fetch_func)format_desc->fetch_rgba_uint;
+ }
+ } else {
+ assert(format_desc->fetch_rgba_float);
+ tg->attrib[i].fetch = (fetch_func)format_desc->fetch_rgba_float;
+ }
+
+ tg->attrib[i].buffer = key->element[i].input_buffer;
+ tg->attrib[i].input_offset = key->element[i].input_offset;
+ tg->attrib[i].instance_divisor = key->element[i].instance_divisor;
+
+ tg->attrib[i].output_offset = key->element[i].output_offset;
+
+ tg->attrib[i].copy_size = -1;
+ if (tg->attrib[i].type == TRANSLATE_ELEMENT_INSTANCE_ID)
+ {
+ if(key->element[i].output_format == PIPE_FORMAT_R32_USCALED
+ || key->element[i].output_format == PIPE_FORMAT_R32_SSCALED)
+ tg->attrib[i].copy_size = 4;
+ }
+ else
+ {
+ if(key->element[i].input_format == key->element[i].output_format
+ && format_desc->block.width == 1
+ && format_desc->block.height == 1
+ && !(format_desc->block.bits & 7))
+ tg->attrib[i].copy_size = format_desc->block.bits >> 3;
+ }
+
+ if(tg->attrib[i].copy_size < 0)
+ tg->attrib[i].emit = get_emit_func(key->element[i].output_format);
+ else
+ tg->attrib[i].emit = NULL;
+ }
+
+ tg->nr_attrib = key->nr_elements;
+
+
+ return &tg->translate;
+}
+
+boolean translate_generic_is_output_format_supported(enum pipe_format format)
+{
+ switch(format)
+ {
+ case PIPE_FORMAT_R64G64B64A64_FLOAT: return TRUE;
+ case PIPE_FORMAT_R64G64B64_FLOAT: return TRUE;
+ case PIPE_FORMAT_R64G64_FLOAT: return TRUE;
+ case PIPE_FORMAT_R64_FLOAT: return TRUE;
+
+ case PIPE_FORMAT_R32G32B32A32_FLOAT: return TRUE;
+ case PIPE_FORMAT_R32G32B32_FLOAT: return TRUE;
+ case PIPE_FORMAT_R32G32_FLOAT: return TRUE;
+ case PIPE_FORMAT_R32_FLOAT: return TRUE;
+
+ case PIPE_FORMAT_R16G16B16A16_FLOAT: return TRUE;
+ case PIPE_FORMAT_R16G16B16_FLOAT: return TRUE;
+ case PIPE_FORMAT_R16G16_FLOAT: return TRUE;
+ case PIPE_FORMAT_R16_FLOAT: return TRUE;
+
+ case PIPE_FORMAT_R32G32B32A32_USCALED: return TRUE;
+ case PIPE_FORMAT_R32G32B32_USCALED: return TRUE;
+ case PIPE_FORMAT_R32G32_USCALED: return TRUE;
+ case PIPE_FORMAT_R32_USCALED: return TRUE;
+
+ case PIPE_FORMAT_R32G32B32A32_SSCALED: return TRUE;
+ case PIPE_FORMAT_R32G32B32_SSCALED: return TRUE;
+ case PIPE_FORMAT_R32G32_SSCALED: return TRUE;
+ case PIPE_FORMAT_R32_SSCALED: return TRUE;
+
+ case PIPE_FORMAT_R32G32B32A32_UNORM: return TRUE;
+ case PIPE_FORMAT_R32G32B32_UNORM: return TRUE;
+ case PIPE_FORMAT_R32G32_UNORM: return TRUE;
+ case PIPE_FORMAT_R32_UNORM: return TRUE;
+
+ case PIPE_FORMAT_R32G32B32A32_SNORM: return TRUE;
+ case PIPE_FORMAT_R32G32B32_SNORM: return TRUE;
+ case PIPE_FORMAT_R32G32_SNORM: return TRUE;
+ case PIPE_FORMAT_R32_SNORM: return TRUE;
+
+ case PIPE_FORMAT_R16G16B16A16_USCALED: return TRUE;
+ case PIPE_FORMAT_R16G16B16_USCALED: return TRUE;
+ case PIPE_FORMAT_R16G16_USCALED: return TRUE;
+ case PIPE_FORMAT_R16_USCALED: return TRUE;
+
+ case PIPE_FORMAT_R16G16B16A16_SSCALED: return TRUE;
+ case PIPE_FORMAT_R16G16B16_SSCALED: return TRUE;
+ case PIPE_FORMAT_R16G16_SSCALED: return TRUE;
+ case PIPE_FORMAT_R16_SSCALED: return TRUE;
+
+ case PIPE_FORMAT_R16G16B16A16_UNORM: return TRUE;
+ case PIPE_FORMAT_R16G16B16_UNORM: return TRUE;
+ case PIPE_FORMAT_R16G16_UNORM: return TRUE;
+ case PIPE_FORMAT_R16_UNORM: return TRUE;
+
+ case PIPE_FORMAT_R16G16B16A16_SNORM: return TRUE;
+ case PIPE_FORMAT_R16G16B16_SNORM: return TRUE;
+ case PIPE_FORMAT_R16G16_SNORM: return TRUE;
+ case PIPE_FORMAT_R16_SNORM: return TRUE;
+
+ case PIPE_FORMAT_R8G8B8A8_USCALED: return TRUE;
+ case PIPE_FORMAT_R8G8B8_USCALED: return TRUE;
+ case PIPE_FORMAT_R8G8_USCALED: return TRUE;
+ case PIPE_FORMAT_R8_USCALED: return TRUE;
+
+ case PIPE_FORMAT_R8G8B8A8_SSCALED: return TRUE;
+ case PIPE_FORMAT_R8G8B8_SSCALED: return TRUE;
+ case PIPE_FORMAT_R8G8_SSCALED: return TRUE;
+ case PIPE_FORMAT_R8_SSCALED: return TRUE;
+
+ case PIPE_FORMAT_R8G8B8A8_UNORM: return TRUE;
+ case PIPE_FORMAT_R8G8B8_UNORM: return TRUE;
+ case PIPE_FORMAT_R8G8_UNORM: return TRUE;
+ case PIPE_FORMAT_R8_UNORM: return TRUE;
+
+ case PIPE_FORMAT_R8G8B8A8_SNORM: return TRUE;
+ case PIPE_FORMAT_R8G8B8_SNORM: return TRUE;
+ case PIPE_FORMAT_R8G8_SNORM: return TRUE;
+ case PIPE_FORMAT_R8_SNORM: return TRUE;
+
+ case PIPE_FORMAT_A8R8G8B8_UNORM: return TRUE;
+ case PIPE_FORMAT_B8G8R8A8_UNORM: return TRUE;
+
+ case PIPE_FORMAT_R32G32B32A32_UINT: return TRUE;
+ case PIPE_FORMAT_R32G32B32_UINT: return TRUE;
+ case PIPE_FORMAT_R32G32_UINT: return TRUE;
+ case PIPE_FORMAT_R32_UINT: return TRUE;
+
+ case PIPE_FORMAT_R16G16B16A16_UINT: return TRUE;
+ case PIPE_FORMAT_R16G16B16_UINT: return TRUE;
+ case PIPE_FORMAT_R16G16_UINT: return TRUE;
+ case PIPE_FORMAT_R16_UINT: return TRUE;
+
+ case PIPE_FORMAT_R8G8B8A8_UINT: return TRUE;
+ case PIPE_FORMAT_R8G8B8_UINT: return TRUE;
+ case PIPE_FORMAT_R8G8_UINT: return TRUE;
+ case PIPE_FORMAT_R8_UINT: return TRUE;
+
+ case PIPE_FORMAT_R32G32B32A32_SINT: return TRUE;
+ case PIPE_FORMAT_R32G32B32_SINT: return TRUE;
+ case PIPE_FORMAT_R32G32_SINT: return TRUE;
+ case PIPE_FORMAT_R32_SINT: return TRUE;
+
+ case PIPE_FORMAT_R16G16B16A16_SINT: return TRUE;
+ case PIPE_FORMAT_R16G16B16_SINT: return TRUE;
+ case PIPE_FORMAT_R16G16_SINT: return TRUE;
+ case PIPE_FORMAT_R16_SINT: return TRUE;
+
+ case PIPE_FORMAT_R8G8B8A8_SINT: return TRUE;
+ case PIPE_FORMAT_R8G8B8_SINT: return TRUE;
+ case PIPE_FORMAT_R8G8_SINT: return TRUE;
+ case PIPE_FORMAT_R8_SINT: return TRUE;
+
+ case PIPE_FORMAT_B10G10R10A2_UNORM: return TRUE;
+ case PIPE_FORMAT_B10G10R10A2_USCALED: return TRUE;
+ case PIPE_FORMAT_B10G10R10A2_SNORM: return TRUE;
+ case PIPE_FORMAT_B10G10R10A2_SSCALED: return TRUE;
+
+ case PIPE_FORMAT_R10G10B10A2_UNORM: return TRUE;
+ case PIPE_FORMAT_R10G10B10A2_USCALED: return TRUE;
+ case PIPE_FORMAT_R10G10B10A2_SNORM: return TRUE;
+ case PIPE_FORMAT_R10G10B10A2_SSCALED: return TRUE;
+
+ default: return FALSE;
+ }
+}
diff --git a/src/minigallium/auxiliary/translate/translate_sse.c b/src/minigallium/auxiliary/translate/translate_sse.c
new file mode 100644
index 0000000..726a9b1
--- /dev/null
+++ b/src/minigallium/auxiliary/translate/translate_sse.c
@@ -0,0 +1,1569 @@
+/*
+ * Copyright 2003 Tungsten Graphics, inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * TUNGSTEN GRAPHICS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Keith Whitwell <keithw@tungstengraphics.com>
+ */
+
+
+#include "pipe/p_config.h"
+#include "pipe/p_compiler.h"
+#include "util/u_memory.h"
+#include "util/u_math.h"
+#include "util/u_format.h"
+
+#include "translate.h"
+
+
+#if (defined(PIPE_ARCH_X86) || (defined(PIPE_ARCH_X86_64) && !defined(__MINGW32__))) && !defined(PIPE_SUBSYSTEM_EMBEDDED)
+
+#include "rtasm/rtasm_cpu.h"
+#include "rtasm/rtasm_x86sse.h"
+
+
+#define X 0
+#define Y 1
+#define Z 2
+#define W 3
+
+
+struct translate_buffer {
+ const void *base_ptr;
+ uintptr_t stride;
+ unsigned max_index;
+};
+
+struct translate_buffer_variant {
+ unsigned buffer_index;
+ unsigned instance_divisor;
+ void *ptr; /* updated either per vertex or per instance */
+};
+
+
+#define ELEMENT_BUFFER_INSTANCE_ID 1001
+
+#define NUM_CONSTS 7
+
+enum
+{
+ CONST_IDENTITY,
+ CONST_INV_127,
+ CONST_INV_255,
+ CONST_INV_32767,
+ CONST_INV_65535,
+ CONST_INV_2147483647,
+ CONST_255
+};
+
+#define C(v) {(float)(v), (float)(v), (float)(v), (float)(v)}
+static float consts[NUM_CONSTS][4] = {
+ {0, 0, 0, 1},
+ C(1.0 / 127.0),
+ C(1.0 / 255.0),
+ C(1.0 / 32767.0),
+ C(1.0 / 65535.0),
+ C(1.0 / 2147483647.0),
+ C(255.0)
+};
+#undef C
+
+struct translate_sse {
+ struct translate translate;
+
+ struct x86_function linear_func;
+ struct x86_function elt_func;
+ struct x86_function elt16_func;
+ struct x86_function elt8_func;
+ struct x86_function *func;
+
+ PIPE_ALIGN_VAR(16) float consts[NUM_CONSTS][4];
+ int8_t reg_to_const[16];
+ int8_t const_to_reg[NUM_CONSTS];
+
+ struct translate_buffer buffer[PIPE_MAX_ATTRIBS];
+ unsigned nr_buffers;
+
+ /* Multiple buffer variants can map to a single buffer. */
+ struct translate_buffer_variant buffer_variant[PIPE_MAX_ATTRIBS];
+ unsigned nr_buffer_variants;
+
+ /* Multiple elements can map to a single buffer variant. */
+ unsigned element_to_buffer_variant[PIPE_MAX_ATTRIBS];
+
+ boolean use_instancing;
+ unsigned instance_id;
+ unsigned start_instance;
+
+ /* these are actually known values, but putting them in a struct
+ * like this is helpful to keep them in sync across the file.
+ */
+ struct x86_reg tmp_EAX;
+ struct x86_reg tmp2_EDX;
+ struct x86_reg src_ECX;
+ struct x86_reg idx_ESI; /* either start+i or &elt[i] */
+ struct x86_reg machine_EDI;
+ struct x86_reg outbuf_EBX;
+ struct x86_reg count_EBP; /* decrements to zero */
+};
+
+static int get_offset( const void *a, const void *b )
+{
+ return (const char *)b - (const char *)a;
+}
+
+static struct x86_reg get_const( struct translate_sse *p, unsigned id)
+{
+ struct x86_reg reg;
+ unsigned i;
+
+ if(p->const_to_reg[id] >= 0)
+ return x86_make_reg(file_XMM, p->const_to_reg[id]);
+
+ for(i = 2; i < 8; ++i)
+ {
+ if(p->reg_to_const[i] < 0)
+ break;
+ }
+
+ /* TODO: be smarter here */
+ if(i == 8)
+ --i;
+
+ reg = x86_make_reg(file_XMM, i);
+
+ if(p->reg_to_const[i] >= 0)
+ p->const_to_reg[p->reg_to_const[i]] = -1;
+
+ p->reg_to_const[i] = id;
+ p->const_to_reg[id] = i;
+
+ /* TODO: this should happen outside the loop, if possible */
+ sse_movaps(p->func, reg,
+ x86_make_disp(p->machine_EDI,
+ get_offset(p, &p->consts[id][0])));
+
+ return reg;
+}
+
+/* load the data in a SSE2 register, padding with zeros */
+static boolean emit_load_sse2( struct translate_sse *p,
+ struct x86_reg data,
+ struct x86_reg src,
+ unsigned size)
+{
+ struct x86_reg tmpXMM = x86_make_reg(file_XMM, 1);
+ struct x86_reg tmp = p->tmp_EAX;
+ switch(size)
+ {
+ case 1:
+ x86_movzx8(p->func, tmp, src);
+ sse2_movd(p->func, data, tmp);
+ break;
+ case 2:
+ x86_movzx16(p->func, tmp, src);
+ sse2_movd(p->func, data, tmp);
+ break;
+ case 3:
+ x86_movzx8(p->func, tmp, x86_make_disp(src, 2));
+ x86_shl_imm(p->func, tmp, 16);
+ x86_mov16(p->func, tmp, src);
+ sse2_movd(p->func, data, tmp);
+ break;
+ case 4:
+ sse2_movd(p->func, data, src);
+ break;
+ case 6:
+ sse2_movd(p->func, data, src);
+ x86_movzx16(p->func, tmp, x86_make_disp(src, 4));
+ sse2_movd(p->func, tmpXMM, tmp);
+ sse2_punpckldq(p->func, data, tmpXMM);
+ break;
+ case 8:
+ sse2_movq(p->func, data, src);
+ break;
+ case 12:
+ sse2_movq(p->func, data, src);
+ sse2_movd(p->func, tmpXMM, x86_make_disp(src, 8));
+ sse2_punpcklqdq(p->func, data, tmpXMM);
+ break;
+ case 16:
+ sse2_movdqu(p->func, data, src);
+ break;
+ default:
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/* this value can be passed for the out_chans argument */
+#define CHANNELS_0001 5
+
+/* this function will load #chans float values, and will
+ * pad the register with zeroes at least up to out_chans.
+ *
+ * If out_chans is set to CHANNELS_0001, then the fourth
+ * value will be padded with 1. Only pass this value if
+ * chans < 4 or results are undefined.
+ */
+static void emit_load_float32( struct translate_sse *p,
+ struct x86_reg data,
+ struct x86_reg arg0,
+ unsigned out_chans,
+ unsigned chans)
+{
+ switch(chans)
+ {
+ case 1:
+ /* a 0 0 0
+ * a 0 0 1
+ */
+ sse_movss(p->func, data, arg0);
+ if(out_chans == CHANNELS_0001)
+ sse_orps(p->func, data, get_const(p, CONST_IDENTITY) );
+ break;
+ case 2:
+ /* 0 0 0 1
+ * a b 0 1
+ */
+ if(out_chans == CHANNELS_0001)
+ sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), SHUF(X, Y, Z, W) );
+ else if(out_chans > 2)
+ sse_movlhps(p->func, data, get_const(p, CONST_IDENTITY) );
+ sse_movlps(p->func, data, arg0);
+ break;
+ case 3:
+ /* Have to jump through some hoops:
+ *
+ * c 0 0 0
+ * c 0 0 1 if out_chans == CHANNELS_0001
+ * 0 0 c 0/1
+ * a b c 0/1
+ */
+ sse_movss(p->func, data, x86_make_disp(arg0, 8));
+ if(out_chans == CHANNELS_0001)
+ sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), SHUF(X,Y,Z,W) );
+ sse_shufps(p->func, data, data, SHUF(Y,Z,X,W) );
+ sse_movlps(p->func, data, arg0);
+ break;
+ case 4:
+ sse_movups(p->func, data, arg0);
+ break;
+ }
+}
+
+/* this function behaves like emit_load_float32, but loads
+ 64-bit floating point numbers, converting them to 32-bit
+ ones */
+static void emit_load_float64to32( struct translate_sse *p,
+ struct x86_reg data,
+ struct x86_reg arg0,
+ unsigned out_chans,
+ unsigned chans)
+{
+ struct x86_reg tmpXMM = x86_make_reg(file_XMM, 1);
+ switch(chans)
+ {
+ case 1:
+ sse2_movsd(p->func, data, arg0);
+ if(out_chans > 1)
+ sse2_cvtpd2ps(p->func, data, data);
+ else
+ sse2_cvtsd2ss(p->func, data, data);
+ if(out_chans == CHANNELS_0001)
+ sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), SHUF(X, Y, Z, W) );
+ break;
+ case 2:
+ sse2_movupd(p->func, data, arg0);
+ sse2_cvtpd2ps(p->func, data, data);
+ if(out_chans == CHANNELS_0001)
+ sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), SHUF(X, Y, Z, W) );
+ else if(out_chans > 2)
+ sse_movlhps(p->func, data, get_const(p, CONST_IDENTITY) );
+ break;
+ case 3:
+ sse2_movupd(p->func, data, arg0);
+ sse2_cvtpd2ps(p->func, data, data);
+ sse2_movsd(p->func, tmpXMM, x86_make_disp(arg0, 16));
+ if(out_chans > 3)
+ sse2_cvtpd2ps(p->func, tmpXMM, tmpXMM);
+ else
+ sse2_cvtsd2ss(p->func, tmpXMM, tmpXMM);
+ sse_movlhps(p->func, data, tmpXMM);
+ if(out_chans == CHANNELS_0001)
+ sse_orps(p->func, data, get_const(p, CONST_IDENTITY) );
+ break;
+ case 4:
+ sse2_movupd(p->func, data, arg0);
+ sse2_cvtpd2ps(p->func, data, data);
+ sse2_movupd(p->func, tmpXMM, x86_make_disp(arg0, 16));
+ sse2_cvtpd2ps(p->func, tmpXMM, tmpXMM);
+ sse_movlhps(p->func, data, tmpXMM);
+ break;
+ }
+}
+
+static void emit_mov64(struct translate_sse *p, struct x86_reg dst_gpr, struct x86_reg dst_xmm, struct x86_reg src_gpr, struct x86_reg src_xmm)
+{
+ if(x86_target(p->func) != X86_32)
+ x64_mov64(p->func, dst_gpr, src_gpr);
+ else
+ {
+ /* TODO: when/on which CPUs is SSE2 actually better than SSE? */
+ if(x86_target_caps(p->func) & X86_SSE2)
+ sse2_movq(p->func, dst_xmm, src_xmm);
+ else
+ sse_movlps(p->func, dst_xmm, src_xmm);
+ }
+}
+
+static void emit_load64(struct translate_sse *p, struct x86_reg dst_gpr, struct x86_reg dst_xmm, struct x86_reg src)
+{
+ emit_mov64(p, dst_gpr, dst_xmm, src, src);
+}
+
+static void emit_store64(struct translate_sse *p, struct x86_reg dst, struct x86_reg src_gpr, struct x86_reg src_xmm)
+{
+ emit_mov64(p, dst, dst, src_gpr, src_xmm);
+}
+
+static void emit_mov128(struct translate_sse *p, struct x86_reg dst, struct x86_reg src)
+{
+ if(x86_target_caps(p->func) & X86_SSE2)
+ sse2_movdqu(p->func, dst, src);
+ else
+ sse_movups(p->func, dst, src);
+}
+
+/* TODO: this uses unaligned accesses liberally, which is great on Nehalem,
+ * but may or may not be good on older processors
+ * TODO: may perhaps want to use non-temporal stores here if possible
+ */
+static void emit_memcpy(struct translate_sse *p, struct x86_reg dst, struct x86_reg src, unsigned size)
+{
+ struct x86_reg dataXMM = x86_make_reg(file_XMM, 0);
+ struct x86_reg dataXMM2 = x86_make_reg(file_XMM, 1);
+ struct x86_reg dataGPR = p->tmp_EAX;
+ struct x86_reg dataGPR2 = p->tmp2_EDX;
+
+ if(size < 8)
+ {
+ switch (size)
+ {
+ case 1:
+ x86_mov8(p->func, dataGPR, src);
+ x86_mov8(p->func, dst, dataGPR);
+ break;
+ case 2:
+ x86_mov16(p->func, dataGPR, src);
+ x86_mov16(p->func, dst, dataGPR);
+ break;
+ case 3:
+ x86_mov16(p->func, dataGPR, src);
+ x86_mov8(p->func, dataGPR2, x86_make_disp(src, 2));
+ x86_mov16(p->func, dst, dataGPR);
+ x86_mov8(p->func, x86_make_disp(dst, 2), dataGPR2);
+ break;
+ case 4:
+ x86_mov(p->func, dataGPR, src);
+ x86_mov(p->func, dst, dataGPR);
+ break;
+ case 6:
+ x86_mov(p->func, dataGPR, src);
+ x86_mov16(p->func, dataGPR2, x86_make_disp(src, 4));
+ x86_mov(p->func, dst, dataGPR);
+ x86_mov16(p->func, x86_make_disp(dst, 4), dataGPR2);
+ break;
+ }
+ }
+ else if(!(x86_target_caps(p->func) & X86_SSE))
+ {
+ unsigned i = 0;
+ assert((size & 3) == 0);
+ for(i = 0; i < size; i += 4)
+ {
+ x86_mov(p->func, dataGPR, x86_make_disp(src, i));
+ x86_mov(p->func, x86_make_disp(dst, i), dataGPR);
+ }
+ }
+ else
+ {
+ switch(size)
+ {
+ case 8:
+ emit_load64(p, dataGPR, dataXMM, src);
+ emit_store64(p, dst, dataGPR, dataXMM);
+ break;
+ case 12:
+ emit_load64(p, dataGPR2, dataXMM, src);
+ x86_mov(p->func, dataGPR, x86_make_disp(src, 8));
+ emit_store64(p, dst, dataGPR2, dataXMM);
+ x86_mov(p->func, x86_make_disp(dst, 8), dataGPR);
+ break;
+ case 16:
+ emit_mov128(p, dataXMM, src);
+ emit_mov128(p, dst, dataXMM);
+ break;
+ case 24:
+ emit_mov128(p, dataXMM, src);
+ emit_load64(p, dataGPR, dataXMM2, x86_make_disp(src, 16));
+ emit_mov128(p, dst, dataXMM);
+ emit_store64(p, x86_make_disp(dst, 16), dataGPR, dataXMM2);
+ break;
+ case 32:
+ emit_mov128(p, dataXMM, src);
+ emit_mov128(p, dataXMM2, x86_make_disp(src, 16));
+ emit_mov128(p, dst, dataXMM);
+ emit_mov128(p, x86_make_disp(dst, 16), dataXMM2);
+ break;
+ default:
+ assert(0);
+ }
+ }
+}
+
+static boolean translate_attr_convert( struct translate_sse *p,
+ const struct translate_element *a,
+ struct x86_reg src,
+ struct x86_reg dst)
+
+{
+ const struct util_format_description* input_desc = util_format_description(a->input_format);
+ const struct util_format_description* output_desc = util_format_description(a->output_format);
+ unsigned i;
+ boolean id_swizzle = TRUE;
+ unsigned swizzle[4] = {UTIL_FORMAT_SWIZZLE_NONE, UTIL_FORMAT_SWIZZLE_NONE, UTIL_FORMAT_SWIZZLE_NONE, UTIL_FORMAT_SWIZZLE_NONE};
+ unsigned needed_chans = 0;
+ unsigned imms[2] = {0, 0x3f800000};
+
+ if(a->output_format == PIPE_FORMAT_NONE || a->input_format == PIPE_FORMAT_NONE)
+ return FALSE;
+
+ if(input_desc->channel[0].size & 7)
+ return FALSE;
+
+ if(input_desc->colorspace != output_desc->colorspace)
+ return FALSE;
+
+ for(i = 1; i < input_desc->nr_channels; ++i)
+ {
+ if(memcmp(&input_desc->channel[i], &input_desc->channel[0], sizeof(input_desc->channel[0])))
+ return FALSE;
+ }
+
+ for(i = 1; i < output_desc->nr_channels; ++i)
+ {
+ if(memcmp(&output_desc->channel[i], &output_desc->channel[0], sizeof(output_desc->channel[0])))
+ return FALSE;
+ }
+
+ for(i = 0; i < output_desc->nr_channels; ++i)
+ {
+ if(output_desc->swizzle[i] < 4)
+ swizzle[output_desc->swizzle[i]] = input_desc->swizzle[i];
+ }
+
+ if((x86_target_caps(p->func) & X86_SSE) && (0
+ || a->output_format == PIPE_FORMAT_R32_FLOAT
+ || a->output_format == PIPE_FORMAT_R32G32_FLOAT
+ || a->output_format == PIPE_FORMAT_R32G32B32_FLOAT
+ || a->output_format == PIPE_FORMAT_R32G32B32A32_FLOAT))
+ {
+ struct x86_reg dataXMM = x86_make_reg(file_XMM, 0);
+
+ for(i = 0; i < output_desc->nr_channels; ++i)
+ {
+ if(swizzle[i] == UTIL_FORMAT_SWIZZLE_0 && i >= input_desc->nr_channels)
+ swizzle[i] = i;
+ }
+
+ for(i = 0; i < output_desc->nr_channels; ++i)
+ {
+ if(swizzle[i] < 4)
+ needed_chans = MAX2(needed_chans, swizzle[i] + 1);
+ if(swizzle[i] < UTIL_FORMAT_SWIZZLE_0 && swizzle[i] != i)
+ id_swizzle = FALSE;
+ }
+
+ if(needed_chans > 0)
+ {
+ switch(input_desc->channel[0].type)
+ {
+ case UTIL_FORMAT_TYPE_UNSIGNED:
+ if(!(x86_target_caps(p->func) & X86_SSE2))
+ return FALSE;
+ emit_load_sse2(p, dataXMM, src, input_desc->channel[0].size * input_desc->nr_channels >> 3);
+
+ /* TODO: add support for SSE4.1 pmovzx */
+ switch(input_desc->channel[0].size)
+ {
+ case 8:
+ /* TODO: this may be inefficient due to get_identity() being used both as a float and integer register */
+ sse2_punpcklbw(p->func, dataXMM, get_const(p, CONST_IDENTITY));
+ sse2_punpcklbw(p->func, dataXMM, get_const(p, CONST_IDENTITY));
+ break;
+ case 16:
+ sse2_punpcklwd(p->func, dataXMM, get_const(p, CONST_IDENTITY));
+ break;
+ case 32: /* we lose precision here */
+ sse2_psrld_imm(p->func, dataXMM, 1);
+ break;
+ default:
+ return FALSE;
+ }
+ sse2_cvtdq2ps(p->func, dataXMM, dataXMM);
+ if(input_desc->channel[0].normalized)
+ {
+ struct x86_reg factor;
+ switch(input_desc->channel[0].size)
+ {
+ case 8:
+ factor = get_const(p, CONST_INV_255);
+ break;
+ case 16:
+ factor = get_const(p, CONST_INV_65535);
+ break;
+ case 32:
+ factor = get_const(p, CONST_INV_2147483647);
+ break;
+ default:
+ assert(0);
+ factor.disp = 0;
+ factor.file = 0;
+ factor.idx = 0;
+ factor.mod = 0;
+ break;
+ }
+ sse_mulps(p->func, dataXMM, factor);
+ }
+ else if(input_desc->channel[0].size == 32)
+ sse_addps(p->func, dataXMM, dataXMM); /* compensate for the bit we threw away to fit u32 into s32 */
+ break;
+ case UTIL_FORMAT_TYPE_SIGNED:
+ if(!(x86_target_caps(p->func) & X86_SSE2))
+ return FALSE;
+ emit_load_sse2(p, dataXMM, src, input_desc->channel[0].size * input_desc->nr_channels >> 3);
+
+ /* TODO: add support for SSE4.1 pmovsx */
+ switch(input_desc->channel[0].size)
+ {
+ case 8:
+ sse2_punpcklbw(p->func, dataXMM, dataXMM);
+ sse2_punpcklbw(p->func, dataXMM, dataXMM);
+ sse2_psrad_imm(p->func, dataXMM, 24);
+ break;
+ case 16:
+ sse2_punpcklwd(p->func, dataXMM, dataXMM);
+ sse2_psrad_imm(p->func, dataXMM, 16);
+ break;
+ case 32: /* we lose precision here */
+ break;
+ default:
+ return FALSE;
+ }
+ sse2_cvtdq2ps(p->func, dataXMM, dataXMM);
+ if(input_desc->channel[0].normalized)
+ {
+ struct x86_reg factor;
+ switch(input_desc->channel[0].size)
+ {
+ case 8:
+ factor = get_const(p, CONST_INV_127);
+ break;
+ case 16:
+ factor = get_const(p, CONST_INV_32767);
+ break;
+ case 32:
+ factor = get_const(p, CONST_INV_2147483647);
+ break;
+ default:
+ assert(0);
+ factor.disp = 0;
+ factor.file = 0;
+ factor.idx = 0;
+ factor.mod = 0;
+ break;
+ }
+ sse_mulps(p->func, dataXMM, factor);
+ }
+ break;
+
+ break;
+ case UTIL_FORMAT_TYPE_FLOAT:
+ if(input_desc->channel[0].size != 32 && input_desc->channel[0].size != 64)
+ return FALSE;
+ if(swizzle[3] == UTIL_FORMAT_SWIZZLE_1 && input_desc->nr_channels <= 3)
+ {
+ swizzle[3] = UTIL_FORMAT_SWIZZLE_W;
+ needed_chans = CHANNELS_0001;
+ }
+ switch(input_desc->channel[0].size)
+ {
+ case 32:
+ emit_load_float32(p, dataXMM, src, needed_chans, input_desc->nr_channels);
+ break;
+ case 64: /* we lose precision here */
+ if(!(x86_target_caps(p->func) & X86_SSE2))
+ return FALSE;
+ emit_load_float64to32(p, dataXMM, src, needed_chans, input_desc->nr_channels);
+ break;
+ default:
+ return FALSE;
+ }
+ break;
+ default:
+ return FALSE;
+ }
+
+ if(!id_swizzle)
+ sse_shufps(p->func, dataXMM, dataXMM, SHUF(swizzle[0], swizzle[1], swizzle[2], swizzle[3]) );
+ }
+
+ if(output_desc->nr_channels >= 4
+ && swizzle[0] < UTIL_FORMAT_SWIZZLE_0
+ && swizzle[1] < UTIL_FORMAT_SWIZZLE_0
+ && swizzle[2] < UTIL_FORMAT_SWIZZLE_0
+ && swizzle[3] < UTIL_FORMAT_SWIZZLE_0
+ )
+ sse_movups(p->func, dst, dataXMM);
+ else
+ {
+ if(output_desc->nr_channels >= 2
+ && swizzle[0] < UTIL_FORMAT_SWIZZLE_0
+ && swizzle[1] < UTIL_FORMAT_SWIZZLE_0)
+ sse_movlps(p->func, dst, dataXMM);
+ else
+ {
+ if(swizzle[0] < UTIL_FORMAT_SWIZZLE_0)
+ sse_movss(p->func, dst, dataXMM);
+ else
+ x86_mov_imm(p->func, dst, imms[swizzle[0] - UTIL_FORMAT_SWIZZLE_0]);
+
+ if(output_desc->nr_channels >= 2)
+ {
+ if(swizzle[1] < UTIL_FORMAT_SWIZZLE_0)
+ {
+ sse_shufps(p->func, dataXMM, dataXMM, SHUF(1, 1, 2, 3));
+ sse_movss(p->func, x86_make_disp(dst, 4), dataXMM);
+ }
+ else
+ x86_mov_imm(p->func, x86_make_disp(dst, 4), imms[swizzle[1] - UTIL_FORMAT_SWIZZLE_0]);
+ }
+ }
+
+ if(output_desc->nr_channels >= 3)
+ {
+ if(output_desc->nr_channels >= 4
+ && swizzle[2] < UTIL_FORMAT_SWIZZLE_0
+ && swizzle[3] < UTIL_FORMAT_SWIZZLE_0)
+ sse_movhps(p->func, x86_make_disp(dst, 8), dataXMM);
+ else
+ {
+ if(swizzle[2] < UTIL_FORMAT_SWIZZLE_0)
+ {
+ sse_shufps(p->func, dataXMM, dataXMM, SHUF(2, 2, 2, 3));
+ sse_movss(p->func, x86_make_disp(dst, 8), dataXMM);
+ }
+ else
+ x86_mov_imm(p->func, x86_make_disp(dst, 8), imms[swizzle[2] - UTIL_FORMAT_SWIZZLE_0]);
+
+ if(output_desc->nr_channels >= 4)
+ {
+ if(swizzle[3] < UTIL_FORMAT_SWIZZLE_0)
+ {
+ sse_shufps(p->func, dataXMM, dataXMM, SHUF(3, 3, 3, 3));
+ sse_movss(p->func, x86_make_disp(dst, 12), dataXMM);
+ }
+ else
+ x86_mov_imm(p->func, x86_make_disp(dst, 12), imms[swizzle[3] - UTIL_FORMAT_SWIZZLE_0]);
+ }
+ }
+ }
+ }
+ return TRUE;
+ }
+ else if((x86_target_caps(p->func) & X86_SSE2) && input_desc->channel[0].size == 8 && output_desc->channel[0].size == 16
+ && output_desc->channel[0].normalized == input_desc->channel[0].normalized
+ && (0
+ || (input_desc->channel[0].type == UTIL_FORMAT_TYPE_UNSIGNED && output_desc->channel[0].type == UTIL_FORMAT_TYPE_UNSIGNED)
+ || (input_desc->channel[0].type == UTIL_FORMAT_TYPE_UNSIGNED && output_desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED)
+ || (input_desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED && output_desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED)
+ ))
+ {
+ struct x86_reg dataXMM = x86_make_reg(file_XMM, 0);
+ struct x86_reg tmpXMM = x86_make_reg(file_XMM, 1);
+ struct x86_reg tmp = p->tmp_EAX;
+ unsigned imms[2] = {0, 1};
+
+ for(i = 0; i < output_desc->nr_channels; ++i)
+ {
+ if(swizzle[i] == UTIL_FORMAT_SWIZZLE_0 && i >= input_desc->nr_channels)
+ swizzle[i] = i;
+ }
+
+ for(i = 0; i < output_desc->nr_channels; ++i)
+ {
+ if(swizzle[i] < 4)
+ needed_chans = MAX2(needed_chans, swizzle[i] + 1);
+ if(swizzle[i] < UTIL_FORMAT_SWIZZLE_0 && swizzle[i] != i)
+ id_swizzle = FALSE;
+ }
+
+ if(needed_chans > 0)
+ {
+ emit_load_sse2(p, dataXMM, src, input_desc->channel[0].size * input_desc->nr_channels >> 3);
+
+ switch(input_desc->channel[0].type)
+ {
+ case UTIL_FORMAT_TYPE_UNSIGNED:
+ if(input_desc->channel[0].normalized)
+ {
+ sse2_punpcklbw(p->func, dataXMM, dataXMM);
+ if(output_desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED)
+ sse2_psrlw_imm(p->func, dataXMM, 1);
+ }
+ else
+ sse2_punpcklbw(p->func, dataXMM, get_const(p, CONST_IDENTITY));
+ break;
+ case UTIL_FORMAT_TYPE_SIGNED:
+ if(input_desc->channel[0].normalized)
+ {
+ sse2_movq(p->func, tmpXMM, get_const(p, CONST_IDENTITY));
+ sse2_punpcklbw(p->func, tmpXMM, dataXMM);
+ sse2_psllw_imm(p->func, dataXMM, 9);
+ sse2_psrlw_imm(p->func, dataXMM, 8);
+ sse2_por(p->func, tmpXMM, dataXMM);
+ sse2_psrlw_imm(p->func, dataXMM, 7);
+ sse2_por(p->func, tmpXMM, dataXMM);
+ {
+ struct x86_reg t = dataXMM;
+ dataXMM = tmpXMM;
+ tmpXMM = t;
+ }
+ }
+ else
+ {
+ sse2_punpcklbw(p->func, dataXMM, dataXMM);
+ sse2_psraw_imm(p->func, dataXMM, 8);
+ }
+ break;
+ default:
+ assert(0);
+ }
+
+ if(output_desc->channel[0].normalized)
+ imms[1] = (output_desc->channel[0].type == UTIL_FORMAT_TYPE_UNSIGNED) ? 0xffff : 0x7ffff;
+
+ if(!id_swizzle)
+ sse2_pshuflw(p->func, dataXMM, dataXMM, (swizzle[0] & 3) | ((swizzle[1] & 3) << 2) | ((swizzle[2] & 3) << 4) | ((swizzle[3] & 3) << 6));
+ }
+
+ if(output_desc->nr_channels >= 4
+ && swizzle[0] < UTIL_FORMAT_SWIZZLE_0
+ && swizzle[1] < UTIL_FORMAT_SWIZZLE_0
+ && swizzle[2] < UTIL_FORMAT_SWIZZLE_0
+ && swizzle[3] < UTIL_FORMAT_SWIZZLE_0
+ )
+ sse2_movq(p->func, dst, dataXMM);
+ else
+ {
+ if(swizzle[0] < UTIL_FORMAT_SWIZZLE_0)
+ {
+ if(output_desc->nr_channels >= 2 && swizzle[1] < UTIL_FORMAT_SWIZZLE_0)
+ sse2_movd(p->func, dst, dataXMM);
+ else
+ {
+ sse2_movd(p->func, tmp, dataXMM);
+ x86_mov16(p->func, dst, tmp);
+ if(output_desc->nr_channels >= 2)
+ x86_mov16_imm(p->func, x86_make_disp(dst, 2), imms[swizzle[1] - UTIL_FORMAT_SWIZZLE_0]);
+ }
+ }
+ else
+ {
+ if(output_desc->nr_channels >= 2 && swizzle[1] >= UTIL_FORMAT_SWIZZLE_0)
+ x86_mov_imm(p->func, dst, (imms[swizzle[1] - UTIL_FORMAT_SWIZZLE_0] << 16) | imms[swizzle[0] - UTIL_FORMAT_SWIZZLE_0]);
+ else
+ {
+ x86_mov16_imm(p->func, dst, imms[swizzle[0] - UTIL_FORMAT_SWIZZLE_0]);
+ if(output_desc->nr_channels >= 2)
+ {
+ sse2_movd(p->func, tmp, dataXMM);
+ x86_shr_imm(p->func, tmp, 16);
+ x86_mov16(p->func, x86_make_disp(dst, 2), tmp);
+ }
+ }
+ }
+
+ if(output_desc->nr_channels >= 3)
+ {
+ if(swizzle[2] < UTIL_FORMAT_SWIZZLE_0)
+ {
+ if(output_desc->nr_channels >= 4 && swizzle[3] < UTIL_FORMAT_SWIZZLE_0)
+ {
+ sse2_psrlq_imm(p->func, dataXMM, 32);
+ sse2_movd(p->func, x86_make_disp(dst, 4), dataXMM);
+ }
+ else
+ {
+ sse2_psrlq_imm(p->func, dataXMM, 32);
+ sse2_movd(p->func, tmp, dataXMM);
+ x86_mov16(p->func, x86_make_disp(dst, 4), tmp);
+ if(output_desc->nr_channels >= 4)
+ {
+ x86_mov16_imm(p->func, x86_make_disp(dst, 6), imms[swizzle[3] - UTIL_FORMAT_SWIZZLE_0]);
+ }
+ }
+ }
+ else
+ {
+ if(output_desc->nr_channels >= 4 && swizzle[3] >= UTIL_FORMAT_SWIZZLE_0)
+ x86_mov_imm(p->func, x86_make_disp(dst, 4), (imms[swizzle[3] - UTIL_FORMAT_SWIZZLE_0] << 16) | imms[swizzle[2] - UTIL_FORMAT_SWIZZLE_0]);
+ else
+ {
+ x86_mov16_imm(p->func, x86_make_disp(dst, 4), imms[swizzle[2] - UTIL_FORMAT_SWIZZLE_0]);
+
+ if(output_desc->nr_channels >= 4)
+ {
+ sse2_psrlq_imm(p->func, dataXMM, 48);
+ sse2_movd(p->func, tmp, dataXMM);
+ x86_mov16(p->func, x86_make_disp(dst, 6), tmp);
+ }
+ }
+ }
+ }
+ }
+ return TRUE;
+ }
+ else if(!memcmp(&output_desc->channel[0], &input_desc->channel[0], sizeof(output_desc->channel[0])))
+ {
+ struct x86_reg tmp = p->tmp_EAX;
+ unsigned i;
+ if(input_desc->channel[0].size == 8 && input_desc->nr_channels == 4 && output_desc->nr_channels == 4
+ && swizzle[0] == UTIL_FORMAT_SWIZZLE_W
+ && swizzle[1] == UTIL_FORMAT_SWIZZLE_Z
+ && swizzle[2] == UTIL_FORMAT_SWIZZLE_Y
+ && swizzle[3] == UTIL_FORMAT_SWIZZLE_X)
+ {
+ /* TODO: support movbe */
+ x86_mov(p->func, tmp, src);
+ x86_bswap(p->func, tmp);
+ x86_mov(p->func, dst, tmp);
+ return TRUE;
+ }
+
+ for(i = 0; i < output_desc->nr_channels; ++i)
+ {
+ switch(output_desc->channel[0].size)
+ {
+ case 8:
+ if(swizzle[i] >= UTIL_FORMAT_SWIZZLE_0)
+ {
+ unsigned v = 0;
+ if(swizzle[i] == UTIL_FORMAT_SWIZZLE_1)
+ {
+ switch(output_desc->channel[0].type)
+ {
+ case UTIL_FORMAT_TYPE_UNSIGNED:
+ v = output_desc->channel[0].normalized ? 0xff : 1;
+ break;
+ case UTIL_FORMAT_TYPE_SIGNED:
+ v = output_desc->channel[0].normalized ? 0x7f : 1;
+ break;
+ default:
+ return FALSE;
+ }
+ }
+ x86_mov8_imm(p->func, x86_make_disp(dst, i * 1), v);
+ }
+ else
+ {
+ x86_mov8(p->func, tmp, x86_make_disp(src, swizzle[i] * 1));
+ x86_mov8(p->func, x86_make_disp(dst, i * 1), tmp);
+ }
+ break;
+ case 16:
+ if(swizzle[i] >= UTIL_FORMAT_SWIZZLE_0)
+ {
+ unsigned v = 0;
+ if(swizzle[i] == UTIL_FORMAT_SWIZZLE_1)
+ {
+ switch(output_desc->channel[1].type)
+ {
+ case UTIL_FORMAT_TYPE_UNSIGNED:
+ v = output_desc->channel[1].normalized ? 0xffff : 1;
+ break;
+ case UTIL_FORMAT_TYPE_SIGNED:
+ v = output_desc->channel[1].normalized ? 0x7fff : 1;
+ break;
+ case UTIL_FORMAT_TYPE_FLOAT:
+ v = 0x3c00;
+ break;
+ default:
+ return FALSE;
+ }
+ }
+ x86_mov16_imm(p->func, x86_make_disp(dst, i * 2), v);
+ }
+ else if(swizzle[i] == UTIL_FORMAT_SWIZZLE_0)
+ x86_mov16_imm(p->func, x86_make_disp(dst, i * 2), 0);
+ else
+ {
+ x86_mov16(p->func, tmp, x86_make_disp(src, swizzle[i] * 2));
+ x86_mov16(p->func, x86_make_disp(dst, i * 2), tmp);
+ }
+ break;
+ case 32:
+ if(swizzle[i] >= UTIL_FORMAT_SWIZZLE_0)
+ {
+ unsigned v = 0;
+ if(swizzle[i] == UTIL_FORMAT_SWIZZLE_1)
+ {
+ switch(output_desc->channel[1].type)
+ {
+ case UTIL_FORMAT_TYPE_UNSIGNED:
+ v = output_desc->channel[1].normalized ? 0xffffffff : 1;
+ break;
+ case UTIL_FORMAT_TYPE_SIGNED:
+ v = output_desc->channel[1].normalized ? 0x7fffffff : 1;
+ break;
+ case UTIL_FORMAT_TYPE_FLOAT:
+ v = 0x3f800000;
+ break;
+ default:
+ return FALSE;
+ }
+ }
+ x86_mov_imm(p->func, x86_make_disp(dst, i * 4), v);
+ }
+ else
+ {
+ x86_mov(p->func, tmp, x86_make_disp(src, swizzle[i] * 4));
+ x86_mov(p->func, x86_make_disp(dst, i * 4), tmp);
+ }
+ break;
+ case 64:
+ if(swizzle[i] >= UTIL_FORMAT_SWIZZLE_0)
+ {
+ unsigned l = 0;
+ unsigned h = 0;
+ if(swizzle[i] == UTIL_FORMAT_SWIZZLE_1)
+ {
+ switch(output_desc->channel[1].type)
+ {
+ case UTIL_FORMAT_TYPE_UNSIGNED:
+ h = output_desc->channel[1].normalized ? 0xffffffff : 0;
+ l = output_desc->channel[1].normalized ? 0xffffffff : 1;
+ break;
+ case UTIL_FORMAT_TYPE_SIGNED:
+ h = output_desc->channel[1].normalized ? 0x7fffffff : 0;
+ l = output_desc->channel[1].normalized ? 0xffffffff : 1;
+ break;
+ case UTIL_FORMAT_TYPE_FLOAT:
+ h = 0x3ff00000;
+ l = 0;
+ break;
+ default:
+ return FALSE;
+ }
+ }
+ x86_mov_imm(p->func, x86_make_disp(dst, i * 8), l);
+ x86_mov_imm(p->func, x86_make_disp(dst, i * 8 + 4), h);
+ }
+ else
+ {
+ if(x86_target_caps(p->func) & X86_SSE)
+ {
+ struct x86_reg tmpXMM = x86_make_reg(file_XMM, 0);
+ emit_load64(p, tmp, tmpXMM, x86_make_disp(src, swizzle[i] * 8));
+ emit_store64(p, x86_make_disp(dst, i * 8), tmp, tmpXMM);
+ }
+ else
+ {
+ x86_mov(p->func, tmp, x86_make_disp(src, swizzle[i] * 8));
+ x86_mov(p->func, x86_make_disp(dst, i * 8), tmp);
+ x86_mov(p->func, tmp, x86_make_disp(src, swizzle[i] * 8 + 4));
+ x86_mov(p->func, x86_make_disp(dst, i * 8 + 4), tmp);
+ }
+ }
+ break;
+ default:
+ return FALSE;
+ }
+ }
+ return TRUE;
+ }
+ /* special case for draw's EMIT_4UB (RGBA) and EMIT_4UB_BGRA */
+ else if((x86_target_caps(p->func) & X86_SSE2) &&
+ a->input_format == PIPE_FORMAT_R32G32B32A32_FLOAT && (0
+ || a->output_format == PIPE_FORMAT_B8G8R8A8_UNORM
+ || a->output_format == PIPE_FORMAT_R8G8B8A8_UNORM
+ ))
+ {
+ struct x86_reg dataXMM = x86_make_reg(file_XMM, 0);
+
+ /* load */
+ sse_movups(p->func, dataXMM, src);
+
+ if (a->output_format == PIPE_FORMAT_B8G8R8A8_UNORM)
+ sse_shufps(p->func, dataXMM, dataXMM, SHUF(2,1,0,3));
+
+ /* scale by 255.0 */
+ sse_mulps(p->func, dataXMM, get_const(p, CONST_255));
+
+ /* pack and emit */
+ sse2_cvtps2dq(p->func, dataXMM, dataXMM);
+ sse2_packssdw(p->func, dataXMM, dataXMM);
+ sse2_packuswb(p->func, dataXMM, dataXMM);
+ sse2_movd(p->func, dst, dataXMM);
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static boolean translate_attr( struct translate_sse *p,
+ const struct translate_element *a,
+ struct x86_reg src,
+ struct x86_reg dst)
+{
+ if(a->input_format == a->output_format)
+ {
+ emit_memcpy(p, dst, src, util_format_get_stride(a->input_format, 1));
+ return TRUE;
+ }
+
+ return translate_attr_convert(p, a, src, dst);
+}
+
+static boolean init_inputs( struct translate_sse *p,
+ unsigned index_size )
+{
+ unsigned i;
+ struct x86_reg instance_id = x86_make_disp(p->machine_EDI,
+ get_offset(p, &p->instance_id));
+ struct x86_reg start_instance = x86_make_disp(p->machine_EDI,
+ get_offset(p, &p->start_instance));
+
+ for (i = 0; i < p->nr_buffer_variants; i++) {
+ struct translate_buffer_variant *variant = &p->buffer_variant[i];
+ struct translate_buffer *buffer = &p->buffer[variant->buffer_index];
+
+ if (!index_size || variant->instance_divisor) {
+ struct x86_reg buf_max_index = x86_make_disp(p->machine_EDI,
+ get_offset(p, &buffer->max_index));
+ struct x86_reg buf_stride = x86_make_disp(p->machine_EDI,
+ get_offset(p, &buffer->stride));
+ struct x86_reg buf_ptr = x86_make_disp(p->machine_EDI,
+ get_offset(p, &variant->ptr));
+ struct x86_reg buf_base_ptr = x86_make_disp(p->machine_EDI,
+ get_offset(p, &buffer->base_ptr));
+ struct x86_reg elt = p->idx_ESI;
+ struct x86_reg tmp_EAX = p->tmp_EAX;
+
+ /* Calculate pointer to first attrib:
+ * base_ptr + stride * index, where index depends on instance divisor
+ */
+ if (variant->instance_divisor) {
+ /* Start with instance = instance_id
+ * which is true if divisor is 1.
+ */
+ x86_mov(p->func, tmp_EAX, instance_id);
+
+ if (variant->instance_divisor != 1) {
+ struct x86_reg tmp_EDX = p->tmp2_EDX;
+ struct x86_reg tmp_ECX = p->src_ECX;
+
+ /* TODO: Add x86_shr() to rtasm and use it whenever
+ * instance divisor is power of two.
+ */
+ x86_xor(p->func, tmp_EDX, tmp_EDX);
+ x86_mov_reg_imm(p->func, tmp_ECX, variant->instance_divisor);
+ x86_div(p->func, tmp_ECX); /* EAX = EDX:EAX / ECX */
+
+ /* instance = (instance_id - start_instance) / divisor +
+ * start_instance
+ */
+ x86_mov(p->func, tmp_EDX, start_instance);
+ x86_add(p->func, tmp_EAX, tmp_EDX);
+ }
+
+ /* XXX we need to clamp the index here too, but to a
+ * per-array max value, not the draw->pt.max_index value
+ * that's being given to us via translate->set_buffer().
+ */
+ } else {
+ x86_mov(p->func, tmp_EAX, elt);
+
+ /* Clamp to max_index
+ */
+ x86_cmp(p->func, tmp_EAX, buf_max_index);
+ x86_cmovcc(p->func, tmp_EAX, buf_max_index, cc_AE);
+ }
+
+ x86_imul(p->func, tmp_EAX, buf_stride);
+ x64_rexw(p->func);
+ x86_add(p->func, tmp_EAX, buf_base_ptr);
+
+ x86_cmp(p->func, p->count_EBP, p->tmp_EAX);
+
+ /* In the linear case, keep the buffer pointer instead of the
+ * index number.
+ */
+ if (!index_size && p->nr_buffer_variants == 1)
+ {
+ x64_rexw(p->func);
+ x86_mov(p->func, elt, tmp_EAX);
+ }
+ else
+ {
+ x64_rexw(p->func);
+ x86_mov(p->func, buf_ptr, tmp_EAX);
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+
+static struct x86_reg get_buffer_ptr( struct translate_sse *p,
+ unsigned index_size,
+ unsigned var_idx,
+ struct x86_reg elt )
+{
+ if (var_idx == ELEMENT_BUFFER_INSTANCE_ID) {
+ return x86_make_disp(p->machine_EDI,
+ get_offset(p, &p->instance_id));
+ }
+ if (!index_size && p->nr_buffer_variants == 1) {
+ return p->idx_ESI;
+ }
+ else if (!index_size || p->buffer_variant[var_idx].instance_divisor) {
+ struct x86_reg ptr = p->src_ECX;
+ struct x86_reg buf_ptr =
+ x86_make_disp(p->machine_EDI,
+ get_offset(p, &p->buffer_variant[var_idx].ptr));
+
+ x64_rexw(p->func);
+ x86_mov(p->func, ptr, buf_ptr);
+ return ptr;
+ }
+ else {
+ struct x86_reg ptr = p->src_ECX;
+ const struct translate_buffer_variant *variant = &p->buffer_variant[var_idx];
+
+ struct x86_reg buf_stride =
+ x86_make_disp(p->machine_EDI,
+ get_offset(p, &p->buffer[variant->buffer_index].stride));
+
+ struct x86_reg buf_base_ptr =
+ x86_make_disp(p->machine_EDI,
+ get_offset(p, &p->buffer[variant->buffer_index].base_ptr));
+
+ struct x86_reg buf_max_index =
+ x86_make_disp(p->machine_EDI,
+ get_offset(p, &p->buffer[variant->buffer_index].max_index));
+
+
+
+ /* Calculate pointer to current attrib:
+ */
+ switch(index_size)
+ {
+ case 1:
+ x86_movzx8(p->func, ptr, elt);
+ break;
+ case 2:
+ x86_movzx16(p->func, ptr, elt);
+ break;
+ case 4:
+ x86_mov(p->func, ptr, elt);
+ break;
+ }
+
+ /* Clamp to max_index
+ */
+ x86_cmp(p->func, ptr, buf_max_index);
+ x86_cmovcc(p->func, ptr, buf_max_index, cc_AE);
+
+ x86_imul(p->func, ptr, buf_stride);
+ x64_rexw(p->func);
+ x86_add(p->func, ptr, buf_base_ptr);
+ return ptr;
+ }
+}
+
+
+
+static boolean incr_inputs( struct translate_sse *p,
+ unsigned index_size )
+{
+ if (!index_size && p->nr_buffer_variants == 1) {
+ struct x86_reg stride = x86_make_disp(p->machine_EDI,
+ get_offset(p, &p->buffer[0].stride));
+
+ if (p->buffer_variant[0].instance_divisor == 0) {
+ x64_rexw(p->func);
+ x86_add(p->func, p->idx_ESI, stride);
+ sse_prefetchnta(p->func, x86_make_disp(p->idx_ESI, 192));
+ }
+ }
+ else if (!index_size) {
+ unsigned i;
+
+ /* Is this worthwhile??
+ */
+ for (i = 0; i < p->nr_buffer_variants; i++) {
+ struct translate_buffer_variant *variant = &p->buffer_variant[i];
+ struct x86_reg buf_ptr = x86_make_disp(p->machine_EDI,
+ get_offset(p, &variant->ptr));
+ struct x86_reg buf_stride = x86_make_disp(p->machine_EDI,
+ get_offset(p, &p->buffer[variant->buffer_index].stride));
+
+ if (variant->instance_divisor == 0) {
+ x86_mov(p->func, p->tmp_EAX, buf_stride);
+ x64_rexw(p->func);
+ x86_add(p->func, p->tmp_EAX, buf_ptr);
+ if (i == 0) sse_prefetchnta(p->func, x86_make_disp(p->tmp_EAX, 192));
+ x64_rexw(p->func);
+ x86_mov(p->func, buf_ptr, p->tmp_EAX);
+ }
+ }
+ }
+ else {
+ x64_rexw(p->func);
+ x86_lea(p->func, p->idx_ESI, x86_make_disp(p->idx_ESI, index_size));
+ }
+
+ return TRUE;
+}
+
+
+/* Build run( struct translate *machine,
+ * unsigned start,
+ * unsigned count,
+ * void *output_buffer )
+ * or
+ * run_elts( struct translate *machine,
+ * unsigned *elts,
+ * unsigned count,
+ * void *output_buffer )
+ *
+ * Lots of hardcoding
+ *
+ * EAX -- pointer to current output vertex
+ * ECX -- pointer to current attribute
+ *
+ */
+static boolean build_vertex_emit( struct translate_sse *p,
+ struct x86_function *func,
+ unsigned index_size )
+{
+ int fixup, label;
+ unsigned j;
+
+ memset(p->reg_to_const, 0xff, sizeof(p->reg_to_const));
+ memset(p->const_to_reg, 0xff, sizeof(p->const_to_reg));
+
+ p->tmp_EAX = x86_make_reg(file_REG32, reg_AX);
+ p->idx_ESI = x86_make_reg(file_REG32, reg_SI);
+ p->outbuf_EBX = x86_make_reg(file_REG32, reg_BX);
+ p->machine_EDI = x86_make_reg(file_REG32, reg_DI);
+ p->count_EBP = x86_make_reg(file_REG32, reg_BP);
+ p->tmp2_EDX = x86_make_reg(file_REG32, reg_DX);
+ p->src_ECX = x86_make_reg(file_REG32, reg_CX);
+
+ p->func = func;
+
+ x86_init_func(p->func);
+
+ if(x86_target(p->func) == X86_64_WIN64_ABI)
+ {
+ /* the ABI guarantees a 16-byte aligned 32-byte "shadow space" above the return address */
+ sse2_movdqa(p->func, x86_make_disp(x86_make_reg(file_REG32, reg_SP), 8), x86_make_reg(file_XMM, 6));
+ sse2_movdqa(p->func, x86_make_disp(x86_make_reg(file_REG32, reg_SP), 24), x86_make_reg(file_XMM, 7));
+ }
+
+ x86_push(p->func, p->outbuf_EBX);
+ x86_push(p->func, p->count_EBP);
+
+/* on non-Win64 x86-64, these are already in the right registers */
+ if(x86_target(p->func) != X86_64_STD_ABI)
+ {
+ x86_push(p->func, p->machine_EDI);
+ x86_push(p->func, p->idx_ESI);
+
+ x86_mov(p->func, p->machine_EDI, x86_fn_arg(p->func, 1));
+ x86_mov(p->func, p->idx_ESI, x86_fn_arg(p->func, 2));
+ }
+
+ x86_mov(p->func, p->count_EBP, x86_fn_arg(p->func, 3));
+
+ if(x86_target(p->func) != X86_32)
+ x64_mov64(p->func, p->outbuf_EBX, x86_fn_arg(p->func, 6));
+ else
+ x86_mov(p->func, p->outbuf_EBX, x86_fn_arg(p->func, 6));
+
+ /* Load instance ID.
+ */
+ if (p->use_instancing) {
+ x86_mov(p->func,
+ p->tmp2_EDX,
+ x86_fn_arg(p->func, 4));
+ x86_mov(p->func,
+ x86_make_disp(p->machine_EDI, get_offset(p, &p->start_instance)),
+ p->tmp2_EDX);
+
+ x86_mov(p->func,
+ p->tmp_EAX,
+ x86_fn_arg(p->func, 5));
+ x86_mov(p->func,
+ x86_make_disp(p->machine_EDI, get_offset(p, &p->instance_id)),
+ p->tmp_EAX);
+ }
+
+ /* Get vertex count, compare to zero
+ */
+ x86_xor(p->func, p->tmp_EAX, p->tmp_EAX);
+ x86_cmp(p->func, p->count_EBP, p->tmp_EAX);
+ fixup = x86_jcc_forward(p->func, cc_E);
+
+ /* always load, needed or not:
+ */
+ init_inputs(p, index_size);
+
+ /* Note address for loop jump
+ */
+ label = x86_get_label(p->func);
+ {
+ struct x86_reg elt = !index_size ? p->idx_ESI : x86_deref(p->idx_ESI);
+ int last_variant = -1;
+ struct x86_reg vb;
+
+ for (j = 0; j < p->translate.key.nr_elements; j++) {
+ const struct translate_element *a = &p->translate.key.element[j];
+ unsigned variant = p->element_to_buffer_variant[j];
+
+ /* Figure out source pointer address:
+ */
+ if (variant != last_variant) {
+ last_variant = variant;
+ vb = get_buffer_ptr(p, index_size, variant, elt);
+ }
+
+ if (!translate_attr( p, a,
+ x86_make_disp(vb, a->input_offset),
+ x86_make_disp(p->outbuf_EBX, a->output_offset)))
+ return FALSE;
+ }
+
+ /* Next output vertex:
+ */
+ x64_rexw(p->func);
+ x86_lea(p->func,
+ p->outbuf_EBX,
+ x86_make_disp(p->outbuf_EBX,
+ p->translate.key.output_stride));
+
+ /* Incr index
+ */
+ incr_inputs( p, index_size );
+ }
+
+ /* decr count, loop if not zero
+ */
+ x86_dec(p->func, p->count_EBP);
+ x86_jcc(p->func, cc_NZ, label);
+
+ /* Exit mmx state?
+ */
+ if (p->func->need_emms)
+ mmx_emms(p->func);
+
+ /* Land forward jump here:
+ */
+ x86_fixup_fwd_jump(p->func, fixup);
+
+ /* Pop regs and return
+ */
+
+ if(x86_target(p->func) != X86_64_STD_ABI)
+ {
+ x86_pop(p->func, p->idx_ESI);
+ x86_pop(p->func, p->machine_EDI);
+ }
+
+ x86_pop(p->func, p->count_EBP);
+ x86_pop(p->func, p->outbuf_EBX);
+
+ if(x86_target(p->func) == X86_64_WIN64_ABI)
+ {
+ sse2_movdqa(p->func, x86_make_reg(file_XMM, 6), x86_make_disp(x86_make_reg(file_REG32, reg_SP), 8));
+ sse2_movdqa(p->func, x86_make_reg(file_XMM, 7), x86_make_disp(x86_make_reg(file_REG32, reg_SP), 24));
+ }
+ x86_ret(p->func);
+
+ return TRUE;
+}
+
+
+
+
+
+
+
+static void translate_sse_set_buffer( struct translate *translate,
+ unsigned buf,
+ const void *ptr,
+ unsigned stride,
+ unsigned max_index )
+{
+ struct translate_sse *p = (struct translate_sse *)translate;
+
+ if (buf < p->nr_buffers) {
+ p->buffer[buf].base_ptr = (char *)ptr;
+ p->buffer[buf].stride = stride;
+ p->buffer[buf].max_index = max_index;
+ }
+
+ if (0) debug_printf("%s %d/%d: %p %d\n",
+ __FUNCTION__, buf,
+ p->nr_buffers,
+ ptr, stride);
+}
+
+
+static void translate_sse_release( struct translate *translate )
+{
+ struct translate_sse *p = (struct translate_sse *)translate;
+
+ x86_release_func( &p->elt8_func );
+ x86_release_func( &p->elt16_func );
+ x86_release_func( &p->elt_func );
+ x86_release_func( &p->linear_func );
+
+ os_free_aligned(p);
+}
+
+
+struct translate *translate_sse2_create( const struct translate_key *key )
+{
+ struct translate_sse *p = NULL;
+ unsigned i;
+
+ /* this is misnamed, it actually refers to whether rtasm is enabled or not */
+ if (!rtasm_cpu_has_sse())
+ goto fail;
+
+ p = os_malloc_aligned(sizeof(struct translate_sse), 16);
+ if (p == NULL)
+ goto fail;
+ memset(p, 0, sizeof(*p));
+ memcpy(p->consts, consts, sizeof(consts));
+
+ p->translate.key = *key;
+ p->translate.release = translate_sse_release;
+ p->translate.set_buffer = translate_sse_set_buffer;
+
+ for (i = 0; i < key->nr_elements; i++) {
+ if (key->element[i].type == TRANSLATE_ELEMENT_NORMAL) {
+ unsigned j;
+
+ p->nr_buffers = MAX2(p->nr_buffers, key->element[i].input_buffer + 1);
+
+ if (key->element[i].instance_divisor) {
+ p->use_instancing = TRUE;
+ }
+
+ /*
+ * Map vertex element to vertex buffer variant.
+ */
+ for (j = 0; j < p->nr_buffer_variants; j++) {
+ if (p->buffer_variant[j].buffer_index == key->element[i].input_buffer &&
+ p->buffer_variant[j].instance_divisor == key->element[i].instance_divisor) {
+ break;
+ }
+ }
+ if (j == p->nr_buffer_variants) {
+ p->buffer_variant[j].buffer_index = key->element[i].input_buffer;
+ p->buffer_variant[j].instance_divisor = key->element[i].instance_divisor;
+ p->nr_buffer_variants++;
+ }
+ p->element_to_buffer_variant[i] = j;
+ } else {
+ assert(key->element[i].type == TRANSLATE_ELEMENT_INSTANCE_ID);
+
+ p->element_to_buffer_variant[i] = ELEMENT_BUFFER_INSTANCE_ID;
+ }
+ }
+
+ if (0) debug_printf("nr_buffers: %d\n", p->nr_buffers);
+
+ if (!build_vertex_emit(p, &p->linear_func, 0))
+ goto fail;
+
+ if (!build_vertex_emit(p, &p->elt_func, 4))
+ goto fail;
+
+ if (!build_vertex_emit(p, &p->elt16_func, 2))
+ goto fail;
+
+ if (!build_vertex_emit(p, &p->elt8_func, 1))
+ goto fail;
+
+ p->translate.run = (run_func) x86_get_func(&p->linear_func);
+ if (p->translate.run == NULL)
+ goto fail;
+
+ p->translate.run_elts = (run_elts_func) x86_get_func(&p->elt_func);
+ if (p->translate.run_elts == NULL)
+ goto fail;
+
+ p->translate.run_elts16 = (run_elts16_func) x86_get_func(&p->elt16_func);
+ if (p->translate.run_elts16 == NULL)
+ goto fail;
+
+ p->translate.run_elts8 = (run_elts8_func) x86_get_func(&p->elt8_func);
+ if (p->translate.run_elts8 == NULL)
+ goto fail;
+
+ return &p->translate;
+
+ fail:
+ if (p)
+ translate_sse_release( &p->translate );
+
+ return NULL;
+}
+
+
+
+#else
+
+struct translate *translate_sse2_create( const struct translate_key *key )
+{
+ return NULL;
+}
+
+#endif
diff --git a/src/minigallium/auxiliary/util/dbghelp.h b/src/minigallium/auxiliary/util/dbghelp.h
new file mode 100644
index 0000000..bc7c53c
--- /dev/null
+++ b/src/minigallium/auxiliary/util/dbghelp.h
@@ -0,0 +1,1265 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#ifndef _DBGHELP_
+#define _DBGHELP_
+
+#ifdef _WIN64
+#ifndef _IMAGEHLP64
+#define _IMAGEHLP64
+#endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define IMAGEAPI DECLSPEC_IMPORT WINAPI
+#define DBHLP_DEPRECIATED __declspec(deprecated)
+
+#define DBHLPAPI IMAGEAPI
+
+#define IMAGE_SEPARATION (64*1024)
+
+ typedef struct _LOADED_IMAGE {
+ PSTR ModuleName;
+ HANDLE hFile;
+ PUCHAR MappedAddress;
+#ifdef _IMAGEHLP64
+ PIMAGE_NT_HEADERS64 FileHeader;
+#else
+ PIMAGE_NT_HEADERS32 FileHeader;
+#endif
+ PIMAGE_SECTION_HEADER LastRvaSection;
+ ULONG NumberOfSections;
+ PIMAGE_SECTION_HEADER Sections;
+ ULONG Characteristics;
+ BOOLEAN fSystemImage;
+ BOOLEAN fDOSImage;
+ LIST_ENTRY Links;
+ ULONG SizeOfImage;
+ } LOADED_IMAGE,*PLOADED_IMAGE;
+
+#define MAX_SYM_NAME 2000
+
+ typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(HANDLE FileHandle,PSTR FileName,PVOID CallerData);
+ typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACK)(PSTR filename,PVOID context);
+ typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACK)(HANDLE FileHandle,PSTR FileName,PVOID CallerData);
+
+ typedef BOOL (WINAPI *PSYMBOLSERVERPROC)(LPCSTR,LPCSTR,PVOID,DWORD,DWORD,LPSTR);
+ typedef BOOL (WINAPI *PSYMBOLSERVEROPENPROC)(VOID);
+ typedef BOOL (WINAPI *PSYMBOLSERVERCLOSEPROC)(VOID);
+ typedef BOOL (WINAPI *PSYMBOLSERVERSETOPTIONSPROC)(UINT_PTR,ULONG64);
+ typedef BOOL (CALLBACK WINAPI *PSYMBOLSERVERCALLBACKPROC)(UINT_PTR action,ULONG64 data,ULONG64 context);
+ typedef UINT_PTR (WINAPI *PSYMBOLSERVERGETOPTIONSPROC)();
+ typedef BOOL (WINAPI *PSYMBOLSERVERPINGPROC)(LPCSTR);
+
+ HANDLE IMAGEAPI FindDebugInfoFile(PSTR FileName,PSTR SymbolPath,PSTR DebugFilePath);
+ HANDLE IMAGEAPI FindDebugInfoFileEx(PSTR FileName,PSTR SymbolPath,PSTR DebugFilePath,PFIND_DEBUG_FILE_CALLBACK Callback,PVOID CallerData);
+ BOOL IMAGEAPI SymFindFileInPath(HANDLE hprocess,LPSTR SearchPath,LPSTR FileName,PVOID id,DWORD two,DWORD three,DWORD flags,LPSTR FoundFile,PFINDFILEINPATHCALLBACK callback,PVOID context);
+ HANDLE IMAGEAPI FindExecutableImage(PSTR FileName,PSTR SymbolPath,PSTR ImageFilePath);
+ HANDLE IMAGEAPI FindExecutableImageEx(PSTR FileName,PSTR SymbolPath,PSTR ImageFilePath,PFIND_EXE_FILE_CALLBACK Callback,PVOID CallerData);
+ PIMAGE_NT_HEADERS IMAGEAPI ImageNtHeader(PVOID Base);
+ PVOID IMAGEAPI ImageDirectoryEntryToDataEx(PVOID Base,BOOLEAN MappedAsImage,USHORT DirectoryEntry,PULONG Size,PIMAGE_SECTION_HEADER *FoundHeader);
+ PVOID IMAGEAPI ImageDirectoryEntryToData(PVOID Base,BOOLEAN MappedAsImage,USHORT DirectoryEntry,PULONG Size);
+ PIMAGE_SECTION_HEADER IMAGEAPI ImageRvaToSection(PIMAGE_NT_HEADERS NtHeaders,PVOID Base,ULONG Rva);
+ PVOID IMAGEAPI ImageRvaToVa(PIMAGE_NT_HEADERS NtHeaders,PVOID Base,ULONG Rva,PIMAGE_SECTION_HEADER *LastRvaSection);
+
+#define SSRVOPT_CALLBACK 0x0001
+#define SSRVOPT_DWORD 0x0002
+#define SSRVOPT_DWORDPTR 0x0004
+#define SSRVOPT_GUIDPTR 0x0008
+#define SSRVOPT_OLDGUIDPTR 0x0010
+#define SSRVOPT_UNATTENDED 0x0020
+#define SSRVOPT_NOCOPY 0x0040
+#define SSRVOPT_PARENTWIN 0x0080
+#define SSRVOPT_PARAMTYPE 0x0100
+#define SSRVOPT_SECURE 0x0200
+#define SSRVOPT_TRACE 0x0400
+#define SSRVOPT_SETCONTEXT 0x0800
+#define SSRVOPT_PROXY 0x1000
+#define SSRVOPT_DOWNSTREAM_STORE 0x2000
+#define SSRVOPT_RESET ((ULONG_PTR)-1)
+
+#define SSRVACTION_TRACE 1
+#define SSRVACTION_QUERYCANCEL 2
+#define SSRVACTION_EVENT 3
+
+#ifndef _WIN64
+
+ typedef struct _IMAGE_DEBUG_INFORMATION {
+ LIST_ENTRY List;
+ DWORD ReservedSize;
+ PVOID ReservedMappedBase;
+ USHORT ReservedMachine;
+ USHORT ReservedCharacteristics;
+ DWORD ReservedCheckSum;
+ DWORD ImageBase;
+ DWORD SizeOfImage;
+ DWORD ReservedNumberOfSections;
+ PIMAGE_SECTION_HEADER ReservedSections;
+ DWORD ReservedExportedNamesSize;
+ PSTR ReservedExportedNames;
+ DWORD ReservedNumberOfFunctionTableEntries;
+ PIMAGE_FUNCTION_ENTRY ReservedFunctionTableEntries;
+ DWORD ReservedLowestFunctionStartingAddress;
+ DWORD ReservedHighestFunctionEndingAddress;
+ DWORD ReservedNumberOfFpoTableEntries;
+ PFPO_DATA ReservedFpoTableEntries;
+ DWORD SizeOfCoffSymbols;
+ PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols;
+ DWORD ReservedSizeOfCodeViewSymbols;
+ PVOID ReservedCodeViewSymbols;
+ PSTR ImageFilePath;
+ PSTR ImageFileName;
+ PSTR ReservedDebugFilePath;
+ DWORD ReservedTimeDateStamp;
+ BOOL ReservedRomImage;
+ PIMAGE_DEBUG_DIRECTORY ReservedDebugDirectory;
+ DWORD ReservedNumberOfDebugDirectories;
+ DWORD ReservedOriginalFunctionTableBaseAddress;
+ DWORD Reserved[2 ];
+ } IMAGE_DEBUG_INFORMATION,*PIMAGE_DEBUG_INFORMATION;
+
+ PIMAGE_DEBUG_INFORMATION IMAGEAPI MapDebugInformation(HANDLE FileHandle,PSTR FileName,PSTR SymbolPath,DWORD ImageBase);
+ BOOL IMAGEAPI UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION DebugInfo);
+#endif
+
+ typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACK)(LPCSTR FilePath,PVOID CallerData);
+
+ BOOL IMAGEAPI SearchTreeForFile(PSTR RootPath,PSTR InputPathName,PSTR OutputPathBuffer);
+ BOOL IMAGEAPI EnumDirTree(HANDLE hProcess,PSTR RootPath,PSTR InputPathName,PSTR OutputPathBuffer,PENUMDIRTREE_CALLBACK Callback,PVOID CallbackData);
+ BOOL IMAGEAPI MakeSureDirectoryPathExists(PCSTR DirPath);
+
+#define UNDNAME_COMPLETE (0x0000)
+#define UNDNAME_NO_LEADING_UNDERSCORES (0x0001)
+#define UNDNAME_NO_MS_KEYWORDS (0x0002)
+#define UNDNAME_NO_FUNCTION_RETURNS (0x0004)
+#define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
+#define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
+#define UNDNAME_NO_MS_THISTYPE (0x0020)
+#define UNDNAME_NO_CV_THISTYPE (0x0040)
+#define UNDNAME_NO_THISTYPE (0x0060)
+#define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080)
+#define UNDNAME_NO_THROW_SIGNATURES (0x0100)
+#define UNDNAME_NO_MEMBER_TYPE (0x0200)
+#define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
+#define UNDNAME_32_BIT_DECODE (0x0800)
+#define UNDNAME_NAME_ONLY (0x1000)
+#define UNDNAME_NO_ARGUMENTS (0x2000)
+#define UNDNAME_NO_SPECIAL_SYMS (0x4000)
+
+ DWORD IMAGEAPI WINAPI UnDecorateSymbolName(PCSTR DecoratedName,PSTR UnDecoratedName,DWORD UndecoratedLength,DWORD Flags);
+
+#define DBHHEADER_DEBUGDIRS 0x1
+
+ typedef struct _MODLOAD_DATA {
+ DWORD ssize;
+ DWORD ssig;
+ PVOID data;
+ DWORD size;
+ DWORD flags;
+ } MODLOAD_DATA,*PMODLOAD_DATA;
+
+ typedef enum {
+ AddrMode1616,AddrMode1632,AddrModeReal,AddrModeFlat
+ } ADDRESS_MODE;
+
+ typedef struct _tagADDRESS64 {
+ DWORD64 Offset;
+ WORD Segment;
+ ADDRESS_MODE Mode;
+ } ADDRESS64,*LPADDRESS64;
+
+#ifdef _IMAGEHLP64
+#define ADDRESS ADDRESS64
+#define LPADDRESS LPADDRESS64
+#else
+ typedef struct _tagADDRESS {
+ DWORD Offset;
+ WORD Segment;
+ ADDRESS_MODE Mode;
+ } ADDRESS,*LPADDRESS;
+
+ static __inline void Address32To64(LPADDRESS a32,LPADDRESS64 a64) {
+ a64->Offset = (ULONG64)(LONG64)(LONG)a32->Offset;
+ a64->Segment = a32->Segment;
+ a64->Mode = a32->Mode;
+ }
+
+ static __inline void Address64To32(LPADDRESS64 a64,LPADDRESS a32) {
+ a32->Offset = (ULONG)a64->Offset;
+ a32->Segment = a64->Segment;
+ a32->Mode = a64->Mode;
+ }
+#endif
+
+ typedef struct _KDHELP64 {
+ DWORD64 Thread;
+ DWORD ThCallbackStack;
+ DWORD ThCallbackBStore;
+ DWORD NextCallback;
+ DWORD FramePointer;
+ DWORD64 KiCallUserMode;
+ DWORD64 KeUserCallbackDispatcher;
+ DWORD64 SystemRangeStart;
+ DWORD64 Reserved[8];
+ } KDHELP64,*PKDHELP64;
+
+#ifdef _IMAGEHLP64
+#define KDHELP KDHELP64
+#define PKDHELP PKDHELP64
+#else
+ typedef struct _KDHELP {
+ DWORD Thread;
+ DWORD ThCallbackStack;
+ DWORD NextCallback;
+ DWORD FramePointer;
+ DWORD KiCallUserMode;
+ DWORD KeUserCallbackDispatcher;
+ DWORD SystemRangeStart;
+ DWORD ThCallbackBStore;
+ DWORD Reserved[8];
+ } KDHELP,*PKDHELP;
+
+ static __inline void KdHelp32To64(PKDHELP p32,PKDHELP64 p64) {
+ p64->Thread = p32->Thread;
+ p64->ThCallbackStack = p32->ThCallbackStack;
+ p64->NextCallback = p32->NextCallback;
+ p64->FramePointer = p32->FramePointer;
+ p64->KiCallUserMode = p32->KiCallUserMode;
+ p64->KeUserCallbackDispatcher = p32->KeUserCallbackDispatcher;
+ p64->SystemRangeStart = p32->SystemRangeStart;
+ }
+#endif
+
+ typedef struct _tagSTACKFRAME64 {
+ ADDRESS64 AddrPC;
+ ADDRESS64 AddrReturn;
+ ADDRESS64 AddrFrame;
+ ADDRESS64 AddrStack;
+ ADDRESS64 AddrBStore;
+ PVOID FuncTableEntry;
+ DWORD64 Params[4];
+ BOOL Far;
+ BOOL Virtual;
+ DWORD64 Reserved[3];
+ KDHELP64 KdHelp;
+ } STACKFRAME64,*LPSTACKFRAME64;
+
+#ifdef _IMAGEHLP64
+#define STACKFRAME STACKFRAME64
+#define LPSTACKFRAME LPSTACKFRAME64
+#else
+ typedef struct _tagSTACKFRAME {
+ ADDRESS AddrPC;
+ ADDRESS AddrReturn;
+ ADDRESS AddrFrame;
+ ADDRESS AddrStack;
+ PVOID FuncTableEntry;
+ DWORD Params[4];
+ BOOL Far;
+ BOOL Virtual;
+ DWORD Reserved[3];
+ KDHELP KdHelp;
+ ADDRESS AddrBStore;
+ } STACKFRAME,*LPSTACKFRAME;
+#endif
+
+ typedef BOOL (WINAPI *PREAD_PROCESS_MEMORY_ROUTINE64)(HANDLE hProcess,DWORD64 qwBaseAddress,PVOID lpBuffer,DWORD nSize,LPDWORD lpNumberOfBytesRead);
+ typedef PVOID (WINAPI *PFUNCTION_TABLE_ACCESS_ROUTINE64)(HANDLE hProcess,DWORD64 AddrBase);
+ typedef DWORD64 (WINAPI *PGET_MODULE_BASE_ROUTINE64)(HANDLE hProcess,DWORD64 Address);
+ typedef DWORD64 (WINAPI *PTRANSLATE_ADDRESS_ROUTINE64)(HANDLE hProcess,HANDLE hThread,LPADDRESS64 lpaddr);
+
+ BOOL IMAGEAPI StackWalk64(DWORD MachineType,HANDLE hProcess,HANDLE hThread,LPSTACKFRAME64 StackFrame,PVOID ContextRecord,PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine,PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine,PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine,PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress);
+
+#ifdef _IMAGEHLP64
+#define PREAD_PROCESS_MEMORY_ROUTINE PREAD_PROCESS_MEMORY_ROUTINE64
+#define PFUNCTION_TABLE_ACCESS_ROUTINE PFUNCTION_TABLE_ACCESS_ROUTINE64
+#define PGET_MODULE_BASE_ROUTINE PGET_MODULE_BASE_ROUTINE64
+#define PTRANSLATE_ADDRESS_ROUTINE PTRANSLATE_ADDRESS_ROUTINE64
+#define StackWalk StackWalk64
+#else
+ typedef BOOL (WINAPI *PREAD_PROCESS_MEMORY_ROUTINE)(HANDLE hProcess,DWORD lpBaseAddress,PVOID lpBuffer,DWORD nSize,PDWORD lpNumberOfBytesRead);
+ typedef PVOID (WINAPI *PFUNCTION_TABLE_ACCESS_ROUTINE)(HANDLE hProcess,DWORD AddrBase);
+ typedef DWORD (WINAPI *PGET_MODULE_BASE_ROUTINE)(HANDLE hProcess,DWORD Address);
+ typedef DWORD (WINAPI *PTRANSLATE_ADDRESS_ROUTINE)(HANDLE hProcess,HANDLE hThread,LPADDRESS lpaddr);
+
+ BOOL IMAGEAPI StackWalk(DWORD MachineType,HANDLE hProcess,HANDLE hThread,LPSTACKFRAME StackFrame,PVOID ContextRecord,PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine,PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine,PTRANSLATE_ADDRESS_ROUTINE TranslateAddress);
+#endif
+
+#define API_VERSION_NUMBER 9
+
+ typedef struct API_VERSION {
+ USHORT MajorVersion;
+ USHORT MinorVersion;
+ USHORT Revision;
+ USHORT Reserved;
+ } API_VERSION,*LPAPI_VERSION;
+
+ LPAPI_VERSION IMAGEAPI ImagehlpApiVersion(VOID);
+ LPAPI_VERSION IMAGEAPI ImagehlpApiVersionEx(LPAPI_VERSION AppVersion);
+ DWORD IMAGEAPI GetTimestampForLoadedLibrary(HMODULE Module);
+
+ typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(PSTR ModuleName,DWORD64 BaseOfDll,PVOID UserContext);
+ typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(PSTR SymbolName,DWORD64 SymbolAddress,ULONG SymbolSize,PVOID UserContext);
+ typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)(PWSTR SymbolName,DWORD64 SymbolAddress,ULONG SymbolSize,PVOID UserContext);
+ typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK64)(PSTR ModuleName,DWORD64 ModuleBase,ULONG ModuleSize,PVOID UserContext);
+ typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(HANDLE hProcess,ULONG ActionCode,ULONG64 CallbackData,ULONG64 UserContext);
+ typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(HANDLE hProcess,DWORD AddrBase,PVOID UserContext);
+ typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(HANDLE hProcess,ULONG64 AddrBase,ULONG64 UserContext);
+
+#ifdef _IMAGEHLP64
+#define PSYM_ENUMMODULES_CALLBACK PSYM_ENUMMODULES_CALLBACK64
+#define PSYM_ENUMSYMBOLS_CALLBACK PSYM_ENUMSYMBOLS_CALLBACK64
+#define PSYM_ENUMSYMBOLS_CALLBACKW PSYM_ENUMSYMBOLS_CALLBACK64W
+#define PENUMLOADED_MODULES_CALLBACK PENUMLOADED_MODULES_CALLBACK64
+#define PSYMBOL_REGISTERED_CALLBACK PSYMBOL_REGISTERED_CALLBACK64
+#define PSYMBOL_FUNCENTRY_CALLBACK PSYMBOL_FUNCENTRY_CALLBACK64
+#else
+ typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PSTR ModuleName,ULONG BaseOfDll,PVOID UserContext);
+ typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(PSTR SymbolName,ULONG SymbolAddress,ULONG SymbolSize,PVOID UserContext);
+ typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(PWSTR SymbolName,ULONG SymbolAddress,ULONG SymbolSize,PVOID UserContext);
+ typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(PSTR ModuleName,ULONG ModuleBase,ULONG ModuleSize,PVOID UserContext);
+ typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(HANDLE hProcess,ULONG ActionCode,PVOID CallbackData,PVOID UserContext);
+#endif
+
+#define SYMFLAG_VALUEPRESENT 0x00000001
+#define SYMFLAG_REGISTER 0x00000008
+#define SYMFLAG_REGREL 0x00000010
+#define SYMFLAG_FRAMEREL 0x00000020
+#define SYMFLAG_PARAMETER 0x00000040
+#define SYMFLAG_LOCAL 0x00000080
+#define SYMFLAG_CONSTANT 0x00000100
+#define SYMFLAG_EXPORT 0x00000200
+#define SYMFLAG_FORWARDER 0x00000400
+#define SYMFLAG_FUNCTION 0x00000800
+#define SYMFLAG_VIRTUAL 0x00001000
+#define SYMFLAG_THUNK 0x00002000
+#define SYMFLAG_TLSREL 0x00004000
+
+ typedef enum {
+ SymNone = 0,SymCoff,SymCv,SymPdb,SymExport,SymDeferred,SymSym,SymDia,SymVirtual,NumSymTypes
+ } SYM_TYPE;
+
+ typedef struct _IMAGEHLP_SYMBOL64 {
+ DWORD SizeOfStruct;
+ DWORD64 Address;
+ DWORD Size;
+ DWORD Flags;
+ DWORD MaxNameLength;
+ CHAR Name[1];
+ } IMAGEHLP_SYMBOL64,*PIMAGEHLP_SYMBOL64;
+
+ typedef struct _IMAGEHLP_SYMBOL64_PACKAGE {
+ IMAGEHLP_SYMBOL64 sym;
+ CHAR name[MAX_SYM_NAME + 1];
+ } IMAGEHLP_SYMBOL64_PACKAGE,*PIMAGEHLP_SYMBOL64_PACKAGE;
+
+#ifdef _IMAGEHLP64
+
+#define IMAGEHLP_SYMBOL IMAGEHLP_SYMBOL64
+#define PIMAGEHLP_SYMBOL PIMAGEHLP_SYMBOL64
+#define IMAGEHLP_SYMBOL_PACKAGE IMAGEHLP_SYMBOL64_PACKAGE
+#define PIMAGEHLP_SYMBOL_PACKAGE PIMAGEHLP_SYMBOL64_PACKAGE
+#else
+
+ typedef struct _IMAGEHLP_SYMBOL {
+ DWORD SizeOfStruct;
+ DWORD Address;
+ DWORD Size;
+ DWORD Flags;
+ DWORD MaxNameLength;
+ CHAR Name[1];
+ } IMAGEHLP_SYMBOL,*PIMAGEHLP_SYMBOL;
+
+ typedef struct _IMAGEHLP_SYMBOL_PACKAGE {
+ IMAGEHLP_SYMBOL sym;
+ CHAR name[MAX_SYM_NAME + 1];
+ } IMAGEHLP_SYMBOL_PACKAGE,*PIMAGEHLP_SYMBOL_PACKAGE;
+#endif
+
+ typedef struct _IMAGEHLP_MODULE64 {
+ DWORD SizeOfStruct;
+ DWORD64 BaseOfImage;
+ DWORD ImageSize;
+ DWORD TimeDateStamp;
+ DWORD CheckSum;
+ DWORD NumSyms;
+ SYM_TYPE SymType;
+ CHAR ModuleName[32];
+ CHAR ImageName[256];
+ CHAR LoadedImageName[256];
+ CHAR LoadedPdbName[256];
+ DWORD CVSig;
+ CHAR CVData[MAX_PATH*3];
+ DWORD PdbSig;
+ GUID PdbSig70;
+ DWORD PdbAge;
+ BOOL PdbUnmatched;
+ BOOL DbgUnmatched;
+ BOOL LineNumbers;
+ BOOL GlobalSymbols;
+ BOOL TypeInfo;
+ } IMAGEHLP_MODULE64,*PIMAGEHLP_MODULE64;
+
+ typedef struct _IMAGEHLP_MODULE64W {
+ DWORD SizeOfStruct;
+ DWORD64 BaseOfImage;
+ DWORD ImageSize;
+ DWORD TimeDateStamp;
+ DWORD CheckSum;
+ DWORD NumSyms;
+ SYM_TYPE SymType;
+ WCHAR ModuleName[32];
+ WCHAR ImageName[256];
+ WCHAR LoadedImageName[256];
+ WCHAR LoadedPdbName[256];
+ DWORD CVSig;
+ WCHAR CVData[MAX_PATH*3];
+ DWORD PdbSig;
+ GUID PdbSig70;
+ DWORD PdbAge;
+ BOOL PdbUnmatched;
+ BOOL DbgUnmatched;
+ BOOL LineNumbers;
+ BOOL GlobalSymbols;
+ BOOL TypeInfo;
+ } IMAGEHLP_MODULEW64,*PIMAGEHLP_MODULEW64;
+
+#ifdef _IMAGEHLP64
+#define IMAGEHLP_MODULE IMAGEHLP_MODULE64
+#define PIMAGEHLP_MODULE PIMAGEHLP_MODULE64
+#define IMAGEHLP_MODULEW IMAGEHLP_MODULEW64
+#define PIMAGEHLP_MODULEW PIMAGEHLP_MODULEW64
+#else
+ typedef struct _IMAGEHLP_MODULE {
+ DWORD SizeOfStruct;
+ DWORD BaseOfImage;
+ DWORD ImageSize;
+ DWORD TimeDateStamp;
+ DWORD CheckSum;
+ DWORD NumSyms;
+ SYM_TYPE SymType;
+ CHAR ModuleName[32];
+ CHAR ImageName[256];
+ CHAR LoadedImageName[256];
+ } IMAGEHLP_MODULE,*PIMAGEHLP_MODULE;
+
+ typedef struct _IMAGEHLP_MODULEW {
+ DWORD SizeOfStruct;
+ DWORD BaseOfImage;
+ DWORD ImageSize;
+ DWORD TimeDateStamp;
+ DWORD CheckSum;
+ DWORD NumSyms;
+ SYM_TYPE SymType;
+ WCHAR ModuleName[32];
+ WCHAR ImageName[256];
+ WCHAR LoadedImageName[256];
+ } IMAGEHLP_MODULEW,*PIMAGEHLP_MODULEW;
+#endif
+
+ typedef struct _IMAGEHLP_LINE64 {
+ DWORD SizeOfStruct;
+ PVOID Key;
+ DWORD LineNumber;
+ PCHAR FileName;
+ DWORD64 Address;
+ } IMAGEHLP_LINE64,*PIMAGEHLP_LINE64;
+
+#ifdef _IMAGEHLP64
+#define IMAGEHLP_LINE IMAGEHLP_LINE64
+#define PIMAGEHLP_LINE PIMAGEHLP_LINE64
+#else
+ typedef struct _IMAGEHLP_LINE {
+ DWORD SizeOfStruct;
+ PVOID Key;
+ DWORD LineNumber;
+ PCHAR FileName;
+ DWORD Address;
+ } IMAGEHLP_LINE,*PIMAGEHLP_LINE;
+#endif
+
+ typedef struct _SOURCEFILE {
+ DWORD64 ModBase;
+ PCHAR FileName;
+ } SOURCEFILE,*PSOURCEFILE;
+
+#define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001
+#define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002
+#define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003
+#define CBA_SYMBOLS_UNLOADED 0x00000004
+#define CBA_DUPLICATE_SYMBOL 0x00000005
+#define CBA_READ_MEMORY 0x00000006
+#define CBA_DEFERRED_SYMBOL_LOAD_CANCEL 0x00000007
+#define CBA_SET_OPTIONS 0x00000008
+#define CBA_EVENT 0x00000010
+#define CBA_DEFERRED_SYMBOL_LOAD_PARTIAL 0x00000020
+#define CBA_DEBUG_INFO 0x10000000
+
+ typedef struct _IMAGEHLP_CBA_READ_MEMORY {
+ DWORD64 addr;
+ PVOID buf;
+ DWORD bytes;
+ DWORD *bytesread;
+ } IMAGEHLP_CBA_READ_MEMORY,*PIMAGEHLP_CBA_READ_MEMORY;
+
+ enum {
+ sevInfo = 0,sevProblem,sevAttn,sevFatal,sevMax
+ };
+
+ typedef struct _IMAGEHLP_CBA_EVENT {
+ DWORD severity;
+ DWORD code;
+ PCHAR desc;
+ PVOID object;
+ } IMAGEHLP_CBA_EVENT,*PIMAGEHLP_CBA_EVENT;
+
+ typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD64 {
+ DWORD SizeOfStruct;
+ DWORD64 BaseOfImage;
+ DWORD CheckSum;
+ DWORD TimeDateStamp;
+ CHAR FileName[MAX_PATH];
+ BOOLEAN Reparse;
+ HANDLE hFile;
+ DWORD Flags;
+ } IMAGEHLP_DEFERRED_SYMBOL_LOAD64,*PIMAGEHLP_DEFERRED_SYMBOL_LOAD64;
+
+#define DSLFLAG_MISMATCHED_PDB 0x1
+#define DSLFLAG_MISMATCHED_DBG 0x2
+
+#ifdef _IMAGEHLP64
+#define IMAGEHLP_DEFERRED_SYMBOL_LOAD IMAGEHLP_DEFERRED_SYMBOL_LOAD64
+#define PIMAGEHLP_DEFERRED_SYMBOL_LOAD PIMAGEHLP_DEFERRED_SYMBOL_LOAD64
+#else
+ typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD {
+ DWORD SizeOfStruct;
+ DWORD BaseOfImage;
+ DWORD CheckSum;
+ DWORD TimeDateStamp;
+ CHAR FileName[MAX_PATH];
+ BOOLEAN Reparse;
+ HANDLE hFile;
+ } IMAGEHLP_DEFERRED_SYMBOL_LOAD,*PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
+#endif
+
+ typedef struct _IMAGEHLP_DUPLICATE_SYMBOL64 {
+ DWORD SizeOfStruct;
+ DWORD NumberOfDups;
+ PIMAGEHLP_SYMBOL64 Symbol;
+ DWORD SelectedSymbol;
+ } IMAGEHLP_DUPLICATE_SYMBOL64,*PIMAGEHLP_DUPLICATE_SYMBOL64;
+
+#ifdef _IMAGEHLP64
+#define IMAGEHLP_DUPLICATE_SYMBOL IMAGEHLP_DUPLICATE_SYMBOL64
+#define PIMAGEHLP_DUPLICATE_SYMBOL PIMAGEHLP_DUPLICATE_SYMBOL64
+#else
+ typedef struct _IMAGEHLP_DUPLICATE_SYMBOL {
+ DWORD SizeOfStruct;
+ DWORD NumberOfDups;
+ PIMAGEHLP_SYMBOL Symbol;
+ DWORD SelectedSymbol;
+ } IMAGEHLP_DUPLICATE_SYMBOL,*PIMAGEHLP_DUPLICATE_SYMBOL;
+#endif
+
+ BOOL IMAGEAPI SymSetParentWindow(HWND hwnd);
+ PCHAR IMAGEAPI SymSetHomeDirectory(PCSTR dir);
+ PCHAR IMAGEAPI SymGetHomeDirectory(DWORD type,PSTR dir,size_t size);
+
+ enum {
+ hdBase = 0,hdSym,hdSrc,hdMax
+ };
+
+#define SYMOPT_CASE_INSENSITIVE 0x00000001
+#define SYMOPT_UNDNAME 0x00000002
+#define SYMOPT_DEFERRED_LOADS 0x00000004
+#define SYMOPT_NO_CPP 0x00000008
+#define SYMOPT_LOAD_LINES 0x00000010
+#define SYMOPT_OMAP_FIND_NEAREST 0x00000020
+#define SYMOPT_LOAD_ANYTHING 0x00000040
+#define SYMOPT_IGNORE_CVREC 0x00000080
+#define SYMOPT_NO_UNQUALIFIED_LOADS 0x00000100
+#define SYMOPT_FAIL_CRITICAL_ERRORS 0x00000200
+#define SYMOPT_EXACT_SYMBOLS 0x00000400
+#define SYMOPT_ALLOW_ABSOLUTE_SYMBOLS 0x00000800
+#define SYMOPT_IGNORE_NT_SYMPATH 0x00001000
+#define SYMOPT_INCLUDE_32BIT_MODULES 0x00002000
+#define SYMOPT_PUBLICS_ONLY 0x00004000
+#define SYMOPT_NO_PUBLICS 0x00008000
+#define SYMOPT_AUTO_PUBLICS 0x00010000
+#define SYMOPT_NO_IMAGE_SEARCH 0x00020000
+#define SYMOPT_SECURE 0x00040000
+#define SYMOPT_NO_PROMPTS 0x00080000
+
+#define SYMOPT_DEBUG 0x80000000
+
+ DWORD IMAGEAPI SymSetOptions(DWORD SymOptions);
+ DWORD IMAGEAPI SymGetOptions(VOID);
+ BOOL IMAGEAPI SymCleanup(HANDLE hProcess);
+ BOOL IMAGEAPI SymMatchString(LPSTR string,LPSTR expression,BOOL fCase);
+
+ typedef BOOL (CALLBACK *PSYM_ENUMSOURCFILES_CALLBACK)(PSOURCEFILE pSourceFile,PVOID UserContext);
+
+ BOOL IMAGEAPI SymEnumSourceFiles(HANDLE hProcess,ULONG64 ModBase,LPSTR Mask,PSYM_ENUMSOURCFILES_CALLBACK cbSrcFiles,PVOID UserContext);
+ BOOL IMAGEAPI SymEnumerateModules64(HANDLE hProcess,PSYM_ENUMMODULES_CALLBACK64 EnumModulesCallback,PVOID UserContext);
+
+#ifdef _IMAGEHLP64
+#define SymEnumerateModules SymEnumerateModules64
+#else
+ BOOL IMAGEAPI SymEnumerateModules(HANDLE hProcess,PSYM_ENUMMODULES_CALLBACK EnumModulesCallback,PVOID UserContext);
+#endif
+
+ BOOL IMAGEAPI SymEnumerateSymbols64(HANDLE hProcess,DWORD64 BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACK64 EnumSymbolsCallback,PVOID UserContext);
+ BOOL IMAGEAPI SymEnumerateSymbolsW64(HANDLE hProcess,DWORD64 BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACK64W EnumSymbolsCallback,PVOID UserContext);
+
+#ifdef _IMAGEHLP64
+#define SymEnumerateSymbols SymEnumerateSymbols64
+#define SymEnumerateSymbolsW SymEnumerateSymbolsW64
+#else
+ BOOL IMAGEAPI SymEnumerateSymbols(HANDLE hProcess,DWORD BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext);
+ BOOL IMAGEAPI SymEnumerateSymbolsW(HANDLE hProcess,DWORD BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACKW EnumSymbolsCallback,PVOID UserContext);
+#endif
+
+ BOOL IMAGEAPI EnumerateLoadedModules64(HANDLE hProcess,PENUMLOADED_MODULES_CALLBACK64 EnumLoadedModulesCallback,PVOID UserContext);
+#ifdef _IMAGEHLP64
+#define EnumerateLoadedModules EnumerateLoadedModules64
+#else
+ BOOL IMAGEAPI EnumerateLoadedModules(HANDLE hProcess,PENUMLOADED_MODULES_CALLBACK EnumLoadedModulesCallback,PVOID UserContext);
+#endif
+
+ PVOID IMAGEAPI SymFunctionTableAccess64(HANDLE hProcess,DWORD64 AddrBase);
+
+#ifdef _IMAGEHLP64
+#define SymFunctionTableAccess SymFunctionTableAccess64
+#else
+ PVOID IMAGEAPI SymFunctionTableAccess(HANDLE hProcess,DWORD AddrBase);
+#endif
+
+ BOOL IMAGEAPI SymGetModuleInfo64(HANDLE hProcess,DWORD64 qwAddr,PIMAGEHLP_MODULE64 ModuleInfo);
+ BOOL IMAGEAPI SymGetModuleInfoW64(HANDLE hProcess,DWORD64 qwAddr,PIMAGEHLP_MODULEW64 ModuleInfo);
+
+#ifdef _IMAGEHLP64
+#define SymGetModuleInfo SymGetModuleInfo64
+#define SymGetModuleInfoW SymGetModuleInfoW64
+#else
+ BOOL IMAGEAPI SymGetModuleInfo(HANDLE hProcess,DWORD dwAddr,PIMAGEHLP_MODULE ModuleInfo);
+ BOOL IMAGEAPI SymGetModuleInfoW(HANDLE hProcess,DWORD dwAddr,PIMAGEHLP_MODULEW ModuleInfo);
+#endif
+
+ DWORD64 IMAGEAPI SymGetModuleBase64(HANDLE hProcess,DWORD64 qwAddr);
+
+#ifdef _IMAGEHLP64
+#define SymGetModuleBase SymGetModuleBase64
+#else
+ DWORD IMAGEAPI SymGetModuleBase(HANDLE hProcess,DWORD dwAddr);
+#endif
+
+ BOOL IMAGEAPI SymGetSymNext64(HANDLE hProcess,PIMAGEHLP_SYMBOL64 Symbol);
+
+#ifdef _IMAGEHLP64
+#define SymGetSymNext SymGetSymNext64
+#else
+ BOOL IMAGEAPI SymGetSymNext(HANDLE hProcess,PIMAGEHLP_SYMBOL Symbol);
+#endif
+
+ BOOL IMAGEAPI SymGetSymPrev64(HANDLE hProcess,PIMAGEHLP_SYMBOL64 Symbol);
+
+#ifdef _IMAGEHLP64
+#define SymGetSymPrev SymGetSymPrev64
+#else
+ BOOL IMAGEAPI SymGetSymPrev(HANDLE hProcess,PIMAGEHLP_SYMBOL Symbol);
+#endif
+
+ typedef struct _SRCCODEINFO {
+ DWORD SizeOfStruct;
+ PVOID Key;
+ DWORD64 ModBase;
+ CHAR Obj[MAX_PATH + 1];
+ CHAR FileName[MAX_PATH + 1];
+ DWORD LineNumber;
+ DWORD64 Address;
+ } SRCCODEINFO,*PSRCCODEINFO;
+
+ typedef BOOL (CALLBACK *PSYM_ENUMLINES_CALLBACK)(PSRCCODEINFO LineInfo,PVOID UserContext);
+
+ BOOL IMAGEAPI SymEnumLines(HANDLE hProcess,ULONG64 Base,PCSTR Obj,PCSTR File,PSYM_ENUMLINES_CALLBACK EnumLinesCallback,PVOID UserContext);
+ BOOL IMAGEAPI SymGetLineFromAddr64(HANDLE hProcess,DWORD64 qwAddr,PDWORD pdwDisplacement,PIMAGEHLP_LINE64 Line64);
+
+#ifdef _IMAGEHLP64
+#define SymGetLineFromAddr SymGetLineFromAddr64
+#else
+ BOOL IMAGEAPI SymGetLineFromAddr(HANDLE hProcess,DWORD dwAddr,PDWORD pdwDisplacement,PIMAGEHLP_LINE Line);
+#endif
+
+ BOOL IMAGEAPI SymGetLineFromName64(HANDLE hProcess,PSTR ModuleName,PSTR FileName,DWORD dwLineNumber,PLONG plDisplacement,PIMAGEHLP_LINE64 Line);
+
+#ifdef _IMAGEHLP64
+#define SymGetLineFromName SymGetLineFromName64
+#else
+ BOOL IMAGEAPI SymGetLineFromName(HANDLE hProcess,PSTR ModuleName,PSTR FileName,DWORD dwLineNumber,PLONG plDisplacement,PIMAGEHLP_LINE Line);
+#endif
+
+ BOOL IMAGEAPI SymGetLineNext64(HANDLE hProcess,PIMAGEHLP_LINE64 Line);
+
+#ifdef _IMAGEHLP64
+#define SymGetLineNext SymGetLineNext64
+#else
+ BOOL IMAGEAPI SymGetLineNext(HANDLE hProcess,PIMAGEHLP_LINE Line);
+#endif
+
+ BOOL IMAGEAPI SymGetLinePrev64(HANDLE hProcess,PIMAGEHLP_LINE64 Line);
+
+#ifdef _IMAGEHLP64
+#define SymGetLinePrev SymGetLinePrev64
+#else
+ BOOL IMAGEAPI SymGetLinePrev(HANDLE hProcess,PIMAGEHLP_LINE Line);
+#endif
+
+ BOOL IMAGEAPI SymMatchFileName(PSTR FileName,PSTR Match,PSTR *FileNameStop,PSTR *MatchStop);
+ BOOL IMAGEAPI SymInitialize(HANDLE hProcess,PSTR UserSearchPath,BOOL fInvadeProcess);
+ BOOL IMAGEAPI SymGetSearchPath(HANDLE hProcess,PSTR SearchPath,DWORD SearchPathLength);
+ BOOL IMAGEAPI SymSetSearchPath(HANDLE hProcess,PSTR SearchPath);
+ DWORD64 IMAGEAPI SymLoadModule64(HANDLE hProcess,HANDLE hFile,PSTR ImageName,PSTR ModuleName,DWORD64 BaseOfDll,DWORD SizeOfDll);
+
+#define SLMFLAG_VIRTUAL 0x1
+
+ DWORD64 IMAGEAPI SymLoadModuleEx(HANDLE hProcess,HANDLE hFile,PSTR ImageName,PSTR ModuleName,DWORD64 BaseOfDll,DWORD DllSize,PMODLOAD_DATA Data,DWORD Flags);
+
+#ifdef _IMAGEHLP64
+#define SymLoadModule SymLoadModule64
+#else
+ DWORD IMAGEAPI SymLoadModule(HANDLE hProcess,HANDLE hFile,PSTR ImageName,PSTR ModuleName,DWORD BaseOfDll,DWORD SizeOfDll);
+#endif
+
+ BOOL IMAGEAPI SymUnloadModule64(HANDLE hProcess,DWORD64 BaseOfDll);
+
+#ifdef _IMAGEHLP64
+#define SymUnloadModule SymUnloadModule64
+#else
+ BOOL IMAGEAPI SymUnloadModule(HANDLE hProcess,DWORD BaseOfDll);
+#endif
+
+ BOOL IMAGEAPI SymUnDName64(PIMAGEHLP_SYMBOL64 sym,PSTR UnDecName,DWORD UnDecNameLength);
+
+#ifdef _IMAGEHLP64
+#define SymUnDName SymUnDName64
+#else
+ BOOL IMAGEAPI SymUnDName(PIMAGEHLP_SYMBOL sym,PSTR UnDecName,DWORD UnDecNameLength);
+#endif
+
+ BOOL IMAGEAPI SymRegisterCallback64(HANDLE hProcess,PSYMBOL_REGISTERED_CALLBACK64 CallbackFunction,ULONG64 UserContext);
+
+ BOOL IMAGEAPI SymRegisterFunctionEntryCallback64(HANDLE hProcess,PSYMBOL_FUNCENTRY_CALLBACK64 CallbackFunction,ULONG64 UserContext);
+
+#ifdef _IMAGEHLP64
+#define SymRegisterCallback SymRegisterCallback64
+#define SymRegisterFunctionEntryCallback SymRegisterFunctionEntryCallback64
+#else
+ BOOL IMAGEAPI SymRegisterCallback(HANDLE hProcess,PSYMBOL_REGISTERED_CALLBACK CallbackFunction,PVOID UserContext);
+ BOOL IMAGEAPI SymRegisterFunctionEntryCallback(HANDLE hProcess,PSYMBOL_FUNCENTRY_CALLBACK CallbackFunction,PVOID UserContext);
+#endif
+
+ typedef struct _IMAGEHLP_SYMBOL_SRC {
+ DWORD sizeofstruct;
+ DWORD type;
+ char file[MAX_PATH];
+ } IMAGEHLP_SYMBOL_SRC,*PIMAGEHLP_SYMBOL_SRC;
+
+ typedef struct _MODULE_TYPE_INFO {
+ USHORT dataLength;
+ USHORT leaf;
+ BYTE data[1];
+ } MODULE_TYPE_INFO,*PMODULE_TYPE_INFO;
+
+ typedef struct _SYMBOL_INFO {
+ ULONG SizeOfStruct;
+ ULONG TypeIndex;
+ ULONG64 Reserved[2];
+ ULONG info;
+ ULONG Size;
+ ULONG64 ModBase;
+ ULONG Flags;
+ ULONG64 Value;
+ ULONG64 Address;
+ ULONG Register;
+ ULONG Scope;
+ ULONG Tag;
+ ULONG NameLen;
+ ULONG MaxNameLen;
+ CHAR Name[1];
+ } SYMBOL_INFO,*PSYMBOL_INFO;
+
+ typedef struct _SYMBOL_INFO_PACKAGE {
+ SYMBOL_INFO si;
+ CHAR name[MAX_SYM_NAME + 1];
+ } SYMBOL_INFO_PACKAGE,*PSYMBOL_INFO_PACKAGE;
+
+ typedef struct _IMAGEHLP_STACK_FRAME
+ {
+ ULONG64 InstructionOffset;
+ ULONG64 ReturnOffset;
+ ULONG64 FrameOffset;
+ ULONG64 StackOffset;
+ ULONG64 BackingStoreOffset;
+ ULONG64 FuncTableEntry;
+ ULONG64 Params[4];
+ ULONG64 Reserved[5];
+ BOOL Virtual;
+ ULONG Reserved2;
+ } IMAGEHLP_STACK_FRAME,*PIMAGEHLP_STACK_FRAME;
+
+ typedef VOID IMAGEHLP_CONTEXT,*PIMAGEHLP_CONTEXT;
+
+ BOOL IMAGEAPI SymSetContext(HANDLE hProcess,PIMAGEHLP_STACK_FRAME StackFrame,PIMAGEHLP_CONTEXT Context);
+ BOOL IMAGEAPI SymFromAddr(HANDLE hProcess,DWORD64 Address,PDWORD64 Displacement,PSYMBOL_INFO Symbol);
+ BOOL IMAGEAPI SymFromToken(HANDLE hProcess,DWORD64 Base,DWORD Token,PSYMBOL_INFO Symbol);
+ BOOL IMAGEAPI SymFromName(HANDLE hProcess,LPSTR Name,PSYMBOL_INFO Symbol);
+
+ typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(PSYMBOL_INFO pSymInfo,ULONG SymbolSize,PVOID UserContext);
+
+ BOOL IMAGEAPI SymEnumSymbols(HANDLE hProcess,ULONG64 BaseOfDll,PCSTR Mask,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext);
+ BOOL IMAGEAPI SymEnumSymbolsForAddr(HANDLE hProcess,DWORD64 Address,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext);
+
+#define SYMENUMFLAG_FULLSRCH 1
+#define SYMENUMFLAG_SPEEDSRCH 2
+
+ typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO {
+ TI_GET_SYMTAG,TI_GET_SYMNAME,TI_GET_LENGTH,TI_GET_TYPE,TI_GET_TYPEID,TI_GET_BASETYPE,TI_GET_ARRAYINDEXTYPEID,TI_FINDCHILDREN,
+ TI_GET_DATAKIND,TI_GET_ADDRESSOFFSET,TI_GET_OFFSET,TI_GET_VALUE,TI_GET_COUNT,TI_GET_CHILDRENCOUNT,TI_GET_BITPOSITION,TI_GET_VIRTUALBASECLASS,
+ TI_GET_VIRTUALTABLESHAPEID,TI_GET_VIRTUALBASEPOINTEROFFSET,TI_GET_CLASSPARENTID,TI_GET_NESTED,TI_GET_SYMINDEX,TI_GET_LEXICALPARENT,
+ TI_GET_ADDRESS,TI_GET_THISADJUST,TI_GET_UDTKIND,TI_IS_EQUIV_TO,TI_GET_CALLING_CONVENTION
+ } IMAGEHLP_SYMBOL_TYPE_INFO;
+
+ typedef struct _TI_FINDCHILDREN_PARAMS {
+ ULONG Count;
+ ULONG Start;
+ ULONG ChildId[1];
+ } TI_FINDCHILDREN_PARAMS;
+
+ BOOL IMAGEAPI SymGetTypeInfo(HANDLE hProcess,DWORD64 ModBase,ULONG TypeId,IMAGEHLP_SYMBOL_TYPE_INFO GetType,PVOID pInfo);
+ BOOL IMAGEAPI SymEnumTypes(HANDLE hProcess,ULONG64 BaseOfDll,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext);
+ BOOL IMAGEAPI SymGetTypeFromName(HANDLE hProcess,ULONG64 BaseOfDll,LPSTR Name,PSYMBOL_INFO Symbol);
+ BOOL IMAGEAPI SymAddSymbol(HANDLE hProcess,ULONG64 BaseOfDll,PCSTR Name,DWORD64 Address,DWORD Size,DWORD Flags);
+ BOOL IMAGEAPI SymDeleteSymbol(HANDLE hProcess,ULONG64 BaseOfDll,PCSTR Name,DWORD64 Address,DWORD Flags);
+
+ typedef BOOL (WINAPI *PDBGHELP_CREATE_USER_DUMP_CALLBACK)(DWORD DataType,PVOID *Data,LPDWORD DataLength,PVOID UserData);
+
+ BOOL WINAPI DbgHelpCreateUserDump(LPSTR FileName,PDBGHELP_CREATE_USER_DUMP_CALLBACK Callback,PVOID UserData);
+ BOOL WINAPI DbgHelpCreateUserDumpW(LPWSTR FileName,PDBGHELP_CREATE_USER_DUMP_CALLBACK Callback,PVOID UserData);
+ BOOL IMAGEAPI SymGetSymFromAddr64(HANDLE hProcess,DWORD64 qwAddr,PDWORD64 pdwDisplacement,PIMAGEHLP_SYMBOL64 Symbol);
+
+#ifdef _IMAGEHLP64
+#define SymGetSymFromAddr SymGetSymFromAddr64
+#else
+ BOOL IMAGEAPI SymGetSymFromAddr(HANDLE hProcess,DWORD dwAddr,PDWORD pdwDisplacement,PIMAGEHLP_SYMBOL Symbol);
+#endif
+
+ BOOL IMAGEAPI SymGetSymFromName64(HANDLE hProcess,PSTR Name,PIMAGEHLP_SYMBOL64 Symbol);
+
+#ifdef _IMAGEHLP64
+#define SymGetSymFromName SymGetSymFromName64
+#else
+ BOOL IMAGEAPI SymGetSymFromName(HANDLE hProcess,PSTR Name,PIMAGEHLP_SYMBOL Symbol);
+#endif
+
+ DBHLP_DEPRECIATED BOOL IMAGEAPI FindFileInPath(HANDLE hprocess,LPSTR SearchPath,LPSTR FileName,PVOID id,DWORD two,DWORD three,DWORD flags,LPSTR FilePath);
+ DBHLP_DEPRECIATED BOOL IMAGEAPI FindFileInSearchPath(HANDLE hprocess,LPSTR SearchPath,LPSTR FileName,DWORD one,DWORD two,DWORD three,LPSTR FilePath);
+ DBHLP_DEPRECIATED BOOL IMAGEAPI SymEnumSym(HANDLE hProcess,ULONG64 BaseOfDll,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext);
+
+#define SYMF_OMAP_GENERATED 0x00000001
+#define SYMF_OMAP_MODIFIED 0x00000002
+#define SYMF_REGISTER 0x00000008
+#define SYMF_REGREL 0x00000010
+#define SYMF_FRAMEREL 0x00000020
+#define SYMF_PARAMETER 0x00000040
+#define SYMF_LOCAL 0x00000080
+#define SYMF_CONSTANT 0x00000100
+#define SYMF_EXPORT 0x00000200
+#define SYMF_FORWARDER 0x00000400
+#define SYMF_FUNCTION 0x00000800
+#define SYMF_VIRTUAL 0x00001000
+#define SYMF_THUNK 0x00002000
+#define SYMF_TLSREL 0x00004000
+
+#define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
+#define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER
+#define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL
+#define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL
+#define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER
+#define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL
+#define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT
+#define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION
+#define IMAGEHLP_SYMBOL_VIRTUAL SYMF_VIRTUAL
+#define IMAGEHLP_SYMBOL_THUNK SYMF_THUNK
+#define IMAGEHLP_SYMBOL_INFO_TLSRELATIVE SYMF_TLSREL
+
+#include <pshpack4.h>
+
+#define MINIDUMP_SIGNATURE ('PMDM')
+#define MINIDUMP_VERSION (42899)
+ typedef DWORD RVA;
+ typedef ULONG64 RVA64;
+
+ typedef struct _MINIDUMP_LOCATION_DESCRIPTOR {
+ ULONG32 DataSize;
+ RVA Rva;
+ } MINIDUMP_LOCATION_DESCRIPTOR;
+
+ typedef struct _MINIDUMP_LOCATION_DESCRIPTOR64 {
+ ULONG64 DataSize;
+ RVA64 Rva;
+ } MINIDUMP_LOCATION_DESCRIPTOR64;
+
+ typedef struct _MINIDUMP_MEMORY_DESCRIPTOR {
+ ULONG64 StartOfMemoryRange;
+ MINIDUMP_LOCATION_DESCRIPTOR Memory;
+ } MINIDUMP_MEMORY_DESCRIPTOR,*PMINIDUMP_MEMORY_DESCRIPTOR;
+
+ typedef struct _MINIDUMP_MEMORY_DESCRIPTOR64 {
+ ULONG64 StartOfMemoryRange;
+ ULONG64 DataSize;
+ } MINIDUMP_MEMORY_DESCRIPTOR64,*PMINIDUMP_MEMORY_DESCRIPTOR64;
+
+ typedef struct _MINIDUMP_HEADER {
+ ULONG32 Signature;
+ ULONG32 Version;
+ ULONG32 NumberOfStreams;
+ RVA StreamDirectoryRva;
+ ULONG32 CheckSum;
+ union {
+ ULONG32 Reserved;
+ ULONG32 TimeDateStamp;
+ } DUMMYUNIONNAME;
+ ULONG64 Flags;
+ } MINIDUMP_HEADER,*PMINIDUMP_HEADER;
+
+ typedef struct _MINIDUMP_DIRECTORY {
+ ULONG32 StreamType;
+ MINIDUMP_LOCATION_DESCRIPTOR Location;
+ } MINIDUMP_DIRECTORY,*PMINIDUMP_DIRECTORY;
+
+ typedef struct _MINIDUMP_STRING {
+ ULONG32 Length;
+ WCHAR Buffer [0];
+ } MINIDUMP_STRING,*PMINIDUMP_STRING;
+
+ typedef enum _MINIDUMP_STREAM_TYPE {
+ UnusedStream = 0,ReservedStream0 = 1,ReservedStream1 = 2,ThreadListStream = 3,ModuleListStream = 4,MemoryListStream = 5,
+ ExceptionStream = 6,SystemInfoStream = 7,ThreadExListStream = 8,Memory64ListStream = 9,CommentStreamA = 10,CommentStreamW = 11,
+ HandleDataStream = 12,FunctionTableStream = 13,UnloadedModuleListStream = 14,MiscInfoStream = 15,LastReservedStream = 0xffff
+ } MINIDUMP_STREAM_TYPE;
+
+ typedef union _CPU_INFORMATION {
+ struct {
+ ULONG32 VendorId [3 ];
+ ULONG32 VersionInformation;
+ ULONG32 FeatureInformation;
+ ULONG32 AMDExtendedCpuFeatures;
+ } X86CpuInfo;
+ struct {
+ ULONG64 ProcessorFeatures [2 ];
+ } OtherCpuInfo;
+ } CPU_INFORMATION,*PCPU_INFORMATION;
+
+ typedef struct _MINIDUMP_SYSTEM_INFO {
+ USHORT ProcessorArchitecture;
+ USHORT ProcessorLevel;
+ USHORT ProcessorRevision;
+ union {
+ USHORT Reserved0;
+ struct {
+ UCHAR NumberOfProcessors;
+ UCHAR ProductType;
+ } DUMMYSTRUCTNAME;
+ } DUMMYUNIONNAME;
+ ULONG32 MajorVersion;
+ ULONG32 MinorVersion;
+ ULONG32 BuildNumber;
+ ULONG32 PlatformId;
+ RVA CSDVersionRva;
+ union {
+ ULONG32 Reserved1;
+ struct {
+ USHORT SuiteMask;
+ USHORT Reserved2;
+ } DUMMYSTRUCTNAME;
+ } DUMMYUNIONNAME1;
+ CPU_INFORMATION Cpu;
+ } MINIDUMP_SYSTEM_INFO,*PMINIDUMP_SYSTEM_INFO;
+
+ C_ASSERT (sizeof (((PPROCESS_INFORMATION)0)->dwThreadId)==4);
+
+ typedef struct _MINIDUMP_THREAD {
+ ULONG32 ThreadId;
+ ULONG32 SuspendCount;
+ ULONG32 PriorityClass;
+ ULONG32 Priority;
+ ULONG64 Teb;
+ MINIDUMP_MEMORY_DESCRIPTOR Stack;
+ MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
+ } MINIDUMP_THREAD,*PMINIDUMP_THREAD;
+
+ typedef struct _MINIDUMP_THREAD_LIST {
+ ULONG32 NumberOfThreads;
+ MINIDUMP_THREAD Threads [0];
+ } MINIDUMP_THREAD_LIST,*PMINIDUMP_THREAD_LIST;
+
+ typedef struct _MINIDUMP_THREAD_EX {
+ ULONG32 ThreadId;
+ ULONG32 SuspendCount;
+ ULONG32 PriorityClass;
+ ULONG32 Priority;
+ ULONG64 Teb;
+ MINIDUMP_MEMORY_DESCRIPTOR Stack;
+ MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
+ MINIDUMP_MEMORY_DESCRIPTOR BackingStore;
+ } MINIDUMP_THREAD_EX,*PMINIDUMP_THREAD_EX;
+
+ typedef struct _MINIDUMP_THREAD_EX_LIST {
+ ULONG32 NumberOfThreads;
+ MINIDUMP_THREAD_EX Threads [0];
+ } MINIDUMP_THREAD_EX_LIST,*PMINIDUMP_THREAD_EX_LIST;
+
+ typedef struct _MINIDUMP_EXCEPTION {
+ ULONG32 ExceptionCode;
+ ULONG32 ExceptionFlags;
+ ULONG64 ExceptionRecord;
+ ULONG64 ExceptionAddress;
+ ULONG32 NumberParameters;
+ ULONG32 __unusedAlignment;
+ ULONG64 ExceptionInformation [EXCEPTION_MAXIMUM_PARAMETERS ];
+ } MINIDUMP_EXCEPTION,*PMINIDUMP_EXCEPTION;
+
+ typedef struct MINIDUMP_EXCEPTION_STREAM {
+ ULONG32 ThreadId;
+ ULONG32 __alignment;
+ MINIDUMP_EXCEPTION ExceptionRecord;
+ MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
+ } MINIDUMP_EXCEPTION_STREAM,*PMINIDUMP_EXCEPTION_STREAM;
+
+ typedef struct _MINIDUMP_MODULE {
+ ULONG64 BaseOfImage;
+ ULONG32 SizeOfImage;
+ ULONG32 CheckSum;
+ ULONG32 TimeDateStamp;
+ RVA ModuleNameRva;
+ VS_FIXEDFILEINFO VersionInfo;
+ MINIDUMP_LOCATION_DESCRIPTOR CvRecord;
+ MINIDUMP_LOCATION_DESCRIPTOR MiscRecord;
+ ULONG64 Reserved0;
+ ULONG64 Reserved1;
+ } MINIDUMP_MODULE,*PMINIDUMP_MODULE;
+
+ typedef struct _MINIDUMP_MODULE_LIST {
+ ULONG32 NumberOfModules;
+ MINIDUMP_MODULE Modules [0 ];
+ } MINIDUMP_MODULE_LIST,*PMINIDUMP_MODULE_LIST;
+
+ typedef struct _MINIDUMP_MEMORY_LIST {
+ ULONG32 NumberOfMemoryRanges;
+ MINIDUMP_MEMORY_DESCRIPTOR MemoryRanges [0];
+ } MINIDUMP_MEMORY_LIST,*PMINIDUMP_MEMORY_LIST;
+
+ typedef struct _MINIDUMP_MEMORY64_LIST {
+ ULONG64 NumberOfMemoryRanges;
+ RVA64 BaseRva;
+ MINIDUMP_MEMORY_DESCRIPTOR64 MemoryRanges [0];
+ } MINIDUMP_MEMORY64_LIST,*PMINIDUMP_MEMORY64_LIST;
+
+ typedef struct _MINIDUMP_EXCEPTION_INFORMATION {
+ DWORD ThreadId;
+ PEXCEPTION_POINTERS ExceptionPointers;
+ BOOL ClientPointers;
+ } MINIDUMP_EXCEPTION_INFORMATION,*PMINIDUMP_EXCEPTION_INFORMATION;
+
+ typedef struct _MINIDUMP_EXCEPTION_INFORMATION64 {
+ DWORD ThreadId;
+ ULONG64 ExceptionRecord;
+ ULONG64 ContextRecord;
+ BOOL ClientPointers;
+ } MINIDUMP_EXCEPTION_INFORMATION64,*PMINIDUMP_EXCEPTION_INFORMATION64;
+
+ typedef struct _MINIDUMP_HANDLE_DESCRIPTOR {
+ ULONG64 Handle;
+ RVA TypeNameRva;
+ RVA ObjectNameRva;
+ ULONG32 Attributes;
+ ULONG32 GrantedAccess;
+ ULONG32 HandleCount;
+ ULONG32 PointerCount;
+ } MINIDUMP_HANDLE_DESCRIPTOR,*PMINIDUMP_HANDLE_DESCRIPTOR;
+
+ typedef struct _MINIDUMP_HANDLE_DATA_STREAM {
+ ULONG32 SizeOfHeader;
+ ULONG32 SizeOfDescriptor;
+ ULONG32 NumberOfDescriptors;
+ ULONG32 Reserved;
+ } MINIDUMP_HANDLE_DATA_STREAM,*PMINIDUMP_HANDLE_DATA_STREAM;
+
+ typedef struct _MINIDUMP_FUNCTION_TABLE_DESCRIPTOR {
+ ULONG64 MinimumAddress;
+ ULONG64 MaximumAddress;
+ ULONG64 BaseAddress;
+ ULONG32 EntryCount;
+ ULONG32 SizeOfAlignPad;
+ } MINIDUMP_FUNCTION_TABLE_DESCRIPTOR,*PMINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
+
+ typedef struct _MINIDUMP_FUNCTION_TABLE_STREAM {
+ ULONG32 SizeOfHeader;
+ ULONG32 SizeOfDescriptor;
+ ULONG32 SizeOfNativeDescriptor;
+ ULONG32 SizeOfFunctionEntry;
+ ULONG32 NumberOfDescriptors;
+ ULONG32 SizeOfAlignPad;
+ } MINIDUMP_FUNCTION_TABLE_STREAM,*PMINIDUMP_FUNCTION_TABLE_STREAM;
+
+ typedef struct _MINIDUMP_UNLOADED_MODULE {
+ ULONG64 BaseOfImage;
+ ULONG32 SizeOfImage;
+ ULONG32 CheckSum;
+ ULONG32 TimeDateStamp;
+ RVA ModuleNameRva;
+ } MINIDUMP_UNLOADED_MODULE,*PMINIDUMP_UNLOADED_MODULE;
+
+ typedef struct _MINIDUMP_UNLOADED_MODULE_LIST {
+ ULONG32 SizeOfHeader;
+ ULONG32 SizeOfEntry;
+ ULONG32 NumberOfEntries;
+ } MINIDUMP_UNLOADED_MODULE_LIST,*PMINIDUMP_UNLOADED_MODULE_LIST;
+
+#define MINIDUMP_MISC1_PROCESS_ID 0x00000001
+#define MINIDUMP_MISC1_PROCESS_TIMES 0x00000002
+
+ typedef struct _MINIDUMP_MISC_INFO {
+ ULONG32 SizeOfInfo;
+ ULONG32 Flags1;
+ ULONG32 ProcessId;
+ ULONG32 ProcessCreateTime;
+ ULONG32 ProcessUserTime;
+ ULONG32 ProcessKernelTime;
+ } MINIDUMP_MISC_INFO,*PMINIDUMP_MISC_INFO;
+
+ typedef struct _MINIDUMP_USER_RECORD {
+ ULONG32 Type;
+ MINIDUMP_LOCATION_DESCRIPTOR Memory;
+ } MINIDUMP_USER_RECORD,*PMINIDUMP_USER_RECORD;
+
+ typedef struct _MINIDUMP_USER_STREAM {
+ ULONG32 Type;
+ ULONG BufferSize;
+ PVOID Buffer;
+ } MINIDUMP_USER_STREAM,*PMINIDUMP_USER_STREAM;
+
+ typedef struct _MINIDUMP_USER_STREAM_INFORMATION {
+ ULONG UserStreamCount;
+ PMINIDUMP_USER_STREAM UserStreamArray;
+ } MINIDUMP_USER_STREAM_INFORMATION,*PMINIDUMP_USER_STREAM_INFORMATION;
+
+ typedef enum _MINIDUMP_CALLBACK_TYPE {
+ ModuleCallback,ThreadCallback,ThreadExCallback,IncludeThreadCallback,IncludeModuleCallback,MemoryCallback
+ } MINIDUMP_CALLBACK_TYPE;
+
+ typedef struct _MINIDUMP_THREAD_CALLBACK {
+ ULONG ThreadId;
+ HANDLE ThreadHandle;
+ CONTEXT Context;
+ ULONG SizeOfContext;
+ ULONG64 StackBase;
+ ULONG64 StackEnd;
+ } MINIDUMP_THREAD_CALLBACK,*PMINIDUMP_THREAD_CALLBACK;
+
+ typedef struct _MINIDUMP_THREAD_EX_CALLBACK {
+ ULONG ThreadId;
+ HANDLE ThreadHandle;
+ CONTEXT Context;
+ ULONG SizeOfContext;
+ ULONG64 StackBase;
+ ULONG64 StackEnd;
+ ULONG64 BackingStoreBase;
+ ULONG64 BackingStoreEnd;
+ } MINIDUMP_THREAD_EX_CALLBACK,*PMINIDUMP_THREAD_EX_CALLBACK;
+
+ typedef struct _MINIDUMP_INCLUDE_THREAD_CALLBACK {
+ ULONG ThreadId;
+ } MINIDUMP_INCLUDE_THREAD_CALLBACK,*PMINIDUMP_INCLUDE_THREAD_CALLBACK;
+
+ typedef enum _THREAD_WRITE_FLAGS {
+ ThreadWriteThread = 0x0001,ThreadWriteStack = 0x0002,ThreadWriteContext = 0x0004,ThreadWriteBackingStore = 0x0008,
+ ThreadWriteInstructionWindow = 0x0010,ThreadWriteThreadData = 0x0020
+ } THREAD_WRITE_FLAGS;
+
+ typedef struct _MINIDUMP_MODULE_CALLBACK {
+ PWCHAR FullPath;
+ ULONG64 BaseOfImage;
+ ULONG SizeOfImage;
+ ULONG CheckSum;
+ ULONG TimeDateStamp;
+ VS_FIXEDFILEINFO VersionInfo;
+ PVOID CvRecord;
+ ULONG SizeOfCvRecord;
+ PVOID MiscRecord;
+ ULONG SizeOfMiscRecord;
+ } MINIDUMP_MODULE_CALLBACK,*PMINIDUMP_MODULE_CALLBACK;
+
+ typedef struct _MINIDUMP_INCLUDE_MODULE_CALLBACK {
+ ULONG64 BaseOfImage;
+ } MINIDUMP_INCLUDE_MODULE_CALLBACK,*PMINIDUMP_INCLUDE_MODULE_CALLBACK;
+
+ typedef enum _MODULE_WRITE_FLAGS {
+ ModuleWriteModule = 0x0001,ModuleWriteDataSeg = 0x0002,ModuleWriteMiscRecord = 0x0004,ModuleWriteCvRecord = 0x0008,
+ ModuleReferencedByMemory = 0x0010
+ } MODULE_WRITE_FLAGS;
+
+ typedef struct _MINIDUMP_CALLBACK_INPUT {
+ ULONG ProcessId;
+ HANDLE ProcessHandle;
+ ULONG CallbackType;
+ union {
+ MINIDUMP_THREAD_CALLBACK Thread;
+ MINIDUMP_THREAD_EX_CALLBACK ThreadEx;
+ MINIDUMP_MODULE_CALLBACK Module;
+ MINIDUMP_INCLUDE_THREAD_CALLBACK IncludeThread;
+ MINIDUMP_INCLUDE_MODULE_CALLBACK IncludeModule;
+ } DUMMYUNIONNAME;
+ } MINIDUMP_CALLBACK_INPUT,*PMINIDUMP_CALLBACK_INPUT;
+
+ typedef struct _MINIDUMP_CALLBACK_OUTPUT {
+ union {
+ ULONG ModuleWriteFlags;
+ ULONG ThreadWriteFlags;
+ struct {
+ ULONG64 MemoryBase;
+ ULONG MemorySize;
+ } DUMMYSTRUCTNAME;
+ } DUMMYUNIONNAME;
+ } MINIDUMP_CALLBACK_OUTPUT,*PMINIDUMP_CALLBACK_OUTPUT;
+
+ typedef enum _MINIDUMP_TYPE {
+ MiniDumpNormal = 0x0000,MiniDumpWithDataSegs = 0x0001,MiniDumpWithFullMemory = 0x0002,MiniDumpWithHandleData = 0x0004,
+ MiniDumpFilterMemory = 0x0008,MiniDumpScanMemory = 0x0010,MiniDumpWithUnloadedModules = 0x0020,MiniDumpWithIndirectlyReferencedMemory = 0x0040,
+ MiniDumpFilterModulePaths = 0x0080,MiniDumpWithProcessThreadData = 0x0100,MiniDumpWithPrivateReadWriteMemory = 0x0200,
+ MiniDumpWithoutOptionalData = 0x0400
+ } MINIDUMP_TYPE;
+
+ typedef BOOL (WINAPI *MINIDUMP_CALLBACK_ROUTINE)(PVOID CallbackParam,CONST PMINIDUMP_CALLBACK_INPUT CallbackInput,PMINIDUMP_CALLBACK_OUTPUT CallbackOutput);
+
+ typedef struct _MINIDUMP_CALLBACK_INFORMATION {
+ MINIDUMP_CALLBACK_ROUTINE CallbackRoutine;
+ PVOID CallbackParam;
+ } MINIDUMP_CALLBACK_INFORMATION,*PMINIDUMP_CALLBACK_INFORMATION;
+
+#define RVA_TO_ADDR(Mapping,Rva) ((PVOID)(((ULONG_PTR) (Mapping)) + (Rva)))
+
+ BOOL WINAPI MiniDumpWriteDump(HANDLE hProcess,DWORD ProcessId,HANDLE hFile,MINIDUMP_TYPE DumpType,CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam);
+ BOOL WINAPI MiniDumpReadDumpStream(PVOID BaseOfDump,ULONG StreamNumber,PMINIDUMP_DIRECTORY *Dir,PVOID *StreamPointer,ULONG *StreamSize);
+
+#include <poppack.h>
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/minigallium/auxiliary/util/texcompress_etc_tmp.h b/src/minigallium/auxiliary/util/texcompress_etc_tmp.h
new file mode 100644
index 0000000..5497566
--- /dev/null
+++ b/src/minigallium/auxiliary/util/texcompress_etc_tmp.h
@@ -0,0 +1,170 @@
+/*
+ * Copyright (C) 2011 LunarG, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Included by texcompress_etc1 and gallium to define ETC1 decoding routines.
+ */
+
+struct TAG(etc1_block) {
+ uint32_t pixel_indices;
+ int flipped;
+ const int *modifier_tables[2];
+ UINT8_TYPE base_colors[2][3];
+};
+
+static UINT8_TYPE
+TAG(etc1_base_color_diff_hi)(UINT8_TYPE in)
+{
+ return (in & 0xf8) | (in >> 5);
+}
+
+static UINT8_TYPE
+TAG(etc1_base_color_diff_lo)(UINT8_TYPE in)
+{
+ static const int lookup[8] = { 0, 1, 2, 3, -4, -3, -2, -1 };
+
+ in = (in >> 3) + lookup[in & 0x7];
+
+ return (in << 3) | (in >> 2);
+}
+
+static UINT8_TYPE
+TAG(etc1_base_color_ind_hi)(UINT8_TYPE in)
+{
+ return (in & 0xf0) | ((in & 0xf0) >> 4);
+}
+
+static UINT8_TYPE
+TAG(etc1_base_color_ind_lo)(UINT8_TYPE in)
+{
+ return ((in & 0xf) << 4) | (in & 0xf);
+}
+
+static UINT8_TYPE
+TAG(etc1_clamp)(UINT8_TYPE base, int modifier)
+{
+ int tmp = (int) base + modifier;
+
+ /* CLAMP(tmp, 0, 255) */
+ return (UINT8_TYPE) ((tmp < 0) ? 0 : ((tmp > 255) ? 255 : tmp));
+}
+
+static const int TAG(etc1_modifier_tables)[8][4] = {
+ { 2, 8, -2, -8},
+ { 5, 17, -5, -17},
+ { 9, 29, -9, -29},
+ { 13, 42, -13, -42},
+ { 18, 60, -18, -60},
+ { 24, 80, -24, -80},
+ { 33, 106, -33, -106},
+ { 47, 183, -47, -183}
+};
+
+static void
+TAG(etc1_parse_block)(struct TAG(etc1_block) *block, const UINT8_TYPE *src)
+{
+ if (src[3] & 0x2) {
+ /* differential mode */
+ block->base_colors[0][0] = (int) TAG(etc1_base_color_diff_hi)(src[0]);
+ block->base_colors[1][0] = (int) TAG(etc1_base_color_diff_lo)(src[0]);
+ block->base_colors[0][1] = (int) TAG(etc1_base_color_diff_hi)(src[1]);
+ block->base_colors[1][1] = (int) TAG(etc1_base_color_diff_lo)(src[1]);
+ block->base_colors[0][2] = (int) TAG(etc1_base_color_diff_hi)(src[2]);
+ block->base_colors[1][2] = (int) TAG(etc1_base_color_diff_lo)(src[2]);
+ }
+ else {
+ /* individual mode */
+ block->base_colors[0][0] = (int) TAG(etc1_base_color_ind_hi)(src[0]);
+ block->base_colors[1][0] = (int) TAG(etc1_base_color_ind_lo)(src[0]);
+ block->base_colors[0][1] = (int) TAG(etc1_base_color_ind_hi)(src[1]);
+ block->base_colors[1][1] = (int) TAG(etc1_base_color_ind_lo)(src[1]);
+ block->base_colors[0][2] = (int) TAG(etc1_base_color_ind_hi)(src[2]);
+ block->base_colors[1][2] = (int) TAG(etc1_base_color_ind_lo)(src[2]);
+ }
+
+ /* pick modifier tables */
+ block->modifier_tables[0] = TAG(etc1_modifier_tables)[(src[3] >> 5) & 0x7];
+ block->modifier_tables[1] = TAG(etc1_modifier_tables)[(src[3] >> 2) & 0x7];
+
+ block->flipped = (src[3] & 0x1);
+
+ block->pixel_indices =
+ (src[4] << 24) | (src[5] << 16) | (src[6] << 8) | src[7];
+}
+
+static void
+TAG(etc1_fetch_texel)(const struct TAG(etc1_block) *block,
+ int x, int y, UINT8_TYPE *dst)
+{
+ const UINT8_TYPE *base_color;
+ int modifier, bit, idx, blk;
+
+ /* get pixel index */
+ bit = y + x * 4;
+ idx = ((block->pixel_indices >> (15 + bit)) & 0x2) |
+ ((block->pixel_indices >> (bit)) & 0x1);
+
+ /* get subblock */
+ blk = (block->flipped) ? (y >= 2) : (x >= 2);
+
+ base_color = block->base_colors[blk];
+ modifier = block->modifier_tables[blk][idx];
+
+ dst[0] = TAG(etc1_clamp)(base_color[0], modifier);
+ dst[1] = TAG(etc1_clamp)(base_color[1], modifier);
+ dst[2] = TAG(etc1_clamp)(base_color[2], modifier);
+}
+
+static void
+etc1_unpack_rgba8888(uint8_t *dst_row,
+ unsigned dst_stride,
+ const uint8_t *src_row,
+ unsigned src_stride,
+ unsigned width,
+ unsigned height)
+{
+ const unsigned bw = 4, bh = 4, bs = 8, comps = 4;
+ struct etc1_block block;
+ unsigned x, y, i, j;
+
+ for (y = 0; y < height; y += bh) {
+ const uint8_t *src = src_row;
+
+ for (x = 0; x < width; x+= bw) {
+ etc1_parse_block(&block, src);
+
+ for (j = 0; j < MIN2(bh, height - y); j++) {
+ uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps;
+ for (i = 0; i < MIN2(bw, width - x); i++) {
+ etc1_fetch_texel(&block, i, j, dst);
+ dst[3] = 255;
+ dst += comps;
+ }
+ }
+
+ src += bs;
+ }
+
+ src_row += src_stride;
+ }
+}
diff --git a/src/minigallium/auxiliary/util/texcompress_rgtc_tmp.h b/src/minigallium/auxiliary/util/texcompress_rgtc_tmp.h
new file mode 100644
index 0000000..277d69b
--- /dev/null
+++ b/src/minigallium/auxiliary/util/texcompress_rgtc_tmp.h
@@ -0,0 +1,418 @@
+/*
+ * Copyright (C) 2011 Red Hat Inc.
+ *
+ * block compression parts are:
+ * Copyright (C) 2004 Roland Scheidegger All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Author:
+ * Dave Airlie
+ */
+
+/* included by texcompress_rgtc to define byte/ubyte compressors */
+
+static void TAG(fetch_texel_rgtc)(unsigned srcRowStride, const TYPE *pixdata,
+ unsigned i, unsigned j, TYPE *value, unsigned comps)
+{
+ TYPE decode;
+ const TYPE *blksrc = (pixdata + ((srcRowStride + 3) / 4 * (j / 4) + (i / 4)) * 8 * comps);
+ const TYPE alpha0 = blksrc[0];
+ const TYPE alpha1 = blksrc[1];
+ const char bit_pos = ((j&3) * 4 + (i&3)) * 3;
+ const TYPE acodelow = blksrc[2 + bit_pos / 8];
+ const TYPE acodehigh = (3 + bit_pos / 8) < 8 ? blksrc[3 + bit_pos / 8] : 0;
+ const TYPE code = (acodelow >> (bit_pos & 0x7) |
+ (acodehigh << (8 - (bit_pos & 0x7)))) & 0x7;
+
+ if (code == 0)
+ decode = alpha0;
+ else if (code == 1)
+ decode = alpha1;
+ else if (alpha0 > alpha1)
+ decode = ((alpha0 * (8 - code) + (alpha1 * (code - 1))) / 7);
+ else if (code < 6)
+ decode = ((alpha0 * (6 - code) + (alpha1 * (code - 1))) / 5);
+ else if (code == 6)
+ decode = T_MIN;
+ else
+ decode = T_MAX;
+
+ *value = decode;
+}
+
+static void TAG(write_rgtc_encoded_channel)(TYPE *blkaddr,
+ TYPE alphabase1,
+ TYPE alphabase2,
+ TYPE alphaenc[16])
+{
+ *blkaddr++ = alphabase1;
+ *blkaddr++ = alphabase2;
+ *blkaddr++ = alphaenc[0] | (alphaenc[1] << 3) | ((alphaenc[2] & 3) << 6);
+ *blkaddr++ = (alphaenc[2] >> 2) | (alphaenc[3] << 1) | (alphaenc[4] << 4) | ((alphaenc[5] & 1) << 7);
+ *blkaddr++ = (alphaenc[5] >> 1) | (alphaenc[6] << 2) | (alphaenc[7] << 5);
+ *blkaddr++ = alphaenc[8] | (alphaenc[9] << 3) | ((alphaenc[10] & 3) << 6);
+ *blkaddr++ = (alphaenc[10] >> 2) | (alphaenc[11] << 1) | (alphaenc[12] << 4) | ((alphaenc[13] & 1) << 7);
+ *blkaddr++ = (alphaenc[13] >> 1) | (alphaenc[14] << 2) | (alphaenc[15] << 5);
+}
+
+static void TAG(encode_rgtc_ubyte)(TYPE *blkaddr, TYPE srccolors[4][4],
+ int numxpixels, int numypixels)
+{
+ TYPE alphabase[2], alphause[2];
+ short alphatest[2] = { 0 };
+ unsigned int alphablockerror1, alphablockerror2, alphablockerror3;
+ TYPE i, j, aindex, acutValues[7];
+ TYPE alphaenc1[16], alphaenc2[16], alphaenc3[16];
+ int alphaabsmin = 0, alphaabsmax = 0;
+ short alphadist;
+
+ /* find lowest and highest alpha value in block, alphabase[0] lowest, alphabase[1] highest */
+ alphabase[0] = T_MAX; alphabase[1] = T_MIN;
+ for (j = 0; j < numypixels; j++) {
+ for (i = 0; i < numxpixels; i++) {
+ if (srccolors[j][i] == T_MIN)
+ alphaabsmin = 1;
+ else if (srccolors[j][i] == T_MAX)
+ alphaabsmax = 1;
+ else {
+ if (srccolors[j][i] > alphabase[1])
+ alphabase[1] = srccolors[j][i];
+ if (srccolors[j][i] < alphabase[0])
+ alphabase[0] = srccolors[j][i];
+ }
+ }
+ }
+
+
+ if (((alphabase[0] > alphabase[1]) && !(alphaabsmin && alphaabsmax))
+ || (alphabase[0] == alphabase[1] && !alphaabsmin && !alphaabsmax)) { /* one color, either max or min */
+ /* shortcut here since it is a very common case (and also avoids later problems) */
+ /* could also thest for alpha0 == alpha1 (and not min/max), but probably not common, so don't bother */
+
+ *blkaddr++ = srccolors[0][0];
+ blkaddr++;
+ *blkaddr++ = 0;
+ *blkaddr++ = 0;
+ *blkaddr++ = 0;
+ *blkaddr++ = 0;
+ *blkaddr++ = 0;
+ *blkaddr++ = 0;
+#if RGTC_DEBUG
+ fprintf(stderr, "enc0 used\n");
+#endif
+ return;
+ }
+
+ /* find best encoding for alpha0 > alpha1 */
+ /* it's possible this encoding is better even if both alphaabsmin and alphaabsmax are true */
+ alphablockerror1 = 0x0;
+ alphablockerror2 = 0xffffffff;
+ alphablockerror3 = 0xffffffff;
+ if (alphaabsmin) alphause[0] = T_MIN;
+ else alphause[0] = alphabase[0];
+ if (alphaabsmax) alphause[1] = T_MAX;
+ else alphause[1] = alphabase[1];
+ /* calculate the 7 cut values, just the middle between 2 of the computed alpha values */
+ for (aindex = 0; aindex < 7; aindex++) {
+ /* don't forget here is always rounded down */
+ acutValues[aindex] = (alphause[0] * (2*aindex + 1) + alphause[1] * (14 - (2*aindex + 1))) / 14;
+ }
+
+ for (j = 0; j < numypixels; j++) {
+ for (i = 0; i < numxpixels; i++) {
+ /* maybe it's overkill to have the most complicated calculation just for the error
+ calculation which we only need to figure out if encoding1 or encoding2 is better... */
+ if (srccolors[j][i] > acutValues[0]) {
+ alphaenc1[4*j + i] = 0;
+ alphadist = srccolors[j][i] - alphause[1];
+ }
+ else if (srccolors[j][i] > acutValues[1]) {
+ alphaenc1[4*j + i] = 2;
+ alphadist = srccolors[j][i] - (alphause[1] * 6 + alphause[0] * 1) / 7;
+ }
+ else if (srccolors[j][i] > acutValues[2]) {
+ alphaenc1[4*j + i] = 3;
+ alphadist = srccolors[j][i] - (alphause[1] * 5 + alphause[0] * 2) / 7;
+ }
+ else if (srccolors[j][i] > acutValues[3]) {
+ alphaenc1[4*j + i] = 4;
+ alphadist = srccolors[j][i] - (alphause[1] * 4 + alphause[0] * 3) / 7;
+ }
+ else if (srccolors[j][i] > acutValues[4]) {
+ alphaenc1[4*j + i] = 5;
+ alphadist = srccolors[j][i] - (alphause[1] * 3 + alphause[0] * 4) / 7;
+ }
+ else if (srccolors[j][i] > acutValues[5]) {
+ alphaenc1[4*j + i] = 6;
+ alphadist = srccolors[j][i] - (alphause[1] * 2 + alphause[0] * 5) / 7;
+ }
+ else if (srccolors[j][i] > acutValues[6]) {
+ alphaenc1[4*j + i] = 7;
+ alphadist = srccolors[j][i] - (alphause[1] * 1 + alphause[0] * 6) / 7;
+ }
+ else {
+ alphaenc1[4*j + i] = 1;
+ alphadist = srccolors[j][i] - alphause[0];
+ }
+ alphablockerror1 += alphadist * alphadist;
+ }
+ }
+
+#if RGTC_DEBUG
+ for (i = 0; i < 16; i++) {
+ fprintf(stderr, "%d ", alphaenc1[i]);
+ }
+ fprintf(stderr, "cutVals ");
+ for (i = 0; i < 7; i++) {
+ fprintf(stderr, "%d ", acutValues[i]);
+ }
+ fprintf(stderr, "srcVals ");
+ for (j = 0; j < numypixels; j++) {
+ for (i = 0; i < numxpixels; i++) {
+ fprintf(stderr, "%d ", srccolors[j][i]);
+ }
+ }
+ fprintf(stderr, "\n");
+#endif
+
+ /* it's not very likely this encoding is better if both alphaabsmin and alphaabsmax
+ are false but try it anyway */
+ if (alphablockerror1 >= 32) {
+
+ /* don't bother if encoding is already very good, this condition should also imply
+ we have valid alphabase colors which we absolutely need (alphabase[0] <= alphabase[1]) */
+ alphablockerror2 = 0;
+ for (aindex = 0; aindex < 5; aindex++) {
+ /* don't forget here is always rounded down */
+ acutValues[aindex] = (alphabase[0] * (10 - (2*aindex + 1)) + alphabase[1] * (2*aindex + 1)) / 10;
+ }
+ for (j = 0; j < numypixels; j++) {
+ for (i = 0; i < numxpixels; i++) {
+ /* maybe it's overkill to have the most complicated calculation just for the error
+ calculation which we only need to figure out if encoding1 or encoding2 is better... */
+ if (srccolors[j][i] == T_MIN) {
+ alphaenc2[4*j + i] = 6;
+ alphadist = 0;
+ }
+ else if (srccolors[j][i] == T_MAX) {
+ alphaenc2[4*j + i] = 7;
+ alphadist = 0;
+ }
+ else if (srccolors[j][i] <= acutValues[0]) {
+ alphaenc2[4*j + i] = 0;
+ alphadist = srccolors[j][i] - alphabase[0];
+ }
+ else if (srccolors[j][i] <= acutValues[1]) {
+ alphaenc2[4*j + i] = 2;
+ alphadist = srccolors[j][i] - (alphabase[0] * 4 + alphabase[1] * 1) / 5;
+ }
+ else if (srccolors[j][i] <= acutValues[2]) {
+ alphaenc2[4*j + i] = 3;
+ alphadist = srccolors[j][i] - (alphabase[0] * 3 + alphabase[1] * 2) / 5;
+ }
+ else if (srccolors[j][i] <= acutValues[3]) {
+ alphaenc2[4*j + i] = 4;
+ alphadist = srccolors[j][i] - (alphabase[0] * 2 + alphabase[1] * 3) / 5;
+ }
+ else if (srccolors[j][i] <= acutValues[4]) {
+ alphaenc2[4*j + i] = 5;
+ alphadist = srccolors[j][i] - (alphabase[0] * 1 + alphabase[1] * 4) / 5;
+ }
+ else {
+ alphaenc2[4*j + i] = 1;
+ alphadist = srccolors[j][i] - alphabase[1];
+ }
+ alphablockerror2 += alphadist * alphadist;
+ }
+ }
+
+
+ /* skip this if the error is already very small
+ this encoding is MUCH better on average than #2 though, but expensive! */
+ if ((alphablockerror2 > 96) && (alphablockerror1 > 96)) {
+ short blockerrlin1 = 0;
+ short blockerrlin2 = 0;
+ TYPE nralphainrangelow = 0;
+ TYPE nralphainrangehigh = 0;
+ alphatest[0] = T_MAX;
+ alphatest[1] = T_MIN;
+ /* if we have large range it's likely there are values close to 0/255, try to map them to 0/255 */
+ for (j = 0; j < numypixels; j++) {
+ for (i = 0; i < numxpixels; i++) {
+ if ((srccolors[j][i] > alphatest[1]) && (srccolors[j][i] < (T_MAX -(alphabase[1] - alphabase[0]) / 28)))
+ alphatest[1] = srccolors[j][i];
+ if ((srccolors[j][i] < alphatest[0]) && (srccolors[j][i] > (alphabase[1] - alphabase[0]) / 28))
+ alphatest[0] = srccolors[j][i];
+ }
+ }
+ /* shouldn't happen too often, don't really care about those degenerated cases */
+ if (alphatest[1] <= alphatest[0]) {
+ alphatest[0] = T_MIN+1;
+ alphatest[1] = T_MAX-1;
+ }
+ for (aindex = 0; aindex < 5; aindex++) {
+ /* don't forget here is always rounded down */
+ acutValues[aindex] = (alphatest[0] * (10 - (2*aindex + 1)) + alphatest[1] * (2*aindex + 1)) / 10;
+ }
+
+ /* find the "average" difference between the alpha values and the next encoded value.
+ This is then used to calculate new base values.
+ Should there be some weighting, i.e. those values closer to alphatest[x] have more weight,
+ since they will see more improvement, and also because the values in the middle are somewhat
+ likely to get no improvement at all (because the base values might move in different directions)?
+ OTOH it would mean the values in the middle are even less likely to get an improvement
+ */
+ for (j = 0; j < numypixels; j++) {
+ for (i = 0; i < numxpixels; i++) {
+ if (srccolors[j][i] <= alphatest[0] / 2) {
+ }
+ else if (srccolors[j][i] > ((T_MAX + alphatest[1]) / 2)) {
+ }
+ else if (srccolors[j][i] <= acutValues[0]) {
+ blockerrlin1 += (srccolors[j][i] - alphatest[0]);
+ nralphainrangelow += 1;
+ }
+ else if (srccolors[j][i] <= acutValues[1]) {
+ blockerrlin1 += (srccolors[j][i] - (alphatest[0] * 4 + alphatest[1] * 1) / 5);
+ blockerrlin2 += (srccolors[j][i] - (alphatest[0] * 4 + alphatest[1] * 1) / 5);
+ nralphainrangelow += 1;
+ nralphainrangehigh += 1;
+ }
+ else if (srccolors[j][i] <= acutValues[2]) {
+ blockerrlin1 += (srccolors[j][i] - (alphatest[0] * 3 + alphatest[1] * 2) / 5);
+ blockerrlin2 += (srccolors[j][i] - (alphatest[0] * 3 + alphatest[1] * 2) / 5);
+ nralphainrangelow += 1;
+ nralphainrangehigh += 1;
+ }
+ else if (srccolors[j][i] <= acutValues[3]) {
+ blockerrlin1 += (srccolors[j][i] - (alphatest[0] * 2 + alphatest[1] * 3) / 5);
+ blockerrlin2 += (srccolors[j][i] - (alphatest[0] * 2 + alphatest[1] * 3) / 5);
+ nralphainrangelow += 1;
+ nralphainrangehigh += 1;
+ }
+ else if (srccolors[j][i] <= acutValues[4]) {
+ blockerrlin1 += (srccolors[j][i] - (alphatest[0] * 1 + alphatest[1] * 4) / 5);
+ blockerrlin2 += (srccolors[j][i] - (alphatest[0] * 1 + alphatest[1] * 4) / 5);
+ nralphainrangelow += 1;
+ nralphainrangehigh += 1;
+ }
+ else {
+ blockerrlin2 += (srccolors[j][i] - alphatest[1]);
+ nralphainrangehigh += 1;
+ }
+ }
+ }
+ /* shouldn't happen often, needed to avoid div by zero */
+ if (nralphainrangelow == 0) nralphainrangelow = 1;
+ if (nralphainrangehigh == 0) nralphainrangehigh = 1;
+ alphatest[0] = alphatest[0] + (blockerrlin1 / nralphainrangelow);
+#if RGTC_DEBUG
+ fprintf(stderr, "block err lin low %d, nr %d\n", blockerrlin1, nralphainrangelow);
+ fprintf(stderr, "block err lin high %d, nr %d\n", blockerrlin2, nralphainrangehigh);
+#endif
+ /* again shouldn't really happen often... */
+ if (alphatest[0] < T_MIN) {
+ alphatest[0] = T_MIN;
+ }
+ alphatest[1] = alphatest[1] + (blockerrlin2 / nralphainrangehigh);
+ if (alphatest[1] > T_MAX) {
+ alphatest[1] = T_MAX;
+ }
+
+ alphablockerror3 = 0;
+ for (aindex = 0; aindex < 5; aindex++) {
+ /* don't forget here is always rounded down */
+ acutValues[aindex] = (alphatest[0] * (10 - (2*aindex + 1)) + alphatest[1] * (2*aindex + 1)) / 10;
+ }
+ for (j = 0; j < numypixels; j++) {
+ for (i = 0; i < numxpixels; i++) {
+ /* maybe it's overkill to have the most complicated calculation just for the error
+ calculation which we only need to figure out if encoding1 or encoding2 is better... */
+ if (srccolors[j][i] <= alphatest[0] / 2) {
+ alphaenc3[4*j + i] = 6;
+ alphadist = srccolors[j][i];
+ }
+ else if (srccolors[j][i] > ((T_MAX + alphatest[1]) / 2)) {
+ alphaenc3[4*j + i] = 7;
+ alphadist = T_MAX - srccolors[j][i];
+ }
+ else if (srccolors[j][i] <= acutValues[0]) {
+ alphaenc3[4*j + i] = 0;
+ alphadist = srccolors[j][i] - alphatest[0];
+ }
+ else if (srccolors[j][i] <= acutValues[1]) {
+ alphaenc3[4*j + i] = 2;
+ alphadist = srccolors[j][i] - (alphatest[0] * 4 + alphatest[1] * 1) / 5;
+ }
+ else if (srccolors[j][i] <= acutValues[2]) {
+ alphaenc3[4*j + i] = 3;
+ alphadist = srccolors[j][i] - (alphatest[0] * 3 + alphatest[1] * 2) / 5;
+ }
+ else if (srccolors[j][i] <= acutValues[3]) {
+ alphaenc3[4*j + i] = 4;
+ alphadist = srccolors[j][i] - (alphatest[0] * 2 + alphatest[1] * 3) / 5;
+ }
+ else if (srccolors[j][i] <= acutValues[4]) {
+ alphaenc3[4*j + i] = 5;
+ alphadist = srccolors[j][i] - (alphatest[0] * 1 + alphatest[1] * 4) / 5;
+ }
+ else {
+ alphaenc3[4*j + i] = 1;
+ alphadist = srccolors[j][i] - alphatest[1];
+ }
+ alphablockerror3 += alphadist * alphadist;
+ }
+ }
+ }
+ }
+
+ /* write the alpha values and encoding back. */
+ if ((alphablockerror1 <= alphablockerror2) && (alphablockerror1 <= alphablockerror3)) {
+#if RGTC_DEBUG
+ if (alphablockerror1 > 96) fprintf(stderr, "enc1 used, error %d\n", alphablockerror1);
+ fprintf(stderr,"w1: min %d max %d au0 %d au1 %d\n",
+ T_MIN, T_MAX,
+ alphause[1], alphause[0]);
+#endif
+
+ TAG(write_rgtc_encoded_channel)( blkaddr, alphause[1], alphause[0], alphaenc1 );
+ }
+ else if (alphablockerror2 <= alphablockerror3) {
+#if RGTC_DEBUG
+ if (alphablockerror2 > 96) fprintf(stderr, "enc2 used, error %d\n", alphablockerror2);
+ fprintf(stderr,"w2: min %d max %d au0 %d au1 %d\n",
+ T_MIN, T_MAX,
+ alphabase[0], alphabase[1]);
+#endif
+
+ TAG(write_rgtc_encoded_channel)( blkaddr, alphabase[0], alphabase[1], alphaenc2 );
+ }
+ else {
+#if RGTC_DEBUG
+ fprintf(stderr, "enc3 used, error %d\n", alphablockerror3);
+ fprintf(stderr,"w3: min %d max %d au0 %d au1 %d\n",
+ T_MIN, T_MAX,
+ alphatest[0], alphatest[1]);
+#endif
+
+ TAG(write_rgtc_encoded_channel)( blkaddr, (TYPE)alphatest[0], (TYPE)alphatest[1], alphaenc3 );
+ }
+}
diff --git a/src/minigallium/auxiliary/util/u_atomic.h b/src/minigallium/auxiliary/util/u_atomic.h
new file mode 100644
index 0000000..2f2b42b
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_atomic.h
@@ -0,0 +1,349 @@
+/**
+ * Many similar implementations exist. See for example libwsbm
+ * or the linux kernel include/atomic.h
+ *
+ * No copyright claimed on this file.
+ *
+ */
+
+#ifndef U_ATOMIC_H
+#define U_ATOMIC_H
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_defines.h"
+
+/* Favor OS-provided implementations.
+ *
+ * Where no OS-provided implementation is available, fall back to
+ * locally coded assembly, compiler intrinsic or ultimately a
+ * mutex-based implementation.
+ */
+#if defined(PIPE_OS_SOLARIS)
+#define PIPE_ATOMIC_OS_SOLARIS
+#elif defined(PIPE_CC_MSVC)
+#define PIPE_ATOMIC_MSVC_INTRINSIC
+#elif (defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86))
+#define PIPE_ATOMIC_ASM_MSVC_X86
+#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86))
+#define PIPE_ATOMIC_ASM_GCC_X86
+#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86_64))
+#define PIPE_ATOMIC_ASM_GCC_X86_64
+#elif defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 401)
+#define PIPE_ATOMIC_GCC_INTRINSIC
+#else
+#error "Unsupported platform"
+#endif
+
+
+#if defined(PIPE_ATOMIC_ASM_GCC_X86_64)
+#define PIPE_ATOMIC "GCC x86_64 assembly"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define p_atomic_set(_v, _i) (*(_v) = (_i))
+#define p_atomic_read(_v) (*(_v))
+
+static INLINE boolean
+p_atomic_dec_zero(int32_t *v)
+{
+ unsigned char c;
+
+ __asm__ __volatile__("lock; decl %0; sete %1":"+m"(*v), "=qm"(c)
+ ::"memory");
+
+ return c != 0;
+}
+
+static INLINE void
+p_atomic_inc(int32_t *v)
+{
+ __asm__ __volatile__("lock; incl %0":"+m"(*v));
+}
+
+static INLINE void
+p_atomic_dec(int32_t *v)
+{
+ __asm__ __volatile__("lock; decl %0":"+m"(*v));
+}
+
+static INLINE int32_t
+p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new)
+{
+ return __sync_val_compare_and_swap(v, old, _new);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PIPE_ATOMIC_ASM_GCC_X86_64 */
+
+
+#if defined(PIPE_ATOMIC_ASM_GCC_X86)
+
+#define PIPE_ATOMIC "GCC x86 assembly"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define p_atomic_set(_v, _i) (*(_v) = (_i))
+#define p_atomic_read(_v) (*(_v))
+
+static INLINE boolean
+p_atomic_dec_zero(int32_t *v)
+{
+ unsigned char c;
+
+ __asm__ __volatile__("lock; decl %0; sete %1":"+m"(*v), "=qm"(c)
+ ::"memory");
+
+ return c != 0;
+}
+
+static INLINE void
+p_atomic_inc(int32_t *v)
+{
+ __asm__ __volatile__("lock; incl %0":"+m"(*v));
+}
+
+static INLINE void
+p_atomic_dec(int32_t *v)
+{
+ __asm__ __volatile__("lock; decl %0":"+m"(*v));
+}
+
+static INLINE int32_t
+p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new)
+{
+ return __sync_val_compare_and_swap(v, old, _new);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
+/* Implementation using GCC-provided synchronization intrinsics
+ */
+#if defined(PIPE_ATOMIC_GCC_INTRINSIC)
+
+#define PIPE_ATOMIC "GCC Sync Intrinsics"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define p_atomic_set(_v, _i) (*(_v) = (_i))
+#define p_atomic_read(_v) (*(_v))
+
+static INLINE boolean
+p_atomic_dec_zero(int32_t *v)
+{
+ return (__sync_sub_and_fetch(v, 1) == 0);
+}
+
+static INLINE void
+p_atomic_inc(int32_t *v)
+{
+ (void) __sync_add_and_fetch(v, 1);
+}
+
+static INLINE void
+p_atomic_dec(int32_t *v)
+{
+ (void) __sync_sub_and_fetch(v, 1);
+}
+
+static INLINE int32_t
+p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new)
+{
+ return __sync_val_compare_and_swap(v, old, _new);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
+/* Unlocked version for single threaded environments, such as some
+ * windows kernel modules.
+ */
+#if defined(PIPE_ATOMIC_OS_UNLOCKED)
+
+#define PIPE_ATOMIC "Unlocked"
+
+#define p_atomic_set(_v, _i) (*(_v) = (_i))
+#define p_atomic_read(_v) (*(_v))
+#define p_atomic_dec_zero(_v) ((boolean) --(*(_v)))
+#define p_atomic_inc(_v) ((void) (*(_v))++)
+#define p_atomic_dec(_v) ((void) (*(_v))--)
+#define p_atomic_cmpxchg(_v, old, _new) (*(_v) == old ? *(_v) = (_new) : *(_v))
+
+#endif
+
+
+/* Locally coded assembly for MSVC on x86:
+ */
+#if defined(PIPE_ATOMIC_ASM_MSVC_X86)
+
+#define PIPE_ATOMIC "MSVC x86 assembly"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define p_atomic_set(_v, _i) (*(_v) = (_i))
+#define p_atomic_read(_v) (*(_v))
+
+static INLINE boolean
+p_atomic_dec_zero(int32_t *v)
+{
+ unsigned char c;
+
+ __asm {
+ mov eax, [v]
+ lock dec dword ptr [eax]
+ sete byte ptr [c]
+ }
+
+ return c != 0;
+}
+
+static INLINE void
+p_atomic_inc(int32_t *v)
+{
+ __asm {
+ mov eax, [v]
+ lock inc dword ptr [eax]
+ }
+}
+
+static INLINE void
+p_atomic_dec(int32_t *v)
+{
+ __asm {
+ mov eax, [v]
+ lock dec dword ptr [eax]
+ }
+}
+
+static INLINE int32_t
+p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new)
+{
+ int32_t orig;
+
+ __asm {
+ mov ecx, [v]
+ mov eax, [old]
+ mov edx, [_new]
+ lock cmpxchg [ecx], edx
+ mov [orig], eax
+ }
+
+ return orig;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+#if defined(PIPE_ATOMIC_MSVC_INTRINSIC)
+
+#define PIPE_ATOMIC "MSVC Intrinsics"
+
+#include <intrin.h>
+
+#pragma intrinsic(_InterlockedIncrement)
+#pragma intrinsic(_InterlockedDecrement)
+#pragma intrinsic(_InterlockedCompareExchange)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define p_atomic_set(_v, _i) (*(_v) = (_i))
+#define p_atomic_read(_v) (*(_v))
+
+static INLINE boolean
+p_atomic_dec_zero(int32_t *v)
+{
+ return _InterlockedDecrement((long *)v) == 0;
+}
+
+static INLINE void
+p_atomic_inc(int32_t *v)
+{
+ _InterlockedIncrement((long *)v);
+}
+
+static INLINE void
+p_atomic_dec(int32_t *v)
+{
+ _InterlockedDecrement((long *)v);
+}
+
+static INLINE int32_t
+p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new)
+{
+ return _InterlockedCompareExchange((long *)v, _new, old);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#if defined(PIPE_ATOMIC_OS_SOLARIS)
+
+#define PIPE_ATOMIC "Solaris OS atomic functions"
+
+#include <atomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define p_atomic_set(_v, _i) (*(_v) = (_i))
+#define p_atomic_read(_v) (*(_v))
+
+static INLINE boolean
+p_atomic_dec_zero(int32_t *v)
+{
+ uint32_t n = atomic_dec_32_nv((uint32_t *) v);
+
+ return n != 0;
+}
+
+#define p_atomic_inc(_v) atomic_inc_32((uint32_t *) _v)
+#define p_atomic_dec(_v) atomic_dec_32((uint32_t *) _v)
+
+#define p_atomic_cmpxchg(_v, _old, _new) \
+ atomic_cas_32( (uint32_t *) _v, (uint32_t) _old, (uint32_t) _new)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+#ifndef PIPE_ATOMIC
+#error "No pipe_atomic implementation selected"
+#endif
+
+
+
+#endif /* U_ATOMIC_H */
diff --git a/src/minigallium/auxiliary/util/u_bitmask.c b/src/minigallium/auxiliary/util/u_bitmask.c
new file mode 100644
index 0000000..23c93a3
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_bitmask.c
@@ -0,0 +1,328 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Generic bitmask implementation.
+ *
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+
+#include "pipe/p_compiler.h"
+#include "util/u_debug.h"
+
+#include "util/u_memory.h"
+#include "util/u_bitmask.h"
+
+
+typedef uint32_t util_bitmask_word;
+
+
+#define UTIL_BITMASK_INITIAL_WORDS 16
+#define UTIL_BITMASK_BITS_PER_BYTE 8
+#define UTIL_BITMASK_BITS_PER_WORD (sizeof(util_bitmask_word) * UTIL_BITMASK_BITS_PER_BYTE)
+
+
+struct util_bitmask
+{
+ util_bitmask_word *words;
+
+ /** Number of bits we can currently hold */
+ unsigned size;
+
+ /** Number of consecutive bits set at the start of the bitmask */
+ unsigned filled;
+};
+
+
+struct util_bitmask *
+util_bitmask_create(void)
+{
+ struct util_bitmask *bm;
+
+ bm = MALLOC_STRUCT(util_bitmask);
+ if(!bm)
+ return NULL;
+
+ bm->words = (util_bitmask_word *)CALLOC(UTIL_BITMASK_INITIAL_WORDS, sizeof(util_bitmask_word));
+ if(!bm->words) {
+ FREE(bm);
+ return NULL;
+ }
+
+ bm->size = UTIL_BITMASK_INITIAL_WORDS * UTIL_BITMASK_BITS_PER_WORD;
+ bm->filled = 0;
+
+ return bm;
+}
+
+
+/**
+ * Resize the bitmask if necessary
+ */
+static INLINE boolean
+util_bitmask_resize(struct util_bitmask *bm,
+ unsigned minimum_index)
+{
+ unsigned minimum_size = minimum_index + 1;
+ unsigned new_size;
+ util_bitmask_word *new_words;
+
+ /* Check integer overflow */
+ if(!minimum_size)
+ return FALSE;
+
+ if(bm->size >= minimum_size)
+ return TRUE;
+
+ assert(bm->size % UTIL_BITMASK_BITS_PER_WORD == 0);
+ new_size = bm->size;
+ while(new_size < minimum_size) {
+ new_size *= 2;
+ /* Check integer overflow */
+ if(new_size < bm->size)
+ return FALSE;
+ }
+ assert(new_size);
+ assert(new_size % UTIL_BITMASK_BITS_PER_WORD == 0);
+
+ new_words = (util_bitmask_word *)REALLOC((void *)bm->words,
+ bm->size / UTIL_BITMASK_BITS_PER_BYTE,
+ new_size / UTIL_BITMASK_BITS_PER_BYTE);
+ if(!new_words)
+ return FALSE;
+
+ memset(new_words + bm->size/UTIL_BITMASK_BITS_PER_WORD,
+ 0,
+ (new_size - bm->size)/UTIL_BITMASK_BITS_PER_BYTE);
+
+ bm->size = new_size;
+ bm->words = new_words;
+
+ return TRUE;
+}
+
+
+/**
+ * Lazily update the filled.
+ */
+static INLINE void
+util_bitmask_filled_set(struct util_bitmask *bm,
+ unsigned index)
+{
+ assert(bm->filled <= bm->size);
+ assert(index < bm->size);
+
+ if(index == bm->filled) {
+ ++bm->filled;
+ assert(bm->filled <= bm->size);
+ }
+}
+
+static INLINE void
+util_bitmask_filled_unset(struct util_bitmask *bm,
+ unsigned index)
+{
+ assert(bm->filled <= bm->size);
+ assert(index < bm->size);
+
+ if(index < bm->filled)
+ bm->filled = index;
+}
+
+
+unsigned
+util_bitmask_add(struct util_bitmask *bm)
+{
+ unsigned word;
+ unsigned bit;
+ util_bitmask_word mask;
+
+ assert(bm);
+
+ /* linear search for an empty index */
+ word = bm->filled / UTIL_BITMASK_BITS_PER_WORD;
+ bit = bm->filled % UTIL_BITMASK_BITS_PER_WORD;
+ mask = 1 << bit;
+ while(word < bm->size / UTIL_BITMASK_BITS_PER_WORD) {
+ while(bit < UTIL_BITMASK_BITS_PER_WORD) {
+ if(!(bm->words[word] & mask))
+ goto found;
+ ++bm->filled;
+ ++bit;
+ mask <<= 1;
+ }
+ ++word;
+ bit = 0;
+ mask = 1;
+ }
+found:
+
+ /* grow the bitmask if necessary */
+ if(!util_bitmask_resize(bm, bm->filled))
+ return UTIL_BITMASK_INVALID_INDEX;
+
+ assert(!(bm->words[word] & mask));
+ bm->words[word] |= mask;
+
+ return bm->filled++;
+}
+
+
+unsigned
+util_bitmask_set(struct util_bitmask *bm,
+ unsigned index)
+{
+ unsigned word;
+ unsigned bit;
+ util_bitmask_word mask;
+
+ assert(bm);
+
+ /* grow the bitmask if necessary */
+ if(!util_bitmask_resize(bm, index))
+ return UTIL_BITMASK_INVALID_INDEX;
+
+ word = index / UTIL_BITMASK_BITS_PER_WORD;
+ bit = index % UTIL_BITMASK_BITS_PER_WORD;
+ mask = 1 << bit;
+
+ bm->words[word] |= mask;
+
+ util_bitmask_filled_set(bm, index);
+
+ return index;
+}
+
+
+void
+util_bitmask_clear(struct util_bitmask *bm,
+ unsigned index)
+{
+ unsigned word;
+ unsigned bit;
+ util_bitmask_word mask;
+
+ assert(bm);
+
+ if(index >= bm->size)
+ return;
+
+ word = index / UTIL_BITMASK_BITS_PER_WORD;
+ bit = index % UTIL_BITMASK_BITS_PER_WORD;
+ mask = 1 << bit;
+
+ bm->words[word] &= ~mask;
+
+ util_bitmask_filled_unset(bm, index);
+}
+
+
+boolean
+util_bitmask_get(struct util_bitmask *bm,
+ unsigned index)
+{
+ unsigned word = index / UTIL_BITMASK_BITS_PER_WORD;
+ unsigned bit = index % UTIL_BITMASK_BITS_PER_WORD;
+ util_bitmask_word mask = 1 << bit;
+
+ assert(bm);
+
+ if(index < bm->filled) {
+ assert(bm->words[word] & mask);
+ return TRUE;
+ }
+
+ if(index >= bm->size)
+ return FALSE;
+
+ if(bm->words[word] & mask) {
+ util_bitmask_filled_set(bm, index);
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
+
+unsigned
+util_bitmask_get_next_index(struct util_bitmask *bm,
+ unsigned index)
+{
+ unsigned word = index / UTIL_BITMASK_BITS_PER_WORD;
+ unsigned bit = index % UTIL_BITMASK_BITS_PER_WORD;
+ util_bitmask_word mask = 1 << bit;
+
+ if(index < bm->filled) {
+ assert(bm->words[word] & mask);
+ return index;
+ }
+
+ if(index >= bm->size) {
+ return UTIL_BITMASK_INVALID_INDEX;
+ }
+
+ /* Do a linear search */
+ while(word < bm->size / UTIL_BITMASK_BITS_PER_WORD) {
+ while(bit < UTIL_BITMASK_BITS_PER_WORD) {
+ if(bm->words[word] & mask) {
+ if(index == bm->filled) {
+ ++bm->filled;
+ assert(bm->filled <= bm->size);
+ }
+ return index;
+ }
+ ++index;
+ ++bit;
+ mask <<= 1;
+ }
+ ++word;
+ bit = 0;
+ mask = 1;
+ }
+
+ return UTIL_BITMASK_INVALID_INDEX;
+}
+
+
+unsigned
+util_bitmask_get_first_index(struct util_bitmask *bm)
+{
+ return util_bitmask_get_next_index(bm, 0);
+}
+
+
+void
+util_bitmask_destroy(struct util_bitmask *bm)
+{
+ assert(bm);
+
+ FREE(bm->words);
+ FREE(bm);
+}
+
diff --git a/src/minigallium/auxiliary/util/u_bitmask.h b/src/minigallium/auxiliary/util/u_bitmask.h
new file mode 100644
index 0000000..98b85dd
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_bitmask.h
@@ -0,0 +1,117 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Generic bitmask.
+ *
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+#ifndef U_HANDLE_BITMASK_H_
+#define U_HANDLE_BITMASK_H_
+
+
+#include "pipe/p_compiler.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define UTIL_BITMASK_INVALID_INDEX (~0U)
+
+
+/**
+ * Abstract data type to represent arbitrary set of bits.
+ */
+struct util_bitmask;
+
+
+struct util_bitmask *
+util_bitmask_create(void);
+
+
+/**
+ * Search a cleared bit and set it.
+ *
+ * It searches for the first cleared bit.
+ *
+ * Returns the bit index on success, or UTIL_BITMASK_INVALID_INDEX on out of
+ * memory growing the bitmask.
+ */
+unsigned
+util_bitmask_add(struct util_bitmask *bm);
+
+/**
+ * Set a bit.
+ *
+ * Returns the input index on success, or UTIL_BITMASK_INVALID_INDEX on out of
+ * memory growing the bitmask.
+ */
+unsigned
+util_bitmask_set(struct util_bitmask *bm,
+ unsigned index);
+
+void
+util_bitmask_clear(struct util_bitmask *bm,
+ unsigned index);
+
+boolean
+util_bitmask_get(struct util_bitmask *bm,
+ unsigned index);
+
+
+void
+util_bitmask_destroy(struct util_bitmask *bm);
+
+
+/**
+ * Search for the first set bit.
+ *
+ * Returns UTIL_BITMASK_INVALID_INDEX if a set bit cannot be found.
+ */
+unsigned
+util_bitmask_get_first_index(struct util_bitmask *bm);
+
+
+/**
+ * Search for the first set bit, starting from the giving index.
+ *
+ * Returns UTIL_BITMASK_INVALID_INDEX if a set bit cannot be found.
+ */
+unsigned
+util_bitmask_get_next_index(struct util_bitmask *bm,
+ unsigned index);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_HANDLE_BITMASK_H_ */
diff --git a/src/minigallium/auxiliary/util/u_blit.c b/src/minigallium/auxiliary/util/u_blit.c
new file mode 100644
index 0000000..8cc080c
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_blit.c
@@ -0,0 +1,954 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Copy/blit pixel rect between surfaces
+ *
+ * @author Brian Paul
+ */
+
+
+#include "pipe/p_context.h"
+#include "util/u_debug.h"
+#include "pipe/p_defines.h"
+#include "util/u_inlines.h"
+#include "pipe/p_shader_tokens.h"
+#include "pipe/p_state.h"
+
+#include "util/u_blit.h"
+#include "util/u_draw_quad.h"
+#include "util/u_format.h"
+#include "util/u_math.h"
+#include "util/u_memory.h"
+#include "util/u_sampler.h"
+#include "util/u_simple_shaders.h"
+
+#include "cso_cache/cso_context.h"
+
+
+struct blit_state
+{
+ struct pipe_context *pipe;
+ struct cso_context *cso;
+
+ struct pipe_blend_state blend_write_color, blend_keep_color;
+ struct pipe_depth_stencil_alpha_state dsa_keep_depthstencil;
+ struct pipe_depth_stencil_alpha_state dsa_write_depthstencil;
+ struct pipe_depth_stencil_alpha_state dsa_write_depth;
+ struct pipe_depth_stencil_alpha_state dsa_write_stencil;
+ struct pipe_rasterizer_state rasterizer;
+ struct pipe_sampler_state sampler;
+ struct pipe_viewport_state viewport;
+ struct pipe_vertex_element velem[2];
+ enum pipe_texture_target internal_target;
+
+ void *vs;
+ void *fs[PIPE_MAX_TEXTURE_TYPES][TGSI_WRITEMASK_XYZW + 1];
+ void *fs_depthstencil[PIPE_MAX_TEXTURE_TYPES];
+ void *fs_depth[PIPE_MAX_TEXTURE_TYPES];
+ void *fs_stencil[PIPE_MAX_TEXTURE_TYPES];
+
+ struct pipe_resource *vbuf; /**< quad vertices */
+ unsigned vbuf_slot;
+
+ float vertices[4][2][4]; /**< vertex/texcoords for quad */
+
+ boolean has_stencil_export;
+};
+
+
+/**
+ * Create state object for blit.
+ * Intended to be created once and re-used for many blit() calls.
+ */
+struct blit_state *
+util_create_blit(struct pipe_context *pipe, struct cso_context *cso)
+{
+ struct blit_state *ctx;
+ uint i;
+
+ ctx = CALLOC_STRUCT(blit_state);
+ if (!ctx)
+ return NULL;
+
+ ctx->pipe = pipe;
+ ctx->cso = cso;
+
+ /* disabled blending/masking */
+ ctx->blend_write_color.rt[0].colormask = PIPE_MASK_RGBA;
+
+ /* depth stencil states */
+ ctx->dsa_write_depth.depth.enabled = 1;
+ ctx->dsa_write_depth.depth.writemask = 1;
+ ctx->dsa_write_depth.depth.func = PIPE_FUNC_ALWAYS;
+ ctx->dsa_write_stencil.stencil[0].enabled = 1;
+ ctx->dsa_write_stencil.stencil[0].func = PIPE_FUNC_ALWAYS;
+ ctx->dsa_write_stencil.stencil[0].fail_op = PIPE_STENCIL_OP_REPLACE;
+ ctx->dsa_write_stencil.stencil[0].zpass_op = PIPE_STENCIL_OP_REPLACE;
+ ctx->dsa_write_stencil.stencil[0].zfail_op = PIPE_STENCIL_OP_REPLACE;
+ ctx->dsa_write_stencil.stencil[0].valuemask = 0xff;
+ ctx->dsa_write_stencil.stencil[0].writemask = 0xff;
+ ctx->dsa_write_depthstencil.depth = ctx->dsa_write_depth.depth;
+ ctx->dsa_write_depthstencil.stencil[0] = ctx->dsa_write_stencil.stencil[0];
+
+ /* rasterizer */
+ ctx->rasterizer.cull_face = PIPE_FACE_NONE;
+ ctx->rasterizer.half_pixel_center = 1;
+ ctx->rasterizer.bottom_edge_rule = 1;
+ ctx->rasterizer.depth_clip = 1;
+
+ /* samplers */
+ ctx->sampler.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
+ ctx->sampler.wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
+ ctx->sampler.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
+ ctx->sampler.min_mip_filter = PIPE_TEX_MIPFILTER_NONE;
+ ctx->sampler.min_img_filter = 0; /* set later */
+ ctx->sampler.mag_img_filter = 0; /* set later */
+
+ /* vertex elements state */
+ for (i = 0; i < 2; i++) {
+ ctx->velem[i].src_offset = i * 4 * sizeof(float);
+ ctx->velem[i].instance_divisor = 0;
+ ctx->velem[i].vertex_buffer_index = cso_get_aux_vertex_buffer_slot(cso);
+ ctx->velem[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
+ }
+
+ ctx->vbuf = NULL;
+
+ /* init vertex data that doesn't change */
+ for (i = 0; i < 4; i++) {
+ ctx->vertices[i][0][3] = 1.0f; /* w */
+ ctx->vertices[i][1][2] = 0.0f; /* r */
+ ctx->vertices[i][1][3] = 1.0f; /* q */
+ }
+
+ if(pipe->screen->get_param(pipe->screen, PIPE_CAP_NPOT_TEXTURES))
+ ctx->internal_target = PIPE_TEXTURE_2D;
+ else
+ ctx->internal_target = PIPE_TEXTURE_RECT;
+
+ ctx->has_stencil_export =
+ pipe->screen->get_param(pipe->screen, PIPE_CAP_SHADER_STENCIL_EXPORT);
+
+ return ctx;
+}
+
+
+/**
+ * Destroy a blit context
+ */
+void
+util_destroy_blit(struct blit_state *ctx)
+{
+ struct pipe_context *pipe = ctx->pipe;
+ unsigned i, j;
+
+ if (ctx->vs)
+ pipe->delete_vs_state(pipe, ctx->vs);
+
+ for (i = 0; i < Elements(ctx->fs); i++) {
+ for (j = 0; j < Elements(ctx->fs[i]); j++) {
+ if (ctx->fs[i][j])
+ pipe->delete_fs_state(pipe, ctx->fs[i][j]);
+ }
+ }
+
+ for (i = 0; i < PIPE_MAX_TEXTURE_TYPES; i++) {
+ if (ctx->fs_depthstencil[i]) {
+ pipe->delete_fs_state(pipe, ctx->fs_depthstencil[i]);
+ }
+ if (ctx->fs_depth[i]) {
+ pipe->delete_fs_state(pipe, ctx->fs_depth[i]);
+ }
+ if (ctx->fs_stencil[i]) {
+ pipe->delete_fs_state(pipe, ctx->fs_stencil[i]);
+ }
+ }
+
+ pipe_resource_reference(&ctx->vbuf, NULL);
+
+ FREE(ctx);
+}
+
+
+/**
+ * Helper function to set the fragment shaders.
+ */
+static INLINE void
+set_fragment_shader(struct blit_state *ctx, uint writemask,
+ enum pipe_texture_target pipe_tex)
+{
+ if (!ctx->fs[pipe_tex][writemask]) {
+ unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(pipe_tex, 0);
+
+ ctx->fs[pipe_tex][writemask] =
+ util_make_fragment_tex_shader_writemask(ctx->pipe, tgsi_tex,
+ TGSI_INTERPOLATE_LINEAR,
+ writemask);
+ }
+
+ cso_set_fragment_shader_handle(ctx->cso, ctx->fs[pipe_tex][writemask]);
+}
+
+
+/**
+ * Helper function to set the shader which writes depth and stencil.
+ */
+static INLINE void
+set_depthstencil_fragment_shader(struct blit_state *ctx,
+ enum pipe_texture_target pipe_tex)
+{
+ if (!ctx->fs_depthstencil[pipe_tex]) {
+ unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(pipe_tex, 0);
+
+ ctx->fs_depthstencil[pipe_tex] =
+ util_make_fragment_tex_shader_writedepthstencil(ctx->pipe, tgsi_tex,
+ TGSI_INTERPOLATE_LINEAR);
+ }
+
+ cso_set_fragment_shader_handle(ctx->cso, ctx->fs_depthstencil[pipe_tex]);
+}
+
+
+/**
+ * Helper function to set the shader which writes depth.
+ */
+static INLINE void
+set_depth_fragment_shader(struct blit_state *ctx,
+ enum pipe_texture_target pipe_tex)
+{
+ if (!ctx->fs_depth[pipe_tex]) {
+ unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(pipe_tex, 0);
+
+ ctx->fs_depth[pipe_tex] =
+ util_make_fragment_tex_shader_writedepth(ctx->pipe, tgsi_tex,
+ TGSI_INTERPOLATE_LINEAR);
+ }
+
+ cso_set_fragment_shader_handle(ctx->cso, ctx->fs_depth[pipe_tex]);
+}
+
+
+/**
+ * Helper function to set the shader which writes stencil.
+ */
+static INLINE void
+set_stencil_fragment_shader(struct blit_state *ctx,
+ enum pipe_texture_target pipe_tex)
+{
+ if (!ctx->fs_stencil[pipe_tex]) {
+ unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(pipe_tex, 0);
+
+ ctx->fs_stencil[pipe_tex] =
+ util_make_fragment_tex_shader_writestencil(ctx->pipe, tgsi_tex,
+ TGSI_INTERPOLATE_LINEAR);
+ }
+
+ cso_set_fragment_shader_handle(ctx->cso, ctx->fs_stencil[pipe_tex]);
+}
+
+
+/**
+ * Helper function to set the vertex shader.
+ */
+static INLINE void
+set_vertex_shader(struct blit_state *ctx)
+{
+ /* vertex shader - still required to provide the linkage between
+ * fragment shader input semantics and vertex_element/buffers.
+ */
+ if (!ctx->vs) {
+ const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
+ TGSI_SEMANTIC_GENERIC };
+ const uint semantic_indexes[] = { 0, 0 };
+ ctx->vs = util_make_vertex_passthrough_shader(ctx->pipe, 2,
+ semantic_names,
+ semantic_indexes);
+ }
+
+ cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
+}
+
+
+/**
+ * Get offset of next free slot in vertex buffer for quad vertices.
+ */
+static unsigned
+get_next_slot( struct blit_state *ctx )
+{
+ const unsigned max_slots = 4096 / sizeof ctx->vertices;
+
+ if (ctx->vbuf_slot >= max_slots) {
+ pipe_resource_reference(&ctx->vbuf, NULL);
+ ctx->vbuf_slot = 0;
+ }
+
+ if (!ctx->vbuf) {
+ ctx->vbuf = pipe_buffer_create(ctx->pipe->screen,
+ PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STREAM,
+ max_slots * sizeof ctx->vertices);
+ }
+
+ return ctx->vbuf_slot++ * sizeof ctx->vertices;
+}
+
+
+
+
+/**
+ * Setup vertex data for the textured quad we'll draw.
+ * Note: y=0=top
+ */
+static unsigned
+setup_vertex_data_tex(struct blit_state *ctx,
+ float x0, float y0, float x1, float y1,
+ float s0, float t0, float s1, float t1,
+ float z)
+{
+ unsigned offset;
+
+ ctx->vertices[0][0][0] = x0;
+ ctx->vertices[0][0][1] = y0;
+ ctx->vertices[0][0][2] = z;
+ ctx->vertices[0][1][0] = s0; /*s*/
+ ctx->vertices[0][1][1] = t0; /*t*/
+
+ ctx->vertices[1][0][0] = x1;
+ ctx->vertices[1][0][1] = y0;
+ ctx->vertices[1][0][2] = z;
+ ctx->vertices[1][1][0] = s1; /*s*/
+ ctx->vertices[1][1][1] = t0; /*t*/
+
+ ctx->vertices[2][0][0] = x1;
+ ctx->vertices[2][0][1] = y1;
+ ctx->vertices[2][0][2] = z;
+ ctx->vertices[2][1][0] = s1;
+ ctx->vertices[2][1][1] = t1;
+
+ ctx->vertices[3][0][0] = x0;
+ ctx->vertices[3][0][1] = y1;
+ ctx->vertices[3][0][2] = z;
+ ctx->vertices[3][1][0] = s0;
+ ctx->vertices[3][1][1] = t1;
+
+ offset = get_next_slot( ctx );
+
+ if (ctx->vbuf) {
+ pipe_buffer_write_nooverlap(ctx->pipe, ctx->vbuf,
+ offset, sizeof(ctx->vertices), ctx->vertices);
+ }
+
+ return offset;
+}
+
+
+/**
+ * \return TRUE if two regions overlap, FALSE otherwise
+ */
+static boolean
+regions_overlap(int srcX0, int srcY0,
+ int srcX1, int srcY1,
+ int dstX0, int dstY0,
+ int dstX1, int dstY1)
+{
+ if (MAX2(srcX0, srcX1) < MIN2(dstX0, dstX1))
+ return FALSE; /* src completely left of dst */
+
+ if (MAX2(dstX0, dstX1) < MIN2(srcX0, srcX1))
+ return FALSE; /* dst completely left of src */
+
+ if (MAX2(srcY0, srcY1) < MIN2(dstY0, dstY1))
+ return FALSE; /* src completely above dst */
+
+ if (MAX2(dstY0, dstY1) < MIN2(srcY0, srcY1))
+ return FALSE; /* dst completely above src */
+
+ return TRUE; /* some overlap */
+}
+
+
+/**
+ * Can we blit from src format to dest format with a simple copy?
+ */
+static boolean
+formats_compatible(enum pipe_format src_format,
+ enum pipe_format dst_format)
+{
+ if (src_format == dst_format) {
+ return TRUE;
+ }
+ else {
+ const struct util_format_description *src_desc =
+ util_format_description(src_format);
+ const struct util_format_description *dst_desc =
+ util_format_description(dst_format);
+ return util_is_format_compatible(src_desc, dst_desc);
+ }
+}
+
+
+/**
+ * Copy pixel block from src surface to dst surface.
+ * Overlapping regions are acceptable.
+ * Flipping and stretching are supported.
+ * \param filter one of PIPE_TEX_MIPFILTER_NEAREST/LINEAR
+ * \param writemask controls which channels in the dest surface are sourced
+ * from the src surface. Disabled channels are sourced
+ * from (0,0,0,1).
+ */
+void
+util_blit_pixels(struct blit_state *ctx,
+ struct pipe_resource *src_tex,
+ unsigned src_level,
+ int srcX0, int srcY0,
+ int srcX1, int srcY1,
+ int srcZ0,
+ struct pipe_surface *dst,
+ int dstX0, int dstY0,
+ int dstX1, int dstY1,
+ float z, uint filter,
+ uint writemask, uint zs_writemask)
+{
+ struct pipe_context *pipe = ctx->pipe;
+ struct pipe_screen *screen = pipe->screen;
+ enum pipe_format src_format, dst_format;
+ struct pipe_sampler_view *sampler_view = NULL;
+ struct pipe_sampler_view sv_templ;
+ struct pipe_surface *dst_surface;
+ struct pipe_framebuffer_state fb;
+ const int srcW = abs(srcX1 - srcX0);
+ const int srcH = abs(srcY1 - srcY0);
+ unsigned offset;
+ boolean overlap;
+ float s0, t0, s1, t1;
+ boolean normalized;
+ boolean is_stencil, is_depth, blit_depth, blit_stencil;
+ const struct util_format_description *src_desc =
+ util_format_description(src_tex->format);
+
+ assert(filter == PIPE_TEX_MIPFILTER_NEAREST ||
+ filter == PIPE_TEX_MIPFILTER_LINEAR);
+
+ assert(src_level <= src_tex->last_level);
+
+ /* do the regions overlap? */
+ overlap = src_tex == dst->texture &&
+ dst->u.tex.level == src_level &&
+ dst->u.tex.first_layer == srcZ0 &&
+ regions_overlap(srcX0, srcY0, srcX1, srcY1,
+ dstX0, dstY0, dstX1, dstY1);
+
+ src_format = util_format_linear(src_tex->format);
+ dst_format = util_format_linear(dst->texture->format);
+
+ /* See whether we will blit depth or stencil. */
+ is_depth = util_format_has_depth(src_desc);
+ is_stencil = util_format_has_stencil(src_desc);
+
+ blit_depth = is_depth && (zs_writemask & BLIT_WRITEMASK_Z);
+ blit_stencil = is_stencil && (zs_writemask & BLIT_WRITEMASK_STENCIL);
+
+ assert((writemask && !zs_writemask && !is_depth && !is_stencil) ||
+ (!writemask && (blit_depth || blit_stencil)));
+
+ /*
+ * Check for simple case: no format conversion, no flipping, no stretching,
+ * no overlapping, same number of samples.
+ * Filter mode should not matter since there's no stretching.
+ */
+ if (formats_compatible(src_format, dst_format) &&
+ src_tex->nr_samples == dst->texture->nr_samples &&
+ is_stencil == blit_stencil &&
+ is_depth == blit_depth &&
+ srcX0 < srcX1 &&
+ dstX0 < dstX1 &&
+ srcY0 < srcY1 &&
+ dstY0 < dstY1 &&
+ (dstX1 - dstX0) == (srcX1 - srcX0) &&
+ (dstY1 - dstY0) == (srcY1 - srcY0) &&
+ !overlap) {
+ struct pipe_box src_box;
+ src_box.x = srcX0;
+ src_box.y = srcY0;
+ src_box.z = srcZ0;
+ src_box.width = srcW;
+ src_box.height = srcH;
+ src_box.depth = 1;
+ pipe->resource_copy_region(pipe,
+ dst->texture, dst->u.tex.level,
+ dstX0, dstY0, dst->u.tex.first_layer,/* dest */
+ src_tex, src_level,
+ &src_box);
+ return;
+ }
+
+ /* XXX Reading multisample textures is unimplemented. */
+ assert(src_tex->nr_samples <= 1);
+ if (src_tex->nr_samples > 1) {
+ return;
+ }
+
+ /* It's a mistake to call this function with a stencil format and
+ * without shader stencil export. We don't do software fallbacks here.
+ * Ignore stencil and only copy depth.
+ */
+ if (blit_stencil && !ctx->has_stencil_export) {
+ blit_stencil = FALSE;
+
+ if (!blit_depth)
+ return;
+ }
+
+ if (dst_format == dst->format) {
+ dst_surface = dst;
+ } else {
+ struct pipe_surface templ = *dst;
+ templ.format = dst_format;
+ dst_surface = pipe->create_surface(pipe, dst->texture, &templ);
+ }
+
+ /* Create a temporary texture when src and dest alias.
+ */
+ if (src_tex == dst_surface->texture &&
+ dst_surface->u.tex.level == src_level &&
+ dst_surface->u.tex.first_layer == srcZ0) {
+ /* Make a temporary texture which contains a copy of the source pixels.
+ * Then we'll sample from the temporary texture.
+ */
+ struct pipe_resource texTemp;
+ struct pipe_resource *tex;
+ struct pipe_sampler_view sv_templ;
+ struct pipe_box src_box;
+ const int srcLeft = MIN2(srcX0, srcX1);
+ const int srcTop = MIN2(srcY0, srcY1);
+
+ if (srcLeft != srcX0) {
+ /* left-right flip */
+ int tmp = dstX0;
+ dstX0 = dstX1;
+ dstX1 = tmp;
+ }
+
+ if (srcTop != srcY0) {
+ /* up-down flip */
+ int tmp = dstY0;
+ dstY0 = dstY1;
+ dstY1 = tmp;
+ }
+
+ /* create temp texture */
+ memset(&texTemp, 0, sizeof(texTemp));
+ texTemp.target = ctx->internal_target;
+ texTemp.format = src_format;
+ texTemp.last_level = 0;
+ texTemp.width0 = srcW;
+ texTemp.height0 = srcH;
+ texTemp.depth0 = 1;
+ texTemp.array_size = 1;
+ texTemp.bind = PIPE_BIND_SAMPLER_VIEW;
+
+ tex = screen->resource_create(screen, &texTemp);
+ if (!tex)
+ return;
+
+ src_box.x = srcLeft;
+ src_box.y = srcTop;
+ src_box.z = srcZ0;
+ src_box.width = srcW;
+ src_box.height = srcH;
+ src_box.depth = 1;
+ /* load temp texture */
+ pipe->resource_copy_region(pipe,
+ tex, 0, 0, 0, 0, /* dest */
+ src_tex, src_level, &src_box);
+
+ normalized = tex->target != PIPE_TEXTURE_RECT;
+ if(normalized) {
+ s0 = 0.0f;
+ s1 = 1.0f;
+ t0 = 0.0f;
+ t1 = 1.0f;
+ }
+ else {
+ s0 = 0.0f;
+ s1 = (float) srcW;
+ t0 = 0.0f;
+ t1 = (float) srcH;
+ }
+
+ u_sampler_view_default_template(&sv_templ, tex, tex->format);
+ if (!blit_depth && blit_stencil) {
+ /* set a stencil-only format, e.g. Z24S8 --> X24S8 */
+ sv_templ.format = util_format_stencil_only(tex->format);
+ assert(sv_templ.format != PIPE_FORMAT_NONE);
+ }
+ sampler_view = pipe->create_sampler_view(pipe, tex, &sv_templ);
+
+ if (!sampler_view) {
+ pipe_resource_reference(&tex, NULL);
+ return;
+ }
+ pipe_resource_reference(&tex, NULL);
+ }
+ else {
+ /* Directly sample from the source resource/texture */
+ u_sampler_view_default_template(&sv_templ, src_tex, src_format);
+ if (!blit_depth && blit_stencil) {
+ /* set a stencil-only format, e.g. Z24S8 --> X24S8 */
+ sv_templ.format = util_format_stencil_only(src_format);
+ assert(sv_templ.format != PIPE_FORMAT_NONE);
+ }
+ sampler_view = pipe->create_sampler_view(pipe, src_tex, &sv_templ);
+
+ if (!sampler_view) {
+ return;
+ }
+
+ s0 = (float) srcX0;
+ s1 = (float) srcX1;
+ t0 = (float) srcY0;
+ t1 = (float) srcY1;
+ normalized = sampler_view->texture->target != PIPE_TEXTURE_RECT;
+ if(normalized)
+ {
+ s0 /= (float)(u_minify(sampler_view->texture->width0, src_level));
+ s1 /= (float)(u_minify(sampler_view->texture->width0, src_level));
+ t0 /= (float)(u_minify(sampler_view->texture->height0, src_level));
+ t1 /= (float)(u_minify(sampler_view->texture->height0, src_level));
+ }
+ }
+
+ assert(screen->is_format_supported(screen, sampler_view->format,
+ ctx->internal_target, sampler_view->texture->nr_samples,
+ PIPE_BIND_SAMPLER_VIEW));
+ assert(screen->is_format_supported(screen, dst_format, ctx->internal_target,
+ dst_surface->texture->nr_samples,
+ is_depth || is_stencil ? PIPE_BIND_DEPTH_STENCIL :
+ PIPE_BIND_RENDER_TARGET));
+
+ /* save state (restored below) */
+ cso_save_blend(ctx->cso);
+ cso_save_depth_stencil_alpha(ctx->cso);
+ cso_save_rasterizer(ctx->cso);
+ cso_save_sample_mask(ctx->cso);
+ cso_save_samplers(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_save_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_save_stream_outputs(ctx->cso);
+ cso_save_viewport(ctx->cso);
+ cso_save_framebuffer(ctx->cso);
+ cso_save_fragment_shader(ctx->cso);
+ cso_save_vertex_shader(ctx->cso);
+ cso_save_geometry_shader(ctx->cso);
+ cso_save_vertex_elements(ctx->cso);
+ cso_save_aux_vertex_buffer_slot(ctx->cso);
+ cso_save_render_condition(ctx->cso);
+
+ /* set misc state we care about */
+ if (writemask)
+ cso_set_blend(ctx->cso, &ctx->blend_write_color);
+ else
+ cso_set_blend(ctx->cso, &ctx->blend_keep_color);
+
+ cso_set_sample_mask(ctx->cso, ~0);
+ cso_set_rasterizer(ctx->cso, &ctx->rasterizer);
+ cso_set_vertex_elements(ctx->cso, 2, ctx->velem);
+ cso_set_stream_outputs(ctx->cso, 0, NULL, 0);
+ cso_set_render_condition(ctx->cso, NULL, FALSE, 0);
+
+ /* default sampler state */
+ ctx->sampler.normalized_coords = normalized;
+ ctx->sampler.min_img_filter = filter;
+ ctx->sampler.mag_img_filter = filter;
+ ctx->sampler.min_lod = (float) src_level;
+ ctx->sampler.max_lod = (float) src_level;
+
+ /* Depth stencil state, fragment shader and sampler setup depending on what
+ * we blit.
+ */
+ if (blit_depth && blit_stencil) {
+ cso_single_sampler(ctx->cso, PIPE_SHADER_FRAGMENT, 0, &ctx->sampler);
+ /* don't filter stencil */
+ ctx->sampler.min_img_filter = PIPE_TEX_FILTER_NEAREST;
+ ctx->sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST;
+ cso_single_sampler(ctx->cso, PIPE_SHADER_FRAGMENT, 1, &ctx->sampler);
+
+ cso_set_depth_stencil_alpha(ctx->cso, &ctx->dsa_write_depthstencil);
+ set_depthstencil_fragment_shader(ctx, sampler_view->texture->target);
+ }
+ else if (blit_depth) {
+ cso_single_sampler(ctx->cso, PIPE_SHADER_FRAGMENT, 0, &ctx->sampler);
+ cso_set_depth_stencil_alpha(ctx->cso, &ctx->dsa_write_depth);
+ set_depth_fragment_shader(ctx, sampler_view->texture->target);
+ }
+ else if (blit_stencil) {
+ /* don't filter stencil */
+ ctx->sampler.min_img_filter = PIPE_TEX_FILTER_NEAREST;
+ ctx->sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST;
+ cso_single_sampler(ctx->cso, PIPE_SHADER_FRAGMENT, 0, &ctx->sampler);
+
+ cso_set_depth_stencil_alpha(ctx->cso, &ctx->dsa_write_stencil);
+ set_stencil_fragment_shader(ctx, sampler_view->texture->target);
+ }
+ else { /* color */
+ cso_single_sampler(ctx->cso, PIPE_SHADER_FRAGMENT, 0, &ctx->sampler);
+ cso_set_depth_stencil_alpha(ctx->cso, &ctx->dsa_keep_depthstencil);
+ set_fragment_shader(ctx, writemask, sampler_view->texture->target);
+ }
+ cso_single_sampler_done(ctx->cso, PIPE_SHADER_FRAGMENT);
+
+ /* textures */
+ if (blit_depth && blit_stencil) {
+ /* Setup two samplers, one for depth and the other one for stencil. */
+ struct pipe_sampler_view templ;
+ struct pipe_sampler_view *views[2];
+
+ templ = *sampler_view;
+ templ.format = util_format_stencil_only(templ.format);
+ assert(templ.format != PIPE_FORMAT_NONE);
+
+ views[0] = sampler_view;
+ views[1] = pipe->create_sampler_view(pipe, views[0]->texture, &templ);
+ cso_set_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT, 2, views);
+
+ pipe_sampler_view_reference(&views[1], NULL);
+ }
+ else {
+ cso_set_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT, 1, &sampler_view);
+ }
+
+ /* viewport */
+ ctx->viewport.scale[0] = 0.5f * dst_surface->width;
+ ctx->viewport.scale[1] = 0.5f * dst_surface->height;
+ ctx->viewport.scale[2] = 0.5f;
+ ctx->viewport.scale[3] = 1.0f;
+ ctx->viewport.translate[0] = 0.5f * dst_surface->width;
+ ctx->viewport.translate[1] = 0.5f * dst_surface->height;
+ ctx->viewport.translate[2] = 0.5f;
+ ctx->viewport.translate[3] = 0.0f;
+ cso_set_viewport(ctx->cso, &ctx->viewport);
+
+ set_vertex_shader(ctx);
+ cso_set_geometry_shader_handle(ctx->cso, NULL);
+
+ /* drawing dest */
+ memset(&fb, 0, sizeof(fb));
+ fb.width = dst_surface->width;
+ fb.height = dst_surface->height;
+ if (blit_depth || blit_stencil) {
+ fb.zsbuf = dst_surface;
+ } else {
+ fb.nr_cbufs = 1;
+ fb.cbufs[0] = dst_surface;
+ }
+ cso_set_framebuffer(ctx->cso, &fb);
+
+ /* draw quad */
+ offset = setup_vertex_data_tex(ctx,
+ (float) dstX0 / dst_surface->width * 2.0f - 1.0f,
+ (float) dstY0 / dst_surface->height * 2.0f - 1.0f,
+ (float) dstX1 / dst_surface->width * 2.0f - 1.0f,
+ (float) dstY1 / dst_surface->height * 2.0f - 1.0f,
+ s0, t0,
+ s1, t1,
+ z);
+
+ if (ctx->vbuf) {
+ util_draw_vertex_buffer(ctx->pipe, ctx->cso, ctx->vbuf,
+ cso_get_aux_vertex_buffer_slot(ctx->cso),
+ offset,
+ PIPE_PRIM_TRIANGLE_FAN,
+ 4, /* verts */
+ 2); /* attribs/vert */
+ }
+
+ /* restore state we changed */
+ cso_restore_blend(ctx->cso);
+ cso_restore_depth_stencil_alpha(ctx->cso);
+ cso_restore_rasterizer(ctx->cso);
+ cso_restore_sample_mask(ctx->cso);
+ cso_restore_samplers(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_restore_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_restore_viewport(ctx->cso);
+ cso_restore_framebuffer(ctx->cso);
+ cso_restore_fragment_shader(ctx->cso);
+ cso_restore_vertex_shader(ctx->cso);
+ cso_restore_geometry_shader(ctx->cso);
+ cso_restore_vertex_elements(ctx->cso);
+ cso_restore_aux_vertex_buffer_slot(ctx->cso);
+ cso_restore_stream_outputs(ctx->cso);
+ cso_restore_render_condition(ctx->cso);
+
+ pipe_sampler_view_reference(&sampler_view, NULL);
+ if (dst_surface != dst)
+ pipe_surface_reference(&dst_surface, NULL);
+}
+
+
+/**
+ * Copy pixel block from src texture to dst surface.
+ * The sampler view's first_level field indicates the source
+ * mipmap level to use.
+ * XXX need some control over blitting Z and/or stencil.
+ */
+void
+util_blit_pixels_tex(struct blit_state *ctx,
+ struct pipe_sampler_view *src_sampler_view,
+ int srcX0, int srcY0,
+ int srcX1, int srcY1,
+ struct pipe_surface *dst,
+ int dstX0, int dstY0,
+ int dstX1, int dstY1,
+ float z, uint filter)
+{
+ boolean normalized = src_sampler_view->texture->target != PIPE_TEXTURE_RECT;
+ struct pipe_framebuffer_state fb;
+ float s0, t0, s1, t1;
+ unsigned offset;
+ struct pipe_resource *tex = src_sampler_view->texture;
+
+ assert(filter == PIPE_TEX_MIPFILTER_NEAREST ||
+ filter == PIPE_TEX_MIPFILTER_LINEAR);
+
+ assert(tex);
+ assert(tex->width0 != 0);
+ assert(tex->height0 != 0);
+
+ s0 = (float) srcX0;
+ s1 = (float) srcX1;
+ t0 = (float) srcY0;
+ t1 = (float) srcY1;
+
+ if(normalized)
+ {
+ /* normalize according to the mipmap level's size */
+ int level = src_sampler_view->u.tex.first_level;
+ float w = (float) u_minify(tex->width0, level);
+ float h = (float) u_minify(tex->height0, level);
+ s0 /= w;
+ s1 /= w;
+ t0 /= h;
+ t1 /= h;
+ }
+
+ assert(ctx->pipe->screen->is_format_supported(ctx->pipe->screen, dst->format,
+ PIPE_TEXTURE_2D,
+ dst->texture->nr_samples,
+ PIPE_BIND_RENDER_TARGET));
+
+ /* save state (restored below) */
+ cso_save_blend(ctx->cso);
+ cso_save_depth_stencil_alpha(ctx->cso);
+ cso_save_rasterizer(ctx->cso);
+ cso_save_sample_mask(ctx->cso);
+ cso_save_samplers(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_save_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_save_stream_outputs(ctx->cso);
+ cso_save_viewport(ctx->cso);
+ cso_save_framebuffer(ctx->cso);
+ cso_save_fragment_shader(ctx->cso);
+ cso_save_vertex_shader(ctx->cso);
+ cso_save_geometry_shader(ctx->cso);
+ cso_save_vertex_elements(ctx->cso);
+ cso_save_aux_vertex_buffer_slot(ctx->cso);
+
+ /* set misc state we care about */
+ cso_set_blend(ctx->cso, &ctx->blend_write_color);
+ cso_set_depth_stencil_alpha(ctx->cso, &ctx->dsa_keep_depthstencil);
+ cso_set_sample_mask(ctx->cso, ~0);
+ cso_set_rasterizer(ctx->cso, &ctx->rasterizer);
+ cso_set_vertex_elements(ctx->cso, 2, ctx->velem);
+ cso_set_stream_outputs(ctx->cso, 0, NULL, 0);
+
+ /* sampler */
+ ctx->sampler.normalized_coords = normalized;
+ ctx->sampler.min_img_filter = filter;
+ ctx->sampler.mag_img_filter = filter;
+ cso_single_sampler(ctx->cso, PIPE_SHADER_FRAGMENT, 0, &ctx->sampler);
+ cso_single_sampler_done(ctx->cso, PIPE_SHADER_FRAGMENT);
+
+ /* viewport */
+ ctx->viewport.scale[0] = 0.5f * dst->width;
+ ctx->viewport.scale[1] = 0.5f * dst->height;
+ ctx->viewport.scale[2] = 0.5f;
+ ctx->viewport.scale[3] = 1.0f;
+ ctx->viewport.translate[0] = 0.5f * dst->width;
+ ctx->viewport.translate[1] = 0.5f * dst->height;
+ ctx->viewport.translate[2] = 0.5f;
+ ctx->viewport.translate[3] = 0.0f;
+ cso_set_viewport(ctx->cso, &ctx->viewport);
+
+ /* texture */
+ cso_set_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT, 1, &src_sampler_view);
+
+ /* shaders */
+ set_fragment_shader(ctx, TGSI_WRITEMASK_XYZW,
+ src_sampler_view->texture->target);
+ set_vertex_shader(ctx);
+ cso_set_geometry_shader_handle(ctx->cso, NULL);
+
+ /* drawing dest */
+ memset(&fb, 0, sizeof(fb));
+ fb.width = dst->width;
+ fb.height = dst->height;
+ fb.nr_cbufs = 1;
+ fb.cbufs[0] = dst;
+ cso_set_framebuffer(ctx->cso, &fb);
+
+ /* draw quad */
+ offset = setup_vertex_data_tex(ctx,
+ (float) dstX0 / dst->width * 2.0f - 1.0f,
+ (float) dstY0 / dst->height * 2.0f - 1.0f,
+ (float) dstX1 / dst->width * 2.0f - 1.0f,
+ (float) dstY1 / dst->height * 2.0f - 1.0f,
+ s0, t0, s1, t1,
+ z);
+
+ util_draw_vertex_buffer(ctx->pipe, ctx->cso, ctx->vbuf,
+ cso_get_aux_vertex_buffer_slot(ctx->cso),
+ offset,
+ PIPE_PRIM_TRIANGLE_FAN,
+ 4, /* verts */
+ 2); /* attribs/vert */
+
+ /* restore state we changed */
+ cso_restore_blend(ctx->cso);
+ cso_restore_depth_stencil_alpha(ctx->cso);
+ cso_restore_rasterizer(ctx->cso);
+ cso_restore_sample_mask(ctx->cso);
+ cso_restore_samplers(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_restore_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_restore_viewport(ctx->cso);
+ cso_restore_framebuffer(ctx->cso);
+ cso_restore_fragment_shader(ctx->cso);
+ cso_restore_vertex_shader(ctx->cso);
+ cso_restore_geometry_shader(ctx->cso);
+ cso_restore_vertex_elements(ctx->cso);
+ cso_restore_aux_vertex_buffer_slot(ctx->cso);
+ cso_restore_stream_outputs(ctx->cso);
+}
diff --git a/src/minigallium/auxiliary/util/u_blit.h b/src/minigallium/auxiliary/util/u_blit.h
new file mode 100644
index 0000000..56ab030
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_blit.h
@@ -0,0 +1,85 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#ifndef U_BLIT_H
+#define U_BLIT_H
+
+
+#include "pipe/p_compiler.h"
+/* for TGSI_WRITEMASK_* specification in util_blit_pixels */
+#include "pipe/p_shader_tokens.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+struct cso_context;
+struct pipe_context;
+struct pipe_resource;
+struct pipe_sampler_view;
+struct pipe_surface;
+
+#define BLIT_WRITEMASK_Z 1
+#define BLIT_WRITEMASK_STENCIL 2
+
+extern struct blit_state *
+util_create_blit(struct pipe_context *pipe, struct cso_context *cso);
+
+extern void
+util_destroy_blit(struct blit_state *ctx);
+
+extern void
+util_blit_pixels(struct blit_state *ctx,
+ struct pipe_resource *src_tex,
+ unsigned src_level,
+ int srcX0, int srcY0,
+ int srcX1, int srcY1,
+ int srcZ0,
+ struct pipe_surface *dst,
+ int dstX0, int dstY0,
+ int dstX1, int dstY1,
+ float z, uint filter,
+ uint writemask, uint zs_writemask);
+
+extern void
+util_blit_pixels_tex(struct blit_state *ctx,
+ struct pipe_sampler_view *src_sampler_view,
+ int srcX0, int srcY0,
+ int srcX1, int srcY1,
+ struct pipe_surface *dst,
+ int dstX0, int dstY0,
+ int dstX1, int dstY1,
+ float z, uint filter);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_blitter.c b/src/minigallium/auxiliary/util/u_blitter.c
new file mode 100644
index 0000000..be839d4
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_blitter.c
@@ -0,0 +1,1877 @@
+/**************************************************************************
+ *
+ * Copyright 2009 Marek Olšák <maraeo@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Blitter utility to facilitate acceleration of the clear, clear_render_target,
+ * clear_depth_stencil, resource_copy_region, and blit functions.
+ *
+ * @author Marek Olšák
+ */
+
+#include "pipe/p_context.h"
+#include "pipe/p_defines.h"
+#include "util/u_inlines.h"
+#include "pipe/p_shader_tokens.h"
+#include "pipe/p_state.h"
+
+#include "util/u_format.h"
+#include "util/u_memory.h"
+#include "util/u_math.h"
+#include "util/u_blitter.h"
+#include "util/u_draw_quad.h"
+#include "util/u_sampler.h"
+#include "util/u_simple_shaders.h"
+#include "util/u_surface.h"
+#include "util/u_texture.h"
+#include "util/u_upload_mgr.h"
+
+#define INVALID_PTR ((void*)~0)
+
+struct blitter_context_priv
+{
+ struct blitter_context base;
+
+ struct u_upload_mgr *upload;
+
+ float vertices[4][2][4]; /**< {pos, color} or {pos, texcoord} */
+
+ /* Templates for various state objects. */
+
+ /* Constant state objects. */
+ /* Vertex shaders. */
+ void *vs; /**< Vertex shader which passes {pos, generic} to the output.*/
+ void *vs_pos_only; /**< Vertex shader which passes pos to the output.*/
+
+ /* Fragment shaders. */
+ void *fs_empty;
+ void *fs_write_one_cbuf;
+ void *fs_write_all_cbufs;
+
+ /* FS which outputs a color from a texture,
+ where the index is PIPE_TEXTURE_* to be sampled. */
+ void *fs_texfetch_col[PIPE_MAX_TEXTURE_TYPES];
+
+ /* FS which outputs a depth from a texture,
+ where the index is PIPE_TEXTURE_* to be sampled. */
+ void *fs_texfetch_depth[PIPE_MAX_TEXTURE_TYPES];
+ void *fs_texfetch_depthstencil[PIPE_MAX_TEXTURE_TYPES];
+ void *fs_texfetch_stencil[PIPE_MAX_TEXTURE_TYPES];
+
+ /* FS which outputs one sample from a multisample texture. */
+ void *fs_texfetch_col_msaa[PIPE_MAX_TEXTURE_TYPES];
+ void *fs_texfetch_depth_msaa[PIPE_MAX_TEXTURE_TYPES];
+ void *fs_texfetch_depthstencil_msaa[PIPE_MAX_TEXTURE_TYPES];
+ void *fs_texfetch_stencil_msaa[PIPE_MAX_TEXTURE_TYPES];
+
+ /* Blend state. */
+ void *blend[PIPE_MASK_RGBA+1]; /**< blend state with writemask */
+
+ /* Depth stencil alpha state. */
+ void *dsa_write_depth_stencil;
+ void *dsa_write_depth_keep_stencil;
+ void *dsa_keep_depth_stencil;
+ void *dsa_keep_depth_write_stencil;
+
+ /* Vertex elements states. */
+ void *velem_state;
+ void *velem_state_readbuf[4]; /**< X, XY, XYZ, XYZW */
+
+ /* Sampler state. */
+ void *sampler_state;
+ void *sampler_state_linear;
+ void *sampler_state_rect;
+ void *sampler_state_rect_linear;
+
+ /* Rasterizer state. */
+ void *rs_state, *rs_state_scissor, *rs_discard_state;
+
+ /* Viewport state. */
+ struct pipe_viewport_state viewport;
+
+ /* Destination surface dimensions. */
+ unsigned dst_width;
+ unsigned dst_height;
+
+ boolean has_geometry_shader;
+ boolean has_stream_out;
+ boolean has_stencil_export;
+ boolean has_texture_multisample;
+
+ /* The Draw module overrides these functions.
+ * Always create the blitter before Draw. */
+ void (*bind_fs_state)(struct pipe_context *, void *);
+ void (*delete_fs_state)(struct pipe_context *, void *);
+};
+
+static struct pipe_surface *
+util_blitter_get_next_surface_layer(struct pipe_context *pipe,
+ struct pipe_surface *surf);
+
+struct blitter_context *util_blitter_create(struct pipe_context *pipe)
+{
+ struct blitter_context_priv *ctx;
+ struct pipe_blend_state blend;
+ struct pipe_depth_stencil_alpha_state dsa;
+ struct pipe_rasterizer_state rs_state;
+ struct pipe_sampler_state sampler_state;
+ struct pipe_vertex_element velem[2];
+ unsigned i;
+
+ ctx = CALLOC_STRUCT(blitter_context_priv);
+ if (!ctx)
+ return NULL;
+
+ ctx->base.pipe = pipe;
+ ctx->base.draw_rectangle = util_blitter_draw_rectangle;
+ ctx->base.get_next_surface_layer = util_blitter_get_next_surface_layer;
+
+ ctx->bind_fs_state = pipe->bind_fs_state;
+ ctx->delete_fs_state = pipe->delete_fs_state;
+
+ /* init state objects for them to be considered invalid */
+ ctx->base.saved_blend_state = INVALID_PTR;
+ ctx->base.saved_dsa_state = INVALID_PTR;
+ ctx->base.saved_rs_state = INVALID_PTR;
+ ctx->base.saved_fs = INVALID_PTR;
+ ctx->base.saved_vs = INVALID_PTR;
+ ctx->base.saved_gs = INVALID_PTR;
+ ctx->base.saved_velem_state = INVALID_PTR;
+ ctx->base.saved_fb_state.nr_cbufs = ~0;
+ ctx->base.saved_num_sampler_views = ~0;
+ ctx->base.saved_num_sampler_states = ~0;
+ ctx->base.saved_num_so_targets = ~0;
+
+ ctx->has_geometry_shader =
+ pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_GEOMETRY,
+ PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0;
+ ctx->has_stream_out =
+ pipe->screen->get_param(pipe->screen,
+ PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS) != 0;
+
+ ctx->has_stencil_export =
+ pipe->screen->get_param(pipe->screen,
+ PIPE_CAP_SHADER_STENCIL_EXPORT);
+
+ ctx->has_texture_multisample =
+ pipe->screen->get_param(pipe->screen, PIPE_CAP_TEXTURE_MULTISAMPLE);
+
+ /* blend state objects */
+ memset(&blend, 0, sizeof(blend));
+
+ for (i = 0; i <= PIPE_MASK_RGBA; i++) {
+ blend.rt[0].colormask = i;
+ ctx->blend[i] = pipe->create_blend_state(pipe, &blend);
+ }
+
+ /* depth stencil alpha state objects */
+ memset(&dsa, 0, sizeof(dsa));
+ ctx->dsa_keep_depth_stencil =
+ pipe->create_depth_stencil_alpha_state(pipe, &dsa);
+
+ dsa.depth.enabled = 1;
+ dsa.depth.writemask = 1;
+ dsa.depth.func = PIPE_FUNC_ALWAYS;
+ ctx->dsa_write_depth_keep_stencil =
+ pipe->create_depth_stencil_alpha_state(pipe, &dsa);
+
+ dsa.stencil[0].enabled = 1;
+ dsa.stencil[0].func = PIPE_FUNC_ALWAYS;
+ dsa.stencil[0].fail_op = PIPE_STENCIL_OP_REPLACE;
+ dsa.stencil[0].zpass_op = PIPE_STENCIL_OP_REPLACE;
+ dsa.stencil[0].zfail_op = PIPE_STENCIL_OP_REPLACE;
+ dsa.stencil[0].valuemask = 0xff;
+ dsa.stencil[0].writemask = 0xff;
+ ctx->dsa_write_depth_stencil =
+ pipe->create_depth_stencil_alpha_state(pipe, &dsa);
+
+ dsa.depth.enabled = 0;
+ dsa.depth.writemask = 0;
+ ctx->dsa_keep_depth_write_stencil =
+ pipe->create_depth_stencil_alpha_state(pipe, &dsa);
+
+ /* sampler state */
+ memset(&sampler_state, 0, sizeof(sampler_state));
+ sampler_state.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
+ sampler_state.wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
+ sampler_state.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
+ sampler_state.normalized_coords = 1;
+ ctx->sampler_state = pipe->create_sampler_state(pipe, &sampler_state);
+ sampler_state.normalized_coords = 0;
+ ctx->sampler_state_rect = pipe->create_sampler_state(pipe, &sampler_state);
+
+ sampler_state.min_img_filter = PIPE_TEX_FILTER_LINEAR;
+ sampler_state.mag_img_filter = PIPE_TEX_FILTER_LINEAR;
+ sampler_state.normalized_coords = 1;
+ ctx->sampler_state_linear = pipe->create_sampler_state(pipe, &sampler_state);
+ sampler_state.normalized_coords = 0;
+ ctx->sampler_state_rect_linear = pipe->create_sampler_state(pipe, &sampler_state);
+
+ /* rasterizer state */
+ memset(&rs_state, 0, sizeof(rs_state));
+ rs_state.cull_face = PIPE_FACE_NONE;
+ rs_state.half_pixel_center = 1;
+ rs_state.bottom_edge_rule = 1;
+ rs_state.flatshade = 1;
+ rs_state.depth_clip = 1;
+ ctx->rs_state = pipe->create_rasterizer_state(pipe, &rs_state);
+
+ rs_state.scissor = 1;
+ ctx->rs_state_scissor = pipe->create_rasterizer_state(pipe, &rs_state);
+
+ if (ctx->has_stream_out) {
+ rs_state.scissor = 0;
+ rs_state.rasterizer_discard = 1;
+ ctx->rs_discard_state = pipe->create_rasterizer_state(pipe, &rs_state);
+ }
+
+ ctx->base.vb_slot = 0; /* 0 for now */
+
+ /* vertex elements states */
+ memset(&velem[0], 0, sizeof(velem[0]) * 2);
+ for (i = 0; i < 2; i++) {
+ velem[i].src_offset = i * 4 * sizeof(float);
+ velem[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
+ velem[i].vertex_buffer_index = ctx->base.vb_slot;
+ }
+ ctx->velem_state = pipe->create_vertex_elements_state(pipe, 2, &velem[0]);
+
+ if (ctx->has_stream_out) {
+ static enum pipe_format formats[4] = {
+ PIPE_FORMAT_R32_UINT,
+ PIPE_FORMAT_R32G32_UINT,
+ PIPE_FORMAT_R32G32B32_UINT,
+ PIPE_FORMAT_R32G32B32A32_UINT
+ };
+
+ for (i = 0; i < 4; i++) {
+ velem[0].src_format = formats[i];
+ velem[0].vertex_buffer_index = ctx->base.vb_slot;
+ ctx->velem_state_readbuf[i] =
+ pipe->create_vertex_elements_state(pipe, 1, &velem[0]);
+ }
+ }
+
+ /* Fragment shaders are created on-demand, except these.
+ * The interpolation must be constant for integer texture clearing to work.
+ */
+ ctx->fs_empty = util_make_empty_fragment_shader(pipe);
+ ctx->fs_write_one_cbuf =
+ util_make_fragment_passthrough_shader(pipe, TGSI_SEMANTIC_GENERIC,
+ TGSI_INTERPOLATE_CONSTANT, FALSE);
+ ctx->fs_write_all_cbufs =
+ util_make_fragment_passthrough_shader(pipe, TGSI_SEMANTIC_GENERIC,
+ TGSI_INTERPOLATE_CONSTANT, TRUE);
+
+ /* vertex shaders */
+ {
+ const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
+ TGSI_SEMANTIC_GENERIC };
+ const uint semantic_indices[] = { 0, 0 };
+ ctx->vs =
+ util_make_vertex_passthrough_shader(pipe, 2, semantic_names,
+ semantic_indices);
+ }
+ if (ctx->has_stream_out) {
+ struct pipe_stream_output_info so;
+ const uint semantic_names[] = { TGSI_SEMANTIC_POSITION };
+ const uint semantic_indices[] = { 0 };
+
+ memset(&so, 0, sizeof(so));
+ so.num_outputs = 1;
+ so.output[0].num_components = 1;
+ so.stride[0] = 1;
+
+ ctx->vs_pos_only =
+ util_make_vertex_passthrough_shader_with_so(pipe, 1, semantic_names,
+ semantic_indices, &so);
+ }
+
+ /* set invariant vertex coordinates */
+ for (i = 0; i < 4; i++)
+ ctx->vertices[i][0][3] = 1; /*v.w*/
+
+ ctx->upload = u_upload_create(pipe, 65536, 4, PIPE_BIND_VERTEX_BUFFER);
+
+ return &ctx->base;
+}
+
+void util_blitter_destroy(struct blitter_context *blitter)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_context *pipe = blitter->pipe;
+ int i;
+
+ for (i = 0; i <= PIPE_MASK_RGBA; i++) {
+ pipe->delete_blend_state(pipe, ctx->blend[i]);
+ }
+ pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
+ pipe->delete_depth_stencil_alpha_state(pipe,
+ ctx->dsa_write_depth_keep_stencil);
+ pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_stencil);
+ pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_write_stencil);
+
+ pipe->delete_rasterizer_state(pipe, ctx->rs_state);
+ pipe->delete_rasterizer_state(pipe, ctx->rs_state_scissor);
+ if (ctx->rs_discard_state)
+ pipe->delete_rasterizer_state(pipe, ctx->rs_discard_state);
+ pipe->delete_vs_state(pipe, ctx->vs);
+ if (ctx->vs_pos_only)
+ pipe->delete_vs_state(pipe, ctx->vs_pos_only);
+ pipe->delete_vertex_elements_state(pipe, ctx->velem_state);
+ for (i = 0; i < 4; i++) {
+ if (ctx->velem_state_readbuf[i]) {
+ pipe->delete_vertex_elements_state(pipe, ctx->velem_state_readbuf[i]);
+ }
+ }
+
+ for (i = 0; i < PIPE_MAX_TEXTURE_TYPES; i++) {
+ if (ctx->fs_texfetch_col[i])
+ ctx->delete_fs_state(pipe, ctx->fs_texfetch_col[i]);
+ if (ctx->fs_texfetch_depth[i])
+ ctx->delete_fs_state(pipe, ctx->fs_texfetch_depth[i]);
+ if (ctx->fs_texfetch_depthstencil[i])
+ ctx->delete_fs_state(pipe, ctx->fs_texfetch_depthstencil[i]);
+ if (ctx->fs_texfetch_stencil[i])
+ ctx->delete_fs_state(pipe, ctx->fs_texfetch_stencil[i]);
+ }
+ ctx->delete_fs_state(pipe, ctx->fs_empty);
+ ctx->delete_fs_state(pipe, ctx->fs_write_one_cbuf);
+ ctx->delete_fs_state(pipe, ctx->fs_write_all_cbufs);
+
+ pipe->delete_sampler_state(pipe, ctx->sampler_state_rect_linear);
+ pipe->delete_sampler_state(pipe, ctx->sampler_state_rect);
+ pipe->delete_sampler_state(pipe, ctx->sampler_state_linear);
+ pipe->delete_sampler_state(pipe, ctx->sampler_state);
+ u_upload_destroy(ctx->upload);
+ FREE(ctx);
+}
+
+void util_blitter_set_texture_multisample(struct blitter_context *blitter,
+ boolean supported)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+
+ ctx->has_texture_multisample = supported;
+}
+
+static void blitter_set_running_flag(struct blitter_context_priv *ctx)
+{
+ if (ctx->base.running) {
+ _debug_printf("u_blitter:%i: Caught recursion. This is a driver bug.\n",
+ __LINE__);
+ }
+ ctx->base.running = TRUE;
+}
+
+static void blitter_unset_running_flag(struct blitter_context_priv *ctx)
+{
+ if (!ctx->base.running) {
+ _debug_printf("u_blitter:%i: Caught recursion. This is a driver bug.\n",
+ __LINE__);
+ }
+ ctx->base.running = FALSE;
+}
+
+static void blitter_check_saved_vertex_states(struct blitter_context_priv *ctx)
+{
+ assert(ctx->base.saved_velem_state != INVALID_PTR);
+ assert(ctx->base.saved_vs != INVALID_PTR);
+ assert(!ctx->has_geometry_shader || ctx->base.saved_gs != INVALID_PTR);
+ assert(!ctx->has_stream_out || ctx->base.saved_num_so_targets != ~0);
+ assert(ctx->base.saved_rs_state != INVALID_PTR);
+}
+
+static void blitter_restore_vertex_states(struct blitter_context_priv *ctx)
+{
+ struct pipe_context *pipe = ctx->base.pipe;
+ unsigned i;
+
+ /* Vertex buffer. */
+ pipe->set_vertex_buffers(pipe, ctx->base.vb_slot, 1,
+ &ctx->base.saved_vertex_buffer);
+ pipe_resource_reference(&ctx->base.saved_vertex_buffer.buffer, NULL);
+
+ /* Vertex elements. */
+ pipe->bind_vertex_elements_state(pipe, ctx->base.saved_velem_state);
+ ctx->base.saved_velem_state = INVALID_PTR;
+
+ /* Vertex shader. */
+ pipe->bind_vs_state(pipe, ctx->base.saved_vs);
+ ctx->base.saved_vs = INVALID_PTR;
+
+ /* Geometry shader. */
+ if (ctx->has_geometry_shader) {
+ pipe->bind_gs_state(pipe, ctx->base.saved_gs);
+ ctx->base.saved_gs = INVALID_PTR;
+ }
+
+ /* Stream outputs. */
+ if (ctx->has_stream_out) {
+ pipe->set_stream_output_targets(pipe,
+ ctx->base.saved_num_so_targets,
+ ctx->base.saved_so_targets, ~0);
+
+ for (i = 0; i < ctx->base.saved_num_so_targets; i++)
+ pipe_so_target_reference(&ctx->base.saved_so_targets[i], NULL);
+
+ ctx->base.saved_num_so_targets = ~0;
+ }
+
+ /* Rasterizer. */
+ pipe->bind_rasterizer_state(pipe, ctx->base.saved_rs_state);
+ ctx->base.saved_rs_state = INVALID_PTR;
+}
+
+static void blitter_check_saved_fragment_states(struct blitter_context_priv *ctx)
+{
+ assert(ctx->base.saved_fs != INVALID_PTR);
+ assert(ctx->base.saved_dsa_state != INVALID_PTR);
+ assert(ctx->base.saved_blend_state != INVALID_PTR);
+}
+
+static void blitter_restore_fragment_states(struct blitter_context_priv *ctx)
+{
+ struct pipe_context *pipe = ctx->base.pipe;
+
+ /* Fragment shader. */
+ ctx->bind_fs_state(pipe, ctx->base.saved_fs);
+ ctx->base.saved_fs = INVALID_PTR;
+
+ /* Depth, stencil, alpha. */
+ pipe->bind_depth_stencil_alpha_state(pipe, ctx->base.saved_dsa_state);
+ ctx->base.saved_dsa_state = INVALID_PTR;
+
+ /* Blend state. */
+ pipe->bind_blend_state(pipe, ctx->base.saved_blend_state);
+ ctx->base.saved_blend_state = INVALID_PTR;
+
+ /* Sample mask. */
+ if (ctx->base.is_sample_mask_saved) {
+ pipe->set_sample_mask(pipe, ctx->base.saved_sample_mask);
+ ctx->base.is_sample_mask_saved = FALSE;
+ }
+
+ /* Miscellaneous states. */
+ /* XXX check whether these are saved and whether they need to be restored
+ * (depending on the operation) */
+ pipe->set_stencil_ref(pipe, &ctx->base.saved_stencil_ref);
+ pipe->set_viewport_states(pipe, 0, 1, &ctx->base.saved_viewport);
+}
+
+static void blitter_check_saved_fb_state(struct blitter_context_priv *ctx)
+{
+ assert(ctx->base.saved_fb_state.nr_cbufs != ~0);
+}
+
+static void blitter_disable_render_cond(struct blitter_context_priv *ctx)
+{
+ struct pipe_context *pipe = ctx->base.pipe;
+
+ if (ctx->base.saved_render_cond_query) {
+ pipe->render_condition(pipe, NULL, FALSE, 0);
+ }
+}
+
+static void blitter_restore_render_cond(struct blitter_context_priv *ctx)
+{
+ struct pipe_context *pipe = ctx->base.pipe;
+
+ if (ctx->base.saved_render_cond_query) {
+ pipe->render_condition(pipe, ctx->base.saved_render_cond_query,
+ ctx->base.saved_render_cond_cond,
+ ctx->base.saved_render_cond_mode);
+ ctx->base.saved_render_cond_query = NULL;
+ }
+}
+
+static void blitter_restore_fb_state(struct blitter_context_priv *ctx)
+{
+ struct pipe_context *pipe = ctx->base.pipe;
+
+ pipe->set_framebuffer_state(pipe, &ctx->base.saved_fb_state);
+ util_unreference_framebuffer_state(&ctx->base.saved_fb_state);
+}
+
+static void blitter_check_saved_textures(struct blitter_context_priv *ctx)
+{
+ assert(ctx->base.saved_num_sampler_states != ~0);
+ assert(ctx->base.saved_num_sampler_views != ~0);
+}
+
+static void blitter_restore_textures(struct blitter_context_priv *ctx)
+{
+ struct pipe_context *pipe = ctx->base.pipe;
+ unsigned i;
+
+ /* Fragment sampler states. */
+ pipe->bind_fragment_sampler_states(pipe,
+ ctx->base.saved_num_sampler_states,
+ ctx->base.saved_sampler_states);
+ ctx->base.saved_num_sampler_states = ~0;
+
+ /* Fragment sampler views. */
+ pipe->set_fragment_sampler_views(pipe,
+ ctx->base.saved_num_sampler_views,
+ ctx->base.saved_sampler_views);
+
+ for (i = 0; i < ctx->base.saved_num_sampler_views; i++)
+ pipe_sampler_view_reference(&ctx->base.saved_sampler_views[i], NULL);
+
+ ctx->base.saved_num_sampler_views = ~0;
+}
+
+static void blitter_set_rectangle(struct blitter_context_priv *ctx,
+ int x1, int y1, int x2, int y2,
+ float depth)
+{
+ int i;
+
+ /* set vertex positions */
+ ctx->vertices[0][0][0] = (float)x1 / ctx->dst_width * 2.0f - 1.0f; /*v0.x*/
+ ctx->vertices[0][0][1] = (float)y1 / ctx->dst_height * 2.0f - 1.0f; /*v0.y*/
+
+ ctx->vertices[1][0][0] = (float)x2 / ctx->dst_width * 2.0f - 1.0f; /*v1.x*/
+ ctx->vertices[1][0][1] = (float)y1 / ctx->dst_height * 2.0f - 1.0f; /*v1.y*/
+
+ ctx->vertices[2][0][0] = (float)x2 / ctx->dst_width * 2.0f - 1.0f; /*v2.x*/
+ ctx->vertices[2][0][1] = (float)y2 / ctx->dst_height * 2.0f - 1.0f; /*v2.y*/
+
+ ctx->vertices[3][0][0] = (float)x1 / ctx->dst_width * 2.0f - 1.0f; /*v3.x*/
+ ctx->vertices[3][0][1] = (float)y2 / ctx->dst_height * 2.0f - 1.0f; /*v3.y*/
+
+ for (i = 0; i < 4; i++)
+ ctx->vertices[i][0][2] = depth; /*z*/
+
+ /* viewport */
+ ctx->viewport.scale[0] = 0.5f * ctx->dst_width;
+ ctx->viewport.scale[1] = 0.5f * ctx->dst_height;
+ ctx->viewport.scale[2] = 1.0f;
+ ctx->viewport.scale[3] = 1.0f;
+ ctx->viewport.translate[0] = 0.5f * ctx->dst_width;
+ ctx->viewport.translate[1] = 0.5f * ctx->dst_height;
+ ctx->viewport.translate[2] = 0.0f;
+ ctx->viewport.translate[3] = 0.0f;
+ ctx->base.pipe->set_viewport_states(ctx->base.pipe, 0, 1, &ctx->viewport);
+}
+
+static void blitter_set_clear_color(struct blitter_context_priv *ctx,
+ const union pipe_color_union *color)
+{
+ int i;
+
+ if (color) {
+ for (i = 0; i < 4; i++) {
+ uint32_t *uiverts = (uint32_t *)ctx->vertices[i][1];
+ uiverts[0] = color->ui[0];
+ uiverts[1] = color->ui[1];
+ uiverts[2] = color->ui[2];
+ uiverts[3] = color->ui[3];
+ }
+ } else {
+ for (i = 0; i < 4; i++) {
+ ctx->vertices[i][1][0] = 0;
+ ctx->vertices[i][1][1] = 0;
+ ctx->vertices[i][1][2] = 0;
+ ctx->vertices[i][1][3] = 0;
+ }
+ }
+}
+
+static void get_texcoords(struct pipe_sampler_view *src,
+ unsigned src_width0, unsigned src_height0,
+ int x1, int y1, int x2, int y2,
+ float out[4])
+{
+ struct pipe_resource *tex = src->texture;
+ unsigned level = src->u.tex.first_level;
+ boolean normalized = tex->target != PIPE_TEXTURE_RECT &&
+ tex->nr_samples <= 1;
+
+ if (normalized) {
+ out[0] = x1 / (float)u_minify(src_width0, level);
+ out[1] = y1 / (float)u_minify(src_height0, level);
+ out[2] = x2 / (float)u_minify(src_width0, level);
+ out[3] = y2 / (float)u_minify(src_height0, level);
+ } else {
+ out[0] = (float) x1;
+ out[1] = (float) y1;
+ out[2] = (float) x2;
+ out[3] = (float) y2;
+ }
+}
+
+static void set_texcoords_in_vertices(const float coord[4],
+ float *out, unsigned stride)
+{
+ out[0] = coord[0]; /*t0.s*/
+ out[1] = coord[1]; /*t0.t*/
+ out += stride;
+ out[0] = coord[2]; /*t1.s*/
+ out[1] = coord[1]; /*t1.t*/
+ out += stride;
+ out[0] = coord[2]; /*t2.s*/
+ out[1] = coord[3]; /*t2.t*/
+ out += stride;
+ out[0] = coord[0]; /*t3.s*/
+ out[1] = coord[3]; /*t3.t*/
+}
+
+static void blitter_set_texcoords(struct blitter_context_priv *ctx,
+ struct pipe_sampler_view *src,
+ unsigned src_width0, unsigned src_height0,
+ unsigned layer, unsigned sample,
+ int x1, int y1, int x2, int y2)
+{
+ unsigned i;
+ float coord[4];
+ float face_coord[4][2];
+
+ get_texcoords(src, src_width0, src_height0, x1, y1, x2, y2, coord);
+
+ if (src->texture->target == PIPE_TEXTURE_CUBE ||
+ src->texture->target == PIPE_TEXTURE_CUBE_ARRAY) {
+ set_texcoords_in_vertices(coord, &face_coord[0][0], 2);
+ util_map_texcoords2d_onto_cubemap(layer % 6,
+ /* pointer, stride in floats */
+ &face_coord[0][0], 2,
+ &ctx->vertices[0][1][0], 8);
+ } else {
+ set_texcoords_in_vertices(coord, &ctx->vertices[0][1][0], 8);
+ }
+
+ /* Set the layer. */
+ switch (src->texture->target) {
+ case PIPE_TEXTURE_3D:
+ {
+ float r = layer / (float)u_minify(src->texture->depth0,
+ src->u.tex.first_level);
+ for (i = 0; i < 4; i++)
+ ctx->vertices[i][1][2] = r; /*r*/
+ }
+ break;
+
+ case PIPE_TEXTURE_1D_ARRAY:
+ for (i = 0; i < 4; i++)
+ ctx->vertices[i][1][1] = (float) layer; /*t*/
+ break;
+
+ case PIPE_TEXTURE_2D_ARRAY:
+ for (i = 0; i < 4; i++) {
+ ctx->vertices[i][1][2] = (float) layer; /*r*/
+ ctx->vertices[i][1][3] = (float) sample; /*q*/
+ }
+ break;
+
+ case PIPE_TEXTURE_CUBE_ARRAY:
+ for (i = 0; i < 4; i++)
+ ctx->vertices[i][1][3] = (float) (layer / 6); /*w*/
+ break;
+
+ case PIPE_TEXTURE_2D:
+ for (i = 0; i < 4; i++) {
+ ctx->vertices[i][1][3] = (float) sample; /*r*/
+ }
+ break;
+
+ default:;
+ }
+}
+
+static void blitter_set_dst_dimensions(struct blitter_context_priv *ctx,
+ unsigned width, unsigned height)
+{
+ ctx->dst_width = width;
+ ctx->dst_height = height;
+}
+
+static void *blitter_get_fs_texfetch_col(struct blitter_context_priv *ctx,
+ enum pipe_texture_target target,
+ unsigned nr_samples)
+{
+ struct pipe_context *pipe = ctx->base.pipe;
+
+ assert(target < PIPE_MAX_TEXTURE_TYPES);
+
+ if (nr_samples > 1) {
+ void **shader = &ctx->fs_texfetch_col_msaa[target];
+
+ /* Create the fragment shader on-demand. */
+ if (!*shader) {
+ unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target,
+ nr_samples);
+
+ *shader = util_make_fs_blit_msaa_color(pipe, tgsi_tex);
+ }
+
+ return *shader;
+ } else {
+ void **shader = &ctx->fs_texfetch_col[target];
+
+ /* Create the fragment shader on-demand. */
+ if (!*shader) {
+ unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target, 0);
+
+ *shader =
+ util_make_fragment_tex_shader(pipe, tgsi_tex,
+ TGSI_INTERPOLATE_LINEAR);
+ }
+
+ return *shader;
+ }
+}
+
+static INLINE
+void *blitter_get_fs_texfetch_depth(struct blitter_context_priv *ctx,
+ enum pipe_texture_target target,
+ unsigned nr_samples)
+{
+ struct pipe_context *pipe = ctx->base.pipe;
+
+ assert(target < PIPE_MAX_TEXTURE_TYPES);
+
+ if (nr_samples > 1) {
+ void **shader = &ctx->fs_texfetch_depth_msaa[target];
+
+ /* Create the fragment shader on-demand. */
+ if (!*shader) {
+ unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target,
+ nr_samples);
+
+ *shader =
+ util_make_fs_blit_msaa_depth(pipe, tgsi_tex);
+ }
+
+ return *shader;
+ } else {
+ void **shader = &ctx->fs_texfetch_depth[target];
+
+ /* Create the fragment shader on-demand. */
+ if (!*shader) {
+ unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target, 0);
+
+ *shader =
+ util_make_fragment_tex_shader_writedepth(pipe, tgsi_tex,
+ TGSI_INTERPOLATE_LINEAR);
+ }
+
+ return *shader;
+ }
+}
+
+static INLINE
+void *blitter_get_fs_texfetch_depthstencil(struct blitter_context_priv *ctx,
+ enum pipe_texture_target target,
+ unsigned nr_samples)
+{
+ struct pipe_context *pipe = ctx->base.pipe;
+
+ assert(target < PIPE_MAX_TEXTURE_TYPES);
+
+ if (nr_samples > 1) {
+ void **shader = &ctx->fs_texfetch_depthstencil_msaa[target];
+
+ /* Create the fragment shader on-demand. */
+ if (!*shader) {
+ unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target,
+ nr_samples);
+
+ *shader =
+ util_make_fs_blit_msaa_depthstencil(pipe, tgsi_tex);
+ }
+
+ return *shader;
+ } else {
+ void **shader = &ctx->fs_texfetch_depthstencil[target];
+
+ /* Create the fragment shader on-demand. */
+ if (!*shader) {
+ unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target, 0);
+
+ *shader =
+ util_make_fragment_tex_shader_writedepthstencil(pipe, tgsi_tex,
+ TGSI_INTERPOLATE_LINEAR);
+ }
+
+ return *shader;
+ }
+}
+
+static INLINE
+void *blitter_get_fs_texfetch_stencil(struct blitter_context_priv *ctx,
+ enum pipe_texture_target target,
+ unsigned nr_samples)
+{
+ struct pipe_context *pipe = ctx->base.pipe;
+
+ assert(target < PIPE_MAX_TEXTURE_TYPES);
+
+ if (nr_samples > 1) {
+ void **shader = &ctx->fs_texfetch_stencil_msaa[target];
+
+ /* Create the fragment shader on-demand. */
+ if (!*shader) {
+ unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target,
+ nr_samples);
+
+ *shader =
+ util_make_fs_blit_msaa_stencil(pipe, tgsi_tex);
+ }
+
+ return *shader;
+ } else {
+ void **shader = &ctx->fs_texfetch_stencil[target];
+
+ /* Create the fragment shader on-demand. */
+ if (!*shader) {
+ unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target, 0);
+
+ *shader =
+ util_make_fragment_tex_shader_writestencil(pipe, tgsi_tex,
+ TGSI_INTERPOLATE_LINEAR);
+ }
+
+ return *shader;
+ }
+}
+
+void util_blitter_cache_all_shaders(struct blitter_context *blitter)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_screen *screen = blitter->pipe->screen;
+ unsigned i, target, max_samples;
+ boolean has_arraytex, has_cubearraytex;
+
+ max_samples = ctx->has_texture_multisample ? 2 : 1;
+ has_arraytex = screen->get_param(screen,
+ PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS) != 0;
+ has_cubearraytex = screen->get_param(screen,
+ PIPE_CAP_CUBE_MAP_ARRAY) != 0;
+
+ /* It only matters if i <= 1 or > 1. */
+ for (i = 1; i <= max_samples; i++) {
+ for (target = PIPE_TEXTURE_1D; target < PIPE_MAX_TEXTURE_TYPES; target++) {
+ if (!has_arraytex &&
+ (target == PIPE_TEXTURE_1D_ARRAY ||
+ target == PIPE_TEXTURE_2D_ARRAY)) {
+ continue;
+ }
+ if (!has_cubearraytex &&
+ (target == PIPE_TEXTURE_CUBE_ARRAY))
+ continue;
+
+ if (i > 1 &&
+ (target != PIPE_TEXTURE_2D &&
+ target != PIPE_TEXTURE_2D_ARRAY))
+ continue;
+
+ blitter_get_fs_texfetch_col(ctx, target, i);
+ blitter_get_fs_texfetch_depth(ctx, target, i);
+ if (ctx->has_stencil_export) {
+ blitter_get_fs_texfetch_depthstencil(ctx, target, i);
+ blitter_get_fs_texfetch_stencil(ctx, target, i);
+ }
+ }
+ }
+}
+
+static void blitter_set_common_draw_rect_state(struct blitter_context_priv *ctx,
+ boolean scissor)
+{
+ struct pipe_context *pipe = ctx->base.pipe;
+
+ pipe->bind_rasterizer_state(pipe, scissor ? ctx->rs_state_scissor
+ : ctx->rs_state);
+ pipe->bind_vs_state(pipe, ctx->vs);
+ if (ctx->has_geometry_shader)
+ pipe->bind_gs_state(pipe, NULL);
+ if (ctx->has_stream_out)
+ pipe->set_stream_output_targets(pipe, 0, NULL, 0);
+}
+
+static void blitter_draw(struct blitter_context_priv *ctx,
+ int x1, int y1, int x2, int y2, float depth)
+{
+ struct pipe_resource *buf = NULL;
+ unsigned offset = 0;
+
+ blitter_set_rectangle(ctx, x1, y1, x2, y2, depth);
+
+ u_upload_data(ctx->upload, 0, sizeof(ctx->vertices), ctx->vertices,
+ &offset, &buf);
+ u_upload_unmap(ctx->upload);
+ util_draw_vertex_buffer(ctx->base.pipe, NULL, buf, ctx->base.vb_slot,
+ offset, PIPE_PRIM_TRIANGLE_FAN, 4, 2);
+ pipe_resource_reference(&buf, NULL);
+}
+
+void util_blitter_draw_rectangle(struct blitter_context *blitter,
+ int x1, int y1, int x2, int y2, float depth,
+ enum blitter_attrib_type type,
+ const union pipe_color_union *attrib)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+
+ switch (type) {
+ case UTIL_BLITTER_ATTRIB_COLOR:
+ blitter_set_clear_color(ctx, attrib);
+ break;
+
+ case UTIL_BLITTER_ATTRIB_TEXCOORD:
+ set_texcoords_in_vertices(attrib->f, &ctx->vertices[0][1][0], 8);
+ break;
+
+ default:;
+ }
+
+ blitter_draw(ctx, x1, y1, x2, y2, depth);
+}
+
+static void util_blitter_clear_custom(struct blitter_context *blitter,
+ unsigned width, unsigned height,
+ unsigned clear_buffers,
+ const union pipe_color_union *color,
+ double depth, unsigned stencil,
+ void *custom_blend, void *custom_dsa)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_context *pipe = ctx->base.pipe;
+ struct pipe_stencil_ref sr = { { 0 } };
+
+ blitter_set_running_flag(ctx);
+ blitter_check_saved_vertex_states(ctx);
+ blitter_check_saved_fragment_states(ctx);
+ blitter_disable_render_cond(ctx);
+
+ /* bind states */
+ if (custom_blend) {
+ pipe->bind_blend_state(pipe, custom_blend);
+ } else if (clear_buffers & PIPE_CLEAR_COLOR) {
+ pipe->bind_blend_state(pipe, ctx->blend[PIPE_MASK_RGBA]);
+ } else {
+ pipe->bind_blend_state(pipe, ctx->blend[0]);
+ }
+
+ if (custom_dsa) {
+ pipe->bind_depth_stencil_alpha_state(pipe, custom_dsa);
+ } else if ((clear_buffers & PIPE_CLEAR_DEPTHSTENCIL) == PIPE_CLEAR_DEPTHSTENCIL) {
+ pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_stencil);
+ } else if (clear_buffers & PIPE_CLEAR_DEPTH) {
+ pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_keep_stencil);
+ } else if (clear_buffers & PIPE_CLEAR_STENCIL) {
+ pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_write_stencil);
+ } else {
+ pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
+ }
+
+ sr.ref_value[0] = stencil & 0xff;
+ pipe->set_stencil_ref(pipe, &sr);
+
+ pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
+ ctx->bind_fs_state(pipe, ctx->fs_write_all_cbufs);
+ pipe->set_sample_mask(pipe, ~0);
+
+ blitter_set_common_draw_rect_state(ctx, FALSE);
+ blitter_set_dst_dimensions(ctx, width, height);
+ blitter->draw_rectangle(blitter, 0, 0, width, height, (float) depth,
+ UTIL_BLITTER_ATTRIB_COLOR, color);
+
+ blitter_restore_vertex_states(ctx);
+ blitter_restore_fragment_states(ctx);
+ blitter_restore_render_cond(ctx);
+ blitter_unset_running_flag(ctx);
+}
+
+void util_blitter_clear(struct blitter_context *blitter,
+ unsigned width, unsigned height,
+ unsigned clear_buffers,
+ const union pipe_color_union *color,
+ double depth, unsigned stencil)
+{
+ util_blitter_clear_custom(blitter, width, height,
+ clear_buffers, color, depth, stencil,
+ NULL, NULL);
+}
+
+void util_blitter_custom_clear_depth(struct blitter_context *blitter,
+ unsigned width, unsigned height,
+ double depth, void *custom_dsa)
+{
+ static const union pipe_color_union color;
+ util_blitter_clear_custom(blitter, width, height, 0, &color, depth, 0,
+ NULL, custom_dsa);
+}
+
+void util_blitter_default_dst_texture(struct pipe_surface *dst_templ,
+ struct pipe_resource *dst,
+ unsigned dstlevel,
+ unsigned dstz)
+{
+ memset(dst_templ, 0, sizeof(*dst_templ));
+ dst_templ->format = util_format_linear(dst->format);
+ dst_templ->u.tex.level = dstlevel;
+ dst_templ->u.tex.first_layer = dstz;
+ dst_templ->u.tex.last_layer = dstz;
+}
+
+static struct pipe_surface *
+util_blitter_get_next_surface_layer(struct pipe_context *pipe,
+ struct pipe_surface *surf)
+{
+ struct pipe_surface dst_templ;
+
+ memset(&dst_templ, 0, sizeof(dst_templ));
+ dst_templ.format = surf->format;
+ dst_templ.u.tex.level = surf->u.tex.level;
+ dst_templ.u.tex.first_layer = surf->u.tex.first_layer + 1;
+ dst_templ.u.tex.last_layer = surf->u.tex.last_layer + 1;
+
+ return pipe->create_surface(pipe, surf->texture, &dst_templ);
+}
+
+void util_blitter_default_src_texture(struct pipe_sampler_view *src_templ,
+ struct pipe_resource *src,
+ unsigned srclevel)
+{
+ memset(src_templ, 0, sizeof(*src_templ));
+ src_templ->format = util_format_linear(src->format);
+ src_templ->u.tex.first_level = srclevel;
+ src_templ->u.tex.last_level = srclevel;
+ src_templ->u.tex.first_layer = 0;
+ src_templ->u.tex.last_layer =
+ src->target == PIPE_TEXTURE_3D ? u_minify(src->depth0, srclevel) - 1
+ : src->array_size - 1;
+ src_templ->swizzle_r = PIPE_SWIZZLE_RED;
+ src_templ->swizzle_g = PIPE_SWIZZLE_GREEN;
+ src_templ->swizzle_b = PIPE_SWIZZLE_BLUE;
+ src_templ->swizzle_a = PIPE_SWIZZLE_ALPHA;
+}
+
+static boolean is_blit_generic_supported(struct blitter_context *blitter,
+ const struct pipe_resource *dst,
+ enum pipe_format dst_format,
+ const struct pipe_resource *src,
+ enum pipe_format src_format,
+ unsigned mask)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_screen *screen = ctx->base.pipe->screen;
+
+ if (dst) {
+ unsigned bind;
+ const struct util_format_description *desc =
+ util_format_description(dst_format);
+ boolean dst_has_stencil = util_format_has_stencil(desc);
+
+ /* Stencil export must be supported for stencil copy. */
+ if ((mask & PIPE_MASK_S) && dst_has_stencil &&
+ !ctx->has_stencil_export) {
+ return FALSE;
+ }
+
+ if (dst_has_stencil || util_format_has_depth(desc))
+ bind = PIPE_BIND_DEPTH_STENCIL;
+ else
+ bind = PIPE_BIND_RENDER_TARGET;
+
+ if (!screen->is_format_supported(screen, dst_format, dst->target,
+ dst->nr_samples, bind)) {
+ return FALSE;
+ }
+ }
+
+ if (src) {
+ if (src->nr_samples > 1 && !ctx->has_texture_multisample) {
+ return FALSE;
+ }
+
+ if (!screen->is_format_supported(screen, src_format, src->target,
+ src->nr_samples, PIPE_BIND_SAMPLER_VIEW)) {
+ return FALSE;
+ }
+
+ /* Check stencil sampler support for stencil copy. */
+ if (mask & PIPE_MASK_S) {
+ if (util_format_has_stencil(util_format_description(src_format))) {
+ enum pipe_format stencil_format =
+ util_format_stencil_only(src_format);
+ assert(stencil_format != PIPE_FORMAT_NONE);
+
+ if (stencil_format != src_format &&
+ !screen->is_format_supported(screen, stencil_format,
+ src->target, src->nr_samples,
+ PIPE_BIND_SAMPLER_VIEW)) {
+ return FALSE;
+ }
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+boolean util_blitter_is_copy_supported(struct blitter_context *blitter,
+ const struct pipe_resource *dst,
+ const struct pipe_resource *src,
+ unsigned mask)
+{
+ return is_blit_generic_supported(blitter, dst, dst->format,
+ src, src->format, mask);
+}
+
+boolean util_blitter_is_blit_supported(struct blitter_context *blitter,
+ const struct pipe_blit_info *info)
+{
+ return is_blit_generic_supported(blitter,
+ info->dst.resource, info->dst.format,
+ info->src.resource, info->src.format,
+ info->mask);
+}
+
+void util_blitter_copy_texture(struct blitter_context *blitter,
+ struct pipe_resource *dst,
+ unsigned dst_level,
+ unsigned dstx, unsigned dsty, unsigned dstz,
+ struct pipe_resource *src,
+ unsigned src_level,
+ const struct pipe_box *srcbox, unsigned mask,
+ boolean copy_all_samples)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_context *pipe = ctx->base.pipe;
+ struct pipe_surface *dst_view, dst_templ;
+ struct pipe_sampler_view src_templ, *src_view;
+ struct pipe_box dstbox;
+
+ assert(dst && src);
+ assert(src->target < PIPE_MAX_TEXTURE_TYPES);
+
+ u_box_3d(dstx, dsty, dstz, abs(srcbox->width), abs(srcbox->height),
+ abs(srcbox->depth), &dstbox);
+
+ /* Initialize the surface. */
+ util_blitter_default_dst_texture(&dst_templ, dst, dst_level, dstz);
+ dst_view = pipe->create_surface(pipe, dst, &dst_templ);
+
+ /* Initialize the sampler view. */
+ util_blitter_default_src_texture(&src_templ, src, src_level);
+ src_view = pipe->create_sampler_view(pipe, src, &src_templ);
+
+ /* Copy. */
+ util_blitter_blit_generic(blitter, dst_view, &dstbox,
+ src_view, srcbox, src->width0, src->height0,
+ mask, PIPE_TEX_FILTER_NEAREST, NULL,
+ copy_all_samples);
+
+ pipe_surface_reference(&dst_view, NULL);
+ pipe_sampler_view_reference(&src_view, NULL);
+}
+
+void util_blitter_blit_generic(struct blitter_context *blitter,
+ struct pipe_surface *dst,
+ const struct pipe_box *dstbox,
+ struct pipe_sampler_view *src,
+ const struct pipe_box *srcbox,
+ unsigned src_width0, unsigned src_height0,
+ unsigned mask, unsigned filter,
+ const struct pipe_scissor_state *scissor,
+ boolean copy_all_samples)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_context *pipe = ctx->base.pipe;
+ struct pipe_framebuffer_state fb_state;
+ enum pipe_texture_target src_target = src->texture->target;
+ unsigned src_samples = src->texture->nr_samples;
+ boolean has_depth, has_stencil, has_color;
+ boolean blit_stencil, blit_depth, blit_color;
+ void *sampler_state;
+ const struct util_format_description *src_desc =
+ util_format_description(src->format);
+ const struct util_format_description *dst_desc =
+ util_format_description(dst->format);
+
+ has_color = src_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS &&
+ dst_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS;
+ has_depth = util_format_has_depth(src_desc) &&
+ util_format_has_depth(dst_desc);
+ has_stencil = util_format_has_stencil(src_desc) &&
+ util_format_has_stencil(dst_desc);
+
+ blit_color = has_color && (mask & PIPE_MASK_RGBA);
+ blit_depth = has_depth && (mask & PIPE_MASK_Z);
+ blit_stencil = has_stencil && (mask & PIPE_MASK_S) &&
+ ctx->has_stencil_export;
+
+ if (!blit_stencil && !blit_depth && !blit_color) {
+ return;
+ }
+
+ /* Check whether the states are properly saved. */
+ blitter_set_running_flag(ctx);
+ blitter_check_saved_vertex_states(ctx);
+ blitter_check_saved_fragment_states(ctx);
+ blitter_check_saved_textures(ctx);
+ blitter_check_saved_fb_state(ctx);
+ blitter_disable_render_cond(ctx);
+
+ /* Initialize framebuffer state. */
+ fb_state.width = dst->width;
+ fb_state.height = dst->height;
+ fb_state.nr_cbufs = blit_depth || blit_stencil ? 0 : 1;
+ fb_state.cbufs[0] = NULL;
+ fb_state.zsbuf = NULL;
+
+ if (blit_depth || blit_stencil) {
+ pipe->bind_blend_state(pipe, ctx->blend[0]);
+
+ if (blit_depth && blit_stencil) {
+ pipe->bind_depth_stencil_alpha_state(pipe,
+ ctx->dsa_write_depth_stencil);
+ ctx->bind_fs_state(pipe,
+ blitter_get_fs_texfetch_depthstencil(ctx, src_target,
+ src_samples));
+ } else if (blit_depth) {
+ pipe->bind_depth_stencil_alpha_state(pipe,
+ ctx->dsa_write_depth_keep_stencil);
+ ctx->bind_fs_state(pipe,
+ blitter_get_fs_texfetch_depth(ctx, src_target,
+ src_samples));
+ } else { /* is_stencil */
+ pipe->bind_depth_stencil_alpha_state(pipe,
+ ctx->dsa_keep_depth_write_stencil);
+ ctx->bind_fs_state(pipe,
+ blitter_get_fs_texfetch_stencil(ctx, src_target,
+ src_samples));
+ }
+
+ } else {
+ pipe->bind_blend_state(pipe, ctx->blend[mask & PIPE_MASK_RGBA]);
+ pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
+ ctx->bind_fs_state(pipe,
+ blitter_get_fs_texfetch_col(ctx, src_target,
+ src_samples));
+ }
+
+ /* Set the linear filter only for scaled color non-MSAA blits. */
+ if (filter == PIPE_TEX_FILTER_LINEAR &&
+ !blit_depth && !blit_stencil &&
+ src_samples <= 1 &&
+ (dstbox->width != abs(srcbox->width) ||
+ dstbox->height != abs(srcbox->height))) {
+ if (src_target == PIPE_TEXTURE_RECT) {
+ sampler_state = ctx->sampler_state_rect_linear;
+ } else {
+ sampler_state = ctx->sampler_state_linear;
+ }
+ } else {
+ if (src_target == PIPE_TEXTURE_RECT) {
+ sampler_state = ctx->sampler_state_rect;
+ } else {
+ sampler_state = ctx->sampler_state;
+ }
+ }
+
+ /* Set samplers. */
+ if (blit_depth && blit_stencil) {
+ /* Setup two samplers, one for depth and the other one for stencil. */
+ struct pipe_sampler_view templ;
+ struct pipe_sampler_view *views[2];
+ void *samplers[2] = {sampler_state, sampler_state};
+
+ templ = *src;
+ templ.format = util_format_stencil_only(templ.format);
+ assert(templ.format != PIPE_FORMAT_NONE);
+
+ views[0] = src;
+ views[1] = pipe->create_sampler_view(pipe, src->texture, &templ);
+
+ pipe->set_fragment_sampler_views(pipe, 2, views);
+ pipe->bind_fragment_sampler_states(pipe, 2, samplers);
+
+ pipe_sampler_view_reference(&views[1], NULL);
+ } else if (blit_stencil) {
+ /* Set a stencil-only sampler view for it not to sample depth instead. */
+ struct pipe_sampler_view templ;
+ struct pipe_sampler_view *view;
+
+ templ = *src;
+ templ.format = util_format_stencil_only(templ.format);
+ assert(templ.format != PIPE_FORMAT_NONE);
+
+ view = pipe->create_sampler_view(pipe, src->texture, &templ);
+
+ pipe->set_fragment_sampler_views(pipe, 1, &view);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler_state);
+
+ pipe_sampler_view_reference(&view, NULL);
+ } else {
+ pipe->set_fragment_sampler_views(pipe, 1, &src);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler_state);
+ }
+
+ pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
+ if (scissor) {
+ pipe->set_scissor_states(pipe, 0, 1, scissor);
+ }
+
+ blitter_set_common_draw_rect_state(ctx, scissor != NULL);
+ blitter_set_dst_dimensions(ctx, dst->width, dst->height);
+
+ if ((src_target == PIPE_TEXTURE_1D ||
+ src_target == PIPE_TEXTURE_2D ||
+ src_target == PIPE_TEXTURE_RECT) &&
+ src_samples <= 1) {
+ /* Draw the quad with the draw_rectangle callback. */
+
+ /* Set texture coordinates. - use a pipe color union
+ * for interface purposes.
+ * XXX pipe_color_union is a wrong name since we use that to set
+ * texture coordinates too.
+ */
+ union pipe_color_union coord;
+ get_texcoords(src, src_width0, src_height0, srcbox->x, srcbox->y,
+ srcbox->x+srcbox->width, srcbox->y+srcbox->height, coord.f);
+
+ /* Set framebuffer state. */
+ if (blit_depth || blit_stencil) {
+ fb_state.zsbuf = dst;
+ } else {
+ fb_state.cbufs[0] = dst;
+ }
+ pipe->set_framebuffer_state(pipe, &fb_state);
+
+ /* Draw. */
+ pipe->set_sample_mask(pipe, ~0);
+ blitter->draw_rectangle(blitter, dstbox->x, dstbox->y,
+ dstbox->x + dstbox->width,
+ dstbox->y + dstbox->height, 0,
+ UTIL_BLITTER_ATTRIB_TEXCOORD, &coord);
+ } else {
+ /* Draw the quad with the generic codepath. */
+ int z;
+ for (z = 0; z < dstbox->depth; z++) {
+ struct pipe_surface *old;
+
+ /* Set framebuffer state. */
+ if (blit_depth || blit_stencil) {
+ fb_state.zsbuf = dst;
+ } else {
+ fb_state.cbufs[0] = dst;
+ }
+ pipe->set_framebuffer_state(pipe, &fb_state);
+
+ /* See if we need to blit a multisample or singlesample buffer. */
+ if (copy_all_samples &&
+ src_samples == dst->texture->nr_samples &&
+ dst->texture->nr_samples > 1) {
+ unsigned i, max_sample = MAX2(dst->texture->nr_samples, 1) - 1;
+
+ for (i = 0; i <= max_sample; i++) {
+ pipe->set_sample_mask(pipe, 1 << i);
+ blitter_set_texcoords(ctx, src, src_width0, src_height0,
+ srcbox->z + z,
+ i, srcbox->x, srcbox->y,
+ srcbox->x + srcbox->width,
+ srcbox->y + srcbox->height);
+ blitter_draw(ctx, dstbox->x, dstbox->y,
+ dstbox->x + dstbox->width,
+ dstbox->y + dstbox->height, 0);
+ }
+ } else {
+ pipe->set_sample_mask(pipe, ~0);
+ blitter_set_texcoords(ctx, src, src_width0, src_height0,
+ srcbox->z + z, 0,
+ srcbox->x, srcbox->y,
+ srcbox->x + srcbox->width,
+ srcbox->y + srcbox->height);
+ blitter_draw(ctx, dstbox->x, dstbox->y,
+ dstbox->x + dstbox->width,
+ dstbox->y + dstbox->height, 0);
+ }
+
+ /* Get the next surface or (if this is the last iteration)
+ * just unreference the last one. */
+ old = dst;
+ if (z < dstbox->depth-1) {
+ dst = ctx->base.get_next_surface_layer(ctx->base.pipe, dst);
+ }
+ if (z) {
+ pipe_surface_reference(&old, NULL);
+ }
+ }
+ }
+
+ blitter_restore_vertex_states(ctx);
+ blitter_restore_fragment_states(ctx);
+ blitter_restore_textures(ctx);
+ blitter_restore_fb_state(ctx);
+ if (scissor) {
+ pipe->set_scissor_states(pipe, 0, 1, &ctx->base.saved_scissor);
+ }
+ blitter_restore_render_cond(ctx);
+ blitter_unset_running_flag(ctx);
+}
+
+void
+util_blitter_blit(struct blitter_context *blitter,
+ const struct pipe_blit_info *info)
+{
+ struct pipe_resource *dst = info->dst.resource;
+ struct pipe_resource *src = info->src.resource;
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_context *pipe = ctx->base.pipe;
+ struct pipe_surface *dst_view, dst_templ;
+ struct pipe_sampler_view src_templ, *src_view;
+
+ /* Initialize the surface. */
+ util_blitter_default_dst_texture(&dst_templ, dst, info->dst.level,
+ info->dst.box.z);
+ dst_templ.format = info->dst.format;
+ dst_view = pipe->create_surface(pipe, dst, &dst_templ);
+
+ /* Initialize the sampler view. */
+ util_blitter_default_src_texture(&src_templ, src, info->src.level);
+ src_templ.format = info->src.format;
+ src_view = pipe->create_sampler_view(pipe, src, &src_templ);
+
+ /* Copy. */
+ util_blitter_blit_generic(blitter, dst_view, &info->dst.box,
+ src_view, &info->src.box, src->width0, src->height0,
+ info->mask, info->filter,
+ info->scissor_enable ? &info->scissor : NULL, TRUE);
+
+ pipe_surface_reference(&dst_view, NULL);
+ pipe_sampler_view_reference(&src_view, NULL);
+}
+
+/* Clear a region of a color surface to a constant value. */
+void util_blitter_clear_render_target(struct blitter_context *blitter,
+ struct pipe_surface *dstsurf,
+ const union pipe_color_union *color,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_context *pipe = ctx->base.pipe;
+ struct pipe_framebuffer_state fb_state;
+
+ assert(dstsurf->texture);
+ if (!dstsurf->texture)
+ return;
+
+ /* check the saved state */
+ blitter_set_running_flag(ctx);
+ blitter_check_saved_vertex_states(ctx);
+ blitter_check_saved_fragment_states(ctx);
+ blitter_check_saved_fb_state(ctx);
+ blitter_disable_render_cond(ctx);
+
+ /* bind states */
+ pipe->bind_blend_state(pipe, ctx->blend[PIPE_MASK_RGBA]);
+ pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
+ ctx->bind_fs_state(pipe, ctx->fs_write_one_cbuf);
+ pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
+
+ /* set a framebuffer state */
+ fb_state.width = dstsurf->width;
+ fb_state.height = dstsurf->height;
+ fb_state.nr_cbufs = 1;
+ fb_state.cbufs[0] = dstsurf;
+ fb_state.zsbuf = 0;
+ pipe->set_framebuffer_state(pipe, &fb_state);
+ pipe->set_sample_mask(pipe, ~0);
+
+ blitter_set_common_draw_rect_state(ctx, FALSE);
+ blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height);
+ blitter->draw_rectangle(blitter, dstx, dsty, dstx+width, dsty+height, 0,
+ UTIL_BLITTER_ATTRIB_COLOR, color);
+
+ blitter_restore_vertex_states(ctx);
+ blitter_restore_fragment_states(ctx);
+ blitter_restore_fb_state(ctx);
+ blitter_restore_render_cond(ctx);
+ blitter_unset_running_flag(ctx);
+}
+
+/* Clear a region of a depth stencil surface. */
+void util_blitter_clear_depth_stencil(struct blitter_context *blitter,
+ struct pipe_surface *dstsurf,
+ unsigned clear_flags,
+ double depth,
+ unsigned stencil,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_context *pipe = ctx->base.pipe;
+ struct pipe_framebuffer_state fb_state;
+ struct pipe_stencil_ref sr = { { 0 } };
+
+ assert(dstsurf->texture);
+ if (!dstsurf->texture)
+ return;
+
+ /* check the saved state */
+ blitter_set_running_flag(ctx);
+ blitter_check_saved_vertex_states(ctx);
+ blitter_check_saved_fragment_states(ctx);
+ blitter_check_saved_fb_state(ctx);
+ blitter_disable_render_cond(ctx);
+
+ /* bind states */
+ pipe->bind_blend_state(pipe, ctx->blend[0]);
+ if ((clear_flags & PIPE_CLEAR_DEPTHSTENCIL) == PIPE_CLEAR_DEPTHSTENCIL) {
+ sr.ref_value[0] = stencil & 0xff;
+ pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_stencil);
+ pipe->set_stencil_ref(pipe, &sr);
+ }
+ else if (clear_flags & PIPE_CLEAR_DEPTH) {
+ pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_keep_stencil);
+ }
+ else if (clear_flags & PIPE_CLEAR_STENCIL) {
+ sr.ref_value[0] = stencil & 0xff;
+ pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_write_stencil);
+ pipe->set_stencil_ref(pipe, &sr);
+ }
+ else
+ /* hmm that should be illegal probably, or make it a no-op somewhere */
+ pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
+
+ ctx->bind_fs_state(pipe, ctx->fs_empty);
+ pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
+
+ /* set a framebuffer state */
+ fb_state.width = dstsurf->width;
+ fb_state.height = dstsurf->height;
+ fb_state.nr_cbufs = 0;
+ fb_state.cbufs[0] = 0;
+ fb_state.zsbuf = dstsurf;
+ pipe->set_framebuffer_state(pipe, &fb_state);
+ pipe->set_sample_mask(pipe, ~0);
+
+ blitter_set_common_draw_rect_state(ctx, FALSE);
+ blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height);
+ blitter->draw_rectangle(blitter, dstx, dsty, dstx+width, dsty+height,
+ (float) depth,
+ UTIL_BLITTER_ATTRIB_NONE, NULL);
+
+ blitter_restore_vertex_states(ctx);
+ blitter_restore_fragment_states(ctx);
+ blitter_restore_fb_state(ctx);
+ blitter_restore_render_cond(ctx);
+ blitter_unset_running_flag(ctx);
+}
+
+/* draw a rectangle across a region using a custom dsa stage - for r600g */
+void util_blitter_custom_depth_stencil(struct blitter_context *blitter,
+ struct pipe_surface *zsurf,
+ struct pipe_surface *cbsurf,
+ unsigned sample_mask,
+ void *dsa_stage, float depth)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_context *pipe = ctx->base.pipe;
+ struct pipe_framebuffer_state fb_state;
+
+ assert(zsurf->texture);
+ if (!zsurf->texture)
+ return;
+
+ /* check the saved state */
+ blitter_set_running_flag(ctx);
+ blitter_check_saved_vertex_states(ctx);
+ blitter_check_saved_fragment_states(ctx);
+ blitter_check_saved_fb_state(ctx);
+ blitter_disable_render_cond(ctx);
+
+ /* bind states */
+ pipe->bind_blend_state(pipe, cbsurf ? ctx->blend[PIPE_MASK_RGBA] :
+ ctx->blend[0]);
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa_stage);
+ ctx->bind_fs_state(pipe, ctx->fs_empty);
+ pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
+
+ /* set a framebuffer state */
+ fb_state.width = zsurf->width;
+ fb_state.height = zsurf->height;
+ fb_state.nr_cbufs = 1;
+ if (cbsurf) {
+ fb_state.cbufs[0] = cbsurf;
+ fb_state.nr_cbufs = 1;
+ } else {
+ fb_state.cbufs[0] = NULL;
+ fb_state.nr_cbufs = 0;
+ }
+ fb_state.zsbuf = zsurf;
+ pipe->set_framebuffer_state(pipe, &fb_state);
+ pipe->set_sample_mask(pipe, sample_mask);
+
+ blitter_set_common_draw_rect_state(ctx, FALSE);
+ blitter_set_dst_dimensions(ctx, zsurf->width, zsurf->height);
+ blitter->draw_rectangle(blitter, 0, 0, zsurf->width, zsurf->height, depth,
+ UTIL_BLITTER_ATTRIB_NONE, NULL);
+
+ blitter_restore_vertex_states(ctx);
+ blitter_restore_fragment_states(ctx);
+ blitter_restore_fb_state(ctx);
+ blitter_restore_render_cond(ctx);
+ blitter_unset_running_flag(ctx);
+}
+
+void util_blitter_copy_buffer(struct blitter_context *blitter,
+ struct pipe_resource *dst,
+ unsigned dstx,
+ struct pipe_resource *src,
+ unsigned srcx,
+ unsigned size)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_context *pipe = ctx->base.pipe;
+ struct pipe_vertex_buffer vb;
+ struct pipe_stream_output_target *so_target;
+
+ if (srcx >= src->width0 ||
+ dstx >= dst->width0) {
+ return;
+ }
+ if (srcx + size > src->width0) {
+ size = src->width0 - srcx;
+ }
+ if (dstx + size > dst->width0) {
+ size = dst->width0 - dstx;
+ }
+
+ /* Drivers not capable of Stream Out should not call this function
+ * in the first place. */
+ assert(ctx->has_stream_out);
+
+ /* Some alignment is required. */
+ if (srcx % 4 != 0 || dstx % 4 != 0 || size % 4 != 0 ||
+ !ctx->has_stream_out) {
+ struct pipe_box box;
+ u_box_1d(srcx, size, &box);
+ util_resource_copy_region(pipe, dst, 0, dstx, 0, 0, src, 0, &box);
+ return;
+ }
+
+ blitter_set_running_flag(ctx);
+ blitter_check_saved_vertex_states(ctx);
+ blitter_disable_render_cond(ctx);
+
+ vb.buffer = src;
+ vb.buffer_offset = srcx;
+ vb.stride = 4;
+
+ pipe->set_vertex_buffers(pipe, ctx->base.vb_slot, 1, &vb);
+ pipe->bind_vertex_elements_state(pipe, ctx->velem_state_readbuf[0]);
+ pipe->bind_vs_state(pipe, ctx->vs_pos_only);
+ if (ctx->has_geometry_shader)
+ pipe->bind_gs_state(pipe, NULL);
+ pipe->bind_rasterizer_state(pipe, ctx->rs_discard_state);
+
+ so_target = pipe->create_stream_output_target(pipe, dst, dstx, size);
+ pipe->set_stream_output_targets(pipe, 1, &so_target, 0);
+
+ util_draw_arrays(pipe, PIPE_PRIM_POINTS, 0, size / 4);
+
+ blitter_restore_vertex_states(ctx);
+ blitter_restore_render_cond(ctx);
+ blitter_unset_running_flag(ctx);
+ pipe_so_target_reference(&so_target, NULL);
+}
+
+void util_blitter_clear_buffer(struct blitter_context *blitter,
+ struct pipe_resource *dst,
+ unsigned offset, unsigned size,
+ unsigned num_channels,
+ const union pipe_color_union *clear_value)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_context *pipe = ctx->base.pipe;
+ struct pipe_vertex_buffer vb = {0};
+ struct pipe_stream_output_target *so_target;
+
+ assert(num_channels >= 1);
+ assert(num_channels <= 4);
+
+ /* IMPORTANT: DON'T DO ANY BOUNDS CHECKING HERE!
+ *
+ * R600 uses this to initialize texture resources, so width0 might not be
+ * what you think it is.
+ */
+
+ /* Streamout is required. */
+ if (!ctx->has_stream_out) {
+ assert(!"Streamout unsupported in util_blitter_clear_buffer()");
+ return;
+ }
+
+ /* Some alignment is required. */
+ if (offset % 4 != 0 || size % 4 != 0) {
+ assert(!"Bad alignment in util_blitter_clear_buffer()");
+ return;
+ }
+
+ u_upload_data(ctx->upload, 0, num_channels*4, clear_value,
+ &vb.buffer_offset, &vb.buffer);
+ vb.stride = 0;
+
+ blitter_set_running_flag(ctx);
+ blitter_check_saved_vertex_states(ctx);
+ blitter_disable_render_cond(ctx);
+
+ pipe->set_vertex_buffers(pipe, ctx->base.vb_slot, 1, &vb);
+ pipe->bind_vertex_elements_state(pipe,
+ ctx->velem_state_readbuf[num_channels-1]);
+ pipe->bind_vs_state(pipe, ctx->vs_pos_only);
+ if (ctx->has_geometry_shader)
+ pipe->bind_gs_state(pipe, NULL);
+ pipe->bind_rasterizer_state(pipe, ctx->rs_discard_state);
+
+ so_target = pipe->create_stream_output_target(pipe, dst, offset, size);
+ pipe->set_stream_output_targets(pipe, 1, &so_target, 0);
+
+ util_draw_arrays(pipe, PIPE_PRIM_POINTS, 0, size / 4);
+
+ blitter_restore_vertex_states(ctx);
+ blitter_restore_render_cond(ctx);
+ blitter_unset_running_flag(ctx);
+ pipe_so_target_reference(&so_target, NULL);
+ pipe_resource_reference(&vb.buffer, NULL);
+}
+
+/* probably radeon specific */
+void util_blitter_custom_resolve_color(struct blitter_context *blitter,
+ struct pipe_resource *dst,
+ unsigned dst_level,
+ unsigned dst_layer,
+ struct pipe_resource *src,
+ unsigned src_layer,
+ unsigned sample_mask,
+ void *custom_blend,
+ enum pipe_format format)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_context *pipe = ctx->base.pipe;
+ struct pipe_framebuffer_state fb_state;
+ struct pipe_surface *srcsurf, *dstsurf, surf_tmpl;
+
+ blitter_set_running_flag(ctx);
+ blitter_check_saved_vertex_states(ctx);
+ blitter_check_saved_fragment_states(ctx);
+ blitter_disable_render_cond(ctx);
+
+ /* bind states */
+ pipe->bind_blend_state(pipe, custom_blend);
+ pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
+ pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
+ ctx->bind_fs_state(pipe, ctx->fs_write_one_cbuf);
+ pipe->set_sample_mask(pipe, sample_mask);
+
+ memset(&surf_tmpl, 0, sizeof(surf_tmpl));
+ surf_tmpl.format = format;
+ surf_tmpl.u.tex.level = dst_level;
+ surf_tmpl.u.tex.first_layer = dst_layer;
+ surf_tmpl.u.tex.last_layer = dst_layer;
+
+ dstsurf = pipe->create_surface(pipe, dst, &surf_tmpl);
+
+ surf_tmpl.u.tex.level = 0;
+ surf_tmpl.u.tex.first_layer = src_layer;
+ surf_tmpl.u.tex.last_layer = src_layer;
+
+ srcsurf = pipe->create_surface(pipe, src, &surf_tmpl);
+
+ /* set a framebuffer state */
+ fb_state.width = src->width0;
+ fb_state.height = src->height0;
+ fb_state.nr_cbufs = 2;
+ fb_state.cbufs[0] = srcsurf;
+ fb_state.cbufs[1] = dstsurf;
+ fb_state.zsbuf = NULL;
+ pipe->set_framebuffer_state(pipe, &fb_state);
+
+ blitter_set_common_draw_rect_state(ctx, FALSE);
+ blitter_set_dst_dimensions(ctx, src->width0, src->height0);
+ blitter->draw_rectangle(blitter, 0, 0, src->width0, src->height0,
+ 0, 0, NULL);
+ blitter_restore_fb_state(ctx);
+ blitter_restore_vertex_states(ctx);
+ blitter_restore_fragment_states(ctx);
+ blitter_restore_render_cond(ctx);
+ blitter_unset_running_flag(ctx);
+
+ pipe_surface_reference(&srcsurf, NULL);
+ pipe_surface_reference(&dstsurf, NULL);
+}
+
+void util_blitter_custom_color(struct blitter_context *blitter,
+ struct pipe_surface *dstsurf,
+ void *custom_blend)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_context *pipe = ctx->base.pipe;
+ struct pipe_framebuffer_state fb_state;
+
+ assert(dstsurf->texture);
+ if (!dstsurf->texture)
+ return;
+
+ /* check the saved state */
+ blitter_set_running_flag(ctx);
+ blitter_check_saved_vertex_states(ctx);
+ blitter_check_saved_fragment_states(ctx);
+ blitter_check_saved_fb_state(ctx);
+ blitter_disable_render_cond(ctx);
+
+ /* bind states */
+ pipe->bind_blend_state(pipe, custom_blend ? custom_blend
+ : ctx->blend[PIPE_MASK_RGBA]);
+ pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
+ ctx->bind_fs_state(pipe, ctx->fs_write_one_cbuf);
+ pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
+ pipe->set_sample_mask(pipe, (1ull << MAX2(1, dstsurf->texture->nr_samples)) - 1);
+
+ /* set a framebuffer state */
+ fb_state.width = dstsurf->width;
+ fb_state.height = dstsurf->height;
+ fb_state.nr_cbufs = 1;
+ fb_state.cbufs[0] = dstsurf;
+ fb_state.zsbuf = 0;
+ pipe->set_framebuffer_state(pipe, &fb_state);
+ pipe->set_sample_mask(pipe, ~0);
+
+ blitter_set_common_draw_rect_state(ctx, FALSE);
+ blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height);
+ blitter->draw_rectangle(blitter, 0, 0, dstsurf->width, dstsurf->height,
+ 0, 0, NULL);
+
+ blitter_restore_vertex_states(ctx);
+ blitter_restore_fragment_states(ctx);
+ blitter_restore_fb_state(ctx);
+ blitter_restore_render_cond(ctx);
+ blitter_unset_running_flag(ctx);
+}
diff --git a/src/minigallium/auxiliary/util/u_blitter.h b/src/minigallium/auxiliary/util/u_blitter.h
new file mode 100644
index 0000000..d9cefde
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_blitter.h
@@ -0,0 +1,531 @@
+/**************************************************************************
+ *
+ * Copyright 2009 Marek Olšák <maraeo@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_BLITTER_H
+#define U_BLITTER_H
+
+#include "util/u_framebuffer.h"
+#include "util/u_inlines.h"
+
+#include "pipe/p_state.h"
+
+/* u_memory.h conflicts with st/mesa */
+#ifndef Elements
+#define Elements(x) (sizeof(x)/sizeof((x)[0]))
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct pipe_context;
+
+enum blitter_attrib_type {
+ UTIL_BLITTER_ATTRIB_NONE,
+ UTIL_BLITTER_ATTRIB_COLOR,
+ UTIL_BLITTER_ATTRIB_TEXCOORD
+};
+
+struct blitter_context
+{
+ /**
+ * Draw a rectangle.
+ *
+ * \param x1 An X coordinate of the top-left corner.
+ * \param y1 A Y coordinate of the top-left corner.
+ * \param x2 An X coordinate of the bottom-right corner.
+ * \param y2 A Y coordinate of the bottom-right corner.
+ * \param depth A depth which the rectangle is rendered at.
+ *
+ * \param type Semantics of the attributes "attrib".
+ * If type is UTIL_BLITTER_ATTRIB_NONE, ignore them.
+ * If type is UTIL_BLITTER_ATTRIB_COLOR, the attributes
+ * make up a constant RGBA color, and should go
+ * to the GENERIC0 varying slot of a fragment shader.
+ * If type is UTIL_BLITTER_ATTRIB_TEXCOORD, {a1, a2} and
+ * {a3, a4} specify top-left and bottom-right texture
+ * coordinates of the rectangle, respectively, and should go
+ * to the GENERIC0 varying slot of a fragment shader.
+ *
+ * \param attrib See type.
+ *
+ * \note A driver may optionally override this callback to implement
+ * a specialized hardware path for drawing a rectangle, e.g. using
+ * a rectangular point sprite.
+ */
+ void (*draw_rectangle)(struct blitter_context *blitter,
+ int x1, int y1, int x2, int y2,
+ float depth,
+ enum blitter_attrib_type type,
+ const union pipe_color_union *color);
+
+ /**
+ * Get the next surface layer for the pipe surface, i.e. make a copy
+ * of the surface and increment the first and last layer by 1.
+ *
+ * This callback is exposed, so that drivers can override it if needed.
+ */
+ struct pipe_surface *(*get_next_surface_layer)(struct pipe_context *pipe,
+ struct pipe_surface *surf);
+
+ /* Whether the blitter is running. */
+ boolean running;
+
+ /* Private members, really. */
+ struct pipe_context *pipe; /**< pipe context */
+
+ void *saved_blend_state; /**< blend state */
+ void *saved_dsa_state; /**< depth stencil alpha state */
+ void *saved_velem_state; /**< vertex elements state */
+ void *saved_rs_state; /**< rasterizer state */
+ void *saved_fs, *saved_vs, *saved_gs; /**< shaders */
+
+ struct pipe_framebuffer_state saved_fb_state; /**< framebuffer state */
+ struct pipe_stencil_ref saved_stencil_ref; /**< stencil ref */
+ struct pipe_viewport_state saved_viewport;
+ struct pipe_scissor_state saved_scissor;
+ boolean is_sample_mask_saved;
+ unsigned saved_sample_mask;
+
+ unsigned saved_num_sampler_states;
+ void *saved_sampler_states[PIPE_MAX_SAMPLERS];
+
+ unsigned saved_num_sampler_views;
+ struct pipe_sampler_view *saved_sampler_views[PIPE_MAX_SAMPLERS];
+
+ unsigned vb_slot;
+ struct pipe_vertex_buffer saved_vertex_buffer;
+
+ unsigned saved_num_so_targets;
+ struct pipe_stream_output_target *saved_so_targets[PIPE_MAX_SO_BUFFERS];
+
+ struct pipe_query *saved_render_cond_query;
+ uint saved_render_cond_mode;
+ boolean saved_render_cond_cond;
+};
+
+/**
+ * Create a blitter context.
+ */
+struct blitter_context *util_blitter_create(struct pipe_context *pipe);
+
+/**
+ * Destroy a blitter context.
+ */
+void util_blitter_destroy(struct blitter_context *blitter);
+
+void util_blitter_cache_all_shaders(struct blitter_context *blitter);
+
+/**
+ * Return the pipe context associated with a blitter context.
+ */
+static INLINE
+struct pipe_context *util_blitter_get_pipe(struct blitter_context *blitter)
+{
+ return blitter->pipe;
+}
+
+/**
+ * Override PIPE_CAP_TEXTURE_MULTISAMPLE as reported by the driver.
+ */
+void util_blitter_set_texture_multisample(struct blitter_context *blitter,
+ boolean supported);
+
+/* The default function to draw a rectangle. This can only be used
+ * inside of the draw_rectangle callback if the driver overrides it. */
+void util_blitter_draw_rectangle(struct blitter_context *blitter,
+ int x1, int y1, int x2, int y2, float depth,
+ enum blitter_attrib_type type,
+ const union pipe_color_union *attrib);
+
+
+/*
+ * These states must be saved before any of the following functions are called:
+ * - vertex buffers
+ * - vertex elements
+ * - vertex shader
+ * - geometry shader (if supported)
+ * - stream output targets (if supported)
+ * - rasterizer state
+ */
+
+/**
+ * Clear a specified set of currently bound buffers to specified values.
+ *
+ * These states must be saved in the blitter in addition to the state objects
+ * already required to be saved:
+ * - fragment shader
+ * - depth stencil alpha state
+ * - blend state
+ */
+void util_blitter_clear(struct blitter_context *blitter,
+ unsigned width, unsigned height,
+ unsigned clear_buffers,
+ const union pipe_color_union *color,
+ double depth, unsigned stencil);
+
+/**
+ * Check if the blitter (with the help of the driver) can blit between
+ * the two resources.
+ * The mask is a combination of the PIPE_MASK_* flags.
+ * Set to PIPE_MASK_RGBAZS if unsure.
+ */
+boolean util_blitter_is_copy_supported(struct blitter_context *blitter,
+ const struct pipe_resource *dst,
+ const struct pipe_resource *src,
+ unsigned mask);
+
+boolean util_blitter_is_blit_supported(struct blitter_context *blitter,
+ const struct pipe_blit_info *info);
+
+/**
+ * Copy a block of pixels from one surface to another.
+ *
+ * These states must be saved in the blitter in addition to the state objects
+ * already required to be saved:
+ * - fragment shader
+ * - depth stencil alpha state
+ * - blend state
+ * - fragment sampler states
+ * - fragment sampler textures
+ * - framebuffer state
+ * - sample mask
+ */
+void util_blitter_copy_texture(struct blitter_context *blitter,
+ struct pipe_resource *dst,
+ unsigned dst_level,
+ unsigned dstx, unsigned dsty, unsigned dstz,
+ struct pipe_resource *src,
+ unsigned src_level,
+ const struct pipe_box *srcbox, unsigned mask,
+ boolean copy_all_samples);
+
+/**
+ * This is a generic implementation of pipe->blit, which accepts
+ * sampler/surface views instead of resources.
+ *
+ * The layer and mipmap level are specified by the views.
+ *
+ * Drivers can use this to change resource properties (like format, width,
+ * height) by changing how the views interpret them, instead of changing
+ * pipe_resource directly. This is used to blit resources of formats which
+ * are not renderable.
+ *
+ * src_width0 and src_height0 are sampler_view-private properties that
+ * override pipe_resource. The blitter uses them for computation of texture
+ * coordinates. The dst dimensions are supplied through pipe_surface::width
+ * and height.
+ *
+ * The mask is a combination of the PIPE_MASK_* flags.
+ * Set to PIPE_MASK_RGBAZS if unsure.
+ */
+void util_blitter_blit_generic(struct blitter_context *blitter,
+ struct pipe_surface *dst,
+ const struct pipe_box *dstbox,
+ struct pipe_sampler_view *src,
+ const struct pipe_box *srcbox,
+ unsigned src_width0, unsigned src_height0,
+ unsigned mask, unsigned filter,
+ const struct pipe_scissor_state *scissor,
+ boolean copy_all_samples);
+
+void util_blitter_blit(struct blitter_context *blitter,
+ const struct pipe_blit_info *info);
+
+/**
+ * Helper function to initialize a view for copy_texture_view.
+ * The parameters must match copy_texture_view.
+ */
+void util_blitter_default_dst_texture(struct pipe_surface *dst_templ,
+ struct pipe_resource *dst,
+ unsigned dstlevel,
+ unsigned dstz);
+
+/**
+ * Helper function to initialize a view for copy_texture_view.
+ * The parameters must match copy_texture_view.
+ */
+void util_blitter_default_src_texture(struct pipe_sampler_view *src_templ,
+ struct pipe_resource *src,
+ unsigned srclevel);
+
+/**
+ * Copy data from one buffer to another using the Stream Output functionality.
+ * 4-byte alignment is required, otherwise software fallback is used.
+ */
+void util_blitter_copy_buffer(struct blitter_context *blitter,
+ struct pipe_resource *dst,
+ unsigned dstx,
+ struct pipe_resource *src,
+ unsigned srcx,
+ unsigned size);
+
+/**
+ * Clear the contents of a buffer using the Stream Output functionality.
+ * 4-byte alignment is required.
+ *
+ * "num_channels" can be 1, 2, 3, or 4, and specifies if the clear value is
+ * R, RG, RGB, or RGBA.
+ *
+ * For each element, only "num_channels" components of "clear_value" are
+ * copied to the buffer, then the offset is incremented by num_channels*4.
+ */
+void util_blitter_clear_buffer(struct blitter_context *blitter,
+ struct pipe_resource *dst,
+ unsigned offset, unsigned size,
+ unsigned num_channels,
+ const union pipe_color_union *clear_value);
+
+/**
+ * Clear a region of a (color) surface to a constant value.
+ *
+ * These states must be saved in the blitter in addition to the state objects
+ * already required to be saved:
+ * - fragment shader
+ * - depth stencil alpha state
+ * - blend state
+ * - framebuffer state
+ */
+void util_blitter_clear_render_target(struct blitter_context *blitter,
+ struct pipe_surface *dst,
+ const union pipe_color_union *color,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height);
+
+/**
+ * Clear a region of a depth-stencil surface, both stencil and depth
+ * or only one of them if this is a combined depth-stencil surface.
+ *
+ * These states must be saved in the blitter in addition to the state objects
+ * already required to be saved:
+ * - fragment shader
+ * - depth stencil alpha state
+ * - blend state
+ * - framebuffer state
+ */
+void util_blitter_clear_depth_stencil(struct blitter_context *blitter,
+ struct pipe_surface *dst,
+ unsigned clear_flags,
+ double depth,
+ unsigned stencil,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height);
+
+/* The following functions are customized variants of the clear functions.
+ * Some drivers use them internally to do things like MSAA resolve
+ * and resource decompression. It usually consists of rendering a full-screen
+ * quad with a special blend or DSA state.
+ */
+
+/* Used by r300g for depth decompression. */
+void util_blitter_custom_clear_depth(struct blitter_context *blitter,
+ unsigned width, unsigned height,
+ double depth, void *custom_dsa);
+
+/* Used by r600g for depth decompression. */
+void util_blitter_custom_depth_stencil(struct blitter_context *blitter,
+ struct pipe_surface *zsurf,
+ struct pipe_surface *cbsurf,
+ unsigned sample_mask,
+ void *dsa_stage, float depth);
+
+/* Used by r600g for color decompression. */
+void util_blitter_custom_color(struct blitter_context *blitter,
+ struct pipe_surface *dstsurf,
+ void *custom_blend);
+
+/* Used by r600g for MSAA color resolve. */
+void util_blitter_custom_resolve_color(struct blitter_context *blitter,
+ struct pipe_resource *dst,
+ unsigned dst_level,
+ unsigned dst_layer,
+ struct pipe_resource *src,
+ unsigned src_layer,
+ unsigned sampled_mask,
+ void *custom_blend,
+ enum pipe_format format);
+
+/* The functions below should be used to save currently bound constant state
+ * objects inside a driver. The objects are automatically restored at the end
+ * of the util_blitter_{clear, copy_region, fill_region} functions and then
+ * forgotten.
+ *
+ * States not listed here are not affected by util_blitter. */
+
+static INLINE
+void util_blitter_save_blend(struct blitter_context *blitter,
+ void *state)
+{
+ blitter->saved_blend_state = state;
+}
+
+static INLINE
+void util_blitter_save_depth_stencil_alpha(struct blitter_context *blitter,
+ void *state)
+{
+ blitter->saved_dsa_state = state;
+}
+
+static INLINE
+void util_blitter_save_vertex_elements(struct blitter_context *blitter,
+ void *state)
+{
+ blitter->saved_velem_state = state;
+}
+
+static INLINE
+void util_blitter_save_stencil_ref(struct blitter_context *blitter,
+ const struct pipe_stencil_ref *state)
+{
+ blitter->saved_stencil_ref = *state;
+}
+
+static INLINE
+void util_blitter_save_rasterizer(struct blitter_context *blitter,
+ void *state)
+{
+ blitter->saved_rs_state = state;
+}
+
+static INLINE
+void util_blitter_save_fragment_shader(struct blitter_context *blitter,
+ void *fs)
+{
+ blitter->saved_fs = fs;
+}
+
+static INLINE
+void util_blitter_save_vertex_shader(struct blitter_context *blitter,
+ void *vs)
+{
+ blitter->saved_vs = vs;
+}
+
+static INLINE
+void util_blitter_save_geometry_shader(struct blitter_context *blitter,
+ void *gs)
+{
+ blitter->saved_gs = gs;
+}
+
+static INLINE
+void util_blitter_save_framebuffer(struct blitter_context *blitter,
+ const struct pipe_framebuffer_state *state)
+{
+ blitter->saved_fb_state.nr_cbufs = 0; /* It's ~0 now, meaning it's unsaved. */
+ util_copy_framebuffer_state(&blitter->saved_fb_state, state);
+}
+
+static INLINE
+void util_blitter_save_viewport(struct blitter_context *blitter,
+ struct pipe_viewport_state *state)
+{
+ blitter->saved_viewport = *state;
+}
+
+static INLINE
+void util_blitter_save_scissor(struct blitter_context *blitter,
+ struct pipe_scissor_state *state)
+{
+ blitter->saved_scissor = *state;
+}
+
+static INLINE
+void util_blitter_save_fragment_sampler_states(
+ struct blitter_context *blitter,
+ unsigned num_sampler_states,
+ void **sampler_states)
+{
+ assert(num_sampler_states <= Elements(blitter->saved_sampler_states));
+
+ blitter->saved_num_sampler_states = num_sampler_states;
+ memcpy(blitter->saved_sampler_states, sampler_states,
+ num_sampler_states * sizeof(void *));
+}
+
+static INLINE void
+util_blitter_save_fragment_sampler_views(struct blitter_context *blitter,
+ unsigned num_views,
+ struct pipe_sampler_view **views)
+{
+ unsigned i;
+ assert(num_views <= Elements(blitter->saved_sampler_views));
+
+ blitter->saved_num_sampler_views = num_views;
+ for (i = 0; i < num_views; i++)
+ pipe_sampler_view_reference(&blitter->saved_sampler_views[i],
+ views[i]);
+}
+
+static INLINE void
+util_blitter_save_vertex_buffer_slot(struct blitter_context *blitter,
+ struct pipe_vertex_buffer *vertex_buffers)
+{
+ pipe_resource_reference(&blitter->saved_vertex_buffer.buffer,
+ vertex_buffers[blitter->vb_slot].buffer);
+ memcpy(&blitter->saved_vertex_buffer, &vertex_buffers[blitter->vb_slot],
+ sizeof(struct pipe_vertex_buffer));
+}
+
+static INLINE void
+util_blitter_save_so_targets(struct blitter_context *blitter,
+ unsigned num_targets,
+ struct pipe_stream_output_target **targets)
+{
+ unsigned i;
+ assert(num_targets <= Elements(blitter->saved_so_targets));
+
+ blitter->saved_num_so_targets = num_targets;
+ for (i = 0; i < num_targets; i++)
+ pipe_so_target_reference(&blitter->saved_so_targets[i],
+ targets[i]);
+}
+
+static INLINE void
+util_blitter_save_sample_mask(struct blitter_context *blitter,
+ unsigned sample_mask)
+{
+ blitter->is_sample_mask_saved = TRUE;
+ blitter->saved_sample_mask = sample_mask;
+}
+
+static INLINE void
+util_blitter_save_render_condition(struct blitter_context *blitter,
+ struct pipe_query *query,
+ boolean condition,
+ uint mode)
+{
+ blitter->saved_render_cond_query = query;
+ blitter->saved_render_cond_mode = mode;
+ blitter->saved_render_cond_cond = condition;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_box.h b/src/minigallium/auxiliary/util/u_box.h
new file mode 100644
index 0000000..0b28d0f
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_box.h
@@ -0,0 +1,80 @@
+#ifndef UTIL_BOX_INLINES_H
+#define UTIL_BOX_INLINES_H
+
+#include "pipe/p_state.h"
+
+static INLINE
+void u_box_1d( unsigned x,
+ unsigned w,
+ struct pipe_box *box )
+{
+ box->x = x;
+ box->y = 0;
+ box->z = 0;
+ box->width = w;
+ box->height = 1;
+ box->depth = 1;
+}
+
+static INLINE
+void u_box_2d( unsigned x,
+ unsigned y,
+ unsigned w,
+ unsigned h,
+ struct pipe_box *box )
+{
+ box->x = x;
+ box->y = y;
+ box->z = 0;
+ box->width = w;
+ box->height = h;
+ box->depth = 1;
+}
+
+static INLINE
+void u_box_origin_2d( unsigned w,
+ unsigned h,
+ struct pipe_box *box )
+{
+ box->x = 0;
+ box->y = 0;
+ box->z = 0;
+ box->width = w;
+ box->height = h;
+ box->depth = 1;
+}
+
+static INLINE
+void u_box_2d_zslice( unsigned x,
+ unsigned y,
+ unsigned z,
+ unsigned w,
+ unsigned h,
+ struct pipe_box *box )
+{
+ box->x = x;
+ box->y = y;
+ box->z = z;
+ box->width = w;
+ box->height = h;
+ box->depth = 1;
+}
+
+static INLINE
+void u_box_3d( unsigned x,
+ unsigned y,
+ unsigned z,
+ unsigned w,
+ unsigned h,
+ unsigned d,
+ struct pipe_box *box )
+{
+ box->x = x;
+ box->y = y;
+ box->z = z;
+ box->width = w;
+ box->height = h;
+ box->depth = d;
+}
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_cache.c b/src/minigallium/auxiliary/util/u_cache.c
new file mode 100644
index 0000000..26aab2b
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_cache.c
@@ -0,0 +1,351 @@
+/**************************************************************************
+ *
+ * Copyright 2008 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Improved cache implementation.
+ *
+ * Fixed size array with linear probing on collision and LRU eviction
+ * on full.
+ *
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+
+#include "pipe/p_compiler.h"
+#include "util/u_debug.h"
+
+#include "util/u_math.h"
+#include "util/u_memory.h"
+#include "util/u_cache.h"
+#include "util/u_simple_list.h"
+
+
+struct util_cache_entry
+{
+ enum { EMPTY = 0, FILLED, DELETED } state;
+ uint32_t hash;
+
+ struct util_cache_entry *next;
+ struct util_cache_entry *prev;
+
+ void *key;
+ void *value;
+
+#ifdef DEBUG
+ unsigned count;
+#endif
+};
+
+
+struct util_cache
+{
+ /** Hash function */
+ uint32_t (*hash)(const void *key);
+
+ /** Compare two keys */
+ int (*compare)(const void *key1, const void *key2);
+
+ /** Destroy a (key, value) pair */
+ void (*destroy)(void *key, void *value);
+
+ uint32_t size;
+
+ struct util_cache_entry *entries;
+
+ unsigned count;
+ struct util_cache_entry lru;
+};
+
+static void
+ensure_sanity(const struct util_cache *cache);
+
+#define CACHE_DEFAULT_ALPHA 2
+
+struct util_cache *
+util_cache_create(uint32_t (*hash)(const void *key),
+ int (*compare)(const void *key1, const void *key2),
+ void (*destroy)(void *key, void *value),
+ uint32_t size)
+{
+ struct util_cache *cache;
+
+ cache = CALLOC_STRUCT(util_cache);
+ if(!cache)
+ return NULL;
+
+ cache->hash = hash;
+ cache->compare = compare;
+ cache->destroy = destroy;
+
+ make_empty_list(&cache->lru);
+
+ size *= CACHE_DEFAULT_ALPHA;
+ cache->size = size;
+
+ cache->entries = CALLOC(size, sizeof(struct util_cache_entry));
+ if(!cache->entries) {
+ FREE(cache);
+ return NULL;
+ }
+
+ ensure_sanity(cache);
+ return cache;
+}
+
+
+static struct util_cache_entry *
+util_cache_entry_get(struct util_cache *cache,
+ uint32_t hash,
+ const void *key)
+{
+ struct util_cache_entry *first_unfilled = NULL;
+ uint32_t index = hash % cache->size;
+ uint32_t probe;
+
+ /* Probe until we find either a matching FILLED entry or an EMPTY
+ * slot (which has never been occupied).
+ *
+ * Deleted or non-matching slots are not indicative of completion
+ * as a previous linear probe for the same key could have continued
+ * past this point.
+ */
+ for (probe = 0; probe < cache->size; probe++) {
+ uint32_t i = (index + probe) % cache->size;
+ struct util_cache_entry *current = &cache->entries[i];
+
+ if (current->state == FILLED) {
+ if (current->hash == hash &&
+ cache->compare(key, current->key) == 0)
+ return current;
+ }
+ else {
+ if (!first_unfilled)
+ first_unfilled = current;
+
+ if (current->state == EMPTY)
+ return first_unfilled;
+ }
+ }
+
+ return NULL;
+}
+
+static INLINE void
+util_cache_entry_destroy(struct util_cache *cache,
+ struct util_cache_entry *entry)
+{
+ void *key = entry->key;
+ void *value = entry->value;
+
+ entry->key = NULL;
+ entry->value = NULL;
+
+ if (entry->state == FILLED) {
+ remove_from_list(entry);
+ cache->count--;
+
+ if(cache->destroy)
+ cache->destroy(key, value);
+
+ entry->state = DELETED;
+ }
+}
+
+
+void
+util_cache_set(struct util_cache *cache,
+ void *key,
+ void *value)
+{
+ struct util_cache_entry *entry;
+ uint32_t hash;
+
+ assert(cache);
+ if (!cache)
+ return;
+ hash = cache->hash(key);
+ entry = util_cache_entry_get(cache, hash, key);
+ if (!entry)
+ entry = cache->lru.prev;
+
+ if (cache->count >= cache->size / CACHE_DEFAULT_ALPHA)
+ util_cache_entry_destroy(cache, cache->lru.prev);
+
+ util_cache_entry_destroy(cache, entry);
+
+#ifdef DEBUG
+ ++entry->count;
+#endif
+
+ entry->key = key;
+ entry->hash = hash;
+ entry->value = value;
+ entry->state = FILLED;
+ insert_at_head(&cache->lru, entry);
+ cache->count++;
+
+ ensure_sanity(cache);
+}
+
+
+void *
+util_cache_get(struct util_cache *cache,
+ const void *key)
+{
+ struct util_cache_entry *entry;
+ uint32_t hash;
+
+ assert(cache);
+ if (!cache)
+ return NULL;
+ hash = cache->hash(key);
+ entry = util_cache_entry_get(cache, hash, key);
+ if (!entry)
+ return NULL;
+
+ if (entry->state == FILLED)
+ move_to_head(&cache->lru, entry);
+
+ return entry->value;
+}
+
+
+void
+util_cache_clear(struct util_cache *cache)
+{
+ uint32_t i;
+
+ assert(cache);
+ if (!cache)
+ return;
+
+ for(i = 0; i < cache->size; ++i) {
+ util_cache_entry_destroy(cache, &cache->entries[i]);
+ cache->entries[i].state = EMPTY;
+ }
+
+ assert(cache->count == 0);
+ assert(is_empty_list(&cache->lru));
+ ensure_sanity(cache);
+}
+
+
+void
+util_cache_destroy(struct util_cache *cache)
+{
+ assert(cache);
+ if (!cache)
+ return;
+
+#ifdef DEBUG
+ if(cache->count >= 20*cache->size) {
+ /* Normal approximation of the Poisson distribution */
+ double mean = (double)cache->count/(double)cache->size;
+ double stddev = sqrt(mean);
+ unsigned i;
+ for(i = 0; i < cache->size; ++i) {
+ double z = fabs(cache->entries[i].count - mean)/stddev;
+ /* This assert should not fail 99.9999998027% of the times, unless
+ * the hash function is a poor one */
+ assert(z <= 6.0);
+ }
+ }
+#endif
+
+ util_cache_clear(cache);
+
+ FREE(cache->entries);
+ FREE(cache);
+}
+
+
+void
+util_cache_remove(struct util_cache *cache,
+ const void *key)
+{
+ struct util_cache_entry *entry;
+ uint32_t hash;
+
+ assert(cache);
+ if (!cache)
+ return;
+
+ hash = cache->hash(key);
+
+ entry = util_cache_entry_get(cache, hash, key);
+ if (!entry)
+ return;
+
+ if (entry->state == FILLED)
+ util_cache_entry_destroy(cache, entry);
+
+ ensure_sanity(cache);
+}
+
+
+static void
+ensure_sanity(const struct util_cache *cache)
+{
+#ifdef DEBUG
+ unsigned i, cnt = 0;
+
+ assert(cache);
+ for (i = 0; i < cache->size; i++) {
+ struct util_cache_entry *header = &cache->entries[i];
+
+ assert(header);
+ assert(header->state == FILLED ||
+ header->state == EMPTY ||
+ header->state == DELETED);
+ if (header->state == FILLED) {
+ cnt++;
+ assert(header->hash == cache->hash(header->key));
+ }
+ }
+
+ assert(cnt == cache->count);
+ assert(cache->size >= cnt);
+
+ if (cache->count == 0) {
+ assert (is_empty_list(&cache->lru));
+ }
+ else {
+ struct util_cache_entry *header = cache->lru.next;
+
+ assert (header);
+ assert (!is_empty_list(&cache->lru));
+
+ for (i = 0; i < cache->count; i++)
+ header = header->next;
+
+ assert(header == &cache->lru);
+ }
+#endif
+
+ (void)cache;
+}
diff --git a/src/minigallium/auxiliary/util/u_cache.h b/src/minigallium/auxiliary/util/u_cache.h
new file mode 100644
index 0000000..be3631b
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_cache.h
@@ -0,0 +1,91 @@
+/**************************************************************************
+ *
+ * Copyright 2008 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Simple cache.
+ *
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+#ifndef U_CACHE_H_
+#define U_CACHE_H_
+
+
+#include "pipe/p_compiler.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * Least Recently Used (LRU) cache.
+ */
+struct util_cache;
+
+
+/**
+ * Create a cache.
+ *
+ * @param hash hash function
+ * @param compare should return 0 for two equal keys
+ * @param destroy destruction callback (optional)
+ * @param size maximum number of entries
+ */
+struct util_cache *
+util_cache_create(uint32_t (*hash)(const void *key),
+ int (*compare)(const void *key1, const void *key2),
+ void (*destroy)(void *key, void *value),
+ uint32_t size);
+
+void
+util_cache_set(struct util_cache *cache,
+ void *key,
+ void *value);
+
+void *
+util_cache_get(struct util_cache *cache,
+ const void *key);
+
+void
+util_cache_clear(struct util_cache *cache);
+
+void
+util_cache_destroy(struct util_cache *cache);
+
+void
+util_cache_remove(struct util_cache *cache,
+ const void *key);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_CACHE_H_ */
diff --git a/src/minigallium/auxiliary/util/u_caps.c b/src/minigallium/auxiliary/util/u_caps.c
new file mode 100644
index 0000000..6230707
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_caps.c
@@ -0,0 +1,269 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Vmware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "pipe/p_screen.h"
+#include "util/u_format.h"
+#include "util/u_debug.h"
+#include "u_caps.h"
+
+/**
+ * Iterates over a list of caps checks as defined in u_caps.h. Should
+ * all checks pass returns TRUE and out is set to the last element of
+ * the list (TERMINATE). Should any check fail returns FALSE and set
+ * out to the index of the start of the first failing check.
+ */
+boolean
+util_check_caps_out(struct pipe_screen *screen, const unsigned *list, int *out)
+{
+ int i, tmpi;
+ float tmpf;
+
+ for (i = 0; list[i];) {
+ switch(list[i++]) {
+ case UTIL_CAPS_CHECK_CAP:
+ if (!screen->get_param(screen, list[i++])) {
+ *out = i - 2;
+ return FALSE;
+ }
+ break;
+ case UTIL_CAPS_CHECK_INT:
+ tmpi = screen->get_param(screen, list[i++]);
+ if (tmpi < (int)list[i++]) {
+ *out = i - 3;
+ return FALSE;
+ }
+ break;
+ case UTIL_CAPS_CHECK_FLOAT:
+ tmpf = screen->get_paramf(screen, list[i++]);
+ if (tmpf < (float)list[i++]) {
+ *out = i - 3;
+ return FALSE;
+ }
+ break;
+ case UTIL_CAPS_CHECK_FORMAT:
+ if (!screen->is_format_supported(screen,
+ list[i++],
+ PIPE_TEXTURE_2D,
+ 0,
+ PIPE_BIND_SAMPLER_VIEW)) {
+ *out = i - 2;
+ return FALSE;
+ }
+ break;
+ case UTIL_CAPS_CHECK_SHADER:
+ tmpi = screen->get_shader_param(screen, list[i] >> 24, list[i] & ((1 << 24) - 1));
+ ++i;
+ if (tmpi < (int)list[i++]) {
+ *out = i - 3;
+ return FALSE;
+ }
+ break;
+ case UTIL_CAPS_CHECK_UNIMPLEMENTED:
+ *out = i - 1;
+ return FALSE;
+ default:
+ assert(!"Unsupported check");
+ return FALSE;
+ }
+ }
+
+ *out = i;
+ return TRUE;
+}
+
+/**
+ * Iterates over a list of caps checks as defined in u_caps.h.
+ * Returns TRUE if all caps checks pass returns FALSE otherwise.
+ */
+boolean
+util_check_caps(struct pipe_screen *screen, const unsigned *list)
+{
+ int out;
+ return util_check_caps_out(screen, list, &out);
+}
+
+
+/*
+ * Below follows some demo lists.
+ *
+ * None of these lists are exhausting lists of what is
+ * actually needed to support said API and more here for
+ * as example on how to uses the above functions. Especially
+ * for DX10 and DX11 where Gallium is missing features.
+ */
+
+/* DX 9_1 */
+static unsigned caps_dx_9_1[] = {
+ UTIL_CHECK_INT(MAX_RENDER_TARGETS, 1),
+ UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 12), /* 2048 */
+ UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 9), /* 256 */
+ UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 10), /* 512 */
+ UTIL_CHECK_FLOAT(MAX_TEXTURE_ANISOTROPY, 2),
+ UTIL_CHECK_TERMINATE
+};
+
+/* DX 9_2 */
+static unsigned caps_dx_9_2[] = {
+ UTIL_CHECK_CAP(OCCLUSION_QUERY),
+ UTIL_CHECK_CAP(BLEND_EQUATION_SEPARATE),
+ UTIL_CHECK_INT(MAX_RENDER_TARGETS, 1),
+ UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 12), /* 2048 */
+ UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 9), /* 256 */
+ UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 10), /* 512 */
+ UTIL_CHECK_FLOAT(MAX_TEXTURE_ANISOTROPY, 16),
+ UTIL_CHECK_TERMINATE
+};
+
+/* DX 9_3 */
+static unsigned caps_dx_9_3[] = {
+ UTIL_CHECK_CAP(SM3),
+ //UTIL_CHECK_CAP(INSTANCING),
+ UTIL_CHECK_CAP(OCCLUSION_QUERY),
+ UTIL_CHECK_INT(MAX_RENDER_TARGETS, 4),
+ UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 13), /* 4096 */
+ UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 9), /* 256 */
+ UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 10), /* 512 */
+ UTIL_CHECK_FLOAT(MAX_TEXTURE_ANISOTROPY, 16),
+ UTIL_CHECK_TERMINATE
+};
+
+/* DX 10 */
+static unsigned caps_dx_10[] = {
+ UTIL_CHECK_CAP(SM3),
+ //UTIL_CHECK_CAP(INSTANCING),
+ UTIL_CHECK_CAP(OCCLUSION_QUERY),
+ UTIL_CHECK_INT(MAX_RENDER_TARGETS, 8),
+ UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 14), /* 8192 */
+ UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 12), /* 2048 */
+ UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 14), /* 8192 */
+ UTIL_CHECK_FLOAT(MAX_TEXTURE_ANISOTROPY, 16),
+ UTIL_CHECK_UNIMPLEMENTED, /* XXX Unimplemented features in Gallium */
+ UTIL_CHECK_TERMINATE
+};
+
+/* DX11 */
+static unsigned caps_dx_11[] = {
+ UTIL_CHECK_CAP(SM3),
+ //UTIL_CHECK_CAP(INSTANCING),
+ UTIL_CHECK_CAP(OCCLUSION_QUERY),
+ UTIL_CHECK_INT(MAX_RENDER_TARGETS, 8),
+ UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 14), /* 16384 */
+ UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 12), /* 2048 */
+ UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 14), /* 16384 */
+ UTIL_CHECK_FLOAT(MAX_TEXTURE_ANISOTROPY, 16),
+ UTIL_CHECK_FORMAT(B8G8R8A8_UNORM),
+ UTIL_CHECK_UNIMPLEMENTED, /* XXX Unimplemented features in Gallium */
+ UTIL_CHECK_TERMINATE
+};
+
+/* OpenGL 2.1 */
+static unsigned caps_opengl_2_1[] = {
+ UTIL_CHECK_CAP(OCCLUSION_QUERY),
+ UTIL_CHECK_CAP(TWO_SIDED_STENCIL),
+ UTIL_CHECK_CAP(BLEND_EQUATION_SEPARATE),
+ UTIL_CHECK_INT(MAX_RENDER_TARGETS, 2),
+ UTIL_CHECK_TERMINATE
+};
+
+/* OpenGL 3.0 */
+/* UTIL_CHECK_INT(MAX_RENDER_TARGETS, 8), */
+
+/* Shader Model 3 */
+static unsigned caps_sm3[] = {
+ UTIL_CHECK_SHADER(FRAGMENT, MAX_INSTRUCTIONS, 512),
+ UTIL_CHECK_SHADER(FRAGMENT, MAX_INPUTS, 10),
+ UTIL_CHECK_SHADER(FRAGMENT, MAX_TEMPS, 32),
+ UTIL_CHECK_SHADER(FRAGMENT, MAX_ADDRS, 1),
+ UTIL_CHECK_SHADER(FRAGMENT, MAX_CONSTS, 224),
+
+ UTIL_CHECK_SHADER(VERTEX, MAX_INSTRUCTIONS, 512),
+ UTIL_CHECK_SHADER(VERTEX, MAX_INPUTS, 16),
+ UTIL_CHECK_SHADER(VERTEX, MAX_TEMPS, 32),
+ UTIL_CHECK_SHADER(VERTEX, MAX_ADDRS, 2),
+ UTIL_CHECK_SHADER(VERTEX, MAX_CONSTS, 256),
+
+ UTIL_CHECK_TERMINATE
+};
+
+/**
+ * Demo function which checks against theoretical caps needed for different APIs.
+ */
+void util_caps_demo_print(struct pipe_screen *screen)
+{
+ struct {
+ char* name;
+ unsigned *list;
+ } list[] = {
+ {"DX 9.1", caps_dx_9_1},
+ {"DX 9.2", caps_dx_9_2},
+ {"DX 9.3", caps_dx_9_3},
+ {"DX 10", caps_dx_10},
+ {"DX 11", caps_dx_11},
+ {"OpenGL 2.1", caps_opengl_2_1},
+/* {"OpenGL 3.0", caps_opengl_3_0},*/
+ {"SM3", caps_sm3},
+ {NULL, NULL}
+ };
+ int i, out = 0;
+
+ for (i = 0; list[i].name; i++) {
+ if (util_check_caps_out(screen, list[i].list, &out)) {
+ debug_printf("%s: %s yes\n", __FUNCTION__, list[i].name);
+ continue;
+ }
+ switch (list[i].list[out]) {
+ case UTIL_CAPS_CHECK_CAP:
+ debug_printf("%s: %s no (cap %u not supported)\n", __FUNCTION__,
+ list[i].name,
+ list[i].list[out + 1]);
+ break;
+ case UTIL_CAPS_CHECK_INT:
+ debug_printf("%s: %s no (cap %u less then %u)\n", __FUNCTION__,
+ list[i].name,
+ list[i].list[out + 1],
+ list[i].list[out + 2]);
+ break;
+ case UTIL_CAPS_CHECK_FLOAT:
+ debug_printf("%s: %s no (cap %u less then %f)\n", __FUNCTION__,
+ list[i].name,
+ list[i].list[out + 1],
+ (double)(int)list[i].list[out + 2]);
+ break;
+ case UTIL_CAPS_CHECK_FORMAT:
+ debug_printf("%s: %s no (format %s not supported)\n", __FUNCTION__,
+ list[i].name,
+ util_format_name(list[i].list[out + 1]) + 12);
+ break;
+ case UTIL_CAPS_CHECK_UNIMPLEMENTED:
+ debug_printf("%s: %s no (not implemented in gallium or state tracker)\n",
+ __FUNCTION__, list[i].name);
+ break;
+ default:
+ assert(!"Unsupported check");
+ }
+ }
+}
diff --git a/src/minigallium/auxiliary/util/u_caps.h b/src/minigallium/auxiliary/util/u_caps.h
new file mode 100644
index 0000000..038efc9
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_caps.h
@@ -0,0 +1,71 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Vmware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_CAPS_H
+#define U_CAPS_H
+
+#include "pipe/p_compiler.h"
+
+struct pipe_screen;
+
+enum u_caps_check_enum {
+ UTIL_CAPS_CHECK_TERMINATE = 0,
+ UTIL_CAPS_CHECK_CAP,
+ UTIL_CAPS_CHECK_INT,
+ UTIL_CAPS_CHECK_FLOAT,
+ UTIL_CAPS_CHECK_FORMAT,
+ UTIL_CAPS_CHECK_SHADER,
+ UTIL_CAPS_CHECK_UNIMPLEMENTED,
+};
+
+#define UTIL_CHECK_CAP(cap) \
+ UTIL_CAPS_CHECK_CAP, PIPE_CAP_##cap
+
+#define UTIL_CHECK_INT(cap, higher) \
+ UTIL_CAPS_CHECK_INT, PIPE_CAP_##cap, (unsigned)(higher)
+
+/* Floats currently lose precision */
+#define UTIL_CHECK_FLOAT(cap, higher) \
+ UTIL_CAPS_CHECK_FLOAT, PIPE_CAPF_##cap, (unsigned)(int)(higher)
+
+#define UTIL_CHECK_FORMAT(format) \
+ UTIL_CAPS_CHECK_FORMAT, PIPE_FORMAT_##format
+
+#define UTIL_CHECK_SHADER(shader, cap, higher) \
+ UTIL_CAPS_CHECK_SHADER, (PIPE_SHADER_##shader << 24) | PIPE_SHADER_CAP_##cap, (unsigned)(higher)
+
+#define UTIL_CHECK_UNIMPLEMENTED \
+ UTIL_CAPS_CHECK_UNIMPLEMENTED
+
+#define UTIL_CHECK_TERMINATE \
+ UTIL_CAPS_CHECK_TERMINATE
+
+boolean util_check_caps(struct pipe_screen *screen, const unsigned *list);
+boolean util_check_caps_out(struct pipe_screen *screen, const unsigned *list, int *out);
+void util_caps_demo_print(struct pipe_screen *screen);
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_clear.h b/src/minigallium/auxiliary/util/u_clear.h
new file mode 100644
index 0000000..e9fd874
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_clear.h
@@ -0,0 +1,59 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/* Authors:
+ * Michel Dänzer
+ */
+
+
+#include "pipe/p_context.h"
+#include "pipe/p_state.h"
+
+
+/**
+ * Clear the given buffers to the specified values.
+ * No masking, no scissor (clear entire buffer).
+ */
+static INLINE void
+util_clear(struct pipe_context *pipe,
+ struct pipe_framebuffer_state *framebuffer, unsigned buffers,
+ const union pipe_color_union *color, double depth, unsigned stencil)
+{
+ if (buffers & PIPE_CLEAR_COLOR) {
+ unsigned i;
+ for (i = 0; i < framebuffer->nr_cbufs; i++) {
+ struct pipe_surface *ps = framebuffer->cbufs[i];
+ pipe->clear_render_target(pipe, ps, color, 0, 0, ps->width, ps->height);
+ }
+ }
+
+ if (buffers & PIPE_CLEAR_DEPTHSTENCIL) {
+ struct pipe_surface *ps = framebuffer->zsbuf;
+ pipe->clear_depth_stencil(pipe, ps, buffers & PIPE_CLEAR_DEPTHSTENCIL,
+ depth, stencil,
+ 0, 0, ps->width, ps->height);
+ }
+}
diff --git a/src/minigallium/auxiliary/util/u_cpu_detect.c b/src/minigallium/auxiliary/util/u_cpu_detect.c
new file mode 100644
index 0000000..d2d1313
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_cpu_detect.c
@@ -0,0 +1,458 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Dennis Smit
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * AUTHORS, COPYRIGHT HOLDERS, AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * CPU feature detection.
+ *
+ * @author Dennis Smit
+ * @author Based on the work of Eric Anholt <anholt@FreeBSD.org>
+ */
+
+#include "pipe/p_config.h"
+
+#include "u_debug.h"
+#include "u_cpu_detect.h"
+
+#if defined(PIPE_ARCH_PPC)
+#if defined(PIPE_OS_APPLE)
+#include <sys/sysctl.h>
+#else
+#include <signal.h>
+#include <setjmp.h>
+#endif
+#endif
+
+#if defined(PIPE_OS_NETBSD) || defined(PIPE_OS_OPENBSD)
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <machine/cpu.h>
+#endif
+
+#if defined(PIPE_OS_FREEBSD)
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#endif
+
+#if defined(PIPE_OS_LINUX)
+#include <signal.h>
+#endif
+
+#ifdef PIPE_OS_UNIX
+#include <unistd.h>
+#endif
+
+#if defined(PIPE_OS_WINDOWS)
+#include <windows.h>
+#if defined(PIPE_CC_MSVC)
+#include <intrin.h>
+#endif
+#endif
+
+
+#ifdef DEBUG
+DEBUG_GET_ONCE_BOOL_OPTION(dump_cpu, "GALLIUM_DUMP_CPU", FALSE)
+#endif
+
+
+struct util_cpu_caps util_cpu_caps;
+
+#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
+static int has_cpuid(void);
+#endif
+
+
+#if defined(PIPE_ARCH_PPC) && !defined(PIPE_OS_APPLE)
+static jmp_buf __lv_powerpc_jmpbuf;
+static volatile sig_atomic_t __lv_powerpc_canjump = 0;
+
+static void
+sigill_handler(int sig)
+{
+ if (!__lv_powerpc_canjump) {
+ signal (sig, SIG_DFL);
+ raise (sig);
+ }
+
+ __lv_powerpc_canjump = 0;
+ longjmp(__lv_powerpc_jmpbuf, 1);
+}
+#endif
+
+#if defined(PIPE_ARCH_PPC)
+static void
+check_os_altivec_support(void)
+{
+#if defined(PIPE_OS_APPLE)
+ int sels[2] = {CTL_HW, HW_VECTORUNIT};
+ int has_vu = 0;
+ int len = sizeof (has_vu);
+ int err;
+
+ err = sysctl(sels, 2, &has_vu, &len, NULL, 0);
+
+ if (err == 0) {
+ if (has_vu != 0) {
+ util_cpu_caps.has_altivec = 1;
+ }
+ }
+#else /* !PIPE_OS_APPLE */
+ /* not on Apple/Darwin, do it the brute-force way */
+ /* this is borrowed from the libmpeg2 library */
+ signal(SIGILL, sigill_handler);
+ if (setjmp(__lv_powerpc_jmpbuf)) {
+ signal(SIGILL, SIG_DFL);
+ } else {
+ __lv_powerpc_canjump = 1;
+
+ __asm __volatile
+ ("mtspr 256, %0\n\t"
+ "vand %%v0, %%v0, %%v0"
+ :
+ : "r" (-1));
+
+ signal(SIGILL, SIG_DFL);
+ util_cpu_caps.has_altivec = 1;
+ }
+#endif /* !PIPE_OS_APPLE */
+}
+#endif /* PIPE_ARCH_PPC */
+
+
+#if defined(PIPE_ARCH_X86) || defined (PIPE_ARCH_X86_64)
+static int has_cpuid(void)
+{
+#if defined(PIPE_ARCH_X86)
+#if defined(PIPE_OS_GCC)
+ int a, c;
+
+ __asm __volatile
+ ("pushf\n"
+ "popl %0\n"
+ "movl %0, %1\n"
+ "xorl $0x200000, %0\n"
+ "push %0\n"
+ "popf\n"
+ "pushf\n"
+ "popl %0\n"
+ : "=a" (a), "=c" (c)
+ :
+ : "cc");
+
+ return a != c;
+#else
+ /* FIXME */
+ return 1;
+#endif
+#elif defined(PIPE_ARCH_X86_64)
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+
+/**
+ * @sa cpuid.h included in gcc-4.3 onwards.
+ * @sa http://msdn.microsoft.com/en-us/library/hskdteyh.aspx
+ */
+static INLINE void
+cpuid(uint32_t ax, uint32_t *p)
+{
+#if (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86)
+ __asm __volatile (
+ "xchgl %%ebx, %1\n\t"
+ "cpuid\n\t"
+ "xchgl %%ebx, %1"
+ : "=a" (p[0]),
+ "=S" (p[1]),
+ "=c" (p[2]),
+ "=d" (p[3])
+ : "0" (ax)
+ );
+#elif (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86_64)
+ __asm __volatile (
+ "cpuid\n\t"
+ : "=a" (p[0]),
+ "=b" (p[1]),
+ "=c" (p[2]),
+ "=d" (p[3])
+ : "0" (ax)
+ );
+#elif defined(PIPE_CC_MSVC)
+ __cpuid(p, ax);
+#else
+ p[0] = 0;
+ p[1] = 0;
+ p[2] = 0;
+ p[3] = 0;
+#endif
+}
+
+/**
+ * @sa cpuid.h included in gcc-4.4 onwards.
+ * @sa http://msdn.microsoft.com/en-us/library/hskdteyh%28v=vs.90%29.aspx
+ */
+static INLINE void
+cpuid_count(uint32_t ax, uint32_t cx, uint32_t *p)
+{
+#if (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86)
+ __asm __volatile (
+ "xchgl %%ebx, %1\n\t"
+ "cpuid\n\t"
+ "xchgl %%ebx, %1"
+ : "=a" (p[0]),
+ "=S" (p[1]),
+ "=c" (p[2]),
+ "=d" (p[3])
+ : "0" (ax), "2" (cx)
+ );
+#elif (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86_64)
+ __asm __volatile (
+ "cpuid\n\t"
+ : "=a" (p[0]),
+ "=b" (p[1]),
+ "=c" (p[2]),
+ "=d" (p[3])
+ : "0" (ax), "2" (cx)
+ );
+#elif defined(PIPE_CC_MSVC)
+ __cpuidex(p, ax, cx);
+#else
+ p[0] = 0;
+ p[1] = 0;
+ p[2] = 0;
+ p[3] = 0;
+#endif
+}
+
+
+static INLINE uint64_t xgetbv(void)
+{
+#if defined(PIPE_CC_GCC)
+ uint32_t eax, edx;
+
+ __asm __volatile (
+ ".byte 0x0f, 0x01, 0xd0" // xgetbv isn't supported on gcc < 4.4
+ : "=a"(eax),
+ "=d"(edx)
+ : "c"(0)
+ );
+
+ return ((uint64_t)edx << 32) | eax;
+#elif defined(PIPE_CC_MSVC) && defined(_MSC_FULL_VER) && defined(_XCR_XFEATURE_ENABLED_MASK)
+ return _xgetbv(_XCR_XFEATURE_ENABLED_MASK);
+#else
+ return 0;
+#endif
+}
+
+
+#if defined(PIPE_ARCH_X86)
+static INLINE boolean sse2_has_daz(void)
+{
+ struct {
+ uint32_t pad1[7];
+ uint32_t mxcsr_mask;
+ uint32_t pad2[128-8];
+ } PIPE_ALIGN_VAR(16) fxarea;
+
+ fxarea.mxcsr_mask = 0;
+#if (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO))
+ __asm __volatile ("fxsave %0" : "+m" (fxarea));
+#elif (defined(PIPE_CC_MSVC) && _MSC_VER >= 1700) || defined(PIPE_CC_ICL)
+ /* 1700 = Visual Studio 2012 */
+ _fxsave(&fxarea);
+#else
+ fxarea.mxcsr_mask = 0;
+#endif
+ return !!(fxarea.mxcsr_mask & (1 << 6));
+}
+#endif
+
+#endif /* X86 or X86_64 */
+
+void
+util_cpu_detect(void)
+{
+ static boolean util_cpu_detect_initialized = FALSE;
+
+ if(util_cpu_detect_initialized)
+ return;
+
+ memset(&util_cpu_caps, 0, sizeof util_cpu_caps);
+
+ /* Count the number of CPUs in system */
+#if defined(PIPE_OS_WINDOWS)
+ {
+ SYSTEM_INFO system_info;
+ GetSystemInfo(&system_info);
+ util_cpu_caps.nr_cpus = system_info.dwNumberOfProcessors;
+ }
+#elif defined(PIPE_OS_UNIX) && defined(_SC_NPROCESSORS_ONLN)
+ util_cpu_caps.nr_cpus = sysconf(_SC_NPROCESSORS_ONLN);
+ if (util_cpu_caps.nr_cpus == -1)
+ util_cpu_caps.nr_cpus = 1;
+#elif defined(PIPE_OS_BSD)
+ {
+ int mib[2], ncpu;
+ int len;
+
+ mib[0] = CTL_HW;
+ mib[1] = HW_NCPU;
+
+ len = sizeof (ncpu);
+ sysctl(mib, 2, &ncpu, &len, NULL, 0);
+ util_cpu_caps.nr_cpus = ncpu;
+ }
+#else
+ util_cpu_caps.nr_cpus = 1;
+#endif
+
+ /* Make the fallback cacheline size nonzero so that it can be
+ * safely passed to align().
+ */
+ util_cpu_caps.cacheline = sizeof(void *);
+
+#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
+ if (has_cpuid()) {
+ uint32_t regs[4];
+ uint32_t regs2[4];
+
+ util_cpu_caps.cacheline = 32;
+
+ /* Get max cpuid level */
+ cpuid(0x00000000, regs);
+
+ if (regs[0] >= 0x00000001) {
+ unsigned int cacheline;
+
+ cpuid (0x00000001, regs2);
+
+ util_cpu_caps.x86_cpu_type = (regs2[0] >> 8) & 0xf;
+ if (util_cpu_caps.x86_cpu_type == 0xf)
+ util_cpu_caps.x86_cpu_type = 8 + ((regs2[0] >> 20) & 255); /* use extended family (P4, IA64) */
+
+ /* general feature flags */
+ util_cpu_caps.has_tsc = (regs2[3] >> 4) & 1; /* 0x0000010 */
+ util_cpu_caps.has_mmx = (regs2[3] >> 23) & 1; /* 0x0800000 */
+ util_cpu_caps.has_sse = (regs2[3] >> 25) & 1; /* 0x2000000 */
+ util_cpu_caps.has_sse2 = (regs2[3] >> 26) & 1; /* 0x4000000 */
+ util_cpu_caps.has_sse3 = (regs2[2] >> 0) & 1; /* 0x0000001 */
+ util_cpu_caps.has_ssse3 = (regs2[2] >> 9) & 1; /* 0x0000020 */
+ util_cpu_caps.has_sse4_1 = (regs2[2] >> 19) & 1;
+ util_cpu_caps.has_sse4_2 = (regs2[2] >> 20) & 1;
+ util_cpu_caps.has_popcnt = (regs2[2] >> 23) & 1;
+ util_cpu_caps.has_avx = ((regs2[2] >> 28) & 1) && // AVX
+ ((regs2[2] >> 27) & 1) && // OSXSAVE
+ ((xgetbv() & 6) == 6); // XMM & YMM
+ util_cpu_caps.has_f16c = (regs2[2] >> 29) & 1;
+ util_cpu_caps.has_mmx2 = util_cpu_caps.has_sse; /* SSE cpus supports mmxext too */
+#if defined(PIPE_ARCH_X86_64)
+ util_cpu_caps.has_daz = 1;
+#else
+ util_cpu_caps.has_daz = util_cpu_caps.has_sse3 ||
+ (util_cpu_caps.has_sse2 && sse2_has_daz());
+#endif
+
+ cacheline = ((regs2[1] >> 8) & 0xFF) * 8;
+ if (cacheline > 0)
+ util_cpu_caps.cacheline = cacheline;
+ }
+ if (util_cpu_caps.has_avx && regs[0] >= 0x00000007) {
+ uint32_t regs7[4];
+ cpuid_count(0x00000007, 0x00000000, regs7);
+ util_cpu_caps.has_avx2 = (regs7[1] >> 5) & 1;
+ }
+
+ if (regs[1] == 0x756e6547 && regs[2] == 0x6c65746e && regs[3] == 0x49656e69) {
+ /* GenuineIntel */
+ util_cpu_caps.has_intel = 1;
+ }
+
+ cpuid(0x80000000, regs);
+
+ if (regs[0] >= 0x80000001) {
+
+ cpuid(0x80000001, regs2);
+
+ util_cpu_caps.has_mmx |= (regs2[3] >> 23) & 1;
+ util_cpu_caps.has_mmx2 |= (regs2[3] >> 22) & 1;
+ util_cpu_caps.has_3dnow = (regs2[3] >> 31) & 1;
+ util_cpu_caps.has_3dnow_ext = (regs2[3] >> 30) & 1;
+
+ util_cpu_caps.has_xop = util_cpu_caps.has_avx &&
+ ((regs2[2] >> 11) & 1);
+ }
+
+ if (regs[0] >= 0x80000006) {
+ cpuid(0x80000006, regs2);
+ util_cpu_caps.cacheline = regs2[2] & 0xFF;
+ }
+
+ if (!util_cpu_caps.has_sse) {
+ util_cpu_caps.has_sse2 = 0;
+ util_cpu_caps.has_sse3 = 0;
+ util_cpu_caps.has_ssse3 = 0;
+ util_cpu_caps.has_sse4_1 = 0;
+ }
+ }
+#endif /* PIPE_ARCH_X86 || PIPE_ARCH_X86_64 */
+
+#if defined(PIPE_ARCH_PPC)
+ check_os_altivec_support();
+#endif /* PIPE_ARCH_PPC */
+
+#ifdef DEBUG
+ if (debug_get_option_dump_cpu()) {
+ debug_printf("util_cpu_caps.nr_cpus = %u\n", util_cpu_caps.nr_cpus);
+
+ debug_printf("util_cpu_caps.x86_cpu_type = %u\n", util_cpu_caps.x86_cpu_type);
+ debug_printf("util_cpu_caps.cacheline = %u\n", util_cpu_caps.cacheline);
+
+ debug_printf("util_cpu_caps.has_tsc = %u\n", util_cpu_caps.has_tsc);
+ debug_printf("util_cpu_caps.has_mmx = %u\n", util_cpu_caps.has_mmx);
+ debug_printf("util_cpu_caps.has_mmx2 = %u\n", util_cpu_caps.has_mmx2);
+ debug_printf("util_cpu_caps.has_sse = %u\n", util_cpu_caps.has_sse);
+ debug_printf("util_cpu_caps.has_sse2 = %u\n", util_cpu_caps.has_sse2);
+ debug_printf("util_cpu_caps.has_sse3 = %u\n", util_cpu_caps.has_sse3);
+ debug_printf("util_cpu_caps.has_ssse3 = %u\n", util_cpu_caps.has_ssse3);
+ debug_printf("util_cpu_caps.has_sse4_1 = %u\n", util_cpu_caps.has_sse4_1);
+ debug_printf("util_cpu_caps.has_sse4_2 = %u\n", util_cpu_caps.has_sse4_2);
+ debug_printf("util_cpu_caps.has_avx = %u\n", util_cpu_caps.has_avx);
+ debug_printf("util_cpu_caps.has_avx2 = %u\n", util_cpu_caps.has_avx2);
+ debug_printf("util_cpu_caps.has_f16c = %u\n", util_cpu_caps.has_f16c);
+ debug_printf("util_cpu_caps.has_popcnt = %u\n", util_cpu_caps.has_popcnt);
+ debug_printf("util_cpu_caps.has_3dnow = %u\n", util_cpu_caps.has_3dnow);
+ debug_printf("util_cpu_caps.has_3dnow_ext = %u\n", util_cpu_caps.has_3dnow_ext);
+ debug_printf("util_cpu_caps.has_xop = %u\n", util_cpu_caps.has_xop);
+ debug_printf("util_cpu_caps.has_altivec = %u\n", util_cpu_caps.has_altivec);
+ debug_printf("util_cpu_caps.has_daz = %u\n", util_cpu_caps.has_daz);
+ }
+#endif
+
+ util_cpu_detect_initialized = TRUE;
+}
diff --git a/src/minigallium/auxiliary/util/u_cpu_detect.h b/src/minigallium/auxiliary/util/u_cpu_detect.h
new file mode 100644
index 0000000..5ccfc93
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_cpu_detect.h
@@ -0,0 +1,87 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Dennis Smit
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * AUTHORS, COPYRIGHT HOLDERS, AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ ***************************************************************************/
+
+/**
+ * @file
+ * CPU feature detection.
+ *
+ * @author Dennis Smit
+ * @author Based on the work of Eric Anholt <anholt@FreeBSD.org>
+ */
+
+#ifndef _UTIL_CPU_DETECT_H
+#define _UTIL_CPU_DETECT_H
+
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_config.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+struct util_cpu_caps {
+ unsigned nr_cpus;
+
+ /* Feature flags */
+ int x86_cpu_type;
+ unsigned cacheline;
+
+ unsigned has_intel:1;
+ unsigned has_tsc:1;
+ unsigned has_mmx:1;
+ unsigned has_mmx2:1;
+ unsigned has_sse:1;
+ unsigned has_sse2:1;
+ unsigned has_sse3:1;
+ unsigned has_ssse3:1;
+ unsigned has_sse4_1:1;
+ unsigned has_sse4_2:1;
+ unsigned has_popcnt:1;
+ unsigned has_avx:1;
+ unsigned has_avx2:1;
+ unsigned has_f16c:1;
+ unsigned has_3dnow:1;
+ unsigned has_3dnow_ext:1;
+ unsigned has_xop:1;
+ unsigned has_altivec:1;
+ unsigned has_daz:1;
+};
+
+extern struct util_cpu_caps
+util_cpu_caps;
+
+void util_cpu_detect(void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _UTIL_CPU_DETECT_H */
diff --git a/src/minigallium/auxiliary/util/u_debug.c b/src/minigallium/auxiliary/util/u_debug.c
new file mode 100644
index 0000000..f4670f2
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_debug.c
@@ -0,0 +1,730 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright (c) 2008 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#include "pipe/p_config.h"
+
+#include "pipe/p_compiler.h"
+#include "util/u_debug.h"
+#include "pipe/p_format.h"
+#include "pipe/p_state.h"
+#include "util/u_inlines.h"
+#include "util/u_format.h"
+#include "util/u_memory.h"
+#include "util/u_string.h"
+#include "util/u_math.h"
+#include "util/u_tile.h"
+#include "util/u_prim.h"
+#include "util/u_surface.h"
+
+#include <stdio.h>
+#include <limits.h> /* CHAR_BIT */
+#include <ctype.h> /* isalnum */
+
+void _debug_vprintf(const char *format, va_list ap)
+{
+ static char buf[4096] = {'\0'};
+#if defined(PIPE_OS_WINDOWS) || defined(PIPE_SUBSYSTEM_EMBEDDED)
+ /* We buffer until we find a newline. */
+ size_t len = strlen(buf);
+ int ret = util_vsnprintf(buf + len, sizeof(buf) - len, format, ap);
+ if(ret > (int)(sizeof(buf) - len - 1) || util_strchr(buf + len, '\n')) {
+ os_log_message(buf);
+ buf[0] = '\0';
+ }
+#else
+ util_vsnprintf(buf, sizeof(buf), format, ap);
+ os_log_message(buf);
+#endif
+}
+
+
+#ifdef DEBUG
+void debug_print_blob( const char *name,
+ const void *blob,
+ unsigned size )
+{
+ const unsigned *ublob = (const unsigned *)blob;
+ unsigned i;
+
+ debug_printf("%s (%d dwords%s)\n", name, size/4,
+ size%4 ? "... plus a few bytes" : "");
+
+ for (i = 0; i < size/4; i++) {
+ debug_printf("%d:\t%08x\n", i, ublob[i]);
+ }
+}
+#endif
+
+
+static boolean
+debug_get_option_should_print(void)
+{
+ static boolean first = TRUE;
+ static boolean value = FALSE;
+
+ if (!first)
+ return value;
+
+ /* Oh hey this will call into this function,
+ * but its cool since we set first to false
+ */
+ first = FALSE;
+ value = debug_get_bool_option("GALLIUM_PRINT_OPTIONS", FALSE);
+ /* XXX should we print this option? Currently it wont */
+ return value;
+}
+
+const char *
+debug_get_option(const char *name, const char *dfault)
+{
+ const char *result;
+
+ result = os_get_option(name);
+ if(!result)
+ result = dfault;
+
+ if (debug_get_option_should_print())
+ debug_printf("%s: %s = %s\n", __FUNCTION__, name, result ? result : "(null)");
+
+ return result;
+}
+
+boolean
+debug_get_bool_option(const char *name, boolean dfault)
+{
+ const char *str = os_get_option(name);
+ boolean result;
+
+ if(str == NULL)
+ result = dfault;
+ else if(!util_strcmp(str, "n"))
+ result = FALSE;
+ else if(!util_strcmp(str, "no"))
+ result = FALSE;
+ else if(!util_strcmp(str, "0"))
+ result = FALSE;
+ else if(!util_strcmp(str, "f"))
+ result = FALSE;
+ else if(!util_strcmp(str, "F"))
+ result = FALSE;
+ else if(!util_strcmp(str, "false"))
+ result = FALSE;
+ else if(!util_strcmp(str, "FALSE"))
+ result = FALSE;
+ else
+ result = TRUE;
+
+ if (debug_get_option_should_print())
+ debug_printf("%s: %s = %s\n", __FUNCTION__, name, result ? "TRUE" : "FALSE");
+
+ return result;
+}
+
+
+long
+debug_get_num_option(const char *name, long dfault)
+{
+ long result;
+ const char *str;
+
+ str = os_get_option(name);
+ if(!str)
+ result = dfault;
+ else {
+ long sign;
+ char c;
+ c = *str++;
+ if(c == '-') {
+ sign = -1;
+ c = *str++;
+ }
+ else {
+ sign = 1;
+ }
+ result = 0;
+ while('0' <= c && c <= '9') {
+ result = result*10 + (c - '0');
+ c = *str++;
+ }
+ result *= sign;
+ }
+
+ if (debug_get_option_should_print())
+ debug_printf("%s: %s = %li\n", __FUNCTION__, name, result);
+
+ return result;
+}
+
+static boolean str_has_option(const char *str, const char *name)
+{
+ /* Empty string. */
+ if (!*str) {
+ return FALSE;
+ }
+
+ /* OPTION=all */
+ if (!util_strcmp(str, "all")) {
+ return TRUE;
+ }
+
+ /* Find 'name' in 'str' surrounded by non-alphanumeric characters. */
+ {
+ const char *start = str;
+ unsigned name_len = strlen(name);
+
+ /* 'start' is the beginning of the currently-parsed word,
+ * we increment 'str' each iteration.
+ * if we find either the end of string or a non-alphanumeric character,
+ * we compare 'start' up to 'str-1' with 'name'. */
+
+ while (1) {
+ if (!*str || !(isalnum(*str) || *str == '_')) {
+ if (str-start == name_len &&
+ !memcmp(start, name, name_len)) {
+ return TRUE;
+ }
+
+ if (!*str) {
+ return FALSE;
+ }
+
+ start = str+1;
+ }
+
+ str++;
+ }
+ }
+
+ return FALSE;
+}
+
+unsigned long
+debug_get_flags_option(const char *name,
+ const struct debug_named_value *flags,
+ unsigned long dfault)
+{
+ unsigned long result;
+ const char *str;
+ const struct debug_named_value *orig = flags;
+ unsigned namealign = 0;
+
+ str = os_get_option(name);
+ if(!str)
+ result = dfault;
+ else if (!util_strcmp(str, "help")) {
+ result = dfault;
+ _debug_printf("%s: help for %s:\n", __FUNCTION__, name);
+ for (; flags->name; ++flags)
+ namealign = MAX2(namealign, strlen(flags->name));
+ for (flags = orig; flags->name; ++flags)
+ _debug_printf("| %*s [0x%0*lx]%s%s\n", namealign, flags->name,
+ (int)sizeof(unsigned long)*CHAR_BIT/4, flags->value,
+ flags->desc ? " " : "", flags->desc ? flags->desc : "");
+ }
+ else {
+ result = 0;
+ while( flags->name ) {
+ if (str_has_option(str, flags->name))
+ result |= flags->value;
+ ++flags;
+ }
+ }
+
+ if (debug_get_option_should_print()) {
+ if (str) {
+ debug_printf("%s: %s = 0x%lx (%s)\n", __FUNCTION__, name, result, str);
+ } else {
+ debug_printf("%s: %s = 0x%lx\n", __FUNCTION__, name, result);
+ }
+ }
+
+ return result;
+}
+
+
+void _debug_assert_fail(const char *expr,
+ const char *file,
+ unsigned line,
+ const char *function)
+{
+ _debug_printf("%s:%u:%s: Assertion `%s' failed.\n", file, line, function, expr);
+ if (debug_get_bool_option("GALLIUM_ABORT_ON_ASSERT", TRUE))
+ os_abort();
+ else
+ _debug_printf("continuing...\n");
+}
+
+
+const char *
+debug_dump_enum(const struct debug_named_value *names,
+ unsigned long value)
+{
+ static char rest[64];
+
+ while(names->name) {
+ if(names->value == value)
+ return names->name;
+ ++names;
+ }
+
+ util_snprintf(rest, sizeof(rest), "0x%08lx", value);
+ return rest;
+}
+
+
+const char *
+debug_dump_enum_noprefix(const struct debug_named_value *names,
+ const char *prefix,
+ unsigned long value)
+{
+ static char rest[64];
+
+ while(names->name) {
+ if(names->value == value) {
+ const char *name = names->name;
+ while (*name == *prefix) {
+ name++;
+ prefix++;
+ }
+ return name;
+ }
+ ++names;
+ }
+
+
+
+ util_snprintf(rest, sizeof(rest), "0x%08lx", value);
+ return rest;
+}
+
+
+const char *
+debug_dump_flags(const struct debug_named_value *names,
+ unsigned long value)
+{
+ static char output[4096];
+ static char rest[256];
+ int first = 1;
+
+ output[0] = '\0';
+
+ while(names->name) {
+ if((names->value & value) == names->value) {
+ if (!first)
+ util_strncat(output, "|", sizeof(output));
+ else
+ first = 0;
+ util_strncat(output, names->name, sizeof(output) - 1);
+ output[sizeof(output) - 1] = '\0';
+ value &= ~names->value;
+ }
+ ++names;
+ }
+
+ if (value) {
+ if (!first)
+ util_strncat(output, "|", sizeof(output));
+ else
+ first = 0;
+
+ util_snprintf(rest, sizeof(rest), "0x%08lx", value);
+ util_strncat(output, rest, sizeof(output) - 1);
+ output[sizeof(output) - 1] = '\0';
+ }
+
+ if(first)
+ return "0";
+
+ return output;
+}
+
+
+#ifdef DEBUG
+void debug_print_format(const char *msg, unsigned fmt )
+{
+ debug_printf("%s: %s\n", msg, util_format_name(fmt));
+}
+#endif
+
+
+
+static const struct debug_named_value pipe_prim_names[] = {
+#ifdef DEBUG
+ DEBUG_NAMED_VALUE(PIPE_PRIM_POINTS),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_LINES),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_LINE_LOOP),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_LINE_STRIP),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_TRIANGLES),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_TRIANGLE_STRIP),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_TRIANGLE_FAN),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_QUADS),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_QUAD_STRIP),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_POLYGON),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_LINES_ADJACENCY),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_LINE_STRIP_ADJACENCY),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_TRIANGLES_ADJACENCY),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY),
+#endif
+ DEBUG_NAMED_VALUE_END
+};
+
+
+const char *u_prim_name( unsigned prim )
+{
+ return debug_dump_enum(pipe_prim_names, prim);
+}
+
+
+
+#ifdef DEBUG
+int fl_indent = 0;
+const char* fl_function[1024];
+
+int debug_funclog_enter(const char* f, const int line, const char* file)
+{
+ int i;
+
+ for (i = 0; i < fl_indent; i++)
+ debug_printf(" ");
+ debug_printf("%s\n", f);
+
+ assert(fl_indent < 1023);
+ fl_function[fl_indent++] = f;
+
+ return 0;
+}
+
+void debug_funclog_exit(const char* f, const int line, const char* file)
+{
+ --fl_indent;
+ assert(fl_indent >= 0);
+ assert(fl_function[fl_indent] == f);
+}
+
+void debug_funclog_enter_exit(const char* f, const int line, const char* file)
+{
+ int i;
+ for (i = 0; i < fl_indent; i++)
+ debug_printf(" ");
+ debug_printf("%s\n", f);
+}
+#endif
+
+
+
+#ifdef DEBUG
+/**
+ * Dump an image to .ppm file.
+ * \param format PIPE_FORMAT_x
+ * \param cpp bytes per pixel
+ * \param width width in pixels
+ * \param height height in pixels
+ * \param stride row stride in bytes
+ */
+void debug_dump_image(const char *prefix,
+ enum pipe_format format, unsigned cpp,
+ unsigned width, unsigned height,
+ unsigned stride,
+ const void *data)
+{
+ /* write a ppm file */
+ char filename[256];
+ unsigned char *rgb8;
+ FILE *f;
+
+ util_snprintf(filename, sizeof(filename), "%s.ppm", prefix);
+
+ rgb8 = MALLOC(height * width * 3);
+ if (!rgb8) {
+ return;
+ }
+
+ util_format_translate(
+ PIPE_FORMAT_R8G8B8_UNORM,
+ rgb8, width * 3,
+ 0, 0,
+ format,
+ data, stride,
+ 0, 0, width, height);
+
+ /* Must be opened in binary mode or DOS line ending causes data
+ * to be read with one byte offset.
+ */
+ f = fopen(filename, "wb");
+ if (f) {
+ fprintf(f, "P6\n");
+ fprintf(f, "# ppm-file created by gallium\n");
+ fprintf(f, "%i %i\n", width, height);
+ fprintf(f, "255\n");
+ fwrite(rgb8, 1, height * width * 3, f);
+ fclose(f);
+ }
+ else {
+ fprintf(stderr, "Can't open %s for writing\n", filename);
+ }
+
+ FREE(rgb8);
+}
+
+/* FIXME: dump resources, not surfaces... */
+void debug_dump_surface(struct pipe_context *pipe,
+ const char *prefix,
+ struct pipe_surface *surface)
+{
+ struct pipe_resource *texture;
+ struct pipe_transfer *transfer;
+ void *data;
+
+ if (!surface)
+ return;
+
+ /* XXX: this doesn't necessarily work, as the driver may be using
+ * temporary storage for the surface which hasn't been propagated
+ * back into the texture. Need to nail down the semantics of views
+ * and transfers a bit better before we can say if extra work needs
+ * to be done here:
+ */
+ texture = surface->texture;
+
+ data = pipe_transfer_map(pipe, texture, surface->u.tex.level,
+ surface->u.tex.first_layer,
+ PIPE_TRANSFER_READ,
+ 0, 0, surface->width, surface->height, &transfer);
+ if(!data)
+ return;
+
+ debug_dump_image(prefix,
+ texture->format,
+ util_format_get_blocksize(texture->format),
+ util_format_get_nblocksx(texture->format, surface->width),
+ util_format_get_nblocksy(texture->format, surface->height),
+ transfer->stride,
+ data);
+
+ pipe->transfer_unmap(pipe, transfer);
+}
+
+
+void debug_dump_texture(struct pipe_context *pipe,
+ const char *prefix,
+ struct pipe_resource *texture)
+{
+ struct pipe_surface *surface, surf_tmpl;
+
+ if (!texture)
+ return;
+
+ /* XXX for now, just dump image for layer=0, level=0 */
+ u_surface_default_template(&surf_tmpl, texture);
+ surface = pipe->create_surface(pipe, texture, &surf_tmpl);
+ if (surface) {
+ debug_dump_surface(pipe, prefix, surface);
+ pipe->surface_destroy(pipe, surface);
+ }
+}
+
+
+#pragma pack(push,2)
+struct bmp_file_header {
+ uint16_t bfType;
+ uint32_t bfSize;
+ uint16_t bfReserved1;
+ uint16_t bfReserved2;
+ uint32_t bfOffBits;
+};
+#pragma pack(pop)
+
+struct bmp_info_header {
+ uint32_t biSize;
+ int32_t biWidth;
+ int32_t biHeight;
+ uint16_t biPlanes;
+ uint16_t biBitCount;
+ uint32_t biCompression;
+ uint32_t biSizeImage;
+ int32_t biXPelsPerMeter;
+ int32_t biYPelsPerMeter;
+ uint32_t biClrUsed;
+ uint32_t biClrImportant;
+};
+
+struct bmp_rgb_quad {
+ uint8_t rgbBlue;
+ uint8_t rgbGreen;
+ uint8_t rgbRed;
+ uint8_t rgbAlpha;
+};
+
+void
+debug_dump_surface_bmp(struct pipe_context *pipe,
+ const char *filename,
+ struct pipe_surface *surface)
+{
+ struct pipe_transfer *transfer;
+ struct pipe_resource *texture = surface->texture;
+ void *ptr;
+
+ ptr = pipe_transfer_map(pipe, texture, surface->u.tex.level,
+ surface->u.tex.first_layer, PIPE_TRANSFER_READ,
+ 0, 0, surface->width, surface->height, &transfer);
+
+ debug_dump_transfer_bmp(pipe, filename, transfer, ptr);
+
+ pipe->transfer_unmap(pipe, transfer);
+}
+
+void
+debug_dump_transfer_bmp(struct pipe_context *pipe,
+ const char *filename,
+ struct pipe_transfer *transfer, void *ptr)
+{
+ float *rgba;
+
+ if (!transfer)
+ goto error1;
+
+ rgba = MALLOC(transfer->box.width *
+ transfer->box.height *
+ transfer->box.depth *
+ 4*sizeof(float));
+ if(!rgba)
+ goto error1;
+
+ pipe_get_tile_rgba(transfer, ptr, 0, 0,
+ transfer->box.width, transfer->box.height,
+ rgba);
+
+ debug_dump_float_rgba_bmp(filename,
+ transfer->box.width, transfer->box.height,
+ rgba, transfer->box.width);
+
+ FREE(rgba);
+error1:
+ ;
+}
+
+void
+debug_dump_float_rgba_bmp(const char *filename,
+ unsigned width, unsigned height,
+ float *rgba, unsigned stride)
+{
+ FILE *stream;
+ struct bmp_file_header bmfh;
+ struct bmp_info_header bmih;
+ unsigned x, y;
+
+ if(!rgba)
+ goto error1;
+
+ bmfh.bfType = 0x4d42;
+ bmfh.bfSize = 14 + 40 + height*width*4;
+ bmfh.bfReserved1 = 0;
+ bmfh.bfReserved2 = 0;
+ bmfh.bfOffBits = 14 + 40;
+
+ bmih.biSize = 40;
+ bmih.biWidth = width;
+ bmih.biHeight = height;
+ bmih.biPlanes = 1;
+ bmih.biBitCount = 32;
+ bmih.biCompression = 0;
+ bmih.biSizeImage = height*width*4;
+ bmih.biXPelsPerMeter = 0;
+ bmih.biYPelsPerMeter = 0;
+ bmih.biClrUsed = 0;
+ bmih.biClrImportant = 0;
+
+ stream = fopen(filename, "wb");
+ if(!stream)
+ goto error1;
+
+ fwrite(&bmfh, 14, 1, stream);
+ fwrite(&bmih, 40, 1, stream);
+
+ y = height;
+ while(y--) {
+ float *ptr = rgba + (stride * y * 4);
+ for(x = 0; x < width; ++x)
+ {
+ struct bmp_rgb_quad pixel;
+ pixel.rgbRed = float_to_ubyte(ptr[x*4 + 0]);
+ pixel.rgbGreen = float_to_ubyte(ptr[x*4 + 1]);
+ pixel.rgbBlue = float_to_ubyte(ptr[x*4 + 2]);
+ pixel.rgbAlpha = float_to_ubyte(ptr[x*4 + 3]);
+ fwrite(&pixel, 1, 4, stream);
+ }
+ }
+
+ fclose(stream);
+error1:
+ ;
+}
+
+
+/**
+ * Print PIPE_TRANSFER_x flags with a message.
+ */
+void
+debug_print_transfer_flags(const char *msg, unsigned usage)
+{
+#define FLAG(x) { x, #x }
+ static const struct {
+ unsigned bit;
+ const char *name;
+ } flags[] = {
+ FLAG(PIPE_TRANSFER_READ),
+ FLAG(PIPE_TRANSFER_WRITE),
+ FLAG(PIPE_TRANSFER_MAP_DIRECTLY),
+ FLAG(PIPE_TRANSFER_DISCARD_RANGE),
+ FLAG(PIPE_TRANSFER_DONTBLOCK),
+ FLAG(PIPE_TRANSFER_UNSYNCHRONIZED),
+ FLAG(PIPE_TRANSFER_FLUSH_EXPLICIT),
+ FLAG(PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE)
+ };
+ unsigned i;
+
+ debug_printf("%s ", msg);
+
+ for (i = 0; i < Elements(flags); i++) {
+ if (usage & flags[i].bit) {
+ debug_printf("%s", flags[i].name);
+ usage &= ~flags[i].bit;
+ if (usage) {
+ debug_printf(" | ");
+ }
+ }
+ }
+
+ debug_printf("\n");
+#undef FLAG
+}
+
+
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_debug.h b/src/minigallium/auxiliary/util/u_debug.h
new file mode 100644
index 0000000..0eb7443
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_debug.h
@@ -0,0 +1,459 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Cross-platform debugging helpers.
+ *
+ * For now it just has assert and printf replacements, but it might be extended
+ * with stack trace reports and more advanced logging in the near future.
+ *
+ * @author Jose Fonseca <jrfonseca@tungstengraphics.com>
+ */
+
+#ifndef U_DEBUG_H_
+#define U_DEBUG_H_
+
+
+#include "os/os_misc.h"
+
+#include "pipe/p_format.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if defined(__GNUC__)
+#define _util_printf_format(fmt, list) __attribute__ ((format (printf, fmt, list)))
+#else
+#define _util_printf_format(fmt, list)
+#endif
+
+void _debug_vprintf(const char *format, va_list ap);
+
+
+static INLINE void
+_debug_printf(const char *format, ...)
+{
+ va_list ap;
+ va_start(ap, format);
+ _debug_vprintf(format, ap);
+ va_end(ap);
+}
+
+
+/**
+ * Print debug messages.
+ *
+ * The actual channel used to output debug message is platform specific. To
+ * avoid misformating or truncation, follow these rules of thumb:
+ * - output whole lines
+ * - avoid outputing large strings (512 bytes is the current maximum length
+ * that is guaranteed to be printed in all platforms)
+ */
+#if !defined(PIPE_OS_HAIKU)
+static INLINE void
+debug_printf(const char *format, ...) _util_printf_format(1,2);
+
+static INLINE void
+debug_printf(const char *format, ...)
+{
+#ifdef DEBUG
+ va_list ap;
+ va_start(ap, format);
+ _debug_vprintf(format, ap);
+ va_end(ap);
+#else
+ (void) format; /* silence warning */
+#endif
+}
+#else /* is Haiku */
+/* Haiku provides debug_printf in libroot with OS.h */
+#include <OS.h>
+#endif
+
+
+/*
+ * ... isn't portable so we need to pass arguments in parentheses.
+ *
+ * usage:
+ * debug_printf_once(("answer: %i\n", 42));
+ */
+#define debug_printf_once(args) \
+ do { \
+ static boolean once = TRUE; \
+ if (once) { \
+ once = FALSE; \
+ debug_printf args; \
+ } \
+ } while (0)
+
+
+#ifdef DEBUG
+#define debug_vprintf(_format, _ap) _debug_vprintf(_format, _ap)
+#else
+#define debug_vprintf(_format, _ap) ((void)0)
+#endif
+
+
+#ifdef DEBUG
+/**
+ * Dump a blob in hex to the same place that debug_printf sends its
+ * messages.
+ */
+void debug_print_blob( const char *name, const void *blob, unsigned size );
+
+/* Print a message along with a prettified format string
+ */
+void debug_print_format(const char *msg, unsigned fmt );
+#else
+#define debug_print_blob(_name, _blob, _size) ((void)0)
+#define debug_print_format(_msg, _fmt) ((void)0)
+#endif
+
+
+/**
+ * Hard-coded breakpoint.
+ */
+#ifdef DEBUG
+#define debug_break() os_break()
+#else /* !DEBUG */
+#define debug_break() ((void)0)
+#endif /* !DEBUG */
+
+
+long
+debug_get_num_option(const char *name, long dfault);
+
+void _debug_assert_fail(const char *expr,
+ const char *file,
+ unsigned line,
+ const char *function);
+
+
+/**
+ * Assert macro
+ *
+ * Do not expect that the assert call terminates -- errors must be handled
+ * regardless of assert behavior.
+ *
+ * For non debug builds the assert macro will expand to a no-op, so do not
+ * call functions with side effects in the assert expression.
+ */
+#ifdef DEBUG
+#define debug_assert(expr) ((expr) ? (void)0 : _debug_assert_fail(#expr, __FILE__, __LINE__, __FUNCTION__))
+#else
+#define debug_assert(expr) do { } while (0 && (expr))
+#endif
+
+
+/** Override standard assert macro */
+#ifdef assert
+#undef assert
+#endif
+#define assert(expr) debug_assert(expr)
+
+
+/**
+ * Output the current function name.
+ */
+#ifdef DEBUG
+#define debug_checkpoint() \
+ _debug_printf("%s\n", __FUNCTION__)
+#else
+#define debug_checkpoint() \
+ ((void)0)
+#endif
+
+
+/**
+ * Output the full source code position.
+ */
+#ifdef DEBUG
+#define debug_checkpoint_full() \
+ _debug_printf("%s:%u:%s\n", __FILE__, __LINE__, __FUNCTION__)
+#else
+#define debug_checkpoint_full() \
+ ((void)0)
+#endif
+
+
+/**
+ * Output a warning message. Muted on release version.
+ */
+#ifdef DEBUG
+#define debug_warning(__msg) \
+ _debug_printf("%s:%u:%s: warning: %s\n", __FILE__, __LINE__, __FUNCTION__, __msg)
+#else
+#define debug_warning(__msg) \
+ ((void)0)
+#endif
+
+
+/**
+ * Emit a warning message, but only once.
+ */
+#ifdef DEBUG
+#define debug_warn_once(__msg) \
+ do { \
+ static bool warned = FALSE; \
+ if (!warned) { \
+ _debug_printf("%s:%u:%s: one time warning: %s\n", \
+ __FILE__, __LINE__, __FUNCTION__, __msg); \
+ warned = TRUE; \
+ } \
+ } while (0)
+#else
+#define debug_warn_once(__msg) \
+ ((void)0)
+#endif
+
+
+/**
+ * Output an error message. Not muted on release version.
+ */
+#ifdef DEBUG
+#define debug_error(__msg) \
+ _debug_printf("%s:%u:%s: error: %s\n", __FILE__, __LINE__, __FUNCTION__, __msg)
+#else
+#define debug_error(__msg) \
+ _debug_printf("error: %s\n", __msg)
+#endif
+
+
+/**
+ * Used by debug_dump_enum and debug_dump_flags to describe symbols.
+ */
+struct debug_named_value
+{
+ const char *name;
+ unsigned long value;
+ const char *desc;
+};
+
+
+/**
+ * Some C pre-processor magic to simplify creating named values.
+ *
+ * Example:
+ * @code
+ * static const debug_named_value my_names[] = {
+ * DEBUG_NAMED_VALUE(MY_ENUM_VALUE_X),
+ * DEBUG_NAMED_VALUE(MY_ENUM_VALUE_Y),
+ * DEBUG_NAMED_VALUE(MY_ENUM_VALUE_Z),
+ * DEBUG_NAMED_VALUE_END
+ * };
+ *
+ * ...
+ * debug_printf("%s = %s\n",
+ * name,
+ * debug_dump_enum(my_names, my_value));
+ * ...
+ * @endcode
+ */
+#define DEBUG_NAMED_VALUE(__symbol) {#__symbol, (unsigned long)__symbol, NULL}
+#define DEBUG_NAMED_VALUE_WITH_DESCRIPTION(__symbol, __desc) {#__symbol, (unsigned long)__symbol, __desc}
+#define DEBUG_NAMED_VALUE_END {NULL, 0, NULL}
+
+
+/**
+ * Convert a enum value to a string.
+ */
+const char *
+debug_dump_enum(const struct debug_named_value *names,
+ unsigned long value);
+
+const char *
+debug_dump_enum_noprefix(const struct debug_named_value *names,
+ const char *prefix,
+ unsigned long value);
+
+
+/**
+ * Convert binary flags value to a string.
+ */
+const char *
+debug_dump_flags(const struct debug_named_value *names,
+ unsigned long value);
+
+
+/**
+ * Function enter exit loggers
+ */
+#ifdef DEBUG
+int debug_funclog_enter(const char* f, const int line, const char* file);
+void debug_funclog_exit(const char* f, const int line, const char* file);
+void debug_funclog_enter_exit(const char* f, const int line, const char* file);
+
+#define DEBUG_FUNCLOG_ENTER() \
+ int __debug_decleration_work_around = \
+ debug_funclog_enter(__FUNCTION__, __LINE__, __FILE__)
+#define DEBUG_FUNCLOG_EXIT() \
+ do { \
+ (void)__debug_decleration_work_around; \
+ debug_funclog_exit(__FUNCTION__, __LINE__, __FILE__); \
+ return; \
+ } while(0)
+#define DEBUG_FUNCLOG_EXIT_RET(ret) \
+ do { \
+ (void)__debug_decleration_work_around; \
+ debug_funclog_exit(__FUNCTION__, __LINE__, __FILE__); \
+ return ret; \
+ } while(0)
+#define DEBUG_FUNCLOG_ENTER_EXIT() \
+ debug_funclog_enter_exit(__FUNCTION__, __LINE__, __FILE__)
+
+#else
+#define DEBUG_FUNCLOG_ENTER() \
+ int __debug_decleration_work_around
+#define DEBUG_FUNCLOG_EXIT() \
+ do { (void)__debug_decleration_work_around; return; } while(0)
+#define DEBUG_FUNCLOG_EXIT_RET(ret) \
+ do { (void)__debug_decleration_work_around; return ret; } while(0)
+#define DEBUG_FUNCLOG_ENTER_EXIT()
+#endif
+
+
+/**
+ * Get option.
+ *
+ * It is an alias for getenv on Linux.
+ *
+ * On Windows it reads C:\gallium.cfg, which is a text file with CR+LF line
+ * endings with one option per line as
+ *
+ * NAME=value
+ *
+ * This file must be terminated with an extra empty line.
+ */
+const char *
+debug_get_option(const char *name, const char *dfault);
+
+boolean
+debug_get_bool_option(const char *name, boolean dfault);
+
+long
+debug_get_num_option(const char *name, long dfault);
+
+unsigned long
+debug_get_flags_option(const char *name,
+ const struct debug_named_value *flags,
+ unsigned long dfault);
+
+#define DEBUG_GET_ONCE_BOOL_OPTION(sufix, name, dfault) \
+static boolean \
+debug_get_option_ ## sufix (void) \
+{ \
+ static boolean first = TRUE; \
+ static boolean value; \
+ if (first) { \
+ first = FALSE; \
+ value = debug_get_bool_option(name, dfault); \
+ } \
+ return value; \
+}
+
+#define DEBUG_GET_ONCE_NUM_OPTION(sufix, name, dfault) \
+static long \
+debug_get_option_ ## sufix (void) \
+{ \
+ static boolean first = TRUE; \
+ static long value; \
+ if (first) { \
+ first = FALSE; \
+ value = debug_get_num_option(name, dfault); \
+ } \
+ return value; \
+}
+
+#define DEBUG_GET_ONCE_FLAGS_OPTION(sufix, name, flags, dfault) \
+static unsigned long \
+debug_get_option_ ## sufix (void) \
+{ \
+ static boolean first = TRUE; \
+ static unsigned long value; \
+ if (first) { \
+ first = FALSE; \
+ value = debug_get_flags_option(name, flags, dfault); \
+ } \
+ return value; \
+}
+
+
+unsigned long
+debug_memory_begin(void);
+
+void
+debug_memory_end(unsigned long beginning);
+
+
+#ifdef DEBUG
+struct pipe_context;
+struct pipe_surface;
+struct pipe_transfer;
+struct pipe_resource;
+
+void debug_dump_image(const char *prefix,
+ enum pipe_format format, unsigned cpp,
+ unsigned width, unsigned height,
+ unsigned stride,
+ const void *data);
+void debug_dump_surface(struct pipe_context *pipe,
+ const char *prefix,
+ struct pipe_surface *surface);
+void debug_dump_texture(struct pipe_context *pipe,
+ const char *prefix,
+ struct pipe_resource *texture);
+void debug_dump_surface_bmp(struct pipe_context *pipe,
+ const char *filename,
+ struct pipe_surface *surface);
+void debug_dump_transfer_bmp(struct pipe_context *pipe,
+ const char *filename,
+ struct pipe_transfer *transfer, void *ptr);
+void debug_dump_float_rgba_bmp(const char *filename,
+ unsigned width, unsigned height,
+ float *rgba, unsigned stride);
+#else
+#define debug_dump_image(prefix, format, cpp, width, height, stride, data) ((void)0)
+#define debug_dump_surface(pipe, prefix, surface) ((void)0)
+#define debug_dump_surface_bmp(pipe, filename, surface) ((void)0)
+#define debug_dump_transfer_bmp(filename, transfer, ptr) ((void)0)
+#define debug_dump_float_rgba_bmp(filename, width, height, rgba, stride) ((void)0)
+#endif
+
+
+void
+debug_print_transfer_flags(const char *msg, unsigned usage);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_DEBUG_H_ */
diff --git a/src/minigallium/auxiliary/util/u_debug_describe.c b/src/minigallium/auxiliary/util/u_debug_describe.c
new file mode 100644
index 0000000..df73ed8
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_debug_describe.c
@@ -0,0 +1,91 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "pipe/p_state.h"
+#include "util/u_format.h"
+#include "util/u_debug_describe.h"
+#include "util/u_string.h"
+
+void
+debug_describe_reference(char* buf, const struct pipe_reference*ptr)
+{
+ strcpy(buf, "pipe_object");
+}
+
+void
+debug_describe_resource(char* buf, const struct pipe_resource *ptr)
+{
+ switch(ptr->target)
+ {
+ case PIPE_BUFFER:
+ util_sprintf(buf, "pipe_buffer<%u>", (unsigned)util_format_get_stride(ptr->format, ptr->width0));
+ break;
+ case PIPE_TEXTURE_1D:
+ util_sprintf(buf, "pipe_texture1d<%u,%s,%u>", ptr->width0, util_format_short_name(ptr->format), ptr->last_level);
+ break;
+ case PIPE_TEXTURE_2D:
+ util_sprintf(buf, "pipe_texture2d<%u,%u,%s,%u>", ptr->width0, ptr->height0, util_format_short_name(ptr->format), ptr->last_level);
+ break;
+ case PIPE_TEXTURE_RECT:
+ util_sprintf(buf, "pipe_texture_rect<%u,%u,%s>", ptr->width0, ptr->height0, util_format_short_name(ptr->format));
+ break;
+ case PIPE_TEXTURE_CUBE:
+ util_sprintf(buf, "pipe_texture_cube<%u,%u,%s,%u>", ptr->width0, ptr->height0, util_format_short_name(ptr->format), ptr->last_level);
+ break;
+ case PIPE_TEXTURE_3D:
+ util_sprintf(buf, "pipe_texture3d<%u,%u,%u,%s,%u>", ptr->width0, ptr->height0, ptr->depth0, util_format_short_name(ptr->format), ptr->last_level);
+ break;
+ default:
+ util_sprintf(buf, "pipe_martian_resource<%u>", ptr->target);
+ break;
+ }
+}
+
+void
+debug_describe_surface(char* buf, const struct pipe_surface *ptr)
+{
+ char res[128];
+ debug_describe_resource(res, ptr->texture);
+ util_sprintf(buf, "pipe_surface<%s,%u,%u,%u>", res, ptr->u.tex.level, ptr->u.tex.first_layer, ptr->u.tex.last_layer);
+}
+
+void
+debug_describe_sampler_view(char* buf, const struct pipe_sampler_view *ptr)
+{
+ char res[128];
+ debug_describe_resource(res, ptr->texture);
+ util_sprintf(buf, "pipe_sampler_view<%s,%s>", res, util_format_short_name(ptr->format));
+}
+
+void
+debug_describe_so_target(char* buf,
+ const struct pipe_stream_output_target *ptr)
+{
+ char res[128];
+ debug_describe_resource(res, ptr->buffer);
+ util_sprintf(buf, "pipe_stream_output_target<%s,%u,%u>", res,
+ ptr->buffer_offset, ptr->buffer_size);
+}
diff --git a/src/minigallium/auxiliary/util/u_debug_describe.h b/src/minigallium/auxiliary/util/u_debug_describe.h
new file mode 100644
index 0000000..4f7882b
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_debug_describe.h
@@ -0,0 +1,51 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_DEBUG_DESCRIBE_H_
+#define U_DEBUG_DESCRIBE_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct pipe_reference;
+struct pipe_resource;
+struct pipe_surface;
+struct pipe_sampler_view;
+
+/* a 256-byte buffer is necessary and sufficient */
+void debug_describe_reference(char* buf, const struct pipe_reference*ptr);
+void debug_describe_resource(char* buf, const struct pipe_resource *ptr);
+void debug_describe_surface(char* buf, const struct pipe_surface *ptr);
+void debug_describe_sampler_view(char* buf, const struct pipe_sampler_view *ptr);
+void debug_describe_so_target(char* buf,
+ const struct pipe_stream_output_target *ptr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_DEBUG_DESCRIBE_H_ */
diff --git a/src/minigallium/auxiliary/util/u_debug_memory.c b/src/minigallium/auxiliary/util/u_debug_memory.c
new file mode 100644
index 0000000..4723547
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_debug_memory.c
@@ -0,0 +1,451 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Memory debugging.
+ *
+ * @author José Fonseca <jrfonseca@tungstengraphics.com>
+ */
+
+#include "pipe/p_config.h"
+
+#define DEBUG_MEMORY_IMPLEMENTATION
+
+#include "os/os_memory.h"
+#include "os/os_memory_debug.h"
+#include "os/os_thread.h"
+
+#include "util/u_debug.h"
+#include "util/u_debug_stack.h"
+#include "util/u_double_list.h"
+
+
+#define DEBUG_MEMORY_MAGIC 0x6e34090aU
+#define DEBUG_MEMORY_STACK 0 /* XXX: disabled until we have symbol lookup */
+
+/**
+ * Set to 1 to enable checking of freed blocks of memory.
+ * Basically, don't really deallocate freed memory; keep it in the list
+ * but mark it as freed and do extra checking in debug_memory_check().
+ * This can detect some cases of use-after-free. But note that since we
+ * never really free anything this will use a lot of memory.
+ */
+#define DEBUG_FREED_MEMORY 0
+#define DEBUG_FREED_BYTE 0x33
+
+
+struct debug_memory_header
+{
+ struct list_head head;
+
+ unsigned long no;
+ const char *file;
+ unsigned line;
+ const char *function;
+#if DEBUG_MEMORY_STACK
+ struct debug_stack_frame backtrace[DEBUG_MEMORY_STACK];
+#endif
+ size_t size;
+#if DEBUG_FREED_MEMORY
+ boolean freed; /**< Is this a freed block? */
+#endif
+
+ unsigned magic;
+ unsigned tag;
+};
+
+struct debug_memory_footer
+{
+ unsigned magic;
+};
+
+
+static struct list_head list = { &list, &list };
+
+pipe_static_mutex(list_mutex);
+
+static unsigned long last_no = 0;
+
+
+static INLINE struct debug_memory_header *
+header_from_data(void *data)
+{
+ if(data)
+ return (struct debug_memory_header *)((char *)data - sizeof(struct debug_memory_header));
+ else
+ return NULL;
+}
+
+static INLINE void *
+data_from_header(struct debug_memory_header *hdr)
+{
+ if(hdr)
+ return (void *)((char *)hdr + sizeof(struct debug_memory_header));
+ else
+ return NULL;
+}
+
+static INLINE struct debug_memory_footer *
+footer_from_header(struct debug_memory_header *hdr)
+{
+ if(hdr)
+ return (struct debug_memory_footer *)((char *)hdr + sizeof(struct debug_memory_header) + hdr->size);
+ else
+ return NULL;
+}
+
+
+void *
+debug_malloc(const char *file, unsigned line, const char *function,
+ size_t size)
+{
+ struct debug_memory_header *hdr;
+ struct debug_memory_footer *ftr;
+
+ hdr = os_malloc(sizeof(*hdr) + size + sizeof(*ftr));
+ if(!hdr) {
+ debug_printf("%s:%u:%s: out of memory when trying to allocate %lu bytes\n",
+ file, line, function,
+ (long unsigned)size);
+ return NULL;
+ }
+
+ hdr->no = last_no++;
+ hdr->file = file;
+ hdr->line = line;
+ hdr->function = function;
+ hdr->size = size;
+ hdr->magic = DEBUG_MEMORY_MAGIC;
+ hdr->tag = 0;
+#if DEBUG_FREED_MEMORY
+ hdr->freed = FALSE;
+#endif
+
+#if DEBUG_MEMORY_STACK
+ debug_backtrace_capture(hdr->backtrace, 0, DEBUG_MEMORY_STACK);
+#endif
+
+ ftr = footer_from_header(hdr);
+ ftr->magic = DEBUG_MEMORY_MAGIC;
+
+ pipe_mutex_lock(list_mutex);
+ LIST_ADDTAIL(&hdr->head, &list);
+ pipe_mutex_unlock(list_mutex);
+
+ return data_from_header(hdr);
+}
+
+void
+debug_free(const char *file, unsigned line, const char *function,
+ void *ptr)
+{
+ struct debug_memory_header *hdr;
+ struct debug_memory_footer *ftr;
+
+ if(!ptr)
+ return;
+
+ hdr = header_from_data(ptr);
+ if(hdr->magic != DEBUG_MEMORY_MAGIC) {
+ debug_printf("%s:%u:%s: freeing bad or corrupted memory %p\n",
+ file, line, function,
+ ptr);
+ debug_assert(0);
+ return;
+ }
+
+ ftr = footer_from_header(hdr);
+ if(ftr->magic != DEBUG_MEMORY_MAGIC) {
+ debug_printf("%s:%u:%s: buffer overflow %p\n",
+ hdr->file, hdr->line, hdr->function,
+ ptr);
+ debug_assert(0);
+ }
+
+#if DEBUG_FREED_MEMORY
+ /* Check for double-free */
+ assert(!hdr->freed);
+ /* Mark the block as freed but don't really free it */
+ hdr->freed = TRUE;
+ /* Save file/line where freed */
+ hdr->file = file;
+ hdr->line = line;
+ /* set freed memory to special value */
+ memset(ptr, DEBUG_FREED_BYTE, hdr->size);
+#else
+ pipe_mutex_lock(list_mutex);
+ LIST_DEL(&hdr->head);
+ pipe_mutex_unlock(list_mutex);
+ hdr->magic = 0;
+ ftr->magic = 0;
+
+ os_free(hdr);
+#endif
+}
+
+void *
+debug_calloc(const char *file, unsigned line, const char *function,
+ size_t count, size_t size )
+{
+ void *ptr = debug_malloc( file, line, function, count * size );
+ if( ptr )
+ memset( ptr, 0, count * size );
+ return ptr;
+}
+
+void *
+debug_realloc(const char *file, unsigned line, const char *function,
+ void *old_ptr, size_t old_size, size_t new_size )
+{
+ struct debug_memory_header *old_hdr, *new_hdr;
+ struct debug_memory_footer *old_ftr, *new_ftr;
+ void *new_ptr;
+
+ if(!old_ptr)
+ return debug_malloc( file, line, function, new_size );
+
+ if(!new_size) {
+ debug_free( file, line, function, old_ptr );
+ return NULL;
+ }
+
+ old_hdr = header_from_data(old_ptr);
+ if(old_hdr->magic != DEBUG_MEMORY_MAGIC) {
+ debug_printf("%s:%u:%s: reallocating bad or corrupted memory %p\n",
+ file, line, function,
+ old_ptr);
+ debug_assert(0);
+ return NULL;
+ }
+
+ old_ftr = footer_from_header(old_hdr);
+ if(old_ftr->magic != DEBUG_MEMORY_MAGIC) {
+ debug_printf("%s:%u:%s: buffer overflow %p\n",
+ old_hdr->file, old_hdr->line, old_hdr->function,
+ old_ptr);
+ debug_assert(0);
+ }
+
+ /* alloc new */
+ new_hdr = os_malloc(sizeof(*new_hdr) + new_size + sizeof(*new_ftr));
+ if(!new_hdr) {
+ debug_printf("%s:%u:%s: out of memory when trying to allocate %lu bytes\n",
+ file, line, function,
+ (long unsigned)new_size);
+ return NULL;
+ }
+ new_hdr->no = old_hdr->no;
+ new_hdr->file = old_hdr->file;
+ new_hdr->line = old_hdr->line;
+ new_hdr->function = old_hdr->function;
+ new_hdr->size = new_size;
+ new_hdr->magic = DEBUG_MEMORY_MAGIC;
+ new_hdr->tag = 0;
+#if DEBUG_FREED_MEMORY
+ new_hdr->freed = FALSE;
+#endif
+
+ new_ftr = footer_from_header(new_hdr);
+ new_ftr->magic = DEBUG_MEMORY_MAGIC;
+
+ pipe_mutex_lock(list_mutex);
+ LIST_REPLACE(&old_hdr->head, &new_hdr->head);
+ pipe_mutex_unlock(list_mutex);
+
+ /* copy data */
+ new_ptr = data_from_header(new_hdr);
+ memcpy( new_ptr, old_ptr, old_size < new_size ? old_size : new_size );
+
+ /* free old */
+ old_hdr->magic = 0;
+ old_ftr->magic = 0;
+ os_free(old_hdr);
+
+ return new_ptr;
+}
+
+unsigned long
+debug_memory_begin(void)
+{
+ return last_no;
+}
+
+void
+debug_memory_end(unsigned long start_no)
+{
+ size_t total_size = 0;
+ struct list_head *entry;
+
+ if(start_no == last_no)
+ return;
+
+ entry = list.prev;
+ for (; entry != &list; entry = entry->prev) {
+ struct debug_memory_header *hdr;
+ void *ptr;
+ struct debug_memory_footer *ftr;
+
+ hdr = LIST_ENTRY(struct debug_memory_header, entry, head);
+ ptr = data_from_header(hdr);
+ ftr = footer_from_header(hdr);
+
+ if(hdr->magic != DEBUG_MEMORY_MAGIC) {
+ debug_printf("%s:%u:%s: bad or corrupted memory %p\n",
+ hdr->file, hdr->line, hdr->function,
+ ptr);
+ debug_assert(0);
+ }
+
+ if((start_no <= hdr->no && hdr->no < last_no) ||
+ (last_no < start_no && (hdr->no < last_no || start_no <= hdr->no))) {
+ debug_printf("%s:%u:%s: %lu bytes at %p not freed\n",
+ hdr->file, hdr->line, hdr->function,
+ (unsigned long) hdr->size, ptr);
+#if DEBUG_MEMORY_STACK
+ debug_backtrace_dump(hdr->backtrace, DEBUG_MEMORY_STACK);
+#endif
+ total_size += hdr->size;
+ }
+
+ if(ftr->magic != DEBUG_MEMORY_MAGIC) {
+ debug_printf("%s:%u:%s: buffer overflow %p\n",
+ hdr->file, hdr->line, hdr->function,
+ ptr);
+ debug_assert(0);
+ }
+ }
+
+ if(total_size) {
+ debug_printf("Total of %lu KB of system memory apparently leaked\n",
+ (unsigned long) (total_size + 1023)/1024);
+ }
+ else {
+ debug_printf("No memory leaks detected.\n");
+ }
+}
+
+
+/**
+ * Put a tag (arbitrary integer) on a memory block.
+ * Can be useful for debugging.
+ */
+void
+debug_memory_tag(void *ptr, unsigned tag)
+{
+ struct debug_memory_header *hdr;
+
+ if (!ptr)
+ return;
+
+ hdr = header_from_data(ptr);
+ if (hdr->magic != DEBUG_MEMORY_MAGIC) {
+ debug_printf("%s corrupted memory at %p\n", __FUNCTION__, ptr);
+ debug_assert(0);
+ }
+
+ hdr->tag = tag;
+}
+
+
+/**
+ * Check the given block of memory for validity/corruption.
+ */
+void
+debug_memory_check_block(void *ptr)
+{
+ struct debug_memory_header *hdr;
+ struct debug_memory_footer *ftr;
+
+ if (!ptr)
+ return;
+
+ hdr = header_from_data(ptr);
+ ftr = footer_from_header(hdr);
+
+ if (hdr->magic != DEBUG_MEMORY_MAGIC) {
+ debug_printf("%s:%u:%s: bad or corrupted memory %p\n",
+ hdr->file, hdr->line, hdr->function, ptr);
+ debug_assert(0);
+ }
+
+ if (ftr->magic != DEBUG_MEMORY_MAGIC) {
+ debug_printf("%s:%u:%s: buffer overflow %p\n",
+ hdr->file, hdr->line, hdr->function, ptr);
+ debug_assert(0);
+ }
+}
+
+
+
+/**
+ * We can periodically call this from elsewhere to do a basic sanity
+ * check of the heap memory we've allocated.
+ */
+void
+debug_memory_check(void)
+{
+ struct list_head *entry;
+
+ entry = list.prev;
+ for (; entry != &list; entry = entry->prev) {
+ struct debug_memory_header *hdr;
+ struct debug_memory_footer *ftr;
+ const char *ptr;
+
+ hdr = LIST_ENTRY(struct debug_memory_header, entry, head);
+ ftr = footer_from_header(hdr);
+ ptr = (const char *) data_from_header(hdr);
+
+ if (hdr->magic != DEBUG_MEMORY_MAGIC) {
+ debug_printf("%s:%u:%s: bad or corrupted memory %p\n",
+ hdr->file, hdr->line, hdr->function, ptr);
+ debug_assert(0);
+ }
+
+ if (ftr->magic != DEBUG_MEMORY_MAGIC) {
+ debug_printf("%s:%u:%s: buffer overflow %p\n",
+ hdr->file, hdr->line, hdr->function, ptr);
+ debug_assert(0);
+ }
+
+#if DEBUG_FREED_MEMORY
+ /* If this block is marked as freed, check that it hasn't been touched */
+ if (hdr->freed) {
+ int i;
+ for (i = 0; i < hdr->size; i++) {
+ if (ptr[i] != DEBUG_FREED_BYTE) {
+ debug_printf("Memory error: byte %d of block at %p of size %d is 0x%x\n",
+ i, ptr, hdr->size, ptr[i]);
+ debug_printf("Block was freed at %s:%d\n", hdr->file, hdr->line);
+ }
+ assert(ptr[i] == DEBUG_FREED_BYTE);
+ }
+ }
+#endif
+ }
+}
diff --git a/src/minigallium/auxiliary/util/u_debug_refcnt.c b/src/minigallium/auxiliary/util/u_debug_refcnt.c
new file mode 100644
index 0000000..a51b4c5
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_debug_refcnt.c
@@ -0,0 +1,195 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#if defined(DEBUG)
+
+/* see http://www.mozilla.org/performance/refcnt-balancer.html for what do with the output
+ * on Linux, use tools/addr2line.sh to postprocess it before anything else
+ **/
+
+#include <stdio.h>
+
+#include "util/u_debug.h"
+#include "util/u_debug_refcnt.h"
+#include "util/u_debug_stack.h"
+#include "util/u_debug_symbol.h"
+#include "util/u_string.h"
+#include "util/u_hash_table.h"
+#include "os/os_thread.h"
+
+int debug_refcnt_state;
+
+FILE* stream;
+
+/* TODO: maybe move this serial machinery to a stand-alone module and expose it? */
+pipe_static_mutex(serials_mutex);
+
+static struct util_hash_table* serials_hash;
+static unsigned serials_last;
+
+static unsigned hash_ptr(void* p)
+{
+ return (unsigned)(uintptr_t)p;
+}
+
+static int compare_ptr(void* a, void* b)
+{
+ if(a == b)
+ return 0;
+ else if(a < b)
+ return -1;
+ else
+ return 1;
+}
+
+static boolean debug_serial(void* p, unsigned* pserial)
+{
+ unsigned serial;
+ boolean found = TRUE;
+#ifdef PIPE_SUBSYSTEM_WINDOWS_USER
+ static boolean first = TRUE;
+
+ if (first) {
+ pipe_mutex_init(serials_mutex);
+ first = FALSE;
+ }
+#endif
+
+ pipe_mutex_lock(serials_mutex);
+ if(!serials_hash)
+ serials_hash = util_hash_table_create(hash_ptr, compare_ptr);
+ serial = (unsigned)(uintptr_t)util_hash_table_get(serials_hash, p);
+ if(!serial)
+ {
+ /* time to stop logging... (you'll have a 100 GB logfile at least at this point)
+ * TODO: avoid this
+ */
+ serial = ++serials_last;
+ if(!serial)
+ {
+ debug_error("More than 2^32 objects detected, aborting.\n");
+ os_abort();
+ }
+
+ util_hash_table_set(serials_hash, p, (void*)(uintptr_t)serial);
+ found = FALSE;
+ }
+ pipe_mutex_unlock(serials_mutex);
+ *pserial = serial;
+ return found;
+}
+
+static void debug_serial_delete(void* p)
+{
+ pipe_mutex_lock(serials_mutex);
+ util_hash_table_remove(serials_hash, p);
+ pipe_mutex_unlock(serials_mutex);
+}
+
+#define STACK_LEN 64
+
+static void dump_stack(const char* symbols[STACK_LEN])
+{
+ unsigned i;
+ for(i = 0; i < STACK_LEN; ++i)
+ {
+ if(symbols[i])
+ fprintf(stream, "%s\n", symbols[i]);
+ }
+ fprintf(stream, "\n");
+}
+
+void debug_reference_slowpath(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change)
+{
+ if(debug_refcnt_state < 0)
+ return;
+
+ if(!debug_refcnt_state)
+ {
+ const char* filename = debug_get_option("GALLIUM_REFCNT_LOG", NULL);
+ if(filename && filename[0])
+ stream = fopen(filename, "wt");
+
+ if(stream)
+ debug_refcnt_state = 1;
+ else
+ debug_refcnt_state = -1;
+ }
+
+ if(debug_refcnt_state > 0)
+ {
+ struct debug_stack_frame frames[STACK_LEN];
+ const char* symbols[STACK_LEN];
+ char buf[1024];
+
+ unsigned i;
+ unsigned refcnt = p->count;
+ unsigned serial;
+ boolean existing = debug_serial((void*)p, &serial);
+
+ debug_backtrace_capture(frames, 1, STACK_LEN);
+ for(i = 0; i < STACK_LEN; ++i)
+ {
+ if(frames[i].function)
+ symbols[i] = debug_symbol_name_cached(frames[i].function);
+ else
+ symbols[i] = 0;
+ }
+
+ get_desc(buf, p);
+
+ if(!existing)
+ {
+ fprintf(stream, "<%s> %p %u Create\n", buf, (void *) p, serial);
+ dump_stack(symbols);
+
+ /* this is there to provide a gradual change even if we don't see the initialization */
+ for(i = 1; i <= refcnt - change; ++i)
+ {
+ fprintf(stream, "<%s> %p %u AddRef %u\n", buf, (void *) p,
+ serial, i);
+ dump_stack(symbols);
+ }
+ }
+
+ if(change)
+ {
+ fprintf(stream, "<%s> %p %u %s %u\n", buf, (void *) p, serial,
+ change > 0 ? "AddRef" : "Release", refcnt);
+ dump_stack(symbols);
+ }
+
+ if(!refcnt)
+ {
+ debug_serial_delete((void*)p);
+ fprintf(stream, "<%s> %p %u Destroy\n", buf, (void *) p, serial);
+ dump_stack(symbols);
+ }
+
+ fflush(stream);
+ }
+}
+#endif
diff --git a/src/minigallium/auxiliary/util/u_debug_refcnt.h b/src/minigallium/auxiliary/util/u_debug_refcnt.h
new file mode 100644
index 0000000..c02fba2
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_debug_refcnt.h
@@ -0,0 +1,63 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_DEBUG_REFCNT_H_
+#define U_DEBUG_REFCNT_H_
+
+#include "pipe/p_config.h"
+#include "pipe/p_state.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void (*debug_reference_descriptor)(char*, const struct pipe_reference*);
+
+#if defined(DEBUG) && (!defined(PIPE_OS_WINDOWS) || defined(PIPE_SUBSYSTEM_WINDOWS_USER))
+
+extern int debug_refcnt_state;
+
+void debug_reference_slowpath(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change);
+
+static INLINE void debug_reference(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change)
+{
+ if (debug_refcnt_state >= 0)
+ debug_reference_slowpath(p, get_desc, change);
+}
+
+#else
+
+static INLINE void debug_reference(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change)
+{
+}
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_DEBUG_REFCNT_H_ */
diff --git a/src/minigallium/auxiliary/util/u_debug_stack.c b/src/minigallium/auxiliary/util/u_debug_stack.c
new file mode 100644
index 0000000..68961d3
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_debug_stack.c
@@ -0,0 +1,161 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Stack backtracing.
+ *
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+#include "u_debug.h"
+#include "u_debug_symbol.h"
+#include "u_debug_stack.h"
+
+#if defined(PIPE_OS_WINDOWS)
+#include <windows.h>
+#endif
+
+
+/**
+ * Capture stack backtrace.
+ *
+ * NOTE: The implementation of this function is quite big, but it is important not to
+ * break it down in smaller functions to avoid adding new frames to the calling stack.
+ */
+void
+debug_backtrace_capture(struct debug_stack_frame *backtrace,
+ unsigned start_frame,
+ unsigned nr_frames)
+{
+ const void **frame_pointer = NULL;
+ unsigned i = 0;
+
+ if (!nr_frames) {
+ return;
+ }
+
+ /*
+ * On Windows try obtaining the stack backtrace via CaptureStackBackTrace.
+ *
+ * It works reliably both for x86 for x86_64.
+ */
+#if defined(PIPE_OS_WINDOWS)
+ {
+ typedef USHORT (WINAPI *PFNCAPTURESTACKBACKTRACE)(ULONG, ULONG, PVOID *, PULONG);
+ static PFNCAPTURESTACKBACKTRACE pfnCaptureStackBackTrace = NULL;
+
+ if (!pfnCaptureStackBackTrace) {
+ static HMODULE hModule = NULL;
+ if (!hModule) {
+ hModule = LoadLibraryA("kernel32");
+ assert(hModule);
+ }
+ if (hModule) {
+ pfnCaptureStackBackTrace = (PFNCAPTURESTACKBACKTRACE)GetProcAddress(hModule,
+ "RtlCaptureStackBackTrace");
+ }
+ }
+ if (pfnCaptureStackBackTrace) {
+ /*
+ * Skip this (debug_backtrace_capture) function's frame.
+ */
+
+ start_frame += 1;
+
+ assert(start_frame + nr_frames < 63);
+ i = pfnCaptureStackBackTrace(start_frame, nr_frames, (PVOID *) &backtrace->function, NULL);
+
+ /* Pad remaing requested frames with NULL */
+ while (i < nr_frames) {
+ backtrace[i++].function = NULL;
+ }
+
+ return;
+ }
+ }
+#endif
+
+#if defined(PIPE_CC_GCC)
+ frame_pointer = ((const void **)__builtin_frame_address(1));
+#elif defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86)
+ __asm {
+ mov frame_pointer, ebp
+ }
+ frame_pointer = (const void **)frame_pointer[0];
+#else
+ frame_pointer = NULL;
+#endif
+
+
+#ifdef PIPE_ARCH_X86
+ while(nr_frames) {
+ const void **next_frame_pointer;
+
+ if(!frame_pointer)
+ break;
+
+ if(start_frame)
+ --start_frame;
+ else {
+ backtrace[i++].function = frame_pointer[1];
+ --nr_frames;
+ }
+
+ next_frame_pointer = (const void **)frame_pointer[0];
+
+ /* Limit the stack walk to avoid referencing undefined memory */
+ if((uintptr_t)next_frame_pointer <= (uintptr_t)frame_pointer ||
+ (uintptr_t)next_frame_pointer > (uintptr_t)frame_pointer + 64*1024)
+ break;
+
+ frame_pointer = next_frame_pointer;
+ }
+#else
+ (void) frame_pointer;
+#endif
+
+ while(nr_frames) {
+ backtrace[i++].function = NULL;
+ --nr_frames;
+ }
+}
+
+
+void
+debug_backtrace_dump(const struct debug_stack_frame *backtrace,
+ unsigned nr_frames)
+{
+ unsigned i;
+
+ for(i = 0; i < nr_frames; ++i) {
+ if(!backtrace[i].function)
+ break;
+ debug_symbol_print(backtrace[i].function);
+ }
+}
+
diff --git a/src/minigallium/auxiliary/util/u_debug_stack.h b/src/minigallium/auxiliary/util/u_debug_stack.h
new file mode 100644
index 0000000..b1848dd
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_debug_stack.h
@@ -0,0 +1,72 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_DEBUG_STACK_H_
+#define U_DEBUG_STACK_H_
+
+
+/**
+ * @file
+ * Stack backtracing.
+ *
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * Represent a frame from a stack backtrace.
+ *
+ * XXX: Do not change this.
+ *
+ * TODO: This should be refactored as a void * typedef.
+ */
+struct debug_stack_frame
+{
+ const void *function;
+};
+
+
+void
+debug_backtrace_capture(struct debug_stack_frame *backtrace,
+ unsigned start_frame,
+ unsigned nr_frames);
+
+void
+debug_backtrace_dump(const struct debug_stack_frame *backtrace,
+ unsigned nr_frames);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_DEBUG_STACK_H_ */
diff --git a/src/minigallium/auxiliary/util/u_debug_symbol.c b/src/minigallium/auxiliary/util/u_debug_symbol.c
new file mode 100644
index 0000000..bba9122
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_debug_symbol.c
@@ -0,0 +1,326 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Symbol lookup.
+ *
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+#include "pipe/p_compiler.h"
+#include "os/os_thread.h"
+#include "u_string.h"
+
+#include "u_debug.h"
+#include "u_debug_symbol.h"
+#include "u_hash_table.h"
+
+
+#if defined(PIPE_OS_WINDOWS)
+
+#include <windows.h>
+#include <stddef.h>
+
+#include "dbghelp.h"
+
+
+/**
+ * SymInitialize() must be called once for each process (in this case, the
+ * current process), before any of the other functions can be called.
+ */
+static BOOL g_bSymInitialized = FALSE;
+
+
+/**
+ * Lookup the address of a DbgHelp function.
+ */
+static FARPROC WINAPI
+getDbgHelpProcAddress(LPCSTR lpProcName)
+{
+ static HMODULE hModule = NULL;
+
+ if (!hModule) {
+ static boolean bail = FALSE;
+
+ if (bail) {
+ return NULL;
+ }
+
+#ifdef PIPE_CC_GCC
+ /*
+ * DbgHelp does not understand the debug information generated by MinGW toolchain.
+ *
+ * mgwhelp.dll is a dbghelp.dll look-alike replacement, which is able to
+ * understand MinGW symbols, including on 64-bit builds.
+ */
+ if (!hModule) {
+ hModule = LoadLibraryA("mgwhelp.dll");
+ if (!hModule) {
+ _debug_printf("warning: mgwhelp.dll not found: symbol names will not be resolved\n"
+ "warning: download it from http://code.google.com/p/jrfonseca/wiki/DrMingw#MgwHelp\n");
+ }
+ }
+
+ /*
+ * bfdhelp.dll was the predecessor of mgwhelp.dll. It is available from
+ * http://people.freedesktop.org/~jrfonseca/bfdhelp/ for now.
+ */
+ if (!hModule) {
+ hModule = LoadLibraryA("bfdhelp.dll");
+ }
+ #endif
+
+ /*
+ * Fallback to the real DbgHelp.
+ */
+ if (!hModule) {
+ hModule = LoadLibraryA("dbghelp.dll");
+ }
+
+ if (!hModule) {
+ bail = TRUE;
+ return NULL;
+ }
+ }
+
+ return GetProcAddress(hModule, lpProcName);
+}
+
+
+/**
+ * Generic macro to dispatch a DbgHelp functions.
+ */
+#define DBGHELP_DISPATCH(_name, _ret_type, _ret_default, _arg_types, _arg_names) \
+ static _ret_type WINAPI \
+ j_##_name _arg_types \
+ { \
+ typedef BOOL (WINAPI *PFN) _arg_types; \
+ static PFN pfn = NULL; \
+ if (!pfn) { \
+ pfn = (PFN) getDbgHelpProcAddress(#_name); \
+ if (!pfn) { \
+ return _ret_default; \
+ } \
+ } \
+ return pfn _arg_names; \
+ }
+
+DBGHELP_DISPATCH(SymInitialize,
+ BOOL, 0,
+ (HANDLE hProcess, PSTR UserSearchPath, BOOL fInvadeProcess),
+ (hProcess, UserSearchPath, fInvadeProcess))
+
+DBGHELP_DISPATCH(SymSetOptions,
+ DWORD, FALSE,
+ (DWORD SymOptions),
+ (SymOptions))
+
+DBGHELP_DISPATCH(SymFromAddr,
+ BOOL, FALSE,
+ (HANDLE hProcess, DWORD64 Address, PDWORD64 Displacement, PSYMBOL_INFO Symbol),
+ (hProcess, Address, Displacement, Symbol))
+
+DBGHELP_DISPATCH(SymGetLineFromAddr64,
+ BOOL, FALSE,
+ (HANDLE hProcess, DWORD64 dwAddr, PDWORD pdwDisplacement, PIMAGEHLP_LINE64 Line),
+ (hProcess, dwAddr, pdwDisplacement, Line))
+
+
+#undef DBGHELP_DISPATCH
+
+
+static INLINE boolean
+debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size)
+{
+ DWORD64 dwAddr = (DWORD64)(uintptr_t)addr;
+ HANDLE hProcess = GetCurrentProcess();
+
+ /* General purpose buffer, to back pSymbol and other temporary stuff.
+ * Must not be too memory hungry here to avoid stack overflows.
+ */
+ CHAR buffer[512];
+
+ PSYMBOL_INFO pSymbol = (PSYMBOL_INFO) buffer;
+ DWORD64 dwDisplacement = 0; /* Displacement of the input address, relative to the start of the symbol */
+ DWORD dwLineDisplacement = 0;
+ IMAGEHLP_LINE64 Line;
+
+ memset(pSymbol, 0, sizeof *pSymbol);
+ pSymbol->SizeOfStruct = sizeof buffer;
+ pSymbol->MaxNameLen = sizeof buffer - offsetof(SYMBOL_INFO, Name);
+
+ if (!g_bSymInitialized) {
+ j_SymSetOptions(/* SYMOPT_UNDNAME | */ SYMOPT_LOAD_LINES);
+ if (j_SymInitialize(hProcess, NULL, TRUE)) {
+ g_bSymInitialized = TRUE;
+ }
+ }
+
+ /* Lookup symbol name */
+ if (!g_bSymInitialized ||
+ !j_SymFromAddr(hProcess, dwAddr, &dwDisplacement, pSymbol)) {
+ /*
+ * We couldn't obtain symbol information. At least tell which module the address belongs.
+ */
+
+ HMODULE hModule = NULL;
+
+ if (!GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
+ (LPCTSTR)addr,
+ &hModule)) {
+ return FALSE;
+ }
+
+ if (GetModuleFileNameA(hModule, buffer, sizeof buffer) == sizeof buffer) {
+ return FALSE;
+ }
+ util_snprintf(buf, size, "%p at %s+0x%lx",
+ addr, buffer,
+ (unsigned long)((uintptr_t)addr - (uintptr_t)hModule));
+
+ return TRUE;
+ }
+
+ /*
+ * Try to get filename and line number.
+ */
+ memset(&Line, 0, sizeof Line);
+ Line.SizeOfStruct = sizeof Line;
+ if (!j_SymGetLineFromAddr64(hProcess, dwAddr, &dwLineDisplacement, &Line)) {
+ Line.FileName = NULL;
+ }
+
+ if (Line.FileName) {
+ util_snprintf(buf, size, "%s at %s:%lu", pSymbol->Name, Line.FileName, Line.LineNumber);
+ } else {
+ util_snprintf(buf, size, "%s", pSymbol->Name);
+ }
+
+ return TRUE;
+}
+
+#endif /* PIPE_OS_WINDOWS */
+
+
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
+
+#include <execinfo.h>
+
+/* This can only provide dynamic symbols, or binary offsets into a file.
+ *
+ * To fix this, post-process the output with tools/addr2line.sh
+ */
+static INLINE boolean
+debug_symbol_name_glibc(const void *addr, char* buf, unsigned size)
+{
+ char** syms = backtrace_symbols((void**)&addr, 1);
+ if (!syms) {
+ return FALSE;
+ }
+ strncpy(buf, syms[0], size);
+ buf[size - 1] = 0;
+ free(syms);
+ return TRUE;
+}
+
+#endif /* defined(__GLIBC__) && !defined(__UCLIBC__) */
+
+
+void
+debug_symbol_name(const void *addr, char* buf, unsigned size)
+{
+#if defined(PIPE_OS_WINDOWS)
+ if (debug_symbol_name_dbghelp(addr, buf, size)) {
+ return;
+ }
+#endif
+
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ if (debug_symbol_name_glibc(addr, buf, size)) {
+ return;
+ }
+#endif
+
+ util_snprintf(buf, size, "%p", addr);
+ buf[size - 1] = 0;
+}
+
+void
+debug_symbol_print(const void *addr)
+{
+ char buf[1024];
+ debug_symbol_name(addr, buf, sizeof(buf));
+ debug_printf("\t%s\n", buf);
+}
+
+struct util_hash_table* symbols_hash;
+pipe_static_mutex(symbols_mutex);
+
+static unsigned hash_ptr(void* p)
+{
+ return (unsigned)(uintptr_t)p;
+}
+
+static int compare_ptr(void* a, void* b)
+{
+ if(a == b)
+ return 0;
+ else if(a < b)
+ return -1;
+ else
+ return 1;
+}
+
+const char*
+debug_symbol_name_cached(const void *addr)
+{
+ const char* name;
+#ifdef PIPE_SUBSYSTEM_WINDOWS_USER
+ static boolean first = TRUE;
+
+ if (first) {
+ pipe_mutex_init(symbols_mutex);
+ first = FALSE;
+ }
+#endif
+
+ pipe_mutex_lock(symbols_mutex);
+ if(!symbols_hash)
+ symbols_hash = util_hash_table_create(hash_ptr, compare_ptr);
+ name = util_hash_table_get(symbols_hash, (void*)addr);
+ if(!name)
+ {
+ char buf[1024];
+ debug_symbol_name(addr, buf, sizeof(buf));
+ name = strdup(buf);
+
+ util_hash_table_set(symbols_hash, (void*)addr, (void*)name);
+ }
+ pipe_mutex_unlock(symbols_mutex);
+ return name;
+}
diff --git a/src/minigallium/auxiliary/util/u_debug_symbol.h b/src/minigallium/auxiliary/util/u_debug_symbol.h
new file mode 100644
index 0000000..b247706
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_debug_symbol.h
@@ -0,0 +1,58 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_DEBUG_SYMBOL_H_
+#define U_DEBUG_SYMBOL_H_
+
+
+/**
+ * @file
+ * Symbol lookup.
+ *
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+void
+debug_symbol_name(const void *addr, char* buf, unsigned size);
+
+const char*
+debug_symbol_name_cached(const void *addr);
+
+void
+debug_symbol_print(const void *addr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_DEBUG_SYMBOL_H_ */
diff --git a/src/minigallium/auxiliary/util/u_dirty_flags.h b/src/minigallium/auxiliary/util/u_dirty_flags.h
new file mode 100644
index 0000000..40539f0
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_dirty_flags.h
@@ -0,0 +1,32 @@
+#ifndef U_DIRTY_FLAGS_H
+#define U_DIRTY_FLAGS_H
+
+/* Here's a convenient list of dirty flags to use in a driver. Either
+ * include it directly or use it as a starting point for your own
+ * list.
+ */
+#define U_NEW_VIEWPORT 0x1
+#define U_NEW_RASTERIZER 0x2
+#define U_NEW_FS 0x4
+#define U_NEW_FS_CONSTANTS 0x8
+#define U_NEW_FS_SAMPLER_VIEW 0x10
+#define U_NEW_FS_SAMPLER_STATES 0x20
+#define U_NEW_VS 0x40
+#define U_NEW_VS_CONSTANTS 0x80
+#define U_NEW_VS_SAMPLER_VIEW 0x100
+#define U_NEW_VS_SAMPLER_STATES 0x200
+#define U_NEW_BLEND 0x400
+#define U_NEW_CLIP 0x800
+#define U_NEW_SCISSOR 0x1000
+#define U_NEW_POLYGON_STIPPLE 0x2000
+#define U_NEW_FRAMEBUFFER 0x4000
+#define U_NEW_VERTEX_ELEMENTS 0x8000
+#define U_NEW_VERTEX_BUFFER 0x10000
+#define U_NEW_QUERY 0x20000
+#define U_NEW_DEPTH_STENCIL 0x40000
+#define U_NEW_GS 0x80000
+#define U_NEW_GS_CONSTANTS 0x100000
+#define U_NEW_GS_SAMPLER_VIEW 0x200000
+#define U_NEW_GS_SAMPLER_STATES 0x400000
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_dirty_surfaces.h b/src/minigallium/auxiliary/util/u_dirty_surfaces.h
new file mode 100644
index 0000000..f3618d9
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_dirty_surfaces.h
@@ -0,0 +1,119 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_DIRTY_SURFACES_H_
+#define U_DIRTY_SURFACES_H_
+
+#include "pipe/p_state.h"
+
+#include "util/u_double_list.h"
+#include "util/u_math.h"
+
+struct pipe_context;
+
+typedef void (*util_dirty_surface_flush_t) (struct pipe_context *, struct pipe_surface *);
+
+struct util_dirty_surfaces
+{
+ struct list_head dirty_list;
+};
+
+struct util_dirty_surface
+{
+ struct pipe_surface base;
+ struct list_head dirty_list;
+};
+
+static INLINE void
+util_dirty_surfaces_init(struct util_dirty_surfaces *ds)
+{
+ LIST_INITHEAD(&ds->dirty_list);
+}
+
+static INLINE void
+util_dirty_surfaces_use_for_sampling(struct pipe_context *pipe, struct util_dirty_surfaces *dss, util_dirty_surface_flush_t flush)
+{
+ struct list_head *p, *next;
+ for(p = dss->dirty_list.next; p != &dss->dirty_list; p = next)
+ {
+ struct util_dirty_surface *ds = LIST_ENTRY(struct util_dirty_surface, p, dirty_list);
+ next = p->next;
+
+ flush(pipe, &ds->base);
+ }
+}
+
+static INLINE void
+util_dirty_surfaces_use_levels_for_sampling(struct pipe_context *pipe, struct util_dirty_surfaces *dss, unsigned first, unsigned last, util_dirty_surface_flush_t flush)
+{
+ struct list_head *p, *next;
+ if(first > last)
+ return;
+ for(p = dss->dirty_list.next; p != &dss->dirty_list; p = next)
+ {
+ struct util_dirty_surface *ds = LIST_ENTRY(struct util_dirty_surface, p, dirty_list);
+ next = p->next;
+
+ if(ds->base.u.tex.level >= first && ds->base.u.tex.level <= last)
+ flush(pipe, &ds->base);
+ }
+}
+
+static INLINE void
+util_dirty_surfaces_use_for_sampling_with(struct pipe_context *pipe, struct util_dirty_surfaces *dss, struct pipe_sampler_view *psv, struct pipe_sampler_state *pss, util_dirty_surface_flush_t flush)
+{
+ if(!LIST_IS_EMPTY(&dss->dirty_list))
+ util_dirty_surfaces_use_levels_for_sampling(pipe, dss, (unsigned)pss->min_lod + psv->u.tex.first_level,
+ MIN2((unsigned)ceilf(pss->max_lod) + psv->u.tex.first_level, psv->u.tex.last_level), flush);
+}
+
+static INLINE void
+util_dirty_surface_init(struct util_dirty_surface *ds)
+{
+ LIST_INITHEAD(&ds->dirty_list);
+}
+
+static INLINE boolean
+util_dirty_surface_is_dirty(struct util_dirty_surface *ds)
+{
+ return !LIST_IS_EMPTY(&ds->dirty_list);
+}
+
+static INLINE void
+util_dirty_surface_set_dirty(struct util_dirty_surfaces *dss, struct util_dirty_surface *ds)
+{
+ if(LIST_IS_EMPTY(&ds->dirty_list))
+ LIST_ADDTAIL(&ds->dirty_list, &dss->dirty_list);
+}
+
+static INLINE void
+util_dirty_surface_set_clean(struct util_dirty_surfaces *dss, struct util_dirty_surface *ds)
+{
+ if(!LIST_IS_EMPTY(&ds->dirty_list))
+ LIST_DELINIT(&ds->dirty_list);
+}
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_dl.c b/src/minigallium/auxiliary/util/u_dl.c
new file mode 100644
index 0000000..aca435d
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_dl.c
@@ -0,0 +1,94 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * Copyright 1999-2008 Brian Paul
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+
+#include "pipe/p_config.h"
+#include "pipe/p_compiler.h"
+
+#if defined(PIPE_OS_UNIX)
+#include <dlfcn.h>
+#endif
+#if defined(PIPE_OS_WINDOWS)
+#include <windows.h>
+#endif
+
+#include "u_dl.h"
+#include "u_pointer.h"
+
+
+struct util_dl_library *
+util_dl_open(const char *filename)
+{
+#if defined(PIPE_OS_UNIX)
+ return (struct util_dl_library *)dlopen(filename, RTLD_LAZY | RTLD_GLOBAL);
+#elif defined(PIPE_OS_WINDOWS)
+ return (struct util_dl_library *)LoadLibraryA(filename);
+#else
+ return NULL;
+#endif
+}
+
+
+util_dl_proc
+util_dl_get_proc_address(struct util_dl_library *library,
+ const char *procname)
+{
+#if defined(PIPE_OS_UNIX)
+ return (util_dl_proc) pointer_to_func(dlsym((void *)library, procname));
+#elif defined(PIPE_OS_WINDOWS)
+ return (util_dl_proc)GetProcAddress((HMODULE)library, procname);
+#else
+ return (util_dl_proc)NULL;
+#endif
+}
+
+
+void
+util_dl_close(struct util_dl_library *library)
+{
+#if defined(PIPE_OS_UNIX)
+ dlclose((void *)library);
+#elif defined(PIPE_OS_WINDOWS)
+ FreeLibrary((HMODULE)library);
+#else
+ (void)library;
+#endif
+}
+
+
+const char *
+util_dl_error(void)
+{
+#if defined(PIPE_OS_UNIX)
+ return dlerror();
+#elif defined(PIPE_OS_WINDOWS)
+ return "unknown error";
+#else
+ return "unknown error";
+#endif
+}
diff --git a/src/minigallium/auxiliary/util/u_dl.h b/src/minigallium/auxiliary/util/u_dl.h
new file mode 100644
index 0000000..80a00ed
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_dl.h
@@ -0,0 +1,83 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+
+#ifndef U_DL_H_
+#define U_DL_H_
+
+
+#include "pipe/p_config.h"
+
+
+#if defined(PIPE_OS_WINDOWS)
+# define UTIL_DL_EXT ".dll"
+# define UTIL_DL_PREFIX ""
+#elif defined(PIPE_OS_APPLE)
+# define UTIL_DL_EXT ".dylib"
+# define UTIL_DL_PREFIX "lib"
+#else
+# define UTIL_DL_EXT ".so"
+# define UTIL_DL_PREFIX "lib"
+#endif
+
+
+struct util_dl_library;
+
+
+typedef void (*util_dl_proc)(void);
+
+
+/**
+ * Open a library dynamically.
+ */
+struct util_dl_library *
+util_dl_open(const char *filename);
+
+
+/**
+ * Lookup a function in a library.
+ */
+util_dl_proc
+util_dl_get_proc_address(struct util_dl_library *library,
+ const char *procname);
+
+
+/**
+ * Close a library.
+ */
+void
+util_dl_close(struct util_dl_library *library);
+
+
+/**
+ * Return most recent error message.
+ */
+const char *
+util_dl_error(void);
+
+
+#endif /* U_DL_H_ */
diff --git a/src/minigallium/auxiliary/util/u_double_list.h b/src/minigallium/auxiliary/util/u_double_list.h
new file mode 100644
index 0000000..408c26d
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_double_list.h
@@ -0,0 +1,147 @@
+/**************************************************************************
+ *
+ * Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND. USA.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+/**
+ * \file
+ * List macros heavily inspired by the Linux kernel
+ * list handling. No list looping yet.
+ *
+ * Is not threadsafe, so common operations need to
+ * be protected using an external mutex.
+ */
+
+#ifndef _U_DOUBLE_LIST_H_
+#define _U_DOUBLE_LIST_H_
+
+
+#include <stddef.h>
+#include "pipe/p_compiler.h"
+
+
+struct list_head
+{
+ struct list_head *prev;
+ struct list_head *next;
+};
+
+static INLINE void list_inithead(struct list_head *item)
+{
+ item->prev = item;
+ item->next = item;
+}
+
+static INLINE void list_add(struct list_head *item, struct list_head *list)
+{
+ item->prev = list;
+ item->next = list->next;
+ list->next->prev = item;
+ list->next = item;
+}
+
+static INLINE void list_addtail(struct list_head *item, struct list_head *list)
+{
+ item->next = list;
+ item->prev = list->prev;
+ list->prev->next = item;
+ list->prev = item;
+}
+
+static INLINE void list_replace(struct list_head *from, struct list_head *to)
+{
+ to->prev = from->prev;
+ to->next = from->next;
+ from->next->prev = to;
+ from->prev->next = to;
+}
+
+static INLINE void list_del(struct list_head *item)
+{
+ item->prev->next = item->next;
+ item->next->prev = item->prev;
+ item->prev = item->next = NULL;
+}
+
+static INLINE void list_delinit(struct list_head *item)
+{
+ item->prev->next = item->next;
+ item->next->prev = item->prev;
+ item->next = item;
+ item->prev = item;
+}
+
+#define LIST_INITHEAD(__item) list_inithead(__item)
+#define LIST_ADD(__item, __list) list_add(__item, __list)
+#define LIST_ADDTAIL(__item, __list) list_addtail(__item, __list)
+#define LIST_REPLACE(__from, __to) list_replace(__from, __to)
+#define LIST_DEL(__item) list_del(__item)
+#define LIST_DELINIT(__item) list_delinit(__item)
+
+#define LIST_ENTRY(__type, __item, __field) \
+ ((__type *)(((char *)(__item)) - offsetof(__type, __field)))
+
+#define LIST_IS_EMPTY(__list) \
+ ((__list)->next == (__list))
+
+/**
+ * Cast from a pointer to a member of a struct back to the containing struct.
+ *
+ * 'sample' MUST be initialized, or else the result is undefined!
+ */
+#ifndef container_of
+#define container_of(ptr, sample, member) \
+ (void *)((char *)(ptr) \
+ - ((char *)&(sample)->member - (char *)(sample)))
+#endif
+
+#define LIST_FOR_EACH_ENTRY(pos, head, member) \
+ for (pos = NULL, pos = container_of((head)->next, pos, member); \
+ &pos->member != (head); \
+ pos = container_of(pos->member.next, pos, member))
+
+#define LIST_FOR_EACH_ENTRY_SAFE(pos, storage, head, member) \
+ for (pos = NULL, pos = container_of((head)->next, pos, member), \
+ storage = container_of(pos->member.next, pos, member); \
+ &pos->member != (head); \
+ pos = storage, storage = container_of(storage->member.next, storage, member))
+
+#define LIST_FOR_EACH_ENTRY_SAFE_REV(pos, storage, head, member) \
+ for (pos = NULL, pos = container_of((head)->prev, pos, member), \
+ storage = container_of(pos->member.prev, pos, member); \
+ &pos->member != (head); \
+ pos = storage, storage = container_of(storage->member.prev, storage, member))
+
+#define LIST_FOR_EACH_ENTRY_FROM(pos, start, head, member) \
+ for (pos = NULL, pos = container_of((start), pos, member); \
+ &pos->member != (head); \
+ pos = container_of(pos->member.next, pos, member))
+
+#define LIST_FOR_EACH_ENTRY_FROM_REV(pos, start, head, member) \
+ for (pos = NULL, pos = container_of((start), pos, member); \
+ &pos->member != (head); \
+ pos = container_of(pos->member.prev, pos, member))
+
+#endif /*_U_DOUBLE_LIST_H_*/
diff --git a/src/minigallium/auxiliary/util/u_draw.c b/src/minigallium/auxiliary/util/u_draw.c
new file mode 100644
index 0000000..83d9284
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_draw.c
@@ -0,0 +1,125 @@
+/**************************************************************************
+ *
+ * Copyright 2011 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#include "util/u_debug.h"
+#include "util/u_math.h"
+#include "util/u_format.h"
+#include "util/u_draw.h"
+
+
+/**
+ * Returns the largest legal index value plus one for the current set
+ * of bound vertex buffers. Regardless of any other consideration,
+ * all vertex lookups need to be clamped to 0..max_index-1 to prevent
+ * an out-of-bound access.
+ *
+ * Note that if zero is returned it means that one or more buffers is
+ * too small to contain any valid vertex data.
+ */
+unsigned
+util_draw_max_index(
+ const struct pipe_vertex_buffer *vertex_buffers,
+ const struct pipe_vertex_element *vertex_elements,
+ unsigned nr_vertex_elements,
+ const struct pipe_draw_info *info)
+{
+ unsigned max_index;
+ unsigned i;
+
+ max_index = ~0U - 1;
+ for (i = 0; i < nr_vertex_elements; i++) {
+ const struct pipe_vertex_element *element =
+ &vertex_elements[i];
+ const struct pipe_vertex_buffer *buffer =
+ &vertex_buffers[element->vertex_buffer_index];
+ unsigned buffer_size;
+ const struct util_format_description *format_desc;
+ unsigned format_size;
+
+ if (!buffer->buffer) {
+ continue;
+ }
+
+ assert(buffer->buffer->height0 == 1);
+ assert(buffer->buffer->depth0 == 1);
+ buffer_size = buffer->buffer->width0;
+
+ format_desc = util_format_description(element->src_format);
+ assert(format_desc->block.width == 1);
+ assert(format_desc->block.height == 1);
+ assert(format_desc->block.bits % 8 == 0);
+ format_size = format_desc->block.bits/8;
+
+ if (buffer->buffer_offset >= buffer_size) {
+ /* buffer is too small */
+ return 0;
+ }
+
+ buffer_size -= buffer->buffer_offset;
+
+ if (element->src_offset >= buffer_size) {
+ /* buffer is too small */
+ return 0;
+ }
+
+ buffer_size -= element->src_offset;
+
+ if (format_size > buffer_size) {
+ /* buffer is too small */
+ return 0;
+ }
+
+ buffer_size -= format_size;
+
+ if (buffer->stride != 0) {
+ unsigned buffer_max_index;
+
+ buffer_max_index = buffer_size / buffer->stride;
+
+ if (element->instance_divisor == 0) {
+ /* Per-vertex data */
+ max_index = MIN2(max_index, buffer_max_index);
+ }
+ else {
+ /* Per-instance data. Simply make sure the state tracker didn't
+ * request more instances than those that fit in the buffer */
+ if ((info->start_instance + info->instance_count)/element->instance_divisor
+ > (buffer_max_index + 1)) {
+ /* FIXME: We really should stop thinking in terms of maximum
+ * indices/instances and simply start clamping against buffer
+ * size. */
+ debug_printf("%s: too many instances for vertex buffer\n",
+ __FUNCTION__);
+ return 0;
+ }
+ }
+ }
+ }
+
+ return max_index + 1;
+}
diff --git a/src/minigallium/auxiliary/util/u_draw.h b/src/minigallium/auxiliary/util/u_draw.h
new file mode 100644
index 0000000..3dc6918
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_draw.h
@@ -0,0 +1,157 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_DRAW_H
+#define U_DRAW_H
+
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_context.h"
+#include "pipe/p_state.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+static INLINE void
+util_draw_init_info(struct pipe_draw_info *info)
+{
+ memset(info, 0, sizeof(*info));
+ info->instance_count = 1;
+ info->max_index = 0xffffffff;
+}
+
+
+static INLINE void
+util_draw_arrays(struct pipe_context *pipe, uint mode, uint start, uint count)
+{
+ struct pipe_draw_info info;
+
+ util_draw_init_info(&info);
+ info.mode = mode;
+ info.start = start;
+ info.count = count;
+ info.min_index = start;
+ info.max_index = start + count - 1;
+
+ pipe->draw_vbo(pipe, &info);
+}
+
+static INLINE void
+util_draw_elements(struct pipe_context *pipe, int index_bias,
+ uint mode, uint start, uint count)
+{
+ struct pipe_draw_info info;
+
+ util_draw_init_info(&info);
+ info.indexed = TRUE;
+ info.mode = mode;
+ info.start = start;
+ info.count = count;
+ info.index_bias = index_bias;
+
+ pipe->draw_vbo(pipe, &info);
+}
+
+static INLINE void
+util_draw_arrays_instanced(struct pipe_context *pipe,
+ uint mode, uint start, uint count,
+ uint start_instance,
+ uint instance_count)
+{
+ struct pipe_draw_info info;
+
+ util_draw_init_info(&info);
+ info.mode = mode;
+ info.start = start;
+ info.count = count;
+ info.start_instance = start_instance;
+ info.instance_count = instance_count;
+ info.min_index = start;
+ info.max_index = start + count - 1;
+
+ pipe->draw_vbo(pipe, &info);
+}
+
+static INLINE void
+util_draw_elements_instanced(struct pipe_context *pipe,
+ int index_bias,
+ uint mode, uint start, uint count,
+ uint start_instance,
+ uint instance_count)
+{
+ struct pipe_draw_info info;
+
+ util_draw_init_info(&info);
+ info.indexed = TRUE;
+ info.mode = mode;
+ info.start = start;
+ info.count = count;
+ info.index_bias = index_bias;
+ info.start_instance = start_instance;
+ info.instance_count = instance_count;
+
+ pipe->draw_vbo(pipe, &info);
+}
+
+static INLINE void
+util_draw_range_elements(struct pipe_context *pipe,
+ int index_bias,
+ uint min_index,
+ uint max_index,
+ uint mode, uint start, uint count)
+{
+ struct pipe_draw_info info;
+
+ util_draw_init_info(&info);
+ info.indexed = TRUE;
+ info.mode = mode;
+ info.start = start;
+ info.count = count;
+ info.index_bias = index_bias;
+ info.min_index = min_index;
+ info.max_index = max_index;
+
+ pipe->draw_vbo(pipe, &info);
+}
+
+
+unsigned
+util_draw_max_index(
+ const struct pipe_vertex_buffer *vertex_buffers,
+ const struct pipe_vertex_element *vertex_elements,
+ unsigned nr_vertex_elements,
+ const struct pipe_draw_info *info);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !U_DRAW_H */
diff --git a/src/minigallium/auxiliary/util/u_draw_quad.c b/src/minigallium/auxiliary/util/u_draw_quad.c
new file mode 100644
index 0000000..3fe324a
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_draw_quad.c
@@ -0,0 +1,158 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#include "pipe/p_context.h"
+#include "pipe/p_defines.h"
+#include "util/u_inlines.h"
+#include "util/u_draw_quad.h"
+#include "util/u_memory.h"
+#include "cso_cache/cso_context.h"
+
+
+/**
+ * Draw a simple vertex buffer / primitive.
+ * Limited to float[4] vertex attribs, tightly packed.
+ */
+void
+util_draw_vertex_buffer(struct pipe_context *pipe,
+ struct cso_context *cso,
+ struct pipe_resource *vbuf,
+ uint vbuf_slot,
+ uint offset,
+ uint prim_type,
+ uint num_verts,
+ uint num_attribs)
+{
+ struct pipe_vertex_buffer vbuffer;
+
+ assert(num_attribs <= PIPE_MAX_ATTRIBS);
+
+ /* tell pipe about the vertex buffer */
+ memset(&vbuffer, 0, sizeof(vbuffer));
+ vbuffer.buffer = vbuf;
+ vbuffer.stride = num_attribs * 4 * sizeof(float); /* vertex size */
+ vbuffer.buffer_offset = offset;
+
+ /* note: vertex elements already set by caller */
+
+ if (cso) {
+ cso_set_vertex_buffers(cso, vbuf_slot, 1, &vbuffer);
+ cso_draw_arrays(cso, prim_type, 0, num_verts);
+ } else {
+ pipe->set_vertex_buffers(pipe, vbuf_slot, 1, &vbuffer);
+ util_draw_arrays(pipe, prim_type, 0, num_verts);
+ }
+}
+
+
+/**
+ * Draw a simple vertex buffer / primitive.
+ * Limited to float[4] vertex attribs, tightly packed.
+ */
+void
+util_draw_user_vertex_buffer(struct cso_context *cso, void *buffer,
+ uint prim_type, uint num_verts, uint num_attribs)
+{
+ struct pipe_vertex_buffer vbuffer = {0};
+
+ assert(num_attribs <= PIPE_MAX_ATTRIBS);
+
+ vbuffer.user_buffer = buffer;
+ vbuffer.stride = num_attribs * 4 * sizeof(float); /* vertex size */
+
+ /* note: vertex elements already set by caller */
+
+ cso_set_vertex_buffers(cso, 0, 1, &vbuffer);
+ cso_draw_arrays(cso, prim_type, 0, num_verts);
+}
+
+
+/**
+ * Draw screen-aligned textured quad.
+ * Note: this isn't especially efficient.
+ */
+void
+util_draw_texquad(struct pipe_context *pipe, struct cso_context *cso,
+ uint vbuf_slot,
+ float x0, float y0, float x1, float y1, float z)
+{
+ uint numAttribs = 2, i, j;
+ uint vertexBytes = 4 * (4 * numAttribs * sizeof(float));
+ struct pipe_resource *vbuf = NULL;
+ float *v = NULL;
+
+ v = MALLOC(vertexBytes);
+ if (v == NULL)
+ goto out;
+
+ /*
+ * Load vertex buffer
+ */
+ for (i = j = 0; i < 4; i++) {
+ v[j + 2] = z; /* z */
+ v[j + 3] = 1.0; /* w */
+ v[j + 6] = 0.0; /* r */
+ v[j + 7] = 1.0; /* q */
+ j += 8;
+ }
+
+ v[0] = x0;
+ v[1] = y0;
+ v[4] = 0.0; /*s*/
+ v[5] = 0.0; /*t*/
+
+ v[8] = x1;
+ v[9] = y0;
+ v[12] = 1.0;
+ v[13] = 0.0;
+
+ v[16] = x1;
+ v[17] = y1;
+ v[20] = 1.0;
+ v[21] = 1.0;
+
+ v[24] = x0;
+ v[25] = y1;
+ v[28] = 0.0;
+ v[29] = 1.0;
+
+ vbuf = pipe_buffer_create(pipe->screen, PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STAGING, vertexBytes);
+ if (!vbuf)
+ goto out;
+ pipe_buffer_write(pipe, vbuf, 0, vertexBytes, v);
+
+ util_draw_vertex_buffer(pipe, cso, vbuf, vbuf_slot, 0,
+ PIPE_PRIM_TRIANGLE_FAN, 4, 2);
+
+out:
+ if (vbuf)
+ pipe_resource_reference(&vbuf, NULL);
+
+ FREE(v);
+}
diff --git a/src/minigallium/auxiliary/util/u_draw_quad.h b/src/minigallium/auxiliary/util/u_draw_quad.h
new file mode 100644
index 0000000..cb17f4e
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_draw_quad.h
@@ -0,0 +1,66 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_DRAWQUAD_H
+#define U_DRAWQUAD_H
+
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_context.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct pipe_resource;
+struct cso_context;
+
+#include "util/u_draw.h"
+
+extern void
+util_draw_vertex_buffer(struct pipe_context *pipe, struct cso_context *cso,
+ struct pipe_resource *vbuf, uint vbuf_slot,
+ uint offset, uint prim_type, uint num_attribs,
+ uint num_verts);
+
+void
+util_draw_user_vertex_buffer(struct cso_context *cso, void *buffer,
+ uint prim_type, uint num_verts, uint num_attribs);
+
+extern void
+util_draw_texquad(struct pipe_context *pipe, struct cso_context *cso,
+ uint vbuf_slot,
+ float x0, float y0, float x1, float y1, float z);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_dual_blend.h b/src/minigallium/auxiliary/util/u_dual_blend.h
new file mode 100644
index 0000000..e31d43c
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_dual_blend.h
@@ -0,0 +1,26 @@
+#ifndef U_DUAL_BLEND_H
+#define U_DUAL_BLEND_H
+
+#include "pipe/p_state.h"
+
+static INLINE boolean util_blend_factor_is_dual_src(int factor)
+{
+ return (factor == PIPE_BLENDFACTOR_SRC1_COLOR) ||
+ (factor == PIPE_BLENDFACTOR_SRC1_ALPHA) ||
+ (factor == PIPE_BLENDFACTOR_INV_SRC1_COLOR) ||
+ (factor == PIPE_BLENDFACTOR_INV_SRC1_ALPHA);
+}
+
+static INLINE boolean util_blend_state_is_dual(const struct pipe_blend_state *blend,
+ int index)
+{
+ if (util_blend_factor_is_dual_src(blend->rt[index].rgb_src_factor) ||
+ util_blend_factor_is_dual_src(blend->rt[index].alpha_src_factor) ||
+ util_blend_factor_is_dual_src(blend->rt[index].rgb_dst_factor) ||
+ util_blend_factor_is_dual_src(blend->rt[index].alpha_dst_factor))
+ return true;
+ return false;
+}
+
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_dump.h b/src/minigallium/auxiliary/util/u_dump.h
new file mode 100644
index 0000000..71750a6
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_dump.h
@@ -0,0 +1,181 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Dump data in human/machine readable format.
+ *
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+#ifndef U_DEBUG_DUMP_H_
+#define U_DEBUG_DUMP_H_
+
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_state.h"
+
+#include <stdio.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define UTIL_DUMP_INVALID_NAME "<invalid>"
+
+
+/*
+ * p_defines.h
+ *
+ * XXX: These functions don't really dump anything -- just translate into
+ * strings so a verb better than "dump" should be used instead, in order to
+ * free up the namespace to the true dumper functions.
+ */
+
+const char *
+util_dump_blend_factor(unsigned value, boolean shortened);
+
+const char *
+util_dump_blend_func(unsigned value, boolean shortened);
+
+const char *
+util_dump_logicop(unsigned value, boolean shortened);
+
+const char *
+util_dump_func(unsigned value, boolean shortened);
+
+const char *
+util_dump_stencil_op(unsigned value, boolean shortened);
+
+const char *
+util_dump_tex_target(unsigned value, boolean shortened);
+
+const char *
+util_dump_tex_wrap(unsigned value, boolean shortened);
+
+const char *
+util_dump_tex_mipfilter(unsigned value, boolean shortened);
+
+const char *
+util_dump_tex_filter(unsigned value, boolean shortened);
+
+
+/*
+ * p_state.h, through a FILE
+ */
+
+void
+util_dump_template(FILE *stream,
+ const struct pipe_resource *templat);
+
+void
+util_dump_rasterizer_state(FILE *stream,
+ const struct pipe_rasterizer_state *state);
+
+void
+util_dump_poly_stipple(FILE *stream,
+ const struct pipe_poly_stipple *state);
+
+void
+util_dump_viewport_state(FILE *stream,
+ const struct pipe_viewport_state *state);
+
+void
+util_dump_scissor_state(FILE *stream,
+ const struct pipe_scissor_state *state);
+
+void
+util_dump_clip_state(FILE *stream,
+ const struct pipe_clip_state *state);
+
+void
+util_dump_shader_state(FILE *stream,
+ const struct pipe_shader_state *state);
+
+void
+util_dump_depth_stencil_alpha_state(FILE *stream,
+ const struct pipe_depth_stencil_alpha_state *state);
+
+void
+util_dump_rt_blend_state(FILE *stream,
+ const struct pipe_rt_blend_state *state);
+
+void
+util_dump_blend_state(FILE *stream,
+ const struct pipe_blend_state *state);
+
+void
+util_dump_blend_color(FILE *stream,
+ const struct pipe_blend_color *state);
+
+void
+util_dump_stencil_ref(FILE *stream,
+ const struct pipe_stencil_ref *state);
+
+void
+util_dump_framebuffer_state(FILE *stream,
+ const struct pipe_framebuffer_state *state);
+
+void
+util_dump_sampler_state(FILE *stream,
+ const struct pipe_sampler_state *state);
+
+void
+util_dump_surface(FILE *stream,
+ const struct pipe_surface *state);
+
+void
+util_dump_transfer(FILE *stream,
+ const struct pipe_transfer *state);
+
+void
+util_dump_vertex_buffer(FILE *stream,
+ const struct pipe_vertex_buffer *state);
+
+void
+util_dump_vertex_element(FILE *stream,
+ const struct pipe_vertex_element *state);
+
+void
+util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state);
+
+void
+util_dump_box(FILE *stream, const struct pipe_box *box);
+
+void
+util_dump_blit_info(FILE *stream, const struct pipe_blit_info *info);
+
+/* FIXME: Move the other debug_dump_xxx functions out of u_debug.h into here. */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_DEBUG_H_ */
diff --git a/src/minigallium/auxiliary/util/u_dump_defines.c b/src/minigallium/auxiliary/util/u_dump_defines.c
new file mode 100644
index 0000000..cc62687
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_dump_defines.c
@@ -0,0 +1,361 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#include "util/u_memory.h"
+#include "util/u_debug.h"
+#include "util/u_dump.h"
+
+
+#if 0
+static const char *
+util_dump_strip_prefix(const char *name,
+ const char *prefix)
+{
+ const char *stripped;
+ assert(name);
+ assert(prefix);
+ stripped = name;
+ while(*prefix) {
+ if(*stripped != *prefix)
+ return name;
+
+ ++stripped;
+ ++prefix;
+ }
+ return stripped;
+}
+#endif
+
+static const char *
+util_dump_enum_continuous(unsigned value,
+ unsigned num_names,
+ const char **names)
+{
+ if (value >= num_names)
+ return UTIL_DUMP_INVALID_NAME;
+ return names[value];
+}
+
+
+#define DEFINE_UTIL_DUMP_CONTINUOUS(_name) \
+ const char * \
+ util_dump_##_name(unsigned value, boolean shortened) \
+ { \
+ if(shortened) \
+ return util_dump_enum_continuous(value, Elements(util_dump_##_name##_short_names), util_dump_##_name##_short_names); \
+ else \
+ return util_dump_enum_continuous(value, Elements(util_dump_##_name##_names), util_dump_##_name##_names); \
+ }
+
+
+/**
+ * Same as DEFINE_UTIL_DUMP_CONTINUOUS but with static assertions to detect
+ * failures to update lists.
+ */
+#define DEFINE_UTIL_DUMP_CONTINUOUS_COUNT(_name, _count) \
+ const char * \
+ util_dump_##_name(unsigned value, boolean shortened) \
+ { \
+ STATIC_ASSERT(Elements(util_dump_##_name##_names) == _count); \
+ STATIC_ASSERT(Elements(util_dump_##_name##_short_names) == _count); \
+ if(shortened) \
+ return util_dump_enum_continuous(value, Elements(util_dump_##_name##_short_names), util_dump_##_name##_short_names); \
+ else \
+ return util_dump_enum_continuous(value, Elements(util_dump_##_name##_names), util_dump_##_name##_names); \
+ }
+
+
+static const char *
+util_dump_blend_factor_names[] = {
+ UTIL_DUMP_INVALID_NAME, /* 0x0 */
+ "PIPE_BLENDFACTOR_ONE",
+ "PIPE_BLENDFACTOR_SRC_COLOR",
+ "PIPE_BLENDFACTOR_SRC_ALPHA",
+ "PIPE_BLENDFACTOR_DST_ALPHA",
+ "PIPE_BLENDFACTOR_DST_COLOR",
+ "PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE",
+ "PIPE_BLENDFACTOR_CONST_COLOR",
+ "PIPE_BLENDFACTOR_CONST_ALPHA",
+ "PIPE_BLENDFACTOR_SRC1_COLOR",
+ "PIPE_BLENDFACTOR_SRC1_ALPHA",
+ UTIL_DUMP_INVALID_NAME, /* 0x0b */
+ UTIL_DUMP_INVALID_NAME, /* 0x0c */
+ UTIL_DUMP_INVALID_NAME, /* 0x0d */
+ UTIL_DUMP_INVALID_NAME, /* 0x0e */
+ UTIL_DUMP_INVALID_NAME, /* 0x0f */
+ UTIL_DUMP_INVALID_NAME, /* 0x10 */
+ "PIPE_BLENDFACTOR_ZERO",
+ "PIPE_BLENDFACTOR_INV_SRC_COLOR",
+ "PIPE_BLENDFACTOR_INV_SRC_ALPHA",
+ "PIPE_BLENDFACTOR_INV_DST_ALPHA",
+ "PIPE_BLENDFACTOR_INV_DST_COLOR",
+ UTIL_DUMP_INVALID_NAME, /* 0x16 */
+ "PIPE_BLENDFACTOR_INV_CONST_COLOR",
+ "PIPE_BLENDFACTOR_INV_CONST_ALPHA",
+ "PIPE_BLENDFACTOR_INV_SRC1_COLOR",
+ "PIPE_BLENDFACTOR_INV_SRC1_ALPHA"
+};
+
+static const char *
+util_dump_blend_factor_short_names[] = {
+ UTIL_DUMP_INVALID_NAME, /* 0x0 */
+ "one",
+ "src_color",
+ "src_alpha",
+ "dst_alpha",
+ "dst_color",
+ "src_alpha_saturate",
+ "const_color",
+ "const_alpha",
+ "src1_color",
+ "src1_alpha",
+ UTIL_DUMP_INVALID_NAME, /* 0x0b */
+ UTIL_DUMP_INVALID_NAME, /* 0x0c */
+ UTIL_DUMP_INVALID_NAME, /* 0x0d */
+ UTIL_DUMP_INVALID_NAME, /* 0x0e */
+ UTIL_DUMP_INVALID_NAME, /* 0x0f */
+ UTIL_DUMP_INVALID_NAME, /* 0x10 */
+ "zero",
+ "inv_src_color",
+ "inv_src_alpha",
+ "inv_dst_alpha",
+ "inv_dst_color",
+ UTIL_DUMP_INVALID_NAME, /* 0x16 */
+ "inv_const_color",
+ "inv_const_alpha",
+ "inv_src1_color",
+ "inv_src1_alpha"
+};
+
+DEFINE_UTIL_DUMP_CONTINUOUS(blend_factor)
+
+
+static const char *
+util_dump_blend_func_names[] = {
+ "PIPE_BLEND_ADD",
+ "PIPE_BLEND_SUBTRACT",
+ "PIPE_BLEND_REVERSE_SUBTRACT",
+ "PIPE_BLEND_MIN",
+ "PIPE_BLEND_MAX"
+};
+
+static const char *
+util_dump_blend_func_short_names[] = {
+ "add",
+ "sub",
+ "rev_sub",
+ "min",
+ "max"
+};
+
+DEFINE_UTIL_DUMP_CONTINUOUS(blend_func)
+
+
+static const char *
+util_dump_logicop_names[] = {
+ "PIPE_LOGICOP_CLEAR",
+ "PIPE_LOGICOP_NOR",
+ "PIPE_LOGICOP_AND_INVERTED",
+ "PIPE_LOGICOP_COPY_INVERTED",
+ "PIPE_LOGICOP_AND_REVERSE",
+ "PIPE_LOGICOP_INVERT",
+ "PIPE_LOGICOP_XOR",
+ "PIPE_LOGICOP_NAND",
+ "PIPE_LOGICOP_AND",
+ "PIPE_LOGICOP_EQUIV",
+ "PIPE_LOGICOP_NOOP",
+ "PIPE_LOGICOP_OR_INVERTED",
+ "PIPE_LOGICOP_COPY",
+ "PIPE_LOGICOP_OR_REVERSE",
+ "PIPE_LOGICOP_OR",
+ "PIPE_LOGICOP_SET"
+};
+
+static const char *
+util_dump_logicop_short_names[] = {
+ "clear",
+ "nor",
+ "and_inverted",
+ "copy_inverted",
+ "and_reverse",
+ "invert",
+ "xor",
+ "nand",
+ "and",
+ "equiv",
+ "noop",
+ "or_inverted",
+ "copy",
+ "or_reverse",
+ "or",
+ "set"
+};
+
+DEFINE_UTIL_DUMP_CONTINUOUS(logicop)
+
+
+static const char *
+util_dump_func_names[] = {
+ "PIPE_FUNC_NEVER",
+ "PIPE_FUNC_LESS",
+ "PIPE_FUNC_EQUAL",
+ "PIPE_FUNC_LEQUAL",
+ "PIPE_FUNC_GREATER",
+ "PIPE_FUNC_NOTEQUAL",
+ "PIPE_FUNC_GEQUAL",
+ "PIPE_FUNC_ALWAYS"
+};
+
+static const char *
+util_dump_func_short_names[] = {
+ "never",
+ "less",
+ "equal",
+ "less_equal",
+ "greater",
+ "not_equal",
+ "greater_equal",
+ "always"
+};
+
+DEFINE_UTIL_DUMP_CONTINUOUS(func)
+
+
+static const char *
+util_dump_stencil_op_names[] = {
+ "PIPE_STENCIL_OP_KEEP",
+ "PIPE_STENCIL_OP_ZERO",
+ "PIPE_STENCIL_OP_REPLACE",
+ "PIPE_STENCIL_OP_INCR",
+ "PIPE_STENCIL_OP_DECR",
+ "PIPE_STENCIL_OP_INCR_WRAP",
+ "PIPE_STENCIL_OP_DECR_WRAP",
+ "PIPE_STENCIL_OP_INVERT"
+};
+
+static const char *
+util_dump_stencil_op_short_names[] = {
+ "keep",
+ "zero",
+ "replace",
+ "incr",
+ "decr",
+ "incr_wrap",
+ "decr_wrap",
+ "invert"
+};
+
+DEFINE_UTIL_DUMP_CONTINUOUS(stencil_op)
+
+
+static const char *
+util_dump_tex_target_names[] = {
+ "PIPE_BUFFER",
+ "PIPE_TEXTURE_1D",
+ "PIPE_TEXTURE_2D",
+ "PIPE_TEXTURE_3D",
+ "PIPE_TEXTURE_CUBE",
+ "PIPE_TEXTURE_RECT",
+ "PIPE_TEXTURE_1D_ARRAY",
+ "PIPE_TEXTURE_2D_ARRAY",
+ "PIPE_TEXTURE_CUBE_ARRAY",
+};
+
+static const char *
+util_dump_tex_target_short_names[] = {
+ "buffer",
+ "1d",
+ "2d",
+ "3d",
+ "cube",
+ "rect",
+ "1d_array",
+ "2d_array",
+ "cube_array",
+};
+
+DEFINE_UTIL_DUMP_CONTINUOUS_COUNT(tex_target, PIPE_MAX_TEXTURE_TYPES)
+
+
+static const char *
+util_dump_tex_wrap_names[] = {
+ "PIPE_TEX_WRAP_REPEAT",
+ "PIPE_TEX_WRAP_CLAMP",
+ "PIPE_TEX_WRAP_CLAMP_TO_EDGE",
+ "PIPE_TEX_WRAP_CLAMP_TO_BORDER",
+ "PIPE_TEX_WRAP_MIRROR_REPEAT",
+ "PIPE_TEX_WRAP_MIRROR_CLAMP",
+ "PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE",
+ "PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER"
+};
+
+static const char *
+util_dump_tex_wrap_short_names[] = {
+ "repeat",
+ "clamp",
+ "clamp_to_edge",
+ "clamp_to_border",
+ "mirror_repeat",
+ "mirror_clamp",
+ "mirror_clamp_to_edge",
+ "mirror_clamp_to_border"
+};
+
+DEFINE_UTIL_DUMP_CONTINUOUS(tex_wrap)
+
+
+static const char *
+util_dump_tex_mipfilter_names[] = {
+ "PIPE_TEX_MIPFILTER_NEAREST",
+ "PIPE_TEX_MIPFILTER_LINEAR",
+ "PIPE_TEX_MIPFILTER_NONE"
+};
+
+static const char *
+util_dump_tex_mipfilter_short_names[] = {
+ "nearest",
+ "linear",
+ "none"
+};
+
+DEFINE_UTIL_DUMP_CONTINUOUS(tex_mipfilter)
+
+
+static const char *
+util_dump_tex_filter_names[] = {
+ "PIPE_TEX_FILTER_NEAREST",
+ "PIPE_TEX_FILTER_LINEAR"
+};
+
+static const char *
+util_dump_tex_filter_short_names[] = {
+ "nearest",
+ "linear"
+};
+
+DEFINE_UTIL_DUMP_CONTINUOUS(tex_filter)
diff --git a/src/minigallium/auxiliary/util/u_dump_state.c b/src/minigallium/auxiliary/util/u_dump_state.c
new file mode 100644
index 0000000..12f1d2d
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_dump_state.c
@@ -0,0 +1,836 @@
+/**************************************************************************
+ *
+ * Copyright 2008-2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#include "pipe/p_compiler.h"
+#include "util/u_memory.h"
+#include "util/u_string.h"
+#include "util/u_format.h"
+#include "tgsi/tgsi_dump.h"
+
+#include "u_dump.h"
+
+
+/*
+ * Dump primitives
+ */
+
+static INLINE void
+util_stream_writef(FILE *stream, const char *format, ...)
+{
+ static char buf[1024];
+ unsigned len;
+ va_list ap;
+ va_start(ap, format);
+ len = util_vsnprintf(buf, sizeof(buf), format, ap);
+ va_end(ap);
+ fwrite(buf, len, 1, stream);
+}
+
+static void
+util_dump_bool(FILE *stream, int value)
+{
+ util_stream_writef(stream, "%c", value ? '1' : '0');
+}
+
+static void
+util_dump_int(FILE *stream, long long int value)
+{
+ util_stream_writef(stream, "%lli", value);
+}
+
+static void
+util_dump_uint(FILE *stream, long long unsigned value)
+{
+ util_stream_writef(stream, "%llu", value);
+}
+
+static void
+util_dump_float(FILE *stream, double value)
+{
+ util_stream_writef(stream, "%g", value);
+}
+
+static void
+util_dump_string(FILE *stream, const char *str)
+{
+ fputs("\"", stream);
+ fputs(str, stream);
+ fputs("\"", stream);
+}
+
+static void
+util_dump_enum(FILE *stream, const char *value)
+{
+ fputs(value, stream);
+}
+
+static void
+util_dump_array_begin(FILE *stream)
+{
+ fputs("{", stream);
+}
+
+static void
+util_dump_array_end(FILE *stream)
+{
+ fputs("}", stream);
+}
+
+static void
+util_dump_elem_begin(FILE *stream)
+{
+}
+
+static void
+util_dump_elem_end(FILE *stream)
+{
+ fputs(", ", stream);
+}
+
+static void
+util_dump_struct_begin(FILE *stream, const char *name)
+{
+ fputs("{", stream);
+}
+
+static void
+util_dump_struct_end(FILE *stream)
+{
+ fputs("}", stream);
+}
+
+static void
+util_dump_member_begin(FILE *stream, const char *name)
+{
+ util_stream_writef(stream, "%s = ", name);
+}
+
+static void
+util_dump_member_end(FILE *stream)
+{
+ fputs(", ", stream);
+}
+
+static void
+util_dump_null(FILE *stream)
+{
+ fputs("NULL", stream);
+}
+
+static void
+util_dump_ptr(FILE *stream, const void *value)
+{
+ if(value)
+ util_stream_writef(stream, "0x%08lx", (unsigned long)(uintptr_t)value);
+ else
+ util_dump_null(stream);
+}
+
+
+/*
+ * Code saving macros.
+ */
+
+#define util_dump_arg(_stream, _type, _arg) \
+ do { \
+ util_dump_arg_begin(_stream, #_arg); \
+ util_dump_##_type(_stream, _arg); \
+ util_dump_arg_end(_stream); \
+ } while(0)
+
+#define util_dump_ret(_stream, _type, _arg) \
+ do { \
+ util_dump_ret_begin(_stream); \
+ util_dump_##_type(_stream, _arg); \
+ util_dump_ret_end(_stream); \
+ } while(0)
+
+#define util_dump_array(_stream, _type, _obj, _size) \
+ do { \
+ size_t idx; \
+ util_dump_array_begin(_stream); \
+ for(idx = 0; idx < (_size); ++idx) { \
+ util_dump_elem_begin(_stream); \
+ util_dump_##_type(_stream, (_obj)[idx]); \
+ util_dump_elem_end(_stream); \
+ } \
+ util_dump_array_end(_stream); \
+ } while(0)
+
+#define util_dump_struct_array(_stream, _type, _obj, _size) \
+ do { \
+ size_t idx; \
+ util_dump_array_begin(_stream); \
+ for(idx = 0; idx < (_size); ++idx) { \
+ util_dump_elem_begin(_stream); \
+ util_dump_##_type(_stream, &(_obj)[idx]); \
+ util_dump_elem_end(_stream); \
+ } \
+ util_dump_array_end(_stream); \
+ } while(0)
+
+#define util_dump_member(_stream, _type, _obj, _member) \
+ do { \
+ util_dump_member_begin(_stream, #_member); \
+ util_dump_##_type(_stream, (_obj)->_member); \
+ util_dump_member_end(_stream); \
+ } while(0)
+
+#define util_dump_arg_array(_stream, _type, _arg, _size) \
+ do { \
+ util_dump_arg_begin(_stream, #_arg); \
+ util_dump_array(_stream, _type, _arg, _size); \
+ util_dump_arg_end(_stream); \
+ } while(0)
+
+#define util_dump_member_array(_stream, _type, _obj, _member) \
+ do { \
+ util_dump_member_begin(_stream, #_member); \
+ util_dump_array(_stream, _type, (_obj)->_member, sizeof((_obj)->_member)/sizeof((_obj)->_member[0])); \
+ util_dump_member_end(_stream); \
+ } while(0)
+
+
+
+/*
+ * Wrappers for enum -> string dumpers.
+ */
+
+
+static void
+util_dump_format(FILE *stream, enum pipe_format format)
+{
+ util_dump_enum(stream, util_format_name(format));
+}
+
+
+static void
+util_dump_enum_blend_factor(FILE *stream, unsigned value)
+{
+ util_dump_enum(stream, util_dump_blend_factor(value, TRUE));
+}
+
+static void
+util_dump_enum_blend_func(FILE *stream, unsigned value)
+{
+ util_dump_enum(stream, util_dump_blend_func(value, TRUE));
+}
+
+static void
+util_dump_enum_func(FILE *stream, unsigned value)
+{
+ util_dump_enum(stream, util_dump_func(value, TRUE));
+}
+
+
+/*
+ * Public functions
+ */
+
+
+void
+util_dump_template(FILE *stream, const struct pipe_resource *templat)
+{
+ if(!templat) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_resource");
+
+ util_dump_member(stream, int, templat, target);
+ util_dump_member(stream, format, templat, format);
+
+ util_dump_member_begin(stream, "width");
+ util_dump_uint(stream, templat->width0);
+ util_dump_member_end(stream);
+
+ util_dump_member_begin(stream, "height");
+ util_dump_uint(stream, templat->height0);
+ util_dump_member_end(stream);
+
+ util_dump_member_begin(stream, "depth");
+ util_dump_uint(stream, templat->depth0);
+ util_dump_member_end(stream);
+
+ util_dump_member_begin(stream, "array_size");
+ util_dump_uint(stream, templat->array_size);
+ util_dump_member_end(stream);
+
+ util_dump_member(stream, uint, templat, last_level);
+ util_dump_member(stream, uint, templat, usage);
+ util_dump_member(stream, uint, templat, bind);
+ util_dump_member(stream, uint, templat, flags);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
+util_dump_rasterizer_state(FILE *stream, const struct pipe_rasterizer_state *state)
+{
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_rasterizer_state");
+
+ util_dump_member(stream, bool, state, flatshade);
+ util_dump_member(stream, bool, state, light_twoside);
+ util_dump_member(stream, bool, state, clamp_vertex_color);
+ util_dump_member(stream, bool, state, clamp_fragment_color);
+ util_dump_member(stream, uint, state, front_ccw);
+ util_dump_member(stream, uint, state, cull_face);
+ util_dump_member(stream, uint, state, fill_front);
+ util_dump_member(stream, uint, state, fill_back);
+ util_dump_member(stream, bool, state, offset_point);
+ util_dump_member(stream, bool, state, offset_line);
+ util_dump_member(stream, bool, state, offset_tri);
+ util_dump_member(stream, bool, state, scissor);
+ util_dump_member(stream, bool, state, poly_smooth);
+ util_dump_member(stream, bool, state, poly_stipple_enable);
+ util_dump_member(stream, bool, state, point_smooth);
+ util_dump_member(stream, uint, state, sprite_coord_enable);
+ util_dump_member(stream, bool, state, sprite_coord_mode);
+ util_dump_member(stream, bool, state, point_quad_rasterization);
+ util_dump_member(stream, bool, state, point_size_per_vertex);
+ util_dump_member(stream, bool, state, multisample);
+ util_dump_member(stream, bool, state, line_smooth);
+ util_dump_member(stream, bool, state, line_stipple_enable);
+ util_dump_member(stream, uint, state, line_stipple_factor);
+ util_dump_member(stream, uint, state, line_stipple_pattern);
+ util_dump_member(stream, bool, state, line_last_pixel);
+ util_dump_member(stream, bool, state, flatshade_first);
+ util_dump_member(stream, bool, state, half_pixel_center);
+ util_dump_member(stream, bool, state, bottom_edge_rule);
+ util_dump_member(stream, bool, state, rasterizer_discard);
+ util_dump_member(stream, bool, state, depth_clip);
+ util_dump_member(stream, uint, state, clip_plane_enable);
+
+ util_dump_member(stream, float, state, line_width);
+ util_dump_member(stream, float, state, point_size);
+ util_dump_member(stream, float, state, offset_units);
+ util_dump_member(stream, float, state, offset_scale);
+ util_dump_member(stream, float, state, offset_clamp);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
+util_dump_poly_stipple(FILE *stream, const struct pipe_poly_stipple *state)
+{
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_poly_stipple");
+
+ util_dump_member_begin(stream, "stipple");
+ util_dump_member_array(stream, uint, state, stipple);
+ util_dump_member_end(stream);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
+util_dump_viewport_state(FILE *stream, const struct pipe_viewport_state *state)
+{
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_viewport_state");
+
+ util_dump_member_array(stream, float, state, scale);
+ util_dump_member_array(stream, float, state, translate);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
+util_dump_scissor_state(FILE *stream, const struct pipe_scissor_state *state)
+{
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_scissor_state");
+
+ util_dump_member(stream, uint, state, minx);
+ util_dump_member(stream, uint, state, miny);
+ util_dump_member(stream, uint, state, maxx);
+ util_dump_member(stream, uint, state, maxy);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
+util_dump_clip_state(FILE *stream, const struct pipe_clip_state *state)
+{
+ unsigned i;
+
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_clip_state");
+
+ util_dump_member_begin(stream, "ucp");
+ util_dump_array_begin(stream);
+ for(i = 0; i < PIPE_MAX_CLIP_PLANES; ++i) {
+ util_dump_elem_begin(stream);
+ util_dump_array(stream, float, state->ucp[i], 4);
+ util_dump_elem_end(stream);
+ }
+ util_dump_array_end(stream);
+ util_dump_member_end(stream);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
+util_dump_shader_state(FILE *stream, const struct pipe_shader_state *state)
+{
+ char str[8192];
+ unsigned i;
+
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ tgsi_dump_str(state->tokens, 0, str, sizeof(str));
+
+ util_dump_struct_begin(stream, "pipe_shader_state");
+
+ util_dump_member_begin(stream, "tokens");
+ util_dump_string(stream, str);
+ util_dump_member_end(stream);
+
+ util_dump_member_begin(stream, "stream_output");
+ util_dump_struct_begin(stream, "pipe_stream_output_info");
+ util_dump_member(stream, uint, &state->stream_output, num_outputs);
+ util_dump_array(stream, uint, state->stream_output.stride,
+ Elements(state->stream_output.stride));
+ util_dump_array_begin(stream);
+ for(i = 0; i < state->stream_output.num_outputs; ++i) {
+ util_dump_elem_begin(stream);
+ util_dump_struct_begin(stream, ""); /* anonymous */
+ util_dump_member(stream, uint, &state->stream_output.output[i], register_index);
+ util_dump_member(stream, uint, &state->stream_output.output[i], start_component);
+ util_dump_member(stream, uint, &state->stream_output.output[i], num_components);
+ util_dump_member(stream, uint, &state->stream_output.output[i], output_buffer);
+ util_dump_struct_end(stream);
+ util_dump_elem_end(stream);
+ }
+ util_dump_array_end(stream);
+ util_dump_struct_end(stream);
+ util_dump_member_end(stream);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
+util_dump_depth_stencil_alpha_state(FILE *stream, const struct pipe_depth_stencil_alpha_state *state)
+{
+ unsigned i;
+
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_depth_stencil_alpha_state");
+
+ util_dump_member_begin(stream, "depth");
+ util_dump_struct_begin(stream, "pipe_depth_state");
+ util_dump_member(stream, bool, &state->depth, enabled);
+ if (state->depth.enabled) {
+ util_dump_member(stream, bool, &state->depth, writemask);
+ util_dump_member(stream, enum_func, &state->depth, func);
+ }
+ util_dump_struct_end(stream);
+ util_dump_member_end(stream);
+
+ util_dump_member_begin(stream, "stencil");
+ util_dump_array_begin(stream);
+ for(i = 0; i < Elements(state->stencil); ++i) {
+ util_dump_elem_begin(stream);
+ util_dump_struct_begin(stream, "pipe_stencil_state");
+ util_dump_member(stream, bool, &state->stencil[i], enabled);
+ if (state->stencil[i].enabled) {
+ util_dump_member(stream, enum_func, &state->stencil[i], func);
+ util_dump_member(stream, uint, &state->stencil[i], fail_op);
+ util_dump_member(stream, uint, &state->stencil[i], zpass_op);
+ util_dump_member(stream, uint, &state->stencil[i], zfail_op);
+ util_dump_member(stream, uint, &state->stencil[i], valuemask);
+ util_dump_member(stream, uint, &state->stencil[i], writemask);
+ }
+ util_dump_struct_end(stream);
+ util_dump_elem_end(stream);
+ }
+ util_dump_array_end(stream);
+ util_dump_member_end(stream);
+
+ util_dump_member_begin(stream, "alpha");
+ util_dump_struct_begin(stream, "pipe_alpha_state");
+ util_dump_member(stream, bool, &state->alpha, enabled);
+ if (state->alpha.enabled) {
+ util_dump_member(stream, enum_func, &state->alpha, func);
+ util_dump_member(stream, float, &state->alpha, ref_value);
+ }
+ util_dump_struct_end(stream);
+ util_dump_member_end(stream);
+
+ util_dump_struct_end(stream);
+}
+
+void
+util_dump_rt_blend_state(FILE *stream, const struct pipe_rt_blend_state *state)
+{
+ util_dump_struct_begin(stream, "pipe_rt_blend_state");
+
+ util_dump_member(stream, uint, state, blend_enable);
+ if (state->blend_enable) {
+ util_dump_member(stream, enum_blend_func, state, rgb_func);
+ util_dump_member(stream, enum_blend_factor, state, rgb_src_factor);
+ util_dump_member(stream, enum_blend_factor, state, rgb_dst_factor);
+
+ util_dump_member(stream, enum_blend_func, state, alpha_func);
+ util_dump_member(stream, enum_blend_factor, state, alpha_src_factor);
+ util_dump_member(stream, enum_blend_factor, state, alpha_dst_factor);
+ }
+
+ util_dump_member(stream, uint, state, colormask);
+
+ util_dump_struct_end(stream);
+}
+
+void
+util_dump_blend_state(FILE *stream, const struct pipe_blend_state *state)
+{
+ unsigned valid_entries = 1;
+
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_blend_state");
+
+ util_dump_member(stream, bool, state, dither);
+
+ util_dump_member(stream, bool, state, logicop_enable);
+ if (state->logicop_enable) {
+ util_dump_member(stream, enum_func, state, logicop_func);
+ }
+ else {
+ util_dump_member(stream, bool, state, independent_blend_enable);
+
+ util_dump_member_begin(stream, "rt");
+ if (state->independent_blend_enable)
+ valid_entries = PIPE_MAX_COLOR_BUFS;
+ util_dump_struct_array(stream, rt_blend_state, state->rt, valid_entries);
+ util_dump_member_end(stream);
+ }
+
+ util_dump_struct_end(stream);
+}
+
+
+void
+util_dump_blend_color(FILE *stream, const struct pipe_blend_color *state)
+{
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_blend_color");
+
+ util_dump_member_array(stream, float, state, color);
+
+ util_dump_struct_end(stream);
+}
+
+void
+util_dump_stencil_ref(FILE *stream, const struct pipe_stencil_ref *state)
+{
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_stencil_ref");
+
+ util_dump_member_array(stream, uint, state, ref_value);
+
+ util_dump_struct_end(stream);
+}
+
+void
+util_dump_framebuffer_state(FILE *stream, const struct pipe_framebuffer_state *state)
+{
+ util_dump_struct_begin(stream, "pipe_framebuffer_state");
+
+ util_dump_member(stream, uint, state, width);
+ util_dump_member(stream, uint, state, height);
+ util_dump_member(stream, uint, state, nr_cbufs);
+ util_dump_member_array(stream, ptr, state, cbufs);
+ util_dump_member(stream, ptr, state, zsbuf);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
+util_dump_sampler_state(FILE *stream, const struct pipe_sampler_state *state)
+{
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_sampler_state");
+
+ util_dump_member(stream, uint, state, wrap_s);
+ util_dump_member(stream, uint, state, wrap_t);
+ util_dump_member(stream, uint, state, wrap_r);
+ util_dump_member(stream, uint, state, min_img_filter);
+ util_dump_member(stream, uint, state, min_mip_filter);
+ util_dump_member(stream, uint, state, mag_img_filter);
+ util_dump_member(stream, uint, state, compare_mode);
+ util_dump_member(stream, enum_func, state, compare_func);
+ util_dump_member(stream, bool, state, normalized_coords);
+ util_dump_member(stream, uint, state, max_anisotropy);
+ util_dump_member(stream, float, state, lod_bias);
+ util_dump_member(stream, float, state, min_lod);
+ util_dump_member(stream, float, state, max_lod);
+ util_dump_member_array(stream, float, state, border_color.f);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
+util_dump_surface(FILE *stream, const struct pipe_surface *state)
+{
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_surface");
+
+ util_dump_member(stream, format, state, format);
+ util_dump_member(stream, uint, state, width);
+ util_dump_member(stream, uint, state, height);
+
+ util_dump_member(stream, ptr, state, texture);
+ util_dump_member(stream, uint, state, u.tex.level);
+ util_dump_member(stream, uint, state, u.tex.first_layer);
+ util_dump_member(stream, uint, state, u.tex.last_layer);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
+util_dump_transfer(FILE *stream, const struct pipe_transfer *state)
+{
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_transfer");
+
+ util_dump_member(stream, ptr, state, resource);
+ util_dump_member(stream, uint, state, level);
+ util_dump_member(stream, uint, state, usage);
+ util_dump_member_begin(stream, "box");
+ util_dump_box(stream, &state->box);
+ util_dump_member_end(stream);
+ util_dump_member(stream, uint, state, stride);
+ util_dump_member(stream, uint, state, layer_stride);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
+util_dump_vertex_buffer(FILE *stream, const struct pipe_vertex_buffer *state)
+{
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_vertex_buffer");
+
+ util_dump_member(stream, uint, state, stride);
+ util_dump_member(stream, uint, state, buffer_offset);
+ util_dump_member(stream, ptr, state, buffer);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
+util_dump_vertex_element(FILE *stream, const struct pipe_vertex_element *state)
+{
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_vertex_element");
+
+ util_dump_member(stream, uint, state, src_offset);
+ util_dump_member(stream, uint, state, instance_divisor);
+ util_dump_member(stream, uint, state, vertex_buffer_index);
+ util_dump_member(stream, format, state, src_format);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
+util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state)
+{
+ if(!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_draw_info");
+
+ util_dump_member(stream, bool, state, indexed);
+
+ util_dump_member(stream, uint, state, mode);
+ util_dump_member(stream, uint, state, start);
+ util_dump_member(stream, uint, state, count);
+
+ util_dump_member(stream, uint, state, start_instance);
+ util_dump_member(stream, uint, state, instance_count);
+
+ util_dump_member(stream, int, state, index_bias);
+ util_dump_member(stream, uint, state, min_index);
+ util_dump_member(stream, uint, state, max_index);
+
+ util_dump_member(stream, bool, state, primitive_restart);
+ util_dump_member(stream, uint, state, restart_index);
+
+ util_dump_member(stream, ptr, state, count_from_stream_output);
+
+ util_dump_struct_end(stream);
+}
+
+void util_dump_box(FILE *stream, const struct pipe_box *box)
+{
+ if(!box) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_box");
+
+ util_dump_member(stream, int, box, x);
+ util_dump_member(stream, int, box, y);
+ util_dump_member(stream, int, box, z);
+ util_dump_member(stream, int, box, width);
+ util_dump_member(stream, int, box, height);
+ util_dump_member(stream, int, box, depth);
+
+ util_dump_struct_end(stream);
+}
+
+void util_dump_blit_info(FILE *stream, const struct pipe_blit_info *info)
+{
+ char mask[7];
+
+ if (!info) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_blit_info");
+
+ util_dump_member_begin(stream, "dst");
+ util_dump_struct_begin(stream, "dst");
+ util_dump_member(stream, ptr, &info->dst, resource);
+ util_dump_member(stream, uint, &info->dst, level);
+ util_dump_member(stream, format, &info->dst, format);
+ util_dump_member_begin(stream, "box");
+ util_dump_box(stream, &info->dst.box);
+ util_dump_member_end(stream);
+ util_dump_struct_end(stream);
+ util_dump_member_end(stream);
+
+ util_dump_member_begin(stream, "src");
+ util_dump_struct_begin(stream, "src");
+ util_dump_member(stream, ptr, &info->src, resource);
+ util_dump_member(stream, uint, &info->src, level);
+ util_dump_member(stream, format, &info->src, format);
+ util_dump_member_begin(stream, "box");
+ util_dump_box(stream, &info->src.box);
+ util_dump_member_end(stream);
+ util_dump_struct_end(stream);
+ util_dump_member_end(stream);
+
+ mask[0] = (info->mask & PIPE_MASK_R) ? 'R' : '-';
+ mask[1] = (info->mask & PIPE_MASK_G) ? 'G' : '-';
+ mask[2] = (info->mask & PIPE_MASK_B) ? 'B' : '-';
+ mask[3] = (info->mask & PIPE_MASK_A) ? 'A' : '-';
+ mask[4] = (info->mask & PIPE_MASK_Z) ? 'Z' : '-';
+ mask[5] = (info->mask & PIPE_MASK_S) ? 'S' : '-';
+ mask[6] = 0;
+
+ util_dump_member_begin(stream, "mask");
+ util_dump_string(stream, mask);
+ util_dump_member_end(stream);
+ util_dump_member(stream, uint, info, filter);
+
+ util_dump_member(stream, bool, info, scissor_enable);
+ util_dump_member_begin(stream, "scissor");
+ util_dump_scissor_state(stream, &info->scissor);
+ util_dump_member_end(stream);
+
+ util_dump_struct_end(stream);
+}
diff --git a/src/minigallium/auxiliary/util/u_dynarray.h b/src/minigallium/auxiliary/util/u_dynarray.h
new file mode 100644
index 0000000..980cadf
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_dynarray.h
@@ -0,0 +1,114 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_DYNARRAY_H
+#define U_DYNARRAY_H
+
+#include "pipe/p_compiler.h"
+#include "util/u_memory.h"
+
+/* A zero-initialized version of this is guaranteed to represent an
+ * empty array.
+ *
+ * Also, size <= capacity and data != 0 if and only if capacity != 0
+ * capacity will always be the allocation size of data
+ */
+struct util_dynarray
+{
+ void *data;
+ unsigned size;
+ unsigned capacity;
+};
+
+static INLINE void
+util_dynarray_init(struct util_dynarray *buf)
+{
+ memset(buf, 0, sizeof(*buf));
+}
+
+static INLINE void
+util_dynarray_fini(struct util_dynarray *buf)
+{
+ if(buf->data)
+ {
+ FREE(buf->data);
+ util_dynarray_init(buf);
+ }
+}
+
+/* use util_dynarray_trim to reduce the allocated storage */
+static INLINE void *
+util_dynarray_resize(struct util_dynarray *buf, unsigned newsize)
+{
+ char *p;
+ if(newsize > buf->capacity)
+ {
+ unsigned newcap = buf->capacity << 1;
+ if(newsize > newcap)
+ newcap = newsize;
+ buf->data = REALLOC(buf->data, buf->capacity, newcap);
+ buf->capacity = newcap;
+ }
+
+ p = (char *)buf->data + buf->size;
+ buf->size = newsize;
+ return p;
+}
+
+static INLINE void *
+util_dynarray_grow(struct util_dynarray *buf, int diff)
+{
+ return util_dynarray_resize(buf, buf->size + diff);
+}
+
+static INLINE void
+util_dynarray_trim(struct util_dynarray *buf)
+{
+ if (buf->size != buf->capacity) {
+ if (buf->size) {
+ buf->data = REALLOC(buf->data, buf->capacity, buf->size);
+ buf->capacity = buf->size;
+ }
+ else {
+ FREE(buf->data);
+ buf->data = 0;
+ buf->capacity = 0;
+ }
+ }
+}
+
+#define util_dynarray_append(buf, type, v) do {type __v = (v); memcpy(util_dynarray_grow((buf), sizeof(type)), &__v, sizeof(type));} while(0)
+#define util_dynarray_top_ptr(buf, type) (type*)((char*)(buf)->data + (buf)->size - sizeof(type))
+#define util_dynarray_top(buf, type) *util_dynarray_top_ptr(buf, type)
+#define util_dynarray_pop_ptr(buf, type) (type*)((char*)(buf)->data + ((buf)->size -= sizeof(type)))
+#define util_dynarray_pop(buf, type) *util_dynarray_pop_ptr(buf, type)
+#define util_dynarray_contains(buf, type) ((buf)->size >= sizeof(type))
+#define util_dynarray_element(buf, type, idx) ((type*)(buf)->data + (idx))
+#define util_dynarray_begin(buf) ((buf)->data)
+#define util_dynarray_end(buf) ((void*)util_dynarray_element((buf), char, (buf)->size))
+
+#endif /* U_DYNARRAY_H */
+
diff --git a/src/minigallium/auxiliary/util/u_fifo.h b/src/minigallium/auxiliary/util/u_fifo.h
new file mode 100644
index 0000000..9e007de
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_fifo.h
@@ -0,0 +1,94 @@
+/**************************************************************************
+ *
+ * Copyright © 2009 Jakob Bornecrantz
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_FIFO_H
+#define U_FIFO_H
+
+#include "util/u_memory.h"
+
+struct util_fifo
+{
+ size_t head;
+ size_t tail;
+ size_t num;
+ size_t size;
+};
+
+static INLINE struct util_fifo *
+u_fifo_create(size_t size)
+{
+ struct util_fifo *fifo;
+ fifo = MALLOC(sizeof(*fifo) + size * sizeof(void*));
+
+ fifo->head = 0;
+ fifo->tail = 0;
+ fifo->num = 0;
+ fifo->size = size;
+
+ return fifo;
+}
+
+static INLINE boolean
+u_fifo_add(struct util_fifo *fifo, void *ptr)
+{
+ void **array = (void**)&fifo[1];
+ if (fifo->num >= fifo->size)
+ return FALSE;
+
+ if (++fifo->head >= fifo->size)
+ fifo->head = 0;
+
+ array[fifo->head] = ptr;
+
+ ++fifo->num;
+
+ return TRUE;
+}
+
+static INLINE boolean
+u_fifo_pop(struct util_fifo *fifo, void **ptr)
+{
+ void **array = (void**)&fifo[1];
+
+ if (!fifo->num)
+ return FALSE;
+
+ if (++fifo->tail >= fifo->size)
+ fifo->tail = 0;
+
+ *ptr = array[fifo->tail];
+
+ ++fifo->num;
+
+ return TRUE;
+}
+
+static INLINE void
+u_fifo_destroy(struct util_fifo *fifo)
+{
+ FREE(fifo);
+}
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_format.c b/src/minigallium/auxiliary/util/u_format.c
new file mode 100644
index 0000000..08ef6ab
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format.c
@@ -0,0 +1,725 @@
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Pixel format accessor functions.
+ *
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+#include "u_math.h"
+#include "u_memory.h"
+#include "u_rect.h"
+#include "u_format.h"
+#include "u_format_s3tc.h"
+
+#include "pipe/p_defines.h"
+
+
+boolean
+util_format_is_float(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+ unsigned i;
+
+ assert(desc);
+ if (!desc) {
+ return FALSE;
+ }
+
+ i = util_format_get_first_non_void_channel(format);
+ if (i == -1) {
+ return FALSE;
+ }
+
+ return desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT ? TRUE : FALSE;
+}
+
+
+/** Test if the format contains RGB, but not alpha */
+boolean
+util_format_has_alpha(enum pipe_format format)
+{
+ const struct util_format_description *desc =
+ util_format_description(format);
+
+ return (desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB ||
+ desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) &&
+ desc->swizzle[3] != UTIL_FORMAT_SWIZZLE_1;
+}
+
+
+boolean
+util_format_is_luminance(enum pipe_format format)
+{
+ const struct util_format_description *desc =
+ util_format_description(format);
+
+ if ((desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB ||
+ desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) &&
+ desc->swizzle[0] == UTIL_FORMAT_SWIZZLE_X &&
+ desc->swizzle[1] == UTIL_FORMAT_SWIZZLE_X &&
+ desc->swizzle[2] == UTIL_FORMAT_SWIZZLE_X &&
+ desc->swizzle[3] == UTIL_FORMAT_SWIZZLE_1) {
+ return TRUE;
+ }
+ return FALSE;
+}
+
+boolean
+util_format_is_pure_integer(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+ int i;
+
+ /* Find the first non-void channel. */
+ i = util_format_get_first_non_void_channel(format);
+ if (i == -1)
+ return FALSE;
+
+ return desc->channel[i].pure_integer ? TRUE : FALSE;
+}
+
+boolean
+util_format_is_pure_sint(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+ int i;
+
+ i = util_format_get_first_non_void_channel(format);
+ if (i == -1)
+ return FALSE;
+
+ return (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED && desc->channel[i].pure_integer) ? TRUE : FALSE;
+}
+
+boolean
+util_format_is_pure_uint(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+ int i;
+
+ i = util_format_get_first_non_void_channel(format);
+ if (i == -1)
+ return FALSE;
+
+ return (desc->channel[i].type == UTIL_FORMAT_TYPE_UNSIGNED && desc->channel[i].pure_integer) ? TRUE : FALSE;
+}
+
+/**
+ * Returns true if all non-void channels are normalized signed.
+ */
+boolean
+util_format_is_snorm(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+ int i;
+
+ if (desc->is_mixed)
+ return FALSE;
+
+ i = util_format_get_first_non_void_channel(format);
+ if (i == -1)
+ return FALSE;
+
+ return desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED &&
+ !desc->channel[i].pure_integer &&
+ desc->channel[i].normalized;
+}
+
+boolean
+util_format_is_luminance_alpha(enum pipe_format format)
+{
+ const struct util_format_description *desc =
+ util_format_description(format);
+
+ if ((desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB ||
+ desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) &&
+ desc->swizzle[0] == UTIL_FORMAT_SWIZZLE_X &&
+ desc->swizzle[1] == UTIL_FORMAT_SWIZZLE_X &&
+ desc->swizzle[2] == UTIL_FORMAT_SWIZZLE_X &&
+ desc->swizzle[3] == UTIL_FORMAT_SWIZZLE_Y) {
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+boolean
+util_format_is_intensity(enum pipe_format format)
+{
+ const struct util_format_description *desc =
+ util_format_description(format);
+
+ if ((desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB ||
+ desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) &&
+ desc->swizzle[0] == UTIL_FORMAT_SWIZZLE_X &&
+ desc->swizzle[1] == UTIL_FORMAT_SWIZZLE_X &&
+ desc->swizzle[2] == UTIL_FORMAT_SWIZZLE_X &&
+ desc->swizzle[3] == UTIL_FORMAT_SWIZZLE_X) {
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+boolean
+util_format_is_supported(enum pipe_format format, unsigned bind)
+{
+ if (util_format_is_s3tc(format) && !util_format_s3tc_enabled) {
+ return FALSE;
+ }
+
+#ifndef TEXTURE_FLOAT_ENABLED
+ if ((bind & PIPE_BIND_RENDER_TARGET) &&
+ format != PIPE_FORMAT_R9G9B9E5_FLOAT &&
+ format != PIPE_FORMAT_R11G11B10_FLOAT &&
+ util_format_is_float(format)) {
+ return FALSE;
+ }
+#endif
+
+ return TRUE;
+}
+
+
+void
+util_format_read_4f(enum pipe_format format,
+ float *dst, unsigned dst_stride,
+ const void *src, unsigned src_stride,
+ unsigned x, unsigned y, unsigned w, unsigned h)
+{
+ const struct util_format_description *format_desc;
+ const uint8_t *src_row;
+ float *dst_row;
+
+ format_desc = util_format_description(format);
+
+ assert(x % format_desc->block.width == 0);
+ assert(y % format_desc->block.height == 0);
+
+ src_row = (const uint8_t *)src + y*src_stride + x*(format_desc->block.bits/8);
+ dst_row = dst;
+
+ format_desc->unpack_rgba_float(dst_row, dst_stride, src_row, src_stride, w, h);
+}
+
+
+void
+util_format_write_4f(enum pipe_format format,
+ const float *src, unsigned src_stride,
+ void *dst, unsigned dst_stride,
+ unsigned x, unsigned y, unsigned w, unsigned h)
+{
+ const struct util_format_description *format_desc;
+ uint8_t *dst_row;
+ const float *src_row;
+
+ format_desc = util_format_description(format);
+
+ assert(x % format_desc->block.width == 0);
+ assert(y % format_desc->block.height == 0);
+
+ dst_row = (uint8_t *)dst + y*dst_stride + x*(format_desc->block.bits/8);
+ src_row = src;
+
+ format_desc->pack_rgba_float(dst_row, dst_stride, src_row, src_stride, w, h);
+}
+
+
+void
+util_format_read_4ub(enum pipe_format format, uint8_t *dst, unsigned dst_stride, const void *src, unsigned src_stride, unsigned x, unsigned y, unsigned w, unsigned h)
+{
+ const struct util_format_description *format_desc;
+ const uint8_t *src_row;
+ uint8_t *dst_row;
+
+ format_desc = util_format_description(format);
+
+ assert(x % format_desc->block.width == 0);
+ assert(y % format_desc->block.height == 0);
+
+ src_row = (const uint8_t *)src + y*src_stride + x*(format_desc->block.bits/8);
+ dst_row = dst;
+
+ format_desc->unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, w, h);
+}
+
+
+void
+util_format_write_4ub(enum pipe_format format, const uint8_t *src, unsigned src_stride, void *dst, unsigned dst_stride, unsigned x, unsigned y, unsigned w, unsigned h)
+{
+ const struct util_format_description *format_desc;
+ uint8_t *dst_row;
+ const uint8_t *src_row;
+
+ format_desc = util_format_description(format);
+
+ assert(x % format_desc->block.width == 0);
+ assert(y % format_desc->block.height == 0);
+
+ dst_row = (uint8_t *)dst + y*dst_stride + x*(format_desc->block.bits/8);
+ src_row = src;
+
+ format_desc->pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, w, h);
+}
+
+void
+util_format_read_4ui(enum pipe_format format,
+ unsigned *dst, unsigned dst_stride,
+ const void *src, unsigned src_stride,
+ unsigned x, unsigned y, unsigned w, unsigned h)
+{
+ const struct util_format_description *format_desc;
+ const uint8_t *src_row;
+ uint32_t *dst_row;
+
+ format_desc = util_format_description(format);
+
+ assert(x % format_desc->block.width == 0);
+ assert(y % format_desc->block.height == 0);
+
+ src_row = (const uint8_t *)src + y*src_stride + x*(format_desc->block.bits/8);
+ dst_row = dst;
+
+ format_desc->unpack_rgba_uint(dst_row, dst_stride, src_row, src_stride, w, h);
+}
+
+void
+util_format_write_4ui(enum pipe_format format,
+ const unsigned int *src, unsigned src_stride,
+ void *dst, unsigned dst_stride,
+ unsigned x, unsigned y, unsigned w, unsigned h)
+{
+ const struct util_format_description *format_desc;
+ uint8_t *dst_row;
+ const uint32_t *src_row;
+
+ format_desc = util_format_description(format);
+
+ assert(x % format_desc->block.width == 0);
+ assert(y % format_desc->block.height == 0);
+
+ dst_row = (uint8_t *)dst + y*dst_stride + x*(format_desc->block.bits/8);
+ src_row = src;
+
+ format_desc->pack_rgba_uint(dst_row, dst_stride, src_row, src_stride, w, h);
+}
+
+void
+util_format_read_4i(enum pipe_format format,
+ int *dst, unsigned dst_stride,
+ const void *src, unsigned src_stride,
+ unsigned x, unsigned y, unsigned w, unsigned h)
+{
+ const struct util_format_description *format_desc;
+ const uint8_t *src_row;
+ int32_t *dst_row;
+
+ format_desc = util_format_description(format);
+
+ assert(x % format_desc->block.width == 0);
+ assert(y % format_desc->block.height == 0);
+
+ src_row = (const uint8_t *)src + y*src_stride + x*(format_desc->block.bits/8);
+ dst_row = dst;
+
+ format_desc->unpack_rgba_sint(dst_row, dst_stride, src_row, src_stride, w, h);
+}
+
+void
+util_format_write_4i(enum pipe_format format,
+ const int *src, unsigned src_stride,
+ void *dst, unsigned dst_stride,
+ unsigned x, unsigned y, unsigned w, unsigned h)
+{
+ const struct util_format_description *format_desc;
+ uint8_t *dst_row;
+ const int32_t *src_row;
+
+ format_desc = util_format_description(format);
+
+ assert(x % format_desc->block.width == 0);
+ assert(y % format_desc->block.height == 0);
+
+ dst_row = (uint8_t *)dst + y*dst_stride + x*(format_desc->block.bits/8);
+ src_row = src;
+
+ format_desc->pack_rgba_sint(dst_row, dst_stride, src_row, src_stride, w, h);
+}
+
+boolean
+util_is_format_compatible(const struct util_format_description *src_desc,
+ const struct util_format_description *dst_desc)
+{
+ unsigned chan;
+
+ if (src_desc->format == dst_desc->format) {
+ return TRUE;
+ }
+
+ if (src_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN ||
+ dst_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) {
+ return FALSE;
+ }
+
+ if (src_desc->block.bits != dst_desc->block.bits ||
+ src_desc->nr_channels != dst_desc->nr_channels ||
+ src_desc->colorspace != dst_desc->colorspace) {
+ return FALSE;
+ }
+
+ for (chan = 0; chan < 4; ++chan) {
+ if (src_desc->channel[chan].size !=
+ dst_desc->channel[chan].size) {
+ return FALSE;
+ }
+ }
+
+ for (chan = 0; chan < 4; ++chan) {
+ enum util_format_swizzle swizzle = dst_desc->swizzle[chan];
+
+ if (swizzle < 4) {
+ if (src_desc->swizzle[chan] != swizzle) {
+ return FALSE;
+ }
+ if ((src_desc->channel[swizzle].type !=
+ dst_desc->channel[swizzle].type) ||
+ (src_desc->channel[swizzle].normalized !=
+ dst_desc->channel[swizzle].normalized)) {
+ return FALSE;
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+
+boolean
+util_format_fits_8unorm(const struct util_format_description *format_desc)
+{
+ unsigned chan;
+
+ /*
+ * After linearized sRGB values require more than 8bits.
+ */
+
+ if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) {
+ return FALSE;
+ }
+
+ switch (format_desc->layout) {
+
+ case UTIL_FORMAT_LAYOUT_S3TC:
+ /*
+ * These are straight forward.
+ */
+ return TRUE;
+ case UTIL_FORMAT_LAYOUT_RGTC:
+ if (format_desc->format == PIPE_FORMAT_RGTC1_SNORM ||
+ format_desc->format == PIPE_FORMAT_RGTC2_SNORM ||
+ format_desc->format == PIPE_FORMAT_LATC1_SNORM ||
+ format_desc->format == PIPE_FORMAT_LATC2_SNORM)
+ return FALSE;
+ return TRUE;
+
+ case UTIL_FORMAT_LAYOUT_PLAIN:
+ /*
+ * For these we can find a generic rule.
+ */
+
+ for (chan = 0; chan < format_desc->nr_channels; ++chan) {
+ switch (format_desc->channel[chan].type) {
+ case UTIL_FORMAT_TYPE_VOID:
+ break;
+ case UTIL_FORMAT_TYPE_UNSIGNED:
+ if (!format_desc->channel[chan].normalized ||
+ format_desc->channel[chan].size > 8) {
+ return FALSE;
+ }
+ break;
+ default:
+ return FALSE;
+ }
+ }
+ return TRUE;
+
+ default:
+ /*
+ * Handle all others on a case by case basis.
+ */
+
+ switch (format_desc->format) {
+ case PIPE_FORMAT_R1_UNORM:
+ case PIPE_FORMAT_UYVY:
+ case PIPE_FORMAT_YUYV:
+ case PIPE_FORMAT_R8G8_B8G8_UNORM:
+ case PIPE_FORMAT_G8R8_G8B8_UNORM:
+ return TRUE;
+
+ default:
+ return FALSE;
+ }
+ }
+}
+
+
+void
+util_format_translate(enum pipe_format dst_format,
+ void *dst, unsigned dst_stride,
+ unsigned dst_x, unsigned dst_y,
+ enum pipe_format src_format,
+ const void *src, unsigned src_stride,
+ unsigned src_x, unsigned src_y,
+ unsigned width, unsigned height)
+{
+ const struct util_format_description *dst_format_desc;
+ const struct util_format_description *src_format_desc;
+ uint8_t *dst_row;
+ const uint8_t *src_row;
+ unsigned x_step, y_step;
+ unsigned dst_step;
+ unsigned src_step;
+
+ dst_format_desc = util_format_description(dst_format);
+ src_format_desc = util_format_description(src_format);
+
+ if (util_is_format_compatible(src_format_desc, dst_format_desc)) {
+ /*
+ * Trivial case.
+ */
+
+ util_copy_rect(dst, dst_format, dst_stride, dst_x, dst_y,
+ width, height, src, (int)src_stride,
+ src_x, src_y);
+ return;
+ }
+
+ assert(dst_x % dst_format_desc->block.width == 0);
+ assert(dst_y % dst_format_desc->block.height == 0);
+ assert(src_x % src_format_desc->block.width == 0);
+ assert(src_y % src_format_desc->block.height == 0);
+
+ dst_row = (uint8_t *)dst + dst_y*dst_stride + dst_x*(dst_format_desc->block.bits/8);
+ src_row = (const uint8_t *)src + src_y*src_stride + src_x*(src_format_desc->block.bits/8);
+
+ /*
+ * This works because all pixel formats have pixel blocks with power of two
+ * sizes.
+ */
+
+ y_step = MAX2(dst_format_desc->block.height, src_format_desc->block.height);
+ x_step = MAX2(dst_format_desc->block.width, src_format_desc->block.width);
+ assert(y_step % dst_format_desc->block.height == 0);
+ assert(y_step % src_format_desc->block.height == 0);
+
+ dst_step = y_step / dst_format_desc->block.height * dst_stride;
+ src_step = y_step / src_format_desc->block.height * src_stride;
+
+ /*
+ * TODO: double formats will loose precision
+ * TODO: Add a special case for formats that are mere swizzles of each other
+ */
+
+ if (src_format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS ||
+ dst_format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) {
+ float *tmp_z = NULL;
+ uint8_t *tmp_s = NULL;
+
+ assert(x_step == 1);
+ assert(y_step == 1);
+
+ if (src_format_desc->unpack_z_float &&
+ dst_format_desc->pack_z_float) {
+ tmp_z = MALLOC(width * sizeof *tmp_z);
+ }
+
+ if (src_format_desc->unpack_s_8uint &&
+ dst_format_desc->pack_s_8uint) {
+ tmp_s = MALLOC(width * sizeof *tmp_s);
+ }
+
+ while (height--) {
+ if (tmp_z) {
+ src_format_desc->unpack_z_float(tmp_z, 0, src_row, src_stride, width, 1);
+ dst_format_desc->pack_z_float(dst_row, dst_stride, tmp_z, 0, width, 1);
+ }
+
+ if (tmp_s) {
+ src_format_desc->unpack_s_8uint(tmp_s, 0, src_row, src_stride, width, 1);
+ dst_format_desc->pack_s_8uint(dst_row, dst_stride, tmp_s, 0, width, 1);
+ }
+
+ dst_row += dst_step;
+ src_row += src_step;
+ }
+
+ FREE(tmp_s);
+
+ FREE(tmp_z);
+
+ return;
+ }
+
+ if (util_format_fits_8unorm(src_format_desc) ||
+ util_format_fits_8unorm(dst_format_desc)) {
+ unsigned tmp_stride;
+ uint8_t *tmp_row;
+
+ tmp_stride = MAX2(width, x_step) * 4 * sizeof *tmp_row;
+ tmp_row = MALLOC(y_step * tmp_stride);
+ if (!tmp_row)
+ return;
+
+ while (height >= y_step) {
+ src_format_desc->unpack_rgba_8unorm(tmp_row, tmp_stride, src_row, src_stride, width, y_step);
+ dst_format_desc->pack_rgba_8unorm(dst_row, dst_stride, tmp_row, tmp_stride, width, y_step);
+
+ dst_row += dst_step;
+ src_row += src_step;
+ height -= y_step;
+ }
+
+ if (height) {
+ src_format_desc->unpack_rgba_8unorm(tmp_row, tmp_stride, src_row, src_stride, width, height);
+ dst_format_desc->pack_rgba_8unorm(dst_row, dst_stride, tmp_row, tmp_stride, width, height);
+ }
+
+ FREE(tmp_row);
+ }
+ else {
+ unsigned tmp_stride;
+ float *tmp_row;
+
+ tmp_stride = MAX2(width, x_step) * 4 * sizeof *tmp_row;
+ tmp_row = MALLOC(y_step * tmp_stride);
+ if (!tmp_row)
+ return;
+
+ while (height >= y_step) {
+ src_format_desc->unpack_rgba_float(tmp_row, tmp_stride, src_row, src_stride, width, y_step);
+ dst_format_desc->pack_rgba_float(dst_row, dst_stride, tmp_row, tmp_stride, width, y_step);
+
+ dst_row += dst_step;
+ src_row += src_step;
+ height -= y_step;
+ }
+
+ if (height) {
+ src_format_desc->unpack_rgba_float(tmp_row, tmp_stride, src_row, src_stride, width, height);
+ dst_format_desc->pack_rgba_float(dst_row, dst_stride, tmp_row, tmp_stride, width, height);
+ }
+
+ FREE(tmp_row);
+ }
+}
+
+void util_format_compose_swizzles(const unsigned char swz1[4],
+ const unsigned char swz2[4],
+ unsigned char dst[4])
+{
+ unsigned i;
+
+ for (i = 0; i < 4; i++) {
+ dst[i] = swz2[i] <= UTIL_FORMAT_SWIZZLE_W ?
+ swz1[swz2[i]] : swz2[i];
+ }
+}
+
+void util_format_apply_color_swizzle(union pipe_color_union *dst,
+ const union pipe_color_union *src,
+ const unsigned char swz[4],
+ const boolean is_integer)
+{
+ unsigned c;
+
+ if (is_integer) {
+ for (c = 0; c < 4; ++c) {
+ switch (swz[c]) {
+ case PIPE_SWIZZLE_RED: dst->ui[c] = src->ui[0]; break;
+ case PIPE_SWIZZLE_GREEN: dst->ui[c] = src->ui[1]; break;
+ case PIPE_SWIZZLE_BLUE: dst->ui[c] = src->ui[2]; break;
+ case PIPE_SWIZZLE_ALPHA: dst->ui[c] = src->ui[3]; break;
+ default:
+ dst->ui[c] = (swz[c] == PIPE_SWIZZLE_ONE) ? 1 : 0;
+ break;
+ }
+ }
+ } else {
+ for (c = 0; c < 4; ++c) {
+ switch (swz[c]) {
+ case PIPE_SWIZZLE_RED: dst->f[c] = src->f[0]; break;
+ case PIPE_SWIZZLE_GREEN: dst->f[c] = src->f[1]; break;
+ case PIPE_SWIZZLE_BLUE: dst->f[c] = src->f[2]; break;
+ case PIPE_SWIZZLE_ALPHA: dst->f[c] = src->f[3]; break;
+ default:
+ dst->f[c] = (swz[c] == PIPE_SWIZZLE_ONE) ? 1.0f : 0.0f;
+ break;
+ }
+ }
+ }
+}
+
+void util_format_swizzle_4f(float *dst, const float *src,
+ const unsigned char swz[4])
+{
+ unsigned i;
+
+ for (i = 0; i < 4; i++) {
+ if (swz[i] <= UTIL_FORMAT_SWIZZLE_W)
+ dst[i] = src[swz[i]];
+ else if (swz[i] == UTIL_FORMAT_SWIZZLE_0)
+ dst[i] = 0;
+ else if (swz[i] == UTIL_FORMAT_SWIZZLE_1)
+ dst[i] = 1;
+ }
+}
+
+void util_format_unswizzle_4f(float *dst, const float *src,
+ const unsigned char swz[4])
+{
+ unsigned i;
+
+ for (i = 0; i < 4; i++) {
+ switch (swz[i]) {
+ case UTIL_FORMAT_SWIZZLE_X:
+ dst[0] = src[i];
+ break;
+ case UTIL_FORMAT_SWIZZLE_Y:
+ dst[1] = src[i];
+ break;
+ case UTIL_FORMAT_SWIZZLE_Z:
+ dst[2] = src[i];
+ break;
+ case UTIL_FORMAT_SWIZZLE_W:
+ dst[3] = src[i];
+ break;
+ }
+ }
+}
diff --git a/src/minigallium/auxiliary/util/u_format.csv b/src/minigallium/auxiliary/util/u_format.csv
new file mode 100644
index 0000000..f3925bb
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format.csv
@@ -0,0 +1,374 @@
+###########################################################################
+#
+# Copyright 2009-2010 VMware, Inc.
+# All Rights Reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sub license, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice (including the
+# next paragraph) shall be included in all copies or substantial portions
+# of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR
+# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+###########################################################################
+
+# This CSV file has the input data for u_format.h's struct
+# util_format_description.
+#
+# Each format entry contains:
+# - name, per enum pipe_format
+# - layout, per enum util_format_layout, in shortened lower caps
+# - pixel block's width
+# - pixel block's height
+# - channel encoding (only meaningful for plain layout), containing for each
+# channel the following information:
+# - type, one of
+# - 'x': void
+# - 'u': unsigned
+# - 's': signed
+# - 'h': fixed
+# - 'f': FLOAT
+# - optionally followed by 'n' if it is normalized
+# - optionally followed by 'p' if it is pure
+# - number of bits
+# - channel swizzle
+# - color space: rgb, yub, sz
+#
+# See also:
+# - http://msdn.microsoft.com/en-us/library/bb172558.aspx (D3D9)
+# - http://msdn.microsoft.com/en-us/library/bb205073.aspx#mapping_texture_formats (D3D9 -> D3D10)
+# - http://msdn.microsoft.com/en-us/library/bb173059.aspx (D3D10)
+#
+# Note that GL doesn't really specify the layout of internal formats. See
+# OpenGL 2.1 specification, Table 3.16, on the "Correspondence of sized
+# internal formats to base in- ternal formats, and desired component
+# resolutions for each sized internal format."
+
+# None
+# Described as regular uint_8 bytes, i.e. PIPE_FORMAT_R8_USCALED
+PIPE_FORMAT_NONE , plain, 1, 1, u8 , , , , x001, rgb
+
+# Typical rendertarget formats
+PIPE_FORMAT_B8G8R8A8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, rgb
+PIPE_FORMAT_B8G8R8X8_UNORM , plain, 1, 1, un8 , un8 , un8 , x8 , zyx1, rgb
+PIPE_FORMAT_A8R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , yzwx, rgb
+PIPE_FORMAT_X8R8G8B8_UNORM , plain, 1, 1, x8 , un8 , un8 , un8 , yzw1, rgb
+PIPE_FORMAT_A8B8G8R8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, rgb
+PIPE_FORMAT_X8B8G8R8_UNORM , plain, 1, 1, x8 , un8 , un8 , un8 , wzy1, rgb
+# PIPE_FORMAT_R8G8B8A8_UNORM is below
+PIPE_FORMAT_R8G8B8X8_UNORM , plain, 1, 1, un8 , un8 , un8 , x8 , xyz1, rgb
+PIPE_FORMAT_B5G5R5X1_UNORM , plain, 1, 1, un5 , un5 , un5 , x1 , zyx1, rgb
+PIPE_FORMAT_B5G5R5A1_UNORM , plain, 1, 1, un5 , un5 , un5 , un1 , zyxw, rgb
+PIPE_FORMAT_B4G4R4A4_UNORM , plain, 1, 1, un4 , un4 , un4 , un4 , zyxw, rgb
+PIPE_FORMAT_B4G4R4X4_UNORM , plain, 1, 1, un4 , un4 , un4 , x4 , zyx1, rgb
+PIPE_FORMAT_B5G6R5_UNORM , plain, 1, 1, un5 , un6 , un5 , , zyx1, rgb
+PIPE_FORMAT_R10G10B10A2_UNORM , plain, 1, 1, un10, un10, un10, un2 , xyzw, rgb
+PIPE_FORMAT_B10G10R10A2_UNORM , plain, 1, 1, un10, un10, un10, un2 , zyxw, rgb
+PIPE_FORMAT_B2G3R3_UNORM , plain, 1, 1, un2 , un3 , un3 , , zyx1, rgb
+
+# Luminance/Intensity/Alpha formats
+PIPE_FORMAT_L8_UNORM , plain, 1, 1, un8 , , , , xxx1, rgb
+PIPE_FORMAT_A8_UNORM , plain, 1, 1, un8 , , , , 000x, rgb
+PIPE_FORMAT_I8_UNORM , plain, 1, 1, un8 , , , , xxxx, rgb
+PIPE_FORMAT_L4A4_UNORM , plain, 1, 1, un4 , un4 , , , xxxy, rgb
+PIPE_FORMAT_L8A8_UNORM , plain, 1, 1, un8 , un8 , , , xxxy, rgb
+PIPE_FORMAT_L16_UNORM , plain, 1, 1, un16, , , , xxx1, rgb
+PIPE_FORMAT_A16_UNORM , plain, 1, 1, un16, , , , 000x, rgb
+PIPE_FORMAT_I16_UNORM , plain, 1, 1, un16, , , , xxxx, rgb
+PIPE_FORMAT_L16A16_UNORM , plain, 1, 1, un16, un16, , , xxxy, rgb
+PIPE_FORMAT_A8_SNORM , plain, 1, 1, sn8 , , , , 000x, rgb
+PIPE_FORMAT_L8_SNORM , plain, 1, 1, sn8 , , , , xxx1, rgb
+PIPE_FORMAT_L8A8_SNORM , plain, 1, 1, sn8 , sn8 , , , xxxy, rgb
+PIPE_FORMAT_I8_SNORM , plain, 1, 1, sn8 , , , , xxxx, rgb
+PIPE_FORMAT_A16_SNORM , plain, 1, 1, sn16, , , , 000x, rgb
+PIPE_FORMAT_L16_SNORM , plain, 1, 1, sn16, , , , xxx1, rgb
+PIPE_FORMAT_L16A16_SNORM , plain, 1, 1, sn16, sn16, , , xxxy, rgb
+PIPE_FORMAT_I16_SNORM , plain, 1, 1, sn16, , , , xxxx, rgb
+PIPE_FORMAT_A16_FLOAT , plain, 1, 1, f16 , , , , 000x, rgb
+PIPE_FORMAT_L16_FLOAT , plain, 1, 1, f16 , , , , xxx1, rgb
+PIPE_FORMAT_L16A16_FLOAT , plain, 1, 1, f16 , f16 , , , xxxy, rgb
+PIPE_FORMAT_I16_FLOAT , plain, 1, 1, f16 , , , , xxxx, rgb
+PIPE_FORMAT_A32_FLOAT , plain, 1, 1, f32 , , , , 000x, rgb
+PIPE_FORMAT_L32_FLOAT , plain, 1, 1, f32 , , , , xxx1, rgb
+PIPE_FORMAT_L32A32_FLOAT , plain, 1, 1, f32 , f32 , , , xxxy, rgb
+PIPE_FORMAT_I32_FLOAT , plain, 1, 1, f32 , , , , xxxx, rgb
+
+# SRGB formats
+PIPE_FORMAT_L8_SRGB , plain, 1, 1, un8 , , , , xxx1, srgb
+PIPE_FORMAT_L8A8_SRGB , plain, 1, 1, un8 , un8 , , , xxxy, srgb
+PIPE_FORMAT_R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , , xyz1, srgb
+PIPE_FORMAT_R8G8B8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, srgb
+PIPE_FORMAT_A8B8G8R8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, srgb
+PIPE_FORMAT_X8B8G8R8_SRGB , plain, 1, 1, x8 , un8 , un8 , un8 , wzy1, srgb
+PIPE_FORMAT_B8G8R8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, srgb
+PIPE_FORMAT_B8G8R8X8_SRGB , plain, 1, 1, un8 , un8 , un8 , x8 , zyx1, srgb
+PIPE_FORMAT_A8R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , yzwx, srgb
+PIPE_FORMAT_X8R8G8B8_SRGB , plain, 1, 1, x8 , un8 , un8 , un8 , yzw1, srgb
+
+# Mixed-sign formats (typically used for bump map textures)
+PIPE_FORMAT_R8SG8SB8UX8U_NORM , plain, 1, 1, sn8 , sn8 , un8 , x8 , xyz1, rgb
+PIPE_FORMAT_R10SG10SB10SA2U_NORM , plain, 1, 1, sn10, sn10, sn10, un2 , xyzw, rgb
+PIPE_FORMAT_R5SG5SB6U_NORM , plain, 1, 1, sn5 , sn5 , un6 , , xyz1, rgb
+
+# Depth-stencil formats
+PIPE_FORMAT_S8_UINT , plain, 1, 1, up8 , , , , _x__, zs
+PIPE_FORMAT_Z16_UNORM , plain, 1, 1, un16, , , , x___, zs
+PIPE_FORMAT_Z32_UNORM , plain, 1, 1, un32, , , , x___, zs
+PIPE_FORMAT_Z32_FLOAT , plain, 1, 1, f32 , , , , x___, zs
+PIPE_FORMAT_Z24_UNORM_S8_UINT , plain, 1, 1, un24, up8 , , , xy__, zs
+PIPE_FORMAT_S8_UINT_Z24_UNORM , plain, 1, 1, up8 , un24, , , yx__, zs
+PIPE_FORMAT_X24S8_UINT , plain, 1, 1, x24 , up8 , , , _y__, zs
+PIPE_FORMAT_S8X24_UINT , plain, 1, 1, up8 , x24 , , , _x__, zs
+PIPE_FORMAT_Z24X8_UNORM , plain, 1, 1, un24, x8 , , , x___, zs
+PIPE_FORMAT_X8Z24_UNORM , plain, 1, 1, x8 , un24, , , y___, zs
+PIPE_FORMAT_Z32_FLOAT_S8X24_UINT , plain, 1, 1, f32 , up8 , x24, , xy__, zs
+PIPE_FORMAT_X32_S8X24_UINT , plain, 1, 1, x32 , up8 , x24, , _y__, zs
+
+# YUV formats
+# http://www.fourcc.org/yuv.php#UYVY
+PIPE_FORMAT_UYVY , subsampled, 2, 1, x32 , , , , xyz1, yuv
+# http://www.fourcc.org/yuv.php#YUYV (a.k.a http://www.fourcc.org/yuv.php#YUY2)
+PIPE_FORMAT_YUYV , subsampled, 2, 1, x32 , , , , xyz1, yuv
+# same subsampling but with rgb channels
+PIPE_FORMAT_R8G8_B8G8_UNORM , subsampled, 2, 1, x32 , , , , xyz1, rgb
+PIPE_FORMAT_G8R8_G8B8_UNORM , subsampled, 2, 1, x32 , , , , xyz1, rgb
+PIPE_FORMAT_G8R8_B8R8_UNORM , subsampled, 2, 1, x32 , , , , yxz1, rgb
+PIPE_FORMAT_R8G8_R8B8_UNORM , subsampled, 2, 1, x32 , , , , yxz1, rgb
+
+# some special formats not fitting anywhere else
+PIPE_FORMAT_R11G11B10_FLOAT , other, 1, 1, x32 , , , , xyz1, rgb
+PIPE_FORMAT_R9G9B9E5_FLOAT , other, 1, 1, x32 , , , , xyz1, rgb
+PIPE_FORMAT_R1_UNORM , other, 8, 1, x8 , , , , x001, rgb
+# A.k.a. D3DFMT_CxV8U8
+PIPE_FORMAT_R8G8Bx_SNORM , other, 1, 1, sn8 , sn8 , , , xyz1, rgb
+
+# Compressed formats
+# - http://en.wikipedia.org/wiki/S3_Texture_Compression
+# - http://www.opengl.org/registry/specs/EXT/texture_compression_s3tc.txt
+# - http://www.opengl.org/registry/specs/ARB/texture_compression_rgtc.txt
+# - http://www.opengl.org/registry/specs/EXT/texture_compression_latc.txt
+# - http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt
+# - http://msdn.microsoft.com/en-us/library/bb694531.aspx
+PIPE_FORMAT_DXT1_RGB , s3tc, 4, 4, x64 , , , , xyz1, rgb
+PIPE_FORMAT_DXT1_RGBA , s3tc, 4, 4, x64 , , , , xyzw, rgb
+PIPE_FORMAT_DXT3_RGBA , s3tc, 4, 4, x128, , , , xyzw, rgb
+PIPE_FORMAT_DXT5_RGBA , s3tc, 4, 4, x128, , , , xyzw, rgb
+PIPE_FORMAT_DXT1_SRGB , s3tc, 4, 4, x64 , , , , xyz1, srgb
+PIPE_FORMAT_DXT1_SRGBA , s3tc, 4, 4, x64 , , , , xyzw, srgb
+PIPE_FORMAT_DXT3_SRGBA , s3tc, 4, 4, x128, , , , xyzw, srgb
+PIPE_FORMAT_DXT5_SRGBA , s3tc, 4, 4, x128, , , , xyzw, srgb
+
+PIPE_FORMAT_RGTC1_UNORM , rgtc, 4, 4, x64, , , , x001, rgb
+PIPE_FORMAT_RGTC1_SNORM , rgtc, 4, 4, x64, , , , x001, rgb
+PIPE_FORMAT_RGTC2_UNORM , rgtc, 4, 4, x128, , , , xy01, rgb
+PIPE_FORMAT_RGTC2_SNORM , rgtc, 4, 4, x128, , , , xy01, rgb
+
+PIPE_FORMAT_LATC1_UNORM , rgtc, 4, 4, x64, , , , xxx1, rgb
+PIPE_FORMAT_LATC1_SNORM , rgtc, 4, 4, x64, , , , xxx1, rgb
+PIPE_FORMAT_LATC2_UNORM , rgtc, 4, 4, x128, , , , xxxy, rgb
+PIPE_FORMAT_LATC2_SNORM , rgtc, 4, 4, x128, , , , xxxy, rgb
+
+PIPE_FORMAT_ETC1_RGB8 , etc, 4, 4, x64, , , , xyz1, rgb
+
+# Straightforward D3D10-like formats (also used for
+# vertex buffer element description)
+#
+# See also:
+# - src/gallium/auxiliary/translate/translate_generic.c
+# - src/mesa/state_tracker/st_draw.c
+PIPE_FORMAT_R64_FLOAT , plain, 1, 1, f64 , , , , x001, rgb
+PIPE_FORMAT_R64G64_FLOAT , plain, 1, 1, f64 , f64 , , , xy01, rgb
+PIPE_FORMAT_R64G64B64_FLOAT , plain, 1, 1, f64 , f64 , f64 , , xyz1, rgb
+PIPE_FORMAT_R64G64B64A64_FLOAT , plain, 1, 1, f64 , f64 , f64 , f64 , xyzw, rgb
+PIPE_FORMAT_R32_FLOAT , plain, 1, 1, f32 , , , , x001, rgb
+PIPE_FORMAT_R32G32_FLOAT , plain, 1, 1, f32 , f32 , , , xy01, rgb
+PIPE_FORMAT_R32G32B32_FLOAT , plain, 1, 1, f32 , f32 , f32 , , xyz1, rgb
+PIPE_FORMAT_R32G32B32A32_FLOAT , plain, 1, 1, f32 , f32 , f32 , f32 , xyzw, rgb
+PIPE_FORMAT_R32_UNORM , plain, 1, 1, un32, , , , x001, rgb
+PIPE_FORMAT_R32G32_UNORM , plain, 1, 1, un32, un32, , , xy01, rgb
+PIPE_FORMAT_R32G32B32_UNORM , plain, 1, 1, un32, un32, un32, , xyz1, rgb
+PIPE_FORMAT_R32G32B32A32_UNORM , plain, 1, 1, un32, un32, un32, un32, xyzw, rgb
+PIPE_FORMAT_R32_USCALED , plain, 1, 1, u32 , , , , x001, rgb
+PIPE_FORMAT_R32G32_USCALED , plain, 1, 1, u32 , u32 , , , xy01, rgb
+PIPE_FORMAT_R32G32B32_USCALED , plain, 1, 1, u32 , u32 , u32 , , xyz1, rgb
+PIPE_FORMAT_R32G32B32A32_USCALED , plain, 1, 1, u32 , u32 , u32 , u32 , xyzw, rgb
+PIPE_FORMAT_R32_SNORM , plain, 1, 1, sn32, , , , x001, rgb
+PIPE_FORMAT_R32G32_SNORM , plain, 1, 1, sn32, sn32, , , xy01, rgb
+PIPE_FORMAT_R32G32B32_SNORM , plain, 1, 1, sn32, sn32, sn32, , xyz1, rgb
+PIPE_FORMAT_R32G32B32A32_SNORM , plain, 1, 1, sn32, sn32, sn32, sn32, xyzw, rgb
+PIPE_FORMAT_R32_SSCALED , plain, 1, 1, s32 , , , , x001, rgb
+PIPE_FORMAT_R32G32_SSCALED , plain, 1, 1, s32 , s32 , , , xy01, rgb
+PIPE_FORMAT_R32G32B32_SSCALED , plain, 1, 1, s32 , s32 , s32 , , xyz1, rgb
+PIPE_FORMAT_R32G32B32A32_SSCALED , plain, 1, 1, s32 , s32 , s32 , s32 , xyzw, rgb
+PIPE_FORMAT_R16_FLOAT , plain, 1, 1, f16 , , , , x001, rgb
+PIPE_FORMAT_R16G16_FLOAT , plain, 1, 1, f16 , f16 , , , xy01, rgb
+PIPE_FORMAT_R16G16B16_FLOAT , plain, 1, 1, f16 , f16 , f16 , , xyz1, rgb
+PIPE_FORMAT_R16G16B16A16_FLOAT , plain, 1, 1, f16 , f16 , f16 , f16 , xyzw, rgb
+PIPE_FORMAT_R16_UNORM , plain, 1, 1, un16, , , , x001, rgb
+PIPE_FORMAT_R16G16_UNORM , plain, 1, 1, un16, un16, , , xy01, rgb
+PIPE_FORMAT_R16G16B16_UNORM , plain, 1, 1, un16, un16, un16, , xyz1, rgb
+PIPE_FORMAT_R16G16B16A16_UNORM , plain, 1, 1, un16, un16, un16, un16, xyzw, rgb
+PIPE_FORMAT_R16_USCALED , plain, 1, 1, u16 , , , , x001, rgb
+PIPE_FORMAT_R16G16_USCALED , plain, 1, 1, u16 , u16 , , , xy01, rgb
+PIPE_FORMAT_R16G16B16_USCALED , plain, 1, 1, u16 , u16 , u16 , , xyz1, rgb
+PIPE_FORMAT_R16G16B16A16_USCALED , plain, 1, 1, u16 , u16 , u16 , u16 , xyzw, rgb
+PIPE_FORMAT_R16_SNORM , plain, 1, 1, sn16, , , , x001, rgb
+PIPE_FORMAT_R16G16_SNORM , plain, 1, 1, sn16, sn16, , , xy01, rgb
+PIPE_FORMAT_R16G16B16_SNORM , plain, 1, 1, sn16, sn16, sn16, , xyz1, rgb
+PIPE_FORMAT_R16G16B16A16_SNORM , plain, 1, 1, sn16, sn16, sn16, sn16, xyzw, rgb
+PIPE_FORMAT_R16_SSCALED , plain, 1, 1, s16 , , , , x001, rgb
+PIPE_FORMAT_R16G16_SSCALED , plain, 1, 1, s16 , s16 , , , xy01, rgb
+PIPE_FORMAT_R16G16B16_SSCALED , plain, 1, 1, s16 , s16 , s16 , , xyz1, rgb
+PIPE_FORMAT_R16G16B16A16_SSCALED , plain, 1, 1, s16 , s16 , s16 , s16 , xyzw, rgb
+PIPE_FORMAT_R8_UNORM , plain, 1, 1, un8 , , , , x001, rgb
+PIPE_FORMAT_R8G8_UNORM , plain, 1, 1, un8 , un8 , , , xy01, rgb
+PIPE_FORMAT_R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , , xyz1, rgb
+PIPE_FORMAT_R8G8B8A8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, rgb
+PIPE_FORMAT_R8_USCALED , plain, 1, 1, u8 , , , , x001, rgb
+PIPE_FORMAT_R8G8_USCALED , plain, 1, 1, u8 , u8 , , , xy01, rgb
+PIPE_FORMAT_R8G8B8_USCALED , plain, 1, 1, u8 , u8 , u8 , , xyz1, rgb
+PIPE_FORMAT_R8G8B8A8_USCALED , plain, 1, 1, u8 , u8 , u8 , u8 , xyzw, rgb
+PIPE_FORMAT_R8_SNORM , plain, 1, 1, sn8 , , , , x001, rgb
+PIPE_FORMAT_R8G8_SNORM , plain, 1, 1, sn8 , sn8 , , , xy01, rgb
+PIPE_FORMAT_R8G8B8_SNORM , plain, 1, 1, sn8 , sn8 , sn8 , , xyz1, rgb
+PIPE_FORMAT_R8G8B8A8_SNORM , plain, 1, 1, sn8 , sn8 , sn8 , sn8 , xyzw, rgb
+PIPE_FORMAT_R8_SSCALED , plain, 1, 1, s8 , , , , x001, rgb
+PIPE_FORMAT_R8G8_SSCALED , plain, 1, 1, s8 , s8 , , , xy01, rgb
+PIPE_FORMAT_R8G8B8_SSCALED , plain, 1, 1, s8 , s8 , s8 , , xyz1, rgb
+PIPE_FORMAT_R8G8B8A8_SSCALED , plain, 1, 1, s8 , s8 , s8 , s8 , xyzw, rgb
+
+# GL-specific vertex buffer element formats
+# A.k.a. GL_FIXED
+PIPE_FORMAT_R32_FIXED , plain, 1, 1, h32 , , , , x001, rgb
+PIPE_FORMAT_R32G32_FIXED , plain, 1, 1, h32 , h32 , , , xy01, rgb
+PIPE_FORMAT_R32G32B32_FIXED , plain, 1, 1, h32 , h32 , h32 , , xyz1, rgb
+PIPE_FORMAT_R32G32B32A32_FIXED , plain, 1, 1, h32 , h32 , h32 , h32 , xyzw, rgb
+
+# D3D9-specific vertex buffer element formats
+# See also:
+# - http://msdn.microsoft.com/en-us/library/bb172533.aspx
+# A.k.a. D3DDECLTYPE_UDEC3
+PIPE_FORMAT_R10G10B10X2_USCALED , plain, 1, 1, u10 , u10 , u10 , x2 , xyz1, rgb
+# A.k.a. D3DDECLTYPE_DEC3N
+PIPE_FORMAT_R10G10B10X2_SNORM , plain, 1, 1, sn10, sn10, sn10 , x2 , xyz1, rgb
+
+PIPE_FORMAT_YV12 , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv
+PIPE_FORMAT_YV16 , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv
+PIPE_FORMAT_IYUV , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv
+PIPE_FORMAT_NV12 , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv
+PIPE_FORMAT_NV21 , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv
+
+# Usually used to implement IA44 and AI44 formats in video decoding
+PIPE_FORMAT_R4A4_UNORM , plain, 1, 1, un4 , un4 , , , y00x, rgb
+PIPE_FORMAT_A4R4_UNORM , plain, 1, 1, un4 , un4 , , , x00y, rgb
+PIPE_FORMAT_R8A8_UNORM , plain, 1, 1, un8 , un8 , , , x00y, rgb
+PIPE_FORMAT_A8R8_UNORM , plain, 1, 1, un8 , un8 , , , y00x, rgb
+
+# ARB_vertex_type_10_10_10_2_REV
+PIPE_FORMAT_R10G10B10A2_USCALED , plain, 1, 1, u10, u10, u10, u2, xyzw, rgb
+PIPE_FORMAT_R10G10B10A2_SSCALED , plain, 1, 1, s10, s10, s10, s2, xyzw, rgb
+PIPE_FORMAT_R10G10B10A2_SNORM , plain, 1, 1, sn10, sn10, sn10, sn2, xyzw, rgb
+PIPE_FORMAT_B10G10R10A2_USCALED , plain, 1, 1, u10, u10, u10, u2, zyxw, rgb
+PIPE_FORMAT_B10G10R10A2_SSCALED , plain, 1, 1, s10, s10, s10, s2, zyxw, rgb
+PIPE_FORMAT_B10G10R10A2_SNORM , plain, 1, 1, sn10, sn10, sn10, sn2, zyxw, rgb
+
+PIPE_FORMAT_R8_UINT , plain, 1, 1, up8, , , , x001, rgb
+PIPE_FORMAT_R8G8_UINT , plain, 1, 1, up8, up8, , , xy01, rgb
+PIPE_FORMAT_R8G8B8_UINT , plain, 1, 1, up8, up8, up8, , xyz1, rgb
+PIPE_FORMAT_R8G8B8A8_UINT , plain, 1, 1, up8, up8, up8, up8, xyzw, rgb
+
+PIPE_FORMAT_R8_SINT , plain, 1, 1, sp8, , , , x001, rgb
+PIPE_FORMAT_R8G8_SINT , plain, 1, 1, sp8, sp8, , , xy01, rgb
+PIPE_FORMAT_R8G8B8_SINT , plain, 1, 1, sp8, sp8, sp8, , xyz1, rgb
+PIPE_FORMAT_R8G8B8A8_SINT , plain, 1, 1, sp8, sp8, sp8, sp8, xyzw, rgb
+
+PIPE_FORMAT_R16_UINT , plain, 1, 1, up16, , , , x001, rgb
+PIPE_FORMAT_R16G16_UINT , plain, 1, 1, up16, up16, , , xy01, rgb
+PIPE_FORMAT_R16G16B16_UINT , plain, 1, 1, up16, up16, up16, , xyz1, rgb
+PIPE_FORMAT_R16G16B16A16_UINT , plain, 1, 1, up16, up16, up16, up16, xyzw, rgb
+
+PIPE_FORMAT_R16_SINT , plain, 1, 1, sp16, , , , x001, rgb
+PIPE_FORMAT_R16G16_SINT , plain, 1, 1, sp16, sp16, , , xy01, rgb
+PIPE_FORMAT_R16G16B16_SINT , plain, 1, 1, sp16, sp16, sp16, , xyz1, rgb
+PIPE_FORMAT_R16G16B16A16_SINT , plain, 1, 1, sp16, sp16, sp16, sp16, xyzw, rgb
+
+PIPE_FORMAT_R32_UINT , plain, 1, 1, up32, , , , x001, rgb
+PIPE_FORMAT_R32G32_UINT , plain, 1, 1, up32, up32, , , xy01, rgb
+PIPE_FORMAT_R32G32B32_UINT , plain, 1, 1, up32, up32, up32, , xyz1, rgb
+PIPE_FORMAT_R32G32B32A32_UINT , plain, 1, 1, up32, up32, up32, up32, xyzw, rgb
+
+PIPE_FORMAT_R32_SINT , plain, 1, 1, sp32, , , , x001, rgb
+PIPE_FORMAT_R32G32_SINT , plain, 1, 1, sp32, sp32, , , xy01, rgb
+PIPE_FORMAT_R32G32B32_SINT , plain, 1, 1, sp32, sp32, sp32, , xyz1, rgb
+PIPE_FORMAT_R32G32B32A32_SINT , plain, 1, 1, sp32, sp32, sp32, sp32, xyzw, rgb
+
+PIPE_FORMAT_A8_UINT , plain, 1, 1, up8, , , , 000x, rgb
+PIPE_FORMAT_I8_UINT , plain, 1, 1, up8, , , , xxxx, rgb
+PIPE_FORMAT_L8_UINT , plain, 1, 1, up8, , , , xxx1, rgb
+PIPE_FORMAT_L8A8_UINT , plain, 1, 1, up8, up8, , , xxxy, rgb
+
+PIPE_FORMAT_A8_SINT , plain, 1, 1, sp8, , , , 000x, rgb
+PIPE_FORMAT_I8_SINT , plain, 1, 1, sp8, , , , xxxx, rgb
+PIPE_FORMAT_L8_SINT , plain, 1, 1, sp8, , , , xxx1, rgb
+PIPE_FORMAT_L8A8_SINT , plain, 1, 1, sp8, sp8, , , xxxy, rgb
+
+PIPE_FORMAT_A16_UINT , plain, 1, 1, up16, , , , 000x, rgb
+PIPE_FORMAT_I16_UINT , plain, 1, 1, up16, , , , xxxx, rgb
+PIPE_FORMAT_L16_UINT , plain, 1, 1, up16, , , , xxx1, rgb
+PIPE_FORMAT_L16A16_UINT , plain, 1, 1, up16, up16, , , xxxy, rgb
+
+PIPE_FORMAT_A16_SINT , plain, 1, 1, sp16, , , , 000x, rgb
+PIPE_FORMAT_I16_SINT , plain, 1, 1, sp16, , , , xxxx, rgb
+PIPE_FORMAT_L16_SINT , plain, 1, 1, sp16, , , , xxx1, rgb
+PIPE_FORMAT_L16A16_SINT , plain, 1, 1, sp16, sp16, , , xxxy, rgb
+
+PIPE_FORMAT_A32_UINT , plain, 1, 1, up32, , , , 000x, rgb
+PIPE_FORMAT_I32_UINT , plain, 1, 1, up32, , , , xxxx, rgb
+PIPE_FORMAT_L32_UINT , plain, 1, 1, up32, , , , xxx1, rgb
+PIPE_FORMAT_L32A32_UINT , plain, 1, 1, up32, up32, , , xxxy, rgb
+
+PIPE_FORMAT_A32_SINT , plain, 1, 1, sp32, , , , 000x, rgb
+PIPE_FORMAT_I32_SINT , plain, 1, 1, sp32, , , , xxxx, rgb
+PIPE_FORMAT_L32_SINT , plain, 1, 1, sp32, , , , xxx1, rgb
+PIPE_FORMAT_L32A32_SINT , plain, 1, 1, sp32, sp32, , , xxxy, rgb
+
+PIPE_FORMAT_B10G10R10A2_UINT , plain, 1, 1, up10, up10, up10, up2, zyxw, rgb
+
+PIPE_FORMAT_R8G8B8X8_SNORM , plain, 1, 1, sn8, sn8, sn8, x8, xyz1, rgb
+PIPE_FORMAT_R8G8B8X8_SRGB , plain, 1, 1, un8, un8, un8, x8, xyz1, srgb
+PIPE_FORMAT_R8G8B8X8_UINT , plain, 1, 1, up8, up8, up8, x8, xyz1, rgb
+PIPE_FORMAT_R8G8B8X8_SINT , plain, 1, 1, sp8, sp8, sp8, x8, xyz1, rgb
+PIPE_FORMAT_B10G10R10X2_UNORM , plain, 1, 1, un10, un10, un10, x2, zyx1, rgb
+PIPE_FORMAT_R16G16B16X16_UNORM , plain, 1, 1, un16, un16, un16, x16, xyz1, rgb
+PIPE_FORMAT_R16G16B16X16_SNORM , plain, 1, 1, sn16, sn16, sn16, x16, xyz1, rgb
+PIPE_FORMAT_R16G16B16X16_FLOAT , plain, 1, 1, f16, f16, f16, x16, xyz1, rgb
+PIPE_FORMAT_R16G16B16X16_UINT , plain, 1, 1, up16, up16, up16, x16, xyz1, rgb
+PIPE_FORMAT_R16G16B16X16_SINT , plain, 1, 1, sp16, sp16, sp16, x16, xyz1, rgb
+PIPE_FORMAT_R32G32B32X32_FLOAT , plain, 1, 1, f32, f32, f32, x32, xyz1, rgb
+PIPE_FORMAT_R32G32B32X32_UINT , plain, 1, 1, up32, up32, up32, x32, xyz1, rgb
+PIPE_FORMAT_R32G32B32X32_SINT , plain, 1, 1, sp32, sp32, sp32, x32, xyz1, rgb
+
+PIPE_FORMAT_R8A8_SNORM , plain, 1, 1, sn8 , sn8 , , , x00y, rgb
+PIPE_FORMAT_R16A16_UNORM , plain, 1, 1, un16 , un16 , , , x00y, rgb
+PIPE_FORMAT_R16A16_SNORM , plain, 1, 1, sn16 , sn16 , , , x00y, rgb
+PIPE_FORMAT_R16A16_FLOAT , plain, 1, 1, f16 , f16 , , , x00y, rgb
+PIPE_FORMAT_R32A32_FLOAT , plain, 1, 1, f32 , f32 , , , x00y, rgb
+PIPE_FORMAT_R8A8_UINT , plain, 1, 1, up8 , up8 , , , x00y, rgb
+PIPE_FORMAT_R8A8_SINT , plain, 1, 1, sp8 , sp8 , , , x00y, rgb
+PIPE_FORMAT_R16A16_UINT , plain, 1, 1, up16 , up16 , , , x00y, rgb
+PIPE_FORMAT_R16A16_SINT , plain, 1, 1, sp16 , sp16 , , , x00y, rgb
+PIPE_FORMAT_R32A32_UINT , plain, 1, 1, up32 , up32 , , , x00y, rgb
+PIPE_FORMAT_R32A32_SINT , plain, 1, 1, sp32 , sp32 , , , x00y, rgb
diff --git a/src/minigallium/auxiliary/util/u_format.h b/src/minigallium/auxiliary/util/u_format.h
new file mode 100644
index 0000000..28527f5
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format.h
@@ -0,0 +1,1196 @@
+/**************************************************************************
+ *
+ * Copyright 2009-2010 Vmware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#ifndef U_FORMAT_H
+#define U_FORMAT_H
+
+
+#include "pipe/p_format.h"
+#include "pipe/p_defines.h"
+#include "util/u_debug.h"
+
+union pipe_color_union;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * Describe how to pack/unpack pixels into/from the prescribed format.
+ *
+ * XXX: This could be renamed to something like util_format_pack, or broke down
+ * in flags inside util_format_block that said exactly what we want.
+ */
+enum util_format_layout {
+ /**
+ * Formats with util_format_block::width == util_format_block::height == 1
+ * that can be described as an ordinary data structure.
+ */
+ UTIL_FORMAT_LAYOUT_PLAIN = 0,
+
+ /**
+ * Formats with sub-sampled channels.
+ *
+ * This is for formats like YVYU where there is less than one sample per
+ * pixel.
+ */
+ UTIL_FORMAT_LAYOUT_SUBSAMPLED = 3,
+
+ /**
+ * S3 Texture Compression formats.
+ */
+ UTIL_FORMAT_LAYOUT_S3TC = 4,
+
+ /**
+ * Red-Green Texture Compression formats.
+ */
+ UTIL_FORMAT_LAYOUT_RGTC = 5,
+
+ /**
+ * Ericsson Texture Compression
+ */
+ UTIL_FORMAT_LAYOUT_ETC = 6,
+
+ /**
+ * Everything else that doesn't fit in any of the above layouts.
+ */
+ UTIL_FORMAT_LAYOUT_OTHER = 7
+};
+
+
+struct util_format_block
+{
+ /** Block width in pixels */
+ unsigned width;
+
+ /** Block height in pixels */
+ unsigned height;
+
+ /** Block size in bits */
+ unsigned bits;
+};
+
+
+enum util_format_type {
+ UTIL_FORMAT_TYPE_VOID = 0,
+ UTIL_FORMAT_TYPE_UNSIGNED = 1,
+ UTIL_FORMAT_TYPE_SIGNED = 2,
+ UTIL_FORMAT_TYPE_FIXED = 3,
+ UTIL_FORMAT_TYPE_FLOAT = 4
+};
+
+
+enum util_format_swizzle {
+ UTIL_FORMAT_SWIZZLE_X = 0,
+ UTIL_FORMAT_SWIZZLE_Y = 1,
+ UTIL_FORMAT_SWIZZLE_Z = 2,
+ UTIL_FORMAT_SWIZZLE_W = 3,
+ UTIL_FORMAT_SWIZZLE_0 = 4,
+ UTIL_FORMAT_SWIZZLE_1 = 5,
+ UTIL_FORMAT_SWIZZLE_NONE = 6,
+ UTIL_FORMAT_SWIZZLE_MAX = 7 /**< Number of enums counter (must be last) */
+};
+
+
+enum util_format_colorspace {
+ UTIL_FORMAT_COLORSPACE_RGB = 0,
+ UTIL_FORMAT_COLORSPACE_SRGB = 1,
+ UTIL_FORMAT_COLORSPACE_YUV = 2,
+ UTIL_FORMAT_COLORSPACE_ZS = 3
+};
+
+
+struct util_format_channel_description
+{
+ unsigned type:5; /**< UTIL_FORMAT_TYPE_x */
+ unsigned normalized:1;
+ unsigned pure_integer:1;
+ unsigned size:9; /**< bits per channel */
+ unsigned shift:16; /** number of bits from lsb */
+};
+
+
+struct util_format_description
+{
+ enum pipe_format format;
+
+ const char *name;
+
+ /**
+ * Short name, striped of the prefix, lower case.
+ */
+ const char *short_name;
+
+ /**
+ * Pixel block dimensions.
+ */
+ struct util_format_block block;
+
+ enum util_format_layout layout;
+
+ /**
+ * The number of channels.
+ */
+ unsigned nr_channels:3;
+
+ /**
+ * Whether all channels have the same number of (whole) bytes and type.
+ */
+ unsigned is_array:1;
+
+ /**
+ * Whether the pixel format can be described as a bitfield structure.
+ *
+ * In particular:
+ * - pixel depth must be 8, 16, or 32 bits;
+ * - all channels must be unsigned, signed, or void
+ */
+ unsigned is_bitmask:1;
+
+ /**
+ * Whether channels have mixed types (ignoring UTIL_FORMAT_TYPE_VOID).
+ */
+ unsigned is_mixed:1;
+
+ /**
+ * Input channel description, in the order XYZW.
+ *
+ * Only valid for UTIL_FORMAT_LAYOUT_PLAIN formats.
+ *
+ * If each channel is accessed as an individual N-byte value, X is always
+ * at the lowest address in memory, Y is always next, and so on. For all
+ * currently-defined formats, the N-byte value has native endianness.
+ *
+ * If instead a group of channels is accessed as a single N-byte value,
+ * the order of the channels within that value depends on endianness.
+ * For big-endian targets, X is the most significant subvalue,
+ * otherwise it is the least significant one.
+ *
+ * For example, if X is 8 bits and Y is 24 bits, the memory order is:
+ *
+ * 0 1 2 3
+ * little-endian: X Yl Ym Yu (l = lower, m = middle, u = upper)
+ * big-endian: X Yu Ym Yl
+ *
+ * If X is 5 bits, Y is 5 bits, Z is 5 bits and W is 1 bit, the layout is:
+ *
+ * 0 1
+ * msb lsb msb lsb
+ * little-endian: YYYXXXXX WZZZZZYY
+ * big-endian: XXXXXYYY YYZZZZZW
+ */
+ struct util_format_channel_description channel[4];
+
+ /**
+ * Output channel swizzle.
+ *
+ * The order is either:
+ * - RGBA
+ * - YUV(A)
+ * - ZS
+ * depending on the colorspace.
+ */
+ unsigned char swizzle[4];
+
+ /**
+ * Colorspace transformation.
+ */
+ enum util_format_colorspace colorspace;
+
+ /**
+ * Unpack pixel blocks to R8G8B8A8_UNORM.
+ * Note: strides are in bytes.
+ *
+ * Only defined for non-depth-stencil formats.
+ */
+ void
+ (*unpack_rgba_8unorm)(uint8_t *dst, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height);
+
+ /**
+ * Pack pixel blocks from R8G8B8A8_UNORM.
+ * Note: strides are in bytes.
+ *
+ * Only defined for non-depth-stencil formats.
+ */
+ void
+ (*pack_rgba_8unorm)(uint8_t *dst, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height);
+
+ /**
+ * Fetch a single pixel (i, j) from a block.
+ *
+ * XXX: Only defined for a very few select formats.
+ */
+ void
+ (*fetch_rgba_8unorm)(uint8_t *dst,
+ const uint8_t *src,
+ unsigned i, unsigned j);
+
+ /**
+ * Unpack pixel blocks to R32G32B32A32_FLOAT.
+ * Note: strides are in bytes.
+ *
+ * Only defined for non-depth-stencil formats.
+ */
+ void
+ (*unpack_rgba_float)(float *dst, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height);
+
+ /**
+ * Pack pixel blocks from R32G32B32A32_FLOAT.
+ * Note: strides are in bytes.
+ *
+ * Only defined for non-depth-stencil formats.
+ */
+ void
+ (*pack_rgba_float)(uint8_t *dst, unsigned dst_stride,
+ const float *src, unsigned src_stride,
+ unsigned width, unsigned height);
+
+ /**
+ * Fetch a single pixel (i, j) from a block.
+ *
+ * Only defined for non-depth-stencil and non-integer formats.
+ */
+ void
+ (*fetch_rgba_float)(float *dst,
+ const uint8_t *src,
+ unsigned i, unsigned j);
+
+ /**
+ * Unpack pixels to Z32_UNORM.
+ * Note: strides are in bytes.
+ *
+ * Only defined for depth formats.
+ */
+ void
+ (*unpack_z_32unorm)(uint32_t *dst, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height);
+
+ /**
+ * Pack pixels from Z32_FLOAT.
+ * Note: strides are in bytes.
+ *
+ * Only defined for depth formats.
+ */
+ void
+ (*pack_z_32unorm)(uint8_t *dst, unsigned dst_stride,
+ const uint32_t *src, unsigned src_stride,
+ unsigned width, unsigned height);
+
+ /**
+ * Unpack pixels to Z32_FLOAT.
+ * Note: strides are in bytes.
+ *
+ * Only defined for depth formats.
+ */
+ void
+ (*unpack_z_float)(float *dst, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height);
+
+ /**
+ * Pack pixels from Z32_FLOAT.
+ * Note: strides are in bytes.
+ *
+ * Only defined for depth formats.
+ */
+ void
+ (*pack_z_float)(uint8_t *dst, unsigned dst_stride,
+ const float *src, unsigned src_stride,
+ unsigned width, unsigned height);
+
+ /**
+ * Unpack pixels to S8_UINT.
+ * Note: strides are in bytes.
+ *
+ * Only defined for stencil formats.
+ */
+ void
+ (*unpack_s_8uint)(uint8_t *dst, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height);
+
+ /**
+ * Pack pixels from S8_UINT.
+ * Note: strides are in bytes.
+ *
+ * Only defined for stencil formats.
+ */
+ void
+ (*pack_s_8uint)(uint8_t *dst, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height);
+
+ /**
+ * Unpack pixel blocks to R32G32B32A32_UINT.
+ * Note: strides are in bytes.
+ *
+ * Only defined for INT formats.
+ */
+ void
+ (*unpack_rgba_uint)(uint32_t *dst, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height);
+
+ void
+ (*pack_rgba_uint)(uint8_t *dst, unsigned dst_stride,
+ const uint32_t *src, unsigned src_stride,
+ unsigned width, unsigned height);
+
+ /**
+ * Unpack pixel blocks to R32G32B32A32_SINT.
+ * Note: strides are in bytes.
+ *
+ * Only defined for INT formats.
+ */
+ void
+ (*unpack_rgba_sint)(int32_t *dst, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height);
+
+ void
+ (*pack_rgba_sint)(uint8_t *dst, unsigned dst_stride,
+ const int32_t *src, unsigned src_stride,
+ unsigned width, unsigned height);
+
+ /**
+ * Fetch a single pixel (i, j) from a block.
+ *
+ * Only defined for unsigned (pure) integer formats.
+ */
+ void
+ (*fetch_rgba_uint)(uint32_t *dst,
+ const uint8_t *src,
+ unsigned i, unsigned j);
+
+ /**
+ * Fetch a single pixel (i, j) from a block.
+ *
+ * Only defined for signed (pure) integer formats.
+ */
+ void
+ (*fetch_rgba_sint)(int32_t *dst,
+ const uint8_t *src,
+ unsigned i, unsigned j);
+};
+
+
+extern const struct util_format_description
+util_format_description_table[];
+
+
+const struct util_format_description *
+util_format_description(enum pipe_format format);
+
+
+/*
+ * Format query functions.
+ */
+
+static INLINE const char *
+util_format_name(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+
+ assert(desc);
+ if (!desc) {
+ return "PIPE_FORMAT_???";
+ }
+
+ return desc->name;
+}
+
+static INLINE const char *
+util_format_short_name(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+
+ assert(desc);
+ if (!desc) {
+ return "???";
+ }
+
+ return desc->short_name;
+}
+
+/**
+ * Whether this format is plain, see UTIL_FORMAT_LAYOUT_PLAIN for more info.
+ */
+static INLINE boolean
+util_format_is_plain(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+
+ if (!format) {
+ return FALSE;
+ }
+
+ return desc->layout == UTIL_FORMAT_LAYOUT_PLAIN ? TRUE : FALSE;
+}
+
+static INLINE boolean
+util_format_is_compressed(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+
+ assert(desc);
+ if (!desc) {
+ return FALSE;
+ }
+
+ switch (desc->layout) {
+ case UTIL_FORMAT_LAYOUT_S3TC:
+ case UTIL_FORMAT_LAYOUT_RGTC:
+ case UTIL_FORMAT_LAYOUT_ETC:
+ /* XXX add other formats in the future */
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
+
+static INLINE boolean
+util_format_is_s3tc(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+
+ assert(desc);
+ if (!desc) {
+ return FALSE;
+ }
+
+ return desc->layout == UTIL_FORMAT_LAYOUT_S3TC ? TRUE : FALSE;
+}
+
+static INLINE boolean
+util_format_is_srgb(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+ return desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB;
+}
+
+static INLINE boolean
+util_format_has_depth(const struct util_format_description *desc)
+{
+ return desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS &&
+ desc->swizzle[0] != UTIL_FORMAT_SWIZZLE_NONE;
+}
+
+static INLINE boolean
+util_format_has_stencil(const struct util_format_description *desc)
+{
+ return desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS &&
+ desc->swizzle[1] != UTIL_FORMAT_SWIZZLE_NONE;
+}
+
+static INLINE boolean
+util_format_is_depth_or_stencil(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+
+ assert(desc);
+ if (!desc) {
+ return FALSE;
+ }
+
+ return util_format_has_depth(desc) ||
+ util_format_has_stencil(desc);
+}
+
+static INLINE boolean
+util_format_is_depth_and_stencil(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+
+ assert(desc);
+ if (!desc) {
+ return FALSE;
+ }
+
+ return util_format_has_depth(desc) &&
+ util_format_has_stencil(desc);
+}
+
+/**
+ * Return whether this is an RGBA, Z, S, or combined ZS format.
+ * Useful for initializing pipe_blit_info::mask.
+ */
+static INLINE unsigned
+util_format_get_mask(enum pipe_format format)
+{
+ const struct util_format_description *desc =
+ util_format_description(format);
+
+ if (!desc)
+ return 0;
+
+ if (util_format_has_depth(desc)) {
+ if (util_format_has_stencil(desc)) {
+ return PIPE_MASK_ZS;
+ } else {
+ return PIPE_MASK_Z;
+ }
+ } else {
+ if (util_format_has_stencil(desc)) {
+ return PIPE_MASK_S;
+ } else {
+ return PIPE_MASK_RGBA;
+ }
+ }
+}
+
+/**
+ * Give the RGBA colormask of the channels that can be represented in this
+ * format.
+ *
+ * That is, the channels whose values are preserved.
+ */
+static INLINE unsigned
+util_format_colormask(const struct util_format_description *desc)
+{
+ unsigned colormask;
+ unsigned chan;
+
+ switch (desc->colorspace) {
+ case UTIL_FORMAT_COLORSPACE_RGB:
+ case UTIL_FORMAT_COLORSPACE_SRGB:
+ case UTIL_FORMAT_COLORSPACE_YUV:
+ colormask = 0;
+ for (chan = 0; chan < 4; ++chan) {
+ if (desc->swizzle[chan] < 4) {
+ colormask |= (1 << chan);
+ }
+ }
+ return colormask;
+ case UTIL_FORMAT_COLORSPACE_ZS:
+ return 0;
+ default:
+ assert(0);
+ return 0;
+ }
+}
+
+
+/**
+ * Checks if color mask covers every channel for the specified format
+ *
+ * @param desc a format description to check colormask with
+ * @param colormask a bit mask for channels, matches format of PIPE_MASK_RGBA
+ */
+static INLINE boolean
+util_format_colormask_full(const struct util_format_description *desc, unsigned colormask)
+{
+ return (~colormask & util_format_colormask(desc)) == 0;
+}
+
+
+boolean
+util_format_is_float(enum pipe_format format);
+
+
+boolean
+util_format_has_alpha(enum pipe_format format);
+
+
+boolean
+util_format_is_luminance(enum pipe_format format);
+
+
+boolean
+util_format_is_luminance_alpha(enum pipe_format format);
+
+
+boolean
+util_format_is_intensity(enum pipe_format format);
+
+boolean
+util_format_is_pure_integer(enum pipe_format format);
+
+boolean
+util_format_is_pure_sint(enum pipe_format format);
+
+boolean
+util_format_is_pure_uint(enum pipe_format format);
+
+boolean
+util_format_is_snorm(enum pipe_format format);
+
+/**
+ * Check if the src format can be blitted to the destination format with
+ * a simple memcpy. For example, blitting from RGBA to RGBx is OK, but not
+ * the reverse.
+ */
+boolean
+util_is_format_compatible(const struct util_format_description *src_desc,
+ const struct util_format_description *dst_desc);
+
+/**
+ * Whether the format is supported by Gallium for the given bindings.
+ * This covers S3TC textures and floating-point render targets.
+ */
+boolean
+util_format_is_supported(enum pipe_format format, unsigned bind);
+
+/**
+ * Whether this format is a rgab8 variant.
+ *
+ * That is, any format that matches the
+ *
+ * PIPE_FORMAT_?8?8?8?8_UNORM
+ */
+static INLINE boolean
+util_format_is_rgba8_variant(const struct util_format_description *desc)
+{
+ unsigned chan;
+
+ if(desc->block.width != 1 ||
+ desc->block.height != 1 ||
+ desc->block.bits != 32)
+ return FALSE;
+
+ for(chan = 0; chan < 4; ++chan) {
+ if(desc->channel[chan].type != UTIL_FORMAT_TYPE_UNSIGNED &&
+ desc->channel[chan].type != UTIL_FORMAT_TYPE_VOID)
+ return FALSE;
+ if(desc->channel[chan].size != 8)
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+/**
+ * Return total bits needed for the pixel format per block.
+ */
+static INLINE uint
+util_format_get_blocksizebits(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+
+ assert(desc);
+ if (!desc) {
+ return 0;
+ }
+
+ return desc->block.bits;
+}
+
+/**
+ * Return bytes per block (not pixel) for the given format.
+ */
+static INLINE uint
+util_format_get_blocksize(enum pipe_format format)
+{
+ uint bits = util_format_get_blocksizebits(format);
+
+ assert(bits % 8 == 0);
+
+ return bits / 8;
+}
+
+static INLINE uint
+util_format_get_blockwidth(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+
+ assert(desc);
+ if (!desc) {
+ return 1;
+ }
+
+ return desc->block.width;
+}
+
+static INLINE uint
+util_format_get_blockheight(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+
+ assert(desc);
+ if (!desc) {
+ return 1;
+ }
+
+ return desc->block.height;
+}
+
+static INLINE unsigned
+util_format_get_nblocksx(enum pipe_format format,
+ unsigned x)
+{
+ unsigned blockwidth = util_format_get_blockwidth(format);
+ return (x + blockwidth - 1) / blockwidth;
+}
+
+static INLINE unsigned
+util_format_get_nblocksy(enum pipe_format format,
+ unsigned y)
+{
+ unsigned blockheight = util_format_get_blockheight(format);
+ return (y + blockheight - 1) / blockheight;
+}
+
+static INLINE unsigned
+util_format_get_nblocks(enum pipe_format format,
+ unsigned width,
+ unsigned height)
+{
+ return util_format_get_nblocksx(format, width) * util_format_get_nblocksy(format, height);
+}
+
+static INLINE size_t
+util_format_get_stride(enum pipe_format format,
+ unsigned width)
+{
+ return util_format_get_nblocksx(format, width) * util_format_get_blocksize(format);
+}
+
+static INLINE size_t
+util_format_get_2d_size(enum pipe_format format,
+ size_t stride,
+ unsigned height)
+{
+ return util_format_get_nblocksy(format, height) * stride;
+}
+
+static INLINE uint
+util_format_get_component_bits(enum pipe_format format,
+ enum util_format_colorspace colorspace,
+ uint component)
+{
+ const struct util_format_description *desc = util_format_description(format);
+ enum util_format_colorspace desc_colorspace;
+
+ assert(format);
+ if (!format) {
+ return 0;
+ }
+
+ assert(component < 4);
+
+ /* Treat RGB and SRGB as equivalent. */
+ if (colorspace == UTIL_FORMAT_COLORSPACE_SRGB) {
+ colorspace = UTIL_FORMAT_COLORSPACE_RGB;
+ }
+ if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) {
+ desc_colorspace = UTIL_FORMAT_COLORSPACE_RGB;
+ } else {
+ desc_colorspace = desc->colorspace;
+ }
+
+ if (desc_colorspace != colorspace) {
+ return 0;
+ }
+
+ switch (desc->swizzle[component]) {
+ case UTIL_FORMAT_SWIZZLE_X:
+ return desc->channel[0].size;
+ case UTIL_FORMAT_SWIZZLE_Y:
+ return desc->channel[1].size;
+ case UTIL_FORMAT_SWIZZLE_Z:
+ return desc->channel[2].size;
+ case UTIL_FORMAT_SWIZZLE_W:
+ return desc->channel[3].size;
+ default:
+ return 0;
+ }
+}
+
+/**
+ * Given a linear RGB colorspace format, return the corresponding SRGB
+ * format, or PIPE_FORMAT_NONE if none.
+ */
+static INLINE enum pipe_format
+util_format_srgb(enum pipe_format format)
+{
+ switch (format) {
+ case PIPE_FORMAT_L8_UNORM:
+ return PIPE_FORMAT_L8_SRGB;
+ case PIPE_FORMAT_L8A8_UNORM:
+ return PIPE_FORMAT_L8A8_SRGB;
+ case PIPE_FORMAT_R8G8B8_UNORM:
+ return PIPE_FORMAT_R8G8B8_SRGB;
+ case PIPE_FORMAT_A8B8G8R8_UNORM:
+ return PIPE_FORMAT_A8B8G8R8_SRGB;
+ case PIPE_FORMAT_X8B8G8R8_UNORM:
+ return PIPE_FORMAT_X8B8G8R8_SRGB;
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ return PIPE_FORMAT_B8G8R8A8_SRGB;
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
+ return PIPE_FORMAT_B8G8R8X8_SRGB;
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
+ return PIPE_FORMAT_A8R8G8B8_SRGB;
+ case PIPE_FORMAT_X8R8G8B8_UNORM:
+ return PIPE_FORMAT_X8R8G8B8_SRGB;
+ case PIPE_FORMAT_R8G8B8A8_UNORM:
+ return PIPE_FORMAT_R8G8B8A8_SRGB;
+ case PIPE_FORMAT_R8G8B8X8_UNORM:
+ return PIPE_FORMAT_R8G8B8X8_SRGB;
+ case PIPE_FORMAT_DXT1_RGB:
+ return PIPE_FORMAT_DXT1_SRGB;
+ case PIPE_FORMAT_DXT1_RGBA:
+ return PIPE_FORMAT_DXT1_SRGBA;
+ case PIPE_FORMAT_DXT3_RGBA:
+ return PIPE_FORMAT_DXT3_SRGBA;
+ case PIPE_FORMAT_DXT5_RGBA:
+ return PIPE_FORMAT_DXT5_SRGBA;
+ default:
+ return PIPE_FORMAT_NONE;
+ }
+}
+
+/**
+ * Given an sRGB format, return the corresponding linear colorspace format.
+ * For non sRGB formats, return the format unchanged.
+ */
+static INLINE enum pipe_format
+util_format_linear(enum pipe_format format)
+{
+ switch (format) {
+ case PIPE_FORMAT_L8_SRGB:
+ return PIPE_FORMAT_L8_UNORM;
+ case PIPE_FORMAT_L8A8_SRGB:
+ return PIPE_FORMAT_L8A8_UNORM;
+ case PIPE_FORMAT_R8G8B8_SRGB:
+ return PIPE_FORMAT_R8G8B8_UNORM;
+ case PIPE_FORMAT_A8B8G8R8_SRGB:
+ return PIPE_FORMAT_A8B8G8R8_UNORM;
+ case PIPE_FORMAT_X8B8G8R8_SRGB:
+ return PIPE_FORMAT_X8B8G8R8_UNORM;
+ case PIPE_FORMAT_B8G8R8A8_SRGB:
+ return PIPE_FORMAT_B8G8R8A8_UNORM;
+ case PIPE_FORMAT_B8G8R8X8_SRGB:
+ return PIPE_FORMAT_B8G8R8X8_UNORM;
+ case PIPE_FORMAT_A8R8G8B8_SRGB:
+ return PIPE_FORMAT_A8R8G8B8_UNORM;
+ case PIPE_FORMAT_X8R8G8B8_SRGB:
+ return PIPE_FORMAT_X8R8G8B8_UNORM;
+ case PIPE_FORMAT_R8G8B8A8_SRGB:
+ return PIPE_FORMAT_R8G8B8A8_UNORM;
+ case PIPE_FORMAT_R8G8B8X8_SRGB:
+ return PIPE_FORMAT_R8G8B8X8_UNORM;
+ case PIPE_FORMAT_DXT1_SRGB:
+ return PIPE_FORMAT_DXT1_RGB;
+ case PIPE_FORMAT_DXT1_SRGBA:
+ return PIPE_FORMAT_DXT1_RGBA;
+ case PIPE_FORMAT_DXT3_SRGBA:
+ return PIPE_FORMAT_DXT3_RGBA;
+ case PIPE_FORMAT_DXT5_SRGBA:
+ return PIPE_FORMAT_DXT5_RGBA;
+ default:
+ return format;
+ }
+}
+
+/**
+ * Given a depth-stencil format, return the corresponding stencil-only format.
+ * For stencil-only formats, return the format unchanged.
+ */
+static INLINE enum pipe_format
+util_format_stencil_only(enum pipe_format format)
+{
+ switch (format) {
+ /* mask out the depth component */
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
+ return PIPE_FORMAT_X24S8_UINT;
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
+ return PIPE_FORMAT_S8X24_UINT;
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
+ return PIPE_FORMAT_X32_S8X24_UINT;
+
+ /* stencil only formats */
+ case PIPE_FORMAT_X24S8_UINT:
+ case PIPE_FORMAT_S8X24_UINT:
+ case PIPE_FORMAT_X32_S8X24_UINT:
+ case PIPE_FORMAT_S8_UINT:
+ return format;
+
+ default:
+ assert(0);
+ return PIPE_FORMAT_NONE;
+ }
+}
+
+/**
+ * Converts PIPE_FORMAT_*I* to PIPE_FORMAT_*R*.
+ * This is identity for non-intensity formats.
+ */
+static INLINE enum pipe_format
+util_format_intensity_to_red(enum pipe_format format)
+{
+ switch (format) {
+ case PIPE_FORMAT_I8_UNORM:
+ return PIPE_FORMAT_R8_UNORM;
+ case PIPE_FORMAT_I8_SNORM:
+ return PIPE_FORMAT_R8_SNORM;
+ case PIPE_FORMAT_I16_UNORM:
+ return PIPE_FORMAT_R16_UNORM;
+ case PIPE_FORMAT_I16_SNORM:
+ return PIPE_FORMAT_R16_SNORM;
+ case PIPE_FORMAT_I16_FLOAT:
+ return PIPE_FORMAT_R16_FLOAT;
+ case PIPE_FORMAT_I32_FLOAT:
+ return PIPE_FORMAT_R32_FLOAT;
+ case PIPE_FORMAT_I8_UINT:
+ return PIPE_FORMAT_R8_UINT;
+ case PIPE_FORMAT_I8_SINT:
+ return PIPE_FORMAT_R8_SINT;
+ case PIPE_FORMAT_I16_UINT:
+ return PIPE_FORMAT_R16_UINT;
+ case PIPE_FORMAT_I16_SINT:
+ return PIPE_FORMAT_R16_SINT;
+ case PIPE_FORMAT_I32_UINT:
+ return PIPE_FORMAT_R32_UINT;
+ case PIPE_FORMAT_I32_SINT:
+ return PIPE_FORMAT_R32_SINT;
+ default:
+ assert(!util_format_is_intensity(format));
+ return format;
+ }
+}
+
+/**
+ * Converts PIPE_FORMAT_*L* to PIPE_FORMAT_*R*.
+ * This is identity for non-luminance formats.
+ */
+static INLINE enum pipe_format
+util_format_luminance_to_red(enum pipe_format format)
+{
+ switch (format) {
+ case PIPE_FORMAT_L8_UNORM:
+ return PIPE_FORMAT_R8_UNORM;
+ case PIPE_FORMAT_L8_SNORM:
+ return PIPE_FORMAT_R8_SNORM;
+ case PIPE_FORMAT_L16_UNORM:
+ return PIPE_FORMAT_R16_UNORM;
+ case PIPE_FORMAT_L16_SNORM:
+ return PIPE_FORMAT_R16_SNORM;
+ case PIPE_FORMAT_L16_FLOAT:
+ return PIPE_FORMAT_R16_FLOAT;
+ case PIPE_FORMAT_L32_FLOAT:
+ return PIPE_FORMAT_R32_FLOAT;
+ case PIPE_FORMAT_L8_UINT:
+ return PIPE_FORMAT_R8_UINT;
+ case PIPE_FORMAT_L8_SINT:
+ return PIPE_FORMAT_R8_SINT;
+ case PIPE_FORMAT_L16_UINT:
+ return PIPE_FORMAT_R16_UINT;
+ case PIPE_FORMAT_L16_SINT:
+ return PIPE_FORMAT_R16_SINT;
+ case PIPE_FORMAT_L32_UINT:
+ return PIPE_FORMAT_R32_UINT;
+ case PIPE_FORMAT_L32_SINT:
+ return PIPE_FORMAT_R32_SINT;
+
+ case PIPE_FORMAT_LATC1_UNORM:
+ return PIPE_FORMAT_RGTC1_UNORM;
+ case PIPE_FORMAT_LATC1_SNORM:
+ return PIPE_FORMAT_RGTC1_SNORM;
+
+ case PIPE_FORMAT_L4A4_UNORM:
+ /* XXX A4R4 is defined as x00y in u_format.csv */
+ return PIPE_FORMAT_A4R4_UNORM;
+
+ case PIPE_FORMAT_L8A8_UNORM:
+ return PIPE_FORMAT_R8A8_UNORM;
+ case PIPE_FORMAT_L8A8_SNORM:
+ return PIPE_FORMAT_R8A8_SNORM;
+ case PIPE_FORMAT_L16A16_UNORM:
+ return PIPE_FORMAT_R16A16_UNORM;
+ case PIPE_FORMAT_L16A16_SNORM:
+ return PIPE_FORMAT_R16A16_SNORM;
+ case PIPE_FORMAT_L16A16_FLOAT:
+ return PIPE_FORMAT_R16A16_FLOAT;
+ case PIPE_FORMAT_L32A32_FLOAT:
+ return PIPE_FORMAT_R32A32_FLOAT;
+ case PIPE_FORMAT_L8A8_UINT:
+ return PIPE_FORMAT_R8A8_UINT;
+ case PIPE_FORMAT_L8A8_SINT:
+ return PIPE_FORMAT_R8A8_SINT;
+ case PIPE_FORMAT_L16A16_UINT:
+ return PIPE_FORMAT_R16A16_UINT;
+ case PIPE_FORMAT_L16A16_SINT:
+ return PIPE_FORMAT_R16A16_SINT;
+ case PIPE_FORMAT_L32A32_UINT:
+ return PIPE_FORMAT_R32A32_UINT;
+ case PIPE_FORMAT_L32A32_SINT:
+ return PIPE_FORMAT_R32A32_SINT;
+
+ /* We don't have compressed red-alpha variants for these. */
+ case PIPE_FORMAT_LATC2_UNORM:
+ case PIPE_FORMAT_LATC2_SNORM:
+ return PIPE_FORMAT_NONE;
+
+ default:
+ assert(!util_format_is_luminance(format) &&
+ !util_format_is_luminance_alpha(format));
+ return format;
+ }
+}
+
+/**
+ * Return the number of components stored.
+ * Formats with block size != 1x1 will always have 1 component (the block).
+ */
+static INLINE unsigned
+util_format_get_nr_components(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+ return desc->nr_channels;
+}
+
+/**
+ * Return the index of the first non-void channel
+ * -1 if no non-void channels
+ */
+static INLINE int
+util_format_get_first_non_void_channel(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+ int i;
+
+ for (i = 0; i < 4; i++)
+ if (desc->channel[i].type != UTIL_FORMAT_TYPE_VOID)
+ break;
+
+ if (i == 4)
+ return -1;
+
+ return i;
+}
+
+/*
+ * Format access functions.
+ */
+
+void
+util_format_read_4f(enum pipe_format format,
+ float *dst, unsigned dst_stride,
+ const void *src, unsigned src_stride,
+ unsigned x, unsigned y, unsigned w, unsigned h);
+
+void
+util_format_write_4f(enum pipe_format format,
+ const float *src, unsigned src_stride,
+ void *dst, unsigned dst_stride,
+ unsigned x, unsigned y, unsigned w, unsigned h);
+
+void
+util_format_read_4ub(enum pipe_format format,
+ uint8_t *dst, unsigned dst_stride,
+ const void *src, unsigned src_stride,
+ unsigned x, unsigned y, unsigned w, unsigned h);
+
+void
+util_format_write_4ub(enum pipe_format format,
+ const uint8_t *src, unsigned src_stride,
+ void *dst, unsigned dst_stride,
+ unsigned x, unsigned y, unsigned w, unsigned h);
+
+void
+util_format_read_4ui(enum pipe_format format,
+ unsigned *dst, unsigned dst_stride,
+ const void *src, unsigned src_stride,
+ unsigned x, unsigned y, unsigned w, unsigned h);
+
+void
+util_format_write_4ui(enum pipe_format format,
+ const unsigned int *src, unsigned src_stride,
+ void *dst, unsigned dst_stride,
+ unsigned x, unsigned y, unsigned w, unsigned h);
+
+void
+util_format_read_4i(enum pipe_format format,
+ int *dst, unsigned dst_stride,
+ const void *src, unsigned src_stride,
+ unsigned x, unsigned y, unsigned w, unsigned h);
+
+void
+util_format_write_4i(enum pipe_format format,
+ const int *src, unsigned src_stride,
+ void *dst, unsigned dst_stride,
+ unsigned x, unsigned y, unsigned w, unsigned h);
+
+/*
+ * Generic format conversion;
+ */
+
+boolean
+util_format_fits_8unorm(const struct util_format_description *format_desc);
+
+void
+util_format_translate(enum pipe_format dst_format,
+ void *dst, unsigned dst_stride,
+ unsigned dst_x, unsigned dst_y,
+ enum pipe_format src_format,
+ const void *src, unsigned src_stride,
+ unsigned src_x, unsigned src_y,
+ unsigned width, unsigned height);
+
+/*
+ * Swizzle operations.
+ */
+
+/* Compose two sets of swizzles.
+ * If V is a 4D vector and the function parameters represent functions that
+ * swizzle vector components, this holds:
+ * swz2(swz1(V)) = dst(V)
+ */
+void util_format_compose_swizzles(const unsigned char swz1[4],
+ const unsigned char swz2[4],
+ unsigned char dst[4]);
+
+/* Apply the swizzle provided in \param swz (which is one of PIPE_SWIZZLE_x)
+ * to \param src and store the result in \param dst.
+ * \param is_integer determines the value written for PIPE_SWIZZLE_ONE.
+ */
+void util_format_apply_color_swizzle(union pipe_color_union *dst,
+ const union pipe_color_union *src,
+ const unsigned char swz[4],
+ const boolean is_integer);
+
+void util_format_swizzle_4f(float *dst, const float *src,
+ const unsigned char swz[4]);
+
+void util_format_unswizzle_4f(float *dst, const float *src,
+ const unsigned char swz[4]);
+
+#ifdef __cplusplus
+} // extern "C" {
+#endif
+
+#endif /* ! U_FORMAT_H */
diff --git a/src/minigallium/auxiliary/util/u_format_etc.c b/src/minigallium/auxiliary/util/u_format_etc.c
new file mode 100644
index 0000000..0430281
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_etc.c
@@ -0,0 +1,81 @@
+#include "pipe/p_compiler.h"
+#include "util/u_debug.h"
+#include "util/u_math.h"
+#include "u_format_etc.h"
+
+/* define etc1_parse_block and etc. */
+#define UINT8_TYPE uint8_t
+#define TAG(x) x
+#include "texcompress_etc_tmp.h"
+#undef TAG
+#undef UINT8_TYPE
+
+void
+util_format_etc1_rgb8_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ etc1_unpack_rgba8888(dst_row, dst_stride, src_row, src_stride, width, height);
+}
+
+void
+util_format_etc1_rgb8_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ assert(0);
+}
+
+void
+util_format_etc1_rgb8_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ const unsigned bw = 4, bh = 4, bs = 8, comps = 4;
+ struct etc1_block block;
+ unsigned x, y, i, j;
+
+ for (y = 0; y < height; y += bh) {
+ const uint8_t *src = src_row;
+
+ for (x = 0; x < width; x+= bw) {
+ etc1_parse_block(&block, src);
+
+ for (j = 0; j < bh; j++) {
+ float *dst = dst_row + (y + j) * dst_stride / sizeof(*dst_row) + x * comps;
+ uint8_t tmp[3];
+
+ for (i = 0; i < bw; i++) {
+ etc1_fetch_texel(&block, i, j, tmp);
+ dst[0] = ubyte_to_float(tmp[0]);
+ dst[1] = ubyte_to_float(tmp[1]);
+ dst[2] = ubyte_to_float(tmp[2]);
+ dst[3] = 1.0f;
+ dst += comps;
+ }
+ }
+
+ src += bs;
+ }
+
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_etc1_rgb8_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ assert(0);
+}
+
+void
+util_format_etc1_rgb8_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ const unsigned bw = 4, bh = 4;
+ struct etc1_block block;
+ uint8_t tmp[3];
+
+ assert(i < bw && j < bh);
+
+ etc1_parse_block(&block, src);
+ etc1_fetch_texel(&block, i, j, tmp);
+
+ dst[0] = ubyte_to_float(tmp[0]);
+ dst[1] = ubyte_to_float(tmp[1]);
+ dst[2] = ubyte_to_float(tmp[2]);
+ dst[3] = 1.0f;
+}
diff --git a/src/minigallium/auxiliary/util/u_format_etc.h b/src/minigallium/auxiliary/util/u_format_etc.h
new file mode 100644
index 0000000..30c3dcb
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_etc.h
@@ -0,0 +1,46 @@
+/**************************************************************************
+ *
+ * Copyright 2011 LunarG, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+#ifndef U_FORMAT_ETC1_H_
+#define U_FORMAT_ETC1_H_
+
+void
+util_format_etc1_rgb8_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_etc1_rgb8_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_etc1_rgb8_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_etc1_rgb8_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_etc1_rgb8_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+#endif /* U_FORMAT_ETC1_H_ */
diff --git a/src/minigallium/auxiliary/util/u_format_latc.c b/src/minigallium/auxiliary/util/u_format_latc.c
new file mode 100644
index 0000000..bbd993d
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_latc.c
@@ -0,0 +1,332 @@
+/**************************************************************************
+ *
+ * Copyright (C) 2011 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include <stdio.h>
+#include "u_math.h"
+#include "u_format.h"
+#include "u_format_rgtc.h"
+#include "u_format_latc.h"
+
+static void u_format_unsigned_encode_rgtc_ubyte(uint8_t *blkaddr, uint8_t srccolors[4][4],
+ int numxpixels, int numypixels);
+
+static void u_format_unsigned_fetch_texel_rgtc(unsigned srcRowStride, const uint8_t *pixdata,
+ unsigned i, unsigned j, uint8_t *value, unsigned comps);
+
+static void u_format_signed_encode_rgtc_ubyte(int8_t *blkaddr, int8_t srccolors[4][4],
+ int numxpixels, int numypixels);
+
+static void u_format_signed_fetch_texel_rgtc(unsigned srcRowStride, const int8_t *pixdata,
+ unsigned i, unsigned j, int8_t *value, unsigned comps);
+
+void
+util_format_latc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ /* Fix warnings here: */
+ (void) u_format_unsigned_encode_rgtc_ubyte;
+ (void) u_format_signed_encode_rgtc_ubyte;
+
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1);
+ dst[1] = dst[0];
+ dst[2] = dst[0];
+ dst[3] = 255;
+}
+
+void
+util_format_latc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rgtc1_unorm_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height);
+}
+
+void
+util_format_latc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row,
+ unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rgtc1_unorm_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height);
+}
+
+void
+util_format_latc1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 8;
+
+ for(y = 0; y < height; y += 4) {
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ uint8_t tmp_r;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1);
+ dst[0] =
+ dst[1] =
+ dst[2] = ubyte_to_float(tmp_r);
+ dst[3] = 1.0;
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_latc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rgtc1_unorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height);
+}
+
+void
+util_format_latc1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp_r;
+
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1);
+ dst[0] =
+ dst[1] =
+ dst[2] = ubyte_to_float(tmp_r);
+ dst[3] = 1.0;
+}
+
+void
+util_format_latc1_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_latc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_latc1_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_latc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rgtc1_snorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height);
+}
+
+void
+util_format_latc1_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 8;
+
+ for(y = 0; y < height; y += 4) {
+ const int8_t *src = (int8_t *)src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ int8_t tmp_r;
+ u_format_signed_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1);
+ dst[0] =
+ dst[1] =
+ dst[2] = byte_to_float_tex(tmp_r);
+ dst[3] = 1.0;
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_latc1_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ int8_t tmp_r;
+
+ u_format_signed_fetch_texel_rgtc(0, (int8_t *)src, i, j, &tmp_r, 1);
+ dst[0] =
+ dst[1] =
+ dst[2] = byte_to_float_tex(tmp_r);
+ dst[3] = 1.0;
+}
+
+
+void
+util_format_latc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2);
+ dst[1] = dst[0];
+ dst[2] = dst[0];
+ u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 3, 2);
+}
+
+void
+util_format_latc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rgtc2_unorm_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height);
+}
+
+void
+util_format_latc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rgtc2_unorm_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height);
+}
+
+void
+util_format_latc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rxtc2_unorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 3);
+}
+
+void
+util_format_latc2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 16;
+
+ for(y = 0; y < height; y += 4) {
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ uint8_t tmp_r, tmp_g;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2);
+ u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2);
+ dst[0] =
+ dst[1] =
+ dst[2] = ubyte_to_float(tmp_r);
+ dst[3] = ubyte_to_float(tmp_g);
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_latc2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp_r, tmp_g;
+
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2);
+ u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2);
+ dst[0] =
+ dst[1] =
+ dst[2] = ubyte_to_float(tmp_r);
+ dst[3] = ubyte_to_float(tmp_g);
+}
+
+
+void
+util_format_latc2_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_latc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_latc2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_latc2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 16;
+
+ for(y = 0; y < height; y += 4) {
+ const int8_t *src = (int8_t *)src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ int8_t tmp_r, tmp_g;
+ u_format_signed_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2);
+ u_format_signed_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2);
+ dst[0] =
+ dst[1] =
+ dst[2] = byte_to_float_tex(tmp_r);
+ dst[3] = byte_to_float_tex(tmp_g);
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_latc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rxtc2_snorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 3);
+}
+
+void
+util_format_latc2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ int8_t tmp_r, tmp_g;
+
+ u_format_signed_fetch_texel_rgtc(0, (int8_t *)src, i, j, &tmp_r, 2);
+ u_format_signed_fetch_texel_rgtc(0, (int8_t *)src + 8, i, j, &tmp_g, 2);
+ dst[0] =
+ dst[1] =
+ dst[2] = byte_to_float_tex(tmp_r);
+ dst[3] = byte_to_float_tex(tmp_g);
+}
+
+
+#define TAG(x) u_format_unsigned_##x
+#define TYPE uint8_t
+#define T_MIN 0
+#define T_MAX 255
+
+#include "texcompress_rgtc_tmp.h"
+
+#undef TYPE
+#undef TAG
+#undef T_MIN
+#undef T_MAX
+
+
+#define TAG(x) u_format_signed_##x
+#define TYPE int8_t
+#define T_MIN (int8_t)-128
+#define T_MAX (int8_t)127
+
+#include "texcompress_rgtc_tmp.h"
+
+#undef TYPE
+#undef TAG
+#undef T_MIN
+#undef T_MAX
diff --git a/src/minigallium/auxiliary/util/u_format_latc.h b/src/minigallium/auxiliary/util/u_format_latc.h
new file mode 100644
index 0000000..1f08887
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_latc.h
@@ -0,0 +1,108 @@
+/**************************************************************************
+ *
+ * Copyright 2011 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+#ifndef U_FORMAT_LATC_H_
+#define U_FORMAT_LATC_H_
+
+void
+util_format_latc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_latc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+
+void
+util_format_latc1_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_latc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+void
+util_format_latc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_latc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+void
+util_format_latc2_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_latc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_format_other.c b/src/minigallium/auxiliary/util/u_format_other.c
new file mode 100644
index 0000000..85001c1
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_other.c
@@ -0,0 +1,472 @@
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+
+#include "u_math.h"
+#include "u_format_other.h"
+#include "u_format_rgb9e5.h"
+#include "u_format_r11g11b10f.h"
+
+
+void
+util_format_r9g9b9e5_float_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ rgb9e5_to_float3(value, dst);
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_r9g9b9e5_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = float3_to_rgb9e5(src);
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_r9g9b9e5_float_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ rgb9e5_to_float3(value, dst);
+ dst[3] = 1; /* a */
+}
+
+
+void
+util_format_r9g9b9e5_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ float p[3];
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ rgb9e5_to_float3(value, p);
+ dst[0] = float_to_ubyte(p[0]); /* r */
+ dst[1] = float_to_ubyte(p[1]); /* g */
+ dst[2] = float_to_ubyte(p[2]); /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+
+void
+util_format_r9g9b9e5_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ float p[3];
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value;
+ p[0] = ubyte_to_float(src[0]);
+ p[1] = ubyte_to_float(src[1]);
+ p[2] = ubyte_to_float(src[2]);
+ value = float3_to_rgb9e5(p);
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+
+void
+util_format_r11g11b10_float_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ r11g11b10f_to_float3(value, dst);
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_r11g11b10_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = float3_to_r11g11b10f(src);
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_r11g11b10_float_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ r11g11b10f_to_float3(value, dst);
+ dst[3] = 1; /* a */
+}
+
+
+void
+util_format_r11g11b10_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ float p[3];
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ r11g11b10f_to_float3(value, p);
+ dst[0] = float_to_ubyte(p[0]); /* r */
+ dst[1] = float_to_ubyte(p[1]); /* g */
+ dst[2] = float_to_ubyte(p[2]); /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+
+void
+util_format_r11g11b10_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ float p[3];
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value;
+ p[0] = ubyte_to_float(src[0]);
+ p[1] = ubyte_to_float(src[1]);
+ p[2] = ubyte_to_float(src[2]);
+ value = float3_to_r11g11b10f(p);
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+
+void
+util_format_r1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+
+}
+
+
+void
+util_format_r1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+
+}
+
+
+void
+util_format_r1_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j)
+{
+
+}
+
+
+void
+util_format_r1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+
+}
+
+
+void
+util_format_r1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+}
+
+
+/*
+ * PIPE_FORMAT_R8G8Bx_SNORM
+ *
+ * A.k.a. D3DFMT_CxV8U8
+ */
+
+static uint8_t
+r8g8bx_derive(int16_t r, int16_t g)
+{
+ /* Derive blue from red and green components.
+ * Apparently, we must always use integers to perform calculations,
+ * otherwise the results won't match D3D's CxV8U8 definition.
+ */
+ return (uint8_t)sqrtf(0x7f * 0x7f - r * r - g * g) * 0xff / 0x7f;
+}
+
+void
+util_format_r8g8bx_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint16_t *src = (const uint16_t *)src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *src++;
+ int16_t r, g;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap16(value);
+#endif
+
+ r = ((int16_t)(value << 8)) >> 8;
+ g = ((int16_t)(value << 0)) >> 8;
+
+ dst[0] = (float)(r * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(g * (1.0f/0x7f)); /* g */
+ dst[2] = r8g8bx_derive(r, g) * (1.0f/0xff); /* b */
+ dst[3] = 1.0f; /* a */
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+
+void
+util_format_r8g8bx_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint16_t *src = (const uint16_t *)src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *src++;
+ int16_t r, g;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap16(value);
+#endif
+
+ r = ((int16_t)(value << 8)) >> 8;
+ g = ((int16_t)(value << 0)) >> 8;
+
+ dst[0] = (uint8_t)(((uint16_t)MAX2(r, 0)) * 0xff / 0x7f); /* r */
+ dst[1] = (uint8_t)(((uint16_t)MAX2(g, 0)) * 0xff / 0x7f); /* g */
+ dst[2] = r8g8bx_derive(r, g); /* b */
+ dst[3] = 255; /* a */
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+
+void
+util_format_r8g8bx_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint16_t *dst = (uint16_t *)dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+
+ value |= (uint16_t)(((int8_t)(CLAMP(src[0], -1, 1) * 0x7f)) & 0xff) ;
+ value |= (uint16_t)((((int8_t)(CLAMP(src[1], -1, 1) * 0x7f)) & 0xff) << 8) ;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap16(value);
+#endif
+
+ *dst++ = value;
+
+ src += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+
+void
+util_format_r8g8bx_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint16_t *dst = (uint16_t *)dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+
+ value |= src[0] >> 1;
+ value |= (src[1] >> 1) << 8;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap16(value);
+#endif
+
+ *dst++ = value;
+
+ src += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+
+void
+util_format_r8g8bx_snorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r, g;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap16(value);
+#endif
+
+ r = ((int16_t)(value << 8)) >> 8;
+ g = ((int16_t)(value << 0)) >> 8;
+
+ dst[0] = r * (1.0f/0x7f); /* r */
+ dst[1] = g * (1.0f/0x7f); /* g */
+ dst[2] = r8g8bx_derive(r, g) * (1.0f/0xff); /* b */
+ dst[3] = 1.0f; /* a */
+}
diff --git a/src/minigallium/auxiliary/util/u_format_other.h b/src/minigallium/auxiliary/util/u_format_other.h
new file mode 100644
index 0000000..2f6a908
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_other.h
@@ -0,0 +1,134 @@
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+
+#ifndef U_FORMAT_OTHER_H_
+#define U_FORMAT_OTHER_H_
+
+
+#include "pipe/p_compiler.h"
+
+
+void
+util_format_r9g9b9e5_float_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r9g9b9e5_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r9g9b9e5_float_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+void
+util_format_r9g9b9e5_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r9g9b9e5_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+
+void
+util_format_r11g11b10_float_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r11g11b10_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r11g11b10_float_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+void
+util_format_r11g11b10_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r11g11b10_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+
+void
+util_format_r1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r1_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+void
+util_format_r1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r8g8bx_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r8g8bx_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r8g8bx_snorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+void
+util_format_r8g8bx_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r8g8bx_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+#endif /* U_FORMAT_OTHER_H_ */
diff --git a/src/minigallium/auxiliary/util/u_format_pack.py b/src/minigallium/auxiliary/util/u_format_pack.py
new file mode 100644
index 0000000..565d059
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_pack.py
@@ -0,0 +1,725 @@
+#!/usr/bin/env python
+
+'''
+/**************************************************************************
+ *
+ * Copyright 2009-2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Pixel format packing and unpacking functions.
+ *
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+'''
+
+
+from u_format_parse import *
+
+
+def generate_format_type(format):
+ '''Generate a structure that describes the format.'''
+
+ assert format.layout == PLAIN
+
+ print 'union util_format_%s {' % format.short_name()
+
+ if format.block_size() in (8, 16, 32, 64):
+ print ' uint%u_t value;' % (format.block_size(),)
+
+ use_bitfields = False
+ for channel in format.channels:
+ if channel.size % 8 or not is_pot(channel.size):
+ use_bitfields = True
+
+ print ' struct {'
+ for channel in format.channels:
+ if use_bitfields:
+ if channel.type == VOID:
+ if channel.size:
+ print ' unsigned %s:%u;' % (channel.name, channel.size)
+ elif channel.type == UNSIGNED:
+ print ' unsigned %s:%u;' % (channel.name, channel.size)
+ elif channel.type in (SIGNED, FIXED):
+ print ' int %s:%u;' % (channel.name, channel.size)
+ elif channel.type == FLOAT:
+ if channel.size == 64:
+ print ' double %s;' % (channel.name)
+ elif channel.size == 32:
+ print ' float %s;' % (channel.name)
+ else:
+ print ' unsigned %s:%u;' % (channel.name, channel.size)
+ else:
+ assert 0
+ else:
+ assert channel.size % 8 == 0 and is_pot(channel.size)
+ if channel.type == VOID:
+ if channel.size:
+ print ' uint%u_t %s;' % (channel.size, channel.name)
+ elif channel.type == UNSIGNED:
+ print ' uint%u_t %s;' % (channel.size, channel.name)
+ elif channel.type in (SIGNED, FIXED):
+ print ' int%u_t %s;' % (channel.size, channel.name)
+ elif channel.type == FLOAT:
+ if channel.size == 64:
+ print ' double %s;' % (channel.name)
+ elif channel.size == 32:
+ print ' float %s;' % (channel.name)
+ elif channel.size == 16:
+ print ' uint16_t %s;' % (channel.name)
+ else:
+ assert 0
+ else:
+ assert 0
+ print ' } chan;'
+ print '};'
+ print
+
+
+def bswap_format(format):
+ '''Generate a structure that describes the format.'''
+
+ if format.is_bitmask() and not format.is_array() and format.block_size() > 8:
+ print '#ifdef PIPE_ARCH_BIG_ENDIAN'
+ print ' pixel.value = util_bswap%u(pixel.value);' % format.block_size()
+ print '#endif'
+
+
+def is_format_supported(format):
+ '''Determines whether we actually have the plumbing necessary to generate the
+ to read/write to/from this format.'''
+
+ # FIXME: Ideally we would support any format combination here.
+
+ if format.layout != PLAIN:
+ return False
+
+ for i in range(4):
+ channel = format.channels[i]
+ if channel.type not in (VOID, UNSIGNED, SIGNED, FLOAT, FIXED):
+ return False
+ if channel.type == FLOAT and channel.size not in (16, 32, 64):
+ return False
+
+ return True
+
+def is_format_pure_unsigned(format):
+ for i in range(4):
+ channel = format.channels[i]
+ if channel.type not in (VOID, UNSIGNED):
+ return False
+ if channel.type == UNSIGNED and channel.pure == False:
+ return False
+
+ return True
+
+
+def is_format_pure_signed(format):
+ for i in range(4):
+ channel = format.channels[i]
+ if channel.type not in (VOID, SIGNED):
+ return False
+ if channel.type == SIGNED and channel.pure == False:
+ return False
+
+ return True
+
+def native_type(format):
+ '''Get the native appropriate for a format.'''
+
+ if format.name == 'PIPE_FORMAT_R11G11B10_FLOAT':
+ return 'uint32_t'
+ if format.name == 'PIPE_FORMAT_R9G9B9E5_FLOAT':
+ return 'uint32_t'
+
+ if format.layout == PLAIN:
+ if not format.is_array():
+ # For arithmetic pixel formats return the integer type that matches the whole pixel
+ return 'uint%u_t' % format.block_size()
+ else:
+ # For array pixel formats return the integer type that matches the color channel
+ channel = format.channels[0]
+ if channel.type in (UNSIGNED, VOID):
+ return 'uint%u_t' % channel.size
+ elif channel.type in (SIGNED, FIXED):
+ return 'int%u_t' % channel.size
+ elif channel.type == FLOAT:
+ if channel.size == 16:
+ return 'uint16_t'
+ elif channel.size == 32:
+ return 'float'
+ elif channel.size == 64:
+ return 'double'
+ else:
+ assert False
+ else:
+ assert False
+ else:
+ assert False
+
+
+def intermediate_native_type(bits, sign):
+ '''Find a native type adequate to hold intermediate results of the request bit size.'''
+
+ bytes = 4 # don't use anything smaller than 32bits
+ while bytes * 8 < bits:
+ bytes *= 2
+ bits = bytes*8
+
+ if sign:
+ return 'int%u_t' % bits
+ else:
+ return 'uint%u_t' % bits
+
+
+def get_one_shift(type):
+ '''Get the number of the bit that matches unity for this type.'''
+ if type.type == 'FLOAT':
+ assert False
+ if not type.norm:
+ return 0
+ if type.type == UNSIGNED:
+ return type.size
+ if type.type == SIGNED:
+ return type.size - 1
+ if type.type == FIXED:
+ return type.size / 2
+ assert False
+
+
+def value_to_native(type, value):
+ '''Get the value of unity for this type.'''
+ if type.type == FLOAT:
+ return value
+ if type.type == FIXED:
+ return int(value * (1 << (type.size/2)))
+ if not type.norm:
+ return int(value)
+ if type.type == UNSIGNED:
+ return int(value * ((1 << type.size) - 1))
+ if type.type == SIGNED:
+ return int(value * ((1 << (type.size - 1)) - 1))
+ assert False
+
+
+def native_to_constant(type, value):
+ '''Get the value of unity for this type.'''
+ if type.type == FLOAT:
+ if type.size <= 32:
+ return "%ff" % value
+ else:
+ return "%ff" % value
+ else:
+ return str(int(value))
+
+
+def get_one(type):
+ '''Get the value of unity for this type.'''
+ return value_to_native(type, 1)
+
+
+def clamp_expr(src_channel, dst_channel, dst_native_type, value):
+ '''Generate the expression to clamp the value in the source type to the
+ destination type range.'''
+
+ if src_channel == dst_channel:
+ return value
+
+ src_min = src_channel.min()
+ src_max = src_channel.max()
+ dst_min = dst_channel.min()
+ dst_max = dst_channel.max()
+
+ # Translate the destination range to the src native value
+ dst_min_native = value_to_native(src_channel, dst_min)
+ dst_max_native = value_to_native(src_channel, dst_max)
+
+ if src_min < dst_min and src_max > dst_max:
+ return 'CLAMP(%s, %s, %s)' % (value, dst_min_native, dst_max_native)
+
+ if src_max > dst_max:
+ return 'MIN2(%s, %s)' % (value, dst_max_native)
+
+ if src_min < dst_min:
+ return 'MAX2(%s, %s)' % (value, dst_min_native)
+
+ return value
+
+
+def conversion_expr(src_channel,
+ dst_channel, dst_native_type,
+ value,
+ clamp=True,
+ src_colorspace = RGB,
+ dst_colorspace = RGB):
+ '''Generate the expression to convert a value between two types.'''
+
+ if src_colorspace != dst_colorspace:
+ if src_colorspace == SRGB:
+ assert src_channel.type == UNSIGNED
+ assert src_channel.norm
+ assert src_channel.size == 8
+ assert dst_colorspace == RGB
+ if dst_channel.type == FLOAT:
+ return 'util_format_srgb_8unorm_to_linear_float(%s)' % value
+ else:
+ assert dst_channel.type == UNSIGNED
+ assert dst_channel.norm
+ assert dst_channel.size == 8
+ return 'util_format_srgb_to_linear_8unorm(%s)' % value
+ elif dst_colorspace == SRGB:
+ assert dst_channel.type == UNSIGNED
+ assert dst_channel.norm
+ assert dst_channel.size == 8
+ assert src_colorspace == RGB
+ if src_channel.type == FLOAT:
+ return 'util_format_linear_float_to_srgb_8unorm(%s)' % value
+ else:
+ assert src_channel.type == UNSIGNED
+ assert src_channel.norm
+ assert src_channel.size == 8
+ return 'util_format_linear_to_srgb_8unorm(%s)' % value
+ elif src_colorspace == ZS:
+ pass
+ elif dst_colorspace == ZS:
+ pass
+ else:
+ assert 0
+
+ if src_channel == dst_channel:
+ return value
+
+ src_type = src_channel.type
+ src_size = src_channel.size
+ src_norm = src_channel.norm
+ src_pure = src_channel.pure
+
+ # Promote half to float
+ if src_type == FLOAT and src_size == 16:
+ value = 'util_half_to_float(%s)' % value
+ src_size = 32
+
+ # Special case for float <-> ubytes for more accurate results
+ # Done before clamping since these functions already take care of that
+ if src_type == UNSIGNED and src_norm and src_size == 8 and dst_channel.type == FLOAT and dst_channel.size == 32:
+ return 'ubyte_to_float(%s)' % value
+ if src_type == FLOAT and src_size == 32 and dst_channel.type == UNSIGNED and dst_channel.norm and dst_channel.size == 8:
+ return 'float_to_ubyte(%s)' % value
+
+ if clamp:
+ if dst_channel.type != FLOAT or src_type != FLOAT:
+ value = clamp_expr(src_channel, dst_channel, dst_native_type, value)
+
+ if src_type in (SIGNED, UNSIGNED) and dst_channel.type in (SIGNED, UNSIGNED):
+ if not src_norm and not dst_channel.norm:
+ # neither is normalized -- just cast
+ return '(%s)%s' % (dst_native_type, value)
+
+ src_one = get_one(src_channel)
+ dst_one = get_one(dst_channel)
+
+ if src_one > dst_one and src_norm and dst_channel.norm:
+ # We can just bitshift
+ src_shift = get_one_shift(src_channel)
+ dst_shift = get_one_shift(dst_channel)
+ value = '(%s >> %s)' % (value, src_shift - dst_shift)
+ else:
+ # We need to rescale using an intermediate type big enough to hold the multiplication of both
+ tmp_native_type = intermediate_native_type(src_size + dst_channel.size, src_channel.sign and dst_channel.sign)
+ value = '((%s)%s)' % (tmp_native_type, value)
+ value = '(%s * 0x%x / 0x%x)' % (value, dst_one, src_one)
+ value = '(%s)%s' % (dst_native_type, value)
+ return value
+
+ # Promote to either float or double
+ if src_type != FLOAT:
+ if src_norm or src_type == FIXED:
+ one = get_one(src_channel)
+ if src_size <= 23:
+ value = '(%s * (1.0f/0x%x))' % (value, one)
+ if dst_channel.size <= 32:
+ value = '(float)%s' % value
+ src_size = 32
+ else:
+ # bigger than single precision mantissa, use double
+ value = '(%s * (1.0/0x%x))' % (value, one)
+ src_size = 64
+ src_norm = False
+ else:
+ if src_size <= 23 or dst_channel.size <= 32:
+ value = '(float)%s' % value
+ src_size = 32
+ else:
+ # bigger than single precision mantissa, use double
+ value = '(double)%s' % value
+ src_size = 64
+ src_type = FLOAT
+
+ # Convert double or float to non-float
+ if dst_channel.type != FLOAT:
+ if dst_channel.norm or dst_channel.type == FIXED:
+ dst_one = get_one(dst_channel)
+ if dst_channel.size <= 23:
+ value = 'util_iround(%s * 0x%x)' % (value, dst_one)
+ else:
+ # bigger than single precision mantissa, use double
+ value = '(%s * (double)0x%x)' % (value, dst_one)
+ value = '(%s)%s' % (dst_native_type, value)
+ else:
+ # Cast double to float when converting to either half or float
+ if dst_channel.size <= 32 and src_size > 32:
+ value = '(float)%s' % value
+ src_size = 32
+
+ if dst_channel.size == 16:
+ value = 'util_float_to_half(%s)' % value
+ elif dst_channel.size == 64 and src_size < 64:
+ value = '(double)%s' % value
+
+ return value
+
+
+def generate_unpack_kernel(format, dst_channel, dst_native_type):
+
+ if not is_format_supported(format):
+ return
+
+ assert format.layout == PLAIN
+
+ src_native_type = native_type(format)
+
+ if format.is_bitmask():
+ depth = format.block_size()
+ print ' uint%u_t value = *(const uint%u_t *)src;' % (depth, depth)
+
+ # Declare the intermediate variables
+ for i in range(format.nr_channels()):
+ src_channel = format.channels[i]
+ if src_channel.type == UNSIGNED:
+ print ' uint%u_t %s;' % (depth, src_channel.name)
+ elif src_channel.type == SIGNED:
+ print ' int%u_t %s;' % (depth, src_channel.name)
+
+ if depth > 8:
+ print '#ifdef PIPE_ARCH_BIG_ENDIAN'
+ print ' value = util_bswap%u(value);' % depth
+ print '#endif'
+
+ # Compute the intermediate unshifted values
+ shift = 0
+ for i in range(format.nr_channels()):
+ src_channel = format.channels[i]
+ value = 'value'
+ if src_channel.type == UNSIGNED:
+ if shift:
+ value = '%s >> %u' % (value, shift)
+ if shift + src_channel.size < depth:
+ value = '(%s) & 0x%x' % (value, (1 << src_channel.size) - 1)
+ elif src_channel.type == SIGNED:
+ if shift + src_channel.size < depth:
+ # Align the sign bit
+ lshift = depth - (shift + src_channel.size)
+ value = '%s << %u' % (value, lshift)
+ # Cast to signed
+ value = '(int%u_t)(%s) ' % (depth, value)
+ if src_channel.size < depth:
+ # Align the LSB bit
+ rshift = depth - src_channel.size
+ value = '(%s) >> %u' % (value, rshift)
+ else:
+ value = None
+
+ if value is not None:
+ print ' %s = %s;' % (src_channel.name, value)
+
+ shift += src_channel.size
+
+ # Convert, swizzle, and store final values
+ for i in range(4):
+ swizzle = format.swizzles[i]
+ if swizzle < 4:
+ src_channel = format.channels[swizzle]
+ src_colorspace = format.colorspace
+ if src_colorspace == SRGB and i == 3:
+ # Alpha channel is linear
+ src_colorspace = RGB
+ value = src_channel.name
+ value = conversion_expr(src_channel,
+ dst_channel, dst_native_type,
+ value,
+ src_colorspace = src_colorspace)
+ elif swizzle == SWIZZLE_0:
+ value = '0'
+ elif swizzle == SWIZZLE_1:
+ value = get_one(dst_channel)
+ elif swizzle == SWIZZLE_NONE:
+ value = '0'
+ else:
+ assert False
+ print ' dst[%u] = %s; /* %s */' % (i, value, 'rgba'[i])
+
+ else:
+ print ' union util_format_%s pixel;' % format.short_name()
+ print ' memcpy(&pixel, src, sizeof pixel);'
+ bswap_format(format)
+
+ for i in range(4):
+ swizzle = format.swizzles[i]
+ if swizzle < 4:
+ src_channel = format.channels[swizzle]
+ src_colorspace = format.colorspace
+ if src_colorspace == SRGB and i == 3:
+ # Alpha channel is linear
+ src_colorspace = RGB
+ value = 'pixel.chan.%s' % src_channel.name
+ value = conversion_expr(src_channel,
+ dst_channel, dst_native_type,
+ value,
+ src_colorspace = src_colorspace)
+ elif swizzle == SWIZZLE_0:
+ value = '0'
+ elif swizzle == SWIZZLE_1:
+ value = get_one(dst_channel)
+ elif swizzle == SWIZZLE_NONE:
+ value = '0'
+ else:
+ assert False
+ print ' dst[%u] = %s; /* %s */' % (i, value, 'rgba'[i])
+
+
+def generate_pack_kernel(format, src_channel, src_native_type):
+
+ if not is_format_supported(format):
+ return
+
+ dst_native_type = native_type(format)
+
+ assert format.layout == PLAIN
+
+ inv_swizzle = format.inv_swizzles()
+
+ if format.is_bitmask():
+ depth = format.block_size()
+ print ' uint%u_t value = 0;' % depth
+
+ shift = 0
+ for i in range(4):
+ dst_channel = format.channels[i]
+ if inv_swizzle[i] is not None:
+ value ='src[%u]' % inv_swizzle[i]
+ dst_colorspace = format.colorspace
+ if dst_colorspace == SRGB and inv_swizzle[i] == 3:
+ # Alpha channel is linear
+ dst_colorspace = RGB
+ value = conversion_expr(src_channel,
+ dst_channel, dst_native_type,
+ value,
+ dst_colorspace = dst_colorspace)
+ if dst_channel.type in (UNSIGNED, SIGNED):
+ if shift + dst_channel.size < depth:
+ value = '(%s) & 0x%x' % (value, (1 << dst_channel.size) - 1)
+ if shift:
+ value = '(%s) << %u' % (value, shift)
+ if dst_channel.type == SIGNED:
+ # Cast to unsigned
+ value = '(uint%u_t)(%s) ' % (depth, value)
+ else:
+ value = None
+ if value is not None:
+ print ' value |= %s;' % (value)
+
+ shift += dst_channel.size
+
+ if depth > 8:
+ print '#ifdef PIPE_ARCH_BIG_ENDIAN'
+ print ' value = util_bswap%u(value);' % depth
+ print '#endif'
+
+ print ' *(uint%u_t *)dst = value;' % depth
+
+ else:
+ print ' union util_format_%s pixel;' % format.short_name()
+
+ for i in range(4):
+ dst_channel = format.channels[i]
+ width = dst_channel.size
+ if inv_swizzle[i] is None:
+ continue
+ dst_colorspace = format.colorspace
+ if dst_colorspace == SRGB and inv_swizzle[i] == 3:
+ # Alpha channel is linear
+ dst_colorspace = RGB
+ value ='src[%u]' % inv_swizzle[i]
+ value = conversion_expr(src_channel,
+ dst_channel, dst_native_type,
+ value,
+ dst_colorspace = dst_colorspace)
+ print ' pixel.chan.%s = %s;' % (dst_channel.name, value)
+
+ bswap_format(format)
+ print ' memcpy(dst, &pixel, sizeof pixel);'
+
+
+def generate_format_unpack(format, dst_channel, dst_native_type, dst_suffix):
+ '''Generate the function to unpack pixels from a particular format'''
+
+ name = format.short_name()
+
+ print 'static INLINE void'
+ print 'util_format_%s_unpack_%s(%s *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)' % (name, dst_suffix, dst_native_type)
+ print '{'
+
+ if is_format_supported(format):
+ print ' unsigned x, y;'
+ print ' for(y = 0; y < height; y += %u) {' % (format.block_height,)
+ print ' %s *dst = dst_row;' % (dst_native_type)
+ print ' const uint8_t *src = src_row;'
+ print ' for(x = 0; x < width; x += %u) {' % (format.block_width,)
+
+ generate_unpack_kernel(format, dst_channel, dst_native_type)
+
+ print ' src += %u;' % (format.block_size() / 8,)
+ print ' dst += 4;'
+ print ' }'
+ print ' src_row += src_stride;'
+ print ' dst_row += dst_stride/sizeof(*dst_row);'
+ print ' }'
+
+ print '}'
+ print
+
+
+def generate_format_pack(format, src_channel, src_native_type, src_suffix):
+ '''Generate the function to pack pixels to a particular format'''
+
+ name = format.short_name()
+
+ print 'static INLINE void'
+ print 'util_format_%s_pack_%s(uint8_t *dst_row, unsigned dst_stride, const %s *src_row, unsigned src_stride, unsigned width, unsigned height)' % (name, src_suffix, src_native_type)
+ print '{'
+
+ if is_format_supported(format):
+ print ' unsigned x, y;'
+ print ' for(y = 0; y < height; y += %u) {' % (format.block_height,)
+ print ' const %s *src = src_row;' % (src_native_type)
+ print ' uint8_t *dst = dst_row;'
+ print ' for(x = 0; x < width; x += %u) {' % (format.block_width,)
+
+ generate_pack_kernel(format, src_channel, src_native_type)
+
+ print ' src += 4;'
+ print ' dst += %u;' % (format.block_size() / 8,)
+ print ' }'
+ print ' dst_row += dst_stride;'
+ print ' src_row += src_stride/sizeof(*src_row);'
+ print ' }'
+
+ print '}'
+ print
+
+
+def generate_format_fetch(format, dst_channel, dst_native_type, dst_suffix):
+ '''Generate the function to unpack pixels from a particular format'''
+
+ name = format.short_name()
+
+ print 'static INLINE void'
+ print 'util_format_%s_fetch_%s(%s *dst, const uint8_t *src, unsigned i, unsigned j)' % (name, dst_suffix, dst_native_type)
+ print '{'
+
+ if is_format_supported(format):
+ generate_unpack_kernel(format, dst_channel, dst_native_type)
+
+ print '}'
+ print
+
+
+def is_format_hand_written(format):
+ return format.layout in ('s3tc', 'rgtc', 'etc', 'subsampled', 'other') or format.colorspace == ZS
+
+
+def generate(formats):
+ print
+ print '#include "pipe/p_compiler.h"'
+ print '#include "u_math.h"'
+ print '#include "u_half.h"'
+ print '#include "u_format.h"'
+ print '#include "u_format_other.h"'
+ print '#include "u_format_srgb.h"'
+ print '#include "u_format_yuv.h"'
+ print '#include "u_format_zs.h"'
+ print
+
+ for format in formats:
+ if not is_format_hand_written(format):
+
+ if is_format_supported(format):
+ generate_format_type(format)
+
+ if is_format_pure_unsigned(format):
+ native_type = 'unsigned'
+ suffix = 'unsigned'
+ channel = Channel(UNSIGNED, False, True, 32)
+
+ generate_format_unpack(format, channel, native_type, suffix)
+ generate_format_pack(format, channel, native_type, suffix)
+ generate_format_fetch(format, channel, native_type, suffix)
+
+ channel = Channel(SIGNED, False, True, 32)
+ native_type = 'int'
+ suffix = 'signed'
+ generate_format_unpack(format, channel, native_type, suffix)
+ generate_format_pack(format, channel, native_type, suffix)
+ elif is_format_pure_signed(format):
+ native_type = 'int'
+ suffix = 'signed'
+ channel = Channel(SIGNED, False, True, 32)
+
+ generate_format_unpack(format, channel, native_type, suffix)
+ generate_format_pack(format, channel, native_type, suffix)
+ generate_format_fetch(format, channel, native_type, suffix)
+
+ native_type = 'unsigned'
+ suffix = 'unsigned'
+ channel = Channel(UNSIGNED, False, True, 32)
+ generate_format_unpack(format, channel, native_type, suffix)
+ generate_format_pack(format, channel, native_type, suffix)
+ else:
+ channel = Channel(FLOAT, False, False, 32)
+ native_type = 'float'
+ suffix = 'rgba_float'
+
+ generate_format_unpack(format, channel, native_type, suffix)
+ generate_format_pack(format, channel, native_type, suffix)
+ generate_format_fetch(format, channel, native_type, suffix)
+
+ channel = Channel(UNSIGNED, True, False, 8)
+ native_type = 'uint8_t'
+ suffix = 'rgba_8unorm'
+
+ generate_format_unpack(format, channel, native_type, suffix)
+ generate_format_pack(format, channel, native_type, suffix)
+
diff --git a/src/minigallium/auxiliary/util/u_format_parse.py b/src/minigallium/auxiliary/util/u_format_parse.py
new file mode 100755
index 0000000..07052b9
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_parse.py
@@ -0,0 +1,313 @@
+#!/usr/bin/env python
+
+'''
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+'''
+
+
+VOID, UNSIGNED, SIGNED, FIXED, FLOAT = range(5)
+
+SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W, SWIZZLE_0, SWIZZLE_1, SWIZZLE_NONE, = range(7)
+
+PLAIN = 'plain'
+
+RGB = 'rgb'
+SRGB = 'srgb'
+YUV = 'yuv'
+ZS = 'zs'
+
+
+def is_pot(x):
+ return (x & (x - 1)) == 0
+
+
+VERY_LARGE = 99999999999999999999999
+
+
+class Channel:
+ '''Describe the channel of a color channel.'''
+
+ def __init__(self, type, norm, pure, size, name = ''):
+ self.type = type
+ self.norm = norm
+ self.pure = pure
+ self.size = size
+ self.sign = type in (SIGNED, FIXED, FLOAT)
+ self.name = name
+
+ def __str__(self):
+ s = str(self.type)
+ if self.norm:
+ s += 'n'
+ if self.pure:
+ s += 'p'
+ s += str(self.size)
+ return s
+
+ def __eq__(self, other):
+ return self.type == other.type and self.norm == other.norm and self.pure == other.pure and self.size == other.size
+
+ def max(self):
+ '''Maximum representable number.'''
+ if self.type == FLOAT:
+ return VERY_LARGE
+ if self.type == FIXED:
+ return (1 << (self.size/2)) - 1
+ if self.norm:
+ return 1
+ if self.type == UNSIGNED:
+ return (1 << self.size) - 1
+ if self.type == SIGNED:
+ return (1 << (self.size - 1)) - 1
+ assert False
+
+ def min(self):
+ '''Minimum representable number.'''
+ if self.type == FLOAT:
+ return -VERY_LARGE
+ if self.type == FIXED:
+ return -(1 << (self.size/2))
+ if self.type == UNSIGNED:
+ return 0
+ if self.norm:
+ return -1
+ if self.type == SIGNED:
+ return -(1 << (self.size - 1))
+ assert False
+
+
+class Format:
+ '''Describe a pixel format.'''
+
+ def __init__(self, name, layout, block_width, block_height, channels, swizzles, colorspace):
+ self.name = name
+ self.layout = layout
+ self.block_width = block_width
+ self.block_height = block_height
+ self.channels = channels
+ self.swizzles = swizzles
+ self.name = name
+ self.colorspace = colorspace
+
+ def __str__(self):
+ return self.name
+
+ def short_name(self):
+ '''Make up a short norm for a format, suitable to be used as suffix in
+ function names.'''
+
+ name = self.name
+ if name.startswith('PIPE_FORMAT_'):
+ name = name[len('PIPE_FORMAT_'):]
+ name = name.lower()
+ return name
+
+ def block_size(self):
+ size = 0
+ for channel in self.channels:
+ size += channel.size
+ return size
+
+ def nr_channels(self):
+ nr_channels = 0
+ for channel in self.channels:
+ if channel.size:
+ nr_channels += 1
+ return nr_channels
+
+ def is_array(self):
+ if self.layout != PLAIN:
+ return False
+ ref_channel = self.channels[0]
+ if ref_channel.type == VOID:
+ ref_channel = self.channels[1]
+ for channel in self.channels:
+ if channel.size and (channel.size != ref_channel.size or channel.size % 8):
+ return False
+ if channel.type != VOID:
+ if channel.type != ref_channel.type:
+ return False
+ if channel.norm != ref_channel.norm:
+ return False
+ if channel.pure != ref_channel.pure:
+ return False
+ return True
+
+ def is_mixed(self):
+ if self.layout != PLAIN:
+ return False
+ ref_channel = self.channels[0]
+ if ref_channel.type == VOID:
+ ref_channel = self.channels[1]
+ for channel in self.channels[1:]:
+ if channel.type != VOID:
+ if channel.type != ref_channel.type:
+ return True
+ if channel.norm != ref_channel.norm:
+ return True
+ if channel.pure != ref_channel.pure:
+ return True
+ return False
+
+ def is_pot(self):
+ return is_pot(self.block_size())
+
+ def is_int(self):
+ if self.layout != PLAIN:
+ return False
+ for channel in self.channels:
+ if channel.type not in (VOID, UNSIGNED, SIGNED):
+ return False
+ return True
+
+ def is_float(self):
+ if self.layout != PLAIN:
+ return False
+ for channel in self.channels:
+ if channel.type not in (VOID, FLOAT):
+ return False
+ return True
+
+ def is_bitmask(self):
+ if self.layout != PLAIN:
+ return False
+ if self.block_size() not in (8, 16, 32):
+ return False
+ for channel in self.channels:
+ if channel.type not in (VOID, UNSIGNED, SIGNED):
+ return False
+ return True
+
+ def inv_swizzles(self):
+ '''Return an array[4] of inverse swizzle terms'''
+ '''Only pick the first matching value to avoid l8 getting blue and i8 getting alpha'''
+ inv_swizzle = [None]*4
+ for i in range(4):
+ swizzle = self.swizzles[i]
+ if swizzle < 4 and inv_swizzle[swizzle] == None:
+ inv_swizzle[swizzle] = i
+ return inv_swizzle
+
+ def stride(self):
+ return self.block_size()/8
+
+
+_type_parse_map = {
+ '': VOID,
+ 'x': VOID,
+ 'u': UNSIGNED,
+ 's': SIGNED,
+ 'h': FIXED,
+ 'f': FLOAT,
+}
+
+_swizzle_parse_map = {
+ 'x': SWIZZLE_X,
+ 'y': SWIZZLE_Y,
+ 'z': SWIZZLE_Z,
+ 'w': SWIZZLE_W,
+ '0': SWIZZLE_0,
+ '1': SWIZZLE_1,
+ '_': SWIZZLE_NONE,
+}
+
+def parse(filename):
+ '''Parse the format descrition in CSV format in terms of the
+ Channel and Format classes above.'''
+
+ stream = open(filename)
+ formats = []
+ for line in stream:
+ try:
+ comment = line.index('#')
+ except ValueError:
+ pass
+ else:
+ line = line[:comment]
+ line = line.strip()
+ if not line:
+ continue
+
+ fields = [field.strip() for field in line.split(',')]
+
+ name = fields[0]
+ layout = fields[1]
+ block_width, block_height = map(int, fields[2:4])
+
+ swizzles = [_swizzle_parse_map[swizzle] for swizzle in fields[8]]
+ colorspace = fields[9]
+
+ if layout == PLAIN:
+ names = ['']*4
+ if colorspace in (RGB, SRGB):
+ for i in range(4):
+ swizzle = swizzles[i]
+ if swizzle < 4:
+ names[swizzle] += 'rgba'[i]
+ elif colorspace == ZS:
+ for i in range(4):
+ swizzle = swizzles[i]
+ if swizzle < 4:
+ names[swizzle] += 'zs'[i]
+ else:
+ assert False
+ for i in range(4):
+ if names[i] == '':
+ names[i] = 'x'
+ else:
+ names = ['x', 'y', 'z', 'w']
+
+ channels = []
+ for i in range(0, 4):
+ field = fields[4 + i]
+ if field:
+ type = _type_parse_map[field[0]]
+ if field[1] == 'n':
+ norm = True
+ pure = False
+ size = int(field[2:])
+ elif field[1] == 'p':
+ pure = True
+ norm = False
+ size = int(field[2:])
+ else:
+ norm = False
+ pure = False
+ size = int(field[1:])
+ else:
+ type = VOID
+ norm = False
+ pure = False
+ size = 0
+ channel = Channel(type, norm, pure, size, names[i])
+ channels.append(channel)
+
+ format = Format(name, layout, block_width, block_height, channels, swizzles, colorspace)
+ formats.append(format)
+ return formats
+
diff --git a/src/minigallium/auxiliary/util/u_format_r11g11b10f.h b/src/minigallium/auxiliary/util/u_format_r11g11b10f.h
new file mode 100644
index 0000000..57516c3
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_r11g11b10f.h
@@ -0,0 +1,232 @@
+/*
+ * Copyright (C) 2011 Marek Olšák <maraeo@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/* Based on code from The OpenGL Programming Guide / 7th Edition, Appendix J.
+ * Available here: http://www.opengl-redbook.com/appendices/
+ * The algorithm in the book contains a bug though, which is fixed in the code
+ * below.
+ */
+
+#define UF11(e, m) ((e << 6) | (m))
+#define UF11_EXPONENT_BIAS 15
+#define UF11_EXPONENT_BITS 0x1F
+#define UF11_EXPONENT_SHIFT 6
+#define UF11_MANTISSA_BITS 0x3F
+#define UF11_MANTISSA_SHIFT (23 - UF11_EXPONENT_SHIFT)
+#define UF11_MAX_EXPONENT (UF11_EXPONENT_BITS << UF11_EXPONENT_SHIFT)
+
+#define UF10(e, m) ((e << 5) | (m))
+#define UF10_EXPONENT_BIAS 15
+#define UF10_EXPONENT_BITS 0x1F
+#define UF10_EXPONENT_SHIFT 5
+#define UF10_MANTISSA_BITS 0x1F
+#define UF10_MANTISSA_SHIFT (23 - UF10_EXPONENT_SHIFT)
+#define UF10_MAX_EXPONENT (UF10_EXPONENT_BITS << UF10_EXPONENT_SHIFT)
+
+#define F32_INFINITY 0x7f800000
+
+static INLINE unsigned f32_to_uf11(float val)
+{
+ union {
+ float f;
+ uint32_t ui;
+ } f32 = {val};
+
+ uint16_t uf11 = 0;
+
+ /* Decode little-endian 32-bit floating-point value */
+ int sign = (f32.ui >> 16) & 0x8000;
+ /* Map exponent to the range [-127,128] */
+ int exponent = ((f32.ui >> 23) & 0xff) - 127;
+ int mantissa = f32.ui & 0x007fffff;
+
+ if (exponent == 128) { /* Infinity or NaN */
+ /* From the GL_EXT_packed_float spec:
+ *
+ * "Additionally: negative infinity is converted to zero; positive
+ * infinity is converted to positive infinity; and both positive and
+ * negative NaN are converted to positive NaN."
+ */
+ uf11 = UF11_MAX_EXPONENT;
+ if (mantissa) {
+ uf11 |= 1; /* NaN */
+ } else {
+ if (sign)
+ uf11 = 0; /* 0.0 */
+ }
+ } else if (sign) {
+ return 0;
+ } else if (val > 65024.0f) {
+ /* From the GL_EXT_packed_float spec:
+ *
+ * "Likewise, finite positive values greater than 65024 (the maximum
+ * finite representable unsigned 11-bit floating-point value) are
+ * converted to 65024."
+ */
+ uf11 = UF11(30, 63);
+ }
+ else if (exponent > -15) { /* Representable value */
+ exponent += UF11_EXPONENT_BIAS;
+ mantissa >>= UF11_MANTISSA_SHIFT;
+ uf11 = exponent << UF11_EXPONENT_SHIFT | mantissa;
+ }
+
+ return uf11;
+}
+
+static INLINE float uf11_to_f32(uint16_t val)
+{
+ union {
+ float f;
+ uint32_t ui;
+ } f32;
+
+ int exponent = (val & 0x07c0) >> UF11_EXPONENT_SHIFT;
+ int mantissa = (val & 0x003f);
+
+ f32.f = 0.0;
+
+ if (exponent == 0) {
+ if (mantissa != 0) {
+ const float scale = 1.0 / (1 << 20);
+ f32.f = scale * mantissa;
+ }
+ }
+ else if (exponent == 31) {
+ f32.ui = F32_INFINITY | mantissa;
+ }
+ else {
+ float scale, decimal;
+ exponent -= 15;
+ if (exponent < 0) {
+ scale = 1.0f / (1 << -exponent);
+ }
+ else {
+ scale = (float) (1 << exponent);
+ }
+ decimal = 1.0f + (float) mantissa / 64;
+ f32.f = scale * decimal;
+ }
+
+ return f32.f;
+}
+
+static INLINE unsigned f32_to_uf10(float val)
+{
+ union {
+ float f;
+ uint32_t ui;
+ } f32 = {val};
+
+ uint16_t uf10 = 0;
+
+ /* Decode little-endian 32-bit floating-point value */
+ int sign = (f32.ui >> 16) & 0x8000;
+ /* Map exponent to the range [-127,128] */
+ int exponent = ((f32.ui >> 23) & 0xff) - 127;
+ int mantissa = f32.ui & 0x007fffff;
+
+ if (exponent == 128) {
+ /* From the GL_EXT_packed_float spec:
+ *
+ * "Additionally: negative infinity is converted to zero; positive
+ * infinity is converted to positive infinity; and both positive and
+ * negative NaN are converted to positive NaN."
+ */
+ uf10 = UF10_MAX_EXPONENT;
+ if (mantissa) {
+ uf10 |= 1; /* NaN */
+ } else {
+ if (sign)
+ uf10 = 0; /* 0.0 */
+ }
+ } else if (sign) {
+ return 0;
+ } else if (val > 64512.0f) {
+ /* From the GL_EXT_packed_float spec:
+ *
+ * "Likewise, finite positive values greater than 64512 (the maximum
+ * finite representable unsigned 10-bit floating-point value) are
+ * converted to 64512."
+ */
+ uf10 = UF10(30, 31);
+ }
+ else if (exponent > -15) { /* Representable value */
+ exponent += UF10_EXPONENT_BIAS;
+ mantissa >>= UF10_MANTISSA_SHIFT;
+ uf10 = exponent << UF10_EXPONENT_SHIFT | mantissa;
+ }
+
+ return uf10;
+}
+
+static INLINE float uf10_to_f32(uint16_t val)
+{
+ union {
+ float f;
+ uint32_t ui;
+ } f32;
+
+ int exponent = (val & 0x03e0) >> UF10_EXPONENT_SHIFT;
+ int mantissa = (val & 0x001f);
+
+ f32.f = 0.0;
+
+ if (exponent == 0) {
+ if (mantissa != 0) {
+ const float scale = 1.0 / (1 << 20);
+ f32.f = scale * mantissa;
+ }
+ }
+ else if (exponent == 31) {
+ f32.ui = F32_INFINITY | mantissa;
+ }
+ else {
+ float scale, decimal;
+ exponent -= 15;
+ if (exponent < 0) {
+ scale = 1.0f / (1 << -exponent);
+ }
+ else {
+ scale = (float) (1 << exponent);
+ }
+ decimal = 1.0f + (float) mantissa / 32;
+ f32.f = scale * decimal;
+ }
+
+ return f32.f;
+}
+
+static INLINE unsigned float3_to_r11g11b10f(const float rgb[3])
+{
+ return ( f32_to_uf11(rgb[0]) & 0x7ff) |
+ ((f32_to_uf11(rgb[1]) & 0x7ff) << 11) |
+ ((f32_to_uf10(rgb[2]) & 0x3ff) << 22);
+}
+
+static INLINE void r11g11b10f_to_float3(unsigned rgb, float retval[3])
+{
+ retval[0] = uf11_to_f32( rgb & 0x7ff);
+ retval[1] = uf11_to_f32((rgb >> 11) & 0x7ff);
+ retval[2] = uf10_to_f32((rgb >> 22) & 0x3ff);
+}
diff --git a/src/minigallium/auxiliary/util/u_format_rgb9e5.h b/src/minigallium/auxiliary/util/u_format_rgb9e5.h
new file mode 100644
index 0000000..c2a3f6f
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_rgb9e5.h
@@ -0,0 +1,164 @@
+/*
+ * Copyright (C) 2011 Marek Olšák <maraeo@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/* Copied from EXT_texture_shared_exponent and edited. */
+
+#ifndef RGB9E5_H
+#define RGB9E5_H
+
+#include <math.h>
+#include <assert.h>
+
+#define RGB9E5_EXPONENT_BITS 5
+#define RGB9E5_MANTISSA_BITS 9
+#define RGB9E5_EXP_BIAS 15
+#define RGB9E5_MAX_VALID_BIASED_EXP 31
+
+#define MAX_RGB9E5_EXP (RGB9E5_MAX_VALID_BIASED_EXP - RGB9E5_EXP_BIAS)
+#define RGB9E5_MANTISSA_VALUES (1<<RGB9E5_MANTISSA_BITS)
+#define MAX_RGB9E5_MANTISSA (RGB9E5_MANTISSA_VALUES-1)
+#define MAX_RGB9E5 (((float)MAX_RGB9E5_MANTISSA)/RGB9E5_MANTISSA_VALUES * (1<<MAX_RGB9E5_EXP))
+#define EPSILON_RGB9E5 ((1.0/RGB9E5_MANTISSA_VALUES) / (1<<RGB9E5_EXP_BIAS))
+
+typedef union {
+ unsigned int raw;
+ float value;
+ struct {
+#if defined(MESA_BIG_ENDIAN) || defined(PIPE_ARCH_BIG_ENDIAN)
+ unsigned int negative:1;
+ unsigned int biasedexponent:8;
+ unsigned int mantissa:23;
+#else
+ unsigned int mantissa:23;
+ unsigned int biasedexponent:8;
+ unsigned int negative:1;
+#endif
+ } field;
+} float754;
+
+typedef union {
+ unsigned int raw;
+ struct {
+#if defined(MESA_BIG_ENDIAN) || defined(PIPE_ARCH_BIG_ENDIAN)
+ unsigned int biasedexponent:RGB9E5_EXPONENT_BITS;
+ unsigned int b:RGB9E5_MANTISSA_BITS;
+ unsigned int g:RGB9E5_MANTISSA_BITS;
+ unsigned int r:RGB9E5_MANTISSA_BITS;
+#else
+ unsigned int r:RGB9E5_MANTISSA_BITS;
+ unsigned int g:RGB9E5_MANTISSA_BITS;
+ unsigned int b:RGB9E5_MANTISSA_BITS;
+ unsigned int biasedexponent:RGB9E5_EXPONENT_BITS;
+#endif
+ } field;
+} rgb9e5;
+
+static INLINE float rgb9e5_ClampRange(float x)
+{
+ if (x > 0.0) {
+ if (x >= MAX_RGB9E5) {
+ return MAX_RGB9E5;
+ } else {
+ return x;
+ }
+ } else {
+ /* NaN gets here too since comparisons with NaN always fail! */
+ return 0.0;
+ }
+}
+
+/* Ok, FloorLog2 is not correct for the denorm and zero values, but we
+ are going to do a max of this value with the minimum rgb9e5 exponent
+ that will hide these problem cases. */
+static INLINE int rgb9e5_FloorLog2(float x)
+{
+ float754 f;
+
+ f.value = x;
+ return (f.field.biasedexponent - 127);
+}
+
+static INLINE unsigned float3_to_rgb9e5(const float rgb[3])
+{
+ rgb9e5 retval;
+ float maxrgb;
+ int rm, gm, bm;
+ float rc, gc, bc;
+ int exp_shared, maxm;
+ double denom;
+
+ rc = rgb9e5_ClampRange(rgb[0]);
+ gc = rgb9e5_ClampRange(rgb[1]);
+ bc = rgb9e5_ClampRange(rgb[2]);
+
+ maxrgb = MAX3(rc, gc, bc);
+ exp_shared = MAX2(-RGB9E5_EXP_BIAS-1, rgb9e5_FloorLog2(maxrgb)) + 1 + RGB9E5_EXP_BIAS;
+ assert(exp_shared <= RGB9E5_MAX_VALID_BIASED_EXP);
+ assert(exp_shared >= 0);
+ /* This pow function could be replaced by a table. */
+ denom = pow(2, exp_shared - RGB9E5_EXP_BIAS - RGB9E5_MANTISSA_BITS);
+
+ maxm = (int) floor(maxrgb / denom + 0.5);
+ if (maxm == MAX_RGB9E5_MANTISSA+1) {
+ denom *= 2;
+ exp_shared += 1;
+ assert(exp_shared <= RGB9E5_MAX_VALID_BIASED_EXP);
+ } else {
+ assert(maxm <= MAX_RGB9E5_MANTISSA);
+ }
+
+ rm = (int) floor(rc / denom + 0.5);
+ gm = (int) floor(gc / denom + 0.5);
+ bm = (int) floor(bc / denom + 0.5);
+
+ assert(rm <= MAX_RGB9E5_MANTISSA);
+ assert(gm <= MAX_RGB9E5_MANTISSA);
+ assert(bm <= MAX_RGB9E5_MANTISSA);
+ assert(rm >= 0);
+ assert(gm >= 0);
+ assert(bm >= 0);
+
+ retval.field.r = rm;
+ retval.field.g = gm;
+ retval.field.b = bm;
+ retval.field.biasedexponent = exp_shared;
+
+ return retval.raw;
+}
+
+static INLINE void rgb9e5_to_float3(unsigned rgb, float retval[3])
+{
+ rgb9e5 v;
+ int exponent;
+ float scale;
+
+ v.raw = rgb;
+ exponent = v.field.biasedexponent - RGB9E5_EXP_BIAS - RGB9E5_MANTISSA_BITS;
+ scale = (float) pow(2, exponent);
+
+ retval[0] = v.field.r * scale;
+ retval[1] = v.field.g * scale;
+ retval[2] = v.field.b * scale;
+}
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_format_rgtc.c b/src/minigallium/auxiliary/util/u_format_rgtc.c
new file mode 100644
index 0000000..3ca0de9
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_rgtc.c
@@ -0,0 +1,474 @@
+/**************************************************************************
+ *
+ * Copyright (C) 2011 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include <stdio.h>
+#include "u_math.h"
+#include "u_format.h"
+#include "u_format_rgtc.h"
+
+static void u_format_unsigned_encode_rgtc_ubyte(uint8_t *blkaddr, uint8_t srccolors[4][4],
+ int numxpixels, int numypixels);
+
+static void u_format_unsigned_fetch_texel_rgtc(unsigned srcRowStride, const uint8_t *pixdata,
+ unsigned i, unsigned j, uint8_t *value, unsigned comps);
+
+static void u_format_signed_encode_rgtc_ubyte(int8_t *blkaddr, int8_t srccolors[4][4],
+ int numxpixels, int numypixels);
+
+static void u_format_signed_fetch_texel_rgtc(unsigned srcRowStride, const int8_t *pixdata,
+ unsigned i, unsigned j, int8_t *value, unsigned comps);
+
+void
+util_format_rgtc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1);
+ dst[1] = 0;
+ dst[2] = 0;
+ dst[3] = 255;
+}
+
+void
+util_format_rgtc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ const unsigned bw = 4, bh = 4, comps = 4;
+ unsigned x, y, i, j;
+ unsigned block_size = 8;
+
+ for(y = 0; y < height; y += bh) {
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += bw) {
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*comps;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1);
+ dst[1] = 0;
+ dst[2] = 0;
+ dst[3] = 255;
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_rgtc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row,
+ unsigned src_stride, unsigned width, unsigned height)
+{
+ const unsigned bw = 4, bh = 4, bytes_per_block = 8;
+ unsigned x, y, i, j;
+
+ for(y = 0; y < height; y += bh) {
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += bw) {
+ uint8_t tmp[4][4]; /* [bh][bw][comps] */
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ tmp[j][i] = src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4];
+ }
+ }
+ u_format_unsigned_encode_rgtc_ubyte(dst, tmp, 4, 4);
+ dst += bytes_per_block;
+ }
+ dst_row += dst_stride / sizeof(*dst_row);
+ }
+}
+
+void
+util_format_rgtc1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 8;
+ for(y = 0; y < height; y += 4) {
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ uint8_t tmp_r;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1);
+ dst[0] = ubyte_to_float(tmp_r);
+ dst[1] = 0.0;
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_rgtc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ const unsigned bw = 4, bh = 4, bytes_per_block = 8;
+ unsigned x, y, i, j;
+
+ for(y = 0; y < height; y += bh) {
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += bw) {
+ uint8_t tmp[4][4]; /* [bh][bw][comps] */
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ tmp[j][i] = float_to_ubyte(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
+ }
+ }
+ u_format_unsigned_encode_rgtc_ubyte(dst, tmp, 4, 4);
+ dst += bytes_per_block;
+ }
+ dst_row += dst_stride / sizeof(*dst_row);
+ }
+}
+
+void
+util_format_rgtc1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp_r;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1);
+ dst[0] = ubyte_to_float(tmp_r);
+ dst[1] = 0.0;
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+}
+
+void
+util_format_rgtc1_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_rgtc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_rgtc1_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_rgtc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ const unsigned bw = 4, bh = 4, bytes_per_block = 8;
+ unsigned x, y, i, j;
+
+ for(y = 0; y < height; y += bh) {
+ int8_t *dst = (int8_t *)dst_row;
+ for(x = 0; x < width; x += bw) {
+ int8_t tmp[4][4]; /* [bh][bw][comps] */
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ tmp[j][i] = float_to_byte_tex(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
+ }
+ }
+ u_format_signed_encode_rgtc_ubyte(dst, tmp, 4, 4);
+ dst += bytes_per_block;
+ }
+ dst_row += dst_stride / sizeof(*dst_row);
+ }
+}
+
+void
+util_format_rgtc1_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 8;
+ for(y = 0; y < height; y += 4) {
+ const int8_t *src = (int8_t *)src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ int8_t tmp_r;
+ u_format_signed_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1);
+ dst[0] = byte_to_float_tex(tmp_r);
+ dst[1] = 0.0;
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_rgtc1_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ int8_t tmp_r;
+ u_format_signed_fetch_texel_rgtc(0, (int8_t *)src, i, j, &tmp_r, 1);
+ dst[0] = byte_to_float_tex(tmp_r);
+ dst[1] = 0.0;
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+}
+
+
+void
+util_format_rgtc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2);
+ u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 1, 2);
+ dst[2] = 0;
+ dst[3] = 255;
+}
+
+void
+util_format_rgtc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ const unsigned bw = 4, bh = 4, comps = 4;
+ unsigned x, y, i, j;
+ unsigned block_size = 16;
+
+ for(y = 0; y < height; y += bh) {
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += bw) {
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*comps;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2);
+ u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 1, 2);
+ dst[2] = 0;
+ dst[3] = 255;
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_rgtc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ const unsigned bw = 4, bh = 4, bytes_per_block = 16;
+ unsigned x, y, i, j;
+
+ for(y = 0; y < height; y += bh) {
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += bw) {
+ uint8_t tmp_r[4][4]; /* [bh][bw] */
+ uint8_t tmp_g[4][4]; /* [bh][bw] */
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ tmp_r[j][i] = src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4];
+ tmp_g[j][i] = src_row[((y + j)*src_stride/sizeof(*src_row) + (x + i)*4) + 1];
+ }
+ }
+ u_format_unsigned_encode_rgtc_ubyte(dst, tmp_r, 4, 4);
+ u_format_unsigned_encode_rgtc_ubyte(dst + 8, tmp_g, 4, 4);
+ dst += bytes_per_block;
+ }
+ dst_row += dst_stride / sizeof(*dst_row);
+ }
+}
+
+void
+util_format_rxtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off)
+{
+ const unsigned bw = 4, bh = 4, bytes_per_block = 16;
+ unsigned x, y, i, j;
+
+ for(y = 0; y < height; y += bh) {
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += bw) {
+ uint8_t tmp_r[4][4]; /* [bh][bw][comps] */
+ uint8_t tmp_g[4][4]; /* [bh][bw][comps] */
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ tmp_r[j][i] = float_to_ubyte(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
+ tmp_g[j][i] = float_to_ubyte(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4 + chan2off]);
+ }
+ }
+ u_format_unsigned_encode_rgtc_ubyte(dst, tmp_r, 4, 4);
+ u_format_unsigned_encode_rgtc_ubyte(dst + 8, tmp_g, 4, 4);
+ dst += bytes_per_block;
+ }
+ dst_row += dst_stride / sizeof(*dst_row);
+ }
+}
+
+void
+util_format_rgtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rxtc2_unorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 1);
+}
+
+void
+util_format_rgtc2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 16;
+ for(y = 0; y < height; y += 4) {
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ uint8_t tmp_r, tmp_g;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2);
+ u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2);
+ dst[0] = ubyte_to_float(tmp_r);
+ dst[1] = ubyte_to_float(tmp_g);
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_rgtc2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp_r, tmp_g;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2);
+ u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2);
+ dst[0] = ubyte_to_float(tmp_r);
+ dst[1] = ubyte_to_float(tmp_g);
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+}
+
+
+void
+util_format_rgtc2_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_rgtc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_rgtc2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_rgtc2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 16;
+ for(y = 0; y < height; y += 4) {
+ const int8_t *src = (int8_t *)src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ int8_t tmp_r, tmp_g;
+ u_format_signed_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2);
+ u_format_signed_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2);
+ dst[0] = byte_to_float_tex(tmp_r);
+ dst[1] = byte_to_float_tex(tmp_g);
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_rxtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off)
+{
+ const unsigned bw = 4, bh = 4, bytes_per_block = 16;
+ unsigned x, y, i, j;
+
+ for(y = 0; y < height; y += bh) {
+ int8_t *dst = (int8_t *)dst_row;
+ for(x = 0; x < width; x += bw) {
+ int8_t tmp_r[4][4]; /* [bh][bw][comps] */
+ int8_t tmp_g[4][4]; /* [bh][bw][comps] */
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ tmp_r[j][i] = float_to_byte_tex(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
+ tmp_g[j][i] = float_to_byte_tex(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4 + chan2off]);
+ }
+ }
+ u_format_signed_encode_rgtc_ubyte(dst, tmp_r, 4, 4);
+ u_format_signed_encode_rgtc_ubyte(dst + 8, tmp_g, 4, 4);
+ dst += bytes_per_block;
+ }
+ dst_row += dst_stride / sizeof(*dst_row);
+ }
+}
+
+void
+util_format_rgtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rxtc2_snorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 1);
+}
+
+void
+util_format_rgtc2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ int8_t tmp_r, tmp_g;
+ u_format_signed_fetch_texel_rgtc(0, (int8_t *)src, i, j, &tmp_r, 2);
+ u_format_signed_fetch_texel_rgtc(0, (int8_t *)src + 8, i, j, &tmp_g, 2);
+ dst[0] = byte_to_float_tex(tmp_r);
+ dst[1] = byte_to_float_tex(tmp_g);
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+}
+
+
+#define TAG(x) u_format_unsigned_##x
+#define TYPE uint8_t
+#define T_MIN 0
+#define T_MAX 255
+
+#include "texcompress_rgtc_tmp.h"
+
+#undef TYPE
+#undef TAG
+#undef T_MIN
+#undef T_MAX
+
+
+#define TAG(x) u_format_signed_##x
+#define TYPE int8_t
+#define T_MIN (int8_t)-128
+#define T_MAX (int8_t)127
+
+#include "texcompress_rgtc_tmp.h"
+
+#undef TYPE
+#undef TAG
+#undef T_MIN
+#undef T_MAX
diff --git a/src/minigallium/auxiliary/util/u_format_rgtc.h b/src/minigallium/auxiliary/util/u_format_rgtc.h
new file mode 100644
index 0000000..67ac472
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_rgtc.h
@@ -0,0 +1,114 @@
+/**************************************************************************
+ *
+ * Copyright 2011 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+#ifndef U_FORMAT_RGTC_H_
+#define U_FORMAT_RGTC_H_
+
+void
+util_format_rgtc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_rgtc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+
+void
+util_format_rgtc1_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_rgtc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+void
+util_format_rgtc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_rgtc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rxtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off);
+
+void
+util_format_rgtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+void
+util_format_rgtc2_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_rgtc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rxtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off);
+
+void
+util_format_rgtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_format_s3tc.c b/src/minigallium/auxiliary/util/u_format_s3tc.c
new file mode 100644
index 0000000..008643d
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_s3tc.c
@@ -0,0 +1,794 @@
+/**************************************************************************
+ *
+ * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
+ * Copyright (c) 2008 VMware, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "u_dl.h"
+#include "u_math.h"
+#include "u_format.h"
+#include "u_format_s3tc.h"
+#include "u_format_srgb.h"
+
+
+#if defined(_WIN32) || defined(WIN32)
+#define DXTN_LIBNAME "dxtn.dll"
+#elif defined(__APPLE__)
+#define DXTN_LIBNAME "libtxc_dxtn.dylib"
+#else
+#define DXTN_LIBNAME "libtxc_dxtn.so"
+#endif
+
+
+static void
+util_format_dxt1_rgb_fetch_stub(int src_stride,
+ const uint8_t *src,
+ int col, int row,
+ uint8_t *dst)
+{
+ assert(0);
+}
+
+
+static void
+util_format_dxt1_rgba_fetch_stub(int src_stride,
+ const uint8_t *src,
+ int col, int row,
+ uint8_t *dst )
+{
+ assert(0);
+}
+
+
+static void
+util_format_dxt3_rgba_fetch_stub(int src_stride,
+ const uint8_t *src,
+ int col, int row,
+ uint8_t *dst )
+{
+ assert(0);
+}
+
+
+static void
+util_format_dxt5_rgba_fetch_stub(int src_stride,
+ const uint8_t *src,
+ int col, int row,
+ uint8_t *dst )
+{
+ assert(0);
+}
+
+
+static void
+util_format_dxtn_pack_stub(int src_comps,
+ int width, int height,
+ const uint8_t *src,
+ enum util_format_dxtn dst_format,
+ uint8_t *dst,
+ int dst_stride)
+{
+ assert(0);
+}
+
+
+boolean util_format_s3tc_enabled = FALSE;
+
+util_format_dxtn_fetch_t util_format_dxt1_rgb_fetch = util_format_dxt1_rgb_fetch_stub;
+util_format_dxtn_fetch_t util_format_dxt1_rgba_fetch = util_format_dxt1_rgba_fetch_stub;
+util_format_dxtn_fetch_t util_format_dxt3_rgba_fetch = util_format_dxt3_rgba_fetch_stub;
+util_format_dxtn_fetch_t util_format_dxt5_rgba_fetch = util_format_dxt5_rgba_fetch_stub;
+
+util_format_dxtn_pack_t util_format_dxtn_pack = util_format_dxtn_pack_stub;
+
+
+void
+util_format_s3tc_init(void)
+{
+ static boolean first_time = TRUE;
+ struct util_dl_library *library = NULL;
+ util_dl_proc fetch_2d_texel_rgb_dxt1;
+ util_dl_proc fetch_2d_texel_rgba_dxt1;
+ util_dl_proc fetch_2d_texel_rgba_dxt3;
+ util_dl_proc fetch_2d_texel_rgba_dxt5;
+ util_dl_proc tx_compress_dxtn;
+
+ if (!first_time)
+ return;
+ first_time = FALSE;
+
+ if (util_format_s3tc_enabled)
+ return;
+#if 0
+ library = util_dl_open(DXTN_LIBNAME);
+ if (!library) {
+ debug_printf("couldn't open " DXTN_LIBNAME ", software DXTn "
+ "compression/decompression unavailable\n");
+ return;
+ }
+
+ fetch_2d_texel_rgb_dxt1 =
+ util_dl_get_proc_address(library, "fetch_2d_texel_rgb_dxt1");
+ fetch_2d_texel_rgba_dxt1 =
+ util_dl_get_proc_address(library, "fetch_2d_texel_rgba_dxt1");
+ fetch_2d_texel_rgba_dxt3 =
+ util_dl_get_proc_address(library, "fetch_2d_texel_rgba_dxt3");
+ fetch_2d_texel_rgba_dxt5 =
+ util_dl_get_proc_address(library, "fetch_2d_texel_rgba_dxt5");
+ tx_compress_dxtn =
+ util_dl_get_proc_address(library, "tx_compress_dxtn");
+
+ if (!util_format_dxt1_rgb_fetch ||
+ !util_format_dxt1_rgba_fetch ||
+ !util_format_dxt3_rgba_fetch ||
+ !util_format_dxt5_rgba_fetch ||
+ !util_format_dxtn_pack) {
+ debug_printf("couldn't reference all symbols in " DXTN_LIBNAME
+ ", software DXTn compression/decompression "
+ "unavailable\n");
+ util_dl_close(library);
+ return;
+ }
+
+ util_format_dxt1_rgb_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgb_dxt1;
+ util_format_dxt1_rgba_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt1;
+ util_format_dxt3_rgba_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt3;
+ util_format_dxt5_rgba_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt5;
+ util_format_dxtn_pack = (util_format_dxtn_pack_t)tx_compress_dxtn;
+ util_format_s3tc_enabled = TRUE;
+#endif
+}
+
+
+/*
+ * Pixel fetch.
+ */
+
+void
+util_format_dxt1_rgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ util_format_dxt1_rgb_fetch(0, src, i, j, dst);
+}
+
+void
+util_format_dxt1_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ util_format_dxt1_rgba_fetch(0, src, i, j, dst);
+}
+
+void
+util_format_dxt3_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ util_format_dxt3_rgba_fetch(0, src, i, j, dst);
+}
+
+void
+util_format_dxt5_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ util_format_dxt5_rgba_fetch(0, src, i, j, dst);
+}
+
+void
+util_format_dxt1_rgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp[4];
+ util_format_dxt1_rgb_fetch(0, src, i, j, tmp);
+ dst[0] = ubyte_to_float(tmp[0]);
+ dst[1] = ubyte_to_float(tmp[1]);
+ dst[2] = ubyte_to_float(tmp[2]);
+ dst[3] = 1.0;
+}
+
+void
+util_format_dxt1_rgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp[4];
+ util_format_dxt1_rgba_fetch(0, src, i, j, tmp);
+ dst[0] = ubyte_to_float(tmp[0]);
+ dst[1] = ubyte_to_float(tmp[1]);
+ dst[2] = ubyte_to_float(tmp[2]);
+ dst[3] = ubyte_to_float(tmp[3]);
+}
+
+void
+util_format_dxt3_rgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp[4];
+ util_format_dxt3_rgba_fetch(0, src, i, j, tmp);
+ dst[0] = ubyte_to_float(tmp[0]);
+ dst[1] = ubyte_to_float(tmp[1]);
+ dst[2] = ubyte_to_float(tmp[2]);
+ dst[3] = ubyte_to_float(tmp[3]);
+}
+
+void
+util_format_dxt5_rgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp[4];
+ util_format_dxt5_rgba_fetch(0, src, i, j, tmp);
+ dst[0] = ubyte_to_float(tmp[0]);
+ dst[1] = ubyte_to_float(tmp[1]);
+ dst[2] = ubyte_to_float(tmp[2]);
+ dst[3] = ubyte_to_float(tmp[3]);
+}
+
+
+/*
+ * Block decompression.
+ */
+
+static INLINE void
+util_format_dxtn_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height,
+ util_format_dxtn_fetch_t fetch,
+ unsigned block_size, boolean srgb)
+{
+ const unsigned bw = 4, bh = 4, comps = 4;
+ unsigned x, y, i, j;
+ for(y = 0; y < height; y += bh) {
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += bw) {
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*comps;
+ fetch(0, src, i, j, dst);
+ if (srgb) {
+ dst[0] = util_format_srgb_to_linear_8unorm(dst[0]);
+ dst[1] = util_format_srgb_to_linear_8unorm(dst[1]);
+ dst[2] = util_format_srgb_to_linear_8unorm(dst[2]);
+ }
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_dxt1_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt1_rgb_fetch,
+ 8, FALSE);
+}
+
+void
+util_format_dxt1_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt1_rgba_fetch,
+ 8, FALSE);
+}
+
+void
+util_format_dxt3_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt3_rgba_fetch,
+ 16, FALSE);
+}
+
+void
+util_format_dxt5_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt5_rgba_fetch,
+ 16, FALSE);
+}
+
+static INLINE void
+util_format_dxtn_rgb_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height,
+ util_format_dxtn_fetch_t fetch,
+ unsigned block_size, boolean srgb)
+{
+ unsigned x, y, i, j;
+ for(y = 0; y < height; y += 4) {
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ uint8_t tmp[4];
+ fetch(0, src, i, j, tmp);
+ if (srgb) {
+ dst[0] = util_format_srgb_8unorm_to_linear_float(tmp[0]);
+ dst[1] = util_format_srgb_8unorm_to_linear_float(tmp[1]);
+ dst[2] = util_format_srgb_8unorm_to_linear_float(tmp[2]);
+ }
+ else {
+ dst[0] = ubyte_to_float(tmp[0]);
+ dst[1] = ubyte_to_float(tmp[1]);
+ dst[2] = ubyte_to_float(tmp[2]);
+ }
+ dst[3] = ubyte_to_float(tmp[3]);
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_dxt1_rgb_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt1_rgb_fetch,
+ 8, FALSE);
+}
+
+void
+util_format_dxt1_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt1_rgba_fetch,
+ 8, FALSE);
+}
+
+void
+util_format_dxt3_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt3_rgba_fetch,
+ 16, FALSE);
+}
+
+void
+util_format_dxt5_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt5_rgba_fetch,
+ 16, FALSE);
+}
+
+
+/*
+ * Block compression.
+ */
+
+static INLINE void
+util_format_dxtn_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height,
+ enum util_format_dxtn format,
+ unsigned block_size, boolean srgb)
+{
+ const unsigned bw = 4, bh = 4, comps = 4;
+ unsigned x, y, i, j, k;
+ for(y = 0; y < height; y += bh) {
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += bw) {
+ uint8_t tmp[4][4][4]; /* [bh][bw][comps] */
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ uint8_t src_tmp;
+ for(k = 0; k < 3; ++k) {
+ src_tmp = src[(y + j)*src_stride/sizeof(*src) + (x+i)*comps + k];
+ if (srgb) {
+ tmp[j][i][k] = util_format_linear_to_srgb_8unorm(src_tmp);
+ }
+ else {
+ tmp[j][i][k] = src_tmp;
+ }
+ }
+ /* for sake of simplicity there's an unneeded 4th component for dxt1_rgb */
+ tmp[j][i][3] = src[(y + j)*src_stride/sizeof(*src) + (x+i)*comps + 3];
+ }
+ }
+ /* even for dxt1_rgb have 4 src comps */
+ util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], format, dst, 0);
+ dst += block_size;
+ }
+ dst_row += dst_stride / sizeof(*dst_row);
+ }
+
+}
+
+void
+util_format_dxt1_rgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src, src_stride,
+ width, height, UTIL_FORMAT_DXT1_RGB,
+ 8, FALSE);
+}
+
+void
+util_format_dxt1_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src, src_stride,
+ width, height, UTIL_FORMAT_DXT1_RGBA,
+ 8, FALSE);
+}
+
+void
+util_format_dxt3_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src, src_stride,
+ width, height, UTIL_FORMAT_DXT3_RGBA,
+ 16, FALSE);
+}
+
+void
+util_format_dxt5_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src, src_stride,
+ width, height, UTIL_FORMAT_DXT5_RGBA,
+ 16, FALSE);
+}
+
+static INLINE void
+util_format_dxtn_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src, unsigned src_stride,
+ unsigned width, unsigned height,
+ enum util_format_dxtn format,
+ unsigned block_size, boolean srgb)
+{
+ unsigned x, y, i, j, k;
+ for(y = 0; y < height; y += 4) {
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 4) {
+ uint8_t tmp[4][4][4];
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float src_tmp;
+ for(k = 0; k < 3; ++k) {
+ src_tmp = src[(y + j)*src_stride/sizeof(*src) + (x+i)*4 + k];
+ if (srgb) {
+ tmp[j][i][k] = util_format_linear_float_to_srgb_8unorm(src_tmp);
+ }
+ else {
+ tmp[j][i][k] = float_to_ubyte(src_tmp);
+ }
+ }
+ /* for sake of simplicity there's an unneeded 4th component for dxt1_rgb */
+ src_tmp = src[(y + j)*src_stride/sizeof(*src) + (x+i)*4 + 3];
+ tmp[j][i][3] = float_to_ubyte(src_tmp);
+ }
+ }
+ util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], format, dst, 0);
+ dst += block_size;
+ }
+ dst_row += 4*dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_dxt1_rgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_float(dst_row, dst_stride, src, src_stride,
+ width, height, UTIL_FORMAT_DXT1_RGB,
+ 8, FALSE);
+}
+
+void
+util_format_dxt1_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_float(dst_row, dst_stride, src, src_stride,
+ width, height, UTIL_FORMAT_DXT1_RGBA,
+ 8, FALSE);
+}
+
+void
+util_format_dxt3_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_float(dst_row, dst_stride, src, src_stride,
+ width, height, UTIL_FORMAT_DXT3_RGBA,
+ 16, FALSE);
+}
+
+void
+util_format_dxt5_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_float(dst_row, dst_stride, src, src_stride,
+ width, height, UTIL_FORMAT_DXT5_RGBA,
+ 16, FALSE);
+}
+
+
+/*
+ * SRGB variants.
+ */
+
+void
+util_format_dxt1_srgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp[4];
+ util_format_dxt1_rgb_fetch(0, src, i, j, tmp);
+ dst[0] = util_format_srgb_to_linear_8unorm(tmp[0]);
+ dst[1] = util_format_srgb_to_linear_8unorm(tmp[1]);
+ dst[2] = util_format_srgb_to_linear_8unorm(tmp[2]);
+ dst[3] = 255;
+}
+
+void
+util_format_dxt1_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp[4];
+ util_format_dxt1_rgba_fetch(0, src, i, j, tmp);
+ dst[0] = util_format_srgb_to_linear_8unorm(tmp[0]);
+ dst[1] = util_format_srgb_to_linear_8unorm(tmp[1]);
+ dst[2] = util_format_srgb_to_linear_8unorm(tmp[2]);
+ dst[3] = tmp[3];
+}
+
+void
+util_format_dxt3_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp[4];
+ util_format_dxt3_rgba_fetch(0, src, i, j, tmp);
+ dst[0] = util_format_srgb_to_linear_8unorm(tmp[0]);
+ dst[1] = util_format_srgb_to_linear_8unorm(tmp[1]);
+ dst[2] = util_format_srgb_to_linear_8unorm(tmp[2]);
+ dst[3] = tmp[3];
+}
+
+void
+util_format_dxt5_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp[4];
+ util_format_dxt5_rgba_fetch(0, src, i, j, tmp);
+ dst[0] = util_format_srgb_to_linear_8unorm(tmp[0]);
+ dst[1] = util_format_srgb_to_linear_8unorm(tmp[1]);
+ dst[2] = util_format_srgb_to_linear_8unorm(tmp[2]);
+ dst[3] = tmp[3];
+}
+
+void
+util_format_dxt1_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp[4];
+ util_format_dxt1_rgb_fetch(0, src, i, j, tmp);
+ dst[0] = util_format_srgb_8unorm_to_linear_float(tmp[0]);
+ dst[1] = util_format_srgb_8unorm_to_linear_float(tmp[1]);
+ dst[2] = util_format_srgb_8unorm_to_linear_float(tmp[2]);
+ dst[3] = 1.0f;
+}
+
+void
+util_format_dxt1_srgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp[4];
+ util_format_dxt1_rgba_fetch(0, src, i, j, tmp);
+ dst[0] = util_format_srgb_8unorm_to_linear_float(tmp[0]);
+ dst[1] = util_format_srgb_8unorm_to_linear_float(tmp[1]);
+ dst[2] = util_format_srgb_8unorm_to_linear_float(tmp[2]);
+ dst[3] = ubyte_to_float(tmp[3]);
+}
+
+void
+util_format_dxt3_srgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp[4];
+ util_format_dxt3_rgba_fetch(0, src, i, j, tmp);
+ dst[0] = util_format_srgb_8unorm_to_linear_float(tmp[0]);
+ dst[1] = util_format_srgb_8unorm_to_linear_float(tmp[1]);
+ dst[2] = util_format_srgb_8unorm_to_linear_float(tmp[2]);
+ dst[3] = ubyte_to_float(tmp[3]);
+}
+
+void
+util_format_dxt5_srgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp[4];
+ util_format_dxt5_rgba_fetch(0, src, i, j, tmp);
+ dst[0] = util_format_srgb_8unorm_to_linear_float(tmp[0]);
+ dst[1] = util_format_srgb_8unorm_to_linear_float(tmp[1]);
+ dst[2] = util_format_srgb_8unorm_to_linear_float(tmp[2]);
+ dst[3] = ubyte_to_float(tmp[3]);
+}
+
+void
+util_format_dxt1_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt1_rgb_fetch,
+ 8, TRUE);
+}
+
+void
+util_format_dxt1_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt1_rgba_fetch,
+ 8, TRUE);
+}
+
+void
+util_format_dxt3_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt3_rgba_fetch,
+ 16, TRUE);
+}
+
+void
+util_format_dxt5_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt5_rgba_fetch,
+ 16, TRUE);
+}
+
+void
+util_format_dxt1_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt1_rgb_fetch,
+ 8, TRUE);
+}
+
+void
+util_format_dxt1_srgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt1_rgba_fetch,
+ 8, TRUE);
+}
+
+void
+util_format_dxt3_srgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt3_rgba_fetch,
+ 16, TRUE);
+}
+
+void
+util_format_dxt5_srgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height,
+ util_format_dxt5_rgba_fetch,
+ 16, TRUE);
+}
+
+void
+util_format_dxt1_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride,
+ width, height, UTIL_FORMAT_DXT1_RGB,
+ 8, TRUE);
+}
+
+void
+util_format_dxt1_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride,
+ width, height, UTIL_FORMAT_DXT1_RGBA,
+ 8, TRUE);
+}
+
+void
+util_format_dxt3_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride,
+ width, height, UTIL_FORMAT_DXT3_RGBA,
+ 16, TRUE);
+}
+
+void
+util_format_dxt5_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride,
+ width, height, UTIL_FORMAT_DXT5_RGBA,
+ 16, TRUE);
+}
+
+void
+util_format_dxt1_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_float(dst_row, dst_stride, src_row, src_stride,
+ width, height, UTIL_FORMAT_DXT1_RGB,
+ 8, TRUE);
+}
+
+void
+util_format_dxt1_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_float(dst_row, dst_stride, src_row, src_stride,
+ width, height, UTIL_FORMAT_DXT1_RGBA,
+ 8, TRUE);
+}
+
+void
+util_format_dxt3_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_float(dst_row, dst_stride, src_row, src_stride,
+ width, height, UTIL_FORMAT_DXT3_RGBA,
+ 16, TRUE);
+}
+
+void
+util_format_dxt5_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_dxtn_pack_rgba_float(dst_row, dst_stride, src_row, src_stride,
+ width, height, UTIL_FORMAT_DXT5_RGBA,
+ 16, TRUE);
+}
+
diff --git a/src/minigallium/auxiliary/util/u_format_s3tc.h b/src/minigallium/auxiliary/util/u_format_s3tc.h
new file mode 100644
index 0000000..97770ab
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_s3tc.h
@@ -0,0 +1,218 @@
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+
+#ifndef U_FORMAT_S3TC_H_
+#define U_FORMAT_S3TC_H_
+
+
+#include "pipe/p_compiler.h"
+
+
+enum util_format_dxtn {
+ UTIL_FORMAT_DXT1_RGB = 0x83F0,
+ UTIL_FORMAT_DXT1_RGBA = 0x83F1,
+ UTIL_FORMAT_DXT3_RGBA = 0x83F2,
+ UTIL_FORMAT_DXT5_RGBA = 0x83F3
+};
+
+
+typedef void
+(*util_format_dxtn_fetch_t)( int src_stride,
+ const uint8_t *src,
+ int col, int row,
+ uint8_t *dst );
+
+typedef void
+(*util_format_dxtn_pack_t)( int src_comps,
+ int width, int height,
+ const uint8_t *src,
+ enum util_format_dxtn dst_format,
+ uint8_t *dst,
+ int dst_stride);
+
+extern boolean util_format_s3tc_enabled;
+
+extern util_format_dxtn_fetch_t util_format_dxt1_rgb_fetch;
+extern util_format_dxtn_fetch_t util_format_dxt1_rgba_fetch;
+extern util_format_dxtn_fetch_t util_format_dxt3_rgba_fetch;
+extern util_format_dxtn_fetch_t util_format_dxt5_rgba_fetch;
+
+extern util_format_dxtn_pack_t util_format_dxtn_pack;
+
+
+void
+util_format_s3tc_init(void);
+
+
+void
+util_format_dxt1_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_rgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_rgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_dxt1_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_dxt3_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt3_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt3_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_dxt5_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt5_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt5_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_dxt1_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_srgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_dxt1_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_dxt3_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt3_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt3_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_dxt5_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt5_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt5_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+void
+util_format_dxt1_rgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_rgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_rgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_dxt1_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_rgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_dxt3_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt3_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt3_rgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_dxt5_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt5_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt5_rgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_dxt1_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_dxt1_srgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt1_srgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_dxt3_srgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt3_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt3_srgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_dxt5_srgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt5_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_dxt5_srgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+#endif /* U_FORMAT_S3TC_H_ */
diff --git a/src/minigallium/auxiliary/util/u_format_srgb.c b/src/minigallium/auxiliary/util/u_format_srgb.c
new file mode 100644
index 0000000..2649089
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_srgb.c
@@ -0,0 +1,178 @@
+/* This file is autogenerated by u_format_srgb.py. Do not edit directly. */
+
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * SRGB translation.
+ *
+ * @author Brian Paul <brianp@vmware.com>
+ * @author Michal Krol <michal@vmware.com>
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+#include "u_format_srgb.h"
+
+const float
+util_format_srgb_8unorm_to_linear_float_table[256] = {
+ 0.0000000e+00, 3.0352698e-04, 6.0705397e-04, 9.1058095e-04,
+ 1.2141079e-03, 1.5176349e-03, 1.8211619e-03, 2.1246889e-03,
+ 2.4282159e-03, 2.7317429e-03, 3.0352698e-03, 3.3465358e-03,
+ 3.6765073e-03, 4.0247170e-03, 4.3914420e-03, 4.7769535e-03,
+ 5.1815167e-03, 5.6053916e-03, 6.0488330e-03, 6.5120908e-03,
+ 6.9954102e-03, 7.4990320e-03, 8.0231930e-03, 8.5681256e-03,
+ 9.1340587e-03, 9.7212173e-03, 1.0329823e-02, 1.0960094e-02,
+ 1.1612245e-02, 1.2286488e-02, 1.2983032e-02, 1.3702083e-02,
+ 1.4443844e-02, 1.5208514e-02, 1.5996293e-02, 1.6807376e-02,
+ 1.7641954e-02, 1.8500220e-02, 1.9382361e-02, 2.0288563e-02,
+ 2.1219010e-02, 2.2173885e-02, 2.3153366e-02, 2.4157632e-02,
+ 2.5186860e-02, 2.6241222e-02, 2.7320892e-02, 2.8426040e-02,
+ 2.9556834e-02, 3.0713444e-02, 3.1896033e-02, 3.3104767e-02,
+ 3.4339807e-02, 3.5601315e-02, 3.6889450e-02, 3.8204372e-02,
+ 3.9546235e-02, 4.0915197e-02, 4.2311411e-02, 4.3735029e-02,
+ 4.5186204e-02, 4.6665086e-02, 4.8171824e-02, 4.9706566e-02,
+ 5.1269458e-02, 5.2860647e-02, 5.4480276e-02, 5.6128490e-02,
+ 5.7805430e-02, 5.9511238e-02, 6.1246054e-02, 6.3010018e-02,
+ 6.4803267e-02, 6.6625939e-02, 6.8478170e-02, 7.0360096e-02,
+ 7.2271851e-02, 7.4213568e-02, 7.6185381e-02, 7.8187422e-02,
+ 8.0219820e-02, 8.2282707e-02, 8.4376212e-02, 8.6500462e-02,
+ 8.8655586e-02, 9.0841711e-02, 9.3058963e-02, 9.5307467e-02,
+ 9.7587347e-02, 9.9898728e-02, 1.0224173e-01, 1.0461648e-01,
+ 1.0702310e-01, 1.0946171e-01, 1.1193243e-01, 1.1443537e-01,
+ 1.1697067e-01, 1.1953843e-01, 1.2213877e-01, 1.2477182e-01,
+ 1.2743768e-01, 1.3013648e-01, 1.3286832e-01, 1.3563333e-01,
+ 1.3843162e-01, 1.4126329e-01, 1.4412847e-01, 1.4702727e-01,
+ 1.4995979e-01, 1.5292615e-01, 1.5592646e-01, 1.5896084e-01,
+ 1.6202938e-01, 1.6513219e-01, 1.6826940e-01, 1.7144110e-01,
+ 1.7464740e-01, 1.7788842e-01, 1.8116424e-01, 1.8447499e-01,
+ 1.8782077e-01, 1.9120168e-01, 1.9461783e-01, 1.9806932e-01,
+ 2.0155625e-01, 2.0507874e-01, 2.0863687e-01, 2.1223076e-01,
+ 2.1586050e-01, 2.1952620e-01, 2.2322796e-01, 2.2696587e-01,
+ 2.3074005e-01, 2.3455058e-01, 2.3839757e-01, 2.4228112e-01,
+ 2.4620133e-01, 2.5015828e-01, 2.5415209e-01, 2.5818285e-01,
+ 2.6225066e-01, 2.6635560e-01, 2.7049779e-01, 2.7467731e-01,
+ 2.7889426e-01, 2.8314874e-01, 2.8744084e-01, 2.9177065e-01,
+ 2.9613827e-01, 3.0054379e-01, 3.0498731e-01, 3.0946892e-01,
+ 3.1398871e-01, 3.1854678e-01, 3.2314321e-01, 3.2777810e-01,
+ 3.3245154e-01, 3.3716362e-01, 3.4191442e-01, 3.4670406e-01,
+ 3.5153260e-01, 3.5640014e-01, 3.6130678e-01, 3.6625260e-01,
+ 3.7123768e-01, 3.7626212e-01, 3.8132601e-01, 3.8642943e-01,
+ 3.9157248e-01, 3.9675523e-01, 4.0197778e-01, 4.0724021e-01,
+ 4.1254261e-01, 4.1788507e-01, 4.2326767e-01, 4.2869050e-01,
+ 4.3415364e-01, 4.3965717e-01, 4.4520119e-01, 4.5078578e-01,
+ 4.5641102e-01, 4.6207700e-01, 4.6778380e-01, 4.7353150e-01,
+ 4.7932018e-01, 4.8514994e-01, 4.9102085e-01, 4.9693300e-01,
+ 5.0288646e-01, 5.0888132e-01, 5.1491767e-01, 5.2099557e-01,
+ 5.2711513e-01, 5.3327640e-01, 5.3947949e-01, 5.4572446e-01,
+ 5.5201140e-01, 5.5834039e-01, 5.6471151e-01, 5.7112483e-01,
+ 5.7758044e-01, 5.8407842e-01, 5.9061884e-01, 5.9720179e-01,
+ 6.0382734e-01, 6.1049557e-01, 6.1720656e-01, 6.2396039e-01,
+ 6.3075714e-01, 6.3759687e-01, 6.4447968e-01, 6.5140564e-01,
+ 6.5837482e-01, 6.6538730e-01, 6.7244316e-01, 6.7954247e-01,
+ 6.8668531e-01, 6.9387176e-01, 7.0110189e-01, 7.0837578e-01,
+ 7.1569350e-01, 7.2305513e-01, 7.3046074e-01, 7.3791041e-01,
+ 7.4540421e-01, 7.5294222e-01, 7.6052450e-01, 7.6815115e-01,
+ 7.7582222e-01, 7.8353779e-01, 7.9129794e-01, 7.9910274e-01,
+ 8.0695226e-01, 8.1484657e-01, 8.2278575e-01, 8.3076988e-01,
+ 8.3879901e-01, 8.4687323e-01, 8.5499261e-01, 8.6315721e-01,
+ 8.7136712e-01, 8.7962240e-01, 8.8792312e-01, 8.9626935e-01,
+ 9.0466117e-01, 9.1309865e-01, 9.2158186e-01, 9.3011086e-01,
+ 9.3868573e-01, 9.4730654e-01, 9.5597335e-01, 9.6468625e-01,
+ 9.7344529e-01, 9.8225055e-01, 9.9110210e-01, 1.0000000e+00,
+};
+
+const uint8_t
+util_format_srgb_to_linear_8unorm_table[256] = {
+ 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3,
+ 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7,
+ 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13,
+ 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 17, 18, 18, 19, 19, 20,
+ 20, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 27, 27, 28, 29, 29,
+ 30, 30, 31, 32, 32, 33, 34, 35, 35, 36, 37, 37, 38, 39, 40, 41,
+ 41, 42, 43, 44, 45, 45, 46, 47, 48, 49, 50, 51, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 82, 84, 85, 86, 87, 88,
+ 90, 91, 92, 93, 95, 96, 97, 99, 100, 101, 103, 104, 105, 107, 108, 109,
+ 111, 112, 114, 115, 116, 118, 119, 121, 122, 124, 125, 127, 128, 130, 131, 133,
+ 134, 136, 138, 139, 141, 142, 144, 146, 147, 149, 151, 152, 154, 156, 157, 159,
+ 161, 163, 164, 166, 168, 170, 171, 173, 175, 177, 179, 181, 183, 184, 186, 188,
+ 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220,
+ 222, 224, 226, 229, 231, 233, 235, 237, 239, 242, 244, 246, 248, 250, 253, 255,
+};
+
+const uint8_t
+util_format_linear_to_srgb_8unorm_table[256] = {
+ 0, 13, 22, 28, 34, 38, 42, 46, 50, 53, 56, 59, 61, 64, 66, 69,
+ 71, 73, 75, 77, 79, 81, 83, 85, 86, 88, 90, 92, 93, 95, 96, 98,
+ 99, 101, 102, 104, 105, 106, 108, 109, 110, 112, 113, 114, 115, 117, 118, 119,
+ 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 148, 149, 150, 151,
+ 152, 153, 154, 155, 155, 156, 157, 158, 159, 159, 160, 161, 162, 163, 163, 164,
+ 165, 166, 167, 167, 168, 169, 170, 170, 171, 172, 173, 173, 174, 175, 175, 176,
+ 177, 178, 178, 179, 180, 180, 181, 182, 182, 183, 184, 185, 185, 186, 187, 187,
+ 188, 189, 189, 190, 190, 191, 192, 192, 193, 194, 194, 195, 196, 196, 197, 197,
+ 198, 199, 199, 200, 200, 201, 202, 202, 203, 203, 204, 205, 205, 206, 206, 207,
+ 208, 208, 209, 209, 210, 210, 211, 212, 212, 213, 213, 214, 214, 215, 215, 216,
+ 216, 217, 218, 218, 219, 219, 220, 220, 221, 221, 222, 222, 223, 223, 224, 224,
+ 225, 226, 226, 227, 227, 228, 228, 229, 229, 230, 230, 231, 231, 232, 232, 233,
+ 233, 234, 234, 235, 235, 236, 236, 237, 237, 238, 238, 238, 239, 239, 240, 240,
+ 241, 241, 242, 242, 243, 243, 244, 244, 245, 245, 246, 246, 246, 247, 247, 248,
+ 248, 249, 249, 250, 250, 251, 251, 251, 252, 252, 253, 253, 254, 254, 255, 255,
+};
+
+const unsigned
+util_format_linear_to_srgb_helper_table[104] = {
+ 0x0073000d, 0x007a000d, 0x0080000d, 0x0087000d,
+ 0x008d000d, 0x0094000d, 0x009a000d, 0x00a1000d,
+ 0x00a7001a, 0x00b4001a, 0x00c1001a, 0x00ce001a,
+ 0x00da001a, 0x00e7001a, 0x00f4001a, 0x0101001a,
+ 0x010e0033, 0x01280033, 0x01410033, 0x015b0033,
+ 0x01750033, 0x018f0033, 0x01a80033, 0x01c20033,
+ 0x01dc0067, 0x020f0067, 0x02430067, 0x02760067,
+ 0x02aa0067, 0x02dd0067, 0x03110067, 0x03440067,
+ 0x037800ce, 0x03df00ce, 0x044600ce, 0x04ad00ce,
+ 0x051400ce, 0x057b00c5, 0x05dd00bc, 0x063b00b5,
+ 0x06970158, 0x07420142, 0x07e30130, 0x087b0120,
+ 0x090b0112, 0x09940106, 0x0a1700fc, 0x0a9500f2,
+ 0x0b0f01cb, 0x0bf401ae, 0x0ccb0195, 0x0d950180,
+ 0x0e56016e, 0x0f0d015e, 0x0fbc0150, 0x10630143,
+ 0x11070264, 0x1238023e, 0x1357021d, 0x14660201,
+ 0x156601e9, 0x165a01d3, 0x174401c0, 0x182401af,
+ 0x18fe0331, 0x1a9602fe, 0x1c1502d2, 0x1d7e02ad,
+ 0x1ed4028d, 0x201a0270, 0x21520256, 0x227d0240,
+ 0x239f0443, 0x25c003fe, 0x27bf03c4, 0x29a10392,
+ 0x2b6a0367, 0x2d1d0341, 0x2ebe031f, 0x304d0300,
+ 0x31d105b0, 0x34a80555, 0x37520507, 0x39d504c5,
+ 0x3c37048b, 0x3e7c0458, 0x40a8042a, 0x42bd0401,
+ 0x44c20798, 0x488e071e, 0x4c1c06b6, 0x4f76065d,
+ 0x52a50610, 0x55ac05cc, 0x5892058f, 0x5b590559,
+ 0x5e0c0a23, 0x631c0980, 0x67db08f6, 0x6c55087f,
+ 0x70940818, 0x74a007bd, 0x787d076c, 0x7c330723,
+};
+
diff --git a/src/minigallium/auxiliary/util/u_format_srgb.h b/src/minigallium/auxiliary/util/u_format_srgb.h
new file mode 100644
index 0000000..740a919
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_srgb.h
@@ -0,0 +1,147 @@
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * SRGB translation.
+ *
+ * @author Brian Paul <brianp@vmware.com>
+ * @author Michal Krol <michal@vmware.com>
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+#ifndef U_FORMAT_SRGB_H_
+#define U_FORMAT_SRGB_H_
+
+
+#include "pipe/p_compiler.h"
+#include "u_pack_color.h"
+#include "u_math.h"
+
+
+extern const float
+util_format_srgb_8unorm_to_linear_float_table[256];
+
+extern const uint8_t
+util_format_srgb_to_linear_8unorm_table[256];
+
+extern const uint8_t
+util_format_linear_to_srgb_8unorm_table[256];
+
+extern const unsigned
+util_format_linear_to_srgb_helper_table[104];
+
+
+/**
+ * Convert a unclamped linear float to srgb value in the [0,255].
+ */
+static INLINE uint8_t
+util_format_linear_float_to_srgb_8unorm(float x)
+{
+ /* this would be exact but (probably much) slower */
+ if (0) {
+ if (x >= 1.0f)
+ return 255;
+ else if (x >= 0.0031308f)
+ return float_to_ubyte(1.055f * powf(x, 0.41666666f) - 0.055f);
+ else if (x > 0.0f)
+ return float_to_ubyte(12.92f * x);
+ else
+ return 0;
+ }
+ else {
+ /*
+ * This is taken from https://gist.github.com/rygorous/2203834
+ * Use LUT and do linear interpolation.
+ */
+ union fi almostone, minval, f;
+ unsigned tab, bias, scale, t;
+
+ almostone.ui = 0x3f7fffff;
+ minval.ui = (127-13) << 23;
+
+ /*
+ * Clamp to [2^(-13), 1-eps]; these two values map to 0 and 1, respectively.
+ * The tests are carefully written so that NaNs map to 0, same as in the
+ * reference implementation.
+ */
+ if (!(x > minval.f))
+ x = minval.f;
+ if (x > almostone.f)
+ x = almostone.f;
+
+ /* Do the table lookup and unpack bias, scale */
+ f.f = x;
+ tab = util_format_linear_to_srgb_helper_table[(f.ui - minval.ui) >> 20];
+ bias = (tab >> 16) << 9;
+ scale = tab & 0xffff;
+
+ /* Grab next-highest mantissa bits and perform linear interpolation */
+ t = (f.ui >> 12) & 0xff;
+ return (uint8_t) ((bias + scale*t) >> 16);
+ }
+}
+
+
+/**
+ * Convert an 8-bit sRGB value from non-linear space to a
+ * linear RGB value in [0, 1].
+ * Implemented with a 256-entry lookup table.
+ */
+static INLINE float
+util_format_srgb_8unorm_to_linear_float(uint8_t x)
+{
+ return util_format_srgb_8unorm_to_linear_float_table[x];
+}
+
+
+/*
+ * XXX These 2 functions probably don't make a lot of sense (but lots
+ * of potential callers which most likely all don't make sense neither)
+ */
+
+/**
+ * Convert a 8bit normalized value from linear to srgb.
+ */
+static INLINE uint8_t
+util_format_linear_to_srgb_8unorm(uint8_t x)
+{
+ return util_format_linear_to_srgb_8unorm_table[x];
+}
+
+
+/**
+ * Convert a 8bit normalized value from srgb to linear.
+ */
+static INLINE uint8_t
+util_format_srgb_to_linear_8unorm(uint8_t x)
+{
+ return util_format_srgb_to_linear_8unorm_table[x];
+}
+
+
+#endif /* U_FORMAT_SRGB_H_ */
diff --git a/src/minigallium/auxiliary/util/u_format_srgb.py b/src/minigallium/auxiliary/util/u_format_srgb.py
new file mode 100644
index 0000000..cd63ae7
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_srgb.py
@@ -0,0 +1,100 @@
+#!/usr/bin/env python
+
+CopyRight = '''
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * SRGB translation.
+ *
+ * @author Brian Paul <brianp@vmware.com>
+ * @author Michal Krol <michal@vmware.com>
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+'''
+
+
+import math
+
+
+def srgb_to_linear(x):
+ if x <= 0.04045:
+ return x / 12.92
+ else:
+ return math.pow((x + 0.055) / 1.055, 2.4)
+
+
+def linear_to_srgb(x):
+ if x >= 0.0031308:
+ return 1.055 * math.pow(x, 0.41666) - 0.055
+ else:
+ return 12.92 * x
+
+def generate_srgb_tables():
+ print 'const float'
+ print 'util_format_srgb_8unorm_to_linear_float_table[256] = {'
+ for j in range(0, 256, 4):
+ print ' ',
+ for i in range(j, j + 4):
+ print '%.7e,' % (srgb_to_linear(i / 255.0),),
+ print
+ print '};'
+ print
+ print 'const uint8_t'
+ print 'util_format_srgb_to_linear_8unorm_table[256] = {'
+ for j in range(0, 256, 16):
+ print ' ',
+ for i in range(j, j + 16):
+ print '%3u,' % (int(srgb_to_linear(i / 255.0) * 255.0 + 0.5),),
+ print
+ print '};'
+ print
+ print 'const uint8_t'
+ print 'util_format_linear_to_srgb_8unorm_table[256] = {'
+ for j in range(0, 256, 16):
+ print ' ',
+ for i in range(j, j + 16):
+ print '%3u,' % (int(linear_to_srgb(i / 255.0) * 255.0 + 0.5),),
+ print
+ print '};'
+ print
+
+
+def main():
+ print '/* This file is autogenerated by u_format_srgb.py. Do not edit directly. */'
+ print
+ # This will print the copyright message on the top of this file
+ print CopyRight.strip()
+ print
+ print '#include "u_format_srgb.h"'
+ print
+ generate_srgb_tables()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/src/minigallium/auxiliary/util/u_format_table.c b/src/minigallium/auxiliary/util/u_format_table.c
new file mode 100644
index 0000000..1cb0484
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_table.c
@@ -0,0 +1,33985 @@
+/* This file is autogenerated by u_format_table.py from u_format.csv. Do not edit directly. */
+
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "u_format.h"
+#include "u_format_s3tc.h"
+#include "u_format_rgtc.h"
+#include "u_format_latc.h"
+#include "u_format_etc.h"
+
+
+#include "pipe/p_compiler.h"
+#include "u_math.h"
+#include "u_half.h"
+#include "u_format.h"
+#include "u_format_other.h"
+#include "u_format_srgb.h"
+#include "u_format_yuv.h"
+#include "u_format_zs.h"
+
+union util_format_none {
+ uint8_t value;
+ struct {
+ uint8_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_none_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t r;
+ r = value;
+ dst[0] = (float)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_none_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)CLAMP(src[0], 0, 255);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_none_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t r;
+ r = value;
+ dst[0] = (float)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_none_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t r;
+ r = value;
+ dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_none_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)(((uint32_t)src[0]) * 0x1 / 0xff);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b8g8r8a8_unorm {
+ uint32_t value;
+ struct {
+ uint8_t b;
+ uint8_t g;
+ uint8_t r;
+ uint8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_b8g8r8a8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ uint32_t a;
+ b = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ r = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b8g8r8a8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (float_to_ubyte(src[2])) & 0xff;
+ value |= ((float_to_ubyte(src[1])) & 0xff) << 8;
+ value |= ((float_to_ubyte(src[0])) & 0xff) << 16;
+ value |= (float_to_ubyte(src[3])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b8g8r8a8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ uint32_t a;
+ b = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ r = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+}
+
+static INLINE void
+util_format_b8g8r8a8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ uint32_t a;
+ b = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ r = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = r; /* r */
+ dst[1] = g; /* g */
+ dst[2] = b; /* b */
+ dst[3] = a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b8g8r8a8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (src[2]) & 0xff;
+ value |= ((src[1]) & 0xff) << 8;
+ value |= ((src[0]) & 0xff) << 16;
+ value |= (src[3]) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b8g8r8x8_unorm {
+ uint32_t value;
+ struct {
+ uint8_t b;
+ uint8_t g;
+ uint8_t r;
+ uint8_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_b8g8r8x8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ b = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ r = (value >> 16) & 0xff;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b8g8r8x8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (float_to_ubyte(src[2])) & 0xff;
+ value |= ((float_to_ubyte(src[1])) & 0xff) << 8;
+ value |= ((float_to_ubyte(src[0])) & 0xff) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b8g8r8x8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ b = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ r = (value >> 16) & 0xff;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_b8g8r8x8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ b = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ r = (value >> 16) & 0xff;
+ dst[0] = r; /* r */
+ dst[1] = g; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b8g8r8x8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (src[2]) & 0xff;
+ value |= ((src[1]) & 0xff) << 8;
+ value |= ((src[0]) & 0xff) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a8r8g8b8_unorm {
+ uint32_t value;
+ struct {
+ uint8_t a;
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_a8r8g8b8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t a;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ a = (value) & 0xff;
+ r = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ b = value >> 24;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8r8g8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (float_to_ubyte(src[3])) & 0xff;
+ value |= ((float_to_ubyte(src[0])) & 0xff) << 8;
+ value |= ((float_to_ubyte(src[1])) & 0xff) << 16;
+ value |= (float_to_ubyte(src[2])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a8r8g8b8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t a;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ a = (value) & 0xff;
+ r = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ b = value >> 24;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+}
+
+static INLINE void
+util_format_a8r8g8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t a;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ a = (value) & 0xff;
+ r = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ b = value >> 24;
+ dst[0] = r; /* r */
+ dst[1] = g; /* g */
+ dst[2] = b; /* b */
+ dst[3] = a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8r8g8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (src[3]) & 0xff;
+ value |= ((src[0]) & 0xff) << 8;
+ value |= ((src[1]) & 0xff) << 16;
+ value |= (src[2]) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_x8r8g8b8_unorm {
+ uint32_t value;
+ struct {
+ uint8_t x;
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_x8r8g8b8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ b = value >> 24;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_x8r8g8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((float_to_ubyte(src[0])) & 0xff) << 8;
+ value |= ((float_to_ubyte(src[1])) & 0xff) << 16;
+ value |= (float_to_ubyte(src[2])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_x8r8g8b8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ b = value >> 24;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_x8r8g8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ b = value >> 24;
+ dst[0] = r; /* r */
+ dst[1] = g; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_x8r8g8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((src[0]) & 0xff) << 8;
+ value |= ((src[1]) & 0xff) << 16;
+ value |= (src[2]) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a8b8g8r8_unorm {
+ uint32_t value;
+ struct {
+ uint8_t a;
+ uint8_t b;
+ uint8_t g;
+ uint8_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_a8b8g8r8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t a;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ a = (value) & 0xff;
+ b = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ r = value >> 24;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8b8g8r8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (float_to_ubyte(src[3])) & 0xff;
+ value |= ((float_to_ubyte(src[2])) & 0xff) << 8;
+ value |= ((float_to_ubyte(src[1])) & 0xff) << 16;
+ value |= (float_to_ubyte(src[0])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a8b8g8r8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t a;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ a = (value) & 0xff;
+ b = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ r = value >> 24;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+}
+
+static INLINE void
+util_format_a8b8g8r8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t a;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ a = (value) & 0xff;
+ b = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ r = value >> 24;
+ dst[0] = r; /* r */
+ dst[1] = g; /* g */
+ dst[2] = b; /* b */
+ dst[3] = a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8b8g8r8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (src[3]) & 0xff;
+ value |= ((src[2]) & 0xff) << 8;
+ value |= ((src[1]) & 0xff) << 16;
+ value |= (src[0]) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_x8b8g8r8_unorm {
+ uint32_t value;
+ struct {
+ uint8_t x;
+ uint8_t b;
+ uint8_t g;
+ uint8_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_x8b8g8r8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ b = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ r = value >> 24;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_x8b8g8r8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((float_to_ubyte(src[2])) & 0xff) << 8;
+ value |= ((float_to_ubyte(src[1])) & 0xff) << 16;
+ value |= (float_to_ubyte(src[0])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_x8b8g8r8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ b = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ r = value >> 24;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_x8b8g8r8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ b = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ r = value >> 24;
+ dst[0] = r; /* r */
+ dst[1] = g; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_x8b8g8r8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((src[2]) & 0xff) << 8;
+ value |= ((src[1]) & 0xff) << 16;
+ value |= (src[0]) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8x8_unorm {
+ uint32_t value;
+ struct {
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ uint8_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8x8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8x8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (float_to_ubyte(src[0])) & 0xff;
+ value |= ((float_to_ubyte(src[1])) & 0xff) << 8;
+ value |= ((float_to_ubyte(src[2])) & 0xff) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8x8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8x8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ dst[0] = r; /* r */
+ dst[1] = g; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8x8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (src[0]) & 0xff;
+ value |= ((src[1]) & 0xff) << 8;
+ value |= ((src[2]) & 0xff) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b5g5r5x1_unorm {
+ uint16_t value;
+ struct {
+ unsigned b:5;
+ unsigned g:5;
+ unsigned r:5;
+ unsigned x:1;
+ } chan;
+};
+
+static INLINE void
+util_format_b5g5r5x1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t b;
+ uint16_t g;
+ uint16_t r;
+ b = (value) & 0x1f;
+ g = (value >> 5) & 0x1f;
+ r = (value >> 10) & 0x1f;
+ dst[0] = (float)(r * (1.0f/0x1f)); /* r */
+ dst[1] = (float)(g * (1.0f/0x1f)); /* g */
+ dst[2] = (float)(b * (1.0f/0x1f)); /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b5g5r5x1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint16_t)util_iround(CLAMP(src[2], 0, 1) * 0x1f)) & 0x1f;
+ value |= (((uint16_t)util_iround(CLAMP(src[1], 0, 1) * 0x1f)) & 0x1f) << 5;
+ value |= (((uint16_t)util_iround(CLAMP(src[0], 0, 1) * 0x1f)) & 0x1f) << 10;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b5g5r5x1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t b;
+ uint16_t g;
+ uint16_t r;
+ b = (value) & 0x1f;
+ g = (value >> 5) & 0x1f;
+ r = (value >> 10) & 0x1f;
+ dst[0] = (float)(r * (1.0f/0x1f)); /* r */
+ dst[1] = (float)(g * (1.0f/0x1f)); /* g */
+ dst[2] = (float)(b * (1.0f/0x1f)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_b5g5r5x1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t b;
+ uint16_t g;
+ uint16_t r;
+ b = (value) & 0x1f;
+ g = (value >> 5) & 0x1f;
+ r = (value >> 10) & 0x1f;
+ dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0x1f); /* r */
+ dst[1] = (uint8_t)(((uint32_t)g) * 0xff / 0x1f); /* g */
+ dst[2] = (uint8_t)(((uint32_t)b) * 0xff / 0x1f); /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b5g5r5x1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint16_t)(src[2] >> 3)) & 0x1f;
+ value |= (((uint16_t)(src[1] >> 3)) & 0x1f) << 5;
+ value |= (((uint16_t)(src[0] >> 3)) & 0x1f) << 10;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b5g5r5a1_unorm {
+ uint16_t value;
+ struct {
+ unsigned b:5;
+ unsigned g:5;
+ unsigned r:5;
+ unsigned a:1;
+ } chan;
+};
+
+static INLINE void
+util_format_b5g5r5a1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t b;
+ uint16_t g;
+ uint16_t r;
+ uint16_t a;
+ b = (value) & 0x1f;
+ g = (value >> 5) & 0x1f;
+ r = (value >> 10) & 0x1f;
+ a = value >> 15;
+ dst[0] = (float)(r * (1.0f/0x1f)); /* r */
+ dst[1] = (float)(g * (1.0f/0x1f)); /* g */
+ dst[2] = (float)(b * (1.0f/0x1f)); /* b */
+ dst[3] = (float)(a * (1.0f/0x1)); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b5g5r5a1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint16_t)util_iround(CLAMP(src[2], 0, 1) * 0x1f)) & 0x1f;
+ value |= (((uint16_t)util_iround(CLAMP(src[1], 0, 1) * 0x1f)) & 0x1f) << 5;
+ value |= (((uint16_t)util_iround(CLAMP(src[0], 0, 1) * 0x1f)) & 0x1f) << 10;
+ value |= ((uint16_t)util_iround(CLAMP(src[3], 0, 1) * 0x1)) << 15;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b5g5r5a1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t b;
+ uint16_t g;
+ uint16_t r;
+ uint16_t a;
+ b = (value) & 0x1f;
+ g = (value >> 5) & 0x1f;
+ r = (value >> 10) & 0x1f;
+ a = value >> 15;
+ dst[0] = (float)(r * (1.0f/0x1f)); /* r */
+ dst[1] = (float)(g * (1.0f/0x1f)); /* g */
+ dst[2] = (float)(b * (1.0f/0x1f)); /* b */
+ dst[3] = (float)(a * (1.0f/0x1)); /* a */
+}
+
+static INLINE void
+util_format_b5g5r5a1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t b;
+ uint16_t g;
+ uint16_t r;
+ uint16_t a;
+ b = (value) & 0x1f;
+ g = (value >> 5) & 0x1f;
+ r = (value >> 10) & 0x1f;
+ a = value >> 15;
+ dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0x1f); /* r */
+ dst[1] = (uint8_t)(((uint32_t)g) * 0xff / 0x1f); /* g */
+ dst[2] = (uint8_t)(((uint32_t)b) * 0xff / 0x1f); /* b */
+ dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0x1); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b5g5r5a1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint16_t)(src[2] >> 3)) & 0x1f;
+ value |= (((uint16_t)(src[1] >> 3)) & 0x1f) << 5;
+ value |= (((uint16_t)(src[0] >> 3)) & 0x1f) << 10;
+ value |= ((uint16_t)(src[3] >> 7)) << 15;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b4g4r4a4_unorm {
+ uint16_t value;
+ struct {
+ unsigned b:4;
+ unsigned g:4;
+ unsigned r:4;
+ unsigned a:4;
+ } chan;
+};
+
+static INLINE void
+util_format_b4g4r4a4_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t b;
+ uint16_t g;
+ uint16_t r;
+ uint16_t a;
+ b = (value) & 0xf;
+ g = (value >> 4) & 0xf;
+ r = (value >> 8) & 0xf;
+ a = value >> 12;
+ dst[0] = (float)(r * (1.0f/0xf)); /* r */
+ dst[1] = (float)(g * (1.0f/0xf)); /* g */
+ dst[2] = (float)(b * (1.0f/0xf)); /* b */
+ dst[3] = (float)(a * (1.0f/0xf)); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b4g4r4a4_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint16_t)util_iround(CLAMP(src[2], 0, 1) * 0xf)) & 0xf;
+ value |= (((uint16_t)util_iround(CLAMP(src[1], 0, 1) * 0xf)) & 0xf) << 4;
+ value |= (((uint16_t)util_iround(CLAMP(src[0], 0, 1) * 0xf)) & 0xf) << 8;
+ value |= ((uint16_t)util_iround(CLAMP(src[3], 0, 1) * 0xf)) << 12;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b4g4r4a4_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t b;
+ uint16_t g;
+ uint16_t r;
+ uint16_t a;
+ b = (value) & 0xf;
+ g = (value >> 4) & 0xf;
+ r = (value >> 8) & 0xf;
+ a = value >> 12;
+ dst[0] = (float)(r * (1.0f/0xf)); /* r */
+ dst[1] = (float)(g * (1.0f/0xf)); /* g */
+ dst[2] = (float)(b * (1.0f/0xf)); /* b */
+ dst[3] = (float)(a * (1.0f/0xf)); /* a */
+}
+
+static INLINE void
+util_format_b4g4r4a4_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t b;
+ uint16_t g;
+ uint16_t r;
+ uint16_t a;
+ b = (value) & 0xf;
+ g = (value >> 4) & 0xf;
+ r = (value >> 8) & 0xf;
+ a = value >> 12;
+ dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0xf); /* r */
+ dst[1] = (uint8_t)(((uint32_t)g) * 0xff / 0xf); /* g */
+ dst[2] = (uint8_t)(((uint32_t)b) * 0xff / 0xf); /* b */
+ dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0xf); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b4g4r4a4_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint16_t)(src[2] >> 4)) & 0xf;
+ value |= (((uint16_t)(src[1] >> 4)) & 0xf) << 4;
+ value |= (((uint16_t)(src[0] >> 4)) & 0xf) << 8;
+ value |= ((uint16_t)(src[3] >> 4)) << 12;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b4g4r4x4_unorm {
+ uint16_t value;
+ struct {
+ unsigned b:4;
+ unsigned g:4;
+ unsigned r:4;
+ unsigned x:4;
+ } chan;
+};
+
+static INLINE void
+util_format_b4g4r4x4_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t b;
+ uint16_t g;
+ uint16_t r;
+ b = (value) & 0xf;
+ g = (value >> 4) & 0xf;
+ r = (value >> 8) & 0xf;
+ dst[0] = (float)(r * (1.0f/0xf)); /* r */
+ dst[1] = (float)(g * (1.0f/0xf)); /* g */
+ dst[2] = (float)(b * (1.0f/0xf)); /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b4g4r4x4_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint16_t)util_iround(CLAMP(src[2], 0, 1) * 0xf)) & 0xf;
+ value |= (((uint16_t)util_iround(CLAMP(src[1], 0, 1) * 0xf)) & 0xf) << 4;
+ value |= (((uint16_t)util_iround(CLAMP(src[0], 0, 1) * 0xf)) & 0xf) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b4g4r4x4_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t b;
+ uint16_t g;
+ uint16_t r;
+ b = (value) & 0xf;
+ g = (value >> 4) & 0xf;
+ r = (value >> 8) & 0xf;
+ dst[0] = (float)(r * (1.0f/0xf)); /* r */
+ dst[1] = (float)(g * (1.0f/0xf)); /* g */
+ dst[2] = (float)(b * (1.0f/0xf)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_b4g4r4x4_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t b;
+ uint16_t g;
+ uint16_t r;
+ b = (value) & 0xf;
+ g = (value >> 4) & 0xf;
+ r = (value >> 8) & 0xf;
+ dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0xf); /* r */
+ dst[1] = (uint8_t)(((uint32_t)g) * 0xff / 0xf); /* g */
+ dst[2] = (uint8_t)(((uint32_t)b) * 0xff / 0xf); /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b4g4r4x4_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint16_t)(src[2] >> 4)) & 0xf;
+ value |= (((uint16_t)(src[1] >> 4)) & 0xf) << 4;
+ value |= (((uint16_t)(src[0] >> 4)) & 0xf) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b5g6r5_unorm {
+ uint16_t value;
+ struct {
+ unsigned b:5;
+ unsigned g:6;
+ unsigned r:5;
+ } chan;
+};
+
+static INLINE void
+util_format_b5g6r5_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t b;
+ uint16_t g;
+ uint16_t r;
+ b = (value) & 0x1f;
+ g = (value >> 5) & 0x3f;
+ r = value >> 11;
+ dst[0] = (float)(r * (1.0f/0x1f)); /* r */
+ dst[1] = (float)(g * (1.0f/0x3f)); /* g */
+ dst[2] = (float)(b * (1.0f/0x1f)); /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b5g6r5_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint16_t)util_iround(CLAMP(src[2], 0, 1) * 0x1f)) & 0x1f;
+ value |= (((uint16_t)util_iround(CLAMP(src[1], 0, 1) * 0x3f)) & 0x3f) << 5;
+ value |= ((uint16_t)util_iround(CLAMP(src[0], 0, 1) * 0x1f)) << 11;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b5g6r5_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t b;
+ uint16_t g;
+ uint16_t r;
+ b = (value) & 0x1f;
+ g = (value >> 5) & 0x3f;
+ r = value >> 11;
+ dst[0] = (float)(r * (1.0f/0x1f)); /* r */
+ dst[1] = (float)(g * (1.0f/0x3f)); /* g */
+ dst[2] = (float)(b * (1.0f/0x1f)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_b5g6r5_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t b;
+ uint16_t g;
+ uint16_t r;
+ b = (value) & 0x1f;
+ g = (value >> 5) & 0x3f;
+ r = value >> 11;
+ dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0x1f); /* r */
+ dst[1] = (uint8_t)(((uint32_t)g) * 0xff / 0x3f); /* g */
+ dst[2] = (uint8_t)(((uint32_t)b) * 0xff / 0x1f); /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b5g6r5_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint16_t)(src[2] >> 3)) & 0x1f;
+ value |= (((uint16_t)(src[1] >> 2)) & 0x3f) << 5;
+ value |= ((uint16_t)(src[0] >> 3)) << 11;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r10g10b10a2_unorm {
+ uint32_t value;
+ struct {
+ unsigned r:10;
+ unsigned g:10;
+ unsigned b:10;
+ unsigned a:2;
+ } chan;
+};
+
+static INLINE void
+util_format_r10g10b10a2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ b = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (float)(r * (1.0f/0x3ff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x3ff)); /* g */
+ dst[2] = (float)(b * (1.0f/0x3ff)); /* b */
+ dst[3] = (float)(a * (1.0f/0x3)); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10a2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)util_iround(CLAMP(src[0], 0, 1) * 0x3ff)) & 0x3ff;
+ value |= (((uint32_t)util_iround(CLAMP(src[1], 0, 1) * 0x3ff)) & 0x3ff) << 10;
+ value |= (((uint32_t)util_iround(CLAMP(src[2], 0, 1) * 0x3ff)) & 0x3ff) << 20;
+ value |= ((uint32_t)util_iround(CLAMP(src[3], 0, 1) * 0x3)) << 30;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10a2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ b = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (float)(r * (1.0f/0x3ff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x3ff)); /* g */
+ dst[2] = (float)(b * (1.0f/0x3ff)); /* b */
+ dst[3] = (float)(a * (1.0f/0x3)); /* a */
+}
+
+static INLINE void
+util_format_r10g10b10a2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ b = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (uint8_t)(r >> 2); /* r */
+ dst[1] = (uint8_t)(g >> 2); /* g */
+ dst[2] = (uint8_t)(b >> 2); /* b */
+ dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0x3); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10a2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)(((uint32_t)src[0]) * 0x3ff / 0xff)) & 0x3ff;
+ value |= (((uint32_t)(((uint32_t)src[1]) * 0x3ff / 0xff)) & 0x3ff) << 10;
+ value |= (((uint32_t)(((uint32_t)src[2]) * 0x3ff / 0xff)) & 0x3ff) << 20;
+ value |= ((uint32_t)(src[3] >> 6)) << 30;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b10g10r10a2_unorm {
+ uint32_t value;
+ struct {
+ unsigned b:10;
+ unsigned g:10;
+ unsigned r:10;
+ unsigned a:2;
+ } chan;
+};
+
+static INLINE void
+util_format_b10g10r10a2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ uint32_t a;
+ b = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ r = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (float)(r * (1.0f/0x3ff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x3ff)); /* g */
+ dst[2] = (float)(b * (1.0f/0x3ff)); /* b */
+ dst[3] = (float)(a * (1.0f/0x3)); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10a2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)util_iround(CLAMP(src[2], 0, 1) * 0x3ff)) & 0x3ff;
+ value |= (((uint32_t)util_iround(CLAMP(src[1], 0, 1) * 0x3ff)) & 0x3ff) << 10;
+ value |= (((uint32_t)util_iround(CLAMP(src[0], 0, 1) * 0x3ff)) & 0x3ff) << 20;
+ value |= ((uint32_t)util_iround(CLAMP(src[3], 0, 1) * 0x3)) << 30;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10a2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ uint32_t a;
+ b = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ r = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (float)(r * (1.0f/0x3ff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x3ff)); /* g */
+ dst[2] = (float)(b * (1.0f/0x3ff)); /* b */
+ dst[3] = (float)(a * (1.0f/0x3)); /* a */
+}
+
+static INLINE void
+util_format_b10g10r10a2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ uint32_t a;
+ b = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ r = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (uint8_t)(r >> 2); /* r */
+ dst[1] = (uint8_t)(g >> 2); /* g */
+ dst[2] = (uint8_t)(b >> 2); /* b */
+ dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0x3); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10a2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)(((uint32_t)src[2]) * 0x3ff / 0xff)) & 0x3ff;
+ value |= (((uint32_t)(((uint32_t)src[1]) * 0x3ff / 0xff)) & 0x3ff) << 10;
+ value |= (((uint32_t)(((uint32_t)src[0]) * 0x3ff / 0xff)) & 0x3ff) << 20;
+ value |= ((uint32_t)(src[3] >> 6)) << 30;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b2g3r3_unorm {
+ uint8_t value;
+ struct {
+ unsigned b:2;
+ unsigned g:3;
+ unsigned r:3;
+ } chan;
+};
+
+static INLINE void
+util_format_b2g3r3_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t b;
+ uint8_t g;
+ uint8_t r;
+ b = (value) & 0x3;
+ g = (value >> 2) & 0x7;
+ r = value >> 5;
+ dst[0] = (float)(r * (1.0f/0x7)); /* r */
+ dst[1] = (float)(g * (1.0f/0x7)); /* g */
+ dst[2] = (float)(b * (1.0f/0x3)); /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b2g3r3_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= ((uint8_t)util_iround(CLAMP(src[2], 0, 1) * 0x3)) & 0x3;
+ value |= (((uint8_t)util_iround(CLAMP(src[1], 0, 1) * 0x7)) & 0x7) << 2;
+ value |= ((uint8_t)util_iround(CLAMP(src[0], 0, 1) * 0x7)) << 5;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b2g3r3_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t b;
+ uint8_t g;
+ uint8_t r;
+ b = (value) & 0x3;
+ g = (value >> 2) & 0x7;
+ r = value >> 5;
+ dst[0] = (float)(r * (1.0f/0x7)); /* r */
+ dst[1] = (float)(g * (1.0f/0x7)); /* g */
+ dst[2] = (float)(b * (1.0f/0x3)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_b2g3r3_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t b;
+ uint8_t g;
+ uint8_t r;
+ b = (value) & 0x3;
+ g = (value >> 2) & 0x7;
+ r = value >> 5;
+ dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0x7); /* r */
+ dst[1] = (uint8_t)(((uint32_t)g) * 0xff / 0x7); /* g */
+ dst[2] = (uint8_t)(((uint32_t)b) * 0xff / 0x3); /* b */
+ dst[3] = 255; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b2g3r3_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= ((uint8_t)(src[2] >> 6)) & 0x3;
+ value |= (((uint8_t)(src[1] >> 5)) & 0x7) << 2;
+ value |= ((uint8_t)(src[0] >> 5)) << 5;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l8_unorm {
+ uint8_t value;
+ struct {
+ uint8_t rgb;
+ } chan;
+};
+
+static INLINE void
+util_format_l8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgb;
+ rgb = value;
+ dst[0] = ubyte_to_float(rgb); /* r */
+ dst[1] = ubyte_to_float(rgb); /* g */
+ dst[2] = ubyte_to_float(rgb); /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= float_to_ubyte(src[0]);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgb;
+ rgb = value;
+ dst[0] = ubyte_to_float(rgb); /* r */
+ dst[1] = ubyte_to_float(rgb); /* g */
+ dst[2] = ubyte_to_float(rgb); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_l8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgb;
+ rgb = value;
+ dst[0] = rgb; /* r */
+ dst[1] = rgb; /* g */
+ dst[2] = rgb; /* b */
+ dst[3] = 255; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= src[0];
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a8_unorm {
+ uint8_t value;
+ struct {
+ uint8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_a8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t a;
+ a = value;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= float_to_ubyte(src[3]);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t a;
+ a = value;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+}
+
+static INLINE void
+util_format_a8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t a;
+ a = value;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = a; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= src[3];
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_i8_unorm {
+ uint8_t value;
+ struct {
+ uint8_t rgba;
+ } chan;
+};
+
+static INLINE void
+util_format_i8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgba;
+ rgba = value;
+ dst[0] = ubyte_to_float(rgba); /* r */
+ dst[1] = ubyte_to_float(rgba); /* g */
+ dst[2] = ubyte_to_float(rgba); /* b */
+ dst[3] = ubyte_to_float(rgba); /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= float_to_ubyte(src[0]);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_i8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgba;
+ rgba = value;
+ dst[0] = ubyte_to_float(rgba); /* r */
+ dst[1] = ubyte_to_float(rgba); /* g */
+ dst[2] = ubyte_to_float(rgba); /* b */
+ dst[3] = ubyte_to_float(rgba); /* a */
+}
+
+static INLINE void
+util_format_i8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgba;
+ rgba = value;
+ dst[0] = rgba; /* r */
+ dst[1] = rgba; /* g */
+ dst[2] = rgba; /* b */
+ dst[3] = rgba; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= src[0];
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l4a4_unorm {
+ uint8_t value;
+ struct {
+ unsigned rgb:4;
+ unsigned a:4;
+ } chan;
+};
+
+static INLINE void
+util_format_l4a4_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgb;
+ uint8_t a;
+ rgb = (value) & 0xf;
+ a = value >> 4;
+ dst[0] = (float)(rgb * (1.0f/0xf)); /* r */
+ dst[1] = (float)(rgb * (1.0f/0xf)); /* g */
+ dst[2] = (float)(rgb * (1.0f/0xf)); /* b */
+ dst[3] = (float)(a * (1.0f/0xf)); /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l4a4_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= ((uint8_t)util_iround(CLAMP(src[0], 0, 1) * 0xf)) & 0xf;
+ value |= ((uint8_t)util_iround(CLAMP(src[3], 0, 1) * 0xf)) << 4;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l4a4_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgb;
+ uint8_t a;
+ rgb = (value) & 0xf;
+ a = value >> 4;
+ dst[0] = (float)(rgb * (1.0f/0xf)); /* r */
+ dst[1] = (float)(rgb * (1.0f/0xf)); /* g */
+ dst[2] = (float)(rgb * (1.0f/0xf)); /* b */
+ dst[3] = (float)(a * (1.0f/0xf)); /* a */
+}
+
+static INLINE void
+util_format_l4a4_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgb;
+ uint8_t a;
+ rgb = (value) & 0xf;
+ a = value >> 4;
+ dst[0] = (uint8_t)(((uint32_t)rgb) * 0xff / 0xf); /* r */
+ dst[1] = (uint8_t)(((uint32_t)rgb) * 0xff / 0xf); /* g */
+ dst[2] = (uint8_t)(((uint32_t)rgb) * 0xff / 0xf); /* b */
+ dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0xf); /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l4a4_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= ((uint8_t)(src[0] >> 4)) & 0xf;
+ value |= ((uint8_t)(src[3] >> 4)) << 4;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l8a8_unorm {
+ uint16_t value;
+ struct {
+ uint8_t rgb;
+ uint8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_l8a8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgb;
+ uint16_t a;
+ rgb = (value) & 0xff;
+ a = value >> 8;
+ dst[0] = ubyte_to_float(rgb); /* r */
+ dst[1] = ubyte_to_float(rgb); /* g */
+ dst[2] = ubyte_to_float(rgb); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8a8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (float_to_ubyte(src[0])) & 0xff;
+ value |= (float_to_ubyte(src[3])) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l8a8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgb;
+ uint16_t a;
+ rgb = (value) & 0xff;
+ a = value >> 8;
+ dst[0] = ubyte_to_float(rgb); /* r */
+ dst[1] = ubyte_to_float(rgb); /* g */
+ dst[2] = ubyte_to_float(rgb); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+}
+
+static INLINE void
+util_format_l8a8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgb;
+ uint16_t a;
+ rgb = (value) & 0xff;
+ a = value >> 8;
+ dst[0] = rgb; /* r */
+ dst[1] = rgb; /* g */
+ dst[2] = rgb; /* b */
+ dst[3] = a; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8a8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (src[0]) & 0xff;
+ value |= (src[3]) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l16_unorm {
+ uint16_t value;
+ struct {
+ uint16_t rgb;
+ } chan;
+};
+
+static INLINE void
+util_format_l16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgb;
+ rgb = value;
+ dst[0] = (float)(rgb * (1.0f/0xffff)); /* r */
+ dst[1] = (float)(rgb * (1.0f/0xffff)); /* g */
+ dst[2] = (float)(rgb * (1.0f/0xffff)); /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)util_iround(CLAMP(src[0], 0, 1) * 0xffff);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgb;
+ rgb = value;
+ dst[0] = (float)(rgb * (1.0f/0xffff)); /* r */
+ dst[1] = (float)(rgb * (1.0f/0xffff)); /* g */
+ dst[2] = (float)(rgb * (1.0f/0xffff)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_l16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgb;
+ rgb = value;
+ dst[0] = (uint8_t)(rgb >> 8); /* r */
+ dst[1] = (uint8_t)(rgb >> 8); /* g */
+ dst[2] = (uint8_t)(rgb >> 8); /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a16_unorm {
+ uint16_t value;
+ struct {
+ uint16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_a16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t a;
+ a = value;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0xffff)); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)util_iround(CLAMP(src[3], 0, 1) * 0xffff);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t a;
+ a = value;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0xffff)); /* a */
+}
+
+static INLINE void
+util_format_a16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t a;
+ a = value;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (uint8_t)(a >> 8); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((uint32_t)src[3]) * 0xffff / 0xff);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_i16_unorm {
+ uint16_t value;
+ struct {
+ uint16_t rgba;
+ } chan;
+};
+
+static INLINE void
+util_format_i16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgba;
+ rgba = value;
+ dst[0] = (float)(rgba * (1.0f/0xffff)); /* r */
+ dst[1] = (float)(rgba * (1.0f/0xffff)); /* g */
+ dst[2] = (float)(rgba * (1.0f/0xffff)); /* b */
+ dst[3] = (float)(rgba * (1.0f/0xffff)); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)util_iround(CLAMP(src[0], 0, 1) * 0xffff);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_i16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgba;
+ rgba = value;
+ dst[0] = (float)(rgba * (1.0f/0xffff)); /* r */
+ dst[1] = (float)(rgba * (1.0f/0xffff)); /* g */
+ dst[2] = (float)(rgba * (1.0f/0xffff)); /* b */
+ dst[3] = (float)(rgba * (1.0f/0xffff)); /* a */
+}
+
+static INLINE void
+util_format_i16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgba;
+ rgba = value;
+ dst[0] = (uint8_t)(rgba >> 8); /* r */
+ dst[1] = (uint8_t)(rgba >> 8); /* g */
+ dst[2] = (uint8_t)(rgba >> 8); /* b */
+ dst[3] = (uint8_t)(rgba >> 8); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l16a16_unorm {
+ uint32_t value;
+ struct {
+ uint16_t rgb;
+ uint16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_l16a16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t rgb;
+ uint32_t a;
+ rgb = (value) & 0xffff;
+ a = value >> 16;
+ dst[0] = (float)(rgb * (1.0f/0xffff)); /* r */
+ dst[1] = (float)(rgb * (1.0f/0xffff)); /* g */
+ dst[2] = (float)(rgb * (1.0f/0xffff)); /* b */
+ dst[3] = (float)(a * (1.0f/0xffff)); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16a16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint16_t)util_iround(CLAMP(src[0], 0, 1) * 0xffff)) & 0xffff;
+ value |= ((uint16_t)util_iround(CLAMP(src[3], 0, 1) * 0xffff)) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l16a16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t rgb;
+ uint32_t a;
+ rgb = (value) & 0xffff;
+ a = value >> 16;
+ dst[0] = (float)(rgb * (1.0f/0xffff)); /* r */
+ dst[1] = (float)(rgb * (1.0f/0xffff)); /* g */
+ dst[2] = (float)(rgb * (1.0f/0xffff)); /* b */
+ dst[3] = (float)(a * (1.0f/0xffff)); /* a */
+}
+
+static INLINE void
+util_format_l16a16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t rgb;
+ uint32_t a;
+ rgb = (value) & 0xffff;
+ a = value >> 16;
+ dst[0] = (uint8_t)(rgb >> 8); /* r */
+ dst[1] = (uint8_t)(rgb >> 8); /* g */
+ dst[2] = (uint8_t)(rgb >> 8); /* b */
+ dst[3] = (uint8_t)(a >> 8); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16a16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff)) & 0xffff;
+ value |= ((uint16_t)(((uint32_t)src[3]) * 0xffff / 0xff)) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a8_snorm {
+ uint8_t value;
+ struct {
+ int8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_a8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t a;
+ a = (int8_t)(value) ;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0x7f)); /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)util_iround(CLAMP(src[3], -1, 1) * 0x7f)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ int8_t a;
+ a = (int8_t)(value) ;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0x7f)); /* a */
+}
+
+static INLINE void
+util_format_a8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t a;
+ a = (int8_t)(value) ;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (uint8_t)(((uint32_t)MAX2(a, 0)) * 0xff / 0x7f); /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)(src[3] >> 1)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l8_snorm {
+ uint8_t value;
+ struct {
+ int8_t rgb;
+ } chan;
+};
+
+static INLINE void
+util_format_l8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t rgb;
+ rgb = (int8_t)(value) ;
+ dst[0] = (float)(rgb * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(rgb * (1.0f/0x7f)); /* g */
+ dst[2] = (float)(rgb * (1.0f/0x7f)); /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)util_iround(CLAMP(src[0], -1, 1) * 0x7f)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ int8_t rgb;
+ rgb = (int8_t)(value) ;
+ dst[0] = (float)(rgb * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(rgb * (1.0f/0x7f)); /* g */
+ dst[2] = (float)(rgb * (1.0f/0x7f)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_l8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t rgb;
+ rgb = (int8_t)(value) ;
+ dst[0] = (uint8_t)(((uint32_t)MAX2(rgb, 0)) * 0xff / 0x7f); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MAX2(rgb, 0)) * 0xff / 0x7f); /* g */
+ dst[2] = (uint8_t)(((uint32_t)MAX2(rgb, 0)) * 0xff / 0x7f); /* b */
+ dst[3] = 255; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)(src[0] >> 1)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l8a8_snorm {
+ uint16_t value;
+ struct {
+ int8_t rgb;
+ int8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_l8a8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgb;
+ int16_t a;
+ rgb = ((int16_t)(value << 8) ) >> 8;
+ a = ((int16_t)(value) ) >> 8;
+ dst[0] = (float)(rgb * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(rgb * (1.0f/0x7f)); /* g */
+ dst[2] = (float)(rgb * (1.0f/0x7f)); /* b */
+ dst[3] = (float)(a * (1.0f/0x7f)); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8a8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((int8_t)util_iround(CLAMP(src[0], -1, 1) * 0x7f)) & 0xff) ;
+ value |= (uint16_t)(((int8_t)util_iround(CLAMP(src[3], -1, 1) * 0x7f)) << 8) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l8a8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgb;
+ int16_t a;
+ rgb = ((int16_t)(value << 8) ) >> 8;
+ a = ((int16_t)(value) ) >> 8;
+ dst[0] = (float)(rgb * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(rgb * (1.0f/0x7f)); /* g */
+ dst[2] = (float)(rgb * (1.0f/0x7f)); /* b */
+ dst[3] = (float)(a * (1.0f/0x7f)); /* a */
+}
+
+static INLINE void
+util_format_l8a8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgb;
+ int16_t a;
+ rgb = ((int16_t)(value << 8) ) >> 8;
+ a = ((int16_t)(value) ) >> 8;
+ dst[0] = (uint8_t)(((uint32_t)MAX2(rgb, 0)) * 0xff / 0x7f); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MAX2(rgb, 0)) * 0xff / 0x7f); /* g */
+ dst[2] = (uint8_t)(((uint32_t)MAX2(rgb, 0)) * 0xff / 0x7f); /* b */
+ dst[3] = (uint8_t)(((uint32_t)MAX2(a, 0)) * 0xff / 0x7f); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8a8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((int8_t)(src[0] >> 1)) & 0xff) ;
+ value |= (uint16_t)(((int8_t)(src[3] >> 1)) << 8) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_i8_snorm {
+ uint8_t value;
+ struct {
+ int8_t rgba;
+ } chan;
+};
+
+static INLINE void
+util_format_i8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t rgba;
+ rgba = (int8_t)(value) ;
+ dst[0] = (float)(rgba * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(rgba * (1.0f/0x7f)); /* g */
+ dst[2] = (float)(rgba * (1.0f/0x7f)); /* b */
+ dst[3] = (float)(rgba * (1.0f/0x7f)); /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)util_iround(CLAMP(src[0], -1, 1) * 0x7f)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_i8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ int8_t rgba;
+ rgba = (int8_t)(value) ;
+ dst[0] = (float)(rgba * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(rgba * (1.0f/0x7f)); /* g */
+ dst[2] = (float)(rgba * (1.0f/0x7f)); /* b */
+ dst[3] = (float)(rgba * (1.0f/0x7f)); /* a */
+}
+
+static INLINE void
+util_format_i8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t rgba;
+ rgba = (int8_t)(value) ;
+ dst[0] = (uint8_t)(((uint32_t)MAX2(rgba, 0)) * 0xff / 0x7f); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MAX2(rgba, 0)) * 0xff / 0x7f); /* g */
+ dst[2] = (uint8_t)(((uint32_t)MAX2(rgba, 0)) * 0xff / 0x7f); /* b */
+ dst[3] = (uint8_t)(((uint32_t)MAX2(rgba, 0)) * 0xff / 0x7f); /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)(src[0] >> 1)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a16_snorm {
+ uint16_t value;
+ struct {
+ int16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_a16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t a;
+ a = (int16_t)(value) ;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0x7fff)); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)util_iround(CLAMP(src[3], -1, 1) * 0x7fff)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t a;
+ a = (int16_t)(value) ;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0x7fff)); /* a */
+}
+
+static INLINE void
+util_format_a16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t a;
+ a = (int16_t)(value) ;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (uint8_t)(MAX2(a, 0) >> 7); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)(((uint32_t)src[3]) * 0x7fff / 0xff)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l16_snorm {
+ uint16_t value;
+ struct {
+ int16_t rgb;
+ } chan;
+};
+
+static INLINE void
+util_format_l16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgb;
+ rgb = (int16_t)(value) ;
+ dst[0] = (float)(rgb * (1.0f/0x7fff)); /* r */
+ dst[1] = (float)(rgb * (1.0f/0x7fff)); /* g */
+ dst[2] = (float)(rgb * (1.0f/0x7fff)); /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)util_iround(CLAMP(src[0], -1, 1) * 0x7fff)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgb;
+ rgb = (int16_t)(value) ;
+ dst[0] = (float)(rgb * (1.0f/0x7fff)); /* r */
+ dst[1] = (float)(rgb * (1.0f/0x7fff)); /* g */
+ dst[2] = (float)(rgb * (1.0f/0x7fff)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_l16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgb;
+ rgb = (int16_t)(value) ;
+ dst[0] = (uint8_t)(MAX2(rgb, 0) >> 7); /* r */
+ dst[1] = (uint8_t)(MAX2(rgb, 0) >> 7); /* g */
+ dst[2] = (uint8_t)(MAX2(rgb, 0) >> 7); /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l16a16_snorm {
+ uint32_t value;
+ struct {
+ int16_t rgb;
+ int16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_l16a16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t rgb;
+ int32_t a;
+ rgb = ((int32_t)(value << 16) ) >> 16;
+ a = ((int32_t)(value) ) >> 16;
+ dst[0] = (float)(rgb * (1.0f/0x7fff)); /* r */
+ dst[1] = (float)(rgb * (1.0f/0x7fff)); /* g */
+ dst[2] = (float)(rgb * (1.0f/0x7fff)); /* b */
+ dst[3] = (float)(a * (1.0f/0x7fff)); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16a16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int16_t)util_iround(CLAMP(src[0], -1, 1) * 0x7fff)) & 0xffff) ;
+ value |= (uint32_t)(((int16_t)util_iround(CLAMP(src[3], -1, 1) * 0x7fff)) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l16a16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t rgb;
+ int32_t a;
+ rgb = ((int32_t)(value << 16) ) >> 16;
+ a = ((int32_t)(value) ) >> 16;
+ dst[0] = (float)(rgb * (1.0f/0x7fff)); /* r */
+ dst[1] = (float)(rgb * (1.0f/0x7fff)); /* g */
+ dst[2] = (float)(rgb * (1.0f/0x7fff)); /* b */
+ dst[3] = (float)(a * (1.0f/0x7fff)); /* a */
+}
+
+static INLINE void
+util_format_l16a16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t rgb;
+ int32_t a;
+ rgb = ((int32_t)(value << 16) ) >> 16;
+ a = ((int32_t)(value) ) >> 16;
+ dst[0] = (uint8_t)(MAX2(rgb, 0) >> 7); /* r */
+ dst[1] = (uint8_t)(MAX2(rgb, 0) >> 7); /* g */
+ dst[2] = (uint8_t)(MAX2(rgb, 0) >> 7); /* b */
+ dst[3] = (uint8_t)(MAX2(a, 0) >> 7); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16a16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff)) & 0xffff) ;
+ value |= (uint32_t)(((int16_t)(((uint32_t)src[3]) * 0x7fff / 0xff)) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_i16_snorm {
+ uint16_t value;
+ struct {
+ int16_t rgba;
+ } chan;
+};
+
+static INLINE void
+util_format_i16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgba;
+ rgba = (int16_t)(value) ;
+ dst[0] = (float)(rgba * (1.0f/0x7fff)); /* r */
+ dst[1] = (float)(rgba * (1.0f/0x7fff)); /* g */
+ dst[2] = (float)(rgba * (1.0f/0x7fff)); /* b */
+ dst[3] = (float)(rgba * (1.0f/0x7fff)); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)util_iround(CLAMP(src[0], -1, 1) * 0x7fff)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_i16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgba;
+ rgba = (int16_t)(value) ;
+ dst[0] = (float)(rgba * (1.0f/0x7fff)); /* r */
+ dst[1] = (float)(rgba * (1.0f/0x7fff)); /* g */
+ dst[2] = (float)(rgba * (1.0f/0x7fff)); /* b */
+ dst[3] = (float)(rgba * (1.0f/0x7fff)); /* a */
+}
+
+static INLINE void
+util_format_i16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgba;
+ rgba = (int16_t)(value) ;
+ dst[0] = (uint8_t)(MAX2(rgba, 0) >> 7); /* r */
+ dst[1] = (uint8_t)(MAX2(rgba, 0) >> 7); /* g */
+ dst[2] = (uint8_t)(MAX2(rgba, 0) >> 7); /* b */
+ dst[3] = (uint8_t)(MAX2(rgba, 0) >> 7); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a16_float {
+ uint16_t value;
+ struct {
+ uint16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_a16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_a16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = util_half_to_float(pixel.chan.a); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_a16_float pixel;
+ pixel.chan.a = util_float_to_half(src[3]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_a16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = util_half_to_float(pixel.chan.a); /* a */
+}
+
+static INLINE void
+util_format_a16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_a16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = float_to_ubyte(util_half_to_float(pixel.chan.a)); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_a16_float pixel;
+ pixel.chan.a = util_float_to_half((float)(src[3] * (1.0f/0xff)));
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l16_float {
+ uint16_t value;
+ struct {
+ uint16_t rgb;
+ } chan;
+};
+
+static INLINE void
+util_format_l16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.rgb); /* r */
+ dst[1] = util_half_to_float(pixel.chan.rgb); /* g */
+ dst[2] = util_half_to_float(pixel.chan.rgb); /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l16_float pixel;
+ pixel.chan.rgb = util_float_to_half(src[0]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_l16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.rgb); /* r */
+ dst[1] = util_half_to_float(pixel.chan.rgb); /* g */
+ dst[2] = util_half_to_float(pixel.chan.rgb); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_l16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.rgb)); /* r */
+ dst[1] = float_to_ubyte(util_half_to_float(pixel.chan.rgb)); /* g */
+ dst[2] = float_to_ubyte(util_half_to_float(pixel.chan.rgb)); /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l16_float pixel;
+ pixel.chan.rgb = util_float_to_half((float)(src[0] * (1.0f/0xff)));
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l16a16_float {
+ uint32_t value;
+ struct {
+ uint16_t rgb;
+ uint16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_l16a16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l16a16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.rgb); /* r */
+ dst[1] = util_half_to_float(pixel.chan.rgb); /* g */
+ dst[2] = util_half_to_float(pixel.chan.rgb); /* b */
+ dst[3] = util_half_to_float(pixel.chan.a); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16a16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l16a16_float pixel;
+ pixel.chan.rgb = util_float_to_half(src[0]);
+ pixel.chan.a = util_float_to_half(src[3]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l16a16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_l16a16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.rgb); /* r */
+ dst[1] = util_half_to_float(pixel.chan.rgb); /* g */
+ dst[2] = util_half_to_float(pixel.chan.rgb); /* b */
+ dst[3] = util_half_to_float(pixel.chan.a); /* a */
+}
+
+static INLINE void
+util_format_l16a16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l16a16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.rgb)); /* r */
+ dst[1] = float_to_ubyte(util_half_to_float(pixel.chan.rgb)); /* g */
+ dst[2] = float_to_ubyte(util_half_to_float(pixel.chan.rgb)); /* b */
+ dst[3] = float_to_ubyte(util_half_to_float(pixel.chan.a)); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16a16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l16a16_float pixel;
+ pixel.chan.rgb = util_float_to_half((float)(src[0] * (1.0f/0xff)));
+ pixel.chan.a = util_float_to_half((float)(src[3] * (1.0f/0xff)));
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_i16_float {
+ uint16_t value;
+ struct {
+ uint16_t rgba;
+ } chan;
+};
+
+static INLINE void
+util_format_i16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_i16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.rgba); /* r */
+ dst[1] = util_half_to_float(pixel.chan.rgba); /* g */
+ dst[2] = util_half_to_float(pixel.chan.rgba); /* b */
+ dst[3] = util_half_to_float(pixel.chan.rgba); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_i16_float pixel;
+ pixel.chan.rgba = util_float_to_half(src[0]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_i16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_i16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.rgba); /* r */
+ dst[1] = util_half_to_float(pixel.chan.rgba); /* g */
+ dst[2] = util_half_to_float(pixel.chan.rgba); /* b */
+ dst[3] = util_half_to_float(pixel.chan.rgba); /* a */
+}
+
+static INLINE void
+util_format_i16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_i16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.rgba)); /* r */
+ dst[1] = float_to_ubyte(util_half_to_float(pixel.chan.rgba)); /* g */
+ dst[2] = float_to_ubyte(util_half_to_float(pixel.chan.rgba)); /* b */
+ dst[3] = float_to_ubyte(util_half_to_float(pixel.chan.rgba)); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_i16_float pixel;
+ pixel.chan.rgba = util_float_to_half((float)(src[0] * (1.0f/0xff)));
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a32_float {
+ uint32_t value;
+ struct {
+ float a;
+ } chan;
+};
+
+static INLINE void
+util_format_a32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_a32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = pixel.chan.a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_a32_float pixel;
+ pixel.chan.a = src[3];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_a32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_a32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_a32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = float_to_ubyte(pixel.chan.a); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_a32_float pixel;
+ pixel.chan.a = ubyte_to_float(src[3]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l32_float {
+ uint32_t value;
+ struct {
+ float rgb;
+ } chan;
+};
+
+static INLINE void
+util_format_l32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.rgb; /* r */
+ dst[1] = pixel.chan.rgb; /* g */
+ dst[2] = pixel.chan.rgb; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32_float pixel;
+ pixel.chan.rgb = src[0];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_l32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.rgb; /* r */
+ dst[1] = pixel.chan.rgb; /* g */
+ dst[2] = pixel.chan.rgb; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_l32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(pixel.chan.rgb); /* r */
+ dst[1] = float_to_ubyte(pixel.chan.rgb); /* g */
+ dst[2] = float_to_ubyte(pixel.chan.rgb); /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32_float pixel;
+ pixel.chan.rgb = ubyte_to_float(src[0]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l32a32_float {
+ uint64_t value;
+ struct {
+ float rgb;
+ float a;
+ } chan;
+};
+
+static INLINE void
+util_format_l32a32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32a32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.rgb; /* r */
+ dst[1] = pixel.chan.rgb; /* g */
+ dst[2] = pixel.chan.rgb; /* b */
+ dst[3] = pixel.chan.a; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l32a32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32a32_float pixel;
+ pixel.chan.rgb = src[0];
+ pixel.chan.a = src[3];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l32a32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_l32a32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.rgb; /* r */
+ dst[1] = pixel.chan.rgb; /* g */
+ dst[2] = pixel.chan.rgb; /* b */
+ dst[3] = pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_l32a32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32a32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(pixel.chan.rgb); /* r */
+ dst[1] = float_to_ubyte(pixel.chan.rgb); /* g */
+ dst[2] = float_to_ubyte(pixel.chan.rgb); /* b */
+ dst[3] = float_to_ubyte(pixel.chan.a); /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l32a32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32a32_float pixel;
+ pixel.chan.rgb = ubyte_to_float(src[0]);
+ pixel.chan.a = ubyte_to_float(src[3]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_i32_float {
+ uint32_t value;
+ struct {
+ float rgba;
+ } chan;
+};
+
+static INLINE void
+util_format_i32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_i32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.rgba; /* r */
+ dst[1] = pixel.chan.rgba; /* g */
+ dst[2] = pixel.chan.rgba; /* b */
+ dst[3] = pixel.chan.rgba; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_i32_float pixel;
+ pixel.chan.rgba = src[0];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_i32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_i32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.rgba; /* r */
+ dst[1] = pixel.chan.rgba; /* g */
+ dst[2] = pixel.chan.rgba; /* b */
+ dst[3] = pixel.chan.rgba; /* a */
+}
+
+static INLINE void
+util_format_i32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_i32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(pixel.chan.rgba); /* r */
+ dst[1] = float_to_ubyte(pixel.chan.rgba); /* g */
+ dst[2] = float_to_ubyte(pixel.chan.rgba); /* b */
+ dst[3] = float_to_ubyte(pixel.chan.rgba); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_i32_float pixel;
+ pixel.chan.rgba = ubyte_to_float(src[0]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l8_srgb {
+ uint8_t value;
+ struct {
+ uint8_t rgb;
+ } chan;
+};
+
+static INLINE void
+util_format_l8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgb;
+ rgb = value;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(rgb); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(rgb); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(rgb); /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= util_format_linear_float_to_srgb_8unorm(src[0]);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgb;
+ rgb = value;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(rgb); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(rgb); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(rgb); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_l8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgb;
+ rgb = value;
+ dst[0] = util_format_srgb_to_linear_8unorm(rgb); /* r */
+ dst[1] = util_format_srgb_to_linear_8unorm(rgb); /* g */
+ dst[2] = util_format_srgb_to_linear_8unorm(rgb); /* b */
+ dst[3] = 255; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= util_format_linear_to_srgb_8unorm(src[0]);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l8a8_srgb {
+ uint16_t value;
+ struct {
+ uint8_t rgb;
+ uint8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_l8a8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgb;
+ uint16_t a;
+ rgb = (value) & 0xff;
+ a = value >> 8;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(rgb); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(rgb); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(rgb); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8a8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (util_format_linear_float_to_srgb_8unorm(src[0])) & 0xff;
+ value |= (float_to_ubyte(src[3])) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l8a8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgb;
+ uint16_t a;
+ rgb = (value) & 0xff;
+ a = value >> 8;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(rgb); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(rgb); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(rgb); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+}
+
+static INLINE void
+util_format_l8a8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgb;
+ uint16_t a;
+ rgb = (value) & 0xff;
+ a = value >> 8;
+ dst[0] = util_format_srgb_to_linear_8unorm(rgb); /* r */
+ dst[1] = util_format_srgb_to_linear_8unorm(rgb); /* g */
+ dst[2] = util_format_srgb_to_linear_8unorm(rgb); /* b */
+ dst[3] = a; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8a8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (util_format_linear_to_srgb_8unorm(src[0])) & 0xff;
+ value |= (src[3]) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8_srgb {
+ struct {
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_srgb pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_format_srgb_8unorm_to_linear_float(pixel.chan.r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(pixel.chan.g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(pixel.chan.b); /* b */
+ dst[3] = 1; /* a */
+ src += 3;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_srgb pixel;
+ pixel.chan.r = util_format_linear_float_to_srgb_8unorm(src[0]);
+ pixel.chan.g = util_format_linear_float_to_srgb_8unorm(src[1]);
+ pixel.chan.b = util_format_linear_float_to_srgb_8unorm(src[2]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 3;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r8g8b8_srgb pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_format_srgb_8unorm_to_linear_float(pixel.chan.r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(pixel.chan.g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(pixel.chan.b); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_srgb pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_format_srgb_to_linear_8unorm(pixel.chan.r); /* r */
+ dst[1] = util_format_srgb_to_linear_8unorm(pixel.chan.g); /* g */
+ dst[2] = util_format_srgb_to_linear_8unorm(pixel.chan.b); /* b */
+ dst[3] = 255; /* a */
+ src += 3;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_srgb pixel;
+ pixel.chan.r = util_format_linear_to_srgb_8unorm(src[0]);
+ pixel.chan.g = util_format_linear_to_srgb_8unorm(src[1]);
+ pixel.chan.b = util_format_linear_to_srgb_8unorm(src[2]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 3;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8a8_srgb {
+ uint32_t value;
+ struct {
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ uint8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8a8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (util_format_linear_float_to_srgb_8unorm(src[0])) & 0xff;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[1])) & 0xff) << 8;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[2])) & 0xff) << 16;
+ value |= (float_to_ubyte(src[3])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+}
+
+static INLINE void
+util_format_r8g8b8a8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = util_format_srgb_to_linear_8unorm(r); /* r */
+ dst[1] = util_format_srgb_to_linear_8unorm(g); /* g */
+ dst[2] = util_format_srgb_to_linear_8unorm(b); /* b */
+ dst[3] = a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (util_format_linear_to_srgb_8unorm(src[0])) & 0xff;
+ value |= ((util_format_linear_to_srgb_8unorm(src[1])) & 0xff) << 8;
+ value |= ((util_format_linear_to_srgb_8unorm(src[2])) & 0xff) << 16;
+ value |= (src[3]) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a8b8g8r8_srgb {
+ uint32_t value;
+ struct {
+ uint8_t a;
+ uint8_t b;
+ uint8_t g;
+ uint8_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_a8b8g8r8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t a;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ a = (value) & 0xff;
+ b = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ r = value >> 24;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8b8g8r8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (float_to_ubyte(src[3])) & 0xff;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[2])) & 0xff) << 8;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[1])) & 0xff) << 16;
+ value |= (util_format_linear_float_to_srgb_8unorm(src[0])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a8b8g8r8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t a;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ a = (value) & 0xff;
+ b = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ r = value >> 24;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+}
+
+static INLINE void
+util_format_a8b8g8r8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t a;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ a = (value) & 0xff;
+ b = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ r = value >> 24;
+ dst[0] = util_format_srgb_to_linear_8unorm(r); /* r */
+ dst[1] = util_format_srgb_to_linear_8unorm(g); /* g */
+ dst[2] = util_format_srgb_to_linear_8unorm(b); /* b */
+ dst[3] = a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8b8g8r8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (src[3]) & 0xff;
+ value |= ((util_format_linear_to_srgb_8unorm(src[2])) & 0xff) << 8;
+ value |= ((util_format_linear_to_srgb_8unorm(src[1])) & 0xff) << 16;
+ value |= (util_format_linear_to_srgb_8unorm(src[0])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_x8b8g8r8_srgb {
+ uint32_t value;
+ struct {
+ uint8_t x;
+ uint8_t b;
+ uint8_t g;
+ uint8_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_x8b8g8r8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ b = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ r = value >> 24;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_x8b8g8r8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[2])) & 0xff) << 8;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[1])) & 0xff) << 16;
+ value |= (util_format_linear_float_to_srgb_8unorm(src[0])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_x8b8g8r8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ b = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ r = value >> 24;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_x8b8g8r8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ b = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ r = value >> 24;
+ dst[0] = util_format_srgb_to_linear_8unorm(r); /* r */
+ dst[1] = util_format_srgb_to_linear_8unorm(g); /* g */
+ dst[2] = util_format_srgb_to_linear_8unorm(b); /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_x8b8g8r8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((util_format_linear_to_srgb_8unorm(src[2])) & 0xff) << 8;
+ value |= ((util_format_linear_to_srgb_8unorm(src[1])) & 0xff) << 16;
+ value |= (util_format_linear_to_srgb_8unorm(src[0])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b8g8r8a8_srgb {
+ uint32_t value;
+ struct {
+ uint8_t b;
+ uint8_t g;
+ uint8_t r;
+ uint8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_b8g8r8a8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ uint32_t a;
+ b = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ r = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b8g8r8a8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (util_format_linear_float_to_srgb_8unorm(src[2])) & 0xff;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[1])) & 0xff) << 8;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[0])) & 0xff) << 16;
+ value |= (float_to_ubyte(src[3])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b8g8r8a8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ uint32_t a;
+ b = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ r = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+}
+
+static INLINE void
+util_format_b8g8r8a8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ uint32_t a;
+ b = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ r = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = util_format_srgb_to_linear_8unorm(r); /* r */
+ dst[1] = util_format_srgb_to_linear_8unorm(g); /* g */
+ dst[2] = util_format_srgb_to_linear_8unorm(b); /* b */
+ dst[3] = a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b8g8r8a8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (util_format_linear_to_srgb_8unorm(src[2])) & 0xff;
+ value |= ((util_format_linear_to_srgb_8unorm(src[1])) & 0xff) << 8;
+ value |= ((util_format_linear_to_srgb_8unorm(src[0])) & 0xff) << 16;
+ value |= (src[3]) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b8g8r8x8_srgb {
+ uint32_t value;
+ struct {
+ uint8_t b;
+ uint8_t g;
+ uint8_t r;
+ uint8_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_b8g8r8x8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ b = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ r = (value >> 16) & 0xff;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b8g8r8x8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (util_format_linear_float_to_srgb_8unorm(src[2])) & 0xff;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[1])) & 0xff) << 8;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[0])) & 0xff) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b8g8r8x8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ b = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ r = (value >> 16) & 0xff;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_b8g8r8x8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ b = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ r = (value >> 16) & 0xff;
+ dst[0] = util_format_srgb_to_linear_8unorm(r); /* r */
+ dst[1] = util_format_srgb_to_linear_8unorm(g); /* g */
+ dst[2] = util_format_srgb_to_linear_8unorm(b); /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b8g8r8x8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (util_format_linear_to_srgb_8unorm(src[2])) & 0xff;
+ value |= ((util_format_linear_to_srgb_8unorm(src[1])) & 0xff) << 8;
+ value |= ((util_format_linear_to_srgb_8unorm(src[0])) & 0xff) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a8r8g8b8_srgb {
+ uint32_t value;
+ struct {
+ uint8_t a;
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_a8r8g8b8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t a;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ a = (value) & 0xff;
+ r = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ b = value >> 24;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8r8g8b8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (float_to_ubyte(src[3])) & 0xff;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[0])) & 0xff) << 8;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[1])) & 0xff) << 16;
+ value |= (util_format_linear_float_to_srgb_8unorm(src[2])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a8r8g8b8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t a;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ a = (value) & 0xff;
+ r = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ b = value >> 24;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+}
+
+static INLINE void
+util_format_a8r8g8b8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t a;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ a = (value) & 0xff;
+ r = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ b = value >> 24;
+ dst[0] = util_format_srgb_to_linear_8unorm(r); /* r */
+ dst[1] = util_format_srgb_to_linear_8unorm(g); /* g */
+ dst[2] = util_format_srgb_to_linear_8unorm(b); /* b */
+ dst[3] = a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8r8g8b8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (src[3]) & 0xff;
+ value |= ((util_format_linear_to_srgb_8unorm(src[0])) & 0xff) << 8;
+ value |= ((util_format_linear_to_srgb_8unorm(src[1])) & 0xff) << 16;
+ value |= (util_format_linear_to_srgb_8unorm(src[2])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_x8r8g8b8_srgb {
+ uint32_t value;
+ struct {
+ uint8_t x;
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_x8r8g8b8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ b = value >> 24;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_x8r8g8b8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[0])) & 0xff) << 8;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[1])) & 0xff) << 16;
+ value |= (util_format_linear_float_to_srgb_8unorm(src[2])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_x8r8g8b8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ b = value >> 24;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_x8r8g8b8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value >> 8) & 0xff;
+ g = (value >> 16) & 0xff;
+ b = value >> 24;
+ dst[0] = util_format_srgb_to_linear_8unorm(r); /* r */
+ dst[1] = util_format_srgb_to_linear_8unorm(g); /* g */
+ dst[2] = util_format_srgb_to_linear_8unorm(b); /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_x8r8g8b8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((util_format_linear_to_srgb_8unorm(src[0])) & 0xff) << 8;
+ value |= ((util_format_linear_to_srgb_8unorm(src[1])) & 0xff) << 16;
+ value |= (util_format_linear_to_srgb_8unorm(src[2])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8sg8sb8ux8u_norm {
+ uint32_t value;
+ struct {
+ int8_t r;
+ int8_t g;
+ uint8_t b;
+ uint8_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_r8sg8sb8ux8u_norm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ uint32_t b;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = (value >> 16) & 0xff;
+ dst[0] = (float)(r * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(g * (1.0f/0x7f)); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8sg8sb8ux8u_norm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)util_iround(CLAMP(src[0], -1, 1) * 0x7f)) & 0xff) ;
+ value |= (uint32_t)((((uint32_t)util_iround(CLAMP(src[1], -1, 1) * 0x7f)) & 0xff) << 8) ;
+ value |= ((float_to_ubyte(src[2])) & 0xff) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8sg8sb8ux8u_norm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ uint32_t b;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = (value >> 16) & 0xff;
+ dst[0] = (float)(r * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(g * (1.0f/0x7f)); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8sg8sb8ux8u_norm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ uint32_t b;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = (value >> 16) & 0xff;
+ dst[0] = (uint8_t)(((uint32_t)MAX2(r, 0)) * 0xff / 0x7f); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MAX2(g, 0)) * 0xff / 0x7f); /* g */
+ dst[2] = b; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8sg8sb8ux8u_norm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)(src[0] >> 1)) & 0xff) ;
+ value |= (uint32_t)((((uint32_t)(src[1] >> 1)) & 0xff) << 8) ;
+ value |= ((src[2]) & 0xff) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r10sg10sb10sa2u_norm {
+ uint32_t value;
+ struct {
+ int r:10;
+ int g:10;
+ int b:10;
+ unsigned a:2;
+ } chan;
+};
+
+static INLINE void
+util_format_r10sg10sb10sa2u_norm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ uint32_t a;
+ r = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ b = ((int32_t)(value << 2) ) >> 22;
+ a = value >> 30;
+ dst[0] = (float)(r * (1.0f/0x1ff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x1ff)); /* g */
+ dst[2] = (float)(b * (1.0f/0x1ff)); /* b */
+ dst[3] = (float)(a * (1.0f/0x3)); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10sg10sb10sa2u_norm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)util_iround(CLAMP(src[0], -1, 1) * 0x1ff)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)util_iround(CLAMP(src[1], -1, 1) * 0x1ff)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)util_iround(CLAMP(src[2], -1, 1) * 0x1ff)) & 0x3ff) << 20) ;
+ value |= ((uint32_t)util_iround(CLAMP(src[3], 0, 1) * 0x3)) << 30;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r10sg10sb10sa2u_norm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ uint32_t a;
+ r = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ b = ((int32_t)(value << 2) ) >> 22;
+ a = value >> 30;
+ dst[0] = (float)(r * (1.0f/0x1ff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x1ff)); /* g */
+ dst[2] = (float)(b * (1.0f/0x1ff)); /* b */
+ dst[3] = (float)(a * (1.0f/0x3)); /* a */
+}
+
+static INLINE void
+util_format_r10sg10sb10sa2u_norm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ uint32_t a;
+ r = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ b = ((int32_t)(value << 2) ) >> 22;
+ a = value >> 30;
+ dst[0] = (uint8_t)(MAX2(r, 0) >> 1); /* r */
+ dst[1] = (uint8_t)(MAX2(g, 0) >> 1); /* g */
+ dst[2] = (uint8_t)(MAX2(b, 0) >> 1); /* b */
+ dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0x3); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10sg10sb10sa2u_norm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)(((uint32_t)src[0]) * 0x1ff / 0xff)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)(((uint32_t)src[1]) * 0x1ff / 0xff)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)(((uint32_t)src[2]) * 0x1ff / 0xff)) & 0x3ff) << 20) ;
+ value |= ((uint32_t)(src[3] >> 6)) << 30;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r5sg5sb6u_norm {
+ uint16_t value;
+ struct {
+ int r:5;
+ int g:5;
+ unsigned b:6;
+ } chan;
+};
+
+static INLINE void
+util_format_r5sg5sb6u_norm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t g;
+ uint16_t b;
+ r = ((int16_t)(value << 11) ) >> 11;
+ g = ((int16_t)(value << 6) ) >> 11;
+ b = value >> 10;
+ dst[0] = (float)(r * (1.0f/0xf)); /* r */
+ dst[1] = (float)(g * (1.0f/0xf)); /* g */
+ dst[2] = (float)(b * (1.0f/0x3f)); /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r5sg5sb6u_norm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((uint16_t)util_iround(CLAMP(src[0], -1, 1) * 0xf)) & 0x1f) ;
+ value |= (uint16_t)((((uint16_t)util_iround(CLAMP(src[1], -1, 1) * 0xf)) & 0x1f) << 5) ;
+ value |= ((uint16_t)util_iround(CLAMP(src[2], 0, 1) * 0x3f)) << 10;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r5sg5sb6u_norm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t g;
+ uint16_t b;
+ r = ((int16_t)(value << 11) ) >> 11;
+ g = ((int16_t)(value << 6) ) >> 11;
+ b = value >> 10;
+ dst[0] = (float)(r * (1.0f/0xf)); /* r */
+ dst[1] = (float)(g * (1.0f/0xf)); /* g */
+ dst[2] = (float)(b * (1.0f/0x3f)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r5sg5sb6u_norm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t g;
+ uint16_t b;
+ r = ((int16_t)(value << 11) ) >> 11;
+ g = ((int16_t)(value << 6) ) >> 11;
+ b = value >> 10;
+ dst[0] = (uint8_t)(((uint32_t)MAX2(r, 0)) * 0xff / 0xf); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MAX2(g, 0)) * 0xff / 0xf); /* g */
+ dst[2] = (uint8_t)(((uint32_t)b) * 0xff / 0x3f); /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r5sg5sb6u_norm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((uint16_t)(src[0] >> 4)) & 0x1f) ;
+ value |= (uint16_t)((((uint16_t)(src[1] >> 4)) & 0x1f) << 5) ;
+ value |= ((uint16_t)(src[2] >> 2)) << 10;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r64_float {
+ uint64_t value;
+ struct {
+ double r;
+ } chan;
+};
+
+static INLINE void
+util_format_r64_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r64_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64_float pixel;
+ pixel.chan.r = (double)src[0];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r64_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r64_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r64_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)util_iround(CLAMP(pixel.chan.r, 0, 1) * 0xff); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r64_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64_float pixel;
+ pixel.chan.r = (double)(src[0] * (1.0f/0xff));
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r64g64_float {
+ struct {
+ double r;
+ double g;
+ } chan;
+};
+
+static INLINE void
+util_format_r64g64_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64g64_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r64g64_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64g64_float pixel;
+ pixel.chan.r = (double)src[0];
+ pixel.chan.g = (double)src[1];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r64g64_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r64g64_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r64g64_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64g64_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)util_iround(CLAMP(pixel.chan.r, 0, 1) * 0xff); /* r */
+ dst[1] = (uint8_t)util_iround(CLAMP(pixel.chan.g, 0, 1) * 0xff); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r64g64_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64g64_float pixel;
+ pixel.chan.r = (double)(src[0] * (1.0f/0xff));
+ pixel.chan.g = (double)(src[1] * (1.0f/0xff));
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r64g64b64_float {
+ struct {
+ double r;
+ double g;
+ double b;
+ } chan;
+};
+
+static INLINE void
+util_format_r64g64b64_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64g64b64_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 24;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r64g64b64_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64g64b64_float pixel;
+ pixel.chan.r = (double)src[0];
+ pixel.chan.g = (double)src[1];
+ pixel.chan.b = (double)src[2];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 24;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r64g64b64_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r64g64b64_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r64g64b64_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64g64b64_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)util_iround(CLAMP(pixel.chan.r, 0, 1) * 0xff); /* r */
+ dst[1] = (uint8_t)util_iround(CLAMP(pixel.chan.g, 0, 1) * 0xff); /* g */
+ dst[2] = (uint8_t)util_iround(CLAMP(pixel.chan.b, 0, 1) * 0xff); /* b */
+ dst[3] = 255; /* a */
+ src += 24;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r64g64b64_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64g64b64_float pixel;
+ pixel.chan.r = (double)(src[0] * (1.0f/0xff));
+ pixel.chan.g = (double)(src[1] * (1.0f/0xff));
+ pixel.chan.b = (double)(src[2] * (1.0f/0xff));
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 24;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r64g64b64a64_float {
+ struct {
+ double r;
+ double g;
+ double b;
+ double a;
+ } chan;
+};
+
+static INLINE void
+util_format_r64g64b64a64_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64g64b64a64_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = (float)pixel.chan.a; /* a */
+ src += 32;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r64g64b64a64_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64g64b64a64_float pixel;
+ pixel.chan.r = (double)src[0];
+ pixel.chan.g = (double)src[1];
+ pixel.chan.b = (double)src[2];
+ pixel.chan.a = (double)src[3];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 32;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r64g64b64a64_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r64g64b64a64_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = (float)pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_r64g64b64a64_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64g64b64a64_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)util_iround(CLAMP(pixel.chan.r, 0, 1) * 0xff); /* r */
+ dst[1] = (uint8_t)util_iround(CLAMP(pixel.chan.g, 0, 1) * 0xff); /* g */
+ dst[2] = (uint8_t)util_iround(CLAMP(pixel.chan.b, 0, 1) * 0xff); /* b */
+ dst[3] = (uint8_t)util_iround(CLAMP(pixel.chan.a, 0, 1) * 0xff); /* a */
+ src += 32;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r64g64b64a64_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r64g64b64a64_float pixel;
+ pixel.chan.r = (double)(src[0] * (1.0f/0xff));
+ pixel.chan.g = (double)(src[1] * (1.0f/0xff));
+ pixel.chan.b = (double)(src[2] * (1.0f/0xff));
+ pixel.chan.a = (double)(src[3] * (1.0f/0xff));
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 32;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32_float {
+ uint32_t value;
+ struct {
+ float r;
+ } chan;
+};
+
+static INLINE void
+util_format_r32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32_float pixel;
+ pixel.chan.r = src[0];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(pixel.chan.r); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32_float pixel;
+ pixel.chan.r = ubyte_to_float(src[0]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32_float {
+ uint64_t value;
+ struct {
+ float r;
+ float g;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_float pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.g = src[1];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(pixel.chan.r); /* r */
+ dst[1] = float_to_ubyte(pixel.chan.g); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_float pixel;
+ pixel.chan.r = ubyte_to_float(src[0]);
+ pixel.chan.g = ubyte_to_float(src[1]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32_float {
+ struct {
+ float r;
+ float g;
+ float b;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_float pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.g = src[1];
+ pixel.chan.b = src[2];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(pixel.chan.r); /* r */
+ dst[1] = float_to_ubyte(pixel.chan.g); /* g */
+ dst[2] = float_to_ubyte(pixel.chan.b); /* b */
+ dst[3] = 255; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_float pixel;
+ pixel.chan.r = ubyte_to_float(src[0]);
+ pixel.chan.g = ubyte_to_float(src[1]);
+ pixel.chan.b = ubyte_to_float(src[2]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32a32_float {
+ struct {
+ float r;
+ float g;
+ float b;
+ float a;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32a32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = pixel.chan.a; /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_float pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.g = src[1];
+ pixel.chan.b = src[2];
+ pixel.chan.a = src[3];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32a32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32a32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(pixel.chan.r); /* r */
+ dst[1] = float_to_ubyte(pixel.chan.g); /* g */
+ dst[2] = float_to_ubyte(pixel.chan.b); /* b */
+ dst[3] = float_to_ubyte(pixel.chan.a); /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_float pixel;
+ pixel.chan.r = ubyte_to_float(src[0]);
+ pixel.chan.g = ubyte_to_float(src[1]);
+ pixel.chan.b = ubyte_to_float(src[2]);
+ pixel.chan.a = ubyte_to_float(src[3]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32_unorm {
+ uint32_t value;
+ struct {
+ uint32_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r32_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ r = value;
+ dst[0] = (float)(r * (1.0/0xffffffff)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(CLAMP(src[0], 0, 1) * (double)0xffffffff);
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ r = value;
+ dst[0] = (float)(r * (1.0/0xffffffff)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ r = value;
+ dst[0] = (uint8_t)(r >> 24); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint64_t)src[0]) * 0xffffffff / 0xff);
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32_unorm {
+ uint64_t value;
+ struct {
+ uint32_t r;
+ uint32_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0xffffffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0xffffffff)); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_unorm pixel;
+ pixel.chan.r = (uint32_t)(CLAMP(src[0], 0, 1) * (double)0xffffffff);
+ pixel.chan.g = (uint32_t)(CLAMP(src[1], 0, 1) * (double)0xffffffff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0xffffffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0xffffffff)); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(pixel.chan.r >> 24); /* r */
+ dst[1] = (uint8_t)(pixel.chan.g >> 24); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_unorm pixel;
+ pixel.chan.r = (uint32_t)(((uint64_t)src[0]) * 0xffffffff / 0xff);
+ pixel.chan.g = (uint32_t)(((uint64_t)src[1]) * 0xffffffff / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32_unorm {
+ struct {
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0xffffffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0xffffffff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0/0xffffffff)); /* b */
+ dst[3] = 1; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_unorm pixel;
+ pixel.chan.r = (uint32_t)(CLAMP(src[0], 0, 1) * (double)0xffffffff);
+ pixel.chan.g = (uint32_t)(CLAMP(src[1], 0, 1) * (double)0xffffffff);
+ pixel.chan.b = (uint32_t)(CLAMP(src[2], 0, 1) * (double)0xffffffff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0xffffffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0xffffffff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0/0xffffffff)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(pixel.chan.r >> 24); /* r */
+ dst[1] = (uint8_t)(pixel.chan.g >> 24); /* g */
+ dst[2] = (uint8_t)(pixel.chan.b >> 24); /* b */
+ dst[3] = 255; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_unorm pixel;
+ pixel.chan.r = (uint32_t)(((uint64_t)src[0]) * 0xffffffff / 0xff);
+ pixel.chan.g = (uint32_t)(((uint64_t)src[1]) * 0xffffffff / 0xff);
+ pixel.chan.b = (uint32_t)(((uint64_t)src[2]) * 0xffffffff / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32a32_unorm {
+ struct {
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32a32_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0xffffffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0xffffffff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0/0xffffffff)); /* b */
+ dst[3] = (float)(pixel.chan.a * (1.0/0xffffffff)); /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_unorm pixel;
+ pixel.chan.r = (uint32_t)(CLAMP(src[0], 0, 1) * (double)0xffffffff);
+ pixel.chan.g = (uint32_t)(CLAMP(src[1], 0, 1) * (double)0xffffffff);
+ pixel.chan.b = (uint32_t)(CLAMP(src[2], 0, 1) * (double)0xffffffff);
+ pixel.chan.a = (uint32_t)(CLAMP(src[3], 0, 1) * (double)0xffffffff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32a32_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0xffffffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0xffffffff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0/0xffffffff)); /* b */
+ dst[3] = (float)(pixel.chan.a * (1.0/0xffffffff)); /* a */
+}
+
+static INLINE void
+util_format_r32g32b32a32_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(pixel.chan.r >> 24); /* r */
+ dst[1] = (uint8_t)(pixel.chan.g >> 24); /* g */
+ dst[2] = (uint8_t)(pixel.chan.b >> 24); /* b */
+ dst[3] = (uint8_t)(pixel.chan.a >> 24); /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_unorm pixel;
+ pixel.chan.r = (uint32_t)(((uint64_t)src[0]) * 0xffffffff / 0xff);
+ pixel.chan.g = (uint32_t)(((uint64_t)src[1]) * 0xffffffff / 0xff);
+ pixel.chan.b = (uint32_t)(((uint64_t)src[2]) * 0xffffffff / 0xff);
+ pixel.chan.a = (uint32_t)(((uint64_t)src[3]) * 0xffffffff / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32_uscaled {
+ uint32_t value;
+ struct {
+ uint32_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r32_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ r = value;
+ dst[0] = (float)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)CLAMP(src[0], 0, 4294967295);
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ r = value;
+ dst[0] = (float)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ r = value;
+ dst[0] = (uint8_t)(((uint64_t)MIN2(r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint64_t)src[0]) * 0x1 / 0xff);
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32_uscaled {
+ uint64_t value;
+ struct {
+ uint32_t r;
+ uint32_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_uscaled pixel;
+ pixel.chan.r = (uint32_t)CLAMP(src[0], 0, 4294967295);
+ pixel.chan.g = (uint32_t)CLAMP(src[1], 0, 4294967295);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(((uint64_t)MIN2(pixel.chan.r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint64_t)MIN2(pixel.chan.g, 1)) * 0xff / 0x1); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_uscaled pixel;
+ pixel.chan.r = (uint32_t)(((uint64_t)src[0]) * 0x1 / 0xff);
+ pixel.chan.g = (uint32_t)(((uint64_t)src[1]) * 0x1 / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32_uscaled {
+ struct {
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_uscaled pixel;
+ pixel.chan.r = (uint32_t)CLAMP(src[0], 0, 4294967295);
+ pixel.chan.g = (uint32_t)CLAMP(src[1], 0, 4294967295);
+ pixel.chan.b = (uint32_t)CLAMP(src[2], 0, 4294967295);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(((uint64_t)MIN2(pixel.chan.r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint64_t)MIN2(pixel.chan.g, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint64_t)MIN2(pixel.chan.b, 1)) * 0xff / 0x1); /* b */
+ dst[3] = 255; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_uscaled pixel;
+ pixel.chan.r = (uint32_t)(((uint64_t)src[0]) * 0x1 / 0xff);
+ pixel.chan.g = (uint32_t)(((uint64_t)src[1]) * 0x1 / 0xff);
+ pixel.chan.b = (uint32_t)(((uint64_t)src[2]) * 0x1 / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32a32_uscaled {
+ struct {
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32a32_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = (float)pixel.chan.a; /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_uscaled pixel;
+ pixel.chan.r = (uint32_t)CLAMP(src[0], 0, 4294967295);
+ pixel.chan.g = (uint32_t)CLAMP(src[1], 0, 4294967295);
+ pixel.chan.b = (uint32_t)CLAMP(src[2], 0, 4294967295);
+ pixel.chan.a = (uint32_t)CLAMP(src[3], 0, 4294967295);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32a32_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = (float)pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32a32_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(((uint64_t)MIN2(pixel.chan.r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint64_t)MIN2(pixel.chan.g, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint64_t)MIN2(pixel.chan.b, 1)) * 0xff / 0x1); /* b */
+ dst[3] = (uint8_t)(((uint64_t)MIN2(pixel.chan.a, 1)) * 0xff / 0x1); /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_uscaled pixel;
+ pixel.chan.r = (uint32_t)(((uint64_t)src[0]) * 0x1 / 0xff);
+ pixel.chan.g = (uint32_t)(((uint64_t)src[1]) * 0x1 / 0xff);
+ pixel.chan.b = (uint32_t)(((uint64_t)src[2]) * 0x1 / 0xff);
+ pixel.chan.a = (uint32_t)(((uint64_t)src[3]) * 0x1 / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32_snorm {
+ uint32_t value;
+ struct {
+ int32_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r32_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ r = (int32_t)(value) ;
+ dst[0] = (float)(r * (1.0/0x7fffffff)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)((int32_t)(CLAMP(src[0], -1, 1) * (double)0x7fffffff)) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ r = (int32_t)(value) ;
+ dst[0] = (float)(r * (1.0/0x7fffffff)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ r = (int32_t)(value) ;
+ dst[0] = (uint8_t)(MAX2(r, 0) >> 23); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)((int32_t)(((uint64_t)src[0]) * 0x7fffffff / 0xff)) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32_snorm {
+ uint64_t value;
+ struct {
+ int32_t r;
+ int32_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0x7fffffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0x7fffffff)); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_snorm pixel;
+ pixel.chan.r = (int32_t)(CLAMP(src[0], -1, 1) * (double)0x7fffffff);
+ pixel.chan.g = (int32_t)(CLAMP(src[1], -1, 1) * (double)0x7fffffff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0x7fffffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0x7fffffff)); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(MAX2(pixel.chan.r, 0) >> 23); /* r */
+ dst[1] = (uint8_t)(MAX2(pixel.chan.g, 0) >> 23); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_snorm pixel;
+ pixel.chan.r = (int32_t)(((uint64_t)src[0]) * 0x7fffffff / 0xff);
+ pixel.chan.g = (int32_t)(((uint64_t)src[1]) * 0x7fffffff / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32_snorm {
+ struct {
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0x7fffffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0x7fffffff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0/0x7fffffff)); /* b */
+ dst[3] = 1; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_snorm pixel;
+ pixel.chan.r = (int32_t)(CLAMP(src[0], -1, 1) * (double)0x7fffffff);
+ pixel.chan.g = (int32_t)(CLAMP(src[1], -1, 1) * (double)0x7fffffff);
+ pixel.chan.b = (int32_t)(CLAMP(src[2], -1, 1) * (double)0x7fffffff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0x7fffffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0x7fffffff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0/0x7fffffff)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(MAX2(pixel.chan.r, 0) >> 23); /* r */
+ dst[1] = (uint8_t)(MAX2(pixel.chan.g, 0) >> 23); /* g */
+ dst[2] = (uint8_t)(MAX2(pixel.chan.b, 0) >> 23); /* b */
+ dst[3] = 255; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_snorm pixel;
+ pixel.chan.r = (int32_t)(((uint64_t)src[0]) * 0x7fffffff / 0xff);
+ pixel.chan.g = (int32_t)(((uint64_t)src[1]) * 0x7fffffff / 0xff);
+ pixel.chan.b = (int32_t)(((uint64_t)src[2]) * 0x7fffffff / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32a32_snorm {
+ struct {
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32a32_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0x7fffffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0x7fffffff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0/0x7fffffff)); /* b */
+ dst[3] = (float)(pixel.chan.a * (1.0/0x7fffffff)); /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_snorm pixel;
+ pixel.chan.r = (int32_t)(CLAMP(src[0], -1, 1) * (double)0x7fffffff);
+ pixel.chan.g = (int32_t)(CLAMP(src[1], -1, 1) * (double)0x7fffffff);
+ pixel.chan.b = (int32_t)(CLAMP(src[2], -1, 1) * (double)0x7fffffff);
+ pixel.chan.a = (int32_t)(CLAMP(src[3], -1, 1) * (double)0x7fffffff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32a32_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0x7fffffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0x7fffffff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0/0x7fffffff)); /* b */
+ dst[3] = (float)(pixel.chan.a * (1.0/0x7fffffff)); /* a */
+}
+
+static INLINE void
+util_format_r32g32b32a32_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(MAX2(pixel.chan.r, 0) >> 23); /* r */
+ dst[1] = (uint8_t)(MAX2(pixel.chan.g, 0) >> 23); /* g */
+ dst[2] = (uint8_t)(MAX2(pixel.chan.b, 0) >> 23); /* b */
+ dst[3] = (uint8_t)(MAX2(pixel.chan.a, 0) >> 23); /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_snorm pixel;
+ pixel.chan.r = (int32_t)(((uint64_t)src[0]) * 0x7fffffff / 0xff);
+ pixel.chan.g = (int32_t)(((uint64_t)src[1]) * 0x7fffffff / 0xff);
+ pixel.chan.b = (int32_t)(((uint64_t)src[2]) * 0x7fffffff / 0xff);
+ pixel.chan.a = (int32_t)(((uint64_t)src[3]) * 0x7fffffff / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32_sscaled {
+ uint32_t value;
+ struct {
+ int32_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r32_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ r = (int32_t)(value) ;
+ dst[0] = (float)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)((int32_t)CLAMP(src[0], -2147483648, 2147483647)) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ r = (int32_t)(value) ;
+ dst[0] = (float)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ r = (int32_t)(value) ;
+ dst[0] = (uint8_t)(((uint64_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)((int32_t)(((uint64_t)src[0]) * 0x1 / 0xff)) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32_sscaled {
+ uint64_t value;
+ struct {
+ int32_t r;
+ int32_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_sscaled pixel;
+ pixel.chan.r = (int32_t)CLAMP(src[0], -2147483648, 2147483647);
+ pixel.chan.g = (int32_t)CLAMP(src[1], -2147483648, 2147483647);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.r, 0, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.g, 0, 1)) * 0xff / 0x1); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_sscaled pixel;
+ pixel.chan.r = (int32_t)(((uint64_t)src[0]) * 0x1 / 0xff);
+ pixel.chan.g = (int32_t)(((uint64_t)src[1]) * 0x1 / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32_sscaled {
+ struct {
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_sscaled pixel;
+ pixel.chan.r = (int32_t)CLAMP(src[0], -2147483648, 2147483647);
+ pixel.chan.g = (int32_t)CLAMP(src[1], -2147483648, 2147483647);
+ pixel.chan.b = (int32_t)CLAMP(src[2], -2147483648, 2147483647);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.r, 0, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.g, 0, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.b, 0, 1)) * 0xff / 0x1); /* b */
+ dst[3] = 255; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_sscaled pixel;
+ pixel.chan.r = (int32_t)(((uint64_t)src[0]) * 0x1 / 0xff);
+ pixel.chan.g = (int32_t)(((uint64_t)src[1]) * 0x1 / 0xff);
+ pixel.chan.b = (int32_t)(((uint64_t)src[2]) * 0x1 / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32a32_sscaled {
+ struct {
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32a32_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = (float)pixel.chan.a; /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_sscaled pixel;
+ pixel.chan.r = (int32_t)CLAMP(src[0], -2147483648, 2147483647);
+ pixel.chan.g = (int32_t)CLAMP(src[1], -2147483648, 2147483647);
+ pixel.chan.b = (int32_t)CLAMP(src[2], -2147483648, 2147483647);
+ pixel.chan.a = (int32_t)CLAMP(src[3], -2147483648, 2147483647);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32a32_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = (float)pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32a32_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.r, 0, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.g, 0, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.b, 0, 1)) * 0xff / 0x1); /* b */
+ dst[3] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.a, 0, 1)) * 0xff / 0x1); /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_sscaled pixel;
+ pixel.chan.r = (int32_t)(((uint64_t)src[0]) * 0x1 / 0xff);
+ pixel.chan.g = (int32_t)(((uint64_t)src[1]) * 0x1 / 0xff);
+ pixel.chan.b = (int32_t)(((uint64_t)src[2]) * 0x1 / 0xff);
+ pixel.chan.a = (int32_t)(((uint64_t)src[3]) * 0x1 / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16_float {
+ uint16_t value;
+ struct {
+ uint16_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.r); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16_float pixel;
+ pixel.chan.r = util_float_to_half(src[0]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.r); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.r)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16_float pixel;
+ pixel.chan.r = util_float_to_half((float)(src[0] * (1.0f/0xff)));
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16_float {
+ uint32_t value;
+ struct {
+ uint16_t r;
+ uint16_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.r); /* r */
+ dst[1] = util_half_to_float(pixel.chan.g); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16_float pixel;
+ pixel.chan.r = util_float_to_half(src[0]);
+ pixel.chan.g = util_float_to_half(src[1]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.r); /* r */
+ dst[1] = util_half_to_float(pixel.chan.g); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.r)); /* r */
+ dst[1] = float_to_ubyte(util_half_to_float(pixel.chan.g)); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16_float pixel;
+ pixel.chan.r = util_float_to_half((float)(src[0] * (1.0f/0xff)));
+ pixel.chan.g = util_float_to_half((float)(src[1] * (1.0f/0xff)));
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16_float {
+ struct {
+ uint16_t r;
+ uint16_t g;
+ uint16_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.r); /* r */
+ dst[1] = util_half_to_float(pixel.chan.g); /* g */
+ dst[2] = util_half_to_float(pixel.chan.b); /* b */
+ dst[3] = 1; /* a */
+ src += 6;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_float pixel;
+ pixel.chan.r = util_float_to_half(src[0]);
+ pixel.chan.g = util_float_to_half(src[1]);
+ pixel.chan.b = util_float_to_half(src[2]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 6;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.r); /* r */
+ dst[1] = util_half_to_float(pixel.chan.g); /* g */
+ dst[2] = util_half_to_float(pixel.chan.b); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.r)); /* r */
+ dst[1] = float_to_ubyte(util_half_to_float(pixel.chan.g)); /* g */
+ dst[2] = float_to_ubyte(util_half_to_float(pixel.chan.b)); /* b */
+ dst[3] = 255; /* a */
+ src += 6;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_float pixel;
+ pixel.chan.r = util_float_to_half((float)(src[0] * (1.0f/0xff)));
+ pixel.chan.g = util_float_to_half((float)(src[1] * (1.0f/0xff)));
+ pixel.chan.b = util_float_to_half((float)(src[2] * (1.0f/0xff)));
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 6;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16a16_float {
+ uint64_t value;
+ struct {
+ uint16_t r;
+ uint16_t g;
+ uint16_t b;
+ uint16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16a16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.r); /* r */
+ dst[1] = util_half_to_float(pixel.chan.g); /* g */
+ dst[2] = util_half_to_float(pixel.chan.b); /* b */
+ dst[3] = util_half_to_float(pixel.chan.a); /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_float pixel;
+ pixel.chan.r = util_float_to_half(src[0]);
+ pixel.chan.g = util_float_to_half(src[1]);
+ pixel.chan.b = util_float_to_half(src[2]);
+ pixel.chan.a = util_float_to_half(src[3]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16a16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.r); /* r */
+ dst[1] = util_half_to_float(pixel.chan.g); /* g */
+ dst[2] = util_half_to_float(pixel.chan.b); /* b */
+ dst[3] = util_half_to_float(pixel.chan.a); /* a */
+}
+
+static INLINE void
+util_format_r16g16b16a16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.r)); /* r */
+ dst[1] = float_to_ubyte(util_half_to_float(pixel.chan.g)); /* g */
+ dst[2] = float_to_ubyte(util_half_to_float(pixel.chan.b)); /* b */
+ dst[3] = float_to_ubyte(util_half_to_float(pixel.chan.a)); /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_float pixel;
+ pixel.chan.r = util_float_to_half((float)(src[0] * (1.0f/0xff)));
+ pixel.chan.g = util_float_to_half((float)(src[1] * (1.0f/0xff)));
+ pixel.chan.b = util_float_to_half((float)(src[2] * (1.0f/0xff)));
+ pixel.chan.a = util_float_to_half((float)(src[3] * (1.0f/0xff)));
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16_unorm {
+ uint16_t value;
+ struct {
+ uint16_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ r = value;
+ dst[0] = (float)(r * (1.0f/0xffff)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)util_iround(CLAMP(src[0], 0, 1) * 0xffff);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ r = value;
+ dst[0] = (float)(r * (1.0f/0xffff)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ r = value;
+ dst[0] = (uint8_t)(r >> 8); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16_unorm {
+ uint32_t value;
+ struct {
+ uint16_t r;
+ uint16_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ r = (value) & 0xffff;
+ g = value >> 16;
+ dst[0] = (float)(r * (1.0f/0xffff)); /* r */
+ dst[1] = (float)(g * (1.0f/0xffff)); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint16_t)util_iround(CLAMP(src[0], 0, 1) * 0xffff)) & 0xffff;
+ value |= ((uint16_t)util_iround(CLAMP(src[1], 0, 1) * 0xffff)) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ r = (value) & 0xffff;
+ g = value >> 16;
+ dst[0] = (float)(r * (1.0f/0xffff)); /* r */
+ dst[1] = (float)(g * (1.0f/0xffff)); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ r = (value) & 0xffff;
+ g = value >> 16;
+ dst[0] = (uint8_t)(r >> 8); /* r */
+ dst[1] = (uint8_t)(g >> 8); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff)) & 0xffff;
+ value |= ((uint16_t)(((uint32_t)src[1]) * 0xffff / 0xff)) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16_unorm {
+ struct {
+ uint16_t r;
+ uint16_t g;
+ uint16_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0f/0xffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0f/0xffff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0f/0xffff)); /* b */
+ dst[3] = 1; /* a */
+ src += 6;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_unorm pixel;
+ pixel.chan.r = (uint16_t)util_iround(CLAMP(src[0], 0, 1) * 0xffff);
+ pixel.chan.g = (uint16_t)util_iround(CLAMP(src[1], 0, 1) * 0xffff);
+ pixel.chan.b = (uint16_t)util_iround(CLAMP(src[2], 0, 1) * 0xffff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 6;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0f/0xffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0f/0xffff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0f/0xffff)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(pixel.chan.r >> 8); /* r */
+ dst[1] = (uint8_t)(pixel.chan.g >> 8); /* g */
+ dst[2] = (uint8_t)(pixel.chan.b >> 8); /* b */
+ dst[3] = 255; /* a */
+ src += 6;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_unorm pixel;
+ pixel.chan.r = (uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff);
+ pixel.chan.g = (uint16_t)(((uint32_t)src[1]) * 0xffff / 0xff);
+ pixel.chan.b = (uint16_t)(((uint32_t)src[2]) * 0xffff / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 6;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16a16_unorm {
+ uint64_t value;
+ struct {
+ uint16_t r;
+ uint16_t g;
+ uint16_t b;
+ uint16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16a16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0f/0xffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0f/0xffff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0f/0xffff)); /* b */
+ dst[3] = (float)(pixel.chan.a * (1.0f/0xffff)); /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_unorm pixel;
+ pixel.chan.r = (uint16_t)util_iround(CLAMP(src[0], 0, 1) * 0xffff);
+ pixel.chan.g = (uint16_t)util_iround(CLAMP(src[1], 0, 1) * 0xffff);
+ pixel.chan.b = (uint16_t)util_iround(CLAMP(src[2], 0, 1) * 0xffff);
+ pixel.chan.a = (uint16_t)util_iround(CLAMP(src[3], 0, 1) * 0xffff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16a16_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0f/0xffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0f/0xffff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0f/0xffff)); /* b */
+ dst[3] = (float)(pixel.chan.a * (1.0f/0xffff)); /* a */
+}
+
+static INLINE void
+util_format_r16g16b16a16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(pixel.chan.r >> 8); /* r */
+ dst[1] = (uint8_t)(pixel.chan.g >> 8); /* g */
+ dst[2] = (uint8_t)(pixel.chan.b >> 8); /* b */
+ dst[3] = (uint8_t)(pixel.chan.a >> 8); /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_unorm pixel;
+ pixel.chan.r = (uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff);
+ pixel.chan.g = (uint16_t)(((uint32_t)src[1]) * 0xffff / 0xff);
+ pixel.chan.b = (uint16_t)(((uint32_t)src[2]) * 0xffff / 0xff);
+ pixel.chan.a = (uint16_t)(((uint32_t)src[3]) * 0xffff / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16_uscaled {
+ uint16_t value;
+ struct {
+ uint16_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r16_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ r = value;
+ dst[0] = (float)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)CLAMP(src[0], 0, 65535);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ r = value;
+ dst[0] = (float)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ r = value;
+ dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((uint32_t)src[0]) * 0x1 / 0xff);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16_uscaled {
+ uint32_t value;
+ struct {
+ uint16_t r;
+ uint16_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ r = (value) & 0xffff;
+ g = value >> 16;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint16_t)CLAMP(src[0], 0, 65535)) & 0xffff;
+ value |= ((uint16_t)CLAMP(src[1], 0, 65535)) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ r = (value) & 0xffff;
+ g = value >> 16;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ r = (value) & 0xffff;
+ g = value >> 16;
+ dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MIN2(g, 1)) * 0xff / 0x1); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint16_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0xffff;
+ value |= ((uint16_t)(((uint32_t)src[1]) * 0x1 / 0xff)) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16_uscaled {
+ struct {
+ uint16_t r;
+ uint16_t g;
+ uint16_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 6;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_uscaled pixel;
+ pixel.chan.r = (uint16_t)CLAMP(src[0], 0, 65535);
+ pixel.chan.g = (uint16_t)CLAMP(src[1], 0, 65535);
+ pixel.chan.b = (uint16_t)CLAMP(src[2], 0, 65535);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 6;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(((uint32_t)MIN2(pixel.chan.r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MIN2(pixel.chan.g, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint32_t)MIN2(pixel.chan.b, 1)) * 0xff / 0x1); /* b */
+ dst[3] = 255; /* a */
+ src += 6;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_uscaled pixel;
+ pixel.chan.r = (uint16_t)(((uint32_t)src[0]) * 0x1 / 0xff);
+ pixel.chan.g = (uint16_t)(((uint32_t)src[1]) * 0x1 / 0xff);
+ pixel.chan.b = (uint16_t)(((uint32_t)src[2]) * 0x1 / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 6;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16a16_uscaled {
+ uint64_t value;
+ struct {
+ uint16_t r;
+ uint16_t g;
+ uint16_t b;
+ uint16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16a16_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = (float)pixel.chan.a; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_uscaled pixel;
+ pixel.chan.r = (uint16_t)CLAMP(src[0], 0, 65535);
+ pixel.chan.g = (uint16_t)CLAMP(src[1], 0, 65535);
+ pixel.chan.b = (uint16_t)CLAMP(src[2], 0, 65535);
+ pixel.chan.a = (uint16_t)CLAMP(src[3], 0, 65535);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16a16_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = (float)pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16a16_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(((uint32_t)MIN2(pixel.chan.r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MIN2(pixel.chan.g, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint32_t)MIN2(pixel.chan.b, 1)) * 0xff / 0x1); /* b */
+ dst[3] = (uint8_t)(((uint32_t)MIN2(pixel.chan.a, 1)) * 0xff / 0x1); /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_uscaled pixel;
+ pixel.chan.r = (uint16_t)(((uint32_t)src[0]) * 0x1 / 0xff);
+ pixel.chan.g = (uint16_t)(((uint32_t)src[1]) * 0x1 / 0xff);
+ pixel.chan.b = (uint16_t)(((uint32_t)src[2]) * 0x1 / 0xff);
+ pixel.chan.a = (uint16_t)(((uint32_t)src[3]) * 0x1 / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16_snorm {
+ uint16_t value;
+ struct {
+ int16_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ r = (int16_t)(value) ;
+ dst[0] = (float)(r * (1.0f/0x7fff)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)util_iround(CLAMP(src[0], -1, 1) * 0x7fff)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ r = (int16_t)(value) ;
+ dst[0] = (float)(r * (1.0f/0x7fff)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ r = (int16_t)(value) ;
+ dst[0] = (uint8_t)(MAX2(r, 0) >> 7); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16_snorm {
+ uint32_t value;
+ struct {
+ int16_t r;
+ int16_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ r = ((int32_t)(value << 16) ) >> 16;
+ g = ((int32_t)(value) ) >> 16;
+ dst[0] = (float)(r * (1.0f/0x7fff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x7fff)); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int16_t)util_iround(CLAMP(src[0], -1, 1) * 0x7fff)) & 0xffff) ;
+ value |= (uint32_t)(((int16_t)util_iround(CLAMP(src[1], -1, 1) * 0x7fff)) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ r = ((int32_t)(value << 16) ) >> 16;
+ g = ((int32_t)(value) ) >> 16;
+ dst[0] = (float)(r * (1.0f/0x7fff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x7fff)); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ r = ((int32_t)(value << 16) ) >> 16;
+ g = ((int32_t)(value) ) >> 16;
+ dst[0] = (uint8_t)(MAX2(r, 0) >> 7); /* r */
+ dst[1] = (uint8_t)(MAX2(g, 0) >> 7); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff)) & 0xffff) ;
+ value |= (uint32_t)(((int16_t)(((uint32_t)src[1]) * 0x7fff / 0xff)) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16_snorm {
+ struct {
+ int16_t r;
+ int16_t g;
+ int16_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0f/0x7fff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0f/0x7fff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0f/0x7fff)); /* b */
+ dst[3] = 1; /* a */
+ src += 6;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_snorm pixel;
+ pixel.chan.r = (int16_t)util_iround(CLAMP(src[0], -1, 1) * 0x7fff);
+ pixel.chan.g = (int16_t)util_iround(CLAMP(src[1], -1, 1) * 0x7fff);
+ pixel.chan.b = (int16_t)util_iround(CLAMP(src[2], -1, 1) * 0x7fff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 6;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0f/0x7fff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0f/0x7fff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0f/0x7fff)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(MAX2(pixel.chan.r, 0) >> 7); /* r */
+ dst[1] = (uint8_t)(MAX2(pixel.chan.g, 0) >> 7); /* g */
+ dst[2] = (uint8_t)(MAX2(pixel.chan.b, 0) >> 7); /* b */
+ dst[3] = 255; /* a */
+ src += 6;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_snorm pixel;
+ pixel.chan.r = (int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff);
+ pixel.chan.g = (int16_t)(((uint32_t)src[1]) * 0x7fff / 0xff);
+ pixel.chan.b = (int16_t)(((uint32_t)src[2]) * 0x7fff / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 6;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16a16_snorm {
+ uint64_t value;
+ struct {
+ int16_t r;
+ int16_t g;
+ int16_t b;
+ int16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16a16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0f/0x7fff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0f/0x7fff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0f/0x7fff)); /* b */
+ dst[3] = (float)(pixel.chan.a * (1.0f/0x7fff)); /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_snorm pixel;
+ pixel.chan.r = (int16_t)util_iround(CLAMP(src[0], -1, 1) * 0x7fff);
+ pixel.chan.g = (int16_t)util_iround(CLAMP(src[1], -1, 1) * 0x7fff);
+ pixel.chan.b = (int16_t)util_iround(CLAMP(src[2], -1, 1) * 0x7fff);
+ pixel.chan.a = (int16_t)util_iround(CLAMP(src[3], -1, 1) * 0x7fff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16a16_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0f/0x7fff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0f/0x7fff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0f/0x7fff)); /* b */
+ dst[3] = (float)(pixel.chan.a * (1.0f/0x7fff)); /* a */
+}
+
+static INLINE void
+util_format_r16g16b16a16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(MAX2(pixel.chan.r, 0) >> 7); /* r */
+ dst[1] = (uint8_t)(MAX2(pixel.chan.g, 0) >> 7); /* g */
+ dst[2] = (uint8_t)(MAX2(pixel.chan.b, 0) >> 7); /* b */
+ dst[3] = (uint8_t)(MAX2(pixel.chan.a, 0) >> 7); /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_snorm pixel;
+ pixel.chan.r = (int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff);
+ pixel.chan.g = (int16_t)(((uint32_t)src[1]) * 0x7fff / 0xff);
+ pixel.chan.b = (int16_t)(((uint32_t)src[2]) * 0x7fff / 0xff);
+ pixel.chan.a = (int16_t)(((uint32_t)src[3]) * 0x7fff / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16_sscaled {
+ uint16_t value;
+ struct {
+ int16_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r16_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ r = (int16_t)(value) ;
+ dst[0] = (float)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)CLAMP(src[0], -32768, 32767)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ r = (int16_t)(value) ;
+ dst[0] = (float)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ r = (int16_t)(value) ;
+ dst[0] = (uint8_t)(((uint32_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)(((uint32_t)src[0]) * 0x1 / 0xff)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16_sscaled {
+ uint32_t value;
+ struct {
+ int16_t r;
+ int16_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ r = ((int32_t)(value << 16) ) >> 16;
+ g = ((int32_t)(value) ) >> 16;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int16_t)CLAMP(src[0], -32768, 32767)) & 0xffff) ;
+ value |= (uint32_t)(((int16_t)CLAMP(src[1], -32768, 32767)) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ r = ((int32_t)(value << 16) ) >> 16;
+ g = ((int32_t)(value) ) >> 16;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ r = ((int32_t)(value << 16) ) >> 16;
+ g = ((int32_t)(value) ) >> 16;
+ dst[0] = (uint8_t)(((uint32_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)CLAMP(g, 0, 1)) * 0xff / 0x1); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int16_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0xffff) ;
+ value |= (uint32_t)(((int16_t)(((uint32_t)src[1]) * 0x1 / 0xff)) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16_sscaled {
+ struct {
+ int16_t r;
+ int16_t g;
+ int16_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 6;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_sscaled pixel;
+ pixel.chan.r = (int16_t)CLAMP(src[0], -32768, 32767);
+ pixel.chan.g = (int16_t)CLAMP(src[1], -32768, 32767);
+ pixel.chan.b = (int16_t)CLAMP(src[2], -32768, 32767);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 6;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.r, 0, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.g, 0, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.b, 0, 1)) * 0xff / 0x1); /* b */
+ dst[3] = 255; /* a */
+ src += 6;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_sscaled pixel;
+ pixel.chan.r = (int16_t)(((uint32_t)src[0]) * 0x1 / 0xff);
+ pixel.chan.g = (int16_t)(((uint32_t)src[1]) * 0x1 / 0xff);
+ pixel.chan.b = (int16_t)(((uint32_t)src[2]) * 0x1 / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 6;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16a16_sscaled {
+ uint64_t value;
+ struct {
+ int16_t r;
+ int16_t g;
+ int16_t b;
+ int16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16a16_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = (float)pixel.chan.a; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_sscaled pixel;
+ pixel.chan.r = (int16_t)CLAMP(src[0], -32768, 32767);
+ pixel.chan.g = (int16_t)CLAMP(src[1], -32768, 32767);
+ pixel.chan.b = (int16_t)CLAMP(src[2], -32768, 32767);
+ pixel.chan.a = (int16_t)CLAMP(src[3], -32768, 32767);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16a16_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = (float)pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16a16_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.r, 0, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.g, 0, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.b, 0, 1)) * 0xff / 0x1); /* b */
+ dst[3] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.a, 0, 1)) * 0xff / 0x1); /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_sscaled pixel;
+ pixel.chan.r = (int16_t)(((uint32_t)src[0]) * 0x1 / 0xff);
+ pixel.chan.g = (int16_t)(((uint32_t)src[1]) * 0x1 / 0xff);
+ pixel.chan.b = (int16_t)(((uint32_t)src[2]) * 0x1 / 0xff);
+ pixel.chan.a = (int16_t)(((uint32_t)src[3]) * 0x1 / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8_unorm {
+ uint8_t value;
+ struct {
+ uint8_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t r;
+ r = value;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= float_to_ubyte(src[0]);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t r;
+ r = value;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t r;
+ r = value;
+ dst[0] = r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= src[0];
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8_unorm {
+ uint16_t value;
+ struct {
+ uint8_t r;
+ uint8_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ uint16_t g;
+ r = (value) & 0xff;
+ g = value >> 8;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (float_to_ubyte(src[0])) & 0xff;
+ value |= (float_to_ubyte(src[1])) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ uint16_t g;
+ r = (value) & 0xff;
+ g = value >> 8;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ uint16_t g;
+ r = (value) & 0xff;
+ g = value >> 8;
+ dst[0] = r; /* r */
+ dst[1] = g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (src[0]) & 0xff;
+ value |= (src[1]) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8_unorm {
+ struct {
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = ubyte_to_float(pixel.chan.r); /* r */
+ dst[1] = ubyte_to_float(pixel.chan.g); /* g */
+ dst[2] = ubyte_to_float(pixel.chan.b); /* b */
+ dst[3] = 1; /* a */
+ src += 3;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_unorm pixel;
+ pixel.chan.r = float_to_ubyte(src[0]);
+ pixel.chan.g = float_to_ubyte(src[1]);
+ pixel.chan.b = float_to_ubyte(src[2]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 3;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r8g8b8_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = ubyte_to_float(pixel.chan.r); /* r */
+ dst[1] = ubyte_to_float(pixel.chan.g); /* g */
+ dst[2] = ubyte_to_float(pixel.chan.b); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = 255; /* a */
+ src += 3;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_unorm pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.g = src[1];
+ pixel.chan.b = src[2];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 3;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8a8_unorm {
+ uint32_t value;
+ struct {
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ uint8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8a8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (float_to_ubyte(src[0])) & 0xff;
+ value |= ((float_to_ubyte(src[1])) & 0xff) << 8;
+ value |= ((float_to_ubyte(src[2])) & 0xff) << 16;
+ value |= (float_to_ubyte(src[3])) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = ubyte_to_float(g); /* g */
+ dst[2] = ubyte_to_float(b); /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+}
+
+static INLINE void
+util_format_r8g8b8a8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = r; /* r */
+ dst[1] = g; /* g */
+ dst[2] = b; /* b */
+ dst[3] = a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (src[0]) & 0xff;
+ value |= ((src[1]) & 0xff) << 8;
+ value |= ((src[2]) & 0xff) << 16;
+ value |= (src[3]) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8_uscaled {
+ uint8_t value;
+ struct {
+ uint8_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r8_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t r;
+ r = value;
+ dst[0] = (float)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)CLAMP(src[0], 0, 255);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t r;
+ r = value;
+ dst[0] = (float)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t r;
+ r = value;
+ dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)(((uint32_t)src[0]) * 0x1 / 0xff);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8_uscaled {
+ uint16_t value;
+ struct {
+ uint8_t r;
+ uint8_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ uint16_t g;
+ r = (value) & 0xff;
+ g = value >> 8;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint8_t)CLAMP(src[0], 0, 255)) & 0xff;
+ value |= ((uint8_t)CLAMP(src[1], 0, 255)) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ uint16_t g;
+ r = (value) & 0xff;
+ g = value >> 8;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ uint16_t g;
+ r = (value) & 0xff;
+ g = value >> 8;
+ dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MIN2(g, 1)) * 0xff / 0x1); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint8_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0xff;
+ value |= ((uint8_t)(((uint32_t)src[1]) * 0x1 / 0xff)) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8_uscaled {
+ struct {
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 3;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_uscaled pixel;
+ pixel.chan.r = (uint8_t)CLAMP(src[0], 0, 255);
+ pixel.chan.g = (uint8_t)CLAMP(src[1], 0, 255);
+ pixel.chan.b = (uint8_t)CLAMP(src[2], 0, 255);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 3;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r8g8b8_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_uscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(((uint32_t)MIN2(pixel.chan.r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MIN2(pixel.chan.g, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint32_t)MIN2(pixel.chan.b, 1)) * 0xff / 0x1); /* b */
+ dst[3] = 255; /* a */
+ src += 3;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_uscaled pixel;
+ pixel.chan.r = (uint8_t)(((uint32_t)src[0]) * 0x1 / 0xff);
+ pixel.chan.g = (uint8_t)(((uint32_t)src[1]) * 0x1 / 0xff);
+ pixel.chan.b = (uint8_t)(((uint32_t)src[2]) * 0x1 / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 3;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8a8_uscaled {
+ uint32_t value;
+ struct {
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ uint8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8a8_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = (float)b; /* b */
+ dst[3] = (float)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint8_t)CLAMP(src[0], 0, 255)) & 0xff;
+ value |= (((uint8_t)CLAMP(src[1], 0, 255)) & 0xff) << 8;
+ value |= (((uint8_t)CLAMP(src[2], 0, 255)) & 0xff) << 16;
+ value |= ((uint8_t)CLAMP(src[3], 0, 255)) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = (float)b; /* b */
+ dst[3] = (float)a; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8a8_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MIN2(g, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint32_t)MIN2(b, 1)) * 0xff / 0x1); /* b */
+ dst[3] = (uint8_t)(((uint32_t)MIN2(a, 1)) * 0xff / 0x1); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint8_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0xff;
+ value |= (((uint8_t)(((uint32_t)src[1]) * 0x1 / 0xff)) & 0xff) << 8;
+ value |= (((uint8_t)(((uint32_t)src[2]) * 0x1 / 0xff)) & 0xff) << 16;
+ value |= ((uint8_t)(((uint32_t)src[3]) * 0x1 / 0xff)) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8_snorm {
+ uint8_t value;
+ struct {
+ int8_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t r;
+ r = (int8_t)(value) ;
+ dst[0] = (float)(r * (1.0f/0x7f)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)util_iround(CLAMP(src[0], -1, 1) * 0x7f)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ int8_t r;
+ r = (int8_t)(value) ;
+ dst[0] = (float)(r * (1.0f/0x7f)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t r;
+ r = (int8_t)(value) ;
+ dst[0] = (uint8_t)(((uint32_t)MAX2(r, 0)) * 0xff / 0x7f); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)(src[0] >> 1)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8_snorm {
+ uint16_t value;
+ struct {
+ int8_t r;
+ int8_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t g;
+ r = ((int16_t)(value << 8) ) >> 8;
+ g = ((int16_t)(value) ) >> 8;
+ dst[0] = (float)(r * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(g * (1.0f/0x7f)); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((int8_t)util_iround(CLAMP(src[0], -1, 1) * 0x7f)) & 0xff) ;
+ value |= (uint16_t)(((int8_t)util_iround(CLAMP(src[1], -1, 1) * 0x7f)) << 8) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t g;
+ r = ((int16_t)(value << 8) ) >> 8;
+ g = ((int16_t)(value) ) >> 8;
+ dst[0] = (float)(r * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(g * (1.0f/0x7f)); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t g;
+ r = ((int16_t)(value << 8) ) >> 8;
+ g = ((int16_t)(value) ) >> 8;
+ dst[0] = (uint8_t)(((uint32_t)MAX2(r, 0)) * 0xff / 0x7f); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MAX2(g, 0)) * 0xff / 0x7f); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((int8_t)(src[0] >> 1)) & 0xff) ;
+ value |= (uint16_t)(((int8_t)(src[1] >> 1)) << 8) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8_snorm {
+ struct {
+ int8_t r;
+ int8_t g;
+ int8_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0f/0x7f)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0f/0x7f)); /* b */
+ dst[3] = 1; /* a */
+ src += 3;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_snorm pixel;
+ pixel.chan.r = (int8_t)util_iround(CLAMP(src[0], -1, 1) * 0x7f);
+ pixel.chan.g = (int8_t)util_iround(CLAMP(src[1], -1, 1) * 0x7f);
+ pixel.chan.b = (int8_t)util_iround(CLAMP(src[2], -1, 1) * 0x7f);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 3;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r8g8b8_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0f/0x7f)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0f/0x7f)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(((uint32_t)MAX2(pixel.chan.r, 0)) * 0xff / 0x7f); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MAX2(pixel.chan.g, 0)) * 0xff / 0x7f); /* g */
+ dst[2] = (uint8_t)(((uint32_t)MAX2(pixel.chan.b, 0)) * 0xff / 0x7f); /* b */
+ dst[3] = 255; /* a */
+ src += 3;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_snorm pixel;
+ pixel.chan.r = (int8_t)(src[0] >> 1);
+ pixel.chan.g = (int8_t)(src[1] >> 1);
+ pixel.chan.b = (int8_t)(src[2] >> 1);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 3;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8a8_snorm {
+ uint32_t value;
+ struct {
+ int8_t r;
+ int8_t g;
+ int8_t b;
+ int8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8a8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = ((int32_t)(value << 8) ) >> 24;
+ a = ((int32_t)(value) ) >> 24;
+ dst[0] = (float)(r * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(g * (1.0f/0x7f)); /* g */
+ dst[2] = (float)(b * (1.0f/0x7f)); /* b */
+ dst[3] = (float)(a * (1.0f/0x7f)); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int8_t)util_iround(CLAMP(src[0], -1, 1) * 0x7f)) & 0xff) ;
+ value |= (uint32_t)((((int8_t)util_iround(CLAMP(src[1], -1, 1) * 0x7f)) & 0xff) << 8) ;
+ value |= (uint32_t)((((int8_t)util_iround(CLAMP(src[2], -1, 1) * 0x7f)) & 0xff) << 16) ;
+ value |= (uint32_t)(((int8_t)util_iround(CLAMP(src[3], -1, 1) * 0x7f)) << 24) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = ((int32_t)(value << 8) ) >> 24;
+ a = ((int32_t)(value) ) >> 24;
+ dst[0] = (float)(r * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(g * (1.0f/0x7f)); /* g */
+ dst[2] = (float)(b * (1.0f/0x7f)); /* b */
+ dst[3] = (float)(a * (1.0f/0x7f)); /* a */
+}
+
+static INLINE void
+util_format_r8g8b8a8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = ((int32_t)(value << 8) ) >> 24;
+ a = ((int32_t)(value) ) >> 24;
+ dst[0] = (uint8_t)(((uint32_t)MAX2(r, 0)) * 0xff / 0x7f); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MAX2(g, 0)) * 0xff / 0x7f); /* g */
+ dst[2] = (uint8_t)(((uint32_t)MAX2(b, 0)) * 0xff / 0x7f); /* b */
+ dst[3] = (uint8_t)(((uint32_t)MAX2(a, 0)) * 0xff / 0x7f); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int8_t)(src[0] >> 1)) & 0xff) ;
+ value |= (uint32_t)((((int8_t)(src[1] >> 1)) & 0xff) << 8) ;
+ value |= (uint32_t)((((int8_t)(src[2] >> 1)) & 0xff) << 16) ;
+ value |= (uint32_t)(((int8_t)(src[3] >> 1)) << 24) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8_sscaled {
+ uint8_t value;
+ struct {
+ int8_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r8_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t r;
+ r = (int8_t)(value) ;
+ dst[0] = (float)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)CLAMP(src[0], -128, 127)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ int8_t r;
+ r = (int8_t)(value) ;
+ dst[0] = (float)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t r;
+ r = (int8_t)(value) ;
+ dst[0] = (uint8_t)(((uint32_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)(((uint32_t)src[0]) * 0x1 / 0xff)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8_sscaled {
+ uint16_t value;
+ struct {
+ int8_t r;
+ int8_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t g;
+ r = ((int16_t)(value << 8) ) >> 8;
+ g = ((int16_t)(value) ) >> 8;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((int8_t)CLAMP(src[0], -128, 127)) & 0xff) ;
+ value |= (uint16_t)(((int8_t)CLAMP(src[1], -128, 127)) << 8) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t g;
+ r = ((int16_t)(value << 8) ) >> 8;
+ g = ((int16_t)(value) ) >> 8;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t g;
+ r = ((int16_t)(value << 8) ) >> 8;
+ g = ((int16_t)(value) ) >> 8;
+ dst[0] = (uint8_t)(((uint32_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)CLAMP(g, 0, 1)) * 0xff / 0x1); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((int8_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0xff) ;
+ value |= (uint16_t)(((int8_t)(((uint32_t)src[1]) * 0x1 / 0xff)) << 8) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8_sscaled {
+ struct {
+ int8_t r;
+ int8_t g;
+ int8_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 3;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_sscaled pixel;
+ pixel.chan.r = (int8_t)CLAMP(src[0], -128, 127);
+ pixel.chan.g = (int8_t)CLAMP(src[1], -128, 127);
+ pixel.chan.b = (int8_t)CLAMP(src[2], -128, 127);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 3;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r8g8b8_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)pixel.chan.r; /* r */
+ dst[1] = (float)pixel.chan.g; /* g */
+ dst[2] = (float)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_sscaled pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.r, 0, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.g, 0, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.b, 0, 1)) * 0xff / 0x1); /* b */
+ dst[3] = 255; /* a */
+ src += 3;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_sscaled pixel;
+ pixel.chan.r = (int8_t)(((uint32_t)src[0]) * 0x1 / 0xff);
+ pixel.chan.g = (int8_t)(((uint32_t)src[1]) * 0x1 / 0xff);
+ pixel.chan.b = (int8_t)(((uint32_t)src[2]) * 0x1 / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 3;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8a8_sscaled {
+ uint32_t value;
+ struct {
+ int8_t r;
+ int8_t g;
+ int8_t b;
+ int8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8a8_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = ((int32_t)(value << 8) ) >> 24;
+ a = ((int32_t)(value) ) >> 24;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = (float)b; /* b */
+ dst[3] = (float)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int8_t)CLAMP(src[0], -128, 127)) & 0xff) ;
+ value |= (uint32_t)((((int8_t)CLAMP(src[1], -128, 127)) & 0xff) << 8) ;
+ value |= (uint32_t)((((int8_t)CLAMP(src[2], -128, 127)) & 0xff) << 16) ;
+ value |= (uint32_t)(((int8_t)CLAMP(src[3], -128, 127)) << 24) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = ((int32_t)(value << 8) ) >> 24;
+ a = ((int32_t)(value) ) >> 24;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = (float)b; /* b */
+ dst[3] = (float)a; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8a8_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = ((int32_t)(value << 8) ) >> 24;
+ a = ((int32_t)(value) ) >> 24;
+ dst[0] = (uint8_t)(((uint32_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)CLAMP(g, 0, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint32_t)CLAMP(b, 0, 1)) * 0xff / 0x1); /* b */
+ dst[3] = (uint8_t)(((uint32_t)CLAMP(a, 0, 1)) * 0xff / 0x1); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int8_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0xff) ;
+ value |= (uint32_t)((((int8_t)(((uint32_t)src[1]) * 0x1 / 0xff)) & 0xff) << 8) ;
+ value |= (uint32_t)((((int8_t)(((uint32_t)src[2]) * 0x1 / 0xff)) & 0xff) << 16) ;
+ value |= (uint32_t)(((int8_t)(((uint32_t)src[3]) * 0x1 / 0xff)) << 24) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32_fixed {
+ uint32_t value;
+ struct {
+ int32_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r32_fixed_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32_fixed pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_fixed_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32_fixed pixel;
+ pixel.chan.r = (int32_t)(CLAMP(src[0], -65536, 65535) * (double)0x10000);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32_fixed_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32_fixed pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32_fixed_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32_fixed pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)util_iround((CLAMP(pixel.chan.r, 0, 65536) * (1.0/0x10000)) * 0xff); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_fixed_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32_fixed pixel;
+ pixel.chan.r = (int32_t)((float)(src[0] * (1.0f/0xff)) * (double)0x10000);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32_fixed {
+ uint64_t value;
+ struct {
+ int32_t r;
+ int32_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32_fixed_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_fixed pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0x10000)); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_fixed_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_fixed pixel;
+ pixel.chan.r = (int32_t)(CLAMP(src[0], -65536, 65535) * (double)0x10000);
+ pixel.chan.g = (int32_t)(CLAMP(src[1], -65536, 65535) * (double)0x10000);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_fixed_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32_fixed pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0x10000)); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32_fixed_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_fixed pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)util_iround((CLAMP(pixel.chan.r, 0, 65536) * (1.0/0x10000)) * 0xff); /* r */
+ dst[1] = (uint8_t)util_iround((CLAMP(pixel.chan.g, 0, 65536) * (1.0/0x10000)) * 0xff); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 255; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_fixed_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_fixed pixel;
+ pixel.chan.r = (int32_t)((float)(src[0] * (1.0f/0xff)) * (double)0x10000);
+ pixel.chan.g = (int32_t)((float)(src[1] * (1.0f/0xff)) * (double)0x10000);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32_fixed {
+ struct {
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32_fixed_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_fixed pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0x10000)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0/0x10000)); /* b */
+ dst[3] = 1; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_fixed_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_fixed pixel;
+ pixel.chan.r = (int32_t)(CLAMP(src[0], -65536, 65535) * (double)0x10000);
+ pixel.chan.g = (int32_t)(CLAMP(src[1], -65536, 65535) * (double)0x10000);
+ pixel.chan.b = (int32_t)(CLAMP(src[2], -65536, 65535) * (double)0x10000);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_fixed_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32_fixed pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0x10000)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0/0x10000)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32_fixed_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_fixed pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)util_iround((CLAMP(pixel.chan.r, 0, 65536) * (1.0/0x10000)) * 0xff); /* r */
+ dst[1] = (uint8_t)util_iround((CLAMP(pixel.chan.g, 0, 65536) * (1.0/0x10000)) * 0xff); /* g */
+ dst[2] = (uint8_t)util_iround((CLAMP(pixel.chan.b, 0, 65536) * (1.0/0x10000)) * 0xff); /* b */
+ dst[3] = 255; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_fixed_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_fixed pixel;
+ pixel.chan.r = (int32_t)((float)(src[0] * (1.0f/0xff)) * (double)0x10000);
+ pixel.chan.g = (int32_t)((float)(src[1] * (1.0f/0xff)) * (double)0x10000);
+ pixel.chan.b = (int32_t)((float)(src[2] * (1.0f/0xff)) * (double)0x10000);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32a32_fixed {
+ struct {
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32a32_fixed_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_fixed pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0x10000)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0/0x10000)); /* b */
+ dst[3] = (float)(pixel.chan.a * (1.0/0x10000)); /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_fixed_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_fixed pixel;
+ pixel.chan.r = (int32_t)(CLAMP(src[0], -65536, 65535) * (double)0x10000);
+ pixel.chan.g = (int32_t)(CLAMP(src[1], -65536, 65535) * (double)0x10000);
+ pixel.chan.b = (int32_t)(CLAMP(src[2], -65536, 65535) * (double)0x10000);
+ pixel.chan.a = (int32_t)(CLAMP(src[3], -65536, 65535) * (double)0x10000);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_fixed_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32a32_fixed pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0/0x10000)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0/0x10000)); /* b */
+ dst[3] = (float)(pixel.chan.a * (1.0/0x10000)); /* a */
+}
+
+static INLINE void
+util_format_r32g32b32a32_fixed_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_fixed pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)util_iround((CLAMP(pixel.chan.r, 0, 65536) * (1.0/0x10000)) * 0xff); /* r */
+ dst[1] = (uint8_t)util_iround((CLAMP(pixel.chan.g, 0, 65536) * (1.0/0x10000)) * 0xff); /* g */
+ dst[2] = (uint8_t)util_iround((CLAMP(pixel.chan.b, 0, 65536) * (1.0/0x10000)) * 0xff); /* b */
+ dst[3] = (uint8_t)util_iround((CLAMP(pixel.chan.a, 0, 65536) * (1.0/0x10000)) * 0xff); /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_fixed_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_fixed pixel;
+ pixel.chan.r = (int32_t)((float)(src[0] * (1.0f/0xff)) * (double)0x10000);
+ pixel.chan.g = (int32_t)((float)(src[1] * (1.0f/0xff)) * (double)0x10000);
+ pixel.chan.b = (int32_t)((float)(src[2] * (1.0f/0xff)) * (double)0x10000);
+ pixel.chan.a = (int32_t)((float)(src[3] * (1.0f/0xff)) * (double)0x10000);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r10g10b10x2_uscaled {
+ uint32_t value;
+ struct {
+ unsigned r:10;
+ unsigned g:10;
+ unsigned b:10;
+ unsigned x:2;
+ } chan;
+};
+
+static INLINE void
+util_format_r10g10b10x2_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ b = (value >> 20) & 0x3ff;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = (float)b; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10x2_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)CLAMP(src[0], 0, 1023)) & 0x3ff;
+ value |= (((uint32_t)CLAMP(src[1], 0, 1023)) & 0x3ff) << 10;
+ value |= (((uint32_t)CLAMP(src[2], 0, 1023)) & 0x3ff) << 20;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10x2_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ b = (value >> 20) & 0x3ff;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = (float)b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r10g10b10x2_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ b = (value >> 20) & 0x3ff;
+ dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MIN2(g, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint32_t)MIN2(b, 1)) * 0xff / 0x1); /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10x2_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0x3ff;
+ value |= (((uint32_t)(((uint32_t)src[1]) * 0x1 / 0xff)) & 0x3ff) << 10;
+ value |= (((uint32_t)(((uint32_t)src[2]) * 0x1 / 0xff)) & 0x3ff) << 20;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r10g10b10x2_snorm {
+ uint32_t value;
+ struct {
+ int r:10;
+ int g:10;
+ int b:10;
+ unsigned x:2;
+ } chan;
+};
+
+static INLINE void
+util_format_r10g10b10x2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ r = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ b = ((int32_t)(value << 2) ) >> 22;
+ dst[0] = (float)(r * (1.0f/0x1ff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x1ff)); /* g */
+ dst[2] = (float)(b * (1.0f/0x1ff)); /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10x2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)util_iround(CLAMP(src[0], -1, 1) * 0x1ff)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)util_iround(CLAMP(src[1], -1, 1) * 0x1ff)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)util_iround(CLAMP(src[2], -1, 1) * 0x1ff)) & 0x3ff) << 20) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10x2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ r = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ b = ((int32_t)(value << 2) ) >> 22;
+ dst[0] = (float)(r * (1.0f/0x1ff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x1ff)); /* g */
+ dst[2] = (float)(b * (1.0f/0x1ff)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r10g10b10x2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ r = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ b = ((int32_t)(value << 2) ) >> 22;
+ dst[0] = (uint8_t)(MAX2(r, 0) >> 1); /* r */
+ dst[1] = (uint8_t)(MAX2(g, 0) >> 1); /* g */
+ dst[2] = (uint8_t)(MAX2(b, 0) >> 1); /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10x2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)(((uint32_t)src[0]) * 0x1ff / 0xff)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)(((uint32_t)src[1]) * 0x1ff / 0xff)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)(((uint32_t)src[2]) * 0x1ff / 0xff)) & 0x3ff) << 20) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r4a4_unorm {
+ uint8_t value;
+ struct {
+ unsigned a:4;
+ unsigned r:4;
+ } chan;
+};
+
+static INLINE void
+util_format_r4a4_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t a;
+ uint8_t r;
+ a = (value) & 0xf;
+ r = value >> 4;
+ dst[0] = (float)(r * (1.0f/0xf)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0xf)); /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r4a4_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= ((uint8_t)util_iround(CLAMP(src[3], 0, 1) * 0xf)) & 0xf;
+ value |= ((uint8_t)util_iround(CLAMP(src[0], 0, 1) * 0xf)) << 4;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r4a4_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t a;
+ uint8_t r;
+ a = (value) & 0xf;
+ r = value >> 4;
+ dst[0] = (float)(r * (1.0f/0xf)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0xf)); /* a */
+}
+
+static INLINE void
+util_format_r4a4_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t a;
+ uint8_t r;
+ a = (value) & 0xf;
+ r = value >> 4;
+ dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0xf); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0xf); /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r4a4_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= ((uint8_t)(src[3] >> 4)) & 0xf;
+ value |= ((uint8_t)(src[0] >> 4)) << 4;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a4r4_unorm {
+ uint8_t value;
+ struct {
+ unsigned r:4;
+ unsigned a:4;
+ } chan;
+};
+
+static INLINE void
+util_format_a4r4_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t r;
+ uint8_t a;
+ r = (value) & 0xf;
+ a = value >> 4;
+ dst[0] = (float)(r * (1.0f/0xf)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0xf)); /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a4r4_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= ((uint8_t)util_iround(CLAMP(src[0], 0, 1) * 0xf)) & 0xf;
+ value |= ((uint8_t)util_iround(CLAMP(src[3], 0, 1) * 0xf)) << 4;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a4r4_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t r;
+ uint8_t a;
+ r = (value) & 0xf;
+ a = value >> 4;
+ dst[0] = (float)(r * (1.0f/0xf)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0xf)); /* a */
+}
+
+static INLINE void
+util_format_a4r4_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t r;
+ uint8_t a;
+ r = (value) & 0xf;
+ a = value >> 4;
+ dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0xf); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0xf); /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a4r4_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= ((uint8_t)(src[0] >> 4)) & 0xf;
+ value |= ((uint8_t)(src[3] >> 4)) << 4;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8a8_unorm {
+ uint16_t value;
+ struct {
+ uint8_t r;
+ uint8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r8a8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ uint16_t a;
+ r = (value) & 0xff;
+ a = value >> 8;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8a8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (float_to_ubyte(src[0])) & 0xff;
+ value |= (float_to_ubyte(src[3])) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8a8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ uint16_t a;
+ r = (value) & 0xff;
+ a = value >> 8;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+}
+
+static INLINE void
+util_format_r8a8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ uint16_t a;
+ r = (value) & 0xff;
+ a = value >> 8;
+ dst[0] = r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = a; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8a8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (src[0]) & 0xff;
+ value |= (src[3]) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a8r8_unorm {
+ uint16_t value;
+ struct {
+ uint8_t a;
+ uint8_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_a8r8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t a;
+ uint16_t r;
+ a = (value) & 0xff;
+ r = value >> 8;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8r8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (float_to_ubyte(src[3])) & 0xff;
+ value |= (float_to_ubyte(src[0])) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a8r8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t a;
+ uint16_t r;
+ a = (value) & 0xff;
+ r = value >> 8;
+ dst[0] = ubyte_to_float(r); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = ubyte_to_float(a); /* a */
+}
+
+static INLINE void
+util_format_a8r8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t a;
+ uint16_t r;
+ a = (value) & 0xff;
+ r = value >> 8;
+ dst[0] = r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = a; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8r8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (src[3]) & 0xff;
+ value |= (src[0]) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r10g10b10a2_uscaled {
+ uint32_t value;
+ struct {
+ unsigned r:10;
+ unsigned g:10;
+ unsigned b:10;
+ unsigned a:2;
+ } chan;
+};
+
+static INLINE void
+util_format_r10g10b10a2_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ b = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = (float)b; /* b */
+ dst[3] = (float)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10a2_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)CLAMP(src[0], 0, 1023)) & 0x3ff;
+ value |= (((uint32_t)CLAMP(src[1], 0, 1023)) & 0x3ff) << 10;
+ value |= (((uint32_t)CLAMP(src[2], 0, 1023)) & 0x3ff) << 20;
+ value |= ((uint32_t)CLAMP(src[3], 0, 3)) << 30;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10a2_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ b = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = (float)b; /* b */
+ dst[3] = (float)a; /* a */
+}
+
+static INLINE void
+util_format_r10g10b10a2_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ b = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MIN2(g, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint32_t)MIN2(b, 1)) * 0xff / 0x1); /* b */
+ dst[3] = (uint8_t)(((uint32_t)MIN2(a, 1)) * 0xff / 0x1); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10a2_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0x3ff;
+ value |= (((uint32_t)(((uint32_t)src[1]) * 0x1 / 0xff)) & 0x3ff) << 10;
+ value |= (((uint32_t)(((uint32_t)src[2]) * 0x1 / 0xff)) & 0x3ff) << 20;
+ value |= ((uint32_t)(((uint32_t)src[3]) * 0x1 / 0xff)) << 30;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r10g10b10a2_sscaled {
+ uint32_t value;
+ struct {
+ int r:10;
+ int g:10;
+ int b:10;
+ int a:2;
+ } chan;
+};
+
+static INLINE void
+util_format_r10g10b10a2_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ r = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ b = ((int32_t)(value << 2) ) >> 22;
+ a = ((int32_t)(value) ) >> 30;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = (float)b; /* b */
+ dst[3] = (float)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10a2_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)CLAMP(src[0], -512, 511)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)CLAMP(src[1], -512, 511)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)CLAMP(src[2], -512, 511)) & 0x3ff) << 20) ;
+ value |= (uint32_t)(((uint32_t)CLAMP(src[3], -2, 1)) << 30) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10a2_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ r = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ b = ((int32_t)(value << 2) ) >> 22;
+ a = ((int32_t)(value) ) >> 30;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = (float)b; /* b */
+ dst[3] = (float)a; /* a */
+}
+
+static INLINE void
+util_format_r10g10b10a2_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ r = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ b = ((int32_t)(value << 2) ) >> 22;
+ a = ((int32_t)(value) ) >> 30;
+ dst[0] = (uint8_t)(((uint32_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)CLAMP(g, 0, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint32_t)CLAMP(b, 0, 1)) * 0xff / 0x1); /* b */
+ dst[3] = (uint8_t)(((uint32_t)MAX2(a, 0)) * 0xff / 0x1); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10a2_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)(((uint32_t)src[1]) * 0x1 / 0xff)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)(((uint32_t)src[2]) * 0x1 / 0xff)) & 0x3ff) << 20) ;
+ value |= (uint32_t)(((uint32_t)(((uint32_t)src[3]) * 0x1 / 0xff)) << 30) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r10g10b10a2_snorm {
+ uint32_t value;
+ struct {
+ int r:10;
+ int g:10;
+ int b:10;
+ int a:2;
+ } chan;
+};
+
+static INLINE void
+util_format_r10g10b10a2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ r = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ b = ((int32_t)(value << 2) ) >> 22;
+ a = ((int32_t)(value) ) >> 30;
+ dst[0] = (float)(r * (1.0f/0x1ff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x1ff)); /* g */
+ dst[2] = (float)(b * (1.0f/0x1ff)); /* b */
+ dst[3] = (float)(a * (1.0f/0x1)); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10a2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)util_iround(CLAMP(src[0], -1, 1) * 0x1ff)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)util_iround(CLAMP(src[1], -1, 1) * 0x1ff)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)util_iround(CLAMP(src[2], -1, 1) * 0x1ff)) & 0x3ff) << 20) ;
+ value |= (uint32_t)(((uint32_t)util_iround(CLAMP(src[3], -1, 1) * 0x1)) << 30) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10a2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ r = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ b = ((int32_t)(value << 2) ) >> 22;
+ a = ((int32_t)(value) ) >> 30;
+ dst[0] = (float)(r * (1.0f/0x1ff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x1ff)); /* g */
+ dst[2] = (float)(b * (1.0f/0x1ff)); /* b */
+ dst[3] = (float)(a * (1.0f/0x1)); /* a */
+}
+
+static INLINE void
+util_format_r10g10b10a2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ r = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ b = ((int32_t)(value << 2) ) >> 22;
+ a = ((int32_t)(value) ) >> 30;
+ dst[0] = (uint8_t)(MAX2(r, 0) >> 1); /* r */
+ dst[1] = (uint8_t)(MAX2(g, 0) >> 1); /* g */
+ dst[2] = (uint8_t)(MAX2(b, 0) >> 1); /* b */
+ dst[3] = (uint8_t)(((uint32_t)MAX2(a, 0)) * 0xff / 0x1); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10a2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)(((uint32_t)src[0]) * 0x1ff / 0xff)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)(((uint32_t)src[1]) * 0x1ff / 0xff)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)(((uint32_t)src[2]) * 0x1ff / 0xff)) & 0x3ff) << 20) ;
+ value |= (uint32_t)(((uint32_t)(src[3] >> 7)) << 30) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b10g10r10a2_uscaled {
+ uint32_t value;
+ struct {
+ unsigned b:10;
+ unsigned g:10;
+ unsigned r:10;
+ unsigned a:2;
+ } chan;
+};
+
+static INLINE void
+util_format_b10g10r10a2_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ uint32_t a;
+ b = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ r = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = (float)b; /* b */
+ dst[3] = (float)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10a2_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)CLAMP(src[2], 0, 1023)) & 0x3ff;
+ value |= (((uint32_t)CLAMP(src[1], 0, 1023)) & 0x3ff) << 10;
+ value |= (((uint32_t)CLAMP(src[0], 0, 1023)) & 0x3ff) << 20;
+ value |= ((uint32_t)CLAMP(src[3], 0, 3)) << 30;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10a2_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ uint32_t a;
+ b = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ r = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = (float)b; /* b */
+ dst[3] = (float)a; /* a */
+}
+
+static INLINE void
+util_format_b10g10r10a2_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ uint32_t a;
+ b = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ r = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MIN2(g, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint32_t)MIN2(b, 1)) * 0xff / 0x1); /* b */
+ dst[3] = (uint8_t)(((uint32_t)MIN2(a, 1)) * 0xff / 0x1); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10a2_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)(((uint32_t)src[2]) * 0x1 / 0xff)) & 0x3ff;
+ value |= (((uint32_t)(((uint32_t)src[1]) * 0x1 / 0xff)) & 0x3ff) << 10;
+ value |= (((uint32_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0x3ff) << 20;
+ value |= ((uint32_t)(((uint32_t)src[3]) * 0x1 / 0xff)) << 30;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b10g10r10a2_sscaled {
+ uint32_t value;
+ struct {
+ int b:10;
+ int g:10;
+ int r:10;
+ int a:2;
+ } chan;
+};
+
+static INLINE void
+util_format_b10g10r10a2_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t b;
+ int32_t g;
+ int32_t r;
+ int32_t a;
+ b = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ r = ((int32_t)(value << 2) ) >> 22;
+ a = ((int32_t)(value) ) >> 30;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = (float)b; /* b */
+ dst[3] = (float)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10a2_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)CLAMP(src[2], -512, 511)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)CLAMP(src[1], -512, 511)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)CLAMP(src[0], -512, 511)) & 0x3ff) << 20) ;
+ value |= (uint32_t)(((uint32_t)CLAMP(src[3], -2, 1)) << 30) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10a2_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t b;
+ int32_t g;
+ int32_t r;
+ int32_t a;
+ b = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ r = ((int32_t)(value << 2) ) >> 22;
+ a = ((int32_t)(value) ) >> 30;
+ dst[0] = (float)r; /* r */
+ dst[1] = (float)g; /* g */
+ dst[2] = (float)b; /* b */
+ dst[3] = (float)a; /* a */
+}
+
+static INLINE void
+util_format_b10g10r10a2_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t b;
+ int32_t g;
+ int32_t r;
+ int32_t a;
+ b = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ r = ((int32_t)(value << 2) ) >> 22;
+ a = ((int32_t)(value) ) >> 30;
+ dst[0] = (uint8_t)(((uint32_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */
+ dst[1] = (uint8_t)(((uint32_t)CLAMP(g, 0, 1)) * 0xff / 0x1); /* g */
+ dst[2] = (uint8_t)(((uint32_t)CLAMP(b, 0, 1)) * 0xff / 0x1); /* b */
+ dst[3] = (uint8_t)(((uint32_t)MAX2(a, 0)) * 0xff / 0x1); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10a2_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)(((uint32_t)src[2]) * 0x1 / 0xff)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)(((uint32_t)src[1]) * 0x1 / 0xff)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0x3ff) << 20) ;
+ value |= (uint32_t)(((uint32_t)(((uint32_t)src[3]) * 0x1 / 0xff)) << 30) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b10g10r10a2_snorm {
+ uint32_t value;
+ struct {
+ int b:10;
+ int g:10;
+ int r:10;
+ int a:2;
+ } chan;
+};
+
+static INLINE void
+util_format_b10g10r10a2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t b;
+ int32_t g;
+ int32_t r;
+ int32_t a;
+ b = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ r = ((int32_t)(value << 2) ) >> 22;
+ a = ((int32_t)(value) ) >> 30;
+ dst[0] = (float)(r * (1.0f/0x1ff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x1ff)); /* g */
+ dst[2] = (float)(b * (1.0f/0x1ff)); /* b */
+ dst[3] = (float)(a * (1.0f/0x1)); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10a2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)util_iround(CLAMP(src[2], -1, 1) * 0x1ff)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)util_iround(CLAMP(src[1], -1, 1) * 0x1ff)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)util_iround(CLAMP(src[0], -1, 1) * 0x1ff)) & 0x3ff) << 20) ;
+ value |= (uint32_t)(((uint32_t)util_iround(CLAMP(src[3], -1, 1) * 0x1)) << 30) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10a2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t b;
+ int32_t g;
+ int32_t r;
+ int32_t a;
+ b = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ r = ((int32_t)(value << 2) ) >> 22;
+ a = ((int32_t)(value) ) >> 30;
+ dst[0] = (float)(r * (1.0f/0x1ff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x1ff)); /* g */
+ dst[2] = (float)(b * (1.0f/0x1ff)); /* b */
+ dst[3] = (float)(a * (1.0f/0x1)); /* a */
+}
+
+static INLINE void
+util_format_b10g10r10a2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t b;
+ int32_t g;
+ int32_t r;
+ int32_t a;
+ b = ((int32_t)(value << 22) ) >> 22;
+ g = ((int32_t)(value << 12) ) >> 22;
+ r = ((int32_t)(value << 2) ) >> 22;
+ a = ((int32_t)(value) ) >> 30;
+ dst[0] = (uint8_t)(MAX2(r, 0) >> 1); /* r */
+ dst[1] = (uint8_t)(MAX2(g, 0) >> 1); /* g */
+ dst[2] = (uint8_t)(MAX2(b, 0) >> 1); /* b */
+ dst[3] = (uint8_t)(((uint32_t)MAX2(a, 0)) * 0xff / 0x1); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10a2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((uint32_t)(((uint32_t)src[2]) * 0x1ff / 0xff)) & 0x3ff) ;
+ value |= (uint32_t)((((uint32_t)(((uint32_t)src[1]) * 0x1ff / 0xff)) & 0x3ff) << 10) ;
+ value |= (uint32_t)((((uint32_t)(((uint32_t)src[0]) * 0x1ff / 0xff)) & 0x3ff) << 20) ;
+ value |= (uint32_t)(((uint32_t)(src[3] >> 7)) << 30) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8_uint {
+ uint8_t value;
+ struct {
+ uint8_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t r;
+ r = value;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)MIN2(src[0], 255);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t r;
+ r = value;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t r;
+ r = value;
+ dst[0] = (int)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)CLAMP(src[0], 0, 255);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8_uint {
+ uint16_t value;
+ struct {
+ uint8_t r;
+ uint8_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ uint16_t g;
+ r = (value) & 0xff;
+ g = value >> 8;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = (unsigned)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint8_t)MIN2(src[0], 255)) & 0xff;
+ value |= ((uint8_t)MIN2(src[1], 255)) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ uint16_t g;
+ r = (value) & 0xff;
+ g = value >> 8;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = (unsigned)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ uint16_t g;
+ r = (value) & 0xff;
+ g = value >> 8;
+ dst[0] = (int)r; /* r */
+ dst[1] = (int)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint8_t)CLAMP(src[0], 0, 255)) & 0xff;
+ value |= ((uint8_t)CLAMP(src[1], 0, 255)) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8_uint {
+ struct {
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)pixel.chan.r; /* r */
+ dst[1] = (unsigned)pixel.chan.g; /* g */
+ dst[2] = (unsigned)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 3;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_uint pixel;
+ pixel.chan.r = (uint8_t)MIN2(src[0], 255);
+ pixel.chan.g = (uint8_t)MIN2(src[1], 255);
+ pixel.chan.b = (uint8_t)MIN2(src[2], 255);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 3;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r8g8b8_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)pixel.chan.r; /* r */
+ dst[1] = (unsigned)pixel.chan.g; /* g */
+ dst[2] = (unsigned)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)pixel.chan.r; /* r */
+ dst[1] = (int)pixel.chan.g; /* g */
+ dst[2] = (int)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 3;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_uint pixel;
+ pixel.chan.r = (uint8_t)CLAMP(src[0], 0, 255);
+ pixel.chan.g = (uint8_t)CLAMP(src[1], 0, 255);
+ pixel.chan.b = (uint8_t)CLAMP(src[2], 0, 255);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 3;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8a8_uint {
+ uint32_t value;
+ struct {
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ uint8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8a8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = (unsigned)g; /* g */
+ dst[2] = (unsigned)b; /* b */
+ dst[3] = (unsigned)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint8_t)MIN2(src[0], 255)) & 0xff;
+ value |= (((uint8_t)MIN2(src[1], 255)) & 0xff) << 8;
+ value |= (((uint8_t)MIN2(src[2], 255)) & 0xff) << 16;
+ value |= ((uint8_t)MIN2(src[3], 255)) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = (unsigned)g; /* g */
+ dst[2] = (unsigned)b; /* b */
+ dst[3] = (unsigned)a; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8a8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ a = value >> 24;
+ dst[0] = (int)r; /* r */
+ dst[1] = (int)g; /* g */
+ dst[2] = (int)b; /* b */
+ dst[3] = (int)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint8_t)CLAMP(src[0], 0, 255)) & 0xff;
+ value |= (((uint8_t)CLAMP(src[1], 0, 255)) & 0xff) << 8;
+ value |= (((uint8_t)CLAMP(src[2], 0, 255)) & 0xff) << 16;
+ value |= ((uint8_t)CLAMP(src[3], 0, 255)) << 24;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8_sint {
+ uint8_t value;
+ struct {
+ int8_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t r;
+ r = (int8_t)(value) ;
+ dst[0] = (int)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)CLAMP(src[0], -128, 127)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ int8_t r;
+ r = (int8_t)(value) ;
+ dst[0] = (int)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t r;
+ r = (int8_t)(value) ;
+ dst[0] = (unsigned)MAX2(r, 0); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)MIN2(src[0], 127)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8_sint {
+ uint16_t value;
+ struct {
+ int8_t r;
+ int8_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t g;
+ r = ((int16_t)(value << 8) ) >> 8;
+ g = ((int16_t)(value) ) >> 8;
+ dst[0] = (int)r; /* r */
+ dst[1] = (int)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((int8_t)CLAMP(src[0], -128, 127)) & 0xff) ;
+ value |= (uint16_t)(((int8_t)CLAMP(src[1], -128, 127)) << 8) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t g;
+ r = ((int16_t)(value << 8) ) >> 8;
+ g = ((int16_t)(value) ) >> 8;
+ dst[0] = (int)r; /* r */
+ dst[1] = (int)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t g;
+ r = ((int16_t)(value << 8) ) >> 8;
+ g = ((int16_t)(value) ) >> 8;
+ dst[0] = (unsigned)MAX2(r, 0); /* r */
+ dst[1] = (unsigned)MAX2(g, 0); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((int8_t)MIN2(src[0], 127)) & 0xff) ;
+ value |= (uint16_t)(((int8_t)MIN2(src[1], 127)) << 8) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8_sint {
+ struct {
+ int8_t r;
+ int8_t g;
+ int8_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)pixel.chan.r; /* r */
+ dst[1] = (int)pixel.chan.g; /* g */
+ dst[2] = (int)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 3;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_sint pixel;
+ pixel.chan.r = (int8_t)CLAMP(src[0], -128, 127);
+ pixel.chan.g = (int8_t)CLAMP(src[1], -128, 127);
+ pixel.chan.b = (int8_t)CLAMP(src[2], -128, 127);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 3;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r8g8b8_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)pixel.chan.r; /* r */
+ dst[1] = (int)pixel.chan.g; /* g */
+ dst[2] = (int)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)MAX2(pixel.chan.r, 0); /* r */
+ dst[1] = (unsigned)MAX2(pixel.chan.g, 0); /* g */
+ dst[2] = (unsigned)MAX2(pixel.chan.b, 0); /* b */
+ dst[3] = 1; /* a */
+ src += 3;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r8g8b8_sint pixel;
+ pixel.chan.r = (int8_t)MIN2(src[0], 127);
+ pixel.chan.g = (int8_t)MIN2(src[1], 127);
+ pixel.chan.b = (int8_t)MIN2(src[2], 127);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 3;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8a8_sint {
+ uint32_t value;
+ struct {
+ int8_t r;
+ int8_t g;
+ int8_t b;
+ int8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8a8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = ((int32_t)(value << 8) ) >> 24;
+ a = ((int32_t)(value) ) >> 24;
+ dst[0] = (int)r; /* r */
+ dst[1] = (int)g; /* g */
+ dst[2] = (int)b; /* b */
+ dst[3] = (int)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int8_t)CLAMP(src[0], -128, 127)) & 0xff) ;
+ value |= (uint32_t)((((int8_t)CLAMP(src[1], -128, 127)) & 0xff) << 8) ;
+ value |= (uint32_t)((((int8_t)CLAMP(src[2], -128, 127)) & 0xff) << 16) ;
+ value |= (uint32_t)(((int8_t)CLAMP(src[3], -128, 127)) << 24) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = ((int32_t)(value << 8) ) >> 24;
+ a = ((int32_t)(value) ) >> 24;
+ dst[0] = (int)r; /* r */
+ dst[1] = (int)g; /* g */
+ dst[2] = (int)b; /* b */
+ dst[3] = (int)a; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8a8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = ((int32_t)(value << 8) ) >> 24;
+ a = ((int32_t)(value) ) >> 24;
+ dst[0] = (unsigned)MAX2(r, 0); /* r */
+ dst[1] = (unsigned)MAX2(g, 0); /* g */
+ dst[2] = (unsigned)MAX2(b, 0); /* b */
+ dst[3] = (unsigned)MAX2(a, 0); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8a8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int8_t)MIN2(src[0], 127)) & 0xff) ;
+ value |= (uint32_t)((((int8_t)MIN2(src[1], 127)) & 0xff) << 8) ;
+ value |= (uint32_t)((((int8_t)MIN2(src[2], 127)) & 0xff) << 16) ;
+ value |= (uint32_t)(((int8_t)MIN2(src[3], 127)) << 24) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16_uint {
+ uint16_t value;
+ struct {
+ uint16_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ r = value;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)MIN2(src[0], 65535);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ r = value;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ r = value;
+ dst[0] = (int)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)CLAMP(src[0], 0, 65535);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16_uint {
+ uint32_t value;
+ struct {
+ uint16_t r;
+ uint16_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ r = (value) & 0xffff;
+ g = value >> 16;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = (unsigned)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint16_t)MIN2(src[0], 65535)) & 0xffff;
+ value |= ((uint16_t)MIN2(src[1], 65535)) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ r = (value) & 0xffff;
+ g = value >> 16;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = (unsigned)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ r = (value) & 0xffff;
+ g = value >> 16;
+ dst[0] = (int)r; /* r */
+ dst[1] = (int)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint16_t)CLAMP(src[0], 0, 65535)) & 0xffff;
+ value |= ((uint16_t)CLAMP(src[1], 0, 65535)) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16_uint {
+ struct {
+ uint16_t r;
+ uint16_t g;
+ uint16_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)pixel.chan.r; /* r */
+ dst[1] = (unsigned)pixel.chan.g; /* g */
+ dst[2] = (unsigned)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 6;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_uint pixel;
+ pixel.chan.r = (uint16_t)MIN2(src[0], 65535);
+ pixel.chan.g = (uint16_t)MIN2(src[1], 65535);
+ pixel.chan.b = (uint16_t)MIN2(src[2], 65535);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 6;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)pixel.chan.r; /* r */
+ dst[1] = (unsigned)pixel.chan.g; /* g */
+ dst[2] = (unsigned)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)pixel.chan.r; /* r */
+ dst[1] = (int)pixel.chan.g; /* g */
+ dst[2] = (int)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 6;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_uint pixel;
+ pixel.chan.r = (uint16_t)CLAMP(src[0], 0, 65535);
+ pixel.chan.g = (uint16_t)CLAMP(src[1], 0, 65535);
+ pixel.chan.b = (uint16_t)CLAMP(src[2], 0, 65535);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 6;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16a16_uint {
+ uint64_t value;
+ struct {
+ uint16_t r;
+ uint16_t g;
+ uint16_t b;
+ uint16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16a16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)pixel.chan.r; /* r */
+ dst[1] = (unsigned)pixel.chan.g; /* g */
+ dst[2] = (unsigned)pixel.chan.b; /* b */
+ dst[3] = (unsigned)pixel.chan.a; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_uint pixel;
+ pixel.chan.r = (uint16_t)MIN2(src[0], 65535);
+ pixel.chan.g = (uint16_t)MIN2(src[1], 65535);
+ pixel.chan.b = (uint16_t)MIN2(src[2], 65535);
+ pixel.chan.a = (uint16_t)MIN2(src[3], 65535);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16a16_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)pixel.chan.r; /* r */
+ dst[1] = (unsigned)pixel.chan.g; /* g */
+ dst[2] = (unsigned)pixel.chan.b; /* b */
+ dst[3] = (unsigned)pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16a16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)pixel.chan.r; /* r */
+ dst[1] = (int)pixel.chan.g; /* g */
+ dst[2] = (int)pixel.chan.b; /* b */
+ dst[3] = (int)pixel.chan.a; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_uint pixel;
+ pixel.chan.r = (uint16_t)CLAMP(src[0], 0, 65535);
+ pixel.chan.g = (uint16_t)CLAMP(src[1], 0, 65535);
+ pixel.chan.b = (uint16_t)CLAMP(src[2], 0, 65535);
+ pixel.chan.a = (uint16_t)CLAMP(src[3], 0, 65535);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16_sint {
+ uint16_t value;
+ struct {
+ int16_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ r = (int16_t)(value) ;
+ dst[0] = (int)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)CLAMP(src[0], -32768, 32767)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ r = (int16_t)(value) ;
+ dst[0] = (int)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ r = (int16_t)(value) ;
+ dst[0] = (unsigned)MAX2(r, 0); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)MIN2(src[0], 32767)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16_sint {
+ uint32_t value;
+ struct {
+ int16_t r;
+ int16_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ r = ((int32_t)(value << 16) ) >> 16;
+ g = ((int32_t)(value) ) >> 16;
+ dst[0] = (int)r; /* r */
+ dst[1] = (int)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int16_t)CLAMP(src[0], -32768, 32767)) & 0xffff) ;
+ value |= (uint32_t)(((int16_t)CLAMP(src[1], -32768, 32767)) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ r = ((int32_t)(value << 16) ) >> 16;
+ g = ((int32_t)(value) ) >> 16;
+ dst[0] = (int)r; /* r */
+ dst[1] = (int)g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ r = ((int32_t)(value << 16) ) >> 16;
+ g = ((int32_t)(value) ) >> 16;
+ dst[0] = (unsigned)MAX2(r, 0); /* r */
+ dst[1] = (unsigned)MAX2(g, 0); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int16_t)MIN2(src[0], 32767)) & 0xffff) ;
+ value |= (uint32_t)(((int16_t)MIN2(src[1], 32767)) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16_sint {
+ struct {
+ int16_t r;
+ int16_t g;
+ int16_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)pixel.chan.r; /* r */
+ dst[1] = (int)pixel.chan.g; /* g */
+ dst[2] = (int)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 6;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_sint pixel;
+ pixel.chan.r = (int16_t)CLAMP(src[0], -32768, 32767);
+ pixel.chan.g = (int16_t)CLAMP(src[1], -32768, 32767);
+ pixel.chan.b = (int16_t)CLAMP(src[2], -32768, 32767);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 6;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)pixel.chan.r; /* r */
+ dst[1] = (int)pixel.chan.g; /* g */
+ dst[2] = (int)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)MAX2(pixel.chan.r, 0); /* r */
+ dst[1] = (unsigned)MAX2(pixel.chan.g, 0); /* g */
+ dst[2] = (unsigned)MAX2(pixel.chan.b, 0); /* b */
+ dst[3] = 1; /* a */
+ src += 6;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16_sint pixel;
+ pixel.chan.r = (int16_t)MIN2(src[0], 32767);
+ pixel.chan.g = (int16_t)MIN2(src[1], 32767);
+ pixel.chan.b = (int16_t)MIN2(src[2], 32767);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 6;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16a16_sint {
+ uint64_t value;
+ struct {
+ int16_t r;
+ int16_t g;
+ int16_t b;
+ int16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16a16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)pixel.chan.r; /* r */
+ dst[1] = (int)pixel.chan.g; /* g */
+ dst[2] = (int)pixel.chan.b; /* b */
+ dst[3] = (int)pixel.chan.a; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_sint pixel;
+ pixel.chan.r = (int16_t)CLAMP(src[0], -32768, 32767);
+ pixel.chan.g = (int16_t)CLAMP(src[1], -32768, 32767);
+ pixel.chan.b = (int16_t)CLAMP(src[2], -32768, 32767);
+ pixel.chan.a = (int16_t)CLAMP(src[3], -32768, 32767);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16a16_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)pixel.chan.r; /* r */
+ dst[1] = (int)pixel.chan.g; /* g */
+ dst[2] = (int)pixel.chan.b; /* b */
+ dst[3] = (int)pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16a16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)MAX2(pixel.chan.r, 0); /* r */
+ dst[1] = (unsigned)MAX2(pixel.chan.g, 0); /* g */
+ dst[2] = (unsigned)MAX2(pixel.chan.b, 0); /* b */
+ dst[3] = (unsigned)MAX2(pixel.chan.a, 0); /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16a16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16a16_sint pixel;
+ pixel.chan.r = (int16_t)MIN2(src[0], 32767);
+ pixel.chan.g = (int16_t)MIN2(src[1], 32767);
+ pixel.chan.b = (int16_t)MIN2(src[2], 32767);
+ pixel.chan.a = (int16_t)MIN2(src[3], 32767);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32_uint {
+ uint32_t value;
+ struct {
+ uint32_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ r = value;
+ dst[0] = r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= src[0];
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ r = value;
+ dst[0] = r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ r = value;
+ dst[0] = (int)MIN2(r, 2147483647); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)MAX2(src[0], 0);
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32_uint {
+ uint64_t value;
+ struct {
+ uint32_t r;
+ uint32_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_uint pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.g = src[1];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)MIN2(pixel.chan.r, 2147483647); /* r */
+ dst[1] = (int)MIN2(pixel.chan.g, 2147483647); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_uint pixel;
+ pixel.chan.r = (uint32_t)MAX2(src[0], 0);
+ pixel.chan.g = (uint32_t)MAX2(src[1], 0);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32_uint {
+ struct {
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_uint pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.g = src[1];
+ pixel.chan.b = src[2];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)MIN2(pixel.chan.r, 2147483647); /* r */
+ dst[1] = (int)MIN2(pixel.chan.g, 2147483647); /* g */
+ dst[2] = (int)MIN2(pixel.chan.b, 2147483647); /* b */
+ dst[3] = 1; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_uint pixel;
+ pixel.chan.r = (uint32_t)MAX2(src[0], 0);
+ pixel.chan.g = (uint32_t)MAX2(src[1], 0);
+ pixel.chan.b = (uint32_t)MAX2(src[2], 0);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32a32_uint {
+ struct {
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32a32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = pixel.chan.a; /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_uint pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.g = src[1];
+ pixel.chan.b = src[2];
+ pixel.chan.a = src[3];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32a32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32a32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)MIN2(pixel.chan.r, 2147483647); /* r */
+ dst[1] = (int)MIN2(pixel.chan.g, 2147483647); /* g */
+ dst[2] = (int)MIN2(pixel.chan.b, 2147483647); /* b */
+ dst[3] = (int)MIN2(pixel.chan.a, 2147483647); /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_uint pixel;
+ pixel.chan.r = (uint32_t)MAX2(src[0], 0);
+ pixel.chan.g = (uint32_t)MAX2(src[1], 0);
+ pixel.chan.b = (uint32_t)MAX2(src[2], 0);
+ pixel.chan.a = (uint32_t)MAX2(src[3], 0);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32_sint {
+ uint32_t value;
+ struct {
+ int32_t r;
+ } chan;
+};
+
+static INLINE void
+util_format_r32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ r = (int32_t)(value) ;
+ dst[0] = r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(src[0]) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ r = (int32_t)(value) ;
+ dst[0] = r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ r = (int32_t)(value) ;
+ dst[0] = (unsigned)MAX2(r, 0); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)((int32_t)MIN2(src[0], 2147483647)) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32_sint {
+ uint64_t value;
+ struct {
+ int32_t r;
+ int32_t g;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_sint pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.g = src[1];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)MAX2(pixel.chan.r, 0); /* r */
+ dst[1] = (unsigned)MAX2(pixel.chan.g, 0); /* g */
+ dst[2] = 0; /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32_sint pixel;
+ pixel.chan.r = (int32_t)MIN2(src[0], 2147483647);
+ pixel.chan.g = (int32_t)MIN2(src[1], 2147483647);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32_sint {
+ struct {
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_sint pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.g = src[1];
+ pixel.chan.b = src[2];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)MAX2(pixel.chan.r, 0); /* r */
+ dst[1] = (unsigned)MAX2(pixel.chan.g, 0); /* g */
+ dst[2] = (unsigned)MAX2(pixel.chan.b, 0); /* b */
+ dst[3] = 1; /* a */
+ src += 12;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32_sint pixel;
+ pixel.chan.r = (int32_t)MIN2(src[0], 2147483647);
+ pixel.chan.g = (int32_t)MIN2(src[1], 2147483647);
+ pixel.chan.b = (int32_t)MIN2(src[2], 2147483647);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 12;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32a32_sint {
+ struct {
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ int32_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32a32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = pixel.chan.a; /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_sint pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.g = src[1];
+ pixel.chan.b = src[2];
+ pixel.chan.a = src[3];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32a32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32a32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)MAX2(pixel.chan.r, 0); /* r */
+ dst[1] = (unsigned)MAX2(pixel.chan.g, 0); /* g */
+ dst[2] = (unsigned)MAX2(pixel.chan.b, 0); /* b */
+ dst[3] = (unsigned)MAX2(pixel.chan.a, 0); /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32a32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32a32_sint pixel;
+ pixel.chan.r = (int32_t)MIN2(src[0], 2147483647);
+ pixel.chan.g = (int32_t)MIN2(src[1], 2147483647);
+ pixel.chan.b = (int32_t)MIN2(src[2], 2147483647);
+ pixel.chan.a = (int32_t)MIN2(src[3], 2147483647);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a8_uint {
+ uint8_t value;
+ struct {
+ uint8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_a8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t a;
+ a = value;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (unsigned)a; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)MIN2(src[3], 255);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t a;
+ a = value;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (unsigned)a; /* a */
+}
+
+static INLINE void
+util_format_a8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t a;
+ a = value;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (int)a; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)CLAMP(src[3], 0, 255);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_i8_uint {
+ uint8_t value;
+ struct {
+ uint8_t rgba;
+ } chan;
+};
+
+static INLINE void
+util_format_i8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgba;
+ rgba = value;
+ dst[0] = (unsigned)rgba; /* r */
+ dst[1] = (unsigned)rgba; /* g */
+ dst[2] = (unsigned)rgba; /* b */
+ dst[3] = (unsigned)rgba; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)MIN2(src[0], 255);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_i8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgba;
+ rgba = value;
+ dst[0] = (unsigned)rgba; /* r */
+ dst[1] = (unsigned)rgba; /* g */
+ dst[2] = (unsigned)rgba; /* b */
+ dst[3] = (unsigned)rgba; /* a */
+}
+
+static INLINE void
+util_format_i8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgba;
+ rgba = value;
+ dst[0] = (int)rgba; /* r */
+ dst[1] = (int)rgba; /* g */
+ dst[2] = (int)rgba; /* b */
+ dst[3] = (int)rgba; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)CLAMP(src[0], 0, 255);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l8_uint {
+ uint8_t value;
+ struct {
+ uint8_t rgb;
+ } chan;
+};
+
+static INLINE void
+util_format_l8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgb;
+ rgb = value;
+ dst[0] = (unsigned)rgb; /* r */
+ dst[1] = (unsigned)rgb; /* g */
+ dst[2] = (unsigned)rgb; /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)MIN2(src[0], 255);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgb;
+ rgb = value;
+ dst[0] = (unsigned)rgb; /* r */
+ dst[1] = (unsigned)rgb; /* g */
+ dst[2] = (unsigned)rgb; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_l8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ uint8_t rgb;
+ rgb = value;
+ dst[0] = (int)rgb; /* r */
+ dst[1] = (int)rgb; /* g */
+ dst[2] = (int)rgb; /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)CLAMP(src[0], 0, 255);
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l8a8_uint {
+ uint16_t value;
+ struct {
+ uint8_t rgb;
+ uint8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_l8a8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgb;
+ uint16_t a;
+ rgb = (value) & 0xff;
+ a = value >> 8;
+ dst[0] = (unsigned)rgb; /* r */
+ dst[1] = (unsigned)rgb; /* g */
+ dst[2] = (unsigned)rgb; /* b */
+ dst[3] = (unsigned)a; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8a8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint8_t)MIN2(src[0], 255)) & 0xff;
+ value |= ((uint8_t)MIN2(src[3], 255)) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l8a8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgb;
+ uint16_t a;
+ rgb = (value) & 0xff;
+ a = value >> 8;
+ dst[0] = (unsigned)rgb; /* r */
+ dst[1] = (unsigned)rgb; /* g */
+ dst[2] = (unsigned)rgb; /* b */
+ dst[3] = (unsigned)a; /* a */
+}
+
+static INLINE void
+util_format_l8a8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgb;
+ uint16_t a;
+ rgb = (value) & 0xff;
+ a = value >> 8;
+ dst[0] = (int)rgb; /* r */
+ dst[1] = (int)rgb; /* g */
+ dst[2] = (int)rgb; /* b */
+ dst[3] = (int)a; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8a8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint8_t)CLAMP(src[0], 0, 255)) & 0xff;
+ value |= ((uint8_t)CLAMP(src[3], 0, 255)) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a8_sint {
+ uint8_t value;
+ struct {
+ int8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_a8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t a;
+ a = (int8_t)(value) ;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (int)a; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)CLAMP(src[3], -128, 127)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ int8_t a;
+ a = (int8_t)(value) ;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (int)a; /* a */
+}
+
+static INLINE void
+util_format_a8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t a;
+ a = (int8_t)(value) ;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (unsigned)MAX2(a, 0); /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)MIN2(src[3], 127)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_i8_sint {
+ uint8_t value;
+ struct {
+ int8_t rgba;
+ } chan;
+};
+
+static INLINE void
+util_format_i8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t rgba;
+ rgba = (int8_t)(value) ;
+ dst[0] = (int)rgba; /* r */
+ dst[1] = (int)rgba; /* g */
+ dst[2] = (int)rgba; /* b */
+ dst[3] = (int)rgba; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)CLAMP(src[0], -128, 127)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_i8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ int8_t rgba;
+ rgba = (int8_t)(value) ;
+ dst[0] = (int)rgba; /* r */
+ dst[1] = (int)rgba; /* g */
+ dst[2] = (int)rgba; /* b */
+ dst[3] = (int)rgba; /* a */
+}
+
+static INLINE void
+util_format_i8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t rgba;
+ rgba = (int8_t)(value) ;
+ dst[0] = (unsigned)MAX2(rgba, 0); /* r */
+ dst[1] = (unsigned)MAX2(rgba, 0); /* g */
+ dst[2] = (unsigned)MAX2(rgba, 0); /* b */
+ dst[3] = (unsigned)MAX2(rgba, 0); /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)MIN2(src[0], 127)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l8_sint {
+ uint8_t value;
+ struct {
+ int8_t rgb;
+ } chan;
+};
+
+static INLINE void
+util_format_l8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t rgb;
+ rgb = (int8_t)(value) ;
+ dst[0] = (int)rgb; /* r */
+ dst[1] = (int)rgb; /* g */
+ dst[2] = (int)rgb; /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)CLAMP(src[0], -128, 127)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t value = *(const uint8_t *)src;
+ int8_t rgb;
+ rgb = (int8_t)(value) ;
+ dst[0] = (int)rgb; /* r */
+ dst[1] = (int)rgb; /* g */
+ dst[2] = (int)rgb; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_l8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = *(const uint8_t *)src;
+ int8_t rgb;
+ rgb = (int8_t)(value) ;
+ dst[0] = (unsigned)MAX2(rgb, 0); /* r */
+ dst[1] = (unsigned)MAX2(rgb, 0); /* g */
+ dst[2] = (unsigned)MAX2(rgb, 0); /* b */
+ dst[3] = 1; /* a */
+ src += 1;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint8_t value = 0;
+ value |= (uint8_t)((int8_t)MIN2(src[0], 127)) ;
+ *(uint8_t *)dst = value;
+ src += 4;
+ dst += 1;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l8a8_sint {
+ uint16_t value;
+ struct {
+ int8_t rgb;
+ int8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_l8a8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgb;
+ int16_t a;
+ rgb = ((int16_t)(value << 8) ) >> 8;
+ a = ((int16_t)(value) ) >> 8;
+ dst[0] = (int)rgb; /* r */
+ dst[1] = (int)rgb; /* g */
+ dst[2] = (int)rgb; /* b */
+ dst[3] = (int)a; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8a8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((int8_t)CLAMP(src[0], -128, 127)) & 0xff) ;
+ value |= (uint16_t)(((int8_t)CLAMP(src[3], -128, 127)) << 8) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l8a8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgb;
+ int16_t a;
+ rgb = ((int16_t)(value << 8) ) >> 8;
+ a = ((int16_t)(value) ) >> 8;
+ dst[0] = (int)rgb; /* r */
+ dst[1] = (int)rgb; /* g */
+ dst[2] = (int)rgb; /* b */
+ dst[3] = (int)a; /* a */
+}
+
+static INLINE void
+util_format_l8a8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgb;
+ int16_t a;
+ rgb = ((int16_t)(value << 8) ) >> 8;
+ a = ((int16_t)(value) ) >> 8;
+ dst[0] = (unsigned)MAX2(rgb, 0); /* r */
+ dst[1] = (unsigned)MAX2(rgb, 0); /* g */
+ dst[2] = (unsigned)MAX2(rgb, 0); /* b */
+ dst[3] = (unsigned)MAX2(a, 0); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l8a8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((int8_t)MIN2(src[0], 127)) & 0xff) ;
+ value |= (uint16_t)(((int8_t)MIN2(src[3], 127)) << 8) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a16_uint {
+ uint16_t value;
+ struct {
+ uint16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_a16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t a;
+ a = value;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (unsigned)a; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)MIN2(src[3], 65535);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t a;
+ a = value;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (unsigned)a; /* a */
+}
+
+static INLINE void
+util_format_a16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t a;
+ a = value;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (int)a; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)CLAMP(src[3], 0, 65535);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_i16_uint {
+ uint16_t value;
+ struct {
+ uint16_t rgba;
+ } chan;
+};
+
+static INLINE void
+util_format_i16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgba;
+ rgba = value;
+ dst[0] = (unsigned)rgba; /* r */
+ dst[1] = (unsigned)rgba; /* g */
+ dst[2] = (unsigned)rgba; /* b */
+ dst[3] = (unsigned)rgba; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)MIN2(src[0], 65535);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_i16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgba;
+ rgba = value;
+ dst[0] = (unsigned)rgba; /* r */
+ dst[1] = (unsigned)rgba; /* g */
+ dst[2] = (unsigned)rgba; /* b */
+ dst[3] = (unsigned)rgba; /* a */
+}
+
+static INLINE void
+util_format_i16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgba;
+ rgba = value;
+ dst[0] = (int)rgba; /* r */
+ dst[1] = (int)rgba; /* g */
+ dst[2] = (int)rgba; /* b */
+ dst[3] = (int)rgba; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)CLAMP(src[0], 0, 65535);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l16_uint {
+ uint16_t value;
+ struct {
+ uint16_t rgb;
+ } chan;
+};
+
+static INLINE void
+util_format_l16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgb;
+ rgb = value;
+ dst[0] = (unsigned)rgb; /* r */
+ dst[1] = (unsigned)rgb; /* g */
+ dst[2] = (unsigned)rgb; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)MIN2(src[0], 65535);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgb;
+ rgb = value;
+ dst[0] = (unsigned)rgb; /* r */
+ dst[1] = (unsigned)rgb; /* g */
+ dst[2] = (unsigned)rgb; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_l16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t rgb;
+ rgb = value;
+ dst[0] = (int)rgb; /* r */
+ dst[1] = (int)rgb; /* g */
+ dst[2] = (int)rgb; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)CLAMP(src[0], 0, 65535);
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l16a16_uint {
+ uint32_t value;
+ struct {
+ uint16_t rgb;
+ uint16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_l16a16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t rgb;
+ uint32_t a;
+ rgb = (value) & 0xffff;
+ a = value >> 16;
+ dst[0] = (unsigned)rgb; /* r */
+ dst[1] = (unsigned)rgb; /* g */
+ dst[2] = (unsigned)rgb; /* b */
+ dst[3] = (unsigned)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16a16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint16_t)MIN2(src[0], 65535)) & 0xffff;
+ value |= ((uint16_t)MIN2(src[3], 65535)) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l16a16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t rgb;
+ uint32_t a;
+ rgb = (value) & 0xffff;
+ a = value >> 16;
+ dst[0] = (unsigned)rgb; /* r */
+ dst[1] = (unsigned)rgb; /* g */
+ dst[2] = (unsigned)rgb; /* b */
+ dst[3] = (unsigned)a; /* a */
+}
+
+static INLINE void
+util_format_l16a16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t rgb;
+ uint32_t a;
+ rgb = (value) & 0xffff;
+ a = value >> 16;
+ dst[0] = (int)rgb; /* r */
+ dst[1] = (int)rgb; /* g */
+ dst[2] = (int)rgb; /* b */
+ dst[3] = (int)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16a16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint16_t)CLAMP(src[0], 0, 65535)) & 0xffff;
+ value |= ((uint16_t)CLAMP(src[3], 0, 65535)) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a16_sint {
+ uint16_t value;
+ struct {
+ int16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_a16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t a;
+ a = (int16_t)(value) ;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (int)a; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)CLAMP(src[3], -32768, 32767)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t a;
+ a = (int16_t)(value) ;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (int)a; /* a */
+}
+
+static INLINE void
+util_format_a16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t a;
+ a = (int16_t)(value) ;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (unsigned)MAX2(a, 0); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)MIN2(src[3], 32767)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_i16_sint {
+ uint16_t value;
+ struct {
+ int16_t rgba;
+ } chan;
+};
+
+static INLINE void
+util_format_i16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgba;
+ rgba = (int16_t)(value) ;
+ dst[0] = (int)rgba; /* r */
+ dst[1] = (int)rgba; /* g */
+ dst[2] = (int)rgba; /* b */
+ dst[3] = (int)rgba; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)CLAMP(src[0], -32768, 32767)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_i16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgba;
+ rgba = (int16_t)(value) ;
+ dst[0] = (int)rgba; /* r */
+ dst[1] = (int)rgba; /* g */
+ dst[2] = (int)rgba; /* b */
+ dst[3] = (int)rgba; /* a */
+}
+
+static INLINE void
+util_format_i16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgba;
+ rgba = (int16_t)(value) ;
+ dst[0] = (unsigned)MAX2(rgba, 0); /* r */
+ dst[1] = (unsigned)MAX2(rgba, 0); /* g */
+ dst[2] = (unsigned)MAX2(rgba, 0); /* b */
+ dst[3] = (unsigned)MAX2(rgba, 0); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)MIN2(src[0], 32767)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l16_sint {
+ uint16_t value;
+ struct {
+ int16_t rgb;
+ } chan;
+};
+
+static INLINE void
+util_format_l16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgb;
+ rgb = (int16_t)(value) ;
+ dst[0] = (int)rgb; /* r */
+ dst[1] = (int)rgb; /* g */
+ dst[2] = (int)rgb; /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)CLAMP(src[0], -32768, 32767)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgb;
+ rgb = (int16_t)(value) ;
+ dst[0] = (int)rgb; /* r */
+ dst[1] = (int)rgb; /* g */
+ dst[2] = (int)rgb; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_l16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t rgb;
+ rgb = (int16_t)(value) ;
+ dst[0] = (unsigned)MAX2(rgb, 0); /* r */
+ dst[1] = (unsigned)MAX2(rgb, 0); /* g */
+ dst[2] = (unsigned)MAX2(rgb, 0); /* b */
+ dst[3] = 1; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)((int16_t)MIN2(src[0], 32767)) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l16a16_sint {
+ uint32_t value;
+ struct {
+ int16_t rgb;
+ int16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_l16a16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t rgb;
+ int32_t a;
+ rgb = ((int32_t)(value << 16) ) >> 16;
+ a = ((int32_t)(value) ) >> 16;
+ dst[0] = (int)rgb; /* r */
+ dst[1] = (int)rgb; /* g */
+ dst[2] = (int)rgb; /* b */
+ dst[3] = (int)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16a16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int16_t)CLAMP(src[0], -32768, 32767)) & 0xffff) ;
+ value |= (uint32_t)(((int16_t)CLAMP(src[3], -32768, 32767)) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l16a16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t rgb;
+ int32_t a;
+ rgb = ((int32_t)(value << 16) ) >> 16;
+ a = ((int32_t)(value) ) >> 16;
+ dst[0] = (int)rgb; /* r */
+ dst[1] = (int)rgb; /* g */
+ dst[2] = (int)rgb; /* b */
+ dst[3] = (int)a; /* a */
+}
+
+static INLINE void
+util_format_l16a16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t rgb;
+ int32_t a;
+ rgb = ((int32_t)(value << 16) ) >> 16;
+ a = ((int32_t)(value) ) >> 16;
+ dst[0] = (unsigned)MAX2(rgb, 0); /* r */
+ dst[1] = (unsigned)MAX2(rgb, 0); /* g */
+ dst[2] = (unsigned)MAX2(rgb, 0); /* b */
+ dst[3] = (unsigned)MAX2(a, 0); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l16a16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int16_t)MIN2(src[0], 32767)) & 0xffff) ;
+ value |= (uint32_t)(((int16_t)MIN2(src[3], 32767)) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a32_uint {
+ uint32_t value;
+ struct {
+ uint32_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_a32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t a;
+ a = value;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= src[3];
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t a;
+ a = value;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = a; /* a */
+}
+
+static INLINE void
+util_format_a32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t a;
+ a = value;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (int)MIN2(a, 2147483647); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)MAX2(src[3], 0);
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_i32_uint {
+ uint32_t value;
+ struct {
+ uint32_t rgba;
+ } chan;
+};
+
+static INLINE void
+util_format_i32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t rgba;
+ rgba = value;
+ dst[0] = rgba; /* r */
+ dst[1] = rgba; /* g */
+ dst[2] = rgba; /* b */
+ dst[3] = rgba; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= src[0];
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_i32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t rgba;
+ rgba = value;
+ dst[0] = rgba; /* r */
+ dst[1] = rgba; /* g */
+ dst[2] = rgba; /* b */
+ dst[3] = rgba; /* a */
+}
+
+static INLINE void
+util_format_i32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t rgba;
+ rgba = value;
+ dst[0] = (int)MIN2(rgba, 2147483647); /* r */
+ dst[1] = (int)MIN2(rgba, 2147483647); /* g */
+ dst[2] = (int)MIN2(rgba, 2147483647); /* b */
+ dst[3] = (int)MIN2(rgba, 2147483647); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)MAX2(src[0], 0);
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l32_uint {
+ uint32_t value;
+ struct {
+ uint32_t rgb;
+ } chan;
+};
+
+static INLINE void
+util_format_l32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t rgb;
+ rgb = value;
+ dst[0] = rgb; /* r */
+ dst[1] = rgb; /* g */
+ dst[2] = rgb; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= src[0];
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t rgb;
+ rgb = value;
+ dst[0] = rgb; /* r */
+ dst[1] = rgb; /* g */
+ dst[2] = rgb; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_l32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t rgb;
+ rgb = value;
+ dst[0] = (int)MIN2(rgb, 2147483647); /* r */
+ dst[1] = (int)MIN2(rgb, 2147483647); /* g */
+ dst[2] = (int)MIN2(rgb, 2147483647); /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)MAX2(src[0], 0);
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l32a32_uint {
+ uint64_t value;
+ struct {
+ uint32_t rgb;
+ uint32_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_l32a32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32a32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.rgb; /* r */
+ dst[1] = pixel.chan.rgb; /* g */
+ dst[2] = pixel.chan.rgb; /* b */
+ dst[3] = pixel.chan.a; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l32a32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32a32_uint pixel;
+ pixel.chan.rgb = src[0];
+ pixel.chan.a = src[3];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l32a32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_l32a32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.rgb; /* r */
+ dst[1] = pixel.chan.rgb; /* g */
+ dst[2] = pixel.chan.rgb; /* b */
+ dst[3] = pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_l32a32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32a32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)MIN2(pixel.chan.rgb, 2147483647); /* r */
+ dst[1] = (int)MIN2(pixel.chan.rgb, 2147483647); /* g */
+ dst[2] = (int)MIN2(pixel.chan.rgb, 2147483647); /* b */
+ dst[3] = (int)MIN2(pixel.chan.a, 2147483647); /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l32a32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32a32_uint pixel;
+ pixel.chan.rgb = (uint32_t)MAX2(src[0], 0);
+ pixel.chan.a = (uint32_t)MAX2(src[3], 0);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_a32_sint {
+ uint32_t value;
+ struct {
+ int32_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_a32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t a;
+ a = (int32_t)(value) ;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(src[3]) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_a32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t a;
+ a = (int32_t)(value) ;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = a; /* a */
+}
+
+static INLINE void
+util_format_a32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t a;
+ a = (int32_t)(value) ;
+ dst[0] = 0; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (unsigned)MAX2(a, 0); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_a32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)((int32_t)MIN2(src[3], 2147483647)) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_i32_sint {
+ uint32_t value;
+ struct {
+ int32_t rgba;
+ } chan;
+};
+
+static INLINE void
+util_format_i32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t rgba;
+ rgba = (int32_t)(value) ;
+ dst[0] = rgba; /* r */
+ dst[1] = rgba; /* g */
+ dst[2] = rgba; /* b */
+ dst[3] = rgba; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(src[0]) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_i32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t rgba;
+ rgba = (int32_t)(value) ;
+ dst[0] = rgba; /* r */
+ dst[1] = rgba; /* g */
+ dst[2] = rgba; /* b */
+ dst[3] = rgba; /* a */
+}
+
+static INLINE void
+util_format_i32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t rgba;
+ rgba = (int32_t)(value) ;
+ dst[0] = (unsigned)MAX2(rgba, 0); /* r */
+ dst[1] = (unsigned)MAX2(rgba, 0); /* g */
+ dst[2] = (unsigned)MAX2(rgba, 0); /* b */
+ dst[3] = (unsigned)MAX2(rgba, 0); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_i32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)((int32_t)MIN2(src[0], 2147483647)) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l32_sint {
+ uint32_t value;
+ struct {
+ int32_t rgb;
+ } chan;
+};
+
+static INLINE void
+util_format_l32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t rgb;
+ rgb = (int32_t)(value) ;
+ dst[0] = rgb; /* r */
+ dst[1] = rgb; /* g */
+ dst[2] = rgb; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(src[0]) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t rgb;
+ rgb = (int32_t)(value) ;
+ dst[0] = rgb; /* r */
+ dst[1] = rgb; /* g */
+ dst[2] = rgb; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_l32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t rgb;
+ rgb = (int32_t)(value) ;
+ dst[0] = (unsigned)MAX2(rgb, 0); /* r */
+ dst[1] = (unsigned)MAX2(rgb, 0); /* g */
+ dst[2] = (unsigned)MAX2(rgb, 0); /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)((int32_t)MIN2(src[0], 2147483647)) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_l32a32_sint {
+ uint64_t value;
+ struct {
+ int32_t rgb;
+ int32_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_l32a32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32a32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.rgb; /* r */
+ dst[1] = pixel.chan.rgb; /* g */
+ dst[2] = pixel.chan.rgb; /* b */
+ dst[3] = pixel.chan.a; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l32a32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32a32_sint pixel;
+ pixel.chan.rgb = src[0];
+ pixel.chan.a = src[3];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_l32a32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_l32a32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.rgb; /* r */
+ dst[1] = pixel.chan.rgb; /* g */
+ dst[2] = pixel.chan.rgb; /* b */
+ dst[3] = pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_l32a32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32a32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)MAX2(pixel.chan.rgb, 0); /* r */
+ dst[1] = (unsigned)MAX2(pixel.chan.rgb, 0); /* g */
+ dst[2] = (unsigned)MAX2(pixel.chan.rgb, 0); /* b */
+ dst[3] = (unsigned)MAX2(pixel.chan.a, 0); /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_l32a32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_l32a32_sint pixel;
+ pixel.chan.rgb = (int32_t)MIN2(src[0], 2147483647);
+ pixel.chan.a = (int32_t)MIN2(src[3], 2147483647);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b10g10r10a2_uint {
+ uint32_t value;
+ struct {
+ unsigned b:10;
+ unsigned g:10;
+ unsigned r:10;
+ unsigned a:2;
+ } chan;
+};
+
+static INLINE void
+util_format_b10g10r10a2_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ uint32_t a;
+ b = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ r = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = (unsigned)g; /* g */
+ dst[2] = (unsigned)b; /* b */
+ dst[3] = (unsigned)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10a2_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)MIN2(src[2], 1023)) & 0x3ff;
+ value |= (((uint32_t)MIN2(src[1], 1023)) & 0x3ff) << 10;
+ value |= (((uint32_t)MIN2(src[0], 1023)) & 0x3ff) << 20;
+ value |= ((uint32_t)MIN2(src[3], 3)) << 30;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10a2_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ uint32_t a;
+ b = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ r = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = (unsigned)g; /* g */
+ dst[2] = (unsigned)b; /* b */
+ dst[3] = (unsigned)a; /* a */
+}
+
+static INLINE void
+util_format_b10g10r10a2_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ uint32_t a;
+ b = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ r = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (int)r; /* r */
+ dst[1] = (int)g; /* g */
+ dst[2] = (int)b; /* b */
+ dst[3] = (int)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10a2_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)CLAMP(src[2], 0, 1023)) & 0x3ff;
+ value |= (((uint32_t)CLAMP(src[1], 0, 1023)) & 0x3ff) << 10;
+ value |= (((uint32_t)CLAMP(src[0], 0, 1023)) & 0x3ff) << 20;
+ value |= ((uint32_t)CLAMP(src[3], 0, 3)) << 30;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8x8_snorm {
+ uint32_t value;
+ struct {
+ int8_t r;
+ int8_t g;
+ int8_t b;
+ uint8_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8x8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = ((int32_t)(value << 8) ) >> 24;
+ dst[0] = (float)(r * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(g * (1.0f/0x7f)); /* g */
+ dst[2] = (float)(b * (1.0f/0x7f)); /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8x8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int8_t)util_iround(CLAMP(src[0], -1, 1) * 0x7f)) & 0xff) ;
+ value |= (uint32_t)((((int8_t)util_iround(CLAMP(src[1], -1, 1) * 0x7f)) & 0xff) << 8) ;
+ value |= (uint32_t)((((int8_t)util_iround(CLAMP(src[2], -1, 1) * 0x7f)) & 0xff) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8x8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = ((int32_t)(value << 8) ) >> 24;
+ dst[0] = (float)(r * (1.0f/0x7f)); /* r */
+ dst[1] = (float)(g * (1.0f/0x7f)); /* g */
+ dst[2] = (float)(b * (1.0f/0x7f)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8x8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = ((int32_t)(value << 8) ) >> 24;
+ dst[0] = (uint8_t)(((uint32_t)MAX2(r, 0)) * 0xff / 0x7f); /* r */
+ dst[1] = (uint8_t)(((uint32_t)MAX2(g, 0)) * 0xff / 0x7f); /* g */
+ dst[2] = (uint8_t)(((uint32_t)MAX2(b, 0)) * 0xff / 0x7f); /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8x8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int8_t)(src[0] >> 1)) & 0xff) ;
+ value |= (uint32_t)((((int8_t)(src[1] >> 1)) & 0xff) << 8) ;
+ value |= (uint32_t)((((int8_t)(src[2] >> 1)) & 0xff) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8x8_srgb {
+ uint32_t value;
+ struct {
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ uint8_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8x8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8x8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (util_format_linear_float_to_srgb_8unorm(src[0])) & 0xff;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[1])) & 0xff) << 8;
+ value |= ((util_format_linear_float_to_srgb_8unorm(src[2])) & 0xff) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8x8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */
+ dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */
+ dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8x8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ dst[0] = util_format_srgb_to_linear_8unorm(r); /* r */
+ dst[1] = util_format_srgb_to_linear_8unorm(g); /* g */
+ dst[2] = util_format_srgb_to_linear_8unorm(b); /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8x8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (util_format_linear_to_srgb_8unorm(src[0])) & 0xff;
+ value |= ((util_format_linear_to_srgb_8unorm(src[1])) & 0xff) << 8;
+ value |= ((util_format_linear_to_srgb_8unorm(src[2])) & 0xff) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8x8_uint {
+ uint32_t value;
+ struct {
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ uint8_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8x8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = (unsigned)g; /* g */
+ dst[2] = (unsigned)b; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8x8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint8_t)MIN2(src[0], 255)) & 0xff;
+ value |= (((uint8_t)MIN2(src[1], 255)) & 0xff) << 8;
+ value |= (((uint8_t)MIN2(src[2], 255)) & 0xff) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8x8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = (unsigned)g; /* g */
+ dst[2] = (unsigned)b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8x8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ r = (value) & 0xff;
+ g = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ dst[0] = (int)r; /* r */
+ dst[1] = (int)g; /* g */
+ dst[2] = (int)b; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8x8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint8_t)CLAMP(src[0], 0, 255)) & 0xff;
+ value |= (((uint8_t)CLAMP(src[1], 0, 255)) & 0xff) << 8;
+ value |= (((uint8_t)CLAMP(src[2], 0, 255)) & 0xff) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8g8b8x8_sint {
+ uint32_t value;
+ struct {
+ int8_t r;
+ int8_t g;
+ int8_t b;
+ uint8_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_r8g8b8x8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = ((int32_t)(value << 8) ) >> 24;
+ dst[0] = (int)r; /* r */
+ dst[1] = (int)g; /* g */
+ dst[2] = (int)b; /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8x8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int8_t)CLAMP(src[0], -128, 127)) & 0xff) ;
+ value |= (uint32_t)((((int8_t)CLAMP(src[1], -128, 127)) & 0xff) << 8) ;
+ value |= (uint32_t)((((int8_t)CLAMP(src[2], -128, 127)) & 0xff) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8x8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = ((int32_t)(value << 8) ) >> 24;
+ dst[0] = (int)r; /* r */
+ dst[1] = (int)g; /* g */
+ dst[2] = (int)b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r8g8b8x8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ r = ((int32_t)(value << 24) ) >> 24;
+ g = ((int32_t)(value << 16) ) >> 24;
+ b = ((int32_t)(value << 8) ) >> 24;
+ dst[0] = (unsigned)MAX2(r, 0); /* r */
+ dst[1] = (unsigned)MAX2(g, 0); /* g */
+ dst[2] = (unsigned)MAX2(b, 0); /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8g8b8x8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int8_t)MIN2(src[0], 127)) & 0xff) ;
+ value |= (uint32_t)((((int8_t)MIN2(src[1], 127)) & 0xff) << 8) ;
+ value |= (uint32_t)((((int8_t)MIN2(src[2], 127)) & 0xff) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_b10g10r10x2_unorm {
+ uint32_t value;
+ struct {
+ unsigned b:10;
+ unsigned g:10;
+ unsigned r:10;
+ unsigned x:2;
+ } chan;
+};
+
+static INLINE void
+util_format_b10g10r10x2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ b = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ r = (value >> 20) & 0x3ff;
+ dst[0] = (float)(r * (1.0f/0x3ff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x3ff)); /* g */
+ dst[2] = (float)(b * (1.0f/0x3ff)); /* b */
+ dst[3] = 1; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10x2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)util_iround(CLAMP(src[2], 0, 1) * 0x3ff)) & 0x3ff;
+ value |= (((uint32_t)util_iround(CLAMP(src[1], 0, 1) * 0x3ff)) & 0x3ff) << 10;
+ value |= (((uint32_t)util_iround(CLAMP(src[0], 0, 1) * 0x3ff)) & 0x3ff) << 20;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10x2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ b = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ r = (value >> 20) & 0x3ff;
+ dst[0] = (float)(r * (1.0f/0x3ff)); /* r */
+ dst[1] = (float)(g * (1.0f/0x3ff)); /* g */
+ dst[2] = (float)(b * (1.0f/0x3ff)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_b10g10r10x2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t b;
+ uint32_t g;
+ uint32_t r;
+ b = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ r = (value >> 20) & 0x3ff;
+ dst[0] = (uint8_t)(r >> 2); /* r */
+ dst[1] = (uint8_t)(g >> 2); /* g */
+ dst[2] = (uint8_t)(b >> 2); /* b */
+ dst[3] = 255; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_b10g10r10x2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)(((uint32_t)src[2]) * 0x3ff / 0xff)) & 0x3ff;
+ value |= (((uint32_t)(((uint32_t)src[1]) * 0x3ff / 0xff)) & 0x3ff) << 10;
+ value |= (((uint32_t)(((uint32_t)src[0]) * 0x3ff / 0xff)) & 0x3ff) << 20;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16x16_unorm {
+ uint64_t value;
+ struct {
+ uint16_t r;
+ uint16_t g;
+ uint16_t b;
+ uint16_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16x16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0f/0xffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0f/0xffff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0f/0xffff)); /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16x16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_unorm pixel;
+ pixel.chan.r = (uint16_t)util_iround(CLAMP(src[0], 0, 1) * 0xffff);
+ pixel.chan.g = (uint16_t)util_iround(CLAMP(src[1], 0, 1) * 0xffff);
+ pixel.chan.b = (uint16_t)util_iround(CLAMP(src[2], 0, 1) * 0xffff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16x16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16x16_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0f/0xffff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0f/0xffff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0f/0xffff)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16x16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_unorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(pixel.chan.r >> 8); /* r */
+ dst[1] = (uint8_t)(pixel.chan.g >> 8); /* g */
+ dst[2] = (uint8_t)(pixel.chan.b >> 8); /* b */
+ dst[3] = 255; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16x16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_unorm pixel;
+ pixel.chan.r = (uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff);
+ pixel.chan.g = (uint16_t)(((uint32_t)src[1]) * 0xffff / 0xff);
+ pixel.chan.b = (uint16_t)(((uint32_t)src[2]) * 0xffff / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16x16_snorm {
+ uint64_t value;
+ struct {
+ int16_t r;
+ int16_t g;
+ int16_t b;
+ uint16_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16x16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0f/0x7fff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0f/0x7fff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0f/0x7fff)); /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16x16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_snorm pixel;
+ pixel.chan.r = (int16_t)util_iround(CLAMP(src[0], -1, 1) * 0x7fff);
+ pixel.chan.g = (int16_t)util_iround(CLAMP(src[1], -1, 1) * 0x7fff);
+ pixel.chan.b = (int16_t)util_iround(CLAMP(src[2], -1, 1) * 0x7fff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16x16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16x16_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (float)(pixel.chan.r * (1.0f/0x7fff)); /* r */
+ dst[1] = (float)(pixel.chan.g * (1.0f/0x7fff)); /* g */
+ dst[2] = (float)(pixel.chan.b * (1.0f/0x7fff)); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16x16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_snorm pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (uint8_t)(MAX2(pixel.chan.r, 0) >> 7); /* r */
+ dst[1] = (uint8_t)(MAX2(pixel.chan.g, 0) >> 7); /* g */
+ dst[2] = (uint8_t)(MAX2(pixel.chan.b, 0) >> 7); /* b */
+ dst[3] = 255; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16x16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_snorm pixel;
+ pixel.chan.r = (int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff);
+ pixel.chan.g = (int16_t)(((uint32_t)src[1]) * 0x7fff / 0xff);
+ pixel.chan.b = (int16_t)(((uint32_t)src[2]) * 0x7fff / 0xff);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16x16_float {
+ uint64_t value;
+ struct {
+ uint16_t r;
+ uint16_t g;
+ uint16_t b;
+ uint16_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16x16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.r); /* r */
+ dst[1] = util_half_to_float(pixel.chan.g); /* g */
+ dst[2] = util_half_to_float(pixel.chan.b); /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16x16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_float pixel;
+ pixel.chan.r = util_float_to_half(src[0]);
+ pixel.chan.g = util_float_to_half(src[1]);
+ pixel.chan.b = util_float_to_half(src[2]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16x16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16x16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.r); /* r */
+ dst[1] = util_half_to_float(pixel.chan.g); /* g */
+ dst[2] = util_half_to_float(pixel.chan.b); /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16x16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.r)); /* r */
+ dst[1] = float_to_ubyte(util_half_to_float(pixel.chan.g)); /* g */
+ dst[2] = float_to_ubyte(util_half_to_float(pixel.chan.b)); /* b */
+ dst[3] = 255; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16x16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_float pixel;
+ pixel.chan.r = util_float_to_half((float)(src[0] * (1.0f/0xff)));
+ pixel.chan.g = util_float_to_half((float)(src[1] * (1.0f/0xff)));
+ pixel.chan.b = util_float_to_half((float)(src[2] * (1.0f/0xff)));
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16x16_uint {
+ uint64_t value;
+ struct {
+ uint16_t r;
+ uint16_t g;
+ uint16_t b;
+ uint16_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16x16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)pixel.chan.r; /* r */
+ dst[1] = (unsigned)pixel.chan.g; /* g */
+ dst[2] = (unsigned)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16x16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_uint pixel;
+ pixel.chan.r = (uint16_t)MIN2(src[0], 65535);
+ pixel.chan.g = (uint16_t)MIN2(src[1], 65535);
+ pixel.chan.b = (uint16_t)MIN2(src[2], 65535);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16x16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16x16_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)pixel.chan.r; /* r */
+ dst[1] = (unsigned)pixel.chan.g; /* g */
+ dst[2] = (unsigned)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16x16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)pixel.chan.r; /* r */
+ dst[1] = (int)pixel.chan.g; /* g */
+ dst[2] = (int)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16x16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_uint pixel;
+ pixel.chan.r = (uint16_t)CLAMP(src[0], 0, 65535);
+ pixel.chan.g = (uint16_t)CLAMP(src[1], 0, 65535);
+ pixel.chan.b = (uint16_t)CLAMP(src[2], 0, 65535);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16g16b16x16_sint {
+ uint64_t value;
+ struct {
+ int16_t r;
+ int16_t g;
+ int16_t b;
+ uint16_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_r16g16b16x16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)pixel.chan.r; /* r */
+ dst[1] = (int)pixel.chan.g; /* g */
+ dst[2] = (int)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16x16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_sint pixel;
+ pixel.chan.r = (int16_t)CLAMP(src[0], -32768, 32767);
+ pixel.chan.g = (int16_t)CLAMP(src[1], -32768, 32767);
+ pixel.chan.b = (int16_t)CLAMP(src[2], -32768, 32767);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16x16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16g16b16x16_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)pixel.chan.r; /* r */
+ dst[1] = (int)pixel.chan.g; /* g */
+ dst[2] = (int)pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r16g16b16x16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)MAX2(pixel.chan.r, 0); /* r */
+ dst[1] = (unsigned)MAX2(pixel.chan.g, 0); /* g */
+ dst[2] = (unsigned)MAX2(pixel.chan.b, 0); /* b */
+ dst[3] = 1; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16g16b16x16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16g16b16x16_sint pixel;
+ pixel.chan.r = (int16_t)MIN2(src[0], 32767);
+ pixel.chan.g = (int16_t)MIN2(src[1], 32767);
+ pixel.chan.b = (int16_t)MIN2(src[2], 32767);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32x32_float {
+ struct {
+ float r;
+ float g;
+ float b;
+ uint32_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32x32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32x32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32x32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32x32_float pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.g = src[1];
+ pixel.chan.b = src[2];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32x32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32x32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32x32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32x32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(pixel.chan.r); /* r */
+ dst[1] = float_to_ubyte(pixel.chan.g); /* g */
+ dst[2] = float_to_ubyte(pixel.chan.b); /* b */
+ dst[3] = 255; /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32x32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32x32_float pixel;
+ pixel.chan.r = ubyte_to_float(src[0]);
+ pixel.chan.g = ubyte_to_float(src[1]);
+ pixel.chan.b = ubyte_to_float(src[2]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32x32_uint {
+ struct {
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32x32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32x32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32x32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32x32_uint pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.g = src[1];
+ pixel.chan.b = src[2];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32x32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32x32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32x32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32x32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)MIN2(pixel.chan.r, 2147483647); /* r */
+ dst[1] = (int)MIN2(pixel.chan.g, 2147483647); /* g */
+ dst[2] = (int)MIN2(pixel.chan.b, 2147483647); /* b */
+ dst[3] = 1; /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32x32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32x32_uint pixel;
+ pixel.chan.r = (uint32_t)MAX2(src[0], 0);
+ pixel.chan.g = (uint32_t)MAX2(src[1], 0);
+ pixel.chan.b = (uint32_t)MAX2(src[2], 0);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32g32b32x32_sint {
+ struct {
+ int32_t r;
+ int32_t g;
+ int32_t b;
+ uint32_t x;
+ } chan;
+};
+
+static INLINE void
+util_format_r32g32b32x32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32x32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32x32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32x32_sint pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.g = src[1];
+ pixel.chan.b = src[2];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32x32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32g32b32x32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = pixel.chan.g; /* g */
+ dst[2] = pixel.chan.b; /* b */
+ dst[3] = 1; /* a */
+}
+
+static INLINE void
+util_format_r32g32b32x32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32x32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)MAX2(pixel.chan.r, 0); /* r */
+ dst[1] = (unsigned)MAX2(pixel.chan.g, 0); /* g */
+ dst[2] = (unsigned)MAX2(pixel.chan.b, 0); /* b */
+ dst[3] = 1; /* a */
+ src += 16;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32g32b32x32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32g32b32x32_sint pixel;
+ pixel.chan.r = (int32_t)MIN2(src[0], 2147483647);
+ pixel.chan.g = (int32_t)MIN2(src[1], 2147483647);
+ pixel.chan.b = (int32_t)MIN2(src[2], 2147483647);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 16;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8a8_snorm {
+ uint16_t value;
+ struct {
+ int8_t r;
+ int8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r8a8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t a;
+ r = ((int16_t)(value << 8) ) >> 8;
+ a = ((int16_t)(value) ) >> 8;
+ dst[0] = (float)(r * (1.0f/0x7f)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0x7f)); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8a8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((int8_t)util_iround(CLAMP(src[0], -1, 1) * 0x7f)) & 0xff) ;
+ value |= (uint16_t)(((int8_t)util_iround(CLAMP(src[3], -1, 1) * 0x7f)) << 8) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8a8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t a;
+ r = ((int16_t)(value << 8) ) >> 8;
+ a = ((int16_t)(value) ) >> 8;
+ dst[0] = (float)(r * (1.0f/0x7f)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0x7f)); /* a */
+}
+
+static INLINE void
+util_format_r8a8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t a;
+ r = ((int16_t)(value << 8) ) >> 8;
+ a = ((int16_t)(value) ) >> 8;
+ dst[0] = (uint8_t)(((uint32_t)MAX2(r, 0)) * 0xff / 0x7f); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (uint8_t)(((uint32_t)MAX2(a, 0)) * 0xff / 0x7f); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8a8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((int8_t)(src[0] >> 1)) & 0xff) ;
+ value |= (uint16_t)(((int8_t)(src[3] >> 1)) << 8) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16a16_unorm {
+ uint32_t value;
+ struct {
+ uint16_t r;
+ uint16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r16a16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t a;
+ r = (value) & 0xffff;
+ a = value >> 16;
+ dst[0] = (float)(r * (1.0f/0xffff)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0xffff)); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16a16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint16_t)util_iround(CLAMP(src[0], 0, 1) * 0xffff)) & 0xffff;
+ value |= ((uint16_t)util_iround(CLAMP(src[3], 0, 1) * 0xffff)) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16a16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t a;
+ r = (value) & 0xffff;
+ a = value >> 16;
+ dst[0] = (float)(r * (1.0f/0xffff)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0xffff)); /* a */
+}
+
+static INLINE void
+util_format_r16a16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t a;
+ r = (value) & 0xffff;
+ a = value >> 16;
+ dst[0] = (uint8_t)(r >> 8); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (uint8_t)(a >> 8); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16a16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff)) & 0xffff;
+ value |= ((uint16_t)(((uint32_t)src[3]) * 0xffff / 0xff)) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16a16_snorm {
+ uint32_t value;
+ struct {
+ int16_t r;
+ int16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r16a16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t a;
+ r = ((int32_t)(value << 16) ) >> 16;
+ a = ((int32_t)(value) ) >> 16;
+ dst[0] = (float)(r * (1.0f/0x7fff)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0x7fff)); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16a16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int16_t)util_iround(CLAMP(src[0], -1, 1) * 0x7fff)) & 0xffff) ;
+ value |= (uint32_t)(((int16_t)util_iround(CLAMP(src[3], -1, 1) * 0x7fff)) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16a16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t a;
+ r = ((int32_t)(value << 16) ) >> 16;
+ a = ((int32_t)(value) ) >> 16;
+ dst[0] = (float)(r * (1.0f/0x7fff)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (float)(a * (1.0f/0x7fff)); /* a */
+}
+
+static INLINE void
+util_format_r16a16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t a;
+ r = ((int32_t)(value << 16) ) >> 16;
+ a = ((int32_t)(value) ) >> 16;
+ dst[0] = (uint8_t)(MAX2(r, 0) >> 7); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (uint8_t)(MAX2(a, 0) >> 7); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16a16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff)) & 0xffff) ;
+ value |= (uint32_t)(((int16_t)(((uint32_t)src[3]) * 0x7fff / 0xff)) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16a16_float {
+ uint32_t value;
+ struct {
+ uint16_t r;
+ uint16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r16a16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16a16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.r); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = util_half_to_float(pixel.chan.a); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16a16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16a16_float pixel;
+ pixel.chan.r = util_float_to_half(src[0]);
+ pixel.chan.a = util_float_to_half(src[3]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16a16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r16a16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = util_half_to_float(pixel.chan.r); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = util_half_to_float(pixel.chan.a); /* a */
+}
+
+static INLINE void
+util_format_r16a16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16a16_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.r)); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = float_to_ubyte(util_half_to_float(pixel.chan.a)); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16a16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r16a16_float pixel;
+ pixel.chan.r = util_float_to_half((float)(src[0] * (1.0f/0xff)));
+ pixel.chan.a = util_float_to_half((float)(src[3] * (1.0f/0xff)));
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32a32_float {
+ uint64_t value;
+ struct {
+ float r;
+ float a;
+ } chan;
+};
+
+static INLINE void
+util_format_r32a32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32a32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = pixel.chan.a; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32a32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32a32_float pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.a = src[3];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32a32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32a32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_r32a32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32a32_float pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = float_to_ubyte(pixel.chan.r); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = float_to_ubyte(pixel.chan.a); /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32a32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32a32_float pixel;
+ pixel.chan.r = ubyte_to_float(src[0]);
+ pixel.chan.a = ubyte_to_float(src[3]);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8a8_uint {
+ uint16_t value;
+ struct {
+ uint8_t r;
+ uint8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r8a8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ uint16_t a;
+ r = (value) & 0xff;
+ a = value >> 8;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (unsigned)a; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8a8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint8_t)MIN2(src[0], 255)) & 0xff;
+ value |= ((uint8_t)MIN2(src[3], 255)) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8a8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ uint16_t a;
+ r = (value) & 0xff;
+ a = value >> 8;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (unsigned)a; /* a */
+}
+
+static INLINE void
+util_format_r8a8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ uint16_t r;
+ uint16_t a;
+ r = (value) & 0xff;
+ a = value >> 8;
+ dst[0] = (int)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (int)a; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8a8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= ((uint8_t)CLAMP(src[0], 0, 255)) & 0xff;
+ value |= ((uint8_t)CLAMP(src[3], 0, 255)) << 8;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r8a8_sint {
+ uint16_t value;
+ struct {
+ int8_t r;
+ int8_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r8a8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t a;
+ r = ((int16_t)(value << 8) ) >> 8;
+ a = ((int16_t)(value) ) >> 8;
+ dst[0] = (int)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (int)a; /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8a8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((int8_t)CLAMP(src[0], -128, 127)) & 0xff) ;
+ value |= (uint16_t)(((int8_t)CLAMP(src[3], -128, 127)) << 8) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r8a8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t a;
+ r = ((int16_t)(value << 8) ) >> 8;
+ a = ((int16_t)(value) ) >> 8;
+ dst[0] = (int)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (int)a; /* a */
+}
+
+static INLINE void
+util_format_r8a8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = *(const uint16_t *)src;
+ int16_t r;
+ int16_t a;
+ r = ((int16_t)(value << 8) ) >> 8;
+ a = ((int16_t)(value) ) >> 8;
+ dst[0] = (unsigned)MAX2(r, 0); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (unsigned)MAX2(a, 0); /* a */
+ src += 2;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r8a8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint16_t value = 0;
+ value |= (uint16_t)(((int8_t)MIN2(src[0], 127)) & 0xff) ;
+ value |= (uint16_t)(((int8_t)MIN2(src[3], 127)) << 8) ;
+ *(uint16_t *)dst = value;
+ src += 4;
+ dst += 2;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16a16_uint {
+ uint32_t value;
+ struct {
+ uint16_t r;
+ uint16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r16a16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t a;
+ r = (value) & 0xffff;
+ a = value >> 16;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (unsigned)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16a16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint16_t)MIN2(src[0], 65535)) & 0xffff;
+ value |= ((uint16_t)MIN2(src[3], 65535)) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16a16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t a;
+ r = (value) & 0xffff;
+ a = value >> 16;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (unsigned)a; /* a */
+}
+
+static INLINE void
+util_format_r16a16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t a;
+ r = (value) & 0xffff;
+ a = value >> 16;
+ dst[0] = (int)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (int)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16a16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint16_t)CLAMP(src[0], 0, 65535)) & 0xffff;
+ value |= ((uint16_t)CLAMP(src[3], 0, 65535)) << 16;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r16a16_sint {
+ uint32_t value;
+ struct {
+ int16_t r;
+ int16_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r16a16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t a;
+ r = ((int32_t)(value << 16) ) >> 16;
+ a = ((int32_t)(value) ) >> 16;
+ dst[0] = (int)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (int)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16a16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int16_t)CLAMP(src[0], -32768, 32767)) & 0xffff) ;
+ value |= (uint32_t)(((int16_t)CLAMP(src[3], -32768, 32767)) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r16a16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t a;
+ r = ((int32_t)(value << 16) ) >> 16;
+ a = ((int32_t)(value) ) >> 16;
+ dst[0] = (int)r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (int)a; /* a */
+}
+
+static INLINE void
+util_format_r16a16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ int32_t r;
+ int32_t a;
+ r = ((int32_t)(value << 16) ) >> 16;
+ a = ((int32_t)(value) ) >> 16;
+ dst[0] = (unsigned)MAX2(r, 0); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (unsigned)MAX2(a, 0); /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r16a16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= (uint32_t)(((int16_t)MIN2(src[0], 32767)) & 0xffff) ;
+ value |= (uint32_t)(((int16_t)MIN2(src[3], 32767)) << 16) ;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32a32_uint {
+ uint64_t value;
+ struct {
+ uint32_t r;
+ uint32_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r32a32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32a32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = pixel.chan.a; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32a32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32a32_uint pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.a = src[3];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32a32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32a32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_r32a32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32a32_uint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (int)MIN2(pixel.chan.r, 2147483647); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (int)MIN2(pixel.chan.a, 2147483647); /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32a32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32a32_uint pixel;
+ pixel.chan.r = (uint32_t)MAX2(src[0], 0);
+ pixel.chan.a = (uint32_t)MAX2(src[3], 0);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r32a32_sint {
+ uint64_t value;
+ struct {
+ int32_t r;
+ int32_t a;
+ } chan;
+};
+
+static INLINE void
+util_format_r32a32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32a32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = pixel.chan.a; /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32a32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32a32_sint pixel;
+ pixel.chan.r = src[0];
+ pixel.chan.a = src[3];
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r32a32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ union util_format_r32a32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = pixel.chan.r; /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = pixel.chan.a; /* a */
+}
+
+static INLINE void
+util_format_r32a32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32a32_sint pixel;
+ memcpy(&pixel, src, sizeof pixel);
+ dst[0] = (unsigned)MAX2(pixel.chan.r, 0); /* r */
+ dst[1] = 0; /* g */
+ dst[2] = 0; /* b */
+ dst[3] = (unsigned)MAX2(pixel.chan.a, 0); /* a */
+ src += 8;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r32a32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ union util_format_r32a32_sint pixel;
+ pixel.chan.r = (int32_t)MIN2(src[0], 2147483647);
+ pixel.chan.a = (int32_t)MIN2(src[3], 2147483647);
+ memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+union util_format_r10g10b10a2_uint {
+ uint32_t value;
+ struct {
+ unsigned r:10;
+ unsigned g:10;
+ unsigned b:10;
+ unsigned a:2;
+ } chan;
+};
+
+static INLINE void
+util_format_r10g10b10a2_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ unsigned *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ b = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = (unsigned)g; /* g */
+ dst[2] = (unsigned)b; /* b */
+ dst[3] = (unsigned)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10a2_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const unsigned *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)MIN2(src[0], 1023)) & 0x3ff;
+ value |= (((uint32_t)MIN2(src[1], 1023)) & 0x3ff) << 10;
+ value |= (((uint32_t)MIN2(src[2], 1023)) & 0x3ff) << 20;
+ value |= ((uint32_t)MIN2(src[3], 3)) << 30;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10a2_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ b = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (unsigned)r; /* r */
+ dst[1] = (unsigned)g; /* g */
+ dst[2] = (unsigned)b; /* b */
+ dst[3] = (unsigned)a; /* a */
+}
+
+static INLINE void
+util_format_r10g10b10a2_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ int *dst = dst_row;
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = *(const uint32_t *)src;
+ uint32_t r;
+ uint32_t g;
+ uint32_t b;
+ uint32_t a;
+ r = (value) & 0x3ff;
+ g = (value >> 10) & 0x3ff;
+ b = (value >> 20) & 0x3ff;
+ a = value >> 30;
+ dst[0] = (int)r; /* r */
+ dst[1] = (int)g; /* g */
+ dst[2] = (int)b; /* b */
+ dst[3] = (int)a; /* a */
+ src += 4;
+ dst += 4;
+ }
+ src_row += src_stride;
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+static INLINE void
+util_format_r10g10b10a2_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; y += 1) {
+ const int *src = src_row;
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += 1) {
+ uint32_t value = 0;
+ value |= ((uint32_t)CLAMP(src[0], 0, 1023)) & 0x3ff;
+ value |= (((uint32_t)CLAMP(src[1], 0, 1023)) & 0x3ff) << 10;
+ value |= (((uint32_t)CLAMP(src[2], 0, 1023)) & 0x3ff) << 20;
+ value |= ((uint32_t)CLAMP(src[3], 0, 3)) << 30;
+ *(uint32_t *)dst = value;
+ src += 4;
+ dst += 4;
+ }
+ dst_row += dst_stride;
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+const struct util_format_description
+util_format_none_description = {
+ PIPE_FORMAT_NONE,
+ "PIPE_FORMAT_NONE",
+ "none",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_none_unpack_rgba_8unorm,
+ &util_format_none_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_none_unpack_rgba_float,
+ &util_format_none_pack_rgba_float,
+ &util_format_none_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b8g8r8a8_unorm_description = {
+ PIPE_FORMAT_B8G8R8A8_UNORM,
+ "PIPE_FORMAT_B8G8R8A8_UNORM",
+ "b8g8r8a8_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_b8g8r8a8_unorm_unpack_rgba_8unorm,
+ &util_format_b8g8r8a8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_b8g8r8a8_unorm_unpack_rgba_float,
+ &util_format_b8g8r8a8_unorm_pack_rgba_float,
+ &util_format_b8g8r8a8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b8g8r8x8_unorm_description = {
+ PIPE_FORMAT_B8G8R8X8_UNORM,
+ "PIPE_FORMAT_B8G8R8X8_UNORM",
+ "b8g8r8x8_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = r */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_b8g8r8x8_unorm_unpack_rgba_8unorm,
+ &util_format_b8g8r8x8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_b8g8r8x8_unorm_unpack_rgba_float,
+ &util_format_b8g8r8x8_unorm_pack_rgba_float,
+ &util_format_b8g8r8x8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a8r8g8b8_unorm_description = {
+ PIPE_FORMAT_A8R8G8B8_UNORM,
+ "PIPE_FORMAT_A8R8G8B8_UNORM",
+ "a8r8g8b8_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = a */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = b */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Y, /* r */
+ UTIL_FORMAT_SWIZZLE_Z, /* g */
+ UTIL_FORMAT_SWIZZLE_W, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_a8r8g8b8_unorm_unpack_rgba_8unorm,
+ &util_format_a8r8g8b8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_a8r8g8b8_unorm_unpack_rgba_float,
+ &util_format_a8r8g8b8_unorm_pack_rgba_float,
+ &util_format_a8r8g8b8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_x8r8g8b8_unorm_description = {
+ PIPE_FORMAT_X8R8G8B8_UNORM,
+ "PIPE_FORMAT_X8R8G8B8_UNORM",
+ "x8r8g8b8_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = b */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Y, /* r */
+ UTIL_FORMAT_SWIZZLE_Z, /* g */
+ UTIL_FORMAT_SWIZZLE_W, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_x8r8g8b8_unorm_unpack_rgba_8unorm,
+ &util_format_x8r8g8b8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_x8r8g8b8_unorm_unpack_rgba_float,
+ &util_format_x8r8g8b8_unorm_pack_rgba_float,
+ &util_format_x8r8g8b8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a8b8g8r8_unorm_description = {
+ PIPE_FORMAT_A8B8G8R8_UNORM,
+ "PIPE_FORMAT_A8B8G8R8_UNORM",
+ "a8b8g8r8_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = a */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = r */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_W, /* r */
+ UTIL_FORMAT_SWIZZLE_Z, /* g */
+ UTIL_FORMAT_SWIZZLE_Y, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_a8b8g8r8_unorm_unpack_rgba_8unorm,
+ &util_format_a8b8g8r8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_a8b8g8r8_unorm_unpack_rgba_float,
+ &util_format_a8b8g8r8_unorm_pack_rgba_float,
+ &util_format_a8b8g8r8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_x8b8g8r8_unorm_description = {
+ PIPE_FORMAT_X8B8G8R8_UNORM,
+ "PIPE_FORMAT_X8B8G8R8_UNORM",
+ "x8b8g8r8_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = r */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_W, /* r */
+ UTIL_FORMAT_SWIZZLE_Z, /* g */
+ UTIL_FORMAT_SWIZZLE_Y, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_x8b8g8r8_unorm_unpack_rgba_8unorm,
+ &util_format_x8b8g8r8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_x8b8g8r8_unorm_unpack_rgba_float,
+ &util_format_x8b8g8r8_unorm_pack_rgba_float,
+ &util_format_x8b8g8r8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8x8_unorm_description = {
+ PIPE_FORMAT_R8G8B8X8_UNORM,
+ "PIPE_FORMAT_R8G8B8X8_UNORM",
+ "r8g8b8x8_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8b8x8_unorm_unpack_rgba_8unorm,
+ &util_format_r8g8b8x8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8b8x8_unorm_unpack_rgba_float,
+ &util_format_r8g8b8x8_unorm_pack_rgba_float,
+ &util_format_r8g8b8x8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b5g5r5x1_unorm_description = {
+ PIPE_FORMAT_B5G5R5X1_UNORM,
+ "PIPE_FORMAT_B5G5R5X1_UNORM",
+ "b5g5r5x1_unorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 5}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 10}, /* z = r */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 1, 15} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_b5g5r5x1_unorm_unpack_rgba_8unorm,
+ &util_format_b5g5r5x1_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_b5g5r5x1_unorm_unpack_rgba_float,
+ &util_format_b5g5r5x1_unorm_pack_rgba_float,
+ &util_format_b5g5r5x1_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b5g5r5a1_unorm_description = {
+ PIPE_FORMAT_B5G5R5A1_UNORM,
+ "PIPE_FORMAT_B5G5R5A1_UNORM",
+ "b5g5r5a1_unorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 5}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 10}, /* z = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 1, 15} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_b5g5r5a1_unorm_unpack_rgba_8unorm,
+ &util_format_b5g5r5a1_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_b5g5r5a1_unorm_unpack_rgba_float,
+ &util_format_b5g5r5a1_unorm_pack_rgba_float,
+ &util_format_b5g5r5a1_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b4g4r4a4_unorm_description = {
+ PIPE_FORMAT_B4G4R4A4_UNORM,
+ "PIPE_FORMAT_B4G4R4A4_UNORM",
+ "b4g4r4a4_unorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 8}, /* z = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 12} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_b4g4r4a4_unorm_unpack_rgba_8unorm,
+ &util_format_b4g4r4a4_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_b4g4r4a4_unorm_unpack_rgba_float,
+ &util_format_b4g4r4a4_unorm_pack_rgba_float,
+ &util_format_b4g4r4a4_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b4g4r4x4_unorm_description = {
+ PIPE_FORMAT_B4G4R4X4_UNORM,
+ "PIPE_FORMAT_B4G4R4X4_UNORM",
+ "b4g4r4x4_unorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 8}, /* z = r */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 4, 12} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_b4g4r4x4_unorm_unpack_rgba_8unorm,
+ &util_format_b4g4r4x4_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_b4g4r4x4_unorm_unpack_rgba_float,
+ &util_format_b4g4r4x4_unorm_pack_rgba_float,
+ &util_format_b4g4r4x4_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b5g6r5_unorm_description = {
+ PIPE_FORMAT_B5G6R5_UNORM,
+ "PIPE_FORMAT_B5G6R5_UNORM",
+ "b5g6r5_unorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 6, 5}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 11}, /* z = r */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_b5g6r5_unorm_unpack_rgba_8unorm,
+ &util_format_b5g6r5_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_b5g6r5_unorm_unpack_rgba_float,
+ &util_format_b5g6r5_unorm_pack_rgba_float,
+ &util_format_b5g6r5_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r10g10b10a2_unorm_description = {
+ PIPE_FORMAT_R10G10B10A2_UNORM,
+ "PIPE_FORMAT_R10G10B10A2_UNORM",
+ "r10g10b10a2_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 10}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 20}, /* z = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2, 30} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r10g10b10a2_unorm_unpack_rgba_8unorm,
+ &util_format_r10g10b10a2_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r10g10b10a2_unorm_unpack_rgba_float,
+ &util_format_r10g10b10a2_unorm_pack_rgba_float,
+ &util_format_r10g10b10a2_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b10g10r10a2_unorm_description = {
+ PIPE_FORMAT_B10G10R10A2_UNORM,
+ "PIPE_FORMAT_B10G10R10A2_UNORM",
+ "b10g10r10a2_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 10}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 20}, /* z = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2, 30} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_b10g10r10a2_unorm_unpack_rgba_8unorm,
+ &util_format_b10g10r10a2_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_b10g10r10a2_unorm_unpack_rgba_float,
+ &util_format_b10g10r10a2_unorm_pack_rgba_float,
+ &util_format_b10g10r10a2_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b2g3r3_unorm_description = {
+ PIPE_FORMAT_B2G3R3_UNORM,
+ "PIPE_FORMAT_B2G3R3_UNORM",
+ "b2g3r3_unorm",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 3, 2}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 3, 5}, /* z = r */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_b2g3r3_unorm_unpack_rgba_8unorm,
+ &util_format_b2g3r3_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_b2g3r3_unorm_unpack_rgba_float,
+ &util_format_b2g3r3_unorm_pack_rgba_float,
+ &util_format_b2g3r3_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l8_unorm_description = {
+ PIPE_FORMAT_L8_UNORM,
+ "PIPE_FORMAT_L8_UNORM",
+ "l8_unorm",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = rgb */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_l8_unorm_unpack_rgba_8unorm,
+ &util_format_l8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_l8_unorm_unpack_rgba_float,
+ &util_format_l8_unorm_pack_rgba_float,
+ &util_format_l8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a8_unorm_description = {
+ PIPE_FORMAT_A8_UNORM,
+ "PIPE_FORMAT_A8_UNORM",
+ "a8_unorm",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_0, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_a8_unorm_unpack_rgba_8unorm,
+ &util_format_a8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_a8_unorm_unpack_rgba_float,
+ &util_format_a8_unorm_pack_rgba_float,
+ &util_format_a8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_i8_unorm_description = {
+ PIPE_FORMAT_I8_UNORM,
+ "PIPE_FORMAT_I8_UNORM",
+ "i8_unorm",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = rgba */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_i8_unorm_unpack_rgba_8unorm,
+ &util_format_i8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_i8_unorm_unpack_rgba_float,
+ &util_format_i8_unorm_pack_rgba_float,
+ &util_format_i8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l4a4_unorm_description = {
+ PIPE_FORMAT_L4A4_UNORM,
+ "PIPE_FORMAT_L4A4_UNORM",
+ "l4a4_unorm",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0}, /* x = rgb */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_l4a4_unorm_unpack_rgba_8unorm,
+ &util_format_l4a4_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_l4a4_unorm_unpack_rgba_float,
+ &util_format_l4a4_unorm_pack_rgba_float,
+ &util_format_l4a4_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l8a8_unorm_description = {
+ PIPE_FORMAT_L8A8_UNORM,
+ "PIPE_FORMAT_L8A8_UNORM",
+ "l8a8_unorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = rgb */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_l8a8_unorm_unpack_rgba_8unorm,
+ &util_format_l8a8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_l8a8_unorm_unpack_rgba_float,
+ &util_format_l8a8_unorm_pack_rgba_float,
+ &util_format_l8a8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l16_unorm_description = {
+ PIPE_FORMAT_L16_UNORM,
+ "PIPE_FORMAT_L16_UNORM",
+ "l16_unorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = rgb */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_l16_unorm_unpack_rgba_8unorm,
+ &util_format_l16_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_l16_unorm_unpack_rgba_float,
+ &util_format_l16_unorm_pack_rgba_float,
+ &util_format_l16_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a16_unorm_description = {
+ PIPE_FORMAT_A16_UNORM,
+ "PIPE_FORMAT_A16_UNORM",
+ "a16_unorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_0, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_a16_unorm_unpack_rgba_8unorm,
+ &util_format_a16_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_a16_unorm_unpack_rgba_float,
+ &util_format_a16_unorm_pack_rgba_float,
+ &util_format_a16_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_i16_unorm_description = {
+ PIPE_FORMAT_I16_UNORM,
+ "PIPE_FORMAT_I16_UNORM",
+ "i16_unorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = rgba */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_i16_unorm_unpack_rgba_8unorm,
+ &util_format_i16_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_i16_unorm_unpack_rgba_float,
+ &util_format_i16_unorm_pack_rgba_float,
+ &util_format_i16_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l16a16_unorm_description = {
+ PIPE_FORMAT_L16A16_UNORM,
+ "PIPE_FORMAT_L16A16_UNORM",
+ "l16a16_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = rgb */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_l16a16_unorm_unpack_rgba_8unorm,
+ &util_format_l16a16_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_l16a16_unorm_unpack_rgba_float,
+ &util_format_l16a16_unorm_pack_rgba_float,
+ &util_format_l16a16_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a8_snorm_description = {
+ PIPE_FORMAT_A8_SNORM,
+ "PIPE_FORMAT_A8_SNORM",
+ "a8_snorm",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_0, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_a8_snorm_unpack_rgba_8unorm,
+ &util_format_a8_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_a8_snorm_unpack_rgba_float,
+ &util_format_a8_snorm_pack_rgba_float,
+ &util_format_a8_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l8_snorm_description = {
+ PIPE_FORMAT_L8_SNORM,
+ "PIPE_FORMAT_L8_SNORM",
+ "l8_snorm",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = rgb */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_l8_snorm_unpack_rgba_8unorm,
+ &util_format_l8_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_l8_snorm_unpack_rgba_float,
+ &util_format_l8_snorm_pack_rgba_float,
+ &util_format_l8_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l8a8_snorm_description = {
+ PIPE_FORMAT_L8A8_SNORM,
+ "PIPE_FORMAT_L8A8_SNORM",
+ "l8a8_snorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = rgb */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_l8a8_snorm_unpack_rgba_8unorm,
+ &util_format_l8a8_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_l8a8_snorm_unpack_rgba_float,
+ &util_format_l8a8_snorm_pack_rgba_float,
+ &util_format_l8a8_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_i8_snorm_description = {
+ PIPE_FORMAT_I8_SNORM,
+ "PIPE_FORMAT_I8_SNORM",
+ "i8_snorm",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = rgba */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_i8_snorm_unpack_rgba_8unorm,
+ &util_format_i8_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_i8_snorm_unpack_rgba_float,
+ &util_format_i8_snorm_pack_rgba_float,
+ &util_format_i8_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a16_snorm_description = {
+ PIPE_FORMAT_A16_SNORM,
+ "PIPE_FORMAT_A16_SNORM",
+ "a16_snorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_0, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_a16_snorm_unpack_rgba_8unorm,
+ &util_format_a16_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_a16_snorm_unpack_rgba_float,
+ &util_format_a16_snorm_pack_rgba_float,
+ &util_format_a16_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l16_snorm_description = {
+ PIPE_FORMAT_L16_SNORM,
+ "PIPE_FORMAT_L16_SNORM",
+ "l16_snorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = rgb */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_l16_snorm_unpack_rgba_8unorm,
+ &util_format_l16_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_l16_snorm_unpack_rgba_float,
+ &util_format_l16_snorm_pack_rgba_float,
+ &util_format_l16_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l16a16_snorm_description = {
+ PIPE_FORMAT_L16A16_SNORM,
+ "PIPE_FORMAT_L16A16_SNORM",
+ "l16a16_snorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = rgb */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_l16a16_snorm_unpack_rgba_8unorm,
+ &util_format_l16a16_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_l16a16_snorm_unpack_rgba_float,
+ &util_format_l16a16_snorm_pack_rgba_float,
+ &util_format_l16a16_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_i16_snorm_description = {
+ PIPE_FORMAT_I16_SNORM,
+ "PIPE_FORMAT_I16_SNORM",
+ "i16_snorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = rgba */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_i16_snorm_unpack_rgba_8unorm,
+ &util_format_i16_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_i16_snorm_unpack_rgba_float,
+ &util_format_i16_snorm_pack_rgba_float,
+ &util_format_i16_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a16_float_description = {
+ PIPE_FORMAT_A16_FLOAT,
+ "PIPE_FORMAT_A16_FLOAT",
+ "a16_float",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_0, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_a16_float_unpack_rgba_8unorm,
+ &util_format_a16_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_a16_float_unpack_rgba_float,
+ &util_format_a16_float_pack_rgba_float,
+ &util_format_a16_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l16_float_description = {
+ PIPE_FORMAT_L16_FLOAT,
+ "PIPE_FORMAT_L16_FLOAT",
+ "l16_float",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = rgb */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_l16_float_unpack_rgba_8unorm,
+ &util_format_l16_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_l16_float_unpack_rgba_float,
+ &util_format_l16_float_pack_rgba_float,
+ &util_format_l16_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l16a16_float_description = {
+ PIPE_FORMAT_L16A16_FLOAT,
+ "PIPE_FORMAT_L16A16_FLOAT",
+ "l16a16_float",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = rgb */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_l16a16_float_unpack_rgba_8unorm,
+ &util_format_l16a16_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_l16a16_float_unpack_rgba_float,
+ &util_format_l16a16_float_pack_rgba_float,
+ &util_format_l16a16_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_i16_float_description = {
+ PIPE_FORMAT_I16_FLOAT,
+ "PIPE_FORMAT_I16_FLOAT",
+ "i16_float",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = rgba */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_i16_float_unpack_rgba_8unorm,
+ &util_format_i16_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_i16_float_unpack_rgba_float,
+ &util_format_i16_float_pack_rgba_float,
+ &util_format_i16_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a32_float_description = {
+ PIPE_FORMAT_A32_FLOAT,
+ "PIPE_FORMAT_A32_FLOAT",
+ "a32_float",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_0, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_a32_float_unpack_rgba_8unorm,
+ &util_format_a32_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_a32_float_unpack_rgba_float,
+ &util_format_a32_float_pack_rgba_float,
+ &util_format_a32_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l32_float_description = {
+ PIPE_FORMAT_L32_FLOAT,
+ "PIPE_FORMAT_L32_FLOAT",
+ "l32_float",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = rgb */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_l32_float_unpack_rgba_8unorm,
+ &util_format_l32_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_l32_float_unpack_rgba_float,
+ &util_format_l32_float_pack_rgba_float,
+ &util_format_l32_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l32a32_float_description = {
+ PIPE_FORMAT_L32A32_FLOAT,
+ "PIPE_FORMAT_L32A32_FLOAT",
+ "l32a32_float",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = rgb */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_l32a32_float_unpack_rgba_8unorm,
+ &util_format_l32a32_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_l32a32_float_unpack_rgba_float,
+ &util_format_l32a32_float_pack_rgba_float,
+ &util_format_l32a32_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_i32_float_description = {
+ PIPE_FORMAT_I32_FLOAT,
+ "PIPE_FORMAT_I32_FLOAT",
+ "i32_float",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = rgba */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_i32_float_unpack_rgba_8unorm,
+ &util_format_i32_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_i32_float_unpack_rgba_float,
+ &util_format_i32_float_pack_rgba_float,
+ &util_format_i32_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l8_srgb_description = {
+ PIPE_FORMAT_L8_SRGB,
+ "PIPE_FORMAT_L8_SRGB",
+ "l8_srgb",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = rgb */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* sr */
+ UTIL_FORMAT_SWIZZLE_X, /* sg */
+ UTIL_FORMAT_SWIZZLE_X, /* sb */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_SRGB,
+ &util_format_l8_srgb_unpack_rgba_8unorm,
+ &util_format_l8_srgb_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_l8_srgb_unpack_rgba_float,
+ &util_format_l8_srgb_pack_rgba_float,
+ &util_format_l8_srgb_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l8a8_srgb_description = {
+ PIPE_FORMAT_L8A8_SRGB,
+ "PIPE_FORMAT_L8A8_SRGB",
+ "l8a8_srgb",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = rgb */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* sr */
+ UTIL_FORMAT_SWIZZLE_X, /* sg */
+ UTIL_FORMAT_SWIZZLE_X, /* sb */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_SRGB,
+ &util_format_l8a8_srgb_unpack_rgba_8unorm,
+ &util_format_l8a8_srgb_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_l8a8_srgb_unpack_rgba_float,
+ &util_format_l8a8_srgb_pack_rgba_float,
+ &util_format_l8a8_srgb_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8_srgb_description = {
+ PIPE_FORMAT_R8G8B8_SRGB,
+ "PIPE_FORMAT_R8G8B8_SRGB",
+ "r8g8b8_srgb",
+ {1, 1, 24}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* sr */
+ UTIL_FORMAT_SWIZZLE_Y, /* sg */
+ UTIL_FORMAT_SWIZZLE_Z, /* sb */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_SRGB,
+ &util_format_r8g8b8_srgb_unpack_rgba_8unorm,
+ &util_format_r8g8b8_srgb_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8b8_srgb_unpack_rgba_float,
+ &util_format_r8g8b8_srgb_pack_rgba_float,
+ &util_format_r8g8b8_srgb_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8a8_srgb_description = {
+ PIPE_FORMAT_R8G8B8A8_SRGB,
+ "PIPE_FORMAT_R8G8B8A8_SRGB",
+ "r8g8b8a8_srgb",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* sr */
+ UTIL_FORMAT_SWIZZLE_Y, /* sg */
+ UTIL_FORMAT_SWIZZLE_Z, /* sb */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_SRGB,
+ &util_format_r8g8b8a8_srgb_unpack_rgba_8unorm,
+ &util_format_r8g8b8a8_srgb_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8b8a8_srgb_unpack_rgba_float,
+ &util_format_r8g8b8a8_srgb_pack_rgba_float,
+ &util_format_r8g8b8a8_srgb_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a8b8g8r8_srgb_description = {
+ PIPE_FORMAT_A8B8G8R8_SRGB,
+ "PIPE_FORMAT_A8B8G8R8_SRGB",
+ "a8b8g8r8_srgb",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = a */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = r */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_W, /* sr */
+ UTIL_FORMAT_SWIZZLE_Z, /* sg */
+ UTIL_FORMAT_SWIZZLE_Y, /* sb */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_SRGB,
+ &util_format_a8b8g8r8_srgb_unpack_rgba_8unorm,
+ &util_format_a8b8g8r8_srgb_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_a8b8g8r8_srgb_unpack_rgba_float,
+ &util_format_a8b8g8r8_srgb_pack_rgba_float,
+ &util_format_a8b8g8r8_srgb_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_x8b8g8r8_srgb_description = {
+ PIPE_FORMAT_X8B8G8R8_SRGB,
+ "PIPE_FORMAT_X8B8G8R8_SRGB",
+ "x8b8g8r8_srgb",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = r */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_W, /* sr */
+ UTIL_FORMAT_SWIZZLE_Z, /* sg */
+ UTIL_FORMAT_SWIZZLE_Y, /* sb */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_SRGB,
+ &util_format_x8b8g8r8_srgb_unpack_rgba_8unorm,
+ &util_format_x8b8g8r8_srgb_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_x8b8g8r8_srgb_unpack_rgba_float,
+ &util_format_x8b8g8r8_srgb_pack_rgba_float,
+ &util_format_x8b8g8r8_srgb_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b8g8r8a8_srgb_description = {
+ PIPE_FORMAT_B8G8R8A8_SRGB,
+ "PIPE_FORMAT_B8G8R8A8_SRGB",
+ "b8g8r8a8_srgb",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* sr */
+ UTIL_FORMAT_SWIZZLE_Y, /* sg */
+ UTIL_FORMAT_SWIZZLE_X, /* sb */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_SRGB,
+ &util_format_b8g8r8a8_srgb_unpack_rgba_8unorm,
+ &util_format_b8g8r8a8_srgb_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_b8g8r8a8_srgb_unpack_rgba_float,
+ &util_format_b8g8r8a8_srgb_pack_rgba_float,
+ &util_format_b8g8r8a8_srgb_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b8g8r8x8_srgb_description = {
+ PIPE_FORMAT_B8G8R8X8_SRGB,
+ "PIPE_FORMAT_B8G8R8X8_SRGB",
+ "b8g8r8x8_srgb",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = r */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* sr */
+ UTIL_FORMAT_SWIZZLE_Y, /* sg */
+ UTIL_FORMAT_SWIZZLE_X, /* sb */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_SRGB,
+ &util_format_b8g8r8x8_srgb_unpack_rgba_8unorm,
+ &util_format_b8g8r8x8_srgb_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_b8g8r8x8_srgb_unpack_rgba_float,
+ &util_format_b8g8r8x8_srgb_pack_rgba_float,
+ &util_format_b8g8r8x8_srgb_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a8r8g8b8_srgb_description = {
+ PIPE_FORMAT_A8R8G8B8_SRGB,
+ "PIPE_FORMAT_A8R8G8B8_SRGB",
+ "a8r8g8b8_srgb",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = a */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = b */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Y, /* sr */
+ UTIL_FORMAT_SWIZZLE_Z, /* sg */
+ UTIL_FORMAT_SWIZZLE_W, /* sb */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_SRGB,
+ &util_format_a8r8g8b8_srgb_unpack_rgba_8unorm,
+ &util_format_a8r8g8b8_srgb_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_a8r8g8b8_srgb_unpack_rgba_float,
+ &util_format_a8r8g8b8_srgb_pack_rgba_float,
+ &util_format_a8r8g8b8_srgb_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_x8r8g8b8_srgb_description = {
+ PIPE_FORMAT_X8R8G8B8_SRGB,
+ "PIPE_FORMAT_X8R8G8B8_SRGB",
+ "x8r8g8b8_srgb",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = b */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Y, /* sr */
+ UTIL_FORMAT_SWIZZLE_Z, /* sg */
+ UTIL_FORMAT_SWIZZLE_W, /* sb */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_SRGB,
+ &util_format_x8r8g8b8_srgb_unpack_rgba_8unorm,
+ &util_format_x8r8g8b8_srgb_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_x8r8g8b8_srgb_unpack_rgba_float,
+ &util_format_x8r8g8b8_srgb_pack_rgba_float,
+ &util_format_x8r8g8b8_srgb_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8sg8sb8ux8u_norm_description = {
+ PIPE_FORMAT_R8SG8SB8UX8U_NORM,
+ "PIPE_FORMAT_R8SG8SB8UX8U_NORM",
+ "r8sg8sb8ux8u_norm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ TRUE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8sg8sb8ux8u_norm_unpack_rgba_8unorm,
+ &util_format_r8sg8sb8ux8u_norm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8sg8sb8ux8u_norm_unpack_rgba_float,
+ &util_format_r8sg8sb8ux8u_norm_pack_rgba_float,
+ &util_format_r8sg8sb8ux8u_norm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r10sg10sb10sa2u_norm_description = {
+ PIPE_FORMAT_R10SG10SB10SA2U_NORM,
+ "PIPE_FORMAT_R10SG10SB10SA2U_NORM",
+ "r10sg10sb10sa2u_norm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ TRUE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 10}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 20}, /* z = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2, 30} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r10sg10sb10sa2u_norm_unpack_rgba_8unorm,
+ &util_format_r10sg10sb10sa2u_norm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r10sg10sb10sa2u_norm_unpack_rgba_float,
+ &util_format_r10sg10sb10sa2u_norm_pack_rgba_float,
+ &util_format_r10sg10sb10sa2u_norm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r5sg5sb6u_norm_description = {
+ PIPE_FORMAT_R5SG5SB6U_NORM,
+ "PIPE_FORMAT_R5SG5SB6U_NORM",
+ "r5sg5sb6u_norm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ TRUE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 5, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 5, 5}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 6, 10}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r5sg5sb6u_norm_unpack_rgba_8unorm,
+ &util_format_r5sg5sb6u_norm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r5sg5sb6u_norm_unpack_rgba_float,
+ &util_format_r5sg5sb6u_norm_pack_rgba_float,
+ &util_format_r5sg5sb6u_norm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_s8_uint_description = {
+ PIPE_FORMAT_S8_UINT,
+ "PIPE_FORMAT_S8_UINT",
+ "s8_uint",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = s */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_NONE, /* z */
+ UTIL_FORMAT_SWIZZLE_X, /* s */
+ UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
+ UTIL_FORMAT_SWIZZLE_NONE /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_ZS,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ &util_format_s8_uint_unpack_s_8uint,
+ &util_format_s8_uint_pack_s_8uint,
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_z16_unorm_description = {
+ PIPE_FORMAT_Z16_UNORM,
+ "PIPE_FORMAT_Z16_UNORM",
+ "z16_unorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = z */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* z */
+ UTIL_FORMAT_SWIZZLE_NONE, /* s */
+ UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
+ UTIL_FORMAT_SWIZZLE_NONE /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_ZS,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ &util_format_z16_unorm_unpack_z_32unorm,
+ &util_format_z16_unorm_pack_z_32unorm,
+ &util_format_z16_unorm_unpack_z_float,
+ &util_format_z16_unorm_pack_z_float,
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_z32_unorm_description = {
+ PIPE_FORMAT_Z32_UNORM,
+ "PIPE_FORMAT_Z32_UNORM",
+ "z32_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 0}, /* x = z */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* z */
+ UTIL_FORMAT_SWIZZLE_NONE, /* s */
+ UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
+ UTIL_FORMAT_SWIZZLE_NONE /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_ZS,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ &util_format_z32_unorm_unpack_z_32unorm,
+ &util_format_z32_unorm_pack_z_32unorm,
+ &util_format_z32_unorm_unpack_z_float,
+ &util_format_z32_unorm_pack_z_float,
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_z32_float_description = {
+ PIPE_FORMAT_Z32_FLOAT,
+ "PIPE_FORMAT_Z32_FLOAT",
+ "z32_float",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = z */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* z */
+ UTIL_FORMAT_SWIZZLE_NONE, /* s */
+ UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
+ UTIL_FORMAT_SWIZZLE_NONE /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_ZS,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ &util_format_z32_float_unpack_z_32unorm,
+ &util_format_z32_float_pack_z_32unorm,
+ &util_format_z32_float_unpack_z_float,
+ &util_format_z32_float_pack_z_float,
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_z24_unorm_s8_uint_description = {
+ PIPE_FORMAT_Z24_UNORM_S8_UINT,
+ "PIPE_FORMAT_Z24_UNORM_S8_UINT",
+ "z24_unorm_s8_uint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ TRUE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24, 0}, /* x = z */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 24}, /* y = s */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* z */
+ UTIL_FORMAT_SWIZZLE_Y, /* s */
+ UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
+ UTIL_FORMAT_SWIZZLE_NONE /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_ZS,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ &util_format_z24_unorm_s8_uint_unpack_z_32unorm,
+ &util_format_z24_unorm_s8_uint_pack_z_32unorm,
+ &util_format_z24_unorm_s8_uint_unpack_z_float,
+ &util_format_z24_unorm_s8_uint_pack_z_float,
+ &util_format_z24_unorm_s8_uint_unpack_s_8uint,
+ &util_format_z24_unorm_s8_uint_pack_s_8uint,
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_s8_uint_z24_unorm_description = {
+ PIPE_FORMAT_S8_UINT_Z24_UNORM,
+ "PIPE_FORMAT_S8_UINT_Z24_UNORM",
+ "s8_uint_z24_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ TRUE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = s */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24, 8}, /* y = z */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Y, /* z */
+ UTIL_FORMAT_SWIZZLE_X, /* s */
+ UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
+ UTIL_FORMAT_SWIZZLE_NONE /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_ZS,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ &util_format_s8_uint_z24_unorm_unpack_z_32unorm,
+ &util_format_s8_uint_z24_unorm_pack_z_32unorm,
+ &util_format_s8_uint_z24_unorm_unpack_z_float,
+ &util_format_s8_uint_z24_unorm_pack_z_float,
+ &util_format_s8_uint_z24_unorm_unpack_s_8uint,
+ &util_format_s8_uint_z24_unorm_pack_s_8uint,
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_x24s8_uint_description = {
+ PIPE_FORMAT_X24S8_UINT,
+ "PIPE_FORMAT_X24S8_UINT",
+ "x24s8_uint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24, 0}, /* x = x */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 24}, /* y = s */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_NONE, /* z */
+ UTIL_FORMAT_SWIZZLE_Y, /* s */
+ UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
+ UTIL_FORMAT_SWIZZLE_NONE /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_ZS,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ &util_format_x24s8_uint_unpack_s_8uint,
+ &util_format_x24s8_uint_pack_s_8uint,
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_s8x24_uint_description = {
+ PIPE_FORMAT_S8X24_UINT,
+ "PIPE_FORMAT_S8X24_UINT",
+ "s8x24_uint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = s */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24, 8}, /* y = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_NONE, /* z */
+ UTIL_FORMAT_SWIZZLE_X, /* s */
+ UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
+ UTIL_FORMAT_SWIZZLE_NONE /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_ZS,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ &util_format_s8x24_uint_unpack_s_8uint,
+ &util_format_s8x24_uint_pack_s_8uint,
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_z24x8_unorm_description = {
+ PIPE_FORMAT_Z24X8_UNORM,
+ "PIPE_FORMAT_Z24X8_UNORM",
+ "z24x8_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24, 0}, /* x = z */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24}, /* y = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* z */
+ UTIL_FORMAT_SWIZZLE_NONE, /* s */
+ UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
+ UTIL_FORMAT_SWIZZLE_NONE /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_ZS,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ &util_format_z24x8_unorm_unpack_z_32unorm,
+ &util_format_z24x8_unorm_pack_z_32unorm,
+ &util_format_z24x8_unorm_unpack_z_float,
+ &util_format_z24x8_unorm_pack_z_float,
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_x8z24_unorm_description = {
+ PIPE_FORMAT_X8Z24_UNORM,
+ "PIPE_FORMAT_X8Z24_UNORM",
+ "x8z24_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24, 8}, /* y = z */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Y, /* z */
+ UTIL_FORMAT_SWIZZLE_NONE, /* s */
+ UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
+ UTIL_FORMAT_SWIZZLE_NONE /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_ZS,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ &util_format_x8z24_unorm_unpack_z_32unorm,
+ &util_format_x8z24_unorm_pack_z_32unorm,
+ &util_format_x8z24_unorm_unpack_z_float,
+ &util_format_x8z24_unorm_pack_z_float,
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_z32_float_s8x24_uint_description = {
+ PIPE_FORMAT_Z32_FLOAT_S8X24_UINT,
+ "PIPE_FORMAT_Z32_FLOAT_S8X24_UINT",
+ "z32_float_s8x24_uint",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ TRUE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = z */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 32}, /* y = s */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24, 40}, /* z = x */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* z */
+ UTIL_FORMAT_SWIZZLE_Y, /* s */
+ UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
+ UTIL_FORMAT_SWIZZLE_NONE /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_ZS,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ &util_format_z32_float_s8x24_uint_unpack_z_32unorm,
+ &util_format_z32_float_s8x24_uint_pack_z_32unorm,
+ &util_format_z32_float_s8x24_uint_unpack_z_float,
+ &util_format_z32_float_s8x24_uint_pack_z_float,
+ &util_format_z32_float_s8x24_uint_unpack_s_8uint,
+ &util_format_z32_float_s8x24_uint_pack_s_8uint,
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_x32_s8x24_uint_description = {
+ PIPE_FORMAT_X32_S8X24_UINT,
+ "PIPE_FORMAT_X32_S8X24_UINT",
+ "x32_s8x24_uint",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 32}, /* y = s */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24, 40}, /* z = x */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_NONE, /* z */
+ UTIL_FORMAT_SWIZZLE_Y, /* s */
+ UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
+ UTIL_FORMAT_SWIZZLE_NONE /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_ZS,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ &util_format_x32_s8x24_uint_unpack_s_8uint,
+ &util_format_x32_s8x24_uint_pack_s_8uint,
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_uyvy_description = {
+ PIPE_FORMAT_UYVY,
+ "PIPE_FORMAT_UYVY",
+ "uyvy",
+ {2, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_SUBSAMPLED,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* y */
+ UTIL_FORMAT_SWIZZLE_Y, /* u */
+ UTIL_FORMAT_SWIZZLE_Z, /* v */
+ UTIL_FORMAT_SWIZZLE_1 /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_YUV,
+ &util_format_uyvy_unpack_rgba_8unorm,
+ &util_format_uyvy_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_uyvy_unpack_rgba_float,
+ &util_format_uyvy_pack_rgba_float,
+ &util_format_uyvy_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_yuyv_description = {
+ PIPE_FORMAT_YUYV,
+ "PIPE_FORMAT_YUYV",
+ "yuyv",
+ {2, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_SUBSAMPLED,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* y */
+ UTIL_FORMAT_SWIZZLE_Y, /* u */
+ UTIL_FORMAT_SWIZZLE_Z, /* v */
+ UTIL_FORMAT_SWIZZLE_1 /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_YUV,
+ &util_format_yuyv_unpack_rgba_8unorm,
+ &util_format_yuyv_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_yuyv_unpack_rgba_float,
+ &util_format_yuyv_pack_rgba_float,
+ &util_format_yuyv_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8_b8g8_unorm_description = {
+ PIPE_FORMAT_R8G8_B8G8_UNORM,
+ "PIPE_FORMAT_R8G8_B8G8_UNORM",
+ "r8g8_b8g8_unorm",
+ {2, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_SUBSAMPLED,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8_b8g8_unorm_unpack_rgba_8unorm,
+ &util_format_r8g8_b8g8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8_b8g8_unorm_unpack_rgba_float,
+ &util_format_r8g8_b8g8_unorm_pack_rgba_float,
+ &util_format_r8g8_b8g8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_g8r8_g8b8_unorm_description = {
+ PIPE_FORMAT_G8R8_G8B8_UNORM,
+ "PIPE_FORMAT_G8R8_G8B8_UNORM",
+ "g8r8_g8b8_unorm",
+ {2, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_SUBSAMPLED,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_g8r8_g8b8_unorm_unpack_rgba_8unorm,
+ &util_format_g8r8_g8b8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_g8r8_g8b8_unorm_unpack_rgba_float,
+ &util_format_g8r8_g8b8_unorm_pack_rgba_float,
+ &util_format_g8r8_g8b8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_g8r8_b8r8_unorm_description = {
+ PIPE_FORMAT_G8R8_B8R8_UNORM,
+ "PIPE_FORMAT_G8R8_B8R8_UNORM",
+ "g8r8_b8r8_unorm",
+ {2, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_SUBSAMPLED,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Y, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_g8r8_b8r8_unorm_unpack_rgba_8unorm,
+ &util_format_g8r8_b8r8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_g8r8_b8r8_unorm_unpack_rgba_float,
+ &util_format_g8r8_b8r8_unorm_pack_rgba_float,
+ &util_format_g8r8_b8r8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8_r8b8_unorm_description = {
+ PIPE_FORMAT_R8G8_R8B8_UNORM,
+ "PIPE_FORMAT_R8G8_R8B8_UNORM",
+ "r8g8_r8b8_unorm",
+ {2, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_SUBSAMPLED,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Y, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8_r8b8_unorm_unpack_rgba_8unorm,
+ &util_format_r8g8_r8b8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8_r8b8_unorm_unpack_rgba_float,
+ &util_format_r8g8_r8b8_unorm_pack_rgba_float,
+ &util_format_r8g8_r8b8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r11g11b10_float_description = {
+ PIPE_FORMAT_R11G11B10_FLOAT,
+ "PIPE_FORMAT_R11G11B10_FLOAT",
+ "r11g11b10_float",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_OTHER,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r11g11b10_float_unpack_rgba_8unorm,
+ &util_format_r11g11b10_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r11g11b10_float_unpack_rgba_float,
+ &util_format_r11g11b10_float_pack_rgba_float,
+ &util_format_r11g11b10_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r9g9b9e5_float_description = {
+ PIPE_FORMAT_R9G9B9E5_FLOAT,
+ "PIPE_FORMAT_R9G9B9E5_FLOAT",
+ "r9g9b9e5_float",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_OTHER,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r9g9b9e5_float_unpack_rgba_8unorm,
+ &util_format_r9g9b9e5_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r9g9b9e5_float_unpack_rgba_float,
+ &util_format_r9g9b9e5_float_pack_rgba_float,
+ &util_format_r9g9b9e5_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r1_unorm_description = {
+ PIPE_FORMAT_R1_UNORM,
+ "PIPE_FORMAT_R1_UNORM",
+ "r1_unorm",
+ {8, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_OTHER,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r1_unorm_unpack_rgba_8unorm,
+ &util_format_r1_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r1_unorm_unpack_rgba_float,
+ &util_format_r1_unorm_pack_rgba_float,
+ &util_format_r1_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8bx_snorm_description = {
+ PIPE_FORMAT_R8G8Bx_SNORM,
+ "PIPE_FORMAT_R8G8Bx_SNORM",
+ "r8g8bx_snorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_OTHER,
+ 2, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = x */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = y */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8bx_snorm_unpack_rgba_8unorm,
+ &util_format_r8g8bx_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8bx_snorm_unpack_rgba_float,
+ &util_format_r8g8bx_snorm_pack_rgba_float,
+ &util_format_r8g8bx_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_dxt1_rgb_description = {
+ PIPE_FORMAT_DXT1_RGB,
+ "PIPE_FORMAT_DXT1_RGB",
+ "dxt1_rgb",
+ {4, 4, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_S3TC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_dxt1_rgb_unpack_rgba_8unorm,
+ &util_format_dxt1_rgb_pack_rgba_8unorm,
+ &util_format_dxt1_rgb_fetch_rgba_8unorm,
+ &util_format_dxt1_rgb_unpack_rgba_float,
+ &util_format_dxt1_rgb_pack_rgba_float,
+ &util_format_dxt1_rgb_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_dxt1_rgba_description = {
+ PIPE_FORMAT_DXT1_RGBA,
+ "PIPE_FORMAT_DXT1_RGBA",
+ "dxt1_rgba",
+ {4, 4, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_S3TC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_dxt1_rgba_unpack_rgba_8unorm,
+ &util_format_dxt1_rgba_pack_rgba_8unorm,
+ &util_format_dxt1_rgba_fetch_rgba_8unorm,
+ &util_format_dxt1_rgba_unpack_rgba_float,
+ &util_format_dxt1_rgba_pack_rgba_float,
+ &util_format_dxt1_rgba_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_dxt3_rgba_description = {
+ PIPE_FORMAT_DXT3_RGBA,
+ "PIPE_FORMAT_DXT3_RGBA",
+ "dxt3_rgba",
+ {4, 4, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_S3TC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_dxt3_rgba_unpack_rgba_8unorm,
+ &util_format_dxt3_rgba_pack_rgba_8unorm,
+ &util_format_dxt3_rgba_fetch_rgba_8unorm,
+ &util_format_dxt3_rgba_unpack_rgba_float,
+ &util_format_dxt3_rgba_pack_rgba_float,
+ &util_format_dxt3_rgba_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_dxt5_rgba_description = {
+ PIPE_FORMAT_DXT5_RGBA,
+ "PIPE_FORMAT_DXT5_RGBA",
+ "dxt5_rgba",
+ {4, 4, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_S3TC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_dxt5_rgba_unpack_rgba_8unorm,
+ &util_format_dxt5_rgba_pack_rgba_8unorm,
+ &util_format_dxt5_rgba_fetch_rgba_8unorm,
+ &util_format_dxt5_rgba_unpack_rgba_float,
+ &util_format_dxt5_rgba_pack_rgba_float,
+ &util_format_dxt5_rgba_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_dxt1_srgb_description = {
+ PIPE_FORMAT_DXT1_SRGB,
+ "PIPE_FORMAT_DXT1_SRGB",
+ "dxt1_srgb",
+ {4, 4, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_S3TC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* sr */
+ UTIL_FORMAT_SWIZZLE_Y, /* sg */
+ UTIL_FORMAT_SWIZZLE_Z, /* sb */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_SRGB,
+ &util_format_dxt1_srgb_unpack_rgba_8unorm,
+ &util_format_dxt1_srgb_pack_rgba_8unorm,
+ &util_format_dxt1_srgb_fetch_rgba_8unorm,
+ &util_format_dxt1_srgb_unpack_rgba_float,
+ &util_format_dxt1_srgb_pack_rgba_float,
+ &util_format_dxt1_srgb_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_dxt1_srgba_description = {
+ PIPE_FORMAT_DXT1_SRGBA,
+ "PIPE_FORMAT_DXT1_SRGBA",
+ "dxt1_srgba",
+ {4, 4, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_S3TC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* sr */
+ UTIL_FORMAT_SWIZZLE_Y, /* sg */
+ UTIL_FORMAT_SWIZZLE_Z, /* sb */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_SRGB,
+ &util_format_dxt1_srgba_unpack_rgba_8unorm,
+ &util_format_dxt1_srgba_pack_rgba_8unorm,
+ &util_format_dxt1_srgba_fetch_rgba_8unorm,
+ &util_format_dxt1_srgba_unpack_rgba_float,
+ &util_format_dxt1_srgba_pack_rgba_float,
+ &util_format_dxt1_srgba_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_dxt3_srgba_description = {
+ PIPE_FORMAT_DXT3_SRGBA,
+ "PIPE_FORMAT_DXT3_SRGBA",
+ "dxt3_srgba",
+ {4, 4, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_S3TC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* sr */
+ UTIL_FORMAT_SWIZZLE_Y, /* sg */
+ UTIL_FORMAT_SWIZZLE_Z, /* sb */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_SRGB,
+ &util_format_dxt3_srgba_unpack_rgba_8unorm,
+ &util_format_dxt3_srgba_pack_rgba_8unorm,
+ &util_format_dxt3_srgba_fetch_rgba_8unorm,
+ &util_format_dxt3_srgba_unpack_rgba_float,
+ &util_format_dxt3_srgba_pack_rgba_float,
+ &util_format_dxt3_srgba_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_dxt5_srgba_description = {
+ PIPE_FORMAT_DXT5_SRGBA,
+ "PIPE_FORMAT_DXT5_SRGBA",
+ "dxt5_srgba",
+ {4, 4, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_S3TC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* sr */
+ UTIL_FORMAT_SWIZZLE_Y, /* sg */
+ UTIL_FORMAT_SWIZZLE_Z, /* sb */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_SRGB,
+ &util_format_dxt5_srgba_unpack_rgba_8unorm,
+ &util_format_dxt5_srgba_pack_rgba_8unorm,
+ &util_format_dxt5_srgba_fetch_rgba_8unorm,
+ &util_format_dxt5_srgba_unpack_rgba_float,
+ &util_format_dxt5_srgba_pack_rgba_float,
+ &util_format_dxt5_srgba_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_rgtc1_unorm_description = {
+ PIPE_FORMAT_RGTC1_UNORM,
+ "PIPE_FORMAT_RGTC1_UNORM",
+ "rgtc1_unorm",
+ {4, 4, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_RGTC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_rgtc1_unorm_unpack_rgba_8unorm,
+ &util_format_rgtc1_unorm_pack_rgba_8unorm,
+ &util_format_rgtc1_unorm_fetch_rgba_8unorm,
+ &util_format_rgtc1_unorm_unpack_rgba_float,
+ &util_format_rgtc1_unorm_pack_rgba_float,
+ &util_format_rgtc1_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_rgtc1_snorm_description = {
+ PIPE_FORMAT_RGTC1_SNORM,
+ "PIPE_FORMAT_RGTC1_SNORM",
+ "rgtc1_snorm",
+ {4, 4, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_RGTC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_rgtc1_snorm_unpack_rgba_8unorm,
+ &util_format_rgtc1_snorm_pack_rgba_8unorm,
+ &util_format_rgtc1_snorm_fetch_rgba_8unorm,
+ &util_format_rgtc1_snorm_unpack_rgba_float,
+ &util_format_rgtc1_snorm_pack_rgba_float,
+ &util_format_rgtc1_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_rgtc2_unorm_description = {
+ PIPE_FORMAT_RGTC2_UNORM,
+ "PIPE_FORMAT_RGTC2_UNORM",
+ "rgtc2_unorm",
+ {4, 4, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_RGTC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_rgtc2_unorm_unpack_rgba_8unorm,
+ &util_format_rgtc2_unorm_pack_rgba_8unorm,
+ &util_format_rgtc2_unorm_fetch_rgba_8unorm,
+ &util_format_rgtc2_unorm_unpack_rgba_float,
+ &util_format_rgtc2_unorm_pack_rgba_float,
+ &util_format_rgtc2_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_rgtc2_snorm_description = {
+ PIPE_FORMAT_RGTC2_SNORM,
+ "PIPE_FORMAT_RGTC2_SNORM",
+ "rgtc2_snorm",
+ {4, 4, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_RGTC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_rgtc2_snorm_unpack_rgba_8unorm,
+ &util_format_rgtc2_snorm_pack_rgba_8unorm,
+ &util_format_rgtc2_snorm_fetch_rgba_8unorm,
+ &util_format_rgtc2_snorm_unpack_rgba_float,
+ &util_format_rgtc2_snorm_pack_rgba_float,
+ &util_format_rgtc2_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_latc1_unorm_description = {
+ PIPE_FORMAT_LATC1_UNORM,
+ "PIPE_FORMAT_LATC1_UNORM",
+ "latc1_unorm",
+ {4, 4, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_RGTC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_latc1_unorm_unpack_rgba_8unorm,
+ &util_format_latc1_unorm_pack_rgba_8unorm,
+ &util_format_latc1_unorm_fetch_rgba_8unorm,
+ &util_format_latc1_unorm_unpack_rgba_float,
+ &util_format_latc1_unorm_pack_rgba_float,
+ &util_format_latc1_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_latc1_snorm_description = {
+ PIPE_FORMAT_LATC1_SNORM,
+ "PIPE_FORMAT_LATC1_SNORM",
+ "latc1_snorm",
+ {4, 4, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_RGTC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_latc1_snorm_unpack_rgba_8unorm,
+ &util_format_latc1_snorm_pack_rgba_8unorm,
+ &util_format_latc1_snorm_fetch_rgba_8unorm,
+ &util_format_latc1_snorm_unpack_rgba_float,
+ &util_format_latc1_snorm_pack_rgba_float,
+ &util_format_latc1_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_latc2_unorm_description = {
+ PIPE_FORMAT_LATC2_UNORM,
+ "PIPE_FORMAT_LATC2_UNORM",
+ "latc2_unorm",
+ {4, 4, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_RGTC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_latc2_unorm_unpack_rgba_8unorm,
+ &util_format_latc2_unorm_pack_rgba_8unorm,
+ &util_format_latc2_unorm_fetch_rgba_8unorm,
+ &util_format_latc2_unorm_unpack_rgba_float,
+ &util_format_latc2_unorm_pack_rgba_float,
+ &util_format_latc2_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_latc2_snorm_description = {
+ PIPE_FORMAT_LATC2_SNORM,
+ "PIPE_FORMAT_LATC2_SNORM",
+ "latc2_snorm",
+ {4, 4, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_RGTC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_latc2_snorm_unpack_rgba_8unorm,
+ &util_format_latc2_snorm_pack_rgba_8unorm,
+ &util_format_latc2_snorm_fetch_rgba_8unorm,
+ &util_format_latc2_snorm_unpack_rgba_float,
+ &util_format_latc2_snorm_pack_rgba_float,
+ &util_format_latc2_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_etc1_rgb8_description = {
+ PIPE_FORMAT_ETC1_RGB8,
+ "PIPE_FORMAT_ETC1_RGB8",
+ "etc1_rgb8",
+ {4, 4, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_ETC,
+ 1, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_etc1_rgb8_unpack_rgba_8unorm,
+ &util_format_etc1_rgb8_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_etc1_rgb8_unpack_rgba_float,
+ &util_format_etc1_rgb8_pack_rgba_float,
+ &util_format_etc1_rgb8_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r64_float_description = {
+ PIPE_FORMAT_R64_FLOAT,
+ "PIPE_FORMAT_R64_FLOAT",
+ "r64_float",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r64_float_unpack_rgba_8unorm,
+ &util_format_r64_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r64_float_unpack_rgba_float,
+ &util_format_r64_float_pack_rgba_float,
+ &util_format_r64_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r64g64_float_description = {
+ PIPE_FORMAT_R64G64_FLOAT,
+ "PIPE_FORMAT_R64G64_FLOAT",
+ "r64g64_float",
+ {1, 1, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 64}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r64g64_float_unpack_rgba_8unorm,
+ &util_format_r64g64_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r64g64_float_unpack_rgba_float,
+ &util_format_r64g64_float_pack_rgba_float,
+ &util_format_r64g64_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r64g64b64_float_description = {
+ PIPE_FORMAT_R64G64B64_FLOAT,
+ "PIPE_FORMAT_R64G64B64_FLOAT",
+ "r64g64b64_float",
+ {1, 1, 192}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 64}, /* y = g */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 128}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r64g64b64_float_unpack_rgba_8unorm,
+ &util_format_r64g64b64_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r64g64b64_float_unpack_rgba_float,
+ &util_format_r64g64b64_float_pack_rgba_float,
+ &util_format_r64g64b64_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r64g64b64a64_float_description = {
+ PIPE_FORMAT_R64G64B64A64_FLOAT,
+ "PIPE_FORMAT_R64G64B64A64_FLOAT",
+ "r64g64b64a64_float",
+ {1, 1, 256}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 64}, /* y = g */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 128}, /* z = b */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 192} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r64g64b64a64_float_unpack_rgba_8unorm,
+ &util_format_r64g64b64a64_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r64g64b64a64_float_unpack_rgba_float,
+ &util_format_r64g64b64a64_float_pack_rgba_float,
+ &util_format_r64g64b64a64_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32_float_description = {
+ PIPE_FORMAT_R32_FLOAT,
+ "PIPE_FORMAT_R32_FLOAT",
+ "r32_float",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32_float_unpack_rgba_8unorm,
+ &util_format_r32_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32_float_unpack_rgba_float,
+ &util_format_r32_float_pack_rgba_float,
+ &util_format_r32_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32_float_description = {
+ PIPE_FORMAT_R32G32_FLOAT,
+ "PIPE_FORMAT_R32G32_FLOAT",
+ "r32g32_float",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32_float_unpack_rgba_8unorm,
+ &util_format_r32g32_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32_float_unpack_rgba_float,
+ &util_format_r32g32_float_pack_rgba_float,
+ &util_format_r32g32_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32_float_description = {
+ PIPE_FORMAT_R32G32B32_FLOAT,
+ "PIPE_FORMAT_R32G32B32_FLOAT",
+ "r32g32b32_float",
+ {1, 1, 96}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 64}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32b32_float_unpack_rgba_8unorm,
+ &util_format_r32g32b32_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32b32_float_unpack_rgba_float,
+ &util_format_r32g32b32_float_pack_rgba_float,
+ &util_format_r32g32b32_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32a32_float_description = {
+ PIPE_FORMAT_R32G32B32A32_FLOAT,
+ "PIPE_FORMAT_R32G32B32A32_FLOAT",
+ "r32g32b32a32_float",
+ {1, 1, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 64}, /* z = b */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 96} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32b32a32_float_unpack_rgba_8unorm,
+ &util_format_r32g32b32a32_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32b32a32_float_unpack_rgba_float,
+ &util_format_r32g32b32a32_float_pack_rgba_float,
+ &util_format_r32g32b32a32_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32_unorm_description = {
+ PIPE_FORMAT_R32_UNORM,
+ "PIPE_FORMAT_R32_UNORM",
+ "r32_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32_unorm_unpack_rgba_8unorm,
+ &util_format_r32_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32_unorm_unpack_rgba_float,
+ &util_format_r32_unorm_pack_rgba_float,
+ &util_format_r32_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32_unorm_description = {
+ PIPE_FORMAT_R32G32_UNORM,
+ "PIPE_FORMAT_R32G32_UNORM",
+ "r32g32_unorm",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 32}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32_unorm_unpack_rgba_8unorm,
+ &util_format_r32g32_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32_unorm_unpack_rgba_float,
+ &util_format_r32g32_unorm_pack_rgba_float,
+ &util_format_r32g32_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32_unorm_description = {
+ PIPE_FORMAT_R32G32B32_UNORM,
+ "PIPE_FORMAT_R32G32B32_UNORM",
+ "r32g32b32_unorm",
+ {1, 1, 96}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 64}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32b32_unorm_unpack_rgba_8unorm,
+ &util_format_r32g32b32_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32b32_unorm_unpack_rgba_float,
+ &util_format_r32g32b32_unorm_pack_rgba_float,
+ &util_format_r32g32b32_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32a32_unorm_description = {
+ PIPE_FORMAT_R32G32B32A32_UNORM,
+ "PIPE_FORMAT_R32G32B32A32_UNORM",
+ "r32g32b32a32_unorm",
+ {1, 1, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 64}, /* z = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 96} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32b32a32_unorm_unpack_rgba_8unorm,
+ &util_format_r32g32b32a32_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32b32a32_unorm_unpack_rgba_float,
+ &util_format_r32g32b32a32_unorm_pack_rgba_float,
+ &util_format_r32g32b32a32_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32_uscaled_description = {
+ PIPE_FORMAT_R32_USCALED,
+ "PIPE_FORMAT_R32_USCALED",
+ "r32_uscaled",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32_uscaled_unpack_rgba_8unorm,
+ &util_format_r32_uscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32_uscaled_unpack_rgba_float,
+ &util_format_r32_uscaled_pack_rgba_float,
+ &util_format_r32_uscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32_uscaled_description = {
+ PIPE_FORMAT_R32G32_USCALED,
+ "PIPE_FORMAT_R32G32_USCALED",
+ "r32g32_uscaled",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 32}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32_uscaled_unpack_rgba_8unorm,
+ &util_format_r32g32_uscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32_uscaled_unpack_rgba_float,
+ &util_format_r32g32_uscaled_pack_rgba_float,
+ &util_format_r32g32_uscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32_uscaled_description = {
+ PIPE_FORMAT_R32G32B32_USCALED,
+ "PIPE_FORMAT_R32G32B32_USCALED",
+ "r32g32b32_uscaled",
+ {1, 1, 96}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 64}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32b32_uscaled_unpack_rgba_8unorm,
+ &util_format_r32g32b32_uscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32b32_uscaled_unpack_rgba_float,
+ &util_format_r32g32b32_uscaled_pack_rgba_float,
+ &util_format_r32g32b32_uscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32a32_uscaled_description = {
+ PIPE_FORMAT_R32G32B32A32_USCALED,
+ "PIPE_FORMAT_R32G32B32A32_USCALED",
+ "r32g32b32a32_uscaled",
+ {1, 1, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 64}, /* z = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 96} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32b32a32_uscaled_unpack_rgba_8unorm,
+ &util_format_r32g32b32a32_uscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32b32a32_uscaled_unpack_rgba_float,
+ &util_format_r32g32b32a32_uscaled_pack_rgba_float,
+ &util_format_r32g32b32a32_uscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32_snorm_description = {
+ PIPE_FORMAT_R32_SNORM,
+ "PIPE_FORMAT_R32_SNORM",
+ "r32_snorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32_snorm_unpack_rgba_8unorm,
+ &util_format_r32_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32_snorm_unpack_rgba_float,
+ &util_format_r32_snorm_pack_rgba_float,
+ &util_format_r32_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32_snorm_description = {
+ PIPE_FORMAT_R32G32_SNORM,
+ "PIPE_FORMAT_R32G32_SNORM",
+ "r32g32_snorm",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 32}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32_snorm_unpack_rgba_8unorm,
+ &util_format_r32g32_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32_snorm_unpack_rgba_float,
+ &util_format_r32g32_snorm_pack_rgba_float,
+ &util_format_r32g32_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32_snorm_description = {
+ PIPE_FORMAT_R32G32B32_SNORM,
+ "PIPE_FORMAT_R32G32B32_SNORM",
+ "r32g32b32_snorm",
+ {1, 1, 96}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 64}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32b32_snorm_unpack_rgba_8unorm,
+ &util_format_r32g32b32_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32b32_snorm_unpack_rgba_float,
+ &util_format_r32g32b32_snorm_pack_rgba_float,
+ &util_format_r32g32b32_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32a32_snorm_description = {
+ PIPE_FORMAT_R32G32B32A32_SNORM,
+ "PIPE_FORMAT_R32G32B32A32_SNORM",
+ "r32g32b32a32_snorm",
+ {1, 1, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 64}, /* z = b */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 96} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32b32a32_snorm_unpack_rgba_8unorm,
+ &util_format_r32g32b32a32_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32b32a32_snorm_unpack_rgba_float,
+ &util_format_r32g32b32a32_snorm_pack_rgba_float,
+ &util_format_r32g32b32a32_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32_sscaled_description = {
+ PIPE_FORMAT_R32_SSCALED,
+ "PIPE_FORMAT_R32_SSCALED",
+ "r32_sscaled",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32_sscaled_unpack_rgba_8unorm,
+ &util_format_r32_sscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32_sscaled_unpack_rgba_float,
+ &util_format_r32_sscaled_pack_rgba_float,
+ &util_format_r32_sscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32_sscaled_description = {
+ PIPE_FORMAT_R32G32_SSCALED,
+ "PIPE_FORMAT_R32G32_SSCALED",
+ "r32g32_sscaled",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 32}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32_sscaled_unpack_rgba_8unorm,
+ &util_format_r32g32_sscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32_sscaled_unpack_rgba_float,
+ &util_format_r32g32_sscaled_pack_rgba_float,
+ &util_format_r32g32_sscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32_sscaled_description = {
+ PIPE_FORMAT_R32G32B32_SSCALED,
+ "PIPE_FORMAT_R32G32B32_SSCALED",
+ "r32g32b32_sscaled",
+ {1, 1, 96}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 64}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32b32_sscaled_unpack_rgba_8unorm,
+ &util_format_r32g32b32_sscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32b32_sscaled_unpack_rgba_float,
+ &util_format_r32g32b32_sscaled_pack_rgba_float,
+ &util_format_r32g32b32_sscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32a32_sscaled_description = {
+ PIPE_FORMAT_R32G32B32A32_SSCALED,
+ "PIPE_FORMAT_R32G32B32A32_SSCALED",
+ "r32g32b32a32_sscaled",
+ {1, 1, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 64}, /* z = b */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 96} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32b32a32_sscaled_unpack_rgba_8unorm,
+ &util_format_r32g32b32a32_sscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32b32a32_sscaled_unpack_rgba_float,
+ &util_format_r32g32b32a32_sscaled_pack_rgba_float,
+ &util_format_r32g32b32a32_sscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16_float_description = {
+ PIPE_FORMAT_R16_FLOAT,
+ "PIPE_FORMAT_R16_FLOAT",
+ "r16_float",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16_float_unpack_rgba_8unorm,
+ &util_format_r16_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16_float_unpack_rgba_float,
+ &util_format_r16_float_pack_rgba_float,
+ &util_format_r16_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16_float_description = {
+ PIPE_FORMAT_R16G16_FLOAT,
+ "PIPE_FORMAT_R16G16_FLOAT",
+ "r16g16_float",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16_float_unpack_rgba_8unorm,
+ &util_format_r16g16_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16_float_unpack_rgba_float,
+ &util_format_r16g16_float_pack_rgba_float,
+ &util_format_r16g16_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16_float_description = {
+ PIPE_FORMAT_R16G16B16_FLOAT,
+ "PIPE_FORMAT_R16G16B16_FLOAT",
+ "r16g16b16_float",
+ {1, 1, 48}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 32}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16b16_float_unpack_rgba_8unorm,
+ &util_format_r16g16b16_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16b16_float_unpack_rgba_float,
+ &util_format_r16g16b16_float_pack_rgba_float,
+ &util_format_r16g16b16_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16a16_float_description = {
+ PIPE_FORMAT_R16G16B16A16_FLOAT,
+ "PIPE_FORMAT_R16G16B16A16_FLOAT",
+ "r16g16b16a16_float",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 32}, /* z = b */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 48} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16b16a16_float_unpack_rgba_8unorm,
+ &util_format_r16g16b16a16_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16b16a16_float_unpack_rgba_float,
+ &util_format_r16g16b16a16_float_pack_rgba_float,
+ &util_format_r16g16b16a16_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16_unorm_description = {
+ PIPE_FORMAT_R16_UNORM,
+ "PIPE_FORMAT_R16_UNORM",
+ "r16_unorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16_unorm_unpack_rgba_8unorm,
+ &util_format_r16_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16_unorm_unpack_rgba_float,
+ &util_format_r16_unorm_pack_rgba_float,
+ &util_format_r16_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16_unorm_description = {
+ PIPE_FORMAT_R16G16_UNORM,
+ "PIPE_FORMAT_R16G16_UNORM",
+ "r16g16_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16_unorm_unpack_rgba_8unorm,
+ &util_format_r16g16_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16_unorm_unpack_rgba_float,
+ &util_format_r16g16_unorm_pack_rgba_float,
+ &util_format_r16g16_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16_unorm_description = {
+ PIPE_FORMAT_R16G16B16_UNORM,
+ "PIPE_FORMAT_R16G16B16_UNORM",
+ "r16g16b16_unorm",
+ {1, 1, 48}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 32}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16b16_unorm_unpack_rgba_8unorm,
+ &util_format_r16g16b16_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16b16_unorm_unpack_rgba_float,
+ &util_format_r16g16b16_unorm_pack_rgba_float,
+ &util_format_r16g16b16_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16a16_unorm_description = {
+ PIPE_FORMAT_R16G16B16A16_UNORM,
+ "PIPE_FORMAT_R16G16B16A16_UNORM",
+ "r16g16b16a16_unorm",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 32}, /* z = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 48} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16b16a16_unorm_unpack_rgba_8unorm,
+ &util_format_r16g16b16a16_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16b16a16_unorm_unpack_rgba_float,
+ &util_format_r16g16b16a16_unorm_pack_rgba_float,
+ &util_format_r16g16b16a16_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16_uscaled_description = {
+ PIPE_FORMAT_R16_USCALED,
+ "PIPE_FORMAT_R16_USCALED",
+ "r16_uscaled",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16_uscaled_unpack_rgba_8unorm,
+ &util_format_r16_uscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16_uscaled_unpack_rgba_float,
+ &util_format_r16_uscaled_pack_rgba_float,
+ &util_format_r16_uscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16_uscaled_description = {
+ PIPE_FORMAT_R16G16_USCALED,
+ "PIPE_FORMAT_R16G16_USCALED",
+ "r16g16_uscaled",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 16}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16_uscaled_unpack_rgba_8unorm,
+ &util_format_r16g16_uscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16_uscaled_unpack_rgba_float,
+ &util_format_r16g16_uscaled_pack_rgba_float,
+ &util_format_r16g16_uscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16_uscaled_description = {
+ PIPE_FORMAT_R16G16B16_USCALED,
+ "PIPE_FORMAT_R16G16B16_USCALED",
+ "r16g16b16_uscaled",
+ {1, 1, 48}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 32}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16b16_uscaled_unpack_rgba_8unorm,
+ &util_format_r16g16b16_uscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16b16_uscaled_unpack_rgba_float,
+ &util_format_r16g16b16_uscaled_pack_rgba_float,
+ &util_format_r16g16b16_uscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16a16_uscaled_description = {
+ PIPE_FORMAT_R16G16B16A16_USCALED,
+ "PIPE_FORMAT_R16G16B16A16_USCALED",
+ "r16g16b16a16_uscaled",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 32}, /* z = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 48} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16b16a16_uscaled_unpack_rgba_8unorm,
+ &util_format_r16g16b16a16_uscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16b16a16_uscaled_unpack_rgba_float,
+ &util_format_r16g16b16a16_uscaled_pack_rgba_float,
+ &util_format_r16g16b16a16_uscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16_snorm_description = {
+ PIPE_FORMAT_R16_SNORM,
+ "PIPE_FORMAT_R16_SNORM",
+ "r16_snorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16_snorm_unpack_rgba_8unorm,
+ &util_format_r16_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16_snorm_unpack_rgba_float,
+ &util_format_r16_snorm_pack_rgba_float,
+ &util_format_r16_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16_snorm_description = {
+ PIPE_FORMAT_R16G16_SNORM,
+ "PIPE_FORMAT_R16G16_SNORM",
+ "r16g16_snorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16_snorm_unpack_rgba_8unorm,
+ &util_format_r16g16_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16_snorm_unpack_rgba_float,
+ &util_format_r16g16_snorm_pack_rgba_float,
+ &util_format_r16g16_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16_snorm_description = {
+ PIPE_FORMAT_R16G16B16_SNORM,
+ "PIPE_FORMAT_R16G16B16_SNORM",
+ "r16g16b16_snorm",
+ {1, 1, 48}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 32}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16b16_snorm_unpack_rgba_8unorm,
+ &util_format_r16g16b16_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16b16_snorm_unpack_rgba_float,
+ &util_format_r16g16b16_snorm_pack_rgba_float,
+ &util_format_r16g16b16_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16a16_snorm_description = {
+ PIPE_FORMAT_R16G16B16A16_SNORM,
+ "PIPE_FORMAT_R16G16B16A16_SNORM",
+ "r16g16b16a16_snorm",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 32}, /* z = b */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 48} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16b16a16_snorm_unpack_rgba_8unorm,
+ &util_format_r16g16b16a16_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16b16a16_snorm_unpack_rgba_float,
+ &util_format_r16g16b16a16_snorm_pack_rgba_float,
+ &util_format_r16g16b16a16_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16_sscaled_description = {
+ PIPE_FORMAT_R16_SSCALED,
+ "PIPE_FORMAT_R16_SSCALED",
+ "r16_sscaled",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16_sscaled_unpack_rgba_8unorm,
+ &util_format_r16_sscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16_sscaled_unpack_rgba_float,
+ &util_format_r16_sscaled_pack_rgba_float,
+ &util_format_r16_sscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16_sscaled_description = {
+ PIPE_FORMAT_R16G16_SSCALED,
+ "PIPE_FORMAT_R16G16_SSCALED",
+ "r16g16_sscaled",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 16}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16_sscaled_unpack_rgba_8unorm,
+ &util_format_r16g16_sscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16_sscaled_unpack_rgba_float,
+ &util_format_r16g16_sscaled_pack_rgba_float,
+ &util_format_r16g16_sscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16_sscaled_description = {
+ PIPE_FORMAT_R16G16B16_SSCALED,
+ "PIPE_FORMAT_R16G16B16_SSCALED",
+ "r16g16b16_sscaled",
+ {1, 1, 48}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 32}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16b16_sscaled_unpack_rgba_8unorm,
+ &util_format_r16g16b16_sscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16b16_sscaled_unpack_rgba_float,
+ &util_format_r16g16b16_sscaled_pack_rgba_float,
+ &util_format_r16g16b16_sscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16a16_sscaled_description = {
+ PIPE_FORMAT_R16G16B16A16_SSCALED,
+ "PIPE_FORMAT_R16G16B16A16_SSCALED",
+ "r16g16b16a16_sscaled",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 32}, /* z = b */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 48} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16b16a16_sscaled_unpack_rgba_8unorm,
+ &util_format_r16g16b16a16_sscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16b16a16_sscaled_unpack_rgba_float,
+ &util_format_r16g16b16a16_sscaled_pack_rgba_float,
+ &util_format_r16g16b16a16_sscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8_unorm_description = {
+ PIPE_FORMAT_R8_UNORM,
+ "PIPE_FORMAT_R8_UNORM",
+ "r8_unorm",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8_unorm_unpack_rgba_8unorm,
+ &util_format_r8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8_unorm_unpack_rgba_float,
+ &util_format_r8_unorm_pack_rgba_float,
+ &util_format_r8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8_unorm_description = {
+ PIPE_FORMAT_R8G8_UNORM,
+ "PIPE_FORMAT_R8G8_UNORM",
+ "r8g8_unorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8_unorm_unpack_rgba_8unorm,
+ &util_format_r8g8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8_unorm_unpack_rgba_float,
+ &util_format_r8g8_unorm_pack_rgba_float,
+ &util_format_r8g8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8_unorm_description = {
+ PIPE_FORMAT_R8G8B8_UNORM,
+ "PIPE_FORMAT_R8G8B8_UNORM",
+ "r8g8b8_unorm",
+ {1, 1, 24}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8b8_unorm_unpack_rgba_8unorm,
+ &util_format_r8g8b8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8b8_unorm_unpack_rgba_float,
+ &util_format_r8g8b8_unorm_pack_rgba_float,
+ &util_format_r8g8b8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8a8_unorm_description = {
+ PIPE_FORMAT_R8G8B8A8_UNORM,
+ "PIPE_FORMAT_R8G8B8A8_UNORM",
+ "r8g8b8a8_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8b8a8_unorm_unpack_rgba_8unorm,
+ &util_format_r8g8b8a8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8b8a8_unorm_unpack_rgba_float,
+ &util_format_r8g8b8a8_unorm_pack_rgba_float,
+ &util_format_r8g8b8a8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8_uscaled_description = {
+ PIPE_FORMAT_R8_USCALED,
+ "PIPE_FORMAT_R8_USCALED",
+ "r8_uscaled",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8_uscaled_unpack_rgba_8unorm,
+ &util_format_r8_uscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8_uscaled_unpack_rgba_float,
+ &util_format_r8_uscaled_pack_rgba_float,
+ &util_format_r8_uscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8_uscaled_description = {
+ PIPE_FORMAT_R8G8_USCALED,
+ "PIPE_FORMAT_R8G8_USCALED",
+ "r8g8_uscaled",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 8}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8_uscaled_unpack_rgba_8unorm,
+ &util_format_r8g8_uscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8_uscaled_unpack_rgba_float,
+ &util_format_r8g8_uscaled_pack_rgba_float,
+ &util_format_r8g8_uscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8_uscaled_description = {
+ PIPE_FORMAT_R8G8B8_USCALED,
+ "PIPE_FORMAT_R8G8B8_USCALED",
+ "r8g8b8_uscaled",
+ {1, 1, 24}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 16}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8b8_uscaled_unpack_rgba_8unorm,
+ &util_format_r8g8b8_uscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8b8_uscaled_unpack_rgba_float,
+ &util_format_r8g8b8_uscaled_pack_rgba_float,
+ &util_format_r8g8b8_uscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8a8_uscaled_description = {
+ PIPE_FORMAT_R8G8B8A8_USCALED,
+ "PIPE_FORMAT_R8G8B8A8_USCALED",
+ "r8g8b8a8_uscaled",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 16}, /* z = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 24} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8b8a8_uscaled_unpack_rgba_8unorm,
+ &util_format_r8g8b8a8_uscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8b8a8_uscaled_unpack_rgba_float,
+ &util_format_r8g8b8a8_uscaled_pack_rgba_float,
+ &util_format_r8g8b8a8_uscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8_snorm_description = {
+ PIPE_FORMAT_R8_SNORM,
+ "PIPE_FORMAT_R8_SNORM",
+ "r8_snorm",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8_snorm_unpack_rgba_8unorm,
+ &util_format_r8_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8_snorm_unpack_rgba_float,
+ &util_format_r8_snorm_pack_rgba_float,
+ &util_format_r8_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8_snorm_description = {
+ PIPE_FORMAT_R8G8_SNORM,
+ "PIPE_FORMAT_R8G8_SNORM",
+ "r8g8_snorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8_snorm_unpack_rgba_8unorm,
+ &util_format_r8g8_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8_snorm_unpack_rgba_float,
+ &util_format_r8g8_snorm_pack_rgba_float,
+ &util_format_r8g8_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8_snorm_description = {
+ PIPE_FORMAT_R8G8B8_SNORM,
+ "PIPE_FORMAT_R8G8B8_SNORM",
+ "r8g8b8_snorm",
+ {1, 1, 24}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 16}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8b8_snorm_unpack_rgba_8unorm,
+ &util_format_r8g8b8_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8b8_snorm_unpack_rgba_float,
+ &util_format_r8g8b8_snorm_pack_rgba_float,
+ &util_format_r8g8b8_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8a8_snorm_description = {
+ PIPE_FORMAT_R8G8B8A8_SNORM,
+ "PIPE_FORMAT_R8G8B8A8_SNORM",
+ "r8g8b8a8_snorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 16}, /* z = b */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 24} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8b8a8_snorm_unpack_rgba_8unorm,
+ &util_format_r8g8b8a8_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8b8a8_snorm_unpack_rgba_float,
+ &util_format_r8g8b8a8_snorm_pack_rgba_float,
+ &util_format_r8g8b8a8_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8_sscaled_description = {
+ PIPE_FORMAT_R8_SSCALED,
+ "PIPE_FORMAT_R8_SSCALED",
+ "r8_sscaled",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8_sscaled_unpack_rgba_8unorm,
+ &util_format_r8_sscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8_sscaled_unpack_rgba_float,
+ &util_format_r8_sscaled_pack_rgba_float,
+ &util_format_r8_sscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8_sscaled_description = {
+ PIPE_FORMAT_R8G8_SSCALED,
+ "PIPE_FORMAT_R8G8_SSCALED",
+ "r8g8_sscaled",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 8}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8_sscaled_unpack_rgba_8unorm,
+ &util_format_r8g8_sscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8_sscaled_unpack_rgba_float,
+ &util_format_r8g8_sscaled_pack_rgba_float,
+ &util_format_r8g8_sscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8_sscaled_description = {
+ PIPE_FORMAT_R8G8B8_SSCALED,
+ "PIPE_FORMAT_R8G8B8_SSCALED",
+ "r8g8b8_sscaled",
+ {1, 1, 24}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 16}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8b8_sscaled_unpack_rgba_8unorm,
+ &util_format_r8g8b8_sscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8b8_sscaled_unpack_rgba_float,
+ &util_format_r8g8b8_sscaled_pack_rgba_float,
+ &util_format_r8g8b8_sscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8a8_sscaled_description = {
+ PIPE_FORMAT_R8G8B8A8_SSCALED,
+ "PIPE_FORMAT_R8G8B8A8_SSCALED",
+ "r8g8b8a8_sscaled",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 16}, /* z = b */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 24} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8b8a8_sscaled_unpack_rgba_8unorm,
+ &util_format_r8g8b8a8_sscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8b8a8_sscaled_unpack_rgba_float,
+ &util_format_r8g8b8a8_sscaled_pack_rgba_float,
+ &util_format_r8g8b8a8_sscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32_fixed_description = {
+ PIPE_FORMAT_R32_FIXED,
+ "PIPE_FORMAT_R32_FIXED",
+ "r32_fixed",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32_fixed_unpack_rgba_8unorm,
+ &util_format_r32_fixed_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32_fixed_unpack_rgba_float,
+ &util_format_r32_fixed_pack_rgba_float,
+ &util_format_r32_fixed_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32_fixed_description = {
+ PIPE_FORMAT_R32G32_FIXED,
+ "PIPE_FORMAT_R32G32_FIXED",
+ "r32g32_fixed",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 32}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32_fixed_unpack_rgba_8unorm,
+ &util_format_r32g32_fixed_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32_fixed_unpack_rgba_float,
+ &util_format_r32g32_fixed_pack_rgba_float,
+ &util_format_r32g32_fixed_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32_fixed_description = {
+ PIPE_FORMAT_R32G32B32_FIXED,
+ "PIPE_FORMAT_R32G32B32_FIXED",
+ "r32g32b32_fixed",
+ {1, 1, 96}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 64}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32b32_fixed_unpack_rgba_8unorm,
+ &util_format_r32g32b32_fixed_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32b32_fixed_unpack_rgba_float,
+ &util_format_r32g32b32_fixed_pack_rgba_float,
+ &util_format_r32g32b32_fixed_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32a32_fixed_description = {
+ PIPE_FORMAT_R32G32B32A32_FIXED,
+ "PIPE_FORMAT_R32G32B32A32_FIXED",
+ "r32g32b32a32_fixed",
+ {1, 1, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 64}, /* z = b */
+ {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 96} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32b32a32_fixed_unpack_rgba_8unorm,
+ &util_format_r32g32b32a32_fixed_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32b32a32_fixed_unpack_rgba_float,
+ &util_format_r32g32b32a32_fixed_pack_rgba_float,
+ &util_format_r32g32b32a32_fixed_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r10g10b10x2_uscaled_description = {
+ PIPE_FORMAT_R10G10B10X2_USCALED,
+ "PIPE_FORMAT_R10G10B10X2_USCALED",
+ "r10g10b10x2_uscaled",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 10}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 20}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 2, 30} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r10g10b10x2_uscaled_unpack_rgba_8unorm,
+ &util_format_r10g10b10x2_uscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r10g10b10x2_uscaled_unpack_rgba_float,
+ &util_format_r10g10b10x2_uscaled_pack_rgba_float,
+ &util_format_r10g10b10x2_uscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r10g10b10x2_snorm_description = {
+ PIPE_FORMAT_R10G10B10X2_SNORM,
+ "PIPE_FORMAT_R10G10B10X2_SNORM",
+ "r10g10b10x2_snorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 10}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 20}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 2, 30} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r10g10b10x2_snorm_unpack_rgba_8unorm,
+ &util_format_r10g10b10x2_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r10g10b10x2_snorm_unpack_rgba_float,
+ &util_format_r10g10b10x2_snorm_pack_rgba_float,
+ &util_format_r10g10b10x2_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_yv12_description = {
+ PIPE_FORMAT_YV12,
+ "PIPE_FORMAT_YV12",
+ "yv12",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_OTHER,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 8}, /* y = y */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 16}, /* z = z */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = w */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* y */
+ UTIL_FORMAT_SWIZZLE_Y, /* u */
+ UTIL_FORMAT_SWIZZLE_Z, /* v */
+ UTIL_FORMAT_SWIZZLE_W /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_YUV,
+ &util_format_yv12_unpack_rgba_8unorm,
+ &util_format_yv12_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_yv12_unpack_rgba_float,
+ &util_format_yv12_pack_rgba_float,
+ &util_format_yv12_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_yv16_description = {
+ PIPE_FORMAT_YV16,
+ "PIPE_FORMAT_YV16",
+ "yv16",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_OTHER,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 8}, /* y = y */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 16}, /* z = z */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = w */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* y */
+ UTIL_FORMAT_SWIZZLE_Y, /* u */
+ UTIL_FORMAT_SWIZZLE_Z, /* v */
+ UTIL_FORMAT_SWIZZLE_W /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_YUV,
+ &util_format_yv16_unpack_rgba_8unorm,
+ &util_format_yv16_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_yv16_unpack_rgba_float,
+ &util_format_yv16_pack_rgba_float,
+ &util_format_yv16_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_iyuv_description = {
+ PIPE_FORMAT_IYUV,
+ "PIPE_FORMAT_IYUV",
+ "iyuv",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_OTHER,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 8}, /* y = y */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 16}, /* z = z */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = w */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* y */
+ UTIL_FORMAT_SWIZZLE_Y, /* u */
+ UTIL_FORMAT_SWIZZLE_Z, /* v */
+ UTIL_FORMAT_SWIZZLE_W /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_YUV,
+ &util_format_iyuv_unpack_rgba_8unorm,
+ &util_format_iyuv_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_iyuv_unpack_rgba_float,
+ &util_format_iyuv_pack_rgba_float,
+ &util_format_iyuv_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_nv12_description = {
+ PIPE_FORMAT_NV12,
+ "PIPE_FORMAT_NV12",
+ "nv12",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_OTHER,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 8}, /* y = y */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 16}, /* z = z */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = w */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* y */
+ UTIL_FORMAT_SWIZZLE_Y, /* u */
+ UTIL_FORMAT_SWIZZLE_Z, /* v */
+ UTIL_FORMAT_SWIZZLE_W /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_YUV,
+ &util_format_nv12_unpack_rgba_8unorm,
+ &util_format_nv12_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_nv12_unpack_rgba_float,
+ &util_format_nv12_pack_rgba_float,
+ &util_format_nv12_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_nv21_description = {
+ PIPE_FORMAT_NV21,
+ "PIPE_FORMAT_NV21",
+ "nv21",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_OTHER,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 8}, /* y = y */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 16}, /* z = z */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = w */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* y */
+ UTIL_FORMAT_SWIZZLE_Y, /* u */
+ UTIL_FORMAT_SWIZZLE_Z, /* v */
+ UTIL_FORMAT_SWIZZLE_W /* ignored */
+ },
+ UTIL_FORMAT_COLORSPACE_YUV,
+ &util_format_nv21_unpack_rgba_8unorm,
+ &util_format_nv21_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_nv21_unpack_rgba_float,
+ &util_format_nv21_pack_rgba_float,
+ &util_format_nv21_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r4a4_unorm_description = {
+ PIPE_FORMAT_R4A4_UNORM,
+ "PIPE_FORMAT_R4A4_UNORM",
+ "r4a4_unorm",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0}, /* x = a */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* y = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Y, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r4a4_unorm_unpack_rgba_8unorm,
+ &util_format_r4a4_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r4a4_unorm_unpack_rgba_float,
+ &util_format_r4a4_unorm_pack_rgba_float,
+ &util_format_r4a4_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a4r4_unorm_description = {
+ PIPE_FORMAT_A4R4_UNORM,
+ "PIPE_FORMAT_A4R4_UNORM",
+ "a4r4_unorm",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_a4r4_unorm_unpack_rgba_8unorm,
+ &util_format_a4r4_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_a4r4_unorm_unpack_rgba_float,
+ &util_format_a4r4_unorm_pack_rgba_float,
+ &util_format_a4r4_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8a8_unorm_description = {
+ PIPE_FORMAT_R8A8_UNORM,
+ "PIPE_FORMAT_R8A8_UNORM",
+ "r8a8_unorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8a8_unorm_unpack_rgba_8unorm,
+ &util_format_r8a8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8a8_unorm_unpack_rgba_float,
+ &util_format_r8a8_unorm_pack_rgba_float,
+ &util_format_r8a8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a8r8_unorm_description = {
+ PIPE_FORMAT_A8R8_UNORM,
+ "PIPE_FORMAT_A8R8_UNORM",
+ "a8r8_unorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = a */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Y, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_a8r8_unorm_unpack_rgba_8unorm,
+ &util_format_a8r8_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_a8r8_unorm_unpack_rgba_float,
+ &util_format_a8r8_unorm_pack_rgba_float,
+ &util_format_a8r8_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r10g10b10a2_uscaled_description = {
+ PIPE_FORMAT_R10G10B10A2_USCALED,
+ "PIPE_FORMAT_R10G10B10A2_USCALED",
+ "r10g10b10a2_uscaled",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 10}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 20}, /* z = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 2, 30} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r10g10b10a2_uscaled_unpack_rgba_8unorm,
+ &util_format_r10g10b10a2_uscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r10g10b10a2_uscaled_unpack_rgba_float,
+ &util_format_r10g10b10a2_uscaled_pack_rgba_float,
+ &util_format_r10g10b10a2_uscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r10g10b10a2_sscaled_description = {
+ PIPE_FORMAT_R10G10B10A2_SSCALED,
+ "PIPE_FORMAT_R10G10B10A2_SSCALED",
+ "r10g10b10a2_sscaled",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 10}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 20}, /* z = b */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 2, 30} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r10g10b10a2_sscaled_unpack_rgba_8unorm,
+ &util_format_r10g10b10a2_sscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r10g10b10a2_sscaled_unpack_rgba_float,
+ &util_format_r10g10b10a2_sscaled_pack_rgba_float,
+ &util_format_r10g10b10a2_sscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r10g10b10a2_snorm_description = {
+ PIPE_FORMAT_R10G10B10A2_SNORM,
+ "PIPE_FORMAT_R10G10B10A2_SNORM",
+ "r10g10b10a2_snorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 10}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 20}, /* z = b */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 2, 30} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r10g10b10a2_snorm_unpack_rgba_8unorm,
+ &util_format_r10g10b10a2_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r10g10b10a2_snorm_unpack_rgba_float,
+ &util_format_r10g10b10a2_snorm_pack_rgba_float,
+ &util_format_r10g10b10a2_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b10g10r10a2_uscaled_description = {
+ PIPE_FORMAT_B10G10R10A2_USCALED,
+ "PIPE_FORMAT_B10G10R10A2_USCALED",
+ "b10g10r10a2_uscaled",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 10}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 20}, /* z = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 2, 30} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_b10g10r10a2_uscaled_unpack_rgba_8unorm,
+ &util_format_b10g10r10a2_uscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_b10g10r10a2_uscaled_unpack_rgba_float,
+ &util_format_b10g10r10a2_uscaled_pack_rgba_float,
+ &util_format_b10g10r10a2_uscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b10g10r10a2_sscaled_description = {
+ PIPE_FORMAT_B10G10R10A2_SSCALED,
+ "PIPE_FORMAT_B10G10R10A2_SSCALED",
+ "b10g10r10a2_sscaled",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 10}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 20}, /* z = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 2, 30} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_b10g10r10a2_sscaled_unpack_rgba_8unorm,
+ &util_format_b10g10r10a2_sscaled_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_b10g10r10a2_sscaled_unpack_rgba_float,
+ &util_format_b10g10r10a2_sscaled_pack_rgba_float,
+ &util_format_b10g10r10a2_sscaled_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b10g10r10a2_snorm_description = {
+ PIPE_FORMAT_B10G10R10A2_SNORM,
+ "PIPE_FORMAT_B10G10R10A2_SNORM",
+ "b10g10r10a2_snorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 10}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 20}, /* z = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 2, 30} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_b10g10r10a2_snorm_unpack_rgba_8unorm,
+ &util_format_b10g10r10a2_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_b10g10r10a2_snorm_unpack_rgba_float,
+ &util_format_b10g10r10a2_snorm_pack_rgba_float,
+ &util_format_b10g10r10a2_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8_uint_description = {
+ PIPE_FORMAT_R8_UINT,
+ "PIPE_FORMAT_R8_UINT",
+ "r8_uint",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r8_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r8_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r8_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r8_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r8_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8_uint_description = {
+ PIPE_FORMAT_R8G8_UINT,
+ "PIPE_FORMAT_R8G8_UINT",
+ "r8g8_uint",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r8g8_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r8g8_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r8g8_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r8g8_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r8g8_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8_uint_description = {
+ PIPE_FORMAT_R8G8B8_UINT,
+ "PIPE_FORMAT_R8G8B8_UINT",
+ "r8g8b8_uint",
+ {1, 1, 24}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 16}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r8g8b8_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r8g8b8_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r8g8b8_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r8g8b8_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r8g8b8_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8a8_uint_description = {
+ PIPE_FORMAT_R8G8B8A8_UINT,
+ "PIPE_FORMAT_R8G8B8A8_UINT",
+ "r8g8b8a8_uint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 16}, /* z = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 24} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r8g8b8a8_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r8g8b8a8_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r8g8b8a8_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r8g8b8a8_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r8g8b8a8_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8_sint_description = {
+ PIPE_FORMAT_R8_SINT,
+ "PIPE_FORMAT_R8_SINT",
+ "r8_sint",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r8_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r8_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r8_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r8_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r8_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8_sint_description = {
+ PIPE_FORMAT_R8G8_SINT,
+ "PIPE_FORMAT_R8G8_SINT",
+ "r8g8_sint",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r8g8_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r8g8_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r8g8_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r8g8_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r8g8_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8_sint_description = {
+ PIPE_FORMAT_R8G8B8_SINT,
+ "PIPE_FORMAT_R8G8B8_SINT",
+ "r8g8b8_sint",
+ {1, 1, 24}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 16}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r8g8b8_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r8g8b8_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r8g8b8_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r8g8b8_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r8g8b8_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8a8_sint_description = {
+ PIPE_FORMAT_R8G8B8A8_SINT,
+ "PIPE_FORMAT_R8G8B8A8_SINT",
+ "r8g8b8a8_sint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 16}, /* z = b */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 24} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r8g8b8a8_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r8g8b8a8_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r8g8b8a8_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r8g8b8a8_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r8g8b8a8_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16_uint_description = {
+ PIPE_FORMAT_R16_UINT,
+ "PIPE_FORMAT_R16_UINT",
+ "r16_uint",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r16_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r16_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r16_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r16_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r16_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16_uint_description = {
+ PIPE_FORMAT_R16G16_UINT,
+ "PIPE_FORMAT_R16G16_UINT",
+ "r16g16_uint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r16g16_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r16g16_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r16g16_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r16g16_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r16g16_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16_uint_description = {
+ PIPE_FORMAT_R16G16B16_UINT,
+ "PIPE_FORMAT_R16G16B16_UINT",
+ "r16g16b16_uint",
+ {1, 1, 48}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 32}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r16g16b16_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r16g16b16_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r16g16b16_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r16g16b16_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r16g16b16_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16a16_uint_description = {
+ PIPE_FORMAT_R16G16B16A16_UINT,
+ "PIPE_FORMAT_R16G16B16A16_UINT",
+ "r16g16b16a16_uint",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 32}, /* z = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 48} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r16g16b16a16_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r16g16b16a16_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r16g16b16a16_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r16g16b16a16_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r16g16b16a16_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16_sint_description = {
+ PIPE_FORMAT_R16_SINT,
+ "PIPE_FORMAT_R16_SINT",
+ "r16_sint",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r16_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r16_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r16_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r16_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r16_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16_sint_description = {
+ PIPE_FORMAT_R16G16_SINT,
+ "PIPE_FORMAT_R16G16_SINT",
+ "r16g16_sint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r16g16_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r16g16_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r16g16_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r16g16_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r16g16_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16_sint_description = {
+ PIPE_FORMAT_R16G16B16_SINT,
+ "PIPE_FORMAT_R16G16B16_SINT",
+ "r16g16b16_sint",
+ {1, 1, 48}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 32}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r16g16b16_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r16g16b16_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r16g16b16_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r16g16b16_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r16g16b16_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16a16_sint_description = {
+ PIPE_FORMAT_R16G16B16A16_SINT,
+ "PIPE_FORMAT_R16G16B16A16_SINT",
+ "r16g16b16a16_sint",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 32}, /* z = b */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 48} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r16g16b16a16_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r16g16b16a16_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r16g16b16a16_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r16g16b16a16_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r16g16b16a16_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32_uint_description = {
+ PIPE_FORMAT_R32_UINT,
+ "PIPE_FORMAT_R32_UINT",
+ "r32_uint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r32_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r32_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r32_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r32_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r32_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32_uint_description = {
+ PIPE_FORMAT_R32G32_UINT,
+ "PIPE_FORMAT_R32G32_UINT",
+ "r32g32_uint",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r32g32_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r32g32_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r32g32_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r32g32_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r32g32_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32_uint_description = {
+ PIPE_FORMAT_R32G32B32_UINT,
+ "PIPE_FORMAT_R32G32B32_UINT",
+ "r32g32b32_uint",
+ {1, 1, 96}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 64}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r32g32b32_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r32g32b32_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r32g32b32_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r32g32b32_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r32g32b32_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32a32_uint_description = {
+ PIPE_FORMAT_R32G32B32A32_UINT,
+ "PIPE_FORMAT_R32G32B32A32_UINT",
+ "r32g32b32a32_uint",
+ {1, 1, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 64}, /* z = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 96} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r32g32b32a32_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r32g32b32a32_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r32g32b32a32_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r32g32b32a32_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r32g32b32a32_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32_sint_description = {
+ PIPE_FORMAT_R32_SINT,
+ "PIPE_FORMAT_R32_SINT",
+ "r32_sint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = r */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r32_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r32_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r32_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r32_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r32_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32_sint_description = {
+ PIPE_FORMAT_R32G32_SINT,
+ "PIPE_FORMAT_R32G32_SINT",
+ "r32g32_sint",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* y = g */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r32g32_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r32g32_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r32g32_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r32g32_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r32g32_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32_sint_description = {
+ PIPE_FORMAT_R32G32B32_SINT,
+ "PIPE_FORMAT_R32G32B32_SINT",
+ "r32g32b32_sint",
+ {1, 1, 96}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 3, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 64}, /* z = b */
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r32g32b32_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r32g32b32_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r32g32b32_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r32g32b32_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r32g32b32_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32a32_sint_description = {
+ PIPE_FORMAT_R32G32B32A32_SINT,
+ "PIPE_FORMAT_R32G32B32A32_SINT",
+ "r32g32b32a32_sint",
+ {1, 1, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 64}, /* z = b */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 96} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r32g32b32a32_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r32g32b32a32_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r32g32b32a32_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r32g32b32a32_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r32g32b32a32_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a8_uint_description = {
+ PIPE_FORMAT_A8_UINT,
+ "PIPE_FORMAT_A8_UINT",
+ "a8_uint",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_0, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_a8_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_a8_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_a8_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_a8_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_a8_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_i8_uint_description = {
+ PIPE_FORMAT_I8_UINT,
+ "PIPE_FORMAT_I8_UINT",
+ "i8_uint",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = rgba */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_i8_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_i8_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_i8_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_i8_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_i8_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l8_uint_description = {
+ PIPE_FORMAT_L8_UINT,
+ "PIPE_FORMAT_L8_UINT",
+ "l8_uint",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = rgb */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_l8_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_l8_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_l8_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_l8_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_l8_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l8a8_uint_description = {
+ PIPE_FORMAT_L8A8_UINT,
+ "PIPE_FORMAT_L8A8_UINT",
+ "l8a8_uint",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = rgb */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_l8a8_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_l8a8_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_l8a8_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_l8a8_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_l8a8_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a8_sint_description = {
+ PIPE_FORMAT_A8_SINT,
+ "PIPE_FORMAT_A8_SINT",
+ "a8_sint",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_0, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_a8_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_a8_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_a8_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_a8_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_a8_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_i8_sint_description = {
+ PIPE_FORMAT_I8_SINT,
+ "PIPE_FORMAT_I8_SINT",
+ "i8_sint",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = rgba */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_i8_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_i8_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_i8_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_i8_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_i8_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l8_sint_description = {
+ PIPE_FORMAT_L8_SINT,
+ "PIPE_FORMAT_L8_SINT",
+ "l8_sint",
+ {1, 1, 8}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = rgb */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_l8_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_l8_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_l8_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_l8_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_l8_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l8a8_sint_description = {
+ PIPE_FORMAT_L8A8_SINT,
+ "PIPE_FORMAT_L8A8_SINT",
+ "l8a8_sint",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = rgb */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_l8a8_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_l8a8_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_l8a8_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_l8a8_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_l8a8_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a16_uint_description = {
+ PIPE_FORMAT_A16_UINT,
+ "PIPE_FORMAT_A16_UINT",
+ "a16_uint",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_0, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_a16_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_a16_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_a16_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_a16_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_a16_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_i16_uint_description = {
+ PIPE_FORMAT_I16_UINT,
+ "PIPE_FORMAT_I16_UINT",
+ "i16_uint",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = rgba */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_i16_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_i16_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_i16_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_i16_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_i16_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l16_uint_description = {
+ PIPE_FORMAT_L16_UINT,
+ "PIPE_FORMAT_L16_UINT",
+ "l16_uint",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = rgb */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_l16_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_l16_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_l16_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_l16_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_l16_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l16a16_uint_description = {
+ PIPE_FORMAT_L16A16_UINT,
+ "PIPE_FORMAT_L16A16_UINT",
+ "l16a16_uint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = rgb */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_l16a16_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_l16a16_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_l16a16_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_l16a16_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_l16a16_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a16_sint_description = {
+ PIPE_FORMAT_A16_SINT,
+ "PIPE_FORMAT_A16_SINT",
+ "a16_sint",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_0, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_a16_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_a16_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_a16_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_a16_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_a16_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_i16_sint_description = {
+ PIPE_FORMAT_I16_SINT,
+ "PIPE_FORMAT_I16_SINT",
+ "i16_sint",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = rgba */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_i16_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_i16_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_i16_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_i16_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_i16_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l16_sint_description = {
+ PIPE_FORMAT_L16_SINT,
+ "PIPE_FORMAT_L16_SINT",
+ "l16_sint",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = rgb */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_l16_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_l16_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_l16_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_l16_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_l16_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l16a16_sint_description = {
+ PIPE_FORMAT_L16A16_SINT,
+ "PIPE_FORMAT_L16A16_SINT",
+ "l16a16_sint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = rgb */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_l16a16_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_l16a16_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_l16a16_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_l16a16_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_l16a16_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a32_uint_description = {
+ PIPE_FORMAT_A32_UINT,
+ "PIPE_FORMAT_A32_UINT",
+ "a32_uint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_0, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_a32_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_a32_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_a32_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_a32_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_a32_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_i32_uint_description = {
+ PIPE_FORMAT_I32_UINT,
+ "PIPE_FORMAT_I32_UINT",
+ "i32_uint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = rgba */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_i32_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_i32_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_i32_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_i32_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_i32_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l32_uint_description = {
+ PIPE_FORMAT_L32_UINT,
+ "PIPE_FORMAT_L32_UINT",
+ "l32_uint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = rgb */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_l32_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_l32_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_l32_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_l32_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_l32_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l32a32_uint_description = {
+ PIPE_FORMAT_L32A32_UINT,
+ "PIPE_FORMAT_L32A32_UINT",
+ "l32a32_uint",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = rgb */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_l32a32_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_l32a32_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_l32a32_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_l32a32_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_l32a32_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_a32_sint_description = {
+ PIPE_FORMAT_A32_SINT,
+ "PIPE_FORMAT_A32_SINT",
+ "a32_sint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_0, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_a32_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_a32_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_a32_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_a32_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_a32_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_i32_sint_description = {
+ PIPE_FORMAT_I32_SINT,
+ "PIPE_FORMAT_I32_SINT",
+ "i32_sint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = rgba */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_X /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_i32_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_i32_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_i32_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_i32_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_i32_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l32_sint_description = {
+ PIPE_FORMAT_L32_SINT,
+ "PIPE_FORMAT_L32_SINT",
+ "l32_sint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 1, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = rgb */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_l32_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_l32_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_l32_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_l32_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_l32_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_l32a32_sint_description = {
+ PIPE_FORMAT_L32A32_SINT,
+ "PIPE_FORMAT_L32A32_SINT",
+ "l32a32_sint",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = rgb */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_X, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_l32a32_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_l32a32_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_l32a32_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_l32a32_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_l32a32_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b10g10r10a2_uint_description = {
+ PIPE_FORMAT_B10G10R10A2_UINT,
+ "PIPE_FORMAT_B10G10R10A2_UINT",
+ "b10g10r10a2_uint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 10}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 20}, /* z = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 2, 30} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_b10g10r10a2_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_b10g10r10a2_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_b10g10r10a2_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_b10g10r10a2_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_b10g10r10a2_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8x8_snorm_description = {
+ PIPE_FORMAT_R8G8B8X8_SNORM,
+ "PIPE_FORMAT_R8G8B8X8_SNORM",
+ "r8g8b8x8_snorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 16}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8g8b8x8_snorm_unpack_rgba_8unorm,
+ &util_format_r8g8b8x8_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8b8x8_snorm_unpack_rgba_float,
+ &util_format_r8g8b8x8_snorm_pack_rgba_float,
+ &util_format_r8g8b8x8_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8x8_srgb_description = {
+ PIPE_FORMAT_R8G8B8X8_SRGB,
+ "PIPE_FORMAT_R8G8B8X8_SRGB",
+ "r8g8b8x8_srgb",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* sr */
+ UTIL_FORMAT_SWIZZLE_Y, /* sg */
+ UTIL_FORMAT_SWIZZLE_Z, /* sb */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_SRGB,
+ &util_format_r8g8b8x8_srgb_unpack_rgba_8unorm,
+ &util_format_r8g8b8x8_srgb_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8g8b8x8_srgb_unpack_rgba_float,
+ &util_format_r8g8b8x8_srgb_pack_rgba_float,
+ &util_format_r8g8b8x8_srgb_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8x8_uint_description = {
+ PIPE_FORMAT_R8G8B8X8_UINT,
+ "PIPE_FORMAT_R8G8B8X8_UINT",
+ "r8g8b8x8_uint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 16}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r8g8b8x8_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r8g8b8x8_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r8g8b8x8_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r8g8b8x8_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r8g8b8x8_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8g8b8x8_sint_description = {
+ PIPE_FORMAT_R8G8B8X8_SINT,
+ "PIPE_FORMAT_R8G8B8X8_SINT",
+ "r8g8b8x8_sint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 16}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r8g8b8x8_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r8g8b8x8_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r8g8b8x8_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r8g8b8x8_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r8g8b8x8_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_b10g10r10x2_unorm_description = {
+ PIPE_FORMAT_B10G10R10X2_UNORM,
+ "PIPE_FORMAT_B10G10R10X2_UNORM",
+ "b10g10r10x2_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 0}, /* x = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 10}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 20}, /* z = r */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 2, 30} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_Z, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_X, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_b10g10r10x2_unorm_unpack_rgba_8unorm,
+ &util_format_b10g10r10x2_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_b10g10r10x2_unorm_unpack_rgba_float,
+ &util_format_b10g10r10x2_unorm_pack_rgba_float,
+ &util_format_b10g10r10x2_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16x16_unorm_description = {
+ PIPE_FORMAT_R16G16B16X16_UNORM,
+ "PIPE_FORMAT_R16G16B16X16_UNORM",
+ "r16g16b16x16_unorm",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 32}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 16, 48} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16b16x16_unorm_unpack_rgba_8unorm,
+ &util_format_r16g16b16x16_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16b16x16_unorm_unpack_rgba_float,
+ &util_format_r16g16b16x16_unorm_pack_rgba_float,
+ &util_format_r16g16b16x16_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16x16_snorm_description = {
+ PIPE_FORMAT_R16G16B16X16_SNORM,
+ "PIPE_FORMAT_R16G16B16X16_SNORM",
+ "r16g16b16x16_snorm",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 32}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 16, 48} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16b16x16_snorm_unpack_rgba_8unorm,
+ &util_format_r16g16b16x16_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16b16x16_snorm_unpack_rgba_float,
+ &util_format_r16g16b16x16_snorm_pack_rgba_float,
+ &util_format_r16g16b16x16_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16x16_float_description = {
+ PIPE_FORMAT_R16G16B16X16_FLOAT,
+ "PIPE_FORMAT_R16G16B16X16_FLOAT",
+ "r16g16b16x16_float",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 32}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 16, 48} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16g16b16x16_float_unpack_rgba_8unorm,
+ &util_format_r16g16b16x16_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16g16b16x16_float_unpack_rgba_float,
+ &util_format_r16g16b16x16_float_pack_rgba_float,
+ &util_format_r16g16b16x16_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16x16_uint_description = {
+ PIPE_FORMAT_R16G16B16X16_UINT,
+ "PIPE_FORMAT_R16G16B16X16_UINT",
+ "r16g16b16x16_uint",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 32}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 16, 48} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r16g16b16x16_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r16g16b16x16_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r16g16b16x16_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r16g16b16x16_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r16g16b16x16_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16g16b16x16_sint_description = {
+ PIPE_FORMAT_R16G16B16X16_SINT,
+ "PIPE_FORMAT_R16G16B16X16_SINT",
+ "r16g16b16x16_sint",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 32}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 16, 48} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r16g16b16x16_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r16g16b16x16_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r16g16b16x16_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r16g16b16x16_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r16g16b16x16_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32x32_float_description = {
+ PIPE_FORMAT_R32G32B32X32_FLOAT,
+ "PIPE_FORMAT_R32G32B32X32_FLOAT",
+ "r32g32b32x32_float",
+ {1, 1, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 64}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 96} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32g32b32x32_float_unpack_rgba_8unorm,
+ &util_format_r32g32b32x32_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32g32b32x32_float_unpack_rgba_float,
+ &util_format_r32g32b32x32_float_pack_rgba_float,
+ &util_format_r32g32b32x32_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32x32_uint_description = {
+ PIPE_FORMAT_R32G32B32X32_UINT,
+ "PIPE_FORMAT_R32G32B32X32_UINT",
+ "r32g32b32x32_uint",
+ {1, 1, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 64}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 96} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r32g32b32x32_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r32g32b32x32_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r32g32b32x32_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r32g32b32x32_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r32g32b32x32_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32g32b32x32_sint_description = {
+ PIPE_FORMAT_R32G32B32X32_SINT,
+ "PIPE_FORMAT_R32G32B32X32_SINT",
+ "r32g32b32x32_sint",
+ {1, 1, 128}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* y = g */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 64}, /* z = b */
+ {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 96} /* w = x */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_1 /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r32g32b32x32_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r32g32b32x32_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r32g32b32x32_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r32g32b32x32_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r32g32b32x32_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8a8_snorm_description = {
+ PIPE_FORMAT_R8A8_SNORM,
+ "PIPE_FORMAT_R8A8_SNORM",
+ "r8a8_snorm",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r8a8_snorm_unpack_rgba_8unorm,
+ &util_format_r8a8_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r8a8_snorm_unpack_rgba_float,
+ &util_format_r8a8_snorm_pack_rgba_float,
+ &util_format_r8a8_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16a16_unorm_description = {
+ PIPE_FORMAT_R16A16_UNORM,
+ "PIPE_FORMAT_R16A16_UNORM",
+ "r16a16_unorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16a16_unorm_unpack_rgba_8unorm,
+ &util_format_r16a16_unorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16a16_unorm_unpack_rgba_float,
+ &util_format_r16a16_unorm_pack_rgba_float,
+ &util_format_r16a16_unorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16a16_snorm_description = {
+ PIPE_FORMAT_R16A16_SNORM,
+ "PIPE_FORMAT_R16A16_SNORM",
+ "r16a16_snorm",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16a16_snorm_unpack_rgba_8unorm,
+ &util_format_r16a16_snorm_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16a16_snorm_unpack_rgba_float,
+ &util_format_r16a16_snorm_pack_rgba_float,
+ &util_format_r16a16_snorm_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16a16_float_description = {
+ PIPE_FORMAT_R16A16_FLOAT,
+ "PIPE_FORMAT_R16A16_FLOAT",
+ "r16a16_float",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r16a16_float_unpack_rgba_8unorm,
+ &util_format_r16a16_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r16a16_float_unpack_rgba_float,
+ &util_format_r16a16_float_pack_rgba_float,
+ &util_format_r16a16_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32a32_float_description = {
+ PIPE_FORMAT_R32A32_FLOAT,
+ "PIPE_FORMAT_R32A32_FLOAT",
+ "r32a32_float",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ &util_format_r32a32_float_unpack_rgba_8unorm,
+ &util_format_r32a32_float_pack_rgba_8unorm,
+ NULL, /* fetch_rgba_8unorm */
+ &util_format_r32a32_float_unpack_rgba_float,
+ &util_format_r32a32_float_pack_rgba_float,
+ &util_format_r32a32_float_fetch_rgba_float,
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ NULL, /* unpack_rgba_uint */
+ NULL, /* pack_rgba_uint */
+ NULL, /* unpack_rgba_sint */
+ NULL, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8a8_uint_description = {
+ PIPE_FORMAT_R8A8_UINT,
+ "PIPE_FORMAT_R8A8_UINT",
+ "r8a8_uint",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r8a8_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r8a8_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r8a8_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r8a8_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r8a8_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r8a8_sint_description = {
+ PIPE_FORMAT_R8A8_SINT,
+ "PIPE_FORMAT_R8A8_SINT",
+ "r8a8_sint",
+ {1, 1, 16}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r8a8_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r8a8_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r8a8_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r8a8_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r8a8_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16a16_uint_description = {
+ PIPE_FORMAT_R16A16_UINT,
+ "PIPE_FORMAT_R16A16_UINT",
+ "r16a16_uint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r16a16_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r16a16_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r16a16_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r16a16_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r16a16_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r16a16_sint_description = {
+ PIPE_FORMAT_R16A16_SINT,
+ "PIPE_FORMAT_R16A16_SINT",
+ "r16a16_sint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r16a16_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r16a16_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r16a16_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r16a16_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r16a16_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32a32_uint_description = {
+ PIPE_FORMAT_R32A32_UINT,
+ "PIPE_FORMAT_R32A32_UINT",
+ "r32a32_uint",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r32a32_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r32a32_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r32a32_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r32a32_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r32a32_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r32a32_sint_description = {
+ PIPE_FORMAT_R32A32_SINT,
+ "PIPE_FORMAT_R32A32_SINT",
+ "r32a32_sint",
+ {1, 1, 64}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 2, /* nr_channels */
+ TRUE, /* is_array */
+ FALSE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* y = a */
+ {0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_0, /* g */
+ UTIL_FORMAT_SWIZZLE_0, /* b */
+ UTIL_FORMAT_SWIZZLE_Y /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r32a32_sint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r32a32_sint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r32a32_sint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r32a32_sint_pack_signed, /* pack_rgba_sint */
+ NULL, /* fetch_rgba_uint */
+ &util_format_r32a32_sint_fetch_signed /* fetch_rgba_sint */
+};
+
+const struct util_format_description
+util_format_r10g10b10a2_uint_description = {
+ PIPE_FORMAT_R10G10B10A2_UINT,
+ "PIPE_FORMAT_R10G10B10A2_UINT",
+ "r10g10b10a2_uint",
+ {1, 1, 32}, /* block */
+ UTIL_FORMAT_LAYOUT_PLAIN,
+ 4, /* nr_channels */
+ FALSE, /* is_array */
+ TRUE, /* is_bitmask */
+ FALSE, /* is_mixed */
+ {
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 0}, /* x = r */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 10}, /* y = g */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 20}, /* z = b */
+ {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 2, 30} /* w = a */
+ },
+ {
+ UTIL_FORMAT_SWIZZLE_X, /* r */
+ UTIL_FORMAT_SWIZZLE_Y, /* g */
+ UTIL_FORMAT_SWIZZLE_Z, /* b */
+ UTIL_FORMAT_SWIZZLE_W /* a */
+ },
+ UTIL_FORMAT_COLORSPACE_RGB,
+ NULL, /* unpack_rgba_8unorm */
+ NULL, /* pack_rgba_8unorm */
+ NULL, /* fetch_rgba_8unorm */
+ NULL, /* unpack_rgba_float */
+ NULL, /* pack_rgba_float */
+ NULL, /* fetch_rgba_float */
+ NULL, /* unpack_z_32unorm */
+ NULL, /* pack_z_32unorm */
+ NULL, /* unpack_z_float */
+ NULL, /* pack_z_float */
+ NULL, /* unpack_s_8uint */
+ NULL, /* pack_s_8uint */
+ &util_format_r10g10b10a2_uint_unpack_unsigned, /* unpack_rgba_uint */
+ &util_format_r10g10b10a2_uint_pack_unsigned, /* pack_rgba_uint */
+ &util_format_r10g10b10a2_uint_unpack_signed, /* unpack_rgba_sint */
+ &util_format_r10g10b10a2_uint_pack_signed, /* pack_rgba_sint */
+ &util_format_r10g10b10a2_uint_fetch_unsigned, /* fetch_rgba_uint */
+ NULL /* fetch_rgba_sint */
+};
+
+const struct util_format_description *
+util_format_description(enum pipe_format format)
+{
+ if (format >= PIPE_FORMAT_COUNT) {
+ return NULL;
+ }
+
+ switch (format) {
+ case PIPE_FORMAT_NONE:
+ return &util_format_none_description;
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ return &util_format_b8g8r8a8_unorm_description;
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
+ return &util_format_b8g8r8x8_unorm_description;
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
+ return &util_format_a8r8g8b8_unorm_description;
+ case PIPE_FORMAT_X8R8G8B8_UNORM:
+ return &util_format_x8r8g8b8_unorm_description;
+ case PIPE_FORMAT_A8B8G8R8_UNORM:
+ return &util_format_a8b8g8r8_unorm_description;
+ case PIPE_FORMAT_X8B8G8R8_UNORM:
+ return &util_format_x8b8g8r8_unorm_description;
+ case PIPE_FORMAT_R8G8B8X8_UNORM:
+ return &util_format_r8g8b8x8_unorm_description;
+ case PIPE_FORMAT_B5G5R5X1_UNORM:
+ return &util_format_b5g5r5x1_unorm_description;
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
+ return &util_format_b5g5r5a1_unorm_description;
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
+ return &util_format_b4g4r4a4_unorm_description;
+ case PIPE_FORMAT_B4G4R4X4_UNORM:
+ return &util_format_b4g4r4x4_unorm_description;
+ case PIPE_FORMAT_B5G6R5_UNORM:
+ return &util_format_b5g6r5_unorm_description;
+ case PIPE_FORMAT_R10G10B10A2_UNORM:
+ return &util_format_r10g10b10a2_unorm_description;
+ case PIPE_FORMAT_B10G10R10A2_UNORM:
+ return &util_format_b10g10r10a2_unorm_description;
+ case PIPE_FORMAT_B2G3R3_UNORM:
+ return &util_format_b2g3r3_unorm_description;
+ case PIPE_FORMAT_L8_UNORM:
+ return &util_format_l8_unorm_description;
+ case PIPE_FORMAT_A8_UNORM:
+ return &util_format_a8_unorm_description;
+ case PIPE_FORMAT_I8_UNORM:
+ return &util_format_i8_unorm_description;
+ case PIPE_FORMAT_L4A4_UNORM:
+ return &util_format_l4a4_unorm_description;
+ case PIPE_FORMAT_L8A8_UNORM:
+ return &util_format_l8a8_unorm_description;
+ case PIPE_FORMAT_L16_UNORM:
+ return &util_format_l16_unorm_description;
+ case PIPE_FORMAT_A16_UNORM:
+ return &util_format_a16_unorm_description;
+ case PIPE_FORMAT_I16_UNORM:
+ return &util_format_i16_unorm_description;
+ case PIPE_FORMAT_L16A16_UNORM:
+ return &util_format_l16a16_unorm_description;
+ case PIPE_FORMAT_A8_SNORM:
+ return &util_format_a8_snorm_description;
+ case PIPE_FORMAT_L8_SNORM:
+ return &util_format_l8_snorm_description;
+ case PIPE_FORMAT_L8A8_SNORM:
+ return &util_format_l8a8_snorm_description;
+ case PIPE_FORMAT_I8_SNORM:
+ return &util_format_i8_snorm_description;
+ case PIPE_FORMAT_A16_SNORM:
+ return &util_format_a16_snorm_description;
+ case PIPE_FORMAT_L16_SNORM:
+ return &util_format_l16_snorm_description;
+ case PIPE_FORMAT_L16A16_SNORM:
+ return &util_format_l16a16_snorm_description;
+ case PIPE_FORMAT_I16_SNORM:
+ return &util_format_i16_snorm_description;
+ case PIPE_FORMAT_A16_FLOAT:
+ return &util_format_a16_float_description;
+ case PIPE_FORMAT_L16_FLOAT:
+ return &util_format_l16_float_description;
+ case PIPE_FORMAT_L16A16_FLOAT:
+ return &util_format_l16a16_float_description;
+ case PIPE_FORMAT_I16_FLOAT:
+ return &util_format_i16_float_description;
+ case PIPE_FORMAT_A32_FLOAT:
+ return &util_format_a32_float_description;
+ case PIPE_FORMAT_L32_FLOAT:
+ return &util_format_l32_float_description;
+ case PIPE_FORMAT_L32A32_FLOAT:
+ return &util_format_l32a32_float_description;
+ case PIPE_FORMAT_I32_FLOAT:
+ return &util_format_i32_float_description;
+ case PIPE_FORMAT_L8_SRGB:
+ return &util_format_l8_srgb_description;
+ case PIPE_FORMAT_L8A8_SRGB:
+ return &util_format_l8a8_srgb_description;
+ case PIPE_FORMAT_R8G8B8_SRGB:
+ return &util_format_r8g8b8_srgb_description;
+ case PIPE_FORMAT_R8G8B8A8_SRGB:
+ return &util_format_r8g8b8a8_srgb_description;
+ case PIPE_FORMAT_A8B8G8R8_SRGB:
+ return &util_format_a8b8g8r8_srgb_description;
+ case PIPE_FORMAT_X8B8G8R8_SRGB:
+ return &util_format_x8b8g8r8_srgb_description;
+ case PIPE_FORMAT_B8G8R8A8_SRGB:
+ return &util_format_b8g8r8a8_srgb_description;
+ case PIPE_FORMAT_B8G8R8X8_SRGB:
+ return &util_format_b8g8r8x8_srgb_description;
+ case PIPE_FORMAT_A8R8G8B8_SRGB:
+ return &util_format_a8r8g8b8_srgb_description;
+ case PIPE_FORMAT_X8R8G8B8_SRGB:
+ return &util_format_x8r8g8b8_srgb_description;
+ case PIPE_FORMAT_R8SG8SB8UX8U_NORM:
+ return &util_format_r8sg8sb8ux8u_norm_description;
+ case PIPE_FORMAT_R10SG10SB10SA2U_NORM:
+ return &util_format_r10sg10sb10sa2u_norm_description;
+ case PIPE_FORMAT_R5SG5SB6U_NORM:
+ return &util_format_r5sg5sb6u_norm_description;
+ case PIPE_FORMAT_S8_UINT:
+ return &util_format_s8_uint_description;
+ case PIPE_FORMAT_Z16_UNORM:
+ return &util_format_z16_unorm_description;
+ case PIPE_FORMAT_Z32_UNORM:
+ return &util_format_z32_unorm_description;
+ case PIPE_FORMAT_Z32_FLOAT:
+ return &util_format_z32_float_description;
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
+ return &util_format_z24_unorm_s8_uint_description;
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
+ return &util_format_s8_uint_z24_unorm_description;
+ case PIPE_FORMAT_X24S8_UINT:
+ return &util_format_x24s8_uint_description;
+ case PIPE_FORMAT_S8X24_UINT:
+ return &util_format_s8x24_uint_description;
+ case PIPE_FORMAT_Z24X8_UNORM:
+ return &util_format_z24x8_unorm_description;
+ case PIPE_FORMAT_X8Z24_UNORM:
+ return &util_format_x8z24_unorm_description;
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
+ return &util_format_z32_float_s8x24_uint_description;
+ case PIPE_FORMAT_X32_S8X24_UINT:
+ return &util_format_x32_s8x24_uint_description;
+ case PIPE_FORMAT_UYVY:
+ return &util_format_uyvy_description;
+ case PIPE_FORMAT_YUYV:
+ return &util_format_yuyv_description;
+ case PIPE_FORMAT_R8G8_B8G8_UNORM:
+ return &util_format_r8g8_b8g8_unorm_description;
+ case PIPE_FORMAT_G8R8_G8B8_UNORM:
+ return &util_format_g8r8_g8b8_unorm_description;
+ case PIPE_FORMAT_G8R8_B8R8_UNORM:
+ return &util_format_g8r8_b8r8_unorm_description;
+ case PIPE_FORMAT_R8G8_R8B8_UNORM:
+ return &util_format_r8g8_r8b8_unorm_description;
+ case PIPE_FORMAT_R11G11B10_FLOAT:
+ return &util_format_r11g11b10_float_description;
+ case PIPE_FORMAT_R9G9B9E5_FLOAT:
+ return &util_format_r9g9b9e5_float_description;
+ case PIPE_FORMAT_R1_UNORM:
+ return &util_format_r1_unorm_description;
+ case PIPE_FORMAT_R8G8Bx_SNORM:
+ return &util_format_r8g8bx_snorm_description;
+ case PIPE_FORMAT_DXT1_RGB:
+ return &util_format_dxt1_rgb_description;
+ case PIPE_FORMAT_DXT1_RGBA:
+ return &util_format_dxt1_rgba_description;
+ case PIPE_FORMAT_DXT3_RGBA:
+ return &util_format_dxt3_rgba_description;
+ case PIPE_FORMAT_DXT5_RGBA:
+ return &util_format_dxt5_rgba_description;
+ case PIPE_FORMAT_DXT1_SRGB:
+ return &util_format_dxt1_srgb_description;
+ case PIPE_FORMAT_DXT1_SRGBA:
+ return &util_format_dxt1_srgba_description;
+ case PIPE_FORMAT_DXT3_SRGBA:
+ return &util_format_dxt3_srgba_description;
+ case PIPE_FORMAT_DXT5_SRGBA:
+ return &util_format_dxt5_srgba_description;
+ case PIPE_FORMAT_RGTC1_UNORM:
+ return &util_format_rgtc1_unorm_description;
+ case PIPE_FORMAT_RGTC1_SNORM:
+ return &util_format_rgtc1_snorm_description;
+ case PIPE_FORMAT_RGTC2_UNORM:
+ return &util_format_rgtc2_unorm_description;
+ case PIPE_FORMAT_RGTC2_SNORM:
+ return &util_format_rgtc2_snorm_description;
+ case PIPE_FORMAT_LATC1_UNORM:
+ return &util_format_latc1_unorm_description;
+ case PIPE_FORMAT_LATC1_SNORM:
+ return &util_format_latc1_snorm_description;
+ case PIPE_FORMAT_LATC2_UNORM:
+ return &util_format_latc2_unorm_description;
+ case PIPE_FORMAT_LATC2_SNORM:
+ return &util_format_latc2_snorm_description;
+ case PIPE_FORMAT_ETC1_RGB8:
+ return &util_format_etc1_rgb8_description;
+ case PIPE_FORMAT_R64_FLOAT:
+ return &util_format_r64_float_description;
+ case PIPE_FORMAT_R64G64_FLOAT:
+ return &util_format_r64g64_float_description;
+ case PIPE_FORMAT_R64G64B64_FLOAT:
+ return &util_format_r64g64b64_float_description;
+ case PIPE_FORMAT_R64G64B64A64_FLOAT:
+ return &util_format_r64g64b64a64_float_description;
+ case PIPE_FORMAT_R32_FLOAT:
+ return &util_format_r32_float_description;
+ case PIPE_FORMAT_R32G32_FLOAT:
+ return &util_format_r32g32_float_description;
+ case PIPE_FORMAT_R32G32B32_FLOAT:
+ return &util_format_r32g32b32_float_description;
+ case PIPE_FORMAT_R32G32B32A32_FLOAT:
+ return &util_format_r32g32b32a32_float_description;
+ case PIPE_FORMAT_R32_UNORM:
+ return &util_format_r32_unorm_description;
+ case PIPE_FORMAT_R32G32_UNORM:
+ return &util_format_r32g32_unorm_description;
+ case PIPE_FORMAT_R32G32B32_UNORM:
+ return &util_format_r32g32b32_unorm_description;
+ case PIPE_FORMAT_R32G32B32A32_UNORM:
+ return &util_format_r32g32b32a32_unorm_description;
+ case PIPE_FORMAT_R32_USCALED:
+ return &util_format_r32_uscaled_description;
+ case PIPE_FORMAT_R32G32_USCALED:
+ return &util_format_r32g32_uscaled_description;
+ case PIPE_FORMAT_R32G32B32_USCALED:
+ return &util_format_r32g32b32_uscaled_description;
+ case PIPE_FORMAT_R32G32B32A32_USCALED:
+ return &util_format_r32g32b32a32_uscaled_description;
+ case PIPE_FORMAT_R32_SNORM:
+ return &util_format_r32_snorm_description;
+ case PIPE_FORMAT_R32G32_SNORM:
+ return &util_format_r32g32_snorm_description;
+ case PIPE_FORMAT_R32G32B32_SNORM:
+ return &util_format_r32g32b32_snorm_description;
+ case PIPE_FORMAT_R32G32B32A32_SNORM:
+ return &util_format_r32g32b32a32_snorm_description;
+ case PIPE_FORMAT_R32_SSCALED:
+ return &util_format_r32_sscaled_description;
+ case PIPE_FORMAT_R32G32_SSCALED:
+ return &util_format_r32g32_sscaled_description;
+ case PIPE_FORMAT_R32G32B32_SSCALED:
+ return &util_format_r32g32b32_sscaled_description;
+ case PIPE_FORMAT_R32G32B32A32_SSCALED:
+ return &util_format_r32g32b32a32_sscaled_description;
+ case PIPE_FORMAT_R16_FLOAT:
+ return &util_format_r16_float_description;
+ case PIPE_FORMAT_R16G16_FLOAT:
+ return &util_format_r16g16_float_description;
+ case PIPE_FORMAT_R16G16B16_FLOAT:
+ return &util_format_r16g16b16_float_description;
+ case PIPE_FORMAT_R16G16B16A16_FLOAT:
+ return &util_format_r16g16b16a16_float_description;
+ case PIPE_FORMAT_R16_UNORM:
+ return &util_format_r16_unorm_description;
+ case PIPE_FORMAT_R16G16_UNORM:
+ return &util_format_r16g16_unorm_description;
+ case PIPE_FORMAT_R16G16B16_UNORM:
+ return &util_format_r16g16b16_unorm_description;
+ case PIPE_FORMAT_R16G16B16A16_UNORM:
+ return &util_format_r16g16b16a16_unorm_description;
+ case PIPE_FORMAT_R16_USCALED:
+ return &util_format_r16_uscaled_description;
+ case PIPE_FORMAT_R16G16_USCALED:
+ return &util_format_r16g16_uscaled_description;
+ case PIPE_FORMAT_R16G16B16_USCALED:
+ return &util_format_r16g16b16_uscaled_description;
+ case PIPE_FORMAT_R16G16B16A16_USCALED:
+ return &util_format_r16g16b16a16_uscaled_description;
+ case PIPE_FORMAT_R16_SNORM:
+ return &util_format_r16_snorm_description;
+ case PIPE_FORMAT_R16G16_SNORM:
+ return &util_format_r16g16_snorm_description;
+ case PIPE_FORMAT_R16G16B16_SNORM:
+ return &util_format_r16g16b16_snorm_description;
+ case PIPE_FORMAT_R16G16B16A16_SNORM:
+ return &util_format_r16g16b16a16_snorm_description;
+ case PIPE_FORMAT_R16_SSCALED:
+ return &util_format_r16_sscaled_description;
+ case PIPE_FORMAT_R16G16_SSCALED:
+ return &util_format_r16g16_sscaled_description;
+ case PIPE_FORMAT_R16G16B16_SSCALED:
+ return &util_format_r16g16b16_sscaled_description;
+ case PIPE_FORMAT_R16G16B16A16_SSCALED:
+ return &util_format_r16g16b16a16_sscaled_description;
+ case PIPE_FORMAT_R8_UNORM:
+ return &util_format_r8_unorm_description;
+ case PIPE_FORMAT_R8G8_UNORM:
+ return &util_format_r8g8_unorm_description;
+ case PIPE_FORMAT_R8G8B8_UNORM:
+ return &util_format_r8g8b8_unorm_description;
+ case PIPE_FORMAT_R8G8B8A8_UNORM:
+ return &util_format_r8g8b8a8_unorm_description;
+ case PIPE_FORMAT_R8_USCALED:
+ return &util_format_r8_uscaled_description;
+ case PIPE_FORMAT_R8G8_USCALED:
+ return &util_format_r8g8_uscaled_description;
+ case PIPE_FORMAT_R8G8B8_USCALED:
+ return &util_format_r8g8b8_uscaled_description;
+ case PIPE_FORMAT_R8G8B8A8_USCALED:
+ return &util_format_r8g8b8a8_uscaled_description;
+ case PIPE_FORMAT_R8_SNORM:
+ return &util_format_r8_snorm_description;
+ case PIPE_FORMAT_R8G8_SNORM:
+ return &util_format_r8g8_snorm_description;
+ case PIPE_FORMAT_R8G8B8_SNORM:
+ return &util_format_r8g8b8_snorm_description;
+ case PIPE_FORMAT_R8G8B8A8_SNORM:
+ return &util_format_r8g8b8a8_snorm_description;
+ case PIPE_FORMAT_R8_SSCALED:
+ return &util_format_r8_sscaled_description;
+ case PIPE_FORMAT_R8G8_SSCALED:
+ return &util_format_r8g8_sscaled_description;
+ case PIPE_FORMAT_R8G8B8_SSCALED:
+ return &util_format_r8g8b8_sscaled_description;
+ case PIPE_FORMAT_R8G8B8A8_SSCALED:
+ return &util_format_r8g8b8a8_sscaled_description;
+ case PIPE_FORMAT_R32_FIXED:
+ return &util_format_r32_fixed_description;
+ case PIPE_FORMAT_R32G32_FIXED:
+ return &util_format_r32g32_fixed_description;
+ case PIPE_FORMAT_R32G32B32_FIXED:
+ return &util_format_r32g32b32_fixed_description;
+ case PIPE_FORMAT_R32G32B32A32_FIXED:
+ return &util_format_r32g32b32a32_fixed_description;
+ case PIPE_FORMAT_R10G10B10X2_USCALED:
+ return &util_format_r10g10b10x2_uscaled_description;
+ case PIPE_FORMAT_R10G10B10X2_SNORM:
+ return &util_format_r10g10b10x2_snorm_description;
+ case PIPE_FORMAT_YV12:
+ return &util_format_yv12_description;
+ case PIPE_FORMAT_YV16:
+ return &util_format_yv16_description;
+ case PIPE_FORMAT_IYUV:
+ return &util_format_iyuv_description;
+ case PIPE_FORMAT_NV12:
+ return &util_format_nv12_description;
+ case PIPE_FORMAT_NV21:
+ return &util_format_nv21_description;
+ case PIPE_FORMAT_R4A4_UNORM:
+ return &util_format_r4a4_unorm_description;
+ case PIPE_FORMAT_A4R4_UNORM:
+ return &util_format_a4r4_unorm_description;
+ case PIPE_FORMAT_R8A8_UNORM:
+ return &util_format_r8a8_unorm_description;
+ case PIPE_FORMAT_A8R8_UNORM:
+ return &util_format_a8r8_unorm_description;
+ case PIPE_FORMAT_R10G10B10A2_USCALED:
+ return &util_format_r10g10b10a2_uscaled_description;
+ case PIPE_FORMAT_R10G10B10A2_SSCALED:
+ return &util_format_r10g10b10a2_sscaled_description;
+ case PIPE_FORMAT_R10G10B10A2_SNORM:
+ return &util_format_r10g10b10a2_snorm_description;
+ case PIPE_FORMAT_B10G10R10A2_USCALED:
+ return &util_format_b10g10r10a2_uscaled_description;
+ case PIPE_FORMAT_B10G10R10A2_SSCALED:
+ return &util_format_b10g10r10a2_sscaled_description;
+ case PIPE_FORMAT_B10G10R10A2_SNORM:
+ return &util_format_b10g10r10a2_snorm_description;
+ case PIPE_FORMAT_R8_UINT:
+ return &util_format_r8_uint_description;
+ case PIPE_FORMAT_R8G8_UINT:
+ return &util_format_r8g8_uint_description;
+ case PIPE_FORMAT_R8G8B8_UINT:
+ return &util_format_r8g8b8_uint_description;
+ case PIPE_FORMAT_R8G8B8A8_UINT:
+ return &util_format_r8g8b8a8_uint_description;
+ case PIPE_FORMAT_R8_SINT:
+ return &util_format_r8_sint_description;
+ case PIPE_FORMAT_R8G8_SINT:
+ return &util_format_r8g8_sint_description;
+ case PIPE_FORMAT_R8G8B8_SINT:
+ return &util_format_r8g8b8_sint_description;
+ case PIPE_FORMAT_R8G8B8A8_SINT:
+ return &util_format_r8g8b8a8_sint_description;
+ case PIPE_FORMAT_R16_UINT:
+ return &util_format_r16_uint_description;
+ case PIPE_FORMAT_R16G16_UINT:
+ return &util_format_r16g16_uint_description;
+ case PIPE_FORMAT_R16G16B16_UINT:
+ return &util_format_r16g16b16_uint_description;
+ case PIPE_FORMAT_R16G16B16A16_UINT:
+ return &util_format_r16g16b16a16_uint_description;
+ case PIPE_FORMAT_R16_SINT:
+ return &util_format_r16_sint_description;
+ case PIPE_FORMAT_R16G16_SINT:
+ return &util_format_r16g16_sint_description;
+ case PIPE_FORMAT_R16G16B16_SINT:
+ return &util_format_r16g16b16_sint_description;
+ case PIPE_FORMAT_R16G16B16A16_SINT:
+ return &util_format_r16g16b16a16_sint_description;
+ case PIPE_FORMAT_R32_UINT:
+ return &util_format_r32_uint_description;
+ case PIPE_FORMAT_R32G32_UINT:
+ return &util_format_r32g32_uint_description;
+ case PIPE_FORMAT_R32G32B32_UINT:
+ return &util_format_r32g32b32_uint_description;
+ case PIPE_FORMAT_R32G32B32A32_UINT:
+ return &util_format_r32g32b32a32_uint_description;
+ case PIPE_FORMAT_R32_SINT:
+ return &util_format_r32_sint_description;
+ case PIPE_FORMAT_R32G32_SINT:
+ return &util_format_r32g32_sint_description;
+ case PIPE_FORMAT_R32G32B32_SINT:
+ return &util_format_r32g32b32_sint_description;
+ case PIPE_FORMAT_R32G32B32A32_SINT:
+ return &util_format_r32g32b32a32_sint_description;
+ case PIPE_FORMAT_A8_UINT:
+ return &util_format_a8_uint_description;
+ case PIPE_FORMAT_I8_UINT:
+ return &util_format_i8_uint_description;
+ case PIPE_FORMAT_L8_UINT:
+ return &util_format_l8_uint_description;
+ case PIPE_FORMAT_L8A8_UINT:
+ return &util_format_l8a8_uint_description;
+ case PIPE_FORMAT_A8_SINT:
+ return &util_format_a8_sint_description;
+ case PIPE_FORMAT_I8_SINT:
+ return &util_format_i8_sint_description;
+ case PIPE_FORMAT_L8_SINT:
+ return &util_format_l8_sint_description;
+ case PIPE_FORMAT_L8A8_SINT:
+ return &util_format_l8a8_sint_description;
+ case PIPE_FORMAT_A16_UINT:
+ return &util_format_a16_uint_description;
+ case PIPE_FORMAT_I16_UINT:
+ return &util_format_i16_uint_description;
+ case PIPE_FORMAT_L16_UINT:
+ return &util_format_l16_uint_description;
+ case PIPE_FORMAT_L16A16_UINT:
+ return &util_format_l16a16_uint_description;
+ case PIPE_FORMAT_A16_SINT:
+ return &util_format_a16_sint_description;
+ case PIPE_FORMAT_I16_SINT:
+ return &util_format_i16_sint_description;
+ case PIPE_FORMAT_L16_SINT:
+ return &util_format_l16_sint_description;
+ case PIPE_FORMAT_L16A16_SINT:
+ return &util_format_l16a16_sint_description;
+ case PIPE_FORMAT_A32_UINT:
+ return &util_format_a32_uint_description;
+ case PIPE_FORMAT_I32_UINT:
+ return &util_format_i32_uint_description;
+ case PIPE_FORMAT_L32_UINT:
+ return &util_format_l32_uint_description;
+ case PIPE_FORMAT_L32A32_UINT:
+ return &util_format_l32a32_uint_description;
+ case PIPE_FORMAT_A32_SINT:
+ return &util_format_a32_sint_description;
+ case PIPE_FORMAT_I32_SINT:
+ return &util_format_i32_sint_description;
+ case PIPE_FORMAT_L32_SINT:
+ return &util_format_l32_sint_description;
+ case PIPE_FORMAT_L32A32_SINT:
+ return &util_format_l32a32_sint_description;
+ case PIPE_FORMAT_B10G10R10A2_UINT:
+ return &util_format_b10g10r10a2_uint_description;
+ case PIPE_FORMAT_R8G8B8X8_SNORM:
+ return &util_format_r8g8b8x8_snorm_description;
+ case PIPE_FORMAT_R8G8B8X8_SRGB:
+ return &util_format_r8g8b8x8_srgb_description;
+ case PIPE_FORMAT_R8G8B8X8_UINT:
+ return &util_format_r8g8b8x8_uint_description;
+ case PIPE_FORMAT_R8G8B8X8_SINT:
+ return &util_format_r8g8b8x8_sint_description;
+ case PIPE_FORMAT_B10G10R10X2_UNORM:
+ return &util_format_b10g10r10x2_unorm_description;
+ case PIPE_FORMAT_R16G16B16X16_UNORM:
+ return &util_format_r16g16b16x16_unorm_description;
+ case PIPE_FORMAT_R16G16B16X16_SNORM:
+ return &util_format_r16g16b16x16_snorm_description;
+ case PIPE_FORMAT_R16G16B16X16_FLOAT:
+ return &util_format_r16g16b16x16_float_description;
+ case PIPE_FORMAT_R16G16B16X16_UINT:
+ return &util_format_r16g16b16x16_uint_description;
+ case PIPE_FORMAT_R16G16B16X16_SINT:
+ return &util_format_r16g16b16x16_sint_description;
+ case PIPE_FORMAT_R32G32B32X32_FLOAT:
+ return &util_format_r32g32b32x32_float_description;
+ case PIPE_FORMAT_R32G32B32X32_UINT:
+ return &util_format_r32g32b32x32_uint_description;
+ case PIPE_FORMAT_R32G32B32X32_SINT:
+ return &util_format_r32g32b32x32_sint_description;
+ case PIPE_FORMAT_R8A8_SNORM:
+ return &util_format_r8a8_snorm_description;
+ case PIPE_FORMAT_R16A16_UNORM:
+ return &util_format_r16a16_unorm_description;
+ case PIPE_FORMAT_R16A16_SNORM:
+ return &util_format_r16a16_snorm_description;
+ case PIPE_FORMAT_R16A16_FLOAT:
+ return &util_format_r16a16_float_description;
+ case PIPE_FORMAT_R32A32_FLOAT:
+ return &util_format_r32a32_float_description;
+ case PIPE_FORMAT_R8A8_UINT:
+ return &util_format_r8a8_uint_description;
+ case PIPE_FORMAT_R8A8_SINT:
+ return &util_format_r8a8_sint_description;
+ case PIPE_FORMAT_R16A16_UINT:
+ return &util_format_r16a16_uint_description;
+ case PIPE_FORMAT_R16A16_SINT:
+ return &util_format_r16a16_sint_description;
+ case PIPE_FORMAT_R32A32_UINT:
+ return &util_format_r32a32_uint_description;
+ case PIPE_FORMAT_R32A32_SINT:
+ return &util_format_r32a32_sint_description;
+ case PIPE_FORMAT_R10G10B10A2_UINT:
+ return &util_format_r10g10b10a2_uint_description;
+ default:
+ return NULL;
+ }
+}
+
diff --git a/src/minigallium/auxiliary/util/u_format_table.py b/src/minigallium/auxiliary/util/u_format_table.py
new file mode 100755
index 0000000..8edb505
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_table.py
@@ -0,0 +1,219 @@
+#!/usr/bin/env python
+
+CopyRight = '''
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+'''
+
+
+import sys
+
+from u_format_parse import *
+import u_format_pack
+
+
+def layout_map(layout):
+ return 'UTIL_FORMAT_LAYOUT_' + str(layout).upper()
+
+
+def colorspace_map(colorspace):
+ return 'UTIL_FORMAT_COLORSPACE_' + str(colorspace).upper()
+
+
+colorspace_channels_map = {
+ 'rgb': ['r', 'g', 'b', 'a'],
+ 'srgb': ['sr', 'sg', 'sb', 'a'],
+ 'zs': ['z', 's'],
+ 'yuv': ['y', 'u', 'v'],
+}
+
+
+type_map = {
+ VOID: "UTIL_FORMAT_TYPE_VOID",
+ UNSIGNED: "UTIL_FORMAT_TYPE_UNSIGNED",
+ SIGNED: "UTIL_FORMAT_TYPE_SIGNED",
+ FIXED: "UTIL_FORMAT_TYPE_FIXED",
+ FLOAT: "UTIL_FORMAT_TYPE_FLOAT",
+}
+
+
+def bool_map(value):
+ if value:
+ return "TRUE"
+ else:
+ return "FALSE"
+
+
+swizzle_map = {
+ SWIZZLE_X: "UTIL_FORMAT_SWIZZLE_X",
+ SWIZZLE_Y: "UTIL_FORMAT_SWIZZLE_Y",
+ SWIZZLE_Z: "UTIL_FORMAT_SWIZZLE_Z",
+ SWIZZLE_W: "UTIL_FORMAT_SWIZZLE_W",
+ SWIZZLE_0: "UTIL_FORMAT_SWIZZLE_0",
+ SWIZZLE_1: "UTIL_FORMAT_SWIZZLE_1",
+ SWIZZLE_NONE: "UTIL_FORMAT_SWIZZLE_NONE",
+}
+
+
+def write_format_table(formats):
+ print '/* This file is autogenerated by u_format_table.py from u_format.csv. Do not edit directly. */'
+ print
+ # This will print the copyright message on the top of this file
+ print CopyRight.strip()
+ print
+ print '#include "u_format.h"'
+ print '#include "u_format_s3tc.h"'
+ print '#include "u_format_rgtc.h"'
+ print '#include "u_format_latc.h"'
+ print '#include "u_format_etc.h"'
+ print
+
+ u_format_pack.generate(formats)
+
+ for format in formats:
+ print 'const struct util_format_description'
+ print 'util_format_%s_description = {' % (format.short_name(),)
+ print " %s," % (format.name,)
+ print " \"%s\"," % (format.name,)
+ print " \"%s\"," % (format.short_name(),)
+ print " {%u, %u, %u},\t/* block */" % (format.block_width, format.block_height, format.block_size())
+ print " %s," % (layout_map(format.layout),)
+ print " %u,\t/* nr_channels */" % (format.nr_channels(),)
+ print " %s,\t/* is_array */" % (bool_map(format.is_array()),)
+ print " %s,\t/* is_bitmask */" % (bool_map(format.is_bitmask()),)
+ print " %s,\t/* is_mixed */" % (bool_map(format.is_mixed()),)
+ print " {"
+ for i in range(4):
+ channel = format.channels[i]
+ if i < 3:
+ sep = ","
+ else:
+ sep = ""
+ if channel.size:
+ print " {%s, %s, %s, %u}%s\t/* %s = %s */" % (type_map[channel.type], bool_map(channel.norm), bool_map(channel.pure), channel.size, sep, "xyzw"[i], channel.name)
+ else:
+ print " {0, 0, 0, 0}%s" % (sep,)
+ print " },"
+ print " {"
+ for i in range(4):
+ swizzle = format.swizzles[i]
+ if i < 3:
+ sep = ","
+ else:
+ sep = ""
+ try:
+ comment = colorspace_channels_map[format.colorspace][i]
+ except (KeyError, IndexError):
+ comment = 'ignored'
+ print " %s%s\t/* %s */" % (swizzle_map[swizzle], sep, comment)
+ print " },"
+ print " %s," % (colorspace_map(format.colorspace),)
+ if format.colorspace != ZS and format.channels[0].pure == False:
+ print " &util_format_%s_unpack_rgba_8unorm," % format.short_name()
+ print " &util_format_%s_pack_rgba_8unorm," % format.short_name()
+ if format.layout == 's3tc' or format.layout == 'rgtc':
+ print " &util_format_%s_fetch_rgba_8unorm," % format.short_name()
+ else:
+ print " NULL, /* fetch_rgba_8unorm */"
+ print " &util_format_%s_unpack_rgba_float," % format.short_name()
+ print " &util_format_%s_pack_rgba_float," % format.short_name()
+ print " &util_format_%s_fetch_rgba_float," % format.short_name()
+ else:
+ print " NULL, /* unpack_rgba_8unorm */"
+ print " NULL, /* pack_rgba_8unorm */"
+ print " NULL, /* fetch_rgba_8unorm */"
+ print " NULL, /* unpack_rgba_float */"
+ print " NULL, /* pack_rgba_float */"
+ print " NULL, /* fetch_rgba_float */"
+ if format.colorspace == ZS and format.swizzles[0] != SWIZZLE_NONE:
+ print " &util_format_%s_unpack_z_32unorm," % format.short_name()
+ print " &util_format_%s_pack_z_32unorm," % format.short_name()
+ print " &util_format_%s_unpack_z_float," % format.short_name()
+ print " &util_format_%s_pack_z_float," % format.short_name()
+ else:
+ print " NULL, /* unpack_z_32unorm */"
+ print " NULL, /* pack_z_32unorm */"
+ print " NULL, /* unpack_z_float */"
+ print " NULL, /* pack_z_float */"
+ if format.colorspace == ZS and format.swizzles[1] != SWIZZLE_NONE:
+ print " &util_format_%s_unpack_s_8uint," % format.short_name()
+ print " &util_format_%s_pack_s_8uint," % format.short_name()
+ else:
+ print " NULL, /* unpack_s_8uint */"
+ print " NULL, /* pack_s_8uint */"
+ if format.colorspace != ZS and format.channels[0].pure == True and format.channels[0].type == UNSIGNED:
+ print " &util_format_%s_unpack_unsigned, /* unpack_rgba_uint */" % format.short_name()
+ print " &util_format_%s_pack_unsigned, /* pack_rgba_uint */" % format.short_name()
+ print " &util_format_%s_unpack_signed, /* unpack_rgba_sint */" % format.short_name()
+ print " &util_format_%s_pack_signed, /* pack_rgba_sint */" % format.short_name()
+ print " &util_format_%s_fetch_unsigned, /* fetch_rgba_uint */" % format.short_name()
+ print " NULL /* fetch_rgba_sint */"
+ elif format.colorspace != ZS and format.channels[0].pure == True and format.channels[0].type == SIGNED:
+ print " &util_format_%s_unpack_unsigned, /* unpack_rgba_uint */" % format.short_name()
+ print " &util_format_%s_pack_unsigned, /* pack_rgba_uint */" % format.short_name()
+ print " &util_format_%s_unpack_signed, /* unpack_rgba_sint */" % format.short_name()
+ print " &util_format_%s_pack_signed, /* pack_rgba_sint */" % format.short_name()
+ print " NULL, /* fetch_rgba_uint */"
+ print " &util_format_%s_fetch_signed /* fetch_rgba_sint */" % format.short_name()
+ else:
+ print " NULL, /* unpack_rgba_uint */"
+ print " NULL, /* pack_rgba_uint */"
+ print " NULL, /* unpack_rgba_sint */"
+ print " NULL, /* pack_rgba_sint */"
+ print " NULL, /* fetch_rgba_uint */"
+ print " NULL /* fetch_rgba_sint */"
+ print "};"
+ print
+
+ print "const struct util_format_description *"
+ print "util_format_description(enum pipe_format format)"
+ print "{"
+ print " if (format >= PIPE_FORMAT_COUNT) {"
+ print " return NULL;"
+ print " }"
+ print
+ print " switch (format) {"
+ for format in formats:
+ print " case %s:" % format.name
+ print " return &util_format_%s_description;" % (format.short_name(),)
+ print " default:"
+ print " return NULL;"
+ print " }"
+ print "}"
+ print
+
+
+def main():
+
+ formats = []
+ for arg in sys.argv[1:]:
+ formats.extend(parse(arg))
+ write_format_table(formats)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/src/minigallium/auxiliary/util/u_format_tests.c b/src/minigallium/auxiliary/util/u_format_tests.c
new file mode 100644
index 0000000..64224cd
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_tests.c
@@ -0,0 +1,1011 @@
+/**************************************************************************
+ *
+ * Copyright 2009-2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#include <math.h>
+#include <float.h>
+
+#include "pipe/p_config.h"
+#include "u_memory.h"
+#include "u_format_tests.h"
+
+
+/*
+ * Helper macros to create the packed bytes for longer words.
+ */
+
+#define PACKED_1x8(x) {x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_2x8(x, y) {x, y, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_3x8(x, y, z) {x, y, z, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_4x8(x, y, z, w) {x, y, z, w, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_8x8(a, b, c, d, e, f, g, h) {a, b, c, d, e, f, g, h, 0, 0, 0, 0, 0, 0, 0, 0}
+
+#define PACKED_1x16(x) {(x) & 0xff, (x) >> 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_2x16(x, y) {(x) & 0xff, (x) >> 8, (y) & 0xff, (y) >> 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_3x16(x, y, z) {(x) & 0xff, (x) >> 8, (y) & 0xff, (y) >> 8, (z) & 0xff, (z) >> 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_4x16(x, y, z, w) {(x) & 0xff, (x) >> 8, (y) & 0xff, (y) >> 8, (z) & 0xff, (z) >> 8, (w) & 0xff, (w) >> 8, 0, 0, 0, 0, 0, 0, 0, 0}
+
+#define PACKED_1x32(x) {(x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, (x) >> 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_2x32(x, y) {(x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, (x) >> 24, (y) & 0xff, ((y) >> 8) & 0xff, ((y) >> 16) & 0xff, (y) >> 24, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_3x32(x, y, z) {(x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, (x) >> 24, (y) & 0xff, ((y) >> 8) & 0xff, ((y) >> 16) & 0xff, (y) >> 24, (z) & 0xff, ((z) >> 8) & 0xff, ((z) >> 16) & 0xff, (z) >> 24, 0, 0, 0, 0}
+#define PACKED_4x32(x, y, z, w) {(x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, (x) >> 24, (y) & 0xff, ((y) >> 8) & 0xff, ((y) >> 16) & 0xff, (y) >> 24, (z) & 0xff, ((z) >> 8) & 0xff, ((z) >> 16) & 0xff, (z) >> 24, (w) & 0xff, ((w) >> 8) & 0xff, ((w) >> 16) & 0xff, (w) >> 24}
+
+#define UNPACKED_1x1(r, g, b, a) \
+ {{{r, g, b, a}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \
+ {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \
+ {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \
+ {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}}
+
+#define UNPACKED_2x1(r0, g0, b0, a0, r1, g1, b1, a1) \
+ {{{r0, g0, b0, a0}, {r1, g1, b1, a1}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \
+ {{ 0, 0, 0, 0}, { 0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \
+ {{ 0, 0, 0, 0}, { 0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \
+ {{ 0, 0, 0, 0}, { 0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}}
+
+
+/**
+ * Test cases.
+ *
+ * These were manually entered. We could generate these
+ *
+ * To keep this to a we cover only the corner cases, which should produce
+ * good enough coverage since that pixel format transformations are afine for
+ * non SRGB formats.
+ */
+const struct util_format_test_case
+util_format_test_cases[] =
+{
+
+ /*
+ * 32-bit rendertarget formats
+ */
+
+ {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x0000ff00), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0xff000000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8B8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000003ff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000ffc00), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x3ff00000), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xc0000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_B10G10R10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B10G10R10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000003ff), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_B10G10R10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000ffc00), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B10G10R10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x3ff00000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B10G10R10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xc0000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B10G10R10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ /*
+ * 16-bit rendertarget formats
+ */
+
+ {PIPE_FORMAT_B5G5R5X1_UNORM, PACKED_1x16(0x7fff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B5G5R5X1_UNORM, PACKED_1x16(0x7fff), PACKED_1x16(0x001f), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_B5G5R5X1_UNORM, PACKED_1x16(0x7fff), PACKED_1x16(0x03e0), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B5G5R5X1_UNORM, PACKED_1x16(0x7fff), PACKED_1x16(0x7c00), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B5G5R5X1_UNORM, PACKED_1x16(0x7fff), PACKED_1x16(0x7fff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x001f), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x03e0), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x7c00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x8000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_B4G4R4X4_UNORM, PACKED_1x16(0x0fff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B4G4R4X4_UNORM, PACKED_1x16(0x0fff), PACKED_1x16(0x000f), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_B4G4R4X4_UNORM, PACKED_1x16(0x0fff), PACKED_1x16(0x00f0), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B4G4R4X4_UNORM, PACKED_1x16(0x0fff), PACKED_1x16(0x0f00), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B4G4R4X4_UNORM, PACKED_1x16(0x0fff), PACKED_1x16(0x0fff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x000f), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x00f0), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0f00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xf000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_B5G6R5_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B5G6R5_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x001f), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_B5G6R5_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x07e0), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B5G6R5_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xf800), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B5G6R5_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ /*
+ * Luminance/intensity/alpha formats
+ */
+
+ {PIPE_FORMAT_L8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_L8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_A8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_A8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_I8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_I8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_L4A4_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_L4A4_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x0f), UNPACKED_1x1(1.0, 1.0, 1.0, 0.0)},
+ {PIPE_FORMAT_L4A4_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xf0), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_L4A4_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_L8A8_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_L8A8_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x00ff), UNPACKED_1x1(1.0, 1.0, 1.0, 0.0)},
+ {PIPE_FORMAT_L8A8_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xff00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_L8A8_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_L16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_L16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ /*
+ * SRGB formats
+ */
+
+ {PIPE_FORMAT_L8_SRGB, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_L8_SRGB, PACKED_1x8(0xff), PACKED_1x8(0xbc), UNPACKED_1x1(0.502886458033, 0.502886458033, 0.502886458033, 1.0)},
+ {PIPE_FORMAT_L8_SRGB, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_L8A8_SRGB, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_L8A8_SRGB, PACKED_1x16(0xffff), PACKED_1x16(0x00bc), UNPACKED_1x1(0.502886458033, 0.502886458033, 0.502886458033, 0.0)},
+ {PIPE_FORMAT_L8A8_SRGB, PACKED_1x16(0xffff), PACKED_1x16(0x00ff), UNPACKED_1x1(1.0, 1.0, 1.0, 0.0)},
+ {PIPE_FORMAT_L8A8_SRGB, PACKED_1x16(0xffff), PACKED_1x16(0xcc00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.8)},
+ {PIPE_FORMAT_L8A8_SRGB, PACKED_1x16(0xffff), PACKED_1x16(0xff00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_L8A8_SRGB, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xbc, 0x00, 0x00), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0x00, 0x00), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0xbc, 0x00), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0xff, 0x00), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0xbc), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0xff), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0xff, 0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xbc, 0x00, 0x00, 0x00), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0x00, 0x00, 0x00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0xbc, 0x00, 0x00), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0xff, 0x00, 0x00), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0xbc, 0x00), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0xff, 0x00), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0xcc), UNPACKED_1x1(0.0, 0.0, 0.0, 0.8)},
+ {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0xff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0xff, 0xff, 0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000bc), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 0.0)},
+ {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000bc00), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 0.0)},
+ {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00bc0000), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xcc000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.8)},
+ {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0x000000bc), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 1.0)},
+ {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0x0000bc00), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 1.0)},
+ {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00bc0000), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000cc), UNPACKED_1x1(0.0, 0.0, 0.0, 0.8)},
+ {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000bc00), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00bc0000), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 0.0)},
+ {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xbc000000), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 0.0)},
+ {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x0000bc00), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x0000ff00), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x00bc0000), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 1.0)},
+ {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0xbc000000), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 1.0)},
+ {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000cc), UNPACKED_1x1(0.0, 0.0, 0.0, 0.8)},
+ {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000bc00), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 0.0)},
+ {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00bc0000), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 0.0)},
+ {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xbc000000), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x0000bc00), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 1.0)},
+ {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x00bc0000), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 1.0)},
+ {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0xbc000000), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0xff000000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ /*
+ * Mixed-signed formats
+ */
+
+ {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x7f, 0x00, 0x00, 0x00), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x81, 0x00, 0x00, 0x00), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x00, 0x7f, 0x00, 0x00), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x00, 0x81, 0x00, 0x00), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x00, 0x00, 0xff, 0x00), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000001ff), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000201), UNPACKED_1x1(-1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x0007fc00), UNPACKED_1x1( 0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00080400), UNPACKED_1x1( 0.0, -1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x1ff00000), UNPACKED_1x1( 0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x20100000), UNPACKED_1x1( 0.0, 0.0, -1.0, 0.0)},
+ {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xc0000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0x000f), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0x0011), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0x01e0), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0x0220), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0xfc00), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8Bx_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_R8G8Bx_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x7f, 0x00), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8Bx_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x81, 0x00), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8Bx_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x7f), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8Bx_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x81), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+
+ /*
+ * Depth-stencil formats
+ */
+
+ {PIPE_FORMAT_S8_UINT, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_S8_UINT, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(0.0, 255.0, 0.0, 0.0)},
+
+ {PIPE_FORMAT_Z16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+
+ {PIPE_FORMAT_Z32_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z32_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+
+ {PIPE_FORMAT_Z32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0x3f800000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+
+ {PIPE_FORMAT_Z24_UNORM_S8_UINT, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z24_UNORM_S8_UINT, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ffffff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z24_UNORM_S8_UINT, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 255.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z24_UNORM_S8_UINT, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 255.0, 0.0, 0.0)},
+
+ {PIPE_FORMAT_S8_UINT_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_S8_UINT_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffff00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_S8_UINT_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 255.0, 0.0, 0.0)},
+ {PIPE_FORMAT_S8_UINT_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 255.0, 0.0, 0.0)},
+
+ {PIPE_FORMAT_Z24X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z24X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00ffffff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+
+ {PIPE_FORMAT_X8Z24_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_X8Z24_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0xffffff00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+
+ {PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, PACKED_2x32(0xffffffff, 0x000000ff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, PACKED_2x32(0xffffffff, 0x000000ff), PACKED_2x32(0x3f800000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, PACKED_2x32(0xffffffff, 0x000000ff), PACKED_2x32(0x00000000, 0x000000ff), UNPACKED_1x1( 0.0, 255.0, 0.0, 0.0)},
+
+ /*
+ * YUV formats
+ */
+
+ {PIPE_FORMAT_R8G8_B8G8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_B8G8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0x00, 0x00, 0x00), UNPACKED_2x1(1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_B8G8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0xff, 0x00, 0x00), UNPACKED_2x1(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_B8G8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0xff, 0x00), UNPACKED_2x1(0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_R8G8_B8G8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0xff), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_B8G8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0xff, 0xff, 0xff), UNPACKED_2x1(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_G8R8_G8B8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_G8R8_G8B8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0x00, 0x00, 0x00), UNPACKED_2x1(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_G8R8_G8B8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0xff, 0x00, 0x00), UNPACKED_2x1(1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_G8R8_G8B8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0xff, 0x00), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_G8R8_G8B8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0xff), UNPACKED_2x1(0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_G8R8_G8B8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0xff, 0xff, 0xff), UNPACKED_2x1(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)},
+
+ /*
+ * TODO: Exercise the UV channels as well.
+ */
+ {PIPE_FORMAT_UYVY, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x80, 0x10, 0x80, 0x10), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_UYVY, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x80, 0xeb, 0x80, 0x10), UNPACKED_2x1(1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_UYVY, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x80, 0x10, 0x80, 0xeb), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_YUYV, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x10, 0x80, 0x10, 0x80), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_YUYV, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xeb, 0x80, 0x10, 0x80), UNPACKED_2x1(1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_YUYV, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x10, 0x80, 0xeb, 0x80), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0)},
+
+ /*
+ * Compressed formats
+ */
+
+ {
+ PIPE_FORMAT_DXT1_RGB,
+ PACKED_8x8(0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ PACKED_8x8(0xf2, 0xd7, 0xb0, 0x20, 0xae, 0x2c, 0x6f, 0x97),
+ {
+ {
+ {0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0},
+ {0x5d/255.0, 0x62/255.0, 0x89/255.0, 0xff/255.0},
+ {0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0},
+ {0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0}
+ },
+ {
+ {0xd6/255.0, 0xff/255.0, 0x94/255.0, 0xff/255.0},
+ {0x5d/255.0, 0x62/255.0, 0x89/255.0, 0xff/255.0},
+ {0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0},
+ {0xd6/255.0, 0xff/255.0, 0x94/255.0, 0xff/255.0}
+ },
+ {
+ {0x5d/255.0, 0x62/255.0, 0x89/255.0, 0xff/255.0},
+ {0x5d/255.0, 0x62/255.0, 0x89/255.0, 0xff/255.0},
+ {0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0},
+ {0x21/255.0, 0x14/255.0, 0x84/255.0, 0xff/255.0}
+ },
+ {
+ {0x5d/255.0, 0x62/255.0, 0x89/255.0, 0xff/255.0},
+ {0x21/255.0, 0x14/255.0, 0x84/255.0, 0xff/255.0},
+ {0x21/255.0, 0x14/255.0, 0x84/255.0, 0xff/255.0},
+ {0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0}
+ }
+ }
+ },
+ {
+ PIPE_FORMAT_DXT1_RGBA,
+ PACKED_8x8(0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ PACKED_8x8(0xff, 0x2f, 0xa4, 0x72, 0xeb, 0xb2, 0xbd, 0xbe),
+ {
+ {
+ {0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0},
+ {0x4e/255.0, 0xaa/255.0, 0x90/255.0, 0xff/255.0},
+ {0x4e/255.0, 0xaa/255.0, 0x90/255.0, 0xff/255.0},
+ {0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0}
+ },
+ {
+ {0x4e/255.0, 0xaa/255.0, 0x90/255.0, 0xff/255.0},
+ {0x29/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0},
+ {0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0},
+ {0x4e/255.0, 0xaa/255.0, 0x90/255.0, 0xff/255.0}
+ },
+ {
+ {0x73/255.0, 0x55/255.0, 0x21/255.0, 0xff/255.0},
+ {0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0},
+ {0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0},
+ {0x4e/255.0, 0xaa/255.0, 0x90/255.0, 0xff/255.0}
+ },
+ {
+ {0x4e/255.0, 0xaa/255.0, 0x90/255.0, 0xff/255.0},
+ {0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0},
+ {0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0},
+ {0x4e/255.0, 0xaa/255.0, 0x90/255.0, 0xff/255.0}
+ }
+ }
+ },
+ {
+ PIPE_FORMAT_DXT3_RGBA,
+ {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
+ {0xe7, 0x4a, 0x8f, 0x96, 0x5b, 0xc1, 0x1c, 0x84, 0xf6, 0x8f, 0xab, 0x32, 0x2a, 0x9a, 0x95, 0x5a},
+ {
+ {
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x77/255.0},
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xee/255.0},
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xaa/255.0},
+ {0x8c/255.0, 0xff/255.0, 0xb5/255.0, 0x44/255.0}
+ },
+ {
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xff/255.0},
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x88/255.0},
+ {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x66/255.0},
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x99/255.0}
+ },
+ {
+ {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0xbb/255.0},
+ {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x55/255.0},
+ {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x11/255.0},
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xcc/255.0}
+ },
+ {
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xcc/255.0},
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x11/255.0},
+ {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x44/255.0},
+ {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x88/255.0}
+ }
+ }
+ },
+ {
+ PIPE_FORMAT_DXT5_RGBA,
+ {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
+ {0xf8, 0x11, 0xc5, 0x0c, 0x9a, 0x73, 0xb4, 0x9c, 0xf6, 0x8f, 0xab, 0x32, 0x2a, 0x9a, 0x95, 0x5a},
+ {
+ {
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x74/255.0},
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xf8/255.0},
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xb6/255.0},
+ {0x8c/255.0, 0xff/255.0, 0xb5/255.0, 0x53/255.0}
+ },
+ {
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xf8/255.0},
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x95/255.0},
+ {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x53/255.0},
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x95/255.0}
+ },
+ {
+ {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0xb6/255.0},
+ {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x53/255.0},
+ {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x11/255.0},
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xd7/255.0}
+ },
+ {
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xb6/255.0},
+ {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x11/255.0},
+ {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x32/255.0},
+ {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x95/255.0}
+ }
+ }
+ },
+
+
+ /*
+ * Standard 8-bit integer formats
+ */
+
+ {PIPE_FORMAT_R8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8_UNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_UNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0xff, 0x00), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_UNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0xff), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_UNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0xff, 0xff), UNPACKED_1x1(1.0, 1.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8B8_UNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_UNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0x00, 0x00), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_UNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0xff, 0x00), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_UNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0xff), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_UNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0xff, 0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0x00, 0x00, 0x00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0xff, 0x00, 0x00), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0xff, 0x00), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0xff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0xff, 0xff, 0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_R8_USCALED, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8_USCALED, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(255.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8_USCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_USCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0xff, 0x00), UNPACKED_1x1(255.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_USCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0xff), UNPACKED_1x1( 0.0, 255.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_USCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0xff, 0xff), UNPACKED_1x1(255.0, 255.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8B8_USCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_USCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0x00, 0x00), UNPACKED_1x1(255.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_USCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0xff, 0x00), UNPACKED_1x1( 0.0, 255.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_USCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0xff), UNPACKED_1x1( 0.0, 0.0, 255.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_USCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0xff, 0xff), UNPACKED_1x1(255.0, 255.0, 255.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0x00, 0x00, 0x00), UNPACKED_1x1(255.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0xff, 0x00, 0x00), UNPACKED_1x1( 0.0, 255.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0xff, 0x00), UNPACKED_1x1( 0.0, 0.0, 255.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0xff), UNPACKED_1x1( 0.0, 0.0, 0.0, 255.0)},
+ {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0xff, 0xff, 0xff), UNPACKED_1x1(255.0, 255.0, 255.0, 255.0)},
+
+ {PIPE_FORMAT_R8_SNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8_SNORM, PACKED_1x8(0xff), PACKED_1x8(0x7f), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8_SNORM, PACKED_1x8(0xff), PACKED_1x8(0x81), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x7f, 0x00), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x81, 0x00), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x7f), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x81), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x7f, 0x00, 0x00), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x81, 0x00, 0x00), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x7f, 0x00), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x81, 0x00), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x7f), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x81), UNPACKED_1x1( 0.0, 0.0, -1.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x7f, 0x00, 0x00, 0x00), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x81, 0x00, 0x00, 0x00), UNPACKED_1x1(-1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x7f, 0x00, 0x00), UNPACKED_1x1( 0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x81, 0x00, 0x00), UNPACKED_1x1( 0.0, -1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x7f, 0x00), UNPACKED_1x1( 0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x81, 0x00), UNPACKED_1x1( 0.0, 0.0, -1.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x7f), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x81), UNPACKED_1x1( 0.0, 0.0, 0.0, -1.0)},
+
+ {PIPE_FORMAT_R8_SSCALED, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8_SSCALED, PACKED_1x8(0xff), PACKED_1x8(0x7f), UNPACKED_1x1( 127.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8_SSCALED, PACKED_1x8(0xff), PACKED_1x8(0x80), UNPACKED_1x1(-128.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8_SSCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_SSCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x7f, 0x00), UNPACKED_1x1( 127.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_SSCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x80, 0x00), UNPACKED_1x1(-128.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_SSCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x7f), UNPACKED_1x1( 0.0, 127.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8_SSCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x80), UNPACKED_1x1( 0.0, -128.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x7f, 0x00, 0x00), UNPACKED_1x1( 127.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x80, 0x00, 0x00), UNPACKED_1x1(-128.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x7f, 0x00), UNPACKED_1x1( 0.0, 127.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x80, 0x00), UNPACKED_1x1( 0.0, -128.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x7f), UNPACKED_1x1( 0.0, 0.0, 127.0, 1.0)},
+ {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x80), UNPACKED_1x1( 0.0, 0.0, -128.0, 1.0)},
+
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x7f, 0x00, 0x00, 0x00), UNPACKED_1x1( 127.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x80, 0x00, 0x00, 0x00), UNPACKED_1x1(-128.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x7f, 0x00, 0x00), UNPACKED_1x1( 0.0, 127.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x80, 0x00, 0x00), UNPACKED_1x1( 0.0, -128.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x7f, 0x00), UNPACKED_1x1( 0.0, 0.0, 127.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x80, 0x00), UNPACKED_1x1( 0.0, 0.0, -128.0, 0.0)},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x7f), UNPACKED_1x1( 0.0, 0.0, 0.0, 127.0)},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x80), UNPACKED_1x1( 0.0, 0.0, 0.0, -128.0)},
+
+ /*
+ * Standard 16-bit integer formats
+ */
+
+ {PIPE_FORMAT_R16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R16G16_UNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_UNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0xffff, 0x0000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_UNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0xffff), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_UNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0xffff, 0xffff), UNPACKED_1x1(1.0, 1.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R16G16B16_UNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_UNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0xffff, 0x0000, 0x0000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_UNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0xffff, 0x0000), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_UNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0xffff), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_UNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0xffff, 0xffff, 0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0xffff, 0x0000, 0x0000, 0x0000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0xffff, 0x0000, 0x0000), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0xffff, 0x0000), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0xffff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_R16_USCALED, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16_USCALED, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(65535.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R16G16_USCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_USCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0xffff, 0x0000), UNPACKED_1x1(65535.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_USCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0xffff), UNPACKED_1x1( 0.0, 65535.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_USCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0xffff, 0xffff), UNPACKED_1x1(65535.0, 65535.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R16G16B16_USCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_USCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0xffff, 0x0000, 0x0000), UNPACKED_1x1(65535.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_USCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0xffff, 0x0000), UNPACKED_1x1( 0.0, 65535.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_USCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0xffff), UNPACKED_1x1( 0.0, 0.0, 65535.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_USCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0xffff, 0xffff, 0xffff), UNPACKED_1x1(65535.0, 65535.0, 65535.0, 1.0)},
+
+ {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0xffff, 0x0000, 0x0000, 0x0000), UNPACKED_1x1(65535.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0xffff, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 65535.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0xffff, 0x0000), UNPACKED_1x1( 0.0, 0.0, 65535.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0xffff), UNPACKED_1x1( 0.0, 0.0, 0.0, 65535.0)},
+ {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), UNPACKED_1x1(65535.0, 65535.0, 65535.0, 65535.0)},
+
+ {PIPE_FORMAT_R16_SNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16_SNORM, PACKED_1x16(0xffff), PACKED_1x16(0x7fff), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16_SNORM, PACKED_1x16(0xffff), PACKED_1x16(0x8001), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R16G16_SNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_SNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x7fff, 0x0000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_SNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x8001, 0x0000), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_SNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x7fff), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_SNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x8001), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x7fff, 0x0000, 0x0000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x8001, 0x0000, 0x0000), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x7fff, 0x0000), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x8001, 0x0000), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x7fff), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x8001), UNPACKED_1x1( 0.0, 0.0, -1.0, 1.0)},
+
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x7fff, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x8001, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( -1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x7fff, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x8001, 0x0000, 0x0000), UNPACKED_1x1( 0.0, -1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x7fff, 0x0000), UNPACKED_1x1( 0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x8001, 0x0000), UNPACKED_1x1( 0.0, 0.0, -1.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x7fff), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x8001), UNPACKED_1x1( 0.0, 0.0, 0.0, -1.0)},
+
+ {PIPE_FORMAT_R16_SSCALED, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16_SSCALED, PACKED_1x16(0xffff), PACKED_1x16(0x7fff), UNPACKED_1x1( 32767.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16_SSCALED, PACKED_1x16(0xffff), PACKED_1x16(0x8000), UNPACKED_1x1(-32768.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R16G16_SSCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_SSCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x7fff, 0x0000), UNPACKED_1x1( 32767.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_SSCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x8000, 0x0000), UNPACKED_1x1(-32768.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_SSCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x7fff), UNPACKED_1x1( 0.0, 32767.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_SSCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x8000), UNPACKED_1x1( 0.0, -32768.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x7fff, 0x0000, 0x0000), UNPACKED_1x1( 32767.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x8000, 0x0000, 0x0000), UNPACKED_1x1(-32768.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x7fff, 0x0000), UNPACKED_1x1( 0.0, 32767.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x8000, 0x0000), UNPACKED_1x1( 0.0, -32768.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x7fff), UNPACKED_1x1( 0.0, 0.0, 32767.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x8000), UNPACKED_1x1( 0.0, 0.0, -32768.0, 1.0)},
+
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x7fff, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( 32767.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x8000, 0x0000, 0x0000, 0x0000), UNPACKED_1x1(-32768.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x7fff, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 32767.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x8000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, -32768.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x7fff, 0x0000), UNPACKED_1x1( 0.0, 0.0, 32767.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x8000, 0x0000), UNPACKED_1x1( 0.0, 0.0, -32768.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x7fff), UNPACKED_1x1( 0.0, 0.0, 0.0, 32767.0)},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x8000), UNPACKED_1x1( 0.0, 0.0, 0.0, -32768.0)},
+
+ /*
+ * Standard 32-bit integer formats
+ *
+ * NOTE: We can't accurately represent integers larger than +/-0x1000000
+ * with single precision floats, so that's as far as we test.
+ */
+
+ {PIPE_FORMAT_R32_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32_UNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_UNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0xffffffff, 0x00000000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_UNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0xffffffff), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_UNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0xffffffff, 0xffffffff), UNPACKED_1x1(1.0, 1.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32B32_UNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_UNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0xffffffff, 0x00000000, 0x00000000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_UNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0xffffffff, 0x00000000), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_UNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0xffffffff), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_UNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0xffffffff, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0xffffffff, 0x00000000, 0x00000000), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0xffffffff, 0x00000000), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0xffffffff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_R32_USCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32_USCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0x01000000), UNPACKED_1x1(16777216.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32_USCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_USCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x01000000, 0x00000000), UNPACKED_1x1(16777216.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_USCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x01000000), UNPACKED_1x1( 0.0, 16777216.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_USCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x01000000, 0x01000000), UNPACKED_1x1(16777216.0, 16777216.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32B32_USCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_USCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x01000000, 0x00000000, 0x00000000), UNPACKED_1x1(16777216.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_USCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x01000000, 0x00000000), UNPACKED_1x1( 0.0, 16777216.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_USCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x01000000), UNPACKED_1x1( 0.0, 0.0, 16777216.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_USCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x01000000, 0x01000000, 0x01000000), UNPACKED_1x1(16777216.0, 16777216.0, 16777216.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x01000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1(16777216.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x01000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 16777216.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x01000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 16777216.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x01000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 16777216.0)},
+ {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x01000000, 0x01000000, 0x01000000, 0x01000000), UNPACKED_1x1(16777216.0, 16777216.0, 16777216.0, 16777216.0)},
+
+ {PIPE_FORMAT_R32_SNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32_SNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x7fffffff), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32_SNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x80000001), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32_SNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_SNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x7fffffff, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_SNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x80000001, 0x00000000), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_SNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x7fffffff), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_SNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x80000001), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x7fffffff, 0x00000000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x80000001, 0x00000000, 0x00000000), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x7fffffff, 0x00000000), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x80000001, 0x00000000), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x7fffffff), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x80000001), UNPACKED_1x1( 0.0, 0.0, -1.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x7fffffff, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x80000001, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( -1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x7fffffff, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x80000001, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, -1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x7fffffff, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x80000001, 0x00000000), UNPACKED_1x1( 0.0, 0.0, -1.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x7fffffff), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x80000001), UNPACKED_1x1( 0.0, 0.0, 0.0, -1.0)},
+
+ {PIPE_FORMAT_R32_SSCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32_SSCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0x01000000), UNPACKED_1x1( 16777216.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32_SSCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(-16777216.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32_SSCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_SSCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x01000000, 0x00000000), UNPACKED_1x1( 16777216.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_SSCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0xff000000, 0x00000000), UNPACKED_1x1(-16777216.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_SSCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x01000000), UNPACKED_1x1( 0.0, 16777216.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_SSCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0xff000000), UNPACKED_1x1( 0.0, -16777216.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x01000000, 0x00000000, 0x00000000), UNPACKED_1x1( 16777216.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0xff000000, 0x00000000, 0x00000000), UNPACKED_1x1(-16777216.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x01000000, 0x00000000), UNPACKED_1x1( 0.0, 16777216.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0xff000000, 0x00000000), UNPACKED_1x1( 0.0, -16777216.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x01000000), UNPACKED_1x1( 0.0, 0.0, 16777216.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0xff000000), UNPACKED_1x1( 0.0, 0.0, -16777216.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x01000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 16777216.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0xff000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1(-16777216.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x01000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 16777216.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0xff000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, -16777216.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x01000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 16777216.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0xff000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, -16777216.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x01000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 16777216.0)},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0xff000000), UNPACKED_1x1( 0.0, 0.0, 0.0, -16777216.0)},
+
+ /*
+ * Standard 32-bit float formats
+ */
+
+ {PIPE_FORMAT_R32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0x3f800000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0xbf800000), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x3f800000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0xbf800000, 0x00000000), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x3f800000), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0xbf800000), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x3f800000, 0x3f800000), UNPACKED_1x1( 1.0, 1.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x3f800000, 0x00000000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0xbf800000, 0x00000000, 0x00000000), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x3f800000, 0x00000000), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0xbf800000, 0x00000000), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x3f800000), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0xbf800000), UNPACKED_1x1( 0.0, 0.0, -1.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x3f800000, 0x3f800000, 0x3f800000), UNPACKED_1x1( 1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x3f800000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0xbf800000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1(-1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x3f800000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0xbf800000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, -1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x3f800000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0xbf800000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, -1.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x3f800000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0xbf800000), UNPACKED_1x1( 0.0, 0.0, 0.0, -1.0)},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000), UNPACKED_1x1( 1.0, 1.0, 1.0, 1.0)},
+
+ /*
+ * Half float formats
+ */
+
+ /* Minimum positive normal */
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x0400), UNPACKED_1x1( 6.10352E-5, 0.0, 0.0, 1.0)},
+
+ /* XXX: Now that we disable denormals this test cases fails, except on
+ * IvyBridge processors which have intrinsics dedicated to half-float
+ * packing/unpacking. */
+#if 0
+ /* Max denormal */
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x03FF), UNPACKED_1x1( 6.09756E-5, 0.0, 0.0, 1.0)},
+#endif
+
+ /* Minimum positive denormal */
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x0001), UNPACKED_1x1( 5.96046E-8, 0.0, 0.0, 1.0)},
+
+ /* Min representable value */
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0xfbff), UNPACKED_1x1( -65504.0, 0.0, 0.0, 1.0)},
+
+ /* Max representable value */
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x7bff), UNPACKED_1x1( 65504.0, 0.0, 0.0, 1.0)},
+
+#if !defined(PIPE_CC_MSVC)
+
+ /* NaNs */
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x7c01), UNPACKED_1x1( NAN, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0xfc01), UNPACKED_1x1( -NAN, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x7fff), UNPACKED_1x1( NAN, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1( -NAN, 0.0, 0.0, 1.0)},
+
+ /* Inf */
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x7c00), UNPACKED_1x1( INFINITY, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0xfc00), UNPACKED_1x1( -INFINITY, 0.0, 0.0, 1.0)},
+
+#endif
+
+ /* Zero, ignore sign */
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0x7fff), PACKED_1x16(0x8000), UNPACKED_1x1( -0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0x7fff), PACKED_1x16(0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x3c00), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0xbc00), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R16G16_FLOAT, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_FLOAT, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x3c00, 0x0000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_FLOAT, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0xbc00, 0x0000), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_FLOAT, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x3c00), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_FLOAT, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0xbc00), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16_FLOAT, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x3c00, 0x3c00), UNPACKED_1x1( 1.0, 1.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x3c00, 0x0000, 0x0000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0xbc00, 0x0000, 0x0000), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x3c00, 0x0000), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0xbc00, 0x0000), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x3c00), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0xbc00), UNPACKED_1x1( 0.0, 0.0, -1.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x3c00, 0x3c00, 0x3c00), UNPACKED_1x1( 1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x3c00, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0xbc00, 0x0000, 0x0000, 0x0000), UNPACKED_1x1(-1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x3c00, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0xbc00, 0x0000, 0x0000), UNPACKED_1x1( 0.0, -1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x3c00, 0x0000), UNPACKED_1x1( 0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0xbc00, 0x0000), UNPACKED_1x1( 0.0, 0.0, -1.0, 0.0)},
+ {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x3c00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0xbc00), UNPACKED_1x1( 0.0, 0.0, 0.0, -1.0)},
+ {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x3c00, 0x3c00, 0x3c00, 0x3c00), UNPACKED_1x1( 1.0, 1.0, 1.0, 1.0)},
+
+ /*
+ * 32-bit fixed point formats
+ */
+
+ {PIPE_FORMAT_R32_FIXED, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32_FIXED, PACKED_1x32(0xffffffff), PACKED_1x32(0x00010000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32_FIXED, PACKED_1x32(0xffffffff), PACKED_1x32(0xffff0000), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32_FIXED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_FIXED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00010000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_FIXED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0xffff0000, 0x00000000), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_FIXED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00010000), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_FIXED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0xffff0000), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32_FIXED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00010000, 0x00010000), UNPACKED_1x1( 1.0, 1.0, 0.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00010000, 0x00000000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0xffff0000, 0x00000000, 0x00000000), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00010000, 0x00000000), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0xffff0000, 0x00000000), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00010000), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0xffff0000), UNPACKED_1x1( 0.0, 0.0, -1.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00010000, 0x00010000, 0x00010000), UNPACKED_1x1( 1.0, 1.0, 1.0, 1.0)},
+
+ {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00010000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0xffff0000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1(-1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00010000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0xffff0000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, -1.0, 0.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00010000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 1.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0xffff0000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, -1.0, 0.0)},
+ {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00010000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0xffff0000), UNPACKED_1x1( 0.0, 0.0, 0.0, -1.0)},
+ {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00010000, 0x00010000, 0x00010000, 0x00010000), UNPACKED_1x1( 1.0, 1.0, 1.0, 1.0)},
+
+ /*
+ * D3D9 specific vertex formats
+ */
+
+ {PIPE_FORMAT_R10G10B10X2_USCALED, PACKED_1x32(0x3fffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R10G10B10X2_USCALED, PACKED_1x32(0x3fffffff), PACKED_1x32(0x000003ff), UNPACKED_1x1(1023.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R10G10B10X2_USCALED, PACKED_1x32(0x3fffffff), PACKED_1x32(0x000ffc00), UNPACKED_1x1( 0.0, 1023.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R10G10B10X2_USCALED, PACKED_1x32(0x3fffffff), PACKED_1x32(0x3ff00000), UNPACKED_1x1( 0.0, 0.0, 1023.0, 1.0)},
+ {PIPE_FORMAT_R10G10B10X2_USCALED, PACKED_1x32(0x3fffffff), PACKED_1x32(0x3fffffff), UNPACKED_1x1(1023.0, 1023.0, 1023.0, 1.0)},
+
+ {PIPE_FORMAT_R10G10B10X2_SNORM, PACKED_1x32(0x3fffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R10G10B10X2_SNORM, PACKED_1x32(0x3fffffff), PACKED_1x32(0x000001ff), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R10G10B10X2_SNORM, PACKED_1x32(0x3fffffff), PACKED_1x32(0x00000201), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R10G10B10X2_SNORM, PACKED_1x32(0x3fffffff), PACKED_1x32(0x0007fc00), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R10G10B10X2_SNORM, PACKED_1x32(0x3fffffff), PACKED_1x32(0x00080400), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R10G10B10X2_SNORM, PACKED_1x32(0x3fffffff), PACKED_1x32(0x1ff00000), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)},
+ {PIPE_FORMAT_R10G10B10X2_SNORM, PACKED_1x32(0x3fffffff), PACKED_1x32(0x20100000), UNPACKED_1x1( 0.0, 0.0, -1.0, 1.0)},
+
+ /*
+ * Special formats that not fit anywhere else
+ */
+
+};
+
+
+const unsigned util_format_nr_test_cases = Elements(util_format_test_cases);
diff --git a/src/minigallium/auxiliary/util/u_format_tests.h b/src/minigallium/auxiliary/util/u_format_tests.h
new file mode 100644
index 0000000..f59563f
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_tests.h
@@ -0,0 +1,71 @@
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+
+#ifndef U_FORMAT_TESTS_H_
+#define U_FORMAT_TESTS_H_
+
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_format.h"
+
+
+#define UTIL_FORMAT_MAX_PACKED_BYTES 16
+#define UTIL_FORMAT_MAX_UNPACKED_WIDTH 4
+#define UTIL_FORMAT_MAX_UNPACKED_HEIGHT 4
+
+
+/**
+ * A (packed, unpacked) color pair.
+ */
+struct util_format_test_case
+{
+ enum pipe_format format;
+
+ /**
+ * Mask of the bits that actually meaningful data. Used to mask out the
+ * "X" channels.
+ */
+ uint8_t mask[UTIL_FORMAT_MAX_PACKED_BYTES];
+
+ uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES];
+
+ /**
+ * RGBA.
+ */
+ double unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH][4];
+};
+
+
+extern const struct util_format_test_case
+util_format_test_cases[];
+
+
+extern const unsigned util_format_nr_test_cases;
+
+
+#endif /* U_FORMAT_TESTS_H_ */
diff --git a/src/minigallium/auxiliary/util/u_format_yuv.c b/src/minigallium/auxiliary/util/u_format_yuv.c
new file mode 100644
index 0000000..891d99c
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_yuv.c
@@ -0,0 +1,1193 @@
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+
+/**
+ * @file
+ * YUV and RGB subsampled formats conversion.
+ *
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+
+#include "util/u_debug.h"
+#include "util/u_format_yuv.h"
+
+
+void
+util_format_r8g8_b8g8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ uint32_t value;
+ float r, g0, g1, b;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ value = *src++;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ r = ubyte_to_float((value >> 0) & 0xff);
+ g0 = ubyte_to_float((value >> 8) & 0xff);
+ b = ubyte_to_float((value >> 16) & 0xff);
+ g1 = ubyte_to_float((value >> 24) & 0xff);
+
+ dst[0] = r; /* r */
+ dst[1] = g0; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 1.0f; /* a */
+ dst += 4;
+
+ dst[0] = r; /* r */
+ dst[1] = g1; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 1.0f; /* a */
+ dst += 4;
+ }
+
+ if (x < width) {
+ value = *src;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ r = ubyte_to_float((value >> 0) & 0xff);
+ g0 = ubyte_to_float((value >> 8) & 0xff);
+ b = ubyte_to_float((value >> 16) & 0xff);
+ g1 = ubyte_to_float((value >> 24) & 0xff);
+
+ dst[0] = r; /* r */
+ dst[1] = g0; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 1.0f; /* a */
+ }
+
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+
+void
+util_format_r8g8_b8g8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ uint32_t value;
+ uint8_t r, g0, g1, b;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ value = *src++;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ r = (value >> 0) & 0xff;
+ g0 = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ g1 = (value >> 24) & 0xff;
+
+ dst[0] = r; /* r */
+ dst[1] = g0; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 0xff; /* a */
+ dst += 4;
+
+ dst[0] = r; /* r */
+ dst[1] = g1; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 0xff; /* a */
+ dst += 4;
+ }
+
+ if (x < width) {
+ value = *src;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ r = (value >> 0) & 0xff;
+ g0 = (value >> 8) & 0xff;
+ b = (value >> 16) & 0xff;
+ g1 = (value >> 24) & 0xff;
+
+ dst[0] = r; /* r */
+ dst[1] = g0; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 0xff; /* a */
+ }
+
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+
+void
+util_format_r8g8_b8g8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ float r, g0, g1, b;
+ uint32_t value;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ r = 0.5f*(src[0] + src[4]);
+ g0 = src[1];
+ g1 = src[5];
+ b = 0.5f*(src[2] + src[6]);
+
+ value = float_to_ubyte(r);
+ value |= float_to_ubyte(g0) << 8;
+ value |= float_to_ubyte(b) << 16;
+ value |= float_to_ubyte(g1) << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst++ = value;
+
+ src += 8;
+ }
+
+ if (x < width) {
+ r = src[0];
+ g0 = src[1];
+ g1 = 0;
+ b = src[2];
+
+ value = float_to_ubyte(r);
+ value |= float_to_ubyte(g0) << 8;
+ value |= float_to_ubyte(b) << 16;
+ value |= float_to_ubyte(g1) << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst = value;
+ }
+
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+
+void
+util_format_r8g8_b8g8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ uint32_t r, g0, g1, b;
+ uint32_t value;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ r = (src[0] + src[4] + 1) >> 1;
+ g0 = src[1];
+ g1 = src[5];
+ b = (src[2] + src[6] + 1) >> 1;
+
+ value = r;
+ value |= g0 << 8;
+ value |= b << 16;
+ value |= g1 << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst++ = value;
+
+ src += 8;
+ }
+
+ if (x < width) {
+ r = src[0];
+ g0 = src[1];
+ g1 = 0;
+ b = src[2];
+
+ value = r;
+ value |= g0 << 8;
+ value |= b << 16;
+ value |= g1 << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst = value;
+ }
+
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+
+void
+util_format_r8g8_b8g8_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j)
+{
+ assert(i < 2);
+ assert(j < 1);
+
+ dst[0] = ubyte_to_float(src[0]); /* r */
+ dst[1] = ubyte_to_float(src[1 + 2*i]); /* g */
+ dst[2] = ubyte_to_float(src[2]); /* b */
+ dst[3] = 1.0f; /* a */
+}
+
+
+void
+util_format_g8r8_g8b8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ uint32_t value;
+ float r, g0, g1, b;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ value = *src++;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ g0 = ubyte_to_float((value >> 0) & 0xff);
+ r = ubyte_to_float((value >> 8) & 0xff);
+ g1 = ubyte_to_float((value >> 16) & 0xff);
+ b = ubyte_to_float((value >> 24) & 0xff);
+
+ dst[0] = r; /* r */
+ dst[1] = g0; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 1.0f; /* a */
+ dst += 4;
+
+ dst[0] = r; /* r */
+ dst[1] = g1; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 1.0f; /* a */
+ dst += 4;
+ }
+
+ if (x < width) {
+ value = *src;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ g0 = ubyte_to_float((value >> 0) & 0xff);
+ r = ubyte_to_float((value >> 8) & 0xff);
+ g1 = ubyte_to_float((value >> 16) & 0xff);
+ b = ubyte_to_float((value >> 24) & 0xff);
+
+ dst[0] = r; /* r */
+ dst[1] = g0; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 1.0f; /* a */
+ }
+
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+
+void
+util_format_g8r8_g8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ uint32_t value;
+ uint8_t r, g0, g1, b;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ value = *src++;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ g0 = (value >> 0) & 0xff;
+ r = (value >> 8) & 0xff;
+ g1 = (value >> 16) & 0xff;
+ b = (value >> 24) & 0xff;
+
+ dst[0] = r; /* r */
+ dst[1] = g0; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 0xff; /* a */
+ dst += 4;
+
+ dst[0] = r; /* r */
+ dst[1] = g1; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 0xff; /* a */
+ dst += 4;
+ }
+
+ if (x < width) {
+ value = *src;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ g0 = (value >> 0) & 0xff;
+ r = (value >> 8) & 0xff;
+ g1 = (value >> 16) & 0xff;
+ b = (value >> 24) & 0xff;
+
+ dst[0] = r; /* r */
+ dst[1] = g0; /* g */
+ dst[2] = b; /* b */
+ dst[3] = 0xff; /* a */
+ }
+
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+
+void
+util_format_g8r8_g8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ float r, g0, g1, b;
+ uint32_t value;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ r = 0.5f*(src[0] + src[4]);
+ g0 = src[1];
+ g1 = src[5];
+ b = 0.5f*(src[2] + src[6]);
+
+ value = float_to_ubyte(g0);
+ value |= float_to_ubyte(r) << 8;
+ value |= float_to_ubyte(g1) << 16;
+ value |= float_to_ubyte(b) << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst++ = value;
+
+ src += 8;
+ }
+
+ if (x < width) {
+ r = src[0];
+ g0 = src[1];
+ g1 = 0;
+ b = src[2];
+
+ value = float_to_ubyte(g0);
+ value |= float_to_ubyte(r) << 8;
+ value |= float_to_ubyte(g1) << 16;
+ value |= float_to_ubyte(b) << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst = value;
+ }
+
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+
+void
+util_format_g8r8_g8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ uint32_t r, g0, g1, b;
+ uint32_t value;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ r = (src[0] + src[4] + 1) >> 1;
+ g0 = src[1];
+ g1 = src[5];
+ b = (src[2] + src[6] + 1) >> 1;
+
+ value = g0;
+ value |= r << 8;
+ value |= g1 << 16;
+ value |= b << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst++ = value;
+
+ src += 8;
+ }
+
+ if (x < width) {
+ r = src[0];
+ g0 = src[1];
+ g1 = 0;
+ b = src[2];
+
+ value = g0;
+ value |= r << 8;
+ value |= g1 << 16;
+ value |= b << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst = value;
+ }
+
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+
+void
+util_format_g8r8_g8b8_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j)
+{
+ assert(i < 2);
+ assert(j < 1);
+
+ dst[0] = ubyte_to_float(src[1]); /* r */
+ dst[1] = ubyte_to_float(src[0 + 2*i]); /* g */
+ dst[2] = ubyte_to_float(src[3]); /* b */
+ dst[3] = 1.0f; /* a */
+}
+
+
+void
+util_format_uyvy_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ uint32_t value;
+ uint8_t y0, y1, u, v;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ value = *src++;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ u = (value >> 0) & 0xff;
+ y0 = (value >> 8) & 0xff;
+ v = (value >> 16) & 0xff;
+ y1 = (value >> 24) & 0xff;
+
+ util_format_yuv_to_rgb_float(y0, u, v, &dst[0], &dst[1], &dst[2]);
+ dst[3] = 1.0f; /* a */
+ dst += 4;
+
+ util_format_yuv_to_rgb_float(y1, u, v, &dst[0], &dst[1], &dst[2]);
+ dst[3] = 1.0f; /* a */
+ dst += 4;
+ }
+
+ if (x < width) {
+ value = *src;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ u = (value >> 0) & 0xff;
+ y0 = (value >> 8) & 0xff;
+ v = (value >> 16) & 0xff;
+ y1 = (value >> 24) & 0xff;
+
+ util_format_yuv_to_rgb_float(y0, u, v, &dst[0], &dst[1], &dst[2]);
+ dst[3] = 1.0f; /* a */
+ }
+
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+
+void
+util_format_uyvy_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ uint32_t value;
+ uint8_t y0, y1, u, v;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ value = *src++;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ u = (value >> 0) & 0xff;
+ y0 = (value >> 8) & 0xff;
+ v = (value >> 16) & 0xff;
+ y1 = (value >> 24) & 0xff;
+
+ util_format_yuv_to_rgb_8unorm(y0, u, v, &dst[0], &dst[1], &dst[2]);
+ dst[3] = 0xff; /* a */
+ dst += 4;
+
+ util_format_yuv_to_rgb_8unorm(y1, u, v, &dst[0], &dst[1], &dst[2]);
+ dst[3] = 0xff; /* a */
+ dst += 4;
+ }
+
+ if (x < width) {
+ value = *src;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ u = (value >> 0) & 0xff;
+ y0 = (value >> 8) & 0xff;
+ v = (value >> 16) & 0xff;
+ y1 = (value >> 24) & 0xff;
+
+ util_format_yuv_to_rgb_8unorm(y0, u, v, &dst[0], &dst[1], &dst[2]);
+ dst[3] = 0xff; /* a */
+ }
+
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+
+void
+util_format_uyvy_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ uint8_t y0, y1, u, v;
+ uint32_t value;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ uint8_t y0, y1, u0, u1, v0, v1, u, v;
+
+ util_format_rgb_float_to_yuv(src[0], src[1], src[2],
+ &y0, &u0, &v0);
+ util_format_rgb_float_to_yuv(src[4], src[5], src[6],
+ &y1, &u1, &v1);
+
+ u = (u0 + u1 + 1) >> 1;
+ v = (v0 + v1 + 1) >> 1;
+
+ value = u;
+ value |= y0 << 8;
+ value |= v << 16;
+ value |= y1 << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst++ = value;
+
+ src += 8;
+ }
+
+ if (x < width) {
+ util_format_rgb_float_to_yuv(src[0], src[1], src[2],
+ &y0, &u, &v);
+ y1 = 0;
+
+ value = u;
+ value |= y0 << 8;
+ value |= v << 16;
+ value |= y1 << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst = value;
+ }
+
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+
+void
+util_format_uyvy_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ uint8_t y0, y1, u, v;
+ uint32_t value;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ uint8_t y0, y1, u0, u1, v0, v1, u, v;
+
+ util_format_rgb_8unorm_to_yuv(src[0], src[1], src[2],
+ &y0, &u0, &v0);
+ util_format_rgb_8unorm_to_yuv(src[4], src[5], src[6],
+ &y1, &u1, &v1);
+
+ u = (u0 + u1 + 1) >> 1;
+ v = (v0 + v1 + 1) >> 1;
+
+ value = u;
+ value |= y0 << 8;
+ value |= v << 16;
+ value |= y1 << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst++ = value;
+
+ src += 8;
+ }
+
+ if (x < width) {
+ util_format_rgb_8unorm_to_yuv(src[0], src[1], src[2],
+ &y0, &u, &v);
+ y1 = 0;
+
+ value = u;
+ value |= y0 << 8;
+ value |= v << 16;
+ value |= y1 << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst = value;
+ }
+
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+
+void
+util_format_uyvy_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j)
+{
+ uint8_t y, u, v;
+
+ assert(i < 2);
+ assert(j < 1);
+
+ y = src[1 + i*2];
+ u = src[0];
+ v = src[2];
+
+ util_format_yuv_to_rgb_float(y, u, v, &dst[0], &dst[1], &dst[2]);
+
+ dst[3] = 1.0f;
+}
+
+
+void
+util_format_yuyv_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ float *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ uint32_t value;
+ uint8_t y0, y1, u, v;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ value = *src++;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ y0 = (value >> 0) & 0xff;
+ u = (value >> 8) & 0xff;
+ y1 = (value >> 16) & 0xff;
+ v = (value >> 24) & 0xff;
+
+ util_format_yuv_to_rgb_float(y0, u, v, &dst[0], &dst[1], &dst[2]);
+ dst[3] = 1.0f; /* a */
+ dst += 4;
+
+ util_format_yuv_to_rgb_float(y1, u, v, &dst[0], &dst[1], &dst[2]);
+ dst[3] = 1.0f; /* a */
+ dst += 4;
+ }
+
+ if (x < width) {
+ value = *src;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ y0 = (value >> 0) & 0xff;
+ u = (value >> 8) & 0xff;
+ y1 = (value >> 16) & 0xff;
+ v = (value >> 24) & 0xff;
+
+ util_format_yuv_to_rgb_float(y0, u, v, &dst[0], &dst[1], &dst[2]);
+ dst[3] = 1.0f; /* a */
+ }
+
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+
+void
+util_format_yuyv_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ uint8_t *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ uint32_t value;
+ uint8_t y0, y1, u, v;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ value = *src++;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ y0 = (value >> 0) & 0xff;
+ u = (value >> 8) & 0xff;
+ y1 = (value >> 16) & 0xff;
+ v = (value >> 24) & 0xff;
+
+ util_format_yuv_to_rgb_8unorm(y0, u, v, &dst[0], &dst[1], &dst[2]);
+ dst[3] = 0xff; /* a */
+ dst += 4;
+
+ util_format_yuv_to_rgb_8unorm(y1, u, v, &dst[0], &dst[1], &dst[2]);
+ dst[3] = 0xff; /* a */
+ dst += 4;
+ }
+
+ if (x < width) {
+ value = *src;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ y0 = (value >> 0) & 0xff;
+ u = (value >> 8) & 0xff;
+ y1 = (value >> 16) & 0xff;
+ v = (value >> 24) & 0xff;
+
+ util_format_yuv_to_rgb_8unorm(y0, u, v, &dst[0], &dst[1], &dst[2]);
+ dst[3] = 0xff; /* a */
+ }
+
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+
+void
+util_format_yuyv_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ const float *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ uint8_t y0, y1, u, v;
+ uint32_t value;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ uint8_t y0, y1, u0, u1, v0, v1, u, v;
+
+ util_format_rgb_float_to_yuv(src[0], src[1], src[2],
+ &y0, &u0, &v0);
+ util_format_rgb_float_to_yuv(src[4], src[5], src[6],
+ &y1, &u1, &v1);
+
+ u = (u0 + u1 + 1) >> 1;
+ v = (v0 + v1 + 1) >> 1;
+
+ value = y0;
+ value |= u << 8;
+ value |= y1 << 16;
+ value |= v << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst++ = value;
+
+ src += 8;
+ }
+
+ if (x < width) {
+ util_format_rgb_float_to_yuv(src[0], src[1], src[2],
+ &y0, &u, &v);
+ y1 = 0;
+
+ value = y0;
+ value |= u << 8;
+ value |= y1 << 16;
+ value |= v << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst = value;
+ }
+
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+
+void
+util_format_yuyv_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+
+ for (y = 0; y < height; y += 1) {
+ const uint8_t *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ uint8_t y0, y1, u, v;
+ uint32_t value;
+
+ for (x = 0; x + 1 < width; x += 2) {
+ uint8_t y0, y1, u0, u1, v0, v1, u, v;
+
+ util_format_rgb_8unorm_to_yuv(src[0], src[1], src[2],
+ &y0, &u0, &v0);
+ util_format_rgb_8unorm_to_yuv(src[4], src[5], src[6],
+ &y1, &u1, &v1);
+
+ u = (u0 + u1 + 1) >> 1;
+ v = (v0 + v1 + 1) >> 1;
+
+ value = y0;
+ value |= u << 8;
+ value |= y1 << 16;
+ value |= v << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst++ = value;
+
+ src += 8;
+ }
+
+ if (x < width) {
+ util_format_rgb_8unorm_to_yuv(src[0], src[1], src[2],
+ &y0, &u, &v);
+ y1 = 0;
+
+ value = y0;
+ value |= u << 8;
+ value |= y1 << 16;
+ value |= v << 24;
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+
+ *dst = value;
+ }
+
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+
+void
+util_format_yuyv_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j)
+{
+ uint8_t y, u, v;
+
+ assert(i < 2);
+ assert(j < 1);
+
+ y = src[0 + i*2];
+ u = src[1];
+ v = src[3];
+
+ util_format_yuv_to_rgb_float(y, u, v, &dst[0], &dst[1], &dst[2]);
+
+ dst[3] = 1.0f;
+}
+
+/* XXX: Stubbed for now */
+void
+util_format_yv12_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_yv12_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_yv12_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_yv12_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_yv12_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j) {}
+void
+util_format_yv16_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_yv16_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_yv16_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_yv16_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_yv16_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j) {}
+void
+util_format_iyuv_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_iyuv_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_iyuv_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_iyuv_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_iyuv_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j) {}
+void
+util_format_nv12_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_nv12_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_nv12_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_nv12_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_nv12_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j) {}
+void
+util_format_nv21_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_nv21_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_nv21_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_nv21_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+void
+util_format_nv21_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j) {}
+
+void
+util_format_r8g8_r8b8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
+void
+util_format_r8g8_r8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
+void
+util_format_r8g8_r8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
+void
+util_format_r8g8_r8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
+void
+util_format_r8g8_r8b8_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j) {}
+
+void
+util_format_g8r8_b8r8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
+void
+util_format_g8r8_b8r8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
+void
+util_format_g8r8_b8r8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
+void
+util_format_g8r8_b8r8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height) {}
+
+void
+util_format_g8r8_b8r8_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j) {}
diff --git a/src/minigallium/auxiliary/util/u_format_yuv.h b/src/minigallium/auxiliary/util/u_format_yuv.h
new file mode 100644
index 0000000..4ec3981
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_yuv.h
@@ -0,0 +1,364 @@
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+
+/**
+ * @file
+ * YUV colorspace conversion.
+ *
+ * @author Brian Paul <brianp@vmware.com>
+ * @author Michal Krol <michal@vmware.com>
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ *
+ * See also:
+ * - http://www.fourcc.org/fccyvrgb.php
+ * - http://msdn.microsoft.com/en-us/library/ms893078
+ * - http://en.wikipedia.org/wiki/YUV
+ */
+
+
+#ifndef U_FORMAT_YUV_H_
+#define U_FORMAT_YUV_H_
+
+
+#include "pipe/p_compiler.h"
+#include "u_math.h"
+
+
+/*
+ * TODO: Ensure we use consistent and right floating formulas, with enough
+ * precision in the coefficients.
+ */
+
+static INLINE void
+util_format_rgb_float_to_yuv(float r, float g, float b,
+ uint8_t *y, uint8_t *u, uint8_t *v)
+{
+ const float _r = CLAMP(r, 0.0f, 1.0f);
+ const float _g = CLAMP(g, 0.0f, 1.0f);
+ const float _b = CLAMP(b, 0.0f, 1.0f);
+
+ const float scale = 255.0f;
+
+ const int _y = scale * ( (0.257f * _r) + (0.504f * _g) + (0.098f * _b));
+ const int _u = scale * (-(0.148f * _r) - (0.291f * _g) + (0.439f * _b));
+ const int _v = scale * ( (0.439f * _r) - (0.368f * _g) - (0.071f * _b));
+
+ *y = _y + 16;
+ *u = _u + 128;
+ *v = _v + 128;
+}
+
+
+static INLINE void
+util_format_yuv_to_rgb_float(uint8_t y, uint8_t u, uint8_t v,
+ float *r, float *g, float *b)
+{
+ const int _y = y - 16;
+ const int _u = u - 128;
+ const int _v = v - 128;
+
+ const float y_factor = 255.0f / 219.0f;
+
+ const float scale = 1.0f / 255.0f;
+
+ *r = scale * (y_factor * _y + 1.596f * _v);
+ *g = scale * (y_factor * _y - 0.391f * _u - 0.813f * _v);
+ *b = scale * (y_factor * _y + 2.018f * _u );
+}
+
+
+static INLINE void
+util_format_rgb_8unorm_to_yuv(uint8_t r, uint8_t g, uint8_t b,
+ uint8_t *y, uint8_t *u, uint8_t *v)
+{
+ *y = (( 66 * r + 129 * g + 25 * b + 128) >> 8) + 16;
+ *u = (( -38 * r - 74 * g + 112 * b + 128) >> 8) + 128;
+ *v = (( 112 * r - 94 * g - 18 * b + 128) >> 8) + 128;
+}
+
+
+static INLINE void
+util_format_yuv_to_rgb_8unorm(uint8_t y, uint8_t u, uint8_t v,
+ uint8_t *r, uint8_t *g, uint8_t *b)
+{
+ const int _y = y - 16;
+ const int _u = u - 128;
+ const int _v = v - 128;
+
+ const int _r = (298 * _y + 409 * _v + 128) >> 8;
+ const int _g = (298 * _y - 100 * _u - 208 * _v + 128) >> 8;
+ const int _b = (298 * _y + 516 * _u + 128) >> 8;
+
+ *r = CLAMP(_r, 0, 255);
+ *g = CLAMP(_g, 0, 255);
+ *b = CLAMP(_b, 0, 255);
+}
+
+
+
+void
+util_format_uyvy_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_uyvy_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_uyvy_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_uyvy_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_uyvy_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+void
+util_format_yuyv_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_yuyv_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_yuyv_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_yuyv_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_yuyv_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+/* XXX: Stubbed for now */
+void
+util_format_yv12_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_yv12_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_yv12_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_yv12_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_yv12_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+void
+util_format_yv16_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_yv16_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_yv16_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_yv16_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_yv16_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+void
+util_format_iyuv_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_iyuv_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_iyuv_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_iyuv_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_iyuv_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+void
+util_format_nv12_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_nv12_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_nv12_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_nv12_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_nv12_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+void
+util_format_nv21_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_nv21_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_nv21_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_nv21_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_nv21_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+void
+util_format_r8g8_b8g8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r8g8_b8g8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r8g8_b8g8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r8g8_b8g8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r8g8_b8g8_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+void
+util_format_g8r8_g8b8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_g8r8_g8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_g8r8_g8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_g8r8_g8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_g8r8_g8b8_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+void
+util_format_r8g8_r8b8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r8g8_r8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r8g8_r8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r8g8_r8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_r8g8_r8b8_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+void
+util_format_g8r8_b8r8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_g8r8_b8r8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_g8r8_b8r8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_g8r8_b8r8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_g8r8_b8r8_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+#endif /* U_FORMAT_YUV_H_ */
diff --git a/src/minigallium/auxiliary/util/u_format_zs.c b/src/minigallium/auxiliary/util/u_format_zs.c
new file mode 100644
index 0000000..ed45c52
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_zs.c
@@ -0,0 +1,973 @@
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+
+#include "u_debug.h"
+#include "u_math.h"
+#include "u_format_zs.h"
+
+
+/*
+ * z32_unorm conversion functions
+ */
+
+static INLINE uint16_t
+z32_unorm_to_z16_unorm(uint32_t z)
+{
+ /* z * 0xffff / 0xffffffff */
+ return z >> 16;
+}
+
+static INLINE uint32_t
+z16_unorm_to_z32_unorm(uint16_t z)
+{
+ /* z * 0xffffffff / 0xffff */
+ return (z << 16) | z;
+}
+
+static INLINE uint32_t
+z32_unorm_to_z24_unorm(uint32_t z)
+{
+ /* z * 0xffffff / 0xffffffff */
+ return z >> 8;
+}
+
+static INLINE uint32_t
+z24_unorm_to_z32_unorm(uint32_t z)
+{
+ /* z * 0xffffffff / 0xffffff */
+ return (z << 8) | (z >> 16);
+}
+
+
+/*
+ * z32_float conversion functions
+ */
+
+static INLINE uint16_t
+z32_float_to_z16_unorm(float z)
+{
+ const float scale = 0xffff;
+ return (uint16_t)(z * scale + 0.5f);
+}
+
+static INLINE float
+z16_unorm_to_z32_float(uint16_t z)
+{
+ const float scale = 1.0 / 0xffff;
+ return (float)(z * scale);
+}
+
+static INLINE uint32_t
+z32_float_to_z24_unorm(float z)
+{
+ const double scale = 0xffffff;
+ return (uint32_t)(z * scale) & 0xffffff;
+}
+
+static INLINE float
+z24_unorm_to_z32_float(uint32_t z)
+{
+ const double scale = 1.0 / 0xffffff;
+ return (float)(z * scale);
+}
+
+static INLINE uint32_t
+z32_float_to_z32_unorm(float z)
+{
+ const double scale = 0xffffffff;
+ return (uint32_t)(z * scale);
+}
+
+static INLINE float
+z32_unorm_to_z32_float(uint32_t z)
+{
+ const double scale = 1.0 / 0xffffffff;
+ return (float)(z * scale);
+}
+
+
+void
+util_format_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned y;
+ for(y = 0; y < height; ++y) {
+ memcpy(dst_row, src_row, width);
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned y;
+ for(y = 0; y < height; ++y) {
+ memcpy(dst_row, src_row, width);
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z16_unorm_unpack_z_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ float *dst = dst_row;
+ const uint16_t *src = (const uint16_t *)src_row;
+ for(x = 0; x < width; ++x) {
+ uint16_t value = *src++;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap16(value);
+#endif
+ *dst++ = z16_unorm_to_z32_float(value);
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z16_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const float *src = src_row;
+ uint16_t *dst = (uint16_t *)dst_row;
+ for(x = 0; x < width; ++x) {
+ uint16_t value;
+ value = z32_float_to_z16_unorm(*src++);
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap16(value);
+#endif
+ *dst++ = value;
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_z16_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ uint32_t *dst = dst_row;
+ const uint16_t *src = (const uint16_t *)src_row;
+ for(x = 0; x < width; ++x) {
+ uint16_t value = *src++;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap16(value);
+#endif
+ *dst++ = z16_unorm_to_z32_unorm(value);
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z16_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint32_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const uint32_t *src = src_row;
+ uint16_t *dst = (uint16_t *)dst_row;
+ for(x = 0; x < width; ++x) {
+ uint16_t value;
+ value = z32_unorm_to_z16_unorm(*src++);
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap16(value);
+#endif
+ *dst++ = value;
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_z32_unorm_unpack_z_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ float *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *src++;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = z32_unorm_to_z32_float(value);
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z32_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const float *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value;
+ value = z32_float_to_z32_unorm(*src++);
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = value;
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_z32_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned y;
+ for(y = 0; y < height; ++y) {
+ memcpy(dst_row, src_row, width * 4);
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z32_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint32_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned y;
+ for(y = 0; y < height; ++y) {
+ memcpy(dst_row, src_row, width * 4);
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z32_float_unpack_z_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned y;
+ for(y = 0; y < height; ++y) {
+ memcpy(dst_row, src_row, width * 4);
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z32_float_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned y;
+ for(y = 0; y < height; ++y) {
+ memcpy(dst_row, src_row, width * 4);
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z32_float_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ uint32_t *dst = dst_row;
+ const float *src = (const float *)src_row;
+ for(x = 0; x < width; ++x) {
+ *dst++ = z32_float_to_z32_unorm(*src++);
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z32_float_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint32_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const uint32_t *src = src_row;
+ float *dst = (float *)dst_row;
+ for(x = 0; x < width; ++x) {
+ *dst++ = z32_unorm_to_z32_float(*src++);
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_z24_unorm_s8_uint_unpack_z_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ float *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *src++;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = z24_unorm_to_z32_float(value & 0xffffff);
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z24_unorm_s8_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const float *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *dst;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ value &= 0xff000000;
+ value |= z32_float_to_z24_unorm(*src++);
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = value;
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_z24_unorm_s8_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ uint32_t *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *src++;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = z24_unorm_to_z32_unorm(value & 0xffffff);
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z24_unorm_s8_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint32_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const uint32_t *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value= *dst;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ value &= 0xff000000;
+ value |= z32_unorm_to_z24_unorm(*src++);
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = value;
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_z24_unorm_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ uint8_t *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *src++;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = value >> 24;
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z24_unorm_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const uint8_t *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *dst;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ value &= 0x00ffffff;
+ value |= *src++ << 24;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = value;
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_s8_uint_z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ float *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *src++;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = z24_unorm_to_z32_float(value >> 8);
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_s8_uint_z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const float *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *dst;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ value &= 0x000000ff;
+ value |= z32_float_to_z24_unorm(*src++) << 8;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = value;
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_s8_uint_z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ uint32_t *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *src++;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = z24_unorm_to_z32_unorm(value >> 8);
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_s8_uint_z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint32_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const uint32_t *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *dst;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ value &= 0x000000ff;
+ value |= *src++ & 0xffffff00;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = value;
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_s8_uint_z24_unorm_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ uint8_t *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *src++;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = value & 0xff;
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_s8_uint_z24_unorm_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const uint8_t *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *dst;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ value &= 0xffffff00;
+ value |= *src++;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = value;
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_z24x8_unorm_unpack_z_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ float *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *src++;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = z24_unorm_to_z32_float(value & 0xffffff);
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z24x8_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const float *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value;
+ value = z32_float_to_z24_unorm(*src++);
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = value;
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_z24x8_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ uint32_t *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *src++;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = z24_unorm_to_z32_unorm(value & 0xffffff);
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z24x8_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint32_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const uint32_t *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value;
+ value = z32_unorm_to_z24_unorm(*src++);
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = value;
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_x8z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ float *dst = dst_row;
+ const uint32_t *src = (uint32_t *)src_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *src++;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = z24_unorm_to_z32_float(value >> 8);
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_x8z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const float *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value;
+ value = z32_float_to_z24_unorm(*src++) << 8;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = value;
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_x8z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ uint32_t *dst = dst_row;
+ const uint32_t *src = (const uint32_t *)src_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value = *src++;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = z24_unorm_to_z32_unorm(value >> 8);
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_x8z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint32_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const uint32_t *src = src_row;
+ uint32_t *dst = (uint32_t *)dst_row;
+ for(x = 0; x < width; ++x) {
+ uint32_t value;
+ value = z32_unorm_to_z24_unorm(*src++) << 8;
+#ifdef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
+ *dst++ = value;
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_z32_float_s8x24_uint_unpack_z_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ float *dst = dst_row;
+ const float *src = (const float *)src_row;
+ for(x = 0; x < width; ++x) {
+ *dst = *src;
+ src += 2;
+ dst += 1;
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z32_float_s8x24_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const float *src = src_row;
+ float *dst = (float *)dst_row;
+ for(x = 0; x < width; ++x) {
+ *dst = *src;
+ src += 1;
+ dst += 2;
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_z32_float_s8x24_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ uint32_t *dst = dst_row;
+ const float *src = (const float *)src_row;
+ for(x = 0; x < width; ++x) {
+ *dst = z32_float_to_z32_unorm(*src);
+ src += 2;
+ dst += 1;
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z32_float_s8x24_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint32_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const uint32_t *src = src_row;
+ float *dst = (float *)dst_row;
+ for(x = 0; x < width; ++x) {
+ *dst++ = z32_unorm_to_z32_float(*src++);
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+void
+util_format_z32_float_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ uint8_t *dst = dst_row;
+ const uint8_t *src = src_row + 4;
+ for(x = 0; x < width; ++x) {
+ *dst = *src;
+ src += 8;
+ dst += 1;
+ }
+ src_row += src_stride/sizeof(*src_row);
+ dst_row += dst_stride/sizeof(*dst_row);
+ }
+}
+
+void
+util_format_z32_float_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ unsigned x, y;
+ for(y = 0; y < height; ++y) {
+ const uint8_t *src = src_row;
+ uint8_t *dst = dst_row + 4;
+ for(x = 0; x < width; ++x) {
+ *dst = *src;
+ src += 1;
+ dst += 8;
+ }
+ dst_row += dst_stride/sizeof(*dst_row);
+ src_row += src_stride/sizeof(*src_row);
+ }
+}
+
+
+void
+util_format_x24s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_z24_unorm_s8_uint_unpack_s_8uint(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height);
+}
+
+void
+util_format_x24s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_z24_unorm_s8_uint_pack_s_8uint(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height);
+}
+
+void
+util_format_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_s8_uint_z24_unorm_unpack_s_8uint(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height);
+}
+
+void
+util_format_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_s8_uint_z24_unorm_pack_s_8uint(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height);
+}
+
+void
+util_format_x32_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_z32_float_s8x24_uint_unpack_s_8uint(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height);
+
+}
+
+void
+util_format_x32_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height)
+{
+ util_format_z32_float_s8x24_uint_pack_s_8uint(dst_row, dst_stride,
+ src_row, src_stride,
+ width, height);
+}
diff --git a/src/minigallium/auxiliary/util/u_format_zs.h b/src/minigallium/auxiliary/util/u_format_zs.h
new file mode 100644
index 0000000..adddfaf
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_format_zs.h
@@ -0,0 +1,212 @@
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+
+#ifndef U_FORMAT_ZS_H_
+#define U_FORMAT_ZS_H_
+
+
+#include "pipe/p_compiler.h"
+
+
+void
+util_format_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z16_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z16_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z16_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z16_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z32_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z32_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z32_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z32_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z32_float_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z32_float_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z32_float_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z32_float_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z24_unorm_s8_uint_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z24_unorm_s8_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z24_unorm_s8_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z24_unorm_s8_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z24_unorm_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z24_unorm_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_s8_uint_z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_s8_uint_z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_s8_uint_z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_s8_uint_z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_s8_uint_z24_unorm_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_s8_uint_z24_unorm_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z24x8_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z24x8_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z24x8_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z24x8_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_x8z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_x8z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_x8z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_x8z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z32_float_s8x24_uint_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z32_float_s8x24_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z32_float_s8x24_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z32_float_s8x24_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z32_float_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+
+void
+util_format_z32_float_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_x24s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_x24s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_x32_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_x32_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_sride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+#endif /* U_FORMAT_ZS_H_ */
diff --git a/src/minigallium/auxiliary/util/u_framebuffer.c b/src/minigallium/auxiliary/util/u_framebuffer.c
new file mode 100644
index 0000000..7803ec6
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_framebuffer.c
@@ -0,0 +1,148 @@
+/**************************************************************************
+ *
+ * Copyright 2009-2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Framebuffer utility functions.
+ *
+ * @author Brian Paul
+ */
+
+
+#include "pipe/p_screen.h"
+#include "pipe/p_state.h"
+#include "pipe/p_defines.h"
+#include "util/u_inlines.h"
+
+#include "util/u_memory.h"
+#include "util/u_framebuffer.h"
+
+
+/**
+ * Compare pipe_framebuffer_state objects.
+ * \return TRUE if same, FALSE if different
+ */
+boolean
+util_framebuffer_state_equal(const struct pipe_framebuffer_state *dst,
+ const struct pipe_framebuffer_state *src)
+{
+ unsigned i;
+
+ if (dst->width != src->width ||
+ dst->height != src->height)
+ return FALSE;
+
+ for (i = 0; i < Elements(src->cbufs); i++) {
+ if (dst->cbufs[i] != src->cbufs[i]) {
+ return FALSE;
+ }
+ }
+
+ if (dst->nr_cbufs != src->nr_cbufs) {
+ return FALSE;
+ }
+
+ if (dst->zsbuf != src->zsbuf) {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+/**
+ * Copy framebuffer state from src to dst, updating refcounts.
+ */
+void
+util_copy_framebuffer_state(struct pipe_framebuffer_state *dst,
+ const struct pipe_framebuffer_state *src)
+{
+ unsigned i;
+
+ dst->width = src->width;
+ dst->height = src->height;
+
+ for (i = 0; i < src->nr_cbufs; i++)
+ pipe_surface_reference(&dst->cbufs[i], src->cbufs[i]);
+
+ for (i = src->nr_cbufs; i < dst->nr_cbufs; i++)
+ pipe_surface_reference(&dst->cbufs[i], NULL);
+
+ dst->nr_cbufs = src->nr_cbufs;
+
+ pipe_surface_reference(&dst->zsbuf, src->zsbuf);
+}
+
+
+void
+util_unreference_framebuffer_state(struct pipe_framebuffer_state *fb)
+{
+ unsigned i;
+
+ for (i = 0; i < fb->nr_cbufs; i++) {
+ pipe_surface_reference(&fb->cbufs[i], NULL);
+ }
+
+ pipe_surface_reference(&fb->zsbuf, NULL);
+
+ fb->width = fb->height = 0;
+ fb->nr_cbufs = 0;
+}
+
+
+/* Where multiple sizes are allowed for framebuffer surfaces, find the
+ * minimum width and height of all bound surfaces.
+ */
+boolean
+util_framebuffer_min_size(const struct pipe_framebuffer_state *fb,
+ unsigned *width,
+ unsigned *height)
+{
+ unsigned w = ~0;
+ unsigned h = ~0;
+ unsigned i;
+
+ for (i = 0; i < fb->nr_cbufs; i++) {
+ w = MIN2(w, fb->cbufs[i]->width);
+ h = MIN2(h, fb->cbufs[i]->height);
+ }
+
+ if (fb->zsbuf) {
+ w = MIN2(w, fb->zsbuf->width);
+ h = MIN2(h, fb->zsbuf->height);
+ }
+
+ if (w == ~0) {
+ *width = 0;
+ *height = 0;
+ return FALSE;
+ }
+ else {
+ *width = w;
+ *height = h;
+ return TRUE;
+ }
+}
diff --git a/src/minigallium/auxiliary/util/u_framebuffer.h b/src/minigallium/auxiliary/util/u_framebuffer.h
new file mode 100644
index 0000000..a890662
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_framebuffer.h
@@ -0,0 +1,62 @@
+/**************************************************************************
+ *
+ * Copyright 2009-2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#ifndef U_FRAMEBUFFER_H
+#define U_FRAMEBUFFER_H
+
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_state.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern boolean
+util_framebuffer_state_equal(const struct pipe_framebuffer_state *dst,
+ const struct pipe_framebuffer_state *src);
+
+extern void
+util_copy_framebuffer_state(struct pipe_framebuffer_state *dst,
+ const struct pipe_framebuffer_state *src);
+
+
+extern void
+util_unreference_framebuffer_state(struct pipe_framebuffer_state *fb);
+
+
+extern boolean
+util_framebuffer_min_size(const struct pipe_framebuffer_state *fb,
+ unsigned *width,
+ unsigned *height);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_FRAMEBUFFER_H */
diff --git a/src/minigallium/auxiliary/util/u_gen_mipmap.c b/src/minigallium/auxiliary/util/u_gen_mipmap.c
new file mode 100644
index 0000000..dfd447c
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_gen_mipmap.c
@@ -0,0 +1,1704 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ * Copyright 2008 VMware, Inc. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Mipmap generation utility
+ *
+ * @author Brian Paul
+ */
+
+
+#include "pipe/p_context.h"
+#include "util/u_debug.h"
+#include "pipe/p_defines.h"
+#include "util/u_inlines.h"
+#include "pipe/p_shader_tokens.h"
+#include "pipe/p_state.h"
+
+#include "util/u_format.h"
+#include "util/u_memory.h"
+#include "util/u_draw_quad.h"
+#include "util/u_gen_mipmap.h"
+#include "util/u_simple_shaders.h"
+#include "util/u_math.h"
+#include "util/u_texture.h"
+#include "util/u_half.h"
+#include "util/u_surface.h"
+
+#include "cso_cache/cso_context.h"
+
+
+struct gen_mipmap_state
+{
+ struct pipe_context *pipe;
+ struct cso_context *cso;
+
+ struct pipe_blend_state blend_keep_color, blend_write_color;
+ struct pipe_depth_stencil_alpha_state dsa_keep_depth, dsa_write_depth;
+ struct pipe_rasterizer_state rasterizer;
+ struct pipe_sampler_state sampler;
+ struct pipe_vertex_element velem[2];
+
+ void *vs;
+
+ /** Not all are used, but simplifies code */
+ void *fs_color[TGSI_TEXTURE_COUNT];
+ void *fs_depth[TGSI_TEXTURE_COUNT];
+
+ struct pipe_resource *vbuf; /**< quad vertices */
+ unsigned vbuf_slot;
+
+ float vertices[4][2][4]; /**< vertex/texcoords for quad */
+};
+
+
+
+enum dtype
+{
+ DTYPE_UBYTE,
+ DTYPE_UBYTE_3_3_2,
+ DTYPE_USHORT,
+ DTYPE_USHORT_4_4_4_4,
+ DTYPE_USHORT_5_6_5,
+ DTYPE_USHORT_1_5_5_5_REV,
+ DTYPE_UINT,
+ DTYPE_FLOAT,
+ DTYPE_HALF_FLOAT
+};
+
+
+typedef uint16_t half_float;
+
+
+/**
+ * \name Support macros for do_row and do_row_3d
+ *
+ * The macro madness is here for two reasons. First, it compacts the code
+ * slightly. Second, it makes it much easier to adjust the specifics of the
+ * filter to tune the rounding characteristics.
+ */
+/*@{*/
+#define DECLARE_ROW_POINTERS(t, e) \
+ const t(*rowA)[e] = (const t(*)[e]) srcRowA; \
+ const t(*rowB)[e] = (const t(*)[e]) srcRowB; \
+ const t(*rowC)[e] = (const t(*)[e]) srcRowC; \
+ const t(*rowD)[e] = (const t(*)[e]) srcRowD; \
+ t(*dst)[e] = (t(*)[e]) dstRow
+
+#define DECLARE_ROW_POINTERS0(t) \
+ const t *rowA = (const t *) srcRowA; \
+ const t *rowB = (const t *) srcRowB; \
+ const t *rowC = (const t *) srcRowC; \
+ const t *rowD = (const t *) srcRowD; \
+ t *dst = (t *) dstRow
+
+#define FILTER_SUM_3D(Aj, Ak, Bj, Bk, Cj, Ck, Dj, Dk) \
+ ((unsigned) Aj + (unsigned) Ak \
+ + (unsigned) Bj + (unsigned) Bk \
+ + (unsigned) Cj + (unsigned) Ck \
+ + (unsigned) Dj + (unsigned) Dk \
+ + 4) >> 3
+
+#define FILTER_3D(e) \
+ do { \
+ dst[i][e] = FILTER_SUM_3D(rowA[j][e], rowA[k][e], \
+ rowB[j][e], rowB[k][e], \
+ rowC[j][e], rowC[k][e], \
+ rowD[j][e], rowD[k][e]); \
+ } while(0)
+
+#define FILTER_F_3D(e) \
+ do { \
+ dst[i][e] = (rowA[j][e] + rowA[k][e] \
+ + rowB[j][e] + rowB[k][e] \
+ + rowC[j][e] + rowC[k][e] \
+ + rowD[j][e] + rowD[k][e]) * 0.125F; \
+ } while(0)
+
+#define FILTER_HF_3D(e) \
+ do { \
+ const float aj = util_half_to_float(rowA[j][e]); \
+ const float ak = util_half_to_float(rowA[k][e]); \
+ const float bj = util_half_to_float(rowB[j][e]); \
+ const float bk = util_half_to_float(rowB[k][e]); \
+ const float cj = util_half_to_float(rowC[j][e]); \
+ const float ck = util_half_to_float(rowC[k][e]); \
+ const float dj = util_half_to_float(rowD[j][e]); \
+ const float dk = util_half_to_float(rowD[k][e]); \
+ dst[i][e] = util_float_to_half((aj + ak + bj + bk + cj + ck + dj + dk) \
+ * 0.125F); \
+ } while(0)
+/*@}*/
+
+
+/**
+ * Average together two rows of a source image to produce a single new
+ * row in the dest image. It's legal for the two source rows to point
+ * to the same data. The source width must be equal to either the
+ * dest width or two times the dest width.
+ * \param datatype GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, GL_FLOAT, etc.
+ * \param comps number of components per pixel (1..4)
+ */
+static void
+do_row(enum dtype datatype, uint comps, int srcWidth,
+ const void *srcRowA, const void *srcRowB,
+ int dstWidth, void *dstRow)
+{
+ const uint k0 = (srcWidth == dstWidth) ? 0 : 1;
+ const uint colStride = (srcWidth == dstWidth) ? 1 : 2;
+
+ assert(comps >= 1);
+ assert(comps <= 4);
+
+ /* This assertion is no longer valid with non-power-of-2 textures
+ assert(srcWidth == dstWidth || srcWidth == 2 * dstWidth);
+ */
+
+ if (datatype == DTYPE_UBYTE && comps == 4) {
+ uint i, j, k;
+ const ubyte(*rowA)[4] = (const ubyte(*)[4]) srcRowA;
+ const ubyte(*rowB)[4] = (const ubyte(*)[4]) srcRowB;
+ ubyte(*dst)[4] = (ubyte(*)[4]) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
+ dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4;
+ dst[i][3] = (rowA[j][3] + rowA[k][3] + rowB[j][3] + rowB[k][3]) / 4;
+ }
+ }
+ else if (datatype == DTYPE_UBYTE && comps == 3) {
+ uint i, j, k;
+ const ubyte(*rowA)[3] = (const ubyte(*)[3]) srcRowA;
+ const ubyte(*rowB)[3] = (const ubyte(*)[3]) srcRowB;
+ ubyte(*dst)[3] = (ubyte(*)[3]) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
+ dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4;
+ }
+ }
+ else if (datatype == DTYPE_UBYTE && comps == 2) {
+ uint i, j, k;
+ const ubyte(*rowA)[2] = (const ubyte(*)[2]) srcRowA;
+ const ubyte(*rowB)[2] = (const ubyte(*)[2]) srcRowB;
+ ubyte(*dst)[2] = (ubyte(*)[2]) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) >> 2;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) >> 2;
+ }
+ }
+ else if (datatype == DTYPE_UBYTE && comps == 1) {
+ uint i, j, k;
+ const ubyte *rowA = (const ubyte *) srcRowA;
+ const ubyte *rowB = (const ubyte *) srcRowB;
+ ubyte *dst = (ubyte *) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) >> 2;
+ }
+ }
+
+ else if (datatype == DTYPE_USHORT && comps == 4) {
+ uint i, j, k;
+ const ushort(*rowA)[4] = (const ushort(*)[4]) srcRowA;
+ const ushort(*rowB)[4] = (const ushort(*)[4]) srcRowB;
+ ushort(*dst)[4] = (ushort(*)[4]) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
+ dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4;
+ dst[i][3] = (rowA[j][3] + rowA[k][3] + rowB[j][3] + rowB[k][3]) / 4;
+ }
+ }
+ else if (datatype == DTYPE_USHORT && comps == 3) {
+ uint i, j, k;
+ const ushort(*rowA)[3] = (const ushort(*)[3]) srcRowA;
+ const ushort(*rowB)[3] = (const ushort(*)[3]) srcRowB;
+ ushort(*dst)[3] = (ushort(*)[3]) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
+ dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4;
+ }
+ }
+ else if (datatype == DTYPE_USHORT && comps == 2) {
+ uint i, j, k;
+ const ushort(*rowA)[2] = (const ushort(*)[2]) srcRowA;
+ const ushort(*rowB)[2] = (const ushort(*)[2]) srcRowB;
+ ushort(*dst)[2] = (ushort(*)[2]) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
+ }
+ }
+ else if (datatype == DTYPE_USHORT && comps == 1) {
+ uint i, j, k;
+ const ushort *rowA = (const ushort *) srcRowA;
+ const ushort *rowB = (const ushort *) srcRowB;
+ ushort *dst = (ushort *) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4;
+ }
+ }
+
+ else if (datatype == DTYPE_FLOAT && comps == 4) {
+ uint i, j, k;
+ const float(*rowA)[4] = (const float(*)[4]) srcRowA;
+ const float(*rowB)[4] = (const float(*)[4]) srcRowB;
+ float(*dst)[4] = (float(*)[4]) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] +
+ rowB[j][0] + rowB[k][0]) * 0.25F;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] +
+ rowB[j][1] + rowB[k][1]) * 0.25F;
+ dst[i][2] = (rowA[j][2] + rowA[k][2] +
+ rowB[j][2] + rowB[k][2]) * 0.25F;
+ dst[i][3] = (rowA[j][3] + rowA[k][3] +
+ rowB[j][3] + rowB[k][3]) * 0.25F;
+ }
+ }
+ else if (datatype == DTYPE_FLOAT && comps == 3) {
+ uint i, j, k;
+ const float(*rowA)[3] = (const float(*)[3]) srcRowA;
+ const float(*rowB)[3] = (const float(*)[3]) srcRowB;
+ float(*dst)[3] = (float(*)[3]) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] +
+ rowB[j][0] + rowB[k][0]) * 0.25F;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] +
+ rowB[j][1] + rowB[k][1]) * 0.25F;
+ dst[i][2] = (rowA[j][2] + rowA[k][2] +
+ rowB[j][2] + rowB[k][2]) * 0.25F;
+ }
+ }
+ else if (datatype == DTYPE_FLOAT && comps == 2) {
+ uint i, j, k;
+ const float(*rowA)[2] = (const float(*)[2]) srcRowA;
+ const float(*rowB)[2] = (const float(*)[2]) srcRowB;
+ float(*dst)[2] = (float(*)[2]) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] +
+ rowB[j][0] + rowB[k][0]) * 0.25F;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] +
+ rowB[j][1] + rowB[k][1]) * 0.25F;
+ }
+ }
+ else if (datatype == DTYPE_FLOAT && comps == 1) {
+ uint i, j, k;
+ const float *rowA = (const float *) srcRowA;
+ const float *rowB = (const float *) srcRowB;
+ float *dst = (float *) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) * 0.25F;
+ }
+ }
+
+ else if (datatype == DTYPE_HALF_FLOAT && comps == 4) {
+ uint i, j, k, comp;
+ const half_float(*rowA)[4] = (const half_float(*)[4]) srcRowA;
+ const half_float(*rowB)[4] = (const half_float(*)[4]) srcRowB;
+ half_float(*dst)[4] = (half_float(*)[4]) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ for (comp = 0; comp < 4; comp++) {
+ float aj, ak, bj, bk;
+ aj = util_half_to_float(rowA[j][comp]);
+ ak = util_half_to_float(rowA[k][comp]);
+ bj = util_half_to_float(rowB[j][comp]);
+ bk = util_half_to_float(rowB[k][comp]);
+ dst[i][comp] = util_float_to_half((aj + ak + bj + bk) * 0.25F);
+ }
+ }
+ }
+ else if (datatype == DTYPE_HALF_FLOAT && comps == 3) {
+ uint i, j, k, comp;
+ const half_float(*rowA)[3] = (const half_float(*)[3]) srcRowA;
+ const half_float(*rowB)[3] = (const half_float(*)[3]) srcRowB;
+ half_float(*dst)[3] = (half_float(*)[3]) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ for (comp = 0; comp < 3; comp++) {
+ float aj, ak, bj, bk;
+ aj = util_half_to_float(rowA[j][comp]);
+ ak = util_half_to_float(rowA[k][comp]);
+ bj = util_half_to_float(rowB[j][comp]);
+ bk = util_half_to_float(rowB[k][comp]);
+ dst[i][comp] = util_float_to_half((aj + ak + bj + bk) * 0.25F);
+ }
+ }
+ }
+ else if (datatype == DTYPE_HALF_FLOAT && comps == 2) {
+ uint i, j, k, comp;
+ const half_float(*rowA)[2] = (const half_float(*)[2]) srcRowA;
+ const half_float(*rowB)[2] = (const half_float(*)[2]) srcRowB;
+ half_float(*dst)[2] = (half_float(*)[2]) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ for (comp = 0; comp < 2; comp++) {
+ float aj, ak, bj, bk;
+ aj = util_half_to_float(rowA[j][comp]);
+ ak = util_half_to_float(rowA[k][comp]);
+ bj = util_half_to_float(rowB[j][comp]);
+ bk = util_half_to_float(rowB[k][comp]);
+ dst[i][comp] = util_float_to_half((aj + ak + bj + bk) * 0.25F);
+ }
+ }
+ }
+ else if (datatype == DTYPE_HALF_FLOAT && comps == 1) {
+ uint i, j, k;
+ const half_float *rowA = (const half_float *) srcRowA;
+ const half_float *rowB = (const half_float *) srcRowB;
+ half_float *dst = (half_float *) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ float aj, ak, bj, bk;
+ aj = util_half_to_float(rowA[j]);
+ ak = util_half_to_float(rowA[k]);
+ bj = util_half_to_float(rowB[j]);
+ bk = util_half_to_float(rowB[k]);
+ dst[i] = util_float_to_half((aj + ak + bj + bk) * 0.25F);
+ }
+ }
+
+ else if (datatype == DTYPE_UINT && comps == 1) {
+ uint i, j, k;
+ const uint *rowA = (const uint *) srcRowA;
+ const uint *rowB = (const uint *) srcRowB;
+ uint *dst = (uint *) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i] = rowA[j] / 4 + rowA[k] / 4 + rowB[j] / 4 + rowB[k] / 4;
+ }
+ }
+
+ else if (datatype == DTYPE_USHORT_5_6_5 && comps == 3) {
+ uint i, j, k;
+ const ushort *rowA = (const ushort *) srcRowA;
+ const ushort *rowB = (const ushort *) srcRowB;
+ ushort *dst = (ushort *) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const int rowAr0 = rowA[j] & 0x1f;
+ const int rowAr1 = rowA[k] & 0x1f;
+ const int rowBr0 = rowB[j] & 0x1f;
+ const int rowBr1 = rowB[k] & 0x1f;
+ const int rowAg0 = (rowA[j] >> 5) & 0x3f;
+ const int rowAg1 = (rowA[k] >> 5) & 0x3f;
+ const int rowBg0 = (rowB[j] >> 5) & 0x3f;
+ const int rowBg1 = (rowB[k] >> 5) & 0x3f;
+ const int rowAb0 = (rowA[j] >> 11) & 0x1f;
+ const int rowAb1 = (rowA[k] >> 11) & 0x1f;
+ const int rowBb0 = (rowB[j] >> 11) & 0x1f;
+ const int rowBb1 = (rowB[k] >> 11) & 0x1f;
+ const int red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
+ const int green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
+ const int blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
+ dst[i] = (blue << 11) | (green << 5) | red;
+ }
+ }
+ else if (datatype == DTYPE_USHORT_4_4_4_4 && comps == 4) {
+ uint i, j, k;
+ const ushort *rowA = (const ushort *) srcRowA;
+ const ushort *rowB = (const ushort *) srcRowB;
+ ushort *dst = (ushort *) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const int rowAr0 = rowA[j] & 0xf;
+ const int rowAr1 = rowA[k] & 0xf;
+ const int rowBr0 = rowB[j] & 0xf;
+ const int rowBr1 = rowB[k] & 0xf;
+ const int rowAg0 = (rowA[j] >> 4) & 0xf;
+ const int rowAg1 = (rowA[k] >> 4) & 0xf;
+ const int rowBg0 = (rowB[j] >> 4) & 0xf;
+ const int rowBg1 = (rowB[k] >> 4) & 0xf;
+ const int rowAb0 = (rowA[j] >> 8) & 0xf;
+ const int rowAb1 = (rowA[k] >> 8) & 0xf;
+ const int rowBb0 = (rowB[j] >> 8) & 0xf;
+ const int rowBb1 = (rowB[k] >> 8) & 0xf;
+ const int rowAa0 = (rowA[j] >> 12) & 0xf;
+ const int rowAa1 = (rowA[k] >> 12) & 0xf;
+ const int rowBa0 = (rowB[j] >> 12) & 0xf;
+ const int rowBa1 = (rowB[k] >> 12) & 0xf;
+ const int red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
+ const int green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
+ const int blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
+ const int alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2;
+ dst[i] = (alpha << 12) | (blue << 8) | (green << 4) | red;
+ }
+ }
+ else if (datatype == DTYPE_USHORT_1_5_5_5_REV && comps == 4) {
+ uint i, j, k;
+ const ushort *rowA = (const ushort *) srcRowA;
+ const ushort *rowB = (const ushort *) srcRowB;
+ ushort *dst = (ushort *) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const int rowAr0 = rowA[j] & 0x1f;
+ const int rowAr1 = rowA[k] & 0x1f;
+ const int rowBr0 = rowB[j] & 0x1f;
+ const int rowBr1 = rowB[k] & 0x1f;
+ const int rowAg0 = (rowA[j] >> 5) & 0x1f;
+ const int rowAg1 = (rowA[k] >> 5) & 0x1f;
+ const int rowBg0 = (rowB[j] >> 5) & 0x1f;
+ const int rowBg1 = (rowB[k] >> 5) & 0x1f;
+ const int rowAb0 = (rowA[j] >> 10) & 0x1f;
+ const int rowAb1 = (rowA[k] >> 10) & 0x1f;
+ const int rowBb0 = (rowB[j] >> 10) & 0x1f;
+ const int rowBb1 = (rowB[k] >> 10) & 0x1f;
+ const int rowAa0 = (rowA[j] >> 15) & 0x1;
+ const int rowAa1 = (rowA[k] >> 15) & 0x1;
+ const int rowBa0 = (rowB[j] >> 15) & 0x1;
+ const int rowBa1 = (rowB[k] >> 15) & 0x1;
+ const int red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
+ const int green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
+ const int blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
+ const int alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2;
+ dst[i] = (alpha << 15) | (blue << 10) | (green << 5) | red;
+ }
+ }
+ else if (datatype == DTYPE_UBYTE_3_3_2 && comps == 3) {
+ uint i, j, k;
+ const ubyte *rowA = (const ubyte *) srcRowA;
+ const ubyte *rowB = (const ubyte *) srcRowB;
+ ubyte *dst = (ubyte *) dstRow;
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const int rowAr0 = rowA[j] & 0x3;
+ const int rowAr1 = rowA[k] & 0x3;
+ const int rowBr0 = rowB[j] & 0x3;
+ const int rowBr1 = rowB[k] & 0x3;
+ const int rowAg0 = (rowA[j] >> 2) & 0x7;
+ const int rowAg1 = (rowA[k] >> 2) & 0x7;
+ const int rowBg0 = (rowB[j] >> 2) & 0x7;
+ const int rowBg1 = (rowB[k] >> 2) & 0x7;
+ const int rowAb0 = (rowA[j] >> 5) & 0x7;
+ const int rowAb1 = (rowA[k] >> 5) & 0x7;
+ const int rowBb0 = (rowB[j] >> 5) & 0x7;
+ const int rowBb1 = (rowB[k] >> 5) & 0x7;
+ const int red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
+ const int green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
+ const int blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
+ dst[i] = (blue << 5) | (green << 2) | red;
+ }
+ }
+ else {
+ debug_printf("bad format in do_row()");
+ }
+}
+
+
+/**
+ * Average together four rows of a source image to produce a single new
+ * row in the dest image. It's legal for the two source rows to point
+ * to the same data. The source width must be equal to either the
+ * dest width or two times the dest width.
+ *
+ * \param datatype GL pixel type \c GL_UNSIGNED_BYTE, \c GL_UNSIGNED_SHORT,
+ * \c GL_FLOAT, etc.
+ * \param comps number of components per pixel (1..4)
+ * \param srcWidth Width of a row in the source data
+ * \param srcRowA Pointer to one of the rows of source data
+ * \param srcRowB Pointer to one of the rows of source data
+ * \param srcRowC Pointer to one of the rows of source data
+ * \param srcRowD Pointer to one of the rows of source data
+ * \param dstWidth Width of a row in the destination data
+ * \param srcRowA Pointer to the row of destination data
+ */
+static void
+do_row_3D(enum dtype datatype, uint comps, int srcWidth,
+ const void *srcRowA, const void *srcRowB,
+ const void *srcRowC, const void *srcRowD,
+ int dstWidth, void *dstRow)
+{
+ const uint k0 = (srcWidth == dstWidth) ? 0 : 1;
+ const uint colStride = (srcWidth == dstWidth) ? 1 : 2;
+ uint i, j, k;
+
+ assert(comps >= 1);
+ assert(comps <= 4);
+
+ if ((datatype == DTYPE_UBYTE) && (comps == 4)) {
+ DECLARE_ROW_POINTERS(ubyte, 4);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_3D(0);
+ FILTER_3D(1);
+ FILTER_3D(2);
+ FILTER_3D(3);
+ }
+ }
+ else if ((datatype == DTYPE_UBYTE) && (comps == 3)) {
+ DECLARE_ROW_POINTERS(ubyte, 3);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_3D(0);
+ FILTER_3D(1);
+ FILTER_3D(2);
+ }
+ }
+ else if ((datatype == DTYPE_UBYTE) && (comps == 2)) {
+ DECLARE_ROW_POINTERS(ubyte, 2);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_3D(0);
+ FILTER_3D(1);
+ }
+ }
+ else if ((datatype == DTYPE_UBYTE) && (comps == 1)) {
+ DECLARE_ROW_POINTERS(ubyte, 1);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_3D(0);
+ }
+ }
+ else if ((datatype == DTYPE_USHORT) && (comps == 4)) {
+ DECLARE_ROW_POINTERS(ushort, 4);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_3D(0);
+ FILTER_3D(1);
+ FILTER_3D(2);
+ FILTER_3D(3);
+ }
+ }
+ else if ((datatype == DTYPE_USHORT) && (comps == 3)) {
+ DECLARE_ROW_POINTERS(ushort, 3);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_3D(0);
+ FILTER_3D(1);
+ FILTER_3D(2);
+ }
+ }
+ else if ((datatype == DTYPE_USHORT) && (comps == 2)) {
+ DECLARE_ROW_POINTERS(ushort, 2);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_3D(0);
+ FILTER_3D(1);
+ }
+ }
+ else if ((datatype == DTYPE_USHORT) && (comps == 1)) {
+ DECLARE_ROW_POINTERS(ushort, 1);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_3D(0);
+ }
+ }
+ else if ((datatype == DTYPE_FLOAT) && (comps == 4)) {
+ DECLARE_ROW_POINTERS(float, 4);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_F_3D(0);
+ FILTER_F_3D(1);
+ FILTER_F_3D(2);
+ FILTER_F_3D(3);
+ }
+ }
+ else if ((datatype == DTYPE_FLOAT) && (comps == 3)) {
+ DECLARE_ROW_POINTERS(float, 3);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_F_3D(0);
+ FILTER_F_3D(1);
+ FILTER_F_3D(2);
+ }
+ }
+ else if ((datatype == DTYPE_FLOAT) && (comps == 2)) {
+ DECLARE_ROW_POINTERS(float, 2);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_F_3D(0);
+ FILTER_F_3D(1);
+ }
+ }
+ else if ((datatype == DTYPE_FLOAT) && (comps == 1)) {
+ DECLARE_ROW_POINTERS(float, 1);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_F_3D(0);
+ }
+ }
+ else if ((datatype == DTYPE_HALF_FLOAT) && (comps == 4)) {
+ DECLARE_ROW_POINTERS(half_float, 4);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_HF_3D(0);
+ FILTER_HF_3D(1);
+ FILTER_HF_3D(2);
+ FILTER_HF_3D(3);
+ }
+ }
+ else if ((datatype == DTYPE_HALF_FLOAT) && (comps == 3)) {
+ DECLARE_ROW_POINTERS(half_float, 4);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_HF_3D(0);
+ FILTER_HF_3D(1);
+ FILTER_HF_3D(2);
+ }
+ }
+ else if ((datatype == DTYPE_HALF_FLOAT) && (comps == 2)) {
+ DECLARE_ROW_POINTERS(half_float, 4);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_HF_3D(0);
+ FILTER_HF_3D(1);
+ }
+ }
+ else if ((datatype == DTYPE_HALF_FLOAT) && (comps == 1)) {
+ DECLARE_ROW_POINTERS(half_float, 4);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_HF_3D(0);
+ }
+ }
+ else if ((datatype == DTYPE_UINT) && (comps == 1)) {
+ const uint *rowA = (const uint *) srcRowA;
+ const uint *rowB = (const uint *) srcRowB;
+ const uint *rowC = (const uint *) srcRowC;
+ const uint *rowD = (const uint *) srcRowD;
+ float *dst = (float *) dstRow;
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const uint64_t tmp = (((uint64_t) rowA[j] + (uint64_t) rowA[k])
+ + ((uint64_t) rowB[j] + (uint64_t) rowB[k])
+ + ((uint64_t) rowC[j] + (uint64_t) rowC[k])
+ + ((uint64_t) rowD[j] + (uint64_t) rowD[k]));
+ dst[i] = (float)((double) tmp * 0.125);
+ }
+ }
+ else if ((datatype == DTYPE_USHORT_5_6_5) && (comps == 3)) {
+ DECLARE_ROW_POINTERS0(ushort);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const int rowAr0 = rowA[j] & 0x1f;
+ const int rowAr1 = rowA[k] & 0x1f;
+ const int rowBr0 = rowB[j] & 0x1f;
+ const int rowBr1 = rowB[k] & 0x1f;
+ const int rowCr0 = rowC[j] & 0x1f;
+ const int rowCr1 = rowC[k] & 0x1f;
+ const int rowDr0 = rowD[j] & 0x1f;
+ const int rowDr1 = rowD[k] & 0x1f;
+ const int rowAg0 = (rowA[j] >> 5) & 0x3f;
+ const int rowAg1 = (rowA[k] >> 5) & 0x3f;
+ const int rowBg0 = (rowB[j] >> 5) & 0x3f;
+ const int rowBg1 = (rowB[k] >> 5) & 0x3f;
+ const int rowCg0 = (rowC[j] >> 5) & 0x3f;
+ const int rowCg1 = (rowC[k] >> 5) & 0x3f;
+ const int rowDg0 = (rowD[j] >> 5) & 0x3f;
+ const int rowDg1 = (rowD[k] >> 5) & 0x3f;
+ const int rowAb0 = (rowA[j] >> 11) & 0x1f;
+ const int rowAb1 = (rowA[k] >> 11) & 0x1f;
+ const int rowBb0 = (rowB[j] >> 11) & 0x1f;
+ const int rowBb1 = (rowB[k] >> 11) & 0x1f;
+ const int rowCb0 = (rowC[j] >> 11) & 0x1f;
+ const int rowCb1 = (rowC[k] >> 11) & 0x1f;
+ const int rowDb0 = (rowD[j] >> 11) & 0x1f;
+ const int rowDb1 = (rowD[k] >> 11) & 0x1f;
+ const int r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1,
+ rowCr0, rowCr1, rowDr0, rowDr1);
+ const int g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1,
+ rowCg0, rowCg1, rowDg0, rowDg1);
+ const int b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1,
+ rowCb0, rowCb1, rowDb0, rowDb1);
+ dst[i] = (b << 11) | (g << 5) | r;
+ }
+ }
+ else if ((datatype == DTYPE_USHORT_4_4_4_4) && (comps == 4)) {
+ DECLARE_ROW_POINTERS0(ushort);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const int rowAr0 = rowA[j] & 0xf;
+ const int rowAr1 = rowA[k] & 0xf;
+ const int rowBr0 = rowB[j] & 0xf;
+ const int rowBr1 = rowB[k] & 0xf;
+ const int rowCr0 = rowC[j] & 0xf;
+ const int rowCr1 = rowC[k] & 0xf;
+ const int rowDr0 = rowD[j] & 0xf;
+ const int rowDr1 = rowD[k] & 0xf;
+ const int rowAg0 = (rowA[j] >> 4) & 0xf;
+ const int rowAg1 = (rowA[k] >> 4) & 0xf;
+ const int rowBg0 = (rowB[j] >> 4) & 0xf;
+ const int rowBg1 = (rowB[k] >> 4) & 0xf;
+ const int rowCg0 = (rowC[j] >> 4) & 0xf;
+ const int rowCg1 = (rowC[k] >> 4) & 0xf;
+ const int rowDg0 = (rowD[j] >> 4) & 0xf;
+ const int rowDg1 = (rowD[k] >> 4) & 0xf;
+ const int rowAb0 = (rowA[j] >> 8) & 0xf;
+ const int rowAb1 = (rowA[k] >> 8) & 0xf;
+ const int rowBb0 = (rowB[j] >> 8) & 0xf;
+ const int rowBb1 = (rowB[k] >> 8) & 0xf;
+ const int rowCb0 = (rowC[j] >> 8) & 0xf;
+ const int rowCb1 = (rowC[k] >> 8) & 0xf;
+ const int rowDb0 = (rowD[j] >> 8) & 0xf;
+ const int rowDb1 = (rowD[k] >> 8) & 0xf;
+ const int rowAa0 = (rowA[j] >> 12) & 0xf;
+ const int rowAa1 = (rowA[k] >> 12) & 0xf;
+ const int rowBa0 = (rowB[j] >> 12) & 0xf;
+ const int rowBa1 = (rowB[k] >> 12) & 0xf;
+ const int rowCa0 = (rowC[j] >> 12) & 0xf;
+ const int rowCa1 = (rowC[k] >> 12) & 0xf;
+ const int rowDa0 = (rowD[j] >> 12) & 0xf;
+ const int rowDa1 = (rowD[k] >> 12) & 0xf;
+ const int r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1,
+ rowCr0, rowCr1, rowDr0, rowDr1);
+ const int g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1,
+ rowCg0, rowCg1, rowDg0, rowDg1);
+ const int b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1,
+ rowCb0, rowCb1, rowDb0, rowDb1);
+ const int a = FILTER_SUM_3D(rowAa0, rowAa1, rowBa0, rowBa1,
+ rowCa0, rowCa1, rowDa0, rowDa1);
+
+ dst[i] = (a << 12) | (b << 8) | (g << 4) | r;
+ }
+ }
+ else if ((datatype == DTYPE_USHORT_1_5_5_5_REV) && (comps == 4)) {
+ DECLARE_ROW_POINTERS0(ushort);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const int rowAr0 = rowA[j] & 0x1f;
+ const int rowAr1 = rowA[k] & 0x1f;
+ const int rowBr0 = rowB[j] & 0x1f;
+ const int rowBr1 = rowB[k] & 0x1f;
+ const int rowCr0 = rowC[j] & 0x1f;
+ const int rowCr1 = rowC[k] & 0x1f;
+ const int rowDr0 = rowD[j] & 0x1f;
+ const int rowDr1 = rowD[k] & 0x1f;
+ const int rowAg0 = (rowA[j] >> 5) & 0x1f;
+ const int rowAg1 = (rowA[k] >> 5) & 0x1f;
+ const int rowBg0 = (rowB[j] >> 5) & 0x1f;
+ const int rowBg1 = (rowB[k] >> 5) & 0x1f;
+ const int rowCg0 = (rowC[j] >> 5) & 0x1f;
+ const int rowCg1 = (rowC[k] >> 5) & 0x1f;
+ const int rowDg0 = (rowD[j] >> 5) & 0x1f;
+ const int rowDg1 = (rowD[k] >> 5) & 0x1f;
+ const int rowAb0 = (rowA[j] >> 10) & 0x1f;
+ const int rowAb1 = (rowA[k] >> 10) & 0x1f;
+ const int rowBb0 = (rowB[j] >> 10) & 0x1f;
+ const int rowBb1 = (rowB[k] >> 10) & 0x1f;
+ const int rowCb0 = (rowC[j] >> 10) & 0x1f;
+ const int rowCb1 = (rowC[k] >> 10) & 0x1f;
+ const int rowDb0 = (rowD[j] >> 10) & 0x1f;
+ const int rowDb1 = (rowD[k] >> 10) & 0x1f;
+ const int rowAa0 = (rowA[j] >> 15) & 0x1;
+ const int rowAa1 = (rowA[k] >> 15) & 0x1;
+ const int rowBa0 = (rowB[j] >> 15) & 0x1;
+ const int rowBa1 = (rowB[k] >> 15) & 0x1;
+ const int rowCa0 = (rowC[j] >> 15) & 0x1;
+ const int rowCa1 = (rowC[k] >> 15) & 0x1;
+ const int rowDa0 = (rowD[j] >> 15) & 0x1;
+ const int rowDa1 = (rowD[k] >> 15) & 0x1;
+ const int r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1,
+ rowCr0, rowCr1, rowDr0, rowDr1);
+ const int g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1,
+ rowCg0, rowCg1, rowDg0, rowDg1);
+ const int b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1,
+ rowCb0, rowCb1, rowDb0, rowDb1);
+ const int a = FILTER_SUM_3D(rowAa0, rowAa1, rowBa0, rowBa1,
+ rowCa0, rowCa1, rowDa0, rowDa1);
+
+ dst[i] = (a << 15) | (b << 10) | (g << 5) | r;
+ }
+ }
+ else if ((datatype == DTYPE_UBYTE_3_3_2) && (comps == 3)) {
+ DECLARE_ROW_POINTERS0(ushort);
+
+ for (i = j = 0, k = k0; i < (uint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const int rowAr0 = rowA[j] & 0x3;
+ const int rowAr1 = rowA[k] & 0x3;
+ const int rowBr0 = rowB[j] & 0x3;
+ const int rowBr1 = rowB[k] & 0x3;
+ const int rowCr0 = rowC[j] & 0x3;
+ const int rowCr1 = rowC[k] & 0x3;
+ const int rowDr0 = rowD[j] & 0x3;
+ const int rowDr1 = rowD[k] & 0x3;
+ const int rowAg0 = (rowA[j] >> 2) & 0x7;
+ const int rowAg1 = (rowA[k] >> 2) & 0x7;
+ const int rowBg0 = (rowB[j] >> 2) & 0x7;
+ const int rowBg1 = (rowB[k] >> 2) & 0x7;
+ const int rowCg0 = (rowC[j] >> 2) & 0x7;
+ const int rowCg1 = (rowC[k] >> 2) & 0x7;
+ const int rowDg0 = (rowD[j] >> 2) & 0x7;
+ const int rowDg1 = (rowD[k] >> 2) & 0x7;
+ const int rowAb0 = (rowA[j] >> 5) & 0x7;
+ const int rowAb1 = (rowA[k] >> 5) & 0x7;
+ const int rowBb0 = (rowB[j] >> 5) & 0x7;
+ const int rowBb1 = (rowB[k] >> 5) & 0x7;
+ const int rowCb0 = (rowC[j] >> 5) & 0x7;
+ const int rowCb1 = (rowC[k] >> 5) & 0x7;
+ const int rowDb0 = (rowD[j] >> 5) & 0x7;
+ const int rowDb1 = (rowD[k] >> 5) & 0x7;
+ const int r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1,
+ rowCr0, rowCr1, rowDr0, rowDr1);
+ const int g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1,
+ rowCg0, rowCg1, rowDg0, rowDg1);
+ const int b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1,
+ rowCb0, rowCb1, rowDb0, rowDb1);
+ dst[i] = (b << 5) | (g << 2) | r;
+ }
+ }
+ else {
+ debug_printf("bad format in do_row_3D()");
+ }
+}
+
+
+
+static void
+format_to_type_comps(enum pipe_format pformat,
+ enum dtype *datatype, uint *comps)
+{
+ /* XXX I think this could be implemented in terms of the pf_*() functions */
+ switch (pformat) {
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_A8B8G8R8_SRGB:
+ case PIPE_FORMAT_X8B8G8R8_SRGB:
+ case PIPE_FORMAT_B8G8R8A8_SRGB:
+ case PIPE_FORMAT_B8G8R8X8_SRGB:
+ case PIPE_FORMAT_A8R8G8B8_SRGB:
+ case PIPE_FORMAT_X8R8G8B8_SRGB:
+ case PIPE_FORMAT_R8G8B8_SRGB:
+ *datatype = DTYPE_UBYTE;
+ *comps = 4;
+ return;
+ case PIPE_FORMAT_B5G5R5X1_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
+ *datatype = DTYPE_USHORT_1_5_5_5_REV;
+ *comps = 4;
+ return;
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
+ *datatype = DTYPE_USHORT_4_4_4_4;
+ *comps = 4;
+ return;
+ case PIPE_FORMAT_B5G6R5_UNORM:
+ *datatype = DTYPE_USHORT_5_6_5;
+ *comps = 3;
+ return;
+ case PIPE_FORMAT_L8_UNORM:
+ case PIPE_FORMAT_L8_SRGB:
+ case PIPE_FORMAT_A8_UNORM:
+ case PIPE_FORMAT_I8_UNORM:
+ *datatype = DTYPE_UBYTE;
+ *comps = 1;
+ return;
+ case PIPE_FORMAT_L8A8_UNORM:
+ case PIPE_FORMAT_L8A8_SRGB:
+ *datatype = DTYPE_UBYTE;
+ *comps = 2;
+ return;
+ default:
+ assert(0);
+ *datatype = DTYPE_UBYTE;
+ *comps = 0;
+ break;
+ }
+}
+
+
+static void
+reduce_1d(enum pipe_format pformat,
+ int srcWidth, const ubyte *srcPtr,
+ int dstWidth, ubyte *dstPtr)
+{
+ enum dtype datatype;
+ uint comps;
+
+ format_to_type_comps(pformat, &datatype, &comps);
+
+ /* we just duplicate the input row, kind of hack, saves code */
+ do_row(datatype, comps,
+ srcWidth, srcPtr, srcPtr,
+ dstWidth, dstPtr);
+}
+
+
+/**
+ * Strides are in bytes. If zero, it'll be computed as width * bpp.
+ */
+static void
+reduce_2d(enum pipe_format pformat,
+ int srcWidth, int srcHeight,
+ int srcRowStride, const ubyte *srcPtr,
+ int dstWidth, int dstHeight,
+ int dstRowStride, ubyte *dstPtr)
+{
+ enum dtype datatype;
+ uint comps;
+ const int bpt = util_format_get_blocksize(pformat);
+ const ubyte *srcA, *srcB;
+ ubyte *dst;
+ int row;
+
+ format_to_type_comps(pformat, &datatype, &comps);
+
+ if (!srcRowStride)
+ srcRowStride = bpt * srcWidth;
+
+ if (!dstRowStride)
+ dstRowStride = bpt * dstWidth;
+
+ /* Compute src and dst pointers */
+ srcA = srcPtr;
+ if (srcHeight > 1)
+ srcB = srcA + srcRowStride;
+ else
+ srcB = srcA;
+ dst = dstPtr;
+
+ for (row = 0; row < dstHeight; row++) {
+ do_row(datatype, comps,
+ srcWidth, srcA, srcB,
+ dstWidth, dst);
+ srcA += 2 * srcRowStride;
+ srcB += 2 * srcRowStride;
+ dst += dstRowStride;
+ }
+}
+
+
+static void
+reduce_3d(enum pipe_format pformat,
+ int srcWidth, int srcHeight, int srcDepth,
+ int srcRowStride, int srcImageStride, const ubyte *srcPtr,
+ int dstWidth, int dstHeight, int dstDepth,
+ int dstRowStride, int dstImageStride, ubyte *dstPtr)
+{
+ const int bpt = util_format_get_blocksize(pformat);
+ int img, row;
+ int srcImageOffset, srcRowOffset;
+ enum dtype datatype;
+ uint comps;
+
+ format_to_type_comps(pformat, &datatype, &comps);
+
+ /* XXX I think we should rather assert those strides */
+ if (!srcImageStride)
+ srcImageStride = srcWidth * srcHeight * bpt;
+ if (!dstImageStride)
+ dstImageStride = dstWidth * dstHeight * bpt;
+
+ if (!srcRowStride)
+ srcRowStride = srcWidth * bpt;
+ if (!dstRowStride)
+ dstRowStride = dstWidth * bpt;
+
+ /* Offset between adjacent src images to be averaged together */
+ srcImageOffset = (srcDepth == dstDepth) ? 0 : srcImageStride;
+
+ /* Offset between adjacent src rows to be averaged together */
+ srcRowOffset = (srcHeight == dstHeight) ? 0 : srcRowStride;
+
+ /*
+ * Need to average together up to 8 src pixels for each dest pixel.
+ * Break that down into 3 operations:
+ * 1. take two rows from source image and average them together.
+ * 2. take two rows from next source image and average them together.
+ * 3. take the two averaged rows and average them for the final dst row.
+ */
+
+ /*
+ printf("mip3d %d x %d x %d -> %d x %d x %d\n",
+ srcWidth, srcHeight, srcDepth, dstWidth, dstHeight, dstDepth);
+ */
+
+ for (img = 0; img < dstDepth; img++) {
+ /* first source image pointer */
+ const ubyte *imgSrcA = srcPtr
+ + img * (srcImageStride + srcImageOffset);
+ /* second source image pointer */
+ const ubyte *imgSrcB = imgSrcA + srcImageOffset;
+ /* address of the dest image */
+ ubyte *imgDst = dstPtr + img * dstImageStride;
+
+ /* setup the four source row pointers and the dest row pointer */
+ const ubyte *srcImgARowA = imgSrcA;
+ const ubyte *srcImgARowB = imgSrcA + srcRowOffset;
+ const ubyte *srcImgBRowA = imgSrcB;
+ const ubyte *srcImgBRowB = imgSrcB + srcRowOffset;
+ ubyte *dstImgRow = imgDst;
+
+ for (row = 0; row < dstHeight; row++) {
+ do_row_3D(datatype, comps, srcWidth,
+ srcImgARowA, srcImgARowB,
+ srcImgBRowA, srcImgBRowB,
+ dstWidth, dstImgRow);
+
+ /* advance to next rows */
+ srcImgARowA += srcRowStride + srcRowOffset;
+ srcImgARowB += srcRowStride + srcRowOffset;
+ srcImgBRowA += srcRowStride + srcRowOffset;
+ srcImgBRowB += srcRowStride + srcRowOffset;
+ dstImgRow += dstImageStride;
+ }
+ }
+}
+
+
+
+
+static void
+make_1d_mipmap(struct gen_mipmap_state *ctx,
+ struct pipe_resource *pt,
+ uint layer, uint baseLevel, uint lastLevel)
+{
+ struct pipe_context *pipe = ctx->pipe;
+ uint dstLevel;
+
+ for (dstLevel = baseLevel + 1; dstLevel <= lastLevel; dstLevel++) {
+ const uint srcLevel = dstLevel - 1;
+ struct pipe_transfer *srcTrans, *dstTrans;
+ void *srcMap, *dstMap;
+
+ srcMap = pipe_transfer_map(pipe, pt, srcLevel, layer,
+ PIPE_TRANSFER_READ, 0, 0,
+ u_minify(pt->width0, srcLevel),
+ u_minify(pt->height0, srcLevel), &srcTrans);
+ dstMap = pipe_transfer_map(pipe, pt, dstLevel, layer,
+ PIPE_TRANSFER_WRITE, 0, 0,
+ u_minify(pt->width0, dstLevel),
+ u_minify(pt->height0, dstLevel), &dstTrans);
+
+ reduce_1d(pt->format,
+ srcTrans->box.width, srcMap,
+ dstTrans->box.width, dstMap);
+
+ pipe->transfer_unmap(pipe, srcTrans);
+ pipe->transfer_unmap(pipe, dstTrans);
+ }
+}
+
+
+static void
+make_2d_mipmap(struct gen_mipmap_state *ctx,
+ struct pipe_resource *pt,
+ uint layer, uint baseLevel, uint lastLevel)
+{
+ struct pipe_context *pipe = ctx->pipe;
+ uint dstLevel;
+
+ assert(util_format_get_blockwidth(pt->format) == 1);
+ assert(util_format_get_blockheight(pt->format) == 1);
+
+ for (dstLevel = baseLevel + 1; dstLevel <= lastLevel; dstLevel++) {
+ const uint srcLevel = dstLevel - 1;
+ struct pipe_transfer *srcTrans, *dstTrans;
+ ubyte *srcMap, *dstMap;
+
+ srcMap = pipe_transfer_map(pipe, pt, srcLevel, layer,
+ PIPE_TRANSFER_READ, 0, 0,
+ u_minify(pt->width0, srcLevel),
+ u_minify(pt->height0, srcLevel), &srcTrans);
+ dstMap = pipe_transfer_map(pipe, pt, dstLevel, layer,
+ PIPE_TRANSFER_WRITE, 0, 0,
+ u_minify(pt->width0, dstLevel),
+ u_minify(pt->height0, dstLevel), &dstTrans);
+
+ reduce_2d(pt->format,
+ srcTrans->box.width, srcTrans->box.height,
+ srcTrans->stride, srcMap,
+ dstTrans->box.width, dstTrans->box.height,
+ dstTrans->stride, dstMap);
+
+ pipe->transfer_unmap(pipe, srcTrans);
+ pipe->transfer_unmap(pipe, dstTrans);
+ }
+}
+
+
+/* XXX looks a bit more like it could work now but need to test */
+static void
+make_3d_mipmap(struct gen_mipmap_state *ctx,
+ struct pipe_resource *pt,
+ uint face, uint baseLevel, uint lastLevel)
+{
+ struct pipe_context *pipe = ctx->pipe;
+ uint dstLevel;
+ struct pipe_box src_box, dst_box;
+
+ assert(util_format_get_blockwidth(pt->format) == 1);
+ assert(util_format_get_blockheight(pt->format) == 1);
+
+ src_box.x = src_box.y = src_box.z = 0;
+ dst_box.x = dst_box.y = dst_box.z = 0;
+
+ for (dstLevel = baseLevel + 1; dstLevel <= lastLevel; dstLevel++) {
+ const uint srcLevel = dstLevel - 1;
+ struct pipe_transfer *srcTrans, *dstTrans;
+ ubyte *srcMap, *dstMap;
+ struct pipe_box src_box, dst_box;
+ src_box.width = u_minify(pt->width0, srcLevel);
+ src_box.height = u_minify(pt->height0, srcLevel);
+ src_box.depth = u_minify(pt->depth0, srcLevel);
+ dst_box.width = u_minify(pt->width0, dstLevel);
+ dst_box.height = u_minify(pt->height0, dstLevel);
+ dst_box.depth = u_minify(pt->depth0, dstLevel);
+
+ srcMap = pipe->transfer_map(pipe, pt, srcLevel,
+ PIPE_TRANSFER_READ,
+ &src_box, &srcTrans);
+ dstMap = pipe->transfer_map(pipe, pt, dstLevel,
+ PIPE_TRANSFER_WRITE,
+ &dst_box, &dstTrans);
+
+ reduce_3d(pt->format,
+ srcTrans->box.width, srcTrans->box.height, srcTrans->box.depth,
+ srcTrans->stride, srcTrans->layer_stride, srcMap,
+ dstTrans->box.width, dstTrans->box.height, dstTrans->box.depth,
+ dstTrans->stride, dstTrans->layer_stride, dstMap);
+
+ pipe->transfer_unmap(pipe, srcTrans);
+ pipe->transfer_unmap(pipe, dstTrans);
+ }
+}
+
+
+static void
+fallback_gen_mipmap(struct gen_mipmap_state *ctx,
+ struct pipe_resource *pt,
+ uint layer, uint baseLevel, uint lastLevel)
+{
+ switch (pt->target) {
+ case PIPE_TEXTURE_1D:
+ make_1d_mipmap(ctx, pt, layer, baseLevel, lastLevel);
+ break;
+ case PIPE_TEXTURE_2D:
+ case PIPE_TEXTURE_RECT:
+ case PIPE_TEXTURE_CUBE:
+ make_2d_mipmap(ctx, pt, layer, baseLevel, lastLevel);
+ break;
+ case PIPE_TEXTURE_3D:
+ make_3d_mipmap(ctx, pt, layer, baseLevel, lastLevel);
+ break;
+ default:
+ assert(0);
+ }
+}
+
+
+/**
+ * Create a mipmap generation context.
+ * The idea is to create one of these and re-use it each time we need to
+ * generate a mipmap.
+ */
+struct gen_mipmap_state *
+util_create_gen_mipmap(struct pipe_context *pipe,
+ struct cso_context *cso)
+{
+ struct gen_mipmap_state *ctx;
+ uint i;
+
+ ctx = CALLOC_STRUCT(gen_mipmap_state);
+ if (!ctx)
+ return NULL;
+
+ ctx->pipe = pipe;
+ ctx->cso = cso;
+
+ /* disabled blending/masking */
+ memset(&ctx->blend_keep_color, 0, sizeof(ctx->blend_keep_color));
+ memset(&ctx->blend_write_color, 0, sizeof(ctx->blend_write_color));
+ ctx->blend_write_color.rt[0].colormask = PIPE_MASK_RGBA;
+
+ /* no-op depth/stencil/alpha */
+ memset(&ctx->dsa_keep_depth, 0, sizeof(ctx->dsa_keep_depth));
+ memset(&ctx->dsa_write_depth, 0, sizeof(ctx->dsa_write_depth));
+ ctx->dsa_write_depth.depth.enabled = 1;
+ ctx->dsa_write_depth.depth.func = PIPE_FUNC_ALWAYS;
+ ctx->dsa_write_depth.depth.writemask = 1;
+
+ /* rasterizer */
+ memset(&ctx->rasterizer, 0, sizeof(ctx->rasterizer));
+ ctx->rasterizer.cull_face = PIPE_FACE_NONE;
+ ctx->rasterizer.half_pixel_center = 1;
+ ctx->rasterizer.bottom_edge_rule = 1;
+ ctx->rasterizer.depth_clip = 1;
+
+ /* sampler state */
+ memset(&ctx->sampler, 0, sizeof(ctx->sampler));
+ ctx->sampler.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
+ ctx->sampler.wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
+ ctx->sampler.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
+ ctx->sampler.min_mip_filter = PIPE_TEX_MIPFILTER_NEAREST;
+ ctx->sampler.normalized_coords = 1;
+
+ /* vertex elements state */
+ memset(&ctx->velem[0], 0, sizeof(ctx->velem[0]) * 2);
+ for (i = 0; i < 2; i++) {
+ ctx->velem[i].src_offset = i * 4 * sizeof(float);
+ ctx->velem[i].instance_divisor = 0;
+ ctx->velem[i].vertex_buffer_index = cso_get_aux_vertex_buffer_slot(cso);
+ ctx->velem[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
+ }
+
+ /* vertex data that doesn't change */
+ for (i = 0; i < 4; i++) {
+ ctx->vertices[i][0][2] = 0.0f; /* z */
+ ctx->vertices[i][0][3] = 1.0f; /* w */
+ ctx->vertices[i][1][3] = 1.0f; /* q */
+ }
+
+ /* Note: the actual vertex buffer is allocated as needed below */
+
+ return ctx;
+}
+
+
+/**
+ * Helper function to set the fragment shaders.
+ */
+static INLINE void
+set_fragment_shader(struct gen_mipmap_state *ctx, uint type,
+ boolean output_depth)
+{
+ if (output_depth) {
+ if (!ctx->fs_depth[type])
+ ctx->fs_depth[type] =
+ util_make_fragment_tex_shader_writedepth(ctx->pipe, type,
+ TGSI_INTERPOLATE_LINEAR);
+
+ cso_set_fragment_shader_handle(ctx->cso, ctx->fs_depth[type]);
+ }
+ else {
+ if (!ctx->fs_color[type])
+ ctx->fs_color[type] =
+ util_make_fragment_tex_shader(ctx->pipe, type,
+ TGSI_INTERPOLATE_LINEAR);
+
+ cso_set_fragment_shader_handle(ctx->cso, ctx->fs_color[type]);
+ }
+}
+
+
+/**
+ * Helper function to set the vertex shader.
+ */
+static INLINE void
+set_vertex_shader(struct gen_mipmap_state *ctx)
+{
+ /* vertex shader - still required to provide the linkage between
+ * fragment shader input semantics and vertex_element/buffers.
+ */
+ if (!ctx->vs)
+ {
+ const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
+ TGSI_SEMANTIC_GENERIC };
+ const uint semantic_indexes[] = { 0, 0 };
+ ctx->vs = util_make_vertex_passthrough_shader(ctx->pipe, 2,
+ semantic_names,
+ semantic_indexes);
+ }
+
+ cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
+}
+
+
+/**
+ * Get next "slot" of vertex space in the vertex buffer.
+ * We're allocating one large vertex buffer and using it piece by piece.
+ */
+static unsigned
+get_next_slot(struct gen_mipmap_state *ctx)
+{
+ const unsigned max_slots = 4096 / sizeof ctx->vertices;
+
+ if (ctx->vbuf_slot >= max_slots) {
+ pipe_resource_reference(&ctx->vbuf, NULL);
+ ctx->vbuf_slot = 0;
+ }
+
+ if (!ctx->vbuf) {
+ ctx->vbuf = pipe_buffer_create(ctx->pipe->screen,
+ PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STREAM,
+ max_slots * sizeof ctx->vertices);
+ }
+
+ return ctx->vbuf_slot++ * sizeof ctx->vertices;
+}
+
+
+static unsigned
+set_vertex_data(struct gen_mipmap_state *ctx,
+ enum pipe_texture_target tex_target,
+ uint layer, float r)
+{
+ unsigned offset;
+
+ /* vert[0].position */
+ ctx->vertices[0][0][0] = -1.0f; /*x*/
+ ctx->vertices[0][0][1] = -1.0f; /*y*/
+
+ /* vert[1].position */
+ ctx->vertices[1][0][0] = 1.0f;
+ ctx->vertices[1][0][1] = -1.0f;
+
+ /* vert[2].position */
+ ctx->vertices[2][0][0] = 1.0f;
+ ctx->vertices[2][0][1] = 1.0f;
+
+ /* vert[3].position */
+ ctx->vertices[3][0][0] = -1.0f;
+ ctx->vertices[3][0][1] = 1.0f;
+
+ /* Setup vertex texcoords. This is a little tricky for cube maps. */
+ if (tex_target == PIPE_TEXTURE_CUBE) {
+ static const float st[4][2] = {
+ {0.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}, {0.0f, 1.0f}
+ };
+
+ util_map_texcoords2d_onto_cubemap(layer, &st[0][0], 2,
+ &ctx->vertices[0][1][0], 8);
+ }
+ else if (tex_target == PIPE_TEXTURE_1D_ARRAY) {
+ /* 1D texture array */
+ ctx->vertices[0][1][0] = 0.0f; /*s*/
+ ctx->vertices[0][1][1] = r; /*t*/
+ ctx->vertices[0][1][2] = 0.0f; /*r*/
+
+ ctx->vertices[1][1][0] = 1.0f;
+ ctx->vertices[1][1][1] = r;
+ ctx->vertices[1][1][2] = 0.0f;
+
+ ctx->vertices[2][1][0] = 1.0f;
+ ctx->vertices[2][1][1] = r;
+ ctx->vertices[2][1][2] = 0.0f;
+
+ ctx->vertices[3][1][0] = 0.0f;
+ ctx->vertices[3][1][1] = r;
+ ctx->vertices[3][1][2] = 0.0f;
+ } else {
+ /* 1D/2D/3D/2D array */
+ ctx->vertices[0][1][0] = 0.0f; /*s*/
+ ctx->vertices[0][1][1] = 0.0f; /*t*/
+ ctx->vertices[0][1][2] = r; /*r*/
+
+ ctx->vertices[1][1][0] = 1.0f;
+ ctx->vertices[1][1][1] = 0.0f;
+ ctx->vertices[1][1][2] = r;
+
+ ctx->vertices[2][1][0] = 1.0f;
+ ctx->vertices[2][1][1] = 1.0f;
+ ctx->vertices[2][1][2] = r;
+
+ ctx->vertices[3][1][0] = 0.0f;
+ ctx->vertices[3][1][1] = 1.0f;
+ ctx->vertices[3][1][2] = r;
+ }
+
+ offset = get_next_slot( ctx );
+
+ pipe_buffer_write_nooverlap(ctx->pipe, ctx->vbuf,
+ offset, sizeof(ctx->vertices), ctx->vertices);
+
+ return offset;
+}
+
+
+
+/**
+ * Destroy a mipmap generation context
+ */
+void
+util_destroy_gen_mipmap(struct gen_mipmap_state *ctx)
+{
+ struct pipe_context *pipe = ctx->pipe;
+ unsigned i;
+
+ for (i = 0; i < Elements(ctx->fs_color); i++)
+ if (ctx->fs_color[i])
+ pipe->delete_fs_state(pipe, ctx->fs_color[i]);
+
+ for (i = 0; i < Elements(ctx->fs_depth); i++)
+ if (ctx->fs_depth[i])
+ pipe->delete_fs_state(pipe, ctx->fs_depth[i]);
+
+ if (ctx->vs)
+ pipe->delete_vs_state(pipe, ctx->vs);
+
+ pipe_resource_reference(&ctx->vbuf, NULL);
+
+ FREE(ctx);
+}
+
+
+/**
+ * Generate mipmap images. It's assumed all needed texture memory is
+ * already allocated.
+ *
+ * \param psv the sampler view to the texture to generate mipmap levels for
+ * \param face which cube face to generate mipmaps for (0 for non-cube maps)
+ * \param baseLevel the first mipmap level to use as a src
+ * \param lastLevel the last mipmap level to generate
+ * \param filter the minification filter used to generate mipmap levels with
+ * \param filter one of PIPE_TEX_FILTER_LINEAR, PIPE_TEX_FILTER_NEAREST
+ */
+void
+util_gen_mipmap(struct gen_mipmap_state *ctx,
+ struct pipe_sampler_view *psv,
+ uint face, uint baseLevel, uint lastLevel, uint filter)
+{
+ struct pipe_context *pipe = ctx->pipe;
+ struct pipe_screen *screen = pipe->screen;
+ struct pipe_framebuffer_state fb;
+ struct pipe_resource *pt = psv->texture;
+ uint dstLevel;
+ uint offset;
+ uint type;
+ boolean is_depth = util_format_is_depth_or_stencil(psv->format);
+
+ /* The texture object should have room for the levels which we're
+ * about to generate.
+ */
+ assert(lastLevel <= pt->last_level);
+
+ /* If this fails, why are we here? */
+ assert(lastLevel > baseLevel);
+
+ assert(filter == PIPE_TEX_FILTER_LINEAR ||
+ filter == PIPE_TEX_FILTER_NEAREST);
+
+ switch (pt->target) {
+ case PIPE_TEXTURE_1D:
+ type = TGSI_TEXTURE_1D;
+ break;
+ case PIPE_TEXTURE_2D:
+ type = TGSI_TEXTURE_2D;
+ break;
+ case PIPE_TEXTURE_3D:
+ type = TGSI_TEXTURE_3D;
+ break;
+ case PIPE_TEXTURE_CUBE:
+ type = TGSI_TEXTURE_CUBE;
+ break;
+ case PIPE_TEXTURE_1D_ARRAY:
+ type = TGSI_TEXTURE_1D_ARRAY;
+ break;
+ case PIPE_TEXTURE_2D_ARRAY:
+ type = TGSI_TEXTURE_2D_ARRAY;
+ break;
+ default:
+ assert(0);
+ type = TGSI_TEXTURE_2D;
+ }
+
+ /* check if we can render in the texture's format */
+ if (!screen->is_format_supported(screen, psv->format, pt->target,
+ pt->nr_samples,
+ is_depth ? PIPE_BIND_DEPTH_STENCIL :
+ PIPE_BIND_RENDER_TARGET)) {
+ fallback_gen_mipmap(ctx, pt, face, baseLevel, lastLevel);
+ return;
+ }
+
+ /* save state (restored below) */
+ cso_save_blend(ctx->cso);
+ cso_save_depth_stencil_alpha(ctx->cso);
+ cso_save_rasterizer(ctx->cso);
+ cso_save_sample_mask(ctx->cso);
+ cso_save_samplers(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_save_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_save_stream_outputs(ctx->cso);
+ cso_save_framebuffer(ctx->cso);
+ cso_save_fragment_shader(ctx->cso);
+ cso_save_vertex_shader(ctx->cso);
+ cso_save_geometry_shader(ctx->cso);
+ cso_save_viewport(ctx->cso);
+ cso_save_vertex_elements(ctx->cso);
+ cso_save_aux_vertex_buffer_slot(ctx->cso);
+ cso_save_render_condition(ctx->cso);
+
+ /* bind our state */
+ cso_set_blend(ctx->cso, is_depth ? &ctx->blend_keep_color :
+ &ctx->blend_write_color);
+ cso_set_depth_stencil_alpha(ctx->cso, is_depth ? &ctx->dsa_write_depth :
+ &ctx->dsa_keep_depth);
+ cso_set_rasterizer(ctx->cso, &ctx->rasterizer);
+ cso_set_sample_mask(ctx->cso, ~0);
+ cso_set_vertex_elements(ctx->cso, 2, ctx->velem);
+ cso_set_stream_outputs(ctx->cso, 0, NULL, 0);
+ cso_set_render_condition(ctx->cso, NULL, FALSE, 0);
+
+ set_fragment_shader(ctx, type, is_depth);
+ set_vertex_shader(ctx);
+ cso_set_geometry_shader_handle(ctx->cso, NULL);
+
+ /* init framebuffer state */
+ memset(&fb, 0, sizeof(fb));
+
+ /* set min/mag to same filter for faster sw speed */
+ ctx->sampler.mag_img_filter = filter;
+ ctx->sampler.min_img_filter = filter;
+
+ for (dstLevel = baseLevel + 1; dstLevel <= lastLevel; dstLevel++) {
+ const uint srcLevel = dstLevel - 1;
+ struct pipe_viewport_state vp;
+ unsigned nr_layers, layer, i;
+ float rcoord = 0.0f;
+
+ if (pt->target == PIPE_TEXTURE_3D)
+ nr_layers = u_minify(pt->depth0, dstLevel);
+ else if (pt->target == PIPE_TEXTURE_2D_ARRAY || pt->target == PIPE_TEXTURE_1D_ARRAY)
+ nr_layers = pt->array_size;
+ else
+ nr_layers = 1;
+
+ for (i = 0; i < nr_layers; i++) {
+ struct pipe_surface *surf, surf_templ;
+ if (pt->target == PIPE_TEXTURE_3D) {
+ /* in theory with geom shaders and driver with full layer support
+ could do that in one go. */
+ layer = i;
+ /* XXX hmm really? */
+ rcoord = (float)layer / (float)nr_layers + 1.0f / (float)(nr_layers * 2);
+ } else if (pt->target == PIPE_TEXTURE_2D_ARRAY || pt->target == PIPE_TEXTURE_1D_ARRAY) {
+ layer = i;
+ rcoord = (float)layer;
+ } else
+ layer = face;
+
+ u_surface_default_template(&surf_templ, pt);
+ surf_templ.u.tex.level = dstLevel;
+ surf_templ.u.tex.first_layer = layer;
+ surf_templ.u.tex.last_layer = layer;
+ surf = pipe->create_surface(pipe, pt, &surf_templ);
+
+ /*
+ * Setup framebuffer / dest surface
+ */
+ if (is_depth) {
+ fb.nr_cbufs = 0;
+ fb.zsbuf = surf;
+ }
+ else {
+ fb.nr_cbufs = 1;
+ fb.cbufs[0] = surf;
+ }
+ fb.width = u_minify(pt->width0, dstLevel);
+ fb.height = u_minify(pt->height0, dstLevel);
+ cso_set_framebuffer(ctx->cso, &fb);
+
+ /* viewport */
+ vp.scale[0] = 0.5f * fb.width;
+ vp.scale[1] = 0.5f * fb.height;
+ vp.scale[2] = 1.0f;
+ vp.scale[3] = 1.0f;
+ vp.translate[0] = 0.5f * fb.width;
+ vp.translate[1] = 0.5f * fb.height;
+ vp.translate[2] = 0.0f;
+ vp.translate[3] = 0.0f;
+ cso_set_viewport(ctx->cso, &vp);
+
+ /*
+ * Setup sampler state
+ * Note: we should only have to set the min/max LOD clamps to ensure
+ * we grab texels from the right mipmap level. But some hardware
+ * has trouble with min clamping so we also set the lod_bias to
+ * try to work around that.
+ */
+ ctx->sampler.min_lod = ctx->sampler.max_lod = (float) srcLevel;
+ ctx->sampler.lod_bias = (float) srcLevel;
+ cso_single_sampler(ctx->cso, PIPE_SHADER_FRAGMENT, 0, &ctx->sampler);
+ cso_single_sampler_done(ctx->cso, PIPE_SHADER_FRAGMENT);
+
+ cso_set_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT, 1, &psv);
+
+ /* quad coords in clip coords */
+ offset = set_vertex_data(ctx,
+ pt->target,
+ face,
+ rcoord);
+
+ util_draw_vertex_buffer(ctx->pipe,
+ ctx->cso,
+ ctx->vbuf,
+ cso_get_aux_vertex_buffer_slot(ctx->cso),
+ offset,
+ PIPE_PRIM_TRIANGLE_FAN,
+ 4, /* verts */
+ 2); /* attribs/vert */
+
+ /* need to signal that the texture has changed _after_ rendering to it */
+ pipe_surface_reference( &surf, NULL );
+ }
+ ctx->pipe->texture_barrier(ctx->pipe);
+ }
+
+ /* restore state we changed */
+ cso_restore_blend(ctx->cso);
+ cso_restore_depth_stencil_alpha(ctx->cso);
+ cso_restore_rasterizer(ctx->cso);
+ cso_restore_sample_mask(ctx->cso);
+ cso_restore_samplers(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_restore_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_restore_framebuffer(ctx->cso);
+ cso_restore_fragment_shader(ctx->cso);
+ cso_restore_vertex_shader(ctx->cso);
+ cso_restore_geometry_shader(ctx->cso);
+ cso_restore_viewport(ctx->cso);
+ cso_restore_vertex_elements(ctx->cso);
+ cso_restore_stream_outputs(ctx->cso);
+ cso_restore_aux_vertex_buffer_slot(ctx->cso);
+ cso_restore_render_condition(ctx->cso);
+}
diff --git a/src/minigallium/auxiliary/util/u_gen_mipmap.h b/src/minigallium/auxiliary/util/u_gen_mipmap.h
new file mode 100644
index 0000000..1bcc50f
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_gen_mipmap.h
@@ -0,0 +1,64 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_GENMIPMAP_H
+#define U_GENMIPMAP_H
+
+#include "pipe/p_state.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+struct pipe_context;
+struct pipe_resource;
+struct cso_context;
+
+struct gen_mipmap_state;
+
+
+extern struct gen_mipmap_state *
+util_create_gen_mipmap(struct pipe_context *pipe, struct cso_context *cso);
+
+
+extern void
+util_destroy_gen_mipmap(struct gen_mipmap_state *ctx);
+
+
+extern void
+util_gen_mipmap(struct gen_mipmap_state *ctx,
+ struct pipe_sampler_view *psv,
+ uint layer, uint baseLevel, uint lastLevel, uint filter);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_half.h b/src/minigallium/auxiliary/util/u_half.h
new file mode 100644
index 0000000..d340b9a
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_half.h
@@ -0,0 +1,131 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#ifndef U_HALF_H
+#define U_HALF_H
+
+#include "pipe/p_compiler.h"
+#include "util/u_math.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * References for float <-> half conversions
+ *
+ * http://fgiesen.wordpress.com/2012/03/28/half-to-float-done-quic/
+ * https://gist.github.com/2156668
+ * https://gist.github.com/2144712
+ */
+
+static INLINE uint16_t
+util_float_to_half(float f)
+{
+ uint32_t sign_mask = 0x80000000;
+ uint32_t round_mask = ~0xfff;
+ uint32_t f32inf = 0xff << 23;
+ uint32_t f16inf = 0x1f << 23;
+ uint32_t sign;
+ union fi magic;
+ union fi f32;
+ uint16_t f16;
+
+ magic.ui = 0xf << 23;
+
+ f32.f = f;
+
+ /* Sign */
+ sign = f32.ui & sign_mask;
+ f32.ui ^= sign;
+
+ if (f32.ui == f32inf) {
+ /* Inf */
+ f16 = 0x7c00;
+ } else if (f32.ui > f32inf) {
+ /* NaN */
+ f16 = 0x7e00;
+ } else {
+ /* Number */
+ f32.ui &= round_mask;
+ f32.f *= magic.f;
+ f32.ui -= round_mask;
+
+ /*
+ * Clamp to max finite value if overflowed.
+ * OpenGL has completely undefined rounding behavior for float to
+ * half-float conversions, and this matches what is mandated for float
+ * to fp11/fp10, which recommend round-to-nearest-finite too.
+ * (d3d10 is deeply unhappy about flushing such values to infinity, and
+ * while it also mandates round-to-zero it doesn't care nearly as much
+ * about that.)
+ */
+ if (f32.ui > f16inf)
+ f32.ui = f16inf - 1;
+
+ f16 = f32.ui >> 13;
+ }
+
+ /* Sign */
+ f16 |= sign >> 16;
+
+ return f16;
+}
+
+static INLINE float
+util_half_to_float(uint16_t f16)
+{
+ union fi infnan;
+ union fi magic;
+ union fi f32;
+
+ infnan.ui = 0x8f << 23;
+ infnan.f = 65536.0f;
+ magic.ui = 0xef << 23;
+
+ /* Exponent / Mantissa */
+ f32.ui = (f16 & 0x7fff) << 13;
+
+ /* Adjust */
+ f32.f *= magic.f;
+
+ /* Inf / NaN */
+ if (f32.f >= infnan.f)
+ f32.ui |= 0xff << 23;
+
+ /* Sign */
+ f32.ui |= (f16 & 0x8000) << 16;
+
+ return f32.f;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_HALF_H */
+
diff --git a/src/minigallium/auxiliary/util/u_handle_table.c b/src/minigallium/auxiliary/util/u_handle_table.c
new file mode 100644
index 0000000..3703718
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_handle_table.c
@@ -0,0 +1,298 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Generic handle table implementation.
+ *
+ * @author José Fonseca <jrfonseca@tungstengraphics.com>
+ */
+
+
+#include "pipe/p_compiler.h"
+#include "util/u_debug.h"
+
+#include "util/u_memory.h"
+#include "util/u_handle_table.h"
+
+
+#define HANDLE_TABLE_INITIAL_SIZE 16
+
+
+struct handle_table
+{
+ /** Object array. Empty handles have a null object */
+ void **objects;
+
+ /** Number of objects the handle can currently hold */
+ unsigned size;
+ /** Number of consecutive objects allocated at the start of the table */
+ unsigned filled;
+
+ /** Optional object destructor */
+ void (*destroy)(void *object);
+};
+
+
+struct handle_table *
+handle_table_create(void)
+{
+ struct handle_table *ht;
+
+ ht = MALLOC_STRUCT(handle_table);
+ if(!ht)
+ return NULL;
+
+ ht->objects = (void **)CALLOC(HANDLE_TABLE_INITIAL_SIZE, sizeof(void *));
+ if(!ht->objects) {
+ FREE(ht);
+ return NULL;
+ }
+
+ ht->size = HANDLE_TABLE_INITIAL_SIZE;
+ ht->filled = 0;
+
+ ht->destroy = NULL;
+
+ return ht;
+}
+
+
+void
+handle_table_set_destroy(struct handle_table *ht,
+ void (*destroy)(void *object))
+{
+ assert(ht);
+ if (!ht)
+ return;
+ ht->destroy = destroy;
+}
+
+
+/**
+ * Resize the table if necessary
+ */
+static INLINE int
+handle_table_resize(struct handle_table *ht,
+ unsigned minimum_size)
+{
+ unsigned new_size;
+ void **new_objects;
+
+ if(ht->size > minimum_size)
+ return ht->size;
+
+ new_size = ht->size;
+ while(!(new_size > minimum_size))
+ new_size *= 2;
+ assert(new_size);
+
+ new_objects = (void **)REALLOC((void *)ht->objects,
+ ht->size*sizeof(void *),
+ new_size*sizeof(void *));
+ if(!new_objects)
+ return 0;
+
+ memset(new_objects + ht->size, 0, (new_size - ht->size)*sizeof(void *));
+
+ ht->size = new_size;
+ ht->objects = new_objects;
+
+ return ht->size;
+}
+
+
+static INLINE void
+handle_table_clear(struct handle_table *ht,
+ unsigned index)
+{
+ void *object;
+
+ /* The order here is important so that the object being destroyed is not
+ * present in the table when seen by the destroy callback, because the
+ * destroy callback may directly or indirectly call the other functions in
+ * this module.
+ */
+
+ object = ht->objects[index];
+ if(object) {
+ ht->objects[index] = NULL;
+
+ if(ht->destroy)
+ ht->destroy(object);
+ }
+}
+
+
+unsigned
+handle_table_add(struct handle_table *ht,
+ void *object)
+{
+ unsigned index;
+ unsigned handle;
+
+ assert(ht);
+ assert(object);
+ if(!object || !ht)
+ return 0;
+
+ /* linear search for an empty handle */
+ while(ht->filled < ht->size) {
+ if(!ht->objects[ht->filled])
+ break;
+ ++ht->filled;
+ }
+
+ index = ht->filled;
+ handle = index + 1;
+
+ /* check integer overflow */
+ if(!handle)
+ return 0;
+
+ /* grow the table if necessary */
+ if(!handle_table_resize(ht, index))
+ return 0;
+
+ assert(!ht->objects[index]);
+ ht->objects[index] = object;
+ ++ht->filled;
+
+ return handle;
+}
+
+
+unsigned
+handle_table_set(struct handle_table *ht,
+ unsigned handle,
+ void *object)
+{
+ unsigned index;
+
+ assert(ht);
+ assert(handle);
+ if(!handle || !ht)
+ return 0;
+
+ assert(object);
+ if(!object)
+ return 0;
+
+ index = handle - 1;
+
+ /* grow the table if necessary */
+ if(!handle_table_resize(ht, index))
+ return 0;
+
+ handle_table_clear(ht, index);
+
+ ht->objects[index] = object;
+
+ return handle;
+}
+
+
+void *
+handle_table_get(struct handle_table *ht,
+ unsigned handle)
+{
+ void *object;
+
+ assert(ht);
+ assert(handle);
+ if(!handle || !ht || handle > ht->size)
+ return NULL;
+
+ object = ht->objects[handle - 1];
+
+ return object;
+}
+
+
+void
+handle_table_remove(struct handle_table *ht,
+ unsigned handle)
+{
+ void *object;
+ unsigned index;
+
+ assert(ht);
+ assert(handle);
+ if(!handle || !ht || handle > ht->size)
+ return;
+
+ index = handle - 1;
+ object = ht->objects[index];
+ if(!object)
+ return;
+
+ handle_table_clear(ht, index);
+
+ if(index < ht->filled)
+ ht->filled = index;
+}
+
+
+unsigned
+handle_table_get_next_handle(struct handle_table *ht,
+ unsigned handle)
+{
+ unsigned index;
+
+ for(index = handle; index < ht->size; ++index) {
+ if(ht->objects[index])
+ return index + 1;
+ }
+
+ return 0;
+}
+
+
+unsigned
+handle_table_get_first_handle(struct handle_table *ht)
+{
+ return handle_table_get_next_handle(ht, 0);
+}
+
+
+void
+handle_table_destroy(struct handle_table *ht)
+{
+ unsigned index;
+ assert(ht);
+
+ if (!ht)
+ return;
+
+ if(ht->destroy)
+ for(index = 0; index < ht->size; ++index)
+ handle_table_clear(ht, index);
+
+ FREE(ht->objects);
+ FREE(ht);
+}
+
diff --git a/src/minigallium/auxiliary/util/u_handle_table.h b/src/minigallium/auxiliary/util/u_handle_table.h
new file mode 100644
index 0000000..d080135
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_handle_table.h
@@ -0,0 +1,116 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Generic handle table.
+ *
+ * @author José Fonseca <jrfonseca@tungstengraphics.com>
+ */
+
+#ifndef U_HANDLE_TABLE_H_
+#define U_HANDLE_TABLE_H_
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * Abstract data type to map integer handles to objects.
+ *
+ * Also referred as "pointer array".
+ */
+struct handle_table;
+
+
+struct handle_table *
+handle_table_create(void);
+
+
+/**
+ * Set an optional destructor callback.
+ *
+ * If set, it will be called during handle_table_remove and
+ * handle_table_destroy calls.
+ */
+void
+handle_table_set_destroy(struct handle_table *ht,
+ void (*destroy)(void *object));
+
+
+/**
+ * Add a new object.
+ *
+ * Returns a zero handle on failure (out of memory).
+ */
+unsigned
+handle_table_add(struct handle_table *ht,
+ void *object);
+
+/**
+ * Returns zero on failure (out of memory).
+ */
+unsigned
+handle_table_set(struct handle_table *ht,
+ unsigned handle,
+ void *object);
+
+/**
+ * Fetch an existing object.
+ *
+ * Returns NULL for an invalid handle.
+ */
+void *
+handle_table_get(struct handle_table *ht,
+ unsigned handle);
+
+
+void
+handle_table_remove(struct handle_table *ht,
+ unsigned handle);
+
+
+void
+handle_table_destroy(struct handle_table *ht);
+
+
+unsigned
+handle_table_get_first_handle(struct handle_table *ht);
+
+
+unsigned
+handle_table_get_next_handle(struct handle_table *ht,
+ unsigned handle);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_HANDLE_TABLE_H_ */
diff --git a/src/minigallium/auxiliary/util/u_hash.c b/src/minigallium/auxiliary/util/u_hash.c
new file mode 100644
index 0000000..b67653e
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_hash.c
@@ -0,0 +1,121 @@
+/**************************************************************************
+ *
+ * Copyright 2008 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Hash functions implementation.
+ *
+ * @author Jose Fonseca
+ */
+
+
+#include "u_hash.h"
+
+
+static const uint32_t
+util_crc32_table[256] = {
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
+ 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
+ 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
+ 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
+ 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+ 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
+ 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
+ 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
+ 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
+ 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+ 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940,
+ 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
+ 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116,
+ 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
+ 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
+ 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a,
+ 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
+ 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818,
+ 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+ 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
+ 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
+ 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c,
+ 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
+ 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+ 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
+ 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
+ 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
+ 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086,
+ 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4,
+ 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
+ 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
+ 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
+ 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+ 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
+ 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe,
+ 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
+ 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
+ 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+ 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252,
+ 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
+ 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60,
+ 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
+ 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
+ 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04,
+ 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
+ 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
+ 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+ 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
+ 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
+ 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e,
+ 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
+ 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+ 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
+ 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
+ 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
+ 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0,
+ 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6,
+ 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
+ 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
+ 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
+};
+
+
+/**
+ * @sa http://www.w3.org/TR/PNG/#D-CRCAppendix
+ */
+uint32_t
+util_hash_crc32(const void *data, size_t size)
+{
+ uint8_t *p = (uint8_t *)data;
+ uint32_t crc = 0xffffffff;
+
+ while (size--)
+ crc = util_crc32_table[(crc ^ *p++) & 0xff] ^ (crc >> 8);
+
+ return crc;
+}
diff --git a/src/minigallium/auxiliary/util/u_hash.h b/src/minigallium/auxiliary/util/u_hash.h
new file mode 100644
index 0000000..8d92b07
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_hash.h
@@ -0,0 +1,55 @@
+/**************************************************************************
+ *
+ * Copyright 2008 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Hash functions.
+ *
+ * @author Jose Fonseca <jfonseca@vmware.com>
+ */
+
+#ifndef U_HASH_H_
+#define U_HASH_H_
+
+
+#include "pipe/p_compiler.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+uint32_t
+util_hash_crc32(const void *data, size_t size);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_HASH_H_ */
diff --git a/src/minigallium/auxiliary/util/u_hash_table.c b/src/minigallium/auxiliary/util/u_hash_table.c
new file mode 100644
index 0000000..5604e3a
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_hash_table.c
@@ -0,0 +1,293 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * General purpose hash table implementation.
+ *
+ * Just uses the cso_hash for now, but it might be better switch to a linear
+ * probing hash table implementation at some point -- as it is said they have
+ * better lookup and cache performance and it appears to be possible to write
+ * a lock-free implementation of such hash tables .
+ *
+ * @author José Fonseca <jrfonseca@tungstengraphics.com>
+ */
+
+
+#include "pipe/p_compiler.h"
+#include "util/u_debug.h"
+
+#include "cso_cache/cso_hash.h"
+
+#include "util/u_memory.h"
+#include "util/u_hash_table.h"
+
+
+struct util_hash_table
+{
+ struct cso_hash *cso;
+
+ /** Hash function */
+ unsigned (*hash)(void *key);
+
+ /** Compare two keys */
+ int (*compare)(void *key1, void *key2);
+
+ /* TODO: key, value destructors? */
+};
+
+
+struct util_hash_table_item
+{
+ void *key;
+ void *value;
+};
+
+
+static INLINE struct util_hash_table_item *
+util_hash_table_item(struct cso_hash_iter iter)
+{
+ return (struct util_hash_table_item *)cso_hash_iter_data(iter);
+}
+
+
+struct util_hash_table *
+util_hash_table_create(unsigned (*hash)(void *key),
+ int (*compare)(void *key1, void *key2))
+{
+ struct util_hash_table *ht;
+
+ ht = MALLOC_STRUCT(util_hash_table);
+ if(!ht)
+ return NULL;
+
+ ht->cso = cso_hash_create();
+ if(!ht->cso) {
+ FREE(ht);
+ return NULL;
+ }
+
+ ht->hash = hash;
+ ht->compare = compare;
+
+ return ht;
+}
+
+
+static INLINE struct cso_hash_iter
+util_hash_table_find_iter(struct util_hash_table *ht,
+ void *key,
+ unsigned key_hash)
+{
+ struct cso_hash_iter iter;
+ struct util_hash_table_item *item;
+
+ iter = cso_hash_find(ht->cso, key_hash);
+ while (!cso_hash_iter_is_null(iter)) {
+ item = (struct util_hash_table_item *)cso_hash_iter_data(iter);
+ if (!ht->compare(item->key, key))
+ break;
+ iter = cso_hash_iter_next(iter);
+ }
+
+ return iter;
+}
+
+
+static INLINE struct util_hash_table_item *
+util_hash_table_find_item(struct util_hash_table *ht,
+ void *key,
+ unsigned key_hash)
+{
+ struct cso_hash_iter iter;
+ struct util_hash_table_item *item;
+
+ iter = cso_hash_find(ht->cso, key_hash);
+ while (!cso_hash_iter_is_null(iter)) {
+ item = (struct util_hash_table_item *)cso_hash_iter_data(iter);
+ if (!ht->compare(item->key, key))
+ return item;
+ iter = cso_hash_iter_next(iter);
+ }
+
+ return NULL;
+}
+
+
+enum pipe_error
+util_hash_table_set(struct util_hash_table *ht,
+ void *key,
+ void *value)
+{
+ unsigned key_hash;
+ struct util_hash_table_item *item;
+ struct cso_hash_iter iter;
+
+ assert(ht);
+ if (!ht)
+ return PIPE_ERROR_BAD_INPUT;
+
+ key_hash = ht->hash(key);
+
+ item = util_hash_table_find_item(ht, key, key_hash);
+ if(item) {
+ /* TODO: key/value destruction? */
+ item->value = value;
+ return PIPE_OK;
+ }
+
+ item = MALLOC_STRUCT(util_hash_table_item);
+ if(!item)
+ return PIPE_ERROR_OUT_OF_MEMORY;
+
+ item->key = key;
+ item->value = value;
+
+ iter = cso_hash_insert(ht->cso, key_hash, item);
+ if(cso_hash_iter_is_null(iter)) {
+ FREE(item);
+ return PIPE_ERROR_OUT_OF_MEMORY;
+ }
+
+ return PIPE_OK;
+}
+
+
+void *
+util_hash_table_get(struct util_hash_table *ht,
+ void *key)
+{
+ unsigned key_hash;
+ struct util_hash_table_item *item;
+
+ assert(ht);
+ if (!ht)
+ return NULL;
+
+ key_hash = ht->hash(key);
+
+ item = util_hash_table_find_item(ht, key, key_hash);
+ if(!item)
+ return NULL;
+
+ return item->value;
+}
+
+
+void
+util_hash_table_remove(struct util_hash_table *ht,
+ void *key)
+{
+ unsigned key_hash;
+ struct cso_hash_iter iter;
+ struct util_hash_table_item *item;
+
+ assert(ht);
+ if (!ht)
+ return;
+
+ key_hash = ht->hash(key);
+
+ iter = util_hash_table_find_iter(ht, key, key_hash);
+ if(cso_hash_iter_is_null(iter))
+ return;
+
+ item = util_hash_table_item(iter);
+ assert(item);
+ FREE(item);
+
+ cso_hash_erase(ht->cso, iter);
+}
+
+
+void
+util_hash_table_clear(struct util_hash_table *ht)
+{
+ struct cso_hash_iter iter;
+ struct util_hash_table_item *item;
+
+ assert(ht);
+ if (!ht)
+ return;
+
+ iter = cso_hash_first_node(ht->cso);
+ while (!cso_hash_iter_is_null(iter)) {
+ item = (struct util_hash_table_item *)cso_hash_take(ht->cso, cso_hash_iter_key(iter));
+ FREE(item);
+ iter = cso_hash_first_node(ht->cso);
+ }
+}
+
+
+enum pipe_error
+util_hash_table_foreach(struct util_hash_table *ht,
+ enum pipe_error (*callback)
+ (void *key, void *value, void *data),
+ void *data)
+{
+ struct cso_hash_iter iter;
+ struct util_hash_table_item *item;
+ enum pipe_error result;
+
+ assert(ht);
+ if (!ht)
+ return PIPE_ERROR_BAD_INPUT;
+
+ iter = cso_hash_first_node(ht->cso);
+ while (!cso_hash_iter_is_null(iter)) {
+ item = (struct util_hash_table_item *)cso_hash_iter_data(iter);
+ result = callback(item->key, item->value, data);
+ if(result != PIPE_OK)
+ return result;
+ iter = cso_hash_iter_next(iter);
+ }
+
+ return PIPE_OK;
+}
+
+
+void
+util_hash_table_destroy(struct util_hash_table *ht)
+{
+ struct cso_hash_iter iter;
+ struct util_hash_table_item *item;
+
+ assert(ht);
+ if (!ht)
+ return;
+
+ iter = cso_hash_first_node(ht->cso);
+ while (!cso_hash_iter_is_null(iter)) {
+ item = (struct util_hash_table_item *)cso_hash_iter_data(iter);
+ FREE(item);
+ iter = cso_hash_iter_next(iter);
+ }
+
+ cso_hash_delete(ht->cso);
+
+ FREE(ht);
+}
diff --git a/src/minigallium/auxiliary/util/u_hash_table.h b/src/minigallium/auxiliary/util/u_hash_table.h
new file mode 100644
index 0000000..51ec10a
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_hash_table.h
@@ -0,0 +1,96 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * General purpose hash table.
+ *
+ * @author José Fonseca <jrfonseca@tungstengraphics.com>
+ */
+
+#ifndef U_HASH_TABLE_H_
+#define U_HASH_TABLE_H_
+
+
+#include "pipe/p_defines.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * Generic purpose hash table.
+ */
+struct util_hash_table;
+
+
+/**
+ * Create an hash table.
+ *
+ * @param hash hash function
+ * @param compare should return 0 for two equal keys.
+ */
+struct util_hash_table *
+util_hash_table_create(unsigned (*hash)(void *key),
+ int (*compare)(void *key1, void *key2));
+
+
+enum pipe_error
+util_hash_table_set(struct util_hash_table *ht,
+ void *key,
+ void *value);
+
+void *
+util_hash_table_get(struct util_hash_table *ht,
+ void *key);
+
+
+void
+util_hash_table_remove(struct util_hash_table *ht,
+ void *key);
+
+
+void
+util_hash_table_clear(struct util_hash_table *ht);
+
+
+enum pipe_error
+util_hash_table_foreach(struct util_hash_table *ht,
+ enum pipe_error (*callback)
+ (void *key, void *value, void *data),
+ void *data);
+
+void
+util_hash_table_destroy(struct util_hash_table *ht);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_HASH_TABLE_H_ */
diff --git a/src/minigallium/auxiliary/util/u_helpers.c b/src/minigallium/auxiliary/util/u_helpers.c
new file mode 100644
index 0000000..ac1edcd
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_helpers.c
@@ -0,0 +1,90 @@
+/**************************************************************************
+ *
+ * Copyright 2012 Marek Olšák <maraeo@gmail.com>
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS AND/OR THEIR SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "util/u_helpers.h"
+#include "util/u_inlines.h"
+
+/**
+ * This function is used to copy an array of pipe_vertex_buffer structures,
+ * while properly referencing the pipe_vertex_buffer::buffer member.
+ *
+ * enabled_buffers is updated such that the bits corresponding to the indices
+ * of disabled buffers are set to 0 and the enabled ones are set to 1.
+ *
+ * \sa util_copy_framebuffer_state
+ */
+void util_set_vertex_buffers_mask(struct pipe_vertex_buffer *dst,
+ uint32_t *enabled_buffers,
+ const struct pipe_vertex_buffer *src,
+ unsigned start_slot, unsigned count)
+{
+ unsigned i;
+ uint32_t bitmask = 0;
+
+ dst += start_slot;
+
+ if (src) {
+ for (i = 0; i < count; i++) {
+ if (src[i].buffer || src[i].user_buffer) {
+ bitmask |= 1 << i;
+ }
+ pipe_resource_reference(&dst[i].buffer, src[i].buffer);
+ }
+
+ /* Copy over the other members of pipe_vertex_buffer. */
+ memcpy(dst, src, count * sizeof(struct pipe_vertex_buffer));
+
+ *enabled_buffers &= ~(((1ull << count) - 1) << start_slot);
+ *enabled_buffers |= bitmask << start_slot;
+ }
+ else {
+ /* Unreference the buffers. */
+ for (i = 0; i < count; i++) {
+ pipe_resource_reference(&dst[i].buffer, NULL);
+ dst[i].user_buffer = NULL;
+ }
+
+ *enabled_buffers &= ~(((1ull << count) - 1) << start_slot);
+ }
+}
+
+/**
+ * Same as util_set_vertex_buffers_mask, but it only returns the number
+ * of bound buffers.
+ */
+void util_set_vertex_buffers_count(struct pipe_vertex_buffer *dst,
+ unsigned *dst_count,
+ const struct pipe_vertex_buffer *src,
+ unsigned start_slot, unsigned count)
+{
+ uint32_t enabled_buffers = (1ull << *dst_count) - 1;
+
+ util_set_vertex_buffers_mask(dst, &enabled_buffers, src, start_slot,
+ count);
+
+ *dst_count = util_last_bit(enabled_buffers);
+}
diff --git a/src/minigallium/auxiliary/util/u_helpers.h b/src/minigallium/auxiliary/util/u_helpers.h
new file mode 100644
index 0000000..09c7116
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_helpers.h
@@ -0,0 +1,51 @@
+/**************************************************************************
+ *
+ * Copyright 2012 Marek Olšák <maraeo@gmail.com>
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS AND/OR THEIR SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_HELPERS_H
+#define U_HELPERS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "pipe/p_state.h"
+
+void util_set_vertex_buffers_mask(struct pipe_vertex_buffer *dst,
+ uint32_t *enabled_buffers,
+ const struct pipe_vertex_buffer *src,
+ unsigned start_slot, unsigned count);
+
+void util_set_vertex_buffers_count(struct pipe_vertex_buffer *dst,
+ unsigned *dst_count,
+ const struct pipe_vertex_buffer *src,
+ unsigned start_slot, unsigned count);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_index_modify.c b/src/minigallium/auxiliary/util/u_index_modify.c
new file mode 100644
index 0000000..5e3fd46
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_index_modify.c
@@ -0,0 +1,203 @@
+/*
+ * Copyright 2010 Marek Olšák <maraeo@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE. */
+
+#include "pipe/p_context.h"
+#include "util/u_index_modify.h"
+#include "util/u_inlines.h"
+
+/* Ubyte indices. */
+
+void util_shorten_ubyte_elts_to_userptr(struct pipe_context *context,
+ struct pipe_index_buffer *ib,
+ int index_bias,
+ unsigned start,
+ unsigned count,
+ void *out)
+{
+ struct pipe_transfer *src_transfer = NULL;
+ const unsigned char *in_map;
+ unsigned short *out_map = out;
+ unsigned i;
+
+ if (ib->user_buffer) {
+ in_map = ib->user_buffer;
+ } else {
+ in_map = pipe_buffer_map(context, ib->buffer,
+ PIPE_TRANSFER_READ |
+ PIPE_TRANSFER_UNSYNCHRONIZED,
+ &src_transfer);
+ }
+ in_map += start;
+
+ for (i = 0; i < count; i++) {
+ *out_map = (unsigned short)(*in_map + index_bias);
+ in_map++;
+ out_map++;
+ }
+
+ if (src_transfer)
+ pipe_buffer_unmap(context, src_transfer);
+}
+
+void util_shorten_ubyte_elts(struct pipe_context *context,
+ struct pipe_index_buffer *ib,
+ struct pipe_resource **out_buf,
+ int index_bias,
+ unsigned start,
+ unsigned count)
+{
+ struct pipe_resource* new_elts;
+ unsigned short *out_map;
+ struct pipe_transfer *dst_transfer;
+
+ new_elts = pipe_buffer_create(context->screen,
+ PIPE_BIND_INDEX_BUFFER,
+ PIPE_USAGE_STATIC,
+ 2 * count);
+
+ out_map = pipe_buffer_map(context, new_elts, PIPE_TRANSFER_WRITE,
+ &dst_transfer);
+ util_shorten_ubyte_elts_to_userptr(context, ib, index_bias,
+ start, count, out_map);
+ pipe_buffer_unmap(context, dst_transfer);
+
+ pipe_resource_reference(out_buf, NULL);
+ *out_buf = new_elts;
+}
+
+
+/* Ushort indices. */
+
+void util_rebuild_ushort_elts_to_userptr(struct pipe_context *context,
+ struct pipe_index_buffer *ib,
+ int index_bias,
+ unsigned start, unsigned count,
+ void *out)
+{
+ struct pipe_transfer *in_transfer = NULL;
+ const unsigned short *in_map;
+ unsigned short *out_map = out;
+ unsigned i;
+
+ if (ib->user_buffer) {
+ in_map = ib->user_buffer;
+ } else {
+ in_map = pipe_buffer_map(context, ib->buffer,
+ PIPE_TRANSFER_READ |
+ PIPE_TRANSFER_UNSYNCHRONIZED,
+ &in_transfer);
+ }
+ in_map += start;
+
+ for (i = 0; i < count; i++) {
+ *out_map = (unsigned short)(*in_map + index_bias);
+ in_map++;
+ out_map++;
+ }
+
+ if (in_transfer)
+ pipe_buffer_unmap(context, in_transfer);
+}
+
+void util_rebuild_ushort_elts(struct pipe_context *context,
+ struct pipe_index_buffer *ib,
+ struct pipe_resource **out_buf,
+ int index_bias,
+ unsigned start, unsigned count)
+{
+ struct pipe_transfer *out_transfer = NULL;
+ struct pipe_resource *new_elts;
+ unsigned short *out_map;
+
+ new_elts = pipe_buffer_create(context->screen,
+ PIPE_BIND_INDEX_BUFFER,
+ PIPE_USAGE_STATIC,
+ 2 * count);
+
+ out_map = pipe_buffer_map(context, new_elts,
+ PIPE_TRANSFER_WRITE, &out_transfer);
+ util_rebuild_ushort_elts_to_userptr(context, ib, index_bias,
+ start, count, out_map);
+ pipe_buffer_unmap(context, out_transfer);
+
+ pipe_resource_reference(out_buf, NULL);
+ *out_buf = new_elts;
+}
+
+
+/* Uint indices. */
+
+void util_rebuild_uint_elts_to_userptr(struct pipe_context *context,
+ struct pipe_index_buffer *ib,
+ int index_bias,
+ unsigned start, unsigned count,
+ void *out)
+{
+ struct pipe_transfer *in_transfer = NULL;
+ const unsigned int *in_map;
+ unsigned int *out_map = out;
+ unsigned i;
+
+ if (ib->user_buffer) {
+ in_map = ib->user_buffer;
+ } else {
+ in_map = pipe_buffer_map(context, ib->buffer,
+ PIPE_TRANSFER_READ |
+ PIPE_TRANSFER_UNSYNCHRONIZED,
+ &in_transfer);
+ }
+ in_map += start;
+
+ for (i = 0; i < count; i++) {
+ *out_map = (unsigned int)(*in_map + index_bias);
+ in_map++;
+ out_map++;
+ }
+
+ if (in_transfer)
+ pipe_buffer_unmap(context, in_transfer);
+}
+
+void util_rebuild_uint_elts(struct pipe_context *context,
+ struct pipe_index_buffer *ib,
+ struct pipe_resource **out_buf,
+ int index_bias,
+ unsigned start, unsigned count)
+{
+ struct pipe_transfer *out_transfer = NULL;
+ struct pipe_resource *new_elts;
+ unsigned int *out_map;
+
+ new_elts = pipe_buffer_create(context->screen,
+ PIPE_BIND_INDEX_BUFFER,
+ PIPE_USAGE_STATIC,
+ 2 * count);
+
+ out_map = pipe_buffer_map(context, new_elts,
+ PIPE_TRANSFER_WRITE, &out_transfer);
+ util_rebuild_uint_elts_to_userptr(context, ib, index_bias,
+ start, count, out_map);
+ pipe_buffer_unmap(context, out_transfer);
+
+ pipe_resource_reference(out_buf, NULL);
+ *out_buf = new_elts;
+}
diff --git a/src/minigallium/auxiliary/util/u_index_modify.h b/src/minigallium/auxiliary/util/u_index_modify.h
new file mode 100644
index 0000000..6afce50
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_index_modify.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2010 Marek Olšák <maraeo@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE. */
+
+#ifndef UTIL_INDEX_MODIFY_H
+#define UTIL_INDEX_MODIFY_H
+
+struct pipe_context;
+struct pipe_resource;
+struct pipe_index_buffer;
+
+void util_shorten_ubyte_elts_to_userptr(struct pipe_context *context,
+ struct pipe_index_buffer *ib,
+ int index_bias,
+ unsigned start,
+ unsigned count,
+ void *out);
+
+void util_shorten_ubyte_elts(struct pipe_context *context,
+ struct pipe_index_buffer *ib,
+ struct pipe_resource **out_buf,
+ int index_bias,
+ unsigned start,
+ unsigned count);
+
+
+
+void util_rebuild_ushort_elts_to_userptr(struct pipe_context *context,
+ struct pipe_index_buffer *ib,
+ int index_bias,
+ unsigned start, unsigned count,
+ void *out);
+
+void util_rebuild_ushort_elts(struct pipe_context *context,
+ struct pipe_index_buffer *ib,
+ struct pipe_resource **out_buf,
+ int index_bias,
+ unsigned start, unsigned count);
+
+
+
+void util_rebuild_uint_elts_to_userptr(struct pipe_context *context,
+ struct pipe_index_buffer *ib,
+ int index_bias,
+ unsigned start, unsigned count,
+ void *out);
+
+void util_rebuild_uint_elts(struct pipe_context *context,
+ struct pipe_index_buffer *ib,
+ struct pipe_resource **out_buf,
+ int index_bias,
+ unsigned start, unsigned count);
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_init.h b/src/minigallium/auxiliary/util/u_init.h
new file mode 100644
index 0000000..7bc356a
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_init.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_INIT_H
+#define U_INIT_H
+
+/* Use UTIL_INIT(f) to have f called at program initialization.
+ Note that it is only guaranteed to be called if any symbol in the
+ .c file it is in sis referenced by the program.
+
+ UTIL_INIT functions are called in arbitrary order.
+*/
+
+#ifdef __cplusplus
+/* use a C++ global constructor */
+#define UTIL_INIT(f) struct f##__gctor_t {f##__gctor_t() {x();}} f##__gctor;
+#elif defined(_MSC_VER)
+/* add a pointer to the section where MSVC stores global constructor pointers */
+/* see http://blogs.msdn.com/vcblog/archive/2006/10/20/crt-initialization.aspx and
+ http://stackoverflow.com/questions/1113409/attribute-constructor-equivalent-in-vc */
+#pragma section(".CRT$XCU",read)
+#define UTIL_INIT(f) static void __cdecl f##__init(void) {f();}; __declspec(allocate(".CRT$XCU")) void (__cdecl* f##__xcu)(void) = f##__init;
+#elif defined(__GNUC__)
+#define UTIL_INIT(f) static void f##__init(void) __attribute__((constructor)); static void f##__init(void) {f();}
+#else
+#error Unsupported compiler: please find out how to implement global initializers in C on it
+#endif
+
+#endif
+
diff --git a/src/minigallium/auxiliary/util/u_inlines.h b/src/minigallium/auxiliary/util/u_inlines.h
new file mode 100644
index 0000000..7a82f05
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_inlines.h
@@ -0,0 +1,644 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_INLINES_H
+#define U_INLINES_H
+
+#include "pipe/p_context.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_shader_tokens.h"
+#include "pipe/p_state.h"
+#include "pipe/p_screen.h"
+#include "util/u_debug.h"
+#include "util/u_debug_describe.h"
+#include "util/u_debug_refcnt.h"
+#include "util/u_atomic.h"
+#include "util/u_box.h"
+#include "util/u_math.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+ * Reference counting helper functions.
+ */
+
+
+static INLINE void
+pipe_reference_init(struct pipe_reference *reference, unsigned count)
+{
+ p_atomic_set(&reference->count, count);
+}
+
+static INLINE boolean
+pipe_is_referenced(struct pipe_reference *reference)
+{
+ return p_atomic_read(&reference->count) != 0;
+}
+
+/**
+ * Update reference counting.
+ * The old thing pointed to, if any, will be unreferenced.
+ * Both 'ptr' and 'reference' may be NULL.
+ * \return TRUE if the object's refcount hits zero and should be destroyed.
+ */
+static INLINE boolean
+pipe_reference_described(struct pipe_reference *ptr,
+ struct pipe_reference *reference,
+ debug_reference_descriptor get_desc)
+{
+ boolean destroy = FALSE;
+
+ if(ptr != reference) {
+ /* bump the reference.count first */
+ if (reference) {
+ assert(pipe_is_referenced(reference));
+ p_atomic_inc(&reference->count);
+ debug_reference(reference, get_desc, 1);
+ }
+
+ if (ptr) {
+ assert(pipe_is_referenced(ptr));
+ if (p_atomic_dec_zero(&ptr->count)) {
+ destroy = TRUE;
+ }
+ debug_reference(ptr, get_desc, -1);
+ }
+ }
+
+ return destroy;
+}
+
+static INLINE boolean
+pipe_reference(struct pipe_reference *ptr, struct pipe_reference *reference)
+{
+ return pipe_reference_described(ptr, reference,
+ (debug_reference_descriptor)debug_describe_reference);
+}
+
+static INLINE void
+pipe_surface_reference(struct pipe_surface **ptr, struct pipe_surface *surf)
+{
+ struct pipe_surface *old_surf = *ptr;
+
+ if (pipe_reference_described(&(*ptr)->reference, &surf->reference,
+ (debug_reference_descriptor)debug_describe_surface))
+ old_surf->context->surface_destroy(old_surf->context, old_surf);
+ *ptr = surf;
+}
+
+/**
+ * Similar to pipe_surface_reference() but always set the pointer to NULL
+ * and pass in an explicit context. The explicit context avoids the problem
+ * of using a deleted context's surface_destroy() method when freeing a surface
+ * that's shared by multiple contexts.
+ */
+static INLINE void
+pipe_surface_release(struct pipe_context *pipe, struct pipe_surface **ptr)
+{
+ if (pipe_reference_described(&(*ptr)->reference, NULL,
+ (debug_reference_descriptor)debug_describe_surface))
+ pipe->surface_destroy(pipe, *ptr);
+ *ptr = NULL;
+}
+
+
+static INLINE void
+pipe_resource_reference(struct pipe_resource **ptr, struct pipe_resource *tex)
+{
+ struct pipe_resource *old_tex = *ptr;
+
+ if (pipe_reference_described(&(*ptr)->reference, &tex->reference,
+ (debug_reference_descriptor)debug_describe_resource))
+ old_tex->screen->resource_destroy(old_tex->screen, old_tex);
+ *ptr = tex;
+}
+
+static INLINE void
+pipe_sampler_view_reference(struct pipe_sampler_view **ptr, struct pipe_sampler_view *view)
+{
+ struct pipe_sampler_view *old_view = *ptr;
+
+ if (pipe_reference_described(&(*ptr)->reference, &view->reference,
+ (debug_reference_descriptor)debug_describe_sampler_view))
+ old_view->context->sampler_view_destroy(old_view->context, old_view);
+ *ptr = view;
+}
+
+/**
+ * Similar to pipe_sampler_view_reference() but always set the pointer to
+ * NULL and pass in an explicit context. Passing an explicit context is a
+ * work-around for fixing a dangling context pointer problem when textures
+ * are shared by multiple contexts. XXX fix this someday.
+ */
+static INLINE void
+pipe_sampler_view_release(struct pipe_context *ctx,
+ struct pipe_sampler_view **ptr)
+{
+ struct pipe_sampler_view *old_view = *ptr;
+ if (*ptr && (*ptr)->context != ctx) {
+ debug_printf_once(("context mis-match in pipe_sampler_view_release()\n"));
+ }
+ if (pipe_reference_described(&(*ptr)->reference, NULL,
+ (debug_reference_descriptor)debug_describe_sampler_view)) {
+ ctx->sampler_view_destroy(ctx, old_view);
+ }
+ *ptr = NULL;
+}
+
+
+static INLINE void
+pipe_so_target_reference(struct pipe_stream_output_target **ptr,
+ struct pipe_stream_output_target *target)
+{
+ struct pipe_stream_output_target *old = *ptr;
+
+ if (pipe_reference_described(&(*ptr)->reference, &target->reference,
+ (debug_reference_descriptor)debug_describe_so_target))
+ old->context->stream_output_target_destroy(old->context, old);
+ *ptr = target;
+}
+
+static INLINE void
+pipe_surface_reset(struct pipe_context *ctx, struct pipe_surface* ps,
+ struct pipe_resource *pt, unsigned level, unsigned layer)
+{
+ pipe_resource_reference(&ps->texture, pt);
+ ps->format = pt->format;
+ ps->width = u_minify(pt->width0, level);
+ ps->height = u_minify(pt->height0, level);
+ ps->u.tex.level = level;
+ ps->u.tex.first_layer = ps->u.tex.last_layer = layer;
+ ps->context = ctx;
+}
+
+static INLINE void
+pipe_surface_init(struct pipe_context *ctx, struct pipe_surface* ps,
+ struct pipe_resource *pt, unsigned level, unsigned layer)
+{
+ ps->texture = 0;
+ pipe_reference_init(&ps->reference, 1);
+ pipe_surface_reset(ctx, ps, pt, level, layer);
+}
+
+/* Return true if the surfaces are equal. */
+static INLINE boolean
+pipe_surface_equal(struct pipe_surface *s1, struct pipe_surface *s2)
+{
+ return s1->texture == s2->texture &&
+ s1->format == s2->format &&
+ (s1->texture->target != PIPE_BUFFER ||
+ (s1->u.buf.first_element == s2->u.buf.first_element &&
+ s1->u.buf.last_element == s2->u.buf.last_element)) &&
+ (s1->texture->target == PIPE_BUFFER ||
+ (s1->u.tex.level == s2->u.tex.level &&
+ s1->u.tex.first_layer == s2->u.tex.first_layer &&
+ s1->u.tex.last_layer == s2->u.tex.last_layer));
+}
+
+/*
+ * Convenience wrappers for screen buffer functions.
+ */
+
+
+/**
+ * Create a new resource.
+ * \param bind bitmask of PIPE_BIND_x flags
+ * \param usage bitmask of PIPE_USAGE_x flags
+ */
+static INLINE struct pipe_resource *
+pipe_buffer_create( struct pipe_screen *screen,
+ unsigned bind,
+ unsigned usage,
+ unsigned size )
+{
+ struct pipe_resource buffer;
+ memset(&buffer, 0, sizeof buffer);
+ buffer.target = PIPE_BUFFER;
+ buffer.format = PIPE_FORMAT_R8_UNORM; /* want TYPELESS or similar */
+ buffer.bind = bind;
+ buffer.usage = usage;
+ buffer.flags = 0;
+ buffer.width0 = size;
+ buffer.height0 = 1;
+ buffer.depth0 = 1;
+ buffer.array_size = 1;
+ return screen->resource_create(screen, &buffer);
+}
+
+
+/**
+ * Map a range of a resource.
+ * \param offset start of region, in bytes
+ * \param length size of region, in bytes
+ * \param access bitmask of PIPE_TRANSFER_x flags
+ * \param transfer returns a transfer object
+ */
+static INLINE void *
+pipe_buffer_map_range(struct pipe_context *pipe,
+ struct pipe_resource *buffer,
+ unsigned offset,
+ unsigned length,
+ unsigned access,
+ struct pipe_transfer **transfer)
+{
+ struct pipe_box box;
+ void *map;
+
+ assert(offset < buffer->width0);
+ assert(offset + length <= buffer->width0);
+ assert(length);
+
+ u_box_1d(offset, length, &box);
+
+ map = pipe->transfer_map(pipe, buffer, 0, access, &box, transfer);
+ if (map == NULL) {
+ return NULL;
+ }
+
+ return map;
+}
+
+
+/**
+ * Map whole resource.
+ * \param access bitmask of PIPE_TRANSFER_x flags
+ * \param transfer returns a transfer object
+ */
+static INLINE void *
+pipe_buffer_map(struct pipe_context *pipe,
+ struct pipe_resource *buffer,
+ unsigned access,
+ struct pipe_transfer **transfer)
+{
+ return pipe_buffer_map_range(pipe, buffer, 0, buffer->width0, access, transfer);
+}
+
+
+static INLINE void
+pipe_buffer_unmap(struct pipe_context *pipe,
+ struct pipe_transfer *transfer)
+{
+ pipe->transfer_unmap(pipe, transfer);
+}
+
+static INLINE void
+pipe_buffer_flush_mapped_range(struct pipe_context *pipe,
+ struct pipe_transfer *transfer,
+ unsigned offset,
+ unsigned length)
+{
+ struct pipe_box box;
+ int transfer_offset;
+
+ assert(length);
+ assert(transfer->box.x <= (int) offset);
+ assert((int) (offset + length) <= transfer->box.x + transfer->box.width);
+
+ /* Match old screen->buffer_flush_mapped_range() behaviour, where
+ * offset parameter is relative to the start of the buffer, not the
+ * mapped range.
+ */
+ transfer_offset = offset - transfer->box.x;
+
+ u_box_1d(transfer_offset, length, &box);
+
+ pipe->transfer_flush_region(pipe, transfer, &box);
+}
+
+static INLINE void
+pipe_buffer_write(struct pipe_context *pipe,
+ struct pipe_resource *buf,
+ unsigned offset,
+ unsigned size,
+ const void *data)
+{
+ struct pipe_box box;
+ unsigned access = PIPE_TRANSFER_WRITE;
+
+ if (offset == 0 && size == buf->width0) {
+ access |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE;
+ } else {
+ access |= PIPE_TRANSFER_DISCARD_RANGE;
+ }
+
+ u_box_1d(offset, size, &box);
+
+ pipe->transfer_inline_write( pipe,
+ buf,
+ 0,
+ access,
+ &box,
+ data,
+ size,
+ 0);
+}
+
+/**
+ * Special case for writing non-overlapping ranges.
+ *
+ * We can avoid GPU/CPU synchronization when writing range that has never
+ * been written before.
+ */
+static INLINE void
+pipe_buffer_write_nooverlap(struct pipe_context *pipe,
+ struct pipe_resource *buf,
+ unsigned offset, unsigned size,
+ const void *data)
+{
+ struct pipe_box box;
+
+ u_box_1d(offset, size, &box);
+
+ pipe->transfer_inline_write(pipe,
+ buf,
+ 0,
+ (PIPE_TRANSFER_WRITE |
+ PIPE_TRANSFER_UNSYNCHRONIZED),
+ &box,
+ data,
+ 0, 0);
+}
+
+
+/**
+ * Create a new resource and immediately put data into it
+ * \param bind bitmask of PIPE_BIND_x flags
+ * \param usage bitmask of PIPE_USAGE_x flags
+ */
+static INLINE struct pipe_resource *
+pipe_buffer_create_with_data(struct pipe_context *pipe,
+ unsigned bind,
+ unsigned usage,
+ unsigned size,
+ const void *ptr)
+{
+ struct pipe_resource *res = pipe_buffer_create(pipe->screen,
+ bind, usage, size);
+ pipe_buffer_write_nooverlap(pipe, res, 0, size, ptr);
+ return res;
+}
+
+static INLINE void
+pipe_buffer_read(struct pipe_context *pipe,
+ struct pipe_resource *buf,
+ unsigned offset,
+ unsigned size,
+ void *data)
+{
+ struct pipe_transfer *src_transfer;
+ ubyte *map;
+
+ map = (ubyte *) pipe_buffer_map_range(pipe,
+ buf,
+ offset, size,
+ PIPE_TRANSFER_READ,
+ &src_transfer);
+ if (!map)
+ return;
+
+ memcpy(data, map, size);
+ pipe_buffer_unmap(pipe, src_transfer);
+}
+
+
+/**
+ * Map a resource for reading/writing.
+ * \param access bitmask of PIPE_TRANSFER_x flags
+ */
+static INLINE void *
+pipe_transfer_map(struct pipe_context *context,
+ struct pipe_resource *resource,
+ unsigned level, unsigned layer,
+ unsigned access,
+ unsigned x, unsigned y,
+ unsigned w, unsigned h,
+ struct pipe_transfer **transfer)
+{
+ struct pipe_box box;
+ u_box_2d_zslice(x, y, layer, w, h, &box);
+ return context->transfer_map(context,
+ resource,
+ level,
+ access,
+ &box, transfer);
+}
+
+
+/**
+ * Map a 3D (texture) resource for reading/writing.
+ * \param access bitmask of PIPE_TRANSFER_x flags
+ */
+static INLINE void *
+pipe_transfer_map_3d(struct pipe_context *context,
+ struct pipe_resource *resource,
+ unsigned level,
+ unsigned access,
+ unsigned x, unsigned y, unsigned z,
+ unsigned w, unsigned h, unsigned d,
+ struct pipe_transfer **transfer)
+{
+ struct pipe_box box;
+ u_box_3d(x, y, z, w, h, d, &box);
+ return context->transfer_map(context,
+ resource,
+ level,
+ access,
+ &box, transfer);
+}
+
+static INLINE void
+pipe_transfer_unmap( struct pipe_context *context,
+ struct pipe_transfer *transfer )
+{
+ context->transfer_unmap( context, transfer );
+}
+
+static INLINE void
+pipe_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
+ struct pipe_resource *buf)
+{
+ if (buf) {
+ struct pipe_constant_buffer cb;
+ cb.buffer = buf;
+ cb.buffer_offset = 0;
+ cb.buffer_size = buf->width0;
+ cb.user_buffer = NULL;
+ pipe->set_constant_buffer(pipe, shader, index, &cb);
+ } else {
+ pipe->set_constant_buffer(pipe, shader, index, NULL);
+ }
+}
+
+
+/**
+ * Get the polygon offset enable/disable flag for the given polygon fill mode.
+ * \param fill_mode one of PIPE_POLYGON_MODE_POINT/LINE/FILL
+ */
+static INLINE boolean
+util_get_offset(const struct pipe_rasterizer_state *templ,
+ unsigned fill_mode)
+{
+ switch(fill_mode) {
+ case PIPE_POLYGON_MODE_POINT:
+ return templ->offset_point;
+ case PIPE_POLYGON_MODE_LINE:
+ return templ->offset_line;
+ case PIPE_POLYGON_MODE_FILL:
+ return templ->offset_tri;
+ default:
+ assert(0);
+ return FALSE;
+ }
+}
+
+static INLINE float
+util_get_min_point_size(const struct pipe_rasterizer_state *state)
+{
+ /* The point size should be clamped to this value at the rasterizer stage.
+ */
+ return !state->point_quad_rasterization &&
+ !state->point_smooth &&
+ !state->multisample ? 1.0f : 0.0f;
+}
+
+static INLINE void
+util_query_clear_result(union pipe_query_result *result, unsigned type)
+{
+ switch (type) {
+ case PIPE_QUERY_OCCLUSION_PREDICATE:
+ case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
+ case PIPE_QUERY_GPU_FINISHED:
+ result->b = FALSE;
+ break;
+ case PIPE_QUERY_OCCLUSION_COUNTER:
+ case PIPE_QUERY_TIMESTAMP:
+ case PIPE_QUERY_TIME_ELAPSED:
+ case PIPE_QUERY_PRIMITIVES_GENERATED:
+ case PIPE_QUERY_PRIMITIVES_EMITTED:
+ result->u64 = 0;
+ break;
+ case PIPE_QUERY_SO_STATISTICS:
+ memset(&result->so_statistics, 0, sizeof(result->so_statistics));
+ break;
+ case PIPE_QUERY_TIMESTAMP_DISJOINT:
+ memset(&result->timestamp_disjoint, 0, sizeof(result->timestamp_disjoint));
+ break;
+ case PIPE_QUERY_PIPELINE_STATISTICS:
+ memset(&result->pipeline_statistics, 0, sizeof(result->pipeline_statistics));
+ break;
+ default:
+ memset(result, 0, sizeof(*result));
+ }
+}
+
+/** Convert PIPE_TEXTURE_x to TGSI_TEXTURE_x */
+static INLINE unsigned
+util_pipe_tex_to_tgsi_tex(enum pipe_texture_target pipe_tex_target,
+ unsigned nr_samples)
+{
+ switch (pipe_tex_target) {
+ case PIPE_TEXTURE_1D:
+ assert(nr_samples <= 1);
+ return TGSI_TEXTURE_1D;
+
+ case PIPE_TEXTURE_2D:
+ return nr_samples > 1 ? TGSI_TEXTURE_2D_MSAA : TGSI_TEXTURE_2D;
+
+ case PIPE_TEXTURE_RECT:
+ assert(nr_samples <= 1);
+ return TGSI_TEXTURE_RECT;
+
+ case PIPE_TEXTURE_3D:
+ assert(nr_samples <= 1);
+ return TGSI_TEXTURE_3D;
+
+ case PIPE_TEXTURE_CUBE:
+ assert(nr_samples <= 1);
+ return TGSI_TEXTURE_CUBE;
+
+ case PIPE_TEXTURE_1D_ARRAY:
+ assert(nr_samples <= 1);
+ return TGSI_TEXTURE_1D_ARRAY;
+
+ case PIPE_TEXTURE_2D_ARRAY:
+ return nr_samples > 1 ? TGSI_TEXTURE_2D_ARRAY_MSAA :
+ TGSI_TEXTURE_2D_ARRAY;
+
+ case PIPE_TEXTURE_CUBE_ARRAY:
+ return TGSI_TEXTURE_CUBE_ARRAY;
+
+ default:
+ assert(0 && "unexpected texture target");
+ return TGSI_TEXTURE_UNKNOWN;
+ }
+}
+
+
+static INLINE void
+util_copy_constant_buffer(struct pipe_constant_buffer *dst,
+ const struct pipe_constant_buffer *src)
+{
+ if (src) {
+ pipe_resource_reference(&dst->buffer, src->buffer);
+ dst->buffer_offset = src->buffer_offset;
+ dst->buffer_size = src->buffer_size;
+ dst->user_buffer = src->user_buffer;
+ }
+ else {
+ pipe_resource_reference(&dst->buffer, NULL);
+ dst->buffer_offset = 0;
+ dst->buffer_size = 0;
+ dst->user_buffer = NULL;
+ }
+}
+
+static INLINE unsigned
+util_max_layer(const struct pipe_resource *r, unsigned level)
+{
+ switch (r->target) {
+ case PIPE_TEXTURE_CUBE:
+ return 6 - 1;
+ case PIPE_TEXTURE_3D:
+ return u_minify(r->depth0, level) - 1;
+ case PIPE_TEXTURE_1D_ARRAY:
+ case PIPE_TEXTURE_2D_ARRAY:
+ case PIPE_TEXTURE_CUBE_ARRAY:
+ return r->array_size - 1;
+ default:
+ return 0;
+ }
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_INLINES_H */
diff --git a/src/minigallium/auxiliary/util/u_keymap.c b/src/minigallium/auxiliary/util/u_keymap.c
new file mode 100644
index 0000000..e161ccd
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_keymap.c
@@ -0,0 +1,318 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * Key lookup/associative container.
+ *
+ * Like Jose's util_hash_table, based on CSO cache code for now.
+ *
+ * Author: Brian Paul
+ */
+
+
+#include "pipe/p_compiler.h"
+#include "util/u_debug.h"
+
+#include "cso_cache/cso_hash.h"
+
+#include "util/u_memory.h"
+#include "util/u_keymap.h"
+
+
+struct keymap
+{
+ struct cso_hash *cso;
+ unsigned key_size;
+ unsigned max_entries; /* XXX not obeyed net */
+ unsigned num_entries;
+ keymap_delete_func delete_func;
+};
+
+
+struct keymap_item
+{
+ void *key, *value;
+};
+
+
+/**
+ * This the default key-delete function used when the client doesn't
+ * provide one.
+ */
+static void
+default_delete_func(const struct keymap *map,
+ const void *key, void *data, void *user)
+{
+ FREE((void*) data);
+}
+
+
+static INLINE struct keymap_item *
+hash_table_item(struct cso_hash_iter iter)
+{
+ return (struct keymap_item *) cso_hash_iter_data(iter);
+}
+
+
+/**
+ * Return 4-byte hash key for a block of bytes.
+ */
+static unsigned
+hash(const void *key, unsigned keySize)
+{
+ unsigned i, hash;
+
+ keySize /= 4; /* convert from bytes to uints */
+
+ hash = 0;
+ for (i = 0; i < keySize; i++) {
+ hash ^= (i + 1) * ((const unsigned *) key)[i];
+ }
+
+ /*hash = hash ^ (hash >> 11) ^ (hash >> 22);*/
+
+ return hash;
+}
+
+
+/**
+ * Create a new map.
+ * \param keySize size of the keys in bytes
+ * \param maxEntries max number of entries to allow (~0 = infinity)
+ * \param deleteFunc optional callback to call when entries
+ * are deleted/replaced
+ */
+struct keymap *
+util_new_keymap(unsigned keySize, unsigned maxEntries,
+ keymap_delete_func deleteFunc)
+{
+ struct keymap *map = MALLOC_STRUCT(keymap);
+ if (!map)
+ return NULL;
+
+ map->cso = cso_hash_create();
+ if (!map->cso) {
+ FREE(map);
+ return NULL;
+ }
+
+ map->max_entries = maxEntries;
+ map->num_entries = 0;
+ map->key_size = keySize;
+ map->delete_func = deleteFunc ? deleteFunc : default_delete_func;
+
+ return map;
+}
+
+
+/**
+ * Delete/free a keymap and all entries. The deleteFunc that was given at
+ * create time will be called for each entry.
+ * \param user user-provided pointer passed through to the delete callback
+ */
+void
+util_delete_keymap(struct keymap *map, void *user)
+{
+ util_keymap_remove_all(map, user);
+ cso_hash_delete(map->cso);
+ FREE(map);
+}
+
+
+static INLINE struct cso_hash_iter
+hash_table_find_iter(const struct keymap *map, const void *key,
+ unsigned key_hash)
+{
+ struct cso_hash_iter iter;
+ struct keymap_item *item;
+
+ iter = cso_hash_find(map->cso, key_hash);
+ while (!cso_hash_iter_is_null(iter)) {
+ item = (struct keymap_item *) cso_hash_iter_data(iter);
+ if (!memcmp(item->key, key, map->key_size))
+ break;
+ iter = cso_hash_iter_next(iter);
+ }
+
+ return iter;
+}
+
+
+static INLINE struct keymap_item *
+hash_table_find_item(const struct keymap *map, const void *key,
+ unsigned key_hash)
+{
+ struct cso_hash_iter iter = hash_table_find_iter(map, key, key_hash);
+ if (cso_hash_iter_is_null(iter)) {
+ return NULL;
+ }
+ else {
+ return hash_table_item(iter);
+ }
+}
+
+
+/**
+ * Insert a new key + data pointer into the table.
+ * Note: we create a copy of the key, but not the data!
+ * If the key is already present in the table, replace the existing
+ * entry (calling the delete callback on the previous entry).
+ * If the maximum capacity of the map is reached an old entry
+ * will be deleted (the delete callback will be called).
+ */
+boolean
+util_keymap_insert(struct keymap *map, const void *key,
+ const void *data, void *user)
+{
+ unsigned key_hash;
+ struct keymap_item *item;
+ struct cso_hash_iter iter;
+
+ assert(map);
+ if (!map)
+ return FALSE;
+
+ key_hash = hash(key, map->key_size);
+
+ item = hash_table_find_item(map, key, key_hash);
+ if (item) {
+ /* call delete callback for old entry/item */
+ map->delete_func(map, item->key, item->value, user);
+ item->value = (void *) data;
+ return TRUE;
+ }
+
+ item = MALLOC_STRUCT(keymap_item);
+ if (!item)
+ return FALSE;
+
+ item->key = mem_dup(key, map->key_size);
+ item->value = (void *) data;
+
+ iter = cso_hash_insert(map->cso, key_hash, item);
+ if (cso_hash_iter_is_null(iter)) {
+ FREE(item);
+ return FALSE;
+ }
+
+ map->num_entries++;
+
+ return TRUE;
+}
+
+
+/**
+ * Look up a key in the map and return the associated data pointer.
+ */
+const void *
+util_keymap_lookup(const struct keymap *map, const void *key)
+{
+ unsigned key_hash;
+ struct keymap_item *item;
+
+ assert(map);
+ if (!map)
+ return NULL;
+
+ key_hash = hash(key, map->key_size);
+
+ item = hash_table_find_item(map, key, key_hash);
+ if (!item)
+ return NULL;
+
+ return item->value;
+}
+
+
+/**
+ * Remove an entry from the map.
+ * The delete callback will be called if the given key/entry is found.
+ * \param user passed to the delete callback as the last param.
+ */
+void
+util_keymap_remove(struct keymap *map, const void *key, void *user)
+{
+ unsigned key_hash;
+ struct cso_hash_iter iter;
+ struct keymap_item *item;
+
+ assert(map);
+ if (!map)
+ return;
+
+ key_hash = hash(key, map->key_size);
+
+ iter = hash_table_find_iter(map, key, key_hash);
+ if (cso_hash_iter_is_null(iter))
+ return;
+
+ item = hash_table_item(iter);
+ assert(item);
+ if (!item)
+ return;
+ map->delete_func(map, item->key, item->value, user);
+ FREE(item->key);
+ FREE(item);
+
+ map->num_entries--;
+
+ cso_hash_erase(map->cso, iter);
+}
+
+
+/**
+ * Remove all entries from the map, calling the delete callback for each.
+ * \param user passed to the delete callback as the last param.
+ */
+void
+util_keymap_remove_all(struct keymap *map, void *user)
+{
+ struct cso_hash_iter iter;
+ struct keymap_item *item;
+
+ assert(map);
+ if (!map)
+ return;
+
+ iter = cso_hash_first_node(map->cso);
+ while (!cso_hash_iter_is_null(iter)) {
+ item = (struct keymap_item *)
+ cso_hash_take(map->cso, cso_hash_iter_key(iter));
+ map->delete_func(map, item->key, item->value, user);
+ FREE(item->key);
+ FREE(item);
+ iter = cso_hash_first_node(map->cso);
+ }
+}
+
+
+extern void
+util_keymap_info(const struct keymap *map)
+{
+ debug_printf("Keymap %p: %u of max %u entries\n",
+ (void *) map, map->num_entries, map->max_entries);
+}
diff --git a/src/minigallium/auxiliary/util/u_keymap.h b/src/minigallium/auxiliary/util/u_keymap.h
new file mode 100644
index 0000000..8d60a76
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_keymap.h
@@ -0,0 +1,68 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_KEYMAP_H
+#define U_KEYMAP_H
+
+#include "pipe/p_compiler.h"
+
+
+/** opaque keymap type */
+struct keymap;
+
+
+/** Delete/callback function type */
+typedef void (*keymap_delete_func)(const struct keymap *map,
+ const void *key, void *data,
+ void *user);
+
+
+extern struct keymap *
+util_new_keymap(unsigned keySize, unsigned maxEntries,
+ keymap_delete_func deleteFunc);
+
+extern void
+util_delete_keymap(struct keymap *map, void *user);
+
+extern boolean
+util_keymap_insert(struct keymap *map, const void *key,
+ const void *data, void *user);
+
+extern const void *
+util_keymap_lookup(const struct keymap *map, const void *key);
+
+extern void
+util_keymap_remove(struct keymap *map, const void *key, void *user);
+
+extern void
+util_keymap_remove_all(struct keymap *map, void *user);
+
+extern void
+util_keymap_info(const struct keymap *map);
+
+
+#endif /* U_KEYMAP_H */
diff --git a/src/minigallium/auxiliary/util/u_linear.c b/src/minigallium/auxiliary/util/u_linear.c
new file mode 100644
index 0000000..f1aef21
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_linear.c
@@ -0,0 +1,101 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * Functions for converting tiled data to linear and vice versa.
+ */
+
+
+#include "util/u_debug.h"
+#include "u_linear.h"
+
+void
+pipe_linear_to_tile(size_t src_stride, const void *src_ptr,
+ struct pipe_tile_info *t, void *dst_ptr)
+{
+ int x, y, z;
+ char *ptr;
+ size_t bytes = t->cols * t->block.size;
+ char *dst_ptr2 = (char *) dst_ptr;
+
+ assert(pipe_linear_check_tile(t));
+
+ /* lets write lineary to the tiled buffer */
+ for (y = 0; y < t->tiles_y; y++) {
+ for (x = 0; x < t->tiles_x; x++) {
+ /* this inner loop could be replace with SSE magic */
+ ptr = (char*)src_ptr + src_stride * t->rows * y + bytes * x;
+ for (z = 0; z < t->rows; z++) {
+ memcpy(dst_ptr2, ptr, bytes);
+ dst_ptr2 += bytes;
+ ptr += src_stride;
+ }
+ }
+ }
+}
+
+void pipe_linear_from_tile(struct pipe_tile_info *t, const void *src_ptr,
+ size_t dst_stride, void *dst_ptr)
+{
+ int x, y, z;
+ char *ptr;
+ size_t bytes = t->cols * t->block.size;
+ const char *src_ptr2 = (const char *) src_ptr;
+
+ /* lets read lineary from the tiled buffer */
+ for (y = 0; y < t->tiles_y; y++) {
+ for (x = 0; x < t->tiles_x; x++) {
+ /* this inner loop could be replace with SSE magic */
+ ptr = (char*)dst_ptr + dst_stride * t->rows * y + bytes * x;
+ for (z = 0; z < t->rows; z++) {
+ memcpy(ptr, src_ptr2, bytes);
+ src_ptr2 += bytes;
+ ptr += dst_stride;
+ }
+ }
+ }
+}
+
+void
+pipe_linear_fill_info(struct pipe_tile_info *t,
+ const struct u_linear_format_block *block,
+ unsigned tile_width, unsigned tile_height,
+ unsigned tiles_x, unsigned tiles_y)
+{
+ t->block = *block;
+
+ t->tile.width = tile_width;
+ t->tile.height = tile_height;
+ t->cols = t->tile.width / t->block.width;
+ t->rows = t->tile.height / t->block.height;
+ t->tile.size = t->cols * t->rows * t->block.size;
+
+ t->tiles_x = tiles_x;
+ t->tiles_y = tiles_y;
+ t->stride = t->cols * t->tiles_x * t->block.size;
+ t->size = t->tiles_x * t->tiles_y * t->tile.size;
+}
diff --git a/src/minigallium/auxiliary/util/u_linear.h b/src/minigallium/auxiliary/util/u_linear.h
new file mode 100644
index 0000000..81ffc9f
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_linear.h
@@ -0,0 +1,106 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * Functions for converting tiled data to linear and vice versa.
+ */
+
+
+#ifndef U_LINEAR_H
+#define U_LINEAR_H
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_format.h"
+
+struct u_linear_format_block
+{
+ /** Block size in bytes */
+ unsigned size;
+
+ /** Block width in pixels */
+ unsigned width;
+
+ /** Block height in pixels */
+ unsigned height;
+};
+
+
+struct pipe_tile_info
+{
+ unsigned size;
+ unsigned stride;
+
+ /* The number of tiles */
+ unsigned tiles_x;
+ unsigned tiles_y;
+
+ /* size of each tile expressed in blocks */
+ unsigned cols;
+ unsigned rows;
+
+ /* Describe the tile in pixels */
+ struct u_linear_format_block tile;
+
+ /* Describe each block within the tile */
+ struct u_linear_format_block block;
+};
+
+void pipe_linear_to_tile(size_t src_stride, const void *src_ptr,
+ struct pipe_tile_info *t, void *dst_ptr);
+
+void pipe_linear_from_tile(struct pipe_tile_info *t, const void *src_ptr,
+ size_t dst_stride, void *dst_ptr);
+
+/**
+ * Convenience function to fillout a pipe_tile_info struct.
+ * @t info to fill out.
+ * @block block info about pixel layout
+ * @tile_width the width of the tile in pixels
+ * @tile_height the height of the tile in pixels
+ * @tiles_x number of tiles in x axis
+ * @tiles_y number of tiles in y axis
+ */
+void pipe_linear_fill_info(struct pipe_tile_info *t,
+ const struct u_linear_format_block *block,
+ unsigned tile_width, unsigned tile_height,
+ unsigned tiles_x, unsigned tiles_y);
+
+static INLINE boolean pipe_linear_check_tile(const struct pipe_tile_info *t)
+{
+ if (t->tile.size != t->block.size * t->cols * t->rows)
+ return FALSE;
+
+ if (t->stride != t->block.size * t->cols * t->tiles_x)
+ return FALSE;
+
+ if (t->size < t->stride * t->rows * t->tiles_y)
+ return FALSE;
+
+ return TRUE;
+}
+
+#endif /* U_LINEAR_H */
diff --git a/src/minigallium/auxiliary/util/u_linkage.c b/src/minigallium/auxiliary/util/u_linkage.c
new file mode 100644
index 0000000..245d941
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_linkage.c
@@ -0,0 +1,149 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "util/u_debug.h"
+#include "pipe/p_shader_tokens.h"
+#include "tgsi/tgsi_parse.h"
+#include "tgsi/tgsi_scan.h"
+#include "util/u_linkage.h"
+
+/* we must only record the registers that are actually used, not just declared */
+static INLINE boolean
+util_semantic_set_test_and_set(struct util_semantic_set *set, unsigned value)
+{
+ unsigned mask = 1 << (value % (sizeof(long) * 8));
+ unsigned long *p = &set->masks[value / (sizeof(long) * 8)];
+ unsigned long v = *p & mask;
+ *p |= mask;
+ return !!v;
+}
+
+unsigned
+util_semantic_set_from_program_file(struct util_semantic_set *set, const struct tgsi_token *tokens, enum tgsi_file_type file)
+{
+ struct tgsi_shader_info info;
+ struct tgsi_parse_context parse;
+ unsigned count = 0;
+ ubyte *semantic_name;
+ ubyte *semantic_index;
+
+ tgsi_scan_shader(tokens, &info);
+
+ if(file == TGSI_FILE_INPUT)
+ {
+ semantic_name = info.input_semantic_name;
+ semantic_index = info.input_semantic_index;
+ }
+ else if(file == TGSI_FILE_OUTPUT)
+ {
+ semantic_name = info.output_semantic_name;
+ semantic_index = info.output_semantic_index;
+ }
+ else
+ {
+ assert(0);
+ semantic_name = NULL;
+ semantic_index = NULL;
+ }
+
+ tgsi_parse_init(&parse, tokens);
+
+ memset(set->masks, 0, sizeof(set->masks));
+ while(!tgsi_parse_end_of_tokens(&parse))
+ {
+ tgsi_parse_token(&parse);
+
+ if(parse.FullToken.Token.Type == TGSI_TOKEN_TYPE_INSTRUCTION)
+ {
+ const struct tgsi_full_instruction *finst = &parse.FullToken.FullInstruction;
+ unsigned i;
+ for(i = 0; i < finst->Instruction.NumDstRegs; ++i)
+ {
+ if(finst->Dst[i].Register.File == file)
+ {
+ unsigned idx = finst->Dst[i].Register.Index;
+ if(semantic_name[idx] == TGSI_SEMANTIC_GENERIC)
+ {
+ if(!util_semantic_set_test_and_set(set, semantic_index[idx]))
+ ++count;
+ }
+ }
+ }
+
+ for(i = 0; i < finst->Instruction.NumSrcRegs; ++i)
+ {
+ if(finst->Src[i].Register.File == file)
+ {
+ unsigned idx = finst->Src[i].Register.Index;
+ if(semantic_name[idx] == TGSI_SEMANTIC_GENERIC)
+ {
+ if(!util_semantic_set_test_and_set(set, semantic_index[idx]))
+ ++count;
+ }
+ }
+ }
+ }
+ }
+ tgsi_parse_free(&parse);
+
+ return count;
+}
+
+#define UTIL_SEMANTIC_SET_FOR_EACH(i, set) for(i = 0; i < 256; ++i) if(set->masks[i / (sizeof(long) * 8)] & (1 << (i % (sizeof(long) * 8))))
+
+void
+util_semantic_layout_from_set(unsigned char *layout, const struct util_semantic_set *set, unsigned efficient_slots, unsigned num_slots)
+{
+ int first = -1;
+ int last = -1;
+ unsigned i;
+
+ memset(layout, 0xff, num_slots);
+
+ UTIL_SEMANTIC_SET_FOR_EACH(i, set)
+ {
+ if(first < 0)
+ first = i;
+ last = i;
+ }
+
+ if (last < (int) efficient_slots)
+ {
+ UTIL_SEMANTIC_SET_FOR_EACH(i, set)
+ layout[i] = i;
+ }
+ else if ((last - first) < (int) efficient_slots)
+ {
+ UTIL_SEMANTIC_SET_FOR_EACH(i, set)
+ layout[i - first] = i;
+ }
+ else
+ {
+ unsigned idx = 0;
+ UTIL_SEMANTIC_SET_FOR_EACH(i, set)
+ layout[idx++] = i;
+ }
+}
diff --git a/src/minigallium/auxiliary/util/u_linkage.h b/src/minigallium/auxiliary/util/u_linkage.h
new file mode 100644
index 0000000..7b23123
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_linkage.h
@@ -0,0 +1,67 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_LINKAGE_H_
+#define U_LINKAGE_H_
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_shader_tokens.h"
+
+struct util_semantic_set
+{
+ unsigned long masks[256 / 8 / sizeof(unsigned long)];
+};
+
+static INLINE boolean
+util_semantic_set_contains(struct util_semantic_set *set, unsigned char value)
+{
+ return !!(set->masks[value / (sizeof(long) * 8)] & (1 << (value / (sizeof(long) * 8))));
+}
+
+unsigned util_semantic_set_from_program_file(struct util_semantic_set *set, const struct tgsi_token *tokens, enum tgsi_file_type file);
+
+/* efficient_slots is the number of slots such that hardware performance is
+ * the same for using that amount, with holes, or less slots but with less
+ * holes.
+ *
+ * num_slots is the size of the layout array and hardware limit instead.
+ *
+ * efficient_slots == 0 or efficient_slots == num_slots are typical settings.
+ */
+void util_semantic_layout_from_set(unsigned char *layout, const struct util_semantic_set *set, unsigned efficient_slots, unsigned num_slots);
+
+static INLINE void
+util_semantic_table_from_layout(unsigned char *table, size_t table_size, unsigned char *layout,
+ unsigned char first_slot_value, unsigned char num_slots)
+{
+ unsigned char i;
+ memset(table, 0xff, table_size);
+
+ for(i = 0; i < num_slots; ++i)
+ table[layout[i]] = first_slot_value + i;
+}
+
+#endif /* U_LINKAGE_H_ */
diff --git a/src/minigallium/auxiliary/util/u_math.c b/src/minigallium/auxiliary/util/u_math.c
new file mode 100644
index 0000000..6981ee9
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_math.c
@@ -0,0 +1,137 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+
+#include "pipe/p_config.h"
+#include "util/u_math.h"
+#include "util/u_cpu_detect.h"
+
+#if defined(PIPE_ARCH_SSE)
+#include <xmmintrin.h>
+/* This is defined in pmmintrin.h, but it can only be included when -msse3 is
+ * used, so just define it here to avoid further. */
+#define _MM_DENORMALS_ZERO_MASK 0x0040
+#endif
+
+
+/** 2^x, for x in [-1.0, 1.0) */
+float pow2_table[POW2_TABLE_SIZE];
+
+
+static void
+init_pow2_table(void)
+{
+ int i;
+ for (i = 0; i < POW2_TABLE_SIZE; i++)
+ pow2_table[i] = (float) pow(2.0, (i - POW2_TABLE_OFFSET) / POW2_TABLE_SCALE);
+}
+
+
+/** log2(x), for x in [1.0, 2.0) */
+float log2_table[LOG2_TABLE_SIZE];
+
+
+static void
+init_log2_table(void)
+{
+ unsigned i;
+ for (i = 0; i < LOG2_TABLE_SIZE; i++)
+ log2_table[i] = (float) log2(1.0 + i * (1.0 / LOG2_TABLE_SCALE));
+}
+
+
+/**
+ * One time init for math utilities.
+ */
+void
+util_init_math(void)
+{
+ static boolean initialized = FALSE;
+ if (!initialized) {
+ init_pow2_table();
+ init_log2_table();
+ initialized = TRUE;
+ }
+}
+
+/**
+ * Fetches the contents of the fpstate (mxcsr on x86) register.
+ *
+ * On platforms without support for it just returns 0.
+ */
+unsigned
+util_fpstate_get(void)
+{
+ unsigned mxcsr = 0;
+
+#if defined(PIPE_ARCH_SSE)
+ if (util_cpu_caps.has_sse) {
+ mxcsr = _mm_getcsr();
+ }
+#endif
+
+ return mxcsr;
+}
+
+/**
+ * Make sure that the fp treats the denormalized floating
+ * point numbers as zero.
+ *
+ * This is the behavior required by D3D10. OpenGL doesn't care.
+ */
+unsigned
+util_fpstate_set_denorms_to_zero(unsigned current_mxcsr)
+{
+#if defined(PIPE_ARCH_SSE)
+ if (util_cpu_caps.has_sse) {
+ /* Enable flush to zero mode */
+ current_mxcsr |= _MM_FLUSH_ZERO_MASK;
+ if (util_cpu_caps.has_daz) {
+ /* Enable denormals are zero mode */
+ current_mxcsr |= _MM_DENORMALS_ZERO_MASK;
+ }
+ util_fpstate_set(current_mxcsr);
+ }
+#endif
+ return current_mxcsr;
+}
+
+/**
+ * Set the state of the fpstate (mxcsr on x86) register.
+ *
+ * On platforms without support for it's a noop.
+ */
+void
+util_fpstate_set(unsigned mxcsr)
+{
+#if defined(PIPE_ARCH_SSE)
+ if (util_cpu_caps.has_sse) {
+ _mm_setcsr(mxcsr);
+ }
+#endif
+}
diff --git a/src/minigallium/auxiliary/util/u_math.h b/src/minigallium/auxiliary/util/u_math.h
new file mode 100644
index 0000000..702d4e9
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_math.h
@@ -0,0 +1,783 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+/**
+ * Math utilities and approximations for common math functions.
+ * Reduced precision is usually acceptable in shaders...
+ *
+ * "fast" is used in the names of functions which are low-precision,
+ * or at least lower-precision than the normal C lib functions.
+ */
+
+
+#ifndef U_MATH_H
+#define U_MATH_H
+
+
+#include "pipe/p_compiler.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include <math.h>
+#include <float.h>
+#include <stdarg.h>
+
+#ifdef PIPE_OS_UNIX
+#include <strings.h> /* for ffs */
+#endif
+
+
+#ifndef M_SQRT2
+#define M_SQRT2 1.41421356237309504880
+#endif
+
+
+#if defined(_MSC_VER)
+
+#if _MSC_VER < 1400 && !defined(__cplusplus)
+
+static INLINE float cosf( float f )
+{
+ return (float) cos( (double) f );
+}
+
+static INLINE float sinf( float f )
+{
+ return (float) sin( (double) f );
+}
+
+static INLINE float ceilf( float f )
+{
+ return (float) ceil( (double) f );
+}
+
+static INLINE float floorf( float f )
+{
+ return (float) floor( (double) f );
+}
+
+static INLINE float powf( float f, float g )
+{
+ return (float) pow( (double) f, (double) g );
+}
+
+static INLINE float sqrtf( float f )
+{
+ return (float) sqrt( (double) f );
+}
+
+static INLINE float fabsf( float f )
+{
+ return (float) fabs( (double) f );
+}
+
+static INLINE float logf( float f )
+{
+ return (float) log( (double) f );
+}
+
+#else
+/* Work-around an extra semi-colon in VS 2005 logf definition */
+#ifdef logf
+#undef logf
+#define logf(x) ((float)log((double)(x)))
+#endif /* logf */
+
+#define isfinite(x) _finite((double)(x))
+#define isnan(x) _isnan((double)(x))
+#endif /* _MSC_VER < 1400 && !defined(__cplusplus) */
+
+static INLINE double log2( double x )
+{
+ const double invln2 = 1.442695041;
+ return log( x ) * invln2;
+}
+
+static INLINE double
+round(double x)
+{
+ return x >= 0.0 ? floor(x + 0.5) : ceil(x - 0.5);
+}
+
+static INLINE float
+roundf(float x)
+{
+ return x >= 0.0f ? floorf(x + 0.5f) : ceilf(x - 0.5f);
+}
+
+#define INFINITY (DBL_MAX + DBL_MAX)
+#define NAN (INFINITY - INFINITY)
+
+#endif /* _MSC_VER */
+
+
+#ifdef PIPE_OS_ANDROID
+
+static INLINE
+double log2(double d)
+{
+ return log(d) * (1.0 / M_LN2);
+}
+
+/* workaround a conflict with main/imports.h */
+#ifdef log2f
+#undef log2f
+#endif
+
+static INLINE
+float log2f(float f)
+{
+ return logf(f) * (float) (1.0 / M_LN2);
+}
+
+#endif
+
+
+
+
+#define POW2_TABLE_SIZE_LOG2 9
+#define POW2_TABLE_SIZE (1 << POW2_TABLE_SIZE_LOG2)
+#define POW2_TABLE_OFFSET (POW2_TABLE_SIZE/2)
+#define POW2_TABLE_SCALE ((float)(POW2_TABLE_SIZE/2))
+extern float pow2_table[POW2_TABLE_SIZE];
+
+
+/**
+ * Initialize math module. This should be called before using any
+ * other functions in this module.
+ */
+extern void
+util_init_math(void);
+
+
+union fi {
+ float f;
+ int32_t i;
+ uint32_t ui;
+};
+
+
+union di {
+ double d;
+ int64_t i;
+ uint64_t ui;
+};
+
+
+/**
+ * Fast version of 2^x
+ * Identity: exp2(a + b) = exp2(a) * exp2(b)
+ * Let ipart = int(x)
+ * Let fpart = x - ipart;
+ * So, exp2(x) = exp2(ipart) * exp2(fpart)
+ * Compute exp2(ipart) with i << ipart
+ * Compute exp2(fpart) with lookup table.
+ */
+static INLINE float
+util_fast_exp2(float x)
+{
+ int32_t ipart;
+ float fpart, mpart;
+ union fi epart;
+
+ if(x > 129.00000f)
+ return 3.402823466e+38f;
+
+ if (x < -126.99999f)
+ return 0.0f;
+
+ ipart = (int32_t) x;
+ fpart = x - (float) ipart;
+
+ /* same as
+ * epart.f = (float) (1 << ipart)
+ * but faster and without integer overflow for ipart > 31
+ */
+ epart.i = (ipart + 127 ) << 23;
+
+ mpart = pow2_table[POW2_TABLE_OFFSET + (int)(fpart * POW2_TABLE_SCALE)];
+
+ return epart.f * mpart;
+}
+
+
+/**
+ * Fast approximation to exp(x).
+ */
+static INLINE float
+util_fast_exp(float x)
+{
+ const float k = 1.44269f; /* = log2(e) */
+ return util_fast_exp2(k * x);
+}
+
+
+#define LOG2_TABLE_SIZE_LOG2 16
+#define LOG2_TABLE_SCALE (1 << LOG2_TABLE_SIZE_LOG2)
+#define LOG2_TABLE_SIZE (LOG2_TABLE_SCALE + 1)
+extern float log2_table[LOG2_TABLE_SIZE];
+
+
+/**
+ * Fast approximation to log2(x).
+ */
+static INLINE float
+util_fast_log2(float x)
+{
+ union fi num;
+ float epart, mpart;
+ num.f = x;
+ epart = (float)(((num.i & 0x7f800000) >> 23) - 127);
+ /* mpart = log2_table[mantissa*LOG2_TABLE_SCALE + 0.5] */
+ mpart = log2_table[((num.i & 0x007fffff) + (1 << (22 - LOG2_TABLE_SIZE_LOG2))) >> (23 - LOG2_TABLE_SIZE_LOG2)];
+ return epart + mpart;
+}
+
+
+/**
+ * Fast approximation to x^y.
+ */
+static INLINE float
+util_fast_pow(float x, float y)
+{
+ return util_fast_exp2(util_fast_log2(x) * y);
+}
+
+/* Note that this counts zero as a power of two.
+ */
+static INLINE boolean
+util_is_power_of_two( unsigned v )
+{
+ return (v & (v-1)) == 0;
+}
+
+
+/**
+ * Floor(x), returned as int.
+ */
+static INLINE int
+util_ifloor(float f)
+{
+ int ai, bi;
+ double af, bf;
+ union fi u;
+ af = (3 << 22) + 0.5 + (double) f;
+ bf = (3 << 22) + 0.5 - (double) f;
+ u.f = (float) af; ai = u.i;
+ u.f = (float) bf; bi = u.i;
+ return (ai - bi) >> 1;
+}
+
+
+/**
+ * Round float to nearest int.
+ */
+static INLINE int
+util_iround(float f)
+{
+#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)
+ int r;
+ __asm__ ("fistpl %0" : "=m" (r) : "t" (f) : "st");
+ return r;
+#elif defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86)
+ int r;
+ _asm {
+ fld f
+ fistp r
+ }
+ return r;
+#else
+ if (f >= 0.0f)
+ return (int) (f + 0.5f);
+ else
+ return (int) (f - 0.5f);
+#endif
+}
+
+
+/**
+ * Approximate floating point comparison
+ */
+static INLINE boolean
+util_is_approx(float a, float b, float tol)
+{
+ return fabs(b - a) <= tol;
+}
+
+
+/**
+ * util_is_X_inf_or_nan = test if x is NaN or +/- Inf
+ * util_is_X_nan = test if x is NaN
+ * util_X_inf_sign = return +1 for +Inf, -1 for -Inf, or 0 for not Inf
+ *
+ * NaN can be checked with x != x, however this fails with the fast math flag
+ **/
+
+
+/**
+ * Single-float
+ */
+static INLINE boolean
+util_is_inf_or_nan(float x)
+{
+ union fi tmp;
+ tmp.f = x;
+ return (tmp.ui & 0x7f800000) == 0x7f800000;
+}
+
+
+static INLINE boolean
+util_is_nan(float x)
+{
+ union fi tmp;
+ tmp.f = x;
+ return (tmp.ui & 0x7fffffff) > 0x7f800000;
+}
+
+
+static INLINE int
+util_inf_sign(float x)
+{
+ union fi tmp;
+ tmp.f = x;
+ if ((tmp.ui & 0x7fffffff) != 0x7f800000) {
+ return 0;
+ }
+
+ return (x < 0) ? -1 : 1;
+}
+
+
+/**
+ * Double-float
+ */
+static INLINE boolean
+util_is_double_inf_or_nan(double x)
+{
+ union di tmp;
+ tmp.d = x;
+ return (tmp.ui & 0x7ff0000000000000ULL) == 0x7ff0000000000000ULL;
+}
+
+
+static INLINE boolean
+util_is_double_nan(double x)
+{
+ union di tmp;
+ tmp.d = x;
+ return (tmp.ui & 0x7fffffffffffffffULL) > 0x7ff0000000000000ULL;
+}
+
+
+static INLINE int
+util_double_inf_sign(double x)
+{
+ union di tmp;
+ tmp.d = x;
+ if ((tmp.ui & 0x7fffffffffffffffULL) != 0x7ff0000000000000ULL) {
+ return 0;
+ }
+
+ return (x < 0) ? -1 : 1;
+}
+
+
+/**
+ * Half-float
+ */
+static INLINE boolean
+util_is_half_inf_or_nan(int16_t x)
+{
+ return (x & 0x7c00) == 0x7c00;
+}
+
+
+static INLINE boolean
+util_is_half_nan(int16_t x)
+{
+ return (x & 0x7fff) > 0x7c00;
+}
+
+
+static INLINE int
+util_half_inf_sign(int16_t x)
+{
+ if ((x & 0x7fff) != 0x7c00) {
+ return 0;
+ }
+
+ return (x < 0) ? -1 : 1;
+}
+
+
+/**
+ * Find first bit set in word. Least significant bit is 1.
+ * Return 0 if no bits set.
+ */
+#ifndef FFS_DEFINED
+#define FFS_DEFINED 1
+
+#if defined(_MSC_VER) && _MSC_VER >= 1300 && (_M_IX86 || _M_AMD64 || _M_IA64)
+unsigned char _BitScanForward(unsigned long* Index, unsigned long Mask);
+#pragma intrinsic(_BitScanForward)
+static INLINE
+unsigned long ffs( unsigned long u )
+{
+ unsigned long i;
+ if (_BitScanForward(&i, u))
+ return i + 1;
+ else
+ return 0;
+}
+#elif defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86)
+static INLINE
+unsigned ffs( unsigned u )
+{
+ unsigned i;
+
+ if (u == 0) {
+ return 0;
+ }
+
+ __asm bsf eax, [u]
+ __asm inc eax
+ __asm mov [i], eax
+
+ return i;
+}
+#elif defined(__MINGW32__) || defined(PIPE_OS_ANDROID)
+#define ffs __builtin_ffs
+#endif
+
+#endif /* FFS_DEFINED */
+
+/**
+ * Find last bit set in a word. The least significant bit is 1.
+ * Return 0 if no bits are set.
+ */
+static INLINE unsigned util_last_bit(unsigned u)
+{
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 304)
+ return u == 0 ? 0 : 32 - __builtin_clz(u);
+#else
+ unsigned r = 0;
+ while (u) {
+ r++;
+ u >>= 1;
+ }
+ return r;
+#endif
+}
+
+
+/* Destructively loop over all of the bits in a mask as in:
+ *
+ * while (mymask) {
+ * int i = u_bit_scan(&mymask);
+ * ... process element i
+ * }
+ *
+ */
+static INLINE int u_bit_scan(unsigned *mask)
+{
+ int i = ffs(*mask) - 1;
+ *mask &= ~(1 << i);
+ return i;
+}
+
+
+/**
+ * Return float bits.
+ */
+static INLINE unsigned
+fui( float f )
+{
+ union fi fi;
+ fi.f = f;
+ return fi.ui;
+}
+
+
+/**
+ * Convert ubyte to float in [0, 1].
+ * XXX a 256-entry lookup table would be slightly faster.
+ */
+static INLINE float
+ubyte_to_float(ubyte ub)
+{
+ return (float) ub * (1.0f / 255.0f);
+}
+
+
+/**
+ * Convert float in [0,1] to ubyte in [0,255] with clamping.
+ */
+static INLINE ubyte
+float_to_ubyte(float f)
+{
+ union fi tmp;
+
+ tmp.f = f;
+ if (tmp.i < 0) {
+ return (ubyte) 0;
+ }
+ else if (tmp.i >= 0x3f800000 /* 1.0f */) {
+ return (ubyte) 255;
+ }
+ else {
+ tmp.f = tmp.f * (255.0f/256.0f) + 32768.0f;
+ return (ubyte) tmp.i;
+ }
+}
+
+static INLINE float
+byte_to_float_tex(int8_t b)
+{
+ return (b == -128) ? -1.0F : b * 1.0F / 127.0F;
+}
+
+static INLINE int8_t
+float_to_byte_tex(float f)
+{
+ return (int8_t) (127.0F * f);
+}
+
+/**
+ * Calc log base 2
+ */
+static INLINE unsigned
+util_logbase2(unsigned n)
+{
+#if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 304)
+ return ((sizeof(unsigned) * 8 - 1) - __builtin_clz(n | 1));
+#else
+ unsigned pos = 0;
+ if (n >= 1<<16) { n >>= 16; pos += 16; }
+ if (n >= 1<< 8) { n >>= 8; pos += 8; }
+ if (n >= 1<< 4) { n >>= 4; pos += 4; }
+ if (n >= 1<< 2) { n >>= 2; pos += 2; }
+ if (n >= 1<< 1) { pos += 1; }
+ return pos;
+#endif
+}
+
+
+/**
+ * Returns the smallest power of two >= x
+ */
+static INLINE unsigned
+util_next_power_of_two(unsigned x)
+{
+#if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 304)
+ if (x <= 1)
+ return 1;
+
+ return (1 << ((sizeof(unsigned) * 8) - __builtin_clz(x - 1)));
+#else
+ unsigned val = x;
+
+ if (x <= 1)
+ return 1;
+
+ if (util_is_power_of_two(x))
+ return x;
+
+ val--;
+ val = (val >> 1) | val;
+ val = (val >> 2) | val;
+ val = (val >> 4) | val;
+ val = (val >> 8) | val;
+ val = (val >> 16) | val;
+ val++;
+ return val;
+#endif
+}
+
+
+/**
+ * Return number of bits set in n.
+ */
+static INLINE unsigned
+util_bitcount(unsigned n)
+{
+#if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 304)
+ return __builtin_popcount(n);
+#else
+ /* K&R classic bitcount.
+ *
+ * For each iteration, clear the LSB from the bitfield.
+ * Requires only one iteration per set bit, instead of
+ * one iteration per bit less than highest set bit.
+ */
+ unsigned bits = 0;
+ for (bits; n; bits++) {
+ n &= n - 1;
+ }
+ return bits;
+#endif
+}
+
+
+/**
+ * Convert from little endian to CPU byte order.
+ */
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+#define util_le32_to_cpu(x) util_bswap32(x)
+#define util_le16_to_cpu(x) util_bswap16(x)
+#else
+#define util_le32_to_cpu(x) (x)
+#define util_le16_to_cpu(x) (x)
+#endif
+
+
+/**
+ * Reverse byte order of a 32 bit word.
+ */
+static INLINE uint32_t
+util_bswap32(uint32_t n)
+{
+#if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 403)
+ return __builtin_bswap32(n);
+#else
+ return (n >> 24) |
+ ((n >> 8) & 0x0000ff00) |
+ ((n << 8) & 0x00ff0000) |
+ (n << 24);
+#endif
+}
+
+
+/**
+ * Reverse byte order of a 16 bit word.
+ */
+static INLINE uint16_t
+util_bswap16(uint16_t n)
+{
+ return (n >> 8) |
+ (n << 8);
+}
+
+
+/**
+ * Clamp X to [MIN, MAX].
+ * This is a macro to allow float, int, uint, etc. types.
+ */
+#define CLAMP( X, MIN, MAX ) ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) )
+
+#define MIN2( A, B ) ( (A)<(B) ? (A) : (B) )
+#define MAX2( A, B ) ( (A)>(B) ? (A) : (B) )
+
+#define MIN3( A, B, C ) ((A) < (B) ? MIN2(A, C) : MIN2(B, C))
+#define MAX3( A, B, C ) ((A) > (B) ? MAX2(A, C) : MAX2(B, C))
+
+#define MIN4( A, B, C, D ) ((A) < (B) ? MIN3(A, C, D) : MIN3(B, C, D))
+#define MAX4( A, B, C, D ) ((A) > (B) ? MAX3(A, C, D) : MAX3(B, C, D))
+
+
+/**
+ * Align a value, only works pot alignemnts.
+ */
+static INLINE int
+align(int value, int alignment)
+{
+ return (value + alignment - 1) & ~(alignment - 1);
+}
+
+/**
+ * Works like align but on npot alignments.
+ */
+static INLINE size_t
+util_align_npot(size_t value, size_t alignment)
+{
+ if (value % alignment)
+ return value + (alignment - (value % alignment));
+ return value;
+}
+
+static INLINE unsigned
+u_minify(unsigned value, unsigned levels)
+{
+ return MAX2(1, value >> levels);
+}
+
+#ifndef COPY_4V
+#define COPY_4V( DST, SRC ) \
+do { \
+ (DST)[0] = (SRC)[0]; \
+ (DST)[1] = (SRC)[1]; \
+ (DST)[2] = (SRC)[2]; \
+ (DST)[3] = (SRC)[3]; \
+} while (0)
+#endif
+
+
+#ifndef COPY_4FV
+#define COPY_4FV( DST, SRC ) COPY_4V(DST, SRC)
+#endif
+
+
+#ifndef ASSIGN_4V
+#define ASSIGN_4V( DST, V0, V1, V2, V3 ) \
+do { \
+ (DST)[0] = (V0); \
+ (DST)[1] = (V1); \
+ (DST)[2] = (V2); \
+ (DST)[3] = (V3); \
+} while (0)
+#endif
+
+
+static INLINE uint32_t util_unsigned_fixed(float value, unsigned frac_bits)
+{
+ return value < 0 ? 0 : (uint32_t)(value * (1<<frac_bits));
+}
+
+static INLINE int32_t util_signed_fixed(float value, unsigned frac_bits)
+{
+ return (int32_t)(value * (1<<frac_bits));
+}
+
+unsigned
+util_fpstate_get(void);
+unsigned
+util_fpstate_set_denorms_to_zero(unsigned current_fpstate);
+void
+util_fpstate_set(unsigned fpstate);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_MATH_H */
diff --git a/src/minigallium/auxiliary/util/u_memory.h b/src/minigallium/auxiliary/util/u_memory.h
new file mode 100644
index 0000000..53d5659
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_memory.h
@@ -0,0 +1,100 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+/*
+ * Memory functions
+ */
+
+
+#ifndef U_MEMORY_H
+#define U_MEMORY_H
+
+
+#include "util/u_pointer.h"
+#include "util/u_debug.h"
+#include "os/os_memory.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define MALLOC(_size) os_malloc(_size)
+
+#define CALLOC(_count, _size) os_calloc(_count, _size)
+
+#define FREE(_ptr ) os_free(_ptr)
+
+#define REALLOC(_ptr, _old_size, _size) os_realloc(_ptr, _old_size, _size)
+
+#define MALLOC_STRUCT(T) (struct T *) MALLOC(sizeof(struct T))
+
+#define CALLOC_STRUCT(T) (struct T *) CALLOC(1, sizeof(struct T))
+
+#define CALLOC_VARIANT_LENGTH_STRUCT(T,more_size) ((struct T *) CALLOC(1, sizeof(struct T) + more_size))
+
+
+#define align_malloc(_size, _alignment) os_malloc_aligned(_size, _alignment)
+#define align_free(_ptr) os_free_aligned(_ptr)
+
+
+/**
+ * Duplicate a block of memory.
+ */
+static INLINE void *
+mem_dup(const void *src, uint size)
+{
+ void *dup = MALLOC(size);
+ if (dup)
+ memcpy(dup, src, size);
+ return dup;
+}
+
+
+/**
+ * Number of elements in an array.
+ */
+#ifndef Elements
+#define Elements(x) (sizeof(x)/sizeof((x)[0]))
+#endif
+
+
+/**
+ * Offset of a field in a struct, in bytes.
+ */
+#define Offset(TYPE, MEMBER) ((uintptr_t)&(((TYPE *)NULL)->MEMBER))
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* U_MEMORY_H */
diff --git a/src/minigallium/auxiliary/util/u_mm.c b/src/minigallium/auxiliary/util/u_mm.c
new file mode 100644
index 0000000..82f8370
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_mm.c
@@ -0,0 +1,296 @@
+/**************************************************************************
+ *
+ * Copyright (C) 1999 Wittawat Yamwong
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#include "pipe/p_compiler.h"
+#include "util/u_debug.h"
+
+#include "util/u_memory.h"
+#include "util/u_mm.h"
+
+
+void
+u_mmDumpMemInfo(const struct mem_block *heap)
+{
+ debug_printf("Memory heap %p:\n", (void *) heap);
+ if (heap == 0) {
+ debug_printf(" heap == 0\n");
+ }
+ else {
+ const struct mem_block *p;
+ int total_used = 0, total_free = 0;
+
+ for (p = heap->next; p != heap; p = p->next) {
+ debug_printf(" Offset:%08x, Size:%08x, %c%c\n", p->ofs, p->size,
+ p->free ? 'F':'.',
+ p->reserved ? 'R':'.');
+ if (p->free)
+ total_free += p->size;
+ else
+ total_used += p->size;
+ }
+
+ debug_printf("'\nMemory stats: total = %d, used = %d, free = %d\n",
+ total_used + total_free, total_used, total_free);
+ debug_printf("\nFree list:\n");
+
+ for (p = heap->next_free; p != heap; p = p->next_free) {
+ debug_printf(" FREE Offset:%08x, Size:%08x, %c%c\n", p->ofs, p->size,
+ p->free ? 'F':'.',
+ p->reserved ? 'R':'.');
+ }
+
+ }
+ debug_printf("End of memory blocks\n");
+}
+
+
+struct mem_block *
+u_mmInit(int ofs, int size)
+{
+ struct mem_block *heap, *block;
+
+ if (size <= 0)
+ return NULL;
+
+ heap = CALLOC_STRUCT(mem_block);
+ if (!heap)
+ return NULL;
+
+ block = CALLOC_STRUCT(mem_block);
+ if (!block) {
+ FREE(heap);
+ return NULL;
+ }
+
+ heap->next = block;
+ heap->prev = block;
+ heap->next_free = block;
+ heap->prev_free = block;
+
+ block->heap = heap;
+ block->next = heap;
+ block->prev = heap;
+ block->next_free = heap;
+ block->prev_free = heap;
+
+ block->ofs = ofs;
+ block->size = size;
+ block->free = 1;
+
+ return heap;
+}
+
+
+static struct mem_block *
+SliceBlock(struct mem_block *p,
+ int startofs, int size,
+ int reserved, int alignment)
+{
+ struct mem_block *newblock;
+
+ /* break left [p, newblock, p->next], then p = newblock */
+ if (startofs > p->ofs) {
+ newblock = CALLOC_STRUCT(mem_block);
+ if (!newblock)
+ return NULL;
+ newblock->ofs = startofs;
+ newblock->size = p->size - (startofs - p->ofs);
+ newblock->free = 1;
+ newblock->heap = p->heap;
+
+ newblock->next = p->next;
+ newblock->prev = p;
+ p->next->prev = newblock;
+ p->next = newblock;
+
+ newblock->next_free = p->next_free;
+ newblock->prev_free = p;
+ p->next_free->prev_free = newblock;
+ p->next_free = newblock;
+
+ p->size -= newblock->size;
+ p = newblock;
+ }
+
+ /* break right, also [p, newblock, p->next] */
+ if (size < p->size) {
+ newblock = CALLOC_STRUCT(mem_block);
+ if (!newblock)
+ return NULL;
+ newblock->ofs = startofs + size;
+ newblock->size = p->size - size;
+ newblock->free = 1;
+ newblock->heap = p->heap;
+
+ newblock->next = p->next;
+ newblock->prev = p;
+ p->next->prev = newblock;
+ p->next = newblock;
+
+ newblock->next_free = p->next_free;
+ newblock->prev_free = p;
+ p->next_free->prev_free = newblock;
+ p->next_free = newblock;
+
+ p->size = size;
+ }
+
+ /* p = middle block */
+ p->free = 0;
+
+ /* Remove p from the free list:
+ */
+ p->next_free->prev_free = p->prev_free;
+ p->prev_free->next_free = p->next_free;
+
+ p->next_free = 0;
+ p->prev_free = 0;
+
+ p->reserved = reserved;
+ return p;
+}
+
+
+struct mem_block *
+u_mmAllocMem(struct mem_block *heap, int size, int align2, int startSearch)
+{
+ struct mem_block *p;
+ const int mask = (1 << align2)-1;
+ int startofs = 0;
+ int endofs;
+
+ assert(size >= 0);
+ assert(align2 >= 0);
+ assert(align2 <= 12); /* sanity check, 2^12 (4KB) enough? */
+
+ if (!heap || align2 < 0 || size <= 0)
+ return NULL;
+
+ for (p = heap->next_free; p != heap; p = p->next_free) {
+ assert(p->free);
+
+ startofs = (p->ofs + mask) & ~mask;
+ if ( startofs < startSearch ) {
+ startofs = startSearch;
+ }
+ endofs = startofs+size;
+ if (endofs <= (p->ofs+p->size))
+ break;
+ }
+
+ if (p == heap)
+ return NULL;
+
+ assert(p->free);
+ p = SliceBlock(p,startofs,size,0,mask+1);
+
+ return p;
+}
+
+
+struct mem_block *
+u_mmFindBlock(struct mem_block *heap, int start)
+{
+ struct mem_block *p;
+
+ for (p = heap->next; p != heap; p = p->next) {
+ if (p->ofs == start)
+ return p;
+ }
+
+ return NULL;
+}
+
+
+static INLINE int
+Join2Blocks(struct mem_block *p)
+{
+ /* XXX there should be some assertions here */
+
+ /* NOTE: heap->free == 0 */
+
+ if (p->free && p->next->free) {
+ struct mem_block *q = p->next;
+
+ assert(p->ofs + p->size == q->ofs);
+ p->size += q->size;
+
+ p->next = q->next;
+ q->next->prev = p;
+
+ q->next_free->prev_free = q->prev_free;
+ q->prev_free->next_free = q->next_free;
+
+ FREE(q);
+ return 1;
+ }
+ return 0;
+}
+
+int
+u_mmFreeMem(struct mem_block *b)
+{
+ if (!b)
+ return 0;
+
+ if (b->free) {
+ debug_printf("block already free\n");
+ return -1;
+ }
+ if (b->reserved) {
+ debug_printf("block is reserved\n");
+ return -1;
+ }
+
+ b->free = 1;
+ b->next_free = b->heap->next_free;
+ b->prev_free = b->heap;
+ b->next_free->prev_free = b;
+ b->prev_free->next_free = b;
+
+ Join2Blocks(b);
+ if (b->prev != b->heap)
+ Join2Blocks(b->prev);
+
+ return 0;
+}
+
+
+void
+u_mmDestroy(struct mem_block *heap)
+{
+ struct mem_block *p;
+
+ if (!heap)
+ return;
+
+ for (p = heap->next; p != heap; ) {
+ struct mem_block *next = p->next;
+ FREE(p);
+ p = next;
+ }
+
+ FREE(heap);
+}
diff --git a/src/minigallium/auxiliary/util/u_mm.h b/src/minigallium/auxiliary/util/u_mm.h
new file mode 100644
index 0000000..6b158aa
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_mm.h
@@ -0,0 +1,91 @@
+/**************************************************************************
+ *
+ * Copyright (C) 1999 Wittawat Yamwong
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+/**
+ * @file
+ * Memory manager code. Primarily used by device drivers to manage texture
+ * heaps, etc.
+ */
+
+
+#ifndef _U_MM_H_
+#define _U_MM_H_
+
+
+struct mem_block {
+ struct mem_block *next, *prev;
+ struct mem_block *next_free, *prev_free;
+ struct mem_block *heap;
+ int ofs,size;
+ unsigned int free:1;
+ unsigned int reserved:1;
+};
+
+
+
+/**
+ * input: total size in bytes
+ * return: a heap pointer if OK, NULL if error
+ */
+extern struct mem_block *u_mmInit(int ofs, int size);
+
+/**
+ * Allocate 'size' bytes with 2^align2 bytes alignment,
+ * restrict the search to free memory after 'startSearch'
+ * depth and back buffers should be in different 4mb banks
+ * to get better page hits if possible
+ * input: size = size of block
+ * align2 = 2^align2 bytes alignment
+ * startSearch = linear offset from start of heap to begin search
+ * return: pointer to the allocated block, 0 if error
+ */
+extern struct mem_block *u_mmAllocMem(struct mem_block *heap, int size, int align2,
+ int startSearch);
+
+/**
+ * Free block starts at offset
+ * input: pointer to a block
+ * return: 0 if OK, -1 if error
+ */
+extern int u_mmFreeMem(struct mem_block *b);
+
+/**
+ * Free block starts at offset
+ * input: pointer to a heap, start offset
+ * return: pointer to a block
+ */
+extern struct mem_block *u_mmFindBlock(struct mem_block *heap, int start);
+
+/**
+ * destroy MM
+ */
+extern void u_mmDestroy(struct mem_block *mmInit);
+
+/**
+ * For debugging purposes.
+ */
+extern void u_mmDumpMemInfo(const struct mem_block *mmInit);
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_network.c b/src/minigallium/auxiliary/util/u_network.c
new file mode 100644
index 0000000..45b3691
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_network.c
@@ -0,0 +1,191 @@
+
+#include "pipe/p_compiler.h"
+#include "util/u_network.h"
+#include "util/u_debug.h"
+
+#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+# include <winsock2.h>
+# include <windows.h>
+#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || \
+ defined(PIPE_OS_APPLE) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_SOLARIS)
+# include <sys/socket.h>
+# include <netinet/in.h>
+# include <unistd.h>
+# include <fcntl.h>
+# include <netdb.h>
+#else
+# warning "No socket implementation"
+#endif
+
+boolean
+u_socket_init()
+{
+#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+ WORD wVersionRequested;
+ WSADATA wsaData;
+ int err;
+
+ /* Use the MAKEWORD(lowbyte, highbyte) macro declared in Windef.h */
+ wVersionRequested = MAKEWORD(1, 1);
+
+ err = WSAStartup(wVersionRequested, &wsaData);
+ if (err != 0) {
+ debug_printf("WSAStartup failed with error: %d\n", err);
+ return FALSE;
+ }
+ return TRUE;
+#elif defined(PIPE_HAVE_SOCKETS)
+ return TRUE;
+#else
+ return FALSE;
+#endif
+}
+
+void
+u_socket_stop()
+{
+#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+ WSACleanup();
+#endif
+}
+
+void
+u_socket_close(int s)
+{
+ if (s < 0)
+ return;
+
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) \
+ || defined(PIPE_OS_APPLE) || defined(PIPE_OS_SOLARIS)
+ shutdown(s, SHUT_RDWR);
+ close(s);
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+ shutdown(s, SD_BOTH);
+ closesocket(s);
+#else
+ assert(0);
+#endif
+}
+
+int u_socket_accept(int s)
+{
+#if defined(PIPE_HAVE_SOCKETS)
+ return accept(s, NULL, NULL);
+#else
+ return -1;
+#endif
+}
+
+int
+u_socket_send(int s, void *data, size_t size)
+{
+#if defined(PIPE_HAVE_SOCKETS)
+ return send(s, data, size, 0);
+#else
+ return -1;
+#endif
+}
+
+int
+u_socket_peek(int s, void *data, size_t size)
+{
+#if defined(PIPE_HAVE_SOCKETS)
+ return recv(s, data, size, MSG_PEEK);
+#else
+ return -1;
+#endif
+}
+
+int
+u_socket_recv(int s, void *data, size_t size)
+{
+#if defined(PIPE_HAVE_SOCKETS)
+ return recv(s, data, size, 0);
+#else
+ return -1;
+#endif
+}
+
+int
+u_socket_connect(const char *hostname, uint16_t port)
+{
+#if defined(PIPE_HAVE_SOCKETS)
+ int s;
+ struct sockaddr_in sa;
+ struct hostent *host = NULL;
+
+ memset(&sa, 0, sizeof(struct sockaddr_in));
+ host = gethostbyname(hostname);
+ if (!host)
+ return -1;
+
+ memcpy((char *)&sa.sin_addr,host->h_addr_list[0],host->h_length);
+ sa.sin_family= host->h_addrtype;
+ sa.sin_port = htons(port);
+
+ s = socket(host->h_addrtype, SOCK_STREAM, IPPROTO_TCP);
+ if (s < 0)
+ return -1;
+
+ if (connect(s, (struct sockaddr *)&sa, sizeof(sa))) {
+ u_socket_close(s);
+ return -1;
+ }
+
+ return s;
+#else
+ assert(0);
+ return -1;
+#endif
+}
+
+int
+u_socket_listen_on_port(uint16_t portnum)
+{
+#if defined(PIPE_HAVE_SOCKETS)
+ int s;
+ struct sockaddr_in sa;
+ memset(&sa, 0, sizeof(struct sockaddr_in));
+
+ sa.sin_family = AF_INET;
+ sa.sin_port = htons(portnum);
+
+ s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+ if (s < 0)
+ return -1;
+
+ if (bind(s, (struct sockaddr *)&sa, sizeof(struct sockaddr_in)) == -1) {
+ u_socket_close(s);
+ return -1;
+ }
+
+ listen(s, 0);
+
+ return s;
+#else
+ assert(0);
+ return -1;
+#endif
+}
+
+void
+u_socket_block(int s, boolean block)
+{
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) \
+ || defined(PIPE_OS_APPLE) || defined(PIPE_OS_SOLARIS)
+ int old = fcntl(s, F_GETFL, 0);
+ if (old == -1)
+ return;
+
+ /* TODO obey block */
+ if (block)
+ fcntl(s, F_SETFL, old & ~O_NONBLOCK);
+ else
+ fcntl(s, F_SETFL, old | O_NONBLOCK);
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+ u_long iMode = block ? 0 : 1;
+ ioctlsocket(s, FIONBIO, &iMode);
+#else
+ assert(0);
+#endif
+}
diff --git a/src/minigallium/auxiliary/util/u_network.h b/src/minigallium/auxiliary/util/u_network.h
new file mode 100644
index 0000000..61fe9a3
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_network.h
@@ -0,0 +1,25 @@
+
+#ifndef _U_NETWORK_H_
+#define _U_NETWORK_H_
+
+#include "pipe/p_compiler.h"
+
+#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+# define PIPE_HAVE_SOCKETS
+#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || \
+ defined(PIPE_OS_APPLE) || defined(PIPE_OS_SOLARIS)
+# define PIPE_HAVE_SOCKETS
+#endif
+
+boolean u_socket_init(void);
+void u_socket_stop(void);
+void u_socket_close(int s);
+int u_socket_listen_on_port(uint16_t portnum);
+int u_socket_accept(int s);
+int u_socket_connect(const char *host, uint16_t port);
+int u_socket_send(int s, void *data, size_t size);
+int u_socket_peek(int s, void *data, size_t size);
+int u_socket_recv(int s, void *data, size_t size);
+void u_socket_block(int s, boolean block);
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_pack_color.h b/src/minigallium/auxiliary/util/u_pack_color.h
new file mode 100644
index 0000000..102ad60
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_pack_color.h
@@ -0,0 +1,651 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Functions to produce packed colors/Z from floats.
+ */
+
+
+#ifndef U_PACK_COLOR_H
+#define U_PACK_COLOR_H
+
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_format.h"
+#include "util/u_debug.h"
+#include "util/u_format.h"
+#include "util/u_math.h"
+
+
+/**
+ * Helper union for packing pixel values.
+ * Will often contain values in formats which are too complex to be described
+ * in simple terms, hence might just effectively contain a number of bytes.
+ * Must be big enough to hold data for all formats (currently 256 bits).
+ */
+union util_color {
+ ubyte ub;
+ ushort us;
+ uint ui;
+ ushort h[4]; /* half float */
+ float f[4];
+ double d[4];
+};
+
+/**
+ * Pack ubyte R,G,B,A into dest pixel.
+ */
+static INLINE void
+util_pack_color_ub(ubyte r, ubyte g, ubyte b, ubyte a,
+ enum pipe_format format, union util_color *uc)
+{
+ switch (format) {
+ case PIPE_FORMAT_ABGR8888_UNORM:
+ {
+ uc->ui = (r << 24) | (g << 16) | (b << 8) | a;
+ }
+ return;
+ case PIPE_FORMAT_XBGR8888_UNORM:
+ {
+ uc->ui = (r << 24) | (g << 16) | (b << 8) | 0xff;
+ }
+ return;
+ case PIPE_FORMAT_BGRA8888_UNORM:
+ {
+ uc->ui = (a << 24) | (r << 16) | (g << 8) | b;
+ }
+ return;
+ case PIPE_FORMAT_BGRX8888_UNORM:
+ {
+ uc->ui = (0xff << 24) | (r << 16) | (g << 8) | b;
+ }
+ return;
+ case PIPE_FORMAT_ARGB8888_UNORM:
+ {
+ uc->ui = (b << 24) | (g << 16) | (r << 8) | a;
+ }
+ return;
+ case PIPE_FORMAT_XRGB8888_UNORM:
+ {
+ uc->ui = (b << 24) | (g << 16) | (r << 8) | 0xff;
+ }
+ return;
+ case PIPE_FORMAT_B5G6R5_UNORM:
+ {
+ uc->us = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | (b >> 3);
+ }
+ return;
+ case PIPE_FORMAT_B5G5R5X1_UNORM:
+ {
+ uc->us = ((0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | (b >> 3);
+ }
+ return;
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
+ {
+ uc->us = ((a & 0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | (b >> 3);
+ }
+ return;
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
+ {
+ uc->us = ((a & 0xf0) << 8) | ((r & 0xf0) << 4) | ((g & 0xf0) << 0) | (b >> 4);
+ }
+ return;
+ case PIPE_FORMAT_A8_UNORM:
+ {
+ uc->ub = a;
+ }
+ return;
+ case PIPE_FORMAT_L8_UNORM:
+ case PIPE_FORMAT_I8_UNORM:
+ {
+ uc->ub = r;
+ }
+ return;
+ case PIPE_FORMAT_R32G32B32A32_FLOAT:
+ {
+ uc->f[0] = (float)r / 255.0f;
+ uc->f[1] = (float)g / 255.0f;
+ uc->f[2] = (float)b / 255.0f;
+ uc->f[3] = (float)a / 255.0f;
+ }
+ return;
+ case PIPE_FORMAT_R32G32B32_FLOAT:
+ {
+ uc->f[0] = (float)r / 255.0f;
+ uc->f[1] = (float)g / 255.0f;
+ uc->f[2] = (float)b / 255.0f;
+ }
+ return;
+
+ /* Handle other cases with a generic function.
+ */
+ default:
+ {
+ ubyte src[4];
+
+ src[0] = r;
+ src[1] = g;
+ src[2] = b;
+ src[3] = a;
+ util_format_write_4ub(format, src, 0, uc, 0, 0, 0, 1, 1);
+ }
+ }
+}
+
+
+/**
+ * Unpack RGBA from a packed pixel, returning values as ubytes in [0,255].
+ */
+static INLINE void
+util_unpack_color_ub(enum pipe_format format, union util_color *uc,
+ ubyte *r, ubyte *g, ubyte *b, ubyte *a)
+{
+ switch (format) {
+ case PIPE_FORMAT_ABGR8888_UNORM:
+ {
+ uint p = uc->ui;
+ *r = (ubyte) ((p >> 24) & 0xff);
+ *g = (ubyte) ((p >> 16) & 0xff);
+ *b = (ubyte) ((p >> 8) & 0xff);
+ *a = (ubyte) ((p >> 0) & 0xff);
+ }
+ return;
+ case PIPE_FORMAT_XBGR8888_UNORM:
+ {
+ uint p = uc->ui;
+ *r = (ubyte) ((p >> 24) & 0xff);
+ *g = (ubyte) ((p >> 16) & 0xff);
+ *b = (ubyte) ((p >> 8) & 0xff);
+ *a = (ubyte) 0xff;
+ }
+ return;
+ case PIPE_FORMAT_BGRA8888_UNORM:
+ {
+ uint p = uc->ui;
+ *r = (ubyte) ((p >> 16) & 0xff);
+ *g = (ubyte) ((p >> 8) & 0xff);
+ *b = (ubyte) ((p >> 0) & 0xff);
+ *a = (ubyte) ((p >> 24) & 0xff);
+ }
+ return;
+ case PIPE_FORMAT_BGRX8888_UNORM:
+ {
+ uint p = uc->ui;
+ *r = (ubyte) ((p >> 16) & 0xff);
+ *g = (ubyte) ((p >> 8) & 0xff);
+ *b = (ubyte) ((p >> 0) & 0xff);
+ *a = (ubyte) 0xff;
+ }
+ return;
+ case PIPE_FORMAT_ARGB8888_UNORM:
+ {
+ uint p = uc->ui;
+ *r = (ubyte) ((p >> 8) & 0xff);
+ *g = (ubyte) ((p >> 16) & 0xff);
+ *b = (ubyte) ((p >> 24) & 0xff);
+ *a = (ubyte) ((p >> 0) & 0xff);
+ }
+ return;
+ case PIPE_FORMAT_XRGB8888_UNORM:
+ {
+ uint p = uc->ui;
+ *r = (ubyte) ((p >> 8) & 0xff);
+ *g = (ubyte) ((p >> 16) & 0xff);
+ *b = (ubyte) ((p >> 24) & 0xff);
+ *a = (ubyte) 0xff;
+ }
+ return;
+ case PIPE_FORMAT_B5G6R5_UNORM:
+ {
+ ushort p = uc->us;
+ *r = (ubyte) (((p >> 8) & 0xf8) | ((p >> 13) & 0x7));
+ *g = (ubyte) (((p >> 3) & 0xfc) | ((p >> 9) & 0x3));
+ *b = (ubyte) (((p << 3) & 0xf8) | ((p >> 2) & 0x7));
+ *a = (ubyte) 0xff;
+ }
+ return;
+ case PIPE_FORMAT_B5G5R5X1_UNORM:
+ {
+ ushort p = uc->us;
+ *r = (ubyte) (((p >> 7) & 0xf8) | ((p >> 12) & 0x7));
+ *g = (ubyte) (((p >> 2) & 0xf8) | ((p >> 7) & 0x7));
+ *b = (ubyte) (((p << 3) & 0xf8) | ((p >> 2) & 0x7));
+ *a = (ubyte) 0xff;
+ }
+ return;
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
+ {
+ ushort p = uc->us;
+ *r = (ubyte) (((p >> 7) & 0xf8) | ((p >> 12) & 0x7));
+ *g = (ubyte) (((p >> 2) & 0xf8) | ((p >> 7) & 0x7));
+ *b = (ubyte) (((p << 3) & 0xf8) | ((p >> 2) & 0x7));
+ *a = (ubyte) (0xff * (p >> 15));
+ }
+ return;
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
+ {
+ ushort p = uc->us;
+ *r = (ubyte) (((p >> 4) & 0xf0) | ((p >> 8) & 0xf));
+ *g = (ubyte) (((p >> 0) & 0xf0) | ((p >> 4) & 0xf));
+ *b = (ubyte) (((p << 4) & 0xf0) | ((p >> 0) & 0xf));
+ *a = (ubyte) (((p >> 8) & 0xf0) | ((p >> 12) & 0xf));
+ }
+ return;
+ case PIPE_FORMAT_A8_UNORM:
+ {
+ ubyte p = uc->ub;
+ *r = *g = *b = (ubyte) 0xff;
+ *a = p;
+ }
+ return;
+ case PIPE_FORMAT_L8_UNORM:
+ {
+ ubyte p = uc->ub;
+ *r = *g = *b = p;
+ *a = (ubyte) 0xff;
+ }
+ return;
+ case PIPE_FORMAT_I8_UNORM:
+ {
+ ubyte p = uc->ub;
+ *r = *g = *b = *a = p;
+ }
+ return;
+ case PIPE_FORMAT_R32G32B32A32_FLOAT:
+ {
+ const float *p = &uc->f[0];
+ *r = float_to_ubyte(p[0]);
+ *g = float_to_ubyte(p[1]);
+ *b = float_to_ubyte(p[2]);
+ *a = float_to_ubyte(p[3]);
+ }
+ return;
+ case PIPE_FORMAT_R32G32B32_FLOAT:
+ {
+ const float *p = &uc->f[0];
+ *r = float_to_ubyte(p[0]);
+ *g = float_to_ubyte(p[1]);
+ *b = float_to_ubyte(p[2]);
+ *a = (ubyte) 0xff;
+ }
+ return;
+
+ case PIPE_FORMAT_R32G32_FLOAT:
+ {
+ const float *p = &uc->f[0];
+ *r = float_to_ubyte(p[0]);
+ *g = float_to_ubyte(p[1]);
+ *b = *a = (ubyte) 0xff;
+ }
+ return;
+
+ case PIPE_FORMAT_R32_FLOAT:
+ {
+ const float *p = &uc->f[0];
+ *r = float_to_ubyte(p[0]);
+ *g = *b = *a = (ubyte) 0xff;
+ }
+ return;
+
+ /* Handle other cases with a generic function.
+ */
+ default:
+ {
+ ubyte dst[4];
+
+ util_format_read_4ub(format, dst, 0, uc, 0, 0, 0, 1, 1);
+ *r = dst[0];
+ *g = dst[1];
+ *b = dst[2];
+ *a = dst[3];
+ }
+ }
+}
+
+
+/**
+ * Note rgba outside [0,1] will be clamped for int pixel formats.
+ * This will not work (and might not really be useful with float input)
+ * for pure integer formats (which lack the pack_rgba_float function).
+ */
+static INLINE void
+util_pack_color(const float rgba[4], enum pipe_format format, union util_color *uc)
+{
+ ubyte r = 0;
+ ubyte g = 0;
+ ubyte b = 0;
+ ubyte a = 0;
+
+ if (util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 0) <= 8) {
+ /* format uses 8-bit components or less */
+ r = float_to_ubyte(rgba[0]);
+ g = float_to_ubyte(rgba[1]);
+ b = float_to_ubyte(rgba[2]);
+ a = float_to_ubyte(rgba[3]);
+ }
+
+ switch (format) {
+ case PIPE_FORMAT_ABGR8888_UNORM:
+ {
+ uc->ui = (r << 24) | (g << 16) | (b << 8) | a;
+ }
+ return;
+ case PIPE_FORMAT_XBGR8888_UNORM:
+ {
+ uc->ui = (r << 24) | (g << 16) | (b << 8) | 0xff;
+ }
+ return;
+ case PIPE_FORMAT_BGRA8888_UNORM:
+ {
+ uc->ui = (a << 24) | (r << 16) | (g << 8) | b;
+ }
+ return;
+ case PIPE_FORMAT_BGRX8888_UNORM:
+ {
+ uc->ui = (0xff << 24) | (r << 16) | (g << 8) | b;
+ }
+ return;
+ case PIPE_FORMAT_ARGB8888_UNORM:
+ {
+ uc->ui = (b << 24) | (g << 16) | (r << 8) | a;
+ }
+ return;
+ case PIPE_FORMAT_XRGB8888_UNORM:
+ {
+ uc->ui = (b << 24) | (g << 16) | (r << 8) | 0xff;
+ }
+ return;
+ case PIPE_FORMAT_B5G6R5_UNORM:
+ {
+ uc->us = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | (b >> 3);
+ }
+ return;
+ case PIPE_FORMAT_B5G5R5X1_UNORM:
+ {
+ uc->us = ((0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | (b >> 3);
+ }
+ return;
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
+ {
+ uc->us = ((a & 0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | (b >> 3);
+ }
+ return;
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
+ {
+ uc->us = ((a & 0xf0) << 8) | ((r & 0xf0) << 4) | ((g & 0xf0) << 0) | (b >> 4);
+ }
+ return;
+ case PIPE_FORMAT_A8_UNORM:
+ {
+ uc->ub = a;
+ }
+ return;
+ case PIPE_FORMAT_L8_UNORM:
+ case PIPE_FORMAT_I8_UNORM:
+ {
+ uc->ub = r;
+ }
+ return;
+ case PIPE_FORMAT_R32G32B32A32_FLOAT:
+ {
+ uc->f[0] = rgba[0];
+ uc->f[1] = rgba[1];
+ uc->f[2] = rgba[2];
+ uc->f[3] = rgba[3];
+ }
+ return;
+ case PIPE_FORMAT_R32G32B32_FLOAT:
+ {
+ uc->f[0] = rgba[0];
+ uc->f[1] = rgba[1];
+ uc->f[2] = rgba[2];
+ }
+ return;
+
+ /* Handle other cases with a generic function.
+ */
+ default:
+ util_format_write_4f(format, rgba, 0, uc, 0, 0, 0, 1, 1);
+ }
+}
+
+/* Integer versions of util_pack_z and util_pack_z_stencil - useful for
+ * constructing clear masks.
+ */
+static INLINE uint32_t
+util_pack_mask_z(enum pipe_format format, uint32_t z)
+{
+ switch (format) {
+ case PIPE_FORMAT_Z16_UNORM:
+ return z & 0xffff;
+ case PIPE_FORMAT_Z32_UNORM:
+ case PIPE_FORMAT_Z32_FLOAT:
+ return z;
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
+ case PIPE_FORMAT_Z24X8_UNORM:
+ return z & 0xffffff;
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
+ return (z & 0xffffff) << 8;
+ case PIPE_FORMAT_S8_UINT:
+ return 0;
+ default:
+ debug_print_format("gallium: unhandled format in util_pack_mask_z()", format);
+ assert(0);
+ return 0;
+ }
+}
+
+
+static INLINE uint64_t
+util_pack64_mask_z(enum pipe_format format, uint32_t z)
+{
+ switch (format) {
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
+ return z;
+ default:
+ return util_pack_mask_z(format, z);
+ }
+}
+
+
+static INLINE uint32_t
+util_pack_mask_z_stencil(enum pipe_format format, uint32_t z, uint8_t s)
+{
+ uint32_t packed = util_pack_mask_z(format, z);
+
+ switch (format) {
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
+ packed |= (uint32_t)s << 24;
+ break;
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
+ packed |= s;
+ break;
+ case PIPE_FORMAT_S8_UINT:
+ packed |= s;
+ break;
+ default:
+ break;
+ }
+
+ return packed;
+}
+
+
+static INLINE uint64_t
+util_pack64_mask_z_stencil(enum pipe_format format, uint32_t z, uint8_t s)
+{
+ uint64_t packed;
+
+ switch (format) {
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
+ packed = util_pack64_mask_z(format, z);
+ packed |= (uint64_t)s << 32ull;
+ return packed;
+ default:
+ return util_pack_mask_z_stencil(format, z, s);
+ }
+}
+
+
+/**
+ * Note: it's assumed that z is in [0,1]
+ */
+static INLINE uint32_t
+util_pack_z(enum pipe_format format, double z)
+{
+ union fi fui;
+
+ if (z == 0.0)
+ return 0;
+
+ switch (format) {
+ case PIPE_FORMAT_Z16_UNORM:
+ if (z == 1.0)
+ return 0xffff;
+ return (uint32_t) (z * 0xffff);
+ case PIPE_FORMAT_Z32_UNORM:
+ /* special-case to avoid overflow */
+ if (z == 1.0)
+ return 0xffffffff;
+ return (uint32_t) (z * 0xffffffff);
+ case PIPE_FORMAT_Z32_FLOAT:
+ fui.f = (float)z;
+ return fui.ui;
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
+ case PIPE_FORMAT_Z24X8_UNORM:
+ if (z == 1.0)
+ return 0xffffff;
+ return (uint32_t) (z * 0xffffff);
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
+ if (z == 1.0)
+ return 0xffffff00;
+ return ((uint32_t) (z * 0xffffff)) << 8;
+ case PIPE_FORMAT_S8_UINT:
+ /* this case can get it via util_pack_z_stencil() */
+ return 0;
+ default:
+ debug_print_format("gallium: unhandled format in util_pack_z()", format);
+ assert(0);
+ return 0;
+ }
+}
+
+
+static INLINE uint64_t
+util_pack64_z(enum pipe_format format, double z)
+{
+ union fi fui;
+
+ if (z == 0)
+ return 0;
+
+ switch (format) {
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
+ fui.f = (float)z;
+ return fui.ui;
+ default:
+ return util_pack_z(format, z);
+ }
+}
+
+
+/**
+ * Pack Z and/or stencil values into a 32-bit value described by format.
+ * Note: it's assumed that z is in [0,1] and s in [0,255]
+ */
+static INLINE uint32_t
+util_pack_z_stencil(enum pipe_format format, double z, uint8_t s)
+{
+ uint32_t packed = util_pack_z(format, z);
+
+ switch (format) {
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
+ packed |= (uint32_t)s << 24;
+ break;
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
+ packed |= s;
+ break;
+ case PIPE_FORMAT_S8_UINT:
+ packed |= s;
+ break;
+ default:
+ break;
+ }
+
+ return packed;
+}
+
+
+static INLINE uint64_t
+util_pack64_z_stencil(enum pipe_format format, double z, uint8_t s)
+{
+ uint64_t packed;
+
+ switch (format) {
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
+ packed = util_pack64_z(format, z);
+ packed |= (uint64_t)s << 32ull;
+ break;
+ default:
+ return util_pack_z_stencil(format, z, s);
+ }
+
+ return packed;
+}
+
+
+/**
+ * Pack 4 ubytes into a 4-byte word
+ */
+static INLINE unsigned
+pack_ub4(ubyte b0, ubyte b1, ubyte b2, ubyte b3)
+{
+ return ((((unsigned int)b0) << 0) |
+ (((unsigned int)b1) << 8) |
+ (((unsigned int)b2) << 16) |
+ (((unsigned int)b3) << 24));
+}
+
+
+/**
+ * Pack/convert 4 floats into one 4-byte word.
+ */
+static INLINE unsigned
+pack_ui32_float4(float a, float b, float c, float d)
+{
+ return pack_ub4( float_to_ubyte(a),
+ float_to_ubyte(b),
+ float_to_ubyte(c),
+ float_to_ubyte(d) );
+}
+
+
+
+#endif /* U_PACK_COLOR_H */
diff --git a/src/minigallium/auxiliary/util/u_pointer.h b/src/minigallium/auxiliary/util/u_pointer.h
new file mode 100644
index 0000000..cce0c74
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_pointer.h
@@ -0,0 +1,130 @@
+/**************************************************************************
+ *
+ * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_POINTER_H
+#define U_POINTER_H
+
+#include "pipe/p_compiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+static INLINE intptr_t
+pointer_to_intptr( const void *p )
+{
+ union {
+ const void *p;
+ intptr_t i;
+ } pi;
+ pi.p = p;
+ return pi.i;
+}
+
+static INLINE void *
+intptr_to_pointer( intptr_t i )
+{
+ union {
+ void *p;
+ intptr_t i;
+ } pi;
+ pi.i = i;
+ return pi.p;
+}
+
+static INLINE uintptr_t
+pointer_to_uintptr( const void *ptr )
+{
+ union {
+ const void *p;
+ uintptr_t u;
+ } pu;
+ pu.p = ptr;
+ return pu.u;
+}
+
+static INLINE void *
+uintptr_to_pointer( uintptr_t u )
+{
+ union {
+ void *p;
+ uintptr_t u;
+ } pu;
+ pu.u = u;
+ return pu.p;
+}
+
+/**
+ * Return a pointer aligned to next multiple of N bytes.
+ */
+static INLINE void *
+align_pointer( const void *unaligned, uintptr_t alignment )
+{
+ uintptr_t aligned = (pointer_to_uintptr( unaligned ) + alignment - 1) & ~(alignment - 1);
+ return uintptr_to_pointer( aligned );
+}
+
+
+/**
+ * Return a pointer aligned to next multiple of 16 bytes.
+ */
+static INLINE void *
+align16( void *unaligned )
+{
+ return align_pointer( unaligned, 16 );
+}
+
+typedef void (*func_pointer)(void);
+
+static INLINE func_pointer
+pointer_to_func( void *p )
+{
+ union {
+ void *p;
+ func_pointer f;
+ } pf;
+ pf.p = p;
+ return pf.f;
+}
+
+static INLINE void *
+func_to_pointer( func_pointer f )
+{
+ union {
+ void *p;
+ func_pointer f;
+ } pf;
+ pf.f = f;
+ return pf.p;
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_POINTER_H */
diff --git a/src/minigallium/auxiliary/util/u_prim.h b/src/minigallium/auxiliary/util/u_prim.h
new file mode 100644
index 0000000..8a9cca2
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_prim.h
@@ -0,0 +1,268 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#ifndef U_PRIM_H
+#define U_PRIM_H
+
+
+#include "pipe/p_defines.h"
+#include "util/u_debug.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct u_prim_vertex_count {
+ unsigned min;
+ unsigned incr;
+};
+
+/**
+ * Decompose a primitive that is a loop, a strip, or a fan. Return the
+ * original primitive if it is already decomposed.
+ */
+static INLINE unsigned
+u_decomposed_prim(unsigned prim)
+{
+ switch (prim) {
+ case PIPE_PRIM_LINE_LOOP:
+ case PIPE_PRIM_LINE_STRIP:
+ return PIPE_PRIM_LINES;
+ case PIPE_PRIM_TRIANGLE_STRIP:
+ case PIPE_PRIM_TRIANGLE_FAN:
+ return PIPE_PRIM_TRIANGLES;
+ case PIPE_PRIM_QUAD_STRIP:
+ return PIPE_PRIM_QUADS;
+ case PIPE_PRIM_LINE_STRIP_ADJACENCY:
+ return PIPE_PRIM_LINES_ADJACENCY;
+ case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY:
+ return PIPE_PRIM_TRIANGLES_ADJACENCY;
+ default:
+ return prim;
+ }
+}
+
+/**
+ * Reduce a primitive to one of PIPE_PRIM_POINTS, PIPE_PRIM_LINES, and
+ * PIPE_PRIM_TRIANGLES.
+ */
+static INLINE unsigned
+u_reduced_prim(unsigned prim)
+{
+ switch (prim) {
+ case PIPE_PRIM_POINTS:
+ return PIPE_PRIM_POINTS;
+ case PIPE_PRIM_LINES:
+ case PIPE_PRIM_LINE_LOOP:
+ case PIPE_PRIM_LINE_STRIP:
+ case PIPE_PRIM_LINES_ADJACENCY:
+ case PIPE_PRIM_LINE_STRIP_ADJACENCY:
+ return PIPE_PRIM_LINES;
+ default:
+ return PIPE_PRIM_TRIANGLES;
+ }
+}
+
+/**
+ * Re-assemble a primitive to remove its adjacency.
+ */
+static INLINE unsigned
+u_assembled_prim(unsigned prim)
+{
+ switch (prim) {
+ case PIPE_PRIM_LINES_ADJACENCY:
+ case PIPE_PRIM_LINE_STRIP_ADJACENCY:
+ return PIPE_PRIM_LINES;
+ case PIPE_PRIM_TRIANGLES_ADJACENCY:
+ case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY:
+ return PIPE_PRIM_TRIANGLES;
+ default:
+ return prim;
+ }
+}
+
+/**
+ * Return the vertex count information for a primitive.
+ *
+ * Note that if this function is called directly or indirectly anywhere in a
+ * source file, it will increase the size of the binary slightly more than
+ * expected because of the use of a table.
+ */
+static INLINE const struct u_prim_vertex_count *
+u_prim_vertex_count(unsigned prim)
+{
+ static const struct u_prim_vertex_count prim_table[PIPE_PRIM_MAX] = {
+ { 1, 1 }, /* PIPE_PRIM_POINTS */
+ { 2, 2 }, /* PIPE_PRIM_LINES */
+ { 2, 1 }, /* PIPE_PRIM_LINE_LOOP */
+ { 2, 1 }, /* PIPE_PRIM_LINE_STRIP */
+ { 3, 3 }, /* PIPE_PRIM_TRIANGLES */
+ { 3, 1 }, /* PIPE_PRIM_TRIANGLE_STRIP */
+ { 3, 1 }, /* PIPE_PRIM_TRIANGLE_FAN */
+ { 4, 4 }, /* PIPE_PRIM_QUADS */
+ { 4, 2 }, /* PIPE_PRIM_QUAD_STRIP */
+ { 3, 1 }, /* PIPE_PRIM_POLYGON */
+ { 4, 4 }, /* PIPE_PRIM_LINES_ADJACENCY */
+ { 4, 1 }, /* PIPE_PRIM_LINE_STRIP_ADJACENCY */
+ { 6, 6 }, /* PIPE_PRIM_TRIANGLES_ADJACENCY */
+ { 6, 2 }, /* PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY */
+ };
+
+ return (likely(prim < PIPE_PRIM_MAX)) ? &prim_table[prim] : NULL;
+}
+
+static INLINE boolean u_validate_pipe_prim( unsigned pipe_prim, unsigned nr )
+{
+ const struct u_prim_vertex_count *count = u_prim_vertex_count(pipe_prim);
+
+ return (count && nr >= count->min);
+}
+
+
+static INLINE boolean u_trim_pipe_prim( unsigned pipe_prim, unsigned *nr )
+{
+ const struct u_prim_vertex_count *count = u_prim_vertex_count(pipe_prim);
+
+ if (count && *nr >= count->min) {
+ if (count->incr > 1)
+ *nr -= (*nr % count->incr);
+ return TRUE;
+ }
+ else {
+ *nr = 0;
+ return FALSE;
+ }
+}
+
+static INLINE unsigned
+u_vertices_per_prim(int primitive)
+{
+ switch(primitive) {
+ case PIPE_PRIM_POINTS:
+ return 1;
+ case PIPE_PRIM_LINES:
+ case PIPE_PRIM_LINE_LOOP:
+ case PIPE_PRIM_LINE_STRIP:
+ return 2;
+ case PIPE_PRIM_TRIANGLES:
+ case PIPE_PRIM_TRIANGLE_STRIP:
+ case PIPE_PRIM_TRIANGLE_FAN:
+ return 3;
+ case PIPE_PRIM_LINES_ADJACENCY:
+ case PIPE_PRIM_LINE_STRIP_ADJACENCY:
+ return 4;
+ case PIPE_PRIM_TRIANGLES_ADJACENCY:
+ case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY:
+ return 6;
+
+ /* following primitives should never be used
+ * with geometry shaders abd their size is
+ * undefined */
+ case PIPE_PRIM_POLYGON:
+ case PIPE_PRIM_QUADS:
+ case PIPE_PRIM_QUAD_STRIP:
+ default:
+ debug_printf("Unrecognized geometry shader primitive");
+ return 3;
+ }
+}
+
+/**
+ * Returns the number of decomposed primitives for the given
+ * vertex count.
+ * Parts of the pipline are invoked once for each triangle in
+ * triangle strip, triangle fans and triangles and once
+ * for each line in line strip, line loop, lines. Also
+ * statistics depend on knowing the exact number of decomposed
+ * primitives for a set of vertices.
+ */
+static INLINE unsigned
+u_decomposed_prims_for_vertices(int primitive, int vertices)
+{
+ switch (primitive) {
+ case PIPE_PRIM_POINTS:
+ return vertices;
+ case PIPE_PRIM_LINES:
+ return vertices / 2;
+ case PIPE_PRIM_LINE_LOOP:
+ return (vertices >= 2) ? vertices : 0;
+ case PIPE_PRIM_LINE_STRIP:
+ return (vertices >= 2) ? vertices - 1 : 0;
+ case PIPE_PRIM_TRIANGLES:
+ return vertices / 3;
+ case PIPE_PRIM_TRIANGLE_STRIP:
+ return (vertices >= 3) ? vertices - 2 : 0;
+ case PIPE_PRIM_TRIANGLE_FAN:
+ return (vertices >= 3) ? vertices - 2 : 0;
+ case PIPE_PRIM_LINES_ADJACENCY:
+ return vertices / 4;
+ case PIPE_PRIM_LINE_STRIP_ADJACENCY:
+ return (vertices >= 4) ? vertices - 3 : 0;
+ case PIPE_PRIM_TRIANGLES_ADJACENCY:
+ return vertices / 6;
+ case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY:
+ return (vertices >= 6) ? 1 + (vertices - 6) / 2 : 0;
+ case PIPE_PRIM_QUADS:
+ return vertices / 4;
+ case PIPE_PRIM_QUAD_STRIP:
+ return (vertices >= 4) ? (vertices - 2) / 2 : 0;
+ /* Polygons can't be decomposed
+ * because the number of their vertices isn't known so
+ * for them and whatever else we don't recognize just
+ * return 1 if the number of vertices is greater than
+ * or equal to 3 and zero otherwise */
+ case PIPE_PRIM_POLYGON:
+ default:
+ debug_printf("Invalid decomposition primitive!\n");
+ return (vertices >= 3) ? 1 : 0;
+ }
+}
+
+/**
+ * Returns the number of reduced/tessellated primitives for the given vertex
+ * count. Each quad is treated as two triangles. Polygons are treated as
+ * triangle fans.
+ */
+static INLINE unsigned
+u_reduced_prims_for_vertices(int primitive, int vertices)
+{
+ switch (primitive) {
+ case PIPE_PRIM_QUADS:
+ case PIPE_PRIM_QUAD_STRIP:
+ return u_decomposed_prims_for_vertices(primitive, vertices) * 2;
+ case PIPE_PRIM_POLYGON:
+ primitive = PIPE_PRIM_TRIANGLE_FAN;
+ /* fall through */
+ default:
+ return u_decomposed_prims_for_vertices(primitive, vertices);
+ }
+}
+
+const char *u_prim_name( unsigned pipe_prim );
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_pstipple.c b/src/minigallium/auxiliary/util/u_pstipple.c
new file mode 100644
index 0000000..640305f
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_pstipple.c
@@ -0,0 +1,456 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * Polygon stipple helper module. Drivers/GPUs which don't support polygon
+ * stipple natively can use this module to simulate it.
+ *
+ * Basically, modify fragment shader to sample the 32x32 stipple pattern
+ * texture and do a fragment kill for the 'off' bits.
+ *
+ * This was originally a 'draw' module stage, but since we don't need
+ * vertex window coords or anything, it can be a stand-alone utility module.
+ *
+ * Authors: Brian Paul
+ */
+
+
+#include "pipe/p_context.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_shader_tokens.h"
+#include "util/u_inlines.h"
+
+#include "util/u_format.h"
+#include "util/u_memory.h"
+#include "util/u_pstipple.h"
+#include "util/u_sampler.h"
+
+#include "tgsi/tgsi_transform.h"
+#include "tgsi/tgsi_dump.h"
+#include "tgsi/tgsi_scan.h"
+
+/** Approx number of new tokens for instructions in pstip_transform_inst() */
+#define NUM_NEW_TOKENS 50
+
+
+static void
+util_pstipple_update_stipple_texture(struct pipe_context *pipe,
+ struct pipe_resource *tex,
+ const uint32_t pattern[32])
+{
+ static const uint bit31 = 1 << 31;
+ struct pipe_transfer *transfer;
+ ubyte *data;
+ int i, j;
+
+ /* map texture memory */
+ data = pipe_transfer_map(pipe, tex, 0, 0,
+ PIPE_TRANSFER_WRITE, 0, 0, 32, 32, &transfer);
+
+ /*
+ * Load alpha texture.
+ * Note: 0 means keep the fragment, 255 means kill it.
+ * We'll negate the texel value and use KILL_IF which kills if value
+ * is negative.
+ */
+ for (i = 0; i < 32; i++) {
+ for (j = 0; j < 32; j++) {
+ if (pattern[i] & (bit31 >> j)) {
+ /* fragment "on" */
+ data[i * transfer->stride + j] = 0;
+ }
+ else {
+ /* fragment "off" */
+ data[i * transfer->stride + j] = 255;
+ }
+ }
+ }
+
+ /* unmap */
+ pipe->transfer_unmap(pipe, transfer);
+}
+
+
+/**
+ * Create a 32x32 alpha8 texture that encodes the given stipple pattern.
+ */
+struct pipe_resource *
+util_pstipple_create_stipple_texture(struct pipe_context *pipe,
+ const uint32_t pattern[32])
+{
+ struct pipe_screen *screen = pipe->screen;
+ struct pipe_resource templat, *tex;
+
+ memset(&templat, 0, sizeof(templat));
+ templat.target = PIPE_TEXTURE_2D;
+ templat.format = PIPE_FORMAT_A8_UNORM;
+ templat.last_level = 0;
+ templat.width0 = 32;
+ templat.height0 = 32;
+ templat.depth0 = 1;
+ templat.array_size = 1;
+ templat.bind = PIPE_BIND_SAMPLER_VIEW;
+
+ tex = screen->resource_create(screen, &templat);
+
+ if (tex)
+ util_pstipple_update_stipple_texture(pipe, tex, pattern);
+
+ return tex;
+}
+
+
+/**
+ * Create sampler view to sample the stipple texture.
+ */
+struct pipe_sampler_view *
+util_pstipple_create_sampler_view(struct pipe_context *pipe,
+ struct pipe_resource *tex)
+{
+ struct pipe_sampler_view templat, *sv;
+
+ u_sampler_view_default_template(&templat, tex, tex->format);
+ sv = pipe->create_sampler_view(pipe, tex, &templat);
+
+ return sv;
+}
+
+
+/**
+ * Create the sampler CSO that'll be used for stippling.
+ */
+void *
+util_pstipple_create_sampler(struct pipe_context *pipe)
+{
+ struct pipe_sampler_state templat;
+ void *s;
+
+ memset(&templat, 0, sizeof(templat));
+ templat.wrap_s = PIPE_TEX_WRAP_REPEAT;
+ templat.wrap_t = PIPE_TEX_WRAP_REPEAT;
+ templat.wrap_r = PIPE_TEX_WRAP_REPEAT;
+ templat.min_mip_filter = PIPE_TEX_MIPFILTER_NONE;
+ templat.min_img_filter = PIPE_TEX_FILTER_NEAREST;
+ templat.mag_img_filter = PIPE_TEX_FILTER_NEAREST;
+ templat.normalized_coords = 1;
+ templat.min_lod = 0.0f;
+ templat.max_lod = 0.0f;
+
+ s = pipe->create_sampler_state(pipe, &templat);
+ return s;
+}
+
+
+
+/**
+ * Subclass of tgsi_transform_context, used for transforming the
+ * user's fragment shader to add the extra texture sample and fragment kill
+ * instructions.
+ */
+struct pstip_transform_context {
+ struct tgsi_transform_context base;
+ struct tgsi_shader_info info;
+ uint tempsUsed; /**< bitmask */
+ int wincoordInput;
+ int maxInput;
+ uint samplersUsed; /**< bitfield of samplers used */
+ int freeSampler; /** an available sampler for the pstipple */
+ int texTemp; /**< temp registers */
+ int numImmed;
+ boolean firstInstruction;
+ uint coordOrigin;
+};
+
+
+/**
+ * TGSI declaration transform callback.
+ * Track samplers used, temps used, inputs used.
+ */
+static void
+pstip_transform_decl(struct tgsi_transform_context *ctx,
+ struct tgsi_full_declaration *decl)
+{
+ struct pstip_transform_context *pctx =
+ (struct pstip_transform_context *) ctx;
+
+ /* XXX we can use tgsi_shader_info instead of some of this */
+
+ if (decl->Declaration.File == TGSI_FILE_SAMPLER) {
+ uint i;
+ for (i = decl->Range.First; i <= decl->Range.Last; i++) {
+ pctx->samplersUsed |= 1 << i;
+ }
+ }
+ else if (decl->Declaration.File == TGSI_FILE_INPUT) {
+ pctx->maxInput = MAX2(pctx->maxInput, (int) decl->Range.Last);
+ if (decl->Semantic.Name == TGSI_SEMANTIC_POSITION)
+ pctx->wincoordInput = (int) decl->Range.First;
+ }
+ else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) {
+ uint i;
+ for (i = decl->Range.First; i <= decl->Range.Last; i++) {
+ pctx->tempsUsed |= (1 << i);
+ }
+ }
+
+ ctx->emit_declaration(ctx, decl);
+}
+
+
+static void
+pstip_transform_immed(struct tgsi_transform_context *ctx,
+ struct tgsi_full_immediate *immed)
+{
+ struct pstip_transform_context *pctx =
+ (struct pstip_transform_context *) ctx;
+ pctx->numImmed++;
+}
+
+
+/**
+ * Find the lowest zero bit in the given word, or -1 if bitfield is all ones.
+ */
+static int
+free_bit(uint bitfield)
+{
+ return ffs(~bitfield) - 1;
+}
+
+
+/**
+ * TGSI instruction transform callback.
+ * Before the first instruction, insert our new code to sample the
+ * stipple texture (using the fragment coord register) then kill the
+ * fragment if the stipple texture bit is off.
+ *
+ * Insert:
+ * declare new registers
+ * MUL texTemp, INPUT[wincoord], 1/32;
+ * TEX texTemp, texTemp, sampler;
+ * KILL_IF -texTemp; # if -texTemp < 0, kill fragment
+ * [...original code...]
+ */
+static void
+pstip_transform_inst(struct tgsi_transform_context *ctx,
+ struct tgsi_full_instruction *inst)
+{
+ struct pstip_transform_context *pctx =
+ (struct pstip_transform_context *) ctx;
+
+ if (pctx->firstInstruction) {
+ /* emit our new declarations before the first instruction */
+
+ struct tgsi_full_declaration decl;
+ struct tgsi_full_instruction newInst;
+ uint i;
+ int wincoordInput;
+
+ /* find free texture sampler */
+ pctx->freeSampler = free_bit(pctx->samplersUsed);
+ if (pctx->freeSampler >= PIPE_MAX_SAMPLERS)
+ pctx->freeSampler = PIPE_MAX_SAMPLERS - 1;
+
+ if (pctx->wincoordInput < 0)
+ wincoordInput = pctx->maxInput + 1;
+ else
+ wincoordInput = pctx->wincoordInput;
+
+ /* find one free temp register */
+ for (i = 0; i < 32; i++) {
+ if ((pctx->tempsUsed & (1 << i)) == 0) {
+ /* found a free temp */
+ if (pctx->texTemp < 0)
+ pctx->texTemp = i;
+ else
+ break;
+ }
+ }
+ assert(pctx->texTemp >= 0);
+
+ if (pctx->wincoordInput < 0) {
+ /* declare new position input reg */
+ decl = tgsi_default_full_declaration();
+ decl.Declaration.File = TGSI_FILE_INPUT;
+ decl.Declaration.Interpolate = 1;
+ decl.Declaration.Semantic = 1;
+ decl.Semantic.Name = TGSI_SEMANTIC_POSITION;
+ decl.Semantic.Index = 0;
+ decl.Range.First =
+ decl.Range.Last = wincoordInput;
+ decl.Interp.Interpolate = TGSI_INTERPOLATE_LINEAR;
+ ctx->emit_declaration(ctx, &decl);
+ }
+
+ /* declare new sampler */
+ decl = tgsi_default_full_declaration();
+ decl.Declaration.File = TGSI_FILE_SAMPLER;
+ decl.Range.First =
+ decl.Range.Last = pctx->freeSampler;
+ ctx->emit_declaration(ctx, &decl);
+
+ /* declare new temp regs */
+ decl = tgsi_default_full_declaration();
+ decl.Declaration.File = TGSI_FILE_TEMPORARY;
+ decl.Range.First =
+ decl.Range.Last = pctx->texTemp;
+ ctx->emit_declaration(ctx, &decl);
+
+ /* emit immediate = {1/32, 1/32, 1, 1}
+ * The index/position of this immediate will be pctx->numImmed
+ */
+ {
+ static const float value[4] = { 1.0/32, 1.0/32, 1.0, 1.0 };
+ struct tgsi_full_immediate immed;
+ uint size = 4;
+ immed = tgsi_default_full_immediate();
+ immed.Immediate.NrTokens = 1 + size; /* one for the token itself */
+ immed.u[0].Float = value[0];
+ immed.u[1].Float = value[1];
+ immed.u[2].Float = value[2];
+ immed.u[3].Float = value[3];
+ ctx->emit_immediate(ctx, &immed);
+ }
+
+ pctx->firstInstruction = FALSE;
+
+
+ /*
+ * Insert new MUL/TEX/KILL_IF instructions at start of program
+ * Take gl_FragCoord, divide by 32 (stipple size), sample the
+ * texture and kill fragment if needed.
+ *
+ * We'd like to use non-normalized texcoords to index into a RECT
+ * texture, but we can only use REPEAT wrap mode with normalized
+ * texcoords. Darn.
+ */
+
+ /* XXX invert wincoord if origin isn't lower-left... */
+
+ /* MUL texTemp, INPUT[wincoord], 1/32; */
+ newInst = tgsi_default_full_instruction();
+ newInst.Instruction.Opcode = TGSI_OPCODE_MUL;
+ newInst.Instruction.NumDstRegs = 1;
+ newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
+ newInst.Dst[0].Register.Index = pctx->texTemp;
+ newInst.Instruction.NumSrcRegs = 2;
+ newInst.Src[0].Register.File = TGSI_FILE_INPUT;
+ newInst.Src[0].Register.Index = wincoordInput;
+ newInst.Src[1].Register.File = TGSI_FILE_IMMEDIATE;
+ newInst.Src[1].Register.Index = pctx->numImmed;
+ ctx->emit_instruction(ctx, &newInst);
+
+ /* TEX texTemp, texTemp, sampler; */
+ newInst = tgsi_default_full_instruction();
+ newInst.Instruction.Opcode = TGSI_OPCODE_TEX;
+ newInst.Instruction.NumDstRegs = 1;
+ newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
+ newInst.Dst[0].Register.Index = pctx->texTemp;
+ newInst.Instruction.NumSrcRegs = 2;
+ newInst.Instruction.Texture = TRUE;
+ newInst.Texture.Texture = TGSI_TEXTURE_2D;
+ newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
+ newInst.Src[0].Register.Index = pctx->texTemp;
+ newInst.Src[1].Register.File = TGSI_FILE_SAMPLER;
+ newInst.Src[1].Register.Index = pctx->freeSampler;
+ ctx->emit_instruction(ctx, &newInst);
+
+ /* KILL_IF -texTemp; # if -texTemp < 0, kill fragment */
+ newInst = tgsi_default_full_instruction();
+ newInst.Instruction.Opcode = TGSI_OPCODE_KILL_IF;
+ newInst.Instruction.NumDstRegs = 0;
+ newInst.Instruction.NumSrcRegs = 1;
+ newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
+ newInst.Src[0].Register.Index = pctx->texTemp;
+ newInst.Src[0].Register.Negate = 1;
+ ctx->emit_instruction(ctx, &newInst);
+ }
+
+ /* emit this instruction */
+ ctx->emit_instruction(ctx, inst);
+}
+
+
+/**
+ * Given a fragment shader, return a new fragment shader which
+ * samples a stipple texture and executes KILL.
+ */
+struct pipe_shader_state *
+util_pstipple_create_fragment_shader(struct pipe_context *pipe,
+ struct pipe_shader_state *fs,
+ unsigned *samplerUnitOut)
+{
+ struct pipe_shader_state *new_fs;
+ struct pstip_transform_context transform;
+ const uint newLen = tgsi_num_tokens(fs->tokens) + NUM_NEW_TOKENS;
+ unsigned i;
+
+ new_fs = MALLOC(sizeof(*new_fs));
+ if (!new_fs)
+ return NULL;
+
+ new_fs->tokens = tgsi_alloc_tokens(newLen);
+ if (!new_fs->tokens) {
+ FREE(new_fs);
+ return NULL;
+ }
+
+ /* Setup shader transformation info/context.
+ */
+ memset(&transform, 0, sizeof(transform));
+ transform.wincoordInput = -1;
+ transform.maxInput = -1;
+ transform.texTemp = -1;
+ transform.firstInstruction = TRUE;
+ transform.coordOrigin = TGSI_FS_COORD_ORIGIN_UPPER_LEFT;
+ transform.base.transform_instruction = pstip_transform_inst;
+ transform.base.transform_declaration = pstip_transform_decl;
+ transform.base.transform_immediate = pstip_transform_immed;
+
+ tgsi_scan_shader(fs->tokens, &transform.info);
+
+ /* find fragment coordinate origin property */
+ for (i = 0; i < transform.info.num_properties; i++) {
+ if (transform.info.properties[i].name == TGSI_PROPERTY_FS_COORD_ORIGIN)
+ transform.coordOrigin = transform.info.properties[i].data[0];
+ }
+
+ tgsi_transform_shader(fs->tokens,
+ (struct tgsi_token *) new_fs->tokens,
+ newLen, &transform.base);
+
+#if 0 /* DEBUG */
+ tgsi_dump(fs->tokens, 0);
+ tgsi_dump(new_fs->tokens, 0);
+#endif
+
+ assert(transform.freeSampler < PIPE_MAX_SAMPLERS);
+ *samplerUnitOut = transform.freeSampler;
+
+ return new_fs;
+}
+
diff --git a/src/minigallium/auxiliary/util/u_pstipple.h b/src/minigallium/auxiliary/util/u_pstipple.h
new file mode 100644
index 0000000..1c2f5f4
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_pstipple.h
@@ -0,0 +1,56 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_PSTIPPLE_H
+#define U_PSTIPPLE_H
+
+#include "pipe/p_compiler.h"
+
+struct pipe_context;
+struct pipe_resource;
+struct pipe_shader_state;
+
+
+extern struct pipe_resource *
+util_pstipple_create_stipple_texture(struct pipe_context *pipe,
+ const uint32_t pattern[32]);
+
+extern struct pipe_sampler_view *
+util_pstipple_create_sampler_view(struct pipe_context *pipe,
+ struct pipe_resource *tex);
+
+extern void *
+util_pstipple_create_sampler(struct pipe_context *pipe);
+
+extern struct pipe_shader_state *
+util_pstipple_create_fragment_shader(struct pipe_context *pipe,
+ struct pipe_shader_state *fs,
+ unsigned *samplerUnitOut);
+
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_range.h b/src/minigallium/auxiliary/util/u_range.h
new file mode 100644
index 0000000..4b1d0d1
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_range.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2013 Marek Olšák <maraeo@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE. */
+
+/**
+ * @file
+ * 1D integer range, capable of the union and intersection operations.
+ *
+ * It only maintains a single interval which is extended when the union is
+ * done. This implementation is partially thread-safe (readers are not
+ * protected by a lock).
+ *
+ * @author Marek Olšák
+ */
+
+#ifndef U_RANGE_H
+#define U_RANGE_H
+
+#include "os/os_thread.h"
+
+struct util_range {
+ unsigned start; /* inclusive */
+ unsigned end; /* exclusive */
+
+ /* for the range to be consistent with multiple contexts: */
+ pipe_mutex write_mutex;
+};
+
+
+static INLINE void
+util_range_set_empty(struct util_range *range)
+{
+ range->start = ~0;
+ range->end = 0;
+}
+
+/* This is like a union of two sets. */
+static INLINE void
+util_range_add(struct util_range *range, unsigned start, unsigned end)
+{
+ if (start < range->start || end > range->end) {
+ pipe_mutex_lock(range->write_mutex);
+ range->start = MIN2(start, range->start);
+ range->end = MAX2(end, range->end);
+ pipe_mutex_unlock(range->write_mutex);
+ }
+}
+
+static INLINE boolean
+util_ranges_intersect(struct util_range *range, unsigned start, unsigned end)
+{
+ return MAX2(start, range->start) < MIN2(end, range->end);
+}
+
+
+/* Init/deinit */
+
+static INLINE void
+util_range_init(struct util_range *range)
+{
+ pipe_mutex_init(range->write_mutex);
+ util_range_set_empty(range);
+}
+
+static INLINE void
+util_range_destroy(struct util_range *range)
+{
+ pipe_mutex_destroy(range->write_mutex);
+}
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_rect.h b/src/minigallium/auxiliary/util/u_rect.h
new file mode 100644
index 0000000..10909b2
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_rect.h
@@ -0,0 +1,92 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#ifndef U_RECT_H
+#define U_RECT_H
+
+#include "pipe/p_compiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct u_rect {
+ int x0, x1;
+ int y0, y1;
+};
+
+/* Do two rectangles intersect?
+ */
+static INLINE boolean
+u_rect_test_intersection(const struct u_rect *a,
+ const struct u_rect *b)
+{
+ return (!(a->x1 < b->x0 ||
+ b->x1 < a->x0 ||
+ a->y1 < b->y0 ||
+ b->y1 < a->y0));
+}
+
+/* Find the intersection of two rectangles known to intersect.
+ */
+static INLINE void
+u_rect_find_intersection(const struct u_rect *a,
+ struct u_rect *b)
+{
+ /* Caller should verify intersection exists before calling.
+ */
+ if (b->x0 < a->x0) b->x0 = a->x0;
+ if (b->x1 > a->x1) b->x1 = a->x1;
+ if (b->y0 < a->y0) b->y0 = a->y0;
+ if (b->y1 > a->y1) b->y1 = a->y1;
+}
+
+
+static INLINE void
+u_rect_possible_intersection(const struct u_rect *a,
+ struct u_rect *b)
+{
+ if (u_rect_test_intersection(a,b)) {
+ u_rect_find_intersection(a,b);
+ }
+ else {
+ b->x0 = b->x1 = b->y0 = b->y1 = 0;
+ }
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/* Include pipe copy/fill rect helpers declarations for backwards compatibility
+ */
+#include "util/u_surface.h"
+
+
+#endif /* U_RECT_H */
diff --git a/src/minigallium/auxiliary/util/u_resource.c b/src/minigallium/auxiliary/util/u_resource.c
new file mode 100644
index 0000000..66caaae
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_resource.c
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2013 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#include "pipe/p_defines.h"
+#include "pipe/p_state.h"
+#include "util/u_format.h"
+#include "util/u_math.h"
+#include "util/u_resource.h"
+
+
+/**
+ * Return the size of the resource in bytes.
+ */
+unsigned
+util_resource_size(const struct pipe_resource *res)
+{
+ unsigned width = res->width0;
+ unsigned height = res->height0;
+ unsigned depth = res->depth0;
+ unsigned size = 0;
+ unsigned level;
+
+ for (level = 0; level <= res->last_level; level++) {
+ unsigned slices;
+
+ if (res->target == PIPE_TEXTURE_CUBE)
+ slices = 6;
+ else if (res->target == PIPE_TEXTURE_3D)
+ slices = depth;
+ else
+ slices = res->array_size;
+
+ size += (util_format_get_nblocksy(res->format, height) *
+ util_format_get_stride(res->format, width) * slices);
+
+ width = u_minify(width, 1);
+ height = u_minify(height, 1);
+ depth = u_minify(depth, 1);
+ }
+
+ return size;
+}
diff --git a/src/minigallium/auxiliary/util/u_resource.h b/src/minigallium/auxiliary/util/u_resource.h
new file mode 100644
index 0000000..a5e091f
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_resource.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2013 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef U_RESOURCE_H
+#define U_RESOURCE_H
+
+#include "pipe/p_state.h"
+
+unsigned
+util_resource_size(const struct pipe_resource *res);
+
+/**
+ * Return true if the resource is an array texture.
+ *
+ * Note that this function returns true for single-layered array textures.
+ */
+static INLINE boolean
+util_resource_is_array_texture(const struct pipe_resource *res)
+{
+ switch (res->target) {
+ case PIPE_TEXTURE_1D_ARRAY:
+ case PIPE_TEXTURE_2D_ARRAY:
+ case PIPE_TEXTURE_CUBE_ARRAY:
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_ringbuffer.c b/src/minigallium/auxiliary/util/u_ringbuffer.c
new file mode 100644
index 0000000..648b105
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_ringbuffer.c
@@ -0,0 +1,160 @@
+
+#include "os/os_thread.h"
+#include "pipe/p_defines.h"
+#include "util/u_ringbuffer.h"
+#include "util/u_math.h"
+#include "util/u_memory.h"
+
+/* Generic ringbuffer:
+ */
+struct util_ringbuffer
+{
+ struct util_packet *buf;
+ unsigned mask;
+
+ /* Can this be done with atomic variables??
+ */
+ unsigned head;
+ unsigned tail;
+ pipe_condvar change;
+ pipe_mutex mutex;
+};
+
+
+struct util_ringbuffer *util_ringbuffer_create( unsigned dwords )
+{
+ struct util_ringbuffer *ring = CALLOC_STRUCT(util_ringbuffer);
+ if (ring == NULL)
+ return NULL;
+
+ assert(util_is_power_of_two(dwords));
+
+ ring->buf = MALLOC( dwords * sizeof(unsigned) );
+ if (ring->buf == NULL)
+ goto fail;
+
+ ring->mask = dwords - 1;
+
+ pipe_condvar_init(ring->change);
+ pipe_mutex_init(ring->mutex);
+ return ring;
+
+fail:
+ FREE(ring->buf);
+ FREE(ring);
+ return NULL;
+}
+
+void util_ringbuffer_destroy( struct util_ringbuffer *ring )
+{
+ pipe_condvar_destroy(ring->change);
+ pipe_mutex_destroy(ring->mutex);
+ FREE(ring->buf);
+ FREE(ring);
+}
+
+/**
+ * Return number of free entries in the ring
+ */
+static INLINE unsigned util_ringbuffer_space( const struct util_ringbuffer *ring )
+{
+ return (ring->tail - (ring->head + 1)) & ring->mask;
+}
+
+/**
+ * Is the ring buffer empty?
+ */
+static INLINE boolean util_ringbuffer_empty( const struct util_ringbuffer *ring )
+{
+ return util_ringbuffer_space(ring) == ring->mask;
+}
+
+void util_ringbuffer_enqueue( struct util_ringbuffer *ring,
+ const struct util_packet *packet )
+{
+ unsigned i;
+
+ /* XXX: over-reliance on mutexes, etc:
+ */
+ pipe_mutex_lock(ring->mutex);
+
+ /* make sure we don't request an impossible amount of space
+ */
+ assert(packet->dwords <= ring->mask);
+
+ /* Wait for free space:
+ */
+ while (util_ringbuffer_space(ring) < packet->dwords)
+ pipe_condvar_wait(ring->change, ring->mutex);
+
+ /* Copy data to ring:
+ */
+ for (i = 0; i < packet->dwords; i++) {
+
+ /* Copy all dwords of the packet. Note we're abusing the
+ * typesystem a little - we're being passed a pointer to
+ * something, but probably not an array of packet structs:
+ */
+ ring->buf[ring->head] = packet[i];
+ ring->head++;
+ ring->head &= ring->mask;
+ }
+
+ /* Signal change:
+ */
+ pipe_condvar_signal(ring->change);
+ pipe_mutex_unlock(ring->mutex);
+}
+
+enum pipe_error util_ringbuffer_dequeue( struct util_ringbuffer *ring,
+ struct util_packet *packet,
+ unsigned max_dwords,
+ boolean wait )
+{
+ const struct util_packet *ring_packet;
+ unsigned i;
+ int ret = PIPE_OK;
+
+ /* XXX: over-reliance on mutexes, etc:
+ */
+ pipe_mutex_lock(ring->mutex);
+
+ /* Get next ring entry:
+ */
+ if (wait) {
+ while (util_ringbuffer_empty(ring))
+ pipe_condvar_wait(ring->change, ring->mutex);
+ }
+ else {
+ if (util_ringbuffer_empty(ring)) {
+ ret = PIPE_ERROR_OUT_OF_MEMORY;
+ goto out;
+ }
+ }
+
+ ring_packet = &ring->buf[ring->tail];
+
+ /* Both of these are considered bugs. Raise an assert on debug builds.
+ */
+ if (ring_packet->dwords > ring->mask + 1 - util_ringbuffer_space(ring) ||
+ ring_packet->dwords > max_dwords) {
+ assert(0);
+ ret = PIPE_ERROR_BAD_INPUT;
+ goto out;
+ }
+
+ /* Copy data from ring:
+ */
+ for (i = 0; i < ring_packet->dwords; i++) {
+ packet[i] = ring->buf[ring->tail];
+ ring->tail++;
+ ring->tail &= ring->mask;
+ }
+
+out:
+ /* Signal change:
+ */
+ pipe_condvar_signal(ring->change);
+ pipe_mutex_unlock(ring->mutex);
+ return ret;
+}
diff --git a/src/minigallium/auxiliary/util/u_ringbuffer.h b/src/minigallium/auxiliary/util/u_ringbuffer.h
new file mode 100644
index 0000000..85f0ad6
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_ringbuffer.h
@@ -0,0 +1,29 @@
+
+#ifndef UTIL_RINGBUFFER_H
+#define UTIL_RINGBUFFER_H
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_defines.h" /* only for pipe_error! */
+
+/* Generic header
+ */
+struct util_packet {
+ unsigned dwords:8;
+ unsigned data24:24;
+};
+
+struct util_ringbuffer;
+
+struct util_ringbuffer *util_ringbuffer_create( unsigned dwords );
+
+void util_ringbuffer_destroy( struct util_ringbuffer *ring );
+
+void util_ringbuffer_enqueue( struct util_ringbuffer *ring,
+ const struct util_packet *packet );
+
+enum pipe_error util_ringbuffer_dequeue( struct util_ringbuffer *ring,
+ struct util_packet *packet,
+ unsigned max_dwords,
+ boolean wait );
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_sampler.c b/src/minigallium/auxiliary/util/u_sampler.c
new file mode 100644
index 0000000..227641b
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_sampler.c
@@ -0,0 +1,109 @@
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#include "u_format.h"
+#include "u_sampler.h"
+
+
+/**
+ * Initialize a pipe_sampler_view. 'view' is considered to have
+ * uninitialized contents.
+ */
+static void
+default_template(struct pipe_sampler_view *view,
+ const struct pipe_resource *texture,
+ enum pipe_format format,
+ unsigned expand_green_blue)
+{
+ memset(view, 0, sizeof(*view));
+
+ /* XXX: Check if format is compatible with texture->format.
+ */
+
+ view->format = format;
+ view->u.tex.first_level = 0;
+ view->u.tex.last_level = texture->last_level;
+ view->u.tex.first_layer = 0;
+ view->u.tex.last_layer = texture->target == PIPE_TEXTURE_3D ?
+ texture->depth0 - 1 : texture->array_size - 1;
+ view->swizzle_r = PIPE_SWIZZLE_RED;
+ view->swizzle_g = PIPE_SWIZZLE_GREEN;
+ view->swizzle_b = PIPE_SWIZZLE_BLUE;
+ view->swizzle_a = PIPE_SWIZZLE_ALPHA;
+
+ /* Override default green and blue component expansion to the requested
+ * one.
+ *
+ * Gallium expands nonexistent components to (0,0,0,1), DX9 expands
+ * to (1,1,1,1). Since alpha is always expanded to 1, and red is
+ * always present, we only really care about green and blue
+ * components.
+ *
+ * To make it look less hackish, one would have to add
+ * UTIL_FORMAT_SWIZZLE_EXPAND to indicate components for expansion
+ * and then override without exceptions or favoring one component
+ * over another.
+ */
+ if (format != PIPE_FORMAT_A8_UNORM) {
+ const struct util_format_description *desc = util_format_description(format);
+
+ assert(desc);
+ if (desc) {
+ if (desc->swizzle[1] == UTIL_FORMAT_SWIZZLE_0) {
+ view->swizzle_g = expand_green_blue;
+ }
+ if (desc->swizzle[2] == UTIL_FORMAT_SWIZZLE_0) {
+ view->swizzle_b = expand_green_blue;
+ }
+ }
+ }
+}
+
+void
+u_sampler_view_default_template(struct pipe_sampler_view *view,
+ const struct pipe_resource *texture,
+ enum pipe_format format)
+{
+ /* Expand to (0, 0, 0, 1) */
+ default_template(view,
+ texture,
+ format,
+ PIPE_SWIZZLE_ZERO);
+}
+
+void
+u_sampler_view_default_dx9_template(struct pipe_sampler_view *view,
+ const struct pipe_resource *texture,
+ enum pipe_format format)
+{
+ /* Expand to (1, 1, 1, 1) */
+ default_template(view,
+ texture,
+ format,
+ PIPE_SWIZZLE_ONE);
+}
diff --git a/src/minigallium/auxiliary/util/u_sampler.h b/src/minigallium/auxiliary/util/u_sampler.h
new file mode 100644
index 0000000..f3dad74
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_sampler.h
@@ -0,0 +1,57 @@
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#ifndef U_SAMPLER_H
+#define U_SAMPLER_H
+
+
+#include "pipe/p_defines.h"
+#include "pipe/p_format.h"
+#include "pipe/p_state.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+void
+u_sampler_view_default_template(struct pipe_sampler_view *view,
+ const struct pipe_resource *texture,
+ enum pipe_format format);
+
+void
+u_sampler_view_default_dx9_template(struct pipe_sampler_view *view,
+ const struct pipe_resource *texture,
+ enum pipe_format format);
+
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif
+
+#endif /* U_SAMPLER_H */
diff --git a/src/minigallium/auxiliary/util/u_simple_list.h b/src/minigallium/auxiliary/util/u_simple_list.h
new file mode 100644
index 0000000..3f7def5
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_simple_list.h
@@ -0,0 +1,199 @@
+/**
+ * \file simple_list.h
+ * Simple macros for type-safe, intrusive lists.
+ *
+ * Intended to work with a list sentinal which is created as an empty
+ * list. Insert & delete are O(1).
+ *
+ * \author
+ * (C) 1997, Keith Whitwell
+ */
+
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef _U_SIMPLE_LIST_H_
+#define _U_SIMPLE_LIST_H_
+
+/**
+ * Remove an element from list.
+ *
+ * \param elem element to remove.
+ */
+#define remove_from_list(elem) \
+do { \
+ (elem)->next->prev = (elem)->prev; \
+ (elem)->prev->next = (elem)->next; \
+ (elem)->next = elem; \
+ (elem)->prev = elem; \
+} while (0)
+
+/**
+ * Insert an element to the list head.
+ *
+ * \param list list.
+ * \param elem element to insert.
+ */
+#define insert_at_head(list, elem) \
+do { \
+ (elem)->prev = list; \
+ (elem)->next = (list)->next; \
+ (list)->next->prev = elem; \
+ (list)->next = elem; \
+} while(0)
+
+/**
+ * Insert an element to the list tail.
+ *
+ * \param list list.
+ * \param elem element to insert.
+ */
+#define insert_at_tail(list, elem) \
+do { \
+ (elem)->next = list; \
+ (elem)->prev = (list)->prev; \
+ (list)->prev->next = elem; \
+ (list)->prev = elem; \
+} while(0)
+
+/**
+ * Move an element to the list head.
+ *
+ * \param list list.
+ * \param elem element to move.
+ */
+#define move_to_head(list, elem) \
+do { \
+ remove_from_list(elem); \
+ insert_at_head(list, elem); \
+} while (0)
+
+/**
+ * Move an element to the list tail.
+ *
+ * \param list list.
+ * \param elem element to move.
+ */
+#define move_to_tail(list, elem) \
+do { \
+ remove_from_list(elem); \
+ insert_at_tail(list, elem); \
+} while (0)
+
+/**
+ * Make a empty list empty.
+ *
+ * \param sentinal list (sentinal element).
+ */
+#define make_empty_list(sentinal) \
+do { \
+ (sentinal)->next = sentinal; \
+ (sentinal)->prev = sentinal; \
+} while (0)
+
+/**
+ * Get list first element.
+ *
+ * \param list list.
+ *
+ * \return pointer to first element.
+ */
+#define first_elem(list) ((list)->next)
+
+/**
+ * Get list last element.
+ *
+ * \param list list.
+ *
+ * \return pointer to last element.
+ */
+#define last_elem(list) ((list)->prev)
+
+/**
+ * Get next element.
+ *
+ * \param elem element.
+ *
+ * \return pointer to next element.
+ */
+#define next_elem(elem) ((elem)->next)
+
+/**
+ * Get previous element.
+ *
+ * \param elem element.
+ *
+ * \return pointer to previous element.
+ */
+#define prev_elem(elem) ((elem)->prev)
+
+/**
+ * Test whether element is at end of the list.
+ *
+ * \param list list.
+ * \param elem element.
+ *
+ * \return non-zero if element is at end of list, or zero otherwise.
+ */
+#define at_end(list, elem) ((elem) == (list))
+
+/**
+ * Test if a list is empty.
+ *
+ * \param list list.
+ *
+ * \return non-zero if list empty, or zero otherwise.
+ */
+#define is_empty_list(list) ((list)->next == (list))
+
+/**
+ * Walk through the elements of a list.
+ *
+ * \param ptr pointer to the current element.
+ * \param list list.
+ *
+ * \note It should be followed by a { } block or a single statement, as in a \c
+ * for loop.
+ */
+#define foreach(ptr, list) \
+ for( ptr=(list)->next ; ptr!=list ; ptr=(ptr)->next )
+
+/**
+ * Walk through the elements of a list.
+ *
+ * Same as #foreach but lets you unlink the current value during a list
+ * traversal. Useful for freeing a list, element by element.
+ *
+ * \param ptr pointer to the current element.
+ * \param t temporary pointer.
+ * \param list list.
+ *
+ * \note It should be followed by a { } block or a single statement, as in a \c
+ * for loop.
+ */
+#define foreach_s(ptr, t, list) \
+ for(ptr=(list)->next,t=(ptr)->next; list != ptr; ptr=t, t=(t)->next)
+
+#endif /* _U_SIMPLE_LIST_H_ */
diff --git a/src/minigallium/auxiliary/util/u_simple_shaders.c b/src/minigallium/auxiliary/util/u_simple_shaders.c
new file mode 100644
index 0000000..c93d754
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_simple_shaders.c
@@ -0,0 +1,529 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ * Copyright 2009 Marek Olšák <maraeo@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Simple vertex/fragment shader generators.
+ *
+ * @author Brian Paul
+ Marek Olšák
+ */
+
+
+#include "pipe/p_context.h"
+#include "pipe/p_shader_tokens.h"
+#include "pipe/p_state.h"
+#include "util/u_simple_shaders.h"
+#include "util/u_debug.h"
+#include "util/u_memory.h"
+#include "tgsi/tgsi_dump.h"
+#include "tgsi/tgsi_strings.h"
+#include "tgsi/tgsi_ureg.h"
+#include "tgsi/tgsi_text.h"
+#include <stdio.h> /* include last */
+
+
+
+/**
+ * Make simple vertex pass-through shader.
+ * \param num_attribs number of attributes to pass through
+ * \param semantic_names array of semantic names for each attribute
+ * \param semantic_indexes array of semantic indexes for each attribute
+ */
+void *
+util_make_vertex_passthrough_shader(struct pipe_context *pipe,
+ uint num_attribs,
+ const uint *semantic_names,
+ const uint *semantic_indexes)
+{
+ return util_make_vertex_passthrough_shader_with_so(pipe, num_attribs,
+ semantic_names,
+ semantic_indexes, NULL);
+}
+
+void *
+util_make_vertex_passthrough_shader_with_so(struct pipe_context *pipe,
+ uint num_attribs,
+ const uint *semantic_names,
+ const uint *semantic_indexes,
+ const struct pipe_stream_output_info *so)
+{
+ struct ureg_program *ureg;
+ uint i;
+
+ ureg = ureg_create( TGSI_PROCESSOR_VERTEX );
+ if (ureg == NULL)
+ return NULL;
+
+ for (i = 0; i < num_attribs; i++) {
+ struct ureg_src src;
+ struct ureg_dst dst;
+
+ src = ureg_DECL_vs_input( ureg, i );
+
+ dst = ureg_DECL_output( ureg,
+ semantic_names[i],
+ semantic_indexes[i]);
+
+ ureg_MOV( ureg, dst, src );
+ }
+
+ ureg_END( ureg );
+
+ return ureg_create_shader_with_so_and_destroy( ureg, pipe, so );
+}
+
+
+/**
+ * Make simple fragment texture shader:
+ * IMM {0,0,0,1} // (if writemask != 0xf)
+ * MOV OUT[0], IMM[0] // (if writemask != 0xf)
+ * TEX OUT[0].writemask, IN[0], SAMP[0], 2D;
+ * END;
+ *
+ * \param tex_target one of PIPE_TEXTURE_x
+ * \parma interp_mode either TGSI_INTERPOLATE_LINEAR or PERSPECTIVE
+ * \param writemask mask of TGSI_WRITEMASK_x
+ */
+void *
+util_make_fragment_tex_shader_writemask(struct pipe_context *pipe,
+ unsigned tex_target,
+ unsigned interp_mode,
+ unsigned writemask )
+{
+ struct ureg_program *ureg;
+ struct ureg_src sampler;
+ struct ureg_src tex;
+ struct ureg_dst out;
+
+ assert(interp_mode == TGSI_INTERPOLATE_LINEAR ||
+ interp_mode == TGSI_INTERPOLATE_PERSPECTIVE);
+
+ ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT );
+ if (ureg == NULL)
+ return NULL;
+
+ sampler = ureg_DECL_sampler( ureg, 0 );
+
+ tex = ureg_DECL_fs_input( ureg,
+ TGSI_SEMANTIC_GENERIC, 0,
+ interp_mode );
+
+ out = ureg_DECL_output( ureg,
+ TGSI_SEMANTIC_COLOR,
+ 0 );
+
+ if (writemask != TGSI_WRITEMASK_XYZW) {
+ struct ureg_src imm = ureg_imm4f( ureg, 0, 0, 0, 1 );
+
+ ureg_MOV( ureg, out, imm );
+ }
+
+ ureg_TEX( ureg,
+ ureg_writemask(out, writemask),
+ tex_target, tex, sampler );
+ ureg_END( ureg );
+
+ return ureg_create_shader_and_destroy( ureg, pipe );
+}
+
+
+/**
+ * Make a simple fragment shader that sets the output color to a color
+ * taken from a texture.
+ * \param tex_target one of PIPE_TEXTURE_x
+ */
+void *
+util_make_fragment_tex_shader(struct pipe_context *pipe, unsigned tex_target,
+ unsigned interp_mode)
+{
+ return util_make_fragment_tex_shader_writemask( pipe,
+ tex_target,
+ interp_mode,
+ TGSI_WRITEMASK_XYZW );
+}
+
+
+/**
+ * Make a simple fragment texture shader which reads an X component from
+ * a texture and writes it as depth.
+ */
+void *
+util_make_fragment_tex_shader_writedepth(struct pipe_context *pipe,
+ unsigned tex_target,
+ unsigned interp_mode)
+{
+ struct ureg_program *ureg;
+ struct ureg_src sampler;
+ struct ureg_src tex;
+ struct ureg_dst out, depth;
+ struct ureg_src imm;
+
+ ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT );
+ if (ureg == NULL)
+ return NULL;
+
+ sampler = ureg_DECL_sampler( ureg, 0 );
+
+ tex = ureg_DECL_fs_input( ureg,
+ TGSI_SEMANTIC_GENERIC, 0,
+ interp_mode );
+
+ out = ureg_DECL_output( ureg,
+ TGSI_SEMANTIC_COLOR,
+ 0 );
+
+ depth = ureg_DECL_output( ureg,
+ TGSI_SEMANTIC_POSITION,
+ 0 );
+
+ imm = ureg_imm4f( ureg, 0, 0, 0, 1 );
+
+ ureg_MOV( ureg, out, imm );
+
+ ureg_TEX( ureg,
+ ureg_writemask(depth, TGSI_WRITEMASK_Z),
+ tex_target, tex, sampler );
+ ureg_END( ureg );
+
+ return ureg_create_shader_and_destroy( ureg, pipe );
+}
+
+
+/**
+ * Make a simple fragment texture shader which reads the texture unit 0 and 1
+ * and writes it as depth and stencil, respectively.
+ */
+void *
+util_make_fragment_tex_shader_writedepthstencil(struct pipe_context *pipe,
+ unsigned tex_target,
+ unsigned interp_mode)
+{
+ struct ureg_program *ureg;
+ struct ureg_src depth_sampler, stencil_sampler;
+ struct ureg_src tex;
+ struct ureg_dst out, depth, stencil;
+ struct ureg_src imm;
+
+ ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT );
+ if (ureg == NULL)
+ return NULL;
+
+ depth_sampler = ureg_DECL_sampler( ureg, 0 );
+ stencil_sampler = ureg_DECL_sampler( ureg, 1 );
+
+ tex = ureg_DECL_fs_input( ureg,
+ TGSI_SEMANTIC_GENERIC, 0,
+ interp_mode );
+
+ out = ureg_DECL_output( ureg,
+ TGSI_SEMANTIC_COLOR,
+ 0 );
+
+ depth = ureg_DECL_output( ureg,
+ TGSI_SEMANTIC_POSITION,
+ 0 );
+
+ stencil = ureg_DECL_output( ureg,
+ TGSI_SEMANTIC_STENCIL,
+ 0 );
+
+ imm = ureg_imm4f( ureg, 0, 0, 0, 1 );
+
+ ureg_MOV( ureg, out, imm );
+
+ ureg_TEX( ureg,
+ ureg_writemask(depth, TGSI_WRITEMASK_Z),
+ tex_target, tex, depth_sampler );
+ ureg_TEX( ureg,
+ ureg_writemask(stencil, TGSI_WRITEMASK_Y),
+ tex_target, tex, stencil_sampler );
+ ureg_END( ureg );
+
+ return ureg_create_shader_and_destroy( ureg, pipe );
+}
+
+
+/**
+ * Make a simple fragment texture shader which reads a texture and writes it
+ * as stencil.
+ */
+void *
+util_make_fragment_tex_shader_writestencil(struct pipe_context *pipe,
+ unsigned tex_target,
+ unsigned interp_mode)
+{
+ struct ureg_program *ureg;
+ struct ureg_src stencil_sampler;
+ struct ureg_src tex;
+ struct ureg_dst out, stencil;
+ struct ureg_src imm;
+
+ ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT );
+ if (ureg == NULL)
+ return NULL;
+
+ stencil_sampler = ureg_DECL_sampler( ureg, 0 );
+
+ tex = ureg_DECL_fs_input( ureg,
+ TGSI_SEMANTIC_GENERIC, 0,
+ interp_mode );
+
+ out = ureg_DECL_output( ureg,
+ TGSI_SEMANTIC_COLOR,
+ 0 );
+
+ stencil = ureg_DECL_output( ureg,
+ TGSI_SEMANTIC_STENCIL,
+ 0 );
+
+ imm = ureg_imm4f( ureg, 0, 0, 0, 1 );
+
+ ureg_MOV( ureg, out, imm );
+
+ ureg_TEX( ureg,
+ ureg_writemask(stencil, TGSI_WRITEMASK_Y),
+ tex_target, tex, stencil_sampler );
+ ureg_END( ureg );
+
+ return ureg_create_shader_and_destroy( ureg, pipe );
+}
+
+
+/**
+ * Make simple fragment color pass-through shader that replicates OUT[0]
+ * to all bound colorbuffers.
+ */
+void *
+util_make_fragment_passthrough_shader(struct pipe_context *pipe,
+ int input_semantic,
+ int input_interpolate,
+ boolean write_all_cbufs)
+{
+ static const char shader_templ[] =
+ "FRAG\n"
+ "%s"
+ "DCL IN[0], %s[0], %s\n"
+ "DCL OUT[0], COLOR[0]\n"
+
+ "MOV OUT[0], IN[0]\n"
+ "END\n";
+
+ char text[sizeof(shader_templ)+100];
+ struct tgsi_token tokens[1000];
+ struct pipe_shader_state state = {tokens};
+
+ sprintf(text, shader_templ,
+ write_all_cbufs ? "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n" : "",
+ tgsi_semantic_names[input_semantic],
+ tgsi_interpolate_names[input_interpolate]);
+
+ if (!tgsi_text_translate(text, tokens, Elements(tokens))) {
+ assert(0);
+ return NULL;
+ }
+#if 0
+ tgsi_dump(state.tokens, 0);
+#endif
+
+ return pipe->create_fs_state(pipe, &state);
+}
+
+
+void *
+util_make_empty_fragment_shader(struct pipe_context *pipe)
+{
+ struct ureg_program *ureg = ureg_create(TGSI_PROCESSOR_FRAGMENT);
+ if (ureg == NULL)
+ return NULL;
+
+ ureg_END(ureg);
+ return ureg_create_shader_and_destroy(ureg, pipe);
+}
+
+
+/**
+ * Make a fragment shader that copies the input color to N output colors.
+ */
+void *
+util_make_fragment_cloneinput_shader(struct pipe_context *pipe, int num_cbufs,
+ int input_semantic,
+ int input_interpolate)
+{
+ struct ureg_program *ureg;
+ struct ureg_src src;
+ struct ureg_dst dst[PIPE_MAX_COLOR_BUFS];
+ int i;
+
+ assert(num_cbufs <= PIPE_MAX_COLOR_BUFS);
+
+ ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT );
+ if (ureg == NULL)
+ return NULL;
+
+ src = ureg_DECL_fs_input( ureg, input_semantic, 0,
+ input_interpolate );
+
+ for (i = 0; i < num_cbufs; i++)
+ dst[i] = ureg_DECL_output( ureg, TGSI_SEMANTIC_COLOR, i );
+
+ for (i = 0; i < num_cbufs; i++)
+ ureg_MOV( ureg, dst[i], src );
+
+ ureg_END( ureg );
+
+ return ureg_create_shader_and_destroy( ureg, pipe );
+}
+
+
+static void *
+util_make_fs_blit_msaa_gen(struct pipe_context *pipe,
+ unsigned tgsi_tex,
+ const char *output_semantic,
+ const char *output_mask)
+{
+ static const char shader_templ[] =
+ "FRAG\n"
+ "DCL IN[0], GENERIC[0], LINEAR\n"
+ "DCL SAMP[0]\n"
+ "DCL OUT[0], %s\n"
+ "DCL TEMP[0]\n"
+
+ "F2U TEMP[0], IN[0]\n"
+ "TXF OUT[0]%s, TEMP[0], SAMP[0], %s\n"
+ "END\n";
+
+ const char *type = tgsi_texture_names[tgsi_tex];
+ char text[sizeof(shader_templ)+100];
+ struct tgsi_token tokens[1000];
+ struct pipe_shader_state state = {tokens};
+
+ assert(tgsi_tex == TGSI_TEXTURE_2D_MSAA ||
+ tgsi_tex == TGSI_TEXTURE_2D_ARRAY_MSAA);
+
+ sprintf(text, shader_templ, output_semantic, output_mask, type);
+
+ if (!tgsi_text_translate(text, tokens, Elements(tokens))) {
+ puts(text);
+ assert(0);
+ return NULL;
+ }
+#if 0
+ tgsi_dump(state.tokens, 0);
+#endif
+
+ return pipe->create_fs_state(pipe, &state);
+}
+
+
+/**
+ * Make a fragment shader that sets the output color to a color
+ * fetched from a multisample texture.
+ * \param tex_target one of PIPE_TEXTURE_x
+ */
+void *
+util_make_fs_blit_msaa_color(struct pipe_context *pipe,
+ unsigned tgsi_tex)
+{
+ return util_make_fs_blit_msaa_gen(pipe, tgsi_tex,
+ "COLOR[0]", "");
+}
+
+
+/**
+ * Make a fragment shader that sets the output depth to a depth value
+ * fetched from a multisample texture.
+ * \param tex_target one of PIPE_TEXTURE_x
+ */
+void *
+util_make_fs_blit_msaa_depth(struct pipe_context *pipe,
+ unsigned tgsi_tex)
+{
+ return util_make_fs_blit_msaa_gen(pipe, tgsi_tex,
+ "POSITION", ".z");
+}
+
+
+/**
+ * Make a fragment shader that sets the output stencil to a stencil value
+ * fetched from a multisample texture.
+ * \param tex_target one of PIPE_TEXTURE_x
+ */
+void *
+util_make_fs_blit_msaa_stencil(struct pipe_context *pipe,
+ unsigned tgsi_tex)
+{
+ return util_make_fs_blit_msaa_gen(pipe, tgsi_tex,
+ "STENCIL", ".y");
+}
+
+
+/**
+ * Make a fragment shader that sets the output depth and stencil to depth
+ * and stencil values fetched from two multisample textures / samplers.
+ * The sizes of both textures should match (it should be one depth-stencil
+ * texture).
+ * \param tex_target one of PIPE_TEXTURE_x
+ */
+void *
+util_make_fs_blit_msaa_depthstencil(struct pipe_context *pipe,
+ unsigned tgsi_tex)
+{
+ static const char shader_templ[] =
+ "FRAG\n"
+ "DCL IN[0], GENERIC[0], LINEAR\n"
+ "DCL SAMP[0..1]\n"
+ "DCL OUT[0], POSITION\n"
+ "DCL OUT[1], STENCIL\n"
+ "DCL TEMP[0]\n"
+
+ "F2U TEMP[0], IN[0]\n"
+ "TXF OUT[0].z, TEMP[0], SAMP[0], %s\n"
+ "TXF OUT[1].y, TEMP[0], SAMP[1], %s\n"
+ "END\n";
+
+ const char *type = tgsi_texture_names[tgsi_tex];
+ char text[sizeof(shader_templ)+100];
+ struct tgsi_token tokens[1000];
+ struct pipe_shader_state state = {tokens};
+
+ assert(tgsi_tex == TGSI_TEXTURE_2D_MSAA ||
+ tgsi_tex == TGSI_TEXTURE_2D_ARRAY_MSAA);
+
+ sprintf(text, shader_templ, type, type);
+
+ if (!tgsi_text_translate(text, tokens, Elements(tokens))) {
+ assert(0);
+ return NULL;
+ }
+#if 0
+ tgsi_dump(state.tokens, 0);
+#endif
+
+ return pipe->create_fs_state(pipe, &state);
+}
diff --git a/src/minigallium/auxiliary/util/u_simple_shaders.h b/src/minigallium/auxiliary/util/u_simple_shaders.h
new file mode 100644
index 0000000..016664d
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_simple_shaders.h
@@ -0,0 +1,130 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#ifndef U_SIMPLE_SHADERS_H
+#define U_SIMPLE_SHADERS_H
+
+
+#include "pipe/p_compiler.h"
+
+
+struct pipe_context;
+struct pipe_shader_state;
+struct pipe_stream_output_info;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+extern void *
+util_make_vertex_passthrough_shader(struct pipe_context *pipe,
+ uint num_attribs,
+ const uint *semantic_names,
+ const uint *semantic_indexes);
+
+extern void *
+util_make_vertex_passthrough_shader_with_so(struct pipe_context *pipe,
+ uint num_attribs,
+ const uint *semantic_names,
+ const uint *semantic_indexes,
+ const struct pipe_stream_output_info *so);
+
+
+extern void *
+util_make_fragment_tex_shader_writemask(struct pipe_context *pipe,
+ unsigned tex_target,
+ unsigned interp_mode,
+ unsigned writemask);
+
+extern void *
+util_make_fragment_tex_shader(struct pipe_context *pipe, unsigned tex_target,
+ unsigned interp_mode);
+
+
+extern void *
+util_make_fragment_tex_shader_writedepth(struct pipe_context *pipe,
+ unsigned tex_target,
+ unsigned interp_mode);
+
+
+extern void *
+util_make_fragment_tex_shader_writedepthstencil(struct pipe_context *pipe,
+ unsigned tex_target,
+ unsigned interp_mode);
+
+
+extern void *
+util_make_fragment_tex_shader_writestencil(struct pipe_context *pipe,
+ unsigned tex_target,
+ unsigned interp_mode);
+
+
+extern void *
+util_make_fragment_passthrough_shader(struct pipe_context *pipe,
+ int input_semantic,
+ int input_interpolate,
+ boolean write_all_cbufs);
+
+
+extern void *
+util_make_empty_fragment_shader(struct pipe_context *pipe);
+
+
+extern void *
+util_make_fragment_cloneinput_shader(struct pipe_context *pipe, int num_cbufs,
+ int input_semantic,
+ int input_interpolate);
+
+
+extern void *
+util_make_fs_blit_msaa_color(struct pipe_context *pipe,
+ unsigned tgsi_tex);
+
+
+extern void *
+util_make_fs_blit_msaa_depth(struct pipe_context *pipe,
+ unsigned tgsi_tex);
+
+
+extern void *
+util_make_fs_blit_msaa_depthstencil(struct pipe_context *pipe,
+ unsigned tgsi_tex);
+
+
+void *
+util_make_fs_blit_msaa_stencil(struct pipe_context *pipe,
+ unsigned tgsi_tex);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_slab.c b/src/minigallium/auxiliary/util/u_slab.c
new file mode 100644
index 0000000..dbdebc6
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_slab.c
@@ -0,0 +1,171 @@
+/*
+ * Copyright 2010 Marek Olšák <maraeo@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE. */
+
+#include "util/u_slab.h"
+
+#include "util/u_math.h"
+#include "util/u_memory.h"
+#include "util/u_simple_list.h"
+
+#include <stdio.h>
+
+#define UTIL_SLAB_MAGIC 0xcafe4321
+
+/* The block is either allocated memory or free space. */
+struct util_slab_block {
+ /* The header. */
+ /* The first next free block. */
+ struct util_slab_block *next_free;
+
+ intptr_t magic;
+
+ /* Memory after the last member is dedicated to the block itself.
+ * The allocated size is always larger than this structure. */
+};
+
+static struct util_slab_block *
+util_slab_get_block(struct util_slab_mempool *pool,
+ struct util_slab_page *page, unsigned index)
+{
+ return (struct util_slab_block*)
+ ((uint8_t*)page + sizeof(struct util_slab_page) +
+ (pool->block_size * index));
+}
+
+static void util_slab_add_new_page(struct util_slab_mempool *pool)
+{
+ struct util_slab_page *page;
+ struct util_slab_block *block;
+ unsigned i;
+
+ page = MALLOC(pool->page_size);
+ insert_at_tail(&pool->list, page);
+
+ /* Mark all blocks as free. */
+ for (i = 0; i < pool->num_blocks-1; i++) {
+ block = util_slab_get_block(pool, page, i);
+ block->next_free = util_slab_get_block(pool, page, i+1);
+ block->magic = UTIL_SLAB_MAGIC;
+ }
+
+ block = util_slab_get_block(pool, page, pool->num_blocks-1);
+ block->next_free = pool->first_free;
+ block->magic = UTIL_SLAB_MAGIC;
+ pool->first_free = util_slab_get_block(pool, page, 0);
+ pool->num_pages++;
+
+#if 0
+ fprintf(stderr, "New page! Num of pages: %i\n", pool->num_pages);
+#endif
+}
+
+static void *util_slab_alloc_st(struct util_slab_mempool *pool)
+{
+ struct util_slab_block *block;
+
+ if (!pool->first_free)
+ util_slab_add_new_page(pool);
+
+ block = pool->first_free;
+ assert(block->magic == UTIL_SLAB_MAGIC);
+ pool->first_free = block->next_free;
+
+ return (uint8_t*)block + sizeof(struct util_slab_block);
+}
+
+static void util_slab_free_st(struct util_slab_mempool *pool, void *ptr)
+{
+ struct util_slab_block *block =
+ (struct util_slab_block*)
+ ((uint8_t*)ptr - sizeof(struct util_slab_block));
+
+ assert(block->magic == UTIL_SLAB_MAGIC);
+ block->next_free = pool->first_free;
+ pool->first_free = block;
+}
+
+static void *util_slab_alloc_mt(struct util_slab_mempool *pool)
+{
+ void *mem;
+
+ pipe_mutex_lock(pool->mutex);
+ mem = util_slab_alloc_st(pool);
+ pipe_mutex_unlock(pool->mutex);
+ return mem;
+}
+
+static void util_slab_free_mt(struct util_slab_mempool *pool, void *ptr)
+{
+ pipe_mutex_lock(pool->mutex);
+ util_slab_free_st(pool, ptr);
+ pipe_mutex_unlock(pool->mutex);
+}
+
+void util_slab_set_thread_safety(struct util_slab_mempool *pool,
+ enum util_slab_threading threading)
+{
+ pool->threading = threading;
+
+ if (threading) {
+ pool->alloc = util_slab_alloc_mt;
+ pool->free = util_slab_free_mt;
+ } else {
+ pool->alloc = util_slab_alloc_st;
+ pool->free = util_slab_free_st;
+ }
+}
+
+void util_slab_create(struct util_slab_mempool *pool,
+ unsigned item_size,
+ unsigned num_blocks,
+ enum util_slab_threading threading)
+{
+ item_size = align(item_size, sizeof(intptr_t));
+
+ pool->num_pages = 0;
+ pool->num_blocks = num_blocks;
+ pool->block_size = sizeof(struct util_slab_block) + item_size;
+ pool->block_size = align(pool->block_size, sizeof(intptr_t));
+ pool->page_size = sizeof(struct util_slab_page) +
+ num_blocks * pool->block_size;
+ pool->first_free = NULL;
+
+ make_empty_list(&pool->list);
+
+ pipe_mutex_init(pool->mutex);
+
+ util_slab_set_thread_safety(pool, threading);
+}
+
+void util_slab_destroy(struct util_slab_mempool *pool)
+{
+ struct util_slab_page *page, *temp;
+
+ if (pool->list.next) {
+ foreach_s(page, temp, &pool->list) {
+ remove_from_list(page);
+ FREE(page);
+ }
+ }
+
+ pipe_mutex_destroy(pool->mutex);
+}
diff --git a/src/minigallium/auxiliary/util/u_slab.h b/src/minigallium/auxiliary/util/u_slab.h
new file mode 100644
index 0000000..29d0252
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_slab.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2010 Marek Olšák <maraeo@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE. */
+
+/**
+ * @file
+ * Simple slab allocator for equally sized memory allocations.
+ * util_slab_alloc and util_slab_free have time complexity in O(1).
+ *
+ * Good for allocations which have very low lifetime and are allocated
+ * and freed very often. Use a profiler first to know if it's worth using it!
+ *
+ * Candidates: transfer_map
+ *
+ * @author Marek Olšák
+ */
+
+#ifndef U_SLAB_H
+#define U_SLAB_H
+
+#include "os/os_thread.h"
+
+enum util_slab_threading {
+ UTIL_SLAB_SINGLETHREADED = FALSE,
+ UTIL_SLAB_MULTITHREADED = TRUE
+};
+
+/* The page is an array of blocks (allocations). */
+struct util_slab_page {
+ /* The header (linked-list pointers). */
+ struct util_slab_page *prev, *next;
+
+ /* Memory after the last member is dedicated to the page itself.
+ * The allocated size is always larger than this structure. */
+};
+
+struct util_slab_mempool {
+ /* Public members. */
+ void *(*alloc)(struct util_slab_mempool *pool);
+ void (*free)(struct util_slab_mempool *pool, void *ptr);
+
+ /* Private members. */
+ struct util_slab_block *first_free;
+
+ struct util_slab_page list;
+
+ unsigned block_size;
+ unsigned page_size;
+ unsigned num_blocks;
+ unsigned num_pages;
+ enum util_slab_threading threading;
+
+ pipe_mutex mutex;
+};
+
+void util_slab_create(struct util_slab_mempool *pool,
+ unsigned item_size,
+ unsigned num_blocks,
+ enum util_slab_threading threading);
+
+void util_slab_destroy(struct util_slab_mempool *pool);
+
+void util_slab_set_thread_safety(struct util_slab_mempool *pool,
+ enum util_slab_threading threading);
+
+#define util_slab_alloc(pool) (pool)->alloc(pool)
+#define util_slab_free(pool, ptr) (pool)->free(pool, ptr)
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_snprintf.c b/src/minigallium/auxiliary/util/u_snprintf.c
new file mode 100644
index 0000000..a24b6ff
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_snprintf.c
@@ -0,0 +1,1489 @@
+/*
+ * Copyright (c) 1995 Patrick Powell.
+ *
+ * This code is based on code written by Patrick Powell <papowell@astart.com>.
+ * It may be used for any purpose as long as this notice remains intact on all
+ * source code distributions.
+ */
+
+/*
+ * Copyright (c) 2008 Holger Weiss.
+ *
+ * This version of the code is maintained by Holger Weiss <holger@jhweiss.de>.
+ * My changes to the code may freely be used, modified and/or redistributed for
+ * any purpose. It would be nice if additions and fixes to this file (including
+ * trivial code cleanups) would be sent back in order to let me include them in
+ * the version available at <http://www.jhweiss.de/software/snprintf.html>.
+ * However, this is not a requirement for using or redistributing (possibly
+ * modified) versions of this file, nor is leaving this notice intact mandatory.
+ */
+
+/*
+ * History
+ *
+ * 2008-01-20 Holger Weiss <holger@jhweiss.de> for C99-snprintf 1.1:
+ *
+ * Fixed the detection of infinite floating point values on IRIX (and
+ * possibly other systems) and applied another few minor cleanups.
+ *
+ * 2008-01-06 Holger Weiss <holger@jhweiss.de> for C99-snprintf 1.0:
+ *
+ * Added a lot of new features, fixed many bugs, and incorporated various
+ * improvements done by Andrew Tridgell <tridge@samba.org>, Russ Allbery
+ * <rra@stanford.edu>, Hrvoje Niksic <hniksic@xemacs.org>, Damien Miller
+ * <djm@mindrot.org>, and others for the Samba, INN, Wget, and OpenSSH
+ * projects. The additions include: support the "e", "E", "g", "G", and
+ * "F" conversion specifiers (and use conversion style "f" or "F" for the
+ * still unsupported "a" and "A" specifiers); support the "hh", "ll", "j",
+ * "t", and "z" length modifiers; support the "#" flag and the (non-C99)
+ * "'" flag; use localeconv(3) (if available) to get both the current
+ * locale's decimal point character and the separator between groups of
+ * digits; fix the handling of various corner cases of field width and
+ * precision specifications; fix various floating point conversion bugs;
+ * handle infinite and NaN floating point values; don't attempt to write to
+ * the output buffer (which may be NULL) if a size of zero was specified;
+ * check for integer overflow of the field width, precision, and return
+ * values and during the floating point conversion; use the OUTCHAR() macro
+ * instead of a function for better performance; provide asprintf(3) and
+ * vasprintf(3) functions; add new test cases. The replacement functions
+ * have been renamed to use an "rpl_" prefix, the function calls in the
+ * main project (and in this file) must be redefined accordingly for each
+ * replacement function which is needed (by using Autoconf or other means).
+ * Various other minor improvements have been applied and the coding style
+ * was cleaned up for consistency.
+ *
+ * 2007-07-23 Holger Weiss <holger@jhweiss.de> for Mutt 1.5.13:
+ *
+ * C99 compliant snprintf(3) and vsnprintf(3) functions return the number
+ * of characters that would have been written to a sufficiently sized
+ * buffer (excluding the '\0'). The original code simply returned the
+ * length of the resulting output string, so that's been fixed.
+ *
+ * 1998-03-05 Michael Elkins <me@mutt.org> for Mutt 0.90.8:
+ *
+ * The original code assumed that both snprintf(3) and vsnprintf(3) were
+ * missing. Some systems only have snprintf(3) but not vsnprintf(3), so
+ * the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF.
+ *
+ * 1998-01-27 Thomas Roessler <roessler@does-not-exist.org> for Mutt 0.89i:
+ *
+ * The PGP code was using unsigned hexadecimal formats. Unfortunately,
+ * unsigned formats simply didn't work.
+ *
+ * 1997-10-22 Brandon Long <blong@fiction.net> for Mutt 0.87.1:
+ *
+ * Ok, added some minimal floating point support, which means this probably
+ * requires libm on most operating systems. Don't yet support the exponent
+ * (e,E) and sigfig (g,G). Also, fmtint() was pretty badly broken, it just
+ * wasn't being exercised in ways which showed it, so that's been fixed.
+ * Also, formatted the code to Mutt conventions, and removed dead code left
+ * over from the original. Also, there is now a builtin-test, run with:
+ * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm && ./snprintf
+ *
+ * 2996-09-15 Brandon Long <blong@fiction.net> for Mutt 0.43:
+ *
+ * This was ugly. It is still ugly. I opted out of floating point
+ * numbers, but the formatter understands just about everything from the
+ * normal C string format, at least as far as I can tell from the Solaris
+ * 2.5 printf(3S) man page.
+ */
+
+/*
+ * ToDo
+ *
+ * - Add wide character support.
+ * - Add support for "%a" and "%A" conversions.
+ * - Create test routines which predefine the expected results. Our test cases
+ * usually expose bugs in system implementations rather than in ours :-)
+ */
+
+/*
+ * Usage
+ *
+ * 1) The following preprocessor macros should be defined to 1 if the feature or
+ * file in question is available on the target system (by using Autoconf or
+ * other means), though basic functionality should be available as long as
+ * HAVE_STDARG_H and HAVE_STDLIB_H are defined correctly:
+ *
+ * HAVE_VSNPRINTF
+ * HAVE_SNPRINTF
+ * HAVE_VASPRINTF
+ * HAVE_ASPRINTF
+ * HAVE_STDARG_H
+ * HAVE_STDDEF_H
+ * HAVE_STDINT_H
+ * HAVE_STDLIB_H
+ * HAVE_INTTYPES_H
+ * HAVE_LOCALE_H
+ * HAVE_LOCALECONV
+ * HAVE_LCONV_DECIMAL_POINT
+ * HAVE_LCONV_THOUSANDS_SEP
+ * HAVE_LONG_DOUBLE
+ * HAVE_LONG_LONG_INT
+ * HAVE_UNSIGNED_LONG_LONG_INT
+ * HAVE_INTMAX_T
+ * HAVE_UINTMAX_T
+ * HAVE_UINTPTR_T
+ * HAVE_PTRDIFF_T
+ * HAVE_VA_COPY
+ * HAVE___VA_COPY
+ *
+ * 2) The calls to the functions which should be replaced must be redefined
+ * throughout the project files (by using Autoconf or other means):
+ *
+ * #define vsnprintf rpl_vsnprintf
+ * #define snprintf rpl_snprintf
+ * #define vasprintf rpl_vasprintf
+ * #define asprintf rpl_asprintf
+ *
+ * 3) The required replacement functions should be declared in some header file
+ * included throughout the project files:
+ *
+ * #if HAVE_CONFIG_H
+ * #include <config.h>
+ * #endif
+ * #if HAVE_STDARG_H
+ * #include <stdarg.h>
+ * #if !HAVE_VSNPRINTF
+ * int rpl_vsnprintf(char *, size_t, const char *, va_list);
+ * #endif
+ * #if !HAVE_SNPRINTF
+ * int rpl_snprintf(char *, size_t, const char *, ...);
+ * #endif
+ * #if !HAVE_VASPRINTF
+ * int rpl_vasprintf(char **, const char *, va_list);
+ * #endif
+ * #if !HAVE_ASPRINTF
+ * int rpl_asprintf(char **, const char *, ...);
+ * #endif
+ * #endif
+ *
+ * Autoconf macros for handling step 1 and step 2 are available at
+ * <http://www.jhweiss.de/software/snprintf.html>.
+ */
+
+#include "pipe/p_config.h"
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#else
+#ifdef _MSC_VER
+#define vsnprintf util_vsnprintf
+#define snprintf util_snprintf
+#define HAVE_VSNPRINTF 0
+#define HAVE_SNPRINTF 0
+#define HAVE_VASPRINTF 1 /* not needed */
+#define HAVE_ASPRINTF 1 /* not needed */
+#define HAVE_STDARG_H 1
+#define HAVE_STDDEF_H 1
+#define HAVE_STDINT_H 0
+#define HAVE_STDLIB_H 1
+#define HAVE_INTTYPES_H 0
+#define HAVE_LOCALE_H 0
+#define HAVE_LOCALECONV 0
+#define HAVE_LCONV_DECIMAL_POINT 0
+#define HAVE_LCONV_THOUSANDS_SEP 0
+#define HAVE_LONG_DOUBLE 0
+#define HAVE_LONG_LONG_INT 1
+#define HAVE_UNSIGNED_LONG_LONG_INT 1
+#define HAVE_INTMAX_T 0
+#define HAVE_UINTMAX_T 0
+#define HAVE_UINTPTR_T 1
+#define HAVE_PTRDIFF_T 1
+#define HAVE_VA_COPY 0
+#define HAVE___VA_COPY 0
+#else
+#define HAVE_VSNPRINTF 1
+#define HAVE_SNPRINTF 1
+#define HAVE_VASPRINTF 1
+#define HAVE_ASPRINTF 1
+#endif
+#endif /* HAVE_CONFIG_H */
+
+#if !HAVE_SNPRINTF || !HAVE_VSNPRINTF || !HAVE_ASPRINTF || !HAVE_VASPRINTF
+#include <stdio.h> /* For NULL, size_t, vsnprintf(3), and vasprintf(3). */
+#ifdef VA_START
+#undef VA_START
+#endif /* defined(VA_START) */
+#ifdef VA_SHIFT
+#undef VA_SHIFT
+#endif /* defined(VA_SHIFT) */
+#if HAVE_STDARG_H
+#include <stdarg.h>
+#define VA_START(ap, last) va_start(ap, last)
+#define VA_SHIFT(ap, value, type) /* No-op for ANSI C. */
+#else /* Assume <varargs.h> is available. */
+#include <varargs.h>
+#define VA_START(ap, last) va_start(ap) /* "last" is ignored. */
+#define VA_SHIFT(ap, value, type) value = va_arg(ap, type)
+#endif /* HAVE_STDARG_H */
+
+#if !HAVE_VASPRINTF
+#if HAVE_STDLIB_H
+#include <stdlib.h> /* For malloc(3). */
+#endif /* HAVE_STDLIB_H */
+#ifdef VA_COPY
+#undef VA_COPY
+#endif /* defined(VA_COPY) */
+#ifdef VA_END_COPY
+#undef VA_END_COPY
+#endif /* defined(VA_END_COPY) */
+#if HAVE_VA_COPY
+#define VA_COPY(dest, src) va_copy(dest, src)
+#define VA_END_COPY(ap) va_end(ap)
+#elif HAVE___VA_COPY
+#define VA_COPY(dest, src) __va_copy(dest, src)
+#define VA_END_COPY(ap) va_end(ap)
+#else
+#define VA_COPY(dest, src) (void)mymemcpy(&dest, &src, sizeof(va_list))
+#define VA_END_COPY(ap) /* No-op. */
+#define NEED_MYMEMCPY 1
+static void *mymemcpy(void *, void *, size_t);
+#endif /* HAVE_VA_COPY */
+#endif /* !HAVE_VASPRINTF */
+
+#if !HAVE_VSNPRINTF
+#include <limits.h> /* For *_MAX. */
+#if HAVE_INTTYPES_H
+#include <inttypes.h> /* For intmax_t (if not defined in <stdint.h>). */
+#endif /* HAVE_INTTYPES_H */
+#if HAVE_LOCALE_H
+#include <locale.h> /* For localeconv(3). */
+#endif /* HAVE_LOCALE_H */
+#if HAVE_STDDEF_H
+#include <stddef.h> /* For ptrdiff_t. */
+#endif /* HAVE_STDDEF_H */
+#if HAVE_STDINT_H
+#include <stdint.h> /* For intmax_t. */
+#endif /* HAVE_STDINT_H */
+
+/* Support for unsigned long long int. We may also need ULLONG_MAX. */
+#ifndef ULONG_MAX /* We may need ULONG_MAX as a fallback. */
+#ifdef UINT_MAX
+#define ULONG_MAX UINT_MAX
+#else
+#define ULONG_MAX INT_MAX
+#endif /* defined(UINT_MAX) */
+#endif /* !defined(ULONG_MAX) */
+#ifdef ULLONG
+#undef ULLONG
+#endif /* defined(ULLONG) */
+#if HAVE_UNSIGNED_LONG_LONG_INT
+#define ULLONG unsigned long long int
+#ifndef ULLONG_MAX
+#define ULLONG_MAX ULONG_MAX
+#endif /* !defined(ULLONG_MAX) */
+#else
+#define ULLONG unsigned long int
+#ifdef ULLONG_MAX
+#undef ULLONG_MAX
+#endif /* defined(ULLONG_MAX) */
+#define ULLONG_MAX ULONG_MAX
+#endif /* HAVE_LONG_LONG_INT */
+
+/* Support for uintmax_t. We also need UINTMAX_MAX. */
+#ifdef UINTMAX_T
+#undef UINTMAX_T
+#endif /* defined(UINTMAX_T) */
+#if HAVE_UINTMAX_T || defined(uintmax_t)
+#define UINTMAX_T uintmax_t
+#ifndef UINTMAX_MAX
+#define UINTMAX_MAX ULLONG_MAX
+#endif /* !defined(UINTMAX_MAX) */
+#else
+#define UINTMAX_T ULLONG
+#ifdef UINTMAX_MAX
+#undef UINTMAX_MAX
+#endif /* defined(UINTMAX_MAX) */
+#define UINTMAX_MAX ULLONG_MAX
+#endif /* HAVE_UINTMAX_T || defined(uintmax_t) */
+
+/* Support for long double. */
+#ifndef LDOUBLE
+#if HAVE_LONG_DOUBLE
+#define LDOUBLE long double
+#else
+#define LDOUBLE double
+#endif /* HAVE_LONG_DOUBLE */
+#endif /* !defined(LDOUBLE) */
+
+/* Support for long long int. */
+#ifndef LLONG
+#if HAVE_LONG_LONG_INT
+#define LLONG long long int
+#else
+#define LLONG long int
+#endif /* HAVE_LONG_LONG_INT */
+#endif /* !defined(LLONG) */
+
+/* Support for intmax_t. */
+#ifndef INTMAX_T
+#if HAVE_INTMAX_T || defined(intmax_t)
+#define INTMAX_T intmax_t
+#else
+#define INTMAX_T LLONG
+#endif /* HAVE_INTMAX_T || defined(intmax_t) */
+#endif /* !defined(INTMAX_T) */
+
+/* Support for uintptr_t. */
+#ifndef UINTPTR_T
+#if HAVE_UINTPTR_T || defined(uintptr_t)
+#define UINTPTR_T uintptr_t
+#else
+#define UINTPTR_T unsigned long int
+#endif /* HAVE_UINTPTR_T || defined(uintptr_t) */
+#endif /* !defined(UINTPTR_T) */
+
+/* WinCE5.0 does not have uintptr_t defined */
+#if (_WIN32_WCE < 600)
+#ifdef UINTPTR_T
+#undef UINTPTR_T
+#endif
+#define UINTPTR_T unsigned long int
+#endif
+
+
+/* Support for ptrdiff_t. */
+#ifndef PTRDIFF_T
+#if HAVE_PTRDIFF_T || defined(ptrdiff_t)
+#define PTRDIFF_T ptrdiff_t
+#else
+#define PTRDIFF_T long int
+#endif /* HAVE_PTRDIFF_T || defined(ptrdiff_t) */
+#endif /* !defined(PTRDIFF_T) */
+
+/*
+ * We need an unsigned integer type corresponding to ptrdiff_t (cf. C99:
+ * 7.19.6.1, 7). However, we'll simply use PTRDIFF_T and convert it to an
+ * unsigned type if necessary. This should work just fine in practice.
+ */
+#ifndef UPTRDIFF_T
+#define UPTRDIFF_T PTRDIFF_T
+#endif /* !defined(UPTRDIFF_T) */
+
+/*
+ * We need a signed integer type corresponding to size_t (cf. C99: 7.19.6.1, 7).
+ * However, we'll simply use size_t and convert it to a signed type if
+ * necessary. This should work just fine in practice.
+ */
+#ifndef SSIZE_T
+#define SSIZE_T size_t
+#endif /* !defined(SSIZE_T) */
+
+/* Either ERANGE or E2BIG should be available everywhere. */
+#ifndef ERANGE
+#define ERANGE E2BIG
+#endif /* !defined(ERANGE) */
+#ifndef EOVERFLOW
+#define EOVERFLOW ERANGE
+#endif /* !defined(EOVERFLOW) */
+
+/*
+ * Buffer size to hold the octal string representation of UINT128_MAX without
+ * nul-termination ("3777777777777777777777777777777777777777777").
+ */
+#ifdef MAX_CONVERT_LENGTH
+#undef MAX_CONVERT_LENGTH
+#endif /* defined(MAX_CONVERT_LENGTH) */
+#define MAX_CONVERT_LENGTH 43
+
+/* Format read states. */
+#define PRINT_S_DEFAULT 0
+#define PRINT_S_FLAGS 1
+#define PRINT_S_WIDTH 2
+#define PRINT_S_DOT 3
+#define PRINT_S_PRECISION 4
+#define PRINT_S_MOD 5
+#define PRINT_S_CONV 6
+
+/* Format flags. */
+#define PRINT_F_MINUS (1 << 0)
+#define PRINT_F_PLUS (1 << 1)
+#define PRINT_F_SPACE (1 << 2)
+#define PRINT_F_NUM (1 << 3)
+#define PRINT_F_ZERO (1 << 4)
+#define PRINT_F_QUOTE (1 << 5)
+#define PRINT_F_UP (1 << 6)
+#define PRINT_F_UNSIGNED (1 << 7)
+#define PRINT_F_TYPE_G (1 << 8)
+#define PRINT_F_TYPE_E (1 << 9)
+
+/* Conversion flags. */
+#define PRINT_C_CHAR 1
+#define PRINT_C_SHORT 2
+#define PRINT_C_LONG 3
+#define PRINT_C_LLONG 4
+#define PRINT_C_LDOUBLE 5
+#define PRINT_C_SIZE 6
+#define PRINT_C_PTRDIFF 7
+#define PRINT_C_INTMAX 8
+
+#ifndef MAX
+#define MAX(x, y) ((x >= y) ? x : y)
+#endif /* !defined(MAX) */
+#ifndef CHARTOINT
+#define CHARTOINT(ch) (ch - '0')
+#endif /* !defined(CHARTOINT) */
+#ifndef ISDIGIT
+#define ISDIGIT(ch) ('0' <= (unsigned char)ch && (unsigned char)ch <= '9')
+#endif /* !defined(ISDIGIT) */
+#ifndef ISNAN
+#define ISNAN(x) (x != x)
+#endif /* !defined(ISNAN) */
+#ifndef ISINF
+#define ISINF(x) (x != 0.0 && x + x == x)
+#endif /* !defined(ISINF) */
+
+#ifdef OUTCHAR
+#undef OUTCHAR
+#endif /* defined(OUTCHAR) */
+#define OUTCHAR(str, len, size, ch) \
+do { \
+ if (len + 1 < size) \
+ str[len] = ch; \
+ (len)++; \
+} while (/* CONSTCOND */ 0)
+
+static void fmtstr(char *, size_t *, size_t, const char *, int, int, int);
+static void fmtint(char *, size_t *, size_t, INTMAX_T, int, int, int, int);
+static void fmtflt(char *, size_t *, size_t, LDOUBLE, int, int, int, int *);
+static void printsep(char *, size_t *, size_t);
+static int getnumsep(int);
+static int getexponent(LDOUBLE);
+static int convert(UINTMAX_T, char *, size_t, int, int);
+static UINTMAX_T cast(LDOUBLE);
+static UINTMAX_T myround(LDOUBLE);
+static LDOUBLE mypow10(int);
+
+int
+util_vsnprintf(char *str, size_t size, const char *format, va_list args)
+{
+ LDOUBLE fvalue;
+ INTMAX_T value;
+ unsigned char cvalue;
+ const char *strvalue;
+ INTMAX_T *intmaxptr;
+ PTRDIFF_T *ptrdiffptr;
+ SSIZE_T *sizeptr;
+ LLONG *llongptr;
+ long int *longptr;
+ int *intptr;
+ short int *shortptr;
+ signed char *charptr;
+ size_t len = 0;
+ int overflow = 0;
+ int base = 0;
+ int cflags = 0;
+ int flags = 0;
+ int width = 0;
+ int precision = -1;
+ int state = PRINT_S_DEFAULT;
+ char ch = *format++;
+
+ /*
+ * C99 says: "If `n' is zero, nothing is written, and `s' may be a null
+ * pointer." (7.19.6.5, 2) We're forgiving and allow a NULL pointer
+ * even if a size larger than zero was specified. At least NetBSD's
+ * snprintf(3) does the same, as well as other versions of this file.
+ * (Though some of these versions will write to a non-NULL buffer even
+ * if a size of zero was specified, which violates the standard.)
+ */
+ if (str == NULL && size != 0)
+ size = 0;
+
+ while (ch != '\0')
+ switch (state) {
+ case PRINT_S_DEFAULT:
+ if (ch == '%')
+ state = PRINT_S_FLAGS;
+ else
+ OUTCHAR(str, len, size, ch);
+ ch = *format++;
+ break;
+ case PRINT_S_FLAGS:
+ switch (ch) {
+ case '-':
+ flags |= PRINT_F_MINUS;
+ ch = *format++;
+ break;
+ case '+':
+ flags |= PRINT_F_PLUS;
+ ch = *format++;
+ break;
+ case ' ':
+ flags |= PRINT_F_SPACE;
+ ch = *format++;
+ break;
+ case '#':
+ flags |= PRINT_F_NUM;
+ ch = *format++;
+ break;
+ case '0':
+ flags |= PRINT_F_ZERO;
+ ch = *format++;
+ break;
+ case '\'': /* SUSv2 flag (not in C99). */
+ flags |= PRINT_F_QUOTE;
+ ch = *format++;
+ break;
+ default:
+ state = PRINT_S_WIDTH;
+ break;
+ }
+ break;
+ case PRINT_S_WIDTH:
+ if (ISDIGIT(ch)) {
+ ch = CHARTOINT(ch);
+ if (width > (INT_MAX - ch) / 10) {
+ overflow = 1;
+ goto out;
+ }
+ width = 10 * width + ch;
+ ch = *format++;
+ } else if (ch == '*') {
+ /*
+ * C99 says: "A negative field width argument is
+ * taken as a `-' flag followed by a positive
+ * field width." (7.19.6.1, 5)
+ */
+ if ((width = va_arg(args, int)) < 0) {
+ flags |= PRINT_F_MINUS;
+ width = -width;
+ }
+ ch = *format++;
+ state = PRINT_S_DOT;
+ } else
+ state = PRINT_S_DOT;
+ break;
+ case PRINT_S_DOT:
+ if (ch == '.') {
+ state = PRINT_S_PRECISION;
+ ch = *format++;
+ } else
+ state = PRINT_S_MOD;
+ break;
+ case PRINT_S_PRECISION:
+ if (precision == -1)
+ precision = 0;
+ if (ISDIGIT(ch)) {
+ ch = CHARTOINT(ch);
+ if (precision > (INT_MAX - ch) / 10) {
+ overflow = 1;
+ goto out;
+ }
+ precision = 10 * precision + ch;
+ ch = *format++;
+ } else if (ch == '*') {
+ /*
+ * C99 says: "A negative precision argument is
+ * taken as if the precision were omitted."
+ * (7.19.6.1, 5)
+ */
+ if ((precision = va_arg(args, int)) < 0)
+ precision = -1;
+ ch = *format++;
+ state = PRINT_S_MOD;
+ } else
+ state = PRINT_S_MOD;
+ break;
+ case PRINT_S_MOD:
+ switch (ch) {
+ case 'h':
+ ch = *format++;
+ if (ch == 'h') { /* It's a char. */
+ ch = *format++;
+ cflags = PRINT_C_CHAR;
+ } else
+ cflags = PRINT_C_SHORT;
+ break;
+ case 'l':
+ ch = *format++;
+ if (ch == 'l') { /* It's a long long. */
+ ch = *format++;
+ cflags = PRINT_C_LLONG;
+ } else
+ cflags = PRINT_C_LONG;
+ break;
+ case 'L':
+ cflags = PRINT_C_LDOUBLE;
+ ch = *format++;
+ break;
+ case 'j':
+ cflags = PRINT_C_INTMAX;
+ ch = *format++;
+ break;
+ case 't':
+ cflags = PRINT_C_PTRDIFF;
+ ch = *format++;
+ break;
+ case 'z':
+ cflags = PRINT_C_SIZE;
+ ch = *format++;
+ break;
+ }
+ state = PRINT_S_CONV;
+ break;
+ case PRINT_S_CONV:
+ switch (ch) {
+ case 'd':
+ /* FALLTHROUGH */
+ case 'i':
+ switch (cflags) {
+ case PRINT_C_CHAR:
+ value = (signed char)va_arg(args, int);
+ break;
+ case PRINT_C_SHORT:
+ value = (short int)va_arg(args, int);
+ break;
+ case PRINT_C_LONG:
+ value = va_arg(args, long int);
+ break;
+ case PRINT_C_LLONG:
+ value = va_arg(args, LLONG);
+ break;
+ case PRINT_C_SIZE:
+ value = va_arg(args, SSIZE_T);
+ break;
+ case PRINT_C_INTMAX:
+ value = va_arg(args, INTMAX_T);
+ break;
+ case PRINT_C_PTRDIFF:
+ value = va_arg(args, PTRDIFF_T);
+ break;
+ default:
+ value = va_arg(args, int);
+ break;
+ }
+ fmtint(str, &len, size, value, 10, width,
+ precision, flags);
+ break;
+ case 'X':
+ flags |= PRINT_F_UP;
+ /* FALLTHROUGH */
+ case 'x':
+ base = 16;
+ /* FALLTHROUGH */
+ case 'o':
+ if (base == 0)
+ base = 8;
+ /* FALLTHROUGH */
+ case 'u':
+ if (base == 0)
+ base = 10;
+ flags |= PRINT_F_UNSIGNED;
+ switch (cflags) {
+ case PRINT_C_CHAR:
+ value = (unsigned char)va_arg(args,
+ unsigned int);
+ break;
+ case PRINT_C_SHORT:
+ value = (unsigned short int)va_arg(args,
+ unsigned int);
+ break;
+ case PRINT_C_LONG:
+ value = va_arg(args, unsigned long int);
+ break;
+ case PRINT_C_LLONG:
+ value = va_arg(args, ULLONG);
+ break;
+ case PRINT_C_SIZE:
+ value = va_arg(args, size_t);
+ break;
+ case PRINT_C_INTMAX:
+ value = va_arg(args, UINTMAX_T);
+ break;
+ case PRINT_C_PTRDIFF:
+ value = va_arg(args, UPTRDIFF_T);
+ break;
+ default:
+ value = va_arg(args, unsigned int);
+ break;
+ }
+ fmtint(str, &len, size, value, base, width,
+ precision, flags);
+ break;
+ case 'A':
+ /* Not yet supported, we'll use "%F". */
+ /* FALLTHROUGH */
+ case 'F':
+ flags |= PRINT_F_UP;
+ case 'a':
+ /* Not yet supported, we'll use "%f". */
+ /* FALLTHROUGH */
+ case 'f':
+ if (cflags == PRINT_C_LDOUBLE)
+ fvalue = va_arg(args, LDOUBLE);
+ else
+ fvalue = va_arg(args, double);
+ fmtflt(str, &len, size, fvalue, width,
+ precision, flags, &overflow);
+ if (overflow)
+ goto out;
+ break;
+ case 'E':
+ flags |= PRINT_F_UP;
+ /* FALLTHROUGH */
+ case 'e':
+ flags |= PRINT_F_TYPE_E;
+ if (cflags == PRINT_C_LDOUBLE)
+ fvalue = va_arg(args, LDOUBLE);
+ else
+ fvalue = va_arg(args, double);
+ fmtflt(str, &len, size, fvalue, width,
+ precision, flags, &overflow);
+ if (overflow)
+ goto out;
+ break;
+ case 'G':
+ flags |= PRINT_F_UP;
+ /* FALLTHROUGH */
+ case 'g':
+ flags |= PRINT_F_TYPE_G;
+ if (cflags == PRINT_C_LDOUBLE)
+ fvalue = va_arg(args, LDOUBLE);
+ else
+ fvalue = va_arg(args, double);
+ /*
+ * If the precision is zero, it is treated as
+ * one (cf. C99: 7.19.6.1, 8).
+ */
+ if (precision == 0)
+ precision = 1;
+ fmtflt(str, &len, size, fvalue, width,
+ precision, flags, &overflow);
+ if (overflow)
+ goto out;
+ break;
+ case 'c':
+ cvalue = (unsigned char)va_arg(args, int);
+ OUTCHAR(str, len, size, cvalue);
+ break;
+ case 's':
+ strvalue = va_arg(args, char *);
+ fmtstr(str, &len, size, strvalue, width,
+ precision, flags);
+ break;
+ case 'p':
+ /*
+ * C99 says: "The value of the pointer is
+ * converted to a sequence of printing
+ * characters, in an implementation-defined
+ * manner." (C99: 7.19.6.1, 8)
+ */
+ if ((strvalue = va_arg(args, void *)) == NULL)
+ /*
+ * We use the glibc format. BSD prints
+ * "0x0", SysV "0".
+ */
+ fmtstr(str, &len, size, "(nil)", width,
+ -1, flags);
+ else {
+ /*
+ * We use the BSD/glibc format. SysV
+ * omits the "0x" prefix (which we emit
+ * using the PRINT_F_NUM flag).
+ */
+ flags |= PRINT_F_NUM;
+ flags |= PRINT_F_UNSIGNED;
+ fmtint(str, &len, size,
+ (UINTPTR_T)strvalue, 16, width,
+ precision, flags);
+ }
+ break;
+ case 'n':
+ switch (cflags) {
+ case PRINT_C_CHAR:
+ charptr = va_arg(args, signed char *);
+ *charptr = (signed char)len;
+ break;
+ case PRINT_C_SHORT:
+ shortptr = va_arg(args, short int *);
+ *shortptr = (short int)len;
+ break;
+ case PRINT_C_LONG:
+ longptr = va_arg(args, long int *);
+ *longptr = (long int)len;
+ break;
+ case PRINT_C_LLONG:
+ llongptr = va_arg(args, LLONG *);
+ *llongptr = (LLONG)len;
+ break;
+ case PRINT_C_SIZE:
+ /*
+ * C99 says that with the "z" length
+ * modifier, "a following `n' conversion
+ * specifier applies to a pointer to a
+ * signed integer type corresponding to
+ * size_t argument." (7.19.6.1, 7)
+ */
+ sizeptr = va_arg(args, SSIZE_T *);
+ *sizeptr = len;
+ break;
+ case PRINT_C_INTMAX:
+ intmaxptr = va_arg(args, INTMAX_T *);
+ *intmaxptr = len;
+ break;
+ case PRINT_C_PTRDIFF:
+ ptrdiffptr = va_arg(args, PTRDIFF_T *);
+ *ptrdiffptr = len;
+ break;
+ default:
+ intptr = va_arg(args, int *);
+ *intptr = (int)len;
+ break;
+ }
+ break;
+ case '%': /* Print a "%" character verbatim. */
+ OUTCHAR(str, len, size, ch);
+ break;
+ default: /* Skip other characters. */
+ break;
+ }
+ ch = *format++;
+ state = PRINT_S_DEFAULT;
+ base = cflags = flags = width = 0;
+ precision = -1;
+ break;
+ }
+out:
+ if (len < size)
+ str[len] = '\0';
+ else if (size > 0)
+ str[size - 1] = '\0';
+
+ if (overflow || len >= INT_MAX) {
+ return -1;
+ }
+ return (int)len;
+}
+
+static void
+fmtstr(char *str, size_t *len, size_t size, const char *value, int width,
+ int precision, int flags)
+{
+ int padlen, strln; /* Amount to pad. */
+ int noprecision = (precision == -1);
+
+ if (value == NULL) /* We're forgiving. */
+ value = "(null)";
+
+ /* If a precision was specified, don't read the string past it. */
+ for (strln = 0; value[strln] != '\0' &&
+ (noprecision || strln < precision); strln++)
+ continue;
+
+ if ((padlen = width - strln) < 0)
+ padlen = 0;
+ if (flags & PRINT_F_MINUS) /* Left justify. */
+ padlen = -padlen;
+
+ while (padlen > 0) { /* Leading spaces. */
+ OUTCHAR(str, *len, size, ' ');
+ padlen--;
+ }
+ while (*value != '\0' && (noprecision || precision-- > 0)) {
+ OUTCHAR(str, *len, size, *value);
+ value++;
+ }
+ while (padlen < 0) { /* Trailing spaces. */
+ OUTCHAR(str, *len, size, ' ');
+ padlen++;
+ }
+}
+
+static void
+fmtint(char *str, size_t *len, size_t size, INTMAX_T value, int base, int width,
+ int precision, int flags)
+{
+ UINTMAX_T uvalue;
+ char iconvert[MAX_CONVERT_LENGTH];
+ char sign = 0;
+ char hexprefix = 0;
+ int spadlen = 0; /* Amount to space pad. */
+ int zpadlen = 0; /* Amount to zero pad. */
+ int pos;
+ int separators = (flags & PRINT_F_QUOTE);
+ int noprecision = (precision == -1);
+
+ if (flags & PRINT_F_UNSIGNED)
+ uvalue = value;
+ else {
+ uvalue = (value >= 0) ? value : -value;
+ if (value < 0)
+ sign = '-';
+ else if (flags & PRINT_F_PLUS) /* Do a sign. */
+ sign = '+';
+ else if (flags & PRINT_F_SPACE)
+ sign = ' ';
+ }
+
+ pos = convert(uvalue, iconvert, sizeof(iconvert), base,
+ flags & PRINT_F_UP);
+
+ if (flags & PRINT_F_NUM && uvalue != 0) {
+ /*
+ * C99 says: "The result is converted to an `alternative form'.
+ * For `o' conversion, it increases the precision, if and only
+ * if necessary, to force the first digit of the result to be a
+ * zero (if the value and precision are both 0, a single 0 is
+ * printed). For `x' (or `X') conversion, a nonzero result has
+ * `0x' (or `0X') prefixed to it." (7.19.6.1, 6)
+ */
+ switch (base) {
+ case 8:
+ if (precision <= pos)
+ precision = pos + 1;
+ break;
+ case 16:
+ hexprefix = (flags & PRINT_F_UP) ? 'X' : 'x';
+ break;
+ }
+ }
+
+ if (separators) /* Get the number of group separators we'll print. */
+ separators = getnumsep(pos);
+
+ zpadlen = precision - pos - separators;
+ spadlen = width /* Minimum field width. */
+ - separators /* Number of separators. */
+ - MAX(precision, pos) /* Number of integer digits. */
+ - ((sign != 0) ? 1 : 0) /* Will we print a sign? */
+ - ((hexprefix != 0) ? 2 : 0); /* Will we print a prefix? */
+
+ if (zpadlen < 0)
+ zpadlen = 0;
+ if (spadlen < 0)
+ spadlen = 0;
+
+ /*
+ * C99 says: "If the `0' and `-' flags both appear, the `0' flag is
+ * ignored. For `d', `i', `o', `u', `x', and `X' conversions, if a
+ * precision is specified, the `0' flag is ignored." (7.19.6.1, 6)
+ */
+ if (flags & PRINT_F_MINUS) /* Left justify. */
+ spadlen = -spadlen;
+ else if (flags & PRINT_F_ZERO && noprecision) {
+ zpadlen += spadlen;
+ spadlen = 0;
+ }
+ while (spadlen > 0) { /* Leading spaces. */
+ OUTCHAR(str, *len, size, ' ');
+ spadlen--;
+ }
+ if (sign != 0) /* Sign. */
+ OUTCHAR(str, *len, size, sign);
+ if (hexprefix != 0) { /* A "0x" or "0X" prefix. */
+ OUTCHAR(str, *len, size, '0');
+ OUTCHAR(str, *len, size, hexprefix);
+ }
+ while (zpadlen > 0) { /* Leading zeros. */
+ OUTCHAR(str, *len, size, '0');
+ zpadlen--;
+ }
+ while (pos > 0) { /* The actual digits. */
+ pos--;
+ OUTCHAR(str, *len, size, iconvert[pos]);
+ if (separators > 0 && pos > 0 && pos % 3 == 0)
+ printsep(str, len, size);
+ }
+ while (spadlen < 0) { /* Trailing spaces. */
+ OUTCHAR(str, *len, size, ' ');
+ spadlen++;
+ }
+}
+
+static void
+fmtflt(char *str, size_t *len, size_t size, LDOUBLE fvalue, int width,
+ int precision, int flags, int *overflow)
+{
+ LDOUBLE ufvalue;
+ UINTMAX_T intpart;
+ UINTMAX_T fracpart;
+ UINTMAX_T mask;
+ const char *infnan = NULL;
+ char iconvert[MAX_CONVERT_LENGTH];
+ char fconvert[MAX_CONVERT_LENGTH];
+ char econvert[4]; /* "e-12" (without nul-termination). */
+ char esign = 0;
+ char sign = 0;
+ int leadfraczeros = 0;
+ int exponent = 0;
+ int emitpoint = 0;
+ int omitzeros = 0;
+ int omitcount = 0;
+ int padlen = 0;
+ int epos = 0;
+ int fpos = 0;
+ int ipos = 0;
+ int separators = (flags & PRINT_F_QUOTE);
+ int estyle = (flags & PRINT_F_TYPE_E);
+#if HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT
+ struct lconv *lc = localeconv();
+#endif /* HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT */
+
+ /*
+ * AIX' man page says the default is 0, but C99 and at least Solaris'
+ * and NetBSD's man pages say the default is 6, and sprintf(3) on AIX
+ * defaults to 6.
+ */
+ if (precision == -1)
+ precision = 6;
+
+ if (fvalue < 0.0)
+ sign = '-';
+ else if (flags & PRINT_F_PLUS) /* Do a sign. */
+ sign = '+';
+ else if (flags & PRINT_F_SPACE)
+ sign = ' ';
+
+ if (ISNAN(fvalue))
+ infnan = (flags & PRINT_F_UP) ? "NAN" : "nan";
+ else if (ISINF(fvalue))
+ infnan = (flags & PRINT_F_UP) ? "INF" : "inf";
+
+ if (infnan != NULL) {
+ if (sign != 0)
+ iconvert[ipos++] = sign;
+ while (*infnan != '\0')
+ iconvert[ipos++] = *infnan++;
+ fmtstr(str, len, size, iconvert, width, ipos, flags);
+ return;
+ }
+
+ /* "%e" (or "%E") or "%g" (or "%G") conversion. */
+ if (flags & PRINT_F_TYPE_E || flags & PRINT_F_TYPE_G) {
+ if (flags & PRINT_F_TYPE_G) {
+ /*
+ * For "%g" (and "%G") conversions, the precision
+ * specifies the number of significant digits, which
+ * includes the digits in the integer part. The
+ * conversion will or will not be using "e-style" (like
+ * "%e" or "%E" conversions) depending on the precision
+ * and on the exponent. However, the exponent can be
+ * affected by rounding the converted value, so we'll
+ * leave this decision for later. Until then, we'll
+ * assume that we're going to do an "e-style" conversion
+ * (in order to get the exponent calculated). For
+ * "e-style", the precision must be decremented by one.
+ */
+ precision--;
+ /*
+ * For "%g" (and "%G") conversions, trailing zeros are
+ * removed from the fractional portion of the result
+ * unless the "#" flag was specified.
+ */
+ if (!(flags & PRINT_F_NUM))
+ omitzeros = 1;
+ }
+ exponent = getexponent(fvalue);
+ estyle = 1;
+ }
+
+again:
+ /*
+ * Sorry, we only support 9, 19, or 38 digits (that is, the number of
+ * digits of the 32-bit, the 64-bit, or the 128-bit UINTMAX_MAX value
+ * minus one) past the decimal point due to our conversion method.
+ */
+ switch (sizeof(UINTMAX_T)) {
+ case 16:
+ if (precision > 38)
+ precision = 38;
+ break;
+ case 8:
+ if (precision > 19)
+ precision = 19;
+ break;
+ default:
+ if (precision > 9)
+ precision = 9;
+ break;
+ }
+
+ ufvalue = (fvalue >= 0.0) ? fvalue : -fvalue;
+ if (estyle) /* We want exactly one integer digit. */
+ ufvalue /= mypow10(exponent);
+
+ if ((intpart = cast(ufvalue)) == UINTMAX_MAX) {
+ *overflow = 1;
+ return;
+ }
+
+ /*
+ * Factor of ten with the number of digits needed for the fractional
+ * part. For example, if the precision is 3, the mask will be 1000.
+ */
+ mask = (UINTMAX_T)mypow10(precision);
+ /*
+ * We "cheat" by converting the fractional part to integer by
+ * multiplying by a factor of ten.
+ */
+ if ((fracpart = myround(mask * (ufvalue - intpart))) >= mask) {
+ /*
+ * For example, ufvalue = 2.99962, intpart = 2, and mask = 1000
+ * (because precision = 3). Now, myround(1000 * 0.99962) will
+ * return 1000. So, the integer part must be incremented by one
+ * and the fractional part must be set to zero.
+ */
+ intpart++;
+ fracpart = 0;
+ if (estyle && intpart == 10) {
+ /*
+ * The value was rounded up to ten, but we only want one
+ * integer digit if using "e-style". So, the integer
+ * part must be set to one and the exponent must be
+ * incremented by one.
+ */
+ intpart = 1;
+ exponent++;
+ }
+ }
+
+ /*
+ * Now that we know the real exponent, we can check whether or not to
+ * use "e-style" for "%g" (and "%G") conversions. If we don't need
+ * "e-style", the precision must be adjusted and the integer and
+ * fractional parts must be recalculated from the original value.
+ *
+ * C99 says: "Let P equal the precision if nonzero, 6 if the precision
+ * is omitted, or 1 if the precision is zero. Then, if a conversion
+ * with style `E' would have an exponent of X:
+ *
+ * - if P > X >= -4, the conversion is with style `f' (or `F') and
+ * precision P - (X + 1).
+ *
+ * - otherwise, the conversion is with style `e' (or `E') and precision
+ * P - 1." (7.19.6.1, 8)
+ *
+ * Note that we had decremented the precision by one.
+ */
+ if (flags & PRINT_F_TYPE_G && estyle &&
+ precision + 1 > exponent && exponent >= -4) {
+ precision -= exponent;
+ estyle = 0;
+ goto again;
+ }
+
+ if (estyle) {
+ if (exponent < 0) {
+ exponent = -exponent;
+ esign = '-';
+ } else
+ esign = '+';
+
+ /*
+ * Convert the exponent. The sizeof(econvert) is 4. So, the
+ * econvert buffer can hold e.g. "e+99" and "e-99". We don't
+ * support an exponent which contains more than two digits.
+ * Therefore, the following stores are safe.
+ */
+ epos = convert(exponent, econvert, 2, 10, 0);
+ /*
+ * C99 says: "The exponent always contains at least two digits,
+ * and only as many more digits as necessary to represent the
+ * exponent." (7.19.6.1, 8)
+ */
+ if (epos == 1)
+ econvert[epos++] = '0';
+ econvert[epos++] = esign;
+ econvert[epos++] = (flags & PRINT_F_UP) ? 'E' : 'e';
+ }
+
+ /* Convert the integer part and the fractional part. */
+ ipos = convert(intpart, iconvert, sizeof(iconvert), 10, 0);
+ if (fracpart != 0) /* convert() would return 1 if fracpart == 0. */
+ fpos = convert(fracpart, fconvert, sizeof(fconvert), 10, 0);
+
+ leadfraczeros = precision - fpos;
+
+ if (omitzeros) {
+ if (fpos > 0) /* Omit trailing fractional part zeros. */
+ while (omitcount < fpos && fconvert[omitcount] == '0')
+ omitcount++;
+ else { /* The fractional part is zero, omit it completely. */
+ omitcount = precision;
+ leadfraczeros = 0;
+ }
+ precision -= omitcount;
+ }
+
+ /*
+ * Print a decimal point if either the fractional part is non-zero
+ * and/or the "#" flag was specified.
+ */
+ if (precision > 0 || flags & PRINT_F_NUM)
+ emitpoint = 1;
+ if (separators) /* Get the number of group separators we'll print. */
+ separators = getnumsep(ipos);
+
+ padlen = width /* Minimum field width. */
+ - ipos /* Number of integer digits. */
+ - epos /* Number of exponent characters. */
+ - precision /* Number of fractional digits. */
+ - separators /* Number of group separators. */
+ - (emitpoint ? 1 : 0) /* Will we print a decimal point? */
+ - ((sign != 0) ? 1 : 0); /* Will we print a sign character? */
+
+ if (padlen < 0)
+ padlen = 0;
+
+ /*
+ * C99 says: "If the `0' and `-' flags both appear, the `0' flag is
+ * ignored." (7.19.6.1, 6)
+ */
+ if (flags & PRINT_F_MINUS) /* Left justifty. */
+ padlen = -padlen;
+ else if (flags & PRINT_F_ZERO && padlen > 0) {
+ if (sign != 0) { /* Sign. */
+ OUTCHAR(str, *len, size, sign);
+ sign = 0;
+ }
+ while (padlen > 0) { /* Leading zeros. */
+ OUTCHAR(str, *len, size, '0');
+ padlen--;
+ }
+ }
+ while (padlen > 0) { /* Leading spaces. */
+ OUTCHAR(str, *len, size, ' ');
+ padlen--;
+ }
+ if (sign != 0) /* Sign. */
+ OUTCHAR(str, *len, size, sign);
+ while (ipos > 0) { /* Integer part. */
+ ipos--;
+ OUTCHAR(str, *len, size, iconvert[ipos]);
+ if (separators > 0 && ipos > 0 && ipos % 3 == 0)
+ printsep(str, len, size);
+ }
+ if (emitpoint) { /* Decimal point. */
+#if HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT
+ if (lc->decimal_point != NULL && *lc->decimal_point != '\0')
+ OUTCHAR(str, *len, size, *lc->decimal_point);
+ else /* We'll always print some decimal point character. */
+#endif /* HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT */
+ OUTCHAR(str, *len, size, '.');
+ }
+ while (leadfraczeros > 0) { /* Leading fractional part zeros. */
+ OUTCHAR(str, *len, size, '0');
+ leadfraczeros--;
+ }
+ while (fpos > omitcount) { /* The remaining fractional part. */
+ fpos--;
+ OUTCHAR(str, *len, size, fconvert[fpos]);
+ }
+ while (epos > 0) { /* Exponent. */
+ epos--;
+ OUTCHAR(str, *len, size, econvert[epos]);
+ }
+ while (padlen < 0) { /* Trailing spaces. */
+ OUTCHAR(str, *len, size, ' ');
+ padlen++;
+ }
+}
+
+static void
+printsep(char *str, size_t *len, size_t size)
+{
+#if HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP
+ struct lconv *lc = localeconv();
+ int i;
+
+ if (lc->thousands_sep != NULL)
+ for (i = 0; lc->thousands_sep[i] != '\0'; i++)
+ OUTCHAR(str, *len, size, lc->thousands_sep[i]);
+ else
+#endif /* HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP */
+ OUTCHAR(str, *len, size, ',');
+}
+
+static int
+getnumsep(int digits)
+{
+ int separators = (digits - ((digits % 3 == 0) ? 1 : 0)) / 3;
+#if HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP
+ int strln;
+ struct lconv *lc = localeconv();
+
+ /* We support an arbitrary separator length (including zero). */
+ if (lc->thousands_sep != NULL) {
+ for (strln = 0; lc->thousands_sep[strln] != '\0'; strln++)
+ continue;
+ separators *= strln;
+ }
+#endif /* HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP */
+ return separators;
+}
+
+static int
+getexponent(LDOUBLE value)
+{
+ LDOUBLE tmp = (value >= 0.0) ? value : -value;
+ int exponent = 0;
+
+ /*
+ * We check for 99 > exponent > -99 in order to work around possible
+ * endless loops which could happen (at least) in the second loop (at
+ * least) if we're called with an infinite value. However, we checked
+ * for infinity before calling this function using our ISINF() macro, so
+ * this might be somewhat paranoid.
+ */
+ while (tmp < 1.0 && tmp > 0.0 && --exponent > -99)
+ tmp *= 10;
+ while (tmp >= 10.0 && ++exponent < 99)
+ tmp /= 10;
+
+ return exponent;
+}
+
+static int
+convert(UINTMAX_T value, char *buf, size_t size, int base, int caps)
+{
+ const char *digits = caps ? "0123456789ABCDEF" : "0123456789abcdef";
+ size_t pos = 0;
+
+ /* We return an unterminated buffer with the digits in reverse order. */
+ do {
+ buf[pos++] = digits[value % base];
+ value /= base;
+ } while (value != 0 && pos < size);
+
+ return (int)pos;
+}
+
+static UINTMAX_T
+cast(LDOUBLE value)
+{
+ UINTMAX_T result;
+
+ /*
+ * We check for ">=" and not for ">" because if UINTMAX_MAX cannot be
+ * represented exactly as an LDOUBLE value (but is less than LDBL_MAX),
+ * it may be increased to the nearest higher representable value for the
+ * comparison (cf. C99: 6.3.1.4, 2). It might then equal the LDOUBLE
+ * value although converting the latter to UINTMAX_T would overflow.
+ */
+ if (value >= UINTMAX_MAX)
+ return UINTMAX_MAX;
+
+ result = (UINTMAX_T)value;
+ /*
+ * At least on NetBSD/sparc64 3.0.2 and 4.99.30, casting long double to
+ * an integer type converts e.g. 1.9 to 2 instead of 1 (which violates
+ * the standard). Sigh.
+ */
+ return (result <= value) ? result : result - 1;
+}
+
+static UINTMAX_T
+myround(LDOUBLE value)
+{
+ UINTMAX_T intpart = cast(value);
+
+ return ((value -= intpart) < 0.5) ? intpart : intpart + 1;
+}
+
+static LDOUBLE
+mypow10(int exponent)
+{
+ LDOUBLE result = 1;
+
+ while (exponent > 0) {
+ result *= 10;
+ exponent--;
+ }
+ while (exponent < 0) {
+ result /= 10;
+ exponent++;
+ }
+ return result;
+}
+#endif /* !HAVE_VSNPRINTF */
+
+#if !HAVE_VASPRINTF
+#if NEED_MYMEMCPY
+void *
+mymemcpy(void *dst, void *src, size_t len)
+{
+ const char *from = src;
+ char *to = dst;
+
+ /* No need for optimization, we use this only to replace va_copy(3). */
+ while (len-- > 0)
+ *to++ = *from++;
+ return dst;
+}
+#endif /* NEED_MYMEMCPY */
+
+int
+util_vasprintf(char **ret, const char *format, va_list ap)
+{
+ size_t size;
+ int len;
+ va_list aq;
+
+ VA_COPY(aq, ap);
+ len = vsnprintf(NULL, 0, format, aq);
+ VA_END_COPY(aq);
+ if (len < 0 || (*ret = malloc(size = len + 1)) == NULL)
+ return -1;
+ return vsnprintf(*ret, size, format, ap);
+}
+#endif /* !HAVE_VASPRINTF */
+
+#if !HAVE_SNPRINTF
+#if HAVE_STDARG_H
+int
+util_snprintf(char *str, size_t size, const char *format, ...)
+#else
+int
+util_snprintf(va_alist) va_dcl
+#endif /* HAVE_STDARG_H */
+{
+#if !HAVE_STDARG_H
+ char *str;
+ size_t size;
+ char *format;
+#endif /* HAVE_STDARG_H */
+ va_list ap;
+ int len;
+
+ VA_START(ap, format);
+ VA_SHIFT(ap, str, char *);
+ VA_SHIFT(ap, size, size_t);
+ VA_SHIFT(ap, format, const char *);
+ len = vsnprintf(str, size, format, ap);
+ va_end(ap);
+ return len;
+}
+#endif /* !HAVE_SNPRINTF */
+
+#if !HAVE_ASPRINTF
+#if HAVE_STDARG_H
+int
+util_asprintf(char **ret, const char *format, ...)
+#else
+int
+util_asprintf(va_alist) va_dcl
+#endif /* HAVE_STDARG_H */
+{
+#if !HAVE_STDARG_H
+ char **ret;
+ char *format;
+#endif /* HAVE_STDARG_H */
+ va_list ap;
+ int len;
+
+ VA_START(ap, format);
+ VA_SHIFT(ap, ret, char **);
+ VA_SHIFT(ap, format, const char *);
+ len = vasprintf(ret, format, ap);
+ va_end(ap);
+ return len;
+}
+#endif /* !HAVE_ASPRINTF */
+#else /* Dummy declaration to avoid empty translation unit warnings. */
+int main(void);
+#endif /* !HAVE_SNPRINTF || !HAVE_VSNPRINTF || !HAVE_ASPRINTF || [...] */
+
+
+/* vim: set joinspaces textwidth=80: */
diff --git a/src/minigallium/auxiliary/util/u_split_prim.h b/src/minigallium/auxiliary/util/u_split_prim.h
new file mode 100644
index 0000000..7f80fc1
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_split_prim.h
@@ -0,0 +1,114 @@
+/* Originally written by Ben Skeggs for the nv50 driver*/
+
+#ifndef U_SPLIT_PRIM_H
+#define U_SPLIT_PRIM_H
+
+#include "pipe/p_defines.h"
+#include "pipe/p_compiler.h"
+
+#include "util/u_debug.h"
+
+struct util_split_prim {
+ void *priv;
+ void (*emit)(void *priv, unsigned start, unsigned count);
+ void (*edge)(void *priv, boolean enabled);
+
+ unsigned mode;
+ unsigned start;
+ unsigned p_start;
+ unsigned p_end;
+
+ uint repeat_first:1;
+ uint close_first:1;
+ uint edgeflag_off:1;
+};
+
+static INLINE void
+util_split_prim_init(struct util_split_prim *s,
+ unsigned mode, unsigned start, unsigned count)
+{
+ if (mode == PIPE_PRIM_LINE_LOOP) {
+ s->mode = PIPE_PRIM_LINE_STRIP;
+ s->close_first = 1;
+ } else {
+ s->mode = mode;
+ s->close_first = 0;
+ }
+ s->start = start;
+ s->p_start = start;
+ s->p_end = start + count;
+ s->edgeflag_off = 0;
+ s->repeat_first = 0;
+}
+
+static INLINE boolean
+util_split_prim_next(struct util_split_prim *s, unsigned max_verts)
+{
+ int repeat = 0;
+
+ if (s->repeat_first) {
+ s->emit(s->priv, s->start, 1);
+ max_verts--;
+ if (s->edgeflag_off) {
+ s->edge(s->priv, TRUE);
+ s->edgeflag_off = FALSE;
+ }
+ }
+
+ if ((s->p_end - s->p_start) + s->close_first <= max_verts) {
+ s->emit(s->priv, s->p_start, s->p_end - s->p_start);
+ if (s->close_first)
+ s->emit(s->priv, s->start, 1);
+ return TRUE;
+ }
+
+ switch (s->mode) {
+ case PIPE_PRIM_LINES:
+ max_verts &= ~1;
+ break;
+ case PIPE_PRIM_LINE_STRIP:
+ repeat = 1;
+ break;
+ case PIPE_PRIM_POLYGON:
+ max_verts--;
+ s->emit(s->priv, s->p_start, max_verts);
+ s->edge(s->priv, FALSE);
+ s->emit(s->priv, s->p_start + max_verts, 1);
+ s->p_start += max_verts;
+ s->repeat_first = TRUE;
+ s->edgeflag_off = TRUE;
+ return FALSE;
+ case PIPE_PRIM_TRIANGLES:
+ max_verts = max_verts - (max_verts % 3);
+ break;
+ case PIPE_PRIM_TRIANGLE_STRIP:
+ /* to ensure winding stays correct, always split
+ * on an even number of generated triangles
+ */
+ max_verts = max_verts & ~1;
+ repeat = 2;
+ break;
+ case PIPE_PRIM_TRIANGLE_FAN:
+ s->repeat_first = TRUE;
+ repeat = 1;
+ break;
+ case PIPE_PRIM_QUADS:
+ max_verts &= ~3;
+ break;
+ case PIPE_PRIM_QUAD_STRIP:
+ max_verts &= ~1;
+ repeat = 2;
+ break;
+ case PIPE_PRIM_POINTS:
+ break;
+ default:
+ /* TODO: implement adjacency primitives */
+ assert(0);
+ }
+
+ s->emit (s->priv, s->p_start, max_verts);
+ s->p_start += (max_verts - repeat);
+ return FALSE;
+}
+
+#endif /* U_SPLIT_PRIM_H */
diff --git a/src/minigallium/auxiliary/util/u_sse.h b/src/minigallium/auxiliary/util/u_sse.h
new file mode 100644
index 0000000..d100c47
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_sse.h
@@ -0,0 +1,260 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * SSE intrinsics portability header.
+ *
+ * Although the SSE intrinsics are support by all modern x86 and x86-64
+ * compilers, there are some intrisincs missing in some implementations
+ * (especially older MSVC versions). This header abstracts that away.
+ */
+
+#ifndef U_SSE_H_
+#define U_SSE_H_
+
+#include "pipe/p_config.h"
+
+#if defined(PIPE_ARCH_SSE)
+
+#include <emmintrin.h>
+
+
+/* MSVC before VC8 does not support the _mm_castxxx_yyy */
+#if defined(_MSC_VER) && _MSC_VER < 1500
+
+union __declspec(align(16)) m128_types {
+ __m128 m128;
+ __m128i m128i;
+ __m128d m128d;
+};
+
+static __inline __m128
+_mm_castsi128_ps(__m128i a)
+{
+ union m128_types u;
+ u.m128i = a;
+ return u.m128;
+}
+
+static __inline __m128i
+_mm_castps_si128(__m128 a)
+{
+ union m128_types u;
+ u.m128 = a;
+ return u.m128i;
+}
+
+#endif /* defined(_MSC_VER) && _MSC_VER < 1500 */
+
+union m128i {
+ __m128i m;
+ ubyte ub[16];
+ ushort us[8];
+ uint ui[4];
+};
+
+static INLINE void u_print_epi8(const char *name, __m128i r)
+{
+ union { __m128i m; ubyte ub[16]; } u;
+ u.m = r;
+
+ debug_printf("%s: "
+ "%02x/"
+ "%02x/"
+ "%02x/"
+ "%02x/"
+ "%02x/"
+ "%02x/"
+ "%02x/"
+ "%02x/"
+ "%02x/"
+ "%02x/"
+ "%02x/"
+ "%02x/"
+ "%02x/"
+ "%02x/"
+ "%02x/"
+ "%02x\n",
+ name,
+ u.ub[0], u.ub[1], u.ub[2], u.ub[3],
+ u.ub[4], u.ub[5], u.ub[6], u.ub[7],
+ u.ub[8], u.ub[9], u.ub[10], u.ub[11],
+ u.ub[12], u.ub[13], u.ub[14], u.ub[15]);
+}
+
+static INLINE void u_print_epi16(const char *name, __m128i r)
+{
+ union { __m128i m; ushort us[8]; } u;
+ u.m = r;
+
+ debug_printf("%s: "
+ "%04x/"
+ "%04x/"
+ "%04x/"
+ "%04x/"
+ "%04x/"
+ "%04x/"
+ "%04x/"
+ "%04x\n",
+ name,
+ u.us[0], u.us[1], u.us[2], u.us[3],
+ u.us[4], u.us[5], u.us[6], u.us[7]);
+}
+
+static INLINE void u_print_epi32(const char *name, __m128i r)
+{
+ union { __m128i m; uint ui[4]; } u;
+ u.m = r;
+
+ debug_printf("%s: "
+ "%08x/"
+ "%08x/"
+ "%08x/"
+ "%08x\n",
+ name,
+ u.ui[0], u.ui[1], u.ui[2], u.ui[3]);
+}
+
+static INLINE void u_print_ps(const char *name, __m128 r)
+{
+ union { __m128 m; float f[4]; } u;
+ u.m = r;
+
+ debug_printf("%s: "
+ "%f/"
+ "%f/"
+ "%f/"
+ "%f\n",
+ name,
+ u.f[0], u.f[1], u.f[2], u.f[3]);
+}
+
+
+#define U_DUMP_EPI32(a) u_print_epi32(#a, a)
+#define U_DUMP_EPI16(a) u_print_epi16(#a, a)
+#define U_DUMP_EPI8(a) u_print_epi8(#a, a)
+#define U_DUMP_PS(a) u_print_ps(#a, a)
+
+
+
+#if defined(PIPE_ARCH_SSSE3)
+
+#include <tmmintrin.h>
+
+#else /* !PIPE_ARCH_SSSE3 */
+
+/**
+ * Describe _mm_shuffle_epi8() with gcc extended inline assembly, for cases
+ * where -mssse3 is not supported/enabled.
+ *
+ * MSVC will never get in here as its intrinsics support do not rely on
+ * compiler command line options.
+ */
+static __inline __m128i
+#ifdef __clang__
+ __attribute__((__always_inline__, __nodebug__))
+#else
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+#endif
+_mm_shuffle_epi8(__m128i a, __m128i mask)
+{
+ __m128i result;
+ __asm__("pshufb %1, %0"
+ : "=x" (result)
+ : "xm" (mask), "0" (a));
+ return result;
+}
+
+#endif /* !PIPE_ARCH_SSSE3 */
+
+
+
+
+/* Provide an SSE2 implementation of _mm_mullo_epi32() in terms of
+ * _mm_mul_epu32().
+ *
+ * I suspect this works fine for us because one of our operands is
+ * always positive, but not sure that this can be used for general
+ * signed integer multiplication.
+ *
+ * This seems close enough to the speed of SSE4 and the real
+ * _mm_mullo_epi32() intrinsic as to not justify adding an sse4
+ * dependency at this point.
+ */
+static INLINE __m128i mm_mullo_epi32(const __m128i a, const __m128i b)
+{
+ __m128i a4 = _mm_srli_epi64(a, 32); /* shift by one dword */
+ __m128i b4 = _mm_srli_epi64(b, 32); /* shift by one dword */
+ __m128i ba = _mm_mul_epu32(b, a); /* multply dwords 0, 2 */
+ __m128i b4a4 = _mm_mul_epu32(b4, a4); /* multiply dwords 1, 3 */
+
+ /* Interleave the results, either with shuffles or (slightly
+ * faster) direct bit operations:
+ */
+#if 0
+ __m128i ba8 = _mm_shuffle_epi32(ba, 8);
+ __m128i b4a48 = _mm_shuffle_epi32(b4a4, 8);
+ __m128i result = _mm_unpacklo_epi32(ba8, b4a48);
+#else
+ __m128i mask = _mm_setr_epi32(~0,0,~0,0);
+ __m128i ba_mask = _mm_and_si128(ba, mask);
+ __m128i b4a4_mask_shift = _mm_slli_epi64(b4a4, 32);
+ __m128i result = _mm_or_si128(ba_mask, b4a4_mask_shift);
+#endif
+
+ return result;
+}
+
+
+static INLINE void
+transpose4_epi32(const __m128i * restrict a,
+ const __m128i * restrict b,
+ const __m128i * restrict c,
+ const __m128i * restrict d,
+ __m128i * restrict o,
+ __m128i * restrict p,
+ __m128i * restrict q,
+ __m128i * restrict r)
+{
+ __m128i t0 = _mm_unpacklo_epi32(*a, *b);
+ __m128i t1 = _mm_unpacklo_epi32(*c, *d);
+ __m128i t2 = _mm_unpackhi_epi32(*a, *b);
+ __m128i t3 = _mm_unpackhi_epi32(*c, *d);
+
+ *o = _mm_unpacklo_epi64(t0, t1);
+ *p = _mm_unpackhi_epi64(t0, t1);
+ *q = _mm_unpacklo_epi64(t2, t3);
+ *r = _mm_unpackhi_epi64(t2, t3);
+}
+
+#define SCALAR_EPI32(m, i) _mm_shuffle_epi32((m), _MM_SHUFFLE(i,i,i,i))
+
+
+#endif /* PIPE_ARCH_SSE */
+
+#endif /* U_SSE_H_ */
diff --git a/src/minigallium/auxiliary/util/u_staging.c b/src/minigallium/auxiliary/util/u_staging.c
new file mode 100644
index 0000000..b569c8f
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_staging.c
@@ -0,0 +1,132 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "util/u_staging.h"
+#include "pipe/p_context.h"
+#include "util/u_memory.h"
+#include "util/u_inlines.h"
+
+static void
+util_staging_resource_template(struct pipe_resource *pt, unsigned width, unsigned height, unsigned depth, struct pipe_resource *template)
+{
+ memset(template, 0, sizeof(struct pipe_resource));
+ if(pt->target != PIPE_BUFFER && depth <= 1)
+ template->target = PIPE_TEXTURE_RECT;
+ else
+ template->target = pt->target;
+ template->format = pt->format;
+ template->width0 = width;
+ template->height0 = height;
+ template->depth0 = depth;
+ template->array_size = 1;
+ template->last_level = 0;
+ template->nr_samples = pt->nr_samples;
+ template->bind = 0;
+ template->usage = PIPE_USAGE_STAGING;
+ template->flags = 0;
+}
+
+struct util_staging_transfer *
+util_staging_transfer_init(struct pipe_context *pipe,
+ struct pipe_resource *pt,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box,
+ boolean direct, struct util_staging_transfer *tx)
+{
+ struct pipe_screen *pscreen = pipe->screen;
+
+ struct pipe_resource staging_resource_template;
+
+ pipe_resource_reference(&tx->base.resource, pt);
+ tx->base.level = level;
+ tx->base.usage = usage;
+ tx->base.box = *box;
+
+ if (direct)
+ {
+ tx->staging_resource = pt;
+ return tx;
+ }
+
+ util_staging_resource_template(pt, box->width, box->height, box->depth, &staging_resource_template);
+ tx->staging_resource = pscreen->resource_create(pscreen, &staging_resource_template);
+ if (!tx->staging_resource)
+ {
+ pipe_resource_reference(&tx->base.resource, NULL);
+ FREE(tx);
+ return NULL;
+ }
+
+ if (usage & PIPE_TRANSFER_READ)
+ {
+ /* XXX this looks wrong dst is always the same but looping over src z? */
+ int zi;
+ struct pipe_box sbox;
+ sbox.x = box->x;
+ sbox.y = box->y;
+ sbox.z = box->z;
+ sbox.width = box->width;
+ sbox.height = box->height;
+ sbox.depth = 1;
+ for(zi = 0; zi < box->depth; ++zi) {
+ sbox.z = sbox.z + zi;
+ pipe->resource_copy_region(pipe, tx->staging_resource, 0, 0, 0, 0,
+ tx->base.resource, level, &sbox);
+ }
+ }
+
+ return tx;
+}
+
+void
+util_staging_transfer_destroy(struct pipe_context *pipe, struct pipe_transfer *ptx)
+{
+ struct util_staging_transfer *tx = (struct util_staging_transfer *)ptx;
+
+ if (tx->staging_resource != tx->base.resource)
+ {
+ if(tx->base.usage & PIPE_TRANSFER_WRITE) {
+ /* XXX this looks wrong src is always the same but looping over dst z? */
+ int zi;
+ struct pipe_box sbox;
+ sbox.x = 0;
+ sbox.y = 0;
+ sbox.z = 0;
+ sbox.width = tx->base.box.width;
+ sbox.height = tx->base.box.height;
+ sbox.depth = 1;
+ for(zi = 0; zi < tx->base.box.depth; ++zi)
+ pipe->resource_copy_region(pipe, tx->base.resource, tx->base.level, tx->base.box.x, tx->base.box.y, tx->base.box.z + zi,
+ tx->staging_resource, 0, &sbox);
+ }
+
+ pipe_resource_reference(&tx->staging_resource, NULL);
+ }
+
+ pipe_resource_reference(&ptx->resource, NULL);
+ FREE(ptx);
+}
diff --git a/src/minigallium/auxiliary/util/u_staging.h b/src/minigallium/auxiliary/util/u_staging.h
new file mode 100644
index 0000000..ddbb334
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_staging.h
@@ -0,0 +1,63 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/* Direct3D 10/11 has no concept of transfers. Applications instead
+ * create resources with a STAGING or DYNAMIC usage, copy between them
+ * and the real resource and use Map to map the STAGING/DYNAMIC resource.
+ *
+ * This util module allows to implement Gallium drivers as a Direct3D
+ * driver would be implemented: transfers allocate a resource with
+ * PIPE_USAGE_STAGING, and copy the data between it and the real resource
+ * with resource_copy_region.
+ */
+
+#ifndef U_STAGING_H
+#define U_STAGING_H
+
+#include "pipe/p_state.h"
+
+struct util_staging_transfer {
+ struct pipe_transfer base;
+
+ /* if direct, same as base.resource, otherwise the temporary staging resource */
+ struct pipe_resource *staging_resource;
+};
+
+/* user must be stride, slice_stride and offset */
+/* pt->usage == PIPE_USAGE_DYNAMIC || pt->usage == PIPE_USAGE_STAGING should be a good value to pass for direct */
+/* staging resource is currently created with PIPE_USAGE_STAGING */
+struct util_staging_transfer *
+util_staging_transfer_init(struct pipe_context *pipe,
+ struct pipe_resource *pt,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box,
+ boolean direct, struct util_staging_transfer *tx);
+
+void
+util_staging_transfer_destroy(struct pipe_context *pipe, struct pipe_transfer *ptx);
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_string.h b/src/minigallium/auxiliary/util/u_string.h
new file mode 100644
index 0000000..fca73ff
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_string.h
@@ -0,0 +1,232 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Platform independent functions for string manipulation.
+ *
+ * @author Jose Fonseca <jrfonseca@tungstengraphics.com>
+ */
+
+#ifndef U_STRING_H_
+#define U_STRING_H_
+
+#if !defined(_MSC_VER) && !defined(XF86_LIBC_H)
+#include <stdio.h>
+#endif
+#include <stddef.h>
+#include <stdarg.h>
+
+#include "pipe/p_compiler.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef _GNU_SOURCE
+
+#define util_strchrnul strchrnul
+
+#else
+
+static INLINE char *
+util_strchrnul(const char *s, char c)
+{
+ for (; *s && *s != c; ++s);
+
+ return (char *)s;
+}
+
+#endif
+
+#ifdef _MSC_VER
+
+int util_vsnprintf(char *, size_t, const char *, va_list);
+int util_snprintf(char *str, size_t size, const char *format, ...);
+
+static INLINE void
+util_vsprintf(char *str, const char *format, va_list ap)
+{
+ util_vsnprintf(str, (size_t)-1, format, ap);
+}
+
+static INLINE void
+util_sprintf(char *str, const char *format, ...)
+{
+ va_list ap;
+ va_start(ap, format);
+ util_vsnprintf(str, (size_t)-1, format, ap);
+ va_end(ap);
+}
+
+static INLINE char *
+util_strchr(const char *s, char c)
+{
+ char *p = util_strchrnul(s, c);
+
+ return *p ? p : NULL;
+}
+
+static INLINE char*
+util_strncat(char *dst, const char *src, size_t n)
+{
+ char *p = dst + strlen(dst);
+ const char *q = src;
+ size_t i;
+
+ for (i = 0; i < n && *q != '\0'; ++i)
+ *p++ = *q++;
+ *p = '\0';
+
+ return dst;
+}
+
+static INLINE int
+util_strcmp(const char *s1, const char *s2)
+{
+ unsigned char u1, u2;
+
+ while (1) {
+ u1 = (unsigned char) *s1++;
+ u2 = (unsigned char) *s2++;
+ if (u1 != u2)
+ return u1 - u2;
+ if (u1 == '\0')
+ return 0;
+ }
+ return 0;
+}
+
+static INLINE int
+util_strncmp(const char *s1, const char *s2, size_t n)
+{
+ unsigned char u1, u2;
+
+ while (n-- > 0) {
+ u1 = (unsigned char) *s1++;
+ u2 = (unsigned char) *s2++;
+ if (u1 != u2)
+ return u1 - u2;
+ if (u1 == '\0')
+ return 0;
+ }
+ return 0;
+}
+
+static INLINE char *
+util_strstr(const char *haystack, const char *needle)
+{
+ const char *p = haystack;
+ size_t len = strlen(needle);
+
+ for (; (p = util_strchr(p, *needle)) != 0; p++) {
+ if (util_strncmp(p, needle, len) == 0) {
+ return (char *)p;
+ }
+ }
+ return NULL;
+}
+
+static INLINE void *
+util_memmove(void *dest, const void *src, size_t n)
+{
+ char *p = (char *)dest;
+ const char *q = (const char *)src;
+ if (dest < src) {
+ while (n--)
+ *p++ = *q++;
+ }
+ else
+ {
+ p += n;
+ q += n;
+ while (n--)
+ *--p = *--q;
+ }
+ return dest;
+}
+
+
+#else
+
+#define util_vsnprintf vsnprintf
+#define util_snprintf snprintf
+#define util_vsprintf vsprintf
+#define util_sprintf sprintf
+#define util_strchr strchr
+#define util_strcmp strcmp
+#define util_strncmp strncmp
+#define util_strncat strncat
+#define util_strstr strstr
+#define util_memmove memmove
+
+#endif
+
+
+/**
+ * Printable string buffer
+ */
+struct util_strbuf
+{
+ char *str;
+ char *ptr;
+ size_t left;
+};
+
+
+static INLINE void
+util_strbuf_init(struct util_strbuf *sbuf, char *str, size_t size)
+{
+ sbuf->str = str;
+ sbuf->str[0] = 0;
+ sbuf->ptr = sbuf->str;
+ sbuf->left = size;
+}
+
+
+static INLINE void
+util_strbuf_printf(struct util_strbuf *sbuf, const char *format, ...)
+{
+ if(sbuf->left > 1) {
+ size_t written;
+ va_list ap;
+ va_start(ap, format);
+ written = util_vsnprintf(sbuf->ptr, sbuf->left, format, ap);
+ va_end(ap);
+ sbuf->ptr += written;
+ sbuf->left -= written;
+ }
+}
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_STRING_H_ */
diff --git a/src/minigallium/auxiliary/util/u_suballoc.c b/src/minigallium/auxiliary/util/u_suballoc.c
new file mode 100644
index 0000000..efa9a0c
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_suballoc.c
@@ -0,0 +1,132 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * Copyright 2012 Marek Olšák <maraeo@gmail.com>
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/* A simple allocator that suballocates memory from a large buffer. */
+
+#include "pipe/p_defines.h"
+#include "util/u_inlines.h"
+#include "pipe/p_context.h"
+#include "util/u_memory.h"
+#include "util/u_math.h"
+
+#include "u_suballoc.h"
+
+
+struct u_suballocator {
+ struct pipe_context *pipe;
+
+ unsigned size; /* Size of the whole buffer, in bytes. */
+ unsigned alignment; /* Alignment of each sub-allocation. */
+ unsigned bind; /* Bitmask of PIPE_BIND_* flags. */
+ unsigned usage; /* One of PIPE_USAGE_* flags. */
+ boolean zero_buffer_memory; /* If the buffer contents should be zeroed. */
+
+ struct pipe_resource *buffer; /* The buffer we suballocate from. */
+ unsigned offset; /* Aligned offset pointing at the first unused byte. */
+};
+
+
+/**
+ * Create a suballocator.
+ *
+ * \p zero_buffer_memory determines whether the buffer contents should be
+ * cleared to 0 after the allocation.
+ */
+struct u_suballocator *
+u_suballocator_create(struct pipe_context *pipe, unsigned size,
+ unsigned alignment, unsigned bind, unsigned usage,
+ boolean zero_buffer_memory)
+{
+ struct u_suballocator *allocator = CALLOC_STRUCT(u_suballocator);
+ if (!allocator)
+ return NULL;
+
+ allocator->pipe = pipe;
+ allocator->size = align(size, alignment);
+ allocator->alignment = alignment;
+ allocator->bind = bind;
+ allocator->usage = usage;
+ allocator->zero_buffer_memory = zero_buffer_memory;
+ return allocator;
+}
+
+void
+u_suballocator_destroy(struct u_suballocator *allocator)
+{
+ pipe_resource_reference(&allocator->buffer, NULL);
+ FREE(allocator);
+}
+
+void
+u_suballocator_alloc(struct u_suballocator *allocator, unsigned size,
+ unsigned *out_offset, struct pipe_resource **outbuf)
+{
+ unsigned alloc_size = align(size, allocator->alignment);
+
+ /* Don't allow allocations larger than the buffer size. */
+ if (alloc_size > allocator->size)
+ goto fail;
+
+ /* Make sure we have enough space in the buffer. */
+ if (!allocator->buffer ||
+ allocator->offset + alloc_size > allocator->size) {
+ /* Allocate a new buffer. */
+ pipe_resource_reference(&allocator->buffer, NULL);
+ allocator->offset = 0;
+ allocator->buffer =
+ pipe_buffer_create(allocator->pipe->screen, allocator->bind,
+ allocator->usage, allocator->size);
+ if (!allocator->buffer)
+ goto fail;
+
+ /* Clear the memory if needed. */
+ if (allocator->zero_buffer_memory) {
+ struct pipe_transfer *transfer = NULL;
+ void *ptr;
+
+ ptr = pipe_buffer_map(allocator->pipe, allocator->buffer,
+ PIPE_TRANSFER_WRITE, &transfer);
+ memset(ptr, 0, allocator->size);
+ pipe_buffer_unmap(allocator->pipe, transfer);
+ }
+ }
+
+ assert(allocator->offset % allocator->alignment == 0);
+ assert(allocator->offset < allocator->buffer->width0);
+ assert(allocator->offset + alloc_size <= allocator->buffer->width0);
+
+ /* Return the buffer. */
+ *out_offset = allocator->offset;
+ pipe_resource_reference(outbuf, allocator->buffer);
+
+ allocator->offset += alloc_size;
+ return;
+
+fail:
+ pipe_resource_reference(outbuf, NULL);
+}
diff --git a/src/minigallium/auxiliary/util/u_suballoc.h b/src/minigallium/auxiliary/util/u_suballoc.h
new file mode 100644
index 0000000..1f5550f
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_suballoc.h
@@ -0,0 +1,48 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * Copyright 2012 Marek Olšák <maraeo@gmail.com>
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/* A simple allocator that suballocates memory from a large buffer. */
+
+#ifndef U_SUBALLOC
+#define U_SUBALLOC
+
+struct u_suballocator;
+
+struct u_suballocator *
+u_suballocator_create(struct pipe_context *pipe, unsigned size,
+ unsigned alignment, unsigned bind, unsigned usage,
+ boolean zero_buffer_memory);
+
+void
+u_suballocator_destroy(struct u_suballocator *allocator);
+
+void
+u_suballocator_alloc(struct u_suballocator *allocator, unsigned size,
+ unsigned *out_offset, struct pipe_resource **outbuf);
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_surface.c b/src/minigallium/auxiliary/util/u_surface.c
new file mode 100644
index 0000000..07997d2
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_surface.c
@@ -0,0 +1,684 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Surface utility functions.
+ *
+ * @author Brian Paul
+ */
+
+
+#include "pipe/p_defines.h"
+#include "pipe/p_screen.h"
+#include "pipe/p_state.h"
+
+#include "util/u_format.h"
+#include "util/u_inlines.h"
+#include "util/u_rect.h"
+#include "util/u_surface.h"
+#include "util/u_pack_color.h"
+
+
+/**
+ * Initialize a pipe_surface object. 'view' is considered to have
+ * uninitialized contents.
+ */
+void
+u_surface_default_template(struct pipe_surface *surf,
+ const struct pipe_resource *texture)
+{
+ memset(surf, 0, sizeof(*surf));
+
+ surf->format = texture->format;
+}
+
+
+/**
+ * Copy 2D rect from one place to another.
+ * Position and sizes are in pixels.
+ * src_stride may be negative to do vertical flip of pixels from source.
+ */
+void
+util_copy_rect(ubyte * dst,
+ enum pipe_format format,
+ unsigned dst_stride,
+ unsigned dst_x,
+ unsigned dst_y,
+ unsigned width,
+ unsigned height,
+ const ubyte * src,
+ int src_stride,
+ unsigned src_x,
+ unsigned src_y)
+{
+ unsigned i;
+ int src_stride_pos = src_stride < 0 ? -src_stride : src_stride;
+ int blocksize = util_format_get_blocksize(format);
+ int blockwidth = util_format_get_blockwidth(format);
+ int blockheight = util_format_get_blockheight(format);
+
+ assert(blocksize > 0);
+ assert(blockwidth > 0);
+ assert(blockheight > 0);
+
+ dst_x /= blockwidth;
+ dst_y /= blockheight;
+ width = (width + blockwidth - 1)/blockwidth;
+ height = (height + blockheight - 1)/blockheight;
+ src_x /= blockwidth;
+ src_y /= blockheight;
+
+ dst += dst_x * blocksize;
+ src += src_x * blocksize;
+ dst += dst_y * dst_stride;
+ src += src_y * src_stride_pos;
+ width *= blocksize;
+
+ if (width == dst_stride && width == src_stride)
+ memcpy(dst, src, height * width);
+ else {
+ for (i = 0; i < height; i++) {
+ memcpy(dst, src, width);
+ dst += dst_stride;
+ src += src_stride;
+ }
+ }
+}
+
+
+/**
+ * Copy 3D box from one place to another.
+ * Position and sizes are in pixels.
+ */
+void
+util_copy_box(ubyte * dst,
+ enum pipe_format format,
+ unsigned dst_stride, unsigned dst_slice_stride,
+ unsigned dst_x, unsigned dst_y, unsigned dst_z,
+ unsigned width, unsigned height, unsigned depth,
+ const ubyte * src,
+ int src_stride, unsigned src_slice_stride,
+ unsigned src_x, unsigned src_y, unsigned src_z)
+{
+ unsigned z;
+ dst += dst_z * dst_slice_stride;
+ src += src_z * src_slice_stride;
+ for (z = 0; z < depth; ++z) {
+ util_copy_rect(dst,
+ format,
+ dst_stride,
+ dst_x, dst_y,
+ width, height,
+ src,
+ src_stride,
+ src_x, src_y);
+
+ dst += dst_slice_stride;
+ src += src_slice_stride;
+ }
+}
+
+
+void
+util_fill_rect(ubyte * dst,
+ enum pipe_format format,
+ unsigned dst_stride,
+ unsigned dst_x,
+ unsigned dst_y,
+ unsigned width,
+ unsigned height,
+ union util_color *uc)
+{
+ const struct util_format_description *desc = util_format_description(format);
+ unsigned i, j;
+ unsigned width_size;
+ int blocksize = desc->block.bits / 8;
+ int blockwidth = desc->block.width;
+ int blockheight = desc->block.height;
+
+ assert(blocksize > 0);
+ assert(blockwidth > 0);
+ assert(blockheight > 0);
+
+ dst_x /= blockwidth;
+ dst_y /= blockheight;
+ width = (width + blockwidth - 1)/blockwidth;
+ height = (height + blockheight - 1)/blockheight;
+
+ dst += dst_x * blocksize;
+ dst += dst_y * dst_stride;
+ width_size = width * blocksize;
+
+ switch (blocksize) {
+ case 1:
+ if(dst_stride == width_size)
+ memset(dst, uc->ub, height * width_size);
+ else {
+ for (i = 0; i < height; i++) {
+ memset(dst, uc->ub, width_size);
+ dst += dst_stride;
+ }
+ }
+ break;
+ case 2:
+ for (i = 0; i < height; i++) {
+ uint16_t *row = (uint16_t *)dst;
+ for (j = 0; j < width; j++)
+ *row++ = uc->us;
+ dst += dst_stride;
+ }
+ break;
+ case 4:
+ for (i = 0; i < height; i++) {
+ uint32_t *row = (uint32_t *)dst;
+ for (j = 0; j < width; j++)
+ *row++ = uc->ui;
+ dst += dst_stride;
+ }
+ break;
+ default:
+ for (i = 0; i < height; i++) {
+ ubyte *row = dst;
+ for (j = 0; j < width; j++) {
+ memcpy(row, uc, blocksize);
+ row += blocksize;
+ }
+ dst += dst_stride;
+ }
+ break;
+ }
+}
+
+
+void
+util_fill_box(ubyte * dst,
+ enum pipe_format format,
+ unsigned stride,
+ unsigned layer_stride,
+ unsigned x,
+ unsigned y,
+ unsigned z,
+ unsigned width,
+ unsigned height,
+ unsigned depth,
+ union util_color *uc)
+{
+ unsigned layer;
+ dst += z * layer_stride;
+ for (layer = z; layer < depth; layer++) {
+ util_fill_rect(dst, format,
+ stride,
+ x, y, width, height, uc);
+ dst += layer_stride;
+ }
+}
+
+
+/**
+ * Fallback function for pipe->resource_copy_region().
+ * Note: (X,Y)=(0,0) is always the upper-left corner.
+ */
+void
+util_resource_copy_region(struct pipe_context *pipe,
+ struct pipe_resource *dst,
+ unsigned dst_level,
+ unsigned dst_x, unsigned dst_y, unsigned dst_z,
+ struct pipe_resource *src,
+ unsigned src_level,
+ const struct pipe_box *src_box)
+{
+ struct pipe_transfer *src_trans, *dst_trans;
+ uint8_t *dst_map;
+ const uint8_t *src_map;
+ enum pipe_format src_format, dst_format;
+ struct pipe_box dst_box;
+
+ assert(src && dst);
+ if (!src || !dst)
+ return;
+
+ assert((src->target == PIPE_BUFFER && dst->target == PIPE_BUFFER) ||
+ (src->target != PIPE_BUFFER && dst->target != PIPE_BUFFER));
+
+ src_format = src->format;
+ dst_format = dst->format;
+
+ assert(util_format_get_blocksize(dst_format) == util_format_get_blocksize(src_format));
+ assert(util_format_get_blockwidth(dst_format) == util_format_get_blockwidth(src_format));
+ assert(util_format_get_blockheight(dst_format) == util_format_get_blockheight(src_format));
+
+ src_map = pipe->transfer_map(pipe,
+ src,
+ src_level,
+ PIPE_TRANSFER_READ,
+ src_box, &src_trans);
+ assert(src_map);
+ if (!src_map) {
+ goto no_src_map;
+ }
+
+ dst_box.x = dst_x;
+ dst_box.y = dst_y;
+ dst_box.z = dst_z;
+ dst_box.width = src_box->width;
+ dst_box.height = src_box->height;
+ dst_box.depth = src_box->depth;
+
+ dst_map = pipe->transfer_map(pipe,
+ dst,
+ dst_level,
+ PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE,
+ &dst_box, &dst_trans);
+ assert(dst_map);
+ if (!dst_map) {
+ goto no_dst_map;
+ }
+
+ if (dst->target == PIPE_BUFFER && src->target == PIPE_BUFFER) {
+ assert(src_box->height == 1);
+ assert(src_box->depth == 1);
+ memcpy(dst_map, src_map, src_box->width);
+ } else {
+ util_copy_box(dst_map,
+ dst_format,
+ dst_trans->stride, dst_trans->layer_stride,
+ 0, 0, 0,
+ src_box->width, src_box->height, src_box->depth,
+ src_map,
+ src_trans->stride, src_trans->layer_stride,
+ 0, 0, 0);
+ }
+
+ pipe->transfer_unmap(pipe, dst_trans);
+no_dst_map:
+ pipe->transfer_unmap(pipe, src_trans);
+no_src_map:
+ ;
+}
+
+
+
+#define UBYTE_TO_USHORT(B) ((B) | ((B) << 8))
+
+
+/**
+ * Fallback for pipe->clear_render_target() function.
+ * XXX this looks too hackish to be really useful.
+ * cpp > 4 looks like a gross hack at best...
+ * Plus can't use these transfer fallbacks when clearing
+ * multisampled surfaces for instance.
+ * Clears all bound layers.
+ */
+void
+util_clear_render_target(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ const union pipe_color_union *color,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
+{
+ struct pipe_transfer *dst_trans;
+ ubyte *dst_map;
+ union util_color uc;
+ unsigned max_layer;
+
+ assert(dst->texture);
+ if (!dst->texture)
+ return;
+
+ if (dst->texture->target == PIPE_BUFFER) {
+ /*
+ * The fill naturally works on the surface format, however
+ * the transfer uses resource format which is just bytes for buffers.
+ */
+ unsigned dx, w;
+ unsigned pixstride = util_format_get_blocksize(dst->format);
+ dx = (dst->u.buf.first_element + dstx) * pixstride;
+ w = width * pixstride;
+ max_layer = 0;
+ dst_map = pipe_transfer_map(pipe,
+ dst->texture,
+ 0, 0,
+ PIPE_TRANSFER_WRITE,
+ dx, 0, w, 1,
+ &dst_trans);
+ }
+ else {
+ max_layer = dst->u.tex.last_layer - dst->u.tex.first_layer;
+ dst_map = pipe_transfer_map_3d(pipe,
+ dst->texture,
+ dst->u.tex.level,
+ PIPE_TRANSFER_WRITE,
+ dstx, dsty, dst->u.tex.first_layer,
+ width, height, max_layer + 1, &dst_trans);
+ }
+
+ assert(dst_map);
+
+ if (dst_map) {
+ enum pipe_format format = dst->format;
+ assert(dst_trans->stride > 0);
+
+ if (util_format_is_pure_integer(format)) {
+ /*
+ * We expect int/uint clear values here, though some APIs
+ * might disagree (but in any case util_pack_color()
+ * couldn't handle it)...
+ */
+ if (util_format_is_pure_sint(format)) {
+ util_format_write_4i(format, color->i, 0, &uc, 0, 0, 0, 1, 1);
+ }
+ else {
+ assert(util_format_is_pure_uint(format));
+ util_format_write_4ui(format, color->ui, 0, &uc, 0, 0, 0, 1, 1);
+ }
+ }
+ else {
+ util_pack_color(color->f, dst->format, &uc);
+ }
+
+ util_fill_box(dst_map, dst->format,
+ dst_trans->stride, dst_trans->layer_stride,
+ 0, 0, 0, width, height, max_layer + 1, &uc);
+
+ pipe->transfer_unmap(pipe, dst_trans);
+ }
+}
+
+/**
+ * Fallback for pipe->clear_stencil() function.
+ * sw fallback doesn't look terribly useful here.
+ * Plus can't use these transfer fallbacks when clearing
+ * multisampled surfaces for instance.
+ * Clears all bound layers.
+ */
+void
+util_clear_depth_stencil(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ unsigned clear_flags,
+ double depth,
+ unsigned stencil,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
+{
+ enum pipe_format format = dst->format;
+ struct pipe_transfer *dst_trans;
+ ubyte *dst_map;
+ boolean need_rmw = FALSE;
+ unsigned max_layer, layer;
+
+ if ((clear_flags & PIPE_CLEAR_DEPTHSTENCIL) &&
+ ((clear_flags & PIPE_CLEAR_DEPTHSTENCIL) != PIPE_CLEAR_DEPTHSTENCIL) &&
+ util_format_is_depth_and_stencil(format))
+ need_rmw = TRUE;
+
+ assert(dst->texture);
+ if (!dst->texture)
+ return;
+
+ max_layer = dst->u.tex.last_layer - dst->u.tex.first_layer;
+ dst_map = pipe_transfer_map_3d(pipe,
+ dst->texture,
+ dst->u.tex.level,
+ (need_rmw ? PIPE_TRANSFER_READ_WRITE :
+ PIPE_TRANSFER_WRITE),
+ dstx, dsty, dst->u.tex.first_layer,
+ width, height, max_layer + 1, &dst_trans);
+ assert(dst_map);
+
+ if (dst_map) {
+ unsigned dst_stride = dst_trans->stride;
+ uint64_t zstencil = util_pack64_z_stencil(format, depth, stencil);
+ ubyte *dst_layer = dst_map;
+ unsigned i, j;
+ assert(dst_trans->stride > 0);
+
+ for (layer = 0; layer <= max_layer; layer++) {
+ dst_map = dst_layer;
+
+ switch (util_format_get_blocksize(format)) {
+ case 1:
+ assert(format == PIPE_FORMAT_S8_UINT);
+ if(dst_stride == width)
+ memset(dst_map, (uint8_t) zstencil, height * width);
+ else {
+ for (i = 0; i < height; i++) {
+ memset(dst_map, (uint8_t) zstencil, width);
+ dst_map += dst_stride;
+ }
+ }
+ break;
+ case 2:
+ assert(format == PIPE_FORMAT_Z16_UNORM);
+ for (i = 0; i < height; i++) {
+ uint16_t *row = (uint16_t *)dst_map;
+ for (j = 0; j < width; j++)
+ *row++ = (uint16_t) zstencil;
+ dst_map += dst_stride;
+ }
+ break;
+ case 4:
+ if (!need_rmw) {
+ for (i = 0; i < height; i++) {
+ uint32_t *row = (uint32_t *)dst_map;
+ for (j = 0; j < width; j++)
+ *row++ = (uint32_t) zstencil;
+ dst_map += dst_stride;
+ }
+ }
+ else {
+ uint32_t dst_mask;
+ if (format == PIPE_FORMAT_Z24_UNORM_S8_UINT)
+ dst_mask = 0x00ffffff;
+ else {
+ assert(format == PIPE_FORMAT_S8_UINT_Z24_UNORM);
+ dst_mask = 0xffffff00;
+ }
+ if (clear_flags & PIPE_CLEAR_DEPTH)
+ dst_mask = ~dst_mask;
+ for (i = 0; i < height; i++) {
+ uint32_t *row = (uint32_t *)dst_map;
+ for (j = 0; j < width; j++) {
+ uint32_t tmp = *row & dst_mask;
+ *row++ = tmp | ((uint32_t) zstencil & ~dst_mask);
+ }
+ dst_map += dst_stride;
+ }
+ }
+ break;
+ case 8:
+ if (!need_rmw) {
+ for (i = 0; i < height; i++) {
+ uint64_t *row = (uint64_t *)dst_map;
+ for (j = 0; j < width; j++)
+ *row++ = zstencil;
+ dst_map += dst_stride;
+ }
+ }
+ else {
+ uint64_t src_mask;
+
+ if (clear_flags & PIPE_CLEAR_DEPTH)
+ src_mask = 0x00000000ffffffffull;
+ else
+ src_mask = 0x000000ff00000000ull;
+
+ for (i = 0; i < height; i++) {
+ uint64_t *row = (uint64_t *)dst_map;
+ for (j = 0; j < width; j++) {
+ uint64_t tmp = *row & ~src_mask;
+ *row++ = tmp | (zstencil & src_mask);
+ }
+ dst_map += dst_stride;
+ }
+ }
+ break;
+ default:
+ assert(0);
+ break;
+ }
+ dst_layer += dst_trans->layer_stride;
+ }
+
+ pipe->transfer_unmap(pipe, dst_trans);
+ }
+}
+
+
+/* Return if the box is totally inside the resource.
+ */
+static boolean
+is_box_inside_resource(const struct pipe_resource *res,
+ const struct pipe_box *box,
+ unsigned level)
+{
+ unsigned width = 1, height = 1, depth = 1;
+
+ switch (res->target) {
+ case PIPE_BUFFER:
+ width = res->width0;
+ height = 1;
+ depth = 1;
+ break;
+ case PIPE_TEXTURE_1D:
+ width = u_minify(res->width0, level);
+ height = 1;
+ depth = 1;
+ break;
+ case PIPE_TEXTURE_2D:
+ case PIPE_TEXTURE_RECT:
+ width = u_minify(res->width0, level);
+ height = u_minify(res->height0, level);
+ depth = 1;
+ break;
+ case PIPE_TEXTURE_3D:
+ width = u_minify(res->width0, level);
+ height = u_minify(res->height0, level);
+ depth = u_minify(res->depth0, level);
+ break;
+ case PIPE_TEXTURE_CUBE:
+ width = u_minify(res->width0, level);
+ height = u_minify(res->height0, level);
+ depth = 6;
+ break;
+ case PIPE_TEXTURE_1D_ARRAY:
+ width = u_minify(res->width0, level);
+ height = 1;
+ depth = res->array_size;
+ break;
+ case PIPE_TEXTURE_2D_ARRAY:
+ width = u_minify(res->width0, level);
+ height = u_minify(res->height0, level);
+ depth = res->array_size;
+ break;
+ case PIPE_TEXTURE_CUBE_ARRAY:
+ width = u_minify(res->width0, level);
+ height = u_minify(res->height0, level);
+ depth = res->array_size;
+ assert(res->array_size % 6 == 0);
+ break;
+ case PIPE_MAX_TEXTURE_TYPES:;
+ }
+
+ return box->x >= 0 &&
+ box->x + box->width <= (int) width &&
+ box->y >= 0 &&
+ box->y + box->height <= (int) height &&
+ box->z >= 0 &&
+ box->z + box->depth <= (int) depth;
+}
+
+static unsigned
+get_sample_count(const struct pipe_resource *res)
+{
+ return res->nr_samples ? res->nr_samples : 1;
+}
+
+/**
+ * Try to do a blit using resource_copy_region. The function calls
+ * resource_copy_region if the blit description is compatible with it.
+ *
+ * It returns TRUE if the blit was done using resource_copy_region.
+ *
+ * It returns FALSE otherwise and the caller must fall back to a more generic
+ * codepath for the blit operation. (e.g. by using u_blitter)
+ */
+boolean
+util_try_blit_via_copy_region(struct pipe_context *ctx,
+ const struct pipe_blit_info *blit)
+{
+ unsigned mask = util_format_get_mask(blit->dst.format);
+
+ /* No format conversions. */
+ if (blit->src.resource->format != blit->src.format ||
+ blit->dst.resource->format != blit->dst.format ||
+ !util_is_format_compatible(
+ util_format_description(blit->src.resource->format),
+ util_format_description(blit->dst.resource->format))) {
+ return FALSE;
+ }
+
+ /* No masks, no filtering, no scissor. */
+ if ((blit->mask & mask) != mask ||
+ blit->filter != PIPE_TEX_FILTER_NEAREST ||
+ blit->scissor_enable) {
+ return FALSE;
+ }
+
+ /* No flipping. */
+ if (blit->src.box.width < 0 ||
+ blit->src.box.height < 0 ||
+ blit->src.box.depth < 0) {
+ return FALSE;
+ }
+
+ /* No scaling. */
+ if (blit->src.box.width != blit->dst.box.width ||
+ blit->src.box.height != blit->dst.box.height ||
+ blit->src.box.depth != blit->dst.box.depth) {
+ return FALSE;
+ }
+
+ /* No out-of-bounds access. */
+ if (!is_box_inside_resource(blit->src.resource, &blit->src.box,
+ blit->src.level) ||
+ !is_box_inside_resource(blit->dst.resource, &blit->dst.box,
+ blit->dst.level)) {
+ return FALSE;
+ }
+
+ /* Sample counts must match. */
+ if (get_sample_count(blit->src.resource) !=
+ get_sample_count(blit->dst.resource)) {
+ return FALSE;
+ }
+
+ ctx->resource_copy_region(ctx, blit->dst.resource, blit->dst.level,
+ blit->dst.box.x, blit->dst.box.y, blit->dst.box.z,
+ blit->src.resource, blit->src.level,
+ &blit->src.box);
+ return TRUE;
+}
diff --git a/src/minigallium/auxiliary/util/u_surface.h b/src/minigallium/auxiliary/util/u_surface.h
new file mode 100644
index 0000000..bfd8f40
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_surface.h
@@ -0,0 +1,111 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#ifndef U_SURFACE_H
+#define U_SURFACE_H
+
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_state.h"
+
+#include "util/u_pack_color.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+extern void
+u_surface_default_template(struct pipe_surface *view,
+ const struct pipe_resource *texture);
+
+extern void
+util_copy_rect(ubyte * dst, enum pipe_format format,
+ unsigned dst_stride, unsigned dst_x, unsigned dst_y,
+ unsigned width, unsigned height, const ubyte * src,
+ int src_stride, unsigned src_x, unsigned src_y);
+
+extern void
+util_copy_box(ubyte * dst,
+ enum pipe_format format,
+ unsigned dst_stride, unsigned dst_slice_stride,
+ unsigned dst_x, unsigned dst_y, unsigned dst_z,
+ unsigned width, unsigned height, unsigned depth,
+ const ubyte * src,
+ int src_stride, unsigned src_slice_stride,
+ unsigned src_x, unsigned src_y, unsigned src_z);
+
+extern void
+util_fill_rect(ubyte * dst, enum pipe_format format,
+ unsigned dst_stride, unsigned dst_x, unsigned dst_y,
+ unsigned width, unsigned height, union util_color *uc);
+
+extern void
+util_fill_box(ubyte * dst, enum pipe_format format,
+ unsigned stride, unsigned layer_stride,
+ unsigned x, unsigned y, unsigned z,
+ unsigned width, unsigned height, unsigned depth,
+ union util_color *uc);
+
+
+extern void
+util_resource_copy_region(struct pipe_context *pipe,
+ struct pipe_resource *dst,
+ unsigned dst_level,
+ unsigned dst_x, unsigned dst_y, unsigned dst_z,
+ struct pipe_resource *src,
+ unsigned src_level,
+ const struct pipe_box *src_box);
+
+extern void
+util_clear_render_target(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ const union pipe_color_union *color,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height);
+
+extern void
+util_clear_depth_stencil(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ unsigned clear_flags,
+ double depth,
+ unsigned stencil,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height);
+
+extern boolean
+util_try_blit_via_copy_region(struct pipe_context *ctx,
+ const struct pipe_blit_info *blit);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* U_SURFACE_H */
diff --git a/src/minigallium/auxiliary/util/u_surfaces.c b/src/minigallium/auxiliary/util/u_surfaces.c
new file mode 100644
index 0000000..c2f2b74
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_surfaces.c
@@ -0,0 +1,124 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "u_surfaces.h"
+#include "util/u_hash_table.h"
+#include "util/u_inlines.h"
+#include "util/u_memory.h"
+
+boolean
+util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size,
+ struct pipe_context *ctx, struct pipe_resource *pt,
+ unsigned level, unsigned layer,
+ struct pipe_surface **res)
+{
+ struct pipe_surface *ps;
+
+ if(pt->target == PIPE_TEXTURE_3D || pt->target == PIPE_TEXTURE_CUBE)
+ { /* or 2D array */
+ if(!us->u.hash)
+ us->u.hash = cso_hash_create();
+
+ ps = cso_hash_iter_data(cso_hash_find(us->u.hash, (layer << 8) | level));
+ }
+ else
+ {
+ if(!us->u.array)
+ us->u.array = CALLOC(pt->last_level + 1, sizeof(struct pipe_surface *));
+ ps = us->u.array[level];
+ }
+
+ if(ps && ps->context == ctx)
+ {
+ p_atomic_inc(&ps->reference.count);
+ *res = ps;
+ return FALSE;
+ }
+
+ ps = (struct pipe_surface *)CALLOC(1, surface_struct_size);
+ if(!ps)
+ {
+ *res = NULL;
+ return FALSE;
+ }
+
+ pipe_surface_init(ctx, ps, pt, level, layer);
+
+ if(pt->target == PIPE_TEXTURE_3D || pt->target == PIPE_TEXTURE_CUBE)
+ cso_hash_insert(us->u.hash, (layer << 8) | level, ps);
+ else
+ us->u.array[level] = ps;
+
+ *res = ps;
+ return TRUE;
+}
+
+void
+util_surfaces_do_detach(struct util_surfaces *us, struct pipe_surface *ps)
+{
+ struct pipe_resource *pt = ps->texture;
+ if(pt->target == PIPE_TEXTURE_3D || pt->target == PIPE_TEXTURE_CUBE)
+ { /* or 2D array */
+ cso_hash_erase(us->u.hash, cso_hash_find(us->u.hash, (ps->u.tex.first_layer << 8) | ps->u.tex.level));
+ }
+ else
+ us->u.array[ps->u.tex.level] = 0;
+}
+
+void
+util_surfaces_destroy(struct util_surfaces *us, struct pipe_resource *pt, void (*destroy_surface) (struct pipe_surface *))
+{
+ if(pt->target == PIPE_TEXTURE_3D || pt->target == PIPE_TEXTURE_CUBE)
+ { /* or 2D array */
+ if(us->u.hash)
+ {
+ struct cso_hash_iter iter;
+ iter = cso_hash_first_node(us->u.hash);
+ while (!cso_hash_iter_is_null(iter)) {
+ destroy_surface(cso_hash_iter_data(iter));
+ iter = cso_hash_iter_next(iter);
+ }
+
+ cso_hash_delete(us->u.hash);
+ us->u.hash = NULL;
+ }
+ }
+ else
+ {
+ if(us->u.array)
+ {
+ unsigned i;
+ for(i = 0; i <= pt->last_level; ++i)
+ {
+ struct pipe_surface *ps = us->u.array[i];
+ if(ps)
+ destroy_surface(ps);
+ }
+ FREE(us->u.array);
+ us->u.array = NULL;
+ }
+ }
+}
diff --git a/src/minigallium/auxiliary/util/u_surfaces.h b/src/minigallium/auxiliary/util/u_surfaces.h
new file mode 100644
index 0000000..1605215
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_surfaces.h
@@ -0,0 +1,101 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_SURFACES_H_
+#define U_SURFACES_H_
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_state.h"
+#include "util/u_atomic.h"
+#include "cso_cache/cso_hash.h"
+
+struct util_surfaces
+{
+ union
+ {
+ struct cso_hash *hash;
+ struct pipe_surface **array;
+ void* pv;
+ } u;
+};
+
+/* Return value indicates if the pipe surface result is new */
+boolean
+util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size,
+ struct pipe_context *ctx, struct pipe_resource *pt,
+ unsigned level, unsigned layer,
+ struct pipe_surface **res);
+
+/* fast inline path for the very common case */
+static INLINE boolean
+util_surfaces_get(struct util_surfaces *us, unsigned surface_struct_size,
+ struct pipe_context *ctx, struct pipe_resource *pt,
+ unsigned level, unsigned layer,
+ struct pipe_surface **res)
+{
+ if(likely((pt->target == PIPE_TEXTURE_2D || pt->target == PIPE_TEXTURE_RECT) && us->u.array))
+ {
+ struct pipe_surface *ps = us->u.array[level];
+ if(ps && ps->context == ctx)
+ {
+ p_atomic_inc(&ps->reference.count);
+ *res = ps;
+ return FALSE;
+ }
+ }
+
+ return util_surfaces_do_get(us, surface_struct_size, ctx, pt, level, layer, res);
+}
+
+static INLINE struct pipe_surface *
+util_surfaces_peek(struct util_surfaces *us, struct pipe_resource *pt, unsigned level, unsigned layer)
+{
+ if(!us->u.pv)
+ return 0;
+
+ if(unlikely(pt->target == PIPE_TEXTURE_3D || pt->target == PIPE_TEXTURE_CUBE))
+ return cso_hash_iter_data(cso_hash_find(us->u.hash, (layer << 8) | level));
+ else
+ return us->u.array[level];
+}
+
+void util_surfaces_do_detach(struct util_surfaces *us, struct pipe_surface *ps);
+
+static INLINE void
+util_surfaces_detach(struct util_surfaces *us, struct pipe_surface *ps)
+{
+ if(likely(ps->texture->target == PIPE_TEXTURE_2D || ps->texture->target == PIPE_TEXTURE_RECT))
+ {
+ us->u.array[ps->u.tex.level] = 0;
+ return;
+ }
+
+ util_surfaces_do_detach(us, ps);
+}
+
+void util_surfaces_destroy(struct util_surfaces *us, struct pipe_resource *pt, void (*destroy_surface) (struct pipe_surface *));
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_texture.c b/src/minigallium/auxiliary/util/u_texture.c
new file mode 100644
index 0000000..d97e57a
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_texture.c
@@ -0,0 +1,103 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ * Copyright 2008 VMware, Inc. All rights reserved.
+ * Copyright 2009 Marek Olšák <maraeo@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Texture mapping utility functions.
+ *
+ * @author Brian Paul
+ * Marek Olšák
+ */
+
+#include "pipe/p_defines.h"
+
+#include "util/u_debug.h"
+#include "util/u_texture.h"
+
+void util_map_texcoords2d_onto_cubemap(unsigned face,
+ const float *in_st, unsigned in_stride,
+ float *out_str, unsigned out_stride)
+{
+ int i;
+ float rx, ry, rz;
+
+ /* loop over quad verts */
+ for (i = 0; i < 4; i++) {
+ /* Compute sc = +/-scale and tc = +/-scale.
+ * Not +/-1 to avoid cube face selection ambiguity near the edges,
+ * though that can still sometimes happen with this scale factor...
+ */
+ const float scale = 0.9999f;
+ const float sc = (2 * in_st[0] - 1) * scale;
+ const float tc = (2 * in_st[1] - 1) * scale;
+
+ switch (face) {
+ case PIPE_TEX_FACE_POS_X:
+ rx = 1;
+ ry = -tc;
+ rz = -sc;
+ break;
+ case PIPE_TEX_FACE_NEG_X:
+ rx = -1;
+ ry = -tc;
+ rz = sc;
+ break;
+ case PIPE_TEX_FACE_POS_Y:
+ rx = sc;
+ ry = 1;
+ rz = tc;
+ break;
+ case PIPE_TEX_FACE_NEG_Y:
+ rx = sc;
+ ry = -1;
+ rz = -tc;
+ break;
+ case PIPE_TEX_FACE_POS_Z:
+ rx = sc;
+ ry = -tc;
+ rz = 1;
+ break;
+ case PIPE_TEX_FACE_NEG_Z:
+ rx = -sc;
+ ry = -tc;
+ rz = -1;
+ break;
+ default:
+ rx = ry = rz = 0;
+ assert(0);
+ }
+
+ out_str[0] = rx; /*s*/
+ out_str[1] = ry; /*t*/
+ out_str[2] = rz; /*r*/
+
+ in_st += in_stride;
+ out_str += out_stride;
+ }
+}
diff --git a/src/minigallium/auxiliary/util/u_texture.h b/src/minigallium/auxiliary/util/u_texture.h
new file mode 100644
index 0000000..93b2f1e
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_texture.h
@@ -0,0 +1,54 @@
+/**************************************************************************
+ *
+ * Copyright 2009 Marek Olšák <maraeo@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_TEXTURE_H
+#define U_TEXTURE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Convert 2D texture coordinates of 4 vertices into cubemap coordinates
+ * in the given face.
+ * Coordinates must be in the range [0,1].
+ *
+ * \param face Cubemap face.
+ * \param in_st 4 pairs of 2D texture coordinates to convert.
+ * \param in_stride Stride of in_st in floats.
+ * \param out_str STR cubemap texture coordinates to compute.
+ * \param out_stride Stride of out_str in floats.
+ */
+void util_map_texcoords2d_onto_cubemap(unsigned face,
+ const float *in_st, unsigned in_stride,
+ float *out_str, unsigned out_stride);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_tile.c b/src/minigallium/auxiliary/util/u_tile.c
new file mode 100644
index 0000000..62298cd
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_tile.c
@@ -0,0 +1,895 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * RGBA/float tile get/put functions.
+ * Usable both by drivers and state trackers.
+ */
+
+
+#include "pipe/p_defines.h"
+#include "util/u_inlines.h"
+
+#include "util/u_format.h"
+#include "util/u_math.h"
+#include "util/u_memory.h"
+#include "util/u_rect.h"
+#include "util/u_tile.h"
+
+
+/**
+ * Move raw block of pixels from transfer object to user memory.
+ */
+void
+pipe_get_tile_raw(struct pipe_transfer *pt,
+ const void *src,
+ uint x, uint y, uint w, uint h,
+ void *dst, int dst_stride)
+{
+ if (dst_stride == 0)
+ dst_stride = util_format_get_stride(pt->resource->format, w);
+
+ if (u_clip_tile(x, y, &w, &h, &pt->box))
+ return;
+
+ util_copy_rect(dst, pt->resource->format, dst_stride, 0, 0, w, h, src, pt->stride, x, y);
+}
+
+
+/**
+ * Move raw block of pixels from user memory to transfer object.
+ */
+void
+pipe_put_tile_raw(struct pipe_transfer *pt,
+ void *dst,
+ uint x, uint y, uint w, uint h,
+ const void *src, int src_stride)
+{
+ enum pipe_format format = pt->resource->format;
+
+ if (src_stride == 0)
+ src_stride = util_format_get_stride(format, w);
+
+ if (u_clip_tile(x, y, &w, &h, &pt->box))
+ return;
+
+ util_copy_rect(dst, format, pt->stride, x, y, w, h, src, src_stride, 0, 0);
+}
+
+
+
+
+/** Convert short in [-32768,32767] to GLfloat in [-1.0,1.0] */
+#define SHORT_TO_FLOAT(S) ((2.0F * (S) + 1.0F) * (1.0F/65535.0F))
+
+#define UNCLAMPED_FLOAT_TO_SHORT(us, f) \
+ us = ( (short) ( CLAMP((f), -1.0, 1.0) * 32767.0F) )
+
+
+
+/*** PIPE_FORMAT_Z16_UNORM ***/
+
+/**
+ * Return each Z value as four floats in [0,1].
+ */
+static void
+z16_get_tile_rgba(const ushort *src,
+ unsigned w, unsigned h,
+ float *p,
+ unsigned dst_stride)
+{
+ const float scale = 1.0f / 65535.0f;
+ unsigned i, j;
+
+ for (i = 0; i < h; i++) {
+ float *pRow = p;
+ for (j = 0; j < w; j++, pRow += 4) {
+ pRow[0] =
+ pRow[1] =
+ pRow[2] =
+ pRow[3] = *src++ * scale;
+ }
+ p += dst_stride;
+ }
+}
+
+
+
+
+/*** PIPE_FORMAT_Z32_UNORM ***/
+
+/**
+ * Return each Z value as four floats in [0,1].
+ */
+static void
+z32_get_tile_rgba(const unsigned *src,
+ unsigned w, unsigned h,
+ float *p,
+ unsigned dst_stride)
+{
+ const double scale = 1.0 / (double) 0xffffffff;
+ unsigned i, j;
+
+ for (i = 0; i < h; i++) {
+ float *pRow = p;
+ for (j = 0; j < w; j++, pRow += 4) {
+ pRow[0] =
+ pRow[1] =
+ pRow[2] =
+ pRow[3] = (float) (*src++ * scale);
+ }
+ p += dst_stride;
+ }
+}
+
+
+/*** PIPE_FORMAT_Z24_UNORM_S8_UINT ***/
+
+/**
+ * Return Z component as four float in [0,1]. Stencil part ignored.
+ */
+static void
+s8z24_get_tile_rgba(const unsigned *src,
+ unsigned w, unsigned h,
+ float *p,
+ unsigned dst_stride)
+{
+ const double scale = 1.0 / ((1 << 24) - 1);
+ unsigned i, j;
+
+ for (i = 0; i < h; i++) {
+ float *pRow = p;
+ for (j = 0; j < w; j++, pRow += 4) {
+ pRow[0] =
+ pRow[1] =
+ pRow[2] =
+ pRow[3] = (float) (scale * (*src++ & 0xffffff));
+ }
+ p += dst_stride;
+ }
+}
+
+
+/*** PIPE_FORMAT_S8_UINT_Z24_UNORM ***/
+
+/**
+ * Return Z component as four float in [0,1]. Stencil part ignored.
+ */
+static void
+z24s8_get_tile_rgba(const unsigned *src,
+ unsigned w, unsigned h,
+ float *p,
+ unsigned dst_stride)
+{
+ const double scale = 1.0 / ((1 << 24) - 1);
+ unsigned i, j;
+
+ for (i = 0; i < h; i++) {
+ float *pRow = p;
+ for (j = 0; j < w; j++, pRow += 4) {
+ pRow[0] =
+ pRow[1] =
+ pRow[2] =
+ pRow[3] = (float) (scale * (*src++ >> 8));
+ }
+ p += dst_stride;
+ }
+}
+
+/*** PIPE_FORMAT_S8X24_UINT ***/
+
+/**
+ * Return S component as four uint32_t in [0..255]. Z part ignored.
+ */
+static void
+s8x24_get_tile_rgba(const unsigned *src,
+ unsigned w, unsigned h,
+ float *p,
+ unsigned dst_stride)
+{
+ unsigned i, j;
+
+ for (i = 0; i < h; i++) {
+ float *pRow = p;
+
+ for (j = 0; j < w; j++, pRow += 4) {
+ pRow[0] =
+ pRow[1] =
+ pRow[2] =
+ pRow[3] = (float)((*src++ >> 24) & 0xff);
+ }
+
+ p += dst_stride;
+ }
+}
+
+/*** PIPE_FORMAT_X24S8_UINT ***/
+
+/**
+ * Return S component as four uint32_t in [0..255]. Z part ignored.
+ */
+static void
+x24s8_get_tile_rgba(const unsigned *src,
+ unsigned w, unsigned h,
+ float *p,
+ unsigned dst_stride)
+{
+ unsigned i, j;
+
+ for (i = 0; i < h; i++) {
+ float *pRow = p;
+ for (j = 0; j < w; j++, pRow += 4) {
+ pRow[0] =
+ pRow[1] =
+ pRow[2] =
+ pRow[3] = (float)(*src++ & 0xff);
+ }
+ p += dst_stride;
+ }
+}
+
+
+/**
+ * Return S component as four uint32_t in [0..255]. Z part ignored.
+ */
+static void
+s8_get_tile_rgba(const unsigned char *src,
+ unsigned w, unsigned h,
+ float *p,
+ unsigned dst_stride)
+{
+ unsigned i, j;
+
+ for (i = 0; i < h; i++) {
+ float *pRow = p;
+ for (j = 0; j < w; j++, pRow += 4) {
+ pRow[0] =
+ pRow[1] =
+ pRow[2] =
+ pRow[3] = (float)(*src++ & 0xff);
+ }
+ p += dst_stride;
+ }
+}
+
+/*** PIPE_FORMAT_Z32_FLOAT ***/
+
+/**
+ * Return each Z value as four floats in [0,1].
+ */
+static void
+z32f_get_tile_rgba(const float *src,
+ unsigned w, unsigned h,
+ float *p,
+ unsigned dst_stride)
+{
+ unsigned i, j;
+
+ for (i = 0; i < h; i++) {
+ float *pRow = p;
+ for (j = 0; j < w; j++, pRow += 4) {
+ pRow[0] =
+ pRow[1] =
+ pRow[2] =
+ pRow[3] = *src++;
+ }
+ p += dst_stride;
+ }
+}
+
+/*** PIPE_FORMAT_Z32_FLOAT_S8X24_UINT ***/
+
+/**
+ * Return each Z value as four floats in [0,1].
+ */
+static void
+z32f_x24s8_get_tile_rgba(const float *src,
+ unsigned w, unsigned h,
+ float *p,
+ unsigned dst_stride)
+{
+ unsigned i, j;
+
+ for (i = 0; i < h; i++) {
+ float *pRow = p;
+ for (j = 0; j < w; j++, pRow += 4) {
+ pRow[0] =
+ pRow[1] =
+ pRow[2] =
+ pRow[3] = *src;
+ src += 2;
+ }
+ p += dst_stride;
+ }
+}
+
+/*** PIPE_FORMAT_X32_S8X24_UINT ***/
+
+/**
+ * Return S component as four uint32_t in [0..255]. Z part ignored.
+ */
+static void
+x32_s8_get_tile_rgba(const unsigned *src,
+ unsigned w, unsigned h,
+ float *p,
+ unsigned dst_stride)
+{
+ unsigned i, j;
+
+ for (i = 0; i < h; i++) {
+ float *pRow = p;
+ for (j = 0; j < w; j++, pRow += 4) {
+ src++;
+ pRow[0] =
+ pRow[1] =
+ pRow[2] =
+ pRow[3] = (float)(*src++ & 0xff);
+ }
+ p += dst_stride;
+ }
+}
+
+void
+pipe_tile_raw_to_rgba(enum pipe_format format,
+ const void *src,
+ uint w, uint h,
+ float *dst, unsigned dst_stride)
+{
+ switch (format) {
+ case PIPE_FORMAT_Z16_UNORM:
+ z16_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
+ break;
+ case PIPE_FORMAT_Z32_UNORM:
+ z32_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
+ break;
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
+ case PIPE_FORMAT_Z24X8_UNORM:
+ s8z24_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
+ break;
+ case PIPE_FORMAT_S8_UINT:
+ s8_get_tile_rgba((unsigned char *) src, w, h, dst, dst_stride);
+ break;
+ case PIPE_FORMAT_X24S8_UINT:
+ s8x24_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
+ break;
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
+ z24s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
+ break;
+ case PIPE_FORMAT_S8X24_UINT:
+ x24s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
+ break;
+ case PIPE_FORMAT_Z32_FLOAT:
+ z32f_get_tile_rgba((float *) src, w, h, dst, dst_stride);
+ break;
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
+ z32f_x24s8_get_tile_rgba((float *) src, w, h, dst, dst_stride);
+ break;
+ case PIPE_FORMAT_X32_S8X24_UINT:
+ x32_s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
+ break;
+ default:
+ util_format_read_4f(format,
+ dst, dst_stride * sizeof(float),
+ src, util_format_get_stride(format, w),
+ 0, 0, w, h);
+ }
+}
+
+void
+pipe_tile_raw_to_unsigned(enum pipe_format format,
+ const void *src,
+ uint w, uint h,
+ unsigned *dst, unsigned dst_stride)
+{
+ util_format_read_4ui(format,
+ dst, dst_stride * sizeof(float),
+ src, util_format_get_stride(format, w),
+ 0, 0, w, h);
+}
+
+void
+pipe_tile_raw_to_signed(enum pipe_format format,
+ void *src,
+ uint w, uint h,
+ int *dst, unsigned dst_stride)
+{
+ util_format_read_4i(format,
+ dst, dst_stride * sizeof(float),
+ src, util_format_get_stride(format, w),
+ 0, 0, w, h);
+}
+
+void
+pipe_get_tile_rgba(struct pipe_transfer *pt,
+ const void *src,
+ uint x, uint y, uint w, uint h,
+ float *p)
+{
+ pipe_get_tile_rgba_format(pt, src, x, y, w, h, pt->resource->format, p);
+}
+
+
+void
+pipe_get_tile_rgba_format(struct pipe_transfer *pt,
+ const void *src,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ float *p)
+{
+ unsigned dst_stride = w * 4;
+ void *packed;
+
+ if (u_clip_tile(x, y, &w, &h, &pt->box)) {
+ return;
+ }
+
+ packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format));
+ if (!packed) {
+ return;
+ }
+
+ if (format == PIPE_FORMAT_UYVY || format == PIPE_FORMAT_YUYV) {
+ assert((x & 1) == 0);
+ }
+
+ pipe_get_tile_raw(pt, src, x, y, w, h, packed, 0);
+
+ pipe_tile_raw_to_rgba(format, packed, w, h, p, dst_stride);
+
+ FREE(packed);
+}
+
+
+void
+pipe_put_tile_rgba(struct pipe_transfer *pt,
+ void *dst,
+ uint x, uint y, uint w, uint h,
+ const float *p)
+{
+ pipe_put_tile_rgba_format(pt, dst, x, y, w, h, pt->resource->format, p);
+}
+
+
+void
+pipe_put_tile_rgba_format(struct pipe_transfer *pt,
+ void *dst,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ const float *p)
+{
+ unsigned src_stride = w * 4;
+ void *packed;
+
+ if (u_clip_tile(x, y, &w, &h, &pt->box))
+ return;
+
+ packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format));
+
+ if (!packed)
+ return;
+
+ switch (format) {
+ case PIPE_FORMAT_Z16_UNORM:
+ /*z16_put_tile_rgba((ushort *) packed, w, h, p, src_stride);*/
+ break;
+ case PIPE_FORMAT_Z32_UNORM:
+ /*z32_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
+ break;
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
+ case PIPE_FORMAT_Z24X8_UNORM:
+ /*s8z24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
+ break;
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
+ /*z24s8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
+ break;
+ case PIPE_FORMAT_Z32_FLOAT:
+ /*z32f_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
+ break;
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
+ /*z32f_s8x24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
+ break;
+ default:
+ util_format_write_4f(format,
+ p, src_stride * sizeof(float),
+ packed, util_format_get_stride(format, w),
+ 0, 0, w, h);
+ }
+
+ pipe_put_tile_raw(pt, dst, x, y, w, h, packed, 0);
+
+ FREE(packed);
+}
+
+void
+pipe_put_tile_i_format(struct pipe_transfer *pt,
+ void *dst,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ const int *p)
+{
+ unsigned src_stride = w * 4;
+ void *packed;
+
+ if (u_clip_tile(x, y, &w, &h, &pt->box))
+ return;
+
+ packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format));
+
+ if (!packed)
+ return;
+
+ util_format_write_4i(format,
+ p, src_stride * sizeof(float),
+ packed, util_format_get_stride(format, w),
+ 0, 0, w, h);
+
+ pipe_put_tile_raw(pt, dst, x, y, w, h, packed, 0);
+
+ FREE(packed);
+}
+
+void
+pipe_put_tile_ui_format(struct pipe_transfer *pt,
+ void *dst,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ const unsigned int *p)
+{
+ unsigned src_stride = w * 4;
+ void *packed;
+
+ if (u_clip_tile(x, y, &w, &h, &pt->box))
+ return;
+
+ packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format));
+
+ if (!packed)
+ return;
+
+ util_format_write_4ui(format,
+ p, src_stride * sizeof(float),
+ packed, util_format_get_stride(format, w),
+ 0, 0, w, h);
+
+ pipe_put_tile_raw(pt, dst, x, y, w, h, packed, 0);
+
+ FREE(packed);
+}
+
+/**
+ * Get a block of Z values, converted to 32-bit range.
+ */
+void
+pipe_get_tile_z(struct pipe_transfer *pt,
+ const void *src,
+ uint x, uint y, uint w, uint h,
+ uint *z)
+{
+ const uint dstStride = w;
+ const ubyte *map = src;
+ uint *pDest = z;
+ uint i, j;
+ enum pipe_format format = pt->resource->format;
+
+ if (u_clip_tile(x, y, &w, &h, &pt->box))
+ return;
+
+ switch (format) {
+ case PIPE_FORMAT_Z32_UNORM:
+ {
+ const uint *ptrc
+ = (const uint *)(map + y * pt->stride + x*4);
+ for (i = 0; i < h; i++) {
+ memcpy(pDest, ptrc, 4 * w);
+ pDest += dstStride;
+ ptrc += pt->stride/4;
+ }
+ }
+ break;
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
+ case PIPE_FORMAT_Z24X8_UNORM:
+ {
+ const uint *ptrc
+ = (const uint *)(map + y * pt->stride + x*4);
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ /* convert 24-bit Z to 32-bit Z */
+ pDest[j] = (ptrc[j] << 8) | ((ptrc[j] >> 16) & 0xff);
+ }
+ pDest += dstStride;
+ ptrc += pt->stride/4;
+ }
+ }
+ break;
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
+ {
+ const uint *ptrc
+ = (const uint *)(map + y * pt->stride + x*4);
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ /* convert 24-bit Z to 32-bit Z */
+ pDest[j] = (ptrc[j] & 0xffffff00) | ((ptrc[j] >> 24) & 0xff);
+ }
+ pDest += dstStride;
+ ptrc += pt->stride/4;
+ }
+ }
+ break;
+ case PIPE_FORMAT_Z16_UNORM:
+ {
+ const ushort *ptrc
+ = (const ushort *)(map + y * pt->stride + x*2);
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ /* convert 16-bit Z to 32-bit Z */
+ pDest[j] = (ptrc[j] << 16) | ptrc[j];
+ }
+ pDest += dstStride;
+ ptrc += pt->stride/2;
+ }
+ }
+ break;
+ case PIPE_FORMAT_Z32_FLOAT:
+ {
+ const float *ptrc = (const float *)(map + y * pt->stride + x*4);
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ /* convert float Z to 32-bit Z */
+ if (ptrc[j] <= 0.0) {
+ pDest[j] = 0;
+ }
+ else if (ptrc[j] >= 1.0) {
+ pDest[j] = 0xffffffff;
+ }
+ else {
+ double z = ptrc[j] * 0xffffffff;
+ pDest[j] = (uint) z;
+ }
+ }
+ pDest += dstStride;
+ ptrc += pt->stride/4;
+ }
+ }
+ break;
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
+ {
+ const float *ptrc = (const float *)(map + y * pt->stride + x*8);
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ /* convert float Z to 32-bit Z */
+ if (ptrc[j] <= 0.0) {
+ pDest[j*2] = 0;
+ }
+ else if (ptrc[j] >= 1.0) {
+ pDest[j*2] = 0xffffffff;
+ }
+ else {
+ double z = ptrc[j] * 0xffffffff;
+ pDest[j*2] = (uint) z;
+ }
+ }
+ pDest += dstStride;
+ ptrc += pt->stride/4;
+ }
+ }
+ break;
+ default:
+ assert(0);
+ }
+}
+
+
+void
+pipe_put_tile_z(struct pipe_transfer *pt,
+ void *dst,
+ uint x, uint y, uint w, uint h,
+ const uint *zSrc)
+{
+ const uint srcStride = w;
+ const uint *ptrc = zSrc;
+ ubyte *map = dst;
+ uint i, j;
+ enum pipe_format format = pt->resource->format;
+
+ if (u_clip_tile(x, y, &w, &h, &pt->box))
+ return;
+
+ switch (format) {
+ case PIPE_FORMAT_Z32_UNORM:
+ {
+ uint *pDest = (uint *) (map + y * pt->stride + x*4);
+ for (i = 0; i < h; i++) {
+ memcpy(pDest, ptrc, 4 * w);
+ pDest += pt->stride/4;
+ ptrc += srcStride;
+ }
+ }
+ break;
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
+ {
+ uint *pDest = (uint *) (map + y * pt->stride + x*4);
+ /*assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE);*/
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ /* convert 32-bit Z to 24-bit Z, preserve stencil */
+ pDest[j] = (pDest[j] & 0xff000000) | ptrc[j] >> 8;
+ }
+ pDest += pt->stride/4;
+ ptrc += srcStride;
+ }
+ }
+ break;
+ case PIPE_FORMAT_Z24X8_UNORM:
+ {
+ uint *pDest = (uint *) (map + y * pt->stride + x*4);
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ /* convert 32-bit Z to 24-bit Z (0 stencil) */
+ pDest[j] = ptrc[j] >> 8;
+ }
+ pDest += pt->stride/4;
+ ptrc += srcStride;
+ }
+ }
+ break;
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
+ {
+ uint *pDest = (uint *) (map + y * pt->stride + x*4);
+ /*assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE);*/
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ /* convert 32-bit Z to 24-bit Z, preserve stencil */
+ pDest[j] = (pDest[j] & 0xff) | (ptrc[j] & 0xffffff00);
+ }
+ pDest += pt->stride/4;
+ ptrc += srcStride;
+ }
+ }
+ break;
+ case PIPE_FORMAT_X8Z24_UNORM:
+ {
+ uint *pDest = (uint *) (map + y * pt->stride + x*4);
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ /* convert 32-bit Z to 24-bit Z (0 stencil) */
+ pDest[j] = ptrc[j] & 0xffffff00;
+ }
+ pDest += pt->stride/4;
+ ptrc += srcStride;
+ }
+ }
+ break;
+ case PIPE_FORMAT_Z16_UNORM:
+ {
+ ushort *pDest = (ushort *) (map + y * pt->stride + x*2);
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ /* convert 32-bit Z to 16-bit Z */
+ pDest[j] = ptrc[j] >> 16;
+ }
+ pDest += pt->stride/2;
+ ptrc += srcStride;
+ }
+ }
+ break;
+ case PIPE_FORMAT_Z32_FLOAT:
+ {
+ float *pDest = (float *) (map + y * pt->stride + x*4);
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ /* convert 32-bit integer Z to float Z */
+ const double scale = 1.0 / 0xffffffffU;
+ pDest[j] = (float) (ptrc[j] * scale);
+ }
+ pDest += pt->stride/4;
+ ptrc += srcStride;
+ }
+ }
+ break;
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
+ {
+ float *pDest = (float *) (map + y * pt->stride + x*8);
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ /* convert 32-bit integer Z to float Z */
+ const double scale = 1.0 / 0xffffffffU;
+ pDest[j*2] = (float) (ptrc[j] * scale);
+ }
+ pDest += pt->stride/4;
+ ptrc += srcStride;
+ }
+ }
+ break;
+ default:
+ assert(0);
+ }
+}
+
+
+void
+pipe_get_tile_ui_format(struct pipe_transfer *pt,
+ const void *src,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ unsigned int *p)
+{
+ unsigned dst_stride = w * 4;
+ void *packed;
+
+ if (u_clip_tile(x, y, &w, &h, &pt->box)) {
+ return;
+ }
+
+ packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format));
+ if (!packed) {
+ return;
+ }
+
+ if (format == PIPE_FORMAT_UYVY || format == PIPE_FORMAT_YUYV) {
+ assert((x & 1) == 0);
+ }
+
+ pipe_get_tile_raw(pt, src, x, y, w, h, packed, 0);
+
+ pipe_tile_raw_to_unsigned(format, packed, w, h, p, dst_stride);
+
+ FREE(packed);
+}
+
+
+void
+pipe_get_tile_i_format(struct pipe_transfer *pt,
+ const void *src,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ int *p)
+{
+ unsigned dst_stride = w * 4;
+ void *packed;
+
+ if (u_clip_tile(x, y, &w, &h, &pt->box)) {
+ return;
+ }
+
+ packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format));
+ if (!packed) {
+ return;
+ }
+
+ if (format == PIPE_FORMAT_UYVY || format == PIPE_FORMAT_YUYV) {
+ assert((x & 1) == 0);
+ }
+
+ pipe_get_tile_raw(pt, src, x, y, w, h, packed, 0);
+
+ pipe_tile_raw_to_signed(format, packed, w, h, p, dst_stride);
+
+ FREE(packed);
+}
diff --git a/src/minigallium/auxiliary/util/u_tile.h b/src/minigallium/auxiliary/util/u_tile.h
new file mode 100644
index 0000000..9e81944
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_tile.h
@@ -0,0 +1,165 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef P_TILE_H
+#define P_TILE_H
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_format.h"
+#include "pipe/p_state.h"
+
+struct pipe_context;
+struct pipe_transfer;
+
+/**
+ * Clip tile against transfer dims.
+ *
+ * XXX: this only clips width and height!
+ *
+ * \return TRUE if tile is totally clipped, FALSE otherwise
+ */
+static INLINE boolean
+u_clip_tile(uint x, uint y, uint *w, uint *h, const struct pipe_box *box)
+{
+ if ((int) x >= box->width)
+ return TRUE;
+ if ((int) y >= box->height)
+ return TRUE;
+ if ((int) (x + *w) > box->width)
+ *w = box->width - x;
+ if ((int) (y + *h) > box->height)
+ *h = box->height - y;
+ return FALSE;
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void
+pipe_get_tile_raw(struct pipe_transfer *pt,
+ const void *src,
+ uint x, uint y, uint w, uint h,
+ void *p, int dst_stride);
+
+void
+pipe_put_tile_raw(struct pipe_transfer *pt,
+ void *dst,
+ uint x, uint y, uint w, uint h,
+ const void *p, int src_stride);
+
+
+void
+pipe_get_tile_rgba(struct pipe_transfer *pt,
+ const void *src,
+ uint x, uint y, uint w, uint h,
+ float *p);
+
+void
+pipe_get_tile_rgba_format(struct pipe_transfer *pt,
+ const void *src,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ float *p);
+
+void
+pipe_put_tile_rgba(struct pipe_transfer *pt,
+ void *dst,
+ uint x, uint y, uint w, uint h,
+ const float *p);
+
+void
+pipe_put_tile_rgba_format(struct pipe_transfer *pt,
+ void *dst,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ const float *p);
+
+
+void
+pipe_get_tile_z(struct pipe_transfer *pt,
+ const void *src,
+ uint x, uint y, uint w, uint h,
+ uint *z);
+
+void
+pipe_put_tile_z(struct pipe_transfer *pt,
+ void *dst,
+ uint x, uint y, uint w, uint h,
+ const uint *z);
+
+void
+pipe_tile_raw_to_rgba(enum pipe_format format,
+ const void *src,
+ uint w, uint h,
+ float *dst, unsigned dst_stride);
+
+void
+pipe_tile_raw_to_unsigned(enum pipe_format format,
+ const void *src,
+ uint w, uint h,
+ unsigned *dst, unsigned dst_stride);
+
+void
+pipe_tile_raw_to_signed(enum pipe_format format,
+ void *src,
+ uint w, uint h,
+ int *dst, unsigned dst_stride);
+
+void
+pipe_get_tile_ui_format(struct pipe_transfer *pt,
+ const void *src,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ unsigned int *p);
+
+void
+pipe_get_tile_i_format(struct pipe_transfer *pt,
+ const void *src,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ int *p);
+
+void
+pipe_put_tile_ui_format(struct pipe_transfer *pt,
+ void *dst,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ const unsigned *p);
+
+void
+pipe_put_tile_i_format(struct pipe_transfer *pt,
+ void *dst,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ const int *p);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_time.h b/src/minigallium/auxiliary/util/u_time.h
new file mode 100644
index 0000000..15899c2
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_time.h
@@ -0,0 +1,150 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * OS independent time-manipulation functions.
+ *
+ * @author Jose Fonseca <jrfonseca@tungstengraphics.com>
+ */
+
+#ifndef U_TIME_H_
+#define U_TIME_H_
+
+
+#include "pipe/p_config.h"
+
+#include "os/os_time.h"
+
+#include "pipe/p_compiler.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * Time abstraction.
+ *
+ * Do not access this structure directly. Use the provided function instead.
+ */
+struct util_time
+{
+ int64_t counter;
+};
+
+
+PIPE_DEPRECATED
+static INLINE void
+util_time_get(struct util_time *t)
+{
+ t->counter = os_time_get();
+}
+
+
+/**
+ * Return t2 = t1 + usecs
+ */
+PIPE_DEPRECATED
+static INLINE void
+util_time_add(const struct util_time *t1,
+ int64_t usecs,
+ struct util_time *t2)
+{
+ t2->counter = t1->counter + usecs;
+}
+
+
+/**
+ * Return difference between times, in microseconds
+ */
+PIPE_DEPRECATED
+static INLINE int64_t
+util_time_diff(const struct util_time *t1,
+ const struct util_time *t2)
+{
+ return t2->counter - t1->counter;
+}
+
+
+/**
+ * Compare two time values.
+ *
+ * Not publicly available because it does not take in account wrap-arounds.
+ * Use util_time_timeout instead.
+ */
+static INLINE int
+_util_time_compare(const struct util_time *t1,
+ const struct util_time *t2)
+{
+ if (t1->counter < t2->counter)
+ return -1;
+ else if(t1->counter > t2->counter)
+ return 1;
+ else
+ return 0;
+}
+
+
+/**
+ * Returns non-zero when the timeout expires.
+ */
+PIPE_DEPRECATED
+static INLINE boolean
+util_time_timeout(const struct util_time *start,
+ const struct util_time *end,
+ const struct util_time *curr)
+{
+ return os_time_timeout(start->counter, end->counter, curr->counter);
+}
+
+
+/**
+ * Return current time in microseconds
+ */
+PIPE_DEPRECATED
+static INLINE int64_t
+util_time_micros(void)
+{
+ return os_time_get();
+}
+
+
+PIPE_DEPRECATED
+static INLINE void
+util_time_sleep(int64_t usecs)
+{
+ os_time_sleep(usecs);
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_TIME_H_ */
diff --git a/src/minigallium/auxiliary/util/u_transfer.c b/src/minigallium/auxiliary/util/u_transfer.c
new file mode 100644
index 0000000..7804f2a
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_transfer.c
@@ -0,0 +1,163 @@
+#include "pipe/p_context.h"
+#include "util/u_surface.h"
+#include "util/u_inlines.h"
+#include "util/u_transfer.h"
+#include "util/u_memory.h"
+
+/* One-shot transfer operation with data supplied in a user
+ * pointer. XXX: strides??
+ */
+void u_default_transfer_inline_write( struct pipe_context *pipe,
+ struct pipe_resource *resource,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box,
+ const void *data,
+ unsigned stride,
+ unsigned layer_stride)
+{
+ struct pipe_transfer *transfer = NULL;
+ uint8_t *map = NULL;
+
+ assert(!(usage & PIPE_TRANSFER_READ));
+
+ /* the write flag is implicit by the nature of transfer_inline_write */
+ usage |= PIPE_TRANSFER_WRITE;
+
+ /* transfer_inline_write implicitly discards the rewritten buffer range */
+ /* XXX this looks very broken for non-buffer resources having more than one dim. */
+ if (box->x == 0 && box->width == resource->width0) {
+ usage |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE;
+ } else {
+ usage |= PIPE_TRANSFER_DISCARD_RANGE;
+ }
+
+ map = pipe->transfer_map(pipe,
+ resource,
+ level,
+ usage,
+ box, &transfer);
+ if (map == NULL)
+ return;
+
+ if (resource->target == PIPE_BUFFER) {
+ assert(box->height == 1);
+ assert(box->depth == 1);
+
+ memcpy(map, data, box->width);
+ }
+ else {
+ const uint8_t *src_data = data;
+
+ util_copy_box(map,
+ resource->format,
+ transfer->stride, /* bytes */
+ transfer->layer_stride, /* bytes */
+ 0, 0, 0,
+ box->width,
+ box->height,
+ box->depth,
+ src_data,
+ stride, /* bytes */
+ layer_stride, /* bytes */
+ 0, 0, 0);
+ }
+
+ pipe_transfer_unmap(pipe, transfer);
+}
+
+
+boolean u_default_resource_get_handle(struct pipe_screen *screen,
+ struct pipe_resource *resource,
+ struct winsys_handle *handle)
+{
+ return FALSE;
+}
+
+
+
+void u_default_transfer_flush_region( struct pipe_context *pipe,
+ struct pipe_transfer *transfer,
+ const struct pipe_box *box)
+{
+ /* This is a no-op implementation, nothing to do.
+ */
+}
+
+void u_default_transfer_unmap( struct pipe_context *pipe,
+ struct pipe_transfer *transfer )
+{
+}
+
+
+static INLINE struct u_resource *
+u_resource( struct pipe_resource *res )
+{
+ return (struct u_resource *)res;
+}
+
+boolean u_resource_get_handle_vtbl(struct pipe_screen *screen,
+ struct pipe_resource *resource,
+ struct winsys_handle *handle)
+{
+ struct u_resource *ur = u_resource(resource);
+ return ur->vtbl->resource_get_handle(screen, resource, handle);
+}
+
+void u_resource_destroy_vtbl(struct pipe_screen *screen,
+ struct pipe_resource *resource)
+{
+ struct u_resource *ur = u_resource(resource);
+ ur->vtbl->resource_destroy(screen, resource);
+}
+
+void *u_transfer_map_vtbl(struct pipe_context *context,
+ struct pipe_resource *resource,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box,
+ struct pipe_transfer **transfer)
+{
+ struct u_resource *ur = u_resource(resource);
+ return ur->vtbl->transfer_map(context, resource, level, usage, box,
+ transfer);
+}
+
+void u_transfer_flush_region_vtbl( struct pipe_context *pipe,
+ struct pipe_transfer *transfer,
+ const struct pipe_box *box)
+{
+ struct u_resource *ur = u_resource(transfer->resource);
+ ur->vtbl->transfer_flush_region(pipe, transfer, box);
+}
+
+void u_transfer_unmap_vtbl( struct pipe_context *pipe,
+ struct pipe_transfer *transfer )
+{
+ struct u_resource *ur = u_resource(transfer->resource);
+ ur->vtbl->transfer_unmap(pipe, transfer);
+}
+
+void u_transfer_inline_write_vtbl( struct pipe_context *pipe,
+ struct pipe_resource *resource,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box,
+ const void *data,
+ unsigned stride,
+ unsigned layer_stride)
+{
+ struct u_resource *ur = u_resource(resource);
+ ur->vtbl->transfer_inline_write(pipe,
+ resource,
+ level,
+ usage,
+ box,
+ data,
+ stride,
+ layer_stride);
+}
+
+
+
+
diff --git a/src/minigallium/auxiliary/util/u_transfer.h b/src/minigallium/auxiliary/util/u_transfer.h
new file mode 100644
index 0000000..6c25ee0
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_transfer.h
@@ -0,0 +1,109 @@
+
+#ifndef U_TRANSFER_H
+#define U_TRANSFER_H
+
+/* Fallback implementations for inline read/writes which just go back
+ * to the regular transfer behaviour.
+ */
+#include "pipe/p_state.h"
+
+struct pipe_context;
+struct winsys_handle;
+
+boolean u_default_resource_get_handle(struct pipe_screen *screen,
+ struct pipe_resource *resource,
+ struct winsys_handle *handle);
+
+void u_default_transfer_inline_write( struct pipe_context *pipe,
+ struct pipe_resource *resource,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box,
+ const void *data,
+ unsigned stride,
+ unsigned layer_stride);
+
+void u_default_transfer_flush_region( struct pipe_context *pipe,
+ struct pipe_transfer *transfer,
+ const struct pipe_box *box);
+
+void u_default_transfer_unmap( struct pipe_context *pipe,
+ struct pipe_transfer *transfer );
+
+
+
+/* Useful helper to allow >1 implementation of resource functionality
+ * to exist in a single driver. This is intended to be transitionary!
+ */
+struct u_resource_vtbl {
+
+ boolean (*resource_get_handle)(struct pipe_screen *,
+ struct pipe_resource *tex,
+ struct winsys_handle *handle);
+
+ void (*resource_destroy)(struct pipe_screen *,
+ struct pipe_resource *pt);
+
+ void *(*transfer_map)(struct pipe_context *,
+ struct pipe_resource *resource,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *,
+ struct pipe_transfer **);
+
+
+ void (*transfer_flush_region)( struct pipe_context *,
+ struct pipe_transfer *transfer,
+ const struct pipe_box *);
+
+ void (*transfer_unmap)( struct pipe_context *,
+ struct pipe_transfer *transfer );
+
+ void (*transfer_inline_write)( struct pipe_context *pipe,
+ struct pipe_resource *resource,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box,
+ const void *data,
+ unsigned stride,
+ unsigned layer_stride);
+};
+
+
+struct u_resource {
+ struct pipe_resource b;
+ const struct u_resource_vtbl *vtbl;
+};
+
+
+boolean u_resource_get_handle_vtbl(struct pipe_screen *screen,
+ struct pipe_resource *resource,
+ struct winsys_handle *handle);
+
+void u_resource_destroy_vtbl(struct pipe_screen *screen,
+ struct pipe_resource *resource);
+
+void *u_transfer_map_vtbl(struct pipe_context *context,
+ struct pipe_resource *resource,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box,
+ struct pipe_transfer **transfer);
+
+void u_transfer_flush_region_vtbl( struct pipe_context *pipe,
+ struct pipe_transfer *transfer,
+ const struct pipe_box *box);
+
+void u_transfer_unmap_vtbl( struct pipe_context *rm_ctx,
+ struct pipe_transfer *transfer );
+
+void u_transfer_inline_write_vtbl( struct pipe_context *rm_ctx,
+ struct pipe_resource *resource,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box,
+ const void *data,
+ unsigned stride,
+ unsigned layer_stride);
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_upload_mgr.c b/src/minigallium/auxiliary/util/u_upload_mgr.c
new file mode 100644
index 0000000..6859751
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_upload_mgr.c
@@ -0,0 +1,271 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/* Helper utility for uploading user buffers & other data, and
+ * coalescing small buffers into larger ones.
+ */
+
+#include "pipe/p_defines.h"
+#include "util/u_inlines.h"
+#include "pipe/p_context.h"
+#include "util/u_memory.h"
+#include "util/u_math.h"
+
+#include "u_upload_mgr.h"
+
+
+struct u_upload_mgr {
+ struct pipe_context *pipe;
+
+ unsigned default_size; /* Minimum size of the upload buffer, in bytes. */
+ unsigned alignment; /* Alignment of each sub-allocation. */
+ unsigned bind; /* Bitmask of PIPE_BIND_* flags. */
+
+ struct pipe_resource *buffer; /* Upload buffer. */
+ struct pipe_transfer *transfer; /* Transfer object for the upload buffer. */
+ uint8_t *map; /* Pointer to the mapped upload buffer. */
+ unsigned size; /* Actual size of the upload buffer. */
+ unsigned offset; /* Aligned offset to the upload buffer, pointing
+ * at the first unused byte. */
+};
+
+
+struct u_upload_mgr *u_upload_create( struct pipe_context *pipe,
+ unsigned default_size,
+ unsigned alignment,
+ unsigned bind )
+{
+ struct u_upload_mgr *upload = CALLOC_STRUCT( u_upload_mgr );
+ if (!upload)
+ return NULL;
+
+ upload->pipe = pipe;
+ upload->default_size = default_size;
+ upload->alignment = alignment;
+ upload->bind = bind;
+ upload->buffer = NULL;
+
+ return upload;
+}
+
+void u_upload_unmap( struct u_upload_mgr *upload )
+{
+ if (upload->transfer) {
+ struct pipe_box *box = &upload->transfer->box;
+ if ((int) upload->offset > box->x) {
+
+ pipe_buffer_flush_mapped_range(upload->pipe, upload->transfer,
+ box->x, upload->offset - box->x);
+ }
+ pipe_transfer_unmap(upload->pipe, upload->transfer);
+ upload->transfer = NULL;
+ upload->map = NULL;
+ }
+}
+
+/* Release old buffer.
+ *
+ * This must usually be called prior to firing the command stream
+ * which references the upload buffer, as many memory managers will
+ * cause subsequent maps of a fired buffer to wait.
+ *
+ * Can improve this with a change to pipe_buffer_write to use the
+ * DONT_WAIT bit, but for now, it's easiest just to grab a new buffer.
+ */
+void u_upload_flush( struct u_upload_mgr *upload )
+{
+ /* Unmap and unreference the upload buffer. */
+ u_upload_unmap(upload);
+ pipe_resource_reference( &upload->buffer, NULL );
+ upload->size = 0;
+}
+
+
+void u_upload_destroy( struct u_upload_mgr *upload )
+{
+ u_upload_flush( upload );
+ FREE( upload );
+}
+
+
+static enum pipe_error
+u_upload_alloc_buffer( struct u_upload_mgr *upload,
+ unsigned min_size )
+{
+ unsigned size;
+
+ /* Release the old buffer, if present:
+ */
+ u_upload_flush( upload );
+
+ /* Allocate a new one:
+ */
+ size = align(MAX2(upload->default_size, min_size), 4096);
+
+ upload->buffer = pipe_buffer_create( upload->pipe->screen,
+ upload->bind,
+ PIPE_USAGE_STREAM,
+ size );
+ if (upload->buffer == NULL) {
+ return PIPE_ERROR_OUT_OF_MEMORY;
+ }
+
+ /* Map the new buffer. */
+ upload->map = pipe_buffer_map_range(upload->pipe, upload->buffer,
+ 0, size,
+ PIPE_TRANSFER_WRITE |
+ PIPE_TRANSFER_FLUSH_EXPLICIT,
+ &upload->transfer);
+ if (upload->map == NULL) {
+ upload->transfer = NULL;
+ upload->size = 0;
+ pipe_resource_reference(&upload->buffer, NULL);
+ return PIPE_ERROR_OUT_OF_MEMORY;
+ }
+
+ upload->size = size;
+ upload->offset = 0;
+ return PIPE_OK;
+}
+
+enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
+ unsigned min_out_offset,
+ unsigned size,
+ unsigned *out_offset,
+ struct pipe_resource **outbuf,
+ void **ptr )
+{
+ unsigned alloc_size = align( size, upload->alignment );
+ unsigned alloc_offset = align(min_out_offset, upload->alignment);
+ unsigned offset;
+
+ /* Init these return values here in case we fail below to make
+ * sure the caller doesn't get garbage values.
+ */
+ *out_offset = ~0;
+ pipe_resource_reference(outbuf, NULL);
+ *ptr = NULL;
+
+ /* Make sure we have enough space in the upload buffer
+ * for the sub-allocation. */
+ if (MAX2(upload->offset, alloc_offset) + alloc_size > upload->size) {
+ enum pipe_error ret = u_upload_alloc_buffer(upload,
+ alloc_offset + alloc_size);
+ if (ret != PIPE_OK)
+ return ret;
+ }
+
+ offset = MAX2(upload->offset, alloc_offset);
+
+ if (!upload->map) {
+ upload->map = pipe_buffer_map_range(upload->pipe, upload->buffer,
+ offset, upload->size - offset,
+ PIPE_TRANSFER_WRITE |
+ PIPE_TRANSFER_FLUSH_EXPLICIT |
+ PIPE_TRANSFER_UNSYNCHRONIZED,
+ &upload->transfer);
+ if (!upload->map) {
+ upload->transfer = NULL;
+ return PIPE_ERROR_OUT_OF_MEMORY;
+ }
+
+ upload->map -= offset;
+ }
+
+ assert(offset < upload->buffer->width0);
+ assert(offset + size <= upload->buffer->width0);
+ assert(size);
+
+ /* Emit the return values: */
+ *ptr = upload->map + offset;
+ pipe_resource_reference( outbuf, upload->buffer );
+ *out_offset = offset;
+
+ upload->offset = offset + alloc_size;
+ return PIPE_OK;
+}
+
+enum pipe_error u_upload_data( struct u_upload_mgr *upload,
+ unsigned min_out_offset,
+ unsigned size,
+ const void *data,
+ unsigned *out_offset,
+ struct pipe_resource **outbuf)
+{
+ uint8_t *ptr;
+ enum pipe_error ret = u_upload_alloc(upload, min_out_offset, size,
+ out_offset, outbuf,
+ (void**)&ptr);
+ if (ret != PIPE_OK)
+ return ret;
+
+ memcpy(ptr, data, size);
+ return PIPE_OK;
+}
+
+
+/* As above, but upload the full contents of a buffer. Useful for
+ * uploading user buffers, avoids generating an explosion of GPU
+ * buffers if you have an app that does lots of small vertex buffer
+ * renders or DrawElements calls.
+ */
+enum pipe_error u_upload_buffer( struct u_upload_mgr *upload,
+ unsigned min_out_offset,
+ unsigned offset,
+ unsigned size,
+ struct pipe_resource *inbuf,
+ unsigned *out_offset,
+ struct pipe_resource **outbuf)
+{
+ enum pipe_error ret = PIPE_OK;
+ struct pipe_transfer *transfer = NULL;
+ const char *map = NULL;
+
+ map = (const char *)pipe_buffer_map_range(upload->pipe,
+ inbuf,
+ offset, size,
+ PIPE_TRANSFER_READ,
+ &transfer);
+
+ if (map == NULL) {
+ return PIPE_ERROR_OUT_OF_MEMORY;
+ }
+
+ if (0)
+ debug_printf("upload ptr %p ofs %d sz %d\n", map, offset, size);
+
+ ret = u_upload_data( upload,
+ min_out_offset,
+ size,
+ map,
+ out_offset,
+ outbuf);
+
+ pipe_buffer_unmap( upload->pipe, transfer );
+
+ return ret;
+}
diff --git a/src/minigallium/auxiliary/util/u_upload_mgr.h b/src/minigallium/auxiliary/util/u_upload_mgr.h
new file mode 100644
index 0000000..82215a5
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_upload_mgr.h
@@ -0,0 +1,130 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/* Helper utility for uploading user buffers & other data, and
+ * coalescing small buffers into larger ones.
+ */
+
+#ifndef U_UPLOAD_MGR_H
+#define U_UPLOAD_MGR_H
+
+#include "pipe/p_compiler.h"
+
+struct pipe_context;
+struct pipe_resource;
+
+
+/**
+ * Create the upload manager.
+ *
+ * \param pipe Pipe driver.
+ * \param default_size Minimum size of the upload buffer, in bytes.
+ * \param alignment Alignment of each suballocation in the upload buffer.
+ * \param bind Bitmask of PIPE_BIND_* flags.
+ */
+struct u_upload_mgr *u_upload_create( struct pipe_context *pipe,
+ unsigned default_size,
+ unsigned alignment,
+ unsigned bind );
+
+/**
+ * Destroy the upload manager.
+ */
+void u_upload_destroy( struct u_upload_mgr *upload );
+
+/**
+ * Unmap and release old upload buffer.
+ *
+ * This is like u_upload_unmap() except the upload buffer is released for
+ * recycling. This should be called on real hardware flushes on systems
+ * that don't support the PIPE_TRANSFER_UNSYNCHRONIZED flag, as otherwise
+ * the next u_upload_buffer will cause a sync on the buffer.
+ */
+void u_upload_flush( struct u_upload_mgr *upload );
+
+/**
+ * Unmap upload buffer
+ *
+ * \param upload Upload manager
+ *
+ * This must usually be called prior to firing the command stream
+ * which references the upload buffer, as many memory managers either
+ * don't like firing a mapped buffer or cause subsequent maps of a
+ * fired buffer to wait.
+ */
+void u_upload_unmap( struct u_upload_mgr *upload );
+
+/**
+ * Sub-allocate new memory from the upload buffer.
+ *
+ * \param upload Upload manager
+ * \param min_out_offset Minimum offset that should be returned in out_offset.
+ * \param size Size of the allocation.
+ * \param out_offset Pointer to where the new buffer offset will be returned.
+ * \param outbuf Pointer to where the upload buffer will be returned.
+ * \param ptr Pointer to the allocated memory that is returned.
+ */
+enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
+ unsigned min_out_offset,
+ unsigned size,
+ unsigned *out_offset,
+ struct pipe_resource **outbuf,
+ void **ptr );
+
+
+/**
+ * Allocate and write data to the upload buffer.
+ *
+ * Same as u_upload_alloc, but in addition to that, it copies "data"
+ * to the pointer returned from u_upload_alloc.
+ */
+enum pipe_error u_upload_data( struct u_upload_mgr *upload,
+ unsigned min_out_offset,
+ unsigned size,
+ const void *data,
+ unsigned *out_offset,
+ struct pipe_resource **outbuf);
+
+
+/**
+ * Allocate space in an upload buffer and copy an input buffer to it.
+ *
+ * Same as u_upload_data, except that the input data comes from a buffer
+ * instead of a user pointer.
+ */
+enum pipe_error u_upload_buffer( struct u_upload_mgr *upload,
+ unsigned min_out_offset,
+ unsigned offset,
+ unsigned size,
+ struct pipe_resource *inbuf,
+ unsigned *out_offset,
+ struct pipe_resource **outbuf);
+
+
+
+#endif
+
diff --git a/src/minigallium/auxiliary/util/u_vbuf.c b/src/minigallium/auxiliary/util/u_vbuf.c
new file mode 100644
index 0000000..b5efa88
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_vbuf.c
@@ -0,0 +1,1335 @@
+/**************************************************************************
+ *
+ * Copyright 2011 Marek Olšák <maraeo@gmail.com>
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * This module uploads user buffers and translates the vertex buffers which
+ * contain incompatible vertices (i.e. not supported by the driver/hardware)
+ * into compatible ones, based on the Gallium CAPs.
+ *
+ * It does not upload index buffers.
+ *
+ * The module heavily uses bitmasks to represent per-buffer and
+ * per-vertex-element flags to avoid looping over the list of buffers just
+ * to see if there's a non-zero stride, or user buffer, or unsupported format,
+ * etc.
+ *
+ * There are 3 categories of vertex elements, which are processed separately:
+ * - per-vertex attribs (stride != 0, instance_divisor == 0)
+ * - instanced attribs (stride != 0, instance_divisor > 0)
+ * - constant attribs (stride == 0)
+ *
+ * All needed uploads and translations are performed every draw command, but
+ * only the subset of vertices needed for that draw command is uploaded or
+ * translated. (the module never translates whole buffers)
+ *
+ *
+ * The module consists of two main parts:
+ *
+ *
+ * 1) Translate (u_vbuf_translate_begin/end)
+ *
+ * This is pretty much a vertex fetch fallback. It translates vertices from
+ * one vertex buffer to another in an unused vertex buffer slot. It does
+ * whatever is needed to make the vertices readable by the hardware (changes
+ * vertex formats and aligns offsets and strides). The translate module is
+ * used here.
+ *
+ * Each of the 3 categories is translated to a separate buffer.
+ * Only the [min_index, max_index] range is translated. For instanced attribs,
+ * the range is [start_instance, start_instance+instance_count]. For constant
+ * attribs, the range is [0, 1].
+ *
+ *
+ * 2) User buffer uploading (u_vbuf_upload_buffers)
+ *
+ * Only the [min_index, max_index] range is uploaded (just like Translate)
+ * with a single memcpy.
+ *
+ * This method works best for non-indexed draw operations or indexed draw
+ * operations where the [min_index, max_index] range is not being way bigger
+ * than the vertex count.
+ *
+ * If the range is too big (e.g. one triangle with indices {0, 1, 10000}),
+ * the per-vertex attribs are uploaded via the translate module, all packed
+ * into one vertex buffer, and the indexed draw call is turned into
+ * a non-indexed one in the process. This adds additional complexity
+ * to the translate part, but it prevents bad apps from bringing your frame
+ * rate down.
+ *
+ *
+ * If there is nothing to do, it forwards every command to the driver.
+ * The module also has its own CSO cache of vertex element states.
+ */
+
+#include "util/u_vbuf.h"
+
+#include "util/u_dump.h"
+#include "util/u_format.h"
+#include "util/u_inlines.h"
+#include "util/u_memory.h"
+#include "util/u_upload_mgr.h"
+#include "translate/translate.h"
+#include "translate/translate_cache.h"
+#include "cso_cache/cso_cache.h"
+#include "cso_cache/cso_hash.h"
+
+struct u_vbuf_elements {
+ unsigned count;
+ struct pipe_vertex_element ve[PIPE_MAX_ATTRIBS];
+
+ unsigned src_format_size[PIPE_MAX_ATTRIBS];
+
+ /* If (velem[i].src_format != native_format[i]), the vertex buffer
+ * referenced by the vertex element cannot be used for rendering and
+ * its vertex data must be translated to native_format[i]. */
+ enum pipe_format native_format[PIPE_MAX_ATTRIBS];
+ unsigned native_format_size[PIPE_MAX_ATTRIBS];
+
+ /* Which buffers are used by the vertex element state. */
+ uint32_t used_vb_mask;
+ /* This might mean two things:
+ * - src_format != native_format, as discussed above.
+ * - src_offset % 4 != 0 (if the caps don't allow such an offset). */
+ uint32_t incompatible_elem_mask; /* each bit describes a corresp. attrib */
+ /* Which buffer has at least one vertex element referencing it
+ * incompatible. */
+ uint32_t incompatible_vb_mask_any;
+ /* Which buffer has all vertex elements referencing it incompatible. */
+ uint32_t incompatible_vb_mask_all;
+ /* Which buffer has at least one vertex element referencing it
+ * compatible. */
+ uint32_t compatible_vb_mask_any;
+ /* Which buffer has all vertex elements referencing it compatible. */
+ uint32_t compatible_vb_mask_all;
+
+ /* Which buffer has at least one vertex element referencing it
+ * non-instanced. */
+ uint32_t noninstance_vb_mask_any;
+
+ void *driver_cso;
+};
+
+enum {
+ VB_VERTEX = 0,
+ VB_INSTANCE = 1,
+ VB_CONST = 2,
+ VB_NUM = 3
+};
+
+struct u_vbuf {
+ struct u_vbuf_caps caps;
+
+ struct pipe_context *pipe;
+ struct translate_cache *translate_cache;
+ struct cso_cache *cso_cache;
+ struct u_upload_mgr *uploader;
+
+ /* This is what was set in set_vertex_buffers.
+ * May contain user buffers. */
+ struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
+ uint32_t enabled_vb_mask;
+
+ /* Saved vertex buffer. */
+ unsigned aux_vertex_buffer_slot;
+ struct pipe_vertex_buffer aux_vertex_buffer_saved;
+
+ /* Vertex buffers for the driver.
+ * There are usually no user buffers. */
+ struct pipe_vertex_buffer real_vertex_buffer[PIPE_MAX_ATTRIBS];
+ uint32_t dirty_real_vb_mask; /* which buffers are dirty since the last
+ call of set_vertex_buffers */
+
+ /* The index buffer. */
+ struct pipe_index_buffer index_buffer;
+
+ /* Vertex elements. */
+ struct u_vbuf_elements *ve, *ve_saved;
+
+ /* Vertex elements used for the translate fallback. */
+ struct pipe_vertex_element fallback_velems[PIPE_MAX_ATTRIBS];
+ /* If non-NULL, this is a vertex element state used for the translate
+ * fallback and therefore used for rendering too. */
+ boolean using_translate;
+ /* The vertex buffer slot index where translated vertices have been
+ * stored in. */
+ unsigned fallback_vbs[VB_NUM];
+
+ /* Which buffer is a user buffer. */
+ uint32_t user_vb_mask; /* each bit describes a corresp. buffer */
+ /* Which buffer is incompatible (unaligned). */
+ uint32_t incompatible_vb_mask; /* each bit describes a corresp. buffer */
+ /* Which buffer has a non-zero stride. */
+ uint32_t nonzero_stride_vb_mask; /* each bit describes a corresp. buffer */
+ /* Which buffers are allowed (supported by hardware). */
+ uint32_t allowed_vb_mask;
+ /* Incompatible index buffer */
+ uint32_t incompatible_ib_mask;
+};
+
+static void *
+u_vbuf_create_vertex_elements(struct u_vbuf *mgr, unsigned count,
+ const struct pipe_vertex_element *attribs);
+static void u_vbuf_delete_vertex_elements(struct u_vbuf *mgr, void *cso);
+
+
+void u_vbuf_get_caps(struct pipe_screen *screen, struct u_vbuf_caps *caps)
+{
+ caps->format_fixed32 =
+ screen->is_format_supported(screen, PIPE_FORMAT_R32_FIXED, PIPE_BUFFER,
+ 0, PIPE_BIND_VERTEX_BUFFER);
+
+ caps->format_float16 =
+ screen->is_format_supported(screen, PIPE_FORMAT_R16_FLOAT, PIPE_BUFFER,
+ 0, PIPE_BIND_VERTEX_BUFFER);
+
+ caps->format_float64 =
+ screen->is_format_supported(screen, PIPE_FORMAT_R64_FLOAT, PIPE_BUFFER,
+ 0, PIPE_BIND_VERTEX_BUFFER);
+
+ caps->format_norm32 =
+ screen->is_format_supported(screen, PIPE_FORMAT_R32_UNORM, PIPE_BUFFER,
+ 0, PIPE_BIND_VERTEX_BUFFER) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_R32_SNORM, PIPE_BUFFER,
+ 0, PIPE_BIND_VERTEX_BUFFER);
+
+ caps->format_scaled32 =
+ screen->is_format_supported(screen, PIPE_FORMAT_R32_USCALED, PIPE_BUFFER,
+ 0, PIPE_BIND_VERTEX_BUFFER) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_R32_SSCALED, PIPE_BUFFER,
+ 0, PIPE_BIND_VERTEX_BUFFER);
+
+ caps->index_uint32 =
+ screen->is_format_supported(screen, PIPE_FORMAT_I32_UINT, PIPE_BUFFER,
+ 0, PIPE_BIND_INDEX_BUFFER);
+
+ caps->buffer_offset_unaligned =
+ !screen->get_param(screen,
+ PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY);
+
+ caps->buffer_stride_unaligned =
+ !screen->get_param(screen,
+ PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY);
+
+ caps->velem_src_offset_unaligned =
+ !screen->get_param(screen,
+ PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY);
+
+ caps->user_vertex_buffers =
+ screen->get_param(screen, PIPE_CAP_USER_VERTEX_BUFFERS);
+
+ caps->max_vertex_buffers =
+ screen->get_param(screen, PIPE_CAP_MAX_VERTEX_BUFFERS);
+}
+
+struct u_vbuf *
+u_vbuf_create(struct pipe_context *pipe,
+ struct u_vbuf_caps *caps, unsigned aux_vertex_buffer_index)
+{
+ struct u_vbuf *mgr = CALLOC_STRUCT(u_vbuf);
+
+ mgr->caps = *caps;
+ mgr->aux_vertex_buffer_slot = aux_vertex_buffer_index;
+ mgr->pipe = pipe;
+ mgr->cso_cache = cso_cache_create();
+ mgr->translate_cache = translate_cache_create();
+ memset(mgr->fallback_vbs, ~0, sizeof(mgr->fallback_vbs));
+ mgr->allowed_vb_mask = (1 << mgr->caps.max_vertex_buffers) - 1;
+
+ mgr->uploader = u_upload_create(pipe, 1024 * 1024, 4,
+ PIPE_BIND_VERTEX_BUFFER);
+
+ return mgr;
+}
+
+/* u_vbuf uses its own caching for vertex elements, because it needs to keep
+ * its own preprocessed state per vertex element CSO. */
+static struct u_vbuf_elements *
+u_vbuf_set_vertex_elements_internal(struct u_vbuf *mgr, unsigned count,
+ const struct pipe_vertex_element *states)
+{
+ struct pipe_context *pipe = mgr->pipe;
+ unsigned key_size, hash_key;
+ struct cso_hash_iter iter;
+ struct u_vbuf_elements *ve;
+ struct cso_velems_state velems_state;
+
+ /* need to include the count into the stored state data too. */
+ key_size = sizeof(struct pipe_vertex_element) * count + sizeof(unsigned);
+ velems_state.count = count;
+ memcpy(velems_state.velems, states,
+ sizeof(struct pipe_vertex_element) * count);
+ hash_key = cso_construct_key((void*)&velems_state, key_size);
+ iter = cso_find_state_template(mgr->cso_cache, hash_key, CSO_VELEMENTS,
+ (void*)&velems_state, key_size);
+
+ if (cso_hash_iter_is_null(iter)) {
+ struct cso_velements *cso = MALLOC_STRUCT(cso_velements);
+ memcpy(&cso->state, &velems_state, key_size);
+ cso->data = u_vbuf_create_vertex_elements(mgr, count, states);
+ cso->delete_state = (cso_state_callback)u_vbuf_delete_vertex_elements;
+ cso->context = (void*)mgr;
+
+ iter = cso_insert_state(mgr->cso_cache, hash_key, CSO_VELEMENTS, cso);
+ ve = cso->data;
+ } else {
+ ve = ((struct cso_velements *)cso_hash_iter_data(iter))->data;
+ }
+
+ assert(ve);
+
+ if (ve != mgr->ve)
+ pipe->bind_vertex_elements_state(pipe, ve->driver_cso);
+ return ve;
+}
+
+void u_vbuf_set_vertex_elements(struct u_vbuf *mgr, unsigned count,
+ const struct pipe_vertex_element *states)
+{
+ mgr->ve = u_vbuf_set_vertex_elements_internal(mgr, count, states);
+}
+
+void u_vbuf_destroy(struct u_vbuf *mgr)
+{
+ struct pipe_screen *screen = mgr->pipe->screen;
+ unsigned i;
+ unsigned num_vb = screen->get_shader_param(screen, PIPE_SHADER_VERTEX,
+ PIPE_SHADER_CAP_MAX_INPUTS);
+
+ mgr->pipe->set_index_buffer(mgr->pipe, NULL);
+ pipe_resource_reference(&mgr->index_buffer.buffer, NULL);
+
+ mgr->pipe->set_vertex_buffers(mgr->pipe, 0, num_vb, NULL);
+
+ for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
+ pipe_resource_reference(&mgr->vertex_buffer[i].buffer, NULL);
+ }
+ for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
+ pipe_resource_reference(&mgr->real_vertex_buffer[i].buffer, NULL);
+ }
+ pipe_resource_reference(&mgr->aux_vertex_buffer_saved.buffer, NULL);
+
+ translate_cache_destroy(mgr->translate_cache);
+ u_upload_destroy(mgr->uploader);
+ cso_cache_delete(mgr->cso_cache);
+ FREE(mgr);
+}
+
+static enum pipe_error
+u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
+ unsigned vb_mask, unsigned out_vb,
+ int start_vertex, unsigned num_vertices,
+ int start_index, unsigned num_indices, int min_index,
+ boolean unroll_indices)
+{
+ struct translate *tr;
+ struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS] = {0};
+ struct pipe_resource *out_buffer = NULL;
+ uint8_t *out_map;
+ unsigned out_offset, mask;
+ enum pipe_error err;
+
+ /* Get a translate object. */
+ tr = translate_cache_find(mgr->translate_cache, key);
+
+ /* Map buffers we want to translate. */
+ mask = vb_mask;
+ while (mask) {
+ struct pipe_vertex_buffer *vb;
+ unsigned offset;
+ uint8_t *map;
+ unsigned i = u_bit_scan(&mask);
+
+ vb = &mgr->vertex_buffer[i];
+ offset = vb->buffer_offset + vb->stride * start_vertex;
+
+ if (vb->user_buffer) {
+ map = (uint8_t*)vb->user_buffer + offset;
+ } else {
+ unsigned size = vb->stride ? num_vertices * vb->stride
+ : sizeof(double)*4;
+
+ if (offset+size > vb->buffer->width0) {
+ size = vb->buffer->width0 - offset;
+ }
+
+ map = pipe_buffer_map_range(mgr->pipe, vb->buffer, offset, size,
+ PIPE_TRANSFER_READ, &vb_transfer[i]);
+ }
+
+ /* Subtract min_index so that indexing with the index buffer works. */
+ if (unroll_indices) {
+ map -= vb->stride * min_index;
+ }
+
+ tr->set_buffer(tr, i, map, vb->stride, ~0);
+ }
+
+ /* Translate. */
+ if (unroll_indices) {
+ struct pipe_index_buffer *ib = &mgr->index_buffer;
+ struct pipe_transfer *transfer = NULL;
+ unsigned offset = ib->offset + start_index * ib->index_size;
+ uint8_t *map;
+
+ assert((ib->buffer || ib->user_buffer) && ib->index_size);
+
+ /* Create and map the output buffer. */
+ err = u_upload_alloc(mgr->uploader, 0,
+ key->output_stride * num_indices,
+ &out_offset, &out_buffer,
+ (void**)&out_map);
+ if (err != PIPE_OK)
+ return err;
+
+ if (ib->user_buffer) {
+ map = (uint8_t*)ib->user_buffer + offset;
+ } else {
+ map = pipe_buffer_map_range(mgr->pipe, ib->buffer, offset,
+ num_indices * ib->index_size,
+ PIPE_TRANSFER_READ, &transfer);
+ }
+
+ switch (ib->index_size) {
+ case 4:
+ tr->run_elts(tr, (unsigned*)map, num_indices, 0, 0, out_map);
+ break;
+ case 2:
+ tr->run_elts16(tr, (uint16_t*)map, num_indices, 0, 0, out_map);
+ break;
+ case 1:
+ tr->run_elts8(tr, map, num_indices, 0, 0, out_map);
+ break;
+ }
+
+ if (transfer) {
+ pipe_buffer_unmap(mgr->pipe, transfer);
+ }
+ } else {
+ /* Create and map the output buffer. */
+ err = u_upload_alloc(mgr->uploader,
+ key->output_stride * start_vertex,
+ key->output_stride * num_vertices,
+ &out_offset, &out_buffer,
+ (void**)&out_map);
+ if (err != PIPE_OK)
+ return err;
+
+ out_offset -= key->output_stride * start_vertex;
+
+ tr->run(tr, 0, num_vertices, 0, 0, out_map);
+ }
+
+ /* Unmap all buffers. */
+ mask = vb_mask;
+ while (mask) {
+ unsigned i = u_bit_scan(&mask);
+
+ if (vb_transfer[i]) {
+ pipe_buffer_unmap(mgr->pipe, vb_transfer[i]);
+ }
+ }
+
+ /* Setup the new vertex buffer. */
+ mgr->real_vertex_buffer[out_vb].buffer_offset = out_offset;
+ mgr->real_vertex_buffer[out_vb].stride = key->output_stride;
+
+ /* Move the buffer reference. */
+ pipe_resource_reference(
+ &mgr->real_vertex_buffer[out_vb].buffer, NULL);
+ mgr->real_vertex_buffer[out_vb].buffer = out_buffer;
+
+ return PIPE_OK;
+}
+
+static boolean
+u_vbuf_translate_find_free_vb_slots(struct u_vbuf *mgr,
+ unsigned mask[VB_NUM],
+ uint32_t extra_free_vb_mask)
+{
+ unsigned type;
+ unsigned fallback_vbs[VB_NUM];
+ /* Set the bit for each buffer which is incompatible, or isn't set. */
+ uint32_t unused_vb_mask =
+ (mgr->ve->incompatible_vb_mask_all | mgr->incompatible_vb_mask |
+ ~mgr->enabled_vb_mask | extra_free_vb_mask) & mgr->allowed_vb_mask;
+
+ memset(fallback_vbs, ~0, sizeof(fallback_vbs));
+
+ /* Find free slots for each type if needed. */
+ for (type = 0; type < VB_NUM; type++) {
+ if (mask[type]) {
+ uint32_t index;
+
+ if (!unused_vb_mask) {
+ return FALSE;
+ }
+
+ index = ffs(unused_vb_mask) - 1;
+ fallback_vbs[type] = index;
+ /*printf("found slot=%i for type=%i\n", index, type);*/
+ }
+ }
+
+ for (type = 0; type < VB_NUM; type++) {
+ if (mask[type]) {
+ mgr->dirty_real_vb_mask |= 1 << fallback_vbs[type];
+ }
+ }
+
+ memcpy(mgr->fallback_vbs, fallback_vbs, sizeof(fallback_vbs));
+ return TRUE;
+}
+
+static boolean
+u_vbuf_translate_begin(struct u_vbuf *mgr,
+ int start_vertex, unsigned num_vertices,
+ int start_instance, unsigned num_instances,
+ int start_index, unsigned num_indices, int min_index,
+ boolean unroll_indices)
+{
+ unsigned mask[VB_NUM] = {0};
+ struct translate_key key[VB_NUM];
+ unsigned elem_index[VB_NUM][PIPE_MAX_ATTRIBS]; /* ... into key.elements */
+ unsigned i, type;
+ unsigned incompatible_vb_mask = mgr->incompatible_vb_mask &
+ mgr->ve->used_vb_mask;
+ uint32_t extra_free_vb_mask = 0;
+ int start[VB_NUM] = {
+ start_vertex, /* VERTEX */
+ start_instance, /* INSTANCE */
+ 0 /* CONST */
+ };
+
+ unsigned num[VB_NUM] = {
+ num_vertices, /* VERTEX */
+ num_instances, /* INSTANCE */
+ 1 /* CONST */
+ };
+
+ memset(key, 0, sizeof(key));
+ memset(elem_index, ~0, sizeof(elem_index));
+
+ /* See if there are vertex attribs of each type to translate and
+ * which ones. */
+ for (i = 0; i < mgr->ve->count; i++) {
+ unsigned vb_index = mgr->ve->ve[i].vertex_buffer_index;
+
+ if (!mgr->vertex_buffer[vb_index].stride) {
+ if (!(mgr->ve->incompatible_elem_mask & (1 << i)) &&
+ !(incompatible_vb_mask & (1 << vb_index))) {
+ continue;
+ }
+ mask[VB_CONST] |= 1 << vb_index;
+ } else if (mgr->ve->ve[i].instance_divisor) {
+ if (!(mgr->ve->incompatible_elem_mask & (1 << i)) &&
+ !(incompatible_vb_mask & (1 << vb_index))) {
+ continue;
+ }
+ mask[VB_INSTANCE] |= 1 << vb_index;
+ } else {
+ if (!unroll_indices &&
+ !(mgr->ve->incompatible_elem_mask & (1 << i)) &&
+ !(incompatible_vb_mask & (1 << vb_index))) {
+ continue;
+ }
+ mask[VB_VERTEX] |= 1 << vb_index;
+ }
+ }
+ assert(mask[VB_VERTEX] || mask[VB_INSTANCE] || mask[VB_CONST]);
+
+ /* In the case of unroll_indices, we can regard all non-constant
+ * vertex buffers with only non-instance vertex elements as incompatible
+ * and thus free.
+ */
+ if(unroll_indices)
+ extra_free_vb_mask = mask[VB_VERTEX] & ~mask[VB_INSTANCE];
+
+ /* Find free vertex buffer slots. */
+ if (!u_vbuf_translate_find_free_vb_slots(mgr, mask, extra_free_vb_mask)) {
+ return FALSE;
+ }
+
+ /* Initialize the translate keys. */
+ for (i = 0; i < mgr->ve->count; i++) {
+ struct translate_key *k;
+ struct translate_element *te;
+ unsigned bit, vb_index = mgr->ve->ve[i].vertex_buffer_index;
+ bit = 1 << vb_index;
+
+ if (!(mgr->ve->incompatible_elem_mask & (1 << i)) &&
+ !(incompatible_vb_mask & (1 << vb_index)) &&
+ (!unroll_indices || !(mask[VB_VERTEX] & bit))) {
+ continue;
+ }
+
+ /* Set type to what we will translate.
+ * Whether vertex, instance, or constant attribs. */
+ for (type = 0; type < VB_NUM; type++) {
+ if (mask[type] & bit) {
+ break;
+ }
+ }
+ assert(type < VB_NUM);
+ assert(translate_is_output_format_supported(mgr->ve->native_format[i]));
+ /*printf("velem=%i type=%i\n", i, type);*/
+
+ /* Add the vertex element. */
+ k = &key[type];
+ elem_index[type][i] = k->nr_elements;
+
+ te = &k->element[k->nr_elements];
+ te->type = TRANSLATE_ELEMENT_NORMAL;
+ te->instance_divisor = 0;
+ te->input_buffer = vb_index;
+ te->input_format = mgr->ve->ve[i].src_format;
+ te->input_offset = mgr->ve->ve[i].src_offset;
+ te->output_format = mgr->ve->native_format[i];
+ te->output_offset = k->output_stride;
+
+ k->output_stride += mgr->ve->native_format_size[i];
+ k->nr_elements++;
+ }
+
+ /* Translate buffers. */
+ for (type = 0; type < VB_NUM; type++) {
+ if (key[type].nr_elements) {
+ enum pipe_error err;
+ err = u_vbuf_translate_buffers(mgr, &key[type], mask[type],
+ mgr->fallback_vbs[type],
+ start[type], num[type],
+ start_index, num_indices, min_index,
+ unroll_indices && type == VB_VERTEX);
+ if (err != PIPE_OK)
+ return FALSE;
+
+ /* Fixup the stride for constant attribs. */
+ if (type == VB_CONST) {
+ mgr->real_vertex_buffer[mgr->fallback_vbs[VB_CONST]].stride = 0;
+ }
+ }
+ }
+
+ /* Setup new vertex elements. */
+ for (i = 0; i < mgr->ve->count; i++) {
+ for (type = 0; type < VB_NUM; type++) {
+ if (elem_index[type][i] < key[type].nr_elements) {
+ struct translate_element *te = &key[type].element[elem_index[type][i]];
+ mgr->fallback_velems[i].instance_divisor = mgr->ve->ve[i].instance_divisor;
+ mgr->fallback_velems[i].src_format = te->output_format;
+ mgr->fallback_velems[i].src_offset = te->output_offset;
+ mgr->fallback_velems[i].vertex_buffer_index = mgr->fallback_vbs[type];
+
+ /* elem_index[type][i] can only be set for one type. */
+ assert(type > VB_INSTANCE || elem_index[type+1][i] == ~0);
+ assert(type > VB_VERTEX || elem_index[type+2][i] == ~0);
+ break;
+ }
+ }
+ /* No translating, just copy the original vertex element over. */
+ if (type == VB_NUM) {
+ memcpy(&mgr->fallback_velems[i], &mgr->ve->ve[i],
+ sizeof(struct pipe_vertex_element));
+ }
+ }
+
+ u_vbuf_set_vertex_elements_internal(mgr, mgr->ve->count,
+ mgr->fallback_velems);
+ mgr->using_translate = TRUE;
+ return TRUE;
+}
+
+static void u_vbuf_translate_end(struct u_vbuf *mgr)
+{
+ unsigned i;
+
+ /* Restore vertex elements. */
+ mgr->pipe->bind_vertex_elements_state(mgr->pipe, mgr->ve->driver_cso);
+ mgr->using_translate = FALSE;
+
+ /* Unreference the now-unused VBOs. */
+ for (i = 0; i < VB_NUM; i++) {
+ unsigned vb = mgr->fallback_vbs[i];
+ if (vb != ~0) {
+ pipe_resource_reference(&mgr->real_vertex_buffer[vb].buffer, NULL);
+ mgr->fallback_vbs[i] = ~0;
+
+ /* This will cause the buffer to be unbound in the driver later. */
+ mgr->dirty_real_vb_mask |= 1 << vb;
+ }
+ }
+}
+
+#define FORMAT_REPLACE(what, withwhat) \
+ case PIPE_FORMAT_##what: format = PIPE_FORMAT_##withwhat; break
+
+static void *
+u_vbuf_create_vertex_elements(struct u_vbuf *mgr, unsigned count,
+ const struct pipe_vertex_element *attribs)
+{
+ struct pipe_context *pipe = mgr->pipe;
+ unsigned i;
+ struct pipe_vertex_element driver_attribs[PIPE_MAX_ATTRIBS];
+ struct u_vbuf_elements *ve = CALLOC_STRUCT(u_vbuf_elements);
+ uint32_t used_buffers = 0;
+
+ ve->count = count;
+
+ memcpy(ve->ve, attribs, sizeof(struct pipe_vertex_element) * count);
+ memcpy(driver_attribs, attribs, sizeof(struct pipe_vertex_element) * count);
+
+ /* Set the best native format in case the original format is not
+ * supported. */
+ for (i = 0; i < count; i++) {
+ enum pipe_format format = ve->ve[i].src_format;
+
+ ve->src_format_size[i] = util_format_get_blocksize(format);
+
+ used_buffers |= 1 << ve->ve[i].vertex_buffer_index;
+
+ if (!ve->ve[i].instance_divisor) {
+ ve->noninstance_vb_mask_any |= 1 << ve->ve[i].vertex_buffer_index;
+ }
+
+ /* Choose a native format.
+ * For now we don't care about the alignment, that's going to
+ * be sorted out later. */
+ if (!mgr->caps.format_fixed32) {
+ switch (format) {
+ FORMAT_REPLACE(R32_FIXED, R32_FLOAT);
+ FORMAT_REPLACE(R32G32_FIXED, R32G32_FLOAT);
+ FORMAT_REPLACE(R32G32B32_FIXED, R32G32B32_FLOAT);
+ FORMAT_REPLACE(R32G32B32A32_FIXED, R32G32B32A32_FLOAT);
+ default:;
+ }
+ }
+ if (!mgr->caps.format_float16) {
+ switch (format) {
+ FORMAT_REPLACE(R16_FLOAT, R32_FLOAT);
+ FORMAT_REPLACE(R16G16_FLOAT, R32G32_FLOAT);
+ FORMAT_REPLACE(R16G16B16_FLOAT, R32G32B32_FLOAT);
+ FORMAT_REPLACE(R16G16B16A16_FLOAT, R32G32B32A32_FLOAT);
+ default:;
+ }
+ }
+ if (!mgr->caps.format_float64) {
+ switch (format) {
+ FORMAT_REPLACE(R64_FLOAT, R32_FLOAT);
+ FORMAT_REPLACE(R64G64_FLOAT, R32G32_FLOAT);
+ FORMAT_REPLACE(R64G64B64_FLOAT, R32G32B32_FLOAT);
+ FORMAT_REPLACE(R64G64B64A64_FLOAT, R32G32B32A32_FLOAT);
+ default:;
+ }
+ }
+ if (!mgr->caps.format_norm32) {
+ switch (format) {
+ FORMAT_REPLACE(R32_UNORM, R32_FLOAT);
+ FORMAT_REPLACE(R32G32_UNORM, R32G32_FLOAT);
+ FORMAT_REPLACE(R32G32B32_UNORM, R32G32B32_FLOAT);
+ FORMAT_REPLACE(R32G32B32A32_UNORM, R32G32B32A32_FLOAT);
+ FORMAT_REPLACE(R32_SNORM, R32_FLOAT);
+ FORMAT_REPLACE(R32G32_SNORM, R32G32_FLOAT);
+ FORMAT_REPLACE(R32G32B32_SNORM, R32G32B32_FLOAT);
+ FORMAT_REPLACE(R32G32B32A32_SNORM, R32G32B32A32_FLOAT);
+ default:;
+ }
+ }
+ if (!mgr->caps.format_scaled32) {
+ switch (format) {
+ FORMAT_REPLACE(R32_USCALED, R32_FLOAT);
+ FORMAT_REPLACE(R32G32_USCALED, R32G32_FLOAT);
+ FORMAT_REPLACE(R32G32B32_USCALED, R32G32B32_FLOAT);
+ FORMAT_REPLACE(R32G32B32A32_USCALED,R32G32B32A32_FLOAT);
+ FORMAT_REPLACE(R32_SSCALED, R32_FLOAT);
+ FORMAT_REPLACE(R32G32_SSCALED, R32G32_FLOAT);
+ FORMAT_REPLACE(R32G32B32_SSCALED, R32G32B32_FLOAT);
+ FORMAT_REPLACE(R32G32B32A32_SSCALED,R32G32B32A32_FLOAT);
+ default:;
+ }
+ }
+
+ driver_attribs[i].src_format = format;
+ ve->native_format[i] = format;
+ ve->native_format_size[i] =
+ util_format_get_blocksize(ve->native_format[i]);
+
+ if (ve->ve[i].src_format != format ||
+ (!mgr->caps.velem_src_offset_unaligned &&
+ ve->ve[i].src_offset % 4 != 0)) {
+ ve->incompatible_elem_mask |= 1 << i;
+ ve->incompatible_vb_mask_any |= 1 << ve->ve[i].vertex_buffer_index;
+ } else {
+ ve->compatible_vb_mask_any |= 1 << ve->ve[i].vertex_buffer_index;
+ }
+ }
+
+ if(used_buffers & ~mgr->allowed_vb_mask)
+ {
+ /* More vertex buffers are used than the hardware supports. In
+ * principle, we only need to make sure that less vertex buffers are
+ * used, and mark some of the latter vertex buffers as incompatible.
+ * For now, mark all vertex buffers as incompatible.
+ */
+ ve->incompatible_vb_mask_any = used_buffers;
+ ve->compatible_vb_mask_any = 0;
+ ve->incompatible_elem_mask = (1<<count)-1;
+ }
+
+ ve->used_vb_mask = used_buffers;
+ ve->compatible_vb_mask_all = ~ve->incompatible_vb_mask_any & used_buffers;
+ ve->incompatible_vb_mask_all = ~ve->compatible_vb_mask_any & used_buffers;
+
+ /* Align the formats to the size of DWORD if needed. */
+ if (!mgr->caps.velem_src_offset_unaligned) {
+ for (i = 0; i < count; i++) {
+ ve->native_format_size[i] = align(ve->native_format_size[i], 4);
+ }
+ }
+
+ /* Only create driver CSO if no incompatible elements */
+ if(!ve->incompatible_elem_mask)
+ {
+ ve->driver_cso =
+ pipe->create_vertex_elements_state(pipe, count, driver_attribs);
+ }
+ return ve;
+}
+
+static void u_vbuf_delete_vertex_elements(struct u_vbuf *mgr, void *cso)
+{
+ struct pipe_context *pipe = mgr->pipe;
+ struct u_vbuf_elements *ve = cso;
+
+ pipe->delete_vertex_elements_state(pipe, ve->driver_cso);
+ FREE(ve);
+}
+
+void u_vbuf_set_vertex_buffers(struct u_vbuf *mgr,
+ unsigned start_slot, unsigned count,
+ const struct pipe_vertex_buffer *bufs)
+{
+ unsigned i;
+ /* which buffers are enabled */
+ uint32_t enabled_vb_mask = 0;
+ /* which buffers are in user memory */
+ uint32_t user_vb_mask = 0;
+ /* which buffers are incompatible with the driver */
+ uint32_t incompatible_vb_mask = 0;
+ /* which buffers have a non-zero stride */
+ uint32_t nonzero_stride_vb_mask = 0;
+ uint32_t mask = ~(((1ull << count) - 1) << start_slot);
+
+ /* Zero out the bits we are going to rewrite completely. */
+ mgr->user_vb_mask &= mask;
+ mgr->incompatible_vb_mask &= mask;
+ mgr->nonzero_stride_vb_mask &= mask;
+ mgr->enabled_vb_mask &= mask;
+
+ if (!bufs) {
+ struct pipe_context *pipe = mgr->pipe;
+ /* Unbind. */
+ mgr->dirty_real_vb_mask &= mask;
+
+ for (i = 0; i < count; i++) {
+ unsigned dst_index = start_slot + i;
+
+ pipe_resource_reference(&mgr->vertex_buffer[dst_index].buffer, NULL);
+ pipe_resource_reference(&mgr->real_vertex_buffer[dst_index].buffer,
+ NULL);
+ }
+
+ pipe->set_vertex_buffers(pipe, start_slot, count, NULL);
+ return;
+ }
+
+ for (i = 0; i < count; i++) {
+ unsigned dst_index = start_slot + i;
+ const struct pipe_vertex_buffer *vb = &bufs[i];
+ struct pipe_vertex_buffer *orig_vb = &mgr->vertex_buffer[dst_index];
+ struct pipe_vertex_buffer *real_vb = &mgr->real_vertex_buffer[dst_index];
+
+ if (!vb->buffer && !vb->user_buffer) {
+ pipe_resource_reference(&orig_vb->buffer, NULL);
+ pipe_resource_reference(&real_vb->buffer, NULL);
+ real_vb->user_buffer = NULL;
+ continue;
+ }
+
+ pipe_resource_reference(&orig_vb->buffer, vb->buffer);
+ orig_vb->user_buffer = vb->user_buffer;
+
+ real_vb->buffer_offset = orig_vb->buffer_offset = vb->buffer_offset;
+ real_vb->stride = orig_vb->stride = vb->stride;
+
+ if (vb->stride) {
+ nonzero_stride_vb_mask |= 1 << dst_index;
+ }
+ enabled_vb_mask |= 1 << dst_index;
+
+ if ((!mgr->caps.buffer_offset_unaligned && vb->buffer_offset % 4 != 0) ||
+ (!mgr->caps.buffer_stride_unaligned && vb->stride % 4 != 0)) {
+ incompatible_vb_mask |= 1 << dst_index;
+ pipe_resource_reference(&real_vb->buffer, NULL);
+ continue;
+ }
+
+ if (!mgr->caps.user_vertex_buffers && vb->user_buffer) {
+ user_vb_mask |= 1 << dst_index;
+ pipe_resource_reference(&real_vb->buffer, NULL);
+ continue;
+ }
+
+ pipe_resource_reference(&real_vb->buffer, vb->buffer);
+ real_vb->user_buffer = vb->user_buffer;
+ }
+
+ mgr->user_vb_mask |= user_vb_mask;
+ mgr->incompatible_vb_mask |= incompatible_vb_mask;
+ mgr->nonzero_stride_vb_mask |= nonzero_stride_vb_mask;
+ mgr->enabled_vb_mask |= enabled_vb_mask;
+
+ /* All changed buffers are marked as dirty, even the NULL ones,
+ * which will cause the NULL buffers to be unbound in the driver later. */
+ mgr->dirty_real_vb_mask |= ~mask;
+}
+
+void u_vbuf_set_index_buffer(struct u_vbuf *mgr,
+ const struct pipe_index_buffer *ib)
+{
+ struct pipe_context *pipe = mgr->pipe;
+
+ if (ib) {
+ assert(ib->offset % ib->index_size == 0);
+ pipe_resource_reference(&mgr->index_buffer.buffer, ib->buffer);
+ memcpy(&mgr->index_buffer, ib, sizeof(*ib));
+ mgr->incompatible_ib_mask = !mgr->caps.index_uint32 && ib->index_size==4;
+ } else {
+ pipe_resource_reference(&mgr->index_buffer.buffer, NULL);
+ mgr->incompatible_ib_mask = 0;
+ }
+
+ pipe->set_index_buffer(pipe, ib);
+}
+
+static enum pipe_error
+u_vbuf_upload_buffers(struct u_vbuf *mgr,
+ int start_vertex, unsigned num_vertices,
+ int start_instance, unsigned num_instances)
+{
+ unsigned i;
+ unsigned nr_velems = mgr->ve->count;
+ struct pipe_vertex_element *velems =
+ mgr->using_translate ? mgr->fallback_velems : mgr->ve->ve;
+ unsigned start_offset[PIPE_MAX_ATTRIBS];
+ unsigned end_offset[PIPE_MAX_ATTRIBS];
+ uint32_t buffer_mask = 0;
+
+ /* Determine how much data needs to be uploaded. */
+ for (i = 0; i < nr_velems; i++) {
+ struct pipe_vertex_element *velem = &velems[i];
+ unsigned index = velem->vertex_buffer_index;
+ struct pipe_vertex_buffer *vb = &mgr->vertex_buffer[index];
+ unsigned instance_div, first, size, index_bit;
+
+ /* Skip the buffers generated by translate. */
+ if (index == mgr->fallback_vbs[VB_VERTEX] ||
+ index == mgr->fallback_vbs[VB_INSTANCE] ||
+ index == mgr->fallback_vbs[VB_CONST]) {
+ continue;
+ }
+
+ if (!vb->user_buffer) {
+ continue;
+ }
+
+ instance_div = velem->instance_divisor;
+ first = vb->buffer_offset + velem->src_offset;
+
+ if (!vb->stride) {
+ /* Constant attrib. */
+ size = mgr->ve->src_format_size[i];
+ } else if (instance_div) {
+ /* Per-instance attrib. */
+ unsigned count = (num_instances + instance_div - 1) / instance_div;
+ first += vb->stride * start_instance;
+ size = vb->stride * (count - 1) + mgr->ve->src_format_size[i];
+ } else {
+ /* Per-vertex attrib. */
+ first += vb->stride * start_vertex;
+ size = vb->stride * (num_vertices - 1) + mgr->ve->src_format_size[i];
+ }
+
+ index_bit = 1 << index;
+
+ /* Update offsets. */
+ if (!(buffer_mask & index_bit)) {
+ start_offset[index] = first;
+ end_offset[index] = first + size;
+ } else {
+ if (first < start_offset[index])
+ start_offset[index] = first;
+ if (first + size > end_offset[index])
+ end_offset[index] = first + size;
+ }
+
+ buffer_mask |= index_bit;
+ }
+
+ /* Upload buffers. */
+ while (buffer_mask) {
+ unsigned start, end;
+ struct pipe_vertex_buffer *real_vb;
+ const uint8_t *ptr;
+ enum pipe_error err;
+
+ i = u_bit_scan(&buffer_mask);
+
+ start = start_offset[i];
+ end = end_offset[i];
+ assert(start < end);
+
+ real_vb = &mgr->real_vertex_buffer[i];
+ ptr = mgr->vertex_buffer[i].user_buffer;
+
+ err = u_upload_data(mgr->uploader, start, end - start, ptr + start,
+ &real_vb->buffer_offset, &real_vb->buffer);
+ if (err != PIPE_OK)
+ return err;
+
+ real_vb->buffer_offset -= start;
+ }
+
+ return PIPE_OK;
+}
+
+static boolean u_vbuf_need_minmax_index(struct u_vbuf *mgr)
+{
+ /* See if there are any per-vertex attribs which will be uploaded or
+ * translated. Use bitmasks to get the info instead of looping over vertex
+ * elements. */
+ return (mgr->ve->used_vb_mask &
+ ((mgr->user_vb_mask | mgr->incompatible_vb_mask |
+ mgr->ve->incompatible_vb_mask_any) &
+ mgr->ve->noninstance_vb_mask_any & mgr->nonzero_stride_vb_mask)) != 0 ||
+ mgr->incompatible_ib_mask;
+}
+
+static boolean u_vbuf_mapping_vertex_buffer_blocks(struct u_vbuf *mgr)
+{
+ /* Return true if there are hw buffers which don't need to be translated.
+ *
+ * We could query whether each buffer is busy, but that would
+ * be way more costly than this. */
+ return (mgr->ve->used_vb_mask &
+ (~mgr->user_vb_mask & ~mgr->incompatible_vb_mask &
+ mgr->ve->compatible_vb_mask_all & mgr->ve->noninstance_vb_mask_any &
+ mgr->nonzero_stride_vb_mask)) != 0;
+}
+
+static void u_vbuf_get_minmax_index(struct pipe_context *pipe,
+ struct pipe_index_buffer *ib,
+ const struct pipe_draw_info *info,
+ int *out_min_index,
+ int *out_max_index)
+{
+ struct pipe_transfer *transfer = NULL;
+ const void *indices;
+ unsigned i;
+ unsigned restart_index = info->restart_index;
+
+ if (ib->user_buffer) {
+ indices = (uint8_t*)ib->user_buffer +
+ ib->offset + info->start * ib->index_size;
+ } else {
+ indices = pipe_buffer_map_range(pipe, ib->buffer,
+ ib->offset + info->start * ib->index_size,
+ info->count * ib->index_size,
+ PIPE_TRANSFER_READ, &transfer);
+ }
+
+ switch (ib->index_size) {
+ case 4: {
+ const unsigned *ui_indices = (const unsigned*)indices;
+ unsigned max_ui = 0;
+ unsigned min_ui = ~0U;
+ if (info->primitive_restart) {
+ for (i = 0; i < info->count; i++) {
+ if (ui_indices[i] != restart_index) {
+ if (ui_indices[i] > max_ui) max_ui = ui_indices[i];
+ if (ui_indices[i] < min_ui) min_ui = ui_indices[i];
+ }
+ }
+ }
+ else {
+ for (i = 0; i < info->count; i++) {
+ if (ui_indices[i] > max_ui) max_ui = ui_indices[i];
+ if (ui_indices[i] < min_ui) min_ui = ui_indices[i];
+ }
+ }
+ *out_min_index = min_ui;
+ *out_max_index = max_ui;
+ break;
+ }
+ case 2: {
+ const unsigned short *us_indices = (const unsigned short*)indices;
+ unsigned max_us = 0;
+ unsigned min_us = ~0U;
+ if (info->primitive_restart) {
+ for (i = 0; i < info->count; i++) {
+ if (us_indices[i] != restart_index) {
+ if (us_indices[i] > max_us) max_us = us_indices[i];
+ if (us_indices[i] < min_us) min_us = us_indices[i];
+ }
+ }
+ }
+ else {
+ for (i = 0; i < info->count; i++) {
+ if (us_indices[i] > max_us) max_us = us_indices[i];
+ if (us_indices[i] < min_us) min_us = us_indices[i];
+ }
+ }
+ *out_min_index = min_us;
+ *out_max_index = max_us;
+ break;
+ }
+ case 1: {
+ const unsigned char *ub_indices = (const unsigned char*)indices;
+ unsigned max_ub = 0;
+ unsigned min_ub = ~0U;
+ if (info->primitive_restart) {
+ for (i = 0; i < info->count; i++) {
+ if (ub_indices[i] != restart_index) {
+ if (ub_indices[i] > max_ub) max_ub = ub_indices[i];
+ if (ub_indices[i] < min_ub) min_ub = ub_indices[i];
+ }
+ }
+ }
+ else {
+ for (i = 0; i < info->count; i++) {
+ if (ub_indices[i] > max_ub) max_ub = ub_indices[i];
+ if (ub_indices[i] < min_ub) min_ub = ub_indices[i];
+ }
+ }
+ *out_min_index = min_ub;
+ *out_max_index = max_ub;
+ break;
+ }
+ default:
+ assert(0);
+ *out_min_index = 0;
+ *out_max_index = 0;
+ }
+
+ if (transfer) {
+ pipe_buffer_unmap(pipe, transfer);
+ }
+}
+
+static void u_vbuf_set_driver_vertex_buffers(struct u_vbuf *mgr)
+{
+ struct pipe_context *pipe = mgr->pipe;
+ unsigned start_slot, count;
+
+ start_slot = ffs(mgr->dirty_real_vb_mask) - 1;
+ count = util_last_bit(mgr->dirty_real_vb_mask >> start_slot);
+
+ pipe->set_vertex_buffers(pipe, start_slot, count,
+ mgr->real_vertex_buffer + start_slot);
+ mgr->dirty_real_vb_mask = 0;
+}
+
+void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info)
+{
+ struct pipe_context *pipe = mgr->pipe;
+ int start_vertex, min_index;
+ unsigned num_vertices;
+ boolean unroll_indices = FALSE;
+ uint32_t used_vb_mask = mgr->ve->used_vb_mask;
+ uint32_t user_vb_mask = mgr->user_vb_mask & used_vb_mask;
+ uint32_t incompatible_vb_mask = mgr->incompatible_vb_mask & used_vb_mask;
+
+ /* Normal draw. No fallback and no user buffers. */
+ if (!incompatible_vb_mask &&
+ !mgr->ve->incompatible_elem_mask &&
+ !user_vb_mask) {
+
+ /* Set vertex buffers if needed. */
+ if (mgr->dirty_real_vb_mask & used_vb_mask) {
+ u_vbuf_set_driver_vertex_buffers(mgr);
+ }
+
+ pipe->draw_vbo(pipe, info);
+ return;
+ }
+
+ if (info->indexed) {
+ /* See if anything needs to be done for per-vertex attribs. */
+ if (u_vbuf_need_minmax_index(mgr)) {
+ int max_index;
+
+ if (info->max_index != ~0) {
+ min_index = info->min_index;
+ max_index = info->max_index;
+ } else {
+ u_vbuf_get_minmax_index(mgr->pipe, &mgr->index_buffer, info,
+ &min_index, &max_index);
+ }
+
+ assert(min_index <= max_index);
+
+ start_vertex = min_index + info->index_bias;
+ num_vertices = max_index + 1 - min_index;
+
+ /* Primitive restart doesn't work when unrolling indices.
+ * We would have to break this drawing operation into several ones. */
+ /* Use some heuristic to see if unrolling indices improves
+ * performance. Force unroll indices always if the index format is
+ * incompatible (don't support primitive restart in this case...). */
+ if ((!info->primitive_restart &&
+ num_vertices > info->count*2 &&
+ num_vertices-info->count > 32 &&
+ !u_vbuf_mapping_vertex_buffer_blocks(mgr))
+ || mgr->incompatible_ib_mask) {
+ /*printf("num_vertices=%i count=%i\n", num_vertices, info->count);*/
+ unroll_indices = TRUE;
+ user_vb_mask &= ~(mgr->nonzero_stride_vb_mask &
+ mgr->ve->noninstance_vb_mask_any);
+ }
+ } else {
+ /* Nothing to do for per-vertex attribs. */
+ start_vertex = 0;
+ num_vertices = 0;
+ min_index = 0;
+ }
+ } else {
+ start_vertex = info->start;
+ num_vertices = info->count;
+ min_index = 0;
+ }
+
+ /* Translate vertices with non-native layouts or formats. */
+ if (unroll_indices ||
+ incompatible_vb_mask ||
+ mgr->ve->incompatible_elem_mask) {
+ if (!u_vbuf_translate_begin(mgr, start_vertex, num_vertices,
+ info->start_instance, info->instance_count,
+ info->start, info->count, min_index,
+ unroll_indices)) {
+ debug_warn_once("u_vbuf_translate_begin() failed");
+ return;
+ }
+
+ user_vb_mask &= ~(incompatible_vb_mask |
+ mgr->ve->incompatible_vb_mask_all);
+ }
+
+ /* Upload user buffers. */
+ if (user_vb_mask) {
+ if (u_vbuf_upload_buffers(mgr, start_vertex, num_vertices,
+ info->start_instance,
+ info->instance_count) != PIPE_OK) {
+ debug_warn_once("u_vbuf_upload_buffers() failed");
+ return;
+ }
+
+ mgr->dirty_real_vb_mask |= user_vb_mask;
+ }
+
+ /*
+ if (unroll_indices) {
+ printf("unrolling indices: start_vertex = %i, num_vertices = %i\n",
+ start_vertex, num_vertices);
+ util_dump_draw_info(stdout, info);
+ printf("\n");
+ }
+
+ unsigned i;
+ for (i = 0; i < mgr->nr_vertex_buffers; i++) {
+ printf("input %i: ", i);
+ util_dump_vertex_buffer(stdout, mgr->vertex_buffer+i);
+ printf("\n");
+ }
+ for (i = 0; i < mgr->nr_real_vertex_buffers; i++) {
+ printf("real %i: ", i);
+ util_dump_vertex_buffer(stdout, mgr->real_vertex_buffer+i);
+ printf("\n");
+ }
+ */
+
+ u_upload_unmap(mgr->uploader);
+ u_vbuf_set_driver_vertex_buffers(mgr);
+
+ if (unlikely(unroll_indices)) {
+ struct pipe_draw_info new_info = *info;
+ new_info.indexed = FALSE;
+ new_info.index_bias = 0;
+ new_info.min_index = 0;
+ new_info.max_index = info->count - 1;
+ new_info.start = 0;
+
+ pipe->draw_vbo(pipe, &new_info);
+ } else {
+ pipe->draw_vbo(pipe, info);
+ }
+
+ if (mgr->using_translate) {
+ u_vbuf_translate_end(mgr);
+ }
+}
+
+void u_vbuf_save_vertex_elements(struct u_vbuf *mgr)
+{
+ assert(!mgr->ve_saved);
+ mgr->ve_saved = mgr->ve;
+}
+
+void u_vbuf_restore_vertex_elements(struct u_vbuf *mgr)
+{
+ if (mgr->ve != mgr->ve_saved) {
+ struct pipe_context *pipe = mgr->pipe;
+
+ mgr->ve = mgr->ve_saved;
+ pipe->bind_vertex_elements_state(pipe,
+ mgr->ve ? mgr->ve->driver_cso : NULL);
+ }
+ mgr->ve_saved = NULL;
+}
+
+void u_vbuf_save_aux_vertex_buffer_slot(struct u_vbuf *mgr)
+{
+ struct pipe_vertex_buffer *vb =
+ &mgr->vertex_buffer[mgr->aux_vertex_buffer_slot];
+
+ pipe_resource_reference(&mgr->aux_vertex_buffer_saved.buffer, vb->buffer);
+ memcpy(&mgr->aux_vertex_buffer_saved, vb, sizeof(*vb));
+}
+
+void u_vbuf_restore_aux_vertex_buffer_slot(struct u_vbuf *mgr)
+{
+ u_vbuf_set_vertex_buffers(mgr, mgr->aux_vertex_buffer_slot, 1,
+ &mgr->aux_vertex_buffer_saved);
+ pipe_resource_reference(&mgr->aux_vertex_buffer_saved.buffer, NULL);
+}
diff --git a/src/minigallium/auxiliary/util/u_vbuf.h b/src/minigallium/auxiliary/util/u_vbuf.h
new file mode 100644
index 0000000..1a878c4
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_vbuf.h
@@ -0,0 +1,93 @@
+/**************************************************************************
+ *
+ * Copyright 2011 Marek Olšák <maraeo@gmail.com>
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_VBUF_H
+#define U_VBUF_H
+
+/* This module takes care of user buffer uploads and vertex format fallbacks.
+ * It's designed for the drivers which don't want to use the Draw module.
+ * There is a more detailed description at the beginning of the .c file.
+ */
+
+#include "pipe/p_context.h"
+#include "pipe/p_state.h"
+
+struct cso_context;
+struct u_vbuf;
+
+/* Hardware vertex fetcher limitations can be described by this structure. */
+struct u_vbuf_caps {
+ /* Vertex format CAPs. */
+ /* TRUE if hardware supports it. */
+ unsigned format_fixed32:1; /* PIPE_FORMAT_*32*_FIXED */
+ unsigned format_float16:1; /* PIPE_FORMAT_*16*_FLOAT */
+ unsigned format_float64:1; /* PIPE_FORMAT_*64*_FLOAT */
+ unsigned format_norm32:1; /* PIPE_FORMAT_*32*NORM */
+ unsigned format_scaled32:1; /* PIPE_FORMAT_*32*SCALED */
+
+ /* Index format CAPs. */
+ unsigned index_uint32:1; /* PIPE_FORMAT_I32_UINT */
+
+ /* Whether vertex fetches don't have to be 4-byte-aligned. */
+ /* TRUE if hardware supports it. */
+ unsigned buffer_offset_unaligned:1;
+ unsigned buffer_stride_unaligned:1;
+ unsigned velem_src_offset_unaligned:1;
+
+ /* Whether the driver supports user vertex buffers. */
+ unsigned user_vertex_buffers:1;
+
+ /* Maximum number of vertex buffers */
+ unsigned max_vertex_buffers:7;
+};
+
+
+void u_vbuf_get_caps(struct pipe_screen *screen, struct u_vbuf_caps *caps);
+
+struct u_vbuf *
+u_vbuf_create(struct pipe_context *pipe,
+ struct u_vbuf_caps *caps, unsigned aux_vertex_buffer_index);
+
+void u_vbuf_destroy(struct u_vbuf *mgr);
+
+/* State and draw functions. */
+void u_vbuf_set_vertex_elements(struct u_vbuf *mgr, unsigned count,
+ const struct pipe_vertex_element *states);
+void u_vbuf_set_vertex_buffers(struct u_vbuf *mgr,
+ unsigned start_slot, unsigned count,
+ const struct pipe_vertex_buffer *bufs);
+void u_vbuf_set_index_buffer(struct u_vbuf *mgr,
+ const struct pipe_index_buffer *ib);
+void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info);
+
+/* Save/restore functionality. */
+void u_vbuf_save_vertex_elements(struct u_vbuf *mgr);
+void u_vbuf_restore_vertex_elements(struct u_vbuf *mgr);
+void u_vbuf_save_aux_vertex_buffer_slot(struct u_vbuf *mgr);
+void u_vbuf_restore_aux_vertex_buffer_slot(struct u_vbuf *mgr);
+
+#endif
diff --git a/src/minigallium/auxiliary/util/u_video.h b/src/minigallium/auxiliary/util/u_video.h
new file mode 100644
index 0000000..276e460
--- /dev/null
+++ b/src/minigallium/auxiliary/util/u_video.h
@@ -0,0 +1,75 @@
+/**************************************************************************
+ *
+ * Copyright 2009 Younes Manton.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef U_VIDEO_H
+#define U_VIDEO_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "pipe/p_defines.h"
+#include "pipe/p_video_enums.h"
+
+/* u_reduce_video_profile() needs these */
+#include "pipe/p_compiler.h"
+#include "util/u_debug.h"
+
+static INLINE enum pipe_video_format
+u_reduce_video_profile(enum pipe_video_profile profile)
+{
+ switch (profile)
+ {
+ case PIPE_VIDEO_PROFILE_MPEG1:
+ case PIPE_VIDEO_PROFILE_MPEG2_SIMPLE:
+ case PIPE_VIDEO_PROFILE_MPEG2_MAIN:
+ return PIPE_VIDEO_FORMAT_MPEG12;
+
+ case PIPE_VIDEO_PROFILE_MPEG4_SIMPLE:
+ case PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE:
+ return PIPE_VIDEO_FORMAT_MPEG4;
+
+ case PIPE_VIDEO_PROFILE_VC1_SIMPLE:
+ case PIPE_VIDEO_PROFILE_VC1_MAIN:
+ case PIPE_VIDEO_PROFILE_VC1_ADVANCED:
+ return PIPE_VIDEO_FORMAT_VC1;
+
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE:
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN:
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
+ return PIPE_VIDEO_FORMAT_MPEG4_AVC;
+
+ default:
+ return PIPE_VIDEO_FORMAT_UNKNOWN;
+ }
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* U_VIDEO_H */
diff --git a/src/minigallium/include/c99_compat.h b/src/minigallium/include/c99_compat.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/minigallium/include/c99_compat.h
diff --git a/src/minigallium/include/pipe/p_compiler.h b/src/minigallium/include/pipe/p_compiler.h
new file mode 100644
index 0000000..78ec83c
--- /dev/null
+++ b/src/minigallium/include/pipe/p_compiler.h
@@ -0,0 +1,267 @@
+/**************************************************************************
+ *
+ * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef P_COMPILER_H
+#define P_COMPILER_H
+
+
+#include "c99_compat.h" /* inline, __func__, etc. */
+
+#include "p_config.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <stddef.h>
+#include <stdarg.h>
+#include <limits.h>
+
+
+#if defined(_WIN32) && !defined(__WIN32__)
+#define __WIN32__
+#endif
+
+#if defined(_MSC_VER)
+
+/* Avoid 'expression is always true' warning */
+#pragma warning(disable: 4296)
+
+#endif /* _MSC_VER */
+
+
+/*
+ * Alternative stdint.h and stdbool.h headers are supplied in include/c99 for
+ * systems that lack it.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+#include <stdint.h>
+#include <stdbool.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if !defined(__HAIKU__) && !defined(__USE_MISC)
+#if !defined(PIPE_OS_ANDROID)
+typedef unsigned int uint;
+#endif
+typedef unsigned short ushort;
+#endif
+typedef unsigned char ubyte;
+
+typedef unsigned char boolean;
+#ifndef TRUE
+#define TRUE true
+#endif
+#ifndef FALSE
+#define FALSE false
+#endif
+
+#ifndef va_copy
+#ifdef __va_copy
+#define va_copy(dest, src) __va_copy((dest), (src))
+#else
+#define va_copy(dest, src) (dest) = (src)
+#endif
+#endif
+
+/* XXX: Use standard `inline` keyword instead */
+#ifndef INLINE
+# define INLINE inline
+#endif
+
+/* Forced function inlining */
+#ifndef ALWAYS_INLINE
+# ifdef __GNUC__
+# define ALWAYS_INLINE inline __attribute__((always_inline))
+# elif defined(_MSC_VER)
+# define ALWAYS_INLINE __forceinline
+# else
+# define ALWAYS_INLINE INLINE
+# endif
+#endif
+
+
+/* Function visibility */
+#ifndef PUBLIC
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# define PUBLIC __attribute__((visibility("default")))
+# elif defined(_MSC_VER)
+# define PUBLIC __declspec(dllexport)
+# else
+# define PUBLIC
+# endif
+#endif
+
+
+/* XXX: Use standard `__func__` instead */
+#ifndef __FUNCTION__
+# define __FUNCTION__ __func__
+#endif
+
+
+/* This should match linux gcc cdecl semantics everywhere, so that we
+ * just codegen one calling convention on all platforms.
+ */
+#ifdef _MSC_VER
+#define PIPE_CDECL __cdecl
+#else
+#define PIPE_CDECL
+#endif
+
+
+
+#if defined(__GNUC__)
+#define PIPE_DEPRECATED __attribute__((__deprecated__))
+#else
+#define PIPE_DEPRECATED
+#endif
+
+
+
+/* Macros for data alignment. */
+#if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) || defined(__SUNPRO_CC)
+
+/* See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Type-Attributes.html */
+#define PIPE_ALIGN_TYPE(_alignment, _type) _type __attribute__((aligned(_alignment)))
+
+/* See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Variable-Attributes.html */
+#define PIPE_ALIGN_VAR(_alignment) __attribute__((aligned(_alignment)))
+
+#if (__GNUC__ > 4 || (__GNUC__ == 4 &&__GNUC_MINOR__>1)) && !defined(PIPE_ARCH_X86_64)
+#define PIPE_ALIGN_STACK __attribute__((force_align_arg_pointer))
+#else
+#define PIPE_ALIGN_STACK
+#endif
+
+#elif defined(_MSC_VER)
+
+/* See http://msdn.microsoft.com/en-us/library/83ythb65.aspx */
+#define PIPE_ALIGN_TYPE(_alignment, _type) __declspec(align(_alignment)) _type
+#define PIPE_ALIGN_VAR(_alignment) __declspec(align(_alignment))
+
+#define PIPE_ALIGN_STACK
+
+#elif defined(SWIG)
+
+#define PIPE_ALIGN_TYPE(_alignment, _type) _type
+#define PIPE_ALIGN_VAR(_alignment)
+
+#define PIPE_ALIGN_STACK
+
+#else
+
+#error "Unsupported compiler"
+
+#endif
+
+
+#if defined(__GNUC__)
+
+#define PIPE_READ_WRITE_BARRIER() __asm__("":::"memory")
+
+#elif defined(_MSC_VER)
+
+void _ReadWriteBarrier(void);
+#pragma intrinsic(_ReadWriteBarrier)
+#define PIPE_READ_WRITE_BARRIER() _ReadWriteBarrier()
+
+#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+
+#define PIPE_READ_WRITE_BARRIER() __machine_rw_barrier()
+
+#else
+
+#warning "Unsupported compiler"
+#define PIPE_READ_WRITE_BARRIER() /* */
+
+#endif
+
+
+/* You should use these macros to mark if blocks where the if condition
+ * is either likely to be true, or unlikely to be true.
+ *
+ * This will inform human readers of this fact, and will also inform
+ * the compiler, who will in turn inform the CPU.
+ *
+ * CPUs often start executing code inside the if or the else blocks
+ * without knowing whether the condition is true or not, and will have
+ * to throw the work away if they find out later they executed the
+ * wrong part of the if.
+ *
+ * If these macros are used, the CPU is more likely to correctly predict
+ * the right path, and will avoid speculatively executing the wrong branch,
+ * thus not throwing away work, resulting in better performance.
+ *
+ * In light of this, it is also a good idea to mark as "likely" a path
+ * which is not necessarily always more likely, but that will benefit much
+ * more from performance improvements since it is already much faster than
+ * the other path, or viceversa with "unlikely".
+ *
+ * Example usage:
+ * if(unlikely(do_we_need_a_software_fallback()))
+ * do_software_fallback();
+ * else
+ * render_with_gpu();
+ *
+ * The macros follow the Linux kernel convention, and more examples can
+ * be found there.
+ *
+ * Note that profile guided optimization can offer better results, but
+ * needs an appropriate coverage suite and does not inform human readers.
+ */
+#ifndef likely
+# if defined(__GNUC__)
+# define likely(x) __builtin_expect(!!(x), 1)
+# define unlikely(x) __builtin_expect(!!(x), 0)
+# else
+# define likely(x) (x)
+# define unlikely(x) (x)
+# endif
+#endif
+
+
+/**
+ * Static (compile-time) assertion.
+ * Basically, use COND to dimension an array. If COND is false/zero the
+ * array size will be -1 and we'll get a compilation error.
+ */
+#define STATIC_ASSERT(COND) \
+ do { \
+ (void) sizeof(char [1 - 2*!(COND)]); \
+ } while (0)
+
+
+#if defined(__cplusplus)
+}
+#endif
+
+
+#endif /* P_COMPILER_H */
diff --git a/src/minigallium/include/pipe/p_config.h b/src/minigallium/include/pipe/p_config.h
new file mode 100644
index 0000000..9bccf32
--- /dev/null
+++ b/src/minigallium/include/pipe/p_config.h
@@ -0,0 +1,259 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ * Gallium configuration defines.
+ *
+ * This header file sets several defines based on the compiler, processor
+ * architecture, and operating system being used. These defines should be used
+ * throughout the code to facilitate porting to new platforms. It is likely that
+ * this file is auto-generated by an autoconf-like tool at some point, as some
+ * things cannot be determined by pre-defined environment alone.
+ *
+ * See also:
+ * - http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
+ * - echo | gcc -dM -E - | sort
+ * - http://msdn.microsoft.com/en-us/library/b0084kay.aspx
+ *
+ * @author José Fonseca <jrfonseca@tungstengraphics.com>
+ */
+
+#ifndef P_CONFIG_H_
+#define P_CONFIG_H_
+
+#include <limits.h>
+/*
+ * Compiler
+ */
+
+#if defined(__GNUC__)
+#define PIPE_CC_GCC
+#define PIPE_CC_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
+#endif
+
+/*
+ * Meaning of _MSC_VER value:
+ * - 1800: Visual Studio 2013
+ * - 1700: Visual Studio 2012
+ * - 1600: Visual Studio 2010
+ * - 1500: Visual Studio 2008
+ * - 1400: Visual C++ 2005
+ * - 1310: Visual C++ .NET 2003
+ * - 1300: Visual C++ .NET 2002
+ *
+ * __MSC__ seems to be an old macro -- it is not pre-defined on recent MSVC
+ * versions.
+ */
+#if defined(_MSC_VER) || defined(__MSC__)
+#define PIPE_CC_MSVC
+#endif
+
+#if defined(__ICL)
+#define PIPE_CC_ICL
+#endif
+
+#if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+#define PIPE_CC_SUNPRO
+#endif
+
+
+/*
+ * Processor architecture
+ */
+
+#if defined(__i386__) /* gcc */ || defined(_M_IX86) /* msvc */ || defined(_X86_) || defined(__386__) || defined(i386) || defined(__i386) /* Sun cc */
+#define PIPE_ARCH_X86
+#endif
+
+#if defined(__x86_64__) /* gcc */ || defined(_M_X64) /* msvc */ || defined(_M_AMD64) /* msvc */ || defined(__x86_64) /* Sun cc */
+#define PIPE_ARCH_X86_64
+#endif
+
+#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
+#if defined(PIPE_CC_GCC) && !defined(__SSE2__)
+/* #warning SSE2 support requires -msse -msse2 compiler options */
+#else
+#define PIPE_ARCH_SSE
+#endif
+#if defined(PIPE_CC_GCC) && !defined(__SSSE3__)
+/* #warning SSE3 support requires -msse3 compiler options */
+#else
+#define PIPE_ARCH_SSSE3
+#endif
+#endif
+
+#if defined(__ppc__) || defined(__ppc64__) || defined(__PPC__)
+#define PIPE_ARCH_PPC
+#if defined(__ppc64__) || defined(__PPC64__)
+#define PIPE_ARCH_PPC_64
+#endif
+#endif
+
+#if defined(__s390x__)
+#define PIPE_ARCH_S390
+#endif
+
+#if defined(__arm__)
+#define PIPE_ARCH_ARM
+#endif
+
+#if defined(__aarch64__)
+#define PIPE_ARCH_AARCH64
+#endif
+
+/*
+ * Endian detection.
+ */
+
+#ifdef __GLIBC__
+#include <endian.h>
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# define PIPE_ARCH_LITTLE_ENDIAN
+#elif __BYTE_ORDER == __BIG_ENDIAN
+# define PIPE_ARCH_BIG_ENDIAN
+#endif
+
+#elif defined(__APPLE__)
+#include <machine/endian.h>
+
+#if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN
+# define PIPE_ARCH_LITTLE_ENDIAN
+#elif __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN
+# define PIPE_ARCH_BIG_ENDIAN
+#endif
+
+#elif defined(__sun)
+#include <sys/isa_defs.h>
+
+#if defined(_LITTLE_ENDIAN)
+# define PIPE_ARCH_LITTLE_ENDIAN
+#elif defined(_BIG_ENDIAN)
+# define PIPE_ARCH_BIG_ENDIAN
+#endif
+
+#else
+
+#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) || defined(PIPE_ARCH_ARM) || defined(PIPE_ARCH_AARCH64)
+#define PIPE_ARCH_LITTLE_ENDIAN
+#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390)
+#define PIPE_ARCH_BIG_ENDIAN
+#endif
+
+#endif
+
+#if !defined(PIPE_ARCH_LITTLE_ENDIAN) && !defined(PIPE_ARCH_BIG_ENDIAN)
+#error Unknown Endianness
+#endif
+
+/*
+ * Auto-detect the operating system family.
+ *
+ * See subsystem below for a more fine-grained distinction.
+ */
+
+#if defined(__linux__)
+#define PIPE_OS_LINUX
+#define PIPE_OS_UNIX
+#endif
+
+/*
+ * Android defines __linux__ so PIPE_OS_LINUX and PIPE_OS_UNIX will also be
+ * defined.
+ */
+#if defined(ANDROID)
+#define PIPE_OS_ANDROID
+#endif
+
+#if defined(__FreeBSD__)
+#define PIPE_OS_FREEBSD
+#define PIPE_OS_BSD
+#define PIPE_OS_UNIX
+#endif
+
+#if defined(__OpenBSD__)
+#define PIPE_OS_OPENBSD
+#define PIPE_OS_BSD
+#define PIPE_OS_UNIX
+#endif
+
+#if defined(__NetBSD__)
+#define PIPE_OS_NETBSD
+#define PIPE_OS_BSD
+#define PIPE_OS_UNIX
+#endif
+
+#if defined(__GNU__)
+#define PIPE_OS_HURD
+#define PIPE_OS_UNIX
+#endif
+
+#if defined(__sun)
+#define PIPE_OS_SOLARIS
+#define PIPE_OS_UNIX
+#endif
+
+#if defined(__APPLE__)
+#define PIPE_OS_APPLE
+#define PIPE_OS_UNIX
+#endif
+
+#if defined(_WIN32) || defined(WIN32)
+#define PIPE_OS_WINDOWS
+#endif
+
+#if defined(__HAIKU__)
+#define PIPE_OS_HAIKU
+#define PIPE_OS_UNIX
+#endif
+
+#if defined(__CYGWIN__)
+#define PIPE_OS_CYGWIN
+#define PIPE_OS_UNIX
+#endif
+
+/*
+ * Try to auto-detect the subsystem.
+ *
+ * NOTE: There is no way to auto-detect most of these.
+ */
+
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS)
+#define PIPE_SUBSYSTEM_DRI
+#endif /* PIPE_OS_LINUX || PIPE_OS_BSD || PIPE_OS_SOLARIS */
+
+#if defined(PIPE_OS_WINDOWS)
+#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+/* Windows User-space Library */
+#else
+#define PIPE_SUBSYSTEM_WINDOWS_USER
+#endif
+#endif /* PIPE_OS_WINDOWS */
+
+
+#endif /* P_CONFIG_H_ */
diff --git a/src/minigallium/include/pipe/p_context.h b/src/minigallium/include/pipe/p_context.h
new file mode 100644
index 0000000..69352f7
--- /dev/null
+++ b/src/minigallium/include/pipe/p_context.h
@@ -0,0 +1,547 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef PIPE_CONTEXT_H
+#define PIPE_CONTEXT_H
+
+#include "p_compiler.h"
+#include "p_format.h"
+#include "p_video_enums.h"
+#include "p_defines.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+struct pipe_blend_color;
+struct pipe_blend_state;
+struct pipe_blit_info;
+struct pipe_box;
+struct pipe_clip_state;
+struct pipe_constant_buffer;
+struct pipe_depth_stencil_alpha_state;
+struct pipe_draw_info;
+struct pipe_fence_handle;
+struct pipe_framebuffer_state;
+struct pipe_index_buffer;
+struct pipe_query;
+struct pipe_poly_stipple;
+struct pipe_rasterizer_state;
+struct pipe_resolve_info;
+struct pipe_resource;
+struct pipe_sampler_state;
+struct pipe_sampler_view;
+struct pipe_scissor_state;
+struct pipe_shader_state;
+struct pipe_stencil_ref;
+struct pipe_stream_output_target;
+struct pipe_surface;
+struct pipe_transfer;
+struct pipe_vertex_buffer;
+struct pipe_vertex_element;
+struct pipe_video_buffer;
+struct pipe_video_codec;
+struct pipe_viewport_state;
+struct pipe_compute_state;
+union pipe_color_union;
+union pipe_query_result;
+
+/**
+ * Gallium rendering context. Basically:
+ * - state setting functions
+ * - VBO drawing functions
+ * - surface functions
+ */
+struct pipe_context {
+ struct pipe_screen *screen;
+
+ void *priv; /**< context private data (for DRI for example) */
+ void *draw; /**< private, for draw module (temporary?) */
+
+ void (*destroy)( struct pipe_context * );
+
+ /**
+ * VBO drawing
+ */
+ /*@{*/
+ void (*draw_vbo)( struct pipe_context *pipe,
+ const struct pipe_draw_info *info );
+ /*@}*/
+
+ /**
+ * Predicate subsequent rendering on occlusion query result
+ * \param query the query predicate, or NULL if no predicate
+ * \param condition whether to skip on FALSE or TRUE query results
+ * \param mode one of PIPE_RENDER_COND_x
+ */
+ void (*render_condition)( struct pipe_context *pipe,
+ struct pipe_query *query,
+ boolean condition,
+ uint mode );
+
+ /**
+ * Query objects
+ */
+ /*@{*/
+ struct pipe_query *(*create_query)( struct pipe_context *pipe,
+ unsigned query_type );
+
+ void (*destroy_query)(struct pipe_context *pipe,
+ struct pipe_query *q);
+
+ void (*begin_query)(struct pipe_context *pipe, struct pipe_query *q);
+ void (*end_query)(struct pipe_context *pipe, struct pipe_query *q);
+
+ /**
+ * Get results of a query.
+ * \param wait if true, this query will block until the result is ready
+ * \return TRUE if results are ready, FALSE otherwise
+ */
+ boolean (*get_query_result)(struct pipe_context *pipe,
+ struct pipe_query *q,
+ boolean wait,
+ union pipe_query_result *result);
+ /*@}*/
+
+ /**
+ * State functions (create/bind/destroy state objects)
+ */
+ /*@{*/
+ void * (*create_blend_state)(struct pipe_context *,
+ const struct pipe_blend_state *);
+ void (*bind_blend_state)(struct pipe_context *, void *);
+ void (*delete_blend_state)(struct pipe_context *, void *);
+
+ void * (*create_sampler_state)(struct pipe_context *,
+ const struct pipe_sampler_state *);
+ void (*bind_fragment_sampler_states)(struct pipe_context *,
+ unsigned num_samplers,
+ void **samplers);
+ void (*bind_vertex_sampler_states)(struct pipe_context *,
+ unsigned num_samplers,
+ void **samplers);
+ void (*bind_geometry_sampler_states)(struct pipe_context *,
+ unsigned num_samplers,
+ void **samplers);
+ void (*bind_compute_sampler_states)(struct pipe_context *,
+ unsigned start_slot,
+ unsigned num_samplers,
+ void **samplers);
+ void (*delete_sampler_state)(struct pipe_context *, void *);
+
+ void * (*create_rasterizer_state)(struct pipe_context *,
+ const struct pipe_rasterizer_state *);
+ void (*bind_rasterizer_state)(struct pipe_context *, void *);
+ void (*delete_rasterizer_state)(struct pipe_context *, void *);
+
+ void * (*create_depth_stencil_alpha_state)(struct pipe_context *,
+ const struct pipe_depth_stencil_alpha_state *);
+ void (*bind_depth_stencil_alpha_state)(struct pipe_context *, void *);
+ void (*delete_depth_stencil_alpha_state)(struct pipe_context *, void *);
+
+ void * (*create_fs_state)(struct pipe_context *,
+ const struct pipe_shader_state *);
+ void (*bind_fs_state)(struct pipe_context *, void *);
+ void (*delete_fs_state)(struct pipe_context *, void *);
+
+ void * (*create_vs_state)(struct pipe_context *,
+ const struct pipe_shader_state *);
+ void (*bind_vs_state)(struct pipe_context *, void *);
+ void (*delete_vs_state)(struct pipe_context *, void *);
+
+ void * (*create_gs_state)(struct pipe_context *,
+ const struct pipe_shader_state *);
+ void (*bind_gs_state)(struct pipe_context *, void *);
+ void (*delete_gs_state)(struct pipe_context *, void *);
+
+ void * (*create_vertex_elements_state)(struct pipe_context *,
+ unsigned num_elements,
+ const struct pipe_vertex_element *);
+ void (*bind_vertex_elements_state)(struct pipe_context *, void *);
+ void (*delete_vertex_elements_state)(struct pipe_context *, void *);
+
+ /*@}*/
+
+ /**
+ * Parameter-like state (or properties)
+ */
+ /*@{*/
+ void (*set_blend_color)( struct pipe_context *,
+ const struct pipe_blend_color * );
+
+ void (*set_stencil_ref)( struct pipe_context *,
+ const struct pipe_stencil_ref * );
+
+ void (*set_sample_mask)( struct pipe_context *,
+ unsigned sample_mask );
+
+ void (*set_clip_state)( struct pipe_context *,
+ const struct pipe_clip_state * );
+
+ void (*set_constant_buffer)( struct pipe_context *,
+ uint shader, uint index,
+ struct pipe_constant_buffer *buf );
+
+ void (*set_framebuffer_state)( struct pipe_context *,
+ const struct pipe_framebuffer_state * );
+
+ void (*set_polygon_stipple)( struct pipe_context *,
+ const struct pipe_poly_stipple * );
+
+ void (*set_scissor_states)( struct pipe_context *,
+ unsigned start_slot,
+ unsigned num_scissors,
+ const struct pipe_scissor_state * );
+
+ void (*set_viewport_states)( struct pipe_context *,
+ unsigned start_slot,
+ unsigned num_viewports,
+ const struct pipe_viewport_state *);
+
+ void (*set_fragment_sampler_views)(struct pipe_context *,
+ unsigned num_views,
+ struct pipe_sampler_view **);
+
+ void (*set_vertex_sampler_views)(struct pipe_context *,
+ unsigned num_views,
+ struct pipe_sampler_view **);
+
+ void (*set_geometry_sampler_views)(struct pipe_context *,
+ unsigned num_views,
+ struct pipe_sampler_view **);
+
+ void (*set_compute_sampler_views)(struct pipe_context *,
+ unsigned start_slot, unsigned num_views,
+ struct pipe_sampler_view **);
+
+ /**
+ * Bind an array of shader resources that will be used by the
+ * graphics pipeline. Any resources that were previously bound to
+ * the specified range will be unbound after this call.
+ *
+ * \param start first resource to bind.
+ * \param count number of consecutive resources to bind.
+ * \param resources array of pointers to the resources to bind, it
+ * should contain at least \a count elements
+ * unless it's NULL, in which case no new
+ * resources will be bound.
+ */
+ void (*set_shader_resources)(struct pipe_context *,
+ unsigned start, unsigned count,
+ struct pipe_surface **resources);
+
+ void (*set_vertex_buffers)( struct pipe_context *,
+ unsigned start_slot,
+ unsigned num_buffers,
+ const struct pipe_vertex_buffer * );
+
+ void (*set_index_buffer)( struct pipe_context *pipe,
+ const struct pipe_index_buffer * );
+
+ /*@}*/
+
+ /**
+ * Stream output functions.
+ */
+ /*@{*/
+
+ struct pipe_stream_output_target *(*create_stream_output_target)(
+ struct pipe_context *,
+ struct pipe_resource *,
+ unsigned buffer_offset,
+ unsigned buffer_size);
+
+ void (*stream_output_target_destroy)(struct pipe_context *,
+ struct pipe_stream_output_target *);
+
+ void (*set_stream_output_targets)(struct pipe_context *,
+ unsigned num_targets,
+ struct pipe_stream_output_target **targets,
+ unsigned append_bitmask);
+
+ /*@}*/
+
+
+ /**
+ * Resource functions for blit-like functionality
+ *
+ * If a driver supports multisampling, blit must implement color resolve.
+ */
+ /*@{*/
+
+ /**
+ * Copy a block of pixels from one resource to another.
+ * The resource must be of the same format.
+ * Resources with nr_samples > 1 are not allowed.
+ */
+ void (*resource_copy_region)(struct pipe_context *pipe,
+ struct pipe_resource *dst,
+ unsigned dst_level,
+ unsigned dstx, unsigned dsty, unsigned dstz,
+ struct pipe_resource *src,
+ unsigned src_level,
+ const struct pipe_box *src_box);
+
+ /* Optimal hardware path for blitting pixels.
+ * Scaling, format conversion, up- and downsampling (resolve) are allowed.
+ */
+ void (*blit)(struct pipe_context *pipe,
+ const struct pipe_blit_info *info);
+
+ /*@}*/
+
+ /**
+ * Clear the specified set of currently bound buffers to specified values.
+ * The entire buffers are cleared (no scissor, no colormask, etc).
+ *
+ * \param buffers bitfield of PIPE_CLEAR_* values.
+ * \param color pointer to a union of fiu array for each of r, g, b, a.
+ * \param depth depth clear value in [0,1].
+ * \param stencil stencil clear value
+ */
+ void (*clear)(struct pipe_context *pipe,
+ unsigned buffers,
+ const union pipe_color_union *color,
+ double depth,
+ unsigned stencil);
+
+ /**
+ * Clear a color rendertarget surface.
+ * \param color pointer to an union of fiu array for each of r, g, b, a.
+ */
+ void (*clear_render_target)(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ const union pipe_color_union *color,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height);
+
+ /**
+ * Clear a depth-stencil surface.
+ * \param clear_flags bitfield of PIPE_CLEAR_DEPTH/STENCIL values.
+ * \param depth depth clear value in [0,1].
+ * \param stencil stencil clear value
+ */
+ void (*clear_depth_stencil)(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ unsigned clear_flags,
+ double depth,
+ unsigned stencil,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height);
+
+ /** Flush draw commands
+ *
+ * \param flags bitfield of enum pipe_flush_flags values.
+ */
+ void (*flush)(struct pipe_context *pipe,
+ struct pipe_fence_handle **fence,
+ unsigned flags);
+
+ /**
+ * Create a view on a texture to be used by a shader stage.
+ */
+ struct pipe_sampler_view * (*create_sampler_view)(struct pipe_context *ctx,
+ struct pipe_resource *texture,
+ const struct pipe_sampler_view *templat);
+
+ void (*sampler_view_destroy)(struct pipe_context *ctx,
+ struct pipe_sampler_view *view);
+
+
+ /**
+ * Get a surface which is a "view" into a resource, used by
+ * render target / depth stencil stages.
+ */
+ struct pipe_surface *(*create_surface)(struct pipe_context *ctx,
+ struct pipe_resource *resource,
+ const struct pipe_surface *templat);
+
+ void (*surface_destroy)(struct pipe_context *ctx,
+ struct pipe_surface *);
+
+ /**
+ * Map a resource.
+ *
+ * Transfers are (by default) context-private and allow uploads to be
+ * interleaved with rendering.
+ *
+ * out_transfer will contain the transfer object that must be passed
+ * to all the other transfer functions. It also contains useful
+ * information (like texture strides).
+ */
+ void *(*transfer_map)(struct pipe_context *,
+ struct pipe_resource *resource,
+ unsigned level,
+ unsigned usage, /* a combination of PIPE_TRANSFER_x */
+ const struct pipe_box *,
+ struct pipe_transfer **out_transfer);
+
+ /* If transfer was created with WRITE|FLUSH_EXPLICIT, only the
+ * regions specified with this call are guaranteed to be written to
+ * the resource.
+ */
+ void (*transfer_flush_region)( struct pipe_context *,
+ struct pipe_transfer *transfer,
+ const struct pipe_box *);
+
+ void (*transfer_unmap)(struct pipe_context *,
+ struct pipe_transfer *transfer);
+
+ /* One-shot transfer operation with data supplied in a user
+ * pointer. XXX: strides??
+ */
+ void (*transfer_inline_write)( struct pipe_context *,
+ struct pipe_resource *,
+ unsigned level,
+ unsigned usage, /* a combination of PIPE_TRANSFER_x */
+ const struct pipe_box *,
+ const void *data,
+ unsigned stride,
+ unsigned layer_stride);
+
+ /**
+ * Flush any pending framebuffer writes and invalidate texture caches.
+ */
+ void (*texture_barrier)(struct pipe_context *);
+
+ /**
+ * Creates a video codec for a specific video format/profile
+ */
+ struct pipe_video_codec *(*create_video_codec)( struct pipe_context *context,
+ const struct pipe_video_codec *templat );
+
+ /**
+ * Creates a video buffer as decoding target
+ */
+ struct pipe_video_buffer *(*create_video_buffer)( struct pipe_context *context,
+ const struct pipe_video_buffer *templat );
+
+ /**
+ * Compute kernel execution
+ */
+ /*@{*/
+ /**
+ * Define the compute program and parameters to be used by
+ * pipe_context::launch_grid.
+ */
+ void *(*create_compute_state)(struct pipe_context *context,
+ const struct pipe_compute_state *);
+ void (*bind_compute_state)(struct pipe_context *, void *);
+ void (*delete_compute_state)(struct pipe_context *, void *);
+
+ /**
+ * Bind an array of shader resources that will be used by the
+ * compute program. Any resources that were previously bound to
+ * the specified range will be unbound after this call.
+ *
+ * \param start first resource to bind.
+ * \param count number of consecutive resources to bind.
+ * \param resources array of pointers to the resources to bind, it
+ * should contain at least \a count elements
+ * unless it's NULL, in which case no new
+ * resources will be bound.
+ */
+ void (*set_compute_resources)(struct pipe_context *,
+ unsigned start, unsigned count,
+ struct pipe_surface **resources);
+
+ /**
+ * Bind an array of buffers to be mapped into the address space of
+ * the GLOBAL resource. Any buffers that were previously bound
+ * between [first, first + count - 1] are unbound after this call.
+ *
+ * \param first first buffer to map.
+ * \param count number of consecutive buffers to map.
+ * \param resources array of pointers to the buffers to map, it
+ * should contain at least \a count elements
+ * unless it's NULL, in which case no new
+ * resources will be bound.
+ * \param handles array of pointers to the memory locations that
+ * will be filled with the respective base
+ * addresses each buffer will be mapped to. It
+ * should contain at least \a count elements,
+ * unless \a resources is NULL in which case \a
+ * handles should be NULL as well.
+ *
+ * Note that the driver isn't required to make any guarantees about
+ * the contents of the \a handles array being valid anytime except
+ * during the subsequent calls to pipe_context::launch_grid. This
+ * means that the only sensible location handles[i] may point to is
+ * somewhere within the INPUT buffer itself. This is so to
+ * accommodate implementations that lack virtual memory but
+ * nevertheless migrate buffers on the fly, leading to resource
+ * base addresses that change on each kernel invocation or are
+ * unknown to the pipe driver.
+ */
+ void (*set_global_binding)(struct pipe_context *context,
+ unsigned first, unsigned count,
+ struct pipe_resource **resources,
+ uint32_t **handles);
+
+ /**
+ * Launch the compute kernel starting from instruction \a pc of the
+ * currently bound compute program.
+ *
+ * \a grid_layout and \a block_layout are arrays of size \a
+ * PIPE_COMPUTE_CAP_GRID_DIMENSION that determine the layout of the
+ * grid (in block units) and working block (in thread units) to be
+ * used, respectively.
+ *
+ * \a pc For drivers that use PIPE_SHADER_IR_LLVM as their prefered IR,
+ * this value will be the index of the kernel in the opencl.kernels
+ * metadata list.
+ *
+ * \a input will be used to initialize the INPUT resource, and it
+ * should point to a buffer of at least
+ * pipe_compute_state::req_input_mem bytes.
+ */
+ void (*launch_grid)(struct pipe_context *context,
+ const uint *block_layout, const uint *grid_layout,
+ uint32_t pc, const void *input);
+ /*@}*/
+
+ /**
+ * Get sample position for an individual sample point.
+ *
+ * \param sample_count - total number of samples
+ * \param sample_index - sample to get the position values for
+ * \param out_value - return value of 2 floats for x and y position for
+ * requested sample.
+ */
+ void (*get_sample_position)(struct pipe_context *context,
+ unsigned sample_count,
+ unsigned sample_index,
+ float *out_value);
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PIPE_CONTEXT_H */
diff --git a/src/minigallium/include/pipe/p_defines.h b/src/minigallium/include/pipe/p_defines.h
new file mode 100644
index 0000000..85294f4
--- /dev/null
+++ b/src/minigallium/include/pipe/p_defines.h
@@ -0,0 +1,692 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef PIPE_DEFINES_H
+#define PIPE_DEFINES_H
+
+#include "p_compiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Gallium error codes.
+ *
+ * - A zero value always means success.
+ * - A negative value always means failure.
+ * - The meaning of a positive value is function dependent.
+ */
+enum pipe_error {
+ PIPE_OK = 0,
+ PIPE_ERROR = -1, /**< Generic error */
+ PIPE_ERROR_BAD_INPUT = -2,
+ PIPE_ERROR_OUT_OF_MEMORY = -3,
+ PIPE_ERROR_RETRY = -4
+ /* TODO */
+};
+
+
+#define PIPE_BLENDFACTOR_ONE 0x1
+#define PIPE_BLENDFACTOR_SRC_COLOR 0x2
+#define PIPE_BLENDFACTOR_SRC_ALPHA 0x3
+#define PIPE_BLENDFACTOR_DST_ALPHA 0x4
+#define PIPE_BLENDFACTOR_DST_COLOR 0x5
+#define PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE 0x6
+#define PIPE_BLENDFACTOR_CONST_COLOR 0x7
+#define PIPE_BLENDFACTOR_CONST_ALPHA 0x8
+#define PIPE_BLENDFACTOR_SRC1_COLOR 0x9
+#define PIPE_BLENDFACTOR_SRC1_ALPHA 0x0A
+#define PIPE_BLENDFACTOR_ZERO 0x11
+#define PIPE_BLENDFACTOR_INV_SRC_COLOR 0x12
+#define PIPE_BLENDFACTOR_INV_SRC_ALPHA 0x13
+#define PIPE_BLENDFACTOR_INV_DST_ALPHA 0x14
+#define PIPE_BLENDFACTOR_INV_DST_COLOR 0x15
+#define PIPE_BLENDFACTOR_INV_CONST_COLOR 0x17
+#define PIPE_BLENDFACTOR_INV_CONST_ALPHA 0x18
+#define PIPE_BLENDFACTOR_INV_SRC1_COLOR 0x19
+#define PIPE_BLENDFACTOR_INV_SRC1_ALPHA 0x1A
+
+#define PIPE_BLEND_ADD 0
+#define PIPE_BLEND_SUBTRACT 1
+#define PIPE_BLEND_REVERSE_SUBTRACT 2
+#define PIPE_BLEND_MIN 3
+#define PIPE_BLEND_MAX 4
+
+#define PIPE_LOGICOP_CLEAR 0
+#define PIPE_LOGICOP_NOR 1
+#define PIPE_LOGICOP_AND_INVERTED 2
+#define PIPE_LOGICOP_COPY_INVERTED 3
+#define PIPE_LOGICOP_AND_REVERSE 4
+#define PIPE_LOGICOP_INVERT 5
+#define PIPE_LOGICOP_XOR 6
+#define PIPE_LOGICOP_NAND 7
+#define PIPE_LOGICOP_AND 8
+#define PIPE_LOGICOP_EQUIV 9
+#define PIPE_LOGICOP_NOOP 10
+#define PIPE_LOGICOP_OR_INVERTED 11
+#define PIPE_LOGICOP_COPY 12
+#define PIPE_LOGICOP_OR_REVERSE 13
+#define PIPE_LOGICOP_OR 14
+#define PIPE_LOGICOP_SET 15
+
+#define PIPE_MASK_R 0x1
+#define PIPE_MASK_G 0x2
+#define PIPE_MASK_B 0x4
+#define PIPE_MASK_A 0x8
+#define PIPE_MASK_RGBA 0xf
+#define PIPE_MASK_Z 0x10
+#define PIPE_MASK_S 0x20
+#define PIPE_MASK_ZS 0x30
+#define PIPE_MASK_RGBAZS (PIPE_MASK_RGBA|PIPE_MASK_ZS)
+
+
+/**
+ * Inequality functions. Used for depth test, stencil compare, alpha
+ * test, shadow compare, etc.
+ */
+#define PIPE_FUNC_NEVER 0
+#define PIPE_FUNC_LESS 1
+#define PIPE_FUNC_EQUAL 2
+#define PIPE_FUNC_LEQUAL 3
+#define PIPE_FUNC_GREATER 4
+#define PIPE_FUNC_NOTEQUAL 5
+#define PIPE_FUNC_GEQUAL 6
+#define PIPE_FUNC_ALWAYS 7
+
+/** Polygon fill mode */
+#define PIPE_POLYGON_MODE_FILL 0
+#define PIPE_POLYGON_MODE_LINE 1
+#define PIPE_POLYGON_MODE_POINT 2
+
+/** Polygon face specification, eg for culling */
+#define PIPE_FACE_NONE 0
+#define PIPE_FACE_FRONT 1
+#define PIPE_FACE_BACK 2
+#define PIPE_FACE_FRONT_AND_BACK (PIPE_FACE_FRONT | PIPE_FACE_BACK)
+
+/** Stencil ops */
+#define PIPE_STENCIL_OP_KEEP 0
+#define PIPE_STENCIL_OP_ZERO 1
+#define PIPE_STENCIL_OP_REPLACE 2
+#define PIPE_STENCIL_OP_INCR 3
+#define PIPE_STENCIL_OP_DECR 4
+#define PIPE_STENCIL_OP_INCR_WRAP 5
+#define PIPE_STENCIL_OP_DECR_WRAP 6
+#define PIPE_STENCIL_OP_INVERT 7
+
+/** Texture types.
+ * See the documentation for info on PIPE_TEXTURE_RECT vs PIPE_TEXTURE_2D */
+enum pipe_texture_target {
+ PIPE_BUFFER = 0,
+ PIPE_TEXTURE_1D = 1,
+ PIPE_TEXTURE_2D = 2,
+ PIPE_TEXTURE_3D = 3,
+ PIPE_TEXTURE_CUBE = 4,
+ PIPE_TEXTURE_RECT = 5,
+ PIPE_TEXTURE_1D_ARRAY = 6,
+ PIPE_TEXTURE_2D_ARRAY = 7,
+ PIPE_TEXTURE_CUBE_ARRAY = 8,
+ PIPE_MAX_TEXTURE_TYPES
+};
+
+#define PIPE_TEX_FACE_POS_X 0
+#define PIPE_TEX_FACE_NEG_X 1
+#define PIPE_TEX_FACE_POS_Y 2
+#define PIPE_TEX_FACE_NEG_Y 3
+#define PIPE_TEX_FACE_POS_Z 4
+#define PIPE_TEX_FACE_NEG_Z 5
+#define PIPE_TEX_FACE_MAX 6
+
+#define PIPE_TEX_WRAP_REPEAT 0
+#define PIPE_TEX_WRAP_CLAMP 1
+#define PIPE_TEX_WRAP_CLAMP_TO_EDGE 2
+#define PIPE_TEX_WRAP_CLAMP_TO_BORDER 3
+#define PIPE_TEX_WRAP_MIRROR_REPEAT 4
+#define PIPE_TEX_WRAP_MIRROR_CLAMP 5
+#define PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE 6
+#define PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER 7
+
+/* Between mipmaps, ie mipfilter
+ */
+#define PIPE_TEX_MIPFILTER_NEAREST 0
+#define PIPE_TEX_MIPFILTER_LINEAR 1
+#define PIPE_TEX_MIPFILTER_NONE 2
+
+/* Within a mipmap, ie min/mag filter
+ */
+#define PIPE_TEX_FILTER_NEAREST 0
+#define PIPE_TEX_FILTER_LINEAR 1
+
+#define PIPE_TEX_COMPARE_NONE 0
+#define PIPE_TEX_COMPARE_R_TO_TEXTURE 1
+
+/**
+ * Clear buffer bits
+ */
+/** All color buffers currently bound */
+#define PIPE_CLEAR_COLOR (1 << 0)
+#define PIPE_CLEAR_DEPTH (1 << 1)
+#define PIPE_CLEAR_STENCIL (1 << 2)
+/** Depth/stencil combined */
+#define PIPE_CLEAR_DEPTHSTENCIL (PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL)
+
+/**
+ * Transfer object usage flags
+ */
+enum pipe_transfer_usage {
+ /**
+ * Resource contents read back (or accessed directly) at transfer
+ * create time.
+ */
+ PIPE_TRANSFER_READ = (1 << 0),
+
+ /**
+ * Resource contents will be written back at transfer_unmap
+ * time (or modified as a result of being accessed directly).
+ */
+ PIPE_TRANSFER_WRITE = (1 << 1),
+
+ /**
+ * Read/modify/write
+ */
+ PIPE_TRANSFER_READ_WRITE = PIPE_TRANSFER_READ | PIPE_TRANSFER_WRITE,
+
+ /**
+ * The transfer should map the texture storage directly. The driver may
+ * return NULL if that isn't possible, and the state tracker needs to cope
+ * with that and use an alternative path without this flag.
+ *
+ * E.g. the state tracker could have a simpler path which maps textures and
+ * does read/modify/write cycles on them directly, and a more complicated
+ * path which uses minimal read and write transfers.
+ */
+ PIPE_TRANSFER_MAP_DIRECTLY = (1 << 2),
+
+ /**
+ * Discards the memory within the mapped region.
+ *
+ * It should not be used with PIPE_TRANSFER_READ.
+ *
+ * See also:
+ * - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_RANGE_BIT flag.
+ */
+ PIPE_TRANSFER_DISCARD_RANGE = (1 << 8),
+
+ /**
+ * Fail if the resource cannot be mapped immediately.
+ *
+ * See also:
+ * - Direct3D's D3DLOCK_DONOTWAIT flag.
+ * - Mesa3D's MESA_MAP_NOWAIT_BIT flag.
+ * - WDDM's D3DDDICB_LOCKFLAGS.DonotWait flag.
+ */
+ PIPE_TRANSFER_DONTBLOCK = (1 << 9),
+
+ /**
+ * Do not attempt to synchronize pending operations on the resource when mapping.
+ *
+ * It should not be used with PIPE_TRANSFER_READ.
+ *
+ * See also:
+ * - OpenGL's ARB_map_buffer_range extension, MAP_UNSYNCHRONIZED_BIT flag.
+ * - Direct3D's D3DLOCK_NOOVERWRITE flag.
+ * - WDDM's D3DDDICB_LOCKFLAGS.IgnoreSync flag.
+ */
+ PIPE_TRANSFER_UNSYNCHRONIZED = (1 << 10),
+
+ /**
+ * Written ranges will be notified later with
+ * pipe_context::transfer_flush_region.
+ *
+ * It should not be used with PIPE_TRANSFER_READ.
+ *
+ * See also:
+ * - pipe_context::transfer_flush_region
+ * - OpenGL's ARB_map_buffer_range extension, MAP_FLUSH_EXPLICIT_BIT flag.
+ */
+ PIPE_TRANSFER_FLUSH_EXPLICIT = (1 << 11),
+
+ /**
+ * Discards all memory backing the resource.
+ *
+ * It should not be used with PIPE_TRANSFER_READ.
+ *
+ * This is equivalent to:
+ * - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_BUFFER_BIT
+ * - BufferData(NULL) on a GL buffer
+ * - Direct3D's D3DLOCK_DISCARD flag.
+ * - WDDM's D3DDDICB_LOCKFLAGS.Discard flag.
+ * - D3D10 DDI's D3D10_DDI_MAP_WRITE_DISCARD flag
+ * - D3D10's D3D10_MAP_WRITE_DISCARD flag.
+ */
+ PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE = (1 << 12)
+
+};
+
+/**
+ * Flags for the flush function.
+ */
+enum pipe_flush_flags {
+ PIPE_FLUSH_END_OF_FRAME = (1 << 0)
+};
+
+/*
+ * Resource binding flags -- state tracker must specify in advance all
+ * the ways a resource might be used.
+ */
+#define PIPE_BIND_DEPTH_STENCIL (1 << 0) /* create_surface */
+#define PIPE_BIND_RENDER_TARGET (1 << 1) /* create_surface */
+#define PIPE_BIND_BLENDABLE (1 << 2) /* create_surface */
+#define PIPE_BIND_SAMPLER_VIEW (1 << 3) /* create_sampler_view */
+#define PIPE_BIND_VERTEX_BUFFER (1 << 4) /* set_vertex_buffers */
+#define PIPE_BIND_INDEX_BUFFER (1 << 5) /* draw_elements */
+#define PIPE_BIND_CONSTANT_BUFFER (1 << 6) /* set_constant_buffer */
+#define PIPE_BIND_DISPLAY_TARGET (1 << 8) /* flush_front_buffer */
+#define PIPE_BIND_TRANSFER_WRITE (1 << 9) /* transfer_map */
+#define PIPE_BIND_TRANSFER_READ (1 << 10) /* transfer_map */
+#define PIPE_BIND_STREAM_OUTPUT (1 << 11) /* set_stream_output_buffers */
+#define PIPE_BIND_CURSOR (1 << 16) /* mouse cursor */
+#define PIPE_BIND_CUSTOM (1 << 17) /* state-tracker/winsys usages */
+#define PIPE_BIND_GLOBAL (1 << 18) /* set_global_binding */
+#define PIPE_BIND_SHADER_RESOURCE (1 << 19) /* set_shader_resources */
+#define PIPE_BIND_COMPUTE_RESOURCE (1 << 20) /* set_compute_resources */
+
+/* The first two flags above were previously part of the amorphous
+ * TEXTURE_USAGE, most of which are now descriptions of the ways a
+ * particular texture can be bound to the gallium pipeline. The two flags
+ * below do not fit within that and probably need to be migrated to some
+ * other place.
+ *
+ * It seems like scanout is used by the Xorg state tracker to ask for
+ * a texture suitable for actual scanout (hence the name), which
+ * implies extra layout constraints on some hardware. It may also
+ * have some special meaning regarding mouse cursor images.
+ *
+ * The shared flag is quite underspecified, but certainly isn't a
+ * binding flag - it seems more like a message to the winsys to create
+ * a shareable allocation.
+ *
+ * The third flag has been added to be able to force textures to be created
+ * in linear mode (no tiling).
+ */
+#define PIPE_BIND_SCANOUT (1 << 14) /* */
+#define PIPE_BIND_SHARED (1 << 15) /* get_texture_handle ??? */
+#define PIPE_BIND_LINEAR (1 << 21)
+
+
+/* Flags for the driver about resource behaviour:
+ */
+#define PIPE_RESOURCE_FLAG_GEN_MIPS (1 << 0) /* Driver performs autogen mips */
+#define PIPE_RESOURCE_FLAG_DRV_PRIV (1 << 16) /* driver/winsys private */
+#define PIPE_RESOURCE_FLAG_ST_PRIV (1 << 24) /* state-tracker/winsys private */
+
+/* Hint about the expected lifecycle of a resource.
+ */
+#define PIPE_USAGE_DEFAULT 0 /* many uploads, draws intermixed */
+#define PIPE_USAGE_DYNAMIC 1 /* many uploads, draws intermixed */
+#define PIPE_USAGE_STATIC 2 /* same as immutable?? */
+#define PIPE_USAGE_IMMUTABLE 3 /* no change after first upload */
+#define PIPE_USAGE_STREAM 4 /* upload, draw, upload, draw */
+#define PIPE_USAGE_STAGING 5 /* supports data transfers from the GPU to the CPU */
+
+
+/**
+ * Shaders
+ */
+#define PIPE_SHADER_VERTEX 0
+#define PIPE_SHADER_FRAGMENT 1
+#define PIPE_SHADER_GEOMETRY 2
+#define PIPE_SHADER_COMPUTE 3
+#define PIPE_SHADER_TYPES 4
+
+
+/**
+ * Primitive types:
+ */
+#define PIPE_PRIM_POINTS 0
+#define PIPE_PRIM_LINES 1
+#define PIPE_PRIM_LINE_LOOP 2
+#define PIPE_PRIM_LINE_STRIP 3
+#define PIPE_PRIM_TRIANGLES 4
+#define PIPE_PRIM_TRIANGLE_STRIP 5
+#define PIPE_PRIM_TRIANGLE_FAN 6
+#define PIPE_PRIM_QUADS 7
+#define PIPE_PRIM_QUAD_STRIP 8
+#define PIPE_PRIM_POLYGON 9
+#define PIPE_PRIM_LINES_ADJACENCY 10
+#define PIPE_PRIM_LINE_STRIP_ADJACENCY 11
+#define PIPE_PRIM_TRIANGLES_ADJACENCY 12
+#define PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY 13
+#define PIPE_PRIM_MAX 14
+
+
+/**
+ * Query object types
+ */
+#define PIPE_QUERY_OCCLUSION_COUNTER 0
+#define PIPE_QUERY_OCCLUSION_PREDICATE 1
+#define PIPE_QUERY_TIMESTAMP 2
+#define PIPE_QUERY_TIMESTAMP_DISJOINT 3
+#define PIPE_QUERY_TIME_ELAPSED 4
+#define PIPE_QUERY_PRIMITIVES_GENERATED 5
+#define PIPE_QUERY_PRIMITIVES_EMITTED 6
+#define PIPE_QUERY_SO_STATISTICS 7
+#define PIPE_QUERY_SO_OVERFLOW_PREDICATE 8
+#define PIPE_QUERY_GPU_FINISHED 9
+#define PIPE_QUERY_PIPELINE_STATISTICS 10
+#define PIPE_QUERY_TYPES 11
+
+/* start of driver queries,
+ * see pipe_screen::get_driver_query_info */
+#define PIPE_QUERY_DRIVER_SPECIFIC 256
+
+
+/**
+ * Conditional rendering modes
+ */
+#define PIPE_RENDER_COND_WAIT 0
+#define PIPE_RENDER_COND_NO_WAIT 1
+#define PIPE_RENDER_COND_BY_REGION_WAIT 2
+#define PIPE_RENDER_COND_BY_REGION_NO_WAIT 3
+
+
+/**
+ * Point sprite coord modes
+ */
+#define PIPE_SPRITE_COORD_UPPER_LEFT 0
+#define PIPE_SPRITE_COORD_LOWER_LEFT 1
+
+
+/**
+ * Texture swizzles
+ */
+#define PIPE_SWIZZLE_RED 0
+#define PIPE_SWIZZLE_GREEN 1
+#define PIPE_SWIZZLE_BLUE 2
+#define PIPE_SWIZZLE_ALPHA 3
+#define PIPE_SWIZZLE_ZERO 4
+#define PIPE_SWIZZLE_ONE 5
+
+
+#define PIPE_TIMEOUT_INFINITE 0xffffffffffffffffull
+
+/**
+ * Implementation capabilities/limits which are queried through
+ * pipe_screen::get_param()
+ */
+enum pipe_cap {
+ PIPE_CAP_NPOT_TEXTURES = 1,
+ PIPE_CAP_TWO_SIDED_STENCIL = 2,
+ PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS = 4,
+ PIPE_CAP_ANISOTROPIC_FILTER = 5,
+ PIPE_CAP_POINT_SPRITE = 6,
+ PIPE_CAP_MAX_RENDER_TARGETS = 7,
+ PIPE_CAP_OCCLUSION_QUERY = 8,
+ PIPE_CAP_QUERY_TIME_ELAPSED = 9,
+ PIPE_CAP_TEXTURE_SHADOW_MAP = 10,
+ PIPE_CAP_TEXTURE_SWIZZLE = 11,
+ PIPE_CAP_MAX_TEXTURE_2D_LEVELS = 12,
+ PIPE_CAP_MAX_TEXTURE_3D_LEVELS = 13,
+ PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS = 14,
+ PIPE_CAP_TEXTURE_MIRROR_CLAMP = 25,
+ PIPE_CAP_BLEND_EQUATION_SEPARATE = 28,
+ PIPE_CAP_SM3 = 29, /*< Shader Model, supported */
+ PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS = 30,
+ PIPE_CAP_PRIMITIVE_RESTART = 31,
+ /** Maximum texture image units accessible from vertex and fragment shaders
+ * combined */
+ PIPE_CAP_MAX_COMBINED_SAMPLERS = 32,
+ /** blend enables and write masks per rendertarget */
+ PIPE_CAP_INDEP_BLEND_ENABLE = 33,
+ /** different blend funcs per rendertarget */
+ PIPE_CAP_INDEP_BLEND_FUNC = 34,
+ PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS = 36,
+ PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT = 37,
+ PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT = 38,
+ PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER = 39,
+ PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER = 40,
+ PIPE_CAP_DEPTH_CLIP_DISABLE = 41,
+ PIPE_CAP_SHADER_STENCIL_EXPORT = 42,
+ PIPE_CAP_TGSI_INSTANCEID = 43,
+ PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR = 44,
+ PIPE_CAP_FRAGMENT_COLOR_CLAMPED = 45,
+ PIPE_CAP_MIXED_COLORBUFFER_FORMATS = 46,
+ PIPE_CAP_SEAMLESS_CUBE_MAP = 47,
+ PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE = 48,
+ PIPE_CAP_SCALED_RESOLVE = 49,
+ PIPE_CAP_MIN_TEXEL_OFFSET = 50,
+ PIPE_CAP_MAX_TEXEL_OFFSET = 51,
+ PIPE_CAP_CONDITIONAL_RENDER = 52,
+ PIPE_CAP_TEXTURE_BARRIER = 53,
+ PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS = 55,
+ PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS = 56,
+ PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME = 57,
+ PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS = 59, /* temporary */
+ PIPE_CAP_VERTEX_COLOR_UNCLAMPED = 60,
+ PIPE_CAP_VERTEX_COLOR_CLAMPED = 61,
+ PIPE_CAP_GLSL_FEATURE_LEVEL = 62,
+ PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 63,
+ PIPE_CAP_USER_VERTEX_BUFFERS = 64,
+ PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY = 65,
+ PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY = 66,
+ PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY = 67,
+ PIPE_CAP_COMPUTE = 68,
+ PIPE_CAP_USER_INDEX_BUFFERS = 69,
+ PIPE_CAP_USER_CONSTANT_BUFFERS = 70,
+ PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT = 71,
+ PIPE_CAP_START_INSTANCE = 72,
+ PIPE_CAP_QUERY_TIMESTAMP = 73,
+ PIPE_CAP_TEXTURE_MULTISAMPLE = 74,
+ PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT = 75,
+ PIPE_CAP_CUBE_MAP_ARRAY = 76,
+ PIPE_CAP_TEXTURE_BUFFER_OBJECTS = 77,
+ PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 78,
+ PIPE_CAP_TGSI_TEXCOORD = 79,
+ PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER = 80,
+ PIPE_CAP_QUERY_PIPELINE_STATISTICS = 81,
+ PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK = 82,
+ PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE = 83,
+ PIPE_CAP_MAX_VIEWPORTS = 84,
+ PIPE_CAP_ENDIANNESS = 85,
+ PIPE_CAP_MAX_VERTEX_BUFFERS = 86
+};
+
+#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
+#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_R600 (1 << 1)
+
+enum pipe_endian {
+ PIPE_ENDIAN_LITTLE = 0,
+ PIPE_ENDIAN_BIG = 1,
+#if defined(PIPE_ARCH_LITTLE_ENDIAN)
+ PIPE_ENDIAN_NATIVE = PIPE_ENDIAN_LITTLE
+#elif defined(PIPE_ARCH_BIG_ENDIAN)
+ PIPE_ENDIAN_NATIVE = PIPE_ENDIAN_BIG
+#endif
+};
+
+/**
+ * Implementation limits which are queried through
+ * pipe_screen::get_paramf()
+ */
+enum pipe_capf
+{
+ PIPE_CAPF_MAX_LINE_WIDTH = 15,
+ PIPE_CAPF_MAX_LINE_WIDTH_AA = 16,
+ PIPE_CAPF_MAX_POINT_WIDTH = 17,
+ PIPE_CAPF_MAX_POINT_WIDTH_AA = 18,
+ PIPE_CAPF_MAX_TEXTURE_ANISOTROPY = 19,
+ PIPE_CAPF_MAX_TEXTURE_LOD_BIAS = 20,
+ PIPE_CAPF_GUARD_BAND_LEFT = 21,
+ PIPE_CAPF_GUARD_BAND_TOP = 22,
+ PIPE_CAPF_GUARD_BAND_RIGHT = 23,
+ PIPE_CAPF_GUARD_BAND_BOTTOM = 24
+};
+
+/* Shader caps not specific to any single stage */
+enum pipe_shader_cap
+{
+ PIPE_SHADER_CAP_MAX_INSTRUCTIONS = 0, /* if 0, it means the stage is unsupported */
+ PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS = 1,
+ PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS = 2,
+ PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS = 3,
+ PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH = 4,
+ PIPE_SHADER_CAP_MAX_INPUTS = 5,
+ PIPE_SHADER_CAP_MAX_CONSTS = 6,
+ PIPE_SHADER_CAP_MAX_CONST_BUFFERS = 7,
+ PIPE_SHADER_CAP_MAX_TEMPS = 8,
+ PIPE_SHADER_CAP_MAX_ADDRS = 9,
+ PIPE_SHADER_CAP_MAX_PREDS = 10,
+ /* boolean caps */
+ PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED = 11,
+ PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR = 12,
+ PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR = 13,
+ PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR = 14,
+ PIPE_SHADER_CAP_INDIRECT_CONST_ADDR = 15,
+ PIPE_SHADER_CAP_SUBROUTINES = 16, /* BGNSUB, ENDSUB, CAL, RET */
+ PIPE_SHADER_CAP_INTEGERS = 17,
+ PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS = 18,
+ PIPE_SHADER_CAP_PREFERRED_IR = 19,
+ PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED = 20,
+ PIPE_SHADER_CAP_TGSI_POW_SUPPORTED = 21,
+ PIPE_SHADER_CAP_TGSI_LRP_SUPPORTED = 22
+};
+
+/**
+ * Shader intermediate representation.
+ */
+enum pipe_shader_ir
+{
+ PIPE_SHADER_IR_TGSI,
+ PIPE_SHADER_IR_LLVM
+};
+
+/**
+ * Compute-specific implementation capability. They can be queried
+ * using pipe_screen::get_compute_param.
+ */
+enum pipe_compute_cap
+{
+ PIPE_COMPUTE_CAP_IR_TARGET,
+ PIPE_COMPUTE_CAP_GRID_DIMENSION,
+ PIPE_COMPUTE_CAP_MAX_GRID_SIZE,
+ PIPE_COMPUTE_CAP_MAX_BLOCK_SIZE,
+ PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK,
+ PIPE_COMPUTE_CAP_MAX_GLOBAL_SIZE,
+ PIPE_COMPUTE_CAP_MAX_LOCAL_SIZE,
+ PIPE_COMPUTE_CAP_MAX_PRIVATE_SIZE,
+ PIPE_COMPUTE_CAP_MAX_INPUT_SIZE,
+ PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE
+};
+
+/**
+ * Composite query types
+ */
+
+/**
+ * Query result for PIPE_QUERY_SO_STATISTICS.
+ */
+struct pipe_query_data_so_statistics
+{
+ uint64_t num_primitives_written;
+ uint64_t primitives_storage_needed;
+};
+
+/**
+ * Query result for PIPE_QUERY_TIMESTAMP_DISJOINT.
+ */
+struct pipe_query_data_timestamp_disjoint
+{
+ uint64_t frequency;
+ boolean disjoint;
+};
+
+/**
+ * Query result for PIPE_QUERY_PIPELINE_STATISTICS.
+ */
+struct pipe_query_data_pipeline_statistics
+{
+ uint64_t ia_vertices; /**< Num vertices read by the vertex fetcher. */
+ uint64_t ia_primitives; /**< Num primitives read by the vertex fetcher. */
+ uint64_t vs_invocations; /**< Num vertex shader invocations. */
+ uint64_t gs_invocations; /**< Num geometry shader invocations. */
+ uint64_t gs_primitives; /**< Num primitives output by a geometry shader. */
+ uint64_t c_invocations; /**< Num primitives sent to the rasterizer. */
+ uint64_t c_primitives; /**< Num primitives that were rendered. */
+ uint64_t ps_invocations; /**< Num pixel shader invocations. */
+ uint64_t hs_invocations; /**< Num hull shader invocations. */
+ uint64_t ds_invocations; /**< Num domain shader invocations. */
+ uint64_t cs_invocations; /**< Num compute shader invocations. */
+};
+
+/**
+ * Query result (returned by pipe_context::get_query_result).
+ */
+union pipe_query_result
+{
+ /* PIPE_QUERY_OCCLUSION_PREDICATE */
+ /* PIPE_QUERY_SO_OVERFLOW_PREDICATE */
+ /* PIPE_QUERY_GPU_FINISHED */
+ boolean b;
+
+ /* PIPE_QUERY_OCCLUSION_COUNTER */
+ /* PIPE_QUERY_TIMESTAMP */
+ /* PIPE_QUERY_TIME_ELAPSED */
+ /* PIPE_QUERY_PRIMITIVES_GENERATED */
+ /* PIPE_QUERY_PRIMITIVES_EMITTED */
+ uint64_t u64;
+
+ /* PIPE_QUERY_SO_STATISTICS */
+ struct pipe_query_data_so_statistics so_statistics;
+
+ /* PIPE_QUERY_TIMESTAMP_DISJOINT */
+ struct pipe_query_data_timestamp_disjoint timestamp_disjoint;
+
+ /* PIPE_QUERY_PIPELINE_STATISTICS */
+ struct pipe_query_data_pipeline_statistics pipeline_statistics;
+};
+
+union pipe_color_union
+{
+ float f[4];
+ int i[4];
+ unsigned int ui[4];
+};
+
+struct pipe_driver_query_info
+{
+ const char *name;
+ unsigned query_type; /* PIPE_QUERY_DRIVER_SPECIFIC + i */
+ uint64_t max_value; /* max value that can be returned */
+ boolean uses_byte_units; /* whether the result is in bytes */
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/minigallium/include/pipe/p_format.h b/src/minigallium/include/pipe/p_format.h
new file mode 100644
index 0000000..b82f08f
--- /dev/null
+++ b/src/minigallium/include/pipe/p_format.h
@@ -0,0 +1,380 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright (c) 2008 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef PIPE_FORMAT_H
+#define PIPE_FORMAT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "p_config.h"
+
+enum pipe_type {
+ PIPE_TYPE_UNORM = 0,
+ PIPE_TYPE_SNORM,
+ PIPE_TYPE_SINT,
+ PIPE_TYPE_UINT,
+ PIPE_TYPE_FLOAT,
+ PIPE_TYPE_COUNT
+};
+
+/**
+ * Texture/surface image formats (preliminary)
+ */
+
+/* KW: Added lots of surface formats to support vertex element layout
+ * definitions, and eventually render-to-vertex-buffer.
+ */
+
+enum pipe_format {
+ PIPE_FORMAT_NONE = 0,
+ PIPE_FORMAT_B8G8R8A8_UNORM = 1,
+ PIPE_FORMAT_B8G8R8X8_UNORM = 2,
+ PIPE_FORMAT_A8R8G8B8_UNORM = 3,
+ PIPE_FORMAT_X8R8G8B8_UNORM = 4,
+ PIPE_FORMAT_B5G5R5A1_UNORM = 5,
+ PIPE_FORMAT_B4G4R4A4_UNORM = 6,
+ PIPE_FORMAT_B5G6R5_UNORM = 7,
+ PIPE_FORMAT_R10G10B10A2_UNORM = 8,
+ PIPE_FORMAT_L8_UNORM = 9, /**< ubyte luminance */
+ PIPE_FORMAT_A8_UNORM = 10, /**< ubyte alpha */
+ PIPE_FORMAT_I8_UNORM = 11, /**< ubyte intensity */
+ PIPE_FORMAT_L8A8_UNORM = 12, /**< ubyte alpha, luminance */
+ PIPE_FORMAT_L16_UNORM = 13, /**< ushort luminance */
+ PIPE_FORMAT_UYVY = 14,
+ PIPE_FORMAT_YUYV = 15,
+ PIPE_FORMAT_Z16_UNORM = 16,
+ PIPE_FORMAT_Z32_UNORM = 17,
+ PIPE_FORMAT_Z32_FLOAT = 18,
+ PIPE_FORMAT_Z24_UNORM_S8_UINT = 19,
+ PIPE_FORMAT_S8_UINT_Z24_UNORM = 20,
+ PIPE_FORMAT_Z24X8_UNORM = 21,
+ PIPE_FORMAT_X8Z24_UNORM = 22,
+ PIPE_FORMAT_S8_UINT = 23, /**< ubyte stencil */
+ PIPE_FORMAT_R64_FLOAT = 24,
+ PIPE_FORMAT_R64G64_FLOAT = 25,
+ PIPE_FORMAT_R64G64B64_FLOAT = 26,
+ PIPE_FORMAT_R64G64B64A64_FLOAT = 27,
+ PIPE_FORMAT_R32_FLOAT = 28,
+ PIPE_FORMAT_R32G32_FLOAT = 29,
+ PIPE_FORMAT_R32G32B32_FLOAT = 30,
+ PIPE_FORMAT_R32G32B32A32_FLOAT = 31,
+ PIPE_FORMAT_R32_UNORM = 32,
+ PIPE_FORMAT_R32G32_UNORM = 33,
+ PIPE_FORMAT_R32G32B32_UNORM = 34,
+ PIPE_FORMAT_R32G32B32A32_UNORM = 35,
+ PIPE_FORMAT_R32_USCALED = 36,
+ PIPE_FORMAT_R32G32_USCALED = 37,
+ PIPE_FORMAT_R32G32B32_USCALED = 38,
+ PIPE_FORMAT_R32G32B32A32_USCALED = 39,
+ PIPE_FORMAT_R32_SNORM = 40,
+ PIPE_FORMAT_R32G32_SNORM = 41,
+ PIPE_FORMAT_R32G32B32_SNORM = 42,
+ PIPE_FORMAT_R32G32B32A32_SNORM = 43,
+ PIPE_FORMAT_R32_SSCALED = 44,
+ PIPE_FORMAT_R32G32_SSCALED = 45,
+ PIPE_FORMAT_R32G32B32_SSCALED = 46,
+ PIPE_FORMAT_R32G32B32A32_SSCALED = 47,
+ PIPE_FORMAT_R16_UNORM = 48,
+ PIPE_FORMAT_R16G16_UNORM = 49,
+ PIPE_FORMAT_R16G16B16_UNORM = 50,
+ PIPE_FORMAT_R16G16B16A16_UNORM = 51,
+ PIPE_FORMAT_R16_USCALED = 52,
+ PIPE_FORMAT_R16G16_USCALED = 53,
+ PIPE_FORMAT_R16G16B16_USCALED = 54,
+ PIPE_FORMAT_R16G16B16A16_USCALED = 55,
+ PIPE_FORMAT_R16_SNORM = 56,
+ PIPE_FORMAT_R16G16_SNORM = 57,
+ PIPE_FORMAT_R16G16B16_SNORM = 58,
+ PIPE_FORMAT_R16G16B16A16_SNORM = 59,
+ PIPE_FORMAT_R16_SSCALED = 60,
+ PIPE_FORMAT_R16G16_SSCALED = 61,
+ PIPE_FORMAT_R16G16B16_SSCALED = 62,
+ PIPE_FORMAT_R16G16B16A16_SSCALED = 63,
+ PIPE_FORMAT_R8_UNORM = 64,
+ PIPE_FORMAT_R8G8_UNORM = 65,
+ PIPE_FORMAT_R8G8B8_UNORM = 66,
+ PIPE_FORMAT_R8G8B8A8_UNORM = 67,
+ PIPE_FORMAT_X8B8G8R8_UNORM = 68,
+ PIPE_FORMAT_R8_USCALED = 69,
+ PIPE_FORMAT_R8G8_USCALED = 70,
+ PIPE_FORMAT_R8G8B8_USCALED = 71,
+ PIPE_FORMAT_R8G8B8A8_USCALED = 72,
+ PIPE_FORMAT_R8_SNORM = 74,
+ PIPE_FORMAT_R8G8_SNORM = 75,
+ PIPE_FORMAT_R8G8B8_SNORM = 76,
+ PIPE_FORMAT_R8G8B8A8_SNORM = 77,
+ PIPE_FORMAT_R8_SSCALED = 82,
+ PIPE_FORMAT_R8G8_SSCALED = 83,
+ PIPE_FORMAT_R8G8B8_SSCALED = 84,
+ PIPE_FORMAT_R8G8B8A8_SSCALED = 85,
+ PIPE_FORMAT_R32_FIXED = 87,
+ PIPE_FORMAT_R32G32_FIXED = 88,
+ PIPE_FORMAT_R32G32B32_FIXED = 89,
+ PIPE_FORMAT_R32G32B32A32_FIXED = 90,
+ PIPE_FORMAT_R16_FLOAT = 91,
+ PIPE_FORMAT_R16G16_FLOAT = 92,
+ PIPE_FORMAT_R16G16B16_FLOAT = 93,
+ PIPE_FORMAT_R16G16B16A16_FLOAT = 94,
+
+ /* sRGB formats */
+ PIPE_FORMAT_L8_SRGB = 95,
+ PIPE_FORMAT_L8A8_SRGB = 96,
+ PIPE_FORMAT_R8G8B8_SRGB = 97,
+ PIPE_FORMAT_A8B8G8R8_SRGB = 98,
+ PIPE_FORMAT_X8B8G8R8_SRGB = 99,
+ PIPE_FORMAT_B8G8R8A8_SRGB = 100,
+ PIPE_FORMAT_B8G8R8X8_SRGB = 101,
+ PIPE_FORMAT_A8R8G8B8_SRGB = 102,
+ PIPE_FORMAT_X8R8G8B8_SRGB = 103,
+ PIPE_FORMAT_R8G8B8A8_SRGB = 104,
+
+ /* compressed formats */
+ PIPE_FORMAT_DXT1_RGB = 105,
+ PIPE_FORMAT_DXT1_RGBA = 106,
+ PIPE_FORMAT_DXT3_RGBA = 107,
+ PIPE_FORMAT_DXT5_RGBA = 108,
+
+ /* sRGB, compressed */
+ PIPE_FORMAT_DXT1_SRGB = 109,
+ PIPE_FORMAT_DXT1_SRGBA = 110,
+ PIPE_FORMAT_DXT3_SRGBA = 111,
+ PIPE_FORMAT_DXT5_SRGBA = 112,
+
+ /* rgtc compressed */
+ PIPE_FORMAT_RGTC1_UNORM = 113,
+ PIPE_FORMAT_RGTC1_SNORM = 114,
+ PIPE_FORMAT_RGTC2_UNORM = 115,
+ PIPE_FORMAT_RGTC2_SNORM = 116,
+
+ PIPE_FORMAT_R8G8_B8G8_UNORM = 117,
+ PIPE_FORMAT_G8R8_G8B8_UNORM = 118,
+
+ /* mixed formats */
+ PIPE_FORMAT_R8SG8SB8UX8U_NORM = 119,
+ PIPE_FORMAT_R5SG5SB6U_NORM = 120,
+
+ /* TODO: re-order these */
+ PIPE_FORMAT_A8B8G8R8_UNORM = 121,
+ PIPE_FORMAT_B5G5R5X1_UNORM = 122,
+ PIPE_FORMAT_R10G10B10A2_USCALED = 123,
+ PIPE_FORMAT_R11G11B10_FLOAT = 124,
+ PIPE_FORMAT_R9G9B9E5_FLOAT = 125,
+ PIPE_FORMAT_Z32_FLOAT_S8X24_UINT = 126,
+ PIPE_FORMAT_R1_UNORM = 127,
+ PIPE_FORMAT_R10G10B10X2_USCALED = 128,
+ PIPE_FORMAT_R10G10B10X2_SNORM = 129,
+ PIPE_FORMAT_L4A4_UNORM = 130,
+ PIPE_FORMAT_B10G10R10A2_UNORM = 131,
+ PIPE_FORMAT_R10SG10SB10SA2U_NORM = 132,
+ PIPE_FORMAT_R8G8Bx_SNORM = 133,
+ PIPE_FORMAT_R8G8B8X8_UNORM = 134,
+ PIPE_FORMAT_B4G4R4X4_UNORM = 135,
+
+ /* some stencil samplers formats */
+ PIPE_FORMAT_X24S8_UINT = 136,
+ PIPE_FORMAT_S8X24_UINT = 137,
+ PIPE_FORMAT_X32_S8X24_UINT = 138,
+
+ PIPE_FORMAT_B2G3R3_UNORM = 139,
+ PIPE_FORMAT_L16A16_UNORM = 140,
+ PIPE_FORMAT_A16_UNORM = 141,
+ PIPE_FORMAT_I16_UNORM = 142,
+
+ PIPE_FORMAT_LATC1_UNORM = 143,
+ PIPE_FORMAT_LATC1_SNORM = 144,
+ PIPE_FORMAT_LATC2_UNORM = 145,
+ PIPE_FORMAT_LATC2_SNORM = 146,
+
+ PIPE_FORMAT_A8_SNORM = 147,
+ PIPE_FORMAT_L8_SNORM = 148,
+ PIPE_FORMAT_L8A8_SNORM = 149,
+ PIPE_FORMAT_I8_SNORM = 150,
+ PIPE_FORMAT_A16_SNORM = 151,
+ PIPE_FORMAT_L16_SNORM = 152,
+ PIPE_FORMAT_L16A16_SNORM = 153,
+ PIPE_FORMAT_I16_SNORM = 154,
+
+ PIPE_FORMAT_A16_FLOAT = 155,
+ PIPE_FORMAT_L16_FLOAT = 156,
+ PIPE_FORMAT_L16A16_FLOAT = 157,
+ PIPE_FORMAT_I16_FLOAT = 158,
+ PIPE_FORMAT_A32_FLOAT = 159,
+ PIPE_FORMAT_L32_FLOAT = 160,
+ PIPE_FORMAT_L32A32_FLOAT = 161,
+ PIPE_FORMAT_I32_FLOAT = 162,
+
+ PIPE_FORMAT_YV12 = 163,
+ PIPE_FORMAT_YV16 = 164,
+ PIPE_FORMAT_IYUV = 165, /**< aka I420 */
+ PIPE_FORMAT_NV12 = 166,
+ PIPE_FORMAT_NV21 = 167,
+
+ PIPE_FORMAT_R4A4_UNORM = 168,
+ PIPE_FORMAT_A4R4_UNORM = 169,
+ PIPE_FORMAT_R8A8_UNORM = 170,
+ PIPE_FORMAT_A8R8_UNORM = 171,
+
+ PIPE_FORMAT_R10G10B10A2_SSCALED = 172,
+ PIPE_FORMAT_R10G10B10A2_SNORM = 173,
+
+ PIPE_FORMAT_B10G10R10A2_USCALED = 174,
+ PIPE_FORMAT_B10G10R10A2_SSCALED = 175,
+ PIPE_FORMAT_B10G10R10A2_SNORM = 176,
+
+ PIPE_FORMAT_R8_UINT = 177,
+ PIPE_FORMAT_R8G8_UINT = 178,
+ PIPE_FORMAT_R8G8B8_UINT = 179,
+ PIPE_FORMAT_R8G8B8A8_UINT = 180,
+
+ PIPE_FORMAT_R8_SINT = 181,
+ PIPE_FORMAT_R8G8_SINT = 182,
+ PIPE_FORMAT_R8G8B8_SINT = 183,
+ PIPE_FORMAT_R8G8B8A8_SINT = 184,
+
+ PIPE_FORMAT_R16_UINT = 185,
+ PIPE_FORMAT_R16G16_UINT = 186,
+ PIPE_FORMAT_R16G16B16_UINT = 187,
+ PIPE_FORMAT_R16G16B16A16_UINT = 188,
+
+ PIPE_FORMAT_R16_SINT = 189,
+ PIPE_FORMAT_R16G16_SINT = 190,
+ PIPE_FORMAT_R16G16B16_SINT = 191,
+ PIPE_FORMAT_R16G16B16A16_SINT = 192,
+
+ PIPE_FORMAT_R32_UINT = 193,
+ PIPE_FORMAT_R32G32_UINT = 194,
+ PIPE_FORMAT_R32G32B32_UINT = 195,
+ PIPE_FORMAT_R32G32B32A32_UINT = 196,
+
+ PIPE_FORMAT_R32_SINT = 197,
+ PIPE_FORMAT_R32G32_SINT = 198,
+ PIPE_FORMAT_R32G32B32_SINT = 199,
+ PIPE_FORMAT_R32G32B32A32_SINT = 200,
+
+ PIPE_FORMAT_A8_UINT = 201,
+ PIPE_FORMAT_I8_UINT = 202,
+ PIPE_FORMAT_L8_UINT = 203,
+ PIPE_FORMAT_L8A8_UINT = 204,
+
+ PIPE_FORMAT_A8_SINT = 205,
+ PIPE_FORMAT_I8_SINT = 206,
+ PIPE_FORMAT_L8_SINT = 207,
+ PIPE_FORMAT_L8A8_SINT = 208,
+
+ PIPE_FORMAT_A16_UINT = 209,
+ PIPE_FORMAT_I16_UINT = 210,
+ PIPE_FORMAT_L16_UINT = 211,
+ PIPE_FORMAT_L16A16_UINT = 212,
+
+ PIPE_FORMAT_A16_SINT = 213,
+ PIPE_FORMAT_I16_SINT = 214,
+ PIPE_FORMAT_L16_SINT = 215,
+ PIPE_FORMAT_L16A16_SINT = 216,
+
+ PIPE_FORMAT_A32_UINT = 217,
+ PIPE_FORMAT_I32_UINT = 218,
+ PIPE_FORMAT_L32_UINT = 219,
+ PIPE_FORMAT_L32A32_UINT = 220,
+
+ PIPE_FORMAT_A32_SINT = 221,
+ PIPE_FORMAT_I32_SINT = 222,
+ PIPE_FORMAT_L32_SINT = 223,
+ PIPE_FORMAT_L32A32_SINT = 224,
+
+ PIPE_FORMAT_B10G10R10A2_UINT = 225,
+
+ PIPE_FORMAT_ETC1_RGB8 = 226,
+
+ PIPE_FORMAT_R8G8_R8B8_UNORM = 227,
+ PIPE_FORMAT_G8R8_B8R8_UNORM = 228,
+
+ PIPE_FORMAT_R8G8B8X8_SNORM = 229,
+ PIPE_FORMAT_R8G8B8X8_SRGB = 230,
+ PIPE_FORMAT_R8G8B8X8_UINT = 231,
+ PIPE_FORMAT_R8G8B8X8_SINT = 232,
+ PIPE_FORMAT_B10G10R10X2_UNORM = 233,
+ PIPE_FORMAT_R16G16B16X16_UNORM = 234,
+ PIPE_FORMAT_R16G16B16X16_SNORM = 235,
+ PIPE_FORMAT_R16G16B16X16_FLOAT = 236,
+ PIPE_FORMAT_R16G16B16X16_UINT = 237,
+ PIPE_FORMAT_R16G16B16X16_SINT = 238,
+ PIPE_FORMAT_R32G32B32X32_FLOAT = 239,
+ PIPE_FORMAT_R32G32B32X32_UINT = 240,
+ PIPE_FORMAT_R32G32B32X32_SINT = 241,
+
+ PIPE_FORMAT_R8A8_SNORM = 242,
+ PIPE_FORMAT_R16A16_UNORM = 243,
+ PIPE_FORMAT_R16A16_SNORM = 244,
+ PIPE_FORMAT_R16A16_FLOAT = 245,
+ PIPE_FORMAT_R32A32_FLOAT = 246,
+ PIPE_FORMAT_R8A8_UINT = 247,
+ PIPE_FORMAT_R8A8_SINT = 248,
+ PIPE_FORMAT_R16A16_UINT = 249,
+ PIPE_FORMAT_R16A16_SINT = 250,
+ PIPE_FORMAT_R32A32_UINT = 251,
+ PIPE_FORMAT_R32A32_SINT = 252,
+ PIPE_FORMAT_R10G10B10A2_UINT = 253,
+
+ PIPE_FORMAT_COUNT
+};
+
+#if defined(PIPE_ARCH_LITTLE_ENDIAN)
+#define PIPE_FORMAT_RGBA8888_UNORM PIPE_FORMAT_R8G8B8A8_UNORM
+#define PIPE_FORMAT_RGBX8888_UNORM PIPE_FORMAT_R8G8B8X8_UNORM
+#define PIPE_FORMAT_BGRA8888_UNORM PIPE_FORMAT_B8G8R8A8_UNORM
+#define PIPE_FORMAT_BGRX8888_UNORM PIPE_FORMAT_B8G8R8X8_UNORM
+#define PIPE_FORMAT_ARGB8888_UNORM PIPE_FORMAT_A8R8G8B8_UNORM
+#define PIPE_FORMAT_XRGB8888_UNORM PIPE_FORMAT_X8R8G8B8_UNORM
+#define PIPE_FORMAT_ABGR8888_UNORM PIPE_FORMAT_A8B8G8R8_UNORM
+#define PIPE_FORMAT_XBGR8888_UNORM PIPE_FORMAT_X8B8G8R8_UNORM
+#elif defined(PIPE_ARCH_BIG_ENDIAN)
+#define PIPE_FORMAT_ABGR8888_UNORM PIPE_FORMAT_R8G8B8A8_UNORM
+#define PIPE_FORMAT_XBGR8888_UNORM PIPE_FORMAT_R8G8B8X8_UNORM
+#define PIPE_FORMAT_XRGB8888_UNORM PIPE_FORMAT_B8G8R8X8_UNORM
+#define PIPE_FORMAT_ARGB8888_UNORM PIPE_FORMAT_B8G8R8A8_UNORM
+#define PIPE_FORMAT_XRGB8888_UNORM PIPE_FORMAT_B8G8R8X8_UNORM
+#define PIPE_FORMAT_BGRA8888_UNORM PIPE_FORMAT_A8R8G8B8_UNORM
+#define PIPE_FORMAT_BGRX8888_UNORM PIPE_FORMAT_X8R8G8B8_UNORM
+#define PIPE_FORMAT_RGBA8888_UNORM PIPE_FORMAT_A8B8G8R8_UNORM
+#define PIPE_FORMAT_RGBX8888_UNORM PIPE_FORMAT_X8B8G8R8_UNORM
+#endif
+
+enum pipe_video_chroma_format
+{
+ PIPE_VIDEO_CHROMA_FORMAT_420,
+ PIPE_VIDEO_CHROMA_FORMAT_422,
+ PIPE_VIDEO_CHROMA_FORMAT_444
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/minigallium/include/pipe/p_screen.h b/src/minigallium/include/pipe/p_screen.h
new file mode 100644
index 0000000..3ed7f26
--- /dev/null
+++ b/src/minigallium/include/pipe/p_screen.h
@@ -0,0 +1,229 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * @file
+ *
+ * Screen, Adapter or GPU
+ *
+ * These are driver functions/facilities that are context independent.
+ */
+
+
+#ifndef P_SCREEN_H
+#define P_SCREEN_H
+
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_format.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_video_enums.h"
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/** Opaque types */
+struct winsys_handle;
+struct pipe_fence_handle;
+struct pipe_resource;
+struct pipe_surface;
+struct pipe_transfer;
+
+
+/**
+ * Gallium screen/adapter context. Basically everything
+ * hardware-specific that doesn't actually require a rendering
+ * context.
+ */
+struct pipe_screen {
+ void (*destroy)( struct pipe_screen * );
+
+ const char *(*get_name)( struct pipe_screen * );
+
+ const char *(*get_vendor)( struct pipe_screen * );
+
+ /**
+ * Query an integer-valued capability/parameter/limit
+ * \param param one of PIPE_CAP_x
+ */
+ int (*get_param)( struct pipe_screen *, enum pipe_cap param );
+
+ /**
+ * Query a float-valued capability/parameter/limit
+ * \param param one of PIPE_CAP_x
+ */
+ float (*get_paramf)( struct pipe_screen *, enum pipe_capf param );
+
+ /**
+ * Query a per-shader-stage integer-valued capability/parameter/limit
+ * \param param one of PIPE_CAP_x
+ */
+ int (*get_shader_param)( struct pipe_screen *, unsigned shader, enum pipe_shader_cap param );
+
+ /**
+ * Query an integer-valued capability/parameter/limit for a codec/profile
+ * \param param one of PIPE_VIDEO_CAP_x
+ */
+ int (*get_video_param)( struct pipe_screen *,
+ enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint,
+ enum pipe_video_cap param );
+
+ /**
+ * Query a compute-specific capability/parameter/limit.
+ * \param param one of PIPE_COMPUTE_CAP_x
+ * \param ret pointer to a preallocated buffer that will be
+ * initialized to the parameter value, or NULL.
+ * \return size in bytes of the parameter value that would be
+ * returned.
+ */
+ int (*get_compute_param)(struct pipe_screen *,
+ enum pipe_compute_cap param,
+ void *ret);
+
+ /**
+ * Query a timestamp in nanoseconds. The returned value should match
+ * PIPE_QUERY_TIMESTAMP. This function returns immediately and doesn't
+ * wait for rendering to complete (which cannot be achieved with queries).
+ */
+ uint64_t (*get_timestamp)(struct pipe_screen *);
+
+ struct pipe_context * (*context_create)( struct pipe_screen *,
+ void *priv );
+
+ /**
+ * Check if the given pipe_format is supported as a texture or
+ * drawing surface.
+ * \param bindings bitmask of PIPE_BIND_*
+ */
+ boolean (*is_format_supported)( struct pipe_screen *,
+ enum pipe_format format,
+ enum pipe_texture_target target,
+ unsigned sample_count,
+ unsigned bindings );
+
+ /**
+ * Check if the given pipe_format is supported as output for this codec/profile.
+ * \param profile profile to check, may also be PIPE_VIDEO_PROFILE_UNKNOWN
+ */
+ boolean (*is_video_format_supported)( struct pipe_screen *,
+ enum pipe_format format,
+ enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint );
+
+ /**
+ * Check if we can actually create the given resource (test the dimension,
+ * overall size, etc). Used to implement proxy textures.
+ * \return TRUE if size is OK, FALSE if too large.
+ */
+ boolean (*can_create_resource)(struct pipe_screen *screen,
+ const struct pipe_resource *templat);
+
+ /**
+ * Create a new texture object, using the given template info.
+ */
+ struct pipe_resource * (*resource_create)(struct pipe_screen *,
+ const struct pipe_resource *templat);
+
+ /**
+ * Create a texture from a winsys_handle. The handle is often created in
+ * another process by first creating a pipe texture and then calling
+ * resource_get_handle.
+ */
+ struct pipe_resource * (*resource_from_handle)(struct pipe_screen *,
+ const struct pipe_resource *templat,
+ struct winsys_handle *handle);
+
+ /**
+ * Get a winsys_handle from a texture. Some platforms/winsys requires
+ * that the texture is created with a special usage flag like
+ * DISPLAYTARGET or PRIMARY.
+ */
+ boolean (*resource_get_handle)(struct pipe_screen *,
+ struct pipe_resource *tex,
+ struct winsys_handle *handle);
+
+
+ void (*resource_destroy)(struct pipe_screen *,
+ struct pipe_resource *pt);
+
+
+ /**
+ * Do any special operations to ensure frontbuffer contents are
+ * displayed, eg copy fake frontbuffer.
+ * \param winsys_drawable_handle an opaque handle that the calling context
+ * gets out-of-band
+ */
+ void (*flush_frontbuffer)( struct pipe_screen *screen,
+ struct pipe_resource *resource,
+ unsigned level, unsigned layer,
+ void *winsys_drawable_handle );
+
+
+
+ /** Set ptr = fence, with reference counting */
+ void (*fence_reference)( struct pipe_screen *screen,
+ struct pipe_fence_handle **ptr,
+ struct pipe_fence_handle *fence );
+
+ /**
+ * Checks whether the fence has been signalled.
+ */
+ boolean (*fence_signalled)( struct pipe_screen *screen,
+ struct pipe_fence_handle *fence );
+
+ /**
+ * Wait for the fence to finish.
+ * \param timeout in nanoseconds (may be PIPE_TIMEOUT_INFINITE).
+ */
+ boolean (*fence_finish)( struct pipe_screen *screen,
+ struct pipe_fence_handle *fence,
+ uint64_t timeout );
+
+ /**
+ * Returns a driver-specific query.
+ *
+ * If \p info is NULL, the number of available queries is returned.
+ * Otherwise, the driver query at the specified \p index is returned
+ * in \p info. The function returns non-zero on success.
+ */
+ int (*get_driver_query_info)(struct pipe_screen *screen,
+ unsigned index,
+ struct pipe_driver_query_info *info);
+
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* P_SCREEN_H */
diff --git a/src/minigallium/include/pipe/p_shader_tokens.h b/src/minigallium/include/pipe/p_shader_tokens.h
new file mode 100644
index 0000000..1beec05
--- /dev/null
+++ b/src/minigallium/include/pipe/p_shader_tokens.h
@@ -0,0 +1,646 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2009-2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef P_SHADER_TOKENS_H
+#define P_SHADER_TOKENS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+struct tgsi_header
+{
+ unsigned HeaderSize : 8;
+ unsigned BodySize : 24;
+};
+
+#define TGSI_PROCESSOR_FRAGMENT 0
+#define TGSI_PROCESSOR_VERTEX 1
+#define TGSI_PROCESSOR_GEOMETRY 2
+#define TGSI_PROCESSOR_COMPUTE 3
+
+struct tgsi_processor
+{
+ unsigned Processor : 4; /* TGSI_PROCESSOR_ */
+ unsigned Padding : 28;
+};
+
+#define TGSI_TOKEN_TYPE_DECLARATION 0
+#define TGSI_TOKEN_TYPE_IMMEDIATE 1
+#define TGSI_TOKEN_TYPE_INSTRUCTION 2
+#define TGSI_TOKEN_TYPE_PROPERTY 3
+
+struct tgsi_token
+{
+ unsigned Type : 4; /**< TGSI_TOKEN_TYPE_x */
+ unsigned NrTokens : 8; /**< UINT */
+ unsigned Padding : 20;
+};
+
+enum tgsi_file_type {
+ TGSI_FILE_NULL =0,
+ TGSI_FILE_CONSTANT =1,
+ TGSI_FILE_INPUT =2,
+ TGSI_FILE_OUTPUT =3,
+ TGSI_FILE_TEMPORARY =4,
+ TGSI_FILE_SAMPLER =5,
+ TGSI_FILE_ADDRESS =6,
+ TGSI_FILE_IMMEDIATE =7,
+ TGSI_FILE_PREDICATE =8,
+ TGSI_FILE_SYSTEM_VALUE =9,
+ TGSI_FILE_RESOURCE =10,
+ TGSI_FILE_SAMPLER_VIEW =11,
+ TGSI_FILE_COUNT /**< how many TGSI_FILE_ types */
+};
+
+
+#define TGSI_WRITEMASK_NONE 0x00
+#define TGSI_WRITEMASK_X 0x01
+#define TGSI_WRITEMASK_Y 0x02
+#define TGSI_WRITEMASK_XY 0x03
+#define TGSI_WRITEMASK_Z 0x04
+#define TGSI_WRITEMASK_XZ 0x05
+#define TGSI_WRITEMASK_YZ 0x06
+#define TGSI_WRITEMASK_XYZ 0x07
+#define TGSI_WRITEMASK_W 0x08
+#define TGSI_WRITEMASK_XW 0x09
+#define TGSI_WRITEMASK_YW 0x0A
+#define TGSI_WRITEMASK_XYW 0x0B
+#define TGSI_WRITEMASK_ZW 0x0C
+#define TGSI_WRITEMASK_XZW 0x0D
+#define TGSI_WRITEMASK_YZW 0x0E
+#define TGSI_WRITEMASK_XYZW 0x0F
+
+#define TGSI_INTERPOLATE_CONSTANT 0
+#define TGSI_INTERPOLATE_LINEAR 1
+#define TGSI_INTERPOLATE_PERSPECTIVE 2
+#define TGSI_INTERPOLATE_COLOR 3 /* special color case for smooth/flat */
+#define TGSI_INTERPOLATE_COUNT 4
+
+#define TGSI_CYLINDRICAL_WRAP_X (1 << 0)
+#define TGSI_CYLINDRICAL_WRAP_Y (1 << 1)
+#define TGSI_CYLINDRICAL_WRAP_Z (1 << 2)
+#define TGSI_CYLINDRICAL_WRAP_W (1 << 3)
+
+struct tgsi_declaration
+{
+ unsigned Type : 4; /**< TGSI_TOKEN_TYPE_DECLARATION */
+ unsigned NrTokens : 8; /**< UINT */
+ unsigned File : 4; /**< one of TGSI_FILE_x */
+ unsigned UsageMask : 4; /**< bitmask of TGSI_WRITEMASK_x flags */
+ unsigned Dimension : 1; /**< any extra dimension info? */
+ unsigned Semantic : 1; /**< BOOL, any semantic info? */
+ unsigned Interpolate : 1; /**< any interpolation info? */
+ unsigned Invariant : 1; /**< invariant optimization? */
+ unsigned Local : 1; /**< optimize as subroutine local variable? */
+ unsigned Array : 1; /**< extra array info? */
+ unsigned Padding : 6;
+};
+
+struct tgsi_declaration_range
+{
+ unsigned First : 16; /**< UINT */
+ unsigned Last : 16; /**< UINT */
+};
+
+struct tgsi_declaration_dimension
+{
+ unsigned Index2D:16; /**< UINT */
+ unsigned Padding:16;
+};
+
+struct tgsi_declaration_interp
+{
+ unsigned Interpolate : 4; /**< one of TGSI_INTERPOLATE_x */
+ unsigned Centroid : 1; /**< centroid sampling? */
+ unsigned CylindricalWrap:4; /**< TGSI_CYLINDRICAL_WRAP_x flags */
+ unsigned Padding : 23;
+};
+
+#define TGSI_SEMANTIC_POSITION 0
+#define TGSI_SEMANTIC_COLOR 1
+#define TGSI_SEMANTIC_BCOLOR 2 /**< back-face color */
+#define TGSI_SEMANTIC_FOG 3
+#define TGSI_SEMANTIC_PSIZE 4
+#define TGSI_SEMANTIC_GENERIC 5
+#define TGSI_SEMANTIC_NORMAL 6
+#define TGSI_SEMANTIC_FACE 7
+#define TGSI_SEMANTIC_EDGEFLAG 8
+#define TGSI_SEMANTIC_PRIMID 9
+#define TGSI_SEMANTIC_INSTANCEID 10 /**< doesn't include start_instance */
+#define TGSI_SEMANTIC_VERTEXID 11
+#define TGSI_SEMANTIC_STENCIL 12
+#define TGSI_SEMANTIC_CLIPDIST 13
+#define TGSI_SEMANTIC_CLIPVERTEX 14
+#define TGSI_SEMANTIC_GRID_SIZE 15 /**< grid size in blocks */
+#define TGSI_SEMANTIC_BLOCK_ID 16 /**< id of the current block */
+#define TGSI_SEMANTIC_BLOCK_SIZE 17 /**< block size in threads */
+#define TGSI_SEMANTIC_THREAD_ID 18 /**< block-relative id of the current thread */
+#define TGSI_SEMANTIC_TEXCOORD 19 /**< texture or sprite coordinates */
+#define TGSI_SEMANTIC_PCOORD 20 /**< point sprite coordinate */
+#define TGSI_SEMANTIC_VIEWPORT_INDEX 21 /**< viewport index */
+#define TGSI_SEMANTIC_LAYER 22 /**< layer (rendertarget index) */
+#define TGSI_SEMANTIC_CULLDIST 23
+#define TGSI_SEMANTIC_COUNT 24 /**< number of semantic values */
+
+struct tgsi_declaration_semantic
+{
+ unsigned Name : 8; /**< one of TGSI_SEMANTIC_x */
+ unsigned Index : 16; /**< UINT */
+ unsigned Padding : 8;
+};
+
+struct tgsi_declaration_resource {
+ unsigned Resource : 8; /**< one of TGSI_TEXTURE_ */
+ unsigned Raw : 1;
+ unsigned Writable : 1;
+ unsigned Padding : 22;
+};
+
+struct tgsi_declaration_sampler_view {
+ unsigned Resource : 8; /**< one of TGSI_TEXTURE_ */
+ unsigned ReturnTypeX : 6; /**< one of enum pipe_type */
+ unsigned ReturnTypeY : 6; /**< one of enum pipe_type */
+ unsigned ReturnTypeZ : 6; /**< one of enum pipe_type */
+ unsigned ReturnTypeW : 6; /**< one of enum pipe_type */
+};
+
+struct tgsi_declaration_array {
+ unsigned ArrayID : 10;
+ unsigned Padding : 22;
+};
+
+/*
+ * Special resources that don't need to be declared. They map to the
+ * GLOBAL/LOCAL/PRIVATE/INPUT compute memory spaces.
+ */
+#define TGSI_RESOURCE_GLOBAL 0x7fff
+#define TGSI_RESOURCE_LOCAL 0x7ffe
+#define TGSI_RESOURCE_PRIVATE 0x7ffd
+#define TGSI_RESOURCE_INPUT 0x7ffc
+
+#define TGSI_IMM_FLOAT32 0
+#define TGSI_IMM_UINT32 1
+#define TGSI_IMM_INT32 2
+
+struct tgsi_immediate
+{
+ unsigned Type : 4; /**< TGSI_TOKEN_TYPE_IMMEDIATE */
+ unsigned NrTokens : 14; /**< UINT */
+ unsigned DataType : 4; /**< one of TGSI_IMM_x */
+ unsigned Padding : 10;
+};
+
+union tgsi_immediate_data
+{
+ float Float;
+ unsigned Uint;
+ int Int;
+};
+
+#define TGSI_PROPERTY_GS_INPUT_PRIM 0
+#define TGSI_PROPERTY_GS_OUTPUT_PRIM 1
+#define TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES 2
+#define TGSI_PROPERTY_FS_COORD_ORIGIN 3
+#define TGSI_PROPERTY_FS_COORD_PIXEL_CENTER 4
+#define TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS 5
+#define TGSI_PROPERTY_FS_DEPTH_LAYOUT 6
+#define TGSI_PROPERTY_VS_PROHIBIT_UCPS 7
+#define TGSI_PROPERTY_COUNT 8
+
+struct tgsi_property {
+ unsigned Type : 4; /**< TGSI_TOKEN_TYPE_PROPERTY */
+ unsigned NrTokens : 8; /**< UINT */
+ unsigned PropertyName : 8; /**< one of TGSI_PROPERTY */
+ unsigned Padding : 12;
+};
+
+#define TGSI_FS_COORD_ORIGIN_UPPER_LEFT 0
+#define TGSI_FS_COORD_ORIGIN_LOWER_LEFT 1
+
+#define TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER 0
+#define TGSI_FS_COORD_PIXEL_CENTER_INTEGER 1
+
+#define TGSI_FS_DEPTH_LAYOUT_NONE 0
+#define TGSI_FS_DEPTH_LAYOUT_ANY 1
+#define TGSI_FS_DEPTH_LAYOUT_GREATER 2
+#define TGSI_FS_DEPTH_LAYOUT_LESS 3
+#define TGSI_FS_DEPTH_LAYOUT_UNCHANGED 4
+
+
+struct tgsi_property_data {
+ unsigned Data;
+};
+
+/* TGSI opcodes.
+ *
+ * For more information on semantics of opcodes and
+ * which APIs are known to use which opcodes, see
+ * gallium/docs/source/tgsi.rst
+ */
+#define TGSI_OPCODE_ARL 0
+#define TGSI_OPCODE_MOV 1
+#define TGSI_OPCODE_LIT 2
+#define TGSI_OPCODE_RCP 3
+#define TGSI_OPCODE_RSQ 4
+#define TGSI_OPCODE_EXP 5
+#define TGSI_OPCODE_LOG 6
+#define TGSI_OPCODE_MUL 7
+#define TGSI_OPCODE_ADD 8
+#define TGSI_OPCODE_DP3 9
+#define TGSI_OPCODE_DP4 10
+#define TGSI_OPCODE_DST 11
+#define TGSI_OPCODE_MIN 12
+#define TGSI_OPCODE_MAX 13
+#define TGSI_OPCODE_SLT 14
+#define TGSI_OPCODE_SGE 15
+#define TGSI_OPCODE_MAD 16
+#define TGSI_OPCODE_SUB 17
+#define TGSI_OPCODE_LRP 18
+#define TGSI_OPCODE_CND 19
+#define TGSI_OPCODE_SQRT 20
+#define TGSI_OPCODE_DP2A 21
+ /* gap */
+#define TGSI_OPCODE_FRC 24
+#define TGSI_OPCODE_CLAMP 25
+#define TGSI_OPCODE_FLR 26
+#define TGSI_OPCODE_ROUND 27
+#define TGSI_OPCODE_EX2 28
+#define TGSI_OPCODE_LG2 29
+#define TGSI_OPCODE_POW 30
+#define TGSI_OPCODE_XPD 31
+ /* gap */
+#define TGSI_OPCODE_ABS 33
+#define TGSI_OPCODE_RCC 34
+#define TGSI_OPCODE_DPH 35
+#define TGSI_OPCODE_COS 36
+#define TGSI_OPCODE_DDX 37
+#define TGSI_OPCODE_DDY 38
+#define TGSI_OPCODE_KILL 39 /* unconditional */
+#define TGSI_OPCODE_PK2H 40
+#define TGSI_OPCODE_PK2US 41
+#define TGSI_OPCODE_PK4B 42
+#define TGSI_OPCODE_PK4UB 43
+#define TGSI_OPCODE_RFL 44
+#define TGSI_OPCODE_SEQ 45
+#define TGSI_OPCODE_SFL 46
+#define TGSI_OPCODE_SGT 47
+#define TGSI_OPCODE_SIN 48
+#define TGSI_OPCODE_SLE 49
+#define TGSI_OPCODE_SNE 50
+#define TGSI_OPCODE_STR 51
+#define TGSI_OPCODE_TEX 52
+#define TGSI_OPCODE_TXD 53
+#define TGSI_OPCODE_TXP 54
+#define TGSI_OPCODE_UP2H 55
+#define TGSI_OPCODE_UP2US 56
+#define TGSI_OPCODE_UP4B 57
+#define TGSI_OPCODE_UP4UB 58
+#define TGSI_OPCODE_X2D 59
+#define TGSI_OPCODE_ARA 60
+#define TGSI_OPCODE_ARR 61
+#define TGSI_OPCODE_BRA 62
+#define TGSI_OPCODE_CAL 63
+#define TGSI_OPCODE_RET 64
+#define TGSI_OPCODE_SSG 65 /* SGN */
+#define TGSI_OPCODE_CMP 66
+#define TGSI_OPCODE_SCS 67
+#define TGSI_OPCODE_TXB 68
+#define TGSI_OPCODE_NRM 69
+#define TGSI_OPCODE_DIV 70
+#define TGSI_OPCODE_DP2 71
+#define TGSI_OPCODE_TXL 72
+#define TGSI_OPCODE_BRK 73
+#define TGSI_OPCODE_IF 74
+#define TGSI_OPCODE_UIF 75
+#define TGSI_OPCODE_ELSE 77
+#define TGSI_OPCODE_ENDIF 78
+ /* gap */
+#define TGSI_OPCODE_PUSHA 81
+#define TGSI_OPCODE_POPA 82
+#define TGSI_OPCODE_CEIL 83
+#define TGSI_OPCODE_I2F 84
+#define TGSI_OPCODE_NOT 85
+#define TGSI_OPCODE_TRUNC 86
+#define TGSI_OPCODE_SHL 87
+ /* gap */
+#define TGSI_OPCODE_AND 89
+#define TGSI_OPCODE_OR 90
+#define TGSI_OPCODE_MOD 91
+#define TGSI_OPCODE_XOR 92
+#define TGSI_OPCODE_SAD 93
+#define TGSI_OPCODE_TXF 94
+#define TGSI_OPCODE_TXQ 95
+#define TGSI_OPCODE_CONT 96
+#define TGSI_OPCODE_EMIT 97
+#define TGSI_OPCODE_ENDPRIM 98
+#define TGSI_OPCODE_BGNLOOP 99
+#define TGSI_OPCODE_BGNSUB 100
+#define TGSI_OPCODE_ENDLOOP 101
+#define TGSI_OPCODE_ENDSUB 102
+#define TGSI_OPCODE_TXQ_LZ 103 /* TXQ for mipmap level 0 */
+ /* gap */
+#define TGSI_OPCODE_NOP 107
+
+#define TGSI_OPCODE_FSEQ 108
+#define TGSI_OPCODE_FSGE 109
+#define TGSI_OPCODE_FSLT 110
+#define TGSI_OPCODE_FSNE 111
+
+#define TGSI_OPCODE_NRM4 112
+#define TGSI_OPCODE_CALLNZ 113
+ /* gap */
+#define TGSI_OPCODE_BREAKC 115
+#define TGSI_OPCODE_KILL_IF 116 /* conditional kill */
+#define TGSI_OPCODE_END 117 /* aka HALT */
+ /* gap */
+#define TGSI_OPCODE_F2I 119
+#define TGSI_OPCODE_IDIV 120
+#define TGSI_OPCODE_IMAX 121
+#define TGSI_OPCODE_IMIN 122
+#define TGSI_OPCODE_INEG 123
+#define TGSI_OPCODE_ISGE 124
+#define TGSI_OPCODE_ISHR 125
+#define TGSI_OPCODE_ISLT 126
+#define TGSI_OPCODE_F2U 127
+#define TGSI_OPCODE_U2F 128
+#define TGSI_OPCODE_UADD 129
+#define TGSI_OPCODE_UDIV 130
+#define TGSI_OPCODE_UMAD 131
+#define TGSI_OPCODE_UMAX 132
+#define TGSI_OPCODE_UMIN 133
+#define TGSI_OPCODE_UMOD 134
+#define TGSI_OPCODE_UMUL 135
+#define TGSI_OPCODE_USEQ 136
+#define TGSI_OPCODE_USGE 137
+#define TGSI_OPCODE_USHR 138
+#define TGSI_OPCODE_USLT 139
+#define TGSI_OPCODE_USNE 140
+#define TGSI_OPCODE_SWITCH 141
+#define TGSI_OPCODE_CASE 142
+#define TGSI_OPCODE_DEFAULT 143
+#define TGSI_OPCODE_ENDSWITCH 144
+
+/* resource related opcodes */
+#define TGSI_OPCODE_SAMPLE 145
+#define TGSI_OPCODE_SAMPLE_I 146
+#define TGSI_OPCODE_SAMPLE_I_MS 147
+#define TGSI_OPCODE_SAMPLE_B 148
+#define TGSI_OPCODE_SAMPLE_C 149
+#define TGSI_OPCODE_SAMPLE_C_LZ 150
+#define TGSI_OPCODE_SAMPLE_D 151
+#define TGSI_OPCODE_SAMPLE_L 152
+#define TGSI_OPCODE_GATHER4 153
+#define TGSI_OPCODE_SVIEWINFO 154
+#define TGSI_OPCODE_SAMPLE_POS 155
+#define TGSI_OPCODE_SAMPLE_INFO 156
+
+#define TGSI_OPCODE_UARL 157
+#define TGSI_OPCODE_UCMP 158
+#define TGSI_OPCODE_IABS 159
+#define TGSI_OPCODE_ISSG 160
+
+#define TGSI_OPCODE_LOAD 161
+#define TGSI_OPCODE_STORE 162
+
+#define TGSI_OPCODE_MFENCE 163
+#define TGSI_OPCODE_LFENCE 164
+#define TGSI_OPCODE_SFENCE 165
+#define TGSI_OPCODE_BARRIER 166
+
+#define TGSI_OPCODE_ATOMUADD 167
+#define TGSI_OPCODE_ATOMXCHG 168
+#define TGSI_OPCODE_ATOMCAS 169
+#define TGSI_OPCODE_ATOMAND 170
+#define TGSI_OPCODE_ATOMOR 171
+#define TGSI_OPCODE_ATOMXOR 172
+#define TGSI_OPCODE_ATOMUMIN 173
+#define TGSI_OPCODE_ATOMUMAX 174
+#define TGSI_OPCODE_ATOMIMIN 175
+#define TGSI_OPCODE_ATOMIMAX 176
+
+/* to be used for shadow cube map compares */
+#define TGSI_OPCODE_TEX2 177
+#define TGSI_OPCODE_TXB2 178
+#define TGSI_OPCODE_TXL2 179
+
+#define TGSI_OPCODE_LAST 180
+
+#define TGSI_SAT_NONE 0 /* do not saturate */
+#define TGSI_SAT_ZERO_ONE 1 /* clamp to [0,1] */
+#define TGSI_SAT_MINUS_PLUS_ONE 2 /* clamp to [-1,1] */
+
+/**
+ * Opcode is the operation code to execute. A given operation defines the
+ * semantics how the source registers (if any) are interpreted and what is
+ * written to the destination registers (if any) as a result of execution.
+ *
+ * NumDstRegs and NumSrcRegs is the number of destination and source registers,
+ * respectively. For a given operation code, those numbers are fixed and are
+ * present here only for convenience.
+ *
+ * If Predicate is TRUE, tgsi_instruction_predicate token immediately follows.
+ *
+ * Saturate controls how are final results in destination registers modified.
+ */
+
+struct tgsi_instruction
+{
+ unsigned Type : 4; /* TGSI_TOKEN_TYPE_INSTRUCTION */
+ unsigned NrTokens : 8; /* UINT */
+ unsigned Opcode : 8; /* TGSI_OPCODE_ */
+ unsigned Saturate : 2; /* TGSI_SAT_ */
+ unsigned NumDstRegs : 2; /* UINT */
+ unsigned NumSrcRegs : 4; /* UINT */
+ unsigned Predicate : 1; /* BOOL */
+ unsigned Label : 1;
+ unsigned Texture : 1;
+ unsigned Padding : 1;
+};
+
+/*
+ * If tgsi_instruction::Label is TRUE, tgsi_instruction_label follows.
+ *
+ * If tgsi_instruction::Texture is TRUE, tgsi_instruction_texture follows.
+ * if texture instruction has a number of offsets,
+ * then tgsi_instruction::Texture::NumOffset of tgsi_texture_offset follow.
+ *
+ * Then, tgsi_instruction::NumDstRegs of tgsi_dst_register follow.
+ *
+ * Then, tgsi_instruction::NumSrcRegs of tgsi_src_register follow.
+ *
+ * tgsi_instruction::NrTokens contains the total number of words that make the
+ * instruction, including the instruction word.
+ */
+
+#define TGSI_SWIZZLE_X 0
+#define TGSI_SWIZZLE_Y 1
+#define TGSI_SWIZZLE_Z 2
+#define TGSI_SWIZZLE_W 3
+
+struct tgsi_instruction_label
+{
+ unsigned Label : 24; /* UINT */
+ unsigned Padding : 8;
+};
+
+#define TGSI_TEXTURE_BUFFER 0
+#define TGSI_TEXTURE_1D 1
+#define TGSI_TEXTURE_2D 2
+#define TGSI_TEXTURE_3D 3
+#define TGSI_TEXTURE_CUBE 4
+#define TGSI_TEXTURE_RECT 5
+#define TGSI_TEXTURE_SHADOW1D 6
+#define TGSI_TEXTURE_SHADOW2D 7
+#define TGSI_TEXTURE_SHADOWRECT 8
+#define TGSI_TEXTURE_1D_ARRAY 9
+#define TGSI_TEXTURE_2D_ARRAY 10
+#define TGSI_TEXTURE_SHADOW1D_ARRAY 11
+#define TGSI_TEXTURE_SHADOW2D_ARRAY 12
+#define TGSI_TEXTURE_SHADOWCUBE 13
+#define TGSI_TEXTURE_2D_MSAA 14
+#define TGSI_TEXTURE_2D_ARRAY_MSAA 15
+#define TGSI_TEXTURE_CUBE_ARRAY 16
+#define TGSI_TEXTURE_SHADOWCUBE_ARRAY 17
+#define TGSI_TEXTURE_UNKNOWN 18
+#define TGSI_TEXTURE_COUNT 19
+
+struct tgsi_instruction_texture
+{
+ unsigned Texture : 8; /* TGSI_TEXTURE_ */
+ unsigned NumOffsets : 4;
+ unsigned Padding : 20;
+};
+
+/* for texture offsets in GLSL and DirectX.
+ * Generally these always come from TGSI_FILE_IMMEDIATE,
+ * however DX11 appears to have the capability to do
+ * non-constant texture offsets.
+ */
+struct tgsi_texture_offset
+{
+ int Index : 16;
+ unsigned File : 4; /**< one of TGSI_FILE_x */
+ unsigned SwizzleX : 2; /* TGSI_SWIZZLE_x */
+ unsigned SwizzleY : 2; /* TGSI_SWIZZLE_x */
+ unsigned SwizzleZ : 2; /* TGSI_SWIZZLE_x */
+ unsigned Padding : 6;
+};
+
+/*
+ * For SM3, the following constraint applies.
+ * - Swizzle is either set to identity or replicate.
+ */
+struct tgsi_instruction_predicate
+{
+ int Index : 16; /* SINT */
+ unsigned SwizzleX : 2; /* TGSI_SWIZZLE_x */
+ unsigned SwizzleY : 2; /* TGSI_SWIZZLE_x */
+ unsigned SwizzleZ : 2; /* TGSI_SWIZZLE_x */
+ unsigned SwizzleW : 2; /* TGSI_SWIZZLE_x */
+ unsigned Negate : 1; /* BOOL */
+ unsigned Padding : 7;
+};
+
+/**
+ * File specifies the register array to access.
+ *
+ * Index specifies the element number of a register in the register file.
+ *
+ * If Indirect is TRUE, Index should be offset by the X component of the indirect
+ * register that follows. The register can be now fetched into local storage
+ * for further processing.
+ *
+ * If Negate is TRUE, all components of the fetched register are negated.
+ *
+ * The fetched register components are swizzled according to SwizzleX, SwizzleY,
+ * SwizzleZ and SwizzleW.
+ *
+ */
+
+struct tgsi_src_register
+{
+ unsigned File : 4; /* TGSI_FILE_ */
+ unsigned Indirect : 1; /* BOOL */
+ unsigned Dimension : 1; /* BOOL */
+ int Index : 16; /* SINT */
+ unsigned SwizzleX : 2; /* TGSI_SWIZZLE_ */
+ unsigned SwizzleY : 2; /* TGSI_SWIZZLE_ */
+ unsigned SwizzleZ : 2; /* TGSI_SWIZZLE_ */
+ unsigned SwizzleW : 2; /* TGSI_SWIZZLE_ */
+ unsigned Absolute : 1; /* BOOL */
+ unsigned Negate : 1; /* BOOL */
+};
+
+/**
+ * If tgsi_src_register::Indirect is TRUE, tgsi_ind_register follows.
+ *
+ * File, Index and Swizzle are handled the same as in tgsi_src_register.
+ *
+ * If ArrayID is zero the whole register file might be is indirectly addressed,
+ * if not only the Declaration with this ArrayID is accessed by this operand.
+ *
+ */
+
+struct tgsi_ind_register
+{
+ unsigned File : 4; /* TGSI_FILE_ */
+ int Index : 16; /* SINT */
+ unsigned Swizzle : 2; /* TGSI_SWIZZLE_ */
+ unsigned ArrayID : 10; /* UINT */
+};
+
+/**
+ * If tgsi_src_register::Dimension is TRUE, tgsi_dimension follows.
+ */
+
+struct tgsi_dimension
+{
+ unsigned Indirect : 1; /* BOOL */
+ unsigned Dimension : 1; /* BOOL */
+ unsigned Padding : 14;
+ int Index : 16; /* SINT */
+};
+
+struct tgsi_dst_register
+{
+ unsigned File : 4; /* TGSI_FILE_ */
+ unsigned WriteMask : 4; /* TGSI_WRITEMASK_ */
+ unsigned Indirect : 1; /* BOOL */
+ unsigned Dimension : 1; /* BOOL */
+ int Index : 16; /* SINT */
+ unsigned Padding : 6;
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* P_SHADER_TOKENS_H */
diff --git a/src/minigallium/include/pipe/p_state.h b/src/minigallium/include/pipe/p_state.h
new file mode 100644
index 0000000..29e8cc9
--- /dev/null
+++ b/src/minigallium/include/pipe/p_state.h
@@ -0,0 +1,614 @@
+/**************************************************************************
+ *
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+/**
+ * @file
+ *
+ * Abstract graphics pipe state objects.
+ *
+ * Basic notes:
+ * 1. Want compact representations, so we use bitfields.
+ * 2. Put bitfields before other (GLfloat) fields.
+ */
+
+
+#ifndef PIPE_STATE_H
+#define PIPE_STATE_H
+
+#include "p_compiler.h"
+#include "p_defines.h"
+#include "p_format.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * Implementation limits
+ */
+#define PIPE_MAX_ATTRIBS 32
+#define PIPE_MAX_CLIP_PLANES 8
+#define PIPE_MAX_COLOR_BUFS 8
+#define PIPE_MAX_CONSTANT_BUFFERS 32
+#define PIPE_MAX_SAMPLERS 16
+#define PIPE_MAX_SHADER_INPUTS 32
+#define PIPE_MAX_SHADER_OUTPUTS 48 /* 32 GENERICs + POS, PSIZE, FOG, etc. */
+#define PIPE_MAX_SHADER_SAMPLER_VIEWS 32
+#define PIPE_MAX_SHADER_RESOURCES 32
+#define PIPE_MAX_TEXTURE_LEVELS 16
+#define PIPE_MAX_SO_BUFFERS 4
+#define PIPE_MAX_SO_OUTPUTS 64
+#define PIPE_MAX_VIEWPORTS 16
+#define PIPE_MAX_CLIP_OR_CULL_DISTANCE_COUNT 8
+#define PIPE_MAX_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT 2
+
+
+struct pipe_reference
+{
+ int32_t count; /* atomic */
+};
+
+
+
+/**
+ * Primitive (point/line/tri) rasterization info
+ */
+struct pipe_rasterizer_state
+{
+ unsigned flatshade:1;
+ unsigned light_twoside:1;
+ unsigned clamp_vertex_color:1;
+ unsigned clamp_fragment_color:1;
+ unsigned front_ccw:1;
+ unsigned cull_face:2; /**< PIPE_FACE_x */
+ unsigned fill_front:2; /**< PIPE_POLYGON_MODE_x */
+ unsigned fill_back:2; /**< PIPE_POLYGON_MODE_x */
+ unsigned offset_point:1;
+ unsigned offset_line:1;
+ unsigned offset_tri:1;
+ unsigned scissor:1;
+ unsigned poly_smooth:1;
+ unsigned poly_stipple_enable:1;
+ unsigned point_smooth:1;
+ unsigned sprite_coord_mode:1; /**< PIPE_SPRITE_COORD_ */
+ unsigned point_quad_rasterization:1; /** points rasterized as quads or points */
+ unsigned point_size_per_vertex:1; /**< size computed in vertex shader */
+ unsigned multisample:1; /* XXX maybe more ms state in future */
+ unsigned line_smooth:1;
+ unsigned line_stipple_enable:1;
+ unsigned line_last_pixel:1;
+
+ /**
+ * Use the first vertex of a primitive as the provoking vertex for
+ * flat shading.
+ */
+ unsigned flatshade_first:1;
+
+ unsigned half_pixel_center:1;
+ unsigned bottom_edge_rule:1;
+
+ /**
+ * When true, rasterization is disabled and no pixels are written.
+ * This only makes sense with the Stream Out functionality.
+ */
+ unsigned rasterizer_discard:1;
+
+ /**
+ * When false, depth clipping is disabled and the depth value will be
+ * clamped later at the per-pixel level before depth testing.
+ * This depends on PIPE_CAP_DEPTH_CLIP_DISABLE.
+ */
+ unsigned depth_clip:1;
+
+ /**
+ * When true clip space in the z axis goes from [0..1] (D3D). When false
+ * [-1, 1] (GL).
+ */
+ unsigned clip_halfz:1;
+
+ /**
+ * Enable bits for clipping half-spaces.
+ * This applies to both user clip planes and shader clip distances.
+ * Note that if the bound shader exports any clip distances, these
+ * replace all user clip planes, and clip half-spaces enabled here
+ * but not written by the shader count as disabled.
+ */
+ unsigned clip_plane_enable:PIPE_MAX_CLIP_PLANES;
+
+ unsigned line_stipple_factor:8; /**< [1..256] actually */
+ unsigned line_stipple_pattern:16;
+
+ uint32_t sprite_coord_enable; /* referring to 32 TEXCOORD/GENERIC inputs */
+
+ float line_width;
+ float point_size; /**< used when no per-vertex size */
+ float offset_units;
+ float offset_scale;
+ float offset_clamp;
+};
+
+
+struct pipe_poly_stipple
+{
+ unsigned stipple[32];
+};
+
+
+struct pipe_viewport_state
+{
+ float scale[4];
+ float translate[4];
+};
+
+
+struct pipe_scissor_state
+{
+ unsigned minx:16;
+ unsigned miny:16;
+ unsigned maxx:16;
+ unsigned maxy:16;
+};
+
+
+struct pipe_clip_state
+{
+ float ucp[PIPE_MAX_CLIP_PLANES][4];
+};
+
+
+/**
+ * Stream output for vertex transform feedback.
+ */
+struct pipe_stream_output_info
+{
+ unsigned num_outputs;
+ /** stride for an entire vertex for each buffer in dwords */
+ unsigned stride[PIPE_MAX_SO_BUFFERS];
+
+ /**
+ * Array of stream outputs, in the order they are to be written in.
+ * Selected components are tightly packed into the output buffer.
+ */
+ struct {
+ unsigned register_index:8; /**< 0 to PIPE_MAX_SHADER_OUTPUTS */
+ unsigned start_component:2; /** 0 to 3 */
+ unsigned num_components:3; /** 1 to 4 */
+ unsigned output_buffer:3; /**< 0 to PIPE_MAX_SO_BUFFERS */
+ unsigned dst_offset:16; /**< offset into the buffer in dwords */
+ } output[PIPE_MAX_SO_OUTPUTS];
+};
+
+
+struct pipe_shader_state
+{
+ const struct tgsi_token *tokens;
+ struct pipe_stream_output_info stream_output;
+};
+
+
+struct pipe_depth_state
+{
+ unsigned enabled:1; /**< depth test enabled? */
+ unsigned writemask:1; /**< allow depth buffer writes? */
+ unsigned func:3; /**< depth test func (PIPE_FUNC_x) */
+};
+
+
+struct pipe_stencil_state
+{
+ unsigned enabled:1; /**< stencil[0]: stencil enabled, stencil[1]: two-side enabled */
+ unsigned func:3; /**< PIPE_FUNC_x */
+ unsigned fail_op:3; /**< PIPE_STENCIL_OP_x */
+ unsigned zpass_op:3; /**< PIPE_STENCIL_OP_x */
+ unsigned zfail_op:3; /**< PIPE_STENCIL_OP_x */
+ unsigned valuemask:8;
+ unsigned writemask:8;
+};
+
+
+struct pipe_alpha_state
+{
+ unsigned enabled:1;
+ unsigned func:3; /**< PIPE_FUNC_x */
+ float ref_value; /**< reference value */
+};
+
+
+struct pipe_depth_stencil_alpha_state
+{
+ struct pipe_depth_state depth;
+ struct pipe_stencil_state stencil[2]; /**< [0] = front, [1] = back */
+ struct pipe_alpha_state alpha;
+};
+
+
+struct pipe_rt_blend_state
+{
+ unsigned blend_enable:1;
+
+ unsigned rgb_func:3; /**< PIPE_BLEND_x */
+ unsigned rgb_src_factor:5; /**< PIPE_BLENDFACTOR_x */
+ unsigned rgb_dst_factor:5; /**< PIPE_BLENDFACTOR_x */
+
+ unsigned alpha_func:3; /**< PIPE_BLEND_x */
+ unsigned alpha_src_factor:5; /**< PIPE_BLENDFACTOR_x */
+ unsigned alpha_dst_factor:5; /**< PIPE_BLENDFACTOR_x */
+
+ unsigned colormask:4; /**< bitmask of PIPE_MASK_R/G/B/A */
+};
+
+struct pipe_blend_state
+{
+ unsigned independent_blend_enable:1;
+ unsigned logicop_enable:1;
+ unsigned logicop_func:4; /**< PIPE_LOGICOP_x */
+ unsigned dither:1;
+ unsigned alpha_to_coverage:1;
+ unsigned alpha_to_one:1;
+ struct pipe_rt_blend_state rt[PIPE_MAX_COLOR_BUFS];
+};
+
+
+struct pipe_blend_color
+{
+ float color[4];
+};
+
+struct pipe_stencil_ref
+{
+ ubyte ref_value[2];
+};
+
+struct pipe_framebuffer_state
+{
+ unsigned width, height;
+
+ /** multiple color buffers for multiple render targets */
+ unsigned nr_cbufs;
+ struct pipe_surface *cbufs[PIPE_MAX_COLOR_BUFS];
+
+ struct pipe_surface *zsbuf; /**< Z/stencil buffer */
+};
+
+
+/**
+ * Texture sampler state.
+ */
+struct pipe_sampler_state
+{
+ unsigned wrap_s:3; /**< PIPE_TEX_WRAP_x */
+ unsigned wrap_t:3; /**< PIPE_TEX_WRAP_x */
+ unsigned wrap_r:3; /**< PIPE_TEX_WRAP_x */
+ unsigned min_img_filter:2; /**< PIPE_TEX_FILTER_x */
+ unsigned min_mip_filter:2; /**< PIPE_TEX_MIPFILTER_x */
+ unsigned mag_img_filter:2; /**< PIPE_TEX_FILTER_x */
+ unsigned compare_mode:1; /**< PIPE_TEX_COMPARE_x */
+ unsigned compare_func:3; /**< PIPE_FUNC_x */
+ unsigned normalized_coords:1; /**< Are coords normalized to [0,1]? */
+ unsigned max_anisotropy:6;
+ unsigned seamless_cube_map:1;
+ float lod_bias; /**< LOD/lambda bias */
+ float min_lod, max_lod; /**< LOD clamp range, after bias */
+ union pipe_color_union border_color;
+};
+
+
+/**
+ * A view into a texture that can be bound to a color render target /
+ * depth stencil attachment point.
+ */
+struct pipe_surface
+{
+ struct pipe_reference reference;
+ struct pipe_resource *texture; /**< resource into which this is a view */
+ struct pipe_context *context; /**< context this surface belongs to */
+ enum pipe_format format;
+
+ /* XXX width/height should be removed */
+ unsigned width; /**< logical width in pixels */
+ unsigned height; /**< logical height in pixels */
+
+ unsigned writable:1; /**< writable shader resource */
+
+ union {
+ struct {
+ unsigned level;
+ unsigned first_layer:16;
+ unsigned last_layer:16;
+ } tex;
+ struct {
+ unsigned first_element;
+ unsigned last_element;
+ } buf;
+ } u;
+};
+
+
+/**
+ * A view into a texture that can be bound to a shader stage.
+ */
+struct pipe_sampler_view
+{
+ struct pipe_reference reference;
+ enum pipe_format format; /**< typed PIPE_FORMAT_x */
+ struct pipe_resource *texture; /**< texture into which this is a view */
+ struct pipe_context *context; /**< context this view belongs to */
+ union {
+ struct {
+ unsigned first_layer:16; /**< first layer to use for array textures */
+ unsigned last_layer:16; /**< last layer to use for array textures */
+ unsigned first_level:8; /**< first mipmap level to use */
+ unsigned last_level:8; /**< last mipmap level to use */
+ } tex;
+ struct {
+ unsigned first_element;
+ unsigned last_element;
+ } buf;
+ } u;
+ unsigned swizzle_r:3; /**< PIPE_SWIZZLE_x for red component */
+ unsigned swizzle_g:3; /**< PIPE_SWIZZLE_x for green component */
+ unsigned swizzle_b:3; /**< PIPE_SWIZZLE_x for blue component */
+ unsigned swizzle_a:3; /**< PIPE_SWIZZLE_x for alpha component */
+};
+
+
+/**
+ * Subregion of 1D/2D/3D image resource.
+ */
+struct pipe_box
+{
+ int x;
+ int y;
+ int z;
+ int width;
+ int height;
+ int depth;
+};
+
+
+/**
+ * A memory object/resource such as a vertex buffer or texture.
+ */
+struct pipe_resource
+{
+ struct pipe_reference reference;
+ struct pipe_screen *screen; /**< screen that this texture belongs to */
+ enum pipe_texture_target target; /**< PIPE_TEXTURE_x */
+ enum pipe_format format; /**< PIPE_FORMAT_x */
+
+ unsigned width0;
+ unsigned height0;
+ unsigned depth0;
+ unsigned array_size;
+
+ unsigned last_level:8; /**< Index of last mipmap level present/defined */
+ unsigned nr_samples:8; /**< for multisampled surfaces, nr of samples */
+ unsigned usage:8; /**< PIPE_USAGE_x (not a bitmask) */
+
+ unsigned bind; /**< bitmask of PIPE_BIND_x */
+ unsigned flags; /**< bitmask of PIPE_RESOURCE_FLAG_x */
+};
+
+
+/**
+ * Transfer object. For data transfer to/from a resource.
+ */
+struct pipe_transfer
+{
+ struct pipe_resource *resource; /**< resource to transfer to/from */
+ unsigned level; /**< texture mipmap level */
+ enum pipe_transfer_usage usage;
+ struct pipe_box box; /**< region of the resource to access */
+ unsigned stride; /**< row stride in bytes */
+ unsigned layer_stride; /**< image/layer stride in bytes */
+};
+
+
+
+/**
+ * A vertex buffer. Typically, all the vertex data/attributes for
+ * drawing something will be in one buffer. But it's also possible, for
+ * example, to put colors in one buffer and texcoords in another.
+ */
+struct pipe_vertex_buffer
+{
+ unsigned stride; /**< stride to same attrib in next vertex, in bytes */
+ unsigned buffer_offset; /**< offset to start of data in buffer, in bytes */
+ struct pipe_resource *buffer; /**< the actual buffer */
+ const void *user_buffer; /**< pointer to a user buffer if buffer == NULL */
+};
+
+
+/**
+ * A constant buffer. A subrange of an existing buffer can be set
+ * as a constant buffer.
+ */
+struct pipe_constant_buffer {
+ struct pipe_resource *buffer; /**< the actual buffer */
+ unsigned buffer_offset; /**< offset to start of data in buffer, in bytes */
+ unsigned buffer_size; /**< how much data can be read in shader */
+ const void *user_buffer; /**< pointer to a user buffer if buffer == NULL */
+};
+
+
+/**
+ * A stream output target. The structure specifies the range vertices can
+ * be written to.
+ *
+ * In addition to that, the structure should internally maintain the offset
+ * into the buffer, which should be incremented everytime something is written
+ * (appended) to it. The internal offset is buffer_offset + how many bytes
+ * have been written. The internal offset can be stored on the device
+ * and the CPU actually doesn't have to query it.
+ *
+ * Note that the buffer_size variable is actually specifying the available
+ * space in the buffer, not the size of the attached buffer.
+ * In other words in majority of cases buffer_size would simply be
+ * 'buffer->width0 - buffer_offset', so buffer_size refers to the size
+ * of the buffer left, after accounting for buffer offset, for stream output
+ * to write to.
+ *
+ * Use PIPE_QUERY_SO_STATISTICS to know how many primitives have
+ * actually been written.
+ */
+struct pipe_stream_output_target
+{
+ struct pipe_reference reference;
+ struct pipe_resource *buffer; /**< the output buffer */
+ struct pipe_context *context; /**< context this SO target belongs to */
+
+ unsigned buffer_offset; /**< offset where data should be written, in bytes */
+ unsigned buffer_size; /**< how much data is allowed to be written */
+};
+
+
+/**
+ * Information to describe a vertex attribute (position, color, etc)
+ */
+struct pipe_vertex_element
+{
+ /** Offset of this attribute, in bytes, from the start of the vertex */
+ unsigned src_offset;
+
+ /** Instance data rate divisor. 0 means this is per-vertex data,
+ * n means per-instance data used for n consecutive instances (n > 0).
+ */
+ unsigned instance_divisor;
+
+ /** Which vertex_buffer (as given to pipe->set_vertex_buffer()) does
+ * this attribute live in?
+ */
+ unsigned vertex_buffer_index;
+
+ enum pipe_format src_format;
+};
+
+
+/**
+ * An index buffer. When an index buffer is bound, all indices to vertices
+ * will be looked up in the buffer.
+ */
+struct pipe_index_buffer
+{
+ unsigned index_size; /**< size of an index, in bytes */
+ unsigned offset; /**< offset to start of data in buffer, in bytes */
+ struct pipe_resource *buffer; /**< the actual buffer */
+ const void *user_buffer; /**< pointer to a user buffer if buffer == NULL */
+};
+
+
+/**
+ * Information to describe a draw_vbo call.
+ */
+struct pipe_draw_info
+{
+ boolean indexed; /**< use index buffer */
+
+ unsigned mode; /**< the mode of the primitive */
+ unsigned start; /**< the index of the first vertex */
+ unsigned count; /**< number of vertices */
+
+ unsigned start_instance; /**< first instance id */
+ unsigned instance_count; /**< number of instances */
+
+ /**
+ * For indexed drawing, these fields apply after index lookup.
+ */
+ int index_bias; /**< a bias to be added to each index */
+ unsigned min_index; /**< the min index */
+ unsigned max_index; /**< the max index */
+
+ /**
+ * Primitive restart enable/index (only applies to indexed drawing)
+ */
+ boolean primitive_restart;
+ unsigned restart_index;
+
+ /**
+ * Stream output target. If not NULL, it's used to provide the 'count'
+ * parameter based on the number vertices captured by the stream output
+ * stage. (or generally, based on the number of bytes captured)
+ *
+ * Only 'mode', 'start_instance', and 'instance_count' are taken into
+ * account, all the other variables from pipe_draw_info are ignored.
+ *
+ * 'start' is implicitly 0 and 'count' is set as discussed above.
+ * The draw command is non-indexed.
+ *
+ * Note that this only provides the count. The vertex buffers must
+ * be set via set_vertex_buffers manually.
+ */
+ struct pipe_stream_output_target *count_from_stream_output;
+};
+
+
+/**
+ * Information to describe a blit call.
+ */
+struct pipe_blit_info
+{
+ struct {
+ struct pipe_resource *resource;
+ unsigned level;
+ struct pipe_box box; /**< negative width, height only legal for src */
+ /* For pipe_surface-like format casting: */
+ enum pipe_format format; /**< must be supported for sampling (src)
+ or rendering (dst), ZS is always supported */
+ } dst, src;
+
+ unsigned mask; /**< bitmask of PIPE_MASK_R/G/B/A/Z/S */
+ unsigned filter; /**< PIPE_TEX_FILTER_* */
+
+ boolean scissor_enable;
+ struct pipe_scissor_state scissor;
+};
+
+
+/**
+ * Structure used as a header for serialized LLVM programs.
+ */
+struct pipe_llvm_program_header
+{
+ uint32_t num_bytes; /**< Number of bytes in the LLVM bytecode program. */
+};
+
+struct pipe_compute_state
+{
+ const void *prog; /**< Compute program to be executed. */
+ unsigned req_local_mem; /**< Required size of the LOCAL resource. */
+ unsigned req_private_mem; /**< Required size of the PRIVATE resource. */
+ unsigned req_input_mem; /**< Required size of the INPUT resource. */
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/minigallium/include/pipe/p_video_enums.h b/src/minigallium/include/pipe/p_video_enums.h
new file mode 100644
index 0000000..46dad94
--- /dev/null
+++ b/src/minigallium/include/pipe/p_video_enums.h
@@ -0,0 +1,79 @@
+/**************************************************************************
+ *
+ * Copyright 2009 Younes Manton.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef PIPE_VIDEO_ENUMS_H
+#define PIPE_VIDEO_ENUMS_H
+
+enum pipe_video_format
+{
+ PIPE_VIDEO_FORMAT_UNKNOWN = 0,
+ PIPE_VIDEO_FORMAT_MPEG12, /**< MPEG1, MPEG2 */
+ PIPE_VIDEO_FORMAT_MPEG4, /**< DIVX, XVID */
+ PIPE_VIDEO_FORMAT_VC1, /**< WMV */
+ PIPE_VIDEO_FORMAT_MPEG4_AVC /**< H.264 */
+};
+
+enum pipe_video_profile
+{
+ PIPE_VIDEO_PROFILE_UNKNOWN,
+ PIPE_VIDEO_PROFILE_MPEG1,
+ PIPE_VIDEO_PROFILE_MPEG2_SIMPLE,
+ PIPE_VIDEO_PROFILE_MPEG2_MAIN,
+ PIPE_VIDEO_PROFILE_MPEG4_SIMPLE,
+ PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE,
+ PIPE_VIDEO_PROFILE_VC1_SIMPLE,
+ PIPE_VIDEO_PROFILE_VC1_MAIN,
+ PIPE_VIDEO_PROFILE_VC1_ADVANCED,
+ PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE,
+ PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN,
+ PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH
+};
+
+/* Video caps, can be different for each codec/profile */
+enum pipe_video_cap
+{
+ PIPE_VIDEO_CAP_SUPPORTED = 0,
+ PIPE_VIDEO_CAP_NPOT_TEXTURES = 1,
+ PIPE_VIDEO_CAP_MAX_WIDTH = 2,
+ PIPE_VIDEO_CAP_MAX_HEIGHT = 3,
+ PIPE_VIDEO_CAP_PREFERED_FORMAT = 4,
+ PIPE_VIDEO_CAP_PREFERS_INTERLACED = 5,
+ PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE = 6,
+ PIPE_VIDEO_CAP_SUPPORTS_INTERLACED = 7,
+ PIPE_VIDEO_CAP_MAX_LEVEL = 8
+};
+
+enum pipe_video_entrypoint
+{
+ PIPE_VIDEO_ENTRYPOINT_UNKNOWN,
+ PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+ PIPE_VIDEO_ENTRYPOINT_IDCT,
+ PIPE_VIDEO_ENTRYPOINT_MC
+};
+
+
+#endif /* PIPE_VIDEO_ENUMS_H */
diff --git a/src/minigallium/include/pipe/p_video_state.h b/src/minigallium/include/pipe/p_video_state.h
new file mode 100644
index 0000000..1fb6ff2
--- /dev/null
+++ b/src/minigallium/include/pipe/p_video_state.h
@@ -0,0 +1,292 @@
+/**************************************************************************
+ *
+ * Copyright 2009 Younes Manton.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef PIPE_VIDEO_STATE_H
+#define PIPE_VIDEO_STATE_H
+
+#include "pipe/p_defines.h"
+#include "pipe/p_format.h"
+#include "pipe/p_state.h"
+#include "pipe/p_screen.h"
+#include "util/u_inlines.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * see table 6-12 in the spec
+ */
+enum pipe_mpeg12_picture_coding_type
+{
+ PIPE_MPEG12_PICTURE_CODING_TYPE_I = 0x01,
+ PIPE_MPEG12_PICTURE_CODING_TYPE_P = 0x02,
+ PIPE_MPEG12_PICTURE_CODING_TYPE_B = 0x03,
+ PIPE_MPEG12_PICTURE_CODING_TYPE_D = 0x04
+};
+
+/*
+ * see table 6-14 in the spec
+ */
+enum pipe_mpeg12_picture_structure
+{
+ PIPE_MPEG12_PICTURE_STRUCTURE_RESERVED = 0x00,
+ PIPE_MPEG12_PICTURE_STRUCTURE_FIELD_TOP = 0x01,
+ PIPE_MPEG12_PICTURE_STRUCTURE_FIELD_BOTTOM = 0x02,
+ PIPE_MPEG12_PICTURE_STRUCTURE_FRAME = 0x03
+};
+
+/*
+ * flags for macroblock_type, see section 6.3.17.1 in the spec
+ */
+enum pipe_mpeg12_macroblock_type
+{
+ PIPE_MPEG12_MB_TYPE_QUANT = 0x01,
+ PIPE_MPEG12_MB_TYPE_MOTION_FORWARD = 0x02,
+ PIPE_MPEG12_MB_TYPE_MOTION_BACKWARD = 0x04,
+ PIPE_MPEG12_MB_TYPE_PATTERN = 0x08,
+ PIPE_MPEG12_MB_TYPE_INTRA = 0x10
+};
+
+/*
+ * flags for motion_type, see table 6-17 and 6-18 in the spec
+ */
+enum pipe_mpeg12_motion_type
+{
+ PIPE_MPEG12_MO_TYPE_RESERVED = 0x00,
+ PIPE_MPEG12_MO_TYPE_FIELD = 0x01,
+ PIPE_MPEG12_MO_TYPE_FRAME = 0x02,
+ PIPE_MPEG12_MO_TYPE_16x8 = 0x02,
+ PIPE_MPEG12_MO_TYPE_DUAL_PRIME = 0x03
+};
+
+/*
+ * see section 6.3.17.1 and table 6-19 in the spec
+ */
+enum pipe_mpeg12_dct_type
+{
+ PIPE_MPEG12_DCT_TYPE_FRAME = 0,
+ PIPE_MPEG12_DCT_TYPE_FIELD = 1
+};
+
+enum pipe_mpeg12_field_select
+{
+ PIPE_MPEG12_FS_FIRST_FORWARD = 0x01,
+ PIPE_MPEG12_FS_FIRST_BACKWARD = 0x02,
+ PIPE_MPEG12_FS_SECOND_FORWARD = 0x04,
+ PIPE_MPEG12_FS_SECOND_BACKWARD = 0x08
+};
+
+struct pipe_picture_desc
+{
+ enum pipe_video_profile profile;
+};
+
+struct pipe_quant_matrix
+{
+ enum pipe_video_format codec;
+};
+
+struct pipe_macroblock
+{
+ enum pipe_video_format codec;
+};
+
+struct pipe_mpeg12_picture_desc
+{
+ struct pipe_picture_desc base;
+
+ unsigned picture_coding_type;
+ unsigned picture_structure;
+ unsigned frame_pred_frame_dct;
+ unsigned q_scale_type;
+ unsigned alternate_scan;
+ unsigned intra_vlc_format;
+ unsigned concealment_motion_vectors;
+ unsigned intra_dc_precision;
+ unsigned f_code[2][2];
+ unsigned top_field_first;
+ unsigned full_pel_forward_vector;
+ unsigned full_pel_backward_vector;
+ unsigned num_slices;
+
+ const uint8_t *intra_matrix;
+ const uint8_t *non_intra_matrix;
+
+ struct pipe_video_buffer *ref[2];
+};
+
+struct pipe_mpeg12_macroblock
+{
+ struct pipe_macroblock base;
+
+ /* see section 6.3.17 in the spec */
+ unsigned short x, y;
+
+ /* see section 6.3.17.1 in the spec */
+ unsigned char macroblock_type;
+
+ union {
+ struct {
+ /* see table 6-17 in the spec */
+ unsigned int frame_motion_type:2;
+
+ /* see table 6-18 in the spec */
+ unsigned int field_motion_type:2;
+
+ /* see table 6-19 in the spec */
+ unsigned int dct_type:1;
+ } bits;
+ unsigned int value;
+ } macroblock_modes;
+
+ /* see section 6.3.17.2 in the spec */
+ unsigned char motion_vertical_field_select;
+
+ /* see Table 7-7 in the spec */
+ short PMV[2][2][2];
+
+ /* see figure 6.10-12 in the spec */
+ unsigned short coded_block_pattern;
+
+ /* see figure 6.10-12 in the spec */
+ short *blocks;
+
+ /* Number of skipped macroblocks after this macroblock */
+ unsigned short num_skipped_macroblocks;
+};
+
+struct pipe_mpeg4_picture_desc
+{
+ struct pipe_picture_desc base;
+
+ int32_t trd[2];
+ int32_t trb[2];
+ uint16_t vop_time_increment_resolution;
+ uint8_t vop_coding_type;
+ uint8_t vop_fcode_forward;
+ uint8_t vop_fcode_backward;
+ uint8_t resync_marker_disable;
+ uint8_t interlaced;
+ uint8_t quant_type;
+ uint8_t quarter_sample;
+ uint8_t short_video_header;
+ uint8_t rounding_control;
+ uint8_t alternate_vertical_scan_flag;
+ uint8_t top_field_first;
+
+ const uint8_t *intra_matrix;
+ const uint8_t *non_intra_matrix;
+
+ struct pipe_video_buffer *ref[2];
+};
+
+struct pipe_vc1_picture_desc
+{
+ struct pipe_picture_desc base;
+
+ uint32_t slice_count;
+ uint8_t picture_type;
+ uint8_t frame_coding_mode;
+ uint8_t postprocflag;
+ uint8_t pulldown;
+ uint8_t interlace;
+ uint8_t tfcntrflag;
+ uint8_t finterpflag;
+ uint8_t psf;
+ uint8_t dquant;
+ uint8_t panscan_flag;
+ uint8_t refdist_flag;
+ uint8_t quantizer;
+ uint8_t extended_mv;
+ uint8_t extended_dmv;
+ uint8_t overlap;
+ uint8_t vstransform;
+ uint8_t loopfilter;
+ uint8_t fastuvmc;
+ uint8_t range_mapy_flag;
+ uint8_t range_mapy;
+ uint8_t range_mapuv_flag;
+ uint8_t range_mapuv;
+ uint8_t multires;
+ uint8_t syncmarker;
+ uint8_t rangered;
+ uint8_t maxbframes;
+ uint8_t deblockEnable;
+ uint8_t pquant;
+
+ struct pipe_video_buffer *ref[2];
+};
+
+struct pipe_h264_picture_desc
+{
+ struct pipe_picture_desc base;
+
+ uint32_t slice_count;
+ int32_t field_order_cnt[2];
+ bool is_reference;
+ uint32_t frame_num;
+ uint8_t field_pic_flag;
+ uint8_t bottom_field_flag;
+ uint8_t num_ref_frames;
+ uint8_t mb_adaptive_frame_field_flag;
+ uint8_t constrained_intra_pred_flag;
+ uint8_t weighted_pred_flag;
+ uint8_t weighted_bipred_idc;
+ uint8_t frame_mbs_only_flag;
+ uint8_t transform_8x8_mode_flag;
+ int8_t chroma_qp_index_offset;
+ int8_t second_chroma_qp_index_offset;
+ int8_t pic_init_qp_minus26;
+ uint8_t num_ref_idx_l0_active_minus1;
+ uint8_t num_ref_idx_l1_active_minus1;
+ uint8_t log2_max_frame_num_minus4;
+ uint8_t pic_order_cnt_type;
+ uint8_t log2_max_pic_order_cnt_lsb_minus4;
+ uint8_t delta_pic_order_always_zero_flag;
+ uint8_t direct_8x8_inference_flag;
+ uint8_t entropy_coding_mode_flag;
+ uint8_t pic_order_present_flag;
+ uint8_t deblocking_filter_control_present_flag;
+ uint8_t redundant_pic_cnt_present_flag;
+ uint8_t scaling_lists_4x4[6][16];
+ uint8_t scaling_lists_8x8[2][64];
+
+ bool is_long_term[16];
+ bool top_is_reference[16];
+ bool bottom_is_reference[16];
+ uint32_t field_order_cnt_list[16][2];
+ uint32_t frame_num_list[16];
+
+ struct pipe_video_buffer *ref[16];
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PIPE_VIDEO_STATE_H */
diff --git a/src/minigallium/include/state_tracker/graw.h b/src/minigallium/include/state_tracker/graw.h
new file mode 100644
index 0000000..217fa31
--- /dev/null
+++ b/src/minigallium/include/state_tracker/graw.h
@@ -0,0 +1,96 @@
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef GALLIUM_RAW_H
+#define GALLIUM_RAW_H
+
+/* This is an API for exercising gallium functionality in a
+ * platform-neutral fashion. Whatever platform integration is
+ * necessary to implement this interface is orchestrated by the
+ * individual target building this entity.
+ *
+ * For instance, the graw-xlib target includes code to implent these
+ * interfaces on top of the X window system.
+ *
+ * Programs using this interface may additionally benefit from some of
+ * the utilities currently in the libgallium.a library, especially
+ * those for parsing text representations of TGSI shaders.
+ */
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_format.h"
+
+struct pipe_context;
+struct pipe_screen;
+struct pipe_surface;
+
+/* Returns a handle to be used with flush_frontbuffer()/present().
+ *
+ * Query format support with screen::is_format_supported and usage
+ * XXX.
+ */
+PUBLIC struct pipe_screen *graw_create_window_and_screen( int x,
+ int y,
+ unsigned width,
+ unsigned height,
+ enum pipe_format format,
+ void **handle);
+
+PUBLIC void graw_set_display_func( void (*func)( void ) );
+PUBLIC void graw_main_loop( void );
+
+PUBLIC void *graw_parse_geometry_shader( struct pipe_context *pipe,
+ const char *text );
+
+PUBLIC void *graw_parse_vertex_shader( struct pipe_context *pipe,
+ const char *text );
+
+PUBLIC void *graw_parse_fragment_shader( struct pipe_context *pipe,
+ const char *text );
+
+/* Parse a single command-line option, if any. Options include:
+ *
+ * -o <filename>
+ *
+ * If an option has been successfully parsed, argi is updated
+ * to point just after the option and return TRUE.
+ */
+PUBLIC boolean graw_parse_args(int *argi, int argc, char *argv[]);
+
+/* Saves surface contents to a file.
+ *
+ * If filename is NULL, the filename provided with the `-o' option
+ * is used. If the option has not been specified, the surface
+ * will not be saved.
+ *
+ * Returns TRUE if the surface has been saved.
+ */
+PUBLIC boolean graw_save_surface_to_file(struct pipe_context *pipe,
+ struct pipe_surface *surface,
+ const char *filename);
+
+#endif
diff --git a/src/minigallium/targets/graw-null/graw_util.c b/src/minigallium/targets/graw-null/graw_util.c
new file mode 100644
index 0000000..07693e8
--- /dev/null
+++ b/src/minigallium/targets/graw-null/graw_util.c
@@ -0,0 +1,96 @@
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_context.h"
+#include "pipe/p_shader_tokens.h"
+#include "pipe/p_state.h"
+#include "tgsi/tgsi_text.h"
+#include "util/u_debug.h"
+#include "util/u_memory.h"
+#include "state_tracker/graw.h"
+
+
+/* Helper functions. These are the same for all graw implementations.
+ */
+PUBLIC void *
+graw_parse_geometry_shader(struct pipe_context *pipe,
+ const char *text)
+{
+ struct tgsi_token tokens[1024];
+ struct pipe_shader_state state;
+
+ if (!tgsi_text_translate(text, tokens, Elements(tokens)))
+ return NULL;
+
+ memset(&state, 0, sizeof state);
+ state.tokens = tokens;
+ return pipe->create_gs_state(pipe, &state);
+}
+
+PUBLIC void *
+graw_parse_vertex_shader(struct pipe_context *pipe,
+ const char *text)
+{
+ struct tgsi_token tokens[1024];
+ struct pipe_shader_state state;
+
+ if (!tgsi_text_translate(text, tokens, Elements(tokens)))
+ return NULL;
+
+ memset(&state, 0, sizeof state);
+ state.tokens = tokens;
+ return pipe->create_vs_state(pipe, &state);
+}
+
+PUBLIC void *
+graw_parse_fragment_shader(struct pipe_context *pipe,
+ const char *text)
+{
+ struct tgsi_token tokens[1024];
+ struct pipe_shader_state state;
+
+ if (!tgsi_text_translate(text, tokens, Elements(tokens)))
+ return NULL;
+
+ memset(&state, 0, sizeof state);
+ state.tokens = tokens;
+ return pipe->create_fs_state(pipe, &state);
+}
+
+static char out_filename[256] = "";
+
+PUBLIC boolean
+graw_parse_args(int *argi,
+ int argc,
+ char *argv[])
+{
+ if (strcmp(argv[*argi], "-o") == 0) {
+ if (*argi + 1 >= argc) {
+ return FALSE;
+ }
+
+ strncpy(out_filename, argv[*argi + 1], sizeof(out_filename) - 1);
+ out_filename[sizeof(out_filename) - 1] = '\0';
+ *argi += 2;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+PUBLIC boolean
+graw_save_surface_to_file(struct pipe_context *pipe,
+ struct pipe_surface *surface,
+ const char *filename)
+{
+ if (!filename || !*filename) {
+ filename = out_filename;
+ if (!filename || !*filename) {
+ return FALSE;
+ }
+ }
+
+ /* XXX: Make that working in release builds.
+ */
+ debug_dump_surface_bmp(pipe, filename, surface);
+ return TRUE;
+}
diff --git a/src/minigallium/test.c b/src/minigallium/test.c
new file mode 100644
index 0000000..ee63334
--- /dev/null
+++ b/src/minigallium/test.c
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/* Beginnings of TGSI->Vivante conversion -- WIP */
+/* usage: ./test tgsi_testdata/cube_companion_frag.tgsi */
+#include "tgsi/tgsi_text.h"
+#include "tgsi/tgsi_iterate.h"
+#include "tgsi/tgsi_dump.h"
+#include "tgsi/tgsi_parse.h"
+#include "tgsi/tgsi_strings.h"
+#include "pipe/p_shader_tokens.h"
+#include "util/u_memory.h"
+#include "util/u_math.h"
+
+#include "etna.h"
+#include "etna_util.h"
+#include "etna_asm.h"
+#include "etna_internal.h"
+#include "etna_shader.h"
+#include "isa.xml.h"
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+/* load a text file into memory */
+static char *
+load_text_file(const char *file_name)
+{
+ char *text = NULL;
+ size_t size;
+ size_t total_read = 0;
+ FILE *fp = fopen(file_name, "rb");
+
+ if (!fp) {
+ return NULL;
+ }
+
+ fseek(fp, 0L, SEEK_END);
+ size = ftell(fp);
+ fseek(fp, 0L, SEEK_SET);
+
+ text = (char *) malloc(size + 1);
+ if (text != NULL) {
+ do {
+ size_t bytes = fread(text + total_read,
+ 1, size - total_read, fp);
+ if (bytes < size - total_read) {
+ free(text);
+ text = NULL;
+ break;
+ }
+
+ if (bytes == 0) {
+ break;
+ }
+
+ total_read += bytes;
+ } while (total_read < size);
+
+ text[total_read] = '\0';
+ }
+
+ fclose(fp);
+
+ return text;
+}
+
+int main(int argc, char **argv)
+{
+ if(argc < 2)
+ {
+ fprintf(stderr, "Must pass shader source name as argument\n");
+ exit(1);
+ }
+ const char *text = load_text_file(argv[1]);
+ if(!text)
+ {
+ fprintf(stderr, "Unable to open %s\n", argv[1]);
+ exit(1);
+ }
+ struct tgsi_token tokens[ETNA_MAX_TOKENS];
+ if(tgsi_text_translate(text, tokens, Elements(tokens)))
+ {
+ /* tgsi_dump(tokens, 0); */
+#if 0
+ union {
+ struct tgsi_header h;
+ struct tgsi_token t;
+ } hdr;
+
+ hdr.t = tokens[0];
+ printf("Header size: %i\n", hdr.h.HeaderSize);
+ printf("Body size: %i\n", hdr.h.BodySize);
+ int totalSize = hdr.h.HeaderSize + hdr.h.BodySize;
+
+ for(int i=0; i<totalSize; ++i)
+ {
+ printf("%08x ", *((uint32_t*)&tokens[i]));
+ }
+ printf("\n");
+#endif
+ struct etna_shader_object *sobj = NULL;
+ struct etna_pipe_specs specs = {
+ .vertex_sampler_offset = 8,
+ .vs_need_z_div = true
+ };
+ etna_compile_shader_object(&specs, tokens, &sobj);
+
+ etna_dump_shader_object(sobj);
+
+ int fd = creat("shader.bin", 0777);
+ write(fd, sobj->code, sobj->code_size*4);
+ close(fd);
+
+ etna_destroy_shader_object(sobj);
+
+ } else {
+ fprintf(stderr, "Unable to parse %s\n", argv[1]);
+ }
+
+ return 0;
+}
+
diff --git a/src/minigallium/tgsi_testdata/cube_companion_frag.tgsi b/src/minigallium/tgsi_testdata/cube_companion_frag.tgsi
new file mode 100644
index 0000000..2ed493e
--- /dev/null
+++ b/src/minigallium/tgsi_testdata/cube_companion_frag.tgsi
@@ -0,0 +1,14 @@
+FRAG
+PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1
+DCL IN[0], GENERIC[0], PERSPECTIVE
+DCL IN[1], GENERIC[1], PERSPECTIVE
+DCL OUT[0], COLOR
+DCL SAMP[0]
+DCL TEMP[0..1], LOCAL
+IMM[0] FLT32 { 3.0000, 0.0000, 0.0000, 0.0000}
+ 0: MUL TEMP[0], IMM[0].xxxx, IN[0]
+ 1: TEX TEMP[1], IN[1].xyyy, SAMP[0], 2D
+ 2: MUL TEMP[0], TEMP[0], TEMP[1]
+ 3: MOV OUT[0], TEMP[0]
+ 4: END
+
diff --git a/src/minigallium/tgsi_testdata/cube_companion_vert.tgsi b/src/minigallium/tgsi_testdata/cube_companion_vert.tgsi
new file mode 100644
index 0000000..7858838
--- /dev/null
+++ b/src/minigallium/tgsi_testdata/cube_companion_vert.tgsi
@@ -0,0 +1,37 @@
+VERT
+DCL IN[0]
+DCL IN[1]
+DCL IN[2]
+DCL OUT[0], POSITION
+DCL OUT[1], GENERIC[0]
+DCL OUT[2], GENERIC[1]
+DCL CONST[0..10]
+DCL TEMP[0..4], LOCAL
+IMM[0] FLT32 { 2.0000, 20.0000, 1.0000, 0.0000}
+ 0: MUL TEMP[0], CONST[3], IN[2].xxxx
+ 1: MAD TEMP[0], CONST[4], IN[2].yyyy, TEMP[0]
+ 2: MAD TEMP[0], CONST[5], IN[2].zzzz, TEMP[0]
+ 3: MAD TEMP[0], CONST[6], IN[2].wwww, TEMP[0]
+ 4: MUL TEMP[1], CONST[7], IN[2].xxxx
+ 5: MAD TEMP[1], CONST[8], IN[2].yyyy, TEMP[1]
+ 6: MAD TEMP[1], CONST[9], IN[2].zzzz, TEMP[1]
+ 7: MAD TEMP[1], CONST[10], IN[2].wwww, TEMP[1]
+ 8: RCP TEMP[2].x, TEMP[1].wwww
+ 9: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[2].xxxx
+ 10: ADD TEMP[1].xyz, IMM[0].xxyy, -TEMP[1].xyzz
+ 11: MOV TEMP[2].w, IMM[0].zzzz
+ 12: MUL TEMP[3].xyz, CONST[0].xyzz, IN[1].xxxx
+ 13: MAD TEMP[3].xyz, CONST[1].xyzz, IN[1].yyyy, TEMP[3].xyzz
+ 14: MAD TEMP[3].xyz, CONST[2].xyzz, IN[1].zzzz, TEMP[3].xyzz
+ 15: DP3 TEMP[4].x, TEMP[1].xyzz, TEMP[1].xyzz
+ 16: RSQ TEMP[4].x, TEMP[4].xxxx
+ 17: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[4].xxxx
+ 18: DP3 TEMP[1].x, TEMP[3].xyzz, TEMP[1].xyzz
+ 19: MAX TEMP[1].x, IMM[0].wwww, TEMP[1].xxxx
+ 20: MOV TEMP[2].xyz, TEMP[1].xxxx
+ 21: MOV TEMP[1].xy, IN[0].xyxx
+ 22: MOV OUT[1], TEMP[2]
+ 23: MOV OUT[0], TEMP[0]
+ 24: MOV OUT[2], TEMP[1]
+ 25: END
+
diff --git a/src/minigallium/tgsi_testdata/cube_frag.tgsi b/src/minigallium/tgsi_testdata/cube_frag.tgsi
new file mode 100644
index 0000000..72f9d57
--- /dev/null
+++ b/src/minigallium/tgsi_testdata/cube_frag.tgsi
@@ -0,0 +1,7 @@
+FRAG
+PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1
+DCL IN[0], GENERIC[0], PERSPECTIVE
+DCL OUT[0], COLOR
+ 0: MOV OUT[0], IN[0]
+ 1: END
+
diff --git a/src/minigallium/tgsi_testdata/cube_vert.tgsi b/src/minigallium/tgsi_testdata/cube_vert.tgsi
new file mode 100644
index 0000000..64c2e21
--- /dev/null
+++ b/src/minigallium/tgsi_testdata/cube_vert.tgsi
@@ -0,0 +1,34 @@
+VERT
+DCL IN[0]
+DCL IN[1]
+DCL IN[2]
+DCL OUT[0], POSITION
+DCL OUT[1], GENERIC[0]
+DCL CONST[0..10]
+DCL TEMP[0..4], LOCAL
+IMM[0] FLT32 { 2.0000, 20.0000, 1.0000, 0.0000}
+ 0: MUL TEMP[0], CONST[3], IN[2].xxxx
+ 1: MAD TEMP[0], CONST[4], IN[2].yyyy, TEMP[0]
+ 2: MAD TEMP[0], CONST[5], IN[2].zzzz, TEMP[0]
+ 3: MAD TEMP[0], CONST[6], IN[2].wwww, TEMP[0]
+ 4: MUL TEMP[1], CONST[7], IN[2].xxxx
+ 5: MAD TEMP[1], CONST[8], IN[2].yyyy, TEMP[1]
+ 6: MAD TEMP[1], CONST[9], IN[2].zzzz, TEMP[1]
+ 7: MAD TEMP[1], CONST[10], IN[2].wwww, TEMP[1]
+ 8: RCP TEMP[2].x, TEMP[1].wwww
+ 9: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[2].xxxx
+ 10: ADD TEMP[1].xyz, IMM[0].xxyy, -TEMP[1].xyzz
+ 11: MOV TEMP[2].w, IMM[0].zzzz
+ 12: MUL TEMP[3].xyz, CONST[0].xyzz, IN[1].xxxx
+ 13: MAD TEMP[3].xyz, CONST[1].xyzz, IN[1].yyyy, TEMP[3].xyzz
+ 14: MAD TEMP[3].xyz, CONST[2].xyzz, IN[1].zzzz, TEMP[3].xyzz
+ 15: DP3 TEMP[4].x, TEMP[1].xyzz, TEMP[1].xyzz
+ 16: RSQ TEMP[4].x, TEMP[4].xxxx
+ 17: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[4].xxxx
+ 18: DP3 TEMP[1].x, TEMP[3].xyzz, TEMP[1].xyzz
+ 19: MAX TEMP[1].x, IMM[0].wwww, TEMP[1].xxxx
+ 20: MUL TEMP[2].xyz, TEMP[1].xxxx, IN[0].xyzz
+ 21: MOV OUT[1], TEMP[2]
+ 22: MOV OUT[0], TEMP[0]
+ 23: END
+
diff --git a/src/minigallium/tgsi_testdata/cubemap_sphere_frag.tgsi b/src/minigallium/tgsi_testdata/cubemap_sphere_frag.tgsi
new file mode 100644
index 0000000..4be3c4c
--- /dev/null
+++ b/src/minigallium/tgsi_testdata/cubemap_sphere_frag.tgsi
@@ -0,0 +1,10 @@
+FRAG
+PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1
+DCL IN[0], GENERIC[0], PERSPECTIVE
+DCL OUT[0], COLOR
+DCL SAMP[0]
+DCL TEMP[0], LOCAL
+ 0: TEX TEMP[0], IN[0].xyzz, SAMP[0], CUBE
+ 1: MOV OUT[0], TEMP[0]
+ 2: END
+
diff --git a/src/minigallium/tgsi_testdata/cubemap_sphere_vert.tgsi b/src/minigallium/tgsi_testdata/cubemap_sphere_vert.tgsi
new file mode 100644
index 0000000..9cfec4a
--- /dev/null
+++ b/src/minigallium/tgsi_testdata/cubemap_sphere_vert.tgsi
@@ -0,0 +1,11 @@
+VERT
+DCL IN[0]
+DCL IN[1]
+DCL OUT[0], POSITION
+DCL OUT[1], GENERIC[0]
+DCL TEMP[0], LOCAL
+ 0: MOV TEMP[0].xyz, IN[0].xyzx
+ 1: MOV OUT[1], TEMP[0]
+ 2: MOV OUT[0], IN[1]
+ 3: END
+
diff --git a/src/minigallium/tgsi_testdata/displacement_frag.tgsi b/src/minigallium/tgsi_testdata/displacement_frag.tgsi
new file mode 100644
index 0000000..72f9d57
--- /dev/null
+++ b/src/minigallium/tgsi_testdata/displacement_frag.tgsi
@@ -0,0 +1,7 @@
+FRAG
+PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1
+DCL IN[0], GENERIC[0], PERSPECTIVE
+DCL OUT[0], COLOR
+ 0: MOV OUT[0], IN[0]
+ 1: END
+
diff --git a/src/minigallium/tgsi_testdata/displacement_vert.tgsi b/src/minigallium/tgsi_testdata/displacement_vert.tgsi
new file mode 100644
index 0000000..4b5dbc2
--- /dev/null
+++ b/src/minigallium/tgsi_testdata/displacement_vert.tgsi
@@ -0,0 +1,40 @@
+VERT
+DCL IN[0]
+DCL IN[1]
+DCL IN[2]
+DCL OUT[0], POSITION
+DCL OUT[1], GENERIC[0]
+DCL SAMP[0]
+DCL CONST[1..11]
+DCL TEMP[0..4], LOCAL
+IMM[0] FLT32 { 0.0000, 0.2000, 2.0000, 20.0000}
+IMM[1] FLT32 { 0.0000, 1.0000, 0.0000, 0.0000}
+ 0: MOV TEMP[0].w, IMM[0].xxxx
+ 1: TEX TEMP[1].x, IN[0].xyyy, SAMP[0], 2D
+ 2: MUL TEMP[1].x, IMM[0].yyyy, TEMP[1].xxxx
+ 3: MUL TEMP[0].xyz, TEMP[1].xxxx, IN[1].xyzz
+ 4: ADD TEMP[0], IN[2], TEMP[0]
+ 5: MUL TEMP[1], CONST[4], TEMP[0].xxxx
+ 6: MAD TEMP[1], CONST[5], TEMP[0].yyyy, TEMP[1]
+ 7: MAD TEMP[1], CONST[6], TEMP[0].zzzz, TEMP[1]
+ 8: MAD TEMP[0], CONST[7], TEMP[0].wwww, TEMP[1]
+ 9: MUL TEMP[1], CONST[8], IN[2].xxxx
+ 10: MAD TEMP[1], CONST[9], IN[2].yyyy, TEMP[1]
+ 11: MAD TEMP[1], CONST[10], IN[2].zzzz, TEMP[1]
+ 12: MAD TEMP[1], CONST[11], IN[2].wwww, TEMP[1]
+ 13: RCP TEMP[2].x, TEMP[1].wwww
+ 14: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[2].xxxx
+ 15: ADD TEMP[1].xyz, IMM[0].zzww, -TEMP[1].xyzz
+ 16: MOV TEMP[2].yzw, IMM[1].xxxy
+ 17: MUL TEMP[3].xyz, CONST[1].xyzz, IN[1].xxxx
+ 18: MAD TEMP[3].xyz, CONST[2].xyzz, IN[1].yyyy, TEMP[3].xyzz
+ 19: MAD TEMP[3].xyz, CONST[3].xyzz, IN[1].zzzz, TEMP[3].xyzz
+ 20: DP3 TEMP[4].x, TEMP[1].xyzz, TEMP[1].xyzz
+ 21: RSQ TEMP[4].x, TEMP[4].xxxx
+ 22: MUL TEMP[1].xyz, TEMP[1].xyzz, TEMP[4].xxxx
+ 23: DP3 TEMP[1].x, TEMP[3].xyzz, TEMP[1].xyzz
+ 24: MAX TEMP[2].x, IMM[0].xxxx, TEMP[1].xxxx
+ 25: MOV OUT[1], TEMP[2]
+ 26: MOV OUT[0], TEMP[0]
+ 27: END
+
diff --git a/src/minigallium/tgsi_testdata/etna_gears_ps.tgsi b/src/minigallium/tgsi_testdata/etna_gears_ps.tgsi
new file mode 100644
index 0000000..51bed8e
--- /dev/null
+++ b/src/minigallium/tgsi_testdata/etna_gears_ps.tgsi
@@ -0,0 +1,6 @@
+PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1
+DCL IN[0], GENERIC[0], PERSPECTIVE
+DCL OUT[0], COLOR
+ 0: MOV OUT[0], IN[0]
+ 1: END
+
diff --git a/src/minigallium/tgsi_testdata/etna_gears_vs.tgsi b/src/minigallium/tgsi_testdata/etna_gears_vs.tgsi
new file mode 100644
index 0000000..74176f5
--- /dev/null
+++ b/src/minigallium/tgsi_testdata/etna_gears_vs.tgsi
@@ -0,0 +1,29 @@
+VERT
+DCL IN[0]
+DCL IN[1]
+DCL OUT[0], POSITION
+DCL OUT[1], GENERIC[0]
+DCL CONST[0..9]
+DCL TEMP[0..1], LOCAL
+IMM[0] FLT32 { 0.0000, 0.0000, 0.0000, 0.0000}
+ 0: MUL TEMP[0], CONST[2], IN[0].xxxx
+ 1: MAD TEMP[0], CONST[3], IN[0].yyyy, TEMP[0]
+ 2: MAD TEMP[0], CONST[4], IN[0].zzzz, TEMP[0]
+ 3: ADD TEMP[0].xyz, TEMP[0], CONST[5]
+ 4: DP3 TEMP[1].x, TEMP[0].xyzz, TEMP[0].xyzz
+ 5: RSQ TEMP[1].x, TEMP[1].xxxx
+ 6: MUL TEMP[0].xyz, TEMP[0].xyzz, TEMP[1].xxxx
+ 7: DP3 TEMP[1].x, CONST[1].xyzz, CONST[1].xyzz
+ 8: RSQ TEMP[1].x, TEMP[1].xxxx
+ 9: MUL TEMP[1].xyz, CONST[1].xyzz, TEMP[1].xxxx
+ 10: DP3 TEMP[0].x, TEMP[0].xyzz, TEMP[1].xyzz
+ 11: MAX TEMP[0].x, TEMP[0].xxxx, IMM[0].xxxx
+ 12: MUL TEMP[0], TEMP[0].xxxx, CONST[0]
+ 13: MUL TEMP[1], CONST[6], IN[1].xxxx
+ 14: MAD TEMP[1], CONST[7], IN[1].yyyy, TEMP[1]
+ 15: MAD TEMP[1], CONST[8], IN[1].zzzz, TEMP[1]
+ 16: ADD TEMP[1], TEMP[1], CONST[9]
+ 17: MOV OUT[1], TEMP[0]
+ 18: MOV OUT[0], TEMP[1]
+ 19: END
+
diff --git a/src/minigallium/tgsi_testdata/particle_system_frag.tgsi b/src/minigallium/tgsi_testdata/particle_system_frag.tgsi
new file mode 100644
index 0000000..5da88ba
--- /dev/null
+++ b/src/minigallium/tgsi_testdata/particle_system_frag.tgsi
@@ -0,0 +1,16 @@
+FRAG
+PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1
+DCL IN[0], PCOORD, LINEAR
+DCL IN[1], GENERIC[0], PERSPECTIVE
+DCL OUT[0], COLOR
+DCL SAMP[0]
+DCL CONST[1]
+DCL TEMP[0..1], LOCAL
+ 0: TEX TEMP[0], IN[0].xyyy, SAMP[0], 2D
+ 1: MUL TEMP[0], CONST[1], TEMP[0]
+ 2: MOV TEMP[1].xyz, TEMP[0].xyzx
+ 3: MUL TEMP[0].x, TEMP[0].wwww, IN[1].xxxx
+ 4: MOV TEMP[1].w, TEMP[0].xxxx
+ 5: MOV OUT[0], TEMP[1]
+ 6: END
+
diff --git a/src/minigallium/tgsi_testdata/particle_system_vert.tgsi b/src/minigallium/tgsi_testdata/particle_system_vert.tgsi
new file mode 100644
index 0000000..51b38a6
--- /dev/null
+++ b/src/minigallium/tgsi_testdata/particle_system_vert.tgsi
@@ -0,0 +1,29 @@
+VERT
+DCL IN[0]
+DCL IN[1]
+DCL IN[2]
+DCL OUT[0], POSITION
+DCL OUT[1], PSIZE
+DCL OUT[2], GENERIC[0]
+DCL CONST[0..1]
+DCL TEMP[0..2], LOCAL
+IMM[0] FLT32 { 1.0000, -1000.0000, 0.0000, 40.0000}
+ 0: SGE TEMP[0].x, IN[2].xxxx, CONST[1].xxxx
+ 1: IF TEMP[0].xxxx :0
+ 2: MAD TEMP[0].xyz, CONST[1].xxxx, IN[0].xyzz, IN[1].xyzz
+ 3: ADD TEMP[0].xyz, TEMP[0].xyzz, CONST[0].xyzz
+ 4: MOV TEMP[0].w, IMM[0].xxxx
+ 5: ELSE :0
+ 6: MOV TEMP[0], IMM[0].yyzz
+ 7: ENDIF
+ 8: RCP TEMP[1].x, IN[2].xxxx
+ 9: MUL TEMP[1].x, CONST[1].xxxx, TEMP[1].xxxx
+ 10: ADD_SAT TEMP[1].x, IMM[0].xxxx, -TEMP[1].xxxx
+ 11: MUL TEMP[2].x, TEMP[1].xxxx, TEMP[1].xxxx
+ 12: MUL TEMP[2].x, TEMP[2].xxxx, IMM[0].wwww
+ 13: MOV TEMP[1].x, TEMP[1].xxxx
+ 14: MOV OUT[2], TEMP[1]
+ 15: MOV OUT[1], TEMP[2].xxxx
+ 16: MOV OUT[0], TEMP[0]
+ 17: END
+
diff --git a/src/minigallium/tgsi_testdata/stencil_test_frag.tgsi b/src/minigallium/tgsi_testdata/stencil_test_frag.tgsi
new file mode 100644
index 0000000..0383127
--- /dev/null
+++ b/src/minigallium/tgsi_testdata/stencil_test_frag.tgsi
@@ -0,0 +1,7 @@
+FRAG
+PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1
+DCL OUT[0], COLOR
+DCL CONST[0]
+ 0: MOV OUT[0], CONST[0]
+ 1: END
+
diff --git a/src/minigallium/tgsi_testdata/stencil_test_vert.tgsi b/src/minigallium/tgsi_testdata/stencil_test_vert.tgsi
new file mode 100644
index 0000000..d42194b
--- /dev/null
+++ b/src/minigallium/tgsi_testdata/stencil_test_vert.tgsi
@@ -0,0 +1,6 @@
+VERT
+DCL IN[0]
+DCL OUT[0], POSITION
+ 0: MOV OUT[0], IN[0]
+ 1: END
+
diff --git a/src/minigallium/tgsi_testdata/sun_fs_frag.tgsi b/src/minigallium/tgsi_testdata/sun_fs_frag.tgsi
new file mode 100644
index 0000000..d310f60
--- /dev/null
+++ b/src/minigallium/tgsi_testdata/sun_fs_frag.tgsi
@@ -0,0 +1,1157 @@
+FRAG
+PROPERTY FS_COORD_ORIGIN LOWER_LEFT
+PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1
+DCL IN[0], POSITION, LINEAR
+DCL OUT[0], COLOR
+DCL SAMP[0]
+DCL SAMP[1]
+DCL CONST[3..4]
+DCL CONST[2]
+DCL TEMP[0]
+DCL TEMP[1], LOCAL
+DCL TEMP[2], LOCAL
+DCL TEMP[3], LOCAL
+DCL TEMP[4], LOCAL
+DCL TEMP[5], LOCAL
+DCL TEMP[6], LOCAL
+DCL TEMP[7], LOCAL
+DCL TEMP[8], LOCAL
+DCL TEMP[9], LOCAL
+DCL TEMP[10], LOCAL
+DCL TEMP[11], LOCAL
+DCL TEMP[12], LOCAL
+DCL TEMP[13], LOCAL
+DCL TEMP[14], LOCAL
+DCL TEMP[15], LOCAL
+DCL TEMP[16], LOCAL
+DCL TEMP[17], LOCAL
+DCL TEMP[18], LOCAL
+DCL TEMP[19], LOCAL
+IMM[0] FLT32 { 0.1500, 0.2500, 0.0700, 0.2000}
+IMM[1] FLT32 { 0.2400, 0.1000, -0.5000, 2.0000}
+IMM[2] FLT32 { 0.5000, 1.0000, 0.0000, 1.5708}
+IMM[3] FLT32 { -0.0310, 0.0866, -0.2146, 0.0000}
+IMM[4] FLT32 { 3.1416, -3.1416, 1.5708, 0.1592}
+IMM[5] FLT32 { 0.0010, 0.3500, 0.0150, 15.0000}
+IMM[6] FLT32 { 0.0667, 1.0000, 100.0000, 10000.0000}
+IMM[7] FLT32 { 3.0000, 100000.0000, -1.0000, 45.0000}
+IMM[8] FLT32 { 0.0222, 40.0000, 0.1250, 80.0000}
+IMM[9] FLT32 { 0.0625, 200.0000, 160.0000, 0.0312}
+IMM[10] FLT32 { 400.0000, 320.0000, 0.0156, 800.0000}
+IMM[11] FLT32 { 640.0000, 0.0078, 1600.0000, 1280.0000}
+IMM[12] FLT32 { 0.0039, 3200.0000, 2560.0000, 0.0020}
+IMM[13] FLT32 { 6400.0000, 1.1000, 50.0000, 1.2000}
+IMM[14] FLT32 { 24.0000, 4.5000, 0.3000, 0.7500}
+IMM[15] FLT32 { 0.8000, 0.3500, 0.1000, 0.6500}
+IMM[16] FLT32 { 0.8000, 0.6500, 0.3000, 0.0000}
+ 0: MOV TEMP[0], IN[0]
+ 1: MAD TEMP[0].y, IN[0], CONST[4].zzzz, CONST[4].wwww
+ 2: TEX TEMP[1].x, IMM[0].xyyy, SAMP[1], 2D
+ 3: TEX TEMP[2].x, IMM[0].zyyy, SAMP[1], 2D
+ 4: MUL TEMP[2].x, TEMP[2].xxxx, IMM[0].yyyy
+ 5: MAD TEMP[1].x, TEMP[1].xxxx, IMM[0].yyyy, TEMP[2].xxxx
+ 6: MAD TEMP[2].x, TEMP[1].xxxx, IMM[0].wwww, IMM[1].xxxx
+ 7: RCP TEMP[3].x, TEMP[2].xxxx
+ 8: MUL TEMP[4].x, CONST[2].xxxx, IMM[1].yyyy
+ 9: RCP TEMP[5].x, CONST[3].yyyy
+ 10: MUL TEMP[5].x, CONST[3].xxxx, TEMP[5].xxxx
+ 11: RCP TEMP[6].x, CONST[3].xxxx
+ 12: RCP TEMP[6].y, CONST[3].yyyy
+ 13: MUL TEMP[6].xy, TEMP[0].xyyy, TEMP[6].xyyy
+ 14: ADD TEMP[7].xy, IMM[1].zzzz, TEMP[6].xyyy
+ 15: MOV TEMP[8].y, TEMP[7].yyyy
+ 16: MUL TEMP[8].x, TEMP[7].xxxx, TEMP[5].xxxx
+ 17: MUL TEMP[9].xy, IMM[1].wwww, TEMP[8].xyyy
+ 18: DP2 TEMP[9].x, TEMP[9].xyyy, TEMP[9].xyyy
+ 19: SQRT TEMP[9].x, TEMP[9].xxxx
+ 20: POW TEMP[9].x, TEMP[9].xxxx, IMM[2].xxxx
+ 21: ADD TEMP[10].x, IMM[2].yyyy, -TEMP[9].xxxx
+ 22: ADD TEMP[11].x, IMM[2].yyyy, -TEMP[9].xxxx
+ 23: ABS TEMP[12].x, TEMP[7].yyyy
+ 24: ABS TEMP[13].x, TEMP[8].xxxx
+ 25: MUL TEMP[13].x, IMM[2].zzzz, TEMP[13].xxxx
+ 26: SLT TEMP[12].x, TEMP[13].xxxx, TEMP[12].xxxx
+ 27: IF TEMP[12].xxxx :2
+ 28: RCP TEMP[12].x, TEMP[7].yyyy
+ 29: MUL TEMP[12].x, TEMP[8].xxxx, TEMP[12].xxxx
+ 30: MAD TEMP[13].x, TEMP[12].xxxx, TEMP[12].xxxx, IMM[2].yyyy
+ 31: RSQ TEMP[13].x, TEMP[13].xxxx
+ 32: MUL TEMP[12].x, TEMP[12].xxxx, TEMP[13].xxxx
+ 33: SSG TEMP[13].x, TEMP[12].xxxx
+ 34: ABS TEMP[14].x, TEMP[12].xxxx
+ 35: ADD TEMP[14].x, IMM[2].yyyy, -TEMP[14].xxxx
+ 36: SQRT TEMP[14].x, TEMP[14].xxxx
+ 37: ABS TEMP[15].x, TEMP[12].xxxx
+ 38: ABS TEMP[16].x, TEMP[12].xxxx
+ 39: ABS TEMP[12].x, TEMP[12].xxxx
+ 40: MAD TEMP[12].x, TEMP[12].xxxx, IMM[3].xxxx, IMM[3].yyyy
+ 41: MAD TEMP[12].x, TEMP[16].xxxx, TEMP[12].xxxx, IMM[3].zzzz
+ 42: MAD TEMP[12].x, TEMP[15].xxxx, TEMP[12].xxxx, IMM[2].wwww
+ 43: MUL TEMP[12].x, TEMP[14].xxxx, TEMP[12].xxxx
+ 44: ADD TEMP[12].x, IMM[2].wwww, -TEMP[12].xxxx
+ 45: MUL TEMP[12].x, TEMP[13].xxxx, TEMP[12].xxxx
+ 46: MOV TEMP[13].x, TEMP[12].xxxx
+ 47: SLT TEMP[7].x, TEMP[7].yyyy, IMM[3].wwww
+ 48: IF TEMP[7].xxxx :2
+ 49: SGE TEMP[7].x, TEMP[8].xxxx, IMM[3].wwww
+ 50: IF TEMP[7].xxxx :2
+ 51: ADD TEMP[13].x, TEMP[12].xxxx, IMM[4].xxxx
+ 52: ELSE :2
+ 53: ADD TEMP[13].x, TEMP[13].xxxx, IMM[4].yyyy
+ 54: ENDIF
+ 55: ENDIF
+ 56: ELSE :2
+ 57: SSG TEMP[7].x, TEMP[8].xxxx
+ 58: MUL TEMP[13].x, TEMP[7].xxxx, IMM[4].zzzz
+ 59: ENDIF
+ 60: DP2 TEMP[7].x, TEMP[8].xyyy, TEMP[8].xyyy
+ 61: SQRT TEMP[7].x, TEMP[7].xxxx
+ 62: MUL TEMP[8].x, TEMP[13].xxxx, IMM[4].wwww
+ 63: MOV TEMP[8].y, TEMP[7].xxxx
+ 64: MUL TEMP[12].x, TEMP[4].xxxx, IMM[1].yyyy
+ 65: MOV TEMP[8].z, TEMP[12].xxxx
+ 66: MOV TEMP[12].x, IMM[3].wwww
+ 67: MAD TEMP[13].x, TEMP[1].xxxx, IMM[5].xxxx, IMM[5].yyyy
+ 68: MUL TEMP[13].x, -TEMP[4].xxxx, TEMP[13].xxxx
+ 69: MOV TEMP[12].y, TEMP[13].xxxx
+ 70: MUL TEMP[13].x, TEMP[4].xxxx, IMM[5].zzzz
+ 71: MOV TEMP[12].z, TEMP[13].xxxx
+ 72: ADD TEMP[12].xyz, TEMP[8].xyzz, TEMP[12].xyzz
+ 73: MUL TEMP[12].xyz, TEMP[12].xyzz, IMM[5].wwww
+ 74: MUL TEMP[13].xyz, TEMP[12].xyzz, IMM[6].xxxx
+ 75: FRC TEMP[13].xyz, TEMP[13].xyzz
+ 76: MUL TEMP[13].xyz, IMM[5].wwww, TEMP[13].xyzz
+ 77: FLR TEMP[13].xyz, TEMP[13].xyzz
+ 78: MUL TEMP[13].xyz, TEMP[13].xyzz, IMM[6].yzww
+ 79: ADD TEMP[14].xyz, TEMP[12].xyzz, IMM[2].yyyy
+ 80: MUL TEMP[14].xyz, TEMP[14].xyzz, IMM[6].xxxx
+ 81: FRC TEMP[14].xyz, TEMP[14].xyzz
+ 82: MUL TEMP[14].xyz, IMM[5].wwww, TEMP[14].xyzz
+ 83: FLR TEMP[14].xyz, TEMP[14].xyzz
+ 84: MUL TEMP[14].xyz, TEMP[14].xyzz, IMM[6].yzww
+ 85: FRC TEMP[12].xyz, TEMP[12].xyzz
+ 86: MUL TEMP[15].xyz, TEMP[12].xyzz, TEMP[12].xyzz
+ 87: MUL TEMP[12].xyz, IMM[1].wwww, TEMP[12].xyzz
+ 88: ADD TEMP[12].xyz, IMM[7].xxxx, -TEMP[12].xyzz
+ 89: MUL TEMP[12].xyz, TEMP[15].xyzz, TEMP[12].xyzz
+ 90: ADD TEMP[15].x, TEMP[13].xxxx, TEMP[13].yyyy
+ 91: ADD TEMP[15].x, TEMP[15].xxxx, TEMP[13].zzzz
+ 92: ADD TEMP[16].x, TEMP[14].xxxx, TEMP[13].yyyy
+ 93: ADD TEMP[16].x, TEMP[16].xxxx, TEMP[13].zzzz
+ 94: MOV TEMP[15].y, TEMP[16].xxxx
+ 95: ADD TEMP[16].x, TEMP[13].xxxx, TEMP[14].yyyy
+ 96: ADD TEMP[16].x, TEMP[16].xxxx, TEMP[13].zzzz
+ 97: MOV TEMP[15].z, TEMP[16].xxxx
+ 98: ADD TEMP[16].x, TEMP[14].xxxx, TEMP[14].yyyy
+ 99: ADD TEMP[16].x, TEMP[16].xxxx, TEMP[13].zzzz
+100: MOV TEMP[15].w, TEMP[16].xxxx
+101: MUL TEMP[16], TEMP[15], IMM[5].xxxx
+102: SIN TEMP[17].x, TEMP[16].xxxx
+103: SIN TEMP[17].y, TEMP[16].yyyy
+104: SIN TEMP[17].z, TEMP[16].zzzz
+105: SIN TEMP[17].w, TEMP[16].wwww
+106: MUL TEMP[16], TEMP[17], IMM[7].yyyy
+107: FRC TEMP[16], TEMP[16]
+108: ADD TEMP[14], TEMP[15], TEMP[14].zzzz
+109: ADD TEMP[13], TEMP[14], -TEMP[13].zzzz
+110: MUL TEMP[13], TEMP[13], IMM[5].xxxx
+111: SIN TEMP[14].x, TEMP[13].xxxx
+112: SIN TEMP[14].y, TEMP[13].yyyy
+113: SIN TEMP[14].z, TEMP[13].zzzz
+114: SIN TEMP[14].w, TEMP[13].wwww
+115: MUL TEMP[13], TEMP[14], IMM[7].yyyy
+116: FRC TEMP[13], TEMP[13]
+117: LRP TEMP[14].x, TEMP[12].xxxx, TEMP[16].yyyy, TEMP[16].xxxx
+118: LRP TEMP[15].x, TEMP[12].xxxx, TEMP[16].wwww, TEMP[16].zzzz
+119: LRP TEMP[14].x, TEMP[12].yyyy, TEMP[15].xxxx, TEMP[14].xxxx
+120: LRP TEMP[15].x, TEMP[12].xxxx, TEMP[13].yyyy, TEMP[13].xxxx
+121: LRP TEMP[13].x, TEMP[12].xxxx, TEMP[13].wwww, TEMP[13].zzzz
+122: LRP TEMP[13].x, TEMP[12].yyyy, TEMP[13].xxxx, TEMP[15].xxxx
+123: LRP TEMP[12].x, TEMP[12].zzzz, TEMP[13].xxxx, TEMP[14].xxxx
+124: MAD TEMP[12].x, TEMP[12].xxxx, IMM[1].wwww, IMM[7].zzzz
+125: ABS TEMP[12].x, TEMP[12].xxxx
+126: MOV TEMP[13].x, IMM[3].wwww
+127: MAD TEMP[14].x, TEMP[1].xxxx, IMM[5].xxxx, IMM[0].xxxx
+128: MUL TEMP[14].x, -TEMP[4].xxxx, TEMP[14].xxxx
+129: MOV TEMP[13].y, TEMP[14].xxxx
+130: MUL TEMP[14].x, TEMP[4].xxxx, IMM[5].zzzz
+131: MOV TEMP[13].z, TEMP[14].xxxx
+132: ADD TEMP[13].xyz, TEMP[8].xyzz, TEMP[13].xyzz
+133: MUL TEMP[13].xyz, TEMP[13].xyzz, IMM[7].wwww
+134: MUL TEMP[14].xyz, TEMP[13].xyzz, IMM[8].xxxx
+135: FRC TEMP[14].xyz, TEMP[14].xyzz
+136: MUL TEMP[14].xyz, IMM[7].wwww, TEMP[14].xyzz
+137: FLR TEMP[14].xyz, TEMP[14].xyzz
+138: MUL TEMP[14].xyz, TEMP[14].xyzz, IMM[6].yzww
+139: ADD TEMP[15].xyz, TEMP[13].xyzz, IMM[2].yyyy
+140: MUL TEMP[15].xyz, TEMP[15].xyzz, IMM[8].xxxx
+141: FRC TEMP[15].xyz, TEMP[15].xyzz
+142: MUL TEMP[15].xyz, IMM[7].wwww, TEMP[15].xyzz
+143: FLR TEMP[15].xyz, TEMP[15].xyzz
+144: MUL TEMP[15].xyz, TEMP[15].xyzz, IMM[6].yzww
+145: FRC TEMP[13].xyz, TEMP[13].xyzz
+146: MUL TEMP[16].xyz, TEMP[13].xyzz, TEMP[13].xyzz
+147: MUL TEMP[13].xyz, IMM[1].wwww, TEMP[13].xyzz
+148: ADD TEMP[13].xyz, IMM[7].xxxx, -TEMP[13].xyzz
+149: MUL TEMP[13].xyz, TEMP[16].xyzz, TEMP[13].xyzz
+150: ADD TEMP[16].x, TEMP[14].xxxx, TEMP[14].yyyy
+151: ADD TEMP[16].x, TEMP[16].xxxx, TEMP[14].zzzz
+152: ADD TEMP[17].x, TEMP[15].xxxx, TEMP[14].yyyy
+153: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[14].zzzz
+154: MOV TEMP[16].y, TEMP[17].xxxx
+155: ADD TEMP[17].x, TEMP[14].xxxx, TEMP[15].yyyy
+156: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[14].zzzz
+157: MOV TEMP[16].z, TEMP[17].xxxx
+158: ADD TEMP[17].x, TEMP[15].xxxx, TEMP[15].yyyy
+159: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[14].zzzz
+160: MOV TEMP[16].w, TEMP[17].xxxx
+161: MUL TEMP[17], TEMP[16], IMM[5].xxxx
+162: SIN TEMP[18].x, TEMP[17].xxxx
+163: SIN TEMP[18].y, TEMP[17].yyyy
+164: SIN TEMP[18].z, TEMP[17].zzzz
+165: SIN TEMP[18].w, TEMP[17].wwww
+166: MUL TEMP[17], TEMP[18], IMM[7].yyyy
+167: FRC TEMP[17], TEMP[17]
+168: ADD TEMP[15], TEMP[16], TEMP[15].zzzz
+169: ADD TEMP[14], TEMP[15], -TEMP[14].zzzz
+170: MUL TEMP[14], TEMP[14], IMM[5].xxxx
+171: SIN TEMP[15].x, TEMP[14].xxxx
+172: SIN TEMP[15].y, TEMP[14].yyyy
+173: SIN TEMP[15].z, TEMP[14].zzzz
+174: SIN TEMP[15].w, TEMP[14].wwww
+175: MUL TEMP[14], TEMP[15], IMM[7].yyyy
+176: FRC TEMP[14], TEMP[14]
+177: LRP TEMP[15].x, TEMP[13].xxxx, TEMP[17].yyyy, TEMP[17].xxxx
+178: LRP TEMP[16].x, TEMP[13].xxxx, TEMP[17].wwww, TEMP[17].zzzz
+179: LRP TEMP[15].x, TEMP[13].yyyy, TEMP[16].xxxx, TEMP[15].xxxx
+180: LRP TEMP[16].x, TEMP[13].xxxx, TEMP[14].yyyy, TEMP[14].xxxx
+181: LRP TEMP[14].x, TEMP[13].xxxx, TEMP[14].wwww, TEMP[14].zzzz
+182: LRP TEMP[14].x, TEMP[13].yyyy, TEMP[14].xxxx, TEMP[16].xxxx
+183: LRP TEMP[13].x, TEMP[13].zzzz, TEMP[14].xxxx, TEMP[15].xxxx
+184: MAD TEMP[13].x, TEMP[13].xxxx, IMM[1].wwww, IMM[7].zzzz
+185: ABS TEMP[13].x, TEMP[13].xxxx
+186: MOV TEMP[14].x, IMM[3].wwww
+187: MOV TEMP[14].y, -TEMP[4].xxxx
+188: MUL TEMP[15].x, TEMP[4].xxxx, IMM[0].wwww
+189: MOV TEMP[14].z, TEMP[15].xxxx
+190: ADD TEMP[14].xyz, TEMP[8].xyzz, TEMP[14].xyzz
+191: ADD TEMP[15].x, TEMP[12].xxxx, IMM[2].yyyy
+192: MUL TEMP[15].x, IMM[8].yyyy, TEMP[15].xxxx
+193: MUL TEMP[14].xyz, TEMP[14].xyzz, TEMP[15].xxxx
+194: RCP TEMP[16].x, TEMP[15].xxxx
+195: MUL TEMP[16].xyz, TEMP[14].xyzz, TEMP[16].xxxx
+196: FRC TEMP[16].xyz, TEMP[16].xyzz
+197: MUL TEMP[16].xyz, TEMP[15].xxxx, TEMP[16].xyzz
+198: FLR TEMP[16].xyz, TEMP[16].xyzz
+199: MUL TEMP[16].xyz, TEMP[16].xyzz, IMM[6].yzww
+200: ADD TEMP[17].xyz, TEMP[14].xyzz, IMM[2].yyyy
+201: RCP TEMP[18].x, TEMP[15].xxxx
+202: MUL TEMP[17].xyz, TEMP[17].xyzz, TEMP[18].xxxx
+203: FRC TEMP[17].xyz, TEMP[17].xyzz
+204: MUL TEMP[15].xyz, TEMP[15].xxxx, TEMP[17].xyzz
+205: FLR TEMP[15].xyz, TEMP[15].xyzz
+206: MUL TEMP[15].xyz, TEMP[15].xyzz, IMM[6].yzww
+207: FRC TEMP[14].xyz, TEMP[14].xyzz
+208: MUL TEMP[17].xyz, TEMP[14].xyzz, TEMP[14].xyzz
+209: MUL TEMP[14].xyz, IMM[1].wwww, TEMP[14].xyzz
+210: ADD TEMP[14].xyz, IMM[7].xxxx, -TEMP[14].xyzz
+211: MUL TEMP[14].xyz, TEMP[17].xyzz, TEMP[14].xyzz
+212: ADD TEMP[17].x, TEMP[16].xxxx, TEMP[16].yyyy
+213: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[16].zzzz
+214: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[16].yyyy
+215: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+216: MOV TEMP[17].y, TEMP[18].xxxx
+217: ADD TEMP[18].x, TEMP[16].xxxx, TEMP[15].yyyy
+218: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+219: MOV TEMP[17].z, TEMP[18].xxxx
+220: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[15].yyyy
+221: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+222: MOV TEMP[17].w, TEMP[18].xxxx
+223: MUL TEMP[18], TEMP[17], IMM[5].xxxx
+224: SIN TEMP[19].x, TEMP[18].xxxx
+225: SIN TEMP[19].y, TEMP[18].yyyy
+226: SIN TEMP[19].z, TEMP[18].zzzz
+227: SIN TEMP[19].w, TEMP[18].wwww
+228: MUL TEMP[18], TEMP[19], IMM[7].yyyy
+229: FRC TEMP[18], TEMP[18]
+230: ADD TEMP[15], TEMP[17], TEMP[15].zzzz
+231: ADD TEMP[15], TEMP[15], -TEMP[16].zzzz
+232: MUL TEMP[15], TEMP[15], IMM[5].xxxx
+233: SIN TEMP[16].x, TEMP[15].xxxx
+234: SIN TEMP[16].y, TEMP[15].yyyy
+235: SIN TEMP[16].z, TEMP[15].zzzz
+236: SIN TEMP[16].w, TEMP[15].wwww
+237: MUL TEMP[15], TEMP[16], IMM[7].yyyy
+238: FRC TEMP[15], TEMP[15]
+239: LRP TEMP[16].x, TEMP[14].xxxx, TEMP[18].yyyy, TEMP[18].xxxx
+240: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[18].wwww, TEMP[18].zzzz
+241: LRP TEMP[16].x, TEMP[14].yyyy, TEMP[17].xxxx, TEMP[16].xxxx
+242: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[15].yyyy, TEMP[15].xxxx
+243: LRP TEMP[15].x, TEMP[14].xxxx, TEMP[15].wwww, TEMP[15].zzzz
+244: LRP TEMP[15].x, TEMP[14].yyyy, TEMP[15].xxxx, TEMP[17].xxxx
+245: LRP TEMP[14].x, TEMP[14].zzzz, TEMP[15].xxxx, TEMP[16].xxxx
+246: MAD TEMP[14].x, TEMP[14].xxxx, IMM[1].wwww, IMM[7].zzzz
+247: MAD TEMP[10].x, IMM[8].zzzz, TEMP[14].xxxx, TEMP[10].xxxx
+248: MOV TEMP[14].x, IMM[3].wwww
+249: MOV TEMP[14].y, -TEMP[4].xxxx
+250: MUL TEMP[15].x, TEMP[4].xxxx, IMM[0].wwww
+251: MOV TEMP[14].z, TEMP[15].xxxx
+252: ADD TEMP[14].xyz, TEMP[8].xyzz, TEMP[14].xyzz
+253: ADD TEMP[15].x, TEMP[13].xxxx, IMM[2].yyyy
+254: MUL TEMP[15].x, IMM[6].zzzz, TEMP[15].xxxx
+255: MUL TEMP[14].xyz, TEMP[14].xyzz, TEMP[15].xxxx
+256: RCP TEMP[16].x, TEMP[15].xxxx
+257: MUL TEMP[16].xyz, TEMP[14].xyzz, TEMP[16].xxxx
+258: FRC TEMP[16].xyz, TEMP[16].xyzz
+259: MUL TEMP[16].xyz, TEMP[15].xxxx, TEMP[16].xyzz
+260: FLR TEMP[16].xyz, TEMP[16].xyzz
+261: MUL TEMP[16].xyz, TEMP[16].xyzz, IMM[6].yzww
+262: ADD TEMP[17].xyz, TEMP[14].xyzz, IMM[2].yyyy
+263: RCP TEMP[18].x, TEMP[15].xxxx
+264: MUL TEMP[17].xyz, TEMP[17].xyzz, TEMP[18].xxxx
+265: FRC TEMP[17].xyz, TEMP[17].xyzz
+266: MUL TEMP[15].xyz, TEMP[15].xxxx, TEMP[17].xyzz
+267: FLR TEMP[15].xyz, TEMP[15].xyzz
+268: MUL TEMP[15].xyz, TEMP[15].xyzz, IMM[6].yzww
+269: FRC TEMP[14].xyz, TEMP[14].xyzz
+270: MUL TEMP[17].xyz, TEMP[14].xyzz, TEMP[14].xyzz
+271: MUL TEMP[14].xyz, IMM[1].wwww, TEMP[14].xyzz
+272: ADD TEMP[14].xyz, IMM[7].xxxx, -TEMP[14].xyzz
+273: MUL TEMP[14].xyz, TEMP[17].xyzz, TEMP[14].xyzz
+274: ADD TEMP[17].x, TEMP[16].xxxx, TEMP[16].yyyy
+275: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[16].zzzz
+276: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[16].yyyy
+277: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+278: MOV TEMP[17].y, TEMP[18].xxxx
+279: ADD TEMP[18].x, TEMP[16].xxxx, TEMP[15].yyyy
+280: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+281: MOV TEMP[17].z, TEMP[18].xxxx
+282: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[15].yyyy
+283: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+284: MOV TEMP[17].w, TEMP[18].xxxx
+285: MUL TEMP[18], TEMP[17], IMM[5].xxxx
+286: SIN TEMP[19].x, TEMP[18].xxxx
+287: SIN TEMP[19].y, TEMP[18].yyyy
+288: SIN TEMP[19].z, TEMP[18].zzzz
+289: SIN TEMP[19].w, TEMP[18].wwww
+290: MUL TEMP[18], TEMP[19], IMM[7].yyyy
+291: FRC TEMP[18], TEMP[18]
+292: ADD TEMP[15], TEMP[17], TEMP[15].zzzz
+293: ADD TEMP[15], TEMP[15], -TEMP[16].zzzz
+294: MUL TEMP[15], TEMP[15], IMM[5].xxxx
+295: SIN TEMP[16].x, TEMP[15].xxxx
+296: SIN TEMP[16].y, TEMP[15].yyyy
+297: SIN TEMP[16].z, TEMP[15].zzzz
+298: SIN TEMP[16].w, TEMP[15].wwww
+299: MUL TEMP[15], TEMP[16], IMM[7].yyyy
+300: FRC TEMP[15], TEMP[15]
+301: LRP TEMP[16].x, TEMP[14].xxxx, TEMP[18].yyyy, TEMP[18].xxxx
+302: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[18].wwww, TEMP[18].zzzz
+303: LRP TEMP[16].x, TEMP[14].yyyy, TEMP[17].xxxx, TEMP[16].xxxx
+304: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[15].yyyy, TEMP[15].xxxx
+305: LRP TEMP[15].x, TEMP[14].xxxx, TEMP[15].wwww, TEMP[15].zzzz
+306: LRP TEMP[15].x, TEMP[14].yyyy, TEMP[15].xxxx, TEMP[17].xxxx
+307: LRP TEMP[14].x, TEMP[14].zzzz, TEMP[15].xxxx, TEMP[16].xxxx
+308: MAD TEMP[14].x, TEMP[14].xxxx, IMM[1].wwww, IMM[7].zzzz
+309: MAD TEMP[11].x, IMM[8].zzzz, TEMP[14].xxxx, TEMP[11].xxxx
+310: MOV TEMP[14].x, IMM[3].wwww
+311: MOV TEMP[14].y, -TEMP[4].xxxx
+312: MUL TEMP[15].x, TEMP[4].xxxx, IMM[0].wwww
+313: MOV TEMP[14].z, TEMP[15].xxxx
+314: ADD TEMP[14].xyz, TEMP[8].xyzz, TEMP[14].xyzz
+315: ADD TEMP[15].x, TEMP[12].xxxx, IMM[2].yyyy
+316: MUL TEMP[15].x, IMM[8].wwww, TEMP[15].xxxx
+317: MUL TEMP[14].xyz, TEMP[14].xyzz, TEMP[15].xxxx
+318: RCP TEMP[16].x, TEMP[15].xxxx
+319: MUL TEMP[16].xyz, TEMP[14].xyzz, TEMP[16].xxxx
+320: FRC TEMP[16].xyz, TEMP[16].xyzz
+321: MUL TEMP[16].xyz, TEMP[15].xxxx, TEMP[16].xyzz
+322: FLR TEMP[16].xyz, TEMP[16].xyzz
+323: MUL TEMP[16].xyz, TEMP[16].xyzz, IMM[6].yzww
+324: ADD TEMP[17].xyz, TEMP[14].xyzz, IMM[2].yyyy
+325: RCP TEMP[18].x, TEMP[15].xxxx
+326: MUL TEMP[17].xyz, TEMP[17].xyzz, TEMP[18].xxxx
+327: FRC TEMP[17].xyz, TEMP[17].xyzz
+328: MUL TEMP[15].xyz, TEMP[15].xxxx, TEMP[17].xyzz
+329: FLR TEMP[15].xyz, TEMP[15].xyzz
+330: MUL TEMP[15].xyz, TEMP[15].xyzz, IMM[6].yzww
+331: FRC TEMP[14].xyz, TEMP[14].xyzz
+332: MUL TEMP[17].xyz, TEMP[14].xyzz, TEMP[14].xyzz
+333: MUL TEMP[14].xyz, IMM[1].wwww, TEMP[14].xyzz
+334: ADD TEMP[14].xyz, IMM[7].xxxx, -TEMP[14].xyzz
+335: MUL TEMP[14].xyz, TEMP[17].xyzz, TEMP[14].xyzz
+336: ADD TEMP[17].x, TEMP[16].xxxx, TEMP[16].yyyy
+337: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[16].zzzz
+338: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[16].yyyy
+339: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+340: MOV TEMP[17].y, TEMP[18].xxxx
+341: ADD TEMP[18].x, TEMP[16].xxxx, TEMP[15].yyyy
+342: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+343: MOV TEMP[17].z, TEMP[18].xxxx
+344: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[15].yyyy
+345: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+346: MOV TEMP[17].w, TEMP[18].xxxx
+347: MUL TEMP[18], TEMP[17], IMM[5].xxxx
+348: SIN TEMP[19].x, TEMP[18].xxxx
+349: SIN TEMP[19].y, TEMP[18].yyyy
+350: SIN TEMP[19].z, TEMP[18].zzzz
+351: SIN TEMP[19].w, TEMP[18].wwww
+352: MUL TEMP[18], TEMP[19], IMM[7].yyyy
+353: FRC TEMP[18], TEMP[18]
+354: ADD TEMP[15], TEMP[17], TEMP[15].zzzz
+355: ADD TEMP[15], TEMP[15], -TEMP[16].zzzz
+356: MUL TEMP[15], TEMP[15], IMM[5].xxxx
+357: SIN TEMP[16].x, TEMP[15].xxxx
+358: SIN TEMP[16].y, TEMP[15].yyyy
+359: SIN TEMP[16].z, TEMP[15].zzzz
+360: SIN TEMP[16].w, TEMP[15].wwww
+361: MUL TEMP[15], TEMP[16], IMM[7].yyyy
+362: FRC TEMP[15], TEMP[15]
+363: LRP TEMP[16].x, TEMP[14].xxxx, TEMP[18].yyyy, TEMP[18].xxxx
+364: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[18].wwww, TEMP[18].zzzz
+365: LRP TEMP[16].x, TEMP[14].yyyy, TEMP[17].xxxx, TEMP[16].xxxx
+366: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[15].yyyy, TEMP[15].xxxx
+367: LRP TEMP[15].x, TEMP[14].xxxx, TEMP[15].wwww, TEMP[15].zzzz
+368: LRP TEMP[15].x, TEMP[14].yyyy, TEMP[15].xxxx, TEMP[17].xxxx
+369: LRP TEMP[14].x, TEMP[14].zzzz, TEMP[15].xxxx, TEMP[16].xxxx
+370: MAD TEMP[14].x, TEMP[14].xxxx, IMM[1].wwww, IMM[7].zzzz
+371: MAD TEMP[10].x, IMM[9].xxxx, TEMP[14].xxxx, TEMP[10].xxxx
+372: MOV TEMP[14].x, IMM[3].wwww
+373: MOV TEMP[14].y, -TEMP[4].xxxx
+374: MUL TEMP[15].x, TEMP[4].xxxx, IMM[0].wwww
+375: MOV TEMP[14].z, TEMP[15].xxxx
+376: ADD TEMP[14].xyz, TEMP[8].xyzz, TEMP[14].xyzz
+377: ADD TEMP[15].x, TEMP[13].xxxx, IMM[2].yyyy
+378: MUL TEMP[15].x, IMM[9].yyyy, TEMP[15].xxxx
+379: MUL TEMP[14].xyz, TEMP[14].xyzz, TEMP[15].xxxx
+380: RCP TEMP[16].x, TEMP[15].xxxx
+381: MUL TEMP[16].xyz, TEMP[14].xyzz, TEMP[16].xxxx
+382: FRC TEMP[16].xyz, TEMP[16].xyzz
+383: MUL TEMP[16].xyz, TEMP[15].xxxx, TEMP[16].xyzz
+384: FLR TEMP[16].xyz, TEMP[16].xyzz
+385: MUL TEMP[16].xyz, TEMP[16].xyzz, IMM[6].yzww
+386: ADD TEMP[17].xyz, TEMP[14].xyzz, IMM[2].yyyy
+387: RCP TEMP[18].x, TEMP[15].xxxx
+388: MUL TEMP[17].xyz, TEMP[17].xyzz, TEMP[18].xxxx
+389: FRC TEMP[17].xyz, TEMP[17].xyzz
+390: MUL TEMP[15].xyz, TEMP[15].xxxx, TEMP[17].xyzz
+391: FLR TEMP[15].xyz, TEMP[15].xyzz
+392: MUL TEMP[15].xyz, TEMP[15].xyzz, IMM[6].yzww
+393: FRC TEMP[14].xyz, TEMP[14].xyzz
+394: MUL TEMP[17].xyz, TEMP[14].xyzz, TEMP[14].xyzz
+395: MUL TEMP[14].xyz, IMM[1].wwww, TEMP[14].xyzz
+396: ADD TEMP[14].xyz, IMM[7].xxxx, -TEMP[14].xyzz
+397: MUL TEMP[14].xyz, TEMP[17].xyzz, TEMP[14].xyzz
+398: ADD TEMP[17].x, TEMP[16].xxxx, TEMP[16].yyyy
+399: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[16].zzzz
+400: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[16].yyyy
+401: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+402: MOV TEMP[17].y, TEMP[18].xxxx
+403: ADD TEMP[18].x, TEMP[16].xxxx, TEMP[15].yyyy
+404: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+405: MOV TEMP[17].z, TEMP[18].xxxx
+406: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[15].yyyy
+407: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+408: MOV TEMP[17].w, TEMP[18].xxxx
+409: MUL TEMP[18], TEMP[17], IMM[5].xxxx
+410: SIN TEMP[19].x, TEMP[18].xxxx
+411: SIN TEMP[19].y, TEMP[18].yyyy
+412: SIN TEMP[19].z, TEMP[18].zzzz
+413: SIN TEMP[19].w, TEMP[18].wwww
+414: MUL TEMP[18], TEMP[19], IMM[7].yyyy
+415: FRC TEMP[18], TEMP[18]
+416: ADD TEMP[15], TEMP[17], TEMP[15].zzzz
+417: ADD TEMP[15], TEMP[15], -TEMP[16].zzzz
+418: MUL TEMP[15], TEMP[15], IMM[5].xxxx
+419: SIN TEMP[16].x, TEMP[15].xxxx
+420: SIN TEMP[16].y, TEMP[15].yyyy
+421: SIN TEMP[16].z, TEMP[15].zzzz
+422: SIN TEMP[16].w, TEMP[15].wwww
+423: MUL TEMP[15], TEMP[16], IMM[7].yyyy
+424: FRC TEMP[15], TEMP[15]
+425: LRP TEMP[16].x, TEMP[14].xxxx, TEMP[18].yyyy, TEMP[18].xxxx
+426: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[18].wwww, TEMP[18].zzzz
+427: LRP TEMP[16].x, TEMP[14].yyyy, TEMP[17].xxxx, TEMP[16].xxxx
+428: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[15].yyyy, TEMP[15].xxxx
+429: LRP TEMP[15].x, TEMP[14].xxxx, TEMP[15].wwww, TEMP[15].zzzz
+430: LRP TEMP[15].x, TEMP[14].yyyy, TEMP[15].xxxx, TEMP[17].xxxx
+431: LRP TEMP[14].x, TEMP[14].zzzz, TEMP[15].xxxx, TEMP[16].xxxx
+432: MAD TEMP[14].x, TEMP[14].xxxx, IMM[1].wwww, IMM[7].zzzz
+433: MAD TEMP[11].x, IMM[9].xxxx, TEMP[14].xxxx, TEMP[11].xxxx
+434: MOV TEMP[14].x, IMM[3].wwww
+435: MOV TEMP[14].y, -TEMP[4].xxxx
+436: MUL TEMP[15].x, TEMP[4].xxxx, IMM[0].wwww
+437: MOV TEMP[14].z, TEMP[15].xxxx
+438: ADD TEMP[14].xyz, TEMP[8].xyzz, TEMP[14].xyzz
+439: ADD TEMP[15].x, TEMP[12].xxxx, IMM[2].yyyy
+440: MUL TEMP[15].x, IMM[9].zzzz, TEMP[15].xxxx
+441: MUL TEMP[14].xyz, TEMP[14].xyzz, TEMP[15].xxxx
+442: RCP TEMP[16].x, TEMP[15].xxxx
+443: MUL TEMP[16].xyz, TEMP[14].xyzz, TEMP[16].xxxx
+444: FRC TEMP[16].xyz, TEMP[16].xyzz
+445: MUL TEMP[16].xyz, TEMP[15].xxxx, TEMP[16].xyzz
+446: FLR TEMP[16].xyz, TEMP[16].xyzz
+447: MUL TEMP[16].xyz, TEMP[16].xyzz, IMM[6].yzww
+448: ADD TEMP[17].xyz, TEMP[14].xyzz, IMM[2].yyyy
+449: RCP TEMP[18].x, TEMP[15].xxxx
+450: MUL TEMP[17].xyz, TEMP[17].xyzz, TEMP[18].xxxx
+451: FRC TEMP[17].xyz, TEMP[17].xyzz
+452: MUL TEMP[15].xyz, TEMP[15].xxxx, TEMP[17].xyzz
+453: FLR TEMP[15].xyz, TEMP[15].xyzz
+454: MUL TEMP[15].xyz, TEMP[15].xyzz, IMM[6].yzww
+455: FRC TEMP[14].xyz, TEMP[14].xyzz
+456: MUL TEMP[17].xyz, TEMP[14].xyzz, TEMP[14].xyzz
+457: MUL TEMP[14].xyz, IMM[1].wwww, TEMP[14].xyzz
+458: ADD TEMP[14].xyz, IMM[7].xxxx, -TEMP[14].xyzz
+459: MUL TEMP[14].xyz, TEMP[17].xyzz, TEMP[14].xyzz
+460: ADD TEMP[17].x, TEMP[16].xxxx, TEMP[16].yyyy
+461: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[16].zzzz
+462: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[16].yyyy
+463: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+464: MOV TEMP[17].y, TEMP[18].xxxx
+465: ADD TEMP[18].x, TEMP[16].xxxx, TEMP[15].yyyy
+466: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+467: MOV TEMP[17].z, TEMP[18].xxxx
+468: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[15].yyyy
+469: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+470: MOV TEMP[17].w, TEMP[18].xxxx
+471: MUL TEMP[18], TEMP[17], IMM[5].xxxx
+472: SIN TEMP[19].x, TEMP[18].xxxx
+473: SIN TEMP[19].y, TEMP[18].yyyy
+474: SIN TEMP[19].z, TEMP[18].zzzz
+475: SIN TEMP[19].w, TEMP[18].wwww
+476: MUL TEMP[18], TEMP[19], IMM[7].yyyy
+477: FRC TEMP[18], TEMP[18]
+478: ADD TEMP[15], TEMP[17], TEMP[15].zzzz
+479: ADD TEMP[15], TEMP[15], -TEMP[16].zzzz
+480: MUL TEMP[15], TEMP[15], IMM[5].xxxx
+481: SIN TEMP[16].x, TEMP[15].xxxx
+482: SIN TEMP[16].y, TEMP[15].yyyy
+483: SIN TEMP[16].z, TEMP[15].zzzz
+484: SIN TEMP[16].w, TEMP[15].wwww
+485: MUL TEMP[15], TEMP[16], IMM[7].yyyy
+486: FRC TEMP[15], TEMP[15]
+487: LRP TEMP[16].x, TEMP[14].xxxx, TEMP[18].yyyy, TEMP[18].xxxx
+488: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[18].wwww, TEMP[18].zzzz
+489: LRP TEMP[16].x, TEMP[14].yyyy, TEMP[17].xxxx, TEMP[16].xxxx
+490: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[15].yyyy, TEMP[15].xxxx
+491: LRP TEMP[15].x, TEMP[14].xxxx, TEMP[15].wwww, TEMP[15].zzzz
+492: LRP TEMP[15].x, TEMP[14].yyyy, TEMP[15].xxxx, TEMP[17].xxxx
+493: LRP TEMP[14].x, TEMP[14].zzzz, TEMP[15].xxxx, TEMP[16].xxxx
+494: MAD TEMP[14].x, TEMP[14].xxxx, IMM[1].wwww, IMM[7].zzzz
+495: MAD TEMP[10].x, IMM[9].wwww, TEMP[14].xxxx, TEMP[10].xxxx
+496: MOV TEMP[14].x, IMM[3].wwww
+497: MOV TEMP[14].y, -TEMP[4].xxxx
+498: MUL TEMP[15].x, TEMP[4].xxxx, IMM[0].wwww
+499: MOV TEMP[14].z, TEMP[15].xxxx
+500: ADD TEMP[14].xyz, TEMP[8].xyzz, TEMP[14].xyzz
+501: ADD TEMP[15].x, TEMP[13].xxxx, IMM[2].yyyy
+502: MUL TEMP[15].x, IMM[10].xxxx, TEMP[15].xxxx
+503: MUL TEMP[14].xyz, TEMP[14].xyzz, TEMP[15].xxxx
+504: RCP TEMP[16].x, TEMP[15].xxxx
+505: MUL TEMP[16].xyz, TEMP[14].xyzz, TEMP[16].xxxx
+506: FRC TEMP[16].xyz, TEMP[16].xyzz
+507: MUL TEMP[16].xyz, TEMP[15].xxxx, TEMP[16].xyzz
+508: FLR TEMP[16].xyz, TEMP[16].xyzz
+509: MUL TEMP[16].xyz, TEMP[16].xyzz, IMM[6].yzww
+510: ADD TEMP[17].xyz, TEMP[14].xyzz, IMM[2].yyyy
+511: RCP TEMP[18].x, TEMP[15].xxxx
+512: MUL TEMP[17].xyz, TEMP[17].xyzz, TEMP[18].xxxx
+513: FRC TEMP[17].xyz, TEMP[17].xyzz
+514: MUL TEMP[15].xyz, TEMP[15].xxxx, TEMP[17].xyzz
+515: FLR TEMP[15].xyz, TEMP[15].xyzz
+516: MUL TEMP[15].xyz, TEMP[15].xyzz, IMM[6].yzww
+517: FRC TEMP[14].xyz, TEMP[14].xyzz
+518: MUL TEMP[17].xyz, TEMP[14].xyzz, TEMP[14].xyzz
+519: MUL TEMP[14].xyz, IMM[1].wwww, TEMP[14].xyzz
+520: ADD TEMP[14].xyz, IMM[7].xxxx, -TEMP[14].xyzz
+521: MUL TEMP[14].xyz, TEMP[17].xyzz, TEMP[14].xyzz
+522: ADD TEMP[17].x, TEMP[16].xxxx, TEMP[16].yyyy
+523: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[16].zzzz
+524: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[16].yyyy
+525: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+526: MOV TEMP[17].y, TEMP[18].xxxx
+527: ADD TEMP[18].x, TEMP[16].xxxx, TEMP[15].yyyy
+528: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+529: MOV TEMP[17].z, TEMP[18].xxxx
+530: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[15].yyyy
+531: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+532: MOV TEMP[17].w, TEMP[18].xxxx
+533: MUL TEMP[18], TEMP[17], IMM[5].xxxx
+534: SIN TEMP[19].x, TEMP[18].xxxx
+535: SIN TEMP[19].y, TEMP[18].yyyy
+536: SIN TEMP[19].z, TEMP[18].zzzz
+537: SIN TEMP[19].w, TEMP[18].wwww
+538: MUL TEMP[18], TEMP[19], IMM[7].yyyy
+539: FRC TEMP[18], TEMP[18]
+540: ADD TEMP[15], TEMP[17], TEMP[15].zzzz
+541: ADD TEMP[15], TEMP[15], -TEMP[16].zzzz
+542: MUL TEMP[15], TEMP[15], IMM[5].xxxx
+543: SIN TEMP[16].x, TEMP[15].xxxx
+544: SIN TEMP[16].y, TEMP[15].yyyy
+545: SIN TEMP[16].z, TEMP[15].zzzz
+546: SIN TEMP[16].w, TEMP[15].wwww
+547: MUL TEMP[15], TEMP[16], IMM[7].yyyy
+548: FRC TEMP[15], TEMP[15]
+549: LRP TEMP[16].x, TEMP[14].xxxx, TEMP[18].yyyy, TEMP[18].xxxx
+550: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[18].wwww, TEMP[18].zzzz
+551: LRP TEMP[16].x, TEMP[14].yyyy, TEMP[17].xxxx, TEMP[16].xxxx
+552: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[15].yyyy, TEMP[15].xxxx
+553: LRP TEMP[15].x, TEMP[14].xxxx, TEMP[15].wwww, TEMP[15].zzzz
+554: LRP TEMP[15].x, TEMP[14].yyyy, TEMP[15].xxxx, TEMP[17].xxxx
+555: LRP TEMP[14].x, TEMP[14].zzzz, TEMP[15].xxxx, TEMP[16].xxxx
+556: MAD TEMP[14].x, TEMP[14].xxxx, IMM[1].wwww, IMM[7].zzzz
+557: MAD TEMP[11].x, IMM[9].wwww, TEMP[14].xxxx, TEMP[11].xxxx
+558: MOV TEMP[14].x, IMM[3].wwww
+559: MOV TEMP[14].y, -TEMP[4].xxxx
+560: MUL TEMP[15].x, TEMP[4].xxxx, IMM[0].wwww
+561: MOV TEMP[14].z, TEMP[15].xxxx
+562: ADD TEMP[14].xyz, TEMP[8].xyzz, TEMP[14].xyzz
+563: ADD TEMP[15].x, TEMP[12].xxxx, IMM[2].yyyy
+564: MUL TEMP[15].x, IMM[10].yyyy, TEMP[15].xxxx
+565: MUL TEMP[14].xyz, TEMP[14].xyzz, TEMP[15].xxxx
+566: RCP TEMP[16].x, TEMP[15].xxxx
+567: MUL TEMP[16].xyz, TEMP[14].xyzz, TEMP[16].xxxx
+568: FRC TEMP[16].xyz, TEMP[16].xyzz
+569: MUL TEMP[16].xyz, TEMP[15].xxxx, TEMP[16].xyzz
+570: FLR TEMP[16].xyz, TEMP[16].xyzz
+571: MUL TEMP[16].xyz, TEMP[16].xyzz, IMM[6].yzww
+572: ADD TEMP[17].xyz, TEMP[14].xyzz, IMM[2].yyyy
+573: RCP TEMP[18].x, TEMP[15].xxxx
+574: MUL TEMP[17].xyz, TEMP[17].xyzz, TEMP[18].xxxx
+575: FRC TEMP[17].xyz, TEMP[17].xyzz
+576: MUL TEMP[15].xyz, TEMP[15].xxxx, TEMP[17].xyzz
+577: FLR TEMP[15].xyz, TEMP[15].xyzz
+578: MUL TEMP[15].xyz, TEMP[15].xyzz, IMM[6].yzww
+579: FRC TEMP[14].xyz, TEMP[14].xyzz
+580: MUL TEMP[17].xyz, TEMP[14].xyzz, TEMP[14].xyzz
+581: MUL TEMP[14].xyz, IMM[1].wwww, TEMP[14].xyzz
+582: ADD TEMP[14].xyz, IMM[7].xxxx, -TEMP[14].xyzz
+583: MUL TEMP[14].xyz, TEMP[17].xyzz, TEMP[14].xyzz
+584: ADD TEMP[17].x, TEMP[16].xxxx, TEMP[16].yyyy
+585: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[16].zzzz
+586: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[16].yyyy
+587: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+588: MOV TEMP[17].y, TEMP[18].xxxx
+589: ADD TEMP[18].x, TEMP[16].xxxx, TEMP[15].yyyy
+590: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+591: MOV TEMP[17].z, TEMP[18].xxxx
+592: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[15].yyyy
+593: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+594: MOV TEMP[17].w, TEMP[18].xxxx
+595: MUL TEMP[18], TEMP[17], IMM[5].xxxx
+596: SIN TEMP[19].x, TEMP[18].xxxx
+597: SIN TEMP[19].y, TEMP[18].yyyy
+598: SIN TEMP[19].z, TEMP[18].zzzz
+599: SIN TEMP[19].w, TEMP[18].wwww
+600: MUL TEMP[18], TEMP[19], IMM[7].yyyy
+601: FRC TEMP[18], TEMP[18]
+602: ADD TEMP[15], TEMP[17], TEMP[15].zzzz
+603: ADD TEMP[15], TEMP[15], -TEMP[16].zzzz
+604: MUL TEMP[15], TEMP[15], IMM[5].xxxx
+605: SIN TEMP[16].x, TEMP[15].xxxx
+606: SIN TEMP[16].y, TEMP[15].yyyy
+607: SIN TEMP[16].z, TEMP[15].zzzz
+608: SIN TEMP[16].w, TEMP[15].wwww
+609: MUL TEMP[15], TEMP[16], IMM[7].yyyy
+610: FRC TEMP[15], TEMP[15]
+611: LRP TEMP[16].x, TEMP[14].xxxx, TEMP[18].yyyy, TEMP[18].xxxx
+612: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[18].wwww, TEMP[18].zzzz
+613: LRP TEMP[16].x, TEMP[14].yyyy, TEMP[17].xxxx, TEMP[16].xxxx
+614: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[15].yyyy, TEMP[15].xxxx
+615: LRP TEMP[15].x, TEMP[14].xxxx, TEMP[15].wwww, TEMP[15].zzzz
+616: LRP TEMP[15].x, TEMP[14].yyyy, TEMP[15].xxxx, TEMP[17].xxxx
+617: LRP TEMP[14].x, TEMP[14].zzzz, TEMP[15].xxxx, TEMP[16].xxxx
+618: MAD TEMP[14].x, TEMP[14].xxxx, IMM[1].wwww, IMM[7].zzzz
+619: MAD TEMP[10].x, IMM[10].zzzz, TEMP[14].xxxx, TEMP[10].xxxx
+620: MOV TEMP[14].x, IMM[3].wwww
+621: MOV TEMP[14].y, -TEMP[4].xxxx
+622: MUL TEMP[15].x, TEMP[4].xxxx, IMM[0].wwww
+623: MOV TEMP[14].z, TEMP[15].xxxx
+624: ADD TEMP[14].xyz, TEMP[8].xyzz, TEMP[14].xyzz
+625: ADD TEMP[15].x, TEMP[13].xxxx, IMM[2].yyyy
+626: MUL TEMP[15].x, IMM[10].wwww, TEMP[15].xxxx
+627: MUL TEMP[14].xyz, TEMP[14].xyzz, TEMP[15].xxxx
+628: RCP TEMP[16].x, TEMP[15].xxxx
+629: MUL TEMP[16].xyz, TEMP[14].xyzz, TEMP[16].xxxx
+630: FRC TEMP[16].xyz, TEMP[16].xyzz
+631: MUL TEMP[16].xyz, TEMP[15].xxxx, TEMP[16].xyzz
+632: FLR TEMP[16].xyz, TEMP[16].xyzz
+633: MUL TEMP[16].xyz, TEMP[16].xyzz, IMM[6].yzww
+634: ADD TEMP[17].xyz, TEMP[14].xyzz, IMM[2].yyyy
+635: RCP TEMP[18].x, TEMP[15].xxxx
+636: MUL TEMP[17].xyz, TEMP[17].xyzz, TEMP[18].xxxx
+637: FRC TEMP[17].xyz, TEMP[17].xyzz
+638: MUL TEMP[15].xyz, TEMP[15].xxxx, TEMP[17].xyzz
+639: FLR TEMP[15].xyz, TEMP[15].xyzz
+640: MUL TEMP[15].xyz, TEMP[15].xyzz, IMM[6].yzww
+641: FRC TEMP[14].xyz, TEMP[14].xyzz
+642: MUL TEMP[17].xyz, TEMP[14].xyzz, TEMP[14].xyzz
+643: MUL TEMP[14].xyz, IMM[1].wwww, TEMP[14].xyzz
+644: ADD TEMP[14].xyz, IMM[7].xxxx, -TEMP[14].xyzz
+645: MUL TEMP[14].xyz, TEMP[17].xyzz, TEMP[14].xyzz
+646: ADD TEMP[17].x, TEMP[16].xxxx, TEMP[16].yyyy
+647: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[16].zzzz
+648: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[16].yyyy
+649: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+650: MOV TEMP[17].y, TEMP[18].xxxx
+651: ADD TEMP[18].x, TEMP[16].xxxx, TEMP[15].yyyy
+652: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+653: MOV TEMP[17].z, TEMP[18].xxxx
+654: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[15].yyyy
+655: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+656: MOV TEMP[17].w, TEMP[18].xxxx
+657: MUL TEMP[18], TEMP[17], IMM[5].xxxx
+658: SIN TEMP[19].x, TEMP[18].xxxx
+659: SIN TEMP[19].y, TEMP[18].yyyy
+660: SIN TEMP[19].z, TEMP[18].zzzz
+661: SIN TEMP[19].w, TEMP[18].wwww
+662: MUL TEMP[18], TEMP[19], IMM[7].yyyy
+663: FRC TEMP[18], TEMP[18]
+664: ADD TEMP[15], TEMP[17], TEMP[15].zzzz
+665: ADD TEMP[15], TEMP[15], -TEMP[16].zzzz
+666: MUL TEMP[15], TEMP[15], IMM[5].xxxx
+667: SIN TEMP[16].x, TEMP[15].xxxx
+668: SIN TEMP[16].y, TEMP[15].yyyy
+669: SIN TEMP[16].z, TEMP[15].zzzz
+670: SIN TEMP[16].w, TEMP[15].wwww
+671: MUL TEMP[15], TEMP[16], IMM[7].yyyy
+672: FRC TEMP[15], TEMP[15]
+673: LRP TEMP[16].x, TEMP[14].xxxx, TEMP[18].yyyy, TEMP[18].xxxx
+674: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[18].wwww, TEMP[18].zzzz
+675: LRP TEMP[16].x, TEMP[14].yyyy, TEMP[17].xxxx, TEMP[16].xxxx
+676: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[15].yyyy, TEMP[15].xxxx
+677: LRP TEMP[15].x, TEMP[14].xxxx, TEMP[15].wwww, TEMP[15].zzzz
+678: LRP TEMP[15].x, TEMP[14].yyyy, TEMP[15].xxxx, TEMP[17].xxxx
+679: LRP TEMP[14].x, TEMP[14].zzzz, TEMP[15].xxxx, TEMP[16].xxxx
+680: MAD TEMP[14].x, TEMP[14].xxxx, IMM[1].wwww, IMM[7].zzzz
+681: MAD TEMP[11].x, IMM[10].zzzz, TEMP[14].xxxx, TEMP[11].xxxx
+682: MOV TEMP[14].x, IMM[3].wwww
+683: MOV TEMP[14].y, -TEMP[4].xxxx
+684: MUL TEMP[15].x, TEMP[4].xxxx, IMM[0].wwww
+685: MOV TEMP[14].z, TEMP[15].xxxx
+686: ADD TEMP[14].xyz, TEMP[8].xyzz, TEMP[14].xyzz
+687: ADD TEMP[15].x, TEMP[12].xxxx, IMM[2].yyyy
+688: MUL TEMP[15].x, IMM[11].xxxx, TEMP[15].xxxx
+689: MUL TEMP[14].xyz, TEMP[14].xyzz, TEMP[15].xxxx
+690: RCP TEMP[16].x, TEMP[15].xxxx
+691: MUL TEMP[16].xyz, TEMP[14].xyzz, TEMP[16].xxxx
+692: FRC TEMP[16].xyz, TEMP[16].xyzz
+693: MUL TEMP[16].xyz, TEMP[15].xxxx, TEMP[16].xyzz
+694: FLR TEMP[16].xyz, TEMP[16].xyzz
+695: MUL TEMP[16].xyz, TEMP[16].xyzz, IMM[6].yzww
+696: ADD TEMP[17].xyz, TEMP[14].xyzz, IMM[2].yyyy
+697: RCP TEMP[18].x, TEMP[15].xxxx
+698: MUL TEMP[17].xyz, TEMP[17].xyzz, TEMP[18].xxxx
+699: FRC TEMP[17].xyz, TEMP[17].xyzz
+700: MUL TEMP[15].xyz, TEMP[15].xxxx, TEMP[17].xyzz
+701: FLR TEMP[15].xyz, TEMP[15].xyzz
+702: MUL TEMP[15].xyz, TEMP[15].xyzz, IMM[6].yzww
+703: FRC TEMP[14].xyz, TEMP[14].xyzz
+704: MUL TEMP[17].xyz, TEMP[14].xyzz, TEMP[14].xyzz
+705: MUL TEMP[14].xyz, IMM[1].wwww, TEMP[14].xyzz
+706: ADD TEMP[14].xyz, IMM[7].xxxx, -TEMP[14].xyzz
+707: MUL TEMP[14].xyz, TEMP[17].xyzz, TEMP[14].xyzz
+708: ADD TEMP[17].x, TEMP[16].xxxx, TEMP[16].yyyy
+709: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[16].zzzz
+710: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[16].yyyy
+711: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+712: MOV TEMP[17].y, TEMP[18].xxxx
+713: ADD TEMP[18].x, TEMP[16].xxxx, TEMP[15].yyyy
+714: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+715: MOV TEMP[17].z, TEMP[18].xxxx
+716: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[15].yyyy
+717: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+718: MOV TEMP[17].w, TEMP[18].xxxx
+719: MUL TEMP[18], TEMP[17], IMM[5].xxxx
+720: SIN TEMP[19].x, TEMP[18].xxxx
+721: SIN TEMP[19].y, TEMP[18].yyyy
+722: SIN TEMP[19].z, TEMP[18].zzzz
+723: SIN TEMP[19].w, TEMP[18].wwww
+724: MUL TEMP[18], TEMP[19], IMM[7].yyyy
+725: FRC TEMP[18], TEMP[18]
+726: ADD TEMP[15], TEMP[17], TEMP[15].zzzz
+727: ADD TEMP[15], TEMP[15], -TEMP[16].zzzz
+728: MUL TEMP[15], TEMP[15], IMM[5].xxxx
+729: SIN TEMP[16].x, TEMP[15].xxxx
+730: SIN TEMP[16].y, TEMP[15].yyyy
+731: SIN TEMP[16].z, TEMP[15].zzzz
+732: SIN TEMP[16].w, TEMP[15].wwww
+733: MUL TEMP[15], TEMP[16], IMM[7].yyyy
+734: FRC TEMP[15], TEMP[15]
+735: LRP TEMP[16].x, TEMP[14].xxxx, TEMP[18].yyyy, TEMP[18].xxxx
+736: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[18].wwww, TEMP[18].zzzz
+737: LRP TEMP[16].x, TEMP[14].yyyy, TEMP[17].xxxx, TEMP[16].xxxx
+738: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[15].yyyy, TEMP[15].xxxx
+739: LRP TEMP[15].x, TEMP[14].xxxx, TEMP[15].wwww, TEMP[15].zzzz
+740: LRP TEMP[15].x, TEMP[14].yyyy, TEMP[15].xxxx, TEMP[17].xxxx
+741: LRP TEMP[14].x, TEMP[14].zzzz, TEMP[15].xxxx, TEMP[16].xxxx
+742: MAD TEMP[14].x, TEMP[14].xxxx, IMM[1].wwww, IMM[7].zzzz
+743: MAD TEMP[10].x, IMM[11].yyyy, TEMP[14].xxxx, TEMP[10].xxxx
+744: MOV TEMP[14].x, IMM[3].wwww
+745: MOV TEMP[14].y, -TEMP[4].xxxx
+746: MUL TEMP[15].x, TEMP[4].xxxx, IMM[0].wwww
+747: MOV TEMP[14].z, TEMP[15].xxxx
+748: ADD TEMP[14].xyz, TEMP[8].xyzz, TEMP[14].xyzz
+749: ADD TEMP[15].x, TEMP[13].xxxx, IMM[2].yyyy
+750: MUL TEMP[15].x, IMM[11].zzzz, TEMP[15].xxxx
+751: MUL TEMP[14].xyz, TEMP[14].xyzz, TEMP[15].xxxx
+752: RCP TEMP[16].x, TEMP[15].xxxx
+753: MUL TEMP[16].xyz, TEMP[14].xyzz, TEMP[16].xxxx
+754: FRC TEMP[16].xyz, TEMP[16].xyzz
+755: MUL TEMP[16].xyz, TEMP[15].xxxx, TEMP[16].xyzz
+756: FLR TEMP[16].xyz, TEMP[16].xyzz
+757: MUL TEMP[16].xyz, TEMP[16].xyzz, IMM[6].yzww
+758: ADD TEMP[17].xyz, TEMP[14].xyzz, IMM[2].yyyy
+759: RCP TEMP[18].x, TEMP[15].xxxx
+760: MUL TEMP[17].xyz, TEMP[17].xyzz, TEMP[18].xxxx
+761: FRC TEMP[17].xyz, TEMP[17].xyzz
+762: MUL TEMP[15].xyz, TEMP[15].xxxx, TEMP[17].xyzz
+763: FLR TEMP[15].xyz, TEMP[15].xyzz
+764: MUL TEMP[15].xyz, TEMP[15].xyzz, IMM[6].yzww
+765: FRC TEMP[14].xyz, TEMP[14].xyzz
+766: MUL TEMP[17].xyz, TEMP[14].xyzz, TEMP[14].xyzz
+767: MUL TEMP[14].xyz, IMM[1].wwww, TEMP[14].xyzz
+768: ADD TEMP[14].xyz, IMM[7].xxxx, -TEMP[14].xyzz
+769: MUL TEMP[14].xyz, TEMP[17].xyzz, TEMP[14].xyzz
+770: ADD TEMP[17].x, TEMP[16].xxxx, TEMP[16].yyyy
+771: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[16].zzzz
+772: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[16].yyyy
+773: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+774: MOV TEMP[17].y, TEMP[18].xxxx
+775: ADD TEMP[18].x, TEMP[16].xxxx, TEMP[15].yyyy
+776: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+777: MOV TEMP[17].z, TEMP[18].xxxx
+778: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[15].yyyy
+779: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+780: MOV TEMP[17].w, TEMP[18].xxxx
+781: MUL TEMP[18], TEMP[17], IMM[5].xxxx
+782: SIN TEMP[19].x, TEMP[18].xxxx
+783: SIN TEMP[19].y, TEMP[18].yyyy
+784: SIN TEMP[19].z, TEMP[18].zzzz
+785: SIN TEMP[19].w, TEMP[18].wwww
+786: MUL TEMP[18], TEMP[19], IMM[7].yyyy
+787: FRC TEMP[18], TEMP[18]
+788: ADD TEMP[15], TEMP[17], TEMP[15].zzzz
+789: ADD TEMP[15], TEMP[15], -TEMP[16].zzzz
+790: MUL TEMP[15], TEMP[15], IMM[5].xxxx
+791: SIN TEMP[16].x, TEMP[15].xxxx
+792: SIN TEMP[16].y, TEMP[15].yyyy
+793: SIN TEMP[16].z, TEMP[15].zzzz
+794: SIN TEMP[16].w, TEMP[15].wwww
+795: MUL TEMP[15], TEMP[16], IMM[7].yyyy
+796: FRC TEMP[15], TEMP[15]
+797: LRP TEMP[16].x, TEMP[14].xxxx, TEMP[18].yyyy, TEMP[18].xxxx
+798: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[18].wwww, TEMP[18].zzzz
+799: LRP TEMP[16].x, TEMP[14].yyyy, TEMP[17].xxxx, TEMP[16].xxxx
+800: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[15].yyyy, TEMP[15].xxxx
+801: LRP TEMP[15].x, TEMP[14].xxxx, TEMP[15].wwww, TEMP[15].zzzz
+802: LRP TEMP[15].x, TEMP[14].yyyy, TEMP[15].xxxx, TEMP[17].xxxx
+803: LRP TEMP[14].x, TEMP[14].zzzz, TEMP[15].xxxx, TEMP[16].xxxx
+804: MAD TEMP[14].x, TEMP[14].xxxx, IMM[1].wwww, IMM[7].zzzz
+805: MAD TEMP[11].x, IMM[11].yyyy, TEMP[14].xxxx, TEMP[11].xxxx
+806: MOV TEMP[14].x, IMM[3].wwww
+807: MOV TEMP[14].y, -TEMP[4].xxxx
+808: MUL TEMP[15].x, TEMP[4].xxxx, IMM[0].wwww
+809: MOV TEMP[14].z, TEMP[15].xxxx
+810: ADD TEMP[14].xyz, TEMP[8].xyzz, TEMP[14].xyzz
+811: ADD TEMP[15].x, TEMP[12].xxxx, IMM[2].yyyy
+812: MUL TEMP[15].x, IMM[11].wwww, TEMP[15].xxxx
+813: MUL TEMP[14].xyz, TEMP[14].xyzz, TEMP[15].xxxx
+814: RCP TEMP[16].x, TEMP[15].xxxx
+815: MUL TEMP[16].xyz, TEMP[14].xyzz, TEMP[16].xxxx
+816: FRC TEMP[16].xyz, TEMP[16].xyzz
+817: MUL TEMP[16].xyz, TEMP[15].xxxx, TEMP[16].xyzz
+818: FLR TEMP[16].xyz, TEMP[16].xyzz
+819: MUL TEMP[16].xyz, TEMP[16].xyzz, IMM[6].yzww
+820: ADD TEMP[17].xyz, TEMP[14].xyzz, IMM[2].yyyy
+821: RCP TEMP[18].x, TEMP[15].xxxx
+822: MUL TEMP[17].xyz, TEMP[17].xyzz, TEMP[18].xxxx
+823: FRC TEMP[17].xyz, TEMP[17].xyzz
+824: MUL TEMP[15].xyz, TEMP[15].xxxx, TEMP[17].xyzz
+825: FLR TEMP[15].xyz, TEMP[15].xyzz
+826: MUL TEMP[15].xyz, TEMP[15].xyzz, IMM[6].yzww
+827: FRC TEMP[14].xyz, TEMP[14].xyzz
+828: MUL TEMP[17].xyz, TEMP[14].xyzz, TEMP[14].xyzz
+829: MUL TEMP[14].xyz, IMM[1].wwww, TEMP[14].xyzz
+830: ADD TEMP[14].xyz, IMM[7].xxxx, -TEMP[14].xyzz
+831: MUL TEMP[14].xyz, TEMP[17].xyzz, TEMP[14].xyzz
+832: ADD TEMP[17].x, TEMP[16].xxxx, TEMP[16].yyyy
+833: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[16].zzzz
+834: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[16].yyyy
+835: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+836: MOV TEMP[17].y, TEMP[18].xxxx
+837: ADD TEMP[18].x, TEMP[16].xxxx, TEMP[15].yyyy
+838: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+839: MOV TEMP[17].z, TEMP[18].xxxx
+840: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[15].yyyy
+841: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+842: MOV TEMP[17].w, TEMP[18].xxxx
+843: MUL TEMP[18], TEMP[17], IMM[5].xxxx
+844: SIN TEMP[19].x, TEMP[18].xxxx
+845: SIN TEMP[19].y, TEMP[18].yyyy
+846: SIN TEMP[19].z, TEMP[18].zzzz
+847: SIN TEMP[19].w, TEMP[18].wwww
+848: MUL TEMP[18], TEMP[19], IMM[7].yyyy
+849: FRC TEMP[18], TEMP[18]
+850: ADD TEMP[15], TEMP[17], TEMP[15].zzzz
+851: ADD TEMP[15], TEMP[15], -TEMP[16].zzzz
+852: MUL TEMP[15], TEMP[15], IMM[5].xxxx
+853: SIN TEMP[16].x, TEMP[15].xxxx
+854: SIN TEMP[16].y, TEMP[15].yyyy
+855: SIN TEMP[16].z, TEMP[15].zzzz
+856: SIN TEMP[16].w, TEMP[15].wwww
+857: MUL TEMP[15], TEMP[16], IMM[7].yyyy
+858: FRC TEMP[15], TEMP[15]
+859: LRP TEMP[16].x, TEMP[14].xxxx, TEMP[18].yyyy, TEMP[18].xxxx
+860: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[18].wwww, TEMP[18].zzzz
+861: LRP TEMP[16].x, TEMP[14].yyyy, TEMP[17].xxxx, TEMP[16].xxxx
+862: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[15].yyyy, TEMP[15].xxxx
+863: LRP TEMP[15].x, TEMP[14].xxxx, TEMP[15].wwww, TEMP[15].zzzz
+864: LRP TEMP[15].x, TEMP[14].yyyy, TEMP[15].xxxx, TEMP[17].xxxx
+865: LRP TEMP[14].x, TEMP[14].zzzz, TEMP[15].xxxx, TEMP[16].xxxx
+866: MAD TEMP[14].x, TEMP[14].xxxx, IMM[1].wwww, IMM[7].zzzz
+867: MAD TEMP[10].x, IMM[12].xxxx, TEMP[14].xxxx, TEMP[10].xxxx
+868: MOV TEMP[14].x, IMM[3].wwww
+869: MOV TEMP[14].y, -TEMP[4].xxxx
+870: MUL TEMP[15].x, TEMP[4].xxxx, IMM[0].wwww
+871: MOV TEMP[14].z, TEMP[15].xxxx
+872: ADD TEMP[14].xyz, TEMP[8].xyzz, TEMP[14].xyzz
+873: ADD TEMP[15].x, TEMP[13].xxxx, IMM[2].yyyy
+874: MUL TEMP[15].x, IMM[12].yyyy, TEMP[15].xxxx
+875: MUL TEMP[14].xyz, TEMP[14].xyzz, TEMP[15].xxxx
+876: RCP TEMP[16].x, TEMP[15].xxxx
+877: MUL TEMP[16].xyz, TEMP[14].xyzz, TEMP[16].xxxx
+878: FRC TEMP[16].xyz, TEMP[16].xyzz
+879: MUL TEMP[16].xyz, TEMP[15].xxxx, TEMP[16].xyzz
+880: FLR TEMP[16].xyz, TEMP[16].xyzz
+881: MUL TEMP[16].xyz, TEMP[16].xyzz, IMM[6].yzww
+882: ADD TEMP[17].xyz, TEMP[14].xyzz, IMM[2].yyyy
+883: RCP TEMP[18].x, TEMP[15].xxxx
+884: MUL TEMP[17].xyz, TEMP[17].xyzz, TEMP[18].xxxx
+885: FRC TEMP[17].xyz, TEMP[17].xyzz
+886: MUL TEMP[15].xyz, TEMP[15].xxxx, TEMP[17].xyzz
+887: FLR TEMP[15].xyz, TEMP[15].xyzz
+888: MUL TEMP[15].xyz, TEMP[15].xyzz, IMM[6].yzww
+889: FRC TEMP[14].xyz, TEMP[14].xyzz
+890: MUL TEMP[17].xyz, TEMP[14].xyzz, TEMP[14].xyzz
+891: MUL TEMP[14].xyz, IMM[1].wwww, TEMP[14].xyzz
+892: ADD TEMP[14].xyz, IMM[7].xxxx, -TEMP[14].xyzz
+893: MUL TEMP[14].xyz, TEMP[17].xyzz, TEMP[14].xyzz
+894: ADD TEMP[17].x, TEMP[16].xxxx, TEMP[16].yyyy
+895: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[16].zzzz
+896: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[16].yyyy
+897: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+898: MOV TEMP[17].y, TEMP[18].xxxx
+899: ADD TEMP[18].x, TEMP[16].xxxx, TEMP[15].yyyy
+900: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+901: MOV TEMP[17].z, TEMP[18].xxxx
+902: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[15].yyyy
+903: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+904: MOV TEMP[17].w, TEMP[18].xxxx
+905: MUL TEMP[18], TEMP[17], IMM[5].xxxx
+906: SIN TEMP[19].x, TEMP[18].xxxx
+907: SIN TEMP[19].y, TEMP[18].yyyy
+908: SIN TEMP[19].z, TEMP[18].zzzz
+909: SIN TEMP[19].w, TEMP[18].wwww
+910: MUL TEMP[18], TEMP[19], IMM[7].yyyy
+911: FRC TEMP[18], TEMP[18]
+912: ADD TEMP[15], TEMP[17], TEMP[15].zzzz
+913: ADD TEMP[15], TEMP[15], -TEMP[16].zzzz
+914: MUL TEMP[15], TEMP[15], IMM[5].xxxx
+915: SIN TEMP[16].x, TEMP[15].xxxx
+916: SIN TEMP[16].y, TEMP[15].yyyy
+917: SIN TEMP[16].z, TEMP[15].zzzz
+918: SIN TEMP[16].w, TEMP[15].wwww
+919: MUL TEMP[15], TEMP[16], IMM[7].yyyy
+920: FRC TEMP[15], TEMP[15]
+921: LRP TEMP[16].x, TEMP[14].xxxx, TEMP[18].yyyy, TEMP[18].xxxx
+922: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[18].wwww, TEMP[18].zzzz
+923: LRP TEMP[16].x, TEMP[14].yyyy, TEMP[17].xxxx, TEMP[16].xxxx
+924: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[15].yyyy, TEMP[15].xxxx
+925: LRP TEMP[15].x, TEMP[14].xxxx, TEMP[15].wwww, TEMP[15].zzzz
+926: LRP TEMP[15].x, TEMP[14].yyyy, TEMP[15].xxxx, TEMP[17].xxxx
+927: LRP TEMP[14].x, TEMP[14].zzzz, TEMP[15].xxxx, TEMP[16].xxxx
+928: MAD TEMP[14].x, TEMP[14].xxxx, IMM[1].wwww, IMM[7].zzzz
+929: MAD TEMP[11].x, IMM[12].xxxx, TEMP[14].xxxx, TEMP[11].xxxx
+930: MOV TEMP[14].x, IMM[3].wwww
+931: MOV TEMP[14].y, -TEMP[4].xxxx
+932: MUL TEMP[15].x, TEMP[4].xxxx, IMM[0].wwww
+933: MOV TEMP[14].z, TEMP[15].xxxx
+934: ADD TEMP[14].xyz, TEMP[8].xyzz, TEMP[14].xyzz
+935: ADD TEMP[15].x, TEMP[12].xxxx, IMM[2].yyyy
+936: MUL TEMP[15].x, IMM[12].zzzz, TEMP[15].xxxx
+937: MUL TEMP[14].xyz, TEMP[14].xyzz, TEMP[15].xxxx
+938: RCP TEMP[16].x, TEMP[15].xxxx
+939: MUL TEMP[16].xyz, TEMP[14].xyzz, TEMP[16].xxxx
+940: FRC TEMP[16].xyz, TEMP[16].xyzz
+941: MUL TEMP[16].xyz, TEMP[15].xxxx, TEMP[16].xyzz
+942: FLR TEMP[16].xyz, TEMP[16].xyzz
+943: MUL TEMP[16].xyz, TEMP[16].xyzz, IMM[6].yzww
+944: ADD TEMP[17].xyz, TEMP[14].xyzz, IMM[2].yyyy
+945: RCP TEMP[18].x, TEMP[15].xxxx
+946: MUL TEMP[17].xyz, TEMP[17].xyzz, TEMP[18].xxxx
+947: FRC TEMP[17].xyz, TEMP[17].xyzz
+948: MUL TEMP[15].xyz, TEMP[15].xxxx, TEMP[17].xyzz
+949: FLR TEMP[15].xyz, TEMP[15].xyzz
+950: MUL TEMP[15].xyz, TEMP[15].xyzz, IMM[6].yzww
+951: FRC TEMP[14].xyz, TEMP[14].xyzz
+952: MUL TEMP[17].xyz, TEMP[14].xyzz, TEMP[14].xyzz
+953: MUL TEMP[14].xyz, IMM[1].wwww, TEMP[14].xyzz
+954: ADD TEMP[14].xyz, IMM[7].xxxx, -TEMP[14].xyzz
+955: MUL TEMP[14].xyz, TEMP[17].xyzz, TEMP[14].xyzz
+956: ADD TEMP[17].x, TEMP[16].xxxx, TEMP[16].yyyy
+957: ADD TEMP[17].x, TEMP[17].xxxx, TEMP[16].zzzz
+958: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[16].yyyy
+959: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+960: MOV TEMP[17].y, TEMP[18].xxxx
+961: ADD TEMP[18].x, TEMP[16].xxxx, TEMP[15].yyyy
+962: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+963: MOV TEMP[17].z, TEMP[18].xxxx
+964: ADD TEMP[18].x, TEMP[15].xxxx, TEMP[15].yyyy
+965: ADD TEMP[18].x, TEMP[18].xxxx, TEMP[16].zzzz
+966: MOV TEMP[17].w, TEMP[18].xxxx
+967: MUL TEMP[18], TEMP[17], IMM[5].xxxx
+968: SIN TEMP[19].x, TEMP[18].xxxx
+969: SIN TEMP[19].y, TEMP[18].yyyy
+970: SIN TEMP[19].z, TEMP[18].zzzz
+971: SIN TEMP[19].w, TEMP[18].wwww
+972: MUL TEMP[18], TEMP[19], IMM[7].yyyy
+973: FRC TEMP[18], TEMP[18]
+974: ADD TEMP[15], TEMP[17], TEMP[15].zzzz
+975: ADD TEMP[15], TEMP[15], -TEMP[16].zzzz
+976: MUL TEMP[15], TEMP[15], IMM[5].xxxx
+977: SIN TEMP[16].x, TEMP[15].xxxx
+978: SIN TEMP[16].y, TEMP[15].yyyy
+979: SIN TEMP[16].z, TEMP[15].zzzz
+980: SIN TEMP[16].w, TEMP[15].wwww
+981: MUL TEMP[15], TEMP[16], IMM[7].yyyy
+982: FRC TEMP[15], TEMP[15]
+983: LRP TEMP[16].x, TEMP[14].xxxx, TEMP[18].yyyy, TEMP[18].xxxx
+984: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[18].wwww, TEMP[18].zzzz
+985: LRP TEMP[16].x, TEMP[14].yyyy, TEMP[17].xxxx, TEMP[16].xxxx
+986: LRP TEMP[17].x, TEMP[14].xxxx, TEMP[15].yyyy, TEMP[15].xxxx
+987: LRP TEMP[15].x, TEMP[14].xxxx, TEMP[15].wwww, TEMP[15].zzzz
+988: LRP TEMP[15].x, TEMP[14].yyyy, TEMP[15].xxxx, TEMP[17].xxxx
+989: LRP TEMP[14].x, TEMP[14].zzzz, TEMP[15].xxxx, TEMP[16].xxxx
+990: MAD TEMP[14].x, TEMP[14].xxxx, IMM[1].wwww, IMM[7].zzzz
+991: MAD TEMP[10].x, IMM[12].wwww, TEMP[14].xxxx, TEMP[10].xxxx
+992: MOV TEMP[14].x, IMM[3].wwww
+993: MOV TEMP[14].y, -TEMP[4].xxxx
+994: MUL TEMP[15].x, TEMP[4].xxxx, IMM[0].wwww
+995: MOV TEMP[14].z, TEMP[15].xxxx
+996: ADD TEMP[8].xyz, TEMP[8].xyzz, TEMP[14].xyzz
+997: ADD TEMP[13].x, TEMP[13].xxxx, IMM[2].yyyy
+998: MUL TEMP[13].x, IMM[13].xxxx, TEMP[13].xxxx
+999: MUL TEMP[8].xyz, TEMP[8].xyzz, TEMP[13].xxxx
+1000: RCP TEMP[14].x, TEMP[13].xxxx
+1001: MUL TEMP[14].xyz, TEMP[8].xyzz, TEMP[14].xxxx
+1002: FRC TEMP[14].xyz, TEMP[14].xyzz
+1003: MUL TEMP[14].xyz, TEMP[13].xxxx, TEMP[14].xyzz
+1004: FLR TEMP[14].xyz, TEMP[14].xyzz
+1005: MUL TEMP[14].xyz, TEMP[14].xyzz, IMM[6].yzww
+1006: ADD TEMP[15].xyz, TEMP[8].xyzz, IMM[2].yyyy
+1007: RCP TEMP[16].x, TEMP[13].xxxx
+1008: MUL TEMP[15].xyz, TEMP[15].xyzz, TEMP[16].xxxx
+1009: FRC TEMP[15].xyz, TEMP[15].xyzz
+1010: MUL TEMP[13].xyz, TEMP[13].xxxx, TEMP[15].xyzz
+1011: FLR TEMP[13].xyz, TEMP[13].xyzz
+1012: MUL TEMP[13].xyz, TEMP[13].xyzz, IMM[6].yzww
+1013: FRC TEMP[8].xyz, TEMP[8].xyzz
+1014: MUL TEMP[15].xyz, TEMP[8].xyzz, TEMP[8].xyzz
+1015: MUL TEMP[8].xyz, IMM[1].wwww, TEMP[8].xyzz
+1016: ADD TEMP[8].xyz, IMM[7].xxxx, -TEMP[8].xyzz
+1017: MUL TEMP[8].xyz, TEMP[15].xyzz, TEMP[8].xyzz
+1018: ADD TEMP[15].x, TEMP[14].xxxx, TEMP[14].yyyy
+1019: ADD TEMP[15].x, TEMP[15].xxxx, TEMP[14].zzzz
+1020: ADD TEMP[16].x, TEMP[13].xxxx, TEMP[14].yyyy
+1021: ADD TEMP[16].x, TEMP[16].xxxx, TEMP[14].zzzz
+1022: MOV TEMP[15].y, TEMP[16].xxxx
+1023: ADD TEMP[16].x, TEMP[14].xxxx, TEMP[13].yyyy
+1024: ADD TEMP[16].x, TEMP[16].xxxx, TEMP[14].zzzz
+1025: MOV TEMP[15].z, TEMP[16].xxxx
+1026: ADD TEMP[16].x, TEMP[13].xxxx, TEMP[13].yyyy
+1027: ADD TEMP[16].x, TEMP[16].xxxx, TEMP[14].zzzz
+1028: MOV TEMP[15].w, TEMP[16].xxxx
+1029: MUL TEMP[16], TEMP[15], IMM[5].xxxx
+1030: SIN TEMP[17].x, TEMP[16].xxxx
+1031: SIN TEMP[17].y, TEMP[16].yyyy
+1032: SIN TEMP[17].z, TEMP[16].zzzz
+1033: SIN TEMP[17].w, TEMP[16].wwww
+1034: MUL TEMP[16], TEMP[17], IMM[7].yyyy
+1035: FRC TEMP[16], TEMP[16]
+1036: ADD TEMP[13], TEMP[15], TEMP[13].zzzz
+1037: ADD TEMP[13], TEMP[13], -TEMP[14].zzzz
+1038: MUL TEMP[13], TEMP[13], IMM[5].xxxx
+1039: SIN TEMP[14].x, TEMP[13].xxxx
+1040: SIN TEMP[14].y, TEMP[13].yyyy
+1041: SIN TEMP[14].z, TEMP[13].zzzz
+1042: SIN TEMP[14].w, TEMP[13].wwww
+1043: MUL TEMP[13], TEMP[14], IMM[7].yyyy
+1044: FRC TEMP[13], TEMP[13]
+1045: LRP TEMP[14].x, TEMP[8].xxxx, TEMP[16].yyyy, TEMP[16].xxxx
+1046: LRP TEMP[15].x, TEMP[8].xxxx, TEMP[16].wwww, TEMP[16].zzzz
+1047: LRP TEMP[14].x, TEMP[8].yyyy, TEMP[15].xxxx, TEMP[14].xxxx
+1048: LRP TEMP[15].x, TEMP[8].xxxx, TEMP[13].yyyy, TEMP[13].xxxx
+1049: LRP TEMP[13].x, TEMP[8].xxxx, TEMP[13].wwww, TEMP[13].zzzz
+1050: LRP TEMP[13].x, TEMP[8].yyyy, TEMP[13].xxxx, TEMP[15].xxxx
+1051: LRP TEMP[8].x, TEMP[8].zzzz, TEMP[13].xxxx, TEMP[14].xxxx
+1052: MAD TEMP[8].x, TEMP[8].xxxx, IMM[1].wwww, IMM[7].zzzz
+1053: MAD TEMP[11].x, IMM[12].wwww, TEMP[8].xxxx, TEMP[11].xxxx
+1054: ADD TEMP[8].x, IMM[13].yyyy, -TEMP[9].xxxx
+1055: MAX TEMP[8].x, TEMP[8].xxxx, IMM[3].wwww
+1056: MUL TEMP[8].x, TEMP[10].xxxx, TEMP[8].xxxx
+1057: POW TEMP[8].x, TEMP[8].xxxx, IMM[1].wwww
+1058: MUL TEMP[8].x, TEMP[8].xxxx, IMM[13].zzzz
+1059: ADD TEMP[9].x, IMM[13].yyyy, -TEMP[9].xxxx
+1060: MAX TEMP[9].x, TEMP[9].xxxx, IMM[3].wwww
+1061: MUL TEMP[9].x, TEMP[11].xxxx, TEMP[9].xxxx
+1062: POW TEMP[9].x, TEMP[9].xxxx, IMM[1].wwww
+1063: MAD TEMP[9].x, TEMP[9].xxxx, IMM[13].zzzz, TEMP[8].xxxx
+1064: ADD TEMP[10].x, IMM[13].wwww, -TEMP[12].xxxx
+1065: MUL TEMP[8].x, TEMP[9].xxxx, TEMP[10].xxxx
+1066: MOV TEMP[9].xyz, IMM[3].wwww
+1067: MAD TEMP[6].xy, IMM[1].wwww, TEMP[6].xyyy, IMM[7].zzzz
+1068: MOV TEMP[10].y, TEMP[6].yyyy
+1069: MUL TEMP[10].x, TEMP[6].xxxx, TEMP[5].xxxx
+1070: ADD TEMP[5].x, IMM[1].wwww, -TEMP[1].xxxx
+1071: MUL TEMP[5].xy, TEMP[10].xyyy, TEMP[5].xxxx
+1072: DP2 TEMP[6].x, TEMP[5].xyyy, TEMP[5].xyyy
+1073: ADD TEMP[10].x, IMM[2].yyyy, -TEMP[6].xxxx
+1074: ABS TEMP[10].x, TEMP[10].xxxx
+1075: SQRT TEMP[10].x, TEMP[10].xxxx
+1076: ADD TEMP[10].x, IMM[2].yyyy, -TEMP[10].xxxx
+1077: RCP TEMP[6].x, TEMP[6].xxxx
+1078: MUL TEMP[6].x, TEMP[10].xxxx, TEMP[6].xxxx
+1079: MAD TEMP[6].x, TEMP[1].xxxx, IMM[2].xxxx, TEMP[6].xxxx
+1080: SLT TEMP[2].x, TEMP[7].xxxx, TEMP[2].xxxx
+1081: IF TEMP[2].xxxx :2
+1082: MUL TEMP[2].x, TEMP[7].xxxx, TEMP[3].xxxx
+1083: POW TEMP[2].x, TEMP[2].xxxx, IMM[14].xxxx
+1084: MUL TEMP[8].x, TEMP[8].xxxx, TEMP[2].xxxx
+1085: MUL TEMP[2].x, TEMP[5].xxxx, TEMP[6].xxxx
+1086: MUL TEMP[3].x, TEMP[5].yyyy, TEMP[6].xxxx
+1087: MOV TEMP[2].y, TEMP[3].xxxx
+1088: MOV TEMP[3].y, IMM[3].wwww
+1089: MOV TEMP[3].x, TEMP[4].xxxx
+1090: ADD TEMP[2].xy, TEMP[2].xyyy, TEMP[3].xyyy
+1091: MOV TEMP[3].y, IMM[3].wwww
+1092: TEX TEMP[5].y, TEMP[2].xyyy, SAMP[0], 2D
+1093: MUL TEMP[5].x, TEMP[5].yyyy, TEMP[1].xxxx
+1094: MAD TEMP[3].x, TEMP[5].xxxx, IMM[14].yyyy, TEMP[4].xxxx
+1095: ADD TEMP[2].xy, TEMP[2].xyyy, TEMP[3].xyyy
+1096: TEX TEMP[2].xyz, TEMP[2].xyyy, SAMP[0], 2D
+1097: MOV TEMP[9].xyz, TEMP[2].xyzx
+1098: ENDIF
+1099: ADD TEMP[2].x, IMM[2].yyyy, -TEMP[1].xxxx
+1100: MUL TEMP[2].x, TEMP[7].xxxx, TEMP[2].xxxx
+1101: ADD_SAT TEMP[2].x, IMM[2].yyyy, -TEMP[2].xxxx
+1102: MAD TEMP[1].x, TEMP[1].xxxx, IMM[14].zzzz, IMM[14].wwww
+1103: MUL TEMP[1].x, TEMP[6].xxxx, TEMP[1].xxxx
+1104: MAD TEMP[1].xyz, TEMP[1].xxxx, IMM[16].xyzz, TEMP[9].xyzz
+1105: MAD TEMP[1].xyz, TEMP[8].xxxx, IMM[16].xyzz, TEMP[1].xyzz
+1106: MAD TEMP[1].xyz, TEMP[2].xxxx, IMM[15].xyzz, TEMP[1].xyzz
+1107: MOV TEMP[1].w, IMM[2].yyyy
+1108: MOV OUT[0], TEMP[1]
+1109: END
+
diff --git a/src/replay/.gitignore b/src/replay/.gitignore
new file mode 100644
index 0000000..f778f91
--- /dev/null
+++ b/src/replay/.gitignore
@@ -0,0 +1,13 @@
+cube
+cube_companion
+cube_etna
+ps_sandbox_etna
+reset
+etna_test
+cube_etna2
+viv_info
+cube_etna2_gc2000
+cube_etna_gc2000
+cube_companion_gc2000
+cube_gc2000
+empty_screen_gc2000 \ No newline at end of file
diff --git a/src/replay/Makefile b/src/replay/Makefile
new file mode 100644
index 0000000..d3c5f4c
--- /dev/null
+++ b/src/replay/Makefile
@@ -0,0 +1,64 @@
+TOP=..
+
+include $(TOP)/Makefile.inc
+
+COMMON_FLAGS += -I$(TOP)/resources -I$(TOP)/driver
+LDFLAGS_ETNA = $(LDFLAGS) -L$(TOP)/etnaviv -letnaviv
+
+TARGETS =
+TARGETS_GC800 = cube cube_companion cube_etna ps_sandbox_etna etna_test cube_etna2
+TARGETS_GC2000 = cube_etna2_gc2000 empty_screen_gc2000 cube_gc2000 cube_companion_gc2000 cube_etna_gc2000
+COMPANION_OBJS = ../resources/companion_array.o ../resources/companion_mesh.o ../resources/companion_texture.o
+ETNA_OBJS = ../lib/etna_bswap.o
+
+all: $(TARGETS)
+
+clean:
+ rm -f *.o ../lib/*.o ../driver/*.o
+ rm -f $(TARGETS) $(TARGETS_GC800) $(TARGETS_GC2000)
+
+# These specifically replay command streams for gc800, don't build them by default
+gc800: $(TARGETS_GC800)
+
+# These specifically replay command streams for gc2000, don't build them by default
+gc2000: $(TARGETS_GC2000)
+
+empty_screen_gc2000: empty_screen_gc2000.o ../lib/write_bmp.o viv_raw.o
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+cube_gc2000: cube_gc2000.o ../lib/write_bmp.o viv_raw.o
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+cube: cube.o ../lib/write_bmp.o viv_raw.o
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+cube_companion: cube_companion.o viv_raw.o ../lib/write_bmp.o $(COMPANION_OBJS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+cube_companion_gc2000: cube_companion_gc2000.o ../lib/write_bmp.o viv_raw.o $(COMPANION_OBJS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+cube_etna: cube_etna.o ../lib/write_bmp.o ../lib/esTransform.o viv_raw.o
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+cube_etna_gc2000: cube_etna_gc2000.o ../lib/write_bmp.o ../lib/esTransform.o viv_raw.o
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+cube_etna2: cube_etna2.o ../lib/write_bmp.o ../lib/esTransform.o $(ETNA_OBJS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS_ETNA)
+
+cube_etna2_gc2000: cube_etna2_gc2000.o ../lib/write_bmp.o ../lib/esTransform.o $(ETNA_OBJS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS_ETNA)
+
+ps_sandbox_etna: ps_sandbox_etna.o ../lib/write_bmp.o ../lib/esTransform.o viv_raw.o
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+etna_test: etna_test.o ../lib/write_bmp.o ../lib/esTransform.o $(ETNA_OBJS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS_ETNA)
+
+reset: reset.o viv_raw.o
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+viv_info: viv_info.o viv_raw.o
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
diff --git a/src/replay/companion_cmd.h b/src/replay/companion_cmd.h
new file mode 100644
index 0000000..5be63ad
--- /dev/null
+++ b/src/replay/companion_cmd.h
@@ -0,0 +1,853 @@
+uint32_t cmdbuf1[] = { /* seq 85 */
+ 0x18000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x18000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x18000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x18000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x08010e05, /* LOAD_STATE (1) Base: 0x03814 Size: 1 Fixp: 0 */
+ 0x00000001, /* GLOBAL.VERTEX_ELEMENT_CONFIG := 0x1 */
+ 0x08010380, /* LOAD_STATE (1) Base: 0x00E00 Size: 1 Fixp: 0 */
+ 0x00000001, /* RA.CONTROL := 0x1 */
+ 0x0801028b, /* LOAD_STATE (1) Base: 0x00A2C Size: 1 Fixp: 0 */
+ 0x34000001, /* PA.W_CLIP_LIMIT := 0x34000001 */
+ 0x0801028a, /* LOAD_STATE (1) Base: 0x00A28 Size: 1 Fixp: 0 */
+ 0x00000011, /* PA.SYSTEM_MODE := 0x11 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xff3fffff, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK22=0,UNK22_MASK=0(residue:ff380000) */
+ 0x08010306, /* LOAD_STATE (1) Base: 0x00C18 Size: 1 Fixp: 0 */
+ 0x00000000, /* SE.LAST_PIXEL_ENABLE := 0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* GLOBAL.FLUSH_CACHE := DEPTH=0,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801050b, /* LOAD_STATE (1) Base: 0x0142C Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.COLOR_FORMAT := FORMAT=0xf,FORMAT_MASK=1,COMPONENTS=R=1,G=1,B=1,A=1,COMPONENTS_MASK=1,UNK16=0,UNK16_MASK=0(residue:fffce0e0) */
+ 0x0801050a, /* LOAD_STATE (1) Base: 0x01428 Size: 1 Fixp: 0 */
+ 0xfffcfffc, /* PE.ALPHA_CONFIG := BLEND_ENABLE_COLOR=0,BLEND_ENABLE_COLOR_MASK=0,SRC_FUNC_COLOR_MASK=1,DST_FUNC_COLOR_MASK=1,SRC_FUNC_COLOR=0xf,DST_FUNC_COLOR=0xf,EQ_COLOR=0x7,EQ_COLOR_MASK=1,BLEND_ENABLE_ALPHA=0,BLEND_ENABLE_ALPHA_MASK=0,SRC_FUNC_ALPHA_MASK=1,DST_FUNC_ALPHA_MASK=1,SRC_FUNC_ALPHA=0xf,DST_FUNC_ALPHA=0xf,EQ_ALPHA=0x7,EQ_ALPHA_MASK=1 */
+ 0x0801050a, /* LOAD_STATE (1) Base: 0x01428 Size: 1 Fixp: 0 */
+ 0xff1bff1b, /* PE.ALPHA_CONFIG := BLEND_ENABLE_COLOR=1,BLEND_ENABLE_COLOR_MASK=1,SRC_FUNC_COLOR_MASK=0,DST_FUNC_COLOR_MASK=1,SRC_FUNC_COLOR=ONE,DST_FUNC_COLOR=0xf,EQ_COLOR=0x7,EQ_COLOR_MASK=1,BLEND_ENABLE_ALPHA=1,BLEND_ENABLE_ALPHA_MASK=1,SRC_FUNC_ALPHA_MASK=0,DST_FUNC_ALPHA_MASK=1,SRC_FUNC_ALPHA=ONE,DST_FUNC_ALPHA=0xf,EQ_ALPHA=0x7,EQ_ALPHA_MASK=1 */
+ 0x0801050a, /* LOAD_STATE (1) Base: 0x01428 Size: 1 Fixp: 0 */
+ 0xf0f7f0f7, /* PE.ALPHA_CONFIG := BLEND_ENABLE_COLOR=1,BLEND_ENABLE_COLOR_MASK=1,SRC_FUNC_COLOR_MASK=1,DST_FUNC_COLOR_MASK=0,SRC_FUNC_COLOR=0xf,DST_FUNC_COLOR=ZERO,EQ_COLOR=0x7,EQ_COLOR_MASK=1,BLEND_ENABLE_ALPHA=1,BLEND_ENABLE_ALPHA_MASK=1,SRC_FUNC_ALPHA_MASK=1,DST_FUNC_ALPHA_MASK=0,SRC_FUNC_ALPHA=0xf,DST_FUNC_ALPHA=ZERO,EQ_ALPHA=0x7,EQ_ALPHA_MASK=1 */
+ 0x0801050a, /* LOAD_STATE (1) Base: 0x01428 Size: 1 Fixp: 0 */
+ 0x0fff0fff, /* PE.ALPHA_CONFIG := BLEND_ENABLE_COLOR=1,BLEND_ENABLE_COLOR_MASK=1,SRC_FUNC_COLOR_MASK=1,DST_FUNC_COLOR_MASK=1,SRC_FUNC_COLOR=0xf,DST_FUNC_COLOR=0xf,EQ_COLOR=ADD,EQ_COLOR_MASK=0,BLEND_ENABLE_ALPHA=1,BLEND_ENABLE_ALPHA_MASK=1,SRC_FUNC_ALPHA_MASK=1,DST_FUNC_ALPHA_MASK=1,SRC_FUNC_ALPHA=0xf,DST_FUNC_ALPHA=0xf,EQ_ALPHA=ADD,EQ_ALPHA_MASK=0 */
+ 0x08010509, /* LOAD_STATE (1) Base: 0x01424 Size: 1 Fixp: 0 */
+ 0x00000000, /* PE.ALPHA_BLEND_COLOR := B=0x0,G=0x0,R=0x0,A=0x0 */
+ 0x08010508, /* LOAD_STATE (1) Base: 0x01420 Size: 1 Fixp: 0 */
+ 0xfffffffc, /* PE.ALPHA_OP := ALPHA_TEST=0,ALPHA_TEST_MASK=0,ALPHA_FUNC=ALWAYS,ALPHA_FUNC_MASK=1(residue:ffffff0c) */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xfffff8ff, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=OFF,CULL_FACE_MODE_MASK=0,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK22=1,UNK22_MASK=1(residue:ff380000) */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xffffcfff, /* PE.DEPTH_CONFIG := UNK0=0x7,UNK0_MASK=1,UNK4=1,UNK4_MASK=1,DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1,WRITE_ENABLE=0,WRITE_ENABLE_MASK=0,UNK16=1,UNK16_MASK=1,UNK20=1,UNK20_MASK=1(residue:ffccc0c0) */
+ 0x08010507, /* LOAD_STATE (1) Base: 0x0141C Size: 1 Fixp: 0 */
+ 0xffff00df, /* PE.STENCIL_CONFIG := MODE=0x3,MODE_MASK=1,REF_FRONT_MASK=0,MASK_FRONT_MASK=1,WRITE_MASK_MASK=1,REF_FRONT=0x0,MASK_FRONT=0xff,WRITE_MASK=0xff(residue:0000000c) */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0xfffffff7, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=0,PASS_FRONT=DECR_WRAP,PASS_FRONT_MASK=1,FAIL_FRONT=DECR_WRAP,FAIL_FRONT_MASK=1,DEPTH_FAIL_FRONT=DECR_WRAP,DEPTH_FAIL_FRONT_MASK=1,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=1,PASS_BACK=DECR_WRAP,PASS_BACK_MASK=1,FAIL_BACK=DECR_WRAP,FAIL_BACK_MASK=1,DEPTH_FAIL_BACK=DECR_WRAP,DEPTH_FAIL_BACK_MASK=1 */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0xfff7ffff, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=1,PASS_FRONT=DECR_WRAP,PASS_FRONT_MASK=1,FAIL_FRONT=DECR_WRAP,FAIL_FRONT_MASK=1,DEPTH_FAIL_FRONT=DECR_WRAP,DEPTH_FAIL_FRONT_MASK=1,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=0,PASS_BACK=DECR_WRAP,PASS_BACK_MASK=1,FAIL_BACK=DECR_WRAP,FAIL_BACK_MASK=1,DEPTH_FAIL_BACK=DECR_WRAP,DEPTH_FAIL_BACK_MASK=1 */
+ 0x08010507, /* LOAD_STATE (1) Base: 0x0141C Size: 1 Fixp: 0 */
+ 0xffffffbf, /* PE.STENCIL_CONFIG := MODE=0x3,MODE_MASK=1,REF_FRONT_MASK=1,MASK_FRONT_MASK=0,WRITE_MASK_MASK=1,REF_FRONT=0xff,MASK_FRONT=0xff,WRITE_MASK=0xff(residue:0000000c) */
+ 0x08010507, /* LOAD_STATE (1) Base: 0x0141C Size: 1 Fixp: 0 */
+ 0xffffff7f, /* PE.STENCIL_CONFIG := MODE=0x3,MODE_MASK=1,REF_FRONT_MASK=1,MASK_FRONT_MASK=1,WRITE_MASK_MASK=0,REF_FRONT=0xff,MASK_FRONT=0xff,WRITE_MASK=0xff(residue:0000000c) */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0xfffff0ff, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=1,PASS_FRONT=DECR_WRAP,PASS_FRONT_MASK=1,FAIL_FRONT=KEEP,FAIL_FRONT_MASK=0,DEPTH_FAIL_FRONT=DECR_WRAP,DEPTH_FAIL_FRONT_MASK=1,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=1,PASS_BACK=DECR_WRAP,PASS_BACK_MASK=1,FAIL_BACK=DECR_WRAP,FAIL_BACK_MASK=1,DEPTH_FAIL_BACK=DECR_WRAP,DEPTH_FAIL_BACK_MASK=1 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.DEPTH_CONFIG := UNK0=0x7,UNK0_MASK=1,UNK4=1,UNK4_MASK=1,DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1,WRITE_ENABLE=1,WRITE_ENABLE_MASK=1,UNK16=0,UNK16_MASK=0,UNK20=1,UNK20_MASK=1(residue:ffccc0c0) */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0xf0ffffff, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=1,PASS_FRONT=DECR_WRAP,PASS_FRONT_MASK=1,FAIL_FRONT=DECR_WRAP,FAIL_FRONT_MASK=1,DEPTH_FAIL_FRONT=DECR_WRAP,DEPTH_FAIL_FRONT_MASK=1,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=1,PASS_BACK=DECR_WRAP,PASS_BACK_MASK=1,FAIL_BACK=KEEP,FAIL_BACK_MASK=0,DEPTH_FAIL_BACK=DECR_WRAP,DEPTH_FAIL_BACK_MASK=1 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.DEPTH_CONFIG := UNK0=0x7,UNK0_MASK=1,UNK4=1,UNK4_MASK=1,DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1,WRITE_ENABLE=1,WRITE_ENABLE_MASK=1,UNK16=0,UNK16_MASK=0,UNK20=1,UNK20_MASK=1(residue:ffccc0c0) */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0xffff0fff, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=1,PASS_FRONT=DECR_WRAP,PASS_FRONT_MASK=1,FAIL_FRONT=DECR_WRAP,FAIL_FRONT_MASK=1,DEPTH_FAIL_FRONT=KEEP,DEPTH_FAIL_FRONT_MASK=0,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=1,PASS_BACK=DECR_WRAP,PASS_BACK_MASK=1,FAIL_BACK=DECR_WRAP,FAIL_BACK_MASK=1,DEPTH_FAIL_BACK=DECR_WRAP,DEPTH_FAIL_BACK_MASK=1 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.DEPTH_CONFIG := UNK0=0x7,UNK0_MASK=1,UNK4=1,UNK4_MASK=1,DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1,WRITE_ENABLE=1,WRITE_ENABLE_MASK=1,UNK16=0,UNK16_MASK=0,UNK20=1,UNK20_MASK=1(residue:ffccc0c0) */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0x0fffffff, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=1,PASS_FRONT=DECR_WRAP,PASS_FRONT_MASK=1,FAIL_FRONT=DECR_WRAP,FAIL_FRONT_MASK=1,DEPTH_FAIL_FRONT=DECR_WRAP,DEPTH_FAIL_FRONT_MASK=1,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=1,PASS_BACK=DECR_WRAP,PASS_BACK_MASK=1,FAIL_BACK=DECR_WRAP,FAIL_BACK_MASK=1,DEPTH_FAIL_BACK=KEEP,DEPTH_FAIL_BACK_MASK=0 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.DEPTH_CONFIG := UNK0=0x7,UNK0_MASK=1,UNK4=1,UNK4_MASK=1,DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1,WRITE_ENABLE=1,WRITE_ENABLE_MASK=1,UNK16=0,UNK16_MASK=0,UNK20=1,UNK20_MASK=1(residue:ffccc0c0) */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0xffffff0f, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=1,PASS_FRONT=KEEP,PASS_FRONT_MASK=0,FAIL_FRONT=DECR_WRAP,FAIL_FRONT_MASK=1,DEPTH_FAIL_FRONT=DECR_WRAP,DEPTH_FAIL_FRONT_MASK=1,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=1,PASS_BACK=DECR_WRAP,PASS_BACK_MASK=1,FAIL_BACK=DECR_WRAP,FAIL_BACK_MASK=1,DEPTH_FAIL_BACK=DECR_WRAP,DEPTH_FAIL_BACK_MASK=1 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.DEPTH_CONFIG := UNK0=0x7,UNK0_MASK=1,UNK4=1,UNK4_MASK=1,DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1,WRITE_ENABLE=1,WRITE_ENABLE_MASK=1,UNK16=0,UNK16_MASK=0,UNK20=1,UNK20_MASK=1(residue:ffccc0c0) */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0xff0fffff, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=1,PASS_FRONT=DECR_WRAP,PASS_FRONT_MASK=1,FAIL_FRONT=DECR_WRAP,FAIL_FRONT_MASK=1,DEPTH_FAIL_FRONT=DECR_WRAP,DEPTH_FAIL_FRONT_MASK=1,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=1,PASS_BACK=KEEP,PASS_BACK_MASK=0,FAIL_BACK=DECR_WRAP,FAIL_BACK_MASK=1,DEPTH_FAIL_BACK=DECR_WRAP,DEPTH_FAIL_BACK_MASK=1 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.DEPTH_CONFIG := UNK0=0x7,UNK0_MASK=1,UNK4=1,UNK4_MASK=1,DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1,WRITE_ENABLE=1,WRITE_ENABLE_MASK=1,UNK16=0,UNK16_MASK=0,UNK20=1,UNK20_MASK=1(residue:ffccc0c0) */
+ 0x0801050b, /* LOAD_STATE (1) Base: 0x0142C Size: 1 Fixp: 0 */
+ 0xffffefff, /* PE.COLOR_FORMAT := FORMAT=0xf,FORMAT_MASK=1,COMPONENTS=R=1,G=1,B=1,A=1,COMPONENTS_MASK=0,UNK16=1,UNK16_MASK=1(residue:fffce0e0) */
+ 0x08010304, /* LOAD_STATE (1) Base: 0x00C10 Size: 1 Fixp: 0 */
+ 0x00000000, /* SE.DEPTH_SCALE := 0x0 */
+ 0x08010305, /* LOAD_STATE (1) Base: 0x00C14 Size: 1 Fixp: 0 */
+ 0x00000000, /* SE.DEPTH_BIAS := 0x0 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xffffafff, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=SOLID,FILL_MODE_MASK=0,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK22=1,UNK22_MASK=1(residue:ff380000) */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xfff9ffff, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=SMOOTH,SHADE_MODEL_MASK=0,UNK22=1,UNK22_MASK=1(residue:ff380000) */
+ 0x0801050b, /* LOAD_STATE (1) Base: 0x0142C Size: 1 Fixp: 0 */
+ 0xffdfffe5, /* PE.COLOR_FORMAT := FORMAT=X8R8G8B8,FORMAT_MASK=0,COMPONENTS=R=1,G=1,B=1,A=1,COMPONENTS_MASK=1,UNK16=1,UNK16_MASK=1(residue:ffdce0e0) */
+ 0x0801050c, /* LOAD_STATE (1) Base: 0x01430 Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* PE.COLOR_ADDR := ADDR_A */
+ 0x0801050d, /* LOAD_STATE (1) Base: 0x01434 Size: 1 Fixp: 0 */
+ 0x00000d00, /* PE.COLOR_STRIDE := 0xd00 */
+ 0x08010e06, /* LOAD_STATE (1) Base: 0x03818 Size: 1 Fixp: 0 */
+ 0xfff40ef4, /* GLOBAL.MULTI_SAMPLE_CONFIG := UNK0=0x0,UNK0_MASK=0,UNK4=0xf,UNK4_MASK=0,UNK12=0x0,UNK12_MASK=0,UNK16=0x0,UNK16_MASK=0(residue:fff40e04) */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* GLOBAL.FLUSH_CACHE := DEPTH=0,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801050b, /* LOAD_STATE (1) Base: 0x0142C Size: 1 Fixp: 0 */
+ 0xfffdffff, /* PE.COLOR_FORMAT := FORMAT=0xf,FORMAT_MASK=1,COMPONENTS=R=1,G=1,B=1,A=1,COMPONENTS_MASK=1,UNK16=1,UNK16_MASK=0(residue:fffce0e0) */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* GLOBAL.FLUSH_CACHE := DEPTH=0,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010598, /* LOAD_STATE (1) Base: 0x01660 Size: 1 Fixp: 0 */
+ 0x00000000, /* TS.COLOR_CLEAR_VALUE := 0x0 */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a005900, /* TS.COLOR_STATUS_BASE := ADDR_B */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := ADDR_A */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x00000002, /* TS.MEM_CONFIG := DEPTH_FAST_CLEAR=0,COLOR_FAST_CLEAR=1,DEPTH_16BPP=0,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=0,DEPTH_COMPRESSION=0 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xf7ffffcf, /* PE.DEPTH_CONFIG := UNK0=0x7,UNK0_MASK=1,UNK4=0,UNK4_MASK=0,DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1,WRITE_ENABLE=1,WRITE_ENABLE_MASK=1,UNK16=1,UNK16_MASK=1,UNK20=1,UNK20_MASK=1(residue:f7ccc0c0) */
+ 0x08010504, /* LOAD_STATE (1) Base: 0x01410 Size: 1 Fixp: 0 */
+ 0x7e6a0000, /* PE.DEPTH_ADDR := ADDR_C */
+ 0x08010505, /* LOAD_STATE (1) Base: 0x01414 Size: 1 Fixp: 0 */
+ 0x00000680, /* PE.DEPTH_STRIDE := 0x680 */
+ 0x08010507, /* LOAD_STATE (1) Base: 0x0141C Size: 1 Fixp: 0 */
+ 0xffffffec, /* PE.STENCIL_CONFIG := MODE=DISABLED,MODE_MASK=0,REF_FRONT_MASK=1,MASK_FRONT_MASK=1,WRITE_MASK_MASK=1,REF_FRONT=0xff,MASK_FRONT=0xff,WRITE_MASK=0xff(residue:0000000c) */
+ 0x08010515, /* LOAD_STATE (1) Base: 0x01454 Size: 1 Fixp: 0 */
+ 0x00000000, /* PE.HDEPTH_CONTROL := FORMAT=DISABLED */
+ 0x08010503, /* LOAD_STATE (1) Base: 0x0140C Size: 1 Fixp: 0 */
+ 0x477fff00, /* PE.DEPTH_NORMALIZE := 65535.000000 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.DEPTH_CONFIG := UNK0=0x7,UNK0_MASK=1,UNK4=1,UNK4_MASK=1,DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1,WRITE_ENABLE=1,WRITE_ENABLE_MASK=1,UNK16=0,UNK16_MASK=0,UNK20=1,UNK20_MASK=1(residue:ffccc0c0) */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000001, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=0,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801059b, /* LOAD_STATE (1) Base: 0x0166C Size: 1 Fixp: 0 */
+ 0xffffffff, /* TS.DEPTH_CLEAR_VALUE := 0xffffffff */
+ 0x08010599, /* LOAD_STATE (1) Base: 0x01664 Size: 1 Fixp: 0 */
+ 0x7a003200, /* TS.DEPTH_STATUS_BASE := ADDR_D */
+ 0x0801059a, /* LOAD_STATE (1) Base: 0x01668 Size: 1 Fixp: 0 */
+ 0x7e6a0000, /* TS.DEPTH_SURFACE_BASE := ADDR_C */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x0000004b, /* TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=1,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=0,DEPTH_COMPRESSION=1 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffdffff, /* PE.DEPTH_CONFIG := UNK0=0x7,UNK0_MASK=1,UNK4=1,UNK4_MASK=1,DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1,WRITE_ENABLE=1,WRITE_ENABLE_MASK=1,UNK16=1,UNK16_MASK=0,UNK20=1,UNK20_MASK=1(residue:ffccc0c0) */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a002a00, /* TS.COLOR_STATUS_BASE := ADDR_G */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f284000, /* TS.COLOR_SURFACE_BASE := ADDR_F */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004486, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=1,DEST_FORMAT=R5G6B5,UNK14=1,SWAP_RB=0,FLIP=0 */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.SOURCE_ADDR := ADDR_F */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.SOURCE_STRIDE := STRIDE=0x400,TILING=0 */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.DEST_ADDR := ADDR_F */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.DEST_STRIDE := STRIDE=0x400,TILING=0 */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00040010, /* RS.WINDOW_SIZE := HEIGHT=4,WIDTH=16 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb, /* RS.KICKER := 0xbeebbeeb */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a005900, /* TS.COLOR_STATUS_BASE := ADDR_B */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := ADDR_A */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a002a00, /* TS.COLOR_STATUS_BASE := ADDR_G */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f284000, /* TS.COLOR_SURFACE_BASE := ADDR_F */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004486, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=1,DEST_FORMAT=R5G6B5,UNK14=1,SWAP_RB=0,FLIP=0 */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.SOURCE_ADDR := ADDR_F */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.SOURCE_STRIDE := STRIDE=0x400,TILING=0 */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.DEST_ADDR := ADDR_F */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.DEST_STRIDE := STRIDE=0x400,TILING=0 */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00040010, /* RS.WINDOW_SIZE := HEIGHT=4,WIDTH=16 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb, /* RS.KICKER := 0xbeebbeeb */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a005900, /* TS.COLOR_STATUS_BASE := ADDR_B */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := ADDR_A */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a002a00, /* TS.COLOR_STATUS_BASE := ADDR_G */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f284000, /* TS.COLOR_SURFACE_BASE := ADDR_F */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004486, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=1,DEST_FORMAT=R5G6B5,UNK14=1,SWAP_RB=0,FLIP=0 */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.SOURCE_ADDR := ADDR_F */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.SOURCE_STRIDE := STRIDE=0x400,TILING=0 */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.DEST_ADDR := ADDR_F */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.DEST_STRIDE := STRIDE=0x400,TILING=0 */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00040010, /* RS.WINDOW_SIZE := HEIGHT=4,WIDTH=16 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb, /* RS.KICKER := 0xbeebbeeb */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a005900, /* TS.COLOR_STATUS_BASE := ADDR_B */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := ADDR_A */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000705, /* GLOBAL.SEMAPHORE_TOKEN := FROM=RA,TO=PE */
+ 0x08010f00, /* LOAD_STATE (1) Base: 0x03C00 Size: 1 Fixp: 0 */
+ 0x00000705, /* GLOBAL.STALL_TOKEN := FROM=RA,TO=PE,FLIP0=0,FLIP1=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00000606, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=0,DEST_FORMAT=A8R8G8B8,UNK14=0,SWAP_RB=0,FLIP=0 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* RS.DITHER[1] := 0xffffffff */
+ 0x00000100, /* PAD */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7a005900, /* RS.DEST_ADDR := ADDR_B */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000080, /* RS.DEST_STRIDE := STRIDE=0x80,TILING=0 */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00340020, /* RS.WINDOW_SIZE := HEIGHT=52,WIDTH=32 */
+ 0x08010590, /* LOAD_STATE (1) Base: 0x01640 Size: 1 Fixp: 0 */
+ 0x55555555, /* RS.FILL_VALUE[0] := 0x55555555 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x0001ffff, /* RS.CLEAR_CONTROL := BITS=0xffff,MODE=0x1 */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb, /* RS.KICKER := 0xbeebbeeb */
+ 0x08010598, /* LOAD_STATE (1) Base: 0x01660 Size: 1 Fixp: 0 */
+ 0xff7f7f7f, /* TS.COLOR_CLEAR_VALUE := 0xff7f7f7f */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* GLOBAL.FLUSH_CACHE := DEPTH=0,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010598, /* LOAD_STATE (1) Base: 0x01660 Size: 1 Fixp: 0 */
+ 0xff7f7f7f, /* TS.COLOR_CLEAR_VALUE := 0xff7f7f7f */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a005900, /* TS.COLOR_STATUS_BASE := ADDR_B */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := ADDR_A */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x0000004b, /* TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=1,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=0,DEPTH_COMPRESSION=1 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a002a00, /* TS.COLOR_STATUS_BASE := ADDR_G */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f284000, /* TS.COLOR_SURFACE_BASE := ADDR_F */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004486, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=1,DEST_FORMAT=R5G6B5,UNK14=1,SWAP_RB=0,FLIP=0 */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.SOURCE_ADDR := ADDR_F */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.SOURCE_STRIDE := STRIDE=0x400,TILING=0 */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.DEST_ADDR := ADDR_F */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.DEST_STRIDE := STRIDE=0x400,TILING=0 */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00040010, /* RS.WINDOW_SIZE := HEIGHT=4,WIDTH=16 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb, /* RS.KICKER := 0xbeebbeeb */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a005900, /* TS.COLOR_STATUS_BASE := ADDR_B */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := ADDR_A */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a002a00, /* TS.COLOR_STATUS_BASE := ADDR_G */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f284000, /* TS.COLOR_SURFACE_BASE := ADDR_F */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004486, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=1,DEST_FORMAT=R5G6B5,UNK14=1,SWAP_RB=0,FLIP=0 */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.SOURCE_ADDR := ADDR_F */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.SOURCE_STRIDE := STRIDE=0x400,TILING=0 */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.DEST_ADDR := ADDR_F */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.DEST_STRIDE := STRIDE=0x400,TILING=0 */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00040010, /* RS.WINDOW_SIZE := HEIGHT=4,WIDTH=16 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb, /* RS.KICKER := 0xbeebbeeb */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a005900, /* TS.COLOR_STATUS_BASE := ADDR_B */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := ADDR_A */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a002a00, /* TS.COLOR_STATUS_BASE := ADDR_G */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f284000, /* TS.COLOR_SURFACE_BASE := ADDR_F */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004486, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=1,DEST_FORMAT=R5G6B5,UNK14=1,SWAP_RB=0,FLIP=0 */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.SOURCE_ADDR := ADDR_F */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.SOURCE_STRIDE := STRIDE=0x400,TILING=0 */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.DEST_ADDR := ADDR_F */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.DEST_STRIDE := STRIDE=0x400,TILING=0 */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00040010, /* RS.WINDOW_SIZE := HEIGHT=4,WIDTH=16 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb, /* RS.KICKER := 0xbeebbeeb */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a005900, /* TS.COLOR_STATUS_BASE := ADDR_B */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := ADDR_A */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000705, /* GLOBAL.SEMAPHORE_TOKEN := FROM=RA,TO=PE */
+ 0x08010f00, /* LOAD_STATE (1) Base: 0x03C00 Size: 1 Fixp: 0 */
+ 0x00000705, /* GLOBAL.STALL_TOKEN := FROM=RA,TO=PE,FLIP0=0,FLIP1=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00000606, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=0,DEST_FORMAT=A8R8G8B8,UNK14=0,SWAP_RB=0,FLIP=0 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* RS.DITHER[1] := 0xffffffff */
+ 0x015400d0, /* PAD */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7a003200, /* RS.DEST_ADDR := ADDR_D */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000040, /* RS.DEST_STRIDE := STRIDE=0x40,TILING=0 */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00340010, /* RS.WINDOW_SIZE := HEIGHT=52,WIDTH=16 */
+ 0x08010590, /* LOAD_STATE (1) Base: 0x01640 Size: 1 Fixp: 0 */
+ 0x55555555, /* RS.FILL_VALUE[0] := 0x55555555 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x0001ffff, /* RS.CLEAR_CONTROL := BITS=0xffff,MODE=0x1 */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb, /* RS.KICKER := 0xbeebbeeb */
+ 0x0801059b, /* LOAD_STATE (1) Base: 0x0166C Size: 1 Fixp: 0 */
+ 0xffffffff, /* TS.DEPTH_CLEAR_VALUE := 0xffffffff */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000001, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=0,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801059b, /* LOAD_STATE (1) Base: 0x0166C Size: 1 Fixp: 0 */
+ 0xffffffff, /* TS.DEPTH_CLEAR_VALUE := 0xffffffff */
+ 0x08010599, /* LOAD_STATE (1) Base: 0x01664 Size: 1 Fixp: 0 */
+ 0x7a003200, /* TS.DEPTH_STATUS_BASE := ADDR_D */
+ 0x0801059a, /* LOAD_STATE (1) Base: 0x01668 Size: 1 Fixp: 0 */
+ 0x7e6a0000, /* TS.DEPTH_SURFACE_BASE := ADDR_C */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x0000004b /* TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=1,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=0,DEPTH_COMPRESSION=1 */
+};
+#if 0
+ Grouped GPU addresses {
+ cmdbuf[0x57] = cmdbuf[0x67] = cmdbuf[0x9f] = cmdbuf[0xbb] = cmdbuf[0xd9] = cmdbuf[0xfb] = cmdbuf[0x119] = cmdbuf[0x135] = cmdbuf[0x153] = ADDR_A; /* 0x7f2c8700 */
+ cmdbuf[0x65] = cmdbuf[0x9d] = cmdbuf[0xb9] = cmdbuf[0xd7] = cmdbuf[0xe5] = cmdbuf[0xf9] = cmdbuf[0x117] = cmdbuf[0x133] = cmdbuf[0x151] = ADDR_B; /* 0x7a005900 */
+ cmdbuf[0x89] = cmdbuf[0x8f] = cmdbuf[0x93] = cmdbuf[0xa5] = cmdbuf[0xab] = cmdbuf[0xaf] = cmdbuf[0xc3] = cmdbuf[0xc9] = cmdbuf[0xcd] = cmdbuf[0x103] = cmdbuf[0x109] = cmdbuf[0x10d] = cmdbuf[0x11f] = cmdbuf[0x125] = cmdbuf[0x129] = cmdbuf[0x13d] = cmdbuf[0x143] = cmdbuf[0x147] = ADDR_F; /* 0x7f284000 */
+ cmdbuf[0x7d] = cmdbuf[0x15f] = cmdbuf[0x173] = ADDR_D; /* 0x7a003200 */
+ cmdbuf[0x87] = cmdbuf[0xa3] = cmdbuf[0xc1] = cmdbuf[0x101] = cmdbuf[0x11d] = cmdbuf[0x13b] = ADDR_G; /* 0x7a002a00 */
+ cmdbuf[0x6d] = cmdbuf[0x7f] = cmdbuf[0x175] = ADDR_C; /* 0x7e6a0000 */
+ }
+#endif
+
+uint32_t cmdbuf2[] = { /* seq 101 */
+ 0x00000038, /* PAD */
+ 0x03801003, /* PAD */
+ 0x29000800, /* PAD */
+ 0x014801c0, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00801005, /* PAD */
+ 0x29001800, /* PAD */
+ 0x01480040, /* PAD */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xfffffaff, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=CCW,CULL_FACE_MODE_MASK=0,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK22=1,UNK22_MASK=1(residue:ff380000) */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xffffcfff, /* PE.DEPTH_CONFIG := UNK0=0x7,UNK0_MASK=1,UNK4=1,UNK4_MASK=1,DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1,WRITE_ENABLE=0,WRITE_ENABLE_MASK=0,UNK16=1,UNK16_MASK=1,UNK20=1,UNK20_MASK=1(residue:ffccc0c0) */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffffff5, /* PE.DEPTH_CONFIG := UNK0=0x5,UNK0_MASK=0,UNK4=1,UNK4_MASK=1,DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1,WRITE_ENABLE=1,WRITE_ENABLE_MASK=1,UNK16=1,UNK16_MASK=1,UNK20=1,UNK20_MASK=1(residue:ffccc0c0) */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xffffdfff, /* PE.DEPTH_CONFIG := UNK0=0x7,UNK0_MASK=1,UNK4=1,UNK4_MASK=1,DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1,WRITE_ENABLE=1,WRITE_ENABLE_MASK=0,UNK16=1,UNK16_MASK=1,UNK20=1,UNK20_MASK=1(residue:ffccc0c0) */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffff1ff, /* PE.DEPTH_CONFIG := UNK0=0x7,UNK0_MASK=1,UNK4=1,UNK4_MASK=1,DEPTH_FUNC=LESS,DEPTH_FUNC_MASK=0,WRITE_ENABLE=1,WRITE_ENABLE_MASK=1,UNK16=1,UNK16_MASK=1,UNK20=1,UNK20_MASK=1(residue:ffccc0c0) */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffffff5, /* PE.DEPTH_CONFIG := UNK0=0x5,UNK0_MASK=0,UNK4=1,UNK4_MASK=1,DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1,WRITE_ENABLE=1,WRITE_ENABLE_MASK=1,UNK16=1,UNK16_MASK=1,UNK20=1,UNK20_MASK=1(residue:ffccc0c0) */
+ 0x08010501, /* LOAD_STATE (1) Base: 0x01404 Size: 1 Fixp: 0 */
+ 0x00000000, /* PE.DEPTH_NEAR := 0.000000 */
+ 0x08010502, /* LOAD_STATE (1) Base: 0x01408 Size: 1 Fixp: 0 */
+ 0x3f800000, /* PE.DEPTH_FAR := 1.000000 */
+ 0x08010503, /* LOAD_STATE (1) Base: 0x0140C Size: 1 Fixp: 0 */
+ 0x477fff00, /* PE.DEPTH_NORMALIZE := 65535.000000 */
+ 0x08010285, /* LOAD_STATE (1) Base: 0x00A14 Size: 1 Fixp: 0 */
+ 0x00000000, /* PA.VIEWPORT_OFFSET_Z := 0.000000 */
+ 0x08010282, /* LOAD_STATE (1) Base: 0x00A08 Size: 1 Fixp: 0 */
+ 0x3f800000, /* PA.VIEWPORT_SCALE_Z := 1.000000 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xffcfffff, /* PE.DEPTH_CONFIG := UNK0=0x7,UNK0_MASK=1,UNK4=1,UNK4_MASK=1,DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1,WRITE_ENABLE=1,WRITE_ENABLE_MASK=1,UNK16=1,UNK16_MASK=1,UNK20=0,UNK20_MASK=0(residue:ffccc0c0) */
+ 0x0c010283, /* LOAD_STATE (1) Base: 0x00A0C Size: 1 Fixp: 1 */
+ 0x01900000, /* PA.VIEWPORT_OFFSET_X = 400.000000 */
+ 0x0c010284, /* LOAD_STATE (1) Base: 0x00A10 Size: 1 Fixp: 1 */
+ 0x00f00000, /* PA.VIEWPORT_OFFSET_Y = 240.000000 */
+ 0x0c010280, /* LOAD_STATE (1) Base: 0x00A00 Size: 1 Fixp: 1 */
+ 0x01900000, /* PA.VIEWPORT_SCALE_X = 400.000000 */
+ 0x0c010281, /* LOAD_STATE (1) Base: 0x00A04 Size: 1 Fixp: 1 */
+ 0x00f00000, /* PA.VIEWPORT_SCALE_Y = 240.000000 */
+ 0x0c010300, /* LOAD_STATE (1) Base: 0x00C00 Size: 1 Fixp: 1 */
+ 0x00000000, /* SE.SCISSOR_LEFT = 0.000000 */
+ 0x0c010301, /* LOAD_STATE (1) Base: 0x00C04 Size: 1 Fixp: 1 */
+ 0x00000000, /* SE.SCISSOR_TOP = 0.000000 */
+ 0x0c010302, /* LOAD_STATE (1) Base: 0x00C08 Size: 1 Fixp: 1 */
+ 0x03200005, /* SE.SCISSOR_RIGHT = 800.000076 */
+ 0x0c010303, /* LOAD_STATE (1) Base: 0x00C0C Size: 1 Fixp: 1 */
+ 0x01e00005, /* SE.SCISSOR_BOTTOM = 480.000076 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000004, /* GLOBAL.FLUSH_CACHE := DEPTH=0,COLOR=0,3D_TEXTURE=1,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010800, /* LOAD_STATE (1) Base: 0x02000 Size: 1 Fixp: 0 */
+ 0x00010002, /* TE.SAMPLER[0].CONFIG_1 := 0x10002 */
+ 0x08010810, /* LOAD_STATE (1) Base: 0x02040 Size: 1 Fixp: 0 */
+ 0x02000200, /* TE.SAMPLER[0].SIZE := WIDTH=512,HEIGHT=512 */
+ 0x08010820, /* LOAD_STATE (1) Base: 0x02080 Size: 1 Fixp: 0 */
+ 0x00048120, /* TE.SAMPLER[0].LOG_SIZE := WIDTH=9.000000,HEIGHT=9.000000 */
+ 0x08010900, /* LOAD_STATE (1) Base: 0x02400 Size: 1 Fixp: 0 */
+ 0x7d38d440, /* TE.SAMPLER[0].LOD_ADDR[0] := ADDR_H */
+ 0x08010800, /* LOAD_STATE (1) Base: 0x02000 Size: 1 Fixp: 0 */
+ 0x00010002, /* TE.SAMPLER[0].CONFIG_1 := 0x10002 */
+ 0x08010800, /* LOAD_STATE (1) Base: 0x02000 Size: 1 Fixp: 0 */
+ 0x00010002, /* TE.SAMPLER[0].CONFIG_1 := 0x10002 */
+ 0x08010800, /* LOAD_STATE (1) Base: 0x02000 Size: 1 Fixp: 0 */
+ 0x00010102, /* TE.SAMPLER[0].CONFIG_1 := 0x10102 */
+ 0x08010800, /* LOAD_STATE (1) Base: 0x02000 Size: 1 Fixp: 0 */
+ 0x00011102, /* TE.SAMPLER[0].CONFIG_1 := 0x11102 */
+ 0x08010800, /* LOAD_STATE (1) Base: 0x02000 Size: 1 Fixp: 0 */
+ 0x00011102, /* TE.SAMPLER[0].CONFIG_1 := 0x11102 */
+ 0x08010800, /* LOAD_STATE (1) Base: 0x02000 Size: 1 Fixp: 0 */
+ 0x00011102, /* TE.SAMPLER[0].CONFIG_1 := 0x11102 */
+ 0x08010830, /* LOAD_STATE (1) Base: 0x020C0 Size: 1 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_CONFIG := 0x0 */
+ 0x08010830, /* LOAD_STATE (1) Base: 0x020C0 Size: 1 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_CONFIG := 0x0 */
+ 0x08010830, /* LOAD_STATE (1) Base: 0x020C0 Size: 1 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_CONFIG := 0x0 */
+ 0x08010200, /* LOAD_STATE (1) Base: 0x00800 Size: 1 Fixp: 0 */
+ 0x00000018, /* VS.END_PC := 0x18 */
+ 0x08030202, /* LOAD_STATE (1) Base: 0x00808 Size: 3 Fixp: 0 */
+ 0x00000103, /* VS.INPUT_COUNT := COUNT=3,COUNT2=1 */
+ 0x00000006, /* VS.TEMP_REGISTER_CONTROL := NUM_TEMPS=6 */
+ 0x00010004, /* VS.OUTPUT[0] := 0x10004 */
+ 0x0801020e, /* LOAD_STATE (1) Base: 0x00838 Size: 1 Fixp: 0 */
+ 0x00000000, /* VS.START_PC := 0x0 */
+ 0x0801142d, /* LOAD_STATE (1) Base: 0x050B4 Size: 1 Fixp: 0 */
+ 0x3f000000, /* VS.UNIFORMS[45] := 0.500000 */
+ 0x0801142c, /* LOAD_STATE (1) Base: 0x050B0 Size: 1 Fixp: 0 */
+ 0x3f800000, /* VS.UNIFORMS[44] := 1.000000 */
+ 0x0801141b, /* LOAD_STATE (1) Base: 0x0506C Size: 1 Fixp: 0 */
+ 0x00000000, /* VS.UNIFORMS[27] := 0.000000 */
+ 0x08011417, /* LOAD_STATE (1) Base: 0x0505C Size: 1 Fixp: 0 */
+ 0x41a00000, /* VS.UNIFORMS[23] := 20.000000 */
+ 0x08011413, /* LOAD_STATE (1) Base: 0x0504C Size: 1 Fixp: 0 */
+ 0x40000000, /* VS.UNIFORMS[19] := 2.000000 */
+ 0x08601000, /* LOAD_STATE (1) Base: 0x04000 Size: 96 Fixp: 0 */
+ 0x01831009, /* VS.INST_MEM[0] := 0x1831009 */
+ 0x00000000, /* VS.INST_MEM[1] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[2] := 0x0 */
+ 0x203fc048, /* VS.INST_MEM[3] := 0x203fc048 */
+ 0x02031009, /* VS.INST_MEM[4] := 0x2031009 */
+ 0x00000000, /* VS.INST_MEM[5] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[6] := 0x0 */
+ 0x203fc058, /* VS.INST_MEM[7] := 0x203fc058 */
+ 0x07841003, /* VS.INST_MEM[8] := 0x7841003 */
+ 0x39000800, /* VS.INST_MEM[9] := 0x39000800 */
+ 0x00000050, /* VS.INST_MEM[10] := 0x50 */
+ 0x00000000, /* VS.INST_MEM[11] := 0x0 */
+ 0x07841002, /* VS.INST_MEM[12] := 0x7841002 */
+ 0x39001800, /* VS.INST_MEM[13] := 0x39001800 */
+ 0x00aa0050, /* VS.INST_MEM[14] := 0xaa0050 */
+ 0x00390048, /* VS.INST_MEM[15] := 0x390048 */
+ 0x07841002, /* VS.INST_MEM[16] := 0x7841002 */
+ 0x39002800, /* VS.INST_MEM[17] := 0x39002800 */
+ 0x01540050, /* VS.INST_MEM[18] := 0x1540050 */
+ 0x00390048, /* VS.INST_MEM[19] := 0x390048 */
+ 0x07841002, /* VS.INST_MEM[20] := 0x7841002 */
+ 0x39003800, /* VS.INST_MEM[21] := 0x39003800 */
+ 0x01fe0050, /* VS.INST_MEM[22] := 0x1fe0050 */
+ 0x00390048, /* VS.INST_MEM[23] := 0x390048 */
+ 0x03851003, /* VS.INST_MEM[24] := 0x3851003 */
+ 0x29004800, /* VS.INST_MEM[25] := 0x29004800 */
+ 0x000000d0, /* VS.INST_MEM[26] := 0xd0 */
+ 0x00000000, /* VS.INST_MEM[27] := 0x0 */
+ 0x03851002, /* VS.INST_MEM[28] := 0x3851002 */
+ 0x29005800, /* VS.INST_MEM[29] := 0x29005800 */
+ 0x00aa00d0, /* VS.INST_MEM[30] := 0xaa00d0 */
+ 0x00290058, /* VS.INST_MEM[31] := 0x290058 */
+ 0x03811002, /* VS.INST_MEM[32] := 0x3811002 */
+ 0x29006800, /* VS.INST_MEM[33] := 0x29006800 */
+ 0x015400d0, /* VS.INST_MEM[34] := 0x15400d0 */
+ 0x00290058, /* VS.INST_MEM[35] := 0x290058 */
+ 0x07851003, /* VS.INST_MEM[36] := 0x7851003 */
+ 0x39007800, /* VS.INST_MEM[37] := 0x39007800 */
+ 0x00000050, /* VS.INST_MEM[38] := 0x50 */
+ 0x00000000, /* VS.INST_MEM[39] := 0x0 */
+ 0x07851002, /* VS.INST_MEM[40] := 0x7851002 */
+ 0x39008800, /* VS.INST_MEM[41] := 0x39008800 */
+ 0x00aa0050, /* VS.INST_MEM[42] := 0xaa0050 */
+ 0x00390058, /* VS.INST_MEM[43] := 0x390058 */
+ 0x07851002, /* VS.INST_MEM[44] := 0x7851002 */
+ 0x39009800, /* VS.INST_MEM[45] := 0x39009800 */
+ 0x01540050, /* VS.INST_MEM[46] := 0x1540050 */
+ 0x00390058, /* VS.INST_MEM[47] := 0x390058 */
+ 0x07801002, /* VS.INST_MEM[48] := 0x7801002 */
+ 0x3900a800, /* VS.INST_MEM[49] := 0x3900a800 */
+ 0x01fe0050, /* VS.INST_MEM[50] := 0x1fe0050 */
+ 0x00390058, /* VS.INST_MEM[51] := 0x390058 */
+ 0x0401100c, /* VS.INST_MEM[52] := 0x401100c */
+ 0x00000000, /* VS.INST_MEM[53] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[54] := 0x0 */
+ 0x003fc008, /* VS.INST_MEM[55] := 0x3fc008 */
+ 0x03801002, /* VS.INST_MEM[56] := 0x3801002 */
+ 0x69000800, /* VS.INST_MEM[57] := 0x69000800 */
+ 0x01fe00c0, /* VS.INST_MEM[58] := 0x1fe00c0 */
+ 0x00290038, /* VS.INST_MEM[59] := 0x290038 */
+ 0x03831005, /* VS.INST_MEM[60] := 0x3831005 */
+ 0x29000800, /* VS.INST_MEM[61] := 0x29000800 */
+ 0x01480040, /* VS.INST_MEM[62] := 0x1480040 */
+ 0x00000000, /* VS.INST_MEM[63] := 0x0 */
+ 0x0383100d, /* VS.INST_MEM[64] := 0x383100d */
+ 0x00000000, /* VS.INST_MEM[65] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[66] := 0x0 */
+ 0x00000038, /* VS.INST_MEM[67] := 0x38 */
+ 0x03801003, /* VS.INST_MEM[68] := 0x3801003 */
+ 0x29000800, /* VS.INST_MEM[69] := 0x29000800 */
+ 0x014801c0, /* VS.INST_MEM[70] := 0x14801c0 */
+ 0x00000000, /* VS.INST_MEM[71] := 0x0 */
+ 0x00801005, /* VS.INST_MEM[72] := 0x801005 */
+ 0x29001800, /* VS.INST_MEM[73] := 0x29001800 */
+ 0x01480040, /* VS.INST_MEM[74] := 0x1480040 */
+ 0x00000000, /* VS.INST_MEM[75] := 0x0 */
+ 0x0380108f, /* VS.INST_MEM[76] := 0x380108f */
+ 0x3fc06800, /* VS.INST_MEM[77] := 0x3fc06800 */
+ 0x00000050, /* VS.INST_MEM[78] := 0x50 */
+ 0x203fc068, /* VS.INST_MEM[79] := 0x203fc068 */
+ 0x04001009, /* VS.INST_MEM[80] := 0x4001009 */
+ 0x00000000, /* VS.INST_MEM[81] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[82] := 0x0 */
+ 0x200000b8, /* VS.INST_MEM[83] := 0x200000b8 */
+ 0x01811009, /* VS.INST_MEM[84] := 0x1811009 */
+ 0x00000000, /* VS.INST_MEM[85] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[86] := 0x0 */
+ 0x00150028, /* VS.INST_MEM[87] := 0x150028 */
+ 0x02041001, /* VS.INST_MEM[88] := 0x2041001 */
+ 0x2a804800, /* VS.INST_MEM[89] := 0x2a804800 */
+ 0x00000000, /* VS.INST_MEM[90] := 0x0 */
+ 0x003fc048, /* VS.INST_MEM[91] := 0x3fc048 */
+ 0x02041003, /* VS.INST_MEM[92] := 0x2041003 */
+ 0x2a804800, /* VS.INST_MEM[93] := 0x2a804800 */
+ 0x00aa05c0, /* VS.INST_MEM[94] := 0xaa05c0 */
+ 0x00000002, /* VS.INST_MEM[95] := 0x2 */
+ 0x24183088, /* PAD */
+ 0x08010380, /* LOAD_STATE (1) Base: 0x00E00 Size: 1 Fixp: 0 */
+ 0x00000003, /* RA.CONTROL := 0x3 */
+ 0x08020400, /* LOAD_STATE (1) Base: 0x01000 Size: 2 Fixp: 0 */
+ 0x00000003, /* PS.END_PC := 0x3 */
+ 0x00000001, /* PS.OUTPUT_REG := 0x1 */
+ 0x00000005, /* PAD */
+ 0x08010406, /* LOAD_STATE (1) Base: 0x01018 Size: 1 Fixp: 0 */
+ 0x00000000, /* PS.START_PC := 0x0 */
+ 0x08020290, /* LOAD_STATE (1) Base: 0x00A40 Size: 2 Fixp: 0 */
+ 0x00000200, /* PA.SHADER_ATTRIBUTES[0] := 0x200 */
+ 0x00000200, /* PA.SHADER_ATTRIBUTES[1] := 0x200 */
+ 0x00000002, /* PAD */
+ 0x08010e08, /* LOAD_STATE (1) Base: 0x03820 Size: 1 Fixp: 0 */
+ 0x00000024, /* GLOBAL.PS_VARYING_NUM_COMPONENTS := VAR0=0x4,VAR1=0x2,VAR2=0x0,VAR3=0x0,VAR4=0x0,VAR5=0x0,VAR6=0x0,VAR7=0x0 */
+ 0x08020e0a, /* LOAD_STATE (1) Base: 0x03828 Size: 2 Fixp: 0 */
+ 0x00000555, /* GLOBAL.PS_VARYING_COMPONENT_USE[0] := COMP0=USED,COMP1=USED,COMP2=USED,COMP3=USED,COMP4=USED,COMP5=USED,COMP6=UNUSED,COMP7=UNUSED,COMP8=UNUSED,COMP9=UNUSED,COMP10=UNUSED,COMP11=UNUSED,COMP12=UNUSED,COMP13=UNUSED,COMP14=UNUSED,COMP15=UNUSED */
+ 0x00000000, /* GLOBAL.PS_VARYING_COMPONENT_USE[1] := COMP0=UNUSED,COMP1=UNUSED,COMP2=UNUSED,COMP3=UNUSED,COMP4=UNUSED,COMP5=UNUSED,COMP6=UNUSED,COMP7=UNUSED,COMP8=UNUSED,COMP9=UNUSED,COMP10=UNUSED,COMP11=UNUSED,COMP12=UNUSED,COMP13=UNUSED,COMP14=UNUSED,COMP15=UNUSED */
+ 0x00000004, /* PAD */
+ 0x08011c00, /* LOAD_STATE (1) Base: 0x07000 Size: 1 Fixp: 0 */
+ 0x40400000, /* PS.UNIFORMS[0] := 3.000000 */
+ 0x080c1800, /* LOAD_STATE (1) Base: 0x06000 Size: 12 Fixp: 0 */
+ 0x07811003, /* PS.INST_MEM[0] := 0x7811003 */
+ 0x00000800, /* PS.INST_MEM[1] := 0x800 */
+ 0x01c800d0, /* PS.INST_MEM[2] := 0x1c800d0 */
+ 0x00000000, /* PS.INST_MEM[3] := 0x0 */
+ 0x07821018, /* PS.INST_MEM[4] := 0x7821018 */
+ 0x15002f20, /* PS.INST_MEM[5] := 0x15002f20 */
+ 0x00000000, /* PS.INST_MEM[6] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[7] := 0x0 */
+ 0x07811003, /* PS.INST_MEM[8] := 0x7811003 */
+ 0x39001800, /* PS.INST_MEM[9] := 0x39001800 */
+ 0x01c80140, /* PS.INST_MEM[10] := 0x1c80140 */
+ 0x00000000, /* PS.INST_MEM[11] := 0x0 */
+ 0x24183088, /* PAD */
+ 0x08010402, /* LOAD_STATE (1) Base: 0x01008 Size: 1 Fixp: 0 */
+ 0x00001f03, /* PS.INPUT_COUNT := COUNT=3,COUNT2=31 */
+ 0x08010403, /* LOAD_STATE (1) Base: 0x0100C Size: 1 Fixp: 0 */
+ 0x00000003, /* PS.TEMP_REGISTER_CONTROL := NUM_TEMPS=3 */
+ 0x08010404, /* LOAD_STATE (1) Base: 0x01010 Size: 1 Fixp: 0 */
+ 0x00000002, /* PS.CONTROL := UNK0=0,UNK1=1 */
+ 0x0801028c, /* LOAD_STATE (1) Base: 0x00A30 Size: 1 Fixp: 0 */
+ 0x00000200, /* PA.ATTRIBUTE_ELEMENT_COUNT := 0x200 */
+ 0x08010e07, /* LOAD_STATE (1) Base: 0x0381C Size: 1 Fixp: 0 */
+ 0x00000006, /* GLOBAL.VS_VARYING_NUM_COMPONENTS := VAR0=0x6,VAR1=0x0,VAR2=0x0,VAR3=0x0,VAR4=0x0,VAR5=0x0,VAR6=0x0,VAR7=0x0 */
+ 0x0801020c, /* LOAD_STATE (1) Base: 0x00830 Size: 1 Fixp: 0 */
+ 0x0f3f0542, /* VS.LOAD_BALANCING := 0xf3f0542 */
+ 0x08010201, /* LOAD_STATE (1) Base: 0x00804 Size: 1 Fixp: 0 */
+ 0x00000003, /* VS.OUTPUT_COUNT := 0x3 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xfffffff3, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=0,POINT_SIZE_MASK=0,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK22=1,UNK22_MASK=1(residue:ff380000) */
+ 0x08101400, /* LOAD_STATE (1) Base: 0x05000 Size: 16 Fixp: 0 */
+ 0x3f3573de, /* VS.UNIFORMS[0] := 0.708799 */
+ 0x3f2084da, /* VS.UNIFORMS[1] := 0.627027 */
+ 0xbf959d57, /* VS.UNIFORMS[2] := -1.168864 */
+ 0xbe959d57, /* VS.UNIFORMS[3] := -0.292216 */
+ 0x3dfff5c0, /* VS.UNIFORMS[4] := 0.124980 */
+ 0x3faa1052, /* VS.UNIFORMS[5] := 1.328623 */
+ 0x3f943d7b, /* VS.UNIFORMS[6] := 1.158126 */
+ 0x3e943d7b, /* VS.UNIFORMS[7] := 0.289532 */
+ 0xbf384077, /* VS.UNIFORMS[8] := -0.719734 */
+ 0x3f592491, /* VS.UNIFORMS[9] := 0.848214 */
+ 0xbf733332, /* VS.UNIFORMS[10] := -0.950000 */
+ 0xbe733332, /* VS.UNIFORMS[11] := -0.237500 */
+ 0x00000000, /* VS.UNIFORMS[12] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[13] := 0.000000 */
+ 0x40000000, /* VS.UNIFORMS[14] := 2.000000 */
+ 0x41000000, /* VS.UNIFORMS[15] := 8.000000 */
+ 0x24183088, /* PAD */
+ 0x08031410, /* LOAD_STATE (1) Base: 0x05040 Size: 3 Fixp: 0 */
+ 0x3ea95b14, /* VS.UNIFORMS[16] := 0.330773 */
+ 0x3e33c7ff, /* VS.UNIFORMS[17] := 0.175568 */
+ 0x3e959d57, /* VS.UNIFORMS[18] := 0.292216 */
+ 0x08031414, /* LOAD_STATE (1) Base: 0x05050 Size: 3 Fixp: 0 */
+ 0x3d6ee55e, /* VS.UNIFORMS[20] := 0.058324 */
+ 0x3ebe78ae, /* VS.UNIFORMS[21] := 0.372014 */
+ 0xbe943d7b, /* VS.UNIFORMS[22] := -0.289532 */
+ 0x08031418, /* LOAD_STATE (1) Base: 0x05060 Size: 3 Fixp: 0 */
+ 0xbeabf7e7, /* VS.UNIFORMS[24] := -0.335876 */
+ 0x3e733332, /* VS.UNIFORMS[25] := 0.237500 */
+ 0x3e733332, /* VS.UNIFORMS[26] := 0.237500 */
+ 0x0810141c, /* LOAD_STATE (1) Base: 0x05070 Size: 16 Fixp: 0 */
+ 0x3ea95b14, /* VS.UNIFORMS[28] := 0.330773 */
+ 0x3e33c7ff, /* VS.UNIFORMS[29] := 0.175568 */
+ 0x3e959d57, /* VS.UNIFORMS[30] := 0.292216 */
+ 0x00000000, /* VS.UNIFORMS[31] := 0.000000 */
+ 0x3d6ee55e, /* VS.UNIFORMS[32] := 0.058324 */
+ 0x3ebe78ae, /* VS.UNIFORMS[33] := 0.372014 */
+ 0xbe943d7b, /* VS.UNIFORMS[34] := -0.289532 */
+ 0x00000000, /* VS.UNIFORMS[35] := 0.000000 */
+ 0xbeabf7e7, /* VS.UNIFORMS[36] := -0.335876 */
+ 0x3e733332, /* VS.UNIFORMS[37] := 0.237500 */
+ 0x3e733332, /* VS.UNIFORMS[38] := 0.237500 */
+ 0x00000000, /* VS.UNIFORMS[39] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[40] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[41] := 0.000000 */
+ 0xc1000000, /* VS.UNIFORMS[42] := -8.000000 */
+ 0x3f800000, /* VS.UNIFORMS[43] := 1.000000 */
+ 0x0c003008, /* PAD */
+ 0x08010193, /* LOAD_STATE (1) Base: 0x0064C Size: 1 Fixp: 0 */
+ 0x7c2b5d80, /* FE.VERTEX_STREAM_BASE_ADDR := ADDR_I */
+ 0x08010194, /* LOAD_STATE (1) Base: 0x00650 Size: 1 Fixp: 0 */
+ 0x00000020, /* FE.VERTEX_STREAM_CONTROL := VERTEX_STRIDE=0x20 */
+ 0x08010180, /* LOAD_STATE (1) Base: 0x00600 Size: 1 Fixp: 0 */
+ 0x0c003008, /* FE.VERTEX_ELEMENT_CONFIG[0] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x08010181, /* LOAD_STATE (1) Base: 0x00604 Size: 1 Fixp: 0 */
+ 0x180c3008, /* FE.VERTEX_ELEMENT_CONFIG[1] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0xc,END=0x18 */
+ 0x08010182, /* LOAD_STATE (1) Base: 0x00608 Size: 1 Fixp: 0 */
+ 0x20182088, /* FE.VERTEX_ELEMENT_CONFIG[2] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x0,NUM=2,NORMALIZE=OFF,START=0x18,END=0x20 */
+ 0x08010208, /* LOAD_STATE (1) Base: 0x00820 Size: 1 Fixp: 0 */
+ 0x00020100, /* VS.INPUT[0] := 0x20100 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xffffffcf, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=0,POINT_SPRITE_MASK=0,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK22=1,UNK22_MASK=1(residue:ff380000) */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000705, /* GLOBAL.SEMAPHORE_TOKEN := FROM=RA,TO=PE */
+ 0x08010f00, /* LOAD_STATE (1) Base: 0x03C00 Size: 1 Fixp: 0 */
+ 0x00000705, /* GLOBAL.STALL_TOKEN := FROM=RA,TO=PE,FLIP0=0,FLIP1=0 */
+ 0x28000000, /* DRAW_PRIMITIVES (5) */
+ 0x00000004, /* */
+ 0x00000000, /* */
+ 0x00000fd4, /* */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003 /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+};
+#if 0
+Grouped GPU addresses {
+ cmdbuf[0x3b] = ADDR_H; /* 0x7d38d440 */
+ cmdbuf[0x125] = ADDR_I; /* 0x7c2b5d80 */
+}
+#endif
+
+uint32_t cmdbuf3[] = { /* seq 103 */
+ 0x08010e03, /* PAD */
+ 0x00000003, /* PAD */
+ 0x08010e03, /* PAD */
+ 0x00000003, /* PAD */
+ 0x08010581, /* PAD */
+ 0x00004585, /* PAD */
+ 0x08010583, /* PAD */
+ 0x80001c00, /* PAD */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004585, /* RS.CONFIG := SOURCE_FORMAT=X8R8G8B8,UNK7=1,DEST_FORMAT=X8R8G8B8,UNK14=1,SWAP_RB=0,FLIP=0 */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x80003400, /* RS.SOURCE_STRIDE := STRIDE=0x3400,TILING=1 */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x80003400, /* RS.DEST_STRIDE := STRIDE=0x3400,TILING=1 */
+ 0x0801058c, /* LOAD_STATE (1) Base: 0x01630 Size: 1 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[0] := 0xffffffff */
+ 0x0801058d, /* LOAD_STATE (1) Base: 0x01634 Size: 1 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[1] := 0xffffffff */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* RS.SOURCE_ADDR := ADDR_A */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* RS.DEST_ADDR := ADDR_A */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x02000340, /* RS.WINDOW_SIZE := HEIGHT=512,WIDTH=832 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb /* RS.KICKER := 0xbeebbeeb */
+};
+#if 0
+Grouped GPU addresses {
+ cmdbuf[0x1d] = cmdbuf[0x1f] = ADDR_A; /* 0x7f2c8700 */
+}
+#endif
+
+uint32_t cmdbuf4[] = { /* seq 105 */
+ 0x08010597, /* PAD */
+ 0x7f284000, /* PAD */
+ 0x08010594, /* PAD */
+ 0x00000001, /* PAD */
+ 0x08010581, /* PAD */
+ 0x00004486, /* PAD */
+ 0x08010582, /* PAD */
+ 0x7f284000, /* PAD */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a002a00, /* TS.COLOR_STATUS_BASE := ADDR_G */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f284000, /* TS.COLOR_SURFACE_BASE := ADDR_F */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004486, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=1,DEST_FORMAT=R5G6B5,UNK14=1,SWAP_RB=0,FLIP=0 */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.SOURCE_ADDR := ADDR_F */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.SOURCE_STRIDE := STRIDE=0x400,TILING=0 */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.DEST_ADDR := ADDR_F */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.DEST_STRIDE := STRIDE=0x400,TILING=0 */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00040010, /* RS.WINDOW_SIZE := HEIGHT=4,WIDTH=16 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb, /* RS.KICKER := 0xbeebbeeb */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a005900, /* TS.COLOR_STATUS_BASE := ADDR_B */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := ADDR_A */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* GLOBAL.FLUSH_CACHE := DEPTH=0,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x00000049, /* TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=0,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=0,DEPTH_COMPRESSION=1 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* GLOBAL.FLUSH_CACHE := DEPTH=0,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801050b, /* LOAD_STATE (1) Base: 0x0142C Size: 1 Fixp: 0 */
+ 0xfffcffff /* PE.COLOR_FORMAT := FORMAT=0xf,FORMAT_MASK=1,COMPONENTS=R=1,G=1,B=1,A=1,COMPONENTS_MASK=1,UNK16=0,UNK16_MASK=0(residue:fffce0e0) */
+};
+#if 0
+Grouped GPU addresses {
+ cmdbuf[0x9] = ADDR_G; /* 0x7a002a00 */
+ cmdbuf[0xb] = cmdbuf[0x11] = cmdbuf[0x15] = ADDR_F; /* 0x7f284000 */
+ cmdbuf[0x21] = ADDR_A; /* 0x7f2c8700 */
+ cmdbuf[0x1f] = ADDR_B; /* 0x7a005900 */
+}
+#endif
+
+uint32_t cmdbuf5[] = { /* seq 115 */
+ 0x08010581, /* PAD */
+ 0x00000585, /* PAD */
+ 0x08010583, /* PAD */
+ 0x80001c00, /* PAD */
+ 0x08010585, /* PAD */
+ 0x00000640, /* PAD */
+ 0x0801058c, /* PAD */
+ 0xffffffff, /* PAD */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00000585, /* RS.CONFIG := SOURCE_FORMAT=X8R8G8B8,UNK7=1,DEST_FORMAT=X8R8G8B8,UNK14=0,SWAP_RB=0,FLIP=0 */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x80003400, /* RS.SOURCE_STRIDE := STRIDE=0x3400,TILING=1 */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000c80, /* RS.DEST_STRIDE := STRIDE=0xc80,TILING=0 */
+ 0x0801058c, /* LOAD_STATE (1) Base: 0x01630 Size: 1 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[0] := 0xffffffff */
+ 0x0801058d, /* LOAD_STATE (1) Base: 0x01634 Size: 1 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[1] := 0xffffffff */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* RS.SOURCE_ADDR := ADDR_A */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7fc20000, /* RS.DEST_ADDR := ADDR_J */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x01e00320, /* RS.WINDOW_SIZE := HEIGHT=480,WIDTH=800 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb /* RS.KICKER := 0xbeebbeeb */
+};
+
+#if 0
+Grouped GPU addresses {
+ cmdbuf[0x19] = ADDR_A; /* 0x7f2c8700 */
+ cmdbuf[0x1b] = ADDR_J; /* 0x7fc20000 */
+}
+#endif
+
diff --git a/src/replay/companion_cmd_gc2000.h b/src/replay/companion_cmd_gc2000.h
new file mode 100644
index 0000000..096da72
--- /dev/null
+++ b/src/replay/companion_cmd_gc2000.h
@@ -0,0 +1,803 @@
+uint32_t cmdbuf1[] = { /* seq 85 */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x08010e05, /* LOAD_STATE (1) Base: 0x03814 Size: 1 Fixp: 0 */
+ 0x00000001, /* [03814] GL.VERTEX_ELEMENT_CONFIG := 0x1 */
+ 0x08010380, /* LOAD_STATE (1) Base: 0x00E00 Size: 1 Fixp: 0 */
+ 0x00000001, /* [00E00] RA.CONTROL := UNK0=1,LAST_VARYING_2X=0 */
+ 0x0801028b, /* LOAD_STATE (1) Base: 0x00A2C Size: 1 Fixp: 0 */
+ 0x34000001, /* [00A2C] PA.W_CLIP_LIMIT := 0x34000001 */
+ 0x0801028a, /* LOAD_STATE (1) Base: 0x00A28 Size: 1 Fixp: 0 */
+ 0x00000011, /* [00A28] PA.SYSTEM_MODE := UNK0=1,UNK4=1 */
+ 0x08010e13, /* LOAD_STATE (1) Base: 0x0384C Size: 1 Fixp: 0 */
+ 0x00000000, /* [0384C] GL.API_MODE := OPENGL */
+ 0x08010306, /* LOAD_STATE (1) Base: 0x00C18 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C18] SE.CONFIG := LAST_PIXEL_ENABLE=0 */
+ 0x08010304, /* LOAD_STATE (1) Base: 0x00C10 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C10] SE.DEPTH_SCALE := 0.000000 */
+ 0x08010305, /* LOAD_STATE (1) Base: 0x00C14 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C14] SE.DEPTH_BIAS := 0.000000 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* [0380C] GL.FLUSH_CACHE := DEPTH=0,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801ffff, /* LOAD_STATE (1) Base: 0x3FFFC Size: 1 Fixp: 0 */
+ 0x00000000, /* [3FFFC] DUMMY.DUMMY := 0x0 */
+ 0x0801059d, /* LOAD_STATE (1) Base: 0x01674 Size: 1 Fixp: 0 */
+ 0x00006ac0, /* [01674] TS.DEPTH_AUTO_DISABLE_COUNT := 0x6ac0 */
+ 0x08030596, /* LOAD_STATE (1) Base: 0x01658 Size: 3 Fixp: 0 */
+ 0x15aab000, /* [01658] TS.COLOR_STATUS_BASE := ADDR_H */
+ 0x15900000, /* [0165C] TS.COLOR_SURFACE_BASE := ADDR_G */
+ 0x00000000, /* [01660] TS.COLOR_CLEAR_VALUE := 0x0 */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x00000022, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=0,COLOR_FAST_CLEAR=1,DEPTH_16BPP=0,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=1,DEPTH_COMPRESSION=0,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000001, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=0,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801ffff, /* LOAD_STATE (1) Base: 0x3FFFC Size: 1 Fixp: 0 */
+ 0x00000000, /* [3FFFC] DUMMY.DUMMY := 0x0 */
+ 0x08030599, /* LOAD_STATE (1) Base: 0x01664 Size: 3 Fixp: 0 */
+ 0x15aacb00, /* [01664] TS.DEPTH_STATUS_BASE := ADDR_J */
+ 0x15ab5000, /* [01668] TS.DEPTH_SURFACE_BASE := ADDR_I */
+ 0xffffffff, /* [0166C] TS.DEPTH_CLEAR_VALUE := 0xffffffff */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x0000006b, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=1,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=1,DEPTH_COMPRESSION=1,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08010304, /* LOAD_STATE (1) Base: 0x00C10 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C10] SE.DEPTH_SCALE := 0.000000 */
+ 0x08010305, /* LOAD_STATE (1) Base: 0x00C14 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C14] SE.DEPTH_BIAS := 0.000000 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01650] RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01650] RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000705, /* [03808] GL.SEMAPHORE_TOKEN := FROM=RA,TO=PE */
+ 0x08010f00, /* LOAD_STATE (1) Base: 0x03C00 Size: 1 Fixp: 0 */
+ 0x00000705, /* [03C00] GL.STALL_TOKEN := FROM=RA,TO=PE,FLIP0=0,FLIP1=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00000606, /* [01604] RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,DOWNSAMPLE_X=0,DOWNSAMPLE_Y=0,SOURCE_TILED=0,DEST_FORMAT=A8R8G8B8,DEST_TILED=0,SWAP_RB=0,FLIP=0 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* [01630] RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* [01634] RS.DITHER[1] := 0xffffffff */
+ 0x00000705, /* PAD */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x15aab000, /* [01610] RS.DEST_ADDR := ADDR_H */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000040, /* [01614] RS.DEST_STRIDE := STRIDE=0x40,MULTI=0,TILING=0 */
+ 0x08010590, /* LOAD_STATE (1) Base: 0x01640 Size: 1 Fixp: 0 */
+ 0x55555555, /* [01640] RS.FILL_VALUE[0] := 0x55555555 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x0001ffff, /* [0163C] RS.CLEAR_CONTROL := BITS=0xffff,MODE=ENABLED1 */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* [016A0] RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x006c0010, /* [01620] RS.WINDOW_SIZE := HEIGHT=108,WIDTH=16 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbadabeeb, /* [01600] RS.KICKER := 0xbadabeeb */
+ 0x08010598, /* LOAD_STATE (1) Base: 0x01660 Size: 1 Fixp: 0 */
+ 0xff7f7f7f, /* [01660] TS.COLOR_CLEAR_VALUE := 0xff7f7f7f */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* [0380C] GL.FLUSH_CACHE := DEPTH=0,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801ffff, /* LOAD_STATE (1) Base: 0x3FFFC Size: 1 Fixp: 0 */
+ 0x00000000, /* [3FFFC] DUMMY.DUMMY := 0x0 */
+ 0x0801059d, /* LOAD_STATE (1) Base: 0x01674 Size: 1 Fixp: 0 */
+ 0x00006ac0, /* [01674] TS.DEPTH_AUTO_DISABLE_COUNT := 0x6ac0 */
+ 0x08030596, /* LOAD_STATE (1) Base: 0x01658 Size: 3 Fixp: 0 */
+ 0x15aab000, /* [01658] TS.COLOR_STATUS_BASE := ADDR_H */
+ 0x15900000, /* [0165C] TS.COLOR_SURFACE_BASE := ADDR_G */
+ 0xff7f7f7f, /* [01660] TS.COLOR_CLEAR_VALUE := 0xff7f7f7f */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x0000006b, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=1,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=1,DEPTH_COMPRESSION=1,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01650] RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01650] RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000705, /* [03808] GL.SEMAPHORE_TOKEN := FROM=RA,TO=PE */
+ 0x08010f00, /* LOAD_STATE (1) Base: 0x03C00 Size: 1 Fixp: 0 */
+ 0x00000705, /* [03C00] GL.STALL_TOKEN := FROM=RA,TO=PE,FLIP0=0,FLIP1=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00000606, /* [01604] RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,DOWNSAMPLE_X=0,DOWNSAMPLE_Y=0,SOURCE_TILED=0,DEST_FORMAT=A8R8G8B8,DEST_TILED=0,SWAP_RB=0,FLIP=0 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* [01630] RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* [01634] RS.DITHER[1] := 0xffffffff */
+ 0xffffffff, /* PAD */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x15aacb00, /* [01610] RS.DEST_ADDR := ADDR_J */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000080, /* [01614] RS.DEST_STRIDE := STRIDE=0x80,MULTI=0,TILING=0 */
+ 0x08010590, /* LOAD_STATE (1) Base: 0x01640 Size: 1 Fixp: 0 */
+ 0x55555555, /* [01640] RS.FILL_VALUE[0] := 0x55555555 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x0001ffff, /* [0163C] RS.CLEAR_CONTROL := BITS=0xffff,MODE=ENABLED1 */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* [016A0] RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x001c0020, /* [01620] RS.WINDOW_SIZE := HEIGHT=28,WIDTH=32 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbadabeeb, /* [01600] RS.KICKER := 0xbadabeeb */
+ 0x0801059b, /* LOAD_STATE (1) Base: 0x0166C Size: 1 Fixp: 0 */
+ 0xffffffff, /* [0166C] TS.DEPTH_CLEAR_VALUE := 0xffffffff */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000001, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=0,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801ffff, /* LOAD_STATE (1) Base: 0x3FFFC Size: 1 Fixp: 0 */
+ 0x00000000, /* [3FFFC] DUMMY.DUMMY := 0x0 */
+ 0x08030599, /* LOAD_STATE (1) Base: 0x01664 Size: 3 Fixp: 0 */
+ 0x15aacb00, /* [01664] TS.DEPTH_STATUS_BASE := ADDR_J */
+ 0x15ab5000, /* [01668] TS.DEPTH_SURFACE_BASE := ADDR_I */
+ 0xffffffff, /* [0166C] TS.DEPTH_CLEAR_VALUE := 0xffffffff */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x0000006b, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=1,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=1,DEPTH_COMPRESSION=1,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01650] RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x00000000, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=0,COLOR_FAST_CLEAR=0,DEPTH_16BPP=0,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=0,DEPTH_COMPRESSION=0,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x000045e5, /* [01604] RS.CONFIG := SOURCE_FORMAT=X8R8G8B8,DOWNSAMPLE_X=1,DOWNSAMPLE_Y=1,SOURCE_TILED=1,DEST_FORMAT=X8R8G8B8,DEST_TILED=1,SWAP_RB=0,FLIP=0 */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x00002000, /* [0160C] RS.SOURCE_STRIDE := STRIDE=0x2000,MULTI=0,TILING=0 */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00001000, /* [01614] RS.DEST_STRIDE := STRIDE=0x1000,MULTI=0,TILING=0 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* [01630] RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* [01634] RS.DITHER[1] := 0xffffffff */
+ 0x00000000, /* PAD */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* [0163C] RS.CLEAR_CONTROL := BITS=0x0,MODE=DISABLED */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* [016A0] RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x15cfd000, /* [01608] RS.SOURCE_ADDR := ADDR_L */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x15dfd000, /* [01610] RS.DEST_ADDR := ADDR_M */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x02000200, /* [01620] RS.WINDOW_SIZE := HEIGHT=512,WIDTH=512 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbadabeeb /* [01600] RS.KICKER := 0xbadabeeb */
+};
+#if 0
+ Grouped GPU addresses {
+ cmdbuf[0x57] = cmdbuf[0x67] = cmdbuf[0x9f] = cmdbuf[0xbb] = cmdbuf[0xd9] = cmdbuf[0xfb] = cmdbuf[0x119] = cmdbuf[0x135] = cmdbuf[0x153] = ADDR_A; /* 0x7f2c8700 */
+ cmdbuf[0x65] = cmdbuf[0x9d] = cmdbuf[0xb9] = cmdbuf[0xd7] = cmdbuf[0xe5] = cmdbuf[0xf9] = cmdbuf[0x117] = cmdbuf[0x133] = cmdbuf[0x151] = ADDR_B; /* 0x7a005900 */
+ cmdbuf[0x89] = cmdbuf[0x8f] = cmdbuf[0x93] = cmdbuf[0xa5] = cmdbuf[0xab] = cmdbuf[0xaf] = cmdbuf[0xc3] = cmdbuf[0xc9] = cmdbuf[0xcd] = cmdbuf[0x103] = cmdbuf[0x109] = cmdbuf[0x10d] = cmdbuf[0x11f] = cmdbuf[0x125] = cmdbuf[0x129] = cmdbuf[0x13d] = cmdbuf[0x143] = cmdbuf[0x147] = ADDR_F; /* 0x7f284000 */
+ cmdbuf[0x7d] = cmdbuf[0x15f] = cmdbuf[0x173] = ADDR_D; /* 0x7a003200 */
+ cmdbuf[0x87] = cmdbuf[0xa3] = cmdbuf[0xc1] = cmdbuf[0x101] = cmdbuf[0x11d] = cmdbuf[0x13b] = ADDR_G; /* 0x7a002a00 */
+ cmdbuf[0x6d] = cmdbuf[0x7f] = cmdbuf[0x175] = ADDR_C; /* 0x7e6a0000 */
+ }
+#endif
+
+uint32_t cmdbuf2[] = { /* seq 101 */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x0000006b, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=1,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=1,DEPTH_COMPRESSION=1,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01650] RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x00000000, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=0,COLOR_FAST_CLEAR=0,DEPTH_16BPP=0,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=0,DEPTH_COMPRESSION=0,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x000045e5, /* [01604] RS.CONFIG := SOURCE_FORMAT=X8R8G8B8,DOWNSAMPLE_X=1,DOWNSAMPLE_Y=1,SOURCE_TILED=1,DEST_FORMAT=X8R8G8B8,DEST_TILED=1,SWAP_RB=0,FLIP=0 */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x00001000, /* [0160C] RS.SOURCE_STRIDE := STRIDE=0x1000,MULTI=0,TILING=0 */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000800, /* [01614] RS.DEST_STRIDE := STRIDE=0x800,MULTI=0,TILING=0 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* [01630] RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* [01634] RS.DITHER[1] := 0xffffffff */
+ 0x00000000, /* PAD */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* [0163C] RS.CLEAR_CONTROL := BITS=0x0,MODE=DISABLED */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* [016A0] RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x15dfd000, /* [01608] RS.SOURCE_ADDR := ADDR_M */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x15e3d000, /* [01610] RS.DEST_ADDR := ADDR_N */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x01000100, /* [01620] RS.WINDOW_SIZE := HEIGHT=256,WIDTH=256 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbadabeeb /* [01600] RS.KICKER := 0xbadabeeb */
+};
+#if 0
+Grouped GPU addresses {
+ 33 - stride src
+ 35 - stride dst
+ 39 - pad but allways different - garbage?
+ 45 - source addr
+ 47 - dest addr
+ 49 - height width
+}
+#endif
+
+uint32_t cmdbuf3[] = {
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x0000006b /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=1,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=1,DEPTH_COMPRESSION=1,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+};
+
+uint32_t cmdbuf4[] = { /* seq 103 */
+ 0x08010584, /* PAD */
+ 0x1523a000, /* PAD */
+ 0x08010588, /* PAD */
+ 0x00f00190, /* PAD */
+ 0x08010580, /* PAD */
+ 0xbeebbeeb, /* PAD */
+ 0x40000006, /* PAD */
+ 0x14880010, /* PAD */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08101400, /* LOAD_STATE (1) Base: 0x05000 Size: 16 Fixp: 0 */
+ 0x3f3573de, /* [05000] VS.UNIFORMS[0] := 0.708799 (u0.x) */
+ 0x3f2084dd, /* [05004] VS.UNIFORMS[1] := 0.627027 (u0.y) */
+ 0xbf7e5849, /* [05008] VS.UNIFORMS[2] := -0.993535 (u0.z) */
+ 0xbe959d58, /* [0500C] VS.UNIFORMS[3] := -0.292216 (u0.w) */
+ 0x3dfff5c0, /* [05010] VS.UNIFORMS[4] := 0.124980 (u1.x) */
+ 0x3faa1052, /* [05014] VS.UNIFORMS[5] := 1.328623 (u1.y) */
+ 0x3f7c0220, /* [05018] VS.UNIFORMS[6] := 0.984407 (u1.z) */
+ 0x3e943d7c, /* [0501C] VS.UNIFORMS[7] := 0.289532 (u1.w) */
+ 0xbf384078, /* [05020] VS.UNIFORMS[8] := -0.719734 (u2.x) */
+ 0x3f592492, /* [05024] VS.UNIFORMS[9] := 0.848214 (u2.y) */
+ 0xbf4eb851, /* [05028] VS.UNIFORMS[10] := -0.807500 (u2.z) */
+ 0xbe733332, /* [0502C] VS.UNIFORMS[11] := -0.237500 (u2.w) */
+ 0x00000000, /* [05030] VS.UNIFORMS[12] := 0.000000 (u3.x) */
+ 0x00000000, /* [05034] VS.UNIFORMS[13] := 0.000000 (u3.y) */
+ 0x3f4ccce0, /* [05038] VS.UNIFORMS[14] := 0.800001 (u3.z) */
+ 0x41000000, /* [0503C] VS.UNIFORMS[15] := 8.000000 (u3.w) */
+ 0x00000000, /* PAD */
+ 0x08031410, /* LOAD_STATE (1) Base: 0x05040 Size: 3 Fixp: 0 */
+ 0x3ea95b14, /* [05040] VS.UNIFORMS[16] := 0.330773 (u4.x) */
+ 0x3e33c802, /* [05044] VS.UNIFORMS[17] := 0.175568 (u4.y) */
+ 0x3e959d58, /* [05048] VS.UNIFORMS[18] := 0.292216 (u4.z) */
+ 0x08031414, /* LOAD_STATE (1) Base: 0x05050 Size: 3 Fixp: 0 */
+ 0x3d6ee55e, /* [05050] VS.UNIFORMS[20] := 0.058324 (u5.x) */
+ 0x3ebe78ae, /* [05054] VS.UNIFORMS[21] := 0.372014 (u5.y) */
+ 0xbe943d7c, /* [05058] VS.UNIFORMS[22] := -0.289532 (u5.z) */
+ 0x08031418, /* LOAD_STATE (1) Base: 0x05060 Size: 3 Fixp: 0 */
+ 0xbeabf7e8, /* [05060] VS.UNIFORMS[24] := -0.335876 (u6.x) */
+ 0x3e733333, /* [05064] VS.UNIFORMS[25] := 0.237500 (u6.y) */
+ 0x3e733332, /* [05068] VS.UNIFORMS[26] := 0.237500 (u6.z) */
+ 0x0810141c, /* LOAD_STATE (1) Base: 0x05070 Size: 16 Fixp: 0 */
+ 0x3ea95b14, /* [05070] VS.UNIFORMS[28] := 0.330773 (u7.x) */
+ 0x3e33c802, /* [05074] VS.UNIFORMS[29] := 0.175568 (u7.y) */
+ 0x3e959d58, /* [05078] VS.UNIFORMS[30] := 0.292216 (u7.z) */
+ 0x00000000, /* [0507C] VS.UNIFORMS[31] := 0.000000 (u7.w) */
+ 0x3d6ee55e, /* [05080] VS.UNIFORMS[32] := 0.058324 (u8.x) */
+ 0x3ebe78ae, /* [05084] VS.UNIFORMS[33] := 0.372014 (u8.y) */
+ 0xbe943d7c, /* [05088] VS.UNIFORMS[34] := -0.289532 (u8.z) */
+ 0x00000000, /* [0508C] VS.UNIFORMS[35] := 0.000000 (u8.w) */
+ 0xbeabf7e8, /* [05090] VS.UNIFORMS[36] := -0.335876 (u9.x) */
+ 0x3e733333, /* [05094] VS.UNIFORMS[37] := 0.237500 (u9.y) */
+ 0x3e733332, /* [05098] VS.UNIFORMS[38] := 0.237500 (u9.z) */
+ 0x00000000, /* [0509C] VS.UNIFORMS[39] := 0.000000 (u9.w) */
+ 0x00000000, /* [050A0] VS.UNIFORMS[40] := 0.000000 (u10.x) */
+ 0x00000000, /* [050A4] VS.UNIFORMS[41] := 0.000000 (u10.y) */
+ 0xc1000000, /* [050A8] VS.UNIFORMS[42] := -8.000000 (u10.z) */
+ 0x3f800000, /* [050AC] VS.UNIFORMS[43] := 1.000000 (u10.w) */
+ 0x00000000, /* PAD */
+ 0x08030180, /* LOAD_STATE (1) Base: 0x00600 Size: 3 Fixp: 0 */
+ 0x0c003088, /* [00600] FE.VERTEX_ELEMENT_CONFIG[0] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x0,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x0c003188, /* [00604] FE.VERTEX_ELEMENT_CONFIG[1] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x1,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x08002288, /* [00608] FE.VERTEX_ELEMENT_CONFIG[2] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x2,NUM=0x2,NORMALIZE=OFF,START=0x0,END=0x8 */
+ 0x08010208, /* LOAD_STATE (1) Base: 0x00820 Size: 1 Fixp: 0 */
+ 0x00020100, /* [00820] VS.INPUT[0] := I0=0,I1=1,I2=2,I3=0 */
+ 0x080301a0, /* LOAD_STATE (1) Base: 0x00680 Size: 3 Fixp: 0 */
+ 0x15000000, /* [00680] FE.VERTEX_STREAMS[0].BASE_ADDR := ADDR_A */
+ 0x150239d0, /* [00684] FE.VERTEX_STREAMS[1].BASE_ADDR := ADDR_V */
+ 0x150473a0, /* [00688] FE.VERTEX_STREAMS[2].BASE_ADDR := ADDR_W */
+ 0x080301a8, /* LOAD_STATE (1) Base: 0x006A0 Size: 3 Fixp: 0 */
+ 0x0000000c, /* [006A0] FE.VERTEX_STREAMS[0].CONTROL := 0xc */
+ 0x0000000c, /* [006A4] FE.VERTEX_STREAMS[1].CONTROL := 0xc */
+ 0x00000008, /* [006A8] FE.VERTEX_STREAMS[2].CONTROL := 0x8 */
+ 0x0801028b, /* LOAD_STATE (1) Base: 0x00A2C Size: 1 Fixp: 0 */
+ 0x00000000, /* [00A2C] PA.W_CLIP_LIMIT := 0x0 */
+ 0x08010800, /* LOAD_STATE (1) Base: 0x02000 Size: 1 Fixp: 0 */
+ 0x00091552, /* [02000] TE.SAMPLER[0].CONFIG0 := TYPE=2D,UWRAP=CLAMP_TO_EDGE,VWRAP=CLAMP_TO_EDGE,MIN=LINEAR,MIP=LINEAR,MAG=LINEAR,FORMAT=X8R8G8B8,ROUND_UV=1,ENDIAN=NO_SWAP,ANISOTROPY=0.000000 */
+ 0x08010870, /* LOAD_STATE (1) Base: 0x021C0 Size: 1 Fixp: 0 */
+ 0x04521000, /* [021C0] TE.SAMPLER[0].CONFIG1 := FORMAT_EXT=NONE,SWIZZLE_R=RED,SWIZZLE_G=GREEN,SWIZZLE_B=BLUE,SWIZZLE_A=ONE(residue:0x04000000) */
+ 0x08010810, /* LOAD_STATE (1) Base: 0x02040 Size: 1 Fixp: 0 */
+ 0x02000200, /* [02040] TE.SAMPLER[0].SIZE := WIDTH=512,HEIGHT=512 */
+ 0x08010820, /* LOAD_STATE (1) Base: 0x02080 Size: 1 Fixp: 0 */
+ 0x00048120, /* [02080] TE.SAMPLER[0].LOG_SIZE := WIDTH=9.000000,HEIGHT=9.000000 */
+ 0x08010830, /* LOAD_STATE (1) Base: 0x020C0 Size: 1 Fixp: 0 */
+ 0x00000240, /* [020C0] TE.SAMPLER[0].LOD_CONFIG := BIAS_ENABLE=0,MAX=9.000000,MIN=0.000000,BIAS=0.000000 */
+ 0x08010900, /* LOAD_STATE (1) Base: 0x02400 Size: 1 Fixp: 0 */
+ 0x15cfd000, /* [02400] TE.SAMPLER[0].LOD_ADDR[0] := ADDR_L */
+ 0x08010910, /* LOAD_STATE (1) Base: 0x02440 Size: 1 Fixp: 0 */
+ 0x15dfd000, /* [02440] TE.SAMPLER[0].LOD_ADDR[1] := ADDR_M */
+ 0x08010920, /* LOAD_STATE (1) Base: 0x02480 Size: 1 Fixp: 0 */
+ 0x15e3d000, /* [02480] TE.SAMPLER[0].LOD_ADDR[2] := ADDR_N */
+ 0x08010930, /* LOAD_STATE (1) Base: 0x024C0 Size: 1 Fixp: 0 */
+ 0x15aad900, /* [024C0] TE.SAMPLER[0].LOD_ADDR[3] := ADDR_O */
+ 0x08010940, /* LOAD_STATE (1) Base: 0x02500 Size: 1 Fixp: 0 */
+ 0x15ab1900, /* [02500] TE.SAMPLER[0].LOD_ADDR[4] := ADDR_P */
+ 0x08010950, /* LOAD_STATE (1) Base: 0x02540 Size: 1 Fixp: 0 */
+ 0x15ab2900, /* [02540] TE.SAMPLER[0].LOD_ADDR[5] := ADDR_Q */
+ 0x08010960, /* LOAD_STATE (1) Base: 0x02580 Size: 1 Fixp: 0 */
+ 0x15ab2d00, /* [02580] TE.SAMPLER[0].LOD_ADDR[6] := ADDR_R */
+ 0x08010970, /* LOAD_STATE (1) Base: 0x025C0 Size: 1 Fixp: 0 */
+ 0x15ab2f00, /* [025C0] TE.SAMPLER[0].LOD_ADDR[7] := ADDR_S */
+ 0x08010980, /* LOAD_STATE (1) Base: 0x02600 Size: 1 Fixp: 0 */
+ 0x15ab3000, /* [02600] TE.SAMPLER[0].LOD_ADDR[8] := ADDR_T */
+ 0x08010990, /* LOAD_STATE (1) Base: 0x02640 Size: 1 Fixp: 0 */
+ 0x15ab3100, /* [02640] TE.SAMPLER[0].LOD_ADDR[9] := ADDR_U */
+ 0x080105c8, /* LOAD_STATE (1) Base: 0x01720 Size: 1 Fixp: 0 */
+ 0x00000000, /* [01720] TS.SAMPLER[0].CONFIG := ENABLE=0x0,FORMAT=0x0 */
+ 0x080105d0, /* LOAD_STATE (1) Base: 0x01740 Size: 1 Fixp: 0 */
+ 0x00c0ffee, /* [01740] TS.SAMPLER[0].STATUS_BASE := ADDR_X */
+ 0x080105d8, /* LOAD_STATE (1) Base: 0x01760 Size: 1 Fixp: 0 */
+ 0x00000000, /* [01760] TS.SAMPLER[0].CLEAR_VALUE := 0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000007, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=1,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000701, /* [03808] GL.SEMAPHORE_TOKEN := FROM=FE,TO=PE */
+ 0x48000000, /* STALL (9) */
+ 0x00000701, /* */
+ 0x0c020280, /* LOAD_STATE (1) Base: 0x00A00 Size: 2 Fixp: 1 */
+ 0x01900000, /* [00A00] PA.VIEWPORT_SCALE_X = 400.000000 */
+ 0x00f00000, /* [00A04] PA.VIEWPORT_SCALE_Y = 240.000000 */
+ 0x00000000, /* PAD */
+ 0x0c020283, /* LOAD_STATE (1) Base: 0x00A0C Size: 2 Fixp: 1 */
+ 0x01900000, /* [00A0C] PA.VIEWPORT_OFFSET_X = 400.000000 */
+ 0x00f00000, /* [00A10] PA.VIEWPORT_OFFSET_Y = 240.000000 */
+ 0x00000000, /* PAD */
+ 0x080102a0, /* LOAD_STATE (1) Base: 0x00A80 Size: 1 Fixp: 0 */
+ 0x38481905, /* [00A80] PA.VIEWPORT_UNK00A80 := 0.000048 */
+ 0x0c0102a1, /* LOAD_STATE (1) Base: 0x00A84 Size: 1 Fixp: 1 */
+ 0x20000000, /* [00A84] PA.VIEWPORT_UNK00A84 = 8192.000000 */
+ 0x080102a3, /* LOAD_STATE (1) Base: 0x00A8C Size: 1 Fixp: 0 */
+ 0x38000000, /* [00A8C] PA.VIEWPORT_UNK00A8C := 0.000031 */
+ 0x0c040300, /* LOAD_STATE (1) Base: 0x00C00 Size: 4 Fixp: 1 */
+ 0x00000000, /* [00C00] SE.SCISSOR_LEFT = 0.000000 */
+ 0x00000000, /* [00C04] SE.SCISSOR_TOP = 0.000000 */
+ 0x03201000, /* [00C08] SE.SCISSOR_RIGHT = 800.062500 */
+ 0x01e01000, /* [00C0C] SE.SCISSOR_BOTTOM = 480.062500 */
+ 0x00000000, /* PAD */
+ 0x0c010308, /* LOAD_STATE (1) Base: 0x00C20 Size: 1 Fixp: 1 */
+ 0x0320ffff, /* [00C20] SE.CLIP_RIGHT = 800.999985 */
+ 0x0c010309, /* LOAD_STATE (1) Base: 0x00C24 Size: 1 Fixp: 1 */
+ 0x01e0ffff, /* [00C24] SE.CLIP_BOTTOM = 480.999985 */
+ 0x08030508, /* LOAD_STATE (1) Base: 0x01420 Size: 3 Fixp: 0 */
+ 0x00000000, /* [01420] PE.ALPHA_OP := ALPHA_TEST=0,ALPHA_FUNC=NEVER(residue:0xfffeff0c) */
+ 0x00000000, /* [01424] PE.ALPHA_BLEND_COLOR := B=0x0,G=0x0,R=0x0,A=0x0 */
+ 0x00100010, /* [01428] PE.ALPHA_CONFIG := BLEND_ENABLE_COLOR=0,SRC_FUNC_COLOR=ONE,DST_FUNC_COLOR=ZERO,EQ_COLOR=ADD,BLEND_SEPARATE_ALPHA=0,SRC_FUNC_ALPHA=ONE,DST_FUNC_ALPHA=ZERO,EQ_ALPHA=ADD */
+ 0x08010528, /* LOAD_STATE (1) Base: 0x014A0 Size: 1 Fixp: 0 */
+ 0x0000fdff, /* [014A0] PE.STENCIL_CONFIG_EXT := UNK16=0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* [0380C] GL.FLUSH_CACHE := DEPTH=0,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801050b, /* LOAD_STATE (1) Base: 0x0142C Size: 1 Fixp: 0 */
+ 0x00110f06, /* [0142C] PE.COLOR_FORMAT := FORMAT=A8R8G8B8,COMPONENTS=R=1,G=1,B=1,A=1,OVERWRITE=1,SUPER_TILED=1(residue:0xffcce0e0) */
+ 0x08010518, /* LOAD_STATE (1) Base: 0x01460 Size: 1 Fixp: 0 */
+ 0x15900000, /* [01460] PE.PIPE[0].COLOR_ADDR := ADDR_G */
+ 0x0801050c, /* LOAD_STATE (1) Base: 0x01430 Size: 1 Fixp: 0 */
+ 0x15900000, /* [01430] PE.COLOR_ADDR := ADDR_G */
+ 0x0801050d, /* LOAD_STATE (1) Base: 0x01434 Size: 1 Fixp: 0 */
+ 0x00000d00, /* [01434] PE.COLOR_STRIDE := 0xd00 */
+ 0x08040500, /* LOAD_STATE (1) Base: 0x01400 Size: 4 Fixp: 0 */
+ 0x04011101, /* [01400] PE.DEPTH_CONFIG := DEPTH_MODE=Z,DEPTH_FORMAT=D16,DEPTH_FUNC=LESS,WRITE_ENABLE=1,EARLY_Z=1,ONLY_DEPTH=0,SUPER_TILED=1(residue:0xf3ccc0c4) */
+ 0x00000000, /* [01404] PE.DEPTH_NEAR := 0.000000 */
+ 0x3f800000, /* [01408] PE.DEPTH_FAR := 1.000000 */
+ 0x477fff00, /* [0140C] PE.DEPTH_NORMALIZE := 65535.000000 */
+ 0x00000000, /* PAD */
+ 0x08010520, /* LOAD_STATE (1) Base: 0x01480 Size: 1 Fixp: 0 */
+ 0x15ab5000, /* [01480] PE.PIPE[0].DEPTH_ADDR := ADDR_I */
+ 0x08010504, /* LOAD_STATE (1) Base: 0x01410 Size: 1 Fixp: 0 */
+ 0x15ab5000, /* [01410] PE.DEPTH_ADDR := ADDR_I */
+ 0x08010505, /* LOAD_STATE (1) Base: 0x01414 Size: 1 Fixp: 0 */
+ 0x00000680, /* [01414] PE.DEPTH_STRIDE := 0x680 */
+ 0x08010515, /* LOAD_STATE (1) Base: 0x01454 Size: 1 Fixp: 0 */
+ 0x00000000, /* [01454] PE.HDEPTH_CONTROL := FORMAT=DISABLED */
+ 0x08010282, /* LOAD_STATE (1) Base: 0x00A08 Size: 1 Fixp: 0 */
+ 0x3f800000, /* [00A08] PA.VIEWPORT_SCALE_Z := 1.000000 */
+ 0x08010285, /* LOAD_STATE (1) Base: 0x00A14 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00A14] PA.VIEWPORT_OFFSET_Z := 0.000000 */
+ 0x08010507, /* LOAD_STATE (1) Base: 0x0141C Size: 1 Fixp: 0 */
+ 0x00000000, /* [0141C] PE.STENCIL_CONFIG := MODE=DISABLED,REF_FRONT=0x0,MASK_FRONT=0x0,WRITE_MASK=0x0(residue:0x0000000c) */
+ 0x08010e06, /* LOAD_STATE (1) Base: 0x03818 Size: 1 Fixp: 0 */
+ 0x00000000, /* [03818] GL.MULTI_SAMPLE_CONFIG := MSAA_SAMPLES=NONE,MSAA_ENABLES=0x0,UNK12=0x0,UNK16=0x0(residue:0xfff40e04) */
+ 0x08010286, /* LOAD_STATE (1) Base: 0x00A18 Size: 1 Fixp: 0 */
+ 0x3f000000, /* [00A18] PA.LINE_WIDTH := 0.500000 */
+ 0x0803028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 3 Fixp: 0 */
+ 0x00412200, /* [00A34] PA.CONFIG := POINT_SIZE_ENABLE=0,POINT_SPRITE_ENABLE=0,CULL_FACE_MODE=CCW,FILL_MODE=SOLID,SHADE_MODEL=SMOOTH,UNK22=1(residue:0xff3888c3) */
+ 0x3f000000, /* [00A38] PA.LINE_UNK00A38 := 0.500000 */
+ 0x3f000000, /* [00A3C] PA.LINE_UNK00A3C := 0.500000 */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000701, /* [03808] GL.SEMAPHORE_TOKEN := FROM=FE,TO=PE */
+ 0x48000000, /* STALL (9) */
+ 0x00000701, /* */
+ 0x08030202, /* LOAD_STATE (1) Base: 0x00808 Size: 3 Fixp: 0 */
+ 0x00000103, /* [00808] VS.INPUT_COUNT := COUNT=3,UNK8=1 */
+ 0x00000006, /* [0080C] VS.TEMP_REGISTER_CONTROL := NUM_TEMPS=6 */
+ 0x00010004, /* [00810] VS.OUTPUT[0] := O0=4,O1=0,O2=1,O3=0 */
+ 0x08010217, /* LOAD_STATE (1) Base: 0x0085C Size: 1 Fixp: 0 */
+ 0x00150000, /* [0085C] VS.RANGE := LOW=0x0,HIGH=0x15 */
+ 0x0801020e, /* LOAD_STATE (1) Base: 0x00838 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00838] VS.START_PC := 0x0 */
+ 0x08010200, /* LOAD_STATE (1) Base: 0x00800 Size: 1 Fixp: 0 */
+ 0x00000016, /* [00800] VS.END_PC := 0x16 */
+ 0x0801142c, /* LOAD_STATE (1) Base: 0x050B0 Size: 1 Fixp: 0 */
+ 0x3f800000, /* [050B0] VS.UNIFORMS[44] := 1.000000 (u11.x) */
+ 0x0801141b, /* LOAD_STATE (1) Base: 0x0506C Size: 1 Fixp: 0 */
+ 0x00000000, /* [0506C] VS.UNIFORMS[27] := 0.000000 (u6.w) */
+ 0x08011417, /* LOAD_STATE (1) Base: 0x0505C Size: 1 Fixp: 0 */
+ 0x41a00000, /* [0505C] VS.UNIFORMS[23] := 20.000000 (u5.w) */
+ 0x08011413, /* LOAD_STATE (1) Base: 0x0504C Size: 1 Fixp: 0 */
+ 0x40000000, /* [0504C] VS.UNIFORMS[19] := 2.000000 (u4.w) */
+ 0x08583000, /* LOAD_STATE (1) Base: 0x0C000 Size: 88 Fixp: 0 */
+ 0x01831009, /* [0C000] SH.UNK0C000[0] := 0x1831009 */
+ 0x00000000, /* [0C004] SH.UNK0C000[1] := 0x0 */
+ 0x00000000, /* [0C008] SH.UNK0C000[2] := 0x0 */
+ 0x203fc048, /* [0C00C] SH.UNK0C000[3] := 0x203fc048 */
+ 0x02031009, /* [0C010] SH.UNK0C000[4] := 0x2031009 */
+ 0x00000000, /* [0C014] SH.UNK0C000[5] := 0x0 */
+ 0x00000000, /* [0C018] SH.UNK0C000[6] := 0x0 */
+ 0x203fc058, /* [0C01C] SH.UNK0C000[7] := 0x203fc058 */
+ 0x07841003, /* [0C020] SH.UNK0C000[8] := 0x7841003 */
+ 0x39000800, /* [0C024] SH.UNK0C000[9] := 0x39000800 */
+ 0x00000050, /* [0C028] SH.UNK0C000[10] := 0x50 */
+ 0x00000000, /* [0C02C] SH.UNK0C000[11] := 0x0 */
+ 0x07841002, /* [0C030] SH.UNK0C000[12] := 0x7841002 */
+ 0x39001800, /* [0C034] SH.UNK0C000[13] := 0x39001800 */
+ 0x00aa0050, /* [0C038] SH.UNK0C000[14] := 0xaa0050 */
+ 0x00390048, /* [0C03C] SH.UNK0C000[15] := 0x390048 */
+ 0x07841002, /* [0C040] SH.UNK0C000[16] := 0x7841002 */
+ 0x39002800, /* [0C044] SH.UNK0C000[17] := 0x39002800 */
+ 0x01540050, /* [0C048] SH.UNK0C000[18] := 0x1540050 */
+ 0x00390048, /* [0C04C] SH.UNK0C000[19] := 0x390048 */
+ 0x07841002, /* [0C050] SH.UNK0C000[20] := 0x7841002 */
+ 0x39003800, /* [0C054] SH.UNK0C000[21] := 0x39003800 */
+ 0x01fe0050, /* [0C058] SH.UNK0C000[22] := 0x1fe0050 */
+ 0x00390048, /* [0C05C] SH.UNK0C000[23] := 0x390048 */
+ 0x03851003, /* [0C060] SH.UNK0C000[24] := 0x3851003 */
+ 0x29004800, /* [0C064] SH.UNK0C000[25] := 0x29004800 */
+ 0x000000d0, /* [0C068] SH.UNK0C000[26] := 0xd0 */
+ 0x00000000, /* [0C06C] SH.UNK0C000[27] := 0x0 */
+ 0x03851002, /* [0C070] SH.UNK0C000[28] := 0x3851002 */
+ 0x29005800, /* [0C074] SH.UNK0C000[29] := 0x29005800 */
+ 0x00aa00d0, /* [0C078] SH.UNK0C000[30] := 0xaa00d0 */
+ 0x00290058, /* [0C07C] SH.UNK0C000[31] := 0x290058 */
+ 0x03811002, /* [0C080] SH.UNK0C000[32] := 0x3811002 */
+ 0x29006800, /* [0C084] SH.UNK0C000[33] := 0x29006800 */
+ 0x015400d0, /* [0C088] SH.UNK0C000[34] := 0x15400d0 */
+ 0x00290058, /* [0C08C] SH.UNK0C000[35] := 0x290058 */
+ 0x07851003, /* [0C090] SH.UNK0C000[36] := 0x7851003 */
+ 0x39007800, /* [0C094] SH.UNK0C000[37] := 0x39007800 */
+ 0x00000050, /* [0C098] SH.UNK0C000[38] := 0x50 */
+ 0x00000000, /* [0C09C] SH.UNK0C000[39] := 0x0 */
+ 0x07851002, /* [0C0A0] SH.UNK0C000[40] := 0x7851002 */
+ 0x39008800, /* [0C0A4] SH.UNK0C000[41] := 0x39008800 */
+ 0x00aa0050, /* [0C0A8] SH.UNK0C000[42] := 0xaa0050 */
+ 0x00390058, /* [0C0AC] SH.UNK0C000[43] := 0x390058 */
+ 0x07851002, /* [0C0B0] SH.UNK0C000[44] := 0x7851002 */
+ 0x39009800, /* [0C0B4] SH.UNK0C000[45] := 0x39009800 */
+ 0x01540050, /* [0C0B8] SH.UNK0C000[46] := 0x1540050 */
+ 0x00390058, /* [0C0BC] SH.UNK0C000[47] := 0x390058 */
+ 0x07801002, /* [0C0C0] SH.UNK0C000[48] := 0x7801002 */
+ 0x3900a800, /* [0C0C4] SH.UNK0C000[49] := 0x3900a800 */
+ 0x01fe0050, /* [0C0C8] SH.UNK0C000[50] := 0x1fe0050 */
+ 0x00390058, /* [0C0CC] SH.UNK0C000[51] := 0x390058 */
+ 0x0401100c, /* [0C0D0] SH.UNK0C000[52] := 0x401100c */
+ 0x00000000, /* [0C0D4] SH.UNK0C000[53] := 0x0 */
+ 0x00000000, /* [0C0D8] SH.UNK0C000[54] := 0x0 */
+ 0x003fc008, /* [0C0DC] SH.UNK0C000[55] := 0x3fc008 */
+ 0x03801002, /* [0C0E0] SH.UNK0C000[56] := 0x3801002 */
+ 0x69000800, /* [0C0E4] SH.UNK0C000[57] := 0x69000800 */
+ 0x01fe00c0, /* [0C0E8] SH.UNK0C000[58] := 0x1fe00c0 */
+ 0x00290038, /* [0C0EC] SH.UNK0C000[59] := 0x290038 */
+ 0x03831005, /* [0C0F0] SH.UNK0C000[60] := 0x3831005 */
+ 0x29000800, /* [0C0F4] SH.UNK0C000[61] := 0x29000800 */
+ 0x01480040, /* [0C0F8] SH.UNK0C000[62] := 0x1480040 */
+ 0x00000000, /* [0C0FC] SH.UNK0C000[63] := 0x0 */
+ 0x0383100d, /* [0C100] SH.UNK0C000[64] := 0x383100d */
+ 0x00000000, /* [0C104] SH.UNK0C000[65] := 0x0 */
+ 0x00000000, /* [0C108] SH.UNK0C000[66] := 0x0 */
+ 0x00000038, /* [0C10C] SH.UNK0C000[67] := 0x38 */
+ 0x03801003, /* [0C110] SH.UNK0C000[68] := 0x3801003 */
+ 0x29000800, /* [0C114] SH.UNK0C000[69] := 0x29000800 */
+ 0x014801c0, /* [0C118] SH.UNK0C000[70] := 0x14801c0 */
+ 0x00000000, /* [0C11C] SH.UNK0C000[71] := 0x0 */
+ 0x00801005, /* [0C120] SH.UNK0C000[72] := 0x801005 */
+ 0x29001800, /* [0C124] SH.UNK0C000[73] := 0x29001800 */
+ 0x01480040, /* [0C128] SH.UNK0C000[74] := 0x1480040 */
+ 0x00000000, /* [0C12C] SH.UNK0C000[75] := 0x0 */
+ 0x0380108f, /* [0C130] SH.UNK0C000[76] := 0x380108f */
+ 0x3fc06800, /* [0C134] SH.UNK0C000[77] := 0x3fc06800 */
+ 0x00000050, /* [0C138] SH.UNK0C000[78] := 0x50 */
+ 0x203fc068, /* [0C13C] SH.UNK0C000[79] := 0x203fc068 */
+ 0x04001009, /* [0C140] SH.UNK0C000[80] := 0x4001009 */
+ 0x00000000, /* [0C144] SH.UNK0C000[81] := 0x0 */
+ 0x00000000, /* [0C148] SH.UNK0C000[82] := 0x0 */
+ 0x200000b8, /* [0C14C] SH.UNK0C000[83] := 0x200000b8 */
+ 0x01811009, /* [0C150] SH.UNK0C000[84] := 0x1811009 */
+ 0x00000000, /* [0C154] SH.UNK0C000[85] := 0x0 */
+ 0x00000000, /* [0C158] SH.UNK0C000[86] := 0x0 */
+ 0x00150028, /* [0C15C] SH.UNK0C000[87] := 0x150028 */
+ 0x00000000, /* PAD */
+ 0x08010380, /* LOAD_STATE (1) Base: 0x00E00 Size: 1 Fixp: 0 */
+ 0x00000003, /* [00E00] RA.CONTROL := UNK0=1,LAST_VARYING_2X=1 */
+ 0x08010401, /* LOAD_STATE (1) Base: 0x01004 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01004] PS.OUTPUT_REG := 0x1 */
+ 0x08020290, /* LOAD_STATE (1) Base: 0x00A40 Size: 2 Fixp: 0 */
+ 0x00000200, /* [00A40] PA.SHADER_ATTRIBUTES[0] := UNK0=0x0,UNK8=0x2 */
+ 0x00000200, /* [00A44] PA.SHADER_ATTRIBUTES[1] := UNK0=0x0,UNK8=0x2 */
+ 0x00000000, /* PAD */
+ 0x08010e08, /* LOAD_STATE (1) Base: 0x03820 Size: 1 Fixp: 0 */
+ 0x00000044, /* [03820] GL.VARYING_NUM_COMPONENTS := VAR0=0x4,VAR1=0x4,VAR2=0x0,VAR3=0x0,VAR4=0x0,VAR5=0x0,VAR6=0x0,VAR7=0x0 */
+ 0x08010e0d, /* LOAD_STATE (1) Base: 0x03834 Size: 1 Fixp: 0 */
+ 0x00040000, /* [03834] GL.UNK03834 := 0x40000 */
+ 0x08020e0a, /* LOAD_STATE (1) Base: 0x03828 Size: 2 Fixp: 0 */
+ 0x00005555, /* [03828] GL.VARYING_COMPONENT_USE[0] := COMP0=USED,COMP1=USED,COMP2=USED,COMP3=USED,COMP4=USED,COMP5=USED,COMP6=USED,COMP7=USED,COMP8=UNUSED,COMP9=UNUSED,COMP10=UNUSED,COMP11=UNUSED,COMP12=UNUSED,COMP13=UNUSED,COMP14=UNUSED,COMP15=UNUSED */
+ 0x00000000, /* [0382C] GL.VARYING_COMPONENT_USE[1] := COMP0=UNUSED,COMP1=UNUSED,COMP2=UNUSED,COMP3=UNUSED,COMP4=UNUSED,COMP5=UNUSED,COMP6=UNUSED,COMP7=UNUSED,COMP8=UNUSED,COMP9=UNUSED,COMP10=UNUSED,COMP11=UNUSED,COMP12=UNUSED,COMP13=UNUSED,COMP14=UNUSED,COMP15=UNUSED */
+ 0x00000000, /* PAD */
+ 0x08010e0e, /* LOAD_STATE (1) Base: 0x03838 Size: 1 Fixp: 0 */
+ 0x00000000, /* [03838] GL.UNK03838 := 0x0 */
+ 0x08010407, /* LOAD_STATE (1) Base: 0x0101C Size: 1 Fixp: 0 */
+ 0x01020100, /* [0101C] PS.RANGE := LOW=0x100,HIGH=0x102 */
+ 0x08010406, /* LOAD_STATE (1) Base: 0x01018 Size: 1 Fixp: 0 */
+ 0x00000000, /* [01018] PS.START_PC := 0x0 */
+ 0x08010400, /* LOAD_STATE (1) Base: 0x01000 Size: 1 Fixp: 0 */
+ 0x00000003, /* [01000] PS.END_PC := 0x3 */
+ 0x08011c00, /* LOAD_STATE (1) Base: 0x07000 Size: 1 Fixp: 0 */
+ 0x40400000, /* [07000] PS.UNIFORMS[0] := 3.000000 (u0.x) */
+ 0x080c3400, /* LOAD_STATE (1) Base: 0x0D000 Size: 12 Fixp: 0 */
+ 0x07811003, /* [0D000] SH.UNK0C000[1024] := 0x7811003 */
+ 0x00000800, /* [0D004] SH.UNK0C000[1025] := 0x800 */
+ 0x01c800d0, /* [0D008] SH.UNK0C000[1026] := 0x1c800d0 */
+ 0x00000000, /* [0D00C] SH.UNK0C000[1027] := 0x0 */
+ 0x07821018, /* [0D010] SH.UNK0C000[1028] := 0x7821018 */
+ 0x15002f20, /* [0D014] SH.UNK0C000[1029] := 0x15002f20 */
+ 0x00000000, /* [0D018] SH.UNK0C000[1030] := 0x0 */
+ 0x00000000, /* [0D01C] SH.UNK0C000[1031] := 0x0 */
+ 0x07811003, /* [0D020] SH.UNK0C000[1032] := 0x7811003 */
+ 0x39001800, /* [0D024] SH.UNK0C000[1033] := 0x39001800 */
+ 0x01c80140, /* [0D028] SH.UNK0C000[1034] := 0x1c80140 */
+ 0x00000000, /* [0D02C] SH.UNK0C000[1035] := 0x0 */
+ 0x00000000, /* PAD */
+ 0x08030402, /* LOAD_STATE (1) Base: 0x01008 Size: 3 Fixp: 0 */
+ 0x00001f03, /* [01008] PS.INPUT_COUNT := COUNT=3,UNK8=31 */
+ 0x00000003, /* [0100C] PS.TEMP_REGISTER_CONTROL := NUM_TEMPS=3 */
+ 0x00000002, /* [01010] PS.CONTROL := BYPASS=0,UNK1=1 */
+ 0x0801028c, /* LOAD_STATE (1) Base: 0x00A30 Size: 1 Fixp: 0 */
+ 0x00000200, /* [00A30] PA.ATTRIBUTE_ELEMENT_COUNT := UNK0=0x0,COUNT=0x2 */
+ 0x08010e07, /* LOAD_STATE (1) Base: 0x0381C Size: 1 Fixp: 0 */
+ 0x00000008, /* [0381C] GL.VARYING_TOTAL_COMPONENTS := NUM=0x8 */
+ 0x0801020c, /* LOAD_STATE (1) Base: 0x00830 Size: 1 Fixp: 0 */
+ 0x0f3f0542, /* [00830] VS.LOAD_BALANCING := A=0x42,B=0x5,C=0x3f,D=0xf */
+ 0x08010201, /* LOAD_STATE (1) Base: 0x00804 Size: 1 Fixp: 0 */
+ 0x00000003, /* [00804] VS.OUTPUT_COUNT := 3 */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000705, /* [03808] GL.SEMAPHORE_TOKEN := FROM=RA,TO=PE */
+ 0x08010f00, /* LOAD_STATE (1) Base: 0x03C00 Size: 1 Fixp: 0 */
+ 0x00000705, /* [03C00] GL.STALL_TOKEN := FROM=RA,TO=PE,FLIP0=0,FLIP1=0 */
+ 0x28000000, /* DRAW_PRIMITIVES (5) */
+ 0x00000004, /* */
+ 0x00000000, /* */
+ 0x00000fd4, /* 0xfd4 = 4052 = triangle count*/
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003 /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+};
+#if 0
+Grouped GPU addresses {
+ cmdbuf[0x1d] = cmdbuf[0x1f] = ADDR_A; /* 0x7f2c8700 */
+}
+#endif
+
+uint32_t cmdbuf5[] = { /* seq 105 */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004686, /* [01604] RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,DOWNSAMPLE_X=0,DOWNSAMPLE_Y=0,SOURCE_TILED=1,DEST_FORMAT=A8R8G8B8,DEST_TILED=1,SWAP_RB=0,FLIP=0 */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x80003400, /* [0160C] RS.SOURCE_STRIDE := STRIDE=0x3400,MULTI=0,TILING=1 */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x80003400, /* [01614] RS.DEST_STRIDE := STRIDE=0x3400,MULTI=0,TILING=1 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* [01630] RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* [01634] RS.DITHER[1] := 0xffffffff */
+ 0x00000000, /* PAD */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* [0163C] RS.CLEAR_CONTROL := BITS=0x0,MODE=DISABLED */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* [016A0] RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x15900000, /* [01608] RS.SOURCE_ADDR := ADDR_G */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x15900000, /* [01610] RS.DEST_ADDR := ADDR_G */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x02000340, /* [01620] RS.WINDOW_SIZE := HEIGHT=512,WIDTH=832 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbadabeeb /* [01600] RS.KICKER := 0xbadabeeb */
+};
+#if 0
+Grouped GPU addresses {
+ cmdbuf[0x9] = ADDR_G; /* 0x7a002a00 */
+ cmdbuf[0xb] = cmdbuf[0x11] = cmdbuf[0x15] = ADDR_F; /* 0x7f284000 */
+ cmdbuf[0x21] = ADDR_A; /* 0x7f2c8700 */
+ cmdbuf[0x1f] = ADDR_B; /* 0x7a005900 */
+}
+#endif
+
+uint32_t cmdbuf6[] = {
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01650] RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* [0380C] GL.FLUSH_CACHE := DEPTH=0,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801ffff, /* LOAD_STATE (1) Base: 0x3FFFC Size: 1 Fixp: 0 */
+ 0x00000000, /* [3FFFC] DUMMY.DUMMY := 0x0 */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x00000049, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=0,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=0,DEPTH_COMPRESSION=1,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x20000686, /* [01604] RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,DOWNSAMPLE_X=0,DOWNSAMPLE_Y=0,SOURCE_TILED=1,DEST_FORMAT=A8R8G8B8,DEST_TILED=0,SWAP_RB=1,FLIP=0 */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x80003400, /* [0160C] RS.SOURCE_STRIDE := STRIDE=0x3400,MULTI=0,TILING=1 */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000d00, /* [01614] RS.DEST_STRIDE := STRIDE=0xd00,MULTI=0,TILING=0 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* [01630] RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* [01634] RS.DITHER[1] := 0xffffffff */
+ 0x00000000, /* PAD */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* [0163C] RS.CLEAR_CONTROL := BITS=0x0,MODE=DISABLED */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* [016A0] RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x15900000, /* [01608] RS.SOURCE_ADDR := ADDR_G */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x15e4d000, /* [01610] RS.DEST_ADDR := ADDR_Y */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x02000340, /* [01620] RS.WINDOW_SIZE := HEIGHT=512,WIDTH=832 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbadabeeb /* [01600] RS.KICKER := 0xbadabeeb */
+};
+
+uint32_t cmdbuf7[] = { /* seq 115 */
+ 0x08010581, /* PAD */
+ 0x00000585, /* PAD */
+ 0x08010583, /* PAD */
+ 0x80001c00, /* PAD */
+ 0x08010585, /* PAD */
+ 0x00000640, /* PAD */
+ 0x0801058c, /* PAD */
+ 0xffffffff, /* PAD */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x20000505, /* RS.CONFIG := SOURCE_FORMAT=X8R8G8B8,UNK7=1,DEST_FORMAT=X8R8G8B8,UNK14=0,SWAP_RB=0,FLIP=0 */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x00000d00, /* RS.SOURCE_STRIDE := STRIDE=0xd00,TILING=0 */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000c80, /* RS.DEST_STRIDE := STRIDE=0xc80,TILING=0 */
+ 0x0801058c, /* LOAD_STATE (1) Base: 0x01630 Size: 1 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[0] := 0xffffffff */
+ 0x0801058d, /* LOAD_STATE (1) Base: 0x01634 Size: 1 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[1] := 0xffffffff */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* RS.SOURCE_ADDR := ADDR_A */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7fc20000, /* RS.DEST_ADDR := ADDR_J */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x01e00320, /* RS.WINDOW_SIZE := HEIGHT=480,WIDTH=800 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb /* RS.KICKER := 0xbeebbeeb */
+};
+
+#if 0
+Grouped GPU addresses {
+ cmdbuf[0x19] = ADDR_A; /* 0x7f2c8700 */
+ cmdbuf[0x1b] = ADDR_J; /* 0x7fc20000 */
+}
+#endif
+
diff --git a/src/replay/context_cmd.h b/src/replay/context_cmd.h
new file mode 100644
index 0000000..4b3e5e9
--- /dev/null
+++ b/src/replay/context_cmd.h
@@ -0,0 +1,8306 @@
+typedef struct
+{
+ uint32_t index; /* index into command buffer */
+ uint32_t address; /* state address */
+} address_index_t;
+
+/* global state map */
+address_index_t contextbuf_addr[] = {
+ {0x2e9, 0x00600}, /* FE.VERTEX_ELEMENT_CONFIG[0] */
+ {0x2ea, 0x00604}, /* FE.VERTEX_ELEMENT_CONFIG[1] */
+ {0x2eb, 0x00608}, /* FE.VERTEX_ELEMENT_CONFIG[2] */
+ {0x2ec, 0x0060C}, /* FE.VERTEX_ELEMENT_CONFIG[3] */
+ {0x2ed, 0x00610}, /* FE.VERTEX_ELEMENT_CONFIG[4] */
+ {0x2ee, 0x00614}, /* FE.VERTEX_ELEMENT_CONFIG[5] */
+ {0x2ef, 0x00618}, /* FE.VERTEX_ELEMENT_CONFIG[6] */
+ {0x2f0, 0x0061C}, /* FE.VERTEX_ELEMENT_CONFIG[7] */
+ {0x2f1, 0x00620}, /* FE.VERTEX_ELEMENT_CONFIG[8] */
+ {0x2f2, 0x00624}, /* FE.VERTEX_ELEMENT_CONFIG[9] */
+ {0x2f3, 0x00628}, /* FE.VERTEX_ELEMENT_CONFIG[10] */
+ {0x2f4, 0x0062C}, /* FE.VERTEX_ELEMENT_CONFIG[11] */
+ {0x2f5, 0x00630}, /* FE.VERTEX_ELEMENT_CONFIG[12] */
+ {0x2f6, 0x00634}, /* FE.VERTEX_ELEMENT_CONFIG[13] */
+ {0x2f7, 0x00638}, /* FE.VERTEX_ELEMENT_CONFIG[14] */
+ {0x2f8, 0x0063C}, /* FE.VERTEX_ELEMENT_CONFIG[15] */
+ {0x2fb, 0x00644}, /* FE.INDEX_STREAM_BASE_ADDR */
+ {0x2fc, 0x00648}, /* FE.INDEX_STREAM_CONTROL */
+ {0x2fd, 0x0064C}, /* FE.VERTEX_STREAM_BASE_ADDR */
+ {0x2fe, 0x00650}, /* FE.VERTEX_STREAM_CONTROL */
+ {0x313, 0x00670}, /* FE.AUTO_FLUSH */
+ {0x301, 0x00680}, /* FE.VERTEX_STREAM[0].BASE_ADDR */
+ {0x302, 0x00684}, /* FE.VERTEX_STREAM[1].BASE_ADDR */
+ {0x303, 0x00688}, /* FE.VERTEX_STREAM[2].BASE_ADDR */
+ {0x304, 0x0068C}, /* FE.VERTEX_STREAM[3].BASE_ADDR */
+ {0x305, 0x00690}, /* FE.VERTEX_STREAM[4].BASE_ADDR */
+ {0x306, 0x00694}, /* FE.VERTEX_STREAM[5].BASE_ADDR */
+ {0x307, 0x00698}, /* FE.VERTEX_STREAM[6].BASE_ADDR */
+ {0x308, 0x0069C}, /* FE.VERTEX_STREAM[7].BASE_ADDR */
+ {0x309, 0x006A0}, /* FE.VERTEX_STREAM[0].CONTROL */
+ {0x30a, 0x006A4}, /* FE.VERTEX_STREAM[1].CONTROL */
+ {0x30b, 0x006A8}, /* FE.VERTEX_STREAM[2].CONTROL */
+ {0x30c, 0x006AC}, /* FE.VERTEX_STREAM[3].CONTROL */
+ {0x30d, 0x006B0}, /* FE.VERTEX_STREAM[4].CONTROL */
+ {0x30e, 0x006B4}, /* FE.VERTEX_STREAM[5].CONTROL */
+ {0x30f, 0x006B8}, /* FE.VERTEX_STREAM[6].CONTROL */
+ {0x310, 0x006BC}, /* FE.VERTEX_STREAM[7].CONTROL */
+ {0x315, 0x00800}, /* VS.END_PC */
+ {0x316, 0x00804}, /* VS.OUTPUT_COUNT */
+ {0x317, 0x00808}, /* VS.INPUT_COUNT */
+ {0x318, 0x0080C}, /* VS.TEMP_REGISTER_CONTROL */
+ {0x319, 0x00810}, /* VS.OUTPUT[0] */
+ {0x31a, 0x00814}, /* VS.OUTPUT[1] */
+ {0x31b, 0x00818}, /* VS.OUTPUT[2] */
+ {0x31c, 0x0081C}, /* VS.OUTPUT[3] */
+ {0x31d, 0x00820}, /* VS.INPUT[0] */
+ {0x31e, 0x00824}, /* VS.INPUT[1] */
+ {0x31f, 0x00828}, /* VS.INPUT[2] */
+ {0x320, 0x0082C}, /* VS.INPUT[3] */
+ {0x321, 0x00830}, /* VS.LOAD_BALANCING */
+ {0x323, 0x00838}, /* VS.START_PC */
+ {0x9a9, 0x00850}, /* VS.UNK00850 */
+ {0x9aa, 0x00854}, /* VS.UNK00854 */
+ {0x9ab, 0x00858}, /* VS.UNK00858 */
+ {0x9ad, 0x00A00}, /* PA.VIEWPORT_SCALE_X */
+ {0x9ae, 0x00A04}, /* PA.VIEWPORT_SCALE_Y */
+ {0x9b1, 0x00A08}, /* PA.VIEWPORT_SCALE_Z */
+ {0x9b3, 0x00A0C}, /* PA.VIEWPORT_OFFSET_X */
+ {0x9b4, 0x00A10}, /* PA.VIEWPORT_OFFSET_Y */
+ {0x9b7, 0x00A14}, /* PA.VIEWPORT_OFFSET_Z */
+ {0x9b8, 0x00A18}, /* PA.LINE_WIDTH */
+ {0x9b9, 0x00A1C}, /* PA.POINT_SIZE */
+ {0x9bb, 0x00A28}, /* PA.PA_SYSTEM_MODE */
+ {0x9bc, 0x00A2C}, /* PA.W_CLIP_LIMIT */
+ {0x9bd, 0x00A30}, /* PA.ATTRIBUTE_ELEMENT_COUNT */
+ {0x9cb, 0x00A34}, /* PA.CONFIG */
+ {0x9bf, 0x00A40}, /* PA.SHADER_ATTRIBUTES[0] */
+ {0x9c0, 0x00A44}, /* PA.SHADER_ATTRIBUTES[1] */
+ {0x9c1, 0x00A48}, /* PA.SHADER_ATTRIBUTES[2] */
+ {0x9c2, 0x00A4C}, /* PA.SHADER_ATTRIBUTES[3] */
+ {0x9c3, 0x00A50}, /* PA.SHADER_ATTRIBUTES[4] */
+ {0x9c4, 0x00A54}, /* PA.SHADER_ATTRIBUTES[5] */
+ {0x9c5, 0x00A58}, /* PA.SHADER_ATTRIBUTES[6] */
+ {0x9c6, 0x00A5C}, /* PA.SHADER_ATTRIBUTES[7] */
+ {0x9c7, 0x00A60}, /* PA.SHADER_ATTRIBUTES[8] */
+ {0x9c8, 0x00A64}, /* PA.SHADER_ATTRIBUTES[9] */
+ {0x9cd, 0x00C00}, /* SE.SCISSOR_LEFT */
+ {0x9ce, 0x00C04}, /* SE.SCISSOR_TOP */
+ {0x9cf, 0x00C08}, /* SE.SCISSOR_RIGHT */
+ {0x9d0, 0x00C0C}, /* SE.SCISSOR_BOTTOM */
+ {0x9d3, 0x00C10}, /* SE.DEPTH_SCALE */
+ {0x9d4, 0x00C14}, /* SE.DEPTH_BIAS */
+ {0x9d5, 0x00C18}, /* SE.LAST_PIXEL_ENABLE */
+ {0x9d7, 0x00E00}, /* RA.CONTROL */
+ {0x9df, 0x00E04}, /* RA.MULTISAMPLE_UNK00E04 */
+ {0x9f3, 0x00E08}, /* RA.DEPTH_UNK00E08 */
+ {0x9d9, 0x00E10}, /* RA.MULTISAMPLE_UNK00E10[0] */
+ {0x9da, 0x00E14}, /* RA.MULTISAMPLE_UNK00E10[1] */
+ {0x9db, 0x00E18}, /* RA.MULTISAMPLE_UNK00E10[2] */
+ {0x9dc, 0x00E1C}, /* RA.MULTISAMPLE_UNK00E10[3] */
+ {0x9e1, 0x00E40}, /* RA.CENTROID_TABLE[0] */
+ {0x9e2, 0x00E44}, /* RA.CENTROID_TABLE[1] */
+ {0x9e3, 0x00E48}, /* RA.CENTROID_TABLE[2] */
+ {0x9e4, 0x00E4C}, /* RA.CENTROID_TABLE[3] */
+ {0x9e5, 0x00E50}, /* RA.CENTROID_TABLE[4] */
+ {0x9e6, 0x00E54}, /* RA.CENTROID_TABLE[5] */
+ {0x9e7, 0x00E58}, /* RA.CENTROID_TABLE[6] */
+ {0x9e8, 0x00E5C}, /* RA.CENTROID_TABLE[7] */
+ {0x9e9, 0x00E60}, /* RA.CENTROID_TABLE[8] */
+ {0x9ea, 0x00E64}, /* RA.CENTROID_TABLE[9] */
+ {0x9eb, 0x00E68}, /* RA.CENTROID_TABLE[10] */
+ {0x9ec, 0x00E6C}, /* RA.CENTROID_TABLE[11] */
+ {0x9ed, 0x00E70}, /* RA.CENTROID_TABLE[12] */
+ {0x9ee, 0x00E74}, /* RA.CENTROID_TABLE[13] */
+ {0x9ef, 0x00E78}, /* RA.CENTROID_TABLE[14] */
+ {0x9f0, 0x00E7C}, /* RA.CENTROID_TABLE[15] */
+ {0x9f5, 0x01000}, /* PS.END_PC */
+ {0x9f6, 0x01004}, /* PS.OUTPUT_REG */
+ {0x9f7, 0x01008}, /* PS.INPUT_COUNT */
+ {0x9f8, 0x0100C}, /* PS.TEMP_REGISTER_CONTROL */
+ {0x9f9, 0x01010}, /* PS.CONTROL */
+ {0x9fb, 0x01018}, /* PS.START_PC */
+ {0x9, 0x01200}, /* DE.SOURCE_ADDR */
+ {0xa, 0x01204}, /* DE.SOURCE_STRIDE */
+ {0xb, 0x01208}, /* DE.SOURCE_ROTATION_CONFIG */
+ {0xc, 0x0120C}, /* DE.SOURCE_TILING_CONFIG */
+ {0xd, 0x01210}, /* DE.SOURCE_RECT_BASE */
+ {0xe, 0x01214}, /* DE.SOURCE_RECT_SIZE */
+ {0xf, 0x01218}, /* DE.SOURCE_BG_COLOR */
+ {0x10, 0x0121C}, /* DE.SOURCE_FG_COLOR */
+ {0x11, 0x01220}, /* DE.HOR_STRETCH_FACTOR */
+ {0x12, 0x01224}, /* DE.VERT_STRETCH_FACTOR */
+ {0x13, 0x01228}, /* DE.DEST_ADDR */
+ {0x14, 0x0122C}, /* DE.DEST_STRIDE */
+ {0x15, 0x01230}, /* DE.DEST_ROTATION_CONFIG */
+ {0x16, 0x01234}, /* DE.DEST_FLAGS */
+ {0x17, 0x01238}, /* DE.PATTERN_ADDR */
+ {0x21, 0x0123C}, /* DE.PATTERN_CONFIG */
+ {0x19, 0x01240}, /* DE.PATTERN_DATA_LOW */
+ {0x1a, 0x01244}, /* DE.PATTERN_DATA_HIGH */
+ {0x1b, 0x01248}, /* DE.PATTERN_MASK_LOW */
+ {0x1c, 0x0124C}, /* DE.PATTERN_MASK_HIGH */
+ {0x1d, 0x01250}, /* DE.PATTERN_BG_COLOR */
+ {0x1e, 0x01254}, /* DE.PATTERN_FG_COLOR */
+ {0x23, 0x01258}, /* DE.UNK01258 */
+ {0x1a9, 0x0125C}, /* DE.ROP */
+ {0x1aa, 0x01260}, /* DE.CLIPPING_LEFT_TOP */
+ {0x1ab, 0x01264}, /* DE.CLIPPING_RIGHT_BOTTOM */
+ {0x1ac, 0x01268}, /* DE.CLEAR_BYTE_MASK */
+ {0x1b3, 0x0126C}, /* DE.ROTATION_MIRROR */
+ {0x1af, 0x01270}, /* DE.CLEAR_VALUE_LOW */
+ {0x1b0, 0x01274}, /* DE.CLEAR_VALUE_HIGH */
+ {0x1b5, 0x01278}, /* DE.SOURCE_ORIGIN_FRAC */
+ {0x1b6, 0x0127C}, /* DE.ALPHA_CONTROL */
+ {0x1b7, 0x01280}, /* DE.UNK01280 */
+ {0x1b8, 0x01284}, /* DE.SOURCE_ADDR_PLANE2 */
+ {0x1b9, 0x01288}, /* DE.SOURCE_STRIDE_PLANE2 */
+ {0x1ba, 0x0128C}, /* DE.SOURCE_ADDR_PLANE3 */
+ {0x1bb, 0x01290}, /* DE.SOURCE_STRIDE_PLANE3 */
+ {0x1bd, 0x01298}, /* DE.SOURCE_RECT_LEFT_TOP */
+ {0x1be, 0x0129C}, /* DE.SOURCE_REFT_RIGHT_BOTTOM */
+ {0x1bf, 0x012A0}, /* DE.SOURCE_ORIGIN_X */
+ {0x1c0, 0x012A4}, /* DE.SOURCE_ORIGIN_Y */
+ {0x1c1, 0x012A8}, /* DE.TARGET_RECT_LEFT_TOP */
+ {0x1c2, 0x012AC}, /* DE.TARGET_RECT_RIGHT_BOTTOM */
+ {0x1c7, 0x012B0}, /* DE.UNK012B0 */
+ {0x1c8, 0x012B4}, /* DE.ROTATION_TARGET_HEIGHT */
+ {0x1c9, 0x012B8}, /* DE.ROTATION_SOURCE_HEIGHT */
+ {0x1ca, 0x012BC}, /* DE.MIRROR_EXTENSION */
+ {0x1cb, 0x012C0}, /* DE.CLEAR_VALUE_LOW */
+ {0x1cc, 0x012C4}, /* DE.TARGET_COLOR_KEY_LO */
+ {0x1cd, 0x012C8}, /* DE.SOURCE_GLOBAL_COLOR */
+ {0x1ce, 0x012CC}, /* DE.TARGET_GLOBAL_COLOR */
+ {0x1cf, 0x012D0}, /* DE.MULT_MODE */
+ {0x1d0, 0x012D4}, /* DE.ALPHA_MODE */
+ {0x1d1, 0x012D8}, /* DE.SOURCE_UV_SWIZ_MODE */
+ {0x1d2, 0x012DC}, /* DE.SOURCE_COLOR_KEY_HI */
+ {0x1d3, 0x012E0}, /* DE.TARGET_COLOR_KEY_HI */
+ {0x1c5, 0x012E4}, /* DE.BLIT_TYPE_2 */
+ {0x1029, 0x01400}, /* PE.DEPTH_CONFIG */
+ {0x102a, 0x01404}, /* PE.DEPTH_NEAR */
+ {0x102b, 0x01408}, /* PE.DEPTH_FAR */
+ {0x102c, 0x0140C}, /* PE.DEPTH_NORMALIZE */
+ {0x102d, 0x01410}, /* PE.DEPTH_ADDR */
+ {0x102e, 0x01414}, /* PE.DEPTH_STRIDE */
+ {0x102f, 0x01418}, /* PE.STENCIL_OP */
+ {0x1030, 0x0141C}, /* PE.STENCIL_CONFIG */
+ {0x1031, 0x01420}, /* PE.ALPHA_OP */
+ {0x1032, 0x01424}, /* PE.ALPHA_BLEND_COLOR */
+ {0x1033, 0x01428}, /* PE.ALPHA_CONFIG */
+ {0x1034, 0x0142C}, /* PE.COLOR_FORMAT */
+ {0x1035, 0x01430}, /* PE.COLOR_ADDR */
+ {0x1036, 0x01434}, /* PE.COLOR_STRIDE */
+ {0x1039, 0x01454}, /* PE.UNK01454 */
+ {0x103a, 0x01458}, /* PE.UNK01458 */
+ {0x103b, 0x0145C}, /* PE.UNK0145C */
+ {0x103d, 0x01604}, /* RS.CONFIG */
+ {0x103e, 0x01608}, /* RS.SOURCE_ADDR */
+ {0x103f, 0x0160C}, /* RS.SOURCE_STRIDE */
+ {0x1040, 0x01610}, /* RS.DEST_ADDR */
+ {0x1041, 0x01614}, /* RS.DEST_STRIDE */
+ {0x1043, 0x01620}, /* RS.WINDOW_SIZE */
+ {0x1045, 0x01630}, /* RS.DITHER[0] */
+ {0x1046, 0x01634}, /* RS.DITHER[1] */
+ {0x104f, 0x0163C}, /* RS.CLEAR_CONTROL */
+ {0x1049, 0x01640}, /* RS.FILL_VALUE[0] */
+ {0x104a, 0x01644}, /* RS.FILL_VALUE[1] */
+ {0x104b, 0x01648}, /* RS.FILL_VALUE[2] */
+ {0x104c, 0x0164C}, /* RS.FILL_VALUE[3] */
+ {0x1051, 0x01654}, /* TS.MEM_CONFIG */
+ {0x1053, 0x01658}, /* TS.COLOR_STATUS_BASE */
+ {0x1055, 0x0165C}, /* TS.COLOR_SURFACE_BASE */
+ {0x1056, 0x01660}, /* TS.COLOR_CLEAR_VALUE */
+ {0x1059, 0x01664}, /* TS.DEPTH_STATUS_BASE */
+ {0x105b, 0x01668}, /* TS.DEPTH_SURFACE_BASE */
+ {0x105c, 0x0166C}, /* TS.DEPTH_CLEAR_VALUE */
+ {0x105f, 0x01678}, /* YUV.UNK01678 */
+ {0x1060, 0x0167C}, /* YUV.UNK0167C */
+ {0x1061, 0x01680}, /* YUV.UNK01680 */
+ {0x1062, 0x01684}, /* YUV.UNK01684 */
+ {0x1063, 0x01688}, /* YUV.UNK01688 */
+ {0x1064, 0x0168C}, /* YUV.UNK0168C */
+ {0x1065, 0x01690}, /* YUV.UNK01690 */
+ {0x1066, 0x01694}, /* YUV.UNK01694 */
+ {0x1067, 0x01698}, /* YUV.UNK01698 */
+ {0x1068, 0x0169C}, /* YUV.UNK0169C */
+ {0x1069, 0x016A0}, /* RS.EXTRA_CONFIG */
+ {0x106b, 0x016A4}, /* TS.HDEPTH_BASE */
+ {0x106c, 0x016A8}, /* TS.HDEPTH_CLEAR_VALUE */
+ {0x25, 0x01800}, /* DE.CROSS_KERNEL[0] */
+ {0x26, 0x01804}, /* DE.CROSS_KERNEL[1] */
+ {0x27, 0x01808}, /* DE.CROSS_KERNEL[2] */
+ {0x28, 0x0180C}, /* DE.CROSS_KERNEL[3] */
+ {0x29, 0x01810}, /* DE.CROSS_KERNEL[4] */
+ {0x2a, 0x01814}, /* DE.CROSS_KERNEL[5] */
+ {0x2b, 0x01818}, /* DE.CROSS_KERNEL[6] */
+ {0x2c, 0x0181C}, /* DE.CROSS_KERNEL[7] */
+ {0x2d, 0x01820}, /* DE.CROSS_KERNEL[8] */
+ {0x2e, 0x01824}, /* DE.CROSS_KERNEL[9] */
+ {0x2f, 0x01828}, /* DE.CROSS_KERNEL[10] */
+ {0x30, 0x0182C}, /* DE.CROSS_KERNEL[11] */
+ {0x31, 0x01830}, /* DE.CROSS_KERNEL[12] */
+ {0x32, 0x01834}, /* DE.CROSS_KERNEL[13] */
+ {0x33, 0x01838}, /* DE.CROSS_KERNEL[14] */
+ {0x34, 0x0183C}, /* DE.CROSS_KERNEL[15] */
+ {0x35, 0x01840}, /* DE.CROSS_KERNEL[16] */
+ {0x36, 0x01844}, /* DE.CROSS_KERNEL[17] */
+ {0x37, 0x01848}, /* DE.CROSS_KERNEL[18] */
+ {0x38, 0x0184C}, /* DE.CROSS_KERNEL[19] */
+ {0x39, 0x01850}, /* DE.CROSS_KERNEL[20] */
+ {0x3a, 0x01854}, /* DE.CROSS_KERNEL[21] */
+ {0x3b, 0x01858}, /* DE.CROSS_KERNEL[22] */
+ {0x3c, 0x0185C}, /* DE.CROSS_KERNEL[23] */
+ {0x3d, 0x01860}, /* DE.CROSS_KERNEL[24] */
+ {0x3e, 0x01864}, /* DE.CROSS_KERNEL[25] */
+ {0x3f, 0x01868}, /* DE.CROSS_KERNEL[26] */
+ {0x40, 0x0186C}, /* DE.CROSS_KERNEL[27] */
+ {0x41, 0x01870}, /* DE.CROSS_KERNEL[28] */
+ {0x42, 0x01874}, /* DE.CROSS_KERNEL[29] */
+ {0x43, 0x01878}, /* DE.CROSS_KERNEL[30] */
+ {0x44, 0x0187C}, /* DE.CROSS_KERNEL[31] */
+ {0x45, 0x01880}, /* DE.CROSS_KERNEL[32] */
+ {0x46, 0x01884}, /* DE.CROSS_KERNEL[33] */
+ {0x47, 0x01888}, /* DE.CROSS_KERNEL[34] */
+ {0x48, 0x0188C}, /* DE.CROSS_KERNEL[35] */
+ {0x49, 0x01890}, /* DE.CROSS_KERNEL[36] */
+ {0x4a, 0x01894}, /* DE.CROSS_KERNEL[37] */
+ {0x4b, 0x01898}, /* DE.CROSS_KERNEL[38] */
+ {0x4c, 0x0189C}, /* DE.CROSS_KERNEL[39] */
+ {0x4d, 0x018A0}, /* DE.CROSS_KERNEL[40] */
+ {0x4e, 0x018A4}, /* DE.CROSS_KERNEL[41] */
+ {0x4f, 0x018A8}, /* DE.CROSS_KERNEL[42] */
+ {0x50, 0x018AC}, /* DE.CROSS_KERNEL[43] */
+ {0x51, 0x018B0}, /* DE.CROSS_KERNEL[44] */
+ {0x52, 0x018B4}, /* DE.CROSS_KERNEL[45] */
+ {0x53, 0x018B8}, /* DE.CROSS_KERNEL[46] */
+ {0x54, 0x018BC}, /* DE.CROSS_KERNEL[47] */
+ {0x55, 0x018C0}, /* DE.CROSS_KERNEL[48] */
+ {0x56, 0x018C4}, /* DE.CROSS_KERNEL[49] */
+ {0x57, 0x018C8}, /* DE.CROSS_KERNEL[50] */
+ {0x58, 0x018CC}, /* DE.CROSS_KERNEL[51] */
+ {0x59, 0x018D0}, /* DE.CROSS_KERNEL[52] */
+ {0x5a, 0x018D4}, /* DE.CROSS_KERNEL[53] */
+ {0x5b, 0x018D8}, /* DE.CROSS_KERNEL[54] */
+ {0x5c, 0x018DC}, /* DE.CROSS_KERNEL[55] */
+ {0x5d, 0x018E0}, /* DE.CROSS_KERNEL[56] */
+ {0x5e, 0x018E4}, /* DE.CROSS_KERNEL[57] */
+ {0x5f, 0x018E8}, /* DE.CROSS_KERNEL[58] */
+ {0x60, 0x018EC}, /* DE.CROSS_KERNEL[59] */
+ {0x61, 0x018F0}, /* DE.CROSS_KERNEL[60] */
+ {0x62, 0x018F4}, /* DE.CROSS_KERNEL[61] */
+ {0x63, 0x018F8}, /* DE.CROSS_KERNEL[62] */
+ {0x64, 0x018FC}, /* DE.CROSS_KERNEL[63] */
+ {0x65, 0x01900}, /* DE.CROSS_KERNEL[64] */
+ {0x66, 0x01904}, /* DE.CROSS_KERNEL[65] */
+ {0x67, 0x01908}, /* DE.CROSS_KERNEL[66] */
+ {0x68, 0x0190C}, /* DE.CROSS_KERNEL[67] */
+ {0x69, 0x01910}, /* DE.CROSS_KERNEL[68] */
+ {0x6a, 0x01914}, /* DE.CROSS_KERNEL[69] */
+ {0x6b, 0x01918}, /* DE.CROSS_KERNEL[70] */
+ {0x6c, 0x0191C}, /* DE.CROSS_KERNEL[71] */
+ {0x6d, 0x01920}, /* DE.CROSS_KERNEL[72] */
+ {0x6e, 0x01924}, /* DE.CROSS_KERNEL[73] */
+ {0x6f, 0x01928}, /* DE.CROSS_KERNEL[74] */
+ {0x70, 0x0192C}, /* DE.CROSS_KERNEL[75] */
+ {0x71, 0x01930}, /* DE.CROSS_KERNEL[76] */
+ {0x72, 0x01934}, /* DE.CROSS_KERNEL[77] */
+ {0x73, 0x01938}, /* DE.CROSS_KERNEL[78] */
+ {0x74, 0x0193C}, /* DE.CROSS_KERNEL[79] */
+ {0x75, 0x01940}, /* DE.CROSS_KERNEL[80] */
+ {0x76, 0x01944}, /* DE.CROSS_KERNEL[81] */
+ {0x77, 0x01948}, /* DE.CROSS_KERNEL[82] */
+ {0x78, 0x0194C}, /* DE.CROSS_KERNEL[83] */
+ {0x79, 0x01950}, /* DE.CROSS_KERNEL[84] */
+ {0x7a, 0x01954}, /* DE.CROSS_KERNEL[85] */
+ {0x7b, 0x01958}, /* DE.CROSS_KERNEL[86] */
+ {0x7c, 0x0195C}, /* DE.CROSS_KERNEL[87] */
+ {0x7d, 0x01960}, /* DE.CROSS_KERNEL[88] */
+ {0x7e, 0x01964}, /* DE.CROSS_KERNEL[89] */
+ {0x7f, 0x01968}, /* DE.CROSS_KERNEL[90] */
+ {0x80, 0x0196C}, /* DE.CROSS_KERNEL[91] */
+ {0x81, 0x01970}, /* DE.CROSS_KERNEL[92] */
+ {0x82, 0x01974}, /* DE.CROSS_KERNEL[93] */
+ {0x83, 0x01978}, /* DE.CROSS_KERNEL[94] */
+ {0x84, 0x0197C}, /* DE.CROSS_KERNEL[95] */
+ {0x85, 0x01980}, /* DE.CROSS_KERNEL[96] */
+ {0x86, 0x01984}, /* DE.CROSS_KERNEL[97] */
+ {0x87, 0x01988}, /* DE.CROSS_KERNEL[98] */
+ {0x88, 0x0198C}, /* DE.CROSS_KERNEL[99] */
+ {0x89, 0x01990}, /* DE.CROSS_KERNEL[100] */
+ {0x8a, 0x01994}, /* DE.CROSS_KERNEL[101] */
+ {0x8b, 0x01998}, /* DE.CROSS_KERNEL[102] */
+ {0x8c, 0x0199C}, /* DE.CROSS_KERNEL[103] */
+ {0x8d, 0x019A0}, /* DE.CROSS_KERNEL[104] */
+ {0x8e, 0x019A4}, /* DE.CROSS_KERNEL[105] */
+ {0x8f, 0x019A8}, /* DE.CROSS_KERNEL[106] */
+ {0x90, 0x019AC}, /* DE.CROSS_KERNEL[107] */
+ {0x91, 0x019B0}, /* DE.CROSS_KERNEL[108] */
+ {0x92, 0x019B4}, /* DE.CROSS_KERNEL[109] */
+ {0x93, 0x019B8}, /* DE.CROSS_KERNEL[110] */
+ {0x94, 0x019BC}, /* DE.CROSS_KERNEL[111] */
+ {0x95, 0x019C0}, /* DE.CROSS_KERNEL[112] */
+ {0x96, 0x019C4}, /* DE.CROSS_KERNEL[113] */
+ {0x97, 0x019C8}, /* DE.CROSS_KERNEL[114] */
+ {0x98, 0x019CC}, /* DE.CROSS_KERNEL[115] */
+ {0x99, 0x019D0}, /* DE.CROSS_KERNEL[116] */
+ {0x9a, 0x019D4}, /* DE.CROSS_KERNEL[117] */
+ {0x9b, 0x019D8}, /* DE.CROSS_KERNEL[118] */
+ {0x9c, 0x019DC}, /* DE.CROSS_KERNEL[119] */
+ {0x9d, 0x019E0}, /* DE.CROSS_KERNEL[120] */
+ {0x9e, 0x019E4}, /* DE.CROSS_KERNEL[121] */
+ {0x9f, 0x019E8}, /* DE.CROSS_KERNEL[122] */
+ {0xa0, 0x019EC}, /* DE.CROSS_KERNEL[123] */
+ {0xa1, 0x019F0}, /* DE.CROSS_KERNEL[124] */
+ {0xa2, 0x019F4}, /* DE.CROSS_KERNEL[125] */
+ {0xa3, 0x019F8}, /* DE.CROSS_KERNEL[126] */
+ {0xa4, 0x019FC}, /* DE.CROSS_KERNEL[127] */
+ {0xa7, 0x01C00}, /* DE.PALETTE[0] */
+ {0xa8, 0x01C04}, /* DE.PALETTE[1] */
+ {0xa9, 0x01C08}, /* DE.PALETTE[2] */
+ {0xaa, 0x01C0C}, /* DE.PALETTE[3] */
+ {0xab, 0x01C10}, /* DE.PALETTE[4] */
+ {0xac, 0x01C14}, /* DE.PALETTE[5] */
+ {0xad, 0x01C18}, /* DE.PALETTE[6] */
+ {0xae, 0x01C1C}, /* DE.PALETTE[7] */
+ {0xaf, 0x01C20}, /* DE.PALETTE[8] */
+ {0xb0, 0x01C24}, /* DE.PALETTE[9] */
+ {0xb1, 0x01C28}, /* DE.PALETTE[10] */
+ {0xb2, 0x01C2C}, /* DE.PALETTE[11] */
+ {0xb3, 0x01C30}, /* DE.PALETTE[12] */
+ {0xb4, 0x01C34}, /* DE.PALETTE[13] */
+ {0xb5, 0x01C38}, /* DE.PALETTE[14] */
+ {0xb6, 0x01C3C}, /* DE.PALETTE[15] */
+ {0xb7, 0x01C40}, /* DE.PALETTE[16] */
+ {0xb8, 0x01C44}, /* DE.PALETTE[17] */
+ {0xb9, 0x01C48}, /* DE.PALETTE[18] */
+ {0xba, 0x01C4C}, /* DE.PALETTE[19] */
+ {0xbb, 0x01C50}, /* DE.PALETTE[20] */
+ {0xbc, 0x01C54}, /* DE.PALETTE[21] */
+ {0xbd, 0x01C58}, /* DE.PALETTE[22] */
+ {0xbe, 0x01C5C}, /* DE.PALETTE[23] */
+ {0xbf, 0x01C60}, /* DE.PALETTE[24] */
+ {0xc0, 0x01C64}, /* DE.PALETTE[25] */
+ {0xc1, 0x01C68}, /* DE.PALETTE[26] */
+ {0xc2, 0x01C6C}, /* DE.PALETTE[27] */
+ {0xc3, 0x01C70}, /* DE.PALETTE[28] */
+ {0xc4, 0x01C74}, /* DE.PALETTE[29] */
+ {0xc5, 0x01C78}, /* DE.PALETTE[30] */
+ {0xc6, 0x01C7C}, /* DE.PALETTE[31] */
+ {0xc7, 0x01C80}, /* DE.PALETTE[32] */
+ {0xc8, 0x01C84}, /* DE.PALETTE[33] */
+ {0xc9, 0x01C88}, /* DE.PALETTE[34] */
+ {0xca, 0x01C8C}, /* DE.PALETTE[35] */
+ {0xcb, 0x01C90}, /* DE.PALETTE[36] */
+ {0xcc, 0x01C94}, /* DE.PALETTE[37] */
+ {0xcd, 0x01C98}, /* DE.PALETTE[38] */
+ {0xce, 0x01C9C}, /* DE.PALETTE[39] */
+ {0xcf, 0x01CA0}, /* DE.PALETTE[40] */
+ {0xd0, 0x01CA4}, /* DE.PALETTE[41] */
+ {0xd1, 0x01CA8}, /* DE.PALETTE[42] */
+ {0xd2, 0x01CAC}, /* DE.PALETTE[43] */
+ {0xd3, 0x01CB0}, /* DE.PALETTE[44] */
+ {0xd4, 0x01CB4}, /* DE.PALETTE[45] */
+ {0xd5, 0x01CB8}, /* DE.PALETTE[46] */
+ {0xd6, 0x01CBC}, /* DE.PALETTE[47] */
+ {0xd7, 0x01CC0}, /* DE.PALETTE[48] */
+ {0xd8, 0x01CC4}, /* DE.PALETTE[49] */
+ {0xd9, 0x01CC8}, /* DE.PALETTE[50] */
+ {0xda, 0x01CCC}, /* DE.PALETTE[51] */
+ {0xdb, 0x01CD0}, /* DE.PALETTE[52] */
+ {0xdc, 0x01CD4}, /* DE.PALETTE[53] */
+ {0xdd, 0x01CD8}, /* DE.PALETTE[54] */
+ {0xde, 0x01CDC}, /* DE.PALETTE[55] */
+ {0xdf, 0x01CE0}, /* DE.PALETTE[56] */
+ {0xe0, 0x01CE4}, /* DE.PALETTE[57] */
+ {0xe1, 0x01CE8}, /* DE.PALETTE[58] */
+ {0xe2, 0x01CEC}, /* DE.PALETTE[59] */
+ {0xe3, 0x01CF0}, /* DE.PALETTE[60] */
+ {0xe4, 0x01CF4}, /* DE.PALETTE[61] */
+ {0xe5, 0x01CF8}, /* DE.PALETTE[62] */
+ {0xe6, 0x01CFC}, /* DE.PALETTE[63] */
+ {0xe7, 0x01D00}, /* DE.PALETTE[64] */
+ {0xe8, 0x01D04}, /* DE.PALETTE[65] */
+ {0xe9, 0x01D08}, /* DE.PALETTE[66] */
+ {0xea, 0x01D0C}, /* DE.PALETTE[67] */
+ {0xeb, 0x01D10}, /* DE.PALETTE[68] */
+ {0xec, 0x01D14}, /* DE.PALETTE[69] */
+ {0xed, 0x01D18}, /* DE.PALETTE[70] */
+ {0xee, 0x01D1C}, /* DE.PALETTE[71] */
+ {0xef, 0x01D20}, /* DE.PALETTE[72] */
+ {0xf0, 0x01D24}, /* DE.PALETTE[73] */
+ {0xf1, 0x01D28}, /* DE.PALETTE[74] */
+ {0xf2, 0x01D2C}, /* DE.PALETTE[75] */
+ {0xf3, 0x01D30}, /* DE.PALETTE[76] */
+ {0xf4, 0x01D34}, /* DE.PALETTE[77] */
+ {0xf5, 0x01D38}, /* DE.PALETTE[78] */
+ {0xf6, 0x01D3C}, /* DE.PALETTE[79] */
+ {0xf7, 0x01D40}, /* DE.PALETTE[80] */
+ {0xf8, 0x01D44}, /* DE.PALETTE[81] */
+ {0xf9, 0x01D48}, /* DE.PALETTE[82] */
+ {0xfa, 0x01D4C}, /* DE.PALETTE[83] */
+ {0xfb, 0x01D50}, /* DE.PALETTE[84] */
+ {0xfc, 0x01D54}, /* DE.PALETTE[85] */
+ {0xfd, 0x01D58}, /* DE.PALETTE[86] */
+ {0xfe, 0x01D5C}, /* DE.PALETTE[87] */
+ {0xff, 0x01D60}, /* DE.PALETTE[88] */
+ {0x100, 0x01D64}, /* DE.PALETTE[89] */
+ {0x101, 0x01D68}, /* DE.PALETTE[90] */
+ {0x102, 0x01D6C}, /* DE.PALETTE[91] */
+ {0x103, 0x01D70}, /* DE.PALETTE[92] */
+ {0x104, 0x01D74}, /* DE.PALETTE[93] */
+ {0x105, 0x01D78}, /* DE.PALETTE[94] */
+ {0x106, 0x01D7C}, /* DE.PALETTE[95] */
+ {0x107, 0x01D80}, /* DE.PALETTE[96] */
+ {0x108, 0x01D84}, /* DE.PALETTE[97] */
+ {0x109, 0x01D88}, /* DE.PALETTE[98] */
+ {0x10a, 0x01D8C}, /* DE.PALETTE[99] */
+ {0x10b, 0x01D90}, /* DE.PALETTE[100] */
+ {0x10c, 0x01D94}, /* DE.PALETTE[101] */
+ {0x10d, 0x01D98}, /* DE.PALETTE[102] */
+ {0x10e, 0x01D9C}, /* DE.PALETTE[103] */
+ {0x10f, 0x01DA0}, /* DE.PALETTE[104] */
+ {0x110, 0x01DA4}, /* DE.PALETTE[105] */
+ {0x111, 0x01DA8}, /* DE.PALETTE[106] */
+ {0x112, 0x01DAC}, /* DE.PALETTE[107] */
+ {0x113, 0x01DB0}, /* DE.PALETTE[108] */
+ {0x114, 0x01DB4}, /* DE.PALETTE[109] */
+ {0x115, 0x01DB8}, /* DE.PALETTE[110] */
+ {0x116, 0x01DBC}, /* DE.PALETTE[111] */
+ {0x117, 0x01DC0}, /* DE.PALETTE[112] */
+ {0x118, 0x01DC4}, /* DE.PALETTE[113] */
+ {0x119, 0x01DC8}, /* DE.PALETTE[114] */
+ {0x11a, 0x01DCC}, /* DE.PALETTE[115] */
+ {0x11b, 0x01DD0}, /* DE.PALETTE[116] */
+ {0x11c, 0x01DD4}, /* DE.PALETTE[117] */
+ {0x11d, 0x01DD8}, /* DE.PALETTE[118] */
+ {0x11e, 0x01DDC}, /* DE.PALETTE[119] */
+ {0x11f, 0x01DE0}, /* DE.PALETTE[120] */
+ {0x120, 0x01DE4}, /* DE.PALETTE[121] */
+ {0x121, 0x01DE8}, /* DE.PALETTE[122] */
+ {0x122, 0x01DEC}, /* DE.PALETTE[123] */
+ {0x123, 0x01DF0}, /* DE.PALETTE[124] */
+ {0x124, 0x01DF4}, /* DE.PALETTE[125] */
+ {0x125, 0x01DF8}, /* DE.PALETTE[126] */
+ {0x126, 0x01DFC}, /* DE.PALETTE[127] */
+ {0x127, 0x01E00}, /* DE.PALETTE[128] */
+ {0x128, 0x01E04}, /* DE.PALETTE[129] */
+ {0x129, 0x01E08}, /* DE.PALETTE[130] */
+ {0x12a, 0x01E0C}, /* DE.PALETTE[131] */
+ {0x12b, 0x01E10}, /* DE.PALETTE[132] */
+ {0x12c, 0x01E14}, /* DE.PALETTE[133] */
+ {0x12d, 0x01E18}, /* DE.PALETTE[134] */
+ {0x12e, 0x01E1C}, /* DE.PALETTE[135] */
+ {0x12f, 0x01E20}, /* DE.PALETTE[136] */
+ {0x130, 0x01E24}, /* DE.PALETTE[137] */
+ {0x131, 0x01E28}, /* DE.PALETTE[138] */
+ {0x132, 0x01E2C}, /* DE.PALETTE[139] */
+ {0x133, 0x01E30}, /* DE.PALETTE[140] */
+ {0x134, 0x01E34}, /* DE.PALETTE[141] */
+ {0x135, 0x01E38}, /* DE.PALETTE[142] */
+ {0x136, 0x01E3C}, /* DE.PALETTE[143] */
+ {0x137, 0x01E40}, /* DE.PALETTE[144] */
+ {0x138, 0x01E44}, /* DE.PALETTE[145] */
+ {0x139, 0x01E48}, /* DE.PALETTE[146] */
+ {0x13a, 0x01E4C}, /* DE.PALETTE[147] */
+ {0x13b, 0x01E50}, /* DE.PALETTE[148] */
+ {0x13c, 0x01E54}, /* DE.PALETTE[149] */
+ {0x13d, 0x01E58}, /* DE.PALETTE[150] */
+ {0x13e, 0x01E5C}, /* DE.PALETTE[151] */
+ {0x13f, 0x01E60}, /* DE.PALETTE[152] */
+ {0x140, 0x01E64}, /* DE.PALETTE[153] */
+ {0x141, 0x01E68}, /* DE.PALETTE[154] */
+ {0x142, 0x01E6C}, /* DE.PALETTE[155] */
+ {0x143, 0x01E70}, /* DE.PALETTE[156] */
+ {0x144, 0x01E74}, /* DE.PALETTE[157] */
+ {0x145, 0x01E78}, /* DE.PALETTE[158] */
+ {0x146, 0x01E7C}, /* DE.PALETTE[159] */
+ {0x147, 0x01E80}, /* DE.PALETTE[160] */
+ {0x148, 0x01E84}, /* DE.PALETTE[161] */
+ {0x149, 0x01E88}, /* DE.PALETTE[162] */
+ {0x14a, 0x01E8C}, /* DE.PALETTE[163] */
+ {0x14b, 0x01E90}, /* DE.PALETTE[164] */
+ {0x14c, 0x01E94}, /* DE.PALETTE[165] */
+ {0x14d, 0x01E98}, /* DE.PALETTE[166] */
+ {0x14e, 0x01E9C}, /* DE.PALETTE[167] */
+ {0x14f, 0x01EA0}, /* DE.PALETTE[168] */
+ {0x150, 0x01EA4}, /* DE.PALETTE[169] */
+ {0x151, 0x01EA8}, /* DE.PALETTE[170] */
+ {0x152, 0x01EAC}, /* DE.PALETTE[171] */
+ {0x153, 0x01EB0}, /* DE.PALETTE[172] */
+ {0x154, 0x01EB4}, /* DE.PALETTE[173] */
+ {0x155, 0x01EB8}, /* DE.PALETTE[174] */
+ {0x156, 0x01EBC}, /* DE.PALETTE[175] */
+ {0x157, 0x01EC0}, /* DE.PALETTE[176] */
+ {0x158, 0x01EC4}, /* DE.PALETTE[177] */
+ {0x159, 0x01EC8}, /* DE.PALETTE[178] */
+ {0x15a, 0x01ECC}, /* DE.PALETTE[179] */
+ {0x15b, 0x01ED0}, /* DE.PALETTE[180] */
+ {0x15c, 0x01ED4}, /* DE.PALETTE[181] */
+ {0x15d, 0x01ED8}, /* DE.PALETTE[182] */
+ {0x15e, 0x01EDC}, /* DE.PALETTE[183] */
+ {0x15f, 0x01EE0}, /* DE.PALETTE[184] */
+ {0x160, 0x01EE4}, /* DE.PALETTE[185] */
+ {0x161, 0x01EE8}, /* DE.PALETTE[186] */
+ {0x162, 0x01EEC}, /* DE.PALETTE[187] */
+ {0x163, 0x01EF0}, /* DE.PALETTE[188] */
+ {0x164, 0x01EF4}, /* DE.PALETTE[189] */
+ {0x165, 0x01EF8}, /* DE.PALETTE[190] */
+ {0x166, 0x01EFC}, /* DE.PALETTE[191] */
+ {0x167, 0x01F00}, /* DE.PALETTE[192] */
+ {0x168, 0x01F04}, /* DE.PALETTE[193] */
+ {0x169, 0x01F08}, /* DE.PALETTE[194] */
+ {0x16a, 0x01F0C}, /* DE.PALETTE[195] */
+ {0x16b, 0x01F10}, /* DE.PALETTE[196] */
+ {0x16c, 0x01F14}, /* DE.PALETTE[197] */
+ {0x16d, 0x01F18}, /* DE.PALETTE[198] */
+ {0x16e, 0x01F1C}, /* DE.PALETTE[199] */
+ {0x16f, 0x01F20}, /* DE.PALETTE[200] */
+ {0x170, 0x01F24}, /* DE.PALETTE[201] */
+ {0x171, 0x01F28}, /* DE.PALETTE[202] */
+ {0x172, 0x01F2C}, /* DE.PALETTE[203] */
+ {0x173, 0x01F30}, /* DE.PALETTE[204] */
+ {0x174, 0x01F34}, /* DE.PALETTE[205] */
+ {0x175, 0x01F38}, /* DE.PALETTE[206] */
+ {0x176, 0x01F3C}, /* DE.PALETTE[207] */
+ {0x177, 0x01F40}, /* DE.PALETTE[208] */
+ {0x178, 0x01F44}, /* DE.PALETTE[209] */
+ {0x179, 0x01F48}, /* DE.PALETTE[210] */
+ {0x17a, 0x01F4C}, /* DE.PALETTE[211] */
+ {0x17b, 0x01F50}, /* DE.PALETTE[212] */
+ {0x17c, 0x01F54}, /* DE.PALETTE[213] */
+ {0x17d, 0x01F58}, /* DE.PALETTE[214] */
+ {0x17e, 0x01F5C}, /* DE.PALETTE[215] */
+ {0x17f, 0x01F60}, /* DE.PALETTE[216] */
+ {0x180, 0x01F64}, /* DE.PALETTE[217] */
+ {0x181, 0x01F68}, /* DE.PALETTE[218] */
+ {0x182, 0x01F6C}, /* DE.PALETTE[219] */
+ {0x183, 0x01F70}, /* DE.PALETTE[220] */
+ {0x184, 0x01F74}, /* DE.PALETTE[221] */
+ {0x185, 0x01F78}, /* DE.PALETTE[222] */
+ {0x186, 0x01F7C}, /* DE.PALETTE[223] */
+ {0x187, 0x01F80}, /* DE.PALETTE[224] */
+ {0x188, 0x01F84}, /* DE.PALETTE[225] */
+ {0x189, 0x01F88}, /* DE.PALETTE[226] */
+ {0x18a, 0x01F8C}, /* DE.PALETTE[227] */
+ {0x18b, 0x01F90}, /* DE.PALETTE[228] */
+ {0x18c, 0x01F94}, /* DE.PALETTE[229] */
+ {0x18d, 0x01F98}, /* DE.PALETTE[230] */
+ {0x18e, 0x01F9C}, /* DE.PALETTE[231] */
+ {0x18f, 0x01FA0}, /* DE.PALETTE[232] */
+ {0x190, 0x01FA4}, /* DE.PALETTE[233] */
+ {0x191, 0x01FA8}, /* DE.PALETTE[234] */
+ {0x192, 0x01FAC}, /* DE.PALETTE[235] */
+ {0x193, 0x01FB0}, /* DE.PALETTE[236] */
+ {0x194, 0x01FB4}, /* DE.PALETTE[237] */
+ {0x195, 0x01FB8}, /* DE.PALETTE[238] */
+ {0x196, 0x01FBC}, /* DE.PALETTE[239] */
+ {0x197, 0x01FC0}, /* DE.PALETTE[240] */
+ {0x198, 0x01FC4}, /* DE.PALETTE[241] */
+ {0x199, 0x01FC8}, /* DE.PALETTE[242] */
+ {0x19a, 0x01FCC}, /* DE.PALETTE[243] */
+ {0x19b, 0x01FD0}, /* DE.PALETTE[244] */
+ {0x19c, 0x01FD4}, /* DE.PALETTE[245] */
+ {0x19d, 0x01FD8}, /* DE.PALETTE[246] */
+ {0x19e, 0x01FDC}, /* DE.PALETTE[247] */
+ {0x19f, 0x01FE0}, /* DE.PALETTE[248] */
+ {0x1a0, 0x01FE4}, /* DE.PALETTE[249] */
+ {0x1a1, 0x01FE8}, /* DE.PALETTE[250] */
+ {0x1a2, 0x01FEC}, /* DE.PALETTE[251] */
+ {0x1a3, 0x01FF0}, /* DE.PALETTE[252] */
+ {0x1a4, 0x01FF4}, /* DE.PALETTE[253] */
+ {0x1a5, 0x01FF8}, /* DE.PALETTE[254] */
+ {0x1a6, 0x01FFC}, /* DE.PALETTE[255] */
+ {0xf01, 0x02000}, /* TE.SAMPLER[0].CONFIG_1 */
+ {0xf02, 0x02004}, /* TE.SAMPLER[1].CONFIG_1 */
+ {0xf03, 0x02008}, /* TE.SAMPLER[2].CONFIG_1 */
+ {0xf04, 0x0200C}, /* TE.SAMPLER[3].CONFIG_1 */
+ {0xf05, 0x02010}, /* TE.SAMPLER[4].CONFIG_1 */
+ {0xf06, 0x02014}, /* TE.SAMPLER[5].CONFIG_1 */
+ {0xf07, 0x02018}, /* TE.SAMPLER[6].CONFIG_1 */
+ {0xf08, 0x0201C}, /* TE.SAMPLER[7].CONFIG_1 */
+ {0xf09, 0x02020}, /* TE.SAMPLER[8].CONFIG_1 */
+ {0xf0a, 0x02024}, /* TE.SAMPLER[9].CONFIG_1 */
+ {0xf0b, 0x02028}, /* TE.SAMPLER[10].CONFIG_1 */
+ {0xf0c, 0x0202C}, /* TE.SAMPLER[11].CONFIG_1 */
+ {0xf0d, 0x02030}, /* */
+ {0xf0e, 0x02034}, /* */
+ {0xf0f, 0x02038}, /* */
+ {0xf10, 0x0203C}, /* */
+ {0xf11, 0x02040}, /* TE.SAMPLER[0].SIZE */
+ {0xf12, 0x02044}, /* TE.SAMPLER[1].SIZE */
+ {0xf13, 0x02048}, /* TE.SAMPLER[2].SIZE */
+ {0xf14, 0x0204C}, /* TE.SAMPLER[3].SIZE */
+ {0xf15, 0x02050}, /* TE.SAMPLER[4].SIZE */
+ {0xf16, 0x02054}, /* TE.SAMPLER[5].SIZE */
+ {0xf17, 0x02058}, /* TE.SAMPLER[6].SIZE */
+ {0xf18, 0x0205C}, /* TE.SAMPLER[7].SIZE */
+ {0xf19, 0x02060}, /* TE.SAMPLER[8].SIZE */
+ {0xf1a, 0x02064}, /* TE.SAMPLER[9].SIZE */
+ {0xf1b, 0x02068}, /* TE.SAMPLER[10].SIZE */
+ {0xf1c, 0x0206C}, /* TE.SAMPLER[11].SIZE */
+ {0xf1d, 0x02070}, /* */
+ {0xf1e, 0x02074}, /* */
+ {0xf1f, 0x02078}, /* */
+ {0xf20, 0x0207C}, /* */
+ {0xf21, 0x02080}, /* TE.SAMPLER[0].LOG_SIZE */
+ {0xf22, 0x02084}, /* TE.SAMPLER[1].LOG_SIZE */
+ {0xf23, 0x02088}, /* TE.SAMPLER[2].LOG_SIZE */
+ {0xf24, 0x0208C}, /* TE.SAMPLER[3].LOG_SIZE */
+ {0xf25, 0x02090}, /* TE.SAMPLER[4].LOG_SIZE */
+ {0xf26, 0x02094}, /* TE.SAMPLER[5].LOG_SIZE */
+ {0xf27, 0x02098}, /* TE.SAMPLER[6].LOG_SIZE */
+ {0xf28, 0x0209C}, /* TE.SAMPLER[7].LOG_SIZE */
+ {0xf29, 0x020A0}, /* TE.SAMPLER[8].LOG_SIZE */
+ {0xf2a, 0x020A4}, /* TE.SAMPLER[9].LOG_SIZE */
+ {0xf2b, 0x020A8}, /* TE.SAMPLER[10].LOG_SIZE */
+ {0xf2c, 0x020AC}, /* TE.SAMPLER[11].LOG_SIZE */
+ {0xf2f, 0x020C0}, /* TE.SAMPLER[0].LOD */
+ {0xf30, 0x020C4}, /* TE.SAMPLER[1].LOD */
+ {0xf31, 0x020C8}, /* TE.SAMPLER[2].LOD */
+ {0xf32, 0x020CC}, /* TE.SAMPLER[3].LOD */
+ {0xf33, 0x020D0}, /* TE.SAMPLER[4].LOD */
+ {0xf34, 0x020D4}, /* TE.SAMPLER[5].LOD */
+ {0xf35, 0x020D8}, /* TE.SAMPLER[6].LOD */
+ {0xf36, 0x020DC}, /* TE.SAMPLER[7].LOD */
+ {0xf37, 0x020E0}, /* TE.SAMPLER[8].LOD */
+ {0xf38, 0x020E4}, /* TE.SAMPLER[9].LOD */
+ {0xf39, 0x020E8}, /* TE.SAMPLER[10].LOD */
+ {0xf3a, 0x020EC}, /* TE.SAMPLER[11].LOD */
+ {0xf3d, 0x02100}, /* TE.SAMPLER[0].UNK02100 */
+ {0xf3e, 0x02104}, /* TE.SAMPLER[1].UNK02100 */
+ {0xf3f, 0x02108}, /* TE.SAMPLER[2].UNK02100 */
+ {0xf40, 0x0210C}, /* TE.SAMPLER[3].UNK02100 */
+ {0xf41, 0x02110}, /* TE.SAMPLER[4].UNK02100 */
+ {0xf42, 0x02114}, /* TE.SAMPLER[5].UNK02100 */
+ {0xf43, 0x02118}, /* TE.SAMPLER[6].UNK02100 */
+ {0xf44, 0x0211C}, /* TE.SAMPLER[7].UNK02100 */
+ {0xf45, 0x02120}, /* TE.SAMPLER[8].UNK02100 */
+ {0xf46, 0x02124}, /* TE.SAMPLER[9].UNK02100 */
+ {0xf47, 0x02128}, /* TE.SAMPLER[10].UNK02100 */
+ {0xf48, 0x0212C}, /* TE.SAMPLER[11].UNK02100 */
+ {0xf4b, 0x02140}, /* TE.SAMPLER[0].UNK02140 */
+ {0xf4c, 0x02144}, /* TE.SAMPLER[1].UNK02140 */
+ {0xf4d, 0x02148}, /* TE.SAMPLER[2].UNK02140 */
+ {0xf4e, 0x0214C}, /* TE.SAMPLER[3].UNK02140 */
+ {0xf4f, 0x02150}, /* TE.SAMPLER[4].UNK02140 */
+ {0xf50, 0x02154}, /* TE.SAMPLER[5].UNK02140 */
+ {0xf51, 0x02158}, /* TE.SAMPLER[6].UNK02140 */
+ {0xf52, 0x0215C}, /* TE.SAMPLER[7].UNK02140 */
+ {0xf53, 0x02160}, /* TE.SAMPLER[8].UNK02140 */
+ {0xf54, 0x02164}, /* TE.SAMPLER[9].UNK02140 */
+ {0xf55, 0x02168}, /* TE.SAMPLER[10].UNK02140 */
+ {0xf56, 0x0216C}, /* TE.SAMPLER[11].UNK02140 */
+ {0xf57, 0x02170}, /* */
+ {0xf58, 0x02174}, /* */
+ {0xf59, 0x02178}, /* */
+ {0xf5a, 0x0217C}, /* */
+ {0xf5d, 0x02400}, /* TE.SAMPLER[0].LOD_ADDR[0] */
+ {0xf5e, 0x02404}, /* TE.SAMPLER[1].LOD_ADDR[0] */
+ {0xf5f, 0x02408}, /* TE.SAMPLER[2].LOD_ADDR[0] */
+ {0xf60, 0x0240C}, /* TE.SAMPLER[3].LOD_ADDR[0] */
+ {0xf61, 0x02410}, /* TE.SAMPLER[4].LOD_ADDR[0] */
+ {0xf62, 0x02414}, /* TE.SAMPLER[5].LOD_ADDR[0] */
+ {0xf63, 0x02418}, /* TE.SAMPLER[6].LOD_ADDR[0] */
+ {0xf64, 0x0241C}, /* TE.SAMPLER[7].LOD_ADDR[0] */
+ {0xf65, 0x02420}, /* TE.SAMPLER[8].LOD_ADDR[0] */
+ {0xf66, 0x02424}, /* TE.SAMPLER[9].LOD_ADDR[0] */
+ {0xf67, 0x02428}, /* TE.SAMPLER[10].LOD_ADDR[0] */
+ {0xf68, 0x0242C}, /* TE.SAMPLER[11].LOD_ADDR[0] */
+ {0xf69, 0x02430}, /* */
+ {0xf6a, 0x02434}, /* */
+ {0xf6b, 0x02438}, /* */
+ {0xf6c, 0x0243C}, /* */
+ {0xf6d, 0x02440}, /* TE.SAMPLER[0].LOD_ADDR[1] */
+ {0xf6e, 0x02444}, /* TE.SAMPLER[1].LOD_ADDR[1] */
+ {0xf6f, 0x02448}, /* TE.SAMPLER[2].LOD_ADDR[1] */
+ {0xf70, 0x0244C}, /* TE.SAMPLER[3].LOD_ADDR[1] */
+ {0xf71, 0x02450}, /* TE.SAMPLER[4].LOD_ADDR[1] */
+ {0xf72, 0x02454}, /* TE.SAMPLER[5].LOD_ADDR[1] */
+ {0xf73, 0x02458}, /* TE.SAMPLER[6].LOD_ADDR[1] */
+ {0xf74, 0x0245C}, /* TE.SAMPLER[7].LOD_ADDR[1] */
+ {0xf75, 0x02460}, /* TE.SAMPLER[8].LOD_ADDR[1] */
+ {0xf76, 0x02464}, /* TE.SAMPLER[9].LOD_ADDR[1] */
+ {0xf77, 0x02468}, /* TE.SAMPLER[10].LOD_ADDR[1] */
+ {0xf78, 0x0246C}, /* TE.SAMPLER[11].LOD_ADDR[1] */
+ {0xf7b, 0x02480}, /* TE.SAMPLER[0].LOD_ADDR[2] */
+ {0xf7c, 0x02484}, /* TE.SAMPLER[1].LOD_ADDR[2] */
+ {0xf7d, 0x02488}, /* TE.SAMPLER[2].LOD_ADDR[2] */
+ {0xf7e, 0x0248C}, /* TE.SAMPLER[3].LOD_ADDR[2] */
+ {0xf7f, 0x02490}, /* TE.SAMPLER[4].LOD_ADDR[2] */
+ {0xf80, 0x02494}, /* TE.SAMPLER[5].LOD_ADDR[2] */
+ {0xf81, 0x02498}, /* TE.SAMPLER[6].LOD_ADDR[2] */
+ {0xf82, 0x0249C}, /* TE.SAMPLER[7].LOD_ADDR[2] */
+ {0xf83, 0x024A0}, /* TE.SAMPLER[8].LOD_ADDR[2] */
+ {0xf84, 0x024A4}, /* TE.SAMPLER[9].LOD_ADDR[2] */
+ {0xf85, 0x024A8}, /* TE.SAMPLER[10].LOD_ADDR[2] */
+ {0xf86, 0x024AC}, /* TE.SAMPLER[11].LOD_ADDR[2] */
+ {0xf89, 0x024C0}, /* TE.SAMPLER[0].LOD_ADDR[3] */
+ {0xf8a, 0x024C4}, /* TE.SAMPLER[1].LOD_ADDR[3] */
+ {0xf8b, 0x024C8}, /* TE.SAMPLER[2].LOD_ADDR[3] */
+ {0xf8c, 0x024CC}, /* TE.SAMPLER[3].LOD_ADDR[3] */
+ {0xf8d, 0x024D0}, /* TE.SAMPLER[4].LOD_ADDR[3] */
+ {0xf8e, 0x024D4}, /* TE.SAMPLER[5].LOD_ADDR[3] */
+ {0xf8f, 0x024D8}, /* TE.SAMPLER[6].LOD_ADDR[3] */
+ {0xf90, 0x024DC}, /* TE.SAMPLER[7].LOD_ADDR[3] */
+ {0xf91, 0x024E0}, /* TE.SAMPLER[8].LOD_ADDR[3] */
+ {0xf92, 0x024E4}, /* TE.SAMPLER[9].LOD_ADDR[3] */
+ {0xf93, 0x024E8}, /* TE.SAMPLER[10].LOD_ADDR[3] */
+ {0xf94, 0x024EC}, /* TE.SAMPLER[11].LOD_ADDR[3] */
+ {0xf97, 0x02500}, /* TE.SAMPLER[0].LOD_ADDR[4] */
+ {0xf98, 0x02504}, /* TE.SAMPLER[1].LOD_ADDR[4] */
+ {0xf99, 0x02508}, /* TE.SAMPLER[2].LOD_ADDR[4] */
+ {0xf9a, 0x0250C}, /* TE.SAMPLER[3].LOD_ADDR[4] */
+ {0xf9b, 0x02510}, /* TE.SAMPLER[4].LOD_ADDR[4] */
+ {0xf9c, 0x02514}, /* TE.SAMPLER[5].LOD_ADDR[4] */
+ {0xf9d, 0x02518}, /* TE.SAMPLER[6].LOD_ADDR[4] */
+ {0xf9e, 0x0251C}, /* TE.SAMPLER[7].LOD_ADDR[4] */
+ {0xf9f, 0x02520}, /* TE.SAMPLER[8].LOD_ADDR[4] */
+ {0xfa0, 0x02524}, /* TE.SAMPLER[9].LOD_ADDR[4] */
+ {0xfa1, 0x02528}, /* TE.SAMPLER[10].LOD_ADDR[4] */
+ {0xfa2, 0x0252C}, /* TE.SAMPLER[11].LOD_ADDR[4] */
+ {0xfa5, 0x02540}, /* TE.SAMPLER[0].LOD_ADDR[5] */
+ {0xfa6, 0x02544}, /* TE.SAMPLER[1].LOD_ADDR[5] */
+ {0xfa7, 0x02548}, /* TE.SAMPLER[2].LOD_ADDR[5] */
+ {0xfa8, 0x0254C}, /* TE.SAMPLER[3].LOD_ADDR[5] */
+ {0xfa9, 0x02550}, /* TE.SAMPLER[4].LOD_ADDR[5] */
+ {0xfaa, 0x02554}, /* TE.SAMPLER[5].LOD_ADDR[5] */
+ {0xfab, 0x02558}, /* TE.SAMPLER[6].LOD_ADDR[5] */
+ {0xfac, 0x0255C}, /* TE.SAMPLER[7].LOD_ADDR[5] */
+ {0xfad, 0x02560}, /* TE.SAMPLER[8].LOD_ADDR[5] */
+ {0xfae, 0x02564}, /* TE.SAMPLER[9].LOD_ADDR[5] */
+ {0xfaf, 0x02568}, /* TE.SAMPLER[10].LOD_ADDR[5] */
+ {0xfb0, 0x0256C}, /* TE.SAMPLER[11].LOD_ADDR[5] */
+ {0xfb3, 0x02580}, /* TE.SAMPLER[0].LOD_ADDR[6] */
+ {0xfb4, 0x02584}, /* TE.SAMPLER[1].LOD_ADDR[6] */
+ {0xfb5, 0x02588}, /* TE.SAMPLER[2].LOD_ADDR[6] */
+ {0xfb6, 0x0258C}, /* TE.SAMPLER[3].LOD_ADDR[6] */
+ {0xfb7, 0x02590}, /* TE.SAMPLER[4].LOD_ADDR[6] */
+ {0xfb8, 0x02594}, /* TE.SAMPLER[5].LOD_ADDR[6] */
+ {0xfb9, 0x02598}, /* TE.SAMPLER[6].LOD_ADDR[6] */
+ {0xfba, 0x0259C}, /* TE.SAMPLER[7].LOD_ADDR[6] */
+ {0xfbb, 0x025A0}, /* TE.SAMPLER[8].LOD_ADDR[6] */
+ {0xfbc, 0x025A4}, /* TE.SAMPLER[9].LOD_ADDR[6] */
+ {0xfbd, 0x025A8}, /* TE.SAMPLER[10].LOD_ADDR[6] */
+ {0xfbe, 0x025AC}, /* TE.SAMPLER[11].LOD_ADDR[6] */
+ {0xfc1, 0x025C0}, /* TE.SAMPLER[0].LOD_ADDR[7] */
+ {0xfc2, 0x025C4}, /* TE.SAMPLER[1].LOD_ADDR[7] */
+ {0xfc3, 0x025C8}, /* TE.SAMPLER[2].LOD_ADDR[7] */
+ {0xfc4, 0x025CC}, /* TE.SAMPLER[3].LOD_ADDR[7] */
+ {0xfc5, 0x025D0}, /* TE.SAMPLER[4].LOD_ADDR[7] */
+ {0xfc6, 0x025D4}, /* TE.SAMPLER[5].LOD_ADDR[7] */
+ {0xfc7, 0x025D8}, /* TE.SAMPLER[6].LOD_ADDR[7] */
+ {0xfc8, 0x025DC}, /* TE.SAMPLER[7].LOD_ADDR[7] */
+ {0xfc9, 0x025E0}, /* TE.SAMPLER[8].LOD_ADDR[7] */
+ {0xfca, 0x025E4}, /* TE.SAMPLER[9].LOD_ADDR[7] */
+ {0xfcb, 0x025E8}, /* TE.SAMPLER[10].LOD_ADDR[7] */
+ {0xfcc, 0x025EC}, /* TE.SAMPLER[11].LOD_ADDR[7] */
+ {0xfcf, 0x02600}, /* TE.SAMPLER[0].LOD_ADDR[8] */
+ {0xfd0, 0x02604}, /* TE.SAMPLER[1].LOD_ADDR[8] */
+ {0xfd1, 0x02608}, /* TE.SAMPLER[2].LOD_ADDR[8] */
+ {0xfd2, 0x0260C}, /* TE.SAMPLER[3].LOD_ADDR[8] */
+ {0xfd3, 0x02610}, /* TE.SAMPLER[4].LOD_ADDR[8] */
+ {0xfd4, 0x02614}, /* TE.SAMPLER[5].LOD_ADDR[8] */
+ {0xfd5, 0x02618}, /* TE.SAMPLER[6].LOD_ADDR[8] */
+ {0xfd6, 0x0261C}, /* TE.SAMPLER[7].LOD_ADDR[8] */
+ {0xfd7, 0x02620}, /* TE.SAMPLER[8].LOD_ADDR[8] */
+ {0xfd8, 0x02624}, /* TE.SAMPLER[9].LOD_ADDR[8] */
+ {0xfd9, 0x02628}, /* TE.SAMPLER[10].LOD_ADDR[8] */
+ {0xfda, 0x0262C}, /* TE.SAMPLER[11].LOD_ADDR[8] */
+ {0xfdd, 0x02640}, /* TE.SAMPLER[0].LOD_ADDR[9] */
+ {0xfde, 0x02644}, /* TE.SAMPLER[1].LOD_ADDR[9] */
+ {0xfdf, 0x02648}, /* TE.SAMPLER[2].LOD_ADDR[9] */
+ {0xfe0, 0x0264C}, /* TE.SAMPLER[3].LOD_ADDR[9] */
+ {0xfe1, 0x02650}, /* TE.SAMPLER[4].LOD_ADDR[9] */
+ {0xfe2, 0x02654}, /* TE.SAMPLER[5].LOD_ADDR[9] */
+ {0xfe3, 0x02658}, /* TE.SAMPLER[6].LOD_ADDR[9] */
+ {0xfe4, 0x0265C}, /* TE.SAMPLER[7].LOD_ADDR[9] */
+ {0xfe5, 0x02660}, /* TE.SAMPLER[8].LOD_ADDR[9] */
+ {0xfe6, 0x02664}, /* TE.SAMPLER[9].LOD_ADDR[9] */
+ {0xfe7, 0x02668}, /* TE.SAMPLER[10].LOD_ADDR[9] */
+ {0xfe8, 0x0266C}, /* TE.SAMPLER[11].LOD_ADDR[9] */
+ {0xfeb, 0x02680}, /* TE.SAMPLER[0].LOD_ADDR[10] */
+ {0xfec, 0x02684}, /* TE.SAMPLER[1].LOD_ADDR[10] */
+ {0xfed, 0x02688}, /* TE.SAMPLER[2].LOD_ADDR[10] */
+ {0xfee, 0x0268C}, /* TE.SAMPLER[3].LOD_ADDR[10] */
+ {0xfef, 0x02690}, /* TE.SAMPLER[4].LOD_ADDR[10] */
+ {0xff0, 0x02694}, /* TE.SAMPLER[5].LOD_ADDR[10] */
+ {0xff1, 0x02698}, /* TE.SAMPLER[6].LOD_ADDR[10] */
+ {0xff2, 0x0269C}, /* TE.SAMPLER[7].LOD_ADDR[10] */
+ {0xff3, 0x026A0}, /* TE.SAMPLER[8].LOD_ADDR[10] */
+ {0xff4, 0x026A4}, /* TE.SAMPLER[9].LOD_ADDR[10] */
+ {0xff5, 0x026A8}, /* TE.SAMPLER[10].LOD_ADDR[10] */
+ {0xff6, 0x026AC}, /* TE.SAMPLER[11].LOD_ADDR[10] */
+ {0xff9, 0x026C0}, /* TE.SAMPLER[0].LOD_ADDR[11] */
+ {0xffa, 0x026C4}, /* TE.SAMPLER[1].LOD_ADDR[11] */
+ {0xffb, 0x026C8}, /* TE.SAMPLER[2].LOD_ADDR[11] */
+ {0xffc, 0x026CC}, /* TE.SAMPLER[3].LOD_ADDR[11] */
+ {0xffd, 0x026D0}, /* TE.SAMPLER[4].LOD_ADDR[11] */
+ {0xffe, 0x026D4}, /* TE.SAMPLER[5].LOD_ADDR[11] */
+ {0xfff, 0x026D8}, /* TE.SAMPLER[6].LOD_ADDR[11] */
+ {0x1000, 0x026DC}, /* TE.SAMPLER[7].LOD_ADDR[11] */
+ {0x1001, 0x026E0}, /* TE.SAMPLER[8].LOD_ADDR[11] */
+ {0x1002, 0x026E4}, /* TE.SAMPLER[9].LOD_ADDR[11] */
+ {0x1003, 0x026E8}, /* TE.SAMPLER[10].LOD_ADDR[11] */
+ {0x1004, 0x026EC}, /* TE.SAMPLER[11].LOD_ADDR[11] */
+ {0x1007, 0x02700}, /* TE.SAMPLER[0].LOD_ADDR[12] */
+ {0x1008, 0x02704}, /* TE.SAMPLER[1].LOD_ADDR[12] */
+ {0x1009, 0x02708}, /* TE.SAMPLER[2].LOD_ADDR[12] */
+ {0x100a, 0x0270C}, /* TE.SAMPLER[3].LOD_ADDR[12] */
+ {0x100b, 0x02710}, /* TE.SAMPLER[4].LOD_ADDR[12] */
+ {0x100c, 0x02714}, /* TE.SAMPLER[5].LOD_ADDR[12] */
+ {0x100d, 0x02718}, /* TE.SAMPLER[6].LOD_ADDR[12] */
+ {0x100e, 0x0271C}, /* TE.SAMPLER[7].LOD_ADDR[12] */
+ {0x100f, 0x02720}, /* TE.SAMPLER[8].LOD_ADDR[12] */
+ {0x1010, 0x02724}, /* TE.SAMPLER[9].LOD_ADDR[12] */
+ {0x1011, 0x02728}, /* TE.SAMPLER[10].LOD_ADDR[12] */
+ {0x1012, 0x0272C}, /* TE.SAMPLER[11].LOD_ADDR[12] */
+ {0x1015, 0x02740}, /* TE.SAMPLER[0].LOD_ADDR[13] */
+ {0x1016, 0x02744}, /* TE.SAMPLER[1].LOD_ADDR[13] */
+ {0x1017, 0x02748}, /* TE.SAMPLER[2].LOD_ADDR[13] */
+ {0x1018, 0x0274C}, /* TE.SAMPLER[3].LOD_ADDR[13] */
+ {0x1019, 0x02750}, /* TE.SAMPLER[4].LOD_ADDR[13] */
+ {0x101a, 0x02754}, /* TE.SAMPLER[5].LOD_ADDR[13] */
+ {0x101b, 0x02758}, /* TE.SAMPLER[6].LOD_ADDR[13] */
+ {0x101c, 0x0275C}, /* TE.SAMPLER[7].LOD_ADDR[13] */
+ {0x101d, 0x02760}, /* TE.SAMPLER[8].LOD_ADDR[13] */
+ {0x101e, 0x02764}, /* TE.SAMPLER[9].LOD_ADDR[13] */
+ {0x101f, 0x02768}, /* TE.SAMPLER[10].LOD_ADDR[13] */
+ {0x1020, 0x0276C}, /* TE.SAMPLER[11].LOD_ADDR[13] */
+ {0x1d5, 0x03400}, /* DE.PALETTE_PE20[0] */
+ {0x1d6, 0x03404}, /* DE.PALETTE_PE20[1] */
+ {0x1d7, 0x03408}, /* DE.PALETTE_PE20[2] */
+ {0x1d8, 0x0340C}, /* DE.PALETTE_PE20[3] */
+ {0x1d9, 0x03410}, /* DE.PALETTE_PE20[4] */
+ {0x1da, 0x03414}, /* DE.PALETTE_PE20[5] */
+ {0x1db, 0x03418}, /* DE.PALETTE_PE20[6] */
+ {0x1dc, 0x0341C}, /* DE.PALETTE_PE20[7] */
+ {0x1dd, 0x03420}, /* DE.PALETTE_PE20[8] */
+ {0x1de, 0x03424}, /* DE.PALETTE_PE20[9] */
+ {0x1df, 0x03428}, /* DE.PALETTE_PE20[10] */
+ {0x1e0, 0x0342C}, /* DE.PALETTE_PE20[11] */
+ {0x1e1, 0x03430}, /* DE.PALETTE_PE20[12] */
+ {0x1e2, 0x03434}, /* DE.PALETTE_PE20[13] */
+ {0x1e3, 0x03438}, /* DE.PALETTE_PE20[14] */
+ {0x1e4, 0x0343C}, /* DE.PALETTE_PE20[15] */
+ {0x1e5, 0x03440}, /* DE.PALETTE_PE20[16] */
+ {0x1e6, 0x03444}, /* DE.PALETTE_PE20[17] */
+ {0x1e7, 0x03448}, /* DE.PALETTE_PE20[18] */
+ {0x1e8, 0x0344C}, /* DE.PALETTE_PE20[19] */
+ {0x1e9, 0x03450}, /* DE.PALETTE_PE20[20] */
+ {0x1ea, 0x03454}, /* DE.PALETTE_PE20[21] */
+ {0x1eb, 0x03458}, /* DE.PALETTE_PE20[22] */
+ {0x1ec, 0x0345C}, /* DE.PALETTE_PE20[23] */
+ {0x1ed, 0x03460}, /* DE.PALETTE_PE20[24] */
+ {0x1ee, 0x03464}, /* DE.PALETTE_PE20[25] */
+ {0x1ef, 0x03468}, /* DE.PALETTE_PE20[26] */
+ {0x1f0, 0x0346C}, /* DE.PALETTE_PE20[27] */
+ {0x1f1, 0x03470}, /* DE.PALETTE_PE20[28] */
+ {0x1f2, 0x03474}, /* DE.PALETTE_PE20[29] */
+ {0x1f3, 0x03478}, /* DE.PALETTE_PE20[30] */
+ {0x1f4, 0x0347C}, /* DE.PALETTE_PE20[31] */
+ {0x1f5, 0x03480}, /* DE.PALETTE_PE20[32] */
+ {0x1f6, 0x03484}, /* DE.PALETTE_PE20[33] */
+ {0x1f7, 0x03488}, /* DE.PALETTE_PE20[34] */
+ {0x1f8, 0x0348C}, /* DE.PALETTE_PE20[35] */
+ {0x1f9, 0x03490}, /* DE.PALETTE_PE20[36] */
+ {0x1fa, 0x03494}, /* DE.PALETTE_PE20[37] */
+ {0x1fb, 0x03498}, /* DE.PALETTE_PE20[38] */
+ {0x1fc, 0x0349C}, /* DE.PALETTE_PE20[39] */
+ {0x1fd, 0x034A0}, /* DE.PALETTE_PE20[40] */
+ {0x1fe, 0x034A4}, /* DE.PALETTE_PE20[41] */
+ {0x1ff, 0x034A8}, /* DE.PALETTE_PE20[42] */
+ {0x200, 0x034AC}, /* DE.PALETTE_PE20[43] */
+ {0x201, 0x034B0}, /* DE.PALETTE_PE20[44] */
+ {0x202, 0x034B4}, /* DE.PALETTE_PE20[45] */
+ {0x203, 0x034B8}, /* DE.PALETTE_PE20[46] */
+ {0x204, 0x034BC}, /* DE.PALETTE_PE20[47] */
+ {0x205, 0x034C0}, /* DE.PALETTE_PE20[48] */
+ {0x206, 0x034C4}, /* DE.PALETTE_PE20[49] */
+ {0x207, 0x034C8}, /* DE.PALETTE_PE20[50] */
+ {0x208, 0x034CC}, /* DE.PALETTE_PE20[51] */
+ {0x209, 0x034D0}, /* DE.PALETTE_PE20[52] */
+ {0x20a, 0x034D4}, /* DE.PALETTE_PE20[53] */
+ {0x20b, 0x034D8}, /* DE.PALETTE_PE20[54] */
+ {0x20c, 0x034DC}, /* DE.PALETTE_PE20[55] */
+ {0x20d, 0x034E0}, /* DE.PALETTE_PE20[56] */
+ {0x20e, 0x034E4}, /* DE.PALETTE_PE20[57] */
+ {0x20f, 0x034E8}, /* DE.PALETTE_PE20[58] */
+ {0x210, 0x034EC}, /* DE.PALETTE_PE20[59] */
+ {0x211, 0x034F0}, /* DE.PALETTE_PE20[60] */
+ {0x212, 0x034F4}, /* DE.PALETTE_PE20[61] */
+ {0x213, 0x034F8}, /* DE.PALETTE_PE20[62] */
+ {0x214, 0x034FC}, /* DE.PALETTE_PE20[63] */
+ {0x215, 0x03500}, /* DE.PALETTE_PE20[64] */
+ {0x216, 0x03504}, /* DE.PALETTE_PE20[65] */
+ {0x217, 0x03508}, /* DE.PALETTE_PE20[66] */
+ {0x218, 0x0350C}, /* DE.PALETTE_PE20[67] */
+ {0x219, 0x03510}, /* DE.PALETTE_PE20[68] */
+ {0x21a, 0x03514}, /* DE.PALETTE_PE20[69] */
+ {0x21b, 0x03518}, /* DE.PALETTE_PE20[70] */
+ {0x21c, 0x0351C}, /* DE.PALETTE_PE20[71] */
+ {0x21d, 0x03520}, /* DE.PALETTE_PE20[72] */
+ {0x21e, 0x03524}, /* DE.PALETTE_PE20[73] */
+ {0x21f, 0x03528}, /* DE.PALETTE_PE20[74] */
+ {0x220, 0x0352C}, /* DE.PALETTE_PE20[75] */
+ {0x221, 0x03530}, /* DE.PALETTE_PE20[76] */
+ {0x222, 0x03534}, /* DE.PALETTE_PE20[77] */
+ {0x223, 0x03538}, /* DE.PALETTE_PE20[78] */
+ {0x224, 0x0353C}, /* DE.PALETTE_PE20[79] */
+ {0x225, 0x03540}, /* DE.PALETTE_PE20[80] */
+ {0x226, 0x03544}, /* DE.PALETTE_PE20[81] */
+ {0x227, 0x03548}, /* DE.PALETTE_PE20[82] */
+ {0x228, 0x0354C}, /* DE.PALETTE_PE20[83] */
+ {0x229, 0x03550}, /* DE.PALETTE_PE20[84] */
+ {0x22a, 0x03554}, /* DE.PALETTE_PE20[85] */
+ {0x22b, 0x03558}, /* DE.PALETTE_PE20[86] */
+ {0x22c, 0x0355C}, /* DE.PALETTE_PE20[87] */
+ {0x22d, 0x03560}, /* DE.PALETTE_PE20[88] */
+ {0x22e, 0x03564}, /* DE.PALETTE_PE20[89] */
+ {0x22f, 0x03568}, /* DE.PALETTE_PE20[90] */
+ {0x230, 0x0356C}, /* DE.PALETTE_PE20[91] */
+ {0x231, 0x03570}, /* DE.PALETTE_PE20[92] */
+ {0x232, 0x03574}, /* DE.PALETTE_PE20[93] */
+ {0x233, 0x03578}, /* DE.PALETTE_PE20[94] */
+ {0x234, 0x0357C}, /* DE.PALETTE_PE20[95] */
+ {0x235, 0x03580}, /* DE.PALETTE_PE20[96] */
+ {0x236, 0x03584}, /* DE.PALETTE_PE20[97] */
+ {0x237, 0x03588}, /* DE.PALETTE_PE20[98] */
+ {0x238, 0x0358C}, /* DE.PALETTE_PE20[99] */
+ {0x239, 0x03590}, /* DE.PALETTE_PE20[100] */
+ {0x23a, 0x03594}, /* DE.PALETTE_PE20[101] */
+ {0x23b, 0x03598}, /* DE.PALETTE_PE20[102] */
+ {0x23c, 0x0359C}, /* DE.PALETTE_PE20[103] */
+ {0x23d, 0x035A0}, /* DE.PALETTE_PE20[104] */
+ {0x23e, 0x035A4}, /* DE.PALETTE_PE20[105] */
+ {0x23f, 0x035A8}, /* DE.PALETTE_PE20[106] */
+ {0x240, 0x035AC}, /* DE.PALETTE_PE20[107] */
+ {0x241, 0x035B0}, /* DE.PALETTE_PE20[108] */
+ {0x242, 0x035B4}, /* DE.PALETTE_PE20[109] */
+ {0x243, 0x035B8}, /* DE.PALETTE_PE20[110] */
+ {0x244, 0x035BC}, /* DE.PALETTE_PE20[111] */
+ {0x245, 0x035C0}, /* DE.PALETTE_PE20[112] */
+ {0x246, 0x035C4}, /* DE.PALETTE_PE20[113] */
+ {0x247, 0x035C8}, /* DE.PALETTE_PE20[114] */
+ {0x248, 0x035CC}, /* DE.PALETTE_PE20[115] */
+ {0x249, 0x035D0}, /* DE.PALETTE_PE20[116] */
+ {0x24a, 0x035D4}, /* DE.PALETTE_PE20[117] */
+ {0x24b, 0x035D8}, /* DE.PALETTE_PE20[118] */
+ {0x24c, 0x035DC}, /* DE.PALETTE_PE20[119] */
+ {0x24d, 0x035E0}, /* DE.PALETTE_PE20[120] */
+ {0x24e, 0x035E4}, /* DE.PALETTE_PE20[121] */
+ {0x24f, 0x035E8}, /* DE.PALETTE_PE20[122] */
+ {0x250, 0x035EC}, /* DE.PALETTE_PE20[123] */
+ {0x251, 0x035F0}, /* DE.PALETTE_PE20[124] */
+ {0x252, 0x035F4}, /* DE.PALETTE_PE20[125] */
+ {0x253, 0x035F8}, /* DE.PALETTE_PE20[126] */
+ {0x254, 0x035FC}, /* DE.PALETTE_PE20[127] */
+ {0x255, 0x03600}, /* DE.PALETTE_PE20[128] */
+ {0x256, 0x03604}, /* DE.PALETTE_PE20[129] */
+ {0x257, 0x03608}, /* DE.PALETTE_PE20[130] */
+ {0x258, 0x0360C}, /* DE.PALETTE_PE20[131] */
+ {0x259, 0x03610}, /* DE.PALETTE_PE20[132] */
+ {0x25a, 0x03614}, /* DE.PALETTE_PE20[133] */
+ {0x25b, 0x03618}, /* DE.PALETTE_PE20[134] */
+ {0x25c, 0x0361C}, /* DE.PALETTE_PE20[135] */
+ {0x25d, 0x03620}, /* DE.PALETTE_PE20[136] */
+ {0x25e, 0x03624}, /* DE.PALETTE_PE20[137] */
+ {0x25f, 0x03628}, /* DE.PALETTE_PE20[138] */
+ {0x260, 0x0362C}, /* DE.PALETTE_PE20[139] */
+ {0x261, 0x03630}, /* DE.PALETTE_PE20[140] */
+ {0x262, 0x03634}, /* DE.PALETTE_PE20[141] */
+ {0x263, 0x03638}, /* DE.PALETTE_PE20[142] */
+ {0x264, 0x0363C}, /* DE.PALETTE_PE20[143] */
+ {0x265, 0x03640}, /* DE.PALETTE_PE20[144] */
+ {0x266, 0x03644}, /* DE.PALETTE_PE20[145] */
+ {0x267, 0x03648}, /* DE.PALETTE_PE20[146] */
+ {0x268, 0x0364C}, /* DE.PALETTE_PE20[147] */
+ {0x269, 0x03650}, /* DE.PALETTE_PE20[148] */
+ {0x26a, 0x03654}, /* DE.PALETTE_PE20[149] */
+ {0x26b, 0x03658}, /* DE.PALETTE_PE20[150] */
+ {0x26c, 0x0365C}, /* DE.PALETTE_PE20[151] */
+ {0x26d, 0x03660}, /* DE.PALETTE_PE20[152] */
+ {0x26e, 0x03664}, /* DE.PALETTE_PE20[153] */
+ {0x26f, 0x03668}, /* DE.PALETTE_PE20[154] */
+ {0x270, 0x0366C}, /* DE.PALETTE_PE20[155] */
+ {0x271, 0x03670}, /* DE.PALETTE_PE20[156] */
+ {0x272, 0x03674}, /* DE.PALETTE_PE20[157] */
+ {0x273, 0x03678}, /* DE.PALETTE_PE20[158] */
+ {0x274, 0x0367C}, /* DE.PALETTE_PE20[159] */
+ {0x275, 0x03680}, /* DE.PALETTE_PE20[160] */
+ {0x276, 0x03684}, /* DE.PALETTE_PE20[161] */
+ {0x277, 0x03688}, /* DE.PALETTE_PE20[162] */
+ {0x278, 0x0368C}, /* DE.PALETTE_PE20[163] */
+ {0x279, 0x03690}, /* DE.PALETTE_PE20[164] */
+ {0x27a, 0x03694}, /* DE.PALETTE_PE20[165] */
+ {0x27b, 0x03698}, /* DE.PALETTE_PE20[166] */
+ {0x27c, 0x0369C}, /* DE.PALETTE_PE20[167] */
+ {0x27d, 0x036A0}, /* DE.PALETTE_PE20[168] */
+ {0x27e, 0x036A4}, /* DE.PALETTE_PE20[169] */
+ {0x27f, 0x036A8}, /* DE.PALETTE_PE20[170] */
+ {0x280, 0x036AC}, /* DE.PALETTE_PE20[171] */
+ {0x281, 0x036B0}, /* DE.PALETTE_PE20[172] */
+ {0x282, 0x036B4}, /* DE.PALETTE_PE20[173] */
+ {0x283, 0x036B8}, /* DE.PALETTE_PE20[174] */
+ {0x284, 0x036BC}, /* DE.PALETTE_PE20[175] */
+ {0x285, 0x036C0}, /* DE.PALETTE_PE20[176] */
+ {0x286, 0x036C4}, /* DE.PALETTE_PE20[177] */
+ {0x287, 0x036C8}, /* DE.PALETTE_PE20[178] */
+ {0x288, 0x036CC}, /* DE.PALETTE_PE20[179] */
+ {0x289, 0x036D0}, /* DE.PALETTE_PE20[180] */
+ {0x28a, 0x036D4}, /* DE.PALETTE_PE20[181] */
+ {0x28b, 0x036D8}, /* DE.PALETTE_PE20[182] */
+ {0x28c, 0x036DC}, /* DE.PALETTE_PE20[183] */
+ {0x28d, 0x036E0}, /* DE.PALETTE_PE20[184] */
+ {0x28e, 0x036E4}, /* DE.PALETTE_PE20[185] */
+ {0x28f, 0x036E8}, /* DE.PALETTE_PE20[186] */
+ {0x290, 0x036EC}, /* DE.PALETTE_PE20[187] */
+ {0x291, 0x036F0}, /* DE.PALETTE_PE20[188] */
+ {0x292, 0x036F4}, /* DE.PALETTE_PE20[189] */
+ {0x293, 0x036F8}, /* DE.PALETTE_PE20[190] */
+ {0x294, 0x036FC}, /* DE.PALETTE_PE20[191] */
+ {0x295, 0x03700}, /* DE.PALETTE_PE20[192] */
+ {0x296, 0x03704}, /* DE.PALETTE_PE20[193] */
+ {0x297, 0x03708}, /* DE.PALETTE_PE20[194] */
+ {0x298, 0x0370C}, /* DE.PALETTE_PE20[195] */
+ {0x299, 0x03710}, /* DE.PALETTE_PE20[196] */
+ {0x29a, 0x03714}, /* DE.PALETTE_PE20[197] */
+ {0x29b, 0x03718}, /* DE.PALETTE_PE20[198] */
+ {0x29c, 0x0371C}, /* DE.PALETTE_PE20[199] */
+ {0x29d, 0x03720}, /* DE.PALETTE_PE20[200] */
+ {0x29e, 0x03724}, /* DE.PALETTE_PE20[201] */
+ {0x29f, 0x03728}, /* DE.PALETTE_PE20[202] */
+ {0x2a0, 0x0372C}, /* DE.PALETTE_PE20[203] */
+ {0x2a1, 0x03730}, /* DE.PALETTE_PE20[204] */
+ {0x2a2, 0x03734}, /* DE.PALETTE_PE20[205] */
+ {0x2a3, 0x03738}, /* DE.PALETTE_PE20[206] */
+ {0x2a4, 0x0373C}, /* DE.PALETTE_PE20[207] */
+ {0x2a5, 0x03740}, /* DE.PALETTE_PE20[208] */
+ {0x2a6, 0x03744}, /* DE.PALETTE_PE20[209] */
+ {0x2a7, 0x03748}, /* DE.PALETTE_PE20[210] */
+ {0x2a8, 0x0374C}, /* DE.PALETTE_PE20[211] */
+ {0x2a9, 0x03750}, /* DE.PALETTE_PE20[212] */
+ {0x2aa, 0x03754}, /* DE.PALETTE_PE20[213] */
+ {0x2ab, 0x03758}, /* DE.PALETTE_PE20[214] */
+ {0x2ac, 0x0375C}, /* DE.PALETTE_PE20[215] */
+ {0x2ad, 0x03760}, /* DE.PALETTE_PE20[216] */
+ {0x2ae, 0x03764}, /* DE.PALETTE_PE20[217] */
+ {0x2af, 0x03768}, /* DE.PALETTE_PE20[218] */
+ {0x2b0, 0x0376C}, /* DE.PALETTE_PE20[219] */
+ {0x2b1, 0x03770}, /* DE.PALETTE_PE20[220] */
+ {0x2b2, 0x03774}, /* DE.PALETTE_PE20[221] */
+ {0x2b3, 0x03778}, /* DE.PALETTE_PE20[222] */
+ {0x2b4, 0x0377C}, /* DE.PALETTE_PE20[223] */
+ {0x2b5, 0x03780}, /* DE.PALETTE_PE20[224] */
+ {0x2b6, 0x03784}, /* DE.PALETTE_PE20[225] */
+ {0x2b7, 0x03788}, /* DE.PALETTE_PE20[226] */
+ {0x2b8, 0x0378C}, /* DE.PALETTE_PE20[227] */
+ {0x2b9, 0x03790}, /* DE.PALETTE_PE20[228] */
+ {0x2ba, 0x03794}, /* DE.PALETTE_PE20[229] */
+ {0x2bb, 0x03798}, /* DE.PALETTE_PE20[230] */
+ {0x2bc, 0x0379C}, /* DE.PALETTE_PE20[231] */
+ {0x2bd, 0x037A0}, /* DE.PALETTE_PE20[232] */
+ {0x2be, 0x037A4}, /* DE.PALETTE_PE20[233] */
+ {0x2bf, 0x037A8}, /* DE.PALETTE_PE20[234] */
+ {0x2c0, 0x037AC}, /* DE.PALETTE_PE20[235] */
+ {0x2c1, 0x037B0}, /* DE.PALETTE_PE20[236] */
+ {0x2c2, 0x037B4}, /* DE.PALETTE_PE20[237] */
+ {0x2c3, 0x037B8}, /* DE.PALETTE_PE20[238] */
+ {0x2c4, 0x037BC}, /* DE.PALETTE_PE20[239] */
+ {0x2c5, 0x037C0}, /* DE.PALETTE_PE20[240] */
+ {0x2c6, 0x037C4}, /* DE.PALETTE_PE20[241] */
+ {0x2c7, 0x037C8}, /* DE.PALETTE_PE20[242] */
+ {0x2c8, 0x037CC}, /* DE.PALETTE_PE20[243] */
+ {0x2c9, 0x037D0}, /* DE.PALETTE_PE20[244] */
+ {0x2ca, 0x037D4}, /* DE.PALETTE_PE20[245] */
+ {0x2cb, 0x037D8}, /* DE.PALETTE_PE20[246] */
+ {0x2cc, 0x037DC}, /* DE.PALETTE_PE20[247] */
+ {0x2cd, 0x037E0}, /* DE.PALETTE_PE20[248] */
+ {0x2ce, 0x037E4}, /* DE.PALETTE_PE20[249] */
+ {0x2cf, 0x037E8}, /* DE.PALETTE_PE20[250] */
+ {0x2d0, 0x037EC}, /* DE.PALETTE_PE20[251] */
+ {0x2d1, 0x037F0}, /* DE.PALETTE_PE20[252] */
+ {0x2d2, 0x037F4}, /* DE.PALETTE_PE20[253] */
+ {0x2d3, 0x037F8}, /* DE.PALETTE_PE20[254] */
+ {0x2d4, 0x037FC}, /* DE.PALETTE_PE20[255] */
+ {0x2df, 0x03814}, /* GLOBAL.VERTEX_ELEMENT_CONFIG */
+ {0x2e0, 0x03818}, /* GLOBAL.MULTI_SAMPLE_CONFIG */
+ {0x2e1, 0x0381C}, /* GLOBAL.VS_VARYING_NUM_COMPONENTS */
+ {0x2e2, 0x03820}, /* GLOBAL.PS_VARYING_NUM_COMPONENTS */
+ {0x2e5, 0x03828}, /* GLOBAL.PS_VARYING_COMPONENT_USE[0] */
+ {0x2e6, 0x0382C}, /* GLOBAL.PS_VARYING_COMPONENT_USE[1] */
+ {0x325, 0x04000}, /* VS.INST_MEM[0] */
+ {0x326, 0x04004}, /* VS.INST_MEM[1] */
+ {0x327, 0x04008}, /* VS.INST_MEM[2] */
+ {0x328, 0x0400C}, /* VS.INST_MEM[3] */
+ {0x329, 0x04010}, /* VS.INST_MEM[4] */
+ {0x32a, 0x04014}, /* VS.INST_MEM[5] */
+ {0x32b, 0x04018}, /* VS.INST_MEM[6] */
+ {0x32c, 0x0401C}, /* VS.INST_MEM[7] */
+ {0x32d, 0x04020}, /* VS.INST_MEM[8] */
+ {0x32e, 0x04024}, /* VS.INST_MEM[9] */
+ {0x32f, 0x04028}, /* VS.INST_MEM[10] */
+ {0x330, 0x0402C}, /* VS.INST_MEM[11] */
+ {0x331, 0x04030}, /* VS.INST_MEM[12] */
+ {0x332, 0x04034}, /* VS.INST_MEM[13] */
+ {0x333, 0x04038}, /* VS.INST_MEM[14] */
+ {0x334, 0x0403C}, /* VS.INST_MEM[15] */
+ {0x335, 0x04040}, /* VS.INST_MEM[16] */
+ {0x336, 0x04044}, /* VS.INST_MEM[17] */
+ {0x337, 0x04048}, /* VS.INST_MEM[18] */
+ {0x338, 0x0404C}, /* VS.INST_MEM[19] */
+ {0x339, 0x04050}, /* VS.INST_MEM[20] */
+ {0x33a, 0x04054}, /* VS.INST_MEM[21] */
+ {0x33b, 0x04058}, /* VS.INST_MEM[22] */
+ {0x33c, 0x0405C}, /* VS.INST_MEM[23] */
+ {0x33d, 0x04060}, /* VS.INST_MEM[24] */
+ {0x33e, 0x04064}, /* VS.INST_MEM[25] */
+ {0x33f, 0x04068}, /* VS.INST_MEM[26] */
+ {0x340, 0x0406C}, /* VS.INST_MEM[27] */
+ {0x341, 0x04070}, /* VS.INST_MEM[28] */
+ {0x342, 0x04074}, /* VS.INST_MEM[29] */
+ {0x343, 0x04078}, /* VS.INST_MEM[30] */
+ {0x344, 0x0407C}, /* VS.INST_MEM[31] */
+ {0x345, 0x04080}, /* VS.INST_MEM[32] */
+ {0x346, 0x04084}, /* VS.INST_MEM[33] */
+ {0x347, 0x04088}, /* VS.INST_MEM[34] */
+ {0x348, 0x0408C}, /* VS.INST_MEM[35] */
+ {0x349, 0x04090}, /* VS.INST_MEM[36] */
+ {0x34a, 0x04094}, /* VS.INST_MEM[37] */
+ {0x34b, 0x04098}, /* VS.INST_MEM[38] */
+ {0x34c, 0x0409C}, /* VS.INST_MEM[39] */
+ {0x34d, 0x040A0}, /* VS.INST_MEM[40] */
+ {0x34e, 0x040A4}, /* VS.INST_MEM[41] */
+ {0x34f, 0x040A8}, /* VS.INST_MEM[42] */
+ {0x350, 0x040AC}, /* VS.INST_MEM[43] */
+ {0x351, 0x040B0}, /* VS.INST_MEM[44] */
+ {0x352, 0x040B4}, /* VS.INST_MEM[45] */
+ {0x353, 0x040B8}, /* VS.INST_MEM[46] */
+ {0x354, 0x040BC}, /* VS.INST_MEM[47] */
+ {0x355, 0x040C0}, /* VS.INST_MEM[48] */
+ {0x356, 0x040C4}, /* VS.INST_MEM[49] */
+ {0x357, 0x040C8}, /* VS.INST_MEM[50] */
+ {0x358, 0x040CC}, /* VS.INST_MEM[51] */
+ {0x359, 0x040D0}, /* VS.INST_MEM[52] */
+ {0x35a, 0x040D4}, /* VS.INST_MEM[53] */
+ {0x35b, 0x040D8}, /* VS.INST_MEM[54] */
+ {0x35c, 0x040DC}, /* VS.INST_MEM[55] */
+ {0x35d, 0x040E0}, /* VS.INST_MEM[56] */
+ {0x35e, 0x040E4}, /* VS.INST_MEM[57] */
+ {0x35f, 0x040E8}, /* VS.INST_MEM[58] */
+ {0x360, 0x040EC}, /* VS.INST_MEM[59] */
+ {0x361, 0x040F0}, /* VS.INST_MEM[60] */
+ {0x362, 0x040F4}, /* VS.INST_MEM[61] */
+ {0x363, 0x040F8}, /* VS.INST_MEM[62] */
+ {0x364, 0x040FC}, /* VS.INST_MEM[63] */
+ {0x365, 0x04100}, /* VS.INST_MEM[64] */
+ {0x366, 0x04104}, /* VS.INST_MEM[65] */
+ {0x367, 0x04108}, /* VS.INST_MEM[66] */
+ {0x368, 0x0410C}, /* VS.INST_MEM[67] */
+ {0x369, 0x04110}, /* VS.INST_MEM[68] */
+ {0x36a, 0x04114}, /* VS.INST_MEM[69] */
+ {0x36b, 0x04118}, /* VS.INST_MEM[70] */
+ {0x36c, 0x0411C}, /* VS.INST_MEM[71] */
+ {0x36d, 0x04120}, /* VS.INST_MEM[72] */
+ {0x36e, 0x04124}, /* VS.INST_MEM[73] */
+ {0x36f, 0x04128}, /* VS.INST_MEM[74] */
+ {0x370, 0x0412C}, /* VS.INST_MEM[75] */
+ {0x371, 0x04130}, /* VS.INST_MEM[76] */
+ {0x372, 0x04134}, /* VS.INST_MEM[77] */
+ {0x373, 0x04138}, /* VS.INST_MEM[78] */
+ {0x374, 0x0413C}, /* VS.INST_MEM[79] */
+ {0x375, 0x04140}, /* VS.INST_MEM[80] */
+ {0x376, 0x04144}, /* VS.INST_MEM[81] */
+ {0x377, 0x04148}, /* VS.INST_MEM[82] */
+ {0x378, 0x0414C}, /* VS.INST_MEM[83] */
+ {0x379, 0x04150}, /* VS.INST_MEM[84] */
+ {0x37a, 0x04154}, /* VS.INST_MEM[85] */
+ {0x37b, 0x04158}, /* VS.INST_MEM[86] */
+ {0x37c, 0x0415C}, /* VS.INST_MEM[87] */
+ {0x37d, 0x04160}, /* VS.INST_MEM[88] */
+ {0x37e, 0x04164}, /* VS.INST_MEM[89] */
+ {0x37f, 0x04168}, /* VS.INST_MEM[90] */
+ {0x380, 0x0416C}, /* VS.INST_MEM[91] */
+ {0x381, 0x04170}, /* VS.INST_MEM[92] */
+ {0x382, 0x04174}, /* VS.INST_MEM[93] */
+ {0x383, 0x04178}, /* VS.INST_MEM[94] */
+ {0x384, 0x0417C}, /* VS.INST_MEM[95] */
+ {0x385, 0x04180}, /* VS.INST_MEM[96] */
+ {0x386, 0x04184}, /* VS.INST_MEM[97] */
+ {0x387, 0x04188}, /* VS.INST_MEM[98] */
+ {0x388, 0x0418C}, /* VS.INST_MEM[99] */
+ {0x389, 0x04190}, /* VS.INST_MEM[100] */
+ {0x38a, 0x04194}, /* VS.INST_MEM[101] */
+ {0x38b, 0x04198}, /* VS.INST_MEM[102] */
+ {0x38c, 0x0419C}, /* VS.INST_MEM[103] */
+ {0x38d, 0x041A0}, /* VS.INST_MEM[104] */
+ {0x38e, 0x041A4}, /* VS.INST_MEM[105] */
+ {0x38f, 0x041A8}, /* VS.INST_MEM[106] */
+ {0x390, 0x041AC}, /* VS.INST_MEM[107] */
+ {0x391, 0x041B0}, /* VS.INST_MEM[108] */
+ {0x392, 0x041B4}, /* VS.INST_MEM[109] */
+ {0x393, 0x041B8}, /* VS.INST_MEM[110] */
+ {0x394, 0x041BC}, /* VS.INST_MEM[111] */
+ {0x395, 0x041C0}, /* VS.INST_MEM[112] */
+ {0x396, 0x041C4}, /* VS.INST_MEM[113] */
+ {0x397, 0x041C8}, /* VS.INST_MEM[114] */
+ {0x398, 0x041CC}, /* VS.INST_MEM[115] */
+ {0x399, 0x041D0}, /* VS.INST_MEM[116] */
+ {0x39a, 0x041D4}, /* VS.INST_MEM[117] */
+ {0x39b, 0x041D8}, /* VS.INST_MEM[118] */
+ {0x39c, 0x041DC}, /* VS.INST_MEM[119] */
+ {0x39d, 0x041E0}, /* VS.INST_MEM[120] */
+ {0x39e, 0x041E4}, /* VS.INST_MEM[121] */
+ {0x39f, 0x041E8}, /* VS.INST_MEM[122] */
+ {0x3a0, 0x041EC}, /* VS.INST_MEM[123] */
+ {0x3a1, 0x041F0}, /* VS.INST_MEM[124] */
+ {0x3a2, 0x041F4}, /* VS.INST_MEM[125] */
+ {0x3a3, 0x041F8}, /* VS.INST_MEM[126] */
+ {0x3a4, 0x041FC}, /* VS.INST_MEM[127] */
+ {0x3a5, 0x04200}, /* VS.INST_MEM[128] */
+ {0x3a6, 0x04204}, /* VS.INST_MEM[129] */
+ {0x3a7, 0x04208}, /* VS.INST_MEM[130] */
+ {0x3a8, 0x0420C}, /* VS.INST_MEM[131] */
+ {0x3a9, 0x04210}, /* VS.INST_MEM[132] */
+ {0x3aa, 0x04214}, /* VS.INST_MEM[133] */
+ {0x3ab, 0x04218}, /* VS.INST_MEM[134] */
+ {0x3ac, 0x0421C}, /* VS.INST_MEM[135] */
+ {0x3ad, 0x04220}, /* VS.INST_MEM[136] */
+ {0x3ae, 0x04224}, /* VS.INST_MEM[137] */
+ {0x3af, 0x04228}, /* VS.INST_MEM[138] */
+ {0x3b0, 0x0422C}, /* VS.INST_MEM[139] */
+ {0x3b1, 0x04230}, /* VS.INST_MEM[140] */
+ {0x3b2, 0x04234}, /* VS.INST_MEM[141] */
+ {0x3b3, 0x04238}, /* VS.INST_MEM[142] */
+ {0x3b4, 0x0423C}, /* VS.INST_MEM[143] */
+ {0x3b5, 0x04240}, /* VS.INST_MEM[144] */
+ {0x3b6, 0x04244}, /* VS.INST_MEM[145] */
+ {0x3b7, 0x04248}, /* VS.INST_MEM[146] */
+ {0x3b8, 0x0424C}, /* VS.INST_MEM[147] */
+ {0x3b9, 0x04250}, /* VS.INST_MEM[148] */
+ {0x3ba, 0x04254}, /* VS.INST_MEM[149] */
+ {0x3bb, 0x04258}, /* VS.INST_MEM[150] */
+ {0x3bc, 0x0425C}, /* VS.INST_MEM[151] */
+ {0x3bd, 0x04260}, /* VS.INST_MEM[152] */
+ {0x3be, 0x04264}, /* VS.INST_MEM[153] */
+ {0x3bf, 0x04268}, /* VS.INST_MEM[154] */
+ {0x3c0, 0x0426C}, /* VS.INST_MEM[155] */
+ {0x3c1, 0x04270}, /* VS.INST_MEM[156] */
+ {0x3c2, 0x04274}, /* VS.INST_MEM[157] */
+ {0x3c3, 0x04278}, /* VS.INST_MEM[158] */
+ {0x3c4, 0x0427C}, /* VS.INST_MEM[159] */
+ {0x3c5, 0x04280}, /* VS.INST_MEM[160] */
+ {0x3c6, 0x04284}, /* VS.INST_MEM[161] */
+ {0x3c7, 0x04288}, /* VS.INST_MEM[162] */
+ {0x3c8, 0x0428C}, /* VS.INST_MEM[163] */
+ {0x3c9, 0x04290}, /* VS.INST_MEM[164] */
+ {0x3ca, 0x04294}, /* VS.INST_MEM[165] */
+ {0x3cb, 0x04298}, /* VS.INST_MEM[166] */
+ {0x3cc, 0x0429C}, /* VS.INST_MEM[167] */
+ {0x3cd, 0x042A0}, /* VS.INST_MEM[168] */
+ {0x3ce, 0x042A4}, /* VS.INST_MEM[169] */
+ {0x3cf, 0x042A8}, /* VS.INST_MEM[170] */
+ {0x3d0, 0x042AC}, /* VS.INST_MEM[171] */
+ {0x3d1, 0x042B0}, /* VS.INST_MEM[172] */
+ {0x3d2, 0x042B4}, /* VS.INST_MEM[173] */
+ {0x3d3, 0x042B8}, /* VS.INST_MEM[174] */
+ {0x3d4, 0x042BC}, /* VS.INST_MEM[175] */
+ {0x3d5, 0x042C0}, /* VS.INST_MEM[176] */
+ {0x3d6, 0x042C4}, /* VS.INST_MEM[177] */
+ {0x3d7, 0x042C8}, /* VS.INST_MEM[178] */
+ {0x3d8, 0x042CC}, /* VS.INST_MEM[179] */
+ {0x3d9, 0x042D0}, /* VS.INST_MEM[180] */
+ {0x3da, 0x042D4}, /* VS.INST_MEM[181] */
+ {0x3db, 0x042D8}, /* VS.INST_MEM[182] */
+ {0x3dc, 0x042DC}, /* VS.INST_MEM[183] */
+ {0x3dd, 0x042E0}, /* VS.INST_MEM[184] */
+ {0x3de, 0x042E4}, /* VS.INST_MEM[185] */
+ {0x3df, 0x042E8}, /* VS.INST_MEM[186] */
+ {0x3e0, 0x042EC}, /* VS.INST_MEM[187] */
+ {0x3e1, 0x042F0}, /* VS.INST_MEM[188] */
+ {0x3e2, 0x042F4}, /* VS.INST_MEM[189] */
+ {0x3e3, 0x042F8}, /* VS.INST_MEM[190] */
+ {0x3e4, 0x042FC}, /* VS.INST_MEM[191] */
+ {0x3e5, 0x04300}, /* VS.INST_MEM[192] */
+ {0x3e6, 0x04304}, /* VS.INST_MEM[193] */
+ {0x3e7, 0x04308}, /* VS.INST_MEM[194] */
+ {0x3e8, 0x0430C}, /* VS.INST_MEM[195] */
+ {0x3e9, 0x04310}, /* VS.INST_MEM[196] */
+ {0x3ea, 0x04314}, /* VS.INST_MEM[197] */
+ {0x3eb, 0x04318}, /* VS.INST_MEM[198] */
+ {0x3ec, 0x0431C}, /* VS.INST_MEM[199] */
+ {0x3ed, 0x04320}, /* VS.INST_MEM[200] */
+ {0x3ee, 0x04324}, /* VS.INST_MEM[201] */
+ {0x3ef, 0x04328}, /* VS.INST_MEM[202] */
+ {0x3f0, 0x0432C}, /* VS.INST_MEM[203] */
+ {0x3f1, 0x04330}, /* VS.INST_MEM[204] */
+ {0x3f2, 0x04334}, /* VS.INST_MEM[205] */
+ {0x3f3, 0x04338}, /* VS.INST_MEM[206] */
+ {0x3f4, 0x0433C}, /* VS.INST_MEM[207] */
+ {0x3f5, 0x04340}, /* VS.INST_MEM[208] */
+ {0x3f6, 0x04344}, /* VS.INST_MEM[209] */
+ {0x3f7, 0x04348}, /* VS.INST_MEM[210] */
+ {0x3f8, 0x0434C}, /* VS.INST_MEM[211] */
+ {0x3f9, 0x04350}, /* VS.INST_MEM[212] */
+ {0x3fa, 0x04354}, /* VS.INST_MEM[213] */
+ {0x3fb, 0x04358}, /* VS.INST_MEM[214] */
+ {0x3fc, 0x0435C}, /* VS.INST_MEM[215] */
+ {0x3fd, 0x04360}, /* VS.INST_MEM[216] */
+ {0x3fe, 0x04364}, /* VS.INST_MEM[217] */
+ {0x3ff, 0x04368}, /* VS.INST_MEM[218] */
+ {0x400, 0x0436C}, /* VS.INST_MEM[219] */
+ {0x401, 0x04370}, /* VS.INST_MEM[220] */
+ {0x402, 0x04374}, /* VS.INST_MEM[221] */
+ {0x403, 0x04378}, /* VS.INST_MEM[222] */
+ {0x404, 0x0437C}, /* VS.INST_MEM[223] */
+ {0x405, 0x04380}, /* VS.INST_MEM[224] */
+ {0x406, 0x04384}, /* VS.INST_MEM[225] */
+ {0x407, 0x04388}, /* VS.INST_MEM[226] */
+ {0x408, 0x0438C}, /* VS.INST_MEM[227] */
+ {0x409, 0x04390}, /* VS.INST_MEM[228] */
+ {0x40a, 0x04394}, /* VS.INST_MEM[229] */
+ {0x40b, 0x04398}, /* VS.INST_MEM[230] */
+ {0x40c, 0x0439C}, /* VS.INST_MEM[231] */
+ {0x40d, 0x043A0}, /* VS.INST_MEM[232] */
+ {0x40e, 0x043A4}, /* VS.INST_MEM[233] */
+ {0x40f, 0x043A8}, /* VS.INST_MEM[234] */
+ {0x410, 0x043AC}, /* VS.INST_MEM[235] */
+ {0x411, 0x043B0}, /* VS.INST_MEM[236] */
+ {0x412, 0x043B4}, /* VS.INST_MEM[237] */
+ {0x413, 0x043B8}, /* VS.INST_MEM[238] */
+ {0x414, 0x043BC}, /* VS.INST_MEM[239] */
+ {0x415, 0x043C0}, /* VS.INST_MEM[240] */
+ {0x416, 0x043C4}, /* VS.INST_MEM[241] */
+ {0x417, 0x043C8}, /* VS.INST_MEM[242] */
+ {0x418, 0x043CC}, /* VS.INST_MEM[243] */
+ {0x419, 0x043D0}, /* VS.INST_MEM[244] */
+ {0x41a, 0x043D4}, /* VS.INST_MEM[245] */
+ {0x41b, 0x043D8}, /* VS.INST_MEM[246] */
+ {0x41c, 0x043DC}, /* VS.INST_MEM[247] */
+ {0x41d, 0x043E0}, /* VS.INST_MEM[248] */
+ {0x41e, 0x043E4}, /* VS.INST_MEM[249] */
+ {0x41f, 0x043E8}, /* VS.INST_MEM[250] */
+ {0x420, 0x043EC}, /* VS.INST_MEM[251] */
+ {0x421, 0x043F0}, /* VS.INST_MEM[252] */
+ {0x422, 0x043F4}, /* VS.INST_MEM[253] */
+ {0x423, 0x043F8}, /* VS.INST_MEM[254] */
+ {0x424, 0x043FC}, /* VS.INST_MEM[255] */
+ {0x425, 0x04400}, /* VS.INST_MEM[256] */
+ {0x426, 0x04404}, /* VS.INST_MEM[257] */
+ {0x427, 0x04408}, /* VS.INST_MEM[258] */
+ {0x428, 0x0440C}, /* VS.INST_MEM[259] */
+ {0x429, 0x04410}, /* VS.INST_MEM[260] */
+ {0x42a, 0x04414}, /* VS.INST_MEM[261] */
+ {0x42b, 0x04418}, /* VS.INST_MEM[262] */
+ {0x42c, 0x0441C}, /* VS.INST_MEM[263] */
+ {0x42d, 0x04420}, /* VS.INST_MEM[264] */
+ {0x42e, 0x04424}, /* VS.INST_MEM[265] */
+ {0x42f, 0x04428}, /* VS.INST_MEM[266] */
+ {0x430, 0x0442C}, /* VS.INST_MEM[267] */
+ {0x431, 0x04430}, /* VS.INST_MEM[268] */
+ {0x432, 0x04434}, /* VS.INST_MEM[269] */
+ {0x433, 0x04438}, /* VS.INST_MEM[270] */
+ {0x434, 0x0443C}, /* VS.INST_MEM[271] */
+ {0x435, 0x04440}, /* VS.INST_MEM[272] */
+ {0x436, 0x04444}, /* VS.INST_MEM[273] */
+ {0x437, 0x04448}, /* VS.INST_MEM[274] */
+ {0x438, 0x0444C}, /* VS.INST_MEM[275] */
+ {0x439, 0x04450}, /* VS.INST_MEM[276] */
+ {0x43a, 0x04454}, /* VS.INST_MEM[277] */
+ {0x43b, 0x04458}, /* VS.INST_MEM[278] */
+ {0x43c, 0x0445C}, /* VS.INST_MEM[279] */
+ {0x43d, 0x04460}, /* VS.INST_MEM[280] */
+ {0x43e, 0x04464}, /* VS.INST_MEM[281] */
+ {0x43f, 0x04468}, /* VS.INST_MEM[282] */
+ {0x440, 0x0446C}, /* VS.INST_MEM[283] */
+ {0x441, 0x04470}, /* VS.INST_MEM[284] */
+ {0x442, 0x04474}, /* VS.INST_MEM[285] */
+ {0x443, 0x04478}, /* VS.INST_MEM[286] */
+ {0x444, 0x0447C}, /* VS.INST_MEM[287] */
+ {0x445, 0x04480}, /* VS.INST_MEM[288] */
+ {0x446, 0x04484}, /* VS.INST_MEM[289] */
+ {0x447, 0x04488}, /* VS.INST_MEM[290] */
+ {0x448, 0x0448C}, /* VS.INST_MEM[291] */
+ {0x449, 0x04490}, /* VS.INST_MEM[292] */
+ {0x44a, 0x04494}, /* VS.INST_MEM[293] */
+ {0x44b, 0x04498}, /* VS.INST_MEM[294] */
+ {0x44c, 0x0449C}, /* VS.INST_MEM[295] */
+ {0x44d, 0x044A0}, /* VS.INST_MEM[296] */
+ {0x44e, 0x044A4}, /* VS.INST_MEM[297] */
+ {0x44f, 0x044A8}, /* VS.INST_MEM[298] */
+ {0x450, 0x044AC}, /* VS.INST_MEM[299] */
+ {0x451, 0x044B0}, /* VS.INST_MEM[300] */
+ {0x452, 0x044B4}, /* VS.INST_MEM[301] */
+ {0x453, 0x044B8}, /* VS.INST_MEM[302] */
+ {0x454, 0x044BC}, /* VS.INST_MEM[303] */
+ {0x455, 0x044C0}, /* VS.INST_MEM[304] */
+ {0x456, 0x044C4}, /* VS.INST_MEM[305] */
+ {0x457, 0x044C8}, /* VS.INST_MEM[306] */
+ {0x458, 0x044CC}, /* VS.INST_MEM[307] */
+ {0x459, 0x044D0}, /* VS.INST_MEM[308] */
+ {0x45a, 0x044D4}, /* VS.INST_MEM[309] */
+ {0x45b, 0x044D8}, /* VS.INST_MEM[310] */
+ {0x45c, 0x044DC}, /* VS.INST_MEM[311] */
+ {0x45d, 0x044E0}, /* VS.INST_MEM[312] */
+ {0x45e, 0x044E4}, /* VS.INST_MEM[313] */
+ {0x45f, 0x044E8}, /* VS.INST_MEM[314] */
+ {0x460, 0x044EC}, /* VS.INST_MEM[315] */
+ {0x461, 0x044F0}, /* VS.INST_MEM[316] */
+ {0x462, 0x044F4}, /* VS.INST_MEM[317] */
+ {0x463, 0x044F8}, /* VS.INST_MEM[318] */
+ {0x464, 0x044FC}, /* VS.INST_MEM[319] */
+ {0x465, 0x04500}, /* VS.INST_MEM[320] */
+ {0x466, 0x04504}, /* VS.INST_MEM[321] */
+ {0x467, 0x04508}, /* VS.INST_MEM[322] */
+ {0x468, 0x0450C}, /* VS.INST_MEM[323] */
+ {0x469, 0x04510}, /* VS.INST_MEM[324] */
+ {0x46a, 0x04514}, /* VS.INST_MEM[325] */
+ {0x46b, 0x04518}, /* VS.INST_MEM[326] */
+ {0x46c, 0x0451C}, /* VS.INST_MEM[327] */
+ {0x46d, 0x04520}, /* VS.INST_MEM[328] */
+ {0x46e, 0x04524}, /* VS.INST_MEM[329] */
+ {0x46f, 0x04528}, /* VS.INST_MEM[330] */
+ {0x470, 0x0452C}, /* VS.INST_MEM[331] */
+ {0x471, 0x04530}, /* VS.INST_MEM[332] */
+ {0x472, 0x04534}, /* VS.INST_MEM[333] */
+ {0x473, 0x04538}, /* VS.INST_MEM[334] */
+ {0x474, 0x0453C}, /* VS.INST_MEM[335] */
+ {0x475, 0x04540}, /* VS.INST_MEM[336] */
+ {0x476, 0x04544}, /* VS.INST_MEM[337] */
+ {0x477, 0x04548}, /* VS.INST_MEM[338] */
+ {0x478, 0x0454C}, /* VS.INST_MEM[339] */
+ {0x479, 0x04550}, /* VS.INST_MEM[340] */
+ {0x47a, 0x04554}, /* VS.INST_MEM[341] */
+ {0x47b, 0x04558}, /* VS.INST_MEM[342] */
+ {0x47c, 0x0455C}, /* VS.INST_MEM[343] */
+ {0x47d, 0x04560}, /* VS.INST_MEM[344] */
+ {0x47e, 0x04564}, /* VS.INST_MEM[345] */
+ {0x47f, 0x04568}, /* VS.INST_MEM[346] */
+ {0x480, 0x0456C}, /* VS.INST_MEM[347] */
+ {0x481, 0x04570}, /* VS.INST_MEM[348] */
+ {0x482, 0x04574}, /* VS.INST_MEM[349] */
+ {0x483, 0x04578}, /* VS.INST_MEM[350] */
+ {0x484, 0x0457C}, /* VS.INST_MEM[351] */
+ {0x485, 0x04580}, /* VS.INST_MEM[352] */
+ {0x486, 0x04584}, /* VS.INST_MEM[353] */
+ {0x487, 0x04588}, /* VS.INST_MEM[354] */
+ {0x488, 0x0458C}, /* VS.INST_MEM[355] */
+ {0x489, 0x04590}, /* VS.INST_MEM[356] */
+ {0x48a, 0x04594}, /* VS.INST_MEM[357] */
+ {0x48b, 0x04598}, /* VS.INST_MEM[358] */
+ {0x48c, 0x0459C}, /* VS.INST_MEM[359] */
+ {0x48d, 0x045A0}, /* VS.INST_MEM[360] */
+ {0x48e, 0x045A4}, /* VS.INST_MEM[361] */
+ {0x48f, 0x045A8}, /* VS.INST_MEM[362] */
+ {0x490, 0x045AC}, /* VS.INST_MEM[363] */
+ {0x491, 0x045B0}, /* VS.INST_MEM[364] */
+ {0x492, 0x045B4}, /* VS.INST_MEM[365] */
+ {0x493, 0x045B8}, /* VS.INST_MEM[366] */
+ {0x494, 0x045BC}, /* VS.INST_MEM[367] */
+ {0x495, 0x045C0}, /* VS.INST_MEM[368] */
+ {0x496, 0x045C4}, /* VS.INST_MEM[369] */
+ {0x497, 0x045C8}, /* VS.INST_MEM[370] */
+ {0x498, 0x045CC}, /* VS.INST_MEM[371] */
+ {0x499, 0x045D0}, /* VS.INST_MEM[372] */
+ {0x49a, 0x045D4}, /* VS.INST_MEM[373] */
+ {0x49b, 0x045D8}, /* VS.INST_MEM[374] */
+ {0x49c, 0x045DC}, /* VS.INST_MEM[375] */
+ {0x49d, 0x045E0}, /* VS.INST_MEM[376] */
+ {0x49e, 0x045E4}, /* VS.INST_MEM[377] */
+ {0x49f, 0x045E8}, /* VS.INST_MEM[378] */
+ {0x4a0, 0x045EC}, /* VS.INST_MEM[379] */
+ {0x4a1, 0x045F0}, /* VS.INST_MEM[380] */
+ {0x4a2, 0x045F4}, /* VS.INST_MEM[381] */
+ {0x4a3, 0x045F8}, /* VS.INST_MEM[382] */
+ {0x4a4, 0x045FC}, /* VS.INST_MEM[383] */
+ {0x4a5, 0x04600}, /* VS.INST_MEM[384] */
+ {0x4a6, 0x04604}, /* VS.INST_MEM[385] */
+ {0x4a7, 0x04608}, /* VS.INST_MEM[386] */
+ {0x4a8, 0x0460C}, /* VS.INST_MEM[387] */
+ {0x4a9, 0x04610}, /* VS.INST_MEM[388] */
+ {0x4aa, 0x04614}, /* VS.INST_MEM[389] */
+ {0x4ab, 0x04618}, /* VS.INST_MEM[390] */
+ {0x4ac, 0x0461C}, /* VS.INST_MEM[391] */
+ {0x4ad, 0x04620}, /* VS.INST_MEM[392] */
+ {0x4ae, 0x04624}, /* VS.INST_MEM[393] */
+ {0x4af, 0x04628}, /* VS.INST_MEM[394] */
+ {0x4b0, 0x0462C}, /* VS.INST_MEM[395] */
+ {0x4b1, 0x04630}, /* VS.INST_MEM[396] */
+ {0x4b2, 0x04634}, /* VS.INST_MEM[397] */
+ {0x4b3, 0x04638}, /* VS.INST_MEM[398] */
+ {0x4b4, 0x0463C}, /* VS.INST_MEM[399] */
+ {0x4b5, 0x04640}, /* VS.INST_MEM[400] */
+ {0x4b6, 0x04644}, /* VS.INST_MEM[401] */
+ {0x4b7, 0x04648}, /* VS.INST_MEM[402] */
+ {0x4b8, 0x0464C}, /* VS.INST_MEM[403] */
+ {0x4b9, 0x04650}, /* VS.INST_MEM[404] */
+ {0x4ba, 0x04654}, /* VS.INST_MEM[405] */
+ {0x4bb, 0x04658}, /* VS.INST_MEM[406] */
+ {0x4bc, 0x0465C}, /* VS.INST_MEM[407] */
+ {0x4bd, 0x04660}, /* VS.INST_MEM[408] */
+ {0x4be, 0x04664}, /* VS.INST_MEM[409] */
+ {0x4bf, 0x04668}, /* VS.INST_MEM[410] */
+ {0x4c0, 0x0466C}, /* VS.INST_MEM[411] */
+ {0x4c1, 0x04670}, /* VS.INST_MEM[412] */
+ {0x4c2, 0x04674}, /* VS.INST_MEM[413] */
+ {0x4c3, 0x04678}, /* VS.INST_MEM[414] */
+ {0x4c4, 0x0467C}, /* VS.INST_MEM[415] */
+ {0x4c5, 0x04680}, /* VS.INST_MEM[416] */
+ {0x4c6, 0x04684}, /* VS.INST_MEM[417] */
+ {0x4c7, 0x04688}, /* VS.INST_MEM[418] */
+ {0x4c8, 0x0468C}, /* VS.INST_MEM[419] */
+ {0x4c9, 0x04690}, /* VS.INST_MEM[420] */
+ {0x4ca, 0x04694}, /* VS.INST_MEM[421] */
+ {0x4cb, 0x04698}, /* VS.INST_MEM[422] */
+ {0x4cc, 0x0469C}, /* VS.INST_MEM[423] */
+ {0x4cd, 0x046A0}, /* VS.INST_MEM[424] */
+ {0x4ce, 0x046A4}, /* VS.INST_MEM[425] */
+ {0x4cf, 0x046A8}, /* VS.INST_MEM[426] */
+ {0x4d0, 0x046AC}, /* VS.INST_MEM[427] */
+ {0x4d1, 0x046B0}, /* VS.INST_MEM[428] */
+ {0x4d2, 0x046B4}, /* VS.INST_MEM[429] */
+ {0x4d3, 0x046B8}, /* VS.INST_MEM[430] */
+ {0x4d4, 0x046BC}, /* VS.INST_MEM[431] */
+ {0x4d5, 0x046C0}, /* VS.INST_MEM[432] */
+ {0x4d6, 0x046C4}, /* VS.INST_MEM[433] */
+ {0x4d7, 0x046C8}, /* VS.INST_MEM[434] */
+ {0x4d8, 0x046CC}, /* VS.INST_MEM[435] */
+ {0x4d9, 0x046D0}, /* VS.INST_MEM[436] */
+ {0x4da, 0x046D4}, /* VS.INST_MEM[437] */
+ {0x4db, 0x046D8}, /* VS.INST_MEM[438] */
+ {0x4dc, 0x046DC}, /* VS.INST_MEM[439] */
+ {0x4dd, 0x046E0}, /* VS.INST_MEM[440] */
+ {0x4de, 0x046E4}, /* VS.INST_MEM[441] */
+ {0x4df, 0x046E8}, /* VS.INST_MEM[442] */
+ {0x4e0, 0x046EC}, /* VS.INST_MEM[443] */
+ {0x4e1, 0x046F0}, /* VS.INST_MEM[444] */
+ {0x4e2, 0x046F4}, /* VS.INST_MEM[445] */
+ {0x4e3, 0x046F8}, /* VS.INST_MEM[446] */
+ {0x4e4, 0x046FC}, /* VS.INST_MEM[447] */
+ {0x4e5, 0x04700}, /* VS.INST_MEM[448] */
+ {0x4e6, 0x04704}, /* VS.INST_MEM[449] */
+ {0x4e7, 0x04708}, /* VS.INST_MEM[450] */
+ {0x4e8, 0x0470C}, /* VS.INST_MEM[451] */
+ {0x4e9, 0x04710}, /* VS.INST_MEM[452] */
+ {0x4ea, 0x04714}, /* VS.INST_MEM[453] */
+ {0x4eb, 0x04718}, /* VS.INST_MEM[454] */
+ {0x4ec, 0x0471C}, /* VS.INST_MEM[455] */
+ {0x4ed, 0x04720}, /* VS.INST_MEM[456] */
+ {0x4ee, 0x04724}, /* VS.INST_MEM[457] */
+ {0x4ef, 0x04728}, /* VS.INST_MEM[458] */
+ {0x4f0, 0x0472C}, /* VS.INST_MEM[459] */
+ {0x4f1, 0x04730}, /* VS.INST_MEM[460] */
+ {0x4f2, 0x04734}, /* VS.INST_MEM[461] */
+ {0x4f3, 0x04738}, /* VS.INST_MEM[462] */
+ {0x4f4, 0x0473C}, /* VS.INST_MEM[463] */
+ {0x4f5, 0x04740}, /* VS.INST_MEM[464] */
+ {0x4f6, 0x04744}, /* VS.INST_MEM[465] */
+ {0x4f7, 0x04748}, /* VS.INST_MEM[466] */
+ {0x4f8, 0x0474C}, /* VS.INST_MEM[467] */
+ {0x4f9, 0x04750}, /* VS.INST_MEM[468] */
+ {0x4fa, 0x04754}, /* VS.INST_MEM[469] */
+ {0x4fb, 0x04758}, /* VS.INST_MEM[470] */
+ {0x4fc, 0x0475C}, /* VS.INST_MEM[471] */
+ {0x4fd, 0x04760}, /* VS.INST_MEM[472] */
+ {0x4fe, 0x04764}, /* VS.INST_MEM[473] */
+ {0x4ff, 0x04768}, /* VS.INST_MEM[474] */
+ {0x500, 0x0476C}, /* VS.INST_MEM[475] */
+ {0x501, 0x04770}, /* VS.INST_MEM[476] */
+ {0x502, 0x04774}, /* VS.INST_MEM[477] */
+ {0x503, 0x04778}, /* VS.INST_MEM[478] */
+ {0x504, 0x0477C}, /* VS.INST_MEM[479] */
+ {0x505, 0x04780}, /* VS.INST_MEM[480] */
+ {0x506, 0x04784}, /* VS.INST_MEM[481] */
+ {0x507, 0x04788}, /* VS.INST_MEM[482] */
+ {0x508, 0x0478C}, /* VS.INST_MEM[483] */
+ {0x509, 0x04790}, /* VS.INST_MEM[484] */
+ {0x50a, 0x04794}, /* VS.INST_MEM[485] */
+ {0x50b, 0x04798}, /* VS.INST_MEM[486] */
+ {0x50c, 0x0479C}, /* VS.INST_MEM[487] */
+ {0x50d, 0x047A0}, /* VS.INST_MEM[488] */
+ {0x50e, 0x047A4}, /* VS.INST_MEM[489] */
+ {0x50f, 0x047A8}, /* VS.INST_MEM[490] */
+ {0x510, 0x047AC}, /* VS.INST_MEM[491] */
+ {0x511, 0x047B0}, /* VS.INST_MEM[492] */
+ {0x512, 0x047B4}, /* VS.INST_MEM[493] */
+ {0x513, 0x047B8}, /* VS.INST_MEM[494] */
+ {0x514, 0x047BC}, /* VS.INST_MEM[495] */
+ {0x515, 0x047C0}, /* VS.INST_MEM[496] */
+ {0x516, 0x047C4}, /* VS.INST_MEM[497] */
+ {0x517, 0x047C8}, /* VS.INST_MEM[498] */
+ {0x518, 0x047CC}, /* VS.INST_MEM[499] */
+ {0x519, 0x047D0}, /* VS.INST_MEM[500] */
+ {0x51a, 0x047D4}, /* VS.INST_MEM[501] */
+ {0x51b, 0x047D8}, /* VS.INST_MEM[502] */
+ {0x51c, 0x047DC}, /* VS.INST_MEM[503] */
+ {0x51d, 0x047E0}, /* VS.INST_MEM[504] */
+ {0x51e, 0x047E4}, /* VS.INST_MEM[505] */
+ {0x51f, 0x047E8}, /* VS.INST_MEM[506] */
+ {0x520, 0x047EC}, /* VS.INST_MEM[507] */
+ {0x521, 0x047F0}, /* VS.INST_MEM[508] */
+ {0x522, 0x047F4}, /* VS.INST_MEM[509] */
+ {0x523, 0x047F8}, /* VS.INST_MEM[510] */
+ {0x524, 0x047FC}, /* VS.INST_MEM[511] */
+ {0x525, 0x04800}, /* VS.INST_MEM[512] */
+ {0x526, 0x04804}, /* VS.INST_MEM[513] */
+ {0x527, 0x04808}, /* VS.INST_MEM[514] */
+ {0x528, 0x0480C}, /* VS.INST_MEM[515] */
+ {0x529, 0x04810}, /* VS.INST_MEM[516] */
+ {0x52a, 0x04814}, /* VS.INST_MEM[517] */
+ {0x52b, 0x04818}, /* VS.INST_MEM[518] */
+ {0x52c, 0x0481C}, /* VS.INST_MEM[519] */
+ {0x52d, 0x04820}, /* VS.INST_MEM[520] */
+ {0x52e, 0x04824}, /* VS.INST_MEM[521] */
+ {0x52f, 0x04828}, /* VS.INST_MEM[522] */
+ {0x530, 0x0482C}, /* VS.INST_MEM[523] */
+ {0x531, 0x04830}, /* VS.INST_MEM[524] */
+ {0x532, 0x04834}, /* VS.INST_MEM[525] */
+ {0x533, 0x04838}, /* VS.INST_MEM[526] */
+ {0x534, 0x0483C}, /* VS.INST_MEM[527] */
+ {0x535, 0x04840}, /* VS.INST_MEM[528] */
+ {0x536, 0x04844}, /* VS.INST_MEM[529] */
+ {0x537, 0x04848}, /* VS.INST_MEM[530] */
+ {0x538, 0x0484C}, /* VS.INST_MEM[531] */
+ {0x539, 0x04850}, /* VS.INST_MEM[532] */
+ {0x53a, 0x04854}, /* VS.INST_MEM[533] */
+ {0x53b, 0x04858}, /* VS.INST_MEM[534] */
+ {0x53c, 0x0485C}, /* VS.INST_MEM[535] */
+ {0x53d, 0x04860}, /* VS.INST_MEM[536] */
+ {0x53e, 0x04864}, /* VS.INST_MEM[537] */
+ {0x53f, 0x04868}, /* VS.INST_MEM[538] */
+ {0x540, 0x0486C}, /* VS.INST_MEM[539] */
+ {0x541, 0x04870}, /* VS.INST_MEM[540] */
+ {0x542, 0x04874}, /* VS.INST_MEM[541] */
+ {0x543, 0x04878}, /* VS.INST_MEM[542] */
+ {0x544, 0x0487C}, /* VS.INST_MEM[543] */
+ {0x545, 0x04880}, /* VS.INST_MEM[544] */
+ {0x546, 0x04884}, /* VS.INST_MEM[545] */
+ {0x547, 0x04888}, /* VS.INST_MEM[546] */
+ {0x548, 0x0488C}, /* VS.INST_MEM[547] */
+ {0x549, 0x04890}, /* VS.INST_MEM[548] */
+ {0x54a, 0x04894}, /* VS.INST_MEM[549] */
+ {0x54b, 0x04898}, /* VS.INST_MEM[550] */
+ {0x54c, 0x0489C}, /* VS.INST_MEM[551] */
+ {0x54d, 0x048A0}, /* VS.INST_MEM[552] */
+ {0x54e, 0x048A4}, /* VS.INST_MEM[553] */
+ {0x54f, 0x048A8}, /* VS.INST_MEM[554] */
+ {0x550, 0x048AC}, /* VS.INST_MEM[555] */
+ {0x551, 0x048B0}, /* VS.INST_MEM[556] */
+ {0x552, 0x048B4}, /* VS.INST_MEM[557] */
+ {0x553, 0x048B8}, /* VS.INST_MEM[558] */
+ {0x554, 0x048BC}, /* VS.INST_MEM[559] */
+ {0x555, 0x048C0}, /* VS.INST_MEM[560] */
+ {0x556, 0x048C4}, /* VS.INST_MEM[561] */
+ {0x557, 0x048C8}, /* VS.INST_MEM[562] */
+ {0x558, 0x048CC}, /* VS.INST_MEM[563] */
+ {0x559, 0x048D0}, /* VS.INST_MEM[564] */
+ {0x55a, 0x048D4}, /* VS.INST_MEM[565] */
+ {0x55b, 0x048D8}, /* VS.INST_MEM[566] */
+ {0x55c, 0x048DC}, /* VS.INST_MEM[567] */
+ {0x55d, 0x048E0}, /* VS.INST_MEM[568] */
+ {0x55e, 0x048E4}, /* VS.INST_MEM[569] */
+ {0x55f, 0x048E8}, /* VS.INST_MEM[570] */
+ {0x560, 0x048EC}, /* VS.INST_MEM[571] */
+ {0x561, 0x048F0}, /* VS.INST_MEM[572] */
+ {0x562, 0x048F4}, /* VS.INST_MEM[573] */
+ {0x563, 0x048F8}, /* VS.INST_MEM[574] */
+ {0x564, 0x048FC}, /* VS.INST_MEM[575] */
+ {0x565, 0x04900}, /* VS.INST_MEM[576] */
+ {0x566, 0x04904}, /* VS.INST_MEM[577] */
+ {0x567, 0x04908}, /* VS.INST_MEM[578] */
+ {0x568, 0x0490C}, /* VS.INST_MEM[579] */
+ {0x569, 0x04910}, /* VS.INST_MEM[580] */
+ {0x56a, 0x04914}, /* VS.INST_MEM[581] */
+ {0x56b, 0x04918}, /* VS.INST_MEM[582] */
+ {0x56c, 0x0491C}, /* VS.INST_MEM[583] */
+ {0x56d, 0x04920}, /* VS.INST_MEM[584] */
+ {0x56e, 0x04924}, /* VS.INST_MEM[585] */
+ {0x56f, 0x04928}, /* VS.INST_MEM[586] */
+ {0x570, 0x0492C}, /* VS.INST_MEM[587] */
+ {0x571, 0x04930}, /* VS.INST_MEM[588] */
+ {0x572, 0x04934}, /* VS.INST_MEM[589] */
+ {0x573, 0x04938}, /* VS.INST_MEM[590] */
+ {0x574, 0x0493C}, /* VS.INST_MEM[591] */
+ {0x575, 0x04940}, /* VS.INST_MEM[592] */
+ {0x576, 0x04944}, /* VS.INST_MEM[593] */
+ {0x577, 0x04948}, /* VS.INST_MEM[594] */
+ {0x578, 0x0494C}, /* VS.INST_MEM[595] */
+ {0x579, 0x04950}, /* VS.INST_MEM[596] */
+ {0x57a, 0x04954}, /* VS.INST_MEM[597] */
+ {0x57b, 0x04958}, /* VS.INST_MEM[598] */
+ {0x57c, 0x0495C}, /* VS.INST_MEM[599] */
+ {0x57d, 0x04960}, /* VS.INST_MEM[600] */
+ {0x57e, 0x04964}, /* VS.INST_MEM[601] */
+ {0x57f, 0x04968}, /* VS.INST_MEM[602] */
+ {0x580, 0x0496C}, /* VS.INST_MEM[603] */
+ {0x581, 0x04970}, /* VS.INST_MEM[604] */
+ {0x582, 0x04974}, /* VS.INST_MEM[605] */
+ {0x583, 0x04978}, /* VS.INST_MEM[606] */
+ {0x584, 0x0497C}, /* VS.INST_MEM[607] */
+ {0x585, 0x04980}, /* VS.INST_MEM[608] */
+ {0x586, 0x04984}, /* VS.INST_MEM[609] */
+ {0x587, 0x04988}, /* VS.INST_MEM[610] */
+ {0x588, 0x0498C}, /* VS.INST_MEM[611] */
+ {0x589, 0x04990}, /* VS.INST_MEM[612] */
+ {0x58a, 0x04994}, /* VS.INST_MEM[613] */
+ {0x58b, 0x04998}, /* VS.INST_MEM[614] */
+ {0x58c, 0x0499C}, /* VS.INST_MEM[615] */
+ {0x58d, 0x049A0}, /* VS.INST_MEM[616] */
+ {0x58e, 0x049A4}, /* VS.INST_MEM[617] */
+ {0x58f, 0x049A8}, /* VS.INST_MEM[618] */
+ {0x590, 0x049AC}, /* VS.INST_MEM[619] */
+ {0x591, 0x049B0}, /* VS.INST_MEM[620] */
+ {0x592, 0x049B4}, /* VS.INST_MEM[621] */
+ {0x593, 0x049B8}, /* VS.INST_MEM[622] */
+ {0x594, 0x049BC}, /* VS.INST_MEM[623] */
+ {0x595, 0x049C0}, /* VS.INST_MEM[624] */
+ {0x596, 0x049C4}, /* VS.INST_MEM[625] */
+ {0x597, 0x049C8}, /* VS.INST_MEM[626] */
+ {0x598, 0x049CC}, /* VS.INST_MEM[627] */
+ {0x599, 0x049D0}, /* VS.INST_MEM[628] */
+ {0x59a, 0x049D4}, /* VS.INST_MEM[629] */
+ {0x59b, 0x049D8}, /* VS.INST_MEM[630] */
+ {0x59c, 0x049DC}, /* VS.INST_MEM[631] */
+ {0x59d, 0x049E0}, /* VS.INST_MEM[632] */
+ {0x59e, 0x049E4}, /* VS.INST_MEM[633] */
+ {0x59f, 0x049E8}, /* VS.INST_MEM[634] */
+ {0x5a0, 0x049EC}, /* VS.INST_MEM[635] */
+ {0x5a1, 0x049F0}, /* VS.INST_MEM[636] */
+ {0x5a2, 0x049F4}, /* VS.INST_MEM[637] */
+ {0x5a3, 0x049F8}, /* VS.INST_MEM[638] */
+ {0x5a4, 0x049FC}, /* VS.INST_MEM[639] */
+ {0x5a5, 0x04A00}, /* VS.INST_MEM[640] */
+ {0x5a6, 0x04A04}, /* VS.INST_MEM[641] */
+ {0x5a7, 0x04A08}, /* VS.INST_MEM[642] */
+ {0x5a8, 0x04A0C}, /* VS.INST_MEM[643] */
+ {0x5a9, 0x04A10}, /* VS.INST_MEM[644] */
+ {0x5aa, 0x04A14}, /* VS.INST_MEM[645] */
+ {0x5ab, 0x04A18}, /* VS.INST_MEM[646] */
+ {0x5ac, 0x04A1C}, /* VS.INST_MEM[647] */
+ {0x5ad, 0x04A20}, /* VS.INST_MEM[648] */
+ {0x5ae, 0x04A24}, /* VS.INST_MEM[649] */
+ {0x5af, 0x04A28}, /* VS.INST_MEM[650] */
+ {0x5b0, 0x04A2C}, /* VS.INST_MEM[651] */
+ {0x5b1, 0x04A30}, /* VS.INST_MEM[652] */
+ {0x5b2, 0x04A34}, /* VS.INST_MEM[653] */
+ {0x5b3, 0x04A38}, /* VS.INST_MEM[654] */
+ {0x5b4, 0x04A3C}, /* VS.INST_MEM[655] */
+ {0x5b5, 0x04A40}, /* VS.INST_MEM[656] */
+ {0x5b6, 0x04A44}, /* VS.INST_MEM[657] */
+ {0x5b7, 0x04A48}, /* VS.INST_MEM[658] */
+ {0x5b8, 0x04A4C}, /* VS.INST_MEM[659] */
+ {0x5b9, 0x04A50}, /* VS.INST_MEM[660] */
+ {0x5ba, 0x04A54}, /* VS.INST_MEM[661] */
+ {0x5bb, 0x04A58}, /* VS.INST_MEM[662] */
+ {0x5bc, 0x04A5C}, /* VS.INST_MEM[663] */
+ {0x5bd, 0x04A60}, /* VS.INST_MEM[664] */
+ {0x5be, 0x04A64}, /* VS.INST_MEM[665] */
+ {0x5bf, 0x04A68}, /* VS.INST_MEM[666] */
+ {0x5c0, 0x04A6C}, /* VS.INST_MEM[667] */
+ {0x5c1, 0x04A70}, /* VS.INST_MEM[668] */
+ {0x5c2, 0x04A74}, /* VS.INST_MEM[669] */
+ {0x5c3, 0x04A78}, /* VS.INST_MEM[670] */
+ {0x5c4, 0x04A7C}, /* VS.INST_MEM[671] */
+ {0x5c5, 0x04A80}, /* VS.INST_MEM[672] */
+ {0x5c6, 0x04A84}, /* VS.INST_MEM[673] */
+ {0x5c7, 0x04A88}, /* VS.INST_MEM[674] */
+ {0x5c8, 0x04A8C}, /* VS.INST_MEM[675] */
+ {0x5c9, 0x04A90}, /* VS.INST_MEM[676] */
+ {0x5ca, 0x04A94}, /* VS.INST_MEM[677] */
+ {0x5cb, 0x04A98}, /* VS.INST_MEM[678] */
+ {0x5cc, 0x04A9C}, /* VS.INST_MEM[679] */
+ {0x5cd, 0x04AA0}, /* VS.INST_MEM[680] */
+ {0x5ce, 0x04AA4}, /* VS.INST_MEM[681] */
+ {0x5cf, 0x04AA8}, /* VS.INST_MEM[682] */
+ {0x5d0, 0x04AAC}, /* VS.INST_MEM[683] */
+ {0x5d1, 0x04AB0}, /* VS.INST_MEM[684] */
+ {0x5d2, 0x04AB4}, /* VS.INST_MEM[685] */
+ {0x5d3, 0x04AB8}, /* VS.INST_MEM[686] */
+ {0x5d4, 0x04ABC}, /* VS.INST_MEM[687] */
+ {0x5d5, 0x04AC0}, /* VS.INST_MEM[688] */
+ {0x5d6, 0x04AC4}, /* VS.INST_MEM[689] */
+ {0x5d7, 0x04AC8}, /* VS.INST_MEM[690] */
+ {0x5d8, 0x04ACC}, /* VS.INST_MEM[691] */
+ {0x5d9, 0x04AD0}, /* VS.INST_MEM[692] */
+ {0x5da, 0x04AD4}, /* VS.INST_MEM[693] */
+ {0x5db, 0x04AD8}, /* VS.INST_MEM[694] */
+ {0x5dc, 0x04ADC}, /* VS.INST_MEM[695] */
+ {0x5dd, 0x04AE0}, /* VS.INST_MEM[696] */
+ {0x5de, 0x04AE4}, /* VS.INST_MEM[697] */
+ {0x5df, 0x04AE8}, /* VS.INST_MEM[698] */
+ {0x5e0, 0x04AEC}, /* VS.INST_MEM[699] */
+ {0x5e1, 0x04AF0}, /* VS.INST_MEM[700] */
+ {0x5e2, 0x04AF4}, /* VS.INST_MEM[701] */
+ {0x5e3, 0x04AF8}, /* VS.INST_MEM[702] */
+ {0x5e4, 0x04AFC}, /* VS.INST_MEM[703] */
+ {0x5e5, 0x04B00}, /* VS.INST_MEM[704] */
+ {0x5e6, 0x04B04}, /* VS.INST_MEM[705] */
+ {0x5e7, 0x04B08}, /* VS.INST_MEM[706] */
+ {0x5e8, 0x04B0C}, /* VS.INST_MEM[707] */
+ {0x5e9, 0x04B10}, /* VS.INST_MEM[708] */
+ {0x5ea, 0x04B14}, /* VS.INST_MEM[709] */
+ {0x5eb, 0x04B18}, /* VS.INST_MEM[710] */
+ {0x5ec, 0x04B1C}, /* VS.INST_MEM[711] */
+ {0x5ed, 0x04B20}, /* VS.INST_MEM[712] */
+ {0x5ee, 0x04B24}, /* VS.INST_MEM[713] */
+ {0x5ef, 0x04B28}, /* VS.INST_MEM[714] */
+ {0x5f0, 0x04B2C}, /* VS.INST_MEM[715] */
+ {0x5f1, 0x04B30}, /* VS.INST_MEM[716] */
+ {0x5f2, 0x04B34}, /* VS.INST_MEM[717] */
+ {0x5f3, 0x04B38}, /* VS.INST_MEM[718] */
+ {0x5f4, 0x04B3C}, /* VS.INST_MEM[719] */
+ {0x5f5, 0x04B40}, /* VS.INST_MEM[720] */
+ {0x5f6, 0x04B44}, /* VS.INST_MEM[721] */
+ {0x5f7, 0x04B48}, /* VS.INST_MEM[722] */
+ {0x5f8, 0x04B4C}, /* VS.INST_MEM[723] */
+ {0x5f9, 0x04B50}, /* VS.INST_MEM[724] */
+ {0x5fa, 0x04B54}, /* VS.INST_MEM[725] */
+ {0x5fb, 0x04B58}, /* VS.INST_MEM[726] */
+ {0x5fc, 0x04B5C}, /* VS.INST_MEM[727] */
+ {0x5fd, 0x04B60}, /* VS.INST_MEM[728] */
+ {0x5fe, 0x04B64}, /* VS.INST_MEM[729] */
+ {0x5ff, 0x04B68}, /* VS.INST_MEM[730] */
+ {0x600, 0x04B6C}, /* VS.INST_MEM[731] */
+ {0x601, 0x04B70}, /* VS.INST_MEM[732] */
+ {0x602, 0x04B74}, /* VS.INST_MEM[733] */
+ {0x603, 0x04B78}, /* VS.INST_MEM[734] */
+ {0x604, 0x04B7C}, /* VS.INST_MEM[735] */
+ {0x605, 0x04B80}, /* VS.INST_MEM[736] */
+ {0x606, 0x04B84}, /* VS.INST_MEM[737] */
+ {0x607, 0x04B88}, /* VS.INST_MEM[738] */
+ {0x608, 0x04B8C}, /* VS.INST_MEM[739] */
+ {0x609, 0x04B90}, /* VS.INST_MEM[740] */
+ {0x60a, 0x04B94}, /* VS.INST_MEM[741] */
+ {0x60b, 0x04B98}, /* VS.INST_MEM[742] */
+ {0x60c, 0x04B9C}, /* VS.INST_MEM[743] */
+ {0x60d, 0x04BA0}, /* VS.INST_MEM[744] */
+ {0x60e, 0x04BA4}, /* VS.INST_MEM[745] */
+ {0x60f, 0x04BA8}, /* VS.INST_MEM[746] */
+ {0x610, 0x04BAC}, /* VS.INST_MEM[747] */
+ {0x611, 0x04BB0}, /* VS.INST_MEM[748] */
+ {0x612, 0x04BB4}, /* VS.INST_MEM[749] */
+ {0x613, 0x04BB8}, /* VS.INST_MEM[750] */
+ {0x614, 0x04BBC}, /* VS.INST_MEM[751] */
+ {0x615, 0x04BC0}, /* VS.INST_MEM[752] */
+ {0x616, 0x04BC4}, /* VS.INST_MEM[753] */
+ {0x617, 0x04BC8}, /* VS.INST_MEM[754] */
+ {0x618, 0x04BCC}, /* VS.INST_MEM[755] */
+ {0x619, 0x04BD0}, /* VS.INST_MEM[756] */
+ {0x61a, 0x04BD4}, /* VS.INST_MEM[757] */
+ {0x61b, 0x04BD8}, /* VS.INST_MEM[758] */
+ {0x61c, 0x04BDC}, /* VS.INST_MEM[759] */
+ {0x61d, 0x04BE0}, /* VS.INST_MEM[760] */
+ {0x61e, 0x04BE4}, /* VS.INST_MEM[761] */
+ {0x61f, 0x04BE8}, /* VS.INST_MEM[762] */
+ {0x620, 0x04BEC}, /* VS.INST_MEM[763] */
+ {0x621, 0x04BF0}, /* VS.INST_MEM[764] */
+ {0x622, 0x04BF4}, /* VS.INST_MEM[765] */
+ {0x623, 0x04BF8}, /* VS.INST_MEM[766] */
+ {0x624, 0x04BFC}, /* VS.INST_MEM[767] */
+ {0x625, 0x04C00}, /* VS.INST_MEM[768] */
+ {0x626, 0x04C04}, /* VS.INST_MEM[769] */
+ {0x627, 0x04C08}, /* VS.INST_MEM[770] */
+ {0x628, 0x04C0C}, /* VS.INST_MEM[771] */
+ {0x629, 0x04C10}, /* VS.INST_MEM[772] */
+ {0x62a, 0x04C14}, /* VS.INST_MEM[773] */
+ {0x62b, 0x04C18}, /* VS.INST_MEM[774] */
+ {0x62c, 0x04C1C}, /* VS.INST_MEM[775] */
+ {0x62d, 0x04C20}, /* VS.INST_MEM[776] */
+ {0x62e, 0x04C24}, /* VS.INST_MEM[777] */
+ {0x62f, 0x04C28}, /* VS.INST_MEM[778] */
+ {0x630, 0x04C2C}, /* VS.INST_MEM[779] */
+ {0x631, 0x04C30}, /* VS.INST_MEM[780] */
+ {0x632, 0x04C34}, /* VS.INST_MEM[781] */
+ {0x633, 0x04C38}, /* VS.INST_MEM[782] */
+ {0x634, 0x04C3C}, /* VS.INST_MEM[783] */
+ {0x635, 0x04C40}, /* VS.INST_MEM[784] */
+ {0x636, 0x04C44}, /* VS.INST_MEM[785] */
+ {0x637, 0x04C48}, /* VS.INST_MEM[786] */
+ {0x638, 0x04C4C}, /* VS.INST_MEM[787] */
+ {0x639, 0x04C50}, /* VS.INST_MEM[788] */
+ {0x63a, 0x04C54}, /* VS.INST_MEM[789] */
+ {0x63b, 0x04C58}, /* VS.INST_MEM[790] */
+ {0x63c, 0x04C5C}, /* VS.INST_MEM[791] */
+ {0x63d, 0x04C60}, /* VS.INST_MEM[792] */
+ {0x63e, 0x04C64}, /* VS.INST_MEM[793] */
+ {0x63f, 0x04C68}, /* VS.INST_MEM[794] */
+ {0x640, 0x04C6C}, /* VS.INST_MEM[795] */
+ {0x641, 0x04C70}, /* VS.INST_MEM[796] */
+ {0x642, 0x04C74}, /* VS.INST_MEM[797] */
+ {0x643, 0x04C78}, /* VS.INST_MEM[798] */
+ {0x644, 0x04C7C}, /* VS.INST_MEM[799] */
+ {0x645, 0x04C80}, /* VS.INST_MEM[800] */
+ {0x646, 0x04C84}, /* VS.INST_MEM[801] */
+ {0x647, 0x04C88}, /* VS.INST_MEM[802] */
+ {0x648, 0x04C8C}, /* VS.INST_MEM[803] */
+ {0x649, 0x04C90}, /* VS.INST_MEM[804] */
+ {0x64a, 0x04C94}, /* VS.INST_MEM[805] */
+ {0x64b, 0x04C98}, /* VS.INST_MEM[806] */
+ {0x64c, 0x04C9C}, /* VS.INST_MEM[807] */
+ {0x64d, 0x04CA0}, /* VS.INST_MEM[808] */
+ {0x64e, 0x04CA4}, /* VS.INST_MEM[809] */
+ {0x64f, 0x04CA8}, /* VS.INST_MEM[810] */
+ {0x650, 0x04CAC}, /* VS.INST_MEM[811] */
+ {0x651, 0x04CB0}, /* VS.INST_MEM[812] */
+ {0x652, 0x04CB4}, /* VS.INST_MEM[813] */
+ {0x653, 0x04CB8}, /* VS.INST_MEM[814] */
+ {0x654, 0x04CBC}, /* VS.INST_MEM[815] */
+ {0x655, 0x04CC0}, /* VS.INST_MEM[816] */
+ {0x656, 0x04CC4}, /* VS.INST_MEM[817] */
+ {0x657, 0x04CC8}, /* VS.INST_MEM[818] */
+ {0x658, 0x04CCC}, /* VS.INST_MEM[819] */
+ {0x659, 0x04CD0}, /* VS.INST_MEM[820] */
+ {0x65a, 0x04CD4}, /* VS.INST_MEM[821] */
+ {0x65b, 0x04CD8}, /* VS.INST_MEM[822] */
+ {0x65c, 0x04CDC}, /* VS.INST_MEM[823] */
+ {0x65d, 0x04CE0}, /* VS.INST_MEM[824] */
+ {0x65e, 0x04CE4}, /* VS.INST_MEM[825] */
+ {0x65f, 0x04CE8}, /* VS.INST_MEM[826] */
+ {0x660, 0x04CEC}, /* VS.INST_MEM[827] */
+ {0x661, 0x04CF0}, /* VS.INST_MEM[828] */
+ {0x662, 0x04CF4}, /* VS.INST_MEM[829] */
+ {0x663, 0x04CF8}, /* VS.INST_MEM[830] */
+ {0x664, 0x04CFC}, /* VS.INST_MEM[831] */
+ {0x665, 0x04D00}, /* VS.INST_MEM[832] */
+ {0x666, 0x04D04}, /* VS.INST_MEM[833] */
+ {0x667, 0x04D08}, /* VS.INST_MEM[834] */
+ {0x668, 0x04D0C}, /* VS.INST_MEM[835] */
+ {0x669, 0x04D10}, /* VS.INST_MEM[836] */
+ {0x66a, 0x04D14}, /* VS.INST_MEM[837] */
+ {0x66b, 0x04D18}, /* VS.INST_MEM[838] */
+ {0x66c, 0x04D1C}, /* VS.INST_MEM[839] */
+ {0x66d, 0x04D20}, /* VS.INST_MEM[840] */
+ {0x66e, 0x04D24}, /* VS.INST_MEM[841] */
+ {0x66f, 0x04D28}, /* VS.INST_MEM[842] */
+ {0x670, 0x04D2C}, /* VS.INST_MEM[843] */
+ {0x671, 0x04D30}, /* VS.INST_MEM[844] */
+ {0x672, 0x04D34}, /* VS.INST_MEM[845] */
+ {0x673, 0x04D38}, /* VS.INST_MEM[846] */
+ {0x674, 0x04D3C}, /* VS.INST_MEM[847] */
+ {0x675, 0x04D40}, /* VS.INST_MEM[848] */
+ {0x676, 0x04D44}, /* VS.INST_MEM[849] */
+ {0x677, 0x04D48}, /* VS.INST_MEM[850] */
+ {0x678, 0x04D4C}, /* VS.INST_MEM[851] */
+ {0x679, 0x04D50}, /* VS.INST_MEM[852] */
+ {0x67a, 0x04D54}, /* VS.INST_MEM[853] */
+ {0x67b, 0x04D58}, /* VS.INST_MEM[854] */
+ {0x67c, 0x04D5C}, /* VS.INST_MEM[855] */
+ {0x67d, 0x04D60}, /* VS.INST_MEM[856] */
+ {0x67e, 0x04D64}, /* VS.INST_MEM[857] */
+ {0x67f, 0x04D68}, /* VS.INST_MEM[858] */
+ {0x680, 0x04D6C}, /* VS.INST_MEM[859] */
+ {0x681, 0x04D70}, /* VS.INST_MEM[860] */
+ {0x682, 0x04D74}, /* VS.INST_MEM[861] */
+ {0x683, 0x04D78}, /* VS.INST_MEM[862] */
+ {0x684, 0x04D7C}, /* VS.INST_MEM[863] */
+ {0x685, 0x04D80}, /* VS.INST_MEM[864] */
+ {0x686, 0x04D84}, /* VS.INST_MEM[865] */
+ {0x687, 0x04D88}, /* VS.INST_MEM[866] */
+ {0x688, 0x04D8C}, /* VS.INST_MEM[867] */
+ {0x689, 0x04D90}, /* VS.INST_MEM[868] */
+ {0x68a, 0x04D94}, /* VS.INST_MEM[869] */
+ {0x68b, 0x04D98}, /* VS.INST_MEM[870] */
+ {0x68c, 0x04D9C}, /* VS.INST_MEM[871] */
+ {0x68d, 0x04DA0}, /* VS.INST_MEM[872] */
+ {0x68e, 0x04DA4}, /* VS.INST_MEM[873] */
+ {0x68f, 0x04DA8}, /* VS.INST_MEM[874] */
+ {0x690, 0x04DAC}, /* VS.INST_MEM[875] */
+ {0x691, 0x04DB0}, /* VS.INST_MEM[876] */
+ {0x692, 0x04DB4}, /* VS.INST_MEM[877] */
+ {0x693, 0x04DB8}, /* VS.INST_MEM[878] */
+ {0x694, 0x04DBC}, /* VS.INST_MEM[879] */
+ {0x695, 0x04DC0}, /* VS.INST_MEM[880] */
+ {0x696, 0x04DC4}, /* VS.INST_MEM[881] */
+ {0x697, 0x04DC8}, /* VS.INST_MEM[882] */
+ {0x698, 0x04DCC}, /* VS.INST_MEM[883] */
+ {0x699, 0x04DD0}, /* VS.INST_MEM[884] */
+ {0x69a, 0x04DD4}, /* VS.INST_MEM[885] */
+ {0x69b, 0x04DD8}, /* VS.INST_MEM[886] */
+ {0x69c, 0x04DDC}, /* VS.INST_MEM[887] */
+ {0x69d, 0x04DE0}, /* VS.INST_MEM[888] */
+ {0x69e, 0x04DE4}, /* VS.INST_MEM[889] */
+ {0x69f, 0x04DE8}, /* VS.INST_MEM[890] */
+ {0x6a0, 0x04DEC}, /* VS.INST_MEM[891] */
+ {0x6a1, 0x04DF0}, /* VS.INST_MEM[892] */
+ {0x6a2, 0x04DF4}, /* VS.INST_MEM[893] */
+ {0x6a3, 0x04DF8}, /* VS.INST_MEM[894] */
+ {0x6a4, 0x04DFC}, /* VS.INST_MEM[895] */
+ {0x6a5, 0x04E00}, /* VS.INST_MEM[896] */
+ {0x6a6, 0x04E04}, /* VS.INST_MEM[897] */
+ {0x6a7, 0x04E08}, /* VS.INST_MEM[898] */
+ {0x6a8, 0x04E0C}, /* VS.INST_MEM[899] */
+ {0x6a9, 0x04E10}, /* VS.INST_MEM[900] */
+ {0x6aa, 0x04E14}, /* VS.INST_MEM[901] */
+ {0x6ab, 0x04E18}, /* VS.INST_MEM[902] */
+ {0x6ac, 0x04E1C}, /* VS.INST_MEM[903] */
+ {0x6ad, 0x04E20}, /* VS.INST_MEM[904] */
+ {0x6ae, 0x04E24}, /* VS.INST_MEM[905] */
+ {0x6af, 0x04E28}, /* VS.INST_MEM[906] */
+ {0x6b0, 0x04E2C}, /* VS.INST_MEM[907] */
+ {0x6b1, 0x04E30}, /* VS.INST_MEM[908] */
+ {0x6b2, 0x04E34}, /* VS.INST_MEM[909] */
+ {0x6b3, 0x04E38}, /* VS.INST_MEM[910] */
+ {0x6b4, 0x04E3C}, /* VS.INST_MEM[911] */
+ {0x6b5, 0x04E40}, /* VS.INST_MEM[912] */
+ {0x6b6, 0x04E44}, /* VS.INST_MEM[913] */
+ {0x6b7, 0x04E48}, /* VS.INST_MEM[914] */
+ {0x6b8, 0x04E4C}, /* VS.INST_MEM[915] */
+ {0x6b9, 0x04E50}, /* VS.INST_MEM[916] */
+ {0x6ba, 0x04E54}, /* VS.INST_MEM[917] */
+ {0x6bb, 0x04E58}, /* VS.INST_MEM[918] */
+ {0x6bc, 0x04E5C}, /* VS.INST_MEM[919] */
+ {0x6bd, 0x04E60}, /* VS.INST_MEM[920] */
+ {0x6be, 0x04E64}, /* VS.INST_MEM[921] */
+ {0x6bf, 0x04E68}, /* VS.INST_MEM[922] */
+ {0x6c0, 0x04E6C}, /* VS.INST_MEM[923] */
+ {0x6c1, 0x04E70}, /* VS.INST_MEM[924] */
+ {0x6c2, 0x04E74}, /* VS.INST_MEM[925] */
+ {0x6c3, 0x04E78}, /* VS.INST_MEM[926] */
+ {0x6c4, 0x04E7C}, /* VS.INST_MEM[927] */
+ {0x6c5, 0x04E80}, /* VS.INST_MEM[928] */
+ {0x6c6, 0x04E84}, /* VS.INST_MEM[929] */
+ {0x6c7, 0x04E88}, /* VS.INST_MEM[930] */
+ {0x6c8, 0x04E8C}, /* VS.INST_MEM[931] */
+ {0x6c9, 0x04E90}, /* VS.INST_MEM[932] */
+ {0x6ca, 0x04E94}, /* VS.INST_MEM[933] */
+ {0x6cb, 0x04E98}, /* VS.INST_MEM[934] */
+ {0x6cc, 0x04E9C}, /* VS.INST_MEM[935] */
+ {0x6cd, 0x04EA0}, /* VS.INST_MEM[936] */
+ {0x6ce, 0x04EA4}, /* VS.INST_MEM[937] */
+ {0x6cf, 0x04EA8}, /* VS.INST_MEM[938] */
+ {0x6d0, 0x04EAC}, /* VS.INST_MEM[939] */
+ {0x6d1, 0x04EB0}, /* VS.INST_MEM[940] */
+ {0x6d2, 0x04EB4}, /* VS.INST_MEM[941] */
+ {0x6d3, 0x04EB8}, /* VS.INST_MEM[942] */
+ {0x6d4, 0x04EBC}, /* VS.INST_MEM[943] */
+ {0x6d5, 0x04EC0}, /* VS.INST_MEM[944] */
+ {0x6d6, 0x04EC4}, /* VS.INST_MEM[945] */
+ {0x6d7, 0x04EC8}, /* VS.INST_MEM[946] */
+ {0x6d8, 0x04ECC}, /* VS.INST_MEM[947] */
+ {0x6d9, 0x04ED0}, /* VS.INST_MEM[948] */
+ {0x6da, 0x04ED4}, /* VS.INST_MEM[949] */
+ {0x6db, 0x04ED8}, /* VS.INST_MEM[950] */
+ {0x6dc, 0x04EDC}, /* VS.INST_MEM[951] */
+ {0x6dd, 0x04EE0}, /* VS.INST_MEM[952] */
+ {0x6de, 0x04EE4}, /* VS.INST_MEM[953] */
+ {0x6df, 0x04EE8}, /* VS.INST_MEM[954] */
+ {0x6e0, 0x04EEC}, /* VS.INST_MEM[955] */
+ {0x6e1, 0x04EF0}, /* VS.INST_MEM[956] */
+ {0x6e2, 0x04EF4}, /* VS.INST_MEM[957] */
+ {0x6e3, 0x04EF8}, /* VS.INST_MEM[958] */
+ {0x6e4, 0x04EFC}, /* VS.INST_MEM[959] */
+ {0x6e5, 0x04F00}, /* VS.INST_MEM[960] */
+ {0x6e6, 0x04F04}, /* VS.INST_MEM[961] */
+ {0x6e7, 0x04F08}, /* VS.INST_MEM[962] */
+ {0x6e8, 0x04F0C}, /* VS.INST_MEM[963] */
+ {0x6e9, 0x04F10}, /* VS.INST_MEM[964] */
+ {0x6ea, 0x04F14}, /* VS.INST_MEM[965] */
+ {0x6eb, 0x04F18}, /* VS.INST_MEM[966] */
+ {0x6ec, 0x04F1C}, /* VS.INST_MEM[967] */
+ {0x6ed, 0x04F20}, /* VS.INST_MEM[968] */
+ {0x6ee, 0x04F24}, /* VS.INST_MEM[969] */
+ {0x6ef, 0x04F28}, /* VS.INST_MEM[970] */
+ {0x6f0, 0x04F2C}, /* VS.INST_MEM[971] */
+ {0x6f1, 0x04F30}, /* VS.INST_MEM[972] */
+ {0x6f2, 0x04F34}, /* VS.INST_MEM[973] */
+ {0x6f3, 0x04F38}, /* VS.INST_MEM[974] */
+ {0x6f4, 0x04F3C}, /* VS.INST_MEM[975] */
+ {0x6f5, 0x04F40}, /* VS.INST_MEM[976] */
+ {0x6f6, 0x04F44}, /* VS.INST_MEM[977] */
+ {0x6f7, 0x04F48}, /* VS.INST_MEM[978] */
+ {0x6f8, 0x04F4C}, /* VS.INST_MEM[979] */
+ {0x6f9, 0x04F50}, /* VS.INST_MEM[980] */
+ {0x6fa, 0x04F54}, /* VS.INST_MEM[981] */
+ {0x6fb, 0x04F58}, /* VS.INST_MEM[982] */
+ {0x6fc, 0x04F5C}, /* VS.INST_MEM[983] */
+ {0x6fd, 0x04F60}, /* VS.INST_MEM[984] */
+ {0x6fe, 0x04F64}, /* VS.INST_MEM[985] */
+ {0x6ff, 0x04F68}, /* VS.INST_MEM[986] */
+ {0x700, 0x04F6C}, /* VS.INST_MEM[987] */
+ {0x701, 0x04F70}, /* VS.INST_MEM[988] */
+ {0x702, 0x04F74}, /* VS.INST_MEM[989] */
+ {0x703, 0x04F78}, /* VS.INST_MEM[990] */
+ {0x704, 0x04F7C}, /* VS.INST_MEM[991] */
+ {0x705, 0x04F80}, /* VS.INST_MEM[992] */
+ {0x706, 0x04F84}, /* VS.INST_MEM[993] */
+ {0x707, 0x04F88}, /* VS.INST_MEM[994] */
+ {0x708, 0x04F8C}, /* VS.INST_MEM[995] */
+ {0x709, 0x04F90}, /* VS.INST_MEM[996] */
+ {0x70a, 0x04F94}, /* VS.INST_MEM[997] */
+ {0x70b, 0x04F98}, /* VS.INST_MEM[998] */
+ {0x70c, 0x04F9C}, /* VS.INST_MEM[999] */
+ {0x70d, 0x04FA0}, /* VS.INST_MEM[1000] */
+ {0x70e, 0x04FA4}, /* VS.INST_MEM[1001] */
+ {0x70f, 0x04FA8}, /* VS.INST_MEM[1002] */
+ {0x710, 0x04FAC}, /* VS.INST_MEM[1003] */
+ {0x711, 0x04FB0}, /* VS.INST_MEM[1004] */
+ {0x712, 0x04FB4}, /* VS.INST_MEM[1005] */
+ {0x713, 0x04FB8}, /* VS.INST_MEM[1006] */
+ {0x714, 0x04FBC}, /* VS.INST_MEM[1007] */
+ {0x715, 0x04FC0}, /* VS.INST_MEM[1008] */
+ {0x716, 0x04FC4}, /* VS.INST_MEM[1009] */
+ {0x717, 0x04FC8}, /* VS.INST_MEM[1010] */
+ {0x718, 0x04FCC}, /* VS.INST_MEM[1011] */
+ {0x719, 0x04FD0}, /* VS.INST_MEM[1012] */
+ {0x71a, 0x04FD4}, /* VS.INST_MEM[1013] */
+ {0x71b, 0x04FD8}, /* VS.INST_MEM[1014] */
+ {0x71c, 0x04FDC}, /* VS.INST_MEM[1015] */
+ {0x71d, 0x04FE0}, /* VS.INST_MEM[1016] */
+ {0x71e, 0x04FE4}, /* VS.INST_MEM[1017] */
+ {0x71f, 0x04FE8}, /* VS.INST_MEM[1018] */
+ {0x720, 0x04FEC}, /* VS.INST_MEM[1019] */
+ {0x721, 0x04FF0}, /* VS.INST_MEM[1020] */
+ {0x722, 0x04FF4}, /* VS.INST_MEM[1021] */
+ {0x723, 0x04FF8}, /* VS.INST_MEM[1022] */
+ {0x724, 0x04FFC}, /* VS.INST_MEM[1023] */
+ {0x727, 0x05000}, /* VS.UNIFORMS[0] */
+ {0x728, 0x05004}, /* VS.UNIFORMS[1] */
+ {0x729, 0x05008}, /* VS.UNIFORMS[2] */
+ {0x72a, 0x0500C}, /* VS.UNIFORMS[3] */
+ {0x72b, 0x05010}, /* VS.UNIFORMS[4] */
+ {0x72c, 0x05014}, /* VS.UNIFORMS[5] */
+ {0x72d, 0x05018}, /* VS.UNIFORMS[6] */
+ {0x72e, 0x0501C}, /* VS.UNIFORMS[7] */
+ {0x72f, 0x05020}, /* VS.UNIFORMS[8] */
+ {0x730, 0x05024}, /* VS.UNIFORMS[9] */
+ {0x731, 0x05028}, /* VS.UNIFORMS[10] */
+ {0x732, 0x0502C}, /* VS.UNIFORMS[11] */
+ {0x733, 0x05030}, /* VS.UNIFORMS[12] */
+ {0x734, 0x05034}, /* VS.UNIFORMS[13] */
+ {0x735, 0x05038}, /* VS.UNIFORMS[14] */
+ {0x736, 0x0503C}, /* VS.UNIFORMS[15] */
+ {0x737, 0x05040}, /* VS.UNIFORMS[16] */
+ {0x738, 0x05044}, /* VS.UNIFORMS[17] */
+ {0x739, 0x05048}, /* VS.UNIFORMS[18] */
+ {0x73a, 0x0504C}, /* VS.UNIFORMS[19] */
+ {0x73b, 0x05050}, /* VS.UNIFORMS[20] */
+ {0x73c, 0x05054}, /* VS.UNIFORMS[21] */
+ {0x73d, 0x05058}, /* VS.UNIFORMS[22] */
+ {0x73e, 0x0505C}, /* VS.UNIFORMS[23] */
+ {0x73f, 0x05060}, /* VS.UNIFORMS[24] */
+ {0x740, 0x05064}, /* VS.UNIFORMS[25] */
+ {0x741, 0x05068}, /* VS.UNIFORMS[26] */
+ {0x742, 0x0506C}, /* VS.UNIFORMS[27] */
+ {0x743, 0x05070}, /* VS.UNIFORMS[28] */
+ {0x744, 0x05074}, /* VS.UNIFORMS[29] */
+ {0x745, 0x05078}, /* VS.UNIFORMS[30] */
+ {0x746, 0x0507C}, /* VS.UNIFORMS[31] */
+ {0x747, 0x05080}, /* VS.UNIFORMS[32] */
+ {0x748, 0x05084}, /* VS.UNIFORMS[33] */
+ {0x749, 0x05088}, /* VS.UNIFORMS[34] */
+ {0x74a, 0x0508C}, /* VS.UNIFORMS[35] */
+ {0x74b, 0x05090}, /* VS.UNIFORMS[36] */
+ {0x74c, 0x05094}, /* VS.UNIFORMS[37] */
+ {0x74d, 0x05098}, /* VS.UNIFORMS[38] */
+ {0x74e, 0x0509C}, /* VS.UNIFORMS[39] */
+ {0x74f, 0x050A0}, /* VS.UNIFORMS[40] */
+ {0x750, 0x050A4}, /* VS.UNIFORMS[41] */
+ {0x751, 0x050A8}, /* VS.UNIFORMS[42] */
+ {0x752, 0x050AC}, /* VS.UNIFORMS[43] */
+ {0x753, 0x050B0}, /* VS.UNIFORMS[44] */
+ {0x754, 0x050B4}, /* VS.UNIFORMS[45] */
+ {0x755, 0x050B8}, /* VS.UNIFORMS[46] */
+ {0x756, 0x050BC}, /* VS.UNIFORMS[47] */
+ {0x757, 0x050C0}, /* VS.UNIFORMS[48] */
+ {0x758, 0x050C4}, /* VS.UNIFORMS[49] */
+ {0x759, 0x050C8}, /* VS.UNIFORMS[50] */
+ {0x75a, 0x050CC}, /* VS.UNIFORMS[51] */
+ {0x75b, 0x050D0}, /* VS.UNIFORMS[52] */
+ {0x75c, 0x050D4}, /* VS.UNIFORMS[53] */
+ {0x75d, 0x050D8}, /* VS.UNIFORMS[54] */
+ {0x75e, 0x050DC}, /* VS.UNIFORMS[55] */
+ {0x75f, 0x050E0}, /* VS.UNIFORMS[56] */
+ {0x760, 0x050E4}, /* VS.UNIFORMS[57] */
+ {0x761, 0x050E8}, /* VS.UNIFORMS[58] */
+ {0x762, 0x050EC}, /* VS.UNIFORMS[59] */
+ {0x763, 0x050F0}, /* VS.UNIFORMS[60] */
+ {0x764, 0x050F4}, /* VS.UNIFORMS[61] */
+ {0x765, 0x050F8}, /* VS.UNIFORMS[62] */
+ {0x766, 0x050FC}, /* VS.UNIFORMS[63] */
+ {0x767, 0x05100}, /* VS.UNIFORMS[64] */
+ {0x768, 0x05104}, /* VS.UNIFORMS[65] */
+ {0x769, 0x05108}, /* VS.UNIFORMS[66] */
+ {0x76a, 0x0510C}, /* VS.UNIFORMS[67] */
+ {0x76b, 0x05110}, /* VS.UNIFORMS[68] */
+ {0x76c, 0x05114}, /* VS.UNIFORMS[69] */
+ {0x76d, 0x05118}, /* VS.UNIFORMS[70] */
+ {0x76e, 0x0511C}, /* VS.UNIFORMS[71] */
+ {0x76f, 0x05120}, /* VS.UNIFORMS[72] */
+ {0x770, 0x05124}, /* VS.UNIFORMS[73] */
+ {0x771, 0x05128}, /* VS.UNIFORMS[74] */
+ {0x772, 0x0512C}, /* VS.UNIFORMS[75] */
+ {0x773, 0x05130}, /* VS.UNIFORMS[76] */
+ {0x774, 0x05134}, /* VS.UNIFORMS[77] */
+ {0x775, 0x05138}, /* VS.UNIFORMS[78] */
+ {0x776, 0x0513C}, /* VS.UNIFORMS[79] */
+ {0x777, 0x05140}, /* VS.UNIFORMS[80] */
+ {0x778, 0x05144}, /* VS.UNIFORMS[81] */
+ {0x779, 0x05148}, /* VS.UNIFORMS[82] */
+ {0x77a, 0x0514C}, /* VS.UNIFORMS[83] */
+ {0x77b, 0x05150}, /* VS.UNIFORMS[84] */
+ {0x77c, 0x05154}, /* VS.UNIFORMS[85] */
+ {0x77d, 0x05158}, /* VS.UNIFORMS[86] */
+ {0x77e, 0x0515C}, /* VS.UNIFORMS[87] */
+ {0x77f, 0x05160}, /* VS.UNIFORMS[88] */
+ {0x780, 0x05164}, /* VS.UNIFORMS[89] */
+ {0x781, 0x05168}, /* VS.UNIFORMS[90] */
+ {0x782, 0x0516C}, /* VS.UNIFORMS[91] */
+ {0x783, 0x05170}, /* VS.UNIFORMS[92] */
+ {0x784, 0x05174}, /* VS.UNIFORMS[93] */
+ {0x785, 0x05178}, /* VS.UNIFORMS[94] */
+ {0x786, 0x0517C}, /* VS.UNIFORMS[95] */
+ {0x787, 0x05180}, /* VS.UNIFORMS[96] */
+ {0x788, 0x05184}, /* VS.UNIFORMS[97] */
+ {0x789, 0x05188}, /* VS.UNIFORMS[98] */
+ {0x78a, 0x0518C}, /* VS.UNIFORMS[99] */
+ {0x78b, 0x05190}, /* VS.UNIFORMS[100] */
+ {0x78c, 0x05194}, /* VS.UNIFORMS[101] */
+ {0x78d, 0x05198}, /* VS.UNIFORMS[102] */
+ {0x78e, 0x0519C}, /* VS.UNIFORMS[103] */
+ {0x78f, 0x051A0}, /* VS.UNIFORMS[104] */
+ {0x790, 0x051A4}, /* VS.UNIFORMS[105] */
+ {0x791, 0x051A8}, /* VS.UNIFORMS[106] */
+ {0x792, 0x051AC}, /* VS.UNIFORMS[107] */
+ {0x793, 0x051B0}, /* VS.UNIFORMS[108] */
+ {0x794, 0x051B4}, /* VS.UNIFORMS[109] */
+ {0x795, 0x051B8}, /* VS.UNIFORMS[110] */
+ {0x796, 0x051BC}, /* VS.UNIFORMS[111] */
+ {0x797, 0x051C0}, /* VS.UNIFORMS[112] */
+ {0x798, 0x051C4}, /* VS.UNIFORMS[113] */
+ {0x799, 0x051C8}, /* VS.UNIFORMS[114] */
+ {0x79a, 0x051CC}, /* VS.UNIFORMS[115] */
+ {0x79b, 0x051D0}, /* VS.UNIFORMS[116] */
+ {0x79c, 0x051D4}, /* VS.UNIFORMS[117] */
+ {0x79d, 0x051D8}, /* VS.UNIFORMS[118] */
+ {0x79e, 0x051DC}, /* VS.UNIFORMS[119] */
+ {0x79f, 0x051E0}, /* VS.UNIFORMS[120] */
+ {0x7a0, 0x051E4}, /* VS.UNIFORMS[121] */
+ {0x7a1, 0x051E8}, /* VS.UNIFORMS[122] */
+ {0x7a2, 0x051EC}, /* VS.UNIFORMS[123] */
+ {0x7a3, 0x051F0}, /* VS.UNIFORMS[124] */
+ {0x7a4, 0x051F4}, /* VS.UNIFORMS[125] */
+ {0x7a5, 0x051F8}, /* VS.UNIFORMS[126] */
+ {0x7a6, 0x051FC}, /* VS.UNIFORMS[127] */
+ {0x7a7, 0x05200}, /* VS.UNIFORMS[128] */
+ {0x7a8, 0x05204}, /* VS.UNIFORMS[129] */
+ {0x7a9, 0x05208}, /* VS.UNIFORMS[130] */
+ {0x7aa, 0x0520C}, /* VS.UNIFORMS[131] */
+ {0x7ab, 0x05210}, /* VS.UNIFORMS[132] */
+ {0x7ac, 0x05214}, /* VS.UNIFORMS[133] */
+ {0x7ad, 0x05218}, /* VS.UNIFORMS[134] */
+ {0x7ae, 0x0521C}, /* VS.UNIFORMS[135] */
+ {0x7af, 0x05220}, /* VS.UNIFORMS[136] */
+ {0x7b0, 0x05224}, /* VS.UNIFORMS[137] */
+ {0x7b1, 0x05228}, /* VS.UNIFORMS[138] */
+ {0x7b2, 0x0522C}, /* VS.UNIFORMS[139] */
+ {0x7b3, 0x05230}, /* VS.UNIFORMS[140] */
+ {0x7b4, 0x05234}, /* VS.UNIFORMS[141] */
+ {0x7b5, 0x05238}, /* VS.UNIFORMS[142] */
+ {0x7b6, 0x0523C}, /* VS.UNIFORMS[143] */
+ {0x7b7, 0x05240}, /* VS.UNIFORMS[144] */
+ {0x7b8, 0x05244}, /* VS.UNIFORMS[145] */
+ {0x7b9, 0x05248}, /* VS.UNIFORMS[146] */
+ {0x7ba, 0x0524C}, /* VS.UNIFORMS[147] */
+ {0x7bb, 0x05250}, /* VS.UNIFORMS[148] */
+ {0x7bc, 0x05254}, /* VS.UNIFORMS[149] */
+ {0x7bd, 0x05258}, /* VS.UNIFORMS[150] */
+ {0x7be, 0x0525C}, /* VS.UNIFORMS[151] */
+ {0x7bf, 0x05260}, /* VS.UNIFORMS[152] */
+ {0x7c0, 0x05264}, /* VS.UNIFORMS[153] */
+ {0x7c1, 0x05268}, /* VS.UNIFORMS[154] */
+ {0x7c2, 0x0526C}, /* VS.UNIFORMS[155] */
+ {0x7c3, 0x05270}, /* VS.UNIFORMS[156] */
+ {0x7c4, 0x05274}, /* VS.UNIFORMS[157] */
+ {0x7c5, 0x05278}, /* VS.UNIFORMS[158] */
+ {0x7c6, 0x0527C}, /* VS.UNIFORMS[159] */
+ {0x7c7, 0x05280}, /* VS.UNIFORMS[160] */
+ {0x7c8, 0x05284}, /* VS.UNIFORMS[161] */
+ {0x7c9, 0x05288}, /* VS.UNIFORMS[162] */
+ {0x7ca, 0x0528C}, /* VS.UNIFORMS[163] */
+ {0x7cb, 0x05290}, /* VS.UNIFORMS[164] */
+ {0x7cc, 0x05294}, /* VS.UNIFORMS[165] */
+ {0x7cd, 0x05298}, /* VS.UNIFORMS[166] */
+ {0x7ce, 0x0529C}, /* VS.UNIFORMS[167] */
+ {0x7cf, 0x052A0}, /* VS.UNIFORMS[168] */
+ {0x7d0, 0x052A4}, /* VS.UNIFORMS[169] */
+ {0x7d1, 0x052A8}, /* VS.UNIFORMS[170] */
+ {0x7d2, 0x052AC}, /* VS.UNIFORMS[171] */
+ {0x7d3, 0x052B0}, /* VS.UNIFORMS[172] */
+ {0x7d4, 0x052B4}, /* VS.UNIFORMS[173] */
+ {0x7d5, 0x052B8}, /* VS.UNIFORMS[174] */
+ {0x7d6, 0x052BC}, /* VS.UNIFORMS[175] */
+ {0x7d7, 0x052C0}, /* VS.UNIFORMS[176] */
+ {0x7d8, 0x052C4}, /* VS.UNIFORMS[177] */
+ {0x7d9, 0x052C8}, /* VS.UNIFORMS[178] */
+ {0x7da, 0x052CC}, /* VS.UNIFORMS[179] */
+ {0x7db, 0x052D0}, /* VS.UNIFORMS[180] */
+ {0x7dc, 0x052D4}, /* VS.UNIFORMS[181] */
+ {0x7dd, 0x052D8}, /* VS.UNIFORMS[182] */
+ {0x7de, 0x052DC}, /* VS.UNIFORMS[183] */
+ {0x7df, 0x052E0}, /* VS.UNIFORMS[184] */
+ {0x7e0, 0x052E4}, /* VS.UNIFORMS[185] */
+ {0x7e1, 0x052E8}, /* VS.UNIFORMS[186] */
+ {0x7e2, 0x052EC}, /* VS.UNIFORMS[187] */
+ {0x7e3, 0x052F0}, /* VS.UNIFORMS[188] */
+ {0x7e4, 0x052F4}, /* VS.UNIFORMS[189] */
+ {0x7e5, 0x052F8}, /* VS.UNIFORMS[190] */
+ {0x7e6, 0x052FC}, /* VS.UNIFORMS[191] */
+ {0x7e7, 0x05300}, /* VS.UNIFORMS[192] */
+ {0x7e8, 0x05304}, /* VS.UNIFORMS[193] */
+ {0x7e9, 0x05308}, /* VS.UNIFORMS[194] */
+ {0x7ea, 0x0530C}, /* VS.UNIFORMS[195] */
+ {0x7eb, 0x05310}, /* VS.UNIFORMS[196] */
+ {0x7ec, 0x05314}, /* VS.UNIFORMS[197] */
+ {0x7ed, 0x05318}, /* VS.UNIFORMS[198] */
+ {0x7ee, 0x0531C}, /* VS.UNIFORMS[199] */
+ {0x7ef, 0x05320}, /* VS.UNIFORMS[200] */
+ {0x7f0, 0x05324}, /* VS.UNIFORMS[201] */
+ {0x7f1, 0x05328}, /* VS.UNIFORMS[202] */
+ {0x7f2, 0x0532C}, /* VS.UNIFORMS[203] */
+ {0x7f3, 0x05330}, /* VS.UNIFORMS[204] */
+ {0x7f4, 0x05334}, /* VS.UNIFORMS[205] */
+ {0x7f5, 0x05338}, /* VS.UNIFORMS[206] */
+ {0x7f6, 0x0533C}, /* VS.UNIFORMS[207] */
+ {0x7f7, 0x05340}, /* VS.UNIFORMS[208] */
+ {0x7f8, 0x05344}, /* VS.UNIFORMS[209] */
+ {0x7f9, 0x05348}, /* VS.UNIFORMS[210] */
+ {0x7fa, 0x0534C}, /* VS.UNIFORMS[211] */
+ {0x7fb, 0x05350}, /* VS.UNIFORMS[212] */
+ {0x7fc, 0x05354}, /* VS.UNIFORMS[213] */
+ {0x7fd, 0x05358}, /* VS.UNIFORMS[214] */
+ {0x7fe, 0x0535C}, /* VS.UNIFORMS[215] */
+ {0x7ff, 0x05360}, /* VS.UNIFORMS[216] */
+ {0x800, 0x05364}, /* VS.UNIFORMS[217] */
+ {0x801, 0x05368}, /* VS.UNIFORMS[218] */
+ {0x802, 0x0536C}, /* VS.UNIFORMS[219] */
+ {0x803, 0x05370}, /* VS.UNIFORMS[220] */
+ {0x804, 0x05374}, /* VS.UNIFORMS[221] */
+ {0x805, 0x05378}, /* VS.UNIFORMS[222] */
+ {0x806, 0x0537C}, /* VS.UNIFORMS[223] */
+ {0x807, 0x05380}, /* VS.UNIFORMS[224] */
+ {0x808, 0x05384}, /* VS.UNIFORMS[225] */
+ {0x809, 0x05388}, /* VS.UNIFORMS[226] */
+ {0x80a, 0x0538C}, /* VS.UNIFORMS[227] */
+ {0x80b, 0x05390}, /* VS.UNIFORMS[228] */
+ {0x80c, 0x05394}, /* VS.UNIFORMS[229] */
+ {0x80d, 0x05398}, /* VS.UNIFORMS[230] */
+ {0x80e, 0x0539C}, /* VS.UNIFORMS[231] */
+ {0x80f, 0x053A0}, /* VS.UNIFORMS[232] */
+ {0x810, 0x053A4}, /* VS.UNIFORMS[233] */
+ {0x811, 0x053A8}, /* VS.UNIFORMS[234] */
+ {0x812, 0x053AC}, /* VS.UNIFORMS[235] */
+ {0x813, 0x053B0}, /* VS.UNIFORMS[236] */
+ {0x814, 0x053B4}, /* VS.UNIFORMS[237] */
+ {0x815, 0x053B8}, /* VS.UNIFORMS[238] */
+ {0x816, 0x053BC}, /* VS.UNIFORMS[239] */
+ {0x817, 0x053C0}, /* VS.UNIFORMS[240] */
+ {0x818, 0x053C4}, /* VS.UNIFORMS[241] */
+ {0x819, 0x053C8}, /* VS.UNIFORMS[242] */
+ {0x81a, 0x053CC}, /* VS.UNIFORMS[243] */
+ {0x81b, 0x053D0}, /* VS.UNIFORMS[244] */
+ {0x81c, 0x053D4}, /* VS.UNIFORMS[245] */
+ {0x81d, 0x053D8}, /* VS.UNIFORMS[246] */
+ {0x81e, 0x053DC}, /* VS.UNIFORMS[247] */
+ {0x81f, 0x053E0}, /* VS.UNIFORMS[248] */
+ {0x820, 0x053E4}, /* VS.UNIFORMS[249] */
+ {0x821, 0x053E8}, /* VS.UNIFORMS[250] */
+ {0x822, 0x053EC}, /* VS.UNIFORMS[251] */
+ {0x823, 0x053F0}, /* VS.UNIFORMS[252] */
+ {0x824, 0x053F4}, /* VS.UNIFORMS[253] */
+ {0x825, 0x053F8}, /* VS.UNIFORMS[254] */
+ {0x826, 0x053FC}, /* VS.UNIFORMS[255] */
+ {0x827, 0x05400}, /* VS.UNIFORMS[256] */
+ {0x828, 0x05404}, /* VS.UNIFORMS[257] */
+ {0x829, 0x05408}, /* VS.UNIFORMS[258] */
+ {0x82a, 0x0540C}, /* VS.UNIFORMS[259] */
+ {0x82b, 0x05410}, /* VS.UNIFORMS[260] */
+ {0x82c, 0x05414}, /* VS.UNIFORMS[261] */
+ {0x82d, 0x05418}, /* VS.UNIFORMS[262] */
+ {0x82e, 0x0541C}, /* VS.UNIFORMS[263] */
+ {0x82f, 0x05420}, /* VS.UNIFORMS[264] */
+ {0x830, 0x05424}, /* VS.UNIFORMS[265] */
+ {0x831, 0x05428}, /* VS.UNIFORMS[266] */
+ {0x832, 0x0542C}, /* VS.UNIFORMS[267] */
+ {0x833, 0x05430}, /* VS.UNIFORMS[268] */
+ {0x834, 0x05434}, /* VS.UNIFORMS[269] */
+ {0x835, 0x05438}, /* VS.UNIFORMS[270] */
+ {0x836, 0x0543C}, /* VS.UNIFORMS[271] */
+ {0x837, 0x05440}, /* VS.UNIFORMS[272] */
+ {0x838, 0x05444}, /* VS.UNIFORMS[273] */
+ {0x839, 0x05448}, /* VS.UNIFORMS[274] */
+ {0x83a, 0x0544C}, /* VS.UNIFORMS[275] */
+ {0x83b, 0x05450}, /* VS.UNIFORMS[276] */
+ {0x83c, 0x05454}, /* VS.UNIFORMS[277] */
+ {0x83d, 0x05458}, /* VS.UNIFORMS[278] */
+ {0x83e, 0x0545C}, /* VS.UNIFORMS[279] */
+ {0x83f, 0x05460}, /* VS.UNIFORMS[280] */
+ {0x840, 0x05464}, /* VS.UNIFORMS[281] */
+ {0x841, 0x05468}, /* VS.UNIFORMS[282] */
+ {0x842, 0x0546C}, /* VS.UNIFORMS[283] */
+ {0x843, 0x05470}, /* VS.UNIFORMS[284] */
+ {0x844, 0x05474}, /* VS.UNIFORMS[285] */
+ {0x845, 0x05478}, /* VS.UNIFORMS[286] */
+ {0x846, 0x0547C}, /* VS.UNIFORMS[287] */
+ {0x847, 0x05480}, /* VS.UNIFORMS[288] */
+ {0x848, 0x05484}, /* VS.UNIFORMS[289] */
+ {0x849, 0x05488}, /* VS.UNIFORMS[290] */
+ {0x84a, 0x0548C}, /* VS.UNIFORMS[291] */
+ {0x84b, 0x05490}, /* VS.UNIFORMS[292] */
+ {0x84c, 0x05494}, /* VS.UNIFORMS[293] */
+ {0x84d, 0x05498}, /* VS.UNIFORMS[294] */
+ {0x84e, 0x0549C}, /* VS.UNIFORMS[295] */
+ {0x84f, 0x054A0}, /* VS.UNIFORMS[296] */
+ {0x850, 0x054A4}, /* VS.UNIFORMS[297] */
+ {0x851, 0x054A8}, /* VS.UNIFORMS[298] */
+ {0x852, 0x054AC}, /* VS.UNIFORMS[299] */
+ {0x853, 0x054B0}, /* VS.UNIFORMS[300] */
+ {0x854, 0x054B4}, /* VS.UNIFORMS[301] */
+ {0x855, 0x054B8}, /* VS.UNIFORMS[302] */
+ {0x856, 0x054BC}, /* VS.UNIFORMS[303] */
+ {0x857, 0x054C0}, /* VS.UNIFORMS[304] */
+ {0x858, 0x054C4}, /* VS.UNIFORMS[305] */
+ {0x859, 0x054C8}, /* VS.UNIFORMS[306] */
+ {0x85a, 0x054CC}, /* VS.UNIFORMS[307] */
+ {0x85b, 0x054D0}, /* VS.UNIFORMS[308] */
+ {0x85c, 0x054D4}, /* VS.UNIFORMS[309] */
+ {0x85d, 0x054D8}, /* VS.UNIFORMS[310] */
+ {0x85e, 0x054DC}, /* VS.UNIFORMS[311] */
+ {0x85f, 0x054E0}, /* VS.UNIFORMS[312] */
+ {0x860, 0x054E4}, /* VS.UNIFORMS[313] */
+ {0x861, 0x054E8}, /* VS.UNIFORMS[314] */
+ {0x862, 0x054EC}, /* VS.UNIFORMS[315] */
+ {0x863, 0x054F0}, /* VS.UNIFORMS[316] */
+ {0x864, 0x054F4}, /* VS.UNIFORMS[317] */
+ {0x865, 0x054F8}, /* VS.UNIFORMS[318] */
+ {0x866, 0x054FC}, /* VS.UNIFORMS[319] */
+ {0x867, 0x05500}, /* VS.UNIFORMS[320] */
+ {0x868, 0x05504}, /* VS.UNIFORMS[321] */
+ {0x869, 0x05508}, /* VS.UNIFORMS[322] */
+ {0x86a, 0x0550C}, /* VS.UNIFORMS[323] */
+ {0x86b, 0x05510}, /* VS.UNIFORMS[324] */
+ {0x86c, 0x05514}, /* VS.UNIFORMS[325] */
+ {0x86d, 0x05518}, /* VS.UNIFORMS[326] */
+ {0x86e, 0x0551C}, /* VS.UNIFORMS[327] */
+ {0x86f, 0x05520}, /* VS.UNIFORMS[328] */
+ {0x870, 0x05524}, /* VS.UNIFORMS[329] */
+ {0x871, 0x05528}, /* VS.UNIFORMS[330] */
+ {0x872, 0x0552C}, /* VS.UNIFORMS[331] */
+ {0x873, 0x05530}, /* VS.UNIFORMS[332] */
+ {0x874, 0x05534}, /* VS.UNIFORMS[333] */
+ {0x875, 0x05538}, /* VS.UNIFORMS[334] */
+ {0x876, 0x0553C}, /* VS.UNIFORMS[335] */
+ {0x877, 0x05540}, /* VS.UNIFORMS[336] */
+ {0x878, 0x05544}, /* VS.UNIFORMS[337] */
+ {0x879, 0x05548}, /* VS.UNIFORMS[338] */
+ {0x87a, 0x0554C}, /* VS.UNIFORMS[339] */
+ {0x87b, 0x05550}, /* VS.UNIFORMS[340] */
+ {0x87c, 0x05554}, /* VS.UNIFORMS[341] */
+ {0x87d, 0x05558}, /* VS.UNIFORMS[342] */
+ {0x87e, 0x0555C}, /* VS.UNIFORMS[343] */
+ {0x87f, 0x05560}, /* VS.UNIFORMS[344] */
+ {0x880, 0x05564}, /* VS.UNIFORMS[345] */
+ {0x881, 0x05568}, /* VS.UNIFORMS[346] */
+ {0x882, 0x0556C}, /* VS.UNIFORMS[347] */
+ {0x883, 0x05570}, /* VS.UNIFORMS[348] */
+ {0x884, 0x05574}, /* VS.UNIFORMS[349] */
+ {0x885, 0x05578}, /* VS.UNIFORMS[350] */
+ {0x886, 0x0557C}, /* VS.UNIFORMS[351] */
+ {0x887, 0x05580}, /* VS.UNIFORMS[352] */
+ {0x888, 0x05584}, /* VS.UNIFORMS[353] */
+ {0x889, 0x05588}, /* VS.UNIFORMS[354] */
+ {0x88a, 0x0558C}, /* VS.UNIFORMS[355] */
+ {0x88b, 0x05590}, /* VS.UNIFORMS[356] */
+ {0x88c, 0x05594}, /* VS.UNIFORMS[357] */
+ {0x88d, 0x05598}, /* VS.UNIFORMS[358] */
+ {0x88e, 0x0559C}, /* VS.UNIFORMS[359] */
+ {0x88f, 0x055A0}, /* VS.UNIFORMS[360] */
+ {0x890, 0x055A4}, /* VS.UNIFORMS[361] */
+ {0x891, 0x055A8}, /* VS.UNIFORMS[362] */
+ {0x892, 0x055AC}, /* VS.UNIFORMS[363] */
+ {0x893, 0x055B0}, /* VS.UNIFORMS[364] */
+ {0x894, 0x055B4}, /* VS.UNIFORMS[365] */
+ {0x895, 0x055B8}, /* VS.UNIFORMS[366] */
+ {0x896, 0x055BC}, /* VS.UNIFORMS[367] */
+ {0x897, 0x055C0}, /* VS.UNIFORMS[368] */
+ {0x898, 0x055C4}, /* VS.UNIFORMS[369] */
+ {0x899, 0x055C8}, /* VS.UNIFORMS[370] */
+ {0x89a, 0x055CC}, /* VS.UNIFORMS[371] */
+ {0x89b, 0x055D0}, /* VS.UNIFORMS[372] */
+ {0x89c, 0x055D4}, /* VS.UNIFORMS[373] */
+ {0x89d, 0x055D8}, /* VS.UNIFORMS[374] */
+ {0x89e, 0x055DC}, /* VS.UNIFORMS[375] */
+ {0x89f, 0x055E0}, /* VS.UNIFORMS[376] */
+ {0x8a0, 0x055E4}, /* VS.UNIFORMS[377] */
+ {0x8a1, 0x055E8}, /* VS.UNIFORMS[378] */
+ {0x8a2, 0x055EC}, /* VS.UNIFORMS[379] */
+ {0x8a3, 0x055F0}, /* VS.UNIFORMS[380] */
+ {0x8a4, 0x055F4}, /* VS.UNIFORMS[381] */
+ {0x8a5, 0x055F8}, /* VS.UNIFORMS[382] */
+ {0x8a6, 0x055FC}, /* VS.UNIFORMS[383] */
+ {0x8a7, 0x05600}, /* VS.UNIFORMS[384] */
+ {0x8a8, 0x05604}, /* VS.UNIFORMS[385] */
+ {0x8a9, 0x05608}, /* VS.UNIFORMS[386] */
+ {0x8aa, 0x0560C}, /* VS.UNIFORMS[387] */
+ {0x8ab, 0x05610}, /* VS.UNIFORMS[388] */
+ {0x8ac, 0x05614}, /* VS.UNIFORMS[389] */
+ {0x8ad, 0x05618}, /* VS.UNIFORMS[390] */
+ {0x8ae, 0x0561C}, /* VS.UNIFORMS[391] */
+ {0x8af, 0x05620}, /* VS.UNIFORMS[392] */
+ {0x8b0, 0x05624}, /* VS.UNIFORMS[393] */
+ {0x8b1, 0x05628}, /* VS.UNIFORMS[394] */
+ {0x8b2, 0x0562C}, /* VS.UNIFORMS[395] */
+ {0x8b3, 0x05630}, /* VS.UNIFORMS[396] */
+ {0x8b4, 0x05634}, /* VS.UNIFORMS[397] */
+ {0x8b5, 0x05638}, /* VS.UNIFORMS[398] */
+ {0x8b6, 0x0563C}, /* VS.UNIFORMS[399] */
+ {0x8b7, 0x05640}, /* VS.UNIFORMS[400] */
+ {0x8b8, 0x05644}, /* VS.UNIFORMS[401] */
+ {0x8b9, 0x05648}, /* VS.UNIFORMS[402] */
+ {0x8ba, 0x0564C}, /* VS.UNIFORMS[403] */
+ {0x8bb, 0x05650}, /* VS.UNIFORMS[404] */
+ {0x8bc, 0x05654}, /* VS.UNIFORMS[405] */
+ {0x8bd, 0x05658}, /* VS.UNIFORMS[406] */
+ {0x8be, 0x0565C}, /* VS.UNIFORMS[407] */
+ {0x8bf, 0x05660}, /* VS.UNIFORMS[408] */
+ {0x8c0, 0x05664}, /* VS.UNIFORMS[409] */
+ {0x8c1, 0x05668}, /* VS.UNIFORMS[410] */
+ {0x8c2, 0x0566C}, /* VS.UNIFORMS[411] */
+ {0x8c3, 0x05670}, /* VS.UNIFORMS[412] */
+ {0x8c4, 0x05674}, /* VS.UNIFORMS[413] */
+ {0x8c5, 0x05678}, /* VS.UNIFORMS[414] */
+ {0x8c6, 0x0567C}, /* VS.UNIFORMS[415] */
+ {0x8c7, 0x05680}, /* VS.UNIFORMS[416] */
+ {0x8c8, 0x05684}, /* VS.UNIFORMS[417] */
+ {0x8c9, 0x05688}, /* VS.UNIFORMS[418] */
+ {0x8ca, 0x0568C}, /* VS.UNIFORMS[419] */
+ {0x8cb, 0x05690}, /* VS.UNIFORMS[420] */
+ {0x8cc, 0x05694}, /* VS.UNIFORMS[421] */
+ {0x8cd, 0x05698}, /* VS.UNIFORMS[422] */
+ {0x8ce, 0x0569C}, /* VS.UNIFORMS[423] */
+ {0x8cf, 0x056A0}, /* VS.UNIFORMS[424] */
+ {0x8d0, 0x056A4}, /* VS.UNIFORMS[425] */
+ {0x8d1, 0x056A8}, /* VS.UNIFORMS[426] */
+ {0x8d2, 0x056AC}, /* VS.UNIFORMS[427] */
+ {0x8d3, 0x056B0}, /* VS.UNIFORMS[428] */
+ {0x8d4, 0x056B4}, /* VS.UNIFORMS[429] */
+ {0x8d5, 0x056B8}, /* VS.UNIFORMS[430] */
+ {0x8d6, 0x056BC}, /* VS.UNIFORMS[431] */
+ {0x8d7, 0x056C0}, /* VS.UNIFORMS[432] */
+ {0x8d8, 0x056C4}, /* VS.UNIFORMS[433] */
+ {0x8d9, 0x056C8}, /* VS.UNIFORMS[434] */
+ {0x8da, 0x056CC}, /* VS.UNIFORMS[435] */
+ {0x8db, 0x056D0}, /* VS.UNIFORMS[436] */
+ {0x8dc, 0x056D4}, /* VS.UNIFORMS[437] */
+ {0x8dd, 0x056D8}, /* VS.UNIFORMS[438] */
+ {0x8de, 0x056DC}, /* VS.UNIFORMS[439] */
+ {0x8df, 0x056E0}, /* VS.UNIFORMS[440] */
+ {0x8e0, 0x056E4}, /* VS.UNIFORMS[441] */
+ {0x8e1, 0x056E8}, /* VS.UNIFORMS[442] */
+ {0x8e2, 0x056EC}, /* VS.UNIFORMS[443] */
+ {0x8e3, 0x056F0}, /* VS.UNIFORMS[444] */
+ {0x8e4, 0x056F4}, /* VS.UNIFORMS[445] */
+ {0x8e5, 0x056F8}, /* VS.UNIFORMS[446] */
+ {0x8e6, 0x056FC}, /* VS.UNIFORMS[447] */
+ {0x8e7, 0x05700}, /* VS.UNIFORMS[448] */
+ {0x8e8, 0x05704}, /* VS.UNIFORMS[449] */
+ {0x8e9, 0x05708}, /* VS.UNIFORMS[450] */
+ {0x8ea, 0x0570C}, /* VS.UNIFORMS[451] */
+ {0x8eb, 0x05710}, /* VS.UNIFORMS[452] */
+ {0x8ec, 0x05714}, /* VS.UNIFORMS[453] */
+ {0x8ed, 0x05718}, /* VS.UNIFORMS[454] */
+ {0x8ee, 0x0571C}, /* VS.UNIFORMS[455] */
+ {0x8ef, 0x05720}, /* VS.UNIFORMS[456] */
+ {0x8f0, 0x05724}, /* VS.UNIFORMS[457] */
+ {0x8f1, 0x05728}, /* VS.UNIFORMS[458] */
+ {0x8f2, 0x0572C}, /* VS.UNIFORMS[459] */
+ {0x8f3, 0x05730}, /* VS.UNIFORMS[460] */
+ {0x8f4, 0x05734}, /* VS.UNIFORMS[461] */
+ {0x8f5, 0x05738}, /* VS.UNIFORMS[462] */
+ {0x8f6, 0x0573C}, /* VS.UNIFORMS[463] */
+ {0x8f7, 0x05740}, /* VS.UNIFORMS[464] */
+ {0x8f8, 0x05744}, /* VS.UNIFORMS[465] */
+ {0x8f9, 0x05748}, /* VS.UNIFORMS[466] */
+ {0x8fa, 0x0574C}, /* VS.UNIFORMS[467] */
+ {0x8fb, 0x05750}, /* VS.UNIFORMS[468] */
+ {0x8fc, 0x05754}, /* VS.UNIFORMS[469] */
+ {0x8fd, 0x05758}, /* VS.UNIFORMS[470] */
+ {0x8fe, 0x0575C}, /* VS.UNIFORMS[471] */
+ {0x8ff, 0x05760}, /* VS.UNIFORMS[472] */
+ {0x900, 0x05764}, /* VS.UNIFORMS[473] */
+ {0x901, 0x05768}, /* VS.UNIFORMS[474] */
+ {0x902, 0x0576C}, /* VS.UNIFORMS[475] */
+ {0x903, 0x05770}, /* VS.UNIFORMS[476] */
+ {0x904, 0x05774}, /* VS.UNIFORMS[477] */
+ {0x905, 0x05778}, /* VS.UNIFORMS[478] */
+ {0x906, 0x0577C}, /* VS.UNIFORMS[479] */
+ {0x907, 0x05780}, /* VS.UNIFORMS[480] */
+ {0x908, 0x05784}, /* VS.UNIFORMS[481] */
+ {0x909, 0x05788}, /* VS.UNIFORMS[482] */
+ {0x90a, 0x0578C}, /* VS.UNIFORMS[483] */
+ {0x90b, 0x05790}, /* VS.UNIFORMS[484] */
+ {0x90c, 0x05794}, /* VS.UNIFORMS[485] */
+ {0x90d, 0x05798}, /* VS.UNIFORMS[486] */
+ {0x90e, 0x0579C}, /* VS.UNIFORMS[487] */
+ {0x90f, 0x057A0}, /* VS.UNIFORMS[488] */
+ {0x910, 0x057A4}, /* VS.UNIFORMS[489] */
+ {0x911, 0x057A8}, /* VS.UNIFORMS[490] */
+ {0x912, 0x057AC}, /* VS.UNIFORMS[491] */
+ {0x913, 0x057B0}, /* VS.UNIFORMS[492] */
+ {0x914, 0x057B4}, /* VS.UNIFORMS[493] */
+ {0x915, 0x057B8}, /* VS.UNIFORMS[494] */
+ {0x916, 0x057BC}, /* VS.UNIFORMS[495] */
+ {0x917, 0x057C0}, /* VS.UNIFORMS[496] */
+ {0x918, 0x057C4}, /* VS.UNIFORMS[497] */
+ {0x919, 0x057C8}, /* VS.UNIFORMS[498] */
+ {0x91a, 0x057CC}, /* VS.UNIFORMS[499] */
+ {0x91b, 0x057D0}, /* VS.UNIFORMS[500] */
+ {0x91c, 0x057D4}, /* VS.UNIFORMS[501] */
+ {0x91d, 0x057D8}, /* VS.UNIFORMS[502] */
+ {0x91e, 0x057DC}, /* VS.UNIFORMS[503] */
+ {0x91f, 0x057E0}, /* VS.UNIFORMS[504] */
+ {0x920, 0x057E4}, /* VS.UNIFORMS[505] */
+ {0x921, 0x057E8}, /* VS.UNIFORMS[506] */
+ {0x922, 0x057EC}, /* VS.UNIFORMS[507] */
+ {0x923, 0x057F0}, /* VS.UNIFORMS[508] */
+ {0x924, 0x057F4}, /* VS.UNIFORMS[509] */
+ {0x925, 0x057F8}, /* VS.UNIFORMS[510] */
+ {0x926, 0x057FC}, /* VS.UNIFORMS[511] */
+ {0x927, 0x05800}, /* VS.UNIFORMS[512] */
+ {0x928, 0x05804}, /* VS.UNIFORMS[513] */
+ {0x929, 0x05808}, /* VS.UNIFORMS[514] */
+ {0x92a, 0x0580C}, /* VS.UNIFORMS[515] */
+ {0x92b, 0x05810}, /* VS.UNIFORMS[516] */
+ {0x92c, 0x05814}, /* VS.UNIFORMS[517] */
+ {0x92d, 0x05818}, /* VS.UNIFORMS[518] */
+ {0x92e, 0x0581C}, /* VS.UNIFORMS[519] */
+ {0x92f, 0x05820}, /* VS.UNIFORMS[520] */
+ {0x930, 0x05824}, /* VS.UNIFORMS[521] */
+ {0x931, 0x05828}, /* VS.UNIFORMS[522] */
+ {0x932, 0x0582C}, /* VS.UNIFORMS[523] */
+ {0x933, 0x05830}, /* VS.UNIFORMS[524] */
+ {0x934, 0x05834}, /* VS.UNIFORMS[525] */
+ {0x935, 0x05838}, /* VS.UNIFORMS[526] */
+ {0x936, 0x0583C}, /* VS.UNIFORMS[527] */
+ {0x937, 0x05840}, /* VS.UNIFORMS[528] */
+ {0x938, 0x05844}, /* VS.UNIFORMS[529] */
+ {0x939, 0x05848}, /* VS.UNIFORMS[530] */
+ {0x93a, 0x0584C}, /* VS.UNIFORMS[531] */
+ {0x93b, 0x05850}, /* VS.UNIFORMS[532] */
+ {0x93c, 0x05854}, /* VS.UNIFORMS[533] */
+ {0x93d, 0x05858}, /* VS.UNIFORMS[534] */
+ {0x93e, 0x0585C}, /* VS.UNIFORMS[535] */
+ {0x93f, 0x05860}, /* VS.UNIFORMS[536] */
+ {0x940, 0x05864}, /* VS.UNIFORMS[537] */
+ {0x941, 0x05868}, /* VS.UNIFORMS[538] */
+ {0x942, 0x0586C}, /* VS.UNIFORMS[539] */
+ {0x943, 0x05870}, /* VS.UNIFORMS[540] */
+ {0x944, 0x05874}, /* VS.UNIFORMS[541] */
+ {0x945, 0x05878}, /* VS.UNIFORMS[542] */
+ {0x946, 0x0587C}, /* VS.UNIFORMS[543] */
+ {0x947, 0x05880}, /* VS.UNIFORMS[544] */
+ {0x948, 0x05884}, /* VS.UNIFORMS[545] */
+ {0x949, 0x05888}, /* VS.UNIFORMS[546] */
+ {0x94a, 0x0588C}, /* VS.UNIFORMS[547] */
+ {0x94b, 0x05890}, /* VS.UNIFORMS[548] */
+ {0x94c, 0x05894}, /* VS.UNIFORMS[549] */
+ {0x94d, 0x05898}, /* VS.UNIFORMS[550] */
+ {0x94e, 0x0589C}, /* VS.UNIFORMS[551] */
+ {0x94f, 0x058A0}, /* VS.UNIFORMS[552] */
+ {0x950, 0x058A4}, /* VS.UNIFORMS[553] */
+ {0x951, 0x058A8}, /* VS.UNIFORMS[554] */
+ {0x952, 0x058AC}, /* VS.UNIFORMS[555] */
+ {0x953, 0x058B0}, /* VS.UNIFORMS[556] */
+ {0x954, 0x058B4}, /* VS.UNIFORMS[557] */
+ {0x955, 0x058B8}, /* VS.UNIFORMS[558] */
+ {0x956, 0x058BC}, /* VS.UNIFORMS[559] */
+ {0x957, 0x058C0}, /* VS.UNIFORMS[560] */
+ {0x958, 0x058C4}, /* VS.UNIFORMS[561] */
+ {0x959, 0x058C8}, /* VS.UNIFORMS[562] */
+ {0x95a, 0x058CC}, /* VS.UNIFORMS[563] */
+ {0x95b, 0x058D0}, /* VS.UNIFORMS[564] */
+ {0x95c, 0x058D4}, /* VS.UNIFORMS[565] */
+ {0x95d, 0x058D8}, /* VS.UNIFORMS[566] */
+ {0x95e, 0x058DC}, /* VS.UNIFORMS[567] */
+ {0x95f, 0x058E0}, /* VS.UNIFORMS[568] */
+ {0x960, 0x058E4}, /* VS.UNIFORMS[569] */
+ {0x961, 0x058E8}, /* VS.UNIFORMS[570] */
+ {0x962, 0x058EC}, /* VS.UNIFORMS[571] */
+ {0x963, 0x058F0}, /* VS.UNIFORMS[572] */
+ {0x964, 0x058F4}, /* VS.UNIFORMS[573] */
+ {0x965, 0x058F8}, /* VS.UNIFORMS[574] */
+ {0x966, 0x058FC}, /* VS.UNIFORMS[575] */
+ {0x967, 0x05900}, /* VS.UNIFORMS[576] */
+ {0x968, 0x05904}, /* VS.UNIFORMS[577] */
+ {0x969, 0x05908}, /* VS.UNIFORMS[578] */
+ {0x96a, 0x0590C}, /* VS.UNIFORMS[579] */
+ {0x96b, 0x05910}, /* VS.UNIFORMS[580] */
+ {0x96c, 0x05914}, /* VS.UNIFORMS[581] */
+ {0x96d, 0x05918}, /* VS.UNIFORMS[582] */
+ {0x96e, 0x0591C}, /* VS.UNIFORMS[583] */
+ {0x96f, 0x05920}, /* VS.UNIFORMS[584] */
+ {0x970, 0x05924}, /* VS.UNIFORMS[585] */
+ {0x971, 0x05928}, /* VS.UNIFORMS[586] */
+ {0x972, 0x0592C}, /* VS.UNIFORMS[587] */
+ {0x973, 0x05930}, /* VS.UNIFORMS[588] */
+ {0x974, 0x05934}, /* VS.UNIFORMS[589] */
+ {0x975, 0x05938}, /* VS.UNIFORMS[590] */
+ {0x976, 0x0593C}, /* VS.UNIFORMS[591] */
+ {0x977, 0x05940}, /* VS.UNIFORMS[592] */
+ {0x978, 0x05944}, /* VS.UNIFORMS[593] */
+ {0x979, 0x05948}, /* VS.UNIFORMS[594] */
+ {0x97a, 0x0594C}, /* VS.UNIFORMS[595] */
+ {0x97b, 0x05950}, /* VS.UNIFORMS[596] */
+ {0x97c, 0x05954}, /* VS.UNIFORMS[597] */
+ {0x97d, 0x05958}, /* VS.UNIFORMS[598] */
+ {0x97e, 0x0595C}, /* VS.UNIFORMS[599] */
+ {0x97f, 0x05960}, /* VS.UNIFORMS[600] */
+ {0x980, 0x05964}, /* VS.UNIFORMS[601] */
+ {0x981, 0x05968}, /* VS.UNIFORMS[602] */
+ {0x982, 0x0596C}, /* VS.UNIFORMS[603] */
+ {0x983, 0x05970}, /* VS.UNIFORMS[604] */
+ {0x984, 0x05974}, /* VS.UNIFORMS[605] */
+ {0x985, 0x05978}, /* VS.UNIFORMS[606] */
+ {0x986, 0x0597C}, /* VS.UNIFORMS[607] */
+ {0x987, 0x05980}, /* VS.UNIFORMS[608] */
+ {0x988, 0x05984}, /* VS.UNIFORMS[609] */
+ {0x989, 0x05988}, /* VS.UNIFORMS[610] */
+ {0x98a, 0x0598C}, /* VS.UNIFORMS[611] */
+ {0x98b, 0x05990}, /* VS.UNIFORMS[612] */
+ {0x98c, 0x05994}, /* VS.UNIFORMS[613] */
+ {0x98d, 0x05998}, /* VS.UNIFORMS[614] */
+ {0x98e, 0x0599C}, /* VS.UNIFORMS[615] */
+ {0x98f, 0x059A0}, /* VS.UNIFORMS[616] */
+ {0x990, 0x059A4}, /* VS.UNIFORMS[617] */
+ {0x991, 0x059A8}, /* VS.UNIFORMS[618] */
+ {0x992, 0x059AC}, /* VS.UNIFORMS[619] */
+ {0x993, 0x059B0}, /* VS.UNIFORMS[620] */
+ {0x994, 0x059B4}, /* VS.UNIFORMS[621] */
+ {0x995, 0x059B8}, /* VS.UNIFORMS[622] */
+ {0x996, 0x059BC}, /* VS.UNIFORMS[623] */
+ {0x997, 0x059C0}, /* VS.UNIFORMS[624] */
+ {0x998, 0x059C4}, /* VS.UNIFORMS[625] */
+ {0x999, 0x059C8}, /* VS.UNIFORMS[626] */
+ {0x99a, 0x059CC}, /* VS.UNIFORMS[627] */
+ {0x99b, 0x059D0}, /* VS.UNIFORMS[628] */
+ {0x99c, 0x059D4}, /* VS.UNIFORMS[629] */
+ {0x99d, 0x059D8}, /* VS.UNIFORMS[630] */
+ {0x99e, 0x059DC}, /* VS.UNIFORMS[631] */
+ {0x99f, 0x059E0}, /* VS.UNIFORMS[632] */
+ {0x9a0, 0x059E4}, /* VS.UNIFORMS[633] */
+ {0x9a1, 0x059E8}, /* VS.UNIFORMS[634] */
+ {0x9a2, 0x059EC}, /* VS.UNIFORMS[635] */
+ {0x9a3, 0x059F0}, /* VS.UNIFORMS[636] */
+ {0x9a4, 0x059F4}, /* VS.UNIFORMS[637] */
+ {0x9a5, 0x059F8}, /* VS.UNIFORMS[638] */
+ {0x9a6, 0x059FC}, /* VS.UNIFORMS[639] */
+ {0x9fd, 0x06000}, /* PS.INST_MEM[0] */
+ {0x9fe, 0x06004}, /* PS.INST_MEM[1] */
+ {0x9ff, 0x06008}, /* PS.INST_MEM[2] */
+ {0xa00, 0x0600C}, /* PS.INST_MEM[3] */
+ {0xa01, 0x06010}, /* PS.INST_MEM[4] */
+ {0xa02, 0x06014}, /* PS.INST_MEM[5] */
+ {0xa03, 0x06018}, /* PS.INST_MEM[6] */
+ {0xa04, 0x0601C}, /* PS.INST_MEM[7] */
+ {0xa05, 0x06020}, /* PS.INST_MEM[8] */
+ {0xa06, 0x06024}, /* PS.INST_MEM[9] */
+ {0xa07, 0x06028}, /* PS.INST_MEM[10] */
+ {0xa08, 0x0602C}, /* PS.INST_MEM[11] */
+ {0xa09, 0x06030}, /* PS.INST_MEM[12] */
+ {0xa0a, 0x06034}, /* PS.INST_MEM[13] */
+ {0xa0b, 0x06038}, /* PS.INST_MEM[14] */
+ {0xa0c, 0x0603C}, /* PS.INST_MEM[15] */
+ {0xa0d, 0x06040}, /* PS.INST_MEM[16] */
+ {0xa0e, 0x06044}, /* PS.INST_MEM[17] */
+ {0xa0f, 0x06048}, /* PS.INST_MEM[18] */
+ {0xa10, 0x0604C}, /* PS.INST_MEM[19] */
+ {0xa11, 0x06050}, /* PS.INST_MEM[20] */
+ {0xa12, 0x06054}, /* PS.INST_MEM[21] */
+ {0xa13, 0x06058}, /* PS.INST_MEM[22] */
+ {0xa14, 0x0605C}, /* PS.INST_MEM[23] */
+ {0xa15, 0x06060}, /* PS.INST_MEM[24] */
+ {0xa16, 0x06064}, /* PS.INST_MEM[25] */
+ {0xa17, 0x06068}, /* PS.INST_MEM[26] */
+ {0xa18, 0x0606C}, /* PS.INST_MEM[27] */
+ {0xa19, 0x06070}, /* PS.INST_MEM[28] */
+ {0xa1a, 0x06074}, /* PS.INST_MEM[29] */
+ {0xa1b, 0x06078}, /* PS.INST_MEM[30] */
+ {0xa1c, 0x0607C}, /* PS.INST_MEM[31] */
+ {0xa1d, 0x06080}, /* PS.INST_MEM[32] */
+ {0xa1e, 0x06084}, /* PS.INST_MEM[33] */
+ {0xa1f, 0x06088}, /* PS.INST_MEM[34] */
+ {0xa20, 0x0608C}, /* PS.INST_MEM[35] */
+ {0xa21, 0x06090}, /* PS.INST_MEM[36] */
+ {0xa22, 0x06094}, /* PS.INST_MEM[37] */
+ {0xa23, 0x06098}, /* PS.INST_MEM[38] */
+ {0xa24, 0x0609C}, /* PS.INST_MEM[39] */
+ {0xa25, 0x060A0}, /* PS.INST_MEM[40] */
+ {0xa26, 0x060A4}, /* PS.INST_MEM[41] */
+ {0xa27, 0x060A8}, /* PS.INST_MEM[42] */
+ {0xa28, 0x060AC}, /* PS.INST_MEM[43] */
+ {0xa29, 0x060B0}, /* PS.INST_MEM[44] */
+ {0xa2a, 0x060B4}, /* PS.INST_MEM[45] */
+ {0xa2b, 0x060B8}, /* PS.INST_MEM[46] */
+ {0xa2c, 0x060BC}, /* PS.INST_MEM[47] */
+ {0xa2d, 0x060C0}, /* PS.INST_MEM[48] */
+ {0xa2e, 0x060C4}, /* PS.INST_MEM[49] */
+ {0xa2f, 0x060C8}, /* PS.INST_MEM[50] */
+ {0xa30, 0x060CC}, /* PS.INST_MEM[51] */
+ {0xa31, 0x060D0}, /* PS.INST_MEM[52] */
+ {0xa32, 0x060D4}, /* PS.INST_MEM[53] */
+ {0xa33, 0x060D8}, /* PS.INST_MEM[54] */
+ {0xa34, 0x060DC}, /* PS.INST_MEM[55] */
+ {0xa35, 0x060E0}, /* PS.INST_MEM[56] */
+ {0xa36, 0x060E4}, /* PS.INST_MEM[57] */
+ {0xa37, 0x060E8}, /* PS.INST_MEM[58] */
+ {0xa38, 0x060EC}, /* PS.INST_MEM[59] */
+ {0xa39, 0x060F0}, /* PS.INST_MEM[60] */
+ {0xa3a, 0x060F4}, /* PS.INST_MEM[61] */
+ {0xa3b, 0x060F8}, /* PS.INST_MEM[62] */
+ {0xa3c, 0x060FC}, /* PS.INST_MEM[63] */
+ {0xa3d, 0x06100}, /* PS.INST_MEM[64] */
+ {0xa3e, 0x06104}, /* PS.INST_MEM[65] */
+ {0xa3f, 0x06108}, /* PS.INST_MEM[66] */
+ {0xa40, 0x0610C}, /* PS.INST_MEM[67] */
+ {0xa41, 0x06110}, /* PS.INST_MEM[68] */
+ {0xa42, 0x06114}, /* PS.INST_MEM[69] */
+ {0xa43, 0x06118}, /* PS.INST_MEM[70] */
+ {0xa44, 0x0611C}, /* PS.INST_MEM[71] */
+ {0xa45, 0x06120}, /* PS.INST_MEM[72] */
+ {0xa46, 0x06124}, /* PS.INST_MEM[73] */
+ {0xa47, 0x06128}, /* PS.INST_MEM[74] */
+ {0xa48, 0x0612C}, /* PS.INST_MEM[75] */
+ {0xa49, 0x06130}, /* PS.INST_MEM[76] */
+ {0xa4a, 0x06134}, /* PS.INST_MEM[77] */
+ {0xa4b, 0x06138}, /* PS.INST_MEM[78] */
+ {0xa4c, 0x0613C}, /* PS.INST_MEM[79] */
+ {0xa4d, 0x06140}, /* PS.INST_MEM[80] */
+ {0xa4e, 0x06144}, /* PS.INST_MEM[81] */
+ {0xa4f, 0x06148}, /* PS.INST_MEM[82] */
+ {0xa50, 0x0614C}, /* PS.INST_MEM[83] */
+ {0xa51, 0x06150}, /* PS.INST_MEM[84] */
+ {0xa52, 0x06154}, /* PS.INST_MEM[85] */
+ {0xa53, 0x06158}, /* PS.INST_MEM[86] */
+ {0xa54, 0x0615C}, /* PS.INST_MEM[87] */
+ {0xa55, 0x06160}, /* PS.INST_MEM[88] */
+ {0xa56, 0x06164}, /* PS.INST_MEM[89] */
+ {0xa57, 0x06168}, /* PS.INST_MEM[90] */
+ {0xa58, 0x0616C}, /* PS.INST_MEM[91] */
+ {0xa59, 0x06170}, /* PS.INST_MEM[92] */
+ {0xa5a, 0x06174}, /* PS.INST_MEM[93] */
+ {0xa5b, 0x06178}, /* PS.INST_MEM[94] */
+ {0xa5c, 0x0617C}, /* PS.INST_MEM[95] */
+ {0xa5d, 0x06180}, /* PS.INST_MEM[96] */
+ {0xa5e, 0x06184}, /* PS.INST_MEM[97] */
+ {0xa5f, 0x06188}, /* PS.INST_MEM[98] */
+ {0xa60, 0x0618C}, /* PS.INST_MEM[99] */
+ {0xa61, 0x06190}, /* PS.INST_MEM[100] */
+ {0xa62, 0x06194}, /* PS.INST_MEM[101] */
+ {0xa63, 0x06198}, /* PS.INST_MEM[102] */
+ {0xa64, 0x0619C}, /* PS.INST_MEM[103] */
+ {0xa65, 0x061A0}, /* PS.INST_MEM[104] */
+ {0xa66, 0x061A4}, /* PS.INST_MEM[105] */
+ {0xa67, 0x061A8}, /* PS.INST_MEM[106] */
+ {0xa68, 0x061AC}, /* PS.INST_MEM[107] */
+ {0xa69, 0x061B0}, /* PS.INST_MEM[108] */
+ {0xa6a, 0x061B4}, /* PS.INST_MEM[109] */
+ {0xa6b, 0x061B8}, /* PS.INST_MEM[110] */
+ {0xa6c, 0x061BC}, /* PS.INST_MEM[111] */
+ {0xa6d, 0x061C0}, /* PS.INST_MEM[112] */
+ {0xa6e, 0x061C4}, /* PS.INST_MEM[113] */
+ {0xa6f, 0x061C8}, /* PS.INST_MEM[114] */
+ {0xa70, 0x061CC}, /* PS.INST_MEM[115] */
+ {0xa71, 0x061D0}, /* PS.INST_MEM[116] */
+ {0xa72, 0x061D4}, /* PS.INST_MEM[117] */
+ {0xa73, 0x061D8}, /* PS.INST_MEM[118] */
+ {0xa74, 0x061DC}, /* PS.INST_MEM[119] */
+ {0xa75, 0x061E0}, /* PS.INST_MEM[120] */
+ {0xa76, 0x061E4}, /* PS.INST_MEM[121] */
+ {0xa77, 0x061E8}, /* PS.INST_MEM[122] */
+ {0xa78, 0x061EC}, /* PS.INST_MEM[123] */
+ {0xa79, 0x061F0}, /* PS.INST_MEM[124] */
+ {0xa7a, 0x061F4}, /* PS.INST_MEM[125] */
+ {0xa7b, 0x061F8}, /* PS.INST_MEM[126] */
+ {0xa7c, 0x061FC}, /* PS.INST_MEM[127] */
+ {0xa7d, 0x06200}, /* PS.INST_MEM[128] */
+ {0xa7e, 0x06204}, /* PS.INST_MEM[129] */
+ {0xa7f, 0x06208}, /* PS.INST_MEM[130] */
+ {0xa80, 0x0620C}, /* PS.INST_MEM[131] */
+ {0xa81, 0x06210}, /* PS.INST_MEM[132] */
+ {0xa82, 0x06214}, /* PS.INST_MEM[133] */
+ {0xa83, 0x06218}, /* PS.INST_MEM[134] */
+ {0xa84, 0x0621C}, /* PS.INST_MEM[135] */
+ {0xa85, 0x06220}, /* PS.INST_MEM[136] */
+ {0xa86, 0x06224}, /* PS.INST_MEM[137] */
+ {0xa87, 0x06228}, /* PS.INST_MEM[138] */
+ {0xa88, 0x0622C}, /* PS.INST_MEM[139] */
+ {0xa89, 0x06230}, /* PS.INST_MEM[140] */
+ {0xa8a, 0x06234}, /* PS.INST_MEM[141] */
+ {0xa8b, 0x06238}, /* PS.INST_MEM[142] */
+ {0xa8c, 0x0623C}, /* PS.INST_MEM[143] */
+ {0xa8d, 0x06240}, /* PS.INST_MEM[144] */
+ {0xa8e, 0x06244}, /* PS.INST_MEM[145] */
+ {0xa8f, 0x06248}, /* PS.INST_MEM[146] */
+ {0xa90, 0x0624C}, /* PS.INST_MEM[147] */
+ {0xa91, 0x06250}, /* PS.INST_MEM[148] */
+ {0xa92, 0x06254}, /* PS.INST_MEM[149] */
+ {0xa93, 0x06258}, /* PS.INST_MEM[150] */
+ {0xa94, 0x0625C}, /* PS.INST_MEM[151] */
+ {0xa95, 0x06260}, /* PS.INST_MEM[152] */
+ {0xa96, 0x06264}, /* PS.INST_MEM[153] */
+ {0xa97, 0x06268}, /* PS.INST_MEM[154] */
+ {0xa98, 0x0626C}, /* PS.INST_MEM[155] */
+ {0xa99, 0x06270}, /* PS.INST_MEM[156] */
+ {0xa9a, 0x06274}, /* PS.INST_MEM[157] */
+ {0xa9b, 0x06278}, /* PS.INST_MEM[158] */
+ {0xa9c, 0x0627C}, /* PS.INST_MEM[159] */
+ {0xa9d, 0x06280}, /* PS.INST_MEM[160] */
+ {0xa9e, 0x06284}, /* PS.INST_MEM[161] */
+ {0xa9f, 0x06288}, /* PS.INST_MEM[162] */
+ {0xaa0, 0x0628C}, /* PS.INST_MEM[163] */
+ {0xaa1, 0x06290}, /* PS.INST_MEM[164] */
+ {0xaa2, 0x06294}, /* PS.INST_MEM[165] */
+ {0xaa3, 0x06298}, /* PS.INST_MEM[166] */
+ {0xaa4, 0x0629C}, /* PS.INST_MEM[167] */
+ {0xaa5, 0x062A0}, /* PS.INST_MEM[168] */
+ {0xaa6, 0x062A4}, /* PS.INST_MEM[169] */
+ {0xaa7, 0x062A8}, /* PS.INST_MEM[170] */
+ {0xaa8, 0x062AC}, /* PS.INST_MEM[171] */
+ {0xaa9, 0x062B0}, /* PS.INST_MEM[172] */
+ {0xaaa, 0x062B4}, /* PS.INST_MEM[173] */
+ {0xaab, 0x062B8}, /* PS.INST_MEM[174] */
+ {0xaac, 0x062BC}, /* PS.INST_MEM[175] */
+ {0xaad, 0x062C0}, /* PS.INST_MEM[176] */
+ {0xaae, 0x062C4}, /* PS.INST_MEM[177] */
+ {0xaaf, 0x062C8}, /* PS.INST_MEM[178] */
+ {0xab0, 0x062CC}, /* PS.INST_MEM[179] */
+ {0xab1, 0x062D0}, /* PS.INST_MEM[180] */
+ {0xab2, 0x062D4}, /* PS.INST_MEM[181] */
+ {0xab3, 0x062D8}, /* PS.INST_MEM[182] */
+ {0xab4, 0x062DC}, /* PS.INST_MEM[183] */
+ {0xab5, 0x062E0}, /* PS.INST_MEM[184] */
+ {0xab6, 0x062E4}, /* PS.INST_MEM[185] */
+ {0xab7, 0x062E8}, /* PS.INST_MEM[186] */
+ {0xab8, 0x062EC}, /* PS.INST_MEM[187] */
+ {0xab9, 0x062F0}, /* PS.INST_MEM[188] */
+ {0xaba, 0x062F4}, /* PS.INST_MEM[189] */
+ {0xabb, 0x062F8}, /* PS.INST_MEM[190] */
+ {0xabc, 0x062FC}, /* PS.INST_MEM[191] */
+ {0xabd, 0x06300}, /* PS.INST_MEM[192] */
+ {0xabe, 0x06304}, /* PS.INST_MEM[193] */
+ {0xabf, 0x06308}, /* PS.INST_MEM[194] */
+ {0xac0, 0x0630C}, /* PS.INST_MEM[195] */
+ {0xac1, 0x06310}, /* PS.INST_MEM[196] */
+ {0xac2, 0x06314}, /* PS.INST_MEM[197] */
+ {0xac3, 0x06318}, /* PS.INST_MEM[198] */
+ {0xac4, 0x0631C}, /* PS.INST_MEM[199] */
+ {0xac5, 0x06320}, /* PS.INST_MEM[200] */
+ {0xac6, 0x06324}, /* PS.INST_MEM[201] */
+ {0xac7, 0x06328}, /* PS.INST_MEM[202] */
+ {0xac8, 0x0632C}, /* PS.INST_MEM[203] */
+ {0xac9, 0x06330}, /* PS.INST_MEM[204] */
+ {0xaca, 0x06334}, /* PS.INST_MEM[205] */
+ {0xacb, 0x06338}, /* PS.INST_MEM[206] */
+ {0xacc, 0x0633C}, /* PS.INST_MEM[207] */
+ {0xacd, 0x06340}, /* PS.INST_MEM[208] */
+ {0xace, 0x06344}, /* PS.INST_MEM[209] */
+ {0xacf, 0x06348}, /* PS.INST_MEM[210] */
+ {0xad0, 0x0634C}, /* PS.INST_MEM[211] */
+ {0xad1, 0x06350}, /* PS.INST_MEM[212] */
+ {0xad2, 0x06354}, /* PS.INST_MEM[213] */
+ {0xad3, 0x06358}, /* PS.INST_MEM[214] */
+ {0xad4, 0x0635C}, /* PS.INST_MEM[215] */
+ {0xad5, 0x06360}, /* PS.INST_MEM[216] */
+ {0xad6, 0x06364}, /* PS.INST_MEM[217] */
+ {0xad7, 0x06368}, /* PS.INST_MEM[218] */
+ {0xad8, 0x0636C}, /* PS.INST_MEM[219] */
+ {0xad9, 0x06370}, /* PS.INST_MEM[220] */
+ {0xada, 0x06374}, /* PS.INST_MEM[221] */
+ {0xadb, 0x06378}, /* PS.INST_MEM[222] */
+ {0xadc, 0x0637C}, /* PS.INST_MEM[223] */
+ {0xadd, 0x06380}, /* PS.INST_MEM[224] */
+ {0xade, 0x06384}, /* PS.INST_MEM[225] */
+ {0xadf, 0x06388}, /* PS.INST_MEM[226] */
+ {0xae0, 0x0638C}, /* PS.INST_MEM[227] */
+ {0xae1, 0x06390}, /* PS.INST_MEM[228] */
+ {0xae2, 0x06394}, /* PS.INST_MEM[229] */
+ {0xae3, 0x06398}, /* PS.INST_MEM[230] */
+ {0xae4, 0x0639C}, /* PS.INST_MEM[231] */
+ {0xae5, 0x063A0}, /* PS.INST_MEM[232] */
+ {0xae6, 0x063A4}, /* PS.INST_MEM[233] */
+ {0xae7, 0x063A8}, /* PS.INST_MEM[234] */
+ {0xae8, 0x063AC}, /* PS.INST_MEM[235] */
+ {0xae9, 0x063B0}, /* PS.INST_MEM[236] */
+ {0xaea, 0x063B4}, /* PS.INST_MEM[237] */
+ {0xaeb, 0x063B8}, /* PS.INST_MEM[238] */
+ {0xaec, 0x063BC}, /* PS.INST_MEM[239] */
+ {0xaed, 0x063C0}, /* PS.INST_MEM[240] */
+ {0xaee, 0x063C4}, /* PS.INST_MEM[241] */
+ {0xaef, 0x063C8}, /* PS.INST_MEM[242] */
+ {0xaf0, 0x063CC}, /* PS.INST_MEM[243] */
+ {0xaf1, 0x063D0}, /* PS.INST_MEM[244] */
+ {0xaf2, 0x063D4}, /* PS.INST_MEM[245] */
+ {0xaf3, 0x063D8}, /* PS.INST_MEM[246] */
+ {0xaf4, 0x063DC}, /* PS.INST_MEM[247] */
+ {0xaf5, 0x063E0}, /* PS.INST_MEM[248] */
+ {0xaf6, 0x063E4}, /* PS.INST_MEM[249] */
+ {0xaf7, 0x063E8}, /* PS.INST_MEM[250] */
+ {0xaf8, 0x063EC}, /* PS.INST_MEM[251] */
+ {0xaf9, 0x063F0}, /* PS.INST_MEM[252] */
+ {0xafa, 0x063F4}, /* PS.INST_MEM[253] */
+ {0xafb, 0x063F8}, /* PS.INST_MEM[254] */
+ {0xafc, 0x063FC}, /* PS.INST_MEM[255] */
+ {0xafd, 0x06400}, /* PS.INST_MEM[256] */
+ {0xafe, 0x06404}, /* PS.INST_MEM[257] */
+ {0xaff, 0x06408}, /* PS.INST_MEM[258] */
+ {0xb00, 0x0640C}, /* PS.INST_MEM[259] */
+ {0xb01, 0x06410}, /* PS.INST_MEM[260] */
+ {0xb02, 0x06414}, /* PS.INST_MEM[261] */
+ {0xb03, 0x06418}, /* PS.INST_MEM[262] */
+ {0xb04, 0x0641C}, /* PS.INST_MEM[263] */
+ {0xb05, 0x06420}, /* PS.INST_MEM[264] */
+ {0xb06, 0x06424}, /* PS.INST_MEM[265] */
+ {0xb07, 0x06428}, /* PS.INST_MEM[266] */
+ {0xb08, 0x0642C}, /* PS.INST_MEM[267] */
+ {0xb09, 0x06430}, /* PS.INST_MEM[268] */
+ {0xb0a, 0x06434}, /* PS.INST_MEM[269] */
+ {0xb0b, 0x06438}, /* PS.INST_MEM[270] */
+ {0xb0c, 0x0643C}, /* PS.INST_MEM[271] */
+ {0xb0d, 0x06440}, /* PS.INST_MEM[272] */
+ {0xb0e, 0x06444}, /* PS.INST_MEM[273] */
+ {0xb0f, 0x06448}, /* PS.INST_MEM[274] */
+ {0xb10, 0x0644C}, /* PS.INST_MEM[275] */
+ {0xb11, 0x06450}, /* PS.INST_MEM[276] */
+ {0xb12, 0x06454}, /* PS.INST_MEM[277] */
+ {0xb13, 0x06458}, /* PS.INST_MEM[278] */
+ {0xb14, 0x0645C}, /* PS.INST_MEM[279] */
+ {0xb15, 0x06460}, /* PS.INST_MEM[280] */
+ {0xb16, 0x06464}, /* PS.INST_MEM[281] */
+ {0xb17, 0x06468}, /* PS.INST_MEM[282] */
+ {0xb18, 0x0646C}, /* PS.INST_MEM[283] */
+ {0xb19, 0x06470}, /* PS.INST_MEM[284] */
+ {0xb1a, 0x06474}, /* PS.INST_MEM[285] */
+ {0xb1b, 0x06478}, /* PS.INST_MEM[286] */
+ {0xb1c, 0x0647C}, /* PS.INST_MEM[287] */
+ {0xb1d, 0x06480}, /* PS.INST_MEM[288] */
+ {0xb1e, 0x06484}, /* PS.INST_MEM[289] */
+ {0xb1f, 0x06488}, /* PS.INST_MEM[290] */
+ {0xb20, 0x0648C}, /* PS.INST_MEM[291] */
+ {0xb21, 0x06490}, /* PS.INST_MEM[292] */
+ {0xb22, 0x06494}, /* PS.INST_MEM[293] */
+ {0xb23, 0x06498}, /* PS.INST_MEM[294] */
+ {0xb24, 0x0649C}, /* PS.INST_MEM[295] */
+ {0xb25, 0x064A0}, /* PS.INST_MEM[296] */
+ {0xb26, 0x064A4}, /* PS.INST_MEM[297] */
+ {0xb27, 0x064A8}, /* PS.INST_MEM[298] */
+ {0xb28, 0x064AC}, /* PS.INST_MEM[299] */
+ {0xb29, 0x064B0}, /* PS.INST_MEM[300] */
+ {0xb2a, 0x064B4}, /* PS.INST_MEM[301] */
+ {0xb2b, 0x064B8}, /* PS.INST_MEM[302] */
+ {0xb2c, 0x064BC}, /* PS.INST_MEM[303] */
+ {0xb2d, 0x064C0}, /* PS.INST_MEM[304] */
+ {0xb2e, 0x064C4}, /* PS.INST_MEM[305] */
+ {0xb2f, 0x064C8}, /* PS.INST_MEM[306] */
+ {0xb30, 0x064CC}, /* PS.INST_MEM[307] */
+ {0xb31, 0x064D0}, /* PS.INST_MEM[308] */
+ {0xb32, 0x064D4}, /* PS.INST_MEM[309] */
+ {0xb33, 0x064D8}, /* PS.INST_MEM[310] */
+ {0xb34, 0x064DC}, /* PS.INST_MEM[311] */
+ {0xb35, 0x064E0}, /* PS.INST_MEM[312] */
+ {0xb36, 0x064E4}, /* PS.INST_MEM[313] */
+ {0xb37, 0x064E8}, /* PS.INST_MEM[314] */
+ {0xb38, 0x064EC}, /* PS.INST_MEM[315] */
+ {0xb39, 0x064F0}, /* PS.INST_MEM[316] */
+ {0xb3a, 0x064F4}, /* PS.INST_MEM[317] */
+ {0xb3b, 0x064F8}, /* PS.INST_MEM[318] */
+ {0xb3c, 0x064FC}, /* PS.INST_MEM[319] */
+ {0xb3d, 0x06500}, /* PS.INST_MEM[320] */
+ {0xb3e, 0x06504}, /* PS.INST_MEM[321] */
+ {0xb3f, 0x06508}, /* PS.INST_MEM[322] */
+ {0xb40, 0x0650C}, /* PS.INST_MEM[323] */
+ {0xb41, 0x06510}, /* PS.INST_MEM[324] */
+ {0xb42, 0x06514}, /* PS.INST_MEM[325] */
+ {0xb43, 0x06518}, /* PS.INST_MEM[326] */
+ {0xb44, 0x0651C}, /* PS.INST_MEM[327] */
+ {0xb45, 0x06520}, /* PS.INST_MEM[328] */
+ {0xb46, 0x06524}, /* PS.INST_MEM[329] */
+ {0xb47, 0x06528}, /* PS.INST_MEM[330] */
+ {0xb48, 0x0652C}, /* PS.INST_MEM[331] */
+ {0xb49, 0x06530}, /* PS.INST_MEM[332] */
+ {0xb4a, 0x06534}, /* PS.INST_MEM[333] */
+ {0xb4b, 0x06538}, /* PS.INST_MEM[334] */
+ {0xb4c, 0x0653C}, /* PS.INST_MEM[335] */
+ {0xb4d, 0x06540}, /* PS.INST_MEM[336] */
+ {0xb4e, 0x06544}, /* PS.INST_MEM[337] */
+ {0xb4f, 0x06548}, /* PS.INST_MEM[338] */
+ {0xb50, 0x0654C}, /* PS.INST_MEM[339] */
+ {0xb51, 0x06550}, /* PS.INST_MEM[340] */
+ {0xb52, 0x06554}, /* PS.INST_MEM[341] */
+ {0xb53, 0x06558}, /* PS.INST_MEM[342] */
+ {0xb54, 0x0655C}, /* PS.INST_MEM[343] */
+ {0xb55, 0x06560}, /* PS.INST_MEM[344] */
+ {0xb56, 0x06564}, /* PS.INST_MEM[345] */
+ {0xb57, 0x06568}, /* PS.INST_MEM[346] */
+ {0xb58, 0x0656C}, /* PS.INST_MEM[347] */
+ {0xb59, 0x06570}, /* PS.INST_MEM[348] */
+ {0xb5a, 0x06574}, /* PS.INST_MEM[349] */
+ {0xb5b, 0x06578}, /* PS.INST_MEM[350] */
+ {0xb5c, 0x0657C}, /* PS.INST_MEM[351] */
+ {0xb5d, 0x06580}, /* PS.INST_MEM[352] */
+ {0xb5e, 0x06584}, /* PS.INST_MEM[353] */
+ {0xb5f, 0x06588}, /* PS.INST_MEM[354] */
+ {0xb60, 0x0658C}, /* PS.INST_MEM[355] */
+ {0xb61, 0x06590}, /* PS.INST_MEM[356] */
+ {0xb62, 0x06594}, /* PS.INST_MEM[357] */
+ {0xb63, 0x06598}, /* PS.INST_MEM[358] */
+ {0xb64, 0x0659C}, /* PS.INST_MEM[359] */
+ {0xb65, 0x065A0}, /* PS.INST_MEM[360] */
+ {0xb66, 0x065A4}, /* PS.INST_MEM[361] */
+ {0xb67, 0x065A8}, /* PS.INST_MEM[362] */
+ {0xb68, 0x065AC}, /* PS.INST_MEM[363] */
+ {0xb69, 0x065B0}, /* PS.INST_MEM[364] */
+ {0xb6a, 0x065B4}, /* PS.INST_MEM[365] */
+ {0xb6b, 0x065B8}, /* PS.INST_MEM[366] */
+ {0xb6c, 0x065BC}, /* PS.INST_MEM[367] */
+ {0xb6d, 0x065C0}, /* PS.INST_MEM[368] */
+ {0xb6e, 0x065C4}, /* PS.INST_MEM[369] */
+ {0xb6f, 0x065C8}, /* PS.INST_MEM[370] */
+ {0xb70, 0x065CC}, /* PS.INST_MEM[371] */
+ {0xb71, 0x065D0}, /* PS.INST_MEM[372] */
+ {0xb72, 0x065D4}, /* PS.INST_MEM[373] */
+ {0xb73, 0x065D8}, /* PS.INST_MEM[374] */
+ {0xb74, 0x065DC}, /* PS.INST_MEM[375] */
+ {0xb75, 0x065E0}, /* PS.INST_MEM[376] */
+ {0xb76, 0x065E4}, /* PS.INST_MEM[377] */
+ {0xb77, 0x065E8}, /* PS.INST_MEM[378] */
+ {0xb78, 0x065EC}, /* PS.INST_MEM[379] */
+ {0xb79, 0x065F0}, /* PS.INST_MEM[380] */
+ {0xb7a, 0x065F4}, /* PS.INST_MEM[381] */
+ {0xb7b, 0x065F8}, /* PS.INST_MEM[382] */
+ {0xb7c, 0x065FC}, /* PS.INST_MEM[383] */
+ {0xb7d, 0x06600}, /* PS.INST_MEM[384] */
+ {0xb7e, 0x06604}, /* PS.INST_MEM[385] */
+ {0xb7f, 0x06608}, /* PS.INST_MEM[386] */
+ {0xb80, 0x0660C}, /* PS.INST_MEM[387] */
+ {0xb81, 0x06610}, /* PS.INST_MEM[388] */
+ {0xb82, 0x06614}, /* PS.INST_MEM[389] */
+ {0xb83, 0x06618}, /* PS.INST_MEM[390] */
+ {0xb84, 0x0661C}, /* PS.INST_MEM[391] */
+ {0xb85, 0x06620}, /* PS.INST_MEM[392] */
+ {0xb86, 0x06624}, /* PS.INST_MEM[393] */
+ {0xb87, 0x06628}, /* PS.INST_MEM[394] */
+ {0xb88, 0x0662C}, /* PS.INST_MEM[395] */
+ {0xb89, 0x06630}, /* PS.INST_MEM[396] */
+ {0xb8a, 0x06634}, /* PS.INST_MEM[397] */
+ {0xb8b, 0x06638}, /* PS.INST_MEM[398] */
+ {0xb8c, 0x0663C}, /* PS.INST_MEM[399] */
+ {0xb8d, 0x06640}, /* PS.INST_MEM[400] */
+ {0xb8e, 0x06644}, /* PS.INST_MEM[401] */
+ {0xb8f, 0x06648}, /* PS.INST_MEM[402] */
+ {0xb90, 0x0664C}, /* PS.INST_MEM[403] */
+ {0xb91, 0x06650}, /* PS.INST_MEM[404] */
+ {0xb92, 0x06654}, /* PS.INST_MEM[405] */
+ {0xb93, 0x06658}, /* PS.INST_MEM[406] */
+ {0xb94, 0x0665C}, /* PS.INST_MEM[407] */
+ {0xb95, 0x06660}, /* PS.INST_MEM[408] */
+ {0xb96, 0x06664}, /* PS.INST_MEM[409] */
+ {0xb97, 0x06668}, /* PS.INST_MEM[410] */
+ {0xb98, 0x0666C}, /* PS.INST_MEM[411] */
+ {0xb99, 0x06670}, /* PS.INST_MEM[412] */
+ {0xb9a, 0x06674}, /* PS.INST_MEM[413] */
+ {0xb9b, 0x06678}, /* PS.INST_MEM[414] */
+ {0xb9c, 0x0667C}, /* PS.INST_MEM[415] */
+ {0xb9d, 0x06680}, /* PS.INST_MEM[416] */
+ {0xb9e, 0x06684}, /* PS.INST_MEM[417] */
+ {0xb9f, 0x06688}, /* PS.INST_MEM[418] */
+ {0xba0, 0x0668C}, /* PS.INST_MEM[419] */
+ {0xba1, 0x06690}, /* PS.INST_MEM[420] */
+ {0xba2, 0x06694}, /* PS.INST_MEM[421] */
+ {0xba3, 0x06698}, /* PS.INST_MEM[422] */
+ {0xba4, 0x0669C}, /* PS.INST_MEM[423] */
+ {0xba5, 0x066A0}, /* PS.INST_MEM[424] */
+ {0xba6, 0x066A4}, /* PS.INST_MEM[425] */
+ {0xba7, 0x066A8}, /* PS.INST_MEM[426] */
+ {0xba8, 0x066AC}, /* PS.INST_MEM[427] */
+ {0xba9, 0x066B0}, /* PS.INST_MEM[428] */
+ {0xbaa, 0x066B4}, /* PS.INST_MEM[429] */
+ {0xbab, 0x066B8}, /* PS.INST_MEM[430] */
+ {0xbac, 0x066BC}, /* PS.INST_MEM[431] */
+ {0xbad, 0x066C0}, /* PS.INST_MEM[432] */
+ {0xbae, 0x066C4}, /* PS.INST_MEM[433] */
+ {0xbaf, 0x066C8}, /* PS.INST_MEM[434] */
+ {0xbb0, 0x066CC}, /* PS.INST_MEM[435] */
+ {0xbb1, 0x066D0}, /* PS.INST_MEM[436] */
+ {0xbb2, 0x066D4}, /* PS.INST_MEM[437] */
+ {0xbb3, 0x066D8}, /* PS.INST_MEM[438] */
+ {0xbb4, 0x066DC}, /* PS.INST_MEM[439] */
+ {0xbb5, 0x066E0}, /* PS.INST_MEM[440] */
+ {0xbb6, 0x066E4}, /* PS.INST_MEM[441] */
+ {0xbb7, 0x066E8}, /* PS.INST_MEM[442] */
+ {0xbb8, 0x066EC}, /* PS.INST_MEM[443] */
+ {0xbb9, 0x066F0}, /* PS.INST_MEM[444] */
+ {0xbba, 0x066F4}, /* PS.INST_MEM[445] */
+ {0xbbb, 0x066F8}, /* PS.INST_MEM[446] */
+ {0xbbc, 0x066FC}, /* PS.INST_MEM[447] */
+ {0xbbd, 0x06700}, /* PS.INST_MEM[448] */
+ {0xbbe, 0x06704}, /* PS.INST_MEM[449] */
+ {0xbbf, 0x06708}, /* PS.INST_MEM[450] */
+ {0xbc0, 0x0670C}, /* PS.INST_MEM[451] */
+ {0xbc1, 0x06710}, /* PS.INST_MEM[452] */
+ {0xbc2, 0x06714}, /* PS.INST_MEM[453] */
+ {0xbc3, 0x06718}, /* PS.INST_MEM[454] */
+ {0xbc4, 0x0671C}, /* PS.INST_MEM[455] */
+ {0xbc5, 0x06720}, /* PS.INST_MEM[456] */
+ {0xbc6, 0x06724}, /* PS.INST_MEM[457] */
+ {0xbc7, 0x06728}, /* PS.INST_MEM[458] */
+ {0xbc8, 0x0672C}, /* PS.INST_MEM[459] */
+ {0xbc9, 0x06730}, /* PS.INST_MEM[460] */
+ {0xbca, 0x06734}, /* PS.INST_MEM[461] */
+ {0xbcb, 0x06738}, /* PS.INST_MEM[462] */
+ {0xbcc, 0x0673C}, /* PS.INST_MEM[463] */
+ {0xbcd, 0x06740}, /* PS.INST_MEM[464] */
+ {0xbce, 0x06744}, /* PS.INST_MEM[465] */
+ {0xbcf, 0x06748}, /* PS.INST_MEM[466] */
+ {0xbd0, 0x0674C}, /* PS.INST_MEM[467] */
+ {0xbd1, 0x06750}, /* PS.INST_MEM[468] */
+ {0xbd2, 0x06754}, /* PS.INST_MEM[469] */
+ {0xbd3, 0x06758}, /* PS.INST_MEM[470] */
+ {0xbd4, 0x0675C}, /* PS.INST_MEM[471] */
+ {0xbd5, 0x06760}, /* PS.INST_MEM[472] */
+ {0xbd6, 0x06764}, /* PS.INST_MEM[473] */
+ {0xbd7, 0x06768}, /* PS.INST_MEM[474] */
+ {0xbd8, 0x0676C}, /* PS.INST_MEM[475] */
+ {0xbd9, 0x06770}, /* PS.INST_MEM[476] */
+ {0xbda, 0x06774}, /* PS.INST_MEM[477] */
+ {0xbdb, 0x06778}, /* PS.INST_MEM[478] */
+ {0xbdc, 0x0677C}, /* PS.INST_MEM[479] */
+ {0xbdd, 0x06780}, /* PS.INST_MEM[480] */
+ {0xbde, 0x06784}, /* PS.INST_MEM[481] */
+ {0xbdf, 0x06788}, /* PS.INST_MEM[482] */
+ {0xbe0, 0x0678C}, /* PS.INST_MEM[483] */
+ {0xbe1, 0x06790}, /* PS.INST_MEM[484] */
+ {0xbe2, 0x06794}, /* PS.INST_MEM[485] */
+ {0xbe3, 0x06798}, /* PS.INST_MEM[486] */
+ {0xbe4, 0x0679C}, /* PS.INST_MEM[487] */
+ {0xbe5, 0x067A0}, /* PS.INST_MEM[488] */
+ {0xbe6, 0x067A4}, /* PS.INST_MEM[489] */
+ {0xbe7, 0x067A8}, /* PS.INST_MEM[490] */
+ {0xbe8, 0x067AC}, /* PS.INST_MEM[491] */
+ {0xbe9, 0x067B0}, /* PS.INST_MEM[492] */
+ {0xbea, 0x067B4}, /* PS.INST_MEM[493] */
+ {0xbeb, 0x067B8}, /* PS.INST_MEM[494] */
+ {0xbec, 0x067BC}, /* PS.INST_MEM[495] */
+ {0xbed, 0x067C0}, /* PS.INST_MEM[496] */
+ {0xbee, 0x067C4}, /* PS.INST_MEM[497] */
+ {0xbef, 0x067C8}, /* PS.INST_MEM[498] */
+ {0xbf0, 0x067CC}, /* PS.INST_MEM[499] */
+ {0xbf1, 0x067D0}, /* PS.INST_MEM[500] */
+ {0xbf2, 0x067D4}, /* PS.INST_MEM[501] */
+ {0xbf3, 0x067D8}, /* PS.INST_MEM[502] */
+ {0xbf4, 0x067DC}, /* PS.INST_MEM[503] */
+ {0xbf5, 0x067E0}, /* PS.INST_MEM[504] */
+ {0xbf6, 0x067E4}, /* PS.INST_MEM[505] */
+ {0xbf7, 0x067E8}, /* PS.INST_MEM[506] */
+ {0xbf8, 0x067EC}, /* PS.INST_MEM[507] */
+ {0xbf9, 0x067F0}, /* PS.INST_MEM[508] */
+ {0xbfa, 0x067F4}, /* PS.INST_MEM[509] */
+ {0xbfb, 0x067F8}, /* PS.INST_MEM[510] */
+ {0xbfc, 0x067FC}, /* PS.INST_MEM[511] */
+ {0xbfd, 0x06800}, /* PS.INST_MEM[512] */
+ {0xbfe, 0x06804}, /* PS.INST_MEM[513] */
+ {0xbff, 0x06808}, /* PS.INST_MEM[514] */
+ {0xc00, 0x0680C}, /* PS.INST_MEM[515] */
+ {0xc01, 0x06810}, /* PS.INST_MEM[516] */
+ {0xc02, 0x06814}, /* PS.INST_MEM[517] */
+ {0xc03, 0x06818}, /* PS.INST_MEM[518] */
+ {0xc04, 0x0681C}, /* PS.INST_MEM[519] */
+ {0xc05, 0x06820}, /* PS.INST_MEM[520] */
+ {0xc06, 0x06824}, /* PS.INST_MEM[521] */
+ {0xc07, 0x06828}, /* PS.INST_MEM[522] */
+ {0xc08, 0x0682C}, /* PS.INST_MEM[523] */
+ {0xc09, 0x06830}, /* PS.INST_MEM[524] */
+ {0xc0a, 0x06834}, /* PS.INST_MEM[525] */
+ {0xc0b, 0x06838}, /* PS.INST_MEM[526] */
+ {0xc0c, 0x0683C}, /* PS.INST_MEM[527] */
+ {0xc0d, 0x06840}, /* PS.INST_MEM[528] */
+ {0xc0e, 0x06844}, /* PS.INST_MEM[529] */
+ {0xc0f, 0x06848}, /* PS.INST_MEM[530] */
+ {0xc10, 0x0684C}, /* PS.INST_MEM[531] */
+ {0xc11, 0x06850}, /* PS.INST_MEM[532] */
+ {0xc12, 0x06854}, /* PS.INST_MEM[533] */
+ {0xc13, 0x06858}, /* PS.INST_MEM[534] */
+ {0xc14, 0x0685C}, /* PS.INST_MEM[535] */
+ {0xc15, 0x06860}, /* PS.INST_MEM[536] */
+ {0xc16, 0x06864}, /* PS.INST_MEM[537] */
+ {0xc17, 0x06868}, /* PS.INST_MEM[538] */
+ {0xc18, 0x0686C}, /* PS.INST_MEM[539] */
+ {0xc19, 0x06870}, /* PS.INST_MEM[540] */
+ {0xc1a, 0x06874}, /* PS.INST_MEM[541] */
+ {0xc1b, 0x06878}, /* PS.INST_MEM[542] */
+ {0xc1c, 0x0687C}, /* PS.INST_MEM[543] */
+ {0xc1d, 0x06880}, /* PS.INST_MEM[544] */
+ {0xc1e, 0x06884}, /* PS.INST_MEM[545] */
+ {0xc1f, 0x06888}, /* PS.INST_MEM[546] */
+ {0xc20, 0x0688C}, /* PS.INST_MEM[547] */
+ {0xc21, 0x06890}, /* PS.INST_MEM[548] */
+ {0xc22, 0x06894}, /* PS.INST_MEM[549] */
+ {0xc23, 0x06898}, /* PS.INST_MEM[550] */
+ {0xc24, 0x0689C}, /* PS.INST_MEM[551] */
+ {0xc25, 0x068A0}, /* PS.INST_MEM[552] */
+ {0xc26, 0x068A4}, /* PS.INST_MEM[553] */
+ {0xc27, 0x068A8}, /* PS.INST_MEM[554] */
+ {0xc28, 0x068AC}, /* PS.INST_MEM[555] */
+ {0xc29, 0x068B0}, /* PS.INST_MEM[556] */
+ {0xc2a, 0x068B4}, /* PS.INST_MEM[557] */
+ {0xc2b, 0x068B8}, /* PS.INST_MEM[558] */
+ {0xc2c, 0x068BC}, /* PS.INST_MEM[559] */
+ {0xc2d, 0x068C0}, /* PS.INST_MEM[560] */
+ {0xc2e, 0x068C4}, /* PS.INST_MEM[561] */
+ {0xc2f, 0x068C8}, /* PS.INST_MEM[562] */
+ {0xc30, 0x068CC}, /* PS.INST_MEM[563] */
+ {0xc31, 0x068D0}, /* PS.INST_MEM[564] */
+ {0xc32, 0x068D4}, /* PS.INST_MEM[565] */
+ {0xc33, 0x068D8}, /* PS.INST_MEM[566] */
+ {0xc34, 0x068DC}, /* PS.INST_MEM[567] */
+ {0xc35, 0x068E0}, /* PS.INST_MEM[568] */
+ {0xc36, 0x068E4}, /* PS.INST_MEM[569] */
+ {0xc37, 0x068E8}, /* PS.INST_MEM[570] */
+ {0xc38, 0x068EC}, /* PS.INST_MEM[571] */
+ {0xc39, 0x068F0}, /* PS.INST_MEM[572] */
+ {0xc3a, 0x068F4}, /* PS.INST_MEM[573] */
+ {0xc3b, 0x068F8}, /* PS.INST_MEM[574] */
+ {0xc3c, 0x068FC}, /* PS.INST_MEM[575] */
+ {0xc3d, 0x06900}, /* PS.INST_MEM[576] */
+ {0xc3e, 0x06904}, /* PS.INST_MEM[577] */
+ {0xc3f, 0x06908}, /* PS.INST_MEM[578] */
+ {0xc40, 0x0690C}, /* PS.INST_MEM[579] */
+ {0xc41, 0x06910}, /* PS.INST_MEM[580] */
+ {0xc42, 0x06914}, /* PS.INST_MEM[581] */
+ {0xc43, 0x06918}, /* PS.INST_MEM[582] */
+ {0xc44, 0x0691C}, /* PS.INST_MEM[583] */
+ {0xc45, 0x06920}, /* PS.INST_MEM[584] */
+ {0xc46, 0x06924}, /* PS.INST_MEM[585] */
+ {0xc47, 0x06928}, /* PS.INST_MEM[586] */
+ {0xc48, 0x0692C}, /* PS.INST_MEM[587] */
+ {0xc49, 0x06930}, /* PS.INST_MEM[588] */
+ {0xc4a, 0x06934}, /* PS.INST_MEM[589] */
+ {0xc4b, 0x06938}, /* PS.INST_MEM[590] */
+ {0xc4c, 0x0693C}, /* PS.INST_MEM[591] */
+ {0xc4d, 0x06940}, /* PS.INST_MEM[592] */
+ {0xc4e, 0x06944}, /* PS.INST_MEM[593] */
+ {0xc4f, 0x06948}, /* PS.INST_MEM[594] */
+ {0xc50, 0x0694C}, /* PS.INST_MEM[595] */
+ {0xc51, 0x06950}, /* PS.INST_MEM[596] */
+ {0xc52, 0x06954}, /* PS.INST_MEM[597] */
+ {0xc53, 0x06958}, /* PS.INST_MEM[598] */
+ {0xc54, 0x0695C}, /* PS.INST_MEM[599] */
+ {0xc55, 0x06960}, /* PS.INST_MEM[600] */
+ {0xc56, 0x06964}, /* PS.INST_MEM[601] */
+ {0xc57, 0x06968}, /* PS.INST_MEM[602] */
+ {0xc58, 0x0696C}, /* PS.INST_MEM[603] */
+ {0xc59, 0x06970}, /* PS.INST_MEM[604] */
+ {0xc5a, 0x06974}, /* PS.INST_MEM[605] */
+ {0xc5b, 0x06978}, /* PS.INST_MEM[606] */
+ {0xc5c, 0x0697C}, /* PS.INST_MEM[607] */
+ {0xc5d, 0x06980}, /* PS.INST_MEM[608] */
+ {0xc5e, 0x06984}, /* PS.INST_MEM[609] */
+ {0xc5f, 0x06988}, /* PS.INST_MEM[610] */
+ {0xc60, 0x0698C}, /* PS.INST_MEM[611] */
+ {0xc61, 0x06990}, /* PS.INST_MEM[612] */
+ {0xc62, 0x06994}, /* PS.INST_MEM[613] */
+ {0xc63, 0x06998}, /* PS.INST_MEM[614] */
+ {0xc64, 0x0699C}, /* PS.INST_MEM[615] */
+ {0xc65, 0x069A0}, /* PS.INST_MEM[616] */
+ {0xc66, 0x069A4}, /* PS.INST_MEM[617] */
+ {0xc67, 0x069A8}, /* PS.INST_MEM[618] */
+ {0xc68, 0x069AC}, /* PS.INST_MEM[619] */
+ {0xc69, 0x069B0}, /* PS.INST_MEM[620] */
+ {0xc6a, 0x069B4}, /* PS.INST_MEM[621] */
+ {0xc6b, 0x069B8}, /* PS.INST_MEM[622] */
+ {0xc6c, 0x069BC}, /* PS.INST_MEM[623] */
+ {0xc6d, 0x069C0}, /* PS.INST_MEM[624] */
+ {0xc6e, 0x069C4}, /* PS.INST_MEM[625] */
+ {0xc6f, 0x069C8}, /* PS.INST_MEM[626] */
+ {0xc70, 0x069CC}, /* PS.INST_MEM[627] */
+ {0xc71, 0x069D0}, /* PS.INST_MEM[628] */
+ {0xc72, 0x069D4}, /* PS.INST_MEM[629] */
+ {0xc73, 0x069D8}, /* PS.INST_MEM[630] */
+ {0xc74, 0x069DC}, /* PS.INST_MEM[631] */
+ {0xc75, 0x069E0}, /* PS.INST_MEM[632] */
+ {0xc76, 0x069E4}, /* PS.INST_MEM[633] */
+ {0xc77, 0x069E8}, /* PS.INST_MEM[634] */
+ {0xc78, 0x069EC}, /* PS.INST_MEM[635] */
+ {0xc79, 0x069F0}, /* PS.INST_MEM[636] */
+ {0xc7a, 0x069F4}, /* PS.INST_MEM[637] */
+ {0xc7b, 0x069F8}, /* PS.INST_MEM[638] */
+ {0xc7c, 0x069FC}, /* PS.INST_MEM[639] */
+ {0xc7d, 0x06A00}, /* PS.INST_MEM[640] */
+ {0xc7e, 0x06A04}, /* PS.INST_MEM[641] */
+ {0xc7f, 0x06A08}, /* PS.INST_MEM[642] */
+ {0xc80, 0x06A0C}, /* PS.INST_MEM[643] */
+ {0xc81, 0x06A10}, /* PS.INST_MEM[644] */
+ {0xc82, 0x06A14}, /* PS.INST_MEM[645] */
+ {0xc83, 0x06A18}, /* PS.INST_MEM[646] */
+ {0xc84, 0x06A1C}, /* PS.INST_MEM[647] */
+ {0xc85, 0x06A20}, /* PS.INST_MEM[648] */
+ {0xc86, 0x06A24}, /* PS.INST_MEM[649] */
+ {0xc87, 0x06A28}, /* PS.INST_MEM[650] */
+ {0xc88, 0x06A2C}, /* PS.INST_MEM[651] */
+ {0xc89, 0x06A30}, /* PS.INST_MEM[652] */
+ {0xc8a, 0x06A34}, /* PS.INST_MEM[653] */
+ {0xc8b, 0x06A38}, /* PS.INST_MEM[654] */
+ {0xc8c, 0x06A3C}, /* PS.INST_MEM[655] */
+ {0xc8d, 0x06A40}, /* PS.INST_MEM[656] */
+ {0xc8e, 0x06A44}, /* PS.INST_MEM[657] */
+ {0xc8f, 0x06A48}, /* PS.INST_MEM[658] */
+ {0xc90, 0x06A4C}, /* PS.INST_MEM[659] */
+ {0xc91, 0x06A50}, /* PS.INST_MEM[660] */
+ {0xc92, 0x06A54}, /* PS.INST_MEM[661] */
+ {0xc93, 0x06A58}, /* PS.INST_MEM[662] */
+ {0xc94, 0x06A5C}, /* PS.INST_MEM[663] */
+ {0xc95, 0x06A60}, /* PS.INST_MEM[664] */
+ {0xc96, 0x06A64}, /* PS.INST_MEM[665] */
+ {0xc97, 0x06A68}, /* PS.INST_MEM[666] */
+ {0xc98, 0x06A6C}, /* PS.INST_MEM[667] */
+ {0xc99, 0x06A70}, /* PS.INST_MEM[668] */
+ {0xc9a, 0x06A74}, /* PS.INST_MEM[669] */
+ {0xc9b, 0x06A78}, /* PS.INST_MEM[670] */
+ {0xc9c, 0x06A7C}, /* PS.INST_MEM[671] */
+ {0xc9d, 0x06A80}, /* PS.INST_MEM[672] */
+ {0xc9e, 0x06A84}, /* PS.INST_MEM[673] */
+ {0xc9f, 0x06A88}, /* PS.INST_MEM[674] */
+ {0xca0, 0x06A8C}, /* PS.INST_MEM[675] */
+ {0xca1, 0x06A90}, /* PS.INST_MEM[676] */
+ {0xca2, 0x06A94}, /* PS.INST_MEM[677] */
+ {0xca3, 0x06A98}, /* PS.INST_MEM[678] */
+ {0xca4, 0x06A9C}, /* PS.INST_MEM[679] */
+ {0xca5, 0x06AA0}, /* PS.INST_MEM[680] */
+ {0xca6, 0x06AA4}, /* PS.INST_MEM[681] */
+ {0xca7, 0x06AA8}, /* PS.INST_MEM[682] */
+ {0xca8, 0x06AAC}, /* PS.INST_MEM[683] */
+ {0xca9, 0x06AB0}, /* PS.INST_MEM[684] */
+ {0xcaa, 0x06AB4}, /* PS.INST_MEM[685] */
+ {0xcab, 0x06AB8}, /* PS.INST_MEM[686] */
+ {0xcac, 0x06ABC}, /* PS.INST_MEM[687] */
+ {0xcad, 0x06AC0}, /* PS.INST_MEM[688] */
+ {0xcae, 0x06AC4}, /* PS.INST_MEM[689] */
+ {0xcaf, 0x06AC8}, /* PS.INST_MEM[690] */
+ {0xcb0, 0x06ACC}, /* PS.INST_MEM[691] */
+ {0xcb1, 0x06AD0}, /* PS.INST_MEM[692] */
+ {0xcb2, 0x06AD4}, /* PS.INST_MEM[693] */
+ {0xcb3, 0x06AD8}, /* PS.INST_MEM[694] */
+ {0xcb4, 0x06ADC}, /* PS.INST_MEM[695] */
+ {0xcb5, 0x06AE0}, /* PS.INST_MEM[696] */
+ {0xcb6, 0x06AE4}, /* PS.INST_MEM[697] */
+ {0xcb7, 0x06AE8}, /* PS.INST_MEM[698] */
+ {0xcb8, 0x06AEC}, /* PS.INST_MEM[699] */
+ {0xcb9, 0x06AF0}, /* PS.INST_MEM[700] */
+ {0xcba, 0x06AF4}, /* PS.INST_MEM[701] */
+ {0xcbb, 0x06AF8}, /* PS.INST_MEM[702] */
+ {0xcbc, 0x06AFC}, /* PS.INST_MEM[703] */
+ {0xcbd, 0x06B00}, /* PS.INST_MEM[704] */
+ {0xcbe, 0x06B04}, /* PS.INST_MEM[705] */
+ {0xcbf, 0x06B08}, /* PS.INST_MEM[706] */
+ {0xcc0, 0x06B0C}, /* PS.INST_MEM[707] */
+ {0xcc1, 0x06B10}, /* PS.INST_MEM[708] */
+ {0xcc2, 0x06B14}, /* PS.INST_MEM[709] */
+ {0xcc3, 0x06B18}, /* PS.INST_MEM[710] */
+ {0xcc4, 0x06B1C}, /* PS.INST_MEM[711] */
+ {0xcc5, 0x06B20}, /* PS.INST_MEM[712] */
+ {0xcc6, 0x06B24}, /* PS.INST_MEM[713] */
+ {0xcc7, 0x06B28}, /* PS.INST_MEM[714] */
+ {0xcc8, 0x06B2C}, /* PS.INST_MEM[715] */
+ {0xcc9, 0x06B30}, /* PS.INST_MEM[716] */
+ {0xcca, 0x06B34}, /* PS.INST_MEM[717] */
+ {0xccb, 0x06B38}, /* PS.INST_MEM[718] */
+ {0xccc, 0x06B3C}, /* PS.INST_MEM[719] */
+ {0xccd, 0x06B40}, /* PS.INST_MEM[720] */
+ {0xcce, 0x06B44}, /* PS.INST_MEM[721] */
+ {0xccf, 0x06B48}, /* PS.INST_MEM[722] */
+ {0xcd0, 0x06B4C}, /* PS.INST_MEM[723] */
+ {0xcd1, 0x06B50}, /* PS.INST_MEM[724] */
+ {0xcd2, 0x06B54}, /* PS.INST_MEM[725] */
+ {0xcd3, 0x06B58}, /* PS.INST_MEM[726] */
+ {0xcd4, 0x06B5C}, /* PS.INST_MEM[727] */
+ {0xcd5, 0x06B60}, /* PS.INST_MEM[728] */
+ {0xcd6, 0x06B64}, /* PS.INST_MEM[729] */
+ {0xcd7, 0x06B68}, /* PS.INST_MEM[730] */
+ {0xcd8, 0x06B6C}, /* PS.INST_MEM[731] */
+ {0xcd9, 0x06B70}, /* PS.INST_MEM[732] */
+ {0xcda, 0x06B74}, /* PS.INST_MEM[733] */
+ {0xcdb, 0x06B78}, /* PS.INST_MEM[734] */
+ {0xcdc, 0x06B7C}, /* PS.INST_MEM[735] */
+ {0xcdd, 0x06B80}, /* PS.INST_MEM[736] */
+ {0xcde, 0x06B84}, /* PS.INST_MEM[737] */
+ {0xcdf, 0x06B88}, /* PS.INST_MEM[738] */
+ {0xce0, 0x06B8C}, /* PS.INST_MEM[739] */
+ {0xce1, 0x06B90}, /* PS.INST_MEM[740] */
+ {0xce2, 0x06B94}, /* PS.INST_MEM[741] */
+ {0xce3, 0x06B98}, /* PS.INST_MEM[742] */
+ {0xce4, 0x06B9C}, /* PS.INST_MEM[743] */
+ {0xce5, 0x06BA0}, /* PS.INST_MEM[744] */
+ {0xce6, 0x06BA4}, /* PS.INST_MEM[745] */
+ {0xce7, 0x06BA8}, /* PS.INST_MEM[746] */
+ {0xce8, 0x06BAC}, /* PS.INST_MEM[747] */
+ {0xce9, 0x06BB0}, /* PS.INST_MEM[748] */
+ {0xcea, 0x06BB4}, /* PS.INST_MEM[749] */
+ {0xceb, 0x06BB8}, /* PS.INST_MEM[750] */
+ {0xcec, 0x06BBC}, /* PS.INST_MEM[751] */
+ {0xced, 0x06BC0}, /* PS.INST_MEM[752] */
+ {0xcee, 0x06BC4}, /* PS.INST_MEM[753] */
+ {0xcef, 0x06BC8}, /* PS.INST_MEM[754] */
+ {0xcf0, 0x06BCC}, /* PS.INST_MEM[755] */
+ {0xcf1, 0x06BD0}, /* PS.INST_MEM[756] */
+ {0xcf2, 0x06BD4}, /* PS.INST_MEM[757] */
+ {0xcf3, 0x06BD8}, /* PS.INST_MEM[758] */
+ {0xcf4, 0x06BDC}, /* PS.INST_MEM[759] */
+ {0xcf5, 0x06BE0}, /* PS.INST_MEM[760] */
+ {0xcf6, 0x06BE4}, /* PS.INST_MEM[761] */
+ {0xcf7, 0x06BE8}, /* PS.INST_MEM[762] */
+ {0xcf8, 0x06BEC}, /* PS.INST_MEM[763] */
+ {0xcf9, 0x06BF0}, /* PS.INST_MEM[764] */
+ {0xcfa, 0x06BF4}, /* PS.INST_MEM[765] */
+ {0xcfb, 0x06BF8}, /* PS.INST_MEM[766] */
+ {0xcfc, 0x06BFC}, /* PS.INST_MEM[767] */
+ {0xcfd, 0x06C00}, /* PS.INST_MEM[768] */
+ {0xcfe, 0x06C04}, /* PS.INST_MEM[769] */
+ {0xcff, 0x06C08}, /* PS.INST_MEM[770] */
+ {0xd00, 0x06C0C}, /* PS.INST_MEM[771] */
+ {0xd01, 0x06C10}, /* PS.INST_MEM[772] */
+ {0xd02, 0x06C14}, /* PS.INST_MEM[773] */
+ {0xd03, 0x06C18}, /* PS.INST_MEM[774] */
+ {0xd04, 0x06C1C}, /* PS.INST_MEM[775] */
+ {0xd05, 0x06C20}, /* PS.INST_MEM[776] */
+ {0xd06, 0x06C24}, /* PS.INST_MEM[777] */
+ {0xd07, 0x06C28}, /* PS.INST_MEM[778] */
+ {0xd08, 0x06C2C}, /* PS.INST_MEM[779] */
+ {0xd09, 0x06C30}, /* PS.INST_MEM[780] */
+ {0xd0a, 0x06C34}, /* PS.INST_MEM[781] */
+ {0xd0b, 0x06C38}, /* PS.INST_MEM[782] */
+ {0xd0c, 0x06C3C}, /* PS.INST_MEM[783] */
+ {0xd0d, 0x06C40}, /* PS.INST_MEM[784] */
+ {0xd0e, 0x06C44}, /* PS.INST_MEM[785] */
+ {0xd0f, 0x06C48}, /* PS.INST_MEM[786] */
+ {0xd10, 0x06C4C}, /* PS.INST_MEM[787] */
+ {0xd11, 0x06C50}, /* PS.INST_MEM[788] */
+ {0xd12, 0x06C54}, /* PS.INST_MEM[789] */
+ {0xd13, 0x06C58}, /* PS.INST_MEM[790] */
+ {0xd14, 0x06C5C}, /* PS.INST_MEM[791] */
+ {0xd15, 0x06C60}, /* PS.INST_MEM[792] */
+ {0xd16, 0x06C64}, /* PS.INST_MEM[793] */
+ {0xd17, 0x06C68}, /* PS.INST_MEM[794] */
+ {0xd18, 0x06C6C}, /* PS.INST_MEM[795] */
+ {0xd19, 0x06C70}, /* PS.INST_MEM[796] */
+ {0xd1a, 0x06C74}, /* PS.INST_MEM[797] */
+ {0xd1b, 0x06C78}, /* PS.INST_MEM[798] */
+ {0xd1c, 0x06C7C}, /* PS.INST_MEM[799] */
+ {0xd1d, 0x06C80}, /* PS.INST_MEM[800] */
+ {0xd1e, 0x06C84}, /* PS.INST_MEM[801] */
+ {0xd1f, 0x06C88}, /* PS.INST_MEM[802] */
+ {0xd20, 0x06C8C}, /* PS.INST_MEM[803] */
+ {0xd21, 0x06C90}, /* PS.INST_MEM[804] */
+ {0xd22, 0x06C94}, /* PS.INST_MEM[805] */
+ {0xd23, 0x06C98}, /* PS.INST_MEM[806] */
+ {0xd24, 0x06C9C}, /* PS.INST_MEM[807] */
+ {0xd25, 0x06CA0}, /* PS.INST_MEM[808] */
+ {0xd26, 0x06CA4}, /* PS.INST_MEM[809] */
+ {0xd27, 0x06CA8}, /* PS.INST_MEM[810] */
+ {0xd28, 0x06CAC}, /* PS.INST_MEM[811] */
+ {0xd29, 0x06CB0}, /* PS.INST_MEM[812] */
+ {0xd2a, 0x06CB4}, /* PS.INST_MEM[813] */
+ {0xd2b, 0x06CB8}, /* PS.INST_MEM[814] */
+ {0xd2c, 0x06CBC}, /* PS.INST_MEM[815] */
+ {0xd2d, 0x06CC0}, /* PS.INST_MEM[816] */
+ {0xd2e, 0x06CC4}, /* PS.INST_MEM[817] */
+ {0xd2f, 0x06CC8}, /* PS.INST_MEM[818] */
+ {0xd30, 0x06CCC}, /* PS.INST_MEM[819] */
+ {0xd31, 0x06CD0}, /* PS.INST_MEM[820] */
+ {0xd32, 0x06CD4}, /* PS.INST_MEM[821] */
+ {0xd33, 0x06CD8}, /* PS.INST_MEM[822] */
+ {0xd34, 0x06CDC}, /* PS.INST_MEM[823] */
+ {0xd35, 0x06CE0}, /* PS.INST_MEM[824] */
+ {0xd36, 0x06CE4}, /* PS.INST_MEM[825] */
+ {0xd37, 0x06CE8}, /* PS.INST_MEM[826] */
+ {0xd38, 0x06CEC}, /* PS.INST_MEM[827] */
+ {0xd39, 0x06CF0}, /* PS.INST_MEM[828] */
+ {0xd3a, 0x06CF4}, /* PS.INST_MEM[829] */
+ {0xd3b, 0x06CF8}, /* PS.INST_MEM[830] */
+ {0xd3c, 0x06CFC}, /* PS.INST_MEM[831] */
+ {0xd3d, 0x06D00}, /* PS.INST_MEM[832] */
+ {0xd3e, 0x06D04}, /* PS.INST_MEM[833] */
+ {0xd3f, 0x06D08}, /* PS.INST_MEM[834] */
+ {0xd40, 0x06D0C}, /* PS.INST_MEM[835] */
+ {0xd41, 0x06D10}, /* PS.INST_MEM[836] */
+ {0xd42, 0x06D14}, /* PS.INST_MEM[837] */
+ {0xd43, 0x06D18}, /* PS.INST_MEM[838] */
+ {0xd44, 0x06D1C}, /* PS.INST_MEM[839] */
+ {0xd45, 0x06D20}, /* PS.INST_MEM[840] */
+ {0xd46, 0x06D24}, /* PS.INST_MEM[841] */
+ {0xd47, 0x06D28}, /* PS.INST_MEM[842] */
+ {0xd48, 0x06D2C}, /* PS.INST_MEM[843] */
+ {0xd49, 0x06D30}, /* PS.INST_MEM[844] */
+ {0xd4a, 0x06D34}, /* PS.INST_MEM[845] */
+ {0xd4b, 0x06D38}, /* PS.INST_MEM[846] */
+ {0xd4c, 0x06D3C}, /* PS.INST_MEM[847] */
+ {0xd4d, 0x06D40}, /* PS.INST_MEM[848] */
+ {0xd4e, 0x06D44}, /* PS.INST_MEM[849] */
+ {0xd4f, 0x06D48}, /* PS.INST_MEM[850] */
+ {0xd50, 0x06D4C}, /* PS.INST_MEM[851] */
+ {0xd51, 0x06D50}, /* PS.INST_MEM[852] */
+ {0xd52, 0x06D54}, /* PS.INST_MEM[853] */
+ {0xd53, 0x06D58}, /* PS.INST_MEM[854] */
+ {0xd54, 0x06D5C}, /* PS.INST_MEM[855] */
+ {0xd55, 0x06D60}, /* PS.INST_MEM[856] */
+ {0xd56, 0x06D64}, /* PS.INST_MEM[857] */
+ {0xd57, 0x06D68}, /* PS.INST_MEM[858] */
+ {0xd58, 0x06D6C}, /* PS.INST_MEM[859] */
+ {0xd59, 0x06D70}, /* PS.INST_MEM[860] */
+ {0xd5a, 0x06D74}, /* PS.INST_MEM[861] */
+ {0xd5b, 0x06D78}, /* PS.INST_MEM[862] */
+ {0xd5c, 0x06D7C}, /* PS.INST_MEM[863] */
+ {0xd5d, 0x06D80}, /* PS.INST_MEM[864] */
+ {0xd5e, 0x06D84}, /* PS.INST_MEM[865] */
+ {0xd5f, 0x06D88}, /* PS.INST_MEM[866] */
+ {0xd60, 0x06D8C}, /* PS.INST_MEM[867] */
+ {0xd61, 0x06D90}, /* PS.INST_MEM[868] */
+ {0xd62, 0x06D94}, /* PS.INST_MEM[869] */
+ {0xd63, 0x06D98}, /* PS.INST_MEM[870] */
+ {0xd64, 0x06D9C}, /* PS.INST_MEM[871] */
+ {0xd65, 0x06DA0}, /* PS.INST_MEM[872] */
+ {0xd66, 0x06DA4}, /* PS.INST_MEM[873] */
+ {0xd67, 0x06DA8}, /* PS.INST_MEM[874] */
+ {0xd68, 0x06DAC}, /* PS.INST_MEM[875] */
+ {0xd69, 0x06DB0}, /* PS.INST_MEM[876] */
+ {0xd6a, 0x06DB4}, /* PS.INST_MEM[877] */
+ {0xd6b, 0x06DB8}, /* PS.INST_MEM[878] */
+ {0xd6c, 0x06DBC}, /* PS.INST_MEM[879] */
+ {0xd6d, 0x06DC0}, /* PS.INST_MEM[880] */
+ {0xd6e, 0x06DC4}, /* PS.INST_MEM[881] */
+ {0xd6f, 0x06DC8}, /* PS.INST_MEM[882] */
+ {0xd70, 0x06DCC}, /* PS.INST_MEM[883] */
+ {0xd71, 0x06DD0}, /* PS.INST_MEM[884] */
+ {0xd72, 0x06DD4}, /* PS.INST_MEM[885] */
+ {0xd73, 0x06DD8}, /* PS.INST_MEM[886] */
+ {0xd74, 0x06DDC}, /* PS.INST_MEM[887] */
+ {0xd75, 0x06DE0}, /* PS.INST_MEM[888] */
+ {0xd76, 0x06DE4}, /* PS.INST_MEM[889] */
+ {0xd77, 0x06DE8}, /* PS.INST_MEM[890] */
+ {0xd78, 0x06DEC}, /* PS.INST_MEM[891] */
+ {0xd79, 0x06DF0}, /* PS.INST_MEM[892] */
+ {0xd7a, 0x06DF4}, /* PS.INST_MEM[893] */
+ {0xd7b, 0x06DF8}, /* PS.INST_MEM[894] */
+ {0xd7c, 0x06DFC}, /* PS.INST_MEM[895] */
+ {0xd7d, 0x06E00}, /* PS.INST_MEM[896] */
+ {0xd7e, 0x06E04}, /* PS.INST_MEM[897] */
+ {0xd7f, 0x06E08}, /* PS.INST_MEM[898] */
+ {0xd80, 0x06E0C}, /* PS.INST_MEM[899] */
+ {0xd81, 0x06E10}, /* PS.INST_MEM[900] */
+ {0xd82, 0x06E14}, /* PS.INST_MEM[901] */
+ {0xd83, 0x06E18}, /* PS.INST_MEM[902] */
+ {0xd84, 0x06E1C}, /* PS.INST_MEM[903] */
+ {0xd85, 0x06E20}, /* PS.INST_MEM[904] */
+ {0xd86, 0x06E24}, /* PS.INST_MEM[905] */
+ {0xd87, 0x06E28}, /* PS.INST_MEM[906] */
+ {0xd88, 0x06E2C}, /* PS.INST_MEM[907] */
+ {0xd89, 0x06E30}, /* PS.INST_MEM[908] */
+ {0xd8a, 0x06E34}, /* PS.INST_MEM[909] */
+ {0xd8b, 0x06E38}, /* PS.INST_MEM[910] */
+ {0xd8c, 0x06E3C}, /* PS.INST_MEM[911] */
+ {0xd8d, 0x06E40}, /* PS.INST_MEM[912] */
+ {0xd8e, 0x06E44}, /* PS.INST_MEM[913] */
+ {0xd8f, 0x06E48}, /* PS.INST_MEM[914] */
+ {0xd90, 0x06E4C}, /* PS.INST_MEM[915] */
+ {0xd91, 0x06E50}, /* PS.INST_MEM[916] */
+ {0xd92, 0x06E54}, /* PS.INST_MEM[917] */
+ {0xd93, 0x06E58}, /* PS.INST_MEM[918] */
+ {0xd94, 0x06E5C}, /* PS.INST_MEM[919] */
+ {0xd95, 0x06E60}, /* PS.INST_MEM[920] */
+ {0xd96, 0x06E64}, /* PS.INST_MEM[921] */
+ {0xd97, 0x06E68}, /* PS.INST_MEM[922] */
+ {0xd98, 0x06E6C}, /* PS.INST_MEM[923] */
+ {0xd99, 0x06E70}, /* PS.INST_MEM[924] */
+ {0xd9a, 0x06E74}, /* PS.INST_MEM[925] */
+ {0xd9b, 0x06E78}, /* PS.INST_MEM[926] */
+ {0xd9c, 0x06E7C}, /* PS.INST_MEM[927] */
+ {0xd9d, 0x06E80}, /* PS.INST_MEM[928] */
+ {0xd9e, 0x06E84}, /* PS.INST_MEM[929] */
+ {0xd9f, 0x06E88}, /* PS.INST_MEM[930] */
+ {0xda0, 0x06E8C}, /* PS.INST_MEM[931] */
+ {0xda1, 0x06E90}, /* PS.INST_MEM[932] */
+ {0xda2, 0x06E94}, /* PS.INST_MEM[933] */
+ {0xda3, 0x06E98}, /* PS.INST_MEM[934] */
+ {0xda4, 0x06E9C}, /* PS.INST_MEM[935] */
+ {0xda5, 0x06EA0}, /* PS.INST_MEM[936] */
+ {0xda6, 0x06EA4}, /* PS.INST_MEM[937] */
+ {0xda7, 0x06EA8}, /* PS.INST_MEM[938] */
+ {0xda8, 0x06EAC}, /* PS.INST_MEM[939] */
+ {0xda9, 0x06EB0}, /* PS.INST_MEM[940] */
+ {0xdaa, 0x06EB4}, /* PS.INST_MEM[941] */
+ {0xdab, 0x06EB8}, /* PS.INST_MEM[942] */
+ {0xdac, 0x06EBC}, /* PS.INST_MEM[943] */
+ {0xdad, 0x06EC0}, /* PS.INST_MEM[944] */
+ {0xdae, 0x06EC4}, /* PS.INST_MEM[945] */
+ {0xdaf, 0x06EC8}, /* PS.INST_MEM[946] */
+ {0xdb0, 0x06ECC}, /* PS.INST_MEM[947] */
+ {0xdb1, 0x06ED0}, /* PS.INST_MEM[948] */
+ {0xdb2, 0x06ED4}, /* PS.INST_MEM[949] */
+ {0xdb3, 0x06ED8}, /* PS.INST_MEM[950] */
+ {0xdb4, 0x06EDC}, /* PS.INST_MEM[951] */
+ {0xdb5, 0x06EE0}, /* PS.INST_MEM[952] */
+ {0xdb6, 0x06EE4}, /* PS.INST_MEM[953] */
+ {0xdb7, 0x06EE8}, /* PS.INST_MEM[954] */
+ {0xdb8, 0x06EEC}, /* PS.INST_MEM[955] */
+ {0xdb9, 0x06EF0}, /* PS.INST_MEM[956] */
+ {0xdba, 0x06EF4}, /* PS.INST_MEM[957] */
+ {0xdbb, 0x06EF8}, /* PS.INST_MEM[958] */
+ {0xdbc, 0x06EFC}, /* PS.INST_MEM[959] */
+ {0xdbd, 0x06F00}, /* PS.INST_MEM[960] */
+ {0xdbe, 0x06F04}, /* PS.INST_MEM[961] */
+ {0xdbf, 0x06F08}, /* PS.INST_MEM[962] */
+ {0xdc0, 0x06F0C}, /* PS.INST_MEM[963] */
+ {0xdc1, 0x06F10}, /* PS.INST_MEM[964] */
+ {0xdc2, 0x06F14}, /* PS.INST_MEM[965] */
+ {0xdc3, 0x06F18}, /* PS.INST_MEM[966] */
+ {0xdc4, 0x06F1C}, /* PS.INST_MEM[967] */
+ {0xdc5, 0x06F20}, /* PS.INST_MEM[968] */
+ {0xdc6, 0x06F24}, /* PS.INST_MEM[969] */
+ {0xdc7, 0x06F28}, /* PS.INST_MEM[970] */
+ {0xdc8, 0x06F2C}, /* PS.INST_MEM[971] */
+ {0xdc9, 0x06F30}, /* PS.INST_MEM[972] */
+ {0xdca, 0x06F34}, /* PS.INST_MEM[973] */
+ {0xdcb, 0x06F38}, /* PS.INST_MEM[974] */
+ {0xdcc, 0x06F3C}, /* PS.INST_MEM[975] */
+ {0xdcd, 0x06F40}, /* PS.INST_MEM[976] */
+ {0xdce, 0x06F44}, /* PS.INST_MEM[977] */
+ {0xdcf, 0x06F48}, /* PS.INST_MEM[978] */
+ {0xdd0, 0x06F4C}, /* PS.INST_MEM[979] */
+ {0xdd1, 0x06F50}, /* PS.INST_MEM[980] */
+ {0xdd2, 0x06F54}, /* PS.INST_MEM[981] */
+ {0xdd3, 0x06F58}, /* PS.INST_MEM[982] */
+ {0xdd4, 0x06F5C}, /* PS.INST_MEM[983] */
+ {0xdd5, 0x06F60}, /* PS.INST_MEM[984] */
+ {0xdd6, 0x06F64}, /* PS.INST_MEM[985] */
+ {0xdd7, 0x06F68}, /* PS.INST_MEM[986] */
+ {0xdd8, 0x06F6C}, /* PS.INST_MEM[987] */
+ {0xdd9, 0x06F70}, /* PS.INST_MEM[988] */
+ {0xdda, 0x06F74}, /* PS.INST_MEM[989] */
+ {0xddb, 0x06F78}, /* PS.INST_MEM[990] */
+ {0xddc, 0x06F7C}, /* PS.INST_MEM[991] */
+ {0xddd, 0x06F80}, /* PS.INST_MEM[992] */
+ {0xdde, 0x06F84}, /* PS.INST_MEM[993] */
+ {0xddf, 0x06F88}, /* PS.INST_MEM[994] */
+ {0xde0, 0x06F8C}, /* PS.INST_MEM[995] */
+ {0xde1, 0x06F90}, /* PS.INST_MEM[996] */
+ {0xde2, 0x06F94}, /* PS.INST_MEM[997] */
+ {0xde3, 0x06F98}, /* PS.INST_MEM[998] */
+ {0xde4, 0x06F9C}, /* PS.INST_MEM[999] */
+ {0xde5, 0x06FA0}, /* PS.INST_MEM[1000] */
+ {0xde6, 0x06FA4}, /* PS.INST_MEM[1001] */
+ {0xde7, 0x06FA8}, /* PS.INST_MEM[1002] */
+ {0xde8, 0x06FAC}, /* PS.INST_MEM[1003] */
+ {0xde9, 0x06FB0}, /* PS.INST_MEM[1004] */
+ {0xdea, 0x06FB4}, /* PS.INST_MEM[1005] */
+ {0xdeb, 0x06FB8}, /* PS.INST_MEM[1006] */
+ {0xdec, 0x06FBC}, /* PS.INST_MEM[1007] */
+ {0xded, 0x06FC0}, /* PS.INST_MEM[1008] */
+ {0xdee, 0x06FC4}, /* PS.INST_MEM[1009] */
+ {0xdef, 0x06FC8}, /* PS.INST_MEM[1010] */
+ {0xdf0, 0x06FCC}, /* PS.INST_MEM[1011] */
+ {0xdf1, 0x06FD0}, /* PS.INST_MEM[1012] */
+ {0xdf2, 0x06FD4}, /* PS.INST_MEM[1013] */
+ {0xdf3, 0x06FD8}, /* PS.INST_MEM[1014] */
+ {0xdf4, 0x06FDC}, /* PS.INST_MEM[1015] */
+ {0xdf5, 0x06FE0}, /* PS.INST_MEM[1016] */
+ {0xdf6, 0x06FE4}, /* PS.INST_MEM[1017] */
+ {0xdf7, 0x06FE8}, /* PS.INST_MEM[1018] */
+ {0xdf8, 0x06FEC}, /* PS.INST_MEM[1019] */
+ {0xdf9, 0x06FF0}, /* PS.INST_MEM[1020] */
+ {0xdfa, 0x06FF4}, /* PS.INST_MEM[1021] */
+ {0xdfb, 0x06FF8}, /* PS.INST_MEM[1022] */
+ {0xdfc, 0x06FFC}, /* PS.INST_MEM[1023] */
+ {0xdff, 0x07000}, /* PS.UNIFORMS[0] */
+ {0xe00, 0x07004}, /* PS.UNIFORMS[1] */
+ {0xe01, 0x07008}, /* PS.UNIFORMS[2] */
+ {0xe02, 0x0700C}, /* PS.UNIFORMS[3] */
+ {0xe03, 0x07010}, /* PS.UNIFORMS[4] */
+ {0xe04, 0x07014}, /* PS.UNIFORMS[5] */
+ {0xe05, 0x07018}, /* PS.UNIFORMS[6] */
+ {0xe06, 0x0701C}, /* PS.UNIFORMS[7] */
+ {0xe07, 0x07020}, /* PS.UNIFORMS[8] */
+ {0xe08, 0x07024}, /* PS.UNIFORMS[9] */
+ {0xe09, 0x07028}, /* PS.UNIFORMS[10] */
+ {0xe0a, 0x0702C}, /* PS.UNIFORMS[11] */
+ {0xe0b, 0x07030}, /* PS.UNIFORMS[12] */
+ {0xe0c, 0x07034}, /* PS.UNIFORMS[13] */
+ {0xe0d, 0x07038}, /* PS.UNIFORMS[14] */
+ {0xe0e, 0x0703C}, /* PS.UNIFORMS[15] */
+ {0xe0f, 0x07040}, /* PS.UNIFORMS[16] */
+ {0xe10, 0x07044}, /* PS.UNIFORMS[17] */
+ {0xe11, 0x07048}, /* PS.UNIFORMS[18] */
+ {0xe12, 0x0704C}, /* PS.UNIFORMS[19] */
+ {0xe13, 0x07050}, /* PS.UNIFORMS[20] */
+ {0xe14, 0x07054}, /* PS.UNIFORMS[21] */
+ {0xe15, 0x07058}, /* PS.UNIFORMS[22] */
+ {0xe16, 0x0705C}, /* PS.UNIFORMS[23] */
+ {0xe17, 0x07060}, /* PS.UNIFORMS[24] */
+ {0xe18, 0x07064}, /* PS.UNIFORMS[25] */
+ {0xe19, 0x07068}, /* PS.UNIFORMS[26] */
+ {0xe1a, 0x0706C}, /* PS.UNIFORMS[27] */
+ {0xe1b, 0x07070}, /* PS.UNIFORMS[28] */
+ {0xe1c, 0x07074}, /* PS.UNIFORMS[29] */
+ {0xe1d, 0x07078}, /* PS.UNIFORMS[30] */
+ {0xe1e, 0x0707C}, /* PS.UNIFORMS[31] */
+ {0xe1f, 0x07080}, /* PS.UNIFORMS[32] */
+ {0xe20, 0x07084}, /* PS.UNIFORMS[33] */
+ {0xe21, 0x07088}, /* PS.UNIFORMS[34] */
+ {0xe22, 0x0708C}, /* PS.UNIFORMS[35] */
+ {0xe23, 0x07090}, /* PS.UNIFORMS[36] */
+ {0xe24, 0x07094}, /* PS.UNIFORMS[37] */
+ {0xe25, 0x07098}, /* PS.UNIFORMS[38] */
+ {0xe26, 0x0709C}, /* PS.UNIFORMS[39] */
+ {0xe27, 0x070A0}, /* PS.UNIFORMS[40] */
+ {0xe28, 0x070A4}, /* PS.UNIFORMS[41] */
+ {0xe29, 0x070A8}, /* PS.UNIFORMS[42] */
+ {0xe2a, 0x070AC}, /* PS.UNIFORMS[43] */
+ {0xe2b, 0x070B0}, /* PS.UNIFORMS[44] */
+ {0xe2c, 0x070B4}, /* PS.UNIFORMS[45] */
+ {0xe2d, 0x070B8}, /* PS.UNIFORMS[46] */
+ {0xe2e, 0x070BC}, /* PS.UNIFORMS[47] */
+ {0xe2f, 0x070C0}, /* PS.UNIFORMS[48] */
+ {0xe30, 0x070C4}, /* PS.UNIFORMS[49] */
+ {0xe31, 0x070C8}, /* PS.UNIFORMS[50] */
+ {0xe32, 0x070CC}, /* PS.UNIFORMS[51] */
+ {0xe33, 0x070D0}, /* PS.UNIFORMS[52] */
+ {0xe34, 0x070D4}, /* PS.UNIFORMS[53] */
+ {0xe35, 0x070D8}, /* PS.UNIFORMS[54] */
+ {0xe36, 0x070DC}, /* PS.UNIFORMS[55] */
+ {0xe37, 0x070E0}, /* PS.UNIFORMS[56] */
+ {0xe38, 0x070E4}, /* PS.UNIFORMS[57] */
+ {0xe39, 0x070E8}, /* PS.UNIFORMS[58] */
+ {0xe3a, 0x070EC}, /* PS.UNIFORMS[59] */
+ {0xe3b, 0x070F0}, /* PS.UNIFORMS[60] */
+ {0xe3c, 0x070F4}, /* PS.UNIFORMS[61] */
+ {0xe3d, 0x070F8}, /* PS.UNIFORMS[62] */
+ {0xe3e, 0x070FC}, /* PS.UNIFORMS[63] */
+ {0xe3f, 0x07100}, /* PS.UNIFORMS[64] */
+ {0xe40, 0x07104}, /* PS.UNIFORMS[65] */
+ {0xe41, 0x07108}, /* PS.UNIFORMS[66] */
+ {0xe42, 0x0710C}, /* PS.UNIFORMS[67] */
+ {0xe43, 0x07110}, /* PS.UNIFORMS[68] */
+ {0xe44, 0x07114}, /* PS.UNIFORMS[69] */
+ {0xe45, 0x07118}, /* PS.UNIFORMS[70] */
+ {0xe46, 0x0711C}, /* PS.UNIFORMS[71] */
+ {0xe47, 0x07120}, /* PS.UNIFORMS[72] */
+ {0xe48, 0x07124}, /* PS.UNIFORMS[73] */
+ {0xe49, 0x07128}, /* PS.UNIFORMS[74] */
+ {0xe4a, 0x0712C}, /* PS.UNIFORMS[75] */
+ {0xe4b, 0x07130}, /* PS.UNIFORMS[76] */
+ {0xe4c, 0x07134}, /* PS.UNIFORMS[77] */
+ {0xe4d, 0x07138}, /* PS.UNIFORMS[78] */
+ {0xe4e, 0x0713C}, /* PS.UNIFORMS[79] */
+ {0xe4f, 0x07140}, /* PS.UNIFORMS[80] */
+ {0xe50, 0x07144}, /* PS.UNIFORMS[81] */
+ {0xe51, 0x07148}, /* PS.UNIFORMS[82] */
+ {0xe52, 0x0714C}, /* PS.UNIFORMS[83] */
+ {0xe53, 0x07150}, /* PS.UNIFORMS[84] */
+ {0xe54, 0x07154}, /* PS.UNIFORMS[85] */
+ {0xe55, 0x07158}, /* PS.UNIFORMS[86] */
+ {0xe56, 0x0715C}, /* PS.UNIFORMS[87] */
+ {0xe57, 0x07160}, /* PS.UNIFORMS[88] */
+ {0xe58, 0x07164}, /* PS.UNIFORMS[89] */
+ {0xe59, 0x07168}, /* PS.UNIFORMS[90] */
+ {0xe5a, 0x0716C}, /* PS.UNIFORMS[91] */
+ {0xe5b, 0x07170}, /* PS.UNIFORMS[92] */
+ {0xe5c, 0x07174}, /* PS.UNIFORMS[93] */
+ {0xe5d, 0x07178}, /* PS.UNIFORMS[94] */
+ {0xe5e, 0x0717C}, /* PS.UNIFORMS[95] */
+ {0xe5f, 0x07180}, /* PS.UNIFORMS[96] */
+ {0xe60, 0x07184}, /* PS.UNIFORMS[97] */
+ {0xe61, 0x07188}, /* PS.UNIFORMS[98] */
+ {0xe62, 0x0718C}, /* PS.UNIFORMS[99] */
+ {0xe63, 0x07190}, /* PS.UNIFORMS[100] */
+ {0xe64, 0x07194}, /* PS.UNIFORMS[101] */
+ {0xe65, 0x07198}, /* PS.UNIFORMS[102] */
+ {0xe66, 0x0719C}, /* PS.UNIFORMS[103] */
+ {0xe67, 0x071A0}, /* PS.UNIFORMS[104] */
+ {0xe68, 0x071A4}, /* PS.UNIFORMS[105] */
+ {0xe69, 0x071A8}, /* PS.UNIFORMS[106] */
+ {0xe6a, 0x071AC}, /* PS.UNIFORMS[107] */
+ {0xe6b, 0x071B0}, /* PS.UNIFORMS[108] */
+ {0xe6c, 0x071B4}, /* PS.UNIFORMS[109] */
+ {0xe6d, 0x071B8}, /* PS.UNIFORMS[110] */
+ {0xe6e, 0x071BC}, /* PS.UNIFORMS[111] */
+ {0xe6f, 0x071C0}, /* PS.UNIFORMS[112] */
+ {0xe70, 0x071C4}, /* PS.UNIFORMS[113] */
+ {0xe71, 0x071C8}, /* PS.UNIFORMS[114] */
+ {0xe72, 0x071CC}, /* PS.UNIFORMS[115] */
+ {0xe73, 0x071D0}, /* PS.UNIFORMS[116] */
+ {0xe74, 0x071D4}, /* PS.UNIFORMS[117] */
+ {0xe75, 0x071D8}, /* PS.UNIFORMS[118] */
+ {0xe76, 0x071DC}, /* PS.UNIFORMS[119] */
+ {0xe77, 0x071E0}, /* PS.UNIFORMS[120] */
+ {0xe78, 0x071E4}, /* PS.UNIFORMS[121] */
+ {0xe79, 0x071E8}, /* PS.UNIFORMS[122] */
+ {0xe7a, 0x071EC}, /* PS.UNIFORMS[123] */
+ {0xe7b, 0x071F0}, /* PS.UNIFORMS[124] */
+ {0xe7c, 0x071F4}, /* PS.UNIFORMS[125] */
+ {0xe7d, 0x071F8}, /* PS.UNIFORMS[126] */
+ {0xe7e, 0x071FC}, /* PS.UNIFORMS[127] */
+ {0xe7f, 0x07200}, /* PS.UNIFORMS[128] */
+ {0xe80, 0x07204}, /* PS.UNIFORMS[129] */
+ {0xe81, 0x07208}, /* PS.UNIFORMS[130] */
+ {0xe82, 0x0720C}, /* PS.UNIFORMS[131] */
+ {0xe83, 0x07210}, /* PS.UNIFORMS[132] */
+ {0xe84, 0x07214}, /* PS.UNIFORMS[133] */
+ {0xe85, 0x07218}, /* PS.UNIFORMS[134] */
+ {0xe86, 0x0721C}, /* PS.UNIFORMS[135] */
+ {0xe87, 0x07220}, /* PS.UNIFORMS[136] */
+ {0xe88, 0x07224}, /* PS.UNIFORMS[137] */
+ {0xe89, 0x07228}, /* PS.UNIFORMS[138] */
+ {0xe8a, 0x0722C}, /* PS.UNIFORMS[139] */
+ {0xe8b, 0x07230}, /* PS.UNIFORMS[140] */
+ {0xe8c, 0x07234}, /* PS.UNIFORMS[141] */
+ {0xe8d, 0x07238}, /* PS.UNIFORMS[142] */
+ {0xe8e, 0x0723C}, /* PS.UNIFORMS[143] */
+ {0xe8f, 0x07240}, /* PS.UNIFORMS[144] */
+ {0xe90, 0x07244}, /* PS.UNIFORMS[145] */
+ {0xe91, 0x07248}, /* PS.UNIFORMS[146] */
+ {0xe92, 0x0724C}, /* PS.UNIFORMS[147] */
+ {0xe93, 0x07250}, /* PS.UNIFORMS[148] */
+ {0xe94, 0x07254}, /* PS.UNIFORMS[149] */
+ {0xe95, 0x07258}, /* PS.UNIFORMS[150] */
+ {0xe96, 0x0725C}, /* PS.UNIFORMS[151] */
+ {0xe97, 0x07260}, /* PS.UNIFORMS[152] */
+ {0xe98, 0x07264}, /* PS.UNIFORMS[153] */
+ {0xe99, 0x07268}, /* PS.UNIFORMS[154] */
+ {0xe9a, 0x0726C}, /* PS.UNIFORMS[155] */
+ {0xe9b, 0x07270}, /* PS.UNIFORMS[156] */
+ {0xe9c, 0x07274}, /* PS.UNIFORMS[157] */
+ {0xe9d, 0x07278}, /* PS.UNIFORMS[158] */
+ {0xe9e, 0x0727C}, /* PS.UNIFORMS[159] */
+ {0xe9f, 0x07280}, /* PS.UNIFORMS[160] */
+ {0xea0, 0x07284}, /* PS.UNIFORMS[161] */
+ {0xea1, 0x07288}, /* PS.UNIFORMS[162] */
+ {0xea2, 0x0728C}, /* PS.UNIFORMS[163] */
+ {0xea3, 0x07290}, /* PS.UNIFORMS[164] */
+ {0xea4, 0x07294}, /* PS.UNIFORMS[165] */
+ {0xea5, 0x07298}, /* PS.UNIFORMS[166] */
+ {0xea6, 0x0729C}, /* PS.UNIFORMS[167] */
+ {0xea7, 0x072A0}, /* PS.UNIFORMS[168] */
+ {0xea8, 0x072A4}, /* PS.UNIFORMS[169] */
+ {0xea9, 0x072A8}, /* PS.UNIFORMS[170] */
+ {0xeaa, 0x072AC}, /* PS.UNIFORMS[171] */
+ {0xeab, 0x072B0}, /* PS.UNIFORMS[172] */
+ {0xeac, 0x072B4}, /* PS.UNIFORMS[173] */
+ {0xead, 0x072B8}, /* PS.UNIFORMS[174] */
+ {0xeae, 0x072BC}, /* PS.UNIFORMS[175] */
+ {0xeaf, 0x072C0}, /* PS.UNIFORMS[176] */
+ {0xeb0, 0x072C4}, /* PS.UNIFORMS[177] */
+ {0xeb1, 0x072C8}, /* PS.UNIFORMS[178] */
+ {0xeb2, 0x072CC}, /* PS.UNIFORMS[179] */
+ {0xeb3, 0x072D0}, /* PS.UNIFORMS[180] */
+ {0xeb4, 0x072D4}, /* PS.UNIFORMS[181] */
+ {0xeb5, 0x072D8}, /* PS.UNIFORMS[182] */
+ {0xeb6, 0x072DC}, /* PS.UNIFORMS[183] */
+ {0xeb7, 0x072E0}, /* PS.UNIFORMS[184] */
+ {0xeb8, 0x072E4}, /* PS.UNIFORMS[185] */
+ {0xeb9, 0x072E8}, /* PS.UNIFORMS[186] */
+ {0xeba, 0x072EC}, /* PS.UNIFORMS[187] */
+ {0xebb, 0x072F0}, /* PS.UNIFORMS[188] */
+ {0xebc, 0x072F4}, /* PS.UNIFORMS[189] */
+ {0xebd, 0x072F8}, /* PS.UNIFORMS[190] */
+ {0xebe, 0x072FC}, /* PS.UNIFORMS[191] */
+ {0xebf, 0x07300}, /* PS.UNIFORMS[192] */
+ {0xec0, 0x07304}, /* PS.UNIFORMS[193] */
+ {0xec1, 0x07308}, /* PS.UNIFORMS[194] */
+ {0xec2, 0x0730C}, /* PS.UNIFORMS[195] */
+ {0xec3, 0x07310}, /* PS.UNIFORMS[196] */
+ {0xec4, 0x07314}, /* PS.UNIFORMS[197] */
+ {0xec5, 0x07318}, /* PS.UNIFORMS[198] */
+ {0xec6, 0x0731C}, /* PS.UNIFORMS[199] */
+ {0xec7, 0x07320}, /* PS.UNIFORMS[200] */
+ {0xec8, 0x07324}, /* PS.UNIFORMS[201] */
+ {0xec9, 0x07328}, /* PS.UNIFORMS[202] */
+ {0xeca, 0x0732C}, /* PS.UNIFORMS[203] */
+ {0xecb, 0x07330}, /* PS.UNIFORMS[204] */
+ {0xecc, 0x07334}, /* PS.UNIFORMS[205] */
+ {0xecd, 0x07338}, /* PS.UNIFORMS[206] */
+ {0xece, 0x0733C}, /* PS.UNIFORMS[207] */
+ {0xecf, 0x07340}, /* PS.UNIFORMS[208] */
+ {0xed0, 0x07344}, /* PS.UNIFORMS[209] */
+ {0xed1, 0x07348}, /* PS.UNIFORMS[210] */
+ {0xed2, 0x0734C}, /* PS.UNIFORMS[211] */
+ {0xed3, 0x07350}, /* PS.UNIFORMS[212] */
+ {0xed4, 0x07354}, /* PS.UNIFORMS[213] */
+ {0xed5, 0x07358}, /* PS.UNIFORMS[214] */
+ {0xed6, 0x0735C}, /* PS.UNIFORMS[215] */
+ {0xed7, 0x07360}, /* PS.UNIFORMS[216] */
+ {0xed8, 0x07364}, /* PS.UNIFORMS[217] */
+ {0xed9, 0x07368}, /* PS.UNIFORMS[218] */
+ {0xeda, 0x0736C}, /* PS.UNIFORMS[219] */
+ {0xedb, 0x07370}, /* PS.UNIFORMS[220] */
+ {0xedc, 0x07374}, /* PS.UNIFORMS[221] */
+ {0xedd, 0x07378}, /* PS.UNIFORMS[222] */
+ {0xede, 0x0737C}, /* PS.UNIFORMS[223] */
+ {0xedf, 0x07380}, /* PS.UNIFORMS[224] */
+ {0xee0, 0x07384}, /* PS.UNIFORMS[225] */
+ {0xee1, 0x07388}, /* PS.UNIFORMS[226] */
+ {0xee2, 0x0738C}, /* PS.UNIFORMS[227] */
+ {0xee3, 0x07390}, /* PS.UNIFORMS[228] */
+ {0xee4, 0x07394}, /* PS.UNIFORMS[229] */
+ {0xee5, 0x07398}, /* PS.UNIFORMS[230] */
+ {0xee6, 0x0739C}, /* PS.UNIFORMS[231] */
+ {0xee7, 0x073A0}, /* PS.UNIFORMS[232] */
+ {0xee8, 0x073A4}, /* PS.UNIFORMS[233] */
+ {0xee9, 0x073A8}, /* PS.UNIFORMS[234] */
+ {0xeea, 0x073AC}, /* PS.UNIFORMS[235] */
+ {0xeeb, 0x073B0}, /* PS.UNIFORMS[236] */
+ {0xeec, 0x073B4}, /* PS.UNIFORMS[237] */
+ {0xeed, 0x073B8}, /* PS.UNIFORMS[238] */
+ {0xeee, 0x073BC}, /* PS.UNIFORMS[239] */
+ {0xeef, 0x073C0}, /* PS.UNIFORMS[240] */
+ {0xef0, 0x073C4}, /* PS.UNIFORMS[241] */
+ {0xef1, 0x073C8}, /* PS.UNIFORMS[242] */
+ {0xef2, 0x073CC}, /* PS.UNIFORMS[243] */
+ {0xef3, 0x073D0}, /* PS.UNIFORMS[244] */
+ {0xef4, 0x073D4}, /* PS.UNIFORMS[245] */
+ {0xef5, 0x073D8}, /* PS.UNIFORMS[246] */
+ {0xef6, 0x073DC}, /* PS.UNIFORMS[247] */
+ {0xef7, 0x073E0}, /* PS.UNIFORMS[248] */
+ {0xef8, 0x073E4}, /* PS.UNIFORMS[249] */
+ {0xef9, 0x073E8}, /* PS.UNIFORMS[250] */
+ {0xefa, 0x073EC}, /* PS.UNIFORMS[251] */
+ {0xefb, 0x073F0}, /* PS.UNIFORMS[252] */
+ {0xefc, 0x073F4}, /* PS.UNIFORMS[253] */
+ {0xefd, 0x073F8}, /* PS.UNIFORMS[254] */
+ {0xefe, 0x073FC} /* PS.UNIFORMS[255] */
+};
+
+uint32_t contextbuf[] = {
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000007, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=1,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000701, /* GLOBAL.SEMAPHORE_TOKEN := FROM=FE,TO=PE */
+ 0x48000000, /* STALL (9) */
+ 0x00000701, /* */
+ 0x08010e00, /* LOAD_STATE (1) Base: 0x03800 Size: 1 Fixp: 0 */
+ 0x00000001, /* GLOBAL.PIPE_SELECT := PIPE=PIPE_2D */
+ 0x080f0480, /* LOAD_STATE (1) Base: 0x01200 Size: 15 Fixp: 0 */
+ 0x00000000, /* DE.SOURCE_ADDR := 0x0 */
+ 0x00000000, /* DE.SOURCE_STRIDE := 0x0 */
+ 0x00000000, /* DE.SOURCE_ROTATION_CONFIG := 0x0 */
+ 0x00000000, /* DE.SOURCE_TILING_CONFIG := 0x0 */
+ 0x00000000, /* DE.SOURCE_RECT_BASE := 0x0 */
+ 0x00000000, /* DE.SOURCE_RECT_SIZE := 0x0 */
+ 0x00000000, /* DE.SOURCE_BG_COLOR := 0x0 */
+ 0x00000000, /* DE.SOURCE_FG_COLOR := 0x0 */
+ 0x00000000, /* DE.HOR_STRETCH_FACTOR := 0x0 */
+ 0x00000000, /* DE.VERT_STRETCH_FACTOR := 0x0 */
+ 0x00000000, /* DE.DEST_ADDR := 0x0 */
+ 0x00000000, /* DE.DEST_STRIDE := 0x0 */
+ 0x00000000, /* DE.DEST_ROTATION_CONFIG := 0x0 */
+ 0x00000000, /* DE.DEST_FLAGS := 0x0 */
+ 0x00000000, /* DE.PATTERN_ADDR := 0x0 */
+ 0x08060490, /* LOAD_STATE (1) Base: 0x01240 Size: 6 Fixp: 0 */
+ 0x00000000, /* DE.PATTERN_DATA_LOW := 0x0 */
+ 0x00000000, /* DE.PATTERN_DATA_HIGH := 0x0 */
+ 0xffffffff, /* DE.PATTERN_MASK_LOW := 0xffffffff */
+ 0xffffffff, /* DE.PATTERN_MASK_HIGH := 0xffffffff */
+ 0x00000000, /* DE.PATTERN_BG_COLOR := 0x0 */
+ 0x00000000, /* DE.PATTERN_FG_COLOR := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x0801048f, /* LOAD_STATE (1) Base: 0x0123C Size: 1 Fixp: 0 */
+ 0x00000000, /* DE.PATTERN_CONFIG := 0x0 */
+ 0x08010496, /* LOAD_STATE (1) Base: 0x01258 Size: 1 Fixp: 0 */
+ 0x00000000, /* DE.UNK01258 := 0x0 */
+ 0x08800600, /* LOAD_STATE (1) Base: 0x01800 Size: 128 Fixp: 0 */
+ 0x00000000, /* DE.CROSS_KERNEL[0] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[1] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[2] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[3] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[4] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[5] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[6] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[7] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[8] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[9] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[10] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[11] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[12] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[13] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[14] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[15] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[16] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[17] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[18] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[19] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[20] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[21] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[22] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[23] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[24] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[25] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[26] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[27] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[28] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[29] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[30] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[31] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[32] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[33] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[34] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[35] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[36] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[37] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[38] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[39] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[40] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[41] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[42] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[43] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[44] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[45] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[46] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[47] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[48] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[49] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[50] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[51] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[52] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[53] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[54] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[55] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[56] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[57] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[58] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[59] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[60] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[61] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[62] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[63] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[64] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[65] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[66] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[67] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[68] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[69] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[70] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[71] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[72] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[73] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[74] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[75] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[76] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[77] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[78] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[79] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[80] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[81] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[82] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[83] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[84] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[85] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[86] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[87] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[88] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[89] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[90] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[91] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[92] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[93] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[94] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[95] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[96] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[97] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[98] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[99] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[100] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[101] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[102] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[103] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[104] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[105] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[106] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[107] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[108] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[109] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[110] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[111] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[112] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[113] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[114] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[115] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[116] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[117] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[118] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[119] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[120] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[121] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[122] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[123] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[124] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[125] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[126] := 0x0 */
+ 0x00000000, /* DE.CROSS_KERNEL[127] := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x09000700, /* LOAD_STATE (1) Base: 0x01C00 Size: 256 Fixp: 0 */
+ 0x00000000, /* DE.PALETTE[0] := 0x0 */
+ 0x00000000, /* DE.PALETTE[1] := 0x0 */
+ 0x00000000, /* DE.PALETTE[2] := 0x0 */
+ 0x00000000, /* DE.PALETTE[3] := 0x0 */
+ 0x00000000, /* DE.PALETTE[4] := 0x0 */
+ 0x00000000, /* DE.PALETTE[5] := 0x0 */
+ 0x00000000, /* DE.PALETTE[6] := 0x0 */
+ 0x00000000, /* DE.PALETTE[7] := 0x0 */
+ 0x00000000, /* DE.PALETTE[8] := 0x0 */
+ 0x00000000, /* DE.PALETTE[9] := 0x0 */
+ 0x00000000, /* DE.PALETTE[10] := 0x0 */
+ 0x00000000, /* DE.PALETTE[11] := 0x0 */
+ 0x00000000, /* DE.PALETTE[12] := 0x0 */
+ 0x00000000, /* DE.PALETTE[13] := 0x0 */
+ 0x00000000, /* DE.PALETTE[14] := 0x0 */
+ 0x00000000, /* DE.PALETTE[15] := 0x0 */
+ 0x00000000, /* DE.PALETTE[16] := 0x0 */
+ 0x00000000, /* DE.PALETTE[17] := 0x0 */
+ 0x00000000, /* DE.PALETTE[18] := 0x0 */
+ 0x00000000, /* DE.PALETTE[19] := 0x0 */
+ 0x00000000, /* DE.PALETTE[20] := 0x0 */
+ 0x00000000, /* DE.PALETTE[21] := 0x0 */
+ 0x00000000, /* DE.PALETTE[22] := 0x0 */
+ 0x00000000, /* DE.PALETTE[23] := 0x0 */
+ 0x00000000, /* DE.PALETTE[24] := 0x0 */
+ 0x00000000, /* DE.PALETTE[25] := 0x0 */
+ 0x00000000, /* DE.PALETTE[26] := 0x0 */
+ 0x00000000, /* DE.PALETTE[27] := 0x0 */
+ 0x00000000, /* DE.PALETTE[28] := 0x0 */
+ 0x00000000, /* DE.PALETTE[29] := 0x0 */
+ 0x00000000, /* DE.PALETTE[30] := 0x0 */
+ 0x00000000, /* DE.PALETTE[31] := 0x0 */
+ 0x00000000, /* DE.PALETTE[32] := 0x0 */
+ 0x00000000, /* DE.PALETTE[33] := 0x0 */
+ 0x00000000, /* DE.PALETTE[34] := 0x0 */
+ 0x00000000, /* DE.PALETTE[35] := 0x0 */
+ 0x00000000, /* DE.PALETTE[36] := 0x0 */
+ 0x00000000, /* DE.PALETTE[37] := 0x0 */
+ 0x00000000, /* DE.PALETTE[38] := 0x0 */
+ 0x00000000, /* DE.PALETTE[39] := 0x0 */
+ 0x00000000, /* DE.PALETTE[40] := 0x0 */
+ 0x00000000, /* DE.PALETTE[41] := 0x0 */
+ 0x00000000, /* DE.PALETTE[42] := 0x0 */
+ 0x00000000, /* DE.PALETTE[43] := 0x0 */
+ 0x00000000, /* DE.PALETTE[44] := 0x0 */
+ 0x00000000, /* DE.PALETTE[45] := 0x0 */
+ 0x00000000, /* DE.PALETTE[46] := 0x0 */
+ 0x00000000, /* DE.PALETTE[47] := 0x0 */
+ 0x00000000, /* DE.PALETTE[48] := 0x0 */
+ 0x00000000, /* DE.PALETTE[49] := 0x0 */
+ 0x00000000, /* DE.PALETTE[50] := 0x0 */
+ 0x00000000, /* DE.PALETTE[51] := 0x0 */
+ 0x00000000, /* DE.PALETTE[52] := 0x0 */
+ 0x00000000, /* DE.PALETTE[53] := 0x0 */
+ 0x00000000, /* DE.PALETTE[54] := 0x0 */
+ 0x00000000, /* DE.PALETTE[55] := 0x0 */
+ 0x00000000, /* DE.PALETTE[56] := 0x0 */
+ 0x00000000, /* DE.PALETTE[57] := 0x0 */
+ 0x00000000, /* DE.PALETTE[58] := 0x0 */
+ 0x00000000, /* DE.PALETTE[59] := 0x0 */
+ 0x00000000, /* DE.PALETTE[60] := 0x0 */
+ 0x00000000, /* DE.PALETTE[61] := 0x0 */
+ 0x00000000, /* DE.PALETTE[62] := 0x0 */
+ 0x00000000, /* DE.PALETTE[63] := 0x0 */
+ 0x00000000, /* DE.PALETTE[64] := 0x0 */
+ 0x00000000, /* DE.PALETTE[65] := 0x0 */
+ 0x00000000, /* DE.PALETTE[66] := 0x0 */
+ 0x00000000, /* DE.PALETTE[67] := 0x0 */
+ 0x00000000, /* DE.PALETTE[68] := 0x0 */
+ 0x00000000, /* DE.PALETTE[69] := 0x0 */
+ 0x00000000, /* DE.PALETTE[70] := 0x0 */
+ 0x00000000, /* DE.PALETTE[71] := 0x0 */
+ 0x00000000, /* DE.PALETTE[72] := 0x0 */
+ 0x00000000, /* DE.PALETTE[73] := 0x0 */
+ 0x00000000, /* DE.PALETTE[74] := 0x0 */
+ 0x00000000, /* DE.PALETTE[75] := 0x0 */
+ 0x00000000, /* DE.PALETTE[76] := 0x0 */
+ 0x00000000, /* DE.PALETTE[77] := 0x0 */
+ 0x00000000, /* DE.PALETTE[78] := 0x0 */
+ 0x00000000, /* DE.PALETTE[79] := 0x0 */
+ 0x00000000, /* DE.PALETTE[80] := 0x0 */
+ 0x00000000, /* DE.PALETTE[81] := 0x0 */
+ 0x00000000, /* DE.PALETTE[82] := 0x0 */
+ 0x00000000, /* DE.PALETTE[83] := 0x0 */
+ 0x00000000, /* DE.PALETTE[84] := 0x0 */
+ 0x00000000, /* DE.PALETTE[85] := 0x0 */
+ 0x00000000, /* DE.PALETTE[86] := 0x0 */
+ 0x00000000, /* DE.PALETTE[87] := 0x0 */
+ 0x00000000, /* DE.PALETTE[88] := 0x0 */
+ 0x00000000, /* DE.PALETTE[89] := 0x0 */
+ 0x00000000, /* DE.PALETTE[90] := 0x0 */
+ 0x00000000, /* DE.PALETTE[91] := 0x0 */
+ 0x00000000, /* DE.PALETTE[92] := 0x0 */
+ 0x00000000, /* DE.PALETTE[93] := 0x0 */
+ 0x00000000, /* DE.PALETTE[94] := 0x0 */
+ 0x00000000, /* DE.PALETTE[95] := 0x0 */
+ 0x00000000, /* DE.PALETTE[96] := 0x0 */
+ 0x00000000, /* DE.PALETTE[97] := 0x0 */
+ 0x00000000, /* DE.PALETTE[98] := 0x0 */
+ 0x00000000, /* DE.PALETTE[99] := 0x0 */
+ 0x00000000, /* DE.PALETTE[100] := 0x0 */
+ 0x00000000, /* DE.PALETTE[101] := 0x0 */
+ 0x00000000, /* DE.PALETTE[102] := 0x0 */
+ 0x00000000, /* DE.PALETTE[103] := 0x0 */
+ 0x00000000, /* DE.PALETTE[104] := 0x0 */
+ 0x00000000, /* DE.PALETTE[105] := 0x0 */
+ 0x00000000, /* DE.PALETTE[106] := 0x0 */
+ 0x00000000, /* DE.PALETTE[107] := 0x0 */
+ 0x00000000, /* DE.PALETTE[108] := 0x0 */
+ 0x00000000, /* DE.PALETTE[109] := 0x0 */
+ 0x00000000, /* DE.PALETTE[110] := 0x0 */
+ 0x00000000, /* DE.PALETTE[111] := 0x0 */
+ 0x00000000, /* DE.PALETTE[112] := 0x0 */
+ 0x00000000, /* DE.PALETTE[113] := 0x0 */
+ 0x00000000, /* DE.PALETTE[114] := 0x0 */
+ 0x00000000, /* DE.PALETTE[115] := 0x0 */
+ 0x00000000, /* DE.PALETTE[116] := 0x0 */
+ 0x00000000, /* DE.PALETTE[117] := 0x0 */
+ 0x00000000, /* DE.PALETTE[118] := 0x0 */
+ 0x00000000, /* DE.PALETTE[119] := 0x0 */
+ 0x00000000, /* DE.PALETTE[120] := 0x0 */
+ 0x00000000, /* DE.PALETTE[121] := 0x0 */
+ 0x00000000, /* DE.PALETTE[122] := 0x0 */
+ 0x00000000, /* DE.PALETTE[123] := 0x0 */
+ 0x00000000, /* DE.PALETTE[124] := 0x0 */
+ 0x00000000, /* DE.PALETTE[125] := 0x0 */
+ 0x00000000, /* DE.PALETTE[126] := 0x0 */
+ 0x00000000, /* DE.PALETTE[127] := 0x0 */
+ 0x00000000, /* DE.PALETTE[128] := 0x0 */
+ 0x00000000, /* DE.PALETTE[129] := 0x0 */
+ 0x00000000, /* DE.PALETTE[130] := 0x0 */
+ 0x00000000, /* DE.PALETTE[131] := 0x0 */
+ 0x00000000, /* DE.PALETTE[132] := 0x0 */
+ 0x00000000, /* DE.PALETTE[133] := 0x0 */
+ 0x00000000, /* DE.PALETTE[134] := 0x0 */
+ 0x00000000, /* DE.PALETTE[135] := 0x0 */
+ 0x00000000, /* DE.PALETTE[136] := 0x0 */
+ 0x00000000, /* DE.PALETTE[137] := 0x0 */
+ 0x00000000, /* DE.PALETTE[138] := 0x0 */
+ 0x00000000, /* DE.PALETTE[139] := 0x0 */
+ 0x00000000, /* DE.PALETTE[140] := 0x0 */
+ 0x00000000, /* DE.PALETTE[141] := 0x0 */
+ 0x00000000, /* DE.PALETTE[142] := 0x0 */
+ 0x00000000, /* DE.PALETTE[143] := 0x0 */
+ 0x00000000, /* DE.PALETTE[144] := 0x0 */
+ 0x00000000, /* DE.PALETTE[145] := 0x0 */
+ 0x00000000, /* DE.PALETTE[146] := 0x0 */
+ 0x00000000, /* DE.PALETTE[147] := 0x0 */
+ 0x00000000, /* DE.PALETTE[148] := 0x0 */
+ 0x00000000, /* DE.PALETTE[149] := 0x0 */
+ 0x00000000, /* DE.PALETTE[150] := 0x0 */
+ 0x00000000, /* DE.PALETTE[151] := 0x0 */
+ 0x00000000, /* DE.PALETTE[152] := 0x0 */
+ 0x00000000, /* DE.PALETTE[153] := 0x0 */
+ 0x00000000, /* DE.PALETTE[154] := 0x0 */
+ 0x00000000, /* DE.PALETTE[155] := 0x0 */
+ 0x00000000, /* DE.PALETTE[156] := 0x0 */
+ 0x00000000, /* DE.PALETTE[157] := 0x0 */
+ 0x00000000, /* DE.PALETTE[158] := 0x0 */
+ 0x00000000, /* DE.PALETTE[159] := 0x0 */
+ 0x00000000, /* DE.PALETTE[160] := 0x0 */
+ 0x00000000, /* DE.PALETTE[161] := 0x0 */
+ 0x00000000, /* DE.PALETTE[162] := 0x0 */
+ 0x00000000, /* DE.PALETTE[163] := 0x0 */
+ 0x00000000, /* DE.PALETTE[164] := 0x0 */
+ 0x00000000, /* DE.PALETTE[165] := 0x0 */
+ 0x00000000, /* DE.PALETTE[166] := 0x0 */
+ 0x00000000, /* DE.PALETTE[167] := 0x0 */
+ 0x00000000, /* DE.PALETTE[168] := 0x0 */
+ 0x00000000, /* DE.PALETTE[169] := 0x0 */
+ 0x00000000, /* DE.PALETTE[170] := 0x0 */
+ 0x00000000, /* DE.PALETTE[171] := 0x0 */
+ 0x00000000, /* DE.PALETTE[172] := 0x0 */
+ 0x00000000, /* DE.PALETTE[173] := 0x0 */
+ 0x00000000, /* DE.PALETTE[174] := 0x0 */
+ 0x00000000, /* DE.PALETTE[175] := 0x0 */
+ 0x00000000, /* DE.PALETTE[176] := 0x0 */
+ 0x00000000, /* DE.PALETTE[177] := 0x0 */
+ 0x00000000, /* DE.PALETTE[178] := 0x0 */
+ 0x00000000, /* DE.PALETTE[179] := 0x0 */
+ 0x00000000, /* DE.PALETTE[180] := 0x0 */
+ 0x00000000, /* DE.PALETTE[181] := 0x0 */
+ 0x00000000, /* DE.PALETTE[182] := 0x0 */
+ 0x00000000, /* DE.PALETTE[183] := 0x0 */
+ 0x00000000, /* DE.PALETTE[184] := 0x0 */
+ 0x00000000, /* DE.PALETTE[185] := 0x0 */
+ 0x00000000, /* DE.PALETTE[186] := 0x0 */
+ 0x00000000, /* DE.PALETTE[187] := 0x0 */
+ 0x00000000, /* DE.PALETTE[188] := 0x0 */
+ 0x00000000, /* DE.PALETTE[189] := 0x0 */
+ 0x00000000, /* DE.PALETTE[190] := 0x0 */
+ 0x00000000, /* DE.PALETTE[191] := 0x0 */
+ 0x00000000, /* DE.PALETTE[192] := 0x0 */
+ 0x00000000, /* DE.PALETTE[193] := 0x0 */
+ 0x00000000, /* DE.PALETTE[194] := 0x0 */
+ 0x00000000, /* DE.PALETTE[195] := 0x0 */
+ 0x00000000, /* DE.PALETTE[196] := 0x0 */
+ 0x00000000, /* DE.PALETTE[197] := 0x0 */
+ 0x00000000, /* DE.PALETTE[198] := 0x0 */
+ 0x00000000, /* DE.PALETTE[199] := 0x0 */
+ 0x00000000, /* DE.PALETTE[200] := 0x0 */
+ 0x00000000, /* DE.PALETTE[201] := 0x0 */
+ 0x00000000, /* DE.PALETTE[202] := 0x0 */
+ 0x00000000, /* DE.PALETTE[203] := 0x0 */
+ 0x00000000, /* DE.PALETTE[204] := 0x0 */
+ 0x00000000, /* DE.PALETTE[205] := 0x0 */
+ 0x00000000, /* DE.PALETTE[206] := 0x0 */
+ 0x00000000, /* DE.PALETTE[207] := 0x0 */
+ 0x00000000, /* DE.PALETTE[208] := 0x0 */
+ 0x00000000, /* DE.PALETTE[209] := 0x0 */
+ 0x00000000, /* DE.PALETTE[210] := 0x0 */
+ 0x00000000, /* DE.PALETTE[211] := 0x0 */
+ 0x00000000, /* DE.PALETTE[212] := 0x0 */
+ 0x00000000, /* DE.PALETTE[213] := 0x0 */
+ 0x00000000, /* DE.PALETTE[214] := 0x0 */
+ 0x00000000, /* DE.PALETTE[215] := 0x0 */
+ 0x00000000, /* DE.PALETTE[216] := 0x0 */
+ 0x00000000, /* DE.PALETTE[217] := 0x0 */
+ 0x00000000, /* DE.PALETTE[218] := 0x0 */
+ 0x00000000, /* DE.PALETTE[219] := 0x0 */
+ 0x00000000, /* DE.PALETTE[220] := 0x0 */
+ 0x00000000, /* DE.PALETTE[221] := 0x0 */
+ 0x00000000, /* DE.PALETTE[222] := 0x0 */
+ 0x00000000, /* DE.PALETTE[223] := 0x0 */
+ 0x00000000, /* DE.PALETTE[224] := 0x0 */
+ 0x00000000, /* DE.PALETTE[225] := 0x0 */
+ 0x00000000, /* DE.PALETTE[226] := 0x0 */
+ 0x00000000, /* DE.PALETTE[227] := 0x0 */
+ 0x00000000, /* DE.PALETTE[228] := 0x0 */
+ 0x00000000, /* DE.PALETTE[229] := 0x0 */
+ 0x00000000, /* DE.PALETTE[230] := 0x0 */
+ 0x00000000, /* DE.PALETTE[231] := 0x0 */
+ 0x00000000, /* DE.PALETTE[232] := 0x0 */
+ 0x00000000, /* DE.PALETTE[233] := 0x0 */
+ 0x00000000, /* DE.PALETTE[234] := 0x0 */
+ 0x00000000, /* DE.PALETTE[235] := 0x0 */
+ 0x00000000, /* DE.PALETTE[236] := 0x0 */
+ 0x00000000, /* DE.PALETTE[237] := 0x0 */
+ 0x00000000, /* DE.PALETTE[238] := 0x0 */
+ 0x00000000, /* DE.PALETTE[239] := 0x0 */
+ 0x00000000, /* DE.PALETTE[240] := 0x0 */
+ 0x00000000, /* DE.PALETTE[241] := 0x0 */
+ 0x00000000, /* DE.PALETTE[242] := 0x0 */
+ 0x00000000, /* DE.PALETTE[243] := 0x0 */
+ 0x00000000, /* DE.PALETTE[244] := 0x0 */
+ 0x00000000, /* DE.PALETTE[245] := 0x0 */
+ 0x00000000, /* DE.PALETTE[246] := 0x0 */
+ 0x00000000, /* DE.PALETTE[247] := 0x0 */
+ 0x00000000, /* DE.PALETTE[248] := 0x0 */
+ 0x00000000, /* DE.PALETTE[249] := 0x0 */
+ 0x00000000, /* DE.PALETTE[250] := 0x0 */
+ 0x00000000, /* DE.PALETTE[251] := 0x0 */
+ 0x00000000, /* DE.PALETTE[252] := 0x0 */
+ 0x00000000, /* DE.PALETTE[253] := 0x0 */
+ 0x00000000, /* DE.PALETTE[254] := 0x0 */
+ 0x00000000, /* DE.PALETTE[255] := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x08040497, /* LOAD_STATE (1) Base: 0x0125C Size: 4 Fixp: 0 */
+ 0x00000000, /* DE.ROP := 0x0 */
+ 0x00000000, /* DE.CLIPPING_LEFT_TOP := 0x0 */
+ 0x00000000, /* DE.CLIPPING_RIGHT_BOTTOM := 0x0 */
+ 0x00000000, /* DE.CLEAR_BYTE_MASK := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x0802049c, /* LOAD_STATE (1) Base: 0x01270 Size: 2 Fixp: 0 */
+ 0x00000000, /* DE.CLEAR_VALUE_LOW := 0x0 */
+ 0x00000000, /* DE.CLEAR_VALUE_HIGH := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x0801049b, /* LOAD_STATE (1) Base: 0x0126C Size: 1 Fixp: 0 */
+ 0x00000000, /* DE.ROTATION_MIRROR := 0x0 */
+ 0x0807049e, /* LOAD_STATE (1) Base: 0x01278 Size: 7 Fixp: 0 */
+ 0x00000000, /* DE.SOURCE_ORIGIN_FRAC := 0x0 */
+ 0x00000000, /* DE.ALPHA_CONTROL := 0x0 */
+ 0x00000000, /* DE.UNK01280 := 0x0 */
+ 0x00000000, /* DE.SOURCE_ADDR_PLANE2 := 0x0 */
+ 0x00000000, /* DE.SOURCE_STRIDE_PLANE2 := 0x0 */
+ 0x00000000, /* DE.SOURCE_ADDR_PLANE3 := 0x0 */
+ 0x00000000, /* DE.SOURCE_STRIDE_PLANE3 := 0x0 */
+ 0x080604a6, /* LOAD_STATE (1) Base: 0x01298 Size: 6 Fixp: 0 */
+ 0x00000000, /* DE.SOURCE_RECT_LEFT_TOP := 0x0 */
+ 0x00000000, /* DE.SOURCE_REFT_RIGHT_BOTTOM := 0x0 */
+ 0x00000000, /* DE.SOURCE_ORIGIN_X := 0x0 */
+ 0x00000000, /* DE.SOURCE_ORIGIN_Y := 0x0 */
+ 0x00000000, /* DE.TARGET_RECT_LEFT_TOP := 0x0 */
+ 0x00000000, /* DE.TARGET_RECT_RIGHT_BOTTOM := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x080104b9, /* LOAD_STATE (1) Base: 0x012E4 Size: 1 Fixp: 0 */
+ 0x00000000, /* DE.BLIT_TYPE_2 := 0x0 */
+ 0x080d04ac, /* LOAD_STATE (1) Base: 0x012B0 Size: 13 Fixp: 0 */
+ 0x00000000, /* DE.UNK012B0 := 0x0 */
+ 0x00000000, /* DE.ROTATION_TARGET_HEIGHT := 0x0 */
+ 0x00000000, /* DE.ROTATION_SOURCE_HEIGHT := 0x0 */
+ 0x00000000, /* DE.MIRROR_EXTENSION := 0x0 */
+ 0x00000000, /* DE.CLEAR_VALUE_LOW := 0x0 */
+ 0x00000000, /* DE.TARGET_COLOR_KEY_LO := 0x0 */
+ 0x00000000, /* DE.SOURCE_GLOBAL_COLOR := 0x0 */
+ 0x00000000, /* DE.TARGET_GLOBAL_COLOR := 0x0 */
+ 0x00000000, /* DE.MULT_MODE := 0x0 */
+ 0x00000000, /* DE.ALPHA_MODE := 0x0 */
+ 0x00000000, /* DE.SOURCE_UV_SWIZ_MODE := 0x0 */
+ 0x00000000, /* DE.SOURCE_COLOR_KEY_HI := 0x0 */
+ 0x00000000, /* DE.TARGET_COLOR_KEY_HI := 0x0 */
+ 0x09000d00, /* LOAD_STATE (1) Base: 0x03400 Size: 256 Fixp: 0 */
+ 0x00000000, /* DE.PALETTE_PE20[0] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[1] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[2] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[3] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[4] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[5] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[6] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[7] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[8] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[9] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[10] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[11] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[12] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[13] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[14] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[15] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[16] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[17] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[18] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[19] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[20] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[21] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[22] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[23] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[24] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[25] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[26] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[27] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[28] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[29] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[30] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[31] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[32] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[33] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[34] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[35] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[36] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[37] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[38] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[39] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[40] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[41] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[42] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[43] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[44] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[45] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[46] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[47] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[48] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[49] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[50] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[51] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[52] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[53] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[54] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[55] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[56] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[57] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[58] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[59] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[60] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[61] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[62] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[63] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[64] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[65] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[66] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[67] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[68] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[69] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[70] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[71] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[72] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[73] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[74] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[75] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[76] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[77] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[78] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[79] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[80] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[81] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[82] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[83] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[84] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[85] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[86] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[87] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[88] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[89] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[90] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[91] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[92] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[93] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[94] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[95] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[96] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[97] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[98] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[99] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[100] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[101] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[102] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[103] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[104] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[105] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[106] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[107] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[108] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[109] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[110] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[111] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[112] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[113] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[114] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[115] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[116] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[117] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[118] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[119] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[120] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[121] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[122] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[123] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[124] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[125] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[126] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[127] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[128] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[129] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[130] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[131] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[132] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[133] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[134] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[135] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[136] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[137] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[138] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[139] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[140] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[141] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[142] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[143] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[144] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[145] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[146] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[147] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[148] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[149] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[150] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[151] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[152] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[153] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[154] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[155] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[156] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[157] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[158] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[159] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[160] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[161] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[162] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[163] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[164] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[165] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[166] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[167] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[168] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[169] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[170] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[171] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[172] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[173] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[174] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[175] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[176] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[177] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[178] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[179] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[180] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[181] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[182] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[183] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[184] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[185] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[186] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[187] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[188] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[189] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[190] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[191] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[192] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[193] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[194] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[195] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[196] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[197] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[198] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[199] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[200] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[201] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[202] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[203] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[204] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[205] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[206] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[207] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[208] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[209] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[210] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[211] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[212] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[213] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[214] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[215] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[216] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[217] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[218] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[219] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[220] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[221] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[222] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[223] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[224] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[225] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[226] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[227] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[228] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[229] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[230] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[231] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[232] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[233] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[234] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[235] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[236] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[237] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[238] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[239] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[240] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[241] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[242] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[243] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[244] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[245] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[246] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[247] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[248] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[249] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[250] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[251] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[252] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[253] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[254] := 0x0 */
+ 0x00000000, /* DE.PALETTE_PE20[255] := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000008, /* GLOBAL.FLUSH_CACHE := DEPTH=0,COLOR=0,3D_TEXTURE=0,2D=1,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000701, /* GLOBAL.SEMAPHORE_TOKEN := FROM=FE,TO=PE */
+ 0x48000000, /* STALL (9) */
+ 0x00000701, /* */
+ 0x08010e00, /* LOAD_STATE (1) Base: 0x03800 Size: 1 Fixp: 0 */
+ 0x00000000, /* GLOBAL.PIPE_SELECT := PIPE=PIPE_3D */
+ 0x08040e05, /* LOAD_STATE (1) Base: 0x03814 Size: 4 Fixp: 0 */
+ 0x00000001, /* GLOBAL.VERTEX_ELEMENT_CONFIG := 0x1 */
+ 0x000000f0, /* GLOBAL.MULTI_SAMPLE_CONFIG := 0xf0 */
+ 0x00000004, /* GLOBAL.VS_VARYING_NUM_COMPONENTS := VAR0=0x4,VAR1=0x0,VAR2=0x0,VAR3=0x0,VAR4=0x0,VAR5=0x0,VAR6=0x0,VAR7=0x0 */
+ 0x00000004, /* GLOBAL.PS_VARYING_NUM_COMPONENTS := VAR0=0x4,VAR1=0x0,VAR2=0x0,VAR3=0x0,VAR4=0x0,VAR5=0x0,VAR6=0x0,VAR7=0x0 */
+ 0xdeaddead, /* PAD */
+ 0x08020e0a, /* LOAD_STATE (1) Base: 0x03828 Size: 2 Fixp: 0 */
+ 0x00000055, /* GLOBAL.PS_VARYING_COMPONENT_USE[0] := COMP0=USED,COMP1=USED,COMP2=USED,COMP3=USED,COMP4=UNUSED,COMP5=UNUSED,COMP6=UNUSED,COMP7=UNUSED,COMP8=UNUSED,COMP9=UNUSED,COMP10=UNUSED,COMP11=UNUSED,COMP12=UNUSED,COMP13=UNUSED,COMP14=UNUSED,COMP15=UNUSED */
+ 0x00000000, /* GLOBAL.PS_VARYING_COMPONENT_USE[1] := COMP0=UNUSED,COMP1=UNUSED,COMP2=UNUSED,COMP3=UNUSED,COMP4=UNUSED,COMP5=UNUSED,COMP6=UNUSED,COMP7=UNUSED,COMP8=UNUSED,COMP9=UNUSED,COMP10=UNUSED,COMP11=UNUSED,COMP12=UNUSED,COMP13=UNUSED,COMP14=UNUSED,COMP15=UNUSED */
+ 0xdeaddead, /* PAD */
+ 0x08030180, /* LOAD_STATE (1) Base: 0x00600 Size: 3 Fixp: 0 */
+ 0x0c003008, /* FE.VERTEX_ELEMENT_CONFIG[0] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x180c3008, /* FE.VERTEX_ELEMENT_CONFIG[1] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0xc,END=0x18 */
+ 0x24183088, /* FE.VERTEX_ELEMENT_CONFIG[2] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0x18,END=0x24 */
+ 0x18000000, /* NOP (3) */
+ 0xdeaddead, /* PAD */
+ 0x18000000, /* NOP (3) */
+ 0xdeaddead, /* PAD */
+ 0x18000000, /* NOP (3) */
+ 0xdeaddead, /* PAD */
+ 0x18000000, /* NOP (3) */
+ 0xdeaddead, /* PAD */
+ 0x18000000, /* NOP (3) */
+ 0xdeaddead, /* PAD */
+ 0x18000000, /* NOP (3) */
+ 0xdeaddead, /* PAD */
+ 0x18000000, /* NOP (3) */
+ 0xdeaddead, /* PAD */
+ 0x08040191, /* LOAD_STATE (1) Base: 0x00644 Size: 4 Fixp: 0 */
+ 0x00000000, /* FE.INDEX_STREAM_BASE_ADDR := *0x0 */
+ 0x00000000, /* FE.INDEX_STREAM_CONTROL := 0x0 */
+ 0x7c24e6f0, /* FE.VERTEX_STREAM_BASE_ADDR := *0x7c24e6f0 */
+ 0x00000024, /* FE.VERTEX_STREAM_CONTROL := VERTEX_STRIDE=0x24 */
+ 0xdeaddead, /* PAD */
+ 0x081001a0, /* LOAD_STATE (1) Base: 0x00680 Size: 16 Fixp: 0 */
+ 0x00000000, /* FE.VERTEX_STREAM[0].BASE_ADDR := *0x0 */
+ 0x00000000, /* FE.VERTEX_STREAM[1].BASE_ADDR := *0x0 */
+ 0x00000000, /* FE.VERTEX_STREAM[2].BASE_ADDR := *0x0 */
+ 0x00000000, /* FE.VERTEX_STREAM[3].BASE_ADDR := *0x0 */
+ 0x00000000, /* FE.VERTEX_STREAM[4].BASE_ADDR := *0x0 */
+ 0x00000000, /* FE.VERTEX_STREAM[5].BASE_ADDR := *0x0 */
+ 0x00000000, /* FE.VERTEX_STREAM[6].BASE_ADDR := *0x0 */
+ 0x00000000, /* FE.VERTEX_STREAM[7].BASE_ADDR := *0x0 */
+ 0x00000000, /* FE.VERTEX_STREAM[0].CONTROL := 0x0 */
+ 0x00000000, /* FE.VERTEX_STREAM[1].CONTROL := 0x0 */
+ 0x00000000, /* FE.VERTEX_STREAM[2].CONTROL := 0x0 */
+ 0x00000000, /* FE.VERTEX_STREAM[3].CONTROL := 0x0 */
+ 0x00000000, /* FE.VERTEX_STREAM[4].CONTROL := 0x0 */
+ 0x00000000, /* FE.VERTEX_STREAM[5].CONTROL := 0x0 */
+ 0x00000000, /* FE.VERTEX_STREAM[6].CONTROL := 0x0 */
+ 0x00000000, /* FE.VERTEX_STREAM[7].CONTROL := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x0801019c, /* LOAD_STATE (1) Base: 0x00670 Size: 1 Fixp: 0 */
+ 0x00000000, /* FE.AUTO_FLUSH := 0x0 */
+ 0x080d0200, /* LOAD_STATE (1) Base: 0x00800 Size: 13 Fixp: 0 */
+ 0x00000018, /* VS.END_PC := 0x18 */
+ 0x00000002, /* VS.OUTPUT_COUNT := 0x2 */
+ 0x00000103, /* VS.INPUT_COUNT := COUNT=0x3,COUNT2=0x1 */
+ 0x00000006, /* VS.TEMP_REGISTER_CONTROL := NUM_TEMPS=0x6 */
+ 0x00000004, /* VS.OUTPUT[0] := 0x4 */
+ 0x00000000, /* VS.OUTPUT[1] := 0x0 */
+ 0x00000000, /* VS.OUTPUT[2] := 0x0 */
+ 0x00000000, /* VS.OUTPUT[3] := 0x0 */
+ 0x00020100, /* VS.INPUT[0] := 0x20100 */
+ 0x00000000, /* VS.INPUT[1] := 0x0 */
+ 0x00000000, /* VS.INPUT[2] := 0x0 */
+ 0x00000000, /* VS.INPUT[3] := 0x0 */
+ 0x0f3f0582, /* VS.LOAD_BALANCING := 0xf3f0582 */
+ 0x0801020e, /* LOAD_STATE (1) Base: 0x00838 Size: 1 Fixp: 0 */
+ 0x00000000, /* VS.START_PC := 0x0 */
+ 0x08001000, /* LOAD_STATE (1) Base: 0x04000 Size: 1024 Fixp: 0 */
+ 0x01831009, /* VS.INST_MEM[0] := 0x1831009 */
+ 0x00000000, /* VS.INST_MEM[1] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[2] := 0x0 */
+ 0x203fc048, /* VS.INST_MEM[3] := 0x203fc048 */
+ 0x02031009, /* VS.INST_MEM[4] := 0x2031009 */
+ 0x00000000, /* VS.INST_MEM[5] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[6] := 0x0 */
+ 0x203fc058, /* VS.INST_MEM[7] := 0x203fc058 */
+ 0x07841003, /* VS.INST_MEM[8] := 0x7841003 */
+ 0x39000800, /* VS.INST_MEM[9] := 0x39000800 */
+ 0x00000050, /* VS.INST_MEM[10] := 0x50 */
+ 0x00000000, /* VS.INST_MEM[11] := 0x0 */
+ 0x07841002, /* VS.INST_MEM[12] := 0x7841002 */
+ 0x39001800, /* VS.INST_MEM[13] := 0x39001800 */
+ 0x00aa0050, /* VS.INST_MEM[14] := 0xaa0050 */
+ 0x00390048, /* VS.INST_MEM[15] := 0x390048 */
+ 0x07841002, /* VS.INST_MEM[16] := 0x7841002 */
+ 0x39002800, /* VS.INST_MEM[17] := 0x39002800 */
+ 0x01540050, /* VS.INST_MEM[18] := 0x1540050 */
+ 0x00390048, /* VS.INST_MEM[19] := 0x390048 */
+ 0x07841002, /* VS.INST_MEM[20] := 0x7841002 */
+ 0x39003800, /* VS.INST_MEM[21] := 0x39003800 */
+ 0x01fe0050, /* VS.INST_MEM[22] := 0x1fe0050 */
+ 0x00390048, /* VS.INST_MEM[23] := 0x390048 */
+ 0x03851003, /* VS.INST_MEM[24] := 0x3851003 */
+ 0x29004800, /* VS.INST_MEM[25] := 0x29004800 */
+ 0x000000d0, /* VS.INST_MEM[26] := 0xd0 */
+ 0x00000000, /* VS.INST_MEM[27] := 0x0 */
+ 0x03851002, /* VS.INST_MEM[28] := 0x3851002 */
+ 0x29005800, /* VS.INST_MEM[29] := 0x29005800 */
+ 0x00aa00d0, /* VS.INST_MEM[30] := 0xaa00d0 */
+ 0x00290058, /* VS.INST_MEM[31] := 0x290058 */
+ 0x03811002, /* VS.INST_MEM[32] := 0x3811002 */
+ 0x29006800, /* VS.INST_MEM[33] := 0x29006800 */
+ 0x015400d0, /* VS.INST_MEM[34] := 0x15400d0 */
+ 0x00290058, /* VS.INST_MEM[35] := 0x290058 */
+ 0x07851003, /* VS.INST_MEM[36] := 0x7851003 */
+ 0x39007800, /* VS.INST_MEM[37] := 0x39007800 */
+ 0x00000050, /* VS.INST_MEM[38] := 0x50 */
+ 0x00000000, /* VS.INST_MEM[39] := 0x0 */
+ 0x07851002, /* VS.INST_MEM[40] := 0x7851002 */
+ 0x39008800, /* VS.INST_MEM[41] := 0x39008800 */
+ 0x00aa0050, /* VS.INST_MEM[42] := 0xaa0050 */
+ 0x00390058, /* VS.INST_MEM[43] := 0x390058 */
+ 0x07851002, /* VS.INST_MEM[44] := 0x7851002 */
+ 0x39009800, /* VS.INST_MEM[45] := 0x39009800 */
+ 0x01540050, /* VS.INST_MEM[46] := 0x1540050 */
+ 0x00390058, /* VS.INST_MEM[47] := 0x390058 */
+ 0x07801002, /* VS.INST_MEM[48] := 0x7801002 */
+ 0x3900a800, /* VS.INST_MEM[49] := 0x3900a800 */
+ 0x01fe0050, /* VS.INST_MEM[50] := 0x1fe0050 */
+ 0x00390058, /* VS.INST_MEM[51] := 0x390058 */
+ 0x0401100c, /* VS.INST_MEM[52] := 0x401100c */
+ 0x00000000, /* VS.INST_MEM[53] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[54] := 0x0 */
+ 0x003fc008, /* VS.INST_MEM[55] := 0x3fc008 */
+ 0x03801002, /* VS.INST_MEM[56] := 0x3801002 */
+ 0x69000800, /* VS.INST_MEM[57] := 0x69000800 */
+ 0x01fe00c0, /* VS.INST_MEM[58] := 0x1fe00c0 */
+ 0x00290038, /* VS.INST_MEM[59] := 0x290038 */
+ 0x03831005, /* VS.INST_MEM[60] := 0x3831005 */
+ 0x29000800, /* VS.INST_MEM[61] := 0x29000800 */
+ 0x01480040, /* VS.INST_MEM[62] := 0x1480040 */
+ 0x00000000, /* VS.INST_MEM[63] := 0x0 */
+ 0x0383100d, /* VS.INST_MEM[64] := 0x383100d */
+ 0x00000000, /* VS.INST_MEM[65] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[66] := 0x0 */
+ 0x00000038, /* VS.INST_MEM[67] := 0x38 */
+ 0x03801003, /* VS.INST_MEM[68] := 0x3801003 */
+ 0x29000800, /* VS.INST_MEM[69] := 0x29000800 */
+ 0x014801c0, /* VS.INST_MEM[70] := 0x14801c0 */
+ 0x00000000, /* VS.INST_MEM[71] := 0x0 */
+ 0x00801005, /* VS.INST_MEM[72] := 0x801005 */
+ 0x29001800, /* VS.INST_MEM[73] := 0x29001800 */
+ 0x01480040, /* VS.INST_MEM[74] := 0x1480040 */
+ 0x00000000, /* VS.INST_MEM[75] := 0x0 */
+ 0x0080108f, /* VS.INST_MEM[76] := 0x80108f */
+ 0x3fc06800, /* VS.INST_MEM[77] := 0x3fc06800 */
+ 0x00000050, /* VS.INST_MEM[78] := 0x50 */
+ 0x203fc068, /* VS.INST_MEM[79] := 0x203fc068 */
+ 0x03801003, /* VS.INST_MEM[80] := 0x3801003 */
+ 0x00000800, /* VS.INST_MEM[81] := 0x800 */
+ 0x01480140, /* VS.INST_MEM[82] := 0x1480140 */
+ 0x00000000, /* VS.INST_MEM[83] := 0x0 */
+ 0x04001009, /* VS.INST_MEM[84] := 0x4001009 */
+ 0x00000000, /* VS.INST_MEM[85] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[86] := 0x0 */
+ 0x200000b8, /* VS.INST_MEM[87] := 0x200000b8 */
+ 0x02041001, /* VS.INST_MEM[88] := 0x2041001 */
+ 0x2a804800, /* VS.INST_MEM[89] := 0x2a804800 */
+ 0x00000000, /* VS.INST_MEM[90] := 0x0 */
+ 0x003fc048, /* VS.INST_MEM[91] := 0x3fc048 */
+ 0x02041003, /* VS.INST_MEM[92] := 0x2041003 */
+ 0x2a804800, /* VS.INST_MEM[93] := 0x2a804800 */
+ 0x00aa05c0, /* VS.INST_MEM[94] := 0xaa05c0 */
+ 0x00000002, /* VS.INST_MEM[95] := 0x2 */
+ 0x00000000, /* VS.INST_MEM[96] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[97] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[98] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[99] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[100] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[101] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[102] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[103] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[104] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[105] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[106] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[107] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[108] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[109] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[110] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[111] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[112] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[113] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[114] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[115] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[116] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[117] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[118] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[119] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[120] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[121] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[122] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[123] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[124] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[125] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[126] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[127] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[128] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[129] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[130] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[131] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[132] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[133] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[134] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[135] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[136] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[137] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[138] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[139] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[140] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[141] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[142] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[143] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[144] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[145] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[146] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[147] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[148] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[149] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[150] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[151] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[152] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[153] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[154] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[155] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[156] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[157] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[158] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[159] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[160] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[161] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[162] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[163] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[164] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[165] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[166] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[167] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[168] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[169] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[170] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[171] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[172] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[173] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[174] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[175] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[176] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[177] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[178] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[179] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[180] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[181] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[182] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[183] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[184] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[185] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[186] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[187] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[188] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[189] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[190] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[191] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[192] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[193] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[194] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[195] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[196] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[197] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[198] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[199] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[200] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[201] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[202] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[203] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[204] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[205] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[206] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[207] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[208] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[209] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[210] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[211] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[212] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[213] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[214] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[215] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[216] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[217] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[218] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[219] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[220] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[221] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[222] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[223] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[224] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[225] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[226] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[227] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[228] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[229] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[230] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[231] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[232] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[233] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[234] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[235] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[236] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[237] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[238] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[239] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[240] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[241] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[242] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[243] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[244] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[245] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[246] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[247] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[248] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[249] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[250] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[251] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[252] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[253] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[254] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[255] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[256] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[257] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[258] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[259] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[260] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[261] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[262] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[263] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[264] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[265] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[266] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[267] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[268] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[269] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[270] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[271] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[272] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[273] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[274] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[275] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[276] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[277] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[278] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[279] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[280] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[281] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[282] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[283] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[284] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[285] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[286] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[287] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[288] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[289] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[290] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[291] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[292] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[293] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[294] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[295] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[296] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[297] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[298] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[299] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[300] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[301] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[302] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[303] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[304] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[305] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[306] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[307] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[308] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[309] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[310] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[311] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[312] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[313] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[314] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[315] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[316] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[317] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[318] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[319] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[320] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[321] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[322] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[323] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[324] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[325] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[326] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[327] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[328] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[329] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[330] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[331] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[332] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[333] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[334] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[335] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[336] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[337] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[338] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[339] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[340] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[341] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[342] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[343] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[344] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[345] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[346] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[347] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[348] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[349] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[350] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[351] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[352] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[353] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[354] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[355] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[356] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[357] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[358] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[359] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[360] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[361] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[362] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[363] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[364] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[365] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[366] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[367] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[368] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[369] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[370] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[371] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[372] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[373] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[374] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[375] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[376] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[377] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[378] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[379] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[380] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[381] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[382] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[383] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[384] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[385] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[386] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[387] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[388] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[389] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[390] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[391] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[392] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[393] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[394] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[395] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[396] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[397] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[398] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[399] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[400] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[401] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[402] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[403] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[404] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[405] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[406] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[407] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[408] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[409] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[410] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[411] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[412] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[413] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[414] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[415] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[416] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[417] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[418] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[419] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[420] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[421] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[422] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[423] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[424] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[425] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[426] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[427] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[428] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[429] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[430] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[431] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[432] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[433] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[434] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[435] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[436] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[437] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[438] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[439] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[440] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[441] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[442] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[443] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[444] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[445] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[446] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[447] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[448] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[449] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[450] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[451] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[452] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[453] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[454] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[455] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[456] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[457] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[458] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[459] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[460] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[461] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[462] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[463] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[464] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[465] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[466] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[467] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[468] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[469] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[470] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[471] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[472] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[473] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[474] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[475] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[476] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[477] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[478] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[479] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[480] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[481] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[482] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[483] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[484] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[485] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[486] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[487] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[488] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[489] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[490] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[491] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[492] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[493] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[494] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[495] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[496] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[497] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[498] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[499] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[500] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[501] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[502] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[503] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[504] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[505] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[506] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[507] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[508] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[509] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[510] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[511] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[512] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[513] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[514] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[515] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[516] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[517] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[518] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[519] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[520] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[521] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[522] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[523] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[524] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[525] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[526] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[527] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[528] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[529] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[530] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[531] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[532] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[533] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[534] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[535] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[536] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[537] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[538] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[539] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[540] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[541] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[542] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[543] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[544] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[545] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[546] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[547] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[548] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[549] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[550] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[551] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[552] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[553] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[554] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[555] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[556] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[557] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[558] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[559] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[560] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[561] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[562] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[563] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[564] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[565] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[566] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[567] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[568] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[569] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[570] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[571] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[572] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[573] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[574] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[575] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[576] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[577] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[578] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[579] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[580] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[581] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[582] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[583] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[584] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[585] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[586] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[587] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[588] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[589] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[590] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[591] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[592] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[593] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[594] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[595] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[596] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[597] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[598] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[599] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[600] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[601] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[602] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[603] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[604] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[605] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[606] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[607] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[608] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[609] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[610] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[611] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[612] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[613] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[614] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[615] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[616] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[617] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[618] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[619] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[620] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[621] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[622] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[623] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[624] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[625] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[626] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[627] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[628] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[629] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[630] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[631] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[632] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[633] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[634] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[635] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[636] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[637] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[638] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[639] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[640] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[641] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[642] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[643] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[644] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[645] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[646] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[647] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[648] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[649] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[650] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[651] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[652] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[653] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[654] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[655] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[656] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[657] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[658] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[659] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[660] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[661] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[662] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[663] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[664] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[665] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[666] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[667] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[668] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[669] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[670] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[671] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[672] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[673] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[674] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[675] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[676] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[677] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[678] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[679] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[680] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[681] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[682] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[683] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[684] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[685] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[686] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[687] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[688] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[689] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[690] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[691] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[692] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[693] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[694] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[695] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[696] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[697] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[698] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[699] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[700] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[701] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[702] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[703] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[704] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[705] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[706] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[707] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[708] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[709] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[710] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[711] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[712] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[713] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[714] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[715] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[716] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[717] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[718] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[719] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[720] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[721] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[722] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[723] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[724] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[725] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[726] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[727] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[728] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[729] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[730] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[731] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[732] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[733] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[734] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[735] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[736] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[737] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[738] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[739] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[740] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[741] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[742] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[743] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[744] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[745] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[746] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[747] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[748] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[749] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[750] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[751] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[752] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[753] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[754] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[755] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[756] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[757] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[758] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[759] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[760] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[761] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[762] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[763] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[764] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[765] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[766] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[767] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[768] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[769] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[770] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[771] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[772] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[773] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[774] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[775] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[776] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[777] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[778] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[779] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[780] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[781] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[782] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[783] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[784] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[785] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[786] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[787] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[788] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[789] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[790] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[791] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[792] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[793] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[794] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[795] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[796] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[797] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[798] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[799] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[800] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[801] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[802] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[803] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[804] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[805] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[806] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[807] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[808] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[809] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[810] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[811] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[812] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[813] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[814] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[815] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[816] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[817] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[818] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[819] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[820] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[821] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[822] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[823] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[824] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[825] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[826] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[827] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[828] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[829] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[830] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[831] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[832] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[833] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[834] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[835] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[836] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[837] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[838] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[839] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[840] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[841] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[842] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[843] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[844] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[845] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[846] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[847] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[848] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[849] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[850] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[851] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[852] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[853] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[854] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[855] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[856] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[857] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[858] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[859] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[860] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[861] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[862] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[863] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[864] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[865] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[866] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[867] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[868] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[869] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[870] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[871] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[872] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[873] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[874] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[875] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[876] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[877] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[878] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[879] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[880] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[881] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[882] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[883] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[884] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[885] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[886] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[887] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[888] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[889] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[890] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[891] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[892] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[893] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[894] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[895] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[896] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[897] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[898] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[899] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[900] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[901] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[902] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[903] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[904] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[905] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[906] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[907] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[908] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[909] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[910] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[911] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[912] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[913] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[914] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[915] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[916] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[917] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[918] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[919] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[920] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[921] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[922] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[923] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[924] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[925] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[926] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[927] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[928] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[929] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[930] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[931] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[932] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[933] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[934] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[935] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[936] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[937] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[938] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[939] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[940] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[941] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[942] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[943] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[944] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[945] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[946] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[947] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[948] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[949] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[950] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[951] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[952] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[953] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[954] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[955] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[956] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[957] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[958] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[959] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[960] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[961] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[962] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[963] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[964] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[965] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[966] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[967] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[968] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[969] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[970] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[971] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[972] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[973] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[974] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[975] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[976] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[977] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[978] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[979] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[980] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[981] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[982] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[983] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[984] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[985] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[986] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[987] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[988] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[989] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[990] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[991] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[992] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[993] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[994] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[995] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[996] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[997] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[998] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[999] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1000] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1001] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1002] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1003] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1004] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1005] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1006] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1007] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1008] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1009] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1010] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1011] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1012] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1013] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1014] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1015] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1016] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1017] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1018] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1019] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1020] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1021] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1022] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[1023] := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x0a801400, /* LOAD_STATE (1) Base: 0x05000 Size: 640 Fixp: 0 */
+ 0x3fbf00b4, /* VS.UNIFORMS[0] := 1.492209 */
+ 0x3fa8f7a3, /* VS.UNIFORMS[1] := 1.320057 */
+ 0xc01d7d33, /* VS.UNIFORMS[2] := -2.460767 */
+ 0xbf1d7d33, /* VS.UNIFORMS[3] := -0.615192 */
+ 0x3e86b73c, /* VS.UNIFORMS[4] := 0.263117 */
+ 0x403303b5, /* VS.UNIFORMS[5] := 2.797101 */
+ 0x401c0ad2, /* VS.UNIFORMS[6] := 2.438160 */
+ 0x3f1c0ad2, /* VS.UNIFORMS[7] := 0.609540 */
+ 0xbfc1f304, /* VS.UNIFORMS[8] := -1.515229 */
+ 0x3fe49248, /* VS.UNIFORMS[9] := 1.785714 */
+ 0xbfffffff, /* VS.UNIFORMS[10] := -2.000000 */
+ 0xbeffffff, /* VS.UNIFORMS[11] := -0.500000 */
+ 0x00000000, /* VS.UNIFORMS[12] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[13] := 0.000000 */
+ 0x40000000, /* VS.UNIFORMS[14] := 2.000000 */
+ 0x41000000, /* VS.UNIFORMS[15] := 8.000000 */
+ 0x3f3244ed, /* VS.UNIFORMS[16] := 0.696364 */
+ 0x3ebd3e50, /* VS.UNIFORMS[17] := 0.369616 */
+ 0x3f1d7d33, /* VS.UNIFORMS[18] := 0.615192 */
+ 0x40000000, /* VS.UNIFORMS[19] := 2.000000 */
+ 0x3dfb782d, /* VS.UNIFORMS[20] := 0.122788 */
+ 0x3f487f08, /* VS.UNIFORMS[21] := 0.783188 */
+ 0xbf1c0ad2, /* VS.UNIFORMS[22] := -0.609540 */
+ 0x41a00000, /* VS.UNIFORMS[23] := 20.000000 */
+ 0xbf3504f3, /* VS.UNIFORMS[24] := -0.707107 */
+ 0x3effffff, /* VS.UNIFORMS[25] := 0.500000 */
+ 0x3effffff, /* VS.UNIFORMS[26] := 0.500000 */
+ 0x00000000, /* VS.UNIFORMS[27] := 0.000000 */
+ 0x3f3244ed, /* VS.UNIFORMS[28] := 0.696364 */
+ 0x3ebd3e50, /* VS.UNIFORMS[29] := 0.369616 */
+ 0x3f1d7d33, /* VS.UNIFORMS[30] := 0.615192 */
+ 0x00000000, /* VS.UNIFORMS[31] := 0.000000 */
+ 0x3dfb782d, /* VS.UNIFORMS[32] := 0.122788 */
+ 0x3f487f08, /* VS.UNIFORMS[33] := 0.783188 */
+ 0xbf1c0ad2, /* VS.UNIFORMS[34] := -0.609540 */
+ 0x00000000, /* VS.UNIFORMS[35] := 0.000000 */
+ 0xbf3504f3, /* VS.UNIFORMS[36] := -0.707107 */
+ 0x3effffff, /* VS.UNIFORMS[37] := 0.500000 */
+ 0x3effffff, /* VS.UNIFORMS[38] := 0.500000 */
+ 0x00000000, /* VS.UNIFORMS[39] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[40] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[41] := 0.000000 */
+ 0xc1000000, /* VS.UNIFORMS[42] := -8.000000 */
+ 0x3f800000, /* VS.UNIFORMS[43] := 1.000000 */
+ 0x3f800000, /* VS.UNIFORMS[44] := 1.000000 */
+ 0x3f000000, /* VS.UNIFORMS[45] := 0.500000 */
+ 0x00000000, /* VS.UNIFORMS[46] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[47] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[48] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[49] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[50] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[51] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[52] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[53] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[54] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[55] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[56] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[57] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[58] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[59] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[60] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[61] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[62] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[63] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[64] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[65] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[66] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[67] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[68] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[69] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[70] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[71] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[72] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[73] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[74] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[75] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[76] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[77] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[78] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[79] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[80] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[81] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[82] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[83] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[84] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[85] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[86] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[87] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[88] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[89] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[90] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[91] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[92] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[93] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[94] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[95] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[96] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[97] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[98] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[99] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[100] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[101] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[102] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[103] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[104] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[105] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[106] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[107] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[108] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[109] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[110] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[111] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[112] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[113] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[114] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[115] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[116] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[117] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[118] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[119] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[120] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[121] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[122] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[123] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[124] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[125] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[126] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[127] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[128] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[129] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[130] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[131] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[132] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[133] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[134] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[135] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[136] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[137] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[138] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[139] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[140] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[141] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[142] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[143] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[144] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[145] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[146] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[147] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[148] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[149] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[150] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[151] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[152] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[153] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[154] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[155] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[156] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[157] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[158] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[159] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[160] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[161] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[162] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[163] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[164] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[165] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[166] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[167] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[168] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[169] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[170] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[171] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[172] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[173] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[174] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[175] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[176] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[177] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[178] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[179] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[180] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[181] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[182] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[183] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[184] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[185] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[186] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[187] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[188] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[189] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[190] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[191] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[192] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[193] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[194] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[195] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[196] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[197] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[198] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[199] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[200] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[201] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[202] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[203] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[204] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[205] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[206] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[207] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[208] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[209] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[210] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[211] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[212] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[213] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[214] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[215] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[216] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[217] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[218] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[219] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[220] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[221] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[222] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[223] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[224] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[225] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[226] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[227] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[228] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[229] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[230] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[231] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[232] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[233] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[234] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[235] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[236] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[237] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[238] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[239] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[240] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[241] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[242] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[243] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[244] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[245] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[246] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[247] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[248] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[249] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[250] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[251] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[252] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[253] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[254] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[255] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[256] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[257] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[258] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[259] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[260] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[261] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[262] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[263] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[264] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[265] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[266] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[267] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[268] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[269] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[270] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[271] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[272] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[273] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[274] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[275] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[276] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[277] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[278] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[279] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[280] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[281] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[282] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[283] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[284] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[285] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[286] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[287] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[288] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[289] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[290] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[291] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[292] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[293] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[294] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[295] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[296] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[297] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[298] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[299] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[300] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[301] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[302] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[303] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[304] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[305] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[306] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[307] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[308] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[309] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[310] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[311] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[312] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[313] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[314] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[315] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[316] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[317] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[318] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[319] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[320] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[321] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[322] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[323] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[324] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[325] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[326] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[327] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[328] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[329] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[330] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[331] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[332] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[333] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[334] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[335] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[336] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[337] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[338] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[339] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[340] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[341] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[342] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[343] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[344] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[345] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[346] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[347] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[348] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[349] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[350] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[351] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[352] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[353] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[354] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[355] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[356] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[357] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[358] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[359] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[360] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[361] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[362] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[363] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[364] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[365] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[366] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[367] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[368] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[369] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[370] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[371] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[372] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[373] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[374] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[375] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[376] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[377] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[378] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[379] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[380] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[381] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[382] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[383] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[384] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[385] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[386] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[387] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[388] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[389] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[390] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[391] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[392] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[393] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[394] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[395] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[396] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[397] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[398] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[399] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[400] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[401] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[402] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[403] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[404] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[405] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[406] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[407] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[408] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[409] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[410] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[411] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[412] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[413] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[414] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[415] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[416] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[417] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[418] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[419] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[420] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[421] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[422] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[423] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[424] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[425] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[426] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[427] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[428] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[429] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[430] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[431] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[432] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[433] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[434] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[435] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[436] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[437] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[438] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[439] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[440] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[441] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[442] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[443] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[444] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[445] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[446] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[447] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[448] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[449] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[450] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[451] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[452] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[453] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[454] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[455] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[456] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[457] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[458] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[459] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[460] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[461] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[462] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[463] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[464] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[465] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[466] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[467] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[468] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[469] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[470] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[471] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[472] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[473] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[474] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[475] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[476] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[477] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[478] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[479] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[480] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[481] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[482] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[483] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[484] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[485] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[486] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[487] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[488] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[489] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[490] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[491] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[492] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[493] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[494] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[495] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[496] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[497] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[498] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[499] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[500] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[501] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[502] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[503] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[504] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[505] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[506] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[507] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[508] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[509] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[510] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[511] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[512] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[513] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[514] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[515] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[516] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[517] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[518] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[519] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[520] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[521] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[522] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[523] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[524] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[525] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[526] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[527] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[528] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[529] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[530] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[531] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[532] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[533] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[534] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[535] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[536] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[537] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[538] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[539] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[540] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[541] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[542] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[543] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[544] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[545] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[546] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[547] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[548] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[549] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[550] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[551] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[552] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[553] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[554] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[555] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[556] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[557] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[558] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[559] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[560] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[561] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[562] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[563] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[564] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[565] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[566] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[567] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[568] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[569] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[570] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[571] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[572] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[573] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[574] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[575] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[576] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[577] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[578] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[579] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[580] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[581] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[582] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[583] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[584] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[585] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[586] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[587] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[588] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[589] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[590] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[591] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[592] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[593] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[594] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[595] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[596] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[597] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[598] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[599] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[600] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[601] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[602] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[603] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[604] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[605] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[606] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[607] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[608] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[609] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[610] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[611] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[612] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[613] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[614] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[615] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[616] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[617] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[618] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[619] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[620] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[621] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[622] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[623] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[624] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[625] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[626] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[627] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[628] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[629] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[630] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[631] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[632] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[633] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[634] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[635] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[636] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[637] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[638] := 0.000000 */
+ 0x00000000, /* VS.UNIFORMS[639] := 0.000000 */
+ 0xdeaddead, /* PAD */
+ 0x08030214, /* LOAD_STATE (1) Base: 0x00850 Size: 3 Fixp: 0 */
+ 0x000003e8, /* VS.UNK00850 := 0x3e8 */
+ 0x00000100, /* VS.UNK00854 := 0x100 */
+ 0x00001005, /* VS.UNK00858 := 0x1005 */
+ 0x0c020280, /* LOAD_STATE (1) Base: 0x00A00 Size: 2 Fixp: 1 */
+ 0x00c80000, /* PA.VIEWPORT_SCALE_X = 200.000000 */
+ 0x00780000, /* PA.VIEWPORT_SCALE_Y = 120.000000 */
+ 0xdeaddead, /* PAD */
+ 0x08010282, /* LOAD_STATE (1) Base: 0x00A08 Size: 1 Fixp: 0 */
+ 0x3f800000, /* PA.VIEWPORT_SCALE_Z := 1.000000 */
+ 0x0c020283, /* LOAD_STATE (1) Base: 0x00A0C Size: 2 Fixp: 1 */
+ 0x00c80000, /* PA.VIEWPORT_OFFSET_X = 200.000000 */
+ 0x00780000, /* PA.VIEWPORT_OFFSET_Y = 120.000000 */
+ 0xdeaddead, /* PAD */
+ 0x08030285, /* LOAD_STATE (1) Base: 0x00A14 Size: 3 Fixp: 0 */
+ 0x00000000, /* PA.VIEWPORT_OFFSET_Z := 0.000000 */
+ 0x00000000, /* PA.LINE_WIDTH := 0x0 */
+ 0x00000000, /* PA.POINT_SIZE := 0x0 */
+ 0x0803028a, /* LOAD_STATE (1) Base: 0x00A28 Size: 3 Fixp: 0 */
+ 0x00000011, /* PA.PA_SYSTEM_MODE := 0x11 */
+ 0x34000001, /* PA.W_CLIP_LIMIT := 0x34000001 */
+ 0x00000100, /* PA.ATTRIBUTE_ELEMENT_COUNT := 0x100 */
+ 0x080a0290, /* LOAD_STATE (1) Base: 0x00A40 Size: 10 Fixp: 0 */
+ 0x00000200, /* PA.SHADER_ATTRIBUTES[0] := 0x200 */
+ 0x00000000, /* PA.SHADER_ATTRIBUTES[1] := 0x0 */
+ 0x00000000, /* PA.SHADER_ATTRIBUTES[2] := 0x0 */
+ 0x00000000, /* PA.SHADER_ATTRIBUTES[3] := 0x0 */
+ 0x00000000, /* PA.SHADER_ATTRIBUTES[4] := 0x0 */
+ 0x00000000, /* PA.SHADER_ATTRIBUTES[5] := 0x0 */
+ 0x00000000, /* PA.SHADER_ATTRIBUTES[6] := 0x0 */
+ 0x00000000, /* PA.SHADER_ATTRIBUTES[7] := 0x0 */
+ 0x00000000, /* PA.SHADER_ATTRIBUTES[8] := 0x0 */
+ 0x00000000, /* PA.SHADER_ATTRIBUTES[9] := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0x00012200, /* PA.CONFIG := UNK0=0,UNK1=0,POINT_SIZE_ENABLE=0,POINT_SIZE_MASK=0,POINT_SPRITE_ENABLE=0,POINT_SPRITE_MASK=0,UNK6=0,UNK7=0,CULL_FACE_MODE=CCW,CULL_FACE_MODE_MASK=0,UNK11=0,FILL_MODE=SOLID,FILL_MODE_MASK=0,UNK15=0,SHADE_MODEL=SMOOTH,SHADE_MODEL_MASK=0,UNK19=0,UNK20=0,UNK21=0,UNK22=0,UNK23=0,UNK24=0,UNK25=0,UNK26=0,UNK27=0,UNK28=0,UNK29=0,UNK30=0,UNK31=0 */
+ 0x0c040300, /* LOAD_STATE (1) Base: 0x00C00 Size: 4 Fixp: 1 */
+ 0x00000000, /* SE.SCISSOR_LEFT = 0.000000 */
+ 0x00000000, /* SE.SCISSOR_TOP = 0.000000 */
+ 0x01900005, /* SE.SCISSOR_RIGHT = 400.000076 */
+ 0x00f00005, /* SE.SCISSOR_BOTTOM = 240.000076 */
+ 0xdeaddead, /* PAD */
+ 0x08030304, /* LOAD_STATE (1) Base: 0x00C10 Size: 3 Fixp: 0 */
+ 0x00000000, /* SE.DEPTH_SCALE := 0x0 */
+ 0x00000000, /* SE.DEPTH_BIAS := 0x0 */
+ 0x00000000, /* SE.LAST_PIXEL_ENABLE := 0x0 */
+ 0x08010380, /* LOAD_STATE (1) Base: 0x00E00 Size: 1 Fixp: 0 */
+ 0x00000001, /* RA.CONTROL := 0x1 */
+ 0x08040384, /* LOAD_STATE (1) Base: 0x00E10 Size: 4 Fixp: 0 */
+ 0x00000000, /* RA.MULTISAMPLE_UNK00E10[0] := 0x0 */
+ 0x00000000, /* RA.MULTISAMPLE_UNK00E10[1] := 0x0 */
+ 0x00000000, /* RA.MULTISAMPLE_UNK00E10[2] := 0x0 */
+ 0x00000000, /* RA.MULTISAMPLE_UNK00E10[3] := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x08010381, /* LOAD_STATE (1) Base: 0x00E04 Size: 1 Fixp: 0 */
+ 0x00000000, /* RA.MULTISAMPLE_UNK00E04 := 0x0 */
+ 0x08100390, /* LOAD_STATE (1) Base: 0x00E40 Size: 16 Fixp: 0 */
+ 0x00000000, /* RA.CENTROID_TABLE[0] := 0x0 */
+ 0x00000000, /* RA.CENTROID_TABLE[1] := 0x0 */
+ 0x00000000, /* RA.CENTROID_TABLE[2] := 0x0 */
+ 0x00000000, /* RA.CENTROID_TABLE[3] := 0x0 */
+ 0x00000000, /* RA.CENTROID_TABLE[4] := 0x0 */
+ 0x00000000, /* RA.CENTROID_TABLE[5] := 0x0 */
+ 0x00000000, /* RA.CENTROID_TABLE[6] := 0x0 */
+ 0x00000000, /* RA.CENTROID_TABLE[7] := 0x0 */
+ 0x00000000, /* RA.CENTROID_TABLE[8] := 0x0 */
+ 0x00000000, /* RA.CENTROID_TABLE[9] := 0x0 */
+ 0x00000000, /* RA.CENTROID_TABLE[10] := 0x0 */
+ 0x00000000, /* RA.CENTROID_TABLE[11] := 0x0 */
+ 0x00000000, /* RA.CENTROID_TABLE[12] := 0x0 */
+ 0x00000000, /* RA.CENTROID_TABLE[13] := 0x0 */
+ 0x00000000, /* RA.CENTROID_TABLE[14] := 0x0 */
+ 0x00000000, /* RA.CENTROID_TABLE[15] := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x08010382, /* LOAD_STATE (1) Base: 0x00E08 Size: 1 Fixp: 0 */
+ 0x00000001, /* RA.DEPTH_UNK00E08 := 0x1 */
+ 0x08050400, /* LOAD_STATE (1) Base: 0x01000 Size: 5 Fixp: 0 */
+ 0x00000001, /* PS.END_PC := 0x1 */
+ 0x00000001, /* PS.OUTPUT_REG := 0x1 */
+ 0x00001f02, /* PS.INPUT_COUNT := COUNT=0x2,COUNT2=0x1f */
+ 0x00000002, /* PS.TEMP_REGISTER_CONTROL := NUM_TEMPS=0x2 */
+ 0x00000002, /* PS.CONTROL := 0x2 */
+ 0x08010406, /* LOAD_STATE (1) Base: 0x01018 Size: 1 Fixp: 0 */
+ 0x00000000, /* PS.START_PC := 0x0 */
+ 0x08001800, /* LOAD_STATE (1) Base: 0x06000 Size: 1024 Fixp: 0 */
+ 0x00000000, /* PS.INST_MEM[0] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[2] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[3] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[4] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[5] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[6] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[7] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[8] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[9] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[10] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[11] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[12] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[13] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[14] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[15] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[16] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[17] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[18] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[19] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[20] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[21] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[22] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[23] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[24] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[25] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[26] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[27] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[28] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[29] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[30] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[31] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[32] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[33] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[34] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[35] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[36] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[37] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[38] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[39] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[40] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[41] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[42] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[43] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[44] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[45] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[46] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[47] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[48] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[49] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[50] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[51] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[52] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[53] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[54] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[55] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[56] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[57] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[58] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[59] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[60] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[61] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[62] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[63] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[64] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[65] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[66] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[67] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[68] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[69] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[70] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[71] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[72] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[73] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[74] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[75] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[76] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[77] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[78] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[79] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[80] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[81] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[82] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[83] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[84] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[85] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[86] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[87] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[88] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[89] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[90] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[91] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[92] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[93] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[94] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[95] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[96] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[97] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[98] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[99] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[100] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[101] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[102] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[103] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[104] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[105] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[106] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[107] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[108] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[109] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[110] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[111] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[112] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[113] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[114] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[115] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[116] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[117] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[118] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[119] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[120] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[121] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[122] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[123] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[124] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[125] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[126] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[127] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[128] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[129] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[130] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[131] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[132] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[133] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[134] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[135] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[136] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[137] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[138] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[139] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[140] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[141] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[142] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[143] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[144] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[145] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[146] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[147] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[148] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[149] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[150] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[151] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[152] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[153] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[154] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[155] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[156] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[157] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[158] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[159] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[160] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[161] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[162] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[163] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[164] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[165] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[166] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[167] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[168] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[169] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[170] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[171] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[172] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[173] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[174] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[175] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[176] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[177] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[178] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[179] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[180] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[181] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[182] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[183] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[184] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[185] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[186] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[187] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[188] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[189] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[190] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[191] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[192] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[193] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[194] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[195] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[196] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[197] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[198] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[199] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[200] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[201] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[202] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[203] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[204] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[205] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[206] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[207] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[208] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[209] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[210] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[211] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[212] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[213] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[214] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[215] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[216] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[217] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[218] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[219] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[220] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[221] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[222] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[223] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[224] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[225] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[226] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[227] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[228] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[229] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[230] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[231] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[232] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[233] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[234] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[235] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[236] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[237] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[238] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[239] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[240] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[241] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[242] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[243] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[244] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[245] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[246] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[247] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[248] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[249] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[250] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[251] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[252] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[253] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[254] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[255] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[256] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[257] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[258] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[259] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[260] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[261] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[262] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[263] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[264] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[265] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[266] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[267] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[268] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[269] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[270] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[271] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[272] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[273] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[274] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[275] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[276] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[277] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[278] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[279] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[280] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[281] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[282] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[283] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[284] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[285] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[286] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[287] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[288] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[289] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[290] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[291] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[292] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[293] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[294] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[295] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[296] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[297] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[298] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[299] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[300] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[301] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[302] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[303] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[304] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[305] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[306] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[307] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[308] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[309] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[310] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[311] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[312] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[313] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[314] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[315] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[316] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[317] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[318] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[319] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[320] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[321] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[322] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[323] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[324] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[325] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[326] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[327] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[328] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[329] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[330] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[331] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[332] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[333] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[334] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[335] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[336] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[337] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[338] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[339] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[340] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[341] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[342] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[343] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[344] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[345] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[346] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[347] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[348] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[349] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[350] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[351] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[352] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[353] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[354] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[355] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[356] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[357] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[358] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[359] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[360] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[361] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[362] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[363] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[364] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[365] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[366] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[367] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[368] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[369] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[370] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[371] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[372] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[373] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[374] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[375] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[376] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[377] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[378] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[379] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[380] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[381] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[382] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[383] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[384] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[385] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[386] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[387] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[388] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[389] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[390] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[391] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[392] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[393] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[394] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[395] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[396] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[397] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[398] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[399] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[400] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[401] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[402] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[403] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[404] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[405] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[406] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[407] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[408] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[409] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[410] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[411] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[412] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[413] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[414] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[415] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[416] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[417] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[418] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[419] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[420] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[421] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[422] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[423] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[424] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[425] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[426] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[427] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[428] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[429] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[430] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[431] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[432] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[433] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[434] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[435] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[436] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[437] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[438] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[439] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[440] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[441] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[442] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[443] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[444] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[445] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[446] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[447] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[448] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[449] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[450] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[451] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[452] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[453] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[454] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[455] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[456] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[457] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[458] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[459] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[460] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[461] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[462] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[463] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[464] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[465] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[466] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[467] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[468] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[469] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[470] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[471] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[472] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[473] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[474] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[475] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[476] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[477] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[478] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[479] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[480] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[481] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[482] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[483] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[484] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[485] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[486] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[487] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[488] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[489] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[490] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[491] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[492] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[493] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[494] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[495] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[496] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[497] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[498] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[499] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[500] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[501] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[502] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[503] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[504] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[505] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[506] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[507] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[508] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[509] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[510] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[511] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[512] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[513] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[514] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[515] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[516] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[517] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[518] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[519] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[520] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[521] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[522] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[523] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[524] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[525] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[526] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[527] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[528] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[529] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[530] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[531] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[532] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[533] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[534] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[535] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[536] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[537] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[538] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[539] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[540] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[541] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[542] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[543] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[544] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[545] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[546] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[547] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[548] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[549] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[550] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[551] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[552] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[553] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[554] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[555] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[556] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[557] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[558] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[559] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[560] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[561] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[562] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[563] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[564] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[565] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[566] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[567] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[568] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[569] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[570] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[571] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[572] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[573] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[574] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[575] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[576] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[577] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[578] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[579] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[580] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[581] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[582] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[583] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[584] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[585] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[586] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[587] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[588] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[589] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[590] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[591] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[592] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[593] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[594] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[595] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[596] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[597] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[598] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[599] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[600] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[601] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[602] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[603] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[604] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[605] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[606] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[607] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[608] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[609] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[610] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[611] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[612] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[613] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[614] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[615] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[616] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[617] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[618] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[619] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[620] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[621] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[622] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[623] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[624] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[625] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[626] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[627] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[628] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[629] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[630] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[631] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[632] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[633] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[634] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[635] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[636] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[637] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[638] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[639] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[640] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[641] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[642] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[643] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[644] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[645] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[646] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[647] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[648] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[649] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[650] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[651] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[652] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[653] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[654] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[655] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[656] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[657] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[658] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[659] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[660] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[661] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[662] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[663] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[664] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[665] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[666] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[667] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[668] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[669] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[670] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[671] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[672] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[673] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[674] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[675] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[676] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[677] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[678] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[679] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[680] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[681] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[682] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[683] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[684] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[685] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[686] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[687] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[688] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[689] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[690] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[691] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[692] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[693] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[694] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[695] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[696] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[697] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[698] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[699] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[700] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[701] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[702] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[703] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[704] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[705] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[706] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[707] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[708] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[709] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[710] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[711] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[712] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[713] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[714] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[715] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[716] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[717] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[718] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[719] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[720] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[721] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[722] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[723] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[724] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[725] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[726] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[727] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[728] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[729] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[730] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[731] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[732] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[733] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[734] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[735] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[736] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[737] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[738] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[739] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[740] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[741] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[742] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[743] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[744] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[745] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[746] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[747] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[748] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[749] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[750] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[751] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[752] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[753] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[754] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[755] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[756] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[757] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[758] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[759] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[760] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[761] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[762] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[763] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[764] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[765] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[766] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[767] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[768] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[769] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[770] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[771] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[772] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[773] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[774] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[775] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[776] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[777] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[778] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[779] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[780] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[781] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[782] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[783] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[784] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[785] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[786] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[787] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[788] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[789] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[790] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[791] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[792] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[793] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[794] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[795] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[796] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[797] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[798] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[799] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[800] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[801] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[802] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[803] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[804] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[805] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[806] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[807] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[808] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[809] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[810] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[811] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[812] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[813] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[814] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[815] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[816] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[817] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[818] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[819] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[820] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[821] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[822] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[823] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[824] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[825] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[826] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[827] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[828] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[829] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[830] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[831] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[832] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[833] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[834] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[835] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[836] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[837] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[838] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[839] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[840] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[841] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[842] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[843] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[844] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[845] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[846] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[847] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[848] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[849] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[850] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[851] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[852] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[853] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[854] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[855] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[856] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[857] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[858] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[859] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[860] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[861] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[862] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[863] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[864] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[865] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[866] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[867] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[868] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[869] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[870] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[871] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[872] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[873] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[874] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[875] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[876] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[877] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[878] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[879] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[880] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[881] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[882] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[883] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[884] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[885] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[886] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[887] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[888] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[889] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[890] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[891] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[892] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[893] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[894] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[895] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[896] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[897] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[898] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[899] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[900] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[901] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[902] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[903] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[904] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[905] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[906] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[907] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[908] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[909] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[910] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[911] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[912] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[913] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[914] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[915] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[916] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[917] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[918] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[919] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[920] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[921] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[922] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[923] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[924] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[925] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[926] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[927] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[928] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[929] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[930] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[931] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[932] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[933] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[934] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[935] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[936] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[937] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[938] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[939] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[940] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[941] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[942] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[943] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[944] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[945] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[946] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[947] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[948] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[949] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[950] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[951] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[952] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[953] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[954] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[955] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[956] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[957] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[958] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[959] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[960] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[961] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[962] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[963] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[964] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[965] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[966] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[967] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[968] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[969] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[970] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[971] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[972] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[973] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[974] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[975] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[976] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[977] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[978] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[979] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[980] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[981] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[982] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[983] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[984] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[985] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[986] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[987] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[988] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[989] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[990] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[991] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[992] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[993] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[994] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[995] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[996] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[997] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[998] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[999] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1000] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1001] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1002] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1003] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1004] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1005] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1006] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1007] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1008] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1009] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1010] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1011] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1012] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1013] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1014] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1015] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1016] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1017] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1018] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1019] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1020] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1021] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1022] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1023] := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x09001c00, /* LOAD_STATE (1) Base: 0x07000 Size: 256 Fixp: 0 */
+ 0x00000000, /* PS.UNIFORMS[0] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[1] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[2] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[3] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[4] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[5] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[6] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[7] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[8] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[9] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[10] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[11] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[12] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[13] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[14] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[15] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[16] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[17] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[18] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[19] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[20] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[21] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[22] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[23] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[24] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[25] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[26] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[27] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[28] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[29] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[30] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[31] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[32] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[33] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[34] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[35] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[36] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[37] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[38] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[39] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[40] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[41] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[42] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[43] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[44] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[45] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[46] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[47] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[48] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[49] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[50] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[51] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[52] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[53] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[54] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[55] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[56] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[57] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[58] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[59] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[60] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[61] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[62] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[63] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[64] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[65] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[66] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[67] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[68] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[69] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[70] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[71] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[72] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[73] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[74] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[75] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[76] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[77] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[78] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[79] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[80] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[81] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[82] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[83] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[84] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[85] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[86] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[87] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[88] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[89] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[90] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[91] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[92] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[93] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[94] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[95] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[96] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[97] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[98] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[99] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[100] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[101] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[102] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[103] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[104] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[105] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[106] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[107] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[108] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[109] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[110] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[111] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[112] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[113] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[114] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[115] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[116] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[117] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[118] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[119] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[120] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[121] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[122] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[123] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[124] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[125] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[126] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[127] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[128] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[129] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[130] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[131] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[132] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[133] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[134] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[135] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[136] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[137] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[138] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[139] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[140] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[141] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[142] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[143] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[144] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[145] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[146] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[147] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[148] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[149] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[150] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[151] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[152] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[153] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[154] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[155] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[156] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[157] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[158] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[159] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[160] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[161] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[162] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[163] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[164] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[165] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[166] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[167] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[168] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[169] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[170] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[171] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[172] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[173] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[174] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[175] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[176] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[177] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[178] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[179] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[180] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[181] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[182] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[183] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[184] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[185] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[186] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[187] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[188] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[189] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[190] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[191] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[192] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[193] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[194] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[195] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[196] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[197] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[198] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[199] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[200] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[201] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[202] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[203] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[204] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[205] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[206] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[207] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[208] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[209] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[210] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[211] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[212] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[213] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[214] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[215] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[216] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[217] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[218] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[219] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[220] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[221] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[222] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[223] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[224] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[225] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[226] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[227] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[228] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[229] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[230] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[231] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[232] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[233] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[234] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[235] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[236] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[237] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[238] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[239] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[240] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[241] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[242] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[243] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[244] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[245] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[246] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[247] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[248] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[249] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[250] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[251] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[252] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[253] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[254] := 0.000000 */
+ 0x00000000, /* PS.UNIFORMS[255] := 0.000000 */
+ 0xdeaddead, /* PAD */
+ 0x082c0800, /* LOAD_STATE (1) Base: 0x02000 Size: 44 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].CONFIG_1 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[1].CONFIG_1 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[2].CONFIG_1 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[3].CONFIG_1 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[4].CONFIG_1 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[5].CONFIG_1 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[6].CONFIG_1 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[7].CONFIG_1 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[8].CONFIG_1 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[9].CONFIG_1 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[10].CONFIG_1 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[11].CONFIG_1 := 0x0 */
+ 0x00000000, /* 0x02030 */
+ 0x00000000, /* 0x02034 */
+ 0x00000000, /* 0x02038 */
+ 0x00000000, /* 0x0203C */
+ 0x00000000, /* TE.SAMPLER[0].SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[1].SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[2].SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[3].SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[4].SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[5].SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[6].SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[7].SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[8].SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[9].SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[10].SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[11].SIZE := 0x0 */
+ 0x00000000, /* 0x02070 */
+ 0x00000000, /* 0x02074 */
+ 0x00000000, /* 0x02078 */
+ 0x00000000, /* 0x0207C */
+ 0x00000000, /* TE.SAMPLER[0].LOG_SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOG_SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOG_SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOG_SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOG_SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOG_SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOG_SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOG_SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOG_SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOG_SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOG_SIZE := 0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOG_SIZE := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x080c0830, /* LOAD_STATE (1) Base: 0x020C0 Size: 12 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD := 0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOD := 0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOD := 0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOD := 0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOD := 0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOD := 0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOD := 0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOD := 0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOD := 0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOD := 0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOD := 0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOD := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x080c0840, /* LOAD_STATE (1) Base: 0x02100 Size: 12 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].UNK02100 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[1].UNK02100 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[2].UNK02100 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[3].UNK02100 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[4].UNK02100 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[5].UNK02100 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[6].UNK02100 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[7].UNK02100 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[8].UNK02100 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[9].UNK02100 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[10].UNK02100 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[11].UNK02100 := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x08100850, /* LOAD_STATE (1) Base: 0x02140 Size: 16 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].UNK02140 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[1].UNK02140 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[2].UNK02140 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[3].UNK02140 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[4].UNK02140 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[5].UNK02140 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[6].UNK02140 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[7].UNK02140 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[8].UNK02140 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[9].UNK02140 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[10].UNK02140 := 0x0 */
+ 0x00000000, /* TE.SAMPLER[11].UNK02140 := 0x0 */
+ 0x00000000, /* 0x02170 */
+ 0x00000000, /* 0x02174 */
+ 0x00000000, /* 0x02178 */
+ 0x00000000, /* 0x0217C */
+ 0xdeaddead, /* PAD */
+ 0x081c0900, /* LOAD_STATE (1) Base: 0x02400 Size: 28 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_ADDR[0] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOD_ADDR[0] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOD_ADDR[0] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOD_ADDR[0] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOD_ADDR[0] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOD_ADDR[0] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOD_ADDR[0] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOD_ADDR[0] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOD_ADDR[0] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOD_ADDR[0] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOD_ADDR[0] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOD_ADDR[0] := *0x0 */
+ 0x00000000, /* 0x02430 */
+ 0x00000000, /* 0x02434 */
+ 0x00000000, /* 0x02438 */
+ 0x00000000, /* 0x0243C */
+ 0x00000000, /* TE.SAMPLER[0].LOD_ADDR[1] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOD_ADDR[1] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOD_ADDR[1] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOD_ADDR[1] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOD_ADDR[1] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOD_ADDR[1] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOD_ADDR[1] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOD_ADDR[1] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOD_ADDR[1] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOD_ADDR[1] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOD_ADDR[1] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOD_ADDR[1] := *0x0 */
+ 0xdeaddead, /* PAD */
+ 0x080c0920, /* LOAD_STATE (1) Base: 0x02480 Size: 12 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_ADDR[2] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOD_ADDR[2] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOD_ADDR[2] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOD_ADDR[2] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOD_ADDR[2] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOD_ADDR[2] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOD_ADDR[2] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOD_ADDR[2] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOD_ADDR[2] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOD_ADDR[2] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOD_ADDR[2] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOD_ADDR[2] := *0x0 */
+ 0xdeaddead, /* PAD */
+ 0x080c0930, /* LOAD_STATE (1) Base: 0x024C0 Size: 12 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_ADDR[3] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOD_ADDR[3] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOD_ADDR[3] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOD_ADDR[3] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOD_ADDR[3] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOD_ADDR[3] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOD_ADDR[3] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOD_ADDR[3] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOD_ADDR[3] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOD_ADDR[3] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOD_ADDR[3] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOD_ADDR[3] := *0x0 */
+ 0xdeaddead, /* PAD */
+ 0x080c0940, /* LOAD_STATE (1) Base: 0x02500 Size: 12 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_ADDR[4] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOD_ADDR[4] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOD_ADDR[4] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOD_ADDR[4] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOD_ADDR[4] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOD_ADDR[4] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOD_ADDR[4] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOD_ADDR[4] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOD_ADDR[4] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOD_ADDR[4] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOD_ADDR[4] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOD_ADDR[4] := *0x0 */
+ 0xdeaddead, /* PAD */
+ 0x080c0950, /* LOAD_STATE (1) Base: 0x02540 Size: 12 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_ADDR[5] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOD_ADDR[5] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOD_ADDR[5] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOD_ADDR[5] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOD_ADDR[5] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOD_ADDR[5] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOD_ADDR[5] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOD_ADDR[5] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOD_ADDR[5] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOD_ADDR[5] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOD_ADDR[5] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOD_ADDR[5] := *0x0 */
+ 0xdeaddead, /* PAD */
+ 0x080c0960, /* LOAD_STATE (1) Base: 0x02580 Size: 12 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_ADDR[6] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOD_ADDR[6] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOD_ADDR[6] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOD_ADDR[6] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOD_ADDR[6] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOD_ADDR[6] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOD_ADDR[6] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOD_ADDR[6] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOD_ADDR[6] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOD_ADDR[6] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOD_ADDR[6] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOD_ADDR[6] := *0x0 */
+ 0xdeaddead, /* PAD */
+ 0x080c0970, /* LOAD_STATE (1) Base: 0x025C0 Size: 12 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_ADDR[7] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOD_ADDR[7] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOD_ADDR[7] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOD_ADDR[7] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOD_ADDR[7] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOD_ADDR[7] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOD_ADDR[7] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOD_ADDR[7] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOD_ADDR[7] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOD_ADDR[7] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOD_ADDR[7] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOD_ADDR[7] := *0x0 */
+ 0xdeaddead, /* PAD */
+ 0x080c0980, /* LOAD_STATE (1) Base: 0x02600 Size: 12 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_ADDR[8] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOD_ADDR[8] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOD_ADDR[8] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOD_ADDR[8] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOD_ADDR[8] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOD_ADDR[8] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOD_ADDR[8] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOD_ADDR[8] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOD_ADDR[8] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOD_ADDR[8] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOD_ADDR[8] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOD_ADDR[8] := *0x0 */
+ 0xdeaddead, /* PAD */
+ 0x080c0990, /* LOAD_STATE (1) Base: 0x02640 Size: 12 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_ADDR[9] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOD_ADDR[9] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOD_ADDR[9] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOD_ADDR[9] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOD_ADDR[9] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOD_ADDR[9] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOD_ADDR[9] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOD_ADDR[9] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOD_ADDR[9] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOD_ADDR[9] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOD_ADDR[9] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOD_ADDR[9] := *0x0 */
+ 0xdeaddead, /* PAD */
+ 0x080c09a0, /* LOAD_STATE (1) Base: 0x02680 Size: 12 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_ADDR[10] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOD_ADDR[10] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOD_ADDR[10] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOD_ADDR[10] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOD_ADDR[10] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOD_ADDR[10] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOD_ADDR[10] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOD_ADDR[10] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOD_ADDR[10] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOD_ADDR[10] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOD_ADDR[10] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOD_ADDR[10] := *0x0 */
+ 0xdeaddead, /* PAD */
+ 0x080c09b0, /* LOAD_STATE (1) Base: 0x026C0 Size: 12 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_ADDR[11] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOD_ADDR[11] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOD_ADDR[11] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOD_ADDR[11] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOD_ADDR[11] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOD_ADDR[11] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOD_ADDR[11] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOD_ADDR[11] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOD_ADDR[11] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOD_ADDR[11] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOD_ADDR[11] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOD_ADDR[11] := *0x0 */
+ 0xdeaddead, /* PAD */
+ 0x080c09c0, /* LOAD_STATE (1) Base: 0x02700 Size: 12 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_ADDR[12] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOD_ADDR[12] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOD_ADDR[12] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOD_ADDR[12] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOD_ADDR[12] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOD_ADDR[12] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOD_ADDR[12] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOD_ADDR[12] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOD_ADDR[12] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOD_ADDR[12] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOD_ADDR[12] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOD_ADDR[12] := *0x0 */
+ 0xdeaddead, /* PAD */
+ 0x080c09d0, /* LOAD_STATE (1) Base: 0x02740 Size: 12 Fixp: 0 */
+ 0x00000000, /* TE.SAMPLER[0].LOD_ADDR[13] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[1].LOD_ADDR[13] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[2].LOD_ADDR[13] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[3].LOD_ADDR[13] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[4].LOD_ADDR[13] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[5].LOD_ADDR[13] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[6].LOD_ADDR[13] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[7].LOD_ADDR[13] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[8].LOD_ADDR[13] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[9].LOD_ADDR[13] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[10].LOD_ADDR[13] := *0x0 */
+ 0x00000000, /* TE.SAMPLER[11].LOD_ADDR[13] := *0x0 */
+ 0xdeaddead, /* PAD */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000007, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=1,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000701, /* GLOBAL.SEMAPHORE_TOKEN := FROM=FE,TO=PE */
+ 0x48000000, /* STALL (9) */
+ 0x00000701, /* */
+ 0x080e0500, /* LOAD_STATE (1) Base: 0x01400 Size: 14 Fixp: 0 */
+ 0x04010701, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=0(residue:04010001) */
+ 0x00000000, /* PE.DEPTH_NEAR := 0.000000 */
+ 0x3f800000, /* PE.DEPTH_FAR := 1.000000 */
+ 0x477fff00, /* PE.DEPTH_NORMALIZE := 65535.000000 */
+ 0x7e6a0000, /* PE.DEPTH_ADDR := *0x7e6a0000 */
+ 0x00000380, /* PE.DEPTH_STRIDE := 0x380 */
+ 0x00070007, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=0,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=0 */
+ 0xffff0000, /* PE.STENCIL_CONFIG := 0xffff0000 */
+ 0x00000000, /* PE.ALPHA_OP := ALPHA_TEST=0,ALPHA_TEST_MASK=0,ALPHA_FUNC=NEVER,ALPHA_FUNC_MASK=0 */
+ 0x00000000, /* PE.ALPHA_BLEND_COLOR := 0x0 */
+ 0x00100010, /* PE.ALPHA_CONFIG := 0x100010 */
+ 0x00110f05, /* PE.COLOR_FORMAT := 0x110f05 */
+ 0x7f2c8700, /* PE.COLOR_ADDR := *0x7f2c8700 */
+ 0x00000700, /* PE.COLOR_STRIDE := 0x700 */
+ 0xdeaddead, /* PAD */
+ 0x08030515, /* LOAD_STATE (1) Base: 0x01454 Size: 3 Fixp: 0 */
+ 0x00000000, /* PE.UNK01454 := 0x0 */
+ 0x00000000, /* PE.UNK01458 := *0x0 */
+ 0x00000010, /* PE.UNK0145C := 0x10 */
+ 0x08050581, /* LOAD_STATE (1) Base: 0x01604 Size: 5 Fixp: 0 */
+ 0x00000606, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=0,DEST_FORMAT=A8R8G8B8,UNK14=0,SWAP_RB=0 */
+ 0x7f284000, /* RS.SOURCE_ADDR := *0x7f284000 */
+ 0x00000400, /* RS.SOURCE_STRIDE := 0x400 */
+ 0x7a003200, /* RS.DEST_ADDR := *0x7a003200 */
+ 0x00000040, /* RS.DEST_STRIDE := 0x40 */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x001c0010, /* RS.WINDOW_SIZE := HEIGHT=28,WIDTH=16 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* RS.DITHER[1] := 0xffffffff */
+ 0xdeaddead, /* PAD */
+ 0x08040590, /* LOAD_STATE (1) Base: 0x01640 Size: 4 Fixp: 0 */
+ 0x55555555, /* RS.FILL_VALUE[0] := 0x55555555 */
+ 0x00000000, /* RS.FILL_VALUE[1] := 0x0 */
+ 0x00000000, /* RS.FILL_VALUE[2] := 0x0 */
+ 0x00000000, /* RS.FILL_VALUE[3] := 0x0 */
+ 0xdeaddead, /* PAD */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x0001ffff, /* RS.CLEAR_CONTROL := BITS=0xffff,MODE=0x1 */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x0000004b, /* TS.MEM_CONFIG := 0x4b */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a003200, /* TS.COLOR_STATUS_BASE := *0x7a003200 */
+ 0x08020597, /* LOAD_STATE (1) Base: 0x0165C Size: 2 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := *0x7f2c8700 */
+ 0xff7f7f7f, /* TS.COLOR_CLEAR_VALUE := 0xff7f7f7f */
+ 0xdeaddead, /* PAD */
+ 0x08010599, /* LOAD_STATE (1) Base: 0x01664 Size: 1 Fixp: 0 */
+ 0x7a003900, /* TS.DEPTH_STATUS_BASE := *0x7a003900 */
+ 0x0802059a, /* LOAD_STATE (1) Base: 0x01668 Size: 2 Fixp: 0 */
+ 0x7e6a0000, /* TS.DEPTH_SURFACE_BASE := *0x7e6a0000 */
+ 0xffffffff, /* TS.DEPTH_CLEAR_VALUE := 0xffffffff */
+ 0xdeaddead, /* PAD */
+ 0x080b059e, /* LOAD_STATE (1) Base: 0x01678 Size: 11 Fixp: 0 */
+ 0x00000000, /* YUV.UNK01678 := 0x0 */
+ 0x00000000, /* YUV.UNK0167C := 0x0 */
+ 0x00000000, /* YUV.UNK01680 := *0x0 */
+ 0x00000000, /* YUV.UNK01684 := 0x0 */
+ 0x00000000, /* YUV.UNK01688 := *0x0 */
+ 0x00000000, /* YUV.UNK0168C := 0x0 */
+ 0x00000000, /* YUV.UNK01690 := *0x0 */
+ 0x00000000, /* YUV.UNK01694 := 0x0 */
+ 0x00000000, /* YUV.UNK01698 := *0x0 */
+ 0x00000000, /* YUV.UNK0169C := 0x0 */
+ 0x00000000, /* RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x080205a9, /* LOAD_STATE (1) Base: 0x016A4 Size: 2 Fixp: 0 */
+ 0x00000000, /* TS.HDEPTH_BASE := *0x0 */
+ 0x00000000, /* TS.HDEPTH_CLEAR_VALUE := 0x0 */
+ 0xdeaddead, /* PAD */
+#if 0
+/* pipe2DIndex */ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000007, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=1,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000701, /* GLOBAL.SEMAPHORE_TOKEN := FROM=FE,TO=PE */
+ 0x48000000, /* STALL (9) */
+ 0x00000701, /* */
+ 0x08010e00, /* LOAD_STATE (1) Base: 0x03800 Size: 1 Fixp: 0 */
+ 0x00000001, /* GLOBAL.PIPE_SELECT := PIPE=PIPE_2D */
+#else /* Context must zero this out based on current pipe, otherwise commands will be submitted to the wrong pipe after a context switch and result in hangs */
+/* pipe2DIndex */ 0x18000000, /* NOP (3) */
+ 0xdeaddead, /* PAD */
+ 0x18000000, /* NOP (3) */
+ 0xdeaddead, /* PAD */
+ 0x18000000, /* NOP (3) */
+ 0xdeaddead, /* PAD */
+ 0x18000000, /* NOP (3) */
+ 0xdeaddead, /* PAD */
+#endif
+ 0x40000000, /* LINK (8) */
+ 0x00000000, /* */
+ 0x00000000 /* [inUse placeholder index] */
+};
+
diff --git a/src/replay/cube.c b/src/replay/cube.c
new file mode 100644
index 0000000..ded475d
--- /dev/null
+++ b/src/replay/cube.c
@@ -0,0 +1,518 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include "write_bmp.h"
+#include "viv_raw.h"
+
+#include "cube_cmd.h"
+/* TODO: should actually update context as we go,
+ a context switch would currently revert state and likely result in corrupted rendering.
+ */
+#include "context_cmd.h"
+
+float vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+};
+
+float vColors[] = {
+ // front
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f, // magenta
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ // back
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 1.0f, 0.0f, // yellow
+ 0.0f, 1.0f, 0.0f, // green
+ // right
+ 1.0f, 0.0f, 1.0f, // magenta
+ 1.0f, 0.0f, 0.0f, // red
+ 1.0f, 1.0f, 1.0f, // white
+ 1.0f, 1.0f, 0.0f, // yellow
+ // left
+ 0.0f, 0.0f, 0.0f, // black
+ 0.0f, 0.0f, 1.0f, // blue
+ 0.0f, 1.0f, 0.0f, // green
+ 0.0f, 1.0f, 1.0f, // cyan
+ // top
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ 0.0f, 1.0f, 0.0f, // green
+ 1.0f, 1.0f, 0.0f, // yellow
+ // bottom
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f // magenta
+};
+
+float vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+};
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (6*4)
+
+int main(int argc, char **argv)
+{
+ int rv;
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+ viv_show_chip_info(conn);
+
+ /* allocate command buffer (blob uses four command buffers, but we don't even fill one) */
+ viv_addr_t buf0_physical = 0;
+ void *buf0_logical = 0;
+ if(viv_alloc_contiguous(conn, 0x8000, &buf0_physical, &buf0_logical, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating host memory\n");
+ exit(1);
+ }
+ printf("Allocated buffer: phys=%08x log=%08x\n", (uint32_t)buf0_physical, (uint32_t)buf0_logical);
+
+ /* allocate main render target */
+ gcuVIDMEM_NODE_PTR rt_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x70000, 0x40, gcvSURF_RENDER_TARGET, gcvPOOL_DEFAULT, &rt_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target buffer memory\n");
+ exit(1);
+ }
+ printf("Allocated render target node: node=%08x\n", (uint32_t)rt_node);
+
+ viv_addr_t rt_physical = 0;
+ void *rt_logical = 0;
+ if(viv_lock_vidmem(conn, rt_node, &rt_physical, &rt_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target: phys=%08x log=%08x\n", (uint32_t)rt_physical, (uint32_t)rt_logical);
+ memset(rt_logical, 0xff, 0x70000); /* clear previous result just in case, test that clearing works */
+
+ /* allocate tile status for main render target */
+ gcuVIDMEM_NODE_PTR rt_ts_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x700, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &rt_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated render target tile status node: node=%08x\n", (uint32_t)rt_ts_node);
+
+ viv_addr_t rt_ts_physical = 0;
+ void *rt_ts_logical = 0;
+ if(viv_lock_vidmem(conn, rt_ts_node, &rt_ts_physical, &rt_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target ts: phys=%08x log=%08x\n", (uint32_t)rt_ts_physical, (uint32_t)rt_ts_logical);
+
+ /* allocate depth for main render target */
+ gcuVIDMEM_NODE_PTR z_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x38000, 0x40, gcvSURF_DEPTH, gcvPOOL_DEFAULT, &z_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth node: node=%08x\n", (uint32_t)z_node);
+
+ viv_addr_t z_physical = 0;
+ void *z_logical = 0;
+ if(viv_lock_vidmem(conn, z_node, &z_physical, &z_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target memory\n");
+ exit(1);
+ }
+ printf("Locked depth target: phys=%08x log=%08x\n", (uint32_t)z_physical, (uint32_t)z_logical);
+
+ /* allocate depth ts for main render target */
+ gcuVIDMEM_NODE_PTR z_ts_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x400, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &z_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth ts node: node=%08x\n", (uint32_t)z_ts_node);
+
+ viv_addr_t z_ts_physical = 0;
+ void *z_ts_logical = 0;
+ if(viv_lock_vidmem(conn, z_ts_node, &z_ts_physical, &z_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target ts memory\n");
+ exit(1);
+ }
+ printf("Locked depth ts target: phys=%08x log=%08x\n", (uint32_t)z_ts_physical, (uint32_t)z_ts_logical);
+
+ /* allocate vertex buffer */
+ gcuVIDMEM_NODE_PTR vtx_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x60000, 0x40, gcvSURF_VERTEX, gcvPOOL_DEFAULT, &vtx_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating vertex memory\n");
+ exit(1);
+ }
+ printf("Allocated vertex node: node=%08x\n", (uint32_t)vtx_node);
+
+ viv_addr_t vtx_physical = 0;
+ void *vtx_logical = 0;
+ if(viv_lock_vidmem(conn, vtx_node, &vtx_physical, &vtx_logical)!=0)
+ {
+ fprintf(stderr, "Error locking vertex memory\n");
+ exit(1);
+ }
+ printf("Locked vertex memory: phys=%08x log=%08x\n", (uint32_t)vtx_physical, (uint32_t)vtx_logical);
+
+ /* allocate aux render target */
+ gcuVIDMEM_NODE_PTR aux_rt_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x4000, 0x40, gcvSURF_RENDER_TARGET, gcvPOOL_SYSTEM /*why?*/, &aux_rt_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating aux render target buffer memory\n");
+ exit(1);
+ }
+ printf("Allocated aux render target node: node=%08x\n", (uint32_t)aux_rt_node);
+
+ viv_addr_t aux_rt_physical = 0;
+ void *aux_rt_logical = 0;
+ if(viv_lock_vidmem(conn, aux_rt_node, &aux_rt_physical, &aux_rt_logical)!=0)
+ {
+ fprintf(stderr, "Error locking aux render target memory\n");
+ exit(1);
+ }
+ printf("Locked aux render target: phys=%08x log=%08x\n", (uint32_t)aux_rt_physical, (uint32_t)aux_rt_logical);
+
+ /* allocate tile status for aux render target */
+ gcuVIDMEM_NODE_PTR aux_rt_ts_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x100, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &aux_rt_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating aux render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated aux render target tile status node: node=%08x\n", (uint32_t)aux_rt_ts_node);
+
+ viv_addr_t aux_rt_ts_physical = 0;
+ void *aux_rt_ts_logical = 0;
+ if(viv_lock_vidmem(conn, aux_rt_ts_node, &aux_rt_ts_physical, &aux_rt_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking aux ts render target memory\n");
+ exit(1);
+ }
+ printf("Locked aux render target ts: phys=%08x log=%08x\n", (uint32_t)aux_rt_ts_physical, (uint32_t)aux_rt_ts_logical);
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int src_idx = vert * COMPONENTS_PER_VERTEX;
+ int dest_idx = vert * COMPONENTS_PER_VERTEX * 3;
+ for(int comp=0; comp<COMPONENTS_PER_VERTEX; ++comp)
+ {
+ ((float*)vtx_logical)[dest_idx+comp+0] = vVertices[src_idx + comp]; /* 0 */
+ ((float*)vtx_logical)[dest_idx+comp+3] = vNormals[src_idx + comp]; /* 1 */
+ ((float*)vtx_logical)[dest_idx+comp+6] = vColors[src_idx + comp]; /* 2 */
+ }
+ }
+ /*
+ for(int idx=0; idx<NUM_VERTICES*3*3; ++idx)
+ {
+ printf("%i %f\n", idx, ((float*)vtx_logical)[idx]);
+ }*/
+
+ /* Load the command buffer and send the commit command. */
+ /* First build context state map */
+ size_t stateCount = 0x1d00;
+ uint32_t *contextMap = malloc(stateCount * 4);
+ memset(contextMap, 0, stateCount*4);
+ for(int idx=0; idx<sizeof(contextbuf_addr)/sizeof(address_index_t); ++idx)
+ {
+ contextMap[contextbuf_addr[idx].address / 4] = contextbuf_addr[idx].index;
+ }
+
+ struct _gcoCMDBUF commandBuffer = {
+ .object = {
+ .type = gcvOBJ_COMMANDBUFFER
+ },
+ //.os = (_gcoOS*)0xbf7488,
+ //.hardware = (_gcoHARDWARE*)0x402694e0,
+ .physical = (void*)buf0_physical,
+ .logical = (void*)buf0_logical,
+ .bytes = 0x8000,
+ .startOffset = 0x0,
+ //.offset = 0xac0,
+ //.free = 0x7520,
+ //.hintTable = (unsigned int*)0x0, // Used when gcdSECURE
+ //.hintIndex = (unsigned int*)0x58, // Used when gcdSECURE
+ //.hintCommit = (unsigned int*)0xffffffff // Used when gcdSECURE
+ };
+ struct _gcoCONTEXT contextBuffer = {
+ .object = {
+ .type = gcvOBJ_CONTEXT
+ },
+ //.os = (_gcoOS*)0xbf7488,
+ //.hardware = (_gcoHARDWARE*)0x402694e0,
+ .id = 0x0, // Actual ID will be returned here
+ .map = contextMap,
+ .stateCount = stateCount,
+ //.hint = (unsigned char*)0x0, // Used when gcdSECURE
+ //.hintValue = 2, // Used when gcdSECURE
+ //.hintCount = 0xca, // Used when gcdSECURE
+ .buffer = contextbuf,
+ .pipe3DIndex = 0x2d6, // XXX should not be hardcoded
+ .pipe2DIndex = 0x106e,
+ .linkIndex = 0x1076,
+ .inUseIndex = 0x1078,
+ .bufferSize = 0x41e4,
+ .bytes = 0x0, // Number of bytes at physical, logical
+ .physical = (void*)0x0,
+ .logical = (void*)0x0,
+ .link = (void*)0x0, // Logical address of link
+ .initialPipe = 0x1,
+ .entryPipe = 0x0,
+ .currentPipe = 0x0,
+ .postCommit = 1,
+ .inUse = (int*)0x0, // Logical address of inUse
+ .lastAddress = 0xffffffff, // Not used by kernel
+ .lastSize = 0x2, // Not used by kernel
+ .lastIndex = 0x106a, // Not used by kernel
+ .lastFixed = 0, // Not used by kernel
+ //.hintArray = (unsigned int*)0x0, // Used when gcdSECURE
+ //.hintIndex = (unsigned int*)0x0 // Used when gcdSECURE
+ };
+ commandBuffer.free = commandBuffer.bytes - 0x8; /* Always keep 0x8 at end of buffer for kernel driver */
+ /* Set addresses in first command buffer */
+ cmdbuf1[0x57] = cmdbuf1[0x67] = cmdbuf1[0x9f] = cmdbuf1[0xbb] = cmdbuf1[0xd9] = cmdbuf1[0xfb] = rt_physical;
+ cmdbuf1[0x65] = cmdbuf1[0x9d] = cmdbuf1[0xb9] = cmdbuf1[0xd7] = cmdbuf1[0xe5] = cmdbuf1[0xf9] = rt_ts_physical;
+ cmdbuf1[0x6d] = cmdbuf1[0x7f] = z_physical;
+ cmdbuf1[0x7d] = z_ts_physical;
+ cmdbuf1[0x87] = cmdbuf1[0xa3] = cmdbuf1[0xc1] = aux_rt_ts_physical;
+ cmdbuf1[0x89] = cmdbuf1[0x8f] = cmdbuf1[0x93]
+ = cmdbuf1[0xa5] = cmdbuf1[0xab] = cmdbuf1[0xaf]
+ = cmdbuf1[0xc3] = cmdbuf1[0xc9] = cmdbuf1[0xcd] = aux_rt_physical;
+ cmdbuf1[0x1f3] = cmdbuf1[0x215] = cmdbuf1[0x237]
+ = cmdbuf1[0x259] = cmdbuf1[0x27b] = cmdbuf1[0x29d] = vtx_physical;
+
+ /* Submit first command buffer */
+ commandBuffer.startOffset = 0;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf1, sizeof(cmdbuf1));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf1);
+ commandBuffer.free -= sizeof(cmdbuf1) + 0x18;
+ printf("[1] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing first command buffer\n");
+ exit(1);
+ }
+
+ /* After the first COMMIT, allocate contiguous memory for context and set
+ * bytes, physical, logical, link, inUse */
+ printf("Context assigned index: %i\n", (uint32_t)contextBuffer.id);
+ viv_addr_t cbuf0_physical = 0;
+ void *cbuf0_logical = 0;
+ size_t cbuf0_bytes = 0;
+ if(viv_alloc_contiguous(conn, contextBuffer.bufferSize, &cbuf0_physical, &cbuf0_logical, &cbuf0_bytes)!=0)
+ {
+ fprintf(stderr, "Error allocating contiguous host memory for context\n");
+ exit(1);
+ }
+ printf("Allocated buffer (size 0x%x) for context: phys=%08x log=%08x\n", (int)cbuf0_bytes, (int)cbuf0_physical, (int)cbuf0_logical);
+ contextBuffer.bytes = cbuf0_bytes; /* actual size of buffer */
+ contextBuffer.physical = (void*)cbuf0_physical;
+ contextBuffer.logical = cbuf0_logical;
+ contextBuffer.link = ((uint32_t*)cbuf0_logical) + contextBuffer.linkIndex;
+ contextBuffer.inUse = (int*)(((uint32_t*)cbuf0_logical) + contextBuffer.inUseIndex);
+
+ /* Submit second command buffer, with updated context.
+ * Second command buffer fills the background.
+ */
+ cmdbuf2[0x1d] = cmdbuf2[0x1f] = rt_physical;
+ commandBuffer.startOffset = commandBuffer.offset + 0x18; /* Make space for LINK */
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf2, sizeof(cmdbuf2));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf2);
+ commandBuffer.free -= sizeof(cmdbuf2) + 0x18;
+ printf("[2] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing second command buffer\n");
+ exit(1);
+ }
+
+ /* Submit third command buffer, with updated context
+ * Third command buffer does some cache flush trick?
+ * It can be left out without any visible harm.
+ **/
+ cmdbuf3[0x9] = aux_rt_ts_physical;
+ cmdbuf3[0xb] = cmdbuf3[0x11] = cmdbuf3[0x15] = aux_rt_physical;
+ cmdbuf3[0x1f] = rt_ts_physical;
+ cmdbuf3[0x21] = rt_physical;
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf3, sizeof(cmdbuf3));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf3);
+ commandBuffer.free -= sizeof(cmdbuf3) + 0x18;
+ printf("[3] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing third command buffer\n");
+ exit(1);
+ }
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL (wait for pixel engine to finish) */
+ int sig_id = 0;
+ if(viv_user_signal_create(conn, 0, &sig_id) != 0) /* automatic resetting signal */
+ {
+ fprintf(stderr, "Cannot create user signal\n");
+ exit(1);
+ }
+ printf("Created user signal %i\n", sig_id);
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+
+ /* Allocate video memory for BITMAP, lock */
+ gcuVIDMEM_NODE_PTR bmp_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x5dc00, 0x40, gcvSURF_BITMAP, gcvPOOL_DEFAULT, &bmp_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating bitmap status memory\n");
+ exit(1);
+ }
+ printf("Allocated bitmap node: node=%08x\n", (uint32_t)bmp_node);
+
+ viv_addr_t bmp_physical = 0;
+ void *bmp_logical = 0;
+ if(viv_lock_vidmem(conn, bmp_node, &bmp_physical, &bmp_logical)!=0)
+ {
+ fprintf(stderr, "Error locking bmp memory\n");
+ exit(1);
+ }
+ memset(bmp_logical, 0xff, 0x5dc00); /* clear previous result */
+ printf("Locked bmp: phys=%08x log=%08x\n", (uint32_t)bmp_physical, (uint32_t)bmp_logical);
+
+ /* Submit fourth command buffer, updating context.
+ * Fourth command buffer copies render result to bitmap, detiling along the way.
+ */
+ cmdbuf4[0x19] = rt_physical;
+ cmdbuf4[0x1b] = bmp_physical;
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf4, sizeof(cmdbuf4));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf4);
+ commandBuffer.free -= sizeof(cmdbuf4) + 0x18;
+ printf("[4] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing fourth command buffer\n");
+ exit(1);
+ }
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL */
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+ bmp_dump32(bmp_logical, 400, 240, false, "/mnt/sdcard/replay.bmp");
+ /* Unlock video memory */
+ if(viv_unlock_vidmem(conn, bmp_node, gcvSURF_BITMAP, 1) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+ /*
+ for(int x=0; x<0x700; ++x)
+ {
+ uint32_t value = ((uint32_t*)rt_ts_logical)[x];
+ printf("Sample ts: %x %08x\n", x*4, value);
+ }*/
+ printf("Contextbuffer used %i\n", *contextBuffer.inUse);
+
+ viv_close(conn);
+ return 0;
+}
+
diff --git a/src/replay/cube_cmd.h b/src/replay/cube_cmd.h
new file mode 100644
index 0000000..9265ddd
--- /dev/null
+++ b/src/replay/cube_cmd.h
@@ -0,0 +1,838 @@
+
+uint32_t cmdbuf1[] = { /* seq 85 */
+ 0x18000000, /* NOP (make space for PIPE switch) */
+ 0x00000000,
+ 0x18000000,
+ 0x00000000,
+ 0x18000000,
+ 0x00000000,
+ 0x18000000,
+ 0x00000000,
+/* set up */
+ 0x08010e05, /* LOAD_STATE (1) Base: 0x03814 Size: 1 Fixp: 0 */
+ 0x00000001, /* GLOBAL.VERTEX_ELEMENT_CONFIG := 0x1 */
+ 0x08010380, /* LOAD_STATE (1) Base: 0x00E00 Size: 1 Fixp: 0 */
+ 0x00000001, /* RA.CONTROL := 0x1 */
+ 0x0801028b, /* LOAD_STATE (1) Base: 0x00A2C Size: 1 Fixp: 0 */
+ 0x34000001, /* PA.W_CLIP_LIMIT := 0x34000001 */
+ 0x0801028a, /* LOAD_STATE (1) Base: 0x00A28 Size: 1 Fixp: 0 */
+ 0x00000011, /* PA.SYSTEM_MODE := 0x11 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xff3fffff, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=0,UNK23=0,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x08010306, /* LOAD_STATE (1) Base: 0x00C18 Size: 1 Fixp: 0 */
+ 0x00000000, /* SE.LAST_PIXEL_ENABLE := 0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* GLOBAL.FLUSH_CACHE := DEPTH=0,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801050b, /* LOAD_STATE (1) Base: 0x0142C Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.COLOR_FORMAT := 0xfffcffff */
+ 0x0801050a, /* LOAD_STATE (1) Base: 0x01428 Size: 1 Fixp: 0 */
+ 0xfffcfffc, /* PE.ALPHA_CONFIG := 0xfffcfffc */
+ 0x0801050a, /* LOAD_STATE (1) Base: 0x01428 Size: 1 Fixp: 0 */
+ 0xff1bff1b, /* PE.ALPHA_CONFIG := 0xff1bff1b */
+ 0x0801050a, /* LOAD_STATE (1) Base: 0x01428 Size: 1 Fixp: 0 */
+ 0xf0f7f0f7, /* PE.ALPHA_CONFIG := 0xf0f7f0f7 */
+ 0x0801050a, /* LOAD_STATE (1) Base: 0x01428 Size: 1 Fixp: 0 */
+ 0x0fff0fff, /* PE.ALPHA_CONFIG := 0xfff0fff */
+ 0x08010509, /* LOAD_STATE (1) Base: 0x01424 Size: 1 Fixp: 0 */
+ 0x00000000, /* PE.ALPHA_BLEND_COLOR := 0x0 */
+ 0x08010508, /* LOAD_STATE (1) Base: 0x01420 Size: 1 Fixp: 0 */
+ 0xfffffffc, /* PE.ALPHA_OP := ALPHA_TEST=0,ALPHA_TEST_MASK=0,ALPHA_FUNC=ALWAYS,ALPHA_FUNC_MASK=1(residue:ffffff0c) */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xfffff8ff, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=OFF,CULL_FACE_MODE_MASK=0,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xffffcfff, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1(residue:ffffc0ff) */
+ 0x08010507, /* LOAD_STATE (1) Base: 0x0141C Size: 1 Fixp: 0 */
+ 0xffff00df, /* PE.STENCIL_CONFIG := 0xffff00df */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0xfffffff7, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=0,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=1(residue:fff0fff0) */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0xfff7ffff, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=1,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=0(residue:fff0fff0) */
+ 0x08010507, /* LOAD_STATE (1) Base: 0x0141C Size: 1 Fixp: 0 */
+ 0xffffffbf, /* PE.STENCIL_CONFIG := 0xffffffbf */
+ 0x08010507, /* LOAD_STATE (1) Base: 0x0141C Size: 1 Fixp: 0 */
+ 0xffffff7f, /* PE.STENCIL_CONFIG := 0xffffff7f */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0xfffff0ff, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=1,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=1(residue:fff0f0f0) */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1(residue:fffcf0ff) */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0xf0ffffff, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=1,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=1(residue:f0f0fff0) */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1(residue:fffcf0ff) */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0xffff0fff, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=1,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=1(residue:fff00ff0) */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1(residue:fffcf0ff) */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0x0fffffff, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=1,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=1(residue:0ff0fff0) */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1(residue:fffcf0ff) */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0xffffff0f, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=1,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=1(residue:fff0ff00) */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1(residue:fffcf0ff) */
+ 0x08010506, /* LOAD_STATE (1) Base: 0x01418 Size: 1 Fixp: 0 */
+ 0xff0fffff, /* PE.STENCIL_OP := STENCIL_FUNC_FRONT=ALWAYS,STENCIL_FUNC_FRONT_MASK=1,STENCIL_FUNC_BACK=ALWAYS,STENCIL_FUNC_BACK_MASK=1(residue:ff00fff0) */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1(residue:fffcf0ff) */
+ 0x0801050b, /* LOAD_STATE (1) Base: 0x0142C Size: 1 Fixp: 0 */
+ 0xffffefff, /* PE.COLOR_FORMAT := 0xffffefff */
+ 0x08010304, /* LOAD_STATE (1) Base: 0x00C10 Size: 1 Fixp: 0 */
+ 0x00000000, /* SE.DEPTH_SCALE := 0x0 */
+ 0x08010305, /* LOAD_STATE (1) Base: 0x00C14 Size: 1 Fixp: 0 */
+ 0x00000000, /* SE.DEPTH_BIAS := 0x0 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xffffafff, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=SOLID,FILL_MODE_MASK=0,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xfff9ffff, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=SMOOTH,SHADE_MODEL_MASK=0,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x0801050b, /* LOAD_STATE (1) Base: 0x0142C Size: 1 Fixp: 0 */
+ 0xffdfffe5, /* PE.COLOR_FORMAT := 0xffdfffe5 */
+ 0x0801050c, /* LOAD_STATE (1) Base: 0x01430 Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* PE.COLOR_ADDR := *rt_physical */
+ 0x0801050d, /* LOAD_STATE (1) Base: 0x01434 Size: 1 Fixp: 0 */
+ 0x00000700, /* PE.COLOR_STRIDE := 0x700 */
+ 0x08010e06, /* LOAD_STATE (1) Base: 0x03818 Size: 1 Fixp: 0 */
+ 0xfff40ef4, /* GLOBAL.MULTI_SAMPLE_CONFIG := 0xfff40ef4 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* GLOBAL.FLUSH_CACHE := DEPTH=0,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801050b, /* LOAD_STATE (1) Base: 0x0142C Size: 1 Fixp: 0 */
+ 0xfffdffff, /* PE.COLOR_FORMAT := 0xfffdffff */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* GLOBAL.FLUSH_CACHE := DEPTH=0,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010598, /* LOAD_STATE (1) Base: 0x01660 Size: 1 Fixp: 0 */
+ 0x00000000, /* TS.COLOR_CLEAR_VALUE := 0x0 */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a003200, /* TS.COLOR_STATUS_BASE := *rt_ts_physical */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := *rt_physical */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x00000002, /* TS.MEM_CONFIG := 0x2 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xf7ffffcf, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1(residue:f7fff0cf) */
+ 0x08010504, /* LOAD_STATE (1) Base: 0x01410 Size: 1 Fixp: 0 */
+ 0x7e6a0000, /* PE.DEPTH_ADDR := *z_physical */
+ 0x08010505, /* LOAD_STATE (1) Base: 0x01414 Size: 1 Fixp: 0 */
+ 0x00000380, /* PE.DEPTH_STRIDE := 0x380 */
+ 0x08010507, /* LOAD_STATE (1) Base: 0x0141C Size: 1 Fixp: 0 */
+ 0xffffffec, /* PE.STENCIL_CONFIG := 0xffffffec */
+ 0x08010515, /* LOAD_STATE (1) Base: 0x01454 Size: 1 Fixp: 0 */
+ 0x00000000, /* PE.UNK01454 := 0x0 */
+ 0x08010503, /* LOAD_STATE (1) Base: 0x0140C Size: 1 Fixp: 0 */
+ 0x477fff00, /* PE.DEPTH_NORMALIZE := 65535.000000 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffcffff, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1(residue:fffcf0ff) */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000001, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=0,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801059b, /* LOAD_STATE (1) Base: 0x0166C Size: 1 Fixp: 0 */
+ 0xffffffff, /* TS.DEPTH_CLEAR_VALUE := 0xffffffff */
+ 0x08010599, /* LOAD_STATE (1) Base: 0x01664 Size: 1 Fixp: 0 */
+ 0x7a003900, /* TS.DEPTH_STATUS_BASE := *0x7a003900 */
+ 0x0801059a, /* LOAD_STATE (1) Base: 0x01668 Size: 1 Fixp: 0 */
+ 0x7e6a0000, /* TS.DEPTH_SURFACE_BASE := *z_physical */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x0000004b, /* TS.MEM_CONFIG := 0x4b */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffdffff, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1(residue:fffdf0ff) */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a002a00, /* TS.COLOR_STATUS_BASE := *aux_rt_ts_physical */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f284000, /* TS.COLOR_SURFACE_BASE := *aux_rt_physical */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* RS.FLUSH_CACHE := 0x1 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004486, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=1,DEST_FORMAT=R5G6B5,UNK14=1,SWAP_RB=0 */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.SOURCE_ADDR := *aux_rt_physical */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.SOURCE_STRIDE := 0x400 */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.DEST_ADDR := *aux_rt_physical */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.DEST_STRIDE := 0x400 */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00040010, /* RS.WINDOW_SIZE := HEIGHT=4,WIDTH=16 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb, /* RS.KICKER := 0xbeebbeeb */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a003200, /* TS.COLOR_STATUS_BASE := *rt_ts_physical */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := *rt_physical */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a002a00, /* TS.COLOR_STATUS_BASE := *aux_rt_ts_physical */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f284000, /* TS.COLOR_SURFACE_BASE := *aux_rt_physical */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* RS.FLUSH_CACHE := 0x1 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004486, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=1,DEST_FORMAT=R5G6B5,UNK14=1,SWAP_RB=0 */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.SOURCE_ADDR := *aux_rt_physical */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.SOURCE_STRIDE := 0x400 */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.DEST_ADDR := *aux_rt_physical */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.DEST_STRIDE := 0x400 */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00040010, /* RS.WINDOW_SIZE := HEIGHT=4,WIDTH=16 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb, /* RS.KICKER := 0xbeebbeeb */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a003200, /* TS.COLOR_STATUS_BASE := *rt_ts_physical */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := *rt_physical */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a002a00, /* TS.COLOR_STATUS_BASE := *aux_rt_ts_physical */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f284000, /* TS.COLOR_SURFACE_BASE := *aux_rt_physical */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* RS.FLUSH_CACHE := 0x1 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004486, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=1,DEST_FORMAT=R5G6B5,UNK14=1,SWAP_RB=0 */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.SOURCE_ADDR := *aux_rt_physical */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.SOURCE_STRIDE := 0x400 */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.DEST_ADDR := *aux_rt_physical */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.DEST_STRIDE := 0x400 */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00040010, /* RS.WINDOW_SIZE := HEIGHT=4,WIDTH=16 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb, /* RS.KICKER := 0xbeebbeeb */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a003200, /* TS.COLOR_STATUS_BASE := *rt_ts_physical */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := *rt_physical */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000705, /* GLOBAL.SEMAPHORE_TOKEN := FROM=RA,TO=PE */
+ 0x08010f00, /* LOAD_STATE (1) Base: 0x03C00 Size: 1 Fixp: 0 */
+ 0x00000705, /* GLOBAL.STALL_TOKEN := FROM=RA,TO=PE */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00000606, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=0,DEST_FORMAT=A8R8G8B8,UNK14=0,SWAP_RB=0 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* RS.DITHER[1] := 0xffffffff */
+ 0x00000100, /* PAD */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7a003200, /* RS.DEST_ADDR := *rt_ts_physical */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000040, /* RS.DEST_STRIDE := 0x40 */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x001c0010, /* RS.WINDOW_SIZE := HEIGHT=28,WIDTH=16 */
+ 0x08010590, /* LOAD_STATE (1) Base: 0x01640 Size: 1 Fixp: 0 */
+ 0x55555555, /* RS.FILL_VALUE[0] := 0x55555555 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x0001ffff, /* RS.CLEAR_CONTROL := BITS=0xffff,MODE=0x1 */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb, /* RS.KICKER := 0xbeebbeeb */
+
+ 0x08010598, /* LOAD_STATE (1) Base: 0x01660 Size: 1 Fixp: 0 */
+ 0xff7f7f7f, /* TS.COLOR_CLEAR_VALUE := 0xff7f7f7f */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* GLOBAL.FLUSH_CACHE := DEPTH=0,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010598, /* LOAD_STATE (1) Base: 0x01660 Size: 1 Fixp: 0 */
+ 0xff7f7f7f, /* TS.COLOR_CLEAR_VALUE := 0xff7f7f7f */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a003200, /* TS.COLOR_STATUS_BASE := *rt_ts_physical */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := *rt_physical */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x0000004b, /* TS.MEM_CONFIG := 0x4b Enable depth fast clear */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xfffffaff, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=CCW,CULL_FACE_MODE_MASK=0,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xffffcfff, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1(residue:ffffc0ff) */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffffff4, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1(residue:fffff0f4) */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xffffcfff, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1(residue:ffffc0ff) */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffff7ff, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=0(residue:fffff0ff) */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xfffffff5, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1(residue:fffff0f5) */
+ 0x08010501, /* LOAD_STATE (1) Base: 0x01404 Size: 1 Fixp: 0 */
+ 0x00000000, /* PE.DEPTH_NEAR := 0.000000 */
+ 0x08010502, /* LOAD_STATE (1) Base: 0x01408 Size: 1 Fixp: 0 */
+ 0x3f800000, /* PE.DEPTH_FAR := 1.000000 */
+ 0x08010503, /* LOAD_STATE (1) Base: 0x0140C Size: 1 Fixp: 0 */
+ 0x477fff00, /* PE.DEPTH_NORMALIZE := 65535.000000 */
+ 0x08010285, /* LOAD_STATE (1) Base: 0x00A14 Size: 1 Fixp: 0 */
+ 0x00000000, /* PA.VIEWPORT_OFFSET_Z := 0.000000 */
+ 0x08010282, /* LOAD_STATE (1) Base: 0x00A08 Size: 1 Fixp: 0 */
+ 0x3f800000, /* PA.VIEWPORT_SCALE_Z := 1.000000 */
+ 0x08010500, /* LOAD_STATE (1) Base: 0x01400 Size: 1 Fixp: 0 */
+ 0xffcfffff, /* PE.DEPTH_CONFIG := DEPTH_FUNC=ALWAYS,DEPTH_FUNC_MASK=1(residue:ffcff0ff) */
+ 0x0c010283, /* LOAD_STATE (1) Base: 0x00A0C Size: 1 Fixp: 1 */
+ 0x00c80000, /* PA.VIEWPORT_OFFSET_X = 200.000000 */
+ 0x0c010284, /* LOAD_STATE (1) Base: 0x00A10 Size: 1 Fixp: 1 */
+ 0x00780000, /* PA.VIEWPORT_OFFSET_Y = 120.000000 */
+ 0x0c010280, /* LOAD_STATE (1) Base: 0x00A00 Size: 1 Fixp: 1 */
+ 0x00c80000, /* PA.VIEWPORT_SCALE_X = 200.000000 */
+ 0x0c010281, /* LOAD_STATE (1) Base: 0x00A04 Size: 1 Fixp: 1 */
+ 0x00780000, /* PA.VIEWPORT_SCALE_Y = 120.000000 */
+ 0x0c010300, /* LOAD_STATE (1) Base: 0x00C00 Size: 1 Fixp: 1 */
+ 0x00000000, /* SE.SCISSOR_LEFT = 0.000000 */
+ 0x0c010301, /* LOAD_STATE (1) Base: 0x00C04 Size: 1 Fixp: 1 */
+ 0x00000000, /* SE.SCISSOR_TOP = 0.000000 */
+ 0x0c010302, /* LOAD_STATE (1) Base: 0x00C08 Size: 1 Fixp: 1 */
+ 0x01900005, /* SE.SCISSOR_RIGHT = 400.000076 */
+ 0x0c010303, /* LOAD_STATE (1) Base: 0x00C0C Size: 1 Fixp: 1 */
+ 0x00f00005, /* SE.SCISSOR_BOTTOM = 240.000076 */
+
+/* shader setup */
+ 0x08010200, /* LOAD_STATE (1) Base: 0x00800 Size: 1 Fixp: 0 */
+ 0x00000018, /* VS.END_PC := 0x18 */
+ 0x08030202, /* LOAD_STATE (1) Base: 0x00808 Size: 3 Fixp: 0 */
+ 0x00000103, /* VS.INPUT_COUNT := COUNT=0x3,COUNT2=0x1 */
+ 0x00000006, /* VS.TEMP_REGISTER_CONTROL := NUM_TEMPS=0x6 */
+ 0x00000004, /* VS.OUTPUT[0] := 0x4 */
+ 0x0801020e, /* LOAD_STATE (1) Base: 0x00838 Size: 1 Fixp: 0 */
+ 0x00000000, /* VS.START_PC := 0x0 */
+ 0x0801142d, /* LOAD_STATE (1) Base: 0x050B4 Size: 1 Fixp: 0 */
+ 0x3f000000, /* VS.UNIFORMS[45] := 0.500000 u11.y */
+ 0x0801142c, /* LOAD_STATE (1) Base: 0x050B0 Size: 1 Fixp: 0 */
+ 0x3f800000, /* VS.UNIFORMS[44] := 1.000000 u11.x */
+ 0x0801141b, /* LOAD_STATE (1) Base: 0x0506C Size: 1 Fixp: 0 */
+ 0x00000000, /* VS.UNIFORMS[27] := 0.000000 u6.w */
+ 0x08011417, /* LOAD_STATE (1) Base: 0x0505C Size: 1 Fixp: 0 */
+ 0x41a00000, /* VS.UNIFORMS[23] := 20.000000 u5.w */
+ 0x08011413, /* LOAD_STATE (1) Base: 0x0504C Size: 1 Fixp: 0 */
+ 0x40000000, /* VS.UNIFORMS[19] := 2.000000 u4.w */
+ 0x08601000, /* LOAD_STATE (1) Base: 0x04000 Size: 96 Fixp: 0 */
+ 0x01831009, /* VS.INST_MEM[0] := 0x1831009 */
+ 0x00000000, /* VS.INST_MEM[1] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[2] := 0x0 */
+ 0x203fc048, /* VS.INST_MEM[3] := 0x203fc048 */
+ 0x02031009, /* VS.INST_MEM[4] := 0x2031009 */
+ 0x00000000, /* VS.INST_MEM[5] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[6] := 0x0 */
+ 0x203fc058, /* VS.INST_MEM[7] := 0x203fc058 */
+ 0x07841003, /* VS.INST_MEM[8] := 0x7841003 */
+ 0x39000800, /* VS.INST_MEM[9] := 0x39000800 */
+ 0x00000050, /* VS.INST_MEM[10] := 0x50 */
+ 0x00000000, /* VS.INST_MEM[11] := 0x0 */
+ 0x07841002, /* VS.INST_MEM[12] := 0x7841002 */
+ 0x39001800, /* VS.INST_MEM[13] := 0x39001800 */
+ 0x00aa0050, /* VS.INST_MEM[14] := 0xaa0050 */
+ 0x00390048, /* VS.INST_MEM[15] := 0x390048 */
+ 0x07841002, /* VS.INST_MEM[16] := 0x7841002 */
+ 0x39002800, /* VS.INST_MEM[17] := 0x39002800 */
+ 0x01540050, /* VS.INST_MEM[18] := 0x1540050 */
+ 0x00390048, /* VS.INST_MEM[19] := 0x390048 */
+ 0x07841002, /* VS.INST_MEM[20] := 0x7841002 */
+ 0x39003800, /* VS.INST_MEM[21] := 0x39003800 */
+ 0x01fe0050, /* VS.INST_MEM[22] := 0x1fe0050 */
+ 0x00390048, /* VS.INST_MEM[23] := 0x390048 */
+ 0x03851003, /* VS.INST_MEM[24] := 0x3851003 */
+ 0x29004800, /* VS.INST_MEM[25] := 0x29004800 */
+ 0x000000d0, /* VS.INST_MEM[26] := 0xd0 */
+ 0x00000000, /* VS.INST_MEM[27] := 0x0 */
+ 0x03851002, /* VS.INST_MEM[28] := 0x3851002 */
+ 0x29005800, /* VS.INST_MEM[29] := 0x29005800 */
+ 0x00aa00d0, /* VS.INST_MEM[30] := 0xaa00d0 */
+ 0x00290058, /* VS.INST_MEM[31] := 0x290058 */
+ 0x03811002, /* VS.INST_MEM[32] := 0x3811002 */
+ 0x29006800, /* VS.INST_MEM[33] := 0x29006800 */
+ 0x015400d0, /* VS.INST_MEM[34] := 0x15400d0 */
+ 0x00290058, /* VS.INST_MEM[35] := 0x290058 */
+ 0x07851003, /* VS.INST_MEM[36] := 0x7851003 */
+ 0x39007800, /* VS.INST_MEM[37] := 0x39007800 */
+ 0x00000050, /* VS.INST_MEM[38] := 0x50 */
+ 0x00000000, /* VS.INST_MEM[39] := 0x0 */
+ 0x07851002, /* VS.INST_MEM[40] := 0x7851002 */
+ 0x39008800, /* VS.INST_MEM[41] := 0x39008800 */
+ 0x00aa0050, /* VS.INST_MEM[42] := 0xaa0050 */
+ 0x00390058, /* VS.INST_MEM[43] := 0x390058 */
+ 0x07851002, /* VS.INST_MEM[44] := 0x7851002 */
+ 0x39009800, /* VS.INST_MEM[45] := 0x39009800 */
+ 0x01540050, /* VS.INST_MEM[46] := 0x1540050 */
+ 0x00390058, /* VS.INST_MEM[47] := 0x390058 */
+ 0x07801002, /* VS.INST_MEM[48] := 0x7801002 */
+ 0x3900a800, /* VS.INST_MEM[49] := 0x3900a800 */
+ 0x01fe0050, /* VS.INST_MEM[50] := 0x1fe0050 */
+ 0x00390058, /* VS.INST_MEM[51] := 0x390058 */
+ 0x0401100c, /* VS.INST_MEM[52] := 0x401100c */
+ 0x00000000, /* VS.INST_MEM[53] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[54] := 0x0 */
+ 0x003fc008, /* VS.INST_MEM[55] := 0x3fc008 */
+ 0x03801002, /* VS.INST_MEM[56] := 0x3801002 */
+ 0x69000800, /* VS.INST_MEM[57] := 0x69000800 */
+ 0x01fe00c0, /* VS.INST_MEM[58] := 0x1fe00c0 */
+ 0x00290038, /* VS.INST_MEM[59] := 0x290038 */
+ 0x03831005, /* VS.INST_MEM[60] := 0x3831005 */
+ 0x29000800, /* VS.INST_MEM[61] := 0x29000800 */
+ 0x01480040, /* VS.INST_MEM[62] := 0x1480040 */
+ 0x00000000, /* VS.INST_MEM[63] := 0x0 */
+ 0x0383100d, /* VS.INST_MEM[64] := 0x383100d */
+ 0x00000000, /* VS.INST_MEM[65] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[66] := 0x0 */
+ 0x00000038, /* VS.INST_MEM[67] := 0x38 */
+ 0x03801003, /* VS.INST_MEM[68] := 0x3801003 */
+ 0x29000800, /* VS.INST_MEM[69] := 0x29000800 */
+ 0x014801c0, /* VS.INST_MEM[70] := 0x14801c0 */
+ 0x00000000, /* VS.INST_MEM[71] := 0x0 */
+ 0x00801005, /* VS.INST_MEM[72] := 0x801005 */
+ 0x29001800, /* VS.INST_MEM[73] := 0x29001800 */
+ 0x01480040, /* VS.INST_MEM[74] := 0x1480040 */
+ 0x00000000, /* VS.INST_MEM[75] := 0x0 */
+ 0x0080108f, /* VS.INST_MEM[76] := 0x80108f */
+ 0x3fc06800, /* VS.INST_MEM[77] := 0x3fc06800 */
+ 0x00000050, /* VS.INST_MEM[78] := 0x50 */
+ 0x203fc068, /* VS.INST_MEM[79] := 0x203fc068 */
+ 0x03801003, /* VS.INST_MEM[80] := 0x3801003 */
+ 0x00000800, /* VS.INST_MEM[81] := 0x800 */
+ 0x01480140, /* VS.INST_MEM[82] := 0x1480140 */
+ 0x00000000, /* VS.INST_MEM[83] := 0x0 */
+ 0x04001009, /* VS.INST_MEM[84] := 0x4001009 */
+ 0x00000000, /* VS.INST_MEM[85] := 0x0 */
+ 0x00000000, /* VS.INST_MEM[86] := 0x0 */
+ 0x200000b8, /* VS.INST_MEM[87] := 0x200000b8 */
+ 0x02041001, /* VS.INST_MEM[88] := 0x2041001 */
+ 0x2a804800, /* VS.INST_MEM[89] := 0x2a804800 */
+ 0x00000000, /* VS.INST_MEM[90] := 0x0 */
+ 0x003fc048, /* VS.INST_MEM[91] := 0x3fc048 */
+ 0x02041003, /* VS.INST_MEM[92] := 0x2041003 */
+ 0x2a804800, /* VS.INST_MEM[93] := 0x2a804800 */
+ 0x00aa05c0, /* VS.INST_MEM[94] := 0xaa05c0 */
+ 0x00000002, /* VS.INST_MEM[95] := 0x2 */
+ 0x00000000, /* PAD */
+ 0x08010380, /* LOAD_STATE (1) Base: 0x00E00 Size: 1 Fixp: 0 */
+ 0x00000001, /* RA.CONTROL := 0x1 */
+ 0x08020400, /* LOAD_STATE (1) Base: 0x01000 Size: 2 Fixp: 0 */
+ 0x00000001, /* PS.END_PC := 0x1 */
+ 0x00000001, /* PS.OUTPUT_REG := 0x1 */
+ 0x00000001, /* PAD */
+ 0x08010406, /* LOAD_STATE (1) Base: 0x01018 Size: 1 Fixp: 0 */
+ 0x00000000, /* PS.START_PC := 0x0 */
+ 0x08010290, /* LOAD_STATE (1) Base: 0x00A40 Size: 1 Fixp: 0 */
+ 0x00000200, /* PA.SHADER_ATTRIBUTES[0] := 0x200 */
+ 0x08010e08, /* LOAD_STATE (1) Base: 0x03820 Size: 1 Fixp: 0 */
+ 0x00000004, /* GLOBAL.PS_VARYING_NUM_COMPONENTS := VAR0=0x4,VAR1=0x0,VAR2=0x0,VAR3=0x0,VAR4=0x0,VAR5=0x0,VAR6=0x0,VAR7=0x0 */
+ 0x08020e0a, /* LOAD_STATE (1) Base: 0x03828 Size: 2 Fixp: 0 */
+ 0x00000055, /* GLOBAL.PS_VARYING_COMPONENT_USE[0] := COMP0=USED,COMP1=USED,COMP2=USED,COMP3=USED,COMP4=UNUSED,COMP5=UNUSED,COMP6=UNUSED,COMP7=UNUSED,COMP8=UNUSED,COMP9=UNUSED,COMP10=UNUSED,COMP11=UNUSED,COMP12=UNUSED,COMP13=UNUSED,COMP14=UNUSED,COMP15=UNUSED */
+ 0x00000000, /* GLOBAL.PS_VARYING_COMPONENT_USE[1] := COMP0=UNUSED,COMP1=UNUSED,COMP2=UNUSED,COMP3=UNUSED,COMP4=UNUSED,COMP5=UNUSED,COMP6=UNUSED,COMP7=UNUSED,COMP8=UNUSED,COMP9=UNUSED,COMP10=UNUSED,COMP11=UNUSED,COMP12=UNUSED,COMP13=UNUSED,COMP14=UNUSED,COMP15=UNUSED */
+ 0x01140000, /* PAD */
+ 0x08041800, /* LOAD_STATE (1) Base: 0x06000 Size: 4 Fixp: 0 */
+ 0x00000000, /* PS.INST_MEM[0] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[1] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[2] := 0x0 */
+ 0x00000000, /* PS.INST_MEM[3] := 0x0 */
+ 0x017a0000, /* PAD */
+
+/* glDrawArrays 1 */
+ 0x08010402, /* LOAD_STATE (1) Base: 0x01008 Size: 1 Fixp: 0 */
+ 0x00001f02, /* PS.INPUT_COUNT := COUNT=0x2,COUNT2=0x1f */
+ 0x08010403, /* LOAD_STATE (1) Base: 0x0100C Size: 1 Fixp: 0 */
+ 0x00000002, /* PS.TEMP_REGISTER_CONTROL := NUM_TEMPS=0x2 */
+ 0x08010404, /* LOAD_STATE (1) Base: 0x01010 Size: 1 Fixp: 0 */
+ 0x00000002, /* PS.CONTROL := 0x2 */
+ 0x0801028c, /* LOAD_STATE (1) Base: 0x00A30 Size: 1 Fixp: 0 */
+ 0x00000100, /* PA.ATTRIBUTE_ELEMENT_COUNT := 0x100 */
+ 0x08010e07, /* LOAD_STATE (1) Base: 0x0381C Size: 1 Fixp: 0 */
+ 0x00000004, /* GLOBAL.VS_VARYING_NUM_COMPONENTS := VAR0=0x4,VAR1=0x0,VAR2=0x0,VAR3=0x0,VAR4=0x0,VAR5=0x0,VAR6=0x0,VAR7=0x0 */
+ 0x0801020c, /* LOAD_STATE (1) Base: 0x00830 Size: 1 Fixp: 0 */
+ 0x0f3f0582, /* VS.LOAD_BALANCING := 0xf3f0582 */
+ 0x08010201, /* LOAD_STATE (1) Base: 0x00804 Size: 1 Fixp: 0 */
+ 0x00000002, /* VS.OUTPUT_COUNT := 0x2 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xfffffff3, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=0,POINT_SIZE_MASK=0,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x08101400, /* LOAD_STATE (1) Base: 0x05000 Size: 16 Fixp: 0 */
+ 0x3fbf00b4, /* VS.UNIFORMS[0] := 1.492209 mvp[0][0] u0 */
+ 0x3fa8f7a3, /* VS.UNIFORMS[1] := 1.320057 mvp[0][1] */
+ 0xc01d7d33, /* VS.UNIFORMS[2] := -2.460767 mvp[0][2] */
+ 0xbf1d7d33, /* VS.UNIFORMS[3] := -0.615192 mvp[0][3] */
+ 0x3e86b73c, /* VS.UNIFORMS[4] := 0.263117 mvp[1][0] u1 */
+ 0x403303b5, /* VS.UNIFORMS[5] := 2.797101 mvp[1][1] */
+ 0x401c0ad2, /* VS.UNIFORMS[6] := 2.438160 mvp[1][2] */
+ 0x3f1c0ad2, /* VS.UNIFORMS[7] := 0.609540 mvp[1][3] */
+ 0xbfc1f304, /* VS.UNIFORMS[8] := -1.515229 mvp[2][0] u2 */
+ 0x3fe49248, /* VS.UNIFORMS[9] := 1.785714 mvp[2][1]*/
+ 0xbfffffff, /* VS.UNIFORMS[10] := -2.000000 mvp[2][2] */
+ 0xbeffffff, /* VS.UNIFORMS[11] := -0.500000 mvp[2][3] */
+ 0x00000000, /* VS.UNIFORMS[12] := 0.000000 mvp[3][0] u3 */
+ 0x00000000, /* VS.UNIFORMS[13] := 0.000000 mvp[3][1] */
+ 0x40000000, /* VS.UNIFORMS[14] := 2.000000 mvp[3][2] */
+ 0x41000000, /* VS.UNIFORMS[15] := 8.000000 mvp[3][3] */
+ 0x00003152, /* PAD */
+ 0x08031410, /* LOAD_STATE (1) Base: 0x05040 Size: 3 Fixp: 0 */
+ 0x3f3244ed, /* VS.UNIFORMS[16] := 0.696364 normal[0][0] u4 */
+ 0x3ebd3e50, /* VS.UNIFORMS[17] := 0.369616 normal[0][1] */
+ 0x3f1d7d33, /* VS.UNIFORMS[18] := 0.615192 normal[0][2] */
+ 0x08031414, /* LOAD_STATE (1) Base: 0x05050 Size: 3 Fixp: 0 */
+ 0x3dfb782d, /* VS.UNIFORMS[20] := 0.122788 normal[1][0] u5 */
+ 0x3f487f08, /* VS.UNIFORMS[21] := 0.783188 normal[1][1] */
+ 0xbf1c0ad2, /* VS.UNIFORMS[22] := -0.609540 normal[1][2] */
+ 0x08031418, /* LOAD_STATE (1) Base: 0x05060 Size: 3 Fixp: 0 */
+ 0xbf3504f3, /* VS.UNIFORMS[24] := -0.707107 normal[2][0] u6 */
+ 0x3effffff, /* VS.UNIFORMS[25] := 0.500000 normal[2][1] */
+ 0x3effffff, /* VS.UNIFORMS[26] := 0.500000 normal[2][2] */
+ 0x0810141c, /* LOAD_STATE (1) Base: 0x05070 Size: 16 Fixp: 0 */
+ 0x3f3244ed, /* VS.UNIFORMS[28] := 0.696364 mv[0][0] u7 */
+ 0x3ebd3e50, /* VS.UNIFORMS[29] := 0.369616 mv[0][1] */
+ 0x3f1d7d33, /* VS.UNIFORMS[30] := 0.615192 mv[0][2] */
+ 0x00000000, /* VS.UNIFORMS[31] := 0.000000 mv[0][3] */
+ 0x3dfb782d, /* VS.UNIFORMS[32] := 0.122788 mv[1][0] u8 */
+ 0x3f487f08, /* VS.UNIFORMS[33] := 0.783188 mv[1][1] */
+ 0xbf1c0ad2, /* VS.UNIFORMS[34] := -0.609540 mv[1][2] */
+ 0x00000000, /* VS.UNIFORMS[35] := 0.000000 mv[1][3] */
+ 0xbf3504f3, /* VS.UNIFORMS[36] := -0.707107 mv[2][0] u9 */
+ 0x3effffff, /* VS.UNIFORMS[37] := 0.500000 mv[2][1] */
+ 0x3effffff, /* VS.UNIFORMS[38] := 0.500000 mv[2][2] */
+ 0x00000000, /* VS.UNIFORMS[39] := 0.000000 mv[2][3] */
+ 0x00000000, /* VS.UNIFORMS[40] := 0.000000 mv[3][0] u10 */
+ 0x00000000, /* VS.UNIFORMS[41] := 0.000000 mv[3][1] */
+ 0xc1000000, /* VS.UNIFORMS[42] := -8.000000 mv[3][2] */
+ 0x3f800000, /* VS.UNIFORMS[43] := 1.000000 mv[3][3] */
+ 0x00000201, /* PAD */
+ 0x08010193, /* LOAD_STATE (1) Base: 0x0064C Size: 1 Fixp: 0 */
+ 0x7c24de80, /* FE.VERTEX_STREAM_BASE_ADDR := *0x7c24de80 */
+ 0x08010194, /* LOAD_STATE (1) Base: 0x00650 Size: 1 Fixp: 0 */
+ 0x00000024, /* FE.VERTEX_STREAM_CONTROL := VERTEX_STRIDE=0x24 */
+ 0x08010180, /* LOAD_STATE (1) Base: 0x00600 Size: 1 Fixp: 0 */
+ 0x0c003008, /* FE.VERTEX_ELEMENT_CONFIG[0] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x08010181, /* LOAD_STATE (1) Base: 0x00604 Size: 1 Fixp: 0 */
+ 0x180c3008, /* FE.VERTEX_ELEMENT_CONFIG[1] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0xc,END=0x18 */
+ 0x08010182, /* LOAD_STATE (1) Base: 0x00608 Size: 1 Fixp: 0 */
+ 0x24183088, /* FE.VERTEX_ELEMENT_CONFIG[2] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0x18,END=0x24 */
+ 0x08010208, /* LOAD_STATE (1) Base: 0x00820 Size: 1 Fixp: 0 */
+ 0x00020100, /* VS.INPUT[0] := 0x20100 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xffffffcf, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=0,POINT_SPRITE_MASK=0,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x28000000, /* DRAW_PRIMITIVES (5) */
+ 0x00000005, /* */
+ 0x00000000, /* */
+ 0x00000002, /* */
+
+/* glDrawArrays 2 */
+ 0x08010402, /* LOAD_STATE (1) Base: 0x01008 Size: 1 Fixp: 0 */
+ 0x00001f02, /* PS.INPUT_COUNT := COUNT=0x2,COUNT2=0x1f */
+ 0x08010403, /* LOAD_STATE (1) Base: 0x0100C Size: 1 Fixp: 0 */
+ 0x00000002, /* PS.TEMP_REGISTER_CONTROL := NUM_TEMPS=0x2 */
+ 0x08010404, /* LOAD_STATE (1) Base: 0x01010 Size: 1 Fixp: 0 */
+ 0x00000002, /* PS.CONTROL := 0x2 */
+ 0x0801028c, /* LOAD_STATE (1) Base: 0x00A30 Size: 1 Fixp: 0 */
+ 0x00000100, /* PA.ATTRIBUTE_ELEMENT_COUNT := 0x100 */
+ 0x08010e07, /* LOAD_STATE (1) Base: 0x0381C Size: 1 Fixp: 0 */
+ 0x00000004, /* GLOBAL.VS_VARYING_NUM_COMPONENTS := VAR0=0x4,VAR1=0x0,VAR2=0x0,VAR3=0x0,VAR4=0x0,VAR5=0x0,VAR6=0x0,VAR7=0x0 */
+ 0x0801020c, /* LOAD_STATE (1) Base: 0x00830 Size: 1 Fixp: 0 */
+ 0x0f3f0582, /* VS.LOAD_BALANCING := 0xf3f0582 */
+ 0x08010201, /* LOAD_STATE (1) Base: 0x00804 Size: 1 Fixp: 0 */
+ 0x00000002, /* VS.OUTPUT_COUNT := 0x2 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xfffffff3, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=0,POINT_SIZE_MASK=0,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x08010193, /* LOAD_STATE (1) Base: 0x0064C Size: 1 Fixp: 0 */
+ 0x7c24df10, /* FE.VERTEX_STREAM_BASE_ADDR := *0x7c24df10 */
+ 0x08010194, /* LOAD_STATE (1) Base: 0x00650 Size: 1 Fixp: 0 */
+ 0x00000024, /* FE.VERTEX_STREAM_CONTROL := VERTEX_STRIDE=0x24 */
+ 0x08010180, /* LOAD_STATE (1) Base: 0x00600 Size: 1 Fixp: 0 */
+ 0x0c003008, /* FE.VERTEX_ELEMENT_CONFIG[0] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x08010181, /* LOAD_STATE (1) Base: 0x00604 Size: 1 Fixp: 0 */
+ 0x180c3008, /* FE.VERTEX_ELEMENT_CONFIG[1] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0xc,END=0x18 */
+ 0x08010182, /* LOAD_STATE (1) Base: 0x00608 Size: 1 Fixp: 0 */
+ 0x24183088, /* FE.VERTEX_ELEMENT_CONFIG[2] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0x18,END=0x24 */
+ 0x08010208, /* LOAD_STATE (1) Base: 0x00820 Size: 1 Fixp: 0 */
+ 0x00020100, /* VS.INPUT[0] := 0x20100 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xffffffcf, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=0,POINT_SPRITE_MASK=0,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x28000000, /* DRAW_PRIMITIVES (5) */
+ 0x00000005, /* */
+ 0x00000004, /* */
+ 0x00000002, /* */
+
+/* glDrawArrays 3 */
+ 0x08010402, /* LOAD_STATE (1) Base: 0x01008 Size: 1 Fixp: 0 */
+ 0x00001f02, /* PS.INPUT_COUNT := COUNT=0x2,COUNT2=0x1f */
+ 0x08010403, /* LOAD_STATE (1) Base: 0x0100C Size: 1 Fixp: 0 */
+ 0x00000002, /* PS.TEMP_REGISTER_CONTROL := NUM_TEMPS=0x2 */
+ 0x08010404, /* LOAD_STATE (1) Base: 0x01010 Size: 1 Fixp: 0 */
+ 0x00000002, /* PS.CONTROL := 0x2 */
+ 0x0801028c, /* LOAD_STATE (1) Base: 0x00A30 Size: 1 Fixp: 0 */
+ 0x00000100, /* PA.ATTRIBUTE_ELEMENT_COUNT := 0x100 */
+ 0x08010e07, /* LOAD_STATE (1) Base: 0x0381C Size: 1 Fixp: 0 */
+ 0x00000004, /* GLOBAL.VS_VARYING_NUM_COMPONENTS := VAR0=0x4,VAR1=0x0,VAR2=0x0,VAR3=0x0,VAR4=0x0,VAR5=0x0,VAR6=0x0,VAR7=0x0 */
+ 0x0801020c, /* LOAD_STATE (1) Base: 0x00830 Size: 1 Fixp: 0 */
+ 0x0f3f0582, /* VS.LOAD_BALANCING := 0xf3f0582 */
+ 0x08010201, /* LOAD_STATE (1) Base: 0x00804 Size: 1 Fixp: 0 */
+ 0x00000002, /* VS.OUTPUT_COUNT := 0x2 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xfffffff3, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=0,POINT_SIZE_MASK=0,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x08010193, /* LOAD_STATE (1) Base: 0x0064C Size: 1 Fixp: 0 */
+ 0x7c24e030, /* FE.VERTEX_STREAM_BASE_ADDR := *0x7c24e030 */
+ 0x08010194, /* LOAD_STATE (1) Base: 0x00650 Size: 1 Fixp: 0 */
+ 0x00000024, /* FE.VERTEX_STREAM_CONTROL := VERTEX_STRIDE=0x24 */
+ 0x08010180, /* LOAD_STATE (1) Base: 0x00600 Size: 1 Fixp: 0 */
+ 0x0c003008, /* FE.VERTEX_ELEMENT_CONFIG[0] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x08010181, /* LOAD_STATE (1) Base: 0x00604 Size: 1 Fixp: 0 */
+ 0x180c3008, /* FE.VERTEX_ELEMENT_CONFIG[1] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0xc,END=0x18 */
+ 0x08010182, /* LOAD_STATE (1) Base: 0x00608 Size: 1 Fixp: 0 */
+ 0x24183088, /* FE.VERTEX_ELEMENT_CONFIG[2] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0x18,END=0x24 */
+ 0x08010208, /* LOAD_STATE (1) Base: 0x00820 Size: 1 Fixp: 0 */
+ 0x00020100, /* VS.INPUT[0] := 0x20100 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xffffffcf, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=0,POINT_SPRITE_MASK=0,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x28000000, /* DRAW_PRIMITIVES (5) */
+ 0x00000005, /* */
+ 0x00000008, /* */
+ 0x00000002, /* */
+
+/* glDrawArrays 4 */
+ 0x08010402, /* LOAD_STATE (1) Base: 0x01008 Size: 1 Fixp: 0 */
+ 0x00001f02, /* PS.INPUT_COUNT := COUNT=0x2,COUNT2=0x1f */
+ 0x08010403, /* LOAD_STATE (1) Base: 0x0100C Size: 1 Fixp: 0 */
+ 0x00000002, /* PS.TEMP_REGISTER_CONTROL := NUM_TEMPS=0x2 */
+ 0x08010404, /* LOAD_STATE (1) Base: 0x01010 Size: 1 Fixp: 0 */
+ 0x00000002, /* PS.CONTROL := 0x2 */
+ 0x0801028c, /* LOAD_STATE (1) Base: 0x00A30 Size: 1 Fixp: 0 */
+ 0x00000100, /* PA.ATTRIBUTE_ELEMENT_COUNT := 0x100 */
+ 0x08010e07, /* LOAD_STATE (1) Base: 0x0381C Size: 1 Fixp: 0 */
+ 0x00000004, /* GLOBAL.VS_VARYING_NUM_COMPONENTS := VAR0=0x4,VAR1=0x0,VAR2=0x0,VAR3=0x0,VAR4=0x0,VAR5=0x0,VAR6=0x0,VAR7=0x0 */
+ 0x0801020c, /* LOAD_STATE (1) Base: 0x00830 Size: 1 Fixp: 0 */
+ 0x0f3f0582, /* VS.LOAD_BALANCING := 0xf3f0582 */
+ 0x08010201, /* LOAD_STATE (1) Base: 0x00804 Size: 1 Fixp: 0 */
+ 0x00000002, /* VS.OUTPUT_COUNT := 0x2 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xfffffff3, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=0,POINT_SIZE_MASK=0,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x08010193, /* LOAD_STATE (1) Base: 0x0064C Size: 1 Fixp: 0 */
+ 0x7c24e1e0, /* FE.VERTEX_STREAM_BASE_ADDR := *0x7c24e1e0 */
+ 0x08010194, /* LOAD_STATE (1) Base: 0x00650 Size: 1 Fixp: 0 */
+ 0x00000024, /* FE.VERTEX_STREAM_CONTROL := VERTEX_STRIDE=0x24 */
+ 0x08010180, /* LOAD_STATE (1) Base: 0x00600 Size: 1 Fixp: 0 */
+ 0x0c003008, /* FE.VERTEX_ELEMENT_CONFIG[0] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x08010181, /* LOAD_STATE (1) Base: 0x00604 Size: 1 Fixp: 0 */
+ 0x180c3008, /* FE.VERTEX_ELEMENT_CONFIG[1] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0xc,END=0x18 */
+ 0x08010182, /* LOAD_STATE (1) Base: 0x00608 Size: 1 Fixp: 0 */
+ 0x24183088, /* FE.VERTEX_ELEMENT_CONFIG[2] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0x18,END=0x24 */
+ 0x08010208, /* LOAD_STATE (1) Base: 0x00820 Size: 1 Fixp: 0 */
+ 0x00020100, /* VS.INPUT[0] := 0x20100 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xffffffcf, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=0,POINT_SPRITE_MASK=0,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x28000000, /* DRAW_PRIMITIVES (5) */
+ 0x00000005, /* */
+ 0x0000000c, /* */
+ 0x00000002, /* */
+
+/* glDrawArrays 5 */
+ 0x08010402, /* LOAD_STATE (1) Base: 0x01008 Size: 1 Fixp: 0 */
+ 0x00001f02, /* PS.INPUT_COUNT := COUNT=0x2,COUNT2=0x1f */
+ 0x08010403, /* LOAD_STATE (1) Base: 0x0100C Size: 1 Fixp: 0 */
+ 0x00000002, /* PS.TEMP_REGISTER_CONTROL := NUM_TEMPS=0x2 */
+ 0x08010404, /* LOAD_STATE (1) Base: 0x01010 Size: 1 Fixp: 0 */
+ 0x00000002, /* PS.CONTROL := 0x2 */
+ 0x0801028c, /* LOAD_STATE (1) Base: 0x00A30 Size: 1 Fixp: 0 */
+ 0x00000100, /* PA.ATTRIBUTE_ELEMENT_COUNT := 0x100 */
+ 0x08010e07, /* LOAD_STATE (1) Base: 0x0381C Size: 1 Fixp: 0 */
+ 0x00000004, /* GLOBAL.VS_VARYING_NUM_COMPONENTS := VAR0=0x4,VAR1=0x0,VAR2=0x0,VAR3=0x0,VAR4=0x0,VAR5=0x0,VAR6=0x0,VAR7=0x0 */
+ 0x0801020c, /* LOAD_STATE (1) Base: 0x00830 Size: 1 Fixp: 0 */
+ 0x0f3f0582, /* VS.LOAD_BALANCING := 0xf3f0582 */
+ 0x08010201, /* LOAD_STATE (1) Base: 0x00804 Size: 1 Fixp: 0 */
+ 0x00000002, /* VS.OUTPUT_COUNT := 0x2 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xfffffff3, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=0,POINT_SIZE_MASK=0,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x08010193, /* LOAD_STATE (1) Base: 0x0064C Size: 1 Fixp: 0 */
+ 0x7c24e420, /* FE.VERTEX_STREAM_BASE_ADDR := *0x7c24e420 */
+ 0x08010194, /* LOAD_STATE (1) Base: 0x00650 Size: 1 Fixp: 0 */
+ 0x00000024, /* FE.VERTEX_STREAM_CONTROL := VERTEX_STRIDE=0x24 */
+ 0x08010180, /* LOAD_STATE (1) Base: 0x00600 Size: 1 Fixp: 0 */
+ 0x0c003008, /* FE.VERTEX_ELEMENT_CONFIG[0] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x08010181, /* LOAD_STATE (1) Base: 0x00604 Size: 1 Fixp: 0 */
+ 0x180c3008, /* FE.VERTEX_ELEMENT_CONFIG[1] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0xc,END=0x18 */
+ 0x08010182, /* LOAD_STATE (1) Base: 0x00608 Size: 1 Fixp: 0 */
+ 0x24183088, /* FE.VERTEX_ELEMENT_CONFIG[2] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0x18,END=0x24 */
+ 0x08010208, /* LOAD_STATE (1) Base: 0x00820 Size: 1 Fixp: 0 */
+ 0x00020100, /* VS.INPUT[0] := 0x20100 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xffffffcf, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=0,POINT_SPRITE_MASK=0,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x28000000, /* DRAW_PRIMITIVES (5) */
+ 0x00000005, /* */
+ 0x00000010, /* */
+ 0x00000002, /* */
+
+/* glDrawArrays 6 */
+ 0x08010402, /* LOAD_STATE (1) Base: 0x01008 Size: 1 Fixp: 0 */
+ 0x00001f02, /* PS.INPUT_COUNT := COUNT=0x2,COUNT2=0x1f */
+ 0x08010403, /* LOAD_STATE (1) Base: 0x0100C Size: 1 Fixp: 0 */
+ 0x00000002, /* PS.TEMP_REGISTER_CONTROL := NUM_TEMPS=0x2 */
+ 0x08010404, /* LOAD_STATE (1) Base: 0x01010 Size: 1 Fixp: 0 */
+ 0x00000002, /* PS.CONTROL := 0x2 */
+ 0x0801028c, /* LOAD_STATE (1) Base: 0x00A30 Size: 1 Fixp: 0 */
+ 0x00000100, /* PA.ATTRIBUTE_ELEMENT_COUNT := 0x100 */
+ 0x08010e07, /* LOAD_STATE (1) Base: 0x0381C Size: 1 Fixp: 0 */
+ 0x00000004, /* GLOBAL.VS_VARYING_NUM_COMPONENTS := VAR0=0x4,VAR1=0x0,VAR2=0x0,VAR3=0x0,VAR4=0x0,VAR5=0x0,VAR6=0x0,VAR7=0x0 */
+ 0x0801020c, /* LOAD_STATE (1) Base: 0x00830 Size: 1 Fixp: 0 */
+ 0x0f3f0582, /* VS.LOAD_BALANCING := 0xf3f0582 */
+ 0x08010201, /* LOAD_STATE (1) Base: 0x00804 Size: 1 Fixp: 0 */
+ 0x00000002, /* VS.OUTPUT_COUNT := 0x2 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xfffffff3, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=0,POINT_SIZE_MASK=0,POINT_SPRITE_ENABLE=1,POINT_SPRITE_MASK=1,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x08010193, /* LOAD_STATE (1) Base: 0x0064C Size: 1 Fixp: 0 */
+ 0x7c24e6f0, /* FE.VERTEX_STREAM_BASE_ADDR := *0x7c24e6f0 */
+ 0x08010194, /* LOAD_STATE (1) Base: 0x00650 Size: 1 Fixp: 0 */
+ 0x00000024, /* FE.VERTEX_STREAM_CONTROL := VERTEX_STRIDE=0x24 */
+ 0x08010180, /* LOAD_STATE (1) Base: 0x00600 Size: 1 Fixp: 0 */
+ 0x0c003008, /* FE.VERTEX_ELEMENT_CONFIG[0] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x08010181, /* LOAD_STATE (1) Base: 0x00604 Size: 1 Fixp: 0 */
+ 0x180c3008, /* FE.VERTEX_ELEMENT_CONFIG[1] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=0,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0xc,END=0x18 */
+ 0x08010182, /* LOAD_STATE (1) Base: 0x00608 Size: 1 Fixp: 0 */
+ 0x24183088, /* FE.VERTEX_ELEMENT_CONFIG[2] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x0,NUM=3,NORMALIZE=OFF,START=0x18,END=0x24 */
+ 0x08010208, /* LOAD_STATE (1) Base: 0x00820 Size: 1 Fixp: 0 */
+ 0x00020100, /* VS.INPUT[0] := 0x20100 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0xffffffcf, /* PA.CONFIG := UNK0=1,UNK1=1,POINT_SIZE_ENABLE=1,POINT_SIZE_MASK=1,POINT_SPRITE_ENABLE=0,POINT_SPRITE_MASK=0,UNK6=1,UNK7=1,CULL_FACE_MODE=0x3,CULL_FACE_MODE_MASK=1,UNK11=1,FILL_MODE=0x3,FILL_MODE_MASK=1,UNK15=1,SHADE_MODEL=0x3,SHADE_MODEL_MASK=1,UNK19=1,UNK20=1,UNK21=1,UNK22=1,UNK23=1,UNK24=1,UNK25=1,UNK26=1,UNK27=1,UNK28=1,UNK29=1,UNK30=1,UNK31=1 */
+ 0x28000000, /* DRAW_PRIMITIVES (5) */
+ 0x00000005, /* */
+ 0x00000014, /* */
+ 0x00000002, /* */
+
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003 /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+};
+
+uint32_t cmdbuf2[] = { /* seq 89 */
+ 0x18000000, /* NOP (make space for PIPE switch) */
+ 0x00000000,
+ 0x18000000,
+ 0x00000000,
+ 0x18000000,
+ 0x00000000,
+ 0x18000000,
+ 0x00000000,
+
+ /* flush color and depth cache three times */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+
+ /* resolve main rt to main rt */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004585, /* RS.CONFIG := SOURCE_FORMAT=X8R8G8B8,UNK7=1,DEST_FORMAT=X8R8G8B8,UNK14=1,SWAP_RB=0 */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x80001c00, /* RS.SOURCE_STRIDE := 0x80001c00 */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x80001c00, /* RS.DEST_STRIDE := 0x80001c00 */
+ 0x0801058c, /* LOAD_STATE (1) Base: 0x01630 Size: 1 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[0] := 0xffffffff */
+ 0x0801058d, /* LOAD_STATE (1) Base: 0x01634 Size: 1 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[1] := 0xffffffff */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* RS.SOURCE_ADDR := *rt_physical */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* RS.DEST_ADDR := *rt_physical */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x010001c0, /* RS.WINDOW_SIZE := HEIGHT=256,WIDTH=448 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb /* RS.KICKER := 0xbeebbeeb */
+};
+
+uint32_t cmdbuf3[] = { /* seq 91 */
+ 0x18000000, /* NOP (make space for PIPE switch) */
+ 0x00000000,
+ 0x18000000,
+ 0x00000000,
+ 0x18000000,
+ 0x00000000,
+ 0x18000000,
+ 0x00000000,
+
+ /* resolve aux target to aux target (why?!?) */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a002a00, /* TS.COLOR_STATUS_BASE := *aux_rt_ts_physical */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f284000, /* TS.COLOR_SURFACE_BASE := *aux_rt_physical */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* RS.FLUSH_CACHE := 0x1 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004486, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=1,DEST_FORMAT=R5G6B5,UNK14=1,SWAP_RB=0 */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.SOURCE_ADDR := *aux_rt_physical */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.SOURCE_STRIDE := 0x400 */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f284000, /* RS.DEST_ADDR := *aux_rt_physical */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000400, /* RS.DEST_STRIDE := 0x400 */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00040010, /* RS.WINDOW_SIZE := HEIGHT=4,WIDTH=16 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb, /* RS.KICKER := 0xbeebbeeb */
+
+ /* set up TS for main render target and flush color cache (twice) */
+ 0x08010596, /* LOAD_STATE (1) Base: 0x01658 Size: 1 Fixp: 0 */
+ 0x7a003200, /* TS.COLOR_STATUS_BASE := *0x7a003200 */
+ 0x08010597, /* LOAD_STATE (1) Base: 0x0165C Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* TS.COLOR_SURFACE_BASE := *0x7f2c8700 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* GLOBAL.FLUSH_CACHE := DEPTH=0,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x00000049, /* TS.MEM_CONFIG := 0x49 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* GLOBAL.FLUSH_CACHE := DEPTH=0,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801050b, /* LOAD_STATE (1) Base: 0x0142C Size: 1 Fixp: 0 */
+ 0xfffcffff /* PE.COLOR_FORMAT := 0xfffcffff */
+};
+
+uint32_t cmdbuf4[] = { /* seq 101 */
+ 0x18000000, /* NOP (make space for PIPE switch) */
+ 0x00000000,
+ 0x18000000,
+ 0x00000000,
+ 0x18000000,
+ 0x00000000,
+ 0x18000000,
+ 0x00000000,
+
+ /* copy pixels from render target to output bitmap */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00000585, /* RS.CONFIG := SOURCE_FORMAT=X8R8G8B8,UNK7=1,DEST_FORMAT=X8R8G8B8,UNK14=0,SWAP_RB=0 */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x80001c00, /* RS.SOURCE_STRIDE := 0x80001c00 */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000640, /* RS.DEST_STRIDE := 0x640 */
+ 0x0801058c, /* LOAD_STATE (1) Base: 0x01630 Size: 1 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[0] := 0xffffffff */
+ 0x0801058d, /* LOAD_STATE (1) Base: 0x01634 Size: 1 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[1] := 0xffffffff */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* RS.SOURCE_ADDR := *rt_physical */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f338700, /* RS.DEST_ADDR := *bmp_physical */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00f00190, /* RS.WINDOW_SIZE := HEIGHT=240,WIDTH=400 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb /* RS.KICKER := 0xbeebbeeb */
+};
+
diff --git a/src/replay/cube_cmd_gc2000.h b/src/replay/cube_cmd_gc2000.h
new file mode 100644
index 0000000..23e887b
--- /dev/null
+++ b/src/replay/cube_cmd_gc2000.h
@@ -0,0 +1,650 @@
+
+uint32_t cmdbuf1[] = { /* seq 85 */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x08010e05, /* LOAD_STATE (1) Base: 0x03814 Size: 1 Fixp: 0 */
+ 0x00000001, /* [03814] GL.VERTEX_ELEMENT_CONFIG := 0x1 */
+ 0x08010380, /* LOAD_STATE (1) Base: 0x00E00 Size: 1 Fixp: 0 */
+ 0x00000001, /* [00E00] RA.CONTROL := UNK0=1,LAST_VARYING_2X=0 */
+ 0x0801028b, /* LOAD_STATE (1) Base: 0x00A2C Size: 1 Fixp: 0 */
+ 0x34000001, /* [00A2C] PA.W_CLIP_LIMIT := 0x34000001 */
+ 0x0801028a, /* LOAD_STATE (1) Base: 0x00A28 Size: 1 Fixp: 0 */
+ 0x00000011, /* [00A28] PA.SYSTEM_MODE := UNK0=1,UNK4=1 */
+ 0x08010e13, /* LOAD_STATE (1) Base: 0x0384C Size: 1 Fixp: 0 */
+ 0x00000000, /* [0384C] GL.API_MODE := OPENGL */
+ 0x08010306, /* LOAD_STATE (1) Base: 0x00C18 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C18] SE.CONFIG := LAST_PIXEL_ENABLE=0 */
+ 0x08010304, /* LOAD_STATE (1) Base: 0x00C10 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C10] SE.DEPTH_SCALE := 0.000000 */
+ 0x08010305, /* LOAD_STATE (1) Base: 0x00C14 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C14] SE.DEPTH_BIAS := 0.000000 */
+ 0x08010306, /* LOAD_STATE (1) Base: 0x00C18 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C18] SE.CONFIG := LAST_PIXEL_ENABLE=0 */
+ 0x08010304, /* LOAD_STATE (1) Base: 0x00C10 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C10] SE.DEPTH_SCALE := 0.000000 */
+ 0x08010305, /* LOAD_STATE (1) Base: 0x00C14 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C14] SE.DEPTH_BIAS := 0.000000 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* [0380C] GL.FLUSH_CACHE := DEPTH=0,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801ffff, /* LOAD_STATE (1) Base: 0x3FFFC Size: 1 Fixp: 0 */
+ 0x00000000, /* [3FFFC] DUMMY.DUMMY := 0x0 */
+ 0x0801059d, /* LOAD_STATE (1) Base: 0x01674 Size: 1 Fixp: 0 */
+ 0x00001cc0, /* [01674] TS.DEPTH_AUTO_DISABLE_COUNT := 0x1cc0 */
+ 0x08030596, /* LOAD_STATE (1) Base: 0x01658 Size: 3 Fixp: 0 */
+ 0x15973000, /* [01658] TS.COLOR_STATUS_BASE := ADDR_H */
+ 0x15900000, /* [0165C] TS.COLOR_SURFACE_BASE := ADDR_G */
+ 0x00000000, /* [01660] TS.COLOR_CLEAR_VALUE := 0x0 */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x00000022, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=0,COLOR_FAST_CLEAR=1,DEPTH_16BPP=0,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=1,DEPTH_COMPRESSION=0,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000001, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=0,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801ffff, /* LOAD_STATE (1) Base: 0x3FFFC Size: 1 Fixp: 0 */
+ 0x00000000, /* [3FFFC] DUMMY.DUMMY := 0x0 */
+ 0x08030599, /* LOAD_STATE (1) Base: 0x01664 Size: 3 Fixp: 0 */
+ 0x15973800, /* [01664] TS.DEPTH_STATUS_BASE := ADDR_J */
+ 0x15985000, /* [01668] TS.DEPTH_SURFACE_BASE := ADDR_I */
+ 0xffffffff, /* [0166C] TS.DEPTH_CLEAR_VALUE := 0xffffffff */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x0000006b, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=1,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=1,DEPTH_COMPRESSION=1,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08010304, /* LOAD_STATE (1) Base: 0x00C10 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C10] SE.DEPTH_SCALE := 0.000000 */
+ 0x08010305, /* LOAD_STATE (1) Base: 0x00C14 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C14] SE.DEPTH_BIAS := 0.000000 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01650] RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01650] RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000705, /* [03808] GL.SEMAPHORE_TOKEN := FROM=RA,TO=PE */
+ 0x08010f00, /* LOAD_STATE (1) Base: 0x03C00 Size: 1 Fixp: 0 */
+ 0x00000705, /* [03C00] GL.STALL_TOKEN := FROM=RA,TO=PE,FLIP0=0,FLIP1=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00000606, /* [01604] RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,DOWNSAMPLE_X=0,DOWNSAMPLE_Y=0,SOURCE_TILED=0,DEST_FORMAT=A8R8G8B8,DEST_TILED=0,SWAP_RB=0,FLIP=0 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* [01630] RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* [01634] RS.DITHER[1] := 0xffffffff */
+ 0x00000000, /* PAD */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x15973000, /* [01610] RS.DEST_ADDR := ADDR_H */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000200, /* [01614] RS.DEST_STRIDE := STRIDE=0x200,MULTI=0,TILING=0 */
+ 0x08010590, /* LOAD_STATE (1) Base: 0x01640 Size: 1 Fixp: 0 */
+ 0x55555555, /* [01640] RS.FILL_VALUE[0] := 0x55555555 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x0001ffff, /* [0163C] RS.CLEAR_CONTROL := BITS=0xffff,MODE=ENABLED1 */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* [016A0] RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00040080, /* [01620] RS.WINDOW_SIZE := HEIGHT=4,WIDTH=128 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbadabeeb, /* [01600] RS.KICKER := 0xbadabeeb */
+ 0x08010598, /* LOAD_STATE (1) Base: 0x01660 Size: 1 Fixp: 0 */
+ 0xff7f7f7f, /* [01660] TS.COLOR_CLEAR_VALUE := 0xff7f7f7f */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* [0380C] GL.FLUSH_CACHE := DEPTH=0,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801ffff, /* LOAD_STATE (1) Base: 0x3FFFC Size: 1 Fixp: 0 */
+ 0x00000000, /* [3FFFC] DUMMY.DUMMY := 0x0 */
+ 0x0801059d, /* LOAD_STATE (1) Base: 0x01674 Size: 1 Fixp: 0 */
+ 0x00001cc0, /* [01674] TS.DEPTH_AUTO_DISABLE_COUNT := 0x1cc0 */
+ 0x08030596, /* LOAD_STATE (1) Base: 0x01658 Size: 3 Fixp: 0 */
+ 0x15973000, /* [01658] TS.COLOR_STATUS_BASE := ADDR_H */
+ 0x15900000, /* [0165C] TS.COLOR_SURFACE_BASE := ADDR_G */
+ 0xff7f7f7f, /* [01660] TS.COLOR_CLEAR_VALUE := 0xff7f7f7f */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x0000006b, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=1,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=1,DEPTH_COMPRESSION=1,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08101400, /* LOAD_STATE (1) Base: 0x05000 Size: 16 Fixp: 0 */
+ 0x3fbf00b4, /* [05000] VS.UNIFORMS[0] := 1.492209 (u0.x) */
+ 0x3fa8f7a5, /* [05004] VS.UNIFORMS[1] := 1.320058 (u0.y) */
+ 0xc01d7d34, /* [05008] VS.UNIFORMS[2] := -2.460767 (u0.z) */
+ 0xbf1d7d34, /* [0500C] VS.UNIFORMS[3] := -0.615192 (u0.w) */
+ 0x3e86b73c, /* [05010] VS.UNIFORMS[4] := 0.263117 (u1.x) */
+ 0x403303b5, /* [05014] VS.UNIFORMS[5] := 2.797101 (u1.y) */
+ 0x401c0ad3, /* [05018] VS.UNIFORMS[6] := 2.438161 (u1.z) */
+ 0x3f1c0ad3, /* [0501C] VS.UNIFORMS[7] := 0.609540 (u1.w) */
+ 0xbfc1f305, /* [05020] VS.UNIFORMS[8] := -1.515229 (u2.x) */
+ 0x3fe49249, /* [05024] VS.UNIFORMS[9] := 1.785714 (u2.y) */
+ 0xbfffffff, /* [05028] VS.UNIFORMS[10] := -2.000000 (u2.z) */
+ 0xbeffffff, /* [0502C] VS.UNIFORMS[11] := -0.500000 (u2.w) */
+ 0x00000000, /* [05030] VS.UNIFORMS[12] := 0.000000 (u3.x) */
+ 0x00000000, /* [05034] VS.UNIFORMS[13] := 0.000000 (u3.y) */
+ 0x40000000, /* [05038] VS.UNIFORMS[14] := 2.000000 (u3.z) */
+ 0x41000000, /* [0503C] VS.UNIFORMS[15] := 8.000000 (u3.w) */
+ 0x80001c00, /* PAD */
+ 0x08031410, /* LOAD_STATE (1) Base: 0x05040 Size: 3 Fixp: 0 */
+ 0x3f3244ed, /* [05040] VS.UNIFORMS[16] := 0.696364 (u4.x) */
+ 0x3ebd3e53, /* [05044] VS.UNIFORMS[17] := 0.369616 (u4.y) */
+ 0x3f1d7d34, /* [05048] VS.UNIFORMS[18] := 0.615192 (u4.z) */
+ 0x08031414, /* LOAD_STATE (1) Base: 0x05050 Size: 3 Fixp: 0 */
+ 0x3dfb782d, /* [05050] VS.UNIFORMS[20] := 0.122788 (u5.x) */
+ 0x3f487f08, /* [05054] VS.UNIFORMS[21] := 0.783188 (u5.y) */
+ 0xbf1c0ad3, /* [05058] VS.UNIFORMS[22] := -0.609540 (u5.z) */
+ 0x08031418, /* LOAD_STATE (1) Base: 0x05060 Size: 3 Fixp: 0 */
+ 0xbf3504f4, /* [05060] VS.UNIFORMS[24] := -0.707107 (u6.x) */
+ 0x3f000000, /* [05064] VS.UNIFORMS[25] := 0.500000 (u6.y) */
+ 0x3effffff, /* [05068] VS.UNIFORMS[26] := 0.500000 (u6.z) */
+ 0x0810141c, /* LOAD_STATE (1) Base: 0x05070 Size: 16 Fixp: 0 */
+ 0x3f3244ed, /* [05070] VS.UNIFORMS[28] := 0.696364 (u7.x) */
+ 0x3ebd3e53, /* [05074] VS.UNIFORMS[29] := 0.369616 (u7.y) */
+ 0x3f1d7d34, /* [05078] VS.UNIFORMS[30] := 0.615192 (u7.z) */
+ 0x00000000, /* [0507C] VS.UNIFORMS[31] := 0.000000 (u7.w) */
+ 0x3dfb782d, /* [05080] VS.UNIFORMS[32] := 0.122788 (u8.x) */
+ 0x3f487f08, /* [05084] VS.UNIFORMS[33] := 0.783188 (u8.y) */
+ 0xbf1c0ad3, /* [05088] VS.UNIFORMS[34] := -0.609540 (u8.z) */
+ 0x00000000, /* [0508C] VS.UNIFORMS[35] := 0.000000 (u8.w) */
+ 0xbf3504f4, /* [05090] VS.UNIFORMS[36] := -0.707107 (u9.x) */
+ 0x3f000000, /* [05094] VS.UNIFORMS[37] := 0.500000 (u9.y) */
+ 0x3effffff, /* [05098] VS.UNIFORMS[38] := 0.500000 (u9.z) */
+ 0x00000000, /* [0509C] VS.UNIFORMS[39] := 0.000000 (u9.w) */
+ 0x00000000, /* [050A0] VS.UNIFORMS[40] := 0.000000 (u10.x) */
+ 0x00000000, /* [050A4] VS.UNIFORMS[41] := 0.000000 (u10.y) */
+ 0xc1000000, /* [050A8] VS.UNIFORMS[42] := -8.000000 (u10.z) */
+ 0x3f800000, /* [050AC] VS.UNIFORMS[43] := 1.000000 (u10.w) */
+ 0x00000002, /* PAD */
+ 0x08030180, /* LOAD_STATE (1) Base: 0x00600 Size: 3 Fixp: 0 */
+ 0x0c003088, /* [00600] FE.VERTEX_ELEMENT_CONFIG[0] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x0,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x0c003188, /* [00604] FE.VERTEX_ELEMENT_CONFIG[1] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x1,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x0c003288, /* [00608] FE.VERTEX_ELEMENT_CONFIG[2] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x2,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x08010208, /* LOAD_STATE (1) Base: 0x00820 Size: 1 Fixp: 0 */
+ 0x00020100, /* [00820] VS.INPUT[0] := I0=0,I1=1,I2=2,I3=0 */
+ 0x080301a0, /* LOAD_STATE (1) Base: 0x00680 Size: 3 Fixp: 0 */
+ 0x15000000, /* [00680] FE.VERTEX_STREAMS[0].BASE_ADDR := ADDR_A */
+ 0x15000030, /* [00684] FE.VERTEX_STREAMS[1].BASE_ADDR := ADDR_R */
+ 0x15000060, /* [00688] FE.VERTEX_STREAMS[2].BASE_ADDR := ADDR_S */
+ 0x080301a8, /* LOAD_STATE (1) Base: 0x006A0 Size: 3 Fixp: 0 */
+ 0x0000000c, /* [006A0] FE.VERTEX_STREAMS[0].CONTROL := 0xc */
+ 0x0000000c, /* [006A4] FE.VERTEX_STREAMS[1].CONTROL := 0xc */
+ 0x0000000c, /* [006A8] FE.VERTEX_STREAMS[2].CONTROL := 0xc */
+ 0x0801028b, /* LOAD_STATE (1) Base: 0x00A2C Size: 1 Fixp: 0 */
+ 0x00000000, /* [00A2C] PA.W_CLIP_LIMIT := 0x0 */
+ 0x0c020280, /* LOAD_STATE (1) Base: 0x00A00 Size: 2 Fixp: 1 */
+ 0x00c80000, /* [00A00] PA.VIEWPORT_SCALE_X = 200.000000 */
+ 0x00780000, /* [00A04] PA.VIEWPORT_SCALE_Y = 120.000000 */
+ 0x00000000, /* PAD */
+ 0x0c020283, /* LOAD_STATE (1) Base: 0x00A0C Size: 2 Fixp: 1 */
+ 0x00c80000, /* [00A0C] PA.VIEWPORT_OFFSET_X = 200.000000 */
+ 0x00780000, /* [00A10] PA.VIEWPORT_OFFSET_Y = 120.000000 */
+ 0x15000000, /* PAD */
+ 0x080102a0, /* LOAD_STATE (1) Base: 0x00A80 Size: 1 Fixp: 0 */
+ 0x37c81905, /* [00A80] PA.VIEWPORT_UNK00A80 := 0.000024 */
+ 0x0c0102a1, /* LOAD_STATE (1) Base: 0x00A84 Size: 1 Fixp: 1 */
+ 0x20000000, /* [00A84] PA.VIEWPORT_UNK00A84 = 8192.000000 */
+ 0x080102a3, /* LOAD_STATE (1) Base: 0x00A8C Size: 1 Fixp: 0 */
+ 0x38000000, /* [00A8C] PA.VIEWPORT_UNK00A8C := 0.000031 */
+ 0x0c040300, /* LOAD_STATE (1) Base: 0x00C00 Size: 4 Fixp: 1 */
+ 0x00000000, /* [00C00] SE.SCISSOR_LEFT = 0.000000 */
+ 0x00000000, /* [00C04] SE.SCISSOR_TOP = 0.000000 */
+ 0x01901000, /* [00C08] SE.SCISSOR_RIGHT = 400.062500 */
+ 0x00f01000, /* [00C0C] SE.SCISSOR_BOTTOM = 240.062500 */
+ 0x00000000, /* PAD */
+ 0x0c010308, /* LOAD_STATE (1) Base: 0x00C20 Size: 1 Fixp: 1 */
+ 0x0190ffff, /* [00C20] SE.CLIP_RIGHT = 400.999985 */
+ 0x0c010309, /* LOAD_STATE (1) Base: 0x00C24 Size: 1 Fixp: 1 */
+ 0x00f0ffff, /* [00C24] SE.CLIP_BOTTOM = 240.999985 */
+ 0x08030508, /* LOAD_STATE (1) Base: 0x01420 Size: 3 Fixp: 0 */
+ 0x00000000, /* [01420] PE.ALPHA_OP := ALPHA_TEST=0,ALPHA_FUNC=NEVER(residue:0xfffeff0c) */
+ 0x00000000, /* [01424] PE.ALPHA_BLEND_COLOR := B=0x0,G=0x0,R=0x0,A=0x0 */
+ 0x00100010, /* [01428] PE.ALPHA_CONFIG := BLEND_ENABLE_COLOR=0,SRC_FUNC_COLOR=ONE,DST_FUNC_COLOR=ZERO,EQ_COLOR=ADD,BLEND_SEPARATE_ALPHA=0,SRC_FUNC_ALPHA=ONE,DST_FUNC_ALPHA=ZERO,EQ_ALPHA=ADD */
+ 0x08010528, /* LOAD_STATE (1) Base: 0x014A0 Size: 1 Fixp: 0 */
+ 0x0000fdff, /* [014A0] PE.STENCIL_CONFIG_EXT := UNK16=0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* [0380C] GL.FLUSH_CACHE := DEPTH=0,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801050b, /* LOAD_STATE (1) Base: 0x0142C Size: 1 Fixp: 0 */
+ 0x00110f06, /* [0142C] PE.COLOR_FORMAT := FORMAT=A8R8G8B8,COMPONENTS=R=1,G=1,B=1,A=1,OVERWRITE=1,SUPER_TILED=1(residue:0xffcce0e0) */
+ 0x08010518, /* LOAD_STATE (1) Base: 0x01460 Size: 1 Fixp: 0 */
+ 0x15900000, /* [01460] PE.PIPE[0].COLOR_ADDR := ADDR_G */
+ 0x0801050c, /* LOAD_STATE (1) Base: 0x01430 Size: 1 Fixp: 0 */
+ 0x15900000, /* [01430] PE.COLOR_ADDR := ADDR_G */
+ 0x0801050d, /* LOAD_STATE (1) Base: 0x01434 Size: 1 Fixp: 0 */
+ 0x00000700, /* [01434] PE.COLOR_STRIDE := 0x700 */
+ 0x08040500, /* LOAD_STATE (1) Base: 0x01400 Size: 4 Fixp: 0 */
+ 0x05010701, /* [01400] PE.DEPTH_CONFIG := DEPTH_MODE=Z,DEPTH_FORMAT=D16,DEPTH_FUNC=ALWAYS,WRITE_ENABLE=0,EARLY_Z=1,ONLY_DEPTH=0,SUPER_TILED=1(residue:0xf2ccc0c4) */
+ 0x00000000, /* [01404] PE.DEPTH_NEAR := 0.000000 */
+ 0x3f800000, /* [01408] PE.DEPTH_FAR := 1.000000 */
+ 0x477fff00, /* [0140C] PE.DEPTH_NORMALIZE := 65535.000000 */
+ 0x150ca000, /* PAD */
+ 0x08010520, /* LOAD_STATE (1) Base: 0x01480 Size: 1 Fixp: 0 */
+ 0x15985000, /* [01480] PE.PIPE[0].DEPTH_ADDR := ADDR_I */
+ 0x08010504, /* LOAD_STATE (1) Base: 0x01410 Size: 1 Fixp: 0 */
+ 0x15985000, /* [01410] PE.DEPTH_ADDR := ADDR_I */
+ 0x08010505, /* LOAD_STATE (1) Base: 0x01414 Size: 1 Fixp: 0 */
+ 0x00000380, /* [01414] PE.DEPTH_STRIDE := 0x380 */
+ 0x08010515, /* LOAD_STATE (1) Base: 0x01454 Size: 1 Fixp: 0 */
+ 0x00000000, /* [01454] PE.HDEPTH_CONTROL := FORMAT=DISABLED */
+ 0x08010282, /* LOAD_STATE (1) Base: 0x00A08 Size: 1 Fixp: 0 */
+ 0x3f800000, /* [00A08] PA.VIEWPORT_SCALE_Z := 1.000000 */
+ 0x08010285, /* LOAD_STATE (1) Base: 0x00A14 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00A14] PA.VIEWPORT_OFFSET_Z := 0.000000 */
+ 0x08010507, /* LOAD_STATE (1) Base: 0x0141C Size: 1 Fixp: 0 */
+ 0x00000000, /* [0141C] PE.STENCIL_CONFIG := MODE=DISABLED,REF_FRONT=0x0,MASK_FRONT=0x0,WRITE_MASK=0x0(residue:0x0000000c) */
+ 0x08010e06, /* LOAD_STATE (1) Base: 0x03818 Size: 1 Fixp: 0 */
+ 0x00000000, /* [03818] GL.MULTI_SAMPLE_CONFIG := MSAA_SAMPLES=NONE,MSAA_ENABLES=0x0,UNK12=0x0,UNK16=0x0(residue:0xfff40e04) */
+ 0x08010286, /* LOAD_STATE (1) Base: 0x00A18 Size: 1 Fixp: 0 */
+ 0x3f000000, /* [00A18] PA.LINE_WIDTH := 0.500000 */
+ 0x0803028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 3 Fixp: 0 */
+ 0x00412200, /* [00A34] PA.CONFIG := POINT_SIZE_ENABLE=0,POINT_SPRITE_ENABLE=0,CULL_FACE_MODE=CCW,FILL_MODE=SOLID,SHADE_MODEL=SMOOTH,UNK22=1(residue:0xff3888c3) */
+ 0x3f000000, /* [00A38] PA.LINE_UNK00A38 := 0.500000 */
+ 0x3f000000, /* [00A3C] PA.LINE_UNK00A3C := 0.500000 */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000701, /* [03808] GL.SEMAPHORE_TOKEN := FROM=FE,TO=PE */
+ 0x48000000, /* STALL (9) */
+ 0x00000701, /* */
+ 0x08030202, /* LOAD_STATE (1) Base: 0x00808 Size: 3 Fixp: 0 */
+ 0x00000103, /* [00808] VS.INPUT_COUNT := COUNT=3,UNK8=1 */
+ 0x00000006, /* [0080C] VS.TEMP_REGISTER_CONTROL := NUM_TEMPS=6 */
+ 0x00000004, /* [00810] VS.OUTPUT[0] := O0=4,O1=0,O2=0,O3=0 */
+ 0x08010217, /* LOAD_STATE (1) Base: 0x0085C Size: 1 Fixp: 0 */
+ 0x00150000, /* [0085C] VS.RANGE := LOW=0x0,HIGH=0x15 */
+ 0x0801020e, /* LOAD_STATE (1) Base: 0x00838 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00838] VS.START_PC := 0x0 */
+ 0x08010200, /* LOAD_STATE (1) Base: 0x00800 Size: 1 Fixp: 0 */
+ 0x00000016, /* [00800] VS.END_PC := 0x16 */
+ 0x0801142c, /* LOAD_STATE (1) Base: 0x050B0 Size: 1 Fixp: 0 */
+ 0x3f800000, /* [050B0] VS.UNIFORMS[44] := 1.000000 (u11.x) */
+ 0x0801141b, /* LOAD_STATE (1) Base: 0x0506C Size: 1 Fixp: 0 */
+ 0x00000000, /* [0506C] VS.UNIFORMS[27] := 0.000000 (u6.w) */
+ 0x08011417, /* LOAD_STATE (1) Base: 0x0505C Size: 1 Fixp: 0 */
+ 0x41a00000, /* [0505C] VS.UNIFORMS[23] := 20.000000 (u5.w) */
+ 0x08011413, /* LOAD_STATE (1) Base: 0x0504C Size: 1 Fixp: 0 */
+ 0x40000000, /* [0504C] VS.UNIFORMS[19] := 2.000000 (u4.w) */
+ 0x08583000, /* LOAD_STATE (1) Base: 0x0C000 Size: 88 Fixp: 0 */
+ 0x01831009, /* [0C000] SH.UNK0C000[0] := 0x1831009 */
+ 0x00000000, /* [0C004] SH.UNK0C000[1] := 0x0 */
+ 0x00000000, /* [0C008] SH.UNK0C000[2] := 0x0 */
+ 0x203fc048, /* [0C00C] SH.UNK0C000[3] := 0x203fc048 */
+ 0x02031009, /* [0C010] SH.UNK0C000[4] := 0x2031009 */
+ 0x00000000, /* [0C014] SH.UNK0C000[5] := 0x0 */
+ 0x00000000, /* [0C018] SH.UNK0C000[6] := 0x0 */
+ 0x203fc058, /* [0C01C] SH.UNK0C000[7] := 0x203fc058 */
+ 0x07841003, /* [0C020] SH.UNK0C000[8] := 0x7841003 */
+ 0x39000800, /* [0C024] SH.UNK0C000[9] := 0x39000800 */
+ 0x00000050, /* [0C028] SH.UNK0C000[10] := 0x50 */
+ 0x00000000, /* [0C02C] SH.UNK0C000[11] := 0x0 */
+ 0x07841002, /* [0C030] SH.UNK0C000[12] := 0x7841002 */
+ 0x39001800, /* [0C034] SH.UNK0C000[13] := 0x39001800 */
+ 0x00aa0050, /* [0C038] SH.UNK0C000[14] := 0xaa0050 */
+ 0x00390048, /* [0C03C] SH.UNK0C000[15] := 0x390048 */
+ 0x07841002, /* [0C040] SH.UNK0C000[16] := 0x7841002 */
+ 0x39002800, /* [0C044] SH.UNK0C000[17] := 0x39002800 */
+ 0x01540050, /* [0C048] SH.UNK0C000[18] := 0x1540050 */
+ 0x00390048, /* [0C04C] SH.UNK0C000[19] := 0x390048 */
+ 0x07841002, /* [0C050] SH.UNK0C000[20] := 0x7841002 */
+ 0x39003800, /* [0C054] SH.UNK0C000[21] := 0x39003800 */
+ 0x01fe0050, /* [0C058] SH.UNK0C000[22] := 0x1fe0050 */
+ 0x00390048, /* [0C05C] SH.UNK0C000[23] := 0x390048 */
+ 0x03851003, /* [0C060] SH.UNK0C000[24] := 0x3851003 */
+ 0x29004800, /* [0C064] SH.UNK0C000[25] := 0x29004800 */
+ 0x000000d0, /* [0C068] SH.UNK0C000[26] := 0xd0 */
+ 0x00000000, /* [0C06C] SH.UNK0C000[27] := 0x0 */
+ 0x03851002, /* [0C070] SH.UNK0C000[28] := 0x3851002 */
+ 0x29005800, /* [0C074] SH.UNK0C000[29] := 0x29005800 */
+ 0x00aa00d0, /* [0C078] SH.UNK0C000[30] := 0xaa00d0 */
+ 0x00290058, /* [0C07C] SH.UNK0C000[31] := 0x290058 */
+ 0x03811002, /* [0C080] SH.UNK0C000[32] := 0x3811002 */
+ 0x29006800, /* [0C084] SH.UNK0C000[33] := 0x29006800 */
+ 0x015400d0, /* [0C088] SH.UNK0C000[34] := 0x15400d0 */
+ 0x00290058, /* [0C08C] SH.UNK0C000[35] := 0x290058 */
+ 0x07851003, /* [0C090] SH.UNK0C000[36] := 0x7851003 */
+ 0x39007800, /* [0C094] SH.UNK0C000[37] := 0x39007800 */
+ 0x00000050, /* [0C098] SH.UNK0C000[38] := 0x50 */
+ 0x00000000, /* [0C09C] SH.UNK0C000[39] := 0x0 */
+ 0x07851002, /* [0C0A0] SH.UNK0C000[40] := 0x7851002 */
+ 0x39008800, /* [0C0A4] SH.UNK0C000[41] := 0x39008800 */
+ 0x00aa0050, /* [0C0A8] SH.UNK0C000[42] := 0xaa0050 */
+ 0x00390058, /* [0C0AC] SH.UNK0C000[43] := 0x390058 */
+ 0x07851002, /* [0C0B0] SH.UNK0C000[44] := 0x7851002 */
+ 0x39009800, /* [0C0B4] SH.UNK0C000[45] := 0x39009800 */
+ 0x01540050, /* [0C0B8] SH.UNK0C000[46] := 0x1540050 */
+ 0x00390058, /* [0C0BC] SH.UNK0C000[47] := 0x390058 */
+ 0x07801002, /* [0C0C0] SH.UNK0C000[48] := 0x7801002 */
+ 0x3900a800, /* [0C0C4] SH.UNK0C000[49] := 0x3900a800 */
+ 0x01fe0050, /* [0C0C8] SH.UNK0C000[50] := 0x1fe0050 */
+ 0x00390058, /* [0C0CC] SH.UNK0C000[51] := 0x390058 */
+ 0x0401100c, /* [0C0D0] SH.UNK0C000[52] := 0x401100c */
+ 0x00000000, /* [0C0D4] SH.UNK0C000[53] := 0x0 */
+ 0x00000000, /* [0C0D8] SH.UNK0C000[54] := 0x0 */
+ 0x003fc008, /* [0C0DC] SH.UNK0C000[55] := 0x3fc008 */
+ 0x03801002, /* [0C0E0] SH.UNK0C000[56] := 0x3801002 */
+ 0x69000800, /* [0C0E4] SH.UNK0C000[57] := 0x69000800 */
+ 0x01fe00c0, /* [0C0E8] SH.UNK0C000[58] := 0x1fe00c0 */
+ 0x00290038, /* [0C0EC] SH.UNK0C000[59] := 0x290038 */
+ 0x03831005, /* [0C0F0] SH.UNK0C000[60] := 0x3831005 */
+ 0x29000800, /* [0C0F4] SH.UNK0C000[61] := 0x29000800 */
+ 0x01480040, /* [0C0F8] SH.UNK0C000[62] := 0x1480040 */
+ 0x00000000, /* [0C0FC] SH.UNK0C000[63] := 0x0 */
+ 0x0383100d, /* [0C100] SH.UNK0C000[64] := 0x383100d */
+ 0x00000000, /* [0C104] SH.UNK0C000[65] := 0x0 */
+ 0x00000000, /* [0C108] SH.UNK0C000[66] := 0x0 */
+ 0x00000038, /* [0C10C] SH.UNK0C000[67] := 0x38 */
+ 0x03801003, /* [0C110] SH.UNK0C000[68] := 0x3801003 */
+ 0x29000800, /* [0C114] SH.UNK0C000[69] := 0x29000800 */
+ 0x014801c0, /* [0C118] SH.UNK0C000[70] := 0x14801c0 */
+ 0x00000000, /* [0C11C] SH.UNK0C000[71] := 0x0 */
+ 0x00801005, /* [0C120] SH.UNK0C000[72] := 0x801005 */
+ 0x29001800, /* [0C124] SH.UNK0C000[73] := 0x29001800 */
+ 0x01480040, /* [0C128] SH.UNK0C000[74] := 0x1480040 */
+ 0x00000000, /* [0C12C] SH.UNK0C000[75] := 0x0 */
+ 0x0080108f, /* [0C130] SH.UNK0C000[76] := 0x80108f */
+ 0x3fc06800, /* [0C134] SH.UNK0C000[77] := 0x3fc06800 */
+ 0x00000050, /* [0C138] SH.UNK0C000[78] := 0x50 */
+ 0x203fc068, /* [0C13C] SH.UNK0C000[79] := 0x203fc068 */
+ 0x03801003, /* [0C140] SH.UNK0C000[80] := 0x3801003 */
+ 0x00000800, /* [0C144] SH.UNK0C000[81] := 0x800 */
+ 0x01480140, /* [0C148] SH.UNK0C000[82] := 0x1480140 */
+ 0x00000000, /* [0C14C] SH.UNK0C000[83] := 0x0 */
+ 0x04001009, /* [0C150] SH.UNK0C000[84] := 0x4001009 */
+ 0x00000000, /* [0C154] SH.UNK0C000[85] := 0x0 */
+ 0x00000000, /* [0C158] SH.UNK0C000[86] := 0x0 */
+ 0x200000b8, /* [0C15C] SH.UNK0C000[87] := 0x200000b8 */
+ 0x00000000, /* PAD */
+ 0x08010380, /* LOAD_STATE (1) Base: 0x00E00 Size: 1 Fixp: 0 */
+ 0x00000001, /* [00E00] RA.CONTROL := UNK0=1,LAST_VARYING_2X=0 */
+ 0x08010401, /* LOAD_STATE (1) Base: 0x01004 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01004] PS.OUTPUT_REG := 0x1 */
+ 0x08010290, /* LOAD_STATE (1) Base: 0x00A40 Size: 1 Fixp: 0 */
+ 0x00000200, /* [00A40] PA.SHADER_ATTRIBUTES[0] := UNK0=0x0,UNK8=0x2 */
+ 0x08010e08, /* LOAD_STATE (1) Base: 0x03820 Size: 1 Fixp: 0 */
+ 0x00000004, /* [03820] GL.VARYING_NUM_COMPONENTS := VAR0=0x4,VAR1=0x0,VAR2=0x0,VAR3=0x0,VAR4=0x0,VAR5=0x0,VAR6=0x0,VAR7=0x0 */
+ 0x08010e0d, /* LOAD_STATE (1) Base: 0x03834 Size: 1 Fixp: 0 */
+ 0x00040000, /* [03834] GL.UNK03834 := 0x40000 */
+ 0x08020e0a, /* LOAD_STATE (1) Base: 0x03828 Size: 2 Fixp: 0 */
+ 0x00000055, /* [03828] GL.VARYING_COMPONENT_USE[0] := COMP0=USED,COMP1=USED,COMP2=USED,COMP3=USED,COMP4=UNUSED,COMP5=UNUSED,COMP6=UNUSED,COMP7=UNUSED,COMP8=UNUSED,COMP9=UNUSED,COMP10=UNUSED,COMP11=UNUSED,COMP12=UNUSED,COMP13=UNUSED,COMP14=UNUSED,COMP15=UNUSED */
+ 0x00000000, /* [0382C] GL.VARYING_COMPONENT_USE[1] := COMP0=UNUSED,COMP1=UNUSED,COMP2=UNUSED,COMP3=UNUSED,COMP4=UNUSED,COMP5=UNUSED,COMP6=UNUSED,COMP7=UNUSED,COMP8=UNUSED,COMP9=UNUSED,COMP10=UNUSED,COMP11=UNUSED,COMP12=UNUSED,COMP13=UNUSED,COMP14=UNUSED,COMP15=UNUSED */
+ 0x00000000, /* PAD */
+ 0x08010e0e, /* LOAD_STATE (1) Base: 0x03838 Size: 1 Fixp: 0 */
+ 0x00000000, /* [03838] GL.UNK03838 := 0x0 */
+ 0x08010407, /* LOAD_STATE (1) Base: 0x0101C Size: 1 Fixp: 0 */
+ 0x01000100, /* [0101C] PS.RANGE := LOW=0x100,HIGH=0x100 */
+ 0x08010406, /* LOAD_STATE (1) Base: 0x01018 Size: 1 Fixp: 0 */
+ 0x00000000, /* [01018] PS.START_PC := 0x0 */
+ 0x08010400, /* LOAD_STATE (1) Base: 0x01000 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01000] PS.END_PC := 0x1 */
+ 0x08043400, /* LOAD_STATE (1) Base: 0x0D000 Size: 4 Fixp: 0 */
+ 0x00000000, /* [0D000] SH.UNK0C000[1024] := 0x0 */
+ 0x00000000, /* [0D004] SH.UNK0C000[1025] := 0x0 */
+ 0x00000000, /* [0D008] SH.UNK0C000[1026] := 0x0 */
+ 0x00000000, /* [0D00C] SH.UNK0C000[1027] := 0x0 */
+ 0x00000000, /* PAD */
+ 0x08030402, /* LOAD_STATE (1) Base: 0x01008 Size: 3 Fixp: 0 */
+ 0x00001f02, /* [01008] PS.INPUT_COUNT := COUNT=2,UNK8=31 */
+ 0x00000002, /* [0100C] PS.TEMP_REGISTER_CONTROL := NUM_TEMPS=2 */
+ 0x00000002, /* [01010] PS.CONTROL := BYPASS=0,UNK1=1 */
+ 0x0801028c, /* LOAD_STATE (1) Base: 0x00A30 Size: 1 Fixp: 0 */
+ 0x00000100, /* [00A30] PA.ATTRIBUTE_ELEMENT_COUNT := UNK0=0x0,COUNT=0x1 */
+ 0x08010e07, /* LOAD_STATE (1) Base: 0x0381C Size: 1 Fixp: 0 */
+ 0x00000004, /* [0381C] GL.VARYING_TOTAL_COMPONENTS := NUM=0x4 */
+ 0x0801020c, /* LOAD_STATE (1) Base: 0x00830 Size: 1 Fixp: 0 */
+ 0x0f3f0582, /* [00830] VS.LOAD_BALANCING := A=0x82,B=0x5,C=0x3f,D=0xf */
+ 0x08010201, /* LOAD_STATE (1) Base: 0x00804 Size: 1 Fixp: 0 */
+ 0x00000002, /* [00804] VS.OUTPUT_COUNT := 2 */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000705, /* [03808] GL.SEMAPHORE_TOKEN := FROM=RA,TO=PE */
+ 0x08010f00, /* LOAD_STATE (1) Base: 0x03C00 Size: 1 Fixp: 0 */
+ 0x00000705, /* [03C00] GL.STALL_TOKEN := FROM=RA,TO=PE,FLIP0=0,FLIP1=0 */
+ 0x28000000, /* DRAW_PRIMITIVES (5) */
+ 0x00000005, /* */
+ 0x00000000, /* */
+ 0x00000002, /* */
+ 0x08030180, /* LOAD_STATE (1) Base: 0x00600 Size: 3 Fixp: 0 */
+ 0x0c003088, /* [00600] FE.VERTEX_ELEMENT_CONFIG[0] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x0,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x0c003188, /* [00604] FE.VERTEX_ELEMENT_CONFIG[1] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x1,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x0c003288, /* [00608] FE.VERTEX_ELEMENT_CONFIG[2] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x2,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x08010208, /* LOAD_STATE (1) Base: 0x00820 Size: 1 Fixp: 0 */
+ 0x00020100, /* [00820] VS.INPUT[0] := I0=0,I1=1,I2=2,I3=0 */
+ 0x080301a0, /* LOAD_STATE (1) Base: 0x00680 Size: 3 Fixp: 0 */
+ 0x15000060, /* [00680] FE.VERTEX_STREAMS[0].BASE_ADDR := ADDR_S */
+ 0x15000090, /* [00684] FE.VERTEX_STREAMS[1].BASE_ADDR := ADDR_T */
+ 0x150000c0, /* [00688] FE.VERTEX_STREAMS[2].BASE_ADDR := ADDR_U */
+ 0x080301a8, /* LOAD_STATE (1) Base: 0x006A0 Size: 3 Fixp: 0 */
+ 0x0000000c, /* [006A0] FE.VERTEX_STREAMS[0].CONTROL := 0xc */
+ 0x0000000c, /* [006A4] FE.VERTEX_STREAMS[1].CONTROL := 0xc */
+ 0x0000000c, /* [006A8] FE.VERTEX_STREAMS[2].CONTROL := 0xc */
+ 0x0801028b, /* LOAD_STATE (1) Base: 0x00A2C Size: 1 Fixp: 0 */
+ 0x00000000, /* [00A2C] PA.W_CLIP_LIMIT := 0x0 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0x00412200, /* [00A34] PA.CONFIG := POINT_SIZE_ENABLE=0,POINT_SPRITE_ENABLE=0,CULL_FACE_MODE=CCW,FILL_MODE=SOLID,SHADE_MODEL=SMOOTH,UNK22=1(residue:0xff3888c3) */
+ 0x28000000, /* DRAW_PRIMITIVES (5) */
+ 0x00000005, /* */
+ 0x00000004, /* */
+ 0x00000002, /* */
+ 0x08030180, /* LOAD_STATE (1) Base: 0x00600 Size: 3 Fixp: 0 */
+ 0x0c003088, /* [00600] FE.VERTEX_ELEMENT_CONFIG[0] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x0,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x0c003188, /* [00604] FE.VERTEX_ELEMENT_CONFIG[1] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x1,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x0c003288, /* [00608] FE.VERTEX_ELEMENT_CONFIG[2] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x2,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x08010208, /* LOAD_STATE (1) Base: 0x00820 Size: 1 Fixp: 0 */
+ 0x00020100, /* [00820] VS.INPUT[0] := I0=0,I1=1,I2=2,I3=0 */
+ 0x080301a0, /* LOAD_STATE (1) Base: 0x00680 Size: 3 Fixp: 0 */
+ 0x150000c0, /* [00680] FE.VERTEX_STREAMS[0].BASE_ADDR := ADDR_U */
+ 0x150000f0, /* [00684] FE.VERTEX_STREAMS[1].BASE_ADDR := ADDR_V */
+ 0x15000120, /* [00688] FE.VERTEX_STREAMS[2].BASE_ADDR := ADDR_W */
+ 0x080301a8, /* LOAD_STATE (1) Base: 0x006A0 Size: 3 Fixp: 0 */
+ 0x0000000c, /* [006A0] FE.VERTEX_STREAMS[0].CONTROL := 0xc */
+ 0x0000000c, /* [006A4] FE.VERTEX_STREAMS[1].CONTROL := 0xc */
+ 0x0000000c, /* [006A8] FE.VERTEX_STREAMS[2].CONTROL := 0xc */
+ 0x0801028b, /* LOAD_STATE (1) Base: 0x00A2C Size: 1 Fixp: 0 */
+ 0x00000000, /* [00A2C] PA.W_CLIP_LIMIT := 0x0 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0x00412200, /* [00A34] PA.CONFIG := POINT_SIZE_ENABLE=0,POINT_SPRITE_ENABLE=0,CULL_FACE_MODE=CCW,FILL_MODE=SOLID,SHADE_MODEL=SMOOTH,UNK22=1(residue:0xff3888c3) */
+ 0x28000000, /* DRAW_PRIMITIVES (5) */
+ 0x00000005, /* */
+ 0x00000008, /* */
+ 0x00000002, /* */
+ 0x08030180, /* LOAD_STATE (1) Base: 0x00600 Size: 3 Fixp: 0 */
+ 0x0c003088, /* [00600] FE.VERTEX_ELEMENT_CONFIG[0] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x0,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x0c003188, /* [00604] FE.VERTEX_ELEMENT_CONFIG[1] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x1,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x0c003288, /* [00608] FE.VERTEX_ELEMENT_CONFIG[2] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x2,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x08010208, /* LOAD_STATE (1) Base: 0x00820 Size: 1 Fixp: 0 */
+ 0x00020100, /* [00820] VS.INPUT[0] := I0=0,I1=1,I2=2,I3=0 */
+ 0x080301a0, /* LOAD_STATE (1) Base: 0x00680 Size: 3 Fixp: 0 */
+ 0x15000120, /* [00680] FE.VERTEX_STREAMS[0].BASE_ADDR := ADDR_W */
+ 0x15000150, /* [00684] FE.VERTEX_STREAMS[1].BASE_ADDR := ADDR_X */
+ 0x15000180, /* [00688] FE.VERTEX_STREAMS[2].BASE_ADDR := ADDR_Y */
+ 0x080301a8, /* LOAD_STATE (1) Base: 0x006A0 Size: 3 Fixp: 0 */
+ 0x0000000c, /* [006A0] FE.VERTEX_STREAMS[0].CONTROL := 0xc */
+ 0x0000000c, /* [006A4] FE.VERTEX_STREAMS[1].CONTROL := 0xc */
+ 0x0000000c, /* [006A8] FE.VERTEX_STREAMS[2].CONTROL := 0xc */
+ 0x0801028b, /* LOAD_STATE (1) Base: 0x00A2C Size: 1 Fixp: 0 */
+ 0x00000000, /* [00A2C] PA.W_CLIP_LIMIT := 0x0 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0x00412200, /* [00A34] PA.CONFIG := POINT_SIZE_ENABLE=0,POINT_SPRITE_ENABLE=0,CULL_FACE_MODE=CCW,FILL_MODE=SOLID,SHADE_MODEL=SMOOTH,UNK22=1(residue:0xff3888c3) */
+ 0x28000000, /* DRAW_PRIMITIVES (5) */
+ 0x00000005, /* */
+ 0x0000000c, /* */
+ 0x00000002, /* */
+ 0x08030180, /* LOAD_STATE (1) Base: 0x00600 Size: 3 Fixp: 0 */
+ 0x0c003088, /* [00600] FE.VERTEX_ELEMENT_CONFIG[0] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x0,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x0c003188, /* [00604] FE.VERTEX_ELEMENT_CONFIG[1] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x1,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x0c003288, /* [00608] FE.VERTEX_ELEMENT_CONFIG[2] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x2,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x08010208, /* LOAD_STATE (1) Base: 0x00820 Size: 1 Fixp: 0 */
+ 0x00020100, /* [00820] VS.INPUT[0] := I0=0,I1=1,I2=2,I3=0 */
+ 0x080301a0, /* LOAD_STATE (1) Base: 0x00680 Size: 3 Fixp: 0 */
+ 0x15000180, /* [00680] FE.VERTEX_STREAMS[0].BASE_ADDR := ADDR_Y */
+ 0x150001b0, /* [00684] FE.VERTEX_STREAMS[1].BASE_ADDR := ADDR_Z */
+ 0x150001e0, /* [00688] FE.VERTEX_STREAMS[2].BASE_ADDR := ADDR_26 */
+ 0x080301a8, /* LOAD_STATE (1) Base: 0x006A0 Size: 3 Fixp: 0 */
+ 0x0000000c, /* [006A0] FE.VERTEX_STREAMS[0].CONTROL := 0xc */
+ 0x0000000c, /* [006A4] FE.VERTEX_STREAMS[1].CONTROL := 0xc */
+ 0x0000000c, /* [006A8] FE.VERTEX_STREAMS[2].CONTROL := 0xc */
+ 0x0801028b, /* LOAD_STATE (1) Base: 0x00A2C Size: 1 Fixp: 0 */
+ 0x00000000, /* [00A2C] PA.W_CLIP_LIMIT := 0x0 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0x00412200, /* [00A34] PA.CONFIG := POINT_SIZE_ENABLE=0,POINT_SPRITE_ENABLE=0,CULL_FACE_MODE=CCW,FILL_MODE=SOLID,SHADE_MODEL=SMOOTH,UNK22=1(residue:0xff3888c3) */
+ 0x28000000, /* DRAW_PRIMITIVES (5) */
+ 0x00000005, /* */
+ 0x00000010, /* */
+ 0x00000002, /* */
+ 0x08030180, /* LOAD_STATE (1) Base: 0x00600 Size: 3 Fixp: 0 */
+ 0x0c003088, /* [00600] FE.VERTEX_ELEMENT_CONFIG[0] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x0,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x0c003188, /* [00604] FE.VERTEX_ELEMENT_CONFIG[1] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x1,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x0c003288, /* [00608] FE.VERTEX_ELEMENT_CONFIG[2] := TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=0x2,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc */
+ 0x08010208, /* LOAD_STATE (1) Base: 0x00820 Size: 1 Fixp: 0 */
+ 0x00020100, /* [00820] VS.INPUT[0] := I0=0,I1=1,I2=2,I3=0 */
+ 0x080301a0, /* LOAD_STATE (1) Base: 0x00680 Size: 3 Fixp: 0 */
+ 0x150001e0, /* [00680] FE.VERTEX_STREAMS[0].BASE_ADDR := ADDR_26 */
+ 0x15000210, /* [00684] FE.VERTEX_STREAMS[1].BASE_ADDR := ADDR_27 */
+ 0x15000240, /* [00688] FE.VERTEX_STREAMS[2].BASE_ADDR := ADDR_28 */
+ 0x080301a8, /* LOAD_STATE (1) Base: 0x006A0 Size: 3 Fixp: 0 */
+ 0x0000000c, /* [006A0] FE.VERTEX_STREAMS[0].CONTROL := 0xc */
+ 0x0000000c, /* [006A4] FE.VERTEX_STREAMS[1].CONTROL := 0xc */
+ 0x0000000c, /* [006A8] FE.VERTEX_STREAMS[2].CONTROL := 0xc */
+ 0x0801028b, /* LOAD_STATE (1) Base: 0x00A2C Size: 1 Fixp: 0 */
+ 0x00000000, /* [00A2C] PA.W_CLIP_LIMIT := 0x0 */
+ 0x0801028d, /* LOAD_STATE (1) Base: 0x00A34 Size: 1 Fixp: 0 */
+ 0x00412200, /* [00A34] PA.CONFIG := POINT_SIZE_ENABLE=0,POINT_SPRITE_ENABLE=0,CULL_FACE_MODE=CCW,FILL_MODE=SOLID,SHADE_MODEL=SMOOTH,UNK22=1(residue:0xff3888c3) */
+ 0x28000000, /* DRAW_PRIMITIVES (5) */
+ 0x00000005, /* */
+ 0x00000014, /* */
+ 0x00000002, /* */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003 /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+};
+
+uint32_t cmdbuf2[] = { /* seq 89 */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004686, /* [01604] RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,DOWNSAMPLE_X=0,DOWNSAMPLE_Y=0,SOURCE_TILED=1,DEST_FORMAT=A8R8G8B8,DEST_TILED=1,SWAP_RB=0,FLIP=0 */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x80001c00, /* [0160C] RS.SOURCE_STRIDE := STRIDE=0x1c00,MULTI=0,TILING=1 */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x80001c00, /* [01614] RS.DEST_STRIDE := STRIDE=0x1c00,MULTI=0,TILING=1 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* [01630] RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* [01634] RS.DITHER[1] := 0xffffffff */
+ 0x00000000, /* PAD */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* [0163C] RS.CLEAR_CONTROL := BITS=0x0,MODE=DISABLED */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* [016A0] RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x15900000, /* [01608] RS.SOURCE_ADDR := ADDR_G */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x15900000, /* [01610] RS.DEST_ADDR := ADDR_G */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x010001c0, /* [01620] RS.WINDOW_SIZE := HEIGHT=256,WIDTH=448 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbadabeeb /* [01600] RS.KICKER := 0xbadabeeb */
+};
+
+uint32_t cmdbuf3[] = { /* seq 91 */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01650] RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* [0380C] GL.FLUSH_CACHE := DEPTH=0,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801ffff, /* LOAD_STATE (1) Base: 0x3FFFC Size: 1 Fixp: 0 */
+ 0x00000000, /* [3FFFC] DUMMY.DUMMY := 0x0 */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x00000049, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=0,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=0,DEPTH_COMPRESSION=1,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x20000686, /* [01604] RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,DOWNSAMPLE_X=0,DOWNSAMPLE_Y=0,SOURCE_TILED=1,DEST_FORMAT=A8R8G8B8,DEST_TILED=0,SWAP_RB=1,FLIP=0 */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x80001c00, /* [0160C] RS.SOURCE_STRIDE := STRIDE=0x1c00,MULTI=0,TILING=1 */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000700, /* [01614] RS.DEST_STRIDE := STRIDE=0x700,MULTI=0,TILING=0 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* [01630] RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* [01634] RS.DITHER[1] := 0xffffffff */
+ 0x00000000, /* PAD */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* [0163C] RS.CLEAR_CONTROL := BITS=0x0,MODE=DISABLED */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* [016A0] RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x15900000, /* [01608] RS.SOURCE_ADDR := ADDR_G */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x15a27c00, /* [01610] RS.DEST_ADDR := ADDR_L */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x010001c0, /* [01620] RS.WINDOW_SIZE := HEIGHT=256,WIDTH=448 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbadabeeb /* [01600] RS.KICKER := 0xbadabeeb */
+};
+
+uint32_t cmdbuf4[] = { /* seq 101 */
+ 0x18000000, /* NOP (make space for PIPE switch) */
+ 0x00000000,
+ 0x18000000,
+ 0x00000000,
+ 0x18000000,
+ 0x00000000,
+ 0x18000000,
+ 0x00000000,
+
+ /* copy pixels from render target to output bitmap */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00000606, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,UNK7=1,DEST_FORMAT=A8R8G8B8,UNK14=0,SWAP_RB=0 */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x00000700, /* RS.SOURCE_STRIDE := 0x00000700 */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000640, /* RS.DEST_STRIDE := 0x640 */
+ 0x0801058c, /* LOAD_STATE (1) Base: 0x01630 Size: 1 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[0] := 0xffffffff */
+ 0x0801058d, /* LOAD_STATE (1) Base: 0x01634 Size: 1 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[1] := 0xffffffff */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* RS.SOURCE_ADDR := *rt_physical */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f338700, /* RS.DEST_ADDR := *bmp_physical */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00f00190, /* RS.WINDOW_SIZE := HEIGHT=240,WIDTH=400 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb /* RS.KICKER := 0xbeebbeeb */
+}; \ No newline at end of file
diff --git a/src/replay/cube_companion.c b/src/replay/cube_companion.c
new file mode 100644
index 0000000..4ad866a
--- /dev/null
+++ b/src/replay/cube_companion.c
@@ -0,0 +1,484 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include "write_bmp.h"
+#include "viv_raw.h"
+#include "companion.h"
+
+#include "companion_cmd.h"
+/* TODO: should actually update context as we go,
+ a context switch would currently revert state and likely result in corrupted rendering.
+ */
+#include "context_cmd.h"
+
+
+int main(int argc, char **argv)
+{
+ int rv;
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+ viv_show_chip_info(conn);
+
+ /* allocate command buffer (blob uses four command buffers, but we don't even fill one) */
+ viv_addr_t buf0_physical = 0;
+ void *buf0_logical = 0;
+ if(viv_alloc_contiguous(conn, 0x8000, &buf0_physical, &buf0_logical, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating host memory\n");
+ exit(1);
+ }
+ printf("Allocated buffer: phys=%08x log=%08x\n", (uint32_t)buf0_physical, (uint32_t)buf0_logical);
+
+ /* allocate main render target */
+ gcuVIDMEM_NODE_PTR rt_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x1a0000, 0x40, gcvSURF_RENDER_TARGET, gcvPOOL_DEFAULT, &rt_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target buffer memory\n");
+ exit(1);
+ }
+ printf("Allocated render target node: node=%08x\n", (uint32_t)rt_node);
+ viv_addr_t rt_physical = 0; /* ADDR_A */
+ void *rt_logical = 0;
+ if(viv_lock_vidmem(conn, rt_node, &rt_physical, &rt_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target: phys=%08x log=%08x\n", (uint32_t)rt_physical, (uint32_t)rt_logical);
+ memset(rt_logical, 0xff, 0x1a0000); /* clear previous result just in case, test that clearing works */
+
+ /* allocate tile status for main render target */
+ gcuVIDMEM_NODE_PTR rt_ts_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x1a00, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &rt_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated render target tile status node: node=%08x\n", (uint32_t)rt_ts_node);
+ viv_addr_t rt_ts_physical = 0; /* ADDR_B */
+ void *rt_ts_logical = 0;
+ if(viv_lock_vidmem(conn, rt_ts_node, &rt_ts_physical, &rt_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target ts: phys=%08x log=%08x\n", (uint32_t)rt_ts_physical, (uint32_t)rt_ts_logical);
+
+ /* allocate depth for main render target */
+ gcuVIDMEM_NODE_PTR z_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0xd0000, 0x40, gcvSURF_DEPTH, gcvPOOL_DEFAULT, &z_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth node: node=%08x\n", (uint32_t)z_node);
+ viv_addr_t z_physical = 0; /* ADDR_C */
+ void *z_logical = 0;
+ if(viv_lock_vidmem(conn, z_node, &z_physical, &z_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target memory\n");
+ exit(1);
+ }
+ printf("Locked depth target: phys=%08x log=%08x\n", (uint32_t)z_physical, (uint32_t)z_logical);
+
+ /* allocate depth ts for main render target */
+ gcuVIDMEM_NODE_PTR z_ts_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0xd00, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &z_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth ts node: node=%08x\n", (uint32_t)z_ts_node);
+ viv_addr_t z_ts_physical = 0; /* ADDR_D */
+ void *z_ts_logical = 0;
+ if(viv_lock_vidmem(conn, z_ts_node, &z_ts_physical, &z_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target ts memory\n");
+ exit(1);
+ }
+ printf("Locked depth ts target: phys=%08x log=%08x\n", (uint32_t)z_ts_physical, (uint32_t)z_ts_logical);
+
+ /* allocate vertex buffer */
+ gcuVIDMEM_NODE_PTR vtx_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x60000, 0x40, gcvSURF_VERTEX, gcvPOOL_DEFAULT, &vtx_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating vertex memory\n");
+ exit(1);
+ }
+ printf("Allocated vertex node: node=%08x\n", (uint32_t)vtx_node);
+ viv_addr_t vtx_physical = 0; /* ADDR_E */
+ void *vtx_logical = 0;
+ if(viv_lock_vidmem(conn, vtx_node, &vtx_physical, &vtx_logical)!=0)
+ {
+ fprintf(stderr, "Error locking vertex memory\n");
+ exit(1);
+ }
+ printf("Locked vertex memory: phys=%08x log=%08x\n", (uint32_t)vtx_physical, (uint32_t)vtx_logical);
+
+ /* allocate aux render target */
+ gcuVIDMEM_NODE_PTR aux_rt_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x4000, 0x40, gcvSURF_RENDER_TARGET, gcvPOOL_SYSTEM /*why?*/, &aux_rt_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating aux render target buffer memory\n");
+ exit(1);
+ }
+ printf("Allocated aux render target node: node=%08x\n", (uint32_t)aux_rt_node);
+ viv_addr_t aux_rt_physical = 0; /* ADDR_F */
+ void *aux_rt_logical = 0;
+ if(viv_lock_vidmem(conn, aux_rt_node, &aux_rt_physical, &aux_rt_logical)!=0)
+ {
+ fprintf(stderr, "Error locking aux render target memory\n");
+ exit(1);
+ }
+ printf("Locked aux render target: phys=%08x log=%08x\n", (uint32_t)aux_rt_physical, (uint32_t)aux_rt_logical);
+
+ /* allocate tile status for aux render target */
+ gcuVIDMEM_NODE_PTR aux_rt_ts_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x100, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &aux_rt_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating aux render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated aux render target tile status node: node=%08x\n", (uint32_t)aux_rt_ts_node);
+ viv_addr_t aux_rt_ts_physical = 0; /* ADDR_G */
+ void *aux_rt_ts_logical = 0;
+ if(viv_lock_vidmem(conn, aux_rt_ts_node, &aux_rt_ts_physical, &aux_rt_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking aux ts render target memory\n");
+ exit(1);
+ }
+ printf("Locked aux render target ts: phys=%08x log=%08x\n", (uint32_t)aux_rt_ts_physical, (uint32_t)aux_rt_ts_logical);
+
+ /* Submit command buffer 1 */
+ /* First build context state map */
+ size_t stateCount = 0x1d00;
+ uint32_t *contextMap = malloc(stateCount * 4);
+ memset(contextMap, 0, stateCount*4);
+ for(int idx=0; idx<sizeof(contextbuf_addr)/sizeof(address_index_t); ++idx)
+ {
+ contextMap[contextbuf_addr[idx].address / 4] = contextbuf_addr[idx].index;
+ }
+
+ struct _gcoCMDBUF commandBuffer = {
+ .object = {
+ .type = gcvOBJ_COMMANDBUFFER
+ },
+ .physical = (void*)buf0_physical,
+ .logical = (void*)buf0_logical,
+ .bytes = 0x8000,
+ .startOffset = 0x0,
+ };
+ struct _gcoCONTEXT contextBuffer = {
+ .object = {
+ .type = gcvOBJ_CONTEXT
+ },
+ .id = 0x0, // Actual ID will be returned here
+ .map = contextMap,
+ .stateCount = stateCount,
+ .buffer = contextbuf,
+ .pipe3DIndex = 0x2d6, // XXX should not be hardcoded
+ .pipe2DIndex = 0x106e,
+ .linkIndex = 0x1076,
+ .inUseIndex = 0x1078,
+ .bufferSize = 0x41e4,
+ .bytes = 0x0, // Number of bytes at physical, logical
+ .physical = (void*)0x0,
+ .logical = (void*)0x0,
+ .link = (void*)0x0, // Logical address of link
+ .initialPipe = 0x1,
+ .entryPipe = 0x0,
+ .currentPipe = 0x0,
+ .postCommit = 1,
+ .inUse = (int*)0x0, // Logical address of inUse
+ .lastAddress = 0xffffffff, // Not used by kernel
+ .lastSize = 0x2, // Not used by kernel
+ .lastIndex = 0x106a, // Not used by kernel
+ .lastFixed = 0, // Not used by kernel
+ };
+ commandBuffer.free = commandBuffer.bytes - 0x8; /* Always keep 0x8 at end of buffer for kernel driver */
+ /* Set addresses in first command buffer */
+ cmdbuf1[0x57] = cmdbuf1[0x67] = cmdbuf1[0x9f] = cmdbuf1[0xbb] = cmdbuf1[0xd9] = cmdbuf1[0xfb] = cmdbuf1[0x119] = cmdbuf1[0x135] = cmdbuf1[0x153] = rt_physical;
+ cmdbuf1[0x65] = cmdbuf1[0x9d] = cmdbuf1[0xb9] = cmdbuf1[0xd7] = cmdbuf1[0xe5] = cmdbuf1[0xf9] = cmdbuf1[0x117] = cmdbuf1[0x133] = cmdbuf1[0x151] = rt_ts_physical;
+ cmdbuf1[0x6d] = cmdbuf1[0x7f] = cmdbuf1[0x175] = z_physical;
+ cmdbuf1[0x7d] = cmdbuf1[0x15f] = cmdbuf1[0x173] = z_ts_physical;
+ cmdbuf1[0x89] = cmdbuf1[0x8f] = cmdbuf1[0x93] = cmdbuf1[0xa5] = cmdbuf1[0xab] = cmdbuf1[0xaf] = cmdbuf1[0xc3] = cmdbuf1[0xc9] = cmdbuf1[0xcd] = cmdbuf1[0x103] = cmdbuf1[0x109] = cmdbuf1[0x10d] = cmdbuf1[0x11f] = cmdbuf1[0x125] = cmdbuf1[0x129] = cmdbuf1[0x13d] = cmdbuf1[0x143] = cmdbuf1[0x147] = aux_rt_physical;
+ cmdbuf1[0x87] = cmdbuf1[0xa3] = cmdbuf1[0xc1] = cmdbuf1[0x101] = cmdbuf1[0x11d] = cmdbuf1[0x13b] = aux_rt_ts_physical;
+
+ /* Submit first command buffer */
+ commandBuffer.startOffset = 0;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf1, sizeof(cmdbuf1));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf1);
+ commandBuffer.free -= sizeof(cmdbuf1) + 0x18;
+ printf("[1] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing first command buffer\n");
+ exit(1);
+ }
+
+ /* After the first COMMIT, allocate contiguous memory for context and set
+ * bytes, physical, logical, link, inUse */
+ printf("Context assigned index: %i\n", (uint32_t)contextBuffer.id);
+ viv_addr_t cbuf0_physical = 0;
+ void *cbuf0_logical = 0;
+ size_t cbuf0_bytes = 0;
+ if(viv_alloc_contiguous(conn, contextBuffer.bufferSize, &cbuf0_physical, &cbuf0_logical, &cbuf0_bytes)!=0)
+ {
+ fprintf(stderr, "Error allocating contiguous host memory for context\n");
+ exit(1);
+ }
+ printf("Allocated buffer (size 0x%x) for context: phys=%08x log=%08x\n", (int)cbuf0_bytes, (int)cbuf0_physical, (int)cbuf0_logical);
+ contextBuffer.bytes = cbuf0_bytes; /* actual size of buffer */
+ contextBuffer.physical = (void*)cbuf0_physical;
+ contextBuffer.logical = cbuf0_logical;
+ contextBuffer.link = ((uint32_t*)cbuf0_logical) + contextBuffer.linkIndex;
+ contextBuffer.inUse = (int*)(((uint32_t*)cbuf0_logical) + contextBuffer.inUseIndex);
+
+ /* Create signal */
+ int sig_id = 0;
+ if(viv_user_signal_create(conn, 0, &sig_id) != 0) /* automatic resetting signal */
+ {
+ fprintf(stderr, "Cannot create user signal\n");
+ exit(1);
+ }
+ printf("Created user signal %i\n", sig_id);
+
+ /* Queue and wait for signal */
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+
+ /* Allocate and map texture memory (ADDR_H) */
+ gcuVIDMEM_NODE_PTR tex_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x100000, 0x40, gcvSURF_TEXTURE, gcvPOOL_DEFAULT, &tex_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating tex memory\n");
+ exit(1);
+ }
+ printf("Allocated tex: node=%08x\n", (uint32_t)tex_node);
+ viv_addr_t tex_physical = 0; /* ADDR_H */
+ void *tex_logical = 0;
+ if(viv_lock_vidmem(conn, tex_node, &tex_physical, &tex_logical)!=0)
+ {
+ fprintf(stderr, "Error locking tex memory\n");
+ exit(1);
+ }
+ printf("Locked tex: phys=%08x log=%08x\n", (uint32_t)tex_physical, (uint32_t)tex_logical);
+
+ /* Allocate and map more vertex memory (ADDR_I), ADDR_E is unused */
+ gcuVIDMEM_NODE_PTR vtx2_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x5ef80, 0x8, gcvSURF_VERTEX, gcvPOOL_DEFAULT, &vtx2_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating vtx2 memory\n");
+ exit(1);
+ }
+ printf("Allocated vtx2: node=%08x\n", (uint32_t)vtx2_node);
+ viv_addr_t vtx2_physical = 0; /* ADDR_I */
+ void *vtx2_logical = 0;
+ if(viv_lock_vidmem(conn, vtx2_node, &vtx2_physical, &vtx2_logical)!=0)
+ {
+ fprintf(stderr, "Error locking vtx2 memory\n");
+ exit(1);
+ }
+ printf("Locked vtx2: phys=%08x log=%08x\n", (uint32_t)vtx2_physical, (uint32_t)vtx2_logical);
+
+ /* Interleave companion cube vertex data into ADDR_I */
+ memset(vtx2_logical, 0, 0x5ef80);
+ float *vertices_array = companion_vertices_array();
+ float *texture_coordinates_array =
+ companion_texture_coordinates_array();
+ float *normals_array = companion_normals_array();
+ for(int vert=0; vert<COMPANION_ARRAY_COUNT; ++vert)
+ {
+ int dest_idx = vert * (3 + 3 + 2);
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx2_logical)[dest_idx+comp+0] = vertices_array[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx2_logical)[dest_idx+comp+3] = normals_array[vert*3 + comp]; /* 1 */
+ for(int comp=0; comp<2; ++comp)
+ ((float*)vtx2_logical)[dest_idx+comp+6] = texture_coordinates_array[vert*2 + comp]; /* 2 */
+ }
+
+ /* Fill in texture (convert from RGB linear to tiled) */
+#if 1
+#define TILE_WIDTH (4)
+#define TILE_HEIGHT (4)
+#define TILE_WORDS (TILE_WIDTH*TILE_HEIGHT)
+ unsigned ytiles = COMPANION_TEXTURE_HEIGHT / TILE_HEIGHT;
+ unsigned xtiles = COMPANION_TEXTURE_WIDTH / TILE_WIDTH;
+ unsigned dst_stride = xtiles * TILE_WORDS;
+
+ for(unsigned ty=0; ty<ytiles; ++ty)
+ {
+ for(unsigned tx=0; tx<xtiles; ++tx)
+ {
+ unsigned ofs = ty * dst_stride + tx * TILE_WORDS;
+ for(unsigned y=0; y<TILE_HEIGHT; ++y)
+ {
+ for(unsigned x=0; x<TILE_WIDTH; ++x)
+ {
+ unsigned srcy = ty*TILE_HEIGHT + y;
+ unsigned srcx = tx*TILE_WIDTH + x;
+ unsigned src_ofs = (srcy*COMPANION_TEXTURE_WIDTH+srcx)*3;
+ unsigned r,g,b,a;
+ r = ((uint8_t*)companion_texture)[src_ofs+0];
+ g = ((uint8_t*)companion_texture)[src_ofs+1];
+ b = ((uint8_t*)companion_texture)[src_ofs+2];
+ a = 255;
+
+ ((uint32_t*)tex_logical)[ofs] = ((a&0xFF) << 24) | ((b&0xFF) << 16) | ((g&0xFF) << 8) | (r&0xFF);
+ ofs += 1;
+ }
+ }
+ }
+ }
+#endif
+#if 0
+ int texfd = open("/data/mine/texture.raw", O_RDONLY);
+ read(texfd, tex_logical, 512*512*4);
+ close(texfd);
+#endif
+
+ /* Submit command buffer 2 */
+ cmdbuf2[0x3b] = tex_physical;
+ cmdbuf2[0x125] = vtx2_physical;
+
+ commandBuffer.startOffset = commandBuffer.offset + 0x18; /* Make space for LINK */
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf2, sizeof(cmdbuf2));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf2);
+ commandBuffer.free -= sizeof(cmdbuf2) + 0x18;
+ printf("[2] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing second command buffer\n");
+ exit(1);
+ }
+
+ /* Submit command buffer 3 */
+ cmdbuf3[0x1d] = cmdbuf3[0x1f] = rt_physical;
+
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf3, sizeof(cmdbuf3));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf3);
+ commandBuffer.free -= sizeof(cmdbuf3) + 0x18;
+ printf("[3] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing third command buffer\n");
+ exit(1);
+ }
+
+ /* Submit command buffer 4 */
+ cmdbuf4[0x9] = aux_rt_ts_physical;
+ cmdbuf4[0xb] = cmdbuf4[0x11] = cmdbuf4[0x15] = aux_rt_physical;
+ cmdbuf4[0x21] = rt_physical;
+ cmdbuf4[0x1f] = rt_ts_physical;
+
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf4, sizeof(cmdbuf4));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf4);
+ commandBuffer.free -= sizeof(cmdbuf4) + 0x18;
+ printf("[4] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing command buffer 4\n");
+ exit(1);
+ }
+
+ /* Submit event, and wait */
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+
+ /* Allocate bitmap memory, map */
+ gcuVIDMEM_NODE_PTR bmp_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x177000, 0x40, gcvSURF_BITMAP, gcvPOOL_DEFAULT, &bmp_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating bitmap status memory\n");
+ exit(1);
+ }
+ printf("Allocated bitmap node: node=%08x\n", (uint32_t)bmp_node);
+ viv_addr_t bmp_physical = 0; /* ADDR_J */
+ void *bmp_logical = 0;
+ if(viv_lock_vidmem(conn, bmp_node, &bmp_physical, &bmp_logical)!=0)
+ {
+ fprintf(stderr, "Error locking bmp memory\n");
+ exit(1);
+ }
+ memset(bmp_logical, 0xff, 0x177000); /* clear previous result */
+ printf("Locked bmp: phys=%08x log=%08x\n", (uint32_t)bmp_physical, (uint32_t)bmp_logical);
+
+ /* Submit command buffer 5 */
+ cmdbuf5[0x19] = rt_physical;
+ cmdbuf5[0x1b] = bmp_physical;
+
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf5, sizeof(cmdbuf5));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf5);
+ commandBuffer.free -= sizeof(cmdbuf5) + 0x18;
+ printf("[5] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing command buffer 5\n");
+ exit(1);
+ }
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL */
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+
+ bmp_dump32(bmp_logical, 800, 480, false, "/mnt/sdcard/replay.bmp");
+ /* Unlock video memory */
+ if(viv_unlock_vidmem(conn, bmp_node, gcvSURF_BITMAP, 1) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+ /*
+ for(int x=0; x<0x700; ++x)
+ {
+ uint32_t value = ((uint32_t*)rt_ts_logical)[x];
+ printf("Sample ts: %x %08x\n", x*4, value);
+ }*/
+ printf("Contextbuffer used %i\n", *contextBuffer.inUse);
+ viv_close(conn);
+ return 0;
+}
+
diff --git a/src/replay/cube_companion_gc2000.c b/src/replay/cube_companion_gc2000.c
new file mode 100644
index 0000000..8b1ed6d
--- /dev/null
+++ b/src/replay/cube_companion_gc2000.c
@@ -0,0 +1,473 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include "write_bmp.h"
+#include "viv_raw.h"
+#include "companion.h"
+
+#include "companion_cmd_gc2000.h"
+
+
+/* TODO: should actually update context as we go,
+ a context switch would currently revert state and likely result in corrupted rendering.
+ */
+//#include "context_cmd.h"
+
+
+int main(int argc, char **argv)
+{
+ int rv;
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+ viv_show_chip_info(conn);
+
+ gcsHAL_INTERFACE id = {};
+ id.command = gcvHAL_ATTACH;
+ if((viv_invoke(conn, &id)) != gcvSTATUS_OK)
+ {
+ #ifdef DEBUG
+ fprintf(stderr, "Error attaching to GPU\n");
+ #endif
+ exit(1);
+ }
+ gckCONTEXT context = id.u.Attach.context;
+
+ /* allocate command buffer (blob uses four command buffers, but we don't even fill one) */
+ viv_addr_t buf0_physical = 0;
+ void *buf0_logical = 0;
+ if(viv_alloc_contiguous(conn, 0x20000, &buf0_physical, &buf0_logical, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating host memory\n");
+ exit(1);
+ }
+ printf("Allocated buffer: phys=%08x log=%08x\n", (uint32_t)buf0_physical, (uint32_t)buf0_logical);
+
+ /* allocate main render target */
+ gcuVIDMEM_NODE_PTR color_surface_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x1ab000, 0x40, gcvSURF_RENDER_TARGET, gcvPOOL_DEFAULT, &color_surface_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target buffer memory\n");
+ exit(1);
+ }
+ printf("Allocated render target node: node=%08x\n", (uint32_t)color_surface_node);
+ viv_addr_t color_surface_physical = 0;
+ void *color_surface_logical = 0;
+ if(viv_lock_vidmem(conn, color_surface_node, &color_surface_physical, &color_surface_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target: phys=%08x log=%08x\n", (uint32_t)color_surface_physical, (uint32_t)color_surface_logical);
+
+ /* allocate tile status for main render target */
+ gcuVIDMEM_NODE_PTR color_status_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x1b00, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &color_status_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated render target tile status node: node=%08x\n", (uint32_t)color_status_node);
+ viv_addr_t color_status_physical = 0;
+ void *color_status_logical = 0;
+ if(viv_lock_vidmem(conn, color_status_node, &color_status_physical, &color_status_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target ts: phys=%08x log=%08x\n", (uint32_t)color_status_physical, (uint32_t)color_status_logical);
+
+ /* allocate depth for main render target */
+ gcuVIDMEM_NODE_PTR depth_surface_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0xd1000, 0x40, gcvSURF_DEPTH, gcvPOOL_DEFAULT, &depth_surface_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth node: node=%08x\n", (uint32_t)depth_surface_node);
+ viv_addr_t depth_surface_physical = 0;
+ void *depth_surface_logical = 0;
+ if(viv_lock_vidmem(conn, depth_surface_node, &depth_surface_physical, &depth_surface_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target memory\n");
+ exit(1);
+ }
+ printf("Locked depth target: phys=%08x log=%08x\n", (uint32_t)depth_surface_physical, (uint32_t)depth_surface_logical);
+
+ /* allocate depth ts for main render target */
+ gcuVIDMEM_NODE_PTR depth_status_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0xe00, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &depth_status_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth ts node: node=%08x\n", (uint32_t)depth_status_node);
+ viv_addr_t depth_status_physical = 0;
+ void *depth_status_logical = 0;
+ if(viv_lock_vidmem(conn, depth_status_node, &depth_status_physical, &depth_status_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target ts memory\n");
+ exit(1);
+ }
+ printf("Locked depth ts target: phys=%08x log=%08x\n", (uint32_t)depth_status_physical, (uint32_t)depth_status_logical);
+
+ /* allocate vertex buffer */
+ gcuVIDMEM_NODE_PTR vtx_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x100000, 0x40, gcvSURF_VERTEX, gcvPOOL_DEFAULT, &vtx_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating vertex memory\n");
+ exit(1);
+ }
+ printf("Allocated vertex node: node=%08x\n", (uint32_t)vtx_node);
+ viv_addr_t vtx_physical = 0;
+ void *vtx_logical = 0;
+ if(viv_lock_vidmem(conn, vtx_node, &vtx_physical, &vtx_logical)!=0)
+ {
+ fprintf(stderr, "Error locking vertex memory\n");
+ exit(1);
+ }
+ printf("Locked vertex memory: phys=%08x log=%08x\n", (uint32_t)vtx_physical, (uint32_t)vtx_logical);
+
+ /* allocate tile status for aux render target */
+ gcuVIDMEM_NODE_PTR rs_dest_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x1a0000, 0x40, gcvSURF_BITMAP, gcvPOOL_DEFAULT, &rs_dest_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating aux render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated aux render target tile status node: node=%08x\n", (uint32_t)rs_dest_node);
+ viv_addr_t rs_dest_physical = 0;
+ void *rs_dest_logical = 0;
+ if(viv_lock_vidmem(conn, rs_dest_node, &rs_dest_physical, &rs_dest_logical)!=0)
+ {
+ fprintf(stderr, "Error locking aux ts render target memory\n");
+ exit(1);
+ }
+ printf("Locked aux render target ts: phys=%08x log=%08x\n", (uint32_t)rs_dest_physical, (uint32_t)rs_dest_logical);
+
+ int texture_size[] = {0x100000, 0x040000, 0x010000, 0x004000, 0x001000, 0x000400, 0x000200, 0x000100, 0x000100, 0x000100};
+ gcuVIDMEM_NODE_PTR text_lod[10];
+ viv_addr_t text_lod_physical[10];
+ void* text_lod_logical[10];
+ for(int idx=0; idx<10; idx++)
+ {
+ if (viv_alloc_linear_vidmem(conn, texture_size[idx], 0x40, gcvSURF_TEXTURE, gcvPOOL_DEFAULT, &text_lod[idx], NULL) != 0)
+ {
+ fprintf(stderr, "Error locking texture nr %d\n", idx);
+ exit(1);
+ }
+ if(viv_lock_vidmem(conn, text_lod[idx], &text_lod_physical[idx], &text_lod_logical[idx]) != 0)
+ {
+ fprintf(stderr, "Error locking texture memory\n");
+ exit(1);
+ }
+ printf("Locked texture target nr %d: phys=%08x log=%08x\n", idx, (uint32_t)text_lod_physical[idx], (uint32_t)text_lod_logical[idx]);
+ }
+
+ /* Interleave companion cube vertex data into ADDR_I */
+ //memset(vtx_logical, 0, 0x5ef80);
+ float *vertices_array = companion_vertices_array();
+ float *texture_coordinates_array = companion_texture_coordinates_array();
+ float *normals_array = companion_normals_array();
+ int dest_idx = 0;
+ for(int vert=0; vert<COMPANION_ARRAY_COUNT*3; ++vert)
+ {
+ ((float*)vtx_logical)[dest_idx] = vertices_array[vert];
+ dest_idx++;
+ }
+ for(int vert=0; vert<COMPANION_ARRAY_COUNT*3; ++vert)
+ {
+ ((float*)vtx_logical)[dest_idx] = normals_array[vert];
+ dest_idx++;
+ }
+ for(int vert=0; vert<COMPANION_ARRAY_COUNT*2; ++vert)
+ {
+ ((float*)vtx_logical)[dest_idx] = texture_coordinates_array[vert];
+ dest_idx++;
+ }
+
+ /* Fill in texture (convert from RGB linear to tiled) */
+ #if 1
+ #define TILE_WIDTH (4)
+ #define TILE_HEIGHT (4)
+ #define TILE_WORDS (TILE_WIDTH*TILE_HEIGHT)
+ unsigned ytiles = COMPANION_TEXTURE_HEIGHT / TILE_HEIGHT;
+ unsigned xtiles = COMPANION_TEXTURE_WIDTH / TILE_WIDTH;
+ unsigned dst_stride = xtiles * TILE_WORDS;
+
+ for(unsigned ty=0; ty<ytiles; ++ty)
+ {
+ for(unsigned tx=0; tx<xtiles; ++tx)
+ {
+ unsigned ofs = ty * dst_stride + tx * TILE_WORDS;
+ for(unsigned y=0; y<TILE_HEIGHT; ++y)
+ {
+ for(unsigned x=0; x<TILE_WIDTH; ++x)
+ {
+ unsigned srcy = ty*TILE_HEIGHT + y;
+ unsigned srcx = tx*TILE_WIDTH + x;
+ unsigned src_ofs = (srcy*COMPANION_TEXTURE_WIDTH+srcx)*3;
+ unsigned r,g,b,a;
+ r = ((uint8_t*)companion_texture)[src_ofs+0];
+ g = ((uint8_t*)companion_texture)[src_ofs+1];
+ b = ((uint8_t*)companion_texture)[src_ofs+2];
+ a = 255;
+
+ ((uint32_t*)text_lod_logical[0])[ofs] = ((a&0xFF) << 24) | ((b&0xFF) << 16) | ((g&0xFF) << 8) | (r&0xFF);
+ //((uint32_t*)text_lod_logical[0])[ofs] = 0xff00ff00;
+ ofs += 1;
+ }
+ }
+ }
+ }
+ #endif
+ #if 0
+ int texfd = open("/data/mine/texture.raw", O_RDONLY);
+ read(texfd, text_lod_logical[0], 512*512*4);
+ close(texfd);
+ #endif
+
+ struct _gcoCMDBUF commandBuffer = {
+ .object = {
+ .type = gcvOBJ_COMMANDBUFFER
+ },
+ .physical = (void*)buf0_physical,
+ .logical = (void*)buf0_logical,
+ .bytes = 0x20000,
+ .startOffset = 0x0,
+ };
+
+ commandBuffer.free = commandBuffer.bytes - 0x8; /* Always keep 0x8 at end of buffer for kernel driver */
+ /* Set addresses in first command buffer */
+ cmdbuf1[31] = cmdbuf1[81] = cmdbuf1[103] = color_status_physical; //H
+ cmdbuf1[32] = cmdbuf1[104] = color_surface_physical; //G
+ cmdbuf1[41] = cmdbuf1[135] = cmdbuf1[155] = depth_status_physical; //J
+ cmdbuf1[42] = cmdbuf1[156] = depth_surface_physical; //I
+ cmdbuf1[191] = text_lod_physical[0]; //L - base bitmap
+ cmdbuf1[193] = text_lod_physical[1]; //M
+
+ /* Submit first command buffer */
+ commandBuffer.startOffset = 0;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf1, sizeof(cmdbuf1));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf1);
+ commandBuffer.free -= sizeof(cmdbuf1) + 0x08;
+ printf("[1] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing first command buffer\n");
+ exit(1);
+ }
+
+ /* Create signal */
+ int sig_id = 0;
+ if(viv_user_signal_create(conn, 0, &sig_id) != 0) /* automatic resetting signal */
+ {
+ fprintf(stderr, "Cannot create user signal\n");
+ exit(1);
+ }
+ printf("Created user signal %i\n", sig_id);
+
+ /* Queue and wait for signal */
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+
+ //generate LOD
+ unsigned stride[] = {0x1000, 0x800, 0x400, 0x200, 0x100, 0x100, 0x100, 0x100, 0x100};
+ unsigned height[] = { 256, 128, 64, 32, 16, 8, 8, 8};
+ unsigned width[] = { 256, 128, 64, 32, 32, 32, 32, 32};
+ /* 33 - stride src
+ 35 - stride dst *
+ 39 - pad but allways different - garbage?
+ 45 - source addr
+ 47 - dest addr
+ 49 - height width*/
+ for (int idx=0; idx<8; idx++)
+ {
+ /* Submit command buffer 2 */
+ cmdbuf2[33] = stride[idx];
+ cmdbuf2[35] = stride[idx + 1];
+ cmdbuf2[45] = text_lod_physical[idx + 1]; //idx 0 - 1 done in first cmdbuf
+ cmdbuf2[47] = text_lod_physical[idx + 2];
+ cmdbuf2[49] = (height[idx] << 16) | width[idx];
+
+ commandBuffer.startOffset = commandBuffer.offset + 0x08; /* Make space for LINK */
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf2, sizeof(cmdbuf2));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf2);
+ commandBuffer.free -= sizeof(cmdbuf2) + 0x08;
+ printf("[2,%d] startOffset=%08x, offset=%08x, free=%08x\n", idx, (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing second command buffer\n");
+ exit(1);
+ }
+ }
+
+ /* Submit command buffer 3 */
+ commandBuffer.startOffset = commandBuffer.offset + 0x08;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf3, sizeof(cmdbuf3));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf3);
+ commandBuffer.free -= sizeof(cmdbuf3) + 0x08;
+ printf("[3] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing third command buffer\n");
+ exit(1);
+ }
+
+ /* Submit command buffer 4 */
+ cmdbuf4[67] = vtx_physical; //A
+ cmdbuf4[68] = vtx_physical+0x239d0; //A
+ cmdbuf4[69] = vtx_physical+(2*0x239d0); //A
+ cmdbuf4[87] = text_lod_physical[0];
+ cmdbuf4[89] = text_lod_physical[1];
+ cmdbuf4[91] = text_lod_physical[2];
+ cmdbuf4[93] = text_lod_physical[3];
+ cmdbuf4[95] = text_lod_physical[4];
+ cmdbuf4[97] = text_lod_physical[5];
+ cmdbuf4[99] = text_lod_physical[6];
+ cmdbuf4[101] = text_lod_physical[7];
+ cmdbuf4[103] = text_lod_physical[8];
+ cmdbuf4[105] = text_lod_physical[9];
+ cmdbuf4[153] = cmdbuf4[155] = color_surface_physical;//G
+ cmdbuf4[165] = cmdbuf4[167] = depth_surface_physical;//I
+
+ commandBuffer.startOffset = commandBuffer.offset + 0x08;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf4, sizeof(cmdbuf4));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf4);
+ commandBuffer.free -= sizeof(cmdbuf4) + 0x08;
+ printf("[4] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing command buffer 4\n");
+ exit(1);
+ }
+
+ /* Submit event, and wait */
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+
+ /* Submit command buffer 5 */
+ cmdbuf5[35] = cmdbuf5[37] = color_surface_physical;
+
+ commandBuffer.startOffset = commandBuffer.offset + 0x08;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf5, sizeof(cmdbuf5));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf5);
+ commandBuffer.free -= sizeof(cmdbuf5) + 0x08;
+ printf("[5] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing command buffer 5\n");
+ exit(1);
+ }
+
+
+
+ cmdbuf6[35] = color_surface_physical;
+ cmdbuf6[37] = rs_dest_physical;
+
+ commandBuffer.startOffset = commandBuffer.offset + 0x08;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf6, sizeof(cmdbuf6));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf6);
+ commandBuffer.free -= sizeof(cmdbuf6) + 0x08;
+ printf("[6] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing command buffer 5\n");
+ exit(1);
+ }
+
+
+ /* Allocate bitmap memory, map */
+ gcuVIDMEM_NODE_PTR bmp_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x177000, 0x40, gcvSURF_BITMAP, gcvPOOL_DEFAULT, &bmp_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating bitmap status memory\n");
+ exit(1);
+ }
+ printf("Allocated bitmap node: node=%08x\n", (uint32_t)bmp_node);
+ viv_addr_t bmp_physical = 0; // ADDR_J
+ void *bmp_logical = 0;
+ if(viv_lock_vidmem(conn, bmp_node, &bmp_physical, &bmp_logical)!=0)
+ {
+ fprintf(stderr, "Error locking bmp memory\n");
+ exit(1);
+ }
+ memset(bmp_logical, 0xff, 0x177000); // clear previous result
+ printf("Locked bmp: phys=%08x log=%08x\n", (uint32_t)bmp_physical, (uint32_t)bmp_logical);
+
+
+ /* Submit command buffer 7 */
+ cmdbuf7[0x19] = rs_dest_physical; //color_surface_physical or rs_dest_physical
+ cmdbuf7[0x1b] = bmp_physical;
+
+ commandBuffer.startOffset = commandBuffer.offset + 0x08;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf7, sizeof(cmdbuf7));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf7);
+ commandBuffer.free -= sizeof(cmdbuf7) + 0x08;
+ printf("[7] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing command buffer 5\n");
+ exit(1);
+ }
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL */
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+
+ bmp_dump32(bmp_logical, 800, 480, false, "/home/linaro/replay.bmp");
+ /* Unlock video memory */
+ if(viv_unlock_vidmem(conn, bmp_node, gcvSURF_BITMAP, 1) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+ /*
+ for(int x=0; x<0x700; ++x)
+ {
+ uint32_t value = ((uint32_t*)rt_ts_logical)[x];
+ printf("Sample ts: %x %08x\n", x*4, value);
+ }*/
+ //printf("Contextbuffer used %i\n", *contextBuffer.inUse);
+ viv_close(conn);
+ return 0;
+}
+
diff --git a/src/replay/cube_companion_replay.png b/src/replay/cube_companion_replay.png
new file mode 100644
index 0000000..d7c313b
--- /dev/null
+++ b/src/replay/cube_companion_replay.png
Binary files differ
diff --git a/src/replay/cube_etna.c b/src/replay/cube_etna.c
new file mode 100644
index 0000000..fbf1df4
--- /dev/null
+++ b/src/replay/cube_etna.c
@@ -0,0 +1,1179 @@
+/* like cube, an exact reproducation of egl command stream
+ * but try to generate the command stream ourselves using etna_XXX */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include "viv_raw.h"
+#include "write_bmp.h"
+#include "esTransform.h"
+
+/* Print generated command buffer */
+//#define CMD_DEBUG
+/* Compare generated with stored command buffers generated by Vivante driver */
+#define CMD_COMPARE
+
+#ifdef CMD_COMPARE
+#include "cube_cmd.h"
+#endif
+/* TODO: should actually update context as we go,
+ a context switch would currently revert state and likely result in corrupted rendering.
+ */
+#include "context_cmd.h"
+
+float vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+};
+
+float vColors[] = {
+ // front
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f, // magenta
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ // back
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 1.0f, 0.0f, // yellow
+ 0.0f, 1.0f, 0.0f, // green
+ // right
+ 1.0f, 0.0f, 1.0f, // magenta
+ 1.0f, 0.0f, 0.0f, // red
+ 1.0f, 1.0f, 1.0f, // white
+ 1.0f, 1.0f, 0.0f, // yellow
+ // left
+ 0.0f, 0.0f, 0.0f, // black
+ 0.0f, 0.0f, 1.0f, // blue
+ 0.0f, 1.0f, 0.0f, // green
+ 0.0f, 1.0f, 1.0f, // cyan
+ // top
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ 0.0f, 1.0f, 0.0f, // green
+ 1.0f, 1.0f, 0.0f, // yellow
+ // bottom
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f // magenta
+};
+
+float vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+};
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (6*4)
+
+#ifdef CMD_COMPARE
+char is_padding[0x8000 / 4];
+#endif
+
+/* macro for MASKED() (multiple can be &ed) */
+#define VIV_MASKED(NAME, VALUE) (~(NAME ## _MASK | NAME ## __MASK) | ((VALUE)<<(NAME ## __SHIFT)))
+/* for boolean bits */
+#define VIV_MASKED_BIT(NAME, VALUE) (~(NAME ## _MASK | NAME) | ((VALUE) ? NAME : 0))
+/* for inline enum bit fields
+ * XXX in principle headergen could simply generate these fields prepackaged
+ */
+#define VIV_MASKED_INL(NAME, VALUE) (~(NAME ## _MASK | NAME ## __MASK) | (NAME ## _ ## VALUE))
+
+/* XXX store state changes
+ * group consecutive states
+ * make LOAD_STATE commands, add to current command buffer
+ */
+static inline void etna_set_state(gcoCMDBUF commandBuffer, uint32_t address, uint32_t value)
+{
+#ifdef CMD_DEBUG
+ printf("%05x := %08x\n", address, value);
+#endif
+ uint32_t *tgt = (uint32_t*)((size_t)commandBuffer->logical + commandBuffer->offset);
+ tgt[0] = VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE |
+ VIV_FE_LOAD_STATE_HEADER_COUNT(1) |
+ VIV_FE_LOAD_STATE_HEADER_OFFSET(address >> 2);
+ tgt[1] = value;
+ commandBuffer->offset += 8;
+}
+
+/* this can be inlined, though would likely be even faster to return a pointer and let the client write to
+ * the buffer directly */
+static inline void etna_set_state_multi(gcoCMDBUF commandBuffer, uint32_t base, uint32_t num, uint32_t *values)
+{
+ uint32_t *tgt = (uint32_t*)((size_t)commandBuffer->logical + commandBuffer->offset);
+ tgt[0] = VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE |
+ VIV_FE_LOAD_STATE_HEADER_COUNT(num & 0x3ff) |
+ VIV_FE_LOAD_STATE_HEADER_OFFSET(base >> 2);
+#ifdef CMD_DEBUG
+ for(uint32_t idx=0; idx<num; ++idx)
+ {
+ printf("%05x := %08x\n", base, values[idx]);
+ base += 4;
+ }
+#endif
+ memcpy(&tgt[1], values, 4*num);
+ commandBuffer->offset += 4 + num*4;
+ if(commandBuffer->offset & 4) /* PAD */
+ {
+#ifdef CMD_COMPARE
+ is_padding[commandBuffer->offset / 4] = 1;
+#endif
+ commandBuffer->offset += 4;
+ }
+}
+static inline void etna_set_state_f32(gcoCMDBUF commandBuffer, uint32_t address, float value)
+{
+ union {
+ uint32_t i32;
+ float f32;
+ } x = { .f32 = value };
+ etna_set_state(commandBuffer, address, x.i32);
+}
+static inline void etna_set_state_fixp(gcoCMDBUF commandBuffer, uint32_t address, uint32_t value)
+{
+#ifdef CMD_DEBUG
+ printf("%05x := %08x (fixp)\n", address, value);
+#endif
+ uint32_t *tgt = (uint32_t*)((size_t)commandBuffer->logical + commandBuffer->offset);
+ tgt[0] = VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE |
+ VIV_FE_LOAD_STATE_HEADER_COUNT(1) |
+ VIV_FE_LOAD_STATE_HEADER_FIXP |
+ VIV_FE_LOAD_STATE_HEADER_OFFSET(address >> 2);
+ tgt[1] = value;
+ commandBuffer->offset += 8;
+}
+static inline void etna_draw_primitives(gcoCMDBUF cmdPtr, uint32_t primitive_type, uint32_t start, uint32_t count)
+{
+#ifdef CMD_DEBUG
+ printf("draw_primitives %08x %08x %08x %08x\n",
+ VIV_FE_DRAW_PRIMITIVES_HEADER_OP_DRAW_PRIMITIVES,
+ primitive_type, start, count);
+#endif
+ uint32_t *tgt = (uint32_t*)((size_t)cmdPtr->logical + cmdPtr->offset);
+ tgt[0] = VIV_FE_DRAW_PRIMITIVES_HEADER_OP_DRAW_PRIMITIVES;
+ tgt[1] = primitive_type;
+ tgt[2] = start;
+ tgt[3] = count;
+ cmdPtr->offset += 16;
+}
+
+/* warm up RS on aux render target */
+static void etna_warm_up_rs(gcoCMDBUF cmdPtr, viv_addr_t aux_rt_physical, viv_addr_t aux_rt_ts_physical)
+{
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, aux_rt_ts_physical); /* ADDR_G */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_SURFACE_BASE, aux_rt_physical); /* ADDR_F */
+ etna_set_state(cmdPtr, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH);
+ etna_set_state(cmdPtr, VIVS_RS_CONFIG, /* wut? */
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_R5G6B5) |
+ VIVS_RS_CONFIG_DEST_TILED);
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_ADDR, aux_rt_physical); /* ADDR_F */
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_STRIDE, 0x400);
+ etna_set_state(cmdPtr, VIVS_RS_DEST_ADDR, aux_rt_physical); /* ADDR_F */
+ etna_set_state(cmdPtr, VIVS_RS_DEST_STRIDE, 0x400);
+ etna_set_state(cmdPtr, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(4) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(16));
+ etna_set_state(cmdPtr, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(cmdPtr, VIVS_RS_KICKER, 0xbeebbeeb);
+}
+
+#ifdef CMD_COMPARE
+int cmdbuffer_compare(gcoCMDBUF cmdPtr, uint32_t *cmdbuf, uint32_t cmdbuf_size)
+{
+ /* Count differences between generated and stored command buffer */
+ int diff = 0;
+ for(int idx=8; idx<cmdbuf_size/4; ++idx)
+ {
+ uint32_t cmdbuf_word = cmdbuf[idx];
+ uint32_t my_word = *(uint32_t*)((size_t)cmdPtr->logical + cmdPtr->startOffset + idx*4);
+ printf("/*%03x*/ %08x ref:%08x ", idx, my_word, cmdbuf_word);
+ if(is_padding[cmdPtr->startOffset/4 + idx])
+ {
+ printf("PAD");
+ } else if(cmdbuf_word != my_word)
+ {
+ diff += 1;
+ printf("DIFF");
+ }
+ printf("\n");
+ }
+ printf("Number of differences: %i\n", diff);
+ uint32_t size_cmd = cmdbuf_size/4;
+ uint32_t size_my = (cmdPtr->offset - cmdPtr->startOffset)/4;
+ printf("Sizes: %i %i\n", size_cmd, size_my);
+ return diff != 0 || size_cmd != size_my;
+}
+#endif
+
+static inline uint32_t align_up(uint32_t value, uint32_t granularity)
+{
+ return (value + (granularity-1)) & (~(granularity-1));
+}
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 400;
+ int height = 240;
+ int padded_width = align_up(width, 64);
+ int padded_height = align_up(height, 64);
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+ viv_show_chip_info(conn);
+
+ /* allocate command buffer (blob uses four command buffers, but we don't even fill one) */
+ viv_addr_t buf0_physical = 0;
+ void *buf0_logical = 0;
+ if(viv_alloc_contiguous(conn, 0x8000, &buf0_physical, &buf0_logical, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating host memory\n");
+ exit(1);
+ }
+ printf("Allocated buffer: phys=%08x log=%08x\n", (uint32_t)buf0_physical, (uint32_t)buf0_logical);
+
+ /* allocate main render target */
+ gcuVIDMEM_NODE_PTR rt_node = 0;
+ if(viv_alloc_linear_vidmem(conn, padded_width * padded_height * 4, 0x40, gcvSURF_RENDER_TARGET, gcvPOOL_DEFAULT, &rt_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target buffer memory\n");
+ exit(1);
+ }
+ printf("Allocated render target node: node=%08x\n", (uint32_t)rt_node);
+
+ viv_addr_t rt_physical = 0; /* ADDR_A */
+ void *rt_logical = 0;
+ if(viv_lock_vidmem(conn, rt_node, &rt_physical, &rt_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target: phys=%08x log=%08x\n", (uint32_t)rt_physical, (uint32_t)rt_logical);
+ memset(rt_logical, 0xff, padded_width * padded_height * 4); /* clear previous result just in case, test that clearing works */
+
+ /* allocate tile status for main render target */
+ gcuVIDMEM_NODE_PTR rt_ts_node = 0;
+ uint32_t rt_ts_size = align_up((padded_width * padded_height * 4)/0x100, 0x100);
+ if(viv_alloc_linear_vidmem(conn, rt_ts_size, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &rt_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated render target tile status node: node=%08x size=%08x\n", (uint32_t)rt_ts_node, rt_ts_size);
+
+ viv_addr_t rt_ts_physical = 0; /* ADDR_B */
+ void *rt_ts_logical = 0;
+ if(viv_lock_vidmem(conn, rt_ts_node, &rt_ts_physical, &rt_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target ts: phys=%08x log=%08x\n", (uint32_t)rt_ts_physical, (uint32_t)rt_ts_logical);
+
+ /* allocate depth for main render target */
+ gcuVIDMEM_NODE_PTR z_node = 0;
+ if(viv_alloc_linear_vidmem(conn, padded_width * padded_height * 2, 0x40, gcvSURF_DEPTH, gcvPOOL_DEFAULT, &z_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth node: node=%08x\n", (uint32_t)z_node);
+
+ viv_addr_t z_physical = 0; /* ADDR_C */
+ void *z_logical = 0;
+ if(viv_lock_vidmem(conn, z_node, &z_physical, &z_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target memory\n");
+ exit(1);
+ }
+ printf("Locked depth target: phys=%08x log=%08x\n", (uint32_t)z_physical, (uint32_t)z_logical);
+
+ /* allocate depth ts for main render target */
+ gcuVIDMEM_NODE_PTR z_ts_node = 0;
+ uint32_t z_ts_size = align_up((padded_width * padded_height * 2)/0x100, 0x100);
+ if(viv_alloc_linear_vidmem(conn, z_ts_size, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &z_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth ts node: node=%08x size=%08x\n", (uint32_t)z_ts_node, z_ts_size);
+
+ viv_addr_t z_ts_physical = 0; /* ADDR_D */
+ void *z_ts_logical = 0;
+ if(viv_lock_vidmem(conn, z_ts_node, &z_ts_physical, &z_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target ts memory\n");
+ exit(1);
+ }
+ printf("Locked depth ts target: phys=%08x log=%08x\n", (uint32_t)z_ts_physical, (uint32_t)z_ts_logical);
+
+ /* allocate vertex buffer */
+ gcuVIDMEM_NODE_PTR vtx_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x60000, 0x40, gcvSURF_VERTEX, gcvPOOL_DEFAULT, &vtx_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating vertex memory\n");
+ exit(1);
+ }
+ printf("Allocated vertex node: node=%08x\n", (uint32_t)vtx_node);
+
+ viv_addr_t vtx_physical = 0; /* ADDR_E */
+ void *vtx_logical = 0;
+ if(viv_lock_vidmem(conn, vtx_node, &vtx_physical, &vtx_logical)!=0)
+ {
+ fprintf(stderr, "Error locking vertex memory\n");
+ exit(1);
+ }
+ printf("Locked vertex memory: phys=%08x log=%08x\n", (uint32_t)vtx_physical, (uint32_t)vtx_logical);
+
+ /* allocate aux render target */
+ gcuVIDMEM_NODE_PTR aux_rt_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x4000, 0x40, gcvSURF_RENDER_TARGET, gcvPOOL_SYSTEM /*why?*/, &aux_rt_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating aux render target buffer memory\n");
+ exit(1);
+ }
+ printf("Allocated aux render target node: node=%08x\n", (uint32_t)aux_rt_node);
+
+ viv_addr_t aux_rt_physical = 0; /* ADDR_F */
+ void *aux_rt_logical = 0;
+ if(viv_lock_vidmem(conn, aux_rt_node, &aux_rt_physical, &aux_rt_logical)!=0)
+ {
+ fprintf(stderr, "Error locking aux render target memory\n");
+ exit(1);
+ }
+ printf("Locked aux render target: phys=%08x log=%08x\n", (uint32_t)aux_rt_physical, (uint32_t)aux_rt_logical);
+
+ /* allocate tile status for aux render target */
+ gcuVIDMEM_NODE_PTR aux_rt_ts_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x100, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &aux_rt_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating aux render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated aux render target tile status node: node=%08x\n", (uint32_t)aux_rt_ts_node);
+
+ viv_addr_t aux_rt_ts_physical = 0; /* ADDR_G */
+ void *aux_rt_ts_logical = 0;
+ if(viv_lock_vidmem(conn, aux_rt_ts_node, &aux_rt_ts_physical, &aux_rt_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking aux ts render target memory\n");
+ exit(1);
+ }
+ printf("Locked aux render target ts: phys=%08x log=%08x\n", (uint32_t)aux_rt_ts_physical, (uint32_t)aux_rt_ts_logical);
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int src_idx = vert * COMPONENTS_PER_VERTEX;
+ int dest_idx = vert * COMPONENTS_PER_VERTEX * 3;
+ for(int comp=0; comp<COMPONENTS_PER_VERTEX; ++comp)
+ {
+ ((float*)vtx_logical)[dest_idx+comp+0] = vVertices[src_idx + comp]; /* 0 */
+ ((float*)vtx_logical)[dest_idx+comp+3] = vNormals[src_idx + comp]; /* 1 */
+ ((float*)vtx_logical)[dest_idx+comp+6] = vColors[src_idx + comp]; /* 2 */
+ }
+ }
+ /*
+ for(int idx=0; idx<NUM_VERTICES*3*3; ++idx)
+ {
+ printf("%i %f\n", idx, ((float*)vtx_logical)[idx]);
+ }*/
+
+ /* Load the command buffer and send the commit command. */
+ /* First build context state map */
+ size_t stateCount = 0x1d00;
+ uint32_t *contextMap = malloc(stateCount * 4);
+ memset(contextMap, 0, stateCount*4);
+ for(int idx=0; idx<sizeof(contextbuf_addr)/sizeof(address_index_t); ++idx)
+ {
+ contextMap[contextbuf_addr[idx].address / 4] = contextbuf_addr[idx].index;
+ }
+
+ struct _gcoCMDBUF commandBuffer = {
+ .object = {
+ .type = gcvOBJ_COMMANDBUFFER
+ },
+ //.os = (_gcoOS*)0xbf7488,
+ //.hardware = (_gcoHARDWARE*)0x402694e0,
+ .physical = (void*)buf0_physical,
+ .logical = (void*)buf0_logical,
+ .bytes = 0x8000,
+ .startOffset = 0x0,
+ //.offset = 0xac0,
+ //.free = 0x7520,
+ //.hintTable = (unsigned int*)0x0, // Used when gcdSECURE
+ //.hintIndex = (unsigned int*)0x58, // Used when gcdSECURE
+ //.hintCommit = (unsigned int*)0xffffffff // Used when gcdSECURE
+ };
+ struct _gcoCONTEXT contextBuffer = {
+ .object = {
+ .type = gcvOBJ_CONTEXT
+ },
+ //.os = (_gcoOS*)0xbf7488,
+ //.hardware = (_gcoHARDWARE*)0x402694e0,
+ .id = 0x0, // Actual ID will be returned here
+ .map = contextMap,
+ .stateCount = stateCount,
+ //.hint = (unsigned char*)0x0, // Used when gcdSECURE
+ //.hintValue = 2, // Used when gcdSECURE
+ //.hintCount = 0xca, // Used when gcdSECURE
+ .buffer = contextbuf,
+ .pipe3DIndex = 0x2d6, // XXX should not be hardcoded
+ .pipe2DIndex = 0x106e,
+ .linkIndex = 0x1076,
+ .inUseIndex = 0x1078,
+ .bufferSize = 0x41e4,
+ .bytes = 0x0, // Number of bytes at physical, logical
+ .physical = (void*)0x0,
+ .logical = (void*)0x0,
+ .link = (void*)0x0, // Logical address of link
+ .initialPipe = 0x1,
+ .entryPipe = 0x0,
+ .currentPipe = 0x0,
+ .postCommit = 1,
+ .inUse = (int*)0x0, // Logical address of inUse
+ .lastAddress = 0xffffffff, // Not used by kernel
+ .lastSize = 0x2, // Not used by kernel
+ .lastIndex = 0x106a, // Not used by kernel
+ .lastFixed = 0, // Not used by kernel
+ //.hintArray = (unsigned int*)0x0, // Used when gcdSECURE
+ //.hintIndex = (unsigned int*)0x0 // Used when gcdSECURE
+ };
+ struct _gcoCMDBUF *cmdPtr = &commandBuffer;
+
+ commandBuffer.free = commandBuffer.bytes - 0x8; /* Always keep 0x8 at end of buffer for kernel driver */
+ commandBuffer.startOffset = 0;
+ commandBuffer.offset = commandBuffer.startOffset + 8*4;
+#ifdef CMD_COMPARE
+ memset(is_padding, 0, 0x8000/4); /* keep track of what words in the command buffer are padding; just for debugging / comparing */
+#endif
+
+ /* XXX how important is the ordering? I suppose we could group states (except the flushes, kickers, semaphores etc)
+ * and simply submit them at once. Especially for consecutive states and masked stated this could be a big win
+ * in DMA command buffer size. */
+
+ /* Build first command buffer */
+ etna_set_state(cmdPtr, VIVS_GL_VERTEX_ELEMENT_CONFIG, 0x1);
+ etna_set_state(cmdPtr, VIVS_RA_CONTROL, 0x1);
+
+ etna_set_state(cmdPtr, VIVS_PA_W_CLIP_LIMIT, 0x34000001);
+ etna_set_state(cmdPtr, VIVS_PA_SYSTEM_MODE, 0x11);
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_BIT(VIVS_PA_CONFIG_UNK22, 0));
+ etna_set_state(cmdPtr, VIVS_SE_CONFIG, 0x0);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_FORMAT,
+ VIV_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 0));
+ etna_set_state(cmdPtr, VIVS_PE_ALPHA_CONFIG, /* can & all these together */
+ VIV_MASKED_BIT(VIVS_PE_ALPHA_CONFIG_BLEND_ENABLE_COLOR, 0) &
+ VIV_MASKED_BIT(VIVS_PE_ALPHA_CONFIG_BLEND_SEPARATE_ALPHA, 0));
+ etna_set_state(cmdPtr, VIVS_PE_ALPHA_CONFIG,
+ VIV_MASKED(VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR, BLEND_FUNC_ONE) &
+ VIV_MASKED(VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA, BLEND_FUNC_ONE));
+ etna_set_state(cmdPtr, VIVS_PE_ALPHA_CONFIG,
+ VIV_MASKED(VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR, BLEND_FUNC_ZERO) &
+ VIV_MASKED(VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA, BLEND_FUNC_ZERO));
+ etna_set_state(cmdPtr, VIVS_PE_ALPHA_CONFIG,
+ VIV_MASKED(VIVS_PE_ALPHA_CONFIG_EQ_COLOR, BLEND_EQ_ADD) &
+ VIV_MASKED(VIVS_PE_ALPHA_CONFIG_EQ_ALPHA, BLEND_EQ_ADD));
+ etna_set_state(cmdPtr, VIVS_PE_ALPHA_BLEND_COLOR,
+ (0 << VIVS_PE_ALPHA_BLEND_COLOR_B__SHIFT) |
+ (0 << VIVS_PE_ALPHA_BLEND_COLOR_G__SHIFT) |
+ (0 << VIVS_PE_ALPHA_BLEND_COLOR_R__SHIFT) |
+ (0 << VIVS_PE_ALPHA_BLEND_COLOR_A__SHIFT));
+
+ etna_set_state(cmdPtr, VIVS_PE_ALPHA_OP, VIV_MASKED_BIT(VIVS_PE_ALPHA_OP_ALPHA_TEST, 0));
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_INL(VIVS_PA_CONFIG_CULL_FACE_MODE, OFF));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_CONFIG, VIV_MASKED(VIVS_PE_STENCIL_CONFIG_REF_FRONT, 0));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_FUNC_FRONT, COMPARE_FUNC_ALWAYS));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_FUNC_BACK, COMPARE_FUNC_ALWAYS));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_CONFIG, VIV_MASKED(VIVS_PE_STENCIL_CONFIG_MASK_FRONT, 0xff));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_CONFIG, VIV_MASKED(VIVS_PE_STENCIL_CONFIG_WRITE_MASK, 0xff));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_FAIL_FRONT, STENCIL_OP_KEEP));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_FAIL_BACK, STENCIL_OP_KEEP));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT, STENCIL_OP_KEEP));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK, STENCIL_OP_KEEP));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_PASS_FRONT, STENCIL_OP_KEEP));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_PASS_BACK, STENCIL_OP_KEEP));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_FORMAT, VIV_MASKED(VIVS_PE_COLOR_FORMAT_COMPONENTS, 0xf));
+
+#if 0
+ /* set bits at once -- faster? */
+ etna_set_state(cmdPtr, VIVS_PE_ALPHA_CONFIG,
+ // VIVS_PE_ALPHA_CONFIG_BLEND_ENABLE_COLOR |
+ // VIVS_PE_ALPHA_CONFIG_BLEND_ENABLE_ALPHA_MASK |
+ (BLEND_FUNC_ONE << VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR__SHIFT) |
+ (BLEND_FUNC_ONE << VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA__SHIFT) |
+ (BLEND_FUNC_ZERO << VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR__SHIFT) |
+ (BLEND_FUNC_ZERO << VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA__SHIFT) |
+ (BLEND_EQ_ADD << VIVS_PE_ALPHA_CONFIG_EQ_COLOR__SHIFT) |
+ (BLEND_EQ_ADD << VIVS_PE_ALPHA_CONFIG_EQ_ALPHA__SHIFT));
+ etna_set_state(cmdPtr, VIVS_PE_ALPHA_OP, ~(VIVS_PE_ALPHA_OP_ALPHA_TEST | VIVS_PE_ALPHA_OP_ALPHA_TEST_MASK));
+
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG,
+ (~(VIVS_PA_CONFIG_CULL_FACE_MODE_MASK | VIVS_PA_CONFIG_CULL_FACE_MODE__MASK)) |
+ VIVS_PA_CONFIG_CULL_FACE_MODE_OFF);
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG,
+ ~(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE | VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE_MASK |
+ VIVS_PE_DEPTH_CONFIG_EARLY_Z | VIVS_PE_DEPTH_CONFIG_EARLY_Z_MASK));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_CONFIG,
+ VIVS_PE_STENCIL_CONFIG_MODE_DISABLED |
+ (0 << VIVS_PE_STENCIL_CONFIG_REF_FRONT__SHIFT) |
+ (0 << VIVS_PE_STENCIL_CONFIG_MASK_FRONT__SHIFT) |
+ (0 << VIVS_PE_STENCIL_CONFIG_WRITE_MASK__SHIFT));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP,
+ (COMPARE_FUNC_ALWAYS << VIVS_PE_STENCIL_OP_FUNC_FRONT__SHIFT)|
+ (STENCIL_OP_KEEP << VIVS_PE_STENCIL_OP_PASS_FRONT__SHIFT)|
+ (STENCIL_OP_KEEP << VIVS_PE_STENCIL_OP_FAIL_FRONT__SHIFT)|
+ (STENCIL_OP_KEEP << VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT__SHIFT)|
+ (COMPARE_FUNC_ALWAYS << VIVS_PE_STENCIL_OP_FUNC_BACK__SHIFT) |
+ (STENCIL_OP_KEEP << VIVS_PE_STENCIL_OP_PASS_BACK__SHIFT)|
+ (STENCIL_OP_KEEP << VIVS_PE_STENCIL_OP_FAIL_BACK__SHIFT)|
+ (STENCIL_OP_KEEP << VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK__SHIFT));
+#endif
+ etna_set_state(cmdPtr, VIVS_SE_DEPTH_SCALE, 0x0);
+ etna_set_state(cmdPtr, VIVS_SE_DEPTH_BIAS, 0x0);
+
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_INL(VIVS_PA_CONFIG_FILL_MODE, SOLID));
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_INL(VIVS_PA_CONFIG_SHADE_MODEL, SMOOTH));
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_FORMAT,
+ VIV_MASKED(VIVS_PE_COLOR_FORMAT_FORMAT, RS_FORMAT_X8R8G8B8) &
+ VIV_MASKED_BIT(VIVS_PE_COLOR_FORMAT_SUPER_TILED, 1));
+
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_ADDR, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_STRIDE, padded_width * 4);
+ etna_set_state(cmdPtr, VIVS_GL_MULTI_SAMPLE_CONFIG,
+ VIV_MASKED_INL(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES, NONE) &
+ VIV_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES, 0xf) &
+ VIV_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12, 0x0) &
+ VIV_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16, 0x0)
+ );
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_FORMAT, VIV_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 1));
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_CLEAR_VALUE, 0);
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, rt_ts_physical); /* ADDR_B */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_SURFACE_BASE, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_TS_MEM_CONFIG, VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR);
+
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG,
+ VIV_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT, D16) &
+ VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_SUPER_TILED, 1)
+ );
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_ADDR, z_physical); /* ADDR_C */
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_STRIDE, padded_width * 2);
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_CONFIG, VIV_MASKED_INL(VIVS_PE_STENCIL_CONFIG_MODE, DISABLED));
+ etna_set_state(cmdPtr, VIVS_PE_HDEPTH_CONTROL, VIVS_PE_HDEPTH_CONTROL_FORMAT_DISABLED);
+ etna_set_state_f32(cmdPtr, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(cmdPtr, VIVS_TS_DEPTH_CLEAR_VALUE, 0xffffffff);
+ etna_set_state(cmdPtr, VIVS_TS_DEPTH_STATUS_BASE, z_ts_physical); /* ADDR_D */
+ etna_set_state(cmdPtr, VIVS_TS_DEPTH_SURFACE_BASE, z_physical); /* ADDR_C */
+ etna_set_state(cmdPtr, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 1)); /* flip-flopping once again */
+
+ /* Warm up RS on aux render target */
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(cmdPtr, aux_rt_physical, aux_rt_ts_physical);
+
+ /* Phew, now that's one hell of a setup; the serious rendering starts now */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, rt_ts_physical); /* ADDR_B */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_SURFACE_BASE, rt_physical); /* ADDR_A */
+
+ /* ... or so we thought */
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(cmdPtr, aux_rt_physical, aux_rt_ts_physical);
+
+ /* maybe now? */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, rt_ts_physical); /* ADDR_B */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_SURFACE_BASE, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ /* nope, not really... */
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(cmdPtr, aux_rt_physical, aux_rt_ts_physical);
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, rt_ts_physical); /* ADDR_B */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_SURFACE_BASE, rt_physical); /* ADDR_A */
+
+ /* semaphore time */
+ etna_set_state(cmdPtr, VIVS_GL_SEMAPHORE_TOKEN,
+ (SYNC_RECIPIENT_RA<<VIVS_GL_SEMAPHORE_TOKEN_FROM__SHIFT)|
+ (SYNC_RECIPIENT_PE<<VIVS_GL_SEMAPHORE_TOKEN_TO__SHIFT)
+ );
+ etna_set_state(cmdPtr, VIVS_GL_STALL_TOKEN,
+ (SYNC_RECIPIENT_RA<<VIVS_GL_STALL_TOKEN_FROM__SHIFT)|
+ (SYNC_RECIPIENT_PE<<VIVS_GL_STALL_TOKEN_TO__SHIFT)
+ );
+
+ /* Set up the resolve to clear tile status for main render target
+ * Regard the TS as an image of width 16 with 4 bytes per pixel (64 bytes per row)
+ * XXX need to clear the depth ts too.
+ * */
+ etna_set_state(cmdPtr, VIVS_RS_CONFIG,
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_SOURCE_FORMAT__SHIFT) |
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_DEST_FORMAT__SHIFT)
+ );
+ etna_set_state_multi(cmdPtr, VIVS_RS_DITHER(0), 2, (uint32_t[]){0xffffffff, 0xffffffff});
+ etna_set_state(cmdPtr, VIVS_RS_DEST_ADDR, rt_ts_physical); /* ADDR_B */
+ etna_set_state(cmdPtr, VIVS_RS_DEST_STRIDE, 0x40);
+ etna_set_state(cmdPtr, VIVS_RS_WINDOW_SIZE,
+ ((rt_ts_size/0x40) << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (16 << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(cmdPtr, VIVS_RS_FILL_VALUE(0), 0x55555555);
+ etna_set_state(cmdPtr, VIVS_RS_CLEAR_CONTROL,
+ VIVS_RS_CLEAR_CONTROL_MODE_ENABLED1 |
+ (0xffff << VIVS_RS_CLEAR_CONTROL_BITS__SHIFT));
+ etna_set_state(cmdPtr, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(cmdPtr, VIVS_RS_KICKER,
+ 0xbeebbeeb);
+
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_CLEAR_VALUE, 0xff7f7f7f);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_CLEAR_VALUE, 0xff7f7f7f);
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, rt_ts_physical); /* ADDR_B */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_SURFACE_BASE, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_INL(VIVS_PA_CONFIG_CULL_FACE_MODE, CCW));
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_MODE, NONE));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED(VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC, COMPARE_FUNC_ALWAYS));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_MODE, Z));
+ etna_set_state_f32(cmdPtr, VIVS_PE_DEPTH_NEAR, 0.0);
+ etna_set_state_f32(cmdPtr, VIVS_PE_DEPTH_FAR, 1.0);
+ etna_set_state_f32(cmdPtr, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+
+ /* set up primitive assembly */
+ etna_set_state_f32(cmdPtr, VIVS_PA_VIEWPORT_OFFSET_Z, 0.0);
+ etna_set_state_f32(cmdPtr, VIVS_PA_VIEWPORT_SCALE_Z, 1.0);
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_ONLY_DEPTH, 0));
+ etna_set_state_fixp(cmdPtr, VIVS_PA_VIEWPORT_OFFSET_X, width << 15);
+ etna_set_state_fixp(cmdPtr, VIVS_PA_VIEWPORT_OFFSET_Y, height << 15);
+ etna_set_state_fixp(cmdPtr, VIVS_PA_VIEWPORT_SCALE_X, width << 15);
+ etna_set_state_fixp(cmdPtr, VIVS_PA_VIEWPORT_SCALE_Y, height << 15);
+ etna_set_state_fixp(cmdPtr, VIVS_SE_SCISSOR_LEFT, 0);
+ etna_set_state_fixp(cmdPtr, VIVS_SE_SCISSOR_TOP, 0);
+ etna_set_state_fixp(cmdPtr, VIVS_SE_SCISSOR_RIGHT, (width << 16) | 5);
+ etna_set_state_fixp(cmdPtr, VIVS_SE_SCISSOR_BOTTOM, (height << 16) | 5);
+
+ /* shader setup */
+ etna_set_state(cmdPtr, VIVS_VS_END_PC, 0x18);
+ etna_set_state_multi(cmdPtr, VIVS_VS_INPUT_COUNT, 3, (uint32_t[]){
+ /* VIVS_VS_INPUT_COUNT */ (1<<8) | 3,
+ /* VIVS_VS_TEMP_REGISTER_CONTROL */ 6 << VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS__SHIFT,
+ /* VIVS_VS_OUTPUT(0) */ 4});
+ etna_set_state(cmdPtr, VIVS_VS_START_PC, 0x0);
+ etna_set_state_f32(cmdPtr, VIVS_VS_UNIFORMS(45), 0.5); /* u11.y */
+ etna_set_state_f32(cmdPtr, VIVS_VS_UNIFORMS(44), 1.0); /* u11.x */
+ etna_set_state_f32(cmdPtr, VIVS_VS_UNIFORMS(27), 0.0); /* u6.w */
+ etna_set_state_f32(cmdPtr, VIVS_VS_UNIFORMS(23), 20.0); /* u5.w */
+ etna_set_state_f32(cmdPtr, VIVS_VS_UNIFORMS(19), 2.0); /* u4.w */
+
+ /* Now load the shader itself */
+ uint32_t vs[] = {
+ 0x01831009, 0x00000000, 0x00000000, 0x203fc048,
+ 0x02031009, 0x00000000, 0x00000000, 0x203fc058,
+ 0x07841003, 0x39000800, 0x00000050, 0x00000000,
+ 0x07841002, 0x39001800, 0x00aa0050, 0x00390048,
+ 0x07841002, 0x39002800, 0x01540050, 0x00390048,
+ 0x07841002, 0x39003800, 0x01fe0050, 0x00390048,
+ 0x03851003, 0x29004800, 0x000000d0, 0x00000000,
+ 0x03851002, 0x29005800, 0x00aa00d0, 0x00290058,
+ 0x03811002, 0x29006800, 0x015400d0, 0x00290058,
+ 0x07851003, 0x39007800, 0x00000050, 0x00000000,
+ 0x07851002, 0x39008800, 0x00aa0050, 0x00390058,
+ 0x07851002, 0x39009800, 0x01540050, 0x00390058,
+ 0x07801002, 0x3900a800, 0x01fe0050, 0x00390058,
+ 0x0401100c, 0x00000000, 0x00000000, 0x003fc008,
+ 0x03801002, 0x69000800, 0x01fe00c0, 0x00290038,
+ 0x03831005, 0x29000800, 0x01480040, 0x00000000,
+ 0x0383100d, 0x00000000, 0x00000000, 0x00000038,
+ 0x03801003, 0x29000800, 0x014801c0, 0x00000000,
+ 0x00801005, 0x29001800, 0x01480040, 0x00000000,
+ 0x0080108f, 0x3fc06800, 0x00000050, 0x203fc068,
+ 0x03801003, 0x00000800, 0x01480140, 0x00000000,
+ 0x04001009, 0x00000000, 0x00000000, 0x200000b8,
+ 0x02041001, 0x2a804800, 0x00000000, 0x003fc048,
+ 0x02041003, 0x2a804800, 0x00aa05c0, 0x00000002,
+ };
+ uint32_t ps[] = {
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000
+ };
+
+ etna_set_state_multi(cmdPtr, VIVS_VS_INST_MEM(0), sizeof(vs)/4, vs);
+ etna_set_state(cmdPtr, VIVS_RA_CONTROL, 0x1);
+ etna_set_state_multi(cmdPtr, VIVS_PS_END_PC, 2, (uint32_t[]){
+ /* VIVS_PS_END_PC */ 0x1,
+ /* VIVS_PS_OUTPUT_REG */ 0x1});
+ etna_set_state(cmdPtr, VIVS_PS_START_PC, 0x0);
+ etna_set_state(cmdPtr, VIVS_PA_SHADER_ATTRIBUTES(0), 0x200);
+ etna_set_state(cmdPtr, VIVS_GL_VARYING_NUM_COMPONENTS, /* one varying, with four components */
+ (4 << VIVS_GL_VARYING_NUM_COMPONENTS_VAR0__SHIFT)
+ );
+ etna_set_state_multi(cmdPtr, VIVS_GL_VARYING_COMPONENT_USE(0), 2, (uint32_t[]){ /* one varying, with four components */
+ (VARYING_COMPONENT_USE_USED << VIVS_GL_VARYING_COMPONENT_USE_COMP0__SHIFT) |
+ (VARYING_COMPONENT_USE_USED << VIVS_GL_VARYING_COMPONENT_USE_COMP1__SHIFT) |
+ (VARYING_COMPONENT_USE_USED << VIVS_GL_VARYING_COMPONENT_USE_COMP2__SHIFT) |
+ (VARYING_COMPONENT_USE_USED << VIVS_GL_VARYING_COMPONENT_USE_COMP3__SHIFT)
+ , 0
+ });
+ etna_set_state_multi(cmdPtr, VIVS_PS_INST_MEM(0), sizeof(ps)/4, ps);
+ etna_set_state(cmdPtr, VIVS_PS_INPUT_COUNT, (31<<8)|2);
+ etna_set_state(cmdPtr, VIVS_PS_TEMP_REGISTER_CONTROL,
+ (2 << VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS__SHIFT));
+ etna_set_state(cmdPtr, VIVS_PS_CONTROL,
+ VIVS_PS_CONTROL_UNK1
+ );
+ etna_set_state(cmdPtr, VIVS_PA_ATTRIBUTE_ELEMENT_COUNT, 0x100);
+ etna_set_state(cmdPtr, VIVS_GL_VARYING_TOTAL_COMPONENTS, /* one varying, with four components */
+ (4 << VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM__SHIFT)
+ );
+ etna_set_state(cmdPtr, VIVS_VS_LOAD_BALANCING, 0xf3f0582);
+ etna_set_state(cmdPtr, VIVS_VS_OUTPUT_COUNT, 2);
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_BIT(VIVS_PA_CONFIG_POINT_SIZE_ENABLE, 0));
+
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, 10.0f, 0.0f, 0.0f, 1.0f);
+
+ float aspect = (float)(height) / (float)(width);
+
+ ESMatrix projection;
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 10.0f);
+
+ ESMatrix modelviewprojection;
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+
+ float normal[9]; /* normal transformation matrix */
+ normal[0] = modelview.m[0][0];
+ normal[1] = modelview.m[0][1];
+ normal[2] = modelview.m[0][2];
+ normal[3] = modelview.m[1][0];
+ normal[4] = modelview.m[1][1];
+ normal[5] = modelview.m[1][2];
+ normal[6] = modelview.m[2][0];
+ normal[7] = modelview.m[2][1];
+ normal[8] = modelview.m[2][2];
+
+ etna_set_state_multi(cmdPtr, VIVS_VS_UNIFORMS(0), 16, (uint32_t*)&modelviewprojection.m[0][0]);
+ etna_set_state_multi(cmdPtr, VIVS_VS_UNIFORMS(16), 3, (uint32_t*)&normal[0]); /* u4.xyz */
+ etna_set_state_multi(cmdPtr, VIVS_VS_UNIFORMS(20), 3, (uint32_t*)&normal[3]); /* u5.xyz */
+ etna_set_state_multi(cmdPtr, VIVS_VS_UNIFORMS(24), 3, (uint32_t*)&normal[6]); /* u6.xyz */
+ etna_set_state_multi(cmdPtr, VIVS_VS_UNIFORMS(28), 16, (uint32_t*)&modelview.m[0][0]);
+ etna_set_state(cmdPtr, VIVS_FE_VERTEX_STREAM_BASE_ADDR, vtx_physical); /* ADDR_E */
+ etna_set_state(cmdPtr, VIVS_FE_VERTEX_STREAM_CONTROL,
+ 0x24 << VIVS_FE_VERTEX_STREAM_CONTROL_VERTEX_STRIDE__SHIFT);
+ etna_set_state(cmdPtr, VIVS_FE_VERTEX_ELEMENT_CONFIG(0),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) |
+ (3 <<VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ (0x0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) |
+ (0xc << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT));
+ etna_set_state(cmdPtr, VIVS_FE_VERTEX_ELEMENT_CONFIG(1),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) |
+ (3 <<VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ (0xc << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) |
+ (0x18 << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT));
+ etna_set_state(cmdPtr, VIVS_FE_VERTEX_ELEMENT_CONFIG(2),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NONCONSECUTIVE |
+ (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) |
+ (3 <<VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ (0x18 << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) |
+ (0x24 << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT));
+ etna_set_state(cmdPtr, VIVS_VS_INPUT(0), 0x20100);
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_BIT(VIVS_PA_CONFIG_POINT_SPRITE_ENABLE, 0));
+ etna_draw_primitives(cmdPtr, PRIMITIVE_TYPE_TRIANGLE_STRIP, 0, 2);
+
+ for(int prim=0; prim<5; ++prim) /* this part is repeated 5 times */
+ {
+ etna_set_state(cmdPtr, VIVS_PS_INPUT_COUNT, (31<<8)|2);
+ etna_set_state(cmdPtr, VIVS_PS_TEMP_REGISTER_CONTROL,
+ (2 << VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS__SHIFT));
+ etna_set_state(cmdPtr, VIVS_PS_CONTROL,
+ VIVS_PS_CONTROL_UNK1
+ );
+ etna_set_state(cmdPtr, VIVS_PA_ATTRIBUTE_ELEMENT_COUNT, 0x100);
+ etna_set_state(cmdPtr, VIVS_GL_VARYING_TOTAL_COMPONENTS, /* one varying, with four components */
+ (4 << VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM__SHIFT)
+ );
+ etna_set_state(cmdPtr, VIVS_VS_LOAD_BALANCING, 0xf3f0582);
+ etna_set_state(cmdPtr, VIVS_VS_OUTPUT_COUNT, 2);
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_BIT(VIVS_PA_CONFIG_POINT_SIZE_ENABLE, 0));
+ etna_set_state(cmdPtr, VIVS_FE_VERTEX_STREAM_BASE_ADDR, vtx_physical); /* ADDR_E */
+ etna_set_state(cmdPtr, VIVS_FE_VERTEX_STREAM_CONTROL,
+ 0x24 << VIVS_FE_VERTEX_STREAM_CONTROL_VERTEX_STRIDE__SHIFT);
+ etna_set_state(cmdPtr, VIVS_FE_VERTEX_ELEMENT_CONFIG(0),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) |
+ (3 <<VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ (0x0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) |
+ (0xc << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT));
+ etna_set_state(cmdPtr, VIVS_FE_VERTEX_ELEMENT_CONFIG(1),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) |
+ (3 <<VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ (0xc << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) |
+ (0x18 << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT));
+ etna_set_state(cmdPtr, VIVS_FE_VERTEX_ELEMENT_CONFIG(2),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NONCONSECUTIVE |
+ (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) |
+ (3 <<VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ (0x18 << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) |
+ (0x24 << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT));
+ etna_set_state(cmdPtr, VIVS_VS_INPUT(0), 0x20100);
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_BIT(VIVS_PA_CONFIG_POINT_SPRITE_ENABLE, 0));
+ etna_draw_primitives(cmdPtr, PRIMITIVE_TYPE_TRIANGLE_STRIP, 4 + prim*4, 2);
+ }
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+#ifdef CMD_COMPARE
+ /* Set addresses in first command buffer */
+ cmdbuf1[0x57] = cmdbuf1[0x67] = cmdbuf1[0x9f] = cmdbuf1[0xbb] = cmdbuf1[0xd9] = cmdbuf1[0xfb] = rt_physical; /* ADDR_A */
+ cmdbuf1[0x65] = cmdbuf1[0x9d] = cmdbuf1[0xb9] = cmdbuf1[0xd7] = cmdbuf1[0xe5] = cmdbuf1[0xf9] = rt_ts_physical; /* ADDR_B */
+ cmdbuf1[0x6d] = cmdbuf1[0x7f] = z_physical; /* ADDR_C */
+ cmdbuf1[0x7d] = z_ts_physical; /* ADDR_D */
+ cmdbuf1[0x87] = cmdbuf1[0xa3] = cmdbuf1[0xc1] = aux_rt_ts_physical; /* ADDR_G */
+ cmdbuf1[0x89] = cmdbuf1[0x8f] = cmdbuf1[0x93]
+ = cmdbuf1[0xa5] = cmdbuf1[0xab] = cmdbuf1[0xaf]
+ = cmdbuf1[0xc3] = cmdbuf1[0xc9] = cmdbuf1[0xcd] = aux_rt_physical; /* ADDR_F */
+ cmdbuf1[0x1f3] = cmdbuf1[0x215] = cmdbuf1[0x237]
+ = cmdbuf1[0x259] = cmdbuf1[0x27b] = cmdbuf1[0x29d] = vtx_physical; /* ADDR_E */
+
+ /* Must exactly match */
+ if(cmdbuffer_compare(cmdPtr, cmdbuf1, sizeof(cmdbuf1)))
+ exit(1);
+#endif
+
+ /* Submit first command buffer */
+ commandBuffer.free = commandBuffer.bytes - commandBuffer.offset - 0x8;
+ printf("[1] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing first command buffer\n");
+ exit(1);
+ }
+
+ /* After the first COMMIT, allocate contiguous memory for context and set
+ * bytes, physical, logical, link, inUse */
+ printf("Context assigned index: %i\n", (uint32_t)contextBuffer.id);
+ viv_addr_t cbuf0_physical = 0;
+ void *cbuf0_logical = 0;
+ size_t cbuf0_bytes = 0;
+ if(viv_alloc_contiguous(conn, contextBuffer.bufferSize, &cbuf0_physical, &cbuf0_logical, &cbuf0_bytes)!=0)
+ {
+ fprintf(stderr, "Error allocating contiguous host memory for context\n");
+ exit(1);
+ }
+ printf("Allocated buffer (size 0x%x) for context: phys=%08x log=%08x\n", (int)cbuf0_bytes, (int)cbuf0_physical, (int)cbuf0_logical);
+ contextBuffer.bytes = cbuf0_bytes; /* actual size of buffer */
+ contextBuffer.physical = (void*)cbuf0_physical;
+ contextBuffer.logical = cbuf0_logical;
+ contextBuffer.link = ((uint32_t*)cbuf0_logical) + contextBuffer.linkIndex;
+ contextBuffer.inUse = (int*)(((uint32_t*)cbuf0_logical) + contextBuffer.inUseIndex);
+
+ /* Build second command buffer */
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ commandBuffer.offset = commandBuffer.startOffset + 8*4;
+
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_RS_CONFIG,
+ (RS_FORMAT_X8R8G8B8 << VIVS_RS_CONFIG_SOURCE_FORMAT__SHIFT) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ (RS_FORMAT_X8R8G8B8 << VIVS_RS_CONFIG_DEST_FORMAT__SHIFT) |
+ VIVS_RS_CONFIG_DEST_TILED);
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | VIVS_RS_SOURCE_STRIDE_TILING);
+ etna_set_state(cmdPtr, VIVS_RS_DEST_STRIDE, (padded_width * 4 * 4) | VIVS_RS_DEST_STRIDE_TILING);
+ etna_set_state(cmdPtr, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(cmdPtr, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(cmdPtr, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(cmdPtr, VIVS_RS_EXTRA_CONFIG, 0); /* no AA, no endian switch */
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_ADDR, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_RS_DEST_ADDR, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_RS_WINDOW_SIZE,
+ (padded_height << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (padded_width << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(cmdPtr, VIVS_RS_KICKER, 0xbeebbeeb);
+
+#ifdef CMD_COMPARE
+ /* Submit second command buffer, with updated context.
+ * Second command buffer fills the background.
+ */
+ cmdbuf2[0x1d] = cmdbuf2[0x1f] = rt_physical;
+
+ /* Must exactly match */
+ if(cmdbuffer_compare(cmdPtr, cmdbuf2, sizeof(cmdbuf2)))
+ exit(1);
+#endif
+ commandBuffer.free = commandBuffer.bytes - commandBuffer.offset - 0x8;
+ printf("[2] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing second command buffer\n");
+ exit(1);
+ }
+
+ /* Build third command buffer
+ * Third command buffer does some cache flush trick?
+ * It can be left out without any visible harm.
+ **/
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ commandBuffer.offset = commandBuffer.startOffset + 8*4;
+ etna_warm_up_rs(cmdPtr, aux_rt_physical, aux_rt_ts_physical);
+
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, rt_ts_physical); /* ADDR_B */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_SURFACE_BASE, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_FORMAT,
+ VIV_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 0));
+
+ /* Submit third command buffer */
+#ifdef CMD_COMPARE
+ cmdbuf3[0x9] = aux_rt_ts_physical;
+ cmdbuf3[0xb] = cmdbuf3[0x11] = cmdbuf3[0x15] = aux_rt_physical;
+ cmdbuf3[0x1f] = rt_ts_physical;
+ cmdbuf3[0x21] = rt_physical;
+ /* Must exactly match */
+ if(cmdbuffer_compare(cmdPtr, cmdbuf3, sizeof(cmdbuf3)))
+ exit(1);
+#endif
+ commandBuffer.free = commandBuffer.bytes - commandBuffer.offset - 0x8;
+ printf("[3] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing third command buffer\n");
+ exit(1);
+ }
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL (wait for pixel engine to finish) */
+ int sig_id = 0;
+ if(viv_user_signal_create(conn, 0, &sig_id) != 0) /* automatic resetting signal */
+ {
+ fprintf(stderr, "Cannot create user signal\n");
+ exit(1);
+ }
+ printf("Created user signal %i\n", sig_id);
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+
+ /* Allocate video memory for BITMAP, lock */
+ gcuVIDMEM_NODE_PTR bmp_node = 0;
+ if(viv_alloc_linear_vidmem(conn, width*height*4, 0x40, gcvSURF_BITMAP, gcvPOOL_DEFAULT, &bmp_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating bitmap status memory\n");
+ exit(1);
+ }
+ printf("Allocated bitmap node: node=%08x\n", (uint32_t)bmp_node);
+
+ viv_addr_t bmp_physical = 0;
+ void *bmp_logical = 0;
+ if(viv_lock_vidmem(conn, bmp_node, &bmp_physical, &bmp_logical)!=0)
+ {
+ fprintf(stderr, "Error locking bmp memory\n");
+ exit(1);
+ }
+ memset(bmp_logical, 0xff, width*height*4); /* clear previous result */
+ printf("Locked bmp: phys=%08x log=%08x\n", (uint32_t)bmp_physical, (uint32_t)bmp_logical);
+
+ /* Start building fourth command buffer
+ * Fourth command buffer copies render result to bitmap, detiling along the way.
+ */
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ commandBuffer.offset = commandBuffer.startOffset + 8*4;
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_RS_CONFIG,
+ (RS_FORMAT_X8R8G8B8 << VIVS_RS_CONFIG_SOURCE_FORMAT__SHIFT) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ (RS_FORMAT_X8R8G8B8 << VIVS_RS_CONFIG_DEST_FORMAT__SHIFT) /*|
+ VIVS_RS_CONFIG_SWAP_RB*/);
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | VIVS_RS_SOURCE_STRIDE_TILING);
+ etna_set_state(cmdPtr, VIVS_RS_DEST_STRIDE, width * 4);
+ etna_set_state(cmdPtr, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(cmdPtr, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(cmdPtr, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(cmdPtr, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_ADDR, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_RS_DEST_ADDR, bmp_physical); /* ADDR_J */
+ etna_set_state(cmdPtr, VIVS_RS_WINDOW_SIZE,
+ (height << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (width << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(cmdPtr, VIVS_RS_KICKER, 0xbeebbeeb);
+
+ /* Submit fourth command buffer
+ */
+#ifdef CMD_COMPARE
+ cmdbuf4[0x19] = rt_physical;
+ cmdbuf4[0x1b] = bmp_physical;
+ /* Must exactly match */
+ if(cmdbuffer_compare(cmdPtr, cmdbuf4, sizeof(cmdbuf4)))
+ exit(1);
+#endif
+ commandBuffer.free = commandBuffer.bytes - commandBuffer.offset - 0x8;
+ printf("[4] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing fourth command buffer\n");
+ exit(1);
+ }
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL */
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+ bmp_dump32(bmp_logical, width, height, false, "/mnt/sdcard/replay.bmp");
+ /* Unlock video memory */
+ if(viv_unlock_vidmem(conn, bmp_node, gcvSURF_BITMAP, 1) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+ printf("Contextbuffer used %i\n", *contextBuffer.inUse);
+
+ viv_close(conn);
+ return 0;
+}
+
diff --git a/src/replay/cube_etna2.c b/src/replay/cube_etna2.c
new file mode 100644
index 0000000..3808db1
--- /dev/null
+++ b/src/replay/cube_etna2.c
@@ -0,0 +1,625 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Experimentation with non-supertiled, 4-bit-per-tile rendering on cubox.
+ * This succesfully renders the cube on the dove gc600!
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include <errno.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/etna_rs.h>
+
+#include "write_bmp.h"
+
+#include "esTransform.h"
+
+#define VERTEX_BUFFER_SIZE 0x60000
+
+float vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+};
+
+float vColors[] = {
+ // front
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f, // magenta
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ // back
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 1.0f, 0.0f, // yellow
+ 0.0f, 1.0f, 0.0f, // green
+ // right
+ 1.0f, 0.0f, 1.0f, // magenta
+ 1.0f, 0.0f, 0.0f, // red
+ 1.0f, 1.0f, 1.0f, // white
+ 1.0f, 1.0f, 0.0f, // yellow
+ // left
+ 0.0f, 0.0f, 0.0f, // black
+ 0.0f, 0.0f, 1.0f, // blue
+ 0.0f, 1.0f, 0.0f, // green
+ 0.0f, 1.0f, 1.0f, // cyan
+ // top
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ 0.0f, 1.0f, 0.0f, // green
+ 1.0f, 1.0f, 0.0f, // yellow
+ // bottom
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f // magenta
+};
+
+float vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+};
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (6*4)
+
+uint32_t vs[] = {
+ 0x01831009, 0x00000000, 0x00000000, 0x203fc048,
+ 0x02031009, 0x00000000, 0x00000000, 0x203fc058,
+ 0x07841003, 0x39000800, 0x00000050, 0x00000000,
+ 0x07841002, 0x39001800, 0x00aa0050, 0x00390048,
+ 0x07841002, 0x39002800, 0x01540050, 0x00390048,
+ 0x07841002, 0x39003800, 0x01fe0050, 0x00390048,
+ 0x03851003, 0x29004800, 0x000000d0, 0x00000000,
+ 0x03851002, 0x29005800, 0x00aa00d0, 0x00290058,
+ 0x03811002, 0x29006800, 0x015400d0, 0x00290058,
+ 0x07851003, 0x39007800, 0x00000050, 0x00000000,
+ 0x07851002, 0x39008800, 0x00aa0050, 0x00390058,
+ 0x07851002, 0x39009800, 0x01540050, 0x00390058,
+ 0x07801002, 0x3900a800, 0x01fe0050, 0x00390058,
+ 0x0401100c, 0x00000000, 0x00000000, 0x003fc008,
+ 0x03801002, 0x69000800, 0x01fe00c0, 0x00290038,
+ 0x03831005, 0x29000800, 0x01480040, 0x00000000,
+ 0x0383100d, 0x00000000, 0x00000000, 0x00000038,
+ 0x03801003, 0x29000800, 0x014801c0, 0x00000000,
+ 0x00801005, 0x29001800, 0x01480040, 0x00000000,
+ 0x0080108f, 0x3fc06800, 0x00000050, 0x203fc068,
+ 0x03801003, 0x00000800, 0x01480140, 0x00000000,
+ 0x04001009, 0x00000000, 0x00000000, 0x200000b8,
+ 0x02041001, 0x2a804800, 0x00000000, 0x003fc048,
+ 0x02041003, 0x2a804800, 0x00aa05c0, 0x00000002,
+};
+uint32_t ps[] = {
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000
+};
+size_t vs_size = sizeof(vs);
+size_t ps_size = sizeof(ps);
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 256;
+ int padded_width = etna_align_up(width, 64);
+ int padded_height = etna_align_up(height, 64);
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ bool supertiled = VIV_FEATURE(conn, chipMinorFeatures0,SUPER_TILED);
+ unsigned bits_per_tile = VIV_FEATURE(conn, chipMinorFeatures0,2BITPERTILE)?2:4;
+
+ printf("Supertile: %i, bits per tile: %i\n", supertiled, bits_per_tile);
+
+ struct etna_vidmem *rt = 0; /* main render target */
+ struct etna_vidmem *rt_ts = 0; /* tile status for main render target */
+ struct etna_vidmem *z = 0; /* depth for main render target */
+ struct etna_vidmem *z_ts = 0; /* depth ts for main render target */
+ struct etna_vidmem *vtx = 0; /* vertex buffer */
+ struct etna_vidmem *aux_rt = 0; /* auxilary render target */
+ struct etna_vidmem *aux_rt_ts = 0; /* tile status for auxilary render target */
+ struct etna_vidmem *bmp = 0; /* bitmap */
+
+ size_t rt_size = padded_width * padded_height * 4;
+ size_t rt_ts_size = etna_align_up((padded_width * padded_height * 4)*bits_per_tile/0x80, 0x100);
+ size_t z_size = padded_width * padded_height * 2;
+ size_t z_ts_size = etna_align_up((padded_width * padded_height * 2)*bits_per_tile/0x80, 0x100);
+ size_t bmp_size = width * height * 4;
+
+ if(etna_vidmem_alloc_linear(conn, &rt, rt_size, VIV_SURF_RENDER_TARGET, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &rt_ts, rt_ts_size, VIV_SURF_TILE_STATUS, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z, z_size, VIV_SURF_DEPTH, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z_ts, z_ts_size, VIV_SURF_TILE_STATUS, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &vtx, VERTEX_BUFFER_SIZE, VIV_SURF_VERTEX, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &aux_rt, 0x4000, VIV_SURF_RENDER_TARGET, VIV_POOL_SYSTEM, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &aux_rt_ts, 0x80*bits_per_tile, VIV_SURF_TILE_STATUS, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &bmp, bmp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK
+ )
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int src_idx = vert * COMPONENTS_PER_VERTEX;
+ int dest_idx = vert * COMPONENTS_PER_VERTEX * 3;
+ for(int comp=0; comp<COMPONENTS_PER_VERTEX; ++comp)
+ {
+ ((float*)vtx->logical)[dest_idx+comp+0] = vVertices[src_idx + comp]; /* 0 */
+ ((float*)vtx->logical)[dest_idx+comp+3] = vNormals[src_idx + comp]; /* 1 */
+ ((float*)vtx->logical)[dest_idx+comp+6] = vColors[src_idx + comp]; /* 2 */
+ }
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* XXX how important is the ordering? I suppose we could group states (except the flushes, kickers, semaphores etc)
+ * and simply submit them at once. Especially for consecutive states and masked stated this could be a big win
+ * in DMA command buffer size. */
+
+
+ for(int frame=0; frame<1; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+ /* XXX part of this can be put outside the loop, but until we have usable context management
+ * this is safest.
+ */
+
+ etna_set_state(ctx, VIVS_GL_VERTEX_ELEMENT_CONFIG, 0x1);
+ etna_set_state(ctx, VIVS_RA_CONTROL, 0x1);
+
+ etna_set_state(ctx, VIVS_PA_W_CLIP_LIMIT, 0x34000001);
+ etna_set_state(ctx, VIVS_PA_SYSTEM_MODE, 0x11);
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_UNK22, 0));
+ etna_set_state(ctx, VIVS_SE_CONFIG, 0x0);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT,
+ ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 0));
+ etna_set_state(ctx, VIVS_PE_ALPHA_CONFIG,
+ ETNA_MASKED_BIT(VIVS_PE_ALPHA_CONFIG_BLEND_ENABLE_COLOR, 0) &
+ ETNA_MASKED_BIT(VIVS_PE_ALPHA_CONFIG_BLEND_SEPARATE_ALPHA, 0) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR, BLEND_FUNC_ONE) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA, BLEND_FUNC_ONE) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR, BLEND_FUNC_ZERO) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA, BLEND_FUNC_ZERO) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_EQ_COLOR, BLEND_EQ_ADD) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_EQ_ALPHA, BLEND_EQ_ADD));
+ etna_set_state(ctx, VIVS_PE_ALPHA_BLEND_COLOR,
+ VIVS_PE_ALPHA_BLEND_COLOR_B(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_G(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_R(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_A(0));
+ etna_set_state(ctx, VIVS_PE_ALPHA_OP, ETNA_MASKED_BIT(VIVS_PE_ALPHA_OP_ALPHA_TEST, 0));
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_CULL_FACE_MODE, OFF));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(ctx, VIVS_PE_STENCIL_CONFIG, ETNA_MASKED(VIVS_PE_STENCIL_CONFIG_REF_FRONT, 0) &
+ ETNA_MASKED(VIVS_PE_STENCIL_CONFIG_MASK_FRONT, 0xff) &
+ ETNA_MASKED(VIVS_PE_STENCIL_CONFIG_WRITE_MASK, 0xff) &
+ ETNA_MASKED_INL(VIVS_PE_STENCIL_CONFIG_MODE, DISABLED));
+ etna_set_state(ctx, VIVS_PE_STENCIL_OP, ETNA_MASKED(VIVS_PE_STENCIL_OP_FUNC_FRONT, COMPARE_FUNC_ALWAYS) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_FUNC_BACK, COMPARE_FUNC_ALWAYS) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_FAIL_FRONT, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_FAIL_BACK, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_PASS_FRONT, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_PASS_BACK, STENCIL_OP_KEEP));
+
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT, ETNA_MASKED(VIVS_PE_COLOR_FORMAT_COMPONENTS, 0xf));
+
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(ctx, VIVS_SE_DEPTH_SCALE, 0x0);
+ etna_set_state(ctx, VIVS_SE_DEPTH_BIAS, 0x0);
+
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_FILL_MODE, SOLID));
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_SHADE_MODEL, SMOOTH));
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT,
+ ETNA_MASKED(VIVS_PE_COLOR_FORMAT_FORMAT, RS_FORMAT_X8R8G8B8) &
+ ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_SUPER_TILED, supertiled));
+
+ etna_set_state(ctx, VIVS_PE_COLOR_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_PE_COLOR_STRIDE, padded_width * 4);
+ etna_set_state(ctx, VIVS_GL_MULTI_SAMPLE_CONFIG,
+ ETNA_MASKED_INL(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES, NONE) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES, 0xf) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12, 0x0) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16, 0x0)
+ );
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT, ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 1));
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_TS_COLOR_CLEAR_VALUE, 0);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG, VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR);
+
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG,
+ ETNA_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT, D16) &
+ ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_SUPER_TILED, supertiled)
+ );
+ etna_set_state(ctx, VIVS_PE_DEPTH_ADDR, z->address); /* ADDR_C */
+ etna_set_state(ctx, VIVS_PE_DEPTH_STRIDE, padded_width * 2);
+ etna_set_state(ctx, VIVS_PE_HDEPTH_CONTROL, VIVS_PE_HDEPTH_CONTROL_FORMAT_DISABLED);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(ctx, VIVS_TS_DEPTH_CLEAR_VALUE, 0xffffffff);
+ etna_set_state(ctx, VIVS_TS_DEPTH_STATUS_BASE, z_ts->address); /* ADDR_D */
+ etna_set_state(ctx, VIVS_TS_DEPTH_SURFACE_BASE, z->address); /* ADDR_C */
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 1)); /* flip-flopping once again */
+
+ /* Warm up RS on aux render target */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+
+ etna_stall(ctx, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
+
+ /* Set up the resolve to clear tile status for main render target
+ * Regard the TS as an image of width 16 with 4 bytes per pixel (64 bytes per row)
+ * XXX need to clear the depth ts too.
+ * */
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ (RS_FORMAT_X8R8G8B8 << VIVS_RS_CONFIG_SOURCE_FORMAT__SHIFT) |
+ (RS_FORMAT_X8R8G8B8 << VIVS_RS_CONFIG_DEST_FORMAT__SHIFT)
+ );
+ etna_set_state_multi(ctx, VIVS_RS_DITHER(0), 2, (uint32_t[]){0xffffffff, 0xffffffff});
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, 0x40);
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ ((rt_ts_size/0x40) << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (16 << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(ctx, VIVS_RS_FILL_VALUE(0), (bits_per_tile==4)?0x11111111:0x55555555);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL,
+ VIVS_RS_CLEAR_CONTROL_MODE_ENABLED1 |
+ (0xffff << VIVS_RS_CLEAR_CONTROL_BITS__SHIFT));
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_KICKER,
+ 0xbeebbeeb);
+ /** Done */
+
+ etna_set_state(ctx, VIVS_TS_COLOR_CLEAR_VALUE, 0xff7f7f7f);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_CULL_FACE_MODE, CCW));
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_MODE, NONE));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED(VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC, COMPARE_FUNC_ALWAYS));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_MODE, Z));
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NEAR, 0.0);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_FAR, 1.0);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+
+ /* set up primitive assembly */
+ etna_set_state_f32(ctx, VIVS_PA_VIEWPORT_OFFSET_Z, 0.0);
+ etna_set_state_f32(ctx, VIVS_PA_VIEWPORT_SCALE_Z, 1.0);
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_ONLY_DEPTH, 0));
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_OFFSET_X, width << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_OFFSET_Y, height << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_SCALE_X, width << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_SCALE_Y, height << 15);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_LEFT, 0);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_TOP, 0);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_RIGHT, (width << 16) | 5);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_BOTTOM, (height << 16) | 5);
+
+ /* shader setup */
+ etna_set_state(ctx, VIVS_VS_END_PC, vs_size/16);
+ etna_set_state_multi(ctx, VIVS_VS_INPUT_COUNT, 3, (uint32_t[]){
+ /* VIVS_VS_INPUT_COUNT */ (1<<8) | 3,
+ /* VIVS_VS_TEMP_REGISTER_CONTROL */ 6 << VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS__SHIFT,
+ /* VIVS_VS_OUTPUT(0) */ 4});
+ etna_set_state(ctx, VIVS_VS_START_PC, 0x0);
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(45), 0.5); /* u11.y */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(44), 1.0); /* u11.x */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(27), 0.0); /* u6.w */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(23), 20.0); /* u5.w */
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(19), 2.0); /* u4.w */
+
+ /* Now load the shader itself */
+ etna_set_state_multi(ctx, VIVS_VS_INST_MEM(0), vs_size/4, vs);
+ etna_set_state(ctx, VIVS_RA_CONTROL, 0x1);
+ etna_set_state_multi(ctx, VIVS_PS_END_PC, 2, (uint32_t[]){
+ /* VIVS_PS_END_PC */ ps_size/16,
+ /* VIVS_PS_OUTPUT_REG */ 0x1});
+ etna_set_state(ctx, VIVS_PS_START_PC, 0x0);
+ etna_set_state(ctx, VIVS_PA_SHADER_ATTRIBUTES(0), 0x200);
+ etna_set_state(ctx, VIVS_GL_VARYING_NUM_COMPONENTS, /* one varying, with four components */
+ (4 << VIVS_GL_VARYING_NUM_COMPONENTS_VAR0__SHIFT)
+ );
+ etna_set_state_multi(ctx, VIVS_GL_VARYING_COMPONENT_USE(0), 2, (uint32_t[]){ /* one varying, with four components */
+ (VARYING_COMPONENT_USE_USED << VIVS_GL_VARYING_COMPONENT_USE_COMP0__SHIFT) |
+ (VARYING_COMPONENT_USE_USED << VIVS_GL_VARYING_COMPONENT_USE_COMP1__SHIFT) |
+ (VARYING_COMPONENT_USE_USED << VIVS_GL_VARYING_COMPONENT_USE_COMP2__SHIFT) |
+ (VARYING_COMPONENT_USE_USED << VIVS_GL_VARYING_COMPONENT_USE_COMP3__SHIFT)
+ , 0
+ });
+ etna_set_state_multi(ctx, VIVS_PS_INST_MEM(0), ps_size/4, ps);
+ etna_set_state(ctx, VIVS_PS_INPUT_COUNT, (31<<8)|2);
+ etna_set_state(ctx, VIVS_PS_TEMP_REGISTER_CONTROL,
+ (2 << VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS__SHIFT));
+ etna_set_state(ctx, VIVS_PS_CONTROL,
+ VIVS_PS_CONTROL_UNK1
+ );
+ etna_set_state(ctx, VIVS_PA_ATTRIBUTE_ELEMENT_COUNT, 0x100);
+ etna_set_state(ctx, VIVS_GL_VARYING_TOTAL_COMPONENTS, /* one varying, with four components */
+ VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM(4)
+ );
+ etna_set_state(ctx, VIVS_VS_LOAD_BALANCING, 0xf3f0582);
+ etna_set_state(ctx, VIVS_VS_OUTPUT_COUNT, 2);
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_POINT_SIZE_ENABLE, 0));
+
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.5f, 0.0f, 0.0f, 1.0f);
+
+ float aspect = (float)(height) / (float)(width);
+
+ ESMatrix projection;
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 10.0f);
+
+ ESMatrix modelviewprojection;
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+
+ ESMatrix inverse, normal; /* compute inverse transpose normal transformation matrix */
+ esMatrixInverse3x3(&inverse, &modelview);
+ esMatrixTranspose(&normal, &inverse);
+
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(0), 16, (uint32_t*)&modelviewprojection.m[0][0]);
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(16), 3, (uint32_t*)&normal.m[0][0]); /* u4.xyz */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(20), 3, (uint32_t*)&normal.m[1][0]); /* u5.xyz */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(24), 3, (uint32_t*)&normal.m[2][0]); /* u6.xyz */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(28), 16, (uint32_t*)&modelview.m[0][0]);
+ etna_set_state(ctx, VIVS_FE_VERTEX_STREAM_BASE_ADDR, vtx->address); /* ADDR_E */
+ etna_set_state(ctx, VIVS_FE_VERTEX_STREAM_CONTROL,
+ 0x24 << VIVS_FE_VERTEX_STREAM_CONTROL_VERTEX_STRIDE__SHIFT);
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(0),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) |
+ (3 <<VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ (0x0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) |
+ (0xc << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT));
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(1),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) |
+ (3 <<VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ (0xc << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) |
+ (0x18 << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT));
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(2),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NONCONSECUTIVE |
+ (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) |
+ (3 <<VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ (0x18 << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) |
+ (0x24 << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT));
+ etna_set_state(ctx, VIVS_VS_INPUT(0), 0x20100);
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_POINT_SPRITE_ENABLE, 0));
+
+ for(int prim=0; prim<6; ++prim)
+ {
+ etna_draw_primitives(ctx, PRIMITIVE_TYPE_TRIANGLE_STRIP, prim*4, 2);
+ }
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_flush(ctx);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_X8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_X8R8G8B8) |
+ VIVS_RS_CONFIG_DEST_TILED);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | (supertiled?VIVS_RS_SOURCE_STRIDE_TILING:0));
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, (padded_width * 4 * 4) | (supertiled?VIVS_RS_DEST_STRIDE_TILING:0));
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(padded_height) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(padded_width));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+
+ /* Submit second command buffer */
+ etna_flush(ctx);
+
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT,
+ ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 0));
+
+ /* Submit third command buffer, wait for pixel engine to finish */
+ etna_finish(ctx);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_X8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_X8R8G8B8) /*|
+ VIVS_RS_CONFIG_SWAP_RB*/);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | (supertiled?VIVS_RS_SOURCE_STRIDE_TILING:0));
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, width * 4);
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address);
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, bmp->address);
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(height) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(width));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+ etna_finish(ctx);
+ }
+ bmp_dump32(bmp->logical, width, height, false, "/tmp/fb.bmp");
+ printf("Dump complete\n");
+
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/replay/cube_etna2_gc2000.c b/src/replay/cube_etna2_gc2000.c
new file mode 100644
index 0000000..240793d
--- /dev/null
+++ b/src/replay/cube_etna2_gc2000.c
@@ -0,0 +1,651 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Experimentation with non-supertiled, 4-bit-per-tile rendering on cubox.
+ * This succesfully renders the cube on the dove gc600!
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include <errno.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/etna_rs.h>
+
+#include "write_bmp.h"
+
+#include "esTransform.h"
+
+//INTERLEAVED - mix vertices, colors, and normals
+#define INTERLEAVED
+
+#define VERTEX_BUFFER_SIZE 0x100000
+
+float vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+};
+
+float vColors[] = {
+ // front
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f, // magenta
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ // back
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 1.0f, 0.0f, // yellow
+ 0.0f, 1.0f, 0.0f, // green
+ // right
+ 1.0f, 0.0f, 1.0f, // magenta
+ 1.0f, 0.0f, 0.0f, // red
+ 1.0f, 1.0f, 1.0f, // white
+ 1.0f, 1.0f, 0.0f, // yellow
+ // left
+ 0.0f, 0.0f, 0.0f, // black
+ 0.0f, 0.0f, 1.0f, // blue
+ 0.0f, 1.0f, 0.0f, // green
+ 0.0f, 1.0f, 1.0f, // cyan
+ // top
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ 0.0f, 1.0f, 0.0f, // green
+ 1.0f, 1.0f, 0.0f, // yellow
+ // bottom
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f // magenta
+};
+
+float vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+};
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (6*4)
+#define VERTICES_PER_DRAW 4
+#define DRAW_COUNT 6
+
+uint32_t vs[] = {
+ 0x01831009, 0x00000000, 0x00000000, 0x203fc048,
+ 0x02031009, 0x00000000, 0x00000000, 0x203fc058,
+ 0x07841003, 0x39000800, 0x00000050, 0x00000000,
+ 0x07841002, 0x39001800, 0x00aa0050, 0x00390048,
+ 0x07841002, 0x39002800, 0x01540050, 0x00390048,
+ 0x07841002, 0x39003800, 0x01fe0050, 0x00390048,
+ 0x03851003, 0x29004800, 0x000000d0, 0x00000000,
+ 0x03851002, 0x29005800, 0x00aa00d0, 0x00290058,
+ 0x03811002, 0x29006800, 0x015400d0, 0x00290058,
+ 0x07851003, 0x39007800, 0x00000050, 0x00000000,
+ 0x07851002, 0x39008800, 0x00aa0050, 0x00390058,
+ 0x07851002, 0x39009800, 0x01540050, 0x00390058,
+ 0x07801002, 0x3900a800, 0x01fe0050, 0x00390058,
+ 0x0401100c, 0x00000000, 0x00000000, 0x003fc008,
+ 0x03801002, 0x69000800, 0x01fe00c0, 0x00290038,
+ 0x03831005, 0x29000800, 0x01480040, 0x00000000,
+ 0x0383100d, 0x00000000, 0x00000000, 0x00000038,
+ 0x03801003, 0x29000800, 0x014801c0, 0x00000000,
+ 0x00801005, 0x29001800, 0x01480040, 0x00000000,
+ 0x0080108f, 0x3fc06800, 0x00000050, 0x203fc068,
+ 0x03801003, 0x00000800, 0x01480140, 0x00000000,
+ 0x04001009, 0x00000000, 0x00000000, 0x200000b8,
+};
+uint32_t ps[] = {
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000
+};
+size_t vs_size = sizeof(vs);
+size_t ps_size = sizeof(ps);
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 400;
+ int height = 240;
+ int padded_width = etna_align_up(width, 64);
+ int padded_height = etna_align_up(height, 64);
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ bool supertiled = VIV_FEATURE(conn, chipMinorFeatures0,SUPER_TILED);
+ unsigned bits_per_tile = VIV_FEATURE(conn, chipMinorFeatures0,2BITPERTILE)?2:4;
+
+ printf("Supertile: %i, bits per tile: %i\n", supertiled, bits_per_tile);
+
+ struct etna_vidmem *rt = 0; /* main render target */
+ struct etna_vidmem *rt_ts = 0; /* tile status for main render target */
+ struct etna_vidmem *z = 0; /* depth for main render target */
+ struct etna_vidmem *z_ts = 0; /* depth ts for main render target */
+ struct etna_vidmem *vtx = 0; /* vertex buffer */
+ struct etna_vidmem *aux_rt = 0; /* auxilary render target */
+ struct etna_vidmem *bmp = 0; /* bitmap */
+
+ size_t rt_size = padded_width * padded_height * 4;
+ size_t rt_ts_size = etna_align_up((padded_width * padded_height * 4)*bits_per_tile/0x80, 0x100);
+ size_t z_size = padded_width * padded_height * 2;
+ size_t z_ts_size = etna_align_up((padded_width * padded_height * 2)*bits_per_tile/0x80, 0x100);
+ size_t bmp_size = width * height * 4;
+
+ if(etna_vidmem_alloc_linear(conn, &rt, rt_size, VIV_SURF_RENDER_TARGET, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &rt_ts, rt_ts_size, VIV_SURF_TILE_STATUS, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z, z_size, VIV_SURF_DEPTH, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z_ts, z_ts_size, VIV_SURF_TILE_STATUS, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &vtx, VERTEX_BUFFER_SIZE, VIV_SURF_VERTEX, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &aux_rt, rt_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &bmp, bmp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK
+ )
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+#ifdef INTERLEAVED
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int src_idx = vert * COMPONENTS_PER_VERTEX;
+ int dest_idx = vert * COMPONENTS_PER_VERTEX * 3;
+ for(int comp=0; comp<COMPONENTS_PER_VERTEX; ++comp)
+ {
+ ((float*)vtx->logical)[dest_idx+comp+0] = vVertices[src_idx + comp]; /* 0 */
+ ((float*)vtx->logical)[dest_idx+comp+3] = vNormals[src_idx + comp]; /* 1 */
+ ((float*)vtx->logical)[dest_idx+comp+6] = vColors[src_idx + comp]; /* 2 */
+ }
+ }
+#else
+ int dest_idx = 0;
+ int v_src_idx = 0;
+ int n_src_idx = 0;
+ int c_src_idx = 0;
+ for(int jj=0; jj<DRAW_COUNT; jj++)
+ {
+ for(int vert=0; vert<VERTICES_PER_DRAW*3; ++vert)
+ {
+ ((float*)vtx->logical)[dest_idx] = vVertices[v_src_idx];
+ dest_idx++;
+ v_src_idx++;
+ }
+ for(int vert=0; vert<VERTICES_PER_DRAW*3; ++vert)
+ {
+ ((float*)vtx->logical)[dest_idx] = vNormals[n_src_idx];
+ dest_idx++;
+ n_src_idx++;
+ }
+ for(int vert=0; vert<VERTICES_PER_DRAW*3; ++vert)
+ {
+ ((float*)vtx->logical)[dest_idx] = vColors[c_src_idx];
+ dest_idx++;
+ c_src_idx++;
+ }
+ }
+#endif //INTERLEAVED
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* XXX how important is the ordering? I suppose we could group states (except the flushes, kickers, semaphores etc)
+ * and simply submit them at once. Especially for consecutive states and masked stated this could be a big win
+ * in DMA command buffer size. */
+ for(int frame=0; frame<1; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+ /* XXX part of this can be put outside the loop, but until we have usable context management
+ * this is safest.
+ */
+
+ etna_set_state(ctx, VIVS_GL_VERTEX_ELEMENT_CONFIG, 0x1);
+ etna_set_state(ctx, VIVS_RA_CONTROL, 0x1);
+
+ etna_set_state(ctx, VIVS_PA_W_CLIP_LIMIT, 0x34000001);
+ etna_set_state(ctx, VIVS_PA_SYSTEM_MODE, 0x11);
+ etna_set_state(ctx, VIVS_GL_API_MODE, VIVS_GL_API_MODE_OPENGL);
+
+ etna_set_state(ctx, VIVS_SE_CONFIG, 0x0); //LAST_PIXEL_ENABLE=0
+ etna_set_state(ctx, VIVS_SE_DEPTH_SCALE, 0x0);
+ etna_set_state(ctx, VIVS_SE_DEPTH_BIAS, 0x0);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ //etna_set_state(ctx, VIVS_DUMMY_DUMMY, 0);
+ etna_set_state(ctx, VIVS_TS_DEPTH_AUTO_DISABLE_COUNT, 0x1cc0);
+ etna_set_state_multi(ctx, VIVS_TS_COLOR_STATUS_BASE, 3,
+ (uint32_t[]){rt_ts->address, rt->address, 0});
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_AUTO_DISABLE);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_DEPTH);
+ //etna_set_state(ctx, VIVS_DUMMY_DUMMY, 0);
+ etna_set_state_multi(ctx, VIVS_TS_DEPTH_STATUS_BASE, 3,
+ (uint32_t[]){z_ts->address, z->address, 0xffffffff});
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_COLOR_AUTO_DISABLE |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_SE_DEPTH_SCALE, 0);
+ etna_set_state(ctx, VIVS_SE_DEPTH_BIAS, 0);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_DEPTH | VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH);
+
+
+ /* semaphore time */
+ etna_semaphore(ctx, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
+ etna_stall(ctx, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
+
+ /* Set up the resolve to clear tile status for main render target
+ * Regard the TS as an image of width 16 with 4 bytes per pixel (64 bytes per row)
+ * XXX need to clear the depth ts too.
+ * */
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_SOURCE_FORMAT__SHIFT) |
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_DEST_FORMAT__SHIFT));
+ etna_set_state_multi(ctx, VIVS_RS_DITHER(0), 2, (uint32_t[]){0xffffffff, 0xffffffff});
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, 0x200);
+ etna_set_state(ctx, VIVS_RS_FILL_VALUE(0), 0x55555555);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL,
+ VIVS_RS_CLEAR_CONTROL_MODE_ENABLED1 |
+ (0xffff << VIVS_RS_CLEAR_CONTROL_BITS__SHIFT));
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ ((rt_ts_size/0x200) << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (128 << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbadabeeb);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_CLEAR_VALUE, 0xff7f7f7f);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ //etna_set_state(ctx, VIVS_DUMMY_DUMMY, 0);
+ etna_set_state(ctx, VIVS_TS_DEPTH_AUTO_DISABLE_COUNT, 0x1cc0);
+ etna_set_state_multi(ctx, VIVS_TS_COLOR_STATUS_BASE, 3,
+ (uint32_t[]){rt_ts->address, rt->address, 0xff7f7f7f});
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_COLOR_AUTO_DISABLE |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, frame*0.5f, 0.0f, 0.0f, 1.0f);
+
+ float aspect = (float)(height) / (float)(width);
+
+ ESMatrix projection;
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 10.0f);
+
+ ESMatrix modelviewprojection;
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+
+ ESMatrix inverse, normal; /* compute inverse transpose normal transformation matrix */
+ esMatrixInverse3x3(&inverse, &modelview);
+ esMatrixTranspose(&normal, &inverse);
+
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(0), 16, (uint32_t*)&modelviewprojection.m[0][0]);
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(16), 3, (uint32_t*)&normal.m[0][0]); /* u4.xyz */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(20), 3, (uint32_t*)&normal.m[1][0]); /* u5.xyz */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(24), 3, (uint32_t*)&normal.m[2][0]); /* u6.xyz */
+ etna_set_state_multi(ctx, VIVS_VS_UNIFORMS(28), 16, (uint32_t*)&modelview.m[0][0]);
+
+ etna_set_state_fixp_multi(ctx, VIVS_PA_VIEWPORT_SCALE_X, 2, (uint32_t[]){width << 15, height << 15});
+ etna_set_state_fixp_multi(ctx, VIVS_PA_VIEWPORT_OFFSET_X, 2, (uint32_t[]){width << 15, height << 15});
+ etna_set_state/*_f32*/(ctx, VIVS_PA_VIEWPORT_UNK00A80, 0x37c81905); //0.000024f but loads 37c9539c not 37c81905
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_UNK00A84, 8192<<16);
+ etna_set_state/*_f32*/(ctx, VIVS_PA_VIEWPORT_UNK00A8C, 0x38000000); //0.000031f but load 380205ff not 38000000
+ etna_set_state_fixp_multi(ctx, VIVS_SE_SCISSOR_LEFT, 4, (uint32_t[]){0, 0, (width << 16)|0x1000, (height << 16)|0x1000});//0x1000=1/16
+ etna_set_state_fixp(ctx, VIVS_SE_CLIP_RIGHT, (width << 16)|0xffff);
+ etna_set_state_fixp(ctx, VIVS_SE_CLIP_BOTTOM, (height << 16)|0xffff);
+ etna_set_state_multi(ctx, VIVS_PE_ALPHA_OP, 3, (uint32_t[]){0, 0,
+ VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR(1) |
+ VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA(1)});
+ etna_set_state(ctx, VIVS_PE_STENCIL_CONFIG_EXT, 0x0000fdff);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT, RS_FORMAT_A8R8G8B8 |
+ VIVS_PE_COLOR_FORMAT_COMPONENTS(0xf) |
+ VIVS_PE_COLOR_FORMAT_OVERWRITE |
+ VIVS_PE_COLOR_FORMAT_SUPER_TILED);
+ etna_set_state(ctx, VIVS_PE_PIPE_COLOR_ADDR(0), rt->address);
+ etna_set_state(ctx, VIVS_PE_COLOR_ADDR, rt->address);
+ etna_set_state(ctx, VIVS_PE_COLOR_STRIDE, padded_width * 4);
+ etna_set_state_multi(ctx, VIVS_PE_DEPTH_CONFIG, 4, (uint32_t[]){
+ VIVS_PE_DEPTH_CONFIG_DEPTH_MODE_Z |
+ VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC(COMPARE_FUNC_ALWAYS) |
+ VIVS_PE_DEPTH_CONFIG_EARLY_Z |
+ VIVS_PE_DEPTH_CONFIG_SUPER_TILED |
+ VIVS_PE_DEPTH_CONFIG_UNK24,
+ 0x00000000/*0.0*/, 0x3f800000/*1.0*/, 0x477fff00/*65535.0*/});
+ etna_set_state(ctx, VIVS_PE_PIPE_DEPTH_ADDR(0), z->address);
+ etna_set_state(ctx, VIVS_PE_DEPTH_ADDR, z->address);
+ etna_set_state(ctx, VIVS_PE_DEPTH_STRIDE, padded_width * 2);
+ etna_set_state(ctx, VIVS_PE_HDEPTH_CONTROL, 0);
+ etna_set_state_f32(ctx, VIVS_PA_VIEWPORT_SCALE_Z, 1.0);
+ etna_set_state_f32(ctx, VIVS_PA_VIEWPORT_OFFSET_Z, 0.0);
+ etna_set_state(ctx, VIVS_PE_STENCIL_CONFIG, 0);
+ etna_set_state(ctx, VIVS_GL_MULTI_SAMPLE_CONFIG, 0);
+ etna_set_state_f32(ctx, VIVS_PA_LINE_WIDTH, 0.5);
+ etna_set_state_multi(ctx, VIVS_PA_CONFIG, 3, (uint32_t[]){
+ VIVS_PA_CONFIG_CULL_FACE_MODE_CCW |
+ VIVS_PA_CONFIG_FILL_MODE_SOLID |
+ VIVS_PA_CONFIG_SHADE_MODEL_SMOOTH |
+ VIVS_PA_CONFIG_UNK22,
+ 0x3f000000/*0.5*/, 0x3f000000/*0.5*/
+ });
+ etna_semaphore(ctx, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE);
+ etna_stall(ctx, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE);
+
+ /* shader setup */
+ etna_set_state_multi(ctx, VIVS_VS_INPUT_COUNT, 3, (uint32_t[]){
+ VIVS_VS_INPUT_COUNT_COUNT(3) | VIVS_VS_INPUT_COUNT_UNK8(1),
+ VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS(6),
+ VIVS_VS_OUTPUT_O0(4) | VIVS_VS_OUTPUT_O1(0) |
+ VIVS_VS_OUTPUT_O2(0) | VIVS_VS_OUTPUT_O3(0)});
+
+ int vertexProgStart = 0; //0C000 + vertexProgStart*16
+ etna_set_state(ctx, VIVS_VS_RANGE, VIVS_VS_RANGE_LOW(vertexProgStart) | VIVS_VS_RANGE_HIGH(vertexProgStart + 0x15));
+ etna_set_state(ctx, VIVS_VS_START_PC, 0);
+ etna_set_state(ctx, VIVS_VS_END_PC, 0x16);
+
+ //vec4 lightSource = vec4(2.0, 2.0, 20.0, 0.0);
+ //VS.UNIFORMS[14] = 2.0, VS.UNIFORMS[19]=2.0, VS.UNIFORMS[23]=20.0 VS.UNIFORMS[27]=0.0 u[3-6].w
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(44), 1.0);
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(27), 0.0);
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(23), 20.0);
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(19), 2.0);
+
+ etna_set_state_multi(ctx, VIVS_SH_INST_MEM(vertexProgStart*4), sizeof(vs)/4, vs);
+ etna_set_state(ctx, VIVS_RA_CONTROL, 0x1);
+ etna_set_state(ctx, VIVS_PS_OUTPUT_REG, 0x1);
+ etna_set_state(ctx, VIVS_PA_SHADER_ATTRIBUTES(0), 0x200);
+ etna_set_state(ctx, VIVS_GL_VARYING_NUM_COMPONENTS, /* one varying, with four components */
+ (4 << VIVS_GL_VARYING_NUM_COMPONENTS_VAR0__SHIFT)
+ );
+ etna_set_state(ctx, VIVS_GL_UNK03834, 0x40000);
+ etna_set_state_multi(ctx, VIVS_GL_VARYING_COMPONENT_USE(0), 2, (uint32_t[]){
+ VIVS_GL_VARYING_COMPONENT_USE_COMP0(1) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP1(1) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP2(1) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP3(1),
+ 0});
+ int pixelProgStart = 0x100;
+ etna_set_state(ctx, VIVS_GL_UNK03838, 0x0);
+ etna_set_state(ctx, VIVS_PS_RANGE, VIVS_PS_RANGE_LOW(pixelProgStart) | VIVS_PS_RANGE_HIGH(pixelProgStart));
+ etna_set_state(ctx, VIVS_PS_START_PC, 0x0);
+ etna_set_state(ctx, VIVS_PS_END_PC, 0x1);
+
+
+ etna_set_state_multi(ctx, VIVS_SH_INST_MEM(pixelProgStart*4), sizeof(ps)/4, ps);
+ etna_set_state_multi(ctx, VIVS_PS_INPUT_COUNT, 3, (uint32_t[]){
+ (31<<8)|2,
+ (2 << VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS__SHIFT),
+ VIVS_PS_CONTROL_UNK1});
+
+ etna_set_state(ctx, VIVS_PA_ATTRIBUTE_ELEMENT_COUNT, 0x100);
+ etna_set_state(ctx, VIVS_GL_VARYING_TOTAL_COMPONENTS, /* one varying, with four components */
+ (4 << VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM__SHIFT)
+ );
+ etna_set_state(ctx, VIVS_VS_LOAD_BALANCING, 0xf3f0582);
+ etna_set_state(ctx, VIVS_VS_OUTPUT_COUNT, 2);
+
+ etna_semaphore(ctx, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
+ etna_stall(ctx, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
+#ifdef INTERLEAVED
+ unsigned fe_vert_elem_conf_base =
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) |
+ (3 << VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF;
+ etna_set_state_multi(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(0), 3, (uint32_t[]){
+ fe_vert_elem_conf_base | (0x0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) | (0xc << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT),
+ fe_vert_elem_conf_base | (0xc << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) | (0x18 << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT),
+ fe_vert_elem_conf_base | (0x18 << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) | (0x24 << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT) | VIVS_FE_VERTEX_ELEMENT_CONFIG_NONCONSECUTIVE
+ });
+ etna_set_state(ctx, VIVS_VS_INPUT(0), VIVS_VS_INPUT_I0(0) |
+ VIVS_VS_INPUT_I1(1) | VIVS_VS_INPUT_I2(2) | VIVS_VS_INPUT_I3(0));
+
+ etna_set_state(ctx, VIVS_FE_VERTEX_STREAMS_CONTROL(0), 0x24);
+ etna_set_state(ctx, VIVS_PA_W_CLIP_LIMIT, 0);
+ etna_set_state(ctx, VIVS_PA_CONFIG,
+ VIVS_PA_CONFIG_CULL_FACE_MODE_CCW |
+ VIVS_PA_CONFIG_FILL_MODE_SOLID |
+ VIVS_PA_CONFIG_SHADE_MODEL_SMOOTH |
+ VIVS_PA_CONFIG_UNK22);
+ etna_set_state(ctx, VIVS_FE_VERTEX_STREAMS_BASE_ADDR(0), vtx->address);
+
+ for(int drawNr = 0; drawNr<6; drawNr++)
+ {
+ etna_draw_primitives(ctx, PRIMITIVE_TYPE_TRIANGLE_STRIP, drawNr*4, 2);
+ }
+#else
+ unsigned fe_vert_elem_conf_base =
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NONCONSECUTIVE |
+ (3 <<VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ (0x0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) |
+ (0xc << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT);
+ etna_set_state_multi(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(0), 3, (uint32_t[]){
+ fe_vert_elem_conf_base | (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT),
+ fe_vert_elem_conf_base | (1 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT),
+ fe_vert_elem_conf_base | (2 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT)});
+ etna_set_state(ctx, VIVS_VS_INPUT(0), VIVS_VS_INPUT_I0(0) |
+ VIVS_VS_INPUT_I1(1) | VIVS_VS_INPUT_I2(2) | VIVS_VS_INPUT_I3(0));
+
+ etna_set_state_multi(ctx, VIVS_FE_VERTEX_STREAMS_CONTROL(0), 3, (uint32_t[]) {0xc, 0xc, 0xc});
+ etna_set_state(ctx, VIVS_PA_W_CLIP_LIMIT, 0);
+ etna_set_state(ctx, VIVS_PA_CONFIG,
+ VIVS_PA_CONFIG_CULL_FACE_MODE_CCW |
+ VIVS_PA_CONFIG_FILL_MODE_SOLID |
+ VIVS_PA_CONFIG_SHADE_MODEL_SMOOTH |
+ VIVS_PA_CONFIG_UNK22);
+
+ for(int drawNr = 0; drawNr<6; drawNr++)
+ {
+ etna_set_state_multi(ctx, VIVS_FE_VERTEX_STREAMS_BASE_ADDR(0), 3, (uint32_t[])
+ {vtx->address+(0x60*drawNr), vtx->address+(0x60*drawNr)+0x30, vtx->address+(0x60*drawNr)+0x60});
+
+ etna_draw_primitives(ctx, PRIMITIVE_TYPE_TRIANGLE_STRIP, drawNr*4, 2);
+ }
+#endif //INTERLEAVED
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_flush(ctx);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_SOURCE_FORMAT__SHIFT) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_DEST_FORMAT__SHIFT) |
+ VIVS_RS_CONFIG_DEST_TILED);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | (supertiled?VIVS_RS_SOURCE_STRIDE_TILING:0));
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, (padded_width * 4 * 4) | (supertiled?VIVS_RS_SOURCE_STRIDE_TILING:0));
+ etna_set_state_multi(ctx, VIVS_RS_DITHER(0), 2, (uint32_t[]){0xffffffff, 0xffffffff});
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ (padded_height << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (padded_width << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbadabeeb);
+
+ /* Submit second command buffer */
+ etna_flush(ctx);
+
+ etna_set_state(ctx, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ //etna_set_state(ctx, VIVS_DUMMY_DUMMY, 0);
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_SOURCE_FORMAT__SHIFT) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_DEST_FORMAT__SHIFT) |
+ VIVS_RS_CONFIG_SWAP_RB);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | (supertiled?VIVS_RS_SOURCE_STRIDE_TILING:0));
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, (padded_width * 4));
+ etna_set_state_multi(ctx, VIVS_RS_DITHER(0), 2, (uint32_t[]){0xffffffff, 0xffffffff});
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, aux_rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ (padded_height << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (padded_width << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbadabeeb);
+
+ /* Submit third command buffer, wait for pixel engine to finish */
+ etna_finish(ctx);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_SOURCE_FORMAT__SHIFT) |
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_DEST_FORMAT__SHIFT) /*|
+ VIVS_RS_CONFIG_SWAP_RB*/);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, (padded_width * 4));
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, width * 4);
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, aux_rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, bmp->address); /* ADDR_J */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ (height << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (width << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+ etna_finish(ctx);
+ }
+ bmp_dump32(bmp->logical, width, height, false, "/home/linaro/fb.bmp");
+ printf("Dump complete\n");
+
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, NULL, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/replay/cube_etna_gc2000.c b/src/replay/cube_etna_gc2000.c
new file mode 100644
index 0000000..cbb0cae
--- /dev/null
+++ b/src/replay/cube_etna_gc2000.c
@@ -0,0 +1,1070 @@
+/* like cube, an exact reproducation of egl command stream
+ * but try to generate the command stream ourselves using etna_XXX */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include "viv_raw.h"
+#include "write_bmp.h"
+#include "esTransform.h"
+
+/* Print generated command buffer */
+//#define CMD_DEBUG
+/* Compare generated with stored command buffers generated by Vivante driver */
+#define CMD_COMPARE
+
+#ifdef CMD_COMPARE
+#include "cube_cmd_gc2000.h"
+#endif
+/* TODO: should actually update context as we go,
+ a context switch would currently revert state and likely result in corrupted rendering.
+ */
+
+float vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+};
+
+float vColors[] = {
+ // front
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f, // magenta
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ // back
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 1.0f, 0.0f, // yellow
+ 0.0f, 1.0f, 0.0f, // green
+ // right
+ 1.0f, 0.0f, 1.0f, // magenta
+ 1.0f, 0.0f, 0.0f, // red
+ 1.0f, 1.0f, 1.0f, // white
+ 1.0f, 1.0f, 0.0f, // yellow
+ // left
+ 0.0f, 0.0f, 0.0f, // black
+ 0.0f, 0.0f, 1.0f, // blue
+ 0.0f, 1.0f, 0.0f, // green
+ 0.0f, 1.0f, 1.0f, // cyan
+ // top
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ 0.0f, 1.0f, 0.0f, // green
+ 1.0f, 1.0f, 0.0f, // yellow
+ // bottom
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f // magenta
+};
+
+float vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+};
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (6*4)
+#define VERTICES_PER_DRAW 4
+#define DRAW_COUNT 6
+
+#ifdef CMD_COMPARE
+char is_padding[0x8000 / 4];
+#endif
+
+/* macro for MASKED() (multiple can be &ed) */
+#define VIV_MASKED(NAME, VALUE) (~(NAME ## _MASK | NAME ## __MASK) | ((VALUE)<<(NAME ## __SHIFT)))
+/* for boolean bits */
+#define VIV_MASKED_BIT(NAME, VALUE) (~(NAME ## _MASK | NAME) | ((VALUE) ? NAME : 0))
+/* for inline enum bit fields
+ * XXX in principle headergen could simply generate these fields prepackaged
+ */
+#define VIV_MASKED_INL(NAME, VALUE) (~(NAME ## _MASK | NAME ## __MASK) | (NAME ## _ ## VALUE))
+
+/* XXX store state changes
+ * group consecutive states
+ * make LOAD_STATE commands, add to current command buffer
+ */
+static inline void etna_set_state(gcoCMDBUF commandBuffer, uint32_t address, uint32_t value)
+{
+#ifdef CMD_DEBUG
+ printf("%05x := %08x\n", address, value);
+#endif
+ uint32_t *tgt = (uint32_t*)((size_t)commandBuffer->logical + commandBuffer->offset);
+ tgt[0] = VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE |
+ VIV_FE_LOAD_STATE_HEADER_COUNT(1) |
+ VIV_FE_LOAD_STATE_HEADER_OFFSET(address >> 2);
+ tgt[1] = value;
+ commandBuffer->offset += 8;
+}
+
+/* this can be inlined, though would likely be even faster to return a pointer and let the client write to
+ * the buffer directly */
+static inline void etna_set_state_multi(gcoCMDBUF commandBuffer, uint32_t base, uint32_t num, uint32_t *values)
+{
+ uint32_t *tgt = (uint32_t*)((size_t)commandBuffer->logical + commandBuffer->offset);
+ tgt[0] = VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE |
+ VIV_FE_LOAD_STATE_HEADER_COUNT(num & 0x3ff) |
+ VIV_FE_LOAD_STATE_HEADER_OFFSET(base >> 2);
+#ifdef CMD_DEBUG
+ for(uint32_t idx=0; idx<num; ++idx)
+ {
+ printf("%05x := %08x\n", base, values[idx]);
+ base += 4;
+ }
+#endif
+ memcpy(&tgt[1], values, 4*num);
+ commandBuffer->offset += 4 + num*4;
+ if(commandBuffer->offset & 4) /* PAD */
+ {
+#ifdef CMD_COMPARE
+ is_padding[commandBuffer->offset / 4] = 1;
+#endif
+ commandBuffer->offset += 4;
+ }
+}
+static inline void etna_set_state_multi_fixp(gcoCMDBUF commandBuffer, uint32_t base, uint32_t num, uint32_t *values)
+{
+ uint32_t *tgt = (uint32_t*)((size_t)commandBuffer->logical + commandBuffer->offset);
+ tgt[0] = VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE |
+ VIV_FE_LOAD_STATE_HEADER_FIXP |
+ VIV_FE_LOAD_STATE_HEADER_COUNT(num & 0x3ff) |
+ VIV_FE_LOAD_STATE_HEADER_OFFSET(base >> 2);
+ #ifdef CMD_DEBUG
+ for(uint32_t idx=0; idx<num; ++idx)
+ {
+ printf("%05x := %08x\n", base, values[idx]);
+ base += 4;
+ }
+ #endif
+ memcpy(&tgt[1], values, 4*num);
+ commandBuffer->offset += 4 + num*4;
+ if(commandBuffer->offset & 4) /* PAD */
+ {
+ #ifdef CMD_COMPARE
+ is_padding[commandBuffer->offset / 4] = 1;
+ #endif
+ commandBuffer->offset += 4;
+ }
+}
+static inline void etna_set_state_f32(gcoCMDBUF commandBuffer, uint32_t address, float value)
+{
+ union {
+ uint32_t i32;
+ float f32;
+ } x = { .f32 = value };
+ etna_set_state(commandBuffer, address, x.i32);
+}
+static inline void etna_set_state_fixp(gcoCMDBUF commandBuffer, uint32_t address, uint32_t value)
+{
+#ifdef CMD_DEBUG
+ printf("%05x := %08x (fixp)\n", address, value);
+#endif
+ uint32_t *tgt = (uint32_t*)((size_t)commandBuffer->logical + commandBuffer->offset);
+ tgt[0] = VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE |
+ VIV_FE_LOAD_STATE_HEADER_COUNT(1) |
+ VIV_FE_LOAD_STATE_HEADER_FIXP |
+ VIV_FE_LOAD_STATE_HEADER_OFFSET(address >> 2);
+ tgt[1] = value;
+ commandBuffer->offset += 8;
+}
+static inline void etna_draw_primitives(gcoCMDBUF cmdPtr, uint32_t primitive_type, uint32_t start, uint32_t count)
+{
+#ifdef CMD_DEBUG
+ printf("draw_primitives %08x %08x %08x %08x\n",
+ VIV_FE_DRAW_PRIMITIVES_HEADER_OP_DRAW_PRIMITIVES,
+ primitive_type, start, count);
+#endif
+ uint32_t *tgt = (uint32_t*)((size_t)cmdPtr->logical + cmdPtr->offset);
+ tgt[0] = VIV_FE_DRAW_PRIMITIVES_HEADER_OP_DRAW_PRIMITIVES;
+ tgt[1] = primitive_type;
+ tgt[2] = start;
+ tgt[3] = count;
+ cmdPtr->offset += 16;
+}
+static inline void etna_stall_9(gcoCMDBUF commandBuffer)
+{
+ uint32_t *tgt = (uint32_t*)((size_t)commandBuffer->logical + commandBuffer->offset);
+ tgt[0] = 0x48000000;
+ tgt[1] = 0x00000701;
+ commandBuffer->offset += 8;
+}
+
+#ifdef CMD_COMPARE
+static int cmdbuffer_compare(gcoCMDBUF cmdPtr, uint32_t *cmdbuf, uint32_t cmdbuf_size)
+{
+ /* Count differences between generated and stored command buffer */
+ int diff = 0;
+ for(int idx=8; idx<cmdbuf_size/4; ++idx)
+ {
+ uint32_t cmdbuf_word = cmdbuf[idx];
+ uint32_t my_word = *(uint32_t*)((size_t)cmdPtr->logical + cmdPtr->startOffset + idx*4);
+ printf("/*%03x*/ %08x ref:%08x ", idx, my_word, cmdbuf_word);
+ if(is_padding[cmdPtr->startOffset/4 + idx])
+ {
+ printf("PAD");
+ } else if(cmdbuf_word != my_word)
+ {
+ diff += 1;
+ printf("DIFF");
+ }
+ printf("\n");
+ }
+ printf("Number of differences: %i\n", diff);
+ uint32_t size_cmd = cmdbuf_size/4;
+ uint32_t size_my = (cmdPtr->offset - cmdPtr->startOffset)/4;
+ printf("Sizes: %i %i\n", size_cmd, size_my);
+ return diff != 0 || size_cmd != size_my;
+}
+#endif
+
+static inline uint32_t align_up(uint32_t value, uint32_t granularity)
+{
+ return (value + (granularity-1)) & (~(granularity-1));
+}
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 400;
+ int height = 240;
+ int padded_width = align_up(width, 64);
+ int padded_height = align_up(height, 64);
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+ viv_show_chip_info(conn);
+
+ gcsHAL_INTERFACE id = {};
+ id.command = gcvHAL_ATTACH;
+ if((viv_invoke(conn, &id)) != gcvSTATUS_OK)
+ {
+ #ifdef DEBUG
+ fprintf(stderr, "Error attaching to GPU\n");
+ #endif
+ exit(1);
+ }
+ gckCONTEXT context = id.u.Attach.context;
+
+ /* allocate command buffer (blob uses four command buffers, but we don't even fill one) */
+ viv_addr_t buf0_physical = 0;
+ void *buf0_logical = 0;
+ if(viv_alloc_contiguous(conn, 0x20000, &buf0_physical, &buf0_logical, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating host memory\n");
+ exit(1);
+ }
+ printf("Allocated buffer: phys=%08x log=%08x\n", (uint32_t)buf0_physical, (uint32_t)buf0_logical);
+
+ /* allocate main render target */
+ gcuVIDMEM_NODE_PTR rt_node = 0;
+ if(viv_alloc_linear_vidmem(conn, (padded_width * padded_height * 4), 0x40, gcvSURF_RENDER_TARGET, gcvPOOL_DEFAULT, &rt_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target buffer memory\n");
+ exit(1);
+ }
+ printf("Allocated render target node: node=%08x\n", (uint32_t)rt_node);
+
+ viv_addr_t rt_physical = 0; /* ADDR_A */
+ void *rt_logical = 0;
+ if(viv_lock_vidmem(conn, rt_node, &rt_physical, &rt_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target: phys=%08x log=%08x\n", (uint32_t)rt_physical, (uint32_t)rt_logical);
+ memset(rt_logical, 0xff, padded_width * padded_height * 4); /* clear previous result just in case, test that clearing works */
+
+ /* allocate tile status for main render target */
+ gcuVIDMEM_NODE_PTR rt_ts_node = 0;
+ uint32_t rt_ts_size = align_up((padded_width * padded_height * 4)/0x100, 0x100);
+ if(viv_alloc_linear_vidmem(conn, rt_ts_size, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &rt_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated render target tile status node: node=%08x size=%08x\n", (uint32_t)rt_ts_node, rt_ts_size);
+
+ viv_addr_t rt_ts_physical = 0; /* ADDR_B */
+ void *rt_ts_logical = 0;
+ if(viv_lock_vidmem(conn, rt_ts_node, &rt_ts_physical, &rt_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target ts: phys=%08x log=%08x\n", (uint32_t)rt_ts_physical, (uint32_t)rt_ts_logical);
+
+ /* allocate depth for main render target */
+ gcuVIDMEM_NODE_PTR z_node = 0;
+ if(viv_alloc_linear_vidmem(conn, padded_width * padded_height * 2, 0x40, gcvSURF_DEPTH, gcvPOOL_DEFAULT, &z_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth node: node=%08x\n", (uint32_t)z_node);
+
+ viv_addr_t z_physical = 0; /* ADDR_C */
+ void *z_logical = 0;
+ if(viv_lock_vidmem(conn, z_node, &z_physical, &z_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target memory\n");
+ exit(1);
+ }
+ printf("Locked depth target: phys=%08x log=%08x\n", (uint32_t)z_physical, (uint32_t)z_logical);
+
+ /* allocate depth ts for main render target */
+ gcuVIDMEM_NODE_PTR z_ts_node = 0;
+ uint32_t z_ts_size = align_up((padded_width * padded_height * 2)/0x100, 0x100);
+ if(viv_alloc_linear_vidmem(conn, z_ts_size, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &z_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth ts node: node=%08x size=%08x\n", (uint32_t)z_ts_node, z_ts_size);
+
+ viv_addr_t z_ts_physical = 0; /* ADDR_D */
+ void *z_ts_logical = 0;
+ if(viv_lock_vidmem(conn, z_ts_node, &z_ts_physical, &z_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target ts memory\n");
+ exit(1);
+ }
+ printf("Locked depth ts target: phys=%08x log=%08x\n", (uint32_t)z_ts_physical, (uint32_t)z_ts_logical);
+
+ /* allocate vertex buffer */
+ gcuVIDMEM_NODE_PTR vtx_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x100000, 0x40, gcvSURF_VERTEX, gcvPOOL_DEFAULT, &vtx_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating vertex memory\n");
+ exit(1);
+ }
+ printf("Allocated vertex node: node=%08x\n", (uint32_t)vtx_node);
+
+ viv_addr_t vtx_physical = 0; /* ADDR_E */
+ void *vtx_logical = 0;
+ if(viv_lock_vidmem(conn, vtx_node, &vtx_physical, &vtx_logical)!=0)
+ {
+ fprintf(stderr, "Error locking vertex memory\n");
+ exit(1);
+ }
+ printf("Locked vertex memory: phys=%08x log=%08x\n", (uint32_t)vtx_physical, (uint32_t)vtx_logical);
+
+ /* allocate aux render target */
+ gcuVIDMEM_NODE_PTR aux_rt_node = 0;
+ if(viv_alloc_linear_vidmem(conn, padded_width * padded_height * 4, 0x40, gcvSURF_BITMAP, gcvPOOL_DEFAULT, &aux_rt_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating aux render target buffer memory\n");
+ exit(1);
+ }
+ printf("Allocated aux render target node: node=%08x\n", (uint32_t)aux_rt_node);
+
+ viv_addr_t aux_rt_physical = 0; /* ADDR_F */
+ void *aux_rt_logical = 0;
+ if(viv_lock_vidmem(conn, aux_rt_node, &aux_rt_physical, &aux_rt_logical)!=0)
+ {
+ fprintf(stderr, "Error locking aux render target memory\n");
+ exit(1);
+ }
+ printf("Locked aux render target: phys=%08x log=%08x\n", (uint32_t)aux_rt_physical, (uint32_t)aux_rt_logical);
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ int dest_idx = 0;
+ int v_src_idx = 0;
+ int n_src_idx = 0;
+ int c_src_idx = 0;
+ for(int jj=0; jj<DRAW_COUNT; jj++)
+ {
+ for(int vert=0; vert<VERTICES_PER_DRAW*3; ++vert)
+ {
+ ((float*)vtx_logical)[dest_idx] = vVertices[v_src_idx];
+ dest_idx++;
+ v_src_idx++;
+ }
+ for(int vert=0; vert<VERTICES_PER_DRAW*3; ++vert)
+ {
+ ((float*)vtx_logical)[dest_idx] = vNormals[n_src_idx];
+ dest_idx++;
+ n_src_idx++;
+ }
+ for(int vert=0; vert<VERTICES_PER_DRAW*3; ++vert)
+ {
+ ((float*)vtx_logical)[dest_idx] = vColors[c_src_idx];
+ dest_idx++;
+ c_src_idx++;
+ }
+ }
+ /*
+ for(int idx=0; idx<NUM_VERTICES*3*3; ++idx)
+ {
+ printf("%i %f\n", idx, ((float*)vtx_logical)[idx]);
+ }*/
+
+ struct _gcoCMDBUF commandBuffer = {
+ .object = {
+ .type = gcvOBJ_COMMANDBUFFER
+ },
+ //.os = (_gcoOS*)0xbf7488,
+ //.hardware = (_gcoHARDWARE*)0x402694e0,
+ .physical = (void*)buf0_physical,
+ .logical = (void*)buf0_logical,
+ .bytes = 0x8000,
+ .startOffset = 0x0,
+ //.offset = 0xac0,
+ //.free = 0x7520,
+ //.hintTable = (unsigned int*)0x0, // Used when gcdSECURE
+ //.hintIndex = (unsigned int*)0x58, // Used when gcdSECURE
+ //.hintCommit = (unsigned int*)0xffffffff // Used when gcdSECURE
+ };
+ struct _gcoCMDBUF *cmdPtr = &commandBuffer;
+
+ commandBuffer.free = commandBuffer.bytes - 0x8; /* Always keep 0x8 at end of buffer for kernel driver */
+ commandBuffer.startOffset = 0;
+ commandBuffer.offset = commandBuffer.startOffset + 8*4;
+#ifdef CMD_COMPARE
+ memset(is_padding, 0, 0x8000/4); /* keep track of what words in the command buffer are padding; just for debugging / comparing */
+#endif
+
+ /* XXX how important is the ordering? I suppose we could group states (except the flushes, kickers, semaphores etc)
+ * and simply submit them at once. Especially for consecutive states and masked stated this could be a big win
+ * in DMA command buffer size. */
+
+ /* Build first command buffer */
+ etna_set_state(cmdPtr, VIVS_GL_VERTEX_ELEMENT_CONFIG, 0x1);
+ etna_set_state(cmdPtr, VIVS_RA_CONTROL, 0x1);
+
+ etna_set_state(cmdPtr, VIVS_PA_W_CLIP_LIMIT, 0x34000001);
+ etna_set_state(cmdPtr, VIVS_PA_SYSTEM_MODE, 0x11);
+ etna_set_state(cmdPtr, VIVS_GL_API_MODE, VIVS_GL_API_MODE_OPENGL);
+ for(int i=0; i<2; i++)
+ {
+ etna_set_state(cmdPtr, VIVS_SE_CONFIG, 0x0); //LAST_PIXEL_ENABLE=0
+ etna_set_state(cmdPtr, VIVS_SE_DEPTH_SCALE, 0x0);
+ etna_set_state(cmdPtr, VIVS_SE_DEPTH_BIAS, 0x0);
+ }
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_DUMMY_DUMMY, 0);
+ etna_set_state(cmdPtr, VIVS_TS_DEPTH_AUTO_DISABLE_COUNT, 0x1cc0);
+ etna_set_state_multi(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, 3,
+ (uint32_t[]){rt_ts_physical, rt_physical, 0});
+ etna_set_state(cmdPtr, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_AUTO_DISABLE);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_DUMMY_DUMMY, 0);
+ etna_set_state_multi(cmdPtr, VIVS_TS_DEPTH_STATUS_BASE, 3,
+ (uint32_t[]){z_ts_physical, z_physical, 0xffffffff});
+ etna_set_state(cmdPtr, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_COLOR_AUTO_DISABLE |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(cmdPtr, VIVS_SE_DEPTH_SCALE, 0);
+ etna_set_state(cmdPtr, VIVS_SE_DEPTH_BIAS, 0);
+
+ for(int i=0; i<2; i++)
+ {
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE,
+ VIVS_GL_FLUSH_CACHE_DEPTH | VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE,
+ VIVS_GL_FLUSH_CACHE_DEPTH | VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE,
+ VIVS_GL_FLUSH_CACHE_DEPTH | VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE,
+ VIVS_GL_FLUSH_CACHE_DEPTH | VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_TS_FLUSH_CACHE,
+ VIVS_TS_FLUSH_CACHE_FLUSH);
+ }
+
+ /* semaphore time */
+ etna_set_state(cmdPtr, VIVS_GL_SEMAPHORE_TOKEN,
+ (SYNC_RECIPIENT_RA<<VIVS_GL_SEMAPHORE_TOKEN_FROM__SHIFT)|
+ (SYNC_RECIPIENT_PE<<VIVS_GL_SEMAPHORE_TOKEN_TO__SHIFT));
+ etna_set_state(cmdPtr, VIVS_GL_STALL_TOKEN,
+ (SYNC_RECIPIENT_RA<<VIVS_GL_STALL_TOKEN_FROM__SHIFT)|
+ (SYNC_RECIPIENT_PE<<VIVS_GL_STALL_TOKEN_TO__SHIFT));
+ /* Set up the resolve to clear tile status for main render target
+ * Regard the TS as an image of width 16 with 4 bytes per pixel (64 bytes per row)
+ * XXX need to clear the depth ts too.
+ * */
+ etna_set_state(cmdPtr, VIVS_RS_CONFIG,
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_SOURCE_FORMAT__SHIFT) |
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_DEST_FORMAT__SHIFT));
+ etna_set_state_multi(cmdPtr, VIVS_RS_DITHER(0), 2, (uint32_t[]){0xffffffff, 0xffffffff});
+ etna_set_state(cmdPtr, VIVS_RS_DEST_ADDR, rt_ts_physical); /* ADDR_B */
+ etna_set_state(cmdPtr, VIVS_RS_DEST_STRIDE, 0x200);
+ etna_set_state(cmdPtr, VIVS_RS_FILL_VALUE(0), 0x55555555);
+ etna_set_state(cmdPtr, VIVS_RS_CLEAR_CONTROL,
+ VIVS_RS_CLEAR_CONTROL_MODE_ENABLED1 |
+ (0xffff << VIVS_RS_CLEAR_CONTROL_BITS__SHIFT));
+ etna_set_state(cmdPtr, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(cmdPtr, VIVS_RS_WINDOW_SIZE,
+ (4 << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (128 << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(cmdPtr, VIVS_RS_KICKER, 0xbadabeeb);
+
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_CLEAR_VALUE, 0xff7f7f7f);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_DUMMY_DUMMY, 0);
+ etna_set_state(cmdPtr, VIVS_TS_DEPTH_AUTO_DISABLE_COUNT, 0x1cc0);
+ etna_set_state_multi(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, 3,
+ (uint32_t[]){rt_ts_physical, rt_physical, 0xff7f7f7f});
+ etna_set_state(cmdPtr, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_COLOR_AUTO_DISABLE |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+
+
+ /* Compute transform matrices in the same way as cube egl demo */
+ ESMatrix modelview;
+ esMatrixLoadIdentity(&modelview);
+ esTranslate(&modelview, 0.0f, 0.0f, -8.0f);
+ esRotate(&modelview, 45.0f, 1.0f, 0.0f, 0.0f);
+ esRotate(&modelview, 45.0f, 0.0f, 1.0f, 0.0f);
+ esRotate(&modelview, 10.0f, 0.0f, 0.0f, 1.0f);
+
+ float aspect = (float)(height) / (float)(width);
+
+ ESMatrix projection;
+ esMatrixLoadIdentity(&projection);
+ esFrustum(&projection, -2.8f, +2.8f, -2.8f * aspect, +2.8f * aspect, 6.0f, 10.0f);
+
+ ESMatrix modelviewprojection;
+ esMatrixLoadIdentity(&modelviewprojection);
+ esMatrixMultiply(&modelviewprojection, &modelview, &projection);
+
+ float normal[9]; // normal transformation matrix
+ normal[0] = modelview.m[0][0];
+ normal[1] = modelview.m[0][1];
+ normal[2] = modelview.m[0][2];
+ normal[3] = modelview.m[1][0];
+ normal[4] = modelview.m[1][1];
+ normal[5] = modelview.m[1][2];
+ normal[6] = modelview.m[2][0];
+ normal[7] = modelview.m[2][1];
+ normal[8] = modelview.m[2][2];
+
+ etna_set_state_multi(cmdPtr, VIVS_VS_UNIFORMS(0), 16, (uint32_t*)&modelviewprojection.m[0][0]);
+ etna_set_state_multi(cmdPtr, VIVS_VS_UNIFORMS(16), 3, (uint32_t*)&normal[0]); /* u4.xyz */
+ etna_set_state_multi(cmdPtr, VIVS_VS_UNIFORMS(20), 3, (uint32_t*)&normal[3]); /* u5.xyz */
+ etna_set_state_multi(cmdPtr, VIVS_VS_UNIFORMS(24), 3, (uint32_t*)&normal[6]); /* u6.xyz */
+ etna_set_state_multi(cmdPtr, VIVS_VS_UNIFORMS(28), 16, (uint32_t*)&modelview.m[0][0]);
+
+ //TYPE=FLOAT,ENDIAN=NO_SWAP,NONCONSECUTIVE=1,STREAM=TO_BE_DEFINED,NUM=0x3,NORMALIZE=OFF,START=0x0,END=0xc
+ unsigned fe_vert_elem_conf_base =
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NONCONSECUTIVE |
+ (3 <<VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ (0x0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) |
+ (0xc << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT);
+ //(xx << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) |
+
+ etna_set_state_multi(cmdPtr, VIVS_FE_VERTEX_ELEMENT_CONFIG(0), 3, (uint32_t[]){
+ fe_vert_elem_conf_base | (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT),
+ fe_vert_elem_conf_base | (1 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT),
+ fe_vert_elem_conf_base | (2 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT)});
+ etna_set_state(cmdPtr, VIVS_VS_INPUT(0), VIVS_VS_INPUT_I0(0) |
+ VIVS_VS_INPUT_I1(1) | VIVS_VS_INPUT_I2(2) | VIVS_VS_INPUT_I3(0));
+
+ //0x30 = 12floats (4 vertices) per position, normals, colors
+ etna_set_state_multi(cmdPtr, VIVS_FE_VERTEX_STREAMS_BASE_ADDR(0), 3, (uint32_t[])
+ {vtx_physical, vtx_physical+0x30, vtx_physical+0x60});
+ etna_set_state_multi(cmdPtr, VIVS_FE_VERTEX_STREAMS_CONTROL(0), 3, (uint32_t[])
+ {0xc, 0xc, 0xc});
+ etna_set_state(cmdPtr, VIVS_PA_W_CLIP_LIMIT, 0);
+
+ etna_set_state_multi_fixp(cmdPtr, VIVS_PA_VIEWPORT_SCALE_X, 2, (uint32_t[]){200<<16, 120<<16});
+ etna_set_state_multi_fixp(cmdPtr, VIVS_PA_VIEWPORT_OFFSET_X, 2, (uint32_t[]){200<<16, 120<<16});
+ etna_set_state/*_f32*/(cmdPtr, VIVS_PA_VIEWPORT_UNK00A80, 0x37c81905); //0.000024f but loads 37c9539c not 37c81905
+ etna_set_state_fixp(cmdPtr, VIVS_PA_VIEWPORT_UNK00A84, 8192<<16);
+ etna_set_state/*_f32*/(cmdPtr, VIVS_PA_VIEWPORT_UNK00A8C, 0x38000000); //0.000031f but load 380205ff not 38000000
+ etna_set_state_multi_fixp(cmdPtr, VIVS_SE_SCISSOR_LEFT, 4, (uint32_t[]){0, 0, (400<<16)|0x1000, (240<<16)|0x1000});//0x1000=1/16
+ etna_set_state_fixp(cmdPtr, VIVS_SE_CLIP_RIGHT, (400<<16)|0xffff);
+ etna_set_state_fixp(cmdPtr, VIVS_SE_CLIP_BOTTOM, (240<<16)|0xffff);
+ etna_set_state_multi(cmdPtr, VIVS_PE_ALPHA_OP, 3, (uint32_t[]){0, 0,
+ VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR(1) |
+ VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA(1)});
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_CONFIG_EXT, 0x0000fdff);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_FORMAT, RS_FORMAT_A8R8G8B8 |
+ VIVS_PE_COLOR_FORMAT_COMPONENTS(0xf) |
+ VIVS_PE_COLOR_FORMAT_OVERWRITE |
+ VIVS_PE_COLOR_FORMAT_SUPER_TILED);
+ etna_set_state(cmdPtr, VIVS_PE_PIPE_COLOR_ADDR(0), rt_physical);
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_ADDR, rt_physical);
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_STRIDE, 0x700);
+ etna_set_state_multi(cmdPtr, VIVS_PE_DEPTH_CONFIG, 4, (uint32_t[]){
+ VIVS_PE_DEPTH_CONFIG_DEPTH_MODE_Z |
+ VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC(COMPARE_FUNC_ALWAYS) |
+ VIVS_PE_DEPTH_CONFIG_EARLY_Z |
+ VIVS_PE_DEPTH_CONFIG_SUPER_TILED |
+ VIVS_PE_DEPTH_CONFIG_UNK24,
+ 0x00000000/*0.0*/, 0x3f800000/*1.0*/, 0x477fff00/*65535.0*/});
+ etna_set_state(cmdPtr, VIVS_PE_PIPE_DEPTH_ADDR(0), z_physical);
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_ADDR, z_physical);
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_STRIDE, 0x380);
+ etna_set_state(cmdPtr, VIVS_PE_HDEPTH_CONTROL, 0);
+ etna_set_state_f32(cmdPtr, VIVS_PA_VIEWPORT_SCALE_Z, 1.0);
+ etna_set_state_f32(cmdPtr, VIVS_PA_VIEWPORT_OFFSET_Z, 0.0);
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_CONFIG, 0);
+ etna_set_state(cmdPtr, VIVS_GL_MULTI_SAMPLE_CONFIG, 0);
+ etna_set_state_f32(cmdPtr, VIVS_PA_LINE_WIDTH, 0.5);
+ etna_set_state_multi(cmdPtr, VIVS_PA_CONFIG, 3, (uint32_t[]){
+ VIVS_PA_CONFIG_CULL_FACE_MODE_CCW |
+ VIVS_PA_CONFIG_FILL_MODE_SOLID |
+ VIVS_PA_CONFIG_SHADE_MODEL_SMOOTH |
+ VIVS_PA_CONFIG_UNK22,
+ 0x3f000000/*0.5*/, 0x3f000000/*0.5*/
+ });
+ etna_set_state(cmdPtr, VIVS_GL_SEMAPHORE_TOKEN,
+ (SYNC_RECIPIENT_FE<<VIVS_GL_SEMAPHORE_TOKEN_FROM__SHIFT)|
+ (SYNC_RECIPIENT_PE<<VIVS_GL_SEMAPHORE_TOKEN_TO__SHIFT));
+ etna_stall_9(cmdPtr);
+
+ /* shader setup */
+ etna_set_state_multi(cmdPtr, VIVS_VS_INPUT_COUNT, 3, (uint32_t[]){
+ VIVS_VS_INPUT_COUNT_COUNT(3) | VIVS_VS_INPUT_COUNT_UNK8(1),
+ VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS(6),
+ VIVS_VS_OUTPUT_O0(4) | VIVS_VS_OUTPUT_O1(0) |
+ VIVS_VS_OUTPUT_O2(0) | VIVS_VS_OUTPUT_O3(0)});
+ etna_set_state(cmdPtr, VIVS_VS_RANGE, VIVS_VS_RANGE_HIGH(0x15));
+ etna_set_state(cmdPtr, VIVS_VS_START_PC, 0);
+ etna_set_state(cmdPtr, VIVS_VS_END_PC, 0x16);
+
+ //vec4 lightSource = vec4(2.0, 2.0, 20.0, 0.0);
+ //VS.UNIFORMS[14] = 2.0, VS.UNIFORMS[19]=2.0, VS.UNIFORMS[23]=20.0 VS.UNIFORMS[27]=0.0 u[3-6].w
+ etna_set_state_f32(cmdPtr, VIVS_VS_UNIFORMS(44), 1.0);
+ etna_set_state_f32(cmdPtr, VIVS_VS_UNIFORMS(27), 0.0);
+ etna_set_state_f32(cmdPtr, VIVS_VS_UNIFORMS(23), 20.0);
+ etna_set_state_f32(cmdPtr, VIVS_VS_UNIFORMS(19), 2.0);
+
+ /* Now load the shader itself */
+ uint32_t vs[] = {
+ 0x01831009, 0x00000000, 0x00000000, 0x203fc048,
+ 0x02031009, 0x00000000, 0x00000000, 0x203fc058,
+ 0x07841003, 0x39000800, 0x00000050, 0x00000000,
+ 0x07841002, 0x39001800, 0x00aa0050, 0x00390048,
+ 0x07841002, 0x39002800, 0x01540050, 0x00390048,
+ 0x07841002, 0x39003800, 0x01fe0050, 0x00390048,
+ 0x03851003, 0x29004800, 0x000000d0, 0x00000000,
+ 0x03851002, 0x29005800, 0x00aa00d0, 0x00290058,
+ 0x03811002, 0x29006800, 0x015400d0, 0x00290058,
+ 0x07851003, 0x39007800, 0x00000050, 0x00000000,
+ 0x07851002, 0x39008800, 0x00aa0050, 0x00390058,
+ 0x07851002, 0x39009800, 0x01540050, 0x00390058,
+ 0x07801002, 0x3900a800, 0x01fe0050, 0x00390058,
+ 0x0401100c, 0x00000000, 0x00000000, 0x003fc008,
+ 0x03801002, 0x69000800, 0x01fe00c0, 0x00290038,
+ 0x03831005, 0x29000800, 0x01480040, 0x00000000,
+ 0x0383100d, 0x00000000, 0x00000000, 0x00000038,
+ 0x03801003, 0x29000800, 0x014801c0, 0x00000000,
+ 0x00801005, 0x29001800, 0x01480040, 0x00000000,
+ 0x0080108f, 0x3fc06800, 0x00000050, 0x203fc068,
+ 0x03801003, 0x00000800, 0x01480140, 0x00000000,
+ 0x04001009, 0x00000000, 0x00000000, 0x200000b8
+ };
+ uint32_t ps[] = {
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000
+ };
+ etna_set_state_multi(cmdPtr, VIVS_SH_INST_MEM(0), sizeof(vs)/4, vs);
+ etna_set_state(cmdPtr, VIVS_RA_CONTROL, 0x1);
+ etna_set_state(cmdPtr, VIVS_PS_OUTPUT_REG, 0x1);
+ etna_set_state(cmdPtr, VIVS_PA_SHADER_ATTRIBUTES(0), 0x200);
+ etna_set_state(cmdPtr, VIVS_GL_VARYING_NUM_COMPONENTS, /* one varying, with four components */
+ (4 << VIVS_GL_VARYING_NUM_COMPONENTS_VAR0__SHIFT)
+ );
+ etna_set_state(cmdPtr, VIVS_GL_UNK03834, 0x40000);
+ etna_set_state_multi(cmdPtr, VIVS_GL_VARYING_COMPONENT_USE(0), 2, (uint32_t[]){
+ VIVS_GL_VARYING_COMPONENT_USE_COMP0(1) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP1(1) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP2(1) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP3(1),
+ 0});
+ etna_set_state(cmdPtr, VIVS_GL_UNK03838, 0x0);
+ etna_set_state(cmdPtr, VIVS_PS_RANGE, VIVS_PS_RANGE_LOW(0x100) | VIVS_PS_RANGE_HIGH(0x100));
+ etna_set_state(cmdPtr, VIVS_PS_START_PC, 0x0);
+ etna_set_state(cmdPtr, VIVS_PS_END_PC, 0x1);
+
+
+ etna_set_state_multi(cmdPtr, VIVS_SH_INST_MEM(0x100*4), sizeof(ps)/4, ps);
+ etna_set_state_multi(cmdPtr, VIVS_PS_INPUT_COUNT, 3, (uint32_t[]){
+ (31<<8)|2,
+ (2 << VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS__SHIFT),
+ VIVS_PS_CONTROL_UNK1});
+
+ etna_set_state(cmdPtr, VIVS_PA_ATTRIBUTE_ELEMENT_COUNT, 0x100);
+ etna_set_state(cmdPtr, VIVS_GL_VARYING_TOTAL_COMPONENTS, /* one varying, with four components */
+ (4 << VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM__SHIFT)
+ );
+ etna_set_state(cmdPtr, VIVS_VS_LOAD_BALANCING, 0xf3f0582);
+ etna_set_state(cmdPtr, VIVS_VS_OUTPUT_COUNT, 2);
+ etna_set_state(cmdPtr, VIVS_GL_SEMAPHORE_TOKEN,
+ (SYNC_RECIPIENT_RA<<VIVS_GL_SEMAPHORE_TOKEN_FROM__SHIFT)|
+ (SYNC_RECIPIENT_PE<<VIVS_GL_SEMAPHORE_TOKEN_TO__SHIFT));
+ etna_set_state(cmdPtr, VIVS_GL_STALL_TOKEN,
+ (SYNC_RECIPIENT_RA<<VIVS_GL_STALL_TOKEN_FROM__SHIFT)|
+ (SYNC_RECIPIENT_PE<<VIVS_GL_STALL_TOKEN_TO__SHIFT));
+ etna_draw_primitives(cmdPtr, PRIMITIVE_TYPE_TRIANGLE_STRIP, 0, 2);
+
+
+ //first draw is little butchered
+ for(int drawNr = 1; drawNr<6; drawNr++)
+ {
+ unsigned fe_vert_elem_conf_base =
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ (ENDIAN_MODE_NO_SWAP << VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NONCONSECUTIVE |
+ (3 <<VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM__SHIFT) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ (0x0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT) |
+ (0xc << VIVS_FE_VERTEX_ELEMENT_CONFIG_END__SHIFT);
+ //(xx << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT) |
+
+ etna_set_state_multi(cmdPtr, VIVS_FE_VERTEX_ELEMENT_CONFIG(0), 3, (uint32_t[]){
+ fe_vert_elem_conf_base | (0 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT),
+ fe_vert_elem_conf_base | (1 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT),
+ fe_vert_elem_conf_base | (2 << VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM__SHIFT)});
+ etna_set_state(cmdPtr, VIVS_VS_INPUT(0), VIVS_VS_INPUT_I0(0) |
+ VIVS_VS_INPUT_I1(1) | VIVS_VS_INPUT_I2(2) | VIVS_VS_INPUT_I3(0));
+
+ //0x30 = 12floats (4 vertices) per position, normals, colors
+ etna_set_state_multi(cmdPtr, VIVS_FE_VERTEX_STREAMS_BASE_ADDR(0), 3, (uint32_t[])
+ {vtx_physical+(0x60*drawNr), vtx_physical+(0x60*drawNr)+0x30, vtx_physical+(0x60*drawNr)+0x60});
+ etna_set_state_multi(cmdPtr, VIVS_FE_VERTEX_STREAMS_CONTROL(0), 3, (uint32_t[])
+ {0xc, 0xc, 0xc});
+ etna_set_state(cmdPtr, VIVS_PA_W_CLIP_LIMIT, 0);
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG,
+ VIVS_PA_CONFIG_CULL_FACE_MODE_CCW |
+ VIVS_PA_CONFIG_FILL_MODE_SOLID |
+ VIVS_PA_CONFIG_SHADE_MODEL_SMOOTH |
+ VIVS_PA_CONFIG_UNK22);
+ etna_draw_primitives(cmdPtr, PRIMITIVE_TYPE_TRIANGLE_STRIP, drawNr*4, 2);
+ }
+ for(int idx=0; idx<2; idx++)
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+#ifdef CMD_COMPARE
+ /* Set addresses in first command buffer */
+ cmdbuf1[37] = cmdbuf1[87] = cmdbuf1[109] = rt_ts_physical;
+ cmdbuf1[38] = cmdbuf1[110] = cmdbuf1[213] = cmdbuf1[215] = rt_physical;
+ cmdbuf1[47] = z_ts_physical; //ADDR_J */ 0x500 gcvSURF_TILE_STATUS
+ cmdbuf1[48] = cmdbuf1[225] = cmdbuf1[227] = z_physical; //DDR_I */ 0x45000 gcvSURF_DEPTH
+ cmdbuf1[169] = vtx_physical;
+ cmdbuf1[170] = vtx_physical + 0x030;
+ cmdbuf1[171] = vtx_physical + 0x060;
+
+ cmdbuf1[413] = vtx_physical + 0x060;
+ cmdbuf1[414] = vtx_physical + 0x090;
+ cmdbuf1[415] = vtx_physical + 0x0c0;
+
+ cmdbuf1[435] = vtx_physical + 0x0c0;
+ cmdbuf1[436] = vtx_physical + 0x0f0;
+ cmdbuf1[437] = vtx_physical + 0x120;
+
+ cmdbuf1[457] = vtx_physical + 0x120;
+ cmdbuf1[458] = vtx_physical + 0x150;
+ cmdbuf1[459] = vtx_physical + 0x180;
+
+ cmdbuf1[479] = vtx_physical + 0x180;
+ cmdbuf1[480] = vtx_physical + 0x1b0;
+ cmdbuf1[481] = vtx_physical + 0x1e0;
+
+ cmdbuf1[501] = vtx_physical + 0x1e0;
+ cmdbuf1[502] = vtx_physical + 0x210;
+ cmdbuf1[503] = vtx_physical + 0x240;
+
+ /* Must exactly match */
+ if(cmdbuffer_compare(cmdPtr, cmdbuf1, sizeof(cmdbuf1)))
+ exit(1);
+#endif
+
+ /* Submit first command buffer */
+ commandBuffer.free = commandBuffer.bytes - commandBuffer.offset - 0x8;
+ printf("[1] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing first command buffer\n");
+ exit(1);
+ }
+
+
+ /* Build second command buffer */
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ commandBuffer.offset = commandBuffer.startOffset + 8*4;
+
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_RS_CONFIG,
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_SOURCE_FORMAT__SHIFT) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_DEST_FORMAT__SHIFT) |
+ VIVS_RS_CONFIG_DEST_TILED);
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | VIVS_RS_SOURCE_STRIDE_TILING);
+ etna_set_state(cmdPtr, VIVS_RS_DEST_STRIDE, (padded_width * 4 * 4) | VIVS_RS_DEST_STRIDE_TILING);
+ etna_set_state_multi(cmdPtr, VIVS_RS_DITHER(0), 2, (uint32_t[]){0xffffffff, 0xffffffff});
+ etna_set_state(cmdPtr, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(cmdPtr, VIVS_RS_EXTRA_CONFIG, 0); /* no AA, no endian switch */
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_ADDR, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_RS_DEST_ADDR, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_RS_WINDOW_SIZE,
+ (padded_height << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (padded_width << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(cmdPtr, VIVS_RS_KICKER, 0xbadabeeb);
+
+#ifdef CMD_COMPARE
+ /* Submit second command buffer, with updated context.
+ * Second command buffer fills the background.
+ */
+ cmdbuf2[35] = cmdbuf2[37] = rt_physical;
+
+ /* Must exactly match */
+ if(cmdbuffer_compare(cmdPtr, cmdbuf2, sizeof(cmdbuf2)))
+ exit(1);
+#endif
+ commandBuffer.free = commandBuffer.bytes - commandBuffer.offset - 0x8;
+ printf("[2] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing second command buffer\n");
+ exit(1);
+ }
+
+ /* Build third command buffer
+ * Third command buffer does some cache flush trick?
+ * It can be left out without any visible harm.
+ **/
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ commandBuffer.offset = commandBuffer.startOffset + 8*4;
+ etna_set_state(cmdPtr, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_DUMMY_DUMMY, 0);
+ etna_set_state(cmdPtr, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_RS_CONFIG,
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_SOURCE_FORMAT__SHIFT) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_DEST_FORMAT__SHIFT) |
+ VIVS_RS_CONFIG_SWAP_RB);
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | VIVS_RS_SOURCE_STRIDE_TILING);
+ etna_set_state(cmdPtr, VIVS_RS_DEST_STRIDE, (padded_width * 4));
+ etna_set_state_multi(cmdPtr, VIVS_RS_DITHER(0), 2, (uint32_t[]){0xffffffff, 0xffffffff});
+ etna_set_state(cmdPtr, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(cmdPtr, VIVS_RS_EXTRA_CONFIG, 0); /* no AA, no endian switch */
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_ADDR, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_RS_DEST_ADDR, aux_rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_RS_WINDOW_SIZE,
+ (padded_height << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (padded_width << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(cmdPtr, VIVS_RS_KICKER, 0xbadabeeb);
+
+ /* Submit third command buffer */
+#ifdef CMD_COMPARE
+ cmdbuf3[35] = rt_physical;
+ cmdbuf3[37] = aux_rt_physical;
+ /* Must exactly match */
+ if(cmdbuffer_compare(cmdPtr, cmdbuf3, sizeof(cmdbuf3)))
+ exit(1);
+#endif
+ commandBuffer.free = commandBuffer.bytes - commandBuffer.offset - 0x8;
+ printf("[3] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing third command buffer\n");
+ exit(1);
+ }
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL (wait for pixel engine to finish) */
+ int sig_id = 0;
+ if(viv_user_signal_create(conn, 0, &sig_id) != 0) /* automatic resetting signal */
+ {
+ fprintf(stderr, "Cannot create user signal\n");
+ exit(1);
+ }
+ printf("Created user signal %i\n", sig_id);
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+
+ /* Allocate video memory for BITMAP, lock */
+ gcuVIDMEM_NODE_PTR bmp_node = 0;
+ if(viv_alloc_linear_vidmem(conn, width*height*4, 0x40, gcvSURF_BITMAP, gcvPOOL_DEFAULT, &bmp_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating bitmap status memory\n");
+ exit(1);
+ }
+ printf("Allocated bitmap node: node=%08x\n", (uint32_t)bmp_node);
+
+ viv_addr_t bmp_physical = 0;
+ void *bmp_logical = 0;
+ if(viv_lock_vidmem(conn, bmp_node, &bmp_physical, &bmp_logical)!=0)
+ {
+ fprintf(stderr, "Error locking bmp memory\n");
+ exit(1);
+ }
+ memset(bmp_logical, 0xff, width*height*4); /* clear previous result */
+ printf("Locked bmp: phys=%08x log=%08x\n", (uint32_t)bmp_physical, (uint32_t)bmp_logical);
+
+ /* Start building fourth command buffer
+ * Fourth command buffer copies render result to bitmap, detiling along the way.
+ */
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ commandBuffer.offset = commandBuffer.startOffset + 8*4;
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_RS_CONFIG,
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_SOURCE_FORMAT__SHIFT) |
+ (RS_FORMAT_A8R8G8B8 << VIVS_RS_CONFIG_DEST_FORMAT__SHIFT) /*|
+ VIVS_RS_CONFIG_SWAP_RB*/);
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_STRIDE, (padded_width * 4));
+ etna_set_state(cmdPtr, VIVS_RS_DEST_STRIDE, width * 4);
+ etna_set_state(cmdPtr, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(cmdPtr, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(cmdPtr, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(cmdPtr, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_ADDR, aux_rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_RS_DEST_ADDR, bmp_physical); /* ADDR_J */
+ etna_set_state(cmdPtr, VIVS_RS_WINDOW_SIZE,
+ (height << VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT) |
+ (width << VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT));
+ etna_set_state(cmdPtr, VIVS_RS_KICKER, 0xbeebbeeb);
+
+ /* Submit fourth command buffer
+ */
+#ifdef CMD_COMPARE
+ cmdbuf4[0x19] = aux_rt_physical;
+ cmdbuf4[0x1b] = bmp_physical;
+ /* Must exactly match */
+ if(cmdbuffer_compare(cmdPtr, cmdbuf4, sizeof(cmdbuf4)))
+ exit(1);
+#endif
+ commandBuffer.free = commandBuffer.bytes - commandBuffer.offset - 0x8;
+ printf("[4] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing fourth command buffer\n");
+ exit(1);
+ }
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL */
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+ bmp_dump32(bmp_logical, width, height, false, "/home/linaro/replay.bmp");
+ /* Unlock video memory */
+ if(viv_unlock_vidmem(conn, bmp_node, gcvSURF_BITMAP, 1) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ viv_close(conn);
+ return 0;
+}
+
diff --git a/src/replay/cube_gc2000.c b/src/replay/cube_gc2000.c
new file mode 100644
index 0000000..e866837
--- /dev/null
+++ b/src/replay/cube_gc2000.c
@@ -0,0 +1,497 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include "write_bmp.h"
+#include "viv_raw.h"
+
+#include "cube_cmd_gc2000.h"
+/* TODO: should actually update context as we go,
+ * a context switch would currently revert state and likely result in corrupted rendering.
+ */
+#include "context_cmd.h"
+
+float vVertices[] = {
+ // front
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f, // point magenta
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ // back
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, +1.0f, -1.0f, // point yellow
+ -1.0f, +1.0f, -1.0f, // point green
+ // right
+ +1.0f, -1.0f, +1.0f, // point magenta
+ +1.0f, -1.0f, -1.0f, // point red
+ +1.0f, +1.0f, +1.0f, // point white
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // left
+ -1.0f, -1.0f, -1.0f, // point black
+ -1.0f, -1.0f, +1.0f, // point blue
+ -1.0f, +1.0f, -1.0f, // point green
+ -1.0f, +1.0f, +1.0f, // point cyan
+ // top
+ -1.0f, +1.0f, +1.0f, // point cyan
+ +1.0f, +1.0f, +1.0f, // point white
+ -1.0f, +1.0f, -1.0f, // point green
+ +1.0f, +1.0f, -1.0f, // point yellow
+ // bottom
+ -1.0f, -1.0f, -1.0f, // point black
+ +1.0f, -1.0f, -1.0f, // point red
+ -1.0f, -1.0f, +1.0f, // point blue
+ +1.0f, -1.0f, +1.0f // point magenta
+};
+
+float vColors[] = {
+ // front
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f, // magenta
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ // back
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 1.0f, 0.0f, // yellow
+ 0.0f, 1.0f, 0.0f, // green
+ // right
+ 1.0f, 0.0f, 1.0f, // magenta
+ 1.0f, 0.0f, 0.0f, // red
+ 1.0f, 1.0f, 1.0f, // white
+ 1.0f, 1.0f, 0.0f, // yellow
+ // left
+ 0.0f, 0.0f, 0.0f, // black
+ 0.0f, 0.0f, 1.0f, // blue
+ 0.0f, 1.0f, 0.0f, // green
+ 0.0f, 1.0f, 1.0f, // cyan
+ // top
+ 0.0f, 1.0f, 1.0f, // cyan
+ 1.0f, 1.0f, 1.0f, // white
+ 0.0f, 1.0f, 0.0f, // green
+ 1.0f, 1.0f, 0.0f, // yellow
+ // bottom
+ 0.0f, 0.0f, 0.0f, // black
+ 1.0f, 0.0f, 0.0f, // red
+ 0.0f, 0.0f, 1.0f, // blue
+ 1.0f, 0.0f, 1.0f // magenta
+};
+
+float vNormals[] = {
+ // front
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ +0.0f, +0.0f, +1.0f, // forward
+ // back
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ +0.0f, +0.0f, -1.0f, // backbard
+ // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ +1.0f, +0.0f, +0.0f, // right
+ // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ -1.0f, +0.0f, +0.0f, // left
+ // top
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ +0.0f, +1.0f, +0.0f, // up
+ // bottom
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f, // down
+ +0.0f, -1.0f, +0.0f // down
+};
+#define COMPONENTS_PER_VERTEX (3)
+#define NUM_VERTICES (6*4)
+#define VERTICES_PER_DRAW 4
+#define DRAW_COUNT 6
+
+int main(int argc, char **argv)
+{
+ int rv;
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+ viv_show_chip_info(conn);
+
+ /* allocate command buffer (blob uses four command buffers, but we don't even fill one) */
+ viv_addr_t buf0_physical = 0;
+ void *buf0_logical = 0;
+ if(viv_alloc_contiguous(conn, 0x20000, &buf0_physical, &buf0_logical, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating host memory\n");
+ exit(1);
+ }
+ printf("Allocated buffer: phys=%08x log=%08x\n", (uint32_t)buf0_physical, (uint32_t)buf0_logical);
+
+ /* allocate main render target */
+ gcuVIDMEM_NODE_PTR color_surface_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x73000, 0x40, gcvSURF_RENDER_TARGET, gcvPOOL_SYSTEM /*why?*/, &color_surface_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target buffer memory\n");
+ exit(1);
+ }
+ printf("Allocated render target node: node=%08x\n", (uint32_t)color_surface_node);
+
+ viv_addr_t color_surface_physical = 0;
+ void *color_surface_logical = 0;
+ if(viv_lock_vidmem(conn, color_surface_node, &color_surface_physical, &color_surface_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target: phys=%08x log=%08x\n", (uint32_t)color_surface_physical, (uint32_t)color_surface_logical);
+
+ /* allocate tile status for main render target */
+ gcuVIDMEM_NODE_PTR color_status_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x800, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &color_status_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated render target tile status node: node=%08x\n", (uint32_t)color_status_node);
+
+ viv_addr_t color_status_physical = 0;
+ void *color_status_logical = 0;
+ if(viv_lock_vidmem(conn, color_status_node, &color_status_physical, &color_status_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target ts: phys=%08x log=%08x\n", (uint32_t)color_status_physical, (uint32_t)color_status_logical);
+
+ /* allocate depth for main render target */
+ gcuVIDMEM_NODE_PTR depth_surface_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x45000, 0x40, gcvSURF_DEPTH, gcvPOOL_DEFAULT, &depth_surface_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth node: node=%08x\n", (uint32_t)depth_surface_node);
+
+ viv_addr_t depth_surface_physical = 0;
+ void *depth_surface_logical = 0;
+ if(viv_lock_vidmem(conn, depth_surface_node, &depth_surface_physical, &depth_surface_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target memory\n");
+ exit(1);
+ }
+ printf("Locked depth target: phys=%08x log=%08x\n", (uint32_t)depth_surface_physical, (uint32_t)depth_surface_logical);
+
+ /* allocate depth ts for main render target */
+ gcuVIDMEM_NODE_PTR depth_status_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x500, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &depth_status_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth ts node: node=%08x\n", (uint32_t)depth_status_node);
+
+ viv_addr_t depth_status_physical = 0;
+ void *depth_status_logical = 0;
+ if(viv_lock_vidmem(conn, depth_status_node, &depth_status_physical, &depth_status_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target ts memory\n");
+ exit(1);
+ }
+ printf("Locked depth ts target: phys=%08x log=%08x\n", (uint32_t)depth_status_physical, (uint32_t)depth_status_logical);
+
+ /* allocate tile status for aux render target */
+ gcuVIDMEM_NODE_PTR rs_dest_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x70000, 0x40, gcvSURF_BITMAP, gcvPOOL_DEFAULT, &rs_dest_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating aux render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated aux render target tile status node: node=%08x\n", (uint32_t)rs_dest_node);
+
+ viv_addr_t rs_dest_physical = 0;
+ void *rs_dest_logical = 0;
+ if(viv_lock_vidmem(conn, rs_dest_node, &rs_dest_physical, &rs_dest_logical)!=0)
+ {
+ fprintf(stderr, "Error locking aux ts render target memory\n");
+ exit(1);
+ }
+ printf("Locked aux render target ts: phys=%08x log=%08x\n", (uint32_t)rs_dest_physical, (uint32_t)rs_dest_logical);
+
+ /* allocate vertex buffer */
+ gcuVIDMEM_NODE_PTR vtx_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x100000, 0x40, gcvSURF_VERTEX, gcvPOOL_DEFAULT, &vtx_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating vertex memory\n");
+ exit(1);
+ }
+ printf("Allocated vertex node: node=%08x\n", (uint32_t)vtx_node);
+
+ viv_addr_t vtx_physical = 0;
+ void *vtx_logical = 0;
+ if(viv_lock_vidmem(conn, vtx_node, &vtx_physical, &vtx_logical)!=0)
+ {
+ fprintf(stderr, "Error locking vertex memory\n");
+ exit(1);
+ }
+ printf("Locked vertex memory: phys=%08x log=%08x\n", (uint32_t)vtx_physical, (uint32_t)vtx_logical);
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ int dest_idx = 0;
+ int v_src_idx = 0;
+ int n_src_idx = 0;
+ int c_src_idx = 0;
+ for(int jj=0; jj<DRAW_COUNT; jj++)
+ {
+ for(int vert=0; vert<VERTICES_PER_DRAW*3; ++vert)
+ {
+ ((float*)vtx_logical)[dest_idx] = vVertices[v_src_idx];
+ dest_idx++;
+ v_src_idx++;
+ }
+ for(int vert=0; vert<VERTICES_PER_DRAW*3; ++vert)
+ {
+ ((float*)vtx_logical)[dest_idx] = vNormals[n_src_idx];
+ dest_idx++;
+ n_src_idx++;
+ }
+ for(int vert=0; vert<VERTICES_PER_DRAW*3; ++vert)
+ {
+ ((float*)vtx_logical)[dest_idx] = vColors[c_src_idx];
+ dest_idx++;
+ c_src_idx++;
+ }
+ }
+
+ /*
+ * for(int idx=0; idx<NUM_VERTICES*3*3; ++idx)
+ * {
+ * printf("%i %f\n", idx, ((float*)vtx_logical)[idx]);
+}*/
+
+ /* Load the command buffer and send the commit command. */
+ /* First build context state map */
+ size_t stateCount = 0x1d00;
+ uint32_t *contextMap = malloc(stateCount * 4);
+ memset(contextMap, 0, stateCount*4);
+ for(int idx=0; idx<sizeof(contextbuf_addr)/sizeof(address_index_t); ++idx)
+ {
+ contextMap[contextbuf_addr[idx].address / 4] = contextbuf_addr[idx].index;
+ }
+
+ struct _gcoCMDBUF commandBuffer = {
+ .object = {
+ .type = gcvOBJ_COMMANDBUFFER
+ },
+ //.os = (_gcoOS*)0xbf7488,
+ //.hardware = (_gcoHARDWARE*)0x402694e0,
+ .physical = (void*)buf0_physical,
+ .logical = (void*)buf0_logical,
+ .bytes = 0x20000,
+ .startOffset = 0x0,
+ //.offset = 0xac0,
+ //.free = 0x7520,
+ //.hintTable = (unsigned int*)0x0, // Used when gcdSECURE
+ //.hintIndex = (unsigned int*)0x58, // Used when gcdSECURE
+ //.hintCommit = (unsigned int*)0xffffffff // Used when gcdSECURE
+ };
+
+ gcsHAL_INTERFACE id = {};
+ id.command = gcvHAL_ATTACH;
+ if((viv_invoke(conn, &id)) != gcvSTATUS_OK)
+ {
+ #ifdef DEBUG
+ fprintf(stderr, "Error attaching to GPU\n");
+ #endif
+ exit(1);
+ }
+ else
+ {
+ fprintf(stderr, "gcvHAL_ATTACHed to GPU\n");
+ }
+ gckCONTEXT context = id.u.Attach.context;
+
+ commandBuffer.free = commandBuffer.bytes - 0x8; /* Always keep 0x8 at end of buffer for kernel driver */
+ /* Set addresses in first command buffer */
+ cmdbuf1[37] = cmdbuf1[87] = cmdbuf1[109] = color_status_physical;
+ cmdbuf1[38] = cmdbuf1[110] = cmdbuf1[213] = cmdbuf1[215] = color_surface_physical;
+ cmdbuf1[47] = depth_status_physical; //ADDR_J */ 0x500 gcvSURF_TILE_STATUS
+ cmdbuf1[48] = cmdbuf1[225] = cmdbuf1[227] = depth_surface_physical; //DDR_I */ 0x45000 gcvSURF_DEPTH
+ cmdbuf1[169] = vtx_physical;
+ cmdbuf1[170] = vtx_physical + 0x030;
+ cmdbuf1[171] = vtx_physical + 0x060;
+
+ cmdbuf1[413] = vtx_physical + 0x060;
+ cmdbuf1[414] = vtx_physical + 0x090;
+ cmdbuf1[415] = vtx_physical + 0x0c0;
+
+ cmdbuf1[435] = vtx_physical + 0x0c0;
+ cmdbuf1[436] = vtx_physical + 0x0f0;
+ cmdbuf1[437] = vtx_physical + 0x120;
+
+ cmdbuf1[457] = vtx_physical + 0x120;
+ cmdbuf1[458] = vtx_physical + 0x150;
+ cmdbuf1[459] = vtx_physical + 0x180;
+
+ cmdbuf1[479] = vtx_physical + 0x180;
+ cmdbuf1[480] = vtx_physical + 0x1b0;
+ cmdbuf1[481] = vtx_physical + 0x1e0;
+
+ cmdbuf1[501] = vtx_physical + 0x1e0;
+ cmdbuf1[502] = vtx_physical + 0x210;
+ cmdbuf1[503] = vtx_physical + 0x240;
+
+ /* Submit first command buffer */
+ commandBuffer.startOffset = 0;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf1, sizeof(cmdbuf1));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf1);
+ commandBuffer.free -= sizeof(cmdbuf1) + 0x08;
+ printf("[1] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing first command buffer\n");
+ exit(1);
+ }
+
+ /*
+ * What does it do? Can be skipped.
+ */
+ cmdbuf2[35] = color_surface_physical;
+ cmdbuf2[37] = color_surface_physical;
+ commandBuffer.startOffset = commandBuffer.offset + 0x08; /* Make space for LINK */
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf2, sizeof(cmdbuf2));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf2);
+ commandBuffer.free -= sizeof(cmdbuf2) + 0x08;
+
+ printf("[2] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing second command buffer\n");
+ exit(1);
+ }
+
+ /* Submit third command buffer - SWAP_RB=1 - swaps red and blue
+ **/
+ cmdbuf3[35] = color_surface_physical;
+ cmdbuf3[37] = rs_dest_physical;
+ commandBuffer.startOffset = commandBuffer.offset + 0x08;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf3, sizeof(cmdbuf3));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf3);
+ commandBuffer.free -= sizeof(cmdbuf3) + 0x08;
+ printf("[3] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing third command buffer\n");
+ exit(1);
+ }
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL (wait for pixel engine to finish) */
+ int sig_id = 0;
+ if(viv_user_signal_create(conn, 0, &sig_id) != 0) /* automatic resetting signal */
+ {
+ fprintf(stderr, "Cannot create user signal\n");
+ exit(1);
+ }
+ printf("Created user signal %i\n", sig_id);
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+
+ /* Allocate video memory for BITMAP, lock */
+ gcuVIDMEM_NODE_PTR bmp_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x5dc00, 0x40, gcvSURF_BITMAP, gcvPOOL_DEFAULT, &bmp_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating bitmap status memory\n");
+ exit(1);
+ }
+ printf("Allocated bitmap node: node=%08x\n", (uint32_t)bmp_node);
+
+ viv_addr_t bmp_physical = 0;
+ void *bmp_logical = 0;
+ if(viv_lock_vidmem(conn, bmp_node, &bmp_physical, &bmp_logical)!=0)
+ {
+ fprintf(stderr, "Error locking bmp memory\n");
+ exit(1);
+ }
+ memset(bmp_logical, 0xff, 0x5dc00); /* clear previous result */
+ printf("Locked bmp: phys=%08x log=%08x\n", (uint32_t)bmp_physical, (uint32_t)bmp_logical);
+
+ /* Submit fourth command buffer, updating context.
+ * Fourth command buffer copies render result to bitmap, detiling along the way.
+ */
+ /* color_surface_physical = cmdbuf2 or cmdbuf1 result, rs_dest_physical - cmdbuf3 result
+ * FIXME rs_dest_physical result is bad... why?
+ * turning off source tilling in cmdbuf4 helps but don't solve problem. */
+ cmdbuf4[0x19] = rs_dest_physical; //color_surface_physical rs_dest_physical
+ cmdbuf4[0x1b] = bmp_physical;
+ commandBuffer.startOffset = commandBuffer.offset + 0x08;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf4, sizeof(cmdbuf4));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf4);
+ commandBuffer.free -= sizeof(cmdbuf4) + 0x08;
+ printf("[4] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing fourth command buffer\n");
+ exit(1);
+ }
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL */
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+ bmp_dump32(bmp_logical, 400, 240, false, "/home/linaro/replay.bmp");
+ /* Unlock video memory */
+ if(viv_unlock_vidmem(conn, bmp_node, gcvSURF_BITMAP, 1) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+ /*
+ * for(int x=0; x<0x700; ++x)
+ * {
+ * uint32_t value = ((uint32_t*)rt_ts_logical)[x];
+ * printf("Sample ts: %x %08x\n", x*4, value);
+}*/
+ //printf("Contextbuffer used %i\n", *contextBuffer.inUse);
+
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/replay/cube_replay.png b/src/replay/cube_replay.png
new file mode 100644
index 0000000..5f773f0
--- /dev/null
+++ b/src/replay/cube_replay.png
Binary files differ
diff --git a/src/replay/debugscript.gdb b/src/replay/debugscript.gdb
new file mode 100644
index 0000000..05151ab
--- /dev/null
+++ b/src/replay/debugscript.gdb
@@ -0,0 +1,7 @@
+# Example gdb script for debugging remotely on Android device
+target remote 192.168.1.16:5050
+symbol-file ./etna_test
+break main
+cont
+sharedlibrary
+
diff --git a/src/replay/empty_screen_cmd.h b/src/replay/empty_screen_cmd.h
new file mode 100644
index 0000000..bc89cff
--- /dev/null
+++ b/src/replay/empty_screen_cmd.h
@@ -0,0 +1,234 @@
+uint32_t cmdbuf1[] = { /* empty_screen_gc2000 */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+
+ /* set up */
+ 0x08010e05, /* LOAD_STATE (1) Base: 0x03814 Size: 1 Fixp: 0 */
+ 0x00000001, /* [03814] GL.VERTEX_ELEMENT_CONFIG := 0x1 */
+ 0x08010380, /* LOAD_STATE (1) Base: 0x00E00 Size: 1 Fixp: 0 */
+ 0x00000001, /* [00E00] RA.CONTROL := UNK0=1,LAST_VARYING_2X=0 */
+ 0x0801028b, /* LOAD_STATE (1) Base: 0x00A2C Size: 1 Fixp: 0 */
+ 0x34000001, /* [00A2C] PA.W_CLIP_LIMIT := 0x34000001 */
+ 0x0801028a, /* LOAD_STATE (1) Base: 0x00A28 Size: 1 Fixp: 0 */
+ 0x00000011, /* [00A28] PA.SYSTEM_MODE := UNK0=1,UNK4=1 */
+ 0x08010e13, /* LOAD_STATE (1) Base: 0x0384C Size: 1 Fixp: 0 */
+ 0x00000000, /* [0384C] GL.API_MODE := OPENGL */
+ 0x08010306, /* LOAD_STATE (1) Base: 0x00C18 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C18] SE.CONFIG := LAST_PIXEL_ENABLE=0 */
+ 0x08010304, /* LOAD_STATE (1) Base: 0x00C10 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C10] SE.DEPTH_SCALE := 0.000000 */
+ 0x08010305, /* LOAD_STATE (1) Base: 0x00C14 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C14] SE.DEPTH_BIAS := 0.000000 */
+ 0x08010306, /* LOAD_STATE (1) Base: 0x00C18 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C18] SE.CONFIG := LAST_PIXEL_ENABLE=0 */
+ 0x08010304, /* LOAD_STATE (1) Base: 0x00C10 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C10] SE.DEPTH_SCALE := 0.000000 */
+ 0x08010305, /* LOAD_STATE (1) Base: 0x00C14 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C14] SE.DEPTH_BIAS := 0.000000 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* [0380C] GL.FLUSH_CACHE := DEPTH=0,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801ffff, /* LOAD_STATE (1) Base: 0x3FFFC Size: 1 Fixp: 0 */
+ 0x00000000, /* [3FFFC] DUMMY.DUMMY := 0x0 */
+ 0x0801059d, /* LOAD_STATE (1) Base: 0x01674 Size: 1 Fixp: 0 */
+ 0x00001cc0, /* [01674] TS.DEPTH_AUTO_DISABLE_COUNT := 0x1cc0 */
+ 0x08030596, /* LOAD_STATE (1) Base: 0x01658 Size: 3 Fixp: 0 */
+ 0x15973000, /* [01658] TS.COLOR_STATUS_BASE := ADDR_H */
+ 0x15900000, /* [0165C] TS.COLOR_SURFACE_BASE := ADDR_G */
+ 0x00000000, /* [01660] TS.COLOR_CLEAR_VALUE := 0x0 */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x00000022, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=0,COLOR_FAST_CLEAR=1,DEPTH_16BPP=0,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=1,DEPTH_COMPRESSION=0,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000001, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=0,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801ffff, /* LOAD_STATE (1) Base: 0x3FFFC Size: 1 Fixp: 0 */
+ 0x00000000, /* [3FFFC] DUMMY.DUMMY := 0x0 */
+ 0x08030599, /* LOAD_STATE (1) Base: 0x01664 Size: 3 Fixp: 0 */
+ 0x15973800, /* [01664] TS.DEPTH_STATUS_BASE := ADDR_J */
+ 0x15985000, /* [01668] TS.DEPTH_SURFACE_BASE := ADDR_I */
+ 0xffffffff, /* [0166C] TS.DEPTH_CLEAR_VALUE := 0xffffffff */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x0000006b, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=1,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=1,DEPTH_COMPRESSION=1,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08010304, /* LOAD_STATE (1) Base: 0x00C10 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C10] SE.DEPTH_SCALE := 0.000000 */
+ 0x08010305, /* LOAD_STATE (1) Base: 0x00C14 Size: 1 Fixp: 0 */
+ 0x00000000, /* [00C14] SE.DEPTH_BIAS := 0.000000 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01650] RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01650] RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010e02, /* LOAD_STATE (1) Base: 0x03808 Size: 1 Fixp: 0 */
+ 0x00000705, /* [03808] GL.SEMAPHORE_TOKEN := FROM=RA,TO=PE */
+ 0x08010f00, /* LOAD_STATE (1) Base: 0x03C00 Size: 1 Fixp: 0 */
+ 0x00000705, /* [03C00] GL.STALL_TOKEN := FROM=RA,TO=PE,FLIP0=0,FLIP1=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00000606, /* [01604] RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,DOWNSAMPLE_X=0,DOWNSAMPLE_Y=0,SOURCE_TILED=0,DEST_FORMAT=A8R8G8B8,DEST_TILED=0,SWAP_RB=0,FLIP=0 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* [01630] RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* [01634] RS.DITHER[1] := 0xffffffff */
+ 0x00000000, /* PAD */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x15973000, /* [01610] RS.DEST_ADDR := ADDR_H */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000200, /* [01614] RS.DEST_STRIDE := STRIDE=0x200,MULTI=0,TILING=0 */
+ 0x08010590, /* LOAD_STATE (1) Base: 0x01640 Size: 1 Fixp: 0 */
+ 0x55555555, /* [01640] RS.FILL_VALUE[0] := 0x55555555 */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x0001ffff, /* [0163C] RS.CLEAR_CONTROL := BITS=0xffff,MODE=ENABLED1 */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* [016A0] RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00040080, /* [01620] RS.WINDOW_SIZE := HEIGHT=4,WIDTH=128 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbadabeeb, /* [01600] RS.KICKER := 0xbadabeeb */
+ 0x08010598, /* LOAD_STATE (1) Base: 0x01660 Size: 1 Fixp: 0 */
+ 0xffff00ff, /* [01660] TS.COLOR_CLEAR_VALUE := 0xffff00ff */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* [0380C] GL.FLUSH_CACHE := DEPTH=0,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801ffff, /* LOAD_STATE (1) Base: 0x3FFFC Size: 1 Fixp: 0 */
+ 0x00000000, /* [3FFFC] DUMMY.DUMMY := 0x0 */
+ 0x0801059d, /* LOAD_STATE (1) Base: 0x01674 Size: 1 Fixp: 0 */
+ 0x00001cc0, /* [01674] TS.DEPTH_AUTO_DISABLE_COUNT := 0x1cc0 */
+ 0x08030596, /* LOAD_STATE (1) Base: 0x01658 Size: 3 Fixp: 0 */
+ 0x15973000, /* [01658] TS.COLOR_STATUS_BASE := ADDR_H */
+ 0x15900000, /* [0165C] TS.COLOR_SURFACE_BASE := ADDR_G */
+ 0xffff00ff, /* [01660] TS.COLOR_CLEAR_VALUE := 0xffff00ff */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x0000006b, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=1,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=1,DEPTH_COMPRESSION=1,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00004686, /* [01604] RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,DOWNSAMPLE_X=0,DOWNSAMPLE_Y=0,SOURCE_TILED=1,DEST_FORMAT=A8R8G8B8,DEST_TILED=1,SWAP_RB=0,FLIP=0 */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x80001c00, /* [0160C] RS.SOURCE_STRIDE := STRIDE=0x1c00,MULTI=0,TILING=1 */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x80001c00, /* [01614] RS.DEST_STRIDE := STRIDE=0x1c00,MULTI=0,TILING=1 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* [01630] RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* [01634] RS.DITHER[1] := 0xffffffff */
+ 0x010001c0, /* PAD */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* [0163C] RS.CLEAR_CONTROL := BITS=0x0,MODE=DISABLED */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* [016A0] RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x15900000, /* [01608] RS.SOURCE_ADDR := ADDR_G */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x15900000, /* [01610] RS.DEST_ADDR := ADDR_G */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x010001c0, /* [01620] RS.WINDOW_SIZE := HEIGHT=256,WIDTH=448 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbadabeeb /* [01600] RS.KICKER := 0xbadabeeb */
+};
+
+uint32_t cmdbuf2[] = { /* seq 101 */
+ 0x08010e03, /* PAD */
+ 0x00000003, /* PAD */
+ 0x08010594, /* PAD */
+ 0x00000001, /* PAD */
+ 0x08010e03, /* PAD */
+ 0x00000001, /* PAD */
+ 0x0801ffff, /* PAD */
+ 0x00000000, /* PAD */
+ 0x08010594, /* LOAD_STATE (1) Base: 0x01650 Size: 1 Fixp: 0 */
+ 0x00000001, /* [01650] RS.FLUSH_CACHE := FLUSH=1 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000002, /* [0380C] GL.FLUSH_CACHE := DEPTH=0,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x0801ffff, /* LOAD_STATE (1) Base: 0x3FFFC Size: 1 Fixp: 0 */
+ 0x00000000, /* [3FFFC] DUMMY.DUMMY := 0x0 */
+ 0x08010595, /* LOAD_STATE (1) Base: 0x01654 Size: 1 Fixp: 0 */
+ 0x00000049, /* [01654] TS.MEM_CONFIG := DEPTH_FAST_CLEAR=1,COLOR_FAST_CLEAR=0,DEPTH_16BPP=1,DEPTH_AUTO_DISABLE=0,COLOR_AUTO_DISABLE=0,DEPTH_COMPRESSION=1,MSAA=0,MSAA_FORMAT=A4R4G4B4,HDEPTH=0x0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* [0380C] GL.FLUSH_CACHE := DEPTH=1,COLOR=1,TEXTURE=0,PE2D=0,TEXTUREVS=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x20000686, /* [01604] RS.CONFIG := SOURCE_FORMAT=A8R8G8B8,DOWNSAMPLE_X=0,DOWNSAMPLE_Y=0,SOURCE_TILED=1,DEST_FORMAT=A8R8G8B8,DEST_TILED=0,SWAP_RB=1,FLIP=0 */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x80001c00, /* [0160C] RS.SOURCE_STRIDE := STRIDE=0x1c00,MULTI=0,TILING=1 */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000700, /* [01614] RS.DEST_STRIDE := STRIDE=0x700,MULTI=0,TILING=0 */
+ 0x0802058c, /* LOAD_STATE (1) Base: 0x01630 Size: 2 Fixp: 0 */
+ 0xffffffff, /* [01630] RS.DITHER[0] := 0xffffffff */
+ 0xffffffff, /* [01634] RS.DITHER[1] := 0xffffffff */
+ 0x00000000, /* PAD */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* [0163C] RS.CLEAR_CONTROL := BITS=0x0,MODE=DISABLED */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* [016A0] RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x15900000, /* [01608] RS.SOURCE_ADDR := ADDR_G */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x15a27c00, /* [01610] RS.DEST_ADDR := ADDR_L */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x010001c0, /* [01620] RS.WINDOW_SIZE := HEIGHT=256,WIDTH=448 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbadabeeb /* [01600] RS.KICKER := 0xbadabeeb */
+};
+
+uint32_t cmdbuf3[] = { /* seq 101 */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+ 0x00000000, /* PAD */
+
+ /* copy pixels from render target to output bitmap */
+ 0x08010e03, /* LOAD_STATE (1) Base: 0x0380C Size: 1 Fixp: 0 */
+ 0x00000003, /* GLOBAL.FLUSH_CACHE := DEPTH=1,COLOR=1,3D_TEXTURE=0,2D=0,UNK4=0,SHADER_L1=0,SHADER_L2=0 */
+ 0x08010581, /* LOAD_STATE (1) Base: 0x01604 Size: 1 Fixp: 0 */
+ 0x00000585, /* RS.CONFIG := SOURCE_FORMAT=X8R8G8B8,UNK7=1,DEST_FORMAT=X8R8G8B8,UNK14=0,SWAP_RB=0 */
+ 0x08010583, /* LOAD_STATE (1) Base: 0x0160C Size: 1 Fixp: 0 */
+ 0x80001c00, /* RS.SOURCE_STRIDE := 0x80001c00 */
+ 0x08010585, /* LOAD_STATE (1) Base: 0x01614 Size: 1 Fixp: 0 */
+ 0x00000640, /* RS.DEST_STRIDE := 0x640 */
+ 0x0801058c, /* LOAD_STATE (1) Base: 0x01630 Size: 1 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[0] := 0xffffffff */
+ 0x0801058d, /* LOAD_STATE (1) Base: 0x01634 Size: 1 Fixp: 0 */
+ 0xffffffff, /* RS.DITHER[1] := 0xffffffff */
+ 0x0801058f, /* LOAD_STATE (1) Base: 0x0163C Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.CLEAR_CONTROL := BITS=0x0,MODE=0x0 */
+ 0x080105a8, /* LOAD_STATE (1) Base: 0x016A0 Size: 1 Fixp: 0 */
+ 0x00000000, /* RS.EXTRA_CONFIG := AA=0x0,ENDIAN=NO_SWAP */
+ 0x08010582, /* LOAD_STATE (1) Base: 0x01608 Size: 1 Fixp: 0 */
+ 0x7f2c8700, /* RS.SOURCE_ADDR := *rt_physical */
+ 0x08010584, /* LOAD_STATE (1) Base: 0x01610 Size: 1 Fixp: 0 */
+ 0x7f338700, /* RS.DEST_ADDR := *bmp_physical */
+ 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */
+ 0x00f00190, /* RS.WINDOW_SIZE := HEIGHT=240,WIDTH=400 */
+ 0x08010580, /* LOAD_STATE (1) Base: 0x01600 Size: 1 Fixp: 0 */
+ 0xbeebbeeb /* RS.KICKER := 0xbeebbeeb */
+}; \ No newline at end of file
diff --git a/src/replay/empty_screen_gc2000.c b/src/replay/empty_screen_gc2000.c
new file mode 100644
index 0000000..333c633
--- /dev/null
+++ b/src/replay/empty_screen_gc2000.c
@@ -0,0 +1,305 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include "write_bmp.h"
+#include "viv_raw.h"
+
+#include "empty_screen_cmd.h"
+#include "etnaviv/etna.h"
+/* TODO: should actually update context as we go,
+ a context switch would currently revert state and likely result in corrupted rendering.
+ */
+#include "context_cmd.h"
+
+
+//#define COMPONENTS_PER_VERTEX (3)
+//#define NUM_VERTICES (6*4)
+
+int main(int argc, char **argv)
+{
+ int rv;
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+ viv_show_chip_info(conn);
+
+ /* allocate command buffer (blob uses four command buffers, but we don't even fill one) */
+ viv_addr_t buf0_physical = 0;
+ void *buf0_logical = 0;
+ if(viv_alloc_contiguous(conn, 0x20000, &buf0_physical, &buf0_logical, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating host memory\n");
+ exit(1);
+ }
+ printf("Allocated buffer: phys=%08x log=%08x\n", (uint32_t)buf0_physical, (uint32_t)buf0_logical);
+
+ /* allocate main render target */
+ gcuVIDMEM_NODE_PTR color_surface_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x73000, 0x40, gcvSURF_RENDER_TARGET, gcvPOOL_SYSTEM /*why?*/, &color_surface_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target buffer memory\n");
+ exit(1);
+ }
+ printf("Allocated render target node: node=%08x\n", (uint32_t)color_surface_node);
+
+ viv_addr_t color_surface_physical = 0;
+ void *color_surface_logical = 0;
+ if(viv_lock_vidmem(conn, color_surface_node, &color_surface_physical, &color_surface_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target: phys=%08x log=%08x\n", (uint32_t)color_surface_physical, (uint32_t)color_surface_logical);
+
+ /* allocate tile status for main render target */
+ gcuVIDMEM_NODE_PTR color_status_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x800, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &color_status_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated render target tile status node: node=%08x\n", (uint32_t)color_status_node);
+
+ viv_addr_t color_status_physical = 0;
+ void *color_status_logical = 0;
+ if(viv_lock_vidmem(conn, color_status_node, &color_status_physical, &color_status_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target ts: phys=%08x log=%08x\n", (uint32_t)color_status_physical, (uint32_t)color_status_logical);
+
+ /* allocate depth for main render target */
+ gcuVIDMEM_NODE_PTR depth_surface_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x45000, 0x40, gcvSURF_DEPTH, gcvPOOL_DEFAULT, &depth_surface_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth node: node=%08x\n", (uint32_t)depth_surface_node);
+
+ viv_addr_t depth_surface_physical = 0;
+ void *depth_surface_logical = 0;
+ if(viv_lock_vidmem(conn, depth_surface_node, &depth_surface_physical, &depth_surface_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target memory\n");
+ exit(1);
+ }
+ printf("Locked depth target: phys=%08x log=%08x\n", (uint32_t)depth_surface_physical, (uint32_t)depth_surface_logical);
+
+ /* allocate depth ts for main render target */
+ gcuVIDMEM_NODE_PTR depth_status_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x500, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &depth_status_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth ts node: node=%08x\n", (uint32_t)depth_status_node);
+
+ viv_addr_t depth_status_physical = 0;
+ void *depth_status_logical = 0;
+ if(viv_lock_vidmem(conn, depth_status_node, &depth_status_physical, &depth_status_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target ts memory\n");
+ exit(1);
+ }
+ printf("Locked depth ts target: phys=%08x log=%08x\n", (uint32_t)depth_status_physical, (uint32_t)depth_status_logical);
+
+ /* allocate tile status for aux render target */
+ gcuVIDMEM_NODE_PTR rs_dest_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x70000, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &rs_dest_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating aux render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated aux render target tile status node: node=%08x\n", (uint32_t)rs_dest_node);
+
+ viv_addr_t rs_dest_physical = 0;
+ void *rs_dest_logical = 0;
+ if(viv_lock_vidmem(conn, rs_dest_node, &rs_dest_physical, &rs_dest_logical)!=0)
+ {
+ fprintf(stderr, "Error locking aux ts render target memory\n");
+ exit(1);
+ }
+ printf("Locked aux render target ts: phys=%08x log=%08x\n", (uint32_t)rs_dest_physical, (uint32_t)rs_dest_logical);
+
+
+ struct _gcoCMDBUF commandBuffer = {
+ .object = {
+ .type = gcvOBJ_COMMANDBUFFER
+ },
+ //.os = (_gcoOS*)0xbf7488,
+ //.hardware = (_gcoHARDWARE*)0x402694e0,
+ .physical = (void*)buf0_physical,
+ .logical = (void*)buf0_logical,
+ .bytes = 0x20000,
+ .startOffset = 0x0,
+ //.offset = 0xac0,
+ //.free = 0x7520,
+ //.hintTable = (unsigned int*)0x0, // Used when gcdSECURE
+ //.hintIndex = (unsigned int*)0x58, // Used when gcdSECURE
+ //.hintCommit = (unsigned int*)0xffffffff // Used when gcdSECURE
+ };
+
+ //(struct viv_conn *conn, gckCONTEXT *vctx)
+ gcsHAL_INTERFACE id = {};
+ id.command = gcvHAL_ATTACH;
+ if((viv_invoke(conn, &id)) != gcvSTATUS_OK)
+ {
+ #ifdef DEBUG
+ fprintf(stderr, "Error attaching to GPU\n");
+ #endif
+ return ETNA_INTERNAL_ERROR;
+ }
+ else
+ {
+ fprintf(stderr, "gcvHAL_ATTACHed to GPU\n");
+ }
+ gckCONTEXT context = id.u.Attach.context;
+
+ /* Set addresses in first command buffer */
+ commandBuffer.free = commandBuffer.bytes - 0x8; /* Always keep 0x8 at end of buffer for kernel driver */
+ cmdbuf1[37] = cmdbuf1[87] = cmdbuf1[109] = color_status_physical; //ADDR_H */ 0x800 gcvSURF_TILE_STATUS
+ cmdbuf1[38] = cmdbuf1[110] = cmdbuf1[141] = cmdbuf1[143] = color_surface_physical; //ADDR_G */ 0x73000 gcvSURF_RENDER_TARGET
+ cmdbuf1[47] = depth_status_physical; //ADDR_J */ 0x500 gcvSURF_TILE_STATUS
+ cmdbuf1[48] = depth_surface_physical; //DDR_I */ 0x45000 gcvSURF_DEPTH
+ cmdbuf1[111] = 0xffff0000; // color ABGR - second command buffer swaps red and blue
+
+ /* Submit first command buffer */
+ commandBuffer.startOffset = 0;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf1, sizeof(cmdbuf1));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf1);
+ commandBuffer.free -= sizeof(cmdbuf1) + 0x18;
+ printf("[1] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing first command buffer\n");
+ exit(1);
+ }
+ else
+ {
+ fprintf(stderr, "Committed first command buffer\n");
+ }
+
+
+ /*Second command buffer - SWAP_RB=1 - swaps red and blue*/
+ cmdbuf2[35] = color_surface_physical;
+ cmdbuf2[37] = rs_dest_physical;
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf2, sizeof(cmdbuf2));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf2);
+ commandBuffer.free -= sizeof(cmdbuf2) + 0x18;
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing second command buffer\n");
+ exit(1);
+ }
+ else
+ {
+ fprintf(stderr, "Committed second command buffer\n");
+ }
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL (wait for pixel engine to finish) */
+ int sig_id = 0;
+ if(viv_user_signal_create(conn, 0, &sig_id) != 0) /* automatic resetting signal */
+ {
+ fprintf(stderr, "Cannot create user signal\n");
+ exit(1);
+ }
+ printf("Created user signal %i\n", sig_id);
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+
+ /* Allocate video memory for BITMAP, lock */
+ gcuVIDMEM_NODE_PTR bmp_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x70000, 0x40, gcvSURF_BITMAP, gcvPOOL_DEFAULT, &bmp_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating bitmap status memory\n");
+ exit(1);
+ }
+ printf("Allocated bitmap node: node=%08x\n", (uint32_t)bmp_node);
+
+ viv_addr_t bmp_physical = 0;
+ void *bmp_logical = 0;
+ if(viv_lock_vidmem(conn, bmp_node, &bmp_physical, &bmp_logical)!=0)
+ {
+ fprintf(stderr, "Error locking bmp memory\n");
+ exit(1);
+ }
+ memset(bmp_logical, 0xff, 0x5dc00); /* clear previous result */
+ printf("Locked bmp: phys=%08x log=%08x\n", (uint32_t)bmp_physical, (uint32_t)bmp_logical);
+
+
+ /* Submit third command buffer, updating context.
+ * Fourth command buffer copies render result to bitmap, detiling along the way.
+ */
+ //color_surface_physical - first commandBuffer result, rs_dest_physical - second commandBuffer;
+ cmdbuf3[0x19] = rs_dest_physical;
+ cmdbuf3[0x1b] = bmp_physical;
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ memcpy((void*)((size_t)commandBuffer.logical + commandBuffer.startOffset), cmdbuf3, sizeof(cmdbuf3));
+ commandBuffer.offset = commandBuffer.startOffset + sizeof(cmdbuf3);
+ commandBuffer.free -= sizeof(cmdbuf3) + 0x18;
+ printf("[4] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, context) != 0)
+ {
+ fprintf(stderr, "Error committing fourth command buffer\n");
+ exit(1);
+ }
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL */
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+ bmp_dump32(bmp_logical, 400, 240, false, "/home/linaro/replay.bmp");
+ /* Unlock video memory */
+ if(viv_unlock_vidmem(conn, bmp_node, gcvSURF_BITMAP, 1) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+ /*
+ for(int x=0; x<0x700; ++x)
+ {
+ uint32_t value = ((uint32_t*)rt_ts_logical)[x];
+ printf("Sample ts: %x %08x\n", x*4, value);
+ }*/
+// printf("Contextbuffer used %i\n", *contextBuffer.inUse);
+
+ viv_close(conn);
+ return 0;
+}
+
diff --git a/src/replay/etna_test.c b/src/replay/etna_test.c
new file mode 100644
index 0000000..9278b97
--- /dev/null
+++ b/src/replay/etna_test.c
@@ -0,0 +1,484 @@
+/* shader playground using etna_* functions, similar to ps_sandbox_etna
+ *
+ * more high-level command-buffer building with synchronization
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/etna_rs.h>
+#include "write_bmp.h"
+
+#include "esTransform.h"
+
+float vVertices[] = {
+ -1.0f, -1.0f, +0.0f,
+ +1.0f, -1.0f, +0.0f,
+ -1.0f, +1.0f, +0.0f,
+ +1.0f, +1.0f, +0.0f,
+};
+
+float vTexCoords[] = {
+ +0.0f, +0.0f,
+ +1.0f, +0.0f,
+ +0.0f, +1.0f,
+ +1.0f, +1.0f,
+};
+
+#define VERTEX_BUFFER_SIZE 0x60000
+#define NUM_VERTICES (4)
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 256;
+ int padded_width = etna_align_up(width, 64);
+ int padded_height = etna_align_up(height, 64);
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ struct etna_vidmem *rt = 0; /* main render target */
+ struct etna_vidmem *rt_ts = 0; /* tile status for main render target */
+ struct etna_vidmem *z = 0; /* depth for main render target */
+ struct etna_vidmem *z_ts = 0; /* depth ts for main render target */
+ struct etna_vidmem *vtx = 0; /* vertex buffer */
+ struct etna_vidmem *aux_rt = 0; /* auxilary render target */
+ struct etna_vidmem *aux_rt_ts = 0; /* tile status for auxilary render target */
+ struct etna_vidmem *bmp = 0; /* bitmap */
+
+ size_t rt_size = padded_width * padded_height * 4;
+ size_t rt_ts_size = etna_align_up((padded_width * padded_height * 4)/0x100, 0x100);
+ size_t z_size = padded_width * padded_height * 2;
+ size_t z_ts_size = etna_align_up((padded_width * padded_height * 2)/0x100, 0x100);
+ size_t bmp_size = width * height * 4;
+
+ if(etna_vidmem_alloc_linear(conn, &rt, rt_size, VIV_SURF_RENDER_TARGET, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &rt_ts, rt_ts_size, VIV_SURF_TILE_STATUS, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z, z_size, VIV_SURF_DEPTH, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &z_ts, z_ts_size, VIV_SURF_TILE_STATUS, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &vtx, VERTEX_BUFFER_SIZE, VIV_SURF_VERTEX, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &aux_rt, 0x4000, VIV_SURF_RENDER_TARGET, VIV_POOL_SYSTEM, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &aux_rt_ts, 0x100, VIV_SURF_TILE_STATUS, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &bmp, bmp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK
+ )
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int dest_idx = vert * (3 + 2);
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx->logical)[dest_idx+comp+0] = vVertices[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<2; ++comp)
+ ((float*)vtx->logical)[dest_idx+comp+3] = vTexCoords[vert*2 + comp]; /* 1 */
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* Now load the shader itself */
+ uint32_t vs[] = {
+ 0x02001001, 0x2a800800, 0x00000000, 0x003fc008,
+ 0x02001003, 0x2a800800, 0x00000040, 0x00000002,
+ };
+ uint32_t vs_size = sizeof(vs);
+ uint32_t *ps;
+ uint32_t ps_size;
+ if(argc < 2)
+ {
+ perror("provide shader on command line");
+ exit(1);
+ }
+ int fd = open(argv[1], O_RDONLY);
+ if(fd == -1)
+ {
+ perror("opening shader");
+ exit(1);
+ }
+ ps_size = lseek(fd, 0, SEEK_END);
+ ps = malloc(ps_size);
+ lseek(fd, 0, SEEK_SET);
+ if(ps_size == 0 || ps_size>8192 || read(fd, ps, ps_size) != ps_size)
+ {
+ perror("empty or unreadable shader");
+ exit(1);
+ }
+ close(fd);
+
+ /* XXX how important is the ordering? I suppose we could group states (except the flushes, kickers, semaphores etc)
+ * and simply submit them at once. Especially for consecutive states and masked stated this could be a big win
+ * in DMA command buffer size. */
+ /* Build first command buffer */
+ etna_set_state(ctx, VIVS_GL_VERTEX_ELEMENT_CONFIG, 0x1);
+ etna_set_state(ctx, VIVS_RA_CONTROL, 0x1);
+
+ etna_set_state(ctx, VIVS_PA_W_CLIP_LIMIT, 0x34000001);
+ etna_set_state(ctx, VIVS_PA_SYSTEM_MODE, 0x11);
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_UNK22, 0));
+ etna_set_state(ctx, VIVS_SE_CONFIG, 0x0);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+
+ /* Set up pixel engine */
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT,
+ ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 0));
+ etna_set_state(ctx, VIVS_PE_ALPHA_CONFIG,
+ ETNA_MASKED_BIT(VIVS_PE_ALPHA_CONFIG_BLEND_ENABLE_COLOR, 0) &
+ ETNA_MASKED_BIT(VIVS_PE_ALPHA_CONFIG_BLEND_SEPARATE_ALPHA, 0) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR, BLEND_FUNC_ONE) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA, BLEND_FUNC_ONE) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR, BLEND_FUNC_ZERO) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA, BLEND_FUNC_ZERO) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_EQ_COLOR, BLEND_EQ_ADD) &
+ ETNA_MASKED(VIVS_PE_ALPHA_CONFIG_EQ_ALPHA, BLEND_EQ_ADD));
+ etna_set_state(ctx, VIVS_PE_ALPHA_BLEND_COLOR,
+ VIVS_PE_ALPHA_BLEND_COLOR_B(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_G(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_R(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_A(0));
+
+ etna_set_state(ctx, VIVS_PE_ALPHA_OP, ETNA_MASKED_BIT(VIVS_PE_ALPHA_OP_ALPHA_TEST, 0));
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_CULL_FACE_MODE, OFF));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(ctx, VIVS_PE_STENCIL_CONFIG, ETNA_MASKED(VIVS_PE_STENCIL_CONFIG_REF_FRONT, 0) &
+ ETNA_MASKED(VIVS_PE_STENCIL_CONFIG_MASK_FRONT, 0xff) &
+ ETNA_MASKED(VIVS_PE_STENCIL_CONFIG_WRITE_MASK, 0xff));
+ etna_set_state(ctx, VIVS_PE_STENCIL_OP, ETNA_MASKED(VIVS_PE_STENCIL_OP_FUNC_FRONT, COMPARE_FUNC_ALWAYS) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_FUNC_BACK, COMPARE_FUNC_ALWAYS) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_FAIL_FRONT, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_FAIL_BACK, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_PASS_FRONT, STENCIL_OP_KEEP) &
+ ETNA_MASKED(VIVS_PE_STENCIL_OP_PASS_BACK, STENCIL_OP_KEEP));
+
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT, ETNA_MASKED(VIVS_PE_COLOR_FORMAT_COMPONENTS, 0xf));
+
+ etna_set_state(ctx, VIVS_SE_DEPTH_SCALE, 0x0);
+ etna_set_state(ctx, VIVS_SE_DEPTH_BIAS, 0x0);
+
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_FILL_MODE, SOLID));
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_SHADE_MODEL, SMOOTH));
+
+ /* Set up render target */
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT,
+ ETNA_MASKED(VIVS_PE_COLOR_FORMAT_FORMAT, RS_FORMAT_A8R8G8B8) &
+ ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_SUPER_TILED, 1));
+
+ for(int frame=0; frame<1; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+ etna_set_state(ctx, VIVS_PE_COLOR_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_PE_COLOR_STRIDE, padded_width * 4);
+ etna_set_state(ctx, VIVS_GL_MULTI_SAMPLE_CONFIG,
+ ETNA_MASKED_INL(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES, NONE) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES, 0xf) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12, 0x0) &
+ ETNA_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16, 0x0)
+ );
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT, ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 1));
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_TS_COLOR_CLEAR_VALUE, 0);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG, VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR); /* ADDR_A */
+
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG,
+ ETNA_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT, D16) &
+ ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_SUPER_TILED, 1)
+ );
+ etna_set_state(ctx, VIVS_PE_DEPTH_ADDR, z->address); /* ADDR_C */
+ etna_set_state(ctx, VIVS_PE_DEPTH_STRIDE, padded_width * 2);
+ etna_set_state(ctx, VIVS_PE_STENCIL_CONFIG, ETNA_MASKED_INL(VIVS_PE_STENCIL_CONFIG_MODE, DISABLED));
+ etna_set_state(ctx, VIVS_PE_HDEPTH_CONTROL, VIVS_PE_HDEPTH_CONTROL_FORMAT_DISABLED);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(ctx, VIVS_TS_DEPTH_CLEAR_VALUE, 0xffffffff);
+ etna_set_state(ctx, VIVS_TS_DEPTH_STATUS_BASE, z_ts->address); /* ADDR_D */
+ etna_set_state(ctx, VIVS_TS_DEPTH_SURFACE_BASE, z->address); /* ADDR_C */
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 1)); /* flip-flopping once again */
+
+ /* Warm up RS on aux render target */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+
+ /* Phew, now that's one hell of a setup; the serious rendering starts now */
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+
+ /* ... or so we thought */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+
+ /* maybe now? */
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ /* nope, not really... */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+
+ etna_stall(ctx, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
+
+ /* Set up the resolve to clear tile status for main render target
+ * What the blob does is regard the TS as an image of width N, height 4, with 4 bytes per pixel
+ * Looks like the height always stays the same. I don't think it matters as long as the entire memory are is covered.
+ * XXX need to clear the depth ts too.
+ * */
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_A8R8G8B8)
+ );
+ etna_set_state_multi(ctx, VIVS_RS_DITHER(0), 2, (uint32_t[]){0xffffffff, 0xffffffff});
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, 0x100); /* 0x100 iso 0x40! seems it uses a width of 256 if width divisible by 256, XXX need to figure out these rules */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(rt_ts_size/0x100) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(64));
+ etna_set_state(ctx, VIVS_RS_FILL_VALUE(0), 0x55555555);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL,
+ VIVS_RS_CLEAR_CONTROL_MODE_ENABLED1 |
+ VIVS_RS_CLEAR_CONTROL_BITS(0xffff));
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_KICKER,
+ 0xbeebbeeb);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_CLEAR_VALUE, 0xff7f7f7f);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_TS_COLOR_CLEAR_VALUE, 0xff7f7f7f);
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ //etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_INL(VIVS_PA_CONFIG_CULL_FACE_MODE, CCW));
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_MODE, NONE));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED(VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC, COMPARE_FUNC_ALWAYS));
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_MODE, Z));
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NEAR, 0.0);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_FAR, 1.0);
+ etna_set_state_f32(ctx, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+
+ /* set up primitive assembly */
+ etna_set_state_f32(ctx, VIVS_PA_VIEWPORT_OFFSET_Z, 0.0);
+ etna_set_state_f32(ctx, VIVS_PA_VIEWPORT_SCALE_Z, 1.0);
+ etna_set_state(ctx, VIVS_PE_DEPTH_CONFIG, ETNA_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_ONLY_DEPTH, 0));
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_OFFSET_X, width << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_OFFSET_Y, height << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_SCALE_X, width << 15);
+ etna_set_state_fixp(ctx, VIVS_PA_VIEWPORT_SCALE_Y, height << 15);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_LEFT, 0);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_TOP, 0);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_RIGHT, (width << 16) | 5);
+ etna_set_state_fixp(ctx, VIVS_SE_SCISSOR_BOTTOM, (height << 16) | 5);
+
+ /* shader setup */
+ etna_set_state(ctx, VIVS_VS_END_PC, vs_size/16);
+ etna_set_state_multi(ctx, VIVS_VS_INPUT_COUNT, 3, (uint32_t[]){
+ /* VIVS_VS_INPUT_COUNT */ (1<<8) | 2,
+ /* VIVS_VS_TEMP_REGISTER_CONTROL */ VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS(2),
+ /* VIVS_VS_OUTPUT(0) */ 0x100});
+ etna_set_state(ctx, VIVS_VS_START_PC, 0x0);
+ etna_set_state_f32(ctx, VIVS_VS_UNIFORMS(0), 0.5); /* u0.x */
+
+ etna_set_state_multi(ctx, VIVS_VS_INST_MEM(0), vs_size/4, vs);
+ etna_set_state(ctx, VIVS_RA_CONTROL, 0x3); /* huh, this is 1 for the cubes */
+ etna_set_state_multi(ctx, VIVS_PS_END_PC, 2, (uint32_t[]){
+ /* VIVS_PS_END_PC */ ps_size/16,
+ /* VIVS_PS_OUTPUT_REG */ 0x1});
+ etna_set_state(ctx, VIVS_PS_START_PC, 0x0);
+ etna_set_state(ctx, VIVS_PA_SHADER_ATTRIBUTES(0), 0x200);
+ etna_set_state(ctx, VIVS_GL_VARYING_NUM_COMPONENTS, /* one varying, with two components */
+ VIVS_GL_VARYING_NUM_COMPONENTS_VAR0(2)
+ );
+ etna_set_state_multi(ctx, VIVS_GL_VARYING_COMPONENT_USE(0), 2, (uint32_t[]){ /* one varying, with four components */
+ VIVS_GL_VARYING_COMPONENT_USE_COMP0(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP1(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP2(VARYING_COMPONENT_USE_UNUSED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP3(VARYING_COMPONENT_USE_UNUSED)
+ , 0
+ });
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(0), 0.0); /* u0.x */
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(1), 1.0); /* u0.y */
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(2), 0.5); /* u0.z */
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(3), 2.0); /* u0.w */
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(4), 1/256.0); /* u1.x */
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(5), 16.0); /* u1.y */
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(6), 10.0); /* u1.z */
+ etna_set_state_f32(ctx, VIVS_PS_UNIFORMS(8), frame); /* u2.x */
+
+ etna_set_state_multi(ctx, VIVS_PS_INST_MEM(0), ps_size/4, ps);
+ etna_set_state(ctx, VIVS_PS_INPUT_COUNT, (31<<8)|2);
+ etna_set_state(ctx, VIVS_PS_TEMP_REGISTER_CONTROL,
+ VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS(4));
+ etna_set_state(ctx, VIVS_PS_CONTROL,
+ VIVS_PS_CONTROL_UNK1
+ );
+ etna_set_state(ctx, VIVS_PA_ATTRIBUTE_ELEMENT_COUNT, 0x100);
+ etna_set_state(ctx, VIVS_GL_VARYING_TOTAL_COMPONENTS, /* one varying, with two components, must be
+ changed together with GL_VARYING_NUM_COMPONENTS */
+ VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM(2)
+ );
+ etna_set_state(ctx, VIVS_VS_LOAD_BALANCING, 0xf3f0582);
+ etna_set_state(ctx, VIVS_VS_OUTPUT_COUNT, 2);
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_POINT_SIZE_ENABLE, 0));
+
+ etna_set_state(ctx, VIVS_FE_VERTEX_STREAM_BASE_ADDR, vtx->address); /* ADDR_E */
+ etna_set_state(ctx, VIVS_FE_VERTEX_STREAM_CONTROL,
+ VIVS_FE_VERTEX_STREAM_CONTROL_VERTEX_STRIDE(0x14));
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(0),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN(ENDIAN_MODE_NO_SWAP) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM(0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM(3) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_START(0x0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_END(0xc));
+ etna_set_state(ctx, VIVS_FE_VERTEX_ELEMENT_CONFIG(1),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN(ENDIAN_MODE_NO_SWAP) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NONCONSECUTIVE |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM(0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM(2) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_START(0xc) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_END(0x14));
+ etna_set_state(ctx, VIVS_VS_INPUT(0), 0x00100); /* 0x20000 in etna_cube */
+ etna_set_state(ctx, VIVS_PA_CONFIG, ETNA_MASKED_BIT(VIVS_PA_CONFIG_POINT_SPRITE_ENABLE, 0));
+ etna_draw_primitives(ctx, PRIMITIVE_TYPE_TRIANGLE_STRIP, 0, 2);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ /* Submit first command buffer */
+ etna_flush(ctx);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_DEST_TILED);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | VIVS_RS_SOURCE_STRIDE_TILING);
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, (padded_width * 4 * 4) | VIVS_RS_DEST_STRIDE_TILING);
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG, 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(padded_height) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(padded_width));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+
+ /* Submit second command buffer */
+ etna_flush(ctx);
+
+ etna_warm_up_rs(ctx, aux_rt->address, aux_rt_ts->address);
+
+ etna_set_state(ctx, VIVS_TS_COLOR_STATUS_BASE, rt_ts->address); /* ADDR_B */
+ etna_set_state(ctx, VIVS_TS_COLOR_SURFACE_BASE, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(ctx, VIVS_PE_COLOR_FORMAT,
+ ETNA_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 0));
+
+ /* Submit third command buffer, wait for pixel engine to finish */
+ etna_finish(ctx);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(ctx, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_A8R8G8B8) /*|
+ VIVS_RS_CONFIG_SWAP_RB*/);
+ etna_set_state(ctx, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | VIVS_RS_SOURCE_STRIDE_TILING);
+ etna_set_state(ctx, VIVS_RS_DEST_STRIDE, width * 4);
+ etna_set_state(ctx, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(ctx, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(ctx, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(ctx, VIVS_RS_SOURCE_ADDR, rt->address); /* ADDR_A */
+ etna_set_state(ctx, VIVS_RS_DEST_ADDR, bmp->address); /* ADDR_J */
+ etna_set_state(ctx, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(height) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(width));
+ etna_set_state(ctx, VIVS_RS_KICKER, 0xbeebbeeb);
+
+ etna_finish(ctx);
+ }
+
+ if(argc>2)
+ {
+ printf("Dumping image to %s\n", argv[2]);
+ bmp_dump32(bmp->logical, width, height, true, argv[2]);
+ }
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/replay/exec_replay.sh b/src/replay/exec_replay.sh
new file mode 100755
index 0000000..f64c22b
--- /dev/null
+++ b/src/replay/exec_replay.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+# Build, upload, execute egl2 on device and fetch data log
+DEMO=$1
+if [ -z "$DEMO" ]; then
+ echo "Defaulting to cube"
+ DEMO="cube"
+fi
+IMAGE_OUT="/mnt/sdcard/replay.bmp"
+if [[ "$DEMO" == "ps_sandbox_etna" || "$DEMO" == "etna_test" ]]; then
+ ARG="/data/mine/shader.bin"
+ ../../tools/asm.py --isa-file ../../rnndb/isa.xml sandbox.asm -o shader.bin
+ [ $? -ne 0 ] && exit
+ adb push shader.bin ${ARG}
+fi
+make ${DEMO}
+[ $? -ne 0 ] && exit
+
+adb push ${DEMO} /data/mine
+adb shell "/data/mine/${DEMO} ${ARG} ${IMAGE_OUT}"
+#adb pull /mnt/sdcard/egl2.fdr .
+adb pull ${IMAGE_OUT} .
diff --git a/src/replay/ps_sandbox_etna.c b/src/replay/ps_sandbox_etna.c
new file mode 100644
index 0000000..aa551d0
--- /dev/null
+++ b/src/replay/ps_sandbox_etna.c
@@ -0,0 +1,933 @@
+/* build and submit low-level command buffer to test shader instructions
+ *
+ * see etna_test for a more high-level approach using etna_flush / etna_finish instead of manually
+ * submitting the command buffers one by one
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_3d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include "viv_raw.h"
+#include "write_bmp.h"
+#include "esTransform.h"
+
+/* Print generated command buffer */
+//#define CMD_DEBUG
+//#define CMD_COMPARE
+
+/* TODO: should actually update context as we go,
+ a context switch would currently revert state and likely result in corrupted rendering.
+ */
+#include "context_cmd.h"
+
+float vVertices[] = {
+ -1.0f, -1.0f, +0.0f,
+ +1.0f, -1.0f, +0.0f,
+ -1.0f, +1.0f, +0.0f,
+ +1.0f, +1.0f, +0.0f,
+};
+
+float vTexCoords[] = {
+ +0.0f, +0.0f,
+ +1.0f, +0.0f,
+ +0.0f, +1.0f,
+ +1.0f, +1.0f,
+};
+
+#define NUM_VERTICES (4)
+
+#ifdef CMD_COMPARE
+char is_padding[0x8000 / 4];
+#endif
+
+/* macro for MASKED() (multiple can be &ed) */
+#define VIV_MASKED(NAME, VALUE) (~(NAME ## _MASK | NAME ## __MASK) | ((VALUE)<<(NAME ## __SHIFT)))
+/* for boolean bits */
+#define VIV_MASKED_BIT(NAME, VALUE) (~(NAME ## _MASK | NAME) | ((VALUE) ? NAME : 0))
+/* for inline enum bit fields
+ * XXX in principle headergen could simply generate these fields prepackaged
+ */
+#define VIV_MASKED_INL(NAME, VALUE) (~(NAME ## _MASK | NAME ## __MASK) | (NAME ## _ ## VALUE))
+
+/* XXX store state changes
+ * group consecutive states
+ * make LOAD_STATE commands, add to current command buffer
+ */
+inline void etna_set_state(gcoCMDBUF commandBuffer, uint32_t address, uint32_t value)
+{
+#ifdef CMD_DEBUG
+ printf("%05x := %08x\n", address, value);
+#endif
+ uint32_t *tgt = (uint32_t*)((size_t)commandBuffer->logical + commandBuffer->offset);
+ tgt[0] = VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE |
+ VIV_FE_LOAD_STATE_HEADER_COUNT(1) |
+ VIV_FE_LOAD_STATE_HEADER_OFFSET(address >> 2);
+ tgt[1] = value;
+ commandBuffer->offset += 8;
+}
+
+/* this can be inlined, though would likely be even faster to return a pointer and let the client write to
+ * the buffer directly */
+inline void etna_set_state_multi(gcoCMDBUF commandBuffer, uint32_t base, uint32_t num, uint32_t *values)
+{
+ uint32_t *tgt = (uint32_t*)((size_t)commandBuffer->logical + commandBuffer->offset);
+ tgt[0] = VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE |
+ VIV_FE_LOAD_STATE_HEADER_COUNT(num & 0x3ff) |
+ VIV_FE_LOAD_STATE_HEADER_OFFSET(base >> 2);
+#ifdef CMD_DEBUG
+ for(uint32_t idx=0; idx<num; ++idx)
+ {
+ printf("%05x := %08x\n", base, values[idx]);
+ base += 4;
+ }
+#endif
+ memcpy(&tgt[1], values, 4*num);
+ commandBuffer->offset += 4 + num*4;
+ if(commandBuffer->offset & 4) /* PAD */
+ {
+#ifdef CMD_COMPARE
+ is_padding[commandBuffer->offset / 4] = 1;
+#endif
+ commandBuffer->offset += 4;
+ }
+}
+inline void etna_set_state_f32(gcoCMDBUF commandBuffer, uint32_t address, float value)
+{
+ union {
+ uint32_t i32;
+ float f32;
+ } x = { .f32 = value };
+ etna_set_state(commandBuffer, address, x.i32);
+}
+inline void etna_set_state_fixp(gcoCMDBUF commandBuffer, uint32_t address, uint32_t value)
+{
+#ifdef CMD_DEBUG
+ printf("%05x := %08x (fixp)\n", address, value);
+#endif
+ uint32_t *tgt = (uint32_t*)((size_t)commandBuffer->logical + commandBuffer->offset);
+ tgt[0] = VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE |
+ VIV_FE_LOAD_STATE_HEADER_COUNT(1) |
+ VIV_FE_LOAD_STATE_HEADER_FIXP |
+ VIV_FE_LOAD_STATE_HEADER_OFFSET(address >> 2);
+ tgt[1] = value;
+ commandBuffer->offset += 8;
+}
+inline void etna_draw_primitives(gcoCMDBUF cmdPtr, uint32_t primitive_type, uint32_t start, uint32_t count)
+{
+#ifdef CMD_DEBUG
+ printf("draw_primitives %08x %08x %08x %08x\n",
+ VIV_FE_DRAW_PRIMITIVES_HEADER_OP_DRAW_PRIMITIVES,
+ primitive_type, start, count);
+#endif
+ uint32_t *tgt = (uint32_t*)((size_t)cmdPtr->logical + cmdPtr->offset);
+ tgt[0] = VIV_FE_DRAW_PRIMITIVES_HEADER_OP_DRAW_PRIMITIVES;
+ tgt[1] = primitive_type;
+ tgt[2] = start;
+ tgt[3] = count;
+ cmdPtr->offset += 16;
+}
+
+/* warm up RS on aux render target */
+void etna_warm_up_rs(gcoCMDBUF cmdPtr, viv_addr_t aux_rt_physical, viv_addr_t aux_rt_ts_physical)
+{
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, aux_rt_ts_physical); /* ADDR_G */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_SURFACE_BASE, aux_rt_physical); /* ADDR_F */
+ etna_set_state(cmdPtr, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH);
+ etna_set_state(cmdPtr, VIVS_RS_CONFIG, /* wut? */
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_R5G6B5) |
+ VIVS_RS_CONFIG_DEST_TILED);
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_ADDR, aux_rt_physical); /* ADDR_F */
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_STRIDE, 0x400);
+ etna_set_state(cmdPtr, VIVS_RS_DEST_ADDR, aux_rt_physical); /* ADDR_F */
+ etna_set_state(cmdPtr, VIVS_RS_DEST_STRIDE, 0x400);
+ etna_set_state(cmdPtr, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(4) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(16));
+ etna_set_state(cmdPtr, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(cmdPtr, VIVS_RS_KICKER, 0xbeebbeeb);
+}
+
+#ifdef CMD_COMPARE
+int cmdbuffer_compare(gcoCMDBUF cmdPtr, uint32_t *cmdbuf, uint32_t cmdbuf_size)
+{
+ /* Count differences between generated and stored command buffer */
+ int diff = 0;
+ for(int idx=8; idx<cmdbuf_size/4; ++idx)
+ {
+ uint32_t cmdbuf_word = cmdbuf[idx];
+ uint32_t my_word = *(uint32_t*)((size_t)cmdPtr->logical + cmdPtr->startOffset + idx*4);
+ printf("/*%03x*/ %08x ref:%08x ", idx, my_word, cmdbuf_word);
+ if(is_padding[cmdPtr->startOffset/4 + idx])
+ {
+ printf("PAD");
+ } else if(cmdbuf_word != my_word)
+ {
+ diff += 1;
+ printf("DIFF");
+ }
+ printf("\n");
+ }
+ printf("Number of differences: %i\n", diff);
+ uint32_t size_cmd = cmdbuf_size/4;
+ uint32_t size_my = (cmdPtr->offset - cmdPtr->startOffset)/4;
+ printf("Sizes: %i %i\n", size_cmd, size_my);
+ return diff != 0 || size_cmd != size_my;
+}
+#endif
+
+inline uint32_t align_up(uint32_t value, uint32_t granularity)
+{
+ return (value + (granularity-1)) & (~(granularity-1));
+}
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 256;
+ int padded_width = align_up(width, 64);
+ int padded_height = align_up(height, 64);
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ /* allocate command buffer (blob uses four command buffers, but we don't even fill one) */
+ viv_addr_t buf0_physical = 0;
+ void *buf0_logical = 0;
+ if(viv_alloc_contiguous(conn, 0x8000, &buf0_physical, &buf0_logical, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating host memory\n");
+ exit(1);
+ }
+ printf("Allocated buffer: phys=%08x log=%08x\n", (uint32_t)buf0_physical, (uint32_t)buf0_logical);
+
+ /* allocate main render target */
+ gcuVIDMEM_NODE_PTR rt_node = 0;
+ if(viv_alloc_linear_vidmem(conn, padded_width * padded_height * 4, 0x40, gcvSURF_RENDER_TARGET, gcvPOOL_DEFAULT, &rt_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target buffer memory\n");
+ exit(1);
+ }
+ printf("Allocated render target node: node=%08x\n", (uint32_t)rt_node);
+
+ viv_addr_t rt_physical = 0; /* ADDR_A */
+ void *rt_logical = 0;
+ if(viv_lock_vidmem(conn, rt_node, &rt_physical, &rt_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target: phys=%08x log=%08x\n", (uint32_t)rt_physical, (uint32_t)rt_logical);
+ memset(rt_logical, 0xff, padded_width * padded_height * 4); /* clear previous result just in case, test that clearing works */
+
+ /* allocate tile status for main render target */
+ gcuVIDMEM_NODE_PTR rt_ts_node = 0;
+ uint32_t rt_ts_size = align_up((padded_width * padded_height * 4)/0x100, 0x100);
+ if(viv_alloc_linear_vidmem(conn, rt_ts_size, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &rt_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated render target tile status node: node=%08x size=%08x\n", (uint32_t)rt_ts_node, rt_ts_size);
+
+ viv_addr_t rt_ts_physical = 0; /* ADDR_B */
+ void *rt_ts_logical = 0;
+ if(viv_lock_vidmem(conn, rt_ts_node, &rt_ts_physical, &rt_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking render target memory\n");
+ exit(1);
+ }
+ printf("Locked render target ts: phys=%08x log=%08x\n", (uint32_t)rt_ts_physical, (uint32_t)rt_ts_logical);
+
+ /* allocate depth for main render target */
+ gcuVIDMEM_NODE_PTR z_node = 0;
+ if(viv_alloc_linear_vidmem(conn, padded_width * padded_height * 2, 0x40, gcvSURF_DEPTH, gcvPOOL_DEFAULT, &z_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth node: node=%08x\n", (uint32_t)z_node);
+
+ viv_addr_t z_physical = 0; /* ADDR_C */
+ void *z_logical = 0;
+ if(viv_lock_vidmem(conn, z_node, &z_physical, &z_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target memory\n");
+ exit(1);
+ }
+ printf("Locked depth target: phys=%08x log=%08x\n", (uint32_t)z_physical, (uint32_t)z_logical);
+
+ /* allocate depth ts for main render target */
+ gcuVIDMEM_NODE_PTR z_ts_node = 0;
+ uint32_t z_ts_size = align_up((padded_width * padded_height * 2)/0x100, 0x100);
+ if(viv_alloc_linear_vidmem(conn, z_ts_size, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &z_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating depth memory\n");
+ exit(1);
+ }
+ printf("Allocated depth ts node: node=%08x size=%08x\n", (uint32_t)z_ts_node, z_ts_size);
+
+ viv_addr_t z_ts_physical = 0; /* ADDR_D */
+ void *z_ts_logical = 0;
+ if(viv_lock_vidmem(conn, z_ts_node, &z_ts_physical, &z_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking depth target ts memory\n");
+ exit(1);
+ }
+ printf("Locked depth ts target: phys=%08x log=%08x\n", (uint32_t)z_ts_physical, (uint32_t)z_ts_logical);
+
+ /* allocate vertex buffer */
+ gcuVIDMEM_NODE_PTR vtx_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x60000, 0x40, gcvSURF_VERTEX, gcvPOOL_DEFAULT, &vtx_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating vertex memory\n");
+ exit(1);
+ }
+ printf("Allocated vertex node: node=%08x\n", (uint32_t)vtx_node);
+
+ viv_addr_t vtx_physical = 0; /* ADDR_E */
+ void *vtx_logical = 0;
+ if(viv_lock_vidmem(conn, vtx_node, &vtx_physical, &vtx_logical)!=0)
+ {
+ fprintf(stderr, "Error locking vertex memory\n");
+ exit(1);
+ }
+ printf("Locked vertex memory: phys=%08x log=%08x\n", (uint32_t)vtx_physical, (uint32_t)vtx_logical);
+
+ /* allocate aux render target */
+ gcuVIDMEM_NODE_PTR aux_rt_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x4000, 0x40, gcvSURF_RENDER_TARGET, gcvPOOL_SYSTEM /*why?*/, &aux_rt_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating aux render target buffer memory\n");
+ exit(1);
+ }
+ printf("Allocated aux render target node: node=%08x\n", (uint32_t)aux_rt_node);
+
+ viv_addr_t aux_rt_physical = 0; /* ADDR_F */
+ void *aux_rt_logical = 0;
+ if(viv_lock_vidmem(conn, aux_rt_node, &aux_rt_physical, &aux_rt_logical)!=0)
+ {
+ fprintf(stderr, "Error locking aux render target memory\n");
+ exit(1);
+ }
+ printf("Locked aux render target: phys=%08x log=%08x\n", (uint32_t)aux_rt_physical, (uint32_t)aux_rt_logical);
+
+ /* allocate tile status for aux render target */
+ gcuVIDMEM_NODE_PTR aux_rt_ts_node = 0;
+ if(viv_alloc_linear_vidmem(conn, 0x100, 0x40, gcvSURF_TILE_STATUS, gcvPOOL_DEFAULT, &aux_rt_ts_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating aux render target tile status memory\n");
+ exit(1);
+ }
+ printf("Allocated aux render target tile status node: node=%08x\n", (uint32_t)aux_rt_ts_node);
+
+ viv_addr_t aux_rt_ts_physical = 0; /* ADDR_G */
+ void *aux_rt_ts_logical = 0;
+ if(viv_lock_vidmem(conn, aux_rt_ts_node, &aux_rt_ts_physical, &aux_rt_ts_logical)!=0)
+ {
+ fprintf(stderr, "Error locking aux ts render target memory\n");
+ exit(1);
+ }
+ printf("Locked aux render target ts: phys=%08x log=%08x\n", (uint32_t)aux_rt_ts_physical, (uint32_t)aux_rt_ts_logical);
+
+ /* Phew, now we got all the memory we need.
+ * Write interleaved attribute vertex stream.
+ * Unlike the GL example we only do this once, not every time glDrawArrays is called, the same would be accomplished
+ * from GL by using a vertex buffer object.
+ */
+ for(int vert=0; vert<NUM_VERTICES; ++vert)
+ {
+ int dest_idx = vert * (3 + 2);
+ for(int comp=0; comp<3; ++comp)
+ ((float*)vtx_logical)[dest_idx+comp+0] = vVertices[vert*3 + comp]; /* 0 */
+ for(int comp=0; comp<2; ++comp)
+ ((float*)vtx_logical)[dest_idx+comp+3] = vTexCoords[vert*2 + comp]; /* 1 */
+ }
+ /*
+ for(int idx=0; idx<NUM_VERTICES*3*3; ++idx)
+ {
+ printf("%i %f\n", idx, ((float*)vtx_logical)[idx]);
+ }*/
+
+ /* Load the command buffer and send the commit command. */
+ /* First build context state map */
+ size_t stateCount = 0x1d00;
+ uint32_t *contextMap = malloc(stateCount * 4);
+ memset(contextMap, 0, stateCount*4);
+ for(int idx=0; idx<sizeof(contextbuf_addr)/sizeof(address_index_t); ++idx)
+ {
+ contextMap[contextbuf_addr[idx].address / 4] = contextbuf_addr[idx].index;
+ }
+
+ struct _gcoCMDBUF commandBuffer = {
+ .object = {
+ .type = gcvOBJ_COMMANDBUFFER
+ },
+ //.os = (_gcoOS*)0xbf7488,
+ //.hardware = (_gcoHARDWARE*)0x402694e0,
+ .physical = (void*)buf0_physical,
+ .logical = (void*)buf0_logical,
+ .bytes = 0x8000,
+ .startOffset = 0x0,
+ };
+ struct _gcoCONTEXT contextBuffer = {
+ .object = {
+ .type = gcvOBJ_CONTEXT
+ },
+ .id = 0x0, // Actual ID will be returned here
+ .map = contextMap,
+ .stateCount = stateCount,
+ .buffer = contextbuf,
+ .pipe3DIndex = 0x2d6, // XXX should not be hardcoded
+ .pipe2DIndex = 0x106e,
+ .linkIndex = 0x1076,
+ .inUseIndex = 0x1078,
+ .bufferSize = 0x41e4,
+ .bytes = 0x0, // Number of bytes at physical, logical
+ .physical = (void*)0x0,
+ .logical = (void*)0x0,
+ .link = (void*)0x0, // Logical address of link
+ .initialPipe = 0x1,
+ .entryPipe = 0x0,
+ .currentPipe = 0x0,
+ .postCommit = 1,
+ .inUse = (int*)0x0, // Logical address of inUse
+ .lastAddress = 0xffffffff, // Not used by kernel
+ .lastSize = 0x2, // Not used by kernel
+ .lastIndex = 0x106a, // Not used by kernel
+ .lastFixed = 0, // Not used by kernel
+ };
+ struct _gcoCMDBUF *cmdPtr = &commandBuffer;
+
+ commandBuffer.free = commandBuffer.bytes - 0x8; /* Always keep 0x8 at end of buffer for kernel driver */
+ commandBuffer.startOffset = 0;
+ commandBuffer.offset = commandBuffer.startOffset + 8*4;
+#ifdef CMD_COMPARE
+ memset(is_padding, 0, 0x8000/4); /* keep track of what words in the command buffer are padding; just for debugging / comparing */
+#endif
+
+ /* XXX how important is the ordering? I suppose we could group states (except the flushes, kickers, semaphores etc)
+ * and simply submit them at once. Especially for consecutive states and masked stated this could be a big win
+ * in DMA command buffer size. */
+
+ /* Build first command buffer */
+ etna_set_state(cmdPtr, VIVS_GL_VERTEX_ELEMENT_CONFIG, 0x1);
+ etna_set_state(cmdPtr, VIVS_RA_CONTROL, 0x1);
+
+ etna_set_state(cmdPtr, VIVS_PA_W_CLIP_LIMIT, 0x34000001);
+ etna_set_state(cmdPtr, VIVS_PA_SYSTEM_MODE, 0x11);
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_BIT(VIVS_PA_CONFIG_UNK22, 0));
+ etna_set_state(cmdPtr, VIVS_SE_CONFIG, 0x0);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_FORMAT,
+ VIV_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 0));
+ etna_set_state(cmdPtr, VIVS_PE_ALPHA_CONFIG, /* can & all these together */
+ VIV_MASKED_BIT(VIVS_PE_ALPHA_CONFIG_BLEND_ENABLE_COLOR, 0) &
+ VIV_MASKED_BIT(VIVS_PE_ALPHA_CONFIG_BLEND_SEPARATE_ALPHA, 0));
+ etna_set_state(cmdPtr, VIVS_PE_ALPHA_CONFIG,
+ VIV_MASKED(VIVS_PE_ALPHA_CONFIG_SRC_FUNC_COLOR, BLEND_FUNC_ONE) &
+ VIV_MASKED(VIVS_PE_ALPHA_CONFIG_SRC_FUNC_ALPHA, BLEND_FUNC_ONE));
+ etna_set_state(cmdPtr, VIVS_PE_ALPHA_CONFIG,
+ VIV_MASKED(VIVS_PE_ALPHA_CONFIG_DST_FUNC_COLOR, BLEND_FUNC_ZERO) &
+ VIV_MASKED(VIVS_PE_ALPHA_CONFIG_DST_FUNC_ALPHA, BLEND_FUNC_ZERO));
+ etna_set_state(cmdPtr, VIVS_PE_ALPHA_CONFIG,
+ VIV_MASKED(VIVS_PE_ALPHA_CONFIG_EQ_COLOR, BLEND_EQ_ADD) &
+ VIV_MASKED(VIVS_PE_ALPHA_CONFIG_EQ_ALPHA, BLEND_EQ_ADD));
+ etna_set_state(cmdPtr, VIVS_PE_ALPHA_BLEND_COLOR,
+ VIVS_PE_ALPHA_BLEND_COLOR_B(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_G(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_R(0) |
+ VIVS_PE_ALPHA_BLEND_COLOR_A(0));
+
+ etna_set_state(cmdPtr, VIVS_PE_ALPHA_OP, VIV_MASKED_BIT(VIVS_PE_ALPHA_OP_ALPHA_TEST, 0));
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_INL(VIVS_PA_CONFIG_CULL_FACE_MODE, OFF));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_CONFIG, VIV_MASKED(VIVS_PE_STENCIL_CONFIG_REF_FRONT, 0));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_FUNC_FRONT, COMPARE_FUNC_ALWAYS));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_FUNC_BACK, COMPARE_FUNC_ALWAYS));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_CONFIG, VIV_MASKED(VIVS_PE_STENCIL_CONFIG_MASK_FRONT, 0xff));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_CONFIG, VIV_MASKED(VIVS_PE_STENCIL_CONFIG_WRITE_MASK, 0xff));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_FAIL_FRONT, STENCIL_OP_KEEP));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_FAIL_BACK, STENCIL_OP_KEEP));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT, STENCIL_OP_KEEP));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK, STENCIL_OP_KEEP));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_PASS_FRONT, STENCIL_OP_KEEP));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_OP, VIV_MASKED(VIVS_PE_STENCIL_OP_PASS_BACK, STENCIL_OP_KEEP));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_FORMAT, VIV_MASKED(VIVS_PE_COLOR_FORMAT_COMPONENTS, 0xf));
+
+ etna_set_state(cmdPtr, VIVS_SE_DEPTH_SCALE, 0x0);
+ etna_set_state(cmdPtr, VIVS_SE_DEPTH_BIAS, 0x0);
+
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_INL(VIVS_PA_CONFIG_FILL_MODE, SOLID));
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_INL(VIVS_PA_CONFIG_SHADE_MODEL, SMOOTH));
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_FORMAT,
+ VIV_MASKED(VIVS_PE_COLOR_FORMAT_FORMAT, RS_FORMAT_A8R8G8B8) &
+ VIV_MASKED_BIT(VIVS_PE_COLOR_FORMAT_SUPER_TILED, 1));
+
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_ADDR, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_STRIDE, padded_width * 4);
+ etna_set_state(cmdPtr, VIVS_GL_MULTI_SAMPLE_CONFIG,
+ VIV_MASKED_INL(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES, NONE) &
+ VIV_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_ENABLES, 0xf) &
+ VIV_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK12, 0x0) &
+ VIV_MASKED(VIVS_GL_MULTI_SAMPLE_CONFIG_UNK16, 0x0)
+ );
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_FORMAT, VIV_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 1));
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_CLEAR_VALUE, 0);
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, rt_ts_physical); /* ADDR_B */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_SURFACE_BASE, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_TS_MEM_CONFIG, VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR); /* ADDR_A */
+
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG,
+ VIV_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_FORMAT, D16) &
+ VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_SUPER_TILED, 1)
+ );
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_ADDR, z_physical); /* ADDR_C */
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_STRIDE, padded_width * 2);
+ etna_set_state(cmdPtr, VIVS_PE_STENCIL_CONFIG, VIV_MASKED_INL(VIVS_PE_STENCIL_CONFIG_MODE, DISABLED));
+ etna_set_state(cmdPtr, VIVS_PE_HDEPTH_CONTROL, VIVS_PE_HDEPTH_CONTROL_FORMAT_DISABLED);
+ etna_set_state_f32(cmdPtr, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 0));
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(cmdPtr, VIVS_TS_DEPTH_CLEAR_VALUE, 0xffffffff);
+ etna_set_state(cmdPtr, VIVS_TS_DEPTH_STATUS_BASE, z_ts_physical); /* ADDR_D */
+ etna_set_state(cmdPtr, VIVS_TS_DEPTH_SURFACE_BASE, z_physical); /* ADDR_C */
+ etna_set_state(cmdPtr, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_EARLY_Z, 1)); /* flip-flopping once again */
+
+ /* Warm up RS on aux render target */
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(cmdPtr, aux_rt_physical, aux_rt_ts_physical);
+
+ /* Phew, now that's one hell of a setup; the serious rendering starts now */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, rt_ts_physical); /* ADDR_B */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_SURFACE_BASE, rt_physical); /* ADDR_A */
+
+ /* ... or so we thought */
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(cmdPtr, aux_rt_physical, aux_rt_ts_physical);
+
+ /* maybe now? */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, rt_ts_physical); /* ADDR_B */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_SURFACE_BASE, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ /* nope, not really... */
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_warm_up_rs(cmdPtr, aux_rt_physical, aux_rt_ts_physical);
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, rt_ts_physical); /* ADDR_B */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_SURFACE_BASE, rt_physical); /* ADDR_A */
+
+ /* semaphore time */
+ etna_set_state(cmdPtr, VIVS_GL_SEMAPHORE_TOKEN,
+ VIVS_GL_SEMAPHORE_TOKEN_FROM(SYNC_RECIPIENT_RA)|
+ VIVS_GL_SEMAPHORE_TOKEN_TO(SYNC_RECIPIENT_PE)
+ );
+ etna_set_state(cmdPtr, VIVS_GL_STALL_TOKEN,
+ VIVS_GL_STALL_TOKEN_FROM(SYNC_RECIPIENT_RA)|
+ VIVS_GL_STALL_TOKEN_TO(SYNC_RECIPIENT_PE)
+ );
+
+ /* Set up the resolve to clear tile status for main render target
+ * What the blob does is regard the TS as an image of width N, height 4, with 4 bytes per pixel
+ * Looks like the height always stays the same. I don't think it matters as long as the entire memory are is covered.
+ * XXX need to clear the depth ts too.
+ * */
+ etna_set_state(cmdPtr, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_A8R8G8B8)
+ );
+ etna_set_state_multi(cmdPtr, VIVS_RS_DITHER(0), 2, (uint32_t[]){0xffffffff, 0xffffffff});
+ etna_set_state(cmdPtr, VIVS_RS_DEST_ADDR, rt_ts_physical); /* ADDR_B */
+ etna_set_state(cmdPtr, VIVS_RS_DEST_STRIDE, 0x100); /* 0x100 iso 0x40! seems it uses a width of 256 if width divisible by 256 */
+ etna_set_state(cmdPtr, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(rt_ts_size/0x100) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(64));
+ etna_set_state(cmdPtr, VIVS_RS_FILL_VALUE(0), 0x55555555);
+ etna_set_state(cmdPtr, VIVS_RS_CLEAR_CONTROL,
+ VIVS_RS_CLEAR_CONTROL_MODE_ENABLED1 |
+ VIVS_RS_CLEAR_CONTROL_BITS(0xffff));
+ etna_set_state(cmdPtr, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(cmdPtr, VIVS_RS_KICKER,
+ 0xbeebbeeb);
+
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_CLEAR_VALUE, 0xff7f7f7f);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_CLEAR_VALUE, 0xff7f7f7f);
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, rt_ts_physical); /* ADDR_B */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_SURFACE_BASE, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ //etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_INL(VIVS_PA_CONFIG_CULL_FACE_MODE, CCW));
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_MODE, NONE));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE, 0));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED(VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC, COMPARE_FUNC_ALWAYS));
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_INL(VIVS_PE_DEPTH_CONFIG_DEPTH_MODE, Z));
+ etna_set_state_f32(cmdPtr, VIVS_PE_DEPTH_NEAR, 0.0);
+ etna_set_state_f32(cmdPtr, VIVS_PE_DEPTH_FAR, 1.0);
+ etna_set_state_f32(cmdPtr, VIVS_PE_DEPTH_NORMALIZE, 65535.0);
+
+ /* set up primitive assembly */
+ etna_set_state_f32(cmdPtr, VIVS_PA_VIEWPORT_OFFSET_Z, 0.0);
+ etna_set_state_f32(cmdPtr, VIVS_PA_VIEWPORT_SCALE_Z, 1.0);
+ etna_set_state(cmdPtr, VIVS_PE_DEPTH_CONFIG, VIV_MASKED_BIT(VIVS_PE_DEPTH_CONFIG_ONLY_DEPTH, 0));
+ etna_set_state_fixp(cmdPtr, VIVS_PA_VIEWPORT_OFFSET_X, width << 15);
+ etna_set_state_fixp(cmdPtr, VIVS_PA_VIEWPORT_OFFSET_Y, height << 15);
+ etna_set_state_fixp(cmdPtr, VIVS_PA_VIEWPORT_SCALE_X, width << 15);
+ etna_set_state_fixp(cmdPtr, VIVS_PA_VIEWPORT_SCALE_Y, height << 15);
+ etna_set_state_fixp(cmdPtr, VIVS_SE_SCISSOR_LEFT, 0);
+ etna_set_state_fixp(cmdPtr, VIVS_SE_SCISSOR_TOP, 0);
+ etna_set_state_fixp(cmdPtr, VIVS_SE_SCISSOR_RIGHT, (width << 16) | 5);
+ etna_set_state_fixp(cmdPtr, VIVS_SE_SCISSOR_BOTTOM, (height << 16) | 5);
+
+ /* Now load the shader itself */
+ uint32_t vs[] = {
+ 0x02001001, 0x2a800800, 0x00000000, 0x003fc008,
+ 0x02001003, 0x2a800800, 0x00000040, 0x00000002,
+ };
+ uint32_t vs_size = sizeof(vs);
+ uint32_t *ps;
+ uint32_t ps_size;
+ if(argc < 2)
+ {
+ perror("provide shader on command line");
+ exit(1);
+ }
+ int fd = open(argv[1], O_RDONLY);
+ if(fd == -1)
+ {
+ perror("opening shader");
+ exit(1);
+ }
+ ps_size = lseek(fd, 0, SEEK_END);
+ ps = malloc(ps_size);
+ lseek(fd, 0, SEEK_SET);
+ if(ps_size == 0 || read(fd, ps, ps_size) != ps_size)
+ {
+ perror("empty or unreadable shader");
+ exit(1);
+ }
+ close(fd);
+
+ /* shader setup */
+ etna_set_state(cmdPtr, VIVS_VS_END_PC, vs_size/16);
+ etna_set_state_multi(cmdPtr, VIVS_VS_INPUT_COUNT, 3, (uint32_t[]){
+ /* VIVS_VS_INPUT_COUNT */ (1<<8) | 2,
+ /* VIVS_VS_TEMP_REGISTER_CONTROL */ VIVS_VS_TEMP_REGISTER_CONTROL_NUM_TEMPS(2),
+ /* VIVS_VS_OUTPUT(0) */ 0x100});
+ etna_set_state(cmdPtr, VIVS_VS_START_PC, 0x0);
+ etna_set_state_f32(cmdPtr, VIVS_VS_UNIFORMS(0), 0.5); /* u0.x */
+
+ etna_set_state_multi(cmdPtr, VIVS_VS_INST_MEM(0), vs_size/4, vs);
+ etna_set_state(cmdPtr, VIVS_RA_CONTROL, 0x3); /* huh, this is 1 for the cubes */
+ etna_set_state_multi(cmdPtr, VIVS_PS_END_PC, 2, (uint32_t[]){
+ /* VIVS_PS_END_PC */ ps_size/16,
+ /* VIVS_PS_OUTPUT_REG */ 0x1});
+ etna_set_state(cmdPtr, VIVS_PS_START_PC, 0x0);
+ etna_set_state(cmdPtr, VIVS_PA_SHADER_ATTRIBUTES(0), 0x200);
+ etna_set_state(cmdPtr, VIVS_GL_VARYING_NUM_COMPONENTS, /* one varying, with four components */
+ VIVS_GL_VARYING_NUM_COMPONENTS_VAR0(2)
+ );
+ etna_set_state_multi(cmdPtr, VIVS_GL_VARYING_COMPONENT_USE(0), 2, (uint32_t[]){ /* one varying, with four components */
+ VIVS_GL_VARYING_COMPONENT_USE_COMP0(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP1(VARYING_COMPONENT_USE_USED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP2(VARYING_COMPONENT_USE_UNUSED) |
+ VIVS_GL_VARYING_COMPONENT_USE_COMP3(VARYING_COMPONENT_USE_UNUSED)
+ , 0
+ });
+ etna_set_state_f32(cmdPtr, VIVS_PS_UNIFORMS(0), 0.0); /* u0.x */
+ etna_set_state_f32(cmdPtr, VIVS_PS_UNIFORMS(1), 1.0); /* u0.y */
+ etna_set_state_f32(cmdPtr, VIVS_PS_UNIFORMS(2), 0.5); /* u0.z */
+ etna_set_state_f32(cmdPtr, VIVS_PS_UNIFORMS(3), 2.0); /* u0.w */
+ etna_set_state_f32(cmdPtr, VIVS_PS_UNIFORMS(4), 1/256.0); /* u1.x */
+ etna_set_state_f32(cmdPtr, VIVS_PS_UNIFORMS(5), 16.0); /* u1.y */
+ etna_set_state_f32(cmdPtr, VIVS_PS_UNIFORMS(6), 10.0); /* u1.z */
+ etna_set_state_multi(cmdPtr, VIVS_PS_INST_MEM(0), ps_size/4, ps);
+ etna_set_state(cmdPtr, VIVS_PS_INPUT_COUNT, (31<<8)|2);
+ etna_set_state(cmdPtr, VIVS_PS_TEMP_REGISTER_CONTROL,
+ VIVS_PS_TEMP_REGISTER_CONTROL_NUM_TEMPS(4));
+ etna_set_state(cmdPtr, VIVS_PS_CONTROL,
+ VIVS_PS_CONTROL_UNK1
+ );
+ etna_set_state(cmdPtr, VIVS_PA_ATTRIBUTE_ELEMENT_COUNT, 0x100);
+ etna_set_state(cmdPtr, VIVS_GL_VARYING_TOTAL_COMPONENTS, /* one varying, with two components, must be
+ changed together with GL_VARYING_NUM_COMPONENTS */
+ VIVS_GL_VARYING_TOTAL_COMPONENTS_NUM(2)
+ );
+ etna_set_state(cmdPtr, VIVS_VS_LOAD_BALANCING, 0xf3f0582);
+ etna_set_state(cmdPtr, VIVS_VS_OUTPUT_COUNT, 2);
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_BIT(VIVS_PA_CONFIG_POINT_SIZE_ENABLE, 0));
+
+ etna_set_state(cmdPtr, VIVS_FE_VERTEX_STREAM_BASE_ADDR, vtx_physical); /* ADDR_E */
+ etna_set_state(cmdPtr, VIVS_FE_VERTEX_STREAM_CONTROL,
+ VIVS_FE_VERTEX_STREAM_CONTROL_VERTEX_STRIDE(0x14));
+ etna_set_state(cmdPtr, VIVS_FE_VERTEX_ELEMENT_CONFIG(0),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN(ENDIAN_MODE_NO_SWAP) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM(0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM(3) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_START(0x0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_END(0xc));
+ etna_set_state(cmdPtr, VIVS_FE_VERTEX_ELEMENT_CONFIG(1),
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_TYPE_FLOAT |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_ENDIAN(ENDIAN_MODE_NO_SWAP) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NONCONSECUTIVE |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_STREAM(0) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NUM(2) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_START(0xc) |
+ VIVS_FE_VERTEX_ELEMENT_CONFIG_END(0x14));
+ etna_set_state(cmdPtr, VIVS_VS_INPUT(0), 0x00100); /* 0x20000 in etna_cube */
+ etna_set_state(cmdPtr, VIVS_PA_CONFIG, VIV_MASKED_BIT(VIVS_PA_CONFIG_POINT_SPRITE_ENABLE, 0));
+ etna_draw_primitives(cmdPtr, PRIMITIVE_TYPE_TRIANGLE_STRIP, 0, 2);
+
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+
+#ifdef CMD_COMPARE
+ /* Set addresses in first command buffer */
+ cmdbuf1[0x57] = cmdbuf1[0x67] = cmdbuf1[0x9f] = cmdbuf1[0xbb] = cmdbuf1[0xd9] = cmdbuf1[0xfb] = rt_physical; /* ADDR_A */
+ cmdbuf1[0x65] = cmdbuf1[0x9d] = cmdbuf1[0xb9] = cmdbuf1[0xd7] = cmdbuf1[0xe5] = cmdbuf1[0xf9] = rt_ts_physical; /* ADDR_B */
+ cmdbuf1[0x6d] = cmdbuf1[0x7f] = z_physical; /* ADDR_C */
+ cmdbuf1[0x7d] = z_ts_physical; /* ADDR_D */
+ cmdbuf1[0x165] = vtx_physical; /* ADDR_E */
+ cmdbuf1[0x89] = cmdbuf1[0x8f] = cmdbuf1[0x93] = cmdbuf1[0xa5] = cmdbuf1[0xab] = cmdbuf1[0xaf] = cmdbuf1[0xc3] = cmdbuf1[0xc9] = cmdbuf1[0xcd] = aux_rt_physical; /* ADDR_F */
+ cmdbuf1[0x87] = cmdbuf1[0xa3] = cmdbuf1[0xc1] = aux_rt_ts_physical; /* ADDR_G */
+
+ /* Must exactly match */
+ if(cmdbuffer_compare(cmdPtr, cmdbuf1, sizeof(cmdbuf1)))
+ exit(1);
+#endif
+
+ /* Submit first command buffer */
+ commandBuffer.free = commandBuffer.bytes - commandBuffer.offset - 0x8;
+ printf("[1] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing first command buffer\n");
+ exit(1);
+ }
+ // printf("[1] Contextbuffer used %i\n", *contextBuffer.inUse);
+
+ /* After the first COMMIT, allocate contiguous memory for context and set
+ * bytes, physical, logical, link, inUse */
+ printf("Context assigned index: %i\n", (uint32_t)contextBuffer.id);
+ viv_addr_t cbuf0_physical = 0;
+ void *cbuf0_logical = 0;
+ size_t cbuf0_bytes = 0;
+ if(viv_alloc_contiguous(conn, contextBuffer.bufferSize, &cbuf0_physical, &cbuf0_logical, &cbuf0_bytes)!=0)
+ {
+ fprintf(stderr, "Error allocating contiguous host memory for context\n");
+ exit(1);
+ }
+ printf("Allocated buffer (size 0x%x) for context: phys=%08x log=%08x\n", (int)cbuf0_bytes, (int)cbuf0_physical, (int)cbuf0_logical);
+ contextBuffer.bytes = cbuf0_bytes; /* actual size of buffer */
+ contextBuffer.physical = (void*)cbuf0_physical;
+ contextBuffer.logical = cbuf0_logical;
+ contextBuffer.link = ((uint32_t*)cbuf0_logical) + contextBuffer.linkIndex;
+ contextBuffer.inUse = (int*)(((uint32_t*)cbuf0_logical) + contextBuffer.inUseIndex);
+ *contextBuffer.inUse = 0;
+
+ /* Build second command buffer */
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ commandBuffer.offset = commandBuffer.startOffset + 8*4;
+
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_DEST_TILED);
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | VIVS_RS_SOURCE_STRIDE_TILING);
+ etna_set_state(cmdPtr, VIVS_RS_DEST_STRIDE, (padded_width * 4 * 4) | VIVS_RS_DEST_STRIDE_TILING);
+ etna_set_state(cmdPtr, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(cmdPtr, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(cmdPtr, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(cmdPtr, VIVS_RS_EXTRA_CONFIG, 0); /* no AA, no endian switch */
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_ADDR, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_RS_DEST_ADDR, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(padded_height) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(padded_width));
+ etna_set_state(cmdPtr, VIVS_RS_KICKER, 0xbeebbeeb);
+
+ commandBuffer.free = commandBuffer.bytes - commandBuffer.offset - 0x8;
+ printf("[2] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing second command buffer\n");
+ exit(1);
+ }
+ printf("[2] Contextbuffer used %i\n", *contextBuffer.inUse);
+
+ /* Build third command buffer
+ * Third command buffer does some cache flush trick?
+ * It can be left out without any visible harm.
+ **/
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ commandBuffer.offset = commandBuffer.startOffset + 8*4;
+ etna_warm_up_rs(cmdPtr, aux_rt_physical, aux_rt_ts_physical);
+
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_STATUS_BASE, rt_ts_physical); /* ADDR_B */
+ etna_set_state(cmdPtr, VIVS_TS_COLOR_SURFACE_BASE, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_TS_MEM_CONFIG,
+ VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR |
+ VIVS_TS_MEM_CONFIG_DEPTH_16BPP |
+ VIVS_TS_MEM_CONFIG_DEPTH_COMPRESSION);
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR);
+ etna_set_state(cmdPtr, VIVS_PE_COLOR_FORMAT,
+ VIV_MASKED_BIT(VIVS_PE_COLOR_FORMAT_OVERWRITE, 0));
+
+ /* Submit third command buffer */
+ commandBuffer.free = commandBuffer.bytes - commandBuffer.offset - 0x8;
+ printf("[3] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing third command buffer\n");
+ exit(1);
+ }
+ printf("[3] Contextbuffer used %i\n", *contextBuffer.inUse);
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL (wait for pixel engine to finish) */
+ int sig_id = 0;
+ if(viv_user_signal_create(conn, 0, &sig_id) != 0) /* automatic resetting signal */
+ {
+ fprintf(stderr, "Cannot create user signal\n");
+ exit(1);
+ }
+ printf("Created user signal %i\n", sig_id);
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+
+ /* Allocate video memory for BITMAP, lock */
+ gcuVIDMEM_NODE_PTR bmp_node = 0;
+ if(viv_alloc_linear_vidmem(conn, width*height*4, 0x40, gcvSURF_BITMAP, gcvPOOL_DEFAULT, &bmp_node, NULL)!=0)
+ {
+ fprintf(stderr, "Error allocating bitmap status memory\n");
+ exit(1);
+ }
+ printf("Allocated bitmap node: node=%08x\n", (uint32_t)bmp_node);
+
+ viv_addr_t bmp_physical = 0;
+ void *bmp_logical = 0;
+ if(viv_lock_vidmem(conn, bmp_node, &bmp_physical, &bmp_logical)!=0)
+ {
+ fprintf(stderr, "Error locking bmp memory\n");
+ exit(1);
+ }
+ memset(bmp_logical, 0xff, width*height*4); /* clear previous result */
+ printf("Locked bmp: phys=%08x log=%08x\n", (uint32_t)bmp_physical, (uint32_t)bmp_logical);
+
+ /* Start building fourth command buffer
+ * Fourth command buffer copies render result to bitmap, detiling along the way.
+ */
+ commandBuffer.startOffset = commandBuffer.offset + 0x18;
+ commandBuffer.offset = commandBuffer.startOffset + 8*4;
+ etna_set_state(cmdPtr, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_set_state(cmdPtr, VIVS_RS_CONFIG,
+ VIVS_RS_CONFIG_SOURCE_FORMAT(RS_FORMAT_A8R8G8B8) |
+ VIVS_RS_CONFIG_SOURCE_TILED |
+ VIVS_RS_CONFIG_DEST_FORMAT(RS_FORMAT_A8R8G8B8) /*|
+ VIVS_RS_CONFIG_SWAP_RB*/);
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_STRIDE, (padded_width * 4 * 4) | VIVS_RS_SOURCE_STRIDE_TILING);
+ etna_set_state(cmdPtr, VIVS_RS_DEST_STRIDE, width * 4);
+ etna_set_state(cmdPtr, VIVS_RS_DITHER(0), 0xffffffff);
+ etna_set_state(cmdPtr, VIVS_RS_DITHER(1), 0xffffffff);
+ etna_set_state(cmdPtr, VIVS_RS_CLEAR_CONTROL, VIVS_RS_CLEAR_CONTROL_MODE_DISABLED);
+ etna_set_state(cmdPtr, VIVS_RS_EXTRA_CONFIG,
+ 0); /* no AA, no endian switch */
+ etna_set_state(cmdPtr, VIVS_RS_SOURCE_ADDR, rt_physical); /* ADDR_A */
+ etna_set_state(cmdPtr, VIVS_RS_DEST_ADDR, bmp_physical); /* ADDR_J */
+ etna_set_state(cmdPtr, VIVS_RS_WINDOW_SIZE,
+ VIVS_RS_WINDOW_SIZE_HEIGHT(height) |
+ VIVS_RS_WINDOW_SIZE_WIDTH(width));
+ etna_set_state(cmdPtr, VIVS_RS_KICKER, 0xbeebbeeb);
+
+ /* Submit fourth command buffer
+ */
+ commandBuffer.free = commandBuffer.bytes - commandBuffer.offset - 0x8;
+ printf("[4] startOffset=%08x, offset=%08x, free=%08x\n", (uint32_t)commandBuffer.startOffset, (uint32_t)commandBuffer.offset, (uint32_t)commandBuffer.free);
+ if(viv_commit(conn, &commandBuffer, &contextBuffer) != 0)
+ {
+ fprintf(stderr, "Error committing fourth command buffer\n");
+ exit(1);
+ }
+ printf("[4] Contextbuffer used %i\n", *contextBuffer.inUse);
+
+ /* Submit event queue with SIGNAL, fromWhere=gcvKERNEL_PIXEL */
+ if(viv_event_queue_signal(conn, sig_id, gcvKERNEL_PIXEL) != 0)
+ {
+ fprintf(stderr, "Cannot queue GPU signal\n");
+ exit(1);
+ }
+
+ /* Wait for signal */
+ if(viv_user_signal_wait(conn, sig_id, VIV_WAIT_INDEFINITE) != 0)
+ {
+ fprintf(stderr, "Cannot wait for signal\n");
+ exit(1);
+ }
+ if(argc>2)
+ bmp_dump32(bmp_logical, width, height, true, argv[2]);
+ /* Unlock video memory */
+ if(viv_unlock_vidmem(conn, bmp_node, gcvSURF_BITMAP, 1) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ viv_close(conn);
+ return 0;
+}
+
diff --git a/src/replay/sandbox.asm b/src/replay/sandbox.asm
new file mode 100644
index 0000000..417c86b
--- /dev/null
+++ b/src/replay/sandbox.asm
@@ -0,0 +1,47 @@
+; Shader assembler test
+; used by ./exec_replay ps_sandbox_etna
+; input:
+; u0.x = 0
+; u0.y = 1
+; u0.z = 0.5
+; u0.w = 2.0
+; u1.x = 1.0/256.0
+; u1.y = 16.0
+; u1.z = 10.0
+; u2.x = frame nr
+MOV t2, void, void, t1
+;MOV t1, void, void, u0.yyyy ; set to ones
+MOV t1, void, void, u0.xxxx ; set to zeros
+
+ADD t3, t2, void, -u0.z ; t3=t2-0.5 t3.xy is -0.5 .. 0.5
+
+;SELECT.GE t1.x, t2.x, t2.y, t2.x ; t1.x = MIN(t1.x,t1.y)
+;SELECT.LE t1.x, t1.x, t1.y, t1.x ; t1.x = MAX(t1.x,t1.y)
+
+;LITP t1, t3.zxxz, t2.zyyz, void; u0.y
+; src0.y, src0.z
+; src1.y, src1.z
+
+;DST t1, t2.x, t2.y, void
+;MOV t1.w, void, void, u0.z
+;FRC t1, void, void, t3
+;SIGN t1, void, void, -t0
+;ADDLO t1, t1, void, u0.yyyy
+;MOV t1, void, void, t0
+;MUL t1, t1, u1.x, void
+
+;MOV t1, void, void, u0
+;MOV t1, void, void, t2
+
+;MUL t2.xy, t2.xy, u1.y, void ; mul by 16
+MUL t2.xy, t2.xy, u2.x, void ; mul by frame number
+SIN t1.x, void, void, t2.x
+SIN t1.y, void, void, t2.y
+; -1..1 to 0..1
+MUL t1.xy, t1.xy, u0.z, void
+ADD t1.xy, t1.xy, void, u0.z
+
+; set alpha to 1.0
+MOV t1.w, void, void, u0.y
+
+NOP void, void, void, void
diff --git a/src/replay/test.c b/src/replay/test.c
new file mode 100644
index 0000000..6a2bc60
--- /dev/null
+++ b/src/replay/test.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+#include <stdint.h>
+#include "context_cmd.h"
+int main()
+{
+ printf("%08x\n", contextbuf[contextbuf_addr[0].index]);
+ printf("%08x\n", sizeof(contextbuf));
+}
diff --git a/src/replay/viv_raw.c b/src/replay/viv_raw.c
new file mode 100644
index 0000000..9b72e0f
--- /dev/null
+++ b/src/replay/viv_raw.c
@@ -0,0 +1,468 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#include "viv_raw.h"
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+
+//#define DEBUG
+
+// XXX const char *galcore_device[] = {"/dev/galcore", "/dev/graphics/galcore", NULL};
+#define GALCORE_DEVICE "/dev/galcore"
+#define INTERFACE_SIZE (sizeof(gcsHAL_INTERFACE))
+
+int viv_invoke(struct viv_conn *conn, gcsHAL_INTERFACE *cmd)
+{
+ vivante_ioctl_data_t ic = {
+ .in_buf = cmd,
+ .in_buf_size = INTERFACE_SIZE,
+ .out_buf = cmd,
+ .out_buf_size = INTERFACE_SIZE
+ };
+ if(ioctl(conn->fd, IOCTL_GCHAL_INTERFACE, &ic) < 0)
+ return -1;
+#ifdef DEBUG
+ if(cmd->status != 0)
+ {
+ printf("Command %i failed with status %i\n", cmd->command, cmd->status);
+ }
+#endif
+ return cmd->status;
+}
+
+int viv_close(struct viv_conn *conn)
+{
+ if(conn->fd < 0)
+ return -1;
+ close(conn->fd);
+ free(conn);
+ return 0;
+}
+
+/* convert specs to kernel-independent format */
+static void convert_chip_specs(struct viv_specs *out, const struct _gcsHAL_QUERY_CHIP_IDENTITY *in)
+{
+ out->chip_model = in->chipModel;
+ out->chip_revision = in->chipRevision;
+ out->chip_features[0] = in->chipFeatures;
+ out->chip_features[1] = in->chipMinorFeatures;
+ out->chip_features[2] = in->chipMinorFeatures1;
+#ifdef GCABI_HAS_MINOR_FEATURES_2
+ out->chip_features[3] = in->chipMinorFeatures2;
+#else
+ out->chip_features[3] = 0;
+#endif
+#ifdef GCABI_HAS_MINOR_FEATURES_3
+ out->chip_features[4] = in->chipMinorFeatures3;
+#else
+ out->chip_features[4] = 0;
+#endif
+ out->stream_count = in->streamCount;
+ out->register_max = in->registerMax;
+ out->thread_count = in->threadCount;
+ out->shader_core_count = in->shaderCoreCount;
+ out->vertex_cache_size = in->vertexCacheSize;
+ out->vertex_output_buffer_size = in->vertexOutputBufferSize;
+#ifdef GCABI_CHIPIDENTITY_EXT
+ out->pixel_pipes = in->pixelPipes;
+ out->instruction_count = in->instructionCount;
+ out->num_constants = in->numConstants;
+ out->buffer_size = in->bufferSize;
+#else
+ out->pixel_pipes = 1;
+ out->instruction_count = 256;
+ out->num_constants = 0; /* =default (depends on hw) */
+ out->buffer_size = 0; /* =default (depends on hw) */
+#endif
+}
+
+int viv_open(enum viv_hw_type hw_type, struct viv_conn **out)
+{
+ struct viv_conn *conn = malloc(sizeof(struct viv_conn));
+ int err = 0;
+ if(conn == NULL)
+ return -1;
+ conn->hw_type = hw_type;
+ gcsHAL_INTERFACE id = {};
+ conn->fd = open(GALCORE_DEVICE, O_RDWR);
+ if((err=conn->fd) < 0)
+ goto error;
+
+ /* Determine base address */
+ id.command = gcvHAL_GET_BASE_ADDRESS;
+ if((err=viv_invoke(conn, &id)) != gcvSTATUS_OK)
+ goto error;
+ conn->base_address = id.u.GetBaseAddress.baseAddress;
+ printf("Physical address of internal memory: %08x\n", conn->base_address);
+
+ /* Get chip identity */
+ id.command = gcvHAL_QUERY_CHIP_IDENTITY;
+ if((err=viv_invoke(conn, &id)) != gcvSTATUS_OK)
+ goto error;
+ convert_chip_specs(&conn->chip, &id.u.QueryChipIdentity);
+
+ /* Map contiguous memory */
+ id.command = gcvHAL_QUERY_VIDEO_MEMORY;
+ if((err=viv_invoke(conn, &id)) != gcvSTATUS_OK)
+ goto error;
+ printf("* Video memory:\n");
+ printf(" Internal physical: 0x%08x\n", (uint32_t)id.u.QueryVideoMemory.internalPhysical);
+ printf(" Internal size: 0x%08x\n", (uint32_t)id.u.QueryVideoMemory.internalSize);
+ printf(" External physical: %08x\n", (uint32_t)id.u.QueryVideoMemory.externalPhysical);
+ printf(" External size: 0x%08x\n", (uint32_t)id.u.QueryVideoMemory.externalSize);
+ printf(" Contiguous physical: 0x%08x\n", (uint32_t)id.u.QueryVideoMemory.contiguousPhysical);
+ printf(" Contiguous size: 0x%08x\n", (uint32_t)id.u.QueryVideoMemory.contiguousSize);
+
+ conn->mem_base = (viv_addr_t)id.u.QueryVideoMemory.contiguousPhysical;
+ conn->mem = mmap(NULL, id.u.QueryVideoMemory.contiguousSize, PROT_READ|PROT_WRITE, MAP_SHARED, conn->fd, conn->mem_base);
+ if(conn->mem == NULL)
+ {
+ err = -1;
+ goto error;
+ }
+
+ conn->process = (gctHANDLE)getpid(); /* value passed as .process to commands */
+
+ *out = conn;
+ return gcvSTATUS_OK;
+error:
+ if(conn->fd >= 0)
+ close(conn->fd);
+ free(conn);
+ return err;
+}
+
+int viv_alloc_contiguous(struct viv_conn *conn, size_t bytes, viv_addr_t *physical, void **logical, size_t *bytes_out)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY,
+ .u = {
+ .AllocateContiguousMemory = {
+ .bytes = bytes
+ }
+ }
+ };
+ int rv = viv_invoke(conn, &id);
+ if(rv != gcvSTATUS_OK)
+ {
+ *physical = 0;
+ *logical = 0;
+ return rv;
+ }
+ *physical = (viv_addr_t) id.u.AllocateContiguousMemory.physical;
+ *logical = id.u.AllocateContiguousMemory.logical;
+ if(bytes_out)
+ *bytes_out = id.u.AllocateContiguousMemory.bytes;
+ return gcvSTATUS_OK;
+}
+
+int viv_alloc_linear_vidmem(struct viv_conn *conn, size_t bytes, size_t alignment, gceSURF_TYPE type, gcePOOL pool, gcuVIDMEM_NODE_PTR *node, size_t *bytes_out)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY,
+ .u = {
+ .AllocateLinearVideoMemory = {
+ .bytes = bytes,
+ .alignment = alignment,
+ .type = type,
+ .pool = pool
+ }
+ }
+ };
+ int rv = viv_invoke(conn, &id);
+ if(rv != gcvSTATUS_OK)
+ {
+ *node = 0;
+ if(bytes_out != NULL)
+ *bytes_out = 0;
+ return rv;
+ }
+ *node = id.u.AllocateLinearVideoMemory.node;
+ if(bytes_out != NULL)
+ *bytes_out = id.u.AllocateLinearVideoMemory.bytes;
+ return gcvSTATUS_OK;
+}
+
+int viv_lock_vidmem(struct viv_conn *conn, gcuVIDMEM_NODE_PTR node, viv_addr_t *physical, void **logical)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_LOCK_VIDEO_MEMORY,
+ .u = {
+ .LockVideoMemory = {
+ .node = node,
+ }
+ }
+ };
+ int rv = viv_invoke(conn, &id);
+ if(rv != gcvSTATUS_OK)
+ {
+ *physical = 0;
+ *logical = 0;
+ return rv;
+ }
+ *physical = id.u.LockVideoMemory.address;
+ *logical = id.u.LockVideoMemory.memory;
+ return gcvSTATUS_OK;
+}
+
+/** Unlock (unmap) video memory node from GPU and CPU memory.
+ */
+int viv_unlock_vidmem(struct viv_conn *conn, gcuVIDMEM_NODE_PTR node, gceSURF_TYPE type, int async)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_UNLOCK_VIDEO_MEMORY,
+ .u = {
+ .UnlockVideoMemory = {
+ .node = node,
+ .type = type, /* why does this need type? */
+ .asynchroneous = async
+ }
+ }
+ };
+ return viv_invoke(conn, &id);
+}
+
+/* TODO free contiguous memory and video memory */
+
+#ifdef GCABI_HAS_CONTEXT
+int viv_commit(struct viv_conn *conn, gcoCMDBUF commandBuffer, gcoCONTEXT contextBuffer)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_COMMIT,
+ .u = {
+ .Commit = {
+ .commandBuffer = commandBuffer,
+ .contextBuffer = contextBuffer,
+ .process = conn->process
+ }
+ }
+ };
+ return viv_invoke(conn, &id);
+}
+#else
+int viv_commit(struct viv_conn *conn, gcoCMDBUF commandBuffer, gckCONTEXT context)
+{
+ gcsSTATE_DELTA fake_delta;
+ memset(&fake_delta, 0, sizeof(gcsSTATE_DELTA));
+
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_COMMIT,
+ .u = {
+ .Commit = {
+ .commandBuffer = commandBuffer,
+ .context = context,
+ .queue = NULL,
+ .delta = &fake_delta,
+ }
+ }
+ };
+
+ return viv_invoke(conn, &id);
+}
+#endif
+
+int viv_event_commit(struct viv_conn *conn, gcsQUEUE *queue)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_EVENT_COMMIT,
+ .u = {
+ .Event = {
+ .queue = queue,
+ }
+ }
+ };
+ return viv_invoke(conn, &id);
+}
+
+int viv_user_signal_create(struct viv_conn *conn, int manualReset, int *id_out)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_USER_SIGNAL,
+ .u = {
+ .UserSignal = {
+ .command = gcvUSER_SIGNAL_CREATE,
+ .manualReset = manualReset,
+#ifdef GCABI_USER_SIGNAL_HAS_TYPE
+ .signalType = 0 /* only used for debugging and error messages inside kernel */
+#endif
+ }
+ }
+ };
+ int rv = viv_invoke(conn, &id);
+ if(rv != gcvSTATUS_OK)
+ return rv;
+ *id_out = id.u.UserSignal.id;
+ return gcvSTATUS_OK;
+}
+
+int viv_user_signal_signal(struct viv_conn *conn, int sig_id, int state)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_USER_SIGNAL,
+ .u = {
+ .UserSignal = {
+ .command = gcvUSER_SIGNAL_SIGNAL,
+ .id = sig_id,
+ .state = state
+ }
+ }
+ };
+ return viv_invoke(conn, &id);
+}
+
+int viv_user_signal_wait(struct viv_conn *conn, int sig_id, int wait)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_USER_SIGNAL,
+ .u = {
+ .UserSignal = {
+ .command = gcvUSER_SIGNAL_WAIT,
+ .id = sig_id,
+ .wait = wait
+ }
+ }
+ };
+ return viv_invoke(conn, &id);
+}
+
+int viv_user_signal_destroy(struct viv_conn *conn, int sig_id)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_USER_SIGNAL,
+ .u = {
+ .UserSignal = {
+ .command = gcvUSER_SIGNAL_DESTROY,
+ .id = sig_id
+ }
+ }
+ };
+ return viv_invoke(conn, &id);
+}
+
+int viv_event_queue_signal(struct viv_conn *conn, int sig_id, gceKERNEL_WHERE fromWhere)
+{
+ /* gcsQUEUE is copied by the kernel, so it does not need to be kept in memory
+ * until the kernel processes it
+ */
+ gcsQUEUE id = {
+ .next = NULL,
+ .iface = {
+ .command = gcvHAL_SIGNAL,
+ .u = {
+ .Signal = {
+ .signal = (void*)sig_id,
+ .auxSignal = (void*)0x0,
+ .process = conn->process,
+ .fromWhere = fromWhere
+ }
+ }
+ }
+ };
+ return viv_event_commit(conn, &id);
+}
+
+void viv_show_chip_info(struct viv_conn *conn)
+{
+ printf("* Chip identity:\n");
+ printf(" Chip model: %08x\n", conn->chip.chip_model);
+ printf(" Chip revision: %08x\n", conn->chip.chip_revision);
+ printf(" Chip features: 0x%08x\n", conn->chip.chip_features[0]);
+ printf(" Chip minor features 0: 0x%08x\n", conn->chip.chip_features[1]);
+ printf(" Chip minor features 1: 0x%08x\n", conn->chip.chip_features[2]);
+ printf(" Chip minor features 2: 0x%08x\n", conn->chip.chip_features[3]);
+ printf(" Chip minor features 3: 0x%08x\n", conn->chip.chip_features[4]);
+ printf(" Stream count: 0x%08x\n", conn->chip.stream_count);
+ printf(" Register max: 0x%08x\n", conn->chip.register_max);
+ printf(" Thread count: 0x%08x\n", conn->chip.thread_count);
+ printf(" Shader core count: 0x%08x\n", conn->chip.shader_core_count);
+ printf(" Vertex cache size: 0x%08x\n", conn->chip.vertex_cache_size);
+ printf(" Vertex output buffer size: 0x%08x\n", conn->chip.vertex_output_buffer_size);
+ printf(" Pixel pipes: 0x%08x\n", conn->chip.pixel_pipes);
+ printf(" Instruction count: 0x%08x\n", conn->chip.instruction_count);
+ printf(" Num constants: 0x%08x\n", conn->chip.num_constants);
+ printf(" Buffer size: 0x%08x\n", conn->chip.buffer_size);
+}
+
+int viv_reset(struct viv_conn *conn)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_RESET,
+ };
+ return viv_invoke(conn, &id);
+}
+
+int viv_free_vidmem(struct viv_conn *conn, gcuVIDMEM_NODE_PTR node)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_FREE_VIDEO_MEMORY,
+ .u = {
+ .FreeVideoMemory = {
+ node = node
+ }
+ }
+ };
+ return viv_invoke(conn, &id);
+}
+
+int viv_map_user_memory(struct viv_conn *conn, void *memory, size_t size, void **info, viv_addr_t *address)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_MAP_USER_MEMORY,
+ .u = {
+ .MapUserMemory = {
+ memory = memory,
+ size = size
+ }
+ }
+ };
+ int status = viv_invoke(conn, &id);
+ *info = id.u.MapUserMemory.info;
+ *address = id.u.MapUserMemory.address;
+ return status;
+}
+
+int viv_unmap_user_memory(struct viv_conn *conn, void *memory, size_t size, void *info, viv_addr_t address)
+{
+ gcsHAL_INTERFACE id = {
+ .command = gcvHAL_UNMAP_USER_MEMORY,
+ .u = {
+ .UnmapUserMemory = {
+ memory = memory,
+ size = size,
+ info = info,
+ address = address
+ }
+ }
+ };
+ return viv_invoke(conn, &id);
+}
+
diff --git a/src/replay/viv_raw.h b/src/replay/viv_raw.h
new file mode 100644
index 0000000..b7b682e
--- /dev/null
+++ b/src/replay/viv_raw.h
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Thin wrapper around Vivante ioctls: raw version for old replay demos */
+#ifndef H_VIVRAW
+#define H_VIVRAW
+
+#include "gc_abi.h"
+#include "gc_hal_base.h"
+#include "gc_hal.h"
+#include "gc_hal_driver.h"
+#ifdef GCABI_HAS_CONTEXT
+#include "gc_hal_user_context.h"
+#else
+#include "gc_hal_kernel_buffer.h"
+#endif
+#include "gc_hal_types.h"
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+
+#define VIV_WAIT_INDEFINITE (0xffffffff)
+
+/* one of the features words */
+enum viv_features_word
+{
+ viv_chipFeatures = 0,
+ viv_chipMinorFeatures0 = 1,
+ viv_chipMinorFeatures1 = 2,
+ viv_chipMinorFeatures2 = 3,
+ viv_chipMinorFeatures3 = 4,
+ VIV_FEATURES_WORD_COUNT /* Must be last */
+};
+
+/* hardware type */
+enum viv_hw_type
+{
+ VIV_HW_3D = 1,
+ VIV_HW_2D = 2,
+ VIV_HW_VG = 4,
+
+ VIV_HW_2D3D = VIV_HW_3D | VIV_HW_2D
+};
+
+/* Type for GPU physical address */
+typedef uint32_t viv_addr_t;
+
+/* kernel-interface independent chip specs structure, this is much easier to use
+ * than checking GCABI defines all the time.
+ */
+struct viv_specs {
+ uint32_t chip_model;
+ uint32_t chip_revision;
+ uint32_t chip_features[VIV_FEATURES_WORD_COUNT];
+ uint32_t stream_count;
+ uint32_t register_max;
+ uint32_t thread_count;
+ uint32_t shader_core_count;
+ uint32_t vertex_cache_size;
+ uint32_t vertex_output_buffer_size;
+ uint32_t pixel_pipes;
+ uint32_t instruction_count;
+ uint32_t num_constants;
+ uint32_t buffer_size;
+};
+
+/* connection to driver */
+struct viv_conn {
+ int fd;
+ enum viv_hw_type hw_type;
+
+ viv_addr_t base_address;
+ void *mem;
+ viv_addr_t mem_base;
+ gctHANDLE process;
+ struct viv_specs chip;
+};
+
+/* Open connection to GPU driver.
+ */
+int viv_open(enum viv_hw_type hw_type, struct viv_conn **out);
+
+/* Call ioctl interface with structure cmd as input and output.
+ * @returns status (gcvSTATUS_xxx)
+ */
+int viv_invoke(struct viv_conn *conn, gcsHAL_INTERFACE *cmd);
+
+/* Close connection to GPU driver.
+ */
+int viv_close(struct viv_conn *conn);
+
+/** Allocate contiguous GPU-mapped memory */
+int viv_alloc_contiguous(struct viv_conn *conn, size_t bytes, viv_addr_t *physical, void **logical, size_t *bytes_out);
+
+/** Allocate linear video memory.
+ @returns a handle. To get the GPU and CPU address of the memory, use lock_vidmem
+ */
+int viv_alloc_linear_vidmem(struct viv_conn *conn, size_t bytes, size_t alignment, gceSURF_TYPE type, gcePOOL pool, gcuVIDMEM_NODE_PTR *node, size_t *bytes_out);
+
+/** Lock (map) video memory node to GPU and CPU memory.
+ */
+int viv_lock_vidmem(struct viv_conn *conn, gcuVIDMEM_NODE_PTR node, viv_addr_t *physical, void **logical);
+
+/** Commit GPU command buffer and context.
+ */
+#ifdef GCABI_HAS_CONTEXT
+int viv_commit(struct viv_conn *conn, gcoCMDBUF commandBuffer, gcoCONTEXT contextBuffer);
+#else
+int viv_commit(struct viv_conn *conn, gcoCMDBUF commandBuffer, gckCONTEXT context);
+#endif
+
+/** Unlock (unmap) video memory node from GPU and CPU memory.
+ */
+int viv_unlock_vidmem(struct viv_conn *conn, gcuVIDMEM_NODE_PTR node, gceSURF_TYPE type, int async);
+
+/** Free block of video memory previously allocated with viv_alloc_linear_vidmem.
+ */
+int viv_free_vidmem(struct viv_conn *conn, gcuVIDMEM_NODE_PTR node);
+
+/** Map user memory to GPU memory.
+ */
+int viv_map_user_memory(struct viv_conn *conn, void *memory, size_t size, void **info, viv_addr_t *address);
+
+/** Unmap user memory from GPU memory.
+ */
+int viv_unmap_user_memory(struct viv_conn *conn, void *memory, size_t size, void *info, viv_addr_t address);
+
+/** Commit event queue.
+ */
+int viv_event_commit(struct viv_conn *conn, gcsQUEUE *queue);
+
+/** Create a new user signal.
+ * if manualReset=0 automatic reset on WAIT
+ * manualReset=1 need to manually reset state to 0 using SIGNAL
+ */
+int viv_user_signal_create(struct viv_conn *conn, int manualReset, int *id_out);
+
+/** Set user signal state.
+ */
+int viv_user_signal_signal(struct viv_conn *conn, int sig_id, int state);
+
+/** Wait for signal. Provide time to wait in milliseconds, or VIV_WAIT_INDEFINITE.
+ */
+int viv_user_signal_wait(struct viv_conn *conn, int sig_id, int wait);
+
+/** Destroy signal created with viv_user_signal_create.
+ */
+int viv_user_signal_destroy(struct viv_conn *conn, int sig_id);
+
+/** Queue synchronization signal from GPU.
+ */
+int viv_event_queue_signal(struct viv_conn *conn, int sig_id, gceKERNEL_WHERE fromWhere);
+
+void viv_show_chip_info(struct viv_conn *conn);
+
+/** Send reset command to GPU.
+ */
+int viv_reset(struct viv_conn *conn);
+
+/** Convenience macro to probe features from state.xml.h:
+ * VIV_FEATURE(chipFeatures, FAST_CLEAR)
+ * VIV_FEATURE(chipMinorFeatures1, AUTO_DISABLE)
+ */
+#define VIV_FEATURE(conn, word, feature) ((conn->chip.chip_features[viv_ ## word] & (word ## _ ## feature))!=0)
+
+#endif
+
diff --git a/src/resources/README.md b/src/resources/README.md
new file mode 100644
index 0000000..0294b6b
--- /dev/null
+++ b/src/resources/README.md
@@ -0,0 +1,6 @@
+Attributions
+-------------
+
+Lava texture by Patrick Hoesly, CC-BY-SA from: https://secure.flickr.com/photos/zooboing/3663686646/
+
+
diff --git a/src/resources/amethyst256.png b/src/resources/amethyst256.png
new file mode 100644
index 0000000..12b2650
--- /dev/null
+++ b/src/resources/amethyst256.png
Binary files differ
diff --git a/src/resources/attribution.txt b/src/resources/attribution.txt
new file mode 100644
index 0000000..9efcc92
--- /dev/null
+++ b/src/resources/attribution.txt
@@ -0,0 +1,4 @@
+wall1_l8.dds / wall1_a8.dds
+CC-BY: brightretro
+http://opengameart.org/node/17576
+
diff --git a/src/resources/bigbuckbunny_yv12.yuv b/src/resources/bigbuckbunny_yv12.yuv
new file mode 100644
index 0000000..3ec908a
--- /dev/null
+++ b/src/resources/bigbuckbunny_yv12.yuv
@@ -0,0 +1,3 @@
+534783550.3;=:45017GF?;EGH;H5=ARQinDQV‚D4;IG[ULXnYbeQ^id^šg]aglmnpur|˜ytfaRODEAB;81,137:1*&)+*)**-'%%*.?I‚§9bM]R„\Y`adaXCRgbnVQORTYN;@_©x¼MMWQTPY[hˆŠˆ{nORTdYOHIR^bÉ€5FRKZSEI\L]}j‡™ ªœ\57;:<AHIKVZeYXSPONORXWWVOLLMLE<;;8?>>?;:<<;:76=>//UK/3556998844567512NFIo™•™…‘€?;9755=8:9<`Q9999€543652551.0;;c80+2;AF?8>IJ?_FPJF?QŠ=DV[MKBCG_PW^€cepbflgdz`^YWeeglyqq‚gb`XENPMC9<3,2;93+$'0/)*&''&#$&+2>SZ’saHWPfJO_]\agq€svnUPHJITD9A^r‘ˆRXLKKHMSTq‚†‰~uZQWjcQLX__dÆ›,;WU[L>EuUSbi”­§¢‹927:;<FHGUZ[OPTUPSNPUZZVOOONLL@;;7?AA??>843121HJ5EQ88`fgca^\\\\N8??HOVDCEV~š’Š•ŒI;9765=9:97PI9999€571741555*63@ÄR/,6:AF67@JO°ã¶WHNIJu\?[ok]KMOTX[p~fjXbnfbb_WZ\`_js{zkg`YOKHGLL70202::1&%(,.-++'# %')'?EZfDkwrZFDDUkXLTzmi|vfRXRRNSQEK„‰rZbLDAALOL]uƒ†‡zncl]WQRVde{Ðy76_i`\CH`dKd~ž¥¼¬ª–R3368:AHDKRYgez]USPNNRSSSSONMLLD::@ADGH<VuW><T—Re@3@b„˜¿ËÍǸÁ¬†„YV†ub>B<9Gw™™’”V;9766;;;:89>9999€66/540246,83›Åo/-;:QD7<HL°Æœš»dRPUq@NHRZRGGSwnlmf~okYaog\VXNX`^W^ghpi\SMNSIBML904:83-*)+**+)&$" $&&,;KDX‚’HPukkM>CYRVTC@ADmob_JPVRJXZWJk_bTvƒ[RH^[W?ax„ŠˆvbfPUTSZ^aklR>0ZRFDIUKjKgš¦¶ª«Ÿk>338:@BDCLQirn`XfdTMOQQQRPPOMKIA9BAEGKT£Ê’JDTÏF\:JQMKKˆÇ¸¢wi[ZVYwV—¸_=G=;9Gv›šh<9969<:::8:9::::€675431646.69oœm@/EQJE76D@}ÉÞ¯‰QeALB@KJOSOC@pvahcekpc]Z\`cb`ocbTPYZaeTRSRRIL?OFE9<5,).0--,+$$#"%*)0MswHFcªÕRT]bRYLITGN]aO76PeXGBIQUMKiQLPTe„¦›tIQ_XFVKgyƒ†wi]OMLPSUV`ZS:/8HKOFU]iMUz¨ª¬«®¢ƒE<179>@DAJN`YajkpsgRPPPPPPPPOOLJCCBFILQŽÊ£SSQf85<DPOKFSqQL[\^bbdw€Â¶[<E?;8:BkZ`wG:96:<:9;::;;;;:€68772.74512:Kl54GNIJ_FGId\\N^ߪkh\;<CˆÄM?O[Xehikmkf`bb^aihccYQOQUXWVTWNCF=VHV>:1.//0*)($$&&((5K`„zlMJbÄ©LRUVR^e™‘zbaaaGEXieXG@ACHL]_jlnl¢žvqYRP=B]AOiz†|wpWJF@IHHJU]X26L[\XCNceUb­¦¨«²©…JB638:<ABFIMVVlqqt‚\PPPPPPOPPPNNJBBGJLMežsMTaO88OPil„UCMdMK[affYr|ƱV=G=;89;=:<h;:8=<:::;;<<;;:€+3682,3642)6;XNG:DFCJQPGINbza^ÃŽzFAAQNE[SCUfgihlooiekljha\i^\SDKN\XYWJ@DEGVEX0972,+*)'%&*+-2BWqh~wJINYk\PXRHes…ŒiU`__bbWaehl[NQ>:<Qz€tiu“rpmYIBHLr@Wk}€vnD>LHABGFKO]@5C^ZVJUm_`SW¬ £µµ©žQBG64::ABHHJJ[pbfnzbUPPOOPOPQRPNNH@FHIMMRXWiyL:GVIapq]`dlfZVaadXUŠÅ¬H?E?;<9;;:8l‹E;:>=::;;;==<;;€&$+6659413+8:;7?7<9BKEJ_ÌkKQHK`ZPFX7DKELUUWThnrsceopiiffmiZZYQUJPSRVTOGC@@;NYGZ*60.())*+,.0:IL[\‹qUbXJR[[QfhvSbuŠoedYT[WNZ\^e\KNH`YUn^ZXcnmiigbTNX]`JH_o|ukF<WOuSAOOMU33GJIFTYZmN]³¦·±¦¢^BJI9::@E\vwuwwevkoaRRPPQPPRSRPOMHDGBIKUaZ`qePYXIalrrnchhZv¥a_XTµÊ‘E@E;<;7::<<X–];9>>;;;=HJ?;;;€1)'4628403+4:9A<49:@>OBc¯›¶OPM¥‹QÈVADL\dheiUau_bdntsrhmoe]ZOPJSS^YOMMGG9B;VZP[40.,**./69APq^Rp_RpŽWEu˜f^}zWjtˆaldHFSWSQDJ^_GWG]imw^X[fceacai[YMGNXDSburiN9±]Y£O@FUPP649HNOiX\vRf³«©­´¤¢j@JLOhÀãά•“’”•˜—ŒxlhXOVPPQQTTSRPOMFGEJLT_[Z\ICPPOcdkme|JONœ©c}—‡Ã¿lBAF?>:8;=?;L‘y>9??>;<>YqL<;;€5)*+666113+2;:7I6::;K^CMgxábRHK~r€°AAE_j_YYxMOmY`dmpuskid`\YZ_XTORGIHLC=9B8WWWX0,.,-2:=MdcZŽ|kbXi‰eMPfm‚œh‰„jjMTe_Vgi]KVuji]UXR@>EjmombVLLV]]_oq_LMBDLKK[ine_=SC^fHRGFY^b16OW[cc]d°©¤®¼Ÿ©ˆ—ÇææéäÍ°’†…~‚…Š“˜š—†vi][QSUTRSRQNKFBJMS†r`mIR`YV`hr[g”URxǦ›ÈÌÏЧSREGBB><;:<:A„ŽR9D?>;<;H†b?;;€40*'614144+4;:8212;<=7FOPS›£P?ShMQU:EIbVYYd¥JRSdconlommle`X\VbeZKKJEF>:6H=9YO_U)+-/9DZ€zpkp„‰†Œ˜lQXOMv˜mƒsc_ZTG@Jenvz|QfucVG?Kd‰leebRIGMZ[[mjWGJ?KVgJVdffao{N,4?SSDM^b6+FZYyagtcl¬©¥½áàÏ«‹ƒ‡wnhc`^^dpy„’œ ™˜sVQTSTSTTQNNHGMR“rjqUS]VV^‚^MEYknŽÌÄÍÎÐÐÏ‹UsRJCB<<;:::;\‰wDB>=;;=AyxF=;€96,(-03444*-156179;^H4FLLK]NKK=Qs[R<EEJOVNpWIoalivshhhab_YOJ_^YKPMHCB8=<H?@TQZN&(2<OkÀË•ˆˆ{‰†‹†oT>S[\kknweW[TFS^dYdvqhOPfr_ZTGG}XZe`RVhda]]ddg^E?W^TKR_ab_j†{:'(>NI@RaI5FbWsjflpm§­àæÈ¥f]VRLF>742/000/3?Thv|‡†tZNSVVVVVVSQMILJjrtva`gUJOwUTV^‰—½ÑÐÐÐÐÐÇs^šmL@C???;;:<AqŠcC>=:;<>X}L?=86/++/4332+0123/4:9;>8EEHFCIAEANIB;AOE>BBIILLPXmej\mg[gcPEX]^^ML=59<>I<:4GN[U;(/;[wŽÑ£ˆŠ…}|‡˜OKckfb`dT^h[VJKK]eeƒoqfNYjgYU[[Fš–‚UinaYgeVUVXd\QD@GSJXO[_a\]YRO:2=-3@;TbPIYW_clj|e²èͧxYOE;7//0/122/,,,,//-59;CKRVVSPTVUTWWXUVRNKFiqwoncymZYXZ_`jvhŠÌÐÐÐÑж]i£–eAC=>>;;:;;S‰ŠG;<:;;<DsQ@>€870+,06233,2682/37:5=;@A9FFD@@Lt;FC9mŠ?JQTTZXYmWWPMU^ceXSQYTUZVD843GFC@<;7FSYH*09Zt|¨³‹~vvmwŠjdYLNT`r¡Ži³‘`ZWQUQXer|m_ZS`bTS[Zg@™ŽVWelooƒ`USTQYYNV_<ADhOW^a\YTGDJRJB5/',><AHP_cjo™mⵈdQH>711322444454443211134667AMNOTVUTWWXXVSSPKSZpj`p˜pcZUZ_`dck«ÐÐÐÐÒÒžPy¤®\C===;;;;;>n”L<<:;;;>^UA>€<70+,171461133203971DKB<958?@<QL<<=2`vgUZbang]\SWVfY[SDMCPYTMSI900IQKG=<H1KRL/:MIchtz|ƒvXUS^€g_MY]x|’Ž|k¾‡\RV_a^Psyaf[_[_h]XZ]eDYgTIXmƒktfUPXT_kaoqARWnVXaaZ^OFBIYICJC9404D+,:KIT…Þ²yZLB;62211569:;<<==>>=;;;;<<<DLNNORRRVXYYVUTTTRJVy„k}‘_VXX[angg‰ÈÑÑÑÑÒ΂SŒ¯³«•\B<==;<<<;Y•N:=9::<;KUA>€<601058/56134243496/<G?B4335?;O7PC35NXILQZi™‚hnvYX’WJQMP@BKEEILCQKONIM<4b4SM8[lYGTfvvtmlZOIL\Žd``Sa‰plln``ˆcSUXWUaK^X\X_SPWVHJdjRK[\Ugr®`ncQMJ^h\\_VQmit[[baZVPD@JQGKL;7B>SU,4CD58Ö¯zXJA9564578;=>@ABCCDEGHHHIHJFJQNNMNSRTVXXYVVVVUTShºu`ºÂˆ~bmxŒ»‰‹ÄÑÒÒÒÒÒÀh[ ±±¨¦–fD?A@<==:H†A<;9::;;DRC>€:4133573530080174430;HJAA55469DBL>1:@D>M\WYledW`bZoPGUKMH=@4:NPCNROMW`64?LM8HLvLKL_no„hfcNIFKU^OQ_oŠlszziˆ}TVUWc]gPSV^[]XH]iT]“oLGWSRaq‡bfJ„‘TrYPQNLJ_s`\cbZSOTKB@AFM;]X:DG25UccÜ´vWF>:86679<>@@CEEEHIJLMNOPPOMOONOOPPRUQVYZZYWWVSVVX]V¥ÎÐÎή·ÌÌÒÁÇÑÑÒÒÒÒÓ¤Vh§ªª§§¤•wJA?===;Gq?<<;9;=<ARK@:52232636543511744416v©XIH¿H@@=|B;4;8?DLQ[k{v^]b†Z}HRKFH;015[MKBEOHHK^/6>I=LCJ¶TNNU\{°idlXFCEHELgzrhhx€ƒŒ¥‰^`\buwueQ[YHKh“bbco“y\@QQS\nkXST}Wg[MRPJF[vƒh^cb\VQKA89=ALIžXAC?@U9_Õ¾vUK@:5579;?@BDEFIIJKKMNOPQQMSLFIKNOPPPTPRZZZYXZZWZWWYiÏÐÏÑÒÓÑÒÒÒÑÑÑÓÓÓÓÓÐR[ew”¬§¡”•|gF@A?>O_><;;:<>=@QNB87813473625526155562/;t™yK2>BDT`:=C9GADKRLUMYf[XREiIGEI;86CJp[?>9@<77952YA4K<O~dW^VV„cRe™LCDKU^‡ulkxƒ‚¦Ênpeni`e~|}eTZT`ºÁLWp|hbT?QQa\_ZLu}TVSL=EN[VLVr‡p__c^kSC=;;@EKXyORJFAmU·Æ~UJ?84468<?ACEGHILKKLLMOPPLKQGDEHLLNQQONPPUZWWZZYYYXUX\zÉÐÐÑÑÑÒÒÒÓÓÓÔÔÓÓÓ»aNGHEP„¥››žœ™€PA@FbT@?D=:=>>@NRE76:245837156/7277173.9=EKM.AC>b7>B76D=CJNQIJGV[YTG?MCBCIKl[ctFB@@62/028GC7HO7R]ˆjZWWaq}„ž»vGAFU˜ˆ‚gknxx•–bkp}€js‘ulkUM[yšMUb‚soP?QONMXZg˜¦K`TGALU`YQKh“wa^a_\LHE=FGMGMXZZYT?TÇÕ†YJ@:667;>>ADFHLNONMMMMMNNLIA>CBBEILKPQQLOQQVXX[\[WVXXXY\p¿ÒÑÒÒÒÒÓÓÔÔÔÔÓÒÓ“VKGDBBHl””Ÿ¤Œg@G^}L@@_\@??@BOZJ58:641426335/73:716616<DB9.BDFFE:G3=J==@JICH?HVYjUUB?JRd`T_O=AD@51/36G_hC1LK4XY„xkd_Sg›‘rp‡`>NYx‘e`fkyog{jowgdqdaidaMQ¹ŒNVt|n]M=RXPFJVq‡cN^ZOLKM^\VRwš{a__^VX^YWPa_J>KQ\_[NÐÜ‘YKA=<;<=?ADEGIKNOQQQQPOMIED=78ABBDENKPRQOOQQQXY\\ZWWW[[Z[^j±ÓÒÒÒÒÓÓÓÓÔÔÓÓÎzTKFACABAZ“¦}qSCBeGABgkICDH\eP79:647627335/643616727:>B9/DCLPA>:ACoX8?BMEMO[YZV\O;IPOfbBA87@@5//18Lbbb?<MK=[R…‚}wm_|SZÀ_F^ap”‡b]yzz~kw„”†eY[^h|uNRmZU[ba[RR>SXVKJS[`[_pRSWQJRYVm†œ|b``\gYN]a^bYMDlINZpÛÙ™XIB@@BABCCEFHJLNQRRTUTPNHI;0266;BABDHNLQRQQPQRR\Z\WWWXZ\]]]`f”ÎÒÒÒÓÓÓÓÔÔÔÔ®™_HDA@@?>@[QGCC>QˆCABb˜‰te[TjgX98:674327335/365654948;<C<0CCQb?HB@KVB?CEKQQNwnn_BAHGFB;>658921007TaW_j;BNDO]Z}~{~wni€zz¯yQDH`‚kUW^w ¢“p™‰vxy‘qppeMLYST^WWRQL?…bdcTWb^“¡VW]]UT]zˆŽ›|fdabrZV^d€oQIM`DF›èÛ“`LDBACEGHIKLLNMPSSTTUUTLJfO01.357?@ABCMNNQRPPPQVYYXWWXXXZ\]]^_`p«ÌÒÓÓÓÓÔÔÔέ«bFD@?>===A``AABB@EhCCDd”~tlpY~89:678735443044122077458><0BB`\;\HCHMzOEELOQMLZ^QBEGHHCC81-346894G[TZW]j1LLB[W”‹”“tww|w…˜]IENLNNya`x«·…lt~ƒvxªÀ–yq{ŠfOVQjKJSPUW¨Ivubrvpiƒq~´rSXi]`mÏž“ligbict–““…NSOE¸çÎ’bOCDCEIKMMNOQQSTVWWVSRMI}‡zE5=..345==BCGOMNPNPPQVXYWUTXVUXW[]]]^`amŒ”£µÉÓӳƸpDB@@><=>?AEA@BB?AKCCDa¦š˜–Ž‡ps68:439944442255./..7949<=62@?uCT^;;JQbSAHKMFGNQ[hVKIcYd=41345<<<Zdj‰^\`hZROW_E‚‰ž•€z‚vuªmUWPIMHMsTa`f„‡sy|ul˜€qZN_^VWebSJCR`j™B\jgsqrq\b\\]_idXc®o”†zslf_f~txu¤ªmXP²æÂ…`MBACHLPRWXXYWXXY\][YTMDs—¬F8jc,/436:?BGLMMNOPPRUWXVWUUWTWVWZ[[]^]aabfp…š«ÅÍÁ…IA@>=<<>?>?@@DDCADDCCb¦¤¢›’‘q…€679511994442345.+-29<06:=75=Z`[Y:QDQWQTBHDGKLNFM_Wjlg‰’8,446=@HRcflm_T\\\YK‚P€~‡„¡’ywviXXlYLWJMLMTZbgsu{xrˆ‡p~e_\NLQ[qt]NRbKFTgMTolgbalb\YU[h}‹œÄ®‚t©©¢‘~}v|ƒ…vm…iÏÙ°v\L>@DKMTX\]^^`]_^^a^[SKCL›¶³ƒRMnL7.103::@FHJKLPPOURRUVVVSQUSVVWYYZ[\]ackuŒ ˆ‚§À»VB@=<<<>?>?BAECCACDCC\¦¥¤ŸŠ—|~…€74663.492442028)-416738=7aO9NwL[FLNRNIIB?CHNONHAHlsqu‘ªB679>BP{t]fkUNS]`Zb{ZD†Œwx‡®’€…i_^[ZTRXRQVr_dhfgkqo Á”}„st^[kSY{ZXv—fbqK?J]^\`Zlg^cg¾éêéçèçäÕÛâçêèåéêåÞÝÚƲ”žÕÌ pXK?@DLTX^`abccac``XRHBBCOV±À±aUA@@5622:<<CDGJHHQPLPQRUUURQQVVVSXXWYZ]`fssƒ~j†• OA@><=<?@=>ABFCCBBBBCFyŸ±£†‹€€ƒ€62466006.411248,251<=6<BQsZYrQh>RIPRMK?=LSVMIHNBFehk¨Ë¤>5;<J^[j­€ba]Z`okd`qFGo¢¹{vt‡wtkfj‰”…naZZY} pdiffkjmž‚pz‹ƒ{erf\cdjgfƒquc`IO_aaedff_uãèèèÞØÜààÛÕÔàêééééééæáßÖÊØΪvUD;AFNTY^bdddddc\OA==CLONPU¾°›‚\==@B3;A57>;@DDDHFITKJQRPUUTSTUUVUUVWXYYY\^^^_^\bg_PGB??=>@@??>BBFDCACABBCKzŽŽ‘ƒƒƒ‹817;900332003560.32?BPKIFUG_f93PQJTMJEMFUPG9:@EGWqo~‡‹2:?9Nnseh—µ{nng]ykpJ;Eq€ß»ur|¢oft”}Šˆ…ktf……gcjlfzxngtixƒ£Õ‚|qagiggm|jn^UQciklkhllÖØÐÒÎÆÆÌÔÔÐÊÌáçéêêééèéçÛÓÐô“hJ9>ENTZ^acdadYI;5.<RCUhWNPQ­®™m;?CCB:;?E5:==CCADDDMKHKRQPSPTTTUUUTVVYXYYXXYYXTSRPPLIB?>??@A>?@DCGDC@@@BBBDMsž„”„€6.49;43340/.7990-75=Qƒ[XH\X†a9BKMLIIIBGSYK@9;HHJR][ZJ9<\dVlntotwƒ†lleq†eBHDUj‚‡orsƒfh“}€ˆyƒulliod\iop›‡_aZl~r”sb^\fijjif‹©lbNdjnsj`_´·£ž¯³²·¿ÆÃÁ¿ÌèéééêèéåèæãÝÒ¿¡‡aA?DLRVZ__aWHDk^}h.In~oVPP•‰?<CHD0`O:>@7==>ACBBEGKJHOROOPSTTSSTTTWYYXYXWYXXVQQROLKF@@@A@B??@ECHDC@@@ABEEIKp™‚‰‹~5/48:43361//2990/;<8jcLuÌŒi^>KKBItGEKNNMMQPOOPUJY]WQ:5SVoiqqmpxy~‰ˆslmt€F8MIP_lkchdZ\o„z|‘z…‘yququnq{w’’oUnf\mim~—†XNUabagilv€dfNlo£–Zb¡{s‡‘™›ª±±±µØãàááÜÙÖÏÑÓÏÏÌ̹oXPMQQTVVNd£Å¸Z—  ”d]g`c^TR}K>EHJ6.|C17@<9==>BADEFILJIQQNNTTRRTTTTVYYXYYWUWUSQPPMLJIBBCBCAA?@DBIECA@BCBDEFJQq‚’o/26;:43455//5<91?<:@~‡Ik¬gHBB£´L7@<?DKQUM[^ZQPPSE`SLUMPVaZfolimoz€{lkuugD8MHSXl€haeqk‡s€ƒ‚‰ƒŠŒ}zz„ƒ{ztvzs^h`VYwwos`WSX^[fndbdaama‹Ÿ¦‡oh‘~qiZdp|‘Ÿ¢¤·ÒÈÂÀ¿º¸´¯³µ´³°¬ª£v_[TPLFBkÈÓÒÓ¡kŒŸ‘TIKT[WSTE:EJN?2[]C?4=F7;<==BGEEJLKKOQOPPTQTTTTTXWXXWWTSVVROONNKKJFDJKECBA@CBHFCBAABCDFEJLOe{}Y€0399722577/69<911=94SˆX\M/^XEJB90<==@@:=FU[WMLO?Bb_TcyR[Zciyzgiknu~|xzymBALEbR`jr^]q¡}‚•Š•‰~Š~|y‚pkqbbWYd]\eta]ZYZ]kf]h|f__T]p‡vc_Tk~aVNKOTanvƒ™¹À¯  ž™••—œ›››š˜˜’Œe^QDBHaÅÔÒÒÓÅ¡t‚¥Ÿ”ŽH?JPQUPPGGKLM70A9I9:BA6:;:=BHHHIIJMNQPSRRTTTTTTVVVVWTSTSQNNNMKILFFRpPECCCEEFGDECACDEEFILMS`gZ0/497/07<61:;<7.+9==BFElY9‰O:?@;/;<DCIC==JVOMH=5U_dU_v`RUglrldpqonxv€‚}lAGOJaMY]š[_wxu}‚—“‡ƒ…‚}~}xsugks]LSivoYifbT\\]hiddddnr__trVZ^^RXiOA;<?BKWaq€¶¥}|z}~‚‡‰‰‰Š‹Œˆt_`¦NYdÀÕÕÔÕÊš‚všŸ™–C?IPQUPOLMNO:7Ae97GC15;259;:>EHGKIIKPNSNRRURRTTTUVVVUSSTONLNNLLJKFGR}}VGCEFGCHDEBACDDDEHKNNS\m22136,,5=54<9<51/9D>@HUbV[A9===>/?ABLF<<@MRULA/.1:BmyulZbspp_m~€|mstolktj=HKU_L`}sWgiu~{‹° …†š”‹yyuwohn_SUXZPPbXVNTWV`hpkfjqk[[xsZ]eic_`J<7BH>CIScuˆ‡oddfgijnswxx}€‡„zf‰Çf]Y‰ÈÕÔÔºœg”Ÿˆ’D>HOQUPPKNTG+0?F(0=H843/166;;DFIHJJJLQOPMRRRRRRRRSUUUTSQONLMNOKJIIIU…£Ž\GEHIEHEEDACCECDHKRPOW{:6285/08:56>9:2.33@B=GkyRP=5<;:?16?MM@6<<GPQPN5328Dx†valXY]hok–ƒmypjknm>KHcUdTfN]bbeux“›‘ŒŒš£”€|zwpjb_eh^TJFCLVQPS]cplgjijY]se^cffahnM?Bt‚]DJTg~‡wk[XWXX\[^aeegmpy}~zk‰ÐmVUb’Ô΢~Ž™gš¤’jD<EOSVQRMQT=<1D805DI;9<00164<=FFFKKNIPQPOOPRPQPRSRRQQQTRNNMMNOLJLLKYŽ¯š”_HJKJIGDFEDDFGGHJSQQP]€A;;:50.7927;:>0-60:B8DxˆvF>3<@9@64;?EB<;?IHLOK538J_f‚pc]tXYbioomw{‚‚‚vsm>M[dCcTKUYd]bmr~ŒŠ•‹ˆ“›†‡|}xsfk}Œ…yOFIEGQWXX€^[`el|\\oX^dghcp‚UFY•z^HLdˆ­¢kZSNKLMLJKNMRT\`gptzjlÈdPOZyÉpn‘Ÿq„”‚FD:BMQUWXT[PD76J,*5_M<;J4//157<?FFCKKMKQPSNONOOOOSPPPQQTPNMMMMNLHMKL\Œ»¥°ŒbMKJJGFbYFEDFIIIQQRPN€?;C;7115:1869B2-618@8CuŸGN<1;A8;<B@>A>>:JZB;@847IWf}dj€qX}YX]fŒqnsx~v~Ž‡BKˆ]GXe^[Z`]ajv}ƒ’ÆÊ­Ž‡–®›Š„‚y{}– ‹‡]QQIPb``¿×]WYgscXl\_fophzŠdX‘²dMq¼Ô¨|dPGB?>98460/7COYdlrg]»]OKTe}ek_Ž„tŽjDZ;ANQUXZXiS<2@@21/^?533;2..248<@DBFKKNLQQQOPMNPOPPOOPPPNLLMMMMKILMN\“°´±ž–pTJJFHyTEDDJHKMMQQN~?@><7/-:70:5>A10675>5?q„7KG2;>7???KFA=<<KD?-,05Q‰htnvdeaZh[[ZYwpfil‰Žt~}pˆR…ILyˆre_ZW`l‚ƒ„|‡ž²‘ƒƒ’Ž‘ƒ‰|wqstjr‚iSQ^]^™r`X[`ikrhomabrwo}v{uȯvYe–äå¯}h[K>/-*4>UYC&0>MXaic]ŽZNIRT[`\b“š–mŽPNs;@OQTSZavQ@1H205GQ;:<@FA/-.228<@BDKFMKNPQSSMNOOOOOOOOONMKMLMMKLLLN^“¨µ±¡ šxUIFWŒ¢–[EDJHILLPPOQMI;92*95563>D327<4<4A‡<3W>0:979?HQBA?;<D<==22P\Ÿˆib„w_\Y`_]]_cje_ghjq…|s’z]@Fxh}xuld\^dn‹~tz†…‚‚ƒ…Š‰†…™„ys€ufbYVXLKSXˆ\OO]_`YcliŒrruv|€¡”­|ɧŽ‹¼äéÝ·‡hZJ8H!LebFV\D.7EOX``ZfYKJOSY\l´²™œoTfˆD>LPTW[rx]K8C103UH;;<?GG9/,//47;A?CJGOMQQORRNNOMNNNMMNMLKMMMMLNMLM^Ž¢­­›™š”Yi‘²¸•\GIIJMJONQ?O<AB-.606<4>C53197>5MYA;>=49995B<C?A=:<<RBD4F_]fj]`etqaaab`afbetv]^Za|¸r{xG^Fqlhoz†{bYjnooly’ŠˆŠŽ˜“‹ˆŠˆ~ƒ€„‹mW[XRR]OGHOPOOOahty}€†…¹ÆÒÈÏÄÃÞèèæϲm^R?d,KlvoRUT93>LSZZXY[UJKSUg»Õ¹§xŸY†‰V>IOTX]m~^UE6130YD8>>>HG>8+,,256?A?AKHMOSQMQROLONNOKKKLLJLLMNNNMMMbª«¬‘ˆŠ³ªª¹·‹fHIKKNJOOR€(<876kL603<38A:0/85=1RDY9?<55>;5?AFBE;5;8//26W_bZaXXbeqsiacffeb_Zduma^m‹”bZ4eCi€lrµÕ¨~afdge’‘‘ŒŒ€ƒ„ž„wzyw‰pXKQMK[NJINO_Yjpw|…„ªáæèàÝ×çéèæÒÀ©Œo^\Z[W]nlld@WS=?KRWWUXXiQP]YÖÖ»›§š•\‹d=HPUX]runXQ4653[A:<?<GBB@2++.148BA>CHGLSSNMPQMLPMNKKKJLKJLMNONKLMc™´«¬™‚‰‚¨ºª²­‘WGIHJLNKMNR€>3'20J><17;49A90592=3PfXAA>56@>1<9>AI@5:8,/2HPTZV]Y]einŠŠldg†eYT[|¤‚pbUQVGBUKggrlhjrghc`ca^s{|…ŠŠ‹“’‘’‘„‡ƒ€Œ{y€~{…l`XYVR^RDCKKVQh{ss~¡ééééççéêêêçηœ‰r^^gje_``_\QU^UIMTVTVWWvUT^g»Ù×½›§²mm•’n<EPXX]|lvPS@D:<[?9AC>E?A>C.),-/5>CB<BGFKJPMNOQOLOLKKKJKLJJMMMMMMOh›± ¢–’“‡|–sƒ¤nDFGKMNNKMNP€F641*651LE819:;7304B9\u5CB=46<;84;;CDA4>:.3:NNZ^Y[^c\c{tŠtedp•okYR[‹fGEa„gAzOYkhskikƒvlmdefenmwvzŠŒ—•˜†|ywsoot€‡~ymfgie]^XKMxU_Lm~ˆs˜èããçèééééééåÜâŒyd]loqkeec]QYbd\YWXWYZU‡YYbk¾××Åš¢¦^ˆ •v?COUW\iesUeWS?HSA:@CD@?GCHF*+,-29GEA=CHGLNVNNQNMMKKJJJJJJJKLLLLMOi¥™•›‘Œ…m`[FKb„tCFGJKLNMLNNE:==<+$*6@T:7?:2//4C:e><@CA29A@:3;9=@@2A739EVaba`c[[W^]_hegigszl_‡UEFPPbpy;mJPxgfikt¡²vwpffY[l„št€‚‹Œ‘˜„€unqx†wpkhsskd`dazU_P~pgŠéÐÃÚåéäÉçæÝÒÆ·²©–jap~{vtppmfcgjjc`\\\]V’Y_fk·ÙØÉ›oj ­‘‚HCOUW]fxf`fsmH[Q?8@B?>DJFFE7(+-.2;CB>=DGJKVRLMOMLKKJIIIJIFJKJJLKM\‘§£…Ž‡]PJDBFSiIGGHKMMMMNO?CFA?F2>',E?IB;>8.2;DGa:EEC65A@>8;:?==5><9GjZbcb_ZW_Y[YZabomcbkys`ƒRV‰cfmg=PHQyokoflllolei[U^pˆwmpu}~„„…†‡sy|tztuigkoupcegedYiLnhŠáÁ±ÀÜçé꯵¾®œ‰yq‚’Šsfq‰ˆwvvspmmnnliecaa[kGOgi°ØØÌ `]s ¤‹RBPUX^eka]^ZYEbK>6>A<AIIHIGE6(+-/07@C>>FHHHKOKJNGJJIIGHIIGHIIIIJMNeªk“^KJDCDCKOIHJIMMLMOO>@?8?I0>B;,ADtsWqwF/LqZLEFG:5;<:<6<@?:8>B:[ƒb‡|af`[efc`__cf_]a¡fQI^Ystn€pXOH]–‡—}v‰‰pnjdvYYQSb`aevwˆ¢™‚‡wuw}zqqro€ƒpjhkng\aiIj׿¢ªÈäéééæ¶|‰‹„’ˆyln†“’€yyxwusttqoljecbX8>|`{ÒØЈW`u ˆ]APTX^lygO^PE:dE>>=A>DIIDJKEM/(,.028=@;?EFEFKKGIKHFHFFFFGHHIIGHJLKM—‚y˜|lNJCBDDCIMMIIMMMNOO<=>7BF5@B>:*';B9yZ^\[‘NHDDD<8AA>@5;BA5=:C<]{olldlj\a``_R[ic]\V_^Njtillngmj_QE[xokgj}}…yqlehj^ZQXgSVWbktšßÏŒ„sz„st|upxw…€xom|˜m^YbO¦È¾¡š¶Öçèèèà¿~ˆŸ©®¬ Œql{ž•ˆ€{xxwwwvsqplhg`N>³JšØØÐoZsw™¡‡jBNSW[gu\IM:9:aD==@FEHHKDKMJMJ.(+.135@A;@EEDFGGEGEDDEFEEGIHHGJEELGLT‚ty‹†sQIFBBDCCGSVLMLMMOP48:5JK/=@==7*+-)4G48TRZQSKC=:B?C=448C3;6B@NY^]^dhhdlbSnkŒrVOI\Y]c‚utklqojVOE[fggqzylvr|jjolm_SgwTVRTkdvz‡‚yomxtq„jlx~‚yrš£yba^L®»¢“§ÆåÙàÜ×ÁŸz‘‘•–œœ‘ŒƒyoxŽŸ¥šˆ~{{{zxwtsollicKrw­ØÙÆs`ƒ|£€v@NSX]stYUJ<9B\EBJLQFINNKMONLKK-(*-29F?@>?BDCEIFDCFDDDHDDIHGFGKHHGIGdtƒ‡z\KFCBCCFGJ_iWMOONL0;>4DC/>;BA=&=@:)--03=33G=o|_PegTNWQK9=7BBWb\`gW[T_~‡œYIHcMKX`yž‡kvz~mnsxlQQdSzsvrb[myhhfeptcW`c^MNQ_{Zq¥±‡olmrpmovoqpv}~€‡‘zvll££‘’²ÙÛ±É˽¦†n…„…‡Š‰†‚{ww|Ž©©¤˜Šƒ}{zxxvrppni`DUY“Ͼhu}€£—{~ANTYbgljfNNSWYbc\SJLOOMRONLGLE,+*.3<?>?=>ADBEHCA@DCDEEDEHCGEGIGEIFQf„ˆ‚wKFEBCCEGINq}gXQML.6<7CF4DABC>)7AC@<W]0=:*,?-C<G5B3DF6?RpWMHNaWYkxkhfUKPe<<>JSZbn™²so{Ÿ}u€ƒ‚OI„Ov}„c`X[i}rh]Z_aY^`bQNTt–p•ÞÞ¼ppwƒŒŒ–…Œ—wx~‚‡€ŠŠ„wz›‹—»Ü´…¤µ§Žwfyz{|€€yvtt}Š—¦¬­ªœ‘Šƒ|zzxwvvrnleL;•Ò›_ŸwŸ§£¬yBNTYbtg‰ž‹wzla{leTNMPROUNPJFKHI***,7?<>@??ACBDEA?BBDBFEDDGGFEFHDGDNY„ƒ‡’NGECBCEHKJUt}gVLL07G=<>-=@GF=.2<BEBoD9HE@C=A3.-*;;):@1.:dSKGIbSQX^nLUJ==MWPQIQ`kwpfnq‹šŒ‚w‚Sc`HZ]jg]\`_]ckaV\dlegaMWXhƒ[™µiZfk†–‡ˆ›–ƒ€€€”‡œŽˆƒzw†‘ŠŒ›¿×r„™‘yhTinttuzwspnmt€ŽŸ¦­­¦›“‹‡€~|{zzywtqikzŒ°{k´r¤°³¬°šGOSZbdyœ±¢’¬v~ž¡™—xeQRTPSKOIGMHOE*)*.5>>=B??@D=@A?@ADBEDEAGEEDFHGFFLPg„“±[LICCFFKLKPYsysZN=<K8680:<@CD27:>A^^=:JH>FCC>EE7/493.5:22I@O[VUUSOehsYTW]W\MRYeonhilu£swYLJbaek‹iXPS_}|t~oc``pjjdNLIZPY^]e¤µ­™’˜x|x›¦†z}ˆŠ„ƒŠœ¹ÅwgovteYD[gkmnrpljgglt…Ž ¤¥¦¡›˜‹…€~}{zzzyuqijob~ªq±¹¹²­ŸIOSZccŠ­¶± ºŽ’¯³´²œ…tdRMPNMDFHHNMB)*+.5:<<<?=@B>@@ABCBDECBDIECEFJGGKKQq”½†MIFFHJLLMNQZu”z\€?:B8866?=@GG546AN>;?ACHBDFHBII@;CE?8=@A>DCxÊÑĬ˜sÁˆcbh`c^XR[efajhfil{€•„oh@Oahh„Å¢WTTXemv–z\X^[OMJKPQQP\hqsÆàà®}€‚tuw}°‹x‚ˆ†…~‡–ª«j]_\TMC7DWdffjifdbbeit„˜ž  š–ƒ€~~||{{yvoijpl‰{yÃü±®²LNV^gcšµ·¼©¾„«­µµª‡Ž€TJMLKCHELLMJ@))*-43:;<;<A?>???DCAADEEDHCDDIHILKL[…–»±_JGIJJMMMOOV]~‰w::EA;5-CGDCA935DWV7?CEGB@BFBIMBEDFA;=CB<IJqÛÝÝÝÞ×Úœeponmher]dcWcksukqsvˆ€’QK[\dde‚·{gc``ek^JHJNLHMUZz„]h|}’Ë”ÆÙ{qrxƒ‚Ž–‡Š¤‚“„{{ƒž‘bSPMT[OC9<P]`a`\[[\`clxƒ‹”—¢—‚~}|{{|zuohire“ÉËÁµÀ¶QLW^gc¡»µ¬¦’€³¢²´£‰€iXNJNKBICMLJHE8)*+-04;;<;=>:=?=?FB=CHDGCCCCIHIKLKQ|©ÀÀ”UIKJJLMMORVTZqs|;E@D=6)FEFJLA;8MWG4;DBDA?AB?ELDF@GC><DGBGMcÓÜÝÝÝâ’us}…•¸qws}hX]dojhjpw„{fBWfdjdhlor^\a`[YSNIIIFFF`hkhSdp¼Þ±gkkmuqjr~‡…ƒ}–¡›‘‡~xx~ŒKATpœ…jUA9FWZVQOPTY`goy‚Œ•—šœ¢œ—ˆƒ~}||}{wtnknw˜¼È¾É¼YKW^gh¦½½­°bŒ®ž§¬Œƒus]ROKOKBIDLIIFB=:+),,-9;<;9<:;?><AD@@CPFFBBBHGKILLP[¤Ã¶wKKKKKKMQQURWXk‚<DA<<71CAGAOG=DTY7:0CBC??CEGCLGEAIE@<HECAP\ÄÝÞàÉ—‡¡¾ª’„†{n‡l\]^cdabgnpuO6Yjtpnihr“ub^YZY^URLEEEDUaˆ’‚y€–ÑczUXgklkjr‡‚Œ§­£“‹€zz€¨¯wY_v—ŽubZN>>IHFADJV\bjt}…Ž—˜š  Ÿ™ƒ~~~}{wtnjq}Œœ²Ä¸ÄiJU^fj¶½¶¡£^žµ–£¨‚nhWUKNNGDHDLDGGC:?<*)+,/:=989997@<>?C>@JSDB@CFDIJLMPO‘¿¾¾¥\LIIKKMPQRQUTWAAB5<95CEBLHFEiu8@:1<CC?;CFKEJKAEIEB<HCE@PX«ÞßßÞàßÛâáßÔ¨Œ •ª„zsghhbc_c}nioNAlR|zvop€Œxg]]]YTNKHDEEFKXfbpvcgyh}tRVas•’…‰‹†ˆ”¼³¨œ†}~‡œÀγm]`efcc`a_ZNBD@>BLW\afow‡•šŸ¢¤¡›”†€|zwtllpuy~…”¢¾ˆ[feinºÀµŸ{f«¢–©—„`rLMIMMEDIDKGDGA6>A;-'+-/7:66:97:?=>AA;AWSFBCEFGJLLQL…µ½Ç­‰TJHKIMOPTPSSPE?D<80@@A>FQFNhiGE:2;CF@9?DLDJKAHFHB?FCG?LT’ÞÞßÞàáááâããÜÇÝÏßÅŒ}tlc_[^Ok†naHU…9su|~~…vmkjbdhfjwdZBIR^R[UUY_[_\b{‰gr˜‚š†…Žº¿¸¯¥š†…“·ÒЪfSTVWY[^^`a_]YVZY[\`aekt‡’˜› ¤¥¢—Ž€€‚|zwupjmruwy~…Ž––™–’‡µ®©Œez‹—žƒuy`lIIEKKBAGIIICF@6>>BA/(,,/8:62897<?<@A==Jg]GGDFIKKMPL´½¾¦ždJIIJMNPTOPPO~E?C?78@EN:DONd78CC69@B@<=BIMMLBGDFBCGGJ>IRzÜÞßáááááââãäããããàÇ}vjd[SMM`]ZC‡KD‚owrzqprmj|vgbYgmOJKOEee]jaWd~l•€¡–gor~‡¢ºÈ¾¿µ©¡œ˜”±ÏÓ¿˜^XY\_aabaaaba^`dgeaeeekr}‡•˜›žŸ¡¦ žœ€~~{vsnhmrvwxy~ƒŽ›¤¯µÅÀ»—tš¦›vjgd^IGFJD@CFHFHAEA;:??DD2'++.56726899?9?>CK[haWHEHKMPQMƒ¾¾¸©{VGHHJLMOTNOOO€=AK<2@CHB>HIn?1B;=B98A@=A>?BJMNAAGHEFCJICCQgÐÝßáááââãääääääääɇwng\UMUY[=`XDkq€}qsrqs~}h`YkW\URVDRW^toXRao’z‘]JWc|˜²ÂÆÁÀ¹²«©©²Ë×̶—o_`ehkklgggghddilkjjjmot|ˆ‘˜›œžžžž¢ œ—Š‚€~|xupiipvwxxx|†™£¯ºÄÀ­»­–•n^Z_HGDDGA<DCFCFAD>;9A@@AF6)++166546899;9=AQccvyeNHKLOSR’¹¶…]JFHEKKLNOMPPO€:HE>5CIAAA?OKL;B>4A;3@C?AA>BEPMDBIHKJ@GDIDR\ºÞßàáâââãäääääääå°’ˆ‚|sjbXXXWa[Ibs|€ˆ…™•²ƒlzukYX^]^ZU]VKNYl}‡|kku„¨¿¿º¿¾Àľ¶´´¶ÅÖ×Æ´Ÿ€igjmqtvomlihiiklllmpprxŠ”šŸžœœ  ˜†€€~~yvqmgirwyzyz{ƒ…Š”˜¦²¹Â»¢Žzhb]\BJEABA?D?D@D???><=B@AFL6'*+-566678889<?D]l|yrWOMQVu±¾µ§bLIHIDGLNLMLNPO€@GD>;CIAEA;~GDEC5<B6>C<?C=ACJPLFJDLEBEDCEQV˜ßßààáââãäääääääও‘‰…~ska_\VGwXfdel|{yw|„…xvpŒr€…Ž•~[PRQOPMBAIZa|zcds€˜¯½¿½Â·¸¾¿¼¹»½ÃÐÕÏĵ©Œrmnpuz~uolhijklmkoosu{…‹”› Ÿž›ššœžž˜Ž…€~~yvrnifmy}~ƒ„‰Œ“›¦´»³“j`RRFICBB@@CA?=B?=<::>C>DJFB2(**395555469<>?Klv…Œ~g\X_ŸÁŶ’NHGHIEFIMLMLOPO€CGF?EGLAGC@+7DGC;9D<:<>??;;@KPNCHCBFE@IBANNwÔÛÔÔÞÞáããääääääå×”’ŽŒ†~wmgdgfOµŽzrnswqvxrofpgqlmpx_TLHPF?BR{‘¡˜š—–– ²½ÁÈ˹¯µ¹ºº»½ÃÉÑÑÇ¿¶®’xsrsy}‚†ƒzplijklnqpqty|„‹”› £žš—————™˜”‹‚~}zvrnibju†‹•šŸ¢¢Ÿš™–“‘–¡®³¡~PJDGACA?BDC?;A=;>ADACHDIFBE3(*-;75533589=?AMe…ˆˆ‡wzr~¶·¸±jJFEHIGHILMMLPOO€EB@BFCDAEohI;O:CB98=>?ACA>?7;EQRIGKFIJ@H>CKRc¾ËËÌÌÐÕÚÞßÞßââàÞÕ¡•“’Œ‹„yqjI…[D¡¼¸¬¥¯¤‘Žmqfx`dig`UQTMJIF_|««°³³²©¤±¾ÆÍÑͬ§­²¶¸¸¾ÄÍÎËľ½´•|vvx{~„‰ƒxqnmmmnnpsux}ƒ‡˜ £˜•“‘“““”‘‡~zyvrnibbn€Š’œ¥®µ¸ººµ°ª£š‘‘š¤¬œoWBDC@<?BC=>BC@LBLKFPSLHADD2()1<3242567;?@?N~|—Š€Ÿš¸¶£›SEFDFGGJJKMMLMNN~FFCBCDC@f‰CDy??H@>;6:C=A@DD89=QTJHMCJLECB@CMW«ÈÊÉÊËÌÏÒÒÓÔÕÖÖ×Õ®˜•“Ž‰„€{uUoXNP¾¿¿¿¾¾¹½½¤¢‡Y\h_VUTUPUk‹¢¨§¥£§ª¬¤Ÿ«¹ÄÎÐÍÆŸ¨®²´¸¾ÄËËÈÄÂó{z{|}€‚‡…}unnooooprux}‡“›ž˜“‰‚|vurnid_hy†”Ÿª´¼ÄÇÇÂÀ»³¬¢—‘Œ›¦¤‘`JD<;?ADBENQUXWb^]WTQIBDDB/)*083335675>@@Aaƒ~‡—•°£¥ŠOGEEFFHKJLMNNMOO~BBBDDE]€X5CaU@<IBBA50BCFDHD=8;KNLJMCAJFAC<ALS“ÆÈÈÉÉËËÍÎÏÒÒÓÕÖÖ·˜––‘ŽŠ„‚~ˆUFWYÆ¿¾¿¾¾¼¼»µ®¼¶uXYZZYZZZb”ª««ªª©ª««£›¥±ÁÇÊÊÅ´Ž˜¢ª®³¹¾ÄÊÊÈÉÇÇ°‹{{{€€€‚‡†zqnooooprrvz~…‹Œ“˜—”ŽŒŠŠ‹‹ŒŒˆ€zvrqnid_gtƒŸ­¸ÂÉÌÌËËÇÁ¹±©›‹‡ˆ‘£©˜uM>;?LN\flg`ahomcZUQLHDEDC+(,16344779<@AAIu‡z…˜…¥§¬ƒKGGFEGILHMMMNLOO~:@ACEd‰u@@>l7?9CIED81@BFDGB>44BLNKKGDIJ=I@>EOu¾¿¾¿¿ÄÈÊÊÌÍÍÑÑÒÒ¼™—•‘ŽŒŠ…„oSJd^®»»¸·µ´³²±¯®¤cYYY[\]\Zv¯®®­««¯µ¼­Ÿ¨¸Àæ„™¥¬±¸ÀÄÊÊÊËÍÌ®‰{{‚……†‡ˆˆ„~wqqutssrtty}~„Š“–”Š‰‰‰††††{tqolheaal}‰“¢­¸ÁÉÌÍÍËÉ»±¨‘ˆ†‡’ ]VU^lu‚zlkqvqwpbRSKHHKF<*+-2956899?@ABH^‹„— ~›°¯¯TIGFFEJLJOKMLKOO~;=@C“–<9CARJGB>CCHC:/ACDEFA=35<JLHKNBLG;HD>KNb³¹»¼¼½ÀÁÁÁÂÄÅÇÊʹ••”’’ŽŒ‰‡XIelb¾¼·¶´²³³²±®ŒUUWUX[^_^rª°¯­¬®·Éº¡£°µµ·»»·¡|‡”¡ª±ºÀÇËÌÎÏÐË©‰{~‚„‰ŠŠŠ‹Š†€zvvyyxttuux{~ˆŠŽ‹Š‰Šˆ†„€{xrqnlge``jy…™¢«µ¾ÄÆÈÈÊÉþ°£’ŒˆƒŠ˜›•}€jy’Šˆwi€{otzyXW^JKOOT;,-.88589;<@BBIR‡ƒ™•†¡¹µ´¬}LHFFDHJKPKIMOOO:7c^77=DCBc[=KKD@E>;1?>=ADB822;GIKKRCKA<@N<JNS¥¹¹»¼¼¾¼¼¼¼¿¿ÁÅƲ’‘’““‹wM>um`’ÁÁ¾»¸¶´³²±­sNQRUWX]]^fŸ®¯­®¯ÇÇ«œ ¢¤©¯²®­‘s›¤­¸¿ÉÎÏÑÒÓã…|‚†‰Š‹‹‹Š‡‚}yy|}}xvwwyz~€‚‡Š‹ŒŽ‹ˆˆ‰‰‡ƒ€{wspnljgc`_er€Š— ©­·¾ÂÄÅÇÆÿ¶¬¥ž–Šƒ„˜Ÿ„|•‰†‰sexvry|cw`WTSkk302?B:89;<BBDJPq‘–Œ¤»µ¸¯›RHFGFGHKNNHVYTP5i»K0DEEDCwaCGHAD=:81:DDHEC@516@IGHPBFD@=NFBNJ‹¶¹»¼¼º¹¹¹¹¶²º»½ž…‰““ŽŽbK;{ma´Èý¹·´³±¯¨ZKKKNQWZ[]b–®®®®¿Ò¹¢™˜—™Ÿ¦««¨£ny„“Ÿ¨³¾ËÐÒÔÔл„{‚„ˆˆ‰‰‰ˆ„‚}yy|~~|ywwz{}…‡ˆ‡‡Šˆ‡††…~zvromljfb`_cq{…‘›¥«µµ¹½ÀÁÁû²ª©œ•Œ„~‰˜ŸŸ‰‘ŠŽrasuzy€w™z|‡mgkvŠ_77K\I=:==BCDLWvš˜„ ¤½½¾¯¦RIFGGHGKONIU[YS€SB9?DBACFAEFAD@<>:4<EHHKD<613ERFEOKGFD5MK>MLu¶¶¹º¹µ¸¹µ¥‰‡ž‘™z€†‹“’RHEiYÏÆÄþ¼¸¶³±®œLFEEGLQUX[^¬­­¹Ï®Ÿ”‘”š¢¤¤Ÿ”qis~Š˜¤¯½ÉÑÒÕÔDz—€z}~€€„ˆ‰ˆƒ~yyz~~~{yy{}}‚…†††‡†…„‚‚€}zwrnkjiea__eoyŠ˜£¨¯³¶¸¾¾½½¿ºµ¬ª¦ž—Œ{~ˆ–¢©š”›˜u]sllx~{ž¢ƒ€‹t{†‹”F;CgiJ:=;BDHWk˜˜Ÿ°»ÇÀ¯˜UJGHIIGJPLHOXjbJ1;DDGE?FwRDB@BIHC=:5;FFCFLA4/<LVJHIGLIB1GRDGK^®µ¹µ£œ ”z†„€Žhkt|ƒŠŽ‘’TI^{cNÈÈÆÄÁ¾¼¸¶²¯GEDDDFJOUWY«­²Åĸ«›ŠŒ’–œ›™•‰femy„’ž¬¼ÇÐÑÒÑÁªŽyxyz{{~ƒ…„ƒ~zzy|~~}||}}…††……„„„‚€~|wtqnligd`__cn{ƒ‹“œ§¬°´´¹½¿¿¼·±¯©§££˜Šz~†‘ ®¶£”ymvrksw†’œ§Œ€–Š‡›—j@Fz€qNFDJP]u›¡Ÿ©¢¸½Ê°¬šTIGGGIIJMMJLP][€/7=@CHF@Xe\>;AKKGD;65=FC?GEA6-29FKIAKCGM:C_C>NS£³™“‡‹ƒ‚ƒ€q|m„X`gnu…Š‘cGzkZÀÉÉÇÆÄÀ¾¸¶´¯‚JDEDCCEJPPUtª­ºº¼¸£‡‡ˆ“’†{]`iuŠ˜©¹ÇÌÐÎÇ· ‡wsttuwy|‚‚‚€}||{{{~~~€€‚ƒ…†…„„ƒƒ‚€€}zwtqljheb_^^es{€ˆ˜£©°±³¹»¼»¹¶µ­¨¥¤¥”‡}|}ƒž°º¤‡‚s†y~x•›¬¢„•Œ“‹ELx›|hds}†¤–­¢¡¥¼ÂÀ«¢›YHGFHHIJMOLMQ[Z~88=EEHFC_g:54CBAD=:74:DGABEC6/:9JNGDLGJO??^E;IL’–‚ˆ†ˆ„qyl}dmcRV\agqx†ƒDz`FÊÌËÉÆÄÂÀ½¹µ³}OHFDCBIKMKPp©¬²²¾°—‰ƒƒ…‡Š‰ˆ‚ys\`epz…•¨·ÃÈÊȽ«–€tqqqrsuw{€}||{{{~~€‚…†††„…ƒƒ‚€|yvsokigea^]^etz€ˆ”¤«¯µ¸¹µ¶··²¬«©¤¦ ›Žƒ|y~ƒ›­· ”sŠ†„™˜Ÿ¨†’‰£“Ž~RNv¬–’ž¦œ£ ”¬ ¦©¸¾·¬¥ŒUHGEHHIJLOLMOOP~77;AEDDfK7<3.7AAFG=73=AHDCDC378:BNJJJFOI=@QH:?Ht~|}…|„vrlldYNMQV_fmt~…ŽS`W·ÍÍÌÊÈÆÅÃÀ»·²|VMHEDDDIGILg¤¬™¾»¤‚€ƒ„ƒ}xqiW]fls¦·ÁÇÆÁ² ‹ynkkklortwy{~||||||}€ƒ„…‡ˆˆˆˆ†„‚€{yvsojifc`\[]fo}„‹–œ¤ª²·µ¶³²±±ª¢ŸŸœ›“Œ€zyz€‹—¨±§xƒ›“™™«œ¦¤Ž•†ž’Œ|`R|¤’›¢©©£«¤ ¡¡¦¦¿¾º°—^HFFEJGIJGLPKNMQ~96=GEGNJ:?=4513CEC=64;<AAKEA15@KBLOLH=LHF>BL<ABe„|~€su{~Šiy€bNLMNT]djs|ƒbXIÇÌÌÌÊÈÇÅÄÀ½»¶y]VPKHFHHFGJR“Ž¨Ã³—…€~}|xvoleW\cjqz£±¼ÁÁ»­š†rgfffgjlptvxz{|{{|}}}€€‚ƒ„…†‡‰‰‰‰ˆ†…‚|yuroihda^\Z]epy}€ˆ‘•˜¡ª°³«®®­¬ª©¤¡šš•”‘‚zxx|Š—£³“‰Ÿ £«¸ªŸžŒŒœ”‘hX~–‡Š¤©§¨ª®ª£§¢®Á·»£pMHIFDHFJKILOKNOP83<CBFC78>=086/2:>>2364>EIE:,.9GDHPYF8<E>;>R:B>W“†vz‚vpwwq‚‡fOMLJLSY^dp{UON`ËËÊÊÉÈÅÃÁÀ½³qe`[RMKLIEEEL‚Œ´¼£‹‚~}{xutplhcV[chn{‰›¬¶¹¹³¥˜ˆthcddegimqtvxxzzz{||~€€‚ƒ„…†ˆ‰‰ŠŠŠˆ‡„€~zuoligc_]Z[_fpu~€„‰—Ÿ¨®©¬®ª¨¨§§¦¡š˜–“Œˆ}xwx}„˜Ÿ¥›œ­›¢¬´˜™€‚€”•‹‰qa„œ€Ÿ›££¯£ ¢§§²À·¸SKEJDFJFKJJMNMOOO€62=A?;799>;-9;75AF@4178DIEG:,2<FLJKWP@3ID9>X8C:LŠliqvlhw{‚|pVMMKHJOSUYcnPFXT½ÄÎÌÍÊÆÅÃÄämig`\TTVNFDF‚~š¼²“‚}{{vsqolifcVZadkw‚–¥®°±« ”†wjdddeegjnqsuxzzz{||~€€‚„…††ˆˆ‰ŠŠ‹‰ˆ„{vpkheb_]Z[_ltxzƒ‹˜¢£§¥©¥¥¤£¢£¡™•’‘Š†€xxwx}„“›£©¯Ÿ–§¶¡˜ƒ‰”•‘”ŠtŒŽ•‘•”–Ÿ¥žŽ ¬¤±½´¢mKKFGEEIGKJJMONOPP€T[YQMH:C;8;/<576;BA29B9BEDD8*16CMEDXQ=7IA9<_7A:>˜‹Œ—˜Œlkrk†pYQNPMKKMNJNV_NAeZŽ›°ÑÖÕÒÐÓÓÒ™qmme`Y[YUNDƒu«¹œ…|{wvrpnmjggbUY^bgr~›£§¦¢›…yojhefffiknptvxxyz{{~€€ƒ……‡ˆˆˆ‰‰Š‰‡…‚}zuqjfb_]\Z[clw|}…Š’“š¡¡¡§¦¥££¢¤žš˜‰Šˆƒywwz†–š§®¤™³©“‚†‡Ÿ’˜“Œˆ‘›¨¢Ž’š£Ÿª ˜¤©£µÂ»ŒTIKGFEEIJJJJLNNOPP€VQB3-3GA<>=.N9:5?AD?8?;9EGG6+04BNHA[UC9GB=>i8A@C€¡˜¤¬­‹ire_SNOQMILNQKEEJUMKa[u”¯·´±¬¬©©…y|vodfb]ƒxuŽ²©Œ}{yxuronnlhgd`TWZ]dn{‰“—šš˜“Ž‡|sokjjjjjjmoqtuvxy{|}€€€‚‚ƒ…‡‡ˆˆ‡†…ƒ}xtoic`\YWY]dpv}~‚‡‘™ž ¢¡¤¦¢¦¢šœ™˜‡‚‚€{www|€‡™Ÿ¨œ†’µ £‡†Œ¥Š›Ž“§¨ª¨ž¤™–š™ŒŸ• Â¼­|JHJGEDFJKKJLNMNPQPI/.8Xk<<<@@/L_:5=BME9<:;C@>7*7;CNPF^XJ=HI<Do:?B\a›•ndcVUYGTXIE>AIJB:@HWJQ^Y|¦®±¶µº¯¯­ª¥¡Ÿ–Ÿ“ˆ‡”vtz™²”}ywvvsoonlkgfdaPSW[aiuˆŽŽŠ†ƒ}vqqolkkllmoorstwxz{|~€‚‚„„…†…ƒƒ€~}yvqlf_]YVUX^hsx{~€ƒ‡‰Ž‘•˜£ §£¢¤£¢™™”†‚}||z{{www|€‡”œŸ¦Œ£Ã“{‡‡€ ¨°²®¨§¬¨‰™ˆ† ¸¹ªlHGIGEDFJMHIMNOOSSQrO9^>8CC;><.GqX4;HOF8B:;JI@;.;;BMMGZZ@FFJ:Eo<<AeN“›š¦”‘…xjwuiea`ffbbhcgH]\[o…”ž¡ž—šœ˜”’ŒŽˆ„ƒ|rv‚Ÿ¨ƒywvusoonmkkgdc`NPUZ^dnw€„‡‡…„€~zvqqooonllmoorstvwxz{|~~~€€€‚‚ƒ„‚~|zwrmjd]YWTTWajrx{~€ƒ„…ˆ‘’˜¢ž›žœŸ¡œ””Œˆ|zxyzzyxxz~ˆ‘œ¥§±¥’€u‚‰ˆv––‘°°±¢¥¯¦ž””Ž¡–¨²µ¥fGEJFEDFHLFJMKNQUVQV8:>=@C=>C>1An~>EMOG9Uš±cDF:-AA6PYO`WC<MJBDn;>IXAxš¤}vywxhbhhebcgpdjjsdfF[^Wiu|™’‹Œ‘’™¦œ‹‰‹ƒˆ†vrv…¥–yuutsqonnmkkggc_PLQUZajrx{z}}|{{xtqrqppooooooqstuvwyz{}~~~€€€€€~|zxurnke_\XTRV[dmrv}€„‰ˆ„…‡‹“šœŸŸŸœž”•”Š‚zwvvwzzzwwx{‰”¡¨¬”Žxzt‰€o„‹˜Ã®¬¦ª›¢³¯ƒ†”¨¯³¨dGDIHGCDGKFJMKMQVZTFJ?BBAA<AHC/CnƒbKLOOÓÐfCFHI9.CM7HVO[UD=OED?l><VM:€š¨ÀŸžŽ‘}ƒ…‹Ž©•¤”¢”•H]_W“•˜¸¹¬°®²ºÆÀ§¢¹º´£§™xwuwŠ¤…ttssronnnmkkggc_PIOTW]dlruttswwwvtssrsrqqoooopqrsttvwxy{{||||}}}}~|zywtrmjfb]WURRV`glquz‚ˆ…Š„‡‰–œ“œ¡ Ÿ—–•”Œˆ„}wsstuuxxxxz}‚ˆ–¡©¤ˆtyi†vlxˆ™¸®®”•Šš«š‰‘Ž’§®³­‚OGHJNEHIMFJLOOSWehJFAHA@<@EIIKU^„]KPM\jNJ9BLJ8/BO=;TXWWA:LGG=g?<hL9{©°¾±»£¥š…®˜”œª¨Ë¦µ¬Ã·¨C\]Uš–³½´º¸¾ÊÉ˽µÈÕȽ·ƒzxtw•›{qqrrqonnoolkjec`WGJNSY]dikklkklnpqqssssrqppooqqrrrtuuuvwxyxy{{{zzywwurplifb^XSQQTYcjnquy{†‡ŠˆŽˆˆŠ“–™•™›™š›”‘Œ‰„}wqppqttuwxyz€ƒ §œyrX|rnl‡²Ÿ“’˜œ¤µ°£“Œ‹‡š±±±¬›|ghmqiLIIIJLOPTXqm€LGJK<=9:DEEGFlwOMQKXhQ>9;C?43@L=<U^Z\FKJIG=f=>iI@l²´´¹Ì²²°¨¿Ï²®¶¸ªÍ¼Ç²ËϾ’^_P¬¨¶½ÁÈÅÆ¿ÑÐÒÒÏÖßÕÛ‘{vrx˜qmnoqponnnnmkjfe_TFIMQWZ]dgghgfiilmnoorsssonnmooopprrssttuvuvwwwvvutrpnlhda]YTQOQV\eimosx|†ŠŠŠŽ†Ž—––˜•š“‹‡‚}xroooprttwyz{‹›¦“oUksrhˆ… •”¤‘ž›¶µŽˆ”¤¯²«œ”–šŽ– ’XHHJKMONQ\„rÝ©ª]66;=[wEGGC]N[­ÁFNJ=BAEE50?LA4I[Y_EJ9JE=e=AbH?Q¦¦¥²º´´º¾ÊÂüÄÄ´ÉÉĹÌ×Ë¢_\ˆÀ¿ÌÆÂÐÏÈÌÏÔÓÓ×ÔÞÔ§…ysp}’…jjlmoonnnnnmkjgd`UDEJNRWZ^aabaaeegillnossrqoonmlmnmopqqrrsrsstrrrqppmljgd`]XTROOSZ`fjlnpvx{€‚Š‡†…ˆŽ”—•—™˜––“Œ‰ƒ|ywspnnnoppsvyz|€…•žZdihvˆ†¦§›—›¢¤¬¥Ÿ€ƒ’¨ªŸsb[`ax¡eKIJKMOMXt‚‚P˜­{eNWONIIMBEMU®§ RHHHHIIK=8C?D2<T^k@A6JFDd>NTFBA™™²´®­¶ÀÿÅÃÆËÀ¼À®¶ÁÒ¾†][–ÀÁ½¼ÂÏÉ»¾ÉÒÍÏÐÈÖ½Š€|yrpwŒ{fglmmmnnnnnmkjfd`YCDGMORVY[\]_^`adfgikmppqpommlllmmmnnoooppppqpponnkihfc_\XTQNOQW^chlmnpuu{{€~ƒ„ƒ…Š“–š’•™–ˆ„€|ywuspmlmmmnpsw{~€€‚‹™gcbƒ}Š§ª“”œ‘—y —•Ž•ž‹]HFEDEJ^vˆuMLMJNPMT{šŒFDLeš´€ILLHQC@UIJFFEFFHHLKB/3:1M85N`qEBD9DFh=[NCC<}¢ ¬¨¥°·Ã¼Ãý·»²¬œ¤°»¸z\Wk®«ª¬³Á­«¯¾ÌÆËËÆÒ—„~yspmt†s`djllmmmmnnmkjgda\JACJMORUXY[]\^_abdfhjnnonmlkjjjjjklllllllllmllkjjgeda^[WTPOORW]afilmnmpsy}}~}~€†Š‘’’–ˆƒ€{xvsrrpmjkklllnw†‰…„…„ƒ‡“whe€z“§‡¡¤ž•„‰Ÿ—“†}mOECEAACDHOdi`KMLPSPT_‚‘ƒPgVE8Qª\PTJQLAEInt]HFFHGGD?,;>?V61FdzMMK9JGe>iFFC9j–œ™ª©¥¦­«¡°±°§·© œ£¢£¼p]S`Ÿ’š¥­¥’“§¯½»Â½Ò¬‹ztpljozm_bhkklkkkmmmkkjfd`UEBDJMOQTUVXX[\^abcfgllmmlkjghhhgiiijjjjiiiiihhgfca_]ZWSQPPQW]acgijmnnqqsw|}|~|}„ŠŽ‘ŽŽ‡Š€|vsrronmlihhhhjnz‰“™•ŽŠ‡†…‹xaqk”¢Ÿ¦˜—–‚—Šˆp`TFEABCA@BBEHM[qQPLQVSQV_’ƒ›kDFCHJKFSHMTCDRv>]jHM;7F>-GGGY<3BexBHH3HJ\@lCDA=^••Ÿ­¢¤¤—š”£¦ª±œ°±©¬©®s[V]¢ˆ‰¢¡™‰˜²±³·¶Ã¼•†}zsmihisg^aeijjkklopppomkeb[L@CGJLNQSUVXY[\^`bbehhijihggfeggffghgggfffeeeebb^\ZWVSQNNQUY`efgiikmmoqstwy{||~†‰‰‹Š‚{vtqppmkjhhedfgho~¦¤Ÿ˜•ŽŒŠ†‰unn™ šœy‡Ž–‚vnSFFBBABA?@CCDFNLSZPNQVVTUVd€´PBOdsR™{QFEOCDr^BCGrHKŸaH:0GBJPC67W}@HO7BTWEd@EDA‹‘•œ·«¡¤•—…¥ž¤ ¢´¹¬¹¢«xXb_Žž¥®ž”¢³³¹»Ñ§ztpjgddmcZ^bfhhkllpqqrrqmhe`SC?CFIMNOQSUWYZ\^``cefghgffdccdeddeddcccccbba`_]ZXURPNOOOTX^`cffghjlmnprrttvz{|…………ƒ…‚€{vtpmllihgffdb`afn€£®¸´­¥›”Š†‹{ˆšš}“•“š•xr]CDCBA?DAAADDCFMIISPMQUUTSXbidf@@@]½SBDFD>_QK>DBRwVWG7/CJNQM84XƒJMMC;aNMQAFF~m˜ š¾³«¨£œ”œ”®²»³­ª«‹XmZe—š£²³­™£°²Ãݺ˜…|upjfcabb`Y^adfghknprtttrnjgb[L@>BEIKMOQRSVVZ[^_`abcddccbbaaabbcbaaaa``]^]\ZYTQQPONNOSW[_adffhhikkloqrstuvx{z„‚€ƒ‚|wsplkjjgfedca_^`do|ŽŸ²ÀÆÁ¼´© ’‹…‰”‰€kŽ’”‰‡Ž€uVBCDCBCB@@CDDAELIJMPPQSSRQT]YW>@A>IsPAAC=77YV>=HccEMJ;83JJJLR9>S†UFJF6bH_F@@ZLž¶£¼¼½³»³§œ˜–¯«¸¬¢·º¨Y|Wh§¨»Ãµ®¥Ÿ©³ßÊ¥‹~umiec_]]][X[_cefhknruwxzwslje_WE=>BDFIKMNPSUYZ[[]_`abbaa``__^_``__^^^\[ZZYXVTQONMLMPRW[]`acdfghhhkkmooptuvvxx{~{‚}|xrplkiffeccba_]\^dq~œ¬¿ËÏÎÊÁ¸¥—Œ†ˆŒoV…”s„uuWBCCC??@@MHEFBFKJKMKOOPQQNMS€hLMZ?Np]P@<>11E:6CCVHDDXM=<HJJILXAPRˆwYPL7bGl?A<ŽFD©½£©ºÄ»¹¼µ¶©š ¬­Â°¨¼ÉÅ^†Nhµ´ºÒ¿´µ¨¹Ó×µ•„xpjfa]^ZZYYVZ]`aegkosw|}~|wqjeb\QA<>ADFIKKNOQUWXXZ\]]^^]]^]]\\]]]\\[[[[ZXVTSRPMLKLMNSW[^a``cdegghhhkkmoopsuuvwxx{{{zxtqmjhedcb`__^\ZYZds‘¢¶ÅÓØØØÓÌ¿®Ž‡”mPˆœ™‚†ŽaAAAC>A@@clIGCGJJLMLQOPQPPNO€NN—É—teQI@70-.4J]f>=BDCFG=DI`YJQZDPP‰[’SO?]Ho:Aob??š®¡«¹Â¿º´µ»³­µ¾¿Á¼ÀÃÓÌ]oGj³¼ÇÈÿ¹¸ÓÞÁž‹{sjeb_][VTRTSXZ\^bflqw{~€~xqlgcaVG=<=AEFIJLLOQTVVWXXY[[[[[[ZYYZZ[YYYYXWVUQQOMKLLNOQTX[^bbdccdfghhkkklllmmorssstyuyzuspmjgda``^^]\\[YXZftƒ–ª½ÌÙâãåßÛÒȳž‹lO—šŠ|†ˆ…xD@@B?@ABr—]GCHKMMMMRPPPPNNNMH§¢ƒeZS_„.**3J[¢ ˆG@DAA@=G^ND\ZNDPUˆ`bŽMIRBd:FŒD=;†¡ž©³¼Äº¶¼ÇÁÂËÕÉ¿ÁÅÏÅÒÉe^Lt®½ÆÂÀ»ºÆÝЫ‚vohc_^[WSOMNRUXX^bgmux~€„…ƒ{toigb\RE;:=ACFIIKNNPSSTTUVXXXYYXXWWXXYWWVVUSRQNNLKKJKMQTX[]abcdeeeegghjkllllmmmnprrsrururpmjhe`_^^\[ZZXWUTZet„“¦¹É×ßäçãàÛÒǶ¢’‚U„›‚rioegoQ?@??@AG«ŽTGNJMOONSPPPNLMK~FL€yVZuÆÉO=8?OSSpgJ@MQJBAAQGCL\LYJUY‚aLšUPSLU<paB:9q’—¥®´¿ÁºÀÏÃÈÌÓʹ¼ËÎÅÉÂP[p¶¾Ä¸··ØؼšŠ}rmec^]YURMKLNRTY[_env}ƒˆ‹„~wrlhc_YPE;9<>BEGHJLMOOPPPRSUUUWVVUUUUVTTSQQPNMLKIJJKKMSW\_abdfeeefeffhjklllllmlmoopqrpnpomjhea^\ZZZXWWSRRQWbq€“¢µÆÐÜâãâáÝØÐƸ©•z‚ZEBCBBIG??>?ACQ‘¢©OMKOP\QSPSOKKKJObRT^ÀÅ•NB;=IEKJE?ADTW^SDLDAEVož—gRTzcLfŽVP]J=Ž>?96eŒ›£ª½º±¿ÂÄÅÁÎÇ·¾ËÁÇŸ\Bwf´¶»¹°¶½ÒÈ¡‘„zpic`[ZVRNLFGKOSVZ^fny…‰Ž‰€zungeb\WPD=::<ACEHJKNMMMMMNPQVSSRQQRRQQQPMMKJIIHIJJKMRZ]abceffeefgefffjklllllllmoooonlmkkifd`_[XXWWUTSPMLMU^n|Œœ¯ÂÐÙßàßÝØÕÐÊÁµ¦”ƒaB=;<;=A@BB@ACEeŸ¥¥£zVLNVgUSNRMLKJI}MFEMy—‚][NC?HKJF;;>GUMLLFBA@H_¨âçÚQt_SQÁ]DfDPt7@<6[ˆ‡•— ³²¨º³¸¼´ÈÄ´¹Éº¶¶®KM…X¨µµž§±¾Ì­˜‰ulf`]YWTPMJEEILQSW\fo}„‰“’Ž…xqlgd`[WQFB;9=>@CEGJJJJJJJLNPPPONOPONMLLJJGGEFHJKNRVZ_acffgggggeffgggjjlllllllmmmommjiggfd`]\XUTTSRQPMIHGO]ky‰˜¨ºÉÔÙÜÝÛÕÒÎɼ²¤”yL>:::8@>A?@ACD{µµ£«Ÿ~`Wc}\SOOMKJJH~DGV_ŠOUZ]_]HHJLB>JAB>CG>DSF@HOº§OLMRhdS¤k;h=uQU786[Œˆ“ž¤¬¶½³®ª·¶Ã±µÀ»¯£¦G]nL¢¸©—©µ¿º¦š~qi`]YVTQNLIBAEKNQY^dp|‡‹••‘‹„}wrkeb^ZYUMF><9;@BEFGEEDCEFILNNMMMKKKJIHEEEEGKLOTV[]acdfefghhjhffgggghijkllllllllllljgfcc`^ZYURQQPONMJEEDJWfs†•¥µÂÎÖØÛØÕÑÌÈû³ªž‘uF<:::A@??ABBFpÏÅÂÅ°²|„ŒnVOOMKJGE€hXbrIJJKNNP\NIA>?EA?>B=K@POPGFfUPKJVzNQqw8`=ƒIJ877P‘£«¢¨±¹¶±¥²¯Å««´¬«ŸU^_Pt­ ª²¾¶§šŽrf\YVRQOMJHA@@HKOV\ep|‡‹’˜–•‘Šzuoida^\ZVRLF@;;=@CCA@???BEHJKJJJIIIGFEDEFJLQTY\^acdeffghhhiijgfgggghiiklllllllllkhhfca`][XVRONMMLJJFBBAITao€’¡°¾ËÓ×ÙØ×ÔÑÊÇÀµª ”ŠuH<::AC=@NOBFbÅßàÔÎÀª™•†y_RPLKJFE€b|ZLFIMSLHGLIF==C?=6H7b‚AMKEXO@QPe…k„UKOMl?RRja6887L”‹¡«°¥®³±³ª¦Á¦œ¡¤¡ ˜˜YP[T¦¢ ©®®œŽ‡€ynb[WQQOKJHFA>=ELNSZbm|‡–™™˜”…~yrlgd`^\[YWRLG>>=?A>=;;;=?DEFFEEDEEDCEGIKNRW\^`acefgggiiijkiiigfhijhiikllllllllkjgfdca\ZWVSPMMMJHFDA@<@FQ\izŒ®½ÈÏÓ×Ø×ÕÓÒÌƹ«Ÿ•Œƒg=:<BG=Ey{KFVÍÖÉÎÉÇŸœzƒpSONJJEE\fwˆdKJNQETDA869;;669jå=;>BBICAIQ¹yx˜ˆ\WR¨FFwMW7964RŸž—žœ¥ž¥¦¥¯£ž­£žŸ‘™™|YE\K§¨®©•„€}{vqf^WPNLLJHEC@<;CJLQWan~‡ššœ›˜‘Šƒ}unkfdb_^][YWUNH@==?<9899:=ABBBCCDDDIKNRTW\]acdeffhhhiijiiiiiiighijiijkllllllkkjhgdca^YWTRPNKKJGFDB@>9>EOZetƒ•§½ÆÌÑÔØØØ×ÖÑȺ­ “‹„}W:>BA?]””\HNh™­¹ÁÚ˺¬Œ‡wUMMIHEE_ai¨tx^JNGMO@?65:5107Ǩ87>G;F:CebH\f~vXY£XC}UC99L78d”œ–©©©¨§œ»ž­§¦§©¥˜”QVEZL®¯¸ƒyzz}~wri[OKKJIFDCA>;:?DKOW_n|‡’šœ Ÿ›”†‚xsnifebaa^][ZWTNJFFFC><;:<@BBCDFHKMQSXZ]]^addfghhjjjjjjjjkjihhjiijjjjkkllllkkjhfgcb`]YUQNNJHHFEDA@>=9;CLV`m|Œ ¸ÆÍÐÒÕØÙÙÜ×ÐÁ±¡“‡‚wL:>=@s”jLGMbš¦™¢ÒÏÑ«ŒŒULKJGEEeŠ@uVLaOJG=GF?72J/44Q|PDL7=EGE=:CMP{}‰b[X„jPin;7LN49RX€–£°­ªºµ¤²¯·­¬­¶§–š™PLS\O¾¸|ww{~|}{xshOGGGFCB@?=:8:?FKTan}‡’šŸ£¢ž—‘‰„{uqligedca`_^]\XWWVTPMJIGFHIILMPTUY\\^_``bcdghiijkklkjjkjkkjiijiijjjjkklllkkjigeeba_[WTOLKGFDDCB?<;:8;AHQ]gr€•³ÇÍÑÒÕÙÚÛÚÙÒĵ¥•‡€€|oC<?IfKGIPp›¤›—ªÊ—‹‹€]MJKEEE@F:?HTBG]_AMH9<3?@6DO`N5p3=D??BEdX‹_bTCr\qljo_89g538HYX_¡¬°¼¹¤«³¸¶«­­¦„•ŸMFY\Rµzuvx{{{}€€|bCCDCA@?;;866:BHRal{†‘›¢¥¤¡™”ƒ}xunkhgfdcda`_^]]][ZZZZWVUUVVWXZ\]^_`bbbcdefhhijjkjkklkmljkkijjjjkkkkklllljjjggddb_]ZUQLIHDCACAA<;889;>ELW`it‹«ÂÍÑÕÖÙÚÛÛÚÕ˼©˜‰€|z`@D[pFEHMi™±©—„ŸÂŠ†ƒvTKKFFEX6>FEˆADKM}AZV787S:L;<JG¹°C72?>mO¨–cOJIl\b\z|I8aB639PP^Tg£´š²³¬¡«´²¬­¦}u‹ LFX^RTrttqzƒw{€ƒ‰‡tNBCB@=<;96435=EN]j}ˆ‘¤¤¤¡œ—‡|xtplkigfeeba`___^^^^^^^^^__bbabbbcccdceehhiikkjjkjkmmmmkkjjjllllllllmmlljiigfdba]]YVQLIGDA??@>;7777;>CISYan‡¨ÁÍÒÖØ×ØÙÙÙØÒį™Œ€}|tLDlSAFVk‹µ¶£•ˆ…ˆ¥Š„†ƒw`LKFGDOMD6IšMOQOK@=YP?:K90;T;dz,36:=<7•Uˆ^FGURZfZ†w>>b<42;kP\a]uœ€§¬º§°±«±—x„’¡JJZ]PUtrkds€qy‚‰Š]D<>;;:7653239AJYl}†•›¤¤¢ œ—Š„~{vrpnligggdba``aa```````baadccdccddeffggiijkkllmlmkmmmmmkkkkmllllllllomlkiigdbba\YVSNKFC@>====;7556;<AGLT\k…§ÃÒ×ÙÙÖÕÖÕÓÒÎ˼¦’„}|zgHYAEYž­µ´š•‹†£“Š{~[KFDC~JQ==v”><HPOJ<CRJ@3I2?OCcm0.+785f@PwTHARNYkeˆr;aA:519`_^hUO}‚£¦¡¡­®­¯zŠ¬GGXZOZrh]SYmjsz€†‰„jL<:9987652115@HViz‡–š¡¢ Ÿœ™“ˆ~zurpnkjihgecbbcbaaaa`abbcdgggggfffggghijkkmmnmnmnmmnnmmllllmnmlllllloolkkhfca`^[XTQLHD@><;:;;:7445:<>CIQYiƒ©ËÚààßÝÖ˼¯¢Ÿž¢ž’‰†ƒ€|wTC?H[o„Ÿ¨¹‰¡ ¢—•˜¢©Œ†“sSFFC~NMD;„ŽIQRSTTJADJF:5-DD<pO19oA7@>=IqsEADDMkpyl>j3551:Šud^l=9y™£¤±¥£Š‚ˆ‹œ°´EW[I]k^WOR_anv|„…€kS<:8875542115>CRe{ˆ’™œšŸ ž™“‹…}yvrpnkkjigeddedcbbbabcdefhijjiiiijjjjkllmmopnooooooonmmnnmnonlllllloolkjhfca_\YVRNIFB><988::942359:<AGMVh‚´ÙäçééæѼ¦—ŒŠ‹ŒŽŽ‰€‚ƒ€rE?AIEPb«¾ºÇÌ˹Ž”‚—‡‘ˆrMFD~LJDJˆ™cZBLTUXB:B<5>JG>?c666dIA68<Dlr?J?A]o~c_SL3613;”œjgZU<no £ª±´“„†’—”š¶àDWZXPihhgg\Xit|ƒ~mV@66755433314:BLav…˜š˜œžœ™”Œ‡ƒ€|yvsqnnkjigfffeeeeddeefghlllmlkkiiijjkkmnnprqqooosrqpoooopronmlllllnnlkigec`^\YSOKFC><8654598541579<>DIRcÌêééééå˪—ŽŒŒ‰ˆ‹ŽŽˆ‚‚cBHLCGMtÆÝáÆ©‰”saq~¤Š‹’pLELIBRŸIlYWWY[IF@??A@=@FS1-5:6?55:B^\A¬vAlsˆ^Om64118:š¹€sbNQYx™¦±· ~{—–žœŸÏ´\WN[ksvxrmZP_px~{kXA444663342245>F\q„•”—œ›š”‘‡„~{wurnonkjigghggffefggghimnqqppmllkklmmnopqssrqprsstsqqqqrrrqnmmlllllljigeca]ZWSOIEB=;7431346520569:=AGNeÀäéêéééçÍ©’‹‹ŒŽ‰ˆ‹ŒŽŠQLCDEJY¬È¥¢€j‹`YYkˆŒ’mHJGGV‘.<QVRFF;@CC@<><CO;;3667=¼58@YpZ=IQnkGk121096Ö˜rHEPZ_|¬©Ÿƒu|°”¨§¯ÚyeO[BpxvtmeZKWirz{thV>1244655432438DWkŠ‘”šš›š•“Žˆ†ƒ€~zwurpomlkjhihghhgghhijloqsttrqonllmnopqqrttttssstttsrsqrssrponmkjjljihfeca]YVQMGB?:931.00344205689;?CMÑÑÑßèèééص–ŒŠŠ‹ŽŽ‰ˆ‰Š‹ŽŒ€wM@CGId¥„g}qfy]QQSeŸ ˜i|IFBUº˜:84=@<:DCB@<;BQMNG755543k@>HXxEDK~sirUQ//4.41“ϼ±]KFS^p£¨€tz¨«´¶¦pfWDN\sqoleYHJ]kuwodS=/127986553413AQh|…Ž•˜™˜—’‹†ƒ€~|xuttponmlkkjihhhghijknpstwxwusqpoooopqrsttuttsuvutusttrtsrpnnmljijihhfdb`]YTOLEA;960,*.0034.25678:<A¹§”š´ÓäåÛмžŽŠŠŽŒ‡‡ˆŠŒŽ€_@CFJ}ŠXQX^c€jNLNN`¤¨«Ÿ~GBCU}ªHA:3-*6;:>B=Jdp<=BBF<5525fACO_F:D[Œ\gl>0/5121~ºº“¨kKMZe”Ÿ|q†©’¥³°yg]NNPFomlibYIDQamme\K5,18:8765533..?Mey‚ˆŒ’–™˜•”‹ˆ„~|yvturqpnnmllkjiiijijlnpsuy{{{xutsrrprrsuuuuwxuvvutusutstsrponmkjiihgffdb`\YROIEA;71,'%)0024.3567789_µ™€~ƒ‘®Íлªž“Œ“”“ŒŠˆˆ‹ŒŽ€HEM]†vPJNTb„€TNLNS]ˆ¨«¢GEHTg‡}JB@@A@;B4H8;=a=<?CB@=336>BFJQ?4?b{gYn<1/3320U¯®‰¥‡]NUb€‡wrmŒ¨§Š}o`M:VRBNige]VJ@DS]`ZO>.,577555432.*)>Kbw€†ˆ‹•š˜–”ŽŠ…€~}zwvutqrponmllkjjkllopqtw{~~~|yxvutssrttvvvwxwvututrsussrqonmlliiihffdda_[WROIDA;4/($%!.012..46865E²¨{u|‡‘¦±œ‹ˆ‡Š‘šžŸ˜’Œ‹ŠŒwMj—„]JLPP]…[NLNPQYƒ¥¯‚FELQ\zoCHFIPOS986>=EU€B;:>:^4244;>EFCDLEemfaXB1-3530@‘™u—ˆ„QWfyvujr˜œ‡¡ nYCHVQ>Oba\XRF<6AILG?1),44312210/*&*EE_r|ƒ†Œ–›—–•‘‹†ƒ~|zywustrqpopnmjjkmnpqrvy|}{zywvvuvuvvxvwwutvvtttuustrpmlkkihgfefddb^ZUPNJEA<4/+'.(+000--26875‹¯ƒosx~„‹‘Œˆ…„„‡‹‘œ©©¢›–ŽŒŽ‘Šx£‰PFINOa‰vRMOOLMX‰ªEDHKZk98>ONFBN9;CA=@ccAB;;7825728=BSSYEMfdXkA</)06308e{pzvƒhlogwir‚°š¡—qTCKUQ>QZVRKE;2/;=?<<8+,431110.-+(&9ND_py|‚Œ–š˜˜–‘Œ‡„ƒ€}||ywuussrqqpomlmnnorsuz}€‚‚€}{yxwwwvvvvuvvvtvuttttvstqomljjjhgfeeedc^ZUOMKEB>51/*/87+./.,-686Zª…hjrw{~ƒ‚€„†‘¢¸Á¼­ ”Ž’“’€•œzIFLMOg†‘”cLMLKJGUŠMA;J`u8?=4/5OJW•·G3;iC?B=:339<:3><@Je[BSjX]l;;4)077-0Nwƒqsxjflcd{hnp‹¥Œœ•sUEJTQ@VBA=;88?FGFCCA=0+20...,++()?RPDWnvx}Œ”˜——•“Š†ƒ€~~~zwxwvvvtsrronooppsuvz}ƒ…‡…‚{{yxxvvutttsvssstttsutrpnlkjjihfedcbbb^[VPMJGB>844//4A5),,+*07;‹‰e]gquxz{}}~~}}}|~Ž®ÉÓÎÁ¯Ÿ“‘‘•–•“†•`HFLNUu„™˜…TLIHGCGW€GB7IXX//.2/<;bs€8359M9<A7:38?A75CC=E]FBOjPaV7;8(/3;.1BFƒp|z`imeatkiw~Š|ŒŽyUHKXSFX>@ADJRUURNMJD>3,1/.,++*,/PfPRCUjtwz€Œ“———••‘Ž‹‡…‚€€~|{{zxxwuuuurqqqrrsuv{|€ƒ†ˆ‰„…‚~}|zywwttsrrtrrrtsstttsqomlkihgfdcbaca\ZUQMJHC>9765525YH)+*(+0GŠgW]fosuvwxxwvttssv‰²ÑØη©™‘“–—–“…“SEILNXs}…šfMHHECDD€A<2<L9--*184:Êa74669:89;?:58<<58FB<CF@EOiHSB?6;+01>037;Kd}{iekg]liduwzvŠ‚tZBJVRHWLSXZ^`^[WUSME;41-+,++)*7Ul\QQCRfnux‰’––˜”–“Š‡ƒƒƒ~~|{zzywwwtutttstuvxz}€„ˆŠˆ‡„‚~}||zxvtursrrqqqqsstttrqnmkjihheeba`c`\YVQNLGFB=:87755>dYB1*',SzYQ\dlqrqpnmmkjjijqŸÀÉÁº°§Ÿ˜———–”‘‹QIIKOV_gesˆvZHGDCCB<;/4J4222211JA4836336798:7307734B;8CB@IJeD@DD7=+.R>0468EEjlc`e`Wal_nlqw†oY@FRMMZ\dccccb_[WQLD937/++*(*F_W[TWOBObkrxˆ‘–’—”•““ŽŒ‡‡‡…‚€~~|{{{{zywwwvutuuuwy{}€„ˆ‰Š‰…„~}{zxttsrqqpppoqqsrrrqmlkjihgeeba`a_\YWSOLIFEA=:::657UaXZ^T7QoPP[bkonkgc_^]\Y\agv‰¡¬©¥¤¥¥š™˜–”’KLIKOQUSOQewlQGCCCA-//1I3433203@85640535785960.641>;9=BEFIDOB7A>77/ee@3268B=A]ZY\YSY`UZ]emwvjZNBPJQXbffedca_[WPLC84:2+,+,IgSRZQYQDM]ipv~‡“˜•••”Ž‰ˆ‰†„€~}}|{zyxxxwvvvvxz{}€ƒ‡‹ŠŠ‡…‚€}|zyvttrqpooooqqrqqqqomkjihgfdb`___\\WSPMJEECA<<;;97<_jM˜iokJPV^hlke\WRWRLKOV`q€˜™––œžœ›š™–”‘‚LLLJNSQLLLPpypHCCDE€,.10C3;232.3@9302263576332/0<30D6FB9GP6<><64077R|?G317:?;8JKPQRKPUMQVX[ZaaZS?MGUTdbca__^\YSNJ?49:1.4:CZQNSZPWRELZhou|…Ž’••–•‘ŽŽ‹ˆ…€€€~~}}|{{zzyyxvvx{|~ƒ…ˆŒ‹‰‡„€€}|{ywttrqpooooppppoppomkjigfedca_^]\\WUQNJGDDB>==<:::J]_Œªr}DJW`hmkdXSbghT=>M]q€Š’‘Ž”˜š˜˜˜—•’Ž‡mMMFMSPKKLMi|€aEDDC€--,95491,///3:5116585676=1008209ABA<MDnWk8424;S[YIAXc<7?96A:?EFBMXJQWVPNTHVM<LBXS^[\YYYXURNJC89=:3GTOaaRV^\NVRFKXfpv}…ŠŒ•˜™—“Œ‰†‚~~~}}|{{zyxxz{}ƒ„†‹Œ‰ˆ†}|ywttrqpooooooooooonmkjigfedca_^\\\XWSPLIEED@?><<<;AX\“¶“wxEO]cmom`MVjpm`D2E`v‚‰‹Ž‰‡Œ““••”‘Žˆ|dUKMRQMLMM^†…ˆ_HDD€9/.5464;608-/,002459998?6../<30>J53BNF;7´G33=V[\ToN.96?98924;@@JQHPTUOFPFSK?J@[PQOMKNNOOMGB:?@?8@`b_jpad``LSOEJWepw|‚‡‰Œ–šš–“‘‘‘‰†ƒ€€€€€€€~~}|{{{{|{|}‚„ˆŠŠ‰‡‚€{ywutrqpooooooooonnnmmjihfdcba_^\\\[WUQOKGFEBA@?=<<<NYYŒƒ~sIR^emrm^GRfqk^LC[n~‚…ˆ„„ƒƒ‡ˆ‹”’Œ‰}Œs[MQRNLMNa„“£^GL€>+7.:?E7.//.00/.68<4668B2-/1?6,KDJJRF:8LŒ:CW^_awF7374<9<977=A>BE@MLQQ?NJKTIK@[HBA?ABBDDCBDFBB>6kdbbm~fji`NSMCGRhry†…Š˜›™—““”’Š„ƒ€‚‚‚‚‚€~}}|||{z|~~€„‡‡‡ˆƒ‚}{ywtsrqqqqqooooommmmmkiifdcb`^]]\[[XWSOMJEECBAA@=<<EYVWneIR[bjnoV?M]jjc[Wj{‚ƒ„ƒ€€~}~ƒˆŒŒˆ‹ƒiRQPNMOTmœŸ£ŽoU€=>2;:?5//..0/.0.;<=.:8552./@A3-JNM@IJI\®‘pJW]ggeH576:947=ILPPOD88;;G@EMRJYR^dGEZB===>AACBEHIHGB:micafw€pvn_KPHCGNjry~€ƒƒŠŽ˜™˜••’•‘Ž‰‡ƒƒƒƒ„„ƒ‚€}||{{z{||}}~‚ƒ…†…ƒ‚~{yxuusqpppppponnmmmmnlkigedca`^]\[[ZWVQNJHEEDBAA?==@SVURLPDPZ_ekmU8ENZdnmet|€}|xpqx†‹Š‹‰‡‰l\PNNOPZu§¥¤©¢ƒ}<:?9=://01120/5C[M9/@:4220;EH@0NNF9FOM[[m;h`]TGEI;97<<<HKVTWYeL9::=HR\WZPY^XdDJW=ABDGFFEEGGHF@@a|dfbl˜l‚ztcKNGDDQivz~€ƒ‚Š–˜•””“•Šˆ„‚ƒ„ƒ†…„„‚}}|{{zzzz|z{|~€‚ƒ…‚€~|zxvvusqppppppnnmllmnnlkgfedb`_^]\\[YXSPKIFEDCBB@@?AHYSLGHAJU\bgdR7=FNWahlqvzz||{zygbir}‚†…„ƒ…~œzXONNOR_}§´³´µ²ª€B/9=<3//01101.JXTIBQ76;F25FGWQ7MKD0FNI:67?[[W3=JHA?;ICGNQ]Z^]b^IDCHN]XJQKYRO\COU?DDFIGEDDDDD??hhuogjn¦y„„_JKGEFSiwz~€‚ƒ‹˜””””“”Šˆ„‚€‚„††ˆˆ‡†ƒ}|{zzxywxxvwxy}€€„€€|zxwvvtsrqppppnnmlllmnlkihedba__^\\[YXUQLJGEEDCB@@@ACVLE@B:DPV[`_S<:AEMU\bimtvwvwwn\cms|€~}}™z\LKNPTdˆ¸¿¼¾¾¶¬6;>><1////0+,,,2:@>IG<8aB7ILPOIAKL=ID6676DXY^<13944;FAIPS\_`[_^_PMOT[NHQLbQQPBQPDCCEEDCAA>?@UIbe€fsq‡ŒŒˆˆ\IHDFIVju}€„‰–”““‘’‹ˆ„‚‚……‡‰‰‰‰‡ƒ||zxxwvvuwvuvx{~‚ƒ€~zzxvvvvssrppppoonllllnlkjigeca`__^\\ZXXTOJJFEDCCB@@AAICDBAD:EKQVXUI6=@ELRY`fkprrskdhowxz||zux||’ŠZMKOR[n ¾¿É¸¶¬¸€:>?>>3000/,,./4MNJFKLKD^˜FKMQPMhPOMNB6567<TWO;91@57<=CKVX\_fdb\ahi]hfYX_bdZc\MRLZGB@@@=9:IdamfSc~`u‰sŽ–ƒ]GEFHNWjt‚„ˆ“•‘ŽŠ„ƒƒƒƒ…‡ŠŠŒŠ‰†ƒ‚€}zxwwurrssssuuz}€‚‚€~{zxvvutssrrppppnmlllmlkkkhfeda``__\[XXTRMJHGFECCBAAACJ87@G58AEKPRN>:>BFMQY\aimkgbfrvzzyxumotz{‚tycPMQVf±´ÄżÀ­µ;AKK<:1.-+-,,+FLMMNKKKI:DHPWMI4PzPBAP886569=7825?49<<AGLX[^a_b[bfllh\geceYfadUP?Rg]DA@?=h‚yjvwdyw\x§ˆ‹WHDGJPYhv€‚ƒŠ‘““ŒŽ‹†‚‚ƒƒ†‰‹‹Š‡„‚€}zwxvtrrqsrruuy|€€‚‚€}{ywvutttssrqqqnmllllkkkkjgecbaa``]\ZXVROLIHHFECCBBBCHA6?BA58?DIMPJ><=@EIQS[ac``douxz|wsjintu€‹ptlQNR_p‘µ¸º½ÆÀ®«?HNOME2/-,..,.@ONMKJJJ:99HJJM7/J\v7qpR7963469357=06877MR@BTX_b`glem]PQU^pˆ“§´TR>J·šˆ‰lf[rh~W]Vm}‹zaˆ¸—”œ†|]FDHMS^gvƒƒ‰‘Ž‹ŒŒŠ‰„€‚„‡ŒŽ‹Š‡…€}zwwtsqrrsrrttyz}‚‚|zwvutttssssrrqonllllllkihhfdbcb``]\ZXURMKJIGFDCBBBBF>039B?87;@GOOING=?DJNRYW[fksvwwwskhmmrx{–‹…qUPTj‚¤¬½¼¿ÆÁ¸¯2ANJKKIGE>7/13GNKIIJKG?>8HJML9/FNRv‡}IT89633:/08:*58EKC>-,EN\jnvteY…nh„®½ÁÃÀÄGNEKªŽ”§”`e_ŠpdWen€ot¦¬ž˜taFFINT]gxƒ‚ƒˆ‹ŠŠŠŠ†„‚~~‚„‡ŽŽŒ‹†„‚€~|wwrrqrrrrqssvz{€‚‚~zxvuttsssssssrpnllmllkkjihgedcb`_^][YVROLKJIGFDDDCDEG::7CQP:7;@HNY|uiC?CEELVbkqtvyvtkgllmlbq—†p`Tar£©º½ÁÉÈƯ5/)EMLLLLOC@HDOMJILKNMK;<GHNF@2=N=x‡?N3>787771488-9:=?GYGBBGO^_lMVa¥°ª°¯±²ªª¯NHOH[feƒ™zh[‰x`ZuwhRi££«¯—…}cFFIOW^gxƒ‚‚…Š‡Š‡…„~~}~„‰ŽŽŠ‡…ƒ|wwsrrqrrpqrruwz~‚‚ƒƒ‚‚€{ywuttsssssssrrpnnmlllljjihgeecb`_]\ZWVRLKJIIGFEEDDEH2(.L^\XQA@La{p|•9;>ALW`goruvvlhhlkgORk ¤‰hc`tyƒ¤¢²ÂÂÆÈË­€21)9:FRLMP,JLNEBIKKLIE7&6@:IL=@1BB3e:3034??8,568GBS>?KP`^UQ?U=@``lˆ¾»§®¦¡§œ—œQAUCKSEg—·š‚‘›yq‘‡dJg‹‹–¬Œxv]FGJPW_h{ƒ†ƒƒŠŒ‹Š††„‚€~zzz|€ƒ‹‹ˆ…ƒ~|xvtssrrrqqqrsvx{€€‚„ƒ‚|zwvusssrrrrrrqqonnmmmljjihggedc`^^\ZYWRNLKJIIGFEEEFGGGDTZblh\RTl¤Œ’£–^:<AKSY_gnoqjcgjkdPRa„´¶¬„v}k‚š¤¥Ã¼ÄÆų‚02*8FOMKOH:KLOBDKG;E=:2)*-9=C321.6356>:0,8?/082`g[G@PYTkG345D5ovuqƒ¡¢’Œƒ•†S<WCSX@gz¤£}–ž’ž†hShi~p‰ƒrsUFGKQY]f|„‡…‚ƒˆŠ‰‰…„‚€|zyww{…‹Šˆ„‚€|ywutrrrrrqqrrtwz|‚„‚ƒ~zxuusssrrrrrrqqqonnmljjjihgggdcb`_^\ZXVQNKKKIHHFFEFIG*3A?NWa_TSWb¨¾™J;=?EKRW]ab`[ahke€ge…§­¹ ´´•xigh¨ªÃÀÄŶ.0,9CJKU^OKLNPCFJ>:E650*'.;9:82..38626E47F8(,4^}YauskvuX;027<0Vww†‰‹jqjo}ˆ]MDYDXfRƒxtqa]k}…‹Žzm^`[md\a_oUFHLSW\h{†‰‡ˆƒ„ˆ‰ˆ‡†…‚€|zvusy~‡‹ŽŽ‹Š‡ƒ€~{xvtqrqqqqpppruwy~„ƒ„{yuussrrqqqqqqqpooonljjjiigggedc``_^[ZXROMKKKJHHHGGJKG=D?PZQOKLPRj­È~;5;?CDJQVQPS\clpw¢Œ” £ž£˜»²—tbWQp£±¼¸¼ÉÅ1+)--:<DGHJINK<<JC>K?@=9=@H;983.19;7/;E9BF8+,EwMfhT8Z•lPG<9DK<b}ˆ–•‹o}qofekNHQ[E^z…«gW]cV_sy{tnhfek`d[cjRHHMSU_jz‡‰†‰„…ˆ‰ˆ††…‚zwtrrz|…‰ŒŽŒ‹‰…‚~{xvuqrpqqpppoquvv{ƒ„‚‚€}zwusrrrqqqqqqppponmmkjjiigggedcb`_^\[XVQNMMKKJIIIIJJC,1>KX`ULJKL·Àj9666@AEFMMNZb}–sš£˜›©­¦Ÿ¯§ŠvZPM]§¹¶»ÃÅÄ€2).+,.I7HIF,DMCHJHNL25@@===;986.9;;<:9FCC>E-/eSbZTOZsTSBYPCM5Ek€Š©¯·Ž}†{Œ‡xUCTYL^wš«ŠrX]gXZea]`i|’‚kkM^aQIGPQW\h|ˆ‰ŠŠ‡ˆ‰‰ˆ†…„€~{vsprz}ƒ‡ŠŒŒŠ†‚~{ywvqroqqpppnpttuz„ƒ„€}{xusrrrqqppppppoonmmkjjiiiggfedba`_]\YWSOMMLKKJIJJKKN@6/8>=<=?EB—À¡[4545:886n—“š™Žž”¬›˜š¡™–§šlTMLT¡ª·Æ¼¿Â2'+++9I4CF<.PJ=IKQN;<(+6@===;76.9:9877EC5/A+Eq_Uaf`ˆgV@BFHH;=BLg‘¬­Ÿ†ˆ‘‚ˆ†¢¯f=V\U]‚¼´¢|tkSR^WT\_t’ƒ€‚rOLSSKKOPW\e|‡‰Œ‹‰‰‹Šˆ‡…‚~}zurprx€‚…ˆŠŽŠˆƒ|zwtrqoqqpppnprsux~‚ƒ‚}zvsrrqpppooomnnonmmkjiihhggfedcba`^][XWSOMMLKKKKKJLN>/:BFPLC:;7²º…C5545589>zš¤¢¥”’ž–‚uy‹•š££•mSLKQŸ¬Ÿ¤»Á»2'*--B0<@D0B;9789MH17('+298883+.6:;=6?EFEDF:cd[M\^oqnB9ELOJ=?ACJq™‘ƒ”‘~¥‘>YWZ[˜¼«¬®œ—‹h`fbnqxƒ•‡‘|^MQTIJOQX\ew„ˆŽŽŠŠ‡ƒ~ztrqrw|€†„ˆŒŽ…€}zwtsrqqqoppnprrsv{}‚‚€|ywtrppppooonnnmommmkjhhhhhgfeddcba_]\ZXVPNMMMMLLLKKMM.0?>61/0-<·®r9:B5469:Lpœ¦¶šŒ‡›¢—‡l__n“Ÿ”’qYIKM“ž}f™¼ž‚/+*+1,(A::599750/8=.1.4778896++-.99:<<@DF7CFDXPCMSp_b:/:@AAHJMNP_p{‚•‰Œ|mvy†˜=WR`V³¶¼º¯ªœš’ƒpkp{‚…‹’†wkUVQJLORW[dv‚ˆŽ‘ŽŒ‹Š†ƒ€ztrqrw|~„‡ŠŽŽŠŒŽŽ„€~{xtrqqqqoppoqqrsvz|‚€|zwusppppoonnnmmnnmlkjhhhhhgfeddcba`_\[ZWTQNNNNMMMLLQN35991*)+)|ºŸ`9KU658<9GIq©”l|~z_POOU€ ¢—„mdHIP•WMx™o€),),2'(19>=8970.-06,3879788860+,1:799::<B7>ERVPLV`eTUM=;AHJJPTU\nŠˆƒ˜ƒuyˆŠŒ@XW[L¢ ¤Ÿ—•“Œ‘†€ƒƒlZYfs…““n\PJMPSVXex‡Ž•”Žˆˆ~ytrqpxxz„…ˆŒ‹ŠŠ„~{xtttrppopooqqrsux{}€€|{yusrpooonnnmmmmmmmljhhhhhgfedddca`_^[ZYVSQOMNNNMMMNQ<""!+31'pš»žY;A?656;:A:W†}tnIFPSMNNOPqšž˜†mkPGKƒ€LJZrU}'(3,3&-/@:-845662.++-9::::95664./:;=8668>C8FTMCM_eYNJWhj_VU[\enus€…†–Œƒ~†y[O[Viœ˜—‘’”Ÿ™‹rpkgt„~kVYm‰„nWLNPSVWcv‚‡‘–”’Š‰‚~ytrqqxx|{„…„Š‡Šˆ‘Œˆƒ}zxtutrqoppooqqrsuwxz}}€‚~|yusrooonnmmmmlmlmmljhghhgggfeddcbb_]]\ZYVRRPPPOOOOOQQ/2,&'&hz¦¯—V;864569=>:FQNNNFBEGJNNOSm‰•–ŒrtbGFPRHKNSP@:4.)%+A@8+736784(+-,-01/<66572059<@;FGII:7ZQLMP]^_jvyc[^^jqt~†|‹’‘‡ƒƒŠ…}~IZZE—‹}uhipˆ˜’wg\Yh†hVUc{ƒVLNPSVVcs€‡•”‘“‘ŽŠ‰…ƒ~ytrqnvw|}‚„…‡…ˆ‹Ž‡†|zyvutrsoppooqqqrtwxy|}|~|zutrpnnnmmmmllllklkjhghhgggfedddcb`_^\[YWUSQQQPPPPPQR;"#''2}`«¦“m<9:9878C:<<<ACCCBGFMONQa”œ“‘kuKIHJGQQKP~D@7,%(?AA<+5698.&+4+()++&,6756.265:;BHFHH6/DWQYUOVl™¡„pnrx‚…ŽŸ£ž”ˆ„{v‡ŠŽŒŠ”µF[OB†n\U\cZb|‡Š{iWZ`ryeSQUbQLLOQSWaq‡‘“”””‘Ž‹Š…ƒ}{trqtsx{~‚„ƒˆŽˆ††}zzvxussorqpoqqsssvv{|}|~|yvuqponnnmmmlmkkkjijighhghggeddcbc`_`_\ZYWUSRRQPPPPQTG%"?<eUŸ—h[ZCL:5C:<<;C?BCBFGNPOYy™“š—l–gLHIQn`LP€ÌF:,$-DBA?+):-.(.46)$$'$%13>66/5845:>EIED2-/Hu}iSJJ[bix}‰“••¢¯¯µ³ ¦™“ˆ“¥¤£¨”^TFC^ƒysijb[dsŽ–‰vaWTRWWUagRJLOQSVbp|‹““”•ŠŠ…‚}zssqsux|€€€‚‚€‡†„„€~||yvwwusprrrpsortrutw{}z|~|yvurqonnnmmmllkkkjijigggghhgfdedcbb``__\YYVUUTSRRRRRVT6)"m@W……–”ŽŽ‚r?M;6?:==>EAEEGIKPQVo”¢©žŸ–¢y¬ŸeZ`n‰bNQ~k¸2(+DDBA?dn)90)48/**)'$&&+0559:2463A:PGW3--9Ksƒ‹‡yot„š£³¸Á¬¼¶£¤››š•šŸ¡£´±³¦QUBXHShio‰˜}qniuˆ‹…rffjnw†uQJLOPSV^ly‹’““”’ŠŠ…‚}zssqswy{€€€€€€„‹‚‚~}}xyxzutsstrrrnrtrutwz}z}~|ywtuqqnnnmmmlljjjihiihgghhhgfeedccba``_^[YXWVVTTTTTTVX7#;38ƒ„|š—Š[6:;;>:=@AEDGGLLMRSn’¢¡˜œ›¨°’¶²••”ySOQ¢W+.=GJGELwD5Q@?;6,++++$#%'/57ACB+5=E?IHaD80/KQ—™”—›•¼³¸¯®Ÿ¨±³®µ¾ÎÛÖÏÓÌ×ÝÅXKVSM^£ˆ{qv‰•”’Š‰ŠŠ•”•š™–”••sSJLOQRT\hx†‘’”‘‹Š‡‡}zssquvy}€€€€€€ƒ‚€€}~{{yxzttttutsroqsrtssy|z}}zzwwvrroonmlllkjjiihhiigghihggffeddcbaa`^^[XXWWVVUUUUVVO'^7]yr…™”sD76;C;<@EKILKKOOQYm’¦ª ¡œœ­¼²Î±¸¥´§bPOOUX,I†Ÿ©ŸykU;:/2;783/,,%/&*16B:;895?A6CH^E4?;<Vm‹‘’†|ZP°½²²¶Ã¾º»ÈÌÕÝÒÐÝæâÒÝYSD]KSaš‘ª¨£«³¸º²ª¤©£¡«·³¥”‘pQKMOPRSXcw…Ž‘‘‹Š‹‰…}xspquwz~€€„‚€}{{yyywvuuuutsoqsrttswwz{|{zyzxutroonmllkjjjihiiihgijiigffededcbba`^]ZXXXXXVWVUWXWP,P€›nkƒ•Ž€O779<K?BEJQPSLOTS[p”²°˜°«¢›¸ÈÀäʳµ³“\PQO}9-Pž…OONLE?/<;75=@:AA5'+15,1<1*A=F0-8+BPYG08EVl›¬±³²·°­¸Â¸·¼¹¿ÅËÀµ¹ÀþĹÐÚWQUZH[f¥¢¸ÝååÜÒ¾·³¬©ª¥«ººµ­—…iNJKMPPTU^w…‹‰‹Œ‰„|wtqrvy||€€€€€€~~}~{{{}zxwwvvvwspqsrtutuwz{}||zyywutoopmmlljjjjijiijjijjihgffeedcbbaa`^[XXXXXWWWVWX\Wo_tjm{Žˆi;758>TGEThƒ”dQUZbr–¨±¬«³£©®ÈÎØéÚ³¶µ~XQRQ?H[Š¨GCCDDCA==5/6C<==<62/6811,0;.AH%'DBMQB.6r¤­¬¬¯±³³°µµ¶»·½À¤£¦©¥—¬³«´ÉÛåçUOY^DddÆÍäãææèéäÒ¬¨Ÿª¬´±©«©®ž‡bOJKMOPST_q‚ŠŽŠŠŒˆ„{vsqruy|}€€€€€€€~~}~||{|{yxyxuvwtsrrrsvttuyy{|||yywvvrornmlmjjjjjjkkjkjkjjhggfeeedcbba`_^]ZZXZYYXXWX[dWa~qkb{€xJ566<\KDZ˜ÐèázUVgˆž¸³³³µœ ¥ÄÊÏâêá°¼¥tVVTQ;H[ZUECCBBBAB?BA50::+&'.2::;0*+)nNC&2H;3.2@–²§¦ª«¯³¯®°²´´³¶®™zg’ ›Ÿ¢±½ÅÄËÎÏIQZ\Hf^ÁÎÇÎÈãççæÞ³’‘“—£¤¬³¨¤Œ_OKMNPPQR\o†ŽŒ‰‹‡ƒ€ztsrqtw}}€€€€€€~|€}}€}yyxuxvtttsrsutttxxz{||{{wxurpqnnmmllklkkllllkkjjihhhggfedbbba_^]ZZZZZZYYZ[\^@wn^ixi9568Qi>H…ÉßèäŒjw¹ÁËĶ¯¶ª ±ÈÐÈåêæȾ“iWYQT<;6+EDEDBAA@>?ABB809;L);;7F0+%(LW?84/)#.ƒm¬¬’†¡©©¨¬³°µ®¶«ž†gRƒœ¤µÀÃÁ±‘ž­¯´O\YRhnÒ׿ÒãâÚÔÕÊÏÐƼ°¨§†’ŠˆzZMLMOPPOQ[n}…‹ŽŽ‹ˆ‡…}yurqprt|}€}}€€€~~~€~€~~zzyvwwvwsttstuttwxz{|{{{zzxssspomlnnmmllllmmmlkkjiihghgfecccaa`^\[Z[[ZZZZ[\]b+yjf``X556<gXDG…ÁÑäã³°»ÅÄÍØϺ¶¿µ¬¿ÅÎÒêéëÒ¼‘dYZTS<?()=DEFA>?AA;@?AB347\O(D;>B1=0(,9/'"$4Rbg„Ž{T_˜“œ¢®¯°­®œ~dUJa˜ª¬·ªŽ©·¬¾Ñ[XadÛáÛÅÐÑÎÏÔÑÀÆÇÉÌÇ·­²Š²›uVMLMOOPOQ[k|„ŠŒˆ‡ˆ„€|wroonpsz|}€{~€€€~€€€€€~{{{xyyxxvvustvsuvy{{||||zzywttqqnnoonnmmmmnnnmllihiihhgfeddcbba`^\[\\[[[[\]^T;Š}f\kw@457SMEHt»ÈÓäÏÇËÉ·¿Î±¨µ±¬­ºÅÒÛéêêÚ¾”a][TS<6')=DEEE>>=<>E69984/2“ŒAF;/470'% !9SZ86;BTuiJW…‰”Ÿ¡¡šŸ¤€[POGe’žžœ¶Á´¼ÄÄÄÜáXWl[¿¿ÉÂÄÅÈɶ²·»³± ™™ ’{ª rVMMNOOOOQYhx„ŠŽŒ‰‰‡„€|wpommpryx{|~~{{~€€‚‚‚€€}}}}zzzxyxwtttwtuvvx{|}~~{zywturropqonnmmnnnoonmljiiihhgfeddcbbbb`^[]\\\[[\^^_bn†`XnY545Ai…KEHi½ÄÐÕÏ¿Äû¼»®¡´Ÿœ³¶ÂÑÝéêêäÅ‹`a\USyyyzzxuxzwxyxwzvqqtrupnnnmohllmnoomjntxzz{|z{{{{}}|wwxihfijhnlfnmhsvvojjtzyyvmkkolqyqnqsxtŽ—‹€~zyyyyyxxwwwwwxzzzz||yw|syzz|zxzzz|‰‹‹‰{zzzyyyy}öyyyzzyqrzwyyxxvvvtujjooknmohhhmmllmqvwxyyzzz{{{{}}|uknekjike`ackllnnnjpqoyyyvmkklls|qkrsxq”™”€~zyyyyyxxwwwwwxzzzxqrsssrd`[[^ajgn|}„Œ‹}|zzyyyy}yyyzzw`eshtytdYuvstooqhppmqnkmfmnovywwwxxzzz{{||{omr„pikphklulnpkljmm`aokpzzwsonlolsyqqo~p–˜˜„|zzzzzz{wwwwwxzzywZhluummnlljjl\wzz{~‚€zzzyyyy}«0yyyyyyumpmkquhfhhttqorkoqlonmjgivvvxxvvvy{{|||zskjrniqoijkhikhhpophegbfirmswvurqqrpoxmqo}w”˜™‰}||{xxy||yyxvvwwwy{sipwsjhidihim]}yz|||ˆzzzyzzz}qÊz}yyzzwutrpvfflhq`tpkjqmpklnlnqwxxxxxvvvz{{|zononpuklnjomfjokmlopebhhhhikpn|wvvpmpqqzrnnxx•˜š‹€~|xxyxxxxwwwwwwxztditmidiomaecgyy{{{z…~zzyz{z}‹z}yyzzwwwutqpwsrtktnokonljkkmuyxxxxxxvuwz{ypkmegiqsphmjqqjddibinmebhnjjimpnywvszxqqqrsnnwx–•ˆ…ƒƒ„}zzzyyxxwwwwwwwyuafrillnih\\_o|z{{{{}ƒzzyz~z}>²x{{yzzzzxyvrswpttptxsrppkjjrxzvwxxxyxwtz{nqlhgignukklinprifeldljpdjiiiliiqlvyxrktvvwqvoos|ˆ‹€€~~}|zxxxxwwwvw`akbmjggd^]_xˆ‚}{{{{ƒ}yzy{y}<Åx{{yzzzzyzwwwurpvwhrrnokpnvx{xxuxxuyuvvuoioottllsmhoqnpmomjjkhkirgmhkilllpnvxxsmoqquxv{xvƒ†€€€~}}}|{{{xwwwxxwwwogcelkeg`__az’„}{{{~}yzzyx}uyyzyyyyzyyxqtwuuwyttxthhirxy|{snosiuwwxqpijlqutrojlfnqomkrmgllmhrikihlonnonqzxsnpsnqrvyv}„€€~}}||||{zyxwwwwwwwwwuo_^````a__l{’†{z|}yyzyx}éyyzyyyyzyyymp|yvxwxqmmhgnswyyoauuxvxxxvrpmgkpqurklijtljkhkrm{pihrmjkjlmrooqvzxpqssnpqqx|‰}~~~}|||{{yxxxwwwwwwwwwuse_````baaqz~…ŽŠ}z}|{{zyx}"øyyzyyyyzyy{x{{wuxztsmoolhuwogjwv{{xnwvxomknjohunfonjlnklmhirnjgtnnngnlqpno~|xqpmopspp{‡}~}}}}||{||{yxxxwwwwwwwwwuttiaaaacbfxy{|‰‡~z‚|}ƒ|zy}ù4xxyyyyzzzzzzyzwtvvhuplldcsswzzzyysilywvmlllijtumoslkhiiosghptolmvefkjgirron|ztunissv|„|~~|||{{{|{{‚~|zyxwxxxxwwvwvvusogbbde~‚{{||{|zy{{~Š†}~ôÀxxyyyyzz{zzyxzwvuvnvpmllgqin|zyxmqkksvvioqljkrprsnomkikikommmrtlsfcbjnqqsus|xvokntƒ‚}~~~}}|{{{|•€{zxwxxxxxwvwvvvwutst”‹|zzzzzzy{{Ž†‚©xxxyyyyzz{zzxutvvmjjqpmnsh_\cyyutropmmvqqpqnltpqonmkmllmimmllilintjgiiov‚‚‚…ƒ‚‚ƒ}yˆ}}}{{|||||{||›’z{zywxxxxxwvwvvvwvuuw}{‚…{zzzzzzy{{{Š‡„ƒ=yyyzzzzyzywspputjlmmqrvuh__xwnjqspoijwusxmxtollnijklkjfigqjkhiikpmffkx…†……„„ƒ‚‚ƒ…„€~~}|zz{}~~}|{|—Ž}{{zzxxxxwwwwwwwwwwvvvxxyyzzzzyyyy{{{|ƒ‡…þCyyyzzzxxxwgilvvsqumkmlklkjrmgglmjnlhoyxnpptspupklhbkihakhlpokljlnlidn}~~€€ƒ……ƒƒƒƒ„‚~{{|zwpo‚Œƒ}{|||yzyxxxwwwwwwwwwwwwwxyxxzzzzyyyyzzzz{€‚ú·yyyyyxxywrlotuvxywxytihnlhiniimnmkllsxwnlusrrqkkkg`mlj_eemopnoljlelos|~~~~ƒ~||{zzyyxutgdi‹Ž|||{{{{|{zzzzzxxwwwwwwvvwwwwwwxyy}|zyyy{zyyyzz}%ˆyyyyyxxyzwvutvyxxpqwwknyzphmghmjllnntxvqqrooorronllmojchdlopopljponmw~€€~~}}{{yxyvvvvlpidiŠŠŽ{zz{{{y{zzzzzzxxwwwwwwvvwwwwwwxyy€‰~{{z{zzyyyy}öÀyyyyyxxyzywuuxyxwwvytlmzvnmlmllkllomqxvtpimokrsmjjmnlaXcjmnpvpkhppmnv€‚†ƒƒ€|||||z{xwtwkqnjp‹‡|{{|||{|{yxzzzxxxxxwwwvvwwwwwwxyzƒ’‰{{~~zyyyx}€åwxx{yxxyzywuwyzxpnvyru|usiikmlljllmipvxmnloikosqnjkhiiebdnnrlmjbqpnozƒˆŽ‡ƒ{||~||{yywwprrrq„‡„|{{{}||{zz{{{zxxxxxwwwwwwwwwwxy{…‡€~†ˆ|zxxx}uqzuxzzwxyzywuwxzyuvwywswionijmnmjooolsuvloptplmgjihkiic`_`eknomnkrjel}‰„‚„~|ƒyy{zyxxuorqjŠŠ†‰|||~‚{||{z{zz{{zyxxxxxwwwwwwwwxy{…‹†…Žyxxx}̉wxxvyyyxzywvwxzywxwyzzoomomklnonnrttswwonommkjcgihjgjhcf]^fnnnnjukiv‚‚‚€…ƒ}z|}{||yyxxvqqlj†…Š€}|~}|{{zyyzz{{zyxxxxxxxxxxxxxyz‡‹‰‡„…ˆ„|zwww|]
+suonprqprtsyuruytvwy|xwwx{{|}|}‰˜œ™–˜Š†…•–‰…Ž™›šœ‚Œ|{zyy{~}{zyyyzzzzzyyyyxxxwwwwwwwxxxxxwwwwwwwwwwwwwwwwwwxxxxxxx}~||€’…Ž‘’“‘‘‘“€‹{}æ?sxspoqqpstsbcuwx{}}xwwwx{{|||~„šš™‘ˆ†Ž•–™–šœšš˜„ˆ|{zyyz~}{zyyyzzzzzzzyyxxxwwwwwwwxxxxxwwwwwwwwwwwwwwwwwwxxxxxxx~~}}€’’’•”“’’‘“Œ†Œ~{}>~~~}}}}~~|zyyywscorzwvvqstmgouuvtkoutr{|~~~~~~~zgan„pppoupoxvt|[Lott{‚ƒƒ„upszvRotswt{fcXj€~~€€~}}~~~~€€€€€~v|l‚‚„‚€~|||nklm}€€€}€X~~~}}|pz}{{zw^bwxcrntwushttmmruuvssuytq{|~~~~~~}rnqj{†wvlgkjvuyxl`mswyƒƒ„tnsspLmvpvt~d[Y^{~€€€~|}~~~~~€€€€€~ƒzsfnz„““„z„~ukk~€€€€[³~~~}}|bjyptwnOXrwpsssyrutuxvtpyxyvvxyvqz}~~~~~rjr6prvv}tq{ls|vxqspYasqw„……~stutrswuuuvv\Z[v~€€|zzz~~”trytt}|vvl’}~~wuy€€€€€€0;~~~~}}|qxstxzkl]gvuvqyrtwsvvuxxxzyyzyuqu|~~zlhvtlrsk[jpnoihuwwmdk\hmxuv„ƒupw€|vwpupvu\XYm|}€||w~~~}}tgspqkrnu|zx‘yo~€€€‰»~~~~~~~{|y{w_^ofcauvssxsvstutwwvvz{{ztrp|}}~vsosgsjebar]moqpurtrokppooknxvƒ„x_]vƒzywql{r\ZYizzxv‚‚€€~~€€}ztuqspnqx‚Ž†‰€~q{€}{€€¬~~~~~~~|{{tteuqouvuws{wrrwustwvzz{|{srr|}vjqqkkbosudmvtwri_imuwshlpsrphrytƒ…vavuxƒvwpk}r[\fv||€‚‚€„‚€€€€}|tipurkzr†’Ž’„|~|v€~v}€!~~~~~~}}xww{xxb{uyzzxwruutuwxwz{{{{sr{}r]joolmhsnowwxzuqfktrusmuqnlorpsxt{{pwxw}‚tpt€qctz€€€€€€‚‚okmuwxzu†’’’‚qs~€€uz€€z~€T™~~~~}}zyyyzquwsswrqvwwwxywxx||y|zswyvqpntv_stpkbanvvvlouxwvnxnqfgoupmfsv‚{swptz~yvv~pz~~€‚‚‚€€€{ny…}~€€Œ‚ifw{y€~}€ÖQ~~~~~}}|ztxxzstxwzxtuxurxx|{vrrwt{zstowmhrptsrvntnltxtqxt€pvaxtr`ikhitvqp‚‚ztyyutx€{|yx~€€€€‚‚€€€€€€€€|‘’ˆ€ihhs{~€}|€€}€@9~~~~~}}|znlyzhwuyzxrrvxvy|{umxz|{~ttugwz_u^rspjvol`utqjlvuGwmnytnnlkttsruu€‚ttzyyl}y{xw~€€‚‚‚€€€€€€€€„‘‡‚ukhnz~z{~}€~~~~~}}|||zz{qxww|{vusnxytoszz~~|rxrrqvvwYggwqautmwnnwptxvJuinzuts`rsutquw~‚xtstvz{xsx~€€‚‚‚‚‚‚€€€€€€€€ƒ„Šƒƒ€ynq{€t}{w~~{ýÊ~~~~~~}|{}||ynryqzysrllxwy{||}yxuyrqrqr|k`fsnvwkcm`ljfrkwrsuuxdonq{€ttt`v€~qqwlw}~tt€€s|€€€€€€€€‚ƒ„‡Ž|v€€€€|~€€{~zknvw|׶~~~~~~~}|||}|rroxsyuturqxrs||}|wkuvxqqqlmst]svxsuuklkihywrtmvzqimijowwqscfw|~vkpxvty~€‚‚‚~d^zr€€€€€€€€€€€€€€‚„†‡ƒ|zjp~€€€€€€zgjptzÒ:~~~~~~~}|||xujhvvrvwtuyunie||}mwtwswgrisenpuwzxukqsph[jmvpomndn{sprnsqtussruwuqrqvu{€‚ƒ‚‚‚~|zU`w|€€€€€€€€€€€€€€‚~y}ut€€€€€€~mjpq{ýœ~~~~~~~~~}zvvoixtutvsv{ztnjy{xwtevxhkrs`jr]ronmxpfqrfprjjQfqwupjtysuqqtrvwxxw|}ywwwz€€ƒ‚„ƒ€zuwwvWe|{|}€€€€€€€€€€€€€€€€€€€€}tqr}Ò<~~~~~~~~||juQbvtwyvutwwvssxspsxuptxojtqywvsqsqzrrovj]v…zphnuwvtjrwƒty}~zz{wutwxxyz|€‚‚ƒƒŠ†pabuuvwezz|t|~€€€€€€€€€€€€€€€€€€~€€€€€€€€€~vr|†S~~~~~}}}{zrrnex{|y{|yvyzsrnsuuwzytuusrovvgskortww{~qs€Š‡ywyvvpw~†rwz~~~}yy|}~~‚ƒ…†ŽŒjbat{xxzzw~y}}€€€€€€€€€€€€€€€€y}~€€€~€€~|}Rq~~~~~}}}}{zmis|{|wvz{vu{{siptqusuuyvvtpshvtsmmtmmxws€ˆˆ‡~wurtswv|€~~~€}~€€€‚ƒƒ„…ˆˆŽŒhhbv|yyyy{y|}}€€€€€€€€€€€€€€€€uo{~~€~€€~|NO~~~~~}}}|||bgv{|z|x{yvv{zkmlruunrprvuqrpyxvvrtsvv}vv…‡‡‡€urjuvƒ}|yxx}{x||{€€‚‚ƒƒ„†‰‰Œ‰hodw{xxvv||}x{x}€€€€€€€€€€€€€€~tiqz~||~€¤Çw}~}~~~~||}^tw}|yvy|xy}}doottuukqomonisouwwuqwnx}€‚~ƒƒ†‰}skpv|†~ywxvgprv€€€~‚‚„…†‡ˆ‡ˆfomm}ywup||w}~~€€€€€€€€€€€€€~sijoz~qp}€€€€€OÆrrw|}}~~||{px|||yz{||x{vquspuvusjsydcmpuvletrw~~€€€ƒƒƒƒ…ƒruw€†~‡„€wpopuuz€‚}|„„ƒƒ†ˆ†ŠŠiirg|xvspw~|x}~€€€€€€€€€€€€€€~simrriily~€€€€<4|yxty}{{|{bz{|||||}~zsssrklwisv`mpuusyxwtuuxƒ‚„„‚†Š„vtt‚„}‡„}srqwyuz€‚€ƒƒƒƒƒ„„†‡†‹‹nbqgxxuqqu{{z}~~€€€€€€€€€€€qlorttqt€€€€€f||{zwo||yztq{{|||||}~}urqvwwxuwoirvuqostxxgtvƒ†…‚„„‚€„„‚‚ƒ†xs}†‡{…}ssrprrx}‚‚„„„„„„„†‡„‰Œrqh`oyurpttz}}~~~€€€€€€€€€€€€umru}}~|€€€€Z€||z{|xphReqj|||||||}~xoqrrwvvs]ovwtlnrmntoz~†‡………†~g~‚„ƒƒƒ~†‡…{„wyrvtt{|ƒƒ„……………„~„Œxxedgyutsw}y~~~~~~€€€€€€€€€€~pws{|€€€€€ü }}z{||}{uznpsyy{~||{}ƒ„{utohgsusrowsrpsstos|„„„†††…ƒy€‚„ƒƒ…ƒ‰‡„y{vorv{€‚ƒ‚€‚†††…††~{‹ssd`fwuqqx|vyz{~}}}}~‚€€€€€€}trv|~€€}~€€¹€~|{{||}|{hx|zwuuttwmqxwvpptrwwxmhsipprlqkzyˆ„…‡‰‡…€=n~€ƒƒ…‚‰†…|}tuw|~‚‚„„„„€~}ƒ„„………„ƒul_]cxuriejrkpy}}|}}}€€€€€€€xto{}€€€|{}P{|{||}|zny|{{|~{|z|zƒ…zfnvwxwrrvqkseuxtf}†ˆ†…‡‰ˆ…t\xƒƒ…‚‰…ƒ€}v|€‚ƒƒƒ„‚‚„……………utl[X]{us^][g]^is{{}}}~€€€€€€~wgw}€€€€zuŠ}|||{{||mx||{{{{{{|~„‹‰Wkukvuvuutwvqhotzfz†ˆˆˆ†‡…„ƒkGN‚„„…ƒ†‚€~x}}|~‚„ƒƒ„„ƒ‚€€ƒ„…†……ƒ}sUWXztqZYb^^akpy{}}|}~€€€€€€€€€~xfk{~€€€|}sç}|||{{{qn|||{{{{{{|~‚‰‡}|‚yyy|wtvwytht{€ƒ…†………†…„ƒƒ\…|€†‰‡„‚~}~}tz|z}‚ƒƒ‚‚ƒƒ„ƒ€€€ƒƒ„……„„zlaxtrX\oaaios{|}}}~}}€€€€€€€€€}€€€~|fet~€€€€
+á||}{{zz]x}}||{{{{{|~€‡‡‡††…„„„†ƒƒ…szwp}ƒ………ƒƒ„‡‡†…‡ˆ‡ceuŠ‡ƒ|w{~}xo|€‚‚‚ƒƒ„ƒ…ƒ‚€€€‚‚ƒ„………ƒ‚€~xu\cmfeptz}}~}}}~yx}€€€€€€€€~|~€~|gfp~€€€€9â||}{{zjz|~}||{{{{{|~†‰ˆ††………†‡‡ˆˆ†ks……„‡†…ƒƒ„‡ˆˆ‰„‰†^a„€~zwwzzysr{€‚‚‚‚‚ƒƒ„ƒ…ƒ‚€€€‚„…†……ƒƒƒƒ„~zvpjmux|}}~}}}~vss}€€€€€€€xu{}~yfhx~€€€€c®||}{{om{|||||{{{{{|}€†‰‡†………„„††‡‡†ƒjyˆ‰ˆ‹Œ‰‡‡‡…‡‡‹‹‹Œl††}xxywzwvrs{€‚‚‚ƒ„„„„„ƒ€ƒ‚‚„…†……ƒ‚‚€€‚€zty|~~~~}}}{vtqr}€€€€€€€zwswymdn~€€€€÷¶|||zwej||||{{{|{{{{}~€ƒˆ‰ˆ‡†…„„ƒ„„„…„hzŠŠŠŠ‹‹Š‰ˆˆ‰ŠŽŽ†}xvwzyywttty‚‚„ƒƒƒ„„„„„„ƒ‚‚ƒƒƒƒ‚„„………‚€|yy{{~|~~~~}yvrnport~€€€€€€xpsphiw~€€€€€€€Kz}}{biyr||||{{{|{{{{{|€‚‰Š‰‡…„‚‚‚‚€{uvˆŒŒŒŠŠŠŠŽ’““†€{ww||zxvsssy‚‚ƒƒƒƒ„„„„„„…ƒƒƒ„„„„„„………‚}yvvvz|€„‚€~|xmbfecglrqu€€€€€}tqpiiy~€€€€€€€“œ}zSx}mx||||{{{|{{{{{|€Ž‹‹ˆ€our‰‘‘Ž‹‹‹Š’“„‚~zyx}{ywtts{‚‚ƒƒƒƒ„„„„„„…ƒƒƒ„………„„………‚~{xxxx{~ƒ‚wf\RZ^^^afnnt}~€~xnoggq}€€€€rbzQz|}Y|z|}}{{{||zzzz{}€‹‘‘‘‘‘Š†ƒ‚€torˆ‹Ž‘ŠŠŒ‹Ž‘’…~}{z€€~zusrr|‚‚‚ƒ„„„„„…………………………………ƒƒ}{yyz{|~„…v]PXb_YTZ\aVw}{~~}vnnefk~€€€€Rr}}}zl|||}}{{{||zzzz}w‡‘‘Š…„‚vkwˆŠ‹ŠŒŒŒŠ{~~}‚zusst}‚‚‚ƒ„„„„„…………………………………ƒƒ~}}zzz{|~ƒ…}_S^_]PGTOO[|qx|zsmlkefm~€€€€ÕÁ|||{l{}||}}|{{||{{{z{t|ƒŽ‘‘ŒŠˆ†|s…‡‰‰ŠŽŽ‰‰‹‹‹€{ƒ‚€€ƒ‚{vuux‚‚‚‚ƒ…………………………………………„ƒƒ‚€}}z{{|}€‚…„‚~jYOPLIOOQ[{mnkkkkkiegs}€€€€€€€y||{py~}||}}|{{||{{zz{v|~Œ‘Œ‹‰‚x„…‡ˆ‰Š‰ˆ‰‹‹‹†y~ƒƒƒƒƒƒ‚{wvvz€‚‚‚‚ƒ……………………………………„„„ƒ‚€~~{~~€‚‚„……„~gNGAIVVQYumpjkkkkiel{~€€€€€€€†|yty}~~}|}}|{{||{zxy{u|{|ŒŒŽŽŽ‹Š|t{{ttut‚†ˆˆ‹‰‡yƒƒƒ‚‚‚ƒƒƒzxy{€‚‚‚‚ƒ……………………………………„„„ƒƒ‚~}~ƒƒ„……„„€^ILF[WLOnnllmjmjggs|€€€€€€ë¼pwz{}}}}~|{{{{{zzw{{v{{jifw†ŒˆŠ‰ˆynrzqonotvvzx€‚{~ƒƒƒ‚ƒƒƒƒƒ}}~€€‚‚ƒ„„„„„…………………………………„„„ƒ‚€~~~€ƒƒ„………„ƒkUHTWSPffhiklolhiy~€€€€€€€€´Ÿw~||~}{z‚}{yz{{zzvz{v{tp`Xdjsquxvvwumrwlssnporsuƒ€}ƒƒƒƒ‚„ƒƒƒƒ‚€€€‚ƒƒ„„„„„„„………………………„„ƒ„„ƒƒ‚‚€€€ƒƒ„……………qT`^dSaffghmongi|~€€€€€€€€@"}}}|~}{y‚‚v~yz{zzzuz{w{ptVJ]ajgi^WY[dlmiUdeW\hWe~ƒ€|ƒƒƒƒƒ„ƒƒƒƒƒ‚‚‚‚‚ƒƒƒ„„„„„„„………………………„„ƒ„„ƒƒ‚‚‚€€€€€€ƒ„„……………„oabiZdhmjhnpoggw||~€€€€~~F^y{}~}‚||}€€|{zx{yv{zxypzCBBBD;GG;B>AiSOCCKFFH?j~‚ƒ‚‚ƒƒ‚„ƒƒƒƒƒƒƒƒƒƒƒƒƒ„„„„„„„……………„„„„„„ƒƒƒƒƒ‚‚‚‚‚ƒ„……………………„ƒomi`fiiielplgmrroz€€€€wyáp~vy~~~‚yzƒƒzx|xo{zuwvyTICA9:7<=D?>iCB?9B>>AW|€‚‚‚‚‚‚„„ƒƒƒƒƒƒƒƒƒƒ„„„ƒƒƒ„„„„„…………„„„„ƒƒƒƒƒƒƒƒƒƒƒƒ‚‚ƒ„……………„„„ƒƒ…ƒrobeijljmmox|}zx~€€€uwz‘x|}s}~‚|}€}z{xyzjy{ruyyaMGHGHBCHEFIjXTHPJIDPy~‚‚‚‚‚‚‚‚‚ƒƒ‚‚‚ƒƒƒƒƒ„„ƒƒƒƒ„„„„„„„„„„„„„ƒƒ‚‚ƒƒƒƒƒƒƒƒƒ‚‚‚ƒ„…„„„„„„‚‚€ƒ„‚rifinmpty}~~~€|€€~{¥x}{u~~~ƒ}|{{|~{yiyzor|yVLIGHPKIEA@FmjSI@NBEs|€‚€‚‚‚‚‚‚‚‚ƒƒ‚‚‚‚ƒƒƒƒƒƒƒƒƒƒ„„„„„„„ƒƒƒƒ‚‚‚‚‚ƒƒƒƒ„„„„ƒƒƒƒƒ„„„„„„„ƒ‚‚{z}ƒ‚_knjkpx}~~~€€€€€}áN|||w{~~}~|vscvxony`d>B>?AIMD@A:hiH;@DBo}ƒ‚‚‚‚‚‚‚‚‚ƒƒƒ‚ƒƒƒƒƒƒƒƒƒƒƒƒ„ƒƒƒ‚‚‚‚‚‚ƒƒƒƒƒ„„„„„ƒƒƒ„„„„ƒƒƒƒ‚~zuuw{zorkpqv~~~~}~€€€}K‘€tpyz~~~t}ƒ‚~~~{pbbyrotupFB:<>=56992`h>5=>^xƒ‚‚ƒƒ‚€€‚ƒƒ‚‚‚ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ„ƒ‚‚‚ƒƒƒƒ„„„„„„„„„„„„„ƒƒƒƒ€|xtrruzxpmrst}~}nz~~~~€€¶¬zynv€€{{~~}~uoetosva{vQG=;9834476ea;8@Fv|€ƒ‚‚‚€€€€‚ƒƒƒ‚ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ‚‚ƒ‚‚‚‚ƒƒƒƒ„……„„„„„„„„ƒƒƒƒƒ‚‚€}yusstvz€}z~~}~}yjnz~{}~~€€…}~vx{€€~{€~}u~|ouSuvqyyTNDB??:89=CoeFFEmy}€ƒ‚‚‚~}€ƒƒƒ‚ƒƒƒ‚ƒƒƒƒƒƒƒƒ‚‚‚‚‚‚‚‚‚ƒƒ„„„„„……„„„„„ƒƒƒƒƒƒƒƒ‚~yusstvz{€€}}uefmvv|}~€ŽÑ{z~}}}}~{}~{gygqjq{yPLBCAAB=EDJhmPK]x|‚‚ƒ‚‚‚‚€~}}~€‚‚ƒƒƒƒ‚‚ƒ‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒƒƒƒ„„„„„„……„„„„„ƒƒƒƒ‚‚‚‚€~yvutuvwz€ƒ‚xzwdecjqy}€+Â}wx|~}}~zs~}|unujohu{zPKIGHGIFILOhn[G|€‚ƒ‚‚ƒ‚‚ƒ‚‚}}|~€ƒƒƒƒ‚‚‚‚‚‚‚‚‚‚‚‚‚‚‚ƒƒƒƒƒ„„„„„„……„„„„„ƒ‚‚‚‚‚‚‚€{wuttuvy~‚„~ov{lfefmu}€Ò`{}|~z{|}~xy{€~zxrwohe{q|i[GB<FC@BHNoneƒ„ƒ‚ƒ‚ƒ‚‚‚‚}|z}}€€‚ƒƒƒƒƒƒƒƒ‚‚‚‚‚‚‚‚ƒƒƒƒƒ‚‚‚ƒƒƒ„„„„„……„„„„„„ƒ‚‚‚‚‚‚‚€~wtsstux}‚„„€{x}ykikemr{~~€~³ƒ€y|{{~€~{zl~wm~yqhfuz{jf_G@FD@CYNporƒ€ƒ„‚‚ƒ‚‚‚|{y{~€ƒƒ‚‚ƒƒƒƒƒƒƒƒƒ‚‚‚ƒƒƒƒƒƒƒƒƒƒƒ„„„„„„„„„„„„„ƒ‚‚‚‚‚‚‚‚€~xrrssuv{†…‚z}xlelmmqpv~~€~ ƒ€v{{{}€€z{z€~s~}tamo|{[dggVFFDKTJimrƒƒ„‚‚‚|{y{}~€‚‚‚‚ƒƒƒƒƒƒƒƒƒ‚‚ƒ„„ƒƒƒƒƒƒƒ„„„„„„„„„„„„„ƒƒƒ‚‚‚‚‚‚€~uqqrw|‚ƒ†††~}xpgiglmnox€(¼„€qs|{|‚z|}~}u|~q`rw||E[flXDAUPIJqot‚‚‚ƒƒ‚‚ƒ‚‚||z|}~€‚‚‚‚ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ‚ƒƒ„„„„„„„„„„ƒƒƒ‚‚‚€|prvsyƒƒ…………~~~kgkoxumowÂ%„sw}|~ƒƒ|}€‚€||yv{sfm}|zGHjkbDQ[G>Q}rv‚‚‚ƒƒƒ‚€€€€||{|}~€‚ƒƒƒƒƒƒƒƒƒƒƒƒƒ„„ƒƒƒƒƒƒ‚ƒƒ„„„„…„„„„„ƒƒ‚‚‚uvwqr{ƒ„†………„|ozxu|}xjjyaê„wv}{{|€{w}lll}|{YDPlhPY\LIm{tr€‚‚‚ƒ‚€€€€€||{||}~€€€‚‚ƒƒƒƒƒƒƒƒƒ‚‚ƒƒƒƒƒƒƒƒƒƒ„„„„…„„„„„ƒƒƒ‚‚yy‚€xy‚ƒƒƒ………„‚uu~|ux~}wiu£ ƒz~}~~€‚{{}}~€|tvepu{{|rVU^f]^XQIjyor{‚ƒ‚‚‚€€€€€}}|{|}~€‚‚‚ƒƒƒƒƒƒƒ‚€‚‚‚‚ƒƒƒ„„„„„„„„„„ƒƒƒƒƒ‚€~w‚‚‚‚ƒ„„€}„…„ƒj{~~tr}~~urÈ냀z€€zy€z{}€€€|zkwgn|||zzc\b`c_aVU\yqrw‚‚‚‚‚‚€€€x~€}|{||~€‚‚‚‚‚ƒƒƒƒ€€‚‚„„„„„„„„„„„„„ƒƒƒƒƒ‚‚‚{€{€ƒƒƒ„„„„~u|ƒƒƒ‚t~}vpw}|ä]€€{|}€€€~|{xly~}|w{ygbcfbdaZX~qsu‚ƒƒƒƒƒ‚€€qu~|{|}}~€‚‚‚‚‚‚ƒƒ‚€€‚‚ƒƒƒ„„„„„„„„„„ƒƒƒƒƒ‚‚‚‚zpv~|€‚ƒƒ‚‚ƒƒ„€}€‚‚‚‚~~~|zv|}~{[€€€€€€€‚€€€~}€}€€~tv|z{plnkttqf€tsw‚ƒ‚‚‚‚€€|jqy~}||||}€€€€‚‚‚‚‚€€‚‚ƒƒƒ„„„……„„…„„„„ƒƒƒƒƒƒƒ‚‚‚y`euƒ„ƒƒ‚‚‚ƒ…„ƒƒ„„ƒƒ€zu}dD€€€€€€€€{|w€{xswzz{vxyywyz|utx‚‚ƒ‚‚‚‚oggmz~}||||}~~€€€€‚‚‚‚€€‚‚ƒƒƒ„„„……„„…„„„„ƒƒƒƒƒƒƒƒ‚‚uSmƒƒƒ‚‚‚ƒ……ƒƒƒƒƒƒƒ{|~|os~”×|||€€€€€€€€{ul{yyxywxz{{z{wxtwvut{‚‚ƒ‚‚iic`d}€€~}||{{}}~€€‚‚‚‚‚‚‚‚€€‚‚„„„……………„„„„„ƒƒƒƒƒƒƒƒƒƒ‚‚~pq‚‚‚‚‚‚ƒƒ„…„‚„ƒƒƒ‚{x}vlim{´S~|{~~~€}}}~€‚€€~{z|{{}~wwz|~}{|yrvxtrs€‚‚‚€jbe]Y^|€€}}||{{}}~€€€€‚‚‚‚‚‚‚‚‚‚‚ƒƒ„„„……………………„„„„„ƒƒƒƒƒƒƒƒ‚~x|‚‚‚‚‚‚„„ƒƒ‚‚‚‚‚yv~~~theft
diff --git a/src/resources/companion.h b/src/resources/companion.h
new file mode 100644
index 0000000..c3642ba
--- /dev/null
+++ b/src/resources/companion.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2012 Luc Verhaegen <libv@skynet.be>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef COMPANION_H
+#define COMPANION_H 1
+
+/*
+ * mesh, indexed
+ */
+#define COMPANION_VERTEX_COUNT 4761
+extern float companion_vertices[COMPANION_VERTEX_COUNT][3];
+extern float companion_texture_coordinates[COMPANION_VERTEX_COUNT][2];
+extern float companion_normals[COMPANION_VERTEX_COUNT][3];
+
+#define COMPANION_TRIANGLE_COUNT 4052
+extern short companion_triangles[COMPANION_TRIANGLE_COUNT][3];
+
+/*
+ * convert mesh from indexed to arrays - alloced arrays.
+ */
+#define COMPANION_ARRAY_COUNT (COMPANION_TRIANGLE_COUNT * 3)
+
+float *companion_vertices_array(void);
+float *companion_texture_coordinates_array(void);
+float *companion_normals_array(void);
+
+/*
+ * textures
+ */
+#define COMPANION_TEXTURE_WIDTH 512
+#define COMPANION_TEXTURE_HEIGHT 512
+#define COMPANION_TEXTURE_FORMAT LIMA_TEXEL_FORMAT_RGB_888
+
+#define COMPANION_TEXTURE_SIZE \
+ (COMPANION_TEXTURE_WIDTH * COMPANION_TEXTURE_HEIGHT * 3 / 4)
+
+/* texture for the mesh */
+extern unsigned int companion_texture[COMPANION_TEXTURE_SIZE];
+
+/* flattened texture for more simple uses */
+extern unsigned int companion_texture_flat[COMPANION_TEXTURE_SIZE];
+
+#endif /* COMPANION_H */
diff --git a/src/resources/companion_array.c b/src/resources/companion_array.c
new file mode 100644
index 0000000..a6d7155
--- /dev/null
+++ b/src/resources/companion_array.c
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2011-2012 Luc Verhaegen <libv@skynet.be>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <stdlib.h>
+
+#include "companion.h"
+
+float *
+companion_vertices_array(void)
+{
+ float *vertices = calloc(COMPANION_ARRAY_COUNT, 3 * sizeof(float));
+ short *triangles = (short *)companion_triangles;
+ int i, index;
+
+ for (i = 0; i < COMPANION_ARRAY_COUNT; i++) {
+ index = triangles[i];
+ vertices[3 * i + 0] = companion_vertices[index][0];
+ vertices[3 * i + 1] = companion_vertices[index][1];
+ vertices[3 * i + 2] = companion_vertices[index][2];
+ }
+
+ return vertices;
+}
+
+float *
+companion_texture_coordinates_array(void)
+{
+ float *texture_coordinates = calloc(COMPANION_ARRAY_COUNT,
+ 2 * sizeof(float));
+ short *triangles = (short *)companion_triangles;
+ int i, index;
+
+ for (i = 0; i < COMPANION_ARRAY_COUNT; i++) {
+ index = triangles[i];
+ texture_coordinates[2 * i + 0] =
+ companion_texture_coordinates[index][0];
+ texture_coordinates[2 * i + 1] =
+ companion_texture_coordinates[index][1];
+ }
+
+ return texture_coordinates;
+}
+
+float *
+companion_normals_array(void)
+{
+ float *normals = calloc(COMPANION_ARRAY_COUNT, 3 * sizeof(float));
+ short *triangles = (short *)companion_triangles;
+ int i, index;
+
+ for (i = 0; i < COMPANION_ARRAY_COUNT; i++) {
+ index = triangles[i];
+ normals[3 * i + 0] = companion_normals[index][0];
+ normals[3 * i + 1] = companion_normals[index][1];
+ normals[3 * i + 2] = companion_normals[index][2];
+ }
+
+ return normals;
+}
diff --git a/src/resources/companion_mesh.c b/src/resources/companion_mesh.c
new file mode 100644
index 0000000..b6822a0
--- /dev/null
+++ b/src/resources/companion_mesh.c
@@ -0,0 +1,18367 @@
+/*
+ * Mesh data for a weighted companion cube.
+ *
+ * A weighted companion cube is a well known meme from the 2007 video game
+ * 'Portal' by the Valve Corporation.
+ *
+ * This mesh data was created from a blender file made by Tobias Brage
+ * <gamerfreaq@live.com>, it can be retrieved from:
+ * http://www.blendswap.com/blends/low-poly/weighted-companion-cube-hearted/
+ *
+ * This data is licensed under the Creative Commons Attribution-NonCommercial
+ * 3.0 license (CC BY-NC 3.0): http://creativecommons.org/licenses/by-nc/3.0/
+ */
+
+#include "companion.h"
+
+float
+companion_vertices[COMPANION_VERTEX_COUNT][3] = {
+ {-0.218562, 0.774222, -2.897064},
+ {-0.973861, 1.529520, -2.897064},
+ {-1.106699, 1.367656, -2.897064},
+ {-1.205407, 1.182986, -2.897064},
+ {-0.218562, 0.774222, -2.897064},
+ {-1.205407, 1.182986, -2.897064},
+ {-1.266191, 0.982608, -2.897064},
+ {-1.266191, 0.982608, -2.897064},
+ {-1.286716, 0.774222, -2.897064},
+ {-1.266191, 0.565836, -2.897064},
+ {-1.205407, 0.365458, -2.897064},
+ {-1.106699, 0.180788, -2.897064},
+ {-0.973861, 0.018924, -2.897064},
+ {-0.811996, -0.113915, -2.897064},
+ {-0.627327, -0.212623, -2.897064},
+ {-0.426948, -0.273407, -2.897064},
+ {-0.218562, 0.774222, -2.897064},
+ {-0.426948, -0.273407, -2.897064},
+ {-0.218562, -0.293931, -2.897065},
+ {-0.218562, -0.293931, -2.897065},
+ {-0.010176, -0.273407, -2.897065},
+ {0.190203, -0.212622, -2.897065},
+ {0.374872, -0.113914, -2.897065},
+ {0.536736, 0.018924, -2.897065},
+ {0.669575, 0.180789, -2.897065},
+ {0.768283, 0.365459, -2.897065},
+ {0.829066, 0.565837, -2.897065},
+ {0.849590, 0.774223, -2.897065},
+ {0.829066, 0.982610, -2.897065},
+ {0.768282, 1.182988, -2.897065},
+ {0.669573, 1.367657, -2.897065},
+ {-0.218562, 0.774222, -2.897064},
+ {0.669573, 1.367657, -2.897065},
+ {0.536735, 1.529521, -2.897064},
+ {0.536735, 1.529521, -2.897064},
+ {0.374870, 1.662360, -2.897064},
+ {0.190200, 1.761067, -2.897064},
+ {-0.010178, 1.821851, -2.897064},
+ {-0.218564, 1.842375, -2.897064},
+ {-0.426951, 1.821850, -2.897064},
+ {-0.627329, 1.761066, -2.897064},
+ {-0.811998, 1.662358, -2.897064},
+ {-0.218563, 0.774333, 1.627662},
+ {-0.973861, 0.019035, 1.627663},
+ {-1.106699, 0.180899, 1.627663},
+ {-1.205407, 0.365569, 1.627663},
+ {-0.218563, 0.774333, 1.627662},
+ {-1.205407, 0.365569, 1.627663},
+ {-1.266191, 0.565947, 1.627663},
+ {-1.286716, 0.774333, 1.627663},
+ {-1.266191, 0.982719, 1.627663},
+ {-1.205407, 1.183097, 1.627663},
+ {-1.106700, 1.367767, 1.627663},
+ {-0.218563, 0.774333, 1.627662},
+ {-1.106700, 1.367767, 1.627663},
+ {-0.973861, 1.529631, 1.627662},
+ {-0.973861, 1.529631, 1.627662},
+ {-0.811997, 1.662470, 1.627662},
+ {-0.627327, 1.761178, 1.627662},
+ {-0.426949, 1.821962, 1.627662},
+ {-0.218562, 1.842486, 1.627662},
+ {-0.010176, 1.821962, 1.627662},
+ {0.190202, 1.761178, 1.627662},
+ {0.374872, 1.662470, 1.627662},
+ {0.536736, 1.529631, 1.627662},
+ {0.669574, 1.367767, 1.627662},
+ {0.768282, 1.183097, 1.627662},
+ {-0.218563, 0.774333, 1.627662},
+ {0.768282, 1.183097, 1.627662},
+ {0.829066, 0.982719, 1.627662},
+ {0.829066, 0.982719, 1.627662},
+ {0.849590, 0.774332, 1.627662},
+ {0.829066, 0.565946, 1.627662},
+ {0.768282, 0.365568, 1.627662},
+ {0.669573, 0.180898, 1.627662},
+ {0.536735, 0.019034, 1.627662},
+ {0.374870, -0.113804, 1.627662},
+ {0.190200, -0.212512, 1.627662},
+ {0.190200, -0.212512, 1.627662},
+ {-0.010178, -0.273296, 1.627662},
+ {-0.218563, 0.774333, 1.627662},
+ {-0.010178, -0.273296, 1.627662},
+ {-0.218564, -0.293820, 1.627663},
+ {-0.218564, -0.293820, 1.627663},
+ {-0.426951, -0.273295, 1.627663},
+ {-0.627329, -0.212511, 1.627663},
+ {-0.627329, -0.212511, 1.627663},
+ {-0.811998, -0.113802, 1.627663},
+ {-0.218563, -1.488086, -0.634645},
+ {-0.973861, -1.488086, -1.389944},
+ {-1.106699, -1.488086, -1.228079},
+ {-1.205407, -1.488086, -1.043410},
+ {-1.266191, -1.488086, -0.843032},
+ {-1.286716, -1.488086, -0.634646},
+ {-1.266191, -1.488086, -0.426259},
+ {-0.218563, -1.488086, -0.634645},
+ {-1.266191, -1.488086, -0.426259},
+ {-1.205407, -1.488086, -0.225881},
+ {-1.205407, -1.488086, -0.225881},
+ {-1.106699, -1.488086, -0.041211},
+ {-0.973861, -1.488086, 0.120653},
+ {-0.811997, -1.488086, 0.253491},
+ {-0.218563, -1.488086, -0.634645},
+ {-0.811997, -1.488086, 0.253491},
+ {-0.627327, -1.488086, 0.352199},
+ {-0.627327, -1.488086, 0.352199},
+ {-0.426949, -1.488086, 0.412983},
+ {-0.218562, -1.488086, 0.433507},
+ {-0.010176, -1.488086, 0.412983},
+ {-0.218563, -1.488086, -0.634645},
+ {-0.010176, -1.488086, 0.412983},
+ {0.190202, -1.488086, 0.352199},
+ {0.190202, -1.488086, 0.352199},
+ {0.374872, -1.488086, 0.253491},
+ {0.536736, -1.488086, 0.120652},
+ {0.669575, -1.488086, -0.041212},
+ {0.768282, -1.488086, -0.225882},
+ {0.829066, -1.488086, -0.426260},
+ {0.849590, -1.488086, -0.634647},
+ {0.829066, -1.488086, -0.843033},
+ {0.768282, -1.488086, -1.043411},
+ {0.669573, -1.488086, -1.228081},
+ {0.536735, -1.488086, -1.389945},
+ {0.374870, -1.488086, -1.522783},
+ {0.374870, -1.488086, -1.522783},
+ {0.190200, -1.488086, -1.621491},
+ {0.190200, -1.488086, -1.621491},
+ {-0.010178, -1.488086, -1.682274},
+ {-0.218564, -1.488086, -1.702798},
+ {-0.426951, -1.488086, -1.682274},
+ {-0.426951, -1.488086, -1.682274},
+ {-0.627329, -1.488086, -1.621489},
+ {-0.627329, -1.488086, -1.621489},
+ {-0.811998, -1.488086, -1.522781},
+ {-0.218563, 3.036641, -0.634756},
+ {-0.973861, 3.036641, 0.120542},
+ {-1.106699, 3.036641, -0.041322},
+ {-1.205407, 3.036641, -0.225992},
+ {-1.266191, 3.036641, -0.426370},
+ {-1.286716, 3.036641, -0.634756},
+ {-0.218563, 3.036641, -0.634756},
+ {-1.286716, 3.036641, -0.634756},
+ {-1.266191, 3.036640, -0.843142},
+ {-1.266191, 3.036640, -0.843142},
+ {-1.205407, 3.036640, -1.043520},
+ {-1.106699, 3.036640, -1.228190},
+ {-0.973861, 3.036640, -1.390054},
+ {-0.218563, 3.036641, -0.634756},
+ {-0.973861, 3.036640, -1.390054},
+ {-0.811996, 3.036641, -1.522893},
+ {-0.811996, 3.036641, -1.522893},
+ {-0.627327, 3.036641, -1.621601},
+ {-0.426949, 3.036641, -1.682385},
+ {-0.218562, 3.036641, -1.702909},
+ {-0.010176, 3.036641, -1.682385},
+ {-0.010176, 3.036641, -1.682385},
+ {0.190202, 3.036641, -1.621601},
+ {0.190202, 3.036641, -1.621601},
+ {0.374872, 3.036641, -1.522893},
+ {0.536736, 3.036641, -1.390054},
+ {0.669575, 3.036641, -1.228190},
+ {0.768282, 3.036641, -1.043520},
+ {0.829066, 3.036641, -0.843142},
+ {0.849590, 3.036641, -0.634755},
+ {0.829066, 3.036641, -0.426369},
+ {0.768282, 3.036641, -0.225991},
+ {0.669574, 3.036641, -0.041321},
+ {0.536735, 3.036641, 0.120543},
+ {0.374870, 3.036641, 0.253381},
+ {0.190201, 3.036641, 0.352089},
+ {-0.010178, 3.036641, 0.412873},
+ {-0.218564, 3.036641, 0.433397},
+ {-0.426951, 3.036641, 0.412872},
+ {-0.627329, 3.036641, 0.352088},
+ {-0.811998, 3.036641, 0.253379},
+ {-0.811998, 3.036641, 0.253379},
+ {-0.973861, 3.036641, 0.120542},
+ {-0.218563, 3.036641, -0.634756},
+ {-2.473807, 0.767158, -0.634756},
+ {-2.473807, 0.011860, 0.120542},
+ {-2.473807, -0.120978, -0.041322},
+ {-2.473807, 0.767158, -0.634756},
+ {-2.473807, -0.120978, -0.041322},
+ {-2.473807, -0.219686, -0.225992},
+ {-2.473807, -0.280470, -0.426370},
+ {-2.473807, -0.300995, -0.634756},
+ {-2.473807, -0.280470, -0.843142},
+ {-2.473807, -0.219686, -1.043520},
+ {-2.473807, -0.120978, -1.228190},
+ {-2.473807, 0.011860, -1.390054},
+ {-2.473807, 0.173724, -1.522893},
+ {-2.473807, 0.358394, -1.621601},
+ {-2.473807, 0.558772, -1.682385},
+ {-2.473807, 0.767159, -1.702909},
+ {-2.473807, 0.975545, -1.682385},
+ {-2.473807, 1.175923, -1.621600},
+ {-2.473807, 0.767158, -0.634756},
+ {-2.473807, 1.175923, -1.621600},
+ {-2.473807, 1.360593, -1.522892},
+ {-2.473807, 1.360593, -1.522892},
+ {-2.473807, 1.522457, -1.390054},
+ {-2.473807, 1.655296, -1.228189},
+ {-2.473807, 1.754004, -1.043520},
+ {-2.473807, 1.814787, -0.843141},
+ {-2.473807, 1.835311, -0.634755},
+ {-2.473807, 1.814787, -0.426369},
+ {-2.473807, 1.754003, -0.225991},
+ {-2.473807, 1.655294, -0.041321},
+ {-2.473807, 0.767158, -0.634756},
+ {-2.473807, 1.655294, -0.041321},
+ {-2.473807, 1.522456, 0.120543},
+ {-2.473807, 0.767158, -0.634756},
+ {-2.473807, 1.522456, 0.120543},
+ {-2.473807, 1.360591, 0.253381},
+ {-2.473807, 1.360591, 0.253381},
+ {-2.473807, 1.175921, 0.352089},
+ {-2.473807, 0.975543, 0.412873},
+ {-2.473807, 0.767157, 0.433397},
+ {-2.473807, 0.558770, 0.412872},
+ {-2.473807, 0.358392, 0.352088},
+ {-2.473807, 0.173723, 0.253380},
+ {-2.473807, 0.011860, 0.120542},
+ {2.050920, 0.767159, -0.634646},
+ {2.050920, 0.011860, -1.389944},
+ {2.050920, -0.120978, -1.228080},
+ {2.050920, -0.219686, -1.043410},
+ {2.050920, -0.280470, -0.843032},
+ {2.050920, -0.300995, -0.634646},
+ {2.050920, -0.280470, -0.426259},
+ {2.050920, -0.219686, -0.225881},
+ {2.050920, -0.120978, -0.041212},
+ {2.050920, 0.011860, 0.120653},
+ {2.050920, 0.173725, 0.253491},
+ {2.050920, 0.358394, 0.352199},
+ {2.050920, 0.558772, 0.412983},
+ {2.050920, 0.767159, 0.433507},
+ {2.050920, 0.975545, 0.412983},
+ {2.050920, 1.175923, 0.352199},
+ {2.050920, 0.767159, -0.634646},
+ {2.050920, 1.175923, 0.352199},
+ {2.050920, 1.360593, 0.253491},
+ {2.050920, 1.360593, 0.253491},
+ {2.050920, 1.522457, 0.120652},
+ {2.050920, 1.655296, -0.041212},
+ {2.050920, 0.767159, -0.634646},
+ {2.050920, 1.655296, -0.041212},
+ {2.050920, 1.754004, -0.225882},
+ {2.050920, 1.754004, -0.225882},
+ {2.050920, 1.814787, -0.426260},
+ {2.050920, 1.835311, -0.634647},
+ {2.050920, 1.814787, -0.843033},
+ {2.050920, 1.754003, -1.043411},
+ {2.050920, 1.655295, -1.228081},
+ {2.050920, 1.522456, -1.389945},
+ {2.050920, 1.360591, -1.522783},
+ {2.050920, 1.175921, -1.621491},
+ {2.050920, 0.767159, -0.634646},
+ {2.050920, 1.175921, -1.621491},
+ {2.050920, 0.975543, -1.682275},
+ {2.050920, 0.975543, -1.682275},
+ {2.050920, 0.767157, -1.702799},
+ {2.050920, 0.767157, -1.702799},
+ {2.050920, 0.558770, -1.682274},
+ {2.050920, 0.358392, -1.621490},
+ {2.050920, 0.173723, -1.522781},
+ {-0.210020, 0.777640, -2.940320},
+ {-1.442901, -0.455242, -2.940320},
+ {-1.659735, -0.191029, -2.940320},
+ {-1.820857, 0.110409, -2.940320},
+ {-1.920076, 0.437488, -2.940320},
+ {-1.953577, 0.777640, -2.940320},
+ {-1.920076, 1.117791, -2.940320},
+ {-1.820857, 1.444870, -2.940320},
+ {-1.659735, 1.746309, -2.940320},
+ {-0.210020, 0.777640, -2.940320},
+ {-1.659735, 1.746309, -2.940320},
+ {-1.442901, 2.010521, -2.940320},
+ {-1.442901, 2.010521, -2.940320},
+ {-1.178689, 2.227355, -2.940320},
+ {-0.210020, 0.777640, -2.940320},
+ {-1.178689, 2.227355, -2.940320},
+ {-0.877250, 2.388478, -2.940320},
+ {-0.877250, 2.388478, -2.940320},
+ {-0.550171, 2.487696, -2.940320},
+ {-0.550171, 2.487696, -2.940320},
+ {-0.210019, 2.521198, -2.940321},
+ {-0.210019, 2.521198, -2.940321},
+ {0.130132, 2.487696, -2.940321},
+ {0.457212, 2.388477, -2.940321},
+ {0.758650, 2.227355, -2.940321},
+ {1.022863, 2.010521, -2.940321},
+ {-0.210020, 0.777640, -2.940320},
+ {1.022863, 2.010521, -2.940321},
+ {1.243807, 1.750419, -2.940320},
+ {1.243807, 1.750419, -2.940320},
+ {1.400818, 1.444870, -2.940320},
+ {1.500037, 1.117790, -2.940320},
+ {1.533538, 0.777639, -2.940320},
+ {1.500036, 0.437487, -2.940320},
+ {1.400817, 0.110408, -2.940320},
+ {1.239695, -0.191030, -2.940320},
+ {1.022861, -0.455243, -2.940320},
+ {0.758648, -0.672076, -2.940320},
+ {0.457209, -0.833198, -2.940320},
+ {0.130129, -0.932416, -2.940320},
+ {0.130129, -0.932416, -2.940320},
+ {-0.210022, -0.965918, -2.940320},
+ {-0.210022, -0.965918, -2.940320},
+ {-0.550173, -0.932415, -2.940320},
+ {-0.877253, -0.833196, -2.940320},
+ {-1.178691, -0.672074, -2.940320},
+ {-0.210020, 0.770915, 1.663495},
+ {-1.454810, 2.015705, 1.663495},
+ {-1.673738, 1.748940, 1.663495},
+ {-0.210020, 0.770915, 1.663495},
+ {-1.673738, 1.748940, 1.663495},
+ {-1.836416, 1.444590, 1.663495},
+ {-1.836416, 1.444590, 1.663495},
+ {-1.936593, 1.114352, 1.663495},
+ {-1.970419, 0.770915, 1.663495},
+ {-1.936593, 0.427478, 1.663495},
+ {-1.836416, 0.097239, 1.663495},
+ {-0.210020, 0.770915, 1.663495},
+ {-1.836416, 0.097239, 1.663495},
+ {-1.673738, -0.207110, 1.663495},
+ {-1.673738, -0.207110, 1.663495},
+ {-1.454809, -0.473875, 1.663495},
+ {-1.188045, -0.692803, 1.663495},
+ {-0.210020, 0.770915, 1.663495},
+ {-1.188045, -0.692803, 1.663495},
+ {-0.883695, -0.855482, 1.663494},
+ {-0.883695, -0.855482, 1.663494},
+ {-0.553456, -0.955659, 1.663494},
+ {-0.210019, -0.989484, 1.663494},
+ {0.133418, -0.955658, 1.663494},
+ {0.463657, -0.855481, 1.663494},
+ {0.463657, -0.855481, 1.663494},
+ {0.768007, -0.692802, 1.663494},
+ {0.768007, -0.692802, 1.663494},
+ {1.034771, -0.473874, 1.663494},
+ {-0.210020, 0.770915, 1.663495},
+ {1.034771, -0.473874, 1.663494},
+ {1.257850, -0.211259, 1.663494},
+ {1.257850, -0.211259, 1.663494},
+ {1.416377, 0.097241, 1.663494},
+ {1.516554, 0.427480, 1.663494},
+ {1.550379, 0.770917, 1.663494},
+ {-0.210020, 0.770915, 1.663495},
+ {1.550379, 0.770917, 1.663494},
+ {1.516553, 1.114354, 1.663494},
+ {1.516553, 1.114354, 1.663494},
+ {1.416376, 1.444592, 1.663494},
+ {1.416376, 1.444592, 1.663494},
+ {1.253697, 1.748942, 1.663494},
+ {1.253697, 1.748942, 1.663494},
+ {1.034769, 2.015707, 1.663494},
+ {0.768003, 2.234635, 1.663494},
+ {0.768003, 2.234635, 1.663494},
+ {0.463653, 2.397312, 1.663495},
+ {0.463653, 2.397312, 1.663495},
+ {0.133414, 2.497489, 1.663495},
+ {-0.210023, 2.531314, 1.663495},
+ {-0.553460, 2.497488, 1.663495},
+ {-0.883698, 2.397310, 1.663495},
+ {-1.188048, 2.234631, 1.663495},
+ {-0.210020, -1.523918, -0.638064},
+ {-1.442901, -1.523918, 0.594818},
+ {-1.659735, -1.523918, 0.330605},
+ {-0.210020, -1.523918, -0.638064},
+ {-1.659735, -1.523918, 0.330605},
+ {-1.820857, -1.523918, 0.029167},
+ {-1.920076, -1.523918, -0.297912},
+ {-1.953578, -1.523918, -0.638063},
+ {-1.920076, -1.523918, -0.978215},
+ {-1.820857, -1.523918, -1.305294},
+ {-1.659735, -1.523918, -1.606732},
+ {-1.442901, -1.523918, -1.870945},
+ {-1.178688, -1.523918, -2.087779},
+ {-0.877250, -1.523918, -2.248901},
+ {-0.550171, -1.523918, -2.348119},
+ {-0.210019, -1.523918, -2.381622},
+ {-0.210020, -1.523918, -0.638064},
+ {-0.210019, -1.523918, -2.381622},
+ {0.130132, -1.523917, -2.348119},
+ {0.130132, -1.523917, -2.348119},
+ {0.457212, -1.523917, -2.248901},
+ {0.758650, -1.523917, -2.087779},
+ {1.022863, -1.523917, -1.870944},
+ {1.022863, -1.523917, -1.870944},
+ {1.243807, -1.523918, -1.610842},
+ {1.243807, -1.523918, -1.610842},
+ {1.400819, -1.523918, -1.305293},
+ {-0.210020, -1.523918, -0.638064},
+ {1.400819, -1.523918, -1.305293},
+ {1.500037, -1.523917, -0.978213},
+ {1.500037, -1.523917, -0.978213},
+ {1.533538, -1.523917, -0.638062},
+ {1.500036, -1.523917, -0.297910},
+ {1.400817, -1.523917, 0.029169},
+ {1.239695, -1.523917, 0.330607},
+ {1.022861, -1.523918, 0.594820},
+ {0.758647, -1.523918, 0.811653},
+ {0.758647, -1.523918, 0.811653},
+ {0.457209, -1.523918, 0.972775},
+ {0.457209, -1.523918, 0.972775},
+ {0.130129, -1.523918, 1.071993},
+ {-0.210022, -1.523918, 1.105494},
+ {-0.550174, -1.523918, 1.071992},
+ {-0.877253, -1.523918, 0.972773},
+ {-1.178691, -1.523918, 0.811650},
+ {-1.178691, -1.523918, 0.811650},
+ {-1.442901, -1.523918, 0.594818},
+ {-0.210020, 3.078297, -0.631338},
+ {-1.442901, 3.078297, -1.864220},
+ {-1.659735, 3.078297, -1.600007},
+ {-1.820857, 3.078297, -1.298569},
+ {-1.920076, 3.078297, -0.971489},
+ {-1.953578, 3.078297, -0.631338},
+ {-1.920076, 3.078297, -0.291187},
+ {-1.820857, 3.078297, 0.035892},
+ {-1.659735, 3.078297, 0.337331},
+ {-1.442901, 3.078297, 0.601543},
+ {-0.210020, 3.078297, -0.631338},
+ {-1.442901, 3.078297, 0.601543},
+ {-1.178689, 3.078297, 0.818377},
+ {-1.178689, 3.078297, 0.818377},
+ {-0.877250, 3.078297, 0.979500},
+ {-0.550170, 3.078297, 1.078718},
+ {-0.210019, 3.078297, 1.112220},
+ {0.130132, 3.078297, 1.078718},
+ {0.130132, 3.078297, 1.078718},
+ {0.457212, 3.078297, 0.979499},
+ {0.457212, 3.078297, 0.979499},
+ {0.758650, 3.078297, 0.818377},
+ {1.022863, 3.078297, 0.601543},
+ {1.243807, 3.078297, 0.341440},
+ {1.400818, 3.078297, 0.035891},
+ {1.500037, 3.078297, -0.291188},
+ {1.533538, 3.078297, -0.631340},
+ {1.500036, 3.078297, -0.971491},
+ {-0.210020, 3.078297, -0.631338},
+ {1.500036, 3.078297, -0.971491},
+ {1.400817, 3.078297, -1.298571},
+ {1.400817, 3.078297, -1.298571},
+ {1.239695, 3.078297, -1.600009},
+ {1.022860, 3.078297, -1.864221},
+ {0.758647, 3.078297, -2.081055},
+ {0.457209, 3.078297, -2.242177},
+ {0.457209, 3.078297, -2.242177},
+ {0.130129, 3.078297, -2.341395},
+ {0.130129, 3.078297, -2.341395},
+ {-0.210023, 3.078297, -2.374896},
+ {-0.550174, 3.078297, -2.341393},
+ {-0.877253, 3.078297, -2.242174},
+ {-1.178691, 3.078297, -2.081052},
+ {-2.509639, 0.775701, -0.631338},
+ {-2.509638, -0.457180, -1.864220},
+ {-2.509638, -0.674014, -1.600007},
+ {-2.509638, -0.835136, -1.298569},
+ {-2.509638, -0.934355, -0.971489},
+ {-2.509638, -0.967856, -0.631338},
+ {-2.509638, -0.934354, -0.291187},
+ {-2.509638, -0.835136, 0.035893},
+ {-2.509638, -0.674014, 0.337331},
+ {-2.509638, -0.457180, 0.601544},
+ {-2.509638, -0.192967, 0.818378},
+ {-2.509638, 0.108471, 0.979500},
+ {-2.509639, 0.775701, -0.631338},
+ {-2.509638, 0.108471, 0.979500},
+ {-2.509639, 0.435550, 1.078718},
+ {-2.509639, 0.435550, 1.078718},
+ {-2.509639, 0.775702, 1.112220},
+ {-2.509639, 1.115853, 1.078718},
+ {-2.509639, 1.442933, 0.979499},
+ {-2.509639, 1.744371, 0.818377},
+ {-2.509639, 2.008584, 0.601543},
+ {-2.509639, 0.775701, -0.631338},
+ {-2.509639, 2.008584, 0.601543},
+ {-2.509640, 2.229528, 0.341440},
+ {-2.509640, 2.229528, 0.341440},
+ {-2.509640, 2.386539, 0.035891},
+ {-2.509639, 0.775701, -0.631338},
+ {-2.509640, 2.386539, 0.035891},
+ {-2.509639, 2.485758, -0.291188},
+ {-2.509639, 2.485758, -0.291188},
+ {-2.509639, 2.519259, -0.631340},
+ {-2.509639, 2.485757, -0.971491},
+ {-2.509639, 2.386538, -1.298571},
+ {-2.509639, 2.225415, -1.600009},
+ {-2.509639, 2.008581, -1.864221},
+ {-2.509639, 1.744368, -2.081055},
+ {-2.509639, 1.442930, -2.242177},
+ {-2.509639, 1.115850, -2.341394},
+ {-2.509639, 0.775698, -2.374896},
+ {-2.509639, 0.435547, -2.341393},
+ {-2.509639, 0.108468, -2.242174},
+ {-2.509639, -0.192970, -2.081052},
+ {-2.509639, -0.192970, -2.081052},
+ {-2.509638, -0.457180, -1.864220},
+ {-2.509639, 0.775701, -0.631338},
+ {2.086752, 0.775701, -0.638064},
+ {2.086752, -0.457180, 0.594818},
+ {2.086752, -0.674014, 0.330605},
+ {2.086752, 0.775701, -0.638064},
+ {2.086752, -0.674014, 0.330605},
+ {2.086752, -0.835136, 0.029167},
+ {2.086752, 0.775701, -0.638064},
+ {2.086752, -0.835136, 0.029167},
+ {2.086752, -0.934355, -0.297912},
+ {2.086752, -0.934355, -0.297912},
+ {2.086752, -0.967856, -0.638064},
+ {2.086752, -0.934355, -0.978215},
+ {2.086752, -0.835136, -1.305294},
+ {2.086752, -0.835136, -1.305294},
+ {2.086752, -0.674014, -1.606732},
+ {2.086752, -0.674014, -1.606732},
+ {2.086752, -0.457180, -1.870945},
+ {2.086752, -0.192967, -2.087779},
+ {2.086752, 0.108471, -2.248901},
+ {2.086752, 0.435550, -2.348120},
+ {2.086752, 0.775702, -2.381622},
+ {2.086752, 1.115853, -2.348119},
+ {2.086752, 1.442933, -2.248901},
+ {2.086752, 1.744371, -2.087779},
+ {2.086752, 2.008584, -1.870945},
+ {2.086752, 2.229528, -1.610842},
+ {2.086752, 2.386539, -1.305293},
+ {2.086752, 2.485758, -0.978214},
+ {2.086752, 2.519259, -0.638062},
+ {2.086752, 2.485757, -0.297911},
+ {2.086752, 2.386538, 0.029169},
+ {2.086752, 2.225416, 0.330607},
+ {2.086752, 2.008581, 0.594820},
+ {2.086752, 1.744368, 0.811653},
+ {2.086752, 1.442930, 0.972775},
+ {2.086752, 0.775701, -0.638064},
+ {2.086752, 1.442930, 0.972775},
+ {2.086752, 1.115850, 1.071993},
+ {2.086752, 1.115850, 1.071993},
+ {2.086752, 0.775699, 1.105494},
+ {2.086752, 0.775699, 1.105494},
+ {2.086752, 0.435547, 1.071992},
+ {2.086752, 0.435547, 1.071992},
+ {2.086752, 0.108468, 0.972773},
+ {2.086752, -0.192970, 0.811650},
+ {2.081436, 3.244749, -2.939779},
+ {1.421516, 3.244749, -2.939779},
+ {1.755954, 3.244749, -2.635721},
+ {2.081436, 3.244749, -2.725790},
+ {1.237818, 3.244749, -2.454276},
+ {1.082304, 3.244749, -2.939780},
+ {0.787475, 3.244749, -2.296572},
+ {0.787475, 3.244749, -2.939780},
+ {0.571060, 3.072946, -2.938577},
+ {0.571059, 3.072946, -2.187915},
+ {2.081436, 3.244749, -1.640371},
+ {1.421516, 3.244749, -1.640371},
+ {1.311023, 3.072946, -1.427250},
+ {2.081190, 3.072946, -1.427250},
+ {0.787475, 3.244749, -2.296572},
+ {1.005891, 3.244749, -2.373059},
+ {0.930467, 3.244749, -2.939780},
+ {0.787475, 3.244749, -2.939780},
+ {2.258819, 2.498669, -1.861496},
+ {2.258819, 2.579886, -2.093422},
+ {2.258819, 3.065389, -1.937909},
+ {2.258819, 3.065389, -1.786072},
+ {2.258819, 2.422182, -1.643080},
+ {2.258819, 2.498669, -1.861496},
+ {2.258819, 3.065389, -1.786072},
+ {2.258819, 3.065390, -1.643080},
+ {2.258819, 1.765981, -2.937041},
+ {2.258819, 1.765981, -2.277121},
+ {2.086549, 1.562327, -2.166628},
+ {2.086549, 1.562327, -2.936795},
+ {2.258819, 2.422182, -1.643080},
+ {2.258819, 3.065390, -1.643080},
+ {2.087016, 3.064187, -1.426665},
+ {2.087016, 2.313525, -1.426664},
+ {2.258819, 2.761331, -2.611559},
+ {2.258819, 3.065389, -2.277121},
+ {2.258819, 3.065389, -2.937041},
+ {2.258819, 2.422182, -2.937041},
+ {2.081436, 3.244749, -1.640371},
+ {2.081436, 3.244749, -2.007843},
+ {1.608801, 3.244749, -2.197767},
+ {1.421516, 3.244749, -1.640371},
+ {1.253273, 3.244749, -2.202720},
+ {1.272945, 3.244749, -1.882557},
+ {1.146502, 3.244749, -2.031245},
+ {1.067760, 3.244749, -2.222661},
+ {0.881088, 3.244749, -2.234276},
+ {0.993168, 3.244749, -2.147139},
+ {2.081436, 3.244749, -2.007843},
+ {2.081436, 3.244749, -2.381176},
+ {1.685320, 3.244749, -2.425503},
+ {1.608801, 3.244749, -2.197767},
+ {2.081436, 3.244749, -2.381176},
+ {1.685320, 3.244749, -2.425503},
+ {1.245236, 3.244749, -2.333529},
+ {1.253273, 3.244749, -2.202720},
+ {1.245236, 3.244749, -2.333529},
+ {1.067760, 3.244749, -2.222661},
+ {1.035588, 3.244749, -2.300868},
+ {0.832409, 3.244749, -2.266670},
+ {0.881088, 3.244749, -2.234276},
+ {1.005891, 3.244749, -2.373059},
+ {0.787475, 3.244749, -2.296572},
+ {1.253273, 3.244749, -2.202720},
+ {1.245236, 3.244749, -2.333529},
+ {1.035588, 3.244749, -2.300868},
+ {2.081436, 3.244749, -1.640371},
+ {2.081190, 3.072946, -1.427250},
+ {2.087016, 3.064187, -1.426665},
+ {2.258819, 3.065390, -1.643080},
+ {2.081436, 3.244749, -1.640371},
+ {2.258819, 3.065390, -1.643080},
+ {2.258819, 3.065389, -1.786072},
+ {2.081436, 3.244749, -2.007843},
+ {2.258819, 3.065389, -1.786072},
+ {2.258819, 3.065389, -1.937909},
+ {2.081436, 3.244749, -2.381176},
+ {2.081436, 3.244749, -2.007843},
+ {2.081436, 3.244749, -2.725790},
+ {2.258819, 3.065389, -2.277121},
+ {2.081436, 3.244749, -2.939779},
+ {2.258819, 3.065389, -2.937041},
+ {2.089698, 3.073250, -3.108027},
+ {2.089698, 2.413330, -3.108027},
+ {1.785640, 2.747768, -3.108027},
+ {1.446491, 3.073250, -3.108027},
+ {1.604195, 2.229632, -3.108027},
+ {2.089698, 2.074118, -3.108027},
+ {1.446491, 1.779289, -3.108027},
+ {2.089698, 1.779289, -3.108027},
+ {2.088496, 1.562874, -2.936224},
+ {1.337834, 1.562874, -2.936224},
+ {0.790290, 3.073250, -3.108027},
+ {0.790290, 2.413330, -3.108027},
+ {0.572007, 2.302837, -2.936224},
+ {0.572007, 3.073004, -2.936224},
+ {1.446491, 1.779289, -3.108027},
+ {1.522978, 1.997706, -3.108027},
+ {2.089698, 1.922282, -3.108027},
+ {2.089698, 1.779289, -3.108027},
+ {1.522978, 1.997706, -3.108027},
+ {2.089698, 1.922282, -3.108027},
+ {2.081436, 3.244749, -2.939779},
+ {2.258819, 3.065389, -2.937041},
+ {2.089698, 3.073250, -3.108027},
+ {0.787475, 3.244749, -2.939780},
+ {0.790290, 3.073250, -3.108027},
+ {0.571060, 3.072946, -2.938577},
+ {0.572007, 3.073004, -2.936224},
+ {0.790290, 3.073250, -3.108027},
+ {0.993712, 3.073250, -3.108027},
+ {1.098848, 2.517006, -3.108027},
+ {0.790290, 2.413330, -3.108027},
+ {1.209709, 2.253870, -3.108027},
+ {1.032476, 2.264759, -3.108027},
+ {1.181164, 2.138316, -3.108027},
+ {1.287126, 2.094727, -3.108027},
+ {1.348799, 1.926092, -3.108027},
+ {1.304908, 1.992047, -3.108027},
+ {1.287126, 2.094727, -3.108027},
+ {1.181164, 2.138316, -3.108027},
+ {0.787475, 3.244749, -2.939780},
+ {0.930467, 3.244749, -2.939780},
+ {0.993712, 3.073250, -3.108027},
+ {0.790290, 3.073250, -3.108027},
+ {1.211046, 3.073250, -3.108027},
+ {1.428508, 2.627772, -3.108027},
+ {1.399062, 2.242235, -3.108027},
+ {1.287126, 2.094727, -3.108027},
+ {1.400335, 2.048156, -3.108027},
+ {1.395691, 1.855627, -3.108027},
+ {1.348799, 1.926092, -3.108027},
+ {1.400335, 2.048156, -3.108027},
+ {1.522978, 1.997706, -3.108027},
+ {1.446491, 1.779289, -3.108027},
+ {1.395691, 1.855627, -3.108027},
+ {1.400335, 2.048156, -3.108027},
+ {1.082304, 3.244749, -2.939780},
+ {1.211046, 3.073250, -3.108027},
+ {0.993712, 3.073250, -3.108027},
+ {0.930467, 3.244749, -2.939780},
+ {1.421516, 3.244749, -2.939779},
+ {1.446491, 3.073250, -3.108027},
+ {1.211046, 3.073250, -3.108027},
+ {1.082304, 3.244749, -2.939780},
+ {2.081436, 3.244749, -2.939779},
+ {2.089698, 3.073250, -3.108027},
+ {2.258819, 2.422182, -2.937041},
+ {2.089698, 2.413330, -3.108027},
+ {2.089698, 3.073250, -3.108027},
+ {2.258819, 3.065389, -2.937041},
+ {2.258819, 2.008168, -2.128550},
+ {2.258819, 2.145380, -2.120119},
+ {2.258819, 2.238890, -1.968360},
+ {2.258819, 2.156855, -2.002106},
+ {2.258819, 2.314579, -1.804776},
+ {2.258819, 2.280599, -1.855838},
+ {2.258819, 1.765981, -2.277121},
+ {2.258819, 2.004865, -2.357386},
+ {2.258819, 1.765981, -2.937041},
+ {2.258819, 1.923469, -2.937041},
+ {2.258819, 2.306147, -2.110241},
+ {2.258819, 2.335008, -1.928820},
+ {2.258819, 2.354392, -1.744948},
+ {2.258819, 2.335008, -1.928820},
+ {2.258819, 2.498669, -1.861496},
+ {2.258819, 2.422182, -1.643080},
+ {2.258819, 2.354392, -1.744948},
+ {2.258819, 2.284757, -2.451430},
+ {2.258819, 2.107993, -2.937041},
+ {2.089698, 2.074118, -3.108027},
+ {2.258819, 2.107993, -2.937041},
+ {2.258819, 1.923469, -2.937041},
+ {2.089698, 1.922282, -3.108027},
+ {2.258819, 1.765981, -2.937041},
+ {2.089698, 1.779289, -3.108027},
+ {2.089698, 1.922282, -3.108027},
+ {2.258819, 1.923469, -2.937041},
+ {2.089698, 2.413330, -3.108027},
+ {2.258819, 2.422182, -2.937041},
+ {2.086549, 1.562327, -2.936795},
+ {2.089698, 1.779289, -3.108027},
+ {2.258819, 1.765981, -2.937041},
+ {2.088496, 1.562874, -2.936224},
+ {2.081435, -1.523168, -3.107232},
+ {1.421516, -1.523168, -3.107232},
+ {1.755954, -1.219110, -3.107232},
+ {2.081435, -1.309179, -3.107232},
+ {1.237817, -1.037665, -3.107232},
+ {1.082304, -1.523168, -3.107232},
+ {0.787475, -0.879961, -3.107232},
+ {0.787475, -1.523169, -3.107232},
+ {0.571060, -1.521966, -2.935429},
+ {0.571059, -0.771304, -2.935429},
+ {2.081435, -0.223760, -3.107232},
+ {1.421515, -0.223760, -3.107232},
+ {1.311023, -0.010639, -2.935429},
+ {2.081190, -0.010639, -2.935429},
+ {0.787475, -0.879961, -3.107232},
+ {1.005891, -0.956448, -3.107232},
+ {0.930467, -1.523168, -3.107232},
+ {0.787475, -1.523169, -3.107232},
+ {2.258819, -0.444885, -2.361151},
+ {2.258819, -0.676811, -2.442369},
+ {2.258819, -0.521298, -2.927872},
+ {2.258819, -0.369461, -2.927872},
+ {2.258819, -0.226469, -2.284665},
+ {2.258819, -0.226469, -2.927872},
+ {2.258819, -1.520429, -1.628463},
+ {2.258819, -0.860510, -1.628463},
+ {2.086549, -0.750017, -1.424809},
+ {2.086549, -1.520184, -1.424809},
+ {2.258819, -0.226469, -2.284665},
+ {2.258819, -0.226469, -2.927872},
+ {2.087016, -0.010054, -2.926670},
+ {2.087016, -0.010053, -2.176008},
+ {2.258819, -1.194948, -2.623813},
+ {2.258819, -0.860510, -2.927872},
+ {2.258819, -1.520429, -2.927872},
+ {2.258819, -1.520429, -2.284665},
+ {2.081435, -0.223760, -3.107232},
+ {2.081435, -0.591232, -3.107232},
+ {1.608801, -0.781156, -3.107232},
+ {1.421515, -0.223760, -3.107232},
+ {1.253273, -0.786109, -3.107232},
+ {1.272945, -0.465946, -3.107232},
+ {1.146501, -0.614634, -3.107232},
+ {1.067760, -0.806050, -3.107232},
+ {0.881088, -0.817665, -3.107232},
+ {0.993167, -0.730528, -3.107232},
+ {2.081435, -0.964565, -3.107232},
+ {1.685320, -1.008892, -3.107232},
+ {1.245236, -0.916918, -3.107232},
+ {1.035588, -0.884257, -3.107232},
+ {0.832409, -0.850059, -3.107232},
+ {2.081435, -0.223760, -3.107232},
+ {2.081190, -0.010639, -2.935429},
+ {2.087016, -0.010054, -2.926670},
+ {2.258819, -0.226469, -2.927872},
+ {2.081435, -0.223760, -3.107232},
+ {2.258819, -0.226469, -2.927872},
+ {2.258819, -0.369461, -2.927872},
+ {2.081435, -0.591232, -3.107232},
+ {2.258819, -0.521298, -2.927872},
+ {2.081435, -0.964565, -3.107232},
+ {2.081435, -1.309179, -3.107232},
+ {2.081435, -0.964565, -3.107232},
+ {2.258819, -0.521298, -2.927872},
+ {2.258819, -0.860510, -2.927872},
+ {2.081435, -1.523168, -3.107232},
+ {2.258819, -1.520429, -2.927872},
+ {2.089698, -1.691416, -2.935733},
+ {2.089698, -1.691416, -2.275813},
+ {1.785640, -1.691416, -2.610251},
+ {1.446491, -1.691416, -2.935733},
+ {1.604195, -1.691416, -2.092115},
+ {2.089698, -1.691416, -1.936601},
+ {1.446491, -1.691416, -1.641772},
+ {2.089698, -1.691416, -1.641772},
+ {2.088496, -1.519613, -1.425357},
+ {1.337834, -1.519613, -1.425356},
+ {0.790289, -1.691416, -2.935733},
+ {0.790289, -1.691416, -2.275813},
+ {0.572007, -1.519613, -2.165320},
+ {0.572007, -1.519613, -2.935487},
+ {1.446491, -1.691416, -1.641772},
+ {1.522977, -1.691416, -1.860188},
+ {2.089698, -1.691416, -1.784764},
+ {2.089698, -1.691416, -1.641772},
+ {1.522977, -1.691416, -1.860188},
+ {2.089698, -1.691416, -1.784764},
+ {2.081435, -1.523168, -3.107232},
+ {2.258819, -1.520429, -2.927872},
+ {2.089698, -1.691416, -2.935733},
+ {0.787475, -1.523169, -3.107232},
+ {0.790289, -1.691416, -2.935733},
+ {0.571060, -1.521966, -2.935429},
+ {0.572007, -1.519613, -2.935487},
+ {0.790289, -1.691416, -2.935733},
+ {0.993712, -1.691416, -2.935733},
+ {1.098848, -1.691416, -2.379488},
+ {0.790289, -1.691416, -2.275813},
+ {1.209709, -1.691416, -2.116352},
+ {1.032476, -1.691416, -2.127242},
+ {1.181164, -1.691416, -2.000798},
+ {1.287126, -1.691416, -1.957209},
+ {1.348799, -1.691416, -1.788575},
+ {1.304908, -1.691416, -1.854530},
+ {1.287126, -1.691416, -1.957209},
+ {1.181164, -1.691416, -2.000798},
+ {0.787475, -1.523169, -3.107232},
+ {0.930467, -1.523168, -3.107232},
+ {0.993712, -1.691416, -2.935733},
+ {0.790289, -1.691416, -2.935733},
+ {1.211046, -1.691416, -2.935733},
+ {1.428508, -1.691416, -2.490254},
+ {1.399062, -1.691416, -2.104718},
+ {1.287126, -1.691416, -1.957209},
+ {1.400335, -1.691416, -1.910639},
+ {1.395691, -1.691416, -1.718109},
+ {1.348799, -1.691416, -1.788575},
+ {1.522977, -1.691416, -1.860188},
+ {1.446491, -1.691416, -1.641772},
+ {1.400335, -1.691416, -1.910639},
+ {1.082304, -1.523168, -3.107232},
+ {1.211046, -1.691416, -2.935733},
+ {0.993712, -1.691416, -2.935733},
+ {0.930467, -1.523168, -3.107232},
+ {1.421516, -1.523168, -3.107232},
+ {1.446491, -1.691416, -2.935733},
+ {2.081435, -1.523168, -3.107232},
+ {2.089698, -1.691416, -2.935733},
+ {1.446491, -1.691416, -2.935733},
+ {1.421516, -1.523168, -3.107232},
+ {2.258819, -1.520429, -2.284665},
+ {2.089698, -1.691416, -2.275813},
+ {2.089698, -1.691416, -2.935733},
+ {2.258819, -1.520429, -2.927872},
+ {2.258819, -0.711939, -1.870650},
+ {2.258819, -0.703508, -2.007863},
+ {2.258819, -0.551749, -2.101373},
+ {2.258819, -0.585495, -2.019338},
+ {2.258819, -0.388165, -2.177062},
+ {2.258819, -0.439227, -2.143082},
+ {2.258819, -0.860510, -1.628463},
+ {2.258819, -0.940775, -1.867347},
+ {2.258819, -1.520429, -1.628463},
+ {2.258819, -1.520429, -1.785952},
+ {2.258819, -0.693630, -2.168630},
+ {2.258819, -0.512209, -2.197491},
+ {2.258819, -0.328337, -2.216875},
+ {2.258819, -1.034819, -2.147240},
+ {2.258819, -1.520429, -1.970476},
+ {2.089698, -1.691416, -1.936601},
+ {2.258819, -1.520429, -1.970476},
+ {2.258819, -1.520429, -1.785952},
+ {2.089698, -1.691416, -1.784764},
+ {2.258819, -1.520429, -1.628463},
+ {2.089698, -1.691416, -1.641772},
+ {2.089698, -1.691416, -1.784764},
+ {2.258819, -1.520429, -1.785952},
+ {2.089698, -1.691416, -2.275813},
+ {2.258819, -1.520429, -2.284665},
+ {2.086549, -1.520184, -1.424809},
+ {2.089698, -1.691416, -1.641772},
+ {2.258819, -1.520429, -1.628463},
+ {2.088496, -1.519613, -1.425357},
+ {-2.500340, 3.244749, -2.938213},
+ {-2.500340, 3.244749, -2.724224},
+ {-2.174858, 3.244749, -2.634154},
+ {-1.840420, 3.244749, -2.938213},
+ {-1.656722, 3.244749, -2.452710},
+ {-1.501209, 3.244749, -2.938213},
+ {-1.206379, 3.244749, -2.295006},
+ {-0.989964, 3.072946, -2.186349},
+ {-0.989964, 3.072946, -2.937011},
+ {-1.206380, 3.244749, -2.938213},
+ {-2.500340, 3.244749, -1.638804},
+ {-2.500094, 3.072946, -1.425684},
+ {-1.729928, 3.072946, -1.425684},
+ {-1.840420, 3.244749, -1.638804},
+ {-1.206379, 3.244749, -2.295006},
+ {-1.206380, 3.244749, -2.938213},
+ {-1.349372, 3.244749, -2.938213},
+ {-1.424796, 3.244749, -2.371492},
+ {-2.677724, 2.498669, -1.859929},
+ {-2.677724, 3.065389, -1.784505},
+ {-2.677724, 3.065389, -1.936342},
+ {-2.677724, 2.579886, -2.091856},
+ {-2.677724, 2.422182, -1.641513},
+ {-2.677724, 3.065390, -1.641513},
+ {-2.677724, 1.765981, -2.935474},
+ {-2.505453, 1.562327, -2.935229},
+ {-2.505453, 1.562327, -2.165062},
+ {-2.677724, 1.765981, -2.275554},
+ {-2.677724, 2.422182, -1.641513},
+ {-2.505920, 2.313525, -1.425098},
+ {-2.505920, 3.064187, -1.425098},
+ {-2.677724, 3.065390, -1.641513},
+ {-2.677724, 3.065389, -2.275554},
+ {-2.677724, 2.761331, -2.609992},
+ {-2.677724, 3.065389, -2.935474},
+ {-2.677724, 2.422182, -2.935474},
+ {-2.500340, 3.244749, -1.638804},
+ {-1.840420, 3.244749, -1.638804},
+ {-2.027705, 3.244749, -2.196200},
+ {-2.500340, 3.244749, -2.006277},
+ {-1.691849, 3.244749, -1.880991},
+ {-1.672178, 3.244749, -2.201154},
+ {-1.565406, 3.244749, -2.029679},
+ {-1.412072, 3.244749, -2.145572},
+ {-1.299993, 3.244749, -2.232709},
+ {-1.486664, 3.244749, -2.221094},
+ {-2.500340, 3.244749, -2.006277},
+ {-2.027705, 3.244749, -2.196200},
+ {-2.104225, 3.244749, -2.423936},
+ {-2.500340, 3.244749, -2.379609},
+ {-2.500340, 3.244749, -2.379609},
+ {-2.104225, 3.244749, -2.423936},
+ {-1.672178, 3.244749, -2.201154},
+ {-1.664141, 3.244749, -2.331963},
+ {-1.664141, 3.244749, -2.331963},
+ {-1.486664, 3.244749, -2.221094},
+ {-1.299993, 3.244749, -2.232709},
+ {-1.251314, 3.244749, -2.265104},
+ {-1.454492, 3.244749, -2.299301},
+ {-1.206379, 3.244749, -2.295006},
+ {-1.424796, 3.244749, -2.371492},
+ {-1.672178, 3.244749, -2.201154},
+ {-1.664141, 3.244749, -2.331963},
+ {-1.454492, 3.244749, -2.299301},
+ {-2.500340, 3.244749, -1.638804},
+ {-2.677724, 3.065390, -1.641513},
+ {-2.505920, 3.064187, -1.425098},
+ {-2.500094, 3.072946, -1.425684},
+ {-2.500340, 3.244749, -1.638804},
+ {-2.500340, 3.244749, -2.006277},
+ {-2.677724, 3.065389, -1.784505},
+ {-2.677724, 3.065390, -1.641513},
+ {-2.500340, 3.244749, -2.379609},
+ {-2.677724, 3.065389, -1.936342},
+ {-2.500340, 3.244749, -2.724224},
+ {-2.677724, 3.065389, -2.275554},
+ {-2.500340, 3.244749, -2.938213},
+ {-2.677724, 3.065389, -2.935474},
+ {-2.677724, 3.065389, -2.275554},
+ {-2.500340, 3.244749, -2.724224},
+ {-2.508603, 3.073250, -3.106460},
+ {-1.865395, 3.073250, -3.106460},
+ {-2.204544, 2.747768, -3.106460},
+ {-2.508603, 2.413330, -3.106460},
+ {-2.023100, 2.229632, -3.106460},
+ {-2.508603, 2.074118, -3.106460},
+ {-1.865396, 1.779289, -3.106460},
+ {-1.756739, 1.562874, -2.934657},
+ {-2.507401, 1.562874, -2.934657},
+ {-2.508603, 1.779289, -3.106460},
+ {-1.209194, 3.073250, -3.106460},
+ {-0.990912, 3.073004, -2.934657},
+ {-0.990912, 2.302837, -2.934657},
+ {-1.209194, 2.413330, -3.106460},
+ {-1.865396, 1.779289, -3.106460},
+ {-2.508603, 1.779289, -3.106460},
+ {-2.508603, 1.922282, -3.106460},
+ {-1.941882, 1.997706, -3.106460},
+ {-2.500340, 3.244749, -2.938213},
+ {-2.508603, 3.073250, -3.106460},
+ {-2.677724, 3.065389, -2.935474},
+ {-1.206380, 3.244749, -2.938213},
+ {-0.990912, 3.073004, -2.934657},
+ {-0.989964, 3.072946, -2.937011},
+ {-1.209194, 3.073250, -3.106460},
+ {-1.209194, 3.073250, -3.106460},
+ {-1.209194, 2.413330, -3.106460},
+ {-1.517753, 2.517006, -3.106460},
+ {-1.412616, 3.073250, -3.106460},
+ {-1.451381, 2.264759, -3.106460},
+ {-1.628613, 2.253870, -3.106460},
+ {-1.600068, 2.138316, -3.106460},
+ {-1.723813, 1.992047, -3.106460},
+ {-1.767703, 1.926092, -3.106460},
+ {-1.706031, 2.094727, -3.106460},
+ {-1.206380, 3.244749, -2.938213},
+ {-1.209194, 3.073250, -3.106460},
+ {-1.412616, 3.073250, -3.106460},
+ {-1.349372, 3.244749, -2.938213},
+ {-1.847412, 2.627772, -3.106460},
+ {-1.629950, 3.073250, -3.106460},
+ {-1.817967, 2.242235, -3.106460},
+ {-1.814596, 1.855627, -3.106460},
+ {-1.819239, 2.048156, -3.106460},
+ {-1.501209, 3.244749, -2.938213},
+ {-1.629950, 3.073250, -3.106460},
+ {-1.840420, 3.244749, -2.938213},
+ {-1.501209, 3.244749, -2.938213},
+ {-1.629950, 3.073250, -3.106460},
+ {-1.865395, 3.073250, -3.106460},
+ {-2.500340, 3.244749, -2.938213},
+ {-1.840420, 3.244749, -2.938213},
+ {-1.865395, 3.073250, -3.106460},
+ {-2.508603, 3.073250, -3.106460},
+ {-2.677724, 2.422182, -2.935474},
+ {-2.677724, 3.065389, -2.935474},
+ {-2.508603, 3.073250, -3.106460},
+ {-2.508603, 2.413330, -3.106460},
+ {-2.677724, 2.008168, -2.126983},
+ {-2.677724, 2.156855, -2.000540},
+ {-2.677724, 2.238890, -1.966794},
+ {-2.677724, 2.145380, -2.118553},
+ {-2.677724, 2.280599, -1.854271},
+ {-2.677724, 2.314579, -1.803209},
+ {-2.677724, 1.765981, -2.275554},
+ {-2.677724, 2.004865, -2.355819},
+ {-2.677724, 1.765981, -2.935474},
+ {-2.677724, 1.923469, -2.935474},
+ {-2.677724, 2.335008, -1.927254},
+ {-2.677724, 2.306147, -2.108675},
+ {-2.677724, 2.354392, -1.743382},
+ {-2.677724, 2.284757, -2.449863},
+ {-2.677724, 2.107993, -2.935474},
+ {-2.508603, 2.074118, -3.106460},
+ {-2.508603, 1.922282, -3.106460},
+ {-2.677724, 1.923469, -2.935474},
+ {-2.677724, 2.107993, -2.935474},
+ {-2.677724, 1.765981, -2.935474},
+ {-2.508603, 1.779289, -3.106460},
+ {-2.508603, 2.413330, -3.106460},
+ {-2.677724, 2.422182, -2.935474},
+ {-2.505453, 1.562327, -2.935229},
+ {-2.507401, 1.562874, -2.934657},
+ {-2.677724, 1.765981, -2.935474},
+ {-2.508603, 1.779289, -3.106460},
+ {-2.500340, -1.523168, -3.108316},
+ {-2.500340, -1.309179, -3.108316},
+ {-2.174858, -1.219110, -3.108316},
+ {-1.840420, -1.523168, -3.108316},
+ {-1.656722, -1.037665, -3.108316},
+ {-1.501209, -1.523168, -3.108316},
+ {-1.206379, -0.879961, -3.108316},
+ {-0.989964, -0.771304, -2.936513},
+ {-0.989964, -1.521966, -2.936513},
+ {-1.206380, -1.523169, -3.108316},
+ {-2.500340, -0.223760, -3.108316},
+ {-2.500094, -0.010639, -2.936513},
+ {-1.729928, -0.010639, -2.936513},
+ {-1.840420, -0.223760, -3.108316},
+ {-1.206379, -0.879961, -3.108316},
+ {-1.206380, -1.523169, -3.108316},
+ {-1.349372, -1.523169, -3.108316},
+ {-1.424796, -0.956448, -3.108316},
+ {-2.677724, -0.444885, -2.362235},
+ {-2.677724, -0.369461, -2.928956},
+ {-2.677724, -0.521298, -2.928956},
+ {-2.677724, -0.676811, -2.443453},
+ {-2.677724, -0.226469, -2.285749},
+ {-2.677724, -0.226469, -2.928956},
+ {-2.677724, -1.520429, -1.629547},
+ {-2.505453, -1.520184, -1.425893},
+ {-2.505453, -0.750017, -1.425893},
+ {-2.677724, -0.860510, -1.629547},
+ {-2.677724, -0.226469, -2.285749},
+ {-2.505920, -0.010053, -2.177092},
+ {-2.505920, -0.010054, -2.927754},
+ {-2.677724, -0.226469, -2.928956},
+ {-2.677724, -0.860510, -2.928956},
+ {-2.677724, -1.194948, -2.624897},
+ {-2.677724, -1.520429, -2.928956},
+ {-2.677724, -1.520429, -2.285748},
+ {-2.500340, -0.223760, -3.108316},
+ {-1.840420, -0.223760, -3.108316},
+ {-2.027706, -0.781156, -3.108316},
+ {-2.500340, -0.591232, -3.108316},
+ {-1.691849, -0.465946, -3.108316},
+ {-1.672178, -0.786109, -3.108316},
+ {-1.565406, -0.614634, -3.108316},
+ {-1.412072, -0.730528, -3.108316},
+ {-1.299993, -0.817665, -3.108316},
+ {-1.486664, -0.806050, -3.108316},
+ {-2.104225, -1.008892, -3.108316},
+ {-2.500340, -0.964565, -3.108316},
+ {-1.664141, -0.916918, -3.108316},
+ {-1.251314, -0.850059, -3.108316},
+ {-1.454492, -0.884257, -3.108316},
+ {-2.500340, -0.223760, -3.108316},
+ {-2.677724, -0.226469, -2.928956},
+ {-2.505920, -0.010054, -2.927754},
+ {-2.500094, -0.010639, -2.936513},
+ {-2.500340, -0.223760, -3.108316},
+ {-2.500340, -0.591232, -3.108316},
+ {-2.677724, -0.369461, -2.928956},
+ {-2.677724, -0.226469, -2.928956},
+ {-2.500340, -0.964565, -3.108316},
+ {-2.677724, -0.521298, -2.928956},
+ {-2.500340, -1.309179, -3.108316},
+ {-2.677724, -0.860510, -2.928956},
+ {-2.500340, -1.523168, -3.108316},
+ {-2.677724, -1.520429, -2.928956},
+ {-2.677724, -0.860510, -2.928956},
+ {-2.500340, -1.309179, -3.108316},
+ {-2.508603, -1.691416, -2.936816},
+ {-1.865395, -1.691416, -2.936816},
+ {-2.204544, -1.691416, -2.611335},
+ {-2.508603, -1.691416, -2.276897},
+ {-2.023100, -1.691416, -2.093198},
+ {-2.508603, -1.691416, -1.937685},
+ {-1.865396, -1.691416, -1.642856},
+ {-1.756739, -1.519613, -1.426440},
+ {-2.507401, -1.519613, -1.426440},
+ {-2.508603, -1.691416, -1.642856},
+ {-1.209194, -1.691416, -2.936816},
+ {-0.990912, -1.519613, -2.936571},
+ {-0.990912, -1.519613, -2.166404},
+ {-1.209194, -1.691416, -2.276896},
+ {-1.865396, -1.691416, -1.642856},
+ {-2.508603, -1.691416, -1.642856},
+ {-2.508603, -1.691416, -1.785848},
+ {-1.941882, -1.691416, -1.861272},
+ {-1.941882, -1.691416, -1.861272},
+ {-2.508603, -1.691416, -1.785848},
+ {-2.500340, -1.523168, -3.108316},
+ {-2.508603, -1.691416, -2.936816},
+ {-2.677724, -1.520429, -2.928956},
+ {-1.206380, -1.523169, -3.108316},
+ {-0.990912, -1.519613, -2.936571},
+ {-0.989964, -1.521966, -2.936513},
+ {-1.209194, -1.691416, -2.936816},
+ {-1.209194, -1.691416, -2.936816},
+ {-1.209194, -1.691416, -2.276896},
+ {-1.517753, -1.691416, -2.380572},
+ {-1.412616, -1.691416, -2.936816},
+ {-1.451380, -1.691416, -2.128325},
+ {-1.628613, -1.691416, -2.117436},
+ {-1.600068, -1.691416, -2.001882},
+ {-1.723813, -1.691416, -1.855614},
+ {-1.767703, -1.691416, -1.789659},
+ {-1.706031, -1.691416, -1.958293},
+ {-1.600068, -1.691416, -2.001882},
+ {-1.706031, -1.691416, -1.958293},
+ {-1.206380, -1.523169, -3.108316},
+ {-1.209194, -1.691416, -2.936816},
+ {-1.412616, -1.691416, -2.936816},
+ {-1.349372, -1.523169, -3.108316},
+ {-1.847412, -1.691416, -2.491338},
+ {-1.629950, -1.691416, -2.936816},
+ {-1.817967, -1.691416, -2.105802},
+ {-1.706031, -1.691416, -1.958293},
+ {-1.767703, -1.691416, -1.789659},
+ {-1.814595, -1.691416, -1.719193},
+ {-1.819239, -1.691416, -1.911723},
+ {-1.865396, -1.691416, -1.642856},
+ {-1.941882, -1.691416, -1.861272},
+ {-1.819239, -1.691416, -1.911723},
+ {-1.501209, -1.523168, -3.108316},
+ {-1.349372, -1.523169, -3.108316},
+ {-1.412616, -1.691416, -2.936816},
+ {-1.629950, -1.691416, -2.936816},
+ {-1.840420, -1.523168, -3.108316},
+ {-1.501209, -1.523168, -3.108316},
+ {-1.629950, -1.691416, -2.936816},
+ {-1.865395, -1.691416, -2.936816},
+ {-2.500340, -1.523168, -3.108316},
+ {-1.840420, -1.523168, -3.108316},
+ {-1.865395, -1.691416, -2.936816},
+ {-2.508603, -1.691416, -2.936816},
+ {-2.677724, -1.520429, -2.285748},
+ {-2.677724, -1.520429, -2.928956},
+ {-2.508603, -1.691416, -2.936816},
+ {-2.508603, -1.691416, -2.276897},
+ {-2.677724, -0.711939, -1.871734},
+ {-2.677724, -0.585495, -2.020422},
+ {-2.677724, -0.551749, -2.102457},
+ {-2.677724, -0.703508, -2.008946},
+ {-2.677724, -0.439227, -2.144166},
+ {-2.677724, -0.388165, -2.178146},
+ {-2.677724, -0.860510, -1.629547},
+ {-2.677724, -0.940775, -1.868431},
+ {-2.677724, -1.520429, -1.629547},
+ {-2.677724, -1.520429, -1.787036},
+ {-2.677724, -0.512209, -2.198575},
+ {-2.677724, -0.693630, -2.169713},
+ {-2.677724, -0.328337, -2.217959},
+ {-2.677724, -1.034819, -2.148324},
+ {-2.677724, -1.520429, -1.971559},
+ {-2.508603, -1.691416, -1.937685},
+ {-2.508603, -1.691416, -1.785848},
+ {-2.677724, -1.520429, -1.787036},
+ {-2.677724, -1.520429, -1.971559},
+ {-2.677724, -1.520429, -1.629547},
+ {-2.677724, -1.520429, -1.787036},
+ {-2.508603, -1.691416, -1.785848},
+ {-2.508603, -1.691416, -1.642856},
+ {-2.508603, -1.691416, -2.276897},
+ {-2.677724, -1.520429, -2.285748},
+ {-2.505453, -1.520184, -1.425893},
+ {-2.507401, -1.519613, -1.426440},
+ {-2.677724, -1.520429, -1.629547},
+ {-2.508603, -1.691416, -1.642856},
+ {-2.501356, 3.245014, 1.660019},
+ {-1.841437, 3.245014, 1.660019},
+ {-2.175874, 3.245014, 1.355960},
+ {-2.501356, 3.245014, 1.446030},
+ {-1.657738, 3.245014, 1.174516},
+ {-1.502225, 3.245014, 1.660019},
+ {-1.207395, 3.245014, 1.016812},
+ {-1.207396, 3.245014, 1.660019},
+ {-0.990980, 3.073211, 1.658817},
+ {-0.990980, 3.073211, 0.908155},
+ {-2.501356, 3.245014, 0.360610},
+ {-1.841436, 3.245014, 0.360610},
+ {-1.730944, 3.073211, 0.147490},
+ {-2.501110, 3.073211, 0.147490},
+ {-1.207395, 3.245014, 1.016812},
+ {-1.425812, 3.245014, 1.093298},
+ {-1.350388, 3.245014, 1.660019},
+ {-1.207396, 3.245014, 1.660019},
+ {-2.678739, 2.498934, 0.581735},
+ {-2.678740, 2.580151, 0.813662},
+ {-2.678740, 3.065655, 0.658148},
+ {-2.678739, 3.065655, 0.506311},
+ {-2.678740, 2.422447, 0.363319},
+ {-2.678739, 2.498934, 0.581735},
+ {-2.678739, 3.065655, 0.506311},
+ {-2.678740, 3.065655, 0.363319},
+ {-2.678740, 1.766246, 1.657280},
+ {-2.678740, 1.766246, 0.997360},
+ {-2.506469, 1.562592, 0.886868},
+ {-2.506469, 1.562592, 1.657034},
+ {-2.678740, 2.422447, 0.363319},
+ {-2.678740, 3.065655, 0.363319},
+ {-2.506937, 3.064452, 0.146904},
+ {-2.506937, 2.313791, 0.146904},
+ {-2.678740, 2.580151, 0.813662},
+ {-2.678740, 2.761596, 1.331798},
+ {-2.678740, 3.065654, 0.997360},
+ {-2.678740, 3.065655, 0.658148},
+ {-2.678740, 3.065654, 1.657280},
+ {-2.678740, 2.422447, 1.657280},
+ {-2.501356, 3.245014, 0.360610},
+ {-2.501356, 3.245014, 0.728083},
+ {-2.028722, 3.245014, 0.918006},
+ {-1.841436, 3.245014, 0.360610},
+ {-1.673194, 3.245014, 0.922960},
+ {-1.692865, 3.245014, 0.602797},
+ {-1.566422, 3.245014, 0.751485},
+ {-1.487680, 3.245014, 0.942900},
+ {-1.301009, 3.245014, 0.954516},
+ {-1.413088, 3.245014, 0.867378},
+ {-2.501356, 3.245014, 0.728083},
+ {-2.501356, 3.245014, 1.101415},
+ {-2.105241, 3.245014, 1.145743},
+ {-2.028722, 3.245014, 0.918006},
+ {-2.501356, 3.245014, 1.101415},
+ {-2.105241, 3.245014, 1.145743},
+ {-1.665157, 3.245014, 1.053769},
+ {-1.673194, 3.245014, 0.922960},
+ {-1.665157, 3.245014, 1.053769},
+ {-1.487680, 3.245014, 0.942900},
+ {-1.455508, 3.245014, 1.021107},
+ {-1.252330, 3.245014, 0.986910},
+ {-1.301009, 3.245014, 0.954516},
+ {-1.425812, 3.245014, 1.093298},
+ {-1.207395, 3.245014, 1.016812},
+ {-1.673194, 3.245014, 0.922960},
+ {-1.665157, 3.245014, 1.053769},
+ {-1.455508, 3.245014, 1.021107},
+ {-2.501356, 3.245014, 0.360610},
+ {-2.501110, 3.073211, 0.147490},
+ {-2.506937, 3.064452, 0.146904},
+ {-2.678740, 3.065655, 0.363319},
+ {-2.501356, 3.245014, 0.360610},
+ {-2.678740, 3.065655, 0.363319},
+ {-2.678739, 3.065655, 0.506311},
+ {-2.501356, 3.245014, 0.728083},
+ {-2.678739, 3.065655, 0.506311},
+ {-2.678740, 3.065655, 0.658148},
+ {-2.501356, 3.245014, 1.101415},
+ {-2.501356, 3.245014, 0.728083},
+ {-2.501356, 3.245014, 1.446030},
+ {-2.501356, 3.245014, 1.101415},
+ {-2.678740, 3.065655, 0.658148},
+ {-2.678740, 3.065654, 0.997360},
+ {-2.501356, 3.245014, 1.660019},
+ {-2.678740, 3.065654, 1.657280},
+ {-2.509619, 3.073515, 1.828266},
+ {-2.509619, 2.413595, 1.828266},
+ {-2.205560, 2.748034, 1.828266},
+ {-1.866412, 3.073515, 1.828266},
+ {-2.024116, 2.229897, 1.828266},
+ {-2.509619, 2.074384, 1.828266},
+ {-1.866412, 1.779554, 1.828267},
+ {-2.509619, 1.779554, 1.828267},
+ {-2.508416, 1.563139, 1.656463},
+ {-1.757755, 1.563139, 1.656463},
+ {-1.210210, 3.073515, 1.828266},
+ {-1.210210, 2.413595, 1.828266},
+ {-0.991928, 2.303102, 1.656463},
+ {-0.991928, 3.073269, 1.656463},
+ {-1.866412, 1.779554, 1.828267},
+ {-1.942898, 1.997971, 1.828266},
+ {-2.509619, 1.922547, 1.828266},
+ {-2.509619, 1.779554, 1.828267},
+ {-1.942898, 1.997971, 1.828266},
+ {-2.509619, 1.922547, 1.828266},
+ {-2.501356, 3.245014, 1.660019},
+ {-2.678740, 3.065654, 1.657280},
+ {-2.509619, 3.073515, 1.828266},
+ {-1.207396, 3.245014, 1.660019},
+ {-1.210210, 3.073515, 1.828266},
+ {-0.990980, 3.073211, 1.658817},
+ {-0.991928, 3.073269, 1.656463},
+ {-1.210210, 3.073515, 1.828266},
+ {-1.413633, 3.073515, 1.828266},
+ {-1.518769, 2.517271, 1.828266},
+ {-1.210210, 2.413595, 1.828266},
+ {-1.629630, 2.254135, 1.828266},
+ {-1.452397, 2.265024, 1.828266},
+ {-1.601085, 2.138581, 1.828266},
+ {-1.707047, 2.094992, 1.828266},
+ {-1.768720, 1.926357, 1.828267},
+ {-1.724829, 1.992312, 1.828266},
+ {-1.707047, 2.094992, 1.828266},
+ {-1.601085, 2.138581, 1.828266},
+ {-1.207396, 3.245014, 1.660019},
+ {-1.350388, 3.245014, 1.660019},
+ {-1.413633, 3.073515, 1.828266},
+ {-1.210210, 3.073515, 1.828266},
+ {-1.630967, 3.073515, 1.828266},
+ {-1.848429, 2.628037, 1.828266},
+ {-1.818983, 2.242501, 1.828266},
+ {-1.707047, 2.094992, 1.828266},
+ {-1.820256, 2.048422, 1.828266},
+ {-1.815612, 1.855892, 1.828267},
+ {-1.768720, 1.926357, 1.828267},
+ {-1.820256, 2.048422, 1.828266},
+ {-1.942898, 1.997971, 1.828266},
+ {-1.866412, 1.779554, 1.828267},
+ {-1.815612, 1.855892, 1.828267},
+ {-1.820256, 2.048422, 1.828266},
+ {-1.502225, 3.245014, 1.660019},
+ {-1.630967, 3.073515, 1.828266},
+ {-1.841437, 3.245014, 1.660019},
+ {-1.866412, 3.073515, 1.828266},
+ {-2.501356, 3.245014, 1.660019},
+ {-2.509619, 3.073515, 1.828266},
+ {-2.678740, 2.422447, 1.657280},
+ {-2.509619, 2.413595, 1.828266},
+ {-2.509619, 3.073515, 1.828266},
+ {-2.678740, 3.065654, 1.657280},
+ {-2.678740, 2.008433, 0.848789},
+ {-2.678740, 2.145645, 0.840359},
+ {-2.678740, 2.239156, 0.688599},
+ {-2.678740, 2.157120, 0.722346},
+ {-2.678740, 2.157120, 0.722346},
+ {-2.678740, 2.239156, 0.688599},
+ {-2.678739, 2.314844, 0.525015},
+ {-2.678739, 2.280864, 0.576077},
+ {-2.678740, 1.766246, 0.997360},
+ {-2.678740, 2.005130, 1.077625},
+ {-2.678740, 1.766246, 1.657280},
+ {-2.678740, 1.923734, 1.657280},
+ {-2.678740, 2.145645, 0.840359},
+ {-2.678740, 2.306412, 0.830481},
+ {-2.678739, 2.335274, 0.649060},
+ {-2.678740, 2.239156, 0.688599},
+ {-2.678740, 2.306412, 0.830481},
+ {-2.678740, 2.580151, 0.813662},
+ {-2.678739, 2.498934, 0.581735},
+ {-2.678739, 2.335274, 0.649060},
+ {-2.678740, 2.239156, 0.688599},
+ {-2.678739, 2.335274, 0.649060},
+ {-2.678739, 2.354657, 0.465188},
+ {-2.678739, 2.314844, 0.525015},
+ {-2.678739, 2.335274, 0.649060},
+ {-2.678739, 2.498934, 0.581735},
+ {-2.678740, 2.422447, 0.363319},
+ {-2.678739, 2.354657, 0.465188},
+ {-2.678740, 2.285022, 1.171669},
+ {-2.678740, 2.306412, 0.830481},
+ {-2.678740, 2.108258, 1.657280},
+ {-2.509619, 2.074384, 1.828266},
+ {-2.678740, 2.108258, 1.657280},
+ {-2.678740, 1.923734, 1.657280},
+ {-2.509619, 1.922547, 1.828266},
+ {-2.678740, 1.766246, 1.657280},
+ {-2.509619, 1.779554, 1.828267},
+ {-2.509619, 1.922547, 1.828266},
+ {-2.678740, 1.923734, 1.657280},
+ {-2.509619, 2.413595, 1.828266},
+ {-2.678740, 2.422447, 1.657280},
+ {-2.506469, 1.562592, 1.657034},
+ {-2.509619, 1.779554, 1.828267},
+ {-2.678740, 1.766246, 1.657280},
+ {-2.508416, 1.563139, 1.656463},
+ {-2.501356, -1.522903, 1.827472},
+ {-1.841436, -1.522903, 1.827472},
+ {-2.175874, -1.218844, 1.827472},
+ {-2.501356, -1.308914, 1.827472},
+ {-1.657738, -1.037400, 1.827472},
+ {-1.502225, -1.522903, 1.827472},
+ {-1.207395, -0.879696, 1.827472},
+ {-1.207396, -1.522903, 1.827472},
+ {-0.990980, -1.521701, 1.655669},
+ {-0.990980, -0.771039, 1.655669},
+ {-2.501356, -0.223494, 1.827472},
+ {-1.841436, -0.223494, 1.827472},
+ {-1.730944, -0.010374, 1.655668},
+ {-2.501110, -0.010374, 1.655668},
+ {-1.207395, -0.879696, 1.827472},
+ {-1.425812, -0.956182, 1.827472},
+ {-1.350388, -1.522903, 1.827472},
+ {-1.207396, -1.522903, 1.827472},
+ {-2.678740, -0.444620, 1.081391},
+ {-2.678740, -0.676546, 1.162608},
+ {-2.678740, -0.521033, 1.648112},
+ {-2.678740, -0.369196, 1.648112},
+ {-2.678740, -0.226204, 1.004904},
+ {-2.678740, -0.226204, 1.648112},
+ {-2.678739, -1.520164, 0.348703},
+ {-2.678739, -0.860244, 0.348703},
+ {-2.506469, -0.749752, 0.145049},
+ {-2.506469, -1.519919, 0.145049},
+ {-2.678740, -0.226204, 1.004904},
+ {-2.678740, -0.226204, 1.648112},
+ {-2.506936, -0.009788, 1.646909},
+ {-2.506937, -0.009788, 0.896247},
+ {-2.678740, -1.194683, 1.344053},
+ {-2.678740, -0.860244, 1.648112},
+ {-2.678740, -1.520164, 1.648111},
+ {-2.678740, -1.520164, 1.004904},
+ {-2.501356, -0.223494, 1.827472},
+ {-2.501356, -0.590967, 1.827472},
+ {-2.028722, -0.780890, 1.827472},
+ {-1.841436, -0.223494, 1.827472},
+ {-1.673194, -0.785844, 1.827472},
+ {-1.692865, -0.465681, 1.827472},
+ {-1.566422, -0.614369, 1.827472},
+ {-1.487680, -0.805785, 1.827472},
+ {-1.301009, -0.817400, 1.827472},
+ {-1.413088, -0.730262, 1.827472},
+ {-2.501356, -0.964299, 1.827472},
+ {-2.105241, -1.008627, 1.827472},
+ {-1.665157, -0.916653, 1.827472},
+ {-1.455508, -0.883991, 1.827472},
+ {-1.252330, -0.849794, 1.827472},
+ {-2.501356, -0.223494, 1.827472},
+ {-2.501110, -0.010374, 1.655668},
+ {-2.506936, -0.009788, 1.646909},
+ {-2.678740, -0.226204, 1.648112},
+ {-2.501356, -0.223494, 1.827472},
+ {-2.678740, -0.226204, 1.648112},
+ {-2.678740, -0.369196, 1.648112},
+ {-2.501356, -0.590967, 1.827472},
+ {-2.678740, -0.521033, 1.648112},
+ {-2.501356, -0.964299, 1.827472},
+ {-2.501356, -1.308914, 1.827472},
+ {-2.678740, -0.860244, 1.648112},
+ {-2.501356, -1.522903, 1.827472},
+ {-2.501356, -1.308914, 1.827472},
+ {-2.678740, -0.860244, 1.648112},
+ {-2.678740, -1.520164, 1.648111},
+ {-2.509619, -1.691150, 1.655972},
+ {-2.509619, -1.691150, 0.996052},
+ {-2.205560, -1.691150, 1.330490},
+ {-1.866411, -1.691150, 1.655972},
+ {-2.024116, -1.691150, 0.812354},
+ {-2.509619, -1.691150, 0.656841},
+ {-1.866412, -1.691151, 0.362011},
+ {-2.509619, -1.691151, 0.362011},
+ {-2.508416, -1.519348, 0.145596},
+ {-1.757755, -1.519348, 0.145596},
+ {-1.210210, -1.691150, 1.655972},
+ {-1.210210, -1.691150, 0.996052},
+ {-0.991928, -1.519347, 0.885560},
+ {-0.991928, -1.519347, 1.655727},
+ {-1.866412, -1.691151, 0.362011},
+ {-1.942898, -1.691150, 0.580428},
+ {-2.509619, -1.691150, 0.505004},
+ {-2.509619, -1.691151, 0.362011},
+ {-1.942898, -1.691150, 0.580428},
+ {-2.509619, -1.691150, 0.505004},
+ {-2.501356, -1.522903, 1.827472},
+ {-2.678740, -1.520164, 1.648111},
+ {-2.509619, -1.691150, 1.655972},
+ {-1.207396, -1.522903, 1.827472},
+ {-1.210210, -1.691150, 1.655972},
+ {-0.990980, -1.521701, 1.655669},
+ {-0.991928, -1.519347, 1.655727},
+ {-1.210210, -1.691150, 1.655972},
+ {-1.413633, -1.691150, 1.655972},
+ {-1.518769, -1.691150, 1.099728},
+ {-1.210210, -1.691150, 0.996052},
+ {-1.629630, -1.691150, 0.836592},
+ {-1.452397, -1.691150, 0.847481},
+ {-1.601084, -1.691150, 0.721038},
+ {-1.707047, -1.691150, 0.677449},
+ {-1.768719, -1.691151, 0.508814},
+ {-1.724829, -1.691150, 0.574769},
+ {-1.707047, -1.691150, 0.677449},
+ {-1.601084, -1.691150, 0.721038},
+ {-1.207396, -1.522903, 1.827472},
+ {-1.350388, -1.522903, 1.827472},
+ {-1.413633, -1.691150, 1.655972},
+ {-1.210210, -1.691150, 1.655972},
+ {-1.630966, -1.691150, 1.655972},
+ {-1.848429, -1.691150, 1.210494},
+ {-1.818983, -1.691150, 0.824958},
+ {-1.707047, -1.691150, 0.677449},
+ {-1.820255, -1.691150, 0.630879},
+ {-1.815612, -1.691151, 0.438349},
+ {-1.768719, -1.691151, 0.508814},
+ {-1.942898, -1.691150, 0.580428},
+ {-1.866412, -1.691151, 0.362011},
+ {-1.820255, -1.691150, 0.630879},
+ {-1.502225, -1.522903, 1.827472},
+ {-1.630966, -1.691150, 1.655972},
+ {-1.841436, -1.522903, 1.827472},
+ {-1.866411, -1.691150, 1.655972},
+ {-2.501356, -1.522903, 1.827472},
+ {-2.509619, -1.691150, 1.655972},
+ {-2.678740, -1.520164, 1.004904},
+ {-2.509619, -1.691150, 0.996052},
+ {-2.509619, -1.691150, 1.655972},
+ {-2.678740, -1.520164, 1.648111},
+ {-2.678739, -0.711673, 0.590889},
+ {-2.678740, -0.703243, 0.728102},
+ {-2.678740, -0.551484, 0.821612},
+ {-2.678740, -0.585230, 0.739577},
+ {-2.678740, -0.585230, 0.739577},
+ {-2.678740, -0.551484, 0.821612},
+ {-2.678740, -0.387900, 0.897301},
+ {-2.678740, -0.438962, 0.863321},
+ {-2.678739, -0.860244, 0.348703},
+ {-2.678739, -0.940509, 0.587587},
+ {-2.678740, -0.703243, 0.728102},
+ {-2.678739, -0.711673, 0.590889},
+ {-2.678739, -1.520164, 0.348703},
+ {-2.678739, -1.520164, 0.506191},
+ {-2.678739, -0.940509, 0.587587},
+ {-2.678739, -0.860244, 0.348703},
+ {-2.678740, -0.703243, 0.728102},
+ {-2.678740, -0.693365, 0.888869},
+ {-2.678740, -0.511944, 0.917731},
+ {-2.678740, -0.328072, 0.937115},
+ {-2.678739, -0.940509, 0.587587},
+ {-2.678740, -1.034554, 0.867479},
+ {-2.678740, -0.693365, 0.888869},
+ {-2.678740, -0.703243, 0.728102},
+ {-2.678740, -1.034554, 0.867479},
+ {-2.678739, -1.520164, 0.506191},
+ {-2.678740, -1.520164, 0.690715},
+ {-2.678740, -1.034554, 0.867479},
+ {-2.678739, -0.940509, 0.587587},
+ {-2.678740, -1.520164, 0.690715},
+ {-2.509619, -1.691150, 0.656841},
+ {-2.678740, -1.520164, 0.690715},
+ {-2.678739, -1.520164, 0.506191},
+ {-2.509619, -1.691150, 0.505004},
+ {-2.678739, -1.520164, 0.348703},
+ {-2.509619, -1.691151, 0.362011},
+ {-2.509619, -1.691150, 0.505004},
+ {-2.678739, -1.520164, 0.506191},
+ {-2.509619, -1.691150, 0.996052},
+ {-2.678740, -1.520164, 1.004904},
+ {-2.678740, -1.520164, 0.690715},
+ {-2.509619, -1.691150, 0.656841},
+ {-2.506469, -1.519919, 0.145049},
+ {-2.509619, -1.691151, 0.362011},
+ {-2.678739, -1.520164, 0.348703},
+ {-2.508416, -1.519348, 0.145596},
+ {2.080420, 3.245014, 1.658453},
+ {2.080420, 3.245014, 1.444464},
+ {1.754938, 3.245014, 1.354394},
+ {1.420500, 3.245014, 1.658453},
+ {1.236801, 3.245014, 1.172950},
+ {1.081288, 3.245014, 1.658453},
+ {0.786459, 3.245014, 1.015246},
+ {0.570043, 3.073211, 0.906589},
+ {0.570044, 3.073211, 1.657251},
+ {0.786459, 3.245014, 1.658453},
+ {2.080420, 3.245014, 0.359044},
+ {2.080173, 3.073211, 0.145924},
+ {1.310007, 3.073211, 0.145924},
+ {1.420499, 3.245014, 0.359044},
+ {0.786459, 3.245014, 1.015246},
+ {0.786459, 3.245014, 1.658453},
+ {0.929451, 3.245014, 1.658453},
+ {1.004875, 3.245014, 1.091732},
+ {2.257803, 2.498934, 0.580169},
+ {2.257803, 3.065655, 0.504745},
+ {2.257802, 3.065655, 0.656582},
+ {2.257802, 2.580151, 0.812096},
+ {2.257803, 2.422447, 0.361753},
+ {2.257803, 3.065655, 0.361753},
+ {2.257803, 3.065655, 0.504745},
+ {2.257803, 2.498934, 0.580169},
+ {2.257802, 1.766246, 1.655714},
+ {2.085533, 1.562592, 1.655468},
+ {2.085533, 1.562592, 0.885302},
+ {2.257802, 1.766246, 0.995794},
+ {2.257803, 2.422447, 0.361753},
+ {2.086000, 2.313791, 0.145338},
+ {2.086000, 3.064452, 0.145338},
+ {2.257803, 3.065655, 0.361753},
+ {2.257802, 2.580151, 0.812096},
+ {2.257802, 3.065655, 0.656582},
+ {2.257802, 3.065654, 0.995794},
+ {2.257802, 2.761596, 1.330232},
+ {2.257802, 3.065654, 1.655714},
+ {2.257802, 2.422447, 1.655714},
+ {2.080420, 3.245014, 0.359044},
+ {1.420499, 3.245014, 0.359044},
+ {1.607785, 3.245014, 0.916440},
+ {2.080420, 3.245014, 0.726517},
+ {1.271928, 3.245014, 0.601230},
+ {1.252257, 3.245014, 0.921393},
+ {1.145485, 3.245014, 0.749919},
+ {0.992151, 3.245014, 0.865812},
+ {0.880072, 3.245014, 0.952949},
+ {1.066744, 3.245014, 0.941334},
+ {2.080420, 3.245014, 0.726517},
+ {1.607785, 3.245014, 0.916440},
+ {1.684304, 3.245014, 1.144176},
+ {2.080420, 3.245014, 1.099849},
+ {2.080420, 3.245014, 1.099849},
+ {1.684304, 3.245014, 1.144176},
+ {1.252257, 3.245014, 0.921393},
+ {1.244220, 3.245014, 1.052202},
+ {1.244220, 3.245014, 1.052202},
+ {1.066744, 3.245014, 0.941334},
+ {0.880072, 3.245014, 0.952949},
+ {0.831393, 3.245014, 0.985343},
+ {1.034572, 3.245014, 1.019541},
+ {0.786459, 3.245014, 1.015246},
+ {1.004875, 3.245014, 1.091732},
+ {1.252257, 3.245014, 0.921393},
+ {1.244220, 3.245014, 1.052202},
+ {1.034572, 3.245014, 1.019541},
+ {2.080420, 3.245014, 0.359044},
+ {2.257803, 3.065655, 0.361753},
+ {2.086000, 3.064452, 0.145338},
+ {2.080173, 3.073211, 0.145924},
+ {2.080420, 3.245014, 0.359044},
+ {2.080420, 3.245014, 0.726517},
+ {2.257803, 3.065655, 0.504745},
+ {2.257803, 3.065655, 0.361753},
+ {2.257803, 3.065655, 0.504745},
+ {2.080420, 3.245014, 0.726517},
+ {2.080420, 3.245014, 1.099849},
+ {2.257802, 3.065655, 0.656582},
+ {2.080420, 3.245014, 1.444464},
+ {2.257802, 3.065654, 0.995794},
+ {2.257802, 3.065655, 0.656582},
+ {2.080420, 3.245014, 1.099849},
+ {2.080420, 3.245014, 1.658453},
+ {2.257802, 3.065654, 1.655714},
+ {2.088682, 3.073515, 1.826700},
+ {1.445475, 3.073515, 1.826700},
+ {1.784624, 2.748034, 1.826700},
+ {2.088682, 2.413595, 1.826700},
+ {1.603179, 2.229897, 1.826700},
+ {2.088682, 2.074384, 1.826700},
+ {1.445475, 1.779554, 1.826700},
+ {1.336818, 1.563139, 1.654897},
+ {2.087480, 1.563139, 1.654897},
+ {2.088682, 1.779554, 1.826700},
+ {0.789273, 3.073515, 1.826700},
+ {0.570991, 3.073269, 1.654897},
+ {0.570991, 2.303102, 1.654897},
+ {0.789273, 2.413595, 1.826700},
+ {1.445475, 1.779554, 1.826700},
+ {2.088682, 1.779554, 1.826700},
+ {2.088682, 1.922547, 1.826700},
+ {1.521961, 1.997971, 1.826700},
+ {2.080420, 3.245014, 1.658453},
+ {2.088682, 3.073515, 1.826700},
+ {2.257802, 3.065654, 1.655714},
+ {0.786459, 3.245014, 1.658453},
+ {0.570991, 3.073269, 1.654897},
+ {0.570044, 3.073211, 1.657251},
+ {0.789273, 3.073515, 1.826700},
+ {0.789273, 3.073515, 1.826700},
+ {0.789273, 2.413595, 1.826700},
+ {1.097832, 2.517271, 1.826700},
+ {0.992696, 3.073515, 1.826700},
+ {1.031460, 2.265024, 1.826700},
+ {1.208693, 2.254135, 1.826700},
+ {1.180148, 2.138581, 1.826700},
+ {1.303892, 1.992312, 1.826700},
+ {1.347783, 1.926357, 1.826700},
+ {1.286110, 2.094992, 1.826700},
+ {0.786459, 3.245014, 1.658453},
+ {0.789273, 3.073515, 1.826700},
+ {0.992696, 3.073515, 1.826700},
+ {0.929451, 3.245014, 1.658453},
+ {1.427492, 2.628037, 1.826700},
+ {1.210030, 3.073515, 1.826700},
+ {1.398046, 2.242501, 1.826700},
+ {1.394675, 1.855892, 1.826700},
+ {1.399319, 2.048422, 1.826700},
+ {1.081288, 3.245014, 1.658453},
+ {0.929451, 3.245014, 1.658453},
+ {0.992696, 3.073515, 1.826700},
+ {1.210030, 3.073515, 1.826700},
+ {1.420500, 3.245014, 1.658453},
+ {1.445475, 3.073515, 1.826700},
+ {2.080420, 3.245014, 1.658453},
+ {2.088682, 3.073515, 1.826700},
+ {2.257802, 2.422447, 1.655714},
+ {2.257802, 3.065654, 1.655714},
+ {2.088682, 3.073515, 1.826700},
+ {2.088682, 2.413595, 1.826700},
+ {2.257802, 2.008433, 0.847223},
+ {2.257802, 2.157120, 0.720780},
+ {2.257802, 2.239156, 0.687033},
+ {2.257802, 2.145645, 0.838793},
+ {2.257802, 2.157120, 0.720780},
+ {2.257803, 2.280864, 0.574511},
+ {2.257803, 2.314844, 0.523449},
+ {2.257802, 2.239156, 0.687033},
+ {2.257802, 1.766246, 0.995794},
+ {2.257802, 2.005130, 1.076059},
+ {2.257802, 1.766246, 1.655714},
+ {2.257802, 1.923734, 1.655714},
+ {2.257802, 2.145645, 0.838793},
+ {2.257802, 2.239156, 0.687033},
+ {2.257803, 2.335274, 0.647494},
+ {2.257802, 2.306412, 0.828915},
+ {2.257802, 2.306412, 0.828915},
+ {2.257803, 2.335274, 0.647494},
+ {2.257803, 2.498934, 0.580169},
+ {2.257802, 2.580151, 0.812096},
+ {2.257802, 2.239156, 0.687033},
+ {2.257803, 2.314844, 0.523449},
+ {2.257803, 2.354657, 0.463622},
+ {2.257803, 2.335274, 0.647494},
+ {2.257803, 2.335274, 0.647494},
+ {2.257803, 2.354657, 0.463622},
+ {2.257802, 2.306412, 0.828915},
+ {2.257802, 2.285022, 1.170103},
+ {2.257802, 2.108258, 1.655714},
+ {2.088682, 2.074384, 1.826700},
+ {2.088682, 1.922547, 1.826700},
+ {2.257802, 1.923734, 1.655714},
+ {2.257802, 2.108258, 1.655714},
+ {2.257802, 1.766246, 1.655714},
+ {2.088682, 1.779554, 1.826700},
+ {2.088682, 2.413595, 1.826700},
+ {2.257802, 2.422447, 1.655714},
+ {2.085533, 1.562592, 1.655468},
+ {2.087480, 1.563139, 1.654897},
+ {2.257802, 1.766246, 1.655714},
+ {2.088682, 1.779554, 1.826700},
+ {2.080420, -1.522903, 1.828556},
+ {2.080420, -1.308914, 1.828556},
+ {1.754938, -1.218845, 1.828556},
+ {1.420500, -1.522903, 1.828556},
+ {1.236801, -1.037400, 1.828556},
+ {1.081288, -1.522903, 1.828556},
+ {0.786459, -0.879696, 1.828556},
+ {0.570043, -0.771039, 1.656753},
+ {0.570044, -1.521701, 1.656753},
+ {0.786459, -1.522904, 1.828556},
+ {2.080420, -0.223494, 1.828556},
+ {2.080174, -0.010374, 1.656753},
+ {1.310007, -0.010374, 1.656753},
+ {1.420499, -0.223494, 1.828556},
+ {0.786459, -0.879696, 1.828556},
+ {0.786459, -1.522904, 1.828556},
+ {0.929451, -1.522903, 1.828556},
+ {1.004875, -0.956182, 1.828556},
+ {2.257802, -0.444620, 1.082475},
+ {2.257802, -0.369196, 1.649196},
+ {2.257802, -0.521033, 1.649196},
+ {2.257802, -0.676546, 1.163693},
+ {2.257802, -0.226204, 1.005988},
+ {2.257802, -0.226204, 1.649196},
+ {2.257803, -1.520164, 0.349787},
+ {2.085533, -1.519919, 0.146133},
+ {2.085533, -0.749752, 0.146133},
+ {2.257803, -0.860244, 0.349787},
+ {2.257802, -0.226204, 1.005988},
+ {2.085999, -0.009788, 0.897332},
+ {2.085999, -0.009788, 1.647993},
+ {2.257802, -0.226204, 1.649196},
+ {2.257802, -0.860244, 1.649196},
+ {2.257802, -1.194683, 1.345137},
+ {2.257802, -1.520164, 1.649195},
+ {2.257802, -1.520164, 1.005988},
+ {2.080420, -0.223494, 1.828556},
+ {1.420499, -0.223494, 1.828556},
+ {1.607785, -0.780890, 1.828556},
+ {2.080420, -0.590967, 1.828556},
+ {1.271929, -0.465681, 1.828556},
+ {1.252257, -0.785844, 1.828556},
+ {1.145486, -0.614369, 1.828556},
+ {0.992151, -0.730262, 1.828556},
+ {0.880072, -0.817400, 1.828556},
+ {1.066744, -0.805785, 1.828556},
+ {1.684304, -1.008627, 1.828556},
+ {2.080420, -0.964299, 1.828556},
+ {1.244220, -0.916653, 1.828556},
+ {0.831393, -0.849794, 1.828556},
+ {1.034572, -0.883991, 1.828556},
+ {2.080420, -0.223494, 1.828556},
+ {2.257802, -0.226204, 1.649196},
+ {2.085999, -0.009788, 1.647993},
+ {2.080174, -0.010374, 1.656753},
+ {2.080420, -0.223494, 1.828556},
+ {2.080420, -0.590967, 1.828556},
+ {2.257802, -0.369196, 1.649196},
+ {2.257802, -0.226204, 1.649196},
+ {2.080420, -0.964299, 1.828556},
+ {2.257802, -0.521033, 1.649196},
+ {2.080420, -1.308914, 1.828556},
+ {2.257802, -0.860244, 1.649196},
+ {2.257802, -0.521033, 1.649196},
+ {2.080420, -0.964299, 1.828556},
+ {2.080420, -1.522903, 1.828556},
+ {2.257802, -1.520164, 1.649195},
+ {2.088682, -1.691150, 1.657057},
+ {1.445475, -1.691150, 1.657056},
+ {1.784624, -1.691150, 1.331574},
+ {2.088682, -1.691150, 0.997136},
+ {1.603179, -1.691150, 0.813438},
+ {2.088682, -1.691150, 0.657925},
+ {1.445475, -1.691151, 0.363095},
+ {1.336818, -1.519348, 0.146680},
+ {2.087480, -1.519348, 0.146680},
+ {2.088682, -1.691151, 0.363096},
+ {0.789273, -1.691150, 1.657056},
+ {0.570991, -1.519347, 1.656811},
+ {0.570991, -1.519347, 0.886644},
+ {0.789273, -1.691150, 0.997136},
+ {1.445475, -1.691151, 0.363095},
+ {2.088682, -1.691151, 0.363096},
+ {2.088682, -1.691150, 0.506088},
+ {1.521961, -1.691150, 0.581512},
+ {1.521961, -1.691150, 0.581512},
+ {2.088682, -1.691150, 0.506088},
+ {2.080420, -1.522903, 1.828556},
+ {2.088682, -1.691150, 1.657057},
+ {2.257802, -1.520164, 1.649195},
+ {0.786459, -1.522904, 1.828556},
+ {0.570991, -1.519347, 1.656811},
+ {0.570044, -1.521701, 1.656753},
+ {0.789273, -1.691150, 1.657056},
+ {0.789273, -1.691150, 1.657056},
+ {0.789273, -1.691150, 0.997136},
+ {1.097832, -1.691150, 1.100812},
+ {0.992696, -1.691150, 1.657056},
+ {1.031460, -1.691150, 0.848565},
+ {1.208693, -1.691150, 0.837676},
+ {1.180148, -1.691150, 0.722122},
+ {1.303892, -1.691150, 0.575853},
+ {1.347783, -1.691151, 0.509898},
+ {1.286110, -1.691150, 0.678533},
+ {1.180148, -1.691150, 0.722122},
+ {1.286110, -1.691150, 0.678533},
+ {0.786459, -1.522904, 1.828556},
+ {0.789273, -1.691150, 1.657056},
+ {0.992696, -1.691150, 1.657056},
+ {0.929451, -1.522903, 1.828556},
+ {1.427492, -1.691150, 1.211578},
+ {1.210030, -1.691150, 1.657056},
+ {1.398046, -1.691150, 0.826042},
+ {1.286110, -1.691150, 0.678533},
+ {1.347783, -1.691151, 0.509898},
+ {1.394675, -1.691151, 0.439433},
+ {1.399319, -1.691150, 0.631963},
+ {1.445475, -1.691151, 0.363095},
+ {1.521961, -1.691150, 0.581512},
+ {1.399319, -1.691150, 0.631963},
+ {1.081288, -1.522903, 1.828556},
+ {0.929451, -1.522903, 1.828556},
+ {0.992696, -1.691150, 1.657056},
+ {1.210030, -1.691150, 1.657056},
+ {1.420500, -1.522903, 1.828556},
+ {1.445475, -1.691150, 1.657056},
+ {2.080420, -1.522903, 1.828556},
+ {1.420500, -1.522903, 1.828556},
+ {1.445475, -1.691150, 1.657056},
+ {2.088682, -1.691150, 1.657057},
+ {2.257802, -1.520164, 1.005988},
+ {2.257802, -1.520164, 1.649195},
+ {2.088682, -1.691150, 1.657057},
+ {2.088682, -1.691150, 0.997136},
+ {2.257803, -0.711673, 0.591973},
+ {2.257802, -0.585230, 0.740661},
+ {2.257802, -0.551484, 0.822697},
+ {2.257802, -0.703243, 0.729186},
+ {2.257802, -0.585230, 0.740661},
+ {2.257802, -0.438962, 0.864406},
+ {2.257802, -0.387900, 0.898385},
+ {2.257802, -0.551484, 0.822697},
+ {2.257803, -0.860244, 0.349787},
+ {2.257803, -0.711673, 0.591973},
+ {2.257802, -0.703243, 0.729186},
+ {2.257803, -0.940509, 0.588671},
+ {2.257803, -1.520164, 0.349787},
+ {2.257803, -0.860244, 0.349787},
+ {2.257803, -0.940509, 0.588671},
+ {2.257803, -1.520164, 0.507275},
+ {2.257802, -0.703243, 0.729186},
+ {2.257802, -0.511944, 0.918815},
+ {2.257802, -0.693365, 0.889953},
+ {2.257802, -0.328072, 0.938199},
+ {2.257803, -0.940509, 0.588671},
+ {2.257802, -0.703243, 0.729186},
+ {2.257802, -0.693365, 0.889953},
+ {2.257802, -1.034554, 0.868563},
+ {2.257802, -1.034554, 0.868563},
+ {2.257803, -1.520164, 0.507275},
+ {2.257803, -0.940509, 0.588671},
+ {2.257802, -1.034554, 0.868563},
+ {2.257802, -1.520164, 0.691799},
+ {2.257802, -1.520164, 0.691799},
+ {2.088682, -1.691150, 0.657925},
+ {2.088682, -1.691150, 0.506088},
+ {2.257803, -1.520164, 0.507275},
+ {2.257802, -1.520164, 0.691799},
+ {2.257803, -1.520164, 0.349787},
+ {2.257803, -1.520164, 0.507275},
+ {2.088682, -1.691150, 0.506088},
+ {2.088682, -1.691151, 0.363096},
+ {2.088682, -1.691150, 0.997136},
+ {2.088682, -1.691150, 0.657925},
+ {2.257802, -1.520164, 0.691799},
+ {2.257802, -1.520164, 1.005988},
+ {2.085533, -1.519919, 0.146133},
+ {2.087480, -1.519348, 0.146680},
+ {2.257803, -1.520164, 0.349787},
+ {2.088682, -1.691151, 0.363096},
+ {0.181555, -1.698040, -2.936938},
+ {0.291884, -1.698040, -2.936938},
+ {0.291884, -1.698040, -2.521346},
+ {0.181555, -1.698040, -2.397875},
+ {-0.711104, -1.698040, -2.936938},
+ {-0.595058, -1.698040, -2.936938},
+ {-0.595058, -1.698040, -2.397876},
+ {-0.711103, -1.698040, -2.521346},
+ {-0.210634, -1.698040, -2.936938},
+ {-0.016501, -1.698040, -2.936938},
+ {-0.016501, -1.698040, -2.430085},
+ {-0.210634, -1.698040, -2.443506},
+ {-0.016501, -1.698040, -2.936938},
+ {0.181555, -1.698040, -2.936938},
+ {0.181555, -1.698040, -2.397875},
+ {-0.016501, -1.698040, -2.430085},
+ {-0.402846, -1.698040, -2.936938},
+ {-0.402846, -1.698040, -2.430085},
+ {-0.210634, -1.698040, -2.936938},
+ {-0.210634, -1.698040, -2.443506},
+ {-0.711104, -1.698040, -2.936938},
+ {-0.711103, -1.698040, -2.521346},
+ {-0.796917, -1.524720, -2.453307},
+ {-0.796917, -1.524720, -2.937116},
+ {0.291884, -1.698040, -2.521346},
+ {0.291884, -1.698040, -2.936938},
+ {0.377523, -1.524720, -2.937116},
+ {0.377524, -1.524720, -2.453308},
+ {0.181555, -1.698040, -2.397875},
+ {0.291884, -1.698040, -2.521346},
+ {0.377524, -1.524720, -2.453308},
+ {0.248335, -1.524719, -2.308732},
+ {-0.711103, -1.698040, -2.521346},
+ {-0.595058, -1.698040, -2.397876},
+ {-0.661034, -1.524719, -2.308732},
+ {-0.796917, -1.524720, -2.453307},
+ {-0.711104, -1.113188, -3.106547},
+ {-0.796917, -1.045150, -2.933227},
+ {-0.661034, -0.900574, -2.933227},
+ {-0.595058, -0.989718, -3.106547},
+ {0.181555, -0.989718, -3.106547},
+ {0.248335, -0.900574, -2.933227},
+ {0.377523, -1.045150, -2.933227},
+ {0.291884, -1.113188, -3.106547},
+ {0.291884, -1.113188, -3.106547},
+ {0.377523, -1.045150, -2.933227},
+ {0.377523, -1.528959, -2.933227},
+ {0.291884, -1.528781, -3.106547},
+ {-0.711104, -1.528781, -3.106547},
+ {-0.796917, -1.528959, -2.933227},
+ {-0.796917, -1.045150, -2.933227},
+ {-0.711104, -1.113188, -3.106547},
+ {-0.402846, -1.528781, -3.106547},
+ {-0.402846, -1.021928, -3.106547},
+ {-0.210635, -1.035349, -3.106547},
+ {-0.210634, -1.528781, -3.106547},
+ {-0.595058, -1.528781, -3.106547},
+ {-0.595058, -0.989718, -3.106547},
+ {-0.016501, -1.528781, -3.106547},
+ {-0.016501, -1.021928, -3.106547},
+ {0.181555, -0.989718, -3.106547},
+ {0.181555, -1.528781, -3.106547},
+ {-0.016501, -1.021928, -3.106547},
+ {-0.016501, -1.528781, -3.106547},
+ {-0.711104, -1.528781, -3.106547},
+ {-0.711104, -1.113188, -3.106547},
+ {0.181555, -1.528781, -3.106547},
+ {0.181555, -0.989718, -3.106547},
+ {0.291884, -1.113188, -3.106547},
+ {0.291884, -1.528781, -3.106547},
+ {-0.711104, -1.698040, -2.936938},
+ {-0.796917, -1.528959, -2.933227},
+ {-0.796917, -1.524720, -2.937116},
+ {-0.711104, -1.528781, -3.106547},
+ {-0.711104, -1.698040, -2.936938},
+ {-0.711104, -1.528781, -3.106547},
+ {-0.595058, -1.528781, -3.106547},
+ {-0.595058, -1.698040, -2.936938},
+ {-0.595058, -1.698040, -2.936938},
+ {-0.595058, -1.528781, -3.106547},
+ {-0.402846, -1.528781, -3.106547},
+ {-0.402846, -1.698040, -2.936938},
+ {-0.210634, -1.698040, -2.936938},
+ {-0.402846, -1.698040, -2.936938},
+ {-0.402846, -1.528781, -3.106547},
+ {-0.210634, -1.528781, -3.106547},
+ {-0.210634, -1.698040, -2.936938},
+ {-0.210634, -1.528781, -3.106547},
+ {-0.016501, -1.528781, -3.106547},
+ {-0.016501, -1.698040, -2.936938},
+ {0.181555, -1.698040, -2.936938},
+ {-0.016501, -1.698040, -2.936938},
+ {-0.016501, -1.528781, -3.106547},
+ {0.181555, -1.528781, -3.106547},
+ {0.291884, -1.698040, -2.936938},
+ {0.181555, -1.698040, -2.936938},
+ {0.181555, -1.528781, -3.106547},
+ {0.291884, -1.528781, -3.106547},
+ {0.291884, -1.698040, -2.936938},
+ {0.291884, -1.528781, -3.106547},
+ {0.377523, -1.524720, -2.937116},
+ {0.377523, -1.528959, -2.933227},
+ {-0.600949, 3.236759, -2.936938},
+ {-0.711278, 3.236759, -2.936938},
+ {-0.711278, 3.236759, -2.521346},
+ {-0.600949, 3.236759, -2.397876},
+ {0.291709, 3.236759, -2.936938},
+ {0.175664, 3.236759, -2.936938},
+ {0.175664, 3.236759, -2.397875},
+ {0.291709, 3.236759, -2.521346},
+ {-0.208760, 3.236759, -2.936938},
+ {-0.402893, 3.236759, -2.936938},
+ {-0.402894, 3.236759, -2.430085},
+ {-0.208760, 3.236759, -2.443506},
+ {-0.402893, 3.236759, -2.936938},
+ {-0.402894, 3.236759, -2.430085},
+ {-0.016548, 3.236759, -2.936938},
+ {-0.016548, 3.236759, -2.430085},
+ {-0.016548, 3.236759, -2.936938},
+ {-0.208760, 3.236759, -2.936938},
+ {-0.208760, 3.236759, -2.443506},
+ {-0.016548, 3.236759, -2.430085},
+ {0.291709, 3.236759, -2.936938},
+ {0.291709, 3.236759, -2.521346},
+ {0.377523, 3.063439, -2.453307},
+ {0.377523, 3.063439, -2.937116},
+ {-0.711278, 3.236759, -2.521346},
+ {-0.711278, 3.236759, -2.936938},
+ {-0.796918, 3.063439, -2.937116},
+ {-0.796918, 3.063439, -2.453307},
+ {-0.600949, 3.236759, -2.397876},
+ {-0.711278, 3.236759, -2.521346},
+ {-0.796918, 3.063439, -2.453307},
+ {-0.667729, 3.063439, -2.308731},
+ {0.291709, 3.236759, -2.521346},
+ {0.175664, 3.236759, -2.397875},
+ {0.241640, 3.063439, -2.308731},
+ {0.377523, 3.063439, -2.453307},
+ {0.291709, 2.651907, -3.106547},
+ {0.377522, 2.583869, -2.933227},
+ {0.241640, 2.439293, -2.933227},
+ {0.175664, 2.528437, -3.106547},
+ {-0.600949, 2.528438, -3.106547},
+ {-0.667729, 2.439293, -2.933227},
+ {-0.796918, 2.583870, -2.933227},
+ {-0.711278, 2.651908, -3.106547},
+ {-0.711278, 2.651908, -3.106547},
+ {-0.796918, 2.583870, -2.933227},
+ {-0.796918, 3.067678, -2.933227},
+ {-0.711278, 3.067500, -3.106547},
+ {0.291709, 3.067500, -3.106547},
+ {0.377523, 3.067678, -2.933227},
+ {0.377522, 2.583869, -2.933227},
+ {0.291709, 2.651907, -3.106547},
+ {-0.016548, 3.067500, -3.106547},
+ {-0.016548, 2.560647, -3.106547},
+ {-0.208760, 2.574068, -3.106547},
+ {-0.208760, 3.067500, -3.106547},
+ {0.175664, 3.067500, -3.106547},
+ {0.175664, 2.528437, -3.106547},
+ {-0.402893, 3.067500, -3.106547},
+ {-0.402894, 2.560647, -3.106547},
+ {-0.600949, 2.528438, -3.106547},
+ {-0.600949, 3.067500, -3.106547},
+ {0.291709, 3.067500, -3.106547},
+ {0.291709, 2.651907, -3.106547},
+ {0.175664, 2.528437, -3.106547},
+ {0.175664, 3.067500, -3.106547},
+ {-0.600949, 3.067500, -3.106547},
+ {-0.600949, 2.528438, -3.106547},
+ {-0.711278, 2.651908, -3.106547},
+ {-0.711278, 3.067500, -3.106547},
+ {0.291709, 3.236759, -2.936938},
+ {0.377523, 3.067678, -2.933227},
+ {0.377523, 3.063439, -2.937116},
+ {0.291709, 3.067500, -3.106547},
+ {0.291709, 3.236759, -2.936938},
+ {0.291709, 3.067500, -3.106547},
+ {0.175664, 3.067500, -3.106547},
+ {0.175664, 3.236759, -2.936938},
+ {0.175664, 3.236759, -2.936938},
+ {0.175664, 3.067500, -3.106547},
+ {-0.016548, 3.067500, -3.106547},
+ {-0.016548, 3.236759, -2.936938},
+ {-0.208760, 3.236759, -2.936938},
+ {-0.016548, 3.236759, -2.936938},
+ {-0.016548, 3.067500, -3.106547},
+ {-0.208760, 3.067500, -3.106547},
+ {-0.402893, 3.067500, -3.106547},
+ {-0.402893, 3.236759, -2.936938},
+ {-0.600949, 3.236759, -2.936938},
+ {-0.600949, 3.067500, -3.106547},
+ {-0.711278, 3.236759, -2.936938},
+ {-0.600949, 3.236759, -2.936938},
+ {-0.600949, 3.067500, -3.106547},
+ {-0.711278, 3.067500, -3.106547},
+ {-0.711278, 3.236759, -2.936938},
+ {-0.711278, 3.067500, -3.106547},
+ {-0.796918, 3.063439, -2.937116},
+ {-0.796918, 3.067678, -2.933227},
+ {2.257703, 1.160611, -2.936938},
+ {2.257703, 1.270940, -2.936938},
+ {2.257703, 1.270940, -2.521345},
+ {2.257703, 1.160611, -2.397875},
+ {2.257703, 0.267953, -2.936938},
+ {2.257703, 0.383998, -2.936938},
+ {2.257703, 0.383998, -2.397875},
+ {2.257703, 0.267953, -2.521345},
+ {2.257703, 0.768422, -2.936938},
+ {2.257703, 0.962555, -2.936938},
+ {2.257703, 0.962556, -2.430084},
+ {2.257703, 0.768422, -2.443505},
+ {2.257703, 0.576210, -2.936938},
+ {2.257703, 0.576210, -2.430084},
+ {2.257703, 0.267953, -2.936938},
+ {2.257703, 0.267953, -2.521345},
+ {2.084383, 0.182139, -2.453307},
+ {2.084383, 0.182139, -2.937115},
+ {2.257703, 1.270940, -2.521345},
+ {2.257703, 1.270940, -2.936938},
+ {2.084383, 1.356580, -2.937116},
+ {2.084383, 1.356580, -2.453307},
+ {2.257703, 1.160611, -2.397875},
+ {2.257703, 1.270940, -2.521345},
+ {2.084383, 1.356580, -2.453307},
+ {2.084383, 1.227391, -2.308731},
+ {2.257703, 0.267953, -2.521345},
+ {2.257703, 0.383998, -2.397875},
+ {2.084383, 0.318022, -2.308731},
+ {2.084383, 0.182139, -2.453307},
+ {1.672851, 0.267953, -3.106547},
+ {1.604813, 0.182139, -2.933226},
+ {1.460237, 0.318022, -2.933226},
+ {1.549381, 0.383998, -3.106547},
+ {1.549381, 1.160611, -3.106547},
+ {1.460237, 1.227391, -2.933226},
+ {1.604813, 1.356580, -2.933226},
+ {1.672851, 1.270940, -3.106547},
+ {1.672851, 1.270940, -3.106547},
+ {1.604813, 1.356580, -2.933226},
+ {2.088622, 1.356580, -2.933226},
+ {2.088444, 1.270940, -3.106547},
+ {2.088444, 0.267953, -3.106547},
+ {2.088622, 0.182139, -2.933226},
+ {1.604813, 0.182139, -2.933226},
+ {1.672851, 0.267953, -3.106547},
+ {2.088444, 0.576210, -3.106547},
+ {1.581591, 0.576210, -3.106547},
+ {1.595011, 0.768422, -3.106547},
+ {2.088444, 0.768422, -3.106547},
+ {2.088444, 0.383998, -3.106547},
+ {1.549381, 0.383998, -3.106547},
+ {2.088444, 0.962555, -3.106547},
+ {1.581591, 0.962556, -3.106547},
+ {1.549381, 1.160611, -3.106547},
+ {2.088444, 1.160611, -3.106547},
+ {2.088444, 0.267953, -3.106547},
+ {1.672851, 0.267953, -3.106547},
+ {1.672851, 1.270940, -3.106547},
+ {2.088444, 1.270940, -3.106547},
+ {2.257703, 0.267953, -2.936938},
+ {2.088622, 0.182139, -2.933226},
+ {2.084383, 0.182139, -2.937115},
+ {2.088444, 0.267953, -3.106547},
+ {2.257703, 0.267953, -2.936938},
+ {2.088444, 0.267953, -3.106547},
+ {2.088444, 0.383998, -3.106547},
+ {2.257703, 0.383998, -2.936938},
+ {2.088444, 0.576210, -3.106547},
+ {2.257703, 0.576210, -2.936938},
+ {2.257703, 0.768422, -2.936938},
+ {2.088444, 0.768422, -3.106547},
+ {2.088444, 0.962555, -3.106547},
+ {2.257703, 0.962555, -2.936938},
+ {2.257703, 1.160611, -2.936938},
+ {2.088444, 1.160611, -3.106547},
+ {2.257703, 1.270940, -2.936938},
+ {2.088444, 1.270940, -3.106547},
+ {2.257703, 1.270940, -2.936938},
+ {2.088444, 1.270940, -3.106547},
+ {2.084383, 1.356580, -2.937116},
+ {2.088622, 1.356580, -2.933226},
+ {-2.677096, 0.378108, -2.936939},
+ {-2.677096, 0.267779, -2.936939},
+ {-2.677096, 0.267779, -2.521346},
+ {-2.677096, 0.378107, -2.397876},
+ {-2.677096, 1.270766, -2.936939},
+ {-2.677096, 1.154721, -2.936939},
+ {-2.677097, 1.154721, -2.397876},
+ {-2.677097, 1.270766, -2.521346},
+ {-2.677096, 0.770297, -2.936939},
+ {-2.677096, 0.576163, -2.936939},
+ {-2.677096, 0.576163, -2.430085},
+ {-2.677096, 0.770297, -2.443506},
+ {-2.677096, 1.154721, -2.936939},
+ {-2.677096, 0.962509, -2.936939},
+ {-2.677096, 0.962509, -2.430085},
+ {-2.677097, 1.154721, -2.397876},
+ {-2.677096, 0.962509, -2.936939},
+ {-2.677096, 0.962509, -2.430085},
+ {-2.677096, 1.270766, -2.936939},
+ {-2.677097, 1.270766, -2.521346},
+ {-2.503776, 1.356580, -2.453308},
+ {-2.503776, 1.356579, -2.937116},
+ {-2.677096, 0.267779, -2.521346},
+ {-2.677096, 0.267779, -2.936939},
+ {-2.503776, 0.182139, -2.937117},
+ {-2.503776, 0.182139, -2.453308},
+ {-2.677096, 0.378107, -2.397876},
+ {-2.677096, 0.267779, -2.521346},
+ {-2.503776, 0.182139, -2.453308},
+ {-2.503776, 0.311328, -2.308732},
+ {-2.677097, 1.270766, -2.521346},
+ {-2.677097, 1.154721, -2.397876},
+ {-2.503776, 1.220697, -2.308732},
+ {-2.503776, 1.356580, -2.453308},
+ {-2.092245, 1.270766, -3.106547},
+ {-2.024207, 1.356579, -2.933227},
+ {-1.879631, 1.220697, -2.933227},
+ {-1.968775, 1.154721, -3.106547},
+ {-1.968775, 0.378108, -3.106547},
+ {-1.879630, 0.311328, -2.933227},
+ {-2.024207, 0.182139, -2.933227},
+ {-2.092245, 0.267779, -3.106547},
+ {-2.092245, 0.267779, -3.106547},
+ {-2.024207, 0.182139, -2.933227},
+ {-2.508015, 0.182139, -2.933227},
+ {-2.507837, 0.267779, -3.106547},
+ {-2.507837, 1.270766, -3.106547},
+ {-2.508015, 1.356579, -2.933227},
+ {-2.024207, 1.356579, -2.933227},
+ {-2.092245, 1.270766, -3.106547},
+ {-2.507838, 0.962509, -3.106547},
+ {-2.000984, 0.962509, -3.106547},
+ {-2.014405, 0.770297, -3.106547},
+ {-2.507838, 0.770297, -3.106547},
+ {-2.507837, 1.154721, -3.106547},
+ {-1.968775, 1.154721, -3.106547},
+ {-2.507837, 0.576163, -3.106547},
+ {-2.000984, 0.576163, -3.106547},
+ {-1.968775, 0.378108, -3.106547},
+ {-2.507837, 0.378108, -3.106547},
+ {-2.507837, 1.270766, -3.106547},
+ {-2.092245, 1.270766, -3.106547},
+ {-2.092245, 0.267779, -3.106547},
+ {-2.507837, 0.267779, -3.106547},
+ {-2.677096, 1.270766, -2.936939},
+ {-2.508015, 1.356579, -2.933227},
+ {-2.503776, 1.356579, -2.937116},
+ {-2.507837, 1.270766, -3.106547},
+ {-2.677096, 1.270766, -2.936939},
+ {-2.507837, 1.270766, -3.106547},
+ {-2.507837, 1.154721, -3.106547},
+ {-2.677096, 1.154721, -2.936939},
+ {-2.677096, 1.154721, -2.936939},
+ {-2.507837, 1.154721, -3.106547},
+ {-2.507838, 0.962509, -3.106547},
+ {-2.677096, 0.962509, -2.936939},
+ {-2.677096, 0.770297, -2.936939},
+ {-2.677096, 0.962509, -2.936939},
+ {-2.507838, 0.962509, -3.106547},
+ {-2.507838, 0.770297, -3.106547},
+ {-2.677096, 0.770297, -2.936939},
+ {-2.507838, 0.770297, -3.106547},
+ {-2.507837, 0.576163, -3.106547},
+ {-2.677096, 0.576163, -2.936939},
+ {-2.677096, 0.378108, -2.936939},
+ {-2.677096, 0.576163, -2.936939},
+ {-2.507837, 0.576163, -3.106547},
+ {-2.507837, 0.378108, -3.106547},
+ {-2.677096, 0.267779, -2.936939},
+ {-2.507837, 0.267779, -3.106547},
+ {-2.677096, 0.267779, -2.936939},
+ {-2.507837, 0.267779, -3.106547},
+ {-2.503776, 0.182139, -2.937117},
+ {-2.508015, 0.182139, -2.933227},
+ {-2.677096, -1.528612, -0.247716},
+ {-2.677096, -1.528612, -0.137387},
+ {-2.677096, -1.113020, -0.137387},
+ {-2.677096, -0.989550, -0.247715},
+ {-2.677096, -1.528612, -1.140374},
+ {-2.677096, -1.528612, -1.024329},
+ {-2.677096, -0.989550, -1.024329},
+ {-2.677096, -1.113020, -1.140374},
+ {-2.677096, -1.528612, -0.639905},
+ {-2.677096, -1.528612, -0.445771},
+ {-2.677096, -1.021759, -0.445771},
+ {-2.677096, -1.035179, -0.639905},
+ {-2.677096, -1.528612, -0.445771},
+ {-2.677096, -1.528612, -0.247716},
+ {-2.677096, -0.989550, -0.247715},
+ {-2.677096, -1.021759, -0.445771},
+ {-2.677096, -1.528612, -0.832117},
+ {-2.677096, -1.021759, -0.832117},
+ {-2.677096, -1.528612, -0.639905},
+ {-2.677096, -1.035179, -0.639905},
+ {-2.677096, -1.528612, -1.140374},
+ {-2.677096, -1.113020, -1.140374},
+ {-2.503776, -1.044981, -1.226187},
+ {-2.503776, -1.528790, -1.226187},
+ {-2.677096, -1.113020, -0.137387},
+ {-2.677096, -1.528612, -0.137387},
+ {-2.503776, -1.528790, -0.051747},
+ {-2.503776, -1.044981, -0.051747},
+ {-2.677096, -0.989550, -0.247715},
+ {-2.677096, -1.113020, -0.137387},
+ {-2.503776, -1.044981, -0.051747},
+ {-2.503776, -0.900405, -0.180935},
+ {-2.677096, -1.113020, -1.140374},
+ {-2.677096, -0.989550, -1.024329},
+ {-2.503776, -0.900405, -1.090305},
+ {-2.503776, -1.044981, -1.226187},
+ {-2.092244, -1.698221, -1.140374},
+ {-2.024207, -1.524901, -1.226187},
+ {-1.879630, -1.524901, -1.090304},
+ {-1.968774, -1.698221, -1.024328},
+ {-1.968775, -1.698221, -0.247715},
+ {-1.879630, -1.524901, -0.180935},
+ {-2.024207, -1.524901, -0.051747},
+ {-2.092245, -1.698221, -0.137387},
+ {-2.092245, -1.698221, -0.137387},
+ {-2.024207, -1.524901, -0.051747},
+ {-2.508015, -1.524901, -0.051747},
+ {-2.507837, -1.698221, -0.137387},
+ {-2.507837, -1.698221, -1.140374},
+ {-2.508015, -1.524901, -1.226187},
+ {-2.024207, -1.524901, -1.226187},
+ {-2.092244, -1.698221, -1.140374},
+ {-2.507837, -1.698221, -0.832117},
+ {-2.000984, -1.698221, -0.832116},
+ {-2.014405, -1.698221, -0.639905},
+ {-2.507837, -1.698221, -0.639905},
+ {-2.507837, -1.698221, -1.024328},
+ {-1.968774, -1.698221, -1.024328},
+ {-2.507837, -1.698221, -0.445771},
+ {-2.000984, -1.698221, -0.445771},
+ {-1.968775, -1.698221, -0.247715},
+ {-2.507837, -1.698221, -0.247716},
+ {-2.507837, -1.698221, -1.140374},
+ {-2.092244, -1.698221, -1.140374},
+ {-2.507837, -1.698221, -0.247716},
+ {-1.968775, -1.698221, -0.247715},
+ {-2.092245, -1.698221, -0.137387},
+ {-2.507837, -1.698221, -0.137387},
+ {-2.677096, -1.528612, -1.140374},
+ {-2.508015, -1.524901, -1.226187},
+ {-2.503776, -1.528790, -1.226187},
+ {-2.507837, -1.698221, -1.140374},
+ {-2.677096, -1.528612, -1.140374},
+ {-2.507837, -1.698221, -1.140374},
+ {-2.507837, -1.698221, -1.024328},
+ {-2.677096, -1.528612, -1.024329},
+ {-2.677096, -1.528612, -1.024329},
+ {-2.507837, -1.698221, -1.024328},
+ {-2.507837, -1.698221, -0.832117},
+ {-2.677096, -1.528612, -0.832117},
+ {-2.677096, -1.528612, -0.639905},
+ {-2.677096, -1.528612, -0.832117},
+ {-2.507837, -1.698221, -0.832117},
+ {-2.507837, -1.698221, -0.639905},
+ {-2.507837, -1.698221, -0.445771},
+ {-2.677096, -1.528612, -0.445771},
+ {-2.677096, -1.528612, -0.247716},
+ {-2.507837, -1.698221, -0.247716},
+ {-2.677096, -1.528612, -0.137387},
+ {-2.677096, -1.528612, -0.247716},
+ {-2.507837, -1.698221, -0.247716},
+ {-2.507837, -1.698221, -0.137387},
+ {-2.677096, -1.528612, -0.137387},
+ {-2.507837, -1.698221, -0.137387},
+ {-2.503776, -1.528790, -0.051747},
+ {-2.508015, -1.524901, -0.051747},
+ {-2.677096, 3.067332, -1.030219},
+ {-2.677096, 3.067332, -1.140547},
+ {-2.677096, 2.651739, -1.140548},
+ {-2.677096, 2.528269, -1.030219},
+ {-2.677096, 3.067331, -0.137560},
+ {-2.677096, 3.067331, -0.253606},
+ {-2.677096, 2.528269, -0.253606},
+ {-2.677096, 2.651739, -0.137560},
+ {-2.677096, 3.067331, -0.638029},
+ {-2.677096, 3.067331, -0.832163},
+ {-2.677096, 2.560478, -0.832163},
+ {-2.677096, 2.573899, -0.638029},
+ {-2.677096, 3.067331, -0.445818},
+ {-2.677096, 2.560478, -0.445818},
+ {-2.677096, 3.067331, -0.137560},
+ {-2.677096, 2.651739, -0.137560},
+ {-2.503776, 2.583701, -0.051747},
+ {-2.503776, 3.067509, -0.051747},
+ {-2.677096, 2.651739, -1.140548},
+ {-2.677096, 3.067332, -1.140547},
+ {-2.503776, 3.067510, -1.226187},
+ {-2.503776, 2.583701, -1.226187},
+ {-2.677096, 2.528269, -1.030219},
+ {-2.677096, 2.651739, -1.140548},
+ {-2.503776, 2.583701, -1.226187},
+ {-2.503776, 2.439125, -1.096999},
+ {-2.677096, 2.651739, -0.137560},
+ {-2.677096, 2.528269, -0.253606},
+ {-2.503776, 2.439125, -0.187630},
+ {-2.503776, 2.583701, -0.051747},
+ {-2.092245, 3.236941, -0.137560},
+ {-2.024207, 3.063620, -0.051747},
+ {-1.879630, 3.063620, -0.187629},
+ {-1.968775, 3.236941, -0.253606},
+ {-1.968774, 3.236940, -1.030218},
+ {-1.879630, 3.063620, -1.096998},
+ {-2.024207, 3.063620, -1.226187},
+ {-2.092244, 3.236940, -1.140547},
+ {-2.092244, 3.236940, -1.140547},
+ {-2.024207, 3.063620, -1.226187},
+ {-2.508015, 3.063620, -1.226187},
+ {-2.507837, 3.236940, -1.140547},
+ {-2.507837, 3.236940, -0.137560},
+ {-2.508015, 3.063620, -0.051747},
+ {-2.024207, 3.063620, -0.051747},
+ {-2.092245, 3.236941, -0.137560},
+ {-2.507837, 3.236940, -0.445818},
+ {-2.000984, 3.236941, -0.445817},
+ {-2.014405, 3.236940, -0.638029},
+ {-2.507837, 3.236940, -0.638029},
+ {-2.507837, 3.236940, -0.253606},
+ {-1.968775, 3.236941, -0.253606},
+ {-2.000984, 3.236941, -0.445817},
+ {-2.507837, 3.236940, -0.445818},
+ {-2.507837, 3.236940, -0.832163},
+ {-2.000984, 3.236940, -0.832163},
+ {-1.968774, 3.236940, -1.030218},
+ {-2.507837, 3.236940, -1.030218},
+ {-2.507837, 3.236940, -0.638029},
+ {-2.014405, 3.236940, -0.638029},
+ {-2.000984, 3.236940, -0.832163},
+ {-2.507837, 3.236940, -0.832163},
+ {-2.507837, 3.236940, -0.137560},
+ {-2.092245, 3.236941, -0.137560},
+ {-1.968775, 3.236941, -0.253606},
+ {-2.507837, 3.236940, -0.253606},
+ {-2.092244, 3.236940, -1.140547},
+ {-2.507837, 3.236940, -1.140547},
+ {-2.677096, 3.067331, -0.137560},
+ {-2.508015, 3.063620, -0.051747},
+ {-2.503776, 3.067509, -0.051747},
+ {-2.507837, 3.236940, -0.137560},
+ {-2.677096, 3.067331, -0.137560},
+ {-2.507837, 3.236940, -0.137560},
+ {-2.507837, 3.236940, -0.253606},
+ {-2.677096, 3.067331, -0.253606},
+ {-2.677096, 3.067331, -0.253606},
+ {-2.507837, 3.236940, -0.253606},
+ {-2.507837, 3.236940, -0.445818},
+ {-2.677096, 3.067331, -0.445818},
+ {-2.677096, 3.067331, -0.638029},
+ {-2.507837, 3.236940, -0.638029},
+ {-2.507837, 3.236940, -0.832163},
+ {-2.677096, 3.067331, -0.832163},
+ {-2.677096, 3.067332, -1.030219},
+ {-2.677096, 3.067331, -0.832163},
+ {-2.507837, 3.236940, -0.832163},
+ {-2.507837, 3.236940, -1.030218},
+ {-2.677096, 3.067332, -1.140547},
+ {-2.677096, 3.067332, -1.030219},
+ {-2.507837, 3.236940, -1.030218},
+ {-2.507837, 3.236940, -1.140547},
+ {-2.677096, 3.067332, -1.140547},
+ {-2.507837, 3.236940, -1.140547},
+ {-2.503776, 3.067510, -1.226187},
+ {-2.508015, 3.063620, -1.226187},
+ {2.257703, 3.067332, -0.247713},
+ {2.257703, 3.067332, -0.137385},
+ {2.257703, 2.651739, -0.137385},
+ {2.257703, 2.528269, -0.247713},
+ {2.257703, 3.067332, -1.140372},
+ {2.257703, 3.067332, -1.024326},
+ {2.257703, 2.528269, -1.024326},
+ {2.257703, 2.651739, -1.140372},
+ {2.257703, 3.067332, -0.639903},
+ {2.257703, 3.067332, -0.445769},
+ {2.257703, 2.560479, -0.445769},
+ {2.257703, 2.573900, -0.639903},
+ {2.257703, 3.067332, -1.024326},
+ {2.257703, 3.067332, -0.832115},
+ {2.257703, 2.560479, -0.832115},
+ {2.257703, 2.528269, -1.024326},
+ {2.257703, 3.067332, -0.639903},
+ {2.257703, 2.573900, -0.639903},
+ {2.257703, 3.067332, -1.140372},
+ {2.257703, 2.651739, -1.140372},
+ {2.084383, 2.583701, -1.226185},
+ {2.084383, 3.067510, -1.226185},
+ {2.257703, 2.651739, -0.137385},
+ {2.257703, 3.067332, -0.137385},
+ {2.084383, 3.067510, -0.051745},
+ {2.084383, 2.583702, -0.051745},
+ {2.257703, 2.528269, -0.247713},
+ {2.257703, 2.651739, -0.137385},
+ {2.084383, 2.583702, -0.051745},
+ {2.084383, 2.439126, -0.180933},
+ {2.257703, 2.651739, -1.140372},
+ {2.257703, 2.528269, -1.024326},
+ {2.084383, 2.439125, -1.090302},
+ {2.084383, 2.583701, -1.226185},
+ {1.672851, 3.236941, -1.140372},
+ {1.604814, 3.063621, -1.226185},
+ {1.460237, 3.063621, -1.090303},
+ {1.549381, 3.236941, -1.024326},
+ {1.549381, 3.236941, -0.247714},
+ {1.460237, 3.063621, -0.180934},
+ {1.604813, 3.063621, -0.051745},
+ {1.672851, 3.236941, -0.137385},
+ {1.672851, 3.236941, -0.137385},
+ {1.604813, 3.063621, -0.051745},
+ {2.088622, 3.063621, -0.051745},
+ {2.088444, 3.236941, -0.137385},
+ {2.088444, 3.236941, -1.140372},
+ {2.088622, 3.063621, -1.226185},
+ {1.604814, 3.063621, -1.226185},
+ {1.672851, 3.236941, -1.140372},
+ {2.088444, 3.236941, -0.832115},
+ {1.581591, 3.236941, -0.832115},
+ {1.595011, 3.236941, -0.639903},
+ {2.088444, 3.236941, -0.639903},
+ {2.088444, 3.236941, -1.024326},
+ {1.549381, 3.236941, -1.024326},
+ {2.088444, 3.236941, -0.445769},
+ {1.581591, 3.236941, -0.445769},
+ {1.549381, 3.236941, -0.247714},
+ {2.088444, 3.236941, -0.247713},
+ {2.088444, 3.236941, -0.639903},
+ {1.595011, 3.236941, -0.639903},
+ {1.581591, 3.236941, -0.445769},
+ {2.088444, 3.236941, -0.445769},
+ {2.088444, 3.236941, -1.140372},
+ {1.672851, 3.236941, -1.140372},
+ {1.672851, 3.236941, -0.137385},
+ {2.088444, 3.236941, -0.137385},
+ {2.257703, 3.067332, -1.140372},
+ {2.088622, 3.063621, -1.226185},
+ {2.084383, 3.067510, -1.226185},
+ {2.088444, 3.236941, -1.140372},
+ {2.257703, 3.067332, -1.140372},
+ {2.088444, 3.236941, -1.140372},
+ {2.088444, 3.236941, -1.024326},
+ {2.257703, 3.067332, -1.024326},
+ {2.257703, 3.067332, -1.024326},
+ {2.088444, 3.236941, -1.024326},
+ {2.088444, 3.236941, -0.832115},
+ {2.257703, 3.067332, -0.832115},
+ {2.257703, 3.067332, -0.639903},
+ {2.257703, 3.067332, -0.832115},
+ {2.088444, 3.236941, -0.832115},
+ {2.088444, 3.236941, -0.639903},
+ {2.257703, 3.067332, -0.639903},
+ {2.088444, 3.236941, -0.639903},
+ {2.088444, 3.236941, -0.445769},
+ {2.257703, 3.067332, -0.445769},
+ {2.257703, 3.067332, -0.247713},
+ {2.088444, 3.236941, -0.247713},
+ {2.257703, 3.067332, -0.137385},
+ {2.088444, 3.236941, -0.137385},
+ {2.257703, 3.067332, -0.137385},
+ {2.088444, 3.236941, -0.137385},
+ {2.084383, 3.067510, -0.051745},
+ {2.088622, 3.063621, -0.051745},
+ {2.257703, -1.528612, -1.030217},
+ {2.257703, -1.528612, -1.140545},
+ {2.257703, -1.113019, -1.140545},
+ {2.257703, -0.989549, -1.030217},
+ {2.257703, -1.528611, -0.137558},
+ {2.257703, -1.528611, -0.253604},
+ {2.257703, -0.989549, -0.253604},
+ {2.257703, -1.113019, -0.137558},
+ {2.257703, -1.528612, -0.638027},
+ {2.257703, -1.528612, -0.832161},
+ {2.257703, -1.021759, -0.832161},
+ {2.257703, -1.035179, -0.638027},
+ {2.257703, -1.528611, -0.253604},
+ {2.257703, -1.528611, -0.445815},
+ {2.257703, -1.021759, -0.445815},
+ {2.257703, -0.989549, -0.253604},
+ {2.257703, -1.528611, -0.445815},
+ {2.257703, -1.021759, -0.445815},
+ {2.257703, -1.528611, -0.137558},
+ {2.257703, -1.113019, -0.137558},
+ {2.084383, -1.044981, -0.051745},
+ {2.084383, -1.528790, -0.051745},
+ {2.257703, -1.113019, -1.140545},
+ {2.257703, -1.528612, -1.140545},
+ {2.084383, -1.528790, -1.226185},
+ {2.084383, -1.044981, -1.226185},
+ {2.257703, -0.989549, -1.030217},
+ {2.257703, -1.113019, -1.140545},
+ {2.084383, -1.044981, -1.226185},
+ {2.084383, -0.900405, -1.096997},
+ {2.257703, -1.113019, -0.137558},
+ {2.257703, -0.989549, -0.253604},
+ {2.084383, -0.900405, -0.187628},
+ {2.084383, -1.044981, -0.051745},
+ {1.672851, -1.698221, -0.137558},
+ {1.604814, -1.524901, -0.051745},
+ {1.460237, -1.524901, -0.187628},
+ {1.549381, -1.698221, -0.253604},
+ {1.549382, -1.698221, -1.030217},
+ {1.460237, -1.524901, -1.096997},
+ {1.604814, -1.524901, -1.226185},
+ {1.672851, -1.698221, -1.140545},
+ {1.672851, -1.698221, -1.140545},
+ {1.604814, -1.524901, -1.226185},
+ {2.088622, -1.524901, -1.226185},
+ {2.088444, -1.698221, -1.140545},
+ {2.088444, -1.698221, -0.137558},
+ {2.088622, -1.524901, -0.051745},
+ {1.604814, -1.524901, -0.051745},
+ {1.672851, -1.698221, -0.137558},
+ {2.088444, -1.698221, -0.445815},
+ {1.581591, -1.698221, -0.445816},
+ {1.595011, -1.698221, -0.638027},
+ {2.088444, -1.698221, -0.638027},
+ {2.088444, -1.698221, -0.253604},
+ {1.549381, -1.698221, -0.253604},
+ {1.581591, -1.698221, -0.445816},
+ {2.088444, -1.698221, -0.445815},
+ {2.088444, -1.698221, -0.832161},
+ {1.581591, -1.698221, -0.832161},
+ {1.549382, -1.698221, -1.030217},
+ {2.088444, -1.698221, -1.030217},
+ {1.581591, -1.698221, -0.832161},
+ {2.088444, -1.698221, -0.832161},
+ {2.088444, -1.698221, -0.137558},
+ {1.672851, -1.698221, -0.137558},
+ {1.549381, -1.698221, -0.253604},
+ {2.088444, -1.698221, -0.253604},
+ {1.672851, -1.698221, -1.140545},
+ {2.088444, -1.698221, -1.140545},
+ {2.257703, -1.528611, -0.137558},
+ {2.088622, -1.524901, -0.051745},
+ {2.084383, -1.528790, -0.051745},
+ {2.088444, -1.698221, -0.137558},
+ {2.257703, -1.528611, -0.137558},
+ {2.088444, -1.698221, -0.137558},
+ {2.088444, -1.698221, -0.253604},
+ {2.257703, -1.528611, -0.253604},
+ {2.257703, -1.528611, -0.253604},
+ {2.088444, -1.698221, -0.253604},
+ {2.088444, -1.698221, -0.445815},
+ {2.257703, -1.528611, -0.445815},
+ {2.257703, -1.528612, -0.638027},
+ {2.257703, -1.528611, -0.445815},
+ {2.088444, -1.698221, -0.445815},
+ {2.088444, -1.698221, -0.638027},
+ {2.257703, -1.528612, -0.638027},
+ {2.088444, -1.698221, -0.638027},
+ {2.088444, -1.698221, -0.832161},
+ {2.257703, -1.528612, -0.832161},
+ {2.257703, -1.528612, -1.030217},
+ {2.088444, -1.698221, -1.030217},
+ {2.257703, -1.528612, -1.140545},
+ {2.088444, -1.698221, -1.140545},
+ {2.257703, -1.528612, -1.140545},
+ {2.088444, -1.698221, -1.140545},
+ {2.084383, -1.528790, -1.226185},
+ {2.088622, -1.524901, -1.226185},
+ {-0.600949, -1.698040, 1.659006},
+ {-0.711277, -1.698040, 1.659006},
+ {-0.711277, -1.698040, 1.243413},
+ {-0.600949, -1.698040, 1.119943},
+ {0.291710, -1.698040, 1.659006},
+ {0.175664, -1.698040, 1.659006},
+ {0.175664, -1.698040, 1.119943},
+ {0.291710, -1.698040, 1.243413},
+ {-0.208759, -1.698040, 1.659006},
+ {-0.402893, -1.698040, 1.659006},
+ {-0.402893, -1.698040, 1.152153},
+ {-0.208759, -1.698040, 1.165573},
+ {-0.402893, -1.698040, 1.659006},
+ {-0.600949, -1.698040, 1.659006},
+ {-0.600949, -1.698040, 1.119943},
+ {-0.402893, -1.698040, 1.152153},
+ {0.175664, -1.698040, 1.659006},
+ {-0.016547, -1.698040, 1.659006},
+ {-0.016547, -1.698040, 1.152153},
+ {0.175664, -1.698040, 1.119943},
+ {-0.016547, -1.698040, 1.659006},
+ {-0.208759, -1.698040, 1.659006},
+ {-0.208759, -1.698040, 1.165573},
+ {-0.016547, -1.698040, 1.152153},
+ {0.291710, -1.698040, 1.659006},
+ {0.291710, -1.698040, 1.243413},
+ {0.377523, -1.524719, 1.175375},
+ {0.377523, -1.524719, 1.659184},
+ {-0.711277, -1.698040, 1.243413},
+ {-0.711277, -1.698040, 1.659006},
+ {-0.796917, -1.524719, 1.659184},
+ {-0.796917, -1.524719, 1.175375},
+ {-0.600949, -1.698040, 1.119943},
+ {-0.711277, -1.698040, 1.243413},
+ {-0.796917, -1.524719, 1.175375},
+ {-0.667729, -1.524719, 1.030799},
+ {0.291710, -1.698040, 1.243413},
+ {0.175664, -1.698040, 1.119943},
+ {0.241640, -1.524719, 1.030799},
+ {0.377523, -1.524719, 1.175375},
+ {0.291710, -1.113188, 1.828615},
+ {0.377523, -1.045150, 1.655294},
+ {0.241640, -0.900574, 1.655294},
+ {0.175664, -0.989718, 1.828615},
+ {-0.600949, -0.989718, 1.828615},
+ {-0.667729, -0.900574, 1.655294},
+ {-0.796917, -1.045150, 1.655294},
+ {-0.711277, -1.113188, 1.828615},
+ {-0.711277, -1.113188, 1.828615},
+ {-0.796917, -1.045150, 1.655294},
+ {-0.796917, -1.528959, 1.655294},
+ {-0.711277, -1.528781, 1.828615},
+ {0.291710, -1.528781, 1.828615},
+ {0.377523, -1.528959, 1.655294},
+ {0.377523, -1.045150, 1.655294},
+ {0.291710, -1.113188, 1.828615},
+ {-0.016547, -1.528781, 1.828615},
+ {-0.016548, -1.021927, 1.828615},
+ {-0.208759, -1.035348, 1.828615},
+ {-0.208759, -1.528781, 1.828615},
+ {0.175664, -1.528781, 1.828615},
+ {0.175664, -0.989718, 1.828615},
+ {-0.402893, -1.528781, 1.828615},
+ {-0.402893, -1.021927, 1.828615},
+ {-0.600949, -0.989718, 1.828615},
+ {-0.600949, -1.528781, 1.828615},
+ {0.291710, -1.528781, 1.828615},
+ {0.291710, -1.113188, 1.828615},
+ {-0.711277, -1.113188, 1.828615},
+ {-0.711277, -1.528781, 1.828615},
+ {0.291710, -1.698040, 1.659006},
+ {0.377523, -1.528959, 1.655294},
+ {0.377523, -1.524719, 1.659184},
+ {0.291710, -1.528781, 1.828615},
+ {0.291710, -1.698040, 1.659006},
+ {0.291710, -1.528781, 1.828615},
+ {0.175664, -1.528781, 1.828615},
+ {0.175664, -1.698040, 1.659006},
+ {0.175664, -1.698040, 1.659006},
+ {0.175664, -1.528781, 1.828615},
+ {-0.016547, -1.528781, 1.828615},
+ {-0.016547, -1.698040, 1.659006},
+ {-0.208759, -1.698040, 1.659006},
+ {-0.016547, -1.698040, 1.659006},
+ {-0.016547, -1.528781, 1.828615},
+ {-0.208759, -1.528781, 1.828615},
+ {-0.208759, -1.698040, 1.659006},
+ {-0.208759, -1.528781, 1.828615},
+ {-0.402893, -1.528781, 1.828615},
+ {-0.402893, -1.698040, 1.659006},
+ {-0.600949, -1.698040, 1.659006},
+ {-0.402893, -1.698040, 1.659006},
+ {-0.402893, -1.528781, 1.828615},
+ {-0.600949, -1.528781, 1.828615},
+ {-0.711277, -1.698040, 1.659006},
+ {-0.600949, -1.698040, 1.659006},
+ {-0.600949, -1.528781, 1.828615},
+ {-0.711277, -1.528781, 1.828615},
+ {-0.711277, -1.698040, 1.659006},
+ {-0.711277, -1.528781, 1.828615},
+ {-0.796917, -1.524719, 1.659184},
+ {-0.796917, -1.528959, 1.655294},
+ {0.181555, 3.236760, 1.659006},
+ {0.291883, 3.236760, 1.659006},
+ {0.291884, 3.236760, 1.243413},
+ {0.181555, 3.236760, 1.119943},
+ {-0.711104, 3.236759, 1.659006},
+ {-0.595058, 3.236759, 1.659006},
+ {-0.595058, 3.236759, 1.119943},
+ {-0.711104, 3.236759, 1.243413},
+ {-0.210635, 3.236760, 1.659006},
+ {-0.016501, 3.236760, 1.659006},
+ {-0.016501, 3.236760, 1.152152},
+ {-0.210635, 3.236759, 1.165573},
+ {-0.016501, 3.236760, 1.659006},
+ {-0.016501, 3.236760, 1.152152},
+ {-0.595058, 3.236759, 1.659006},
+ {-0.402846, 3.236760, 1.659006},
+ {-0.402846, 3.236759, 1.152152},
+ {-0.595058, 3.236759, 1.119943},
+ {-0.402846, 3.236760, 1.659006},
+ {-0.210635, 3.236760, 1.659006},
+ {-0.210635, 3.236759, 1.165573},
+ {-0.402846, 3.236759, 1.152152},
+ {-0.711104, 3.236759, 1.659006},
+ {-0.711104, 3.236759, 1.243413},
+ {-0.796917, 3.063439, 1.175375},
+ {-0.796917, 3.063439, 1.659183},
+ {0.291884, 3.236760, 1.243413},
+ {0.291883, 3.236760, 1.659006},
+ {0.377523, 3.063439, 1.659184},
+ {0.377524, 3.063439, 1.175375},
+ {0.181555, 3.236760, 1.119943},
+ {0.291884, 3.236760, 1.243413},
+ {0.377524, 3.063439, 1.175375},
+ {0.248335, 3.063439, 1.030799},
+ {-0.711104, 3.236759, 1.243413},
+ {-0.595058, 3.236759, 1.119943},
+ {-0.661034, 3.063439, 1.030799},
+ {-0.796917, 3.063439, 1.175375},
+ {-0.711103, 2.651908, 1.828615},
+ {-0.796917, 2.583870, 1.655294},
+ {-0.661034, 2.439294, 1.655294},
+ {-0.595058, 2.528438, 1.828615},
+ {0.181555, 2.528438, 1.828615},
+ {0.248335, 2.439294, 1.655294},
+ {0.377524, 2.583870, 1.655294},
+ {0.291884, 2.651908, 1.828614},
+ {0.291884, 2.651908, 1.828614},
+ {0.377524, 2.583870, 1.655294},
+ {0.377523, 3.067679, 1.655294},
+ {0.291883, 3.067501, 1.828615},
+ {-0.711104, 3.067500, 1.828615},
+ {-0.796917, 3.067678, 1.655294},
+ {-0.796917, 2.583870, 1.655294},
+ {-0.711103, 2.651908, 1.828615},
+ {-0.402846, 3.067501, 1.828615},
+ {-0.402846, 2.560647, 1.828615},
+ {-0.210634, 2.574068, 1.828615},
+ {-0.210635, 3.067501, 1.828615},
+ {-0.595058, 3.067500, 1.828615},
+ {-0.595058, 2.528438, 1.828615},
+ {-0.402846, 2.560647, 1.828615},
+ {-0.402846, 3.067501, 1.828615},
+ {-0.016501, 3.067501, 1.828615},
+ {-0.016501, 2.560647, 1.828615},
+ {0.181555, 2.528438, 1.828615},
+ {0.181555, 3.067501, 1.828615},
+ {-0.210635, 3.067501, 1.828615},
+ {-0.210634, 2.574068, 1.828615},
+ {-0.711104, 3.067500, 1.828615},
+ {-0.711103, 2.651908, 1.828615},
+ {-0.595058, 2.528438, 1.828615},
+ {-0.595058, 3.067500, 1.828615},
+ {0.181555, 3.067501, 1.828615},
+ {0.181555, 2.528438, 1.828615},
+ {0.291884, 2.651908, 1.828614},
+ {0.291883, 3.067501, 1.828615},
+ {-0.711104, 3.236759, 1.659006},
+ {-0.796917, 3.067678, 1.655294},
+ {-0.796917, 3.063439, 1.659183},
+ {-0.711104, 3.067500, 1.828615},
+ {-0.711104, 3.236759, 1.659006},
+ {-0.711104, 3.067500, 1.828615},
+ {-0.595058, 3.067500, 1.828615},
+ {-0.595058, 3.236759, 1.659006},
+ {-0.595058, 3.236759, 1.659006},
+ {-0.595058, 3.067500, 1.828615},
+ {-0.402846, 3.067501, 1.828615},
+ {-0.402846, 3.236760, 1.659006},
+ {-0.210635, 3.236760, 1.659006},
+ {-0.402846, 3.236760, 1.659006},
+ {-0.402846, 3.067501, 1.828615},
+ {-0.210635, 3.067501, 1.828615},
+ {-0.016501, 3.067501, 1.828615},
+ {-0.016501, 3.236760, 1.659006},
+ {0.181555, 3.236760, 1.659006},
+ {0.181555, 3.067501, 1.828615},
+ {0.291883, 3.236760, 1.659006},
+ {0.291883, 3.067501, 1.828615},
+ {0.291883, 3.236760, 1.659006},
+ {0.291883, 3.067501, 1.828615},
+ {0.377523, 3.063439, 1.659184},
+ {0.377523, 3.067679, 1.655294},
+ {-2.677097, 1.160612, 1.659006},
+ {-2.677097, 1.270940, 1.659006},
+ {-2.677097, 1.270940, 1.243413},
+ {-2.677097, 1.160612, 1.119943},
+ {-2.677097, 0.267953, 1.659006},
+ {-2.677097, 0.383998, 1.659006},
+ {-2.677097, 0.383998, 1.119943},
+ {-2.677097, 0.267953, 1.243413},
+ {-2.677097, 0.768422, 1.659006},
+ {-2.677097, 0.962556, 1.659006},
+ {-2.677097, 0.962556, 1.152152},
+ {-2.677097, 0.768422, 1.165573},
+ {-2.677097, 0.576210, 1.659006},
+ {-2.677097, 0.576210, 1.152152},
+ {-2.677097, 0.267953, 1.659006},
+ {-2.677097, 0.267953, 1.243413},
+ {-2.503777, 0.182140, 1.175375},
+ {-2.503777, 0.182140, 1.659184},
+ {-2.677097, 1.270940, 1.243413},
+ {-2.677097, 1.270940, 1.659006},
+ {-2.503777, 1.356580, 1.659184},
+ {-2.503777, 1.356580, 1.175375},
+ {-2.677097, 1.160612, 1.119943},
+ {-2.677097, 1.270940, 1.243413},
+ {-2.503777, 1.356580, 1.175375},
+ {-2.503777, 1.227392, 1.030799},
+ {-2.677097, 0.267953, 1.243413},
+ {-2.677097, 0.383998, 1.119943},
+ {-2.503777, 0.318022, 1.030799},
+ {-2.503777, 0.182140, 1.175375},
+ {-2.092245, 0.267953, 1.828615},
+ {-2.024207, 0.182140, 1.655294},
+ {-1.879631, 0.318023, 1.655294},
+ {-1.968775, 0.383999, 1.828615},
+ {-1.968775, 1.160612, 1.828615},
+ {-1.879631, 1.227392, 1.655294},
+ {-2.024208, 1.356580, 1.655294},
+ {-2.092245, 1.270940, 1.828615},
+ {-2.092245, 1.270940, 1.828615},
+ {-2.024208, 1.356580, 1.655294},
+ {-2.508016, 1.356580, 1.655294},
+ {-2.507838, 1.270940, 1.828615},
+ {-2.507838, 0.267953, 1.828615},
+ {-2.508015, 0.182140, 1.655294},
+ {-2.024207, 0.182140, 1.655294},
+ {-2.092245, 0.267953, 1.828615},
+ {-2.507838, 0.576210, 1.828615},
+ {-2.000985, 0.576210, 1.828615},
+ {-2.014405, 0.768422, 1.828615},
+ {-2.507838, 0.768422, 1.828615},
+ {-2.507838, 0.383998, 1.828615},
+ {-1.968775, 0.383999, 1.828615},
+ {-2.507838, 0.962556, 1.828615},
+ {-2.000985, 0.962556, 1.828615},
+ {-1.968775, 1.160612, 1.828615},
+ {-2.507838, 1.160611, 1.828615},
+ {-2.507838, 0.267953, 1.828615},
+ {-2.092245, 0.267953, 1.828615},
+ {-2.092245, 1.270940, 1.828615},
+ {-2.507838, 1.270940, 1.828615},
+ {-2.677097, 0.267953, 1.659006},
+ {-2.508015, 0.182140, 1.655294},
+ {-2.503777, 0.182140, 1.659184},
+ {-2.507838, 0.267953, 1.828615},
+ {-2.677097, 0.267953, 1.659006},
+ {-2.507838, 0.267953, 1.828615},
+ {-2.507838, 0.383998, 1.828615},
+ {-2.677097, 0.383998, 1.659006},
+ {-2.677097, 0.383998, 1.659006},
+ {-2.507838, 0.383998, 1.828615},
+ {-2.507838, 0.576210, 1.828615},
+ {-2.677097, 0.576210, 1.659006},
+ {-2.677097, 0.768422, 1.659006},
+ {-2.507838, 0.768422, 1.828615},
+ {-2.507838, 0.962556, 1.828615},
+ {-2.677097, 0.962556, 1.659006},
+ {-2.677097, 1.160612, 1.659006},
+ {-2.507838, 1.160611, 1.828615},
+ {-2.677097, 1.270940, 1.659006},
+ {-2.507838, 1.270940, 1.828615},
+ {-2.677097, 1.270940, 1.659006},
+ {-2.507838, 1.270940, 1.828615},
+ {-2.503777, 1.356580, 1.659184},
+ {-2.508016, 1.356580, 1.655294},
+ {2.257703, 0.378108, 1.659006},
+ {2.257703, 0.267779, 1.659006},
+ {2.257703, 0.267779, 1.243413},
+ {2.257703, 0.378108, 1.119943},
+ {2.257703, 1.270767, 1.659006},
+ {2.257703, 1.154721, 1.659006},
+ {2.257703, 1.154721, 1.119943},
+ {2.257703, 1.270767, 1.243413},
+ {2.257703, 0.770298, 1.659006},
+ {2.257703, 0.576164, 1.659006},
+ {2.257703, 0.576164, 1.152152},
+ {2.257703, 0.770298, 1.165573},
+ {2.257703, 0.962509, 1.659006},
+ {2.257703, 0.962509, 1.152152},
+ {2.257703, 1.270767, 1.659006},
+ {2.257703, 1.270767, 1.243413},
+ {2.084382, 1.356580, 1.175375},
+ {2.084382, 1.356580, 1.659184},
+ {2.257703, 0.267779, 1.243413},
+ {2.257703, 0.267779, 1.659006},
+ {2.084382, 0.182140, 1.659184},
+ {2.084383, 0.182140, 1.175375},
+ {2.257703, 0.378108, 1.119943},
+ {2.257703, 0.267779, 1.243413},
+ {2.084383, 0.182140, 1.175375},
+ {2.084383, 0.311328, 1.030799},
+ {2.257703, 1.270767, 1.243413},
+ {2.257703, 1.154721, 1.119943},
+ {2.084382, 1.220697, 1.030799},
+ {2.084382, 1.356580, 1.175375},
+ {1.672851, 1.270767, 1.828615},
+ {1.604813, 1.356580, 1.655294},
+ {1.460237, 1.220697, 1.655294},
+ {1.549381, 1.154721, 1.828615},
+ {1.549381, 0.378108, 1.828615},
+ {1.460237, 0.311328, 1.655294},
+ {1.604813, 0.182140, 1.655294},
+ {1.672851, 0.267779, 1.828615},
+ {1.672851, 0.267779, 1.828615},
+ {1.604813, 0.182140, 1.655294},
+ {2.088622, 0.182140, 1.655294},
+ {2.088443, 0.267780, 1.828615},
+ {2.088443, 1.270767, 1.828615},
+ {2.088621, 1.356580, 1.655294},
+ {1.604813, 1.356580, 1.655294},
+ {1.672851, 1.270767, 1.828615},
+ {2.088444, 0.962509, 1.828615},
+ {1.581591, 0.962509, 1.828615},
+ {1.595011, 0.770298, 1.828615},
+ {2.088444, 0.770298, 1.828615},
+ {2.088443, 1.154721, 1.828615},
+ {1.549381, 1.154721, 1.828615},
+ {2.088444, 0.576164, 1.828615},
+ {1.581590, 0.576164, 1.828615},
+ {1.549381, 0.378108, 1.828615},
+ {2.088443, 0.378108, 1.828615},
+ {2.088443, 1.270767, 1.828615},
+ {1.672851, 1.270767, 1.828615},
+ {1.549381, 1.154721, 1.828615},
+ {2.088443, 1.154721, 1.828615},
+ {1.672851, 0.267779, 1.828615},
+ {2.088443, 0.267780, 1.828615},
+ {2.257703, 1.270767, 1.659006},
+ {2.088621, 1.356580, 1.655294},
+ {2.084382, 1.356580, 1.659184},
+ {2.088443, 1.270767, 1.828615},
+ {2.257703, 1.270767, 1.659006},
+ {2.088443, 1.270767, 1.828615},
+ {2.088443, 1.154721, 1.828615},
+ {2.257703, 1.154721, 1.659006},
+ {2.257703, 1.154721, 1.659006},
+ {2.088443, 1.154721, 1.828615},
+ {2.088444, 0.962509, 1.828615},
+ {2.257703, 0.962509, 1.659006},
+ {2.257703, 0.770298, 1.659006},
+ {2.257703, 0.962509, 1.659006},
+ {2.088444, 0.962509, 1.828615},
+ {2.088444, 0.770298, 1.828615},
+ {2.088444, 0.576164, 1.828615},
+ {2.257703, 0.576164, 1.659006},
+ {2.257703, 0.378108, 1.659006},
+ {2.257703, 0.576164, 1.659006},
+ {2.088444, 0.576164, 1.828615},
+ {2.088443, 0.378108, 1.828615},
+ {2.257703, 0.267779, 1.659006},
+ {2.257703, 0.378108, 1.659006},
+ {2.088443, 0.378108, 1.828615},
+ {2.088443, 0.267780, 1.828615},
+ {2.257703, 0.267779, 1.659006},
+ {2.088443, 0.267780, 1.828615},
+ {2.084382, 0.182140, 1.659184},
+ {2.088622, 0.182140, 1.655294},
+ {2.086607, -1.521765, -2.935530},
+ {2.086607, -1.521765, 1.659402},
+ {-2.508325, -1.521765, 1.659402},
+ {-2.508324, -1.521765, -2.935531},
+ {2.086608, 3.073167, -2.935529},
+ {-2.508325, 3.073167, -2.935530},
+ {-2.508326, 3.073167, 1.659402},
+ {2.086605, 3.073167, 1.659404},
+ {2.086607, -1.521765, -2.935530},
+ {2.086608, 3.073167, -2.935529},
+ {2.086605, 3.073167, 1.659404},
+ {2.086607, -1.521765, 1.659402},
+ {2.086607, -1.521765, 1.659402},
+ {2.086605, 3.073167, 1.659404},
+ {-2.508326, 3.073167, 1.659402},
+ {-2.508325, -1.521765, 1.659402},
+ {-2.508325, -1.521765, 1.659402},
+ {-2.508326, 3.073167, 1.659402},
+ {-2.508325, 3.073167, -2.935530},
+ {-2.508324, -1.521765, -2.935531},
+ {2.086608, 3.073167, -2.935529},
+ {2.086607, -1.521765, -2.935530},
+ {-2.508324, -1.521765, -2.935531},
+ {-2.508325, 3.073167, -2.935530},
+ {-0.973861, 1.529520, -2.897064},
+ {-0.973862, 1.529519, -3.030729},
+ {-1.106700, 1.367654, -3.030729},
+ {-1.106699, 1.367656, -2.897064},
+ {-1.205408, 1.182984, -3.030729},
+ {-1.205407, 1.182986, -2.897064},
+ {-1.266192, 0.982606, -3.030729},
+ {-1.266191, 0.982608, -2.897064},
+ {-1.286715, 0.774220, -3.030729},
+ {-1.286716, 0.774222, -2.897064},
+ {-1.266191, 0.565834, -3.030729},
+ {-1.266191, 0.565836, -2.897064},
+ {-1.205406, 0.365456, -3.030729},
+ {-1.205407, 0.365458, -2.897064},
+ {-1.106698, 0.180787, -3.030729},
+ {-1.106699, 0.180788, -2.897064},
+ {-0.973860, 0.018923, -3.030729},
+ {-0.973861, 0.018924, -2.897064},
+ {-0.811996, -0.113915, -3.030729},
+ {-0.811996, -0.113915, -2.897064},
+ {-0.627327, -0.212623, -3.030729},
+ {-0.627327, -0.212623, -2.897064},
+ {-0.426949, -0.273407, -3.030729},
+ {-0.426948, -0.273407, -2.897064},
+ {-0.218563, -0.293931, -3.030729},
+ {-0.218562, -0.293931, -2.897065},
+ {-0.010177, -0.273407, -3.030729},
+ {-0.010176, -0.273407, -2.897065},
+ {0.190201, -0.212623, -3.030729},
+ {0.190203, -0.212622, -2.897065},
+ {0.374870, -0.113916, -3.030729},
+ {0.374872, -0.113914, -2.897065},
+ {0.536734, 0.018922, -3.030729},
+ {0.536736, 0.018924, -2.897065},
+ {0.669573, 0.180786, -3.030729},
+ {0.669575, 0.180789, -2.897065},
+ {0.768281, 0.365454, -3.030729},
+ {0.768283, 0.365459, -2.897065},
+ {0.829066, 0.565832, -3.030729},
+ {0.829066, 0.565837, -2.897065},
+ {0.849591, 0.774218, -3.030729},
+ {0.849590, 0.774223, -2.897065},
+ {0.829067, 0.982604, -3.030729},
+ {0.829066, 0.982610, -2.897065},
+ {0.768284, 1.182982, -3.030729},
+ {0.768282, 1.182988, -2.897065},
+ {0.669577, 1.367651, -3.030729},
+ {0.669573, 1.367657, -2.897065},
+ {0.536740, 1.529516, -3.030729},
+ {0.536735, 1.529521, -2.897064},
+ {0.374877, 1.662355, -3.030729},
+ {0.374870, 1.662360, -2.897064},
+ {0.190208, 1.761064, -3.030729},
+ {0.190200, 1.761067, -2.897064},
+ {-0.010169, 1.821849, -3.030729},
+ {-0.010178, 1.821851, -2.897064},
+ {-0.218555, 1.842375, -3.030729},
+ {-0.218564, 1.842375, -2.897064},
+ {-0.426941, 1.821852, -3.030729},
+ {-0.426951, 1.821850, -2.897064},
+ {-0.627319, 1.761070, -3.030729},
+ {-0.627329, 1.761066, -2.897064},
+ {-0.811989, 1.662364, -3.030729},
+ {-0.811998, 1.662358, -2.897064},
+ {-0.795541, 1.637747, -3.069480},
+ {-0.952927, 1.508584, -3.069480},
+ {-0.615989, 1.733717, -3.069480},
+ {-0.421165, 1.792815, -3.069480},
+ {-0.218555, 1.812769, -3.069480},
+ {-0.015945, 1.792812, -3.069480},
+ {0.178878, 1.733711, -3.069480},
+ {0.358428, 1.637738, -3.069480},
+ {0.515805, 1.508581, -3.069480},
+ {0.644961, 1.351203, -3.069480},
+ {0.740931, 1.171652, -3.069480},
+ {0.800030, 0.976828, -3.069480},
+ {0.819984, 0.774218, -3.069480},
+ {0.800028, 0.571608, -3.069480},
+ {0.740928, 0.376784, -3.069480},
+ {0.644956, 0.197234, -3.069480},
+ {0.515799, 0.039857, -3.069480},
+ {0.358421, -0.089299, -3.069480},
+ {0.178871, -0.185270, -3.069480},
+ {-0.015953, -0.244369, -3.069480},
+ {-0.218563, -0.264325, -3.069480},
+ {-0.421173, -0.244369, -3.069480},
+ {-0.615997, -0.185270, -3.069480},
+ {-0.795547, -0.089298, -3.069480},
+ {-0.952925, 0.039858, -3.069480},
+ {-1.082081, 0.197235, -3.069480},
+ {-1.178053, 0.376786, -3.069480},
+ {-1.237153, 0.571610, -3.069480},
+ {-1.257109, 0.774220, -3.069480},
+ {-1.237154, 0.976830, -3.069480},
+ {-1.178055, 1.171654, -3.069480},
+ {-1.082083, 1.351206, -3.069480},
+ {-1.082083, 1.351206, -3.069480},
+ {-0.952927, 1.508584, -3.069480},
+ {-0.831858, 1.387515, -3.102695},
+ {-0.939722, 1.256083, -3.102695},
+ {-1.178055, 1.171654, -3.069480},
+ {-1.019871, 1.106133, -3.102695},
+ {-1.237154, 0.976830, -3.069480},
+ {-1.069227, 0.943428, -3.102695},
+ {-1.257109, 0.774220, -3.069480},
+ {-1.085892, 0.774220, -3.102695},
+ {-1.237153, 0.571610, -3.069480},
+ {-1.069226, 0.605012, -3.102695},
+ {-1.178053, 0.376786, -3.069480},
+ {-1.019870, 0.442308, -3.102695},
+ {-1.082081, 0.197235, -3.069480},
+ {-0.939720, 0.292358, -3.102695},
+ {-0.952925, 0.039858, -3.069480},
+ {-0.831857, 0.160926, -3.102695},
+ {-0.795547, -0.089298, -3.069480},
+ {-0.700425, 0.053063, -3.102695},
+ {-0.615997, -0.185270, -3.069480},
+ {-0.550475, -0.027087, -3.102695},
+ {-0.421173, -0.244369, -3.069480},
+ {-0.387770, -0.076443, -3.102695},
+ {-0.218563, -0.264325, -3.069480},
+ {-0.218563, -0.093108, -3.102695},
+ {-0.015953, -0.244369, -3.069480},
+ {-0.049355, -0.076443, -3.102695},
+ {0.178871, -0.185270, -3.069480},
+ {0.113349, -0.027087, -3.102695},
+ {0.358421, -0.089299, -3.069480},
+ {0.263299, 0.053062, -3.102695},
+ {0.515799, 0.039857, -3.069480},
+ {0.394731, 0.160925, -3.102695},
+ {0.644956, 0.197234, -3.069480},
+ {0.502595, 0.292357, -3.102695},
+ {0.740928, 0.376784, -3.069480},
+ {0.582745, 0.442306, -3.102695},
+ {0.800028, 0.571608, -3.069480},
+ {0.632102, 0.605011, -3.102695},
+ {0.819984, 0.774218, -3.069480},
+ {0.648768, 0.774218, -3.102695},
+ {0.800030, 0.976828, -3.069480},
+ {0.632103, 0.943426, -3.102695},
+ {0.740931, 1.171652, -3.069480},
+ {0.582748, 1.106131, -3.102695},
+ {0.644961, 1.351203, -3.069480},
+ {0.502599, 1.256081, -3.102695},
+ {0.515805, 1.508581, -3.069480},
+ {0.394736, 1.387513, -3.102695},
+ {0.358428, 1.637738, -3.069480},
+ {0.263305, 1.495378, -3.102695},
+ {0.178878, 1.733711, -3.069480},
+ {0.113356, 1.575528, -3.102695},
+ {-0.015945, 1.792812, -3.069480},
+ {-0.049349, 1.624885, -3.102695},
+ {-0.218555, 1.812769, -3.069480},
+ {-0.218556, 1.641552, -3.102695},
+ {-0.421165, 1.792815, -3.069480},
+ {-0.387763, 1.624888, -3.102695},
+ {-0.615989, 1.733717, -3.069480},
+ {-0.550469, 1.575533, -3.102695},
+ {-0.795541, 1.637747, -3.069480},
+ {-0.700419, 1.495384, -3.102695},
+ {-0.218562, 0.774222, -3.102695},
+ {-0.973861, 0.019035, 1.627663},
+ {-0.973862, 0.019036, 1.761327},
+ {-1.106700, 0.180901, 1.761328},
+ {-1.106699, 0.180899, 1.627663},
+ {-1.205408, 0.365571, 1.761327},
+ {-1.205407, 0.365569, 1.627663},
+ {-1.266192, 0.565949, 1.761327},
+ {-1.266191, 0.565947, 1.627663},
+ {-1.286716, 0.774335, 1.761327},
+ {-1.286716, 0.774333, 1.627663},
+ {-1.266191, 0.982721, 1.761327},
+ {-1.266191, 0.982719, 1.627663},
+ {-1.205407, 1.183099, 1.761327},
+ {-1.205407, 1.183097, 1.627663},
+ {-1.106699, 1.367768, 1.761327},
+ {-1.106700, 1.367767, 1.627663},
+ {-0.973860, 1.529632, 1.761327},
+ {-0.973861, 1.529631, 1.627662},
+ {-0.811996, 1.662470, 1.761327},
+ {-0.811997, 1.662470, 1.627662},
+ {-0.627327, 1.761178, 1.761327},
+ {-0.627327, 1.761178, 1.627662},
+ {-0.426950, 1.821962, 1.761327},
+ {-0.426949, 1.821962, 1.627662},
+ {-0.218564, 1.842486, 1.761327},
+ {-0.218562, 1.842486, 1.627662},
+ {-0.010178, 1.821962, 1.761327},
+ {-0.010176, 1.821962, 1.627662},
+ {0.190200, 1.761179, 1.761327},
+ {0.190202, 1.761178, 1.627662},
+ {0.374869, 1.662471, 1.761327},
+ {0.374872, 1.662470, 1.627662},
+ {0.536734, 1.529633, 1.761327},
+ {0.536736, 1.529631, 1.627662},
+ {0.669572, 1.367770, 1.761327},
+ {0.669574, 1.367767, 1.627662},
+ {0.768281, 1.183101, 1.761327},
+ {0.768282, 1.183097, 1.627662},
+ {0.829065, 0.982723, 1.761327},
+ {0.829066, 0.982719, 1.627662},
+ {0.849590, 0.774338, 1.761327},
+ {0.849590, 0.774332, 1.627662},
+ {0.829067, 0.565952, 1.761327},
+ {0.829066, 0.565946, 1.627662},
+ {0.768284, 0.365574, 1.761327},
+ {0.768282, 0.365568, 1.627662},
+ {0.669577, 0.180904, 1.761327},
+ {0.669573, 0.180898, 1.627662},
+ {0.536740, 0.019039, 1.761327},
+ {0.536735, 0.019034, 1.627662},
+ {0.374877, -0.113800, 1.761327},
+ {0.374870, -0.113804, 1.627662},
+ {0.190208, -0.212509, 1.761327},
+ {0.190200, -0.212512, 1.627662},
+ {-0.010169, -0.273294, 1.761327},
+ {-0.010178, -0.273296, 1.627662},
+ {-0.218555, -0.293820, 1.761327},
+ {-0.218564, -0.293820, 1.627663},
+ {-0.426941, -0.273297, 1.761327},
+ {-0.426951, -0.273295, 1.627663},
+ {-0.627319, -0.212515, 1.761327},
+ {-0.627329, -0.212511, 1.627663},
+ {-0.811989, -0.113809, 1.761327},
+ {-0.811998, -0.113802, 1.627663},
+ {-0.795541, -0.089192, 1.800079},
+ {-0.952927, 0.039971, 1.800079},
+ {-0.615989, -0.185162, 1.800079},
+ {-0.421165, -0.244259, 1.800079},
+ {-0.218555, -0.264213, 1.800079},
+ {-0.015945, -0.244256, 1.800079},
+ {0.178878, -0.185156, 1.800079},
+ {0.358428, -0.089183, 1.800079},
+ {0.515805, 0.039974, 1.800078},
+ {0.644961, 0.197352, 1.800078},
+ {0.740931, 0.376904, 1.800078},
+ {0.800030, 0.571728, 1.800078},
+ {0.819984, 0.774338, 1.800078},
+ {0.800028, 0.976948, 1.800078},
+ {0.740928, 1.171771, 1.800078},
+ {0.644956, 1.351321, 1.800078},
+ {0.515799, 1.508698, 1.800078},
+ {0.358421, 1.637854, 1.800078},
+ {0.178870, 1.733826, 1.800078},
+ {-0.015954, 1.792925, 1.800078},
+ {-0.218564, 1.812880, 1.800078},
+ {-0.421174, 1.792924, 1.800078},
+ {-0.615997, 1.733825, 1.800078},
+ {-0.795548, 1.637853, 1.800078},
+ {-0.952925, 1.508697, 1.800078},
+ {-1.082082, 1.351320, 1.800078},
+ {-1.178054, 1.171769, 1.800078},
+ {-1.237153, 0.976945, 1.800078},
+ {-1.257109, 0.774335, 1.800078},
+ {-1.237154, 0.571725, 1.800079},
+ {-1.178055, 0.376901, 1.800079},
+ {-1.082083, 0.197349, 1.800079},
+ {-1.082083, 0.197349, 1.800079},
+ {-0.952927, 0.039971, 1.800079},
+ {-0.831858, 0.161040, 1.833294},
+ {-0.939722, 0.292472, 1.833294},
+ {-1.178055, 0.376901, 1.800079},
+ {-1.019871, 0.442422, 1.833294},
+ {-1.237154, 0.571725, 1.800079},
+ {-1.069227, 0.605127, 1.833294},
+ {-1.257109, 0.774335, 1.800078},
+ {-1.085892, 0.774335, 1.833294},
+ {-1.237153, 0.976945, 1.800078},
+ {-1.069227, 0.943543, 1.833294},
+ {-1.178054, 1.171769, 1.800078},
+ {-1.019870, 1.106247, 1.833294},
+ {-1.082082, 1.351320, 1.800078},
+ {-0.939720, 1.256197, 1.833294},
+ {-0.952925, 1.508697, 1.800078},
+ {-0.831857, 1.387629, 1.833294},
+ {-0.795548, 1.637853, 1.800078},
+ {-0.700425, 1.495492, 1.833294},
+ {-0.615997, 1.733825, 1.800078},
+ {-0.550475, 1.575642, 1.833294},
+ {-0.421174, 1.792924, 1.800078},
+ {-0.387771, 1.624998, 1.833294},
+ {-0.218564, 1.812880, 1.800078},
+ {-0.218563, 1.641664, 1.833294},
+ {-0.015954, 1.792925, 1.800078},
+ {-0.049356, 1.624998, 1.833294},
+ {0.178870, 1.733826, 1.800078},
+ {0.113349, 1.575643, 1.833294},
+ {0.358421, 1.637854, 1.800078},
+ {0.263299, 1.495493, 1.833294},
+ {0.515799, 1.508698, 1.800078},
+ {0.394731, 1.387630, 1.833294},
+ {0.644956, 1.351321, 1.800078},
+ {0.502595, 1.256198, 1.833294},
+ {0.740928, 1.171771, 1.800078},
+ {0.582745, 1.106249, 1.833294},
+ {0.800028, 0.976948, 1.800078},
+ {0.632102, 0.943544, 1.833294},
+ {0.819984, 0.774338, 1.800078},
+ {0.648768, 0.774337, 1.833294},
+ {0.800030, 0.571728, 1.800078},
+ {0.632103, 0.605130, 1.833294},
+ {0.740931, 0.376904, 1.800078},
+ {0.582748, 0.442425, 1.833294},
+ {0.644961, 0.197352, 1.800078},
+ {0.502599, 0.292475, 1.833294},
+ {0.515805, 0.039974, 1.800078},
+ {0.394736, 0.161042, 1.833294},
+ {0.358428, -0.089183, 1.800079},
+ {0.263305, 0.053178, 1.833294},
+ {0.178878, -0.185156, 1.800079},
+ {0.113356, -0.026973, 1.833294},
+ {-0.015945, -0.244256, 1.800079},
+ {-0.049349, -0.076330, 1.833294},
+ {-0.218555, -0.264213, 1.800079},
+ {-0.218556, -0.092997, 1.833294},
+ {-0.421165, -0.244259, 1.800079},
+ {-0.387763, -0.076333, 1.833294},
+ {-0.615989, -0.185162, 1.800079},
+ {-0.550468, -0.026978, 1.833294},
+ {-0.795541, -0.089192, 1.800079},
+ {-0.700419, 0.053171, 1.833294},
+ {-0.218562, 0.774334, 1.833294},
+ {-0.973861, -1.488086, -1.389944},
+ {-0.973862, -1.621751, -1.389942},
+ {-1.106700, -1.621751, -1.228078},
+ {-1.106699, -1.488086, -1.228079},
+ {-1.205408, -1.621751, -1.043408},
+ {-1.205407, -1.488086, -1.043410},
+ {-1.266192, -1.621751, -0.843029},
+ {-1.266191, -1.488086, -0.843032},
+ {-1.286715, -1.621751, -0.634643},
+ {-1.286716, -1.488086, -0.634646},
+ {-1.266191, -1.621751, -0.426257},
+ {-1.266191, -1.488086, -0.426259},
+ {-1.205407, -1.621751, -0.225880},
+ {-1.205407, -1.488086, -0.225881},
+ {-1.106699, -1.621751, -0.041210},
+ {-1.106699, -1.488086, -0.041211},
+ {-0.973860, -1.621751, 0.120653},
+ {-0.973861, -1.488086, 0.120653},
+ {-0.811996, -1.621751, 0.253491},
+ {-0.811997, -1.488086, 0.253491},
+ {-0.627327, -1.621750, 0.352199},
+ {-0.627327, -1.488086, 0.352199},
+ {-0.426949, -1.621750, 0.412983},
+ {-0.426949, -1.488086, 0.412983},
+ {-0.218563, -1.621750, 0.433508},
+ {-0.218562, -1.488086, 0.433507},
+ {-0.010178, -1.621750, 0.412983},
+ {-0.010176, -1.488086, 0.412983},
+ {0.190200, -1.621750, 0.352200},
+ {0.190202, -1.488086, 0.352199},
+ {0.374870, -1.621750, 0.253492},
+ {0.374872, -1.488086, 0.253491},
+ {0.536734, -1.621750, 0.120655},
+ {0.536736, -1.488086, 0.120652},
+ {0.669572, -1.621750, -0.041209},
+ {0.669575, -1.488086, -0.041212},
+ {0.768281, -1.621750, -0.225878},
+ {0.768282, -1.488086, -0.225882},
+ {0.829065, -1.621750, -0.426255},
+ {0.829066, -1.488086, -0.426260},
+ {0.849590, -1.621750, -0.634641},
+ {0.849590, -1.488086, -0.634647},
+ {0.829067, -1.621750, -0.843027},
+ {0.829066, -1.488086, -0.843033},
+ {0.768284, -1.621750, -1.043405},
+ {0.768282, -1.488086, -1.043411},
+ {0.669577, -1.621750, -1.228075},
+ {0.669573, -1.488086, -1.228081},
+ {0.536740, -1.621750, -1.389939},
+ {0.536735, -1.488086, -1.389945},
+ {0.374877, -1.621750, -1.522779},
+ {0.374870, -1.488086, -1.522783},
+ {0.190208, -1.621751, -1.621487},
+ {0.190200, -1.488086, -1.621491},
+ {-0.010169, -1.621751, -1.682273},
+ {-0.010178, -1.488086, -1.682274},
+ {-0.218555, -1.621751, -1.702798},
+ {-0.218564, -1.488086, -1.702798},
+ {-0.426941, -1.621751, -1.682276},
+ {-0.426951, -1.488086, -1.682274},
+ {-0.627319, -1.621751, -1.621493},
+ {-0.627329, -1.488086, -1.621489},
+ {-0.811989, -1.621751, -1.522787},
+ {-0.811998, -1.488086, -1.522781},
+ {-0.795541, -1.660502, -1.498170},
+ {-0.952927, -1.660502, -1.369007},
+ {-0.615989, -1.660502, -1.594140},
+ {-0.421165, -1.660502, -1.653238},
+ {-0.218555, -1.660502, -1.673192},
+ {-0.015945, -1.660502, -1.653235},
+ {0.178878, -1.660502, -1.594135},
+ {0.358428, -1.660502, -1.498162},
+ {0.515805, -1.660502, -1.369004},
+ {0.644960, -1.660502, -1.211626},
+ {0.740931, -1.660502, -1.032075},
+ {0.800030, -1.660502, -0.837251},
+ {0.819984, -1.660502, -0.634641},
+ {0.800028, -1.660502, -0.432031},
+ {0.740928, -1.660501, -0.237208},
+ {0.644956, -1.660501, -0.057657},
+ {0.515799, -1.660501, 0.099720},
+ {0.358421, -1.660502, 0.228876},
+ {0.178870, -1.660502, 0.324847},
+ {-0.015953, -1.660502, 0.383946},
+ {-0.218563, -1.660502, 0.403901},
+ {-0.421173, -1.660502, 0.383946},
+ {-0.615997, -1.660502, 0.324846},
+ {-0.795548, -1.660502, 0.228875},
+ {-0.952925, -1.660502, 0.099718},
+ {-1.082082, -1.660502, -0.057659},
+ {-1.178054, -1.660502, -0.237209},
+ {-1.237153, -1.660502, -0.432033},
+ {-1.257109, -1.660502, -0.634643},
+ {-1.237154, -1.660502, -0.837254},
+ {-1.178055, -1.660502, -1.032078},
+ {-1.082083, -1.660502, -1.211629},
+ {-1.082083, -1.660502, -1.211629},
+ {-0.952927, -1.660502, -1.369007},
+ {-0.831858, -1.693717, -1.247939},
+ {-0.939722, -1.693717, -1.116506},
+ {-1.178055, -1.660502, -1.032078},
+ {-1.019871, -1.693717, -0.966556},
+ {-1.237154, -1.660502, -0.837254},
+ {-1.069227, -1.693717, -0.803851},
+ {-1.257109, -1.660502, -0.634643},
+ {-1.085892, -1.693717, -0.634643},
+ {-1.237153, -1.660502, -0.432033},
+ {-1.069226, -1.693717, -0.465436},
+ {-1.178054, -1.660502, -0.237209},
+ {-1.019870, -1.693717, -0.302731},
+ {-1.082082, -1.660502, -0.057659},
+ {-0.939720, -1.693717, -0.152782},
+ {-0.952925, -1.660502, 0.099718},
+ {-0.831857, -1.693717, -0.021350},
+ {-0.795548, -1.660502, 0.228875},
+ {-0.700425, -1.693717, 0.086514},
+ {-0.615997, -1.660502, 0.324846},
+ {-0.550475, -1.693717, 0.166663},
+ {-0.421173, -1.660502, 0.383946},
+ {-0.387770, -1.693717, 0.216019},
+ {-0.218563, -1.660502, 0.403901},
+ {-0.218563, -1.693717, 0.232685},
+ {-0.015953, -1.660502, 0.383946},
+ {-0.049356, -1.693717, 0.216020},
+ {0.178870, -1.660502, 0.324847},
+ {0.113349, -1.693717, 0.166664},
+ {0.358421, -1.660502, 0.228876},
+ {0.263299, -1.693717, 0.086514},
+ {0.515799, -1.660501, 0.099720},
+ {0.394731, -1.693717, -0.021349},
+ {0.644956, -1.660501, -0.057657},
+ {0.502595, -1.693717, -0.152780},
+ {0.740928, -1.660501, -0.237208},
+ {0.582745, -1.693717, -0.302730},
+ {0.800028, -1.660502, -0.432031},
+ {0.632102, -1.693717, -0.465434},
+ {0.819984, -1.660502, -0.634641},
+ {0.648768, -1.693717, -0.634642},
+ {0.800030, -1.660502, -0.837251},
+ {0.632103, -1.693717, -0.803849},
+ {0.740931, -1.660502, -1.032075},
+ {0.582748, -1.693717, -0.966554},
+ {0.644960, -1.660502, -1.211626},
+ {0.502599, -1.693717, -1.116504},
+ {0.515805, -1.660502, -1.369004},
+ {0.394736, -1.693717, -1.247937},
+ {0.358428, -1.660502, -1.498162},
+ {0.263305, -1.693717, -1.355801},
+ {0.178878, -1.660502, -1.594135},
+ {0.113356, -1.693717, -1.435951},
+ {-0.015945, -1.660502, -1.653235},
+ {-0.049349, -1.693717, -1.485309},
+ {-0.218555, -1.660502, -1.673192},
+ {-0.218556, -1.693717, -1.501975},
+ {-0.421165, -1.660502, -1.653238},
+ {-0.387763, -1.693717, -1.485311},
+ {-0.615989, -1.660502, -1.594140},
+ {-0.550469, -1.693717, -1.435956},
+ {-0.795541, -1.660502, -1.498170},
+ {-0.700419, -1.693717, -1.355808},
+ {-0.218562, -1.693717, -0.634645},
+ {-0.973861, 3.036641, 0.120542},
+ {-0.973862, 3.170305, 0.120540},
+ {-1.106700, 3.170305, -0.041324},
+ {-1.106699, 3.036641, -0.041322},
+ {-1.205408, 3.170305, -0.225994},
+ {-1.205407, 3.036641, -0.225992},
+ {-1.266192, 3.170305, -0.426372},
+ {-1.266191, 3.036641, -0.426370},
+ {-1.286715, 3.170305, -0.634759},
+ {-1.286716, 3.036641, -0.634756},
+ {-1.266191, 3.170305, -0.843144},
+ {-1.266191, 3.036640, -0.843142},
+ {-1.205406, 3.170305, -1.043522},
+ {-1.205407, 3.036640, -1.043520},
+ {-1.106698, 3.170305, -1.228191},
+ {-1.106699, 3.036640, -1.228190},
+ {-0.973860, 3.170305, -1.390055},
+ {-0.973861, 3.036640, -1.390054},
+ {-0.811996, 3.170305, -1.522893},
+ {-0.811996, 3.036641, -1.522893},
+ {-0.627327, 3.170305, -1.621601},
+ {-0.627327, 3.036641, -1.621601},
+ {-0.426949, 3.170305, -1.682385},
+ {-0.426949, 3.036641, -1.682385},
+ {-0.218563, 3.170305, -1.702909},
+ {-0.218562, 3.036641, -1.702909},
+ {-0.010177, 3.170305, -1.682385},
+ {-0.010176, 3.036641, -1.682385},
+ {0.190200, 3.170305, -1.621602},
+ {0.190202, 3.036641, -1.621601},
+ {0.374870, 3.170305, -1.522894},
+ {0.374872, 3.036641, -1.522893},
+ {0.536734, 3.170305, -1.390056},
+ {0.536736, 3.036641, -1.390054},
+ {0.669573, 3.170305, -1.228193},
+ {0.669575, 3.036641, -1.228190},
+ {0.768281, 3.170306, -1.043524},
+ {0.768282, 3.036641, -1.043520},
+ {0.829066, 3.170306, -0.843146},
+ {0.829066, 3.036641, -0.843142},
+ {0.849591, 3.170306, -0.634761},
+ {0.849590, 3.036641, -0.634755},
+ {0.829067, 3.170306, -0.426375},
+ {0.829066, 3.036641, -0.426369},
+ {0.768284, 3.170306, -0.225997},
+ {0.768282, 3.036641, -0.225991},
+ {0.669577, 3.170306, -0.041327},
+ {0.669574, 3.036641, -0.041321},
+ {0.536740, 3.170306, 0.120538},
+ {0.536735, 3.036641, 0.120543},
+ {0.374877, 3.170306, 0.253377},
+ {0.374870, 3.036641, 0.253381},
+ {0.190208, 3.170306, 0.352086},
+ {0.190201, 3.036641, 0.352089},
+ {-0.010169, 3.170306, 0.412871},
+ {-0.010178, 3.036641, 0.412873},
+ {-0.218555, 3.170306, 0.433397},
+ {-0.218564, 3.036641, 0.433397},
+ {-0.426941, 3.170305, 0.412874},
+ {-0.426951, 3.036641, 0.412872},
+ {-0.627319, 3.170305, 0.352092},
+ {-0.627329, 3.036641, 0.352088},
+ {-0.811989, 3.170305, 0.253385},
+ {-0.811998, 3.036641, 0.253379},
+ {-0.795540, 3.209057, 0.228768},
+ {-0.952927, 3.209057, 0.099606},
+ {-0.615989, 3.209057, 0.324739},
+ {-0.421165, 3.209057, 0.383836},
+ {-0.218555, 3.209057, 0.403790},
+ {-0.015945, 3.209057, 0.383833},
+ {0.178878, 3.209057, 0.324733},
+ {0.358428, 3.209057, 0.228760},
+ {0.515805, 3.209057, 0.099603},
+ {0.644961, 3.209057, -0.057775},
+ {0.740931, 3.209057, -0.237327},
+ {0.800030, 3.209057, -0.432151},
+ {0.819984, 3.209057, -0.634761},
+ {0.800028, 3.209057, -0.837370},
+ {0.740928, 3.209057, -1.032194},
+ {0.644956, 3.209057, -1.211744},
+ {0.515799, 3.209057, -1.369121},
+ {0.358421, 3.209057, -1.498277},
+ {0.178870, 3.209057, -1.594249},
+ {-0.015953, 3.209057, -1.653348},
+ {-0.218563, 3.209057, -1.673303},
+ {-0.421173, 3.209057, -1.653347},
+ {-0.615997, 3.209057, -1.594248},
+ {-0.795548, 3.209057, -1.498276},
+ {-0.952925, 3.209057, -1.369120},
+ {-1.082082, 3.209057, -1.211743},
+ {-1.178054, 3.209057, -1.032192},
+ {-1.237153, 3.209057, -0.837369},
+ {-1.257109, 3.209057, -0.634759},
+ {-1.237154, 3.209057, -0.432148},
+ {-1.178055, 3.209057, -0.237324},
+ {-1.082083, 3.209057, -0.057772},
+ {-1.082083, 3.209057, -0.057772},
+ {-0.952927, 3.209057, 0.099606},
+ {-0.831858, 3.242272, -0.021463},
+ {-0.939722, 3.242272, -0.152895},
+ {-1.178055, 3.209057, -0.237324},
+ {-1.019871, 3.242272, -0.302845},
+ {-1.237154, 3.209057, -0.432148},
+ {-1.069227, 3.242272, -0.465551},
+ {-1.257109, 3.209057, -0.634759},
+ {-1.085892, 3.242272, -0.634758},
+ {-1.237153, 3.209057, -0.837369},
+ {-1.069226, 3.242272, -0.803966},
+ {-1.178054, 3.209057, -1.032192},
+ {-1.019870, 3.242272, -0.966671},
+ {-1.082082, 3.209057, -1.211743},
+ {-0.939720, 3.242272, -1.116620},
+ {-0.952925, 3.209057, -1.369120},
+ {-0.831857, 3.242272, -1.248052},
+ {-0.795548, 3.209057, -1.498276},
+ {-0.700425, 3.242272, -1.355915},
+ {-0.615997, 3.209057, -1.594248},
+ {-0.550475, 3.242272, -1.436065},
+ {-0.421173, 3.209057, -1.653347},
+ {-0.387770, 3.242272, -1.485421},
+ {-0.218563, 3.209057, -1.673303},
+ {-0.218563, 3.242272, -1.502087},
+ {-0.015953, 3.209057, -1.653348},
+ {-0.049356, 3.242272, -1.485421},
+ {0.178870, 3.209057, -1.594249},
+ {0.113349, 3.242272, -1.436066},
+ {0.358421, 3.209057, -1.498277},
+ {0.263299, 3.242272, -1.355916},
+ {0.515799, 3.209057, -1.369121},
+ {0.394731, 3.242272, -1.248053},
+ {0.644956, 3.209057, -1.211744},
+ {0.502595, 3.242272, -1.116621},
+ {0.740928, 3.209057, -1.032194},
+ {0.582745, 3.242272, -0.966672},
+ {0.800028, 3.209057, -0.837370},
+ {0.632102, 3.242272, -0.803967},
+ {0.819984, 3.209057, -0.634761},
+ {0.648768, 3.242272, -0.634760},
+ {0.800030, 3.209057, -0.432151},
+ {0.632103, 3.242272, -0.465553},
+ {0.740931, 3.209057, -0.237327},
+ {0.582748, 3.242272, -0.302848},
+ {0.644961, 3.209057, -0.057775},
+ {0.502599, 3.242272, -0.152898},
+ {0.515805, 3.209057, 0.099603},
+ {0.394736, 3.242272, -0.021465},
+ {0.358428, 3.209057, 0.228760},
+ {0.263305, 3.242272, 0.086399},
+ {0.178878, 3.209057, 0.324733},
+ {0.113356, 3.242272, 0.166550},
+ {-0.015945, 3.209057, 0.383833},
+ {-0.049349, 3.242272, 0.215907},
+ {-0.218555, 3.209057, 0.403790},
+ {-0.218556, 3.242272, 0.232573},
+ {-0.421165, 3.209057, 0.383836},
+ {-0.387763, 3.242272, 0.215909},
+ {-0.615989, 3.209057, 0.324739},
+ {-0.550468, 3.242272, 0.166555},
+ {-0.795540, 3.209057, 0.228768},
+ {-0.700419, 3.242272, 0.086406},
+ {-0.218562, 3.242272, -0.634757},
+ {-2.473807, 0.011860, 0.120542},
+ {-2.607471, 0.011859, 0.120541},
+ {-2.607471, -0.120980, -0.041324},
+ {-2.473807, -0.120978, -0.041322},
+ {-2.607471, -0.219687, -0.225994},
+ {-2.473807, -0.219686, -0.225992},
+ {-2.607471, -0.280471, -0.426372},
+ {-2.473807, -0.280470, -0.426370},
+ {-2.607471, -0.300995, -0.634758},
+ {-2.473807, -0.300995, -0.634756},
+ {-2.607471, -0.280470, -0.843144},
+ {-2.473807, -0.280470, -0.843142},
+ {-2.607471, -0.219686, -1.043522},
+ {-2.473807, -0.219686, -1.043520},
+ {-2.607471, -0.120978, -1.228191},
+ {-2.473807, -0.120978, -1.228190},
+ {-2.607471, 0.011861, -1.390055},
+ {-2.473807, 0.011860, -1.390054},
+ {-2.607471, 0.173725, -1.522893},
+ {-2.473807, 0.173724, -1.522893},
+ {-2.607471, 0.358394, -1.621601},
+ {-2.473807, 0.358394, -1.621601},
+ {-2.607471, 0.558772, -1.682385},
+ {-2.473807, 0.558772, -1.682385},
+ {-2.607471, 0.767158, -1.702909},
+ {-2.473807, 0.767159, -1.702909},
+ {-2.607471, 0.975543, -1.682385},
+ {-2.473807, 0.975545, -1.682385},
+ {-2.607471, 1.175921, -1.621601},
+ {-2.473807, 1.175923, -1.621600},
+ {-2.607471, 1.360591, -1.522894},
+ {-2.473807, 1.360593, -1.522892},
+ {-2.607471, 1.522455, -1.390056},
+ {-2.473807, 1.522457, -1.390054},
+ {-2.607471, 1.655293, -1.228193},
+ {-2.473807, 1.655296, -1.228189},
+ {-2.607471, 1.754002, -1.043524},
+ {-2.473807, 1.754004, -1.043520},
+ {-2.607471, 1.814786, -0.843146},
+ {-2.473807, 1.814787, -0.843141},
+ {-2.607471, 1.835312, -0.634760},
+ {-2.473807, 1.835311, -0.634755},
+ {-2.607471, 1.814788, -0.426374},
+ {-2.473807, 1.814787, -0.426369},
+ {-2.607471, 1.754005, -0.225996},
+ {-2.473807, 1.754003, -0.225991},
+ {-2.607471, 1.655298, -0.041327},
+ {-2.473807, 1.655294, -0.041321},
+ {-2.607471, 1.522461, 0.120538},
+ {-2.473807, 1.522456, 0.120543},
+ {-2.607471, 1.360598, 0.253377},
+ {-2.473807, 1.360591, 0.253381},
+ {-2.607471, 1.175929, 0.352086},
+ {-2.473807, 1.175921, 0.352089},
+ {-2.607471, 0.975552, 0.412871},
+ {-2.473807, 0.975543, 0.412873},
+ {-2.607471, 0.767166, 0.433397},
+ {-2.473807, 0.767157, 0.433397},
+ {-2.607471, 0.558780, 0.412874},
+ {-2.473807, 0.558770, 0.412872},
+ {-2.607471, 0.358402, 0.352092},
+ {-2.473807, 0.358392, 0.352088},
+ {-2.607471, 0.173732, 0.253386},
+ {-2.473807, 0.173723, 0.253380},
+ {-2.646223, 0.190181, 0.228769},
+ {-2.646223, 0.032794, 0.099606},
+ {-2.646223, 0.369732, 0.324739},
+ {-2.646223, 0.564556, 0.383837},
+ {-2.646223, 0.767166, 0.403790},
+ {-2.646223, 0.969776, 0.383834},
+ {-2.646223, 1.164599, 0.324733},
+ {-2.646223, 1.344149, 0.228760},
+ {-2.646223, 1.501526, 0.099603},
+ {-2.646223, 1.630682, -0.057775},
+ {-2.646223, 1.726652, -0.237326},
+ {-2.646223, 1.785751, -0.432150},
+ {-2.646223, 1.805705, -0.634760},
+ {-2.646223, 1.785749, -0.837370},
+ {-2.646223, 1.726649, -1.032194},
+ {-2.646223, 1.630677, -1.211744},
+ {-2.646223, 1.501520, -1.369121},
+ {-2.646223, 1.344142, -1.498277},
+ {-2.646223, 1.164592, -1.594249},
+ {-2.646223, 0.969768, -1.653347},
+ {-2.646223, 0.767158, -1.673303},
+ {-2.646223, 0.564548, -1.653347},
+ {-2.646223, 0.369724, -1.594248},
+ {-2.646223, 0.190173, -1.498276},
+ {-2.646223, 0.032796, -1.369120},
+ {-2.646223, -0.096360, -1.211743},
+ {-2.646223, -0.192333, -1.032192},
+ {-2.646223, -0.251432, -0.837368},
+ {-2.646223, -0.271388, -0.634758},
+ {-2.646223, -0.251433, -0.432148},
+ {-2.646223, -0.192334, -0.237324},
+ {-2.646223, -0.096362, -0.057772},
+ {-2.646223, -0.096362, -0.057772},
+ {-2.646223, 0.032794, 0.099606},
+ {-2.679438, 0.153863, -0.021463},
+ {-2.679438, 0.045999, -0.152895},
+ {-2.646223, -0.192334, -0.237324},
+ {-2.679438, -0.034150, -0.302845},
+ {-2.646223, -0.251433, -0.432148},
+ {-2.679438, -0.083506, -0.465550},
+ {-2.646223, -0.271388, -0.634758},
+ {-2.679438, -0.100171, -0.634758},
+ {-2.646223, -0.251432, -0.837368},
+ {-2.679438, -0.083505, -0.803966},
+ {-2.646223, -0.192333, -1.032192},
+ {-2.679438, -0.034149, -0.966670},
+ {-2.646223, -0.096360, -1.211743},
+ {-2.679438, 0.046001, -1.116620},
+ {-2.646223, 0.032796, -1.369120},
+ {-2.679438, 0.153864, -1.248052},
+ {-2.646223, 0.190173, -1.498276},
+ {-2.679438, 0.285296, -1.355915},
+ {-2.646223, 0.369724, -1.594248},
+ {-2.679438, 0.435246, -1.436065},
+ {-2.646223, 0.564548, -1.653347},
+ {-2.679438, 0.597951, -1.485421},
+ {-2.646223, 0.767158, -1.673303},
+ {-2.679438, 0.767158, -1.502086},
+ {-2.646223, 0.969768, -1.653347},
+ {-2.679438, 0.936365, -1.485421},
+ {-2.646223, 1.164592, -1.594249},
+ {-2.679438, 1.099070, -1.436065},
+ {-2.646223, 1.344142, -1.498277},
+ {-2.679438, 1.249020, -1.355916},
+ {-2.646223, 1.501520, -1.369121},
+ {-2.679438, 1.380452, -1.248053},
+ {-2.646223, 1.630677, -1.211744},
+ {-2.679438, 1.488316, -1.116621},
+ {-2.646223, 1.726649, -1.032194},
+ {-2.679438, 1.568466, -0.966672},
+ {-2.646223, 1.785749, -0.837370},
+ {-2.679438, 1.617823, -0.803967},
+ {-2.646223, 1.805705, -0.634760},
+ {-2.679438, 1.634489, -0.634760},
+ {-2.646223, 1.785751, -0.432150},
+ {-2.679438, 1.617824, -0.465552},
+ {-2.646223, 1.726652, -0.237326},
+ {-2.679438, 1.568469, -0.302847},
+ {-2.646223, 1.630682, -0.057775},
+ {-2.679438, 1.488320, -0.152897},
+ {-2.646223, 1.501526, 0.099603},
+ {-2.679438, 1.380457, -0.021465},
+ {-2.646223, 1.344149, 0.228760},
+ {-2.679438, 1.249026, 0.086399},
+ {-2.646223, 1.164599, 0.324733},
+ {-2.679438, 1.099077, 0.166550},
+ {-2.646223, 0.969776, 0.383834},
+ {-2.679438, 0.936372, 0.215907},
+ {-2.646223, 0.767166, 0.403790},
+ {-2.679438, 0.767165, 0.232574},
+ {-2.646223, 0.564556, 0.383837},
+ {-2.679438, 0.597958, 0.215910},
+ {-2.646223, 0.369732, 0.324739},
+ {-2.679438, 0.435252, 0.166555},
+ {-2.646223, 0.190181, 0.228769},
+ {-2.679438, 0.285302, 0.086406},
+ {-2.679438, 0.767159, -0.634756},
+ {2.050920, 0.011860, -1.389944},
+ {2.184585, 0.011859, -1.389942},
+ {2.184585, -0.120979, -1.228078},
+ {2.050920, -0.120978, -1.228080},
+ {2.184585, -0.219687, -1.043408},
+ {2.050920, -0.219686, -1.043410},
+ {2.184585, -0.280471, -0.843030},
+ {2.050920, -0.280470, -0.843032},
+ {2.184585, -0.300995, -0.634643},
+ {2.050920, -0.300995, -0.634646},
+ {2.184585, -0.280470, -0.426257},
+ {2.050920, -0.280470, -0.426259},
+ {2.184585, -0.219686, -0.225880},
+ {2.050920, -0.219686, -0.225881},
+ {2.184585, -0.120977, -0.041211},
+ {2.050920, -0.120978, -0.041212},
+ {2.184585, 0.011861, 0.120653},
+ {2.050920, 0.011860, 0.120653},
+ {2.184585, 0.173725, 0.253491},
+ {2.050920, 0.173725, 0.253491},
+ {2.184585, 0.358394, 0.352199},
+ {2.050920, 0.358394, 0.352199},
+ {2.184585, 0.558772, 0.412983},
+ {2.050920, 0.558772, 0.412983},
+ {2.184585, 0.767158, 0.433507},
+ {2.050920, 0.767159, 0.433507},
+ {2.184585, 0.975544, 0.412983},
+ {2.050920, 0.975545, 0.412983},
+ {2.184585, 1.175921, 0.352200},
+ {2.050920, 1.175923, 0.352199},
+ {2.184585, 1.360591, 0.253492},
+ {2.050920, 1.360593, 0.253491},
+ {2.184585, 1.522455, 0.120654},
+ {2.050920, 1.522457, 0.120652},
+ {2.184585, 1.655294, -0.041209},
+ {2.050920, 1.655296, -0.041212},
+ {2.184585, 1.754002, -0.225878},
+ {2.050920, 1.754004, -0.225882},
+ {2.184585, 1.814787, -0.426255},
+ {2.050920, 1.814787, -0.426260},
+ {2.184585, 1.835312, -0.634641},
+ {2.050920, 1.835311, -0.634647},
+ {2.184584, 1.814788, -0.843027},
+ {2.050920, 1.814787, -0.843033},
+ {2.184585, 1.754005, -1.043405},
+ {2.050920, 1.754003, -1.043411},
+ {2.184585, 1.655299, -1.228075},
+ {2.050920, 1.655295, -1.228081},
+ {2.184585, 1.522461, -1.389940},
+ {2.050920, 1.522456, -1.389945},
+ {2.184585, 1.360598, -1.522779},
+ {2.050920, 1.360591, -1.522783},
+ {2.184585, 1.175929, -1.621488},
+ {2.050920, 1.175921, -1.621491},
+ {2.184585, 0.975552, -1.682273},
+ {2.050920, 0.975543, -1.682275},
+ {2.184585, 0.767166, -1.702799},
+ {2.050920, 0.767157, -1.702799},
+ {2.184585, 0.558780, -1.682276},
+ {2.050920, 0.558770, -1.682274},
+ {2.184585, 0.358402, -1.621494},
+ {2.050920, 0.358392, -1.621490},
+ {2.184585, 0.173732, -1.522787},
+ {2.050920, 0.173723, -1.522781},
+ {2.223336, 0.190180, -1.498170},
+ {2.223336, 0.032794, -1.369007},
+ {2.223336, 0.369732, -1.594141},
+ {2.223336, 0.564556, -1.653238},
+ {2.223336, 0.767166, -1.673192},
+ {2.223336, 0.969776, -1.653235},
+ {2.223336, 1.164599, -1.594135},
+ {2.223336, 1.344149, -1.498162},
+ {2.223336, 1.501526, -1.369005},
+ {2.223336, 1.630682, -1.211627},
+ {2.223336, 1.726652, -1.032075},
+ {2.223336, 1.785751, -0.837251},
+ {2.223336, 1.805705, -0.634641},
+ {2.223336, 1.785749, -0.432031},
+ {2.223336, 1.726649, -0.237208},
+ {2.223336, 1.630677, -0.057658},
+ {2.223336, 1.501520, 0.099719},
+ {2.223336, 1.344142, 0.228875},
+ {2.223336, 1.164592, 0.324847},
+ {2.223336, 0.969768, 0.383946},
+ {2.223336, 0.767158, 0.403901},
+ {2.223336, 0.564548, 0.383945},
+ {2.223336, 0.369724, 0.324846},
+ {2.223336, 0.190173, 0.228874},
+ {2.223336, 0.032796, 0.099718},
+ {2.223336, -0.096361, -0.057659},
+ {2.223336, -0.192332, -0.237210},
+ {2.223336, -0.251432, -0.432033},
+ {2.223336, -0.271388, -0.634643},
+ {2.223336, -0.251433, -0.837254},
+ {2.223336, -0.192334, -1.032078},
+ {2.223336, -0.096362, -1.211629},
+ {2.223336, -0.096362, -1.211629},
+ {2.223336, 0.032794, -1.369007},
+ {2.256552, 0.153863, -1.247939},
+ {2.256552, 0.045999, -1.116507},
+ {2.223336, -0.192334, -1.032078},
+ {2.256552, -0.034150, -0.966557},
+ {2.223336, -0.251433, -0.837254},
+ {2.256551, -0.083506, -0.803851},
+ {2.223336, -0.271388, -0.634643},
+ {2.256551, -0.100171, -0.634643},
+ {2.223336, -0.251432, -0.432033},
+ {2.256551, -0.083505, -0.465436},
+ {2.223336, -0.192332, -0.237210},
+ {2.256551, -0.034149, -0.302731},
+ {2.223336, -0.096361, -0.057659},
+ {2.256551, 0.046001, -0.152782},
+ {2.223336, 0.032796, 0.099718},
+ {2.256551, 0.153865, -0.021350},
+ {2.223336, 0.190173, 0.228874},
+ {2.256551, 0.285296, 0.086513},
+ {2.223336, 0.369724, 0.324846},
+ {2.256552, 0.435246, 0.166663},
+ {2.223336, 0.564548, 0.383945},
+ {2.256551, 0.597951, 0.216019},
+ {2.223336, 0.767158, 0.403901},
+ {2.256551, 0.767158, 0.232685},
+ {2.223336, 0.969768, 0.383946},
+ {2.256551, 0.936366, 0.216019},
+ {2.223336, 1.164592, 0.324847},
+ {2.256551, 1.099070, 0.166664},
+ {2.223336, 1.344142, 0.228875},
+ {2.256551, 1.249020, 0.086514},
+ {2.223336, 1.501520, 0.099719},
+ {2.256551, 1.380452, -0.021349},
+ {2.223336, 1.630677, -0.057658},
+ {2.256551, 1.488316, -0.152781},
+ {2.223336, 1.726649, -0.237208},
+ {2.256551, 1.568466, -0.302730},
+ {2.223336, 1.785749, -0.432031},
+ {2.256551, 1.617823, -0.465435},
+ {2.223336, 1.805705, -0.634641},
+ {2.256551, 1.634489, -0.634642},
+ {2.223336, 1.785751, -0.837251},
+ {2.256551, 1.617824, -0.803849},
+ {2.223336, 1.726652, -1.032075},
+ {2.256551, 1.568469, -0.966554},
+ {2.223336, 1.630682, -1.211627},
+ {2.256551, 1.488320, -1.116504},
+ {2.223336, 1.501526, -1.369005},
+ {2.256551, 1.380457, -1.247937},
+ {2.223336, 1.344149, -1.498162},
+ {2.256551, 1.249026, -1.355801},
+ {2.223336, 1.164599, -1.594135},
+ {2.256551, 1.099077, -1.435952},
+ {2.223336, 0.969776, -1.653235},
+ {2.256551, 0.936372, -1.485309},
+ {2.223336, 0.767166, -1.673192},
+ {2.256551, 0.767165, -1.501975},
+ {2.223336, 0.564556, -1.653238},
+ {2.256551, 0.597958, -1.485311},
+ {2.223336, 0.369732, -1.594141},
+ {2.256551, 0.435252, -1.435956},
+ {2.223336, 0.190180, -1.498170},
+ {2.256551, 0.285302, -1.355808},
+ {2.256551, 0.767159, -0.634645},
+ {1.421516, 3.244749, -1.640371},
+ {1.272945, 3.244749, -1.882557},
+ {1.132084, 3.072946, -1.713519},
+ {1.311023, 3.072946, -1.427250},
+ {1.146502, 3.244749, -2.031245},
+ {0.985987, 3.072946, -1.881598},
+ {0.993168, 3.244749, -2.147139},
+ {0.832280, 3.072946, -2.029139},
+ {2.258819, 2.156855, -2.002106},
+ {2.258819, 2.280599, -1.855838},
+ {2.087016, 2.154749, -1.687885},
+ {2.087016, 2.007208, -1.841592},
+ {2.258819, 2.008168, -2.128550},
+ {2.087016, 1.839129, -1.987689},
+ {2.258819, 1.765981, -2.277121},
+ {2.086549, 1.562327, -2.166628},
+ {0.881088, 3.244749, -2.234276},
+ {0.685997, 3.072946, -2.118054},
+ {0.832409, 3.244749, -2.266670},
+ {0.626229, 3.072946, -2.154382},
+ {0.787475, 3.244749, -2.296572},
+ {0.571059, 3.072946, -2.187915},
+ {0.790290, 2.413330, -3.108027},
+ {1.032476, 2.264759, -3.108027},
+ {0.863438, 2.123898, -2.936224},
+ {0.572007, 2.302837, -2.936224},
+ {1.181164, 2.138316, -3.108027},
+ {1.031517, 1.977802, -2.936224},
+ {1.304908, 1.992047, -3.108027},
+ {1.179058, 1.824095, -2.936224},
+ {1.348799, 1.926092, -3.108027},
+ {1.228279, 1.743116, -2.936224},
+ {1.395691, 1.855627, -3.108027},
+ {1.280865, 1.656600, -2.936224},
+ {1.446491, 1.779289, -3.108027},
+ {1.337834, 1.562874, -2.936224},
+ {2.258819, 2.314579, -1.804776},
+ {2.087016, 2.192855, -1.625192},
+ {2.258819, 2.354392, -1.744948},
+ {2.087016, 2.237503, -1.551737},
+ {2.258819, 2.422182, -1.643080},
+ {2.087016, 2.313525, -1.426664},
+ {1.421515, -0.223760, -3.107232},
+ {1.272945, -0.465946, -3.107232},
+ {1.132084, -0.296908, -2.935429},
+ {1.311023, -0.010639, -2.935429},
+ {1.146501, -0.614634, -3.107232},
+ {0.985987, -0.464987, -2.935429},
+ {0.993167, -0.730528, -3.107232},
+ {0.832280, -0.612528, -2.935429},
+ {2.258819, -0.585495, -2.019338},
+ {2.258819, -0.439227, -2.143082},
+ {2.087016, -0.271274, -2.017232},
+ {2.087016, -0.424981, -1.869691},
+ {2.258819, -0.711939, -1.870650},
+ {2.087016, -0.571078, -1.701612},
+ {2.258819, -0.860510, -1.628463},
+ {2.086549, -0.750017, -1.424809},
+ {0.881088, -0.817665, -3.107232},
+ {0.685996, -0.701443, -2.935429},
+ {0.832409, -0.850059, -3.107232},
+ {0.626229, -0.737771, -2.935429},
+ {0.787475, -0.879961, -3.107232},
+ {0.571059, -0.771304, -2.935429},
+ {0.790289, -1.691416, -2.275813},
+ {1.032476, -1.691416, -2.127242},
+ {0.863438, -1.519613, -1.986381},
+ {0.572007, -1.519613, -2.165320},
+ {1.181164, -1.691416, -2.000798},
+ {1.031517, -1.519613, -1.840285},
+ {1.304908, -1.691416, -1.854530},
+ {1.179058, -1.519613, -1.686577},
+ {1.348799, -1.691416, -1.788575},
+ {1.228278, -1.519613, -1.605599},
+ {1.395691, -1.691416, -1.718109},
+ {1.280865, -1.519613, -1.519083},
+ {1.446491, -1.691416, -1.641772},
+ {1.337834, -1.519613, -1.425356},
+ {2.258819, -0.388165, -2.177062},
+ {2.087016, -0.208581, -2.055338},
+ {2.258819, -0.328337, -2.216875},
+ {2.087016, -0.135126, -2.099986},
+ {2.258819, -0.226469, -2.284665},
+ {2.087016, -0.010053, -2.176008},
+ {-1.840420, 3.244749, -1.638804},
+ {-1.729928, 3.072946, -1.425684},
+ {-1.550988, 3.072946, -1.711953},
+ {-1.691849, 3.244749, -1.880991},
+ {-1.404892, 3.072946, -1.880032},
+ {-1.565406, 3.244749, -2.029679},
+ {-1.251185, 3.072946, -2.027573},
+ {-1.412072, 3.244749, -2.145572},
+ {-2.677724, 2.156855, -2.000540},
+ {-2.505920, 2.007208, -1.840026},
+ {-2.505920, 2.154749, -1.686319},
+ {-2.677724, 2.280599, -1.854271},
+ {-2.677724, 2.008168, -2.126983},
+ {-2.505920, 1.839129, -1.986122},
+ {-2.677724, 1.765981, -2.275554},
+ {-2.505453, 1.562327, -2.165062},
+ {-1.104901, 3.072946, -2.116487},
+ {-1.299993, 3.244749, -2.232709},
+ {-1.045134, 3.072946, -2.152815},
+ {-1.251314, 3.244749, -2.265104},
+ {-0.989964, 3.072946, -2.186349},
+ {-1.206379, 3.244749, -2.295006},
+ {-1.209194, 2.413330, -3.106460},
+ {-0.990912, 2.302837, -2.934657},
+ {-1.282343, 2.123898, -2.934657},
+ {-1.451381, 2.264759, -3.106460},
+ {-1.450422, 1.977802, -2.934657},
+ {-1.600068, 2.138316, -3.106460},
+ {-1.597963, 1.824095, -2.934657},
+ {-1.723813, 1.992047, -3.106460},
+ {-1.647183, 1.743116, -2.934657},
+ {-1.767703, 1.926092, -3.106460},
+ {-1.699770, 1.656600, -2.934657},
+ {-1.814596, 1.855627, -3.106460},
+ {-1.756739, 1.562874, -2.934657},
+ {-1.865396, 1.779289, -3.106460},
+ {-2.505920, 2.192855, -1.623626},
+ {-2.677724, 2.314579, -1.803209},
+ {-2.505920, 2.237503, -1.550170},
+ {-2.677724, 2.354392, -1.743382},
+ {-2.505920, 2.313525, -1.425098},
+ {-2.677724, 2.422182, -1.641513},
+ {-1.840420, -0.223760, -3.108316},
+ {-1.729928, -0.010639, -2.936513},
+ {-1.550988, -0.296908, -2.936513},
+ {-1.691849, -0.465946, -3.108316},
+ {-1.404892, -0.464987, -2.936513},
+ {-1.565406, -0.614634, -3.108316},
+ {-1.251185, -0.612528, -2.936513},
+ {-1.412072, -0.730528, -3.108316},
+ {-2.677724, -0.585495, -2.020422},
+ {-2.505920, -0.424981, -1.870775},
+ {-2.505920, -0.271274, -2.018316},
+ {-2.677724, -0.439227, -2.144166},
+ {-2.677724, -0.711939, -1.871734},
+ {-2.505920, -0.571078, -1.702696},
+ {-2.677724, -0.860510, -1.629547},
+ {-2.505453, -0.750017, -1.425893},
+ {-1.104901, -0.701443, -2.936513},
+ {-1.299993, -0.817665, -3.108316},
+ {-1.045134, -0.737771, -2.936513},
+ {-1.251314, -0.850059, -3.108316},
+ {-0.989964, -0.771304, -2.936513},
+ {-1.206379, -0.879961, -3.108316},
+ {-1.209194, -1.691416, -2.276896},
+ {-0.990912, -1.519613, -2.166404},
+ {-1.282343, -1.519613, -1.987465},
+ {-1.451380, -1.691416, -2.128325},
+ {-1.450422, -1.519613, -1.841368},
+ {-1.600068, -1.691416, -2.001882},
+ {-1.597962, -1.519613, -1.687661},
+ {-1.723813, -1.691416, -1.855614},
+ {-1.647183, -1.519613, -1.606683},
+ {-1.767703, -1.691416, -1.789659},
+ {-1.699770, -1.519613, -1.520166},
+ {-1.814595, -1.691416, -1.719193},
+ {-1.756739, -1.519613, -1.426440},
+ {-1.865396, -1.691416, -1.642856},
+ {-2.505920, -0.208581, -2.056422},
+ {-2.677724, -0.388165, -2.178146},
+ {-2.505920, -0.135126, -2.101070},
+ {-2.677724, -0.328337, -2.217959},
+ {-2.505920, -0.010053, -2.177092},
+ {-2.677724, -0.226469, -2.285749},
+ {-1.841436, 3.245014, 0.360610},
+ {-1.692865, 3.245014, 0.602797},
+ {-1.552004, 3.073211, 0.433759},
+ {-1.730944, 3.073211, 0.147490},
+ {-1.566422, 3.245014, 0.751485},
+ {-1.405908, 3.073211, 0.601838},
+ {-1.413088, 3.245014, 0.867378},
+ {-1.252201, 3.073211, 0.749379},
+ {-2.678740, 2.157120, 0.722346},
+ {-2.678739, 2.280864, 0.576077},
+ {-2.506937, 2.155015, 0.408125},
+ {-2.506937, 2.007473, 0.561832},
+ {-2.678740, 2.008433, 0.848789},
+ {-2.506937, 1.839394, 0.707928},
+ {-2.678740, 1.766246, 0.997360},
+ {-2.506469, 1.562592, 0.886868},
+ {-1.301009, 3.245014, 0.954516},
+ {-1.105917, 3.073211, 0.838293},
+ {-1.252330, 3.245014, 0.986910},
+ {-1.046150, 3.073211, 0.874622},
+ {-1.207395, 3.245014, 1.016812},
+ {-0.990980, 3.073211, 0.908155},
+ {-1.210210, 2.413595, 1.828266},
+ {-1.452397, 2.265024, 1.828266},
+ {-1.283359, 2.124163, 1.656463},
+ {-0.991928, 2.303102, 1.656463},
+ {-1.601085, 2.138581, 1.828266},
+ {-1.451438, 1.978067, 1.656463},
+ {-1.724829, 1.992312, 1.828266},
+ {-1.598979, 1.824360, 1.656463},
+ {-1.768720, 1.926357, 1.828267},
+ {-1.648199, 1.743381, 1.656463},
+ {-1.815612, 1.855892, 1.828267},
+ {-1.700786, 1.656865, 1.656463},
+ {-1.866412, 1.779554, 1.828267},
+ {-1.757755, 1.563139, 1.656463},
+ {-2.678739, 2.314844, 0.525015},
+ {-2.506937, 2.193120, 0.345432},
+ {-2.678739, 2.354657, 0.465188},
+ {-2.506937, 2.237768, 0.271976},
+ {-2.678740, 2.422447, 0.363319},
+ {-2.506937, 2.313791, 0.146904},
+ {-1.841436, -0.223494, 1.827472},
+ {-1.692865, -0.465681, 1.827472},
+ {-1.552004, -0.296643, 1.655668},
+ {-1.730944, -0.010374, 1.655668},
+ {-1.566422, -0.614369, 1.827472},
+ {-1.405908, -0.464722, 1.655668},
+ {-1.413088, -0.730262, 1.827472},
+ {-1.252201, -0.612263, 1.655669},
+ {-2.678740, -0.585230, 0.739577},
+ {-2.678740, -0.438962, 0.863321},
+ {-2.506936, -0.271009, 0.737471},
+ {-2.506936, -0.424716, 0.589930},
+ {-2.678739, -0.711673, 0.590889},
+ {-2.506936, -0.570813, 0.421851},
+ {-2.678739, -0.860244, 0.348703},
+ {-2.506469, -0.749752, 0.145049},
+ {-1.301009, -0.817400, 1.827472},
+ {-1.105917, -0.701178, 1.655669},
+ {-1.252330, -0.849794, 1.827472},
+ {-1.046150, -0.737506, 1.655669},
+ {-1.207395, -0.879696, 1.827472},
+ {-0.990980, -0.771039, 1.655669},
+ {-1.210210, -1.691150, 0.996052},
+ {-1.452397, -1.691150, 0.847481},
+ {-1.283358, -1.519347, 0.706621},
+ {-0.991928, -1.519347, 0.885560},
+ {-1.601084, -1.691150, 0.721038},
+ {-1.451438, -1.519347, 0.560524},
+ {-1.724829, -1.691150, 0.574769},
+ {-1.598978, -1.519347, 0.406817},
+ {-1.768719, -1.691151, 0.508814},
+ {-1.648199, -1.519347, 0.325838},
+ {-1.815612, -1.691151, 0.438349},
+ {-1.700786, -1.519348, 0.239322},
+ {-1.866412, -1.691151, 0.362011},
+ {-1.757755, -1.519348, 0.145596},
+ {-2.678740, -0.387900, 0.897301},
+ {-2.506936, -0.208316, 0.775578},
+ {-2.678740, -0.328072, 0.937115},
+ {-2.506936, -0.134861, 0.820225},
+ {-2.678740, -0.226204, 1.004904},
+ {-2.506937, -0.009788, 0.896247},
+ {1.420499, 3.245014, 0.359044},
+ {1.310007, 3.073211, 0.145924},
+ {1.131068, 3.073211, 0.432193},
+ {1.271928, 3.245014, 0.601230},
+ {0.984971, 3.073211, 0.600272},
+ {1.145485, 3.245014, 0.749919},
+ {0.831264, 3.073211, 0.747813},
+ {0.992151, 3.245014, 0.865812},
+ {2.257802, 2.157120, 0.720780},
+ {2.086000, 2.007473, 0.560266},
+ {2.086000, 2.155015, 0.406558},
+ {2.257803, 2.280864, 0.574511},
+ {2.257802, 2.008433, 0.847223},
+ {2.085999, 1.839394, 0.706362},
+ {2.257802, 1.766246, 0.995794},
+ {2.085533, 1.562592, 0.885302},
+ {0.684980, 3.073211, 0.836727},
+ {0.880072, 3.245014, 0.952949},
+ {0.625213, 3.073211, 0.873055},
+ {0.831393, 3.245014, 0.985343},
+ {0.570043, 3.073211, 0.906589},
+ {0.786459, 3.245014, 1.015246},
+ {0.789273, 2.413595, 1.826700},
+ {0.570991, 2.303102, 1.654897},
+ {0.862422, 2.124163, 1.654897},
+ {1.031460, 2.265024, 1.826700},
+ {1.030501, 1.978067, 1.654897},
+ {1.180148, 2.138581, 1.826700},
+ {1.178042, 1.824360, 1.654897},
+ {1.303892, 1.992312, 1.826700},
+ {1.227262, 1.743381, 1.654897},
+ {1.347783, 1.926357, 1.826700},
+ {1.279849, 1.656865, 1.654897},
+ {1.394675, 1.855892, 1.826700},
+ {1.336818, 1.563139, 1.654897},
+ {1.445475, 1.779554, 1.826700},
+ {2.086000, 2.193120, 0.343865},
+ {2.257803, 2.314844, 0.523449},
+ {2.086000, 2.237768, 0.270410},
+ {2.257803, 2.354657, 0.463622},
+ {2.086000, 2.313791, 0.145338},
+ {2.257803, 2.422447, 0.361753},
+ {1.420499, -0.223494, 1.828556},
+ {1.310007, -0.010374, 1.656753},
+ {1.131068, -0.296643, 1.656753},
+ {1.271929, -0.465681, 1.828556},
+ {0.984971, -0.464722, 1.656753},
+ {1.145486, -0.614369, 1.828556},
+ {0.831264, -0.612263, 1.656753},
+ {0.992151, -0.730262, 1.828556},
+ {2.257802, -0.585230, 0.740661},
+ {2.086000, -0.424716, 0.591015},
+ {2.085999, -0.271009, 0.738555},
+ {2.257802, -0.438962, 0.864406},
+ {2.257803, -0.711673, 0.591973},
+ {2.086000, -0.570813, 0.422935},
+ {2.257803, -0.860244, 0.349787},
+ {2.085533, -0.749752, 0.146133},
+ {0.684980, -0.701178, 1.656753},
+ {0.880072, -0.817400, 1.828556},
+ {0.625213, -0.737506, 1.656753},
+ {0.831393, -0.849794, 1.828556},
+ {0.570043, -0.771039, 1.656753},
+ {0.786459, -0.879696, 1.828556},
+ {0.789273, -1.691150, 0.997136},
+ {0.570991, -1.519347, 0.886644},
+ {0.862422, -1.519347, 0.707705},
+ {1.031460, -1.691150, 0.848565},
+ {1.030501, -1.519347, 0.561608},
+ {1.180148, -1.691150, 0.722122},
+ {1.178042, -1.519347, 0.407901},
+ {1.303892, -1.691150, 0.575853},
+ {1.227263, -1.519347, 0.326922},
+ {1.347783, -1.691151, 0.509898},
+ {1.279849, -1.519348, 0.240406},
+ {1.394675, -1.691151, 0.439433},
+ {1.336818, -1.519348, 0.146680},
+ {1.445475, -1.691151, 0.363095},
+ {2.085999, -0.208316, 0.776662},
+ {2.257802, -0.387900, 0.898385},
+ {2.085999, -0.134861, 0.821310},
+ {2.257802, -0.328072, 0.938199},
+ {2.085999, -0.009788, 0.897332},
+ {2.257802, -0.226204, 1.005988},
+ {-0.210634, -1.698040, -2.443506},
+ {-0.016501, -1.698040, -2.430085},
+ {0.016423, -1.524719, -2.346447},
+ {-0.210896, -1.524719, -2.362162},
+ {0.181555, -1.698040, -2.397875},
+ {0.248335, -1.524719, -2.308732},
+ {-0.402846, -1.698040, -2.430085},
+ {-0.435965, -1.524719, -2.346447},
+ {-0.595058, -1.698040, -2.397876},
+ {-0.661034, -1.524719, -2.308732},
+ {-0.595058, -0.989718, -3.106547},
+ {-0.661034, -0.900574, -2.933227},
+ {-0.435965, -0.938290, -2.933227},
+ {-0.402846, -1.021928, -3.106547},
+ {-0.210896, -0.954004, -2.933227},
+ {-0.210635, -1.035349, -3.106547},
+ {-0.016501, -1.021928, -3.106547},
+ {0.016423, -0.938290, -2.933227},
+ {0.248335, -0.900574, -2.933227},
+ {0.181555, -0.989718, -3.106547},
+ {-0.208760, 3.236759, -2.443506},
+ {-0.402894, 3.236759, -2.430085},
+ {-0.435817, 3.063439, -2.346447},
+ {-0.208498, 3.063439, -2.362161},
+ {-0.600949, 3.236759, -2.397876},
+ {-0.667729, 3.063439, -2.308731},
+ {-0.016548, 3.236759, -2.430085},
+ {0.016571, 3.063439, -2.346447},
+ {0.175664, 3.236759, -2.397875},
+ {0.241640, 3.063439, -2.308731},
+ {0.175664, 2.528437, -3.106547},
+ {0.241640, 2.439293, -2.933227},
+ {0.016571, 2.477009, -2.933227},
+ {-0.016548, 2.560647, -3.106547},
+ {-0.208498, 2.492724, -2.933227},
+ {-0.208760, 2.574068, -3.106547},
+ {-0.402894, 2.560647, -3.106547},
+ {-0.435818, 2.477009, -2.933227},
+ {-0.667729, 2.439293, -2.933227},
+ {-0.600949, 2.528438, -3.106547},
+ {2.257703, 0.768422, -2.443505},
+ {2.257703, 0.962556, -2.430084},
+ {2.084383, 0.995479, -2.346446},
+ {2.084383, 0.768160, -2.362161},
+ {2.257703, 1.160611, -2.397875},
+ {2.084383, 1.227391, -2.308731},
+ {2.257703, 0.576210, -2.430084},
+ {2.084383, 0.543091, -2.346446},
+ {2.257703, 0.383998, -2.397875},
+ {2.084383, 0.318022, -2.308731},
+ {1.549381, 0.383998, -3.106547},
+ {1.460237, 0.318022, -2.933226},
+ {1.497953, 0.543091, -2.933226},
+ {1.581591, 0.576210, -3.106547},
+ {1.513667, 0.768160, -2.933226},
+ {1.595011, 0.768422, -3.106547},
+ {1.581591, 0.962556, -3.106547},
+ {1.497952, 0.995479, -2.933226},
+ {1.460237, 1.227391, -2.933226},
+ {1.549381, 1.160611, -3.106547},
+ {-2.677096, 0.770297, -2.443506},
+ {-2.677096, 0.576163, -2.430085},
+ {-2.503776, 0.543239, -2.346447},
+ {-2.503776, 0.770559, -2.362162},
+ {-2.677096, 0.378107, -2.397876},
+ {-2.503776, 0.311328, -2.308732},
+ {-2.677096, 0.962509, -2.430085},
+ {-2.503776, 0.995628, -2.346447},
+ {-2.677097, 1.154721, -2.397876},
+ {-2.503776, 1.220697, -2.308732},
+ {-1.968775, 1.154721, -3.106547},
+ {-1.879631, 1.220697, -2.933227},
+ {-1.917346, 0.995628, -2.933227},
+ {-2.000984, 0.962509, -3.106547},
+ {-1.933061, 0.770559, -2.933227},
+ {-2.014405, 0.770297, -3.106547},
+ {-2.000984, 0.576163, -3.106547},
+ {-1.917346, 0.543239, -2.933227},
+ {-1.879630, 0.311328, -2.933227},
+ {-1.968775, 0.378108, -3.106547},
+ {-2.677096, -1.035179, -0.639905},
+ {-2.677096, -1.021759, -0.445771},
+ {-2.503776, -0.938121, -0.412847},
+ {-2.503776, -0.953836, -0.640167},
+ {-2.677096, -0.989550, -0.247715},
+ {-2.503776, -0.900405, -0.180935},
+ {-2.677096, -1.021759, -0.832117},
+ {-2.503776, -0.938121, -0.865236},
+ {-2.677096, -0.989550, -1.024329},
+ {-2.503776, -0.900405, -1.090305},
+ {-1.968774, -1.698221, -1.024328},
+ {-1.879630, -1.524901, -1.090304},
+ {-1.917346, -1.524901, -0.865235},
+ {-2.000984, -1.698221, -0.832116},
+ {-1.933061, -1.524901, -0.640167},
+ {-2.014405, -1.698221, -0.639905},
+ {-2.000984, -1.698221, -0.445771},
+ {-1.917346, -1.524901, -0.412847},
+ {-1.879630, -1.524901, -0.180935},
+ {-1.968775, -1.698221, -0.247715},
+ {-2.677096, 2.573899, -0.638029},
+ {-2.677096, 2.560478, -0.832163},
+ {-2.503776, 2.476840, -0.865087},
+ {-2.503776, 2.492555, -0.637767},
+ {-2.677096, 2.528269, -1.030219},
+ {-2.503776, 2.439125, -1.096999},
+ {-2.677096, 2.560478, -0.445818},
+ {-2.503776, 2.476840, -0.412699},
+ {-2.677096, 2.528269, -0.253606},
+ {-2.503776, 2.439125, -0.187630},
+ {-1.968775, 3.236941, -0.253606},
+ {-1.879630, 3.063620, -0.187629},
+ {-1.917346, 3.063620, -0.412698},
+ {-2.000984, 3.236941, -0.445817},
+ {-1.933061, 3.063620, -0.637767},
+ {-2.014405, 3.236940, -0.638029},
+ {-2.000984, 3.236940, -0.832163},
+ {-1.917346, 3.063620, -0.865087},
+ {-1.879630, 3.063620, -1.096998},
+ {-1.968774, 3.236940, -1.030218},
+ {2.257703, 2.573900, -0.639903},
+ {2.257703, 2.560479, -0.445769},
+ {2.084383, 2.476841, -0.412845},
+ {2.084383, 2.492556, -0.640165},
+ {2.257703, 2.528269, -0.247713},
+ {2.084383, 2.439126, -0.180933},
+ {2.257703, 2.560479, -0.832115},
+ {2.084383, 2.476841, -0.865234},
+ {2.257703, 2.528269, -1.024326},
+ {2.084383, 2.439125, -1.090302},
+ {1.549381, 3.236941, -1.024326},
+ {1.460237, 3.063621, -1.090303},
+ {1.497953, 3.063621, -0.865234},
+ {1.581591, 3.236941, -0.832115},
+ {1.513667, 3.063621, -0.640165},
+ {1.595011, 3.236941, -0.639903},
+ {1.581591, 3.236941, -0.445769},
+ {1.497953, 3.063621, -0.412845},
+ {1.460237, 3.063621, -0.180934},
+ {1.549381, 3.236941, -0.247714},
+ {2.257703, -1.035179, -0.638027},
+ {2.257703, -1.021759, -0.832161},
+ {2.084383, -0.938120, -0.865085},
+ {2.084383, -0.953835, -0.637765},
+ {2.257703, -0.989549, -1.030217},
+ {2.084383, -0.900405, -1.096997},
+ {2.257703, -1.021759, -0.445815},
+ {2.084383, -0.938120, -0.412696},
+ {2.257703, -0.989549, -0.253604},
+ {2.084383, -0.900405, -0.187628},
+ {1.549381, -1.698221, -0.253604},
+ {1.460237, -1.524901, -0.187628},
+ {1.497953, -1.524901, -0.412697},
+ {1.581591, -1.698221, -0.445816},
+ {1.513668, -1.524901, -0.637766},
+ {1.595011, -1.698221, -0.638027},
+ {1.581591, -1.698221, -0.832161},
+ {1.497953, -1.524901, -0.865085},
+ {1.460237, -1.524901, -1.096997},
+ {1.549382, -1.698221, -1.030217},
+ {-0.208759, -1.698040, 1.165573},
+ {-0.402893, -1.698040, 1.152153},
+ {-0.435817, -1.524719, 1.068514},
+ {-0.208497, -1.524719, 1.084229},
+ {-0.600949, -1.698040, 1.119943},
+ {-0.667729, -1.524719, 1.030799},
+ {-0.016547, -1.698040, 1.152153},
+ {0.016572, -1.524719, 1.068514},
+ {0.175664, -1.698040, 1.119943},
+ {0.241640, -1.524719, 1.030799},
+ {0.175664, -0.989718, 1.828615},
+ {0.241640, -0.900574, 1.655294},
+ {0.016572, -0.938289, 1.655294},
+ {-0.016548, -1.021927, 1.828615},
+ {-0.208497, -0.954004, 1.655294},
+ {-0.208759, -1.035348, 1.828615},
+ {-0.402893, -1.021927, 1.828615},
+ {-0.435817, -0.938289, 1.655294},
+ {-0.667729, -0.900574, 1.655294},
+ {-0.600949, -0.989718, 1.828615},
+ {-0.210635, 3.236759, 1.165573},
+ {-0.016501, 3.236760, 1.152152},
+ {0.016423, 3.063439, 1.068514},
+ {-0.210896, 3.063439, 1.084229},
+ {0.181555, 3.236760, 1.119943},
+ {0.248335, 3.063439, 1.030799},
+ {-0.402846, 3.236759, 1.152152},
+ {-0.435965, 3.063439, 1.068514},
+ {-0.595058, 3.236759, 1.119943},
+ {-0.661034, 3.063439, 1.030799},
+ {-0.595058, 2.528438, 1.828615},
+ {-0.661034, 2.439294, 1.655294},
+ {-0.435965, 2.477009, 1.655294},
+ {-0.402846, 2.560647, 1.828615},
+ {-0.210896, 2.492724, 1.655294},
+ {-0.210634, 2.574068, 1.828615},
+ {-0.016501, 2.560647, 1.828615},
+ {0.016423, 2.477009, 1.655294},
+ {0.248335, 2.439294, 1.655294},
+ {0.181555, 2.528438, 1.828615},
+ {-2.677097, 0.768422, 1.165573},
+ {-2.677097, 0.962556, 1.152152},
+ {-2.503777, 0.995480, 1.068514},
+ {-2.503777, 0.768160, 1.084229},
+ {-2.677097, 1.160612, 1.119943},
+ {-2.503777, 1.227392, 1.030799},
+ {-2.677097, 0.576210, 1.152152},
+ {-2.503777, 0.543091, 1.068514},
+ {-2.677097, 0.383998, 1.119943},
+ {-2.503777, 0.318022, 1.030799},
+ {-1.968775, 0.383999, 1.828615},
+ {-1.879631, 0.318023, 1.655294},
+ {-1.917346, 0.543091, 1.655294},
+ {-2.000985, 0.576210, 1.828615},
+ {-1.933061, 0.768160, 1.655294},
+ {-2.014405, 0.768422, 1.828615},
+ {-2.000985, 0.962556, 1.828615},
+ {-1.917346, 0.995480, 1.655294},
+ {-1.879631, 1.227392, 1.655294},
+ {-1.968775, 1.160612, 1.828615},
+ {2.257703, 0.770298, 1.165573},
+ {2.257703, 0.576164, 1.152152},
+ {2.084383, 0.543240, 1.068514},
+ {2.084383, 0.770559, 1.084229},
+ {2.257703, 0.378108, 1.119943},
+ {2.084383, 0.311328, 1.030799},
+ {2.257703, 0.962509, 1.152152},
+ {2.084382, 0.995628, 1.068514},
+ {2.257703, 1.154721, 1.119943},
+ {2.084382, 1.220697, 1.030799},
+ {1.549381, 1.154721, 1.828615},
+ {1.460237, 1.220697, 1.655294},
+ {1.497952, 0.995628, 1.655294},
+ {1.581591, 0.962509, 1.828615},
+ {1.513667, 0.770559, 1.655294},
+ {1.595011, 0.770298, 1.828615},
+ {1.581590, 0.576164, 1.828615},
+ {1.497952, 0.543240, 1.655294},
+ {1.460237, 0.311328, 1.655294},
+ {1.549381, 0.378108, 1.828615},
+ {-0.153840, 3.080711, -1.627220},
+ {-0.153840, 3.080711, -2.374549},
+ {-0.269047, 3.080711, -2.374549},
+ {-0.269047, 3.080711, -1.627220},
+ {-0.153840, 3.080711, 1.103494},
+ {-0.153840, 3.080711, 0.356164},
+ {-0.269047, 3.080711, 0.356164},
+ {-0.269047, 3.080711, 1.103493},
+ {1.527578, 3.080711, -0.693132},
+ {0.780249, 3.080711, -0.693132},
+ {0.780248, 3.080711, -0.577924},
+ {1.527578, 3.080710, -0.577924},
+ {-1.203135, 3.080711, -0.693132},
+ {-1.950464, 3.080711, -0.693131},
+ {-1.950465, 3.080711, -0.577924},
+ {-1.203136, 3.080711, -0.577924},
+ {-0.153839, -1.534256, 0.357818},
+ {-0.153839, -1.534256, 1.105147},
+ {-0.269047, -1.534256, 1.105148},
+ {-0.269047, -1.534256, 0.357818},
+ {-0.153839, -1.534256, -2.372895},
+ {-0.153839, -1.534256, -1.625566},
+ {-0.269047, -1.534256, -1.625566},
+ {-0.269047, -1.534256, -2.372895},
+ {1.527578, -1.534256, -0.576270},
+ {0.780249, -1.534256, -0.576270},
+ {0.780249, -1.534256, -0.691478},
+ {1.527578, -1.534256, -0.691478},
+ {-1.203135, -1.534256, -0.576270},
+ {-1.950464, -1.534256, -0.576270},
+ {-1.950464, -1.534256, -0.691478},
+ {-1.203135, -1.534256, -0.691478},
+ {2.087835, 0.833305, 0.357818},
+ {2.087835, 0.833305, 1.105147},
+ {2.087835, 0.718097, 1.105148},
+ {2.087835, 0.718097, 0.357818},
+ {2.087835, 0.833305, -2.372895},
+ {2.087835, 0.833305, -1.625566},
+ {2.087835, 0.718097, -1.625566},
+ {2.087835, 0.718097, -2.372895},
+ {2.087835, 2.514723, -0.576270},
+ {2.087835, 1.767394, -0.576270},
+ {2.087835, 1.767393, -0.691478},
+ {2.087835, 2.514722, -0.691478},
+ {2.087835, -0.215991, -0.576270},
+ {2.087835, -0.963320, -0.576270},
+ {2.087835, -0.963320, -0.691478},
+ {2.087835, -0.215991, -0.691478},
+ {0.781672, 0.831054, -2.941403},
+ {1.529001, 0.831054, -2.941403},
+ {1.529002, 0.715846, -2.941403},
+ {0.781673, 0.715846, -2.941403},
+ {-1.949041, 0.831054, -2.941403},
+ {-1.201712, 0.831054, -2.941403},
+ {-1.201711, 0.715846, -2.941403},
+ {-1.949040, 0.715846, -2.941403},
+ {-0.152416, 2.512471, -2.941403},
+ {-0.152416, 1.765142, -2.941403},
+ {-0.267623, 1.765142, -2.941403},
+ {-0.267623, 2.512471, -2.941403},
+ {-0.152416, -0.218242, -2.941403},
+ {-0.152416, -0.965571, -2.941403},
+ {-0.267623, -0.965572, -2.941403},
+ {-0.267623, -0.218242, -2.941403},
+ {-2.510722, 0.833304, -1.627220},
+ {-2.510722, 0.833304, -2.374549},
+ {-2.510721, 0.718097, -2.374549},
+ {-2.510721, 0.718097, -1.627220},
+ {-2.510722, 0.833304, 1.103494},
+ {-2.510722, 0.833304, 0.356164},
+ {-2.510721, 0.718097, 0.356164},
+ {-2.510721, 0.718097, 1.103493},
+ {-2.510721, 2.514722, -0.693132},
+ {-2.510721, 1.767393, -0.693132},
+ {-2.510721, 1.767393, -0.577924},
+ {-2.510721, 2.514722, -0.577924},
+ {-2.510721, -0.215991, -0.693132},
+ {-2.510722, -0.963320, -0.693131},
+ {-2.510722, -0.963321, -0.577924},
+ {-2.510721, -0.215992, -0.577924},
+ {-1.201712, 0.832708, 1.664578},
+ {-1.949041, 0.832708, 1.664578},
+ {-1.949041, 0.717501, 1.664578},
+ {-1.201712, 0.717501, 1.664578},
+ {1.529002, 0.832708, 1.664578},
+ {0.781672, 0.832708, 1.664578},
+ {0.781672, 0.717501, 1.664577},
+ {1.529001, 0.717501, 1.664577},
+ {-0.267624, 2.514126, 1.664578},
+ {-0.267624, 1.766797, 1.664578},
+ {-0.152416, 1.766796, 1.664577},
+ {-0.152416, 2.514126, 1.664577},
+ {-0.267624, -0.216587, 1.664578},
+ {-0.267623, -0.963916, 1.664578},
+ {-0.152416, -0.963917, 1.664578},
+ {-0.152416, -0.216588, 1.664578},
+};
+
+float
+companion_texture_coordinates[COMPANION_VERTEX_COUNT][2] = {
+ {0.497703, 0.466800},
+ {0.611992, 0.581089},
+ {0.587500, 0.601190},
+ {0.559556, 0.616126},
+ {0.497703, 0.466800},
+ {0.559556, 0.616126},
+ {0.529236, 0.625323},
+ {0.529236, 0.625323},
+ {0.497703, 0.628429},
+ {0.466171, 0.625323},
+ {0.435851, 0.616126},
+ {0.407907, 0.601190},
+ {0.383414, 0.581089},
+ {0.363314, 0.556596},
+ {0.348378, 0.528653},
+ {0.339180, 0.498332},
+ {0.497703, 0.466800},
+ {0.339180, 0.498332},
+ {0.336074, 0.466800},
+ {0.336074, 0.466800},
+ {0.339180, 0.435268},
+ {0.348378, 0.404947},
+ {0.363314, 0.377004},
+ {0.383414, 0.352511},
+ {0.407907, 0.332410},
+ {0.435851, 0.317474},
+ {0.466171, 0.308277},
+ {0.497703, 0.305171},
+ {0.529236, 0.308277},
+ {0.559556, 0.317475},
+ {0.587500, 0.332411},
+ {0.497703, 0.466800},
+ {0.587500, 0.332411},
+ {0.611992, 0.352511},
+ {0.611992, 0.352511},
+ {0.632093, 0.377004},
+ {0.647029, 0.404948},
+ {0.656227, 0.435268},
+ {0.659332, 0.466800},
+ {0.656226, 0.498333},
+ {0.647029, 0.528653},
+ {0.632093, 0.556597},
+ {0.497703, 0.466800},
+ {0.611992, 0.581089},
+ {0.587500, 0.601190},
+ {0.559556, 0.616126},
+ {0.497703, 0.466800},
+ {0.559556, 0.616126},
+ {0.529236, 0.625323},
+ {0.497703, 0.628429},
+ {0.466171, 0.625323},
+ {0.435851, 0.616126},
+ {0.407907, 0.601190},
+ {0.497703, 0.466800},
+ {0.407907, 0.601190},
+ {0.383414, 0.581089},
+ {0.383414, 0.581089},
+ {0.363314, 0.556596},
+ {0.348378, 0.528653},
+ {0.339180, 0.498332},
+ {0.336074, 0.466800},
+ {0.339180, 0.435268},
+ {0.348378, 0.404947},
+ {0.363314, 0.377004},
+ {0.383414, 0.352511},
+ {0.407907, 0.332410},
+ {0.435851, 0.317474},
+ {0.497703, 0.466800},
+ {0.435851, 0.317474},
+ {0.466171, 0.308277},
+ {0.466171, 0.308277},
+ {0.497703, 0.305171},
+ {0.529236, 0.308277},
+ {0.559556, 0.317475},
+ {0.587500, 0.332411},
+ {0.611992, 0.352511},
+ {0.632093, 0.377004},
+ {0.647029, 0.404948},
+ {0.647029, 0.404948},
+ {0.656227, 0.435268},
+ {0.497703, 0.466800},
+ {0.656227, 0.435268},
+ {0.659332, 0.466800},
+ {0.659332, 0.466800},
+ {0.656226, 0.498333},
+ {0.647029, 0.528653},
+ {0.647029, 0.528653},
+ {0.632093, 0.556597},
+ {0.497703, 0.466800},
+ {0.611992, 0.581089},
+ {0.587500, 0.601190},
+ {0.559556, 0.616126},
+ {0.529236, 0.625323},
+ {0.497703, 0.628429},
+ {0.466171, 0.625323},
+ {0.497703, 0.466800},
+ {0.466171, 0.625323},
+ {0.435851, 0.616126},
+ {0.435851, 0.616126},
+ {0.407907, 0.601190},
+ {0.383414, 0.581089},
+ {0.363314, 0.556596},
+ {0.497703, 0.466800},
+ {0.363314, 0.556596},
+ {0.348378, 0.528653},
+ {0.348378, 0.528653},
+ {0.339180, 0.498332},
+ {0.336074, 0.466800},
+ {0.339180, 0.435268},
+ {0.497703, 0.466800},
+ {0.339180, 0.435268},
+ {0.348378, 0.404947},
+ {0.348378, 0.404947},
+ {0.363314, 0.377004},
+ {0.383414, 0.352511},
+ {0.407907, 0.332410},
+ {0.435851, 0.317474},
+ {0.466171, 0.308277},
+ {0.497703, 0.305171},
+ {0.529236, 0.308277},
+ {0.559556, 0.317475},
+ {0.587500, 0.332411},
+ {0.611992, 0.352511},
+ {0.632093, 0.377004},
+ {0.632093, 0.377004},
+ {0.647029, 0.404948},
+ {0.647029, 0.404948},
+ {0.656227, 0.435268},
+ {0.659332, 0.466800},
+ {0.656226, 0.498333},
+ {0.656226, 0.498333},
+ {0.647029, 0.528653},
+ {0.647029, 0.528653},
+ {0.632093, 0.556597},
+ {0.497703, 0.466800},
+ {0.611992, 0.581089},
+ {0.587500, 0.601190},
+ {0.559556, 0.616126},
+ {0.529236, 0.625323},
+ {0.497703, 0.628429},
+ {0.497703, 0.466800},
+ {0.497703, 0.628429},
+ {0.466171, 0.625323},
+ {0.466171, 0.625323},
+ {0.435851, 0.616126},
+ {0.407907, 0.601190},
+ {0.383414, 0.581089},
+ {0.497703, 0.466800},
+ {0.383414, 0.581089},
+ {0.363314, 0.556596},
+ {0.363314, 0.556596},
+ {0.348378, 0.528653},
+ {0.339180, 0.498332},
+ {0.336074, 0.466800},
+ {0.339180, 0.435268},
+ {0.339180, 0.435268},
+ {0.348378, 0.404947},
+ {0.348378, 0.404947},
+ {0.363314, 0.377004},
+ {0.383414, 0.352511},
+ {0.407907, 0.332410},
+ {0.435851, 0.317474},
+ {0.466171, 0.308277},
+ {0.497703, 0.305171},
+ {0.529236, 0.308277},
+ {0.559556, 0.317475},
+ {0.587500, 0.332411},
+ {0.611992, 0.352511},
+ {0.632093, 0.377004},
+ {0.647029, 0.404948},
+ {0.656227, 0.435268},
+ {0.659332, 0.466800},
+ {0.656226, 0.498333},
+ {0.647029, 0.528653},
+ {0.632093, 0.556597},
+ {0.632093, 0.556597},
+ {0.611992, 0.581089},
+ {0.497703, 0.466800},
+ {0.497703, 0.466800},
+ {0.611992, 0.581089},
+ {0.587500, 0.601190},
+ {0.497703, 0.466800},
+ {0.587500, 0.601190},
+ {0.559556, 0.616126},
+ {0.529236, 0.625323},
+ {0.497703, 0.628429},
+ {0.466171, 0.625323},
+ {0.435851, 0.616126},
+ {0.407907, 0.601190},
+ {0.383414, 0.581089},
+ {0.363314, 0.556596},
+ {0.348378, 0.528653},
+ {0.339180, 0.498332},
+ {0.336074, 0.466800},
+ {0.339180, 0.435268},
+ {0.348378, 0.404947},
+ {0.497703, 0.466800},
+ {0.348378, 0.404947},
+ {0.363314, 0.377004},
+ {0.363314, 0.377004},
+ {0.383414, 0.352511},
+ {0.407907, 0.332410},
+ {0.435851, 0.317474},
+ {0.466171, 0.308277},
+ {0.497703, 0.305171},
+ {0.529236, 0.308277},
+ {0.559556, 0.317475},
+ {0.587500, 0.332411},
+ {0.497703, 0.466800},
+ {0.587500, 0.332411},
+ {0.611992, 0.352511},
+ {0.497703, 0.466800},
+ {0.611992, 0.352511},
+ {0.632093, 0.377004},
+ {0.632093, 0.377004},
+ {0.647029, 0.404948},
+ {0.656227, 0.435268},
+ {0.659332, 0.466800},
+ {0.656226, 0.498333},
+ {0.647029, 0.528653},
+ {0.632093, 0.556597},
+ {0.611992, 0.581089},
+ {0.497703, 0.466800},
+ {0.611992, 0.581089},
+ {0.587500, 0.601190},
+ {0.559556, 0.616126},
+ {0.529236, 0.625323},
+ {0.497703, 0.628429},
+ {0.466171, 0.625323},
+ {0.435851, 0.616126},
+ {0.407907, 0.601190},
+ {0.383414, 0.581089},
+ {0.363314, 0.556596},
+ {0.348378, 0.528653},
+ {0.339180, 0.498332},
+ {0.336074, 0.466800},
+ {0.339180, 0.435268},
+ {0.348378, 0.404947},
+ {0.497703, 0.466800},
+ {0.348378, 0.404947},
+ {0.363314, 0.377004},
+ {0.363314, 0.377004},
+ {0.383414, 0.352511},
+ {0.407907, 0.332410},
+ {0.497703, 0.466800},
+ {0.407907, 0.332410},
+ {0.435851, 0.317474},
+ {0.435851, 0.317474},
+ {0.466171, 0.308277},
+ {0.497703, 0.305171},
+ {0.529236, 0.308277},
+ {0.559556, 0.317475},
+ {0.587500, 0.332411},
+ {0.611992, 0.352511},
+ {0.632093, 0.377004},
+ {0.647029, 0.404948},
+ {0.497703, 0.466800},
+ {0.647029, 0.404948},
+ {0.656227, 0.435268},
+ {0.656227, 0.435268},
+ {0.659332, 0.466800},
+ {0.659332, 0.466800},
+ {0.656226, 0.498333},
+ {0.647029, 0.528653},
+ {0.632093, 0.556597},
+ {0.500286, 0.468323},
+ {0.310836, 0.657773},
+ {0.351436, 0.691093},
+ {0.397756, 0.715852},
+ {0.448017, 0.731098},
+ {0.500286, 0.736246},
+ {0.552555, 0.731098},
+ {0.602816, 0.715852},
+ {0.649136, 0.691093},
+ {0.500286, 0.468323},
+ {0.649136, 0.691093},
+ {0.689736, 0.657773},
+ {0.689736, 0.657773},
+ {0.723056, 0.617173},
+ {0.500286, 0.468323},
+ {0.723056, 0.617173},
+ {0.747815, 0.570853},
+ {0.747815, 0.570853},
+ {0.763061, 0.520592},
+ {0.763061, 0.520592},
+ {0.768209, 0.468323},
+ {0.768209, 0.468323},
+ {0.763061, 0.416054},
+ {0.747815, 0.365793},
+ {0.723056, 0.319473},
+ {0.689736, 0.278872},
+ {0.500286, 0.468323},
+ {0.689736, 0.278872},
+ {0.649136, 0.245553},
+ {0.649136, 0.245553},
+ {0.602816, 0.220794},
+ {0.552555, 0.205548},
+ {0.500286, 0.200400},
+ {0.448016, 0.205548},
+ {0.397756, 0.220794},
+ {0.351436, 0.245553},
+ {0.310835, 0.278873},
+ {0.277516, 0.319473},
+ {0.252757, 0.365794},
+ {0.237511, 0.416054},
+ {0.237511, 0.416054},
+ {0.232363, 0.468323},
+ {0.232363, 0.468323},
+ {0.237511, 0.520593},
+ {0.252757, 0.570853},
+ {0.277516, 0.617174},
+ {0.500286, 0.468323},
+ {0.310836, 0.657773},
+ {0.351436, 0.691093},
+ {0.500286, 0.468323},
+ {0.351436, 0.691093},
+ {0.397756, 0.715852},
+ {0.397756, 0.715852},
+ {0.448017, 0.731098},
+ {0.500286, 0.736246},
+ {0.552555, 0.731098},
+ {0.602816, 0.715852},
+ {0.500286, 0.468323},
+ {0.602816, 0.715852},
+ {0.649136, 0.691093},
+ {0.649136, 0.691093},
+ {0.689736, 0.657773},
+ {0.723056, 0.617173},
+ {0.500286, 0.468323},
+ {0.723056, 0.617173},
+ {0.747815, 0.570853},
+ {0.747815, 0.570853},
+ {0.763061, 0.520592},
+ {0.768209, 0.468323},
+ {0.763061, 0.416054},
+ {0.747815, 0.365793},
+ {0.747815, 0.365793},
+ {0.723056, 0.319473},
+ {0.723056, 0.319473},
+ {0.689736, 0.278872},
+ {0.500286, 0.468323},
+ {0.689736, 0.278872},
+ {0.649136, 0.245553},
+ {0.649136, 0.245553},
+ {0.602816, 0.220794},
+ {0.552555, 0.205548},
+ {0.500286, 0.200400},
+ {0.500286, 0.468323},
+ {0.500286, 0.200400},
+ {0.448016, 0.205548},
+ {0.448016, 0.205548},
+ {0.397756, 0.220794},
+ {0.397756, 0.220794},
+ {0.351436, 0.245553},
+ {0.351436, 0.245553},
+ {0.310835, 0.278873},
+ {0.277516, 0.319473},
+ {0.277516, 0.319473},
+ {0.252757, 0.365794},
+ {0.252757, 0.365794},
+ {0.237511, 0.416054},
+ {0.232363, 0.468323},
+ {0.237511, 0.520593},
+ {0.252757, 0.570853},
+ {0.277516, 0.617174},
+ {0.500286, 0.468323},
+ {0.310836, 0.657773},
+ {0.351436, 0.691093},
+ {0.500286, 0.468323},
+ {0.351436, 0.691093},
+ {0.397756, 0.715852},
+ {0.448017, 0.731098},
+ {0.500286, 0.736246},
+ {0.552555, 0.731098},
+ {0.602816, 0.715852},
+ {0.649136, 0.691093},
+ {0.689736, 0.657773},
+ {0.723056, 0.617173},
+ {0.747815, 0.570853},
+ {0.763061, 0.520592},
+ {0.768209, 0.468323},
+ {0.500286, 0.468323},
+ {0.768209, 0.468323},
+ {0.763061, 0.416054},
+ {0.763061, 0.416054},
+ {0.747815, 0.365793},
+ {0.723056, 0.319473},
+ {0.689736, 0.278872},
+ {0.689736, 0.278872},
+ {0.649136, 0.245553},
+ {0.649136, 0.245553},
+ {0.602816, 0.220794},
+ {0.500286, 0.468323},
+ {0.602816, 0.220794},
+ {0.552555, 0.205548},
+ {0.552555, 0.205548},
+ {0.500286, 0.200400},
+ {0.448016, 0.205548},
+ {0.397756, 0.220794},
+ {0.351436, 0.245553},
+ {0.310835, 0.278873},
+ {0.277516, 0.319473},
+ {0.277516, 0.319473},
+ {0.252757, 0.365794},
+ {0.252757, 0.365794},
+ {0.237511, 0.416054},
+ {0.232363, 0.468323},
+ {0.237511, 0.520593},
+ {0.252757, 0.570853},
+ {0.277516, 0.617174},
+ {0.277516, 0.617174},
+ {0.310836, 0.657773},
+ {0.500286, 0.468323},
+ {0.310836, 0.657773},
+ {0.351436, 0.691093},
+ {0.397756, 0.715852},
+ {0.448017, 0.731098},
+ {0.500286, 0.736246},
+ {0.552555, 0.731098},
+ {0.602816, 0.715852},
+ {0.649136, 0.691093},
+ {0.689736, 0.657773},
+ {0.500286, 0.468323},
+ {0.689736, 0.657773},
+ {0.723056, 0.617173},
+ {0.723056, 0.617173},
+ {0.747815, 0.570853},
+ {0.763061, 0.520592},
+ {0.768209, 0.468323},
+ {0.763061, 0.416054},
+ {0.763061, 0.416054},
+ {0.747815, 0.365793},
+ {0.747815, 0.365793},
+ {0.723056, 0.319473},
+ {0.689736, 0.278872},
+ {0.649136, 0.245553},
+ {0.602816, 0.220794},
+ {0.552555, 0.205548},
+ {0.500286, 0.200400},
+ {0.448016, 0.205548},
+ {0.500286, 0.468323},
+ {0.448016, 0.205548},
+ {0.397756, 0.220794},
+ {0.397756, 0.220794},
+ {0.351436, 0.245553},
+ {0.310835, 0.278873},
+ {0.277516, 0.319473},
+ {0.252757, 0.365794},
+ {0.252757, 0.365794},
+ {0.237511, 0.416054},
+ {0.237511, 0.416054},
+ {0.232363, 0.468323},
+ {0.237511, 0.520593},
+ {0.252757, 0.570853},
+ {0.277516, 0.617174},
+ {0.500286, 0.468323},
+ {0.310836, 0.657773},
+ {0.351436, 0.691093},
+ {0.397756, 0.715852},
+ {0.448017, 0.731098},
+ {0.500286, 0.736246},
+ {0.552555, 0.731098},
+ {0.602816, 0.715852},
+ {0.649136, 0.691093},
+ {0.689736, 0.657773},
+ {0.723056, 0.617173},
+ {0.747815, 0.570853},
+ {0.500286, 0.468323},
+ {0.747815, 0.570853},
+ {0.763061, 0.520592},
+ {0.763061, 0.520592},
+ {0.768209, 0.468323},
+ {0.763061, 0.416054},
+ {0.747815, 0.365793},
+ {0.723056, 0.319473},
+ {0.689736, 0.278872},
+ {0.500286, 0.468323},
+ {0.689736, 0.278872},
+ {0.649136, 0.245553},
+ {0.649136, 0.245553},
+ {0.602816, 0.220794},
+ {0.500286, 0.468323},
+ {0.602816, 0.220794},
+ {0.552555, 0.205548},
+ {0.552555, 0.205548},
+ {0.500286, 0.200400},
+ {0.448016, 0.205548},
+ {0.397756, 0.220794},
+ {0.351436, 0.245553},
+ {0.310835, 0.278873},
+ {0.277516, 0.319473},
+ {0.252757, 0.365794},
+ {0.237511, 0.416054},
+ {0.232363, 0.468323},
+ {0.237511, 0.520593},
+ {0.252757, 0.570853},
+ {0.277516, 0.617174},
+ {0.277516, 0.617174},
+ {0.310836, 0.657773},
+ {0.500286, 0.468323},
+ {0.500286, 0.468323},
+ {0.310836, 0.657773},
+ {0.351436, 0.691093},
+ {0.500286, 0.468323},
+ {0.351436, 0.691093},
+ {0.397756, 0.715852},
+ {0.500286, 0.468323},
+ {0.397756, 0.715852},
+ {0.448017, 0.731098},
+ {0.448017, 0.731098},
+ {0.500286, 0.736246},
+ {0.552555, 0.731098},
+ {0.602816, 0.715852},
+ {0.602816, 0.715852},
+ {0.649136, 0.691093},
+ {0.649136, 0.691093},
+ {0.689736, 0.657773},
+ {0.723056, 0.617173},
+ {0.747815, 0.570853},
+ {0.763061, 0.520592},
+ {0.768209, 0.468323},
+ {0.763061, 0.416054},
+ {0.747815, 0.365793},
+ {0.723056, 0.319473},
+ {0.689736, 0.278872},
+ {0.649136, 0.245553},
+ {0.602816, 0.220794},
+ {0.552555, 0.205548},
+ {0.500286, 0.200400},
+ {0.448016, 0.205548},
+ {0.397756, 0.220794},
+ {0.351436, 0.245553},
+ {0.310835, 0.278873},
+ {0.277516, 0.319473},
+ {0.252757, 0.365794},
+ {0.500286, 0.468323},
+ {0.252757, 0.365794},
+ {0.237511, 0.416054},
+ {0.237511, 0.416054},
+ {0.232363, 0.468323},
+ {0.232363, 0.468323},
+ {0.237511, 0.520593},
+ {0.237511, 0.520593},
+ {0.252757, 0.570853},
+ {0.277516, 0.617174},
+ {0.996051, 0.008576},
+ {0.886800, 0.008576},
+ {0.942167, 0.058501},
+ {0.996051, 0.043712},
+ {0.856389, 0.088293},
+ {0.830643, 0.008576},
+ {0.719298, 0.087333},
+ {0.718479, 0.006047},
+ {0.636268, 0.019863},
+ {0.636677, 0.146778},
+ {0.938350, 0.226756},
+ {0.856276, 0.226244},
+ {0.798525, 0.303435},
+ {0.924465, 0.303435},
+ {0.781834, 0.114187},
+ {0.817993, 0.101628},
+ {0.805506, 0.008576},
+ {0.781834, 0.008576},
+ {0.791360, 0.098863},
+ {0.830004, 0.085330},
+ {0.804092, 0.004434},
+ {0.778793, 0.004434},
+ {0.754967, 0.111608},
+ {0.791360, 0.098863},
+ {0.778793, 0.004434},
+ {0.754967, 0.004434},
+ {0.939769, 0.225396},
+ {0.855264, 0.225595},
+ {0.796965, 0.303229},
+ {0.924753, 0.303638},
+ {0.718882, 0.087133},
+ {0.716834, 0.006167},
+ {0.636874, 0.017776},
+ {0.637386, 0.145931},
+ {0.916338, 0.055098},
+ {0.860613, 0.004434},
+ {0.970570, 0.004435},
+ {0.970570, 0.111608},
+ {0.996051, 0.221931},
+ {0.996051, 0.161595},
+ {0.917806, 0.130410},
+ {0.886800, 0.221931},
+ {0.858947, 0.129597},
+ {0.862204, 0.182166},
+ {0.841271, 0.157752},
+ {0.828235, 0.126323},
+ {0.797332, 0.124416},
+ {0.815886, 0.138723},
+ {0.996051, 0.161595},
+ {0.996051, 0.100296},
+ {0.930474, 0.093017},
+ {0.917806, 0.130410},
+ {0.996051, 0.100296},
+ {0.930474, 0.093017},
+ {0.857617, 0.108119},
+ {0.858947, 0.129597},
+ {0.857617, 0.108119},
+ {0.828235, 0.126323},
+ {0.822909, 0.113482},
+ {0.789273, 0.119097},
+ {0.797332, 0.124416},
+ {0.817993, 0.101628},
+ {0.781834, 0.114187},
+ {0.858947, 0.129597},
+ {0.857617, 0.108119},
+ {0.822909, 0.113482},
+ {0.241629, 0.067519},
+ {0.294333, 0.045315},
+ {0.307658, 0.040137},
+ {0.242284, 0.016503},
+ {0.956521, 0.501487},
+ {0.978662, 0.501149},
+ {0.978662, 0.483300},
+ {0.956521, 0.455618},
+ {0.978662, 0.483300},
+ {0.978662, 0.464347},
+ {0.956521, 0.409018},
+ {0.956521, 0.455618},
+ {0.956521, 0.366002},
+ {0.978662, 0.422006},
+ {0.956521, 0.339292},
+ {0.978662, 0.339634},
+ {0.018956, 0.014253},
+ {0.018955, 0.123821},
+ {0.069439, 0.068294},
+ {0.125748, 0.014253},
+ {0.099564, 0.154320},
+ {0.018955, 0.180141},
+ {0.104228, 0.290028},
+ {0.018797, 0.289700},
+ {0.032904, 0.370091},
+ {0.159298, 0.369436},
+ {0.240086, 0.070453},
+ {0.240086, 0.153548},
+ {0.309215, 0.210209},
+ {0.309624, 0.083220},
+ {0.125748, 0.229091},
+ {0.113049, 0.192828},
+ {0.018955, 0.205350},
+ {0.018955, 0.229091},
+ {0.113049, 0.192828},
+ {0.018955, 0.205350},
+ {0.133333, 0.101873},
+ {0.110914, 0.121323},
+ {0.137931, 0.129778},
+ {0.242063, 0.016631},
+ {0.241111, 0.067202},
+ {0.307049, 0.041819},
+ {0.296046, 0.036292},
+ {0.234698, 0.014253},
+ {0.200923, 0.014253},
+ {0.183468, 0.106607},
+ {0.234698, 0.123821},
+ {0.165061, 0.150296},
+ {0.194487, 0.148488},
+ {0.169801, 0.169482},
+ {0.152207, 0.176719},
+ {0.141968, 0.204718},
+ {0.149255, 0.193767},
+ {0.152207, 0.176719},
+ {0.169801, 0.169482},
+ {0.348661, 0.029101},
+ {0.368494, 0.029101},
+ {0.377266, 0.005765},
+ {0.349051, 0.005765},
+ {0.164839, 0.014253},
+ {0.128734, 0.088217},
+ {0.133623, 0.152228},
+ {0.152207, 0.176719},
+ {0.133411, 0.184451},
+ {0.134182, 0.216417},
+ {0.141968, 0.204718},
+ {0.133411, 0.184451},
+ {0.113049, 0.192828},
+ {0.125748, 0.229091},
+ {0.134182, 0.216417},
+ {0.133411, 0.184451},
+ {0.389553, 0.029101},
+ {0.407410, 0.005765},
+ {0.377266, 0.005765},
+ {0.368494, 0.029101},
+ {0.436602, 0.029101},
+ {0.440066, 0.005765},
+ {0.407410, 0.005765},
+ {0.389553, 0.029101},
+ {0.528132, 0.029101},
+ {0.529278, 0.005765},
+ {0.363979, 0.011335},
+ {0.361948, 0.066519},
+ {0.513370, 0.066519},
+ {0.511567, 0.011335},
+ {0.835857, 0.180592},
+ {0.834452, 0.157729},
+ {0.809166, 0.142148},
+ {0.814789, 0.155817},
+ {0.781909, 0.129537},
+ {0.790417, 0.135199},
+ {0.860613, 0.220946},
+ {0.873987, 0.181142},
+ {0.970570, 0.220946},
+ {0.970570, 0.194705},
+ {0.832807, 0.130942},
+ {0.802578, 0.126133},
+ {0.771940, 0.122903},
+ {0.802578, 0.126133},
+ {0.791360, 0.098863},
+ {0.754967, 0.111608},
+ {0.771940, 0.122903},
+ {0.889656, 0.134506},
+ {0.970570, 0.163959},
+ {0.436384, 0.061112},
+ {0.444181, 0.005758},
+ {0.401709, 0.005758},
+ {0.401436, 0.061112},
+ {0.365461, 0.005758},
+ {0.368524, 0.061112},
+ {0.401436, 0.061112},
+ {0.401709, 0.005758},
+ {0.514459, 0.061112},
+ {0.516497, 0.005758},
+ {0.310293, 0.041072},
+ {0.240920, 0.016025},
+ {0.240264, 0.066441},
+ {0.292705, 0.047655},
+ {0.996051, 0.008576},
+ {0.886800, 0.008576},
+ {0.942167, 0.058501},
+ {0.996051, 0.043712},
+ {0.856389, 0.088293},
+ {0.830643, 0.008576},
+ {0.719298, 0.087333},
+ {0.718479, 0.006047},
+ {0.636268, 0.019863},
+ {0.636677, 0.146778},
+ {0.938350, 0.226756},
+ {0.856276, 0.226244},
+ {0.798525, 0.303435},
+ {0.924465, 0.303435},
+ {0.781834, 0.114187},
+ {0.817993, 0.101628},
+ {0.805506, 0.008576},
+ {0.781834, 0.008576},
+ {0.791360, 0.098863},
+ {0.830004, 0.085330},
+ {0.804092, 0.004434},
+ {0.778793, 0.004434},
+ {0.754967, 0.111608},
+ {0.754967, 0.004434},
+ {0.939769, 0.225396},
+ {0.855264, 0.225595},
+ {0.796965, 0.303229},
+ {0.924753, 0.303638},
+ {0.718882, 0.087133},
+ {0.716834, 0.006167},
+ {0.636874, 0.017776},
+ {0.637386, 0.145931},
+ {0.916338, 0.055098},
+ {0.860613, 0.004434},
+ {0.970570, 0.004435},
+ {0.970570, 0.111608},
+ {0.996051, 0.221931},
+ {0.996051, 0.161595},
+ {0.917806, 0.130410},
+ {0.886800, 0.221931},
+ {0.858947, 0.129597},
+ {0.862204, 0.182166},
+ {0.841271, 0.157752},
+ {0.828235, 0.126323},
+ {0.797332, 0.124416},
+ {0.815886, 0.138723},
+ {0.996051, 0.100296},
+ {0.930474, 0.093017},
+ {0.857617, 0.108119},
+ {0.822909, 0.113482},
+ {0.789273, 0.119097},
+ {0.241629, 0.067519},
+ {0.294333, 0.045315},
+ {0.307658, 0.040137},
+ {0.242284, 0.016503},
+ {0.956521, 0.501487},
+ {0.978662, 0.501149},
+ {0.978662, 0.483300},
+ {0.956521, 0.455618},
+ {0.978662, 0.464347},
+ {0.956521, 0.409018},
+ {0.956521, 0.366002},
+ {0.956521, 0.409018},
+ {0.978662, 0.464347},
+ {0.978662, 0.422006},
+ {0.956521, 0.339292},
+ {0.978662, 0.339634},
+ {0.018956, 0.014253},
+ {0.018955, 0.123821},
+ {0.069439, 0.068294},
+ {0.125748, 0.014253},
+ {0.099564, 0.154320},
+ {0.018955, 0.180141},
+ {0.104228, 0.290028},
+ {0.018797, 0.289700},
+ {0.032904, 0.370091},
+ {0.159298, 0.369436},
+ {0.240086, 0.070453},
+ {0.240086, 0.153548},
+ {0.309215, 0.210209},
+ {0.309624, 0.083220},
+ {0.125748, 0.229091},
+ {0.113049, 0.192828},
+ {0.018955, 0.205350},
+ {0.018955, 0.229091},
+ {0.113049, 0.192828},
+ {0.018955, 0.205350},
+ {0.133333, 0.101873},
+ {0.110914, 0.121323},
+ {0.137931, 0.129778},
+ {0.242063, 0.016631},
+ {0.241111, 0.067202},
+ {0.307049, 0.041819},
+ {0.296046, 0.036292},
+ {0.234698, 0.014253},
+ {0.200923, 0.014253},
+ {0.183468, 0.106607},
+ {0.234698, 0.123821},
+ {0.165061, 0.150296},
+ {0.194487, 0.148488},
+ {0.169801, 0.169482},
+ {0.152207, 0.176719},
+ {0.141968, 0.204718},
+ {0.149255, 0.193767},
+ {0.152207, 0.176719},
+ {0.169801, 0.169482},
+ {0.348661, 0.029101},
+ {0.368494, 0.029101},
+ {0.377266, 0.005765},
+ {0.349051, 0.005765},
+ {0.164839, 0.014253},
+ {0.128734, 0.088217},
+ {0.133623, 0.152228},
+ {0.152207, 0.176719},
+ {0.133411, 0.184451},
+ {0.134182, 0.216417},
+ {0.141968, 0.204718},
+ {0.113049, 0.192828},
+ {0.125748, 0.229091},
+ {0.133411, 0.184451},
+ {0.389553, 0.029101},
+ {0.407410, 0.005765},
+ {0.377266, 0.005765},
+ {0.368494, 0.029101},
+ {0.436602, 0.029101},
+ {0.440066, 0.005765},
+ {0.528132, 0.029101},
+ {0.529278, 0.005765},
+ {0.440066, 0.005765},
+ {0.436602, 0.029101},
+ {0.363979, 0.011335},
+ {0.361948, 0.066519},
+ {0.513370, 0.066519},
+ {0.511567, 0.011335},
+ {0.835857, 0.180592},
+ {0.834452, 0.157729},
+ {0.809166, 0.142148},
+ {0.814789, 0.155817},
+ {0.781909, 0.129537},
+ {0.790417, 0.135199},
+ {0.860613, 0.220946},
+ {0.873987, 0.181142},
+ {0.970570, 0.220946},
+ {0.970570, 0.194705},
+ {0.832807, 0.130942},
+ {0.802578, 0.126133},
+ {0.771940, 0.122903},
+ {0.889656, 0.134506},
+ {0.970570, 0.163959},
+ {0.436384, 0.061112},
+ {0.444181, 0.005758},
+ {0.401709, 0.005758},
+ {0.401436, 0.061112},
+ {0.365461, 0.005758},
+ {0.368524, 0.061112},
+ {0.401436, 0.061112},
+ {0.401709, 0.005758},
+ {0.514459, 0.061112},
+ {0.516497, 0.005758},
+ {0.310293, 0.041072},
+ {0.240920, 0.016025},
+ {0.240264, 0.066441},
+ {0.292705, 0.047655},
+ {0.996051, 0.008576},
+ {0.996051, 0.043712},
+ {0.942167, 0.058501},
+ {0.886800, 0.008576},
+ {0.856389, 0.088293},
+ {0.830643, 0.008576},
+ {0.719298, 0.087333},
+ {0.636677, 0.146778},
+ {0.636268, 0.019863},
+ {0.718479, 0.006047},
+ {0.938350, 0.226756},
+ {0.924465, 0.303435},
+ {0.798525, 0.303435},
+ {0.856276, 0.226244},
+ {0.781834, 0.114187},
+ {0.781834, 0.008576},
+ {0.805506, 0.008576},
+ {0.817993, 0.101628},
+ {0.791360, 0.098863},
+ {0.778793, 0.004434},
+ {0.804092, 0.004434},
+ {0.830004, 0.085330},
+ {0.754967, 0.111608},
+ {0.754967, 0.004434},
+ {0.939769, 0.225396},
+ {0.924753, 0.303638},
+ {0.796965, 0.303229},
+ {0.855264, 0.225595},
+ {0.718882, 0.087133},
+ {0.637386, 0.145931},
+ {0.636874, 0.017776},
+ {0.716834, 0.006167},
+ {0.860613, 0.004434},
+ {0.916338, 0.055098},
+ {0.970570, 0.004435},
+ {0.970570, 0.111608},
+ {0.996051, 0.221931},
+ {0.886800, 0.221931},
+ {0.917806, 0.130410},
+ {0.996051, 0.161595},
+ {0.862204, 0.182166},
+ {0.858947, 0.129597},
+ {0.841271, 0.157752},
+ {0.815886, 0.138723},
+ {0.797332, 0.124416},
+ {0.828235, 0.126323},
+ {0.996051, 0.161595},
+ {0.917806, 0.130410},
+ {0.930474, 0.093017},
+ {0.996051, 0.100296},
+ {0.996051, 0.100296},
+ {0.930474, 0.093017},
+ {0.858947, 0.129597},
+ {0.857617, 0.108119},
+ {0.857617, 0.108119},
+ {0.828235, 0.126323},
+ {0.797332, 0.124416},
+ {0.789273, 0.119097},
+ {0.822909, 0.113482},
+ {0.781834, 0.114187},
+ {0.817993, 0.101628},
+ {0.858947, 0.129597},
+ {0.857617, 0.108119},
+ {0.822909, 0.113482},
+ {0.241629, 0.067519},
+ {0.242284, 0.016503},
+ {0.307658, 0.040137},
+ {0.294333, 0.045315},
+ {0.956521, 0.501487},
+ {0.956521, 0.455618},
+ {0.978662, 0.483300},
+ {0.978662, 0.501149},
+ {0.956521, 0.409018},
+ {0.978662, 0.464347},
+ {0.956521, 0.366002},
+ {0.978662, 0.422006},
+ {0.956521, 0.339292},
+ {0.978662, 0.339634},
+ {0.978662, 0.422006},
+ {0.956521, 0.366002},
+ {0.018956, 0.014253},
+ {0.125748, 0.014253},
+ {0.069439, 0.068294},
+ {0.018955, 0.123821},
+ {0.099564, 0.154320},
+ {0.018955, 0.180141},
+ {0.104228, 0.290028},
+ {0.159298, 0.369436},
+ {0.032904, 0.370091},
+ {0.018797, 0.289700},
+ {0.240086, 0.070453},
+ {0.309624, 0.083220},
+ {0.309215, 0.210209},
+ {0.240086, 0.153548},
+ {0.125748, 0.229091},
+ {0.018955, 0.229091},
+ {0.018955, 0.205350},
+ {0.113049, 0.192828},
+ {0.133333, 0.101873},
+ {0.137931, 0.129778},
+ {0.110914, 0.121323},
+ {0.242063, 0.016631},
+ {0.296046, 0.036292},
+ {0.307049, 0.041819},
+ {0.241111, 0.067202},
+ {0.234698, 0.014253},
+ {0.234698, 0.123821},
+ {0.183468, 0.106607},
+ {0.200923, 0.014253},
+ {0.194487, 0.148488},
+ {0.165061, 0.150296},
+ {0.169801, 0.169482},
+ {0.149255, 0.193767},
+ {0.141968, 0.204718},
+ {0.152207, 0.176719},
+ {0.348661, 0.029101},
+ {0.349051, 0.005765},
+ {0.377266, 0.005765},
+ {0.368494, 0.029101},
+ {0.128734, 0.088217},
+ {0.164839, 0.014253},
+ {0.133623, 0.152228},
+ {0.134182, 0.216417},
+ {0.133411, 0.184451},
+ {0.389553, 0.029101},
+ {0.407410, 0.005765},
+ {0.436602, 0.029101},
+ {0.389553, 0.029101},
+ {0.407410, 0.005765},
+ {0.440066, 0.005765},
+ {0.528132, 0.029101},
+ {0.436602, 0.029101},
+ {0.440066, 0.005765},
+ {0.529278, 0.005765},
+ {0.363979, 0.011335},
+ {0.511567, 0.011335},
+ {0.513370, 0.066519},
+ {0.361948, 0.066519},
+ {0.835857, 0.180592},
+ {0.814789, 0.155817},
+ {0.809166, 0.142148},
+ {0.834452, 0.157729},
+ {0.790417, 0.135199},
+ {0.781909, 0.129537},
+ {0.860613, 0.220946},
+ {0.873987, 0.181142},
+ {0.970570, 0.220946},
+ {0.970570, 0.194705},
+ {0.802578, 0.126133},
+ {0.832807, 0.130942},
+ {0.771940, 0.122903},
+ {0.889656, 0.134506},
+ {0.970570, 0.163959},
+ {0.436384, 0.061112},
+ {0.401436, 0.061112},
+ {0.401709, 0.005758},
+ {0.444181, 0.005758},
+ {0.365461, 0.005758},
+ {0.368524, 0.061112},
+ {0.514459, 0.061112},
+ {0.516497, 0.005758},
+ {0.310293, 0.041072},
+ {0.292705, 0.047655},
+ {0.240264, 0.066441},
+ {0.240920, 0.016025},
+ {0.996051, 0.008576},
+ {0.996051, 0.043712},
+ {0.942167, 0.058501},
+ {0.886800, 0.008576},
+ {0.856389, 0.088293},
+ {0.830643, 0.008576},
+ {0.719298, 0.087333},
+ {0.636677, 0.146778},
+ {0.636268, 0.019863},
+ {0.718479, 0.006047},
+ {0.938350, 0.226756},
+ {0.924465, 0.303435},
+ {0.798525, 0.303435},
+ {0.856276, 0.226244},
+ {0.781834, 0.114187},
+ {0.781834, 0.008576},
+ {0.805506, 0.008576},
+ {0.817993, 0.101628},
+ {0.791360, 0.098863},
+ {0.778793, 0.004434},
+ {0.804092, 0.004434},
+ {0.830004, 0.085330},
+ {0.754967, 0.111608},
+ {0.754967, 0.004434},
+ {0.939769, 0.225396},
+ {0.924753, 0.303638},
+ {0.796965, 0.303229},
+ {0.855264, 0.225595},
+ {0.718882, 0.087133},
+ {0.637386, 0.145931},
+ {0.636874, 0.017776},
+ {0.716834, 0.006167},
+ {0.860613, 0.004434},
+ {0.916338, 0.055098},
+ {0.970570, 0.004435},
+ {0.970570, 0.111608},
+ {0.996051, 0.221931},
+ {0.886800, 0.221931},
+ {0.917806, 0.130410},
+ {0.996051, 0.161595},
+ {0.862204, 0.182166},
+ {0.858947, 0.129597},
+ {0.841271, 0.157752},
+ {0.815886, 0.138723},
+ {0.797332, 0.124416},
+ {0.828235, 0.126323},
+ {0.930474, 0.093017},
+ {0.996051, 0.100296},
+ {0.857617, 0.108119},
+ {0.789273, 0.119097},
+ {0.822909, 0.113482},
+ {0.241629, 0.067519},
+ {0.242284, 0.016503},
+ {0.307658, 0.040137},
+ {0.294333, 0.045315},
+ {0.956521, 0.501487},
+ {0.956521, 0.455618},
+ {0.978662, 0.483300},
+ {0.978662, 0.501149},
+ {0.956521, 0.409018},
+ {0.978662, 0.464347},
+ {0.956521, 0.366002},
+ {0.978662, 0.422006},
+ {0.956521, 0.339292},
+ {0.978662, 0.339634},
+ {0.978662, 0.422006},
+ {0.956521, 0.366002},
+ {0.018956, 0.014253},
+ {0.125748, 0.014253},
+ {0.069439, 0.068294},
+ {0.018955, 0.123821},
+ {0.099564, 0.154320},
+ {0.018955, 0.180141},
+ {0.104228, 0.290028},
+ {0.159298, 0.369436},
+ {0.032904, 0.370091},
+ {0.018797, 0.289700},
+ {0.240086, 0.070453},
+ {0.309624, 0.083220},
+ {0.309215, 0.210209},
+ {0.240086, 0.153548},
+ {0.125748, 0.229091},
+ {0.018955, 0.229091},
+ {0.018955, 0.205350},
+ {0.113049, 0.192828},
+ {0.113049, 0.192828},
+ {0.018955, 0.205350},
+ {0.133333, 0.101873},
+ {0.137931, 0.129778},
+ {0.110914, 0.121323},
+ {0.242063, 0.016631},
+ {0.296046, 0.036292},
+ {0.307049, 0.041819},
+ {0.241111, 0.067202},
+ {0.234698, 0.014253},
+ {0.234698, 0.123821},
+ {0.183468, 0.106607},
+ {0.200923, 0.014253},
+ {0.194487, 0.148488},
+ {0.165061, 0.150296},
+ {0.169801, 0.169482},
+ {0.149255, 0.193767},
+ {0.141968, 0.204718},
+ {0.152207, 0.176719},
+ {0.169801, 0.169482},
+ {0.152207, 0.176719},
+ {0.348661, 0.029101},
+ {0.349051, 0.005765},
+ {0.377266, 0.005765},
+ {0.368494, 0.029101},
+ {0.128734, 0.088217},
+ {0.164839, 0.014253},
+ {0.133623, 0.152228},
+ {0.152207, 0.176719},
+ {0.141968, 0.204718},
+ {0.134182, 0.216417},
+ {0.133411, 0.184451},
+ {0.125748, 0.229091},
+ {0.113049, 0.192828},
+ {0.133411, 0.184451},
+ {0.389553, 0.029101},
+ {0.368494, 0.029101},
+ {0.377266, 0.005765},
+ {0.407410, 0.005765},
+ {0.436602, 0.029101},
+ {0.389553, 0.029101},
+ {0.407410, 0.005765},
+ {0.440066, 0.005765},
+ {0.528132, 0.029101},
+ {0.436602, 0.029101},
+ {0.440066, 0.005765},
+ {0.529278, 0.005765},
+ {0.363979, 0.011335},
+ {0.511567, 0.011335},
+ {0.513370, 0.066519},
+ {0.361948, 0.066519},
+ {0.835857, 0.180592},
+ {0.814789, 0.155817},
+ {0.809166, 0.142148},
+ {0.834452, 0.157729},
+ {0.790417, 0.135199},
+ {0.781909, 0.129537},
+ {0.860613, 0.220946},
+ {0.873987, 0.181142},
+ {0.970570, 0.220946},
+ {0.970570, 0.194705},
+ {0.802578, 0.126133},
+ {0.832807, 0.130942},
+ {0.771940, 0.122903},
+ {0.889656, 0.134506},
+ {0.970570, 0.163959},
+ {0.436384, 0.061112},
+ {0.401436, 0.061112},
+ {0.401709, 0.005758},
+ {0.444181, 0.005758},
+ {0.365461, 0.005758},
+ {0.401709, 0.005758},
+ {0.401436, 0.061112},
+ {0.368524, 0.061112},
+ {0.514459, 0.061112},
+ {0.516497, 0.005758},
+ {0.310293, 0.041072},
+ {0.292705, 0.047655},
+ {0.240264, 0.066441},
+ {0.240920, 0.016025},
+ {0.996051, 0.008576},
+ {0.886800, 0.008576},
+ {0.942167, 0.058501},
+ {0.996051, 0.043712},
+ {0.856389, 0.088293},
+ {0.830643, 0.008576},
+ {0.719298, 0.087333},
+ {0.718479, 0.006047},
+ {0.636268, 0.019863},
+ {0.636677, 0.146778},
+ {0.938350, 0.226756},
+ {0.856276, 0.226244},
+ {0.798525, 0.303435},
+ {0.924465, 0.303435},
+ {0.781834, 0.114187},
+ {0.817993, 0.101628},
+ {0.805506, 0.008576},
+ {0.781834, 0.008576},
+ {0.791360, 0.098863},
+ {0.830004, 0.085330},
+ {0.804092, 0.004434},
+ {0.778793, 0.004434},
+ {0.754967, 0.111608},
+ {0.791360, 0.098863},
+ {0.778793, 0.004434},
+ {0.754967, 0.004434},
+ {0.939769, 0.225396},
+ {0.855264, 0.225595},
+ {0.796965, 0.303229},
+ {0.924753, 0.303638},
+ {0.718882, 0.087133},
+ {0.716834, 0.006167},
+ {0.636874, 0.017776},
+ {0.637386, 0.145931},
+ {0.830004, 0.085330},
+ {0.916338, 0.055098},
+ {0.860613, 0.004434},
+ {0.804092, 0.004434},
+ {0.970570, 0.004435},
+ {0.970570, 0.111608},
+ {0.996051, 0.221931},
+ {0.996051, 0.161595},
+ {0.917806, 0.130410},
+ {0.886800, 0.221931},
+ {0.858947, 0.129597},
+ {0.862204, 0.182166},
+ {0.841271, 0.157752},
+ {0.828235, 0.126323},
+ {0.797332, 0.124416},
+ {0.815886, 0.138723},
+ {0.996051, 0.161595},
+ {0.996051, 0.100296},
+ {0.930474, 0.093017},
+ {0.917806, 0.130410},
+ {0.996051, 0.100296},
+ {0.930474, 0.093017},
+ {0.857617, 0.108119},
+ {0.858947, 0.129597},
+ {0.857617, 0.108119},
+ {0.828235, 0.126323},
+ {0.822909, 0.113482},
+ {0.789273, 0.119097},
+ {0.797332, 0.124416},
+ {0.817993, 0.101628},
+ {0.781834, 0.114187},
+ {0.858947, 0.129597},
+ {0.857617, 0.108119},
+ {0.822909, 0.113482},
+ {0.241629, 0.067519},
+ {0.294333, 0.045315},
+ {0.307658, 0.040137},
+ {0.242284, 0.016503},
+ {0.956521, 0.501487},
+ {0.978662, 0.501149},
+ {0.978662, 0.483300},
+ {0.956521, 0.455618},
+ {0.978662, 0.483300},
+ {0.978662, 0.464347},
+ {0.956521, 0.409018},
+ {0.956521, 0.455618},
+ {0.956521, 0.366002},
+ {0.956521, 0.409018},
+ {0.978662, 0.464347},
+ {0.978662, 0.422006},
+ {0.956521, 0.339292},
+ {0.978662, 0.339634},
+ {0.018956, 0.014253},
+ {0.018955, 0.123821},
+ {0.069439, 0.068294},
+ {0.125748, 0.014253},
+ {0.099564, 0.154320},
+ {0.018955, 0.180141},
+ {0.104228, 0.290028},
+ {0.018797, 0.289700},
+ {0.032904, 0.370091},
+ {0.159298, 0.369436},
+ {0.240086, 0.070453},
+ {0.240086, 0.153548},
+ {0.309215, 0.210209},
+ {0.309624, 0.083220},
+ {0.125748, 0.229091},
+ {0.113049, 0.192828},
+ {0.018955, 0.205350},
+ {0.018955, 0.229091},
+ {0.113049, 0.192828},
+ {0.018955, 0.205350},
+ {0.133333, 0.101873},
+ {0.110914, 0.121323},
+ {0.137931, 0.129778},
+ {0.242063, 0.016631},
+ {0.241111, 0.067202},
+ {0.307049, 0.041819},
+ {0.296046, 0.036292},
+ {0.234698, 0.014253},
+ {0.200923, 0.014253},
+ {0.183468, 0.106607},
+ {0.234698, 0.123821},
+ {0.165061, 0.150296},
+ {0.194487, 0.148488},
+ {0.169801, 0.169482},
+ {0.152207, 0.176719},
+ {0.141968, 0.204718},
+ {0.149255, 0.193767},
+ {0.152207, 0.176719},
+ {0.169801, 0.169482},
+ {0.348661, 0.029101},
+ {0.368494, 0.029101},
+ {0.377266, 0.005765},
+ {0.349051, 0.005765},
+ {0.164839, 0.014253},
+ {0.128734, 0.088217},
+ {0.133623, 0.152228},
+ {0.152207, 0.176719},
+ {0.133411, 0.184451},
+ {0.134182, 0.216417},
+ {0.141968, 0.204718},
+ {0.133411, 0.184451},
+ {0.113049, 0.192828},
+ {0.125748, 0.229091},
+ {0.134182, 0.216417},
+ {0.133411, 0.184451},
+ {0.389553, 0.029101},
+ {0.407410, 0.005765},
+ {0.436602, 0.029101},
+ {0.440066, 0.005765},
+ {0.528132, 0.029101},
+ {0.529278, 0.005765},
+ {0.363979, 0.011335},
+ {0.361948, 0.066519},
+ {0.513370, 0.066519},
+ {0.511567, 0.011335},
+ {0.835857, 0.180592},
+ {0.834452, 0.157729},
+ {0.809166, 0.142148},
+ {0.814789, 0.155817},
+ {0.814789, 0.155817},
+ {0.809166, 0.142148},
+ {0.781909, 0.129537},
+ {0.790417, 0.135199},
+ {0.860613, 0.220946},
+ {0.873987, 0.181142},
+ {0.970570, 0.220946},
+ {0.970570, 0.194705},
+ {0.834452, 0.157729},
+ {0.832807, 0.130942},
+ {0.802578, 0.126133},
+ {0.809166, 0.142148},
+ {0.832807, 0.130942},
+ {0.830004, 0.085330},
+ {0.791360, 0.098863},
+ {0.802578, 0.126133},
+ {0.809166, 0.142148},
+ {0.802578, 0.126133},
+ {0.771940, 0.122903},
+ {0.781909, 0.129537},
+ {0.802578, 0.126133},
+ {0.791360, 0.098863},
+ {0.754967, 0.111608},
+ {0.771940, 0.122903},
+ {0.889656, 0.134506},
+ {0.832807, 0.130942},
+ {0.970570, 0.163959},
+ {0.436384, 0.061112},
+ {0.444181, 0.005758},
+ {0.401709, 0.005758},
+ {0.401436, 0.061112},
+ {0.365461, 0.005758},
+ {0.368524, 0.061112},
+ {0.401436, 0.061112},
+ {0.401709, 0.005758},
+ {0.514459, 0.061112},
+ {0.516497, 0.005758},
+ {0.310293, 0.041072},
+ {0.240920, 0.016025},
+ {0.240264, 0.066441},
+ {0.292705, 0.047655},
+ {0.996051, 0.008576},
+ {0.886800, 0.008576},
+ {0.942167, 0.058501},
+ {0.996051, 0.043712},
+ {0.856389, 0.088293},
+ {0.830643, 0.008576},
+ {0.719298, 0.087333},
+ {0.718479, 0.006047},
+ {0.636268, 0.019863},
+ {0.636677, 0.146778},
+ {0.938350, 0.226756},
+ {0.856276, 0.226244},
+ {0.798525, 0.303435},
+ {0.924465, 0.303435},
+ {0.781834, 0.114187},
+ {0.817993, 0.101628},
+ {0.805506, 0.008576},
+ {0.781834, 0.008576},
+ {0.791360, 0.098863},
+ {0.830004, 0.085330},
+ {0.804092, 0.004434},
+ {0.778793, 0.004434},
+ {0.754967, 0.111608},
+ {0.754967, 0.004434},
+ {0.939769, 0.225396},
+ {0.855264, 0.225595},
+ {0.796965, 0.303229},
+ {0.924753, 0.303638},
+ {0.718882, 0.087133},
+ {0.716834, 0.006167},
+ {0.636874, 0.017776},
+ {0.637386, 0.145931},
+ {0.916338, 0.055098},
+ {0.860613, 0.004434},
+ {0.970570, 0.004435},
+ {0.970570, 0.111608},
+ {0.996051, 0.221931},
+ {0.996051, 0.161595},
+ {0.917806, 0.130410},
+ {0.886800, 0.221931},
+ {0.858947, 0.129597},
+ {0.862204, 0.182166},
+ {0.841271, 0.157752},
+ {0.828235, 0.126323},
+ {0.797332, 0.124416},
+ {0.815886, 0.138723},
+ {0.996051, 0.100296},
+ {0.930474, 0.093017},
+ {0.857617, 0.108119},
+ {0.822909, 0.113482},
+ {0.789273, 0.119097},
+ {0.241629, 0.067519},
+ {0.294333, 0.045315},
+ {0.307658, 0.040137},
+ {0.242284, 0.016503},
+ {0.956521, 0.501487},
+ {0.978662, 0.501149},
+ {0.978662, 0.483300},
+ {0.956521, 0.455618},
+ {0.978662, 0.464347},
+ {0.956521, 0.409018},
+ {0.956521, 0.366002},
+ {0.978662, 0.422006},
+ {0.956521, 0.339292},
+ {0.956521, 0.366002},
+ {0.978662, 0.422006},
+ {0.978662, 0.339634},
+ {0.018956, 0.014253},
+ {0.018955, 0.123821},
+ {0.069439, 0.068294},
+ {0.125748, 0.014253},
+ {0.099564, 0.154320},
+ {0.018955, 0.180141},
+ {0.104228, 0.290028},
+ {0.018797, 0.289700},
+ {0.032904, 0.370091},
+ {0.159298, 0.369436},
+ {0.240086, 0.070453},
+ {0.240086, 0.153548},
+ {0.309215, 0.210209},
+ {0.309624, 0.083220},
+ {0.125748, 0.229091},
+ {0.113049, 0.192828},
+ {0.018955, 0.205350},
+ {0.018955, 0.229091},
+ {0.113049, 0.192828},
+ {0.018955, 0.205350},
+ {0.133333, 0.101873},
+ {0.110914, 0.121323},
+ {0.137931, 0.129778},
+ {0.242063, 0.016631},
+ {0.241111, 0.067202},
+ {0.307049, 0.041819},
+ {0.296046, 0.036292},
+ {0.234698, 0.014253},
+ {0.200923, 0.014253},
+ {0.183468, 0.106607},
+ {0.234698, 0.123821},
+ {0.165061, 0.150296},
+ {0.194487, 0.148488},
+ {0.169801, 0.169482},
+ {0.152207, 0.176719},
+ {0.141968, 0.204718},
+ {0.149255, 0.193767},
+ {0.152207, 0.176719},
+ {0.169801, 0.169482},
+ {0.348661, 0.029101},
+ {0.368494, 0.029101},
+ {0.377266, 0.005765},
+ {0.349051, 0.005765},
+ {0.164839, 0.014253},
+ {0.128734, 0.088217},
+ {0.133623, 0.152228},
+ {0.152207, 0.176719},
+ {0.133411, 0.184451},
+ {0.134182, 0.216417},
+ {0.141968, 0.204718},
+ {0.113049, 0.192828},
+ {0.125748, 0.229091},
+ {0.133411, 0.184451},
+ {0.389553, 0.029101},
+ {0.407410, 0.005765},
+ {0.436602, 0.029101},
+ {0.440066, 0.005765},
+ {0.528132, 0.029101},
+ {0.529278, 0.005765},
+ {0.363979, 0.011335},
+ {0.361948, 0.066519},
+ {0.513370, 0.066519},
+ {0.511567, 0.011335},
+ {0.835857, 0.180592},
+ {0.834452, 0.157729},
+ {0.809166, 0.142148},
+ {0.814789, 0.155817},
+ {0.814789, 0.155817},
+ {0.809166, 0.142148},
+ {0.781909, 0.129537},
+ {0.790417, 0.135199},
+ {0.860613, 0.220946},
+ {0.873987, 0.181142},
+ {0.834452, 0.157729},
+ {0.835857, 0.180592},
+ {0.970570, 0.220946},
+ {0.970570, 0.194705},
+ {0.873987, 0.181142},
+ {0.860613, 0.220946},
+ {0.834452, 0.157729},
+ {0.832807, 0.130942},
+ {0.802578, 0.126133},
+ {0.771940, 0.122903},
+ {0.873987, 0.181142},
+ {0.889656, 0.134506},
+ {0.832807, 0.130942},
+ {0.834452, 0.157729},
+ {0.889656, 0.134506},
+ {0.970570, 0.194705},
+ {0.970570, 0.163959},
+ {0.889656, 0.134506},
+ {0.873987, 0.181142},
+ {0.970570, 0.163959},
+ {0.436384, 0.061112},
+ {0.444181, 0.005758},
+ {0.401709, 0.005758},
+ {0.401436, 0.061112},
+ {0.365461, 0.005758},
+ {0.368524, 0.061112},
+ {0.401436, 0.061112},
+ {0.401709, 0.005758},
+ {0.514459, 0.061112},
+ {0.516497, 0.005758},
+ {0.444181, 0.005758},
+ {0.436384, 0.061112},
+ {0.310293, 0.041072},
+ {0.240920, 0.016025},
+ {0.240264, 0.066441},
+ {0.292705, 0.047655},
+ {0.996051, 0.008576},
+ {0.996051, 0.043712},
+ {0.942167, 0.058501},
+ {0.886800, 0.008576},
+ {0.856389, 0.088293},
+ {0.830643, 0.008576},
+ {0.719298, 0.087333},
+ {0.636677, 0.146778},
+ {0.636268, 0.019863},
+ {0.718479, 0.006047},
+ {0.938350, 0.226756},
+ {0.924465, 0.303435},
+ {0.798525, 0.303435},
+ {0.856276, 0.226244},
+ {0.781834, 0.114187},
+ {0.781834, 0.008576},
+ {0.805506, 0.008576},
+ {0.817993, 0.101628},
+ {0.791360, 0.098863},
+ {0.778793, 0.004434},
+ {0.804092, 0.004434},
+ {0.830004, 0.085330},
+ {0.754967, 0.111608},
+ {0.754967, 0.004434},
+ {0.778793, 0.004434},
+ {0.791360, 0.098863},
+ {0.939769, 0.225396},
+ {0.924753, 0.303638},
+ {0.796965, 0.303229},
+ {0.855264, 0.225595},
+ {0.718882, 0.087133},
+ {0.637386, 0.145931},
+ {0.636874, 0.017776},
+ {0.716834, 0.006167},
+ {0.830004, 0.085330},
+ {0.804092, 0.004434},
+ {0.860613, 0.004434},
+ {0.916338, 0.055098},
+ {0.970570, 0.004435},
+ {0.970570, 0.111608},
+ {0.996051, 0.221931},
+ {0.886800, 0.221931},
+ {0.917806, 0.130410},
+ {0.996051, 0.161595},
+ {0.862204, 0.182166},
+ {0.858947, 0.129597},
+ {0.841271, 0.157752},
+ {0.815886, 0.138723},
+ {0.797332, 0.124416},
+ {0.828235, 0.126323},
+ {0.996051, 0.161595},
+ {0.917806, 0.130410},
+ {0.930474, 0.093017},
+ {0.996051, 0.100296},
+ {0.996051, 0.100296},
+ {0.930474, 0.093017},
+ {0.858947, 0.129597},
+ {0.857617, 0.108119},
+ {0.857617, 0.108119},
+ {0.828235, 0.126323},
+ {0.797332, 0.124416},
+ {0.789273, 0.119097},
+ {0.822909, 0.113482},
+ {0.781834, 0.114187},
+ {0.817993, 0.101628},
+ {0.858947, 0.129597},
+ {0.857617, 0.108119},
+ {0.822909, 0.113482},
+ {0.241629, 0.067519},
+ {0.242284, 0.016503},
+ {0.307658, 0.040137},
+ {0.294333, 0.045315},
+ {0.956521, 0.501487},
+ {0.956521, 0.455618},
+ {0.978662, 0.483300},
+ {0.978662, 0.501149},
+ {0.978662, 0.483300},
+ {0.956521, 0.455618},
+ {0.956521, 0.409018},
+ {0.978662, 0.464347},
+ {0.956521, 0.366002},
+ {0.978662, 0.422006},
+ {0.978662, 0.464347},
+ {0.956521, 0.409018},
+ {0.956521, 0.339292},
+ {0.978662, 0.339634},
+ {0.018956, 0.014253},
+ {0.125748, 0.014253},
+ {0.069439, 0.068294},
+ {0.018955, 0.123821},
+ {0.099564, 0.154320},
+ {0.018955, 0.180141},
+ {0.104228, 0.290028},
+ {0.159298, 0.369436},
+ {0.032904, 0.370091},
+ {0.018797, 0.289700},
+ {0.240086, 0.070453},
+ {0.309624, 0.083220},
+ {0.309215, 0.210209},
+ {0.240086, 0.153548},
+ {0.125748, 0.229091},
+ {0.018955, 0.229091},
+ {0.018955, 0.205350},
+ {0.113049, 0.192828},
+ {0.133333, 0.101873},
+ {0.137931, 0.129778},
+ {0.110914, 0.121323},
+ {0.242063, 0.016631},
+ {0.296046, 0.036292},
+ {0.307049, 0.041819},
+ {0.241111, 0.067202},
+ {0.234698, 0.014253},
+ {0.234698, 0.123821},
+ {0.183468, 0.106607},
+ {0.200923, 0.014253},
+ {0.194487, 0.148488},
+ {0.165061, 0.150296},
+ {0.169801, 0.169482},
+ {0.149255, 0.193767},
+ {0.141968, 0.204718},
+ {0.152207, 0.176719},
+ {0.348661, 0.029101},
+ {0.349051, 0.005765},
+ {0.377266, 0.005765},
+ {0.368494, 0.029101},
+ {0.128734, 0.088217},
+ {0.164839, 0.014253},
+ {0.133623, 0.152228},
+ {0.134182, 0.216417},
+ {0.133411, 0.184451},
+ {0.389553, 0.029101},
+ {0.368494, 0.029101},
+ {0.377266, 0.005765},
+ {0.407410, 0.005765},
+ {0.436602, 0.029101},
+ {0.440066, 0.005765},
+ {0.528132, 0.029101},
+ {0.529278, 0.005765},
+ {0.363979, 0.011335},
+ {0.511567, 0.011335},
+ {0.513370, 0.066519},
+ {0.361948, 0.066519},
+ {0.835857, 0.180592},
+ {0.814789, 0.155817},
+ {0.809166, 0.142148},
+ {0.834452, 0.157729},
+ {0.814789, 0.155817},
+ {0.790417, 0.135199},
+ {0.781909, 0.129537},
+ {0.809166, 0.142148},
+ {0.860613, 0.220946},
+ {0.873987, 0.181142},
+ {0.970570, 0.220946},
+ {0.970570, 0.194705},
+ {0.834452, 0.157729},
+ {0.809166, 0.142148},
+ {0.802578, 0.126133},
+ {0.832807, 0.130942},
+ {0.832807, 0.130942},
+ {0.802578, 0.126133},
+ {0.791360, 0.098863},
+ {0.830004, 0.085330},
+ {0.809166, 0.142148},
+ {0.781909, 0.129537},
+ {0.771940, 0.122903},
+ {0.802578, 0.126133},
+ {0.802578, 0.126133},
+ {0.771940, 0.122903},
+ {0.832807, 0.130942},
+ {0.889656, 0.134506},
+ {0.970570, 0.163959},
+ {0.436384, 0.061112},
+ {0.401436, 0.061112},
+ {0.401709, 0.005758},
+ {0.444181, 0.005758},
+ {0.365461, 0.005758},
+ {0.368524, 0.061112},
+ {0.514459, 0.061112},
+ {0.516497, 0.005758},
+ {0.310293, 0.041072},
+ {0.292705, 0.047655},
+ {0.240264, 0.066441},
+ {0.240920, 0.016025},
+ {0.996051, 0.008576},
+ {0.996051, 0.043712},
+ {0.942167, 0.058501},
+ {0.886800, 0.008576},
+ {0.856389, 0.088293},
+ {0.830643, 0.008576},
+ {0.719298, 0.087333},
+ {0.636677, 0.146778},
+ {0.636268, 0.019863},
+ {0.718479, 0.006047},
+ {0.938350, 0.226756},
+ {0.924465, 0.303435},
+ {0.798525, 0.303435},
+ {0.856276, 0.226244},
+ {0.781834, 0.114187},
+ {0.781834, 0.008576},
+ {0.805506, 0.008576},
+ {0.817993, 0.101628},
+ {0.791360, 0.098863},
+ {0.778793, 0.004434},
+ {0.804092, 0.004434},
+ {0.830004, 0.085330},
+ {0.754967, 0.111608},
+ {0.754967, 0.004434},
+ {0.939769, 0.225396},
+ {0.924753, 0.303638},
+ {0.796965, 0.303229},
+ {0.855264, 0.225595},
+ {0.718882, 0.087133},
+ {0.637386, 0.145931},
+ {0.636874, 0.017776},
+ {0.716834, 0.006167},
+ {0.860613, 0.004434},
+ {0.916338, 0.055098},
+ {0.970570, 0.004435},
+ {0.970570, 0.111608},
+ {0.996051, 0.221931},
+ {0.886800, 0.221931},
+ {0.917806, 0.130410},
+ {0.996051, 0.161595},
+ {0.862204, 0.182166},
+ {0.858947, 0.129597},
+ {0.841271, 0.157752},
+ {0.815886, 0.138723},
+ {0.797332, 0.124416},
+ {0.828235, 0.126323},
+ {0.930474, 0.093017},
+ {0.996051, 0.100296},
+ {0.857617, 0.108119},
+ {0.789273, 0.119097},
+ {0.822909, 0.113482},
+ {0.241629, 0.067519},
+ {0.242284, 0.016503},
+ {0.307658, 0.040137},
+ {0.294333, 0.045315},
+ {0.956521, 0.501487},
+ {0.956521, 0.455618},
+ {0.978662, 0.483300},
+ {0.978662, 0.501149},
+ {0.956521, 0.409018},
+ {0.978662, 0.464347},
+ {0.956521, 0.366002},
+ {0.978662, 0.422006},
+ {0.978662, 0.464347},
+ {0.956521, 0.409018},
+ {0.956521, 0.339292},
+ {0.978662, 0.339634},
+ {0.018956, 0.014253},
+ {0.125748, 0.014253},
+ {0.069439, 0.068294},
+ {0.018955, 0.123821},
+ {0.099564, 0.154320},
+ {0.018955, 0.180141},
+ {0.104228, 0.290028},
+ {0.159298, 0.369436},
+ {0.032904, 0.370091},
+ {0.018797, 0.289700},
+ {0.240086, 0.070453},
+ {0.309624, 0.083220},
+ {0.309215, 0.210209},
+ {0.240086, 0.153548},
+ {0.125748, 0.229091},
+ {0.018955, 0.229091},
+ {0.018955, 0.205350},
+ {0.113049, 0.192828},
+ {0.113049, 0.192828},
+ {0.018955, 0.205350},
+ {0.133333, 0.101873},
+ {0.137931, 0.129778},
+ {0.110914, 0.121323},
+ {0.242063, 0.016631},
+ {0.296046, 0.036292},
+ {0.307049, 0.041819},
+ {0.241111, 0.067202},
+ {0.234698, 0.014253},
+ {0.234698, 0.123821},
+ {0.183468, 0.106607},
+ {0.200923, 0.014253},
+ {0.194487, 0.148488},
+ {0.165061, 0.150296},
+ {0.169801, 0.169482},
+ {0.149255, 0.193767},
+ {0.141968, 0.204718},
+ {0.152207, 0.176719},
+ {0.169801, 0.169482},
+ {0.152207, 0.176719},
+ {0.348661, 0.029101},
+ {0.349051, 0.005765},
+ {0.377266, 0.005765},
+ {0.368494, 0.029101},
+ {0.128734, 0.088217},
+ {0.164839, 0.014253},
+ {0.133623, 0.152228},
+ {0.152207, 0.176719},
+ {0.141968, 0.204718},
+ {0.134182, 0.216417},
+ {0.133411, 0.184451},
+ {0.125748, 0.229091},
+ {0.113049, 0.192828},
+ {0.133411, 0.184451},
+ {0.389553, 0.029101},
+ {0.368494, 0.029101},
+ {0.377266, 0.005765},
+ {0.407410, 0.005765},
+ {0.436602, 0.029101},
+ {0.440066, 0.005765},
+ {0.528132, 0.029101},
+ {0.436602, 0.029101},
+ {0.440066, 0.005765},
+ {0.529278, 0.005765},
+ {0.363979, 0.011335},
+ {0.511567, 0.011335},
+ {0.513370, 0.066519},
+ {0.361948, 0.066519},
+ {0.835857, 0.180592},
+ {0.814789, 0.155817},
+ {0.809166, 0.142148},
+ {0.834452, 0.157729},
+ {0.814789, 0.155817},
+ {0.790417, 0.135199},
+ {0.781909, 0.129537},
+ {0.809166, 0.142148},
+ {0.860613, 0.220946},
+ {0.835857, 0.180592},
+ {0.834452, 0.157729},
+ {0.873987, 0.181142},
+ {0.970570, 0.220946},
+ {0.860613, 0.220946},
+ {0.873987, 0.181142},
+ {0.970570, 0.194705},
+ {0.834452, 0.157729},
+ {0.802578, 0.126133},
+ {0.832807, 0.130942},
+ {0.771940, 0.122903},
+ {0.873987, 0.181142},
+ {0.834452, 0.157729},
+ {0.832807, 0.130942},
+ {0.889656, 0.134506},
+ {0.889656, 0.134506},
+ {0.970570, 0.194705},
+ {0.873987, 0.181142},
+ {0.889656, 0.134506},
+ {0.970570, 0.163959},
+ {0.970570, 0.163959},
+ {0.436384, 0.061112},
+ {0.401436, 0.061112},
+ {0.401709, 0.005758},
+ {0.444181, 0.005758},
+ {0.365461, 0.005758},
+ {0.401709, 0.005758},
+ {0.401436, 0.061112},
+ {0.368524, 0.061112},
+ {0.514459, 0.061112},
+ {0.436384, 0.061112},
+ {0.444181, 0.005758},
+ {0.516497, 0.005758},
+ {0.310293, 0.041072},
+ {0.292705, 0.047655},
+ {0.240264, 0.066441},
+ {0.240920, 0.016025},
+ {0.024266, 0.557820},
+ {0.024266, 0.576626},
+ {0.094122, 0.576626},
+ {0.115168, 0.557820},
+ {0.024266, 0.405663},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.094122, 0.405663},
+ {0.024266, 0.490970},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.107390, 0.490970},
+ {0.024266, 0.524061},
+ {0.024266, 0.557820},
+ {0.115168, 0.557820},
+ {0.109678, 0.524061},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.024266, 0.490970},
+ {0.107390, 0.490970},
+ {0.121071, 0.457423},
+ {0.121071, 0.516173},
+ {0.133581, 0.526091},
+ {0.133581, 0.447173},
+ {0.134639, 0.520713},
+ {0.134639, 0.464222},
+ {0.122457, 0.452924},
+ {0.122457, 0.530390},
+ {0.163710, 0.306233},
+ {0.142519, 0.309831},
+ {0.146695, 0.326259},
+ {0.181889, 0.323868},
+ {0.225838, 0.170445},
+ {0.233401, 0.189540},
+ {0.256635, 0.197020},
+ {0.242513, 0.164051},
+ {0.225838, 0.170445},
+ {0.242513, 0.164051},
+ {0.256635, 0.197020},
+ {0.233401, 0.189540},
+ {0.163710, 0.306233},
+ {0.181889, 0.323868},
+ {0.146695, 0.326259},
+ {0.142519, 0.309831},
+ {0.132079, 0.519433},
+ {0.119897, 0.529110},
+ {0.119897, 0.451644},
+ {0.132079, 0.462942},
+ {0.121071, 0.457423},
+ {0.133581, 0.447173},
+ {0.133581, 0.526091},
+ {0.121071, 0.516173},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.107390, 0.490970},
+ {0.024266, 0.490970},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.115168, 0.557820},
+ {0.024266, 0.557820},
+ {0.109678, 0.524061},
+ {0.024266, 0.524061},
+ {0.024266, 0.405663},
+ {0.094122, 0.405663},
+ {0.024266, 0.557820},
+ {0.115168, 0.557820},
+ {0.094122, 0.576626},
+ {0.024266, 0.576626},
+ {0.241046, 0.067643},
+ {0.304934, 0.042696},
+ {0.308794, 0.040153},
+ {0.241046, 0.015818},
+ {0.899346, 0.189338},
+ {0.929736, 0.158948},
+ {0.915018, 0.144230},
+ {0.884628, 0.174620},
+ {0.884628, 0.174620},
+ {0.915018, 0.144230},
+ {0.890640, 0.119852},
+ {0.860250, 0.150242},
+ {0.835872, 0.125864},
+ {0.860250, 0.150242},
+ {0.890640, 0.119852},
+ {0.866262, 0.095474},
+ {0.835872, 0.125864},
+ {0.866262, 0.095474},
+ {0.841640, 0.070852},
+ {0.811250, 0.101242},
+ {0.786131, 0.076123},
+ {0.811250, 0.101242},
+ {0.841640, 0.070852},
+ {0.816521, 0.045733},
+ {0.772138, 0.062130},
+ {0.786131, 0.076123},
+ {0.816521, 0.045733},
+ {0.802529, 0.031740},
+ {0.240391, 0.016190},
+ {0.240391, 0.065669},
+ {0.284044, 0.050344},
+ {0.309034, 0.040446},
+ {0.024266, 0.557820},
+ {0.024266, 0.576626},
+ {0.094122, 0.576626},
+ {0.115168, 0.557820},
+ {0.024266, 0.405663},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.094122, 0.405663},
+ {0.024266, 0.490970},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.107390, 0.490970},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.024266, 0.458207},
+ {0.024266, 0.490970},
+ {0.107390, 0.490970},
+ {0.109678, 0.458207},
+ {0.121071, 0.457423},
+ {0.121071, 0.516173},
+ {0.133581, 0.526091},
+ {0.133581, 0.447173},
+ {0.134639, 0.520713},
+ {0.134639, 0.464222},
+ {0.122457, 0.452924},
+ {0.122457, 0.530390},
+ {0.163710, 0.306233},
+ {0.142519, 0.309831},
+ {0.146695, 0.326259},
+ {0.181889, 0.323868},
+ {0.225838, 0.170445},
+ {0.233401, 0.189540},
+ {0.256635, 0.197020},
+ {0.242513, 0.164051},
+ {0.225838, 0.170445},
+ {0.242513, 0.164051},
+ {0.256635, 0.197020},
+ {0.233401, 0.189540},
+ {0.163710, 0.306233},
+ {0.181889, 0.323868},
+ {0.146695, 0.326259},
+ {0.142519, 0.309831},
+ {0.132079, 0.519433},
+ {0.119897, 0.529110},
+ {0.119897, 0.451644},
+ {0.132079, 0.462942},
+ {0.121071, 0.457423},
+ {0.133581, 0.447173},
+ {0.133581, 0.526091},
+ {0.121071, 0.516173},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.107390, 0.490970},
+ {0.024266, 0.490970},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.115168, 0.557820},
+ {0.024266, 0.557820},
+ {0.024266, 0.405663},
+ {0.094122, 0.405663},
+ {0.115168, 0.425443},
+ {0.024266, 0.425443},
+ {0.024266, 0.557820},
+ {0.115168, 0.557820},
+ {0.094122, 0.576626},
+ {0.024266, 0.576626},
+ {0.241046, 0.067643},
+ {0.304934, 0.042696},
+ {0.308794, 0.040153},
+ {0.241046, 0.015818},
+ {0.899346, 0.189338},
+ {0.929736, 0.158948},
+ {0.915018, 0.144230},
+ {0.884628, 0.174620},
+ {0.884628, 0.174620},
+ {0.915018, 0.144230},
+ {0.890640, 0.119852},
+ {0.860250, 0.150242},
+ {0.835872, 0.125864},
+ {0.860250, 0.150242},
+ {0.890640, 0.119852},
+ {0.866262, 0.095474},
+ {0.841640, 0.070852},
+ {0.811250, 0.101242},
+ {0.786131, 0.076123},
+ {0.816521, 0.045733},
+ {0.772138, 0.062130},
+ {0.786131, 0.076123},
+ {0.816521, 0.045733},
+ {0.802529, 0.031740},
+ {0.240391, 0.016190},
+ {0.240391, 0.065669},
+ {0.284044, 0.050344},
+ {0.309034, 0.040446},
+ {0.024266, 0.557820},
+ {0.024266, 0.576626},
+ {0.094122, 0.576626},
+ {0.115168, 0.557820},
+ {0.024266, 0.405663},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.094122, 0.405663},
+ {0.024266, 0.490970},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.107390, 0.490970},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.121071, 0.457423},
+ {0.121071, 0.516173},
+ {0.133581, 0.526091},
+ {0.133581, 0.447173},
+ {0.134639, 0.520713},
+ {0.134639, 0.464222},
+ {0.122457, 0.452924},
+ {0.122457, 0.530390},
+ {0.163710, 0.306233},
+ {0.142519, 0.309831},
+ {0.146695, 0.326259},
+ {0.181889, 0.323868},
+ {0.225838, 0.170445},
+ {0.233401, 0.189540},
+ {0.256635, 0.197020},
+ {0.242513, 0.164051},
+ {0.225838, 0.170445},
+ {0.242513, 0.164051},
+ {0.256635, 0.197020},
+ {0.233401, 0.189540},
+ {0.163710, 0.306233},
+ {0.181889, 0.323868},
+ {0.146695, 0.326259},
+ {0.142519, 0.309831},
+ {0.132079, 0.519433},
+ {0.119897, 0.529110},
+ {0.119897, 0.451644},
+ {0.132079, 0.462942},
+ {0.121071, 0.457423},
+ {0.133581, 0.447173},
+ {0.133581, 0.526091},
+ {0.121071, 0.516173},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.107390, 0.490970},
+ {0.024266, 0.490970},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.115168, 0.557820},
+ {0.024266, 0.557820},
+ {0.024266, 0.405663},
+ {0.094122, 0.405663},
+ {0.094122, 0.576626},
+ {0.024266, 0.576626},
+ {0.241046, 0.067643},
+ {0.304934, 0.042696},
+ {0.308794, 0.040153},
+ {0.241046, 0.015818},
+ {0.899346, 0.189338},
+ {0.929736, 0.158948},
+ {0.915018, 0.144230},
+ {0.884628, 0.174620},
+ {0.890640, 0.119852},
+ {0.860250, 0.150242},
+ {0.835872, 0.125864},
+ {0.866262, 0.095474},
+ {0.841640, 0.070852},
+ {0.811250, 0.101242},
+ {0.786131, 0.076123},
+ {0.816521, 0.045733},
+ {0.772138, 0.062130},
+ {0.802529, 0.031740},
+ {0.240391, 0.016190},
+ {0.240391, 0.065669},
+ {0.284044, 0.050344},
+ {0.309034, 0.040446},
+ {0.024266, 0.557820},
+ {0.024266, 0.576626},
+ {0.094122, 0.576626},
+ {0.115168, 0.557820},
+ {0.024266, 0.405663},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.094122, 0.405663},
+ {0.024266, 0.490970},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.107390, 0.490970},
+ {0.024266, 0.425443},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.115168, 0.425443},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.121071, 0.457423},
+ {0.121071, 0.516173},
+ {0.133581, 0.526091},
+ {0.133581, 0.447173},
+ {0.134639, 0.520713},
+ {0.134639, 0.464222},
+ {0.122457, 0.452924},
+ {0.122457, 0.530390},
+ {0.163710, 0.306233},
+ {0.142519, 0.309831},
+ {0.146695, 0.326259},
+ {0.181889, 0.323868},
+ {0.225838, 0.170445},
+ {0.233401, 0.189540},
+ {0.256635, 0.197020},
+ {0.242513, 0.164051},
+ {0.225838, 0.170445},
+ {0.242513, 0.164051},
+ {0.256635, 0.197020},
+ {0.233401, 0.189540},
+ {0.163710, 0.306233},
+ {0.181889, 0.323868},
+ {0.146695, 0.326259},
+ {0.142519, 0.309831},
+ {0.132079, 0.519433},
+ {0.119897, 0.529110},
+ {0.119897, 0.451644},
+ {0.132079, 0.462942},
+ {0.121071, 0.457423},
+ {0.133581, 0.447173},
+ {0.133581, 0.526091},
+ {0.121071, 0.516173},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.107390, 0.490970},
+ {0.024266, 0.490970},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.115168, 0.557820},
+ {0.024266, 0.557820},
+ {0.024266, 0.405663},
+ {0.094122, 0.405663},
+ {0.094122, 0.576626},
+ {0.024266, 0.576626},
+ {0.241046, 0.067643},
+ {0.304934, 0.042696},
+ {0.308794, 0.040153},
+ {0.241046, 0.015818},
+ {0.899346, 0.189338},
+ {0.929736, 0.158948},
+ {0.915018, 0.144230},
+ {0.884628, 0.174620},
+ {0.884628, 0.174620},
+ {0.915018, 0.144230},
+ {0.890640, 0.119852},
+ {0.860250, 0.150242},
+ {0.835872, 0.125864},
+ {0.860250, 0.150242},
+ {0.890640, 0.119852},
+ {0.866262, 0.095474},
+ {0.835872, 0.125864},
+ {0.866262, 0.095474},
+ {0.841640, 0.070852},
+ {0.811250, 0.101242},
+ {0.786131, 0.076123},
+ {0.811250, 0.101242},
+ {0.841640, 0.070852},
+ {0.816521, 0.045733},
+ {0.772138, 0.062130},
+ {0.802529, 0.031740},
+ {0.240391, 0.016190},
+ {0.240391, 0.065669},
+ {0.284044, 0.050344},
+ {0.309034, 0.040446},
+ {0.024266, 0.557820},
+ {0.024266, 0.576626},
+ {0.094122, 0.576626},
+ {0.115168, 0.557820},
+ {0.024266, 0.405663},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.094122, 0.405663},
+ {0.024266, 0.490970},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.107390, 0.490970},
+ {0.024266, 0.524061},
+ {0.024266, 0.557820},
+ {0.115168, 0.557820},
+ {0.109678, 0.524061},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.024266, 0.490970},
+ {0.107390, 0.490970},
+ {0.121071, 0.457423},
+ {0.121071, 0.516173},
+ {0.133581, 0.526091},
+ {0.133581, 0.447173},
+ {0.134639, 0.520713},
+ {0.134639, 0.464222},
+ {0.122457, 0.452924},
+ {0.122457, 0.530390},
+ {0.163710, 0.306233},
+ {0.142519, 0.309831},
+ {0.146695, 0.326259},
+ {0.181889, 0.323868},
+ {0.225838, 0.170445},
+ {0.233401, 0.189540},
+ {0.256635, 0.197020},
+ {0.242513, 0.164051},
+ {0.225838, 0.170445},
+ {0.242513, 0.164051},
+ {0.256635, 0.197020},
+ {0.233401, 0.189540},
+ {0.163710, 0.306233},
+ {0.181889, 0.323868},
+ {0.146695, 0.326259},
+ {0.142519, 0.309831},
+ {0.132079, 0.519433},
+ {0.119897, 0.529110},
+ {0.119897, 0.451644},
+ {0.132079, 0.462942},
+ {0.121071, 0.457423},
+ {0.133581, 0.447173},
+ {0.133581, 0.526091},
+ {0.121071, 0.516173},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.107390, 0.490970},
+ {0.024266, 0.490970},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.115168, 0.557820},
+ {0.024266, 0.557820},
+ {0.024266, 0.405663},
+ {0.094122, 0.405663},
+ {0.024266, 0.557820},
+ {0.115168, 0.557820},
+ {0.094122, 0.576626},
+ {0.024266, 0.576626},
+ {0.241046, 0.067643},
+ {0.304934, 0.042696},
+ {0.308794, 0.040153},
+ {0.241046, 0.015818},
+ {0.899346, 0.189338},
+ {0.929736, 0.158948},
+ {0.915018, 0.144230},
+ {0.884628, 0.174620},
+ {0.884628, 0.174620},
+ {0.915018, 0.144230},
+ {0.890640, 0.119852},
+ {0.860250, 0.150242},
+ {0.835872, 0.125864},
+ {0.860250, 0.150242},
+ {0.890640, 0.119852},
+ {0.866262, 0.095474},
+ {0.841640, 0.070852},
+ {0.811250, 0.101242},
+ {0.786131, 0.076123},
+ {0.816521, 0.045733},
+ {0.772138, 0.062130},
+ {0.786131, 0.076123},
+ {0.816521, 0.045733},
+ {0.802529, 0.031740},
+ {0.240391, 0.016190},
+ {0.240391, 0.065669},
+ {0.284044, 0.050344},
+ {0.309034, 0.040446},
+ {0.024266, 0.557820},
+ {0.024266, 0.576626},
+ {0.094122, 0.576626},
+ {0.115168, 0.557820},
+ {0.024266, 0.405663},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.094122, 0.405663},
+ {0.024266, 0.490970},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.107390, 0.490970},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.121071, 0.457423},
+ {0.121071, 0.516173},
+ {0.133581, 0.526091},
+ {0.133581, 0.447173},
+ {0.134639, 0.520713},
+ {0.134639, 0.464222},
+ {0.122457, 0.452924},
+ {0.122457, 0.530390},
+ {0.163710, 0.306233},
+ {0.142519, 0.309831},
+ {0.146695, 0.326259},
+ {0.181889, 0.323868},
+ {0.225838, 0.170445},
+ {0.233401, 0.189540},
+ {0.256635, 0.197020},
+ {0.242513, 0.164051},
+ {0.225838, 0.170445},
+ {0.242513, 0.164051},
+ {0.256635, 0.197020},
+ {0.233401, 0.189540},
+ {0.163710, 0.306233},
+ {0.181889, 0.323868},
+ {0.146695, 0.326259},
+ {0.142519, 0.309831},
+ {0.132079, 0.519433},
+ {0.119897, 0.529110},
+ {0.119897, 0.451644},
+ {0.132079, 0.462942},
+ {0.121071, 0.457423},
+ {0.133581, 0.447173},
+ {0.133581, 0.526091},
+ {0.121071, 0.516173},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.107390, 0.490970},
+ {0.024266, 0.490970},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.109678, 0.458207},
+ {0.024266, 0.458207},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.115168, 0.557820},
+ {0.024266, 0.557820},
+ {0.024266, 0.490970},
+ {0.107390, 0.490970},
+ {0.109678, 0.524061},
+ {0.024266, 0.524061},
+ {0.024266, 0.405663},
+ {0.094122, 0.405663},
+ {0.115168, 0.425443},
+ {0.024266, 0.425443},
+ {0.094122, 0.576626},
+ {0.024266, 0.576626},
+ {0.241046, 0.067643},
+ {0.304934, 0.042696},
+ {0.308794, 0.040153},
+ {0.241046, 0.015818},
+ {0.899346, 0.189338},
+ {0.929736, 0.158948},
+ {0.915018, 0.144230},
+ {0.884628, 0.174620},
+ {0.884628, 0.174620},
+ {0.915018, 0.144230},
+ {0.890640, 0.119852},
+ {0.860250, 0.150242},
+ {0.835872, 0.125864},
+ {0.866262, 0.095474},
+ {0.841640, 0.070852},
+ {0.811250, 0.101242},
+ {0.786131, 0.076123},
+ {0.811250, 0.101242},
+ {0.841640, 0.070852},
+ {0.816521, 0.045733},
+ {0.772138, 0.062130},
+ {0.786131, 0.076123},
+ {0.816521, 0.045733},
+ {0.802529, 0.031740},
+ {0.240391, 0.016190},
+ {0.240391, 0.065669},
+ {0.284044, 0.050344},
+ {0.309034, 0.040446},
+ {0.024266, 0.557820},
+ {0.024266, 0.576626},
+ {0.094122, 0.576626},
+ {0.115168, 0.557820},
+ {0.024266, 0.405663},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.094122, 0.405663},
+ {0.024266, 0.490970},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.107390, 0.490970},
+ {0.024266, 0.425443},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.115168, 0.425443},
+ {0.024266, 0.490970},
+ {0.107390, 0.490970},
+ {0.121071, 0.457423},
+ {0.121071, 0.516173},
+ {0.133581, 0.526091},
+ {0.133581, 0.447173},
+ {0.134639, 0.520713},
+ {0.134639, 0.464222},
+ {0.122457, 0.452924},
+ {0.122457, 0.530390},
+ {0.163710, 0.306233},
+ {0.142519, 0.309831},
+ {0.146695, 0.326259},
+ {0.181889, 0.323868},
+ {0.225838, 0.170445},
+ {0.233401, 0.189540},
+ {0.256635, 0.197020},
+ {0.242513, 0.164051},
+ {0.225838, 0.170445},
+ {0.242513, 0.164051},
+ {0.256635, 0.197020},
+ {0.233401, 0.189540},
+ {0.163710, 0.306233},
+ {0.181889, 0.323868},
+ {0.146695, 0.326259},
+ {0.142519, 0.309831},
+ {0.132079, 0.519433},
+ {0.119897, 0.529110},
+ {0.119897, 0.451644},
+ {0.132079, 0.462942},
+ {0.121071, 0.457423},
+ {0.133581, 0.447173},
+ {0.133581, 0.526091},
+ {0.121071, 0.516173},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.107390, 0.490970},
+ {0.024266, 0.490970},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.115168, 0.557820},
+ {0.024266, 0.557820},
+ {0.024266, 0.490970},
+ {0.107390, 0.490970},
+ {0.109678, 0.524061},
+ {0.024266, 0.524061},
+ {0.024266, 0.405663},
+ {0.094122, 0.405663},
+ {0.094122, 0.576626},
+ {0.024266, 0.576626},
+ {0.241046, 0.067643},
+ {0.304934, 0.042696},
+ {0.308794, 0.040153},
+ {0.241046, 0.015818},
+ {0.899346, 0.189338},
+ {0.929736, 0.158948},
+ {0.915018, 0.144230},
+ {0.884628, 0.174620},
+ {0.884628, 0.174620},
+ {0.915018, 0.144230},
+ {0.890640, 0.119852},
+ {0.860250, 0.150242},
+ {0.835872, 0.125864},
+ {0.860250, 0.150242},
+ {0.890640, 0.119852},
+ {0.866262, 0.095474},
+ {0.835872, 0.125864},
+ {0.866262, 0.095474},
+ {0.841640, 0.070852},
+ {0.811250, 0.101242},
+ {0.786131, 0.076123},
+ {0.816521, 0.045733},
+ {0.772138, 0.062130},
+ {0.802529, 0.031740},
+ {0.240391, 0.016190},
+ {0.240391, 0.065669},
+ {0.284044, 0.050344},
+ {0.309034, 0.040446},
+ {0.024266, 0.557820},
+ {0.024266, 0.576626},
+ {0.094122, 0.576626},
+ {0.115168, 0.557820},
+ {0.024266, 0.405663},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.094122, 0.405663},
+ {0.024266, 0.490970},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.107390, 0.490970},
+ {0.024266, 0.425443},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.115168, 0.425443},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.121071, 0.457423},
+ {0.121071, 0.516173},
+ {0.133581, 0.526091},
+ {0.133581, 0.447173},
+ {0.134639, 0.520713},
+ {0.134639, 0.464222},
+ {0.122457, 0.452924},
+ {0.122457, 0.530390},
+ {0.163710, 0.306233},
+ {0.142519, 0.309831},
+ {0.146695, 0.326259},
+ {0.181889, 0.323868},
+ {0.225838, 0.170445},
+ {0.233401, 0.189540},
+ {0.256635, 0.197020},
+ {0.242513, 0.164051},
+ {0.225838, 0.170445},
+ {0.242513, 0.164051},
+ {0.256635, 0.197020},
+ {0.233401, 0.189540},
+ {0.163710, 0.306233},
+ {0.181889, 0.323868},
+ {0.146695, 0.326259},
+ {0.142519, 0.309831},
+ {0.132079, 0.519433},
+ {0.119897, 0.529110},
+ {0.119897, 0.451644},
+ {0.132079, 0.462942},
+ {0.121071, 0.457423},
+ {0.133581, 0.447173},
+ {0.133581, 0.526091},
+ {0.121071, 0.516173},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.107390, 0.490970},
+ {0.024266, 0.490970},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.109678, 0.458207},
+ {0.024266, 0.458207},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.115168, 0.557820},
+ {0.024266, 0.557820},
+ {0.109678, 0.524061},
+ {0.024266, 0.524061},
+ {0.024266, 0.405663},
+ {0.094122, 0.405663},
+ {0.115168, 0.425443},
+ {0.024266, 0.425443},
+ {0.094122, 0.576626},
+ {0.024266, 0.576626},
+ {0.241046, 0.067643},
+ {0.304934, 0.042696},
+ {0.308794, 0.040153},
+ {0.241046, 0.015818},
+ {0.899346, 0.189338},
+ {0.929736, 0.158948},
+ {0.915018, 0.144230},
+ {0.884628, 0.174620},
+ {0.884628, 0.174620},
+ {0.915018, 0.144230},
+ {0.890640, 0.119852},
+ {0.860250, 0.150242},
+ {0.835872, 0.125864},
+ {0.860250, 0.150242},
+ {0.890640, 0.119852},
+ {0.866262, 0.095474},
+ {0.835872, 0.125864},
+ {0.866262, 0.095474},
+ {0.841640, 0.070852},
+ {0.811250, 0.101242},
+ {0.786131, 0.076123},
+ {0.816521, 0.045733},
+ {0.772138, 0.062130},
+ {0.802529, 0.031740},
+ {0.240391, 0.016190},
+ {0.240391, 0.065669},
+ {0.284044, 0.050344},
+ {0.309034, 0.040446},
+ {0.024266, 0.557820},
+ {0.024266, 0.576626},
+ {0.094122, 0.576626},
+ {0.115168, 0.557820},
+ {0.024266, 0.405663},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.094122, 0.405663},
+ {0.024266, 0.490970},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.107390, 0.490970},
+ {0.024266, 0.524061},
+ {0.024266, 0.557820},
+ {0.115168, 0.557820},
+ {0.109678, 0.524061},
+ {0.024266, 0.425443},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.115168, 0.425443},
+ {0.024266, 0.458207},
+ {0.024266, 0.490970},
+ {0.107390, 0.490970},
+ {0.109678, 0.458207},
+ {0.121071, 0.457423},
+ {0.121071, 0.516173},
+ {0.133581, 0.526091},
+ {0.133581, 0.447173},
+ {0.134639, 0.520713},
+ {0.134639, 0.464222},
+ {0.122457, 0.452924},
+ {0.122457, 0.530390},
+ {0.163710, 0.306233},
+ {0.142519, 0.309831},
+ {0.146695, 0.326259},
+ {0.181889, 0.323868},
+ {0.225838, 0.170445},
+ {0.233401, 0.189540},
+ {0.256635, 0.197020},
+ {0.242513, 0.164051},
+ {0.225838, 0.170445},
+ {0.242513, 0.164051},
+ {0.256635, 0.197020},
+ {0.233401, 0.189540},
+ {0.163710, 0.306233},
+ {0.181889, 0.323868},
+ {0.146695, 0.326259},
+ {0.142519, 0.309831},
+ {0.132079, 0.519433},
+ {0.119897, 0.529110},
+ {0.119897, 0.451644},
+ {0.132079, 0.462942},
+ {0.121071, 0.457423},
+ {0.133581, 0.447173},
+ {0.133581, 0.526091},
+ {0.121071, 0.516173},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.107390, 0.490970},
+ {0.024266, 0.490970},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.115168, 0.557820},
+ {0.024266, 0.557820},
+ {0.024266, 0.405663},
+ {0.094122, 0.405663},
+ {0.094122, 0.576626},
+ {0.024266, 0.576626},
+ {0.241046, 0.067643},
+ {0.304934, 0.042696},
+ {0.308794, 0.040153},
+ {0.241046, 0.015818},
+ {0.899346, 0.189338},
+ {0.929736, 0.158948},
+ {0.915018, 0.144230},
+ {0.884628, 0.174620},
+ {0.884628, 0.174620},
+ {0.915018, 0.144230},
+ {0.890640, 0.119852},
+ {0.860250, 0.150242},
+ {0.835872, 0.125864},
+ {0.860250, 0.150242},
+ {0.890640, 0.119852},
+ {0.866262, 0.095474},
+ {0.835872, 0.125864},
+ {0.866262, 0.095474},
+ {0.841640, 0.070852},
+ {0.811250, 0.101242},
+ {0.786131, 0.076123},
+ {0.811250, 0.101242},
+ {0.841640, 0.070852},
+ {0.816521, 0.045733},
+ {0.772138, 0.062130},
+ {0.786131, 0.076123},
+ {0.816521, 0.045733},
+ {0.802529, 0.031740},
+ {0.240391, 0.016190},
+ {0.240391, 0.065669},
+ {0.284044, 0.050344},
+ {0.309034, 0.040446},
+ {0.024266, 0.557820},
+ {0.024266, 0.576626},
+ {0.094122, 0.576626},
+ {0.115168, 0.557820},
+ {0.024266, 0.405663},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.094122, 0.405663},
+ {0.024266, 0.490970},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.107390, 0.490970},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.024266, 0.425443},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.115168, 0.425443},
+ {0.024266, 0.458207},
+ {0.024266, 0.490970},
+ {0.107390, 0.490970},
+ {0.109678, 0.458207},
+ {0.121071, 0.457423},
+ {0.121071, 0.516173},
+ {0.133581, 0.526091},
+ {0.133581, 0.447173},
+ {0.134639, 0.520713},
+ {0.134639, 0.464222},
+ {0.122457, 0.452924},
+ {0.122457, 0.530390},
+ {0.163710, 0.306233},
+ {0.142519, 0.309831},
+ {0.146695, 0.326259},
+ {0.181889, 0.323868},
+ {0.225838, 0.170445},
+ {0.233401, 0.189540},
+ {0.256635, 0.197020},
+ {0.242513, 0.164051},
+ {0.225838, 0.170445},
+ {0.242513, 0.164051},
+ {0.256635, 0.197020},
+ {0.233401, 0.189540},
+ {0.163710, 0.306233},
+ {0.181889, 0.323868},
+ {0.146695, 0.326259},
+ {0.142519, 0.309831},
+ {0.132079, 0.519433},
+ {0.119897, 0.529110},
+ {0.119897, 0.451644},
+ {0.132079, 0.462942},
+ {0.121071, 0.457423},
+ {0.133581, 0.447173},
+ {0.133581, 0.526091},
+ {0.121071, 0.516173},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.107390, 0.490970},
+ {0.024266, 0.490970},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.109678, 0.458207},
+ {0.024266, 0.458207},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.115168, 0.557820},
+ {0.024266, 0.557820},
+ {0.024266, 0.490970},
+ {0.107390, 0.490970},
+ {0.024266, 0.405663},
+ {0.094122, 0.405663},
+ {0.115168, 0.425443},
+ {0.024266, 0.425443},
+ {0.024266, 0.557820},
+ {0.115168, 0.557820},
+ {0.094122, 0.576626},
+ {0.024266, 0.576626},
+ {0.241046, 0.067643},
+ {0.304934, 0.042696},
+ {0.308794, 0.040153},
+ {0.241046, 0.015818},
+ {0.899346, 0.189338},
+ {0.929736, 0.158948},
+ {0.915018, 0.144230},
+ {0.884628, 0.174620},
+ {0.884628, 0.174620},
+ {0.915018, 0.144230},
+ {0.890640, 0.119852},
+ {0.860250, 0.150242},
+ {0.835872, 0.125864},
+ {0.860250, 0.150242},
+ {0.890640, 0.119852},
+ {0.866262, 0.095474},
+ {0.841640, 0.070852},
+ {0.811250, 0.101242},
+ {0.786131, 0.076123},
+ {0.816521, 0.045733},
+ {0.772138, 0.062130},
+ {0.802529, 0.031740},
+ {0.240391, 0.016190},
+ {0.240391, 0.065669},
+ {0.284044, 0.050344},
+ {0.309034, 0.040446},
+ {0.024266, 0.557820},
+ {0.024266, 0.576626},
+ {0.094122, 0.576626},
+ {0.115168, 0.557820},
+ {0.024266, 0.405663},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.094122, 0.405663},
+ {0.024266, 0.490970},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.107390, 0.490970},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.121071, 0.457423},
+ {0.121071, 0.516173},
+ {0.133581, 0.526091},
+ {0.133581, 0.447173},
+ {0.134639, 0.520713},
+ {0.134639, 0.464222},
+ {0.122457, 0.452924},
+ {0.122457, 0.530390},
+ {0.163710, 0.306233},
+ {0.142519, 0.309831},
+ {0.146695, 0.326259},
+ {0.181889, 0.323868},
+ {0.225838, 0.170445},
+ {0.233401, 0.189540},
+ {0.256635, 0.197020},
+ {0.242513, 0.164051},
+ {0.225838, 0.170445},
+ {0.242513, 0.164051},
+ {0.256635, 0.197020},
+ {0.233401, 0.189540},
+ {0.163710, 0.306233},
+ {0.181889, 0.323868},
+ {0.146695, 0.326259},
+ {0.142519, 0.309831},
+ {0.132079, 0.519433},
+ {0.119897, 0.529110},
+ {0.119897, 0.451644},
+ {0.132079, 0.462942},
+ {0.121071, 0.457423},
+ {0.133581, 0.447173},
+ {0.133581, 0.526091},
+ {0.121071, 0.516173},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.107390, 0.490970},
+ {0.024266, 0.490970},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.115168, 0.557820},
+ {0.024266, 0.557820},
+ {0.024266, 0.405663},
+ {0.094122, 0.405663},
+ {0.094122, 0.576626},
+ {0.024266, 0.576626},
+ {0.241046, 0.067643},
+ {0.304934, 0.042696},
+ {0.308794, 0.040153},
+ {0.241046, 0.015818},
+ {0.899346, 0.189338},
+ {0.929736, 0.158948},
+ {0.915018, 0.144230},
+ {0.884628, 0.174620},
+ {0.884628, 0.174620},
+ {0.915018, 0.144230},
+ {0.890640, 0.119852},
+ {0.860250, 0.150242},
+ {0.835872, 0.125864},
+ {0.866262, 0.095474},
+ {0.841640, 0.070852},
+ {0.811250, 0.101242},
+ {0.786131, 0.076123},
+ {0.816521, 0.045733},
+ {0.772138, 0.062130},
+ {0.802529, 0.031740},
+ {0.240391, 0.016190},
+ {0.240391, 0.065669},
+ {0.284044, 0.050344},
+ {0.309034, 0.040446},
+ {0.024266, 0.557820},
+ {0.024266, 0.576626},
+ {0.094122, 0.576626},
+ {0.115168, 0.557820},
+ {0.024266, 0.405663},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.094122, 0.405663},
+ {0.024266, 0.490970},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.107390, 0.490970},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.121071, 0.457423},
+ {0.121071, 0.516173},
+ {0.133581, 0.526091},
+ {0.133581, 0.447173},
+ {0.134639, 0.520713},
+ {0.134639, 0.464222},
+ {0.122457, 0.452924},
+ {0.122457, 0.530390},
+ {0.163710, 0.306233},
+ {0.142519, 0.309831},
+ {0.146695, 0.326259},
+ {0.181889, 0.323868},
+ {0.225838, 0.170445},
+ {0.233401, 0.189540},
+ {0.256635, 0.197020},
+ {0.242513, 0.164051},
+ {0.225838, 0.170445},
+ {0.242513, 0.164051},
+ {0.256635, 0.197020},
+ {0.233401, 0.189540},
+ {0.163710, 0.306233},
+ {0.181889, 0.323868},
+ {0.146695, 0.326259},
+ {0.142519, 0.309831},
+ {0.132079, 0.519433},
+ {0.119897, 0.529110},
+ {0.119897, 0.451644},
+ {0.132079, 0.462942},
+ {0.121071, 0.457423},
+ {0.133581, 0.447173},
+ {0.133581, 0.526091},
+ {0.121071, 0.516173},
+ {0.024266, 0.458207},
+ {0.109678, 0.458207},
+ {0.107390, 0.490970},
+ {0.024266, 0.490970},
+ {0.024266, 0.425443},
+ {0.115168, 0.425443},
+ {0.024266, 0.524061},
+ {0.109678, 0.524061},
+ {0.115168, 0.557820},
+ {0.024266, 0.557820},
+ {0.024266, 0.405663},
+ {0.094122, 0.405663},
+ {0.115168, 0.425443},
+ {0.024266, 0.425443},
+ {0.094122, 0.576626},
+ {0.024266, 0.576626},
+ {0.241046, 0.067643},
+ {0.304934, 0.042696},
+ {0.308794, 0.040153},
+ {0.241046, 0.015818},
+ {0.899346, 0.189338},
+ {0.929736, 0.158948},
+ {0.915018, 0.144230},
+ {0.884628, 0.174620},
+ {0.884628, 0.174620},
+ {0.915018, 0.144230},
+ {0.890640, 0.119852},
+ {0.860250, 0.150242},
+ {0.835872, 0.125864},
+ {0.860250, 0.150242},
+ {0.890640, 0.119852},
+ {0.866262, 0.095474},
+ {0.841640, 0.070852},
+ {0.811250, 0.101242},
+ {0.786131, 0.076123},
+ {0.811250, 0.101242},
+ {0.841640, 0.070852},
+ {0.816521, 0.045733},
+ {0.772138, 0.062130},
+ {0.786131, 0.076123},
+ {0.816521, 0.045733},
+ {0.802529, 0.031740},
+ {0.240391, 0.016190},
+ {0.240391, 0.065669},
+ {0.284044, 0.050344},
+ {0.309034, 0.040446},
+ {0.753201, 0.213987},
+ {0.246799, 0.213987},
+ {0.246799, 0.720388},
+ {0.753201, 0.720388},
+ {0.755338, 0.213412},
+ {0.244662, 0.213412},
+ {0.244662, 0.724088},
+ {0.755338, 0.724088},
+ {0.750465, 0.718262},
+ {0.750465, 0.217145},
+ {0.249348, 0.217144},
+ {0.249348, 0.718262},
+ {0.751651, 0.720401},
+ {0.751651, 0.217099},
+ {0.248349, 0.217099},
+ {0.248349, 0.720401},
+ {0.250893, 0.216518},
+ {0.250893, 0.714732},
+ {0.749107, 0.714732},
+ {0.749107, 0.216518},
+ {0.740441, 0.718441},
+ {0.740441, 0.221560},
+ {0.243560, 0.221560},
+ {0.243559, 0.718441},
+ {0.159977, 0.969448},
+ {0.159976, 0.986021},
+ {0.100174, 0.986021},
+ {0.100175, 0.969448},
+ {0.055738, 0.986021},
+ {0.055738, 0.969448},
+ {0.028374, 0.986021},
+ {0.028374, 0.969448},
+ {0.019134, 0.986021},
+ {0.019134, 0.969448},
+ {0.028374, 0.986021},
+ {0.028374, 0.969448},
+ {0.055738, 0.986021},
+ {0.055738, 0.969448},
+ {0.100175, 0.986021},
+ {0.100175, 0.969448},
+ {0.159977, 0.986021},
+ {0.159977, 0.969448},
+ {0.232845, 0.986021},
+ {0.232845, 0.969448},
+ {0.315981, 0.986021},
+ {0.315981, 0.969448},
+ {0.406188, 0.986021},
+ {0.406188, 0.969448},
+ {0.500000, 0.986021},
+ {0.500000, 0.969448},
+ {0.593812, 0.986021},
+ {0.593812, 0.969448},
+ {0.684018, 0.986021},
+ {0.684019, 0.969448},
+ {0.767154, 0.986021},
+ {0.767155, 0.969448},
+ {0.840022, 0.986021},
+ {0.840024, 0.969448},
+ {0.899824, 0.986021},
+ {0.899825, 0.969448},
+ {0.944261, 0.986021},
+ {0.944262, 0.969448},
+ {0.971626, 0.986021},
+ {0.971626, 0.969448},
+ {0.980866, 0.986021},
+ {0.980866, 0.969448},
+ {0.971626, 0.986021},
+ {0.971626, 0.969448},
+ {0.944263, 0.986021},
+ {0.944262, 0.969448},
+ {0.899827, 0.986021},
+ {0.899825, 0.969448},
+ {0.840025, 0.986021},
+ {0.840023, 0.969448},
+ {0.767157, 0.986021},
+ {0.767154, 0.969448},
+ {0.684022, 0.986021},
+ {0.684019, 0.969448},
+ {0.593816, 0.986021},
+ {0.593811, 0.969448},
+ {0.500004, 0.986021},
+ {0.499999, 0.969448},
+ {0.406191, 0.986021},
+ {0.406187, 0.969448},
+ {0.315984, 0.986021},
+ {0.315980, 0.969448},
+ {0.232849, 0.986021},
+ {0.232845, 0.969448},
+ {0.240254, 0.990826},
+ {0.169401, 0.990826},
+ {0.321085, 0.990826},
+ {0.408792, 0.990826},
+ {0.500004, 0.990826},
+ {0.591215, 0.990826},
+ {0.678922, 0.990826},
+ {0.759752, 0.990826},
+ {0.830601, 0.990826},
+ {0.888744, 0.990826},
+ {0.931949, 0.990826},
+ {0.958554, 0.990826},
+ {0.967537, 0.990826},
+ {0.958553, 0.990826},
+ {0.931947, 0.990826},
+ {0.888742, 0.990826},
+ {0.830598, 0.990826},
+ {0.759749, 0.990826},
+ {0.678918, 0.990826},
+ {0.591211, 0.990826},
+ {0.500000, 0.990826},
+ {0.408788, 0.990826},
+ {0.321081, 0.990826},
+ {0.240250, 0.990826},
+ {0.169402, 0.990826},
+ {0.111257, 0.990826},
+ {0.068052, 0.990826},
+ {0.041447, 0.990826},
+ {0.032463, 0.990826},
+ {0.041446, 0.990826},
+ {0.068052, 0.990826},
+ {0.111257, 0.990826},
+ {0.585010, 0.597465},
+ {0.608824, 0.577921},
+ {0.590504, 0.559602},
+ {0.570617, 0.575923},
+ {0.557841, 0.611987},
+ {0.547927, 0.588051},
+ {0.528361, 0.620930},
+ {0.523307, 0.595520},
+ {0.497703, 0.623949},
+ {0.497703, 0.598041},
+ {0.467045, 0.620929},
+ {0.472099, 0.595519},
+ {0.437565, 0.611987},
+ {0.447479, 0.588051},
+ {0.410396, 0.597465},
+ {0.424789, 0.575923},
+ {0.386582, 0.577921},
+ {0.404902, 0.559602},
+ {0.367039, 0.554107},
+ {0.388580, 0.539714},
+ {0.352517, 0.526938},
+ {0.376452, 0.517024},
+ {0.343574, 0.497459},
+ {0.368984, 0.492404},
+ {0.340554, 0.466800},
+ {0.366462, 0.466800},
+ {0.343574, 0.436142},
+ {0.368984, 0.441196},
+ {0.352516, 0.406662},
+ {0.376452, 0.416576},
+ {0.367038, 0.379493},
+ {0.388580, 0.393887},
+ {0.386582, 0.355679},
+ {0.404901, 0.373999},
+ {0.410396, 0.336136},
+ {0.424789, 0.357677},
+ {0.437565, 0.321614},
+ {0.447479, 0.345549},
+ {0.467044, 0.312671},
+ {0.472099, 0.338081},
+ {0.497703, 0.309651},
+ {0.497703, 0.335559},
+ {0.528361, 0.312671},
+ {0.523306, 0.338081},
+ {0.557841, 0.321613},
+ {0.547926, 0.345549},
+ {0.585010, 0.336135},
+ {0.570616, 0.357677},
+ {0.608824, 0.355678},
+ {0.590504, 0.373998},
+ {0.628367, 0.379492},
+ {0.606826, 0.393886},
+ {0.642890, 0.406661},
+ {0.618954, 0.416575},
+ {0.651832, 0.436141},
+ {0.626422, 0.441195},
+ {0.654852, 0.466799},
+ {0.628944, 0.466799},
+ {0.651833, 0.497457},
+ {0.626423, 0.492403},
+ {0.642891, 0.526937},
+ {0.618955, 0.517023},
+ {0.628369, 0.554106},
+ {0.606827, 0.539713},
+ {0.497703, 0.466800},
+ {0.159977, 0.969448},
+ {0.159976, 0.986021},
+ {0.100174, 0.986021},
+ {0.100175, 0.969448},
+ {0.055738, 0.986021},
+ {0.055738, 0.969448},
+ {0.028374, 0.986021},
+ {0.028374, 0.969448},
+ {0.019134, 0.986021},
+ {0.019134, 0.969448},
+ {0.028374, 0.986021},
+ {0.028374, 0.969448},
+ {0.055738, 0.986021},
+ {0.055738, 0.969448},
+ {0.100175, 0.986021},
+ {0.100175, 0.969448},
+ {0.159977, 0.986021},
+ {0.159977, 0.969448},
+ {0.232845, 0.986021},
+ {0.232845, 0.969448},
+ {0.315981, 0.986021},
+ {0.315981, 0.969448},
+ {0.406188, 0.986021},
+ {0.406188, 0.969448},
+ {0.500000, 0.986021},
+ {0.500000, 0.969448},
+ {0.593812, 0.986021},
+ {0.593812, 0.969448},
+ {0.684018, 0.986021},
+ {0.684019, 0.969448},
+ {0.767154, 0.986021},
+ {0.767155, 0.969448},
+ {0.840022, 0.986021},
+ {0.840024, 0.969448},
+ {0.899824, 0.986021},
+ {0.899825, 0.969448},
+ {0.944261, 0.986021},
+ {0.944262, 0.969448},
+ {0.971626, 0.986021},
+ {0.971626, 0.969448},
+ {0.980866, 0.986021},
+ {0.980866, 0.969448},
+ {0.971626, 0.986021},
+ {0.971626, 0.969448},
+ {0.944263, 0.986021},
+ {0.944262, 0.969448},
+ {0.899827, 0.986021},
+ {0.899825, 0.969448},
+ {0.840025, 0.986021},
+ {0.840023, 0.969448},
+ {0.767157, 0.986021},
+ {0.767154, 0.969448},
+ {0.684022, 0.986021},
+ {0.684019, 0.969448},
+ {0.593816, 0.986021},
+ {0.593811, 0.969448},
+ {0.500004, 0.986021},
+ {0.499999, 0.969448},
+ {0.406191, 0.986021},
+ {0.406187, 0.969448},
+ {0.315984, 0.986021},
+ {0.315980, 0.969448},
+ {0.232849, 0.986021},
+ {0.232845, 0.969448},
+ {0.240254, 0.990826},
+ {0.169401, 0.990826},
+ {0.321085, 0.990826},
+ {0.408792, 0.990826},
+ {0.500004, 0.990826},
+ {0.591215, 0.990826},
+ {0.678922, 0.990826},
+ {0.759752, 0.990826},
+ {0.830601, 0.990826},
+ {0.888744, 0.990826},
+ {0.931949, 0.990826},
+ {0.958554, 0.990826},
+ {0.967537, 0.990826},
+ {0.958553, 0.990826},
+ {0.931947, 0.990826},
+ {0.888742, 0.990826},
+ {0.830598, 0.990826},
+ {0.759749, 0.990826},
+ {0.678918, 0.990826},
+ {0.591211, 0.990826},
+ {0.500000, 0.990826},
+ {0.408788, 0.990826},
+ {0.321081, 0.990826},
+ {0.240250, 0.990826},
+ {0.169402, 0.990826},
+ {0.111257, 0.990826},
+ {0.068052, 0.990826},
+ {0.041447, 0.990826},
+ {0.032463, 0.990826},
+ {0.041446, 0.990826},
+ {0.068052, 0.990826},
+ {0.111257, 0.990826},
+ {0.585010, 0.597465},
+ {0.608824, 0.577921},
+ {0.590504, 0.559602},
+ {0.570617, 0.575923},
+ {0.557841, 0.611987},
+ {0.547927, 0.588051},
+ {0.528361, 0.620930},
+ {0.523307, 0.595520},
+ {0.497703, 0.623949},
+ {0.497703, 0.598041},
+ {0.467045, 0.620929},
+ {0.472099, 0.595519},
+ {0.437565, 0.611987},
+ {0.447479, 0.588051},
+ {0.410396, 0.597465},
+ {0.424789, 0.575923},
+ {0.386582, 0.577921},
+ {0.404902, 0.559602},
+ {0.367039, 0.554107},
+ {0.388580, 0.539714},
+ {0.352517, 0.526938},
+ {0.376452, 0.517024},
+ {0.343574, 0.497459},
+ {0.368984, 0.492404},
+ {0.340554, 0.466800},
+ {0.366462, 0.466800},
+ {0.343574, 0.436142},
+ {0.368984, 0.441196},
+ {0.352516, 0.406662},
+ {0.376452, 0.416576},
+ {0.367038, 0.379493},
+ {0.388580, 0.393887},
+ {0.386582, 0.355679},
+ {0.404901, 0.373999},
+ {0.410396, 0.336136},
+ {0.424789, 0.357677},
+ {0.437565, 0.321614},
+ {0.447479, 0.345549},
+ {0.467044, 0.312671},
+ {0.472099, 0.338081},
+ {0.497703, 0.309651},
+ {0.497703, 0.335559},
+ {0.528361, 0.312671},
+ {0.523306, 0.338081},
+ {0.557841, 0.321613},
+ {0.547926, 0.345549},
+ {0.585010, 0.336135},
+ {0.570616, 0.357677},
+ {0.608824, 0.355678},
+ {0.590504, 0.373998},
+ {0.628367, 0.379492},
+ {0.606826, 0.393886},
+ {0.642890, 0.406661},
+ {0.618954, 0.416575},
+ {0.651832, 0.436141},
+ {0.626422, 0.441195},
+ {0.654852, 0.466799},
+ {0.628944, 0.466799},
+ {0.651833, 0.497457},
+ {0.626423, 0.492403},
+ {0.642891, 0.526937},
+ {0.618955, 0.517023},
+ {0.628369, 0.554106},
+ {0.606827, 0.539713},
+ {0.497703, 0.466800},
+ {0.159977, 0.969448},
+ {0.159976, 0.986021},
+ {0.100174, 0.986021},
+ {0.100175, 0.969448},
+ {0.055738, 0.986021},
+ {0.055738, 0.969448},
+ {0.028374, 0.986021},
+ {0.028374, 0.969448},
+ {0.019134, 0.986021},
+ {0.019134, 0.969448},
+ {0.028374, 0.986021},
+ {0.028374, 0.969448},
+ {0.055738, 0.986021},
+ {0.055738, 0.969448},
+ {0.100175, 0.986021},
+ {0.100175, 0.969448},
+ {0.159977, 0.986021},
+ {0.159977, 0.969448},
+ {0.232845, 0.986021},
+ {0.232845, 0.969448},
+ {0.315981, 0.986021},
+ {0.315981, 0.969448},
+ {0.406188, 0.986021},
+ {0.406188, 0.969448},
+ {0.500000, 0.986021},
+ {0.500000, 0.969448},
+ {0.593812, 0.986021},
+ {0.593812, 0.969448},
+ {0.684018, 0.986021},
+ {0.684019, 0.969448},
+ {0.767154, 0.986021},
+ {0.767155, 0.969448},
+ {0.840022, 0.986021},
+ {0.840024, 0.969448},
+ {0.899824, 0.986021},
+ {0.899825, 0.969448},
+ {0.944261, 0.986021},
+ {0.944262, 0.969448},
+ {0.971626, 0.986021},
+ {0.971626, 0.969448},
+ {0.980866, 0.986021},
+ {0.980866, 0.969448},
+ {0.971626, 0.986021},
+ {0.971626, 0.969448},
+ {0.944263, 0.986021},
+ {0.944262, 0.969448},
+ {0.899827, 0.986021},
+ {0.899825, 0.969448},
+ {0.840025, 0.986021},
+ {0.840023, 0.969448},
+ {0.767157, 0.986021},
+ {0.767154, 0.969448},
+ {0.684022, 0.986021},
+ {0.684019, 0.969448},
+ {0.593816, 0.986021},
+ {0.593811, 0.969448},
+ {0.500004, 0.986021},
+ {0.499999, 0.969448},
+ {0.406191, 0.986021},
+ {0.406187, 0.969448},
+ {0.315984, 0.986021},
+ {0.315980, 0.969448},
+ {0.232849, 0.986021},
+ {0.232845, 0.969448},
+ {0.240254, 0.990826},
+ {0.169401, 0.990826},
+ {0.321085, 0.990826},
+ {0.408792, 0.990826},
+ {0.500004, 0.990826},
+ {0.591215, 0.990826},
+ {0.678922, 0.990826},
+ {0.759752, 0.990826},
+ {0.830601, 0.990826},
+ {0.888744, 0.990826},
+ {0.931949, 0.990826},
+ {0.958554, 0.990826},
+ {0.967537, 0.990826},
+ {0.958553, 0.990826},
+ {0.931947, 0.990826},
+ {0.888742, 0.990826},
+ {0.830598, 0.990826},
+ {0.759749, 0.990826},
+ {0.678918, 0.990826},
+ {0.591211, 0.990826},
+ {0.500000, 0.990826},
+ {0.408788, 0.990826},
+ {0.321081, 0.990826},
+ {0.240250, 0.990826},
+ {0.169402, 0.990826},
+ {0.111257, 0.990826},
+ {0.068052, 0.990826},
+ {0.041447, 0.990826},
+ {0.032463, 0.990826},
+ {0.041446, 0.990826},
+ {0.068052, 0.990826},
+ {0.111257, 0.990826},
+ {0.585010, 0.597465},
+ {0.608824, 0.577921},
+ {0.590504, 0.559602},
+ {0.570617, 0.575923},
+ {0.557841, 0.611987},
+ {0.547927, 0.588051},
+ {0.528361, 0.620930},
+ {0.523307, 0.595520},
+ {0.497703, 0.623949},
+ {0.497703, 0.598041},
+ {0.467045, 0.620929},
+ {0.472099, 0.595519},
+ {0.437565, 0.611987},
+ {0.447479, 0.588051},
+ {0.410396, 0.597465},
+ {0.424789, 0.575923},
+ {0.386582, 0.577921},
+ {0.404902, 0.559602},
+ {0.367039, 0.554107},
+ {0.388580, 0.539714},
+ {0.352517, 0.526938},
+ {0.376452, 0.517024},
+ {0.343574, 0.497459},
+ {0.368984, 0.492404},
+ {0.340554, 0.466800},
+ {0.366462, 0.466800},
+ {0.343574, 0.436142},
+ {0.368984, 0.441196},
+ {0.352516, 0.406662},
+ {0.376452, 0.416576},
+ {0.367038, 0.379493},
+ {0.388580, 0.393887},
+ {0.386582, 0.355679},
+ {0.404901, 0.373999},
+ {0.410396, 0.336136},
+ {0.424789, 0.357677},
+ {0.437565, 0.321614},
+ {0.447479, 0.345549},
+ {0.467044, 0.312671},
+ {0.472099, 0.338081},
+ {0.497703, 0.309651},
+ {0.497703, 0.335559},
+ {0.528361, 0.312671},
+ {0.523306, 0.338081},
+ {0.557841, 0.321613},
+ {0.547926, 0.345549},
+ {0.585010, 0.336135},
+ {0.570616, 0.357677},
+ {0.608824, 0.355678},
+ {0.590504, 0.373998},
+ {0.628367, 0.379492},
+ {0.606826, 0.393886},
+ {0.642890, 0.406661},
+ {0.618954, 0.416575},
+ {0.651832, 0.436141},
+ {0.626422, 0.441195},
+ {0.654852, 0.466799},
+ {0.628944, 0.466799},
+ {0.651833, 0.497457},
+ {0.626423, 0.492403},
+ {0.642891, 0.526937},
+ {0.618955, 0.517023},
+ {0.628369, 0.554106},
+ {0.606827, 0.539713},
+ {0.497703, 0.466800},
+ {0.159977, 0.969448},
+ {0.159976, 0.986021},
+ {0.100174, 0.986021},
+ {0.100175, 0.969448},
+ {0.055738, 0.986021},
+ {0.055738, 0.969448},
+ {0.028374, 0.986021},
+ {0.028374, 0.969448},
+ {0.019134, 0.986021},
+ {0.019134, 0.969448},
+ {0.028374, 0.986021},
+ {0.028374, 0.969448},
+ {0.055738, 0.986021},
+ {0.055738, 0.969448},
+ {0.100175, 0.986021},
+ {0.100175, 0.969448},
+ {0.159977, 0.986021},
+ {0.159977, 0.969448},
+ {0.232845, 0.986021},
+ {0.232845, 0.969448},
+ {0.315981, 0.986021},
+ {0.315981, 0.969448},
+ {0.406188, 0.986021},
+ {0.406188, 0.969448},
+ {0.500000, 0.986021},
+ {0.500000, 0.969448},
+ {0.593812, 0.986021},
+ {0.593812, 0.969448},
+ {0.684018, 0.986021},
+ {0.684019, 0.969448},
+ {0.767154, 0.986021},
+ {0.767155, 0.969448},
+ {0.840022, 0.986021},
+ {0.840024, 0.969448},
+ {0.899824, 0.986021},
+ {0.899825, 0.969448},
+ {0.944261, 0.986021},
+ {0.944262, 0.969448},
+ {0.971626, 0.986021},
+ {0.971626, 0.969448},
+ {0.980866, 0.986021},
+ {0.980866, 0.969448},
+ {0.971626, 0.986021},
+ {0.971626, 0.969448},
+ {0.944263, 0.986021},
+ {0.944262, 0.969448},
+ {0.899827, 0.986021},
+ {0.899825, 0.969448},
+ {0.840025, 0.986021},
+ {0.840023, 0.969448},
+ {0.767157, 0.986021},
+ {0.767154, 0.969448},
+ {0.684022, 0.986021},
+ {0.684019, 0.969448},
+ {0.593816, 0.986021},
+ {0.593811, 0.969448},
+ {0.500004, 0.986021},
+ {0.499999, 0.969448},
+ {0.406191, 0.986021},
+ {0.406187, 0.969448},
+ {0.315984, 0.986021},
+ {0.315980, 0.969448},
+ {0.232849, 0.986021},
+ {0.232845, 0.969448},
+ {0.240254, 0.990826},
+ {0.169401, 0.990826},
+ {0.321085, 0.990826},
+ {0.408792, 0.990826},
+ {0.500004, 0.990826},
+ {0.591215, 0.990826},
+ {0.678922, 0.990826},
+ {0.759752, 0.990826},
+ {0.830601, 0.990826},
+ {0.888744, 0.990826},
+ {0.931949, 0.990826},
+ {0.958554, 0.990826},
+ {0.967537, 0.990826},
+ {0.958553, 0.990826},
+ {0.931947, 0.990826},
+ {0.888742, 0.990826},
+ {0.830598, 0.990826},
+ {0.759749, 0.990826},
+ {0.678918, 0.990826},
+ {0.591211, 0.990826},
+ {0.500000, 0.990826},
+ {0.408788, 0.990826},
+ {0.321081, 0.990826},
+ {0.240250, 0.990826},
+ {0.169402, 0.990826},
+ {0.111257, 0.990826},
+ {0.068052, 0.990826},
+ {0.041447, 0.990826},
+ {0.032463, 0.990826},
+ {0.041446, 0.990826},
+ {0.068052, 0.990826},
+ {0.111257, 0.990826},
+ {0.585010, 0.597465},
+ {0.608824, 0.577921},
+ {0.590504, 0.559602},
+ {0.570617, 0.575923},
+ {0.557841, 0.611987},
+ {0.547927, 0.588051},
+ {0.528361, 0.620930},
+ {0.523307, 0.595520},
+ {0.497703, 0.623949},
+ {0.497703, 0.598041},
+ {0.467045, 0.620929},
+ {0.472099, 0.595519},
+ {0.437565, 0.611987},
+ {0.447479, 0.588051},
+ {0.410396, 0.597465},
+ {0.424789, 0.575923},
+ {0.386582, 0.577921},
+ {0.404902, 0.559602},
+ {0.367039, 0.554107},
+ {0.388580, 0.539714},
+ {0.352517, 0.526938},
+ {0.376452, 0.517024},
+ {0.343574, 0.497459},
+ {0.368984, 0.492404},
+ {0.340554, 0.466800},
+ {0.366462, 0.466800},
+ {0.343574, 0.436142},
+ {0.368984, 0.441196},
+ {0.352516, 0.406662},
+ {0.376452, 0.416576},
+ {0.367038, 0.379493},
+ {0.388580, 0.393887},
+ {0.386582, 0.355679},
+ {0.404901, 0.373999},
+ {0.410396, 0.336136},
+ {0.424789, 0.357677},
+ {0.437565, 0.321614},
+ {0.447479, 0.345549},
+ {0.467044, 0.312671},
+ {0.472099, 0.338081},
+ {0.497703, 0.309651},
+ {0.497703, 0.335559},
+ {0.528361, 0.312671},
+ {0.523306, 0.338081},
+ {0.557841, 0.321613},
+ {0.547926, 0.345549},
+ {0.585010, 0.336135},
+ {0.570616, 0.357677},
+ {0.608824, 0.355678},
+ {0.590504, 0.373998},
+ {0.628367, 0.379492},
+ {0.606826, 0.393886},
+ {0.642890, 0.406661},
+ {0.618954, 0.416575},
+ {0.651832, 0.436141},
+ {0.626422, 0.441195},
+ {0.654852, 0.466799},
+ {0.628944, 0.466799},
+ {0.651833, 0.497457},
+ {0.626423, 0.492403},
+ {0.642891, 0.526937},
+ {0.618955, 0.517023},
+ {0.628369, 0.554106},
+ {0.606827, 0.539713},
+ {0.497703, 0.466800},
+ {0.159977, 0.969448},
+ {0.159976, 0.986021},
+ {0.100174, 0.986021},
+ {0.100175, 0.969448},
+ {0.055738, 0.986021},
+ {0.055738, 0.969448},
+ {0.028374, 0.986021},
+ {0.028374, 0.969448},
+ {0.019134, 0.986021},
+ {0.019134, 0.969448},
+ {0.028374, 0.986021},
+ {0.028374, 0.969448},
+ {0.055738, 0.986021},
+ {0.055738, 0.969448},
+ {0.100175, 0.986021},
+ {0.100175, 0.969448},
+ {0.159977, 0.986021},
+ {0.159977, 0.969448},
+ {0.232845, 0.986021},
+ {0.232845, 0.969448},
+ {0.315981, 0.986021},
+ {0.315981, 0.969448},
+ {0.406188, 0.986021},
+ {0.406188, 0.969448},
+ {0.500000, 0.986021},
+ {0.500000, 0.969448},
+ {0.593812, 0.986021},
+ {0.593812, 0.969448},
+ {0.684018, 0.986021},
+ {0.684019, 0.969448},
+ {0.767154, 0.986021},
+ {0.767155, 0.969448},
+ {0.840022, 0.986021},
+ {0.840024, 0.969448},
+ {0.899824, 0.986021},
+ {0.899825, 0.969448},
+ {0.944261, 0.986021},
+ {0.944262, 0.969448},
+ {0.971626, 0.986021},
+ {0.971626, 0.969448},
+ {0.980866, 0.986021},
+ {0.980866, 0.969448},
+ {0.971626, 0.986021},
+ {0.971626, 0.969448},
+ {0.944263, 0.986021},
+ {0.944262, 0.969448},
+ {0.899827, 0.986021},
+ {0.899825, 0.969448},
+ {0.840025, 0.986021},
+ {0.840023, 0.969448},
+ {0.767157, 0.986021},
+ {0.767154, 0.969448},
+ {0.684022, 0.986021},
+ {0.684019, 0.969448},
+ {0.593816, 0.986021},
+ {0.593811, 0.969448},
+ {0.500004, 0.986021},
+ {0.499999, 0.969448},
+ {0.406191, 0.986021},
+ {0.406187, 0.969448},
+ {0.315984, 0.986021},
+ {0.315980, 0.969448},
+ {0.232849, 0.986021},
+ {0.232845, 0.969448},
+ {0.240254, 0.990826},
+ {0.169401, 0.990826},
+ {0.321085, 0.990826},
+ {0.408792, 0.990826},
+ {0.500004, 0.990826},
+ {0.591215, 0.990826},
+ {0.678922, 0.990826},
+ {0.759752, 0.990826},
+ {0.830601, 0.990826},
+ {0.888744, 0.990826},
+ {0.931949, 0.990826},
+ {0.958554, 0.990826},
+ {0.967537, 0.990826},
+ {0.958553, 0.990826},
+ {0.931947, 0.990826},
+ {0.888742, 0.990826},
+ {0.830598, 0.990826},
+ {0.759749, 0.990826},
+ {0.678918, 0.990826},
+ {0.591211, 0.990826},
+ {0.500000, 0.990826},
+ {0.408788, 0.990826},
+ {0.321081, 0.990826},
+ {0.240250, 0.990826},
+ {0.169402, 0.990826},
+ {0.111257, 0.990826},
+ {0.068052, 0.990826},
+ {0.041447, 0.990826},
+ {0.032463, 0.990826},
+ {0.041446, 0.990826},
+ {0.068052, 0.990826},
+ {0.111257, 0.990826},
+ {0.585010, 0.597465},
+ {0.608824, 0.577921},
+ {0.590504, 0.559602},
+ {0.570617, 0.575923},
+ {0.557841, 0.611987},
+ {0.547927, 0.588051},
+ {0.528361, 0.620930},
+ {0.523307, 0.595520},
+ {0.497703, 0.623949},
+ {0.497703, 0.598041},
+ {0.467045, 0.620929},
+ {0.472099, 0.595519},
+ {0.437565, 0.611987},
+ {0.447479, 0.588051},
+ {0.410396, 0.597465},
+ {0.424789, 0.575923},
+ {0.386582, 0.577921},
+ {0.404902, 0.559602},
+ {0.367039, 0.554107},
+ {0.388580, 0.539714},
+ {0.352517, 0.526938},
+ {0.376452, 0.517024},
+ {0.343574, 0.497459},
+ {0.368984, 0.492404},
+ {0.340554, 0.466800},
+ {0.366462, 0.466800},
+ {0.343574, 0.436142},
+ {0.368984, 0.441196},
+ {0.352516, 0.406662},
+ {0.376452, 0.416576},
+ {0.367038, 0.379493},
+ {0.388580, 0.393887},
+ {0.386582, 0.355679},
+ {0.404901, 0.373999},
+ {0.410396, 0.336136},
+ {0.424789, 0.357677},
+ {0.437565, 0.321614},
+ {0.447479, 0.345549},
+ {0.467044, 0.312671},
+ {0.472099, 0.338081},
+ {0.497703, 0.309651},
+ {0.497703, 0.335559},
+ {0.528361, 0.312671},
+ {0.523306, 0.338081},
+ {0.557841, 0.321613},
+ {0.547926, 0.345549},
+ {0.585010, 0.336135},
+ {0.570616, 0.357677},
+ {0.608824, 0.355678},
+ {0.590504, 0.373998},
+ {0.628367, 0.379492},
+ {0.606826, 0.393886},
+ {0.642890, 0.406661},
+ {0.618954, 0.416575},
+ {0.651832, 0.436141},
+ {0.626422, 0.441195},
+ {0.654852, 0.466799},
+ {0.628944, 0.466799},
+ {0.651833, 0.497457},
+ {0.626423, 0.492403},
+ {0.642891, 0.526937},
+ {0.618955, 0.517023},
+ {0.628369, 0.554106},
+ {0.606827, 0.539713},
+ {0.497703, 0.466800},
+ {0.159977, 0.969448},
+ {0.159976, 0.986021},
+ {0.100174, 0.986021},
+ {0.100175, 0.969448},
+ {0.055738, 0.986021},
+ {0.055738, 0.969448},
+ {0.028374, 0.986021},
+ {0.028374, 0.969448},
+ {0.019134, 0.986021},
+ {0.019134, 0.969448},
+ {0.028374, 0.986021},
+ {0.028374, 0.969448},
+ {0.055738, 0.986021},
+ {0.055738, 0.969448},
+ {0.100175, 0.986021},
+ {0.100175, 0.969448},
+ {0.159977, 0.986021},
+ {0.159977, 0.969448},
+ {0.232845, 0.986021},
+ {0.232845, 0.969448},
+ {0.315981, 0.986021},
+ {0.315981, 0.969448},
+ {0.406188, 0.986021},
+ {0.406188, 0.969448},
+ {0.500000, 0.986021},
+ {0.500000, 0.969448},
+ {0.593812, 0.986021},
+ {0.593812, 0.969448},
+ {0.684018, 0.986021},
+ {0.684019, 0.969448},
+ {0.767154, 0.986021},
+ {0.767155, 0.969448},
+ {0.840022, 0.986021},
+ {0.840024, 0.969448},
+ {0.899824, 0.986021},
+ {0.899825, 0.969448},
+ {0.944261, 0.986021},
+ {0.944262, 0.969448},
+ {0.971626, 0.986021},
+ {0.971626, 0.969448},
+ {0.980866, 0.986021},
+ {0.980866, 0.969448},
+ {0.971626, 0.986021},
+ {0.971626, 0.969448},
+ {0.944263, 0.986021},
+ {0.944262, 0.969448},
+ {0.899827, 0.986021},
+ {0.899825, 0.969448},
+ {0.840025, 0.986021},
+ {0.840023, 0.969448},
+ {0.767157, 0.986021},
+ {0.767154, 0.969448},
+ {0.684022, 0.986021},
+ {0.684019, 0.969448},
+ {0.593816, 0.986021},
+ {0.593811, 0.969448},
+ {0.500004, 0.986021},
+ {0.499999, 0.969448},
+ {0.406191, 0.986021},
+ {0.406187, 0.969448},
+ {0.315984, 0.986021},
+ {0.315980, 0.969448},
+ {0.232849, 0.986021},
+ {0.232845, 0.969448},
+ {0.240254, 0.990826},
+ {0.169401, 0.990826},
+ {0.321085, 0.990826},
+ {0.408792, 0.990826},
+ {0.500004, 0.990826},
+ {0.591215, 0.990826},
+ {0.678922, 0.990826},
+ {0.759752, 0.990826},
+ {0.830601, 0.990826},
+ {0.888744, 0.990826},
+ {0.931949, 0.990826},
+ {0.958554, 0.990826},
+ {0.967537, 0.990826},
+ {0.958553, 0.990826},
+ {0.931947, 0.990826},
+ {0.888742, 0.990826},
+ {0.830598, 0.990826},
+ {0.759749, 0.990826},
+ {0.678918, 0.990826},
+ {0.591211, 0.990826},
+ {0.500000, 0.990826},
+ {0.408788, 0.990826},
+ {0.321081, 0.990826},
+ {0.240250, 0.990826},
+ {0.169402, 0.990826},
+ {0.111257, 0.990826},
+ {0.068052, 0.990826},
+ {0.041447, 0.990826},
+ {0.032463, 0.990826},
+ {0.041446, 0.990826},
+ {0.068052, 0.990826},
+ {0.111257, 0.990826},
+ {0.585010, 0.597465},
+ {0.608824, 0.577921},
+ {0.590504, 0.559602},
+ {0.570617, 0.575923},
+ {0.557841, 0.611987},
+ {0.547927, 0.588051},
+ {0.528361, 0.620930},
+ {0.523307, 0.595520},
+ {0.497703, 0.623949},
+ {0.497703, 0.598041},
+ {0.467045, 0.620929},
+ {0.472099, 0.595519},
+ {0.437565, 0.611987},
+ {0.447479, 0.588051},
+ {0.410396, 0.597465},
+ {0.424789, 0.575923},
+ {0.386582, 0.577921},
+ {0.404902, 0.559602},
+ {0.367039, 0.554107},
+ {0.388580, 0.539714},
+ {0.352517, 0.526938},
+ {0.376452, 0.517024},
+ {0.343574, 0.497459},
+ {0.368984, 0.492404},
+ {0.340554, 0.466800},
+ {0.366462, 0.466800},
+ {0.343574, 0.436142},
+ {0.368984, 0.441196},
+ {0.352516, 0.406662},
+ {0.376452, 0.416576},
+ {0.367038, 0.379493},
+ {0.388580, 0.393887},
+ {0.386582, 0.355679},
+ {0.404901, 0.373999},
+ {0.410396, 0.336136},
+ {0.424789, 0.357677},
+ {0.437565, 0.321614},
+ {0.447479, 0.345549},
+ {0.467044, 0.312671},
+ {0.472099, 0.338081},
+ {0.497703, 0.309651},
+ {0.497703, 0.335559},
+ {0.528361, 0.312671},
+ {0.523306, 0.338081},
+ {0.557841, 0.321613},
+ {0.547926, 0.345549},
+ {0.585010, 0.336135},
+ {0.570616, 0.357677},
+ {0.608824, 0.355678},
+ {0.590504, 0.373998},
+ {0.628367, 0.379492},
+ {0.606826, 0.393886},
+ {0.642890, 0.406661},
+ {0.618954, 0.416575},
+ {0.651832, 0.436141},
+ {0.626422, 0.441195},
+ {0.654852, 0.466799},
+ {0.628944, 0.466799},
+ {0.651833, 0.497457},
+ {0.626423, 0.492403},
+ {0.642891, 0.526937},
+ {0.618955, 0.517023},
+ {0.628369, 0.554106},
+ {0.606827, 0.539713},
+ {0.497703, 0.466800},
+ {0.848177, 0.224916},
+ {0.818438, 0.176440},
+ {0.752033, 0.240867},
+ {0.783711, 0.291546},
+ {0.793129, 0.146678},
+ {0.726169, 0.211112},
+ {0.762438, 0.123481},
+ {0.698958, 0.184992},
+ {0.794577, 0.147215},
+ {0.765649, 0.122742},
+ {0.696432, 0.187743},
+ {0.727237, 0.211803},
+ {0.819583, 0.176620},
+ {0.756668, 0.246737},
+ {0.848965, 0.224517},
+ {0.780854, 0.289364},
+ {0.740004, 0.106039},
+ {0.673061, 0.169251},
+ {0.730260, 0.099555},
+ {0.662480, 0.162820},
+ {0.721266, 0.093570},
+ {0.652713, 0.156884},
+ {0.239538, 0.161658},
+ {0.191764, 0.190965},
+ {0.255039, 0.258379},
+ {0.304188, 0.223557},
+ {0.162434, 0.215908},
+ {0.225216, 0.284302},
+ {0.138024, 0.244760},
+ {0.199037, 0.311574},
+ {0.129366, 0.257771},
+ {0.190304, 0.325943},
+ {0.120116, 0.271671},
+ {0.180973, 0.341294},
+ {0.110095, 0.286729},
+ {0.170865, 0.357924},
+ {0.755551, 0.116022},
+ {0.685121, 0.179332},
+ {0.743719, 0.108149},
+ {0.671356, 0.171276},
+ {0.723573, 0.094742},
+ {0.647765, 0.160120},
+ {0.848177, 0.224916},
+ {0.818438, 0.176440},
+ {0.752033, 0.240867},
+ {0.783711, 0.291546},
+ {0.793129, 0.146678},
+ {0.726169, 0.211112},
+ {0.762438, 0.123481},
+ {0.698958, 0.184992},
+ {0.794577, 0.147215},
+ {0.765649, 0.122742},
+ {0.696432, 0.187743},
+ {0.727237, 0.211803},
+ {0.819583, 0.176620},
+ {0.756668, 0.246737},
+ {0.848965, 0.224517},
+ {0.780854, 0.289364},
+ {0.740004, 0.106039},
+ {0.673061, 0.169251},
+ {0.730260, 0.099555},
+ {0.662480, 0.162820},
+ {0.721266, 0.093570},
+ {0.652713, 0.156884},
+ {0.239538, 0.161658},
+ {0.191764, 0.190965},
+ {0.255039, 0.258379},
+ {0.304188, 0.223557},
+ {0.162434, 0.215908},
+ {0.225216, 0.284302},
+ {0.138024, 0.244760},
+ {0.199037, 0.311574},
+ {0.129366, 0.257771},
+ {0.190304, 0.325943},
+ {0.120116, 0.271671},
+ {0.180973, 0.341294},
+ {0.110095, 0.286729},
+ {0.170865, 0.357924},
+ {0.755551, 0.116022},
+ {0.685121, 0.179332},
+ {0.743719, 0.108149},
+ {0.671356, 0.171276},
+ {0.723573, 0.094742},
+ {0.647765, 0.160120},
+ {0.848177, 0.224916},
+ {0.783711, 0.291546},
+ {0.752033, 0.240867},
+ {0.818438, 0.176440},
+ {0.726169, 0.211112},
+ {0.793129, 0.146678},
+ {0.698958, 0.184992},
+ {0.762438, 0.123481},
+ {0.794577, 0.147215},
+ {0.727237, 0.211803},
+ {0.696432, 0.187743},
+ {0.765649, 0.122742},
+ {0.819583, 0.176620},
+ {0.756668, 0.246737},
+ {0.848965, 0.224517},
+ {0.780854, 0.289364},
+ {0.673061, 0.169251},
+ {0.740004, 0.106039},
+ {0.662480, 0.162820},
+ {0.730260, 0.099555},
+ {0.652713, 0.156884},
+ {0.721266, 0.093570},
+ {0.239538, 0.161658},
+ {0.304188, 0.223557},
+ {0.255039, 0.258379},
+ {0.191764, 0.190965},
+ {0.225216, 0.284302},
+ {0.162434, 0.215908},
+ {0.199037, 0.311574},
+ {0.138024, 0.244760},
+ {0.190304, 0.325943},
+ {0.129366, 0.257771},
+ {0.180973, 0.341294},
+ {0.120116, 0.271671},
+ {0.170865, 0.357924},
+ {0.110095, 0.286729},
+ {0.685121, 0.179332},
+ {0.755551, 0.116022},
+ {0.671356, 0.171276},
+ {0.743719, 0.108149},
+ {0.647765, 0.160120},
+ {0.723573, 0.094742},
+ {0.848177, 0.224916},
+ {0.783711, 0.291546},
+ {0.752033, 0.240867},
+ {0.818438, 0.176440},
+ {0.726169, 0.211112},
+ {0.793129, 0.146678},
+ {0.698958, 0.184992},
+ {0.762438, 0.123481},
+ {0.794577, 0.147215},
+ {0.727237, 0.211803},
+ {0.696432, 0.187743},
+ {0.765649, 0.122742},
+ {0.819583, 0.176620},
+ {0.756668, 0.246737},
+ {0.848965, 0.224517},
+ {0.780854, 0.289364},
+ {0.673061, 0.169251},
+ {0.740004, 0.106039},
+ {0.662480, 0.162820},
+ {0.730260, 0.099555},
+ {0.652713, 0.156884},
+ {0.721266, 0.093570},
+ {0.239538, 0.161658},
+ {0.304188, 0.223557},
+ {0.255039, 0.258379},
+ {0.191764, 0.190965},
+ {0.225216, 0.284302},
+ {0.162434, 0.215908},
+ {0.199037, 0.311574},
+ {0.138024, 0.244760},
+ {0.190304, 0.325943},
+ {0.129366, 0.257771},
+ {0.180973, 0.341294},
+ {0.120116, 0.271671},
+ {0.170865, 0.357924},
+ {0.110095, 0.286729},
+ {0.685121, 0.179332},
+ {0.755551, 0.116022},
+ {0.671356, 0.171276},
+ {0.743719, 0.108149},
+ {0.647765, 0.160120},
+ {0.723573, 0.094742},
+ {0.848177, 0.224916},
+ {0.818438, 0.176440},
+ {0.752033, 0.240867},
+ {0.783711, 0.291546},
+ {0.793129, 0.146678},
+ {0.726169, 0.211112},
+ {0.762438, 0.123481},
+ {0.698958, 0.184992},
+ {0.794577, 0.147215},
+ {0.765649, 0.122742},
+ {0.696432, 0.187743},
+ {0.727237, 0.211803},
+ {0.819583, 0.176620},
+ {0.756668, 0.246737},
+ {0.848965, 0.224517},
+ {0.780854, 0.289364},
+ {0.740004, 0.106039},
+ {0.673061, 0.169251},
+ {0.730260, 0.099555},
+ {0.662480, 0.162820},
+ {0.721266, 0.093570},
+ {0.652713, 0.156884},
+ {0.239538, 0.161658},
+ {0.191764, 0.190965},
+ {0.255039, 0.258379},
+ {0.304188, 0.223557},
+ {0.162434, 0.215908},
+ {0.225216, 0.284302},
+ {0.138024, 0.244760},
+ {0.199037, 0.311574},
+ {0.129366, 0.257771},
+ {0.190304, 0.325943},
+ {0.120116, 0.271671},
+ {0.180973, 0.341294},
+ {0.110095, 0.286729},
+ {0.170865, 0.357924},
+ {0.755551, 0.116022},
+ {0.685121, 0.179332},
+ {0.743719, 0.108149},
+ {0.671356, 0.171276},
+ {0.723573, 0.094742},
+ {0.647765, 0.160120},
+ {0.848177, 0.224916},
+ {0.818438, 0.176440},
+ {0.752033, 0.240867},
+ {0.783711, 0.291546},
+ {0.793129, 0.146678},
+ {0.726169, 0.211112},
+ {0.762438, 0.123481},
+ {0.698958, 0.184992},
+ {0.794577, 0.147215},
+ {0.765649, 0.122742},
+ {0.696432, 0.187743},
+ {0.727237, 0.211803},
+ {0.819583, 0.176620},
+ {0.756668, 0.246737},
+ {0.848965, 0.224517},
+ {0.780854, 0.289364},
+ {0.740004, 0.106039},
+ {0.673061, 0.169251},
+ {0.730260, 0.099555},
+ {0.662480, 0.162820},
+ {0.721266, 0.093570},
+ {0.652713, 0.156884},
+ {0.239538, 0.161658},
+ {0.191764, 0.190965},
+ {0.255039, 0.258379},
+ {0.304188, 0.223557},
+ {0.162434, 0.215908},
+ {0.225216, 0.284302},
+ {0.138024, 0.244760},
+ {0.199037, 0.311574},
+ {0.129366, 0.257771},
+ {0.190304, 0.325943},
+ {0.120116, 0.271671},
+ {0.180973, 0.341294},
+ {0.110095, 0.286729},
+ {0.170865, 0.357924},
+ {0.755551, 0.116022},
+ {0.685121, 0.179332},
+ {0.743719, 0.108149},
+ {0.671356, 0.171276},
+ {0.723573, 0.094742},
+ {0.647765, 0.160120},
+ {0.848177, 0.224916},
+ {0.783711, 0.291546},
+ {0.752033, 0.240867},
+ {0.818438, 0.176440},
+ {0.726169, 0.211112},
+ {0.793129, 0.146678},
+ {0.698958, 0.184992},
+ {0.762438, 0.123481},
+ {0.794577, 0.147215},
+ {0.727237, 0.211803},
+ {0.696432, 0.187743},
+ {0.765649, 0.122742},
+ {0.819583, 0.176620},
+ {0.756668, 0.246737},
+ {0.848965, 0.224517},
+ {0.780854, 0.289364},
+ {0.673061, 0.169251},
+ {0.740004, 0.106039},
+ {0.662480, 0.162820},
+ {0.730260, 0.099555},
+ {0.652713, 0.156884},
+ {0.721266, 0.093570},
+ {0.239538, 0.161658},
+ {0.304188, 0.223557},
+ {0.255039, 0.258379},
+ {0.191764, 0.190965},
+ {0.225216, 0.284302},
+ {0.162434, 0.215908},
+ {0.199037, 0.311574},
+ {0.138024, 0.244760},
+ {0.190304, 0.325943},
+ {0.129366, 0.257771},
+ {0.180973, 0.341294},
+ {0.120116, 0.271671},
+ {0.170865, 0.357924},
+ {0.110095, 0.286729},
+ {0.685121, 0.179332},
+ {0.755551, 0.116022},
+ {0.671356, 0.171276},
+ {0.743719, 0.108149},
+ {0.647765, 0.160120},
+ {0.723573, 0.094742},
+ {0.848177, 0.224916},
+ {0.783711, 0.291546},
+ {0.752033, 0.240867},
+ {0.818438, 0.176440},
+ {0.726169, 0.211112},
+ {0.793129, 0.146678},
+ {0.698958, 0.184992},
+ {0.762438, 0.123481},
+ {0.794577, 0.147215},
+ {0.727237, 0.211803},
+ {0.696432, 0.187743},
+ {0.765649, 0.122742},
+ {0.819583, 0.176620},
+ {0.756668, 0.246737},
+ {0.848965, 0.224517},
+ {0.780854, 0.289364},
+ {0.673061, 0.169251},
+ {0.740004, 0.106039},
+ {0.662480, 0.162820},
+ {0.730260, 0.099555},
+ {0.652713, 0.156884},
+ {0.721266, 0.093570},
+ {0.239538, 0.161658},
+ {0.304188, 0.223557},
+ {0.255039, 0.258379},
+ {0.191764, 0.190965},
+ {0.225216, 0.284302},
+ {0.162434, 0.215908},
+ {0.199037, 0.311574},
+ {0.138024, 0.244760},
+ {0.190304, 0.325943},
+ {0.129366, 0.257771},
+ {0.180973, 0.341294},
+ {0.120116, 0.271671},
+ {0.170865, 0.357924},
+ {0.110095, 0.286729},
+ {0.685121, 0.179332},
+ {0.755551, 0.116022},
+ {0.671356, 0.171276},
+ {0.743719, 0.108149},
+ {0.647765, 0.160120},
+ {0.723573, 0.094742},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.137764, 0.490977},
+ {0.122964, 0.559352},
+ {0.145933, 0.561194},
+ {0.117345, 0.457401},
+ {0.140166, 0.456563},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.140166, 0.456563},
+ {0.117345, 0.457401},
+ {0.137764, 0.490977},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.145933, 0.561194},
+ {0.122964, 0.559352},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.137764, 0.490977},
+ {0.122964, 0.559352},
+ {0.145933, 0.561194},
+ {0.117345, 0.457401},
+ {0.140166, 0.456563},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.140166, 0.456563},
+ {0.117345, 0.457401},
+ {0.137764, 0.490977},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.145933, 0.561194},
+ {0.122964, 0.559352},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.137764, 0.490977},
+ {0.122964, 0.559352},
+ {0.145933, 0.561194},
+ {0.117345, 0.457401},
+ {0.140166, 0.456563},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.140166, 0.456563},
+ {0.117345, 0.457401},
+ {0.137764, 0.490977},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.145933, 0.561194},
+ {0.122964, 0.559352},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.137764, 0.490977},
+ {0.122964, 0.559352},
+ {0.145933, 0.561194},
+ {0.117345, 0.457401},
+ {0.140166, 0.456563},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.140166, 0.456563},
+ {0.117345, 0.457401},
+ {0.137764, 0.490977},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.145933, 0.561194},
+ {0.122964, 0.559352},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.137764, 0.490977},
+ {0.122964, 0.559352},
+ {0.145933, 0.561194},
+ {0.117345, 0.457401},
+ {0.140166, 0.456563},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.140166, 0.456563},
+ {0.117345, 0.457401},
+ {0.137764, 0.490977},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.145933, 0.561194},
+ {0.122964, 0.559352},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.137764, 0.490977},
+ {0.122964, 0.559352},
+ {0.145933, 0.561194},
+ {0.117345, 0.457401},
+ {0.140166, 0.456563},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.140166, 0.456563},
+ {0.117345, 0.457401},
+ {0.137764, 0.490977},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.145933, 0.561194},
+ {0.122964, 0.559352},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.137764, 0.490977},
+ {0.122964, 0.559352},
+ {0.145933, 0.561194},
+ {0.117345, 0.457401},
+ {0.140166, 0.456563},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.140166, 0.456563},
+ {0.117345, 0.457401},
+ {0.137764, 0.490977},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.145933, 0.561194},
+ {0.122964, 0.559352},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.137764, 0.490977},
+ {0.122964, 0.559352},
+ {0.145933, 0.561194},
+ {0.117345, 0.457401},
+ {0.140166, 0.456563},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.140166, 0.456563},
+ {0.117345, 0.457401},
+ {0.137764, 0.490977},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.145933, 0.561194},
+ {0.122964, 0.559352},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.137764, 0.490977},
+ {0.122964, 0.559352},
+ {0.145933, 0.561194},
+ {0.117345, 0.457401},
+ {0.140166, 0.456563},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.140166, 0.456563},
+ {0.117345, 0.457401},
+ {0.137764, 0.490977},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.145933, 0.561194},
+ {0.122964, 0.559352},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.137764, 0.490977},
+ {0.122964, 0.559352},
+ {0.145933, 0.561194},
+ {0.117345, 0.457401},
+ {0.140166, 0.456563},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.140166, 0.456563},
+ {0.117345, 0.457401},
+ {0.137764, 0.490977},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.145933, 0.561194},
+ {0.122964, 0.559352},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.137764, 0.490977},
+ {0.122964, 0.559352},
+ {0.145933, 0.561194},
+ {0.117345, 0.457401},
+ {0.140166, 0.456563},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.140166, 0.456563},
+ {0.117345, 0.457401},
+ {0.137764, 0.490977},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.145933, 0.561194},
+ {0.122964, 0.559352},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.137764, 0.490977},
+ {0.122964, 0.559352},
+ {0.145933, 0.561194},
+ {0.117345, 0.457401},
+ {0.140166, 0.456563},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.122964, 0.423869},
+ {0.145933, 0.422150},
+ {0.140166, 0.456563},
+ {0.117345, 0.457401},
+ {0.137764, 0.490977},
+ {0.115004, 0.490933},
+ {0.117345, 0.524801},
+ {0.140166, 0.525734},
+ {0.145933, 0.561194},
+ {0.122964, 0.559352},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+ {0.984768, 0.689506},
+ {0.984768, 0.778887},
+ {0.992096, 0.778887},
+ {0.992096, 0.689507},
+};
+
+float
+companion_normals[COMPANION_VERTEX_COUNT][3] = {
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000000, 0.000001, 1.000000},
+ {0.000000, 0.000001, 1.000000},
+ {0.000000, 0.000001, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000003, -0.000000, 1.000000},
+ {0.000003, -0.000000, 1.000000},
+ {0.000003, -0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000002, -0.000002, 1.000000},
+ {0.000002, -0.000002, 1.000000},
+ {0.000002, -0.000002, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000002, -0.000002, -1.000000},
+ {-0.000002, -0.000002, -1.000000},
+ {-0.000002, -0.000002, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {0.000000, -0.000001, -1.000000},
+ {0.000000, -0.000001, -1.000000},
+ {0.000000, -0.000001, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000002, -0.000001, -1.000000},
+ {-0.000002, -0.000001, -1.000000},
+ {-0.000002, -0.000001, -1.000000},
+ {0.000000, -0.000001, -1.000000},
+ {0.000000, -0.000001, -1.000000},
+ {0.000000, -0.000001, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000001},
+ {-0.000001, 1.000000, -0.000001},
+ {-0.000001, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000001, -1.000000, 0.000001},
+ {0.000001, -1.000000, 0.000001},
+ {0.000001, -1.000000, 0.000001},
+ {1.000000, 0.000001, 0.000001},
+ {1.000000, 0.000001, 0.000001},
+ {1.000000, 0.000001, 0.000001},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, 0.000001, 0.000000},
+ {1.000000, 0.000001, 0.000000},
+ {1.000000, 0.000001, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, 0.000001, -0.000001},
+ {1.000000, 0.000001, -0.000001},
+ {1.000000, 0.000001, -0.000001},
+ {1.000000, -0.000001, 0.000001},
+ {1.000000, -0.000001, 0.000001},
+ {1.000000, -0.000001, 0.000001},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, -0.000001, 0.000000},
+ {-1.000000, -0.000001, 0.000000},
+ {-1.000000, -0.000001, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, -0.000001},
+ {-1.000000, 0.000000, -0.000001},
+ {-1.000000, 0.000000, -0.000001},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000001, 0.000000},
+ {-1.000000, 0.000001, 0.000000},
+ {-1.000000, 0.000001, 0.000000},
+ {-1.000000, -0.000001, 0.000000},
+ {-1.000000, -0.000001, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000001, -0.000001, -1.000000},
+ {-0.000001, -0.000001, -1.000000},
+ {-0.000001, -0.000001, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {0.000000, -0.000001, -1.000000},
+ {0.000000, -0.000001, -1.000000},
+ {0.000000, -0.000001, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000001, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000001, 0.000001, 1.000000},
+ {0.000001, 0.000001, 1.000000},
+ {0.000001, 0.000001, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000001, -0.000001, 1.000000},
+ {0.000001, -0.000001, 1.000000},
+ {0.000001, -0.000001, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000001, -0.000000, 1.000000},
+ {0.000001, -0.000000, 1.000000},
+ {0.000001, -0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000001, -0.000000, 1.000000},
+ {0.000001, -0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, -0.000001, 1.000000},
+ {-0.000000, -0.000001, 1.000000},
+ {-0.000000, -0.000001, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000000, 0.000001, 1.000000},
+ {0.000000, 0.000001, 1.000000},
+ {0.000000, 0.000001, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000001, -0.000001, 1.000000},
+ {0.000001, -0.000001, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000001, -0.000000, 1.000000},
+ {0.000001, -0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, -1.000000, -0.000001},
+ {-0.000000, -1.000000, -0.000001},
+ {-0.000000, -1.000000, -0.000001},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {-0.000000, -1.000000, -0.000001},
+ {-0.000000, -1.000000, -0.000001},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000001},
+ {-0.000001, 1.000000, -0.000001},
+ {-0.000001, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, -0.000002, -0.000000},
+ {-1.000000, -0.000002, -0.000000},
+ {-1.000000, -0.000002, -0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, -0.000001, 0.000001},
+ {-1.000000, -0.000001, 0.000001},
+ {-1.000000, -0.000001, 0.000001},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, -0.000001},
+ {-1.000000, 0.000000, -0.000001},
+ {-1.000000, 0.000000, -0.000001},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, -0.000002, 0.000001},
+ {-1.000000, -0.000002, 0.000001},
+ {-1.000000, -0.000002, 0.000001},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, 0.000001, 0.000001},
+ {1.000000, 0.000001, 0.000001},
+ {1.000000, 0.000001, 0.000001},
+ {1.000000, -0.000000, -0.000001},
+ {1.000000, -0.000000, -0.000001},
+ {1.000000, -0.000000, -0.000001},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, -0.000001},
+ {1.000000, -0.000000, -0.000001},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, 0.000001, 0.000000},
+ {1.000000, 0.000001, 0.000000},
+ {1.000000, 0.000001, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, 0.000001, 0.000000},
+ {1.000000, 0.000001, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.621757, 0.783210, -0.000000},
+ {-0.621757, 0.783210, -0.000000},
+ {-0.621757, 0.783210, -0.000000},
+ {-0.621757, 0.783210, -0.000000},
+ {0.000000, 0.778535, 0.627601},
+ {0.000000, 0.778535, 0.627601},
+ {0.000000, 0.778535, 0.627601},
+ {0.000000, 0.778535, 0.627601},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, 0.000000, -0.000003},
+ {1.000000, 0.000000, -0.000003},
+ {1.000000, 0.000000, -0.000003},
+ {1.000000, 0.000000, -0.000003},
+ {0.763484, -0.645827, 0.000000},
+ {0.763484, -0.645827, 0.000000},
+ {0.763484, -0.645827, 0.000000},
+ {0.763484, -0.645827, 0.000000},
+ {0.783210, 0.000000, 0.621758},
+ {0.783210, 0.000000, 0.621758},
+ {0.783210, 0.000000, 0.621758},
+ {0.783210, 0.000000, 0.621758},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000000},
+ {0.000000, 1.000000, -0.000002},
+ {0.000000, 1.000000, -0.000002},
+ {0.000000, 1.000000, -0.000002},
+ {0.000000, 1.000000, -0.000002},
+ {0.000000, 1.000000, -0.000002},
+ {0.000000, 1.000000, -0.000002},
+ {0.000000, 1.000000, -0.000002},
+ {0.000000, 1.000000, -0.000002},
+ {-0.000000, 1.000000, -0.000000},
+ {0.625724, 0.603819, 0.493834},
+ {0.625724, 0.603819, 0.493834},
+ {0.625724, 0.603819, 0.493834},
+ {0.625724, 0.603819, 0.493834},
+ {0.711015, 0.703177, -0.000001},
+ {0.711015, 0.703177, -0.000001},
+ {0.711015, 0.703177, -0.000001},
+ {0.711015, 0.703177, -0.000001},
+ {0.711015, 0.703177, -0.000000},
+ {0.711015, 0.703177, -0.000000},
+ {0.711015, 0.703177, -0.000000},
+ {0.711015, 0.703177, -0.000000},
+ {0.711015, 0.703177, -0.000000},
+ {0.711015, 0.703177, -0.000000},
+ {0.711015, 0.703177, -0.000000},
+ {0.711015, 0.703177, -0.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {0.000000, -0.621758, -0.783209},
+ {0.000000, -0.621758, -0.783209},
+ {0.000000, -0.621758, -0.783209},
+ {0.000000, -0.621758, -0.783209},
+ {-0.618479, 0.000000, -0.785801},
+ {-0.618479, 0.000000, -0.785801},
+ {-0.618479, 0.000000, -0.785801},
+ {-0.618479, 0.000000, -0.785801},
+ {0.000000, 0.000003, -1.000000},
+ {0.000000, 0.000003, -1.000000},
+ {0.000000, 0.000003, -1.000000},
+ {0.000000, 0.000003, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {0.593241, 0.578147, -0.560188},
+ {0.593241, 0.578147, -0.560188},
+ {0.593241, 0.578147, -0.560188},
+ {-0.489455, 0.612207, -0.620996},
+ {-0.489455, 0.612207, -0.620996},
+ {-0.489455, 0.612207, -0.620996},
+ {-0.489455, 0.612207, -0.620996},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000004, -0.000001, -1.000000},
+ {-0.000004, -0.000001, -1.000000},
+ {-0.000004, -0.000001, -1.000000},
+ {-0.000004, -0.000001, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {0.000000, 0.700306, -0.713843},
+ {0.000000, 0.700306, -0.713843},
+ {0.000000, 0.700306, -0.713843},
+ {0.000000, 0.700306, -0.713843},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {0.000002, 0.000003, -1.000000},
+ {0.000002, 0.000003, -1.000000},
+ {0.000002, 0.000003, -1.000000},
+ {0.000002, 0.000003, -1.000000},
+ {0.000001, 0.000002, -1.000000},
+ {0.000001, 0.000002, -1.000000},
+ {0.000001, 0.000002, -1.000000},
+ {0.000001, 0.000002, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {0.000000, 0.700306, -0.713842},
+ {0.000000, 0.700306, -0.713842},
+ {0.000000, 0.700306, -0.713842},
+ {0.000000, 0.700306, -0.713842},
+ {0.000000, 0.700307, -0.713842},
+ {0.000000, 0.700307, -0.713842},
+ {0.000000, 0.700307, -0.713842},
+ {0.000000, 0.700307, -0.713842},
+ {0.000000, 0.700307, -0.713842},
+ {0.000000, 0.700307, -0.713842},
+ {0.710974, 0.000000, -0.703218},
+ {0.710974, 0.000000, -0.703218},
+ {0.710974, 0.000000, -0.703218},
+ {0.710974, 0.000000, -0.703218},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000001, -0.000001},
+ {1.000000, -0.000001, -0.000001},
+ {1.000000, -0.000001, -0.000001},
+ {1.000000, -0.000001, -0.000001},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {0.710974, 0.000000, -0.703218},
+ {0.710974, 0.000000, -0.703218},
+ {0.710974, 0.000000, -0.703218},
+ {0.710974, 0.000000, -0.703218},
+ {0.710975, 0.000001, -0.703217},
+ {0.710975, 0.000001, -0.703217},
+ {0.710975, 0.000001, -0.703217},
+ {0.710975, 0.000001, -0.703217},
+ {0.710974, 0.000000, -0.703218},
+ {0.710974, 0.000000, -0.703218},
+ {0.593219, -0.502560, -0.628908},
+ {0.593219, -0.502560, -0.628908},
+ {0.593219, -0.502560, -0.628908},
+ {0.593219, -0.502560, -0.628908},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.621757, -0.000000, -0.783210},
+ {-0.621757, -0.000000, -0.783210},
+ {-0.621757, -0.000000, -0.783210},
+ {-0.621757, -0.000000, -0.783210},
+ {0.000000, 0.627601, -0.778535},
+ {0.000000, 0.627601, -0.778535},
+ {0.000000, 0.627601, -0.778535},
+ {0.000000, 0.627601, -0.778535},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {0.763484, 0.000000, 0.645827},
+ {0.763484, 0.000000, 0.645827},
+ {0.763484, 0.000000, 0.645827},
+ {0.763484, 0.000000, 0.645827},
+ {0.783210, 0.621757, -0.000000},
+ {0.783210, 0.621757, -0.000000},
+ {0.783210, 0.621757, -0.000000},
+ {0.783210, 0.621757, -0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {0.625724, 0.493833, -0.603820},
+ {0.625724, 0.493833, -0.603820},
+ {0.625724, 0.493833, -0.603820},
+ {0.625724, 0.493833, -0.603820},
+ {0.711013, 0.000000, -0.703178},
+ {0.711013, 0.000000, -0.703178},
+ {0.711013, 0.000000, -0.703178},
+ {0.711013, 0.000000, -0.703178},
+ {0.711013, 0.000000, -0.703178},
+ {0.711013, 0.000000, -0.703178},
+ {0.711014, -0.000000, -0.703178},
+ {0.711014, -0.000000, -0.703178},
+ {0.711014, -0.000000, -0.703178},
+ {0.711014, -0.000000, -0.703178},
+ {0.711014, -0.000000, -0.703178},
+ {0.711014, -0.000000, -0.703178},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -0.783210, 0.621758},
+ {0.000000, -0.783210, 0.621758},
+ {0.000000, -0.783210, 0.621758},
+ {0.000000, -0.783210, 0.621758},
+ {-0.618479, -0.785801, 0.000000},
+ {-0.618479, -0.785801, 0.000000},
+ {-0.618479, -0.785801, 0.000000},
+ {-0.618479, -0.785801, 0.000000},
+ {-0.000000, -1.000000, -0.000001},
+ {-0.000000, -1.000000, -0.000001},
+ {-0.000000, -1.000000, -0.000001},
+ {-0.000000, -1.000000, -0.000001},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.593240, -0.560188, -0.578148},
+ {0.593240, -0.560188, -0.578148},
+ {0.593240, -0.560188, -0.578148},
+ {-0.489456, -0.620997, -0.612206},
+ {-0.489456, -0.620997, -0.612206},
+ {-0.489456, -0.620997, -0.612206},
+ {-0.489456, -0.620997, -0.612206},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {-0.000002, -1.000000, 0.000000},
+ {-0.000002, -1.000000, 0.000000},
+ {-0.000002, -1.000000, 0.000000},
+ {-0.000002, -1.000000, 0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000001, -0.713843, -0.700306},
+ {0.000001, -0.713843, -0.700306},
+ {0.000001, -0.713843, -0.700306},
+ {0.000001, -0.713843, -0.700306},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000001},
+ {0.000001, -1.000000, -0.000001},
+ {0.000001, -1.000000, -0.000001},
+ {0.000001, -1.000000, -0.000001},
+ {0.000001, -1.000000, -0.000001},
+ {0.000001, -1.000000, -0.000001},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -0.713843, -0.700306},
+ {0.000000, -0.713843, -0.700306},
+ {0.000000, -0.713843, -0.700306},
+ {0.000000, -0.713843, -0.700306},
+ {0.000000, -0.713843, -0.700306},
+ {0.000000, -0.713843, -0.700306},
+ {0.000000, -0.713842, -0.700307},
+ {0.000000, -0.713842, -0.700307},
+ {0.000000, -0.713842, -0.700307},
+ {0.000000, -0.713842, -0.700307},
+ {0.710975, -0.703217, 0.000000},
+ {0.710975, -0.703217, 0.000000},
+ {0.710975, -0.703217, 0.000000},
+ {0.710975, -0.703217, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {0.710975, -0.703217, 0.000000},
+ {0.710975, -0.703217, 0.000000},
+ {0.710975, -0.703217, 0.000000},
+ {0.710975, -0.703217, 0.000000},
+ {0.710975, -0.703217, -0.000001},
+ {0.710975, -0.703217, -0.000001},
+ {0.710975, -0.703217, -0.000001},
+ {0.710975, -0.703217, -0.000001},
+ {0.710975, -0.703217, 0.000000},
+ {0.710975, -0.703217, 0.000000},
+ {0.593219, -0.628908, 0.502559},
+ {0.593219, -0.628908, 0.502559},
+ {0.593219, -0.628908, 0.502559},
+ {0.593219, -0.628908, 0.502559},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {0.621757, 0.783211, -0.000000},
+ {0.621757, 0.783211, -0.000000},
+ {0.621757, 0.783211, -0.000000},
+ {0.621757, 0.783211, -0.000000},
+ {0.000000, 0.778535, 0.627601},
+ {0.000000, 0.778535, 0.627601},
+ {0.000000, 0.778535, 0.627601},
+ {0.000000, 0.778535, 0.627601},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.763483, -0.645828, 0.000000},
+ {-0.763483, -0.645828, 0.000000},
+ {-0.763483, -0.645828, 0.000000},
+ {-0.763483, -0.645828, 0.000000},
+ {-0.783210, 0.000000, 0.621758},
+ {-0.783210, 0.000000, 0.621758},
+ {-0.783210, 0.000000, 0.621758},
+ {-0.783210, 0.000000, 0.621758},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000000},
+ {0.000000, 1.000000, -0.000002},
+ {0.000000, 1.000000, -0.000002},
+ {0.000000, 1.000000, -0.000002},
+ {0.000000, 1.000000, -0.000002},
+ {0.000000, 1.000000, -0.000002},
+ {0.000000, 1.000000, -0.000002},
+ {0.000000, 1.000000, -0.000002},
+ {0.000000, 1.000000, -0.000002},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.625723, 0.603820, 0.493834},
+ {-0.625723, 0.603820, 0.493834},
+ {-0.625723, 0.603820, 0.493834},
+ {-0.625723, 0.603820, 0.493834},
+ {-0.711013, 0.703179, -0.000000},
+ {-0.711013, 0.703179, -0.000000},
+ {-0.711013, 0.703179, -0.000000},
+ {-0.711013, 0.703179, -0.000000},
+ {-0.711013, 0.703179, -0.000000},
+ {-0.711013, 0.703179, -0.000000},
+ {-0.711013, 0.703179, -0.000000},
+ {-0.711013, 0.703179, -0.000000},
+ {-0.711013, 0.703178, -0.000000},
+ {-0.711013, 0.703178, -0.000000},
+ {-0.711013, 0.703178, -0.000000},
+ {-0.711013, 0.703178, -0.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.621758, -0.783210},
+ {-0.000000, -0.621758, -0.783210},
+ {-0.000000, -0.621758, -0.783210},
+ {-0.000000, -0.621758, -0.783210},
+ {0.618480, 0.000000, -0.785801},
+ {0.618480, 0.000000, -0.785801},
+ {0.618480, 0.000000, -0.785801},
+ {0.618480, 0.000000, -0.785801},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.593240, 0.578149, -0.560188},
+ {-0.593240, 0.578149, -0.560188},
+ {-0.593240, 0.578149, -0.560188},
+ {0.489456, 0.612208, -0.620995},
+ {0.489456, 0.612208, -0.620995},
+ {0.489456, 0.612208, -0.620995},
+ {0.489456, 0.612208, -0.620995},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {0.000000, 0.700307, -0.713842},
+ {0.000000, 0.700307, -0.713842},
+ {0.000000, 0.700307, -0.713842},
+ {0.000000, 0.700307, -0.713842},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {0.000000, 0.700307, -0.713842},
+ {0.000000, 0.700307, -0.713842},
+ {0.000000, 0.700307, -0.713841},
+ {0.000000, 0.700307, -0.713841},
+ {0.000000, 0.700307, -0.713841},
+ {0.000000, 0.700307, -0.713841},
+ {-0.000000, 0.700308, -0.713841},
+ {-0.000000, 0.700308, -0.713841},
+ {-0.000000, 0.700308, -0.713841},
+ {-0.000000, 0.700308, -0.713841},
+ {-0.710974, 0.000000, -0.703218},
+ {-0.710974, 0.000000, -0.703218},
+ {-0.710974, 0.000000, -0.703218},
+ {-0.710974, 0.000000, -0.703218},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.710974, 0.000000, -0.703218},
+ {-0.710974, 0.000000, -0.703218},
+ {-0.710974, 0.000000, -0.703218},
+ {-0.710974, 0.000000, -0.703218},
+ {-0.710974, 0.000000, -0.703218},
+ {-0.710974, 0.000000, -0.703218},
+ {-0.710974, 0.000000, -0.703218},
+ {-0.710974, 0.000000, -0.703218},
+ {-0.593218, -0.502560, -0.628908},
+ {-0.593218, -0.502560, -0.628908},
+ {-0.593218, -0.502560, -0.628908},
+ {-0.593218, -0.502560, -0.628908},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {0.621757, -0.000000, -0.783210},
+ {0.621757, -0.000000, -0.783210},
+ {0.621757, -0.000000, -0.783210},
+ {0.621757, -0.000000, -0.783210},
+ {0.000000, 0.627601, -0.778535},
+ {0.000000, 0.627601, -0.778535},
+ {0.000000, 0.627601, -0.778535},
+ {0.000000, 0.627601, -0.778535},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.763483, 0.000000, 0.645828},
+ {-0.763483, 0.000000, 0.645828},
+ {-0.763483, 0.000000, 0.645828},
+ {-0.763483, 0.000000, 0.645828},
+ {-0.783210, 0.621758, -0.000000},
+ {-0.783210, 0.621758, -0.000000},
+ {-0.783210, 0.621758, -0.000000},
+ {-0.783210, 0.621758, -0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.625723, 0.493833, -0.603820},
+ {-0.625723, 0.493833, -0.603820},
+ {-0.625723, 0.493833, -0.603820},
+ {-0.625723, 0.493833, -0.603820},
+ {-0.711013, 0.000000, -0.703179},
+ {-0.711013, 0.000000, -0.703179},
+ {-0.711013, 0.000000, -0.703179},
+ {-0.711013, 0.000000, -0.703179},
+ {-0.711013, 0.000000, -0.703179},
+ {-0.711013, 0.000000, -0.703179},
+ {-0.711013, 0.000000, -0.703179},
+ {-0.711013, 0.000000, -0.703179},
+ {-0.711013, -0.000000, -0.703178},
+ {-0.711013, -0.000000, -0.703178},
+ {-0.711013, -0.000000, -0.703178},
+ {-0.711013, -0.000000, -0.703178},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -0.783210, 0.621758},
+ {0.000000, -0.783210, 0.621758},
+ {0.000000, -0.783210, 0.621758},
+ {0.000000, -0.783210, 0.621758},
+ {0.618479, -0.785801, 0.000000},
+ {0.618479, -0.785801, 0.000000},
+ {0.618479, -0.785801, 0.000000},
+ {0.618479, -0.785801, 0.000000},
+ {-0.000000, -1.000000, -0.000001},
+ {-0.000000, -1.000000, -0.000001},
+ {-0.000000, -1.000000, -0.000001},
+ {-0.000000, -1.000000, -0.000001},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {-0.593239, -0.560188, -0.578149},
+ {-0.593239, -0.560188, -0.578149},
+ {-0.593239, -0.560188, -0.578149},
+ {0.489455, -0.620997, -0.612206},
+ {0.489455, -0.620997, -0.612206},
+ {0.489455, -0.620997, -0.612206},
+ {0.489455, -0.620997, -0.612206},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000002, -1.000000, 0.000000},
+ {0.000002, -1.000000, 0.000000},
+ {0.000002, -1.000000, 0.000000},
+ {0.000002, -1.000000, 0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -0.713843, -0.700305},
+ {0.000000, -0.713843, -0.700305},
+ {0.000000, -0.713843, -0.700305},
+ {0.000000, -0.713843, -0.700305},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {-0.000001, -1.000000, -0.000001},
+ {-0.000001, -1.000000, -0.000001},
+ {-0.000001, -1.000000, -0.000001},
+ {-0.000001, -1.000000, -0.000001},
+ {-0.000001, -1.000000, -0.000001},
+ {-0.000001, -1.000000, -0.000001},
+ {0.000000, -1.000000, -0.000000},
+ {-0.000001, -0.713843, -0.700306},
+ {-0.000001, -0.713843, -0.700306},
+ {-0.000001, -0.713843, -0.700306},
+ {-0.000001, -0.713843, -0.700306},
+ {0.000000, -0.713843, -0.700306},
+ {0.000000, -0.713843, -0.700306},
+ {0.000000, -0.713843, -0.700306},
+ {0.000000, -0.713843, -0.700306},
+ {0.000000, -0.713842, -0.700307},
+ {0.000000, -0.713842, -0.700307},
+ {0.000000, -0.713842, -0.700307},
+ {0.000000, -0.713842, -0.700307},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.710974, -0.703218, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.710974, -0.703218, -0.000001},
+ {-0.710974, -0.703218, -0.000001},
+ {-0.710974, -0.703218, -0.000001},
+ {-0.710974, -0.703218, -0.000001},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.593218, -0.628909, 0.502560},
+ {-0.593218, -0.628909, 0.502560},
+ {-0.593218, -0.628909, 0.502560},
+ {-0.593218, -0.628909, 0.502560},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {0.621757, 0.783211, -0.000000},
+ {0.621757, 0.783211, -0.000000},
+ {0.621757, 0.783211, -0.000000},
+ {0.621757, 0.783211, -0.000000},
+ {0.000000, 0.778535, -0.627601},
+ {0.000000, 0.778535, -0.627601},
+ {0.000000, 0.778535, -0.627601},
+ {0.000000, 0.778535, -0.627601},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-1.000000, -0.000001, -0.000004},
+ {-1.000000, -0.000001, -0.000004},
+ {-1.000000, -0.000001, -0.000004},
+ {-1.000000, -0.000001, -0.000004},
+ {-1.000000, 0.000000, 0.000004},
+ {-1.000000, 0.000000, 0.000004},
+ {-1.000000, 0.000000, 0.000004},
+ {-1.000000, 0.000000, 0.000004},
+ {-0.763483, -0.645828, 0.000000},
+ {-0.763483, -0.645828, 0.000000},
+ {-0.763483, -0.645828, 0.000000},
+ {-0.763483, -0.645828, 0.000000},
+ {-0.783210, 0.000000, -0.621758},
+ {-0.783210, 0.000000, -0.621758},
+ {-0.783210, 0.000000, -0.621758},
+ {-0.783210, 0.000000, -0.621758},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.625724, 0.603819, -0.493834},
+ {-0.625724, 0.603819, -0.493834},
+ {-0.625724, 0.603819, -0.493834},
+ {-0.625724, 0.603819, -0.493834},
+ {-0.711014, 0.703177, 0.000001},
+ {-0.711014, 0.703177, 0.000001},
+ {-0.711014, 0.703177, 0.000001},
+ {-0.711014, 0.703177, 0.000001},
+ {-0.711013, 0.703178, -0.000001},
+ {-0.711013, 0.703178, -0.000001},
+ {-0.711013, 0.703178, -0.000001},
+ {-0.711013, 0.703178, -0.000001},
+ {-0.711014, 0.703178, 0.000000},
+ {-0.711014, 0.703178, 0.000000},
+ {-0.711014, 0.703178, 0.000000},
+ {-0.711014, 0.703178, 0.000000},
+ {-0.711014, 0.703178, 0.000000},
+ {-0.711014, 0.703178, 0.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, -0.621758, 0.783210},
+ {-0.000000, -0.621758, 0.783210},
+ {-0.000000, -0.621758, 0.783210},
+ {-0.000000, -0.621758, 0.783210},
+ {0.618479, 0.000000, 0.785802},
+ {0.618479, 0.000000, 0.785802},
+ {0.618479, 0.000000, 0.785802},
+ {0.618479, 0.000000, 0.785802},
+ {-0.000000, 0.000002, 1.000000},
+ {-0.000000, 0.000002, 1.000000},
+ {-0.000000, 0.000002, 1.000000},
+ {-0.000000, 0.000002, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.593240, 0.578148, 0.560188},
+ {-0.593240, 0.578148, 0.560188},
+ {-0.593240, 0.578148, 0.560188},
+ {0.489455, 0.612207, 0.620996},
+ {0.489455, 0.612207, 0.620996},
+ {0.489455, 0.612207, 0.620996},
+ {0.489455, 0.612207, 0.620996},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000003, -0.000000, 1.000000},
+ {0.000003, -0.000000, 1.000000},
+ {0.000003, -0.000000, 1.000000},
+ {0.000003, -0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.700307, 0.713842},
+ {-0.000000, 0.700307, 0.713842},
+ {-0.000000, 0.700307, 0.713842},
+ {-0.000000, 0.700307, 0.713842},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000002, 0.000002, 1.000000},
+ {-0.000002, 0.000002, 1.000000},
+ {-0.000002, 0.000002, 1.000000},
+ {-0.000002, 0.000002, 1.000000},
+ {-0.000001, 0.000002, 1.000000},
+ {-0.000001, 0.000002, 1.000000},
+ {-0.000001, 0.000002, 1.000000},
+ {-0.000001, 0.000002, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.700307, 0.713842},
+ {-0.000000, 0.700307, 0.713842},
+ {-0.000000, 0.700307, 0.713842},
+ {-0.000000, 0.700307, 0.713842},
+ {-0.000000, 0.700307, 0.713842},
+ {-0.000000, 0.700307, 0.713842},
+ {-0.710973, 0.000000, 0.703219},
+ {-0.710973, 0.000000, 0.703219},
+ {-0.710973, 0.000000, 0.703219},
+ {-0.710973, 0.000000, 0.703219},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, -0.000006, -0.000009},
+ {-1.000000, -0.000006, -0.000009},
+ {-1.000000, -0.000006, -0.000009},
+ {-1.000000, -0.000006, -0.000009},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000003, -0.000001},
+ {-1.000000, 0.000003, -0.000001},
+ {-1.000000, 0.000003, -0.000001},
+ {-1.000000, 0.000003, -0.000001},
+ {-1.000000, -0.000001, -0.000003},
+ {-1.000000, -0.000001, -0.000003},
+ {-1.000000, -0.000001, -0.000003},
+ {-1.000000, -0.000001, -0.000003},
+ {-1.000000, 0.000005, -0.000001},
+ {-1.000000, 0.000005, -0.000001},
+ {-1.000000, 0.000005, -0.000001},
+ {-1.000000, 0.000005, -0.000001},
+ {-1.000000, -0.000002, 0.000002},
+ {-1.000000, -0.000002, 0.000002},
+ {-1.000000, -0.000002, 0.000002},
+ {-1.000000, -0.000002, 0.000002},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.710973, 0.000000, 0.703219},
+ {-0.710973, 0.000000, 0.703219},
+ {-0.710973, 0.000000, 0.703219},
+ {-0.710973, 0.000000, 0.703219},
+ {-0.710974, 0.000001, 0.703218},
+ {-0.710974, 0.000001, 0.703218},
+ {-0.710974, 0.000001, 0.703218},
+ {-0.710974, 0.000001, 0.703218},
+ {-0.710973, 0.000000, 0.703219},
+ {-0.710973, 0.000000, 0.703219},
+ {-0.593218, -0.502560, 0.628908},
+ {-0.593218, -0.502560, 0.628908},
+ {-0.593218, -0.502560, 0.628908},
+ {-0.593218, -0.502560, 0.628908},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.621757, -0.000000, 0.783210},
+ {0.621757, -0.000000, 0.783210},
+ {0.621757, -0.000000, 0.783210},
+ {0.621757, -0.000000, 0.783210},
+ {0.000000, 0.627602, 0.778535},
+ {0.000000, 0.627602, 0.778535},
+ {0.000000, 0.627602, 0.778535},
+ {0.000000, 0.627602, 0.778535},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.763484, -0.000000, -0.645827},
+ {-0.763484, -0.000000, -0.645827},
+ {-0.763484, -0.000000, -0.645827},
+ {-0.763484, -0.000000, -0.645827},
+ {-0.783209, 0.621758, 0.000000},
+ {-0.783209, 0.621758, 0.000000},
+ {-0.783209, 0.621758, 0.000000},
+ {-0.783209, 0.621758, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.625723, 0.493834, 0.603820},
+ {-0.625723, 0.493834, 0.603820},
+ {-0.625723, 0.493834, 0.603820},
+ {-0.625723, 0.493834, 0.603820},
+ {-0.711013, -0.000000, 0.703179},
+ {-0.711013, -0.000000, 0.703179},
+ {-0.711013, -0.000000, 0.703179},
+ {-0.711013, -0.000000, 0.703179},
+ {-0.711013, -0.000000, 0.703179},
+ {-0.711013, -0.000000, 0.703179},
+ {-0.711013, -0.000000, 0.703179},
+ {-0.711013, -0.000000, 0.703179},
+ {-0.711014, -0.000000, 0.703178},
+ {-0.711014, -0.000000, 0.703178},
+ {-0.711014, -0.000000, 0.703178},
+ {-0.711014, -0.000000, 0.703178},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {-0.000000, -0.783210, -0.621757},
+ {-0.000000, -0.783210, -0.621757},
+ {-0.000000, -0.783210, -0.621757},
+ {-0.000000, -0.783210, -0.621757},
+ {0.618479, -0.785801, 0.000000},
+ {0.618479, -0.785801, 0.000000},
+ {0.618479, -0.785801, 0.000000},
+ {0.618479, -0.785801, 0.000000},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {-0.593240, -0.560189, 0.578148},
+ {-0.593240, -0.560189, 0.578148},
+ {-0.593240, -0.560189, 0.578148},
+ {0.489455, -0.620996, 0.612207},
+ {0.489455, -0.620996, 0.612207},
+ {0.489455, -0.620996, 0.612207},
+ {0.489455, -0.620996, 0.612207},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000002, -1.000000, 0.000000},
+ {0.000002, -1.000000, 0.000000},
+ {0.000002, -1.000000, 0.000000},
+ {0.000002, -1.000000, 0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -0.713843, 0.700306},
+ {0.000000, -0.713843, 0.700306},
+ {0.000000, -0.713843, 0.700306},
+ {0.000000, -0.713843, 0.700306},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {-0.000001, -1.000000, 0.000001},
+ {-0.000001, -1.000000, 0.000001},
+ {-0.000001, -1.000000, 0.000001},
+ {-0.000001, -1.000000, 0.000001},
+ {-0.000001, -1.000000, 0.000001},
+ {-0.000001, -1.000000, 0.000001},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -0.713843, 0.700306},
+ {0.000000, -0.713843, 0.700306},
+ {0.000000, -0.713843, 0.700306},
+ {0.000000, -0.713843, 0.700306},
+ {0.000000, -0.713843, 0.700306},
+ {0.000000, -0.713843, 0.700306},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.710974, -0.703218, 0.000000},
+ {-1.000000, 0.000000, -0.000003},
+ {-1.000000, 0.000000, -0.000003},
+ {-1.000000, 0.000000, -0.000003},
+ {-1.000000, 0.000000, -0.000003},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, -0.000002},
+ {-1.000000, 0.000000, -0.000002},
+ {-1.000000, 0.000000, -0.000002},
+ {-1.000000, 0.000000, -0.000002},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, -0.000001, -0.000002},
+ {-1.000000, -0.000001, -0.000002},
+ {-1.000000, -0.000001, -0.000002},
+ {-1.000000, -0.000001, -0.000002},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000001, -0.000003},
+ {-1.000000, 0.000001, -0.000003},
+ {-1.000000, 0.000001, -0.000003},
+ {-1.000000, 0.000001, -0.000003},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.710975, -0.703217, -0.000002},
+ {-0.710975, -0.703217, -0.000002},
+ {-0.710975, -0.703217, -0.000002},
+ {-0.710975, -0.703217, -0.000002},
+ {-0.710976, -0.703216, 0.000001},
+ {-0.710976, -0.703216, 0.000001},
+ {-0.710976, -0.703216, 0.000001},
+ {-0.710976, -0.703216, 0.000001},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.710974, -0.703218, 0.000000},
+ {-0.593220, -0.628908, -0.502558},
+ {-0.593220, -0.628908, -0.502558},
+ {-0.593220, -0.628908, -0.502558},
+ {-0.593220, -0.628908, -0.502558},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.621757, 0.783211, 0.000000},
+ {-0.621757, 0.783211, 0.000000},
+ {-0.621757, 0.783211, 0.000000},
+ {-0.621757, 0.783211, 0.000000},
+ {0.000000, 0.778535, -0.627601},
+ {0.000000, 0.778535, -0.627601},
+ {0.000000, 0.778535, -0.627601},
+ {0.000000, 0.778535, -0.627601},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {1.000000, 0.000001, 0.000004},
+ {1.000000, 0.000001, 0.000004},
+ {1.000000, 0.000001, 0.000004},
+ {1.000000, 0.000001, 0.000004},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {0.763484, -0.645827, 0.000000},
+ {0.763484, -0.645827, 0.000000},
+ {0.763484, -0.645827, 0.000000},
+ {0.763484, -0.645827, 0.000000},
+ {0.783210, 0.000000, -0.621758},
+ {0.783210, 0.000000, -0.621758},
+ {0.783210, 0.000000, -0.621758},
+ {0.783210, 0.000000, -0.621758},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, -0.000000},
+ {0.625722, 0.603821, -0.493834},
+ {0.625722, 0.603821, -0.493834},
+ {0.625722, 0.603821, -0.493834},
+ {0.625722, 0.603821, -0.493834},
+ {0.711013, 0.703179, 0.000000},
+ {0.711013, 0.703179, 0.000000},
+ {0.711013, 0.703179, 0.000000},
+ {0.711013, 0.703179, 0.000000},
+ {0.711015, 0.703177, 0.000001},
+ {0.711015, 0.703177, 0.000001},
+ {0.711015, 0.703177, 0.000001},
+ {0.711015, 0.703177, 0.000001},
+ {0.711015, 0.703177, -0.000000},
+ {0.711015, 0.703177, -0.000000},
+ {0.711015, 0.703177, -0.000000},
+ {0.711015, 0.703177, -0.000000},
+ {0.711015, 0.703177, -0.000000},
+ {0.711015, 0.703177, -0.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000000, -0.621757, 0.783210},
+ {0.000000, -0.621757, 0.783210},
+ {0.000000, -0.621757, 0.783210},
+ {0.000000, -0.621757, 0.783210},
+ {-0.618479, 0.000000, 0.785801},
+ {-0.618479, 0.000000, 0.785801},
+ {-0.618479, 0.000000, 0.785801},
+ {-0.618479, 0.000000, 0.785801},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.593241, 0.578149, 0.560187},
+ {0.593241, 0.578149, 0.560187},
+ {0.593241, 0.578149, 0.560187},
+ {-0.489456, 0.612207, 0.620995},
+ {-0.489456, 0.612207, 0.620995},
+ {-0.489456, 0.612207, 0.620995},
+ {-0.489456, 0.612207, 0.620995},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000001, 0.700307, 0.713842},
+ {0.000001, 0.700307, 0.713842},
+ {0.000001, 0.700307, 0.713842},
+ {0.000001, 0.700307, 0.713842},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000000, 0.700308, 0.713841},
+ {0.000000, 0.700308, 0.713841},
+ {0.000000, 0.700308, 0.713841},
+ {0.000000, 0.700308, 0.713841},
+ {0.000000, 0.700308, 0.713841},
+ {0.000000, 0.700308, 0.713841},
+ {0.000000, 0.700308, 0.713841},
+ {0.000000, 0.700308, 0.713841},
+ {0.710975, 0.000000, 0.703217},
+ {0.710975, 0.000000, 0.703217},
+ {0.710975, 0.000000, 0.703217},
+ {0.710975, 0.000000, 0.703217},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, 0.000006, 0.000009},
+ {1.000000, 0.000006, 0.000009},
+ {1.000000, 0.000006, 0.000009},
+ {1.000000, 0.000006, 0.000009},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000003, 0.000001},
+ {1.000000, -0.000003, 0.000001},
+ {1.000000, -0.000003, 0.000001},
+ {1.000000, -0.000003, 0.000001},
+ {1.000000, 0.000001, 0.000003},
+ {1.000000, 0.000001, 0.000003},
+ {1.000000, 0.000001, 0.000003},
+ {1.000000, 0.000001, 0.000003},
+ {1.000000, -0.000005, 0.000001},
+ {1.000000, -0.000005, 0.000001},
+ {1.000000, -0.000005, 0.000001},
+ {1.000000, -0.000005, 0.000001},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {0.710975, 0.000000, 0.703217},
+ {0.710975, 0.000000, 0.703217},
+ {0.710975, 0.000000, 0.703217},
+ {0.710975, 0.000000, 0.703217},
+ {0.710975, 0.000000, 0.703217},
+ {0.710975, 0.000000, 0.703217},
+ {0.710975, 0.000000, 0.703217},
+ {0.710975, 0.000000, 0.703217},
+ {0.593219, -0.502560, 0.628908},
+ {0.593219, -0.502560, 0.628908},
+ {0.593219, -0.502560, 0.628908},
+ {0.593219, -0.502560, 0.628908},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.621757, -0.000000, 0.783210},
+ {-0.621757, -0.000000, 0.783210},
+ {-0.621757, -0.000000, 0.783210},
+ {-0.621757, -0.000000, 0.783210},
+ {0.000000, 0.627602, 0.778535},
+ {0.000000, 0.627602, 0.778535},
+ {0.000000, 0.627602, 0.778535},
+ {0.000000, 0.627602, 0.778535},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {0.763483, 0.000000, -0.645828},
+ {0.763483, 0.000000, -0.645828},
+ {0.763483, 0.000000, -0.645828},
+ {0.763483, 0.000000, -0.645828},
+ {0.783210, 0.621757, -0.000000},
+ {0.783210, 0.621757, -0.000000},
+ {0.783210, 0.621757, -0.000000},
+ {0.783210, 0.621757, -0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.625725, 0.493834, 0.603818},
+ {0.625725, 0.493834, 0.603818},
+ {0.625725, 0.493834, 0.603818},
+ {0.625725, 0.493834, 0.603818},
+ {0.711014, -0.000000, 0.703178},
+ {0.711014, -0.000000, 0.703178},
+ {0.711014, -0.000000, 0.703178},
+ {0.711014, -0.000000, 0.703178},
+ {0.711014, -0.000000, 0.703178},
+ {0.711014, -0.000000, 0.703178},
+ {0.711015, -0.000000, 0.703177},
+ {0.711015, -0.000000, 0.703177},
+ {0.711015, -0.000000, 0.703177},
+ {0.711015, -0.000000, 0.703177},
+ {0.711015, -0.000000, 0.703177},
+ {0.711015, -0.000000, 0.703177},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {-0.000000, -0.783210, -0.621757},
+ {-0.000000, -0.783210, -0.621757},
+ {-0.000000, -0.783210, -0.621757},
+ {-0.000000, -0.783210, -0.621757},
+ {-0.618479, -0.785801, 0.000000},
+ {-0.618479, -0.785801, 0.000000},
+ {-0.618479, -0.785801, 0.000000},
+ {-0.618479, -0.785801, 0.000000},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.593241, -0.560187, 0.578148},
+ {0.593241, -0.560187, 0.578148},
+ {0.593241, -0.560187, 0.578148},
+ {-0.489455, -0.620997, 0.612206},
+ {-0.489455, -0.620997, 0.612206},
+ {-0.489455, -0.620997, 0.612206},
+ {-0.489455, -0.620997, 0.612206},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {-0.000002, -1.000000, 0.000000},
+ {-0.000002, -1.000000, 0.000000},
+ {-0.000002, -1.000000, 0.000000},
+ {-0.000002, -1.000000, 0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000001, -0.713843, 0.700306},
+ {0.000001, -0.713843, 0.700306},
+ {0.000001, -0.713843, 0.700306},
+ {0.000001, -0.713843, 0.700306},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000001, -1.000000, 0.000001},
+ {0.000001, -1.000000, 0.000001},
+ {0.000001, -1.000000, 0.000001},
+ {0.000001, -1.000000, 0.000001},
+ {0.000001, -1.000000, 0.000001},
+ {0.000001, -1.000000, 0.000001},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -0.713843, 0.700306},
+ {0.000000, -0.713843, 0.700306},
+ {0.000000, -0.713843, 0.700306},
+ {0.000000, -0.713843, 0.700306},
+ {0.000000, -0.713843, 0.700306},
+ {0.000000, -0.713843, 0.700306},
+ {0.000000, -0.713842, 0.700307},
+ {0.000000, -0.713842, 0.700307},
+ {0.000000, -0.713842, 0.700307},
+ {0.000000, -0.713842, 0.700307},
+ {0.710975, -0.703217, 0.000000},
+ {0.710975, -0.703217, 0.000000},
+ {0.710975, -0.703217, 0.000000},
+ {0.710975, -0.703217, 0.000000},
+ {1.000000, -0.000000, 0.000003},
+ {1.000000, -0.000000, 0.000003},
+ {1.000000, -0.000000, 0.000003},
+ {1.000000, -0.000000, 0.000003},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000002},
+ {1.000000, -0.000000, 0.000002},
+ {1.000000, -0.000000, 0.000002},
+ {1.000000, -0.000000, 0.000002},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, 0.000001, 0.000002},
+ {1.000000, 0.000001, 0.000002},
+ {1.000000, 0.000001, 0.000002},
+ {1.000000, 0.000001, 0.000002},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000001, 0.000003},
+ {1.000000, -0.000001, 0.000003},
+ {1.000000, -0.000001, 0.000003},
+ {1.000000, -0.000001, 0.000003},
+ {1.000000, -0.000000, 0.000000},
+ {0.710975, -0.703218, 0.000002},
+ {0.710975, -0.703218, 0.000002},
+ {0.710975, -0.703218, 0.000002},
+ {0.710975, -0.703218, 0.000002},
+ {0.710974, -0.703218, 0.000001},
+ {0.710974, -0.703218, 0.000001},
+ {0.710974, -0.703218, 0.000001},
+ {0.710974, -0.703218, 0.000001},
+ {0.710976, -0.703217, 0.000000},
+ {0.710976, -0.703217, 0.000000},
+ {0.710976, -0.703217, 0.000000},
+ {0.710976, -0.703217, 0.000000},
+ {0.593218, -0.628909, -0.502559},
+ {0.593218, -0.628909, -0.502559},
+ {0.593218, -0.628909, -0.502559},
+ {0.593218, -0.628909, -0.502559},
+ {-0.000001, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {-0.896172, -0.443708, 0.000000},
+ {-0.896172, -0.443708, 0.000000},
+ {-0.896172, -0.443708, 0.000000},
+ {-0.896172, -0.443708, 0.000000},
+ {0.896529, -0.442986, -0.000001},
+ {0.896529, -0.442986, -0.000001},
+ {0.896529, -0.442986, -0.000001},
+ {0.896529, -0.442986, -0.000001},
+ {0.630906, -0.533044, 0.563757},
+ {0.630906, -0.533044, 0.563757},
+ {0.630906, -0.533044, 0.563757},
+ {0.630906, -0.533044, 0.563757},
+ {-0.616629, -0.532810, 0.579553},
+ {-0.616629, -0.532810, 0.579553},
+ {-0.616629, -0.532810, 0.579553},
+ {-0.616629, -0.532810, 0.579553},
+ {-0.616631, 0.579553, -0.532808},
+ {-0.616631, 0.579553, -0.532808},
+ {-0.616631, 0.579553, -0.532808},
+ {-0.616631, 0.579553, -0.532808},
+ {0.630906, 0.563757, -0.533044},
+ {0.630906, 0.563757, -0.533044},
+ {0.630906, 0.563757, -0.533044},
+ {0.630906, 0.563757, -0.533044},
+ {0.896529, -0.000000, -0.442985},
+ {0.896529, -0.000000, -0.442985},
+ {0.896529, -0.000000, -0.442985},
+ {0.896529, -0.000000, -0.442985},
+ {-0.896172, -0.000000, -0.443706},
+ {-0.896172, -0.000000, -0.443706},
+ {-0.896172, -0.000000, -0.443706},
+ {-0.896172, -0.000000, -0.443706},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {0.000001, -0.000000, -1.000000},
+ {0.000001, -0.000000, -1.000000},
+ {0.000001, -0.000000, -1.000000},
+ {0.000001, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.818880, -0.405856, -0.405854},
+ {-0.818880, -0.405856, -0.405854},
+ {-0.818880, -0.405856, -0.405854},
+ {-0.818880, -0.405856, -0.405854},
+ {0.000001, -0.707838, -0.706375},
+ {0.000001, -0.707838, -0.706375},
+ {0.000001, -0.707838, -0.706375},
+ {0.000001, -0.707838, -0.706375},
+ {-0.000000, -0.707837, -0.706375},
+ {-0.000000, -0.707837, -0.706375},
+ {-0.000000, -0.707837, -0.706375},
+ {-0.000000, -0.707837, -0.706375},
+ {0.000000, -0.707837, -0.706376},
+ {0.000000, -0.707837, -0.706376},
+ {0.000000, -0.707837, -0.706376},
+ {0.000000, -0.707837, -0.706376},
+ {-0.000001, -0.707837, -0.706376},
+ {-0.000001, -0.707837, -0.706376},
+ {-0.000001, -0.707837, -0.706376},
+ {-0.000001, -0.707837, -0.706376},
+ {0.000000, -0.707837, -0.706376},
+ {0.000000, -0.707837, -0.706376},
+ {0.000000, -0.707837, -0.706376},
+ {0.000000, -0.707837, -0.706376},
+ {0.000000, -0.707836, -0.706377},
+ {0.000000, -0.707836, -0.706377},
+ {0.000000, -0.707836, -0.706377},
+ {0.000000, -0.707836, -0.706377},
+ {0.819425, -0.405305, -0.405303},
+ {0.819425, -0.405305, -0.405303},
+ {0.819425, -0.405305, -0.405303},
+ {0.819425, -0.405305, -0.405303},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {0.000001, 1.000000, -0.000000},
+ {0.000001, 1.000000, -0.000000},
+ {0.000001, 1.000000, -0.000000},
+ {0.000001, 1.000000, -0.000000},
+ {0.000001, 1.000000, -0.000000},
+ {0.000001, 1.000000, -0.000000},
+ {0.000001, 1.000000, -0.000000},
+ {0.000001, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {0.000001, 1.000000, -0.000000},
+ {0.000001, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {0.896172, 0.443707, 0.000000},
+ {0.896172, 0.443707, 0.000000},
+ {0.896172, 0.443707, 0.000000},
+ {0.896172, 0.443707, 0.000000},
+ {-0.896528, 0.442986, -0.000000},
+ {-0.896528, 0.442986, -0.000000},
+ {-0.896528, 0.442986, -0.000000},
+ {-0.896528, 0.442986, -0.000000},
+ {-0.630906, 0.533046, 0.563756},
+ {-0.630906, 0.533046, 0.563756},
+ {-0.630906, 0.533046, 0.563756},
+ {-0.630906, 0.533046, 0.563756},
+ {0.616631, 0.532810, 0.579551},
+ {0.616631, 0.532810, 0.579551},
+ {0.616631, 0.532810, 0.579551},
+ {0.616631, 0.532810, 0.579551},
+ {0.616631, -0.579553, -0.532809},
+ {0.616631, -0.579553, -0.532809},
+ {0.616631, -0.579553, -0.532809},
+ {0.616631, -0.579553, -0.532809},
+ {-0.630906, -0.563756, -0.533045},
+ {-0.630906, -0.563756, -0.533045},
+ {-0.630906, -0.563756, -0.533045},
+ {-0.630906, -0.563756, -0.533045},
+ {-0.896528, 0.000000, -0.442986},
+ {-0.896528, 0.000000, -0.442986},
+ {-0.896528, 0.000000, -0.442986},
+ {-0.896528, 0.000000, -0.442986},
+ {0.896172, -0.000000, -0.443706},
+ {0.896172, -0.000000, -0.443706},
+ {0.896172, -0.000000, -0.443706},
+ {0.896172, -0.000000, -0.443706},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000002, 0.000000, -1.000000},
+ {-0.000002, 0.000000, -1.000000},
+ {-0.000002, 0.000000, -1.000000},
+ {-0.000002, 0.000000, -1.000000},
+ {0.000002, -0.000000, -1.000000},
+ {0.000002, -0.000000, -1.000000},
+ {0.000002, -0.000000, -1.000000},
+ {0.000002, -0.000000, -1.000000},
+ {0.818879, 0.405856, -0.405854},
+ {0.818879, 0.405856, -0.405854},
+ {0.818879, 0.405856, -0.405854},
+ {0.818879, 0.405856, -0.405854},
+ {-0.000001, 0.707837, -0.706376},
+ {-0.000001, 0.707837, -0.706376},
+ {-0.000001, 0.707837, -0.706376},
+ {-0.000001, 0.707837, -0.706376},
+ {0.000001, 0.707836, -0.706377},
+ {0.000001, 0.707836, -0.706377},
+ {0.000001, 0.707836, -0.706377},
+ {0.000001, 0.707836, -0.706377},
+ {0.000000, 0.707836, -0.706377},
+ {0.000000, 0.707836, -0.706377},
+ {0.000000, 0.707836, -0.706377},
+ {0.000000, 0.707836, -0.706377},
+ {0.000000, 0.707836, -0.706377},
+ {0.000000, 0.707836, -0.706377},
+ {0.000000, 0.707836, -0.706377},
+ {0.000000, 0.707836, -0.706377},
+ {0.000003, 0.707836, -0.706377},
+ {0.000003, 0.707836, -0.706377},
+ {0.000003, 0.707836, -0.706377},
+ {0.000003, 0.707836, -0.706377},
+ {-0.819425, 0.405304, -0.405304},
+ {-0.819425, 0.405304, -0.405304},
+ {-0.819425, 0.405304, -0.405304},
+ {-0.819425, 0.405304, -0.405304},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {0.443707, -0.896172, 0.000000},
+ {0.443707, -0.896172, 0.000000},
+ {0.443707, -0.896172, 0.000000},
+ {0.443707, -0.896172, 0.000000},
+ {0.442986, 0.896528, -0.000000},
+ {0.442986, 0.896528, -0.000000},
+ {0.442986, 0.896528, -0.000000},
+ {0.442986, 0.896528, -0.000000},
+ {0.533045, 0.630906, 0.563756},
+ {0.533045, 0.630906, 0.563756},
+ {0.533045, 0.630906, 0.563756},
+ {0.533045, 0.630906, 0.563756},
+ {0.532809, -0.616631, 0.579552},
+ {0.532809, -0.616631, 0.579552},
+ {0.532809, -0.616631, 0.579552},
+ {0.532809, -0.616631, 0.579552},
+ {-0.579553, -0.616631, -0.532809},
+ {-0.579553, -0.616631, -0.532809},
+ {-0.579553, -0.616631, -0.532809},
+ {-0.579553, -0.616631, -0.532809},
+ {-0.563756, 0.630907, -0.533044},
+ {-0.563756, 0.630907, -0.533044},
+ {-0.563756, 0.630907, -0.533044},
+ {-0.563756, 0.630907, -0.533044},
+ {0.000001, 0.896529, -0.442986},
+ {0.000001, 0.896529, -0.442986},
+ {0.000001, 0.896529, -0.442986},
+ {0.000001, 0.896529, -0.442986},
+ {0.000000, -0.896172, -0.443707},
+ {0.000000, -0.896172, -0.443707},
+ {0.000000, -0.896172, -0.443707},
+ {0.000000, -0.896172, -0.443707},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {0.405854, -0.818880, -0.405855},
+ {0.405854, -0.818880, -0.405855},
+ {0.405854, -0.818880, -0.405855},
+ {0.405854, -0.818880, -0.405855},
+ {0.707836, 0.000000, -0.706377},
+ {0.707836, 0.000000, -0.706377},
+ {0.707836, 0.000000, -0.706377},
+ {0.707836, 0.000000, -0.706377},
+ {0.707836, 0.000000, -0.706377},
+ {0.707836, 0.000000, -0.706377},
+ {0.707836, 0.000000, -0.706377},
+ {0.707836, 0.000000, -0.706377},
+ {0.707836, 0.000000, -0.706377},
+ {0.707836, 0.000000, -0.706377},
+ {0.707836, 0.000000, -0.706377},
+ {0.707836, 0.000000, -0.706377},
+ {0.707836, 0.000000, -0.706377},
+ {0.707836, 0.000000, -0.706377},
+ {0.405304, 0.819425, -0.405304},
+ {0.405304, 0.819425, -0.405304},
+ {0.405304, 0.819425, -0.405304},
+ {0.405304, 0.819425, -0.405304},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, -0.000001, -0.000001},
+ {-1.000000, -0.000001, -0.000001},
+ {-1.000000, -0.000001, -0.000001},
+ {-1.000000, -0.000001, -0.000001},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, -0.000002, -0.000001},
+ {-1.000000, -0.000002, -0.000001},
+ {-1.000000, -0.000002, -0.000001},
+ {-1.000000, -0.000002, -0.000001},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.443706, 0.896172, -0.000001},
+ {-0.443706, 0.896172, -0.000001},
+ {-0.443706, 0.896172, -0.000001},
+ {-0.443706, 0.896172, -0.000001},
+ {-0.442986, -0.896528, -0.000000},
+ {-0.442986, -0.896528, -0.000000},
+ {-0.442986, -0.896528, -0.000000},
+ {-0.442986, -0.896528, -0.000000},
+ {-0.533044, -0.630907, 0.563756},
+ {-0.533044, -0.630907, 0.563756},
+ {-0.533044, -0.630907, 0.563756},
+ {-0.533044, -0.630907, 0.563756},
+ {-0.532808, 0.616632, 0.579552},
+ {-0.532808, 0.616632, 0.579552},
+ {-0.532808, 0.616632, 0.579552},
+ {-0.532808, 0.616632, 0.579552},
+ {0.579552, 0.616631, -0.532809},
+ {0.579552, 0.616631, -0.532809},
+ {0.579552, 0.616631, -0.532809},
+ {0.579552, 0.616631, -0.532809},
+ {0.563756, -0.630906, -0.533045},
+ {0.563756, -0.630906, -0.533045},
+ {0.563756, -0.630906, -0.533045},
+ {0.563756, -0.630906, -0.533045},
+ {-0.000000, -0.896528, -0.442986},
+ {-0.000000, -0.896528, -0.442986},
+ {-0.000000, -0.896528, -0.442986},
+ {-0.000000, -0.896528, -0.442986},
+ {0.000000, 0.896172, -0.443707},
+ {0.000000, 0.896172, -0.443707},
+ {0.000000, 0.896172, -0.443707},
+ {0.000000, 0.896172, -0.443707},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.405854, 0.818880, -0.405856},
+ {-0.405854, 0.818880, -0.405856},
+ {-0.405854, 0.818880, -0.405856},
+ {-0.405854, 0.818880, -0.405856},
+ {-0.707836, 0.000000, -0.706377},
+ {-0.707836, 0.000000, -0.706377},
+ {-0.707836, 0.000000, -0.706377},
+ {-0.707836, 0.000000, -0.706377},
+ {-0.707837, 0.000001, -0.706376},
+ {-0.707837, 0.000001, -0.706376},
+ {-0.707837, 0.000001, -0.706376},
+ {-0.707837, 0.000001, -0.706376},
+ {-0.707837, 0.000000, -0.706376},
+ {-0.707837, 0.000000, -0.706376},
+ {-0.707837, 0.000000, -0.706376},
+ {-0.707837, 0.000000, -0.706376},
+ {-0.707837, -0.000001, -0.706376},
+ {-0.707837, -0.000001, -0.706376},
+ {-0.707837, -0.000001, -0.706376},
+ {-0.707837, -0.000001, -0.706376},
+ {-0.707836, 0.000000, -0.706377},
+ {-0.707836, 0.000000, -0.706377},
+ {-0.707836, 0.000000, -0.706377},
+ {-0.707836, 0.000000, -0.706377},
+ {-0.707836, 0.000000, -0.706377},
+ {-0.707836, 0.000000, -0.706377},
+ {-0.405305, -0.819424, -0.405305},
+ {-0.405305, -0.819424, -0.405305},
+ {-0.405305, -0.819424, -0.405305},
+ {-0.405305, -0.819424, -0.405305},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000001},
+ {-1.000000, 0.000000, 0.000001},
+ {-1.000000, 0.000000, 0.000001},
+ {-1.000000, 0.000000, 0.000001},
+ {-1.000000, 0.000000, -0.000001},
+ {-1.000000, 0.000000, -0.000001},
+ {-1.000000, 0.000000, -0.000001},
+ {-1.000000, 0.000000, -0.000001},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.443705, -0.000000, -0.896173},
+ {-0.443705, -0.000000, -0.896173},
+ {-0.443705, -0.000000, -0.896173},
+ {-0.443705, -0.000000, -0.896173},
+ {-0.442987, -0.000000, 0.896528},
+ {-0.442987, -0.000000, 0.896528},
+ {-0.442987, -0.000000, 0.896528},
+ {-0.442987, -0.000000, 0.896528},
+ {-0.533045, 0.563756, 0.630906},
+ {-0.533045, 0.563756, 0.630906},
+ {-0.533045, 0.563756, 0.630906},
+ {-0.533045, 0.563756, 0.630906},
+ {-0.532809, 0.579552, -0.616631},
+ {-0.532809, 0.579552, -0.616631},
+ {-0.532809, 0.579552, -0.616631},
+ {-0.532809, 0.579552, -0.616631},
+ {0.579553, -0.532808, -0.616631},
+ {0.579553, -0.532808, -0.616631},
+ {0.579553, -0.532808, -0.616631},
+ {0.579553, -0.532808, -0.616631},
+ {0.563755, -0.533045, 0.630907},
+ {0.563755, -0.533045, 0.630907},
+ {0.563755, -0.533045, 0.630907},
+ {0.563755, -0.533045, 0.630907},
+ {-0.000001, -0.442986, 0.896528},
+ {-0.000001, -0.442986, 0.896528},
+ {-0.000001, -0.442986, 0.896528},
+ {-0.000001, -0.442986, 0.896528},
+ {0.000000, -0.443707, -0.896172},
+ {0.000000, -0.443707, -0.896172},
+ {0.000000, -0.443707, -0.896172},
+ {0.000000, -0.443707, -0.896172},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000001, -1.000000, 0.000003},
+ {0.000001, -1.000000, 0.000003},
+ {0.000001, -1.000000, 0.000003},
+ {0.000001, -1.000000, 0.000003},
+ {-0.405853, -0.405856, -0.818880},
+ {-0.405853, -0.405856, -0.818880},
+ {-0.405853, -0.405856, -0.818880},
+ {-0.405853, -0.405856, -0.818880},
+ {-0.707836, -0.706377, 0.000000},
+ {-0.707836, -0.706377, 0.000000},
+ {-0.707836, -0.706377, 0.000000},
+ {-0.707836, -0.706377, 0.000000},
+ {-0.707837, -0.706376, -0.000001},
+ {-0.707837, -0.706376, -0.000001},
+ {-0.707837, -0.706376, -0.000001},
+ {-0.707837, -0.706376, -0.000001},
+ {-0.707837, -0.706376, -0.000000},
+ {-0.707837, -0.706376, -0.000000},
+ {-0.707837, -0.706376, -0.000000},
+ {-0.707837, -0.706376, -0.000000},
+ {-0.707837, -0.706376, -0.000000},
+ {-0.707837, -0.706376, -0.000000},
+ {-0.707837, -0.706376, -0.000000},
+ {-0.707837, -0.706376, -0.000000},
+ {-0.707837, -0.706376, 0.000001},
+ {-0.707837, -0.706376, 0.000001},
+ {-0.707837, -0.706376, 0.000001},
+ {-0.707837, -0.706376, 0.000001},
+ {-0.405304, -0.405305, 0.819425},
+ {-0.405304, -0.405305, 0.819425},
+ {-0.405304, -0.405305, 0.819425},
+ {-0.405304, -0.405305, 0.819425},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.443707, 0.000000, 0.896172},
+ {-0.443707, 0.000000, 0.896172},
+ {-0.443707, 0.000000, 0.896172},
+ {-0.443707, 0.000000, 0.896172},
+ {-0.442985, 0.000000, -0.896529},
+ {-0.442985, 0.000000, -0.896529},
+ {-0.442985, 0.000000, -0.896529},
+ {-0.442985, 0.000000, -0.896529},
+ {-0.533043, -0.563757, -0.630907},
+ {-0.533043, -0.563757, -0.630907},
+ {-0.533043, -0.563757, -0.630907},
+ {-0.533043, -0.563757, -0.630907},
+ {-0.532809, -0.579553, 0.616630},
+ {-0.532809, -0.579553, 0.616630},
+ {-0.532809, -0.579553, 0.616630},
+ {-0.532809, -0.579553, 0.616630},
+ {0.579552, 0.532808, 0.616632},
+ {0.579552, 0.532808, 0.616632},
+ {0.579552, 0.532808, 0.616632},
+ {0.579552, 0.532808, 0.616632},
+ {0.563757, 0.533043, -0.630907},
+ {0.563757, 0.533043, -0.630907},
+ {0.563757, 0.533043, -0.630907},
+ {0.563757, 0.533043, -0.630907},
+ {-0.000000, 0.442985, -0.896529},
+ {-0.000000, 0.442985, -0.896529},
+ {-0.000000, 0.442985, -0.896529},
+ {-0.000000, 0.442985, -0.896529},
+ {-0.000001, 0.443707, 0.896172},
+ {-0.000001, 0.443707, 0.896172},
+ {-0.000001, 0.443707, 0.896172},
+ {-0.000001, 0.443707, 0.896172},
+ {-0.000001, 1.000000, -0.000001},
+ {-0.000001, 1.000000, -0.000001},
+ {-0.000001, 1.000000, -0.000001},
+ {-0.000001, 1.000000, -0.000001},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000001, 1.000000, -0.000001},
+ {-0.000001, 1.000000, -0.000001},
+ {-0.000001, 1.000000, -0.000001},
+ {-0.000001, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.405856, 0.405856, 0.818879},
+ {-0.405856, 0.405856, 0.818879},
+ {-0.405856, 0.405856, 0.818879},
+ {-0.405856, 0.405856, 0.818879},
+ {-0.707836, 0.706377, 0.000000},
+ {-0.707836, 0.706377, 0.000000},
+ {-0.707836, 0.706377, 0.000000},
+ {-0.707836, 0.706377, 0.000000},
+ {-0.707837, 0.706376, 0.000000},
+ {-0.707837, 0.706376, 0.000000},
+ {-0.707837, 0.706376, 0.000000},
+ {-0.707837, 0.706376, 0.000000},
+ {-0.707837, 0.706376, 0.000000},
+ {-0.707837, 0.706376, 0.000000},
+ {-0.707837, 0.706376, 0.000000},
+ {-0.707837, 0.706376, 0.000000},
+ {-0.707837, 0.706376, 0.000001},
+ {-0.707837, 0.706376, 0.000001},
+ {-0.707837, 0.706376, 0.000001},
+ {-0.707837, 0.706376, 0.000001},
+ {-0.707836, 0.706377, -0.000001},
+ {-0.707836, 0.706377, -0.000001},
+ {-0.707836, 0.706377, -0.000001},
+ {-0.707836, 0.706377, -0.000001},
+ {-0.405303, 0.405305, -0.819425},
+ {-0.405303, 0.405305, -0.819425},
+ {-0.405303, 0.405305, -0.819425},
+ {-0.405303, 0.405305, -0.819425},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000001},
+ {1.000000, -0.000000, 0.000001},
+ {1.000000, -0.000000, 0.000001},
+ {1.000000, -0.000000, 0.000001},
+ {1.000000, -0.000000, 0.000001},
+ {1.000000, -0.000000, 0.000001},
+ {0.443707, -0.000000, -0.896172},
+ {0.443707, -0.000000, -0.896172},
+ {0.443707, -0.000000, -0.896172},
+ {0.443707, -0.000000, -0.896172},
+ {0.442986, 0.000000, 0.896528},
+ {0.442986, 0.000000, 0.896528},
+ {0.442986, 0.000000, 0.896528},
+ {0.442986, 0.000000, 0.896528},
+ {0.533044, -0.563757, 0.630906},
+ {0.533044, -0.563757, 0.630906},
+ {0.533044, -0.563757, 0.630906},
+ {0.533044, -0.563757, 0.630906},
+ {0.532809, -0.579552, -0.616631},
+ {0.532809, -0.579552, -0.616631},
+ {0.532809, -0.579552, -0.616631},
+ {0.532809, -0.579552, -0.616631},
+ {-0.579552, 0.532809, -0.616631},
+ {-0.579552, 0.532809, -0.616631},
+ {-0.579552, 0.532809, -0.616631},
+ {-0.579552, 0.532809, -0.616631},
+ {-0.563757, 0.533044, 0.630906},
+ {-0.563757, 0.533044, 0.630906},
+ {-0.563757, 0.533044, 0.630906},
+ {-0.563757, 0.533044, 0.630906},
+ {-0.000000, 0.442986, 0.896529},
+ {-0.000000, 0.442986, 0.896529},
+ {-0.000000, 0.442986, 0.896529},
+ {-0.000000, 0.442986, 0.896529},
+ {0.000000, 0.443707, -0.896172},
+ {0.000000, 0.443707, -0.896172},
+ {0.000000, 0.443707, -0.896172},
+ {0.000000, 0.443707, -0.896172},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000001},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {0.405855, 0.405855, -0.818880},
+ {0.405855, 0.405855, -0.818880},
+ {0.405855, 0.405855, -0.818880},
+ {0.405855, 0.405855, -0.818880},
+ {0.707836, 0.706377, -0.000001},
+ {0.707836, 0.706377, -0.000001},
+ {0.707836, 0.706377, -0.000001},
+ {0.707836, 0.706377, -0.000001},
+ {0.707836, 0.706377, 0.000000},
+ {0.707836, 0.706377, 0.000000},
+ {0.707836, 0.706377, 0.000000},
+ {0.707836, 0.706377, 0.000000},
+ {0.707836, 0.706377, 0.000001},
+ {0.707836, 0.706377, 0.000001},
+ {0.707836, 0.706377, 0.000001},
+ {0.707836, 0.706377, 0.000001},
+ {0.707837, 0.706376, 0.000000},
+ {0.707837, 0.706376, 0.000000},
+ {0.707837, 0.706376, 0.000000},
+ {0.707837, 0.706376, 0.000000},
+ {0.707837, 0.706376, 0.000000},
+ {0.707837, 0.706376, 0.000000},
+ {0.707837, 0.706376, 0.000000},
+ {0.707837, 0.706376, 0.000000},
+ {0.405305, 0.405304, 0.819425},
+ {0.405305, 0.405304, 0.819425},
+ {0.405305, 0.405304, 0.819425},
+ {0.405305, 0.405304, 0.819425},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, 0.000001, 0.000001},
+ {1.000000, 0.000001, 0.000001},
+ {1.000000, 0.000001, 0.000001},
+ {1.000000, 0.000001, 0.000001},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000001},
+ {1.000000, -0.000000, 0.000001},
+ {1.000000, -0.000000, 0.000001},
+ {1.000000, -0.000000, 0.000001},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {0.443707, 0.000001, 0.896172},
+ {0.443707, 0.000001, 0.896172},
+ {0.443707, 0.000001, 0.896172},
+ {0.443707, 0.000001, 0.896172},
+ {0.442986, -0.000000, -0.896528},
+ {0.442986, -0.000000, -0.896528},
+ {0.442986, -0.000000, -0.896528},
+ {0.442986, -0.000000, -0.896528},
+ {0.533044, 0.563757, -0.630906},
+ {0.533044, 0.563757, -0.630906},
+ {0.533044, 0.563757, -0.630906},
+ {0.533044, 0.563757, -0.630906},
+ {0.532809, 0.579552, 0.616631},
+ {0.532809, 0.579552, 0.616631},
+ {0.532809, 0.579552, 0.616631},
+ {0.532809, 0.579552, 0.616631},
+ {-0.579553, -0.532809, 0.616630},
+ {-0.579553, -0.532809, 0.616630},
+ {-0.579553, -0.532809, 0.616630},
+ {-0.579553, -0.532809, 0.616630},
+ {-0.563756, -0.533044, -0.630906},
+ {-0.563756, -0.533044, -0.630906},
+ {-0.563756, -0.533044, -0.630906},
+ {-0.563756, -0.533044, -0.630906},
+ {0.000001, -0.442986, -0.896529},
+ {0.000001, -0.442986, -0.896529},
+ {0.000001, -0.442986, -0.896529},
+ {0.000001, -0.442986, -0.896529},
+ {-0.000000, -0.443707, 0.896172},
+ {-0.000000, -0.443707, 0.896172},
+ {-0.000000, -0.443707, 0.896172},
+ {-0.000000, -0.443707, 0.896172},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, 0.000001},
+ {0.000000, -1.000000, -0.000003},
+ {0.000000, -1.000000, -0.000003},
+ {0.000000, -1.000000, -0.000003},
+ {0.000000, -1.000000, -0.000003},
+ {0.000001, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.405856, -0.405855, 0.818879},
+ {0.405856, -0.405855, 0.818879},
+ {0.405856, -0.405855, 0.818879},
+ {0.405856, -0.405855, 0.818879},
+ {0.707837, -0.706376, 0.000000},
+ {0.707837, -0.706376, 0.000000},
+ {0.707837, -0.706376, 0.000000},
+ {0.707837, -0.706376, 0.000000},
+ {0.707837, -0.706375, 0.000001},
+ {0.707837, -0.706375, 0.000001},
+ {0.707837, -0.706375, 0.000001},
+ {0.707837, -0.706375, 0.000001},
+ {0.707837, -0.706376, 0.000000},
+ {0.707837, -0.706376, 0.000000},
+ {0.707837, -0.706376, 0.000000},
+ {0.707837, -0.706376, 0.000000},
+ {0.707836, -0.706377, 0.000000},
+ {0.707836, -0.706377, 0.000000},
+ {0.707836, -0.706377, 0.000000},
+ {0.707836, -0.706377, 0.000000},
+ {0.707836, -0.706377, 0.000000},
+ {0.707836, -0.706377, 0.000000},
+ {0.707836, -0.706377, 0.000000},
+ {0.707836, -0.706377, 0.000000},
+ {0.405305, -0.405306, -0.819424},
+ {0.405305, -0.405306, -0.819424},
+ {0.405305, -0.405306, -0.819424},
+ {0.405305, -0.405306, -0.819424},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {0.000001, -1.000000, -0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {0.896172, -0.443707, 0.000000},
+ {0.896172, -0.443707, 0.000000},
+ {0.896172, -0.443707, 0.000000},
+ {0.896172, -0.443707, 0.000000},
+ {-0.896529, -0.442986, 0.000000},
+ {-0.896529, -0.442986, 0.000000},
+ {-0.896529, -0.442986, 0.000000},
+ {-0.896529, -0.442986, 0.000000},
+ {-0.630906, -0.533044, -0.563756},
+ {-0.630906, -0.533044, -0.563756},
+ {-0.630906, -0.533044, -0.563756},
+ {-0.630906, -0.533044, -0.563756},
+ {0.616630, -0.532809, -0.579553},
+ {0.616630, -0.532809, -0.579553},
+ {0.616630, -0.532809, -0.579553},
+ {0.616630, -0.532809, -0.579553},
+ {0.616631, 0.579553, 0.532808},
+ {0.616631, 0.579553, 0.532808},
+ {0.616631, 0.579553, 0.532808},
+ {0.616631, 0.579553, 0.532808},
+ {-0.630906, 0.563757, 0.533044},
+ {-0.630906, 0.563757, 0.533044},
+ {-0.630906, 0.563757, 0.533044},
+ {-0.630906, 0.563757, 0.533044},
+ {-0.896529, -0.000000, 0.442986},
+ {-0.896529, -0.000000, 0.442986},
+ {-0.896529, -0.000000, 0.442986},
+ {-0.896529, -0.000000, 0.442986},
+ {0.896172, 0.000000, 0.443706},
+ {0.896172, 0.000000, 0.443706},
+ {0.896172, 0.000000, 0.443706},
+ {0.896172, 0.000000, 0.443706},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.818879, -0.405855, 0.405855},
+ {0.818879, -0.405855, 0.405855},
+ {0.818879, -0.405855, 0.405855},
+ {0.818879, -0.405855, 0.405855},
+ {-0.000000, -0.707837, 0.706376},
+ {-0.000000, -0.707837, 0.706376},
+ {-0.000000, -0.707837, 0.706376},
+ {-0.000000, -0.707837, 0.706376},
+ {0.000001, -0.707837, 0.706376},
+ {0.000001, -0.707837, 0.706376},
+ {0.000001, -0.707837, 0.706376},
+ {0.000001, -0.707837, 0.706376},
+ {0.000000, -0.707836, 0.706377},
+ {0.000000, -0.707836, 0.706377},
+ {0.000000, -0.707836, 0.706377},
+ {0.000000, -0.707836, 0.706377},
+ {-0.000000, -0.707836, 0.706376},
+ {-0.000000, -0.707836, 0.706376},
+ {-0.000000, -0.707836, 0.706376},
+ {-0.000000, -0.707836, 0.706376},
+ {-0.000000, -0.707837, 0.706376},
+ {-0.000000, -0.707837, 0.706376},
+ {-0.000000, -0.707837, 0.706376},
+ {-0.000000, -0.707837, 0.706376},
+ {0.000001, -0.707837, 0.706376},
+ {0.000001, -0.707837, 0.706376},
+ {0.000001, -0.707837, 0.706376},
+ {0.000001, -0.707837, 0.706376},
+ {-0.819425, -0.405305, 0.405303},
+ {-0.819425, -0.405305, 0.405303},
+ {-0.819425, -0.405305, 0.405303},
+ {-0.819425, -0.405305, 0.405303},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.896172, 0.443707, -0.000000},
+ {-0.896172, 0.443707, -0.000000},
+ {-0.896172, 0.443707, -0.000000},
+ {-0.896172, 0.443707, -0.000000},
+ {0.896528, 0.442986, 0.000001},
+ {0.896528, 0.442986, 0.000001},
+ {0.896528, 0.442986, 0.000001},
+ {0.896528, 0.442986, 0.000001},
+ {0.630906, 0.533045, -0.563756},
+ {0.630906, 0.533045, -0.563756},
+ {0.630906, 0.533045, -0.563756},
+ {0.630906, 0.533045, -0.563756},
+ {-0.616631, 0.532809, -0.579552},
+ {-0.616631, 0.532809, -0.579552},
+ {-0.616631, 0.532809, -0.579552},
+ {-0.616631, 0.532809, -0.579552},
+ {-0.616631, -0.579553, 0.532808},
+ {-0.616631, -0.579553, 0.532808},
+ {-0.616631, -0.579553, 0.532808},
+ {-0.616631, -0.579553, 0.532808},
+ {0.630906, -0.563756, 0.533045},
+ {0.630906, -0.563756, 0.533045},
+ {0.630906, -0.563756, 0.533045},
+ {0.630906, -0.563756, 0.533045},
+ {0.896528, 0.000001, 0.442986},
+ {0.896528, 0.000001, 0.442986},
+ {0.896528, 0.000001, 0.442986},
+ {0.896528, 0.000001, 0.442986},
+ {-0.896172, -0.000000, 0.443706},
+ {-0.896172, -0.000000, 0.443706},
+ {-0.896172, -0.000000, 0.443706},
+ {-0.896172, -0.000000, 0.443706},
+ {0.000001, -0.000000, 1.000000},
+ {0.000001, -0.000000, 1.000000},
+ {0.000001, -0.000000, 1.000000},
+ {0.000001, -0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000001, -0.000000, 1.000000},
+ {0.000001, -0.000000, 1.000000},
+ {0.000001, -0.000000, 1.000000},
+ {0.000001, -0.000000, 1.000000},
+ {0.000002, -0.000000, 1.000000},
+ {0.000002, -0.000000, 1.000000},
+ {0.000002, -0.000000, 1.000000},
+ {0.000002, -0.000000, 1.000000},
+ {-0.818880, 0.405855, 0.405854},
+ {-0.818880, 0.405855, 0.405854},
+ {-0.818880, 0.405855, 0.405854},
+ {-0.818880, 0.405855, 0.405854},
+ {0.000000, 0.707837, 0.706376},
+ {0.000000, 0.707837, 0.706376},
+ {0.000000, 0.707837, 0.706376},
+ {0.000000, 0.707837, 0.706376},
+ {-0.000001, 0.707837, 0.706376},
+ {-0.000001, 0.707837, 0.706376},
+ {-0.000001, 0.707837, 0.706376},
+ {-0.000001, 0.707837, 0.706376},
+ {0.000000, 0.707837, 0.706376},
+ {0.000000, 0.707837, 0.706376},
+ {0.000000, 0.707837, 0.706376},
+ {0.000000, 0.707837, 0.706376},
+ {0.000000, 0.707837, 0.706376},
+ {0.000000, 0.707837, 0.706376},
+ {0.000000, 0.707837, 0.706376},
+ {0.000000, 0.707837, 0.706376},
+ {0.000000, 0.707837, 0.706376},
+ {0.000000, 0.707837, 0.706376},
+ {0.819425, 0.405304, 0.405304},
+ {0.819425, 0.405304, 0.405304},
+ {0.819425, 0.405304, 0.405304},
+ {0.819425, 0.405304, 0.405304},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.443706, -0.896172, 0.000000},
+ {-0.443706, -0.896172, 0.000000},
+ {-0.443706, -0.896172, 0.000000},
+ {-0.443706, -0.896172, 0.000000},
+ {-0.442986, 0.896529, 0.000000},
+ {-0.442986, 0.896529, 0.000000},
+ {-0.442986, 0.896529, 0.000000},
+ {-0.442986, 0.896529, 0.000000},
+ {-0.533044, 0.630907, -0.563756},
+ {-0.533044, 0.630907, -0.563756},
+ {-0.533044, 0.630907, -0.563756},
+ {-0.533044, 0.630907, -0.563756},
+ {-0.532808, -0.616631, -0.579553},
+ {-0.532808, -0.616631, -0.579553},
+ {-0.532808, -0.616631, -0.579553},
+ {-0.532808, -0.616631, -0.579553},
+ {0.579552, -0.616631, 0.532809},
+ {0.579552, -0.616631, 0.532809},
+ {0.579552, -0.616631, 0.532809},
+ {0.579552, -0.616631, 0.532809},
+ {0.563756, 0.630907, 0.533043},
+ {0.563756, 0.630907, 0.533043},
+ {0.563756, 0.630907, 0.533043},
+ {0.563756, 0.630907, 0.533043},
+ {-0.000001, 0.896529, 0.442985},
+ {-0.000001, 0.896529, 0.442985},
+ {-0.000001, 0.896529, 0.442985},
+ {-0.000001, 0.896529, 0.442985},
+ {0.000000, -0.896172, 0.443707},
+ {0.000000, -0.896172, 0.443707},
+ {0.000000, -0.896172, 0.443707},
+ {0.000000, -0.896172, 0.443707},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.405855, -0.818880, 0.405855},
+ {-0.405855, -0.818880, 0.405855},
+ {-0.405855, -0.818880, 0.405855},
+ {-0.405855, -0.818880, 0.405855},
+ {-0.707836, 0.000000, 0.706377},
+ {-0.707836, 0.000000, 0.706377},
+ {-0.707836, 0.000000, 0.706377},
+ {-0.707836, 0.000000, 0.706377},
+ {-0.707837, -0.000000, 0.706376},
+ {-0.707837, -0.000000, 0.706376},
+ {-0.707837, -0.000000, 0.706376},
+ {-0.707837, -0.000000, 0.706376},
+ {-0.707837, -0.000000, 0.706376},
+ {-0.707837, -0.000000, 0.706376},
+ {-0.707837, -0.000000, 0.706376},
+ {-0.707837, -0.000000, 0.706376},
+ {-0.707837, -0.000000, 0.706376},
+ {-0.707837, -0.000000, 0.706376},
+ {-0.707837, -0.000000, 0.706376},
+ {-0.707837, -0.000000, 0.706376},
+ {-0.405305, 0.819425, 0.405303},
+ {-0.405305, 0.819425, 0.405303},
+ {-0.405305, 0.819425, 0.405303},
+ {-0.405305, 0.819425, 0.405303},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {0.443706, 0.896172, 0.000000},
+ {0.443706, 0.896172, 0.000000},
+ {0.443706, 0.896172, 0.000000},
+ {0.443706, 0.896172, 0.000000},
+ {0.442986, -0.896529, 0.000001},
+ {0.442986, -0.896529, 0.000001},
+ {0.442986, -0.896529, 0.000001},
+ {0.442986, -0.896529, 0.000001},
+ {0.533044, -0.630907, -0.563756},
+ {0.533044, -0.630907, -0.563756},
+ {0.533044, -0.630907, -0.563756},
+ {0.533044, -0.630907, -0.563756},
+ {0.532808, 0.616631, -0.579553},
+ {0.532808, 0.616631, -0.579553},
+ {0.532808, 0.616631, -0.579553},
+ {0.532808, 0.616631, -0.579553},
+ {-0.579552, 0.616631, 0.532809},
+ {-0.579552, 0.616631, 0.532809},
+ {-0.579552, 0.616631, 0.532809},
+ {-0.579552, 0.616631, 0.532809},
+ {-0.563756, -0.630906, 0.533045},
+ {-0.563756, -0.630906, 0.533045},
+ {-0.563756, -0.630906, 0.533045},
+ {-0.563756, -0.630906, 0.533045},
+ {0.000000, -0.896528, 0.442986},
+ {0.000000, -0.896528, 0.442986},
+ {0.000000, -0.896528, 0.442986},
+ {0.000000, -0.896528, 0.442986},
+ {0.000000, 0.896172, 0.443707},
+ {0.000000, 0.896172, 0.443707},
+ {0.000000, 0.896172, 0.443707},
+ {0.000000, 0.896172, 0.443707},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, -0.000001, 1.000000},
+ {-0.000000, -0.000001, 1.000000},
+ {-0.000000, -0.000001, 1.000000},
+ {-0.000000, -0.000001, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.405854, 0.818879, 0.405856},
+ {0.405854, 0.818879, 0.405856},
+ {0.405854, 0.818879, 0.405856},
+ {0.405854, 0.818879, 0.405856},
+ {0.707836, 0.000000, 0.706377},
+ {0.707836, 0.000000, 0.706377},
+ {0.707836, 0.000000, 0.706377},
+ {0.707836, 0.000000, 0.706377},
+ {0.707836, 0.000001, 0.706377},
+ {0.707836, 0.000001, 0.706377},
+ {0.707836, 0.000001, 0.706377},
+ {0.707836, 0.000001, 0.706377},
+ {0.707837, 0.000000, 0.706376},
+ {0.707837, 0.000000, 0.706376},
+ {0.707837, 0.000000, 0.706376},
+ {0.707837, 0.000000, 0.706376},
+ {0.707837, 0.000000, 0.706376},
+ {0.707837, 0.000000, 0.706376},
+ {0.707836, -0.000001, 0.706377},
+ {0.707836, -0.000001, 0.706377},
+ {0.707836, -0.000001, 0.706377},
+ {0.707836, -0.000001, 0.706377},
+ {0.707836, 0.000000, 0.706377},
+ {0.707836, 0.000000, 0.706377},
+ {0.707836, 0.000000, 0.706377},
+ {0.707836, 0.000000, 0.706377},
+ {0.405304, -0.819424, 0.405306},
+ {0.405304, -0.819424, 0.405306},
+ {0.405304, -0.819424, 0.405306},
+ {0.405304, -0.819424, 0.405306},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {0.000000, -1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.514664, 0.514695, 0.685690},
+ {-0.671194, 0.671194, -0.314524},
+ {-0.789239, 0.527360, -0.314524},
+ {-0.605213, 0.404370, 0.685690},
+ {-0.876980, 0.363231, -0.314524},
+ {-0.672475, 0.278542, 0.685690},
+ {-0.930998, 0.185186, -0.314524},
+ {-0.713889, 0.142003, 0.685690},
+ {-0.949217, 0.000000, -0.314524},
+ {-0.727866, 0.000000, 0.685690},
+ {-0.930998, -0.185186, -0.314524},
+ {-0.713889, -0.142003, 0.685690},
+ {-0.876980, -0.363231, -0.314524},
+ {-0.672475, -0.278542, 0.685690},
+ {-0.789239, -0.527360, -0.314524},
+ {-0.605213, -0.404370, 0.685690},
+ {-0.671194, -0.671194, -0.314524},
+ {-0.514664, -0.514664, 0.685690},
+ {-0.527360, -0.789239, -0.314524},
+ {-0.404370, -0.605213, 0.685690},
+ {-0.363231, -0.876980, -0.314524},
+ {-0.278542, -0.672475, 0.685690},
+ {-0.185186, -0.930998, -0.314524},
+ {-0.141972, -0.713889, 0.685690},
+ {0.000000, -0.949217, -0.314524},
+ {0.000000, -0.727866, 0.685690},
+ {0.185186, -0.930998, -0.314524},
+ {0.142003, -0.713889, 0.685690},
+ {0.363231, -0.876980, -0.314524},
+ {0.278542, -0.672475, 0.685690},
+ {0.527360, -0.789239, -0.314524},
+ {0.404370, -0.605213, 0.685690},
+ {0.671194, -0.671194, -0.314524},
+ {0.514664, -0.514664, 0.685690},
+ {0.789239, -0.527360, -0.314524},
+ {0.605213, -0.404370, 0.685690},
+ {0.876980, -0.363262, -0.314524},
+ {0.672475, -0.278542, 0.685690},
+ {0.930998, -0.185186, -0.314524},
+ {0.713889, -0.142003, 0.685690},
+ {0.949217, 0.000000, -0.314524},
+ {0.727866, 0.000000, 0.685690},
+ {0.930998, 0.185156, -0.314524},
+ {0.713889, 0.142003, 0.685690},
+ {0.876980, 0.363231, -0.314524},
+ {0.672475, 0.278542, 0.685690},
+ {0.789270, 0.527360, -0.314524},
+ {0.605213, 0.404370, 0.685690},
+ {0.671194, 0.671194, -0.314524},
+ {0.514664, 0.514664, 0.685690},
+ {0.527360, 0.789239, -0.314524},
+ {0.404370, 0.605213, 0.685690},
+ {0.363262, 0.876980, -0.314524},
+ {0.278542, 0.672475, 0.685690},
+ {0.185186, 0.930998, -0.314524},
+ {0.141972, 0.713889, 0.685690},
+ {0.000000, 0.949217, -0.314524},
+ {0.000000, 0.727866, 0.685690},
+ {-0.185156, 0.930998, -0.314524},
+ {-0.142003, 0.713889, 0.685690},
+ {-0.363231, 0.876980, -0.314524},
+ {-0.278542, 0.672475, 0.685690},
+ {-0.527360, 0.789270, -0.314524},
+ {-0.404370, 0.605213, 0.685690},
+ {-0.301431, 0.451155, -0.839961},
+ {-0.383679, 0.383679, -0.839961},
+ {-0.207617, 0.501297, -0.839961},
+ {-0.105838, 0.532182, -0.839961},
+ {0.000000, 0.542589, -0.839961},
+ {0.105838, 0.532182, -0.839961},
+ {0.207648, 0.501297, -0.839961},
+ {0.301462, 0.451155, -0.839961},
+ {0.383679, 0.383679, -0.839961},
+ {0.451155, 0.301431, -0.839961},
+ {0.501297, 0.207617, -0.839961},
+ {0.532182, 0.105838, -0.839961},
+ {0.542589, 0.000000, -0.839961},
+ {0.532182, -0.105838, -0.839961},
+ {0.501297, -0.207648, -0.839961},
+ {0.451155, -0.301462, -0.839961},
+ {0.383679, -0.383679, -0.839961},
+ {0.301431, -0.451155, -0.839961},
+ {0.207648, -0.501297, -0.839961},
+ {0.105838, -0.532182, -0.839961},
+ {0.000000, -0.542589, -0.839961},
+ {-0.105838, -0.532182, -0.839961},
+ {-0.207648, -0.501297, -0.839961},
+ {-0.301431, -0.451155, -0.839961},
+ {-0.383679, -0.383679, -0.839961},
+ {-0.451155, -0.301462, -0.839961},
+ {-0.501297, -0.207648, -0.839961},
+ {-0.532182, -0.105838, -0.839961},
+ {-0.542589, 0.000000, -0.839961},
+ {-0.532182, 0.105838, -0.839961},
+ {-0.501297, 0.207648, -0.839961},
+ {-0.451155, 0.301431, -0.839961},
+ {-0.451155, 0.301431, -0.839961},
+ {-0.383679, 0.383679, -0.839961},
+ {-0.071810, 0.071810, -0.994812},
+ {-0.084445, 0.056429, -0.994812},
+ {-0.501297, 0.207648, -0.839961},
+ {-0.093844, 0.038850, -0.994812},
+ {-0.532182, 0.105838, -0.839961},
+ {-0.099612, 0.019807, -0.994812},
+ {-0.542589, 0.000000, -0.839961},
+ {-0.101566, 0.000000, -0.994812},
+ {-0.532182, -0.105838, -0.839961},
+ {-0.099612, -0.019807, -0.994812},
+ {-0.501297, -0.207648, -0.839961},
+ {-0.093844, -0.038850, -0.994812},
+ {-0.451155, -0.301462, -0.839961},
+ {-0.084445, -0.056429, -0.994812},
+ {-0.383679, -0.383679, -0.839961},
+ {-0.071810, -0.071810, -0.994812},
+ {-0.301431, -0.451155, -0.839961},
+ {-0.056429, -0.084445, -0.994812},
+ {-0.207648, -0.501297, -0.839961},
+ {-0.038850, -0.093844, -0.994812},
+ {-0.105838, -0.532182, -0.839961},
+ {-0.019807, -0.099612, -0.994812},
+ {0.000000, -0.542589, -0.839961},
+ {0.000000, -0.101566, -0.994812},
+ {0.105838, -0.532182, -0.839961},
+ {0.019807, -0.099612, -0.994812},
+ {0.207648, -0.501297, -0.839961},
+ {0.038850, -0.093844, -0.994812},
+ {0.301431, -0.451155, -0.839961},
+ {0.056429, -0.084445, -0.994812},
+ {0.383679, -0.383679, -0.839961},
+ {0.071810, -0.071810, -0.994812},
+ {0.451155, -0.301462, -0.839961},
+ {0.084445, -0.056429, -0.994812},
+ {0.501297, -0.207648, -0.839961},
+ {0.093844, -0.038850, -0.994812},
+ {0.532182, -0.105838, -0.839961},
+ {0.099612, -0.019807, -0.994812},
+ {0.542589, 0.000000, -0.839961},
+ {0.101566, 0.000000, -0.994812},
+ {0.532182, 0.105838, -0.839961},
+ {0.099612, 0.019807, -0.994812},
+ {0.501297, 0.207617, -0.839961},
+ {0.093844, 0.038850, -0.994812},
+ {0.451155, 0.301431, -0.839961},
+ {0.084445, 0.056429, -0.994812},
+ {0.383679, 0.383679, -0.839961},
+ {0.071810, 0.071810, -0.994812},
+ {0.301462, 0.451155, -0.839961},
+ {0.056429, 0.084445, -0.994812},
+ {0.207648, 0.501297, -0.839961},
+ {0.038850, 0.093844, -0.994812},
+ {0.105838, 0.532182, -0.839961},
+ {0.019807, 0.099612, -0.994812},
+ {0.000000, 0.542589, -0.839961},
+ {0.000000, 0.101566, -0.994812},
+ {-0.105838, 0.532182, -0.839961},
+ {-0.019807, 0.099612, -0.994812},
+ {-0.207617, 0.501297, -0.839961},
+ {-0.038850, 0.093844, -0.994812},
+ {-0.301431, 0.451155, -0.839961},
+ {-0.056429, 0.084445, -0.994812},
+ {-0.000000, -0.000000, -1.000000},
+ {-0.514664, -0.514695, -0.685690},
+ {-0.671194, -0.671194, 0.314524},
+ {-0.789239, -0.527360, 0.314524},
+ {-0.605213, -0.404370, -0.685690},
+ {-0.876980, -0.363231, 0.314524},
+ {-0.672475, -0.278542, -0.685690},
+ {-0.930998, -0.185186, 0.314524},
+ {-0.713889, -0.142003, -0.685690},
+ {-0.949217, 0.000000, 0.314524},
+ {-0.727866, 0.000000, -0.685690},
+ {-0.930998, 0.185186, 0.314524},
+ {-0.713889, 0.142003, -0.685690},
+ {-0.876980, 0.363231, 0.314524},
+ {-0.672475, 0.278542, -0.685690},
+ {-0.789239, 0.527360, 0.314524},
+ {-0.605213, 0.404370, -0.685690},
+ {-0.671194, 0.671194, 0.314524},
+ {-0.514695, 0.514664, -0.685690},
+ {-0.527360, 0.789239, 0.314524},
+ {-0.404370, 0.605213, -0.685690},
+ {-0.363231, 0.876980, 0.314524},
+ {-0.278542, 0.672475, -0.685690},
+ {-0.185186, 0.930998, 0.314524},
+ {-0.142003, 0.713889, -0.685690},
+ {0.000000, 0.949217, 0.314524},
+ {0.000000, 0.727866, -0.685690},
+ {0.185186, 0.930998, 0.314524},
+ {0.142003, 0.713889, -0.685690},
+ {0.363231, 0.876980, 0.314524},
+ {0.278542, 0.672475, -0.685690},
+ {0.527360, 0.789270, 0.314524},
+ {0.404370, 0.605213, -0.685690},
+ {0.671194, 0.671194, 0.314524},
+ {0.514664, 0.514664, -0.685690},
+ {0.789239, 0.527360, 0.314524},
+ {0.605213, 0.404370, -0.685690},
+ {0.876980, 0.363262, 0.314524},
+ {0.672475, 0.278542, -0.685690},
+ {0.930998, 0.185186, 0.314524},
+ {0.713889, 0.142003, -0.685690},
+ {0.949217, 0.000000, 0.314524},
+ {0.727866, 0.000000, -0.685690},
+ {0.930998, -0.185156, 0.314524},
+ {0.713889, -0.142003, -0.685690},
+ {0.876980, -0.363231, 0.314524},
+ {0.672475, -0.278542, -0.685690},
+ {0.789270, -0.527360, 0.314524},
+ {0.605213, -0.404370, -0.685690},
+ {0.671194, -0.671194, 0.314524},
+ {0.514664, -0.514664, -0.685690},
+ {0.527360, -0.789239, 0.314524},
+ {0.404370, -0.605213, -0.685690},
+ {0.363262, -0.876980, 0.314524},
+ {0.278542, -0.672475, -0.685690},
+ {0.185186, -0.930998, 0.314524},
+ {0.141972, -0.713889, -0.685690},
+ {0.000000, -0.949217, 0.314524},
+ {0.000000, -0.727866, -0.685690},
+ {-0.185156, -0.930998, 0.314524},
+ {-0.142003, -0.713889, -0.685690},
+ {-0.363231, -0.876980, 0.314524},
+ {-0.278542, -0.672475, -0.685690},
+ {-0.527360, -0.789270, 0.314524},
+ {-0.404370, -0.605213, -0.685690},
+ {-0.301431, -0.451155, 0.839961},
+ {-0.383679, -0.383679, 0.839961},
+ {-0.207617, -0.501297, 0.839961},
+ {-0.105838, -0.532182, 0.839961},
+ {0.000000, -0.542589, 0.839961},
+ {0.105838, -0.532182, 0.839961},
+ {0.207648, -0.501297, 0.839961},
+ {0.301462, -0.451155, 0.839961},
+ {0.383679, -0.383679, 0.839961},
+ {0.451155, -0.301431, 0.839961},
+ {0.501297, -0.207617, 0.839961},
+ {0.532182, -0.105838, 0.839961},
+ {0.542589, 0.000000, 0.839961},
+ {0.532182, 0.105838, 0.839961},
+ {0.501297, 0.207648, 0.839961},
+ {0.451155, 0.301462, 0.839961},
+ {0.383679, 0.383679, 0.839961},
+ {0.301431, 0.451155, 0.839961},
+ {0.207648, 0.501297, 0.839961},
+ {0.105838, 0.532182, 0.839961},
+ {0.000000, 0.542589, 0.839961},
+ {-0.105838, 0.532182, 0.839961},
+ {-0.207648, 0.501297, 0.839961},
+ {-0.301431, 0.451155, 0.839961},
+ {-0.383679, 0.383679, 0.839961},
+ {-0.451155, 0.301462, 0.839961},
+ {-0.501297, 0.207648, 0.839961},
+ {-0.532182, 0.105838, 0.839961},
+ {-0.542589, 0.000000, 0.839961},
+ {-0.532182, -0.105838, 0.839961},
+ {-0.501297, -0.207648, 0.839961},
+ {-0.451155, -0.301431, 0.839961},
+ {-0.451155, -0.301431, 0.839961},
+ {-0.383679, -0.383679, 0.839961},
+ {-0.071810, -0.071810, 0.994812},
+ {-0.084445, -0.056429, 0.994812},
+ {-0.501297, -0.207648, 0.839961},
+ {-0.093844, -0.038850, 0.994812},
+ {-0.532182, -0.105838, 0.839961},
+ {-0.099612, -0.019807, 0.994812},
+ {-0.542589, 0.000000, 0.839961},
+ {-0.101566, 0.000000, 0.994812},
+ {-0.532182, 0.105838, 0.839961},
+ {-0.099612, 0.019807, 0.994812},
+ {-0.501297, 0.207648, 0.839961},
+ {-0.093844, 0.038850, 0.994812},
+ {-0.451155, 0.301462, 0.839961},
+ {-0.084445, 0.056429, 0.994812},
+ {-0.383679, 0.383679, 0.839961},
+ {-0.071810, 0.071810, 0.994812},
+ {-0.301431, 0.451155, 0.839961},
+ {-0.056429, 0.084445, 0.994812},
+ {-0.207648, 0.501297, 0.839961},
+ {-0.038850, 0.093844, 0.994812},
+ {-0.105838, 0.532182, 0.839961},
+ {-0.019807, 0.099612, 0.994812},
+ {0.000000, 0.542589, 0.839961},
+ {0.000000, 0.101566, 0.994812},
+ {0.105838, 0.532182, 0.839961},
+ {0.019807, 0.099612, 0.994812},
+ {0.207648, 0.501297, 0.839961},
+ {0.038850, 0.093844, 0.994812},
+ {0.301431, 0.451155, 0.839961},
+ {0.056429, 0.084445, 0.994812},
+ {0.383679, 0.383679, 0.839961},
+ {0.071810, 0.071810, 0.994812},
+ {0.451155, 0.301462, 0.839961},
+ {0.084445, 0.056429, 0.994812},
+ {0.501297, 0.207648, 0.839961},
+ {0.093844, 0.038850, 0.994812},
+ {0.532182, 0.105838, 0.839961},
+ {0.099612, 0.019807, 0.994812},
+ {0.542589, 0.000000, 0.839961},
+ {0.101566, 0.000000, 0.994812},
+ {0.532182, -0.105838, 0.839961},
+ {0.099612, -0.019807, 0.994812},
+ {0.501297, -0.207617, 0.839961},
+ {0.093844, -0.038850, 0.994812},
+ {0.451155, -0.301431, 0.839961},
+ {0.084445, -0.056429, 0.994812},
+ {0.383679, -0.383679, 0.839961},
+ {0.071810, -0.071810, 0.994812},
+ {0.301462, -0.451155, 0.839961},
+ {0.056429, -0.084445, 0.994812},
+ {0.207648, -0.501297, 0.839961},
+ {0.038850, -0.093844, 0.994812},
+ {0.105838, -0.532182, 0.839961},
+ {0.019807, -0.099612, 0.994812},
+ {0.000000, -0.542589, 0.839961},
+ {0.000000, -0.101566, 0.994812},
+ {-0.105838, -0.532182, 0.839961},
+ {-0.019807, -0.099612, 0.994812},
+ {-0.207617, -0.501297, 0.839961},
+ {-0.038850, -0.093844, 0.994812},
+ {-0.301431, -0.451155, 0.839961},
+ {-0.056429, -0.084445, 0.994812},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.514664, 0.685690, -0.514695},
+ {-0.671194, -0.314524, -0.671194},
+ {-0.789239, -0.314524, -0.527360},
+ {-0.605213, 0.685690, -0.404370},
+ {-0.876980, -0.314524, -0.363231},
+ {-0.672475, 0.685690, -0.278542},
+ {-0.930998, -0.314524, -0.185186},
+ {-0.713889, 0.685690, -0.142003},
+ {-0.949217, -0.314524, 0.000000},
+ {-0.727866, 0.685690, 0.000000},
+ {-0.930998, -0.314524, 0.185186},
+ {-0.713889, 0.685690, 0.142003},
+ {-0.876980, -0.314524, 0.363231},
+ {-0.672475, 0.685690, 0.278542},
+ {-0.789239, -0.314524, 0.527360},
+ {-0.605213, 0.685690, 0.404370},
+ {-0.671194, -0.314524, 0.671194},
+ {-0.514664, 0.685690, 0.514664},
+ {-0.527360, -0.314524, 0.789239},
+ {-0.404370, 0.685690, 0.605213},
+ {-0.363231, -0.314524, 0.876980},
+ {-0.278542, 0.685690, 0.672475},
+ {-0.185186, -0.314524, 0.930998},
+ {-0.142003, 0.685690, 0.713889},
+ {0.000000, -0.314524, 0.949217},
+ {0.000000, 0.685690, 0.727866},
+ {0.185186, -0.314524, 0.930998},
+ {0.142003, 0.685690, 0.713889},
+ {0.363231, -0.314524, 0.876980},
+ {0.278542, 0.685690, 0.672475},
+ {0.527360, -0.314524, 0.789239},
+ {0.404370, 0.685690, 0.605213},
+ {0.671194, -0.314524, 0.671194},
+ {0.514664, 0.685690, 0.514664},
+ {0.789239, -0.314524, 0.527360},
+ {0.605213, 0.685690, 0.404370},
+ {0.876980, -0.314524, 0.363262},
+ {0.672475, 0.685690, 0.278542},
+ {0.930998, -0.314524, 0.185186},
+ {0.713889, 0.685690, 0.142003},
+ {0.949217, -0.314524, 0.000000},
+ {0.727866, 0.685690, 0.000000},
+ {0.930998, -0.314524, -0.185156},
+ {0.713889, 0.685690, -0.142003},
+ {0.876980, -0.314524, -0.363231},
+ {0.672475, 0.685690, -0.278542},
+ {0.789270, -0.314524, -0.527360},
+ {0.605213, 0.685690, -0.404370},
+ {0.671194, -0.314524, -0.671194},
+ {0.514664, 0.685690, -0.514664},
+ {0.527360, -0.314524, -0.789239},
+ {0.404370, 0.685690, -0.605213},
+ {0.363262, -0.314524, -0.876980},
+ {0.278542, 0.685690, -0.672475},
+ {0.185186, -0.314524, -0.930998},
+ {0.142003, 0.685690, -0.713889},
+ {0.000000, -0.314524, -0.949217},
+ {0.000000, 0.685690, -0.727866},
+ {-0.185156, -0.314524, -0.930998},
+ {-0.142003, 0.685690, -0.713889},
+ {-0.363231, -0.314524, -0.876980},
+ {-0.278542, 0.685690, -0.672475},
+ {-0.527360, -0.314524, -0.789270},
+ {-0.404370, 0.685690, -0.605213},
+ {-0.301431, -0.839961, -0.451155},
+ {-0.383679, -0.839961, -0.383679},
+ {-0.207617, -0.839961, -0.501297},
+ {-0.105838, -0.839961, -0.532182},
+ {0.000000, -0.839961, -0.542589},
+ {0.105838, -0.839961, -0.532182},
+ {0.207648, -0.839961, -0.501297},
+ {0.301462, -0.839961, -0.451155},
+ {0.383679, -0.839961, -0.383679},
+ {0.451155, -0.839961, -0.301431},
+ {0.501297, -0.839961, -0.207617},
+ {0.532182, -0.839961, -0.105838},
+ {0.542589, -0.839961, 0.000000},
+ {0.532182, -0.839961, 0.105838},
+ {0.501297, -0.839961, 0.207648},
+ {0.451155, -0.839961, 0.301462},
+ {0.383679, -0.839961, 0.383679},
+ {0.301431, -0.839961, 0.451155},
+ {0.207648, -0.839961, 0.501297},
+ {0.105838, -0.839961, 0.532182},
+ {0.000000, -0.839961, 0.542589},
+ {-0.105838, -0.839961, 0.532182},
+ {-0.207648, -0.839961, 0.501297},
+ {-0.301431, -0.839961, 0.451155},
+ {-0.383679, -0.839961, 0.383679},
+ {-0.451155, -0.839961, 0.301431},
+ {-0.501297, -0.839961, 0.207648},
+ {-0.532182, -0.839961, 0.105838},
+ {-0.542589, -0.839961, 0.000000},
+ {-0.532182, -0.839961, -0.105838},
+ {-0.501297, -0.839961, -0.207648},
+ {-0.451155, -0.839961, -0.301431},
+ {-0.451155, -0.839961, -0.301431},
+ {-0.383679, -0.839961, -0.383679},
+ {-0.071810, -0.994812, -0.071810},
+ {-0.084445, -0.994812, -0.056429},
+ {-0.501297, -0.839961, -0.207648},
+ {-0.093844, -0.994812, -0.038850},
+ {-0.532182, -0.839961, -0.105838},
+ {-0.099612, -0.994812, -0.019807},
+ {-0.542589, -0.839961, 0.000000},
+ {-0.101566, -0.994812, 0.000000},
+ {-0.532182, -0.839961, 0.105838},
+ {-0.099612, -0.994812, 0.019807},
+ {-0.501297, -0.839961, 0.207648},
+ {-0.093844, -0.994812, 0.038850},
+ {-0.451155, -0.839961, 0.301431},
+ {-0.084445, -0.994812, 0.056429},
+ {-0.383679, -0.839961, 0.383679},
+ {-0.071810, -0.994812, 0.071810},
+ {-0.301431, -0.839961, 0.451155},
+ {-0.056429, -0.994812, 0.084445},
+ {-0.207648, -0.839961, 0.501297},
+ {-0.038850, -0.994812, 0.093844},
+ {-0.105838, -0.839961, 0.532182},
+ {-0.019807, -0.994812, 0.099612},
+ {0.000000, -0.839961, 0.542589},
+ {0.000000, -0.994812, 0.101566},
+ {0.105838, -0.839961, 0.532182},
+ {0.019807, -0.994812, 0.099612},
+ {0.207648, -0.839961, 0.501297},
+ {0.038850, -0.994812, 0.093844},
+ {0.301431, -0.839961, 0.451155},
+ {0.056429, -0.994812, 0.084445},
+ {0.383679, -0.839961, 0.383679},
+ {0.071810, -0.994812, 0.071810},
+ {0.451155, -0.839961, 0.301462},
+ {0.084445, -0.994812, 0.056429},
+ {0.501297, -0.839961, 0.207648},
+ {0.093844, -0.994812, 0.038850},
+ {0.532182, -0.839961, 0.105838},
+ {0.099612, -0.994812, 0.019807},
+ {0.542589, -0.839961, 0.000000},
+ {0.101566, -0.994812, 0.000000},
+ {0.532182, -0.839961, -0.105838},
+ {0.099612, -0.994812, -0.019807},
+ {0.501297, -0.839961, -0.207617},
+ {0.093844, -0.994812, -0.038850},
+ {0.451155, -0.839961, -0.301431},
+ {0.084445, -0.994812, -0.056429},
+ {0.383679, -0.839961, -0.383679},
+ {0.071810, -0.994812, -0.071810},
+ {0.301462, -0.839961, -0.451155},
+ {0.056429, -0.994812, -0.084445},
+ {0.207648, -0.839961, -0.501297},
+ {0.038850, -0.994812, -0.093844},
+ {0.105838, -0.839961, -0.532182},
+ {0.019807, -0.994812, -0.099612},
+ {0.000000, -0.839961, -0.542589},
+ {0.000000, -0.994812, -0.101566},
+ {-0.105838, -0.839961, -0.532182},
+ {-0.019807, -0.994812, -0.099612},
+ {-0.207617, -0.839961, -0.501297},
+ {-0.038850, -0.994812, -0.093844},
+ {-0.301431, -0.839961, -0.451155},
+ {-0.056429, -0.994812, -0.084445},
+ {0.000000, -1.000000, -0.000000},
+ {-0.514664, -0.685690, 0.514695},
+ {-0.671194, 0.314524, 0.671194},
+ {-0.789270, 0.314524, 0.527360},
+ {-0.605213, -0.685690, 0.404370},
+ {-0.876980, 0.314524, 0.363231},
+ {-0.672475, -0.685690, 0.278542},
+ {-0.930998, 0.314524, 0.185186},
+ {-0.713889, -0.685690, 0.142003},
+ {-0.949217, 0.314524, 0.000000},
+ {-0.727866, -0.685690, 0.000000},
+ {-0.930998, 0.314524, -0.185186},
+ {-0.713889, -0.685690, -0.142003},
+ {-0.876980, 0.314524, -0.363262},
+ {-0.672475, -0.685690, -0.278542},
+ {-0.789239, 0.314524, -0.527360},
+ {-0.605213, -0.685690, -0.404370},
+ {-0.671194, 0.314524, -0.671194},
+ {-0.514664, -0.685690, -0.514664},
+ {-0.527360, 0.314524, -0.789239},
+ {-0.404370, -0.685690, -0.605213},
+ {-0.363231, 0.314524, -0.876980},
+ {-0.278542, -0.685690, -0.672475},
+ {-0.185186, 0.314524, -0.930998},
+ {-0.142003, -0.685690, -0.713889},
+ {0.000000, 0.314524, -0.949217},
+ {0.000000, -0.685690, -0.727866},
+ {0.185186, 0.314524, -0.930998},
+ {0.142003, -0.685690, -0.713889},
+ {0.363231, 0.314524, -0.876980},
+ {0.278542, -0.685690, -0.672475},
+ {0.527360, 0.314524, -0.789270},
+ {0.404370, -0.685690, -0.605213},
+ {0.671194, 0.314524, -0.671194},
+ {0.514664, -0.685690, -0.514664},
+ {0.789239, 0.314524, -0.527360},
+ {0.605213, -0.685690, -0.404370},
+ {0.876980, 0.314524, -0.363262},
+ {0.672475, -0.685690, -0.278542},
+ {0.930998, 0.314524, -0.185186},
+ {0.713889, -0.685690, -0.142003},
+ {0.949217, 0.314524, 0.000000},
+ {0.727866, -0.685690, 0.000000},
+ {0.930998, 0.314524, 0.185156},
+ {0.713889, -0.685690, 0.142003},
+ {0.876980, 0.314524, 0.363231},
+ {0.672475, -0.685690, 0.278542},
+ {0.789270, 0.314524, 0.527360},
+ {0.605213, -0.685690, 0.404370},
+ {0.671194, 0.314524, 0.671194},
+ {0.514664, -0.685690, 0.514695},
+ {0.527360, 0.314524, 0.789239},
+ {0.404370, -0.685690, 0.605213},
+ {0.363262, 0.314524, 0.876980},
+ {0.278542, -0.685690, 0.672475},
+ {0.185186, 0.314524, 0.930998},
+ {0.142003, -0.685690, 0.713889},
+ {0.000000, 0.314524, 0.949217},
+ {0.000000, -0.685690, 0.727866},
+ {-0.185156, 0.314524, 0.930998},
+ {-0.142003, -0.685690, 0.713889},
+ {-0.363231, 0.314524, 0.876980},
+ {-0.278542, -0.685690, 0.672475},
+ {-0.527360, 0.314524, 0.789270},
+ {-0.404370, -0.685690, 0.605213},
+ {-0.301431, 0.839961, 0.451155},
+ {-0.383679, 0.839961, 0.383679},
+ {-0.207617, 0.839961, 0.501297},
+ {-0.105838, 0.839961, 0.532182},
+ {0.000000, 0.839961, 0.542589},
+ {0.105838, 0.839961, 0.532182},
+ {0.207648, 0.839961, 0.501297},
+ {0.301462, 0.839961, 0.451155},
+ {0.383679, 0.839961, 0.383679},
+ {0.451155, 0.839961, 0.301431},
+ {0.501297, 0.839961, 0.207648},
+ {0.532182, 0.839961, 0.105838},
+ {0.542589, 0.839961, 0.000000},
+ {0.532182, 0.839961, -0.105838},
+ {0.501297, 0.839961, -0.207648},
+ {0.451155, 0.839961, -0.301462},
+ {0.383679, 0.839961, -0.383679},
+ {0.301462, 0.839961, -0.451155},
+ {0.207648, 0.839961, -0.501297},
+ {0.105838, 0.839961, -0.532182},
+ {0.000000, 0.839961, -0.542589},
+ {-0.105838, 0.839961, -0.532182},
+ {-0.207648, 0.839961, -0.501297},
+ {-0.301462, 0.839961, -0.451155},
+ {-0.383679, 0.839961, -0.383679},
+ {-0.451155, 0.839961, -0.301462},
+ {-0.501297, 0.839961, -0.207648},
+ {-0.532182, 0.839961, -0.105838},
+ {-0.542589, 0.839961, 0.000000},
+ {-0.532182, 0.839961, 0.105838},
+ {-0.501297, 0.839961, 0.207648},
+ {-0.451155, 0.839961, 0.301431},
+ {-0.451155, 0.839961, 0.301431},
+ {-0.383679, 0.839961, 0.383679},
+ {-0.071810, 0.994812, 0.071810},
+ {-0.084445, 0.994812, 0.056429},
+ {-0.501297, 0.839961, 0.207648},
+ {-0.093844, 0.994812, 0.038850},
+ {-0.532182, 0.839961, 0.105838},
+ {-0.099612, 0.994812, 0.019807},
+ {-0.542589, 0.839961, 0.000000},
+ {-0.101566, 0.994812, 0.000000},
+ {-0.532182, 0.839961, -0.105838},
+ {-0.099612, 0.994812, -0.019807},
+ {-0.501297, 0.839961, -0.207648},
+ {-0.093844, 0.994812, -0.038850},
+ {-0.451155, 0.839961, -0.301462},
+ {-0.084445, 0.994812, -0.056429},
+ {-0.383679, 0.839961, -0.383679},
+ {-0.071810, 0.994812, -0.071810},
+ {-0.301462, 0.839961, -0.451155},
+ {-0.056429, 0.994812, -0.084445},
+ {-0.207648, 0.839961, -0.501297},
+ {-0.038850, 0.994812, -0.093844},
+ {-0.105838, 0.839961, -0.532182},
+ {-0.019807, 0.994812, -0.099612},
+ {0.000000, 0.839961, -0.542589},
+ {0.000000, 0.994812, -0.101566},
+ {0.105838, 0.839961, -0.532182},
+ {0.019807, 0.994812, -0.099612},
+ {0.207648, 0.839961, -0.501297},
+ {0.038850, 0.994812, -0.093844},
+ {0.301462, 0.839961, -0.451155},
+ {0.056429, 0.994812, -0.084445},
+ {0.383679, 0.839961, -0.383679},
+ {0.071810, 0.994812, -0.071810},
+ {0.451155, 0.839961, -0.301462},
+ {0.084445, 0.994812, -0.056429},
+ {0.501297, 0.839961, -0.207648},
+ {0.093844, 0.994812, -0.038850},
+ {0.532182, 0.839961, -0.105838},
+ {0.099612, 0.994812, -0.019807},
+ {0.542589, 0.839961, 0.000000},
+ {0.101566, 0.994812, 0.000000},
+ {0.532182, 0.839961, 0.105838},
+ {0.099612, 0.994812, 0.019807},
+ {0.501297, 0.839961, 0.207648},
+ {0.093844, 0.994812, 0.038850},
+ {0.451155, 0.839961, 0.301431},
+ {0.084445, 0.994812, 0.056429},
+ {0.383679, 0.839961, 0.383679},
+ {0.071810, 0.994812, 0.071810},
+ {0.301462, 0.839961, 0.451155},
+ {0.056429, 0.994812, 0.084445},
+ {0.207648, 0.839961, 0.501297},
+ {0.038850, 0.994812, 0.093844},
+ {0.105838, 0.839961, 0.532182},
+ {0.019807, 0.994812, 0.099612},
+ {0.000000, 0.839961, 0.542589},
+ {0.000000, 0.994812, 0.101566},
+ {-0.105838, 0.839961, 0.532182},
+ {-0.019807, 0.994812, 0.099612},
+ {-0.207617, 0.839961, 0.501297},
+ {-0.038850, 0.994812, 0.093844},
+ {-0.301431, 0.839961, 0.451155},
+ {-0.056429, 0.994812, 0.084445},
+ {-0.000000, 1.000000, -0.000000},
+ {0.685690, -0.514664, 0.514695},
+ {-0.314524, -0.671194, 0.671194},
+ {-0.314524, -0.789239, 0.527360},
+ {0.685690, -0.605213, 0.404370},
+ {-0.314524, -0.876980, 0.363231},
+ {0.685690, -0.672475, 0.278542},
+ {-0.314524, -0.930998, 0.185186},
+ {0.685690, -0.713889, 0.142003},
+ {-0.314524, -0.949217, 0.000000},
+ {0.685690, -0.727866, 0.000000},
+ {-0.314524, -0.930998, -0.185186},
+ {0.685690, -0.713889, -0.142003},
+ {-0.314524, -0.876980, -0.363231},
+ {0.685690, -0.672475, -0.278542},
+ {-0.314524, -0.789239, -0.527360},
+ {0.685690, -0.605213, -0.404370},
+ {-0.314524, -0.671194, -0.671194},
+ {0.685690, -0.514664, -0.514664},
+ {-0.314524, -0.527360, -0.789239},
+ {0.685690, -0.404370, -0.605213},
+ {-0.314524, -0.363231, -0.876980},
+ {0.685690, -0.278542, -0.672475},
+ {-0.314524, -0.185186, -0.930998},
+ {0.685690, -0.142003, -0.713889},
+ {-0.314524, 0.000000, -0.949217},
+ {0.685690, 0.000000, -0.727866},
+ {-0.314524, 0.185186, -0.930998},
+ {0.685690, 0.142003, -0.713889},
+ {-0.314524, 0.363231, -0.876980},
+ {0.685690, 0.278542, -0.672475},
+ {-0.314524, 0.527360, -0.789239},
+ {0.685690, 0.404370, -0.605213},
+ {-0.314524, 0.671194, -0.671194},
+ {0.685690, 0.514695, -0.514664},
+ {-0.314524, 0.789239, -0.527360},
+ {0.685690, 0.605213, -0.404370},
+ {-0.314524, 0.876980, -0.363262},
+ {0.685690, 0.672475, -0.278542},
+ {-0.314524, 0.930998, -0.185186},
+ {0.685690, 0.713889, -0.142003},
+ {-0.314524, 0.949217, 0.000000},
+ {0.685690, 0.727866, 0.000000},
+ {-0.314524, 0.930998, 0.185156},
+ {0.685690, 0.713889, 0.142003},
+ {-0.314524, 0.876980, 0.363231},
+ {0.685690, 0.672475, 0.278542},
+ {-0.314524, 0.789270, 0.527360},
+ {0.685690, 0.605213, 0.404370},
+ {-0.314524, 0.671194, 0.671194},
+ {0.685690, 0.514664, 0.514664},
+ {-0.314524, 0.527360, 0.789239},
+ {0.685690, 0.404370, 0.605213},
+ {-0.314524, 0.363262, 0.876980},
+ {0.685690, 0.278542, 0.672475},
+ {-0.314524, 0.185186, 0.930998},
+ {0.685690, 0.142003, 0.713889},
+ {-0.314524, 0.000000, 0.949217},
+ {0.685690, 0.000000, 0.727866},
+ {-0.314524, -0.185156, 0.930998},
+ {0.685690, -0.142003, 0.713889},
+ {-0.314524, -0.363231, 0.876980},
+ {0.685690, -0.278542, 0.672475},
+ {-0.314524, -0.527360, 0.789270},
+ {0.685690, -0.404370, 0.605213},
+ {-0.839961, -0.301431, 0.451155},
+ {-0.839961, -0.383679, 0.383679},
+ {-0.839961, -0.207617, 0.501297},
+ {-0.839961, -0.105838, 0.532182},
+ {-0.839961, 0.000000, 0.542589},
+ {-0.839961, 0.105838, 0.532182},
+ {-0.839961, 0.207648, 0.501297},
+ {-0.839961, 0.301462, 0.451155},
+ {-0.839961, 0.383679, 0.383679},
+ {-0.839961, 0.451155, 0.301431},
+ {-0.839961, 0.501297, 0.207648},
+ {-0.839961, 0.532182, 0.105838},
+ {-0.839961, 0.542589, 0.000000},
+ {-0.839961, 0.532182, -0.105838},
+ {-0.839961, 0.501297, -0.207648},
+ {-0.839961, 0.451155, -0.301462},
+ {-0.839961, 0.383679, -0.383679},
+ {-0.839961, 0.301431, -0.451155},
+ {-0.839961, 0.207648, -0.501297},
+ {-0.839961, 0.105838, -0.532182},
+ {-0.839961, 0.000000, -0.542589},
+ {-0.839961, -0.105838, -0.532182},
+ {-0.839961, -0.207648, -0.501297},
+ {-0.839961, -0.301431, -0.451155},
+ {-0.839961, -0.383679, -0.383679},
+ {-0.839961, -0.451155, -0.301431},
+ {-0.839961, -0.501297, -0.207648},
+ {-0.839961, -0.532182, -0.105838},
+ {-0.839961, -0.542589, 0.000000},
+ {-0.839961, -0.532182, 0.105838},
+ {-0.839961, -0.501297, 0.207648},
+ {-0.839961, -0.451155, 0.301431},
+ {-0.839961, -0.451155, 0.301431},
+ {-0.839961, -0.383679, 0.383679},
+ {-0.994812, -0.071810, 0.071810},
+ {-0.994812, -0.084445, 0.056429},
+ {-0.839961, -0.501297, 0.207648},
+ {-0.994812, -0.093844, 0.038850},
+ {-0.839961, -0.532182, 0.105838},
+ {-0.994812, -0.099612, 0.019807},
+ {-0.839961, -0.542589, 0.000000},
+ {-0.994812, -0.101566, 0.000000},
+ {-0.839961, -0.532182, -0.105838},
+ {-0.994812, -0.099612, -0.019807},
+ {-0.839961, -0.501297, -0.207648},
+ {-0.994812, -0.093844, -0.038850},
+ {-0.839961, -0.451155, -0.301431},
+ {-0.994812, -0.084445, -0.056429},
+ {-0.839961, -0.383679, -0.383679},
+ {-0.994812, -0.071810, -0.071810},
+ {-0.839961, -0.301431, -0.451155},
+ {-0.994812, -0.056429, -0.084445},
+ {-0.839961, -0.207648, -0.501297},
+ {-0.994812, -0.038850, -0.093844},
+ {-0.839961, -0.105838, -0.532182},
+ {-0.994812, -0.019807, -0.099612},
+ {-0.839961, 0.000000, -0.542589},
+ {-0.994812, 0.000000, -0.101566},
+ {-0.839961, 0.105838, -0.532182},
+ {-0.994812, 0.019807, -0.099612},
+ {-0.839961, 0.207648, -0.501297},
+ {-0.994812, 0.038850, -0.093844},
+ {-0.839961, 0.301431, -0.451155},
+ {-0.994812, 0.056429, -0.084445},
+ {-0.839961, 0.383679, -0.383679},
+ {-0.994812, 0.071810, -0.071810},
+ {-0.839961, 0.451155, -0.301462},
+ {-0.994812, 0.084445, -0.056429},
+ {-0.839961, 0.501297, -0.207648},
+ {-0.994812, 0.093844, -0.038850},
+ {-0.839961, 0.532182, -0.105838},
+ {-0.994812, 0.099612, -0.019807},
+ {-0.839961, 0.542589, 0.000000},
+ {-0.994812, 0.101566, 0.000000},
+ {-0.839961, 0.532182, 0.105838},
+ {-0.994812, 0.099612, 0.019807},
+ {-0.839961, 0.501297, 0.207648},
+ {-0.994812, 0.093844, 0.038850},
+ {-0.839961, 0.451155, 0.301431},
+ {-0.994812, 0.084445, 0.056429},
+ {-0.839961, 0.383679, 0.383679},
+ {-0.994812, 0.071810, 0.071810},
+ {-0.839961, 0.301462, 0.451155},
+ {-0.994812, 0.056429, 0.084445},
+ {-0.839961, 0.207648, 0.501297},
+ {-0.994812, 0.038850, 0.093844},
+ {-0.839961, 0.105838, 0.532182},
+ {-0.994812, 0.019807, 0.099612},
+ {-0.839961, 0.000000, 0.542589},
+ {-0.994812, 0.000000, 0.101566},
+ {-0.839961, -0.105838, 0.532182},
+ {-0.994812, -0.019807, 0.099612},
+ {-0.839961, -0.207617, 0.501297},
+ {-0.994812, -0.038850, 0.093844},
+ {-0.839961, -0.301431, 0.451155},
+ {-0.994812, -0.056429, 0.084445},
+ {-1.000000, 0.000000, 0.000000},
+ {-0.685690, -0.514664, -0.514695},
+ {0.314524, -0.671194, -0.671194},
+ {0.314524, -0.789239, -0.527360},
+ {-0.685690, -0.605213, -0.404370},
+ {0.314524, -0.876980, -0.363231},
+ {-0.685690, -0.672475, -0.278542},
+ {0.314524, -0.930998, -0.185186},
+ {-0.685690, -0.713889, -0.142003},
+ {0.314524, -0.949217, 0.000000},
+ {-0.685690, -0.727866, 0.000000},
+ {0.314524, -0.930998, 0.185186},
+ {-0.685690, -0.713889, 0.142003},
+ {0.314524, -0.876980, 0.363231},
+ {-0.685690, -0.672475, 0.278542},
+ {0.314524, -0.789239, 0.527360},
+ {-0.685690, -0.605213, 0.404370},
+ {0.314524, -0.671194, 0.671194},
+ {-0.685690, -0.514664, 0.514664},
+ {0.314524, -0.527360, 0.789239},
+ {-0.685690, -0.404370, 0.605213},
+ {0.314524, -0.363231, 0.876980},
+ {-0.685690, -0.278542, 0.672475},
+ {0.314524, -0.185186, 0.930998},
+ {-0.685690, -0.142003, 0.713889},
+ {0.314524, 0.000000, 0.949217},
+ {-0.685690, 0.000000, 0.727866},
+ {0.314524, 0.185186, 0.930998},
+ {-0.685690, 0.142003, 0.713889},
+ {0.314524, 0.363231, 0.876980},
+ {-0.685690, 0.278542, 0.672475},
+ {0.314524, 0.527360, 0.789239},
+ {-0.685690, 0.404370, 0.605213},
+ {0.314524, 0.671194, 0.671194},
+ {-0.685690, 0.514664, 0.514664},
+ {0.314524, 0.789239, 0.527360},
+ {-0.685690, 0.605213, 0.404370},
+ {0.314524, 0.876980, 0.363262},
+ {-0.685690, 0.672475, 0.278542},
+ {0.314524, 0.930998, 0.185186},
+ {-0.685690, 0.713889, 0.142003},
+ {0.314524, 0.949217, 0.000000},
+ {-0.685690, 0.727866, 0.000000},
+ {0.314524, 0.930998, -0.185156},
+ {-0.685690, 0.713889, -0.142003},
+ {0.314524, 0.876980, -0.363231},
+ {-0.685690, 0.672475, -0.278542},
+ {0.314524, 0.789270, -0.527360},
+ {-0.685690, 0.605213, -0.404370},
+ {0.314524, 0.671194, -0.671194},
+ {-0.685690, 0.514664, -0.514695},
+ {0.314524, 0.527360, -0.789239},
+ {-0.685690, 0.404370, -0.605213},
+ {0.314524, 0.363262, -0.876980},
+ {-0.685690, 0.278542, -0.672475},
+ {0.314524, 0.185186, -0.930998},
+ {-0.685690, 0.141972, -0.713889},
+ {0.314524, 0.000000, -0.949217},
+ {-0.685690, 0.000000, -0.727866},
+ {0.314524, -0.185156, -0.930998},
+ {-0.685690, -0.142003, -0.713889},
+ {0.314524, -0.363231, -0.876980},
+ {-0.685690, -0.278542, -0.672475},
+ {0.314524, -0.527360, -0.789270},
+ {-0.685690, -0.404370, -0.605213},
+ {0.839961, -0.301431, -0.451155},
+ {0.839961, -0.383679, -0.383679},
+ {0.839961, -0.207617, -0.501297},
+ {0.839961, -0.105838, -0.532182},
+ {0.839961, 0.000000, -0.542589},
+ {0.839961, 0.105838, -0.532182},
+ {0.839961, 0.207648, -0.501297},
+ {0.839961, 0.301462, -0.451155},
+ {0.839961, 0.383679, -0.383679},
+ {0.839961, 0.451155, -0.301431},
+ {0.839961, 0.501297, -0.207617},
+ {0.839961, 0.532182, -0.105838},
+ {0.839961, 0.542589, 0.000000},
+ {0.839961, 0.532182, 0.105838},
+ {0.839961, 0.501297, 0.207648},
+ {0.839961, 0.451155, 0.301462},
+ {0.839961, 0.383679, 0.383679},
+ {0.839961, 0.301431, 0.451155},
+ {0.839961, 0.207648, 0.501297},
+ {0.839961, 0.105838, 0.532182},
+ {0.839961, 0.000000, 0.542589},
+ {0.839961, -0.105838, 0.532182},
+ {0.839961, -0.207648, 0.501297},
+ {0.839961, -0.301431, 0.451155},
+ {0.839961, -0.383679, 0.383679},
+ {0.839961, -0.451155, 0.301462},
+ {0.839961, -0.501297, 0.207648},
+ {0.839961, -0.532182, 0.105838},
+ {0.839961, -0.542589, 0.000000},
+ {0.839961, -0.532182, -0.105838},
+ {0.839961, -0.501297, -0.207648},
+ {0.839961, -0.451155, -0.301431},
+ {0.839961, -0.451155, -0.301431},
+ {0.839961, -0.383679, -0.383679},
+ {0.994812, -0.071810, -0.071810},
+ {0.994812, -0.084445, -0.056429},
+ {0.839961, -0.501297, -0.207648},
+ {0.994812, -0.093844, -0.038850},
+ {0.839961, -0.532182, -0.105838},
+ {0.994812, -0.099612, -0.019807},
+ {0.839961, -0.542589, 0.000000},
+ {0.994812, -0.101566, 0.000000},
+ {0.839961, -0.532182, 0.105838},
+ {0.994812, -0.099612, 0.019807},
+ {0.839961, -0.501297, 0.207648},
+ {0.994812, -0.093844, 0.038850},
+ {0.839961, -0.451155, 0.301462},
+ {0.994812, -0.084445, 0.056429},
+ {0.839961, -0.383679, 0.383679},
+ {0.994812, -0.071810, 0.071810},
+ {0.839961, -0.301431, 0.451155},
+ {0.994812, -0.056429, 0.084445},
+ {0.839961, -0.207648, 0.501297},
+ {0.994812, -0.038850, 0.093844},
+ {0.839961, -0.105838, 0.532182},
+ {0.994812, -0.019807, 0.099612},
+ {0.839961, 0.000000, 0.542589},
+ {0.994812, 0.000000, 0.101566},
+ {0.839961, 0.105838, 0.532182},
+ {0.994812, 0.019807, 0.099612},
+ {0.839961, 0.207648, 0.501297},
+ {0.994812, 0.038850, 0.093844},
+ {0.839961, 0.301431, 0.451155},
+ {0.994812, 0.056429, 0.084445},
+ {0.839961, 0.383679, 0.383679},
+ {0.994812, 0.071810, 0.071810},
+ {0.839961, 0.451155, 0.301462},
+ {0.994812, 0.084445, 0.056429},
+ {0.839961, 0.501297, 0.207648},
+ {0.994812, 0.093844, 0.038850},
+ {0.839961, 0.532182, 0.105838},
+ {0.994812, 0.099612, 0.019807},
+ {0.839961, 0.542589, 0.000000},
+ {0.994812, 0.101566, 0.000000},
+ {0.839961, 0.532182, -0.105838},
+ {0.994812, 0.099612, -0.019807},
+ {0.839961, 0.501297, -0.207617},
+ {0.994812, 0.093844, -0.038850},
+ {0.839961, 0.451155, -0.301431},
+ {0.994812, 0.084445, -0.056429},
+ {0.839961, 0.383679, -0.383679},
+ {0.994812, 0.071810, -0.071810},
+ {0.839961, 0.301462, -0.451155},
+ {0.994812, 0.056429, -0.084445},
+ {0.839961, 0.207648, -0.501297},
+ {0.994812, 0.038850, -0.093844},
+ {0.839961, 0.105838, -0.532182},
+ {0.994812, 0.019807, -0.099612},
+ {0.839961, 0.000000, -0.542589},
+ {0.994812, 0.000000, -0.101566},
+ {0.839961, -0.105838, -0.532182},
+ {0.994812, -0.019807, -0.099612},
+ {0.839961, -0.207617, -0.501297},
+ {0.994812, -0.038850, -0.093844},
+ {0.839961, -0.301431, -0.451155},
+ {0.994812, -0.056429, -0.084445},
+ {1.000000, -0.000000, 0.000000},
+ {-0.192969, 0.921323, 0.337504},
+ {-0.254006, 0.948393, 0.189734},
+ {-0.510392, 0.778008, 0.366314},
+ {-0.279611, 0.813959, 0.509171},
+ {-0.220862, 0.950011, 0.220588},
+ {-0.443312, 0.777856, 0.445418},
+ {-0.212104, 0.938292, 0.273049},
+ {-0.390728, 0.760552, 0.518509},
+ {0.949217, -0.219489, 0.225288},
+ {0.939970, -0.269448, 0.209296},
+ {0.765801, -0.516770, 0.382702},
+ {0.782067, -0.435530, 0.445662},
+ {0.948057, -0.191290, 0.254097},
+ {0.776299, -0.370159, 0.510208},
+ {0.917753, -0.347667, 0.191900},
+ {0.805170, -0.520188, 0.284738},
+ {-0.188055, 0.940214, 0.283883},
+ {-0.354442, 0.760613, 0.543870},
+ {-0.182989, 0.939726, 0.288797},
+ {-0.343333, 0.767174, 0.541795},
+ {-0.334849, 0.922849, 0.190191},
+ {-0.510636, 0.814692, 0.274667},
+ {-0.332499, -0.193548, -0.923002},
+ {-0.189001, -0.253975, -0.948546},
+ {-0.364452, -0.510483, -0.778802},
+ {-0.503800, -0.276803, -0.818232},
+ {-0.219489, -0.225288, -0.949217},
+ {-0.435530, -0.445662, -0.782067},
+ {-0.269295, -0.209204, -0.940031},
+ {-0.516404, -0.382488, -0.766137},
+ {-0.294015, -0.186316, -0.937437},
+ {-0.550066, -0.348582, -0.758843},
+ {-0.290414, -0.184027, -0.939024},
+ {-0.543962, -0.344707, -0.765007},
+ {-0.190710, -0.335215, -0.922605},
+ {-0.275369, -0.511155, -0.814173},
+ {0.937162, -0.294687, 0.186743},
+ {0.757530, -0.551378, 0.349406},
+ {0.938627, -0.291299, 0.184576},
+ {0.763665, -0.545305, 0.345561},
+ {0.922422, -0.191107, 0.335521},
+ {0.813715, -0.275948, 0.511551},
+ {-0.192969, 0.337504, -0.921323},
+ {-0.254006, 0.189734, -0.948393},
+ {-0.510392, 0.366314, -0.778008},
+ {-0.279611, 0.509171, -0.813959},
+ {-0.220862, 0.220588, -0.950011},
+ {-0.443312, 0.445418, -0.777856},
+ {-0.212104, 0.273049, -0.938292},
+ {-0.390728, 0.518509, -0.760552},
+ {0.949217, 0.225288, 0.219489},
+ {0.939970, 0.209296, 0.269448},
+ {0.765801, 0.382702, 0.516770},
+ {0.782067, 0.445662, 0.435530},
+ {0.948057, 0.254097, 0.191290},
+ {0.776299, 0.510208, 0.370159},
+ {0.917753, 0.191900, 0.347667},
+ {0.805170, 0.284738, 0.520188},
+ {-0.188055, 0.283883, -0.940214},
+ {-0.354442, 0.543870, -0.760613},
+ {-0.182989, 0.288797, -0.939726},
+ {-0.343333, 0.541795, -0.767174},
+ {-0.334849, 0.190191, -0.922849},
+ {-0.510636, 0.274667, -0.814692},
+ {-0.332499, -0.923002, 0.193548},
+ {-0.189001, -0.948546, 0.253975},
+ {-0.364452, -0.778802, 0.510483},
+ {-0.503800, -0.818232, 0.276803},
+ {-0.219489, -0.949217, 0.225288},
+ {-0.435530, -0.782067, 0.445662},
+ {-0.269295, -0.940031, 0.209204},
+ {-0.516404, -0.766137, 0.382488},
+ {-0.294015, -0.937437, 0.186316},
+ {-0.550066, -0.758843, 0.348582},
+ {-0.290414, -0.939024, 0.184027},
+ {-0.543962, -0.765007, 0.344707},
+ {-0.190710, -0.922605, 0.335215},
+ {-0.275369, -0.814173, 0.511124},
+ {0.937162, 0.186743, 0.294687},
+ {0.757530, 0.349406, 0.551378},
+ {0.938627, 0.184576, 0.291299},
+ {0.763665, 0.345561, 0.545305},
+ {0.922422, 0.335521, 0.191107},
+ {0.813715, 0.511551, 0.275948},
+ {0.192969, 0.921323, 0.337504},
+ {0.279611, 0.813959, 0.509171},
+ {0.510392, 0.778008, 0.366314},
+ {0.254006, 0.948393, 0.189734},
+ {0.443312, 0.777856, 0.445418},
+ {0.220862, 0.950011, 0.220588},
+ {0.390728, 0.760552, 0.518509},
+ {0.212104, 0.938292, 0.273049},
+ {-0.949217, -0.219489, 0.225288},
+ {-0.782067, -0.435530, 0.445662},
+ {-0.765801, -0.516770, 0.382702},
+ {-0.939970, -0.269448, 0.209296},
+ {-0.948057, -0.191290, 0.254097},
+ {-0.776299, -0.370159, 0.510208},
+ {-0.917753, -0.347667, 0.191900},
+ {-0.805170, -0.520188, 0.284738},
+ {0.354442, 0.760613, 0.543870},
+ {0.188055, 0.940214, 0.283883},
+ {0.343333, 0.767174, 0.541795},
+ {0.182989, 0.939726, 0.288797},
+ {0.510636, 0.814692, 0.274667},
+ {0.334849, 0.922849, 0.190191},
+ {0.332499, -0.193548, -0.923002},
+ {0.503800, -0.276803, -0.818232},
+ {0.364452, -0.510483, -0.778802},
+ {0.189001, -0.253975, -0.948546},
+ {0.435530, -0.445662, -0.782067},
+ {0.219489, -0.225288, -0.949217},
+ {0.516404, -0.382488, -0.766137},
+ {0.269295, -0.209204, -0.940031},
+ {0.550066, -0.348582, -0.758843},
+ {0.294015, -0.186316, -0.937437},
+ {0.543962, -0.344707, -0.765007},
+ {0.290414, -0.184027, -0.939024},
+ {0.275369, -0.511124, -0.814173},
+ {0.190710, -0.335215, -0.922605},
+ {-0.757530, -0.551378, 0.349406},
+ {-0.937162, -0.294687, 0.186743},
+ {-0.763665, -0.545305, 0.345561},
+ {-0.938627, -0.291299, 0.184576},
+ {-0.813715, -0.275948, 0.511551},
+ {-0.922422, -0.191107, 0.335521},
+ {0.192969, 0.337504, -0.921323},
+ {0.279611, 0.509171, -0.813959},
+ {0.510392, 0.366314, -0.778008},
+ {0.254006, 0.189734, -0.948393},
+ {0.443312, 0.445418, -0.777856},
+ {0.220862, 0.220588, -0.950011},
+ {0.390728, 0.518509, -0.760552},
+ {0.212104, 0.273049, -0.938292},
+ {-0.949217, 0.225288, 0.219489},
+ {-0.782067, 0.445662, 0.435530},
+ {-0.765801, 0.382702, 0.516770},
+ {-0.939970, 0.209296, 0.269448},
+ {-0.948057, 0.254097, 0.191290},
+ {-0.776299, 0.510208, 0.370159},
+ {-0.917753, 0.191900, 0.347667},
+ {-0.805170, 0.284738, 0.520188},
+ {0.354442, 0.543870, -0.760613},
+ {0.188055, 0.283883, -0.940214},
+ {0.343333, 0.541795, -0.767174},
+ {0.182989, 0.288797, -0.939726},
+ {0.510636, 0.274667, -0.814692},
+ {0.334849, 0.190191, -0.922849},
+ {0.332499, -0.923002, 0.193548},
+ {0.503800, -0.818232, 0.276803},
+ {0.364452, -0.778802, 0.510483},
+ {0.189001, -0.948546, 0.253975},
+ {0.435530, -0.782067, 0.445662},
+ {0.219489, -0.949217, 0.225288},
+ {0.516404, -0.766137, 0.382488},
+ {0.269295, -0.940031, 0.209204},
+ {0.550066, -0.758843, 0.348582},
+ {0.294015, -0.937437, 0.186316},
+ {0.543962, -0.765007, 0.344707},
+ {0.290414, -0.939024, 0.184027},
+ {0.275369, -0.814173, 0.511124},
+ {0.190710, -0.922605, 0.335215},
+ {-0.757530, 0.349406, 0.551378},
+ {-0.937162, 0.186743, 0.294687},
+ {-0.763665, 0.345561, 0.545305},
+ {-0.938627, 0.184576, 0.291299},
+ {-0.813715, 0.511551, 0.275948},
+ {-0.922422, 0.335521, 0.191107},
+ {0.192969, 0.921323, -0.337504},
+ {0.254006, 0.948393, -0.189734},
+ {0.510392, 0.778008, -0.366314},
+ {0.279611, 0.813959, -0.509171},
+ {0.220862, 0.950011, -0.220588},
+ {0.443312, 0.777856, -0.445418},
+ {0.212104, 0.938292, -0.273049},
+ {0.390728, 0.760552, -0.518509},
+ {-0.949217, -0.219489, -0.225288},
+ {-0.939970, -0.269448, -0.209296},
+ {-0.765801, -0.516770, -0.382702},
+ {-0.782067, -0.435530, -0.445662},
+ {-0.948057, -0.191290, -0.254097},
+ {-0.776299, -0.370159, -0.510208},
+ {-0.917753, -0.347667, -0.191900},
+ {-0.805170, -0.520188, -0.284738},
+ {0.188055, 0.940214, -0.283883},
+ {0.354442, 0.760613, -0.543870},
+ {0.182989, 0.939726, -0.288797},
+ {0.343333, 0.767174, -0.541795},
+ {0.334849, 0.922849, -0.190191},
+ {0.510636, 0.814692, -0.274667},
+ {0.332499, -0.193548, 0.923002},
+ {0.189001, -0.253975, 0.948546},
+ {0.364452, -0.510483, 0.778802},
+ {0.503800, -0.276803, 0.818232},
+ {0.219489, -0.225288, 0.949217},
+ {0.435530, -0.445662, 0.782067},
+ {0.269295, -0.209204, 0.940031},
+ {0.516404, -0.382488, 0.766137},
+ {0.294015, -0.186316, 0.937437},
+ {0.550066, -0.348582, 0.758843},
+ {0.290414, -0.184027, 0.939024},
+ {0.543962, -0.344707, 0.765007},
+ {0.190710, -0.335215, 0.922605},
+ {0.275369, -0.511124, 0.814173},
+ {-0.937162, -0.294687, -0.186743},
+ {-0.757530, -0.551378, -0.349406},
+ {-0.938627, -0.291299, -0.184576},
+ {-0.763665, -0.545305, -0.345561},
+ {-0.922422, -0.191107, -0.335521},
+ {-0.813715, -0.275948, -0.511551},
+ {0.192969, 0.337504, 0.921323},
+ {0.254006, 0.189734, 0.948393},
+ {0.510392, 0.366314, 0.778008},
+ {0.279611, 0.509171, 0.813959},
+ {0.220862, 0.220588, 0.950011},
+ {0.443312, 0.445418, 0.777856},
+ {0.212104, 0.273049, 0.938292},
+ {0.390728, 0.518509, 0.760552},
+ {-0.949217, 0.225288, -0.219489},
+ {-0.939970, 0.209296, -0.269448},
+ {-0.765801, 0.382702, -0.516770},
+ {-0.782067, 0.445662, -0.435530},
+ {-0.948057, 0.254097, -0.191290},
+ {-0.776299, 0.510208, -0.370159},
+ {-0.917753, 0.191900, -0.347667},
+ {-0.805170, 0.284738, -0.520188},
+ {0.188055, 0.283883, 0.940214},
+ {0.354442, 0.543870, 0.760613},
+ {0.182989, 0.288797, 0.939726},
+ {0.343333, 0.541795, 0.767174},
+ {0.334849, 0.190191, 0.922849},
+ {0.510636, 0.274667, 0.814692},
+ {0.332499, -0.923002, -0.193548},
+ {0.189001, -0.948546, -0.253975},
+ {0.364452, -0.778802, -0.510483},
+ {0.503800, -0.818232, -0.276803},
+ {0.219489, -0.949217, -0.225288},
+ {0.435530, -0.782067, -0.445662},
+ {0.269295, -0.940031, -0.209204},
+ {0.516404, -0.766137, -0.382488},
+ {0.294015, -0.937437, -0.186316},
+ {0.550066, -0.758843, -0.348582},
+ {0.290414, -0.939024, -0.184027},
+ {0.543962, -0.765007, -0.344707},
+ {0.190710, -0.922605, -0.335215},
+ {0.275369, -0.814173, -0.511124},
+ {-0.937162, 0.186743, -0.294687},
+ {-0.757530, 0.349406, -0.551378},
+ {-0.938627, 0.184576, -0.291299},
+ {-0.763665, 0.345561, -0.545305},
+ {-0.922422, 0.335521, -0.191107},
+ {-0.813715, 0.511551, -0.275948},
+ {-0.192969, 0.921323, -0.337504},
+ {-0.279611, 0.813959, -0.509171},
+ {-0.510392, 0.778008, -0.366314},
+ {-0.254006, 0.948393, -0.189734},
+ {-0.443312, 0.777856, -0.445418},
+ {-0.220862, 0.950011, -0.220588},
+ {-0.390728, 0.760552, -0.518509},
+ {-0.212104, 0.938292, -0.273049},
+ {0.949217, -0.219489, -0.225288},
+ {0.782067, -0.435530, -0.445662},
+ {0.765801, -0.516770, -0.382702},
+ {0.939970, -0.269448, -0.209296},
+ {0.948057, -0.191290, -0.254097},
+ {0.776299, -0.370159, -0.510208},
+ {0.917753, -0.347667, -0.191900},
+ {0.805170, -0.520188, -0.284738},
+ {-0.354442, 0.760613, -0.543870},
+ {-0.188055, 0.940214, -0.283883},
+ {-0.343333, 0.767174, -0.541795},
+ {-0.182989, 0.939726, -0.288797},
+ {-0.510636, 0.814692, -0.274667},
+ {-0.334849, 0.922849, -0.190191},
+ {-0.332499, -0.193548, 0.923002},
+ {-0.503800, -0.276803, 0.818232},
+ {-0.364452, -0.510483, 0.778802},
+ {-0.189001, -0.253975, 0.948546},
+ {-0.435530, -0.445662, 0.782067},
+ {-0.219489, -0.225288, 0.949217},
+ {-0.516404, -0.382488, 0.766137},
+ {-0.269295, -0.209204, 0.940031},
+ {-0.550066, -0.348582, 0.758843},
+ {-0.294015, -0.186316, 0.937437},
+ {-0.543962, -0.344707, 0.765007},
+ {-0.290414, -0.184027, 0.939024},
+ {-0.275369, -0.511124, 0.814173},
+ {-0.190710, -0.335215, 0.922605},
+ {0.757530, -0.551378, -0.349406},
+ {0.937162, -0.294687, -0.186743},
+ {0.763665, -0.545305, -0.345561},
+ {0.938627, -0.291299, -0.184576},
+ {0.813715, -0.275948, -0.511551},
+ {0.922422, -0.191107, -0.335521},
+ {-0.192969, 0.337504, 0.921323},
+ {-0.279611, 0.509171, 0.813959},
+ {-0.510392, 0.366314, 0.778008},
+ {-0.254006, 0.189734, 0.948393},
+ {-0.443312, 0.445418, 0.777856},
+ {-0.220862, 0.220588, 0.950011},
+ {-0.390728, 0.518509, 0.760552},
+ {-0.212104, 0.273049, 0.938292},
+ {0.949217, 0.225288, -0.219489},
+ {0.782067, 0.445662, -0.435499},
+ {0.765801, 0.382702, -0.516770},
+ {0.939970, 0.209296, -0.269448},
+ {0.948057, 0.254097, -0.191290},
+ {0.776299, 0.510208, -0.370159},
+ {0.917753, 0.191900, -0.347667},
+ {0.805170, 0.284738, -0.520188},
+ {-0.354442, 0.543870, 0.760613},
+ {-0.188055, 0.283883, 0.940214},
+ {-0.343333, 0.541795, 0.767174},
+ {-0.182989, 0.288797, 0.939726},
+ {-0.510636, 0.274667, 0.814692},
+ {-0.334849, 0.190191, 0.922849},
+ {-0.332499, -0.923002, -0.193548},
+ {-0.503800, -0.818232, -0.276803},
+ {-0.364452, -0.778802, -0.510483},
+ {-0.189001, -0.948546, -0.253975},
+ {-0.435530, -0.782067, -0.445662},
+ {-0.219489, -0.949217, -0.225288},
+ {-0.516404, -0.766137, -0.382488},
+ {-0.269295, -0.940031, -0.209204},
+ {-0.550066, -0.758843, -0.348582},
+ {-0.294015, -0.937437, -0.186316},
+ {-0.543962, -0.765007, -0.344707},
+ {-0.290414, -0.939024, -0.184027},
+ {-0.275369, -0.814173, -0.511124},
+ {-0.190710, -0.922605, -0.335215},
+ {0.757530, 0.349406, -0.551378},
+ {0.937162, 0.186743, -0.294687},
+ {0.763665, 0.345561, -0.545305},
+ {0.938627, 0.184576, -0.291299},
+ {0.813715, 0.511551, -0.275948},
+ {0.922422, 0.335521, -0.191107},
+ {0.000122, -0.854793, 0.518937},
+ {-0.057375, -0.848994, 0.525254},
+ {-0.110385, -0.414838, 0.903134},
+ {0.000366, -0.424848, 0.905240},
+ {0.161443, -0.804743, 0.571215},
+ {0.315409, -0.527299, 0.788934},
+ {0.058596, -0.849147, 0.524857},
+ {0.113254, -0.414167, 0.903104},
+ {-0.152837, -0.804865, 0.573412},
+ {-0.304483, -0.524735, 0.794916},
+ {-0.152837, 0.573412, -0.804865},
+ {-0.304483, 0.794916, -0.524735},
+ {0.113254, 0.903104, -0.414167},
+ {0.058596, 0.524857, -0.849147},
+ {0.000366, 0.905240, -0.424848},
+ {0.000122, 0.518937, -0.854793},
+ {-0.057375, 0.525254, -0.848994},
+ {-0.110385, 0.903134, -0.414838},
+ {0.315409, 0.788934, -0.527299},
+ {0.161443, 0.571184, -0.804743},
+ {-0.000122, 0.854793, 0.518937},
+ {0.057375, 0.848994, 0.525254},
+ {0.110385, 0.414838, 0.903134},
+ {-0.000366, 0.424848, 0.905240},
+ {-0.161443, 0.804743, 0.571184},
+ {-0.315409, 0.527299, 0.788934},
+ {-0.058596, 0.849147, 0.524857},
+ {-0.113254, 0.414167, 0.903104},
+ {0.152837, 0.804865, 0.573412},
+ {0.304483, 0.524766, 0.794916},
+ {0.152837, -0.573412, -0.804865},
+ {0.304483, -0.794916, -0.524735},
+ {-0.113254, -0.903104, -0.414167},
+ {-0.058596, -0.524857, -0.849147},
+ {-0.000366, -0.905240, -0.424848},
+ {-0.000122, -0.518937, -0.854793},
+ {0.057375, -0.525254, -0.848994},
+ {0.110385, -0.903134, -0.414838},
+ {-0.315409, -0.788934, -0.527299},
+ {-0.161443, -0.571184, -0.804743},
+ {0.854793, 0.000122, 0.518937},
+ {0.848994, -0.057375, 0.525254},
+ {0.414838, -0.110385, 0.903134},
+ {0.424848, 0.000366, 0.905240},
+ {0.804743, 0.161443, 0.571184},
+ {0.527299, 0.315409, 0.788934},
+ {0.849147, 0.058596, 0.524857},
+ {0.414167, 0.113254, 0.903104},
+ {0.804865, -0.152837, 0.573412},
+ {0.524766, -0.304483, 0.794916},
+ {-0.573412, -0.152837, -0.804865},
+ {-0.794916, -0.304483, -0.524735},
+ {-0.903104, 0.113254, -0.414167},
+ {-0.524857, 0.058596, -0.849147},
+ {-0.905240, 0.000366, -0.424848},
+ {-0.518937, 0.000122, -0.854793},
+ {-0.525254, -0.057375, -0.848994},
+ {-0.903134, -0.110385, -0.414838},
+ {-0.788934, 0.315409, -0.527299},
+ {-0.571184, 0.161443, -0.804743},
+ {-0.854793, -0.000122, 0.518937},
+ {-0.848994, 0.057375, 0.525254},
+ {-0.414838, 0.110385, 0.903134},
+ {-0.424848, -0.000366, 0.905240},
+ {-0.804743, -0.161443, 0.571184},
+ {-0.527299, -0.315409, 0.788934},
+ {-0.849147, -0.058596, 0.524857},
+ {-0.414167, -0.113254, 0.903104},
+ {-0.804865, 0.152837, 0.573412},
+ {-0.524735, 0.304483, 0.794916},
+ {0.573412, 0.152837, -0.804865},
+ {0.794916, 0.304483, -0.524766},
+ {0.903104, -0.113254, -0.414167},
+ {0.524857, -0.058596, -0.849147},
+ {0.905240, -0.000366, -0.424848},
+ {0.518937, -0.000122, -0.854793},
+ {0.525254, 0.057375, -0.848994},
+ {0.903134, 0.110385, -0.414838},
+ {0.788934, -0.315409, -0.527299},
+ {0.571184, -0.161443, -0.804743},
+ {-0.854793, 0.518937, 0.000122},
+ {-0.848994, 0.525254, -0.057375},
+ {-0.414838, 0.903134, -0.110385},
+ {-0.424848, 0.905240, 0.000366},
+ {-0.804743, 0.571184, 0.161443},
+ {-0.527299, 0.788934, 0.315409},
+ {-0.849147, 0.524827, 0.058596},
+ {-0.414167, 0.903104, 0.113254},
+ {-0.804865, 0.573412, -0.152837},
+ {-0.524766, 0.794916, -0.304483},
+ {0.573412, -0.804865, -0.152837},
+ {0.794916, -0.524735, -0.304483},
+ {0.903104, -0.414167, 0.113254},
+ {0.524857, -0.849147, 0.058596},
+ {0.905240, -0.424848, 0.000366},
+ {0.518937, -0.854793, 0.000122},
+ {0.525254, -0.848994, -0.057375},
+ {0.903134, -0.414838, -0.110385},
+ {0.788934, -0.527299, 0.315409},
+ {0.571184, -0.804743, 0.161443},
+ {-0.854793, -0.518937, -0.000122},
+ {-0.848994, -0.525254, 0.057375},
+ {-0.414838, -0.903134, 0.110385},
+ {-0.424848, -0.905240, -0.000366},
+ {-0.804743, -0.571184, -0.161443},
+ {-0.527299, -0.788934, -0.315409},
+ {-0.849147, -0.524857, -0.058596},
+ {-0.414167, -0.903104, -0.113254},
+ {-0.804865, -0.573412, 0.152837},
+ {-0.524735, -0.794916, 0.304483},
+ {0.573412, 0.804865, 0.152837},
+ {0.794916, 0.524735, 0.304483},
+ {0.903104, 0.414167, -0.113254},
+ {0.524857, 0.849147, -0.058596},
+ {0.905240, 0.424848, -0.000366},
+ {0.518937, 0.854793, -0.000122},
+ {0.525254, 0.848994, 0.057375},
+ {0.903134, 0.414838, 0.110385},
+ {0.788934, 0.527299, -0.315409},
+ {0.571184, 0.804743, -0.161443},
+ {0.854793, -0.518937, 0.000122},
+ {0.848994, -0.525254, -0.057375},
+ {0.414838, -0.903134, -0.110385},
+ {0.424848, -0.905240, 0.000366},
+ {0.804743, -0.571184, 0.161443},
+ {0.527299, -0.788934, 0.315409},
+ {0.849147, -0.524857, 0.058596},
+ {0.414167, -0.903104, 0.113254},
+ {0.804865, -0.573412, -0.152837},
+ {0.524735, -0.794916, -0.304483},
+ {-0.573412, 0.804865, -0.152837},
+ {-0.794916, 0.524766, -0.304483},
+ {-0.903104, 0.414167, 0.113254},
+ {-0.524857, 0.849147, 0.058596},
+ {-0.905240, 0.424848, 0.000366},
+ {-0.518937, 0.854793, 0.000122},
+ {-0.525254, 0.848994, -0.057375},
+ {-0.903134, 0.414838, -0.110385},
+ {-0.788934, 0.527299, 0.315409},
+ {-0.571184, 0.804743, 0.161443},
+ {0.854793, 0.518937, -0.000122},
+ {0.848994, 0.525254, 0.057375},
+ {0.414838, 0.903134, 0.110385},
+ {0.424848, 0.905240, -0.000366},
+ {0.804743, 0.571184, -0.161443},
+ {0.527299, 0.788934, -0.315409},
+ {0.849147, 0.524857, -0.058596},
+ {0.414167, 0.903104, -0.113254},
+ {0.804865, 0.573412, 0.152837},
+ {0.524735, 0.794916, 0.304483},
+ {-0.573412, -0.804865, 0.152837},
+ {-0.794916, -0.524735, 0.304483},
+ {-0.903104, -0.414167, -0.113254},
+ {-0.524857, -0.849147, -0.058596},
+ {-0.905240, -0.424848, -0.000366},
+ {-0.518937, -0.854793, -0.000122},
+ {-0.525254, -0.848994, 0.057375},
+ {-0.903134, -0.414838, 0.110385},
+ {-0.788934, -0.527299, -0.315409},
+ {-0.571184, -0.804743, -0.161443},
+ {-0.000122, -0.854793, -0.518937},
+ {0.057375, -0.848994, -0.525254},
+ {0.110385, -0.414838, -0.903134},
+ {-0.000366, -0.424848, -0.905240},
+ {-0.161443, -0.804743, -0.571184},
+ {-0.315409, -0.527299, -0.788934},
+ {-0.058596, -0.849147, -0.524857},
+ {-0.113254, -0.414167, -0.903104},
+ {0.152837, -0.804865, -0.573412},
+ {0.304483, -0.524735, -0.794916},
+ {0.152837, 0.573412, 0.804865},
+ {0.304483, 0.794916, 0.524735},
+ {-0.113254, 0.903104, 0.414167},
+ {-0.058596, 0.524857, 0.849147},
+ {-0.000366, 0.905240, 0.424848},
+ {-0.000122, 0.518937, 0.854793},
+ {0.057375, 0.525254, 0.848994},
+ {0.110385, 0.903134, 0.414838},
+ {-0.315409, 0.788934, 0.527299},
+ {-0.161443, 0.571184, 0.804743},
+ {0.000122, 0.854793, -0.518937},
+ {-0.057375, 0.848994, -0.525254},
+ {-0.110385, 0.414838, -0.903134},
+ {0.000366, 0.424848, -0.905240},
+ {0.161443, 0.804743, -0.571184},
+ {0.315409, 0.527299, -0.788934},
+ {0.058596, 0.849147, -0.524857},
+ {0.113254, 0.414167, -0.903104},
+ {-0.152837, 0.804865, -0.573412},
+ {-0.304483, 0.524735, -0.794916},
+ {-0.152837, -0.573412, 0.804865},
+ {-0.304483, -0.794916, 0.524735},
+ {0.113254, -0.903104, 0.414167},
+ {0.058596, -0.524857, 0.849147},
+ {0.000366, -0.905240, 0.424848},
+ {0.000122, -0.518937, 0.854793},
+ {-0.057375, -0.525254, 0.848994},
+ {-0.110385, -0.903134, 0.414838},
+ {0.315409, -0.788934, 0.527299},
+ {0.161443, -0.571184, 0.804743},
+ {-0.854793, 0.000122, -0.518937},
+ {-0.848994, -0.057375, -0.525254},
+ {-0.414838, -0.110385, -0.903134},
+ {-0.424848, 0.000366, -0.905240},
+ {-0.804743, 0.161443, -0.571184},
+ {-0.527299, 0.315409, -0.788934},
+ {-0.849147, 0.058596, -0.524857},
+ {-0.414167, 0.113254, -0.903104},
+ {-0.804865, -0.152837, -0.573412},
+ {-0.524735, -0.304483, -0.794916},
+ {0.573412, -0.152837, 0.804865},
+ {0.794916, -0.304483, 0.524735},
+ {0.903104, 0.113254, 0.414167},
+ {0.524857, 0.058596, 0.849147},
+ {0.905240, 0.000366, 0.424848},
+ {0.518937, 0.000122, 0.854793},
+ {0.525254, -0.057375, 0.848994},
+ {0.903134, -0.110385, 0.414838},
+ {0.788934, 0.315409, 0.527299},
+ {0.571184, 0.161443, 0.804743},
+ {0.854793, -0.000122, -0.518937},
+ {0.848994, 0.057375, -0.525254},
+ {0.414838, 0.110385, -0.903134},
+ {0.424848, -0.000366, -0.905240},
+ {0.804743, -0.161443, -0.571184},
+ {0.527299, -0.315409, -0.788934},
+ {0.849147, -0.058596, -0.524857},
+ {0.414167, -0.113254, -0.903104},
+ {0.804865, 0.152837, -0.573412},
+ {0.524735, 0.304483, -0.794916},
+ {-0.573412, 0.152837, 0.804865},
+ {-0.794916, 0.304483, 0.524766},
+ {-0.903104, -0.113254, 0.414167},
+ {-0.524857, -0.058596, 0.849147},
+ {-0.905240, -0.000366, 0.424848},
+ {-0.518937, -0.000122, 0.854793},
+ {-0.525254, 0.057375, 0.848994},
+ {-0.903134, 0.110385, 0.414838},
+ {-0.788934, -0.315409, 0.527299},
+ {-0.571184, -0.161443, 0.804743},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000001, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, -0.000000},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000002},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000000, 1.000000, 0.000001},
+ {-0.000002, -1.000000, 0.000000},
+ {-0.000002, -1.000000, 0.000000},
+ {-0.000002, -1.000000, 0.000000},
+ {-0.000002, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {-0.000001, -1.000000, 0.000000},
+ {0.000000, -1.000000, -0.000002},
+ {0.000000, -1.000000, -0.000002},
+ {0.000000, -1.000000, -0.000002},
+ {0.000000, -1.000000, -0.000002},
+ {0.000000, -1.000000, -0.000002},
+ {0.000000, -1.000000, -0.000002},
+ {0.000000, -1.000000, -0.000002},
+ {0.000000, -1.000000, -0.000002},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000000, 0.000000},
+ {1.000000, -0.000002, 0.000000},
+ {1.000000, -0.000002, 0.000000},
+ {1.000000, -0.000002, 0.000000},
+ {1.000000, -0.000002, 0.000000},
+ {1.000000, 0.000000, -0.000002},
+ {1.000000, 0.000000, -0.000002},
+ {1.000000, 0.000000, -0.000002},
+ {1.000000, 0.000000, -0.000002},
+ {1.000000, 0.000000, -0.000004},
+ {1.000000, 0.000000, -0.000004},
+ {1.000000, 0.000000, -0.000004},
+ {1.000000, 0.000000, -0.000004},
+ {0.000000, -0.000002, -1.000000},
+ {0.000000, -0.000002, -1.000000},
+ {0.000000, -0.000002, -1.000000},
+ {0.000000, -0.000002, -1.000000},
+ {0.000000, -0.000001, -1.000000},
+ {0.000000, -0.000001, -1.000000},
+ {0.000000, -0.000001, -1.000000},
+ {0.000000, -0.000001, -1.000000},
+ {-0.000002, 0.000000, -1.000000},
+ {-0.000002, 0.000000, -1.000000},
+ {-0.000002, 0.000000, -1.000000},
+ {-0.000002, 0.000000, -1.000000},
+ {-0.000002, 0.000000, -1.000000},
+ {-0.000002, 0.000000, -1.000000},
+ {-0.000002, 0.000000, -1.000000},
+ {-0.000002, 0.000000, -1.000000},
+ {-1.000000, -0.000004, 0.000000},
+ {-1.000000, -0.000004, 0.000000},
+ {-1.000000, -0.000004, 0.000000},
+ {-1.000000, -0.000004, 0.000000},
+ {-1.000000, -0.000004, 0.000000},
+ {-1.000000, -0.000004, 0.000000},
+ {-1.000000, -0.000004, 0.000000},
+ {-1.000000, -0.000004, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000000, 0.000000},
+ {-1.000000, 0.000001, 0.000000},
+ {-1.000000, 0.000001, 0.000000},
+ {-1.000000, 0.000001, 0.000000},
+ {-1.000000, 0.000001, 0.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {-0.000000, 0.000000, 1.000000},
+ {0.000000, -0.000003, 1.000000},
+ {0.000000, -0.000003, 1.000000},
+ {0.000000, -0.000003, 1.000000},
+ {0.000000, -0.000003, 1.000000},
+ {0.000003, -0.000000, 1.000000},
+ {0.000003, -0.000000, 1.000000},
+ {0.000003, -0.000000, 1.000000},
+ {0.000003, -0.000000, 1.000000},
+ {0.000002, -0.000000, 1.000000},
+ {0.000002, -0.000000, 1.000000},
+ {0.000002, -0.000000, 1.000000},
+ {0.000002, -0.000000, 1.000000},
+};
+
+short
+companion_triangles[COMPANION_TRIANGLE_COUNT][3] = {
+ {0, 1, 2},
+ {0, 2, 3},
+ {4, 5, 6},
+ {0, 7, 8},
+ {0, 8, 9},
+ {0, 9, 10},
+ {0, 10, 11},
+ {0, 11, 12},
+ {0, 12, 13},
+ {0, 13, 14},
+ {0, 14, 15},
+ {16, 17, 18},
+ {0, 19, 20},
+ {0, 20, 21},
+ {0, 21, 22},
+ {0, 22, 23},
+ {0, 23, 24},
+ {0, 24, 25},
+ {0, 25, 26},
+ {0, 26, 27},
+ {0, 27, 28},
+ {0, 28, 29},
+ {0, 29, 30},
+ {31, 32, 33},
+ {0, 34, 35},
+ {0, 35, 36},
+ {0, 36, 37},
+ {0, 37, 38},
+ {0, 38, 39},
+ {0, 39, 40},
+ {0, 40, 41},
+ {41, 1, 0},
+ {42, 43, 44},
+ {42, 44, 45},
+ {46, 47, 48},
+ {46, 48, 49},
+ {46, 49, 50},
+ {46, 50, 51},
+ {46, 51, 52},
+ {53, 54, 55},
+ {42, 56, 57},
+ {42, 57, 58},
+ {42, 58, 59},
+ {42, 59, 60},
+ {42, 60, 61},
+ {42, 61, 62},
+ {42, 62, 63},
+ {42, 63, 64},
+ {42, 64, 65},
+ {42, 65, 66},
+ {67, 68, 69},
+ {42, 70, 71},
+ {42, 71, 72},
+ {42, 72, 73},
+ {42, 73, 74},
+ {42, 74, 75},
+ {42, 75, 76},
+ {42, 76, 77},
+ {46, 78, 79},
+ {80, 81, 82},
+ {67, 83, 84},
+ {67, 84, 85},
+ {42, 86, 87},
+ {87, 43, 42},
+ {88, 89, 90},
+ {88, 90, 91},
+ {88, 91, 92},
+ {88, 92, 93},
+ {88, 93, 94},
+ {95, 96, 97},
+ {88, 98, 99},
+ {88, 99, 100},
+ {88, 100, 101},
+ {102, 103, 104},
+ {88, 105, 106},
+ {88, 106, 107},
+ {88, 107, 108},
+ {109, 110, 111},
+ {88, 112, 113},
+ {88, 113, 114},
+ {88, 114, 115},
+ {88, 115, 116},
+ {88, 116, 117},
+ {88, 117, 118},
+ {88, 118, 119},
+ {88, 119, 120},
+ {88, 120, 121},
+ {88, 121, 122},
+ {88, 122, 123},
+ {109, 124, 125},
+ {88, 126, 127},
+ {88, 127, 128},
+ {88, 128, 129},
+ {109, 130, 131},
+ {88, 132, 133},
+ {133, 89, 88},
+ {134, 135, 136},
+ {134, 136, 137},
+ {134, 137, 138},
+ {134, 138, 139},
+ {140, 141, 142},
+ {134, 143, 144},
+ {134, 144, 145},
+ {134, 145, 146},
+ {147, 148, 149},
+ {134, 150, 151},
+ {134, 151, 152},
+ {134, 152, 153},
+ {134, 153, 154},
+ {147, 155, 156},
+ {134, 157, 158},
+ {134, 158, 159},
+ {134, 159, 160},
+ {134, 160, 161},
+ {134, 161, 162},
+ {134, 162, 163},
+ {134, 163, 164},
+ {134, 164, 165},
+ {134, 165, 166},
+ {134, 166, 167},
+ {134, 167, 168},
+ {134, 168, 169},
+ {134, 169, 170},
+ {134, 170, 171},
+ {134, 171, 172},
+ {134, 172, 173},
+ {134, 173, 174},
+ {175, 176, 177},
+ {178, 179, 180},
+ {181, 182, 183},
+ {181, 183, 184},
+ {181, 184, 185},
+ {181, 185, 186},
+ {181, 186, 187},
+ {181, 187, 188},
+ {181, 188, 189},
+ {181, 189, 190},
+ {181, 190, 191},
+ {181, 191, 192},
+ {181, 192, 193},
+ {181, 193, 194},
+ {181, 194, 195},
+ {196, 197, 198},
+ {181, 199, 200},
+ {181, 200, 201},
+ {181, 201, 202},
+ {181, 202, 203},
+ {181, 203, 204},
+ {181, 204, 205},
+ {181, 205, 206},
+ {181, 206, 207},
+ {208, 209, 210},
+ {211, 212, 213},
+ {181, 214, 215},
+ {181, 215, 216},
+ {181, 216, 217},
+ {181, 217, 218},
+ {181, 218, 219},
+ {181, 219, 220},
+ {220, 221, 181},
+ {222, 223, 224},
+ {222, 224, 225},
+ {222, 225, 226},
+ {222, 226, 227},
+ {222, 227, 228},
+ {222, 228, 229},
+ {222, 229, 230},
+ {222, 230, 231},
+ {222, 231, 232},
+ {222, 232, 233},
+ {222, 233, 234},
+ {222, 234, 235},
+ {222, 235, 236},
+ {222, 236, 237},
+ {238, 239, 240},
+ {222, 241, 242},
+ {222, 242, 243},
+ {244, 245, 246},
+ {222, 247, 248},
+ {222, 248, 249},
+ {222, 249, 250},
+ {222, 250, 251},
+ {222, 251, 252},
+ {222, 252, 253},
+ {222, 253, 254},
+ {222, 254, 255},
+ {256, 257, 258},
+ {238, 259, 260},
+ {222, 261, 262},
+ {222, 262, 263},
+ {222, 263, 264},
+ {264, 223, 222},
+ {265, 266, 267},
+ {265, 267, 268},
+ {265, 268, 269},
+ {265, 269, 270},
+ {265, 270, 271},
+ {265, 271, 272},
+ {265, 272, 273},
+ {274, 275, 276},
+ {265, 277, 278},
+ {279, 280, 281},
+ {265, 282, 283},
+ {279, 284, 285},
+ {265, 286, 287},
+ {265, 287, 288},
+ {265, 288, 289},
+ {265, 289, 290},
+ {291, 292, 293},
+ {265, 294, 295},
+ {265, 295, 296},
+ {265, 296, 297},
+ {265, 297, 298},
+ {265, 298, 299},
+ {265, 299, 300},
+ {265, 300, 301},
+ {265, 301, 302},
+ {265, 302, 303},
+ {265, 303, 304},
+ {279, 305, 306},
+ {265, 307, 308},
+ {265, 308, 309},
+ {265, 309, 310},
+ {310, 266, 265},
+ {311, 312, 313},
+ {314, 315, 316},
+ {311, 317, 318},
+ {311, 318, 319},
+ {311, 319, 320},
+ {311, 320, 321},
+ {322, 323, 324},
+ {311, 325, 326},
+ {311, 326, 327},
+ {328, 329, 330},
+ {311, 331, 332},
+ {311, 332, 333},
+ {311, 333, 334},
+ {311, 334, 335},
+ {328, 336, 337},
+ {311, 338, 339},
+ {340, 341, 342},
+ {311, 343, 344},
+ {311, 344, 345},
+ {311, 345, 346},
+ {347, 348, 349},
+ {311, 350, 351},
+ {322, 352, 353},
+ {311, 354, 355},
+ {311, 355, 356},
+ {328, 357, 358},
+ {311, 359, 360},
+ {311, 360, 361},
+ {311, 361, 362},
+ {311, 362, 363},
+ {311, 363, 364},
+ {364, 312, 311},
+ {365, 366, 367},
+ {368, 369, 370},
+ {368, 370, 371},
+ {368, 371, 372},
+ {368, 372, 373},
+ {368, 373, 374},
+ {368, 374, 375},
+ {368, 375, 376},
+ {368, 376, 377},
+ {368, 377, 378},
+ {368, 378, 379},
+ {368, 379, 380},
+ {381, 382, 383},
+ {368, 384, 385},
+ {368, 385, 386},
+ {368, 386, 387},
+ {365, 388, 389},
+ {368, 390, 391},
+ {392, 393, 394},
+ {368, 395, 396},
+ {368, 396, 397},
+ {368, 397, 398},
+ {368, 398, 399},
+ {368, 399, 400},
+ {368, 400, 401},
+ {381, 402, 403},
+ {368, 404, 405},
+ {368, 405, 406},
+ {368, 406, 407},
+ {368, 407, 408},
+ {368, 408, 409},
+ {410, 411, 381},
+ {412, 413, 414},
+ {412, 414, 415},
+ {412, 415, 416},
+ {412, 416, 417},
+ {412, 417, 418},
+ {412, 418, 419},
+ {412, 419, 420},
+ {412, 420, 421},
+ {422, 423, 424},
+ {412, 425, 426},
+ {412, 426, 427},
+ {412, 427, 428},
+ {412, 428, 429},
+ {422, 430, 431},
+ {412, 432, 433},
+ {412, 433, 434},
+ {412, 434, 435},
+ {412, 435, 436},
+ {412, 436, 437},
+ {412, 437, 438},
+ {412, 438, 439},
+ {440, 441, 442},
+ {412, 443, 444},
+ {412, 444, 445},
+ {412, 445, 446},
+ {412, 446, 447},
+ {422, 448, 449},
+ {412, 450, 451},
+ {412, 451, 452},
+ {412, 452, 453},
+ {412, 453, 454},
+ {454, 413, 412},
+ {455, 456, 457},
+ {455, 457, 458},
+ {455, 458, 459},
+ {455, 459, 460},
+ {455, 460, 461},
+ {455, 461, 462},
+ {455, 462, 463},
+ {455, 463, 464},
+ {455, 464, 465},
+ {455, 465, 466},
+ {467, 468, 469},
+ {455, 470, 471},
+ {455, 471, 472},
+ {455, 472, 473},
+ {455, 473, 474},
+ {455, 474, 475},
+ {476, 477, 478},
+ {455, 479, 480},
+ {481, 482, 483},
+ {455, 484, 485},
+ {455, 485, 486},
+ {455, 486, 487},
+ {455, 487, 488},
+ {455, 488, 489},
+ {455, 489, 490},
+ {455, 490, 491},
+ {455, 491, 492},
+ {455, 492, 493},
+ {455, 493, 494},
+ {455, 494, 495},
+ {455, 495, 496},
+ {497, 498, 499},
+ {500, 501, 502},
+ {503, 504, 505},
+ {506, 507, 508},
+ {500, 509, 510},
+ {500, 510, 511},
+ {500, 511, 512},
+ {506, 513, 514},
+ {500, 515, 516},
+ {500, 516, 517},
+ {500, 517, 518},
+ {500, 518, 519},
+ {500, 519, 520},
+ {500, 520, 521},
+ {500, 521, 522},
+ {500, 522, 523},
+ {500, 523, 524},
+ {500, 524, 525},
+ {500, 525, 526},
+ {500, 526, 527},
+ {500, 527, 528},
+ {500, 528, 529},
+ {500, 529, 530},
+ {500, 530, 531},
+ {500, 531, 532},
+ {500, 532, 533},
+ {500, 533, 534},
+ {535, 536, 537},
+ {500, 538, 539},
+ {535, 540, 541},
+ {500, 542, 543},
+ {500, 543, 544},
+ {544, 501, 500},
+ {545, 546, 547},
+ {545, 547, 548},
+ {549, 547, 546},
+ {549, 546, 550},
+ {551, 552, 553},
+ {551, 553, 554},
+ {555, 556, 557},
+ {555, 557, 558},
+ {559, 560, 561},
+ {559, 561, 562},
+ {560, 549, 550},
+ {560, 550, 561},
+ {563, 564, 565},
+ {563, 565, 566},
+ {567, 568, 569},
+ {567, 569, 570},
+ {571, 572, 573},
+ {571, 573, 574},
+ {575, 576, 577},
+ {575, 577, 578},
+ {564, 579, 580},
+ {564, 580, 565},
+ {581, 580, 579},
+ {581, 579, 582},
+ {583, 584, 585},
+ {583, 585, 586},
+ {586, 585, 587},
+ {586, 587, 588},
+ {589, 590, 591},
+ {589, 591, 592},
+ {588, 587, 590},
+ {588, 590, 589},
+ {593, 594, 595},
+ {593, 595, 596},
+ {597, 548, 547},
+ {597, 547, 598},
+ {596, 595, 599},
+ {596, 599, 600},
+ {598, 547, 549},
+ {598, 549, 601},
+ {602, 603, 604},
+ {602, 604, 605},
+ {603, 606, 607},
+ {603, 607, 604},
+ {608, 609, 603},
+ {608, 603, 602},
+ {601, 549, 560},
+ {601, 560, 610},
+ {611, 612, 613},
+ {611, 613, 614},
+ {615, 616, 617},
+ {615, 617, 618},
+ {619, 620, 621},
+ {619, 621, 622},
+ {623, 621, 620},
+ {623, 620, 624},
+ {625, 623, 624},
+ {625, 624, 626},
+ {627, 628, 629},
+ {627, 629, 630},
+ {631, 629, 628},
+ {631, 628, 632},
+ {633, 634, 635},
+ {633, 635, 636},
+ {637, 638, 639},
+ {637, 639, 640},
+ {641, 642, 643},
+ {641, 643, 644},
+ {645, 631, 632},
+ {645, 632, 646},
+ {647, 648, 649},
+ {650, 651, 652},
+ {650, 652, 653},
+ {654, 655, 656},
+ {654, 656, 657},
+ {657, 656, 658},
+ {657, 658, 659},
+ {660, 661, 662},
+ {660, 662, 663},
+ {659, 658, 664},
+ {659, 664, 665},
+ {666, 667, 668},
+ {666, 668, 669},
+ {655, 670, 671},
+ {655, 671, 656},
+ {670, 630, 629},
+ {670, 629, 671},
+ {656, 671, 672},
+ {656, 672, 658},
+ {671, 629, 631},
+ {671, 631, 672},
+ {673, 674, 675},
+ {673, 675, 676},
+ {677, 678, 679},
+ {677, 679, 680},
+ {658, 672, 681},
+ {658, 681, 664},
+ {672, 631, 645},
+ {672, 645, 681},
+ {682, 683, 684},
+ {682, 684, 685},
+ {686, 687, 688},
+ {686, 688, 689},
+ {690, 691, 687},
+ {690, 687, 686},
+ {692, 693, 694},
+ {692, 694, 695},
+ {696, 697, 698},
+ {696, 698, 699},
+ {699, 698, 700},
+ {699, 700, 701},
+ {702, 703, 697},
+ {702, 697, 696},
+ {704, 705, 703},
+ {704, 703, 702},
+ {697, 706, 707},
+ {697, 707, 698},
+ {706, 564, 563},
+ {706, 563, 707},
+ {698, 707, 708},
+ {698, 708, 700},
+ {709, 710, 711},
+ {709, 711, 712},
+ {703, 713, 706},
+ {703, 706, 697},
+ {713, 579, 564},
+ {713, 564, 706},
+ {705, 714, 713},
+ {705, 713, 703},
+ {714, 582, 579},
+ {714, 579, 713},
+ {715, 716, 717},
+ {715, 717, 718},
+ {719, 720, 721},
+ {719, 721, 722},
+ {723, 724, 716},
+ {723, 716, 715},
+ {725, 726, 727},
+ {725, 727, 728},
+ {729, 730, 731},
+ {729, 731, 732},
+ {733, 731, 730},
+ {733, 730, 734},
+ {735, 736, 737},
+ {735, 737, 738},
+ {739, 740, 741},
+ {739, 741, 742},
+ {743, 744, 745},
+ {743, 745, 746},
+ {744, 733, 734},
+ {744, 734, 745},
+ {747, 748, 749},
+ {747, 749, 750},
+ {751, 747, 750},
+ {751, 750, 752},
+ {753, 754, 755},
+ {753, 755, 756},
+ {757, 758, 759},
+ {757, 759, 760},
+ {748, 761, 762},
+ {748, 762, 749},
+ {763, 762, 761},
+ {763, 761, 764},
+ {765, 766, 767},
+ {765, 767, 768},
+ {768, 767, 769},
+ {768, 769, 770},
+ {771, 772, 773},
+ {771, 773, 774},
+ {770, 769, 772},
+ {770, 772, 771},
+ {766, 775, 776},
+ {766, 776, 767},
+ {775, 732, 731},
+ {775, 731, 776},
+ {767, 776, 777},
+ {767, 777, 769},
+ {776, 731, 733},
+ {776, 733, 777},
+ {772, 778, 779},
+ {772, 779, 773},
+ {778, 744, 743},
+ {778, 743, 779},
+ {769, 777, 778},
+ {769, 778, 772},
+ {777, 733, 744},
+ {777, 744, 778},
+ {780, 781, 782},
+ {780, 782, 783},
+ {784, 785, 786},
+ {784, 786, 787},
+ {786, 788, 789},
+ {786, 789, 787},
+ {790, 791, 792},
+ {790, 792, 793},
+ {794, 790, 793},
+ {794, 793, 795},
+ {796, 797, 798},
+ {796, 798, 799},
+ {800, 798, 797},
+ {800, 797, 801},
+ {802, 803, 804},
+ {802, 804, 805},
+ {806, 807, 808},
+ {806, 808, 809},
+ {810, 811, 812},
+ {810, 812, 813},
+ {814, 800, 801},
+ {814, 801, 815},
+ {816, 817, 818},
+ {819, 820, 821},
+ {819, 821, 822},
+ {823, 824, 825},
+ {823, 825, 826},
+ {826, 825, 827},
+ {826, 827, 828},
+ {829, 830, 831},
+ {829, 831, 832},
+ {828, 827, 833},
+ {828, 833, 834},
+ {835, 836, 837},
+ {835, 837, 838},
+ {824, 839, 840},
+ {824, 840, 825},
+ {839, 799, 798},
+ {839, 798, 840},
+ {825, 840, 841},
+ {825, 841, 827},
+ {840, 798, 800},
+ {840, 800, 841},
+ {842, 843, 844},
+ {842, 844, 845},
+ {843, 846, 847},
+ {843, 847, 844},
+ {827, 841, 848},
+ {827, 848, 833},
+ {841, 800, 814},
+ {841, 814, 848},
+ {849, 850, 851},
+ {849, 851, 852},
+ {853, 854, 850},
+ {853, 850, 849},
+ {855, 856, 857},
+ {855, 857, 858},
+ {859, 860, 861},
+ {859, 861, 862},
+ {863, 864, 865},
+ {863, 865, 866},
+ {866, 865, 867},
+ {866, 867, 868},
+ {869, 870, 864},
+ {869, 864, 863},
+ {871, 872, 870},
+ {871, 870, 869},
+ {864, 873, 874},
+ {864, 874, 865},
+ {873, 748, 747},
+ {873, 747, 874},
+ {865, 874, 875},
+ {865, 875, 867},
+ {874, 747, 751},
+ {874, 751, 875},
+ {870, 876, 873},
+ {870, 873, 864},
+ {876, 761, 748},
+ {876, 748, 873},
+ {872, 877, 876},
+ {872, 876, 870},
+ {877, 764, 761},
+ {877, 761, 876},
+ {878, 879, 880},
+ {878, 880, 881},
+ {882, 883, 884},
+ {882, 884, 885},
+ {886, 887, 879},
+ {886, 879, 878},
+ {888, 889, 890},
+ {888, 890, 891},
+ {892, 893, 894},
+ {892, 894, 895},
+ {896, 897, 895},
+ {896, 895, 894},
+ {898, 899, 900},
+ {898, 900, 901},
+ {902, 903, 904},
+ {902, 904, 905},
+ {906, 907, 908},
+ {906, 908, 909},
+ {909, 908, 897},
+ {909, 897, 896},
+ {910, 911, 912},
+ {910, 912, 913},
+ {914, 915, 911},
+ {914, 911, 910},
+ {916, 917, 918},
+ {916, 918, 919},
+ {920, 921, 922},
+ {920, 922, 923},
+ {913, 912, 924},
+ {913, 924, 925},
+ {926, 927, 925},
+ {926, 925, 924},
+ {928, 929, 930},
+ {928, 930, 931},
+ {929, 932, 933},
+ {929, 933, 930},
+ {934, 935, 936},
+ {934, 936, 937},
+ {932, 934, 937},
+ {932, 937, 933},
+ {938, 939, 940},
+ {938, 940, 941},
+ {942, 943, 894},
+ {942, 894, 893},
+ {939, 944, 945},
+ {939, 945, 940},
+ {943, 946, 896},
+ {943, 896, 894},
+ {947, 948, 949},
+ {947, 949, 950},
+ {950, 949, 951},
+ {950, 951, 952},
+ {953, 947, 950},
+ {953, 950, 954},
+ {946, 955, 909},
+ {946, 909, 896},
+ {956, 957, 958},
+ {956, 958, 959},
+ {960, 961, 962},
+ {960, 962, 963},
+ {962, 961, 964},
+ {962, 964, 965},
+ {966, 967, 965},
+ {966, 965, 964},
+ {968, 969, 970},
+ {968, 970, 971},
+ {972, 973, 974},
+ {972, 974, 975},
+ {976, 977, 975},
+ {976, 975, 974},
+ {978, 979, 980},
+ {978, 980, 981},
+ {982, 983, 984},
+ {982, 984, 985},
+ {986, 987, 988},
+ {986, 988, 989},
+ {989, 988, 977},
+ {989, 977, 976},
+ {990, 991, 992},
+ {993, 994, 995},
+ {993, 995, 996},
+ {997, 998, 999},
+ {997, 999, 1000},
+ {998, 1001, 1002},
+ {998, 1002, 999},
+ {1003, 1004, 1005},
+ {1003, 1005, 1006},
+ {1001, 1003, 1006},
+ {1001, 1006, 1002},
+ {1007, 1008, 1009},
+ {1007, 1009, 1010},
+ {1000, 999, 1011},
+ {1000, 1011, 1012},
+ {1012, 1011, 974},
+ {1012, 974, 973},
+ {999, 1002, 1013},
+ {999, 1013, 1011},
+ {1011, 1013, 976},
+ {1011, 976, 974},
+ {1006, 1005, 1014},
+ {1006, 1014, 1015},
+ {1015, 1014, 986},
+ {1015, 986, 989},
+ {1002, 1006, 1015},
+ {1002, 1015, 1013},
+ {1013, 1015, 989},
+ {1013, 989, 976},
+ {1016, 1010, 1009},
+ {1016, 1009, 1017},
+ {1018, 1019, 1020},
+ {1018, 1020, 1021},
+ {1022, 1023, 1024},
+ {1022, 1024, 1025},
+ {1026, 1027, 1028},
+ {1026, 1028, 1029},
+ {1030, 1031, 1032},
+ {1030, 1032, 1033},
+ {1031, 1034, 1035},
+ {1031, 1035, 1032},
+ {1036, 1030, 1033},
+ {1036, 1033, 1037},
+ {1038, 1036, 1037},
+ {1038, 1037, 1039},
+ {1033, 1032, 1040},
+ {1033, 1040, 1041},
+ {1041, 1040, 910},
+ {1041, 910, 913},
+ {1032, 1035, 1042},
+ {1032, 1042, 1040},
+ {1040, 1042, 914},
+ {1040, 914, 910},
+ {1037, 1033, 1041},
+ {1037, 1041, 1043},
+ {1043, 1041, 913},
+ {1043, 913, 925},
+ {1039, 1037, 1043},
+ {1039, 1043, 1044},
+ {1044, 1043, 925},
+ {1044, 925, 927},
+ {1045, 1046, 1047},
+ {1045, 1047, 1048},
+ {1049, 1047, 1046},
+ {1049, 1046, 1050},
+ {1051, 1045, 1048},
+ {1051, 1048, 1052},
+ {1053, 1054, 1055},
+ {1053, 1055, 1056},
+ {1057, 1058, 1059},
+ {1057, 1059, 1060},
+ {1061, 1062, 1060},
+ {1061, 1060, 1059},
+ {1063, 1064, 1065},
+ {1063, 1065, 1066},
+ {1067, 1068, 1069},
+ {1067, 1069, 1070},
+ {1071, 1072, 1073},
+ {1071, 1073, 1074},
+ {1074, 1073, 1062},
+ {1074, 1062, 1061},
+ {1075, 1076, 1077},
+ {1075, 1077, 1078},
+ {1079, 1080, 1076},
+ {1079, 1076, 1075},
+ {1081, 1082, 1083},
+ {1081, 1083, 1084},
+ {1085, 1086, 1087},
+ {1085, 1087, 1088},
+ {1078, 1077, 1089},
+ {1078, 1089, 1090},
+ {1091, 1092, 1090},
+ {1091, 1090, 1089},
+ {1093, 1094, 1095},
+ {1093, 1095, 1096},
+ {1094, 1097, 1098},
+ {1094, 1098, 1095},
+ {1099, 1100, 1101},
+ {1099, 1101, 1102},
+ {1097, 1099, 1102},
+ {1097, 1102, 1098},
+ {1096, 1095, 1103},
+ {1096, 1103, 1104},
+ {1104, 1103, 1059},
+ {1104, 1059, 1058},
+ {1095, 1098, 1105},
+ {1095, 1105, 1103},
+ {1103, 1105, 1061},
+ {1103, 1061, 1059},
+ {1102, 1101, 1106},
+ {1102, 1106, 1107},
+ {1107, 1106, 1071},
+ {1107, 1071, 1074},
+ {1098, 1102, 1107},
+ {1098, 1107, 1105},
+ {1105, 1107, 1074},
+ {1105, 1074, 1061},
+ {1108, 1109, 1110},
+ {1108, 1110, 1111},
+ {1112, 1113, 1114},
+ {1112, 1114, 1115},
+ {1114, 1113, 1116},
+ {1114, 1116, 1117},
+ {1118, 1119, 1117},
+ {1118, 1117, 1116},
+ {1120, 1121, 1122},
+ {1120, 1122, 1123},
+ {1124, 1125, 1126},
+ {1124, 1126, 1127},
+ {1128, 1129, 1127},
+ {1128, 1127, 1126},
+ {1130, 1131, 1132},
+ {1130, 1132, 1133},
+ {1134, 1135, 1136},
+ {1134, 1136, 1137},
+ {1138, 1139, 1140},
+ {1138, 1140, 1141},
+ {1142, 1143, 1129},
+ {1142, 1129, 1128},
+ {1144, 1145, 1146},
+ {1147, 1148, 1149},
+ {1147, 1149, 1150},
+ {1151, 1152, 1153},
+ {1151, 1153, 1154},
+ {1152, 1155, 1156},
+ {1152, 1156, 1153},
+ {1157, 1158, 1159},
+ {1157, 1159, 1160},
+ {1155, 1161, 1162},
+ {1155, 1162, 1156},
+ {1163, 1164, 1165},
+ {1163, 1165, 1166},
+ {1154, 1153, 1167},
+ {1154, 1167, 1168},
+ {1168, 1167, 1126},
+ {1168, 1126, 1125},
+ {1153, 1156, 1169},
+ {1153, 1169, 1167},
+ {1167, 1169, 1128},
+ {1167, 1128, 1126},
+ {1170, 1171, 1172},
+ {1170, 1172, 1173},
+ {1173, 1172, 1174},
+ {1173, 1174, 1175},
+ {1156, 1162, 1176},
+ {1156, 1176, 1169},
+ {1169, 1176, 1142},
+ {1169, 1142, 1128},
+ {1177, 1178, 1179},
+ {1177, 1179, 1180},
+ {1181, 1182, 1183},
+ {1181, 1183, 1184},
+ {1185, 1186, 1187},
+ {1185, 1187, 1188},
+ {1189, 1190, 1191},
+ {1189, 1191, 1192},
+ {1193, 1194, 1195},
+ {1193, 1195, 1196},
+ {1194, 1197, 1198},
+ {1194, 1198, 1195},
+ {1199, 1193, 1196},
+ {1199, 1196, 1200},
+ {1201, 1199, 1200},
+ {1201, 1200, 1202},
+ {1196, 1195, 1203},
+ {1196, 1203, 1204},
+ {1204, 1203, 1075},
+ {1204, 1075, 1078},
+ {1195, 1198, 1205},
+ {1195, 1205, 1203},
+ {1203, 1205, 1079},
+ {1203, 1079, 1075},
+ {1200, 1196, 1204},
+ {1200, 1204, 1206},
+ {1206, 1204, 1078},
+ {1206, 1078, 1090},
+ {1202, 1200, 1206},
+ {1202, 1206, 1207},
+ {1207, 1206, 1090},
+ {1207, 1090, 1092},
+ {1208, 1209, 1210},
+ {1208, 1210, 1211},
+ {1212, 1213, 1214},
+ {1212, 1214, 1215},
+ {1216, 1208, 1211},
+ {1216, 1211, 1217},
+ {1218, 1219, 1220},
+ {1218, 1220, 1221},
+ {1222, 1223, 1224},
+ {1222, 1224, 1225},
+ {1226, 1224, 1223},
+ {1226, 1223, 1227},
+ {1228, 1229, 1230},
+ {1228, 1230, 1231},
+ {1232, 1233, 1234},
+ {1232, 1234, 1235},
+ {1236, 1237, 1238},
+ {1236, 1238, 1239},
+ {1237, 1226, 1227},
+ {1237, 1227, 1238},
+ {1240, 1241, 1242},
+ {1240, 1242, 1243},
+ {1244, 1245, 1246},
+ {1244, 1246, 1247},
+ {1248, 1249, 1250},
+ {1248, 1250, 1251},
+ {1252, 1253, 1254},
+ {1252, 1254, 1255},
+ {1256, 1257, 1258},
+ {1256, 1258, 1259},
+ {1260, 1258, 1257},
+ {1260, 1257, 1261},
+ {1262, 1263, 1264},
+ {1262, 1264, 1265},
+ {1265, 1264, 1266},
+ {1265, 1266, 1267},
+ {1268, 1269, 1270},
+ {1268, 1270, 1271},
+ {1267, 1266, 1269},
+ {1267, 1269, 1268},
+ {1272, 1273, 1274},
+ {1272, 1274, 1275},
+ {1276, 1225, 1224},
+ {1276, 1224, 1277},
+ {1275, 1274, 1278},
+ {1275, 1278, 1279},
+ {1277, 1224, 1226},
+ {1277, 1226, 1280},
+ {1281, 1282, 1283},
+ {1281, 1283, 1284},
+ {1282, 1285, 1286},
+ {1282, 1286, 1283},
+ {1287, 1288, 1282},
+ {1287, 1282, 1281},
+ {1280, 1226, 1237},
+ {1280, 1237, 1289},
+ {1290, 1291, 1292},
+ {1290, 1292, 1293},
+ {1294, 1295, 1296},
+ {1294, 1296, 1297},
+ {1298, 1299, 1300},
+ {1298, 1300, 1301},
+ {1302, 1303, 1304},
+ {1302, 1304, 1305},
+ {1306, 1302, 1305},
+ {1306, 1305, 1307},
+ {1308, 1309, 1310},
+ {1308, 1310, 1311},
+ {1312, 1310, 1309},
+ {1312, 1309, 1313},
+ {1314, 1315, 1316},
+ {1314, 1316, 1317},
+ {1318, 1319, 1320},
+ {1318, 1320, 1321},
+ {1322, 1323, 1324},
+ {1322, 1324, 1325},
+ {1326, 1312, 1313},
+ {1326, 1313, 1327},
+ {1328, 1329, 1330},
+ {1331, 1332, 1333},
+ {1331, 1333, 1334},
+ {1335, 1336, 1337},
+ {1335, 1337, 1338},
+ {1338, 1337, 1339},
+ {1338, 1339, 1340},
+ {1341, 1342, 1343},
+ {1341, 1343, 1344},
+ {1340, 1339, 1345},
+ {1340, 1345, 1346},
+ {1347, 1348, 1349},
+ {1347, 1349, 1350},
+ {1336, 1351, 1352},
+ {1336, 1352, 1337},
+ {1351, 1311, 1310},
+ {1351, 1310, 1352},
+ {1337, 1352, 1353},
+ {1337, 1353, 1339},
+ {1352, 1310, 1312},
+ {1352, 1312, 1353},
+ {1354, 1355, 1356},
+ {1354, 1356, 1357},
+ {1358, 1359, 1360},
+ {1358, 1360, 1361},
+ {1339, 1353, 1362},
+ {1339, 1362, 1345},
+ {1353, 1312, 1326},
+ {1353, 1326, 1362},
+ {1363, 1364, 1349},
+ {1363, 1349, 1348},
+ {1365, 1366, 1364},
+ {1365, 1364, 1363},
+ {1367, 1368, 1366},
+ {1367, 1366, 1365},
+ {1369, 1370, 1371},
+ {1369, 1371, 1372},
+ {1373, 1374, 1375},
+ {1373, 1375, 1376},
+ {1377, 1378, 1379},
+ {1377, 1379, 1380},
+ {1381, 1382, 1374},
+ {1381, 1374, 1373},
+ {1383, 1384, 1382},
+ {1383, 1382, 1381},
+ {1385, 1386, 1387},
+ {1385, 1387, 1388},
+ {1389, 1390, 1391},
+ {1389, 1391, 1392},
+ {1393, 1394, 1395},
+ {1393, 1395, 1396},
+ {1397, 1398, 1399},
+ {1397, 1399, 1400},
+ {1382, 1401, 1402},
+ {1382, 1402, 1374},
+ {1401, 1257, 1256},
+ {1401, 1256, 1402},
+ {1384, 1403, 1401},
+ {1384, 1401, 1382},
+ {1403, 1261, 1257},
+ {1403, 1257, 1401},
+ {1404, 1405, 1406},
+ {1404, 1406, 1407},
+ {1408, 1409, 1410},
+ {1408, 1410, 1411},
+ {1412, 1413, 1405},
+ {1412, 1405, 1404},
+ {1414, 1415, 1416},
+ {1414, 1416, 1417},
+ {1418, 1419, 1420},
+ {1418, 1420, 1421},
+ {1422, 1420, 1419},
+ {1422, 1419, 1423},
+ {1424, 1425, 1426},
+ {1424, 1426, 1427},
+ {1428, 1429, 1430},
+ {1428, 1430, 1431},
+ {1432, 1433, 1434},
+ {1432, 1434, 1435},
+ {1433, 1422, 1423},
+ {1433, 1423, 1434},
+ {1436, 1437, 1438},
+ {1436, 1438, 1439},
+ {1440, 1436, 1439},
+ {1440, 1439, 1441},
+ {1442, 1443, 1444},
+ {1442, 1444, 1445},
+ {1446, 1447, 1448},
+ {1446, 1448, 1449},
+ {1437, 1450, 1451},
+ {1437, 1451, 1438},
+ {1452, 1451, 1450},
+ {1452, 1450, 1453},
+ {1454, 1455, 1456},
+ {1454, 1456, 1457},
+ {1457, 1456, 1458},
+ {1457, 1458, 1459},
+ {1460, 1461, 1462},
+ {1460, 1462, 1463},
+ {1459, 1458, 1461},
+ {1459, 1461, 1460},
+ {1455, 1464, 1465},
+ {1455, 1465, 1456},
+ {1464, 1421, 1420},
+ {1464, 1420, 1465},
+ {1456, 1465, 1466},
+ {1456, 1466, 1458},
+ {1465, 1420, 1422},
+ {1465, 1422, 1466},
+ {1461, 1467, 1468},
+ {1461, 1468, 1462},
+ {1467, 1433, 1432},
+ {1467, 1432, 1468},
+ {1458, 1466, 1467},
+ {1458, 1467, 1461},
+ {1466, 1422, 1433},
+ {1466, 1433, 1467},
+ {1469, 1470, 1471},
+ {1469, 1471, 1472},
+ {1473, 1474, 1475},
+ {1473, 1475, 1476},
+ {1475, 1477, 1478},
+ {1475, 1478, 1476},
+ {1479, 1478, 1477},
+ {1479, 1477, 1480},
+ {1481, 1482, 1483},
+ {1481, 1483, 1484},
+ {1485, 1486, 1487},
+ {1485, 1487, 1488},
+ {1489, 1487, 1486},
+ {1489, 1486, 1490},
+ {1491, 1492, 1493},
+ {1491, 1493, 1494},
+ {1495, 1496, 1497},
+ {1495, 1497, 1498},
+ {1499, 1500, 1501},
+ {1499, 1501, 1502},
+ {1503, 1489, 1490},
+ {1503, 1490, 1504},
+ {1505, 1506, 1507},
+ {1508, 1509, 1510},
+ {1508, 1510, 1511},
+ {1512, 1513, 1514},
+ {1512, 1514, 1515},
+ {1515, 1514, 1516},
+ {1515, 1516, 1517},
+ {1518, 1519, 1520},
+ {1518, 1520, 1521},
+ {1517, 1516, 1522},
+ {1517, 1522, 1523},
+ {1524, 1525, 1526},
+ {1524, 1526, 1527},
+ {1513, 1528, 1529},
+ {1513, 1529, 1514},
+ {1528, 1488, 1487},
+ {1528, 1487, 1529},
+ {1514, 1529, 1530},
+ {1514, 1530, 1516},
+ {1529, 1487, 1489},
+ {1529, 1489, 1530},
+ {1531, 1532, 1533},
+ {1531, 1533, 1534},
+ {1532, 1535, 1536},
+ {1532, 1536, 1533},
+ {1516, 1530, 1537},
+ {1516, 1537, 1522},
+ {1530, 1489, 1503},
+ {1530, 1503, 1537},
+ {1538, 1539, 1526},
+ {1538, 1526, 1525},
+ {1540, 1541, 1539},
+ {1540, 1539, 1538},
+ {1542, 1543, 1541},
+ {1542, 1541, 1540},
+ {1544, 1545, 1546},
+ {1544, 1546, 1547},
+ {1548, 1549, 1550},
+ {1548, 1550, 1551},
+ {1552, 1553, 1554},
+ {1552, 1554, 1555},
+ {1556, 1557, 1558},
+ {1556, 1558, 1559},
+ {1560, 1561, 1562},
+ {1560, 1562, 1563},
+ {1564, 1565, 1566},
+ {1564, 1566, 1553},
+ {1565, 1437, 1436},
+ {1565, 1436, 1566},
+ {1553, 1566, 1567},
+ {1553, 1567, 1554},
+ {1566, 1436, 1440},
+ {1566, 1440, 1567},
+ {1568, 1569, 1570},
+ {1568, 1570, 1571},
+ {1572, 1450, 1437},
+ {1572, 1437, 1565},
+ {1573, 1574, 1575},
+ {1573, 1575, 1576},
+ {1577, 1453, 1450},
+ {1577, 1450, 1572},
+ {1578, 1579, 1580},
+ {1578, 1580, 1581},
+ {1582, 1583, 1584},
+ {1582, 1584, 1585},
+ {1586, 1587, 1588},
+ {1586, 1588, 1589},
+ {1590, 1591, 1592},
+ {1590, 1592, 1593},
+ {1594, 1595, 1596},
+ {1594, 1596, 1597},
+ {1598, 1599, 1597},
+ {1598, 1597, 1596},
+ {1600, 1601, 1602},
+ {1600, 1602, 1603},
+ {1604, 1605, 1606},
+ {1604, 1606, 1607},
+ {1608, 1609, 1610},
+ {1608, 1610, 1611},
+ {1611, 1610, 1599},
+ {1611, 1599, 1598},
+ {1612, 1613, 1614},
+ {1612, 1614, 1615},
+ {1616, 1617, 1618},
+ {1616, 1618, 1619},
+ {1620, 1621, 1622},
+ {1620, 1622, 1623},
+ {1624, 1625, 1626},
+ {1624, 1626, 1627},
+ {1628, 1629, 1630},
+ {1628, 1630, 1631},
+ {1632, 1633, 1631},
+ {1632, 1631, 1630},
+ {1634, 1635, 1636},
+ {1634, 1636, 1637},
+ {1635, 1638, 1639},
+ {1635, 1639, 1636},
+ {1640, 1641, 1642},
+ {1640, 1642, 1643},
+ {1638, 1640, 1643},
+ {1638, 1643, 1639},
+ {1644, 1645, 1646},
+ {1644, 1646, 1647},
+ {1648, 1649, 1596},
+ {1648, 1596, 1595},
+ {1645, 1650, 1651},
+ {1645, 1651, 1646},
+ {1649, 1652, 1598},
+ {1649, 1598, 1596},
+ {1653, 1654, 1655},
+ {1653, 1655, 1656},
+ {1656, 1655, 1657},
+ {1656, 1657, 1658},
+ {1659, 1653, 1656},
+ {1659, 1656, 1660},
+ {1652, 1661, 1611},
+ {1652, 1611, 1598},
+ {1662, 1663, 1664},
+ {1662, 1664, 1665},
+ {1666, 1667, 1668},
+ {1666, 1668, 1669},
+ {1670, 1671, 1672},
+ {1670, 1672, 1673},
+ {1674, 1675, 1676},
+ {1674, 1676, 1677},
+ {1678, 1679, 1675},
+ {1678, 1675, 1674},
+ {1680, 1681, 1682},
+ {1680, 1682, 1683},
+ {1684, 1685, 1683},
+ {1684, 1683, 1682},
+ {1686, 1687, 1688},
+ {1686, 1688, 1689},
+ {1690, 1691, 1692},
+ {1690, 1692, 1693},
+ {1694, 1695, 1696},
+ {1694, 1696, 1697},
+ {1697, 1696, 1685},
+ {1697, 1685, 1684},
+ {1698, 1699, 1700},
+ {1701, 1702, 1703},
+ {1701, 1703, 1704},
+ {1705, 1706, 1707},
+ {1705, 1707, 1708},
+ {1706, 1709, 1710},
+ {1706, 1710, 1707},
+ {1711, 1712, 1713},
+ {1711, 1713, 1714},
+ {1709, 1711, 1714},
+ {1709, 1714, 1710},
+ {1715, 1716, 1717},
+ {1715, 1717, 1718},
+ {1708, 1707, 1719},
+ {1708, 1719, 1720},
+ {1720, 1719, 1682},
+ {1720, 1682, 1681},
+ {1707, 1710, 1721},
+ {1707, 1721, 1719},
+ {1719, 1721, 1684},
+ {1719, 1684, 1682},
+ {1714, 1713, 1722},
+ {1714, 1722, 1723},
+ {1723, 1722, 1694},
+ {1723, 1694, 1697},
+ {1710, 1714, 1723},
+ {1710, 1723, 1721},
+ {1721, 1723, 1697},
+ {1721, 1697, 1684},
+ {1724, 1725, 1726},
+ {1724, 1726, 1727},
+ {1728, 1724, 1727},
+ {1728, 1727, 1729},
+ {1730, 1728, 1729},
+ {1730, 1729, 1731},
+ {1732, 1733, 1734},
+ {1732, 1734, 1735},
+ {1736, 1737, 1738},
+ {1736, 1738, 1739},
+ {1740, 1741, 1742},
+ {1740, 1742, 1743},
+ {1744, 1736, 1739},
+ {1744, 1739, 1745},
+ {1746, 1744, 1745},
+ {1746, 1745, 1747},
+ {1748, 1749, 1750},
+ {1748, 1750, 1751},
+ {1752, 1753, 1754},
+ {1752, 1754, 1755},
+ {1756, 1757, 1758},
+ {1756, 1758, 1759},
+ {1760, 1761, 1616},
+ {1760, 1616, 1619},
+ {1745, 1739, 1762},
+ {1745, 1762, 1763},
+ {1763, 1762, 1628},
+ {1763, 1628, 1631},
+ {1747, 1745, 1763},
+ {1747, 1763, 1764},
+ {1764, 1763, 1631},
+ {1764, 1631, 1633},
+ {1765, 1766, 1767},
+ {1765, 1767, 1768},
+ {1769, 1767, 1766},
+ {1769, 1766, 1770},
+ {1771, 1765, 1768},
+ {1771, 1768, 1772},
+ {1773, 1774, 1775},
+ {1773, 1775, 1776},
+ {1777, 1778, 1779},
+ {1777, 1779, 1780},
+ {1781, 1782, 1780},
+ {1781, 1780, 1779},
+ {1783, 1784, 1785},
+ {1783, 1785, 1786},
+ {1787, 1788, 1789},
+ {1787, 1789, 1790},
+ {1791, 1792, 1793},
+ {1791, 1793, 1794},
+ {1794, 1793, 1782},
+ {1794, 1782, 1781},
+ {1795, 1796, 1797},
+ {1795, 1797, 1798},
+ {1799, 1800, 1796},
+ {1799, 1796, 1795},
+ {1801, 1802, 1803},
+ {1801, 1803, 1804},
+ {1805, 1806, 1807},
+ {1805, 1807, 1808},
+ {1798, 1797, 1809},
+ {1798, 1809, 1810},
+ {1811, 1812, 1810},
+ {1811, 1810, 1809},
+ {1813, 1814, 1815},
+ {1813, 1815, 1816},
+ {1814, 1817, 1818},
+ {1814, 1818, 1815},
+ {1819, 1820, 1821},
+ {1819, 1821, 1822},
+ {1817, 1819, 1822},
+ {1817, 1822, 1818},
+ {1816, 1815, 1823},
+ {1816, 1823, 1824},
+ {1824, 1823, 1779},
+ {1824, 1779, 1778},
+ {1815, 1818, 1825},
+ {1815, 1825, 1823},
+ {1823, 1825, 1781},
+ {1823, 1781, 1779},
+ {1822, 1821, 1826},
+ {1822, 1826, 1827},
+ {1827, 1826, 1791},
+ {1827, 1791, 1794},
+ {1818, 1822, 1827},
+ {1818, 1827, 1825},
+ {1825, 1827, 1794},
+ {1825, 1794, 1781},
+ {1828, 1829, 1830},
+ {1828, 1830, 1831},
+ {1832, 1833, 1834},
+ {1832, 1834, 1835},
+ {1834, 1833, 1836},
+ {1834, 1836, 1837},
+ {1838, 1839, 1840},
+ {1838, 1840, 1841},
+ {1842, 1843, 1839},
+ {1842, 1839, 1838},
+ {1844, 1845, 1846},
+ {1844, 1846, 1847},
+ {1848, 1849, 1847},
+ {1848, 1847, 1846},
+ {1850, 1851, 1852},
+ {1850, 1852, 1853},
+ {1854, 1855, 1856},
+ {1854, 1856, 1857},
+ {1858, 1859, 1860},
+ {1858, 1860, 1861},
+ {1862, 1863, 1849},
+ {1862, 1849, 1848},
+ {1864, 1865, 1866},
+ {1867, 1868, 1869},
+ {1867, 1869, 1870},
+ {1871, 1872, 1873},
+ {1871, 1873, 1874},
+ {1872, 1875, 1876},
+ {1872, 1876, 1873},
+ {1877, 1878, 1879},
+ {1877, 1879, 1880},
+ {1875, 1881, 1882},
+ {1875, 1882, 1876},
+ {1883, 1884, 1885},
+ {1883, 1885, 1886},
+ {1874, 1873, 1887},
+ {1874, 1887, 1888},
+ {1888, 1887, 1846},
+ {1888, 1846, 1845},
+ {1873, 1876, 1889},
+ {1873, 1889, 1887},
+ {1887, 1889, 1848},
+ {1887, 1848, 1846},
+ {1890, 1891, 1892},
+ {1890, 1892, 1893},
+ {1893, 1892, 1894},
+ {1893, 1894, 1895},
+ {1876, 1882, 1896},
+ {1876, 1896, 1889},
+ {1889, 1896, 1862},
+ {1889, 1862, 1848},
+ {1897, 1898, 1899},
+ {1897, 1899, 1900},
+ {1901, 1897, 1900},
+ {1901, 1900, 1902},
+ {1903, 1904, 1905},
+ {1903, 1905, 1906},
+ {1907, 1908, 1909},
+ {1907, 1909, 1910},
+ {1911, 1912, 1913},
+ {1911, 1913, 1914},
+ {1915, 1916, 1917},
+ {1915, 1917, 1918},
+ {1919, 1920, 1921},
+ {1919, 1921, 1922},
+ {1923, 1924, 1925},
+ {1923, 1925, 1926},
+ {1927, 1918, 1928},
+ {1927, 1928, 1929},
+ {1929, 1928, 1795},
+ {1929, 1795, 1798},
+ {1918, 1917, 1930},
+ {1918, 1930, 1928},
+ {1928, 1930, 1799},
+ {1928, 1799, 1795},
+ {1931, 1932, 1933},
+ {1931, 1933, 1934},
+ {1935, 1929, 1798},
+ {1935, 1798, 1810},
+ {1936, 1937, 1938},
+ {1936, 1938, 1939},
+ {1940, 1935, 1810},
+ {1940, 1810, 1812},
+ {1941, 1942, 1943},
+ {1941, 1943, 1944},
+ {1945, 1946, 1947},
+ {1945, 1947, 1948},
+ {1949, 1950, 1951},
+ {1949, 1951, 1952},
+ {1953, 1954, 1955},
+ {1953, 1955, 1956},
+ {1957, 1958, 1959},
+ {1957, 1959, 1960},
+ {1961, 1962, 1963},
+ {1961, 1963, 1964},
+ {1965, 1966, 1967},
+ {1965, 1967, 1968},
+ {1969, 1970, 1971},
+ {1969, 1971, 1972},
+ {1962, 1973, 1974},
+ {1962, 1974, 1963},
+ {1973, 1975, 1976},
+ {1973, 1976, 1974},
+ {1977, 1978, 1979},
+ {1977, 1979, 1980},
+ {1981, 1982, 1983},
+ {1981, 1983, 1984},
+ {1985, 1986, 1987},
+ {1985, 1987, 1988},
+ {1989, 1990, 1991},
+ {1989, 1991, 1992},
+ {1993, 1994, 1995},
+ {1993, 1995, 1996},
+ {1997, 1998, 1999},
+ {1997, 1999, 2000},
+ {2001, 2002, 2003},
+ {2001, 2003, 2004},
+ {2005, 2006, 2007},
+ {2005, 2007, 2008},
+ {2009, 2010, 2011},
+ {2009, 2011, 2012},
+ {2013, 2014, 2010},
+ {2013, 2010, 2009},
+ {2015, 2016, 2017},
+ {2015, 2017, 2018},
+ {2012, 2011, 2019},
+ {2012, 2019, 2020},
+ {2021, 2022, 2014},
+ {2021, 2014, 2013},
+ {2023, 2024, 2025},
+ {2023, 2025, 2026},
+ {2027, 2028, 2029},
+ {2027, 2029, 2030},
+ {2031, 2032, 2033},
+ {2031, 2033, 2034},
+ {2035, 2036, 2037},
+ {2035, 2037, 2038},
+ {2039, 2040, 2041},
+ {2039, 2041, 2042},
+ {2043, 2044, 2045},
+ {2043, 2045, 2046},
+ {2047, 2048, 2049},
+ {2047, 2049, 2050},
+ {2051, 2052, 2053},
+ {2051, 2053, 2054},
+ {2055, 2056, 2057},
+ {2055, 2057, 2058},
+ {2059, 2060, 2061},
+ {2059, 2061, 2062},
+ {2063, 2064, 2065},
+ {2063, 2065, 2066},
+ {2067, 2068, 2069},
+ {2067, 2069, 2070},
+ {2071, 2059, 2062},
+ {2071, 2062, 2072},
+ {2064, 2073, 2074},
+ {2064, 2074, 2065},
+ {2075, 2076, 2077},
+ {2075, 2077, 2078},
+ {2079, 2080, 2081},
+ {2079, 2081, 2082},
+ {2083, 2084, 2085},
+ {2083, 2085, 2086},
+ {2087, 2088, 2089},
+ {2087, 2089, 2090},
+ {2091, 2092, 2093},
+ {2091, 2093, 2094},
+ {2095, 2096, 2097},
+ {2095, 2097, 2098},
+ {2099, 2100, 2101},
+ {2099, 2101, 2102},
+ {2103, 2104, 2105},
+ {2103, 2105, 2106},
+ {2107, 2108, 2109},
+ {2107, 2109, 2110},
+ {2111, 2112, 2113},
+ {2111, 2113, 2114},
+ {2115, 2116, 2112},
+ {2115, 2112, 2111},
+ {2117, 2118, 2119},
+ {2117, 2119, 2120},
+ {2114, 2113, 2118},
+ {2114, 2118, 2117},
+ {2121, 2122, 2123},
+ {2121, 2123, 2124},
+ {2125, 2126, 2127},
+ {2125, 2127, 2128},
+ {2129, 2130, 2131},
+ {2129, 2131, 2132},
+ {2133, 2134, 2135},
+ {2133, 2135, 2136},
+ {2137, 2138, 2139},
+ {2137, 2139, 2140},
+ {2141, 2142, 2143},
+ {2141, 2143, 2144},
+ {2141, 2144, 2145},
+ {2141, 2145, 2146},
+ {2147, 2146, 2145},
+ {2147, 2145, 2148},
+ {2149, 2150, 2151},
+ {2149, 2151, 2152},
+ {2153, 2154, 2155},
+ {2153, 2155, 2156},
+ {2157, 2158, 2159},
+ {2157, 2159, 2160},
+ {2161, 2162, 2163},
+ {2161, 2163, 2164},
+ {2165, 2166, 2167},
+ {2165, 2167, 2168},
+ {2166, 2157, 2160},
+ {2166, 2160, 2167},
+ {2162, 2169, 2170},
+ {2162, 2170, 2163},
+ {2169, 2165, 2168},
+ {2169, 2168, 2170},
+ {2171, 2172, 2173},
+ {2171, 2173, 2174},
+ {2175, 2176, 2177},
+ {2175, 2177, 2178},
+ {2179, 2180, 2181},
+ {2179, 2181, 2182},
+ {2183, 2184, 2185},
+ {2183, 2185, 2186},
+ {2187, 2188, 2189},
+ {2187, 2189, 2190},
+ {2191, 2192, 2193},
+ {2191, 2193, 2194},
+ {2195, 2196, 2197},
+ {2195, 2197, 2198},
+ {2199, 2200, 2201},
+ {2199, 2201, 2202},
+ {2203, 2204, 2205},
+ {2203, 2205, 2206},
+ {2207, 2208, 2204},
+ {2207, 2204, 2203},
+ {2209, 2210, 2211},
+ {2209, 2211, 2212},
+ {2206, 2205, 2210},
+ {2206, 2210, 2209},
+ {2213, 2214, 2208},
+ {2213, 2208, 2207},
+ {2212, 2211, 2215},
+ {2212, 2215, 2216},
+ {2217, 2218, 2219},
+ {2217, 2219, 2220},
+ {2221, 2222, 2223},
+ {2221, 2223, 2224},
+ {2224, 2223, 2225},
+ {2224, 2225, 2226},
+ {2227, 2226, 2225},
+ {2227, 2225, 2228},
+ {2227, 2228, 2229},
+ {2227, 2229, 2230},
+ {2231, 2230, 2229},
+ {2231, 2229, 2232},
+ {2233, 2231, 2232},
+ {2233, 2232, 2234},
+ {2235, 2236, 2237},
+ {2235, 2237, 2238},
+ {2239, 2240, 2241},
+ {2239, 2241, 2242},
+ {2243, 2244, 2245},
+ {2243, 2245, 2246},
+ {2247, 2248, 2249},
+ {2247, 2249, 2250},
+ {2248, 2239, 2242},
+ {2248, 2242, 2249},
+ {2251, 2252, 2253},
+ {2251, 2253, 2254},
+ {2255, 2247, 2250},
+ {2255, 2250, 2256},
+ {2257, 2258, 2259},
+ {2257, 2259, 2260},
+ {2261, 2262, 2263},
+ {2261, 2263, 2264},
+ {2265, 2266, 2267},
+ {2265, 2267, 2268},
+ {2269, 2270, 2271},
+ {2269, 2271, 2272},
+ {2273, 2274, 2275},
+ {2273, 2275, 2276},
+ {2277, 2278, 2279},
+ {2277, 2279, 2280},
+ {2281, 2282, 2283},
+ {2281, 2283, 2284},
+ {2285, 2286, 2287},
+ {2285, 2287, 2288},
+ {2289, 2290, 2291},
+ {2289, 2291, 2292},
+ {2293, 2294, 2290},
+ {2293, 2290, 2289},
+ {2295, 2296, 2297},
+ {2295, 2297, 2298},
+ {2292, 2291, 2296},
+ {2292, 2296, 2295},
+ {2299, 2300, 2294},
+ {2299, 2294, 2293},
+ {2298, 2297, 2301},
+ {2298, 2301, 2302},
+ {2303, 2304, 2305},
+ {2303, 2305, 2306},
+ {2307, 2308, 2309},
+ {2307, 2309, 2310},
+ {2311, 2312, 2313},
+ {2311, 2313, 2314},
+ {2315, 2316, 2317},
+ {2315, 2317, 2318},
+ {2319, 2320, 2321},
+ {2319, 2321, 2322},
+ {2323, 2324, 2325},
+ {2323, 2325, 2326},
+ {2327, 2323, 2326},
+ {2327, 2326, 2328},
+ {2329, 2330, 2331},
+ {2329, 2331, 2332},
+ {2333, 2334, 2335},
+ {2333, 2335, 2336},
+ {2337, 2338, 2339},
+ {2337, 2339, 2340},
+ {2341, 2342, 2343},
+ {2341, 2343, 2344},
+ {2345, 2346, 2347},
+ {2345, 2347, 2348},
+ {2338, 2349, 2350},
+ {2338, 2350, 2339},
+ {2349, 2351, 2352},
+ {2349, 2352, 2350},
+ {2353, 2354, 2355},
+ {2353, 2355, 2356},
+ {2357, 2358, 2359},
+ {2357, 2359, 2360},
+ {2361, 2362, 2363},
+ {2361, 2363, 2364},
+ {2365, 2366, 2367},
+ {2365, 2367, 2368},
+ {2369, 2370, 2371},
+ {2369, 2371, 2372},
+ {2373, 2374, 2375},
+ {2373, 2375, 2376},
+ {2377, 2378, 2379},
+ {2377, 2379, 2380},
+ {2381, 2382, 2383},
+ {2381, 2383, 2384},
+ {2385, 2386, 2387},
+ {2385, 2387, 2388},
+ {2389, 2390, 2386},
+ {2389, 2386, 2385},
+ {2391, 2392, 2393},
+ {2391, 2393, 2394},
+ {2388, 2387, 2392},
+ {2388, 2392, 2391},
+ {2395, 2396, 2390},
+ {2395, 2390, 2389},
+ {2397, 2398, 2399},
+ {2397, 2399, 2400},
+ {2401, 2402, 2403},
+ {2401, 2403, 2404},
+ {2405, 2406, 2407},
+ {2405, 2407, 2408},
+ {2409, 2410, 2411},
+ {2409, 2411, 2412},
+ {2413, 2414, 2415},
+ {2413, 2415, 2416},
+ {2413, 2416, 2417},
+ {2413, 2417, 2418},
+ {2419, 2418, 2417},
+ {2419, 2417, 2420},
+ {2421, 2422, 2423},
+ {2421, 2423, 2424},
+ {2425, 2426, 2427},
+ {2425, 2427, 2428},
+ {2429, 2430, 2431},
+ {2429, 2431, 2432},
+ {2433, 2434, 2435},
+ {2433, 2435, 2436},
+ {2437, 2438, 2439},
+ {2437, 2439, 2440},
+ {2438, 2429, 2432},
+ {2438, 2432, 2439},
+ {2434, 2441, 2442},
+ {2434, 2442, 2435},
+ {2441, 2437, 2440},
+ {2441, 2440, 2442},
+ {2443, 2444, 2445},
+ {2443, 2445, 2446},
+ {2447, 2448, 2449},
+ {2447, 2449, 2450},
+ {2451, 2452, 2453},
+ {2451, 2453, 2454},
+ {2455, 2456, 2457},
+ {2455, 2457, 2458},
+ {2459, 2460, 2461},
+ {2459, 2461, 2462},
+ {2463, 2464, 2465},
+ {2463, 2465, 2466},
+ {2467, 2468, 2469},
+ {2467, 2469, 2470},
+ {2471, 2472, 2473},
+ {2471, 2473, 2474},
+ {2475, 2476, 2477},
+ {2475, 2477, 2478},
+ {2479, 2480, 2481},
+ {2479, 2481, 2482},
+ {2483, 2484, 2485},
+ {2483, 2485, 2486},
+ {2487, 2488, 2489},
+ {2487, 2489, 2490},
+ {2491, 2492, 2493},
+ {2491, 2493, 2494},
+ {2486, 2485, 2495},
+ {2486, 2495, 2496},
+ {2497, 2498, 2499},
+ {2497, 2499, 2500},
+ {2501, 2502, 2503},
+ {2501, 2503, 2504},
+ {2505, 2506, 2507},
+ {2505, 2507, 2508},
+ {2509, 2508, 2507},
+ {2509, 2507, 2510},
+ {2509, 2510, 2511},
+ {2509, 2511, 2512},
+ {2513, 2514, 2515},
+ {2513, 2515, 2516},
+ {2517, 2518, 2519},
+ {2517, 2519, 2520},
+ {2521, 2522, 2523},
+ {2521, 2523, 2524},
+ {2525, 2526, 2527},
+ {2525, 2527, 2528},
+ {2529, 2530, 2531},
+ {2529, 2531, 2532},
+ {2533, 2534, 2535},
+ {2533, 2535, 2536},
+ {2534, 2525, 2528},
+ {2534, 2528, 2535},
+ {2537, 2538, 2539},
+ {2537, 2539, 2540},
+ {2538, 2541, 2542},
+ {2538, 2542, 2539},
+ {2543, 2544, 2545},
+ {2543, 2545, 2546},
+ {2547, 2548, 2549},
+ {2547, 2549, 2550},
+ {2551, 2552, 2553},
+ {2551, 2553, 2554},
+ {2555, 2556, 2557},
+ {2555, 2557, 2558},
+ {2559, 2560, 2561},
+ {2559, 2561, 2562},
+ {2563, 2564, 2565},
+ {2563, 2565, 2566},
+ {2567, 2568, 2569},
+ {2567, 2569, 2570},
+ {2571, 2572, 2573},
+ {2571, 2573, 2574},
+ {2575, 2576, 2577},
+ {2575, 2577, 2578},
+ {2579, 2580, 2576},
+ {2579, 2576, 2575},
+ {2581, 2582, 2583},
+ {2581, 2583, 2584},
+ {2585, 2586, 2587},
+ {2585, 2587, 2588},
+ {2589, 2590, 2580},
+ {2589, 2580, 2579},
+ {2584, 2583, 2591},
+ {2584, 2591, 2592},
+ {2593, 2594, 2595},
+ {2593, 2595, 2596},
+ {2597, 2598, 2599},
+ {2597, 2599, 2600},
+ {2601, 2602, 2603},
+ {2601, 2603, 2604},
+ {2605, 2606, 2607},
+ {2605, 2607, 2608},
+ {2609, 2610, 2611},
+ {2609, 2611, 2612},
+ {2613, 2612, 2611},
+ {2613, 2611, 2614},
+ {2615, 2613, 2614},
+ {2615, 2614, 2616},
+ {2617, 2618, 2619},
+ {2617, 2619, 2620},
+ {2621, 2622, 2623},
+ {2621, 2623, 2624},
+ {2625, 2626, 2627},
+ {2625, 2627, 2628},
+ {2629, 2630, 2631},
+ {2629, 2631, 2632},
+ {2630, 2621, 2624},
+ {2630, 2624, 2631},
+ {2633, 2634, 2635},
+ {2633, 2635, 2636},
+ {2637, 2629, 2632},
+ {2637, 2632, 2638},
+ {2639, 2640, 2641},
+ {2639, 2641, 2642},
+ {2643, 2644, 2645},
+ {2643, 2645, 2646},
+ {2647, 2648, 2649},
+ {2647, 2649, 2650},
+ {2651, 2652, 2653},
+ {2651, 2653, 2654},
+ {2655, 2656, 2657},
+ {2655, 2657, 2658},
+ {2659, 2660, 2661},
+ {2659, 2661, 2662},
+ {2663, 2664, 2665},
+ {2663, 2665, 2666},
+ {2667, 2668, 2669},
+ {2667, 2669, 2670},
+ {2671, 2672, 2673},
+ {2671, 2673, 2674},
+ {2675, 2676, 2677},
+ {2675, 2677, 2678},
+ {2679, 2680, 2681},
+ {2679, 2681, 2682},
+ {2674, 2673, 2683},
+ {2674, 2683, 2684},
+ {2685, 2686, 2687},
+ {2685, 2687, 2688},
+ {2682, 2681, 2689},
+ {2682, 2689, 2690},
+ {2691, 2692, 2693},
+ {2691, 2693, 2694},
+ {2695, 2696, 2697},
+ {2695, 2697, 2698},
+ {2699, 2700, 2701},
+ {2699, 2701, 2702},
+ {2703, 2704, 2705},
+ {2703, 2705, 2706},
+ {2707, 2708, 2709},
+ {2707, 2709, 2710},
+ {2711, 2710, 2709},
+ {2711, 2709, 2712},
+ {2713, 2711, 2712},
+ {2713, 2712, 2714},
+ {2715, 2716, 2717},
+ {2715, 2717, 2718},
+ {2719, 2720, 2721},
+ {2719, 2721, 2722},
+ {2723, 2724, 2725},
+ {2723, 2725, 2726},
+ {2727, 2728, 2729},
+ {2727, 2729, 2730},
+ {2731, 2732, 2733},
+ {2731, 2733, 2734},
+ {2735, 2736, 2737},
+ {2735, 2737, 2738},
+ {2739, 2740, 2741},
+ {2739, 2741, 2742},
+ {2743, 2744, 2745},
+ {2743, 2745, 2746},
+ {2747, 2748, 2749},
+ {2747, 2749, 2750},
+ {2751, 2752, 2753},
+ {2751, 2753, 2754},
+ {2755, 2756, 2757},
+ {2755, 2757, 2758},
+ {2759, 2760, 2761},
+ {2759, 2761, 2762},
+ {2763, 2764, 2765},
+ {2763, 2765, 2766},
+ {2767, 2768, 2769},
+ {2767, 2769, 2770},
+ {2771, 2772, 2773},
+ {2771, 2773, 2774},
+ {2775, 2776, 2777},
+ {2775, 2777, 2778},
+ {2779, 2780, 2776},
+ {2779, 2776, 2775},
+ {2781, 2782, 2783},
+ {2781, 2783, 2784},
+ {2778, 2777, 2782},
+ {2778, 2782, 2781},
+ {2785, 2786, 2780},
+ {2785, 2780, 2779},
+ {2784, 2783, 2787},
+ {2784, 2787, 2788},
+ {2789, 2790, 2791},
+ {2789, 2791, 2792},
+ {2793, 2794, 2795},
+ {2793, 2795, 2796},
+ {2797, 2798, 2799},
+ {2797, 2799, 2800},
+ {2801, 2802, 2803},
+ {2801, 2803, 2804},
+ {2805, 2806, 2807},
+ {2805, 2807, 2808},
+ {2809, 2810, 2811},
+ {2809, 2811, 2812},
+ {2813, 2814, 2815},
+ {2813, 2815, 2816},
+ {2817, 2818, 2819},
+ {2817, 2819, 2820},
+ {2821, 2822, 2823},
+ {2821, 2823, 2824},
+ {2825, 2826, 2827},
+ {2825, 2827, 2828},
+ {2829, 2830, 2831},
+ {2829, 2831, 2832},
+ {2833, 2821, 2824},
+ {2833, 2824, 2834},
+ {2835, 2836, 2837},
+ {2835, 2837, 2838},
+ {2839, 2840, 2841},
+ {2839, 2841, 2842},
+ {2843, 2844, 2845},
+ {2843, 2845, 2846},
+ {2847, 2848, 2849},
+ {2847, 2849, 2850},
+ {2851, 2852, 2853},
+ {2851, 2853, 2854},
+ {2855, 2856, 2857},
+ {2855, 2857, 2858},
+ {2859, 2860, 2861},
+ {2859, 2861, 2862},
+ {2863, 2864, 2865},
+ {2863, 2865, 2866},
+ {2867, 2868, 2869},
+ {2867, 2869, 2870},
+ {2871, 2872, 2873},
+ {2871, 2873, 2874},
+ {2875, 2876, 2877},
+ {2875, 2877, 2878},
+ {2879, 2880, 2881},
+ {2879, 2881, 2882},
+ {2883, 2884, 2885},
+ {2883, 2885, 2886},
+ {2887, 2888, 2884},
+ {2887, 2884, 2883},
+ {2889, 2890, 2891},
+ {2889, 2891, 2892},
+ {2893, 2894, 2895},
+ {2893, 2895, 2896},
+ {2897, 2898, 2899},
+ {2897, 2899, 2900},
+ {2901, 2902, 2903},
+ {2901, 2903, 2904},
+ {2905, 2906, 2907},
+ {2905, 2907, 2908},
+ {2909, 2910, 2911},
+ {2909, 2911, 2912},
+ {2909, 2912, 2913},
+ {2909, 2913, 2914},
+ {2915, 2914, 2913},
+ {2915, 2913, 2916},
+ {2917, 2915, 2916},
+ {2917, 2916, 2918},
+ {2919, 2920, 2921},
+ {2919, 2921, 2922},
+ {2923, 2924, 2925},
+ {2923, 2925, 2926},
+ {2927, 2928, 2929},
+ {2927, 2929, 2930},
+ {2931, 2932, 2933},
+ {2931, 2933, 2934},
+ {2932, 2923, 2926},
+ {2932, 2926, 2933},
+ {2928, 2935, 2936},
+ {2928, 2936, 2929},
+ {2935, 2931, 2934},
+ {2935, 2934, 2936},
+ {2937, 2938, 2939},
+ {2937, 2939, 2940},
+ {2941, 2942, 2943},
+ {2941, 2943, 2944},
+ {2945, 2946, 2947},
+ {2945, 2947, 2948},
+ {2949, 2950, 2951},
+ {2949, 2951, 2952},
+ {2953, 2954, 2955},
+ {2953, 2955, 2956},
+ {2957, 2958, 2959},
+ {2957, 2959, 2960},
+ {2961, 2962, 2963},
+ {2961, 2963, 2964},
+ {2965, 2966, 2967},
+ {2965, 2967, 2968},
+ {2969, 2970, 2971},
+ {2969, 2971, 2972},
+ {2973, 2974, 2970},
+ {2973, 2970, 2969},
+ {2975, 2976, 2977},
+ {2975, 2977, 2978},
+ {2972, 2971, 2976},
+ {2972, 2976, 2975},
+ {2979, 2980, 2974},
+ {2979, 2974, 2973},
+ {2978, 2977, 2981},
+ {2978, 2981, 2982},
+ {2983, 2984, 2985},
+ {2983, 2985, 2986},
+ {2987, 2988, 2989},
+ {2987, 2989, 2990},
+ {2991, 2992, 2993},
+ {2991, 2993, 2994},
+ {2995, 2994, 2993},
+ {2995, 2993, 2996},
+ {2995, 2996, 2997},
+ {2995, 2997, 2998},
+ {2999, 2998, 2997},
+ {2999, 2997, 3000},
+ {3001, 2999, 3000},
+ {3001, 3000, 3002},
+ {3003, 3004, 3005},
+ {3003, 3005, 3006},
+ {3007, 3008, 3009},
+ {3007, 3009, 3010},
+ {3011, 3012, 3013},
+ {3011, 3013, 3014},
+ {3015, 3016, 3017},
+ {3015, 3017, 3018},
+ {3016, 3007, 3010},
+ {3016, 3010, 3017},
+ {3012, 3019, 3020},
+ {3012, 3020, 3013},
+ {3019, 3015, 3018},
+ {3019, 3018, 3020},
+ {3021, 3022, 3023},
+ {3021, 3023, 3024},
+ {3025, 3026, 3027},
+ {3025, 3027, 3028},
+ {3029, 3030, 3031},
+ {3029, 3031, 3032},
+ {3033, 3034, 3035},
+ {3033, 3035, 3036},
+ {3037, 3038, 3039},
+ {3037, 3039, 3040},
+ {3041, 3042, 3043},
+ {3041, 3043, 3044},
+ {3045, 3046, 3047},
+ {3045, 3047, 3048},
+ {3049, 3050, 3051},
+ {3049, 3051, 3052},
+ {3053, 3054, 3055},
+ {3053, 3055, 3056},
+ {3057, 3058, 3054},
+ {3057, 3054, 3053},
+ {3059, 3060, 3061},
+ {3059, 3061, 3062},
+ {3056, 3055, 3060},
+ {3056, 3060, 3059},
+ {3063, 3064, 3065},
+ {3063, 3065, 3066},
+ {3062, 3061, 3067},
+ {3062, 3067, 3068},
+ {3069, 3070, 3071},
+ {3069, 3071, 3072},
+ {3073, 3074, 3075},
+ {3073, 3075, 3076},
+ {3077, 3078, 3079},
+ {3077, 3079, 3080},
+ {3081, 3082, 3083},
+ {3081, 3083, 3084},
+ {3081, 3084, 3085},
+ {3081, 3085, 3086},
+ {3087, 3088, 3089},
+ {3087, 3089, 3090},
+ {3091, 3092, 3093},
+ {3091, 3093, 3094},
+ {3095, 3096, 3097},
+ {3095, 3097, 3098},
+ {3099, 3100, 3101},
+ {3099, 3101, 3102},
+ {3103, 3104, 3105},
+ {3103, 3105, 3106},
+ {3107, 3108, 3109},
+ {3107, 3109, 3110},
+ {3111, 3112, 3113},
+ {3111, 3113, 3114},
+ {3115, 3116, 3117},
+ {3115, 3117, 3118},
+ {3119, 3120, 3121},
+ {3119, 3121, 3122},
+ {3123, 3124, 3125},
+ {3123, 3125, 3126},
+ {3126, 3125, 3127},
+ {3126, 3127, 3128},
+ {3128, 3127, 3129},
+ {3128, 3129, 3130},
+ {3130, 3129, 3131},
+ {3130, 3131, 3132},
+ {3132, 3131, 3133},
+ {3132, 3133, 3134},
+ {3134, 3133, 3135},
+ {3134, 3135, 3136},
+ {3136, 3135, 3137},
+ {3136, 3137, 3138},
+ {3138, 3137, 3139},
+ {3138, 3139, 3140},
+ {3140, 3139, 3141},
+ {3140, 3141, 3142},
+ {3142, 3141, 3143},
+ {3142, 3143, 3144},
+ {3144, 3143, 3145},
+ {3144, 3145, 3146},
+ {3146, 3145, 3147},
+ {3146, 3147, 3148},
+ {3148, 3147, 3149},
+ {3148, 3149, 3150},
+ {3150, 3149, 3151},
+ {3150, 3151, 3152},
+ {3152, 3151, 3153},
+ {3152, 3153, 3154},
+ {3154, 3153, 3155},
+ {3154, 3155, 3156},
+ {3156, 3155, 3157},
+ {3156, 3157, 3158},
+ {3158, 3157, 3159},
+ {3158, 3159, 3160},
+ {3160, 3159, 3161},
+ {3160, 3161, 3162},
+ {3162, 3161, 3163},
+ {3162, 3163, 3164},
+ {3164, 3163, 3165},
+ {3164, 3165, 3166},
+ {3166, 3165, 3167},
+ {3166, 3167, 3168},
+ {3168, 3167, 3169},
+ {3168, 3169, 3170},
+ {3170, 3169, 3171},
+ {3170, 3171, 3172},
+ {3172, 3171, 3173},
+ {3172, 3173, 3174},
+ {3174, 3173, 3175},
+ {3174, 3175, 3176},
+ {3176, 3175, 3177},
+ {3176, 3177, 3178},
+ {3178, 3177, 3179},
+ {3178, 3179, 3180},
+ {3180, 3179, 3181},
+ {3180, 3181, 3182},
+ {3182, 3181, 3183},
+ {3182, 3183, 3184},
+ {3184, 3183, 3185},
+ {3184, 3185, 3186},
+ {3124, 3123, 3186},
+ {3124, 3186, 3185},
+ {3124, 3185, 3187},
+ {3124, 3187, 3188},
+ {3185, 3183, 3189},
+ {3185, 3189, 3187},
+ {3183, 3181, 3190},
+ {3183, 3190, 3189},
+ {3181, 3179, 3191},
+ {3181, 3191, 3190},
+ {3179, 3177, 3192},
+ {3179, 3192, 3191},
+ {3177, 3175, 3193},
+ {3177, 3193, 3192},
+ {3175, 3173, 3194},
+ {3175, 3194, 3193},
+ {3173, 3171, 3195},
+ {3173, 3195, 3194},
+ {3171, 3169, 3196},
+ {3171, 3196, 3195},
+ {3169, 3167, 3197},
+ {3169, 3197, 3196},
+ {3167, 3165, 3198},
+ {3167, 3198, 3197},
+ {3165, 3163, 3199},
+ {3165, 3199, 3198},
+ {3163, 3161, 3200},
+ {3163, 3200, 3199},
+ {3161, 3159, 3201},
+ {3161, 3201, 3200},
+ {3159, 3157, 3202},
+ {3159, 3202, 3201},
+ {3157, 3155, 3203},
+ {3157, 3203, 3202},
+ {3155, 3153, 3204},
+ {3155, 3204, 3203},
+ {3153, 3151, 3205},
+ {3153, 3205, 3204},
+ {3151, 3149, 3206},
+ {3151, 3206, 3205},
+ {3149, 3147, 3207},
+ {3149, 3207, 3206},
+ {3147, 3145, 3208},
+ {3147, 3208, 3207},
+ {3145, 3143, 3209},
+ {3145, 3209, 3208},
+ {3143, 3141, 3210},
+ {3143, 3210, 3209},
+ {3141, 3139, 3211},
+ {3141, 3211, 3210},
+ {3139, 3137, 3212},
+ {3139, 3212, 3211},
+ {3137, 3135, 3213},
+ {3137, 3213, 3212},
+ {3135, 3133, 3214},
+ {3135, 3214, 3213},
+ {3133, 3131, 3215},
+ {3133, 3215, 3214},
+ {3131, 3129, 3216},
+ {3131, 3216, 3215},
+ {3129, 3127, 3217},
+ {3129, 3217, 3216},
+ {3127, 3125, 3218},
+ {3127, 3218, 3217},
+ {3125, 3124, 3188},
+ {3125, 3188, 3218},
+ {3219, 3220, 3221},
+ {3219, 3221, 3222},
+ {3223, 3219, 3222},
+ {3223, 3222, 3224},
+ {3225, 3223, 3224},
+ {3225, 3224, 3226},
+ {3227, 3225, 3226},
+ {3227, 3226, 3228},
+ {3229, 3227, 3228},
+ {3229, 3228, 3230},
+ {3231, 3229, 3230},
+ {3231, 3230, 3232},
+ {3233, 3231, 3232},
+ {3233, 3232, 3234},
+ {3235, 3233, 3234},
+ {3235, 3234, 3236},
+ {3237, 3235, 3236},
+ {3237, 3236, 3238},
+ {3239, 3237, 3238},
+ {3239, 3238, 3240},
+ {3241, 3239, 3240},
+ {3241, 3240, 3242},
+ {3243, 3241, 3242},
+ {3243, 3242, 3244},
+ {3245, 3243, 3244},
+ {3245, 3244, 3246},
+ {3247, 3245, 3246},
+ {3247, 3246, 3248},
+ {3249, 3247, 3248},
+ {3249, 3248, 3250},
+ {3251, 3249, 3250},
+ {3251, 3250, 3252},
+ {3253, 3251, 3252},
+ {3253, 3252, 3254},
+ {3255, 3253, 3254},
+ {3255, 3254, 3256},
+ {3257, 3255, 3256},
+ {3257, 3256, 3258},
+ {3259, 3257, 3258},
+ {3259, 3258, 3260},
+ {3261, 3259, 3260},
+ {3261, 3260, 3262},
+ {3263, 3261, 3262},
+ {3263, 3262, 3264},
+ {3265, 3263, 3264},
+ {3265, 3264, 3266},
+ {3267, 3265, 3266},
+ {3267, 3266, 3268},
+ {3269, 3267, 3268},
+ {3269, 3268, 3270},
+ {3271, 3269, 3270},
+ {3271, 3270, 3272},
+ {3273, 3271, 3272},
+ {3273, 3272, 3274},
+ {3275, 3273, 3274},
+ {3275, 3274, 3276},
+ {3277, 3275, 3276},
+ {3277, 3276, 3278},
+ {3279, 3277, 3278},
+ {3279, 3278, 3280},
+ {3281, 3279, 3280},
+ {3281, 3280, 3282},
+ {3220, 3281, 3282},
+ {3220, 3282, 3221},
+ {3283, 3222, 3221},
+ {3283, 3224, 3222},
+ {3283, 3226, 3224},
+ {3283, 3228, 3226},
+ {3283, 3230, 3228},
+ {3283, 3232, 3230},
+ {3283, 3234, 3232},
+ {3283, 3236, 3234},
+ {3283, 3238, 3236},
+ {3283, 3240, 3238},
+ {3283, 3242, 3240},
+ {3283, 3244, 3242},
+ {3283, 3246, 3244},
+ {3283, 3248, 3246},
+ {3283, 3250, 3248},
+ {3283, 3252, 3250},
+ {3283, 3254, 3252},
+ {3283, 3256, 3254},
+ {3283, 3258, 3256},
+ {3283, 3260, 3258},
+ {3283, 3262, 3260},
+ {3283, 3264, 3262},
+ {3283, 3266, 3264},
+ {3283, 3268, 3266},
+ {3283, 3270, 3268},
+ {3283, 3272, 3270},
+ {3283, 3274, 3272},
+ {3283, 3276, 3274},
+ {3283, 3278, 3276},
+ {3283, 3280, 3278},
+ {3283, 3282, 3280},
+ {3283, 3221, 3282},
+ {3284, 3285, 3286},
+ {3284, 3286, 3287},
+ {3287, 3286, 3288},
+ {3287, 3288, 3289},
+ {3289, 3288, 3290},
+ {3289, 3290, 3291},
+ {3291, 3290, 3292},
+ {3291, 3292, 3293},
+ {3293, 3292, 3294},
+ {3293, 3294, 3295},
+ {3295, 3294, 3296},
+ {3295, 3296, 3297},
+ {3297, 3296, 3298},
+ {3297, 3298, 3299},
+ {3299, 3298, 3300},
+ {3299, 3300, 3301},
+ {3301, 3300, 3302},
+ {3301, 3302, 3303},
+ {3303, 3302, 3304},
+ {3303, 3304, 3305},
+ {3305, 3304, 3306},
+ {3305, 3306, 3307},
+ {3307, 3306, 3308},
+ {3307, 3308, 3309},
+ {3309, 3308, 3310},
+ {3309, 3310, 3311},
+ {3311, 3310, 3312},
+ {3311, 3312, 3313},
+ {3313, 3312, 3314},
+ {3313, 3314, 3315},
+ {3315, 3314, 3316},
+ {3315, 3316, 3317},
+ {3317, 3316, 3318},
+ {3317, 3318, 3319},
+ {3319, 3318, 3320},
+ {3319, 3320, 3321},
+ {3321, 3320, 3322},
+ {3321, 3322, 3323},
+ {3323, 3322, 3324},
+ {3323, 3324, 3325},
+ {3325, 3324, 3326},
+ {3325, 3326, 3327},
+ {3327, 3326, 3328},
+ {3327, 3328, 3329},
+ {3329, 3328, 3330},
+ {3329, 3330, 3331},
+ {3331, 3330, 3332},
+ {3331, 3332, 3333},
+ {3333, 3332, 3334},
+ {3333, 3334, 3335},
+ {3335, 3334, 3336},
+ {3335, 3336, 3337},
+ {3337, 3336, 3338},
+ {3337, 3338, 3339},
+ {3339, 3338, 3340},
+ {3339, 3340, 3341},
+ {3341, 3340, 3342},
+ {3341, 3342, 3343},
+ {3343, 3342, 3344},
+ {3343, 3344, 3345},
+ {3345, 3344, 3346},
+ {3345, 3346, 3347},
+ {3285, 3284, 3347},
+ {3285, 3347, 3346},
+ {3285, 3346, 3348},
+ {3285, 3348, 3349},
+ {3346, 3344, 3350},
+ {3346, 3350, 3348},
+ {3344, 3342, 3351},
+ {3344, 3351, 3350},
+ {3342, 3340, 3352},
+ {3342, 3352, 3351},
+ {3340, 3338, 3353},
+ {3340, 3353, 3352},
+ {3338, 3336, 3354},
+ {3338, 3354, 3353},
+ {3336, 3334, 3355},
+ {3336, 3355, 3354},
+ {3334, 3332, 3356},
+ {3334, 3356, 3355},
+ {3332, 3330, 3357},
+ {3332, 3357, 3356},
+ {3330, 3328, 3358},
+ {3330, 3358, 3357},
+ {3328, 3326, 3359},
+ {3328, 3359, 3358},
+ {3326, 3324, 3360},
+ {3326, 3360, 3359},
+ {3324, 3322, 3361},
+ {3324, 3361, 3360},
+ {3322, 3320, 3362},
+ {3322, 3362, 3361},
+ {3320, 3318, 3363},
+ {3320, 3363, 3362},
+ {3318, 3316, 3364},
+ {3318, 3364, 3363},
+ {3316, 3314, 3365},
+ {3316, 3365, 3364},
+ {3314, 3312, 3366},
+ {3314, 3366, 3365},
+ {3312, 3310, 3367},
+ {3312, 3367, 3366},
+ {3310, 3308, 3368},
+ {3310, 3368, 3367},
+ {3308, 3306, 3369},
+ {3308, 3369, 3368},
+ {3306, 3304, 3370},
+ {3306, 3370, 3369},
+ {3304, 3302, 3371},
+ {3304, 3371, 3370},
+ {3302, 3300, 3372},
+ {3302, 3372, 3371},
+ {3300, 3298, 3373},
+ {3300, 3373, 3372},
+ {3298, 3296, 3374},
+ {3298, 3374, 3373},
+ {3296, 3294, 3375},
+ {3296, 3375, 3374},
+ {3294, 3292, 3376},
+ {3294, 3376, 3375},
+ {3292, 3290, 3377},
+ {3292, 3377, 3376},
+ {3290, 3288, 3378},
+ {3290, 3378, 3377},
+ {3288, 3286, 3379},
+ {3288, 3379, 3378},
+ {3286, 3285, 3349},
+ {3286, 3349, 3379},
+ {3380, 3381, 3382},
+ {3380, 3382, 3383},
+ {3384, 3380, 3383},
+ {3384, 3383, 3385},
+ {3386, 3384, 3385},
+ {3386, 3385, 3387},
+ {3388, 3386, 3387},
+ {3388, 3387, 3389},
+ {3390, 3388, 3389},
+ {3390, 3389, 3391},
+ {3392, 3390, 3391},
+ {3392, 3391, 3393},
+ {3394, 3392, 3393},
+ {3394, 3393, 3395},
+ {3396, 3394, 3395},
+ {3396, 3395, 3397},
+ {3398, 3396, 3397},
+ {3398, 3397, 3399},
+ {3400, 3398, 3399},
+ {3400, 3399, 3401},
+ {3402, 3400, 3401},
+ {3402, 3401, 3403},
+ {3404, 3402, 3403},
+ {3404, 3403, 3405},
+ {3406, 3404, 3405},
+ {3406, 3405, 3407},
+ {3408, 3406, 3407},
+ {3408, 3407, 3409},
+ {3410, 3408, 3409},
+ {3410, 3409, 3411},
+ {3412, 3410, 3411},
+ {3412, 3411, 3413},
+ {3414, 3412, 3413},
+ {3414, 3413, 3415},
+ {3416, 3414, 3415},
+ {3416, 3415, 3417},
+ {3418, 3416, 3417},
+ {3418, 3417, 3419},
+ {3420, 3418, 3419},
+ {3420, 3419, 3421},
+ {3422, 3420, 3421},
+ {3422, 3421, 3423},
+ {3424, 3422, 3423},
+ {3424, 3423, 3425},
+ {3426, 3424, 3425},
+ {3426, 3425, 3427},
+ {3428, 3426, 3427},
+ {3428, 3427, 3429},
+ {3430, 3428, 3429},
+ {3430, 3429, 3431},
+ {3432, 3430, 3431},
+ {3432, 3431, 3433},
+ {3434, 3432, 3433},
+ {3434, 3433, 3435},
+ {3436, 3434, 3435},
+ {3436, 3435, 3437},
+ {3438, 3436, 3437},
+ {3438, 3437, 3439},
+ {3440, 3438, 3439},
+ {3440, 3439, 3441},
+ {3442, 3440, 3441},
+ {3442, 3441, 3443},
+ {3381, 3442, 3443},
+ {3381, 3443, 3382},
+ {3444, 3383, 3382},
+ {3444, 3385, 3383},
+ {3444, 3387, 3385},
+ {3444, 3389, 3387},
+ {3444, 3391, 3389},
+ {3444, 3393, 3391},
+ {3444, 3395, 3393},
+ {3444, 3397, 3395},
+ {3444, 3399, 3397},
+ {3444, 3401, 3399},
+ {3444, 3403, 3401},
+ {3444, 3405, 3403},
+ {3444, 3407, 3405},
+ {3444, 3409, 3407},
+ {3444, 3411, 3409},
+ {3444, 3413, 3411},
+ {3444, 3415, 3413},
+ {3444, 3417, 3415},
+ {3444, 3419, 3417},
+ {3444, 3421, 3419},
+ {3444, 3423, 3421},
+ {3444, 3425, 3423},
+ {3444, 3427, 3425},
+ {3444, 3429, 3427},
+ {3444, 3431, 3429},
+ {3444, 3433, 3431},
+ {3444, 3435, 3433},
+ {3444, 3437, 3435},
+ {3444, 3439, 3437},
+ {3444, 3441, 3439},
+ {3444, 3443, 3441},
+ {3444, 3382, 3443},
+ {3445, 3446, 3447},
+ {3445, 3447, 3448},
+ {3448, 3447, 3449},
+ {3448, 3449, 3450},
+ {3450, 3449, 3451},
+ {3450, 3451, 3452},
+ {3452, 3451, 3453},
+ {3452, 3453, 3454},
+ {3454, 3453, 3455},
+ {3454, 3455, 3456},
+ {3456, 3455, 3457},
+ {3456, 3457, 3458},
+ {3458, 3457, 3459},
+ {3458, 3459, 3460},
+ {3460, 3459, 3461},
+ {3460, 3461, 3462},
+ {3462, 3461, 3463},
+ {3462, 3463, 3464},
+ {3464, 3463, 3465},
+ {3464, 3465, 3466},
+ {3466, 3465, 3467},
+ {3466, 3467, 3468},
+ {3468, 3467, 3469},
+ {3468, 3469, 3470},
+ {3470, 3469, 3471},
+ {3470, 3471, 3472},
+ {3472, 3471, 3473},
+ {3472, 3473, 3474},
+ {3474, 3473, 3475},
+ {3474, 3475, 3476},
+ {3476, 3475, 3477},
+ {3476, 3477, 3478},
+ {3478, 3477, 3479},
+ {3478, 3479, 3480},
+ {3480, 3479, 3481},
+ {3480, 3481, 3482},
+ {3482, 3481, 3483},
+ {3482, 3483, 3484},
+ {3484, 3483, 3485},
+ {3484, 3485, 3486},
+ {3486, 3485, 3487},
+ {3486, 3487, 3488},
+ {3488, 3487, 3489},
+ {3488, 3489, 3490},
+ {3490, 3489, 3491},
+ {3490, 3491, 3492},
+ {3492, 3491, 3493},
+ {3492, 3493, 3494},
+ {3494, 3493, 3495},
+ {3494, 3495, 3496},
+ {3496, 3495, 3497},
+ {3496, 3497, 3498},
+ {3498, 3497, 3499},
+ {3498, 3499, 3500},
+ {3500, 3499, 3501},
+ {3500, 3501, 3502},
+ {3502, 3501, 3503},
+ {3502, 3503, 3504},
+ {3504, 3503, 3505},
+ {3504, 3505, 3506},
+ {3506, 3505, 3507},
+ {3506, 3507, 3508},
+ {3446, 3445, 3508},
+ {3446, 3508, 3507},
+ {3446, 3507, 3509},
+ {3446, 3509, 3510},
+ {3507, 3505, 3511},
+ {3507, 3511, 3509},
+ {3505, 3503, 3512},
+ {3505, 3512, 3511},
+ {3503, 3501, 3513},
+ {3503, 3513, 3512},
+ {3501, 3499, 3514},
+ {3501, 3514, 3513},
+ {3499, 3497, 3515},
+ {3499, 3515, 3514},
+ {3497, 3495, 3516},
+ {3497, 3516, 3515},
+ {3495, 3493, 3517},
+ {3495, 3517, 3516},
+ {3493, 3491, 3518},
+ {3493, 3518, 3517},
+ {3491, 3489, 3519},
+ {3491, 3519, 3518},
+ {3489, 3487, 3520},
+ {3489, 3520, 3519},
+ {3487, 3485, 3521},
+ {3487, 3521, 3520},
+ {3485, 3483, 3522},
+ {3485, 3522, 3521},
+ {3483, 3481, 3523},
+ {3483, 3523, 3522},
+ {3481, 3479, 3524},
+ {3481, 3524, 3523},
+ {3479, 3477, 3525},
+ {3479, 3525, 3524},
+ {3477, 3475, 3526},
+ {3477, 3526, 3525},
+ {3475, 3473, 3527},
+ {3475, 3527, 3526},
+ {3473, 3471, 3528},
+ {3473, 3528, 3527},
+ {3471, 3469, 3529},
+ {3471, 3529, 3528},
+ {3469, 3467, 3530},
+ {3469, 3530, 3529},
+ {3467, 3465, 3531},
+ {3467, 3531, 3530},
+ {3465, 3463, 3532},
+ {3465, 3532, 3531},
+ {3463, 3461, 3533},
+ {3463, 3533, 3532},
+ {3461, 3459, 3534},
+ {3461, 3534, 3533},
+ {3459, 3457, 3535},
+ {3459, 3535, 3534},
+ {3457, 3455, 3536},
+ {3457, 3536, 3535},
+ {3455, 3453, 3537},
+ {3455, 3537, 3536},
+ {3453, 3451, 3538},
+ {3453, 3538, 3537},
+ {3451, 3449, 3539},
+ {3451, 3539, 3538},
+ {3449, 3447, 3540},
+ {3449, 3540, 3539},
+ {3447, 3446, 3510},
+ {3447, 3510, 3540},
+ {3541, 3542, 3543},
+ {3541, 3543, 3544},
+ {3545, 3541, 3544},
+ {3545, 3544, 3546},
+ {3547, 3545, 3546},
+ {3547, 3546, 3548},
+ {3549, 3547, 3548},
+ {3549, 3548, 3550},
+ {3551, 3549, 3550},
+ {3551, 3550, 3552},
+ {3553, 3551, 3552},
+ {3553, 3552, 3554},
+ {3555, 3553, 3554},
+ {3555, 3554, 3556},
+ {3557, 3555, 3556},
+ {3557, 3556, 3558},
+ {3559, 3557, 3558},
+ {3559, 3558, 3560},
+ {3561, 3559, 3560},
+ {3561, 3560, 3562},
+ {3563, 3561, 3562},
+ {3563, 3562, 3564},
+ {3565, 3563, 3564},
+ {3565, 3564, 3566},
+ {3567, 3565, 3566},
+ {3567, 3566, 3568},
+ {3569, 3567, 3568},
+ {3569, 3568, 3570},
+ {3571, 3569, 3570},
+ {3571, 3570, 3572},
+ {3573, 3571, 3572},
+ {3573, 3572, 3574},
+ {3575, 3573, 3574},
+ {3575, 3574, 3576},
+ {3577, 3575, 3576},
+ {3577, 3576, 3578},
+ {3579, 3577, 3578},
+ {3579, 3578, 3580},
+ {3581, 3579, 3580},
+ {3581, 3580, 3582},
+ {3583, 3581, 3582},
+ {3583, 3582, 3584},
+ {3585, 3583, 3584},
+ {3585, 3584, 3586},
+ {3587, 3585, 3586},
+ {3587, 3586, 3588},
+ {3589, 3587, 3588},
+ {3589, 3588, 3590},
+ {3591, 3589, 3590},
+ {3591, 3590, 3592},
+ {3593, 3591, 3592},
+ {3593, 3592, 3594},
+ {3595, 3593, 3594},
+ {3595, 3594, 3596},
+ {3597, 3595, 3596},
+ {3597, 3596, 3598},
+ {3599, 3597, 3598},
+ {3599, 3598, 3600},
+ {3601, 3599, 3600},
+ {3601, 3600, 3602},
+ {3603, 3601, 3602},
+ {3603, 3602, 3604},
+ {3542, 3603, 3604},
+ {3542, 3604, 3543},
+ {3605, 3544, 3543},
+ {3605, 3546, 3544},
+ {3605, 3548, 3546},
+ {3605, 3550, 3548},
+ {3605, 3552, 3550},
+ {3605, 3554, 3552},
+ {3605, 3556, 3554},
+ {3605, 3558, 3556},
+ {3605, 3560, 3558},
+ {3605, 3562, 3560},
+ {3605, 3564, 3562},
+ {3605, 3566, 3564},
+ {3605, 3568, 3566},
+ {3605, 3570, 3568},
+ {3605, 3572, 3570},
+ {3605, 3574, 3572},
+ {3605, 3576, 3574},
+ {3605, 3578, 3576},
+ {3605, 3580, 3578},
+ {3605, 3582, 3580},
+ {3605, 3584, 3582},
+ {3605, 3586, 3584},
+ {3605, 3588, 3586},
+ {3605, 3590, 3588},
+ {3605, 3592, 3590},
+ {3605, 3594, 3592},
+ {3605, 3596, 3594},
+ {3605, 3598, 3596},
+ {3605, 3600, 3598},
+ {3605, 3602, 3600},
+ {3605, 3604, 3602},
+ {3605, 3543, 3604},
+ {3606, 3607, 3608},
+ {3606, 3608, 3609},
+ {3609, 3608, 3610},
+ {3609, 3610, 3611},
+ {3611, 3610, 3612},
+ {3611, 3612, 3613},
+ {3613, 3612, 3614},
+ {3613, 3614, 3615},
+ {3615, 3614, 3616},
+ {3615, 3616, 3617},
+ {3617, 3616, 3618},
+ {3617, 3618, 3619},
+ {3619, 3618, 3620},
+ {3619, 3620, 3621},
+ {3621, 3620, 3622},
+ {3621, 3622, 3623},
+ {3623, 3622, 3624},
+ {3623, 3624, 3625},
+ {3625, 3624, 3626},
+ {3625, 3626, 3627},
+ {3627, 3626, 3628},
+ {3627, 3628, 3629},
+ {3629, 3628, 3630},
+ {3629, 3630, 3631},
+ {3631, 3630, 3632},
+ {3631, 3632, 3633},
+ {3633, 3632, 3634},
+ {3633, 3634, 3635},
+ {3635, 3634, 3636},
+ {3635, 3636, 3637},
+ {3637, 3636, 3638},
+ {3637, 3638, 3639},
+ {3639, 3638, 3640},
+ {3639, 3640, 3641},
+ {3641, 3640, 3642},
+ {3641, 3642, 3643},
+ {3643, 3642, 3644},
+ {3643, 3644, 3645},
+ {3645, 3644, 3646},
+ {3645, 3646, 3647},
+ {3647, 3646, 3648},
+ {3647, 3648, 3649},
+ {3649, 3648, 3650},
+ {3649, 3650, 3651},
+ {3651, 3650, 3652},
+ {3651, 3652, 3653},
+ {3653, 3652, 3654},
+ {3653, 3654, 3655},
+ {3655, 3654, 3656},
+ {3655, 3656, 3657},
+ {3657, 3656, 3658},
+ {3657, 3658, 3659},
+ {3659, 3658, 3660},
+ {3659, 3660, 3661},
+ {3661, 3660, 3662},
+ {3661, 3662, 3663},
+ {3663, 3662, 3664},
+ {3663, 3664, 3665},
+ {3665, 3664, 3666},
+ {3665, 3666, 3667},
+ {3667, 3666, 3668},
+ {3667, 3668, 3669},
+ {3607, 3606, 3669},
+ {3607, 3669, 3668},
+ {3607, 3668, 3670},
+ {3607, 3670, 3671},
+ {3668, 3666, 3672},
+ {3668, 3672, 3670},
+ {3666, 3664, 3673},
+ {3666, 3673, 3672},
+ {3664, 3662, 3674},
+ {3664, 3674, 3673},
+ {3662, 3660, 3675},
+ {3662, 3675, 3674},
+ {3660, 3658, 3676},
+ {3660, 3676, 3675},
+ {3658, 3656, 3677},
+ {3658, 3677, 3676},
+ {3656, 3654, 3678},
+ {3656, 3678, 3677},
+ {3654, 3652, 3679},
+ {3654, 3679, 3678},
+ {3652, 3650, 3680},
+ {3652, 3680, 3679},
+ {3650, 3648, 3681},
+ {3650, 3681, 3680},
+ {3648, 3646, 3682},
+ {3648, 3682, 3681},
+ {3646, 3644, 3683},
+ {3646, 3683, 3682},
+ {3644, 3642, 3684},
+ {3644, 3684, 3683},
+ {3642, 3640, 3685},
+ {3642, 3685, 3684},
+ {3640, 3638, 3686},
+ {3640, 3686, 3685},
+ {3638, 3636, 3687},
+ {3638, 3687, 3686},
+ {3636, 3634, 3688},
+ {3636, 3688, 3687},
+ {3634, 3632, 3689},
+ {3634, 3689, 3688},
+ {3632, 3630, 3690},
+ {3632, 3690, 3689},
+ {3630, 3628, 3691},
+ {3630, 3691, 3690},
+ {3628, 3626, 3692},
+ {3628, 3692, 3691},
+ {3626, 3624, 3693},
+ {3626, 3693, 3692},
+ {3624, 3622, 3694},
+ {3624, 3694, 3693},
+ {3622, 3620, 3695},
+ {3622, 3695, 3694},
+ {3620, 3618, 3696},
+ {3620, 3696, 3695},
+ {3618, 3616, 3697},
+ {3618, 3697, 3696},
+ {3616, 3614, 3698},
+ {3616, 3698, 3697},
+ {3614, 3612, 3699},
+ {3614, 3699, 3698},
+ {3612, 3610, 3700},
+ {3612, 3700, 3699},
+ {3610, 3608, 3701},
+ {3610, 3701, 3700},
+ {3608, 3607, 3671},
+ {3608, 3671, 3701},
+ {3702, 3703, 3704},
+ {3702, 3704, 3705},
+ {3706, 3702, 3705},
+ {3706, 3705, 3707},
+ {3708, 3706, 3707},
+ {3708, 3707, 3709},
+ {3710, 3708, 3709},
+ {3710, 3709, 3711},
+ {3712, 3710, 3711},
+ {3712, 3711, 3713},
+ {3714, 3712, 3713},
+ {3714, 3713, 3715},
+ {3716, 3714, 3715},
+ {3716, 3715, 3717},
+ {3718, 3716, 3717},
+ {3718, 3717, 3719},
+ {3720, 3718, 3719},
+ {3720, 3719, 3721},
+ {3722, 3720, 3721},
+ {3722, 3721, 3723},
+ {3724, 3722, 3723},
+ {3724, 3723, 3725},
+ {3726, 3724, 3725},
+ {3726, 3725, 3727},
+ {3728, 3726, 3727},
+ {3728, 3727, 3729},
+ {3730, 3728, 3729},
+ {3730, 3729, 3731},
+ {3732, 3730, 3731},
+ {3732, 3731, 3733},
+ {3734, 3732, 3733},
+ {3734, 3733, 3735},
+ {3736, 3734, 3735},
+ {3736, 3735, 3737},
+ {3738, 3736, 3737},
+ {3738, 3737, 3739},
+ {3740, 3738, 3739},
+ {3740, 3739, 3741},
+ {3742, 3740, 3741},
+ {3742, 3741, 3743},
+ {3744, 3742, 3743},
+ {3744, 3743, 3745},
+ {3746, 3744, 3745},
+ {3746, 3745, 3747},
+ {3748, 3746, 3747},
+ {3748, 3747, 3749},
+ {3750, 3748, 3749},
+ {3750, 3749, 3751},
+ {3752, 3750, 3751},
+ {3752, 3751, 3753},
+ {3754, 3752, 3753},
+ {3754, 3753, 3755},
+ {3756, 3754, 3755},
+ {3756, 3755, 3757},
+ {3758, 3756, 3757},
+ {3758, 3757, 3759},
+ {3760, 3758, 3759},
+ {3760, 3759, 3761},
+ {3762, 3760, 3761},
+ {3762, 3761, 3763},
+ {3764, 3762, 3763},
+ {3764, 3763, 3765},
+ {3703, 3764, 3765},
+ {3703, 3765, 3704},
+ {3766, 3705, 3704},
+ {3766, 3707, 3705},
+ {3766, 3709, 3707},
+ {3766, 3711, 3709},
+ {3766, 3713, 3711},
+ {3766, 3715, 3713},
+ {3766, 3717, 3715},
+ {3766, 3719, 3717},
+ {3766, 3721, 3719},
+ {3766, 3723, 3721},
+ {3766, 3725, 3723},
+ {3766, 3727, 3725},
+ {3766, 3729, 3727},
+ {3766, 3731, 3729},
+ {3766, 3733, 3731},
+ {3766, 3735, 3733},
+ {3766, 3737, 3735},
+ {3766, 3739, 3737},
+ {3766, 3741, 3739},
+ {3766, 3743, 3741},
+ {3766, 3745, 3743},
+ {3766, 3747, 3745},
+ {3766, 3749, 3747},
+ {3766, 3751, 3749},
+ {3766, 3753, 3751},
+ {3766, 3755, 3753},
+ {3766, 3757, 3755},
+ {3766, 3759, 3757},
+ {3766, 3761, 3759},
+ {3766, 3763, 3761},
+ {3766, 3765, 3763},
+ {3766, 3704, 3765},
+ {3767, 3768, 3769},
+ {3767, 3769, 3770},
+ {3770, 3769, 3771},
+ {3770, 3771, 3772},
+ {3772, 3771, 3773},
+ {3772, 3773, 3774},
+ {3774, 3773, 3775},
+ {3774, 3775, 3776},
+ {3776, 3775, 3777},
+ {3776, 3777, 3778},
+ {3778, 3777, 3779},
+ {3778, 3779, 3780},
+ {3780, 3779, 3781},
+ {3780, 3781, 3782},
+ {3782, 3781, 3783},
+ {3782, 3783, 3784},
+ {3784, 3783, 3785},
+ {3784, 3785, 3786},
+ {3786, 3785, 3787},
+ {3786, 3787, 3788},
+ {3788, 3787, 3789},
+ {3788, 3789, 3790},
+ {3790, 3789, 3791},
+ {3790, 3791, 3792},
+ {3792, 3791, 3793},
+ {3792, 3793, 3794},
+ {3794, 3793, 3795},
+ {3794, 3795, 3796},
+ {3796, 3795, 3797},
+ {3796, 3797, 3798},
+ {3798, 3797, 3799},
+ {3798, 3799, 3800},
+ {3800, 3799, 3801},
+ {3800, 3801, 3802},
+ {3802, 3801, 3803},
+ {3802, 3803, 3804},
+ {3804, 3803, 3805},
+ {3804, 3805, 3806},
+ {3806, 3805, 3807},
+ {3806, 3807, 3808},
+ {3808, 3807, 3809},
+ {3808, 3809, 3810},
+ {3810, 3809, 3811},
+ {3810, 3811, 3812},
+ {3812, 3811, 3813},
+ {3812, 3813, 3814},
+ {3814, 3813, 3815},
+ {3814, 3815, 3816},
+ {3816, 3815, 3817},
+ {3816, 3817, 3818},
+ {3818, 3817, 3819},
+ {3818, 3819, 3820},
+ {3820, 3819, 3821},
+ {3820, 3821, 3822},
+ {3822, 3821, 3823},
+ {3822, 3823, 3824},
+ {3824, 3823, 3825},
+ {3824, 3825, 3826},
+ {3826, 3825, 3827},
+ {3826, 3827, 3828},
+ {3828, 3827, 3829},
+ {3828, 3829, 3830},
+ {3768, 3767, 3830},
+ {3768, 3830, 3829},
+ {3768, 3829, 3831},
+ {3768, 3831, 3832},
+ {3829, 3827, 3833},
+ {3829, 3833, 3831},
+ {3827, 3825, 3834},
+ {3827, 3834, 3833},
+ {3825, 3823, 3835},
+ {3825, 3835, 3834},
+ {3823, 3821, 3836},
+ {3823, 3836, 3835},
+ {3821, 3819, 3837},
+ {3821, 3837, 3836},
+ {3819, 3817, 3838},
+ {3819, 3838, 3837},
+ {3817, 3815, 3839},
+ {3817, 3839, 3838},
+ {3815, 3813, 3840},
+ {3815, 3840, 3839},
+ {3813, 3811, 3841},
+ {3813, 3841, 3840},
+ {3811, 3809, 3842},
+ {3811, 3842, 3841},
+ {3809, 3807, 3843},
+ {3809, 3843, 3842},
+ {3807, 3805, 3844},
+ {3807, 3844, 3843},
+ {3805, 3803, 3845},
+ {3805, 3845, 3844},
+ {3803, 3801, 3846},
+ {3803, 3846, 3845},
+ {3801, 3799, 3847},
+ {3801, 3847, 3846},
+ {3799, 3797, 3848},
+ {3799, 3848, 3847},
+ {3797, 3795, 3849},
+ {3797, 3849, 3848},
+ {3795, 3793, 3850},
+ {3795, 3850, 3849},
+ {3793, 3791, 3851},
+ {3793, 3851, 3850},
+ {3791, 3789, 3852},
+ {3791, 3852, 3851},
+ {3789, 3787, 3853},
+ {3789, 3853, 3852},
+ {3787, 3785, 3854},
+ {3787, 3854, 3853},
+ {3785, 3783, 3855},
+ {3785, 3855, 3854},
+ {3783, 3781, 3856},
+ {3783, 3856, 3855},
+ {3781, 3779, 3857},
+ {3781, 3857, 3856},
+ {3779, 3777, 3858},
+ {3779, 3858, 3857},
+ {3777, 3775, 3859},
+ {3777, 3859, 3858},
+ {3775, 3773, 3860},
+ {3775, 3860, 3859},
+ {3773, 3771, 3861},
+ {3773, 3861, 3860},
+ {3771, 3769, 3862},
+ {3771, 3862, 3861},
+ {3769, 3768, 3832},
+ {3769, 3832, 3862},
+ {3863, 3864, 3865},
+ {3863, 3865, 3866},
+ {3867, 3863, 3866},
+ {3867, 3866, 3868},
+ {3869, 3867, 3868},
+ {3869, 3868, 3870},
+ {3871, 3869, 3870},
+ {3871, 3870, 3872},
+ {3873, 3871, 3872},
+ {3873, 3872, 3874},
+ {3875, 3873, 3874},
+ {3875, 3874, 3876},
+ {3877, 3875, 3876},
+ {3877, 3876, 3878},
+ {3879, 3877, 3878},
+ {3879, 3878, 3880},
+ {3881, 3879, 3880},
+ {3881, 3880, 3882},
+ {3883, 3881, 3882},
+ {3883, 3882, 3884},
+ {3885, 3883, 3884},
+ {3885, 3884, 3886},
+ {3887, 3885, 3886},
+ {3887, 3886, 3888},
+ {3889, 3887, 3888},
+ {3889, 3888, 3890},
+ {3891, 3889, 3890},
+ {3891, 3890, 3892},
+ {3893, 3891, 3892},
+ {3893, 3892, 3894},
+ {3895, 3893, 3894},
+ {3895, 3894, 3896},
+ {3897, 3895, 3896},
+ {3897, 3896, 3898},
+ {3899, 3897, 3898},
+ {3899, 3898, 3900},
+ {3901, 3899, 3900},
+ {3901, 3900, 3902},
+ {3903, 3901, 3902},
+ {3903, 3902, 3904},
+ {3905, 3903, 3904},
+ {3905, 3904, 3906},
+ {3907, 3905, 3906},
+ {3907, 3906, 3908},
+ {3909, 3907, 3908},
+ {3909, 3908, 3910},
+ {3911, 3909, 3910},
+ {3911, 3910, 3912},
+ {3913, 3911, 3912},
+ {3913, 3912, 3914},
+ {3915, 3913, 3914},
+ {3915, 3914, 3916},
+ {3917, 3915, 3916},
+ {3917, 3916, 3918},
+ {3919, 3917, 3918},
+ {3919, 3918, 3920},
+ {3921, 3919, 3920},
+ {3921, 3920, 3922},
+ {3923, 3921, 3922},
+ {3923, 3922, 3924},
+ {3925, 3923, 3924},
+ {3925, 3924, 3926},
+ {3864, 3925, 3926},
+ {3864, 3926, 3865},
+ {3927, 3866, 3865},
+ {3927, 3868, 3866},
+ {3927, 3870, 3868},
+ {3927, 3872, 3870},
+ {3927, 3874, 3872},
+ {3927, 3876, 3874},
+ {3927, 3878, 3876},
+ {3927, 3880, 3878},
+ {3927, 3882, 3880},
+ {3927, 3884, 3882},
+ {3927, 3886, 3884},
+ {3927, 3888, 3886},
+ {3927, 3890, 3888},
+ {3927, 3892, 3890},
+ {3927, 3894, 3892},
+ {3927, 3896, 3894},
+ {3927, 3898, 3896},
+ {3927, 3900, 3898},
+ {3927, 3902, 3900},
+ {3927, 3904, 3902},
+ {3927, 3906, 3904},
+ {3927, 3908, 3906},
+ {3927, 3910, 3908},
+ {3927, 3912, 3910},
+ {3927, 3914, 3912},
+ {3927, 3916, 3914},
+ {3927, 3918, 3916},
+ {3927, 3920, 3918},
+ {3927, 3922, 3920},
+ {3927, 3924, 3922},
+ {3927, 3926, 3924},
+ {3927, 3865, 3926},
+ {3928, 3929, 3930},
+ {3928, 3930, 3931},
+ {3931, 3930, 3932},
+ {3931, 3932, 3933},
+ {3933, 3932, 3934},
+ {3933, 3934, 3935},
+ {3935, 3934, 3936},
+ {3935, 3936, 3937},
+ {3937, 3936, 3938},
+ {3937, 3938, 3939},
+ {3939, 3938, 3940},
+ {3939, 3940, 3941},
+ {3941, 3940, 3942},
+ {3941, 3942, 3943},
+ {3943, 3942, 3944},
+ {3943, 3944, 3945},
+ {3945, 3944, 3946},
+ {3945, 3946, 3947},
+ {3947, 3946, 3948},
+ {3947, 3948, 3949},
+ {3949, 3948, 3950},
+ {3949, 3950, 3951},
+ {3951, 3950, 3952},
+ {3951, 3952, 3953},
+ {3953, 3952, 3954},
+ {3953, 3954, 3955},
+ {3955, 3954, 3956},
+ {3955, 3956, 3957},
+ {3957, 3956, 3958},
+ {3957, 3958, 3959},
+ {3959, 3958, 3960},
+ {3959, 3960, 3961},
+ {3961, 3960, 3962},
+ {3961, 3962, 3963},
+ {3963, 3962, 3964},
+ {3963, 3964, 3965},
+ {3965, 3964, 3966},
+ {3965, 3966, 3967},
+ {3967, 3966, 3968},
+ {3967, 3968, 3969},
+ {3969, 3968, 3970},
+ {3969, 3970, 3971},
+ {3971, 3970, 3972},
+ {3971, 3972, 3973},
+ {3973, 3972, 3974},
+ {3973, 3974, 3975},
+ {3975, 3974, 3976},
+ {3975, 3976, 3977},
+ {3977, 3976, 3978},
+ {3977, 3978, 3979},
+ {3979, 3978, 3980},
+ {3979, 3980, 3981},
+ {3981, 3980, 3982},
+ {3981, 3982, 3983},
+ {3983, 3982, 3984},
+ {3983, 3984, 3985},
+ {3985, 3984, 3986},
+ {3985, 3986, 3987},
+ {3987, 3986, 3988},
+ {3987, 3988, 3989},
+ {3989, 3988, 3990},
+ {3989, 3990, 3991},
+ {3929, 3928, 3991},
+ {3929, 3991, 3990},
+ {3929, 3990, 3992},
+ {3929, 3992, 3993},
+ {3990, 3988, 3994},
+ {3990, 3994, 3992},
+ {3988, 3986, 3995},
+ {3988, 3995, 3994},
+ {3986, 3984, 3996},
+ {3986, 3996, 3995},
+ {3984, 3982, 3997},
+ {3984, 3997, 3996},
+ {3982, 3980, 3998},
+ {3982, 3998, 3997},
+ {3980, 3978, 3999},
+ {3980, 3999, 3998},
+ {3978, 3976, 4000},
+ {3978, 4000, 3999},
+ {3976, 3974, 4001},
+ {3976, 4001, 4000},
+ {3974, 3972, 4002},
+ {3974, 4002, 4001},
+ {3972, 3970, 4003},
+ {3972, 4003, 4002},
+ {3970, 3968, 4004},
+ {3970, 4004, 4003},
+ {3968, 3966, 4005},
+ {3968, 4005, 4004},
+ {3966, 3964, 4006},
+ {3966, 4006, 4005},
+ {3964, 3962, 4007},
+ {3964, 4007, 4006},
+ {3962, 3960, 4008},
+ {3962, 4008, 4007},
+ {3960, 3958, 4009},
+ {3960, 4009, 4008},
+ {3958, 3956, 4010},
+ {3958, 4010, 4009},
+ {3956, 3954, 4011},
+ {3956, 4011, 4010},
+ {3954, 3952, 4012},
+ {3954, 4012, 4011},
+ {3952, 3950, 4013},
+ {3952, 4013, 4012},
+ {3950, 3948, 4014},
+ {3950, 4014, 4013},
+ {3948, 3946, 4015},
+ {3948, 4015, 4014},
+ {3946, 3944, 4016},
+ {3946, 4016, 4015},
+ {3944, 3942, 4017},
+ {3944, 4017, 4016},
+ {3942, 3940, 4018},
+ {3942, 4018, 4017},
+ {3940, 3938, 4019},
+ {3940, 4019, 4018},
+ {3938, 3936, 4020},
+ {3938, 4020, 4019},
+ {3936, 3934, 4021},
+ {3936, 4021, 4020},
+ {3934, 3932, 4022},
+ {3934, 4022, 4021},
+ {3932, 3930, 4023},
+ {3932, 4023, 4022},
+ {3930, 3929, 3993},
+ {3930, 3993, 4023},
+ {4024, 4025, 4026},
+ {4024, 4026, 4027},
+ {4028, 4024, 4027},
+ {4028, 4027, 4029},
+ {4030, 4028, 4029},
+ {4030, 4029, 4031},
+ {4032, 4030, 4031},
+ {4032, 4031, 4033},
+ {4034, 4032, 4033},
+ {4034, 4033, 4035},
+ {4036, 4034, 4035},
+ {4036, 4035, 4037},
+ {4038, 4036, 4037},
+ {4038, 4037, 4039},
+ {4040, 4038, 4039},
+ {4040, 4039, 4041},
+ {4042, 4040, 4041},
+ {4042, 4041, 4043},
+ {4044, 4042, 4043},
+ {4044, 4043, 4045},
+ {4046, 4044, 4045},
+ {4046, 4045, 4047},
+ {4048, 4046, 4047},
+ {4048, 4047, 4049},
+ {4050, 4048, 4049},
+ {4050, 4049, 4051},
+ {4052, 4050, 4051},
+ {4052, 4051, 4053},
+ {4054, 4052, 4053},
+ {4054, 4053, 4055},
+ {4056, 4054, 4055},
+ {4056, 4055, 4057},
+ {4058, 4056, 4057},
+ {4058, 4057, 4059},
+ {4060, 4058, 4059},
+ {4060, 4059, 4061},
+ {4062, 4060, 4061},
+ {4062, 4061, 4063},
+ {4064, 4062, 4063},
+ {4064, 4063, 4065},
+ {4066, 4064, 4065},
+ {4066, 4065, 4067},
+ {4068, 4066, 4067},
+ {4068, 4067, 4069},
+ {4070, 4068, 4069},
+ {4070, 4069, 4071},
+ {4072, 4070, 4071},
+ {4072, 4071, 4073},
+ {4074, 4072, 4073},
+ {4074, 4073, 4075},
+ {4076, 4074, 4075},
+ {4076, 4075, 4077},
+ {4078, 4076, 4077},
+ {4078, 4077, 4079},
+ {4080, 4078, 4079},
+ {4080, 4079, 4081},
+ {4082, 4080, 4081},
+ {4082, 4081, 4083},
+ {4084, 4082, 4083},
+ {4084, 4083, 4085},
+ {4086, 4084, 4085},
+ {4086, 4085, 4087},
+ {4025, 4086, 4087},
+ {4025, 4087, 4026},
+ {4088, 4027, 4026},
+ {4088, 4029, 4027},
+ {4088, 4031, 4029},
+ {4088, 4033, 4031},
+ {4088, 4035, 4033},
+ {4088, 4037, 4035},
+ {4088, 4039, 4037},
+ {4088, 4041, 4039},
+ {4088, 4043, 4041},
+ {4088, 4045, 4043},
+ {4088, 4047, 4045},
+ {4088, 4049, 4047},
+ {4088, 4051, 4049},
+ {4088, 4053, 4051},
+ {4088, 4055, 4053},
+ {4088, 4057, 4055},
+ {4088, 4059, 4057},
+ {4088, 4061, 4059},
+ {4088, 4063, 4061},
+ {4088, 4065, 4063},
+ {4088, 4067, 4065},
+ {4088, 4069, 4067},
+ {4088, 4071, 4069},
+ {4088, 4073, 4071},
+ {4088, 4075, 4073},
+ {4088, 4077, 4075},
+ {4088, 4079, 4077},
+ {4088, 4081, 4079},
+ {4088, 4083, 4081},
+ {4088, 4085, 4083},
+ {4088, 4087, 4085},
+ {4088, 4026, 4087},
+ {4089, 4090, 4091},
+ {4089, 4091, 4092},
+ {4090, 4093, 4094},
+ {4090, 4094, 4091},
+ {4093, 4095, 4096},
+ {4093, 4096, 4094},
+ {4097, 4098, 4099},
+ {4097, 4099, 4100},
+ {4101, 4097, 4100},
+ {4101, 4100, 4102},
+ {4103, 4101, 4102},
+ {4103, 4102, 4104},
+ {4095, 4105, 4106},
+ {4095, 4106, 4096},
+ {4105, 4107, 4108},
+ {4105, 4108, 4106},
+ {4107, 4109, 4110},
+ {4107, 4110, 4108},
+ {4111, 4112, 4113},
+ {4111, 4113, 4114},
+ {4112, 4115, 4116},
+ {4112, 4116, 4113},
+ {4115, 4117, 4118},
+ {4115, 4118, 4116},
+ {4117, 4119, 4120},
+ {4117, 4120, 4118},
+ {4119, 4121, 4122},
+ {4119, 4122, 4120},
+ {4121, 4123, 4124},
+ {4121, 4124, 4122},
+ {4098, 4125, 4126},
+ {4098, 4126, 4099},
+ {4125, 4127, 4128},
+ {4125, 4128, 4126},
+ {4127, 4129, 4130},
+ {4127, 4130, 4128},
+ {4131, 4132, 4133},
+ {4131, 4133, 4134},
+ {4132, 4135, 4136},
+ {4132, 4136, 4133},
+ {4135, 4137, 4138},
+ {4135, 4138, 4136},
+ {4139, 4140, 4141},
+ {4139, 4141, 4142},
+ {4143, 4139, 4142},
+ {4143, 4142, 4144},
+ {4145, 4143, 4144},
+ {4145, 4144, 4146},
+ {4137, 4147, 4148},
+ {4137, 4148, 4138},
+ {4147, 4149, 4150},
+ {4147, 4150, 4148},
+ {4149, 4151, 4152},
+ {4149, 4152, 4150},
+ {4153, 4154, 4155},
+ {4153, 4155, 4156},
+ {4154, 4157, 4158},
+ {4154, 4158, 4155},
+ {4157, 4159, 4160},
+ {4157, 4160, 4158},
+ {4159, 4161, 4162},
+ {4159, 4162, 4160},
+ {4161, 4163, 4164},
+ {4161, 4164, 4162},
+ {4163, 4165, 4166},
+ {4163, 4166, 4164},
+ {4140, 4167, 4168},
+ {4140, 4168, 4141},
+ {4167, 4169, 4170},
+ {4167, 4170, 4168},
+ {4169, 4171, 4172},
+ {4169, 4172, 4170},
+ {4173, 4174, 4175},
+ {4173, 4175, 4176},
+ {4176, 4175, 4177},
+ {4176, 4177, 4178},
+ {4178, 4177, 4179},
+ {4178, 4179, 4180},
+ {4181, 4182, 4183},
+ {4181, 4183, 4184},
+ {4185, 4186, 4182},
+ {4185, 4182, 4181},
+ {4187, 4188, 4186},
+ {4187, 4186, 4185},
+ {4180, 4179, 4189},
+ {4180, 4189, 4190},
+ {4190, 4189, 4191},
+ {4190, 4191, 4192},
+ {4192, 4191, 4193},
+ {4192, 4193, 4194},
+ {4195, 4196, 4197},
+ {4195, 4197, 4198},
+ {4198, 4197, 4199},
+ {4198, 4199, 4200},
+ {4200, 4199, 4201},
+ {4200, 4201, 4202},
+ {4202, 4201, 4203},
+ {4202, 4203, 4204},
+ {4204, 4203, 4205},
+ {4204, 4205, 4206},
+ {4206, 4205, 4207},
+ {4206, 4207, 4208},
+ {4184, 4183, 4209},
+ {4184, 4209, 4210},
+ {4210, 4209, 4211},
+ {4210, 4211, 4212},
+ {4212, 4211, 4213},
+ {4212, 4213, 4214},
+ {4215, 4216, 4217},
+ {4215, 4217, 4218},
+ {4218, 4217, 4219},
+ {4218, 4219, 4220},
+ {4220, 4219, 4221},
+ {4220, 4221, 4222},
+ {4223, 4224, 4225},
+ {4223, 4225, 4226},
+ {4227, 4228, 4224},
+ {4227, 4224, 4223},
+ {4229, 4230, 4228},
+ {4229, 4228, 4227},
+ {4222, 4221, 4231},
+ {4222, 4231, 4232},
+ {4232, 4231, 4233},
+ {4232, 4233, 4234},
+ {4234, 4233, 4235},
+ {4234, 4235, 4236},
+ {4237, 4238, 4239},
+ {4237, 4239, 4240},
+ {4240, 4239, 4241},
+ {4240, 4241, 4242},
+ {4242, 4241, 4243},
+ {4242, 4243, 4244},
+ {4244, 4243, 4245},
+ {4244, 4245, 4246},
+ {4246, 4245, 4247},
+ {4246, 4247, 4248},
+ {4248, 4247, 4249},
+ {4248, 4249, 4250},
+ {4226, 4225, 4251},
+ {4226, 4251, 4252},
+ {4252, 4251, 4253},
+ {4252, 4253, 4254},
+ {4254, 4253, 4255},
+ {4254, 4255, 4256},
+ {4257, 4258, 4259},
+ {4257, 4259, 4260},
+ {4258, 4261, 4262},
+ {4258, 4262, 4259},
+ {4261, 4263, 4264},
+ {4261, 4264, 4262},
+ {4265, 4266, 4267},
+ {4265, 4267, 4268},
+ {4269, 4265, 4268},
+ {4269, 4268, 4270},
+ {4271, 4269, 4270},
+ {4271, 4270, 4272},
+ {4263, 4273, 4274},
+ {4263, 4274, 4264},
+ {4273, 4275, 4276},
+ {4273, 4276, 4274},
+ {4275, 4277, 4278},
+ {4275, 4278, 4276},
+ {4279, 4280, 4281},
+ {4279, 4281, 4282},
+ {4280, 4283, 4284},
+ {4280, 4284, 4281},
+ {4283, 4285, 4286},
+ {4283, 4286, 4284},
+ {4285, 4287, 4288},
+ {4285, 4288, 4286},
+ {4287, 4289, 4290},
+ {4287, 4290, 4288},
+ {4289, 4291, 4292},
+ {4289, 4292, 4290},
+ {4266, 4293, 4294},
+ {4266, 4294, 4267},
+ {4293, 4295, 4296},
+ {4293, 4296, 4294},
+ {4295, 4297, 4298},
+ {4295, 4298, 4296},
+ {4299, 4300, 4301},
+ {4299, 4301, 4302},
+ {4300, 4303, 4304},
+ {4300, 4304, 4301},
+ {4303, 4305, 4306},
+ {4303, 4306, 4304},
+ {4307, 4308, 4309},
+ {4307, 4309, 4310},
+ {4311, 4307, 4310},
+ {4311, 4310, 4312},
+ {4313, 4311, 4312},
+ {4313, 4312, 4314},
+ {4305, 4315, 4316},
+ {4305, 4316, 4306},
+ {4315, 4317, 4318},
+ {4315, 4318, 4316},
+ {4317, 4319, 4320},
+ {4317, 4320, 4318},
+ {4321, 4322, 4323},
+ {4321, 4323, 4324},
+ {4322, 4325, 4326},
+ {4322, 4326, 4323},
+ {4325, 4327, 4328},
+ {4325, 4328, 4326},
+ {4327, 4329, 4330},
+ {4327, 4330, 4328},
+ {4329, 4331, 4332},
+ {4329, 4332, 4330},
+ {4331, 4333, 4334},
+ {4331, 4334, 4332},
+ {4308, 4335, 4336},
+ {4308, 4336, 4309},
+ {4335, 4337, 4338},
+ {4335, 4338, 4336},
+ {4337, 4339, 4340},
+ {4337, 4340, 4338},
+ {4341, 4342, 4343},
+ {4341, 4343, 4344},
+ {4344, 4343, 4345},
+ {4344, 4345, 4346},
+ {4346, 4345, 4347},
+ {4346, 4347, 4348},
+ {4349, 4350, 4351},
+ {4349, 4351, 4352},
+ {4353, 4354, 4350},
+ {4353, 4350, 4349},
+ {4355, 4356, 4354},
+ {4355, 4354, 4353},
+ {4348, 4347, 4357},
+ {4348, 4357, 4358},
+ {4358, 4357, 4359},
+ {4358, 4359, 4360},
+ {4360, 4359, 4361},
+ {4360, 4361, 4362},
+ {4363, 4364, 4365},
+ {4363, 4365, 4366},
+ {4366, 4365, 4367},
+ {4366, 4367, 4368},
+ {4368, 4367, 4369},
+ {4368, 4369, 4370},
+ {4370, 4369, 4371},
+ {4370, 4371, 4372},
+ {4372, 4371, 4373},
+ {4372, 4373, 4374},
+ {4374, 4373, 4375},
+ {4374, 4375, 4376},
+ {4352, 4351, 4377},
+ {4352, 4377, 4378},
+ {4378, 4377, 4379},
+ {4378, 4379, 4380},
+ {4380, 4379, 4381},
+ {4380, 4381, 4382},
+ {4383, 4384, 4385},
+ {4383, 4385, 4386},
+ {4386, 4385, 4387},
+ {4386, 4387, 4388},
+ {4388, 4387, 4389},
+ {4388, 4389, 4390},
+ {4391, 4392, 4393},
+ {4391, 4393, 4394},
+ {4395, 4396, 4392},
+ {4395, 4392, 4391},
+ {4397, 4398, 4396},
+ {4397, 4396, 4395},
+ {4390, 4389, 4399},
+ {4390, 4399, 4400},
+ {4400, 4399, 4401},
+ {4400, 4401, 4402},
+ {4402, 4401, 4403},
+ {4402, 4403, 4404},
+ {4405, 4406, 4407},
+ {4405, 4407, 4408},
+ {4408, 4407, 4409},
+ {4408, 4409, 4410},
+ {4410, 4409, 4411},
+ {4410, 4411, 4412},
+ {4412, 4411, 4413},
+ {4412, 4413, 4414},
+ {4414, 4413, 4415},
+ {4414, 4415, 4416},
+ {4416, 4415, 4417},
+ {4416, 4417, 4418},
+ {4394, 4393, 4419},
+ {4394, 4419, 4420},
+ {4420, 4419, 4421},
+ {4420, 4421, 4422},
+ {4422, 4421, 4423},
+ {4422, 4423, 4424},
+ {4425, 4426, 4427},
+ {4425, 4427, 4428},
+ {4426, 4429, 4430},
+ {4426, 4430, 4427},
+ {4431, 4425, 4428},
+ {4431, 4428, 4432},
+ {4433, 4431, 4432},
+ {4433, 4432, 4434},
+ {4435, 4436, 4437},
+ {4435, 4437, 4438},
+ {4438, 4437, 4439},
+ {4438, 4439, 4440},
+ {4441, 4442, 4443},
+ {4441, 4443, 4444},
+ {4440, 4439, 4442},
+ {4440, 4442, 4441},
+ {4445, 4446, 4447},
+ {4445, 4447, 4448},
+ {4446, 4449, 4450},
+ {4446, 4450, 4447},
+ {4451, 4445, 4448},
+ {4451, 4448, 4452},
+ {4453, 4451, 4452},
+ {4453, 4452, 4454},
+ {4455, 4456, 4457},
+ {4455, 4457, 4458},
+ {4458, 4457, 4459},
+ {4458, 4459, 4460},
+ {4461, 4462, 4463},
+ {4461, 4463, 4464},
+ {4460, 4459, 4462},
+ {4460, 4462, 4461},
+ {4465, 4466, 4467},
+ {4465, 4467, 4468},
+ {4466, 4469, 4470},
+ {4466, 4470, 4467},
+ {4471, 4465, 4468},
+ {4471, 4468, 4472},
+ {4473, 4471, 4472},
+ {4473, 4472, 4474},
+ {4475, 4476, 4477},
+ {4475, 4477, 4478},
+ {4478, 4477, 4479},
+ {4478, 4479, 4480},
+ {4481, 4482, 4483},
+ {4481, 4483, 4484},
+ {4480, 4479, 4482},
+ {4480, 4482, 4481},
+ {4485, 4486, 4487},
+ {4485, 4487, 4488},
+ {4486, 4489, 4490},
+ {4486, 4490, 4487},
+ {4491, 4485, 4488},
+ {4491, 4488, 4492},
+ {4493, 4491, 4492},
+ {4493, 4492, 4494},
+ {4495, 4496, 4497},
+ {4495, 4497, 4498},
+ {4498, 4497, 4499},
+ {4498, 4499, 4500},
+ {4501, 4502, 4503},
+ {4501, 4503, 4504},
+ {4500, 4499, 4502},
+ {4500, 4502, 4501},
+ {4505, 4506, 4507},
+ {4505, 4507, 4508},
+ {4506, 4509, 4510},
+ {4506, 4510, 4507},
+ {4511, 4505, 4508},
+ {4511, 4508, 4512},
+ {4513, 4511, 4512},
+ {4513, 4512, 4514},
+ {4515, 4516, 4517},
+ {4515, 4517, 4518},
+ {4518, 4517, 4519},
+ {4518, 4519, 4520},
+ {4521, 4522, 4523},
+ {4521, 4523, 4524},
+ {4520, 4519, 4522},
+ {4520, 4522, 4521},
+ {4525, 4526, 4527},
+ {4525, 4527, 4528},
+ {4526, 4529, 4530},
+ {4526, 4530, 4527},
+ {4531, 4525, 4528},
+ {4531, 4528, 4532},
+ {4533, 4531, 4532},
+ {4533, 4532, 4534},
+ {4535, 4536, 4537},
+ {4535, 4537, 4538},
+ {4538, 4537, 4539},
+ {4538, 4539, 4540},
+ {4541, 4542, 4543},
+ {4541, 4543, 4544},
+ {4540, 4539, 4542},
+ {4540, 4542, 4541},
+ {4545, 4546, 4547},
+ {4545, 4547, 4548},
+ {4546, 4549, 4550},
+ {4546, 4550, 4547},
+ {4551, 4545, 4548},
+ {4551, 4548, 4552},
+ {4553, 4551, 4552},
+ {4553, 4552, 4554},
+ {4555, 4556, 4557},
+ {4555, 4557, 4558},
+ {4558, 4557, 4559},
+ {4558, 4559, 4560},
+ {4561, 4562, 4563},
+ {4561, 4563, 4564},
+ {4560, 4559, 4562},
+ {4560, 4562, 4561},
+ {4565, 4566, 4567},
+ {4565, 4567, 4568},
+ {4566, 4569, 4570},
+ {4566, 4570, 4567},
+ {4571, 4565, 4568},
+ {4571, 4568, 4572},
+ {4573, 4571, 4572},
+ {4573, 4572, 4574},
+ {4575, 4576, 4577},
+ {4575, 4577, 4578},
+ {4578, 4577, 4579},
+ {4578, 4579, 4580},
+ {4581, 4582, 4583},
+ {4581, 4583, 4584},
+ {4580, 4579, 4582},
+ {4580, 4582, 4581},
+ {4585, 4586, 4587},
+ {4585, 4587, 4588},
+ {4586, 4589, 4590},
+ {4586, 4590, 4587},
+ {4591, 4585, 4588},
+ {4591, 4588, 4592},
+ {4593, 4591, 4592},
+ {4593, 4592, 4594},
+ {4595, 4596, 4597},
+ {4595, 4597, 4598},
+ {4598, 4597, 4599},
+ {4598, 4599, 4600},
+ {4601, 4602, 4603},
+ {4601, 4603, 4604},
+ {4600, 4599, 4602},
+ {4600, 4602, 4601},
+ {4605, 4606, 4607},
+ {4605, 4607, 4608},
+ {4606, 4609, 4610},
+ {4606, 4610, 4607},
+ {4611, 4605, 4608},
+ {4611, 4608, 4612},
+ {4613, 4611, 4612},
+ {4613, 4612, 4614},
+ {4615, 4616, 4617},
+ {4615, 4617, 4618},
+ {4618, 4617, 4619},
+ {4618, 4619, 4620},
+ {4621, 4622, 4623},
+ {4621, 4623, 4624},
+ {4620, 4619, 4622},
+ {4620, 4622, 4621},
+ {4625, 4626, 4627},
+ {4625, 4627, 4628},
+ {4626, 4629, 4630},
+ {4626, 4630, 4627},
+ {4631, 4625, 4628},
+ {4631, 4628, 4632},
+ {4633, 4631, 4632},
+ {4633, 4632, 4634},
+ {4635, 4636, 4637},
+ {4635, 4637, 4638},
+ {4638, 4637, 4639},
+ {4638, 4639, 4640},
+ {4641, 4642, 4643},
+ {4641, 4643, 4644},
+ {4640, 4639, 4642},
+ {4640, 4642, 4641},
+ {4645, 4646, 4647},
+ {4645, 4647, 4648},
+ {4646, 4649, 4650},
+ {4646, 4650, 4647},
+ {4651, 4645, 4648},
+ {4651, 4648, 4652},
+ {4653, 4651, 4652},
+ {4653, 4652, 4654},
+ {4655, 4656, 4657},
+ {4655, 4657, 4658},
+ {4658, 4657, 4659},
+ {4658, 4659, 4660},
+ {4661, 4662, 4663},
+ {4661, 4663, 4664},
+ {4660, 4659, 4662},
+ {4660, 4662, 4661},
+ {4665, 4666, 4667},
+ {4665, 4667, 4668},
+ {4669, 4670, 4671},
+ {4669, 4671, 4672},
+ {4673, 4674, 4675},
+ {4673, 4675, 4676},
+ {4677, 4678, 4679},
+ {4677, 4679, 4680},
+ {4681, 4682, 4683},
+ {4681, 4683, 4684},
+ {4685, 4686, 4687},
+ {4685, 4687, 4688},
+ {4689, 4690, 4691},
+ {4689, 4691, 4692},
+ {4693, 4694, 4695},
+ {4693, 4695, 4696},
+ {4697, 4698, 4699},
+ {4697, 4699, 4700},
+ {4701, 4702, 4703},
+ {4701, 4703, 4704},
+ {4705, 4706, 4707},
+ {4705, 4707, 4708},
+ {4709, 4710, 4711},
+ {4709, 4711, 4712},
+ {4713, 4714, 4715},
+ {4713, 4715, 4716},
+ {4717, 4718, 4719},
+ {4717, 4719, 4720},
+ {4721, 4722, 4723},
+ {4721, 4723, 4724},
+ {4725, 4726, 4727},
+ {4725, 4727, 4728},
+ {4729, 4730, 4731},
+ {4729, 4731, 4732},
+ {4733, 4734, 4735},
+ {4733, 4735, 4736},
+ {4737, 4738, 4739},
+ {4737, 4739, 4740},
+ {4741, 4742, 4743},
+ {4741, 4743, 4744},
+ {4745, 4746, 4747},
+ {4745, 4747, 4748},
+ {4749, 4750, 4751},
+ {4749, 4751, 4752},
+ {4753, 4754, 4755},
+ {4753, 4755, 4756},
+ {4757, 4758, 4759},
+ {4757, 4759, 4760},
+};
+
diff --git a/src/resources/companion_texture.c b/src/resources/companion_texture.c
new file mode 100644
index 0000000..89205cf
--- /dev/null
+++ b/src/resources/companion_texture.c
@@ -0,0 +1,49171 @@
+/*
+ * Texture for a weighted companion cube.
+ *
+ * A weighted companion cube is a well known meme from the 2007 video game
+ * 'Portal' by the Valve Corporation.
+ *
+ * This texture was created from a blender file made by Tobias Brage
+ * <gamerfreaq@live.com>, it can be retrieved from:
+ * http://www.blendswap.com/blends/low-poly/weighted-companion-cube-hearted/
+ *
+ * This data is licensed under the Creative Commons Attribution-NonCommercial
+ * 3.0 license (CC BY-NC 3.0): http://creativecommons.org/licenses/by-nc/3.0/
+ */
+
+#include "companion.h"
+
+unsigned int
+companion_texture[COMPANION_TEXTURE_SIZE] = {
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00010200, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000000, 0x00010000,
+ 0x00000100, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01020001, 0x00000200, 0x02000002, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000400, 0x03010004, 0x02030102, 0x00000100,
+ 0x01000001, 0x00010000, 0x00020300, 0x04000203,
+ 0x00040000, 0x00000400, 0x04000004, 0x00040000,
+ 0x00000400, 0x04000003, 0x00040000, 0x00000100,
+ 0x00010001, 0x00000000, 0x00000400, 0x04000004,
+ 0x00040000, 0x00000500, 0x04000005, 0x00040000,
+ 0x00000500, 0x04000005, 0x00030000, 0x02000302,
+ 0x03010003, 0x00030100, 0x00000400, 0x03010004,
+ 0x00030100, 0x00000400, 0x03010004, 0x00030100,
+ 0x01000301, 0x04000003, 0x00040000, 0x00000400,
+ 0x03010004, 0x00030100, 0x00000200, 0x00000001,
+ 0x00010000, 0x00000301, 0x03010004, 0x00040000,
+ 0x00000400, 0x04000003, 0x00040000, 0x00000500,
+ 0x04000005, 0x00040000, 0x00000100, 0x01010001,
+ 0x00000001, 0x00000100, 0x00010001, 0x00000000,
+ 0x00000000, 0x00010001, 0x02000102, 0x01000001,
+ 0x00000000, 0x00010000, 0x00000100, 0x01000001,
+ 0x02010002, 0x00020400, 0x03010204, 0x03040202,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000301, 0x04000004,
+ 0x00030000, 0x00020100, 0x00000200, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00010000, 0x00000100, 0x00010101,
+ 0x01000000, 0x00010000, 0x02000301, 0x04000104,
+ 0x00040000, 0x00000400, 0x03010004, 0x00030100,
+ 0x00000000, 0x00000000, 0x00000002, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x00000001,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000100, 0x00000001, 0x01010100, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00010000, 0x00000100,
+ 0x00000002, 0x00000000, 0x00000100, 0x01000001,
+ 0x00020000, 0x00000400, 0x04000005, 0x00040000,
+ 0x00000100, 0x01000001, 0x00020000, 0x00000400,
+ 0x04000005, 0x00040000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000301, 0x04000004, 0x00040000, 0x00000400,
+ 0x04000004, 0x00040000, 0x00000200, 0x01000002,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000100, 0x01000002,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010002, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000000, 0x00010000,
+ 0x00000100, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000101, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01020001, 0x00000200, 0x02000002, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x01000000, 0x5C5D5B00,
+ 0x7F80847F, 0x83818084, 0x81828082, 0x81808381,
+ 0x83818083, 0x83848282, 0x7F82837F, 0x847F8084,
+ 0x7E847F80, 0x817F8681, 0x86817F86, 0x82868180,
+ 0x81828680, 0x86818387, 0x81858082, 0x8180847F,
+ 0x82828083, 0x80838180, 0x80828681, 0x86818087,
+ 0x80868180, 0x80808780, 0x86818087, 0x80878080,
+ 0x80808780, 0x86818087, 0x80858380, 0x86828786,
+ 0x87868187, 0x81888582, 0x85828785, 0x87868188,
+ 0x81878682, 0x85828785, 0x87868188, 0x82878682,
+ 0x85828786, 0x88858188, 0x81888581, 0x85828785,
+ 0x87868287, 0x82878582, 0x81808381, 0x83818083,
+ 0x80838180, 0x85828785, 0x87868287, 0x82878582,
+ 0x80808681, 0x86818087, 0x80868180, 0x80808780,
+ 0x86818087, 0x82868180, 0x81808381, 0x83818283,
+ 0x80838182, 0x81808381, 0x82828083, 0x81818182,
+ 0x81808381, 0x82828083, 0x82828282, 0x81807F81,
+ 0x8080807F, 0x80817F80, 0x7C7F807C, 0x817D7F80,
+ 0x81817B82, 0x7C81817B, 0x817D8082, 0x7F807C80,
+ 0x40868783, 0x01004344, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000400, 0x04000004,
+ 0x5E5F5B00, 0x252B2B25, 0x00002B2B, 0x00010002,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000200,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x01000102, 0x00010000, 0x00000301, 0x04000004,
+ 0x00040000, 0x3A393F3A, 0x3F3C383F, 0x73787638,
+ 0x7B797E7C, 0x7C7C7A7D, 0x7C7D7B7C, 0x7B7C7F7D,
+ 0x807B7C80, 0x7A7F7D7C, 0x7F7B807F, 0x807F7A80,
+ 0x7B807F7B, 0x807B7F80, 0x7F807A7F, 0x7C81807B,
+ 0x7F7B807F, 0x807F7A80, 0x7A807F7B, 0x7F7B807F,
+ 0x807F7B80, 0x7B807F7B, 0x7F7B807F, 0x807F7B80,
+ 0x7B807F7B, 0x7F7B807F, 0x807F7B80, 0x7B807F7B,
+ 0x81808381, 0x82828083, 0x82828282, 0x80808080,
+ 0x7F818080, 0x80808080, 0x81808282, 0x82828083,
+ 0x80838180, 0x81808381, 0x82828083, 0x80838180,
+ 0x81808381, 0x83818083, 0x82838182, 0x817F8280,
+ 0x83818083, 0x82838182, 0x81808381, 0x83818083,
+ 0x82838182, 0x81808282, 0x82828083, 0x82838182,
+ 0x81808381, 0x82828083, 0x82838182, 0x7F80847F,
+ 0x83818084, 0x82838182, 0x81828381, 0x83818283,
+ 0x80847F82, 0x80808780, 0x87808087, 0x82868080,
+ 0x8180847F, 0x83818083, 0x80847F80, 0x80808780,
+ 0x87808087, 0x82868180, 0x8180847F, 0x83818083,
+ 0x82838182, 0x81828381, 0x83818283, 0x80838182,
+ 0x81808381, 0x83818083, 0x80838180, 0x81808381,
+ 0x83818083, 0x80838180, 0x81808381, 0x83818083,
+ 0x80838180, 0x81828381, 0x82828283, 0x82838182,
+ 0x7F80847F, 0x847F8084, 0x80847F80, 0x7F80847F,
+ 0x847F8084, 0x80847F80, 0x7F80847F, 0x83818084,
+ 0x82838182, 0x81828381, 0x83818283, 0x82838182,
+ 0x81808381, 0x83818083, 0x82838182, 0x81808381,
+ 0x83818083, 0x80838182, 0x80808381, 0x84827F82,
+ 0x80838183, 0x82818482, 0x84828184, 0x81848281,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x02000002, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000000, 0x01000000, 0x00000000,
+ 0x02000002, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000100,
+ 0x00000000, 0x01000000, 0x00010000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000002, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000001, 0x01010000, 0x02000003,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000000, 0x01000000, 0x8A8B8900,
+ 0xBDC0C4BF, 0xC4C0BFC3, 0xC3C4C0C3, 0xBFC0C4BF,
+ 0xC3C1C0C4, 0xC0C3C1C0, 0xBFC0C4BF, 0xC4BFC0C4,
+ 0xBEC4BFC0, 0xC1C0C8C1, 0xC8C1C0C8, 0xC1C8C1C1,
+ 0xC1C1C8C1, 0xC8C1C1C8, 0xC1C8C1C1, 0xBFC0C4BE,
+ 0xC4BFC0C4, 0xC0C4BFC0, 0xBFC1C8C1, 0xC8C1C0C9,
+ 0xC0C8C1C0, 0xC1C0C8C1, 0xC8C1C0C8, 0xC0C8C1C0,
+ 0xC1C0C8C1, 0xC7C2C0C8, 0xC0C7C4C0, 0xC8C2C8C7,
+ 0xC7C8C0C8, 0xC0C8C8C2, 0xC8C2C7C8, 0xC7C8C0C8,
+ 0xC0C8C8C2, 0xC8C2C7C8, 0xC7C8C0C8, 0xC2C7C8C2,
+ 0xC7C2C7C8, 0xC8C7C2C8, 0xC0C8C7C0, 0xC7C0C8C7,
+ 0xC7C8C2C8, 0xC2C8C7C2, 0xBFBEC3C1, 0xC4BFBEC4,
+ 0xC0C3C1C0, 0xC7C4C9C8, 0xC7C8C2C8, 0xC2C8C7C2,
+ 0xC1C0C7C2, 0xC7C2C0C8, 0xC0C7C2C0, 0xC2C0C8C1,
+ 0xC8C1C1C9, 0xC1C8C1C0, 0xBFC0C4BF, 0xC4BFC0C4,
+ 0xC0C4BFC0, 0xBEC0C4BF, 0xC4C0BFC3, 0xC2C3C1C3,
+ 0xBFC0C4BF, 0xC3C1C0C4, 0xC2C3C1C2, 0xC0C0C0C0,
+ 0xC0C0BEC0, 0xC0C1BFC0, 0xBABEBFBB, 0xC0BABEC0,
+ 0xC0C0BAC0, 0xB7C0C0BA, 0xC0BABFC0, 0xC0C0BAC0,
+ 0x40C8CAC4, 0x01004446, 0x02000003, 0x01000000,
+ 0x01000101, 0x00010000, 0x00000400, 0x03000004,
+ 0x5E605A02, 0x757D7E74, 0x554B7E7F, 0x2B2B2554,
+ 0x00020100, 0x02000200, 0x00010001, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x01000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00010101, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010100, 0x01000001, 0x00010000,
+ 0x00000100, 0x00010101, 0x00010000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00020000, 0x00000100,
+ 0x3E3C0001, 0x3A3E393B, 0x71393D38, 0x77707178,
+ 0xA8AFAA70, 0xB1AAB4AE, 0xB4B1ABB4, 0xAAB3B0AB,
+ 0xB7B5BAB8, 0xBBB9B8BC, 0xB8BCB7B8, 0xB9BBBFB9,
+ 0xBFB8B9C0, 0xB8BFBAB8, 0xC0B8C0BF, 0xBFC0B8C0,
+ 0xB8C0C0BA, 0xC0B8C0BF, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0BABFC0, 0xBFC0B8C0, 0xB8C0C0BA, 0xC0B9BEBF,
+ 0xBFC0BABF, 0xBABFC0BA, 0xC0BABFC0, 0xBFC0BABF,
+ 0xBABFC0BA, 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA,
+ 0xBFBEC3C1, 0xC3C1C0C4, 0xC0C3C1C0, 0xBFC0C1BF,
+ 0xC0C0C0C1, 0xC0C0C0C0, 0xBFC0C3C1, 0xC3C1C0C4,
+ 0xC0C4BFC0, 0xBFC0C4BF, 0xC3C1C0C4, 0xC0C3C1C0,
+ 0xBFC0C3C1, 0xC4BFC0C4, 0xC0C4BFC0, 0xBFBFC3BE,
+ 0xC4BFC0C4, 0xC0C4BFC0, 0xBFC0C4BF, 0xC4BFC0C4,
+ 0xC0C4BFC0, 0xBFC0C3C1, 0xC3C1C0C4, 0xC0C4BFC0,
+ 0xBFC0C4BF, 0xC3C1C0C4, 0xC2C3C1C2, 0xBFC0C4BF,
+ 0xC3C1C0C4, 0xC0C3C1C0, 0xBFC0C3C1, 0xC4BFC0C4,
+ 0xC0C4BFC0, 0xC1C1C8C1, 0xC8C1C0C8, 0xC1C8C1C0,
+ 0xBFC0C4BF, 0xC4BFC0C4, 0xC0C4BEC0, 0xC1C1C8C1,
+ 0xC8C1C0C8, 0xC1C8C1C0, 0xBFC0C4BF, 0xC3BFC0C4,
+ 0xC2C3BFC2, 0xBFC0C4BF, 0xC4BFC0C4, 0xC0C3C1C0,
+ 0xC1C0C3C1, 0xC4BFBEC3, 0xC0C4BFC0, 0xBFC0C4BF,
+ 0xC4BFC0C4, 0xC0C4BFC0, 0xBFC0C4BF, 0xC4BFC0C4,
+ 0xC0C4BFC0, 0xC0C0C4BF, 0xC3C1C1C5, 0xC0C4BFC0,
+ 0xBFC0C4BF, 0xC4BFC0C4, 0xC0C4BFC0, 0xBFC0C4BF,
+ 0xC4BFC0C4, 0xC0C4BFC0, 0xBFC0C4BF, 0xC4BFC0C4,
+ 0xC0C4BFC0, 0xBFC0C4BF, 0xC3C1C0C4, 0xC0C3C1C0,
+ 0xBFC0C4BF, 0xC3BFC0C4, 0xC2C3BFC2, 0xBFC0C4BF,
+ 0xC4BFC0C4, 0xC0C4BFC0, 0xC0C0C4BF, 0xC3BEBFC5,
+ 0xC0C4BFBF, 0xC2C3C7C2, 0xC7C2C1C7, 0x7F8580C1,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000002, 0x00000000, 0x00000001,
+ 0x01010100, 0x00000000, 0x01000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020001, 0x00000200, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x01020001, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00020000, 0x00000200, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00000000, 0x00000000, 0x02000002,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x01000001, 0x00000000, 0x02000002,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000000, 0x01000000, 0x8A8B8900,
+ 0xBEC0C4BF, 0xC3BFC0C4, 0xC2C3BFC2, 0xBFC0C4BF,
+ 0xC4C2C0C4, 0xC0C3C1C1, 0xBFC0C4BF, 0xC4BFC0C4,
+ 0xBDC3BEC0, 0xC1C1C8C1, 0xC8C1C1C8, 0xC0C7C0C1,
+ 0xC1C2C9C2, 0xC8C1C1C8, 0xC1C8C1C1, 0xBEC0C4BE,
+ 0xC4BFC0C4, 0xBEC4BFC0, 0xC1C1C8C1, 0xC8C1C0C8,
+ 0xC0C8C1C0, 0xC1C0C7C2, 0xC8C1C0C8, 0xC0C8C1C0,
+ 0xC1C0C8C1, 0xC7C2C0C8, 0xC0C7C4C0, 0xC8C0C8C7,
+ 0xC8C8C0C8, 0xC0C8C8C0, 0xC8C0C8C8, 0xC8C8C0C8,
+ 0xC0C8C8C0, 0xC8C2C7CA, 0xC7CAC0C8, 0xC2C7C8C2,
+ 0xC8C2C7C8, 0xC8C8C0C8, 0xBEC8C8C0, 0xC8C0C8C8,
+ 0xC6C9C0C8, 0xC2C7C8C1, 0xC1BDC4C1, 0xC2C0BEC3,
+ 0xBEC3C1BD, 0xC7C2C8C7, 0xC7C8C2C8, 0xC2C8C7C2,
+ 0xC1C0C7C2, 0xC7C2C0C8, 0xC0C7C2C0, 0xC1C0C7C2,
+ 0xC8C1C0C8, 0xC1C8C1C0, 0xBFBEC4BF, 0xC4BFC0C4,
+ 0xBEC4BFC0, 0xBFBFC5C0, 0xC4BFC0C4, 0xC0C4BFC0,
+ 0xBFBEC4BF, 0xC4BFBEC4, 0xC0C3C1C0, 0xBFBEC1BF,
+ 0xC0C0BEC1, 0xBEC1BFBE, 0xBABEBFBB, 0xC0BABEC0,
+ 0xC0C0BAC0, 0xB9C0C1B8, 0xC1B8BFC2, 0xBDC0B7BE,
+ 0x3EC8CBC2, 0x01004244, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010002, 0x01020301, 0x03000203,
+ 0x60605A02, 0x7056564A, 0x7F737E7E, 0x7D7E747D,
+ 0x1C606158, 0x02002222, 0x00010002, 0x00000100,
+ 0x01000001, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x01000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000000, 0x01000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000100, 0x01000001, 0x01020000,
+ 0x2E181C17, 0x352F3034, 0x4B4F4931, 0x76747A75,
+ 0xB7B1757B, 0xB1B8B1B3, 0xA9AAB1AA, 0xB0A9A9B0,
+ 0xA8B0A9A8, 0xB0AAB4AE, 0xB3B0A8B3, 0xAAB3B0A8,
+ 0xBAB5BCB9, 0xBBB9B7BC, 0xB5BBB6B6, 0xB9B8BFB8,
+ 0xC0B9B9C0, 0xB8BFBAB8, 0xC0B7BFBE, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB8C0BF, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFBABFC0, 0xBFC0B8C0, 0xBAC0BFBA, 0xC0BABFC0,
+ 0xBFC0BABF, 0xB8C0C0BA, 0xC0BABFC0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xBABFC0B8,
+ 0xBFBEC3C1, 0xC3C1C0C4, 0xC0C3C1C0, 0xBFBEC1BF,
+ 0xC0C0BEC1, 0xBEC0C0C0, 0xBFC0C3C1, 0xC4BFC0C4,
+ 0xC0C4BFC0, 0xBFC0C4BF, 0xC3C1C0C4, 0xC0C3C1C0,
+ 0xBFC0C4BF, 0xC4BFC0C4, 0xC1C5C0C0, 0xBFC0C4BF,
+ 0xC4BFC0C4, 0xC0C4BFC0, 0xBEC0C4BF, 0xC4BFC0C4,
+ 0xC0C4BFC0, 0xBFC0C4BF, 0xC4BFC0C4, 0xC0C4BFC0,
+ 0xBFC0C4BF, 0xC3C1C0C4, 0xC0C3C1C0, 0xBFC0C4BF,
+ 0xC3C1C0C4, 0xC0C3C1C0, 0xBFC0C4BF, 0xC4BFC0C4,
+ 0xBEC4BFC0, 0xC1C0C7C2, 0xC8C1C0C8, 0xC0C7C2C0,
+ 0xBFBFC5C0, 0xC4BFC0C4, 0xBEC5BEC0, 0xC1C0C7C2,
+ 0xC8C1C0C8, 0xC1C8C1C0, 0xBFBEC4BF, 0xC3BFC0C4,
+ 0xC0C4BFC2, 0xBFBEC4BF, 0xC4BFBEC4, 0xC0C4BFC0,
+ 0xC1BEC3C1, 0xC4BFBEC3, 0xC0C4BFC0, 0xBFC0C4BF,
+ 0xC4BFC0C4, 0xC0C4BEC0, 0xBEC0C4BF, 0xC4BFC0C4,
+ 0xC0C4BFC0, 0xBFC0C4BF, 0xC4BFC0C4, 0xC0C4BFC0,
+ 0xBFC0C4BF, 0xC4BFC0C4, 0xC0C4BFC0, 0xBFC0C4BF,
+ 0xC4BFC0C4, 0xC0C4BFC0, 0xBFC0C4BF, 0xC4BFC0C4,
+ 0xC0C4BFC0, 0xBFC0C4BF, 0xC3C1C0C4, 0xC0C4BFC0,
+ 0xBEC0C4BF, 0xC4BFC0C4, 0xC0C4BFC0, 0xBEC0C4BE,
+ 0xC4BFC0C4, 0xC0C4BFC0, 0xBEBEC5BE, 0xC4BFBEC5,
+ 0xC0C4BFC0, 0xC1C3C7C2, 0xC7C2C0C6, 0x7F8580C3,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000301, 0x03010105,
+ 0x00020000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x02000002, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000002, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000100, 0x00000001, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010402, 0x04000003,
+ 0x00030100, 0x00000000, 0x01000000, 0x898A8800,
+ 0xBAC2C3BF, 0xBBB7BDBE, 0xBCBDB9BA, 0xB9B8BBB9,
+ 0xBFBDB8BB, 0xBABDBBBC, 0xBCBBBEBC, 0xBFBABBBE,
+ 0xB8BCB7BB, 0xBABBBFBA, 0xBFB9BBBF, 0xBBBFB9BB,
+ 0xBBBBBFBA, 0xBFBABCC0, 0xBBBFBABB, 0xBCB9BFBA,
+ 0xC0BEBBC1, 0xBBC0BEBB, 0xBCBBC1BC, 0xC1BCBBC1,
+ 0xBBC1BCBB, 0xBCBBC0BE, 0xC1BCBBC1, 0xBBC1BCBB,
+ 0xBDB9C0BD, 0xC0BFB9C0, 0xB8C0BFB8, 0xC1B9C1C1,
+ 0xC1C0B9C1, 0xBBC1C0BB, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xBBC1C0BB, 0xC0BCC0C1, 0xC0C1BBC1, 0xBBC1C0BC,
+ 0xC0BBC1C0, 0xC1C0B9C1, 0xB9C1C0B9, 0xC1BAC2C1,
+ 0xBFC2B9C1, 0xB9C1C1B8, 0xBFB8C0BF, 0xBEBDBAC0,
+ 0xBABFBEB9, 0xBEBAC1BE, 0xC0BFBAC1, 0xBBC0BEBA,
+ 0xBCBBC1BC, 0xC1BEBBC1, 0xBAC1BCBA, 0xBBB9BFBA,
+ 0xC2BBBAC0, 0xBBC2BBBB, 0xBBBAC0BB, 0xBFBDBCC0,
+ 0xBCBFBDBC, 0xBDBAC1BE, 0xBBB9B9C0, 0xBABDBBB8,
+ 0xBAB7BCBA, 0xBCBAB7BC, 0xB8BBB9B9, 0xB5B5B8B6,
+ 0xBAB8B4BA, 0xB6BCB7B5, 0xB4B8BCB6, 0xB8B2B6BA,
+ 0xB4B8B2B4, 0xB3B5B9B3, 0xB6B0B5B9, 0xB7BBB5B2,
+ 0x3EC0C4BE, 0x03014044, 0x00020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x06060507, 0x06050806,
+ 0x4F4F4908, 0x6B5E5D53, 0x85767777, 0x81867780,
+ 0x78878779, 0x71658686, 0x42433971, 0x00030400,
+ 0x03000505, 0x02030102, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00030101,
+ 0x01010200, 0x00000001, 0x06060606, 0x06060606,
+ 0x3B3E3C04, 0x2C2E322D, 0x827C2E32, 0x80837A80,
+ 0xA9979B90, 0xB5AAB0B4, 0xAEB4A9B1, 0xADAEB6AC,
+ 0xADA3AFB7, 0xA5ADA3A5, 0x9FA1A99F, 0xADA6A0A9,
+ 0xA4ACA5A5, 0xA7A3AEA6, 0xADA7A3AD, 0xA3ACA9A3,
+ 0xB6ACB3B0, 0xB8B7AFB7, 0xB0B8B7B0, 0xB4B3B9B4,
+ 0xB9B4B3B9, 0xB3B9B4B3, 0xB8B3B9B8, 0xB8B9B3B9,
+ 0xB4B9BAB3, 0xB7B4BAB9, 0xB9B8B2B8, 0xB4BAB9B3,
+ 0xB8B5BAB9, 0xBAB9B4BB, 0xB5BAB8B5, 0xB9B6BBBA,
+ 0xB9B8B5BA, 0xB4BAB9B4, 0xBBB6BBBA, 0xBCBBB6BC,
+ 0xB6BCBBB6, 0xBBB6BCBB, 0xBCBBB6BC, 0xB6BCBBB6,
+ 0xBAB7BCBA, 0xBCBBB7BC, 0xB7BCBBB7, 0xBBB7BCBB,
+ 0xBBBBB7BC, 0xB8BDBCB9, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xBABFBDB8, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBAC0BBBA, 0xBCBBC1BC, 0xC0BEBBC1,
+ 0xBBC0BEBB, 0xBCBBC1BC, 0xC0BEBBC1, 0xBBC0BEBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBCBAC1BE, 0xC1BCBAC1, 0xBBC2BDBA,
+ 0xBDBBC0BE, 0xBFBDBABF, 0xBAC0BBBA, 0xBCBAC1BE,
+ 0xC1BCBAC1, 0xBBC1BCBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBDC0BEBD, 0xBEBBC0BE, 0xC0BEBBC0, 0xBDC0BEBD,
+ 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA, 0xBBBAC0BB,
+ 0xC1BCBAC0, 0xBBC1BCBB, 0xBCBBC0BE, 0xC0BEBBC1,
+ 0xBABFBDBB, 0xBCBDC0BE, 0xBFBDBBBE, 0xBDC0BEBC,
+ 0xBEBDC0BE, 0xBFBDBDC0, 0xBCBFBDBC, 0xBBBCC0BB,
+ 0xC0BBBCC0, 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA,
+ 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA, 0xB9B9C0B9,
+ 0xBFBAB9C0, 0xBBBFBABB, 0xBABBBFBA, 0xBEBABBBF,
+ 0xBDBEBABD, 0xC0C0C1BF, 0xC1BFBFC2, 0x888B89C0,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000301, 0x04000004,
+ 0x00040000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x01020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000001, 0x00010000, 0x00000100, 0x00000001,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x01000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010402, 0x04000003,
+ 0x00040000, 0x00000000, 0x02000000, 0x88898701,
+ 0xB7C3C4C0, 0xBBB7BABB, 0xB8BCB7BA, 0xBCBABDBB,
+ 0xBCBABBBE, 0xBDC0BEB9, 0xBDBBBEBC, 0xC0BCBCBF,
+ 0xBDBEBABF, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBBBDC1BC, 0xBFBABCC0, 0xBBBFBABB, 0xBCBAC0BB,
+ 0xC0BEBBC1, 0xBABFBDBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC1BCBBC0, 0xBBC0BEBB,
+ 0xBEB9C0BD, 0xC1C1B9BF, 0xB8C0C0B9, 0xC0B8C0C0,
+ 0xC1C0B8C0, 0xBBC1C0BB, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xBCC1C0BC, 0xC0BCC1C0, 0xC1C0BCC1, 0xBCC1C0BC,
+ 0xBFBAC0BF, 0xC0BFB8C0, 0xB9C1C0B8, 0xC0B9C1C0,
+ 0xC0C0B9C1, 0xB9C1C1B8, 0xBFB8C0C0, 0xBEBFB8C0,
+ 0xBBC0BFBA, 0xBCBAC1BE, 0xC1BFBAC1, 0xBBC0BEBC,
+ 0xBCBBC1BC, 0xC0BEBBC1, 0xB9C0BDBB, 0xBCB9BFBA,
+ 0xC1BBBBC1, 0xBDC1BBBD, 0xBCBBC1BC, 0xC0BEBBC1,
+ 0xBDC0BEBD, 0xBEBAC0BF, 0xBAB9B9BF, 0xBABDBBB5,
+ 0xBAB8BDBB, 0xBCBAB7BC, 0xB8BBB9B9, 0xB7B4BAB5,
+ 0xBCB7B6BC, 0xB6BCB7B6, 0xB6B7BEB7, 0xB7B1B6BD,
+ 0xB3BAB3B3, 0xB3B3BAB3, 0xBAB3B3BA, 0xB4BBB4B3,
+ 0x3FC0C4BE, 0x03014044, 0x00030100, 0x00000000,
+ 0x00000000, 0x00000000, 0x06080409, 0x06050704,
+ 0x51514B08, 0x6A5E5C52, 0x83777676, 0x8085767F,
+ 0x78888979, 0x88788888, 0x86867887, 0x2587877B,
+ 0x30272E2F, 0x0204002F, 0x00020100, 0x02000001,
+ 0x00010001, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000100, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00010200, 0x01000001, 0x00010000, 0x00020000,
+ 0x3A390200, 0x3A3B393C, 0x753D3E3C, 0x76747477,
+ 0xACB0AB73, 0xA1A6ABA2, 0xADA2A6AC, 0xA7AB9FA9,
+ 0xA0B0B4A8, 0xACA0A8AC, 0xA6ADA0A8, 0xA2A5ADA2,
+ 0xADA2A5AD, 0xA5ADA3A5, 0xA4A5AEA4, 0xACA5A5AE,
+ 0xA5ADA6A4, 0xA6A2ADA5, 0xABA6A3AE, 0xA3AAA5A4,
+ 0xB7ABB2AF, 0xB7B7B0B8, 0xB0B8B7AD, 0xB4B2B9B6,
+ 0xB9B4B3B9, 0xB3B8B6B3, 0xB9B4B9B8, 0xB9B8B5BA,
+ 0xB5BAB9B4, 0xB7B4BAB9, 0xBAB8B3BA, 0xB6BBB9B5,
+ 0xB8B6BBB9, 0xBAB8B5BA, 0xB5BAB8B5, 0xB8B8BBB9,
+ 0xB8B6B7BA, 0xB5BAB8B3, 0xB9B6BBB9, 0xBCBBB6BB,
+ 0xB6BCBBB6, 0xBAB6BDBA, 0xBCBBB6BD, 0xB6BCBBB6,
+ 0xBAB7BCBA, 0xBCBBB7BC, 0xB7BCBBB7, 0xBBB7BCBB,
+ 0xBCBBB7BC, 0xB6BBBAB7, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xBABFBDB8, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBCBBC0BE, 0xC0BEBBC1,
+ 0xBBC0BEBB, 0xBCBBC1BC, 0xC0BEBBC1, 0xBBC0BEBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC1BEBAC1, 0xBAC1BEBA,
+ 0xBFBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBDC0BEBD, 0xBEBBC0BE, 0xC0BEBBC0, 0xBDC0BEBD,
+ 0xBBBCC0BB, 0xC0BBBAC0, 0xBAC0BBBA, 0xBCBAC0BB,
+ 0xC0BEBBC1, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBCBDC0BE, 0xBEBCBBBE, 0xBEC1BFBB,
+ 0xBEBDC0BE, 0xC0BEBDC0, 0xBCBFBDBD, 0xBBBCC0BB,
+ 0xC0BBBCC0, 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA,
+ 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA, 0xB9B9C0B9,
+ 0xBFBAB9C0, 0xBBBFBABB, 0xBABBBFBA, 0xBEBABBBF,
+ 0xBDBEBABD, 0xBFC1C2C0, 0xC1BFC0C1, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x85434644, 0x8883868A,
+ 0x85898484, 0x83808584, 0x84857F84, 0x7F848380,
+ 0x847F8584, 0x85847F85, 0x80858480, 0x857F8485,
+ 0x84857F84, 0x80848580, 0x847F8584, 0x85847F85,
+ 0x80858480, 0x847F8584, 0x85847F85, 0x7F85847F,
+ 0x837F8683, 0x85847F86, 0x82848480, 0x85858585,
+ 0x85858585, 0x85858585, 0x86858886, 0x88868588,
+ 0x85888685, 0x85838585, 0x85858385, 0x85858585,
+ 0x85878585, 0x84868785, 0x83858685, 0x84828484,
+ 0x85848085, 0x80858480, 0x85838585, 0x85858585,
+ 0x85858585, 0x85858585, 0x85858585, 0x83858585,
+ 0x86858886, 0x88868588, 0x85888685, 0x84858886,
+ 0x88868589, 0x85888685, 0x84858886, 0x88868589,
+ 0x85888685, 0x84858886, 0x88868589, 0x85888685,
+ 0x85828785, 0x88858188, 0x81888581, 0x86818786,
+ 0x87867F87, 0x81878681, 0x85818885, 0x87868188,
+ 0x81878681, 0x847F8584, 0x84857F85, 0x80848580,
+ 0x847F8584, 0x85847F85, 0x80858480, 0x817E8381,
+ 0x83817E83, 0x80838180, 0x7F80847F, 0x83818084,
+ 0x80838180, 0x7F808381, 0x83818084, 0x80838180,
+ 0x7F808381, 0x83818084, 0x80847F80, 0x81808381,
+ 0x83818083, 0x80838180, 0x7B7C807B, 0x807B7A80,
+ 0x7C7F7D7C, 0x00353535, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x44222523, 0x03004346,
+ 0x00040000, 0x01000000, 0x00000101, 0x88898700,
+ 0xB7C0C4BF, 0xBCB7B8BC, 0xBBBFBAB8, 0xBBBBBEBC,
+ 0xBDBBB8BD, 0xBABDBBBA, 0xBCBABDBB, 0xBFBDBBBE,
+ 0xBDBEBCBE, 0xBCBBBEBC, 0xBEBCBBBE, 0xBBBFBAB9,
+ 0xBABDC1BC, 0xBFBABDBE, 0xBDC1BCBB, 0xBEBBC0BE,
+ 0xC2BFBBC0, 0xBAC1BEBB, 0xBFBAC0BF, 0xC0BEBAC0,
+ 0xBBC0BEBB, 0xBEBAC1BE, 0xC1BEBAC1, 0xBAC1BEBA,
+ 0xBBB8BDBB, 0xC0BFB7BE, 0xB7BFBEB8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBBC0C1BA, 0xC0BCC0C1, 0xC1C0BCC1,
+ 0xBCC1C0BC, 0xBFBCC1BF, 0xC1BFBCC1, 0xBCC1BFBC,
+ 0xC0BCC1C0, 0xBFC0BBC1, 0xBBC0C1BA, 0xBFB9C1C0,
+ 0xC0BFB8C0, 0xB9C1C1B8, 0xC0B8C0C0, 0xBFBEB8C0,
+ 0xBBC0BFBA, 0xBCBBC0BE, 0xC0BEBBC1, 0xBDC0BEBD,
+ 0xBCBDC1BC, 0xC0BEBBC1, 0xBBC0BEBB, 0xBCBBBFBA,
+ 0xC1BBBDC1, 0xBCC0BABF, 0xBBBBC2BB, 0xC0BEBAC0,
+ 0xBCBFBDBD, 0xBDB9BFBE, 0xBBB9B8BE, 0xBABDBBB6,
+ 0xB7B7BCBA, 0xBBB9B6BC, 0xB8BBB9B8, 0xB6B3B9B4,
+ 0xBCB5B6BD, 0xB4BBB4B5, 0xB5B5BCB5, 0xB8B1B5BC,
+ 0xB5BCB5B1, 0xB1B6BDB6, 0xB8B1B0B8, 0xB1B8B1B0,
+ 0x3FC0C4BF, 0x03014044, 0x00030100, 0x1D000100,
+ 0x3D3B1C1F, 0x3C3C3C3A, 0x0A080409, 0x05050B05,
+ 0x504F4B07, 0x5F5E5C52, 0x85796B6B, 0x82847883,
+ 0x78868777, 0x88788888, 0x88887888, 0x79888878,
+ 0x887C8787, 0x5A5B5188, 0x00302E26, 0x02000303,
+ 0x02010002, 0x00000100, 0x01000001, 0x01020000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000200, 0x01000102, 0x00010000,
+ 0x32000200, 0x3A34383B, 0x70726C38, 0x6E76776E,
+ 0xB0AA7677, 0xAEB0AAB0, 0xAAABAFAA, 0xAFAAA9AF,
+ 0xA9B0A9A9, 0xA1A6ABA2, 0xABA1A8AC, 0xA8ACA0AA,
+ 0xA1A8ACA0, 0xABA0A6AC, 0xA6ACA1A5, 0xA3A5ADA3,
+ 0xADA3A5AD, 0xA1A8A1A5, 0xA5A5ADA6, 0xACA7A2AD,
+ 0xA6ADA8A5, 0xA5A4ACA5, 0xAEA7A4AC, 0xA5ACA7A7,
+ 0xB8A4ABA8, 0xB8B8B1B9, 0xB0B8B7AE, 0xB4B2B9B6,
+ 0xB9B4B3B9, 0xB3B8B6B3, 0xB9B4B9B8, 0xB9B8B5BA,
+ 0xB4B9B7B4, 0xB7B4BBB6, 0xBBB9B5BC, 0xB6BBB9B6,
+ 0xB8B6BBB9, 0xBAB8B5BA, 0xB5BAB8B5, 0xB8B6BBB9,
+ 0xBAB9B5BA, 0xB5BAB9B5, 0xBAB7BCBA, 0xBCBBB7BC,
+ 0xB6BCBBB6, 0xBBB6BCBB, 0xBCBBB6BC, 0xB6BCBBB6,
+ 0xBBB7BCBB, 0xBCBBB7BC, 0xB7BCBBB7, 0xBBB7BCBB,
+ 0xBCBBB7BC, 0xB7BCBBB7, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBDB8BDBB, 0xBFBEBABF, 0xB9BFBEB9, 0xBDBABFBD,
+ 0xBFBEBABF, 0xB9C0BDB9, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBAC1BE, 0xC1BCBAC1, 0xBBC1BCBB, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBEBBC0BE, 0xBFBDBBC0,
+ 0xBBC0BEBC, 0xBEBBC0BF, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBCBBC1BC,
+ 0xC0BEBBC1, 0xBBC0BEBB, 0xBCBAC1BC, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC1BCBBC0, 0xBDC1BCBB,
+ 0xBCBDC1BC, 0xC1BCBDC1, 0xBDC1BCBD, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBAC1BE, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBBBDC1BC, 0xBEB9BCC0, 0xBDC1BCBA,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBDBBC0BE,
+ 0xC0BBBABF, 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA,
+ 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA, 0xBAB9BFBA,
+ 0xBFBAB9BF, 0xBBBFBABB, 0xBBBBBFBA, 0xBEBABCC0,
+ 0xBDBEBABD, 0xC0C0C1BF, 0xC0C0C0C0, 0x8C8A8AC2,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000002, 0xC9424543, 0xCBC9C6CB,
+ 0xC6CBC9C6, 0xC7C2C8C7, 0xC8C7C2C8, 0xC2C8C7C2,
+ 0xC7C2C8C7, 0xC8C7C0C8, 0xC2C8C7C2, 0xC8C2C7C8,
+ 0xC7C8C0C8, 0xC2C8C7C2, 0xC7C2C8C7, 0xC8C7C0C8,
+ 0xC2C8C7C2, 0xC7C2C8C7, 0xC8C7C0C8, 0xC0C8C7C0,
+ 0xC7C0C8C7, 0xC8C7C2C8, 0xC3C8C7C2, 0xC8C6C8C8,
+ 0xC8C8C6C8, 0xC6C8C8C6, 0xC9C8CACA, 0xCACAC8CB,
+ 0xC8CACAC8, 0xC8C6C8C8, 0xC8C8C6C8, 0xC6C8C8C6,
+ 0xC8C8C8C8, 0xC8C9C8C8, 0xC6C8C9C6, 0xC7C3C8C7,
+ 0xC8C7C2C8, 0xC2C8C7C2, 0xC8C6C8C8, 0xC8C8C6C8,
+ 0xC6C8C8C8, 0xC8C6C8C8, 0xC8C8C6C8, 0xC6C8C8C6,
+ 0xC9C8CBC9, 0xCBC9C8CB, 0xC8CBC9C8, 0xC7C8CCC7,
+ 0xCBC9C6CC, 0xC6CBC9C8, 0xC9C8CBC9, 0xCBC9C6CB,
+ 0xC6CBC9C6, 0xC9C6CBC9, 0xCBC9C6CB, 0xC6CBC9C6,
+ 0xC8C4CBC8, 0xCBC8C2CB, 0xC2CBC8C2, 0xC9C2CAC9,
+ 0xCAC9C2CA, 0xC2CAC9C2, 0xC8C2CBC8, 0xCAC9C2CB,
+ 0xC2CAC9C2, 0xC7C0C8C7, 0xC7C8C0C8, 0xC2C8C7C2,
+ 0xC7C2C8C7, 0xC8C7C2C8, 0xC2C9C6C2, 0xBFBEC3C1,
+ 0xC3C1BEC4, 0xBFC5C0BE, 0xBFC0C4BF, 0xC4BFC0C4,
+ 0xC0C3C1C0, 0xBFBEC4BF, 0xC3C1BEC4, 0xBEC3C1BE,
+ 0xBFC0C4BF, 0xC4BFC0C4, 0xC0C4BFC0, 0xBFC0C4BF,
+ 0xC3C1C0C4, 0xC0C4BFC0, 0xB9B9BFBA, 0xC0BAB9C0,
+ 0xBBBFBABC, 0x9F9EA19F, 0x6C6A9EA1, 0x34373569,
+ 0x00070806, 0x00000102, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x68444745, 0x4843676A,
+ 0x00030044, 0x00010101, 0x00000000, 0x88898700,
+ 0xB7C0C3C1, 0xBCB7B8BC, 0xBBBFBAB8, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xBABDBBBA, 0xBCBDC0BE, 0xBEBCBBBE,
+ 0xBBBEBCBD, 0xBCBBBEBC, 0xBEBCB9BE, 0xB9BEBCB9,
+ 0xBBBABDBB, 0xC0BBBCC0, 0xBBBEBCBC, 0xBEBBC0BE,
+ 0xC1BEBBC0, 0xBAC1BEBA, 0xBFBAC0BF, 0xC0BEBAC0,
+ 0xBAC1BEBB, 0xBEBAC1BE, 0xC1BEBAC1, 0xBAC1BEBA,
+ 0xBBB8BDBB, 0xC1C0B7BE, 0xB8C0BFBB, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xC1BCC0C1, 0xC1C0BCC0,
+ 0xBCC1C0BC, 0xBFBCC1BF, 0xC1BFBCC1, 0xBCC1BFBC,
+ 0xC0BCC1C0, 0xBFC0BBC1, 0xBABFC0BA, 0xBEB9C1C0,
+ 0xC0BFB8C1, 0xBAC2C1B8, 0xC0B8C0C0, 0xBEBDBABF,
+ 0xBABFBDB9, 0xBEBBC0BE, 0xC0BEBBC0, 0xBEC1BFBB,
+ 0xBEBDC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBCB8BDBB,
+ 0xBFBABBBE, 0xBBBFBABB, 0xBBBCC2BD, 0xC0BEBAC0,
+ 0xBABFBEBB, 0xBDBBC0BF, 0xBDBBBABF, 0xB8BBB9BA,
+ 0xB8B8BEB9, 0xBCBAB7BD, 0xB8BCB7B9, 0xB6B3BAB3,
+ 0xBCB5B6BD, 0xB5BCB5B5, 0xB3B5BCB5, 0xBAB3B3BA,
+ 0xB4BBB4B3, 0xB1B2BAB3, 0xB8B1B0B8, 0xB0B7B0B0,
+ 0x3FBFC5C0, 0x03014044, 0x00020000, 0x39000100,
+ 0x5B593A3E, 0x5A5A5A58, 0x09080409, 0x07070A04,
+ 0x524F4B09, 0x6A5F5D53, 0x84787775, 0x84847884,
+ 0x7889887A, 0x89798888, 0x88887889, 0x78888878,
+ 0x86788888, 0x87877B87, 0x7C88867B, 0x5A528786,
+ 0x2E2E285C, 0x000D0C08, 0x01000001, 0x00010002,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x02000002, 0x00000100, 0x01000001,
+ 0x2A2B2900, 0x51282B29, 0x807C5256, 0x80807A7F,
+ 0xA1A8ABA2, 0xACA1A8AC, 0xA7ABA0A8, 0xA7B0B1A7,
+ 0xB1A7B0B1, 0xAEB1A8B0, 0xA7ABB0A7, 0xB1A7A9B1,
+ 0xA9B1A7A9, 0xA0A6ACA1, 0xACA0A8AC, 0xA8ACA0A8,
+ 0xA0A6ACA1, 0xACA1A5AB, 0xA6ACA1A6, 0xA2A7ADA2,
+ 0xACA3A4AC, 0xA0A89EA7, 0xA9A5ADA6, 0xACA7A6B1,
+ 0xA5ACA7A5, 0xA6A5ADA6, 0xADA6A5AD, 0xA6ADA8A5,
+ 0xB79DA4A1, 0xB8B7B0B8, 0xB0B8B7B0, 0xB4B3BAB7,
+ 0xB9B4B3B9, 0xB3B8B6B3, 0xB7B4B9B8, 0xB7B5B3B8,
+ 0xB5BBB6B2, 0xB6B5BCB7, 0xBBB6B4BB, 0xB5BAB8B5,
+ 0xB6B5BAB8, 0xBAB8B3B8, 0xB6BBB9B5, 0xB9B6BBB9,
+ 0xBBBAB6BB, 0xB4B9B8B6, 0xB9B6BBB9, 0xBCBBB6BB,
+ 0xB6BCBBB6, 0xBBB6BCBB, 0xBCBBB6BC, 0xB6BCBBB6,
+ 0xBBB7BCBB, 0xBCBBB7BC, 0xB7BCBBB7, 0xBBB7BCBB,
+ 0xBCBBB7BC, 0xB7BCBBB7, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBDB8BDBB, 0xBFBEBABF, 0xB9BFBEB9, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBAC0BFB9, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBAC1BE, 0xC1BCBAC1, 0xBBC1BCBB, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBD, 0xBFBBC0BF, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BFBBC0, 0xBBC0BEBB, 0xBCBAC1BC, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBCBDC1BC, 0xC1BCBDC1, 0xBDC1BCBD, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBAC1BE, 0xC1BFBAC1,
+ 0xBBC0BEBC, 0xBCBDC1BC, 0xBDB7BDC1, 0xBDC1BCB9,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BBBBC0, 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA,
+ 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA, 0xBAB9BFBA,
+ 0xBFBAB9BF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBDBEBABB, 0xC0C0C0C0, 0xC1C1C0C0, 0x898989C1,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF585E5D, 0xC0BFB8C0,
+ 0xBAC0BFBA, 0xBEB9BFBE, 0xBDBCB9BF, 0xB7BEBBB8,
+ 0xBDB9C0BD, 0xC0BFB9C0, 0xB9BFBEBB, 0xBEB9BFBE,
+ 0xBCBBB9BF, 0xB7BDBCB7, 0xBBB7BDBC, 0xBCBAB7BE,
+ 0xB7BEBBB7, 0xBBB7BEBB, 0xC0BDB7BE, 0xB9BFBEB9,
+ 0xBFB9BFBE, 0xBEBFB9BE, 0xBABFC0B9, 0xC0BBBFC0,
+ 0xBFBEBBBF, 0xBCBEBEBA, 0xBFBDBFBF, 0xBFC0BDBF,
+ 0xBDBFC0BD, 0xC0BBBFC0, 0xBFC0BBBF, 0xBBBFC0BB,
+ 0xBFB9BEBD, 0xBFC0BBC0, 0xBBBFC0BB, 0xBEBAC0BF,
+ 0xBFBEB9BF, 0xB9BFBEB7, 0xBEBABFBE, 0xBEBEBABF,
+ 0xBABFBEBC, 0xBDB9BEBF, 0xBFBEB7BC, 0xBBC0BFB9,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBDBABFBD,
+ 0xBFBEB9C0, 0xB9BFBEBA, 0xBFBCC1C0, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xC0BAC0BF, 0xBFBEBBC1, 0xBAC0BFB9,
+ 0xC0BAC0BF, 0xC1BEBBC1, 0xBAC1BEBA, 0xC1BAC0BF,
+ 0xC1C0BCC2, 0xBAC0BFBB, 0xBEBAC1BE, 0xC1BEBAC1,
+ 0xBAC0BFBA, 0xBFB8C0BF, 0xBFBEB7BF, 0xB9BFBEB9,
+ 0xBBB7BDBC, 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBEB9B8BD, 0xB6BCB7B8, 0xB8B8BEB9, 0xBCB7B7BD,
+ 0xB8BCB7B8, 0xB7B8BCB7, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB5B5B9B4, 0xB9B4B6BA, 0xB3B9B4B3, 0xB2B5B9B4,
+ 0xB7B5B3B7, 0xB4B8B3B6, 0xB2B2B8B3, 0xB4ADB2B9,
+ 0xA9B0A9AD, 0xB2AAB1AA, 0xB8B1B1B7, 0xB1B8B1B1,
+ 0x41787C77, 0x110F4246, 0x0E110F0E, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000001,
+ 0x00000000, 0x00010101, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x593E413F, 0x5C57565B,
+ 0x3E423D58, 0x06050505, 0x06060806, 0x87888608,
+ 0xB7BDC0BE, 0xBFBAB8BC, 0xB8BCB7BB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBBB5BAB8, 0xBEBDB7BE, 0xBABFBDB8,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBEBA, 0xBEBBC0BF,
+ 0xC0BEBABF, 0xBBC0BEBB, 0xBEBBC0BE, 0xC1BEBBC0,
+ 0xBAC1BEBA, 0xBFBAC0BF, 0xC0BFB8C0, 0xB8C0BFB8,
+ 0xBEB7BDBC, 0xBFC0B9BF, 0xB8C0C0BA, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xC1BBC1C0, 0xC1C0BCC2,
+ 0xBCC1C0BC, 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB,
+ 0xBFBBC1C0, 0xBFC0BAC0, 0xB8C0C0BA, 0xBFB9C1C0,
+ 0xC1C0B8C0, 0xBAC0BFBB, 0xC0BABFC0, 0xBFBEBABF,
+ 0xBABFBDBA, 0xBEBAC1BE, 0xBFBEB9BF, 0xBBC0BFB9,
+ 0xBEBABFBE, 0xC0BFBABF, 0xB9BFBEBA, 0xBFB7BDBC,
+ 0xBFBEBBC0, 0xB8BDBCBA, 0xBBB7BEBB, 0xBFBEB7BE,
+ 0xB9BFBEB9, 0xBABABCBC, 0xBDBBB9BC, 0xB7BBB6BA,
+ 0xB7B7BBB6, 0xBBB7B8BC, 0xB7BBB6BA, 0xB0B3BAB3,
+ 0xB9B3B2BA, 0xB7BBB5B5, 0xB1B5BCB5, 0xBAB3B1B8,
+ 0xB5BCB5B3, 0xB3B4BCB5, 0xB8B1B2BA, 0xB3BAB3B1,
+ 0x42B9BFBA, 0x06064144, 0x06060606, 0x52363733,
+ 0x57535658, 0x4B4C4A56, 0x09080507, 0x05060804,
+ 0x504D490A, 0x6158564B, 0x7B70706F, 0x7E7C717D,
+ 0x74828173, 0x83758484, 0x84837584, 0x78888577,
+ 0x84798986, 0x86847988, 0x808B877C, 0x8E838D8B,
+ 0x8C8B8190, 0x3485837B, 0x18133C3D, 0x1A1A141B,
+ 0x00020400, 0x03000305, 0x02030002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x02000002, 0x00020000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x07080907,
+ 0x34330809, 0x36353136, 0x75787975, 0x79737879,
+ 0xA0A29C79, 0xAAA7ABA5, 0xB0AAACB0, 0xAEB1A8AE,
+ 0x9DA8ACA1, 0xA89CA5A9, 0xA5A99DA4, 0x9EA5A99D,
+ 0xA99DA6AA, 0xA5A99DA5, 0x9EA5A99E, 0xA99EA3A9,
+ 0xA3AA9DA3, 0x9DA4AB9E, 0xAB9CA5AC, 0xA4AB9EA4,
+ 0xA1A4ACA1, 0xABA0A4AC, 0xA2A89DA3, 0xA0A6ACA1,
+ 0xABA0A5AB, 0xA2A89DA7, 0xA6A5AEA4, 0xADA6A5AD,
+ 0xA5ADA6A5, 0xA5A9B1AA, 0xADA6A4AC, 0xA5ADA6A5,
+ 0xB8A0A7A2, 0xBBB8B2BB, 0xB2BBB8B2, 0xB5B1B8B3,
+ 0xB9B4B4BA, 0xB4BAB5B3, 0xB4B6BBB9, 0xBCB7B1B6,
+ 0xB6BCB7B6, 0xB7B3B9B4, 0xBBB6B6BC, 0xB6BCB7B7,
+ 0xB7B7BCBA, 0xB9B7B3BA, 0xB6BBB9B4, 0xB9B5BCB9,
+ 0xBBBAB5BC, 0xB6BBBAB6, 0xB9B5BCB9, 0xBBBAB5BC,
+ 0xB5BBBAB5, 0xBAB6BCBB, 0xBCBBB5BB, 0xB6BCBBB6,
+ 0xBBB7BCBB, 0xBBBCB7BC, 0xB7BBBCB7, 0xBBB7BCBB,
+ 0xBCBBB7BC, 0xB7BCBBB7, 0xBBB8BDBB, 0xBCBAB8BD,
+ 0xB8BDBBB7, 0xBBB7BCBA, 0xBEBDB8BD, 0xB9BFBEB8,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBCC1BFBA, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBBC0BE, 0xC1BCBBC0, 0xBBC1BCBB, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBFBBC0BF, 0xC1C0BAC0, 0xBBC1C0BB,
+ 0xBEBBC2BF, 0xC0BFBAC1, 0xBBC0BFBB, 0xBFBAC0BF,
+ 0xBFC0BAC0, 0xBAC0BFBA, 0xBCBBC0BE, 0xC0BEBBC1,
+ 0xBBC0BEBB, 0xBEBAC0BF, 0xBFBEB9BF, 0xBABFBEBA,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBBBDC1BC, 0xBCB7BCC0, 0xBABEB9B8,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xB9BFBABA, 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA,
+ 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA, 0xBABAC1BA,
+ 0xC0BBBAC1, 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBCC0BBBA, 0xC0BEC0C0, 0xC1BFBEC0, 0x888B89BE,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0565E5E, 0xC0C0B6C0,
+ 0xB8C0C0B8, 0xBEB7BDBC, 0xBDBBB9BF, 0xB8BDBBB8,
+ 0xBBB7BEBB, 0xBDBCB7BE, 0xB6BCBBB8, 0xBDB7BDBC,
+ 0xBDBCB8BE, 0xB8BDBCB8, 0xBDB9C0BD, 0xBEBCB9C0,
+ 0xB9BEBCB9, 0xBDB9C0BD, 0xC0BDB9C0, 0xB8BEBDB9,
+ 0xBEBAC0BF, 0xBEBFB8BD, 0xBABFC0B9, 0xC0BABFC0,
+ 0xBFBEBABF, 0xBABFBEB9, 0xC0BBBFC0, 0xBFC0BDBF,
+ 0xBDBFC0BD, 0xC0BBBFC0, 0xBFC0BBBF, 0xBABFC0BA,
+ 0xBFB9BFBE, 0xBEBFBAC0, 0xBABFC0B9, 0xBEB9BFBE,
+ 0xC0BFB9BF, 0xB8C0BFB8, 0xBFBAC0BF, 0xBFBEBAC0,
+ 0xB9BFBEBA, 0xBDBABFC0, 0xBFBEB5BD, 0xBAC0BFB9,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBEB9BFBE, 0xBEBFB9BF,
+ 0xB7BFBFB9, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFB9C1C0, 0xC1BEBAC0, 0xBAC1BEBA, 0xC0BAC0BF,
+ 0xC1C0BBC1, 0xBAC0BFBB, 0xBEBAC1BE, 0xC1BEBAC1,
+ 0xBAC1BEBA, 0xBFBABFC0, 0xBFBEB7BF, 0xB7BDBCB9,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB6BBB9B8, 0xBCB6BBB9,
+ 0xBEB9B9BE, 0xB8BEB9B8, 0xB7B7BDB8, 0xBBB6B6BC,
+ 0xB8BCB7B7, 0xB6B8BCB7, 0xBBB6B7BB, 0xB8BCB7B7,
+ 0xB7B9BDB8, 0xB9B4B8BC, 0xB2B8B3B3, 0xB5B5B9B4,
+ 0xB6B4B6BA, 0xB5B9B4B5, 0xB2B1B7B2, 0xB4ADB2B9,
+ 0xA9B1A7AD, 0xA9A9B0A9, 0xB3ACA8B0, 0xABB3ACAB,
+ 0xAAA9B0A9, 0xAFAAAAB1, 0x777A78A9, 0x00353836,
+ 0x00000001, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00010000, 0x02000102,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x593F4240, 0x544F565B,
+ 0x5A5B5950, 0x0632302F, 0x06060806, 0x86878508,
+ 0xB7BFC0BE, 0xBCB7B8BC, 0xB7BBB6B8, 0xBABCC0BB,
+ 0xBFBABBBF, 0xBCC0BBBB, 0xBABBBFBA, 0xBEB9BBBF,
+ 0xBBBFBABA, 0xBDB7BCBA, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xBDBBC0BE, 0xBFBEBABF, 0xBABFBEBA, 0xBFBBC0BF,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBAC1BEBB, 0xBFBAC0BF, 0xC0C0B8C0, 0xB8C0BFB8,
+ 0xBFB9BFBE, 0xC0C0BAC0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xB9C1C0B8, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xBCC1C0BC, 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB,
+ 0xC0BCC2C1, 0xC1C0BBC1, 0xB9C1C0B9, 0xBFB9C1C0,
+ 0xC1C0B8C0, 0xBBC1C0BB, 0xC0BABFC0, 0xBFBEBABF,
+ 0xB9C0BDBA, 0xBEB8C0BF, 0xBFBEB7BF, 0xBAC0BFB9,
+ 0xBEBABFBE, 0xBFC0B9BF, 0xB9C1C1BA, 0xC0B9BEBF,
+ 0xBEBFBABF, 0xBAC0BFB9, 0xB9B9C0BD, 0xBDBCB5BC,
+ 0xB9BFBEB5, 0xBBBABDBB, 0xBDB8BABD, 0xB7BBB6B9,
+ 0xB7B8BCB7, 0xBBB7B8BC, 0xB7BBB5BA, 0xB3B2B9B2,
+ 0xB9B3B5BD, 0xB7BBB5B5, 0xB3B2B9B2, 0xBCB5B3BA,
+ 0xB6BDB6B5, 0xB3B3BBB4, 0xBBB4B2BA, 0xB5BCB5B4,
+ 0x42B9BFBA, 0x06064144, 0x45434306, 0x52565753,
+ 0x59535658, 0x4A4B4757, 0x07080507, 0x05070805,
+ 0x4F4C480A, 0x6158564B, 0x7C717171, 0x807C7180,
+ 0x77828173, 0x83758787, 0x82817384, 0x79888479,
+ 0x84798884, 0x88847988, 0x77888577, 0x83788885,
+ 0x89877C85, 0x7A86847A, 0x837B8684, 0x85837B86,
+ 0x26595A51, 0x04002F30, 0x04040003, 0x00000100,
+ 0x00000001, 0x00000000, 0x00020000, 0x00000200,
+ 0x02000002, 0x00020000, 0x00000200, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x8C343533,
+ 0x8E8A8F90, 0x90908A8F, 0x9AA1A39D, 0xA39AA0A3,
+ 0xA0A39AA2, 0x9F9FA39D, 0xA49EA1A5, 0xA2A59CA2,
+ 0x9EA4A89D, 0xA99DA6AA, 0xA5A99DA5, 0x9BA5AA9B,
+ 0xAA9BA5AA, 0xA3A79BA5, 0x9CA3A79B, 0xA79BA3A7,
+ 0xA5A99DA3, 0x9CA1A899, 0xAB9CA4AB, 0xA5AF9FA4,
+ 0xA2A4ADA0, 0xACA1A5AD, 0xA3AC9FA4, 0x9CA1A89B,
+ 0xA397A4A8, 0x9EA4999F, 0xA4A1A99F, 0xAEA7A3AB,
+ 0xA8B0A9A6, 0xAAA8B0A9, 0xAFA7A9B1, 0xA3AEA6A4,
+ 0xB6A7AEA9, 0xBBB8B2BC, 0xB3BCB9B0, 0xB4B3BAB5,
+ 0xB9B4B3B9, 0xB3B9B4B3, 0xB7B5BBB6, 0xB7B2B6BC,
+ 0xA6ACA7B1, 0xB9AAAFAD, 0xBBB9B6BB, 0xB8BBB9B8,
+ 0xB6B4B9B7, 0xB9B7B2B9, 0xB6BBB9B4, 0xB9B5BCB9,
+ 0xBBBAB5BC, 0xB6BBBAB6, 0xB9B5BCB9, 0xBBBAB5BC,
+ 0xB6BCBBB5, 0xBBB6BCBB, 0xBCBBB6BC, 0xB6BCBBB6,
+ 0xBBB7BCBB, 0xBBBCB7BC, 0xB7BBBCB7, 0xBBB7BCBB,
+ 0xBCBBB7BC, 0xB7BCBBB7, 0xBAB6BBB9, 0xBEBCB7BC,
+ 0xB8BDBBB9, 0xBBB8BDBB, 0xBFBEB8BD, 0xB9BFBEB9,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBBC0BEBA, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBBC0BE, 0xC1BCBBC0, 0xBBC1BCBB, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBFBAC0BF, 0xC1C0BAC0, 0xBBC1C0BB,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBAC0BFBC, 0xC0B9C1C1,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xBEBAC1BE, 0xC0BEBBC0,
+ 0xBAC0BFBB, 0xBFBAC0BF, 0xBEBFBAC0, 0xBABFBEBA,
+ 0xBEBAC1BE, 0xC0BEBAC1, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBFBBC0BE, 0xC0BEBCC1,
+ 0xBBC0BEBB, 0xBCBDC1BC, 0xBEB9BDC1, 0xBBBFBABA,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBCBBC1BC, 0xC1BCBBC1,
+ 0xBAC0BBBB, 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA,
+ 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA, 0xBABAC1BA,
+ 0xC0BBBAC1, 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBAC0BBBA, 0xC0BEC0C0, 0xC1BFBEC0, 0x888B89BE,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0575C5D, 0xC1C1B8C0,
+ 0xB8C0C0B9, 0xBEB9BFBE, 0xC0BFB9BF, 0xB9BFBEBA,
+ 0xBDB9C0BD, 0xBDBCB9C0, 0xB8BEBDB7, 0xBFB8BEBD,
+ 0xBFBEBAC0, 0xB9BEBDBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xBABFBEBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBCBAC0BF, 0xBFBFB7BD, 0xB8C0C0B7, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xBAC0BFB8, 0xC0BBBFC0, 0xBFC0BBBF,
+ 0xBBBFC0BB, 0xC0BBBFC0, 0xBFC2BBBF, 0xBABFC0BA,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBEB7BFBE,
+ 0xC0BFB7BF, 0xB8C0BFB8, 0xBFB7BFBE, 0xC0BFB8C0,
+ 0xBAC0BFBA, 0xBCBAC0BF, 0xC0BFB7BD, 0xBAC0BFBA,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBBBAC0BB,
+ 0xBFBDBAC0, 0xBABFBDBA, 0xBDBABFBD, 0xBFBEB9C0,
+ 0xBAC0BFB9, 0xBEB9BFBE, 0xC1C0B9BF, 0xB8C0BFBB,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xB8C0BFB8, 0xC0B9C1C1,
+ 0xBFC0B8C0, 0xBAC0BFBA, 0xBEBAC1BE, 0xC0BEBAC1,
+ 0xBAC1BEBB, 0xBFBABFC0, 0xBFBEB9BE, 0xB7BCBABA,
+ 0xBCB9BFBE, 0xBDBCB7BD, 0xB9C0BDB7, 0xB9B8BDBB,
+ 0xBCB7B8BE, 0xB9BFBAB6, 0xB7B7BBB6, 0xBCB7B8BC,
+ 0xB9BDB8B8, 0xB6B8BCB7, 0xB9B7B7BB, 0xB6B9B7B6,
+ 0xB4B8BCB7, 0xB9B7B5B9, 0xB3B6B4B6, 0xB4B5B9B4,
+ 0xB7B2B5B9, 0xB3B7B2B3, 0xB2B2B8B3, 0xB4ADB1B9,
+ 0xA8B0A9AC, 0xAAA8AFAA, 0xAFAAA8AF, 0xA5B0A8A8,
+ 0xA9A8B0A9, 0xB1AAA8B0, 0xA9B0A9A9, 0xA1A2A9A2,
+ 0x706BA3A7, 0x3539346C, 0x00000200, 0x02000002,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x01010100, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x4F3E413F, 0x53515054,
+ 0x51525052, 0x2F5D5B5A, 0x06053230, 0x86878508,
+ 0xBAC3C4C2, 0xBCB7B9BC, 0xB7BBB6B8, 0xBABBBFBA,
+ 0xBDB9BBBF, 0xBEBFBBBC, 0xBBBBBFBA, 0xBEBCBCC0,
+ 0xBBBEBCBB, 0xBCB8BDBC, 0xBFBEB8BD, 0xB9BFBEB9,
+ 0xBAB9C0BD, 0xBFBDB8BF, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBDC0BEBD, 0xBEBDC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BFBAC1, 0xBAC0BFBA,
+ 0xBDB7BDBC, 0xC0BFB9C0, 0xB8C0BFB8, 0xC0B8C0BF,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xBCC1C0BC, 0xC1BCC1C2, 0xC1C0BBC0, 0xBBC1C0BB,
+ 0xC0BBC1C0, 0xC1C0B9C1, 0xBBC1C0BB, 0xC0BAC0BF,
+ 0xC0C1BABF, 0xBBC0C1BB, 0xC0B8BFC2, 0xBFBEB8C0,
+ 0xB9C0BDB9, 0xBFB8C0BF, 0xBFBEB8C0, 0xBAC1BEB9,
+ 0xBDBABFBD, 0xC0BFB9C0, 0xB7BFBEBA, 0xBEB8BEBD,
+ 0xBEBFB9BF, 0xB9BFBEB9, 0xBBB9C0BD, 0xBFBEB7BE,
+ 0xB7BDBCB7, 0xBCB8BDBB, 0xB6B1BBBE, 0xB4BAB5B2,
+ 0xB5B7BBB6, 0xBCB7B6BA, 0xB8BCB6B8, 0xB5B3BAB3,
+ 0xBAB3B7BF, 0xB4BBB4B3, 0xB3B4BBB4, 0xBCB5B3BA,
+ 0xB3BAB3B5, 0xB0B0B8B1, 0xB7B0AFB7, 0xB4BBB4B0,
+ 0x42B9BFBA, 0x42424144, 0x44424142, 0x52565753,
+ 0x4B475658, 0x4B4C4A4A, 0x07090608, 0x05070A05,
+ 0x4F4C480A, 0x6158564B, 0x7C717171, 0x807C7180,
+ 0x77848375, 0x85778685, 0x84837586, 0x75807F71,
+ 0x857A8483, 0x86847987, 0x79888479, 0x84798884,
+ 0x89857A88, 0x78888479, 0x847B8783, 0x88847989,
+ 0x7887857A, 0x857B8583, 0x5A594F86, 0x2452534A,
+ 0x00002A2A, 0x00000100, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00010000, 0x8A62635F,
+ 0x918B8E90, 0x90918891, 0x8B92958C, 0x958C9194,
+ 0xA0A49994, 0x9C9BA097, 0xA69D9EA6, 0xA1A49BA1,
+ 0x9AA4A89D, 0xA79BA4A6, 0xA5A99DA3, 0x9DA5A99D,
+ 0xA89CA5A9, 0xA3A79BA4, 0x9CA3AA9D, 0xAB9EA2A9,
+ 0xA3AA9DA4, 0x9CA6AB9C, 0xAC9DA4AB, 0xA5AC9DA5,
+ 0xA0A4AE9E, 0xADA0A4AD, 0xA4ADA0A4, 0x9DA7B1A1,
+ 0xAC9DA5AC, 0xA1A89BA5, 0xA0A1A99F, 0xA7A29FA7,
+ 0xA0A8A1A0, 0xA6A4ACA5, 0xB0A9A5AD, 0xA5ACA7A8,
+ 0xB79DA7A1, 0xBAB7B3BD, 0xB1BAB7AF, 0xB4B2B9B4,
+ 0xB9B4B3B9, 0xB5B9B4B5, 0xB7B9BCBA, 0xBCB7B8BC,
+ 0xA8ACA6B8, 0xB9B5B9B4, 0xBBB9B8BB, 0xB8BBB9BA,
+ 0xB8B5BAB8, 0xBBBAB4BB, 0xB5BBBAB5, 0xB9B5BCB9,
+ 0xBBBAB5BC, 0xB6BBBAB6, 0xBAB5BBBA, 0xBBBAB3BB,
+ 0xB6BCBBB5, 0xBCB7BDBC, 0xBCBBB7BD, 0xB6BCBBB6,
+ 0xBBB8BDBC, 0xBCBBB7BC, 0xB7BCBBB7, 0xBBB7BCBB,
+ 0xBCBBB7BC, 0xB7BCBBB7, 0xBBB8BDBB, 0xBDBCB8BD,
+ 0xB7BDBCB7, 0xBBB7BEBB, 0xBFBEB7BE, 0xB9BFBEB9,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BFBBC0, 0xBBC0BFBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBD, 0xBEBAC1BE,
+ 0xC0BFBAC1, 0xBBC0BFBB, 0xBEBBC0BE, 0xC0BFBBC0,
+ 0xBBC0BFBB, 0xBFBBC1C0, 0xC1C0BAC0, 0xBBC1C0BB,
+ 0xC0B9C1C0, 0xC1C0B9C1, 0xBBC1C0BB, 0xC0B9C1C0,
+ 0xC1C0B9C1, 0xB8C0BFB9, 0xBFB8C0BF, 0xC0BFBAC0,
+ 0xBABFC0BA, 0xC0BABFC0, 0xBFBEB8C0, 0xB9BFBEB9,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBCBDC1BC, 0xBFBABDC1, 0xBCC0BBBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBABFBDBB, 0xBDBABFBD, 0xC0BBBABF, 0xBAC0BBBA,
+ 0xBDBABFBD, 0xC0BBBABF, 0xBAC0BBBA, 0xBBBAC0BB,
+ 0xC0BBBAC0, 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBAC0BBBA, 0xC0BEC0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF585E5D, 0xBFC0BAC0,
+ 0xBAC0BFBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB7BDBCB9,
+ 0xBDB9BFBE, 0xBDBCB9C0, 0xB9BFBEB7, 0xBEB7BFBE,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xBABFBEBA, 0xBEB9BFBE, 0xBFC0B9BF, 0xBAC0BFBA,
+ 0xBCB9BFBE, 0xC0C0B7BD, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xBAC0BFB8, 0xC0BABFC0, 0xBFC0BBBF,
+ 0xBBBFC0BB, 0xC0BBBFC0, 0xBFC2BBBF, 0xBABFC0BA,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBEBAC0BF,
+ 0xC0BFB9BF, 0xB8C0BFBA, 0xBFB7BFBE, 0xC0BFB8C0,
+ 0xB8C0BFB8, 0xBCBAC0BF, 0xC0BFB7BD, 0xBAC0BFBA,
+ 0xBEBBC0BF, 0xC0BEBBC0, 0xBBC0BEBB, 0xBBBABFBD,
+ 0xBFBDBAC0, 0xBABFBDBA, 0xBDBABFBD, 0xBFBEBABF,
+ 0xB9BFBEB9, 0xBBB7BDBC, 0xBFBEB6BC, 0xB8BEBDB9,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xB7BFBEB8, 0xC0B7BFBF,
+ 0xBFC0B8C0, 0xBAC0BFBA, 0xBEBAC0BF, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BDBBBA,
+ 0xBCB9BFBE, 0xBDBCB7BD, 0xB7BDBCB7, 0xB9B7BEBB,
+ 0xBFBAB8BE, 0xB8BEB9B9, 0xB9B8BEB9, 0xBDB8BABE,
+ 0xBABEB9B9, 0xB7B8BCB7, 0xBAB8B8BC, 0xB8BBB9B7,
+ 0xB7B8BCB7, 0xB8B6B8BC, 0xB3B6B4B5, 0xB4B5B9B4,
+ 0xB9B4B5B9, 0xB3B9B4B5, 0xB7B6BCB7, 0xB4ADB5BC,
+ 0xACB4ADAD, 0xACABB3AC, 0xB3ACABB3, 0xA8B0A9AB,
+ 0xA9A8B0A9, 0xAFA8A8B0, 0xAAB2A8A7, 0x9EA0A89D,
+ 0xA79EA3A9, 0xA3A89FA2, 0x4C777C73, 0x01004E52,
+ 0x01020000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x4F3E423D, 0x53515054,
+ 0x53545252, 0x5A5B5C5A, 0x302F5D5B, 0x86878532,
+ 0xB9BDC0BE, 0xBCB7B8BB, 0xB9BDB8B8, 0xBABBBFBA,
+ 0xBFBBBBBF, 0xBBBFBABE, 0xBABBBFBA, 0xBEBCBBBF,
+ 0xBCBFBDBB, 0xBEBABFBE, 0xBFBEBABF, 0xB7BDBCB9,
+ 0xB9B9C0BD, 0xBFBDB7BE, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBDC0BEBD, 0xBEBDC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BFBBC0, 0xBAC0BFBB,
+ 0xBDB7BEBB, 0xC0BFB9C0, 0xB8C0BFB8, 0xC0BAC0BF,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xBAC0BFBB, 0xC1B8C0C0, 0xC1C0B9C1, 0xBBC1C0BB,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB, 0xC0BAC0BF,
+ 0xC0C1BABF, 0xBBC0C1BB, 0xC0B8BFC2, 0xBFBEB8C0,
+ 0xB9C0BDB9, 0xBFBAC0BF, 0xBFBEB8C0, 0xBAC1BEB9,
+ 0xBDBABFBD, 0xC0BFBABF, 0xB7BFBEBA, 0xBFB9BFBE,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xB9B9C0BB, 0xC1BEB7BE,
+ 0xB9BFBEBA, 0xBBB8BDBB, 0xB6B1B8BD, 0xB5BBB6B0,
+ 0xB7B7BBB6, 0xBCB7B8BC, 0xB4BBB4B8, 0xB3B1B8B1,
+ 0xBDB6B5BD, 0xB5BCB5B6, 0xB3B7BEB7, 0xBAB3B3BA,
+ 0xB4BBB4B3, 0xB3B5BCB5, 0xBAB3B3BA, 0xB3BAB3B3,
+ 0x7CB9C0B9, 0x44427D81, 0x45444043, 0x474B4C48,
+ 0x4C484B4D, 0x4B4C4A4B, 0x07080507, 0x05060A05,
+ 0x504D480A, 0x6258564B, 0x7D6F7170, 0x807D6F80,
+ 0x75848375, 0x83758483, 0x7F7E7084, 0x74807F71,
+ 0x81768382, 0x84827783, 0x79888479, 0x84798884,
+ 0x88847988, 0x79878378, 0x83788884, 0x87847689,
+ 0x78888577, 0x84798986, 0x85857986, 0x747C7B71,
+ 0x01007A7A, 0x00000100, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01020001, 0x00000200, 0x01020000, 0x8A343531,
+ 0x908A8E90, 0x8E918890, 0x8C91968D, 0x968B9095,
+ 0xA0A49992, 0x979BA097, 0xA49B99A1, 0xA0A59C9F,
+ 0x9BA4A89D, 0xA99DA3A7, 0xA6AA9EA5, 0x9DA5A99D,
+ 0xA89CA5A9, 0xA2A69AA4, 0x9DA3AA9D, 0xAA9DA3AA,
+ 0xA3AA9DA3, 0x9CA6AB9C, 0xAC9DA6AB, 0xA4AB9CA5,
+ 0x9EA7AE9F, 0xAEA1A4AE, 0xA6B0A0A7, 0xA0A6B0A0,
+ 0xAC9DA6B0, 0xA5AC9FA5, 0xA6A4ACA2, 0xADA6A5AD,
+ 0xA3ABA4A5, 0xA5A0A7A0, 0xABA4A4AC, 0xA4ABA6A4,
+ 0xB6A0A7A2, 0xBBB8B4BB, 0xB2BBB8B2, 0xB4B3B9B4,
+ 0xBAB5B3B9, 0xB2B8B3B4, 0xB3B3B6B4, 0xBCB7B2B5,
+ 0xB9BDB8B8, 0xB9B8BCB7, 0xB7B7B8BB, 0xB5B7B7B5,
+ 0xB7B3B8B6, 0xB9B8B3BA, 0xB4BAB9B3, 0xB9B5BCB9,
+ 0xBBBAB5BC, 0xB7BCBBB6, 0xBAB5BBBA, 0xBBBAB3BB,
+ 0xB5BBBAB5, 0xBBB6BCBB, 0xBCBBB6BC, 0xB5BBBAB6,
+ 0xBBB7BCBB, 0xBCBBB7BC, 0xB6BBBAB7, 0xBBB7BCBB,
+ 0xBCBBB7BC, 0xB7BCBAB7, 0xBBB8BDBB, 0xBDBCB8BD,
+ 0xB9BFBEB7, 0xBDB9C0BD, 0xBFBEB9C0, 0xBAC0BFB9,
+ 0xBCBABFBD, 0xBFBDB9BE, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBBC0BFBA, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BFBBC0, 0xBBC0BFBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBAC1BE,
+ 0xC0BFBAC1, 0xBAC0BFBA, 0xBEBBC0BF, 0xC0BFBAC1,
+ 0xBAC0BFBB, 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC0C1BB,
+ 0xC1B9C1C1, 0xC1C0B9C1, 0xBBC1C0BB, 0xC0B9C1C0,
+ 0xC1C0B9C1, 0xB9C1C0B9, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xC0B8C0C0, 0xC0BFB8C0, 0xB9BFBEBA,
+ 0xBEBAC0BF, 0xC0BFBAC1, 0xBAC1BEBB, 0xBEBBC0BF,
+ 0xC0BFBAC1, 0xBAC1BEBA, 0xBEBBC1C0, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBCBDC0BE, 0xC1BCBDC1, 0xBDC1BCBD,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBDBABFBD, 0xC0BBBABF, 0xBAC0BBBA,
+ 0xBBBABFBD, 0xC0BBBAC0, 0xBAC0BBBA, 0xBBBAC0BB,
+ 0xC0BBBAC0, 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBAC0BBBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC1585D5C, 0xC2C1BEC3,
+ 0xBEC3C2BD, 0xBEB9BFBE, 0xBDBDB9BF, 0xB7BFBEB5,
+ 0xBEB9BFBE, 0xBEBDB9BF, 0xB9BFBEB8, 0xBDB9BFBE,
+ 0xBFBDB8BE, 0xBABFBDBA, 0xBDBBC0BE, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBEB9C0BD, 0xC0BFBAC1, 0xB9BFBEBA,
+ 0xBEB9BFBE, 0xBFC0B9BF, 0xB9BEBFBA, 0xC0BABFC0,
+ 0xBEBFBABF, 0xBABFC0B9, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBFBAC0BF, 0xBFC0BAC0, 0xBABFC0BA,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xBAC0BFBA, 0xC0BBBFC0,
+ 0xC0BFBBBF, 0xBAC0BFBB, 0xBFB9BFBE, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBCB8C0BF, 0xBFC0B5BD, 0xBABFC0BA,
+ 0xBFBABFC0, 0xC0BFBAC0, 0xBAC1BEBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xB8BDBBBA, 0xBCB8BDBC, 0xBDBBB8BD, 0xB7BEBBB8,
+ 0xBEB8BEBD, 0xBFBEB9BF, 0xB9BFBEB9, 0xBFB9BFBE,
+ 0xBFC0BAC0, 0xBBC0BFBB, 0xBEBBC0BF, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBEBA,
+ 0xBDB9C0BD, 0xBFBEB9C0, 0xB6BCBBB9, 0xBDB6BDBA,
+ 0xBDBAB9C0, 0xB5BCB9B6, 0xB9B7BEB9, 0xBDBBB8BE,
+ 0xB8BDBBB8, 0xB7B9BDB8, 0xBAB8B8BC, 0xB8BBB9B7,
+ 0xB8B5BBB6, 0xB9B7B7BD, 0xB5BAB8B4, 0xB5B6BCB7,
+ 0xBCB5B5BC, 0xB3BAB3B5, 0xB8B7BDB8, 0xB3ADB7BD,
+ 0xAEB5AEAF, 0xA8ABB3A9, 0xB3A9AAB2, 0xABB3A9AB,
+ 0xA5A7AFA5, 0xAEA4A7AF, 0xA7ACA3A6, 0xA4A9AFA4,
+ 0xACA1ABAF, 0xAAAEA3A8, 0xA4A8AFA2, 0x968DA9AF,
+ 0x60645E91, 0x043D413B, 0x09070509, 0x08080808,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x4D393A36, 0x514F5051,
+ 0x4F504E50, 0x50525351, 0x53515354, 0x92939152,
+ 0xB9BABFBD, 0xBDBBB6BB, 0xB6BBB9B8, 0xBBB6BBB9,
+ 0xBCBAB8BD, 0xBABDBBB9, 0xBEBABFBD, 0xBFBDBBC0,
+ 0xB7BCBABA, 0xBEBABFBE, 0xBFBEBABF, 0xBAC0BFB9,
+ 0xBCB8C1BE, 0xBFBEB6BF, 0xB9BFBEB9, 0xBEBBC0BE,
+ 0xC0BFBBC0, 0xBBC0BFBB, 0xBFBABFBE, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBEBBC0BE, 0xC0BFBBC0, 0xBBC0BFBB,
+ 0xBEB9BFBE, 0xC0C0B9BF, 0xB8C0C0B8, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBCC2C1BB, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xB7BFBEBB, 0xC0B6BEBE, 0xC1C0B8C0, 0xBBC1C0BB,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBAC0BFBB, 0xBEB7BFBE,
+ 0xC0C0B7BF, 0xB8C0C0B8, 0xC0B8BFC2, 0xC0BDB8C0,
+ 0xB9C0BDB9, 0xBFBAC0BF, 0xC0BFBAC0, 0xBBC0BFBB,
+ 0xBDBCBFBD, 0xC0BDBABF, 0xB9C0BDB9, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBAB9BFBA, 0xBEBCB9BF,
+ 0xBCBFBDBB, 0xBBB8BDBB, 0xBDBBB8BD, 0xB6BCB7B8,
+ 0xB5B5BBB6, 0xBCB5B5BC, 0xB5BCB5B5, 0xB5B3BAB3,
+ 0xBCB7B4BC, 0xB5BCB5B6, 0xB1B5BCB5, 0xBCB6B3BB,
+ 0xB5BCB5B8, 0xAFB3BBB1, 0xBBB2B1B9, 0xB6BBB2B6,
+ 0x66A3A7A1, 0x504A686C, 0x50504A4E, 0x464A4C46,
+ 0x4C47484C, 0x4A4B4948, 0x07080507, 0x06050805,
+ 0x4D4B430A, 0x5A5E5C51, 0x74666968, 0x827F7177,
+ 0x75828173, 0x83758383, 0x83827484, 0x75858176,
+ 0x7F748480, 0x86827783, 0x7A857F74, 0x84768B85,
+ 0x88857787, 0x71827F71, 0x7F71807F, 0x827F7082,
+ 0x687A7768, 0x77697A77, 0x78786C78, 0x6067655D,
+ 0x02006564, 0x02020201, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000000, 0x86464745,
+ 0x8D878A8C, 0x8A8C868B, 0x8E8E938A, 0x9C919297,
+ 0x979D9298, 0x9C98A096, 0xA39C9BA3, 0xA0A59C9C,
+ 0x9CA0A69B, 0xA69BA3A7, 0xA3A79CA2, 0x9EA5A99E,
+ 0xA99DA5A9, 0xA3A79BA5, 0x9BA3A79B, 0xAA9BA3A7,
+ 0xA3A899A5, 0x9DA2A99A, 0xAB9FA5AC, 0xA9ADA1A7,
+ 0xA0A7AB9F, 0xAE9FA6AD, 0xA8AFA0A9, 0xA0A5AF9F,
+ 0xADA0A4AD, 0xA6ACA1A6, 0xA3A4ACA1, 0xAFA5A5AD,
+ 0xA7AEA7A7, 0xA7A9ADA7, 0xABA5A7AE, 0xA4ABA4A7,
+ 0xB5A4ABA4, 0xBCB7B5BC, 0xB6BCB7B6, 0xB4B1B7B2,
+ 0xB9B4B3B9, 0xB4BBB6B3, 0xB7B5BAB8, 0xB8B6B4B9,
+ 0xB4B9B7B3, 0xB8B4B9B7, 0xBAB9B4B9, 0xB3B8B7B5,
+ 0xB8B4B9B7, 0xBAB9B5BA, 0xB6BBBAB5, 0xB9B6BBB9,
+ 0xBBBAB6BB, 0xB6BBBAB6, 0xBAB6BDBA, 0xBBBAB6BD,
+ 0xB6BBBAB6, 0xBBB7BCBB, 0xBCBBB7BC, 0xB7BCBBB7,
+ 0xBBB6BBB9, 0xBEBCB8BD, 0xB8BDBBB9, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xB8B8BDBB, 0xBEBCB7BD,
+ 0xB8BDBBB9, 0xBBBABFBD, 0xBFBDB8BD, 0xBABFBDBA,
+ 0xBCBABFBD, 0xBFBDB9BE, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xB8C0BFBA, 0xBFB7BFBE,
+ 0xC0C0B8C0, 0xB8C0BFB8, 0xBFBAC0BF, 0xBFC0B8C0,
+ 0xB8C0C0BA, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0BFB8C0, 0xB8C0BFB8, 0xC0B9C1C0,
+ 0xC1C0B9C1, 0xB9C1C0BB, 0xC2B8C0C0, 0xC0C0B6BF,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xBFBABFC0, 0xBFC0B8C0, 0xB8C0BFBA, 0xBFBABFC0,
+ 0xC0C0B8C0, 0xB8C0BFB8, 0xBFB8C0C0, 0xC0BFBAC0,
+ 0xBAC1BEBA, 0xBCBBC0BE, 0xC1BCBBC1, 0xBDC1BCBD,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC1BABA, 0xBBBCC0BB,
+ 0xC0BBBCC0, 0xBAC0BBBA, 0xBBBCC0BB, 0xC0BBBCC0,
+ 0xBAC0BBBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC25B5E5C, 0xC3C1BFC4,
+ 0xC0C3C1C0, 0xBEBABFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBDB9BFBE,
+ 0xBFBDB8BE, 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBEB9C0BD, 0xC0BFBAC1, 0xB9BFBEBA,
+ 0xBFB9BFBE, 0xC0BFBAC0, 0xB9BEBFBA, 0xC0BABFC0,
+ 0xBEBFBABF, 0xBABFC0B9, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xBAC0BFBA, 0xC0BBBFC0,
+ 0xC0BFBDBF, 0xBBC0BFBB, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBDB8C0BF, 0xC0C1B6BE, 0xBABFC0BB,
+ 0xC0BABFC0, 0xC0BFBABF, 0xBAC0BFBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEBABFBD, 0xBFBDBBC0,
+ 0xB8BDBBBA, 0xBEB9BEBD, 0xBDBBBABF, 0xB8BDBBB8,
+ 0xBDB7BEBB, 0xBDBCB8BE, 0xBABFBEB8, 0xBFBAC0BF,
+ 0xBEBFBAC0, 0xBBC0BFBA, 0xBEBBC0BF, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBAC0BF, 0xBFBEB9BF, 0xBABFBEBA,
+ 0xBDB9BFBE, 0xBFBEB9C0, 0xBAC0BFB9, 0xBDB7C0BD,
+ 0xBCBBB7C0, 0xB6BDBAB6, 0xBCB7BEBB, 0xBDBBB8BF,
+ 0xB7BCBAB8, 0xB7B8BBB9, 0xBBB9B8BC, 0xB6BBB9B8,
+ 0xB6B5BBB6, 0xBAB8B5BB, 0xB5BBB6B5, 0xB5B6BCB7,
+ 0xBCB5B5BC, 0xB3BAB3B5, 0xB7B8BCB7, 0xB4AEB8BC,
+ 0xAFB3ADB0, 0xA5A9B1A7, 0xB2A7A8B0, 0xAEB4A9AC,
+ 0xA5A9B1A6, 0xADA3A7AF, 0xA6ABA2A5, 0xA3A9AFA4,
+ 0xABA0AAAE, 0xACB0A4A7, 0xA0A8AFA0, 0xAFA2A8AF,
+ 0xA8AEA3A8, 0x6EA5AAA1, 0x3F3B7074, 0x0809073E,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x4E393A36, 0x514F5152,
+ 0x50505050, 0x4F50544F, 0x54525054, 0x7B7E7C51,
+ 0xBBB8BDBB, 0xBDBBB7BE, 0xB7BCBAB8, 0xBBB9BEBC,
+ 0xBBB9B8BD, 0xB7BCBAB8, 0xBBB7BEBB, 0xC0BEB7BE,
+ 0xB9BEBCBB, 0xBEB8BDBC, 0xC1C0BABF, 0xBAC0BFBB,
+ 0xBEBAC1BE, 0xC0BFBAC1, 0xBAC0BFBA, 0xBEBBC0BE,
+ 0xC0BFBBC0, 0xBBC0BFBB, 0xBFB8BEBD, 0xC0C0BAC0,
+ 0xB8C0BFB8, 0xBEBAC0BF, 0xC0BFBBC0, 0xBBC0BFBB,
+ 0xBEB8BEBD, 0xC0C0B9BF, 0xB8C0C0B8, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xB9C1C0B9, 0xC1B5BFBF, 0xC1C0B9C1, 0xBBC1C0BB,
+ 0xC0BBC1C0, 0xC0C1BBC1, 0xB8C0C0BB, 0xBFB7BFBE,
+ 0xC0C0B6C1, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFBDB8C0,
+ 0xBABFBDBA, 0xC0BAC0BF, 0xC0BFBABF, 0xBBC0BFBB,
+ 0xBDBCBFBD, 0xBFBDBABF, 0xB9C0BDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBBB9BFBA, 0xBEBABCC0,
+ 0xBBBEBCBD, 0xBDBABFBD, 0xBFBDB9C0, 0xB6BBB9BA,
+ 0xB6B5BBB6, 0xBCB5B6BD, 0xB5BCB5B5, 0xB4B1B8B1,
+ 0xBBB6B3BB, 0xB6BDB6B5, 0xB1B6BDB6, 0xBBB5B3BB,
+ 0xB5BCB5B7, 0xAFB4BCB2, 0xBCB3B1B9, 0xB8BDB4B7,
+ 0x4AA3A7A1, 0x50474C50, 0x4F52494F, 0x464A4C46,
+ 0x4B47484C, 0x4344424A, 0x07070406, 0x07030805,
+ 0x4E4B430A, 0x5A5E5C51, 0x74656968, 0x80807077,
+ 0x73828173, 0x83758181, 0x84837584, 0x74888479,
+ 0x7D72837F, 0x84807581, 0x79857F74, 0x83758884,
+ 0x83827486, 0x71807F71, 0x8070807F, 0x7F7F6F80,
+ 0x69797969, 0x5F547877, 0x61605661, 0x0045453F,
+ 0x04020203, 0x02030103, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000000, 0x86464745,
+ 0x8B85898A, 0x888C8689, 0x8B8F948B, 0x9C918D95,
+ 0x959B9098, 0x9999A099, 0xA39C98A0, 0x9CA49A9C,
+ 0x9C9EA499, 0xA59AA1A7, 0x9FA398A1, 0x9FA5A99E,
+ 0xA99DA6AA, 0xA3A79BA5, 0x9DA2A69A, 0xA899A5A9,
+ 0xA5AA9BA3, 0x9CA2A99A, 0xACA0A4AB, 0xA8ACA0A8,
+ 0xA0A8ACA0, 0xACA0A8AC, 0xA8AD9EA8, 0xA0A6ADA0,
+ 0xABA0A4AD, 0xA5ABA0A5, 0xA2A4ACA1, 0xADA2A5AD,
+ 0xA7ACA3A7, 0xA9A9ADA7, 0xB0A7ABAF, 0xA7ACA3AB,
+ 0xB6A5A9A3, 0xBCB7B8BC, 0xB8BCB7B8, 0xB3B3B9B4,
+ 0xB9B4B2B8, 0xB2B9B4B2, 0xB9B2B9B6, 0xBAB8B5BC,
+ 0xB5BAB8B5, 0xB8B5BBBA, 0xB8B9B3B9, 0xB1B7B6B3,
+ 0xB7B4B9B8, 0xB9B8B4B9, 0xB4B9B8B4, 0xB9B5BAB8,
+ 0xBBBAB6BB, 0xB6BBBAB6, 0xB9B7BEBB, 0xBCBBB5BC,
+ 0xB6BBBAB7, 0xBBB7BCBB, 0xBCBBB7BC, 0xB7BCBBB7,
+ 0xB9B6BBB9, 0xBDBBB8BE, 0xB8BDBBB8, 0xB9B8BEB9,
+ 0xBDBBB8BE, 0xB8BDBBB8, 0xB9B8BDBB, 0xBDBBB8BE,
+ 0xB6BBB9B8, 0xBAB7BCBA, 0xBEBCB7BC, 0xB8BDBBB9,
+ 0xBCBABFBD, 0xBFBDB9BE, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBAC1BEBB,
+ 0xBFBAC0BF, 0xBFC0BAC0, 0xB8C0BFBA, 0xBFB7BFBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0BF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC2B6C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0BFB8C0, 0xB8C0BFB8, 0xC0B9C1C0,
+ 0xC1C0B9C1, 0xB9C1C0BB, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0,
+ 0xC0C0B8C0, 0xB8C0BFB8, 0xBFB8C0C0, 0xC0BFBAC0,
+ 0xBAC1BEBA, 0xBCBABFBD, 0xC1BBBBC1, 0xBDC1BBBD,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBBBAC0BB, 0xC1BABAC0, 0xBAC1BABA, 0xBBBCC0BB,
+ 0xC0BBBAC0, 0xBAC0BBBA, 0xBBBCC0BB, 0xC0BBBAC0,
+ 0xBABFBDBA, 0xC0BEC0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00020000, 0x00000200, 0x00000002, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5E5C, 0xC4C2BEC3,
+ 0xC0C3C1C1, 0xBDBABFBE, 0xBFBEB9BE, 0xB7BDBCBA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB9BFBE,
+ 0xBFBEB7BD, 0xB9BFBEB9, 0xBDBABFBD, 0xC0BEBABF,
+ 0xBBC0BEBB, 0xBFBAC0BF, 0xC0C0BAC0, 0xB8C0C0B8,
+ 0xBFBABFC0, 0xBFBEBAC0, 0xBABFBEBA, 0xC0BBBFC0,
+ 0xBFC0BBBF, 0xBBBFC0BB, 0xC0BABFC0, 0xC0BFBABF,
+ 0xBAC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xC0BBBFC0,
+ 0xC0BFBBBF, 0xBBC0BFBB, 0xBFBBC1C0, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBEB9BFBE, 0xC0C0B9BF, 0xB8C0C0B8,
+ 0xC0BABFC0, 0xC0BFBABF, 0xBAC0BFBA, 0xBEBABFBE,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBFBABFBE, 0xBEBDBBC0,
+ 0xB7BDBCB8, 0xBEB9BFBE, 0xBDBCB9BF, 0xB7BEBBB7,
+ 0xBCB8BFBC, 0xBDBCB8BF, 0xB8BDBCB8, 0xBEB8BEBD,
+ 0xBFBEB9BF, 0xBBC0BFBA, 0xBFBBC0BF, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xC0BAC0BF, 0xBEBFB8C0, 0xB9BFBEB9,
+ 0xBEBAC0BF, 0xC0BFB9BF, 0xB8BEBDBA, 0xBAB9C0BD,
+ 0xC0BDB6BD, 0xB6BDBAB9, 0xBAB7BEBB, 0xBDBBB6BD,
+ 0xB8BDBBB8, 0xB9B8BDBB, 0xBAB8B6BB, 0xB5BAB8B5,
+ 0xB8B6BCB7, 0xBAB8B9BD, 0xB7BBB6B7, 0xB6B6BAB5,
+ 0xBAB3B8BC, 0xB5BCB5B3, 0xB8B6BCB7, 0xB4ADB7BD,
+ 0xACB3ACAD, 0xA7AAB2A8, 0xB2A9A9B1, 0xAAB2A8AD,
+ 0xA9A8B1A7, 0xB0A9A8B0, 0xA7AFA5A8, 0xA4A7AFA4,
+ 0xAFA4AAB1, 0xA9B0A3A9, 0xA0A9B0A1, 0xAEA1A8AF,
+ 0xA8AFA2A7, 0xA0A9ADA1, 0xABA0A8AC, 0xA8ABA2A7,
+ 0x31696A66, 0x01003435, 0x01020000, 0x00000100,
+ 0x00000102, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000001, 0x00010000, 0x41302F2B, 0x50504645,
+ 0x50505050, 0x4E515550, 0x544F4E55, 0x6369644E,
+ 0xB9B8BEB9, 0xBDBBB8BE, 0xB8BBB9BA, 0xBABABDBB,
+ 0xBBB9B9BC, 0xB8BDBBB8, 0xBEBAC1BE, 0xBFBDBAC1,
+ 0xB7BCBABA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBFBABFBE, 0xBFC0BBC0, 0xBBC0BFBB, 0xBCBBC0BE,
+ 0xC1BEBBC1, 0xBAC1BEBA, 0xBEB7BEBB, 0xC0C0B9BF,
+ 0xB8C0BFB8, 0xBEB8C0BF, 0xC0BFBAC1, 0xB9BFBEBA,
+ 0xBEB7BDBC, 0xC1C1B9BF, 0xB8C0C0B9, 0xC0BBC1C0,
+ 0xC1C0BCC1, 0xBBC0BFBC, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xB9C1C0BB, 0xC1B5BFBF, 0xC1C0B9C1, 0xBBC1C0BB,
+ 0xC0BABFC0, 0xC0BFB8C0, 0xB8C0BFB8, 0xBFB7BFBE,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xBFB8C0C0, 0xBFBDB8C0,
+ 0xBABFBDBA, 0xC0BAC0BF, 0xC0BFBABF, 0xBDC0BEBB,
+ 0xBDB9BEBC, 0xBFBDBABF, 0xB9BEBCBA, 0xBFBAC1BE,
+ 0xC1BEBBC2, 0xBBC0BEBA, 0xB9BBBFBA, 0xBEBABCBD,
+ 0xBBBFBABD, 0xBBBABFBD, 0xBDBBB7BE, 0xB8BBB9B8,
+ 0xB6BABEB9, 0xBAB5B7BB, 0xB5BBB6B6, 0xB8B5BBB6,
+ 0xBBB4B7BD, 0xB4BBB4B4, 0xB2B6BDB6, 0xBCB7B2B9,
+ 0xB5BCB5B6, 0xAFB4BCB2, 0xB7B0B1B9, 0xB8BCB6B0,
+ 0x48868A84, 0x51484C51, 0x4D504750, 0x464A4C46,
+ 0x4440494A, 0x34323145, 0x07080507, 0x06030A05,
+ 0x4E4B430B, 0x5A5E5C51, 0x75656968, 0x80807075,
+ 0x70808070, 0x83758080, 0x84837584, 0x74858176,
+ 0x7B72837F, 0x837E7580, 0x74837F74, 0x8274837F,
+ 0x7D7C6E85, 0x71807F71, 0x7A6A7F7F, 0x797A6A79,
+ 0x55767668, 0x4B415F61, 0x484B424A, 0x00020400,
+ 0x04000003, 0x00040000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00010000, 0x86474844,
+ 0x8C868A8C, 0x888C868A, 0x8A8F938D, 0x988D8C94,
+ 0x969C9194, 0x9998A099, 0xA49A96A1, 0x9CA49A9B,
+ 0x9B9EA598, 0xA89CA1A8, 0xA4A89DA4, 0x9EA6AA9F,
+ 0xA69AA5A9, 0xA3A79BA2, 0x9AA4A89C, 0xAB9CA2A6,
+ 0xA5AA9BA6, 0x9CA6AB9C, 0xAA9EA6AB, 0xA8ACA0A6,
+ 0xA0AAABA1, 0xADA1AAAC, 0xA8ACA0AB, 0xA0A6ADA0,
+ 0xAA9FA4AD, 0xA4ACA1A2, 0xA0A7AEA1, 0xACA0A6AD,
+ 0xA6ACA1A8, 0xA9A5ADA3, 0xB0A9A9B0, 0xA7AEA7A9,
+ 0xB698A096, 0xBCB7B6BD, 0xB8BCB7B8, 0xB6B6BDB6,
+ 0xBCB5B6BD, 0xB5BBB6B5, 0xB7B4BBB8, 0xB8B6B2B8,
+ 0xB5BAB8B3, 0xB9B2B9B6, 0xB8B9B4BA, 0xB4BAB9B3,
+ 0xB8B4BAB9, 0xBAB9B4BB, 0xB4BAB9B4, 0xB9B6BBB9,
+ 0xBBBAB6BB, 0xB5BBBAB5, 0xBAB6BDBA, 0xBCBBB6BD,
+ 0xB6BCBBB6, 0xBAB7BCBA, 0xBCBBB7BC, 0xB8BDBCB7,
+ 0xBBB7BCBA, 0xBCBAB8BD, 0xB7BCBAB7, 0xBCB8BDBB,
+ 0xBDBCB9BE, 0xB8BDBBB8, 0xBCB7BCBA, 0xBDBCB9BE,
+ 0xB8BDBCB8, 0xBCB8BDBC, 0xBDBCB8BD, 0xB7BDBCB7,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEBAC1BE,
+ 0xC0BFBAC1, 0xBBC0BFBB, 0xBEBAC1BE, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBEBAC1BE, 0xC1BEBAC1, 0xBAC1BEBA,
+ 0xBEBAC1BE, 0xC0BFBBC0, 0xBBC0BFBB, 0xBFB8BEBD,
+ 0xBFC0BAC0, 0xB9BEBFBA, 0xBEB9BFBE, 0xBEBFB9BF,
+ 0xB7BFBFB9, 0xBEB7BFBE, 0xBEBFB7BF, 0xB9BEBFB9,
+ 0xBEB7BFBF, 0xBEBFB7BF, 0xB9BEBFB9, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xBFB7BFBE, 0xBEBFB9BE,
+ 0xB9BEBFB9, 0xBEB7BFBE, 0xBEBFB7BF, 0xB9BEBFB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBDB9BFBE,
+ 0xBFBEB9C0, 0xB9C0BDB9, 0xBDB9BFBE, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBCBBBEBC, 0xC1BBBDC1, 0xBDC1BBBD,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBABFBDBB, 0xBEBBC0BE, 0xC1BCBBC0, 0xBBC1BCBB,
+ 0xBBBAC0BB, 0xC1BABAC0, 0xBAC1BABA, 0xBBBAC0BB,
+ 0xC0BBBAC0, 0xB9C0BBBA, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBABFBDBA, 0xC0BEC0C0, 0xC1BFBEC0, 0x8A8B89C0,
+ 0x00020000, 0x00000200, 0x00000002, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5D5D, 0xC3C1BEC3,
+ 0xC0C3C1C0, 0xBEB9BEBD, 0xBFBEBABF, 0xB5BCB9BA,
+ 0xBEBAC0BF, 0xBFBEB9BF, 0xBAC0BFB9, 0xBCBAC0BF,
+ 0xBFBEB7BD, 0xB9BFBEB9, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBFBAC0BF, 0xBFBFBAC0, 0xB8C0C0B7,
+ 0xC0B9C1C1, 0xBEBDBABF, 0xBABFBEB8, 0xC0BBBFC0,
+ 0xBFC0BBBF, 0xBBBFC0BB, 0xC0BABFC0, 0xC0BFBABF,
+ 0xBAC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xC0BABFC0,
+ 0xC0BFBABF, 0xBAC0BFBB, 0xBFBAC0BF, 0xBFBEBAC0,
+ 0xBAC0BFB9, 0xBEB9BFBE, 0xC0C0B9BF, 0xB8C0C0B8,
+ 0xC0BABFC0, 0xC0BFBABF, 0xBAC0BFBA, 0xBEB9BFBE,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEBABFBE, 0xBEBDBABF,
+ 0xB9BFBEB8, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBDB7BEBB, 0xBFBEB9C0, 0xB9BEBDBA, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xBFBBC0BF, 0xC0BFBBC0,
+ 0xBAC0BFBB, 0xC0B7BFBE, 0xBEBFB8C0, 0xB9BEBFB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9C0BDBA, 0xBDB9C0BD,
+ 0xC1BEB9C0, 0xBAC1BEBA, 0xBDB9C0BD, 0xBFBDB9C0,
+ 0xB8BDBBBA, 0xBAB8BDBB, 0xBDBBB7BC, 0xB8BEB9B8,
+ 0xB7B8BCB7, 0xBBB9B8BC, 0xB8BCB7B8, 0xB6B8BCB7,
+ 0xBCB5B8BC, 0xB5BCB5B5, 0xB7B6BCB7, 0xB4ADB6BC,
+ 0xADB5ABAD, 0xA9AAB2A8, 0xB2A9ADB2, 0xAAB2A8AD,
+ 0xA7A7B0A6, 0xAEA7A8B1, 0xA8B1A7A6, 0xA4A7AFA4,
+ 0xAFA4A7AF, 0xA9B0A3A9, 0xA0A8AFA0, 0xAFA2A8AF,
+ 0xA8AFA2A8, 0x9EA8AD9E, 0xACA0A8AD, 0xA8ACA1A8,
+ 0x9A9EA198, 0xA19B9EA0, 0x696B659F, 0x001A1B17,
+ 0x01000001, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000001, 0x00010000, 0x362E2F2B, 0x4444393A,
+ 0x4F515144, 0x5050544F, 0x544F4F55, 0x63696450,
+ 0xB9B6BCB7, 0xBDBBB8BE, 0xBABDBBBA, 0xB9BABDBB,
+ 0xBEBCB8BB, 0xBABFBDBB, 0xBDBAC1BE, 0xBEBBB9C0,
+ 0xB8BDBBB7, 0xBCB9BEBC, 0xC0BEB9BE, 0xBABFBEBB,
+ 0xBEBABFBE, 0xBDBCBABF, 0xBABFBEB8, 0xBEBBC0BE,
+ 0xC1BEBBC0, 0xBAC0BFBA, 0xBCB7BEBB, 0xC0C0B7BD,
+ 0xB8C0C0B8, 0xBEB8C0BF, 0xC0BFB8C1, 0xB8C0BFB8,
+ 0xBEB9BFBE, 0xC0C0B9BF, 0xB8C0C0B8, 0xC0BBC1C0,
+ 0xC1C0BCC1, 0xBCC1C0BC, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xB7BFBEBB, 0xC1B5BDBD, 0xC1C0B9C1, 0xBBC1C0BB,
+ 0xC1BBC0C1, 0xC1C0B9C1, 0xB8C0BFBB, 0xBFB7BFBE,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xBFB8C0C0, 0xBFBEB8C0,
+ 0xBABFBEB9, 0xBFBAC0BF, 0xC0BFBAC0, 0xBBC0BEBB,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBBC0BEBA, 0xBDBCC1BF,
+ 0xC0BDB9C0, 0xBBC0BEB9, 0xBABBBFBA, 0xBEBABDBE,
+ 0xBBBFBABD, 0xBBBABFBD, 0xBDBBB7BE, 0xB8BBB9BA,
+ 0xB9BBBFBA, 0xBEB9BABE, 0xB7BBB6BA, 0xB6B5BBB6,
+ 0xBCB5B5BB, 0xB6BDB6B5, 0xB3B5BCB5, 0xB9B4B3BA,
+ 0xB3B9B4B3, 0xB1B3BBB4, 0xB8B1B0B8, 0xB6BDB6B1,
+ 0x4A868A84, 0x514B4E50, 0x4D4F494F, 0x404A4B47,
+ 0x3C384344, 0x3834333D, 0x07080507, 0x06050A05,
+ 0x4E4B430B, 0x5A5E5C52, 0x76666968, 0x80807076,
+ 0x70808070, 0x81738080, 0x82817382, 0x74858176,
+ 0x7C71837F, 0x7F7B7080, 0x74858176, 0x7D6F837F,
+ 0x7E7D6F80, 0x6B79796B, 0x7364777A, 0x6A6D5E70,
+ 0x415F6155, 0x4A444A4B, 0x32332F48, 0x00000400,
+ 0x04000004, 0x00030100, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00010000, 0x85464743,
+ 0x8C86878B, 0x888C8688, 0x8D8B8F89, 0x978E8F93,
+ 0x989B9294, 0x9799A197, 0xA49A98A1, 0x9BA3989C,
+ 0x9A9EA598, 0xA79BA2A9, 0xA4A89CA3, 0x9EA3A79C,
+ 0xA99DA5A9, 0xA2A69AA5, 0x9CA3A79B, 0xA899A4A8,
+ 0xA5AA9BA3, 0x9CA4A99A, 0xAA9EA6AB, 0xA8ACA0A6,
+ 0xA3ABACA2, 0xADA1ACAD, 0xA9ADA1AB, 0xA0A6ADA0,
+ 0xAA9DA4AD, 0xA4ADA0A1, 0x9EA6ADA0, 0xADA1A6AD,
+ 0xA8AEA3A9, 0xA7A5ADA3, 0xB0A9A6AE, 0xA7AEA7A9,
+ 0xAB99A197, 0xBBB5ADB5, 0xB9BDB7B7, 0xB5B5BCB5,
+ 0xBCB5B5BC, 0xB5BBB6B5, 0xB9B6BBB9, 0xBBB9B5BC,
+ 0xB5BAB8B6, 0xB8B3BAB7, 0xB8B7B3B9, 0xB2B8B7B2,
+ 0xB6B2B9B6, 0xB9B8B2B9, 0xB5BAB9B3, 0xB9B6BBBA,
+ 0xBBBAB6BB, 0xB5BBBAB5, 0xB9B5BCB9, 0xBDBAB5BC,
+ 0xB6BDBAB6, 0xBAB7BCBA, 0xBCBBB7BC, 0xB7BCBBB7,
+ 0xBBB8BDBB, 0xBCBAB8BD, 0xB7BCBAB7, 0xBBB8BDBB,
+ 0xBDBCB8BD, 0xB8BDBCB8, 0xBBB8BDBB, 0xBFBEB8BD,
+ 0xBABFBEBA, 0xBBBABFBE, 0xBEBDB7BC, 0xB9BFBEB8,
+ 0xBCBABFBD, 0xBFBDB9BE, 0xBABFBDBA, 0xBEBBC2BF,
+ 0xC0BFBAC1, 0xBAC0BFBB, 0xBEBAC0BF, 0xC0BFBAC1,
+ 0xBAC1BEBB, 0xBEBAC0BF, 0xC0BFBAC1, 0xBAC1BEBA,
+ 0xBFBAC0BF, 0xC0BFBBC0, 0xBBC0BFBB, 0xBEB8BEBD,
+ 0xBEBFB9BF, 0xB7BCBDB9, 0xBEB9BFBE, 0xBFC0B9BF,
+ 0xBABFC0BA, 0xBFB8C0BF, 0xC0BFB8C0, 0xBAC0BFBA,
+ 0xBFB9C1C0, 0xBFC0B8C0, 0xBABFC0BA, 0xC0BBC1C0,
+ 0xC1C0B9C1, 0xB9C1C0B9, 0xBFBAC0BF, 0xBFC0BAC0,
+ 0xBABFC0BA, 0xBFB8C0BF, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBEBAC0BF,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBABFBDBB, 0xBEBBC0BE, 0xC0BEBAC1, 0xBBC0BEBB,
+ 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA, 0xBBBAC0BB,
+ 0xC0BBBAC0, 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBABFBDB9, 0xC0BEC0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0xC15B5D5D, 0xC3C1BEC3,
+ 0xBEC3C1C0, 0xC0B9BEBF, 0xC0BFBABF, 0xB5BBBABA,
+ 0xBFB9BFBE, 0xBEBFB8C0, 0xB9BFBEB9, 0xBDB9BFBE,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBDBAC1BE, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBEBAC0BF, 0xBEBFB9BF, 0xB8C0C0B9,
+ 0xC0B8C0C0, 0xBEBFB8C0, 0xBABFC0B9, 0xBFBBC0BF,
+ 0xC0BFBBC0, 0xBBC0BFBB, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFBFB8C0, 0xB7BFBFB7, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xB8C0C0BA, 0xBEB8C0BF, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xBFB8C0BF, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xBFBEBAC0, 0xB9BFBEB9, 0xBCBAC1BE, 0xBFBDB8BF,
+ 0xBABFBDBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBDBABFBD, 0xBDBCBABF, 0xBABFBEB8, 0xBEBABFBE,
+ 0xBDBCBABF, 0xB7BDBCB7, 0xC0B9BEBF, 0xBFC0BABF,
+ 0xBAC0BFBA, 0xBFB7BFBE, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xBEBBC0BF, 0xBFBDBBC0, 0xBABFBDBC, 0xBDBABFBD,
+ 0xC0BBBABF, 0xBAC0BBBA, 0xBCB9BEBC, 0xBFBCB9BE,
+ 0xB8BFBCB8, 0xBAB7BEBB, 0xBDB8B6BD, 0xB4BBB6B6,
+ 0xB9B6BCB7, 0xBCB7B6BB, 0xB8BCB7B8, 0xB7B6BCB7,
+ 0xBBB5B6BC, 0xB7BBB5B7, 0xB7B6BCB7, 0xB4ADB6BC,
+ 0xADB5ABAD, 0xA8ADB3A8, 0xB2A9ADB3, 0xADB2A9AD,
+ 0xA6ACB4AA, 0xB0A6A9B1, 0xA8B0A5A8, 0xA4AAAFA6,
+ 0xAFA4A9AF, 0xA9AFA4A9, 0xA0A4ADA0, 0xADA0A4AD,
+ 0xA4ADA0A4, 0x9EA6AD9E, 0xAD9EA6AD, 0xA4AB9EA6,
+ 0x9EA6AA9F, 0xAFA4A5A9, 0xB0B4A9AB, 0x6DA7A89F,
+ 0x433D7576, 0x0E100A43, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010101,
+ 0x00000000, 0x00010000, 0x37282925, 0x4341383C,
+ 0x40434140, 0x53464947, 0x54525255, 0x66696753,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB9BCBAB8, 0xBAB8BDBB,
+ 0xBDBBB6BB, 0xB7BEBBB8, 0xBBB8BDBB, 0xBEBBB7BE,
+ 0xB7BEBBB7, 0xBFB9BFBE, 0xBFBEBAC0, 0xBABFBEBA,
+ 0xBEBAC0BF, 0xC0BEBAC1, 0xBBC0BEBB, 0xBEB9C0BD,
+ 0xBFC0BAC1, 0xBBC0C1BA, 0xBCBBC0BF, 0xC0C0B7BD,
+ 0xB8C0C0B8, 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xBCB9C0BD, 0xC0C0B7BD, 0xB8C0C0B8, 0xC0B9C1C0,
+ 0xC0BFBBC1, 0xBBC1C0BA, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xB8C0BFB9, 0xC0B7BFBE, 0xC1C0BBC1, 0xBBC1C0BB,
+ 0xC0BBC1C0, 0xC0C1BBC1, 0xBABFC0BC, 0xBFB8C0BF,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xBFB8C0C0, 0xBFBEB8C0,
+ 0xBAC0BFB9, 0xBEBABFBE, 0xC0BFB9BF, 0xBAC0BFBA,
+ 0xBEBABFBD, 0xBEBEBDC0, 0xBCC1C0BC, 0xBFBBC0BF,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBABDC1BC, 0xBFBABBBF,
+ 0xBBBEBCBB, 0xBEBABFBE, 0xBDBBB9BF, 0xB8BBB9BA,
+ 0xBAB8BDBB, 0xBFBAB7BC, 0xB7BBB6BB, 0xB4B3B7B2,
+ 0xB8B3B5B9, 0xB9BDB8B4, 0xB4B8BCB7, 0xB9B4B5B9,
+ 0xB3B9B4B5, 0xB1B0B8B1, 0xB8B1B0B8, 0xB8BCB6B1,
+ 0x45858781, 0x49474849, 0x47484648, 0x3B464743,
+ 0x3834403F, 0x32303039, 0x070A0507, 0x06050A05,
+ 0x524F4A0A, 0x575B5951, 0x7B6C6665, 0x7D7B697E,
+ 0x6E817F6D, 0x7E6F8280, 0x827F7081, 0x71807F71,
+ 0x7C6E807F, 0x7B7A6C7D, 0x717F7B70, 0x7C71807C,
+ 0x7E7C7180, 0x68737367, 0x63577074, 0x6162585F,
+ 0x474D4E45, 0x1C184D4D, 0x0003011B, 0x00000100,
+ 0x02000001, 0x00000001, 0x00000000, 0x00010000,
+ 0x02000102, 0x01000001, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00010000, 0x8140443F,
+ 0x88818188, 0x81888181, 0x8E888C87, 0x948E9094,
+ 0x98999094, 0x94989C91, 0xA196999F, 0x9FA6999B,
+ 0x9AA0A498, 0xA599A2A6, 0xA2A69AA1, 0x98A3A79B,
+ 0xA79BA0A4, 0xA4A89CA3, 0x9BA0A498, 0xA79BA3A7,
+ 0xA3A79BA3, 0x9CA0A798, 0xAB9CA4AB, 0xA4AB9EA4,
+ 0xA2A8ACA1, 0xACA0A9AD, 0xA6AA9EA8, 0xA0A5AC9F,
+ 0xAC9FA4AD, 0xA6AFA2A3, 0xA0A6ADA0, 0xADA2A8AC,
+ 0xA9AFA4A7, 0xA9AAB2A8, 0xAFA8A8B0, 0xA9B0A9A8,
+ 0xA9969B92, 0xBCB6ADB2, 0xB8BCB6B8, 0xB7B8BCB6,
+ 0xBCB7B8BC, 0xB5BBB6B8, 0xB8B5BBB6, 0xBBB9B5BA,
+ 0xB6BBBAB8, 0xB7B4BAB9, 0xB9B8B2B8, 0xB4B9B8B3,
+ 0xB6B3B8B6, 0xB8B7B3B8, 0xB4B9B8B3, 0xB8B3B8B7,
+ 0xBAB9B3B9, 0xB5BBBAB4, 0xB7B6BBB9, 0xBCB7B6BC,
+ 0xB6BBB9B6, 0xBBB6BDBA, 0xBCBBB6BC, 0xB7BCBBB6,
+ 0xB9B6BBB9, 0xBEB9BABE, 0xBABEB9BA, 0xBBB8BDBB,
+ 0xBEBBB8BD, 0xB7BEBBB7, 0xBBB7BEBB, 0xBFBEB7BE,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9,
+ 0xBDBABFBD, 0xC0BBBABF, 0xBAC0BBBC, 0xBEBAC1BE,
+ 0xC0BFB8C1, 0xBABFC0BA, 0xBFBABFC0, 0xBFC0B8C0,
+ 0xBAC0BFBA, 0xBFB9BEBF, 0xBFC0B8C0, 0xBAC0BFBA,
+ 0xBDBABFC0, 0xBCBDB7BC, 0xB8BDBEB7, 0xC0B4BCBC,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB7BFBE, 0xBFC0B7BF,
+ 0xBABFC0BA, 0xBEBAC0BF, 0xC1BEBAC1, 0xBAC0BFBA,
+ 0xC0B7BFBE, 0xC0BFB8C0, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xC0BBC1C0, 0xC1C1BBC1,
+ 0xB9C1C1B9, 0xBFBAC0BF, 0xBFC0BAC0, 0xBBBFC0BB,
+ 0xBFBBC1C0, 0xC1C0BBC2, 0xB9C1C0B9, 0xBFB8C0BF,
+ 0xC0BEBAC0, 0xBBC1BCBB, 0xBEBBC0BE, 0xC1BCBBC0,
+ 0xBBC1BCBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBCC1BF, 0xBFBDBBC0, 0xBABFBDBA, 0xBBB9BFBA,
+ 0xC1BCBAC0, 0xBBC1BCBB, 0xBCBBC1BC, 0xC1BEBBC1,
+ 0xBAC1BEBA, 0xBFBAC0BF, 0xC0BFB8C0, 0xBAC0BFBA,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBDBDC0BE,
+ 0xC0BBBCBF, 0xBAC0BBBC, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBABFBDBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0xC15B5D5D, 0xC4BFBEC3,
+ 0xBEC3C1C0, 0xC0BABFC0, 0xC0BFB8C0, 0xB6BCBBBA,
+ 0xC0B7BFBE, 0xBFC0B9C1, 0xB9BFBEBA, 0xBFB9BFBE,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBDB9C0BD, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBFB9BFBE, 0xBFC0BAC0, 0xB9C1C1BA,
+ 0xC0B8C0C0, 0xBEBFB8C0, 0xBABFC0B9, 0xBFBAC0BF,
+ 0xC0BFBBC0, 0xBBC0BFBB, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xC0BABFC0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B9C1C1,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0BF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB6BEBD, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBFB8C0BF,
+ 0xBFBEB8C0, 0xB9BFBEB9, 0xBDBAC1BE, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBFBAC0BF, 0xC0BFBAC0, 0xB9BFBEBA,
+ 0xBBB7BCBA, 0xBDBCB8BD, 0xBABFBEB8, 0xBEBBC0BF,
+ 0xBDBCB9BF, 0xB4BAB9B7, 0xC1B2B7B8, 0xBFC0B9C1,
+ 0xBAC0BFBA, 0xBFBAC0BF, 0xBFC0BAC0, 0xB9BFBEBA,
+ 0xBEBBC0BF, 0xC0BEBBC0, 0xBAC0BBBD, 0xBDBABFBD,
+ 0xC0BBBABF, 0xBBC1BCBA, 0xBCB9BEBC, 0xBFBCB9BE,
+ 0xB8BFBCB8, 0xBAB2BBB8, 0xBEB9B4BD, 0xB7BDB8B7,
+ 0xB7B6BCB7, 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B6BBB9,
+ 0xBBB5B6BC, 0xB7BBB5B7, 0xB7B6BCB7, 0xB4ADB6BC,
+ 0xADB5ABAD, 0xA8AEB4A9, 0xB3A8AFB3, 0xAAB0A5AD,
+ 0xA1A3A99E, 0xB0A5A4AC, 0xA8B0A5A8, 0xA5A8AEA3,
+ 0xB0A5AAB0, 0xA9AFA4AA, 0xA0A4ADA0, 0xADA0A4AD,
+ 0xA4ADA0A4, 0x9BA4AB9C, 0xAB9CA3AA, 0xA4AB9CA4,
+ 0x9EA5A99D, 0xAA9EA6AA, 0xA0A498A6, 0x9FA8A99F,
+ 0xA9A0A8A9, 0x73766DA8, 0x346B6F69, 0x01003339,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x36262927, 0x4540373B,
+ 0x40434141, 0x53484848, 0x48485353, 0x68696748,
+ 0xB7B9BCBA, 0xBCB7B8BC, 0xB8BCB7B8, 0xBCB8BDBB,
+ 0xBDBBB8BD, 0xBABFBDB8, 0xBBB8BDBB, 0xC0BDB8BD,
+ 0xB7BEBBB9, 0xC0B9BFBE, 0xBFBEBCC1, 0xBBC0BFBA,
+ 0xBEBAC0BF, 0xC0BEBAC1, 0xBBC0BEBB, 0xBEB9C0BD,
+ 0xBEBFB9BF, 0xBABFC0B9, 0xBDBBC0BF, 0xBFC0B8BE,
+ 0xB8C0C0BA, 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xBCB9C0BD, 0xC0C0B7BD, 0xB8C0C0B8, 0xBFB9C1C0,
+ 0xC0BFB8C0, 0xBBC1C0BA, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xB9C1C0B9, 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB,
+ 0xC0BCC1C0, 0xC0C1BCC1, 0xBABFC0BC, 0xBFB9BFBE,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xC0B9C1C1, 0xBFBEB8C0,
+ 0xB9BFBEB9, 0xBFBABFBE, 0xBEBDBAC0, 0xBAC0BFB8,
+ 0xC0BABFBD, 0xBDBDBFC2, 0xBCC1C0BB, 0xBFBBC0BF,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBABDC1BC, 0xBFBABBBF,
+ 0xB9BFBABB, 0xBEBABFBE, 0xBDBBB9BF, 0xB6BBB9B8,
+ 0xBCB8BDBB, 0xBAB5B9BE, 0xB7BBB6B6, 0xB4B5B9B4,
+ 0xB6B1B5B9, 0xB5B9B4B2, 0xB4B5B9B4, 0xB9B4B5B9,
+ 0xB3B9B4B5, 0xB1B1B8B1, 0xB7B1B0B8, 0xB8BCB6B3,
+ 0x45868783, 0x48464849, 0x48494747, 0x3B41403C,
+ 0x36354141, 0x32303038, 0x070A0507, 0x06060A05,
+ 0x504F4B08, 0x595A5850, 0x7A686664, 0x807C697C,
+ 0x6E817F6D, 0x7F708280, 0x827F7082, 0x72807F71,
+ 0x7C6C8080, 0x7B7B6B7C, 0x6C7E7C71, 0x776C7B77,
+ 0x7A786D7B, 0x58727369, 0x63585F63, 0x4E51485F,
+ 0x304D4D47, 0x04023534, 0x00020003, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x02000102, 0x01000001, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00010000, 0x813E443F,
+ 0x88818188, 0x80888180, 0x8B868C87, 0x948E8E8F,
+ 0x98999094, 0x93989C91, 0xA1959B9F, 0x9DA1959D,
+ 0x99A0A498, 0xA599A1A5, 0xA2A69AA1, 0x9BA4A89C,
+ 0xA79BA3A7, 0xA3A79BA3, 0x9BA0A498, 0xA79BA3A7,
+ 0xA3A79BA3, 0x9DA2A99A, 0xAB9CA5AC, 0xA6AD9EA4,
+ 0xA1A7ABA0, 0xADA1A8AC, 0xA6ADA0A9, 0xA0A5AC9F,
+ 0xAC9FA4AD, 0xA4AE9EA3, 0xA0A8ACA0, 0xADA2A8AC,
+ 0xA7ACA3A7, 0xA9A0A7A0, 0xB0A9A8B0, 0xA1A99FA9,
+ 0xAA969C91, 0xBCB6AEB3, 0xB8BCB6B8, 0xB7B7BBB6,
+ 0xBBB6B8BC, 0xB8BCB7B7, 0xB8B6BCB7, 0xB9B7B5BA,
+ 0xB5BAB9B6, 0xB7B1B7B6, 0xB8B7B2B8, 0xB5BAB9B2,
+ 0xBAB6BBB9, 0xBABAB6BB, 0xB6BBBAB8, 0xB8B6BBBA,
+ 0xB9B8B3B9, 0xB3B8B6B3, 0xB8B7BCBA, 0xBDB8B7BD,
+ 0xB6BBB9B7, 0xBBB6BCBB, 0xBCBBB6BC, 0xB6BDBAB6,
+ 0xB7B5BAB8, 0xBEB9B8BC, 0xBABEB9BA, 0xBCB8BDBB,
+ 0xBDBAB9BE, 0xB7BEBBB6, 0xBBB7BEBB, 0xBFBEB7BE,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBAC0BBBC, 0xBEBAC1BE,
+ 0xC0BFB8C1, 0xBABFC0BA, 0xC1B8C0C0, 0xBFC0B9C1,
+ 0xBABFC0BA, 0xC0B8C0C0, 0xBEBFB8C0, 0xB9BEBFB9,
+ 0xBDB5BDBD, 0xBCBFB5BD, 0xB8C0C0B5, 0xC1B8C0C0,
+ 0xBEC1B9C1, 0xB5BDBDB7, 0xBEB7BFBE, 0xBFC0B7BF,
+ 0xBABFC0BA, 0xBEBAC0BF, 0xC1BEBAC1, 0xBAC0BFBA,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xBBC0BFBA, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBFBAC0BF, 0xC0C0BAC0,
+ 0xB8C0C0B8, 0xBFBAC0BF, 0xC0BFBAC0, 0xBBC0BFBB,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xB9C1C0B9, 0xBFB8C0C0,
+ 0xC1BEBAC0, 0xBBC1BCBA, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC1BCBB, 0xBEBBC0BE, 0xC0BFBBC0, 0xBBC0BFBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBCBBC1BC,
+ 0xC1BCBBC1, 0xBAC0BBBB, 0xBBBAC0BB, 0xC1BEBAC0,
+ 0xBAC1BEBA, 0xBFB8C0BF, 0xC0C0B8C0, 0xB9BFBEB8,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBDBDC0BE,
+ 0xC0BBBCBF, 0xBCC0BBBC, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBCC0BBBA, 0xC0C0C0C0, 0xC1BFC2C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5D5D, 0xC4BFBEC3,
+ 0xBFC5C0C0, 0xBEBAC0BF, 0xBFBEB7BF, 0xB7BEBBB9,
+ 0xBFB5BDBC, 0xBFBEB8C0, 0xB9BFBEB9, 0xC0B9BFBE,
+ 0xBFC0BABF, 0xB9BFBEBA, 0xBEB7C0BD, 0xC0BFBAC1,
+ 0xBBC0BFBB, 0xBEB9C0BD, 0xC0BFBAC1, 0xB8C0C0B8,
+ 0xC2B8C0C0, 0xBEBFBABF, 0xBABFC0B9, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBB, 0xC1BABFC0, 0xBFC0BBC0, 0xBBC0C1BA,
+ 0xBFBAC0BF, 0xC0C1BAC0, 0xBABFC0BB, 0xC0BBC0C1,
+ 0xBFC0BABF, 0xBABFC0BA, 0xC0BBC1C0, 0xC0C0BBC1,
+ 0xB8C0C0B8, 0xBFB5BDBC, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xBEB9BFBE, 0xBEBCB9BF,
+ 0xBABFBDB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBCB5BCB9, 0xBFBEB8BF, 0xBAC0BFB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB7BDBCB9, 0xBFBAC0BF, 0xB8B7BAC0,
+ 0xB4B9B7B3, 0xBCBBC0BE, 0xC0BFB8BF, 0xBAC0BFBA,
+ 0xBDBAC0BF, 0xC0BEB9C0, 0xBABFBDBB, 0xBBBAC0BB,
+ 0xBFBDBAC0, 0xBCC1BFBC, 0xBCB8BEB9, 0xBFBCB8BF,
+ 0xB6BEBDB8, 0xBAAEB9B6, 0xBDB8B2BD, 0xB8BEB9B6,
+ 0xB5B8BCB7, 0xBCB6B7BB, 0xB6BDB6B8, 0xB7B8BCB7,
+ 0xBCB5B8BC, 0xB5BCB5B5, 0xB6B8BCB7, 0xB4ADB5BB,
+ 0xA9B1A7AD, 0xA7AEB4A9, 0xB1A6ACB2, 0xAFB5AAAD,
+ 0xA3AAB1A4, 0xADA2A9B0, 0xA4ACA1A5, 0xA4A9AFA4,
+ 0xAFA3ACB0, 0xA6ADA0AB, 0xA0A3AC9F, 0xAE9EA4AD,
+ 0xA4AE9EA4, 0xA1A6ADA0, 0xAD9EA9AD, 0xA6AB9CA8,
+ 0x9DA9B0A3, 0xA99CA3AA, 0xA5A99DA2, 0x9FA8A99F,
+ 0xA9A0A8A9, 0xA6A9A0A6, 0xA2A2A9A2, 0x706BA0A7,
+ 0x3237356A, 0x002B2E2C, 0x00000001, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x39272A28, 0x3B39383B,
+ 0x40434138, 0x48494949, 0x48484848, 0x66696746,
+ 0xB8BABDBB, 0xBCB7B9BD, 0xB9BDB8B8, 0xBBB9BCBA,
+ 0xBDBBBABD, 0xB8BDBBBA, 0xBEBABFBE, 0xC0BFB9BF,
+ 0xB8BDBCBB, 0xBDBABFBD, 0xBFBDBABF, 0xBBC0BFBA,
+ 0xBFBBC0BF, 0xC0BFBBC0, 0xBBC0BFBB, 0xBFBBC0BF,
+ 0xC0BFBBC0, 0xBAC0BFBA, 0xBCB9BFBE, 0xBFBEB7BD,
+ 0xBAC0BFB9, 0xBFBBC0BF, 0xC0BFBBC0, 0xBBC1C0BA,
+ 0xBCBAC0BF, 0xC0C0B7BD, 0xB8C0C0B8, 0xBEB9C1C0,
+ 0xC1C0B8C1, 0xBBC1C0BB, 0xBFBBC1C0, 0xC0C0BAC0,
+ 0xB9C1C1B8, 0xC0BBC1C0, 0xC1C0BBC1, 0xBCC1C0BC,
+ 0xC0BCC1C0, 0xC0C1BCC1, 0xBABFC0BC, 0xBFB9BFBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0, 0xBBBAB8C0,
+ 0xBABFBEB5, 0xBEBAC0BF, 0xBFC0B9BF, 0xBAC0BFBA,
+ 0xBFBABFBD, 0xBFBEBEC1, 0xBDC2C1BA, 0xBFBCC0C1,
+ 0xBFBDBAC0, 0xBBC0BEBA, 0xBABDC1BC, 0xC1BBBBBF,
+ 0xBBC1BCBD, 0xBDBABFBD, 0xBDBBB9C0, 0xB7BCBAB8,
+ 0xBBB7BCBA, 0xBEB9B8BD, 0xB7BBB6BA, 0xB4B5B9B4,
+ 0xB7B2B5B9, 0xB5B9B4B3, 0xB2B4B8B3, 0xB6B1B3B7,
+ 0xB7BDB8B2, 0xB2B4BBB4, 0xB9B3B1B9, 0xB8BCB6B5,
+ 0x45858781, 0x49474849, 0x48494748, 0x3B41403C,
+ 0x37364141, 0x32303039, 0x070A0507, 0x06060A05,
+ 0x4F4E4A08, 0x625A594F, 0x7B697170, 0x7D7C687D,
+ 0x6D81806C, 0x8070817F, 0x81817180, 0x6C7D7D6D,
+ 0x7D6D7C7C, 0x7C7C6C7D, 0x6C78766B, 0x786A7977,
+ 0x71716379, 0x58606256, 0x52475F63, 0x4E51484E,
+ 0x0033352F, 0x03010102, 0x00030100, 0x00000100,
+ 0x00000001, 0x02000002, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x7F3E453E,
+ 0x88818189, 0x80888180, 0x8B868C87, 0x938F8E8F,
+ 0x98989294, 0x90999D92, 0xA293989C, 0x9BA2939B,
+ 0x99A0A498, 0xA69AA1A5, 0xA2A69AA2, 0x9CA3A79B,
+ 0xA79BA4A8, 0xA3A79BA3, 0x9BA0A498, 0xA79BA3A7,
+ 0xA5A99DA3, 0x9CA2A99A, 0xAB9CA4AB, 0xA6AD9EA4,
+ 0xA1A8ACA1, 0xAB9FAAAB, 0xA4AB9EA7, 0x9FA4AB9E,
+ 0xADA0A3AC, 0xA4ADA0A4, 0xA0A9ADA1, 0xACA1A8AC,
+ 0xA7ACA3A6, 0xA9A8AFA8, 0xB0A7A9B0, 0x9BA196AB,
+ 0xA9969C91, 0xBCB6ADB2, 0xB8BCB7B8, 0xB5B7BBB5,
+ 0xB8B3B7BB, 0xB5B9B4B4, 0xB7B6B9B7, 0xBAB8B6B9,
+ 0xB5BAB8B5, 0xB8B3BAB7, 0xB7B6B3B9, 0xB2B8B7B1,
+ 0xB8B4B9B8, 0xB9B8B4B9, 0xB6BBB9B4, 0xB9B5BAB8,
+ 0xBAB8B6BB, 0xB5BAB8B5, 0xBAB7BCBA, 0xBDBAB6BD,
+ 0xB6BDBAB6, 0xBBB6BCBB, 0xBDBAB6BC, 0xB6BDBAB6,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB9BEBC,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBEB8BDBC, 0xBDBCBABF, 0xB7BDBCB7,
+ 0xBDBABFBE, 0xBFBDBABF, 0xBABFBDBC, 0xBEBAC1BE,
+ 0xC0BFBAC1, 0xBAC0BFBB, 0xBFB8C0BF, 0xC0BFB8C0,
+ 0xB9BFBEBA, 0xBEB8C0BF, 0xBFBEB7BF, 0xB9BFBEB9,
+ 0xC0B8C0C0, 0xBEBEB8C0, 0xB2BABAB6, 0xBCB7BCBD,
+ 0xBCBDB7BD, 0xBABFC0B7, 0xBFBAC0BF, 0xBFC0BAC0,
+ 0xBABFC0BA, 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xC0B9C1C1, 0xC0C0B8C0,
+ 0xB8C0BFB8, 0xBEBAC1BE, 0xC0BFBAC1, 0xBBC0BFBB,
+ 0xC1BBC1C0, 0xC0C1B9C1, 0xBABFC0BB, 0xBFBAC0BF,
+ 0xC1BEBAC0, 0xBAC1BEBA, 0xBEBAC0BF, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC1BCBBC0, 0xBAC0BBBB, 0xBEBBC0BE, 0xC1BEBBC0,
+ 0xB9C0BDBA, 0xB6B6BCBB, 0xB8B7B1B7, 0xBAC0BFB2,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBDC0BE,
+ 0xC1BCBDC0, 0xBAC0BBBB, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBCC0BBBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5E5C, 0xC4BFBEC3,
+ 0xBEC4BFC0, 0xBEB9C0BD, 0xC0BDB7BF, 0xB9C0BDB9,
+ 0xBEB5BDBC, 0xBFBEB7BF, 0xBAC0BFB9, 0xC0BABFC0,
+ 0xBFC0BABF, 0xBABFC0BA, 0xBEBAC0BF, 0xC0BFBAC1,
+ 0xBBC0BFBB, 0xBEB9C0BD, 0xC0BFBAC1, 0xB8C0BFB8,
+ 0xC2B8C0C0, 0xBEBFBABF, 0xBABFC0B9, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xC1B9BEBF, 0xBFC0BBC0, 0xBABFC0BA,
+ 0xC0BBC1C0, 0xC0C1BBC1, 0xBABFC0BB, 0xC1BBC0C1,
+ 0xC0C1BBC0, 0xBABFC0BB, 0xC0BBC1C0, 0xC0C0BBC1,
+ 0xB9C1C1B8, 0xBFB5BDBC, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xBEB9BFBE, 0xBFBDB9BF,
+ 0xBABFBDBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9C0BD, 0xBFBEBAC1, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xC0BFB9BF, 0xBABFBEBB, 0xB1ACB3B0, 0xABA9ADB4,
+ 0xADB2B0A6, 0xBCBABFBD, 0xBFBEB9BE, 0xB9BFBEB9,
+ 0xBEBAC0BF, 0xC1BFBAC1, 0xBABFBDBC, 0xBBBAC0BB,
+ 0xBFBDBAC0, 0xBBC0BEBC, 0xBCB9BFBA, 0xBFBEB8BF,
+ 0xB5BDBCB9, 0xBAADB8B5, 0xBCB7B2BD, 0xB9BDB8B5,
+ 0xB6BABEB8, 0xBCB6B8BC, 0xB6BDB6B8, 0xB6B8BCB7,
+ 0xBDB6B8BC, 0xB5BDB3B6, 0xB7B6BDB6, 0xB4ADB6BC,
+ 0xA8B0A9AD, 0xA9ABB3A9, 0xB4A9ACB4, 0xACB2A7AE,
+ 0xA8AEB5A8, 0xB0A5AEB5, 0xA7ADA2AA, 0xA3A8ACA1,
+ 0xACA0ABAF, 0xA6ADA0A8, 0xA0A4ACA1, 0xAEA1A4AD,
+ 0xA7AEA1A5, 0x9DA4AB9E, 0xAD9EA5A9, 0xA8AD9EA8,
+ 0x9DA9B0A3, 0xAA9DA3AA, 0xA6AA9EA3, 0x9FA6AA9F,
+ 0xAA9FA8A9, 0xA4A9A0A6, 0x9FA1A99F, 0xA8A1A1A9,
+ 0xA1A8A1A1, 0x59888C87, 0x2F2B5A5E, 0x0001002E,
+ 0x01000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x39262927, 0x3B39383B,
+ 0x40434138, 0x47474846, 0x48484849, 0x66696746,
+ 0xB7B8BBB9, 0xBBB6B8BC, 0xB9BDB8B7, 0xBABABDBB,
+ 0xBCBAB9BC, 0xBABFBDB9, 0xBEBABFBE, 0xBFBEB9BF,
+ 0xB8BDBCBA, 0xBDBCBFBD, 0xBFBDBCBF, 0xBABFBDBA,
+ 0xBFBBC0BE, 0xBFC0BBC0, 0xBABFC0BB, 0xBEBBC0BF,
+ 0xC0BFB9BF, 0xB9BFBEBA, 0xBDB9BFBE, 0xBDBCB8BE,
+ 0xBAC0BFB7, 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xBCBAC0BF, 0xC0C0B7BD, 0xB8C0C0B8, 0xBEB9C1C0,
+ 0xC1C0B8C1, 0xBBC1C0BB, 0xC0BBC1C0, 0xC1C1BBC1,
+ 0xB8C0C0B9, 0xC0BBC1C0, 0xC1C0BBC1, 0xBCC1C0BC,
+ 0xC0BCC1C0, 0xC0C1BCC1, 0xBABFC0BC, 0xBFB7BFBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBDB8C0BF, 0xBBBAB6BE,
+ 0xBBC0BFB6, 0xBEBAC0BF, 0xC0C1B9BF, 0xB9BFBEBB,
+ 0xBDBABFBE, 0xBCBBBABF, 0xB9BEBDB7, 0xBFBAC0BF,
+ 0xC1BFBAC0, 0xBBC0BEBC, 0xBABBBFBA, 0xC1BCBBBF,
+ 0xBBC1BCBD, 0xBDB9C0BD, 0xBBB9B9C0, 0xB8BDBBB6,
+ 0xBBB9BEBC, 0xBDB8B8BD, 0xB7BBB6B9, 0xB4B5B9B4,
+ 0xB7B2B5B9, 0xB8BCB7B3, 0xB7B7BBB6, 0xB8B3B8BC,
+ 0xADB3AEB4, 0xB0B1B8B1, 0xBBB4AFB7, 0xB8BCB6B4,
+ 0x45878983, 0x49474849, 0x48494548, 0x333F403C,
+ 0x38343939, 0x33313139, 0x070A0507, 0x06060805,
+ 0x504F4B08, 0x6258594F, 0x7B697070, 0x7D7B697B,
+ 0x6D7F7D6B, 0x7F6F7F7F, 0x8080707F, 0x6A7D7D6D,
+ 0x7B6C7C7C, 0x7878687E, 0x6B79786A, 0x786A7777,
+ 0x6C6C5E78, 0x46626458, 0x51484D51, 0x3E403A4E,
+ 0x01000400, 0x02000003, 0x00030100, 0x00010101,
+ 0x00000001, 0x00010002, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x8140443E,
+ 0x88818188, 0x80888180, 0x8A868D86, 0x948E8C90,
+ 0x96989292, 0x93999D92, 0x9F9299A0, 0x9BA29598,
+ 0x98A0A498, 0xA599A0A4, 0xA2A69AA1, 0x9CA3A79B,
+ 0xA69AA4A8, 0xA0A498A2, 0x9BA0A498, 0xA89CA3A7,
+ 0xA6AB9CA4, 0x9CA3AA9B, 0xAB9CA4AB, 0xA6AD9EA4,
+ 0xA0A7AB9F, 0xAA9EA8AC, 0xA4AB9EA6, 0xA0A6ADA0,
+ 0xADA0A4AD, 0xA6ADA0A6, 0x9FA7AEA1, 0xAFA4A7AB,
+ 0xA9AEA5A9, 0xA9AAB1AA, 0xA89FA9B0, 0x949990A3,
+ 0xA8969C91, 0xBCB7ACB1, 0xB7BBB6B8, 0xB6B9BDB7,
+ 0xBCB7B8BC, 0xB9BDB8B8, 0xB8B7BAB8, 0xBAB8B7BA,
+ 0xB5BAB8B5, 0xB8B5BAB8, 0xBAB9B4BB, 0xB4BAB9B4,
+ 0xB8B4B9B8, 0xB9B7B4B9, 0xB4B9B7B4, 0xB8B4B9B7,
+ 0xBBB9B5BA, 0xB6BBB9B6, 0xBAB6BCBB, 0xBDBAB5BB,
+ 0xB6BDBAB6, 0xBBB6BCBB, 0xBCBBB6BC, 0xB6BDBAB6,
+ 0xBBB8BDBB, 0xBBB9B8BD, 0xB7BCBAB6, 0xBAB8BDBB,
+ 0xBDBBB7BC, 0xB8BDBBB8, 0xBCB9BEBC, 0xBFBDB9BE,
+ 0xB9BEBCBA, 0xBEBABFBE, 0xBFBEBABF, 0xBAC0BFB9,
+ 0xBEBABFBE, 0xBFBDBABF, 0xBABFBDBA, 0xBEBAC1BE,
+ 0xC0BFBAC1, 0xBAC0BFBB, 0xBEB7BFBE, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xBEB7BFBE, 0xBFBEB7BF, 0xB7BDBCB9,
+ 0xBBB3BBBB, 0xB7B7B3BB, 0xB1B9B9AF, 0xBAB2B8B7,
+ 0xBBBCB5BB, 0xB7BCBDB6, 0xBEBAC0BF, 0xBEBFB9BF,
+ 0xB9BEBFB9, 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xC0B8C0C0, 0xBFC2B8C0, 0xBABFC0BA, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xC0B8C0BF, 0xC0C0B8C0,
+ 0xB8C0BFB8, 0xBEBAC1BE, 0xC0BFBAC1, 0xBAC0BFBB,
+ 0xC0BABFC0, 0xBFC0B8C0, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xC1BEBAC0, 0xBAC1BEBA, 0xBFBAC0BF, 0xC0BEBAC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC1BCBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BDBAC1,
+ 0xBAC1BEB9, 0xB7BAC0BF, 0xB3B2B2B8, 0xBAC0BFAD,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBDC0BE,
+ 0xC1BCBDC0, 0xBAC0BBBB, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBAC0BBBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000100, 0x00000000, 0x02000102, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5D5D, 0xC4BFBEC3,
+ 0xBEC4BFC0, 0xBEB9C0BD, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB7BDBC, 0xBEBFB9BF, 0xBBBFC0BA, 0xBFBBC1C0,
+ 0xBFC0BAC0, 0xBABFC0BB, 0xBEBAC0BF, 0xBFBEB9BF,
+ 0xBABFBEBA, 0xBFBAC0BF, 0xC0BFBAC0, 0xB8C0BFBA,
+ 0xC0B8C0C0, 0xBFBFB8C0, 0xB8C0C0B7, 0xC1B8C0C0,
+ 0xC0C0B9C1, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC1B8C0C0, 0xC1C0B9C1, 0xBBC1C0B9,
+ 0xC0BBC1C0, 0xC0C1BCC1, 0xBABFC0BB, 0xC0BBC1C0,
+ 0xC0C1BBC1, 0xBABFC0BB, 0xBFBBC1C0, 0xBFC0BAC0,
+ 0xBABFC0BA, 0xBFB6BEBD, 0xC0BFB8C0, 0xB8C0BFB8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xBDBAC1BE, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBDB9C0BD, 0xBFBEB9C0, 0xB8BDBCBA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BEBDBA, 0xBBB7BDBC,
+ 0xBDBCB6BC, 0xB8BDBCB8, 0xACA3A8A6, 0xB6B4A9AE,
+ 0xB0B5B3B3, 0xBCB8BDBC, 0xBDBCB7BD, 0xB8BDBCB8,
+ 0xBEB9BEBC, 0xC0BEBBC0, 0xBBC1BCBD, 0xBABAC0BB,
+ 0xC0BBB9BF, 0xBAC0BBBA, 0xBDBABFBD, 0xBFBEBABF,
+ 0xB5BBBABA, 0xB9A7B2B0, 0xBCB7B1BC, 0xB8BCB7B6,
+ 0xB7BBBFBA, 0xBBB6B8BC, 0xB8BCB7B7, 0xB6B8BCB7,
+ 0xBDB6B8BC, 0xB5BDB3B6, 0xB9B9C0B9, 0xB3ACB9C0,
+ 0xABB3ACAC, 0xACADB5AE, 0xB4AAADB6, 0xABB4AAAB,
+ 0xA7ACB2A7, 0xB3AAACB2, 0xADB1A6AE, 0xA3ABAFA4,
+ 0xADA2ABAF, 0xA9AFA4A7, 0xA3A5ADA3, 0xACA3A5AD,
+ 0xA4AA9FA7, 0x9CA4AB9E, 0xADA0A4AB, 0xA4AB9EA6,
+ 0xA0A4AB9E, 0xA89CA6AD, 0xA5A99DA4, 0x9BA5A99D,
+ 0xA89CA3A7, 0xA0A499A4, 0x999EA499, 0xA39A9EA4,
+ 0x9EA39A9E, 0x91969C91, 0x9C91989C, 0x989A9498,
+ 0x01272727, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x38282828, 0x38383838,
+ 0x40413F38, 0x49424341, 0x43414C4D, 0x60636140,
+ 0xB9BABDBB, 0xBDB8B8BB, 0xB5BBB6B7, 0xBAB8BCB7,
+ 0xBDBBBBBF, 0xBABFBDB8, 0xBEBABFBE, 0xBFBEBABF,
+ 0xB6BCBBB9, 0xBCB9BEBC, 0xC1BCBBC1, 0xBDC1BCBD,
+ 0xBFBBC0BE, 0xBFC0BBC0, 0xB8C0C0BA, 0xBFBBC1C0,
+ 0xC1C0BAC0, 0xBBC1C0BB, 0xBEB8C0C0, 0xBDBCB7BF,
+ 0xBAC0BFB7, 0xC0BAC0BF, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBCBAC0BF, 0xC0C0B7BD, 0xB8C0C0B8, 0xBFB7BFBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BBC1C0, 0xC2C1BBC1,
+ 0xBBC1C0BC, 0xC0BBC1C0, 0xC0C1BBC1, 0xBBC0C1BB,
+ 0xC0BABFC0, 0xBFC0BABF, 0xB9BEBFBA, 0xC0B7BFBF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB6BEBD, 0xBFBEB7BF,
+ 0xBBC0BFBA, 0xBEBAC1BE, 0xBFC0B9BF, 0xB9BFBEBA,
+ 0xBAB9BFBE, 0xC0BEB7BC, 0xBABFBDBB, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBAB8BEB9, 0xBFBDB9BF,
+ 0xBABFBDBA, 0xBDB9BFBE, 0xBAB9B8BE, 0xB9BEBCB5,
+ 0xB8B8BDBB, 0xBFBAB7BD, 0xB6BAB5BB, 0xB4B8BCB7,
+ 0xB7B2B5B9, 0xB5B9B4B3, 0xB7B6BAB5, 0xB9B4B8BC,
+ 0xB0B6B1B5, 0xB1B1B8B1, 0xB8B1B0B8, 0xB5BCB5B1,
+ 0x3F80847F, 0x43414044, 0x40443F40, 0x32383C37,
+ 0x37333638, 0x32302F38, 0x07080507, 0x06060805,
+ 0x46474308, 0x5D4F5348, 0x7868696C, 0x7A776878,
+ 0x6B7B7B6B, 0x7C6E7B7B, 0x7E7E6E7D, 0x687D7B69,
+ 0x7A687D7C, 0x7B78697E, 0x61706F61, 0x6F61706F,
+ 0x6565596F, 0x4A505147, 0x37315050, 0x01020035,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x7F40443F,
+ 0x847F7E84, 0x7E857E7E, 0x85868B82, 0x958C8A90,
+ 0x93988F90, 0x9293988F, 0xA095979D, 0x9AA0959A,
+ 0x989CA297, 0xA3989DA3, 0xA0A4999F, 0x99A1A599,
+ 0xA69AA1A5, 0xA1A397A4, 0x989FA495, 0xA798A2A7,
+ 0xA3A899A2, 0x99A2A99A, 0xA998A2AA, 0xA4AC9BA1,
+ 0x9EA5AC9D, 0xADA0A6AD, 0xA6ADA0A6, 0xA1A8AFA2,
+ 0xADA1A7AE, 0xA8AFA0A9, 0xA1A7AEA1, 0xADA2A7AE,
+ 0xA7ACA3A7, 0xA6A8ACA6, 0xA59FA7AB, 0x949892A3,
+ 0xB2959A91, 0xB9B4B4BC, 0xB4BAB5B3, 0xB5B7BBB5,
+ 0xBCB7B7BB, 0xB8BCB7B8, 0xB9B8BCB7, 0xBAB8BABE,
+ 0xBBBEBCB7, 0xBCBABDBB, 0xBDBCB9BE, 0xB6BCBBB7,
+ 0xBCB8BCBD, 0xBDBBB8BD, 0xB8BDBBB8, 0xB6B8BCB7,
+ 0xBCB7B7BB, 0xB6BBB9B8, 0xBAB5BBBA, 0xBBBAB5BB,
+ 0xB6BCBBB3, 0xBCB7BCBD, 0xBDBCB8BD, 0xB7BDBCB7,
+ 0xBCB8BEBD, 0xBEBBB7BD, 0xB8BFBCB7, 0xBBB7BEBB,
+ 0xBDBBB7BE, 0xBABFBDB8, 0xBBBBC0BE, 0xBCBAB8BD,
+ 0xBABFBDB7, 0xBFB8BEBD, 0xBFBEBAC0, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBEBFB9BF, 0xB9BEBFB9, 0xC0B7BFBF, 0xBFC0B8C0,
+ 0xB9BEBFBA, 0xBFB9C1C0, 0xBDBCB8C0, 0xB6BCBBB7,
+ 0xBCB6BCBB, 0xBDBCB7BD, 0xBAC0BFB7, 0xBFB8BEBD,
+ 0xC0BFBAC0, 0xB9BFBEBA, 0xBEB9BFBE, 0xBEBFB9BF,
+ 0xB9BEBFB9, 0xC0BABFC0, 0xC0C0BABF, 0xB8C0C0B8,
+ 0xC0BABFC0, 0xC0C0BABF, 0xB8C0C0B8, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBEB7BFBE, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xBFBAC0BF, 0xC0BFBAC0, 0xBABFC0BA,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBFBAC0BF, 0xC0BEBAC0,
+ 0xBBC0BEBB, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBDBABFBD, 0xC0BBBABF, 0xBBC1BCBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBAC0BF, 0xC1C0B9BF,
+ 0xB7BFBEBB, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0BFB8,
+ 0xBEBAC1BE, 0xC1BCBBC0, 0xBBC1BCBB, 0xBEBABFBD,
+ 0xC0BBBBC0, 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBAC0BBBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000100, 0x00000001, 0x02000102, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5D5D, 0xC3C1BEC3,
+ 0xBEC3C1C0, 0xBFBABFBE, 0xBFBEBAC0, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xBBBFC0BA, 0xBFBAC0BF,
+ 0xBFC0BAC0, 0xBBBFC0BB, 0xBEBABFC0, 0xBFBEB9BF,
+ 0xBABFBEBA, 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xC0B8C0C0, 0xBFBFB6C0, 0xB8C0C0B7, 0xC1B8C0C0,
+ 0xC0C0B9C1, 0xB8C0C0B8, 0xC0B6C0C0, 0xC0C0B6C0,
+ 0xB9C1C1B8, 0xC0B9C1C1, 0xC2C1B9C1, 0xBBC1C0BA,
+ 0xC0BBC1C0, 0xC0C1BCC1, 0xBABFC0BB, 0xC0BBC1C0,
+ 0xC0C1BBC1, 0xBABFC0BB, 0xBFBBC1C0, 0xBFC0BAC0,
+ 0xBBC0C1BA, 0xBFB7BFBE, 0xC0BFB8C0, 0xB8C0BFB8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xBDBBC2BF, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBDB9C0BD, 0xBFBEB9C0, 0xB8BDBCBA,
+ 0xBDB9BFBE, 0xBEBDB8BE, 0xB8BDBCB9, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB6BBBAB8, 0xB2A3A8A6, 0xBBB9AFB4,
+ 0xB6BBB9B8, 0xBBB8BDBB, 0xBEBDB7BE, 0xB7BCBAB9,
+ 0xBDBBBEBC, 0xBFBABCBF, 0xBDC1BCBB, 0xBBBAC0BB,
+ 0xC1BCBAC0, 0xBAC0BBBB, 0xBEBABFBD, 0xBFBEBBC0,
+ 0xB4BAB9BA, 0xB8A2ADAB, 0xBDB8B2BB, 0xB8BCB7B7,
+ 0xB7B9BDB8, 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B8BCB7,
+ 0xBCB5B8BC, 0xB5BDB3B5, 0xB8B8C0B9, 0xB4ADB8BF,
+ 0xADB4ADAD, 0xA9ADB5AE, 0xB4ACA6B1, 0xAAB3A9A9,
+ 0xA8ACB1A8, 0xB3AAACB1, 0xB1B4ABAE, 0xA4ABAFA4,
+ 0xAEA3ABAF, 0xA9AFA4A8, 0xA3A5ADA3, 0xACA3A5AD,
+ 0xA7ADA2A7, 0x9CA6ADA0, 0xADA0A4AB, 0xA6ADA0A6,
+ 0x9CA4AB9E, 0xA79BA2A9, 0xA6AA9EA3, 0x9BA9ADA1,
+ 0xA79BA3A7, 0xA3A79BA3, 0x97A0A498, 0xA59A9FA3,
+ 0x9EA499A1, 0x91989C91, 0x9D92989C, 0x989A9499,
+ 0x01262725, 0x01010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x37282828, 0x38383737,
+ 0x40413F38, 0x3F424341, 0x433E4243, 0x60645F3F,
+ 0xBBBABDBB, 0xBDB8BABD, 0xB6BCB7B7, 0xB6B8BCB7,
+ 0xBAB8B7BB, 0xB9BEBCB5, 0xBEBABFBE, 0xBFBEBABF,
+ 0xB7BCBABA, 0xBCB9BEBC, 0xC1BBBBC1, 0xBCC0BBBD,
+ 0xBEBBC1BC, 0xC0BFBAC1, 0xB8C0C0B8, 0xC0B9C1C0,
+ 0xC1C0B9C1, 0xBBC1C0BB, 0xC0B8C0C0, 0xBDBCB8C0,
+ 0xBAC0BFB7, 0xC0B8C0C0, 0xBFC2B8C0, 0xB8C0C0B8,
+ 0xBBBAC0BF, 0xC0C0B7BE, 0xB8C0C0B8, 0xBFB7BFBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xBBC1C0BB, 0xC0BBC1C0, 0xC0C1BBC1, 0xBBC0C1BB,
+ 0xC0BABFC0, 0xBFC0BABF, 0xB9BEBFBA, 0xC0B7BFBF,
+ 0xBFBFB8C0, 0xB7BFBFB7, 0xBFB7BFBE, 0xBDBCB8C0,
+ 0xBABFBEB7, 0xBABAC1BE, 0xC0BFB6BD, 0xBBC1C0BA,
+ 0xBAB9BFBE, 0xBFBDB6BD, 0xBABFBDBA, 0xBDBAC1BE,
+ 0xC1BFB9C0, 0xBBC0BEBC, 0xBDB8BEB9, 0xC0BFBABF,
+ 0xBABFBEBB, 0xBCB9BFBE, 0xBBBAB7BD, 0xBABFBDB6,
+ 0xBAB8BEB9, 0xBEB9B9BF, 0xB7BBB6BA, 0xB7B5B9B4,
+ 0xB9B4B8BC, 0xB5B9B4B5, 0xB4B3B7B2, 0xB9B4B5B9,
+ 0xB2B8B3B5, 0xB1B1B8B1, 0xBBB4B0B8, 0xB5BCB5B4,
+ 0x3F80847F, 0x43414044, 0x40443F40, 0x36373B36,
+ 0x3733383C, 0x32302F38, 0x07080507, 0x05050805,
+ 0x46474305, 0x5251554A, 0x77695E61, 0x7A776878,
+ 0x6B7C7B6D, 0x7B6D7A79, 0x7D7D6D7C, 0x677D7B69,
+ 0x79677C7B, 0x7875667B, 0x60707060, 0x66586F6E,
+ 0x5C5C5066, 0x4A505148, 0x1C184E50, 0x0304001B,
+ 0x01000100, 0x00010101, 0x01000200, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x7F404341,
+ 0x847F8084, 0x7E857E80, 0x84868C81, 0x958A8A91,
+ 0x8D958B8D, 0x9391998F, 0x9C91959D, 0x9AA09596,
+ 0x979BA196, 0xA3989CA2, 0x9FA3989F, 0x969FA397,
+ 0xA5999EA2, 0xA3A599A3, 0x98A1A697, 0xA798A2A7,
+ 0xA3A899A2, 0x99A3AB9A, 0xAA99A2AA, 0xA4AC9BA2,
+ 0x9DA5AD9C, 0xAC9DA5AC, 0xA6ADA0A5, 0xA0A8ACA0,
+ 0xAFA0A8AC, 0xAAAFA0AA, 0x9FAAB1A4, 0xACA1A5AC,
+ 0xA7ACA3A6, 0xA7A8ACA6, 0xABA7A8AC, 0x9B9F9AAA,
+ 0xB3949B94, 0xB8B6B3BA, 0xB3B9B4B3, 0xB5B8BCB6,
+ 0xBCB7B7BB, 0xB8BCB7B8, 0xB8B8BCB7, 0xBAB8B9BD,
+ 0xBABDBBB7, 0xBABBBEBC, 0xBDBBB9BC, 0xB7BDBCB8,
+ 0xBCB8BCBD, 0xBCBAB8BD, 0xB9BEBCB7, 0xB7B8BCB7,
+ 0xBBB6B8BC, 0xB8BBB9B7, 0xB9B5BAB9, 0xBBBAB4BA,
+ 0xB6BCBBB5, 0xBDB7BCBD, 0xBDBCB8BC, 0xB7BDBCB7,
+ 0xBCB7BDBC, 0xBEBBB7BD, 0xB7BEBBB7, 0xBBB6BDBA,
+ 0xBDBBB7BE, 0xB8BDBBB8, 0xBBB7BCBA, 0xBFBDB8BD,
+ 0xBABFBDBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB7BDBCB9,
+ 0xBDB9BFBE, 0xBFBEB8BE, 0xBAC0BFB9, 0xBEB9BFBE,
+ 0xBEBFB9BF, 0xBABFC0B9, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xBDB8C0BF, 0xBCBBB6BE, 0xB6BCBBB6,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB6BCBBB7, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBDB8BEBD, 0xBEBFB8BE,
+ 0xB9BEBFB9, 0xC0BABFC0, 0xC0C0BABF, 0xB8C0C0B8,
+ 0xC0BBC0C1, 0xC0C0BABF, 0xB8C0C0B8, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBEB7C0BD, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xBFBAC0BF, 0xBFC0BAC0, 0xBAC0BFBA,
+ 0xBFBAC0BF, 0xC0BEBAC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBFBAC0BF, 0xC0BEBAC0,
+ 0xBBC0BEBB, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBDB9BEBC, 0xC0BBBABF, 0xBAC0BBBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEB9BFBE, 0xBEBDB9BF,
+ 0xB2BAB9B8, 0xBFB9C1C0, 0xC0C0B8C0, 0xB8C0BFB8,
+ 0xBEBAC1BE, 0xC1BCBBC0, 0xBBC1BCBB, 0xBDBABFBD,
+ 0xC0BBBABF, 0xBBC1BCBA, 0xBBBBC1BC, 0xC0BBBAC0,
+ 0xBAC0BBBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5E5C, 0xC3C1BEC3,
+ 0xBEC3C1C0, 0xBEB9BEBD, 0xC0BFB9BF, 0xBBC1C0BA,
+ 0xBFBBC1C0, 0xBFC0BAC0, 0xBBBFC0BB, 0xC0BABFC0,
+ 0xBEC2BABF, 0xBBBFC0BB, 0xC0BABFC0, 0xBFBEBABF,
+ 0xBABFBEBA, 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB9C1C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC1B4BDC0, 0xBDC0B3BF,
+ 0xB6C0C0B4, 0xC0B8C0C0, 0xC1C0B9C1, 0xBBC2BFBB,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB, 0xBFBBC1C0,
+ 0xC0C0BAC0, 0xB8C0C0B8, 0xC0B9C1C1, 0xC1C1B8C0,
+ 0xB8C0C0B9, 0xBFB7BFBE, 0xC0BFB8C0, 0xB8C0BFB8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xBDB9C0BD, 0xBFBCB9C0,
+ 0xB9C0BDB8, 0xBDB9C0BD, 0xBDBBB9C0, 0xB8BDBBB8,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xBABEBFBA, 0xBDB7BCBD,
+ 0xBDBCB7BC, 0xB7BDBCB7, 0xB9B0B5B3, 0xBCB7B6BB,
+ 0xB5BBB6B8, 0xB9B8BEB9, 0xBCBAB7BE, 0xB8BEB9B7,
+ 0xBABCC0BB, 0xBEBABBBF, 0xBCC0BBBD, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEBABFBE, 0xC0BDBABF,
+ 0xB2BBB8B9, 0xB8A2ADAB, 0xBCB7B2BB, 0xB8BCB6B6,
+ 0xB7B9BDB8, 0xBBB9B6BC, 0xB8BBB9B8, 0xB6B8BBB9,
+ 0xBCB5B7BB, 0xB5BCB5B5, 0xB7B9C1B7, 0x9990B9C1,
+ 0xADB2A994, 0xACABB3AC, 0xB5AEABB3, 0xABB3ACAD,
+ 0xA9AEB3AA, 0xB3AAAEB4, 0xAAAFA6AE, 0xA4AAAFA6,
+ 0xAFA4A9AF, 0xA5ABA0A9, 0xA2A2AA9F, 0xAA9FA5AD,
+ 0xA1A99EA2, 0x9AA6ADA0, 0xA798A2A9, 0xA5AC9DA0,
+ 0x9BA2A99A, 0xAB9CA3AA, 0xA6AB9CA6, 0x9BA5A99D,
+ 0xAA9EA3A7, 0xA3A79BA6, 0x98A2A498, 0xA59AA0A4,
+ 0xA1A59AA1, 0x60989B92, 0x34306466, 0x33343233,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x38252727, 0x38383638,
+ 0x3F403E38, 0x3E424341, 0x443E4142, 0x61656040,
+ 0xBBB9BEBC, 0xBAB8B8BD, 0xB8BBB9B7, 0xBAB8BEB9,
+ 0xBFBAB9BF, 0xB6BBB9B9, 0xBEB6BCBB, 0xC1C0BABF,
+ 0xBDC0BEBC, 0xBABBBEBC, 0xC1BCBBBF, 0xBCC0BBBD,
+ 0xBEBBC1BC, 0xC0BFBAC1, 0xB8C0C0B8, 0xC0BBC1C0,
+ 0xC1C1BBC1, 0xB9C1C1B9, 0xC0B8C0C0, 0xBDBCB8C0,
+ 0xB9BFBEB7, 0xC0B8C0C0, 0xBFC2B8C0, 0xB8C0C0B6,
+ 0xBABAC0BF, 0xC0C0B6BD, 0xB8C0C0B8, 0xC0B5BFBF,
+ 0xC0C0B6C0, 0xB8C0C0B8, 0xBFBBC1C0, 0xC1BFBBC2,
+ 0xBCC1BFBC, 0xBFBAC0BF, 0xC0C0BAC0, 0xB8C0C0B8,
+ 0xC0BABFC0, 0xC1C1BABF, 0xB7BFBFB9, 0xC0B8C0C0,
+ 0xBEC1B8C0, 0xB7BFBFB7, 0xBFB6BEBD, 0xBDBCB8C0,
+ 0xB5BBBAB7, 0xBAB6BBB9, 0xBFBEB6BD, 0xB6BEBDB9,
+ 0xBBB4BCBB, 0xC0BEB6BC, 0xBABFBDBB, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBDB7BEBB, 0xC0BFB9C0,
+ 0xB9BFBEBA, 0xBAB9BFBE, 0xBDBBB6BD, 0xBABFBDB8,
+ 0xB9BABEB9, 0xBBB6BABE, 0xB7BBB6B7, 0xB7B9BDB8,
+ 0xB9B4B8BC, 0xB5B9B4B5, 0xB7B5B9B4, 0xB9B4B8BC,
+ 0xB1B7B2B5, 0xB1B1B8B1, 0xBAB3B0B8, 0xB5BCB5B3,
+ 0x4080847F, 0x433E4145, 0x40443F3F, 0x33383C37,
+ 0x37333438, 0x32302F38, 0x08080507, 0x06060906,
+ 0x48474308, 0x514F5348, 0x6C5E5D60, 0x7877696C,
+ 0x6B777767, 0x7B6B7B7B, 0x7878687B, 0x69777767,
+ 0x79697979, 0x76776778, 0x586F7060, 0x5C506666,
+ 0x5251475C, 0x17505148, 0x03001B1D, 0x00040002,
+ 0x00000100, 0x00000001, 0x02000002, 0x00020000,
+ 0x00000200, 0x01010102, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00010000, 0x00000000, 0x7F424341,
+ 0x847E8084, 0x80857C80, 0x84868D80, 0x958A8A91,
+ 0x909A8E8D, 0x9390998F, 0x9D92959D, 0x9AA09597,
+ 0x989AA297, 0xA4999DA3, 0xA1A59AA0, 0x9AA1A59A,
+ 0xA69AA1A5, 0xA3A599A4, 0x98A2A798, 0xA798A2A7,
+ 0xA3A899A4, 0x9AA2A99A, 0xA99AA2A9, 0xA3AA9BA2,
+ 0x9DA5AC9D, 0xAC9DA5AC, 0xA7AE9FA5, 0xA1A8ACA0,
+ 0xAFA0A9AD, 0xA9AE9FAA, 0xA0A6ADA0, 0xACA1A6AD,
+ 0xA7ACA3A6, 0xA6A8ACA6, 0xACA7A8AC, 0xA2A6A1A8,
+ 0xB3949B94, 0xC8C6B3BA, 0xB4B9B7C3, 0xB4B5BBB6,
+ 0xBDB8B4BB, 0xB8BCB7B9, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB9BDB8B8, 0xB7BBBFBA, 0xBCBAB8BC, 0xB8BDBBB7,
+ 0xBAB7BCBB, 0xBBB9B6BB, 0xB8BBB9B8, 0xB5B8BCB7,
+ 0xBAB8B6BA, 0xB6B8B8B7, 0xBAB6BBBA, 0xBCBBB5BB,
+ 0xB6BCBBB6, 0xBBB6BCBB, 0xBCBBB6BC, 0xB7BCBBB7,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBDB7BDBC,
+ 0xBFBEB8BE, 0xB8BEBDB9, 0xBEB7BDBC, 0xBEBDB9BF,
+ 0xB8BDBCB9, 0xBFB7BCBB, 0xBFBEBBC0, 0xBABFBEBA,
+ 0xBBB9BEBC, 0xBDBCB8BD, 0xB9BFBEB7, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xBAC0BFBA, 0xC0B9C1C1, 0xC0BFB8C0,
+ 0xB9BFBEBA, 0xBCB7BDBC, 0xBCBDB7BD, 0xB7BCBDB7,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB8BEBDB7, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBEB8BEBD, 0xBEBFB9BF,
+ 0xB9BEBFB9, 0xC0B8C0C0, 0xC0C0B8C0, 0xB9C1C1B8,
+ 0xC0BBC1C0, 0xC0C0BBC1, 0xB8C0C0B8, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBFB8C0BF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB8C0BF, 0xC0BFB8C0, 0xBAC0BFBA,
+ 0xBEBAC0BF, 0xC0BEBAC1, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBDBCBFBD, 0xBFBDBCBF, 0xBABFBDBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBDBABFBD, 0xBFBDBABF,
+ 0xB6BDBABA, 0xBDBAC1BE, 0xB8B7B9C0, 0xB6BDBAB2,
+ 0xBEBBC0BE, 0xC1BCBBC0, 0xBBC1BCBB, 0xBDBABFBD,
+ 0xC1BCBABF, 0xBBC1BCBB, 0xBBBBC1BC, 0xC0BBBAC0,
+ 0xBAC0BBBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC05B5E5C, 0xC3C1BDC2,
+ 0xC1C4C2C0, 0xBEBABFBD, 0xBDBCB9BF, 0xB7BDBCB7,
+ 0xBAB7BDBC, 0xBCBDB5BB, 0xB9BEBFB7, 0xC0BABFC0,
+ 0xBFC0BABF, 0xBABFC0BB, 0xC0BABFC0, 0xBFBEBABF,
+ 0xBAC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB9C1C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB3BDBD, 0xBCBFB3BC,
+ 0xB8C0C0B3, 0xBFB8C0C0, 0xC1C0B8C0, 0xBBC1C0B9,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB, 0xBFBAC0BF,
+ 0xC0C0BAC0, 0xB9C1C1B8, 0xC1B9C1C1, 0xC2C2B9C1,
+ 0xB8C0C0BA, 0xBFB7BFBE, 0xC1C0B8C0, 0xB8C0BFB9,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xBEB9BFBE, 0xC0BDBAC1,
+ 0xBAC1BEB9, 0xBEB9C0BD, 0xBDBBBAC1, 0xBABFBDB8,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xBABEBFBA, 0xBCB7BCBD,
+ 0xBCBBB7BD, 0xB6BCBBB6, 0xB9B5BAB9, 0xBBB9B6BB,
+ 0xB6BBB9B6, 0xB9B0B6B1, 0xBEB9B8BE, 0xB7BDB8B8,
+ 0xB7B6BCB7, 0xBFBAB8BC, 0xBABDBBBB, 0xBDB9BEBC,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEBABFBE, 0xC1BEBABF,
+ 0xB2BBB8BA, 0xB9A9B1B0, 0xBCB7B3BC, 0xB8BCB6B6,
+ 0xB7B8BEB9, 0xBBB9B6BC, 0xB8BBB9B8, 0xB6B8BBB9,
+ 0xBBB6B5BB, 0xB5BCB5B5, 0xAAB9C1B7, 0x9990AEB3,
+ 0xA1A69D96, 0xACAEB6AC, 0xB2ABABB3, 0xACB3ACAB,
+ 0xA9AFB5AA, 0xB4A9AEB4, 0xA7ADA2AE, 0xA4A9AEA5,
+ 0xADA0A9AF, 0xA6ADA0A6, 0x9FA2AA9F, 0xAB9EA2AA,
+ 0xA5AEA1A2, 0x9CA7AE9F, 0xA899A4AB, 0xA4AB9CA1,
+ 0x9BA0A798, 0xAC9DA4AC, 0xA3A79BA7, 0x9EA5A99D,
+ 0xA79CA3A9, 0xA6AA9FA3, 0x99A0A499, 0x9289A2A3,
+ 0x6A6C668F, 0x0033352F, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x38262828, 0x38383638,
+ 0x38383838, 0x3F424341, 0x443F4243, 0x60645F40,
+ 0xBBB8BDBB, 0xBBB9B8BD, 0xB9BCBAB8, 0xB9B8BEB9,
+ 0xBEB9B8BE, 0xBAC0BBB8, 0xBBBABFBD, 0xBCBBB7BC,
+ 0xB8BBB9B7, 0xBAB8BCB7, 0xC0BBBBBF, 0xBAC0BBBC,
+ 0xBEBBC1BC, 0xC0C0BAC1, 0xB8C0C0B8, 0xC0BBC1C0,
+ 0xC0C0BBC1, 0xB8C0C0B8, 0xC0B9C1C1, 0xBDBCBABF,
+ 0xB9BFBEB7, 0xC0B8C0C0, 0xBFC2B8C0, 0xB8C0C0B6,
+ 0xBAB7BFBE, 0xC0C0B5BB, 0xB8C0C0B8, 0xC0B5BFBF,
+ 0xC0C0B6C0, 0xB8C0C0B8, 0xBFBAC0BF, 0xC1BFBBC2,
+ 0xBCC1BFBC, 0xC1BBC1C0, 0xC0C0BCC2, 0xB7BFBFB8,
+ 0xC0BABFC0, 0xC0C0BABF, 0xB5BDBDB8, 0xC0B8C0C0,
+ 0xBFC2B8C0, 0xB8C0C0B8, 0xBFB9C1C0, 0xBFBEB8C0,
+ 0xB9BFBEB9, 0xBBB8BDBB, 0xBFBEB7BE, 0xB7BFBEB9,
+ 0xBEB5BDBC, 0xC0BEB9BF, 0xBABFBDBB, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBCB7BEBB, 0xBFBEB8BF,
+ 0xB9BFBEB9, 0xBBB9C0BD, 0xBDBBB7BE, 0xB8BDBBB8,
+ 0xB5BABEB9, 0xBBB6B6BA, 0xB6BAB5B7, 0xB7B8BCB7,
+ 0xB7B2B8BC, 0xB5B9B4B3, 0xB3B3B7B2, 0xBDB8B4B8,
+ 0xB1B7B2B9, 0xB1B3BAB3, 0xB8B1B0B8, 0xB5BCB5B1,
+ 0x3D80847E, 0x45403F43, 0x40443F41, 0x33373B36,
+ 0x37333637, 0x2D2B2A36, 0x07080507, 0x06060805,
+ 0x47474108, 0x52525448, 0x77695E61, 0x78786877,
+ 0x69787868, 0x7B6B7979, 0x7878687B, 0x69777767,
+ 0x76687979, 0x74746676, 0x566F7060, 0x5B516564,
+ 0x5250485C, 0x001B1D17, 0x04000203, 0x00030100,
+ 0x00000100, 0x00000000, 0x02000002, 0x00020000,
+ 0x00000000, 0x00000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00010000, 0x00000000, 0x7F424341,
+ 0x847F8084, 0x80857C80, 0x83878E81, 0x958A8990,
+ 0x8C94898D, 0x9291998F, 0xA095959D, 0x9AA1949A,
+ 0x989BA398, 0xA3989DA3, 0x9FA3989F, 0x9A9FA398,
+ 0xA498A1A5, 0xA3A599A2, 0x9AA2A798, 0xA899A4A9,
+ 0xA3A899A5, 0x9AA4A99A, 0xA89BA2A9, 0xA4AB9CA1,
+ 0x9DA4AB9C, 0xAD9CA5AC, 0xA5AC9DA5, 0xA1A8ACA0,
+ 0xADA1A9AD, 0xA9ADA1A9, 0xA1A7AEA1, 0xACA1A6AC,
+ 0xA7ADA2A6, 0xA6A8ADA4, 0xACA6A8AC, 0xA8ACA6A8,
+ 0xC4A4ABA4, 0xCAC5C4CB, 0xB2B7B5C6, 0xB5B6BCB7,
+ 0xBBB6B5BC, 0xB9BDB8B7, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xB7B8BCB7, 0xBBB6B8BC, 0xB8BDBBB5,
+ 0xBCB8BDBC, 0xBDBBB8BD, 0xBABDBBBA, 0xB9B8BBB9,
+ 0xBBB9B8BB, 0xB8BABAB8, 0xBAB4B9B8, 0xBBBAB6BB,
+ 0xB5BBBAB5, 0xBBB6BCBB, 0xBCBBB6BC, 0xB7BCBBB7,
+ 0xBAB6BCBB, 0xBDBCB5BB, 0xB6BCBBB7, 0xBDB7BDBC,
+ 0xBFBEB8BE, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xBABFBEBA, 0xBCB7BCBB, 0xBDBCB8BD, 0xB8BDBCB8,
+ 0xBDBBC0BE, 0xBEBDBABF, 0xB9BFBEB8, 0xBEB9C0BD,
+ 0xBFBEBAC1, 0xB8BEBDBA, 0xC1BABFC0, 0xBEBDB9C1,
+ 0xB7BDBCB8, 0xBCB6BCBB, 0xBCBDB7BD, 0xB6BBBCB7,
+ 0xBAB6BCBB, 0xBCBBB5BB, 0xB6BCBBB6, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xB9BFBEB8, 0xBFB9BFBE, 0xBFC0BAC0,
+ 0xBABFC0BA, 0xC0B9C1C1, 0xBFBFB8C0, 0xB8C0C0B7,
+ 0xC0BBC1C0, 0xC0C0BBC1, 0xB8C0C0B8, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBFB8C0BF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB8C0BF, 0xC0BFB8C0, 0xBAC0BFBA,
+ 0xBEBAC0BF, 0xC0BFBAC1, 0xBBC0BEBA, 0xBEBBC0BF,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBDBCBFBD, 0xBFBDBCBF, 0xBABFBDBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBDBABFBD, 0xC0BEBABF,
+ 0xB6BBB9BB, 0xBAB1B8B5, 0xB4B1B6BD, 0xB6BDBAAD,
+ 0xBEBBC0BE, 0xC1BCBBC0, 0xBBC1BCBB, 0xBDBBC0BE,
+ 0xC1BCBABF, 0xBCC2BDBB, 0xBBBBC1BC, 0xC0BBBAC0,
+ 0xBAC0BBBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF5B5E5C, 0xC4BFBEC4,
+ 0xC0C4BFC0, 0xBEBBC0BE, 0xC0BEBAC1, 0xBAC1BEBB,
+ 0xC0BAC0BF, 0xBFBEB8C0, 0xB7BFBEB7, 0xBFB7BFBF,
+ 0xBEBFB7BF, 0xB9BFBEB9, 0xBDB7BDBC, 0xBFC0B6BE,
+ 0xBABFC0BA, 0xC0BABFC0, 0xBFC0B8C0, 0xBABFC2BA,
+ 0xC2B8BFC2, 0xC0C0B8BF, 0xB8C0C0B8, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xB9C1C0BA, 0xC1B9C1C0, 0xC0C0B9C1,
+ 0xBABFC0B8, 0xC0BBC0C1, 0xBFBFB8C0, 0xB9C1C0B7,
+ 0xBFB9C1C0, 0xC1C0B8C0, 0xB9C1C0B9, 0xC0B8C0BF,
+ 0xC1C1B9C1, 0xB8C0C0B9, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0BF, 0xC1C0B9C1, 0xB8C0BFB9,
+ 0xC0BABFC0, 0xC0C0BABF, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xB9BEBFBA, 0xBEB9BEBF, 0xBFBEB9BF,
+ 0xBAC0BFB9, 0xBDB9BFBE, 0xBFBEB8BE, 0xBABFBEBA,
+ 0xBEB9BFBE, 0xBFBEB7BF, 0xB7BDBCB9, 0xBBB7BDBC,
+ 0xBFBDB7BE, 0xB8BDBCBA, 0xB9B7BDBC, 0xB8B7B4BA,
+ 0xB3B8B7B2, 0xB9A6ABA9, 0xBCB7B8BB, 0xB6BCB7B8,
+ 0xBEB9C0BD, 0xBFBDBAC1, 0xB8BDBBBA, 0xBCB9BEBC,
+ 0xBDBCB8BF, 0xB8BDBCB7, 0xBCB9BEBC, 0xBEBDB9BE,
+ 0xB3BBBAB8, 0xB9A8B0AF, 0xBCB7B3BC, 0xB6BCB7B6,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB8BCB7B8, 0xB8B6BCB7,
+ 0xBCB7B6BD, 0xB7BEB7B5, 0xA3B6BEB4, 0x9C91A7AC,
+ 0xAAAEA398, 0xAAB1B7AC, 0xB2A9ACB4, 0xAEB3AAAD,
+ 0xA5ABB2A5, 0xB5A8ABB2, 0xA8AFA2AE, 0xA2A8AEA3,
+ 0x988BA8AF, 0x9FA89B8F, 0x9AA1AA9D, 0xAA9B9EA7,
+ 0xA6AD9EA3, 0x9DA5AC9D, 0xAC9FA5AC, 0xA5AC9DA5,
+ 0x9EA8AD9E, 0xADA0A8AD, 0xA6ADA0A6, 0x9FA3A89F,
+ 0xA7A1A1A9, 0xA3A7A1A3, 0x226A6B67, 0x01002526,
+ 0x02000003, 0x00000100, 0x00000102, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x33262927, 0x3B3B3235,
+ 0x383A3A39, 0x40404040, 0x3F3F4040, 0x5E60603F,
+ 0xB8B7BCBA, 0xBDB8B7BD, 0xB7BDB8B7, 0xB8B7BDB8,
+ 0xBFB8B7BD, 0xB8BEB9B7, 0xBEBBC1BC, 0xBFBDBBC0,
+ 0xB7BCBABA, 0xB9B5BBB6, 0xC0BEB8BE, 0xB2B7B5BD,
+ 0xBFAEB3B1, 0xC0C0BAC0, 0xB8C0C0B8, 0xBFB8C0BF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB9BEBF, 0xBFBEBAC0,
+ 0xB7BDBCB9, 0xBFB8C0BF, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBCB8C0C0, 0xBDBDB4BC, 0xB8C0C0B5, 0xBFB8C0BF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BAC0BF, 0xC1C0BBC1,
+ 0xBAC0BFBB, 0xC0BABFC0, 0xBFC0BABF, 0xB9BEBFBA,
+ 0xBFB8C0BF, 0xBDBCB8C0, 0xB6BCBBB7, 0xC0B7BFBF,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xBFBAC0BF, 0xBEBFBAC0,
+ 0xB9BFBEB9, 0xBAB8BDBB, 0xC0BFB6BD, 0xB7BFBFBA,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBBC0BFBB, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xBBC0BFBA, 0xBDB8BDBB, 0xBFBEBABF,
+ 0xBABFBEBA, 0xBCB8BDBB, 0xBFBDB9BE, 0xB8BDBBBA,
+ 0xB7B8BCB7, 0xB9B4B8BC, 0xB8BCB7B5, 0xB7B8BCB7,
+ 0xB8B3B8BC, 0xB8BCB7B4, 0xB4B5B9B4, 0xBAB5B5B9,
+ 0xB1B7B2B6, 0xB1B1B8B1, 0xB7B2B0B8, 0xBAC1BAB1,
+ 0x38818881, 0x3F393C41, 0x3E403A3D, 0x37383935,
+ 0x35333839, 0x2A2A2A34, 0x07080507, 0x05060805,
+ 0x45423D0A, 0x4D4F4F43, 0x6B5B5C5D, 0x7878666B,
+ 0x66787866, 0x77687878, 0x7A77687A, 0x68787866,
+ 0x72647878, 0x73726473, 0x58686557, 0x635B6763,
+ 0x46433F66, 0x00000100, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00000001, 0x01010100, 0x00000000, 0x01010000,
+ 0x00000001, 0x00020000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x80404341,
+ 0x847F8185, 0x80847E80, 0x83868C81, 0x91868B8F,
+ 0x9094898D, 0x92949A8F, 0x9E91979D, 0x989F9097,
+ 0x939CA396, 0xA29699A0, 0x9EA2969E, 0x98A0A498,
+ 0xA599A0A4, 0xA3A599A3, 0x9BA2A69A, 0xA79BA3A7,
+ 0xA5A99DA5, 0x9CA4A89C, 0xACA1A2A9, 0xA6ADA0A6,
+ 0x9CA6AB9C, 0xAA9BA6AB, 0xA4AB9CA3, 0xA1A7AC9D,
+ 0xADA1A9AD, 0xA9ADA2A9, 0xA2A7ADA2, 0xAA9FA5AD,
+ 0xA5ADA2A2, 0xA3A9AEA5, 0xADA2A7AC, 0xA9AFA4A7,
+ 0xB8ABB0A7, 0xC1BBBCC1, 0xB6BAB4BF, 0xB7B6BCB7,
+ 0xBBB9B6BC, 0xB9BCBAB8, 0xBBB8BDBB, 0xBCBAB8BD,
+ 0xB8BDBBB7, 0xB9B8BDBB, 0xBEB9B8BE, 0xB8BDBBB8,
+ 0xBEB7BDBC, 0xBCBCBABF, 0xB9BCBABA, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB6BBBA, 0xBDBAB8BD,
+ 0xB7BEBBB6, 0xBBB7BDBC, 0xBBBCB6BC, 0xB7BBBCB7,
+ 0xBBB6BCBB, 0xBCBBB6BC, 0xB3B9B8B6, 0xBDB7BDBC,
+ 0xBDBCB8BE, 0xB7BDBCB7, 0xBBB8BEBD, 0xBEBDB6BC,
+ 0xB7BDBCB8, 0xBCB7BCBB, 0xBDBCB8BD, 0xB8BDBCB8,
+ 0xBDB9C0BD, 0xBFBEB9C0, 0xB9BFBEBA, 0xBDB8BFBC,
+ 0xC0BFB9C0, 0xB9BFBEBB, 0xBEB7BCBD, 0xBBBAB6BE,
+ 0xB2B8B7B3, 0xBBB3B9B8, 0xBDBCB7BC, 0xB7BDBCB7,
+ 0xBCB8BEBD, 0xBDBCB7BD, 0xB7BDBCB7, 0xC0BABFC0,
+ 0xBFC0BABF, 0xBABFC0BA, 0xC0BABFC0, 0xBFC0BABF,
+ 0xBCC1C2BA, 0xC0B8C0C0, 0xC0C0B8C0, 0xB9C1C1B8,
+ 0xBBBABFC0, 0xBBBBB5BA, 0xB7BFBFB3, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBFB8C0BF, 0xC0BDB8C0, 0xB9BFBEB9,
+ 0xBEBAC0BF, 0xBFC0B9BF, 0xBAC0BFBA, 0xBFBABFC0,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBEBBC0BE, 0xC1BEBBC0,
+ 0xBAC1BEBA, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBDB9C0BD,
+ 0xBFBDB9C0, 0xBABFBDBA, 0xBDBABFBD, 0xC1C0BABF,
+ 0xB4BAB9BB, 0xBBAEB4B3, 0xC0BFB6BC, 0xBAC0BFBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEBBC0BE, 0xC0BBBBC0,
+ 0xBAC0BBBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0xBF5B5F5A, 0xC4BEBEC4,
+ 0xC1C5C0C2, 0xBEBBC0BE, 0xC1BCBAC1, 0xBAC1BEBB,
+ 0xC0BAC0BF, 0xC0BFB8C0, 0xB8C0BFB8, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xBEB6BEBD, 0xBFC0B7BF,
+ 0xBABFC0BA, 0xC0B8C0C0, 0xBFC2B8C0, 0xBABFC2BA,
+ 0xC2B8BFC2, 0xC0C0B8BF, 0xB9C1C1B8, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xC0B9C1C0, 0xC0C1B9C1,
+ 0xBBC0C1BB, 0xC1BBC0C1, 0xBFBFB9C1, 0xB7C1C1B7,
+ 0xC0B9C1C0, 0xBFBEB9C1, 0xB9C1C0B7, 0xBFB8C0BF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xC0B8C0BF, 0xC1C0B9C1, 0xB9C1C0B9,
+ 0xC0BBC0C1, 0xC0C0BABF, 0xB8C0C0B8, 0xBFB7BFBF,
+ 0xBEBFB7BF, 0xB9BEBFB9, 0xC0BABFC0, 0xBFBEBABF,
+ 0xB9BFBEB9, 0xBCB8BEBD, 0xBDBCB7BD, 0xB7BDBCB8,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BEBDB9, 0xBDB9BFBE,
+ 0xBDBBB9C0, 0xB8BDBCB8, 0xBEB7BCBD, 0xB9BAB6BE,
+ 0xB2B8B7B4, 0xB8ABB0AE, 0xBCB7B7BA, 0xB6BCB7B8,
+ 0xBBB7BEBB, 0xBEBDB7BE, 0xB8BDBCB9, 0xBCB8BFBC,
+ 0xBEBDB8BF, 0xB7BDBCB8, 0xBCB9BEBC, 0xBEBDB9BE,
+ 0xB5BBBAB9, 0xBAA8B0AF, 0xBCB9B3BB, 0xB6BBB9B5,
+ 0xB7B8BEB9, 0xBDB8B8BC, 0xBABEB9B9, 0xB8B7BDB8,
+ 0xBEB9B6BD, 0xB8BEB9B7, 0xA4B5BCB5, 0x9C91A8AD,
+ 0xA8ACA198, 0xAAAFB5AA, 0xB6ADAFB5, 0xB1B7ACB1,
+ 0xA5ABB2A5, 0xB4A8ADB4, 0xAEB2A6B0, 0xA2A8AFA2,
+ 0xA89BA8AF, 0xA5AEA19F, 0x9BA3AC9F, 0xAA9BA1AB,
+ 0xA4AC9BA3, 0x9DA5AC9D, 0xAB9EA5AC, 0xA5AC9FA4,
+ 0xA0A8ACA0, 0xACA1A8AC, 0xA6ACA1A6, 0xA3A3A7A1,
+ 0x3934A2A8, 0x35383633, 0x00000100, 0x00000001,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x33262927, 0x3A383235,
+ 0x393B3B37, 0x40404040, 0x40424040, 0x60606041,
+ 0xB8B9BCBA, 0xBDB8B7BD, 0xB7BDB8B7, 0xB8B7BDB8,
+ 0xBFB8B7BD, 0xB7BEB7B8, 0xBBB8BEB9, 0xBFBDBAC0,
+ 0xB9C0BDBA, 0xBCB5BBB6, 0xBDBBBBC1, 0xB5BAB8B8,
+ 0xBFB2B8B7, 0xC1C1BAC0, 0xB8C0C0B9, 0xBFB7BFBE,
+ 0xC0C0B8C0, 0xB9C1C1B8, 0xBFB6BCBB, 0xC0BFBBC0,
+ 0xB7BDBCBA, 0xBFB8C0BF, 0xBFBFB8C0, 0xB8C0C0B7,
+ 0xBDB8C0C0, 0xBFBFB5BD, 0xB7BFBFB7, 0xBEB5BDBC,
+ 0xC0C0B7BF, 0xB8C0C0B8, 0xC0BAC0BF, 0xC1C0BBC1,
+ 0xBAC0BFBB, 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA,
+ 0xBCB5BDBC, 0xBCBBB5BD, 0xB7BDBCB6, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBEBAC0BF, 0xBCBDB9BF,
+ 0xBAC0BFB7, 0xBCB8BDBC, 0xBEBFB7BD, 0xB8C0C0B9,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBBC0BFBB, 0xBFB9BFBE,
+ 0xBFBEBAC0, 0xB6BBBABA, 0xBDB6BBB9, 0xBFBEBABF,
+ 0xBBC0BFBA, 0xBBB6BBB9, 0xBEBDB8BD, 0xB9BEBCB9,
+ 0xB8B8BBB9, 0xB9B4B9BD, 0xB2B6B1B5, 0xB7B3B7B2,
+ 0xB9B4B8BC, 0xB8BCB7B5, 0xB2B5B9B4, 0xB9B4B3B7,
+ 0xB1B7B2B5, 0xB1B1B8B1, 0xB7B2B0B8, 0xBEC5BEB1,
+ 0x38818881, 0x41383C41, 0x41413B3E, 0x37383935,
+ 0x36343839, 0x29292935, 0x07080507, 0x05060A05,
+ 0x46423D0B, 0x4D504E43, 0x6B595D5D, 0x7878666B,
+ 0x64777765, 0x77687676, 0x7875667A, 0x64737361,
+ 0x72627474, 0x6E6D5F72, 0x5B676358, 0x423F6964,
+ 0x0A060547, 0x01000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x01020000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x81404341,
+ 0x847F8083, 0x80847E7E, 0x83878B80, 0x8F858B8F,
+ 0x9192888E, 0x8F969A8F, 0x9F92979B, 0x979E8F98,
+ 0x949AA192, 0xA4989CA3, 0xA0A498A0, 0x98A0A498,
+ 0xA498A0A4, 0xA3A599A2, 0x9BA3A79B, 0xA79BA3A7,
+ 0xA5A99DA5, 0x9AA1A79C, 0xA99E9FA5, 0xA6ACA1A3,
+ 0x9FA8ACA0, 0xAC9DA9AE, 0xA4AB9CA5, 0x9FA9AE9F,
+ 0xADA1A7AB, 0xA7ADA2A9, 0xA3A7ACA3, 0xAA9FA5AD,
+ 0xA5ADA2A2, 0xA0A7ADA2, 0xADA2A5AB, 0xA7ADA2A7,
+ 0xB8ABB0A7, 0xC1B8BCC1, 0xB8BAB4BE, 0xB8B7BDB8,
+ 0xBCBAB6BD, 0xB6BBB9B7, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBBB7BCBA, 0xBEB9B8BD, 0xB8BDBBB8,
+ 0xBEB9BFBE, 0xBEBDB9BF, 0xBABFBEB9, 0xBBBABFBD,
+ 0xBDBBB8BD, 0xB6BBB9B8, 0xBEB8BDBC, 0xC1BEBABF,
+ 0xB8BFBCBA, 0xBBB6BCBB, 0xBDBCB6BC, 0xB7BDBCB8,
+ 0xBDB7BDBC, 0xBDBCB8BE, 0xB6BCBBB7, 0xBCB7BDBC,
+ 0xBCBBB7BD, 0xB7BDBCB6, 0xBCB7BDBC, 0xBCBBB7BD,
+ 0xB6BCBBB6, 0xBCB6BBBA, 0xBCBBB8BD, 0xB8BDBCB7,
+ 0xBBB7BEBB, 0xBDBCB7BE, 0xB7BDBCB8, 0xBDB7BEBB,
+ 0xBFBEB9C0, 0xB8BEBDB9, 0xC0B5BDBD, 0xBDBCB8C0,
+ 0xB0B8B7B5, 0xBCB6BCBB, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xC0BABFC0,
+ 0xBFC0BABF, 0xBABFC0BA, 0xC0BABFC0, 0xC1C2BABF,
+ 0xBDC2C3BC, 0xC0B8C0C0, 0xC0C0B8C0, 0xB7BFBFB8,
+ 0xB0B5BABB, 0xB4B4AAAF, 0xB8C0C0AC, 0xC0B9C1C1,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBEB8C0BF, 0xBFBEB7BF, 0xB9BFBEB9,
+ 0xBFBAC0BF, 0xBFBFB9BE, 0xB8C0C0B7, 0xC0BBC0C1,
+ 0xC0BFBABF, 0xBAC0BFB8, 0xBEBBC0BE, 0xC1BEBBC0,
+ 0xBAC1BEBA, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBAC0BF, 0xBDBCB9BF, 0xB9BFBEB7, 0xBDB9C0BD,
+ 0xBFBDB9C0, 0xBBC0BEBA, 0xBCBABFBD, 0xBFBEB9BE,
+ 0xB6BCBBB9, 0xBBB6BCBB, 0xBCBBB6BC, 0xBAC0BFB6,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEBBC0BE, 0xC0BBBBC0,
+ 0xBAC0BBBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0xBE5B5F5A, 0xC3BFBEC5,
+ 0xC1C5C0C2, 0xBEBBC0BE, 0xC0BEBBC0, 0xB9C0BDBB,
+ 0xBFBAC0BF, 0xBFBEB8C0, 0xB8C0BFB7, 0xC0B8C0C0,
+ 0xBFBEB8C0, 0xB9BFBEB9, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB8C0C0, 0xBFC0B7BF, 0xBABFC0BA,
+ 0xC0B9C1C1, 0xBFC0B8C0, 0xBABFC0BA, 0xC0BAC0BF,
+ 0xC2BFBBC1, 0xBBC2BFBB, 0xC0BAC2C1, 0xC1C0B9C1,
+ 0xBBC1C0BB, 0xC1B9C1C1, 0xBDBDB9C1, 0xB6BEBEB5,
+ 0xC1B9C1C0, 0xC1C1BAC2, 0xB9C1C1B9, 0xBFB8C0BF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xB9BEBFBA, 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB,
+ 0xC0B9C1C1, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0,
+ 0xBFC0B7BF, 0xBBC0C1BA, 0xC0BABFC0, 0xBFBEBABF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xBAC0BFB9, 0xBFB9BFBE,
+ 0xBDBCBAC0, 0xBABFBEB8, 0xBFB7BCBD, 0xBABBB5BC,
+ 0xB6BCBBB5, 0xB7B6BBB9, 0xBCB7B6BC, 0xB6BCB7B8,
+ 0xBCB7BEBB, 0xBFBEB8BF, 0xB8BDBCBA, 0xBCB8BFBC,
+ 0xBDBCB6BF, 0xB9BFBEB7, 0xBDB9BEBD, 0xBDBEB9BE,
+ 0xB3B8B9B9, 0xB4A2AAAA, 0xB5B5AAB4, 0xB5BBBAAD,
+ 0xB9B8BDBB, 0xBBB9B6BB, 0xBABEB9B8, 0xB8B7BDB8,
+ 0xBDB8B8BF, 0xB5BBB6B7, 0xB3B4BBB4, 0x9B90B7BC,
+ 0xAAAEA397, 0xA9B1B7AC, 0xB4A9AEB4, 0xAFB5AAAE,
+ 0xA8ACB0A4, 0xB5A8B0B4, 0xADB4A7AE, 0xA2A8AFA2,
+ 0xB0A1A8AF, 0xA8AFA0A9, 0x9DA8AFA0, 0xAC9DA5AC,
+ 0xA5AC9DA5, 0x9EA5AC9F, 0xAC9DA4AB, 0xA7AB9FA7,
+ 0xA0A6ACA1, 0xACA3A5AB, 0x72746EA9, 0x00373836,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010100, 0x00000000, 0x00020000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020001,
+ 0x00000200, 0x00010000, 0x31252826, 0x36313236,
+ 0x383B3932, 0x3F40413F, 0x40404041, 0x60606042,
+ 0xB8B9BCBA, 0xBCBAB7BD, 0xB7BCBAB7, 0xB8B7BDB8,
+ 0xBDB8B9BD, 0xB6BCB7B9, 0xBDB5BCB9, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xB9B8BCB7, 0xC1BFB8BE, 0xB9BFBEBC,
+ 0xBBBAC0BF, 0xBCBCB4BC, 0xB8C0C0B4, 0xBFB9BFBE,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xBDB7BDBC, 0xC0BFB9C0,
+ 0xB7BDBCBA, 0xC1B7BFBF, 0xC0C0B9C1, 0xB8C0C0B8,
+ 0xBDB8C0C0, 0xBFC0B5BD, 0xBABFC0BA, 0xBCB9BFBE,
+ 0xC1C1B7BD, 0xB8C0C0B9, 0xBFBAC0BF, 0xC1C0BAC0,
+ 0xBAC0BFBB, 0xC0BABFC0, 0xC0C0BABF, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xBEBDB8C0, 0xB6BCBBB8, 0xC0B8C0BF,
+ 0xC0C0B9C1, 0xB7BFBFB8, 0xBEBBC1C0, 0xBEBDB9BF,
+ 0xBBC1C0B6, 0xBEB7BCBB, 0xBFC0B9BF, 0xB8C0C0BA,
+ 0xBDBAC0BF, 0xC1BFB9C0, 0xBCC1BFBC, 0xBDB9C0BD,
+ 0xC1C0B9C0, 0xB6BBBABC, 0xBEB5BBBA, 0xBFBEB9BF,
+ 0xBABFBEBA, 0xBBB6BBB9, 0xBDBCB8BD, 0xB8BDBBB8,
+ 0xB6B8BBB9, 0xB9B4B7BB, 0xB3B7B2B5, 0xB6B3B6B4,
+ 0xB9B4B5B8, 0xB5B9B4B5, 0xB2B1B7B2, 0xB8B3B1B7,
+ 0xB1B7B2B4, 0xB1B1B8B1, 0xB7B2B0B8, 0xB9C0B9B1,
+ 0x38818881, 0x41383C41, 0x3F3F393E, 0x343A3837,
+ 0x34323634, 0x2B2B2B33, 0x07080507, 0x05060A05,
+ 0x48423D0B, 0x4D504E43, 0x6B5B5D5D, 0x7878686B,
+ 0x67787566, 0x79677976, 0x7876647B, 0x62737363,
+ 0x6D5D7272, 0x6D6C5E6D, 0x3E66645A, 0x06074743,
+ 0x0904060B, 0x00000000, 0x00000000, 0x08060502,
+ 0x371D1B1A, 0x3B353C3B, 0x383A343B, 0x44484D44,
+ 0x4D44484D, 0x484D4448, 0x4B4F514B, 0x514D5151,
+ 0x51504C52, 0x3134332F, 0x19183432, 0x0001001B,
+ 0x00000000, 0x00000000, 0x00000000, 0x81404341,
+ 0x847F8083, 0x80847E80, 0x83888C81, 0x92868D8F,
+ 0x92948890, 0x8F969A8F, 0x9E91979B, 0x989F9097,
+ 0x9699A091, 0xA4959EA5, 0xA0A5969F, 0x98A0A498,
+ 0xA498A0A4, 0xA4A69AA2, 0x9BA3A79B, 0xA79BA3A7,
+ 0xA5A99DA3, 0x969FA59A, 0xA79C9BA1, 0xA5ABA0A1,
+ 0x9FA6ADA0, 0xAB9CA5AC, 0xA6AB9CA6, 0xA2A9AB9F,
+ 0xADA1ACAE, 0xA7ADA2A9, 0xA3A7ACA3, 0xAA9FA5AD,
+ 0xA5ADA2A2, 0xA2A5ABA0, 0xADA2A7AD, 0xA7ACA3A7,
+ 0xB8AAAFA6, 0xBAB4BCC1, 0xB6BAB4B8, 0xB8B7BDB8,
+ 0xBEB9B6BD, 0xB7BDB8B8, 0xBAB8BDBB, 0xBDBBB6BD,
+ 0xB8BDBBB8, 0xBBB7BEBB, 0xBDBBB7BE, 0xB8BDBBB8,
+ 0xBEB9BFBE, 0xBEBDB9BF, 0xB9BFBEB8, 0xBAB7BEBB,
+ 0xBFBEB6BD, 0xB7BDBCB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB6BCBBB9, 0xBCB8BEBD, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBDB7BDBC, 0xBDBCB5BD, 0xB7BDBCB7, 0xBCB7BDBC,
+ 0xBEBBB7BD, 0xB7BEBBB7, 0xBBB7BEBB, 0xBEBDB7BE,
+ 0xB7BDBCB8, 0xBFB9BFBE, 0xBFBEBAC0, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBFB9BFBE,
+ 0xBFC0BAC0, 0xB7BFBFBA, 0xC0B8C0C0, 0xC0C0B6C0,
+ 0xB5BDBDB8, 0xBCB8C0BF, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB5BDBCB5, 0xC1B8C0C0,
+ 0xC0C0B7BE, 0xB8C0C0B8, 0xC4B8BFC2, 0xC4C4BAC1,
+ 0xBEC6C6BC, 0xC0B8C0C0, 0xC0C0B8C0, 0xAEB6B6B8,
+ 0xB0AAAFB0, 0xB0B0AAAF, 0xB1BBBBA8, 0xC0B7BFBF,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xBEBAC0BF, 0xC0BFBAC1,
+ 0xBAC0BFBA, 0xC0B8C0C0, 0xC0BFB8C0, 0xBAC0BFBA,
+ 0xBFBAC0BF, 0xC0C0BAC0, 0xB7C1C1B8, 0xC1BBC3C3,
+ 0xC0C0B9C1, 0xBAC0BFB8, 0xBEBBC0BE, 0xC1BEBBC0,
+ 0xBAC1BEBA, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBFBBC0BF, 0xBFBEBBC0, 0xB9BEBDBA, 0xBEB9BEBC,
+ 0xBFBDBBC0, 0xBABFBDBA, 0xBBB9BFBA, 0xBFBDBAC0,
+ 0xBABFBDBA, 0xB1B4B9B7, 0xBDBAAEB3, 0xB9C0BDB6,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEBBC0BE, 0xC0BBBBC0,
+ 0xBAC0BBBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0xBF5B5F5A, 0xC3BFBEC4,
+ 0xC0C3C1C2, 0xBEBBC0BE, 0xC0BEBBC0, 0xBAC0BFBB,
+ 0xBFBAC0BF, 0xBFBEB8C0, 0xB7BFBEB7, 0xC1B8C0C0,
+ 0xC0BFB9C1, 0xBAC0BFBA, 0xC0B7BFBF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xC0C1B8C0, 0xBBC0C1BB, 0xC1BBC1C0,
+ 0xC2BFBCC2, 0xBAC1BEBB, 0xBEB8C0BF, 0xC0BFB7BF,
+ 0xBBC1C0BA, 0xC1B9C1C1, 0xBFBFB9C1, 0xB8C0C0B7,
+ 0xBEBAC2C1, 0xBCBCB7BF, 0xB9C1C1B4, 0xC0B9C1C0,
+ 0xC0C0B9C1, 0xB8C0C0B8, 0xC0B7BFBF, 0xBFC0B8C0,
+ 0xB9BEBFBA, 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB,
+ 0xC1BAC2C2, 0xC0C0B9C1, 0xB8C0C0B8, 0xC0B9C1C1,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xC0BABFC0, 0xC0BFBABF,
+ 0xBAC0BFBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9,
+ 0xBEBABFBE, 0xBFBEBABF, 0xBAC0BFB9, 0xBFB8BEBD,
+ 0xBEBDBAC0, 0xB9BFBEB9, 0xBFB6BEBE, 0xBCBDB5BC,
+ 0xB5BBBAB7, 0xB7B5BCB9, 0xBCB7B6BC, 0xB7BBB6B8,
+ 0xBBBABFBD, 0xBDBCB7BE, 0xB8BDBCB8, 0xBCB8BFBC,
+ 0xBDBCB8BF, 0xB7BDBCB7, 0xBDB6BBBA, 0xBCBDB9BE,
+ 0xB3B8B9B8, 0xB29FA8AB, 0xABABA4B0, 0xB3BBBBA1,
+ 0xBBB7BDBC, 0xBDBBB8BD, 0xBABDBBBA, 0xB7BABEB9,
+ 0xBDB8B9BD, 0xB8BEB9B9, 0xC6C7CEC7, 0xADA4C6CD,
+ 0xA8ACA1AA, 0xAAB1B5AA, 0xB4A9B1B5, 0xB1B5AAB0,
+ 0xA6B1B5A9, 0xB5A6B0B5, 0xABB2A3B0, 0xA3A7AEA1,
+ 0xAE9FA9B0, 0xA9B0A1A7, 0xA0A8AFA0, 0xAD9EA8AF,
+ 0xA5AC9FA6, 0xA5A5AC9F, 0xB6ABABB2, 0xA2A69BB2,
+ 0x3A70746E, 0x09053C40, 0x08090508, 0x01000000,
+ 0x00000101, 0x00000000, 0x00010101, 0x01010000,
+ 0x00000001, 0x00000000, 0x00010000, 0x02000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x01020001,
+ 0x00000200, 0x00010000, 0x31262A25, 0x36313236,
+ 0x3A3B3732, 0x3F40413D, 0x41404240, 0x62605F43,
+ 0xB8BBBCB8, 0xBBB9B7BD, 0xB6BDBAB6, 0xB8B9BDB8,
+ 0xBCB7B9BD, 0xB6BCB7B8, 0xBBB4BBB8, 0xBFBCB7BE,
+ 0xBABFBDB8, 0xB9B7BBB6, 0xC0BFB8BE, 0xBBC1C0BA,
+ 0xC0B8C0BF, 0xC1C1B9C1, 0xBAC0BFB9, 0xBEB9C0BD,
+ 0xC1BEBAC1, 0xB8C1BEB8, 0xBDB7BEBB, 0xC1C0B9C0,
+ 0xB8BEBDBB, 0xC0B7BFBF, 0xC0C0B8C0, 0xB9C1C1B8,
+ 0xBDB8C0C0, 0xC0C1B5BD, 0xB9BEBFBB, 0xBDBAC0BF,
+ 0xC1C1B8BE, 0xB7BFBFB9, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xC0BABFC0, 0xC0C0BABF, 0xB8C0C0B8,
+ 0xBEB8C0BF, 0xBCBBB7BF, 0xB8BEBDB6, 0xBFB8C0BF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBDBAC0BF, 0xC0BFB8BE,
+ 0xB8C0BFB8, 0xBFB8BDBC, 0xC0C1BBC0, 0xB8C0BFBB,
+ 0xBEBAC0BF, 0xBFBDBAC1, 0xBBC0BEBA, 0xBCBBC2BF,
+ 0xBDBCB8BF, 0xB6BBBAB8, 0xBEBAC0BF, 0xBDBCB9BF,
+ 0xB7BCBAB8, 0xBDB8BDBB, 0xBEBCBABF, 0xB6BBB9B9,
+ 0xB7B9BDB8, 0xBCB7B8BC, 0xB8BCB7B8, 0xB6B8BBB9,
+ 0xB9B4B5B8, 0xB5B9B4B5, 0xB3B3B9B4, 0xB6B1B2B8,
+ 0xB2B8B3B2, 0xB2B5BCB5, 0xB7B2B1B9, 0xBEC4BFB1,
+ 0x39818881, 0x403A3D42, 0x40403A3E, 0x343A3837,
+ 0x35333434, 0x29292934, 0x07080507, 0x04050A05,
+ 0x47433E0A, 0x4D4F4D42, 0x6B5B5D5D, 0x7878686B,
+ 0x66787566, 0x74657875, 0x76736477, 0x5D757263,
+ 0x6C5E6D6D, 0x68665B6D, 0x2145433B, 0x05072825,
+ 0x0804090A, 0x00000000, 0x01010000, 0x0A080701,
+ 0x353D3A36, 0x58503D3A, 0x58594F5A, 0x69727369,
+ 0x73687074, 0x7273696F, 0x7078796F, 0x78707A78,
+ 0x51514B7A, 0x494C4C46, 0x1A164E4D, 0x0301001B,
+ 0x00020000, 0x00000000, 0x00000000, 0x7F414442,
+ 0x847E8084, 0x82857C80, 0x808A8B81, 0x90848A8C,
+ 0x9094888E, 0x8F969A8F, 0x9E91979B, 0x989F9097,
+ 0x959AA192, 0xA1929DA4, 0x9FA4959C, 0x99A0A498,
+ 0xA599A1A5, 0xA5A79BA3, 0x9BA3A79B, 0xA79BA3A7,
+ 0xA3A79BA3, 0x9AA2A89D, 0xA89D9FA5, 0xA6ADA0A2,
+ 0xA0A4AB9E, 0xAB9CA6AD, 0xA8AD9EA6, 0xA1A8AA9E,
+ 0xADA1ABAD, 0xA9ADA2A9, 0xA2A7ACA3, 0xAA9FA4AC,
+ 0xA1A99EA2, 0xA4A6ACA1, 0xADA4A9AF, 0xAAAFA6A8,
+ 0xBAABAFA9, 0xC0BABCC0, 0xB6BAB5BC, 0xB8B6BCB7,
+ 0xBDB8B6BD, 0xB7BDB8B7, 0xBBB5BCB7, 0xBDBBB7BE,
+ 0xBABFBDB8, 0xBDBABFBD, 0xBCBAB9C0, 0xBBC0BEB7,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBBB7BEBB,
+ 0xC0BFB7BE, 0xB9BFBEBA, 0xBCB9BFBE, 0xBFBEB7BD,
+ 0xB9BFBEB9, 0xBBB7BDBC, 0xBEBBB6BC, 0xB7BDBCB7,
+ 0xBDB5BDBC, 0xBDBCB5BD, 0xB7BDBCB7, 0xBCB7BDBC,
+ 0xBFBCB7BD, 0xB7BEBBB8, 0xBBB7BEBB, 0xBDBCB7BE,
+ 0xB7BDBCB7, 0xBDB9BFBE, 0xBFBEB8BE, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBFB9BF, 0xB8C0C0B7, 0xC0B6C0C0, 0xC0C0B6C0,
+ 0xB6BEBEB8, 0xBCB8C0BF, 0xBCBBB5BD, 0xB7BDBCB6,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB5BDBCB5, 0xC1B6BDC0,
+ 0xC0C0B7BE, 0xB8C0C0B8, 0xC1B8BFC2, 0xC7C7B9C1,
+ 0xBAC2C2BF, 0xBBB3BBBB, 0xB5B5B3BB, 0xA8B0B0AD,
+ 0xAFA9AFAE, 0xB0B0A8B0, 0xB0BABAA8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBABFC0BA, 0xC0B8C0C0, 0xBFC0B8C0, 0xB9BFBEBA,
+ 0xBEB9BFBE, 0xC0C0B9BF, 0xB7BFBFB8, 0xC0B9C1C1,
+ 0xC0C0B8C0, 0xBAC0BFB8, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBAC1BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBABFBE, 0xBFBEBABF, 0xB8BDBCBA, 0xBCBABFBD,
+ 0xBFBDB9BE, 0xBABFBDBA, 0xBBBAC0BB, 0xBFBDBAC0,
+ 0xBABFBDBA, 0xB1B7BCBA, 0xB9B6AEB3, 0xBBC2BFB2,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEBBC0BE, 0xC0BBBBC0,
+ 0xBAC0BBBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0xBD585B59, 0xC2C0BCC2,
+ 0xBEC0C0C1, 0xBEBABFBE, 0xBFBEB9BF, 0xB9BEBFB9,
+ 0xC0BABFC0, 0xBFC0BABF, 0xB9BEBFBA, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xB8BEBDB9, 0xC0B6BEBE, 0xC0BFB8C0,
+ 0xB8C0BFB8, 0xC0B8C0C0, 0xC0C1B8C0, 0xB8C0C0BB,
+ 0xBEB5C0BE, 0xC1C0B5C0, 0xBBC1C0B9, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBBC1C0BC, 0xC0B9C1C0, 0xC1C0B9C1,
+ 0xBBC1C0BB, 0xBFB9C1C0, 0xC0C0B6C1, 0xB8C0C0B8,
+ 0xC0B7BFBF, 0xB5B5B8C0, 0xA8B0B0AD, 0xC0B3BBBB,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B7BFBF, 0xBFC0B8C0,
+ 0xB9BEBFBA, 0xC0BCC2C1, 0xC1C0BBC1, 0xBBC1C0BB,
+ 0xC0B9C1C0, 0xC0BFB9C1, 0xB8C0BFB8, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBDB7C0BD, 0xC0BDB7C0, 0xB9C0BDB9,
+ 0xBDB9C0BD, 0xBFBDB9C0, 0xBABFBDBA, 0xBDB9BEBC,
+ 0xC0BDBABF, 0xB9BFBEB9, 0xBEB7BFBF, 0xBEBFB6BE,
+ 0xB6BCBBB9, 0xBDB6BDBA, 0xC1BCB9C0, 0xBCC0BBBB,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBDBBBABF, 0xBABFBDB8, 0xBBB6BCBB, 0xBDBCB4BC,
+ 0xB0BABAB5, 0xB3A0ADAF, 0xB0B0A4B1, 0xA2ACACA4,
+ 0xB9AEB9B7, 0xBBBAB4BA, 0xB8BBB9B6, 0xB8BCBDB9,
+ 0xBEB8BCBE, 0xBABEB8BC, 0xC1C1C8C1, 0xB9B0C1C8,
+ 0xB9BAB1B6, 0xADB8B9AF, 0xB5ABB6B7, 0xB2B4A8B4,
+ 0xA4B2B7A8, 0xB6A5AFB5, 0xB0B6A5B0, 0xA0A8AFA0,
+ 0xB1A1A8AF, 0xA8AFA0A7, 0xA8AFB6A9, 0xB4A8B0B4,
+ 0xB0B4A9B0, 0x9AA0A499, 0x3832A0A3, 0x36373336,
+ 0x00000100, 0x01000000, 0x00000000, 0x01010101,
+ 0x00000000, 0x02000000, 0x00020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00010000, 0x3222231F, 0x38323638,
+ 0x38383236, 0x383D3C38, 0x3C383F3C, 0x61605C3F,
+ 0xB6BABCB6, 0xBBB6B6BD, 0xB4BBB6B5, 0xB7B8BCB7,
+ 0xBCB6B8BC, 0xB8BCB7B8, 0xBBB6BBB9, 0xBEBBB7BE,
+ 0xB7BEBBB7, 0xBAB5BBB6, 0xBDBCB9BF, 0xB9BFBEB7,
+ 0xBEBAC1BE, 0xC0BFBAC1, 0xBBC0BFBA, 0xBABBC0BE,
+ 0xBFBAB9BF, 0xB9BEBCB9, 0xBBBABFBD, 0xC0BFB8BD,
+ 0xB9BFBEBA, 0xC1B9BFBE, 0xBFC0BBC0, 0xB9BEC1BA,
+ 0xBFB8C0C0, 0xBEBFB7BF, 0xBABFC0B9, 0xBEB9BFBE,
+ 0xC0C0B9BF, 0xB9C1C1B8, 0xBEBAC0BF, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xC0BABFC0, 0xC0C0BABF, 0xB8C0C0B8,
+ 0xC1B8C0C0, 0xBBBCB9C1, 0xB7BCBDB6, 0xBFB9C1C0,
+ 0xC1C1B8C0, 0xB7BFBFB9, 0xBEB9BFBE, 0xC1BEB9BF,
+ 0xB7C0BDB8, 0xBDBABFBD, 0xBEBDBABF, 0xBAC0BFB8,
+ 0xBEB9BFBE, 0xBCBBB9BF, 0xBABFBEB7, 0xBBBABFBD,
+ 0xBFBDB8BD, 0xB8BDBBBA, 0xBEB9BFBE, 0xBFBDB9BF,
+ 0xB6BBB9BA, 0xB8B7BCBA, 0xBEB9B7BD, 0xB9BDB8BA,
+ 0xB7B7BBB6, 0xBCB7B8BC, 0xB8BCB7B8, 0xB6B8BBB9,
+ 0xBDB8B5B8, 0xB8BCB7B9, 0xB1B3BAB3, 0xBAB3B1B8,
+ 0xB1B8B1B3, 0xB1B0B7B0, 0xB5B0B1B8, 0xC1C5C0B1,
+ 0x3680847F, 0x3B37383C, 0x3A3B373A, 0x34383937,
+ 0x35333234, 0x2A2A2A32, 0x07080507, 0x07060805,
+ 0x4E4A450B, 0x52565449, 0x6A5C6160, 0x7675676B,
+ 0x66747464, 0x75677676, 0x74716376, 0x5F706D5F,
+ 0x6C61706D, 0x605F556E, 0x113F3C37, 0x00001815,
+ 0x02000002, 0x00000000, 0x01000001, 0x07080600,
+ 0x39373430, 0x4840423E, 0x5553494B, 0x5C5E5C52,
+ 0x675C6967, 0x6E6C6169, 0x6A767469, 0x746A7674,
+ 0x62605876, 0x42484940, 0x1A164848, 0x0503021D,
+ 0x01020000, 0x00000200, 0x00010000, 0x7A40443F,
+ 0x84797E83, 0x80847980, 0x8388897F, 0x90858C8D,
+ 0x8E94898C, 0x8C939A8D, 0xA0949299, 0x9A9E929C,
+ 0x939AA192, 0xA0949BA2, 0x9FA3979C, 0x98A0A498,
+ 0xA69AA0A4, 0xA1A599A2, 0x9AA3A79B, 0xA99DA2A6,
+ 0xA3A79BA5, 0x9BA5A99D, 0xA99DA3A7, 0xA8ACA0A5,
+ 0x9CA3AA9D, 0xAD9EA4AB, 0xA6AD9EA6, 0xA2A9ADA1,
+ 0xADA2AAAE, 0xAAAEA3A9, 0xA2A6ACA1, 0xACA1A7AD,
+ 0xA7ADA2A6, 0xA7A8AEA3, 0xADA6ABB0, 0xA8AFA8A6,
+ 0xC4A9AFAA, 0xBCB7C3C9, 0xB7BDB8B6, 0xB7B7BDB8,
+ 0xBBB6B6BC, 0xB8BEB9B5, 0xB6B8BEB9, 0xBEB9B5BB,
+ 0xB8BEB9BA, 0xBDBBC0BE, 0xC1BCBABF, 0xBABFBDBD,
+ 0xBEBAC0BF, 0xBFBEB9BF, 0xB7BDBCB9, 0xBDB7BEBB,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBDB5BEBB, 0xBFBEB7C0,
+ 0xBAC0BFB9, 0xBFB9BFBE, 0xBFBEBAC0, 0xBAC0BFB9,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB8BDBC,
+ 0xBEBCB8BD, 0xB8BDBBB9, 0xBBB8BDBB, 0xBDBCB8BD,
+ 0xBABFBEB8, 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBDBABFBD, 0xC0BDBABF, 0xB9C0BDB9, 0xBFBABFBE,
+ 0xC0C0BAC0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xB9BFBEBA, 0xBEB7BFBE, 0xC1BEB7BF, 0xB9BEBCBA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xC2B6BDC0,
+ 0xC0C0B8BF, 0xB9C1C1B8, 0xC0B7BFBF, 0xC0C0B8C0,
+ 0xAFB7B6B8, 0xB8B1B9B9, 0xB3B3B0B8, 0xA5ADACAB,
+ 0xA9A6ADAA, 0xB4B4A3AC, 0xB2BBBEAC, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BABFC0, 0xBFC0BBBF,
+ 0xBABFC0BB, 0xC0B8C0C0, 0xBEBFB8C0, 0xB6BCBBB9,
+ 0xBDBAC0BF, 0xC0BFB9C0, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEB9BFBE, 0xC0BFB9BF, 0xB7BDBCBA, 0xBDB9C0BD,
+ 0xBFBDB9C0, 0xBBC0BEBA, 0xBCBABFBD, 0xC0BFB9BE,
+ 0xBABFBEBB, 0xBCBABFBE, 0xBBBAB8BD, 0xB9BEBDB6,
+ 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8, 0xBCB8BFBC,
+ 0xBEBCB8BF, 0xB9BEBCB9, 0xBDBABFBD, 0xC0BBBABF,
+ 0xBAC0BBBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0xBF575A58, 0xC0C0BEC1,
+ 0xBEC0C0C0, 0xBFBBC0BF, 0xBFC0BAC0, 0xBABFC0BA,
+ 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA, 0xBEBABFC0,
+ 0xBEBDB9BF, 0xB8BEBDB9, 0xC0B6BEBE, 0xC0C0B8C0,
+ 0xB8C0BFB8, 0xC0B8C0C0, 0xC0C1B8C0, 0xB8C0C0BB,
+ 0xBCB4BFBD, 0xC0BFB3BE, 0xBBC1C0B8, 0xBFBCC2C1,
+ 0xC0BFBAC0, 0xBAC0BFBB, 0xC0BBC1C0, 0xC1C0B9C1,
+ 0xBBC1C0BB, 0xBFB9C1C0, 0xC1C1B6C1, 0xB8C0C0B9,
+ 0xBBB8C0C0, 0xBBBBB3BB, 0xADB5B5B3, 0xC0B6BEBE,
+ 0xC1C1B8C0, 0xB8C0C0B9, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xB9BEBFBA, 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB,
+ 0xC0B9C1C0, 0xC1C0B9C1, 0xB8C0BFB9, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBBC1C0BA, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBEB8C1BE, 0xC0BDB8C1, 0xB9C0BDB9,
+ 0xBEB8BFBC, 0xBEBCBAC1, 0xBABFBDB9, 0xBDBABFBD,
+ 0xC0BDBABF, 0xB9BFBEB9, 0xBFB9BFBE, 0xBEBFB7BF,
+ 0xB9BFBEB9, 0xBDB9C0BD, 0xBFBAB9C0, 0xBCC0BBB9,
+ 0xBDBBC0BE, 0xBFBDBABF, 0xBABFBDBA, 0xBEBABFBD,
+ 0xBFBDBDC0, 0xBABFBDBC, 0xBBB6BCBB, 0xBEBDB4BC,
+ 0xB0BBB9B6, 0xBDA1ADAF, 0xBCBCAFBB, 0xACB7B5B2,
+ 0xB6ADB5B4, 0xBAB9B2B9, 0xB8BBB9B5, 0xB8BBBCB8,
+ 0xBFB9BCBE, 0xBABEB8BD, 0xBCC1C8C1, 0xBAB1BCC3,
+ 0xB9B7AFB9, 0xADB8B9AF, 0xB6ACB6B7, 0xB2B4A8B7,
+ 0xA5AEB4A3, 0xB5A5B0B6, 0xAFB5A4B2, 0xA0A8AFA0,
+ 0xB1A1A8AF, 0xA6AFA2A7, 0xA8AEB5A8, 0xB4ABAFB3,
+ 0x767970B1, 0x00373933, 0x01000001, 0x00000000,
+ 0x02000000, 0x00000100, 0x00000000, 0x01000001,
+ 0x01010000, 0x02000003, 0x01020000, 0x00000301,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00010000, 0x3222231F, 0x3A313638,
+ 0x38383239, 0x383F3C38, 0x3C373F3C, 0x60605A3F,
+ 0xB6BABCB6, 0xBCB7B8BC, 0xB5BBB6B6, 0xB7B8BCB7,
+ 0xBCB6B8BC, 0xB8BCB7B8, 0xBBB8BDBB, 0xBEBBB8BD,
+ 0xB5BCB9B7, 0xB8B6BCB7, 0xBFBEB7BD, 0xB9BFBEB9,
+ 0xBDBAC1BE, 0xC0BFB9C0, 0xBCC1BFBB, 0xBBBBC1BC,
+ 0xC2BDBAC0, 0xBDC1BCBE, 0xB9BABFBD, 0xC0BFB6BB,
+ 0xBAC0BFBA, 0xBFB7BDBC, 0xC0C1BAC0, 0xBABFC2BB,
+ 0xC0B8C0C0, 0xBDBEB8C0, 0xBBC1C0B8, 0xBCBAC0BF,
+ 0xBEBFB7BD, 0xB8C0C0B9, 0xBEB9BFBE, 0xC0BFB9BF,
+ 0xBAC0BFBA, 0xC0BABFC0, 0xC0C0BABF, 0xB8C0C0B8,
+ 0xBEB8C0C0, 0xBBBCB6BE, 0xBABFC0B6, 0xBBB4BCBB,
+ 0xC0C0B4BC, 0xB8C0C0B8, 0xBFB7BCBD, 0xC0BFBAC0,
+ 0xB7BEBBB8, 0xBBB8BDBB, 0xBDBCB8BD, 0xB9BFBEB7,
+ 0xBEB9BFBE, 0xBEBDB9BF, 0xB7BCBBB9, 0xBEB7BCBA,
+ 0xBEBCBBC0, 0xB8BDBBB9, 0xBEB9BFBE, 0xBEBCB9BF,
+ 0xB6BCB7B9, 0xB8B7BDB8, 0xBDB8B7BD, 0xB8BCB7B9,
+ 0xB8B8BCB7, 0xBBB6B9BD, 0xB8BCB7B7, 0xB4B5B8B6,
+ 0xBCB7B3B6, 0xB5B9B4B8, 0xB0B3BAB3, 0xBBB4B0B7,
+ 0xB3BAB3B4, 0xB0AFB6AF, 0xB7B2B0B7, 0xC0C4BFB3,
+ 0x37818580, 0x3C38383C, 0x3A3B373B, 0x34363838,
+ 0x302E3234, 0x282A2A2D, 0x07060507, 0x06050805,
+ 0x4D4A450A, 0x52565449, 0x695E6160, 0x7675676B,
+ 0x65757466, 0x73657575, 0x72706574, 0x61706C61,
+ 0x6055706C, 0x55544A62, 0x113F3C37, 0x00001815,
+ 0x02000002, 0x00000000, 0x00000001, 0x08090700,
+ 0x36373430, 0x4942413E, 0x58534A4F, 0x56625C51,
+ 0x67596761, 0x716E606A, 0x69787469, 0x746A7874,
+ 0x62615776, 0x404A4840, 0x1A164849, 0x0602011D,
+ 0x00020000, 0x00000200, 0x00010000, 0x7940443E,
+ 0x84797E84, 0x80847880, 0x83888980, 0x94898B8C,
+ 0x8E948990, 0x8D92998C, 0x9F93939A, 0x9B9F939B,
+ 0x929AA192, 0xA2969AA1, 0x9EA2969E, 0x98A0A498,
+ 0xA69AA0A4, 0xA1A599A2, 0x9AA3A79B, 0xA99DA2A6,
+ 0xA5A99DA5, 0x98A3A79B, 0xA99DA0A4, 0xA5A99DA5,
+ 0x9CA4AB9C, 0xAD9EA4AB, 0xA6ADA0A6, 0x9EA9ADA1,
+ 0xACA1A6AA, 0xA6AA9FA8, 0xA2A8AEA3, 0xADA2A7AD,
+ 0xA6ACA1A7, 0xA4A8AEA3, 0xB0A9A8AD, 0xA9AFAAA9,
+ 0xC4A9AFAA, 0xBCB9C3C9, 0xB5BCB9B5, 0xB8B6BCB7,
+ 0xBEB9B7BD, 0xB7BDB8B8, 0xB6B1B8B1, 0xBEB9B5BB,
+ 0xBABDBBBA, 0xBDBABFBD, 0xBDBBBABF, 0xB8BDBBB8,
+ 0xBEBABFBD, 0xBEBDB9BF, 0xB5BBBAB8, 0xBDB7BEBB,
+ 0xBFBEB9C0, 0xBAC0BFB9, 0xBBB7C0BD, 0xBFBEB5BE,
+ 0xB7BDBCB9, 0xBBBAC0BF, 0xBFBEB6BC, 0xB7BDBCB9,
+ 0xBCB7BDBC, 0xBCBBB7BD, 0xB7BDBCB6, 0xBDB9BEBD,
+ 0xBFBDB9BE, 0xBABFBDBA, 0xBBBABFBD, 0xBDBCB8BD,
+ 0xB9BEBDB8, 0xBBB6BCBB, 0xBDBCB6BC, 0xB7BDBCB7,
+ 0xBDBABFBD, 0xBFBDBABF, 0xB9C0BDBA, 0xBFBBC0BF,
+ 0xC0C0BAC0, 0xB8C0C0B8, 0xC1B7BFBF, 0xBFBEB9C1,
+ 0xB6BEBDB7, 0xBFB8C0BF, 0xBEBDBAC0, 0xBBC0BEB8,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9, 0xC0B6BEBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xAAB2B1B8, 0xB8AFB7B7, 0xB4B4B0B8, 0xA0A8A7AC,
+ 0xB3A4ABA8, 0xB4B4ADB6, 0xB2BBBEAA, 0xC0B9C1C1,
+ 0xC0C0B8C0, 0xBABFC0B8, 0xC0BABFC0, 0xBEC2BBBF,
+ 0xBABFC2BB, 0xC0BABFC0, 0xBEBFB8C0, 0xB5BABBB9,
+ 0xBEBAC0BF, 0xBFBEB9BF, 0xBAC0BFB9, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xB9BFBEBA, 0xBEBAC1BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBFB9BFBE, 0xBFBEB8C0, 0xB7BDBCB9, 0xBEB6BDBA,
+ 0xBFBDBAC1, 0xBABFBDBA, 0xBEB9BEBC, 0xBEBDBBC0,
+ 0xB9BEBDB9, 0xBEBBC0BF, 0xBFC0BABF, 0xBABFBEBB,
+ 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8, 0xBCB8BFBC,
+ 0xBEBCB8BF, 0xB9BEBCB9, 0xBDBABFBD, 0xC0BBBABF,
+ 0xBABFBDBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00010000, 0x02000102, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF585B59, 0xC0C0BEC1,
+ 0xBEC0C0C0, 0xBFBABFBD, 0xBFC0BAC0, 0xBABFC0BA,
+ 0xBEBAC0BF, 0xBFBEB9BF, 0xBABFC0B9, 0xC1B8C0C0,
+ 0xBFC0B9C1, 0xB9BEBFBA, 0xC0B8BFC2, 0xC0C0B8C0,
+ 0xB6C0C0B6, 0xBFB6C1BF, 0xC1C0B8C0, 0xBAC0BFBB,
+ 0xBEB9C1C0, 0xC1C0B7BF, 0xBBC1C0BB, 0xBFBBC1C0,
+ 0xC0BFBAC0, 0xBBC1C0BA, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xBBC1C0BC, 0xC0B9C1C1, 0xBFC2B8C0, 0xB8BFC2B8,
+ 0xBAB8C0C0, 0xC0C0B2BA, 0xB9C1C1B8, 0xC0B8C0C0,
+ 0xBFBFB8C0, 0xB8C0C0B7, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xC0BBC1C0, 0xC0BFBBC1, 0xBBC1C0BA,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBBC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBFB7BFBE, 0xBFBEB8C0, 0xB9BFBEB9,
+ 0xBFB9BFBE, 0xBFBEBAC0, 0xB9BEBDBA, 0xBFB9BFBE,
+ 0xBEBDBAC0, 0xBAC0BFB9, 0xBEB9BFBE, 0xBEBDB9BF,
+ 0xBABFBEB9, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBDBCBFBD, 0xBFBEBCBF, 0xB9BEBCBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBBC0BFBA, 0xBEBABFBD, 0xC0BDBAC1,
+ 0xB2BAB9B7, 0xBAA7B2B0, 0xBCB9B3BB, 0xB6BCB7B5,
+ 0xB7B6BCB7, 0xB8B6B6BC, 0xB6BBB9B3, 0xB8BABEB9,
+ 0xBEB8BABE, 0xB9C0B9BA, 0xBAC1CAC0, 0xB8AFBCC4,
+ 0xBAB8B0B7, 0xACB8B9AF, 0xB9ADB4B8, 0xB6B8ACB7,
+ 0xA4B2B7A8, 0xB3A4AEB3, 0xAFB4A5AE, 0xA0A8AFA0,
+ 0xAFA2A8AF, 0xA6AFA2A6, 0x38747970, 0x03003A3E,
+ 0x02030002, 0x00000100, 0x00000001, 0x00000000,
+ 0x00010101, 0x01010000, 0x00000001, 0x01010002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00010000, 0x3224231F, 0x38303838,
+ 0x3A37323A, 0x38413C39, 0x3B36403B, 0x63605B3F,
+ 0xB5BBBDB7, 0xBDB8B7BB, 0xB6BCB7B7, 0xB7B8BCB7,
+ 0xBCB8B8BC, 0xB8BCB7BB, 0xBBB8BDBB, 0xBDBCB7BC,
+ 0xB8BDBBB8, 0xB9B6BCB7, 0xC0BFB8BE, 0xB9BFBEBA,
+ 0xBCBAC1BE, 0xC0BEBAC1, 0xBDC0BEBB, 0xBCBDC1BC,
+ 0xC1BBBDC1, 0xBDC1BCBF, 0xBBBBC0BE, 0xBFBEB6BC,
+ 0xB9BFBEB9, 0xBFB7BEBB, 0xBFC0BAC0, 0xBABFC0BA,
+ 0xC0B7BEC1, 0xBFC0B8C0, 0xBAC0BFBA, 0xBBBABFBD,
+ 0xBFBEB7BE, 0xB9BEBFB9, 0xBEB7BFBE, 0xC0BFB7BF,
+ 0xB8C0BFB8, 0xC0B8C0C0, 0xC0BFB8C0, 0xB6BEBDB8,
+ 0xBBBAC0BF, 0xBDBDB6BC, 0xB8C0C0B5, 0xB7ACB2B1,
+ 0xC0C0B2B8, 0xB8C0C0B8, 0xBFB5BDBD, 0xC0BFB8C0,
+ 0xB7BDBCBA, 0xBEB8BDBC, 0xC0BFBABF, 0xB9BFBEBA,
+ 0xB9BABFBD, 0xBBBAB6BB, 0xB9BFBEB5, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB5BBBAB9, 0xBDB9BFBE, 0xBEB9B9C0,
+ 0xB9BDB8B8, 0xB8B7BDB8, 0xBBB9B7BD, 0xB6BBB9B6,
+ 0xB7B8BCB7, 0xBDB8B8BC, 0xB8BCB7B9, 0xB6B6B9B7,
+ 0xB9B4B5B8, 0xB5B9B3B5, 0xB3B3BAB3, 0xB8B1B2BA,
+ 0xB1B8B1B1, 0xAFB0B7B0, 0xB6B1AFB6, 0xC0C4BFB2,
+ 0x377F837E, 0x3B37383C, 0x3B3C383A, 0x34333333,
+ 0x2F2D3234, 0x282A2A2C, 0x07060507, 0x06050805,
+ 0x4E4A450A, 0x52585449, 0x695E6360, 0x7875676D,
+ 0x64767365, 0x75677673, 0x72716376, 0x61706C61,
+ 0x62566E6C, 0x49483E62, 0x103F3C37, 0x00001714,
+ 0x00000002, 0x00000000, 0x00010000, 0x0A080800,
+ 0x37373430, 0x4941423F, 0x5752494C, 0x56635D52,
+ 0x675C6761, 0x706C616B, 0x6A79746B, 0x746A7873,
+ 0x62615776, 0x404A4840, 0x1A164849, 0x0703021D,
+ 0x00020000, 0x00000200, 0x00010000, 0x7940443E,
+ 0x84797E84, 0x80847880, 0x82898A81, 0x90858A8B,
+ 0x9195898C, 0x8C95998D, 0x9F939498, 0x9B9F939D,
+ 0x929AA192, 0xA5989AA1, 0x9CA3969E, 0x99A0A498,
+ 0xA69AA1A5, 0xA2A69AA2, 0x9BA3A79B, 0xA69AA3A7,
+ 0xA3A79BA2, 0x9BA5A99D, 0xA99EA3A7, 0xA5A99DA5,
+ 0x9AA4AB9C, 0xACA0A2A9, 0xA8ACA1A8, 0xA0A7ABA0,
+ 0xAEA1A7AB, 0xA7ADA2A7, 0xA2A7ADA2, 0xADA2A7AD,
+ 0xA7ADA2A7, 0xA4A6ACA1, 0xAFA9A8AD, 0xA6ADA6AB,
+ 0xB69BA29B, 0xBCB9B6BD, 0xB5BCB9B5, 0xB7B8BFB8,
+ 0xBDB7B7BE, 0xB9BDB7B9, 0xB9B5BBB6, 0xBDBBB8BE,
+ 0xB8BDBBB8, 0xBDB9BEBC, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBDB9BEBC, 0xBFBEBABF, 0xB8BDBCBA, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BEBF, 0xBEBDB9BF, 0xBABFBDB9,
+ 0xBBB7BDBC, 0xBCBBB6BC, 0xB7BDBCB6, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBDB9BFBE, 0xBFBEB8BE,
+ 0xB7BDBCB9, 0xBDB7BDBC, 0xBEBDB8BE, 0xB7BDBCB8,
+ 0xBDBABFBD, 0xC0BBBABF, 0xBABFBDBA, 0xBFBAC0BF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB7BFBF, 0xBFBFB7BF,
+ 0xB8C0C0B7, 0xBEB8C0C0, 0xBEBDB9BF, 0xB9BFBEB8,
+ 0xBEBABFBE, 0xBFBEBABF, 0xB9BFBEB9, 0xC0B6BEBE,
+ 0xC0C0B8C0, 0xB8C0BFB8, 0xC0B8C0C0, 0xBFBEB8C0,
+ 0xAAB2B1B7, 0xB8ACB4B4, 0xB2B2B0B8, 0xA0A8A7AA,
+ 0xB3A6ADAA, 0xBBBEACB4, 0xBBC4C7B2, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xC0BABFC0, 0xBFC0BABF,
+ 0xBABFC0BB, 0xC0BABFC0, 0xBFC0B8C0, 0xB6BBBCBA,
+ 0xBEB8C0C0, 0xBFBEB9BF, 0xBAC0BFB9, 0xBFBAC0BF,
+ 0xBFC0B8C0, 0xBAC0BFBA, 0xBEBAC1BE, 0xC0BFBAC1,
+ 0xBBC0BFBB, 0xBEBAC1BE, 0xC1BCBAC1, 0xBBC0BEBB,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB6BCBB,
+ 0xBEBCB9BF, 0xBABFBDB9, 0xBEBBC0BF, 0xBEBCBABF,
+ 0xBABFBDB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBCB8BFBC, 0xBEBBB8BF, 0xB7BEBBB7, 0xBCB7BEBB,
+ 0xBFBCB8BF, 0xB8BFBCB8, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00010000, 0x02000102, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF585B59, 0xC0C0BEC1,
+ 0xBCC1C0BE, 0xBCB6BBBA, 0xBFBEB7BD, 0xBAC0BFB9,
+ 0xBEBAC0BF, 0xBFBEB9BF, 0xBAC0BFB9, 0xC0BABFC0,
+ 0xBFC0B8C0, 0xB9BEBFBA, 0xBFB8BFC2, 0xBFBFB7BF,
+ 0xB6C0C0B5, 0xC0B7C2C0, 0xC1C0B9C1, 0xBBC1C0BB,
+ 0xBEB9C1C0, 0xC1C0B7BF, 0xBBC1C0BB, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xBFBCC2C1, 0xC1C0BAC0,
+ 0xBAC0BFBB, 0xC0B7BFBF, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFBFB8C0, 0xB8C0C0B7, 0xC0B7BFBF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0BBC1C0, 0xC0BFBBC1, 0xBBC1C0BA,
+ 0xBFBBC1C0, 0xC0BFBAC0, 0xBBC1C0BA, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBFB7BFBE, 0xBFBEB8C0, 0xBAC0BFB9,
+ 0xBFB9BFBE, 0xC0BFBAC0, 0xBABFBEBB, 0xBFB9BFBE,
+ 0xBFBEBAC0, 0xBBC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBABFBEBB, 0xBCBABFBD, 0xBFBDB9BE, 0xBABFBDBA,
+ 0xBDBDC0BE, 0xBFBEBCBF, 0xB9BEBCBA, 0xBDBAC1BE,
+ 0xBFBEB9C0, 0xBABFBEBA, 0xBDBABFBD, 0xC0BDB9C0,
+ 0xB2BBB8B7, 0xB8A9B1B0, 0xBBB9B4BB, 0xB8BCB7B6,
+ 0xBBB8BCB7, 0xBAB8BCC0, 0xB6BBB9B5, 0xB9B8BEB9,
+ 0xBFB8BBBF, 0xB8BFB8B8, 0xB9BBC3BC, 0xB9B0BBC3,
+ 0xB9BAB1B6, 0xADB6B7AD, 0xB5ABB4B8, 0xB4B6AAB4,
+ 0xA8B0B4A8, 0xB6AAB0B4, 0xB2B6AAB2, 0xA3A8AEA3,
+ 0x8277A8AE, 0x23281F7C, 0x00000400, 0x03010004,
+ 0x02030102, 0x00010101, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x01010000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00010000, 0x3224231F, 0x38323838,
+ 0x3A373238, 0x383F3C38, 0x3D393F3C, 0x60605A40,
+ 0xB1B9BBB5, 0xBBB5B3B7, 0xB7BBB6B7, 0xB5B7BBB6,
+ 0xBCB7B6BA, 0xB8BCB7B8, 0xBDBABDBB, 0xBCBBB9BE,
+ 0xB8BDBBB7, 0xB9B6BBB9, 0xBFBEB8BE, 0xB9BFBEB9,
+ 0xBDB9C0BD, 0xC0BEBABF, 0xBCBFBDBB, 0xBCBBBFBA,
+ 0xC0BABDC1, 0xBDC1BCBE, 0xBBBBC0BE, 0xC0BFB7BE,
+ 0xBAC1BEBA, 0xBBB5BCB9, 0xBDBEB7BE, 0xB9BEBFB8,
+ 0xC0BABFC0, 0xBCBDBABF, 0xBBC1C0B7, 0xB9B8BDBB,
+ 0xBFBEB6BB, 0xBBC0C1B9, 0xBFBAC0BF, 0xC0BFB8C0,
+ 0xB8C0BFBA, 0xC0B7BFBF, 0xBFBEB8C0, 0xB5BDBCB7,
+ 0xBBB6BCBB, 0xC0C0B6BC, 0xB8C0C0B8, 0xC0B8C0BF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB5BDBD, 0xC0BFBAC0,
+ 0xB8BDBCBA, 0xBFBBC0BF, 0xC0BFBBC0, 0xB9BFBEBA,
+ 0xB9B8BDBB, 0xBFBEB6BB, 0xB9BFBEB9, 0xBEB8BEBD,
+ 0xBDBCB9BF, 0xB5BBBAB7, 0xBCB9BFBE, 0xBCB7B9BE,
+ 0xB7BBB6B6, 0xB8B7BDB8, 0xBBB9B7BD, 0xB6BCB7B6,
+ 0xB7B6BCB7, 0xBCB7B8BC, 0xB8BCB7B8, 0xB4B4B8B3,
+ 0xB9B3B5B9, 0xB1B8B1B5, 0xB3B0B8B1, 0xB7B0B2BA,
+ 0xB1B8B1B0, 0xB2B0B7B0, 0xB6B1B1B7, 0xC0C4BFB2,
+ 0x3780847F, 0x3B37383C, 0x393A363A, 0x32393A38,
+ 0x302E3134, 0x2729292D, 0x07060507, 0x06050A05,
+ 0x4E4B430B, 0x52585449, 0x695E6360, 0x7875676D,
+ 0x63767364, 0x73657572, 0x706F6174, 0x546F6B60,
+ 0x5349615F, 0x4A484054, 0x113F3C37, 0x00001815,
+ 0x00000002, 0x01000001, 0x00010000, 0x0A080800,
+ 0x37383531, 0x4941423F, 0x57554B4C, 0x56605B52,
+ 0x675C6561, 0x706C616B, 0x6A78736A, 0x756B7873,
+ 0x62615777, 0x40484940, 0x1A154849, 0x0704001D,
+ 0x00020000, 0x01000000, 0x00020000, 0x7840443E,
+ 0x84797D83, 0x80847980, 0x84888980, 0x90858C8D,
+ 0x9094888C, 0x8D909488, 0x9F939599, 0x9B9F939D,
+ 0x929CA192, 0xA5989AA1, 0x9BA2959E, 0x9AA1A599,
+ 0xA599A2A6, 0xA1A599A1, 0x9BA3A79B, 0xA79BA3A7,
+ 0xA3A79BA3, 0x9EA5A99D, 0xA89DA6AA, 0xA8ACA0A4,
+ 0x9AA4AB9C, 0xA89CA2A9, 0xA6AA9FA4, 0xA2A7ABA0,
+ 0xAFA2A9AD, 0xA7AEA1A8, 0xA4A7ADA2, 0xAFA6A8AD,
+ 0xA7ADA2AA, 0xA4A6ACA1, 0xB0A7A8AD, 0xA3ABA1AB,
+ 0xB79CA49A, 0xBCB9B7BE, 0xB5BCB7B5, 0xB6B7BEB7,
+ 0xBEB8B8C0, 0xBABEB8BA, 0xB9B8BEB9, 0xBDBBB8BE,
+ 0xB8BDBBB8, 0xBDBABFBD, 0xBFBEBABF, 0xB9BFBEB9,
+ 0xBDB9C0BD, 0xBCBBBABF, 0xB7BCBBB7, 0xBEB9BFBE,
+ 0xC0BFB9BF, 0xB7BDBCBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB7BDBCB9, 0xBFB7BDBC, 0xBCBABAC0, 0xB6BBB9B7,
+ 0xBCB6BCBB, 0xBDBCB7BD, 0xB7BDBCB7, 0xBEBAC0BF,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB7BDBC, 0xC0BFB9BF,
+ 0xB7BDBCBA, 0xBEB7BDBC, 0xBEBDB9BF, 0xB8BFBCB8,
+ 0xBDBABFBD, 0xC0BBBABF, 0xBABFBDBC, 0xBEBAC1BE,
+ 0xBFBFB7BF, 0xB8C0C0B7, 0xBFB9C1C1, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC1C0BABF, 0xBAC0BFBB,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xC0B6BEBE,
+ 0xC1C0B8C0, 0xB8C0BFB9, 0xC0B7BFBF, 0xC1C0B8C0,
+ 0xAAB2B1B9, 0xB2A0A8A7, 0xB3B3ABB3, 0xA7ADACAB,
+ 0xBBAEB4B3, 0xC4C7B4BC, 0xBBC4C7BB, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xB8BDBEBA, 0xC0BABFC0, 0xBFC0BABF,
+ 0xBABFC0BA, 0xBFB8C0C0, 0xBFC0B7BF, 0xB6BBBCBA,
+ 0xC0B7BFBF, 0xC0BFB8C0, 0xB9BFBEBA, 0xBFBAC0BF,
+ 0xBFC0B8C0, 0xBAC0BFBA, 0xBEBAC1BE, 0xC0BFBAC1,
+ 0xBBC0BFBB, 0xBEBAC1BE, 0xC0BEBAC1, 0xBBC0BEBB,
+ 0xBEB8BFBC, 0xC0BFB9BF, 0xB9BFBEBA, 0xBEB6BCBB,
+ 0xBFBDB9BF, 0xBABFBDBA, 0xBEBBC0BF, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBCB9BFBE, 0xBDBCB7BD, 0xB9BFBEB7,
+ 0xBCB8BFBC, 0xBEBBB8BF, 0xB7BEBBB7, 0xBBB7BEBB,
+ 0xBFBCB7BE, 0xB8BFBCB8, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBCBFBDBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0xBE565B59, 0xC0BFBAC1,
+ 0xB9BFBEBA, 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB5,
+ 0xBDB9BFBE, 0xBFBDBABF, 0xBABFBEBA, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEBA, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB9C1C0B8, 0xC0B9C1C0, 0xC1C0BBC1, 0xBCC2C1BB,
+ 0xC0B9C1C1, 0xC0C1B8C0, 0xBBC0C1BB, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBDC2C1BC, 0xC0BAC0BF, 0xC0BFBBC1,
+ 0xB8C0BFBA, 0xC0B7BFBE, 0xC0BFB9C1, 0xBAC0BFBA,
+ 0xBFB9BFBE, 0xC0C0BAC0, 0xB8C0C0B8, 0xC0B6C0C0,
+ 0xC0C0B6C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC1BBC0C1, 0xBFC0BBC0, 0xBBC0C1BB,
+ 0xC0BABFC0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B9C1C1,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB7BFBE, 0xBFBEB7BF, 0xB7BFBEB7,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xB8BDBEB9, 0xC0B9BFBE,
+ 0xC0BFBBC1, 0xB8BEBDBA, 0xBEBBC0BF, 0xC0BFBABF,
+ 0xB9BFBEBA, 0xBFB7BDBC, 0xC0BFBAC0, 0xBBC0BFBA,
+ 0xBEBCBFBD, 0xBFBDBDC0, 0xBABFBDBA, 0xBEB9C0BD,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xBBB9C0BD, 0xC0BDB9C0,
+ 0xB1BAB7B7, 0xBAAAB3B0, 0xBBBAB6BD, 0xB7BCBBB6,
+ 0xB7BBBFBA, 0xBBB9B8BC, 0xB6BBB9B8, 0xB8B8BDBB,
+ 0xBDB8B7BD, 0xB9C0B9B7, 0xB6BDC4BD, 0xB4AEB6BD,
+ 0xB4B4AEB2, 0xA8B1B2A9, 0xB1A8B0B1, 0xB0B1A8B0,
+ 0xA9B3B4AA, 0xB5AAB0B4, 0x73786FB1, 0x0E32342E,
+ 0x01001112, 0x00010000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00010200, 0x00000100, 0x01000000,
+ 0x01010101, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00010000, 0x30232420, 0x34303334,
+ 0x3A3B3733, 0x373B3C38, 0x3B373A3B, 0x5A5C563C,
+ 0xB2B6BAB4, 0xBBB2B6BB, 0xB8BCB6B6, 0xB7B9BDB8,
+ 0xBDB8B6BC, 0xB8BCB7B7, 0xBBBABDBB, 0xBDBCB8BD,
+ 0xBABFBDB8, 0xB7B6BBB9, 0xBFBEB6BC, 0xB7BDBCB9,
+ 0xBDBABFBE, 0xBFBDBABF, 0xBABFBDBA, 0xBBBDC1BC,
+ 0xC1BCBFC1, 0xBDC1BCBD, 0xB7BBC1BC, 0xBEBCB6BC,
+ 0xBBC0BEB9, 0xBEB7BEBB, 0xBEBFB8C1, 0xB7BCBDB9,
+ 0xBEB7BDBC, 0xBCBDBABF, 0xB9BEBDB8, 0xBBB6BBB9,
+ 0xC0BFB8BD, 0xBABFC0BA, 0xBFBAC0BF, 0xBFC0BAC0,
+ 0xBABFC0BB, 0xC0B7BFBF, 0xC0BFB8C0, 0xB9BFBEB8,
+ 0xBFB5BCB9, 0xBEBFBAC0, 0xB8C0C0B9, 0xC0B8C0C0,
+ 0xBFBFB8C0, 0xB9BFBEB7, 0xBFB7BDBC, 0xBEBCBCC1,
+ 0xB6BBB9B9, 0xBDB8BDBB, 0xBFBCBABF, 0xB4BDBAB8,
+ 0xBCB6BDBA, 0xBFBEB8BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBDBCB9BF, 0xB8BDBCB8, 0xB9B7BCBA, 0xBDBBB8BE,
+ 0xB6BCB7B8, 0xB9BABEB9, 0xBEB9BABE, 0xB5BBB6B8,
+ 0xB6B5BBB6, 0xBCB7B6BD, 0xB7BBB6B8, 0xB3B7BBB6,
+ 0xBDB6B3BA, 0xB3BAB3B6, 0xB1B0B9AF, 0xB8B1B0B8,
+ 0xB1B7B2B0, 0xAFB4BAB5, 0xB4AFB0B4, 0xC0C4BFB0,
+ 0x397E817F, 0x3C37383B, 0x383C3738, 0x3130342F,
+ 0x302E3033, 0x2828282D, 0x07080507, 0x06030A05,
+ 0x57514A0B, 0x54615D52, 0x695B6663, 0x726F616C,
+ 0x61707060, 0x6F607171, 0x6E6B5D72, 0x55706C61,
+ 0x524A635E, 0x47443F55, 0x113F3C38, 0x00001815,
+ 0x02000002, 0x01000001, 0x00000000, 0x08090700,
+ 0x3430302A, 0x48433E3C, 0x58544F4C, 0x59605D55,
+ 0x695E6563, 0x706F616B, 0x6A787469, 0x6D637873,
+ 0x6260586F, 0x48505147, 0x1D174E51, 0x0403001D,
+ 0x00000100, 0x00000001, 0x00010000, 0x7840443E,
+ 0x84797D83, 0x80847980, 0x83888980, 0x90858B8C,
+ 0x8F93878C, 0x8E909488, 0x998D989A, 0x989C9095,
+ 0x919BA091, 0xA1959BA0, 0xA0A4989D, 0x96A0A596,
+ 0xA598A0A5, 0x9EA5989E, 0x9CA3A79B, 0xA79BA4A8,
+ 0xA3A79BA3, 0x9DA5A99D, 0xA99DA5A9, 0xA8ACA0A5,
+ 0x9BA2A99A, 0xAD9EA3AA, 0xA6ADA0A6, 0xA1A7AEA1,
+ 0xADA1A7AE, 0xA7AEA1A9, 0xA4A8AEA3, 0xADA4A6AE,
+ 0xA8ADA4A8, 0xA3A6AEA4, 0xB5ABA5AD, 0xA1A99FAD,
+ 0xB09EA69C, 0xBFBAAFB7, 0xB8C0B9B8, 0xB7B8BFB8,
+ 0xBDB8B7BE, 0xB9BDB8B9, 0xBABBBFBA, 0xBEB9BBBF,
+ 0xBABDBBBA, 0xBEBABFBD, 0xBFBDBABF, 0xB9C0BDBA,
+ 0xBEB9BFBE, 0xBCB9B9BF, 0xB9C0BDB5, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBBB8BDBB, 0xBFBDB8BD,
+ 0xBABFBDBA, 0xBBB9BEBC, 0xBBB9B8BD, 0xB6BCB7B8,
+ 0xBDB9C0BD, 0xBEBBB9C0, 0xBABFBEB7, 0xBEB9BEBD,
+ 0xBFBEB9BF, 0xB9C0BDB9, 0xC3BAC0BF, 0xBFBDBFC4,
+ 0xBBC0BEBA, 0xBEBABFBE, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBCBFBDBC, 0xBFBBC0BE,
+ 0xBFC0BAC0, 0xBABFC0BA, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xB9C1C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBEB8C0BF, 0xBFBEB9BF, 0xB9BFBEB9, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB5BFBFB6, 0xC0B6C0C0, 0xC0C0B8C0,
+ 0xB1B7B6B8, 0xB0A3ABAA, 0xB2B1AAB3, 0xA5ABAAAC,
+ 0xC0AFB5B4, 0xC0C0B8C0, 0xB7BFBFB8, 0xC0B8C0C0,
+ 0xBFC0BABF, 0xB8BDBEBA, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0, 0xB7BCBDBA,
+ 0xC0B7BFBF, 0xC0C1B8C0, 0xBABFC0BB, 0xBCB9BFBE,
+ 0xBFBEB7BD, 0xBABFBEBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBDB9C0BD, 0xC0BDB9C0, 0xB9C0BDB9,
+ 0xBDBAC1BE, 0xBFBEB9C0, 0xB8C0BFB7, 0xBBB9BFBE,
+ 0xBDBCB6BC, 0xB9BFBEB7, 0xBEBABFBE, 0xBFBDBABF,
+ 0xBAC0BBBA, 0xBBB8BFBC, 0xBEBBB7BE, 0xB8BDBBB7,
+ 0xBBBABFBD, 0xBDBBB8BD, 0xB9BEBCB8, 0xBBB8BDBB,
+ 0xBDBCB8BD, 0xBABFBDB7, 0xBABBBEBC, 0xBFBABBBF,
+ 0xBBBEBCBB, 0xC0C0C0C0, 0xC1BFC2C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0xBE565B59, 0xC0BFBAC1,
+ 0xB8C0C0B8, 0xBCB7BDBC, 0xBCBBB7BD, 0xB5BDBCB4,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEBABFBE,
+ 0xBFBEB9BF, 0xB9BFBEBA, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xB9C1C0B8, 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB,
+ 0xC0B8C0C0, 0xC0C1B8C0, 0xBBC0C1BB, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBCC1C0BC, 0xC0BAC0BF, 0xC1C0BBC1,
+ 0xB8C0BFB9, 0xBFB8C0BF, 0xC1C0B8C0, 0xBBC1C0BB,
+ 0xBFB9BFBE, 0xC0C0BAC0, 0xB8C0C0B8, 0xC0B6C0C0,
+ 0xC0C0B6C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC1BBC0C1, 0xBFC0BBC0, 0xBBC0C1BB,
+ 0xC0B8C0C0, 0xBFC2B8C0, 0xB8BFC2B8, 0xC0B7BFBF,
+ 0xC1C0B8C0, 0xB8C0BFB9, 0xC0B9C1C1, 0xBFBFB8C0,
+ 0xB8C0C0B7, 0xBFB8C0BF, 0xC0BFB8C0, 0xB7BFBEB8,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xB9BEBFB9, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xB9BFBEB8, 0xBFB9BEBD, 0xBFBEBBC0,
+ 0xB9BFBEB9, 0xBCB5BDBC, 0xBCBDB7BD, 0xB8BDBCB7,
+ 0xBDBABFBD, 0xBFBDBABF, 0xB9C0BDBA, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xBABFBEB9, 0xB8B9C0BD, 0xC0BDB6BD,
+ 0xB2BBB8B7, 0xBAAAB3B0, 0xBDBCB6BD, 0xBCC1C0B8,
+ 0xB8B7BBB6, 0xBDBBB9BD, 0xBABDBBBA, 0xBAB6BBB9,
+ 0xBDB8B7BC, 0xB7BDB8B7, 0xB6BEC4BF, 0xB4AFB8BC,
+ 0xB3B5AFB0, 0xA8AFAFA9, 0xB1ABB0B1, 0xB0B0AAB1,
+ 0x3577786F, 0x3C363B3E, 0x0002003A, 0x01000100,
+ 0x00000101, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00010200, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000002, 0x00000000,
+ 0x00000000, 0x00010000, 0x30232422, 0x34303334,
+ 0x3B3C3833, 0x37373B36, 0x3A36383C, 0x5A5C5639,
+ 0xB4B7BBB5, 0xBCB3B8BD, 0xB6BBB2B9, 0xB8B6BCB7,
+ 0xBCB7B7BD, 0xB8BEB9B6, 0xBBBABDBB, 0xBDBCB8BD,
+ 0xBABFBDB8, 0xB7B8BBB9, 0xBCBBB8BC, 0xBAC0BFB7,
+ 0xBEBABFBE, 0xBFBDBABF, 0xB9BEBCBA, 0xBBBDC1BC,
+ 0xC1BCBFC1, 0xBDC1BCBD, 0xBBBDC1BC, 0xBFBABCC0,
+ 0xBCC0BBBB, 0xBDB7BEBB, 0xBEBFB9C0, 0xBABFC0B9,
+ 0xBCB7BDBC, 0xBCBDB7BD, 0xBABFBEB8, 0xBAB6BBB9,
+ 0xBFBEB7BC, 0xBABFC0B9, 0xBDB9BEBD, 0xBEBFB9BE,
+ 0xBABFC0BA, 0xC0B9C1C1, 0xBFBEB8C0, 0xB9BFBEB9,
+ 0xB8B4BBB8, 0xBFBEB4BB, 0xB8C0C0B9, 0xBEB9C1C1,
+ 0xBFBEB7BF, 0xBABFBEB9, 0xBEBBC0BE, 0xBBB9BBC0,
+ 0xB9BEBCB8, 0xBBB8BDBB, 0xC0BDB7BE, 0xBAC1BEB9,
+ 0xBCB5BCB9, 0xBFBEB8BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xB6BBB9B9, 0xB6BAC0BB, 0xBDBBB5BB,
+ 0xB8BDBBB8, 0xB9BABEB9, 0xBCB7BABE, 0xB5BBB6B6,
+ 0xB5B4BCB5, 0xBCB7B5BC, 0xB7BBB6B8, 0xB5B5BCB5,
+ 0xBCB5B5BC, 0xB4BBB4B5, 0xB1B0B9AF, 0xB7B2B0B8,
+ 0xAFB5B0B0, 0xB0B0B4AF, 0xB4AFB1B5, 0xC0C4BFB0,
+ 0x397E817F, 0x3C37383B, 0x383C3738, 0x2F30342F,
+ 0x2F2F3034, 0x2827292F, 0x07080409, 0x06030A05,
+ 0x59534C0B, 0x54605C51, 0x63556663, 0x726F6166,
+ 0x5D707060, 0x6F606D6D, 0x6F6C5E72, 0x55706C61,
+ 0x514C635E, 0x48434055, 0x113F3C38, 0x00001815,
+ 0x02000002, 0x00000001, 0x00000000, 0x08090700,
+ 0x3430302A, 0x47443E3C, 0x58544F4C, 0x5B615D58,
+ 0x6A5E6665, 0x706F616A, 0x69787469, 0x6C647874,
+ 0x615F576F, 0x48505147, 0x1D174E51, 0x0203001B,
+ 0x00000100, 0x00000001, 0x00010000, 0x7A40443E,
+ 0x84797E83, 0x80847980, 0x83888980, 0x90858B8C,
+ 0x9094888C, 0x8D909488, 0x998D9799, 0x999D9195,
+ 0x8E989C90, 0x9F93989D, 0x9B9F939B, 0x949CA192,
+ 0xA5989EA3, 0x9FA6999E, 0x9BA3A79B, 0xA99DA3A7,
+ 0xA3A79BA5, 0x9BA3A79B, 0xA79BA3A7, 0xA5A99DA3,
+ 0x9BA4AB9C, 0xAB9CA3AA, 0xA6AD9EA4, 0xA2A8AFA2,
+ 0xADA1A8AF, 0xA9ADA1A9, 0xA5A8AEA3, 0xADA4A7AF,
+ 0xA8ACA6A8, 0xA4A8B0A6, 0xADA2A6AE, 0xA5ADA3A5,
+ 0xB09DA59E, 0xC0B9AFB7, 0xB8C0B9B8, 0xB8B8BFB8,
+ 0xBDB8B8BF, 0xB9BDB8B9, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBDBBC0BE, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBEB9BFBE, 0xBEBBB9BF, 0xBAC1BEB7, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBBBABFBD, 0xBDBBB8BD,
+ 0xB6BBB9B8, 0xB9B6BBB9, 0xBDBBB6BB, 0xB8BDBBB8,
+ 0xBCB6BDBA, 0xC0BDB8BF, 0xBBC0BEB9, 0xBEBABEBF,
+ 0xBFBEB9BF, 0xB9C0BDB9, 0xC7BAC0BF, 0xC0BEC3C8,
+ 0xB5BAB8BB, 0xBDBABFBE, 0xBFBDBABF, 0xBAC0BBBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBCBFBDBC, 0xBEBBC0BE,
+ 0xC0BFBBC0, 0xBABFC0BA, 0xBFB8C0C0, 0xC0BFB8C0,
+ 0xBAC0BFBA, 0xC0BABFC0, 0xC0C0B8C0, 0xB6C0C0B6,
+ 0xBDB8C0BF, 0xBFBEB6BE, 0xBAC0BFB9, 0xC0B8C0C0,
+ 0xC1C1B8C0, 0xB6C0C0B7, 0xC0B6C0C0, 0xBFC0B8C0,
+ 0xB6BCBBBA, 0xB0ABB3B2, 0xB2AFAAB3, 0xA5ACA9AB,
+ 0xC0A5AAAB, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BABFC0,
+ 0xBFC2BABF, 0xB9BEC1BA, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB6C0C0B6, 0xC0B8C0C0, 0xBFC0B8C0, 0xB9BEBFBA,
+ 0xC0B9C1C1, 0xBFC0B8C0, 0xB9BEBFBA, 0xBDB9BFBE,
+ 0xBFBEB8BE, 0xBABFBEB9, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBDB9C0BD, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB7BFBEB9, 0xBDB9BFBE,
+ 0xBEBDB8BE, 0xB9BFBEB8, 0xBEBABFBE, 0xBFBDBBC0,
+ 0xBAC0BBBA, 0xBCB9C0BD, 0xBFBDB8BF, 0xB8BDBBBA,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBDBCB8BD, 0xBABFBDB7, 0xBABBBFBA, 0xBFBABDBE,
+ 0xBBBFBABB, 0xC0C0C0C0, 0xC1BFC2C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0xBD565B59, 0xC0BFB9C0,
+ 0xB9C1C1B8, 0xBBB6BCBB, 0xBDBCB7BE, 0xB5BDBCB5,
+ 0xBDBABFBD, 0xBFBEBABF, 0xBABFBEBA, 0xBFBBC0BF,
+ 0xC0BFBBC0, 0xBAC0BFBA, 0xBFB8C0BF, 0xC0BFB8C0,
+ 0xBBC1C0BA, 0xC0B9C1C0, 0xC1C0B9C1, 0xBBC1C0BB,
+ 0xC0BABFC0, 0xC1C0BABF, 0xBBC1C0BB, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xC0BBC1C0, 0xC1C1BBC1,
+ 0xB9C1C1B9, 0xC0B9C1C1, 0xC0BFB8C0, 0xB8C0BFB8,
+ 0xBFB7BFBE, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B9C1C1,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFBFB8C0,
+ 0xB8C0C0B7, 0xC0B8C0C0, 0xBFC0B8C0, 0xBCC1C2BA,
+ 0xBFB8C0C0, 0xBFBFB7BF, 0xB8C0C0B7, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xC0B8C0C0, 0xBFC2B8C0,
+ 0xB7BFBFB8, 0xBFB9BFBE, 0xC0BFBAC0, 0xB9BFBEBA,
+ 0xBEB9BFBE, 0xBFC0B9BF, 0xBABFC0BA, 0xBFBAC0BF,
+ 0xBFBEBAC0, 0xB8BEBDB9, 0xBEBAC0BF, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBCB7BDBC, 0xB8B8B7BD, 0xB8BABAB6,
+ 0xBAB7BCBA, 0xBCBBB6BD, 0xB6BCBBB6, 0xBDB9BFBE,
+ 0xC0BFB8BE, 0xBAC0BFBA, 0xBEB6BDBA, 0xC0BDBAC1,
+ 0xB2BBB8B7, 0xBAAFB8B5, 0xBCBAB6BD, 0xB9BCBAB7,
+ 0xB6B8BCB7, 0xBDBBB7BB, 0xB9BCBABC, 0xB7B6BCB7,
+ 0xBBB9B6BC, 0xB9BDB8B8, 0xB7C0C4BF, 0xB4AFB8BC,
+ 0xB2B4AEB0, 0xAAB0B0AA, 0x5450B0B0, 0x27252455,
+ 0x00000100, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x01020000, 0x00000000, 0x00020000, 0x00000101,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x30252322, 0x34303534,
+ 0x3A3B3733, 0x37383C37, 0x3C37383C, 0x595D5738,
+ 0xB2B8BCB6, 0xBDB4B6BB, 0xB6BBB2BA, 0xB8B6BCB7,
+ 0xBDB8B6BD, 0xB6BCB7B7, 0xBBB8BDBB, 0xBFBEB8BD,
+ 0xBCBFBDBA, 0xB7B9BCBA, 0xC0BFB8BC, 0xBABFBEBB,
+ 0xBDBCBFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBCBCC0BB,
+ 0xC1BBBDC1, 0xBFC1BBBF, 0xBABEBFBB, 0xBBB7BDBE,
+ 0xBBBFBABA, 0xBBB9BCBA, 0xBFC0B8BD, 0xB9BEBFBA,
+ 0xC0BABFC0, 0xBFC0B8C0, 0xB9BFBEBA, 0xBEB6BBB9,
+ 0xC0BFBBC0, 0xB8BEBDBA, 0xBFB7BDBC, 0xBFC0BAC0,
+ 0xB7BFBFBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BDBCBA,
+ 0xB8B6BBB9, 0xBFBEB4BB, 0xB7BFBEB9, 0xBEB6BEBD,
+ 0xC0BFB7BF, 0xB8BBB9BB, 0xB9BCBFBD, 0xBBBAB8BB,
+ 0xBABFBEB6, 0xBEB9BEBD, 0xC0BDB9BF, 0xB9C0BDB9,
+ 0xBEB6BDBA, 0xC0BFBAC1, 0xB9BFBEBA, 0xBEB9BFBE,
+ 0xBDBBB9BF, 0xB8BCB7B8, 0xB6B8BCB7, 0xBEBCB7BB,
+ 0xB8BDBBB9, 0xB6BBBFBA, 0xBBB6B8BC, 0xB5BBB6B5,
+ 0xB5B5BCB5, 0xBAB3B5BC, 0xB5BCB5B3, 0xB3B6BDB6,
+ 0xBAB3B3BA, 0xB3BAB3B3, 0xB1AEB6AF, 0xB5B0B0B8,
+ 0xADB1ACAF, 0xAFB1B5B0, 0xB3AFB0B4, 0xC2C3BFB2,
+ 0x397E817F, 0x3C37383B, 0x383C3738, 0x2F30342E,
+ 0x2F2F3034, 0x2827292D, 0x0609050A, 0x05040904,
+ 0x56534B0A, 0x555E5C51, 0x6A5A6463, 0x7070606A,
+ 0x5C726F60, 0x6C5E6E6B, 0x69675C6D, 0x55625E53,
+ 0x514C635E, 0x48443F55, 0x113F3C38, 0x00001615,
+ 0x02000002, 0x00000000, 0x00000000, 0x05060200,
+ 0x3530302A, 0x47443F3D, 0x57534E4C, 0x5A5F5B56,
+ 0x695E6664, 0x706E636B, 0x69777368, 0x6D657874,
+ 0x62605870, 0x48525048, 0x37315051, 0x00040035,
+ 0x00000100, 0x00000000, 0x00010000, 0x7A40443E,
+ 0x84797E83, 0x80847980, 0x83888980, 0x90858B8C,
+ 0x8C90858C, 0x8D8F9387, 0x9A8F9599, 0x95998D96,
+ 0x93999D91, 0x9F939B9F, 0x9DA1959B, 0x969CA094,
+ 0xA1929EA2, 0x9EA5969A, 0x9BA3A79B, 0xA899A3A7,
+ 0xA3A899A3, 0x9BA2A69A, 0xA99DA3A7, 0xA5A99DA5,
+ 0x9EA7AC9D, 0xADA1A8AD, 0xA7AB9FA9, 0xA1A9ADA1,
+ 0xACA2A9AD, 0xAAAEA3AB, 0xA3A8ADA4, 0xADA4A7AC,
+ 0xA7ACA3A8, 0x9EA7ACA3, 0xAFA6A2A7, 0xACB4AAAA,
+ 0xB9A6AEA7, 0xC0B9B8C0, 0xB9C1BAB8, 0xB8B7BEB7,
+ 0xBDB8B8BF, 0xB7BDB8B7, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBCBBBEBC, 0xBFBDBBBE, 0xBABFBDBA,
+ 0xBABABFBE, 0xBDBCB6BB, 0xBABFBEB8, 0xBEBABFBE,
+ 0xBEBCBABF, 0xBABFBDB9, 0xB8B8BEB9, 0xBEBBB7BD,
+ 0xB7BEBBB7, 0xBFB8BEBD, 0xBFBEBAC0, 0xB8BFBCB9,
+ 0xBDB7BCBA, 0xC0BDB9C0, 0xB9C0BDB9, 0xBEBABFC0,
+ 0xBFBEB9BF, 0xB9C0BDB9, 0xC2BBC2BF, 0xBAB9BFC4,
+ 0xBBC0BFB5, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBDB9C0BD, 0xBFBDB9C0, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BFBBC0, 0xBAC0BFBA, 0xBFB8C0BF, 0xC0BFB8C0,
+ 0xBAC0BFBA, 0xC0B9BEBF, 0xC0C0B8C0, 0xB6C0C0B6,
+ 0xBFB6C1BF, 0xC0BFB8C0, 0xB9BFBEBA, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xC0B8C0C0, 0xBFC0BABF,
+ 0xBAC0BFBA, 0xB0B0B8B7, 0xB3B0AAB3, 0xA5ACA9AC,
+ 0xB59A9FA0, 0xC0C0ADB5, 0xB9C1C1B8, 0xC0B8C0C0,
+ 0xC1C1B8C0, 0xB5BDBDB9, 0xC0B9C1C1, 0xC0C0B8C0,
+ 0xB6C0C0B6, 0xBFB8C0C0, 0xC0BFB7BF, 0xB9BFBEBA,
+ 0xBEB8C0BF, 0xC0C0B7BF, 0xB8C0C0B8, 0xBEB8C0BF,
+ 0xC0BFB7BF, 0xB8BEBDB8, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB7,
+ 0xBFB9BFBE, 0xBEBFB9BE, 0xB9BEBFB9, 0xC0B9BEBF,
+ 0xC0BFBABF, 0xB9BFBEBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBBB9C0BD, 0xBDBCB7BE, 0xB8BDBCB8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xBABDBBBA, 0xBBB8BDBB,
+ 0xBFBCB8BD, 0xBABFBDB8, 0xBABBBFBA, 0xBFBABDBE,
+ 0xBBBFBABB, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0xBF565B5A, 0xC1C1BBC2,
+ 0xB8C0BFB9, 0xBDB8BEBD, 0xBEBDB9C0, 0xB8BEBDB6,
+ 0xBDB9C0BD, 0xBFBEBABF, 0xB9BFBEB9, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xC0B9C1C0, 0xC1C0B9C1,
+ 0xBBC1C0BB, 0xBFB9C1C0, 0xC1C0B8C0, 0xBBC1C0BB,
+ 0xC1BBC0C1, 0xC1C0BBC0, 0xBBC1C0BB, 0xC0BBC1C0,
+ 0xC2C1BBC1, 0xBBC1C0BC, 0xC0BBC1C0, 0xC1C1BBC1,
+ 0xB9C1C1B9, 0xC1B9C1C1, 0xC1C0B9C1, 0xB8C0BFB9,
+ 0xBFB7BFBE, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFBFB8C0,
+ 0xB8C0C0B7, 0xC0B8C0C0, 0xBFC0B8C0, 0xBBC0C1BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB7BFBFB8, 0xBFB6BEBE,
+ 0xC0BFB7BF, 0xB8C0BFB8, 0xC1B8C0C0, 0xC0C0B9C1,
+ 0xB8C0C0B8, 0xBEB9BFBE, 0xBEBDB9BF, 0xBAC0BFB8,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xB9BEBFB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xBAC0BFB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBCB7BDBC, 0xB8B7B7BD, 0xBABCBCB3,
+ 0xBEBABFBE, 0xBCBBB9BF, 0xB3BBBAB6, 0xBCB7BDBC,
+ 0xBFBEB7BD, 0xB8BEBDB9, 0xB9B9C0BD, 0xBDBAB5BC,
+ 0xB1BAB7B4, 0xBAB1B8B5, 0xBCBAB6BD, 0xBABEB9B9,
+ 0xB7B9BDB8, 0xBBB9B8BC, 0xB8BBB9B8, 0xB8B7BDB8,
+ 0xBCB7B7BD, 0xB8BCB7B6, 0xB7B8BCB7, 0xABA6B6BC,
+ 0xA7ABA5A7, 0x7CAFB2A9, 0x54508082, 0x81828053,
+ 0x3B393D38, 0x00003A3D, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x02000000,
+ 0x00010001, 0x00000000, 0x00010000, 0x00000100,
+ 0x00010101, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x31252322, 0x34303635,
+ 0x32332F35, 0x36393D38, 0x3C37373B, 0x585C5738,
+ 0xB2B6BAB4, 0xBBB2B6BB, 0xB8BCB6B8, 0xB8B7BEB7,
+ 0xBDB8B7BD, 0xB7BDB8B7, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xBABDBBBA, 0xB8B8BBB9, 0xBBBBB7BA, 0xBABCBCB9,
+ 0xBABABDBB, 0xBEBCB9BC, 0xBBC0BEB9, 0xBABBBEBC,
+ 0xBFBABBBF, 0xBBBFBABB, 0xB9BBBEBC, 0xBAB8B8BB,
+ 0xBEC1BFB7, 0xBBBABDBB, 0xC0BFB8BD, 0xBBC0C1BA,
+ 0xBFBAC0BF, 0xC0BFB8C0, 0xBAC0BFBA, 0xBBB6BBB9,
+ 0xBFBEB8BD, 0xB9BFBEB9, 0xBFB6BCBB, 0xC0C0BAC0,
+ 0xB7BFBFB8, 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BDBCBA,
+ 0xBDB6BBB9, 0xBFBEB9C0, 0xB7BFBEB9, 0xBCB7BFBE,
+ 0xBDBBB8BF, 0xB8BDBBB8, 0xB8B9BEBC, 0xBFBEB5BA,
+ 0xB9BFBEBA, 0xBFB9BFBE, 0xBDBBBAC0, 0xB5BAB8B8,
+ 0xBDB7BEBB, 0xBFBEB9C0, 0xB8BEBDB9, 0xBDB9BFBE,
+ 0xBBB9BABF, 0xB8BCB7B6, 0xB9B8BCB7, 0xBEB9BABE,
+ 0xBBBFBABA, 0xB4B7BBB6, 0xBCB7B6BA, 0xB6BCB7B6,
+ 0xB4B4BAB5, 0xB9B2B4BB, 0xB3BAB3B2, 0xB4B5BBB6,
+ 0xBBB6B3B9, 0xB1B7B2B5, 0xB0B0B8B1, 0xB5B0AFB7,
+ 0xB2B6B1AF, 0xAFAEB4AF, 0xB4AFAEB4, 0xBBBFBAB0,
+ 0x397E817F, 0x3C37383B, 0x383C3738, 0x2F30342F,
+ 0x2F2F3034, 0x2628292D, 0x07080409, 0x06050805,
+ 0x56524D0A, 0x555E5C51, 0x6F616463, 0x70706070,
+ 0x61726F60, 0x685A7370, 0x65635869, 0x55635F54,
+ 0x524A635E, 0x47443F55, 0x133D3C38, 0x00001614,
+ 0x02000002, 0x01000000, 0x01000101, 0x04050100,
+ 0x3430302A, 0x48453C3D, 0x58544F4D, 0x5F605D55,
+ 0x695E6B69, 0x706E636B, 0x69767469, 0x6D637674,
+ 0x6160566E, 0x48515046, 0x37315051, 0x03040035,
+ 0x00000100, 0x00000000, 0x00010000, 0x7A40443E,
+ 0x837A7E83, 0x80837A7E, 0x83888980, 0x90858B8C,
+ 0x9094898C, 0x8B909488, 0x998E9397, 0x989C9195,
+ 0x90989C90, 0x9F93989C, 0x9DA1959B, 0x949B9F93,
+ 0xA1929CA0, 0x9AA1929A, 0x98A0A498, 0xA697A0A4,
+ 0xA2A798A1, 0x9DA3A79B, 0xA99DA5A9, 0xA5A99DA5,
+ 0x9EA6AB9C, 0xACA0A8AD, 0xA5A99DA8, 0xA1A9ADA1,
+ 0xADA3A9AD, 0xA9ADA2AC, 0xA3A8AEA3, 0xADA4A8AE,
+ 0xA4A9A0A8, 0xA6A2A79E, 0xAFA6AAAF, 0xABB0A7AA,
+ 0xB9A7AEA7, 0xC0B9B9C0, 0xB8BFB8B9, 0xB8B9C0B9,
+ 0xBCB7B8BF, 0xB8BEB9B6, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBCC0BBBB, 0xBCBCBFBD, 0xC1BCBBBE, 0xB8BEB9BB,
+ 0xBBB8BDBC, 0xBDBCB7BC, 0xBABFBEB8, 0xBEBABFBE,
+ 0xC0BEBABF, 0xB9BEBCBB, 0xBDBABFBD, 0xC0BDB9C0,
+ 0xB6BDBAB9, 0xBDB9BFBE, 0xBEBDB8BE, 0xBAC0BFB8,
+ 0xBDBABFBD, 0xC0BDBABF, 0xB8BFBCB9, 0xBEB9BEBF,
+ 0xBFBEB9BF, 0xB9C0BDB9, 0xBEBAC1BE, 0xBBBABBC0,
+ 0xBBC0BFB6, 0xBDBABFBD, 0xC0BEB9C0, 0xB9BEBCBB,
+ 0xBDB9C0BD, 0xBFBDB9C0, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BFBBC0, 0xBAC0BFBB, 0xBFBAC0BF, 0xC1BEBAC0,
+ 0xBAC0BFBA, 0xC0B9BEBF, 0xC0C0B8C0, 0xB6C0C0B8,
+ 0xBFB5C0BE, 0xBFBEB8C0, 0xB9BFBEB9, 0xC0BABFC0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BABFC0, 0xC0C1BABF,
+ 0xB8C0C0BB, 0xAAB5C0BE, 0xABAAA2AD, 0xA4AAA9A5,
+ 0xAB999E9F, 0xC0C0A3AB, 0xB7BFBFB8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0, 0xC0C0B7BF,
+ 0xB6C0C0B6, 0xC0B8C0C0, 0xC0BFB8C0, 0xBAC0BFBA,
+ 0xBEB8C0BF, 0xC0C0B7BF, 0xB7BFBFB8, 0xBFB7BFBE,
+ 0xC0BFB8C0, 0xB9BFBEB8, 0xBDB9C0BD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB7,
+ 0xBFB9BFBE, 0xBEBFBABE, 0xB9BEBFB9, 0xBFB9BEBF,
+ 0xBFBEB9BE, 0xB9BFBEB9, 0xBCBABFBD, 0xBFBDB9BE,
+ 0xBABFBDBA, 0xBBB8BFBC, 0xBCBBB7BE, 0xB8BDBCB7,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xBABDBBBA, 0xBBB8BDBB,
+ 0xC0BDB8BD, 0xBBC0BEB9, 0xBABBBFBA, 0xBFBABDBE,
+ 0xBBBFBABB, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0xBE565B5A, 0xC0C0BAC1,
+ 0xB7BFBEB8, 0xBDB9BFBE, 0xBEBDB9C0, 0xB9BFBEB8,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBFBAC0BF,
+ 0xBFC0BAC0, 0xBABFC0BA, 0xBFB8C0BF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFBAC0BF, 0xC1C0BAC0, 0xBBC1C0BB,
+ 0xBFBAC0BF, 0xC1C0BAC0, 0xBAC0BFBB, 0xBFBAC0BF,
+ 0xC1C0BAC0, 0xBAC0BFBB, 0xC2BCC1C2, 0xC1C2BCC1,
+ 0xBCC1C2BC, 0xC2BCC1C2, 0xC2C2BCC1, 0xBAC2C2BA,
+ 0xC0B8C0BF, 0xC0C0B9C1, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xC1BBC0C1, 0xBFBFBBC0,
+ 0xB9C1C1B7, 0xC0B9C1C1, 0xC0C0B8C0, 0xB7BFBFB8,
+ 0xC0B8C0BF, 0xBFBFB9C1, 0xB7BFBFB7, 0xBFBBC0C1,
+ 0xBDBCB9BE, 0xB8BEBDB7, 0xBDBAC0BF, 0xBFBEB8BE,
+ 0xBAC0BFB9, 0xBDB9BFBE, 0xBFBEB9C0, 0xB8BEBDB9,
+ 0xBEBAC0BF, 0xBEBFB9BF, 0xB9BEBFB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB7BCBB, 0xBCBBB8BD,
+ 0xB8BEBDB6, 0xBEB8C1BE, 0xC0BFB8C1, 0xB9BFBEBA,
+ 0xBEBABFBE, 0xC0BFB9BF, 0xB9BFBEBA, 0xBDB9C0BD,
+ 0xBEBBB9C0, 0xB7BEBBB7, 0xB8B6BBB9, 0xBCB9B5BA,
+ 0xB4BBB8B5, 0xB9B0B7B4, 0xBCB7B5BC, 0xB5B9B4B8,
+ 0xADB3B9B4, 0xB8B6AAAF, 0xB8BBB9B5, 0xB5B5BDB6,
+ 0xBBB4B4BC, 0xB4BAB5B4, 0xB4B1B7B2, 0xA8A3B0B7,
+ 0xA1A8A1A2, 0xA4A2A79E, 0xAFA9A8AD, 0xA9B0A9AB,
+ 0xA19FA7A0, 0x9792A0A8, 0x71777291, 0x4272776E,
+ 0x1D14464B, 0x1A1C161A, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x01000200, 0x00000000,
+ 0x00000000, 0x02000002, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x2E292726, 0x332F3332,
+ 0x393A3634, 0x37383C37, 0x3C37383C, 0x555B5636,
+ 0xB3B5BCB5, 0xBBB5B3BA, 0xB8BCB6B7, 0xB3B7BBB5,
+ 0xBCB7B5B9, 0xB8BCB7B8, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB7BCBAB8, 0xB7BABDBB, 0xBCBCB5B7, 0xBABCBCBA,
+ 0xBCBABDBB, 0xBEBCBBBE, 0xB7BCBBB9, 0xBBB6BBBA,
+ 0xBFBDB8BD, 0xBABFBDBA, 0xBFB6BBBA, 0xBCBBBBC0,
+ 0xBAC1BEB6, 0xB9B6BBB9, 0xBFBEB6BB, 0xB9BFBEB9,
+ 0xBBB9C0BD, 0xBFBDB9C0, 0xBABFBDBA, 0xBDB6BBB9,
+ 0xC0BFBABF, 0xB7BDBCBA, 0xBDB5BCB9, 0xC0BFB9C0,
+ 0xB9BFBEBA, 0xBEB9BFBE, 0xBFC0B9BF, 0xB7BDBCBA,
+ 0xBEB5BCB9, 0xBFBEBAC1, 0xB9BFBEB9, 0xB9B7BEBB,
+ 0xBCB9B5BC, 0xB9BFBEB5, 0xBBB6BCBB, 0xC0BDB6BC,
+ 0xB9BFBEB9, 0xBEBAC0BF, 0xBFBDB9BF, 0xB6BBB9BA,
+ 0xBDBABFBD, 0xC0BEBABF, 0xB8BDBBBB, 0xB9B6BBB9,
+ 0xBAB8B6BB, 0xB7BDB8B5, 0xBAB5BBB6, 0xBEB9BBBF,
+ 0xB7BBB6BA, 0xB7B6BAB5, 0xBAB8B6BC, 0xB6BCB7B5,
+ 0xB1B5B9B4, 0xBCB7B2B6, 0xB5B9B4B8, 0xB6B3B8B6,
+ 0xB8B6B3B8, 0xB3B8B6B3, 0xB2B1B7B2, 0xB4AEB2B9,
+ 0xAEB4AFB0, 0xAEABB2AD, 0xB8B3ACB3, 0xBCC0BBB2,
+ 0x39808381, 0x3B39383B, 0x383C3738, 0x2F30342F,
+ 0x302E3034, 0x282A2A2D, 0x07080507, 0x07030805,
+ 0x57554D0A, 0x5C626157, 0x6F616A6A, 0x706F6170,
+ 0x60707060, 0x6C5E7070, 0x6865576F, 0x51625C4F,
+ 0x524A605C, 0x423F3A55, 0x133B3938, 0x00001313,
+ 0x00000000, 0x00000000, 0x00000000, 0x05060400,
+ 0x342E302A, 0x48453C3D, 0x58544F4D, 0x5B636159,
+ 0x6A5F6665, 0x6E6E606C, 0x68747468, 0x6C607274,
+ 0x5E5C516C, 0x4B575749, 0x3B325757, 0x0001003A,
+ 0x00000100, 0x00000000, 0x00010000, 0x7E414540,
+ 0x857E7E85, 0x80857C7E, 0x83878A81, 0x90878B8C,
+ 0x8F93888D, 0x8B93978B, 0x9C90959A, 0x989C9098,
+ 0x919D9E94, 0x9F939A9B, 0x9EA2969B, 0x959DA195,
+ 0xA2939DA1, 0x9DA2939D, 0x949CA394, 0xA4989CA3,
+ 0xA0A498A0, 0x9BA3A79B, 0xA99DA3A7, 0xA5A99DA5,
+ 0xA0A5A99D, 0xAD9EA8AC, 0xA8AD9EA8, 0xA1A9ADA1,
+ 0xADA1A9AD, 0xAAAEA2A9, 0xA2A8AFA2, 0xABA0A6AF,
+ 0xA1A99EA3, 0xA4A7ADA2, 0xACA3A9AF, 0xA7ACA3A7,
+ 0xBEACB0AA, 0xC4BFC0C4, 0xB9BDB8C0, 0xB8BABEB8,
+ 0xBDB8BABE, 0xBBBFBAB9, 0xBABBBFBA, 0xBFB9BBBF,
+ 0xBBBFB9BB, 0xBBBBBFBA, 0xBFBABCC0, 0xB9BFBAB9,
+ 0xBEBABFBE, 0xC0BEBABF, 0xBABFBDBB, 0xBDBCBFBD,
+ 0xBFBEBCBF, 0xBBC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xB8C0BFBA, 0xBBB4BCBB, 0xBFC0B4BC, 0xBAC0BFBA,
+ 0xBDBABFBD, 0xC0BDBABF, 0xB9C0BDB9, 0xBEBABEBF,
+ 0xBFBEBABF, 0xB9C0BDB9, 0xB9B9BEBC, 0xBFBEB6BB,
+ 0xBABFBEBA, 0xBDB9BEBC, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBCBBC1BC,
+ 0xC0BEBBC1, 0xBBC0BEBB, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xC0B8BDBE, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xB9BFBEBA, 0xBDB6BBBC,
+ 0xC0C0B7BC, 0xB5BDBDB8, 0xBEB8BDBE, 0xBEC1B8BD,
+ 0xB8C0C0B7, 0xB3B7C1C1, 0xA7A7AAB5, 0xA3A8A99F,
+ 0xA6A1A6A7, 0xC0C0A0A5, 0xB8C0C0B8, 0xC0B6C0C0,
+ 0xC0C0B6C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBDB8BDBE, 0xBDBCB7BC, 0xB7BDBCB7,
+ 0xBFB8C0C0, 0xC0C0B7BF, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xB9BFBEBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBEBFB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBEBFB9BF, 0xB9BFBEB9, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xB9BEBCBA, 0xB9B8BDBB, 0xBDBBB8BE, 0xB8BDBBB8,
+ 0xBAB8BDBB, 0xBDBBB7BC, 0xB9BEBCB8, 0xBAB7BCBA,
+ 0xC0BDB7BC, 0xBABFBDB9, 0xBABBBFBA, 0xBFBABDBE,
+ 0xBBBFBABB, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0xBF565B5A, 0xC0C0BAC0,
+ 0xB8C0BFB8, 0xBDB9BFBE, 0xBEBDB9C0, 0xB9BFBEB8,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBFB8C0BF,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xBEB7BFBE, 0xBFBFB7BF,
+ 0xB8C0C0B7, 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB,
+ 0xC0BAC0BF, 0xC1C0BBC1, 0xBBC1C0BB, 0xBFBBC1C0,
+ 0xC1C0BAC0, 0xBAC0BFBB, 0xC2BDC2C3, 0xC0C1BCC1,
+ 0xBDC2C3BB, 0xC2BCC1C2, 0xC2C2BCC1, 0xB9C1C1BA,
+ 0xC0B9C1C0, 0xC0C0B9C1, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xC1BBC0C1, 0xBFBFBBC0,
+ 0xB9C1C1B7, 0xC1B9C1C1, 0xC1C1B9C1, 0xB8C0BFB9,
+ 0xBFB9C1C0, 0xC0C0B8C0, 0xB9C1C1B8, 0xC1BABFC0,
+ 0xBFBEBBC0, 0xB5BBBAB9, 0xBEB5BBBA, 0xC0BFB9BF,
+ 0xB9BFBEBA, 0xBDB9BFBE, 0xBEBDB9C0, 0xBAC0BFB8,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xB9BEBFB9, 0xBFB9BFBE,
+ 0xBFBEBAC0, 0xB7BDBCB9, 0xBCB9BEBD, 0xBDBCB8BD,
+ 0xB7BDBCB7, 0xB7B1BAB7, 0xB3B2B1BA, 0xB3B9B8AB,
+ 0xBEBABFBE, 0xBFBEBABF, 0xB9C0BDBA, 0xB9B8BFBA,
+ 0xBEBBB7BE, 0xB8BDBBB7, 0xB9B6BBB9, 0xBBB8B6BB,
+ 0xB1B8B5B4, 0xB7B0B7B4, 0xBBB6B5BC, 0xB6BCB7B5,
+ 0xB2B6BBB9, 0xBABAAFB4, 0xB2B7B5B8, 0xAFB2BAB3,
+ 0xB8B1B0B9, 0xB3BAB3B1, 0xB2AFB6B1, 0xA7A2B0B7,
+ 0xA1A8A1A0, 0x9EA0A89E, 0xA89DA3A9, 0xA0A89EA0,
+ 0xA1A0A99F, 0xA9A29EA9, 0xA0A8A1A1, 0x9AA0A69B,
+ 0xA79AA0A7, 0x9FA59AA0, 0x6D6C736C, 0x736E6C72,
+ 0x3238336D, 0x00353836, 0x01000002, 0x00010000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00010101,
+ 0x00000000, 0x02000002, 0x00020000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x2F292726, 0x332F3633,
+ 0x38393534, 0x373A3B37, 0x3C37383C, 0x565C5736,
+ 0xB6B6BDB6, 0xBCB7B6BD, 0xB8BCB7B8, 0xB6B8BCB6,
+ 0xBAB5B8BC, 0xB9BDB8B6, 0xBBB8BDBB, 0xBCB7B8BD,
+ 0xB8BDBBB6, 0xB7B9BCBA, 0xBDBDB5B7, 0xBCBCBCBD,
+ 0xBBBABDBB, 0xBBBABABD, 0xB7BCBBB6, 0xBEBABFBE,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBFBAC0BF, 0xBCBBBAC0,
+ 0xB4BCBBB4, 0xB7B7BEBB, 0xBFBEB6BC, 0xB7BEBBB9,
+ 0xBAB9BFBA, 0xC0BBBAC1, 0xBAC0BBBA, 0xBCB8BBB9,
+ 0xBFBEB9BE, 0xB7BDBCBA, 0xBEB7BEBB, 0xC0BFBAC1,
+ 0xB9BFBEBA, 0xBFB9BFBE, 0xBFBEBAC0, 0xB5BBBAB9,
+ 0xBDB7BEBB, 0xC0BFB9C0, 0xB7BDBCBA, 0xBBB5BCB9,
+ 0xC1BEB7BE, 0xB9BFBEBA, 0xBEB6BCBB, 0xC0BDB8C1,
+ 0xB9C0BDB9, 0xBEB7BFBE, 0xBFBDB9BF, 0xB6BBB9BA,
+ 0xBAB8BDBB, 0xBBB9B7BC, 0xB6BBB9B6, 0xB9B8BCB7,
+ 0xC0BEBABE, 0xB8BDBBBB, 0xB5B5BBB6, 0xBFBAB6BA,
+ 0xB7BBB6BB, 0xB6B6BCB7, 0xBBB9B5BB, 0xB4BAB5B6,
+ 0xB4B3B7B2, 0xBCB7B5B9, 0xB5B9B4B8, 0xB6B4B9B7,
+ 0xB8B7B2B7, 0xAFB4B2B3, 0xB1B2B8B3, 0xB4AEB1B8,
+ 0xAEB4AFB0, 0xAFABB4B1, 0xB8B3A9B2, 0xB5BBB6B1,
+ 0x3980847F, 0x3B39383B, 0x383B3938, 0x2F30342F,
+ 0x312C3034, 0x2A2B292D, 0x07080507, 0x06020805,
+ 0x57554D09, 0x6366655B, 0x6F616F6F, 0x70706070,
+ 0x5F707060, 0x695B6F6F, 0x6865576C, 0x51625C4F,
+ 0x5349605C, 0x423F3A55, 0x133A3837, 0x00001313,
+ 0x00000000, 0x00000000, 0x00000000, 0x05060400,
+ 0x342E302A, 0x47433C3D, 0x5855504A, 0x5A626058,
+ 0x6B5D6466, 0x7070626C, 0x68727468, 0x6B5F7274,
+ 0x5E5D4F6B, 0x4A575749, 0x3B335858, 0x0201003D,
+ 0x00000100, 0x00000000, 0x00010000, 0x7F404341,
+ 0x857E7E84, 0x80847E7E, 0x83868980, 0x8E858B8C,
+ 0x9094898B, 0x8C93978B, 0x9C90969B, 0x989C9098,
+ 0x949D9E94, 0xA1959EA0, 0x9B9F939D, 0x959EA296,
+ 0xA2939DA1, 0x9CA1929D, 0x949AA192, 0xA4989CA3,
+ 0xA0A498A0, 0x97A0A498, 0xA79B9FA3, 0xA3A79BA3,
+ 0xA0A5A99D, 0xACA0A8AC, 0xA8AD9EA8, 0xA1A9ADA1,
+ 0xADA1A9AD, 0xA7AEA1A9, 0x9EA4ADA0, 0xAC9FA2AB,
+ 0xA4ADA0A3, 0xA3A6ACA1, 0xAEA5A8AE, 0xA9AEA5A9,
+ 0xBEADAFA9, 0xC3BFC2C4, 0xBBBCB8C2, 0xBABBBFB9,
+ 0xBFBABCC0, 0xBABEB9BB, 0xBABBBFBA, 0xBFB9BBBF,
+ 0xBABEB8BB, 0xBABBBFBA, 0xBBB6BBBF, 0xBAC0BBB5,
+ 0xBFBABFBD, 0xBEBCBBC0, 0xBBC0BEB9, 0xBBBABFBD,
+ 0xBEBDB8BD, 0xBABFBEB9, 0xBFBAC0BF, 0xBFBEBAC0,
+ 0xB8C0BFB7, 0xBFB4BCBB, 0xBCBBB8C0, 0xB6BCBBB6,
+ 0xBDBABFBE, 0xC0BDBABF, 0xB9BFBEB9, 0xBFBABFBE,
+ 0xC0BDBBC0, 0xB7BEBBB9, 0xBEB5BAB8, 0xBFBEBBC0,
+ 0xB9BFBEB9, 0xBDBBC0BE, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBCBBC1BC,
+ 0xC0BEBBC1, 0xBBC0BEBD, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xC0B7BFBF, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBDB7BFBE, 0xBFBEB8BE, 0xBBC0BFB9, 0xBCB6BBBC,
+ 0xBEBEB6BB, 0xB5BDBDB6, 0xBEB8BDBE, 0xBEC1B8BD,
+ 0xB6BFC2B7, 0xC1B7C1C1, 0xC2C2B5C1, 0x9FA7A7B8,
+ 0xADA0A5A6, 0xC0C0A7AC, 0xB8C0C0B8, 0xC0B6C0C0,
+ 0xC1C1B6C0, 0xB8C0C0B9, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBDB7BCBD, 0xBDBCB7BC, 0xB8BEBDB7,
+ 0xBFB9BEBF, 0xC0C0B7BF, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xB9BFBEBA, 0xBEBAC0BF, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBDB9BFBE, 0xBFBEB9C0, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBEBFB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBDBCBAC1,
+ 0xB8BDBBB8, 0xB7B6BBB9, 0xBDBBB6BC, 0xB8BDBBB8,
+ 0xBBB6BBB9, 0xBDBBB8BD, 0xB8BDBBB8, 0xBAB8BDBB,
+ 0xBEBBB7BC, 0xBABFBDB7, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF545A59, 0xC0C0B8C0,
+ 0xB8C0BFB8, 0xBCB8BEBD, 0xBDBCB8BF, 0xB9BFBEB7,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBFB8C0BF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC0BBC1C0, 0xC0C1BBC1, 0xBBC0C1BB,
+ 0xC0BAC0BF, 0xC1C0BBC1, 0xBBC1C0BB, 0xBFBBC1C0,
+ 0xC1C0BAC0, 0xB8C0BFB9, 0xC0BCC1C2, 0xBFC0BABF,
+ 0xBDC1C2BB, 0xC2BCC1C2, 0xC2C2BCC1, 0xB6BEBEBA,
+ 0xC0BBC1C0, 0xC0C0BBC1, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xC1B9C1C1, 0xBFBFB9C1,
+ 0xB9C1C1B7, 0xC1B8C0BF, 0xC1C0BAC2, 0xB9C1C0B9,
+ 0xC1B9C1C0, 0xC1C1B9C1, 0xB9C1C1B9, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xBDB9BEBF, 0xBEBFB7BC,
+ 0xBBC1C0B9, 0xBEB9BFBE, 0xC0BFB9BF, 0xB8BEBDBA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9, 0xBCB9BFBE,
+ 0xBEBDB7BD, 0xBABFBEB9, 0xBBB7BDBC, 0xBDBCB6BC,
+ 0xB8BEBDB7, 0xA8B3BAB7, 0xAAA9A4AB, 0xB4B9B8A4,
+ 0xBBB7BCBB, 0xBCBAB8BD, 0xB8BDBBB7, 0xB7B8BEB9,
+ 0xBDBBB6BC, 0xB8BDBBB8, 0xB8B6BBBA, 0xBAB9B3B9,
+ 0xB1B7B6B4, 0xB7B0B7B4, 0xB9B4B5BC, 0xB3BAB3B3,
+ 0xB8B6BCB7, 0xBABAB5BA, 0xB7BCBAB8, 0xAFB2BAB3,
+ 0xB8B1B0B9, 0xB3BAB3B1, 0xB2B0B7B2, 0xACA7B0B7,
+ 0xA1A8A1A6, 0x9CA0A89E, 0xA89D9FA7, 0x9CA499A2,
+ 0xA1A1AAA0, 0xA8A19EA9, 0xA0A99FA0, 0x97A0A79A,
+ 0xA7989FA6, 0x9EA79AA0, 0xA1A2ACA0, 0xAAA0A0AB,
+ 0xA1ACA29F, 0x69A2ABA1, 0x736C6B73, 0x6C736C6C,
+ 0x34363A34, 0x0100383A, 0x00010000, 0x00000100,
+ 0x02000102, 0x00010001, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x2F282625, 0x332F3433,
+ 0x393A3634, 0x373A3B37, 0x3C37383C, 0x585C5738,
+ 0xB4B5BCB5, 0xBBB6B4BB, 0xB4BAB5B5, 0xB7B8BCB7,
+ 0xBCB5B8BC, 0xB5BCB5B5, 0xB7BABEB9, 0xBBB9B8BC,
+ 0xBABDBBB8, 0xB6BBBEBC, 0xB7B7B5B8, 0xBCBCBCB7,
+ 0xBBB8BBB9, 0xBCBCB8BD, 0xB8BDBCBA, 0xBBB8BFBC,
+ 0xBFBEB7BE, 0xB9BFBEB9, 0xBAB6BCBB, 0xC1C0B5BB,
+ 0xB4BCBBB9, 0xB7B7BEBB, 0xC0BFB6BC, 0xB9C0BDBA,
+ 0xBBBAC1BC, 0xBFBAB9C0, 0xBAC0BBB9, 0xBDB7BCBA,
+ 0xBDBCBABF, 0xB5BBBAB8, 0xBEBAC0BF, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xBDB9BFBE, 0xBFBEB8BE, 0xB6BBB9BA,
+ 0xBBB8BDBB, 0xBDBCB8BD, 0xB6BBBAB8, 0xBBB7BEBB,
+ 0xC0BEB7BE, 0xB7BEBBBB, 0xBDB6BDBA, 0xC0BDB9C0,
+ 0xB9C0BDB9, 0xBFB9BFBE, 0xBEBCBAC0, 0xB8BCB7B9,
+ 0xBAB6BBB9, 0xBBBBB7BC, 0xBBBDBDB9, 0xB8BBBEBC,
+ 0xBEBCB9BD, 0xB6BBB9B9, 0xB6BABEB9, 0xBBB6B7BB,
+ 0xB8BCB7B7, 0xB6B6BBB9, 0xBAB5B2B9, 0xB6BCB7B4,
+ 0xB3B3B7B2, 0xBCB8B5B9, 0xB7BBB6BB, 0xB6B6BCB7,
+ 0xB2B2B3B8, 0xB5B8B6B0, 0xB1B5B9B4, 0xB7B3B3B7,
+ 0xB3B7B2B6, 0xB0ACB3B0, 0xB3AEACB3, 0xB5BBB6AC,
+ 0x3780847F, 0x3C37383C, 0x393D3838, 0x2F30342F,
+ 0x312C3034, 0x2A2B292D, 0x06070406, 0x07030904,
+ 0x57554D0A, 0x5D606157, 0x70606B6B, 0x70706070,
+ 0x60707060, 0x6C5E7070, 0x6865576F, 0x52605C51,
+ 0x5248615D, 0x42403854, 0x133A3837, 0x00001313,
+ 0x00000000, 0x00000000, 0x00010000, 0x04040400,
+ 0x362F2F29, 0x48443E3F, 0x57544F4B, 0x5A626157,
+ 0x6B5D6466, 0x6A6A5C6C, 0x66727566, 0x6B5F7275,
+ 0x5D5D4F6B, 0x49585749, 0x39315757, 0x0302003B,
+ 0x00000100, 0x00000000, 0x00010000, 0x7F404341,
+ 0x847F8084, 0x80847E80, 0x83868980, 0x8F868B8C,
+ 0x9293898E, 0x8C93978B, 0x9C909498, 0x989C9098,
+ 0x939B9F93, 0x9F939B9F, 0x9EA3949B, 0x939CA192,
+ 0xA1959DA2, 0x9DA1959D, 0x949CA394, 0xA3969CA3,
+ 0x9EA4999C, 0x9BA3A79B, 0xA498A3A7, 0xA0A498A0,
+ 0x9EA2A69B, 0xADA1A6AA, 0xA8ACA0A9, 0xA1ABADA1,
+ 0xAEA3ABAD, 0xA7ADA2AA, 0x9EA1A99E, 0xACA0A0AA,
+ 0xA3ADA1A2, 0xA4A5ADA2, 0xAFA5A7AF, 0xA9AEA5A7,
+ 0xB7AEB0AA, 0xC3BFBDBD, 0xBBBCB8C4, 0xB8BCC0BA,
+ 0xBFBABABE, 0xBCC0BBBB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABDC1BC, 0xBCB7BBBF, 0xBBBFBAB8,
+ 0xBEBABFBD, 0xC0BEBBC0, 0xBABFBDBB, 0xBEBABFBD,
+ 0xC0BDBAC1, 0xB9C0BDB9, 0xB8BAC0BF, 0xB8B9B3B9,
+ 0xBABFC0B3, 0xC0B9BEBF, 0xB7B6BBC1, 0xADB3B2B1,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBEBA, 0xBEB9BFBE,
+ 0xBDBBB9BF, 0xB6BBB9B8, 0xBEBAC0BF, 0xC0BFB9BF,
+ 0xB8BEBDBA, 0xBBB9BEBC, 0xC0BEBAC0, 0xBABFBDBB,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBFBAC0BF, 0xC1BEBAC0,
+ 0xBAC0BFBA, 0xC0B8C0C0, 0xC0BFB8C0, 0xB8C0BFB8,
+ 0xC0B9BEBF, 0xBFBEBABF, 0xB9BFBEB9, 0xBCB7BDBC,
+ 0xBEBDB7BD, 0xB7BDBCB8, 0xBDB6BEBE, 0xBEC1B5BD,
+ 0xB6BFC2B7, 0xC3B7C0C3, 0xCED0B5C1, 0xC3CCCFC2,
+ 0xC3B8BFC2, 0xC0C0BBC0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BABFC0, 0xBFC0BABF,
+ 0xB9BEBFBA, 0xBDB6BBBC, 0xBDBCB7BC, 0xB6BCBBB8,
+ 0xBEB8BEBD, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBDB9C0BD, 0xC0BDB9C0,
+ 0xB9C0BDB9, 0xBDB9C0BD, 0xC0BDB9C0, 0xB9BFBEB9,
+ 0xBEB7BFBE, 0xC0BDB7BF, 0xB7BFBEB7, 0xBFB9BFBE,
+ 0xBFBEB9BE, 0xB9BFBEB9, 0xBEB9BFBE, 0xBDBBB9BF,
+ 0xB8BDBBB8, 0xB9B8BBB9, 0xBEB9B8BB, 0xB8BEB9B8,
+ 0xBBB6BBB9, 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB8BDBB,
+ 0xBFBCB9BE, 0xBABFBDB8, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF555B5A, 0xC0C0B8C0,
+ 0xB8C0BFB8, 0xBBB5BBBA, 0xBFBEB7BE, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBFB8C0BF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC0BBC1C0, 0xC0C1BBC1, 0xBCC1C2BB,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB, 0xBFBBC1C0,
+ 0xC2C1BAC0, 0xB9C1C0BA, 0xC2BDC2C3, 0xC1C2BCC1,
+ 0xBDC1C2BD, 0xC2BCC1C2, 0xC2C2BCC1, 0xB5BDBDBA,
+ 0xC0BBC1C0, 0xBFC0BBC1, 0xB8C0C0BA, 0xC0B9C1C1,
+ 0xBFC0B8C0, 0xBBC0C1BA, 0xC1B9C1C1, 0xBFBFB9C1,
+ 0xB8C0C0B7, 0xC0B8C0BF, 0xC1C0B9C1, 0xB9C1C0B9,
+ 0xC1B9C1C1, 0xC0C0B9C1, 0xB8C0C0B8, 0xBFB8C0C0,
+ 0xBFBEB8C0, 0xB7BFBEB7, 0xBFB9BEBF, 0xBEBFB9BE,
+ 0xB9BEBFB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBDBCB9BF, 0xB8BEBDB7, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB8BDBCBA, 0xBCB7BDBC, 0xBEBDB7BD,
+ 0xB7BDBCB8, 0xB7B3BAB7, 0xB9B8B3BA, 0xB4B9B8B4,
+ 0xBBBABDBB, 0xBDBBBABD, 0xB6BBB9B8, 0xB7B6BCB7,
+ 0xBBB9B6BC, 0xB6BBB9B8, 0xB6B4BBB8, 0xB9B8B1B7,
+ 0xAFB5B4B3, 0xB4ACB3B0, 0xB9B4B2B9, 0xB3B9B4B2,
+ 0xB4B3B9B4, 0xB8B6B3B9, 0xB3B8B6B5, 0xB2B0B8B1,
+ 0xB8B1B1B9, 0xB3BAB3B1, 0xB1B0B7B2, 0xADA6AFB6,
+ 0xA1A8A1A6, 0x9DA0A89E, 0xA89DA0A8, 0xA0A89DA2,
+ 0x9FA0A99F, 0xA99FA0A9, 0xA1A99EA0, 0x98A0A79A,
+ 0xA797A1A9, 0x9FA9999D, 0xA0A2ACA0, 0xACA0A0AC,
+ 0xA0ACA0A0, 0xA0A2ACA0, 0xABA1A2AC, 0xA3ABA1A2,
+ 0xA3A6ABA2, 0x736AA7AC, 0x70726C70, 0x1B5E605A,
+ 0x1F1B1F21, 0x0102001E, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x2F262725, 0x332F3233,
+ 0x38393534, 0x37393D38, 0x3C37383C, 0x585C5738,
+ 0xB6B6BDB6, 0xBBB6B6BD, 0xB5BBB6B5, 0xB6B7BBB6,
+ 0xBCB6B7BB, 0xB5BCB5B8, 0xB7B8BCB7, 0xBDBBB8BC,
+ 0xBCBFBDBA, 0xB6BABDBB, 0xB8B8B5B8, 0xBABCBCB8,
+ 0xBDB8BDBB, 0xBEBFBABF, 0xBABFBEBA, 0xBBB9C0BD,
+ 0xC2BFB7C1, 0xB5BBBABB, 0xB6ADB2B0, 0xBEBFB2B9,
+ 0xBAC0BFB9, 0xB6B8BDBB, 0xC0BDB5BB, 0xB9C0BDB9,
+ 0xBBB9C0BD, 0xC1BCBAC0, 0xBBC1BCBB, 0xBEB8BDBB,
+ 0xBDBCBBC0, 0xB6BBBAB8, 0xBEBAC0BF, 0xC1C0BAC1,
+ 0xB9C0BDBB, 0xBDB9BFBE, 0xC0BEBABF, 0xB6BBB9BB,
+ 0xBDB8BDBB, 0xBDBCBABF, 0xBABFBDB8, 0xBBBBC0BE,
+ 0xBFBDB7BE, 0xB6BBB9BA, 0xBBBBC1BC, 0xC0BDB9C0,
+ 0xB9C0BDB9, 0xBBBABFBE, 0xBCBAB8BD, 0xB6BCB7B7,
+ 0xBDB8BDBB, 0xBFBFBABF, 0xBCBEBEBD, 0xB7BCBFBD,
+ 0xBBB9B8BC, 0xB8BDBBB6, 0xB9BABDBB, 0xBCB7BABE,
+ 0xB7BBB6B8, 0xB6B7BDB8, 0xBBB6B4BB, 0xB6BCB7B5,
+ 0xB7B5B9B4, 0xBBB7B8BC, 0xB8BCB7BA, 0xB6B7BDB8,
+ 0xB0AEB3B8, 0xB8BBB9AB, 0xB2B8BCB7, 0xB9B4B4B8,
+ 0xB3B7B2B5, 0xB3B2B8B3, 0xB3AEB1B8, 0xB2B8B3AC,
+ 0x3780847F, 0x3C37383C, 0x383C3738, 0x3130342F,
+ 0x302E3033, 0x2A2B292D, 0x06090707, 0x07030A05,
+ 0x57554D0A, 0x5D606157, 0x70606B6B, 0x70705E70,
+ 0x5D707060, 0x685A6D6D, 0x6864596B, 0x51615D52,
+ 0x53495D5B, 0x40413854, 0x123A3935, 0x00001314,
+ 0x00000000, 0x00000000, 0x00010000, 0x05050500,
+ 0x3330302A, 0x49443D3B, 0x58554D4D, 0x5A626157,
+ 0x695E6666, 0x7170626B, 0x666A6D5E, 0x6C607275,
+ 0x5C5C506C, 0x4B575749, 0x3A325757, 0x0201003C,
+ 0x00000100, 0x00000000, 0x00010000, 0x8040443F,
+ 0x847F7F85, 0x80847E80, 0x83868980, 0x8E858B8C,
+ 0x9094898D, 0x8D93978C, 0x9D919599, 0x989C9099,
+ 0x939B9F93, 0xA0919B9F, 0x9DA2939B, 0x939BA091,
+ 0xA1959B9F, 0x9DA1959D, 0x969DA495, 0xA4979EA5,
+ 0x9EA5989D, 0x98A3A79B, 0xA397A0A4, 0xA3A79B9F,
+ 0x9BA0A498, 0xA99DA1A8, 0xA8ACA0A5, 0xA1A9ADA1,
+ 0xABA0A9AD, 0xA4AA9FA7, 0xA1A3ABA0, 0xADA1A3AD,
+ 0xA4ACA1A3, 0xA4A7AFA4, 0xAFA4A7AF, 0xA9AEA5A9,
+ 0xB8AEB1A8, 0xC3BFBCBE, 0xBBBCB8C4, 0xB6B8BCB6,
+ 0xBFBAB8BC, 0xBABEB9BB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB7BBBFBA, 0xBFBAB8BC, 0xBDC1BCBB,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDB8BFBC,
+ 0xC0BDB9C0, 0xB9C0BDB9, 0xB1BAC0BF, 0xABAAACB2,
+ 0xBAC0BFA5, 0xBFBABFC0, 0xBCBBBAC0, 0xB6BCBBB6,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBEBA, 0xBDBAC0BF,
+ 0xBBB9B9C0, 0xB6BBB9B6, 0xBEBBC1C0, 0xBFBEB9BF,
+ 0xBABFBDB9, 0xBBBABFBD, 0xBFBDBAC0, 0xBABFBDBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xB9C0BDBA, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBFBAC0BF, 0xC1BEBAC0,
+ 0xBAC1BEBA, 0xBDB7BFBE, 0xBEBDB6BE, 0xB9BFBEB6,
+ 0xBFB8BDBE, 0xBFBEB9BE, 0xB9BFBEB9, 0xBCB7BDBC,
+ 0xC0BFB7BD, 0xBAC0BFBA, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8BFC2B8, 0xCFB7C0C3, 0xBFC2C1CD, 0xB7C0C3B6,
+ 0xC2B8BFC2, 0xB8B8BABF, 0xB0B8B8B0, 0xC0B6BEBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFBABFC0, 0xBFC0B9BE,
+ 0xB8BDBEBA, 0xBDB7BCBD, 0xBDBCB7BC, 0xB4B9B8B8,
+ 0xBEB7BDBC, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEBAC0BF,
+ 0xBDBCB9BF, 0xB5BBBAB7, 0xBBB6BCBB, 0xBFBCB7BE,
+ 0xB9C0BDB8, 0xBDBAC1BE, 0xC0BDB9C0, 0xB9C0BDB9,
+ 0xBEB7BFBE, 0xC0BDB7BF, 0xB7BFBEB7, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB9BFBE, 0xBEBCB7BD,
+ 0xB6BBB9B9, 0xBDB8BABA, 0xBDBBB9BE, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBDB8BDBB,
+ 0xC0BDBABF, 0xBABFBDB9, 0xBAB9BFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF585E5D, 0xC0C0B8C0,
+ 0xB9C1C0B8, 0xBBB7BDBC, 0xBDBCB7BE, 0xB7BDBCB7,
+ 0xBFB9BFBE, 0xBFBEBAC0, 0xB9BFBEB9, 0xC0B7BFBF,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xBFB6C0C0, 0xBEBEB7BF,
+ 0xBABFC0B6, 0xC0B9C1C1, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0B9C1C0, 0xC1C0B9C1, 0xBBC1C0BB, 0xC0B9C1C0,
+ 0xC1C1B9C1, 0xB9C1C1B9, 0xC2BDC2C3, 0xC1C2BCC1,
+ 0xBCC1C2BC, 0xC2BCC1C2, 0xC2C2BCC1, 0xB8C0C0BA,
+ 0xC2BCC1C2, 0xBFC0BCC1, 0xBCC1C2BA, 0xC0B8C0C0,
+ 0xC1C1B8C0, 0xB8C0C0B9, 0xBFB9C1C1, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC0B9C1C0, 0xC1C0B9C1, 0xBCC2C1BB,
+ 0xBFBBC1C0, 0xC0C0BAC0, 0xB8C0C0B8, 0xBFB8C0BF,
+ 0xBEBDB8C0, 0xB6BFBCB6, 0xBDB6BEBD, 0xC1C0B6BE,
+ 0xBAC0BFBB, 0xBCB9BFBE, 0xBDBBB7BD, 0xBABFBDB8,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBDBAC1BE,
+ 0xBFBDB9C0, 0xB8BDBCBA, 0xBDB7BDBC, 0xBCBDB7BC,
+ 0xB7BDBCB7, 0xBAB6BDBA, 0xB9B7B6BD, 0xAEB3B1B4,
+ 0xB8B6BBB9, 0xBDB8B5BA, 0xB7BBB6B9, 0xB9B5BAB8,
+ 0xBAB8B6BB, 0xB5BAB8B5, 0xB4B5BCB9, 0xB9B6B0B7,
+ 0xAAB3B0B0, 0xB4A9B2AF, 0xB8B5AEB7, 0xB0B7B2B1,
+ 0xB2B1B8B3, 0xB6B4B0B7, 0xB1B6B4B1, 0xB0AEB5B0,
+ 0xB5B0AEB5, 0xAFB6B1AE, 0xB0B5BCB7, 0xA7A2ACB6,
+ 0xA0A8A1A0, 0x9FA0A8A1, 0xA89EA0A9, 0x9FA79CA0,
+ 0x9C9EA69B, 0xA79C9FA7, 0xA1A79C9F, 0x9AA1A89B,
+ 0xA89BA2A9, 0xA0A99CA1, 0x9EA0A89D, 0xA89DA0A8,
+ 0x9FA79CA0, 0x9C9FA79C, 0xA59B9FA7, 0x9FA79D9D,
+ 0x979EA69B, 0xA3989AA2, 0xA0A69B9D, 0x99A0A499,
+ 0xA499A0A4, 0x7C8075A0, 0x686D7067, 0x29236E71,
+ 0x282A2427, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x2F202321, 0x332F3034,
+ 0x30342F32, 0x37383C37, 0x3C37363C, 0x585C5738,
+ 0xB5B6BDB6, 0xBDB6B5BC, 0xB5BCB5B5, 0xB7B8BCB7,
+ 0xBDB8B8BC, 0xB8BCB7B9, 0xB9B8BBB9, 0xBCBAB8BB,
+ 0xB8BBB9B9, 0xB5B4BAB5, 0xBBB9B4BA, 0xBBBEBCB8,
+ 0xBCB8BDBB, 0xBEBFB9BE, 0xB9BFBEBA, 0xBBB6BDBA,
+ 0xC0BDB9C0, 0xB5BAB8B9, 0xBBB0B3B1, 0xBCBDBABD,
+ 0xBBBDBDBA, 0xB6B5BAB8, 0xBDBBB5BB, 0xBCC1BFB8,
+ 0xBDBABFBD, 0xBFBDBCBF, 0xB8BDBBBC, 0xBFB8BDBB,
+ 0xBAB8BCC1, 0xBABDBBB5, 0xBBBBC0BE, 0xC1BFBAC0,
+ 0xB9BFBABC, 0xB7B9BEBC, 0xBCB7B6BC, 0xB8BCB7B8,
+ 0xBBB7BCBA, 0xBDBBB8BD, 0xBABFBDB8, 0xBAB7BCBA,
+ 0xBAB8B7BC, 0xB6BBB9B7, 0xB9B8BEB9, 0xBEB9B8BE,
+ 0xB8BEB9B8, 0xB9B9BCBA, 0xBCBAB6BB, 0xB8BDBBB7,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xB8B8BEB9,
+ 0xBDBBB7BD, 0xBABFBDB8, 0xB9BABDBB, 0xBCB7BABB,
+ 0xB8BCB7B8, 0xB6B6BCB7, 0xBCB7B5BB, 0xB8BCB7B8,
+ 0xB7B9BAB6, 0xBBB6BABB, 0xB6BCB7B7, 0xB1B5BCB9,
+ 0xB9B6ABB4, 0xB2B7B5B2, 0xB1B6BCB7, 0xB8B1B1B8,
+ 0xB1B8B1B1, 0xB1B0B8B1, 0xB8B1B0B8, 0xB7BEB7B1,
+ 0x36848882, 0x3C36383C, 0x383C3738, 0x2F363937,
+ 0x2F2F2D2F, 0x2A2A2A2D, 0x00050302, 0x03000704,
+ 0x52504806, 0x5B636258, 0x70606969, 0x726F6070,
+ 0x5D707060, 0x685A6D6D, 0x6864596B, 0x4D625F57,
+ 0x4C435755, 0x4041384B, 0x0F383832, 0x01001213,
+ 0x00000000, 0x00000100, 0x00000001, 0x05060400,
+ 0x322E2B27, 0x453D3D3A, 0x58534A48, 0x5C5F5D52,
+ 0x6C616967, 0x6E6C6170, 0x61706F61, 0x6A5E6F6F,
+ 0x5F5E546A, 0x505A594F, 0x3A365859, 0x0200003B,
+ 0x00000000, 0x00000000, 0x00010000, 0x813E443F,
+ 0x88818088, 0x81888181, 0x85878C83, 0x91868C90,
+ 0x9094898D, 0x8F95998E, 0x9C91949A, 0x969A8F98,
+ 0x92989C91, 0x9F909A9E, 0x979E8F98, 0x969B9F93,
+ 0xA1959EA2, 0x9DA1959D, 0x949DA495, 0xA3949CA3,
+ 0x9EA5969C, 0x94A1A697, 0xA6979EA3, 0xA2A798A1,
+ 0x98A0A798, 0xA7989EA8, 0xA0A798A0, 0x9DA5A99D,
+ 0xA99DA5A9, 0xA2A99CA5, 0xA2A5ADA2, 0xADA2A5AD,
+ 0xA4ACA1A5, 0xA3A9B0A3, 0xB1A5A9B0, 0xAAB1A4AD,
+ 0xBEB0B3AA, 0xC3BFC0C4, 0xBABEB9C2, 0xB6B6BDB6,
+ 0xBCB7B6BD, 0xB7BDB8B6, 0xBBBBBFBA, 0xBFBABCC0,
+ 0xB9BFBAB9, 0xB8BABEB9, 0xC0BEB9BD, 0xBCBFBDBD,
+ 0xBEBABFBE, 0xBFBDBABF, 0xBABFBDBA, 0xBDB9C0BD,
+ 0xC0BDB9C0, 0xB9C0BDB9, 0xB9B9C0BD, 0xBBB9B5BC,
+ 0xBABFBDB6, 0xBEBABFBE, 0xBFBEBABF, 0xBCC1C0BA,
+ 0xBEBABFBE, 0xBFBEBABF, 0xB9BFBEB9, 0xBBBABFBD,
+ 0xBCB9B8BD, 0xBAC1BEB5, 0xBFBAC0BF, 0xBFBDBAC0,
+ 0xBABFBDBA, 0xBEBABFBD, 0xC0BBBBC0, 0xB9C0BDB9,
+ 0xBEB9C0BD, 0xBFBEB9BF, 0xB9BFBEB9, 0xBFB9BFBE,
+ 0xBFBEB8C0, 0xBAC0BFB9, 0xBEBAC0BF, 0xC0BDB9BF,
+ 0xB7BEBBB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9C0BDB9,
+ 0xBFB9BFBE, 0xC0BFBAC0, 0xB9BFBEBA, 0xBDB9BFBE,
+ 0xBFBEB8BE, 0xB9BFBEB9, 0xBFB7BFBE, 0xBFBEB8C0,
+ 0xB7BFBFB9, 0xC8C0C8C8, 0xB3B3BEC8, 0x9FA6A9AB,
+ 0xC3B1B8BB, 0xBDBDB9C0, 0xB1B9B9B5, 0xBDB4BCBC,
+ 0xBCBDB5BD, 0xB7BCBDB7, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B7BCBD, 0xBDBCBABF, 0xB7BCBBB8,
+ 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xB9BFBEBA, 0xBAB9BFBE, 0xBBBAB5BB,
+ 0xB8BDBCB6, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBCB8BEBD, 0xBDBCB7BD, 0xB5BDBCB5, 0xBEBAC0BF,
+ 0xC0BFBABF, 0xB7BEBBBA, 0xBCB7BFBE, 0xBDBCB7BD,
+ 0xB9BEBDB8, 0xBEB8BCBD, 0xBDBEB9BD, 0xB8BEBDB9,
+ 0xBBB8BDBC, 0xBEBBB8BD, 0xB6BDBAB7, 0xBDB9BEBC,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDB9BEBC, 0xC0BBBABF,
+ 0xBCC0BBBC, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585E5D, 0xC0C0B9C1,
+ 0xB8C0BFB8, 0xBAB7BDBC, 0xBDBCB6BD, 0xB7BDBCB7,
+ 0xBFB9BFBE, 0xBEBDBAC0, 0xB9BFBEB8, 0xBFB6BEBE,
+ 0xC0BFB7BF, 0xB7BFBEB8, 0xC0B8C0C0, 0xBEBFB8C0,
+ 0xBABFC0B9, 0xC0B8C0C0, 0xBEBFB8C0, 0xB9BEBFB9,
+ 0xC0B8C0BF, 0xC1C0B9C1, 0xBBC1C0BB, 0xBFB9C1C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC2BCC1C2, 0xC2C3BCC1,
+ 0xBCC1C2BD, 0xC1BCC1C2, 0xC0C0BBC0, 0xB7BFBFB8,
+ 0xC2BDC1C2, 0xC1C2BDC1, 0xBABFC0BC, 0xC1B8C0C0,
+ 0xC2C2B9C1, 0xB8C0C0BA, 0xC0B8C0C0, 0xC1C1B8C0,
+ 0xB8C0C0B9, 0xC0B9C1C0, 0xC1C0B9C1, 0xBCC2C1BB,
+ 0xC0BBC1C0, 0xC0C0BBC1, 0xB8C0C0B8, 0xBFB8C0C0,
+ 0xBDBCB8C0, 0xB8C0BFB5, 0xBFB8C0BF, 0xC0BFB8C0,
+ 0xB8BEBDBA, 0xBEBAC0BF, 0xBCBAB9BF, 0xB6BBB9B7,
+ 0xBFB7BDBC, 0xBDBCBAC0, 0xB7BDBCB7, 0xBBB7BEBB,
+ 0xBFBDB7BE, 0xBABFBEBA, 0xBEB7BDBC, 0xBCBDB8BD,
+ 0xB7BDBCB7, 0xB6B6BDBA, 0xBCB9B2B9, 0xB3B8B6B5,
+ 0xB7B5BAB8, 0xBBB6B6BC, 0xB6BCB7B5, 0xBAB4B9B7,
+ 0xB8B6B7BC, 0xB4B9B7B3, 0xB2B5BCB9, 0xB9B6B0B7,
+ 0xADB6B3B2, 0xB6AEB7B4, 0xB8B5B0B9, 0xB0B7B4B1,
+ 0xB4ADB4B1, 0xB6B4B0B7, 0xB4B9B7B1, 0xB0ACB3AE,
+ 0xB4AFAEB5, 0xB1B8B3AD, 0xB0B2BCB6, 0xA7A2ACB6,
+ 0xA0A8A1A0, 0x9FA0A8A1, 0xA99FA0A9, 0xA0A89DA1,
+ 0x979EA499, 0xA79C9DA4, 0xA1A79CA1, 0x9AA1A89B,
+ 0xA89BA0A7, 0xA1A79CA1, 0x9D9FA79C, 0xA79C9FA7,
+ 0xA1A79CA1, 0x9DA1A79C, 0xA79DA2A8, 0x9FA79D9F,
+ 0x989CA499, 0xA3989BA3, 0x9BA1969B, 0x97A1A599,
+ 0xA5999FA3, 0xA0A498A1, 0x89909489, 0x93899094,
+ 0x90938A92, 0x55838782, 0x5A58565A, 0x2A2D2B57,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x2F202321, 0x342F3034,
+ 0x30342F30, 0x37363C37, 0x3C37363C, 0x585C5738,
+ 0xB3B5BCB5, 0xBAB3B3BA, 0xB7BEB7B2, 0xB8B8BCB7,
+ 0xBCB7BBBC, 0xB8BCB7B8, 0xB8BABDBB, 0xB9B7B7BA,
+ 0xB7BAB8B6, 0xB8B7BDB8, 0xB9B7B7BD, 0xB9BCBAB6,
+ 0xBAB8BDBB, 0xC0BFB7BC, 0xB6BCBBBA, 0xBBB7BEBB,
+ 0xC0BDB9C0, 0xBABFBDB9, 0xC0BEC1BF, 0xBDBDC1C2,
+ 0xBBBBBBBF, 0xB6BABDBB, 0xBAB8B5BB, 0xB8BDBBB5,
+ 0xBBB9BCBA, 0xC0BEBABD, 0xB9BCBABD, 0xBEB9BEBC,
+ 0xBBB9BAC1, 0xBCBFBDB6, 0xBDBDC0BE, 0xC0BBBEC2,
+ 0xBDC1BCBC, 0xB7BAC0BB, 0xBEB9B6BC, 0xB8BCB7BA,
+ 0xBDBABFBD, 0xBEBCBABF, 0xB6BBB9B9, 0xB8B6BCB7,
+ 0xBBB9B7BD, 0xB8BBB9B8, 0xBABABEB9, 0xBBB6BBBF,
+ 0xB8BCB7B7, 0xBBB7BAB8, 0xC0BEB8BD, 0xB7BEBBBB,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB9BEBCB8, 0xB7B6BCB7,
+ 0xBCBAB6BC, 0xB6BBB9B7, 0xB7B8BBB9, 0xBDB8B8BC,
+ 0xB9BDB8B9, 0xB5B7BEB7, 0xBDB8B5BC, 0xB5B9B4B7,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB6BCB7B8, 0xB2A6AFAC,
+ 0xBAB9ABB3, 0xB1B8B5B2, 0xB0B6BDB6, 0xB8B1B0B7,
+ 0xB2BAB3B1, 0xB0B0B8B1, 0xB8B1AFB7, 0xB6BDB6B1,
+ 0x35848882, 0x3C36373B, 0x383C3738, 0x34313432,
+ 0x30313234, 0x2A2A2A2E, 0x00060403, 0x05000704,
+ 0x514F4708, 0x61646359, 0x6F61706F, 0x726F6072,
+ 0x5C707060, 0x6C5E6C6C, 0x6763586F, 0x4F636159,
+ 0x4C435555, 0x4041384B, 0x0F383832, 0x01001413,
+ 0x00000000, 0x00000100, 0x00000001, 0x05060400,
+ 0x322F2C28, 0x453E3D3A, 0x58534A4B, 0x5D656156,
+ 0x665D6C68, 0x6F6B606B, 0x61706F61, 0x695E706F,
+ 0x5F5E546B, 0x52585950, 0x3A365858, 0x0200003B,
+ 0x00000000, 0x00000000, 0x00010000, 0x813D433E,
+ 0x88818088, 0x818A8080, 0x85858D82, 0x93878A90,
+ 0x9195898F, 0x9192978E, 0x9C91959A, 0x989C9198,
+ 0x92969A8F, 0x9F92999D, 0x99A09398, 0x969DA195,
+ 0xA1959DA1, 0x9DA1959D, 0x969CA394, 0x9E8F9EA5,
+ 0x99A09197, 0x939EA394, 0xA5949EA4, 0xA1A7969F,
+ 0x99A0A798, 0xA7989FA9, 0x9FA697A0, 0x98A3A79B,
+ 0xAA9DA0A4, 0xA6ADA0A3, 0xA2A7ADA2, 0xADA2A5AD,
+ 0xA7ADA2A5, 0xA2ABAFA3, 0xB2A6AAAE, 0xAEB2A6AE,
+ 0xBCAEB4A9, 0xC4BEC0C5, 0xBABEB9C0, 0xB9B8BFB8,
+ 0xBEB9B8C0, 0xB7BDB8B8, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB9BFBAB9, 0xB9B8BCB7, 0xBFBDBABE, 0xBBBEBCBC,
+ 0xBEBABFBE, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xC0BDB9C0, 0xB9C0BDB9, 0xBEB9C0BD, 0xBDBBBAC1,
+ 0xB8BDBBB8, 0xBEB9BEBC, 0xBFBEBBC0, 0xBABFBEBA,
+ 0xBEBBC0BF, 0xBFBEBABF, 0xB9C0BDB9, 0xB7B8BDBB,
+ 0xBDBAB6BC, 0xB9C0BDB6, 0xBEBAC0BF, 0xBFBDB9BF,
+ 0xBCBFBDBA, 0xBDBABFBD, 0xC0BBBABF, 0xB9C0BBB9,
+ 0xBEB7BDBC, 0xBEBFB9BF, 0xBAC0BFB9, 0xBFB7BFBE,
+ 0xC1C0B8C0, 0xB9BFBEBB, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBFBAC0BF, 0xBFBDBAC0, 0xBABFBDBA,
+ 0xBEB7BDBC, 0xC0BFB9BF, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xB8C0BFBA, 0xBFB7BFBF, 0xBFBEB8C0,
+ 0xB7BFBEB9, 0xBCC1C9C9, 0xA8A8B4BC, 0xA0A8A8A0,
+ 0xC2AEB5B8, 0xC0C0B8BF, 0xB8C0C0B8, 0xBCB6BEBE,
+ 0xBCBDB4BC, 0xB7BCBDB7, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B9BEBF, 0xBDBCBABF, 0xB6BCBBB8,
+ 0xC0BABFC0, 0xBFC0BABF, 0xB8C0C0BA, 0xC0B8C0C0,
+ 0xBEBFB8C0, 0xB9BEBFB9, 0xBEBAC0BF, 0xBFBEB9BF,
+ 0xBABFBEBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBCB6BCBB, 0xBDBCB7BD, 0xB7BDBCB5, 0xBEBABFBE,
+ 0xBFBEBABF, 0xB7BDBCB9, 0xBFB7BFBE, 0xBFBEB8C0,
+ 0xB7BCBBB9, 0xC0B3B7B8, 0xBDC0B8BD, 0xB8BDBEB8,
+ 0xBBB7BCBB, 0xBEBBB8BD, 0xB8BFBCB7, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD, 0xC0BBBABF,
+ 0xBCBFBDBC, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585D5E, 0xC0C0B8C0,
+ 0xB8C0BFB8, 0xBDB7BDBC, 0xBDBCB9C0, 0xB8BEBDB7,
+ 0xBFB7BDBC, 0xBFBEBAC0, 0xBAC0BFB9, 0xBFB7BFBF,
+ 0xBFBEB7BF, 0xB7BFBEB9, 0xC0B7BFBF, 0xC0BFB8C0,
+ 0xBAC0BFBA, 0xC0B8C0C0, 0xC0C0B8C0, 0xB7BFBFB8,
+ 0xC0B7BFBF, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C1B8C0,
+ 0xBBC0C1BB, 0xC2BCC1C2, 0xC0C0BCC1, 0xB8C0C0B8,
+ 0xC2BEC2C3, 0xC1C2BDC1, 0xBCC1C2BC, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC1C1B8C0,
+ 0xB8C0C0B9, 0xBFB8C0BF, 0xC1C0B8C0, 0xBBC1C0BB,
+ 0xC0B9C1C0, 0xC0C0B9C1, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBEBEB8C0, 0xB8C0C0B6, 0xBFBABFC0, 0xBEBFB9BE,
+ 0xBBC0C1B9, 0xBEB9BFBE, 0xC0BFB9BF, 0xBAC0BFBA,
+ 0xBAB6BDBA, 0xBDBCB6BD, 0xB8C0BFB5, 0xBEB8BEBD,
+ 0xBFBEB9BF, 0xBBC0BFBA, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB5BDBCB5, 0xBAB6BDBA, 0xBCBBB6BD, 0xB6BDBAB6,
+ 0xB7B6BCB7, 0xBCB7B6BC, 0xB5BAB8B6, 0xB8B5BAB8,
+ 0xB9B8B5BA, 0xB4B9B7B4, 0xB6B3B8B6, 0xB3B0B2B9,
+ 0xB3BAB7AC, 0xB5B0B7B2, 0xBBB8B3BA, 0xB3BAB7B4,
+ 0xB5B0B6B5, 0xB7B4B0B6, 0xB0B7B4B0, 0xB0B2B8B3,
+ 0xB6B3AFB5, 0xB0B7B4AF, 0xB0B6BDB8, 0xA8A1AEB5,
+ 0xA0A8A1A0, 0x9FA1A8A1, 0xA89DA1A9, 0xA1A79CA2,
+ 0x9CA2A89D, 0xA499A1A7, 0x9EA4999E, 0x9DA0A69B,
+ 0xA89DA2A8, 0xA1A79CA2, 0x9DA0A89D, 0xA79CA0A8,
+ 0xA1A79CA1, 0x9CA1A79C, 0xA79DA1A7, 0x9FA79C9F,
+ 0x98A0A79A, 0xA6999EA5, 0x9EA5989D, 0x989FA397,
+ 0xA499A2A4, 0x94988DA0, 0x898E9489, 0x94898E94,
+ 0x91958A90, 0x8281897F, 0x87828289, 0x2A2E2981,
+ 0x00000100, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00010000, 0x2F202321, 0x342F3034,
+ 0x30342F30, 0x37393D38, 0x3C3A383C, 0x575B563B,
+ 0xB5B5BCB5, 0xBBB6B5BC, 0xB4BAB5B5, 0xB8B8BCB7,
+ 0xBDB8B9BD, 0xB9BDB8B9, 0xB9B8BDBB, 0xBCB7B6BB,
+ 0xB9BDB8B8, 0xB8B7BDB8, 0xBBB9B7BD, 0xB8BBB9B8,
+ 0xBDB8BDBB, 0xBDBCBABF, 0xB8BDBCB8, 0xBCB9C0BD,
+ 0xC0BEB8BF, 0xBABFBDBB, 0xBBBEC1BF, 0xBBBBBCBD,
+ 0xB3B3B3BB, 0xB9BABDBB, 0xBBB6BABE, 0xB8BEB9B5,
+ 0xBBBABEB9, 0xBCBABCC0, 0xB8BBB9BB, 0xBABABFBD,
+ 0xBBBAB6BD, 0xBABFBDB5, 0xBCBBBEBC, 0xBEBABBBE,
+ 0xB8BCB7BD, 0xB9B6BBB9, 0xC0BEB6BB, 0xB8BDBBBB,
+ 0xB7B6BCB7, 0xBAB8B6BC, 0xB9C0BDB5, 0xB8B9C0BB,
+ 0xBBB9B6BD, 0xB7B8B6B8, 0xB8BDBEBA, 0xBCB7B9BD,
+ 0xB8BEB9B8, 0xBFBBC0BE, 0xBFBDBBC0, 0xBABFBDBA,
+ 0xBAB7BBB6, 0xBFBABBBF, 0xBABEB9BB, 0xB9B8BCB7,
+ 0xBFBABABE, 0xB6BCB7B9, 0xB9B6BCB7, 0xBEB9BABE,
+ 0xB8BCB7BA, 0xB6B2B8B3, 0xBCB5B4BB, 0xB2B9B2B4,
+ 0xB3B2B9B2, 0xB9B3B5B9, 0xB5BBB6B5, 0xB2ADB4B1,
+ 0xB4B3ABB3, 0xAEB7B4AC, 0xB3B4BCB5, 0xB8B1B5BD,
+ 0xB3BAB3B1, 0xB1AFB7B0, 0xB8B1B0B8, 0xB9C0B9B1,
+ 0x36848882, 0x3B363A3C, 0x383C3737, 0x33353634,
+ 0x30303333, 0x2A2A2A2E, 0x00040201, 0x04000704,
+ 0x53524807, 0x5B5E5C51, 0x685A6A69, 0x6B685A6B,
+ 0x5A6D6D5D, 0x685A6A6A, 0x6563586B, 0x4D626058,
+ 0x4B455556, 0x40403A4B, 0x0E3A3830, 0x01001414,
+ 0x00000000, 0x00000000, 0x00000000, 0x07050400,
+ 0x322E2B27, 0x453E3D3A, 0x58534A4B, 0x55605C51,
+ 0x665D6460, 0x716D626B, 0x61726F61, 0x695E706F,
+ 0x5F5E546B, 0x52585950, 0x3A365658, 0x0200003B,
+ 0x01000000, 0x00000101, 0x00010000, 0x7F3D443D,
+ 0x897F8189, 0x80897F80, 0x86848C81, 0x95888991,
+ 0x8D94878E, 0x8F93988F, 0x9C919398, 0x989C9198,
+ 0x8F979B90, 0xA093969A, 0x979E9199, 0x949DA195,
+ 0xA1959CA0, 0x9CA0949D, 0x949CA394, 0xA4959CA3,
+ 0x9AA1929D, 0x95A0A695, 0xA695A0A6, 0x9FA594A0,
+ 0x98A2A798, 0xA69AA0A7, 0xA0A498A2, 0x9BA0A498,
+ 0xA99DA3A7, 0xA3AA9DA5, 0xA3A7ADA2, 0xADA2A8AE,
+ 0xABB1A6A7, 0xA3ABAFA4, 0xAEA2ABAF, 0xABAFA3AA,
+ 0xBCAEB4A9, 0xC3BDBEC6, 0xBABEB8BF, 0xB8B8BFB8,
+ 0xBFBAB8BF, 0xBAC0BBB9, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB8BCB7BB, 0xBCB6BBB9, 0xC0BEB9BE, 0xBCBFBDBD,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBCBFBDBC, 0xBDBCBFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBBBAC1BE, 0xBEBBB7BE,
+ 0xBAC1BEB7, 0xBDBABFBD, 0xC0BEBABF, 0xBABFBEBB,
+ 0xBFB9BFBE, 0xBEBDBAC0, 0xB9BEBCB9, 0xB6B8BBB9,
+ 0xC0BDB5BB, 0xB9BFBEB9, 0xBEBAC0BF, 0xBFBDB9BF,
+ 0xBABFBDBA, 0xBDBCBFBD, 0xC0BBBABF, 0xB9C0BBB9,
+ 0xBEB8BEBD, 0xBFBEB9BF, 0xB9BFBEB9, 0xBDBAC0BF,
+ 0xBFBEB9C0, 0xB9BFBEBA, 0xC0BABFC0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB8C0C0, 0xBFBDBAC0, 0xBABFBDBA,
+ 0xBEB8BEBD, 0xBFC0B7BF, 0xBABFC0BA, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB6C0C0B8, 0xC0B6BFC2, 0xBFBFB6C0,
+ 0xB8C0C0B7, 0xBCB4BCBC, 0xB3B3B2BC, 0xABB3B3AB,
+ 0xC0B3BDBD, 0xC0C0B6C0, 0xB6C0C0B6, 0xBDB8C0C0,
+ 0xC0C0B5BD, 0xB8C0C0B8, 0xBFB8C0C0, 0xC0C0B7BF,
+ 0xB6C0C0B6, 0xC0B8C0C0, 0xBEBDB8C0, 0xB5BBBAB8,
+ 0xC0BABFC0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBFBFB8C0, 0xB7BFBFB7, 0xBFB8C0C0, 0xC0BFB7BF,
+ 0xBAC0BFBA, 0xBEB9BFBE, 0xBEBDB9BF, 0xB8BEBDB8,
+ 0xBFB7BDBC, 0xBFC0BAC0, 0xBAC0BFBA, 0xBFBABFBE,
+ 0xBFBEBBC0, 0xB7BDBCB9, 0xBDB5BDBC, 0xC0BFB7C0,
+ 0xB5BBBABA, 0xB8A3A8A9, 0xBDBEB2B7, 0xB8BDBEB8,
+ 0xBBB7BCBB, 0xBFBCB8BD, 0xB9C0BDB8, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBCBFBDBC, 0xC1BEC0C0, 0xC1BFBFC1, 0x888B89BE,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0595E5F, 0xC0C0B8C0,
+ 0xB8C0BFB8, 0xBDB8BEBD, 0xBDBCB9C0, 0xB8BEBDB7,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9, 0xBEB6BEBE,
+ 0xC0BFB6BE, 0xBAC0BFBA, 0xC0B8C0C0, 0xBFBEB8C0,
+ 0xBBC1C0B9, 0xC0B9C1C1, 0xC0C0B8C0, 0xB9C1C1B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xC2BCC1C2, 0xC0C0BCC1, 0xBABFC0B8,
+ 0xC2BCC1C2, 0xC1C2BCC1, 0xBDC2C3BC, 0xC1B9C1C1,
+ 0xC0C0B9C1, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB9C1C0, 0xC1C0B8C0, 0xBBC1C0BB,
+ 0xBFB9C1C0, 0xC0C0B8C0, 0xB9C1C1B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BABFC0, 0xBEBFBABF,
+ 0xB9BEBFB9, 0xBFB9BFBE, 0xBFBEBAC0, 0xB7BDBCB9,
+ 0xBCB7BDBC, 0xBCBBB7BD, 0xB5BDBCB4, 0xBEBAC0BF,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xBCB6BCBB, 0xBDBCB7BD,
+ 0xB5BDBCB5, 0xBAB6BDBA, 0xBCB9B6BD, 0xB7BEBBB5,
+ 0xB7B6BCB7, 0xBCB9B6BC, 0xB3BAB7B5, 0xB9B5BAB8,
+ 0xBAB9B6BB, 0xB5BAB8B5, 0xB7B3B8B6, 0xB8B5B4B9,
+ 0xB2B9B6B1, 0xB2B3B9B4, 0xB7B5B1B7, 0xB0B7B4B2,
+ 0xB2B1B7B6, 0xB5B2ADB3, 0xADB4B1AE, 0xAEAFB5B0,
+ 0xB1AEADB3, 0xAEB5B2AA, 0xB0B6BDB8, 0xA8A1AEB5,
+ 0xA0A8A1A0, 0x9DA1A99F, 0xA89BA2A8, 0xA1A89BA1,
+ 0x9CA1A79C, 0xA79CA1A7, 0x9FA59AA1, 0x999EA499,
+ 0xA79C9EA4, 0xA1A79CA1, 0x9C9FA79C, 0xA79C9FA7,
+ 0xA1A79CA1, 0x9CA2A89D, 0xA69BA1A7, 0x9FA79CA0,
+ 0x96A0A79A, 0xA5989CA6, 0x9BA4979C, 0x99A0A498,
+ 0xA499A1A5, 0x92988DA0, 0x898E9489, 0x94898E94,
+ 0x8E948990, 0x7F81897F, 0x87818189, 0x2A2E2983,
+ 0x00000100, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00010000, 0x2F1F2220, 0x332E3034,
+ 0x30342F2F, 0x38373B36, 0x3A38393D, 0x5A5B5939,
+ 0xB6B8BCB7, 0xBCB7B6BD, 0xB6BCB7B6, 0xB7B8BCB7,
+ 0xBFBAB8BC, 0xB9BDB8BB, 0xB8B6BCB7, 0xBDB8B7BD,
+ 0xB9BDB8B9, 0xB7B7BDB8, 0xBCBAB6BC, 0xB7BAB8B7,
+ 0xBAB8BDBB, 0xBDBCB7BC, 0xB9BEBDB8, 0xBDB7BCBA,
+ 0xBFBDBABF, 0xB9BCBABA, 0xBBBBBEBC, 0xBDBBBABD,
+ 0xB5B8B6BC, 0xB9BABEB9, 0xBBB6BABE, 0xB5BBB6B5,
+ 0xB6B6BDB6, 0xBBB7B8BC, 0xBBBEBCBA, 0xBBB9BEBC,
+ 0xBBBAB7BE, 0xB8BDBBB6, 0xB9BCBFBD, 0xBBB7B8BB,
+ 0xBABBB7BA, 0xBEBBBEBC, 0xBFBDBBC0, 0xB8BDBBBA,
+ 0xB9B5BBB6, 0xBCB7B8BE, 0xB8BFBAB6, 0xB7B7BFB8,
+ 0xBCBAB6BE, 0xB9BAB8B9, 0xB2B5B6B2, 0xBBB6B3B7,
+ 0xB5BBB6B7, 0xB8B6BBB9, 0xBBB9B5BA, 0xB6BBB9B6,
+ 0xB4B4B8B3, 0xBBB6B6BA, 0xB7BBB6B7, 0xB8B8BCB7,
+ 0xBBB6B9BD, 0xB6BCB7B7, 0xB6B6BDB6, 0xBFBAB6BD,
+ 0xB5BBB6BB, 0xB3B3B9B4, 0xBAB3B3BA, 0xB3BAB3B3,
+ 0xB5B5BCB5, 0xBBB4B5BC, 0xB2B9B2B4, 0xB4B5BCB7,
+ 0xB3B2AEB7, 0xABB4B1AB, 0xB0B0B7B0, 0xB8AFB4B9,
+ 0xB6BBB2B3, 0xAEB4BCB2, 0xB9AFB0B8, 0xBCC1B8B1,
+ 0x37878983, 0x3C373B3D, 0x383C3738, 0x34383937,
+ 0x302E3536, 0x2A2B292D, 0x02050302, 0x04000703,
+ 0x514F4707, 0x565E5C51, 0x695A6564, 0x6C695A6C,
+ 0x59696959, 0x64566969, 0x66645965, 0x4D626157,
+ 0x4B455556, 0x40403A4B, 0x0E3A3830, 0x01001414,
+ 0x00000000, 0x00000000, 0x00000000, 0x07050400,
+ 0x322F2C28, 0x463E3D3A, 0x58534A49, 0x57605C51,
+ 0x675C6662, 0x6E6C6169, 0x61726F61, 0x695E726F,
+ 0x5F5E546B, 0x50595A50, 0x3A365659, 0x0200003B,
+ 0x00000000, 0x00000000, 0x00010000, 0x7F40443E,
+ 0x897F8388, 0x81897F81, 0x84878D82, 0x9084898F,
+ 0x9094898C, 0x9092988D, 0x9C91959B, 0x989C9198,
+ 0x90999D92, 0x9B8E989C, 0x989F9294, 0x939DA195,
+ 0xA1959B9F, 0x9DA1959D, 0x949CA394, 0x9E8F9CA3,
+ 0x9CA39497, 0x95A1A697, 0xA695A0A6, 0xA2A897A0,
+ 0x98A2A798, 0xA599A2A7, 0xA0A498A1, 0x9BA2A69A,
+ 0xA99DA3A7, 0xA5A99DA5, 0x9DA4AB9E, 0xABA0A3AA,
+ 0xA7ADA2A5, 0xA5AAAEA3, 0xB0A4ACB0, 0xABAFA4AC,
+ 0xBCAEB3AA, 0xC5BFBEC6, 0xBABEB8C1, 0xB8BABEB8,
+ 0xBEB9B8BF, 0xB8BEB9B8, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB8BCB7BB, 0xBDBABFBD, 0xBFBDBABF, 0xBCBFBDBC,
+ 0xBDBCBFBD, 0xBFBDBCBF, 0xBCBFBDBC, 0xBDBCBFBD,
+ 0xBFBDBCBF, 0xBABFBDBA, 0xBBB9C0BD, 0xBEBBB7BE,
+ 0xBAC1BEB7, 0xBDBBC0BE, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBEB9BFBE, 0xBEBDB9BF, 0xB6BBB9B9, 0xBBB8BBB9,
+ 0xBFBEBAC0, 0xB9BFBEBA, 0xBEBAC0BF, 0xBFBDB9BF,
+ 0xBABFBDBA, 0xBDBCBFBD, 0xC0BBBABF, 0xBAC1BEBA,
+ 0xBCB9C0BD, 0xBEBDB7BD, 0xB7BDBCB8, 0xBDB9C0BD,
+ 0xBEBDB9C0, 0xBAC0BFB9, 0xC1B8C0C0, 0xC0C0B9C1,
+ 0xB8C0C0B8, 0xC0B7BFBF, 0xBFBEBABF, 0xBABFBEBA,
+ 0xBEB9BFBE, 0xBFC0B9BF, 0xB9BEBFBA, 0xC0BABFC0,
+ 0xC0C0B8C0, 0xB6C0C0B8, 0xC0B8BFC2, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB5BDBD, 0xBCBCB4BE, 0xB5BDBDB4,
+ 0xC0B8C0C0, 0xC0C0B6C0, 0xB7C1C1B6, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB6C0C0B6, 0xC0B8C0C0, 0xBFBEB8C0, 0xB5BDBCB9,
+ 0xC0B9C1C1, 0xC0C0B8C0, 0xB6C0C0B6, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0, 0xBFBEB7BF,
+ 0xBAC0BFB9, 0xBEBAC0BF, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBCB7BDBC, 0xBBBCB7BD, 0xB6BCBBB6, 0xBBB6BBBA,
+ 0xBEBDB7BC, 0xB9BFBEB8, 0xBEB5BDBC, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xB8B0B8B8, 0xBDBEB0B8, 0xB8BEBDB8,
+ 0xBDB7BCBA, 0xC0BDBABF, 0xB9C0BDB9, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBCBFBDBC, 0xC0BEC0C0, 0xC0C0BEC0, 0x888B89BE,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585D5E, 0xC0C0B8C0,
+ 0xB8C0BFB8, 0xBBBAC0BF, 0xC0BFB7BE, 0xB9BFBEBA,
+ 0xBEBAC0BF, 0xBFBEB9BF, 0xB9BFBEBA, 0xBFB8C0BF,
+ 0xBEBDB8C0, 0xB9BFBEB8, 0xBFB9BFBE, 0xBFBEBAC0,
+ 0xB9BFBEB9, 0xBFB9BEBF, 0xC0C0B9BE, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBEBFB8C0, 0xBABFC0B9,
+ 0xC0BBC0C1, 0xC0C1BABF, 0xB9C1C1BB, 0xBFB9C1C1,
+ 0xC0C0B7BF, 0xB7BFBFB8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B9C1C1, 0xC0C1B8C0, 0xBBC0C1BB,
+ 0xBFB8C0BF, 0xC1C1B8C0, 0xB9C1C1B9, 0xBEBABFC0,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBFB9BEBF, 0xBEBFB9BE,
+ 0xB9BEBFB9, 0xBCB5BDBC, 0xBEBBB5BD, 0xB5BDBCB5,
+ 0xBEB7BDBC, 0xBFBEB9BF, 0xB7BDBCB9, 0xBAB7BCBA,
+ 0xC0BEB7BC, 0xBABFBEBB, 0xBDB7BDBC, 0xBDBDB5BD,
+ 0xB5BDBCB5, 0xB8B8BFBC, 0xBBB9B5BA, 0xB9BCBAB8,
+ 0xBBB7BCBA, 0xBCBBB7BE, 0xB6BBB9B7, 0xB7B7BAB8,
+ 0xB9B7B8BC, 0xB5BAB8B4, 0xB4B3B8B6, 0xB9B4B3B9,
+ 0xB2B9B4B2, 0xB6B3B8B6, 0xB9B4B3B8, 0xB4B9B7B3,
+ 0xB0B0B7B4, 0xB4B1ACB3, 0xB0B7B2AD, 0xAFAEB4AF,
+ 0xB4B1AEB4, 0xB0B7B4AD, 0xB0B5BBB6, 0xA9A2AFB5,
+ 0xA1A99FA1, 0x9BA1A79C, 0xA79BA3A7, 0xA3AA9DA3,
+ 0x9BA1A79C, 0xA59A9DA5, 0x9EA4999F, 0x98A0A498,
+ 0xA69BA0A4, 0xA2A89DA2, 0x9B9FA79C, 0xA89B9EA6,
+ 0xA0A79AA1, 0x98A2A69A, 0xA899A0A7, 0xA0A798A1,
+ 0x989EA79A, 0xA4999CA5, 0x9BA3989C, 0x959CA499,
+ 0x9D9398A0, 0x91998F95, 0x8991998F, 0x8C818C94,
+ 0x888C8186, 0x787C8178, 0x817B7E81, 0x21201C81,
+ 0x00000100, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00010000, 0x2F242523, 0x34303233,
+ 0x33343033, 0x37383937, 0x38383839, 0x5F605E38,
+ 0xB8BABBB7, 0xBCB7B9BD, 0xB8BCB7B8, 0xB8B6BCB7,
+ 0xBEB7B7BD, 0xB6BDB6B7, 0xB8B6BDB6, 0xBCB7B7BD,
+ 0xB8BCB7B8, 0xB8B7BDB8, 0xBDBBB7BD, 0xB3B8B6B8,
+ 0xBBB8BBB9, 0xBCBABABD, 0xB8BBB9B9, 0xBBBABDBB,
+ 0xB9B4BABD, 0xB0B4AFB5, 0xA7A7ABA6, 0xB3AEA6AC,
+ 0xB3B9B4AF, 0xB5B6BCB7, 0xBBB6B4BA, 0xB6BCB7B7,
+ 0xB5B1B8B1, 0xBEB9B5BC, 0xBCBDB9BA, 0xB8B9BDB8,
+ 0xBAB8B7BD, 0xB7BAB8B7, 0xB7B7BAB8, 0xBCBAB8BC,
+ 0xBCBDBBBB, 0xB9BCBDB9, 0xBEB9BABE, 0xBABEB9BA,
+ 0xB8B8BBB9, 0xBDB8B9BD, 0xB6BCB7B9, 0xB5B4BCB5,
+ 0xBDBBB4BC, 0xB6B9B7BA, 0xB8B6BAB5, 0xBBB9B9BD,
+ 0xB7BBB6B8, 0xB9BABEB9, 0xBDBBBABE, 0xBABDBBBA,
+ 0xB7B6BCB7, 0xB5B3B6BC, 0xA3A8A6B0, 0xB5B1B7B2,
+ 0xBBB6B4BA, 0xB7BBB6B7, 0xB5B8BCB6, 0xBAB3B7BB,
+ 0xB6BDB6B3, 0xB4B8BCB6, 0xBBB2B8BD, 0xB5BDB3B6,
+ 0xB6B6BDB6, 0xB7B2B6BD, 0xAFB7B0B1, 0xB3B3BAB3,
+ 0xB9B4B2BA, 0xB3B9B4B2, 0xB2B5B9B3, 0xB7AEB8BB,
+ 0xB3B7ACB4, 0xB1B8BCB1, 0xBCB1B8BC, 0xB8BCB1B8,
+ 0x377A7C76, 0x3C373A3B, 0x383C3738, 0x2F32332F,
+ 0x302B3233, 0x2A2B292C, 0x07080507, 0x06050A05,
+ 0x4F4C440B, 0x535F5B50, 0x6B596562, 0x6D6C586F,
+ 0x59696957, 0x67596969, 0x64645668, 0x4A5F5F53,
+ 0x48405554, 0x3F3C374A, 0x0F383832, 0x00001413,
+ 0x00000100, 0x00000000, 0x00000000, 0x07050402,
+ 0x2A27241F, 0x41393432, 0x53504843, 0x565E5C52,
+ 0x675B6361, 0x6C6C5E67, 0x61707060, 0x685D706F,
+ 0x5D5D516A, 0x515A5C50, 0x3C36585C, 0x0200003C,
+ 0x00000000, 0x00000000, 0x02000000, 0x80454741,
+ 0x88828689, 0x86898086, 0x85898D82, 0x948A8C90,
+ 0x93948A93, 0x9092968B, 0x9C90989C, 0x989C9098,
+ 0x909A9E92, 0x9B8E989C, 0x979E9194, 0x909BA091,
+ 0xA0919C9F, 0x9BA0919D, 0x929AA192, 0xA2959AA1,
+ 0x9BA2939B, 0x969EA394, 0xA596A0A5, 0x9EA5969E,
+ 0x96A1A697, 0xA596A0A5, 0xA0A7989E, 0x9AA5AA9B,
+ 0xA99AA4A9, 0xA2A99AA2, 0x9CA7AC9D, 0xAA9DA6AB,
+ 0xA4AB9EA3, 0x9FA8ACA0, 0xACA1A7AB, 0xA8ACA1A8,
+ 0xBFB3B8AF, 0xC3BAC3C8, 0xB8BDB4C0, 0xB8BABEB8,
+ 0xBFB9BABE, 0xBABEB8BB, 0xB9BDBFB9, 0xBFB9BDBF,
+ 0xB9BDB8BD, 0xBDBBC0BE, 0xC0BBBABF, 0xBDC1BCBA,
+ 0xBCBBBEBC, 0xBFBABBBE, 0xBBBFBABB, 0xBBBAC0BB,
+ 0xBFBDBAC0, 0xBABFBDBA, 0xBCBABFBE, 0xBDBCB8BD,
+ 0xB9BEBDB8, 0xBDBBC0BE, 0xBFBABABF, 0xB9C0BBB8,
+ 0xBDB9C0BD, 0xBFBEB9C0, 0xB8BBB9BA, 0xBCB8BDBB,
+ 0xBFBEBBC1, 0xBBC0BFBA, 0xBEBAC1BE, 0xC1BEBAC1,
+ 0xBAC1BEBA, 0xBDBABFBD, 0xBEBCBABF, 0xBABFBDB9,
+ 0xB9BBC0BE, 0xBEBDB6BB, 0xBABFBEB9, 0xBEBAC1BE,
+ 0xC0BFBAC1, 0xBAC0BFBA, 0xBFB8C0BF, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xC0B8BFC2, 0xBFC0B8C0, 0xB9BFBEBA,
+ 0xBDB9BFBE, 0xBFBEBABF, 0xB9BFBEBA, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xB8C0BFBA, 0xBFBABFC0, 0xC0BFBAC0,
+ 0xB8C0BFBA, 0xC1B8C0C0, 0xC1C0B9C1, 0xB9C1C0BB,
+ 0xBFB8C0BF, 0xC0C0B8C0, 0xB6C0C0B6, 0xC0B7BFBF,
+ 0xBFBFB8C0, 0xB8C0C0B7, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB7BFBFB8,
+ 0xC0B9C1C1, 0xC0C0B6C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0, 0xBFBFB7BF,
+ 0xB8C0C0B7, 0xBFB7BFBF, 0xBEBFB7BF, 0xB9BFBEB9,
+ 0xBDB9BFBE, 0xBEBDB9C0, 0xB9BFBEB8, 0xBDB9BEBD,
+ 0xBDBCB9BE, 0xB7BDBCB7, 0xBDB5BDBC, 0xBBBBB5BD,
+ 0xB3BBBBB3, 0xBEB3BBBB, 0xC1C0B6BE, 0xB8BDBCBB,
+ 0xBDB9BEBC, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBFBBC0BF, 0xC0BFBBC0, 0x868B8ABB,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585D5E, 0xC0C0B8C0,
+ 0xB8C0BFB8, 0xBBB9BFBE, 0xBFBEB7BE, 0xB9BFBEB9,
+ 0xBCB9BFBE, 0xBFBEB7BD, 0xBAC0BFBA, 0xBFB9BFBE,
+ 0xC0BFB8C0, 0xB9BFBEBA, 0xBFB9BFBE, 0xC0BFBAC0,
+ 0xB9BFBEBA, 0xC0B9BEBF, 0xC0C0BABF, 0xB7BFBFB8,
+ 0xC0B7BFBF, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBEBFB8C0, 0xBABFC0B9,
+ 0xC0BBC0C1, 0xC1C1BABF, 0xB8C0C0B9, 0xC0B9C1C1,
+ 0xBFBFB8C0, 0xB8C0C0B7, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xC0B8C0C0, 0xC0C1B8C0, 0xBABFC0BB,
+ 0xC0B8C0BF, 0xC1C1B9C1, 0xB9C1C1B9, 0xBEBBC1C0,
+ 0xBEBDB9BF, 0xB9BFBEB8, 0xBFBAC0BF, 0xBFC0B9BE,
+ 0xBABFC0BA, 0xBBB5BDBC, 0xBEBBB4BC, 0xB7BDBCB5,
+ 0xBFB9BFBE, 0xBFBEB9BE, 0xB9BFBEB9, 0xBBBABFBE,
+ 0xBBB9B8BD, 0xB7BDBCB6, 0xBBB3BBBB, 0xBBBBB3BB,
+ 0xB3BBBAB3, 0xBAB7BEBB, 0xBBB6B7BC, 0xB8BBB9B7,
+ 0xBAB6BBBA, 0xBCBBB5BB, 0xB6BBBAB7, 0xB8B6BBB9,
+ 0xBAB8B5BA, 0xB5BAB8B5, 0xB7B6BCB7, 0xB8B3B6BC,
+ 0xB2B9B4B1, 0xB3B3B9B4, 0xB9B4B2B8, 0xB2B8B3B5,
+ 0xB4B2B9B6, 0xB4AFB0B7, 0xB0B7B2AD, 0xB4B2B8B3,
+ 0xB4B1B1B6, 0xB0B7B4AD, 0xB0B6BCB7, 0xA8A1AFB5,
+ 0xA1A99FA0, 0x9BA3A99E, 0xA79BA3A7, 0xA4AB9EA3,
+ 0x9C9FA79D, 0xA89E9EA6, 0x9FA59AA0, 0x9BA0A498,
+ 0xA499A3A7, 0xA1A79CA0, 0x9BA1A79C, 0xA89B9FA8,
+ 0x9EA598A1, 0x969FA495, 0xA798A0A5, 0xA0A798A0,
+ 0x959CA598, 0xA29699A2, 0x98A29698, 0x9299A196,
+ 0x9D93959D, 0x949D9394, 0x8C90998F, 0x90858E96,
+ 0x8D91868A, 0x787F8279, 0x807A7E81, 0x22211D80,
+ 0x00000100, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00010000, 0x30232422, 0x34303334,
+ 0x32332F33, 0x37383937, 0x39393839, 0x5F605E39,
+ 0xB7BABBB7, 0xBCB7BABB, 0xB8BCB7B8, 0xB0B1B7B2,
+ 0xB8B1B0B7, 0xB3BAB3B1, 0xB0B3BAB3, 0xB9B4B0B7,
+ 0xB7BBB6B5, 0xB7B8BCB7, 0xBBB9B6BC, 0xB4B9B7B6,
+ 0xB7B6B9B7, 0xB9B7B6B9, 0xB6B9B7B6, 0xBBBCBDBB,
+ 0xB4B2BCBD, 0xB0B4AFB1, 0xB4B3BAB3, 0xB9B2B4BB,
+ 0xBAC1BAB2, 0xB9B8BEB9, 0xBEB9B8BE, 0xB8BEB9B8,
+ 0xB1B4BCB5, 0xBCB7B1B8, 0xBABEB9B8, 0xB6B9BDB8,
+ 0xBAB8B7BB, 0xB9BCBAB7, 0xB8B8BCB7, 0xBCBAB9BD,
+ 0xBBBCBABB, 0xB5BCBDB9, 0xBBB6B8B9, 0xB7BAB8B7,
+ 0xB9B8B9B7, 0xBDBBB8BB, 0xB6BCB7BA, 0xB5B5BCB5,
+ 0xBEB9B5BC, 0xBABDBBB8, 0xB8B8BCB7, 0xBBB9B9BD,
+ 0xB9BDB8B8, 0xB5B7BBB6, 0xBBB6B7BB, 0xB9BCBAB7,
+ 0xB7B6BCB7, 0xBAB8B6BC, 0xB5BAB8B5, 0xB9B9BFBA,
+ 0xBEB9B8BE, 0xBABEB8BA, 0xB6B9BDB7, 0xBDB6B8BC,
+ 0xB3BAB3B6, 0xB2B6BAB4, 0xBBB2B6BB, 0xB8BDB4B6,
+ 0xB4B5BCB5, 0xBBB6B4BB, 0xB3BBB4B4, 0xB3B9C0B9,
+ 0xB9B2B3BA, 0xB3BAB3B2, 0xB0B5B9B3, 0xBCB1B6B9,
+ 0xBABBB1B8, 0xB0BABCB0, 0xBBAFB8BC, 0xB8BCB1B7,
+ 0x377A7C76, 0x3C373A3B, 0x373B3638, 0x2E363832,
+ 0x302A3234, 0x2A2B272C, 0x09080507, 0x06050A04,
+ 0x4E4B430B, 0x525F5B50, 0x6B586664, 0x6F6C576F,
+ 0x556B6A56, 0x67596767, 0x63635567, 0x495F5F51,
+ 0x48405555, 0x3F3C374A, 0x0F383832, 0x00001413,
+ 0x00000100, 0x00000000, 0x00000000, 0x07050402,
+ 0x2B35322D, 0x3F3A3533, 0x52504842, 0x555E5C52,
+ 0x67596260, 0x6C6C5E67, 0x606F7060, 0x685D7070,
+ 0x5E5C516A, 0x515A5C50, 0x3C36585C, 0x0001003C,
+ 0x00000000, 0x00000000, 0x02000000, 0x80484842,
+ 0x88828889, 0x88898088, 0x858A8B81, 0x948A8E8F,
+ 0x94958B93, 0x8A95998D, 0x9B8F9296, 0x989C9097,
+ 0x92999D91, 0x9F929A9E, 0x949B8E98, 0x909C9F90,
+ 0x9F909DA0, 0x9A9F909C, 0x929A9F90, 0xA3949AA1,
+ 0x9AA1929C, 0x949A9F90, 0xA3969EA3, 0x9EA5989C,
+ 0x96A0A596, 0xA7989EA5, 0xA0A798A0, 0x9AA1A697,
+ 0xA99AA4A9, 0xA2A99AA2, 0x9AA4A99A, 0xAB9CA4A9,
+ 0xA3AA9BA4, 0xA1A8ACA0, 0xACA1A9AD, 0xADB3A8A8,
+ 0xC1B8BDB4, 0xC2B9C5CA, 0xB9BCB3BF, 0xB7BBBFB9,
+ 0xBEB8B9BD, 0xBABEB8BA, 0xB6BBBDB7, 0xBCB6BABC,
+ 0xBBBFB9BA, 0xBDBCBFBD, 0xC0BBBABF, 0xBCC0BBBA,
+ 0xBCBBBEBC, 0xBFBABDBE, 0xBBBFBABB, 0xBBBAC0BB,
+ 0xBFBDBAC0, 0xBABFBDBA, 0xBABABFBE, 0xBDBCB6BB,
+ 0xBABFBEB8, 0xBCBABFBD, 0xC0BDB9BE, 0xBAC1BEB9,
+ 0xBBBAC1BE, 0xBBBAB8BD, 0xB8BBB9B6, 0xBDB9BEBC,
+ 0xBFBEBABF, 0xB9BEBDBA, 0xBEBAC1BE, 0xC1BEBAC1,
+ 0xBAC1BEBA, 0xBCB9BEBC, 0xBDBBB9BE, 0xB8BDBBB8,
+ 0xBCBABFBD, 0xBFBFB9BE, 0xBBC0BFBD, 0xBDBBC0BE,
+ 0xC0BFB9C0, 0xB9BFBEBA, 0xBFBAC0BF, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xC0B9C0C3, 0xC0C0B8C0, 0xB9BFBEB8,
+ 0xBFB9BFBE, 0xC0BFBAC0, 0xBAC0BFBB, 0xBEBAC0BF,
+ 0xC0BFBAC1, 0xBAC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xC0B9C1C1, 0xC0BFB8C0, 0xBAC0BFBA,
+ 0xBFB8C0BF, 0xC0C0B8C0, 0xB6C0C0B8, 0xC0B9C1C1,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB9C1C1B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B9C1C1, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB8C0C0, 0xBFC0B7BF, 0xBAC0BFBA,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBFBBC1C0,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBDB5BDBD, 0xBBBBB5BD,
+ 0xB3BBBBB3, 0xBCB3BBBB, 0xC2C1B6BB, 0xB8BDBCBD,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BFBB, 0xC0BABFC0, 0xC0BFBABF, 0x868B8ABB,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0595E5F, 0xC0C0B8C0,
+ 0xB8C0BFB8, 0xBDB7BDBC, 0xBDBCB9C0, 0xB7BDBCB7,
+ 0xBCB7BDBC, 0xC0BFB7BD, 0xBAC0BFBA, 0xBDBBC1C0,
+ 0xBFBEB8BE, 0xB9BFBEB9, 0xBDB9BFBE, 0xBFBEB8BE,
+ 0xBBC0BFBA, 0xBEBBC1C0, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xC0B7BFBF, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB6C0C0B6, 0xC0B8C0C0, 0xBEBFB8C0, 0xBABFC0B9,
+ 0xC0B8C0C0, 0xC0BFB8C0, 0xB8C0BFB8, 0xC0B7BFBE,
+ 0xC0C0B9C1, 0xB8C0C0B8, 0xC1B8C0C0, 0xC0C0B9C1,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC1C1B8C0, 0xB8C0C0B9,
+ 0xC0BBC1C0, 0xC0C1BBC1, 0xBABFC0BB, 0xBFB9C1C1,
+ 0xBFBEB8C0, 0xB7BFBEB7, 0xBEB8C0BF, 0xC0BFB7BF,
+ 0xB9C1C0B8, 0xBBBAC0BF, 0xBBBAB6BC, 0xB8BDBCB5,
+ 0xBEB8BDBC, 0xBDBEBABF, 0xB9BFBEB8, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB7BDBCB9, 0xBDB3BBBB, 0xBDBCB5BD,
+ 0xB5BDBCB5, 0xBCB7BEBB, 0xBDBBB9BE, 0xB8BDBBB8,
+ 0xBBB6BCBB, 0xBCBBB6BC, 0xB5BBBAB6, 0xB7B3B9B8,
+ 0xB9B7B4B9, 0xB4B9B7B4, 0xB4B3BAB5, 0xB6B1B2B9,
+ 0xB3B9B4B0, 0xB4B3B9B4, 0xB9B4B3B9, 0xB2B8B3B3,
+ 0xB3B0B7B4, 0xB4B1ADB6, 0xB0B7B4AD, 0xB4B1B6B4,
+ 0xB7B4B1B6, 0xB0B7B4B0, 0xB1B5BBB6, 0xA7A2B0B6,
+ 0xA0A7A0A0, 0x9CA6AA9F, 0xA79BA6A8, 0xA1A89BA3,
+ 0x9E9EA79D, 0xA79D9FA8, 0x9DA59B9F, 0x979EA499,
+ 0xA99C9DA4, 0x9EA598A2, 0x9B9EA598, 0xA89CA1A8,
+ 0xA0A596A4, 0x99A1A599, 0xA79AA1A5, 0x9EA79AA0,
+ 0x989FA89B, 0xA4999CA5, 0x9BA3989C, 0x959AA095,
+ 0x9D9398A0, 0x90989194, 0x868E968C, 0x90858890,
+ 0x878B808A, 0x7B7E8178, 0x7F7B7F81, 0x22211D80,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x30262423, 0x34303534,
+ 0x3D3C3835, 0x36373836, 0x4C4C3738, 0x7174724A,
+ 0xB78D8E8A, 0xBCB7BABB, 0xB8BCB7B8, 0xB4B7BBB5,
+ 0xBCB5B4BB, 0xB4BCB5B5, 0xB7B6BCB7, 0xBAB3B6BC,
+ 0xB3B7B2B3, 0xB9B6BAB5, 0xBBB9B8BB, 0xB7BAB8B8,
+ 0xB8B8BEB9, 0xBCBAB7BD, 0xB6BBB9B7, 0xBCBABCBC,
+ 0xB7B7BABC, 0xBABDBBB7, 0xB9B9BFBA, 0xC0B9B8C0,
+ 0xB8C0B9B8, 0xBAB8BEB9, 0xBBB6B9BF, 0xB4BBB6B5,
+ 0xB6B4BBB6, 0xBBB6B4BB, 0xB5BBB6B5, 0xB8B6BDBA,
+ 0xBDBBB5BA, 0xBBBCBABC, 0xB8B9BDB8, 0xBAB8B9BD,
+ 0xB9BAB8B9, 0xB9B7BBB6, 0xBDBBBABE, 0xBABCBCBA,
+ 0xB7B8BABA, 0xBCBAB6B9, 0xB6BCB7B9, 0xB9B5BCB5,
+ 0xBEB9B9C0, 0xB5BBB6B8, 0xB7B6BCB7, 0xBBB9B6BC,
+ 0xB8BCB7B8, 0xB5B6BCB7, 0xB7B2B5BC, 0xB5BBB6B1,
+ 0xB7B7BBB6, 0xBCB7B8BC, 0xB6BCB7B8, 0xB6B5BAB8,
+ 0xBBB6B5BB, 0xB7BBB5B7, 0xB6B6BDB6, 0xBCB7B6BD,
+ 0xB3B9B4B6, 0xB4B3B7B1, 0xB7B1B6BA, 0xB1B8B1B3,
+ 0xB2B1B8B1, 0xBCB5B2B9, 0xB6BDB6B5, 0xA5A8ACA6,
+ 0xBAB3A5AC, 0xB3BAB3B3, 0xADB5B9B3, 0xB4A9B1B6,
+ 0xB5B9AEAE, 0xAFB8BCB0, 0xBCB1B7BB, 0xA2A79EB8,
+ 0x4E787C77, 0x3C374D50, 0x393D3838, 0x2C363832,
+ 0x302A3235, 0x2A2B272C, 0x07080507, 0x06050A05,
+ 0x4D4A420B, 0x535F5B50, 0x6B586965, 0x6F6C576F,
+ 0x546D6C58, 0x66576666, 0x62645863, 0x495F5F51,
+ 0x48405654, 0x3F3C374B, 0x0E383930, 0x01001414,
+ 0x00000000, 0x00000001, 0x00000000, 0x07050402,
+ 0x2D35322D, 0x403B3532, 0x52504843, 0x5B5D5B51,
+ 0x675B6866, 0x6B6B5D67, 0x606F7060, 0x685D7070,
+ 0x5E5C526C, 0x515A5C50, 0x3C36585C, 0x0001003A,
+ 0x00000000, 0x00000000, 0x00010000, 0x80484842,
+ 0x88828889, 0x88898088, 0x86888C81, 0x8F858D91,
+ 0x93948A8E, 0x8B95998D, 0x9D91959A, 0x989C9099,
+ 0x92989C90, 0x9D92999D, 0x979E9197, 0x909A9D8E,
+ 0xA0909C9F, 0x9BA1909D, 0x949EA394, 0xA5959CA3,
+ 0x9AA4949B, 0x92979E8F, 0xA3949AA1, 0x9AA1929C,
+ 0x989EA596, 0xA798A0A7, 0x9EA898A0, 0x98A3AA9B,
+ 0xA99AA0A7, 0xA2A99AA2, 0x9CA4A99A, 0xAB9CA6AB,
+ 0xA2A99AA4, 0xA0A8ACA0, 0xB3A8A8AC, 0xB4BAAFAD,
+ 0xBAB8BDB4, 0xC3BABCC4, 0xB8BDB4BE, 0xB7B8BDB4,
+ 0xBDB7BBC0, 0xBABEB8B9, 0xB7BEC0BA, 0xBDB7BDBD,
+ 0xBCC0BABB, 0xBDBBBEBC, 0xC1BCBABF, 0xBDC1BCBD,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBBBAC0BB,
+ 0xBFBDBAC0, 0xBABFBDBA, 0xB9B8BDBB, 0xBFBDB6BB,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xB9BABFBD, 0xBBB9B6BB, 0xB9BEBCB6, 0xBDBABFBD,
+ 0xC0BFBABF, 0xBAC0BFBA, 0xBEBBC0BE, 0xC1BCBBC0,
+ 0xBBC1BCBB, 0xBDBAC1BE, 0xBEBDB9C0, 0xBABFBEB9,
+ 0xC1BABFBE, 0xC1C0BDC2, 0xBABFBEBC, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBAC1BEBB, 0xBFBAC0BF, 0xC0C0BAC0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0, 0xB8BEBDBA,
+ 0xC0B9BFBE, 0xBFC0B8C0, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xC1C0BAC0, 0xBAC0BFBB, 0xBFB9C1C0, 0xC1BEB8C0,
+ 0xBAC0BFBA, 0xC0B7BFBF, 0xC1C1B8C0, 0xB7BFBFB9,
+ 0xC0BAC0BF, 0xC0C0B9C1, 0xB9C1C1B8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xB9BEBFBA, 0xBFBBC1C0, 0xC1C0BAC0,
+ 0xBBC1C0BB, 0xC0B8C0C0, 0xBFC2B8C0, 0xB8C0C0B8,
+ 0xC0B9C1C0, 0xC1C0BBC1, 0xBAC0BFBB, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB8C0BF, 0xC0BFB8C0, 0xB8C0BFB8,
+ 0xC0B8C0BF, 0xBFC0B8C0, 0xBABFC0BA, 0xC0BABFC0,
+ 0xC0C0B8C0, 0xB9C1C1B8, 0xBCB8C0C0, 0xC0C0B4BC,
+ 0xB8C0C0B8, 0xBCB7BDBC, 0xBFBFB7BD, 0xBABCBCBD,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBCBFBDBA, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBAC0BFB9, 0xBEBBC0BE, 0xC0BFBBC0,
+ 0xBAC0BFBB, 0xC0B8C0C0, 0xC0BFB8C0, 0x868B8ABA,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585D5E, 0xC0C1BABF,
+ 0xBAC0BFBB, 0xBEB8BEBD, 0xBFBEBAC1, 0xB9BFBEB9,
+ 0xBEBAC0BF, 0xBFBEB9BF, 0xB9BFBEB9, 0xBAB9BFBE,
+ 0xC0BFB5BB, 0xBAC0BFBA, 0xBFB9BFBE, 0xC0BFBAC0,
+ 0xB9BEBDBB, 0xBEB9BFBE, 0xBFBEB9BF, 0xB7BDBCB9,
+ 0xC0B7BFBF, 0xC0C0B8C0, 0xB7BFBFB8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB6C0C0B6, 0xBFB8C0C0, 0xBFC0B7BF, 0xBBC0C1BA,
+ 0xC0B9C1C1, 0xC0BFB8C0, 0xB8C0BFB8, 0xBEBAC2C1,
+ 0xC0C0B7BF, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB9C1C1B8,
+ 0xBFBCC2C1, 0xC0C1BAC0, 0xBABFC0BB, 0xBFB7BFBF,
+ 0xC0BFB7BF, 0xB8C0BFB8, 0xBEB8C0BF, 0xC0BFB7BF,
+ 0xB7BFBEB8, 0xBBB7BDBC, 0xBDBCB6BC, 0xB8BDBCB8,
+ 0xBEBBC0BF, 0xBFC0B9BF, 0xBABFC0BA, 0xBEBBC1C0,
+ 0xBEBDB9BF, 0xBAC0BFB8, 0xBDB5BDBD, 0xBDBCB6BE,
+ 0xB7BDBCB5, 0xBBB8BFBC, 0xBDBBB7BE, 0xB8BDBBB8,
+ 0xBBB6BCBB, 0xBCBBB6BC, 0xB6BCBBB6, 0xB9B3B9B8,
+ 0xBAB8B4BA, 0xB6BBB9B5, 0xB2B3B9B4, 0xB8B3B1B7,
+ 0xB1B7B2B2, 0xB3B3BAB3, 0xBBB6B3BA, 0xB3B9B4B5,
+ 0xB7B1B8B3, 0xB9B6B1BA, 0xAFB6B3B2, 0xB4B3B8B6,
+ 0xB7B4B1B6, 0xB4BBB6B0, 0xB6B7BDB8, 0xAEA9B5BB,
+ 0xA2A9A2A7, 0xA2A5AAA1, 0xACA1A9AD, 0xA3A99EA8,
+ 0x9EA0A99F, 0xA8A19FA8, 0xA1A99FA1, 0x9CA2A89D,
+ 0xA99CA2A9, 0xA2A99CA2, 0x9BA1A89B, 0xA89CA1A8,
+ 0xA0A498A4, 0x9AA1A599, 0xA79AA2A6, 0x9DA699A0,
+ 0x989CA598, 0xA3989CA5, 0x9DA3989D, 0x93979D92,
+ 0x998F959D, 0x90988E91, 0x8A8D958B, 0x90858D95,
+ 0x868B828A, 0x7A7C807A, 0x807C7E80, 0x20211F7F,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x30222321, 0x332F3334,
+ 0x32332F34, 0x4B393A36, 0x73714C4D, 0x72736F72,
+ 0x9F767872, 0xBBB7A3A5, 0xB8BCB7BA, 0xB6B6BAB4,
+ 0xBCB5B6BD, 0xB5BCB5B5, 0xB5B6BDB6, 0xBAB3B5BC,
+ 0xB5BCB5B3, 0xBABABEB9, 0xBBB9B9BC, 0xBABDBBB8,
+ 0xB7B7BDB8, 0xBEBCB7BE, 0xB7BCBAB9, 0xBBBABDBB,
+ 0xC1BFBABD, 0xB9BCBAC0, 0xB8B9BFBA, 0xC0B9B7BF,
+ 0xB9C0B9B8, 0xB6B5BBB6, 0xBCB7B5BB, 0xB7BEB9B6,
+ 0xB9B8BEB9, 0xBEB9B8BE, 0xB5BBB6B8, 0xB4B2B9B4,
+ 0xBAB8B2B9, 0xBBBCB8B7, 0xB5B9BDB7, 0xBBB6B7BB,
+ 0xB9BDB8B7, 0xB9BABEB8, 0xBDBBBABE, 0xBABDBBBA,
+ 0xB9B9BBBB, 0xBCBAB8BB, 0xB6BCB7B7, 0xAFB7BBB5,
+ 0xBCB6B3B8, 0xB5BCB5B8, 0xB8B7BDB8, 0xBEB9B7BD,
+ 0xB7BDB8B8, 0xB5B8BFB8, 0xBBB6B5BC, 0xB8BEB9B5,
+ 0xB6B8BCB7, 0xBCB7B8BC, 0xB7BBB6B8, 0xB9B8BEB9,
+ 0xBBB5B8BE, 0xB7BBB5B7, 0xB5B6BEB4, 0xBCB7B5BC,
+ 0xB8BCB7B6, 0xB7B9BDB7, 0xBBB5B9BD, 0xB4BBB4B7,
+ 0xB3B9BDB7, 0xB7B1B3BA, 0xB3B7B1B3, 0xABAFB4AB,
+ 0xB4ADAFB4, 0xADB4ADAD, 0xAEAEB3AA, 0xB7ACB2B7,
+ 0xB3B9AEB1, 0xB2B8BCB1, 0xA89DB9BD, 0x7A8075A4,
+ 0x78787C77, 0x524D797D, 0x383C364E, 0x2C363832,
+ 0x302A3435, 0x2A2B272E, 0x060A0506, 0x06030A05,
+ 0x4E4B430B, 0x55585449, 0x6C586764, 0x6E6D596D,
+ 0x566D6B59, 0x675B6666, 0x62645867, 0x475F5F51,
+ 0x48405655, 0x3F3D354B, 0x0E383930, 0x01001414,
+ 0x00000000, 0x00000001, 0x00000000, 0x07050400,
+ 0x2D36332E, 0x403B3532, 0x52504843, 0x565E5D53,
+ 0x665A6262, 0x6C6C5E66, 0x60707060, 0x685D7070,
+ 0x5E5C526C, 0x515A5B51, 0x3C36585C, 0x0001003A,
+ 0x01000000, 0x00000001, 0x00010000, 0x80454741,
+ 0x89808889, 0x86898088, 0x858A9085, 0x948B8A90,
+ 0x93948A93, 0x8E909488, 0x9C90989D, 0x989C9098,
+ 0x92999D92, 0x9E93999D, 0x9A9E9398, 0x90989C90,
+ 0xA0919C9F, 0x9BA0919D, 0x949BA293, 0xA3929CA3,
+ 0x9EA69599, 0x909DA594, 0xA3949A9F, 0xA0A5969E,
+ 0x989FA697, 0xA798A0A7, 0xA0A798A0, 0x979FA697,
+ 0xA99A9FA6, 0xA4AB9CA2, 0x9CA7AC9D, 0xAB9CA6AB,
+ 0xA4AB9CA4, 0xA7A8ACA0, 0xBAAFAFB3, 0xBBC1B6B4,
+ 0xAEB3B8AF, 0xBEB5B0B8, 0xBEC3BAB9, 0xB6BCC1B8,
+ 0xBEB8BABF, 0xBABEB8BA, 0xB6BDBFB9, 0xBFB9BABC,
+ 0xBCC0BBBD, 0xBDBBC0BE, 0xC0BBBABF, 0xBCC0BBBC,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBBBAC0BB,
+ 0xBFBDBAC0, 0xBABFBDBA, 0xB9B6BBB9, 0xC0BEB6BB,
+ 0xBABFBDBB, 0xBEBABFBD, 0xBFBEBBC0, 0xBABFBDBA,
+ 0xB9B5BAB8, 0xBAB8B6BB, 0xBABFBDB5, 0xBDBABFBD,
+ 0xC1C0BABF, 0xBAC0BFBB, 0xBDBBC0BE, 0xC1BCBABF,
+ 0xBBC1BCBB, 0xBDBAC1BE, 0xBFBEB9C0, 0xBBC0BFBA,
+ 0xC1BABFBE, 0xC2C1BDC2, 0xBABFBEBD, 0xBEBBC0BE,
+ 0xBFBDBBC0, 0xBBC0BEBA, 0xBFB9C0BD, 0xC0BFBAC0,
+ 0xB8C0C0BA, 0xC0B8C0C0, 0xBFBEB8C0, 0xB7BDBCB9,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFBAC0BF,
+ 0xC1C0BAC0, 0xB8C0BFBB, 0xBFB8C0BF, 0xC1BEB8C0,
+ 0xBAC1BEBA, 0xC0BAC2C1, 0xBFBFB8C0, 0xB8C0C0B7,
+ 0xBFBCC2C1, 0xC0C0BAC0, 0xB8C0C0B8, 0xC1B8C0C0,
+ 0xBFC0B9C1, 0xB9BEBFBA, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xBBC1C0BB, 0xC0BAC0BF, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xBFBBC1C0, 0xC1C0BBC2, 0xBBC1C0BB, 0xC0BBC1C0,
+ 0xC1C0B9C1, 0xB8C0BFB9, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB8C0BF, 0xC0BFB7BF, 0xB8C0BFB8,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xBDB8C0C0, 0xC0C0B5BD,
+ 0xBABFC0B8, 0xBCB7BDBC, 0xC0C0B8BD, 0xBBBDBDBE,
+ 0xBDBABFBE, 0xBFBDB9C0, 0xBCBFBDBA, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBAC0BFB9, 0xBEBCC1BF, 0xC0BFBBC0,
+ 0xBAC0BFBB, 0xC0BABFC0, 0xC0BFBABF, 0x868B8ABB,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC1595D5E, 0xC0C0BCC0,
+ 0xBCC1C0BE, 0xBCB9BFBE, 0xBEBFB5BD, 0xBABFC0B9,
+ 0xC0B8C0C0, 0xBFBFB8C0, 0xB7BFBFB7, 0xBEB7BFBE,
+ 0xBDBCB7BF, 0xB9BFBEB7, 0xBCB5BDBC, 0xBEBFB5BD,
+ 0xB9BEBFB9, 0xC0BABFC0, 0xC0BFBABF, 0xB3B9B8BA,
+ 0xC0B8C0C0, 0xC1C1B8C0, 0xB8C0C0B9, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB8C0C0, 0xBFBFB7BF, 0xB8C0C0B7,
+ 0xBFB8C0BF, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xC0BABFC0, 0xC0C1BABF, 0xBBC0C1BB,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB, 0xBFB8C0BF,
+ 0xC1C1B8C0, 0xB8C0C0B9, 0xBDB7BFBE, 0xBEBFB6BE,
+ 0xBABFC0B9, 0xBEBAC0BF, 0xC0BDB9BF, 0xB9BFBEB9,
+ 0xC0BAC0BF, 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB8BEBDB9, 0xBEB9BFBE, 0xBEBDB9BF,
+ 0xB6BBB9B8, 0xBDB7BCBA, 0xBDBBBABF, 0xB8BDBBBA,
+ 0xBDB7BDBC, 0xBDBDB5BD, 0xB5BABBB5, 0xB8B4BAB9,
+ 0xB9B7B4B9, 0xB6BAB5B6, 0xB3B4B8B2, 0xB7B2B5B9,
+ 0xB3B7B2B3, 0xAFB3B7B2, 0xB7B2B0B4, 0xAEB4AFB3,
+ 0xB4B0B7B2, 0xB9B6B2B9, 0xAEB7B4B0, 0xB3B1B8B5,
+ 0xB8B3B1B8, 0xB1B8B3B1, 0xB1B0B8B1, 0xA8A1B0B8,
+ 0xA1A9A2A0, 0x9FA2A9A2, 0xA9A0A3A8, 0xA3A89FA4,
+ 0xA1A0A8A1, 0xA69FA0A8, 0x9FA79D9F, 0x9A9FA59A,
+ 0xA89D9FA5, 0xA1A79CA2, 0x9CA1A79C, 0xA59AA1A7,
+ 0xA2A69AA1, 0x96A2A69A, 0xA697A0A5, 0xA0A7989F,
+ 0x979EA598, 0xA4989DA4, 0x969C91A0, 0x8D979D92,
+ 0x988E8F97, 0x90988E90, 0x888C9588, 0x90868C95,
+ 0x81888188, 0x7A798079, 0x7E7C797F, 0x20211F7B,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x361E211F, 0x38363538,
+ 0x37383437, 0x603F403C, 0x78726466, 0x78787276,
+ 0x7077786F, 0xA9A37879, 0xBEC2BCA7, 0xB7B8BCB6,
+ 0xBCB7B6BC, 0xB6BDB6B6, 0xB2B6BEB4, 0xBBB2B4BC,
+ 0xB8BCB6B6, 0xB7B7BEB7, 0xBCBAB6BC, 0xB9BCBAB9,
+ 0xB9BABEB9, 0xBDBBBBBF, 0xB8BDBBB8, 0xB9B8BDBB,
+ 0xBEB9B8BE, 0xBABEB9BA, 0xB7B7BDB8, 0xBDB6B6BC,
+ 0xB8BCB6B6, 0xB9B7BBB5, 0xBFBABBBF, 0xB6BCB7BB,
+ 0xB7B8BCB7, 0xBFBAB6BC, 0xBAC0BBB9, 0xB5BAC0BB,
+ 0xBCB7B5BC, 0xB5BCB5B6, 0xB1B5BCB5, 0xBCB5B1B8,
+ 0xB5BCB5B5, 0xB5B5BCB5, 0xBCB7B5BC, 0xB5BBB6B6,
+ 0xBBB5BAB8, 0xC0BBBAC0, 0xBCC0BABA, 0xB2B7BAB1,
+ 0xBAB1B8BB, 0xB6BBB2B7, 0xB4B4BBB4, 0xBBB4B4BB,
+ 0xB4BBB4B4, 0xB6B6BDB6, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB4B7BEB7, 0xBCB6B6BE, 0xB8BCB6B8, 0xB6B5BCB5,
+ 0xC0B7B6BD, 0xB6BBB2BB, 0xB4B6BEB4, 0xBBB5B6BE,
+ 0xB6BAB4B7, 0xB2B6BBB2, 0xBBB2B6BB, 0xBCC1B8B6,
+ 0xAFBBBEB5, 0xBBB2B3B8, 0xB8BBB2B8, 0xAFB9BDB2,
+ 0xB4AEB6BA, 0xB0B4AEB0, 0xADA6ABA2, 0xB8ADB0B8,
+ 0xB2B8ADB2, 0xB0B4B9B0, 0x7B6FB6B9, 0x787C7077,
+ 0x71717871, 0x78717178, 0x44484271, 0x292E302A,
+ 0x31282F2F, 0x30302A30, 0x00070400, 0x04000803,
+ 0x46433B0A, 0x5A565449, 0x70606968, 0x70705E70,
+ 0x51696959, 0x5F51605F, 0x605F5160, 0x465F6050,
+ 0x4A405556, 0x4240384B, 0x0F383930, 0x01001213,
+ 0x00000000, 0x00000000, 0x00000000, 0x07050400,
+ 0x27322F2A, 0x473E312F, 0x50514846, 0x565A5B51,
+ 0x675C5F60, 0x6E6C6169, 0x5F706D5F, 0x675C6E6D,
+ 0x5D5B516B, 0x5058594F, 0x3A365859, 0x0200003B,
+ 0x00000000, 0x00000000, 0x00010000, 0x82484945,
+ 0x8C81888B, 0x888C8188, 0x8A8C9287, 0x938A8E93,
+ 0x94958C92, 0x8B93978C, 0x9C919397, 0x989C9198,
+ 0x90989C90, 0x9F94989C, 0x9B9F949B, 0x939CA095,
+ 0x9F939B9F, 0x9DA2939B, 0x929AA192, 0xA3949AA1,
+ 0x99A1909C, 0x90A2A595, 0xA0909DA0, 0xA4A7979D,
+ 0x95A1A796, 0xA697A0A6, 0xA2A798A1, 0x9CA2A69A,
+ 0xA79BA4A8, 0xA5A99DA3, 0x9EA2A798, 0xAB9CA8AD,
+ 0xACB1A2A6, 0xAAAEB2A6, 0xBAAFB2B6, 0xAFB5AAB6,
+ 0xA9ADB2A9, 0xB4A9ADB2, 0xADB3A8AE, 0xBCBCBFB6,
+ 0xBEB8C2C5, 0xBABEB9BA, 0xB5B7BBB5, 0xC0BBB5BC,
+ 0xBAC0BBBA, 0xBDBABFBD, 0xC0BBBABF, 0xBCC0BBBC,
+ 0xBCBBBEBC, 0xBEBCBBBE, 0xBBBEBCBB, 0xBDBABDBB,
+ 0xBFBDBCBF, 0xBCBFBDBC, 0xB9B8BCB7, 0xC0BBBABE,
+ 0xBCC0BBBC, 0xBDBCBFBD, 0xC0BEBCBF, 0xBCBFBDBD,
+ 0xB7B8BBB9, 0xC0BBB8BC, 0xBCC0BBBC, 0xBDBBC0BE,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEBAC1BE, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBDC0BEBD, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBAC1BE, 0xC0BFBAC1,
+ 0xBAC0BFBA, 0xC0B8C0C0, 0xBDBCB8C0, 0xB9BFBEB7,
+ 0xBFBBC1C0, 0xC0BFBAC0, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xBFBFBAC0, 0xB8C0C0B7, 0xBFB8C0C0, 0xC2BFB8C0,
+ 0xBBC2BFBB, 0xBEBBC1C0, 0xC0BFB9BF, 0xBBC1C0BA,
+ 0xBFBBC1C0, 0xC0BFBAC0, 0xB9C1C0B8, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBCC1C0BC, 0xC0BABFC0, 0xC1C0BABF,
+ 0xBBC1C0BB, 0xC0BBC1C0, 0xC1C2BBC1, 0xBBC0C1BD,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BC, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBCC2C1BB, 0xBFB8C0C0, 0xBFC0B7BF,
+ 0xBABFC0BA, 0xC0B7BFBF, 0xBFC0B8C0, 0xBBC0C1BA,
+ 0xC1B8C0C0, 0xC1C0B9C1, 0xBBC1C0BB, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBBC1C0B8, 0xBFB8C0C0, 0xBCBDB7BF,
+ 0xBABFC0B7, 0xBFBAC0BF, 0xC0BEBAC0, 0xBBC0BFBB,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBBC0BFBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BFBBC0,
+ 0xBBC0BFBA, 0xC0BCC1C0, 0xC0C1BEC0, 0x8B8F90BC,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5D5E, 0xBFBFBCC0,
+ 0xBEC0C0BD, 0xBEB9BFBE, 0xBFC0B7BF, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0BF,
+ 0xBFBEB8C0, 0xBBC1C0B9, 0xC0B8C0BF, 0xBEBFB9C1,
+ 0xB8BDBEB9, 0xC0BABFC0, 0xC0BFBABF, 0xACB2B1BA,
+ 0xC0ABB3B3, 0xBFBFB8C0, 0xB9C1C1B7, 0xC0B7BFBF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB8C0C0, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xC0BABFC0, 0xBFC0BABF, 0xBBC0C1BA,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB, 0xBEB8C0BF,
+ 0xC0C0B7BF, 0xB7BFBFB8, 0xBFB8C0C0, 0xBFC0B8C0,
+ 0xB9BEBFBA, 0xBEB9BFBE, 0xC0BDB9BF, 0xB9BFBEB9,
+ 0xC0B9C1C1, 0xC0C0B8C0, 0xB7BFBFB8, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xBAC0BFB8, 0xBEB9BFBE, 0xBDBBB9BF,
+ 0xBABFBDB8, 0xBBB8BDBB, 0xBDBBB8BD, 0xB9BEBCBA,
+ 0xBBB7BCBD, 0xBDBDB3BB, 0xB5BDBCB5, 0xB7B5BAB9,
+ 0xBCBAB4B9, 0xB8BCB7B9, 0xB6B8BCB6, 0xB9B4B8BC,
+ 0xB3B7B2B5, 0xB7B8BCB7, 0xB9B4B8BC, 0xB1B7B2B5,
+ 0xB2B3BAB3, 0xB8B5B1B9, 0xA9B2AFB1, 0xB3ACB3AE,
+ 0xB8B3B1B8, 0xB4BBB6B1, 0xAFB0B8B1, 0xAFA7B0B9,
+ 0x9FA7A0A4, 0xA1A2A9A2, 0xA6A0A1A8, 0xA2A9A2A2,
+ 0xA1A1A8A1, 0xA7A0A0A8, 0xA1A99FA0, 0x9D9FA59A,
+ 0xA79CA2A8, 0xA1A79CA1, 0x9AA1A79C, 0xA4999FA5,
+ 0xA0A499A0, 0x97A3A79B, 0xA798A1A6, 0xA1A899A0,
+ 0x98A0A498, 0x9F93A0A4, 0x999F949B, 0x939BA097,
+ 0x968D959D, 0x92988D91, 0x83889184, 0x8D838790,
+ 0x81888185, 0x7A79817A, 0x7E7C797F, 0x1F22207B,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x361E211F, 0x38363538,
+ 0x35393435, 0x72656761, 0x79707678, 0x797A7178,
+ 0x70787970, 0x79707879, 0xA8AAA478, 0xB6B9BDB7,
+ 0xBCB7B5BB, 0xB9BDB7B8, 0xB1B4BCB2, 0xBBB2B4BC,
+ 0xB6BBB2B6, 0xB7B5BCB5, 0xBBB9B6BC, 0xB8BBB9B8,
+ 0xB4B7BBB6, 0xBEB9B6BA, 0xB7BBB6BA, 0xB7B6BCB7,
+ 0xBCB6B6BC, 0xB8BCB6B8, 0xB8B6BCB7, 0xBEB8B7BD,
+ 0xBABEB8BA, 0xB5BBBFB9, 0xBCB7B7BB, 0xB7BBB6B8,
+ 0xB7BBBFBA, 0xC0BBB8BC, 0xB9BFBABC, 0xB5B9C0B9,
+ 0xBBB4B5BC, 0xBAC2BBB3, 0xB5BAC1BA, 0xBCB5B5BC,
+ 0xB1B8B1B5, 0xB5B5BCB5, 0xBBB6B5BC, 0xB2B8B3B5,
+ 0xB6B5BBB6, 0xBCB5B5BB, 0xB5BCB5B5, 0xB3B6BBB2,
+ 0xBDB4B9BC, 0xB8BDB4BA, 0xB1BBC0B7, 0xBDB3B3BB,
+ 0xB4BCB2B5, 0xB6B9BDB7, 0xBCB7B8BC, 0xB8BCB6B8,
+ 0xB4B1B9AF, 0xBDB4B6BE, 0xB7BCB3B8, 0xB2B4BCB2,
+ 0xBCB3B4BC, 0xB8BDB4B7, 0xB4BBC0B7, 0xC0B7B8BD,
+ 0xB8BBB2BD, 0xB0B7BCB3, 0xB9B0B4B9, 0xBABDB4B6,
+ 0xB2BABDB4, 0xB9B0B8BB, 0xB8BCB1B6, 0xB1B8BCB1,
+ 0xBBB2B8BC, 0xB6B8B2B8, 0xADB3B9AE, 0xB8ADB0B8,
+ 0xB2B8ADB2, 0x85B4B9B0, 0x7C708C90, 0x787C707A,
+ 0x7071796F, 0x79726F77, 0x61686172, 0x2B42443E,
+ 0x31283131, 0x30312830, 0x00070200, 0x04000905,
+ 0x48433A0A, 0x59565449, 0x70606767, 0x70706070,
+ 0x566D6C5E, 0x60526564, 0x65645663, 0x46606050,
+ 0x4D415556, 0x4241374D, 0x0F383930, 0x01001213,
+ 0x00000000, 0x00000000, 0x01010000, 0x07080601,
+ 0x2830302A, 0x463D3230, 0x50514845, 0x565A5B51,
+ 0x675C5F60, 0x6F6B6069, 0x61706C61, 0x675C706C,
+ 0x5F5D5269, 0x5359574F, 0x3A365959, 0x0200003B,
+ 0x00000000, 0x00000000, 0x00010000, 0x82464A45,
+ 0x8C81868B, 0x888C8088, 0x8A8C9188, 0x928C9093,
+ 0x94958C90, 0x8D95998E, 0x998E9599, 0x989C9195,
+ 0x93989C90, 0xA1969B9F, 0x9B9F949D, 0x959B9F94,
+ 0x9B8F9CA0, 0x9A9E9297, 0x939BA293, 0xA3949BA2,
+ 0x9CA1929C, 0x919DA090, 0xA090A2A4, 0xA0A3939F,
+ 0x95A2A897, 0xA798A0A6, 0xA1A697A2, 0x9CA3A79B,
+ 0xA79BA3A7, 0xA4A89CA3, 0x9CA3A79B, 0xB1A2A6AB,
+ 0xB0B5A6AC, 0xA6B3B7AB, 0xB1A5AEB2, 0xAEB2A7AD,
+ 0xA8ADB3A8, 0xB3A8ADB3, 0xADB3A8AD, 0xB0B0B4A9,
+ 0xC5BFB6B9, 0xC0C4BEC1, 0xBAB5BCB5, 0xC0BBBAC1,
+ 0xB9C0BBB9, 0xBDB9BEBC, 0xC0BBBABF, 0xBCC0BBBC,
+ 0xBDBBBEBC, 0xBEBCBCBF, 0xBBBEBCBB, 0xBDBDC0BE,
+ 0xBFBDBCBF, 0xBABDBBBC, 0xBCB8BCB7, 0xC0BBBDC1,
+ 0xBCC0BBBC, 0xBDBDC0BE, 0xBFBDBCBF, 0xBABDBBBC,
+ 0xB9BABBB9, 0xC1BCBCBD, 0xBCC0BBBD, 0xBEBABFBD,
+ 0xBFBDBBC0, 0xBABFBDBA, 0xBEBAC1BE, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBBC0BE, 0xBFBDBBC0, 0xBDC0BEBC, 0xBEBCC1BF,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBFBAC1BC, 0xC0BEBBC2,
+ 0xBBC0BFBB, 0xBEBAC0BF, 0xBDBCB9BF, 0xBAC0BFB7,
+ 0xBFB9BFBE, 0xC0BFBAC0, 0xBAC0BFBA, 0xBCBAC0BF,
+ 0xC0C0B7BD, 0xB8C0C0B8, 0xC1B6C0C0, 0xC1C0B9C1,
+ 0xBBC1C0B9, 0xBFBBC1C0, 0xC1C0BAC0, 0xBBC1C0BB,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xB9C1C0B9, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBCC1C0BC, 0xC0BBC0C1, 0xC1C0BABF,
+ 0xBBC1C0BB, 0xC0BCC1BF, 0xC0C1BCC1, 0xBBBFC0BC,
+ 0xC0BCC2C1, 0xC1C0BBC1, 0xBCC1C0BC, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBAC0BFBB, 0xC1B8C0C0, 0xC0C0B9C1,
+ 0xB9C1C1B8, 0xC0B8C0C0, 0xC0C1B8C0, 0xBBC0C1BB,
+ 0xC1B8C0C0, 0xC1C0B9C1, 0xBBC1C0BB, 0xC0B9C1C0,
+ 0xC1C0B9C1, 0xBBC1C0BB, 0xC0B8C0C0, 0xBBBCB8C0,
+ 0xBCC0C1B7, 0xBFBAC0BF, 0xC0BEBAC0, 0xBBC0BEBB,
+ 0xC0BAC0BF, 0xC0BFBABF, 0xBBC0BFBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BFBBC0,
+ 0xBBC0BFBA, 0xC0BEC0C0, 0xC0C1BEC0, 0x8B8F90BC,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15A5C5D, 0xC0C0BCC0,
+ 0xBDC2C1BE, 0xC0BABFC0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFBAC0BF,
+ 0xBFBEBAC0, 0xB8C0BFB7, 0xC0BABFC0, 0xC0C0BABF,
+ 0xB8C0C0B8, 0xC0B9BEBF, 0xC0C0BABF, 0xA2AAAAB8,
+ 0xC08D9595, 0xC0C0B8C0, 0xB7BFBFB8, 0xBFB8C0C0,
+ 0xBFBFB7BF, 0xB8C0C0B7, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C1B8C0, 0xBCC1C2BB,
+ 0xC0BBC1C0, 0xC0C1BBC1, 0xBBC0C1BB, 0xBFB8C0C0,
+ 0xBFC2B7BF, 0xB8C0C0B8, 0xC1B8C0C0, 0xBFC0B9C1,
+ 0xB9BEBFBA, 0xBEB7BFBE, 0xBFBEB7BF, 0xB7BFBEB7,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBDB9BFBE, 0xBDBBB8BE,
+ 0xBABFBDB8, 0xBCB8BDBC, 0xBBB9B8BD, 0xB9BEBCB6,
+ 0xBBB7BCBD, 0xB8B7B3BB, 0xB5BDBCB0, 0xB9B6BBB9,
+ 0xBBB9B6BB, 0xB8BBB9B8, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB5B9B4B8, 0xB7B6BAB5, 0xB8B6B8BC, 0xB3B9B4B3,
+ 0xB6B3BAB3, 0xBCB9B5BD, 0xB0B7B4B5, 0xB0AEB4AF,
+ 0xB3AEAFB5, 0xB2B8B3AD, 0xB2AFB7B0, 0xA8A1B1B9,
+ 0xA0A8A1A0, 0xA0A2AAA0, 0xABA1A4A9, 0xA2AAA0A3,
+ 0x9A9FA79D, 0xA79D9CA4, 0x9FA79D9F, 0x9AA1A79C,
+ 0xA59C9FA5, 0xA2A79EA0, 0x99A1A79C, 0xA69B9EA4,
+ 0xA1A59AA2, 0x99A1A599, 0xA599A1A5, 0xA1A599A1,
+ 0x939DA497, 0xA19699A0, 0x9CA2979D, 0x999BA097,
+ 0x9D9499A0, 0x92988D98, 0x858E9588, 0x8E848A90,
+ 0x81888186, 0x7A7A817A, 0x7F7A7A81, 0x1D201E7B,
+ 0x01000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x361D201E, 0x39343538,
+ 0x64686335, 0x72767872, 0x79707678, 0x77786E78,
+ 0x70787970, 0x79737879, 0x76787279, 0xB7A3A7A1,
+ 0xBCB7B9BD, 0xB8BCB6B8, 0xAEB3B8AF, 0xB7B1B2B7,
+ 0xB5B9B3B3, 0xB7B6BDB6, 0xBBB9B6BC, 0xB9BCBAB8,
+ 0xB5B9BAB6, 0xB9B3B9BB, 0xB9BBB5B7, 0xB7B9BDB7,
+ 0xBDB8B9BD, 0xB8BEB9B7, 0xBAB8BEB9, 0xBCB6B9BF,
+ 0xB8BCB6B8, 0xB7B6BCB7, 0xC1BCB8BC, 0xBFC0BCBD,
+ 0xBFC3C4C0, 0xC4BFC0C4, 0xC0C4BFC0, 0xB5BFC5C0,
+ 0xC0BBB4BA, 0xBAC0BBBA, 0xBBBEC4BF, 0xC1BABAC0,
+ 0xBAC1BABA, 0xBFBEC4BF, 0xC5BEBEC4, 0xBAC1BABE,
+ 0xBFBBC1BC, 0xC1BABEC4, 0xBAC2BBB9, 0xB9B9C0B9,
+ 0xC0B7B9C0, 0xB8BDB4BB, 0xB6BBC1B6, 0xBCB1BBC1,
+ 0xAFB5AAB6, 0xB4B8BDB4, 0xBCB6B8BD, 0xB8BCB6B8,
+ 0xB5B6BEB4, 0xBEB3B7BF, 0xB8BEB3B8, 0xB1B6BEB4,
+ 0xBAB1B5BA, 0xB9BCB3B7, 0xB8B8BDB4, 0xBCB6BCC1,
+ 0xB9BBB5BA, 0xB4B8BDB4, 0xB8AFB8BD, 0xB8BBB2B5,
+ 0xB3B8BCB1, 0xB9B0BABE, 0xB5B9AEB6, 0xB1B6BAAF,
+ 0xBCB1B9BD, 0xB8BCB1B8, 0xACB2B8AD, 0xB8ADB2B9,
+ 0xB2B8ADB2, 0x718B8F83, 0x7C70797D, 0x787C717A,
+ 0x7171796F, 0x77707078, 0x7178716F, 0x2A6A6C66,
+ 0x31282E30, 0x31322930, 0x00080300, 0x05000804,
+ 0x49443B0B, 0x59565449, 0x6F606867, 0x716E5F72,
+ 0x5C716E60, 0x67596B67, 0x6665576A, 0x46606050,
+ 0x4B405454, 0x4241374D, 0x0E37382F, 0x00001414,
+ 0x00000100, 0x00000001, 0x00000000, 0x05060400,
+ 0x3330302A, 0x453C3B3C, 0x50514844, 0x55595A50,
+ 0x665D6161, 0x736C636B, 0x61706C61, 0x675C706C,
+ 0x5E5C516B, 0x5259574F, 0x39385858, 0x0000003B,
+ 0x00000000, 0x01000000, 0x00010000, 0x82484945,
+ 0x8C81888B, 0x888C8088, 0x8A8E9188, 0x938A9093,
+ 0x90948990, 0x8E95998D, 0x9A8E989D, 0x95998D96,
+ 0x96969C91, 0x9F939BA1, 0x9B9F939B, 0x959DA195,
+ 0xA1959DA1, 0x9B9F939D, 0x959CA192, 0xA394A0A6,
+ 0x9EA3949C, 0x95A0A393, 0xA393A2A5, 0x9C9F8FA0,
+ 0x97A0A695, 0xA798A2A8, 0xA3A899A2, 0x9DA5A99D,
+ 0xA79CA5A9, 0xA3A79CA3, 0xA4A6AA9F, 0xB4A8ACB0,
+ 0xB0B4A8B0, 0xA3B0B7A8, 0xB4A5ABB2, 0xACB3A6AD,
+ 0xA8AEB4A9, 0xB3A8ADB3, 0xB1B5A9AF, 0xA8AEB5A8,
+ 0xB9AEADB3, 0xBABFB6B5, 0xBEBAC1BA, 0xBFBABEC5,
+ 0xBAC0BBB9, 0xBBB9C0BB, 0xC0BBB9C0, 0xBAC0BBBA,
+ 0xBABCC0BB, 0xBFBABBBF, 0xBBBFBABB, 0xBBBCC0BB,
+ 0xBFBDBCC0, 0xB7BAB8BC, 0xBDB8BBB9, 0xBFBDBCBF,
+ 0xBCBFBDBC, 0xBEBBBDBD, 0xBEBEBCBE, 0xB7BAB8BC,
+ 0xBDB8BBB9, 0xBFBDBCBF, 0xBABDBBBC, 0xBDB8BDBB,
+ 0xBEBCBABF, 0xBABFBDB9, 0xBEBAC1BE, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBCC1BFBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBCBBC0BE, 0xBFBEB8BD, 0xB8C0C0B9,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xB8C0BFB8, 0xBCB9BFBE,
+ 0xC0C0B7BD, 0xB8C0C0B8, 0xC1B8C0C0, 0xC0C0B9C1,
+ 0xB8C0BFB8, 0xBFBCC2C1, 0xC0C1BAC0, 0xBBC0C1BB,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBBC0BFBC, 0xC1BBC0C1, 0xC1C0BBC0,
+ 0xBBC1C0B9, 0xC0BCC1C0, 0xC0C1BCC1, 0xBBBFC0BC,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBBC0BFBB, 0xC0BABFC0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0BF, 0xC1C0B9C1, 0xBBC1C0BB,
+ 0xBFBBC1C0, 0xC1C0BAC0, 0xBBC1C0BB, 0xBFB9C1C0,
+ 0xC1C0B8C0, 0xBAC0BFBB, 0xC0B8C0C0, 0xBBBCB8C0,
+ 0xBABEBFB7, 0xBFBAC0BF, 0xC0BEBAC0, 0xBBC0BEBB,
+ 0xBFBAC0BF, 0xC0BFB8C0, 0xBAC0BFBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xC0BEC0C0, 0xC0C1BEC0, 0x8B8F90BC,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC05B5D5E, 0xC0C0BCC1,
+ 0xBCC1C0BE, 0xC0BABFC0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0B7BFBF, 0xC0C0B8C0, 0xB7BFBFB8, 0xBFB9BFBE,
+ 0xC0BFBAC0, 0xB8C0BFB8, 0xBFBABFC0, 0xC0C0B9BE,
+ 0xB8C0C0B8, 0xC0BABFC0, 0xC0C0BABF, 0xABB3B3B8,
+ 0xC0AAB2B2, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC1B8C0C0, 0xC0C1B9C1, 0xBBC0C1BB,
+ 0xC0BBC1C0, 0xBFC0BBC1, 0xB8C0C0BA, 0xC0B8C0C0,
+ 0xBFC2B8C0, 0xB8BFC2B8, 0xC0B7BFBF, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xBEB8C0C0, 0xBFBEB7BF, 0xB7BFBEB7,
+ 0xBBB8C0C0, 0xB0B0B3BB, 0xB8C0C0A8, 0xBDB9BFBE,
+ 0xC0BFB8BE, 0xB9BFBEBA, 0xBEB9BFBE, 0xBCBAB9BF,
+ 0xB9BEBCB7, 0xBCB8BDBC, 0xBBB9B8BD, 0xB8BDBBB6,
+ 0xBDB7BDBC, 0xBBBAB6BE, 0xB5BBBAB3, 0xB8B6BBB9,
+ 0xBBB9B7BD, 0xB8BBB9B8, 0xB3B8BCB7, 0xB9B4B4B8,
+ 0xB6BAB5B5, 0xB8B7BBB6, 0xBAB8B7BD, 0xB4B9B7B5,
+ 0xB2B3B9B4, 0xB9B6B1B7, 0xB0B7B4B2, 0xB3AEB3B1,
+ 0xB8B3B2B8, 0xB1B8B3B2, 0xB0B1B8B1, 0xA8A1AFB7,
+ 0xA1A8A1A0, 0xA0A1A99F, 0xA9A0A4A9, 0xA3ABA1A4,
+ 0x9DA1A99F, 0xA79D9FA7, 0x9FA79D9F, 0x9A9FA59A,
+ 0xA39A9FA5, 0x9EA39A9E, 0x9A9FA59A, 0xA79C9FA5,
+ 0xA1A59AA3, 0x99A1A599, 0xA498A1A5, 0xA0A498A0,
+ 0x989DA195, 0xA599A0A4, 0x9DA196A1, 0x939CA198,
+ 0x9C93979C, 0x93998E97, 0x858E9588, 0x8C838A90,
+ 0x81897F87, 0x7A788076, 0x7F7A7A81, 0x1E211F7B,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x331E211F, 0x504A3438,
+ 0x6266604C, 0x70767872, 0x79707679, 0x76797078,
+ 0x71767970, 0x7872777A, 0x76787278, 0xB67C807A,
+ 0xBCB7B8BC, 0xB8BCB6B8, 0xB4B6BBB2, 0xBBB2B8BD,
+ 0xB7BBB5B6, 0xB8B7BEB7, 0xBDB8B8BF, 0xB9BDB8B7,
+ 0xB5BABEB9, 0xB7B1B9BB, 0xBBBDB7B5, 0xB8BABEB8,
+ 0xBEB9B8BF, 0xB8BEB9B8, 0xB8B8BEB9, 0xBDB8B9BD,
+ 0xBABEB8B9, 0xBFBDC1BC, 0xC2BEC0C4, 0xC2C3BFC1,
+ 0xB9BFC0BC, 0xBCB7BBBF, 0xB8BCB6B8, 0xB1B3B7B1,
+ 0xB7B1B3B7, 0xB7BBB5B3, 0xB4B7BBB5, 0xB7AEB6BA,
+ 0xB5BCB5B2, 0xB6B5BCB5, 0xBCB5B5BB, 0xB1B8B1B5,
+ 0xB6B1B8B1, 0xB8B1B8BC, 0xB5BDB3B1, 0xB8B6BDB6,
+ 0xBCB3BAC2, 0xB4B9B0B7, 0xA8ACB1A8, 0xB0A7ADB3,
+ 0xADB2A9AD, 0x91A2A79E, 0xA79E959A, 0xADB2A9A2,
+ 0xC0B3B8AF, 0xC8BFC4C9, 0xBFC4BBC3, 0xB7BBC0B7,
+ 0xBDB4BBC0, 0xBBBCB3BA, 0xB1B8BBB2, 0xBBB2B5BA,
+ 0xBABDB4B8, 0xB1B8BDB4, 0xBBB2B6BC, 0xB9BDB2B8,
+ 0xAFB8BCB1, 0xB9AEB6BA, 0xB8BCB1B5, 0xAEB7BBAF,
+ 0xBAAFB6BA, 0xB6BAAFB6, 0xACB2B9AC, 0xC3B8B2B9,
+ 0x9BA196BD, 0x6F787C70, 0x7C71777B, 0x767B7278,
+ 0x7071796F, 0x78716F77, 0x71787171, 0x52696D67,
+ 0x312B5658, 0x2F2F292F, 0x00080300, 0x04000703,
+ 0x48433A0A, 0x58555446, 0x67586868, 0x726F606A,
+ 0x5F6F6C5E, 0x685A706D, 0x6564566B, 0x475F5F51,
+ 0x4B405555, 0x4341374D, 0x0F3A3830, 0x00001413,
+ 0x00000102, 0x00000001, 0x00000000, 0x05060400,
+ 0x36302F2B, 0x463D3C3C, 0x50514745, 0x545D5D51,
+ 0x675E6060, 0x706C616C, 0x61706C61, 0x675C706C,
+ 0x5E5C516B, 0x525B5A50, 0x1B1A5858, 0x0000001D,
+ 0x00000000, 0x01000000, 0x00010000, 0x82484945,
+ 0x8C81888B, 0x888C8188, 0x8A8E9188, 0x988F9093,
+ 0x92968B95, 0x8F93978B, 0x9C90999E, 0x989C9098,
+ 0x90969C91, 0x9F93959B, 0x9DA1959B, 0x959DA195,
+ 0xA1959DA1, 0x9CA1929D, 0x919C9F8F, 0xA5969CA2,
+ 0x9EA394A0, 0x95A0A394, 0xA596A2A5, 0x9EA493A2,
+ 0x989BA190, 0xA798A3A9, 0xA1A697A2, 0x9BA3A79B,
+ 0xA99EA3A7, 0xA5A99EA5, 0xA8ADB1A6, 0xB4A8B0B4,
+ 0xB1B5A9B0, 0xA4ACB3A4, 0xB3A4ACB3, 0xACB3A6AC,
+ 0xA7ADB3A8, 0xB3A8ACB2, 0xADB4A7AD, 0xAAAEB4A9,
+ 0xB4A9AFB5, 0xAEB3AAAE, 0xBFB3B7B1, 0xC5C0BEC4,
+ 0xBAC0BBBF, 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA,
+ 0xBABABEB9, 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBDBBBBBF, 0xB8BBB9BA, 0xBDBDC0BE, 0xBFBDBCBF,
+ 0xBCBFBDBC, 0xBFBDC0BE, 0xBCBCBEC1, 0xB8BBB9BA,
+ 0xBEBABDBB, 0xBFBDBDC0, 0xB9BEBCBC, 0xBEBABFBD,
+ 0xBFBDBBC0, 0xBABFBDBA, 0xBEBAC1BE, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBFBBC0BF, 0xC1BFBBC0, 0xBABFBDBC, 0xBDBBC0BE,
+ 0xC1BFBABF, 0xBBC0BEBC, 0xBEBAC0BF, 0xC0BEB9BF,
+ 0xBBC0BEBB, 0xBCB8BDBB, 0xC0C0B8BD, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xBFBEB8C0, 0xB9C1C0B7, 0xC0B7BDBC,
+ 0xC0C0BABF, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFBBC1C0, 0xBFC0BAC0, 0xBABFC0BA,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB, 0xC0BBC1C0,
+ 0xC0BFBBC1, 0xBAC0BFBB, 0xC0BBC0C1, 0xC0BFBABF,
+ 0xBAC0BFB8, 0xC0BBC1C0, 0xBFC0BCC1, 0xBABFC0BB,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBCC1C0BC, 0xC0BABFC0,
+ 0xC0C0B8C0, 0xB9C1C1B8, 0xC1BAC2C2, 0xC2C2B9C1,
+ 0xB8C0C0BA, 0xC0B8C0BF, 0xC1C0B9C1, 0xBBC1C0BB,
+ 0xBFBAC0BF, 0xC1C0BAC0, 0xBBC1C0BB, 0xBFB8C0BF,
+ 0xC1C0B8C0, 0xBBC1C0BB, 0xC0B8C0C0, 0xBEBFB8C0,
+ 0xB8BCBDB9, 0xBFBAC0BF, 0xBFBDBAC0, 0xBAC1BEBA,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xBAC0BFBA, 0xBEBBC0BF,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xC0BEC0C0, 0xC0C1BEC0, 0x8B8F90BC,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC25B5D5D, 0xC4C2BEC3,
+ 0xBEC3C1C1, 0xBFBAC0BF, 0xBFC2B7BF, 0xB8BFC2B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB5BDBDB8,
+ 0xBFB8C0C0, 0xC0C0B7BF, 0xB9C1C1B8, 0xBFB9C1C1,
+ 0xC0C0B7BF, 0xB7BFBFB8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB9C1C1B8, 0xC1B9C1C1,
+ 0xBFC2B7C1, 0xB8BFC2B8, 0xC0B8C0C0, 0xBFC2B8C0,
+ 0xBABFC0BA, 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA,
+ 0xB7B9C1C1, 0xAEAEAFB7, 0xB8C0C0A6, 0xBFBBC1C0,
+ 0xBFBEBAC0, 0xB9BFBEB9, 0xBEB9BFBE, 0xBEBCB9BF,
+ 0xB8BDBBB9, 0xBEB7BDBC, 0xBBB9B9BF, 0xB6BBB9B6,
+ 0xBCB8BFBC, 0xBDBCB7BD, 0xB6BBBAB7, 0xB9B4B9B7,
+ 0xBCB7B6BB, 0xB9BDB8B8, 0xB6B7BBB6, 0xBAB8B7BB,
+ 0xB5BAB8B5, 0xB6B6BCB7, 0xBAB8B5BB, 0xB2B8B7B5,
+ 0xB7B3B8B6, 0xB7B8B3B8, 0xB3B7B8B3, 0xB1B0B7B4,
+ 0xB7B2ADB4, 0xB1B8B3B0, 0xB7B6BCB7, 0xABA4B6BC,
+ 0xA3AAA3A4, 0x9EA3ABA1, 0xA79EA2A7, 0xA2A79EA2,
+ 0x9C9EA69B, 0xA79C9FA7, 0xA1A79C9F, 0x9AA1A59A,
+ 0xA49BA1A5, 0xA0A39AA1, 0x989FA398, 0xA499A0A4,
+ 0xA0A499A0, 0x98A0A498, 0xA499A0A4, 0x9EA297A0,
+ 0x949EA296, 0xA1959CA0, 0x9CA0949D, 0x91979B8F,
+ 0x998E989C, 0x93978C95, 0x848B8F83, 0x897E8C90,
+ 0x83897E85, 0x76777E77, 0x7C7A757B, 0x20211F79,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x44242823, 0x7469484D,
+ 0x6F756A6E, 0x6E70736A, 0x7A717477, 0x777A7177,
+ 0x717A7D74, 0x7D74767C, 0x787B727A, 0x79798079,
+ 0xC4BF7980, 0xBEC5BEBE, 0xB0B4B9B0, 0xBBB0B5BB,
+ 0xB5BAB1B5, 0xB4B4BCB2, 0xBAB5B4BB, 0xB4BAB5B4,
+ 0xB7B7BDB8, 0xBCB7B8BC, 0xB8BCB7B8, 0xB9B9C0B9,
+ 0xC0B9B8C0, 0xB9BFBAB8, 0xBDBEC2BD, 0xC2BEC0C1,
+ 0xC0C1BDC1, 0xB6B7BBB5, 0xB5AFB8BC, 0xB2B4AEB3,
+ 0xA7ABAFA9, 0xABA5ABB0, 0xA7ACA3A7, 0xA0A5ABA0,
+ 0xACA1A8AC, 0xA3A79CA8, 0x9CA3A79C, 0xA79CA3A7,
+ 0xA3A99EA3, 0xA0A2A9A2, 0xA8A1A0A7, 0xA1A9A2A0,
+ 0x9EA2A6A0, 0xA69DA4A7, 0xA6AA9FA3, 0xA0A4A9A0,
+ 0xA89FA4A9, 0xA4A9A0A5, 0x969A9F96, 0x969098A0,
+ 0x868E8492, 0x8B8C948A, 0x968B8F94, 0x878B8090,
+ 0xAD989B92, 0xC4BBB3B6, 0xC0C3BAC1, 0xB9BEC1B8,
+ 0xC1B8BFC2, 0xC0C1B8C0, 0xB1B8BCB1, 0xB5A9B8BC,
+ 0xB8BCB0B1, 0xA9B7BEB1, 0xBBB0AFB6, 0xB8BCB0B7,
+ 0xAFB5BCAF, 0xBCAFB5BC, 0xB7BBAFB5, 0xB0B7BBAF,
+ 0xBCB0BABC, 0xB8BCB0B8, 0xB1B8BCB0, 0xA79EB8BC,
+ 0x7A7F76A2, 0x70777E71, 0x796E767D, 0x71796F73,
+ 0x6F70796F, 0x766D7179, 0x6E726C71, 0x696A6E68,
+ 0x4B456B6F, 0x29292347, 0x00080300, 0x05000A04,
+ 0x48463B08, 0x55515141, 0x6F5F6565, 0x7171616F,
+ 0x60717161, 0x685A7070, 0x6563586B, 0x4D636357,
+ 0x4D435959, 0x46433B4F, 0x113F3C37, 0x00001615,
+ 0x02000002, 0x00010101, 0x00000000, 0x08090700,
+ 0x2C373430, 0x4A403634, 0x52544849, 0x555A5C50,
+ 0x675C6161, 0x706C616B, 0x61726F61, 0x695E706F,
+ 0x6361566B, 0x535E5C51, 0x21205E5B, 0x08050725,
+ 0x00000000, 0x00000000, 0x00010000, 0x8A4C4B47,
+ 0x91889090, 0x90918790, 0x8D8E9188, 0x958C9193,
+ 0x95998E90, 0x8C93978B, 0x988C9698, 0x989C9094,
+ 0x94979B8F, 0x9C909CA0, 0x9A9E9298, 0x959DA195,
+ 0xA2939DA1, 0xA3A6979D, 0x90A2A393, 0xA3949FA0,
+ 0xA3A599A0, 0x94A0A296, 0xA599A0A3, 0x9EA394A1,
+ 0x979BA190, 0xA99AA4A7, 0xA6A99AA6, 0x99A0A498,
+ 0xB5A8A1A5, 0xAEB5A8AE, 0xA7AEB5A8, 0xB5A8ADB4,
+ 0xACB3A4AE, 0xA2ADB4A5, 0xB2A6AAB1, 0xB0B4A9AE,
+ 0xAAADB3A8, 0xB2A9AEB3, 0xADB3A8AD, 0xABB1B6AD,
+ 0xB0A7AFB4, 0xAAAEA8AB, 0xB5B0B4AF, 0xBEBCB4B7,
+ 0xC0C3C1BB, 0xBBC0C4BF, 0xBFB9BCC0, 0xBABEB8BB,
+ 0xBBBBC1BC, 0xC0BBBAC0, 0xBCC0BBBC, 0xB9BABEB9,
+ 0xBAB8BABE, 0xB7BAB8B7, 0xBABBBFBA, 0xC0BBBBBF,
+ 0xBBBFBABC, 0xBCBBBFBA, 0xBBB9BDC1, 0xB8BBB9B8,
+ 0xBDB8BDBB, 0xBFBDBABF, 0xBBC0BEBA, 0xBDBBC0BE,
+ 0xBFBDB9C0, 0xBABFBDBA, 0xBDB9C0BD, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBEBA,
+ 0xC0BABFC0, 0xBFBEBABF, 0xBAC0BFB9, 0xBFBAC0BF,
+ 0xBFBEBAC0, 0xB9BFBEB9, 0xC0B8C0C0, 0xBFBEB8C0,
+ 0xB9C0BDB9, 0xBEB5BBBA, 0xC0C0B9BF, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xC0BFBAC0, 0xB7BFBEB8, 0xC0B7BFBF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBBB8C0BF, 0xBFBFB4BC,
+ 0xB9C1C1B7, 0xC0B8C0BF, 0xC1C0B9C1, 0xBAC0BFBB,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB, 0xC0BBC1C0,
+ 0xC0BFBBC1, 0xBBC1C0BA, 0xC0BABFC0, 0xC0BFB8C0,
+ 0xBAC0BFBA, 0xBFBAC0BF, 0xBFC0BAC0, 0xBABFC0BA,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBCC1C0BC, 0xBFBBC1C0,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xC2B9C1C1, 0xC1C1BAC2,
+ 0xB8C0C0B9, 0xBEB6BEBE, 0xC1C2B6BE, 0xBCC1C2BC,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BC, 0xBFB8C0BF,
+ 0xC1C0B8C0, 0xBBC1C0BB, 0xC0B9C1C0, 0xC1C2B9C1,
+ 0xBABFC0BC, 0xC0BBC1C0, 0xC0BFBBC1, 0xBBC1C0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xBAC0BFB8, 0xBFBBC0BF,
+ 0xC1BEBBC0, 0xBAC1BEBA, 0xBEBBC0BE, 0xC1BCBBC0,
+ 0xBDC1BCBD, 0xC1C0C3C1, 0xC3C2C0C3, 0x8C9190BE,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5D5D, 0xC3C1BEC3,
+ 0xBEC3C1C0, 0xC0B8BEBD, 0xBFC2B8C0, 0xB8BFC2B8,
+ 0xC0B7BFBF, 0xC0C0B8C0, 0xB9C1C1B8, 0xBFB9C1C1,
+ 0xBFBFB7BF, 0xB8C0C0B7, 0xBFB8C0C0, 0xBFBFB7BF,
+ 0xB9C1C1B7, 0xC0B8C0C0, 0xC0C0B8C0, 0xB6BEBEB8,
+ 0xBEB8C0C0, 0xBEBEB6BE, 0xB6BEBEB6, 0xC1B7BFBF,
+ 0xC1C1B9C1, 0xB8C0C0B9, 0xC0B9C1C1, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B7BFBF, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0, 0xB9BEBFBA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBFC2B6C0, 0xB9C0C3B8, 0xC0B8C0C0, 0xBFC2B8C0,
+ 0xBABFC2BA, 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA,
+ 0xC1B8C0C0, 0xC0C0B9C1, 0xB9C1C1B8, 0xBBB8BEBD,
+ 0xC1C0B6BC, 0xB9BFBEBB, 0xBFB9BFBE, 0xBFBDBAC0,
+ 0xBBC0BEBA, 0xBEB9BFBE, 0xBFBDB9BF, 0xB6BBB9BA,
+ 0xBCB8BFBC, 0xBDBCB8BF, 0xB8BDBCB8, 0xB9B4B9B7,
+ 0xBCB7B6BB, 0xB6BAB5B8, 0xB7B6BAB5, 0xBAB8B6BC,
+ 0xB5BAB8B5, 0xB7B6BBB9, 0xBAB7B4B9, 0xB2B8B7B3,
+ 0xB9B3B8B7, 0xB8B9B5BA, 0xB4B9BAB4, 0xB1B2B8B7,
+ 0xBAB4ADB4, 0xB2B9B4B0, 0xAEB6BCB7, 0xA099AFB3,
+ 0xA3AAA399, 0xA1A0A89E, 0xABA2A5AA, 0xA1A69DA8,
+ 0x9C9CA499, 0xA79C9FA7, 0xA1A79CA1, 0x9B9FA398,
+ 0xA49BA2A6, 0xA0A499A1, 0x99A0A498, 0xA59AA1A5,
+ 0xA2A69BA1, 0x98A0A498, 0xA499A0A4, 0x9DA196A0,
+ 0x95A2A498, 0xA0919DA1, 0x9BA0919B, 0x90989C90,
+ 0x998E989C, 0x90948995, 0x82919589, 0x897D8A8E,
+ 0x83897E85, 0x78787C76, 0x7B79777D, 0x20211F7A,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x69484C46, 0x75686E74,
+ 0x6E75686E, 0x6F74786D, 0x7B727578, 0x777A7178,
+ 0x72777C73, 0x7D74777D, 0x7C81787A, 0x79798079,
+ 0x97927880, 0xBEC5BE91, 0xB1BEC3BA, 0xBBB0B6BC,
+ 0xB5BBB0B5, 0xB3B4BCB2, 0xBBB4B5BD, 0xBEC5BEB4,
+ 0xB7B5BCB5, 0xAEA9B7BE, 0xABAFAAAA, 0xB8AEB5AE,
+ 0xC0B9B8BF, 0xB9C0B9B9, 0xB5B6BAB5, 0xB2ACB8B9,
+ 0xAAAAA4B2, 0xA2A6A8A2, 0xA8A2A6A8, 0xA6A9A0A8,
+ 0x9EA7ACA3, 0xA79EA0A8, 0xA2A89DA2, 0x93A9ADA1,
+ 0x9D919DA2, 0xAAACA09B, 0xA1A6A89C, 0xA99DA9AD,
+ 0xA6ACA1A5, 0x9EA1A99F, 0xA8A19EA5, 0x9BA39CA0,
+ 0x9EA1A49B, 0xA99FA6A7, 0xA8A99FA8, 0x9DA4A89D,
+ 0xA89FA4A8, 0x9EA39AA5, 0xA1A1A8A1, 0xA8A1A0A8,
+ 0x8F968FA1, 0x838D958B, 0x8B80858D, 0x868C8185,
+ 0x9F989B92, 0xA7A1A5A8, 0xA4A6A0A5, 0xA7ADB0A7,
+ 0xB8AFADB0, 0xB5B8AFB5, 0xB1B7BCB3, 0xBDB0B6BC,
+ 0xB6BDB0B6, 0xB0B5BCAF, 0xBCB1B6BD, 0xB8BCB0B8,
+ 0xAFB4BAAF, 0xBCAFB5BC, 0xB5BCAFB5, 0xB0B8BCB0,
+ 0xBBAFB8BC, 0xB5BCAFB7, 0x9DB8BCB0, 0x8077A2A8,
+ 0x7B80777B, 0x70767C71, 0x7A70757B, 0x727A7072,
+ 0x6C6D766C, 0x756C6E76, 0x6F746B70, 0x6A696F6A,
+ 0x6F69696F, 0x4A4C466B, 0x00080300, 0x04000A04,
+ 0x48463B07, 0x49505040, 0x71615B5B, 0x70706071,
+ 0x60707060, 0x685A7070, 0x6664596B, 0x4D626157,
+ 0x4D435857, 0x48423B4F, 0x13403C37, 0x00001814,
+ 0x02000002, 0x00000000, 0x00000000, 0x08090700,
+ 0x37383531, 0x493F413F, 0x5254484A, 0x565A5C50,
+ 0x675C6262, 0x706D5F69, 0x61707060, 0x6B5F706F,
+ 0x6262566B, 0x535E5C51, 0x201F5E5B, 0x08050725,
+ 0x00020000, 0x00000000, 0x00010000, 0x8A4C4B47,
+ 0x91889090, 0x90918790, 0x8B8E9188, 0x968D8F91,
+ 0x90968B91, 0x8D95968C, 0x9D919799, 0x989C9099,
+ 0x939B9F93, 0x9F939B9F, 0x9B9F939B, 0x93989C90,
+ 0xA1959B9F, 0x9FA2939D, 0x90A3A395, 0xA2939E9E,
+ 0xA2A4989F, 0x96A1A397, 0xA4989EA2, 0xA0A596A0,
+ 0x919BA190, 0xA8999EA1, 0xA5A899A5, 0xA8A1A599,
+ 0xB4A9B0B4, 0xAEB5A8AE, 0xA4AEB5A8, 0xB1A2ACB3,
+ 0xAAB1A2AA, 0xA2ABB2A3, 0xB1A5AAB1, 0xB0B4A9AD,
+ 0xA9ADB3A8, 0xB2A9ADB2, 0xABB3A9AD, 0xAAB0B5AC,
+ 0xB0A9AEB3, 0xACB3ACA9, 0xB2B0B4AF, 0xB3B1B1B4,
+ 0xB5B8B6B0, 0xBEC3C4C0, 0xBEB8C1C2, 0xBCC0BABA,
+ 0xBBB9BFBA, 0xC0BBBAC0, 0xB8BCB7BC, 0xBDBABEB9,
+ 0xBAB8BEC2, 0xBABDBBB7, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBABEB9BB, 0xBBBCC0BB, 0xBCB7BCC0, 0xB8BCB7B8,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBBC0BEBA, 0xBDB9C0BD,
+ 0xC0BEB9C0, 0xBABFBDBB, 0xBDB9C0BD, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBEBA,
+ 0xC0B9BEBF, 0xBEBDB8C0, 0xB9BFBEB8, 0xBFBAC0BF,
+ 0xBCBDB8C0, 0xB7BFBFB7, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xB7BEBBBA, 0xBFB7BDBC, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFB9BFBE, 0xBFBEBAC0, 0xB5BDBCB7, 0xC0B9C1C1,
+ 0xC1C1B8C0, 0xB8C0C0B9, 0xBBB7BFBE, 0xC0C0B4BC,
+ 0xB8C0C0B8, 0xC1B8C0BF, 0xC2C1BAC2, 0xBBC1C0BC,
+ 0xC0BBC1C0, 0xC0BFBBC1, 0xBBC1C0BA, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xC1B8C0C0, 0xC0BFB9C1,
+ 0xBAC0BFBA, 0xC0BBC1C0, 0xC0C0BBC1, 0xB8C0C0B8,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBCC1C0BC, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xC1B8C0C0, 0xC0C1B9C1,
+ 0xBABFC0BB, 0xC1B6BEBE, 0xC1C2B9C1, 0xBDC2C3BC,
+ 0xC0BCC2C1, 0xC1C0BBC1, 0xBBC1C0BC, 0xC0BAC0BF,
+ 0xC1C0B9C1, 0xBBC1C0BB, 0xC0B9C1C0, 0xC0C1B9C1,
+ 0xBBC0C1BB, 0xBFBBC1C0, 0xC0BFBAC0, 0xBBC1C0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFBAC0BF,
+ 0xC1BEBBC0, 0xBAC1BEBA, 0xBEBBC0BE, 0xC1BCBBC0,
+ 0xBDC1BCBD, 0xC1C0C3C1, 0xC3C2C0C3, 0x8B908FBE,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5D5D, 0xC3C1BEC3,
+ 0xBFC4C2C0, 0xC1BAC0BF, 0xBDBDB9C1, 0xB0B8B8B5,
+ 0xC0B3BBBB, 0xBFC0B8C0, 0xBABFC0BA, 0xC0B7BFBF,
+ 0xBFC0B8C0, 0xB7BFBFBA, 0xC1B8C0C0, 0xBFBFB7C1,
+ 0xB7BFBFB7, 0xC0B8C0C0, 0xC0C0B8C0, 0xB6BEBEB8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC1C1B8C0,
+ 0xB8C0C0B9, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0B9C1C0, 0xC1C2B9C1, 0xB9C1C1BC, 0xBFB7BFBE,
+ 0xC0C1B8C0, 0xBBC0C1BB, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xB8B8C0C0, 0xB8B8B0B8, 0xB8C0C0B0, 0xBEBAC0BF,
+ 0xBFBEB9BF, 0xBAC0BFB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xBBC0BFBA, 0xBEB9BFBE, 0xBFBDB9BF, 0xB8BDBBBA,
+ 0xB9B6BCB7, 0xBCBCB6BB, 0xBCBEBEBA, 0xB5B7BCBA,
+ 0xBBB9B4BA, 0xB6BBB9B6, 0xB7B6BCB7, 0xBAB8B6BC,
+ 0xB5BCB9B5, 0xB7B6BBB9, 0xB8B6B4B9, 0xB4B9B7B3,
+ 0xBAB4B9B7, 0xBBBAB6BB, 0xB3B9B8B5, 0xB4B2B9B6,
+ 0xB6B3AEB7, 0xB2B9B6AF, 0xAEB6BCB7, 0x9F99ADB3,
+ 0xA5A9A39B, 0x9DA2A79E, 0xA89DA2A8, 0xA4A89DA4,
+ 0x99A1A79C, 0xA4999EA4, 0x9EA4999E, 0x9AA2A69B,
+ 0xA59AA1A5, 0x9EA4999F, 0x999DA497, 0xA4989FA6,
+ 0xA0A498A0, 0x97A1A599, 0xA2969FA3, 0x9EA2969E,
+ 0x939DA195, 0xA2939B9F, 0x969D8E9D, 0x8B989D8E,
+ 0x978B959A, 0x91958993, 0x85909489, 0x84788C90,
+ 0x7D837880, 0x77797D77, 0x7B79767C, 0x20211F7A,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x6A262723, 0x756A7073,
+ 0x70746871, 0x6D707468, 0x786D7478, 0x787B7274,
+ 0x74787D74, 0x7D74787D, 0x797C737A, 0x79798079,
+ 0x7F7A7880, 0x90979078, 0xB8BEC3BA, 0xBCB0BDC3,
+ 0xBFC5BAB8, 0xBCBDC5BB, 0xC6BCBEC6, 0xB7BCB3BE,
+ 0xA6AAAFA6, 0xAEA8AAAF, 0x9D9F99AC, 0xA29CA198,
+ 0xAAA1A6AB, 0xA6ABA2A5, 0xA2A8ABA2, 0xABA1A8AB,
+ 0xA9AAA0AA, 0xA0A6A9A0, 0xA89FA6A9, 0xA7AAA1A7,
+ 0x9DA2A79E, 0xA89DA2A8, 0xA7ADA2A2, 0x99A8ACA0,
+ 0xA195A3A8, 0xA9ADA19D, 0x9DA5A99D, 0xAA9EA5A9,
+ 0xA3A99EA6, 0x99A1A99F, 0xA7A099A0, 0x9EA59E9F,
+ 0x9DA7A89F, 0xA49AA8A7, 0xA6A79DA3, 0x9FA8A99F,
+ 0xA9A0A6AA, 0x9DA59BA4, 0xA1A0A8A1, 0xA9A29EA9,
+ 0xA0A8A1A1, 0xA1A1A8A1, 0xA99FA1A8, 0xA1A99FA1,
+ 0xA1A3A7A1, 0xA89FA5A7, 0xA5A89FA5, 0x9FA4A9A0,
+ 0xA99FA1A9, 0xA1A99FA1, 0xA5A0A99F, 0xAFA5A6AF,
+ 0xA9AEA5A7, 0xAAA9AEA5, 0xBBB2AFB5, 0xB8BCB1B8,
+ 0xAFB5BAB1, 0xC4B9B2BA, 0xBFC5BABC, 0xB5BEC4B9,
+ 0xC0B5BAC0, 0xC2CABFBA, 0x75B6BCB1, 0x81777880,
+ 0x7A817A79, 0x71737B71, 0x7B71737B, 0x737B7173,
+ 0x696E766B, 0x736A6C74, 0x6E736A6E, 0x6A696F6A,
+ 0x6F69696F, 0x2628226B, 0x00080300, 0x05000A04,
+ 0x48463B08, 0x49505040, 0x6F5F5D5B, 0x7171616F,
+ 0x5D707060, 0x6C5E6D6D, 0x6664596F, 0x4D606157,
+ 0x4C435657, 0x49433C51, 0x133F3B36, 0x01011814,
+ 0x02000003, 0x00000000, 0x01010001, 0x08090700,
+ 0x39373430, 0x4840413E, 0x5253494A, 0x54595D51,
+ 0x685A5E60, 0x706D5F69, 0x60707060, 0x6A606F6E,
+ 0x6261576B, 0x535E5C51, 0x22215E5B, 0x08050727,
+ 0x00020000, 0x00000000, 0x00010000, 0x8A4C4B47,
+ 0x91889090, 0x90918790, 0x8C8E9188, 0x958C9095,
+ 0x90968B90, 0x8B98998F, 0x998D9597, 0x989C9095,
+ 0x929B9F93, 0xA0949A9E, 0x9B9F939C, 0x909D9F93,
+ 0x9C909A9C, 0x9FA19598, 0x94A4A496, 0xA394A2A2,
+ 0x9FA293A0, 0x96A0A596, 0xA498A0A5, 0xA1A599A0,
+ 0x91A3A899, 0xA8999BA0, 0xABAFA3A3, 0xAAB0B4A9,
+ 0x847BB1B5, 0xA2A69B81, 0xA2AEB5A8, 0xB1A2AAB1,
+ 0xAAB2A1AA, 0xA2ACB3A4, 0xB0A1AAB1, 0xACB3A6A9,
+ 0xA9AFB3A7, 0xB3A8AEB4, 0xADB3A8AD, 0xA7B0B5AC,
+ 0xAFA9ABB0, 0xAFB3ADAB, 0xAEADB3AE, 0xB4AFADB3,
+ 0xB1B5B0B0, 0xBAB5B9B4, 0xC5C0BBBF, 0xC0C4BFC1,
+ 0xBABBC2BB, 0xC0BBBAC1, 0xB5BBB6BA, 0xB9B5BBB6,
+ 0xBBB6B8BE, 0xBABEB9B7, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBCC0BBBB, 0xB7BCC0BB, 0xBBB9B8BC, 0xBCBFBDB8,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDB9C0BD, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBEBA,
+ 0xBFB9BEBF, 0xC0BFB9BE, 0xB7BDBCBB, 0xBCB9BFBE,
+ 0xBFBFB7BD, 0xB8C0C0B7, 0xBFB8C0C0, 0xC1BEB8C0,
+ 0xB5BCB9BA, 0xBFB9BFBE, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBEB9BFBE, 0xBDBCB9BF, 0xB8BEBDB7, 0xC1B8C0C0,
+ 0xBFC0B9C1, 0xBAC0BFBA, 0xBFB7BFBE, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xC0B8C0BF, 0xC1C0B9C1, 0xBBC1C0BB,
+ 0xC0BCC2C1, 0xC0BFBBC1, 0xBBC1C0BA, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xB9C1C0B9, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xBBC1C0BB, 0xC0BBC1C0, 0xC1C1BBC1, 0xB9C1C1B9,
+ 0xC1BBC0C1, 0xC0C1BBC0, 0xBBC0C1BB, 0xC1BBC0C1,
+ 0xC1C0BBC0, 0xBAC0BFBB, 0xBFBBC1C0, 0xC1C0BAC0,
+ 0xBAC0BFBB, 0xC3B6BEBE, 0xC0C1BBC3, 0xBBC0C1BB,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xC0B9C1C0, 0xC0BFB9C1,
+ 0xBBC1C0BA, 0xBFB8C0BF, 0xC0C1B8C0, 0xBBC0C1BB,
+ 0xC0BBC1C0, 0xC1C1BBC1, 0xB8C0C0B9, 0xBFBABFC0,
+ 0xC1BEBAC0, 0xBAC1BEBA, 0xBEBBC0BE, 0xC1BCBBC0,
+ 0xBDC1BCBD, 0xC1C0C4BF, 0xC3C2C0C3, 0x8B908FBE,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5D5D, 0xC3C1BEC3,
+ 0xBEC3C1C0, 0xC0BAC0BF, 0xC0C0B8C0, 0xB5BDBDB8,
+ 0xBFB3BBBB, 0xBFC0B7BF, 0xBBC0C1BA, 0xC0B9C1C1,
+ 0xBFC0B8C0, 0xB8C0C0BA, 0xBFB8C0C0, 0xC1C1B7BF,
+ 0xB9C1C1B9, 0xC0B7BFBF, 0xC0C0B8C0, 0xB4BCBCB8,
+ 0xC0B8C0C0, 0xBEBEB8C0, 0xB8C0C0B6, 0xBFB8C0C0,
+ 0xC1C1B7BF, 0xB8C0C0B9, 0xBEB5BDBD, 0xC0C0B6BE,
+ 0xB8C0C0B8, 0xC1B8C0C0, 0xC0C0B9C1, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xBFB8C0BF, 0xC0C1B8C0, 0xBBC0C1BB, 0xC0B8C0BF,
+ 0xC0C1B9C1, 0xBABFC0BB, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xC0B9C1C1, 0xC0C0B8C0, 0xB9C1C1B8,
+ 0xAEB8C0C0, 0xA6A6A6AE, 0xB0B8B89E, 0xBCB7BCBD,
+ 0xBFBEB7BD, 0xB9BFBEB9, 0xBEB8BEBD, 0xBFBEB9BF,
+ 0xBABFBEBA, 0xBEB9BFBE, 0xBFBDB9BF, 0xBBC0BEBA,
+ 0xB9BABFBD, 0xBDBBB6BB, 0xBABFBDBA, 0xB7B6BCB7,
+ 0xB8B6B6BC, 0xB5BAB8B3, 0xB7B5BBB6, 0xBBB9B6BC,
+ 0xB2B9B6B6, 0xB9B3B8B6, 0xB9B7B6BB, 0xB3B8B6B4,
+ 0xB8B5BAB8, 0xBAB8B5BA, 0xB3BAB7B5, 0xB6B1B8B5,
+ 0xB7B4B0B9, 0xB2B9B4B0, 0xADB6BCB7, 0x9F99ADB4,
+ 0xA5AAA19B, 0xA1A5AAA1, 0xA79EA6AC, 0xA2A89DA2,
+ 0x9AA1A79C, 0xA4999FA5, 0x9EA4999E, 0x9CA1A59A,
+ 0xA59AA3A7, 0x9EA4999F, 0x989FA699, 0xA4989EA5,
+ 0xA0A498A0, 0x969FA397, 0xA1959EA2, 0x9EA2969D,
+ 0x95A0A498, 0xA3949DA1, 0x99A0919C, 0x8B989D8E,
+ 0x998D959A, 0x94988C95, 0x84909489, 0x887D8B8F,
+ 0x7D837884, 0x76777C73, 0x7B77787C, 0x20211F7A,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x22000100, 0x72692628,
+ 0x7074696F, 0x68707468, 0x786D7074, 0x72786D74,
+ 0x7273786F, 0x7C73767B, 0x7A7D7479, 0x787B8077,
+ 0x8079787F, 0x79807979, 0xB9A3A89F, 0xC4B8BEC4,
+ 0xC0C4B9C0, 0xB1C0C6BB, 0xBBB2B6BC, 0xA0A69BB6,
+ 0x898E9489, 0xA1988E94, 0x9EA1989E, 0xA2A7AAA1,
+ 0xACA3A8AB, 0xA8ABA2A9, 0xA2A8ACA1, 0xACA0A9AD,
+ 0xA8ACA0A8, 0xA0A6A9A0, 0xA9A0A6A9, 0xA6A9A0A6,
+ 0x9DA9ADA2, 0xA89DA2A8, 0xA5A99DA4, 0x99A3A79B,
+ 0xA79BA3A8, 0xA3A79BA3, 0x9DA5A99D, 0xAA9DA5A9,
+ 0x9EA499A3, 0x9C9EA39A, 0xA99F9EA6, 0xA3A89FA1,
+ 0x9FA8A99F, 0xA99FA8A9, 0xA6A79DA8, 0x9DA6A79D,
+ 0xA59AA4A8, 0xA0A89E9F, 0xA19FA89E, 0xA8A1A0A8,
+ 0xA0A8A1A0, 0xA1A1A8A1, 0xA8A1A1A8, 0xA1A8A1A1,
+ 0xA0A3A89F, 0xA89FA6A9, 0xA5A89FA5, 0x9FA3A89F,
+ 0xA99FA1A9, 0xA0A99FA1, 0x9FA0A99F, 0xAAA0A0A9,
+ 0xA3A89FA2, 0x9EA3A89F, 0xA89FA3A9, 0xA9AFA4A5,
+ 0x9EACB1A8, 0xA99EA1A9, 0xABB1A6A3, 0xB5B6BCB1,
+ 0xC9BEBAC0, 0xB3BBB0C3, 0x76788075, 0x81777880,
+ 0x78807679, 0x6E737B71, 0x796E7179, 0x767C7173,
+ 0x6F73796E, 0x736A747A, 0x6D706770, 0x6A697069,
+ 0x4B45696F, 0x03050047, 0x00080300, 0x05000804,
+ 0x48463B08, 0x4B505040, 0x70605B5B, 0x706F6170,
+ 0x5E707060, 0x685A6D6C, 0x6664596B, 0x4D606157,
+ 0x4D435657, 0x48423B4F, 0x133F3C37, 0x00001614,
+ 0x02000002, 0x00000000, 0x00000001, 0x08090700,
+ 0x39373430, 0x4840413E, 0x5253494A, 0x555A5B51,
+ 0x685D5F61, 0x6E6D5F6A, 0x61706F61, 0x6A60706F,
+ 0x6261576B, 0x525E5C52, 0x20215D5A, 0x09060825,
+ 0x00000000, 0x00000000, 0x00010000, 0x884C4B47,
+ 0x91889091, 0x90918790, 0x8B8E9188, 0x958C8F94,
+ 0x95998E90, 0x8D97988E, 0x988C9799, 0x95998D94,
+ 0x90989C90, 0x9F93989C, 0x9DA1959B, 0x939FA195,
+ 0x9C909D9F, 0x979B8F98, 0x949DA091, 0xA495A0A3,
+ 0x9DA293A1, 0x969EA394, 0xA498A0A5, 0xA0A498A0,
+ 0x99A3A899, 0xA79BA3A8, 0xB2B6AAA3, 0x7B909489,
+ 0xB5AA8286, 0xB0B4A9B1, 0xA2ACB3A6, 0xAFA0AAB1,
+ 0xAAB1A2A8, 0xA1ACB3A4, 0xB4A5A9B0, 0xABB2A3AD,
+ 0xA7ADB4A7, 0xB3A8ADB4, 0xADB3A8AD, 0xA7AFB5AA,
+ 0xB3AAABB0, 0xB1B5AFAE, 0xADB0B4AE, 0xB4AFADB4,
+ 0xB0B4AEB0, 0xAFB0B4AF, 0xBFBAB0B4, 0xC0C4BFBB,
+ 0xBABDC4BD, 0xBCB7BAC1, 0xB6BCB7B6, 0xB2B5BBB6,
+ 0xBBB6B1B7, 0xBABEB9B7, 0xBABBBFBA, 0xC0BBBBBF,
+ 0xBBBFBABC, 0xB7B8BCB7, 0xBFBDB8BC, 0xBCBFBDBC,
+ 0xBDB8BDBB, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBEB9BFBE, 0xBEBDB9BF, 0xB8BDBCB9, 0xBDB5BCB9,
+ 0xBFC0B8BE, 0xB8C0C0BA, 0xBFB8C0BF, 0xBEBCB8C0,
+ 0xB7BEBBB9, 0xBFB7BFBE, 0xC0C0B8C0, 0xB8C0BFB8,
+ 0xBAB9BFBE, 0xBFBEB5BB, 0xBAC0BFB9, 0xC0B9C1C1,
+ 0xBFBEB8C0, 0xB9BFBEB9, 0xBFBAC0BF, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xBFB8C0BF, 0xC1C0B8C0, 0xBBC1C0BB,
+ 0xBFBBC1C0, 0xC0BFBAC0, 0xBBC1C0BA, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xB9C1C0B8, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xBBC1C0BB, 0xC0BBC1C0, 0xC0C0B9C1, 0xB8C0C0B8,
+ 0xC1B8C0C0, 0xC0C1BBC0, 0xBABFC0BB, 0xC1BBC0C1,
+ 0xC1C0BBC0, 0xBAC0BFBB, 0xC0BAC0BF, 0xC1C0B9C1,
+ 0xB9C1C0BB, 0xC2B6BEBE, 0xC1C2BAC2, 0xBCC1C2BC,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB, 0xC0BCC2C1,
+ 0xC1C0BBC1, 0xBAC0BFBB, 0xBEB9C1C0, 0xC1C0B7BF,
+ 0xBAC0BFBB, 0xBFB8C0BF, 0xC0C1B8C0, 0xBBC0C1BB,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xB8C0C0BB, 0xBFBABFC0,
+ 0xC1BEBAC0, 0xBAC1BEBA, 0xBEBBC0BE, 0xC1BCBBC0,
+ 0xBDC1BCBD, 0xC1C0C4BF, 0xC3C2C0C3, 0x8B908FBE,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5D5D, 0xC3C1BEC3,
+ 0xBEC3C1C0, 0xBFBAC0BF, 0xBFBFB7BF, 0xB9C1C1B7,
+ 0xC0BABFC0, 0xBFC0BABF, 0xBBC0C1BA, 0xC1BBC0C1,
+ 0xC0BFBBC0, 0xB8C0BFB8, 0xC0B9C1C1, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B9C1C1, 0xBFBFB8C0, 0xB8C0C0B7, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xB9BEBFBA, 0xC0B7BFBF, 0xC1C1B8C0,
+ 0xB8C0C0B9, 0xC1B9C1C1, 0xBFC0B9C1, 0xBABFC0BA,
+ 0xBFBBC1C0, 0xBFC0BAC0, 0xBABFC0BA, 0xBEB8C0BF,
+ 0xC0C1B7BF, 0xBABFC0BB, 0xBFB8C0BF, 0xC0C1B8C0,
+ 0xBABFC0BB, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xB3C0C7CA, 0xA5A8A9B0, 0xA9B1B19E, 0xBDB5BABB,
+ 0xC0C0B7BC, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xBAC0BFBA, 0xBDBAC0BF, 0xBEBDB8BE, 0xB8BDBCB9,
+ 0xBBB9BFBE, 0xBBB9B7BE, 0xB8BEB9B6, 0xB8B5BBB6,
+ 0xBBB8B6BD, 0xB4B9B7B4, 0xB5B4BAB5, 0xB9B7B4BA,
+ 0xB5BAB8B4, 0xB2B7BBB6, 0xACA7B3B7, 0xB8BCB7A8,
+ 0xB7B8BCB7, 0xBCB7B6BC, 0xB4BBB6B6, 0xB6B3BAB5,
+ 0xB7B2B4BB, 0xB0B7B2B0, 0x96B1B8B1, 0x928998A0,
+ 0xA8ADA48D, 0xA1A2AAA0, 0xA9A2A3AB, 0xA1A99FA2,
+ 0x9C9FA79C, 0xA5989FA7, 0x9DA4979E, 0x939B9F93,
+ 0xA1969B9F, 0x9DA1969D, 0x919DA195, 0xA1959BA0,
+ 0xA0A4989D, 0x969EA598, 0xA4959CA3, 0x9AA1929D,
+ 0x939CA396, 0xA19599A0, 0x989C909D, 0x89959C8D,
+ 0x988C9198, 0x90948994, 0x88909188, 0x8B828E91,
+ 0x80867B88, 0x71767C71, 0x7A74787C, 0x20211D78,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x4F4B0001,
+ 0x75786F4E, 0x676F7368, 0x7B6F6F73, 0x767C7177,
+ 0x71767B72, 0x7C73757A, 0x7A7D7479, 0x777E8277,
+ 0x81787E82, 0x7E81787E, 0xA98C9287, 0xB4A9AEB4,
+ 0xB0B4A9B0, 0x9DA9ADA2, 0xA99EA5A9, 0xA0A499A5,
+ 0x829CA095, 0x988F898D, 0x9C9F9695, 0xA0A8A9A0,
+ 0xA9A0A8A9, 0xA4A79EA8, 0x9FA5A99E, 0xA79AA4AA,
+ 0xA3AA9DA0, 0x9D9EA39A, 0xA49BA1A6, 0xA3A69D9F,
+ 0x9BA3A79C, 0xA79BA3A7, 0xA0A498A5, 0x99A3A79B,
+ 0xA498A1A5, 0xA0A498A0, 0x989EA598, 0xA5989EA5,
+ 0x9EA5989E, 0x999EA499, 0xA89D9EA4, 0xA3A79CA2,
+ 0xA1A7A99D, 0xACA0ABAD, 0xA5A99DAA, 0x9BABADA1,
+ 0xA79BA5A7, 0xA1A79CA3, 0xA1A2A89D, 0xAAA1A5AA,
+ 0xA5AAA1A5, 0xA1A6A9A0, 0xA39AA7AA, 0x9FA49B9E,
+ 0xA0A5A99E, 0xA99EA7AB, 0xA8ACA1A5, 0xA2A7ABA0,
+ 0xA79CA7AD, 0xA1A79CA1, 0x9EA2A89D, 0xA99EA3A9,
+ 0xA8ACA1A3, 0xA1A5A99E, 0xA79CA9AD, 0xA1A89BA1,
+ 0x9EA3A99E, 0xA79CA3A9, 0xA3A79CA3, 0x98A0A498,
+ 0xB4A8A0A4, 0x969C91B0, 0x74787E73, 0x7C73787D,
+ 0x787D7477, 0x70767C71, 0x796D767D, 0x75796D75,
+ 0x6B74786D, 0x756B7174, 0x6D706774, 0x64666A64,
+ 0x0400666A, 0x02040000, 0x01070400, 0x03000904,
+ 0x4A483E07, 0x4B504F41, 0x6F5F5B5B, 0x7070606F,
+ 0x63737062, 0x6B5D7471, 0x6867596E, 0x4F606458,
+ 0x4F47565A, 0x48443F51, 0x13403F3B, 0x00001415,
+ 0x00000000, 0x00000000, 0x01010000, 0x090A0801,
+ 0x3A383832, 0x4A454040, 0x57544F4D, 0x5C606158,
+ 0x6C626566, 0x7371676D, 0x6A767469, 0x6D637775,
+ 0x6261576F, 0x5A626157, 0x2323625F, 0x08050725,
+ 0x00000000, 0x00000000, 0x00010000, 0x874A4B47,
+ 0x91888F90, 0x90918790, 0x8A8C8F86, 0x99908E93,
+ 0x95998E96, 0x8F98998F, 0x9C90999B, 0x979B8F98,
+ 0x8D909788, 0x9F90959C, 0x9EA3949A, 0x939DA293,
+ 0xA3949DA2, 0x9DA2939E, 0x8F9AA08F, 0xA3929AA0,
+ 0xA0A6959D, 0x98A0A798, 0xA798A0A7, 0xA2A798A2,
+ 0xA2A8AFA0, 0xAEA3A8AF, 0x72786DA8, 0xA2585E53,
+ 0xAFA0A8AF, 0xA8AFA0A8, 0xA4AAB1A4, 0xB1A4AAB1,
+ 0xAAB1A4AA, 0xA3A9B0A3, 0xAFA3A9B0, 0xAFB6A9AB,
+ 0xA7ADB4A7, 0xB4A9ADB4, 0xAEB4A9AE, 0xA5ABAFA4,
+ 0xB3A8ACB0, 0xAEB4A9AF, 0xACB0B5AC, 0xB4AEB0B5,
+ 0xB0B5ACB0, 0xAEAEB5AE, 0xB4AFAEB5, 0xB3B9B4AE,
+ 0xBFBEC5BE, 0xBDB8BFC6, 0xB7BCBAB7, 0xB6B8BCB7,
+ 0xBFBAB7BB, 0xBABEB9BB, 0xBBBABDBB, 0xBFBDBABD,
+ 0xB9BCBABC, 0xB9B8BCB7, 0xBFBDBABE, 0xBBBEBCBC,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBAB9BFBA,
+ 0xBFBAB9BF, 0xB9BFBABB, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBBC0BEBA, 0xBDBABFBD, 0xBFBDBABF, 0xBBC0BEBA,
+ 0xBFB9BFBE, 0xBEBDBAC0, 0xB6BBB9B9, 0xBEB8BEBD,
+ 0xBEBFB9BF, 0xB9BEBFB9, 0xBEB7BFBE, 0xBBB9B7BF,
+ 0xB9C0BDB6, 0xBFB8C0BF, 0xBFBEB8C0, 0xB9BFBEB7,
+ 0xBABABFBE, 0xC1C0B6BB, 0xBABFC0BB, 0xBFBAC0BF,
+ 0xBDBCBAC0, 0xBAC0BFB7, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBFBAC0BF, 0xC0BEBAC0, 0xBAC0BFBB,
+ 0xBFBBC1C0, 0xC1C2B7BF, 0xBBC0C1BC, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xB8C0BFB9, 0xC0BAC2C1, 0xC1C0B9C1,
+ 0xBBC1C0BB, 0xBFB8C0C0, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xBAC0BFBA, 0xC0B8C0C0,
+ 0xC1C1B8C0, 0xB8C0C0B9, 0xC0B5BDBD, 0xC0C0B6C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC1C0B8C0, 0xBCC2C1BB,
+ 0xC0B9C1C0, 0xC0C1B9C1, 0xBBC0C1BB, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xBFB8C0BF, 0xBFBEB8C0,
+ 0xB8C0BFB7, 0xC0B9BFBE, 0xBFC0BBC1, 0xBBC1C0BA,
+ 0xBEBCC1BF, 0xC0BFBAC1, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xC2BFBAC0, 0xBAC1BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBDC0BEBB, 0xC1BEC1BF, 0xC1C0BFC1, 0x898D8EBC,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5D5D, 0xC3C1BEC3,
+ 0xBEC3C1C0, 0xC0BAC0BF, 0xC0C0B8C0, 0xB9C1C1B8,
+ 0xC1BABFC0, 0xC0C1BBC0, 0xBBC0C1BB, 0xC1BBC0C1,
+ 0xC1C0BBC0, 0xB8C0BFB9, 0xC0BBC0C1, 0xC0C0BABF,
+ 0xB8C0C0B8, 0xBFB8C0C0, 0xBFBFB7BF, 0xB8C0C0B7,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B7BFBF, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xBEB6BEBE, 0xBEBEB6BE, 0xB8C0C0B6,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xB9BEBFBA, 0xC0B7BFBF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B9C1C1, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0BBC1C0, 0xC0C1BBC1, 0xBBC0C1BB, 0xC0B9C1C0,
+ 0xC1C2B9C1, 0xBABFC0BC, 0xBFB9C1C0, 0xC0C1B8C0,
+ 0xBBC0C1BB, 0xC0B9C1C1, 0xC0C0B8C0, 0xB9C1C1B8,
+ 0xBFC0C7CA, 0xB0B3B5BC, 0xAAB1B4A9, 0xC0B2B7B8,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFBEB8C0,
+ 0xB9BFBEB9, 0xBFBAC0BF, 0xBFBEBAC0, 0xB8BDBCBA,
+ 0xBFB9BFBE, 0xBAB8BAC0, 0xB6BCB7B5, 0xB6B6BDB8,
+ 0xBBB8B4BB, 0xB5BAB8B4, 0xB8B7BBB6, 0xBAB8B9BD,
+ 0xB4B9B7B5, 0xB2B9BDB8, 0xB6B1B3B7, 0xB8BCB6B2,
+ 0xB6B9BDB7, 0xBCB7B8BC, 0xB5BBB6B6, 0xB4B3BBB4,
+ 0xB8B3B3BB, 0xAFB6B1B1, 0x96B1B8B1, 0x948998A0,
+ 0xA7ADA28E, 0xA1A2AAA0, 0xA9A2A1A8, 0xA2AAA0A2,
+ 0x9EA0A89E, 0xA79CA1A9, 0xA1A89BA1, 0x939FA397,
+ 0x9F949B9F, 0x9B9F939B, 0x93A0A596, 0xA1959DA2,
+ 0x9DA1959D, 0x959AA194, 0xA3949DA4, 0x9AA4949C,
+ 0x9399A093, 0x9F9399A0, 0x989D8E9B, 0x8A959C8D,
+ 0x94889299, 0x94988D90, 0x87909188, 0x8C838F90,
+ 0x80867B89, 0x70787C70, 0x7B72787C, 0x20211D78,
+ 0x01000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x28260000,
+ 0x76787227, 0x676F7368, 0x7D716F73, 0x787C7179,
+ 0x72767B72, 0x7B72767B, 0x7A7D7476, 0x737C7D73,
+ 0x7D747C7D, 0x7E81787C, 0xAA8E9287, 0xA89DAFB5,
+ 0xA4A89DA4, 0xA0A7AB9F, 0xACA0A8AC, 0xA8ACA0A8,
+ 0xA0A6AA9F, 0x9F96A7AB, 0xA6A9A09C, 0xA0A7A89F,
+ 0xA9A0A9AA, 0xA4A89DA8, 0x9BA5A99E, 0xA89BA0A6,
+ 0xA3AA9DA1, 0x9DA2A89D, 0xA49BA2A8, 0xA3A79C9F,
+ 0x9BA5A99D, 0xA69AA5A7, 0xA2A498A4, 0x9BA5A99D,
+ 0xA99DA3A7, 0xA5A99DA5, 0x9DA2A99C, 0xA89BA3AA,
+ 0x9EA598A1, 0x9BA3A79B, 0xA69AA3A7, 0xA0A498A2,
+ 0x98A0A498, 0xA79BA0A4, 0xA6AA9EA3, 0x9BA4A89C,
+ 0xADA1A3A7, 0xA4A89CA9, 0x9DA4A89D, 0xA79EA4A8,
+ 0xA4A79EA4, 0x9FA6A9A0, 0xA9A0A5A8, 0xA2A89DA6,
+ 0x9CA3A79B, 0xA99EA4A8, 0xA6AA9FA5, 0x9EA5A99E,
+ 0xA99EA5A9, 0xA2A69BA5, 0x9BA3A79B, 0xA69AA3A7,
+ 0xA5A99DA2, 0x9DA3A79B, 0xADA0A5A9, 0xA1A89BA6,
+ 0x9A9FA397, 0xADA2A2A6, 0xA5A99DA9, 0x96A8AD9E,
+ 0xACA0A0A5, 0x9FA397A8, 0x747E837A, 0x7D74787D,
+ 0x73796E78, 0x7075796E, 0x7A6B787C, 0x73776B75,
+ 0x6C727369, 0x736A7475, 0x6E716872, 0x20686A64,
+ 0x04002226, 0x02040000, 0x00070400, 0x04000803,
+ 0x4C494108, 0x4B4E4E40, 0x70605A5B, 0x70706070,
+ 0x5E737062, 0x6D5E6F6C, 0x67665870, 0x50606458,
+ 0x4F4A575B, 0x47443F52, 0x11403F3B, 0x01001415,
+ 0x00000000, 0x00000000, 0x00000000, 0x08090700,
+ 0x30363832, 0x403B3839, 0x58535044, 0x5D615E59,
+ 0x6C646566, 0x7271676E, 0x6977756B, 0x6E647674,
+ 0x67665C70, 0x5A606158, 0x23236060, 0x08050725,
+ 0x00000001, 0x00000000, 0x00010000, 0x8A4A4B47,
+ 0x91888E90, 0x90918790, 0x8A90938A, 0x92898E93,
+ 0x9699908F, 0x8F999A90, 0x9C90999B, 0x989C9098,
+ 0x8C989F90, 0x998D949B, 0x95998D95, 0x93989C90,
+ 0xA1929DA2, 0x9DA2939C, 0x919EA493, 0xA4939EA4,
+ 0x9FA5949E, 0x98A0A798, 0xA798A0A7, 0xA2A798A2,
+ 0xA3A8AFA2, 0x4237A8AE, 0x3C42373C, 0xA0A8AFA2,
+ 0xAE9FA8AF, 0xA8AFA0A7, 0xA4AAB1A4, 0xB1A4AAB1,
+ 0xA9B0A3AA, 0xA3ABB2A5, 0xAFA3A9B0, 0xABB2A5AB,
+ 0xA7ADB4A7, 0xB1A8AAB2, 0xAEB4A9AC, 0xA5ABAFA4,
+ 0xB4A8ADB1, 0xB0B4A8B0, 0xACB0B6AB, 0xB5ACB0B5,
+ 0xB0B5ACB0, 0xACAEB6AC, 0xB4ADAEB6, 0xAEB5AEAD,
+ 0xB6B1B8B1, 0xBDB8B6BD, 0xB8BEB9B7, 0xB7BCC0BB,
+ 0xBFBAB8BC, 0xBBBFBABB, 0xBCBABDBB, 0xBDBBBBBE,
+ 0xBABDBBBA, 0xBBB8BCB7, 0xBFBDBCC0, 0xBABDBBBC,
+ 0xB9B8BCB7, 0xBFBABABE, 0xBBBFBABB, 0xBAB9BFBA,
+ 0xBFBAB9BF, 0xBBBFBABB, 0xBEB9BEBC, 0xBFBDBBC0,
+ 0xB9BEBCBA, 0xBCBABFBD, 0xC0BEB9BE, 0xB8BDBBBB,
+ 0xBBBABFBD, 0xBBB9B8BD, 0xB8BDBBB6, 0xBEB8BEBD,
+ 0xBFC0B9BF, 0xBABFBEBB, 0xBBB9BFBE, 0xBFBCB7BE,
+ 0xB9C0BDB8, 0xBEB7C0BD, 0xBFBEB7BF, 0xB9BFBEB9,
+ 0xBDB8BDBB, 0xBFC0B9BE, 0xBABFC0BA, 0xBCBBC1C0,
+ 0xBFBEB7BD, 0xBAC0BFB9, 0xBFBBC0BF, 0xC0BFBBC0,
+ 0xBAC0BFBA, 0xBEBAC0BF, 0xC0BEBAC1, 0xBBC0BEBB,
+ 0xC0BAC0BF, 0xC0C1B8C0, 0xBBC0C1BB, 0xC0BCC2C1,
+ 0xC1C0BBC1, 0xB8C0BFB9, 0xBFB8C0BF, 0xC0BFB8C0,
+ 0xBBC1C0BA, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xB9BFBEBA, 0xC0B8C0C0,
+ 0xC1C1B6C0, 0xB8C0C0B9, 0xC0B0BABA, 0xC0C0B6C0,
+ 0xB3BDBDB6, 0xC0B9C1C1, 0xC0BFB8C0, 0xBAC0BFBA,
+ 0xBFB8C0BF, 0xBFC0B8C0, 0xBABFC0BA, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xBFB8C0BF, 0xC0BFB8C0,
+ 0xB7BFBEB8, 0xBDB9BFBE, 0xC0C1B8BE, 0xBAC0BFBB,
+ 0xBFBBC0BE, 0xC1BEBCC1, 0xBAC0BFBA, 0xBEBAC0BF,
+ 0xC0BDB9BF, 0xBAC1BEB9, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBDC0BEBB, 0xC0C0C0C0, 0xC0C1C0C0, 0x898D8EBE,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000100, 0xC15B5D5D, 0xC3C1BEC3,
+ 0xBEC3C1BE, 0xC0BAC0BF, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0BAC0BF, 0xC1C0BBC1, 0xBBC1C0BB, 0xC1BBC1C0,
+ 0xC1C0BCC2, 0xBBC1C0BB, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xB9C1C0B9, 0xC0B8C0C0, 0xC0C0B8C0, 0xB9C1C1B8,
+ 0xC0B8C0C0, 0xBFBFB8C0, 0xB8C0C0B7, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xB7BCBDBA, 0xC0B7BFBF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC1B9C1C1, 0xC0C1B9C1, 0xBBC0C1BB,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C1B8C0, 0xBABFC0BB, 0xC0B9C1C1, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xBFBABFC0, 0xBFC0B9BE, 0xBBC0C1BA,
+ 0xBFC0C7CA, 0xB0B3B5BC, 0xACB1B4AB, 0xC0B0B8B8,
+ 0xC0C0B8C0, 0xB6C0C0B8, 0xC0B8C0C0, 0xBFBEB8C0,
+ 0xB9BFBEB9, 0xBFB7BFBF, 0xBFBEB9BE, 0xB8BDBCBA,
+ 0xBEB9BFBE, 0xC0BEB9BF, 0xB8BDBBBB, 0xB8B5BCB7,
+ 0xBAB8B6BD, 0xB6BBB9B5, 0xB7B8BCB7, 0xBDB8B8BC,
+ 0xB8BCB7B9, 0xB7B1B7B2, 0xBCB6B6BC, 0xB9BDB7B8,
+ 0xB4B6BDB6, 0xBBB5B6BE, 0xB5BCB5B7, 0xB2B3BAB5,
+ 0xB7B4B0B7, 0xB6BDB8B0, 0x96B0B7B0, 0x948998A0,
+ 0xA7ADA28E, 0x9FA0A89E, 0xAAA1A1A9, 0xA3A89FA5,
+ 0x9CA1A69D, 0xA79CA1A7, 0xA3A79CA3, 0x94A0A498,
+ 0xA1959CA0, 0x9B9F939D, 0x9499A091, 0xA4989CA3,
+ 0x9DA195A0, 0x929DA293, 0xA1929AA1, 0x9AA2919A,
+ 0x919DA293, 0x9F909BA0, 0x9CA1929A, 0x8A979C8D,
+ 0x93879499, 0x92938991, 0x83929088, 0x857C8B8C,
+ 0x7D817682, 0x71787C70, 0x7C73787C, 0x1F201C79,
+ 0x01000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x02000000,
+ 0x27282401, 0x67787B72, 0x73686E72, 0x6F73686F,
+ 0x7473786F, 0x7A71767A, 0x767B7275, 0x767B7F74,
+ 0x81787F80, 0x7E817880, 0xA98E9287, 0xA89DAEB4,
+ 0xA6A79DA4, 0x9DA5A99D, 0xA99DA5A9, 0xA6AA9EA5,
+ 0xA1A7A89E, 0xA9A0A9AA, 0xA8A9A0A8, 0x9CA4A89D,
+ 0xA89DA4A8, 0xA4A89CA4, 0x9DA3A79B, 0xAA9EA5A9,
+ 0xA3A79BA6, 0x999FA699, 0xA4999FA6, 0xA0A498A0,
+ 0x98A3A79B, 0xA498A0A4, 0xA0A498A0, 0x98A0A498,
+ 0xA498A0A4, 0xA0A498A0, 0x95A0A596, 0xA5969FA4,
+ 0xA1A697A0, 0x9CA5A99D, 0xA79BA4A8, 0xA5A99DA5,
+ 0x9CA5A99D, 0xA89BA2A9, 0x9EA598A1, 0x989EA598,
+ 0xA79BA0A4, 0xA7A99DA3, 0x9DA7ABA0, 0xA69DA4A8,
+ 0xA1A49BA3, 0x9EA1A59A, 0xABA0A5A9, 0xA5A99EA7,
+ 0x99A7A99D, 0xA498A5A8, 0xA0A498A0, 0x9EA3A79B,
+ 0xA99DA6AA, 0xA3A79BA5, 0x9DA5A99D, 0xA79BA5A9,
+ 0xA1A599A3, 0x9BA3A79B, 0xAB9CA3A7, 0xA4A99AA6,
+ 0x97A4A89C, 0xA4989FA3, 0xA5A99DA0, 0x9FA8AD9E,
+ 0xACA0A9AE, 0xA8ACA0A8, 0x707E837A, 0x79707479,
+ 0x777B7076, 0x6D73776C, 0x7B6F7579, 0x77796D79,
+ 0x6B73746A, 0x71687374, 0x797B7570, 0x00464842,
+ 0x05000004, 0x02030000, 0x00070400, 0x03000A03,
+ 0x4B484007, 0x56504F41, 0x6F606666, 0x726F6072,
+ 0x61737061, 0x6C5D7370, 0x6867596F, 0x4F626458,
+ 0x4E495859, 0x47443F51, 0x11403F3B, 0x01001415,
+ 0x00010000, 0x00000000, 0x00000000, 0x08090700,
+ 0x3137382F, 0x4A453B39, 0x5853504E, 0x65625F5A,
+ 0x70676B6B, 0x7372686F, 0x6976746A, 0x6D637674,
+ 0x68675D6F, 0x5B606158, 0x22226161, 0x08050724,
+ 0x01000001, 0x00000000, 0x00010000, 0x8A4A4B47,
+ 0x91888E90, 0x90918890, 0x8C92958C, 0x958C9095,
+ 0x94958C92, 0x8F969990, 0x9C91969A, 0x989C9098,
+ 0x8C9A9F90, 0x9E93969B, 0x9A9E939A, 0x909B9F94,
+ 0x9F93989C, 0x9DA2939D, 0x939FA594, 0xA4939CA4,
+ 0x9AA08F9E, 0x98A0A897, 0xA798A0A7, 0xA2A69AA2,
+ 0x0172776E, 0x4237050A, 0xA9B0A33C, 0xA0A7AE9F,
+ 0xAFA0A8AF, 0xA8AFA0A8, 0xA5A7AEA1, 0xB1A4ABB2,
+ 0xABB2A3AA, 0xA1AAAFA0, 0xB0A4ABB0, 0xAEB5A8AC,
+ 0xAAADB3A8, 0xB2A9ACB4, 0xACB2A7AD, 0xA5A8ACA1,
+ 0xB4A8ADB1, 0xB0B4A8B0, 0xA9B2B6AB, 0xB3AAB0B4,
+ 0xB0B5ACAE, 0xACB0B5AC, 0xB5ACB0B5, 0xB0B5ACB0,
+ 0xB1B0B8AE, 0xB6B1B1B8, 0xC1C5C0B2, 0xB6BCC0BB,
+ 0xBFB9B8BC, 0xBBBFBABB, 0xBABBC0BE, 0xBEBCB7BC,
+ 0xB6BBB9B9, 0xBBBABEB9, 0xC0BEBCC0, 0xB8BBB9BD,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBBBAC0BB, 0xBFBDBAC0,
+ 0xBCBFBDBC, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xB8B8BDBB, 0xBDBBB5BA, 0xBABFBDB8, 0xBBBABFBD,
+ 0xBFBEB8BD, 0xBABFBEBA, 0xBBB8BDBB, 0xC0BDB7BE,
+ 0xB9C0BDB9, 0xBCB9C0BD, 0xBFBEB8BF, 0xB9BFBEB9,
+ 0xBEB7BDBC, 0xBFC0B9BF, 0xBABFC0BA, 0xBCB9BFBE,
+ 0xC0BFB7BD, 0xB8BEBDBA, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBD,
+ 0xBFBAC0BF, 0xC0BFB8C0, 0xBBC1C0BA, 0xC1BCC1C2,
+ 0xC0BFBBC0, 0xB8C0BFB8, 0xBFB8C0BF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0BFB8C0, 0xB9BFBEBA,
+ 0xBFB8C0BF, 0xC1C0B8C0, 0xBAC0BFBB, 0xBFB8C0BF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B3BBBB, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC1B8C0C0, 0xBFC0B9C1, 0xB9BEBFBA,
+ 0xC0B7BFBF, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BABFC0,
+ 0xBFC0BABF, 0xBABFC0BA, 0xBFB8C0BF, 0xBEBDB8C0,
+ 0xBAC0BFB8, 0xBCB8C0BF, 0xBFBEB5BD, 0xB8BEBDB9,
+ 0xBEBCC1BF, 0xBFBDBBC0, 0xBBC0BEBA, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB8BEBDB9, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBDC0BEBB, 0xC0C0C0C0, 0xC0C1C0C0, 0x8B8D8EBE,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000100, 0xC2595E5D, 0xC3C1BEC3,
+ 0xBDC4C1BE, 0xC0B8C0BF, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB, 0xC1BBC1C0,
+ 0xC1C0BCC2, 0xBAC0BFBB, 0xC0BBC1C0, 0xC0BFBBC1,
+ 0xB9C1C0B8, 0xC0B8C0C0, 0xBFBFB8C0, 0xB8C0C0B7,
+ 0xC0B8C0C0, 0xBEBEB8C0, 0xB8C0C0B6, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB9C1C1B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBEBFB8C0, 0xB5BABBB9, 0xC0B7BFBF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C1B8C0, 0xBABFC0BB, 0xC1BAC2C2, 0xC0C1B9C1,
+ 0xBBC0C1BB, 0xC0BBC0C1, 0xBFC0BABF, 0xBABFC0BA,
+ 0xBFB6BDC0, 0xB0B3B5BC, 0x9FA4A7AB, 0xC0B0B8B8,
+ 0xC0C0B8C0, 0xB7C1C1B6, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xBAC0BFBA, 0xBFB8C0C0, 0xBFBEB7BF, 0xB8BDBCBA,
+ 0xBEB9BFBE, 0xBEBBB9BF, 0xB8BDBBB7, 0xBAB7BEBB,
+ 0xBAB8B6BD, 0xB4B9B7B5, 0xB7B7BBB6, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xADB1B7B2, 0xB7B1ACB2, 0xB8BCB6B3,
+ 0xB5B6BDB6, 0xBBB5B5BC, 0xB5BCB5B7, 0xB5B4BAB5,
+ 0xB7B4B3BA, 0xBBC1BCB0, 0x95A5ACA5, 0x948998A0,
+ 0x999F948E, 0x9FA5ABA0, 0xA9A0A4AA, 0xA4A9A0A4,
+ 0x9DA1A69D, 0xA59AA1A6, 0x9EA297A1, 0x99A0A498,
+ 0xA498A1A5, 0x9B9F93A0, 0x9199A091, 0xA19599A0,
+ 0x9DA1959D, 0x929EA394, 0xA4939CA1, 0x9AA2919C,
+ 0x909CA192, 0xA0919A9F, 0x9BA0919B, 0x8D9AA08F,
+ 0x9488979C, 0x91938790, 0x89909188, 0x8B829192,
+ 0x83877C88, 0x72787C71, 0x7A74787B, 0x20211D78,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x02000000,
+ 0x00010001, 0x725E6158, 0x7267797D, 0x787C716E,
+ 0x71767B72, 0x7D74757A, 0x787D7478, 0x767A7E73,
+ 0x7F767D81, 0x7E81787C, 0x9B989E93, 0xA89DA3A7,
+ 0xA4A89CA4, 0x9DA5A99D, 0xACA0A5A9, 0xA5A99DA8,
+ 0x9FA9AAA0, 0xA99FA8A9, 0xA8A99FA8, 0x9BA5A99D,
+ 0xA89CA3A7, 0xA4A89CA4, 0x99A0A498, 0xA599A1A5,
+ 0x9EA598A1, 0x9B9EA598, 0xA498A1A8, 0xA0A498A0,
+ 0x9BA3A79B, 0xA99DA1A8, 0xA3A79BA5, 0x98A3A79B,
+ 0xA498A0A4, 0xA0A498A0, 0x96A1A697, 0xA596A0A5,
+ 0xA0A596A0, 0x98A0A498, 0xA599A0A4, 0xA3A79BA3,
+ 0x9BA3A79B, 0xA79CA1A8, 0xA3A99EA1, 0x9CA1A79C,
+ 0xA499A1A7, 0xA0A499A0, 0x9DA4A89D, 0xA79EA4A8,
+ 0xA4A9A0A4, 0x9AA2A89D, 0xA59A9FA5, 0xA4A89D9F,
+ 0x99A5A99D, 0xA99DA5A8, 0x9FA397A5, 0x9BA0A498,
+ 0xA99DA3A7, 0xA3A79BA5, 0x9DA7A99D, 0xA79BA7A9,
+ 0xA3A79BA3, 0x9BA0A498, 0xAA9EA3A7, 0xA3A79BA6,
+ 0x9DA5A99D, 0xA79BA5A9, 0xA1A599A3, 0x9DA1A697,
+ 0xACA0A7AC, 0xA8ACA0A8, 0x7383897E, 0x786F787E,
+ 0x75796E75, 0x6A73776B, 0x7A6E7276, 0x76786C78,
+ 0x6B74756C, 0x736D7374, 0x706F6B73, 0x00020300,
+ 0x04000003, 0x02030000, 0x00070400, 0x03000803,
+ 0x4B484007, 0x54504F41, 0x71616464, 0x726F6071,
+ 0x66787566, 0x6C5D7875, 0x6867596F, 0x4F636559,
+ 0x4F475859, 0x47443F51, 0x1140403A, 0x01001415,
+ 0x00010000, 0x00000000, 0x00000000, 0x0A080700,
+ 0x303B3833, 0x4A453B38, 0x58544F4E, 0x6367645F,
+ 0x70686B6C, 0x72716772, 0x69767469, 0x746A7674,
+ 0x6E6D6375, 0x5A606158, 0x23226060, 0x08060625,
+ 0x00000001, 0x00000000, 0x00010000, 0x884A4B47,
+ 0x91888E91, 0x90918890, 0x8C90938A, 0x99909295,
+ 0x98999098, 0x90969990, 0x9A8F979B, 0x969A8E96,
+ 0x8B979C8D, 0x9F94959A, 0x9EA2979B, 0x959DA195,
+ 0xA0949FA1, 0x9C9F909E, 0x909A9F90, 0xA394989F,
+ 0xA4A99A9E, 0x9AA0A798, 0xA69BA0A7, 0x3E4138A2,
+ 0x38070B05, 0xAEA33C41, 0xA8AFA0A8, 0x9EA9B0A1,
+ 0xAFA0A7AF, 0xA7AE9FA8, 0xA0ABB2A3, 0xB0A1A8AF,
+ 0xA8AFA0A9, 0xA3ACB1A2, 0xAFA3ADB2, 0xADB1A5AB,
+ 0xA8AEB4A9, 0xB4A9ADB3, 0xABB1A6AE, 0xA8ABAFA3,
+ 0xB2A6B0B4, 0xADB1A5AE, 0xA9B0B4A9, 0xB5ACAEB4,
+ 0xB0B5ACB0, 0xACB0B5AC, 0xB5ACB0B5, 0xB0B5ACB0,
+ 0xA9B0B8AE, 0xAEA8A9B0, 0xB2B6B1AA, 0xBBBCC0BA,
+ 0xC2BCBDC1, 0xBBBFBABE, 0xBAB8BEB9, 0xBDBBB9BF,
+ 0xB6BCB7B8, 0xBBBCC0BB, 0xBDBBBCC0, 0xB9BCBABA,
+ 0xBBBDC1BC, 0xBFBABCC0, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBBBAC0BB, 0xBFBDBAC0,
+ 0xBCBFBDBC, 0xBEB9BEBC, 0xBFBDBBC0, 0xBABFBDBA,
+ 0xB7B6BCB7, 0xBFBDB6BC, 0xB9BEBCBA, 0xBBBABFBD,
+ 0xBDBCB8BD, 0xBABFBEB8, 0xB9B7BCBA, 0xBFBEB5BC,
+ 0xB9BFBEB9, 0xBBB8BDBB, 0xBFBEB8BD, 0xB7BDBCB9,
+ 0xBEB7BDBC, 0xBFBEB9BF, 0xB9BFBEB9, 0xBFB7BDBC,
+ 0xC0BFBAC0, 0xB9BFBEBA, 0xBEBBC0BE, 0xC1BCBBC0,
+ 0xBBC1BCBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBD,
+ 0xBFBAC1BE, 0xC0BFB8C0, 0xBAC0BFBA, 0xC0BBC0C1,
+ 0xC0BFBABF, 0xB8C0BFB8, 0xC0B9C1C0, 0xC1C1B9C1,
+ 0xB8C0C0B9, 0xC0B8C0C0, 0xC0BFB8C0, 0xB9BFBEBA,
+ 0xBEB8C0BF, 0xBFBEB7BF, 0xB9BFBEB9, 0xBFB8C0BF,
+ 0xC1C1B8C0, 0xB8C0C0B9, 0xBFB3BBBB, 0xC0C0B7BF,
+ 0xB6BEBEB8, 0xC0B8C0C0, 0xBFC0B8C0, 0xBBC0C1BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFBABFC0,
+ 0xBEBFB9BE, 0xB9BEBFB9, 0xBEB6BEBD, 0xC0BFB7BF,
+ 0xB9BFBEBA, 0xBBB8C0BF, 0xBFBEB4BC, 0xB9BFBEB9,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEB9BFBE,
+ 0xC0BFB9BF, 0xB9BFBEBA, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBDC0BEBB, 0xC0C0C0C0, 0xC0C0C0C0, 0x8B8D8DC0,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF595D5E, 0xC0BFBAC0,
+ 0xBBC1C0BA, 0xC0B8C0C0, 0xBFC0B8C0, 0xB9BEBFBA,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xBAC0BFBA, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBBC1C0BC, 0xC0BAC0BF, 0xC1C0B9C1,
+ 0xBBC1C0BB, 0xC0B8C0C0, 0xBEBEB8C0, 0xB7BFBFB6,
+ 0xC0B8C0C0, 0xBEBEB8C0, 0xB8C0C0B6, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC1C1B8C0,
+ 0xB8C0C0B9, 0xBFB8C0C0, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xB6BCBBB8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA, 0xBFB9BEBF,
+ 0xBFC0B9BE, 0xB9BEBFBA, 0xBFB8C0BF, 0xBFC0B8C0,
+ 0xB9BEBFBA, 0xBFB8C0BF, 0xC0BFB8C0, 0xB9BFBEBA,
+ 0xC0B0B8B8, 0xBFC0B8C0, 0xA3A8A9BA, 0xC0B0B8B8,
+ 0xC0C0B8C0, 0xB6C0C0B6, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xBAC0BFBA, 0xBFB8C0C0, 0xBFBEB7BF, 0xB8BDBCBA,
+ 0xBDBABFBD, 0xBFBEB9C0, 0xB7BDBCB9, 0xBBB8BDBC,
+ 0xBDBBB8BD, 0xB6BBB9B8, 0xB8B9BDB8, 0xBEB9BABE,
+ 0xB9BDB8BA, 0xAEB4B8B3, 0xB5B0AFB3, 0xB1B7B2AF,
+ 0xB7B4BAB5, 0xBDB6B7BE, 0xB5BCB5B6, 0xB5B5BCB5,
+ 0xBBB6B5BC, 0xB6BDB6B5, 0x989BA399, 0x93889BA3,
+ 0x9094888D, 0x9CA5A99D, 0xA99EA4A8, 0xA3A99EA5,
+ 0x9AA1A79C, 0xA4999DA5, 0x9EA4999E, 0x97A2A69A,
+ 0xA4989FA3, 0xA0A498A0, 0x93A1A599, 0x9D919B9F,
+ 0x9A9E9299, 0x909A9F90, 0x9E8F9A9F, 0x989F9097,
+ 0x91989F92, 0x9F90979E, 0x989F9098, 0x8A989D8E,
+ 0x998D9499, 0x91958995, 0x84919289, 0x897E8C8D,
+ 0x80847985, 0x77787C76, 0x7B77787C, 0x20211F7A,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x71090B05, 0x7C71777A, 0x787C7178,
+ 0x70767970, 0x79707679, 0x777D7276, 0x776F776D,
+ 0x80797981, 0x79817779, 0x9E9AA194, 0xACA0A8AD,
+ 0xA8ACA0A8, 0x9AA0A79A, 0xA599A0A7, 0xA2A69AA1,
+ 0x96A1A599, 0xA3979EA2, 0xA3A599A1, 0x9B9FA397,
+ 0xA497A1A8, 0x9FA6999D, 0x98A1A899, 0xA394A0A7,
+ 0x9DA4979C, 0x999DA398, 0xA3989CA4, 0x9EA5989D,
+ 0x95A0A79A, 0xA5989BA5, 0x9FA6999E, 0x989BA295,
+ 0xA5989EA5, 0x9EA5989E, 0x9A9DA497, 0xA798A0A7,
+ 0xA0A798A0, 0x989EA598, 0xA4989EA5, 0xA1A599A0,
+ 0x989FA398, 0xA59C9FA3, 0x9EA39AA0, 0x9F9DA59B,
+ 0xA59CA3A8, 0x9DA398A0, 0x999EA499, 0xA79C9EA4,
+ 0x9EA499A1, 0x9FA4A9A0, 0xA59BA1A9, 0x9A9F969D,
+ 0x969FA397, 0xA5999EA2, 0xA2A69AA1, 0x9B9EA598,
+ 0xA59AA0A6, 0xA1A59AA1, 0x9BA6AA9E, 0xA79BA3A7,
+ 0xA5A99DA3, 0x98A1A89B, 0xA4989EA5, 0xA2A69AA0,
+ 0x9CA4A89C, 0xA89CA4A8, 0xA4A89CA4, 0x9CA0A498,
+ 0xA89CA4A8, 0xAAAEA2A4, 0x708C9386, 0x7C71767D,
+ 0x797D7178, 0x6A74766A, 0x74687476, 0x76766A74,
+ 0x7277786F, 0x78747878, 0x2D2B2A79, 0x00000100,
+ 0x01000102, 0x00010000, 0x00070400, 0x05000803,
+ 0x52504808, 0x53565449, 0x6D5D6261, 0x7878686D,
+ 0x66787769, 0x71637574, 0x6E6D5F74, 0x4F666658,
+ 0x53495D5D, 0x4A484055, 0x1140403A, 0x01001415,
+ 0x00000000, 0x00000000, 0x00000000, 0x0A080700,
+ 0x3B37342F, 0x544C4643, 0x67655B57, 0x646C6B61,
+ 0x71676F6E, 0x76746973, 0x697A786D, 0x756B7674,
+ 0x72706876, 0x6068695F, 0x24206869, 0x02030123,
+ 0x00000000, 0x00000000, 0x00010000, 0x8A494D47,
+ 0x93899093, 0x92938992, 0x8C909489, 0x958B9397,
+ 0x96978D94, 0x9298998F, 0x9B909B9C, 0x999D9197,
+ 0x91989C90, 0x9C92999D, 0x9C9E929B, 0x909DA091,
+ 0xA0909FA0, 0x9DA0919F, 0x99A0A596, 0xA4989FA6,
+ 0x9FA398A0, 0x74B2B6AB, 0x0703787A, 0x06070308,
+ 0xA2454A41, 0xAFA2A6AF, 0xA7AE9FA8, 0xA0A8AFA0,
+ 0xAD9EA8AF, 0xA6AB9CA8, 0xA0A5AA9B, 0xAFA0AAAF,
+ 0xAAAEA2AA, 0xA6ABAFA3, 0xAFA3AEB2, 0xABAFA3AB,
+ 0xA3ADB1A5, 0xB1A5ABAF, 0xABAFA3AD, 0xA8ADB4A7,
+ 0xB2A7AEB5, 0xADB3A8AC, 0xA6ADB3A8, 0xB0A7ABB1,
+ 0xADB2A9AB, 0xACB0B4AE, 0xB5ACB0B5, 0xB0B5ACB0,
+ 0xA7B0B5AC, 0xB4AEA9AD, 0xAFB3ADB0, 0xBAB0B4AF,
+ 0xC4BFBBBF, 0xBABEB9C0, 0xBAB5BBB6, 0xBCB7BAC1,
+ 0xBAC1BAB6, 0xBAB9C0B9, 0xBBB6BAC1, 0xB8BCB7B7,
+ 0xBABCC0BB, 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBBBBBFBA, 0xBFBABCC0,
+ 0xBBBFBABB, 0xBDBABFBD, 0xBFBDBABF, 0xB8BDBBBA,
+ 0xBDB5BAB8, 0xC0BDB9C0, 0xB9C0BDB9, 0xBCB7BDBC,
+ 0xBCBBB7BD, 0xB7BDBCB6, 0xBCB5BBBA, 0xC0BFB7BD,
+ 0xB8BEBDBA, 0xBCB8BDBB, 0xBCBBB9BE, 0xB4BCBBB6,
+ 0xBDB9C0BD, 0xBFBDB9C0, 0xB6BBB9BA, 0xBDB9C0BD,
+ 0xBEBCB9C0, 0xBABFBDB9, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBDC0BEBD, 0xBEBDC0BE, 0xC0BEBDC0, 0xBBC0BEBB,
+ 0xBEBAC1BE, 0xC0BFBAC1, 0xBBC1C0BA, 0xBEBAC0BF,
+ 0xC0BFB9BF, 0xBAC0BFBA, 0xBFBAC0BF, 0xC0C0BAC0,
+ 0xB7BFBFB8, 0xC0B8C0C0, 0xBFBEB8C0, 0xB8BEBDB9,
+ 0xC0B7BFBF, 0xC0C0B8C0, 0xB8C0C0B8, 0xBDB7BCBD,
+ 0xBCBBB7BC, 0xB6BCBBB6, 0xC0B6BCBB, 0xC0BFBBC1,
+ 0xB7BDBCBA, 0xBFB8C0BF, 0xBEBDB8C0, 0xB9BFBEB8,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEBAC0BF, 0xBCBBB9BF,
+ 0xB7BFBEB4, 0xBDB9BFBE, 0xBDBCB8BE, 0xB9BFBEB7,
+ 0xBFB9BFBE, 0xBFBDBAC0, 0xBABFBDBA, 0xBEBBC0BF,
+ 0xBFBEBABF, 0xB9BFBEB9, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBCBFBDBA, 0xC0C0C0C0, 0xC0C0C0C0, 0x888B89C0,
+ 0x01000001, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0595D5E, 0xBEBFBABF,
+ 0xB8C0BFB9, 0xC0B8C0C0, 0xC0C1B8C0, 0xBBC0C1BB,
+ 0xBDB7BFBE, 0xBFBEB6BE, 0xB9BFBEB9, 0xBFBAC0BF,
+ 0xC1C0BAC0, 0xBBC1C0BC, 0xC0BAC0BF, 0xC2C1B9C1,
+ 0xBBC1C0BC, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFBFB8C0, 0xB8C0C0B7, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA, 0xBEBAC0BF,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA, 0xC0B9BEBF,
+ 0xBFC0BABF, 0xB8BDBEBA, 0xBEB7BFBE, 0xBEBFB7BF,
+ 0xB9BFBEB9, 0xBFBAC0BF, 0xC0BFBAC0, 0xB8BEBDBA,
+ 0xC0B9C1C1, 0xBEBFB8C0, 0xB2B7B8B9, 0xC0B3BBBB,
+ 0xBDBDB8C0, 0xB6C0C0B3, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xBAC0BFBA, 0xC0B8C0C0, 0xBFBEB8C0, 0xB7BCBBB9,
+ 0xBDB8BDBB, 0xBDBCBABF, 0xB8BEBDB7, 0xBAB8BDBC,
+ 0xBEBCB7BC, 0xB8BDBBB9, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB9BDB8B8, 0xB4B8BCB7, 0xB9B4B5B9, 0xB6BCB7B5,
+ 0xB5B7BDB8, 0xBAB3B4BA, 0xB0B7B0B3, 0xB3B3BAB3,
+ 0xB9B4B3BA, 0xB8BCB6B5, 0x98B9C1B7, 0x94899BA3,
+ 0x9094888E, 0xA0A2A498, 0xA99DAAAC, 0xA0A79AA5,
+ 0x9AA1A79C, 0xA59A9DA5, 0x9FA59A9F, 0x9AA2A69A,
+ 0xA69AA2A6, 0xA0A498A2, 0x959DA195, 0x9E929DA1,
+ 0x989C909A, 0x909A9F90, 0x9E8F9A9F, 0x979E9197,
+ 0x91989F92, 0x9F90979E, 0x979E8F98, 0x8B989D8E,
+ 0x978B959A, 0x90948993, 0x818B8C83, 0x8D828A8B,
+ 0x84887D89, 0x79787C77, 0x7B79787B, 0x1F201E7A,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x2A080905, 0x7C712E30, 0x787C7178,
+ 0x7175786F, 0x796E777A, 0x757B7075, 0x77798177,
+ 0x80797881, 0x79817778, 0x9EA7AEA1, 0xA293A8AD,
+ 0x9AA1929D, 0x979EA598, 0xA5989BA4, 0x9EA5989E,
+ 0x9AA1A599, 0xA69AA2A6, 0xA1A599A4, 0x9AA1A89B,
+ 0xA396A0A7, 0xA0A79A9C, 0x97A1A899, 0xA899A0A8,
+ 0xA0A79AA1, 0x9C9EA69B, 0xA4999EA6, 0x9EA69B9C,
+ 0x9B9DA699, 0xA5989FA8, 0x9BA4979C, 0x959EA598,
+ 0xA2959BA2, 0x9BA2959B, 0x979DA497, 0xA4959DA4,
+ 0xA0A7989D, 0x989EA598, 0xA4989EA5, 0x9FA397A0,
+ 0x98A1A59A, 0xA0979EA1, 0x9BA0979B, 0xA29EA29C,
+ 0xA59CA4A8, 0xA3A89FA0, 0x9AA1A79C, 0xA59A9FA5,
+ 0x9FA59A9F, 0x9F9FA49B, 0xA49DA1A9, 0x9DA59B9D,
+ 0x969FA398, 0xA3979EA2, 0xA1A5999F, 0x9A9FA59A,
+ 0xA59A9FA5, 0x9DA196A1, 0x989FA397, 0xA89CA0A4,
+ 0xA3A79BA4, 0x9AA1A89B, 0xA69AA0A7, 0x9FA397A2,
+ 0x9C9FA397, 0xA89CA4A8, 0xA4A89CA4, 0x98A4A89C,
+ 0xA498A0A4, 0xAAAEA2A0, 0x718D9185, 0x7B6F797D,
+ 0x787C7077, 0x6E74766A, 0x776D787A, 0x74756B78,
+ 0x72787970, 0x504F7878, 0x08060652, 0x00000000,
+ 0x00000000, 0x02000000, 0x00070400, 0x04000803,
+ 0x514F4707, 0x52565449, 0x6E5E6360, 0x7879696E,
+ 0x66787868, 0x6E637574, 0x706D5F72, 0x4F686759,
+ 0x53485D5D, 0x4A493F55, 0x1140403A, 0x01001415,
+ 0x00010100, 0x00000000, 0x00000000, 0x09070600,
+ 0x3C383531, 0x554B4744, 0x65635957, 0x676F6F63,
+ 0x74697373, 0x78746976, 0x6D79776C, 0x786E7A78,
+ 0x75746A7A, 0x6068695F, 0x24206869, 0x02030123,
+ 0x00000000, 0x01000000, 0x00010000, 0x89484C46,
+ 0x94898E94, 0x92948890, 0x8D909489, 0x998F9498,
+ 0x98998F98, 0x8F98998F, 0x9C919899, 0x989C9098,
+ 0x909A9E92, 0x9B91989C, 0x9D9F939A, 0x8E9FA090,
+ 0xA0909FA1, 0x9DA0909F, 0x99A1A599, 0xA2999EA4,
+ 0xA0A29C9F, 0x033F403C, 0x05040607, 0x40423C07,
+ 0xA0A9AFA4, 0xAFA0A6B0, 0xA9B0A1A8, 0xA0A6AD9E,
+ 0xAFA0A8AF, 0xAAAFA0AA, 0x9BA8AE9D, 0xAD9EA6AC,
+ 0xAAAEA2A8, 0xA3ABAFA3, 0xAFA3ABAF, 0xABAFA3AB,
+ 0xA5B0B4A8, 0xB0A1ADB1, 0xAAAFA0AB, 0xA8AFB6A9,
+ 0xB3A8AEB5, 0xADB3A8AD, 0xA9ABB3A8, 0xB2A9ACB4,
+ 0xACB1A8AD, 0xACAEB2AC, 0xB5ACB0B5, 0xB0B5ACB0,
+ 0xABADB1AB, 0xB3ADADB1, 0xB1B5AFAF, 0xB4AFB3AE,
+ 0xC0BBB5B9, 0xBBBFBABC, 0xB5BAC1BA, 0xBBB4B5BC,
+ 0xB5BCB5B4, 0xB6B7BEB7, 0xBDB7B6BD, 0xBBBFB9B9,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBDBABFBD, 0xBDBBBABF, 0xB6BBB9B8,
+ 0xBEB6BDBA, 0xC0BDBAC1, 0xB9C0BDB9, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB3B9B8B7, 0xBFB5BDBC, 0xBDBCB8C0,
+ 0xB8BDBBB7, 0xBDBBC0BE, 0xBCBBB9C0, 0xB9BFBEB6,
+ 0xBEB9C0BD, 0xBDBBBAC1, 0xB9BEBCB8, 0xBDB9C0BD,
+ 0xBEBCB9C0, 0xBABFBDB9, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBDC0BEBD, 0xBEBDC0BE, 0xC0BFBBC0, 0xBBC0BFBB,
+ 0xBEBBC0BE, 0xC0BFBAC1, 0xBBC1C0BA, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xBAC0BFB9, 0xBFBAC0BF, 0xBFC0BAC0,
+ 0xB8C0C0BA, 0xC0B8C0C0, 0xBFBEB8C0, 0xB9BFBEB9,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB9C1C1B8, 0xC0BABFC0,
+ 0xBDBCBABF, 0xB6BCBBB7, 0xBBB7BDBC, 0xBDBCB6BC,
+ 0xB6BCBBB7, 0xBEB8C0BF, 0xC0BFB7BF, 0xB9BFBEBA,
+ 0xBFB8C0C0, 0xBEBFB7BF, 0xB9BEBFB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB8BEBDB9, 0xBEB9BFBE, 0xC0BFB9BF,
+ 0xB7BFBEB8, 0xBFB9BFBE, 0xBEBDBAC0, 0xB9BFBEB8,
+ 0xBEBAC0BF, 0xBFBDB9BF, 0xBABFBDBA, 0xBEBABFBE,
+ 0xBFBEBABF, 0xB9BFBEB9, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBCBFBDBA, 0xC1C0C0C0, 0xC1BFC1C1, 0x888B89C0,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585D5E, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBEC1B8C0, 0xBABFC0B9,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xB8C0BFB8, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xB8C0BFB9, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B6BEBE, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB8C0C0, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xB8BDBEBA, 0xBEBAC0BF,
+ 0xBFBEB9BF, 0xBAC0BFBA, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB8C0C0, 0xBEBFB7BF, 0xB9BEBFB9,
+ 0xBFB7BFBE, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB7BFBE,
+ 0xBFC0B8C0, 0xB9BEBFBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xBABFBEBA, 0xBDBABFBE, 0xBFBDBABF, 0xB9BFBEBA,
+ 0xC1B7BFBF, 0xBFC0B9C1, 0xBABFC0BA, 0xBFB0B8B7,
+ 0xC0C0B8C0, 0xB3BDBDB6, 0xC0B7BFBF, 0xC0BFBABF,
+ 0xBAC0BFBA, 0xC0B8C0C0, 0xC0BFB8C0, 0xB8BDBCBA,
+ 0xBFB6BBBA, 0xBEBDBBC0, 0xB9BFBEB8, 0xBAB8BDBB,
+ 0xBCBAB7BC, 0xB8BDBBB7, 0xB9BBC0BE, 0xBAB8B6BB,
+ 0xBABEB9B7, 0xB6BABBB7, 0xBBB6B8BC, 0xB7BBB6B7,
+ 0xB7B8BCB7, 0xBBB6B8BC, 0xB5B9B4B7, 0xB6B8BCB6,
+ 0xBCB7B8BC, 0xB8BCB6B8, 0x98B9C1B7, 0x94899BA3,
+ 0x9FA3988E, 0xA1A3A79B, 0xA99DA9AD, 0xA4AB9EA5,
+ 0x9C9FA59A, 0xA49B9FA7, 0x9FA59A9F, 0x99A2A69A,
+ 0xA397A1A5, 0xA0A4989F, 0x939DA195, 0xA1959B9F,
+ 0x979B8F9D, 0x93979B8F, 0x9E919B9F, 0x959C8F97,
+ 0x919A9E92, 0x9E8F9BA0, 0x969D8E97, 0x8A95998D,
+ 0x978C9296, 0x94988D93, 0x82909188, 0x887D8B8C,
+ 0x80847984, 0x77787C76, 0x7C7A787C, 0x20211F7B,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000102,
+ 0x00000000, 0x04080907, 0x554C0708, 0x787B7252,
+ 0x7074776E, 0x79707679, 0x767B7274, 0x70798079,
+ 0x77706F77, 0x7B807770, 0x9FA7ABA0, 0xA195A7AB,
+ 0xA6ADA09D, 0x9AA0A798, 0xA5989EA7, 0x9EA69B9C,
+ 0x9B9FA59A, 0xA398A2A6, 0xA1A59A9F, 0x989BA398,
+ 0xA2979BA3, 0x9DA4979A, 0x929DA495, 0x9F939CA1,
+ 0x9BA2959B, 0x989BA398, 0xA1979AA2, 0x9AA49899,
+ 0x999BA599, 0xA59A9BA5, 0x9BA3989D, 0x989BA295,
+ 0xA095A0A4, 0xA0A4999C, 0x909B9F93, 0x9D8E989C,
+ 0x999E8F98, 0x969A9E92, 0xA4989EA2, 0xA0A498A0,
+ 0x989FA59A, 0xA3989DA3, 0x9DA3989D, 0x989CA198,
+ 0xA59C9EA1, 0xA3A69DA2, 0x9D9FA59A, 0xA79CA2A8,
+ 0x9EA499A1, 0x959AA095, 0xA59B9AA0, 0x9DA59B9D,
+ 0x9AA1A59A, 0xA196A1A5, 0x9FA3989D, 0x9AA1A59A,
+ 0xA59AA1A5, 0x9FA59A9F, 0x98A0A498, 0xA397A0A4,
+ 0xA5A99D9F, 0x9AA3A79B, 0xA79AA2A6, 0xA0A79AA0,
+ 0x979DA497, 0xA99C9DA4, 0xA2A99CA2, 0x9CA4A89C,
+ 0xA599A4A8, 0xAAAEA2A1, 0x6E989D8E, 0x7D6E787D,
+ 0x787C7078, 0x6D77786E, 0x756C7677, 0x76776E74,
+ 0x73787970, 0x06067677, 0x08050708, 0x00010002,
+ 0x00000000, 0x02000000, 0x00070400, 0x03000803,
+ 0x52504806, 0x53565449, 0x6C5C6461, 0x7878686C,
+ 0x69787868, 0x71637979, 0x706D5F74, 0x4F686759,
+ 0x54485E5D, 0x4A493F54, 0x1140403A, 0x01001415,
+ 0x00000000, 0x00000000, 0x00000000, 0x07050402,
+ 0x3C373430, 0x635A4744, 0x66645968, 0x69737166,
+ 0x73687674, 0x78746977, 0x717A786D, 0x796E7E7C,
+ 0x76746A7B, 0x606A695F, 0x231F6869, 0x01020022,
+ 0x00000000, 0x00000000, 0x00010000, 0x89484C46,
+ 0x94898E94, 0x90948890, 0x8B929389, 0x978D9495,
+ 0x97988E96, 0x90999A91, 0x9A8F999A, 0x979B9096,
+ 0x929B9D91, 0x9C909C9E, 0x999B8F98, 0x90A3A494,
+ 0xA0909FA0, 0x9DA0909F, 0x99A0A498, 0x6E6AA0A4,
+ 0x0B09096F, 0x05050505, 0x42390607, 0xB1B5A93F,
+ 0xA0A8AFA2, 0xAFA0A8AF, 0xA8AFA0A8, 0x9DA6AC9B,
+ 0xB1A0A8AE, 0xA7AD9CAB, 0x9DAAB09F, 0xAC9BA8AE,
+ 0xA6AB9CA6, 0xA1ACB1A2, 0xAFA3ABB0, 0xABAFA3AB,
+ 0xA4ABAFA3, 0xB0A3ACB0, 0xA9B0A3A9, 0xA8AEB4A9,
+ 0xB3A8ADB3, 0xADB3A8AD, 0xA8ADB3A8, 0xB4A9ADB3,
+ 0xB0B4A9B0, 0xACB2B5AC, 0xB5ACB2B5, 0xAEB3AAB0,
+ 0xAEADB1AB, 0xAFA6B0B4, 0xADB2A9AA, 0xAFB2B4AE,
+ 0xB4AFB3B5, 0xB5B9B4B0, 0xBBBAC1BA, 0xBBB6BBC2,
+ 0xBBC1BCB5, 0xB5B8BEB9, 0xBEB9B4BA, 0xB7BDB8B8,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBABEB9BB, 0xBDB8BDBB, 0xBBB9BABF, 0xB6BBB9B6,
+ 0xBCB9C0BD, 0xBFBDB8BF, 0xBABFBDBA, 0xBBB9BEBC,
+ 0xBDBCB7BE, 0xB2B8B7B7, 0xBBB5BDBC, 0xB9B7B6BC,
+ 0xB8BDBBB4, 0xBCBABFBD, 0xC0BDB7BD, 0xBBC0BEB9,
+ 0xBAB8BDBC, 0xBBB9B6BB, 0xB9BEBCB6, 0xBEBABFBE,
+ 0xC0BDBABF, 0xB9C0BDB9, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBCBBC1BC, 0xC0BEBBC1, 0xBBC0BEBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBAC1BEBB, 0xBEB9BFBE,
+ 0xBEBDB7BF, 0xB9BFBEB6, 0xBFBAC0BF, 0xBFC0BBC0,
+ 0xBABFC0BB, 0xC0B8BFC2, 0xBFBEB8C0, 0xB9BFBEB9,
+ 0xBEB8C0BF, 0xBFBEB7BF, 0xB9BFBEB9, 0xC0B8C0BF,
+ 0xC0C0B9C1, 0xB8C0C0B8, 0xBEB8C0C0, 0xBCBBB6BE,
+ 0xB4BCBBB4, 0xBEB5BDBC, 0xBEBDB7BF, 0xBAC0BFB8,
+ 0xBFB8C0C0, 0xBFBEB7BF, 0xB9BFBEB9, 0xBEBABFBE,
+ 0xBFBEBABF, 0xB9BFBEB9, 0xBBB7BDBC, 0xBDBCB6BC,
+ 0xB9BFBEB7, 0xBEB9BFBE, 0xBDBBB9BF, 0xB7BDBCB8,
+ 0xBEB9BFBE, 0xC1BEB7BF, 0xB9C0BDBA, 0xBCB6BBBA,
+ 0xBEBDB8BD, 0xB9BFBEB8, 0xBBBABFBD, 0xBFBDBAC0,
+ 0xBCBFBDBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x02000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC2585D5E, 0xC0C0B8BF,
+ 0xB8C0C0B8, 0xC0B7BFBF, 0xBDC0B8C0, 0xB6BEBEB6,
+ 0xBEB7BFBE, 0xC0BFB7BF, 0xB8C0BFB8, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBAC0BFBB, 0xBFBBC1C0, 0xC0BFBAC0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFBFB8C0,
+ 0xB8C0C0B7, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xB8BDBEBA, 0xBEBBC1C0,
+ 0xBFBEB9BF, 0xB9BFBEBA, 0xBFB8C0C0, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xBFB8C0BF, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB7BFBE,
+ 0xBFC0B8C0, 0xB9BEBFBA, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBABFBEBB, 0xBDBABFBE, 0xBFBDBABF, 0xBABFBEBA,
+ 0xC0BAC0BF, 0xC0C1B8C0, 0xBABFC0BB, 0xBCB3BBBA,
+ 0xC0C0B5BD, 0xB8C0C0B6, 0xBFB7BCBD, 0xC0BFB9BE,
+ 0xBAC0BFBA, 0xBFB8C0C0, 0xC1C0B7BF, 0xBBC0BFBB,
+ 0xBBBCBEBE, 0xBFBEB8BD, 0xB9C0BDB9, 0xBBBABFBD,
+ 0xBDBBBAC0, 0xB6BBB9B8, 0xBBB8BDBB, 0xBBB9B8BD,
+ 0xB8BBB9B8, 0xB6BABBB7, 0xBDB8BABC, 0xB8BCB7B9,
+ 0xB7B7BBB6, 0xBCB7B8BC, 0xB8BCB7B8, 0xB3B5B9B3,
+ 0xBBB6B5B9, 0xB8BCB6B7, 0xA8BBBFB9, 0x938AACB1,
+ 0x9FA39890, 0x9DA8ACA0, 0xA99DA5A9, 0xA2A99CA5,
+ 0x9C9FA59A, 0xA59A9FA7, 0x9FA59A9F, 0x9A9FA59A,
+ 0xA598A0A7, 0x9DA4979E, 0x989EA598, 0xA195A0A4,
+ 0x9DA1959D, 0x91999D91, 0x9D92999D, 0x959B9097,
+ 0x8D999D91, 0x9D8E979C, 0x989C9096, 0x8B95998D,
+ 0x958A9397, 0x90948991, 0x838B8C82, 0x84788C8D,
+ 0x80847980, 0x777A7D74, 0x7B777A7B, 0x20211F7A,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x07080808, 0x08040809, 0x787A7407,
+ 0x6E74776E, 0x79707477, 0x72776E76, 0x6F70786E,
+ 0x7F797179, 0x61665D7B, 0xA1868C81, 0xA196A6AC,
+ 0x9BA2959D, 0x939DA495, 0xA29599A3, 0x9CA49999,
+ 0x989CA297, 0xA3989DA3, 0x9DA3989F, 0x989BA398,
+ 0xA3989BA3, 0x9EA4999D, 0x949DA497, 0x9C919AA1,
+ 0x999F9496, 0x9799A197, 0xA19799A1, 0x98A19798,
+ 0x9799A196, 0xA1969AA2, 0x9BA19699, 0x92989C90,
+ 0xA0969A9E, 0x9DA1969F, 0x949CA094, 0xA2939CA0,
+ 0x989D8E9D, 0x90989C90, 0x9F93989C, 0xA0A4989B,
+ 0x989EA499, 0xA1969DA3, 0x9A9F969B, 0x989EA198,
+ 0xA1989EA1, 0x9CA1989E, 0x9B9FA49B, 0xA49B9FA4,
+ 0x9FA59A9F, 0x919AA095, 0xA095969C, 0x9FA59A9A,
+ 0x9B9FA49B, 0xA49B9FA4, 0x9FA3989F, 0x979EA297,
+ 0xA59A9EA2, 0x9FA6999F, 0x98A0A498, 0xA498A0A4,
+ 0xA0A498A0, 0x9AA0A498, 0xA79AA2A6, 0xA0A79AA0,
+ 0x97A1A89B, 0xA3969DA4, 0x9EA5989C, 0x9DA4A89C,
+ 0xA89CA5A9, 0xAAAEA2A4, 0x6F8F9185, 0x7D6E797B,
+ 0x787C7078, 0x6E787970, 0x756C7677, 0x74756C74,
+ 0x28767872, 0x06062B2C, 0x07040608, 0x01000001,
+ 0x00000000, 0x02000000, 0x00070302, 0x04000603,
+ 0x524F4A07, 0x5356544A, 0x766B605E, 0x78776978,
+ 0x69787769, 0x73687877, 0x75736875, 0x5B68665B,
+ 0x544A6767, 0x47483F55, 0x113E403A, 0x01001415,
+ 0x00000000, 0x00000000, 0x00000000, 0x05030202,
+ 0x4C37342F, 0x635A5754, 0x68645968, 0x69737166,
+ 0x74697674, 0x78746978, 0x6C7A786D, 0x7C717977,
+ 0x7A786D80, 0x626A6860, 0x24206868, 0x04020125,
+ 0x00000000, 0x00000000, 0x00010000, 0x8B484C46,
+ 0x94898F94, 0x90948990, 0x8B94958B, 0x978D9495,
+ 0x96978D96, 0x90989990, 0x9B909899, 0x9A9B9197,
+ 0x919A9C90, 0x9C909B9D, 0x9A9D8E9A, 0x959DA091,
+ 0xA495A1A4, 0xAAAD9EA1, 0x36A0A499, 0x09073C3F,
+ 0x08080808, 0x3B070806, 0xB6AA3F41, 0xB2B8A7B2,
+ 0x9FAAAFA0, 0xAFA0A7AE, 0xAAAFA0AA, 0x9CAAB09F,
+ 0xAE9DA7AD, 0xA8AE9DA8, 0x9DA8AE9D, 0xB1A0A8AE,
+ 0xA8AD9EAB, 0xA0A8AD9E, 0xAFA3AAAF, 0xACB0A4AB,
+ 0xA0A8ACA0, 0xADA0A8AC, 0xA9B0A3A6, 0xA7ADB4A7,
+ 0xB3A8ADB4, 0xADB3A8AD, 0xA7AEB4A9, 0xB3A8ACB2,
+ 0xAFB3A8AF, 0xAAB0B3AA, 0xB3AAAEB3, 0xACB1A8AE,
+ 0xA8ADB1AB, 0xABA2AAAE, 0xAAAFA6A6, 0xAEB2B4AE,
+ 0xB4AEB2B4, 0xB0B4AEB0, 0xB4B2B9B2, 0xC6BFB4BB,
+ 0xBAC0BBBF, 0xB8B5BBB6, 0xBFBAB7BD, 0xB9BFBAB9,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBCC0BBBB, 0xB9BAC0BB, 0xBBB9B6BB, 0xBABFBDB6,
+ 0xBABABFBD, 0xC0BEB6BD, 0xBABFBDBB, 0xBBB7BCBA,
+ 0xBCBBB8BD, 0xB7BDBCB6, 0xBAB7BDBC, 0xBDBBB6BD,
+ 0xBBC0BEB8, 0xBBB9BFBE, 0xBFBDB6BC, 0xBABFBDBA,
+ 0xBAB9BEBD, 0xBDBBB6BB, 0xB7BEBBB8, 0xBFBABFBE,
+ 0xC0BDBAC0, 0xB9C0BDB9, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC1BEBBC0, 0xBAC1BEBA,
+ 0xBEBDC0BE, 0xC0BEBDC0, 0xBBC0BEBB, 0xBFBAC0BF,
+ 0xBDBCB8C0, 0xB9BFBEB7, 0xBFBAC0BF, 0xC0BFBBC0,
+ 0xBABFC0BB, 0xC0BBC0C1, 0xBEBFB8C0, 0xB9BFBEB9,
+ 0xBEB8C0BF, 0xC0BFB7BF, 0xB9BFBEBA, 0xBFB9C1C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB8C0C0, 0xC1C0B7BF,
+ 0xB5BDBCBB, 0xBEB6BEBD, 0xBFBEB7BF, 0xB7BDBCB9,
+ 0xC0B8C0C0, 0xBFBEB8C0, 0xB9BFBEB9, 0xBEBABFBE,
+ 0xBFBEBABF, 0xB9BFBEB9, 0xBEBAC0BF, 0xBFBEB9BF,
+ 0xBAC0BFB9, 0xBDBAC0BF, 0xBFBDB8BE, 0xBABFBDBA,
+ 0xBFB9BFBE, 0xBFBEB8C0, 0xB7BEBBB9, 0xBEB5BAB9,
+ 0xBFBEBABF, 0xB9C0BDB9, 0xBBBABFBD, 0xBFBDBAC0,
+ 0xBABFBDBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585D5E, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB7BFBE, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xC0BFBAC0, 0xBABFC0BA, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xC0B9BFBE, 0xBFC0BBC1,
+ 0xBABFC0BA, 0xC0BABFC0, 0xBFBEBABF, 0xBAC0BFB9,
+ 0xBEB8C0C0, 0xBEBEB6BE, 0xB8C0C0B6, 0xBFB9C1C0,
+ 0xC1C0B8C0, 0xB7BFBEB9, 0xBFB7BFBF, 0xC0C0B7BF,
+ 0xB7BFBFB8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBCB5BDBD, 0xC0C0B4BC, 0xB5BDBDB8, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBFB8C0C0, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BB,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB9BFBE,
+ 0xC0BFBAC0, 0xB9BFBEBA, 0xBEBABFBE, 0xBFC0BABF,
+ 0xB8BDBCBB, 0xBFBAC0BF, 0xBFBEBAC0, 0xBBC0BFBA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9, 0xBFB8C0C0,
+ 0xBFBFB5BF, 0xB8C0C0B7, 0xBCBAC0BF, 0xBFBEB7BD,
+ 0xBAC0BFB9, 0xC0BBC0C1, 0xBDBEBABF, 0xBBC0BFB8,
+ 0xB9BEC1BF, 0xBBB9BABE, 0xB9BEBCB6, 0xBDBABFBD,
+ 0xBDBBBABF, 0xB6BBB9B8, 0xBCB8BDBB, 0xBCBAB9BE,
+ 0xB6BBB9B7, 0xB7B7BBB6, 0xBBB9B8BC, 0xB7BBB6B8,
+ 0xB5B5BBB6, 0xBCB7B7BB, 0xB7BBB6B8, 0xB6B7BBB5,
+ 0xBBB4B6BD, 0xB7BBB5B4, 0xB6B8BCB6, 0xA39ABABC,
+ 0xA0A499A0, 0x9DA5A99D, 0xAA9DA5A9, 0xA3AA9DA3,
+ 0x9CA2A89D, 0xA89DA1A7, 0x9EA499A2, 0x999EA499,
+ 0xA5989CA4, 0x9BA4979C, 0x929CA696, 0x9F909AA1,
+ 0x9AA19298, 0x8F989F90, 0x9D91979E, 0x999D9299,
+ 0x91999D91, 0x9D91999D, 0x979B9099, 0x8E989C91,
+ 0x978B9599, 0x8F938793, 0x7D8D8F83, 0x897D8789,
+ 0x80847885, 0x72787C71, 0x7A74787B, 0x1F201C78,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x36373300,
+ 0x70787872, 0x78727879, 0x78797078, 0x71767C71,
+ 0x7B72767C, 0x53584F76, 0xA7767C71, 0x9F94AAB2,
+ 0x999F9499, 0x939BA295, 0xA5989BA2, 0x9EA4999E,
+ 0x9A9FA59A, 0xA59C9CA4, 0x9FA49BA0, 0x979EA297,
+ 0xA2999EA2, 0x9CA1989F, 0x9799A197, 0xA19798A1,
+ 0x98A09998, 0xA1A0A8A1, 0xA89EA0A8, 0xA1A99E9F,
+ 0x98A0A79A, 0xA798A0A7, 0xA1A697A0, 0x98A1A599,
+ 0xA499A0A4, 0xA0A499A0, 0xA2AAAEA2, 0xAFA2A8AF,
+ 0xA8AFA2A8, 0xA0A8AFA0, 0xAFA2A8AF, 0xA8AFA2A8,
+ 0xA8AEB2A7, 0xB1A8AEB1, 0xAEB1A8AE, 0xA9B0B3AA,
+ 0xB4A9B0B4, 0xAEB3AAAE, 0xA1A3A7A1, 0xA8A1A1A8,
+ 0xA1A99FA1, 0x9A9EA79A, 0xA79AA0A7, 0x9FA59AA0,
+ 0xA1A1A99F, 0xA8A1A1A8, 0xA3A89FA1, 0x9A9EA499,
+ 0xA4989FA5, 0xA0A498A0, 0x98A0A498, 0xA498A0A4,
+ 0xA1A599A0, 0x969DA196, 0xA1969DA1, 0x9DA1959D,
+ 0x989EA598, 0xA3989EA5, 0x9EA2979F, 0x9BA0A197,
+ 0xA69AA4A5, 0xACAEA2A4, 0x7153574C, 0x7C70787C,
+ 0x787C7078, 0x7277786F, 0x776F7878, 0x78787279,
+ 0x00595A56, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x41403C02, 0x3B45423D, 0x635B4543, 0x65635B65,
+ 0x545F5D55, 0x5E545F5E, 0x5D5E545F, 0x4A505148,
+ 0x514B5050, 0x34363051, 0x0F373834, 0x01001213,
+ 0x03010100, 0x07090608, 0x05070805, 0x08060508,
+ 0x5D4E4B46, 0x685D6967, 0x7874696C, 0x69767567,
+ 0x74697674, 0x7A786E76, 0x6D7B776C, 0x786D7C78,
+ 0x79776C7C, 0x626A6860, 0x25216868, 0x07030228,
+ 0x00020000, 0x00000000, 0x00010000, 0x8C4E504A,
+ 0x948E9295, 0x92958C90, 0x8D94958C, 0x988E9697,
+ 0x98998F97, 0x8F969A8F, 0x9990969A, 0x98998F98,
+ 0x91A09E93, 0x9F91A09F, 0x9F9F91A0, 0x98A2A596,
+ 0xA398A0A4, 0x6D71669F, 0x06080C06, 0x0B06080C,
+ 0x0A0C0607, 0x9B505448, 0xAC99A6AC, 0xA8AC99A8,
+ 0x9DA9AC9C, 0xAB9BA8AE, 0xA8AB9BA8, 0x9EA8AB9B,
+ 0xAA9BABAE, 0xAAAFA0A5, 0xA0A6AD9E, 0xAFA0A8AF,
+ 0xA8AFA2A8, 0xA0A9ADA1, 0xAEA3A8AC, 0xAAAEA2AA,
+ 0xA1ADB1A5, 0xADA0ABB0, 0xA9B0A3A6, 0xA4ACB3A6,
+ 0xB3A6ACB3, 0xACB3A6AC, 0xA8ADB3A8, 0xB3A8ADB3,
+ 0xADB3A8AD, 0xA9ADB3A8, 0xB2A9AEB4, 0xA9B1A7AD,
+ 0xA7ADB5AB, 0xAEA5A9B1, 0xB0B5ACA9, 0xA8B0B3AA,
+ 0xB1A8AEB1, 0xAFB4ABAE, 0xAEAEB5AE, 0xC0BAAEB5,
+ 0xBCC0BABC, 0xBCB5BCB5, 0xC0BBBBC1, 0xB9BFBABA,
+ 0xBBB9BFBA, 0xBEBCBAC0, 0xBBBEBCBB, 0xBCBBBEBC,
+ 0xBFBABBBE, 0xBBBFBABB, 0xBDBCBFBD, 0xBDBBBCBF,
+ 0xBCC0BBBA, 0xB5BABEB9, 0xBDBBB6BA, 0xB8BDBCBA,
+ 0xBDBABFBD, 0xBFBEBABF, 0xB7BCBAB9, 0xB9B9BCBA,
+ 0xBDBCB8BB, 0xB9BFBEB7, 0xB9B6BBB9, 0xBFBEB6BB,
+ 0xB9BFBEBA, 0xBCB6BCBB, 0xBFBEB7BD, 0xB7BDBCB9,
+ 0xBEB4BBB8, 0xBFBEBAC1, 0xB7BFBEB9, 0xBFB9BFBE,
+ 0xBEBDBAC0, 0xB9BFBEB8, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBEB9C0BD, 0xC0BFB9BF, 0xBAC0BFBA,
+ 0xBCBDC0BE, 0xC0BEBDC1, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBAC1, 0xBAC1BEBB, 0xBEB9C0BD, 0xC0BEBAC1,
+ 0xBAC0BFBB, 0xC0BABFC0, 0xBFBFB8C0, 0xB7BFBFB7,
+ 0xBEBAC0BF, 0xC0C0B9BF, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBFC2B8C0, 0xB8C0C0B8, 0xBEBAC0BF, 0xC0BEBAC1,
+ 0xBAC1BEBB, 0xBFB6BEBD, 0xBFBFB8C0, 0xB7BFBFB7,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEBABFBE,
+ 0xBEBFBABF, 0xB9BEBFB9, 0xB8B8C0C0, 0xC0C0B0B8,
+ 0xB8C0C0B8, 0xBCB9BFBE, 0xBDBBB7BD, 0xB8BDBBB8,
+ 0xBEB7BDBC, 0xBFBEB9BF, 0xB9BFBEB9, 0xBCBABFBD,
+ 0xBFBDB9BE, 0xBABFBDBA, 0xBDBBC0BE, 0xBFBEBABF,
+ 0xBABFBEBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B87C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585D5E, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB9BFBE, 0xC0C0B9BF, 0xB8C0BFB8,
+ 0xBEBAC0BF, 0xC0BFBAC1, 0xBABFC0BA, 0xBFB9BFBE,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBFB9BFBE, 0xBEC1B9BE,
+ 0xB9BEC1B9, 0xC0BABFC0, 0xBDBCBABF, 0xBAC0BFB7,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0BF,
+ 0xBFBEB8C0, 0xB7BFBEB7, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xBFB8C0C0, 0xBFBFB7BF, 0xB8C0C0B7,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB7BDBC,
+ 0xC1C0BAC0, 0xBAC0BFBB, 0xC0B9C1C1, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BB,
+ 0xC0BABFC0, 0xC0C0B8C0, 0xB9BEBFB8, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xC0B9BEBD, 0xBEBFBCC1,
+ 0xB7BCBDBA, 0xBFB9BFBE, 0xBFBEBAC0, 0xBABFBEBA,
+ 0xC0BAC0BF, 0xBDBCBBC1, 0xB7BFBEB7, 0xC0B9C1C1,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBEBABFC0, 0xBDBCB9BF,
+ 0xB9BFBEB7, 0xC0B9BEBF, 0xBDBEBABF, 0xBBC0BFB8,
+ 0xBCBDC0BE, 0xBFBABDC1, 0xBBBFBABB, 0xBDBABFBD,
+ 0xBFBDBABF, 0xB8BDBBBA, 0xBCB6BBB9, 0xC0BEB9BE,
+ 0xBABFBDBB, 0xB7B8BCB7, 0xBDBBB8BC, 0xBABEB9BA,
+ 0xB6B7BDB8, 0xBBB6B8BC, 0xB9BDB8B7, 0xB5B5BCB5,
+ 0xBCB5B5BC, 0xB3BAB3B5, 0xB6B8BCB7, 0xABA5BABC,
+ 0xA0A499A9, 0x9EA4A89D, 0xAA9DA6AA, 0xA3AA9DA3,
+ 0x9CA1A79C, 0xA79CA1A7, 0xA1A89BA1, 0x999CA499,
+ 0xA4979CA4, 0x9BA5989A, 0x9398A292, 0xA19299A3,
+ 0x989F909A, 0x8D98A08F, 0x9D91959C, 0x999D9299,
+ 0x919A9E92, 0x9D92999D, 0x979B9099, 0x8E93998E,
+ 0x978B9399, 0x93978B93, 0x838F9387, 0x8A7B8B8F,
+ 0x80847885, 0x717A7C70, 0x7B727A7B, 0x20221C78,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x72565650, 0x77727878, 0x7879707A, 0x6F777B70,
+ 0x7B72757C, 0x31362D76, 0xA6747C71, 0x9F95A9B1,
+ 0x979F9497, 0x959FA699, 0xA4989DA4, 0x9EA598A0,
+ 0x9B9FA59A, 0xA59B9DA5, 0x9A9F969D, 0x979EA297,
+ 0xA09AA0A1, 0x9D9F99A0, 0x99979F98, 0xA19996A1,
+ 0x98A09996, 0xA2A0A7A2, 0xA9A2A1A7, 0xA0A89EA2,
+ 0x9BA0A69B, 0xA79AA0A6, 0xA3A79BA0, 0x99A0A499,
+ 0x6D64A0A4, 0x696C636A, 0x6B71766D, 0x786D7076,
+ 0x71776C72, 0x6C71776C, 0x766B7177, 0x71776C70,
+ 0x6F75786F, 0x77717578, 0x75777175, 0x70767970,
+ 0x79707679, 0x74797074, 0x6C6A716A, 0xA8A16B71,
+ 0xA1A99FA1, 0x9A9EA69B, 0xA69BA0A7, 0xA0A59CA2,
+ 0xA2A1A7A2, 0xA7A2A1A7, 0xA1A8A1A1, 0x999EA39A,
+ 0xA4989EA4, 0xA0A498A0, 0x98A0A498, 0xA498A0A4,
+ 0xA0A498A0, 0x919DA196, 0xA196989C, 0x9DA1959D,
+ 0x979DA497, 0xA4999DA4, 0xA0A499A0, 0x97A4A59B,
+ 0xA49AA0A1, 0xACADA3A3, 0x5F53564D, 0x7B706568,
+ 0x787C7177, 0x71787970, 0x77727777, 0x7776727A,
+ 0x001D1E1C, 0x02000001, 0x01020001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00020000, 0x01000201, 0x02020004,
+ 0x00020100, 0x04000202, 0x02020003, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x00000001,
+ 0x02000002, 0x07070406, 0x05060805, 0x413E3A0A,
+ 0x5D68665E, 0x74696967, 0x77736876, 0x6C7B7A6C,
+ 0x786E7977, 0x7E7C727A, 0x6E7D796E, 0x796E7D79,
+ 0x78766B7D, 0x606A6860, 0x23206869, 0x07040028,
+ 0x00020000, 0x00000000, 0x00010000, 0x8E4E504A,
+ 0x948F9294, 0x90948E90, 0x8A91948B, 0x958B9394,
+ 0x93948A94, 0x90979B90, 0x9990979B, 0x9B9A9098,
+ 0x91A09F91, 0xA090A3A0, 0x9F9F91A0, 0x99A2A498,
+ 0x3B32A0A4, 0x00030036, 0x06090D08, 0x0D04080C,
+ 0x7B7F730A, 0x98A6AC99, 0xAD98A6AD, 0xA8AC99A8,
+ 0x9DAAAD9D, 0xAB9BAAAD, 0xAAAD9DA8, 0x97A8AB9B,
+ 0xA998A4A7, 0xA8AE9DA3, 0xA0AAAFA0, 0xAD9EA8AF,
+ 0xA6AA9EA8, 0x9FA6AA9E, 0xACA1A7AB, 0xA9ADA1A8,
+ 0xA1ABAFA3, 0xADA0ABB0, 0xABB2A5A6, 0xA4ACB3A4,
+ 0xB5A6ACB3, 0xACB3A4AE, 0xA7ADB3A8, 0xB4A9ACB2,
+ 0xADB3A8AE, 0xA9AEB4A9, 0xB3A9AEB4, 0xAAB2A8AB,
+ 0xA5AEB6AC, 0xAFA6A7AF, 0xAFB4ABAA, 0xAAB2B5AC,
+ 0xB4A9B0B3, 0xADB2A9B0, 0xADA9B0A9, 0xB5ACADB4,
+ 0xB6BBB2B0, 0xBEBEC5BE, 0xC1BCBEC5, 0xBAC0BBBB,
+ 0xBAB9BFBA, 0xBEBCB9BF, 0xBBBEBCBB, 0xBCBCBFBD,
+ 0xBFBABBBE, 0xBBBFBABB, 0xBBBABDBB, 0xBFBDBABD,
+ 0xBCC0BBBC, 0xB6B7BBB6, 0xBCBAB7BB, 0xBABCBCB9,
+ 0xBDBABFBD, 0xBCBBBABF, 0xBBC0BEB6, 0xB9B9BCBA,
+ 0xC1BEB8BB, 0xB8BFBCBA, 0xB9B8BDBB, 0xBFBEB6BB,
+ 0xB8BEBDB9, 0xBFB7BDBC, 0xBDBCBAC0, 0xB6BCBBB7,
+ 0xBCB9C0BD, 0xBFBEB8BF, 0xB8C0BFB7, 0xBDB7BFBE,
+ 0xBDBCB6BE, 0xB9BFBEB7, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBFB9BFBE, 0xBFC0BAC0, 0xBAC0BFBA,
+ 0xBCBBC0BE, 0xC0BEBDC1, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBAC1BE, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xC0BAC0BF, 0xC0C0B8C0, 0xBABFC0B8,
+ 0xBDB7BCBD, 0xC1C1B7BC, 0xB8C0C0B9, 0xBFB7BFBE,
+ 0xBFBFB7BF, 0xB8C0C0B7, 0xBEBAC0BF, 0xC0BEBAC1,
+ 0xBAC1BEBB, 0xC0B8BEBD, 0xBFBFB9C1, 0xB7BFBFB7,
+ 0xBEBAC0BF, 0xC0BFB9BF, 0xB9BFBEBA, 0xBEB8BEBD,
+ 0xBEBFB9BF, 0xBCC1C2B9, 0xA7B8C0C0, 0xB0B09FA7,
+ 0xB8C0C0A8, 0xBCBBC1C0, 0xBDBBB7BD, 0xBABFBDB8,
+ 0xBEB8BEBD, 0xBFBEB9BF, 0xB9BFBEB9, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD, 0xC0BFBABF,
+ 0xBBBDBDBB, 0xC0C0C0C0, 0xC1BFC0C0, 0x8B8C88C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585D5E, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB9BFBE, 0xBFBFB9BF, 0xB7BFBEB7,
+ 0xBEBAC0BF, 0xC0BFBBC0, 0xBBC0BFBB, 0xC0BABFC0,
+ 0xC0C0BABF, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC2B8C0,
+ 0xB8BFC2B8, 0xBFBABFC0, 0xBDBEB9BE, 0xBABFC0B8,
+ 0xC0B9C1C1, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBDBDB8C0, 0xB8C0C0B5, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB8C0C0, 0xBFBFB7BF, 0xB8C0C0B7,
+ 0xC0B3BBBB, 0xC0C0B8C0, 0xB6BEBEB8, 0xBEB2BAB9,
+ 0xBFC0B7BF, 0xBABFC0BA, 0xBFBABFC0, 0xC0BFB9BE,
+ 0xB9BFBEBA, 0xC1BABFC0, 0xBFC0BBC0, 0xBABFC0BA,
+ 0xC0BABFC0, 0xBFC0BABF, 0xB9BEBFBA, 0xBFB9BEBF,
+ 0xBFBEB9BE, 0xB9BFBEB9, 0xBFB9BFBE, 0xBFBEBAC0,
+ 0xB7BDBCB9, 0xBDB9BFBE, 0xBFBEB8BE, 0xB8C0BFB7,
+ 0xBFB7BFBE, 0xC0BFB8C0, 0xB5BDBCB8, 0xC0B7BFBE,
+ 0xC0C1BABF, 0xBABFC0BB, 0xBFB8C0C0, 0xC0BFB7BF,
+ 0xB7BDBCBA, 0xC0B9BEBF, 0xBFBFBABF, 0xBAC0BFB7,
+ 0xBCB9BEBC, 0xC1BCBDC1, 0xB9BFBABB, 0xBBBABFBD,
+ 0xBEBBB7BC, 0xB9C0BDB7, 0xBBB7BEBB, 0xBDBBB8BD,
+ 0xBABDBBB8, 0xB7B9BFBA, 0xBCB7B6BC, 0xBABEB9B8,
+ 0xB7B7BBB6, 0xBAB5B8BC, 0xB7BBB6B6, 0xB5B5BCB5,
+ 0xBDB6B4BC, 0xB5BCB5B6, 0xB6B8BCB7, 0xABA5B8BC,
+ 0xA8ACA1A9, 0x9DA3A79C, 0xAA9DA5A9, 0xA1AA9DA3,
+ 0x99A0A89D, 0xA79C9CA4, 0xA1A79CA1, 0x989CA598,
+ 0xA6999CA5, 0x9CA5989D, 0x92989F90, 0xA1929AA1,
+ 0x979E8F9A, 0x8D9A9F90, 0x9D91979C, 0x999D9199,
+ 0x91989C90, 0x9B90999D, 0x979B9097, 0x8C92968A,
+ 0x94889498, 0x90948890, 0x7D8B8F83, 0x887C8589,
+ 0x80847884, 0x71787C70, 0x7B72787C, 0x20221C78,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00010000,
+ 0x01000200, 0x00000000, 0x00000000, 0x02000002,
+ 0x7110110D, 0x78727577, 0x78797078, 0x70787C70,
+ 0x7A74787C, 0x0E120C78, 0xA6757D73, 0x9F95A9B1,
+ 0x959F9396, 0x9599A295, 0xA29599A2, 0x99A0939B,
+ 0x919AA095, 0xA097959A, 0x959A919B, 0x979CA297,
+ 0x9F999EA2, 0x9DA19B9D, 0x999AA19A, 0xA09998A0,
+ 0x9AA09B98, 0x6E6C6F6D, 0x716F6D70, 0x6D706E70,
+ 0x36353B36, 0x3937353B, 0x363A3534, 0x31343832,
+ 0x02003337, 0x00020000, 0x00000400, 0x04000003,
+ 0x00040000, 0x00000300, 0x04000004, 0x00040000,
+ 0x00000400, 0x03000004, 0x02030002, 0x00020400,
+ 0x04000204, 0x00040000, 0x00000400, 0x3B360004,
+ 0x373B3537, 0x31343832, 0x38343337, 0x36373537,
+ 0x6F6D706E, 0x706E6E71, 0x6D716C6D, 0x9A9FA19B,
+ 0xA39AA0A3, 0xA0A499A0, 0x999FA398, 0xA498A0A4,
+ 0xA0A498A0, 0x959BA295, 0xA2959BA2, 0x9BA2959B,
+ 0x989DA497, 0xA4989EA5, 0xA1A599A0, 0x98A2A69A,
+ 0xA2979FA3, 0xA9ACA39E, 0x3D40413D, 0x7B724041,
+ 0x767C7176, 0x71777B70, 0x7773777A, 0x2D2B2A78,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00020000, 0x00000200, 0x02010002,
+ 0x00020000, 0x01000001, 0x02000002, 0x00000000,
+ 0x01010000, 0x02000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x05080606, 0x3E390A06, 0x5E5B5342,
+ 0x6A69675D, 0x73687674, 0x76746975, 0x6D79776C,
+ 0x786E7A78, 0x7E7C727A, 0x6F7B796E, 0x796E7E7D,
+ 0x79776C7B, 0x606A6860, 0x25226869, 0x0704002A,
+ 0x00020000, 0x00000000, 0x00010000, 0x8F4E4F4B,
+ 0x948F9293, 0x90948E90, 0x8D94978E, 0x978E9697,
+ 0x96978E96, 0x8F969A8F, 0x9A90969A, 0x9D9D9199,
+ 0x8FA0A090, 0xA090A19E, 0xA0A094A0, 0x006C7065,
+ 0x03000004, 0x00040000, 0x050A0B07, 0x8074090B,
+ 0xB9BCAC7E, 0x98A8AD98, 0xAD98A8AD, 0xA8AC99A8,
+ 0x9AAAAD9D, 0xAE9EA7AA, 0xAAAD9DAB, 0x9EAAAD9D,
+ 0xAB9BABAE, 0xA8AC99A8, 0x9DA8AB9B, 0xAB9BA8AE,
+ 0xA8AD9EA8, 0xA0ABB0A1, 0xACA0AAAF, 0xA9ADA1A8,
+ 0xA0A8ACA0, 0xACA0A8AC, 0xB1B5A9A8, 0xA4ACB3A4,
+ 0xB3A4ACB3, 0xACB3A4AC, 0xA8ADB3A8, 0xB2A7ADB3,
+ 0xACB2A7AC, 0xA6ADB3A8, 0xB3A8ABB1, 0xADB3A8AD,
+ 0xA0B0B6AB, 0xB6ABA5AB, 0xB0B6ABB0, 0xA9B2B5AC,
+ 0xB3AAAFB2, 0xB0B5ACAE, 0xAEAEB5AE, 0xB0A7AEB5,
+ 0xABB0A7AB, 0xBCB5BCB5, 0xC3BEBAC1, 0xBAC0BBBD,
+ 0xB9B9BFBA, 0xBEBCB8BE, 0xBCBFBDBB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABABDBB, 0xBFBDB9BC,
+ 0xB7BBB6BC, 0xB9B6BAB5, 0xBEBCBABE, 0xBABDBBBB,
+ 0xBEBABFBD, 0xC0BDBBC0, 0xB7BCBAB9, 0xBEB8BBB9,
+ 0xBFBDBDC0, 0xB8BDBBBA, 0xBBB8BDBB, 0xBEBBB8BD,
+ 0xB7BDBCB7, 0xBCB7BDBC, 0xBBBAB7BD, 0xB7BDBCB5,
+ 0xBDB8BFBC, 0xBFBEB9C0, 0xB9BFBEB9, 0xBDB9BFBE,
+ 0xBEBDB8BE, 0xB8BEBDB8, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBDBABFBD, 0xC0BFBABF, 0xBAC0BFBA,
+ 0xBCBBC0BE, 0xC0BEBBC1, 0xBBC0BEBB, 0xBCBBC0BE,
+ 0xC0BEBBC1, 0xBBC0BEBB, 0xBEBBC0BE, 0xC1BCBBC0,
+ 0xBBC0BEBB, 0xC0BAC0BF, 0xBFBEBABF, 0xB8BDBEB9,
+ 0xC0B9BEBF, 0xC0C0B8C0, 0xB8C0BFB8, 0xBDBAC1BE,
+ 0xC1C0B9C0, 0xB8C0BFB9, 0xBEB8C0BF, 0xC0BDB8C1,
+ 0xB9C0BBB9, 0xBDB7BEBB, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xC0BFB9BF, 0xB9BFBEBA, 0xBEB9BFBE,
+ 0xBFBFB7BF, 0xBBC3C3B7, 0xA8B8C0C0, 0xA8A8A0A8,
+ 0xB8C0C0A0, 0xBDB9BFBE, 0xBDBCB8BE, 0xB9BEBDB8,
+ 0xBEB8BEBD, 0xC0BDB7BF, 0xB9C0BDB9, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBCBABFBD, 0xBEBEB9BE,
+ 0xBABCBCBC, 0xC1C0BFC1, 0xC0BFC1C1, 0x8C8A89C2,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585D5E, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFBAC0BF, 0xBFC0BAC0, 0xBAC0BFBA,
+ 0xBFBAC0BF, 0xC0BFBCC1, 0xBBC0BFBB, 0xC0BAC0BF,
+ 0xC0C0BABF, 0xB8C0C0B8, 0xC1B8C0C0, 0xC0C0B9C1,
+ 0xB8C0C0B8, 0xBFBABFC0, 0xBEBFB9BE, 0xBABFC0B9,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB7BFBFB8, 0xC0B8C0C0,
+ 0xBEBEB8C0, 0xB8C0C0B6, 0xC0B8C0C0, 0xC1C1B8C0,
+ 0xB8C0C0B9, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xB7B8C0C0, 0xBBBBAFB7, 0xB8C0C0B3, 0xBEB7BFBE,
+ 0xBEBFB7BF, 0xBABFC0B9, 0xBFB8BDBE, 0xBFBEB9BE,
+ 0xB9BFBEB9, 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA,
+ 0xC0BABFC0, 0xBEBFBABF, 0xBABFC0BA, 0xBFB9BEBF,
+ 0xBFBEB9BE, 0xB9BFBEB9, 0xBDB9BFBE, 0xBFBEB8BE,
+ 0xB6BCBBB9, 0xBEB8BEBD, 0xC0BFB9BF, 0xB8C0BFB8,
+ 0xBFB7BFBE, 0xC0BFB8C0, 0xB8C0BFB8, 0xBFBAC0BF,
+ 0xBEBFBAC0, 0xBABFC0B9, 0xBFB7BFBF, 0xC0BFB8C0,
+ 0xBAC0BFBA, 0xBFB8BDBE, 0xC0C0B9BE, 0xB8C0BFB8,
+ 0xBABBC0BE, 0xC0BBBBBF, 0xB8BDBBBC, 0xBAB8BDBC,
+ 0xBFBDB6BB, 0xB9C0BDBA, 0xBBB9C0BD, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xB7B8BEB9, 0xBCB7B6BC, 0xB8BCB7B8,
+ 0xB8B8BCB7, 0xB8B3B9BD, 0xB5B9B4B4, 0xB5B6BDB6,
+ 0xBCB5B5BC, 0xB4BBB4B5, 0xAEB6BCB7, 0xABA5ADB3,
+ 0xA7ACA3A7, 0x9BA5A99E, 0xAB9EA3A7, 0xA4AB9EA4,
+ 0x9D9FA79C, 0xA79C9FA7, 0xA2A89DA1, 0x989CA598,
+ 0xA4979CA5, 0x9CA5989B, 0x929AA192, 0xA2939AA1,
+ 0x9AA1929B, 0x8D999E8F, 0x9B8F979C, 0x999D9197,
+ 0x92989C90, 0x9D919A9E, 0x979B8F99, 0x8A94988C,
+ 0x94889296, 0x8E958890, 0x83899083, 0x8A7E8990,
+ 0x7F837786, 0x70787C70, 0x7A71787C, 0x20221C77,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000002, 0x01000000, 0x00010101,
+ 0x00000100, 0x00000000, 0x01000000, 0x00010000,
+ 0x2F10110F, 0x78743233, 0x78797079, 0x70787C70,
+ 0x5751787C, 0x10110D55, 0xA6757A71, 0x9F95A9B1,
+ 0x979F9597, 0x92929A8F, 0xA194989F, 0x9EA4999A,
+ 0x9D9EA39A, 0xA7A29FA3, 0xA3A7A2A3, 0x819CA09A,
+ 0x87818387, 0x83878285, 0x3E3E423D, 0x433E3D43,
+ 0x0F130E3F, 0x06070806, 0x06060606, 0x06060608,
+ 0x05020404, 0x05060106, 0x03050501, 0x00000100,
+ 0x00000001, 0x00000000, 0x01000202, 0x04000003,
+ 0x00040003, 0x01000301, 0x03010003, 0x00030100,
+ 0x00000400, 0x03000004, 0x02030002, 0x00020301,
+ 0x03010203, 0x00040000, 0x00000400, 0x03010004,
+ 0x00030100, 0x00000100, 0x00000001, 0x00000000,
+ 0x05050707, 0x06040305, 0x05080603, 0x38080905,
+ 0x3D373B3C, 0x3B3D373B, 0x886A6D64, 0x7F768E91,
+ 0x8E92877C, 0xA1A6ABA2, 0xABA0A6AC, 0xA1A89BA5,
+ 0x969DA497, 0xA3979CA3, 0x9FA3979F, 0x9BA2A69B,
+ 0xA097A2A6, 0xAAACA69D, 0x3F40413F, 0x7A744041,
+ 0x767B7276, 0x70747A6F, 0x514D7679, 0x06060650,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000301, 0x01020002,
+ 0x00000100, 0x01000001, 0x00000000, 0x00000000,
+ 0x01010000, 0x02000003, 0x01000001, 0x00000000,
+ 0x00000000, 0x3A080605, 0x5B53413E, 0x5E5C525E,
+ 0x6A68665C, 0x74697574, 0x76746976, 0x767E7C71,
+ 0x7C728282, 0x79786E7D, 0x727E7C71, 0x7C717F7D,
+ 0x7B796E7E, 0x6069685E, 0x25216A68, 0x07030228,
+ 0x00020000, 0x00000000, 0x00010000, 0x8E4E4F4B,
+ 0x948F9094, 0x90948E90, 0x8B92958C, 0x968D9495,
+ 0x98999095, 0x92979B90, 0x9C92999D, 0x9C9E929B,
+ 0x929F9F91, 0x9F93A1A0, 0x4041379F, 0x00020400,
+ 0x03000003, 0x02030002, 0x760A0C06, 0xBBAB7D81,
+ 0xB9BBA8B8, 0x98A9AE99, 0xAC99A8AD, 0xA8AC99A8,
+ 0x9BA5A898, 0xAB9BA8AB, 0xA8AB9BA8, 0x9DAAAD9D,
+ 0xAE9BAAAD, 0xABAF9CAA, 0x99A9AD9A, 0xAB9BA8AC,
+ 0xAAAD9DA8, 0x9FA9AE9F, 0xAEA2A9AE, 0xA7AB9FAA,
+ 0xA0A8ACA0, 0xACA0A8AC, 0xA8ACA0A8, 0xA4AAB1A2,
+ 0xB3A4ACB3, 0xAEB5A8AC, 0xA8ADB4A7, 0xB3A8ADB3,
+ 0xADB3A8AD, 0xA8ADB3A8, 0xB1A6ADB3, 0xADB3A8AB,
+ 0xA6A9AFA4, 0xB4A9ABB1, 0xAFB5AAAE, 0xAAB0B3AA,
+ 0xB5ACB0B3, 0xB0B5ACB2, 0xA9B0B4AE, 0xB0A7ABAF,
+ 0xAFB4ABAB, 0xB2B1B7B2, 0xC0BBB0B7, 0xBAC0BBBA,
+ 0xBAB9BFBA, 0xBEBCB9BF, 0xBBBEBCBB, 0xBBBABEB9,
+ 0xBFBABCC0, 0xBABEB9BB, 0xBDBABDBB, 0xBBB9BCBF,
+ 0xB8BBB9B8, 0xB9BABEB9, 0xBEB9BABE, 0xBABDBBBA,
+ 0xBCBABFBD, 0xBFBDB9BE, 0xB5BAB8BA, 0xBDBABDBB,
+ 0xBDBBBCBF, 0xB8BDBBB8, 0xBDBBC0BE, 0xBCB9BABF,
+ 0xB7BEBBB5, 0xBBB7BDBC, 0xBDBCB6BC, 0xB6BCBBB7,
+ 0xBDB6BDBA, 0xBFBEB9C0, 0xB9BFBEB9, 0xBCB9BFBE,
+ 0xBFBEB7BD, 0xB9BFBEB9, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBEBABF, 0xBAC0BFB9,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBFBBC0BE, 0xC0BEBCC1,
+ 0xBBC0BEBB, 0xC0BABFBE, 0xBDBCBABF, 0xB7BDBCB8,
+ 0xC0BABFC0, 0xC0C0B8C0, 0xB8C0BFB8, 0xBEBAC1BE,
+ 0xC0BFBAC1, 0xB8C0BFBA, 0xBFB8C0BF, 0xC1BEB8C0,
+ 0xBAC1BEB8, 0xBDB8BFBC, 0xC0BFB9C0, 0xB9BFBEBA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BEBDB9, 0xBEB9BFBE,
+ 0xBFBFB7BF, 0xBAC2C2B7, 0xA7B8C0C0, 0xB0B09FA7,
+ 0xB8C0C0A8, 0xBEBBC1C0, 0xC0BFB9BF, 0xB8BEBDBB,
+ 0xBDB7BDBC, 0xC0BDB6BE, 0xB9C0BDB9, 0xBDB9BEBC,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBCBABFBD, 0xBEBEB9BE,
+ 0xBABCBCBC, 0xC1BEC0C1, 0xC0C0BEC0, 0x8B8C8AC0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0xC0565E5E, 0xC0C0B6C0,
+ 0xB8C0C0B8, 0xBFBAC0BF, 0xBFC0BAC0, 0xBAC0BFBA,
+ 0xBDB9BFBE, 0xC0BDB9C0, 0xB9C0BDB9, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBFB8C0BF, 0xBFBFB8C0, 0xB8BFC2B7,
+ 0xBFB8C0C0, 0xC0C0B7BF, 0xB9C1C1B8, 0xBEB8C0C0,
+ 0xBFBFB6BE, 0xB8C0C0B7, 0xC0B7BFBF, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xBFB6BEBE, 0xBFBFB7BF, 0xB8C0C0B7,
+ 0xBBB8C0C0, 0xBCBCB3BB, 0xB8C0C0B4, 0xC0B8C0C0,
+ 0xBEBEB8C0, 0xB8C0C0B6, 0xBFB9BEBF, 0xBFBEB9BE,
+ 0xB9BFBEB9, 0xC0BABFC0, 0xC0C0BABF, 0xB8C0C0B8,
+ 0xC1B8BFC2, 0xBCBDB9C1, 0xBAC0BFB7, 0xBEBAC0BF,
+ 0xBEBFB7BF, 0xB9BEBFB9, 0xBFBABFBE, 0xC1BEBBC0,
+ 0xB9C0BDBA, 0xBEB9BFBE, 0xBEBDB9BF, 0xBAC0BFB8,
+ 0xBEB5BBBA, 0xC0C0B9BF, 0xB8C0BFB8, 0xBBBBC1C0,
+ 0xBEBDB7BE, 0xBAC0BFB8, 0xBEBAC0BF, 0xC1BEBAC1,
+ 0xBAC1BEBA, 0xBCBABFBE, 0xBFBEB7BD, 0xB9BFBEB9,
+ 0xBFBCBFBD, 0xBFBDC0C1, 0xBCBFBDBE, 0xBABDBFBF,
+ 0xBEBCB6BB, 0xBABFBDB9, 0xBCB9BEBC, 0xBEBCB9BE,
+ 0xB9BEBCB9, 0xB7B8BEB9, 0xBCB7B6BC, 0xB6BCB7B6,
+ 0xB7B8BEB9, 0xBEB9B6BC, 0xB8BCB6BA, 0xB3B5BAB1,
+ 0xBBB2B7BC, 0xB4BBB4B6, 0xB0ADB4AF, 0xA8A1AEB5,
+ 0xA1A99FA0, 0x9BA7ADA2, 0xA498A3A7, 0xA3A79BA0,
+ 0x999DA398, 0xA69B9EA4, 0x9FA59AA0, 0x979FA699,
+ 0xA3969FA6, 0x9AA3969A, 0x939CA394, 0x9E929DA2,
+ 0x9B9F939A, 0x91979E91, 0x9A8E979E, 0x979B8F96,
+ 0x90999D91, 0x9B8E989C, 0x94998A94, 0x87929586,
+ 0x91859396, 0x8D94878D, 0x828B9186, 0x8478878D,
+ 0x80857680, 0x70797D71, 0x7B72787C, 0x191B1578,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000101, 0x00000102, 0x01000000, 0x00010000,
+ 0x07080907, 0x514D0809, 0x78787252, 0x60696D61,
+ 0x4741686C, 0x00020045, 0xA070736A, 0xABA2A5AB,
+ 0xA7ACA3A6, 0x999DA398, 0xA59AA0A4, 0xA0A39AA1,
+ 0x7A7A7B79, 0x2C2C7A7A, 0x2C2C2C2C, 0x00363735,
+ 0x01000001, 0x00010000, 0x00010200, 0x01000001,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000102,
+ 0x00010002, 0x00000100, 0x00000001, 0x01010100,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00030100,
+ 0x01000200, 0x00010000, 0x02000100, 0x01000304,
+ 0x0B0C0800, 0x2E303331, 0x66612F33, 0x93979162,
+ 0x999EA499, 0xA4999EA4, 0xA0A499A0, 0xA8B0B1A8,
+ 0xB0A7B0B1, 0xB0B0AAAF, 0x0052534F, 0x7C770001,
+ 0x787C7678, 0x6F72776E, 0x04007378, 0x00030100,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000200, 0x02000002, 0x00000000, 0x00000000,
+ 0x02000002, 0x4D3E3A39, 0x51495451, 0x66655B53,
+ 0x6F727369, 0x7A6F797B, 0x7B796E7C, 0x80808074,
+ 0x857B8A8C, 0x7E7F7584, 0x72807E74, 0x7D72817D,
+ 0x7F7D727F, 0x636E6C61, 0x27266E6B, 0x0907072B,
+ 0x00000000, 0x00000000, 0x00010000, 0x8F4E504A,
+ 0x97919398, 0x93988F93, 0x90969990, 0x99909899,
+ 0x98999098, 0x90989C91, 0x9C90989C, 0x989C9198,
+ 0x8A909489, 0x312D9093, 0x00010032, 0x08080907,
+ 0x0807090A, 0x0A0A040A, 0xA28A8E82, 0xA996ADB3,
+ 0xA4A895A5, 0x99A5A996, 0xAB98A8AC, 0xA7AD9AA5,
+ 0x96A4AA99, 0xA797A1A7, 0xA3A696A4, 0x9BA4A797,
+ 0xAB9BA8AB, 0xA8AB9BA8, 0x9EACAF9F, 0xAC9BABAE,
+ 0xA3A998A6, 0x9FA6AC9B, 0xAFA0AAB0, 0xA8AD9EAA,
+ 0xA4A8ACA0, 0xAB9FACB0, 0xABAFA3A7, 0xA0A8ACA0,
+ 0xB1A5A8AC, 0xACB0A4AD, 0xA4ADB1A5, 0xB4A8ACB0,
+ 0xADB1A5B0, 0xA4B0B4A8, 0xB0A4ACB0, 0xACB0A4AC,
+ 0xA4A8ACA0, 0xB5A9ACB0, 0xB0B4A9B1, 0xAAAEB3AA,
+ 0xB5ACB0B3, 0xB1B4ABB2, 0xA8B0B3AA, 0xB6ADACB1,
+ 0xAFB4ABB1, 0xB3ADB3AE, 0xB8B3B2B8, 0xB6BCB7B1,
+ 0xBDBEC3C1, 0xBEB9BCBF, 0xBBBFBABA, 0xBBBAC0BB,
+ 0xC0BBBAC0, 0xBBC1BCBA, 0xB9BABEB9, 0xBBB9BABE,
+ 0xBBBCBABA, 0xBBBBBFBA, 0xBFBABCC0, 0xBBBFBABB,
+ 0xBCBBBEBC, 0xBCB7B9BE, 0xB8BEB9B6, 0xBBBCBFBD,
+ 0xBBB9BABD, 0xBCBFBDB8, 0xBBB9BEBC, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBBB6BBB9, 0xBFBEB8BD, 0xBABFBEBA,
+ 0xBDBAC1BE, 0xBFBEB9C0, 0xBABFBEBA, 0xBBB8BDBC,
+ 0xBFBEB7BC, 0xB9BFBEB9, 0xBDB9C0BD, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBEBABFBD, 0xC0BFBBC0, 0xBAC0BFBA,
+ 0xBEBAC1BE, 0xC0BEBAC1, 0xBBC0BEBB, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBABFBDBB, 0xBEBBC0BF, 0xBFBDBBC0,
+ 0xBCC1BFBC, 0xC0BDC2C1, 0xBEBDBCC1, 0xB9BFBEB8,
+ 0xBFBBC1C0, 0xBFBEBAC0, 0xB7BFBEB7, 0xBEBAC1BE,
+ 0xC0BFBBC0, 0xBAC0BFBB, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB8C0BF, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xBEBFB8C0, 0xB8BDBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xBAC0BFB9, 0xB0BABFC0, 0xB4B4AAAF,
+ 0xB7BFBFAC, 0xBDB9C1C0, 0xBFBEB6BE, 0xBAC0BFB9,
+ 0xBAB6BDBA, 0xC0BDB6BD, 0xB9C0BDB9, 0xBDBABFBD,
+ 0xBFBDBCBF, 0xB9BEBCBA, 0xBDBAC1BE, 0xBFBEB9C0,
+ 0xB8BDBCBA, 0xC0BABFC0, 0xC1C0BABF, 0x878C8BBC,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0xC0565E5E, 0xC0C0B8C0,
+ 0xBABFC0B8, 0xBFBAC0BF, 0xBEBFBAC0, 0xB9BFBEBA,
+ 0xBDB9BFBE, 0xC0BDB7C0, 0xB9C0BDB9, 0xBDB9C0BB,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBDB9C0BD, 0xC0BDB9C0,
+ 0xB9C0BDB9, 0xBEB8C1BE, 0xBFBFB7BF, 0xB8BFC2B7,
+ 0xC1B8C0C0, 0xC1C1B9C1, 0xB8C0C0B9, 0xC0B8C0C0,
+ 0xC1C1B8C0, 0xB6BEBEB9, 0xC0B8C0C0, 0xC1C1B8C0,
+ 0xB7BFBFB9, 0xBFB7BFBF, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBDBDB8C0, 0xB6BEBEB5, 0xC0B8C0C0,
+ 0xBEBEB8C0, 0xB8C0C0B6, 0xBFBABFC0, 0xBFBEB9BE,
+ 0xB9BFBEB9, 0xC0BBC0C1, 0xC0C0BABF, 0xB8C0C0B8,
+ 0xC2B8BFC2, 0xBDBDB8BF, 0xB8C0BFB5, 0xBEB7BFBE,
+ 0xBFC0B7BF, 0xB9BEBFBA, 0xBEB8BEBD, 0xBDBBB9BF,
+ 0xB9C0BDB8, 0xBCBAC0BF, 0xBCBBB7BD, 0xB9BFBEB6,
+ 0xC0B8BEBD, 0xBFBEBBC1, 0xB8C0BFB9, 0xBFBAC1BE,
+ 0xBFBCBBC2, 0xB8BFBCB8, 0xBEBAC1BE, 0xC2BFBAC1,
+ 0xB9C0BDBB, 0xBEBABFBE, 0xBDBCBABF, 0xB7BCBBB8,
+ 0xBEBEC1BF, 0xC1BFBFC0, 0xBEBFBDC0, 0xBCBBBDBD,
+ 0xBDBBBABC, 0xBABFBDB8, 0xBCB9BEBC, 0xBEBBB9BE,
+ 0xB8BFBCB7, 0xB7B9BFBA, 0xBBB6B6BC, 0xB6BCB7B5,
+ 0xB6B7BDB8, 0xBDB8B5BB, 0xB8BCB6B9, 0xB1B4B9B0,
+ 0xBBB2B6BC, 0xB3BBB1B6, 0xAFADB4AF, 0xA9A1ABB5,
+ 0xA0A99F9E, 0xA0A3A99E, 0xA79BA8AC, 0xA0A498A5,
+ 0x9CA1A79C, 0xA59AA1A7, 0x9FA6999F, 0x979DA497,
+ 0xA3969FA6, 0x99A0939C, 0x909BA091, 0xA0949A9F,
+ 0x9EA2969C, 0x92989F92, 0x9F93989F, 0x979B8F9B,
+ 0x90969A8E, 0x9E8F989C, 0x94998A97, 0x87959889,
+ 0x95899396, 0x8D938891, 0x828A9288, 0x897C858D,
+ 0x80847882, 0x71777B6F, 0x7C73787C, 0x191B1579,
+ 0x00000100, 0x00000001, 0x00010000, 0x00000000,
+ 0x00000001, 0x00010000, 0x00000100, 0x00000001,
+ 0x01010100, 0x00000000, 0x02000000, 0x00010001,
+ 0x07090909, 0x09050809, 0x7878720A, 0x60686C61,
+ 0x251F676B, 0x00020023, 0xA370736A, 0xABA2A9AC,
+ 0x70736AA8, 0x316E6F66, 0x3A31393A, 0x04030039,
+ 0x08060606, 0x04060706, 0x08050707, 0x00000000,
+ 0x00000001, 0x00010000, 0x00020000, 0x00000200,
+ 0x02000002, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00020000, 0x00000200,
+ 0x02000002, 0x00000100, 0x00000102, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000001, 0x00010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x01010100, 0x00020000,
+ 0x00000200, 0x01010100, 0x01000000, 0x01010101,
+ 0x00000001, 0x00000000, 0x01000000, 0x00020000,
+ 0x31000400, 0x3930353A, 0x6C6F6636, 0x72787773,
+ 0xB0AC7776, 0xB0AFABB1, 0x00525351, 0x54520001,
+ 0x797D7851, 0x4A717871, 0x04004A51, 0x00040000,
+ 0x01010101, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010101, 0x00000100,
+ 0x01000000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000200, 0x00010002, 0x00000000, 0x00000000,
+ 0x1D191802, 0x4B53504C, 0x645C5350, 0x64655B66,
+ 0x6D727369, 0x766B7779, 0x7F7D7278, 0x807E8074,
+ 0x8C81888C, 0x7E7F7588, 0x737F7D73, 0x7E737F7D,
+ 0x7F7D7280, 0x62706C61, 0x27266D6A, 0x0805072B,
+ 0x00000000, 0x00000000, 0x00010000, 0x8F4E504A,
+ 0x998F9398, 0x93988F91, 0x90969990, 0x9C939899,
+ 0x9B9C929B, 0x90999D92, 0x9C91989C, 0x989B9298,
+ 0x005E625C, 0x02000002, 0x00000001, 0x07080808,
+ 0x08040A08, 0x7E7C740B, 0x95AEB3A4, 0xA794A2A8,
+ 0xA4A895A3, 0x98A4A797, 0xA797A5A8, 0xA2A897A4,
+ 0x9AA4AA99, 0xAC9CA5AB, 0xA5A898A9, 0x98A5A898,
+ 0xA797A5A8, 0xA3A696A4, 0x9BA5A898, 0xAE9EA8AB,
+ 0xA8AE9DAB, 0x9BA6AC9B, 0xAE9FA6AC, 0xAAAFA0A9,
+ 0xA4A7AB9F, 0xB0A4ACB0, 0xADB1A5AC, 0xA3ABAFA3,
+ 0xB0A4ABAF, 0xB1B5A9AC, 0xA9B0B4A8, 0xB4A8B1B5,
+ 0xAFB3A7B0, 0xA4ADB1A5, 0xB0A4ACB0, 0xADB1A5AC,
+ 0xA8A8ACA0, 0xB3A7B0B4, 0xACB0A4AF, 0xAAABB0A7,
+ 0xB2A9B0B3, 0xB3B4ABAF, 0xAAAEB1A8, 0xB4ABB0B3,
+ 0xB1B6ADB1, 0xAEAAB1AA, 0xB3AEADB3, 0xB2B8B3AD,
+ 0xBFBBBEBC, 0xC5C0C0C4, 0xBABEB9C1, 0xBCBAC0BB,
+ 0xC0BBBBC1, 0xB8BEB9BA, 0xB6BABEB9, 0xBDBBB7BB,
+ 0xBCBDBBBC, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBDBCBFBD, 0xBDB8BCBF, 0xB8BEB9B7, 0xB9BCBFBD,
+ 0xBDBBB8BB, 0xBCBFBDBA, 0xBEB9BEBC, 0xBFBDBBC0,
+ 0xB5BAB8BA, 0xBDB5BAB8, 0xBFBEBABF, 0xB8BDBCBA,
+ 0xBBB6BDBA, 0xBFBEB7BE, 0xB8BDBCBA, 0xBEB8BDBC,
+ 0xBEBDBABF, 0xB9BFBEB8, 0xBDB9C0BD, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBEBABF, 0xB9BFBEB9,
+ 0xBEBAC1BE, 0xC0BEBAC1, 0xBBC0BEBB, 0xBFBAC0BF,
+ 0xC0BEBAC0, 0xB9BEBCBB, 0xBFBBC0BF, 0xC1BFBBC0,
+ 0xBBC0BEBC, 0xBBBBC0BF, 0xBDBCB7BC, 0xBBC1C0B7,
+ 0xBEBAC0BF, 0xBEBDB9BF, 0xBAC0BFB8, 0xBEBAC1BE,
+ 0xC0BFBBC0, 0xBAC0BFBB, 0xC0BABFC0, 0xBFC2B8C0,
+ 0xB8C0C0B8, 0xBDB8C0C0, 0xC0C0B6BE, 0xB8C0C0B8,
+ 0xC0B7BFBE, 0xBEBFB9C1, 0xBABFC0B9, 0xBEBBC0BF,
+ 0xBFBEB9BF, 0xBAC0BFB9, 0xB5B5BABB, 0xBBBBAFB4,
+ 0xB8C0C0B3, 0xBFB8C0BF, 0xBFBEB8C0, 0xB9BFBEB9,
+ 0xBBB8BFBC, 0xBFBCB7BE, 0xBABFBDB8, 0xBDBDC0BE,
+ 0xBFBDBCBF, 0xBABFBDBA, 0xBCB8BFBC, 0xBFBEB8BF,
+ 0xB8BEBDBA, 0xC0BABFC0, 0xC0BFB8C0, 0x848A89BA,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585D5E, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xC1BABFC0, 0xBFC0BBC0, 0xBAC0BFBB,
+ 0xBDBAC0BF, 0xC0BDB7C0, 0xB7C0BDB7, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBDB9C0BD, 0xC0BBB9C0,
+ 0xB9C0BBB9, 0xBCBAC1BE, 0xBEBFB7BD, 0xBABFC0B9,
+ 0xC0B9C1C1, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xBFB8C0C0, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB7BFBFB8,
+ 0xBDBAC0BF, 0xBCBCB8BE, 0xB5BDBDB4, 0xBEB9C1C1,
+ 0xBEBEB6BE, 0xB8C0C0B6, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBFBABFC0, 0xC0C0B9BE, 0xB8C0C0B8,
+ 0xC0B6BFC2, 0xBDBDB4BD, 0xB3BDBDB3, 0xBEB7BFBE,
+ 0xBFBEB9BF, 0xB7BFBEB7, 0xBEB7BFBE, 0xBDBCB9BF,
+ 0xB8BDBCB8, 0xBEBABFBE, 0xBFBDBABF, 0xB8BDBBBA,
+ 0xBCBBC0BE, 0xC0BFB8BF, 0xBBC1C0BA, 0xBCBAC1BE,
+ 0xBFBCBAC1, 0xB8BFBCB8, 0xBEB8BDBB, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBFB9BFBE, 0xBEBDBBC0, 0xB8BABAB9,
+ 0xBFB9BCBA, 0xBFBDBEC1, 0xBEBFBDBE, 0xBEBDBFBF,
+ 0xBFBDBCBE, 0xB9BCBABC, 0xBCB9BEBC, 0xBFBCB9BE,
+ 0xB8BFBCB8, 0xB7B6BCB7, 0xBDB8B8BC, 0xB7BBB6B9,
+ 0xB9B8BCB7, 0xBDB8BABE, 0xB7BEB7B7, 0xAFB6BBB2,
+ 0xBCB1B4BA, 0xB4BCB2B6, 0xB6B2BCB6, 0xAAA2B2BC,
+ 0xA1A99F9F, 0xA0A6AA9F, 0xA89CAAAC, 0xA3A79BA4,
+ 0x999DA497, 0xA69B9FA6, 0x9FA397A2, 0x949CA396,
+ 0x9F909CA3, 0x9A9F9098, 0x929DA293, 0x9E929CA1,
+ 0x989C909A, 0x92979D92, 0x9F93979D, 0x999D919B,
+ 0x8D94998A, 0x998A979C, 0x94998A92, 0x89959889,
+ 0x95899598, 0x8B918691, 0x82858D83, 0x887D848C,
+ 0x82887D82, 0x70787C71, 0x7B72777B, 0x1A1C1678,
+ 0x00000100, 0x00000001, 0x02010002, 0x00000100,
+ 0x01000001, 0x00010000, 0x00010200, 0x00000001,
+ 0x02000002, 0x00020000, 0x01000001, 0x00010002,
+ 0x07080907, 0x09050809, 0x2C2E2808, 0x62686B62,
+ 0x251F686B, 0x00020023, 0x343A3A34, 0x3A343A3A,
+ 0x02020038, 0x00070400, 0x04000704, 0x07040007,
+ 0x07080606, 0x06080605, 0x06060607, 0x00000100,
+ 0x02000001, 0x00010001, 0x00000100, 0x00000001,
+ 0x02000002, 0x00020000, 0x00000200, 0x02000002,
+ 0x00000100, 0x01000002, 0x00010000, 0x00020000,
+ 0x01000200, 0x04000005, 0x00040000, 0x00000400,
+ 0x02010002, 0x00000200, 0x01000001, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00000101, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x01020000,
+ 0x00000400, 0x04000004, 0x02030002, 0x06070505,
+ 0x3D3D0806, 0x3F3D3D3F, 0x00292929, 0x53510102,
+ 0x787C7750, 0x00737772, 0x04000004, 0x00040000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x19180000,
+ 0x504B481D, 0x5C54504B, 0x645C6664, 0x78796F66,
+ 0x6E78796F, 0x796E7A7A, 0x7E7C717B, 0x7B807F75,
+ 0x857A8485, 0x7E7F7581, 0x727F7E74, 0x7D737E7C,
+ 0x79776D7F, 0x63706C61, 0x27266E6B, 0x0805072B,
+ 0x00000000, 0x00000001, 0x00010000, 0x8F4C504A,
+ 0x998F9398, 0x93988F91, 0x90969990, 0x998F9899,
+ 0x9B9C9298, 0x91989C91, 0x9B92989C, 0x32332F98,
+ 0x00000100, 0x01000001, 0x00010000, 0x08080808,
+ 0x7B730B09, 0xB8B8AC7D, 0x95A4A797, 0xA895A4A8,
+ 0xA4A895A4, 0x98A7A996, 0xA797A5A8, 0xA4A797A4,
+ 0x93A1A494, 0xAA9AA2A6, 0xA6A999A7, 0x98A5A898,
+ 0xA797A5A8, 0xA4A797A4, 0x99A7A898, 0xA898A8A9,
+ 0xA8AB9BA7, 0x9DA7AD9C, 0xAC9DA8AE, 0xA6AB9CA7,
+ 0xA3ACB0A4, 0xAFA3ABAF, 0xAEB2A6AB, 0xA3ABAFA3,
+ 0xAB9FABAF, 0xABAFA3A7, 0xA5ABAFA3, 0xB3A7ADB1,
+ 0xB1B5A9AF, 0xA8B0B4A8, 0xB4A8B0B4, 0xADB1A5B0,
+ 0xA8ABAFA3, 0xB4A8B0B4, 0xB0B4A8B0, 0xAAB1B4AB,
+ 0xB3AAB0B3, 0xADB0A7B0, 0xABB0B1A7, 0xB5ABB4B5,
+ 0xB2B5ACB4, 0xA9A8AFA8, 0xB4ADA9B0, 0xAFB3ADAD,
+ 0xB4AFB3AE, 0xC4BFB5B9, 0xC1C5BFC0, 0xBABAC0BB,
+ 0xC0BBB9BF, 0xB8BCB7BC, 0xB9B3B7B2, 0xBDBBBABE,
+ 0xBABDBBBA, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBCBCBFBD, 0xBAB8BBBE, 0xBCBFBDB7, 0xB9BABBB7,
+ 0xBFBDBCBD, 0xBCBFBDBC, 0xBBB8BDBB, 0xBBB9B8BD,
+ 0xB8BBB9B8, 0xBBB9BEBC, 0xBCBBB8BD, 0xBABFBEB7,
+ 0xBDB9C0BD, 0xBDBCB9C0, 0xB6BBBAB8, 0xBBB7BCBA,
+ 0xBDBCB8BD, 0xBBC0BFB8, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBCBABFBD, 0xC0BDB9BE, 0xB9C0BDB9,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEB9C0BD,
+ 0xBFBDBAC1, 0xBABDBBBA, 0xBDBCC1BF, 0xC0BEBABF,
+ 0xBAC1BEBB, 0xBBB9C0BD, 0xBBB9B7BE, 0xB5BAB8B6,
+ 0xB9B6BBB9, 0xBFBEB6BB, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xBEBFBAC0, 0xBBC0C1B9, 0xBFBAC0BF, 0xC0C1BAC0,
+ 0xBABFC0BB, 0xBFB8C0C0, 0xC0BFB7BF, 0xBAC0BFBA,
+ 0xBFB9BFBE, 0xBEBFBAC0, 0xB9BEBFB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB8C0BFB9, 0xBBB4B9BA, 0xBFC0B5BA,
+ 0xBABFC0BA, 0xBEB7BFBE, 0xBFBEB7BF, 0xB9BFBEB9,
+ 0xBDBBC0BE, 0xBFBDBABF, 0xBABFBDBA, 0xBDBCBFBD,
+ 0xBFBDBCBF, 0xBABFBDBA, 0xBCB7BEBB, 0xBFBEB8BF,
+ 0xBAC0BFBA, 0xC0BABFC0, 0xC0BFB8C0, 0x868B8ABA,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585D5E, 0xBFC0BABF,
+ 0xBBBFC0BB, 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BB,
+ 0xBDBBC1C0, 0xC0BDB7C0, 0xB7C0BDB7, 0xBDB9C0BD,
+ 0xC0BFB9C0, 0xBAC0BFBA, 0xBDB9C0BD, 0xC0BBB9C0,
+ 0xB8BFBAB9, 0xBDB9C0BD, 0xBEBFB8BE, 0xBABFC0B9,
+ 0xC0B8C0C0, 0xC1C1B8C0, 0xB8C0C0B9, 0xC0B7BFBF,
+ 0xBEBEB8C0, 0xB8C0C0B6, 0xBFB8C0C0, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBCBAC0BF, 0xBDBDB7BD, 0xB5BDBDB5, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB9BFBE, 0xBFBEBAC0,
+ 0xB8BEBDB9, 0xBEB8BDBE, 0xC0C0B8BD, 0xB8C0C0B8,
+ 0xBBB6BFC2, 0xBABAADB9, 0xAFB9B9AE, 0xBEB7BFBE,
+ 0xBFBEB9BF, 0xB6BEBDB9, 0xBEB7BFBE, 0xBFBEB7BF,
+ 0xBABFBEBA, 0xBCB6BBBA, 0xBDBBB8BD, 0xB6BBB9B8,
+ 0xBBB4BBB8, 0xBDBCB7BE, 0xB9BFBEB7, 0xBAB8BFBC,
+ 0xBFBCB8BF, 0xBAC1BEB8, 0xBAB7BCBA, 0xC0BEB7BC,
+ 0xBCC1BFBB, 0xBEBAC0BF, 0xBFBEB9BF, 0xBCBEBEBA,
+ 0xBBB8BBB9, 0xC1BFBABD, 0xC0C1BFC0, 0xBEBCBEBE,
+ 0xBFBDBCBE, 0xBABDBBBC, 0xBCB9BEBC, 0xBDBBB9BE,
+ 0xBABFBDB8, 0xB7B9BDB8, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB7B9BDB8, 0xBDB8B8BC, 0xB9BDB7B9, 0xB1B7BCB3,
+ 0xB8AFB4BC, 0xB4BCB2B3, 0xB5B4BCB5, 0xA8A1B4BC,
+ 0xA2AAA0A0, 0x9DA8ACA1, 0xAA9EA5A9, 0xA4A89CA6,
+ 0x989FA699, 0xA59A9EA5, 0xA0A499A1, 0x949DA195,
+ 0xA3949EA3, 0x9EA3949E, 0x93A1A697, 0xA1959DA2,
+ 0x989C909D, 0x8F969D90, 0x9E92959C, 0x999D919A,
+ 0x8C989D8E, 0x9788969B, 0x94998A90, 0x8996998A,
+ 0x93889598, 0x8D93888F, 0x87889187, 0x877C8891,
+ 0x7D83787F, 0x72787C71, 0x7B72797D, 0x595C5378,
+ 0x30383930, 0x38303839, 0x3839303A, 0x30383832,
+ 0x38323839, 0x38393038, 0x30393A31, 0x37323839,
+ 0x3A37323A, 0x323A3732, 0x38323838, 0x39383438,
+ 0x2A2E2D29, 0x2E282D2E, 0x2E2E282E, 0x3E47483F,
+ 0x483F4748, 0x47483F47, 0x343A3A34, 0x3A343A3A,
+ 0x3A3A3438, 0x313B3833, 0x38333C39, 0x3B38333C,
+ 0x2B312E2A, 0x2C2B2E2C, 0x2E2D292E, 0x30383832,
+ 0x38323839, 0x393A3138, 0x30383930, 0x39303839,
+ 0x38383238, 0x3034332F, 0x33323534, 0x35343037,
+ 0x2C32322C, 0x332A3232, 0x32322C32, 0x282F2C27,
+ 0x2C282F2C, 0x2F2C282F, 0x272F2C28, 0x2C282E2B,
+ 0x2D2D272F, 0x2C32332A, 0x01003032, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x01000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00010101, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000100, 0x01000001, 0x00010000,
+ 0x01000301, 0x03010003, 0x02030102, 0x07080507,
+ 0x04060805, 0x07070707, 0x00000000, 0x2A2A0000,
+ 0x272A2828, 0x01000301, 0x03010003, 0x00030100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000002, 0x00000000,
+ 0x01000001, 0x00010000, 0x18000100, 0x4D491B19,
+ 0x504C4750, 0x5C67645C, 0x796F6766, 0x78796F7A,
+ 0x717D7C72, 0x7C717D7D, 0x7B796E7E, 0x6F7A796F,
+ 0x7F757A79, 0x7D7E747E, 0x7385847A, 0x786E7E7D,
+ 0x72716779, 0x63706C61, 0x2726706A, 0x0805072C,
+ 0x00020000, 0x00000001, 0x00010000, 0x8F4C504A,
+ 0x998F9398, 0x93998E91, 0x93969A8F, 0x9C929C9D,
+ 0xA2A3999B, 0x61989B92, 0x01006567, 0x00010000,
+ 0x00000000, 0x01000000, 0x00010000, 0x76080905,
+ 0xB7AB7A7C, 0xB7B8A8B7, 0x95A6A797, 0xA895A4A8,
+ 0xA4A895A4, 0x95A4A895, 0xA898A4A8, 0xA5A898A5,
+ 0x94A3A794, 0xA696A3A7, 0xA3A696A3, 0x9BA4A797,
+ 0xA898A8AB, 0xA8AB9BA5, 0x9BAAAB9B, 0xAB9BAAAB,
+ 0xA8AB9BAA, 0x9EA3A998, 0xAFA0A9AF, 0xA8AD9EAA,
+ 0xA0A8ACA0, 0xAFA3A8AC, 0xADB1A5AB, 0xA5ACB0A4,
+ 0xB1A5ADB1, 0xABAFA3AD, 0xA3ABAFA3, 0xACA0ABAF,
+ 0xAAAEA2A8, 0xA5ACB0A4, 0xB5A9ADB1, 0xAAAEA2B1,
+ 0xA8ABAFA3, 0xB4A8B0B4, 0xB0B4A8B0, 0xAAAEB1A8,
+ 0xB3AAAEB3, 0xAEB1A8B0, 0xA9B2B6AB, 0xB4AAB2B3,
+ 0xAEB2A7B3, 0xAEAEB6AC, 0xB3ADAEB5, 0xAFB3ADAF,
+ 0xADB0B4AF, 0xB9B3AFB3, 0xC0C4BEB5, 0xBBBDC3BE,
+ 0xBBB6BAC0, 0xB8BCB7B7, 0xB9BABEB9, 0xBEBCBABE,
+ 0xBABDBBBB, 0xBABABEB9, 0xBFBABBBF, 0xBCC0BBBB,
+ 0xB9B8BBB9, 0xBDBBB8BB, 0xB8BBB9BA, 0xBBBABBB7,
+ 0xC0BEBCC0, 0xBCBFBDBD, 0xB8B6BBB9, 0xBBB9B5BA,
+ 0xB8BDBBB8, 0xBBB9BEBC, 0xBDBCB8BD, 0xBABFBEB8,
+ 0xBCB9C0BD, 0xBBBAB8BF, 0xB8BDBCB6, 0xBBBABFBD,
+ 0xBFBEB8BD, 0xBABFBEBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBDBABFBD, 0xC0BDBABF, 0xB9C0BDB9,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBABFBD,
+ 0xBFBDBBC0, 0xB7BCBABA, 0xBEBBC0BE, 0xC1BEBAC1,
+ 0xB8BFBCBA, 0xBDB4BBB8, 0xC2C0B9C0, 0xBCC1BFBD,
+ 0xB9B9BEBC, 0xBCBAB6BB, 0xB8BDBCB7, 0xBEBAC0BF,
+ 0xC0C1B9BF, 0xBAC0BFBB, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBABFC0BA, 0xC0BABFC0, 0xBFBEB8C0, 0xB7BDBCB9,
+ 0xBCB6BCBB, 0xBEBFB7BD, 0xB9BEBFB9, 0xBFB9BFBE,
+ 0xBEBDBAC0, 0xB6BEBDB6, 0xC1B4B9BA, 0xBFC0BBC0,
+ 0xBAC0BFBA, 0xBDB9C0BD, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xBDB8BEBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBCBFBD,
+ 0xBFBDBCBF, 0xBABFBDBA, 0xBBB9C0BD, 0xBCBBB7BE,
+ 0xBABFBEB7, 0xC0BABFC0, 0xC0BFB8C0, 0x868B8ABB,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC1595D5E, 0xC0C1BCC0,
+ 0xBEC0C1BE, 0xBEBABFBE, 0xBFC0B9BF, 0xBABFC0BA,
+ 0xBFBAC0BF, 0xBFBEBAC0, 0xB9BFBEB9, 0xBCB8C0BF,
+ 0xBFBFB5BD, 0xB8C0BFB7, 0xBDB7C0BD, 0xC0BDB7C0,
+ 0xB9C0BDB9, 0xBCBAC0BF, 0xBEBFB7BD, 0xBBC0C3BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0,
+ 0xC0C0B7BF, 0xB9C1C1B8, 0xC0B9C1C1, 0xBFBFB8C0,
+ 0xB8C0C0B7, 0xBEB7BFBE, 0xBFBEB7BF, 0xB8BEBDB9,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xB9BEBFB9, 0xC2B8BFC2,
+ 0xC0C0B8BF, 0xB7BFBFB8, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xBAC0BFBA, 0xC0BBC0C1, 0xBFC2BABF, 0xB9C0C3BA,
+ 0xBCB8C0C0, 0xB5B7B2BC, 0xACB8B8A9, 0xBEB7BDBC,
+ 0xC0BDB9BF, 0xB7BFBEB9, 0xC0B4BCBB, 0xBBBCB8C0,
+ 0xBBC0BFB7, 0xBAB7BCBB, 0xBCBBB6BD, 0xACB2B1B7,
+ 0xBBA8B0AF, 0xC0C0B3BB, 0xB5BABBB8, 0xBDB5BCB9,
+ 0xBFBEBABF, 0xB9BFBEB9, 0xBBB9BFBE, 0xBDBBB7BE,
+ 0xBAC0BBB8, 0xBDB9C0BD, 0xC1BEB9C0, 0xBABFBDBA,
+ 0xB9BABDBB, 0xBDBBB8BB, 0xBCBFBDBA, 0xBEBEBEBE,
+ 0xBFBDBEBE, 0xBCBFBDBC, 0xB8B8BDBB, 0xBDBBB5BA,
+ 0xB8BBB9B8, 0xB6B8BCB7, 0xBCB8B7BB, 0xB8BCB7BB,
+ 0xB4B8BCB6, 0xB9B3B6BA, 0xBABDB4B7, 0xB2B4BBB4,
+ 0xB8B1B3BC, 0xB4BCB2B1, 0xB1B4BCB2, 0xACA1B6BC,
+ 0xA6ACA1A6, 0x9CA2A89D, 0xA79CA1A7, 0xA0A69BA1,
+ 0x97A0A79A, 0xA2979DA4, 0x9FA3989E, 0x98A1A599,
+ 0xA498A0A4, 0x9BA091A0, 0x8F9A9F90, 0x9E8F9AA0,
+ 0x989F9097, 0x88989F90, 0x97889097, 0x9BA09192,
+ 0x8D959C8D, 0x9C8D959C, 0x94998A97, 0x89979A8B,
+ 0x978C9598, 0x91978C93, 0x83879086, 0x887E848D,
+ 0x81867D80, 0x787F8378, 0x6B628182, 0x696A616A,
+ 0x515F5F53, 0x5F515F5F, 0x605F5160, 0x51605E53,
+ 0x695D5F5F, 0x69695B69, 0x51676759, 0x5F535F5F,
+ 0x605E535F, 0x525E5C52, 0x50485D5C, 0x50514852,
+ 0x4A484940, 0x544A5354, 0x55544A55, 0x49565449,
+ 0x5C4E5654, 0x5E5C515D, 0x4F5C5B51, 0x534A5859,
+ 0x50544950, 0x414E4C42, 0x4C424F4A, 0x58564C4E,
+ 0x515E5C51, 0x5B525E5C, 0x5E5C5260, 0x51605E53,
+ 0x574B5F5F, 0x57574957, 0x49575749, 0x57495757,
+ 0x57574957, 0x4E58594F, 0x50475758, 0x5251474F,
+ 0x424E4C42, 0x4C424E4C, 0x4E4C424E, 0x3B46443A,
+ 0x443A4745, 0x46443A46, 0x3B46433B, 0x433B4643,
+ 0x46433B46, 0x3D45443A, 0x01004343, 0x00000100,
+ 0x01000001, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x08060509, 0x04090504, 0x08050708,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x01010100, 0x00020301,
+ 0x04000004, 0x02030000, 0x4A1A1915, 0x4F47524F,
+ 0x53514752, 0x6569695D, 0x786C7171, 0x78786C78,
+ 0x777B7C72, 0x7C718281, 0x7674697E, 0x69767469,
+ 0x847A7674, 0x86847A86, 0x78828078, 0x79708280,
+ 0x69685E78, 0x5B686459, 0x24236862, 0x08050729,
+ 0x00020000, 0x00000000, 0x00010000, 0x9350544E,
+ 0x9C91959D, 0x969D9096, 0x88909488, 0x93899094,
+ 0x92938A92, 0x0022241E, 0x00000001, 0x00000000,
+ 0x07070608, 0x08070707, 0x080A040A, 0xA78A8D84,
+ 0xA697AFB3, 0xA6A797A3, 0x95A7A898, 0xA595A4A5,
+ 0xA6A999A2, 0x91A3A794, 0xA7949EA4, 0xA2A895A1,
+ 0x96A9AD9A, 0xA996A5A9, 0xA4A895A5, 0x90A0A693,
+ 0xA8959DA3, 0xA2A895A2, 0x98A6AA97, 0xAC99A7AB,
+ 0xA8AC99A8, 0x97A6AC9B, 0xA99AA0A8, 0xA6AD9EA2,
+ 0x9EA6AA9E, 0xAA9FA6AA, 0xABAFA4A6, 0xA5ABAFA3,
+ 0xB1A5ADB1, 0xADB1A5AD, 0xA5B1B5A9, 0xB1A5ADB1,
+ 0xADB1A5AD, 0xA2ABB0A1, 0xB1A5ACB1, 0xA8ACA0AD,
+ 0xA9AFB1A5, 0xB3A7B1B5, 0xABB2A5AF, 0xABAEB3AA,
+ 0xB0A5ADB5, 0xAFB5AAAA, 0xA7AEB4A9, 0xB2A7AEB2,
+ 0xB1B5AAAE, 0xACAEB6AC, 0xB5ACAEB6, 0xB2B5ACB0,
+ 0xADB2B4AE, 0xB4AEB1B3, 0xB4B8B2B0, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABAC1BA, 0xC1BCBAC1,
+ 0xBCC0BBBB, 0xB9BABEB9, 0xBBB9BCBD, 0xB8BBB9B8,
+ 0xB9B5BBB6, 0xBAB8B8BE, 0xB7BAB8B7, 0xBDBCBFBD,
+ 0xBDBBBCBF, 0xB5BAB8BA, 0xB8B5BBB6, 0xBFBDB7BD,
+ 0xB7BCBABA, 0xBDB8BDBB, 0xBDBBB9C0, 0xB8BDBBB8,
+ 0xBABABFBD, 0xBBBAB7BC, 0xBABFBEB6, 0xBEBABFBD,
+ 0xC0BFBBC0, 0xBABFBEBB, 0xBBBABFBD, 0xBFBDB8BD,
+ 0xBABFBDBA, 0xBEBABFBD, 0xBFBDBBC0, 0xBABFBDBA,
+ 0xBDBAC1BE, 0xBFBDBABF, 0xBABFBDBA, 0xBEBABFBE,
+ 0xBFBEBABF, 0xB9BEBDBA, 0xBFBAC0BF, 0xBFBEBAC0,
+ 0xB7BDBCB9, 0xBEBAC0BF, 0xBFBEB9BF, 0xBBC0BEB9,
+ 0xB9BABFBD, 0xC2BDBABE, 0xB9BEBCBE, 0xBAB6BDBA,
+ 0xBCBBB6BD, 0xBAC0BFB6, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBAC0BFBB, 0xBEBAC0BF, 0xB9BAB9BF, 0xBABFC0B4,
+ 0xBEBAC0BF, 0xBFBFB9BF, 0xB7BFBFB7, 0xBEB8C0BF,
+ 0xBFBEB7BF, 0xB9BFBEB9, 0xBFB9BFBE, 0xBFBEBAC0,
+ 0xB8BDBCBA, 0xBDB8BDBB, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xBEBAC0BF, 0xBFBEB9BF, 0xB9BFBEB9, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBBB8BDBB, 0xBCBCB8BD,
+ 0xBABFBEBA, 0xC0BABFC0, 0xBFBEB8C0, 0x868B8ABA,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5D5E, 0xBFC1BEC0,
+ 0xBEC0C1C0, 0xBEBABFBE, 0xBEBFB9BF, 0xB9BEBFB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB7BFBE,
+ 0xC1C0B7BF, 0xB8C0BFB9, 0xBDB7C0BD, 0xC0BDB7C0,
+ 0xB9C0BDB9, 0xBEBAC0BF, 0xBEBFB9BF, 0xBABFC2B9,
+ 0xC0B8C0C0, 0xC1C1B8C0, 0xB8C0C0B9, 0xBFB7BFBF,
+ 0xC0C0B7BF, 0xB7BFBFB8, 0xC0B7BFBF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB7BFBE, 0xBFBEB7BF, 0xB7BDBCB9,
+ 0xBEB7BDBC, 0xBEBFB9BF, 0xB8BDBEB9, 0xC1B9C0C3,
+ 0xC0C0B7BE, 0xB8C0C0B8, 0xBFB8C0C0, 0xC1C0B7BF,
+ 0xBAC0BFBB, 0xC0BABFC0, 0xBFC2BABF, 0xBABFC2BA,
+ 0xBFBABFC0, 0xB9BBB7BF, 0xB1BDBDAD, 0xBEB9BEBF,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBFB3BBBA, 0xBFC0B7BF,
+ 0xB6BCBBBA, 0xBABAC0BF, 0xBCBBB5BB, 0xB7BDBCB6,
+ 0xBBB3BBBB, 0xB9BCB1BB, 0xB4BCBCB2, 0xBBB6BCBB,
+ 0xBFBEB8BD, 0xB8BEBDB9, 0xBDB9BFBE, 0xBEB9B9C0,
+ 0xB9BFBAB8, 0xBBB7BEBB, 0xC0BDB7BE, 0xBBC0BEB9,
+ 0xBDBCBFBD, 0xBBB9BCBF, 0xBABDBBB8, 0xBEBEBEBE,
+ 0xBFBDBEBE, 0xBBBEBCBC, 0xBABABFBD, 0xBBB9B7BC,
+ 0xBABDBBB8, 0xB7B8BCB7, 0xBAB6B8BC, 0xB8BCB7B9,
+ 0xB7B7BBB5, 0xBBB2B9BD, 0xB7BAB1B8, 0xB4B5BCB5,
+ 0xBBB4B3BB, 0xB4BCB2B3, 0xB1B6BCB1, 0xACA0B9BD,
+ 0xA8ACA0A8, 0x9CA2A89D, 0xA79C9FA7, 0xA2A89DA1,
+ 0x99A0A79A, 0xA3989FA6, 0x9EA2979F, 0x98A2A498,
+ 0xA599A0A4, 0x9BA091A1, 0x8A939889, 0xA091959B,
+ 0x989F9099, 0x8D959C8D, 0x9889959C, 0x90978893,
+ 0x8E8E9586, 0x9C8D969D, 0x969B8C97, 0x8B959889,
+ 0x978B9597, 0x8D938893, 0x82889187, 0x8D83838C,
+ 0x878C8385, 0x787E8277, 0x6A648081, 0x696A606A,
+ 0x4F5F5F51, 0x5F506161, 0x6B685962, 0x5C6A6A5A,
+ 0x685A6B6A, 0x6A695B69, 0x58707060, 0x66586868,
+ 0x61605267, 0x505E5D4F, 0x51465F5E, 0x52524653,
+ 0x3E49493D, 0x55474A4A, 0x56554756, 0x4D575648,
+ 0x5E4E5D5D, 0x5D5D4D5E, 0x475C5B4D, 0x54485555,
+ 0x52544852, 0x3E4E4C41, 0x4D3F4F4C, 0x504D3F50,
+ 0x4E585546, 0x5E50605D, 0x605D4F61, 0x50615E50,
+ 0x60526060, 0x60605061, 0x48585848, 0x57475758,
+ 0x58594956, 0x4C59594B, 0x5A4E5658, 0x59594D5A,
+ 0x41565449, 0x4C41504C, 0x504C4150, 0x3649453A,
+ 0x44394744, 0x46443946, 0x39484439, 0x443B4844,
+ 0x46443A49, 0x3B454339, 0x00004344, 0x00000102,
+ 0x01000001, 0x00000101, 0x00010000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x08060507, 0x06060906, 0x08060608,
+ 0x00010101, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x01010200, 0x00010001, 0x00010402,
+ 0x03000004, 0x04040001, 0x4737342F, 0x5147524F,
+ 0x6E6C6153, 0x63717163, 0x786A7171, 0x7F7F7178,
+ 0x72818377, 0x786D7B7C, 0x7674697A, 0x6F777368,
+ 0x837A7E7A, 0x86847A88, 0x78828078, 0x79708081,
+ 0x68695F76, 0x5A686459, 0x24236761, 0x08050729,
+ 0x01020000, 0x00000101, 0x00010000, 0x9251554F,
+ 0x9D92949C, 0x969D9097, 0x8A8F9387, 0x635A9195,
+ 0x02020062, 0x00000100, 0x00000001, 0x00000100,
+ 0x07080808, 0x0A040809, 0x78796F0A, 0x98AEB2A6,
+ 0xA899A2A7, 0xA5A696A5, 0x99A8A898, 0xA898A8A9,
+ 0xA0A393A7, 0x94A1A794, 0xA390A1A7, 0x9EA4919D,
+ 0x949FA390, 0xA996A3A7, 0xA5A996A5, 0x95A2A895,
+ 0xA693A2A8, 0x9FA592A0, 0x99A5AA95, 0xAC99A9AE,
+ 0xA6AC99A8, 0x9AA6AC9B, 0xA798A3AB, 0xA2A99AA0,
+ 0xA2A2A69A, 0xAEA3AAAE, 0xAAAEA3AA, 0xA1A8ACA0,
+ 0xAEA2A9AD, 0xADB1A5AA, 0xA9ACB0A4, 0xB1A5B1B5,
+ 0xB0B4A8AD, 0xA3B0B5A6, 0xAFA3ADB2, 0xA9ADA1AB,
+ 0xA5AAACA0, 0xB4A8ADB1, 0xAAB1A4B0, 0xA7A8B0A5,
+ 0xB5AAA9B1, 0xAEB6ABAD, 0xA6ADB3A8, 0xB4A9ABB1,
+ 0xB0B4A9B0, 0xACAFB4AB, 0xB5ACB0B5, 0xB2B5ACB2,
+ 0xAEB2B4AE, 0xB5ACB2B4, 0xAAAFA6B0, 0xC0B0B4AF,
+ 0xC4BFC1C5, 0xC0C4BFC0, 0xBABAC1BA, 0xC0BBBAC1,
+ 0xBBC1BCBA, 0xB7BCC0BB, 0xBBB9BABB, 0xB7BAB8B8,
+ 0xB7B8BEB9, 0xBAB8B6BC, 0xBABDBBB7, 0xBBBCBFBD,
+ 0xBBB9BABD, 0xB8BDBBB6, 0xBCB9BFBA, 0xC0BEBBC1,
+ 0xB9BEBCBB, 0xBDBAC1BE, 0xBFBDB9C0, 0xB8BDBBBA,
+ 0xB9B8BDBB, 0xC0BFB6BB, 0xBBC0BFBB, 0xBDBBC0BE,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBEB8BDBB, 0xBFBDBBC0,
+ 0xBABFBDBA, 0xBDBABFBD, 0xC0BEBABF, 0xBABFBDBB,
+ 0xBCBBC0BE, 0xBFBDB9BE, 0xBABFBDBA, 0xBEBABFBE,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBFBBC0C1, 0xC1C0B7BF,
+ 0xBBC1C0BB, 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BFBCB9,
+ 0xBCBABEB9, 0xC2BDBDC1, 0xBDC1BCBE, 0xBFBEC3C1,
+ 0xBCBBBBC2, 0xB7BCBAB6, 0xBEB7BCBA, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFC0B9,
+ 0xBEBAC0BF, 0xC0C0B9BF, 0xB8C0C0B8, 0xBEB8C0BF,
+ 0xBDBCB7BF, 0xBAC0BFB7, 0xBDB9BFBE, 0xC0BFB8BE,
+ 0xB8BDBCBB, 0xBDB6BBB9, 0xBFBEBABF, 0xB9BFBEB9,
+ 0xBEB7BFBE, 0xBFBEB7BF, 0xB9BFBEB9, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD, 0xBEBEBABF,
+ 0xBABFBEBC, 0xC0BABFC0, 0xC0BFB8C0, 0x868B8ABA,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5D5E, 0xBFC1BEC0,
+ 0xC0BFC1C0, 0xBFBABFBE, 0xBFC0BAC0, 0xB9BEBFBA,
+ 0xBDB9BFBE, 0xBEBFB8BE, 0xBABFC0B9, 0xBCB9BFBE,
+ 0xBFBEB7BD, 0xB9C0BDB9, 0xBDB9C0BD, 0xC0BDB9C0,
+ 0xB7BFBEB7, 0xBDB8C0BF, 0xC1C1B6BE, 0xB8C0C0B9,
+ 0xC0B9C1C1, 0xC1C1B8C0, 0xB9C1C1B9, 0xBFB6BEBE,
+ 0xBFBFB7BF, 0xB5BDBDB7, 0xBFB5BDBD, 0xC0C0B7BF,
+ 0xB7BFBFB8, 0xBEB8BEBD, 0xC0BFB9BF, 0xB8BEBDBA,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xB9BEBFB9, 0xC0BABFC0,
+ 0xC0C0BABF, 0xB8C0C0B8, 0xC1B7BFBF, 0xC0C0B9C1,
+ 0xB8C0C0B8, 0xC0BABFC0, 0xBDC1BABF, 0xBBC0C3BA,
+ 0xC0BABFC0, 0xBBBBB8C0, 0xB2BCBCB1, 0xBEB8C0C0,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBBB6BCBB, 0xC0BFB6BC,
+ 0xBAC0BFBA, 0xBFB8C0BF, 0xBCBBB8C0, 0xB6BCBBB6,
+ 0xC2B8C0C0, 0xBFC2B8BF, 0xB8C0C0B8, 0xBCB9BFBE,
+ 0xBEBCB8BF, 0xBABFBDB9, 0xBDB9C0BD, 0xC0BBB9C0,
+ 0xB8BEB9BA, 0xBAB8BDBB, 0xBDBBB7BC, 0xBBC0BEB8,
+ 0xBDBCBFBD, 0xBEBCBCBF, 0xB8BBB9BB, 0xBBBABDBB,
+ 0xBDBBBABD, 0xBABDBBBA, 0xBAB8BDBB, 0xBCBAB7BC,
+ 0xB6BBB9B7, 0xB7B6BCB7, 0xBBB6B6BC, 0xB8BCB7B7,
+ 0xB1B7BBB5, 0xBBB2B5BA, 0xB8BBB2B8, 0xB4B4BBB4,
+ 0xBBB4B3BB, 0xB6BEB4B4, 0xA8B6BCB1, 0xACA0AEB5,
+ 0xA8AD9EA8, 0x98A2A99C, 0xA4999EA5, 0x9DA3989E,
+ 0x99A1A599, 0xA398A1A5, 0xA0A4999F, 0x939B9F93,
+ 0x94889B9F, 0x99A09190, 0x8B999E8F, 0x9E8D969C,
+ 0x989E8D98, 0x8C98A08F, 0x9C8D959D, 0x959C8D95,
+ 0x8992998A, 0x998A9198, 0x94998A94, 0x8B93978B,
+ 0x94889397, 0x8F958A90, 0x84899187, 0x8E84868E,
+ 0x82887D86, 0x787E8178, 0x69638081, 0x696A6069,
+ 0x4E5F5F51, 0x695A6060, 0x7471636C, 0x67767365,
+ 0x73687672, 0x74726777, 0x60717062, 0x6F607070,
+ 0x73706172, 0x57757361, 0x68596B69, 0x605D4E6B,
+ 0x47595648, 0x60515855, 0x63605163, 0x52636454,
+ 0x65526365, 0x63655263, 0x52646452, 0x5C4C6464,
+ 0x5C5C4C5C, 0x48656051, 0x57485C57, 0x5A57485C,
+ 0x58605D4E, 0x68586868, 0x6A675968, 0x57686557,
+ 0x63586865, 0x66655767, 0x57656557, 0x67586366,
+ 0x65655764, 0x52606052, 0x5F516060, 0x60605460,
+ 0x55606054, 0x5F55605F, 0x615F5460, 0x4D5D5C4E,
+ 0x5C4E5D5D, 0x5D5C4E5D, 0x42515042, 0x4E435150,
+ 0x514F4452, 0x3B666459, 0x00004344, 0x00000002,
+ 0x00000001, 0x00000000, 0x00010000, 0x01010101,
+ 0x00010101, 0x00000100, 0x01000000, 0x00000101,
+ 0x02000002, 0x3C080605, 0x5D584340, 0x26231E60,
+ 0x00020000, 0x01010000, 0x00000001, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00010000, 0x00000301,
+ 0x03000203, 0x3C393403, 0x48535048, 0x6A61554F,
+ 0x6D6B606F, 0x68727264, 0x80707778, 0x8080727F,
+ 0x72808276, 0x786E7B7C, 0x7874697A, 0x72787469,
+ 0x84798380, 0x85837986, 0x78828078, 0x7A6F8081,
+ 0x68695F76, 0x5C686459, 0x23226963, 0x08050728,
+ 0x00020000, 0x00000001, 0x00020000, 0x9250544E,
+ 0x9C91949C, 0x989C9196, 0x2D8F938D, 0x00003031,
+ 0x02000002, 0x00000100, 0x00000001, 0x00000000,
+ 0x02060907, 0x7A6E080B, 0xB3B4A478, 0x98A4A797,
+ 0xA698A4A7, 0xA7A799A6, 0x95A5A595, 0xA595A4A5,
+ 0x9FA292A4, 0x94A1A592, 0xA798A3A7, 0xA2A897A2,
+ 0x93A4A895, 0xA490A3A8, 0xA3A893A2, 0x969FA592,
+ 0xAB98A3A9, 0xA2A895A5, 0x95A3A794, 0xAA99A4A8,
+ 0xA6AC9BA4, 0x97A9AE9F, 0xAB9CA1A6, 0xA8AD9EA6,
+ 0x9EA4AB9C, 0xAEA3A4AB, 0xAEB2A7AA, 0xA2ABAFA3,
+ 0xAD9EAAAE, 0xACB0A4A8, 0xA4ABAFA3, 0xAFA3ABAF,
+ 0xABAFA3AB, 0xA3ADB2A3, 0xB0A4ADB2, 0xADB1A6AC,
+ 0xA0ABAFA3, 0xACA0A8AC, 0xA6ADA0A8, 0xA9A8B0A5,
+ 0xB6ABACB4, 0xAAB0A5B0, 0xA8AAB0A5, 0xB4A8ADB3,
+ 0xB0B4A9B0, 0xACB1B6AD, 0xB5ACB0B5, 0xB2B5ACB2,
+ 0xACB2B5AC, 0xB3AAB2B5, 0xABB0A7AE, 0xB4B2B3AF,
+ 0xBFBAB7B8, 0xC1C5C0BB, 0xBABDC4BD, 0xBFBABAC1,
+ 0xBAC0BBB9, 0xB7B8BCB7, 0xBDBBB8BC, 0xBCBFBDBA,
+ 0xB6B8BEB9, 0xBDBBB5BB, 0xB9BCBABA, 0xBDBABFBD,
+ 0xC0BBBABF, 0xBAC0BBBC, 0xBDBBC0BE, 0xBFBDBABF,
+ 0xBBC0BEBA, 0xBFB8BEBD, 0xBFBDBAC0, 0xBABDBBBA,
+ 0xBCB6BBBA, 0xBFBEB8BD, 0xB8BDBCBA, 0xBCBABFBD,
+ 0xBFBDB9BE, 0xBCBFBDBC, 0xBDBCBFBD, 0xBEBCBCBF,
+ 0xBABFBDB9, 0xBEBABFBD, 0xBFBDBBC0, 0xBBC0BEBC,
+ 0xBDBABFBD, 0xC0BBBABF, 0xB9C0BBBA, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBABFBDBB, 0xBEB9BFBE, 0xC0BFB9BF,
+ 0xB9BFBEBA, 0xBDB7BDBC, 0xBBB8B8BE, 0xB6BDBAB4,
+ 0xBCBEC2BD, 0xC1BCBEC2, 0xBDC1BCBD, 0xC1BBC0BE,
+ 0xC3C1BEC3, 0xBBC0BEBE, 0xBABBC0BE, 0xB7B6B7BC,
+ 0xB6BCBBB1, 0xBEBABFBD, 0xC1C0BAC1, 0xB7BFBEBB,
+ 0xBBB9BFBE, 0xC1C1B6BC, 0xB7BFBFB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xBDB7BDBC, 0xBFBEB8BE,
+ 0xB9BFBEB9, 0xBBB6BBB9, 0xBFBEB8BD, 0xB8BEBDB9,
+ 0xBDB7BEBB, 0xC0BFB9C0, 0xB9BFBEBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xB9BEBDBA, 0xC0B9BEBF, 0xC1C0B8C0, 0x858C89BB,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5D5E, 0xBFC1BEC0,
+ 0xC0BFC1C0, 0xBFBABFBE, 0xBFC0BAC0, 0xB9BEBFBA,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xBABFC0B9, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xB8BFBCBA, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xB6BEBDB7, 0xC0B8C0BF, 0xBFBFB9C1, 0xB8C0C0B7,
+ 0xC0B9C1C1, 0xC0C0B8C0, 0xBAC2C2B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xBFB7BFBF, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xBEB9BFBE, 0xC0BFB9BF, 0xB9BFBEBA,
+ 0xBEBAC0BF, 0xC0C1B9BF, 0xBABFC0BB, 0xBDBABFC0,
+ 0xC0C0B7BC, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFBFB8C0,
+ 0xB8C0C0B7, 0xC1BBC0C1, 0xBEC2BBC0, 0xBABFC2BB,
+ 0xC0BABFC0, 0xBCBCB8C0, 0xB1B9B9B4, 0xC0B7BFBF,
+ 0xBFBEB8C0, 0xBAC0BFB7, 0xB0B3B8B6, 0xC0BFADB2,
+ 0xBAC0BFBA, 0xBFB8C0C0, 0xC1C0B7BF, 0xB6BCBBBB,
+ 0xC0B5BABB, 0xC0C0B8C0, 0xB8C0C0B8, 0xBCBAC0BF,
+ 0xBDBBB8BF, 0xB8BDBBB8, 0xBDB9C0BD, 0xBDBBB9C0,
+ 0xB7BCBAB8, 0xBDBABFBD, 0xBAB8BABF, 0xB8BDBBB5,
+ 0xBABCBFBD, 0xBFBDB9BC, 0xBABDBBBC, 0xBBB7BAB8,
+ 0xBDBBBABD, 0xB8BBB9BA, 0xBDB8BDBB, 0xBFBDBABF,
+ 0xB8BDBBBA, 0xB6B6BCB7, 0xBAB5B5BB, 0xB5B9B3B6,
+ 0xB4B7BBB5, 0xBDB4BABD, 0xB8BBB2BC, 0xB7B4BBB4,
+ 0xBBB4B6BE, 0xB7BFB5B4, 0xA8B7BDB2, 0xA498AEB5,
+ 0xA8AD9EA0, 0x98A1A89B, 0xA79C9EA5, 0xA2A99CA1,
+ 0x97A0A498, 0xA69A9FA3, 0xA0A498A2, 0x94A0A498,
+ 0x95889AA1, 0x99A0918E, 0x8C9A9F90, 0x9F8E979D,
+ 0x9AA08F99, 0x8F98A08F, 0x9F9098A0, 0x959C8D98,
+ 0x8D96A090, 0x998A959C, 0x94988C94, 0x888F9387,
+ 0x95899094, 0x8E948991, 0x878B9087, 0x887E8991,
+ 0x7E847980, 0x787E8178, 0x69638081, 0x3C3D3469,
+ 0x5A5F5F53, 0x71636868, 0x7E7A6F74, 0x71807C71,
+ 0x7A71807C, 0x807C717F, 0x68777767, 0x76677878,
+ 0x7A786679, 0x61767462, 0x73617573, 0x75726375,
+ 0x5B6D6A5B, 0x6B596F6A, 0x6D6B596F, 0x5A6A6C59,
+ 0x6C59696D, 0x6B6D5A6A, 0x576D6C58, 0x6B596C6B,
+ 0x6E6C5A6D, 0x596E6A58, 0x6B5C6F6B, 0x6D6A5B6E,
+ 0x60707060, 0x70607070, 0x70706070, 0x5F706D5F,
+ 0x6C61706D, 0x6E6C6170, 0x606A6C60, 0x6C606A6C,
+ 0x6C6C5E6A, 0x59686759, 0x685A6867, 0x68675969,
+ 0x5F69695D, 0x695F6B6B, 0x6B695E6A, 0x58686759,
+ 0x68586868, 0x68685868, 0x59686759, 0x67596867,
+ 0x6A67596A, 0x5A666459, 0x00006564, 0x00000002,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000000,
+ 0x00020000, 0x00000001, 0x00000000, 0x00000001,
+ 0x0B0A0602, 0x3943403B, 0x5E534341, 0x5F5E5460,
+ 0x00020100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020301,
+ 0x39340203, 0x58554D3C, 0x62554F48, 0x6B62706B,
+ 0x6E6C6170, 0x72777769, 0x7F718080, 0x7F7F7180,
+ 0x72808276, 0x786E7B7C, 0x7C776E7A, 0x77837F74,
+ 0x84798885, 0x86847986, 0x77828177, 0x786E8281,
+ 0x6A695F77, 0x5B66645A, 0x24236663, 0x08060628,
+ 0x00000000, 0x00000000, 0x00010000, 0x944F534E,
+ 0x9B95969A, 0x52544E99, 0x00000100, 0x00000001,
+ 0x02000000, 0x00000000, 0x00000000, 0x00010000,
+ 0xA73F413B, 0xB4A4AEB2, 0xB2B4A1B1, 0x98A6A797,
+ 0xA698A6A6, 0xA5A597A6, 0x95A4A496, 0xA697A4A5,
+ 0xA1A494A3, 0x94A0A393, 0xA697A1A4, 0xA1A697A1,
+ 0x95A2A693, 0xAA96A5AA, 0xA3A893A8, 0x939EA491,
+ 0xA693A0A6, 0xA1A794A0, 0x98A5A898, 0xA695A5A8,
+ 0xA2A897A0, 0x9AA4A99A, 0xAD9EA4A9, 0xA9AE9FA8,
+ 0x9CA9B0A1, 0xAA9EA4AB, 0xAAAEA3A6, 0xA3ADB1A5,
+ 0xB0A1ABAF, 0xACB0A4AB, 0xA4ABAFA3, 0xAFA3ABAF,
+ 0xABAFA3AB, 0xA3AAAFA0, 0xAFA4ABAF, 0xADB1A6AB,
+ 0xA4ABAFA3, 0xB1A5ACB0, 0xABB2A5AD, 0xABAFB5AA,
+ 0xB0A5B0B6, 0xAAB0A5AA, 0xA9AEB4A9, 0xB5A9AEB4,
+ 0xB0B4A9B1, 0xACAEB3AA, 0xB5ACB0B5, 0xB2B5ACB2,
+ 0xAAB3B6AD, 0xB0A7B0B3, 0xB0B5ACAB, 0xAFB2B3AF,
+ 0xB4AFB2B3, 0xBBBFBAB0, 0xBDBDC4BD, 0xC0BBBDC4,
+ 0xB6BCB7BA, 0xB9B8BCB7, 0xBEBCBABE, 0xBABDBBBB,
+ 0xB9B5BBB6, 0xBEBCB8BE, 0xBABDBBBB, 0xBDBABFBD,
+ 0xBEB9BABF, 0xB7BDB8BA, 0xBDBABFBD, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBEB9BFBE, 0xC0BEB9BF, 0xB6BBB9BB,
+ 0xBCB8BDBC, 0xBFBEB8BD, 0xBABFBEBA, 0xBDBABFBD,
+ 0xBEBCBABF, 0xB9BCBABB, 0xBDBDC0BE, 0xBFBDBCBF,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF, 0xBCBFBDBC,
+ 0xBCBABFBD, 0xBFBCB9BE, 0xB9C0BDB8, 0xBDBAC1BE,
+ 0xBFBDB9C0, 0xBABFBDBA, 0xBFB9BFBE, 0xC0BFBAC0,
+ 0xB7BDBCBA, 0xBFB5BBBA, 0xBEBBBAC0, 0xBABFBDB7,
+ 0xBCB9BFBA, 0xC1BCBDC1, 0xBBC0BEBD, 0xBEBBC0BE,
+ 0xC1BFBBC0, 0xBABFBDBE, 0xBFBBC0BE, 0xBFC0BBC0,
+ 0xBAC0BFBA, 0xB7B6BBB9, 0xBEBBB6BC, 0xB9C0BDB7,
+ 0xBCBAC0BF, 0xBFC0B7BD, 0xB8C0C0BA, 0xC0B2BAB9,
+ 0xBEBDBBC1, 0xB9BFBEB8, 0xBEB8BEBD, 0xBEBDB9BF,
+ 0xB9C0BDB8, 0xB9B8BDBB, 0xC1BEB6BB, 0xB9BFBEBA,
+ 0xBCB7BEBB, 0xC0BFB8BF, 0xB9BFBEBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xB9BEBCBA, 0xBFBAC0BF, 0xC1BFBAC0, 0x868B89BC,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5D5E, 0xC0C0BEC0,
+ 0xC0C0C0C0, 0xBEB9BFBE, 0xBFBEB7BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xB9BEBFB9, 0xC0BABFC0,
+ 0xBFC0BABF, 0xB9BFBEBA, 0xBFB7BFBE, 0xC0BFB8C0,
+ 0xB7BFBFB8, 0xBEB8C0BF, 0xC1BFB7BF, 0xB6C1BFB6,
+ 0xBFB8C0C0, 0xBFBFB7BF, 0xB8C0C0B7, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B9C1C1, 0xC0C0B8C0,
+ 0xB9C1C1B8, 0xBEBAC0BF, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB9C1C1B8, 0xC0B8C0C0,
+ 0xBFBFB8C0, 0xB8C0C0B7, 0xBFB8C0C0, 0xC0C3B7BF,
+ 0xB8BFC2B9, 0xC0B8C0C0, 0xBFC0B8C0, 0xB9BEBFBA,
+ 0xC0B8C0C0, 0xBEBDB8C0, 0xB2BAB9B6, 0xC0B8C0C0,
+ 0xBFBFB8C0, 0xB8C0BFB7, 0xBEB9C0BD, 0xBBBABBC0,
+ 0xB9BFBEB6, 0xBFB8C0C0, 0xBEBDB7BF, 0xB9BFBEB8,
+ 0xBDB5BCB9, 0xBFBEB9C0, 0xB7BDBCB9, 0xBDB8BFBC,
+ 0xBEBCB9C0, 0xB8BDBBB9, 0xBCB7BDBC, 0xBFBEB7BD,
+ 0xB7BDBCB9, 0xBEBABFBE, 0xBDBBBABF, 0xB6BBB9B8,
+ 0xBBB8BDBB, 0xC1BCB8BD, 0xB8BEB9BB, 0xBAB8BDBB,
+ 0xBEB9B7BC, 0xBABEB9BA, 0xB8B8BCB7, 0xBEBCB9BD,
+ 0xB8BDBBB9, 0xB7B8BCB7, 0xBCB7B8BC, 0xB5B9B3B8,
+ 0xB2B9BBB5, 0xBDB4B8BB, 0xB8BBB2BC, 0xB4B1B9AF,
+ 0xBCB2B5BE, 0xB6BEB4B4, 0xAFB9C1B7, 0xACA0B4BA,
+ 0xA8ACA0A8, 0x99A5AA9B, 0xA79BA3A8, 0xA3A79BA3,
+ 0x989FA495, 0xA596A2A7, 0x9EA394A0, 0x959CA394,
+ 0xA4959DA4, 0x989F909D, 0x8E989D8E, 0x9F90989D,
+ 0x9A9F909A, 0x8F9AA08F, 0x9F909AA0, 0x989F9098,
+ 0x8C959C8D, 0x9C90949B, 0x999D9198, 0x8B969A8E,
+ 0x95889397, 0x8E95888E, 0x7E8A9085, 0x8A808389,
+ 0x83887F82, 0x777D8077, 0x81787F80, 0x20211880,
+ 0x7157554D, 0x7B727C7B, 0x7F7B7080, 0x74858176,
+ 0x7E75837F, 0x807C7183, 0x6E7F7F6F, 0x7F6D8080,
+ 0x807E6C81, 0x687C7A68, 0x7B6B7878, 0x7B7B6B7B,
+ 0x657D7D6D, 0x73617977, 0x77736177, 0x5F70705E,
+ 0x76666E6F, 0x73736176, 0x5D736F5D, 0x6E5C736F,
+ 0x74726070, 0x60747462, 0x705E7274, 0x70705E70,
+ 0x61707060, 0x6F5F7171, 0x7070606F, 0x60707060,
+ 0x6C5E7070, 0x6D6C5E6D, 0x616F6F61, 0x6F616F6F,
+ 0x706F616F, 0x596E6D5F, 0x685A6A67, 0x6B685A6B,
+ 0x5A6A695B, 0x6C616968, 0x6D6C5E6E, 0x60707060,
+ 0x6B5B7070, 0x6D6D5D6B, 0x62737062, 0x6F647370,
+ 0x736F6475, 0x4B807F71, 0x00005655, 0x00000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x1E1A0200,
+ 0x3E3B3621, 0x4B444238, 0x6A5F5856, 0x807E746E,
+ 0x002C2925, 0x00000200, 0x02000002, 0x00010101,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x02000002, 0x00020000, 0x01000200, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x2C0B0C0A,
+ 0x544F3130, 0x59564E57, 0x686E6C62, 0x7B707573,
+ 0x807C717F, 0x707F7D72, 0x80757D7B, 0x86847982,
+ 0x7785847A, 0x7C728281, 0x86847A7E, 0x79888479,
+ 0x84798884, 0x88847988, 0x7A888479, 0x746A8883,
+ 0x6D6B6176, 0x626A695F, 0x25246A67, 0x07050527,
+ 0x00000000, 0x00000000, 0x00000000, 0x42151816,
+ 0x16144144, 0x00000015, 0x00000000, 0x01010000,
+ 0x00000001, 0x07070505, 0x06060907, 0x3B3C3A08,
+ 0x9EABADA7, 0xA498A5A9, 0xA1A495A2, 0x95A0A394,
+ 0xA394A1A4, 0xA1A495A0, 0x959FA495, 0xA5999FA4,
+ 0xA1A697A1, 0x95A4A797, 0xA596A2A5, 0xA0A695A0,
+ 0x92A1A592, 0xA794A2A7, 0xA3A794A3, 0x97A2A897,
+ 0xA796A0A8, 0xA2A8979F, 0x98A4A798, 0xAB9CA4A7,
+ 0xA3A899A8, 0x98A2A798, 0xAB9CA0A7, 0xA5AC9DA4,
+ 0x9FA6AD9E, 0xACA0A7AE, 0xA6AA9EA8, 0xA0A8ACA0,
+ 0xB1A5A8AC, 0xACB0A4AD, 0xA5ABAFA3, 0xB1A5ADB1,
+ 0xADB1A5AD, 0xA5B0B4A8, 0xB2A7ADB1, 0xACB0A5AE,
+ 0xA0ABAFA3, 0xB2A5A8AC, 0xABB2A5AB, 0xA4ABB2A5,
+ 0xAFA3ACB0, 0xB0B4A8AB, 0xA8ACB2A7, 0xB3A8ADB3,
+ 0xB0B4A9AF, 0xAAAFB4AB, 0xB4ABACB4, 0xB0B5ACAF,
+ 0xA8ADB2A9, 0xB3AAACB1, 0xB0B5ACAE, 0xAFB0B4AF,
+ 0xB4AFB0B4, 0xB0B4AFB0, 0xBEB5B9B3, 0xC4BFC0C4,
+ 0xBBBFBAC0, 0xBABBBFBA, 0xBFBABBBF, 0xB8BCB7BB,
+ 0xB9BABEB9, 0xBFBDBABE, 0xBCBFBDBC, 0xBCB9BCBA,
+ 0xBFBDBBBE, 0xB8BDBBBC, 0xBDBABFBD, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBDB9C0BD, 0xBBBAB9C0, 0xB8BDBCB6,
+ 0xBEBABFBE, 0xBDBBB9BF, 0xB9BEBCB8, 0xBBBCBFBD,
+ 0xBCBABABD, 0xBCBFBDB9, 0xBBBCC0BB, 0xBFBDBCC0,
+ 0xBBBEBCBC, 0xBDBBBEBC, 0xC0BEBCBF, 0xBCBFBDBD,
+ 0xBDBABFBD, 0xBFBDB9C0, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BFBBC0, 0xBABFBEBB, 0xBFBABFC0, 0xBFBEB8C0,
+ 0xBAC0BFB9, 0xBFBAC0BF, 0xBAB8BAC0, 0xBABFBDB5,
+ 0xBDBABFBD, 0xC0BFBABF, 0xBAC0BFBB, 0xBFBBC1C0,
+ 0xC0BFBAC0, 0xBBC0BFBB, 0xBEBBC0BF, 0xBFC0B9BF,
+ 0xBAC0BFBA, 0xBCBBC0BE, 0xBFBABDC1, 0xB8BCB7BB,
+ 0xBBB5B8B6, 0xBFC0B7BC, 0xB8C0C0BA, 0xBFB4BCBC,
+ 0xC0C0B7BF, 0xBABFC0B8, 0xBEB9BFBE, 0xBFBDB9BF,
+ 0xBABFBDBA, 0xBCBABFBD, 0xC0BDB9BE, 0xB8BFBCB9,
+ 0xBDB9BEBC, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xC0BDBABF, 0xB9C0BDB9, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xC0BEC0C0, 0xC1BFBEC0, 0x888B89BE,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC1595D5E, 0xC0C0BCC0,
+ 0xC0C0C0C0, 0xBEB9BFBE, 0xBFBEB7BF, 0xBAC0BFB9,
+ 0xBFB9BFBE, 0xBFC0BAC0, 0xB9BEBFBA, 0xBEB9BEBF,
+ 0xBEBFB8BD, 0xBABFC0B9, 0xBEB7BFBE, 0xBFBFB7BF,
+ 0xB8C0C0B7, 0xC0B8C0BF, 0xC1BFB9C1, 0xB6C1BFB6,
+ 0xC0B8C0C0, 0xBFBFB8C0, 0xB7BFBFB7, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB7BFBF, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xBEBAC0BF, 0xBFBEB9BF, 0xBAC0BFB9,
+ 0xC0B7BFBF, 0xC1C1B8C0, 0xB8C0C0B9, 0xBEB7BFBF,
+ 0xC0C0B6BE, 0xB8C0C0B8, 0xC1B7BFBF, 0xBFC2B9C1,
+ 0xB8BFC2B8, 0xBFB7BFBF, 0xBFC0B7BF, 0xB8C0C0BA,
+ 0xC1B6C0C0, 0xBCBBB7C1, 0xB7BDBCB4, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB9C1C0B8, 0xBFB9BFBE, 0xBEBDBAC0,
+ 0xB8BEBDB9, 0xC0BABFC0, 0xBFBEB8C0, 0xBAC0BFB9,
+ 0xBBB7BEBB, 0xC1BEB7BE, 0xBAC1BEBA, 0xBEB9C0BD,
+ 0xBEBCBAC1, 0xB6BBB9B9, 0xBEB5BBBA, 0xBFBEB9BF,
+ 0xBAC0BFB9, 0xBEB8BDBC, 0xC0BEBABF, 0xB7BCBABB,
+ 0xBCB6BBB9, 0xBDB8B9BE, 0xB8BEB9B7, 0xBCBABFBD,
+ 0xBBB6B9BE, 0xBABEB9B7, 0xB7B9BDB8, 0xBCBAB8BC,
+ 0xB7BDB8B7, 0xB6B8BCB7, 0xBCB7B7BB, 0xB6BAB4B8,
+ 0xB2B6B9B0, 0xBBB2B8BB, 0xBABDB4BA, 0xAFB4BCB2,
+ 0xBCB2B1B9, 0xB6BEB4B4, 0xAFB9C1B7, 0xACA1B2BA,
+ 0xA9ADA1A6, 0x95A3A899, 0xA89C9FA4, 0x9FA397A4,
+ 0x94A0A596, 0xA5969FA5, 0x9FA495A0, 0x939BA293,
+ 0xA2939BA2, 0x9BA2939B, 0x8E9A9F90, 0x9E8F989D,
+ 0x969B8C99, 0x8B969C8B, 0x9D8E969C, 0x979E8F98,
+ 0x8D969D8E, 0x9A8F959C, 0x979B9096, 0x8B989C90,
+ 0x9A8D9397, 0x91988B93, 0x848E9588, 0x8D828A91,
+ 0x84898085, 0x787F8279, 0x81788081, 0x1F201780,
+ 0x76312E29, 0x7C727E7B, 0x807C717E, 0x74858176,
+ 0x7E75837F, 0x85817683, 0x6B80806E, 0x806E7E7F,
+ 0x7E7C6A82, 0x707B7B6B, 0x80708080, 0x7D7D6B80,
+ 0x6A7C7C6A, 0x78657E7C, 0x7773617C, 0x68777465,
+ 0x78687878, 0x7B786978, 0x5D767162, 0x6A58736F,
+ 0x716F5D6E, 0x5D727461, 0x74616E70, 0x73736372,
+ 0x5D6D6D5D, 0x6D5D6D6D, 0x6D6D5D6D, 0x5C6E6E5E,
+ 0x6C5C6C6C, 0x6D6D5D6C, 0x5C6B6A5C, 0x6F5F6A6A,
+ 0x6B6B5B6F, 0x5A6B685A, 0x685A6B68, 0x6B685A6B,
+ 0x5A69685A, 0x685A6968, 0x6B685A6B, 0x5D6C6C5C,
+ 0x6D5D6D6D, 0x7070606D, 0x62737062, 0x6F647370,
+ 0x78746975, 0x4B807F71, 0x00005655, 0x00000102,
+ 0x00000000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x03010100, 0x1A020000, 0x3C37211E,
+ 0x413E363F, 0x5D58564B, 0x7F716C6B, 0x807E7382,
+ 0x002C2924, 0x00000200, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00020000, 0x01000200, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00010000, 0x4F2F2E2A,
+ 0x564E5957, 0x59574D59, 0x72757368, 0x84797F7D,
+ 0x807C7188, 0x75807C71, 0x847A8280, 0x82807686,
+ 0x7A87857B, 0x847A8684, 0x85837986, 0x7C87857A,
+ 0x887D8B87, 0x8B877C8C, 0x798A8479, 0x736A8A84,
+ 0x6E6C6278, 0x6169675F, 0x25246767, 0x07070727,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x06090707, 0x3B3B0806, 0xA8A7A33D,
+ 0x98A5A89F, 0xA599A0A4, 0xA1A599A3, 0x9AA2A69A,
+ 0xA798A2A6, 0xA4A798A4, 0x969EA296, 0xA3979CA3,
+ 0x9FA4959F, 0x95A1A495, 0xA897A2A5, 0xA2A897A2,
+ 0x90A3A794, 0xA491A0A5, 0xA0A491A0, 0x959DA392,
+ 0xA8999EA6, 0xA1A697A1, 0x98A4A798, 0xA798A4A7,
+ 0xA2A798A4, 0x9BA6AB9C, 0xA99AA3AA, 0xA2A99AA2,
+ 0x9CA3AA9B, 0xAA9EA4AB, 0xA5A99DA6, 0xA0ABAFA3,
+ 0xACA0A8AC, 0xA8ACA0A8, 0xA2ABAFA3, 0xAFA3AAAE,
+ 0xABAFA3AB, 0xA5ABAFA3, 0xB1A6ADB1, 0xADB1A6AD,
+ 0xA0AEB2A6, 0xB0A3A8AC, 0xAEB5A8A9, 0xA3ADB1A5,
+ 0xAFA3ABAF, 0xAEB5A8AB, 0xA8AEB4A9, 0xB3A8ADB3,
+ 0xAEB4A9AD, 0xA6ACB4AA, 0xB5ABA8B0, 0xAEB3AAAD,
+ 0xAAADB2A9, 0xB6ADAEB3, 0xB0B5ACB1, 0xAFAFB3AD,
+ 0xB4AFB0B4, 0xAFB3AEB0, 0xBAB0B4AE, 0xC4BFBCC0,
+ 0xC0C4BFC0, 0xBABEC2BD, 0xBBB6BBBF, 0xB8BCB7B7,
+ 0xB7B9BDB8, 0xBDBBB8BC, 0xB9BCBABA, 0xBDBABDBB,
+ 0xBDBBBCBF, 0xB8BDBBBA, 0xBEB9C0BD, 0xBFBDBAC1,
+ 0xBABFBDBA, 0xB9B9C0BD, 0xBDBCB5BC, 0xB9BFBEB8,
+ 0xBEB9BFBE, 0xBDBBB9BF, 0xB8BDBBB8, 0xBABABDBB,
+ 0xC0BEB9BC, 0xBCBFBDBD, 0xBBBCC0BB, 0xBEBCBCC0,
+ 0xBABDBBBB, 0xBCBCBFBD, 0xBFBDBBBE, 0xBCBFBDBC,
+ 0xBDBABFBD, 0xBFBEB9C0, 0xBABFBEBA, 0xBEBBC0BE,
+ 0xC0BFBBC0, 0xBAC0BFBB, 0xC1BABFC0, 0xBFBEB9C1,
+ 0xB8BEBDB9, 0xBFBABFC0, 0xBBBABAC0, 0xBABFBDB6,
+ 0xBCBBC0BE, 0xBFBEB7BD, 0xBABFC0B9, 0xC0BBC0C1,
+ 0xC1C0BABF, 0xBCC1C0BC, 0xBFBAC0BF, 0xBFC0BAC0,
+ 0xBCC1C0BA, 0xBCBDC0BE, 0xC0BCBDC1, 0xBDC1BCBF,
+ 0xB8BABDBB, 0xBCBDB4B9, 0xB8C0C0B7, 0xBDADB7B7,
+ 0xC1C1B3BD, 0xB8C0C0B9, 0xBDB9BFBE, 0xBFBDB8BE,
+ 0xB6BBB9BA, 0xBDB8BDBB, 0xC0BDBABF, 0xBABFBDB9,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xB9C0BDBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xC0BFBFBF, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC1595D5E, 0xC0C0BCC0,
+ 0xBEC0C0C0, 0xBEB9C0BD, 0xBFBEB8C1, 0xBAC0BFB9,
+ 0xBFB7BFBE, 0xC1C1B8C0, 0xB7BFBFB9, 0xC0B7BFBE,
+ 0xC0C0B9C1, 0xB7BFBFB8, 0xBFB7BFBE, 0xBFBFB8C0,
+ 0xB8C0C0B7, 0xC0B7BFBF, 0xAFAFB8C0, 0xA8B0B0A7,
+ 0xC0B7BFBF, 0xC0C0B8C0, 0xB7BFBFB8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9,
+ 0xC0B9C1C1, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B6BEBE,
+ 0xC1C1B8C0, 0xB8C0C0B9, 0xBBB8C0C0, 0xBABDB3BB,
+ 0xB8BFC2B3, 0xBFB8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B6C0C0, 0xBBBBB6C0, 0xB5BDBDB3, 0xC0BAC0BF,
+ 0xC1C0BBC1, 0xB9C1C0BB, 0xC0B9BFBE, 0xBFC0B8C0,
+ 0xB9BEBFBA, 0xBEB7BDBC, 0xC0C0B9BF, 0xB8C0C0B8,
+ 0xBCB8C0BF, 0xBCBBB5BD, 0xBBC0BFB6, 0xBEBAC0BF,
+ 0xC0BFB9BF, 0xB7BDBCBA, 0xBEB5BAB9, 0xC0BFBABF,
+ 0xB9BFBEBA, 0xBCB9BFBE, 0xC0BDB7BD, 0xBAC1BEB9,
+ 0xB8B8BDBB, 0xBFBAB5BA, 0xB8BEB9B9, 0xBBB8BDBB,
+ 0xBCB7B8BD, 0xB6BCB7B6, 0xB8B8BEB9, 0xBAB5B7BD,
+ 0xB9BDB8B6, 0xB5B4BAB5, 0xBCB5B5BC, 0xB8BCB6B5,
+ 0xB0B8BBB2, 0xBDB4B6B9, 0xBBBEB5BA, 0xAFB4BCB2,
+ 0xBBB2B1B9, 0xB8BDB4B6, 0xAFB9C1B7, 0xACA1B2BA,
+ 0xA8ACA0A6, 0x9BAAACA0, 0xA397A5A7, 0xA4A89C9F,
+ 0x99A0A798, 0xA695A1A8, 0x9EA493A0, 0x8F9DA392,
+ 0x9E8F98A0, 0x989F9097, 0x90989F90, 0x9F90989F,
+ 0x979E8F98, 0x8B979F8E, 0x9887989E, 0x969C8B92,
+ 0x8E969D8E, 0x9C91969D, 0x979B9098, 0x8C91978C,
+ 0x998D9197, 0x8F938795, 0x838F9689, 0x8D828990,
+ 0x83897E85, 0x787D8077, 0x81787E81, 0x20211880,
+ 0x75090903, 0x7B717D7A, 0x807C717D, 0x798A8479,
+ 0x837A8A84, 0x88847988, 0x6C7F7F6D, 0x7F6D7F80,
+ 0x827F7081, 0x6F818072, 0x7F6F7F7F, 0x80806E7F,
+ 0x697D7D6B, 0x7C6A7C7D, 0x7A78667E, 0x67797969,
+ 0x77677777, 0x75756577, 0x62787566, 0x6F5D7671,
+ 0x736F5D73, 0x6070705E, 0x6E5E7070, 0x706D5F6E,
+ 0x5A6F6C5E, 0x6B5D6B68, 0x6B685A6E, 0x576B685A,
+ 0x695B6865, 0x6B685A6C, 0x55656555, 0x6C5C6565,
+ 0x6B6B5B6C, 0x55656555, 0x64566565, 0x69685A65,
+ 0x55656555, 0x64566565, 0x69685A65, 0x5D6B6B5B,
+ 0x6D5D6D6D, 0x7070606D, 0x61737062, 0x6F64726F,
+ 0x736F6473, 0x4A807F71, 0x02005456, 0x00000101,
+ 0x01000000, 0x00010301, 0x01000200, 0x00000000,
+ 0x00000000, 0x02000002, 0x3523201C, 0x3D35403D,
+ 0x5E5C5240, 0x726C6A5F, 0x7F718180, 0x807E7380,
+ 0x0055534B, 0x01000201, 0x00010000, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x32322C02, 0x4C59584E,
+ 0x7D725858, 0x807C717F, 0x6F7E7C71, 0x857A7E7D,
+ 0x88847989, 0x75828075, 0x847A8280, 0x85847A86,
+ 0x7A85847A, 0x89818584, 0x8B8A808B, 0x7C88887C,
+ 0x887D8987, 0x8684798A, 0x71888479, 0x7C71807C,
+ 0x706B6282, 0x636A6860, 0x24246969, 0x05050526,
+ 0x00000000, 0x00000000, 0x02000102, 0x00000000,
+ 0x00000000, 0x02000002, 0x01000000, 0x00000101,
+ 0x00000000, 0x3A080606, 0xA7A33D3B, 0xA9A9A3A8,
+ 0x98A0A499, 0xA498A0A4, 0x9FA398A0, 0x96A3A79B,
+ 0xA1959EA2, 0xA4A69A9F, 0x99A1A59A, 0xA599A0A4,
+ 0xA3A697A3, 0x939FA495, 0x9F8F9EA4, 0xA1A5929C,
+ 0x90A1A691, 0xA390A0A5, 0xA3A794A1, 0x91A0A695,
+ 0xA6959CA2, 0xA0A695A0, 0x9AA4A797, 0xA898A7AA,
+ 0xA3A998A5, 0x9BA4AA99, 0xAD9EA4AC, 0xA4AB9CA6,
+ 0x9CA2A99A, 0xAD9EA4AB, 0xA6AD9EA6, 0xA0A9ADA1,
+ 0xAFA3A8AC, 0xA7AB9FAB, 0xA3AAAEA2, 0xB1A5ABAF,
+ 0xAEB2A6AD, 0xA3ADB1A5, 0xAFA3ABAF, 0xABAFA3AB,
+ 0x9FABAFA3, 0xACA0A7AB, 0xADB1A5A8, 0xA5AAAEA2,
+ 0xB3A4ADB1, 0xABB2A5AC, 0xA6A9B1A6, 0xB1A8A8B0,
+ 0xACB1A8AC, 0xA7ACB4AA, 0xAFA8A9B1, 0xA9B0A9A8,
+ 0xACAEB3AA, 0xB5ACB0B5, 0xB0B5ACB2, 0xAEB0B4AE,
+ 0xB4ADAEB5, 0xAFB3ADAD, 0xAFAFB3AE, 0xBFBAB2B3,
+ 0xC0C4BFBB, 0xBABBC1BC, 0xBFBAB9BF, 0xBABEB9BB,
+ 0xB8BCC0BB, 0xBBB9B9BD, 0xBABDBBB6, 0xBCB9BDB8,
+ 0xBCBABBBE, 0xBABFBDB9, 0xBDB9C0BD, 0xC0BDB9C0,
+ 0xB6BDBAB9, 0xBBB5BCB9, 0xBFBEB7BE, 0xB9BFBEB9,
+ 0xBFB9BFBE, 0xBFBDBAC0, 0xB6BBB9BA, 0xBCB9BDB8,
+ 0xBFBDBDC1, 0xBCBFBDBC, 0xBBBBBFBA, 0xBDBBBCC0,
+ 0xBCBFBDBA, 0xB9BCBFBD, 0xBDBBB8BB, 0xBCBFBDBA,
+ 0xBEB9BEBC, 0xC0BFBBC0, 0xBABFBEBB, 0xBFBBC0BE,
+ 0xC1C0BCC1, 0xBAC0BFBC, 0xBFBBC0C1, 0xBFBEB7BF,
+ 0xBAC0BFB9, 0xBFB7BFBF, 0xBBBABAC0, 0xB8BDBBB6,
+ 0xBEBAC0BF, 0xBFBEB9BF, 0xBBC0BFB9, 0xC1BBC0C1,
+ 0xC1C0BBC0, 0xBBC1C0BB, 0xBEBBC0BE, 0xC0BFBBC0,
+ 0xBBC0BFBB, 0xBCBDC0BE, 0xC2BDBDC1, 0xBCC0BBBE,
+ 0xBBB6BDBA, 0xC1C1B6BC, 0xB5BDBDB9, 0xBDADB7B7,
+ 0xBFBFB3BD, 0xB8C0C0B7, 0xBEB8BEBD, 0xBEBDB9BF,
+ 0xB8BDBCB9, 0xBDB9BEBC, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDBCBFBD, 0xBFBDBCBF,
+ 0xBABFBDBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x888B89BE,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC1595D5E, 0xC1C0BBC0,
+ 0xBCC1C0BC, 0xBEB9BFBE, 0xBEBDB8C1, 0xB9BFBEB8,
+ 0xBFB8C0BF, 0xC1C0B8C0, 0xB9C1C0B9, 0xBFB7BFBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0BF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC1B9C1C1, 0xBBBBB9C1, 0xB3BBBBB3,
+ 0xBFB8C0C0, 0xC0C0B7BF, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFBFB8C0,
+ 0xB7BFBFB7, 0xBFB9BFBE, 0xBFBEBAC0, 0xB9BFBEB9,
+ 0xC1B8C0C0, 0xC0C0B9C1, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB9C1C1B8, 0xB0B8C0C0, 0xBBBBA8B0,
+ 0xB8C0C0B3, 0xBEB8C0BF, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBDBDB8C0, 0xB7BDBCB5, 0xC0BAC0BF,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xBABFC0B8, 0xBDBABFC0, 0xBFC0B7BC, 0xB8C0C0BA,
+ 0xC0B8C0C0, 0xBDBCB8C0, 0xB7BDBCB7, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB7BDBCB9, 0xBAB8BDBC, 0xBDBCB6BB,
+ 0xB9BFBEB7, 0xBEB9BFBE, 0xBFBCB9BF, 0xB9C0BDB8,
+ 0xB9BBC0BE, 0xBEB9B6BB, 0xB8BEB9B8, 0xBDB7BCBA,
+ 0xBEB9BABF, 0xB6BCB7B8, 0xB8B7BDB8, 0xBCB7B7BD,
+ 0xB8BCB7B8, 0xB3B5BCB5, 0xBAB3B3BA, 0xB8BCB6B3,
+ 0xAFB9BEB5, 0xBCB3B3B8, 0xB6BBB2B9, 0xB4B6BBB2,
+ 0xBDB4B8BD, 0xBEC2B7BA, 0xAFB9C1B7, 0xADA0B2BA,
+ 0xA8ACA0A6, 0xA0AAACA0, 0xA69AAAAC, 0xA0A596A2,
+ 0x97A2A798, 0xA897A2A8, 0xA0A695A2, 0x929FA594,
+ 0xA3949DA3, 0x989F909C, 0x90989F90, 0x9F90989F,
+ 0x9A9F909A, 0x8F98A08F, 0xA08F98A0, 0x989D8E9A,
+ 0x8C969B8C, 0x9B8F9299, 0x989C9197, 0x8E969C91,
+ 0x94889399, 0x90948890, 0x848E9588, 0x90858A91,
+ 0x81897F88, 0x7A7C8178, 0x7F797E80, 0x20201A7D,
+ 0x290A0905, 0x7D732F2F, 0x807C717F, 0x77888577,
+ 0x84798885, 0x85827488, 0x6D808070, 0x7F707F7F,
+ 0x827F7082, 0x70807F71, 0x80708080, 0x80806E80,
+ 0x6A7C7C6A, 0x806E7C7C, 0x7C7C6A80, 0x69787769,
+ 0x78687877, 0x78786878, 0x62767666, 0x6E5F7471,
+ 0x736E5F73, 0x60726F60, 0x6D5F7070, 0x6E6B5D70,
+ 0x5A6B685A, 0x65576B68, 0x68655768, 0x59686459,
+ 0x64596864, 0x68655768, 0x56676456, 0x64566564,
+ 0x60605065, 0x55656555, 0x5F516565, 0x65645660,
+ 0x59656555, 0x5F516969, 0x65645660, 0x596C6B5D,
+ 0x6C5E6867, 0x6B6A5C6D, 0x62676658, 0x6B607170,
+ 0x6C6A5F6F, 0x4B818072, 0x01005655, 0x00000100,
+ 0x00000000, 0x00020000, 0x00000001, 0x00030101,
+ 0x00000200, 0x1F1B1A02, 0x343F3C37, 0x5C52403E,
+ 0x5E5C515E, 0x71818072, 0x7F71807F, 0x807F7180,
+ 0x007D7B73, 0x01000202, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x32322C02, 0x717D7C72,
+ 0x7C717D7D, 0x807C717E, 0x79868479, 0x84798684,
+ 0x88847988, 0x79828075, 0x847A8483, 0x8A897F85,
+ 0x7A8A897F, 0x847A8584, 0x85847A85, 0x7C88887C,
+ 0x84798888, 0x8A887D86, 0x79868479, 0x7C718684,
+ 0x6E6C6180, 0x6168695F, 0x25256767, 0x08050727,
+ 0x00010101, 0x00010000, 0x02000100, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00010000, 0xA33C3D39, 0xA8A2A8A7, 0xA8A9A0A8,
+ 0x98A0A498, 0xA499A0A4, 0xA0A499A0, 0x9A9FA699,
+ 0xA69AA2A6, 0xA4A69AA2, 0x99A1A59A, 0xA599A1A5,
+ 0xA3A697A3, 0x95A2A897, 0xA491A0A6, 0xA2A693A0,
+ 0x91A1A592, 0xA592A0A4, 0x9FA390A1, 0x97A2A897,
+ 0xA897A2A8, 0xA2A897A2, 0x97A2A897, 0xA798A2A8,
+ 0xA6AC9BA4, 0x9BA6AC9B, 0xAC9DA4AC, 0xA4AB9CA5,
+ 0x9AA6AD9E, 0xAB9CA2A9, 0xA6AD9EA4, 0x9FA7AB9F,
+ 0xADA1A7AB, 0xABAFA3A9, 0xA0ABAFA3, 0xAB9FA8AC,
+ 0xADB1A5A7, 0xA5ADB1A5, 0xB1A5ADB1, 0xADB1A5AD,
+ 0xA5ADB1A5, 0xAEA2ADB1, 0xA8ACA0AA, 0xA8AEB2A6,
+ 0xB5A6B0B4, 0xAEB5A8AE, 0xA7ABB3A8, 0xB0A7A9B1,
+ 0xADB2A9AB, 0xAAAEB3AA, 0xB0A9ACB4, 0xA9B0A9A9,
+ 0xABAEB6AC, 0xB3AAAFB4, 0xAEB3AAAE, 0xA9ABB2AB,
+ 0xB2ABA9B0, 0xAFB3ADAB, 0xAEB2B4AE, 0xB3AFB2B4,
+ 0xB5B9B4B2, 0xC0BDC1BC, 0xC0BEBFC2, 0xBBBFBABD,
+ 0xB9BABEB9, 0xBDBBBABE, 0xBABDBBB8, 0xB8B9BCBA,
+ 0xBCBAB7BA, 0xBABFBDB9, 0xB8BAC0BB, 0xBCBBB6BD,
+ 0xB4BAB9B6, 0xBDB7BEBB, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBEBBB9BF, 0xB6BBB9B7, 0xBCB7BBB6,
+ 0xBFBDBDC1, 0xBCBFBDBC, 0xB9BCBFBD, 0xBDBBBABE,
+ 0xBDC0BEBA, 0xBDBCBFBD, 0xBFBDBCBF, 0xBDC0BEBC,
+ 0xBDB8BDBB, 0xC0BFBABF, 0xBABFBEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BFBB, 0xBFBAC0BF, 0xC0BFB9BE,
+ 0xBAC0BFBB, 0xC0BABFC0, 0xBBBABBC1, 0xB9BFBEB6,
+ 0xBFBAC0BF, 0xBFBEB8C0, 0xBAC0BFB9, 0xC1BABFC0,
+ 0xC1C0BBC0, 0xBBC1C0BB, 0xBFBBC0BF, 0xC0BFBBC0,
+ 0xBBC0BFBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xB9BEBCBB,
+ 0xBFB9BFBE, 0xBCBCB8C0, 0xB8C0C0B4, 0xBDB4BCBC,
+ 0xC0C0B5BD, 0xB8C0BFB8, 0xBEBAC0BF, 0xBDBCB9BF,
+ 0xBABFBEB8, 0xBDBABFBD, 0xBFBDBABF, 0xBBC0BEBA,
+ 0xBDBABFBD, 0xC0BDB9C0, 0xB9C0BDB9, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBCBFBDBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x888B89BE,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000000, 0x00000100, 0xC0585D5E, 0xBFC0B8C0,
+ 0xBAC0BFBA, 0xBCB6BCBB, 0xBDBCB7BD, 0xB7BDBCB8,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xB9BFBEBA, 0xC0B7BFBE,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xC1B8C0C0, 0xBDBEB9C1,
+ 0xB9BEBFB8, 0xBEB9BEBF, 0xC0C0B8BD, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA, 0xBEB9BFBE,
+ 0xC0C0B9BF, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFBEB8C0,
+ 0xB9BFBEB9, 0xC0B9C1C1, 0xBFBEB8C0, 0xB9BFBEB9,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB6BEBD,
+ 0xC0C0B8C0, 0xB9C1C1B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0BFB8, 0xBEB8C0BF, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC2C1BABF, 0xBCC1C0BD, 0xBFB8BEBD,
+ 0xBFC0B7BF, 0xBABFC0BA, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xBBC0C1BB, 0xC0BABFC0, 0xBCBDBABF, 0xBAC0BFB7,
+ 0xBFB8C0C0, 0xC0C0B7BF, 0xB5BDBDB8, 0xC0B5BDBD,
+ 0xBDBCB8C0, 0xB7BDBCB7, 0xBDB7BEBB, 0xBBB9B9C0,
+ 0xB8BDBBB6, 0xBBB8BDBB, 0xBFBDB8BD, 0xB8BDBBBA,
+ 0xB7B8BEB9, 0xBBB9B5BC, 0xB8BDBBB6, 0xBABABDBB,
+ 0xBDBBB9BC, 0xB8BBB9BA, 0xB7B8BCB7, 0xBDB8B8BC,
+ 0xB7BBB6B9, 0xB2B1B8B1, 0xBBB2B4BC, 0xB6BBB2B6,
+ 0xB1B6BBB2, 0xBBB2B3BB, 0xB6BBB2B6, 0xB1B8BCB1,
+ 0xBBB1B8BC, 0xABAFA3BA, 0xABB3B7AC, 0xB7ABB1B8,
+ 0xADB1A5B3, 0xA1ABADA1, 0xAE9FABAD, 0xA2A798A9,
+ 0x959EA394, 0xA897A0A6, 0x9EA493A2, 0x96A0A695,
+ 0xA695A0A5, 0x9BA190A0, 0x8E9AA08F, 0x9F90999F,
+ 0x9DA0919C, 0x8F9AA08F, 0x9F9098A0, 0x999D9198,
+ 0x8C999D91, 0x9A8E9498, 0x95998D96, 0x8B93978B,
+ 0x9A8E9397, 0x93978B96, 0x838E9586, 0x8D838990,
+ 0x82898285, 0x7F80847E, 0x837E8084, 0x2223217F,
+ 0x00000100, 0x5E560201, 0x8E8C8161, 0x75858476,
+ 0x7F718585, 0x807F7180, 0x72828272, 0x83758282,
+ 0x86837586, 0x71808070, 0x7E6E8181, 0x7E7E6E7E,
+ 0x6E808070, 0x7B698080, 0x7C7C6A7B, 0x6A777668,
+ 0x77697978, 0x78786878, 0x61707060, 0x67577171,
+ 0x6A675867, 0x58696959, 0x67596868, 0x68675968,
+ 0x59666459, 0x5D526664, 0x5E5C515F, 0x5A5F5D53,
+ 0x5D536664, 0x615D525F, 0x51605C51, 0x5C51605C,
+ 0x5E5D4F60, 0x515C5B4D, 0x60505F5F, 0x60605060,
+ 0x505F6050, 0x60525F60, 0x605F5161, 0x59666557,
+ 0x64596664, 0x66645968, 0x5A69685A, 0x665B6868,
+ 0x68665B68, 0x406E6C62, 0x00004B48, 0x00000002,
+ 0x00000000, 0x00000000, 0x02000000, 0x080F0C08,
+ 0x29250F0C, 0x4B48442C, 0x5755534B, 0x6E646261,
+ 0x6F6F636F, 0x6E787769, 0x85777D7C, 0x86847988,
+ 0x2586847A, 0x02002F2D, 0x00010003, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x01020000, 0x42262620,
+ 0x6D654C4A, 0x706E6470, 0x818E8980, 0x89808F8A,
+ 0x8E89808E, 0x7F8B897F, 0x8A818987, 0x88897F89,
+ 0x7A89877C, 0x897B8988, 0x8887798A, 0x7D8A887D,
+ 0x867D8987, 0x8A887E8B, 0x77838278, 0x7B6F8281,
+ 0x71736779, 0x64686C61, 0x2828686A, 0x0704062A,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000100, 0x07080409, 0x06060605,
+ 0x3B3C3806, 0x9EA9ABA5, 0xA198A4A7, 0xA0A198A0,
+ 0x979FA398, 0xA2979CA2, 0x9DA3989C, 0x959B9F93,
+ 0xA1959DA1, 0x9EA2969D, 0x969EA296, 0xA2969EA2,
+ 0x9EA3949E, 0x94A2A897, 0xA3939FA5, 0xA4A797A0,
+ 0x95A2A897, 0xA695A0A6, 0x9EA493A0, 0x919EA491,
+ 0xA6939EA4, 0xA2A897A0, 0x98A2A798, 0xA69AA0A7,
+ 0xA0A596A2, 0x9EA3A899, 0xADA1A8AD, 0xA4A89CA9,
+ 0xA0A5A99D, 0xAD9EA8AC, 0xA8AD9EA8, 0x9FA6AB9C,
+ 0xADA1A9AE, 0xA7AB9FA9, 0xA2AAAEA2, 0xAEA2AAAE,
+ 0xAAAEA2AA, 0xA4A8ACA0, 0xB0A4ACB0, 0xADB1A5AC,
+ 0xA5AFB1A5, 0xB1A5AFB1, 0xA8ACA0AD, 0xA8ABB2A5,
+ 0xB2A5AEB5, 0xAEB5A8AB, 0xA8ADB3A8, 0xB3A8ADB3,
+ 0xB0B4A9AD, 0xAAB0B4A9, 0xB0A9AEB3, 0xAAB1AAA9,
+ 0xAAACB4AA, 0xB5ACACB4, 0xB0B5ACB0, 0xA9ACB3AC,
+ 0xB5ACA9B0, 0xB1B6ADB0, 0xA8B0B3AA, 0xB1ABAEB1,
+ 0xB5B7B1AF, 0xC0C0C1BF, 0xC0C0C0C0, 0xBEC1BFC0,
+ 0xB7B8BCB7, 0xBCB7B6BC, 0xB8BBB9B8, 0xBBB8BBB9,
+ 0xBBB9BABD, 0xBABDBBB8, 0xBBBCC0BB, 0xBBBABAC0,
+ 0xB8BDBCB6, 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBEBA,
+ 0xB9BABFBD, 0xBEBBB5BC, 0xB9C0BDB7, 0xB9B8BDBB,
+ 0xC0BFB6BB, 0xBABFBDBB, 0xBBBCBFBD, 0xBFBDBABD,
+ 0xBDBEBCBE, 0xBFBCBFBD, 0xC0C0BEC1, 0xBDBFBFC0,
+ 0xBDBABFBD, 0xBFBEB9C0, 0xBABFBEBA, 0xBFBABFBE,
+ 0xBFBDBCC1, 0xBCBFBDBC, 0xBEBCBEBE, 0xC0C0BCBE,
+ 0xBFC1C1BE, 0xBEB9BFBE, 0xBBBAB9BF, 0xB7BDBCB6,
+ 0xBFBAC0BF, 0xBFC0B8C0, 0xBABFC0BA, 0xBFBAC0BF,
+ 0xBFBFB8C0, 0xB8C0C0B7, 0xC0BABFC0, 0xBFC0BABF,
+ 0xBBC0C1BA, 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9,
+ 0xBFBABFC0, 0xBDBCB9BE, 0xB9BFBEB7, 0xBBB2B8B7,
+ 0xC0BFB6BC, 0xB9C1C0B8, 0xBBB7BDBC, 0xBDBCB8BD,
+ 0xB7BDBCB7, 0xBFBABFBE, 0xC0BFBBC0, 0xBBC1C0BA,
+ 0xBFBAC0BF, 0xBEBBBAC0, 0xB7BEBBB7, 0xBDB9C0BD,
+ 0xC0BFBABF, 0xBABFBDBB, 0xBBBABFBD, 0xBFBDBAC0,
+ 0xBCBFBDBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B87C0,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000000, 0x00000100, 0xC0585D5E, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBBB6BCBB, 0xBCBBB6BC, 0xB7BCBBB7,
+ 0xBEB9BFBE, 0xC0BDB7BF, 0xB9BFBEB9, 0xC0B7BFBE,
+ 0xC0BFB8C0, 0xB7BFBEB8, 0xC1B8C0BF, 0xBEBFB9C1,
+ 0xB9BEBFB9, 0xC0B9BEBF, 0xBFBFBABF, 0xB8C0C0B7,
+ 0xC1B8C0C0, 0xBFC0B9C1, 0xBABFC0BA, 0xBDBAC0BF,
+ 0xBFBFB8BE, 0xB8C0C0B7, 0xC0B8C0C0, 0xBFBEB8C0,
+ 0xB9BFBEB9, 0xC1B8C0C0, 0xBFBEB9C1, 0xB9BFBEB9,
+ 0xBFB8C0C0, 0xC1C1B7BF, 0xB8C0C0B9, 0xBFB7BFBF,
+ 0xC1C1B8C0, 0xB8C0C0B9, 0xBFB7BFBF, 0xC0BFB7BF,
+ 0xB8C0BFB8, 0xBDB7BFBE, 0xBFBFB6BE, 0xB7BFBFB7,
+ 0xC0B8C0C0, 0xC1C0BBC1, 0xBCC1C0BC, 0xBFB9C1C1,
+ 0xBCBDB7BF, 0xBABFC0B7, 0xBFBBC1C0, 0xC2C1BAC0,
+ 0xBBC1C0BD, 0xC0BABFC0, 0xBFBEB8C0, 0xB9BFBEB9,
+ 0xC0BAC0BF, 0xBFC0B8C0, 0xBBC0C1BA, 0xBFB7BCBD,
+ 0xBDBCB9BE, 0xB7BDBCB7, 0xBCB7BEBB, 0xBFBDB8BF,
+ 0xB6BBB9BA, 0xBDBABDBB, 0xBEBCBCBF, 0xBABDBBBB,
+ 0xB9B8BEB9, 0xBBB9B7BE, 0xB5BAB8B6, 0xBBBABDBB,
+ 0xBCBABABD, 0xBABEB9BB, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB8BCB6B8, 0xB0B4BCB2, 0xBBB2B2BA, 0xB6BEB4B6,
+ 0xB2B5BDB3, 0xC6BCB4BC, 0xB6BCB1BE, 0xA3B7BBB0,
+ 0x9488ADAF, 0x9EA29692, 0xA5ACB0A4, 0xB7ABADB1,
+ 0xB8BCB0B3, 0xA1B1B3A7, 0xA79AA9AD, 0xA0A798A0,
+ 0x95A2A798, 0xA493A0A6, 0xA1A7969E, 0x959FA594,
+ 0xA695A0A6, 0x9EA493A0, 0x90999F8E, 0x9F909BA1,
+ 0x9C9F909C, 0x8F9A9F90, 0x9D90979E, 0x999D9196,
+ 0x91989C90, 0x9C90999D, 0x989C9098, 0x8B93978B,
+ 0x978B9397, 0x93978B93, 0x858E9588, 0x887E8B92,
+ 0x81888180, 0x7F7E847F, 0x84828084, 0x20232181,
+ 0x00010101, 0x5B560200, 0x8E8C825E, 0x75858476,
+ 0x80708585, 0x85857580, 0x73848375, 0x83758281,
+ 0x87847686, 0x70808070, 0x7F6F8080, 0x8080707F,
+ 0x6A7F7F6F, 0x806E7C7C, 0x7C7C6A80, 0x69787868,
+ 0x77697877, 0x70706278, 0x58707060, 0x67596868,
+ 0x68675968, 0x59686858, 0x67596969, 0x62615368,
+ 0x525E5C51, 0x574D5F5D, 0x5F5D5359, 0x545F5D53,
+ 0x5D53605E, 0x5F5D535F, 0x52605B52, 0x5D52605B,
+ 0x5E5C5161, 0x505B5B4F, 0x5B4D5C5C, 0x5F5F515C,
+ 0x4D595C4D, 0x5B4D595C, 0x5C5A4F5B, 0x525E5E52,
+ 0x5E545F5D, 0x5E5C5260, 0x525F5F51, 0x61556060,
+ 0x605F5561, 0x426E6C62, 0x00004B47, 0x00000002,
+ 0x00000000, 0x00000000, 0x02000000, 0x240F0C08,
+ 0x48442D29, 0x4B48434B, 0x63606157, 0x7C706D6F,
+ 0x6D70617A, 0x6D787868, 0x84797D7D, 0x88847988,
+ 0x5086847A, 0x01005A58, 0x00010002, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000201, 0x28252004, 0x54343129, 0x89815F5C,
+ 0x8D8A828C, 0x818A8880, 0x8980898A, 0x88897F88,
+ 0x7B8A887D, 0x87788C89, 0x8B887A8A, 0x7D89877C,
+ 0x847A8987, 0x86847A86, 0x77828078, 0x81778081,
+ 0x71756980, 0x62686C61, 0x2725686B, 0x09060826,
+ 0x00000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x09070308, 0x3B3B0605,
+ 0xA5A6A23B, 0x97A4A79E, 0xA0979EA2, 0x9EA1989F,
+ 0x999EA499, 0xA2999EA4, 0x9CA1989D, 0x989DA196,
+ 0xA498A0A4, 0x9FA397A0, 0x969EA296, 0x9F909EA2,
+ 0x9A9F909A, 0x919AA08F, 0x9F8F9CA2, 0xA0A3939C,
+ 0x95A0A695, 0xA695A0A6, 0xA0A695A0, 0x92A1A794,
+ 0xA4919FA5, 0x9EA4939E, 0x9A9EA596, 0xA79AA0A7,
+ 0xA0A79AA0, 0x99A3A899, 0xA69AA3A8, 0xA8ACA0A2,
+ 0x9DA8ACA0, 0xAD9EA5A9, 0xA9AE9FA8, 0x9CA6AB9C,
+ 0xADA1A6AB, 0xAAAEA2A9, 0xA1A6AA9E, 0xADA1A9AD,
+ 0xAAAEA2A9, 0xA3ABAFA3, 0xAFA3ABAF, 0xADB1A5AB,
+ 0xA3B0B2A6, 0xACA0ADAF, 0xABAFA3A8, 0xA5ACB0A4,
+ 0xB5A8ABB2, 0xABB2A5AE, 0xA7ABB1A6, 0xB3A8ACB2,
+ 0xAEB4A9AD, 0xA8B0B4A9, 0xB1A7ACB1, 0xAAB2A8A9,
+ 0xAAABB4AA, 0xB4AAACB4, 0xAEB3AAAC, 0xABAEB5AE,
+ 0xB3AAABB2, 0xAEB4A9AE, 0xACAEB3AA, 0xB5ACB2B5,
+ 0xB3B5AFB2, 0xC0B3B4B2, 0xC0C0BEC0, 0xBEC1BFBE,
+ 0xB7C0C4BF, 0xBCB7B6BC, 0xB8BBB9B8, 0xBDBCBFBD,
+ 0xBEBCBCBF, 0xB8BBB9BB, 0xB7BABEB9, 0xBBB9B8BC,
+ 0xBABFBEB6, 0xBEBABFBE, 0xBFBDBAC1, 0xB6BBB9BA,
+ 0xBBB6BBB9, 0xC0BDB8BD, 0xB9C0BDB9, 0xBBBABFBD,
+ 0xBDBCB8BD, 0xB8BDBBB8, 0xBEBABDBB, 0xBEBCBDC0,
+ 0xBDBEBCBD, 0xBFBCBFBD, 0xC0C0BEC1, 0xBCBEBEC0,
+ 0xBEBABFBD, 0xC0BFBAC1, 0xBABFBEBB, 0xBFBBC0BF,
+ 0xBDBBBEC1, 0xBABDBBBA, 0xC0BEBEBE, 0xC0C0C0C0,
+ 0xBEC0C0C0, 0xBEBABFBE, 0xBFC0B9BF, 0xBABFC0BB,
+ 0xBEB8C0BF, 0xBDBEB7BF, 0xB9BEBFB8, 0xBEB8C0BF,
+ 0xC0C0B7BF, 0xB8C0C0B8, 0xC0B9BEBF, 0xC0C0BABF,
+ 0xB8C0C0B8, 0xBFB7BFBF, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xC0BABFC0, 0xBEBDBABF, 0xB6BBBAB9, 0xBAB3B8B7,
+ 0xC1C0B7BC, 0xBAC0BFBB, 0xBEB6BDBA, 0xC0BFBBC0,
+ 0xB7BDBCBA, 0xBBB6BBBA, 0xBDBCB7BC, 0xB9BFBEB7,
+ 0xC0B9BEBF, 0xBDBCBBC1, 0xB7BEBBB7, 0xBCB9C0BD,
+ 0xBFBEB8BF, 0xBABFBDBA, 0xBCB9BEBC, 0xBFBDBBC1,
+ 0xBCBFBDBA, 0xC0C1C1C1, 0xC1BFC0C0, 0x8A8B87C0,
+ 0x00000000, 0x00000000, 0x02000002, 0x00020000,
+ 0x00000000, 0x00000000, 0xBF595E5D, 0xBFC0BAC0,
+ 0xBABFC0BA, 0xBCB7BDBC, 0xBDBCB7BD, 0xB8BDBCB8,
+ 0xBEB9BFBE, 0xBEBDB9BF, 0xB7BDBCB8, 0xBEB8BEBD,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBFB9C1C0, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xBEB7BDBC, 0xC0BFB9BF, 0xB8C0BFB8,
+ 0xBFB5BFBF, 0xBEC1B5BF, 0xB8C0C0B7, 0xBFB8C0C0,
+ 0xC0C0B7BF, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBEBDB8C0, 0xB9BFBEB8,
+ 0xC0B8C0C0, 0xBEC1B8C0, 0xB8C0C0B7, 0xC0B6BEBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B7BFBF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB8C0BF, 0xBEBFB7BF, 0xB7BFBFB9,
+ 0xC0B8C0BF, 0xC1C0B9C1, 0xBBC1C0BB, 0xBFB8C0C0,
+ 0xBCBDB7BF, 0xB7BCBDB7, 0xC2B7BFBF, 0xC0BFBAC2,
+ 0xBBC1C0BA, 0xC0BABFC0, 0xC0BFB8C0, 0xB9BFBEBA,
+ 0xBDB6BCBB, 0xBEBFB8BE, 0xBABEBFBA, 0xBCB8BDBC,
+ 0xBDBCB8BD, 0xB6BCBBB7, 0xBDB7BCBA, 0xC0BEBABF,
+ 0xBABFBDBB, 0xBCB5BAB8, 0xBCBAB9BE, 0xBABDBBB9,
+ 0xB9B9BEBC, 0xBDBBB6BB, 0xB7BCBAB8, 0xB9B7BBB6,
+ 0xBCB7BABE, 0xBABEB9B8, 0xB5B7BDB8, 0xBCB6B5BC,
+ 0xB8BCB6B8, 0xB2B8BDB4, 0xBCB2B6BB, 0xB5BDB3B4,
+ 0xBDB4BBB4, 0xB1A6BFC7, 0xA0A79AA9, 0xA3A9B0A3,
+ 0xA195ABAF, 0xABB0A19D, 0xA0A8ACA0, 0xB1A5A6AD,
+ 0xB4B8ACAD, 0xA7B6BAAF, 0xA79AAFB3, 0x9FA697A0,
+ 0x989FA697, 0xA394A0A7, 0xA0A3939E, 0x93A0A695,
+ 0xA390A0A6, 0xA0A3939F, 0x8F999F8E, 0x9E92999E,
+ 0x9B9F939A, 0x90999D91, 0x9D91989C, 0x989C9099,
+ 0x91979B90, 0x998E989C, 0x969A8E95, 0x90999D91,
+ 0x998D989C, 0x95998D95, 0x85909488, 0x90878A90,
+ 0x858C858B, 0x807F8580, 0x837E7F85, 0x2023217F,
+ 0x00000000, 0x2F2A0200, 0x8E8B8332, 0x768B877C,
+ 0x7F708784, 0x87847582, 0x79888577, 0x81768884,
+ 0x88857785, 0x6F808070, 0x81717F7F, 0x7E7E6C81,
+ 0x5F7A7965, 0x79657473, 0x7A78667A, 0x69787868,
+ 0x73657777, 0x70706273, 0x4E686858, 0x5D4F605D,
+ 0x5F5C4E60, 0x525E5B4C, 0x5B4D6461, 0x5C5B4D5E,
+ 0x4D58584C, 0x574F5857, 0x58564E59, 0x4E57554D,
+ 0x564E5856, 0x59564E58, 0x4D5B564D, 0x51465B56,
+ 0x59574C55, 0x4B56554B, 0x554B5455, 0x56554B56,
+ 0x5054564A, 0x564A5A5C, 0x56554B56, 0x4E56574D,
+ 0x564E5758, 0x58574D58, 0x4D59594D, 0x594D5759,
+ 0x59584E59, 0x416D6B61, 0x00004C49, 0x00000002,
+ 0x00000000, 0x00000000, 0x02010002, 0x432D2A25,
+ 0x48434C48, 0x67685F4B, 0x6E6B6F63, 0x7C6D787D,
+ 0x797C6D77, 0x68777767, 0x7F747A77, 0x88847983,
+ 0x7A87857A, 0x01008584, 0x00010002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010101,
+ 0x01000102, 0x00010000, 0x00020300, 0x04000203,
+ 0x31312B04, 0x825E5E58, 0x88828888, 0x8A888088,
+ 0x7E89877C, 0x897B8F8C, 0x908D7F8C, 0x7C89877C,
+ 0x897D8888, 0x88877D89, 0x7F8A8880, 0x82788889,
+ 0x70746881, 0x62686C60, 0x2826686B, 0x05040627,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x07060509, 0xA6A40605,
+ 0xA3A7A1A5, 0x969CA198, 0xA1989BA1, 0x9EA1989E,
+ 0x989EA499, 0xA2999BA3, 0x9DA2999D, 0x98A0A499,
+ 0xA4999FA3, 0xA1A59AA0, 0x9AA0A79A, 0xA69AA0A7,
+ 0x9EA394A2, 0x929EA493, 0xA3939DA3, 0x9DA090A0,
+ 0x929EA191, 0xA3939FA2, 0xA0A393A0, 0x979FA594,
+ 0xA897A2A8, 0x9EA695A0, 0x939EA394, 0xA6979DA2,
+ 0xA2A798A1, 0x9DA5A99D, 0xA79BA5A9, 0xA0A498A3,
+ 0xA0A3A79B, 0xACA0A8AC, 0xA4A89CA8, 0xA1A6AA9E,
+ 0xAEA2A9AD, 0xA3A79BAA, 0xA2A8ACA0, 0xAB9FAAAE,
+ 0xA9ADA1A7, 0xA5ABAFA3, 0xB0A4ADB1, 0xA7AB9FAC,
+ 0x9DA8AD9E, 0xB2A6A7AC, 0xAEB2A6B0, 0xA4ACB0A5,
+ 0xAFA3ABAF, 0xADB1A5AB, 0xA7AEB2A6, 0xB1A6ACB2,
+ 0xA8B0A6AB, 0xA9ADB2A9, 0xB1A7ABB3, 0xAAB2A8A9,
+ 0xAAAAB2A8, 0xB4AAACB4, 0xA9B1A7AC, 0xAAA9B0A9,
+ 0xB0A6AAB1, 0xACB4AAA8, 0xACAEB6AC, 0xB5ACB0B5,
+ 0xB0B4AEB0, 0xB3A7ABA6, 0x9D9BB0B5, 0xA4AAA598,
+ 0xC0C0C4BF, 0xBBB9C1C5, 0xB9BAB8BA, 0xBDBDC0BE,
+ 0xBBB9BCBF, 0xB5BBB6B6, 0xB7BCC0BB, 0xBBB9B8BC,
+ 0xB7BCBAB8, 0xBBB8BDBB, 0xBEB9BAC0, 0xB8BCB7BA,
+ 0xBBB8BDBB, 0xBFBCB8BD, 0xB6BDBAB8, 0xBCB8BDBB,
+ 0xBAB8B9BE, 0xB7BCBAB5, 0xBBBABDBB, 0xBFBDBCC0,
+ 0xBABDBBBC, 0xBFBCBFBD, 0xC1BFBEC1, 0xBABFBDBE,
+ 0xBFBAC0BF, 0xBFBEBAC0, 0xBABFBEBA, 0xBFBDC0BE,
+ 0xBDBBBEC1, 0xBABDBBBA, 0xBFBCBEBE, 0xC1BFBDBF,
+ 0xBDC0BEC0, 0xBEBAC1BE, 0xC0BFB8C1, 0xBAC0BFBA,
+ 0xC0B9C1C1, 0xBFC0B8C0, 0xB7BCBDBA, 0xBFB6BEBE,
+ 0xBFBFB7BF, 0xB8C0C0B7, 0xC0B9BFBE, 0xBFBEBBC1,
+ 0xB5BDBCB7, 0xBFB7BFBE, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC1B8C0C0, 0xBFC0B9C1, 0xBAC0BFBA, 0xBCADB2B1,
+ 0xBBBAB8BD, 0xB6BCBBB5, 0xBCB7BEBB, 0xBFBEB8BF,
+ 0xBABFC0B9, 0xBCBAC0BF, 0xBBB9B7BD, 0xB6BBB9B6,
+ 0xBAB8BDBC, 0xBDBCB5BB, 0xB7BDBCB7, 0xBEBABFBD,
+ 0xBFBDBBC0, 0xB9BEBCBC, 0xBDBBC0BE, 0xC0BEBABF,
+ 0xBCBFBDBB, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x02000002, 0x00020000,
+ 0x00000200, 0x00000000, 0xBF585D5C, 0xBFC0BAC0,
+ 0xBABFC0BA, 0xBCB7BDBC, 0xBDBCB7BD, 0xB9BEBDB8,
+ 0xBFB9BFBE, 0xBFBEBAC0, 0xB9BFBEB9, 0xBEBAC0BF,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB7BFBE, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xBEB8BEBD, 0xC0BFB9BF, 0xB8C0BFB8,
+ 0xBFB6C0C0, 0xBFBFB5BF, 0xB8C0C0B7, 0xC0B7BFBF,
+ 0xBFBFB8C0, 0xB7BFBFB7, 0xBFB7BFBF, 0xC0C0B7BF,
+ 0xB9C1C1B8, 0xBEB8C0C0, 0xBDBEB7BF, 0xB9BEBFB8,
+ 0xC0B8C0C0, 0xBFC2B8C0, 0xB8BFC2B8, 0xC0B7BFBF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B7BFBF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB8C0BF, 0xBFC0B7BF, 0xBABFC0BA,
+ 0xC0BAC2C1, 0xC1C0B9C1, 0xBBC1C0BB, 0xC1B7BFBF,
+ 0xBFC0B9C1, 0xB8BDBEBA, 0xBFB7BFBF, 0xC1C0B7BF,
+ 0xBAC0BFBB, 0xC0BABFC0, 0xBFBEB8C0, 0xBBC1C0B9,
+ 0xBDB6BCBB, 0xC0BFB8BE, 0xBABEBFBB, 0xBCBBC0BF,
+ 0xBCBBB8BD, 0xB4B9B8B7, 0xBDB6BBB9, 0xBFBEBABF,
+ 0xBABFBEBA, 0xB9B9BEBC, 0xBDBBB6BB, 0xBBBEBCBA,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xB7B9BDB8,
+ 0xBCB7B8BC, 0xB8BEB9B8, 0xB5B5BCB7, 0xBCB5B4BC,
+ 0xB8BCB6B5, 0xB2B9BDB7, 0xB8AEB6BB, 0xB3BBB1B0,
+ 0xB2BFC6BF, 0xA69BB4BC, 0x9FA699A0, 0xA3A9B0A3,
+ 0xB0A4A9B0, 0xA9B0A1AC, 0xA0ABB2A5, 0xACA0A6AD,
+ 0xA8ACA0A8, 0xAEB0B4A8, 0xB5A8B6BA, 0xA0A79AAE,
+ 0x979EA898, 0xA5969FA6, 0xA0A394A0, 0x909EA493,
+ 0xA4949DA3, 0x9DA090A1, 0x8F9AA08F, 0x9E8F999E,
+ 0x9A9E9299, 0x909A9E92, 0x9C90989C, 0x9B9D919A,
+ 0x90989C90, 0x978C989C, 0x90948893, 0x8C909488,
+ 0x9A8E9498, 0x93978B96, 0x89909489, 0x90859094,
+ 0x878C838A, 0x7F7E857E, 0x847F7E84, 0x20241F80,
+ 0x00010101, 0x01000200, 0x615E5604, 0x798F8D82,
+ 0x84758B88, 0x87847587, 0x79868375, 0x84798884,
+ 0x86827788, 0x70827F70, 0x7D6B8080, 0x7A7A687F,
+ 0x657A7965, 0x74627A79, 0x75736176, 0x62777868,
+ 0x6C606E71, 0x6A6C606A, 0x4F686759, 0x54495E5D,
+ 0x58544958, 0x48555446, 0x54495756, 0x56544956,
+ 0x48525147, 0x4F4A5051, 0x524F4A52, 0x48505148,
+ 0x51495051, 0x52504853, 0x424E4C42, 0x4C414E4C,
+ 0x5351464E, 0x48505147, 0x50485051, 0x52504852,
+ 0x47505147, 0x51475051, 0x51504652, 0x49505147,
+ 0x50485152, 0x52504852, 0x47505147, 0x51475051,
+ 0x53524852, 0x3F4B493F, 0x00004947, 0x00000002,
+ 0x00000000, 0x15110001, 0x423F3A16, 0x604C4941,
+ 0x675F6B68, 0x68695F69, 0x6F6D6F63, 0x7D6E797E,
+ 0x7B7E6F78, 0x6E787769, 0x84797F7C, 0x807E7386,
+ 0x7B868479, 0x2C288785, 0x0001002D, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x01010000, 0x00010000, 0x01000301, 0x03010003,
+ 0x01020002, 0x050B0A06, 0x322E0A09, 0x5E5E5833,
+ 0x8385847A, 0x8B80908E, 0x89877C8D, 0x7B89877C,
+ 0x887A8989, 0x89897D88, 0x7F8A897F, 0x80768788,
+ 0x797B6F7F, 0x626A6C60, 0x27266A6B, 0x08050729,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x07060507, 0x706E0605,
+ 0xA3A7A26D, 0x9EADB2A9, 0xA198A2A7, 0x9CA1989E,
+ 0x969CA297, 0xA1969BA1, 0x9CA2979B, 0x949EA297,
+ 0xA0959B9F, 0x9DA1969C, 0x969CA297, 0xA2969CA3,
+ 0x9EA2969E, 0x95A0A596, 0xA595A0A6, 0xA2A595A2,
+ 0x90A1A495, 0xA0919DA0, 0x9DA0919D, 0x969EA394,
+ 0xA596A0A5, 0xA0A7989E, 0x96A2A798, 0xA596A0A5,
+ 0x9EA394A0, 0x9BA0A498, 0xA79BA3A7, 0xA0A498A3,
+ 0x98A3A79B, 0xA99DA0A4, 0xA9ADA1A5, 0x9DA6AA9E,
+ 0xADA1A5A9, 0xA9ADA1A9, 0xA1A8ACA0, 0xAEA2A9AD,
+ 0xAAAEA2AA, 0x9FABAFA3, 0xAFA3A7AB, 0xABAFA3AB,
+ 0xA3A8ACA0, 0xB0A4ABAF, 0xB1B5A9AC, 0xA9B0B4A9,
+ 0xB1A5B0B4, 0xADB1A5AD, 0xA6AFB3A7, 0xB3A8AEB2,
+ 0xACB4AAAD, 0xA7A9B1A7, 0xB3A8A9B1, 0xADB5AAAB,
+ 0xACACB4AA, 0xB4ABAEB6, 0xACB4AAAF, 0xA9AEB5AE,
+ 0xB4AAA9B0, 0xAEB6ACAC, 0xAAABB3A9, 0xB3AAAEB3,
+ 0xB0B5ACAE, 0x9AB3B7B1, 0xA09B999F, 0x999F9A9A,
+ 0xC1A6ACA7, 0xC3C1C0C3, 0xB8BBB9C0, 0xBCBABDBB,
+ 0xBBB9BBBE, 0xB9BFBAB6, 0xB9B8BCB7, 0xBFBDBABE,
+ 0xBCBFBDBC, 0xB7B8BEB9, 0xBDB8B6BC, 0xB8BCB7B9,
+ 0xBBB8BDBB, 0xBEBBB8BD, 0xB7BEBBB7, 0xB9B7BCBA,
+ 0xBDBBB6BB, 0xB8BDBBB8, 0xBBBCBFBD, 0xBDBBBCC0,
+ 0xBCBFBDBA, 0xC0BBBEBC, 0xBFBDBFC2, 0xBABFBDBC,
+ 0xBEBAC0BF, 0xBEBDB9BF, 0xBDBFBFB9, 0xBEBEC1BF,
+ 0xBDBBBDC0, 0xBCBFBDBA, 0xBABABFBE, 0xBAB8B6BB,
+ 0xB8BBB9B7, 0xBFB9BEBC, 0xC0BFBBC2, 0xBBC1C0BA,
+ 0xC0B8C0C0, 0xC0C1B8C0, 0xBBC0C1BB, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBBB8BEBD, 0xBFBEB7BE,
+ 0xB8C0BFB7, 0xBFB8C0BF, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xB8BDBEBA, 0xBBB3B8B7,
+ 0xBFBEB7BC, 0xB7BDBCB9, 0xBCB4BBB8, 0xC1C0B8BF,
+ 0xBAC0BFBB, 0xBEBAC0BF, 0xBFBDB9BF, 0xB9BEBCBA,
+ 0xBBB6BBBA, 0xBEBDB6BC, 0xB7BDBCB8, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD, 0xBEBCBABF,
+ 0xBABFBDB9, 0xBFBEC0C0, 0xC1BFBFBF, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBE565B59, 0xC0C0BAC1,
+ 0xB8C0C0B8, 0xBBB5BDBC, 0xBDBCB5BE, 0xB7BDBCB7,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xB8BEBDB9, 0xBDB9BFBE,
+ 0xC0BFB8BE, 0xBAC0BFBA, 0xBEB8C0BF, 0xBFBEB7BF,
+ 0xB8C0BFB7, 0xBAB5BDBC, 0xBEBDB3BB, 0xB8C0BFB6,
+ 0xC0B8C0C0, 0xBFBEB8C0, 0xB9BFBEB9, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xC0BAC0BF, 0xC0C0BABF,
+ 0xB8C0C0B8, 0xBEB8C0BF, 0xBEBFB7BF, 0xBABFC0B9,
+ 0xC0B8C0C0, 0xC0C0B6C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBFC2B8C0, 0xB8C0C0B8, 0xBFB9BFBE, 0xBFC0BAC0,
+ 0xBABFC0BA, 0xBFB9C1C1, 0xC0BFB7BF, 0xBBC1C0BA,
+ 0xC1BBC0C1, 0xC0BFBBC0, 0xBBC1C0BA, 0xC0BAC0BF,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xBCB8C0BF, 0xC0BFB5BD,
+ 0xBAC0BFBA, 0xC0BABFC0, 0xC0C0BABF, 0xB8C0C0B8,
+ 0xBEB7BFBF, 0xBFBEB7BF, 0xBBC0BFB9, 0xBEBBBFC0,
+ 0xBBBABABF, 0xB5BAB8B6, 0xBEBABFBD, 0xBFBDBAC1,
+ 0xBBC0BEBA, 0xBBB8BDBC, 0xBDB8B8BD, 0xB7BBB6B9,
+ 0xBBBDC0BE, 0xBEBCBABD, 0xBBBEBCBB, 0xB8B7BDB8,
+ 0xBBB9B7BD, 0xB7BDB8B6, 0xB6B4BBB6, 0xB8B3B4BB,
+ 0xB5BCB5B2, 0xB9B9C0B9, 0xBFB6B9C0, 0xBAC2B8BA,
+ 0xA3B9C1B7, 0xA499A5AD, 0xA7ADA29E, 0xA3AAB0A5,
+ 0xADA0A9B0, 0xA9B0A3A6, 0xA0A8AFA2, 0xADA2A4AD,
+ 0xA5AC9FA7, 0xA5A5AC9F, 0xB5A8ABB2, 0xADB4A7AE,
+ 0x98A3AA9D, 0xA4989EA5, 0xA1A495A0, 0x96A0A596,
+ 0xA3949FA7, 0x9EA4939E, 0x8C999F8E, 0x9D8C979D,
+ 0x999F8E97, 0x8D9AA08F, 0x9D8D989E, 0x9A9D8E9A,
+ 0x8E989D8E, 0x998C969D, 0x90978A92, 0x8C91988B,
+ 0x978C9299, 0x93978C93, 0x84909488, 0x8F838C90,
+ 0x868C818B, 0x82818881, 0x88838087, 0x20241F82,
+ 0x00000000, 0x00000200, 0x43403B02, 0x78888779,
+ 0x88788888, 0x88887888, 0x76868374, 0x84798784,
+ 0x827E7386, 0x72858273, 0x7F708684, 0x83807184,
+ 0x66777765, 0x77677878, 0x78776977, 0x58626256,
+ 0x60576162, 0x6061585F, 0x4047483E, 0x48404B4A,
+ 0x4A48404A, 0x3F4B4A40, 0x493F4A49, 0x47453D4A,
+ 0x3E484842, 0x433E4444, 0x4A474246, 0x3F484940,
+ 0x483E4849, 0x44453B47, 0x3D47453D, 0x463C4745,
+ 0x46473D47, 0x3D43443B, 0x463C4346, 0x45463C45,
+ 0x4046443C, 0x443C4A48, 0x47453D47, 0x3E44453C,
+ 0x423D4444, 0x46443C45, 0x3C46443C, 0x443C4644,
+ 0x46433B47, 0x2E4D4B43, 0x06063434, 0x03050604,
+ 0x260A0B09, 0x4A452C2C, 0x4D4B434D, 0x5E636156,
+ 0x72666B69, 0x72726672, 0x6D757569, 0x7C717979,
+ 0x7674697E, 0x70757368, 0x81777C7A, 0x83827882,
+ 0x79868479, 0x5A558583, 0x0A08075D, 0x00020000,
+ 0x01000200, 0x00010000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x01000102, 0x01020000,
+ 0x2D33322E, 0x645C3333, 0x98968C66, 0x80908F81,
+ 0x90809090, 0x8F8F818F, 0x8088897F, 0x8A818889,
+ 0x71726889, 0x636E6C61, 0x27266E6B, 0x0A05072B,
+ 0x00020000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x20241F00, 0x6D393D37, 0xB0A77176, 0xACB1A8AB,
+ 0x999EA499, 0xA498A1A5, 0xA0A499A0, 0x999DA196,
+ 0xA1989FA2, 0x9EA2979E, 0x989DA398, 0xA1969DA3,
+ 0x9BA1969B, 0x939AA192, 0xA5969CA4, 0xA0A596A0,
+ 0x95A1A599, 0xA5999FA4, 0x9EA296A1, 0x979EA296,
+ 0xA2969FA3, 0x9FA3979E, 0x98A0A79A, 0xA899A0A7,
+ 0x9FA697A1, 0x97A0A498, 0xA4989FA3, 0xA1A599A0,
+ 0x9DA5A99D, 0xA99DA5A9, 0xA3A79BA5, 0x9DA5A99D,
+ 0xA99DA5A9, 0xA8ACA0A5, 0xA0A5A99D, 0xACA0A8AC,
+ 0xA8ACA0A8, 0xA4ACB0A4, 0xAFA3ACB0, 0xABAFA3AB,
+ 0xA3A9B0A3, 0xB0A3A9B0, 0xAAB1A4A9, 0xA4AEB5A8,
+ 0xB1A5AAB1, 0xABAFA3AD, 0xA8ADB2A3, 0xB1A5B0B4,
+ 0xAEB4A9AD, 0xA7ABB3A9, 0xB3AAA9B1, 0xADB2A9AE,
+ 0xA8ACB2A7, 0xB4A9ADB3, 0xAEB3AAB0, 0xA9ADB4AD,
+ 0xB7ADA8B0, 0xADB5ABAE, 0xACAEB3AA, 0xB5ACB0B5,
+ 0xB0B5ACB0, 0x9CACB0AA, 0x938D9EA2, 0x9CA39C8F,
+ 0xAFADB3AE, 0xC0BFACB1, 0xBBC0BFBB, 0xBBBBBDBD,
+ 0xBDBBBABD, 0xB8BDBBB8, 0xBDBABDBB, 0xBDBBBEBF,
+ 0xB9BCBABC, 0xB9B6BBB9, 0xBDBBB5BC, 0xB8BDBBB8,
+ 0xBAB8BDBB, 0xBEBDB7BC, 0xB8BDBCB9, 0xBBB5BBBA,
+ 0xBFBEB6BC, 0xB8BDBBBA, 0xBDB9BEBC, 0xBCBCBABF,
+ 0xBCBEBEBA, 0xC0BCBEBE, 0xBFBDBEC0, 0xBABDBBBC,
+ 0xBEB8BDBC, 0xC0C0BABF, 0xBDBFBFBE, 0xBEBABFBE,
+ 0xBFBDBBC0, 0xB9BEBCBC, 0xBFBBC1C0, 0xBEBDB8C0,
+ 0xB6BBB9B8, 0xB9B7BBB6, 0xC0BFB8BE, 0xBABFC0BB,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xBBC1C0BA, 0xC0BABFC0,
+ 0xBFC0BABF, 0xBABFC0BA, 0xBCB5BBBA, 0xC0C0B7BD,
+ 0xB9C1C0B8, 0xBFBBC1C0, 0xC1C0BBC2, 0xBBC1C0BB,
+ 0xC0B7BFBF, 0xC0BFB8C0, 0xB9BFBEBA, 0xBCB7BCBB,
+ 0xBDBCB8BD, 0xB7BDBCB7, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBD,
+ 0xBFBAC0BF, 0xBDBCBAC0, 0xB7BDBCB7, 0xBFB6BCBB,
+ 0xBDBCBAC0, 0xB7BDBCB7, 0xBAB9C0BD, 0xC0BDB6BD,
+ 0xBABFBDB9, 0xC1BDBFBF, 0xC1BFC1C1, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0xBE555A58, 0xC0C0BAC1,
+ 0xB8C0C0B8, 0xBBB5BDBC, 0xBDBCB5BE, 0xB7BDBCB7,
+ 0xBEB8BEBD, 0xBEBFB9BF, 0xB9BFBEB9, 0xBEBAC0BF,
+ 0xBFBEB9BF, 0xB9BEBFB9, 0xBEB9C1C0, 0xBFBEB7BF,
+ 0xB8C0BFB7, 0xB8B3BBBB, 0xBDBDB0B8, 0xB8C0BFB5,
+ 0xBFB8C0C0, 0xBCBBB7BF, 0xB5BBBAB6, 0xBBB5BDBD,
+ 0xC0BFB3BB, 0xB8C0BFB8, 0xBFBAC0BF, 0xC1C1BAC0,
+ 0xB8C0C0B9, 0xBEB8C0BF, 0xBFC0B7BF, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xBFBFB8C0, 0xB8C0C0B7, 0xC0B7BFBF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBDB9BFBE, 0xBFBEB9C0,
+ 0xBABFC0B9, 0xC0B9C1C1, 0xC1C0B8C0, 0xBBC1C0BB,
+ 0xC2BABFC0, 0xC1C0BCC1, 0xBBC1C0BB, 0xC0BBC1C0,
+ 0xC2BFBBC1, 0xBCC3C0BB, 0xBEB7BFBE, 0xBDBCB7BF,
+ 0xBAC0BFB7, 0xC0B9BEBF, 0xC1C1BABF, 0xB7BFBFB9,
+ 0xC0B7BFBF, 0xBFBEB8C0, 0xB8BDBCB9, 0xC0B8BDBE,
+ 0xBDBBBBC1, 0xB8BDBBB8, 0xBFB9C0BD, 0xBFBDBBC2,
+ 0xB7BCBABA, 0xBDB8BDBC, 0xBEB9BABF, 0xB8BCB7B8,
+ 0xBCBABDBB, 0xBAB8BBBE, 0xB9BCBAB7, 0xB7B7BDB8,
+ 0xBBB9B6BC, 0xB7BCBAB6, 0xB6B4BBB6, 0xB8B3B4BB,
+ 0xB2B9B2B2, 0xB7B9C0B9, 0xB5ACB9C1, 0xA7ACA3B0,
+ 0xA3A8ADA4, 0xACA1A5AD, 0xA8AEA3A6, 0xA5A9AFA4,
+ 0xADA0AAB0, 0xA6ADA0A6, 0xA1A4ACA1, 0xABA0A4AC,
+ 0xA2A89DA3, 0x9DA5AC9F, 0xAC9FA5AC, 0xAFB6A9A5,
+ 0x9DA9B0A3, 0xA498A5A9, 0xA0A498A0, 0x949EA394,
+ 0xA3949CA3, 0x9EA3949E, 0x909BA190, 0x9E8E9BA1,
+ 0x999D8A9B, 0x8A969C8B, 0x9A8A959B, 0x979D8C97,
+ 0x8C949B8C, 0x9B8C949B, 0x949B8C94, 0x8C92998C,
+ 0x988D9299, 0x93978C94, 0x85909488, 0x90818D91,
+ 0x868D808B, 0x82818881, 0x86818087, 0x1E241F80,
+ 0x00000000, 0x00000000, 0x18181202, 0x78878779,
+ 0x88788888, 0x88887888, 0x77868374, 0x84798885,
+ 0x85837886, 0x6E847F70, 0x7F708480, 0x827F7184,
+ 0x69787868, 0x685A7879, 0x68685C69, 0x57626157,
+ 0x605A5F60, 0x41413B60, 0x2932322C, 0x312B3132,
+ 0x48484231, 0x38404138, 0x41384041, 0x40413840,
+ 0x3841413B, 0x403B3E3E, 0x423F3A43, 0x38434139,
+ 0x433A4142, 0x44453C42, 0x3C43443B, 0x41384445,
+ 0x3F403740, 0x383F4239, 0x443B3E41, 0x40413843,
+ 0x3844423A, 0x3D354240, 0x3F3D3540, 0x3B43403B,
+ 0x413C4141, 0x43403B44, 0x35434139, 0x3C373F3D,
+ 0x403C3740, 0x2E36342C, 0x06043434, 0x03060403,
+ 0x432C2C26, 0x6C644D4B, 0x6D6B616E, 0x646B6A5C,
+ 0x72667372, 0x7A7A6E72, 0x717E7C71, 0x7B727E7C,
+ 0x78736A80, 0x626E6C62, 0x81786D6C, 0x7F807680,
+ 0x7A86847A, 0x827D8684, 0x0C090586, 0x00020000,
+ 0x01000200, 0x00010000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010101, 0x00000100, 0x01000000, 0x01010101,
+ 0x00000001, 0x00000000, 0x01010000, 0x00010001,
+ 0x00000100, 0x01000001, 0x36342C02, 0x81616155,
+ 0x8E808F8F, 0x8D90818E, 0x8088897F, 0x89808889,
+ 0x73726888, 0x636E6C62, 0x2726706A, 0x0A05072C,
+ 0x00020000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000400, 0x3D370105, 0x72776E39,
+ 0x99A1A59A, 0xA398A0A4, 0xA0A4999F, 0x989EA198,
+ 0xA1989EA1, 0x9EA1989E, 0x999CA297, 0xA39A9EA4,
+ 0x9EA4999E, 0x939FA697, 0xA0949BA2, 0x9CA0949C,
+ 0x999EA598, 0xA4989FA6, 0x9DA195A0, 0x9A9FA398,
+ 0xA599A1A5, 0xA0A498A1, 0x979EA598, 0xA6979DA4,
+ 0xA0A7989F, 0x9BA5A99D, 0xA79BA3A7, 0xA0A498A3,
+ 0x9DA3A79B, 0xADA1A5A9, 0xA5A99DA9, 0x9DA4A89C,
+ 0xACA0A5A9, 0xA2A69AA8, 0xA0A3A79B, 0xACA0A8AC,
+ 0xA8ACA0A8, 0xA2A4A89C, 0xAFA3AAAE, 0xAAAEA2AB,
+ 0xA4A6ACA1, 0xAFA4A9AF, 0xA6ADA0A9, 0xA5ACB3A6,
+ 0xAEA2ADB1, 0xB0B4A8AA, 0xA1ADB2A3, 0xB2A6ABB0,
+ 0xAEB5A8AE, 0xA7AAB2A7, 0xB1A8A9B1, 0xAFB4ABAC,
+ 0xA8AEB4A9, 0xB2A7ADB3, 0xAFB3A8AE, 0xACA9B1A7,
+ 0xB6ACABB3, 0xABB4AAAD, 0xAAAEB3AA, 0xB3AAB0B3,
+ 0xADB2A9AE, 0x9DAEB0AA, 0x887FA1A3, 0x90948E85,
+ 0xB09EA49F, 0xC0BFADB2, 0xBBC0BFBB, 0xBBBABCBC,
+ 0xBEBCBABD, 0xB8BDBBB9, 0xBABCBFBD, 0xBBB9BBBC,
+ 0xB7BAB8BA, 0xBDB8BDBB, 0xBDBBB9C0, 0xB9BEBCB8,
+ 0xBAB8BDBB, 0xBFBEB7BC, 0xB7BCBBBA, 0xBEB7BDBC,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xBBB7BCBA, 0xBEBEB8BD,
+ 0xBABCBCBC, 0xC0BFC1C1, 0xBFBDBEC0, 0xBABDBBBC,
+ 0xBEBBBDBD, 0xC0C0BCBE, 0xBEC0C0BE, 0xBDBABFBE,
+ 0xBFBDBABF, 0xBAC0BBBA, 0xBEB8C1BE, 0xC0BFB7BF,
+ 0xBBC0BEB8, 0xB4B7BBB5, 0xBCBBB6BA, 0xBABFC0B7,
+ 0xBFB7BFBE, 0xC1C0B8C0, 0xBBC1C0BB, 0xC1BABFC0,
+ 0xBEBFBBC0, 0xB9BFBEB9, 0xBEB5BBBA, 0xC0C0B9BF,
+ 0xB7BFBFB8, 0xC0BBC1C0, 0xC1C0BCC3, 0xBCC2C1BB,
+ 0xC0B8C0C0, 0xC1C0B8C0, 0xB9BFBEBB, 0xBFB3B8B7,
+ 0xBDBCBBC0, 0xB8BEBDB7, 0xBEBBC0BF, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBD,
+ 0xBFB9BFBE, 0xBDBCBAC0, 0xB6BCBBB7, 0xBCB7BDBC,
+ 0xC0BFB7BD, 0xB6BCBBBA, 0xBDB9C0BD, 0xBEBBB9C0,
+ 0xB6BBB9B7, 0xC0BFC1C1, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0xBF565B59, 0xC0BFBBC2,
+ 0xBABFC0BA, 0xBBB7BDBC, 0xBDBCB7BE, 0xB7BDBCB7,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xB9BFBEB8, 0xC1B6BEBE, 0xC0C0B9C1,
+ 0xB8C0C0B8, 0xC0B6BDC0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B7C1C1, 0xBFC0B8C0, 0xBABFC0BA, 0xBCB8C0C0,
+ 0xBFBEB4BC, 0xB5BDBCB7, 0xBEB7BDBC, 0xC0BFB9BF,
+ 0xB8C0BFB8, 0xBEB9BFBE, 0xC0BFB9BF, 0xB9BFBEBB,
+ 0xBFB8C0BF, 0xBFC0B8C0, 0xB9BEBFBA, 0xBEB8C0BF,
+ 0xC0BFB7BF, 0xB8C0BFB8, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xBAC0BFB9, 0xBFB8C0BF, 0xC1C0B8C0, 0xBBC1C0BB,
+ 0xC0BAC0BF, 0xC2C1B9C1, 0xBBC1C0BC, 0xBFB8C0BF,
+ 0xC1C0BAC0, 0xBBC1C0BB, 0xBFB8C0BF, 0xBFBEB8C0,
+ 0xB7BDBCB9, 0xBFB7BFBE, 0xC0BFB8C0, 0xB8C0BFB8,
+ 0xBEB7BFBE, 0xC0C1B9BF, 0xB8BDBEBB, 0xC0BAC0BF,
+ 0xC0BDBBC1, 0xB7BEBBB9, 0xBDB6BDBA, 0xBFBDB9C0,
+ 0xB7BCBABA, 0xBDB7BEBB, 0xBFBDB9C0, 0xB6BBB9BA,
+ 0xBDBABDBB, 0xBDBBBCBF, 0xB9BCBABA, 0xB9B7BCBA,
+ 0xB9B7B6BB, 0xB6BBB9B4, 0xB4B5BBB6, 0xBCB5B4BB,
+ 0xB9C0B9B5, 0xABB9C1B7, 0xA59AAEB6, 0x9EA4999F,
+ 0xA39EA39A, 0xACA3A7AC, 0xA8ACA1A9, 0xA0A9AFA4,
+ 0xAFA3A6AD, 0xA6ACA1AB, 0x9EA0A99F, 0xACA29FA8,
+ 0xA5ADA2A4, 0x98A5AC9F, 0xA798A0A7, 0xA5AC9DA0,
+ 0xA3B0B4A8, 0xA99DABAF, 0xA0A498A5, 0x949DA293,
+ 0xA4939EA3, 0x9AA2919C, 0x8C9BA091, 0x9E8B979D,
+ 0x9B9F8C9A, 0x8D989E8D, 0x9B8B989E, 0x92988798,
+ 0x8A92998A, 0x9989909A, 0x919B8B8F, 0x8C91988B,
+ 0x958A9197, 0x93978C91, 0x83909488, 0x91828B8F,
+ 0x868D808C, 0x8181897F, 0x87828188, 0x1E241F81,
+ 0x00000000, 0x00000000, 0x02010000, 0x7868685C,
+ 0x87778788, 0x89897987, 0x75848375, 0x81738483,
+ 0x83827482, 0x6E85816F, 0x7A6D8480, 0x7E7A6F80,
+ 0x5A787769, 0x594D6868, 0x58584C59, 0x39444339,
+ 0x403B4341, 0x23231D43, 0x2B040400, 0x49402F31,
+ 0x48494048, 0x38404138, 0x40374041, 0x4041383D,
+ 0x3742433A, 0x3B363F3C, 0x3F3C373F, 0x34403D38,
+ 0x403B3E3C, 0x43413943, 0x393F4037, 0x42384142,
+ 0x40413741, 0x38404138, 0x41384041, 0x40403A40,
+ 0x373F3C37, 0x3B363F3C, 0x44413C3E, 0x3743403B,
+ 0x3C373F3C, 0x403C3740, 0x383F3C37, 0x3B38403D,
+ 0x403C3740, 0x2B37352B, 0x342C3635, 0x36342C36,
+ 0x624D4C42, 0x6C626E6C, 0x6E6C616E, 0x6F727266,
+ 0x796F7A79, 0x7A796F78, 0x6A7E7C72, 0x746C7674,
+ 0x73716777, 0x6A6E6C62, 0x81787574, 0x82817780,
+ 0x7A86847A, 0x837B8684, 0x33302B86, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00030101, 0x01010200, 0x00000001, 0x00000000,
+ 0x01010000, 0x00000001, 0x00020000, 0x00000200,
+ 0x03010102, 0x01010002, 0x00010000, 0x00000000,
+ 0x00000100, 0x00000001, 0x02010002, 0x2A030300,
+ 0x342B3033, 0x5D605731, 0x8287887F, 0x88808A87,
+ 0x7271678A, 0x636F6D63, 0x2726706A, 0x0A05072C,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000400, 0x03000004, 0x00040000,
+ 0x66363832, 0xA49B6A6C, 0xA0A39AA1, 0x97A8ABA2,
+ 0xA1989EA2, 0x9EA1989E, 0x989EA499, 0xA3989DA3,
+ 0x9DA3989D, 0x989EA598, 0xA4989EA5, 0x9EA296A0,
+ 0x929CA192, 0xA3949CA1, 0x9EA5969C, 0x97A1A599,
+ 0xA3979FA3, 0xA2A69A9F, 0x98A0A498, 0xA296A0A4,
+ 0xA1A5999E, 0x9DA7A99D, 0xA99DA7A9, 0xA5A99DA5,
+ 0x97A3A79B, 0xAA9E9FA3, 0xA8ACA0A6, 0x9DA8ACA0,
+ 0xA79BA5A9, 0xA3A79BA3, 0x9AA3A79B, 0xA99DA2A6,
+ 0xA8ACA0A5, 0x9DA5A99D, 0xAA9EA5A9, 0xA5A99DA6,
+ 0xA5A6ADA0, 0xAFA4AAB0, 0xA9AFA4A9, 0xA0A7AB9F,
+ 0xB1A5A8AC, 0xB0B4A8AD, 0xA5AEB5A8, 0xACA0ABB2,
+ 0xA8ACA0A8, 0xAAADB4A7, 0xB3A8AFB5, 0xABB1A6AD,
+ 0xA8ADB3A8, 0xB3A8ADB3, 0xAEB4A9AD, 0xA7A9B1A7,
+ 0xB1A7A8B1, 0xA8B1A7A6, 0xA9ACB1A8, 0xB0AAADB2,
+ 0xAEB0AAAE, 0x8CAEB1A8, 0x948B9295, 0x92958C91,
+ 0x9F969892, 0xB2B0A0A4, 0xBDBFBFAF, 0xBBBABCBC,
+ 0xB9B7BABD, 0xB8BEB9B4, 0xB6B6BCB7, 0xBBB9B7BB,
+ 0xBDC0BEB8, 0xBEBABFBE, 0xBFBDB9BF, 0xB8BDBBBA,
+ 0xBBB6BBB9, 0xBFBEB8BD, 0xB9BEBDBA, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xBBB8BDBB, 0xBFBEB8BD,
+ 0xB8BDBCBA, 0xBFBEC1BF, 0xBEBCBEC1, 0xBCBFBDBB,
+ 0xC0BEC0C0, 0xC1BFBEC0, 0xBDC0BEBE, 0xBDBABFBE,
+ 0xBFBDBABF, 0xBAC0BBBA, 0xBBB8BFBC, 0xBFBEB5BE,
+ 0xB9C0BDB7, 0xB6B7BBB6, 0xBDBBB7BB, 0xB9BFBEB8,
+ 0xC0B8C0C0, 0xC0BFB8C0, 0xBBC1C0BA, 0xBDBAC0BF,
+ 0xBFBEB8BE, 0xBBC1C0B9, 0xBCB7BDBC, 0xC0C0B7BD,
+ 0xB9C1C1B8, 0xC0BCC2C1, 0xC0BFBBC1, 0xBBC1C0BA,
+ 0xC0B8C0C0, 0xC0BFB8C0, 0xB9BFBEBA, 0xC0B3BAB7,
+ 0xC0BFBBC1, 0xB5BBBABA, 0xBFBBC0BF, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBFBAC0BF, 0xC0BEBAC0, 0xBABFBDBB,
+ 0xBFB9BFBE, 0xBCBABAC0, 0xB9BEBCB7, 0xBFB8BDBC,
+ 0xBFC0BBC0, 0xBBC1C0BA, 0xBDBBC0BE, 0xBFBCBABF,
+ 0xB5BAB8B8, 0xC0BDBFBF, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBE565B59, 0xC0BFBAC1,
+ 0xBAC0BFBA, 0xBCB8BFBC, 0xBEBDB8BF, 0xB8BEBDB8,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xBAC0BFB9, 0xC0BABFC0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B5BCBF, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xBABFC0B8, 0xC0B8C0C0,
+ 0xBFBEB8C0, 0xB8C0BFB7, 0xBFB9BFBE, 0xC0BFBAC0,
+ 0xB8C0BFB8, 0xBEB7BFBE, 0xBFBEB9BF, 0xB7BDBCB9,
+ 0xBEB5BDBC, 0xBFBEB7BF, 0xBBC0BFBA, 0xBFBAC0BF,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xB9BFBEB9, 0xBFB8C0BF, 0xC1C0B8C0, 0xBBC1C0BB,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xBBC1C0BA, 0xBEB9C1C0,
+ 0xC1C0B9BF, 0xBBC1C0BB, 0xC0B8C0BF, 0xC0BFB9C1,
+ 0xB9BFBEBA, 0xBEB4BCBB, 0xC0BFB7BF, 0xB8C0BFB8,
+ 0xBBBAC1BE, 0xBFBEB7BE, 0xB9BFBEB9, 0xBCB9BFBE,
+ 0xC0BDB7BD, 0xB9C0BDB9, 0xBBB4BBB8, 0xBFBDB7BE,
+ 0xB7BCBABA, 0xBDB7BEBB, 0xBFBCB9C0, 0xB8BDBBB8,
+ 0xBBB8BBB9, 0xBDBBBABD, 0xBBBEBCBA, 0xBAB7BCBA,
+ 0xBBB9B7BC, 0xB7BDB8B6, 0xB6B5BCB5, 0xBFB8B6BD,
+ 0xB9C1B7B8, 0x99A7ACA3, 0xA4979EA4, 0xA9ADA29D,
+ 0xA1A8AEA3, 0xACA3A6AC, 0xA9ADA2A9, 0xA0A9B0A3,
+ 0xAFA3A6AD, 0xA6ACA1AB, 0x9F9FA89E, 0xA89EA0A9,
+ 0xA1A99EA0, 0x9DA5AC9F, 0xAC9DA5AC, 0xA5AC9DA5,
+ 0xA7ABB0A1, 0xB4A8B1B6, 0xABAFA3B0, 0x91A1A697,
+ 0xA1929BA0, 0x9AA1929A, 0x8E9BA091, 0xA08D9B9E,
+ 0x9DA18E9E, 0x909BA091, 0x9D8E9A9F, 0x999F8E98,
+ 0x8C969D8E, 0x9C8C929C, 0x8F988B92, 0x8C91988B,
+ 0x978C9197, 0x90948993, 0x85909488, 0x8F838D91,
+ 0x868D808B, 0x7F83897E, 0x87818189, 0x20241F83,
+ 0x00000100, 0x00000000, 0x00010000, 0x7B29271F,
+ 0x87798787, 0x88887888, 0x73868577, 0x81738281,
+ 0x84817382, 0x70848172, 0x7A6F847F, 0x7A756C80,
+ 0x4D69675C, 0x493F5959, 0x4A48404A, 0x3B434139,
+ 0x221E4340, 0x05040025, 0x29020400, 0x49402F32,
+ 0x4A484048, 0x4047483F, 0x463D4849, 0x46473E43,
+ 0x3C4A4840, 0x433E4644, 0x46423D47, 0x3C434139,
+ 0x41394445, 0x46443C43, 0x3B45463D, 0x463C4344,
+ 0x43443B45, 0x3F45463D, 0x433D4545, 0x423F3A43,
+ 0x3E46433E, 0x433E4643, 0x46433E46, 0x3E46433E,
+ 0x433E4643, 0x47433E46, 0x3E46433E, 0x433E4643,
+ 0x433F3A47, 0x414E4C42, 0x4C424E4C, 0x4E4C414E,
+ 0x616E6C62, 0x6C616E6C, 0x6E6C616E, 0x6F7A7A6E,
+ 0x796F7879, 0x79776F7A, 0x6779786E, 0x6F677271,
+ 0x7E7B7372, 0x687C7A70, 0x81777573, 0x82817782,
+ 0x7A86847A, 0x847A8684, 0x5D5B5385, 0x00020000,
+ 0x01010200, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x02000002, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000001, 0x02000000, 0x00020301,
+ 0x04000203, 0x02030000, 0x6A43423E, 0x88827070,
+ 0x8A888088, 0x636E6C62, 0x27266E6B, 0x0806062B,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000301, 0x04000004, 0x00040000,
+ 0x00000100, 0x01000001, 0x36383200, 0xA28B8E85,
+ 0xA198A8AB, 0x9EA1989E, 0x969BA196, 0xA2979BA1,
+ 0x9DA3989C, 0x989EA499, 0xA4999EA5, 0xA0A498A0,
+ 0x96A0A498, 0xA394A0A5, 0x9EA3949E, 0x9AA1A599,
+ 0xA397A2A6, 0x9FA3979F, 0x9AA1A599, 0xA599A2A6,
+ 0x9FA397A1, 0x97A0A498, 0xA99D9FA3, 0xA5A99DA5,
+ 0x98A3A79B, 0xA498A0A4, 0xA3A79BA0, 0x9DA5A99D,
+ 0xA498A5A9, 0xA3A79BA0, 0xA1A5A99D, 0xA99DA9AD,
+ 0xA2A69AA5, 0x9DA5A99D, 0xA99DA5A9, 0xA4A89CA5,
+ 0xA4A6ADA0, 0xAFA4A9AF, 0xABAFA4A9, 0x9FABAFA3,
+ 0xAFA3A7AB, 0xAEB5A8AB, 0xA8AEB5A8, 0xAFA3AEB5,
+ 0xA7AB9FAB, 0xA6ABB2A5, 0xB4A9ACB3, 0xADB3A8AE,
+ 0xA9A9B1A6, 0xB4A9ACB4, 0xABB3A8AE, 0xABA9B1A7,
+ 0xB1A7ACB5, 0xA8B1A7A8, 0xACAEB6AC, 0xB2ACB0B5,
+ 0xB3B6ADAE, 0xA8AEB1A8, 0xB2A9AEB1, 0x9FA299AF,
+ 0x92969990, 0xA4A09698, 0xBDC0BEA3, 0xB6BEC2BD,
+ 0xB8B3B5BB, 0xB3BAB5B2, 0xB9B6BCB7, 0xBDBBB8BE,
+ 0xBABDBBBA, 0xBCB8BDBC, 0xBEBCB9BE, 0xB6BBB9B9,
+ 0xBDB8BDBB, 0xBFBEBABF, 0xB7BCBBBA, 0xBEBABFBE,
+ 0xBDBCB9BF, 0xB8BDBCB8, 0xBABABFBD, 0xBDBCB7BC,
+ 0xBABFBDB8, 0xBDBEC1BF, 0xBFBDBCBF, 0xBFC2C0BC,
+ 0xC0C0C0C0, 0xC0BEC0C0, 0xBBBEBCBD, 0xBDBABFBE,
+ 0xBFBDBABF, 0xBAC0BBBA, 0xBDB8BDBB, 0xBFBEB9C0,
+ 0xB9C0BDB9, 0xB6B7BBB6, 0xC0BEB7BB, 0xB7BDBCBB,
+ 0xC0BABFC0, 0xC2C1B8C0, 0xBBC1C0BC, 0xBCB9BFBE,
+ 0xBDBCB7BD, 0xB9BFBEB7, 0xBBB7BEBB, 0xC0BFB7BE,
+ 0xB7BFBFB8, 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB,
+ 0xC0B8C0C0, 0xC0BFB8C0, 0xB9BFBEBA, 0xBEB3B9B8,
+ 0xBFC0B9BF, 0xB7BCBDBA, 0xBEBAC0BF, 0xC0BFB9BF,
+ 0xBAC0BFBA, 0xBFBAC0BF, 0xBFBEBAC0, 0xBAC1BEB9,
+ 0xBBBABFBE, 0xBBB9B7BC, 0xB7BAB8B6, 0xB8B4B9B8,
+ 0xBBBCB4B9, 0xBAC0BFB6, 0xBEBABFBE, 0xC1BEBBC0,
+ 0xB5BAB9BA, 0xC0BEC0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00020000, 0x00000200, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0xC1595E5D, 0xC3C1BEC3,
+ 0xBEC3C1BE, 0xBDBABFBD, 0xC0BFBABF, 0xBAC0BFBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDB9C0BD,
+ 0xBFBDB9C0, 0xB9BFBEBA, 0xC0BABFC0, 0xC0BFBABF,
+ 0xBAC0BFBA, 0xC0BABFC0, 0xBDBEBABF, 0xB8C0BFB8,
+ 0xBFB8C0BF, 0xC0C0B8C0, 0xB8C0C0B8, 0xC1B9C1C1,
+ 0xC1C1B9C1, 0xB6C0C0B7, 0xC0B8C0C0, 0xBFBFB8C0,
+ 0xB8C0C0B7, 0xC0B8C0C0, 0xBFBFB8C0, 0xB8C0C0B7,
+ 0xBEB7BFBE, 0xBFBEB7BF, 0xB8BDBCBA, 0xBEB9BFBE,
+ 0xBEBFB9BF, 0xB8BEBDB9, 0xBDB9C0BD, 0xC0BFB9C0,
+ 0xBAC0BFBA, 0xC0B8C0C0, 0xC1C0B8C0, 0xBBC1C0BB,
+ 0xC0B9C1C1, 0xC1C0B8C0, 0xBBC1C0BB, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xC0B6BEBD, 0xBFC0B9C1,
+ 0xBABFC0BA, 0xBBB8C0BF, 0xBFBEB4BC, 0xBAC1BEB9,
+ 0xBCBBC1BC, 0xBEBCBBC1, 0xB9BEBCB9, 0xBDBAC1BE,
+ 0xBDBCB9C0, 0xBABFBEB7, 0xBAB8BDBC, 0xBEBCB6BB,
+ 0xB8BDBBB9, 0xBDB7BEBB, 0xBDBCB9C0, 0xB8BDBBB7,
+ 0xB6B8BBB9, 0xBCB7B7BB, 0xBABEB9B8, 0xBABBBFBA,
+ 0xBCB7BBBF, 0xB8BCB7B8, 0xBEB7BEB7, 0xC5BFBEC5,
+ 0xB3B8AFC1, 0xA0A6A9A0, 0xB0A5A5AB, 0xAAB0A5AA,
+ 0xA3ADB1A6, 0xB1A6ABAF, 0xABAFA3AD, 0xA1A8AFA2,
+ 0xADA1A7AE, 0xA9ADA2A9, 0xA0A3ABA0, 0xA99EA2AC,
+ 0xA5ABA0A1, 0x9EA8ACA0, 0xAB9CA8AD, 0xA7AD9CA6,
+ 0x9BA8AC99, 0xB7A8A8AB, 0xB8BDAEB4, 0xAAB2B6AA,
+ 0x9C91B0B7, 0x969D9096, 0x909A9E92, 0x9F8F9C9F,
+ 0x9C9F909E, 0x91979B8F, 0x9D8E999D, 0x989D8E98,
+ 0x90969D90, 0x9D90969D, 0x969D9096, 0x8A95998D,
+ 0x978B9296, 0x95978B95, 0x88929389, 0x90858F93,
+ 0x878E818C, 0x82868D80, 0x8B82878D, 0x22241E88,
+ 0x00000100, 0x00000000, 0x00000000, 0x7D0A0605,
+ 0x847A8582, 0x88857786, 0x75878777, 0x7D6F8585,
+ 0x827E7380, 0x71807C71, 0x7B72807C, 0x6C6A6080,
+ 0x47535248, 0x38325251, 0x38373338, 0x0F383733,
+ 0x00001413, 0x03010002, 0x3B020400, 0x645A4344,
+ 0x45433965, 0x48525048, 0x504A5051, 0x50514850,
+ 0x47525048, 0x50485251, 0x52504853, 0x414A4B41,
+ 0x4C42484C, 0x4A4B424B, 0x3F47483F, 0x483F4748,
+ 0x48494047, 0x484D4D47, 0x4C484D4C, 0x4F4C484F,
+ 0x474F4C47, 0x4C474F4C, 0x504C4750, 0x47505148,
+ 0x4F4A4F50, 0x524F4A52, 0x48535048, 0x50485350,
+ 0x53504853, 0x52545149, 0x655D5E5C, 0x72716767,
+ 0x67737068, 0x746A7371, 0x79796D76, 0x717E7C71,
+ 0x7C727D7D, 0x807F757E, 0x737C7A72, 0x7A727B7C,
+ 0x8280787C, 0x6E7C7B71, 0x80757B79, 0x88847984,
+ 0x7786847A, 0x847A8281, 0x82817785, 0x0032312D,
+ 0x00000001, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x42400001,
+ 0x60615D41, 0x636D6B63, 0x46456D6B, 0x0200004A,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00010000,
+ 0x00000100, 0x00000001, 0x00010000, 0x2F000100,
+ 0x9B953335, 0x989B9299, 0x98A0A499, 0xA498A0A4,
+ 0xA0A499A0, 0x979EA297, 0xA1989EA2, 0xA5A69CA0,
+ 0x98A0A498, 0xA495A0A4, 0x9EA3949F, 0x979CA094,
+ 0xA4999FA3, 0x9EA5989E, 0x949EA394, 0xA6979EA3,
+ 0xA2A798A1, 0x94A2A798, 0xA5969CA3, 0xA0A7989E,
+ 0x979FA397, 0xA79B9FA3, 0x9FA397A3, 0x98A0A498,
+ 0xAA9EA0A4, 0xA8ACA0A6, 0x9BA3A79B, 0xACA0A3A7,
+ 0xA4A89CA8, 0x9DA0A498, 0xADA1A5A9, 0xA8ACA0A9,
+ 0x9EA3A99E, 0xADA2A3A9, 0xA9ADA2A9, 0xA0A7AB9F,
+ 0xABA0A6AD, 0xA3ABA0A3, 0xA5ACB0A4, 0xB2A3ADB1,
+ 0xAEB5A6AD, 0xA3ADB1A5, 0xB4A8ABAF, 0xAFB5AAB0,
+ 0xA7A8B0A5, 0xB3A8A9B1, 0xA8B0A5AB, 0xAAA9B1A7,
+ 0xB3A9ACB4, 0xACB4AAAB, 0xA7AAB2A8, 0xB4AAA9B1,
+ 0xB0B5ACAC, 0xABB2B5AC, 0xB4A9B2B6, 0xB0B6ABAE,
+ 0x88A2A69B, 0x908A8E91, 0xAEB0AA8E, 0xB5C0C4BE,
+ 0xBDB6B5BC, 0xB5BCB5B6, 0xB9BBBFB9, 0xC0BBBBBF,
+ 0xBBBFBABC, 0xBDBABDBB, 0xBDBBBCBF, 0xB8BCB7BA,
+ 0xBBBABDBB, 0xBDBBBABD, 0xB8BDBBBA, 0xBBBABFBD,
+ 0xBDBCB8BD, 0xBABFBEB8, 0xBEBCBFBD, 0xBBB9BDC0,
+ 0xBABFBDB6, 0xBABCBFBD, 0xC1BCBDBE, 0xBDC1BCBD,
+ 0xBDBEC1BF, 0xBDBBBCBF, 0xBDC0BEBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xB8BDBBBC, 0xBDBABFBD, 0xBFBDBABF,
+ 0xB8BDBBBA, 0xBCB3B8B6, 0xBDBBB9BE, 0xB8BFBCB8,
+ 0xBFB9BFBE, 0xBFC0BAC0, 0xBAC0BFBA, 0xBEB7BFBE,
+ 0xBFBEB8C1, 0xB5BBBAB9, 0xB7B2B9B6, 0xBBBAB3BA,
+ 0xBAC0BFB5, 0xC0BABFC0, 0xC0C0BABF, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xB9BFBEBA, 0xBFB6BBBA,
+ 0xBCBDBBC0, 0xB9BEBFB7, 0xC0B6BBBC, 0xC0C0B8C0,
+ 0xB6C0C0B8, 0xC0B6C0C0, 0xC0BFB6C0, 0xBAC0BFB8,
+ 0xB9BABFBE, 0xBFBEB5BA, 0xBABFBEBA, 0xBABABFBD,
+ 0xBAB9B7BC, 0xB5BAB9B5, 0xBEB9BEBD, 0xBFBEBABF,
+ 0xBABFBEB9, 0xC0BEC0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00020000, 0x00000200, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0xC15B5D5D, 0xC3C1BEC3,
+ 0xC0C4BFC0, 0xBCBABFBD, 0xBFBEB9BE, 0xB9BFBEB9,
+ 0xBEBABFBD, 0xBFBDBBC0, 0xBBC0BEBA, 0xBDB9C0BD,
+ 0xBFBDB9C0, 0xBBC0BFBA, 0xC1B9BFBE, 0xC0BFBBC0,
+ 0xBAC0BFBA, 0xBFB9BEBF, 0xBFBEBAC0, 0xB9BFBEB9,
+ 0xC0B8C0BF, 0xC0C0B9C1, 0xB8C0C0B8, 0xC0B9C1C1,
+ 0xC0C0B8C0, 0xB5BFBFB6, 0xC0B8C0C0, 0xBFBFB8C0,
+ 0xB8C0C0B7, 0xC0B8C0C0, 0xC0C0B6C0, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xC0BFBAC0, 0xBBC0BFBB, 0xBEBAC0BF,
+ 0xBEBFB9BF, 0xB8BDBEB9, 0xBCB7BDBC, 0xBFBEB7BD,
+ 0xB9BFBEB9, 0xC0B8C0C0, 0xC1C0B8C0, 0xBBC1C0BB,
+ 0xBFB8C0C0, 0xC1C0B7BF, 0xBBC1C0BB, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xBEB7BFBE, 0xC1C1B7BF,
+ 0xB8C0C0B9, 0xBFB7BFBE, 0xBDBCB8C0, 0xB7BEBBB7,
+ 0xBBBBC1BC, 0xBFBABDC1, 0xB8BEB9BB, 0xBDBAC1BE,
+ 0xBFBEB9C0, 0xBABFBEB9, 0xBDBBC0BF, 0xBAB8B9BE,
+ 0xBABFBDB5, 0xBDB8BFBC, 0xBCBBB9C0, 0xB8BDBCB6,
+ 0xB7BABDBB, 0xBCB7B8BC, 0xBABEB9B8, 0xBABBBFBA,
+ 0xBBB6BBBF, 0xB8BCB7B7, 0xBEC0C4BE, 0xBDB7C0C4,
+ 0xAFB2A9BB, 0xA8ACB0A5, 0xB4A9AFB3, 0xABB2A5AE,
+ 0xA8ADB1A5, 0xB1A5B0B4, 0xABAFA3AD, 0xA0A7AE9F,
+ 0xAA9FA8AF, 0xAAAEA3A6, 0x9EA5AC9F, 0xAA9DA2AB,
+ 0xA7AB9FA3, 0x9CA6AA9E, 0xAE9DA6AB, 0xA7AD9CA8,
+ 0x9AA8AC99, 0xAB9BA9AD, 0xBABDAEA8, 0x75989C90,
+ 0xB5AC7B82, 0x989C91B0, 0x8F9C9F90, 0x9E909B9E,
+ 0x9295869E, 0x8E93978C, 0x9C909599, 0x959A8B98,
+ 0x8E92998C, 0x998C949B, 0x949B8E92, 0x8A959A8B,
+ 0x93879499, 0x95978B91, 0x86929389, 0x8F848D91,
+ 0x878D8289, 0x7F898D81, 0x8C81878B, 0x22241E88,
+ 0x00000100, 0x00000000, 0x01010100, 0x57080606,
+ 0x837B5C58, 0x88857786, 0x75858575, 0x80728585,
+ 0x837F7483, 0x72807B72, 0x6961807B, 0x59564E6C,
+ 0x32525048, 0x36353838, 0x36373538, 0x00000100,
+ 0x00000001, 0x02000002, 0x3A010300, 0x645A4344,
+ 0x66645966, 0x505A5850, 0x59505859, 0x58595058,
+ 0x4D55564D, 0x554D5857, 0x514F4757, 0x494F5348,
+ 0x53484E54, 0x4F53484F, 0x48505148, 0x52495051,
+ 0x50514851, 0x4E53534D, 0x524E5352, 0x55524D55,
+ 0x4E56534E, 0x534E5653, 0x57544C57, 0x5157584F,
+ 0x5751595A, 0x5A585057, 0x505C5A50, 0x5B515C5A,
+ 0x6563595D, 0x5C68655D, 0x70686664, 0x73716972,
+ 0x6F76736B, 0x746A7B79, 0x7A786D76, 0x71807E73,
+ 0x7D737E7C, 0x817F757F, 0x78828078, 0x82798081,
+ 0x80817881, 0x76828177, 0x7F748280, 0x88847983,
+ 0x7A86847A, 0x82768584, 0x8D8C8282, 0x0032322C,
+ 0x00000001, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x1F25251F, 0x23222525, 0x00010025,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x65676100, 0x99A0A39A, 0xA499A0A4,
+ 0xA0A499A0, 0x97A1A59A, 0xA2999DA0, 0x9FA097A1,
+ 0x989EA296, 0xA596A0A4, 0x9FA495A0, 0x95A0A498,
+ 0xA1949DA1, 0x9EA5989A, 0x93A2A798, 0xA4959EA4,
+ 0xA2A7989F, 0x97A0A798, 0xA6959FA6, 0x9CA3949E,
+ 0x9B9FA495, 0xAB9FA3A7, 0xA7AB9FA7, 0x98A3A79B,
+ 0xA69AA0A4, 0xA8ACA0A2, 0x9BA8ACA0, 0xA79BA3A7,
+ 0xA9ADA1A3, 0x9DA8ACA0, 0xACA0A5A9, 0xA8ACA0A8,
+ 0xA2A6ACA1, 0xA79EA6AB, 0xA7ABA0A4, 0xA0A6ACA1,
+ 0xA99EA3AB, 0xA2AA9FA1, 0xA3A7AB9F, 0xAFA3ABAF,
+ 0xACB3A6AB, 0xA2ACB0A4, 0xAFA3AAAE, 0xADB1A5AB,
+ 0xA8AEB4A9, 0xB1A6AAB2, 0xADB3A8A9, 0xA8ADB2A9,
+ 0xB2A9ACB1, 0xAEB3AAAF, 0xAAAEB6AC, 0xB1A7ACB4,
+ 0xACB4AAA9, 0xAAB0B4A9, 0xB6ABAFB5, 0xB0B6ABB0,
+ 0x9CAFB3A8, 0x9C93A5A6, 0x999C939B, 0xBCB7BCB3,
+ 0xBBB4BEC6, 0xB6BDB6B4, 0xB9BBBFB9, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB9BABDBB, 0xBCB7BABB, 0xB9BDB8B8,
+ 0xBBBABDBB, 0xBEBCBABD, 0xBABDBBBB, 0xB7B8BEB9,
+ 0xBFBEB6BC, 0xBABFBEBA, 0xBBBCBFBD, 0xBDBBBABD,
+ 0xBCBFBDB8, 0xBCBBBFBA, 0xC1BCBFC0, 0xBDC1BCBD,
+ 0xBBBCBFBD, 0xC0BEBABD, 0xBDC0BEBD, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBDC0BEBC, 0xBDBBC0BE, 0xBFBDBABF,
+ 0xBABFBDBC, 0xBEB2B8B7, 0xBEBCB9BF, 0xB9BEBCB9,
+ 0xBCBAC0BF, 0xBBBCB7BD, 0xB6BBBCB6, 0xBEB8C0BF,
+ 0xC0BFB8C1, 0xBAC0BFBA, 0xBABAC1BE, 0xB8B7B6BD,
+ 0xB5BBBAB2, 0xC0B7BCBD, 0xC1C1BABF, 0xB8C0C0B9,
+ 0xBFB8C0C0, 0xBFC0B7BF, 0xB9BFBEBA, 0xBFB5BAB9,
+ 0xBEBFBBC0, 0xBABFC0B9, 0xBDB8C0C0, 0xC1C1B5BD,
+ 0xB6C0C0B7, 0xC2A5B1B3, 0xC0C0B6BF, 0xBAC0BFB8,
+ 0xBDB8BDBC, 0xBFBEB9BE, 0xB9BEBDBA, 0xBDBDC2C0,
+ 0xC1C0BABF, 0xBABFBEBC, 0xBAB6BBBA, 0xBFBEB5BB,
+ 0xBABFBEB9, 0xC0BEC0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15B5D5D, 0xC3C1BEC3,
+ 0xBEC4BFBE, 0xBCBABFBD, 0xBFBEB9BE, 0xBABFBEBA,
+ 0xBDBABFBD, 0xBFBEBABF, 0xBBC0BFBA, 0xBDBAC1BE,
+ 0xBFBEB9C0, 0xBBC0BFBA, 0xBEBAC0BF, 0xBFBEB9BF,
+ 0xBAC0BFB9, 0xBEB9BFBE, 0xC0BFB9BF, 0xB9BFBEBB,
+ 0xC0B8C0BF, 0xC0BFB8C0, 0xB7BFBEB8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xB8C0C0BA, 0xBFB7BFBE, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xBEB9BFBE, 0xC0BFB9BF, 0xBBBFC0BB, 0xBFBBC0C1,
+ 0xC0C0B7BF, 0xB8C0C0B8, 0xC1B8C0C0, 0xBFC0B9C1,
+ 0xBABFC0BA, 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xC1C0B8C0, 0xBBC1C0BB, 0xC0BCC1C0,
+ 0xC1C0BCC1, 0xBBC1C0BB, 0xBEB9BFBE, 0xC0BFB7BF,
+ 0xB9C1C0B8, 0xC0B8C0BF, 0xC0BFB9C1, 0xB7BCBABA,
+ 0xBABBBFBA, 0xC1BBBDBE, 0xBBBFBABF, 0xBFBABFBD,
+ 0xBFBEBAC0, 0xB8BEBDB9, 0xBEBAC0BF, 0xBBB9BABF,
+ 0xBABEB9B8, 0xBDB9BEBC, 0xBDBCB9C0, 0xB8BDBCB8,
+ 0xBCBABDBB, 0xBBB9BBBE, 0xBABDBBB8, 0xBAB8BEB9,
+ 0xBFBABBBF, 0xBFC0BCBB, 0xAFC2C4BE, 0xB1A8B5B8,
+ 0xB0B1A8AE, 0xA9ABAFA4, 0xB4A8B0B4, 0xACB0A4B0,
+ 0xA1ABAFA3, 0xB1A5ABB0, 0xAEB2A6AD, 0xA0A8AFA0,
+ 0xAEA3A8AF, 0xAAAEA2AA, 0x9DA9AF9E, 0xAD9CA8AE,
+ 0xA9AC9DA7, 0x9BA9AC9D, 0xAC9CA8AB, 0xA9AC9CA9,
+ 0x99A8AC99, 0xAC99A8AC, 0xA9AC9CAA, 0x75B2B7A8,
+ 0x9B927B82, 0xB2B6AB98, 0x90A5A899, 0x9F909DA0,
+ 0x9295869C, 0x9195998E, 0x9C8F989C, 0x979E9195,
+ 0x8A969B8C, 0x98899499, 0x949B8C91, 0x8A989D8E,
+ 0x988C9499, 0x90948894, 0x88909488, 0x90859094,
+ 0x878D828A, 0x80888C80, 0x8C818A8C, 0x22241E88,
+ 0x00000100, 0x00000000, 0x00000000, 0x2D080507,
+ 0x837B322E, 0x88847986, 0x78858476, 0x84768888,
+ 0x807C7187, 0x617D7B70, 0x56516D6B, 0x48443F5A,
+ 0x333B3833, 0x35353837, 0x06060637, 0x00000000,
+ 0x01010000, 0x00010001, 0x3A050500, 0x635A4544,
+ 0x67635868, 0x58626058, 0x61586061, 0x61625960,
+ 0x53616259, 0x5B555B5C, 0x5B5C535B, 0x50565950,
+ 0x59505659, 0x58595058, 0x50585950, 0x594F5859,
+ 0x58595058, 0x525A5A54, 0x59535858, 0x60615859,
+ 0x53585B52, 0x5B53595C, 0x5E5D535D, 0x57606157,
+ 0x61586061, 0x60615860, 0x58646359, 0x62576563,
+ 0x6E6C6166, 0x69727167, 0x6F677172, 0x716F6771,
+ 0x6D76746A, 0x786D7A78, 0x7D7B707A, 0x717D7B70,
+ 0x7C727E7C, 0x817F757E, 0x72838179, 0x80787C7A,
+ 0x82807882, 0x76817F75, 0x84798280, 0x88847988,
+ 0x7A86847A, 0x897D8584, 0x8D8D8189, 0x0062635A,
+ 0x00000201, 0x00000100, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000102,
+ 0x00010000, 0x00010200, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000000,
+ 0x01000001, 0x00010000, 0x64363832, 0xA39A6A6D,
+ 0xA0A499A0, 0x9C9FA398, 0xA59CA2A5, 0xA3A69DA4,
+ 0x929AA194, 0xA3949AA1, 0x9EA5969C, 0x989CA396,
+ 0xA3969EA5, 0x99A0919C, 0x98919889, 0xA392A0A7,
+ 0x9CA4939B, 0x98A2A798, 0xA899A2A7, 0x9A9F90A3,
+ 0x959FA495, 0xA79B9FA4, 0xA3A79BA3, 0x9BA5A99D,
+ 0xA397A3A7, 0xA0A4989F, 0xA0A5A99D, 0xA89CA8AC,
+ 0xA5A99DA4, 0x9FA7AB9F, 0xAA9EA7AB, 0xA5A99DA6,
+ 0xA3A8AEA3, 0xA8A2A7AC, 0xA1A8A1A4, 0x9EA2ACA0,
+ 0xACA1A0AA, 0xA8AFA2A4, 0x9FA8ACA0, 0xACA0A7AB,
+ 0xA8ACA0A8, 0xA5ADAFA3, 0xB1A5AFB1, 0xABAFA3AD,
+ 0xA9AEB4A9, 0xB3A8AEB4, 0xADB1A6AD, 0xA9B0B4A9,
+ 0xB2A8B0B4, 0xAEB2A7B1, 0xAEAEB3AA, 0xB3A9B0B8,
+ 0xA9B1A7AB, 0xABAEB1A8, 0xB5ACAFB4, 0xB1B6ADB0,
+ 0xA7B0B1A7, 0xB1A9B2B1, 0xA5A69DB3, 0xBEA2A6A0,
+ 0xBCB5BEC5, 0xB4BCB5B4, 0xB6B9C0B9, 0xBCB7B6BD,
+ 0xB5BBB6B6, 0xB9BABDBB, 0xBDB8B8BB, 0xBABEB9B9,
+ 0xBCB9BCBA, 0xBAB8BBBE, 0xB8BBB9B7, 0xB9B6BCB7,
+ 0xBCBCB8BE, 0xBBBDBDBA, 0xB9BABDBB, 0xBDBBB8BB,
+ 0xB7BAB8BA, 0xBCBBBFBA, 0xC2BDBDC1, 0xBBBFBABE,
+ 0xBBBABEB9, 0xBFBDBCC0, 0xBEC1BFBE, 0xBDB9BEBC,
+ 0xBCBABABF, 0xBCBFBDB9, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBBC0BEBA, 0xBDB2B8B7, 0xC1C1B9BE, 0xBBBDBDBF,
+ 0xBCB7BCBA, 0xBCBDB7BD, 0xB9BEBFB7, 0xBEB9BFBE,
+ 0xBEBFB9BF, 0xBCC1C0BA, 0xBEB9C0BD, 0xC1BEBAC1,
+ 0xBAC1BEBA, 0xBCB7BDBC, 0xBEBEB7BD, 0xB6C0C0B6,
+ 0xC1B8C0C0, 0xC0BFB9C1, 0xB7BDBCBA, 0xBDB6BBBA,
+ 0xBEBDBABF, 0xBAC0BFB8, 0xBCB8C0C0, 0xBEBEB4BC,
+ 0xB3BDBDB6, 0xC29EAAAC, 0xC0C0B6BF, 0xBBC0C1B8,
+ 0xBEB8BDBC, 0xBFBEBABF, 0xBAC0BFB9, 0xBDB9C0BD,
+ 0xBFBDB9C0, 0xBCC1BFBA, 0xBBB9BFBE, 0xBFBEB6BC,
+ 0xBBC0BFB9, 0xC0C0C0C0, 0xC1BFC2C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC1595E5D, 0xC3C1BEC3,
+ 0xBEC3C1BE, 0xBDBABFBD, 0xBFBEBABF, 0xBBC0BFBA,
+ 0xBEBABFBD, 0xBFBEBBC0, 0xBBC0BFBA, 0xBEBAC0BF,
+ 0xBEBFB9BF, 0xB9BEBFBA, 0xBFB9BFBE, 0xBFBEBAC0,
+ 0xB7BDBCB9, 0xBDB9BFBE, 0xBFBDB8BE, 0xB9C0BDBA,
+ 0xBFBBC1C0, 0xBFBEB8C0, 0xB7BFBEB9, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xBAC0BFBA, 0xBFB8C0BF, 0xC0BFB8C0, 0xBABFC0BA,
+ 0xBEBAC0BF, 0xBEBFB9BF, 0xB9BEBFBA, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xC0BAC2C2, 0xC0C1B8C0, 0xBBC0C1BB,
+ 0xC0B8C0C0, 0xC0BFB8C0, 0xBAC0BFBA, 0xBFBBC0BF,
+ 0xC0BFBBC0, 0xBBC1C0BB, 0xBEBBC1C0, 0xC0BFB9BF,
+ 0xB8C0BFB8, 0xBFBAC0BF, 0xC0BFBAC0, 0xBABFBDBB,
+ 0xBBBBBEBC, 0xC1BCBCC0, 0xBDC1BCBD, 0xBEBABFBD,
+ 0xC0BFB9BF, 0xB8BEBDBA, 0xBDB8BDBC, 0xBDB8BABF,
+ 0xB8BCB7B9, 0xBBBAC0BB, 0xBFBDB7BE, 0xB8BDBBBA,
+ 0xB9BABDBB, 0xBBB9BABE, 0xB8BCB7B8, 0xBFB9BFBA,
+ 0xC4BFBEC4, 0xBABCB6C0, 0xA9AEB1A8, 0xB1A8AFB2,
+ 0xAEB1A8B0, 0xA5ACB0A5, 0xB0A4ACB0, 0xACB0A4AC,
+ 0xA3ABAFA3, 0xB0A4ABAF, 0xABAFA3AC, 0xA0A8AFA0,
+ 0xADA1A8AF, 0xA9AE9FA9, 0x9CA9AF9C, 0xAF9CA9AF,
+ 0xA9AC9CAB, 0x99A8AB9B, 0xAB9BA8AC, 0xA8AC99A8,
+ 0x9AA8AC99, 0xAB98A9AD, 0xA7AA9AA9, 0xAAB2B7A8,
+ 0x8276B2B6, 0x62665A7E, 0xA4ADB2A3, 0x9F90B0B3,
+ 0x9B9F939C, 0x91999D91, 0x9C90999D, 0x989C9098,
+ 0x8A989D8E, 0x998A9299, 0x949B8C92, 0x8B959A8B,
+ 0x978B9397, 0x90948893, 0x88909488, 0x90858E95,
+ 0x8A90858A, 0x81888C81, 0x8B82888C, 0x21231D88,
+ 0x00000100, 0x00000000, 0x00000000, 0x05080507,
+ 0x837B0806, 0x85837886, 0x77888779, 0x7F748685,
+ 0x7E7C7183, 0x4F6C6A60, 0x443F5A57, 0x46433F48,
+ 0x1C383733, 0x06061F1D, 0x07060806, 0x01000000,
+ 0x00000001, 0x00010000, 0x3B040400, 0x63594543,
+ 0x66645A65, 0x616A6860, 0x695F696A, 0x68695F68,
+ 0x57606157, 0x61586061, 0x5F605760, 0x57606158,
+ 0x60586061, 0x62615762, 0x58616259, 0x61576162,
+ 0x60615760, 0x57606158, 0x62595F60, 0x61625961,
+ 0x5960635A, 0x62586064, 0x64635961, 0x5F606157,
+ 0x6A5F666A, 0x68695F66, 0x5F6D6D61, 0x6D5F6E6D,
+ 0x6E6D5F6E, 0x67707167, 0x71686F70, 0x72716770,
+ 0x6C79786E, 0x796B7977, 0x807D6F7C, 0x717F7D72,
+ 0x7C727E7C, 0x817F757E, 0x6877766C, 0x7B737372,
+ 0x7C7B717D, 0x76828076, 0x847A8280, 0x86847A86,
+ 0x7A85847A, 0x887C8584, 0x89897D88, 0x2D92938A,
+ 0x01013231, 0x00000101, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000001,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x01000001, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x38320102,
+ 0x6A6C6636, 0x9CAAADA4, 0xA198A2A5, 0x9DA097A0,
+ 0x969CA396, 0xA1949CA3, 0x989F929A, 0x989DA497,
+ 0xA5969EA5, 0x9DA4959E, 0x94909788, 0xA7989CA3,
+ 0x9CA394A0, 0x989EA394, 0xA798A2A7, 0xA0A596A2,
+ 0x959FA495, 0x9F939FA4, 0x9FA3979B, 0x9DA5A99D,
+ 0xAA9EA5A9, 0xA3A79BA6, 0xA1A2A69A, 0xACA0A9AD,
+ 0xA5A99DA8, 0x9DA4A89C, 0xACA0A5A9, 0xA5A99DA8,
+ 0xA1A2A89D, 0xA9A2A5AA, 0xA1A8A1A2, 0xA0A0A99F,
+ 0xAEA3A2AC, 0xA6ADA0A8, 0xA1ABAFA3, 0xACA1A9AD,
+ 0xABAFA4A8, 0xA2A9ADA1, 0xB0A4AAAE, 0xADB1A5AC,
+ 0xA9ACB2A7, 0xB3A8AEB4, 0xB0B4A9AF, 0xA9B0B1A7,
+ 0xB3A9B2B3, 0xB0B4A9B2, 0xA6A9B1A7, 0xB4AAA8B0,
+ 0xAEB3AAAC, 0xA8AEB3AA, 0xB5ACACB1, 0xB0B5ACB0,
+ 0xA7B0B1A8, 0xB1A8B0B1, 0xAEB1A8B0, 0xABA4A8A2,
+ 0xC6BFABB2, 0xB4BCB5BE, 0xB7B6BDB6, 0xBEB9B7BE,
+ 0xBAC0BBB7, 0xB9BBC1BC, 0xBBB6BABE, 0xBCC0BBB7,
+ 0xB9BABDBB, 0xBCBAB8BB, 0xB9BCBAB9, 0xBBB6BCB7,
+ 0xBCBCB8BD, 0xBCBEBEBA, 0xBBBABDBB, 0xBDBBBABD,
+ 0xB8BBB9BA, 0xBABEC2BD, 0xBFBABBBF, 0xB8BCB7BB,
+ 0xBDBCC0BB, 0xC0BBBEC2, 0xBBBEBCBC, 0xBBBDC0BE,
+ 0xBFBDBABD, 0xBCBFBDBC, 0xBCBBC0BE, 0xBEBCB9BE,
+ 0xBBC0BEB9, 0xBAB6BBBA, 0xC0C0B6BB, 0xBEBEBEC0,
+ 0xBCB8BDBB, 0xBFBEB7BD, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xBEBAC1BE, 0xC0BDBAC1,
+ 0xBAC1BEB9, 0xBFBAC0BF, 0xC1C1BAC0, 0xB8C0C0B9,
+ 0xBEBABFC0, 0xC0BFB9BF, 0xB8BDBBBB, 0xBDB6BBB9,
+ 0xC0BEBABF, 0xBAC0BFBB, 0xC0BABFC0, 0xC0C0B8C0,
+ 0xADB7B7B8, 0xC39EAAAC, 0xBEC1B5C1, 0xBABFC0B7,
+ 0xBEBABFBE, 0xBFBEBABF, 0xBAC0BFB9, 0xBDB9C0BD,
+ 0xBFBDB9C0, 0xB9C0BDBA, 0xBCBBC1C0, 0xBDBCB5BD,
+ 0xBABFBEB7, 0xC0BFBFBF, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0xBD565B59, 0xC1BEB9C0,
+ 0xBBC2BFBA, 0xBDB8BFBC, 0xBEBDB9C0, 0xBBC0BFB9,
+ 0xBFB9BFBE, 0xBFBEBAC0, 0xB9BFBEB9, 0xBDB7BDBC,
+ 0xBCBDB7BC, 0xB7BCBDB7, 0xC0B6BBBC, 0xC0C0B8C0,
+ 0xB3BBBBB8, 0xBEB4BCBB, 0xC1BEB8C1, 0xB8BFBCBA,
+ 0xBEBAC1BE, 0xC0BFBAC1, 0xBAC0BFBB, 0xBFBAC0BF,
+ 0xBFBEBAC0, 0xB9BFBEB9, 0xBEBAC0BF, 0xBFBEB9BF,
+ 0xBAC0BFB9, 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xC0B8C0C0, 0xBEBFB8C0, 0xB9BEBFB9, 0xC0B8C0C0,
+ 0xBFC2B8C0, 0xBABFC2BA, 0xC0B9C1C1, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xC0B8C0C0, 0xC0C0B6C0, 0xB8C0C0B8,
+ 0xC0B8C0BF, 0xC0C1B9C1, 0xBBC0C1BB, 0xBFBBC0BF,
+ 0xC0BFBBC0, 0xBBC0BFBB, 0xBDB9BEBF, 0xBCBDB7BC,
+ 0xB8BEBDB7, 0xBCB9BEBD, 0xBEBCB9BE, 0xBDC0BEBB,
+ 0xBDBBC0BE, 0xC0BEBABF, 0xB9BEBCBB, 0xBCBAC1BE,
+ 0xBEBDB8BF, 0xBBC0BFB8, 0xBBBABDBB, 0xBDB8BABD,
+ 0xB7BBB6B9, 0xB8B8BEB9, 0xBCBAB7BD, 0xB8BDBBB7,
+ 0xB8BABEB9, 0xBEB9BABE, 0xBABEB8BA, 0xBFBEC5BE,
+ 0xBBB5BFC6, 0xADB1ABB7, 0xAAACAFA6, 0xB1A8B0B3,
+ 0xAEB1A8AE, 0xA3B0B4A9, 0xAEA2ABAF, 0xADAFA3AA,
+ 0xA0ADB1A5, 0xAFA3A8AC, 0xABAFA3AB, 0x9BA8AFA0,
+ 0xAD9EA4AC, 0xA8AB9BA8, 0x9AAAAE9B, 0xAC99A9AD,
+ 0xAAAE9BA6, 0x95A5A996, 0xA996A7A9, 0xA5AA95A5,
+ 0x98A8AD98, 0xAC99A8AD, 0xABAD9AAA, 0x96A4A797,
+ 0xC5B5A3A6, 0x656A5BC2, 0xB34E5247, 0xBEB2BABE,
+ 0x85897DBA, 0x91999D91, 0x9D91999D, 0x999D9199,
+ 0x8B979C8D, 0x998A939A, 0x8F998992, 0x8A91988B,
+ 0x958A8F95, 0x8E94898F, 0x818E9588, 0x8D82878E,
+ 0x888E8387, 0x86888C86, 0x8C86888C, 0x20241F88,
+ 0x00000100, 0x01000000, 0x00010000, 0x00000000,
+ 0x5B510301, 0x8B8A7C5C, 0x77868577, 0x70658685,
+ 0x73716772, 0x3458554D, 0x39353C39, 0x3D39383C,
+ 0x001A1817, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x4B000100, 0x78705151,
+ 0x7A78707A, 0x636D6B63, 0x6C626D6B, 0x696B5F6B,
+ 0x5B65675B, 0x675B6767, 0x69675C67, 0x5A69675C,
+ 0x645A6765, 0x65635866, 0x5965645A, 0x60566263,
+ 0x62615761, 0x5E626157, 0x655D6866, 0x65665D67,
+ 0x5E68695F, 0x6A5E686A, 0x67695D6A, 0x60686C60,
+ 0x6C60686C, 0x6A6C6068, 0x5F6F6F61, 0x74646F6F,
+ 0x74746674, 0x67707167, 0x776E7071, 0x73746A76,
+ 0x6F727369, 0x7C717B7B, 0x7F7B707E, 0x757E7C71,
+ 0x85798280, 0x81817585, 0x6979796D, 0x746A7575,
+ 0x77756B76, 0x7B828177, 0x837A8384, 0x86877D82,
+ 0x7C86857B, 0x8A7F8786, 0x89897D8C, 0x55888980,
+ 0x01005B5B, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010101,
+ 0x00020000, 0x00000001, 0x00010101, 0x01000001,
+ 0x00010000, 0x94343531, 0x9D92989A, 0x989C9199,
+ 0x97A0A197, 0xA198A0A1, 0x9DA196A0, 0x989DA196,
+ 0xA498A0A4, 0xA0A498A0, 0x93A0A498, 0xA1959B9F,
+ 0xA0A5969D, 0x959FA495, 0xA8999FA4, 0xA1A89BA1,
+ 0x98A0A596, 0xA79BA2A7, 0xA0A498A3, 0x9DA4A89C,
+ 0xA89CA5A9, 0xA8ACA0A4, 0x9AA4A89C, 0xADA1A2A6,
+ 0xA8ACA0A9, 0x9BA5A99D, 0xAB9FA3A7, 0xA9ADA1A7,
+ 0x9DA7ADA2, 0xA89EA2A8, 0xA5ADA3A0, 0xA0A5ADA2,
+ 0xACA1A5AB, 0xAAAEA3A8, 0xA4A7ADA2, 0xABA2A9AF,
+ 0xA8ACA1A8, 0x9EAAAEA2, 0xAEA2A8AD, 0xA7AB9FAA,
+ 0xA5A8ACA0, 0xB2A6ADB1, 0xB0B4A8AE, 0xA3B0B4A8,
+ 0xB0A4ABAF, 0xABB1A6AC, 0xA8A7B0A6, 0xB1A8A7AF,
+ 0xACB1A8AC, 0xADACB3AC, 0xAEA8ADB4, 0xACAFA6AA,
+ 0xACB2B5AC, 0xB5ACB2B5, 0xB1B6ADB2, 0x9FA7AEA7,
+ 0xB6B19FA6, 0xB9BFBAB0, 0xBABAC1BA, 0xBCB5BAC1,
+ 0xB5BCB5B5, 0xBAB9C0B9, 0xC0BBB9BF, 0xB6BBB9BA,
+ 0xBCB7BAB8, 0xBDBBBBBE, 0xBABDBBBA, 0xBBB9BCBA,
+ 0xBFBFBABD, 0xBABCBCBD, 0xBDBCBFBD, 0xBCBABCBF,
+ 0xBCBFBDB9, 0xBCBBBFBA, 0xBFBABDC1, 0xBBBFBABB,
+ 0xBDBCC0BB, 0xC0BBBEC2, 0xBDC1BCBC, 0xBDB9BCBA,
+ 0xBFBDBBBD, 0xBBC0BEBC, 0xBEBAC0BB, 0xC0BDBBC0,
+ 0xB9BEBDB9, 0xB7B8BDBC, 0xBCBCB5B7, 0xBCBCBCBC,
+ 0xBDBABFBE, 0xBFBEB8BE, 0xB9BFBEB9, 0xBDBAC0BF,
+ 0xBFBDB9C0, 0xBABFBDBA, 0xB9BABFBD, 0xBEBBB8BE,
+ 0xBAC1BEB7, 0xBFBAC0BF, 0xC0C0BAC0, 0xBABFC0B8,
+ 0xBFBEC0C0, 0xC0C0BFBF, 0xBABDBBBE, 0xBAB8BCB7,
+ 0xBFBDB9BF, 0xB7BDBCBA, 0xC0BABFC0, 0xC0BFBABF,
+ 0xACB6B6B8, 0xC19FABAD, 0xBFC2B3BF, 0xB8C0C0B6,
+ 0xBEB9BFBE, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xC0BFBABF, 0xB9BFBEBB, 0xBDBAC1BE, 0xBCB9B7C0,
+ 0xB9BEBCB5, 0xC0C0C0C0, 0xC1BFC0C0, 0x898C8AC0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0xBE565B59, 0xC0BFBAC1,
+ 0xBAC0BFBA, 0xBBB7BEBB, 0xBBBAB7BE, 0xB8BDBCB6,
+ 0xBEB9BEBD, 0xBFBEB9BF, 0xB8BEBDB9, 0xBDB7BCBD,
+ 0xBCBDB7BC, 0xB7BCBDB7, 0xBCB6BEBE, 0xBCBFB4BC,
+ 0xB5BDBDB5, 0xBDB4BCBB, 0xC0BDB7C0, 0xB9C0BDB9,
+ 0xBEBBC1BC, 0xC0BFBBC0, 0xBBC0BFBB, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xBAC0BFB9, 0xBEBBC1C0, 0xBFBEB9BF,
+ 0xBAC0BFB9, 0xC0BABFC0, 0xC0BFBABF, 0xBAC0BFBA,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA, 0xC1B8C0C0,
+ 0xC0C3B9C1, 0xBBC0C3BB, 0xC0B7BFBF, 0xBEBFB8C0,
+ 0xBABFC0B9, 0xC0B8C0C0, 0xC0C0B6C0, 0xB8C0C0B8,
+ 0xC0B8C0BF, 0xC0C0B9C1, 0xBABFC0B8, 0xBEBBC0BF,
+ 0xBFBFBABF, 0xBBC0BFBD, 0xC0BABFC0, 0xBCBDBABF,
+ 0xBABFBEB8, 0xBCBBBEBC, 0xBDB9BBBE, 0xBBBFBABC,
+ 0xBDB8BDBB, 0xBAB9B9C0, 0xB9BEBDB5, 0xBEBABFBD,
+ 0xBCBBBAC1, 0xB9BEBDB6, 0xBDBCBFBD, 0xBDBBBEBF,
+ 0xB8BCB7BA, 0xB9B8BEB9, 0xBEB9B8BE, 0xB7BDB8B8,
+ 0xB8BABEB8, 0xC5BFBABE, 0xC0C4BEC1, 0xB3B5BCB5,
+ 0xB1AAB5BD, 0xAEB2ACAA, 0xA9ACB1A8, 0xB1A8AFB2,
+ 0xAFB3A8AE, 0xA5AEB4A9, 0xACA0ADB1, 0xABADA1A8,
+ 0xA1ABAFA4, 0xAFA3A8AC, 0xAEB3A4AB, 0x9EAAAFA0,
+ 0xAE9EA9AF, 0xA7AA9AAB, 0x98ABAF9C, 0xAE9DA5AB,
+ 0xA6AC99A8, 0x95A5AA95, 0xA994A7A9, 0xA8AD98A4,
+ 0x99A8AD98, 0xAC99A8AC, 0xA7A996AA, 0x95A4A895,
+ 0xA895A4A8, 0xC2C5B5A4, 0x114E5247, 0x897E151A,
+ 0xBABEB385, 0x8F979E91, 0x9C90979E, 0x9A9E9298,
+ 0x8C92998A, 0x9C8C949B, 0x929B8E92, 0x8A91978C,
+ 0x968D8F95, 0x90968B91, 0x898E9489, 0x8D828F96,
+ 0x878C8387, 0x88888C86, 0x8C87898D, 0x20241F88,
+ 0x00000100, 0x01000000, 0x01020000, 0x00000000,
+ 0x30260001, 0x8A8A7C2F, 0x7A858476, 0x70658785,
+ 0x5D5C5272, 0x353C3934, 0x38343A39, 0x201E1D39,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x4B010200, 0x78724F51,
+ 0x78797078, 0x6675736B, 0x6E627170, 0x6C6C606E,
+ 0x5F6E6E62, 0x6A5F6B6B, 0x6C6A5F6C, 0x5D6D695E,
+ 0x675C6C68, 0x6C685D6B, 0x5D69695D, 0x695F6969,
+ 0x69685E6A, 0x5C67665C, 0x655D6766, 0x6D6C6267,
+ 0x5E6D6E64, 0x6F63686A, 0x6D6F636F, 0x636A6C60,
+ 0x6F636D6F, 0x6F6F636D, 0x65747365, 0x73657473,
+ 0x73736773, 0x7173746A, 0x766D797A, 0x75766C75,
+ 0x6B74766A, 0x7C717777, 0x807C717E, 0x79828075,
+ 0x897E8684, 0x8181758B, 0x717D7D71, 0x73687D7D,
+ 0x7A786E75, 0x7A83847B, 0x857C8283, 0x85867D82,
+ 0x7D86877D, 0x857A8887, 0x86857B87, 0x838A897F,
+ 0x2D2B8989, 0x0000002C, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00010101, 0x01010000, 0x00000001, 0x00000000,
+ 0x00010000, 0x01000200, 0x00000000, 0x01010000,
+ 0x01010101, 0x00000100, 0x685F0001, 0x989B9265,
+ 0x98A0A198, 0xA09AA0A1, 0xA0A198A0, 0x94A0A499,
+ 0xA1959CA0, 0xA0A4989D, 0x98A0A498, 0x9F93A0A4,
+ 0x9DA1959B, 0x95A3A899, 0xA3949FA4, 0xA2A99C9C,
+ 0x97A5AA9B, 0xA89CA1A6, 0xA4A89CA4, 0x98A0A498,
+ 0xA99DA0A4, 0xA6AA9EA5, 0x9CA5A99D, 0xA79BA4A8,
+ 0xA8ACA0A3, 0x9DA8ACA0, 0xA99DA5A9, 0xA7AB9FA5,
+ 0xA2A8AEA3, 0xA89EA6AB, 0xA5ADA3A0, 0xA3A7ADA2,
+ 0xABA2AAAE, 0xA6A9A0A8, 0xA4A6ACA1, 0xACA3A9AF,
+ 0xA9ADA2A7, 0xA0A8AFA2, 0xACA0A8AF, 0xA9ADA1A8,
+ 0xA3ABAFA3, 0xAFA3ABAF, 0xADB1A5AB, 0xA4ADB1A5,
+ 0xB2A5ACB0, 0xA7AFA4AB, 0xA8A9B2A8, 0xAFA6A7AF,
+ 0xAEB3AAAA, 0xADA8AFA8, 0xB3ADADB4, 0xAFB4ABAF,
+ 0xACAEB3AA, 0xB5ACB0B5, 0xACB1A8B0, 0xA7B1B8B1,
+ 0xADA8A7AE, 0xB9BFBAA7, 0xBABAC1BA, 0xBBB4BAC1,
+ 0xB5BCB5B4, 0xB6B6BDB6, 0xBCB7B6BD, 0xBABFBDB6,
+ 0xBABBBEBC, 0xBDBBB9BC, 0xBDC0BEBA, 0xBCBABDBB,
+ 0xBCBCBBBE, 0xBABDBBBA, 0xB8BCBFBD, 0xC0BEB7BA,
+ 0xBEC1BFBD, 0xBABBBFBA, 0xBFBABBBF, 0xBDC1BCBB,
+ 0xBCBDC1BC, 0xC2BBBDC1, 0xBCC0BBBB, 0xBEBABDBB,
+ 0xBFBDBCBE, 0xBABFBDBA, 0xBDB8BEB9, 0xBFBDBABF,
+ 0xBABFBEBA, 0xB2B8BDBC, 0xBCBCB0B2, 0xBDBDBDBC,
+ 0xBFBABFBE, 0xBFBEBAC0, 0xB8BEBDB9, 0xBDB9C0BD,
+ 0xBDBBB9C0, 0xBABFBDB8, 0xBBBAC0BB, 0xBEBBB8BD,
+ 0xB9BFBEB7, 0xBEBAC0BF, 0xBEBFB9BF, 0xBABFC0B9,
+ 0xC0C0C0C0, 0xC1BFC0C0, 0xBABBB7C0, 0xB9B8BCB7,
+ 0xC1BCBBBF, 0xBBC0BEBD, 0xC1BAC0BF, 0xC0BFBBC0,
+ 0xB3BDBDB8, 0xC3A5B0B4, 0xBEC1B4BF, 0xB8C0C0B5,
+ 0xBEB8BEBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBEBDBABF, 0xBABFBEB9, 0xBDB9C0BD, 0xBBB9B9C0,
+ 0xB8BDBBB6, 0xC0BEC0C0, 0xC1BFC0C0, 0x888B89C0,
+ 0x00000000, 0x00000000, 0x02000002, 0x00020000,
+ 0x00000200, 0x00000000, 0xBE545B58, 0xC0BFB8C1,
+ 0xB8C0BFB8, 0xBBB7BEBB, 0xBBB9B7BE, 0xB8BDBBB6,
+ 0xBBB7BCBA, 0xBDBBB8BD, 0xB9BEBCB8, 0xBCB7BDBC,
+ 0xBEBDB7BD, 0xB7BDBCB9, 0xBDB4BCBC, 0xBCBCB5BD,
+ 0xB3BBBBB4, 0xBEB4BCBB, 0xC0BDB7BF, 0xBABFBDB9,
+ 0xBEBBC0BE, 0xC0BFBBC0, 0xBBC0BFBB, 0xBFB9BFBE,
+ 0xBEBFBAC0, 0xBABFC0B9, 0xC0BABFC0, 0xBFBEBABF,
+ 0xB9BFBEB9, 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xC1B8C0C0, 0xBFC0B9C1, 0xBABFC0BA, 0xC0B8C0BF,
+ 0xC0C1B9C1, 0xBBC0C1BB, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xBEB8C0BF, 0xC1C1B7BF, 0xB8C0C0B9,
+ 0xC1B9C1C0, 0xC0C0BAC2, 0xB8C0C0B8, 0xBEBAC0BF,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBFB9BFBE, 0xBFBEB8C0,
+ 0xBABFBEB9, 0xBDBCBFBD, 0xC1BCBEC2, 0xBDC1BCBD,
+ 0xBAB7BCBA, 0xBBB9B6BD, 0xB8BDBBB6, 0xBEBABFBE,
+ 0xBEBDBABF, 0xB9BEBDB9, 0xBDBCBEBE, 0xBFBDBEBF,
+ 0xB8BCB7BC, 0xBAB7BDB8, 0xBEB9B8BF, 0xB8BFB8B8,
+ 0xBFB9BDB7, 0xC4BFC1C5, 0xBBBFB9C0, 0xABABB2AB,
+ 0xB1ACABB2, 0xABB2ABAB, 0xA5AAB2A8, 0xB2A9A9AE,
+ 0xAEB2A7AF, 0xA5B0B4A9, 0xB0A1ADB1, 0xADB2A3AB,
+ 0xA0ADB1A5, 0xAEA2A8AC, 0xABB0A1AA, 0x9DAAAFA0,
+ 0xAD9DAAAD, 0xA5A898AA, 0x9BA8AB9B, 0xA697A6AC,
+ 0xA0A8979F, 0x97A8AD98, 0xAD98A8AE, 0xA3A893A8,
+ 0x95A4A895, 0xA794A4A8, 0xA5A996A3, 0x94A4A895,
+ 0xA797A3A7, 0xA4A797A4, 0x47BABEB2, 0x1B124E52,
+ 0x83867D18, 0x91B8BEB3, 0x9D91979E, 0x999D9199,
+ 0x888F9687, 0x998C9097, 0x939A8D92, 0x8D8F978C,
+ 0x938A8F97, 0x8F958A8E, 0x7A909489, 0x887D8286,
+ 0x878C8384, 0x87888C87, 0x8D88868C, 0x20241F89,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x30270001, 0x8A8A7E2F, 0x65868479, 0x5B517270,
+ 0x4A48405D, 0x363A3A34, 0x0300393A, 0x02030002,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x4C000100, 0x78725052,
+ 0x78797076, 0x6576746A, 0x70657470, 0x76746974,
+ 0x606E6D63, 0x6D63696A, 0x6F6D636E, 0x5E706C61,
+ 0x695E6D69, 0x6D695E6F, 0x616C685D, 0x6C616E6C,
+ 0x6E6C626E, 0x63737268, 0x6C636B6C, 0x6B6C626B,
+ 0x636E6F65, 0x6E626D6F, 0x6F6F636C, 0x666B6B5F,
+ 0x74697371, 0x76746976, 0x6A747267, 0x786E7676,
+ 0x76756B79, 0x7077786F, 0x79707879, 0x78796F78,
+ 0x6B787A6E, 0x756A7777, 0x807C7177, 0x75807C71,
+ 0x80758480, 0x7E7C7184, 0x717C7B71, 0x82787C7B,
+ 0x82807883, 0x7B83847B, 0x857C8184, 0x83847B84,
+ 0x7A83847A, 0x857B8686, 0x86857B87, 0x808A897F,
+ 0x5A568889, 0x00000059, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x01000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000001, 0x00000000, 0x00010000, 0x00000100,
+ 0x00010000, 0x00000100, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x01000001, 0x33343000,
+ 0x9B9EA09A, 0xA0979FA1, 0x9EA1989D, 0x97A0A499,
+ 0x9D8E9FA3, 0x9DA29398, 0x97A0A498, 0xA1959FA3,
+ 0x9B9F939D, 0x999FA397, 0xA596A3A8, 0x9EA394A0,
+ 0x9BA6AA9E, 0xA599A3A7, 0xA5A99DA1, 0x98A3A79B,
+ 0xA498A0A4, 0xA4A89CA0, 0x9DA5A99D, 0xA498A5A9,
+ 0xA4A89CA0, 0xA0A5A99D, 0xA79BA8AC, 0xA4A89DA3,
+ 0xA3A8ADA4, 0xAEA4A5AD, 0xA0A89DA6, 0xA6A5ABA0,
+ 0xADA4ADB1, 0xA5AAA1AA, 0xA1A8ACA1, 0xAEA5A6AC,
+ 0xA6ACA1A9, 0xA2A8ACA0, 0xADA0AAAE, 0xA6ADA0A6,
+ 0xA3AAAEA2, 0xAFA3ABAF, 0xA8ACA0AB, 0xA8ABAFA3,
+ 0xB4A8B0B4, 0xABB1A6B0, 0xA8A4ACA5, 0xB0A7A7AF,
+ 0xAFB5AAAB, 0xA6ADB5AB, 0xB5ABA7B0, 0xB3B8AFAD,
+ 0xA8B0B5AC, 0xB3AAACB1, 0xAEB3AAB0, 0xB0B0B7B0,
+ 0xADA8B0B7, 0xA7ADA8A7, 0xB9BBC1BC, 0xC0BBB8BE,
+ 0xB5BDB6B9, 0xBAB5BCB5, 0xBEB9BAC1, 0xBBBFBABA,
+ 0xBBBABDBB, 0xBDBBBABD, 0xBABDBBBA, 0xB7BABEB9,
+ 0xBBB9B8BC, 0xBBBEBCB8, 0xB7B8BBB9, 0xBEBCB8BC,
+ 0xBEBFBDBD, 0xBAB8BCB7, 0xC1BBBBBF, 0xBEC2BCBD,
+ 0xBCBDC1BC, 0xBEB9BDC1, 0xB8BCB7BA, 0xBCBCBFBD,
+ 0xBFBDB9BE, 0xBABFBDBA, 0xBBB8BFBC, 0xBDBBB8BD,
+ 0xBABFBDB8, 0xB0B8BDBB, 0xBDBDAFB2, 0xC0BFC1BD,
+ 0xBEBABFBE, 0xBFBDB9BF, 0xB6BBB9BA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBCBFBDBC, 0xB9B8BDBB, 0xBDBCB6BB,
+ 0xB9BFBEB7, 0xBDBABFBE, 0xBFBEB9C0, 0xBBC0BFB9,
+ 0xC0BEC0C0, 0xC1BFC0C0, 0xB8BCB7C0, 0xB9BABBB7,
+ 0xC1BCBBBF, 0xBBC0BEBD, 0xBFBAC0BF, 0xBDBDB7BF,
+ 0xB0BABAB5, 0xC4A5B0B4, 0xBFC2B5C0, 0xBABFC0B8,
+ 0xBEB9BFBE, 0xBFBEBAC1, 0xBABFBEBA, 0xBCBAC1BE,
+ 0xC0BEB8BF, 0xBABFBDBB, 0xBEBABFBE, 0xBDBBBABF,
+ 0xB6BBB9B8, 0xC0BEC1BF, 0xC0C0C1C2, 0x8A8A8AC0,
+ 0x00000000, 0x00000000, 0x02000002, 0x00020000,
+ 0x00000200, 0x00000000, 0xC0555B5A, 0xC1C1B9C1,
+ 0xB8C0C0B9, 0xBDB7BDBC, 0xBCBAB9C0, 0xBABDBBB7,
+ 0xBBB9BEBC, 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB8BDBCB8, 0xBEB7BCBD, 0xBDBDB6BE,
+ 0xB2BABAB5, 0xBBB5BDBC, 0xBFBDB6BC, 0xBABFBDBA,
+ 0xBEBBC0BE, 0xBFBEBBC0, 0xBBC0BFBA, 0xBFBAC0BF,
+ 0xBEBFBAC0, 0xB9BEBFB9, 0xBFB9BEBF, 0xC0BFB9BE,
+ 0xBAC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xC0B8C0C0, 0xBEBFB8C0, 0xB9BEBFB9, 0xBFB8C0BF,
+ 0xBFC0B8C0, 0xB8C0C0BA, 0xBFB8C0C0, 0xC1C1B5BF,
+ 0xB7BDBCB9, 0xC0AAB2B1, 0xC0C0B9C1, 0xB8C0C0B8,
+ 0xC0B8C0BF, 0xC0C0B9C1, 0xB8C0C0B6, 0xBEBAC0BF,
+ 0xC0BEBBC0, 0xBAC0BFBB, 0xBEBAC0BF, 0xC1C0B9BF,
+ 0xB8BDBBBB, 0xBCBABFBD, 0xC1BCBDC1, 0xBBBEBCBD,
+ 0xBBBBC0BE, 0xBBB9B8BD, 0xBCBFBDB8, 0xBCB6BBB9,
+ 0xBFBEB8BD, 0xB8BDBCBA, 0xBBB8BBB9, 0xBDBBBABD,
+ 0xB6BBB9BA, 0xB8B6BCB7, 0xBFB8B6BD, 0xB9C0B9B8,
+ 0xBEC0C4BE, 0xBEB8C0C4, 0xAEB2ACBA, 0xABACB0AA,
+ 0xB1ABABB2, 0xA0A7A0AD, 0xA9A6AEA4, 0xB1A8ABB3,
+ 0xACB1A8AC, 0xA5AEB4A9, 0xB0A3ABB2, 0xABB2A3A9,
+ 0xA0ABAFA3, 0xACA0A8AC, 0xA7AB9FA8, 0x9EAAAD9E,
+ 0xAD9EAAAD, 0xA4A797AA, 0x9DA6AC9B, 0xA798A5AC,
+ 0xA5AC9DA0, 0x98A6AC99, 0xAA95A8AD, 0xA2A792A5,
+ 0x96A5A996, 0xAA97A5A9, 0xA3A996A4, 0x95A4A895,
+ 0xA797A4A8, 0xA5A898A4, 0xB2BABFB0, 0x5047BABE,
+ 0x181B124D, 0xB3565950, 0x9D92BABE, 0x9A9E9299,
+ 0x8A92998C, 0x988D9097, 0x92988D92, 0x8A93998E,
+ 0x948B8C94, 0x8F948B8F, 0x82909489, 0x8D82898D,
+ 0x8E938A89, 0x87868C87, 0x8C87868C, 0x20241F88,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000001, 0x5D5C5202, 0x64868479, 0x4840716F,
+ 0x4747414A, 0x00383935, 0x03000203, 0x00040000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x4B000100, 0x78724F51,
+ 0x7A787078, 0x6978736A, 0x74697A74, 0x76746978,
+ 0x69727068, 0x70687172, 0x72716772, 0x616E6C61,
+ 0x6C5E706C, 0x706D5F6F, 0x5F706D5F, 0x6C61706D,
+ 0x6D6B6070, 0x676D6D61, 0x71677071, 0x70716772,
+ 0x626F6F63, 0x6F636E71, 0x7474686F, 0x6877756A,
+ 0x74697773, 0x76746978, 0x6E77756A, 0x756B7A7A,
+ 0x7A787076, 0x70787970, 0x796F7879, 0x77786E78,
+ 0x6C78796F, 0x7A707776, 0x7E7C717C, 0x717E7C71,
+ 0x7C717E7C, 0x7D7B707E, 0x777E7C72, 0x80788281,
+ 0x82807883, 0x78808178, 0x80778081, 0x83847A7F,
+ 0x78828379, 0x83798284, 0x86857B84, 0x8088897F,
+ 0x88828889, 0x2C2D2B86, 0x01000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000001, 0x01010000, 0x00010001, 0x01000100,
+ 0x00000101, 0x00000100, 0x01000000, 0x00010101,
+ 0x00000100, 0x00000000, 0x00000000, 0x00010000,
+ 0x65020300, 0xA09A696B, 0x9EA1989E, 0x969DA195,
+ 0xA2939EA5, 0x9BA0919D, 0x989CA094, 0xA498A0A4,
+ 0x9DA195A0, 0x9B9B9F93, 0xA79BA3A7, 0x9FA495A3,
+ 0x9CA3A79B, 0xA89CA4A8, 0xA0A498A4, 0x9BA5A99D,
+ 0xA498A3A7, 0xA1A89BA0, 0x9EA6AA9F, 0xA499A3A9,
+ 0x9FA397A0, 0xA0A3A79B, 0xA99DA8AC, 0xA6AA9FA5,
+ 0xA3A2A79E, 0xADA2A5AD, 0xA7ADA2A7, 0xA0A6AA9F,
+ 0xADA4A7AB, 0xA9AEA5A8, 0xA0A8ACA1, 0xAFA4A8AC,
+ 0xA9AFA4A9, 0xA0A8ACA1, 0xACA1A8AC, 0xA7ADA2A6,
+ 0xA3A8ACA0, 0xAFA3ABAF, 0xABAFA3AB, 0xA4A8ACA0,
+ 0xB4A8ACB0, 0xAEB4A9B0, 0xA3A9B2A8, 0xAFA6A4AD,
+ 0xAEB4A9AA, 0xABADB5AB, 0xB0A5ADB5, 0xAFB5AAA8,
+ 0xACB0B5AC, 0xB3AAB0B5, 0xACB1A8B0, 0xB0B0B7B0,
+ 0xB6B1B0B7, 0x9EA49FB0, 0xC0B3B7B2, 0xC0BDBFC5,
+ 0xB3BAB5B9, 0xB9B7BEB7, 0xC0BBB9C0, 0xBBBFBABC,
+ 0xBBBABDBB, 0xBDBBBABD, 0xBABDBBBA, 0xB7B8BCB7,
+ 0xBDBBB8BC, 0xBABEB9BA, 0xBBB8BCB7, 0xBFBDBCC0,
+ 0xBABDBBBC, 0xB9BBBFBA, 0xC1BCBABE, 0xBDC1BBBD,
+ 0xBCBDC1BC, 0xBFBABDC1, 0xBBBFBABB, 0xBEBDC0BE,
+ 0xBFBDBBC0, 0xBABFBDBA, 0xBCBABFBD, 0xBFBDB9BE,
+ 0xB9BCBABC, 0xB6B8BDBB, 0xBCBCB3B8, 0xBEC0C1BC,
+ 0xBEBABFBE, 0xBFBDB9BF, 0xB8BDBBBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBCB8BDBB, 0xBFBEB8BD,
+ 0xB9BFBEB9, 0xBDBABFBD, 0xBFBEBABF, 0xBBC0BFB9,
+ 0xC1BCBEBE, 0xC1BFBFC1, 0xB8BBB9BE, 0xBCBBBFBA,
+ 0xC1BCBDC1, 0xBDC0BEBD, 0xC0BAC0BF, 0xBFC0B8C0,
+ 0xB5BCBFBA, 0xBCA5B0B4, 0xBFC2ADB8, 0xBAC0BFB8,
+ 0xBDB9BFBE, 0xC0BFBABF, 0xB8BDBCBB, 0xBCB4B9B7,
+ 0xBFBDB9BE, 0xBABFBDBA, 0xBDBABFBD, 0xC0BEBABF,
+ 0xB6BBB9BB, 0xBFBEC1BF, 0xC0C0C0C1, 0x8C8A8AC0,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0565E5E, 0xC0C0B6C0,
+ 0xB8C0C0B8, 0xBCB6BCBB, 0xBCBBB7BD, 0xB8BDBCB7,
+ 0xBCB8BDBB, 0xBDBBB9BE, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBDBCB8BD, 0xB8BDBCB8, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB6BCBBB7, 0xBCB7BDBC, 0xBEBDB7BD, 0xBABFBEB9,
+ 0xBDB7BEBB, 0xC0BDB9C0, 0xB9C0BDB9, 0xBEB9BFBE,
+ 0xBDBCB9BF, 0xB9BFBEB8, 0xBFBAC0BF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB9BFBE, 0xC0C0B9BF, 0xB8C0C0B8,
+ 0xC2B9C0C3, 0xC0C0B8BF, 0xB8C0C0B8, 0xBFB8C0BF,
+ 0xC0C1B8C0, 0xB6BEBEBB, 0xBFB9C1C0, 0xBFBEB6C1,
+ 0xB8C0BFB7, 0xBFB7BDBC, 0xC0C0B8C0, 0xB9C1C1B8,
+ 0xBFB7BFBE, 0xC0C0B8C0, 0xB8C0C0B6, 0xBEBABFBE,
+ 0xBFBEBABF, 0xBAC0BFB9, 0xBEBBC1C0, 0xC0BEBAC1,
+ 0xB9BEBCBB, 0xBDB7BCBA, 0xC1BFBABF, 0xBCBFBDBE,
+ 0xBBBBBEBC, 0xC0BBBCC0, 0xBBBFBABC, 0xB9BABEB9,
+ 0xBFBDB8BB, 0xBABFBDBA, 0xB8B6BCB7, 0xBDB8B7BD,
+ 0xB7BDB8B7, 0xB4B3B9B4, 0xBFBAB3B9, 0xBFC3BDBB,
+ 0xAFBAC1BA, 0xACA1B1B9, 0xA6ACA1A6, 0xA9ADB2A9,
+ 0xAFA6ADB2, 0xA6ABA2AC, 0xA7A9B1A6, 0xB0A9A9B1,
+ 0xA8B0A9A8, 0xA7A9B0A9, 0xAEA1A9B1, 0xA9B2A5A5,
+ 0xA1A8AFA2, 0xACA1A9AD, 0xA8ACA1A8, 0xA0A2A69A,
+ 0xAA9EA8AC, 0xA4A99AA6, 0x99A4AB9C, 0xA798A1A8,
+ 0xA2A99AA0, 0x99A6AC9B, 0xA996A6AC, 0xA8AD98A5,
+ 0x96A3AA95, 0xAA96A4AB, 0xA0A897A1, 0x94A2A897,
+ 0xA395A1A4, 0xA5A696A3, 0xAA9EA493, 0xBBACB5BB,
+ 0x6F7165B6, 0x39080802, 0xABA23E3D, 0xA8ACA1A8,
+ 0x979EA297, 0xA1989EA2, 0x9EA1989E, 0x8A93998E,
+ 0x948B8F95, 0x91948B91, 0x898F9087, 0x908A8F92,
+ 0x888C868E, 0x8A899089, 0x8F8A898F, 0x20241F8B,
+ 0x00000100, 0x00000000, 0x01010100, 0x00020000,
+ 0x00000200, 0x3D3D3702, 0x4577776B, 0x50475151,
+ 0x2828224F, 0x00080907, 0x01000001, 0x01020000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00020000,
+ 0x00000000, 0x00010000, 0x4B050400, 0x77725151,
+ 0x7A78707A, 0x6A78736A, 0x74697873, 0x76746978,
+ 0x68707168, 0x71676E71, 0x72716770, 0x61706E63,
+ 0x7060706F, 0x70706070, 0x60707060, 0x6F617070,
+ 0x70706070, 0x60707060, 0x6F616F70, 0x6F6F6170,
+ 0x606F6E60, 0x6F616F70, 0x71706270, 0x6979756A,
+ 0x74697874, 0x76756776, 0x68787769, 0x77697878,
+ 0x78786C78, 0x7077786F, 0x796F7879, 0x78796F78,
+ 0x707A7870, 0x776F7A78, 0x7A796F79, 0x707A7C70,
+ 0x7C707A7C, 0x7C7C707A, 0x727E7C71, 0x7A737E7C,
+ 0x7E7B7380, 0x77828177, 0x81778281, 0x80817782,
+ 0x717A7B71, 0x7B717A7B, 0x7A7B717A, 0x78808178,
+ 0x81788081, 0x58585280, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x02000102,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00010101, 0x01010200, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000200, 0x00000000, 0x00000100, 0x00000102,
+ 0x00000002, 0x00000100, 0x00000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x302A0001, 0x888B822E, 0x8F989F92,
+ 0xA091959F, 0x989F9099, 0x989B9F93, 0xA498A0A4,
+ 0x9DA195A0, 0x969EA499, 0xA89B9CA3, 0x9EA598A1,
+ 0x9B9EA598, 0xA699A1A8, 0x9FA6999F, 0x9C9FA59A,
+ 0xA59AA1A7, 0x9CA4999F, 0x9FA1A69D, 0xA69DA1A9,
+ 0xA1A79CA1, 0x9DA3A79B, 0xA99DA5A9, 0xA5A99DA5,
+ 0x9DA5A99E, 0xACA1A2A8, 0xA9ADA1A8, 0x9CA8ACA0,
+ 0xACA1A4A8, 0xA8ACA1A8, 0x9EAAAEA2, 0xAA9EA6AA,
+ 0xA6AA9FA6, 0xA1A6ACA1, 0xAEA5A6AC, 0xACB1A8A9,
+ 0xA1A7ADA2, 0xADA2A6AC, 0xA9AFA4A7, 0xA0ABAFA3,
+ 0xB1A6A8AC, 0xABB1A6AD, 0xA2ACB4A9, 0xADA2A5AD,
+ 0xAAB0A5A5, 0xA9AFB5AA, 0xB3A8AEB4, 0xACB2A7AD,
+ 0xACB0B4A9, 0xB5ACB2B5, 0xACB3ACB0, 0xACABB1AC,
+ 0xB4ADABB1, 0xABAFA9AD, 0xBDAEB0AA, 0xC0BFBEC2,
+ 0xB4BAB9BB, 0xBAB9BEBC, 0xBFBABBBF, 0xB9BFBAB9,
+ 0xBDBABDBB, 0xBCBABCBF, 0xB8BBB9B9, 0xB8B8BCB7,
+ 0xBCB7B9BD, 0xB9BDB8B8, 0xBABAC0BB, 0xC0BBBAC1,
+ 0xBCC0BBBA, 0xBABBBEBC, 0xC1BCBBBF, 0xBCC0BBBD,
+ 0xBABDC1BC, 0xBBB7BBBF, 0xBBBFBABA, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBABEB9BB, 0xBCBCBFBD, 0xBCBCBBBE,
+ 0xBABCBCBA, 0xB7B9BEBD, 0xBABBB3B8, 0xBBBFC0B6,
+ 0xBDBABFBE, 0xBFBDBABF, 0xBABFBDBC, 0xBEBABFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBBB6BCBB, 0xBCBBB6BC,
+ 0xB7BCBBB7, 0xB9BABFBD, 0xBEBBB8BE, 0xB7BEBBB7,
+ 0xBDB7BCBA, 0xBFBDBABF, 0xB8BDBBBA, 0xBFBABFBD,
+ 0xC1BFBEC1, 0xBCBEBEBE, 0xC0BCC1C0, 0xC0C1BBC1,
+ 0xB7BCBDBC, 0xBCA9B2B5, 0xB9BAB0B9, 0xBCC1C0B4,
+ 0xBDBCC1C0, 0xBABABCBF, 0xBABCBCB8, 0xBABBBEBC,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBCBBBFBA, 0xBEBCBBBE,
+ 0xBBBEBCBB, 0xC0BFBFBF, 0xC2C0C0C0, 0x8A8B89C1,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC2565E5E, 0xC0C0B6BF,
+ 0xB7BFBFB8, 0xBCB6BCBB, 0xBBBCB7BD, 0xB7BCBBB7,
+ 0xBBB6BBB9, 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB7BCBA,
+ 0xBEBDB8BD, 0xB8BDBCB9, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB6BCBBB7, 0xBCB7BDBC, 0xBEBDB7BD, 0xBABFBEB9,
+ 0xBBB7BEBB, 0xBEBBB7BE, 0xB9C0BDB7, 0xBCB9BFBE,
+ 0xBDBCB7BD, 0xBABFBEB8, 0xBEB9BFBE, 0xBEBFB7BF,
+ 0xB9BFBEB9, 0xBFB9BFBE, 0xBFC0BAC0, 0xB8C0C0BA,
+ 0xC0B8BFC2, 0xC0C0B8C0, 0xB7BFBFB8, 0xBFB8C0BF,
+ 0xBFC0B8C0, 0xB7BFBFBA, 0xC0B9C1C0, 0xC1C0B7C2,
+ 0xB9C1C0B9, 0xC1B9BFBE, 0xC0C0B9C1, 0xB8C0C0B8,
+ 0xBEB9BFBE, 0xC0C0B9BF, 0xB8C0BFB8, 0xBEBABFBE,
+ 0xBFC0BABF, 0xB8C0BFBA, 0xBEBAC1BE, 0xBFBDBBC0,
+ 0xBBC0BEBA, 0xBAB9C0BD, 0xBFBEB6BD, 0xBCBFBDBA,
+ 0xBCBDC1BC, 0xBEB9BDC1, 0xBBBFBABA, 0xB7BCC0BB,
+ 0xBBB9B8BC, 0xBABFBDB6, 0xB6B8BEB9, 0xBDB8B5BD,
+ 0xB7BDB8B7, 0xBABAC0BB, 0xC4BFB9BF, 0xC0C4BFC0,
+ 0xA8B4B9B0, 0xB3A8ADB3, 0xA6ACA1AD, 0xA9ACAFA6,
+ 0xB0A5AFB2, 0xABB1A6AC, 0x99A9B1A6, 0xADA69BA3,
+ 0xA8B0A9A5, 0xA7A8B0A9, 0xAB9FA8B1, 0xA2AB9EA1,
+ 0xA1A5AC9F, 0xAEA3A9AD, 0xA8ACA1AA, 0xA1A8ACA1,
+ 0xAA9DA9AD, 0xA2A99AA3, 0x9AA2A99A, 0xAB9CA2A9,
+ 0xA1A899A4, 0x98A3A998, 0xA898A3A9, 0xA5A996A5,
+ 0x95A2A895, 0xA897A0A9, 0xA0A897A0, 0x98A3A998,
+ 0xA799A5A8, 0xA7A799A7, 0x919DA392, 0xBCA99EA4,
+ 0xB8BBACB6, 0x0574746E, 0x07030806, 0xA8AAA408,
+ 0x999EA09A, 0xA19B9FA2, 0xA0A198A1, 0x8E93978C,
+ 0x978E9399, 0x90938A94, 0x868E9188, 0x8E888C8F,
+ 0x8A8E898C, 0x89899089, 0x8F8A8890, 0x20241F89,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x17161202, 0x4476776D, 0x2A214E50,
+ 0x02010029, 0x00000100, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00020000,
+ 0x00000000, 0x00010000, 0x4C050400, 0x77725451,
+ 0x79776F7A, 0x6B76746A, 0x74697974, 0x76746978,
+ 0x676F7066, 0x71676D70, 0x72716770, 0x61706E63,
+ 0x7060706F, 0x70706070, 0x61706F61, 0x6F61706F,
+ 0x706F6170, 0x60707060, 0x70607070, 0x70706070,
+ 0x60706F61, 0x6F617070, 0x706F6170, 0x69767469,
+ 0x74697674, 0x76756776, 0x677A7768, 0x77697976,
+ 0x78766B78, 0x6F7B7A70, 0x796F7A79, 0x79786E7A,
+ 0x727A7870, 0x6E657A77, 0x77786F6D, 0x667A7B71,
+ 0x6F656D71, 0x7A7B716E, 0x72716F65, 0x6E67807B,
+ 0x736D6674, 0x68747268, 0x72687372, 0x73726873,
+ 0x626B6C62, 0x6C626B6C, 0x6B6C636B, 0x6C73746B,
+ 0x746A7475, 0x65665D73, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x02000102,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00010101, 0x00010000,
+ 0x01000200, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000002, 0x00000100, 0x01010001, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00020000, 0x93656B60,
+ 0xA09097A0, 0x989F9096, 0x96A0A498, 0xA4989EA2,
+ 0xA0A498A0, 0x969EA499, 0xA19699A1, 0x9EA79A99,
+ 0x989EA598, 0xA99C9EA5, 0x9DA398A2, 0x9D9EA499,
+ 0xA79CA2A8, 0x9CA49A9F, 0x9F9DA59B, 0xA79DA1A9,
+ 0xA1A69D9F, 0x9BA4A89D, 0xA99DA3A7, 0xA5A99DA5,
+ 0x9CA5A99E, 0xA89CA3A7, 0xA7AB9FA4, 0xA0A8ACA0,
+ 0xAA9EA8AC, 0xA7AB9FA6, 0xA3AAAEA2, 0xAA9EABAF,
+ 0xABAFA3A6, 0xA2A9AFA4, 0xABA2A7AD, 0xA6ABA2A6,
+ 0xA2A9AFA4, 0xABA0A7AD, 0xA6ACA1A5, 0xA0ACB0A4,
+ 0xABA0A8AC, 0xADB1A6A7, 0x9DAAB0A5, 0xB1A6A0A8,
+ 0xACB4A9A9, 0xA9ADB3A8, 0xB4A9B0B4, 0xB0B4A9AE,
+ 0xAAAFB3A8, 0xB6ADB0B3, 0xAEB5AEB1, 0xAEA9AFAA,
+ 0xB4ADADB3, 0xADB1ABAD, 0xABAFB1AB, 0xC0BFAEAF,
+ 0xBBBFC0BB, 0xBEBABDBB, 0xBFBABDC0, 0xBBBFBABB,
+ 0xBBBCBFBD, 0xBBB9BABD, 0xBABDBBB8, 0xB7B7BBB6,
+ 0xBDB8B8BC, 0xB8BCB7B9, 0xBBBAC1BA, 0xC0BBBBC2,
+ 0xBBC1BCBA, 0xB9BBBEBC, 0xBFBAB8BB, 0xBEC2BDBB,
+ 0xBABDC1BC, 0xBDB9BBBF, 0xC0C1BDBC, 0xB9BBBFBA,
+ 0xBFBABABE, 0xBCC0BBBB, 0xBBBBBEBC, 0xBDBDBABD,
+ 0xBABCBCBB, 0xB8B9BEBD, 0xB6B7B3B9, 0xB9BEBDB2,
+ 0xBDB9BEBC, 0xBFBDBABF, 0xB8BDBBBC, 0xBEB8BEBD,
+ 0xBEBBB9BF, 0xB9C0BDB7, 0xBBB6BCBB, 0xBDBCB6BC,
+ 0xB6BBBAB8, 0xBBB8BDBB, 0xBCBAB8BD, 0xB8BDBBB7,
+ 0xBAB8BDBB, 0xBDBBB7BC, 0xB6BBB9B8, 0xC0BABFBE,
+ 0xC0C0BEC0, 0xBCBEBEC0, 0xC0BABCBC, 0xC0C1BCC1,
+ 0xB3B8B9BC, 0xC1A4ACAC, 0xB9BAB9C1, 0xB5BAB9B4,
+ 0xBABABCBC, 0xBDBBB9BC, 0xBCBFBDBA, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBCC0BBBB, 0xBABBBFBA, 0xBDBBBBBF,
+ 0xBBBEBCBA, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585D5E, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xBDB7BDBC, 0xBDBCB8BE, 0xB8BEBDB7,
+ 0xBBB7BCBA, 0xBBB9B8BD, 0xB6BBB9B6, 0xBBB6BBB9,
+ 0xBDBBB8BD, 0xBABFBDB8, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB7BCBAB8, 0xBBB8BDBB, 0xBDBBB8BD, 0xBABFBDB8,
+ 0xBCB8BDBB, 0xBBBAB9BE, 0xB9BEBDB6, 0xBEB9BFBE,
+ 0xBBBCB9BF, 0xBABFBEB7, 0xBDBABFBE, 0xBFBEB9C0,
+ 0xBBC0BFBA, 0xBFBABFBE, 0xBEBFBAC0, 0xBABFC0B9,
+ 0xC1B8C0C0, 0xC0C1B9C1, 0xBAC0BFBB, 0xBFB8C0BF,
+ 0xC1C1B8C0, 0xB8C0C0B9, 0xC0B8C0BF, 0xC1C1B9C1,
+ 0xB8C0C0B9, 0xC0B8C0C0, 0xC0C0B8C0, 0xB9BFBEB8,
+ 0xBDB9BFBE, 0xC0BFB9C0, 0xB8C0BFB8, 0xBDBABFBE,
+ 0xC0BFBABF, 0xBAC0BFBA, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBCC1BFBB, 0xBAB9C0BD, 0xBDBAB6BD, 0xBABFBDB6,
+ 0xBDBDC1BC, 0xBEBCBEC2, 0xBBBEBCBB, 0xBBBABDBB,
+ 0xBBB9BABD, 0xB8BBB9B8, 0xB7B9BDB8, 0xBCB7B6BC,
+ 0xB9BDB8B8, 0xBEC0C4BF, 0xC4C2BFC3, 0xB5B9B4C1,
+ 0xA8ADB2A9, 0xB3A8ADB3, 0xAEB4A9AD, 0xA8AAAFA6,
+ 0xB2A9ACB1, 0xA5AAA1AD, 0x9AA5ADA2, 0xA69F9CA4,
+ 0xA9B0A99F, 0xA7A9B0A9, 0xACA0A9B1, 0x9FA89BA2,
+ 0xA1A7AEA1, 0xADA1A9AD, 0xA8ACA0A9, 0x9CA4AB9E,
+ 0xAB9CA4AB, 0xA2A99AA4, 0x9CA2A99A, 0xA99AA4AB,
+ 0xA4A99AA4, 0x98A2A798, 0xA596A2A7, 0xA4A798A2,
+ 0x98A2A798, 0xA897A0A7, 0xA2A897A0, 0x97A0A693,
+ 0xA899A4A7, 0xA4A798A5, 0x949DA392, 0xA3929FA5,
+ 0xB7BCAD9D, 0x6FA8ABA2, 0x06057473, 0x08060508,
+ 0x9A6D6C68, 0x9F9AA0A0, 0xA1A299A2, 0x8991958A,
+ 0x948B8E94, 0x8D8F8991, 0x878A8F86, 0x908A8B90,
+ 0x8B8F898E, 0x89899089, 0x8F8A8890, 0x1E241F88,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x20292923, 0x02002829,
+ 0x00010001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00020000,
+ 0x01000000, 0x00010000, 0x4B050400, 0x78725151,
+ 0x7B797178, 0x5E6B695F, 0x5E536B69, 0x615F5460,
+ 0x5C65665C, 0x655D6566, 0x67665C67, 0x5968665B,
+ 0x67596867, 0x6A67596A, 0x5E69675D, 0x675D6966,
+ 0x69675C69, 0x5B6A695B, 0x695B6A69, 0x6A695B6C,
+ 0x5A68685C, 0x685C6868, 0x68685C68, 0x65717165,
+ 0x70627171, 0x70706270, 0x62787769, 0x71637170,
+ 0x72706574, 0x64716F65, 0x6F65706E, 0x716F6571,
+ 0x5B706E66, 0x645B6364, 0x63645B63, 0x59616259,
+ 0x605B6162, 0x63605B63, 0x5C65625A, 0x615C6561,
+ 0x67615C67, 0x58656359, 0x63586563, 0x65635865,
+ 0x545F5D53, 0x5B535E5C, 0x5E5C545D, 0x5C5A5850,
+ 0x665D6766, 0x74756C65, 0x00393A36, 0x01000001,
+ 0x00010000, 0x00000100, 0x00010000, 0x00000100,
+ 0x01000000, 0x00000101, 0x01010100, 0x01000000,
+ 0x00000101, 0x02000002, 0x00020000, 0x00000000,
+ 0x00000000, 0x01000001, 0x01010000, 0x00000001,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000100, 0x00000102, 0x00000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x01000101, 0x00010000, 0x2C000200,
+ 0x9E933035, 0x9A9E9298, 0x959CA094, 0xA1959FA1,
+ 0xA0A4989D, 0x999EA499, 0xA1959CA4, 0x9BA59997,
+ 0x999DA59A, 0xA59A9EA4, 0xA1A59AA1, 0x99A0A499,
+ 0xA99F9EA4, 0xA0A99FA1, 0x9C9DA59B, 0xA89F9EA6,
+ 0xA1A69DA3, 0x9BA5A99E, 0xA89BA3A7, 0xA4AB9EA1,
+ 0x9DA5AC9F, 0xA69AA5A9, 0xABADA1A2, 0x9FA8ACA1,
+ 0xAA9DA7AB, 0xA4AB9CA3, 0xA2AAAEA2, 0xADA1AAAE,
+ 0xA6AA9EA9, 0xA4A7ADA2, 0xACA1A9AF, 0xA8ACA1A8,
+ 0xA3A7ADA2, 0xACA1A8AE, 0xA8ACA1A6, 0x9FA8ACA0,
+ 0xACA0A7AB, 0xA7ABA0AA, 0x9EA7ADA2, 0xB0A5A1A9,
+ 0xACB4A9A8, 0xA8ABB0A7, 0xB4A9ACB1, 0xAFB3A8B0,
+ 0xA8AEB1A8, 0xB3AAAEB1, 0xAEB3AAB0, 0xAAA9B0A9,
+ 0xB5B0AAB1, 0xB0B4AEB1, 0xA9ACB0AA, 0xBBB9ABAF,
+ 0xBBC0BFB6, 0xBAB8BBB9, 0xBBB7BDBE, 0xB8BCB7BA,
+ 0xB7B8BCB7, 0xBDBBB8BC, 0xBDC0BEBA, 0xBAB8BBB9,
+ 0xB6B1B9BC, 0xB6BCB7B0, 0xBBB9BFBA, 0xBFBDBAC0,
+ 0xBDC0BEBC, 0xBABFC0BC, 0xBBB6BDBE, 0xBABEB9B7,
+ 0xB7BBBFBA, 0xBFBAB8BC, 0xBBBFBABB, 0xBABABEB9,
+ 0xBEBABBBF, 0xBDBEBABD, 0xBBBABDBB, 0xBDBBBABD,
+ 0xBABDBBBA, 0xBABABFBE, 0xB7B8B6BB, 0xB9BEBDB3,
+ 0xBABABDBB, 0xBEBCBBBF, 0xB8BDBBBB, 0xBDB9BFBE,
+ 0xBCB7B9C0, 0xB6BCB7B6, 0xB9B3B8B6, 0xBBBBB6BB,
+ 0xB6BBBAB9, 0xBEB8BDBC, 0xBDBBBABF, 0xB8BDBBB8,
+ 0xB9B8BEB9, 0xBEBCB8BE, 0xB6BBB9B9, 0xBEBABDBB,
+ 0xC1BFBDC0, 0xBCBFBDC0, 0xBCBABCBC, 0xC0C1B8BD,
+ 0xADB5B5BB, 0xC2A3ABAB, 0xB9BABAC2, 0xB5BAB9B4,
+ 0xBDB8BABA, 0xBEBCBCBF, 0xBAC0BBB9, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBABEB9BB, 0xBABABEB8, 0xBFBDBBBF,
+ 0xBBBEBCBC, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585E5D, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xBCB7BDBC, 0xBDBCB7BD, 0xB8BEBDB7,
+ 0xBCB9BEBC, 0xBFBDB9BE, 0xBABFBDBA, 0xBCB8BDBB,
+ 0xBEBCB9BE, 0xB6BBB9B9, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB7BCBAB8, 0xBDB8BDBB, 0xBFBDBABF, 0xBBC0BEBA,
+ 0xBBBABFBD, 0xBDBCB8BD, 0xBBC0BFB8, 0xBCB9BFBE,
+ 0xBDBCB7BD, 0xBABFBEB8, 0xBDBABFBE, 0xC0BFBABF,
+ 0xBBC0BFBB, 0xBFBABFBD, 0xBFBEBBC0, 0xBABFC0B9,
+ 0xC1B8C0C0, 0xC2C1B9C1, 0xBBC1C0BC, 0xBEB7BFBE,
+ 0xC0C0B7BF, 0xB8C0C0B8, 0xC0B8C0BF, 0xC0C0B9C1,
+ 0xB8C0C0B8, 0xBFB8C0C0, 0xC0BFB8C0, 0xB9C0BDBA,
+ 0xBDB9C0BD, 0xC0BFB9C0, 0xBAC1BEBA, 0xBDBABFBD,
+ 0xBFBEBABF, 0xB9BFBEB9, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBDB9C0BD, 0xBDBAB9C0, 0xB7BEBBB6,
+ 0xBABCC0BB, 0xBEBCBBBF, 0xBBBEBCBB, 0xBCBABDBB,
+ 0xBDBBBBBE, 0xBABDBBBA, 0xBAB8BCB7, 0xBDB8BBBF,
+ 0xBABEB9B9, 0xBBC0C4BF, 0xB2B0BCC0, 0xB0B4AFAF,
+ 0xA8ADB2A9, 0xB3A8AFB3, 0xA6ACA1AD, 0xA9AAAFA6,
+ 0xB2A9ADB2, 0xADB3A8AD, 0xA6A9B1A6, 0xADA3A9B1,
+ 0xA5ADA3A5, 0xA3A6AEA4, 0xAA9FA5AD, 0xA5AEA1A2,
+ 0xA0A8AFA2, 0xAB9FA8AC, 0xA9AE9FA7, 0x9BA4AB9C,
+ 0xAE9DA3AA, 0xA0A897A6, 0x9CA0A798, 0xA99AA4AB,
+ 0xA1A697A4, 0x99A2A798, 0xA79BA3A8, 0xA4A89CA5,
+ 0x98A0A79A, 0xA899A0A7, 0xA2A897A3, 0x949FA594,
+ 0xA4949FA5, 0xA1A495A1, 0x929EA493, 0xA4939DA3,
+ 0x9EA3949E, 0xA2A8ACA0, 0x736FA8AB, 0x08060572,
+ 0x370A0905, 0x9E9A3C3B, 0x9F9F999F, 0x8E92978E,
+ 0x938D9297, 0x8C908A91, 0x88899187, 0x908A8A92,
+ 0x8A8E888C, 0x89899089, 0x8F8A8890, 0x1E232188,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x03010002, 0x00030100, 0x01000201,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00020000,
+ 0x00000000, 0x00010000, 0x4C050302, 0x78725150,
+ 0x50504A78, 0x54605E56, 0x544A605E, 0x55544A56,
+ 0x48505148, 0x4F4A5051, 0x52504852, 0x4955544A,
+ 0x544A5654, 0x56544A56, 0x4F58544F, 0x544F5854,
+ 0x58554D58, 0x525E5C52, 0x5C525E5C, 0x5E5C525E,
+ 0x4F59584E, 0x60565859, 0x62615761, 0x58616258,
+ 0x645A6162, 0x64645865, 0x5A656359, 0x645A6664,
+ 0x66645A66, 0x5367645C, 0x5B535E5B, 0x5E5B535E,
+ 0x52585852, 0x58525658, 0x57575158, 0x5057544F,
+ 0x54505754, 0x63605C57, 0x5156534F, 0x54515855,
+ 0x58535059, 0x4A54524A, 0x544A5554, 0x56544A56,
+ 0x475E5C54, 0x4C474F4C, 0x4F4C474F, 0x4F5A5850,
+ 0x665D5859, 0x65665D65, 0x00565852, 0x01000001,
+ 0x00010000, 0x00010200, 0x00000001, 0x00000000,
+ 0x00000001, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x02000002, 0x00030101, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000001, 0x00000000, 0x00000001, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00010001, 0x00000100,
+ 0x352F0001, 0x9B9E9533, 0x97A0A39A, 0x9F949EA2,
+ 0x9BA1969B, 0x989DA398, 0xA1969BA3, 0x99A19699,
+ 0x9C9FA79C, 0xA39AA1A7, 0x9FA2999E, 0x99A2A69B,
+ 0xA79D9EA4, 0xA0A99F9F, 0x999FA79C, 0xA9A09CA4,
+ 0xA1A69DA4, 0x9FA1A79C, 0xA79CA4AA, 0xA1A89BA1,
+ 0x9FA4AB9E, 0xA79BA7AB, 0xA5A99DA3, 0xA1A8ACA1,
+ 0xADA0A9AD, 0xA2A99CA6, 0xA2A6AA9E, 0xAFA3AAAE,
+ 0xA6AA9EAB, 0xA4A7ADA2, 0xAFA3A9AF, 0xA7AB9FAB,
+ 0xA2A7AEA1, 0xAFA4A7AD, 0xA8ACA1AB, 0xA3ABAFA3,
+ 0xAFA3ABAF, 0xA8ACA1AB, 0xA3A7ADA2, 0xADA2A5AD,
+ 0xA8B0A5A5, 0xA6ACB2A7, 0xB2A7ABB1, 0xAEB2A7AE,
+ 0xA9B1B4AB, 0xB1A8AFB2, 0xB0B3AAAE, 0xABAFB3AD,
+ 0xB1ACABB2, 0xAFB3ADAD, 0xB0B1B5AF, 0xB3B1B2B6,
+ 0xBBC0BEAE, 0xB7BDC1BC, 0xBBB7BABB, 0xB7BBB6BA,
+ 0xBBBABEB9, 0xBFBDBCC0, 0xBABDBBBC, 0xB8B8BBB9,
+ 0xACA7B7BA, 0xB1B7B2A6, 0xBBBAC0BB, 0xBFBDBAC0,
+ 0xBDC1BCBC, 0xBCBFC0BC, 0xC0BBBFC0, 0xBBBFBABC,
+ 0xB7B8BCB7, 0xC1BCB8BC, 0xBBBFBABD, 0xBABBBFBA,
+ 0xBEBABBBF, 0xBBBFBABD, 0xB9BABDBB, 0xBDBBB8BB,
+ 0xBDC0BEBA, 0xBDB8BDBB, 0xB8B7B9BE, 0xB9BEBDB3,
+ 0xBBBABDBB, 0xBFBDBCC0, 0xBBC0BEBC, 0xBBBABFBE,
+ 0xBEB9B8BD, 0xB8BCB7BA, 0xBAB5B8B6, 0xBBBBB7BC,
+ 0xB9BBBBB9, 0xBEB9BEBD, 0xBDBCB9BF, 0xB8BDBBB8,
+ 0xB9B8BDBB, 0xBDBBB8BE, 0xB6BBB9B8, 0xBBBABDBB,
+ 0xBBB9BABD, 0xBCBFBDB8, 0xBDB9BEBD, 0xC0C3B8BE,
+ 0xAFB8BBB9, 0xC0ABB3B3, 0xBABBBBC1, 0xB5BAB9B5,
+ 0xBDBCBEBE, 0xC0BBBCBF, 0xBAC0BBBA, 0xBBBBBFBA,
+ 0xBEB9BCC0, 0xB9BFBAB8, 0xBABCC0BB, 0xBEBCBBBF,
+ 0xBBBEBCBB, 0xBFBEC1BF, 0xC1BFBEC1, 0x888B89BE,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000200, 0x00000002, 0xBF575C5B, 0xC0C0BAC0,
+ 0xB9C1C1B8, 0xBCB8BEBD, 0xBDBCB7BD, 0xB8BDBCB8,
+ 0xBCB7BDBC, 0xBEBDB7BD, 0xB7BDBCB8, 0xBEBAC0BF,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB8BDBC, 0xBDBCB8BD,
+ 0xB7BCBBB8, 0xBCB8BDBC, 0xBDBCB8BD, 0xB9BEBDB8,
+ 0xBFB8BEBD, 0xBEBCBAC0, 0xB7BCBAB9, 0xBEB9BFBE,
+ 0xBDBCB9BF, 0xB7BCBBB8, 0xBEBABFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEBABFBE, 0xBFBEBABF, 0xB9BFBEBA,
+ 0xC0B8C0C0, 0xBFBEB8C0, 0xBAC0BFB9, 0xBFB8C0C0,
+ 0xBDBCB7BF, 0xBAC0BFB7, 0xC1BABFC0, 0xC0C0BBC0,
+ 0xB8C0C0B8, 0xBFB9C1C0, 0xC1BEB8C0, 0xBBC0BEBA,
+ 0xBEBAC1BE, 0xC2BFBAC1, 0xBCC1BFBB, 0xBCBBC0BE,
+ 0xC0BEBBC1, 0xBBC0BEBB, 0xBEBDC0BE, 0xBFBDBBC0,
+ 0xBAC1BEBA, 0xBFBABFBD, 0xC0BDBCC1, 0xB4BBB8B9,
+ 0xB9BABEB9, 0xBDBBBABE, 0xBABDBBBA, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBCC0BBBB, 0xB4BCC0BB, 0xBFBAB5B9,
+ 0xBBBFBABB, 0xACB6BDB6, 0xAFAAACB3, 0xADB4ADA9,
+ 0xA9AEB3AA, 0xAFA6AEB4, 0xA8ADA4AA, 0xAAACB1A8,
+ 0xB3A8AEB3, 0xACB2A7AD, 0xA1A8B0A5, 0xB1A6A4AC,
+ 0xA6AEA4A9, 0xA2A6ABA2, 0xACA1A6AB, 0xA6ACA1A6,
+ 0x9FA8ACA1, 0xA99CA7AB, 0xA4AB9CA2, 0x97A2A99A,
+ 0xAB9CA0A8, 0xA0A798A4, 0x96A1A796, 0xA696A1A7,
+ 0xA5A898A3, 0x9AA6A99A, 0xA99AA6A9, 0xA4A99AA4,
+ 0x97A0A798, 0xA5969FA6, 0xA1A796A0, 0x96A0A695,
+ 0xA897A1A7, 0xA3A998A2, 0x95A0A695, 0xA695A0A6,
+ 0x9FA594A0, 0x9AA0A798, 0xA69BA0A7, 0x2E302AA2,
+ 0x00000100, 0x33310001, 0x93979232, 0x96989C97,
+ 0x9D98969D, 0x989C9699, 0x878F978D, 0x8F888991,
+ 0x89908988, 0x8A888F8A, 0x8E8C888F, 0x1E232189,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x2F020000, 0x49473230,
+ 0x4A484748, 0x383F3C38, 0x3C383F3C, 0x3D3C383F,
+ 0x30353430, 0x34303534, 0x37343037, 0x2F373430,
+ 0x34303734, 0x37343037, 0x343A3733, 0x37333B38,
+ 0x3A37323A, 0x373F3C38, 0x3C373F3C, 0x3F3C373F,
+ 0x373D3C38, 0x3D393C3B, 0x3E3B3740, 0x383F3C38,
+ 0x3B383F3C, 0x403C3740, 0x38403D39, 0x3B373F3C,
+ 0x3F3C383E, 0x3A3F3B3A, 0x3B3A3F3B, 0x3F3B3A3F,
+ 0x38373836, 0x39373638, 0x393A3838, 0x3C3F3D3C,
+ 0x3D3C413D, 0x3E3C3B3F, 0x2E32302F, 0x2E2D312F,
+ 0x312F2E30, 0x2F32332F, 0x332F3233, 0x34332F34,
+ 0x33363733, 0x37333637, 0x37373138, 0x37404138,
+ 0x41383F40, 0x3E413840, 0x00292B25, 0x03000204,
+ 0x02030002, 0x00000100, 0x01000001, 0x00000000,
+ 0x07080507, 0x05050805, 0x08060607, 0x00000100,
+ 0x02000001, 0x00010001, 0x00000100, 0x01000001,
+ 0x00010000, 0x08080808, 0x08080808, 0x08090708,
+ 0x00000100, 0x00000001, 0x02000002, 0x07080507,
+ 0x04090805, 0x06050708, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010200, 0x01000001, 0x01020000, 0x00000000,
+ 0x01000000, 0x05060200, 0x99676B66, 0x9F999B9F,
+ 0x9BA0979B, 0x989EA499, 0xA4989EA5, 0x9EA499A0,
+ 0x9B9FA59A, 0xA49A9DA5, 0x9A9F969C, 0x9AA2A69B,
+ 0xA3999FA5, 0x9FA79D9B, 0x99A3A99E, 0xA59A9EA4,
+ 0xA2A79E9F, 0x9CA1A69D, 0xA79D9EA6, 0x9FA59A9F,
+ 0xA0A3AA9D, 0xADA1A8AC, 0xA3A79BA9, 0xA0A6AA9E,
+ 0xADA0A6AD, 0xA3AA9DA6, 0xA2A6AA9F, 0xADA1A9AD,
+ 0xA9ADA1A9, 0xA3A6AA9F, 0xAFA2AAAE, 0xA8AFA2A8,
+ 0xA1A4AB9E, 0xADA2A7AE, 0xA9ADA2A9, 0xA2A7AEA1,
+ 0xADA2A8AF, 0xA7ADA2A7, 0xA4A4ACA1, 0xAFA5A7AF,
+ 0xA4ACA1A7, 0xA4ABB1A6, 0xAFA3ACB0, 0xADB1A6AB,
+ 0xAAAEB3AA, 0xAFA6AEB3, 0xACAFA6AC, 0xAEB0B4AE,
+ 0xB2ABB0B4, 0xABB2ABAB, 0xABADB4AD, 0xB3AEABB2,
+ 0xA9AFAAAD, 0xC0B1B5B0, 0xC3C1C1C5, 0xC1C4C2C0,
+ 0xB8BABEB9, 0xBEB9B8BF, 0xB8BCB7BA, 0xBABABDBB,
+ 0xB7B2B9BC, 0xB5BBB6B1, 0xBBB9BFBA, 0xBEB9BAC0,
+ 0xBBBFBABA, 0xBBBFC0BC, 0xBFB9BFC1, 0xBDC1BBBB,
+ 0xBABCC0BB, 0xBFBABBBF, 0xBBBFBABB, 0xB9B9BFBA,
+ 0xBFBAB8BE, 0xBBBFBABB, 0xBABABEB9, 0xBFBAB9BF,
+ 0xBBBFBABB, 0xBBBFC3BE, 0xBAB8BABD, 0xBABDBBB7,
+ 0xBABBBFBA, 0xBEB9BBBF, 0xBBBFBABA, 0xBDBBBEBC,
+ 0xBEBABCBF, 0xB8BCB7BD, 0xBDB8BBB9, 0xBDBBBCBF,
+ 0xBABDBBBC, 0xBCB9BEBC, 0xBEBDB7BD, 0xB9BEBCB8,
+ 0xBBB9BEBC, 0xBBB9B8BD, 0xBABDBBB8, 0xBABABDBB,
+ 0xBDBBB9BC, 0xB8BDBBBA, 0xB4B6BBB9, 0xB7B9AFB5,
+ 0xA5B1B3AB, 0xBDB1B9B9, 0xBABBB8BE, 0xB6BBBAB5,
+ 0xBDBBBDBD, 0xBEBCBCBF, 0xBCBFBDBB, 0xBCBBBEBC,
+ 0xBFBABBBE, 0xBBBFBABB, 0xBBB8BEB9, 0xBCBABABD,
+ 0xBCBFBDB9, 0xBAB9BFBA, 0xBFBAB9BF, 0x868C87B9,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000200, 0x00000002, 0xBE565B59, 0xC0BFBAC1,
+ 0xB8C0C0B8, 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BDBCBA,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBFB7BDBC,
+ 0xBFBEBAC0, 0xB7BDBCB9, 0xBCB8BDBC, 0xBDBCB8BD,
+ 0xB8BDBCB8, 0xBCB9BEBD, 0xBDBCB8BD, 0xB8BDBCB8,
+ 0xBDBAC0BF, 0xBDBBB8BE, 0xB8BDBBB8, 0xBFB9BFBE,
+ 0xBDBBBAC0, 0xB6BBB9B8, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEBABFBE, 0xBFBEBABF, 0xBAC0BFBA,
+ 0xBFBAC0BF, 0xBFBEB8C0, 0xB9BFBEB9, 0xBFB8C0BF,
+ 0xBDBCB8C0, 0xB7BDBCB7, 0xC0BABFC0, 0xC0C0BABF,
+ 0xB8C0C0B8, 0xBEB8C0BF, 0xC0BEBAC1, 0xBBC1BCBB,
+ 0xBEBAC1BE, 0xC0BEBAC1, 0xBBC0BEBB, 0xBCBBC1BC,
+ 0xC0BEBBC1, 0xBBC0BEBB, 0xBEBDC0BE, 0xC1BEBBC0,
+ 0xBAC1BEBA, 0xBFB9BEBC, 0xBFBDBCC1, 0xB7BCBABA,
+ 0xB9B7BBB6, 0xBEBCBABE, 0xBABDBBBB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBABEB9BB, 0xBABBBFBA, 0xC5C0BBBF,
+ 0xB5B9B4C1, 0xADA9B0A9, 0xB3AEADB4, 0xA9B0A9AC,
+ 0xA9ABB0A7, 0xAFA6AEB4, 0xABB0A7AA, 0xA8AEB3AA,
+ 0xB3A8ACB1, 0xADB3A8AD, 0xA1A9B2A5, 0xAFA4A5AE,
+ 0xA9B1A6A7, 0xA5A7ACA3, 0xAFA4A9AE, 0xA8ACA1AB,
+ 0xA0A8ACA1, 0xA89BA8AC, 0xA2A99AA1, 0x99A2A99A,
+ 0xA99AA2AA, 0xA3AA9BA2, 0x97A1A796, 0xA696A2A8,
+ 0xA6A999A3, 0x99A5A898, 0xA798A5A8, 0xA4A99AA2,
+ 0x98A0A798, 0xA798A0A7, 0xA3A899A2, 0x96A2A897,
+ 0xA695A1A7, 0xA0A695A0, 0x949EA493, 0xA6959FA5,
+ 0x9FA594A0, 0x97A0A897, 0xA7989FA6, 0xA2A69BA0,
+ 0x0030342F, 0x01000001, 0x00010000, 0x98999C9A,
+ 0x9B96999D, 0x989C9697, 0x878E968C, 0x90898891,
+ 0x88908989, 0x8A888F8A, 0x8D8B888F, 0x1E232188,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x01010002, 0x00020000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x01000000, 0x00000301,
+ 0x00000000, 0x00020000, 0x00000200, 0x02000002,
+ 0x00020000, 0x00000200, 0x02000002, 0x00020000,
+ 0x00000200, 0x02000002, 0x00020000, 0x01000201,
+ 0x02000002, 0x00020000, 0x00000200, 0x02000002,
+ 0x00020000, 0x00000200, 0x04000002, 0x01040000,
+ 0x00000500, 0x04000004, 0x00040000, 0x01000200,
+ 0x02000003, 0x00020000, 0x01010200, 0x02000003,
+ 0x01010002, 0x00000000, 0x00000000, 0x00020000,
+ 0x01000400, 0x03010003, 0x07080907, 0x09070809,
+ 0x08090708, 0x0D10110F, 0x100C0E12, 0x10110D0F,
+ 0x14181915, 0x1A141A1A, 0x3A37321A, 0x383F4037,
+ 0x40374041, 0x3E41383D, 0x4B4F514B, 0x2A264F51,
+ 0x292A2629, 0x2B2D2E2C, 0x01002A2D, 0x00000000,
+ 0x1E070406, 0x37371F1C, 0x1F1E1A39, 0x4D282925,
+ 0x514D5153, 0x51534D50, 0x4C51534D, 0x514B5052,
+ 0x51534D4F, 0x072C2D2B, 0x09050809, 0x08090508,
+ 0x00272824, 0x00000001, 0x02000002, 0x07070406,
+ 0x04060805, 0x08050707, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x01020000,
+ 0x00000200, 0x00000000, 0x33000000, 0x9F9A3035,
+ 0x99A09999, 0x989EA499, 0xA498A0A4, 0x9FA397A0,
+ 0x9B9AA095, 0xA59B9DA5, 0x9A9F969D, 0x9A9FA398,
+ 0xA49BA1A5, 0x9FA79D9F, 0x9EA2A89D, 0xA499A3A9,
+ 0xA0A89E9E, 0x9EA0A7A0, 0xA8A19EA5, 0x9FA79DA1,
+ 0x9DA3A79C, 0xACA0A5A9, 0xA5A99DA8, 0xA0A0A79A,
+ 0xADA0A6AD, 0xA6ADA0A6, 0xA0A6AA9F, 0xADA1A7AB,
+ 0xAAAEA2A9, 0x9FA7AB9F, 0xAEA1A7AB, 0xA8AFA2A7,
+ 0x9EA4AB9C, 0xADA2A4AB, 0xACB1A8A9, 0xA1A5ABA0,
+ 0xB0A6A4AC, 0xA9B1A7A8, 0xA1A5ADA2, 0xB1A7A4AC,
+ 0xA7AFA4A9, 0xA3AAAEA2, 0xB1A5ABAF, 0xABAFA4AD,
+ 0xA9ACB1A8, 0xB1A8ADB2, 0xABAEA5AE, 0xABADB2A9,
+ 0xB2ABADB1, 0xABB2ABAB, 0xACA9B0A9, 0xB4AFACB3,
+ 0xA9AFAAAE, 0xA1949892, 0xC2C0A3A7, 0xC0C3C1BF,
+ 0xB6B7BDB8, 0xBCB7B6BD, 0xB8BCB7B8, 0xBBBABDBB,
+ 0xBEB9BABD, 0xB5BBB6B8, 0xB9B9BFBA, 0xC0BBB8BE,
+ 0xBBBFBABC, 0xBBBFC0BC, 0xBEB8BFC1, 0xBBBFB9BA,
+ 0xBBBBBFBA, 0xC0BBBCC0, 0xBCC0BBBC, 0xBBB9BFBA,
+ 0xBEB9BAC0, 0xBBBFBABA, 0xB9B9BFBA, 0xBFBAB8BE,
+ 0xBBBFBABB, 0xB9BABEB9, 0xBBB6BABE, 0xB7BBB6B7,
+ 0xBABBBFBA, 0xC0BBBBBF, 0xBBBFBABC, 0xBDBDBEBC,
+ 0xBDB9BEBF, 0xB8BCB7BC, 0xBBB8BBB9, 0xBDBBBABD,
+ 0xB9BCBABC, 0xBCB9BEBC, 0xBDBCB8BF, 0xB8BEBDB7,
+ 0xBCB7BCBA, 0xBBB9B9BE, 0xBABDBBB8, 0xBBBABDBB,
+ 0xBEBCBABD, 0xB5BAB8B9, 0xBAB6BBB9, 0xACAEB3BB,
+ 0x9FABADA0, 0xBEB5BABB, 0xBEBDBABF, 0xB9BEBDB8,
+ 0xBDBABDBB, 0xC0BEBCBF, 0xBABDBBBD, 0xBDBABDBB,
+ 0xBEB9BCBF, 0xBBBFBABA, 0xBBB8BDBB, 0xBBB9B8BD,
+ 0xB8BCB7BA, 0xB9B9BFBA, 0xBFBAB8C0, 0x868C87B9,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBE565B59, 0xC0BFBAC1,
+ 0xB8C0C0B8, 0xBEB9BFBE, 0xBFBDBABF, 0xB8BDBBBA,
+ 0xBCB7BDBC, 0xBCBBB7BD, 0xB8BEBDB6, 0xBFB7BDBC,
+ 0xBDBCBAC0, 0xB7BDBCB7, 0xBBB7BDBC, 0xBCBBB6BC,
+ 0xB8BDBCB7, 0xBCBAC0BF, 0xBEBDB7BD, 0xB9BFBEB8,
+ 0xBEB8BEBD, 0xC0BFB9BF, 0xB7BDBCBA, 0xBEB9BFBE,
+ 0xBDBCB9BF, 0xB8BDBCB8, 0xBDB7BEBB, 0xBFBEB9C0,
+ 0xB9BFBEB9, 0xBDBABFBD, 0xC0BFBABF, 0xBAC0BFBA,
+ 0xBEBAC0BF, 0xC0BFB9BF, 0xBAC0BFBA, 0xC0BAC0BF,
+ 0xBEBDBBC1, 0xB5BABBB9, 0xBFB9BFBE, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEBAC0BF, 0xC0BEBAC1, 0xBBC0BEBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBCBAC1BC,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBDBBC0BE, 0xC1BEBABF,
+ 0xBAC1BEBA, 0xBEB9BEBC, 0xBFBDBBC0, 0xBABFBDBA,
+ 0xB6B7BBB6, 0xBCBAB7BB, 0xBBBEBCB9, 0xBCBBBEBC,
+ 0xBFBDBBBE, 0xBBBEBCBC, 0xBAC0C4BF, 0xB8B3BBBF,
+ 0xB0B4AFB4, 0xADADB4AD, 0xB1AAADB4, 0xA8B0A6A9,
+ 0xA9ADB3A8, 0xB1A8B0B4, 0xABADA7AE, 0xA9ADB2A9,
+ 0xB3A8ADB2, 0xADB3A8AD, 0xA4AAB0A5, 0xB1A4A9AF,
+ 0xAAB1A4AA, 0xA4A7ADA2, 0xAFA4A9AF, 0xA6ACA1A9,
+ 0xA0A9ADA1, 0xA99CA8AC, 0xA5AC9DA2, 0x9EA6AD9E,
+ 0xA99AA6AD, 0xA0A798A2, 0x9AA4A99A, 0xA696A4A9,
+ 0xA3A696A3, 0x96A3A696, 0xA897A3A6, 0xA3A998A2,
+ 0x98A0A897, 0xA798A0A7, 0xA2A798A2, 0x94A1A796,
+ 0xA5969FA5, 0xA0A596A0, 0x959EA394, 0xA7969FA4,
+ 0x9FA594A1, 0x97A0A798, 0xA7989FA6, 0xA0A79AA0,
+ 0x31919891, 0x01002E33, 0x00010000, 0x66000100,
+ 0x9B996568, 0x989C9798, 0x86909790, 0x918A8890,
+ 0x888F8A89, 0x89889089, 0x8F8A8890, 0x1E232189,
+ 0x01000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x01010100, 0x01010002, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00030101, 0x00000200, 0x00000002,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x02000001,
+ 0x00010001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000000, 0x00020001,
+ 0x00000200, 0x03010102, 0x00020000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00020000,
+ 0x00000400, 0x02000002, 0x060A0807, 0x302F0907,
+ 0x56575332, 0x50545551, 0x79735456, 0x78797079,
+ 0x6A75746A, 0x746A7674, 0x76746A76, 0x707B7971,
+ 0x79707879, 0x76797076, 0x70787970, 0x524C7879,
+ 0x4F514B52, 0x2B42433F, 0x01002C2D, 0x00000000,
+ 0x1C090707, 0x37331F1D, 0x50514838, 0x7250534A,
+ 0x7D72797D, 0x777B7079, 0x70787C71, 0x7C71787C,
+ 0x787C7178, 0x72787872, 0x78727878, 0x78787278,
+ 0x49787970, 0x514B5152, 0x51504C51, 0x05535150,
+ 0x05050806, 0x06060605, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000100, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000001, 0x35330000,
+ 0x9CA09B32, 0x9AA0A39A, 0xA498A1A5, 0xA0A498A0,
+ 0x9A9AA095, 0xA59A9DA5, 0x9FA59A9F, 0x9CA0A499,
+ 0xA59AA3A7, 0x9FA59A9F, 0x9DA2A89D, 0xA59BA2A8,
+ 0x9DA69C9D, 0xA0A0A8A1, 0xA5A09EA5, 0xA1A8A19F,
+ 0x9DA3A79C, 0xADA0A5A9, 0xA6AD9EA6, 0x9D9FA699,
+ 0xACA0A3AA, 0xA8ACA0A8, 0x9FA8ACA1, 0xADA1A6AA,
+ 0xA9ADA1A9, 0x9FA9ADA1, 0xADA1A7AB, 0xA9ADA1A9,
+ 0x9EA9AE9F, 0xAEA3A6AA, 0xA8ADA4AA, 0xA1A7ADA2,
+ 0xAFA5A4AC, 0xA7AFA5A7, 0xA3A8ADA4, 0xADA2A7AC,
+ 0xA7AFA4A5, 0xA3ABAFA3, 0xB0A3ABAF, 0xABB1A6A9,
+ 0xA6ACAFA6, 0xB3AAACAF, 0xAFB3A8B0, 0xA9AAB0A5,
+ 0xB1AAADB2, 0xAEB5AEAA, 0xA8ACB4AD, 0xB3AEA7AF,
+ 0xAEB4AFAD, 0xA1A4A8A2, 0xC3BFA3A7, 0xC0C4BFC2,
+ 0xB8B6BDB6, 0xBDB7B8BF, 0xBABBB7B9, 0xBBBABDBB,
+ 0xBCBABABD, 0xB9BFBAB7, 0xB9B6BCB7, 0xBFBAB9C0,
+ 0xBBBFBABB, 0xBBBDC1BC, 0xC0BBBCC0, 0xBBBFBABC,
+ 0xBABBBFBA, 0xBFB9BBBF, 0xBABEB8BB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xB9B9C0B9, 0xBFBAB9C0,
+ 0xBBBFBABB, 0xBBBABDBB, 0xBDBBBABD, 0xB7BAB8BA,
+ 0xBABBBFBA, 0xBFBABBBF, 0xB9BFBAB9, 0xBDBDC0BE,
+ 0xBBB9BCBF, 0xB8BBB9B8, 0xB9B8BCB7, 0xBDBBBABE,
+ 0xBABDBBBA, 0xBBB9BFBA, 0xBFBCB9C0, 0xB7BEBBB8,
+ 0xB8B9BEBC, 0xBEB9B5BA, 0xB9BFBAB8, 0xB9B7BDB8,
+ 0xBCBAB8BE, 0xB6BBB9B7, 0xB4B5BCB7, 0xACACAEB7,
+ 0xA7B0B3A0, 0xBEB2B7B8, 0xBEBDBABF, 0xB9BEBCB9,
+ 0xBBBABDBB, 0xBDBBBABD, 0xBCBFBDBA, 0xBCB9BEBC,
+ 0xBFBAB9BE, 0xBBBFBABB, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB7BBB6BC, 0xB9B9BFBA, 0xC0BBB8C0, 0x858C87B9,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBE565B59, 0xC0BFBAC1,
+ 0xBABFC0B8, 0xBEBABFBE, 0xBFBDBABF, 0xB8BDBBBA,
+ 0xBBB7BDBC, 0xBDBCB6BC, 0xB7BDBCB7, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB8BDBCB8, 0xBCB9BFBE, 0xBFBEB7BD, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBDBCB9BF, 0xB9BEBDB8, 0xBDB7BEBB, 0xBDBCB9C0,
+ 0xB7BDBCB7, 0xBDB8BDBB, 0xC0BFBABF, 0xB9BFBEBA,
+ 0xBDB9C0BD, 0xC0BFB9C0, 0xB9BFBEBA, 0xBEBAC1BE,
+ 0xBFBEBAC1, 0xB9BFBEBA, 0xBDB7BDBC, 0xC0C0B6BE,
+ 0xB8C0BFB8, 0xBFBAC1BE, 0xC0BEBBC2, 0xBABFBDBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBCBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BDBBC0,
+ 0xBBC0BEB9, 0xBDBCBFBD, 0xBFBDBCBF, 0xBABFBDBA,
+ 0xB6BABEB9, 0xBAB8B7BB, 0xBABDBBB7, 0xBCBBBEBC,
+ 0xC0BEBBBE, 0xBDC1BCBD, 0xB3C0C4BF, 0xB4AFB5B9,
+ 0xB0B4AEB0, 0xAEAFB3AD, 0xAFA8AEB5, 0xAEB6ACA8,
+ 0xA9ACB2A7, 0xB3AAB0B4, 0xACAFA6B0, 0xA8ACB1A8,
+ 0xB3A8ADB3, 0xADB3A8AD, 0xA5A9AFA4, 0xB1A4AAB0,
+ 0xA9B0A3AA, 0xA4A7ADA2, 0xADA2A9AF, 0xA6ADA0A7,
+ 0xA0A8ACA0, 0xAB9EA8AC, 0xA4AB9EA4, 0x9AA4AB9C,
+ 0xA99AA2A9, 0xA2A99AA2, 0x9BA4A99A, 0xA999A5AA,
+ 0xA6A999A6, 0x96A2A595, 0xA796A3A6, 0xA1A796A1,
+ 0x97A2A897, 0xA498A1A6, 0xA1A697A0, 0x93A0A596,
+ 0xA5969EA4, 0xA0A596A0, 0x98A0A596, 0xA596A2A7,
+ 0xA0A596A0, 0x98A0A798, 0xA697A0A7, 0xA0A79A9F,
+ 0x9191998F, 0x34309198, 0x00010033, 0x00000000,
+ 0x34340000, 0x989B9932, 0x899CA39C, 0x8E898990,
+ 0x89908B87, 0x88889089, 0x9089888F, 0x20241F89,
+ 0x01000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x00000000, 0x01000000, 0x00000000, 0x00000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00020000,
+ 0x01010200, 0x00000001, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00010000,
+ 0x00020000, 0x13120200, 0x14121115, 0x5B413D3C,
+ 0x3D395E5C, 0x5E5D593E, 0x787D7C78, 0x7C787D7C,
+ 0x7D7D777D, 0x70767872, 0x786F7679, 0x7A796F77,
+ 0x69767469, 0x74697674, 0x76746A76, 0x707A7870,
+ 0x79707879, 0x78797078, 0x70787970, 0x514B7879,
+ 0x4F514B51, 0x3F43453F, 0x01004243, 0x00010000,
+ 0x33080605, 0x504A3837, 0x50514850, 0x70505449,
+ 0x7B70787C, 0x787C7077, 0x6F787C70, 0x7C71777B,
+ 0x787C7178, 0x70787970, 0x786F7879, 0x78797077,
+ 0x70787970, 0x78727879, 0x78787278, 0x73787872,
+ 0x77737877, 0x76777378, 0x474A4945, 0x49484A48,
+ 0x1A18174B, 0x0412130F, 0x01000708, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x01000000,
+ 0x34353100, 0x996B6D67, 0xA3989FA2, 0x9EA4999D,
+ 0x9B999F94, 0xA499A0A6, 0x9FA59A9E, 0x9BA0A499,
+ 0xA79CA2A6, 0x9EA499A1, 0x9DA2A89D, 0xA89EA0A8,
+ 0x9BA49AA0, 0xA1A1A8A1, 0xA59FA1A8, 0xA3A89FA1,
+ 0x9CA5A89F, 0xAA9DA3A7, 0xA3AA9DA3, 0x9DA6ADA0,
+ 0xAB9FA3AA, 0xA8ACA0A7, 0xA0A9ADA2, 0xAA9EA7AB,
+ 0xAAAEA2A6, 0xA1A9ADA1, 0xADA1A9AD, 0xAAAEA2A9,
+ 0xA1A9ADA1, 0xAA9FA9AD, 0xA8ABA2A6, 0xA2AAB0A5,
+ 0xADA2A7AD, 0xABB1A6A7, 0xA6ABB0A7, 0xADA2ABB1,
+ 0xA7ADA2A7, 0xA5AAAEA2, 0xB0A3ADB1, 0xA9AFA4A9,
+ 0xA8A8ADA4, 0xB3AAACB1, 0xAAB0A5B0, 0xA9A6ACA1,
+ 0xB4AEADB2, 0xABB2ABB0, 0xABA9B0A9, 0xB1ABABB2,
+ 0xB0B4AEAD, 0xADB0B5AC, 0xB6B0B1B6, 0xC2C3BFB4,
+ 0xB6B9BDB7, 0xBCB6B8BC, 0xB9BDB8B8, 0xBBBABEB9,
+ 0xBEB9BABD, 0xB8BEB9B8, 0xB6B6BDB6, 0xBEB9B6BD,
+ 0xBBBFBABA, 0xBCBDC1BC, 0xBFBABDC1, 0xB8BCB7BB,
+ 0xBABBBFBA, 0xBFB9BBBF, 0xBBBFBABB, 0xB3BBBFBA,
+ 0xBEBCB4B8, 0xBBBFBABB, 0xB9BBBFBA, 0xBFBAB8BE,
+ 0xBBBFBABB, 0xBBBABDBB, 0xBDBBBABD, 0xB7BAB8BA,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBBBCBFBD,
+ 0xBBB9BABD, 0xB8BDBBB6, 0xBBB9BDB8, 0xBDBBBCC0,
+ 0xB8BDBBBA, 0xBCB9BEBC, 0xBFBCB8BF, 0xB8BDBBB8,
+ 0xB9B8BDBB, 0xBEB9B8BE, 0xB8BEB9B8, 0xB8B8BEB9,
+ 0xBDBBB7BD, 0xB6BBB9B8, 0xAFB5BCB7, 0xB5B5A9B2,
+ 0xAEB6B6AB, 0xBCB2B8B7, 0xBFBDB9BE, 0xBBBEBCBA,
+ 0xB9B9BCBA, 0xBCBAB8BB, 0xBABDBBB9, 0xBDB9BEBC,
+ 0xBFBABABF, 0xB9BFBAB9, 0xBBB8BDBB, 0xBDBBBABD,
+ 0xBCC0BBBA, 0xBAB9BFBA, 0xBEB9B9BF, 0x868C87B8,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0xBE565B59, 0xC0BFBAC1,
+ 0xBABFC0B8, 0xBDB9BEBD, 0xBEBDBBBD, 0xB9BEBDB9,
+ 0xBCB8BDBC, 0xBEBBB8BD, 0xB7BEBBB7, 0xBBB7BEBB,
+ 0xBFBEB7BE, 0xB9BFBEB9, 0xBEB9BFBE, 0xBEBBB9BF,
+ 0xB5BCB9B7, 0xBDB9C0BD, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB9BFBE,
+ 0xBBBAB7BD, 0xB8BDBCB6, 0xBDB7BEBB, 0xBCBBB9C0,
+ 0xB8BEBDB6, 0xBAB8BDBB, 0xBDBCB7BC, 0xBAC0BFB7,
+ 0xBDB9C0BD, 0xC0BFBABF, 0xBABFBEBB, 0xBDB9C0BD,
+ 0xBDBCB9C0, 0xBBC1C0B8, 0xBBB9BFBE, 0xBFBEB5BE,
+ 0xB9BFBEB9, 0xBDBABFBD, 0xC0BFBABF, 0xBAC0BFBA,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBABFBDBB, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBAB9BFBA, 0xBCB7B9BF, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xC4BFBBBF, 0xC0C4BFC0, 0xAAB3B7B1, 0xB2ACAEB3,
+ 0xAFB4ABAE, 0xAAB0B5AC, 0xB1A8AEB3, 0xAEB4A9AC,
+ 0xA8ACB3A6, 0xB2A9ADB3, 0xAEB1A8AF, 0xA8ADB1A6,
+ 0xB4A8B0B4, 0xABAFA3B0, 0xA6ABAFA4, 0xB2A5ADB1,
+ 0xA6ADA0AB, 0xA1A7AEA1, 0xAEA1A7AE, 0xA4AB9EA7,
+ 0x9AA4AB9E, 0xA99AA2A9, 0xA2A99AA2, 0x9EA2A99C,
+ 0xAA9DA4AB, 0xA2A99CA3, 0x9DA4A99A, 0xA99AA7AC,
+ 0xA5AA9BA4, 0x97A2A596, 0xA797A4A7, 0xA5A898A4,
+ 0x98A6A99A, 0xA69AA4A7, 0xA2A596A4, 0x939EA394,
+ 0xA6959EA4, 0xA0A695A0, 0x969EA695, 0xA5969EA5,
+ 0xA0A596A0, 0x96A0A596, 0xA091A0A5, 0x9EA2969B,
+ 0x99A0A498, 0xA29CA0A4, 0x20211DA0, 0x00000100,
+ 0x01010000, 0x00000001, 0x92919694, 0x97929197,
+ 0x91989190, 0x888B9087, 0x91888E91, 0x2627238E,
+ 0x01000000, 0x00000000, 0x00010000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000100, 0x09060509, 0x04090804,
+ 0x06050708, 0x00010200, 0x03000203, 0x2B2B2501,
+ 0x47525048, 0x7B73514F, 0x7D7B737D, 0x777A7772,
+ 0x7E757D7D, 0x797C737D, 0x747A7A74, 0x77717A7A,
+ 0x78787277, 0x747B7C73, 0x7B737C7D, 0x7D7B737D,
+ 0x7377786E, 0x7C727C7D, 0x7D7B737D, 0x737E7C74,
+ 0x76717B78, 0x7B797179, 0x717A7B71, 0x655F787C,
+ 0x5A5C5663, 0x3B5E605A, 0x01003F41, 0x00010000,
+ 0x36000100, 0x5852393A, 0x56595056, 0x72606158,
+ 0x7C737B7C, 0x7B7C727B, 0x6F797A70, 0x79707879,
+ 0x797A7178, 0x6F787872, 0x79737575, 0x79797379,
+ 0x6F77746F, 0x78727774, 0x78787278, 0x71797671,
+ 0x76717976, 0x77777179, 0x787F7C77, 0x7C787F7C,
+ 0x807D797F, 0x577B7B75, 0x483F5D60, 0x2A2C2645,
+ 0x07060705, 0x06060707, 0x05050506, 0x090A0808,
+ 0x08080A07, 0x08090708, 0x00000400, 0x04000004,
+ 0x00040000, 0x00000100, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00020000, 0x00000001,
+ 0x00010002, 0x6B000100, 0xA8A16C70, 0xA1A99FA1,
+ 0x989CA198, 0xA1989EA1, 0x9EA1989E, 0x9AA0A39A,
+ 0xA59CA0A3, 0x9EA39AA0, 0xA09DA59B, 0xA8A1A2AA,
+ 0x9FA79DA1, 0xA0A0A59C, 0xA89DA6A9, 0xA6AA9FA4,
+ 0x9DA7ABA0, 0xAAA1A2A8, 0xA7AAA1A7, 0x9EA7ADA2,
+ 0xAA9FA3A9, 0xA6ACA1A4, 0xA2A7AB9F, 0xABA0AAAE,
+ 0xA9ADA2A7, 0xA3A9AFA4, 0xACA0A9B0, 0xA8ACA0A8,
+ 0xA3ABB1A6, 0xA9A0A8AE, 0xA9ACA3A6, 0xA3ADB1A6,
+ 0xACA0ABAF, 0xACB0A4A8, 0xA5ACB0A5, 0xAFA3ADB1,
+ 0xA7AB9FAB, 0xA3ABAFA3, 0xB2A6ABAF, 0xABB2A5AE,
+ 0xA3A7ADA2, 0xACA3A5AD, 0xA7ACA3A7, 0xA6A8ADA4,
+ 0xB2ACAAAF, 0xAEB0AAAE, 0xADAEB0AA, 0xB0AAB1B3,
+ 0xAFB2A9AE, 0xAAB0B3AA, 0xB2ACB0B3, 0xC0C1BDB2,
+ 0xB6BCC0BA, 0xBCB6B8BC, 0xB9BDB8B8, 0xB9BABEB9,
+ 0xBFB8B8BE, 0xB8BFB8B8, 0xB6BABEB8, 0xBFB8B8BC,
+ 0xB9C0B9B8, 0xB9B9C0B9, 0xBDB8B9C0, 0xB7BDB8B7,
+ 0xB9BBBFBA, 0xBFBABABE, 0xBBBFBABB, 0xBBBABDBB,
+ 0xBCBCBABD, 0xBCBDBBBC, 0xBBBABDBB, 0xC0BEBABD,
+ 0xBDBEBCBF, 0xBBBABDBB, 0xBEB9BABD, 0xB3B7B2B8,
+ 0xB7B8BCB7, 0xBFB9BABB, 0xBEBFBBBD, 0xBBBCBFBD,
+ 0xBDBBB8BD, 0xBABDBBBA, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB9BEBCB9, 0xBBB8BDBB, 0xBDBBB8BD, 0xBABEB9B8,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xB7B7BEB7,
+ 0xBDB8B7BE, 0xB5BBB6B9, 0xB3B5BCB7, 0xB9B8AFB6,
+ 0xB1B7B6B1, 0xB8B5BAB8, 0xBDB8B9BD, 0xB9BDB8B9,
+ 0xBBBABDBB, 0xBCB7BABD, 0xBABEB9B8, 0xB8B7BDB8,
+ 0xBDB8B7BD, 0xB6BDB8B6, 0xBABAC0BB, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBFBEC1BF, 0xC1BFBEC1, 0x888B89BE,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0xBE565B5A, 0xC0C0BAC1,
+ 0xBABFC0B8, 0xBDB8BDBC, 0xBEBDBBBD, 0xB3B8B7B9,
+ 0xBEB6BBBA, 0xC0BDBABF, 0xB7BEBBB9, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBCB9BF,
+ 0xB6BDBAB8, 0xBDB7BEBB, 0xBDBCB9C0, 0xBAC0BFB7,
+ 0xBEB9BFBE, 0xBDBCB9BF, 0xB9BFBEB7, 0xBCB9BFBE,
+ 0xBAB9B7BD, 0xB8BDBCB5, 0xBDB7BEBB, 0xBFBEB9C0,
+ 0xBBC1C0B9, 0xBBBBC0BF, 0xBEBDB6BC, 0xB9BFBEB8,
+ 0xBDB8BDBC, 0xC0BFBABF, 0xBBC0BFBB, 0xBEB9C0BD,
+ 0xBFBEBAC1, 0xB9BFBEBA, 0xBCBAC1BE, 0xBEBBB6BF,
+ 0xB9C0BDB7, 0xBEBBC0BE, 0xBFC0BBC0, 0xB9BEBFBA,
+ 0xBEB9BFBE, 0xBEBDB9BF, 0xB9BEBDB9, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBCC1BFBB, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBABBBFBA, 0xBFBABBBF, 0xBABEB9BB,
+ 0xB9B9BFBA, 0xBFBAB8BE, 0xB8BCB7BB, 0xBFBBBFBA,
+ 0xC4BFC0C4, 0xB5B9B3C0, 0xACB0B4AE, 0xB4ABB0B5,
+ 0xAEB3AAAF, 0xAAB2B5AC, 0xB4A9B0B3, 0xB0B4A9B0,
+ 0xA9ADB4A7, 0xB3A8AEB4, 0xAEB2A7AD, 0xA5ACB0A4,
+ 0xB5A9ADB1, 0xA7AB9FB1, 0xA6ADB1A6, 0xB2A5ADB1,
+ 0xA9B0A3AB, 0xA1A7AEA1, 0xAEA1A7AE, 0xA4AB9EA7,
+ 0x9DA0A798, 0xAD9EA5AC, 0xA4AB9CA6, 0x9EA4AB9E,
+ 0xAC9FA4AB, 0x9FA699A5, 0x959FA495, 0xA4959FA4,
+ 0xA4A99A9F, 0x98A5A899, 0xAC9CA4A7, 0xA5A898A9,
+ 0x97A4A798, 0xA798A3A6, 0xA2A596A4, 0x96A0A695,
+ 0xA493A1A7, 0xA0A6959E, 0x97A0A897, 0xA798A0A8,
+ 0xA2A798A2, 0x93A2A897, 0xA3949EA4, 0xA4A798A0,
+ 0x99A2A596, 0xA39AA1A5, 0xA0A29CA0, 0x0030342F,
+ 0x00000001, 0x00000000, 0x94040606, 0x96949396,
+ 0x91979291, 0x878E9188, 0x91889091, 0x27272190,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x01000200, 0x00000000, 0x07070406, 0x05070805,
+ 0x2D2B2A08, 0x4B50524C, 0x7C735154, 0x7A7B7179,
+ 0x737D7C72, 0x7C717F7D, 0x7E7C717E, 0x707E7C74,
+ 0x796E7879, 0x797D7275, 0x727C7D74, 0x7B757A7B,
+ 0x7C7D747B, 0x6F7A7B72, 0x78707879, 0x7B7C737A,
+ 0x727B7C73, 0x7C73787B, 0x7D7E757B, 0x727D7A75,
+ 0x7B767A77, 0x7D7B737F, 0x716F7066, 0x706A787C,
+ 0x585C566C, 0x3B5E6158, 0x01003F41, 0x01020000,
+ 0x35000100, 0x5953393B, 0x56595057, 0x72606158,
+ 0x7D747A7B, 0x7B7C737C, 0x70787970, 0x78727879,
+ 0x7E7E7878, 0x73777771, 0x736F7979, 0x77767274,
+ 0x747C7975, 0x736F7978, 0x75756F74, 0x6F79776F,
+ 0x776F7977, 0x78766E79, 0x6F77746F, 0x76737774,
+ 0x7A77727B, 0x727A7B72, 0x7B70797D, 0x797C7377,
+ 0x4F797B75, 0x534F5253, 0x2D2E2A52, 0x08090706,
+ 0x08080A08, 0x08090708, 0x00020300, 0x04000004,
+ 0x00040000, 0x00000100, 0x00020000, 0x00000101,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x02000002, 0x00020000, 0x00000200,
+ 0x00010002, 0x00000100, 0x716C0001, 0xA1A8A16B,
+ 0x989CA09A, 0xA1989EA1, 0x9EA1989E, 0x9AA1A49B,
+ 0xA49BA0A3, 0xA0A59C9F, 0x9F9DA59B, 0xA8A1A1A9,
+ 0xA3A89FA1, 0x9EA2A69B, 0xA79DA7A8, 0xA4A89DA6,
+ 0x9EA7ABA0, 0xA79EA2A7, 0xA7AAA1A4, 0xA1A3A99E,
+ 0xAA9FA6AC, 0xA5ABA0A4, 0xA1A9ADA1, 0xABA0A9AD,
+ 0xA7ABA0A7, 0xA4A7ADA2, 0xADA1A9AF, 0xA5ABA0A9,
+ 0xA2ACB1A8, 0xABA2A6AB, 0xA9ACA3A8, 0xA3ADB1A6,
+ 0xB0A4ABAF, 0xAAACA0AE, 0xA6AEB2A6, 0xB1A5AEB2,
+ 0xABAFA3AD, 0xA5ABAFA3, 0xB1A5ADB1, 0xABB2A5AD,
+ 0xA4A9AFA4, 0xAFA5A7AF, 0xA9B1A7A7, 0xA8AAAEA8,
+ 0xAFA6AAAE, 0xADAFA9AC, 0xADB1B1AB, 0xB4ABB3B3,
+ 0xB1B2A9B3, 0xAAB0B4A9, 0xB2ACB0B3, 0xB8BAB4B2,
+ 0xB8BEC2BC, 0xBCB7BABE, 0xB9BDB8B8, 0xB9B8BEB9,
+ 0xBFB8B8BE, 0xB7BEB7B8, 0xB7BBBFB9, 0xBEB7B9BD,
+ 0xB9C0B9B7, 0xB9B9C0B9, 0xBEB7B9C0, 0xB7BDB8B7,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBCBBBEBC,
+ 0xBBBBBABC, 0xC0C0C0BB, 0xBBBABCBC, 0xBFBDB9BB,
+ 0xBEBFBDBE, 0xBABABDBB, 0xBEB9B9BC, 0xB7BBB6B8,
+ 0xBBB7BBB6, 0xBFBBBEBF, 0xB8BCB7BE, 0xBCBABDBB,
+ 0xBDBBBBBE, 0xBABDBBBA, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB9BFBABB, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BCB7BA,
+ 0xB9BBBFB9, 0xBFBABBBF, 0xBBBFBABB, 0xB8B8BFB8,
+ 0xBEB9B8BF, 0xB6BCB7BA, 0xB7B5BBB6, 0xBDBAB5BC,
+ 0xB4B9B7B6, 0xB8B6BAB5, 0xBCB8B9BD, 0xBBBCB8BB,
+ 0xBBBABDBB, 0xBCB7BABD, 0xB8BCB7B8, 0xB7B7BDB8,
+ 0xB7B2B6BC, 0xB4BBB6B0, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB9BFBAB9, 0xC0C0C0C0, 0xC1BFC0C0, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0xBE555A59, 0xC0C0BAC1,
+ 0xBBC0C1B8, 0xBDB9BEBD, 0xBFBEBBBD, 0xB3B8B7BA,
+ 0xBDB6BBB9, 0xBFBDBABF, 0xBABFBDBA, 0xBEB7BDBC,
+ 0xBFBEB9BF, 0xB8BEBDB9, 0xBFB8BEBD, 0xBEBBBAC0,
+ 0xB8BFBCB7, 0xBDB7BEBB, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xBEB9BEBF, 0xBDBCB9BF, 0xB8BDBBB8, 0xBDB8BDBB,
+ 0xBDBBBABF, 0xB9BEBCB8, 0xBEB7BDBC, 0xBFC0B9BF,
+ 0xB9BFBEBA, 0xBCB6BCBB, 0xBCBBB7BD, 0xBAC0BFB6,
+ 0xBFB9BEBD, 0xC0BFBBC0, 0xBBC0BFBB, 0xBFB9BFBE,
+ 0xBFBDBAC0, 0xB9C0BDBA, 0xBDBBC1C0, 0xBEBBB7C0,
+ 0xB7BCBAB7, 0xBEBCBFBD, 0xBFC0BBC0, 0xB8C0C0BA,
+ 0xBFB8C0BF, 0xBFBEB8C0, 0xBAC0BFB9, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBDC0BEBB, 0xBABABDBB, 0xBFBDBBBF,
+ 0xBCBFBDBC, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBCBABDBB, 0xBFBABBBE, 0xBBBFBABB, 0xBABABEB9,
+ 0xB9B4BBBF, 0xB0B4AEB5, 0xACAEB5AE, 0xB6ACAEB6,
+ 0xADB2A9AE, 0xACB3B6AD, 0xB3A9B2B5, 0xAEB2A7B2,
+ 0xA7ACB4A9, 0xB2A7AAB2, 0xACB2A7AC, 0x9EADB1A5,
+ 0xB0A1A8AD, 0xADB0A1AD, 0xA5ADB1A5, 0xAFA3ADB1,
+ 0xABAFA3AB, 0xA1A7AB9F, 0xADA1A9AD, 0xA5A99DA9,
+ 0x9EA4AB9C, 0xAD9EA6AD, 0xA6ADA0A6, 0x98A3AA9B,
+ 0xA99AA0A7, 0xA2A99AA2, 0x95A3AA9B, 0xA79B9DA4,
+ 0xA4A89CA3, 0x99A5A899, 0xA798A5A8, 0xA4A798A4,
+ 0x98A5A899, 0xA597A4A7, 0xA4A797A5, 0x97A2A897,
+ 0xA895A2A8, 0xA0A693A2, 0x97A0A693, 0xA798A2A8,
+ 0xA0A596A2, 0x939DA392, 0xA6969EA4, 0xA0A394A3,
+ 0x989FA495, 0xA499A0A4, 0x9FA59AA0, 0x2F91998F,
+ 0x01002E34, 0x02000000, 0x07070406, 0x35350605,
+ 0x94989333, 0x878E9188, 0x91889091, 0x28282290,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x00020000, 0x01000200, 0x00010000,
+ 0x00000000, 0x00000000, 0x02000000, 0x00020000,
+ 0x00000200, 0x26242302, 0x4F2D2B2A, 0x77735250,
+ 0x7878727A, 0x70797D72, 0x7B70767D, 0x7A7B7177,
+ 0x717D7C72, 0x7C717E7C, 0x807C7180, 0x757F7D75,
+ 0x7C737D7E, 0x7B7C737B, 0x767A7A74, 0x7C737C7C,
+ 0x7A7D7479, 0x73787970, 0x7C737B7C, 0x7B7C737B,
+ 0x707B7C73, 0x7E757879, 0x7B7C737D, 0x737D7A75,
+ 0x79717B78, 0x7D7C727B, 0x717A7C70, 0x7269787C,
+ 0x5A5D546F, 0x3B606158, 0x01004141, 0x00010000,
+ 0x34000100, 0x5852383A, 0x55584F56, 0x735F6057,
+ 0x7C727B7C, 0x7B7C727B, 0x727D7B73, 0x7B767C7A,
+ 0x7D7A757E, 0x6F787970, 0x756F7778, 0x77767275,
+ 0x73787773, 0x74707877, 0x7A7A7475, 0x6F7C7A72,
+ 0x776F7977, 0x79776F79, 0x6C76746C, 0x79747674,
+ 0x7B78737D, 0x707A7B72, 0x7C71777B, 0x787C7178,
+ 0x71797D72, 0x7B71787C, 0x7A7B727A, 0x5480807A,
+ 0x302C5958, 0x08090531, 0x00010200, 0x03000304,
+ 0x00030100, 0x00010101, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00010101, 0x00000000,
+ 0x00000000, 0x00010101, 0x01000001, 0x6C706B00,
+ 0x98B8BBB2, 0xA1989EA1, 0x9EA1989E, 0x9AA0A39A,
+ 0xA299A0A3, 0xA3A89F9D, 0x9D9CA49A, 0xA79D9FA7,
+ 0xA3A89F9F, 0x9EA4A89D, 0xA99FA7A8, 0xA4A79EA8,
+ 0xA0A6A9A0, 0xA79EA4A9, 0xA5AAA1A2, 0xA0A5ABA0,
+ 0xAA9FA5AB, 0xA5ABA0A4, 0xA1A9ADA1, 0xADA2A9AD,
+ 0xA6AA9FA9, 0xA1A6ADA0, 0xADA2A7AE, 0xA6ACA1A7,
+ 0xA4A4A9A0, 0xB0A7A6AE, 0xA6ABA2AB, 0xA6ABAFA4,
+ 0xB1A5ADB1, 0xA8ACA0AD, 0xA4ABAFA3, 0xB3A4ACB0,
+ 0xAFB2A3B0, 0xA5A8ACA0, 0xB1A5ADB1, 0xA8AFA2AD,
+ 0xA2A6ACA1, 0xB1A7A5AD, 0xA5ADA3A8, 0xAAABB0A7,
+ 0xAEA8AEB3, 0xACAEA8AA, 0xABB0B0AA, 0xB4ABB3B4,
+ 0xB1B4ABB1, 0xAAB0B3AA, 0xB2ACB0B3, 0xB0B2ACB0,
+ 0xB8BABEB8, 0xBEB9BABE, 0xB8BCB7BA, 0xB9B6BCB7,
+ 0xBEB9B8BE, 0xB8BFB8B8, 0xB7B9C0B9, 0xBEB7B7BE,
+ 0xB8BFB8B7, 0xB8B8BFB8, 0xBFB8B8BF, 0xB8BFB8B8,
+ 0xB9BBBFB9, 0xBFB9BBBF, 0xBBBFBABB, 0xB5BABDBB,
+ 0xBCBCB4B7, 0xC0C0C0BC, 0xBABCBEBE, 0xBCBCB8BA,
+ 0xBCBEBEBA, 0xBBBABDBB, 0xBEB9BABD, 0xB7BBB6BA,
+ 0xBBB9BDB7, 0xBAB8BCC0, 0xB0B5B4B5, 0xB7B8BBB9,
+ 0xBDB9BABB, 0xBCBDB9BC, 0xBABCC0BB, 0xBFB9BBBF,
+ 0xBBBFBABB, 0xBBBABDBB, 0xBDBBBABD, 0xB8BCB7BA,
+ 0xB9BBBFB9, 0xBFBABBBF, 0xBBBFBABB, 0xB8B8BFB8,
+ 0xBEB9B8BF, 0xB7BDB8B8, 0xB7B7BDB8, 0xBBB9B6BC,
+ 0xB5BAB8B6, 0xB7B7BBB6, 0xBDB7BABB, 0xBBBCB8BB,
+ 0xBABABDBB, 0xBCB7B7BC, 0xB8BCB7B8, 0xB8B7BEB7,
+ 0xB8B3B7BD, 0xB6BDBAB1, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB9BFBAB9, 0xC1C0C0C0, 0xC1BFC1C1, 0x8A8B89C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0xBF565B5A, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBEBBBDBD, 0xBEBDBCBE, 0xB9BEBDB9,
+ 0xBEB8BDBB, 0xBEBCBBC0, 0xBABFBDB9, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xBAC0BFB8, 0xBDB9BFBE, 0xBEBBB8BE,
+ 0xB9C0BDB7, 0xBDB8BFBC, 0xBDBCB9C0, 0xB9BFBEB7,
+ 0xBEB9BFBE, 0xBDBCB9BF, 0xB8BDBBB8, 0xBDBABFBD,
+ 0xC0BEBABF, 0xB6BBB9BB, 0xBCB4BAB9, 0xBEBFB7BD,
+ 0xB9BFBEB9, 0xBFB7BDBC, 0xBCBBBAC0, 0xB7BDBCB6,
+ 0xBEBABFBE, 0xBFBEBABF, 0xB9BEBDBA, 0xBFB9BFBE,
+ 0xBDBBBBC0, 0xBABFBDB8, 0xBDB8BEBD, 0xC0BDB7C0,
+ 0xB8BDBBB9, 0xBEBABDBB, 0xBFC0BABF, 0xB9C1C1BA,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xBAC0BFBA, 0xBFBBC1C0,
+ 0xBFBFBBC0, 0xBDC0BEBD, 0xBABBBFBA, 0xBFBDBBBF,
+ 0xBCC0BBBC, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBBBBBEBC, 0xC1BCBABD, 0xC0C4BFBD, 0xB0C1C5C0,
+ 0xB4AFB1B5, 0xB0B4AEB0, 0xADAEB6AC, 0xB6ACAFB7,
+ 0xAEB6ACAE, 0xACADB2A9, 0xB4A9B2B5, 0xAEB2A7B0,
+ 0xA7ABB3A8, 0xB4A9AAB2, 0xADB4A7AE, 0xA3B0B4A8,
+ 0xAD9EADB2, 0xAFB2A3AA, 0xA3ACB0A4, 0xAFA3ABAF,
+ 0xABAFA3AB, 0x9FA8ACA0, 0xAA9EA7AB, 0xA5AA9BA6,
+ 0x9DA6AD9E, 0xA99AA5AC, 0xA2A99CA2, 0x9AA2A99A,
+ 0xA99AA2A9, 0xA2A99AA2, 0x95A2A99A, 0xA89C9DA4,
+ 0xA4A89CA4, 0x99A4A798, 0xA697A5A8, 0xA6A99AA3,
+ 0x97A8AB9C, 0xA797A4A7, 0xA4A797A6, 0x95A0A695,
+ 0xA693A0A6, 0xA1A794A0, 0x95A0A693, 0xA493A0A6,
+ 0x9EA4939E, 0x979EA493, 0xA595A2A8, 0xA0A596A2,
+ 0x989FA697, 0xA4989EA5, 0x9DA398A0, 0x91919A90,
+ 0x332E9098, 0x0200002F, 0x06080507, 0x06060704,
+ 0x33363406, 0x888E908A, 0x908A8E91, 0x28272390,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00020000, 0x01000200,
+ 0x00010000, 0x00020000, 0x01000200, 0x01020000,
+ 0x00000100, 0x01000200, 0x09070603, 0x46262423,
+ 0x6C684947, 0x6D6D676D, 0x73787773, 0x77727979,
+ 0x7879707A, 0x70787C70, 0x7B71787C, 0x7A7B717A,
+ 0x717D7D71, 0x7C717E7C, 0x7F7D7380, 0x75828078,
+ 0x7E757D7E, 0x7879707D, 0x76787872, 0x7D747C7C,
+ 0x7679707C, 0x787D7E75, 0x7E758081, 0x7B7C737D,
+ 0x757A7B72, 0x7C737D7E, 0x7B7C737B, 0x737A7772,
+ 0x7B737B78, 0x7B7C727D, 0x717B7C72, 0x7B72777A,
+ 0x5A5D5478, 0x3B5D5F59, 0x01003F41, 0x00010000,
+ 0x36000100, 0x5852393A, 0x57595356, 0x8060605A,
+ 0x7C738889, 0x7B7C727B, 0x707F7D75, 0x77727A78,
+ 0x7A77727A, 0x6F787872, 0x756F7778, 0x77767275,
+ 0x72787773, 0x7B777573, 0x7C7B777A, 0x6D797671,
+ 0x776F7775, 0x77756D79, 0x6E76746C, 0x78737673,
+ 0x7A77727B, 0x717A7B72, 0x7B72787C, 0x787C7178,
+ 0x70787C70, 0x7C70787C, 0x797A707A, 0x77808178,
+ 0x807A7F80, 0x7F7F7980, 0x4B737470, 0x29254E4F,
+ 0x03040228, 0x00000100, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x01000001, 0x01010000,
+ 0x00000000, 0x00000000, 0x01000000, 0x01020000,
+ 0xB16A6C66, 0xA09AB7BA, 0x9EA1989E, 0x99A2A59C,
+ 0xA297A0A4, 0xA1A69D9E, 0x9C9FA49B, 0xA59B9EA6,
+ 0xA1A99F9D, 0x9AA4AA9F, 0xA9A0A1A5, 0xA4A79EA6,
+ 0xA1A2A79E, 0xA79EA5AA, 0x9EA39AA2, 0x9EA4AA9F,
+ 0xABA0A3A9, 0xA2A89DA5, 0xA2A9ADA2, 0xADA2A9AD,
+ 0xA6AA9FA9, 0xA1A6ACA1, 0xADA2A7AE, 0xA6ACA1A7,
+ 0xA7A4AA9F, 0xADA4ABB0, 0xA8ADA4A8, 0xA6A7ABA0,
+ 0xB1A6ADB1, 0xABAFA3AD, 0xA5A8ACA0, 0xB2A3ADB1,
+ 0xABB0A1AF, 0xA3A8ACA0, 0xB0A4A9B0, 0xABB1A6AC,
+ 0xA3A9B1A6, 0xB1A7A5AD, 0xA9B1A7A9, 0xA6A7ACA3,
+ 0xAEA5AAAF, 0xAAAFA6A9, 0xA8AFB2A9, 0xB4ABAEB1,
+ 0xB1B4ABB1, 0xA2AEB3AA, 0xB2ACA6AB, 0xAEB2ACAE,
+ 0xB8B8BCB6, 0xBEB9BABE, 0xBABEB9BA, 0xB8B6BCB7,
+ 0xBEB9B7BD, 0xB7BDB8B8, 0xB7B8BFB8, 0xBDB6B7BE,
+ 0xB7BEB7B6, 0xB7B7BDB8, 0xBFB8B7BE, 0xB8BFB8B8,
+ 0xB9BBBFB9, 0xBFB9BBBF, 0xBBBFBABB, 0xB1BABEB9,
+ 0xBDBBB0B3, 0xBEC1BFBA, 0xB8BEC1BF, 0xBBB9B7BA,
+ 0xBCBFBDB8, 0xBABABDBB, 0xBEB9B9BC, 0xBABEB9BA,
+ 0xBBB8BCB6, 0xB9B7B9C0, 0xB1B9B9AE, 0xB7B6BBB9,
+ 0xBCB8BABB, 0xBCBDB9BB, 0xBABBBFBA, 0xBFB9BBBF,
+ 0xBDBEBABD, 0xBBBABEB9, 0xBDBBBABD, 0xBABDBBBA,
+ 0xB9BBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xB9B8BEB9,
+ 0xBEB9B8BE, 0xB8BEB9B8, 0xB6B8BCB7, 0xBBB9B7BB,
+ 0xB3B6B4B6, 0xB8B7BBB6, 0xBCB8BBBC, 0xB9BDB8BB,
+ 0xB9B8BEB9, 0xBCB7B6BB, 0xB8BCB7B8, 0xB8B8BCB7,
+ 0xBCBAB7BD, 0xB7BCBAB7, 0xBABBBEBC, 0xBFBABBBF,
+ 0xB9BFBABB, 0xBFBEC1BF, 0xC1BFBEC1, 0x888B89BE,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0595E5D, 0xC0C0BCC1,
+ 0xBEC0C0BE, 0xBCBCBEBE, 0xBAB9B9BE, 0xB6BCBBB4,
+ 0xBBB8BDBB, 0xBDBBBABD, 0xB8BDBCB8, 0xBEBABFC0,
+ 0xBFBEB8BD, 0xB9BFBEB9, 0xBEBAC0BF, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9,
+ 0xBAB8BDBC, 0xBDBCB6BB, 0xB8BDBCB8, 0xBAB9C0BD,
+ 0xBCBBB6BD, 0xB7BCBBB7, 0xBDB8BFBC, 0xBFBEB9C0,
+ 0xBABFBEBA, 0xBDBAC0BF, 0xBCBBB9C0, 0xB6BCBBB4,
+ 0xBCB9BEBC, 0xC0BDB9BE, 0xB9C0BDB9, 0xBDBABFBD,
+ 0xBBBBBABF, 0xBCBEBEB9, 0xBEB9C0BD, 0xC1BEB8C1,
+ 0xBBC0BFBA, 0xBCBABCBC, 0xBEBFB8BD, 0xB7BFBFB9,
+ 0xBEBAC0BF, 0xC0BEBAC1, 0xBBC0BEBB, 0xBDBBC0BF,
+ 0xBFBDB9BE, 0xBCBFBDBC, 0xBABCC0BB, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB9BBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBBBBBFBA, 0xC4BFBCC0, 0xC1C5C0C0, 0xA8B4B8B2,
+ 0xB0A9AAAE, 0xAEB5AEA9, 0xA9ADB5AB, 0xB4AAACB4,
+ 0xACB4AAAC, 0xA8ABB3A8, 0xB5AAADB3, 0xAAB0A5AF,
+ 0xA4ABB2A5, 0xB1A5AAB1, 0xADB1A5AD, 0xA8ADB1A5,
+ 0xAFA3B0B4, 0xADB1A5AB, 0xA3AFB0A6, 0xADA3ACAD,
+ 0xACAEA2AC, 0x9AA8ACA0, 0xAFA0A4A9, 0xA6AD9EAA,
+ 0x99A2A99A, 0xA899A1A8, 0xA2A99AA1, 0x9AA4AB9C,
+ 0xA899A2A9, 0xA0A798A1, 0x98A0A798, 0x9F90A0A7,
+ 0x878E7F98, 0x99A0A596, 0xA99AA3A8, 0xA5A899A6,
+ 0x97A2A897, 0xA696A2A8, 0xA1A592A3, 0x929EA491,
+ 0xA6939FA5, 0xA1A592A2, 0x909DA090, 0xA3939DA0,
+ 0x9CA291A0, 0x97A0A596, 0xA5969FA6, 0xA0A596A0,
+ 0x969BA293, 0xA5999EA5, 0x9EA499A1, 0x9A98A099,
+ 0x9E9C989F, 0x1E211F99, 0x01000000, 0x02000101,
+ 0x00010001, 0x7A000100, 0x7E7C7D7E, 0x292A287D,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x01000000, 0x00010000,
+ 0x26040300, 0x534B2E2B, 0x7D7B7355, 0x7981817B,
+ 0x7A757F7F, 0x7A78707D, 0x6A76736E, 0x746F726F,
+ 0x7C7A7277, 0x7276776D, 0x7B717B7C, 0x8281777C,
+ 0x77807F75, 0x81778281, 0x807E7682, 0x7B7D7E75,
+ 0x7E758181, 0x7C7D747D, 0x777E7B76, 0x7C737D7D,
+ 0x78796F7B, 0x737A7B72, 0x7E747B7C, 0x7D7E747D,
+ 0x727B7C72, 0x79707B7C, 0x7A7B7278, 0x727B7B75,
+ 0x7C737878, 0x7D7E757B, 0x817A7A74, 0x79758685,
+ 0x62645E7A, 0x3F62635F, 0x04004044, 0x02030100,
+ 0x3B000000, 0x59573D3B, 0x58595758, 0x82656460,
+ 0x7E758888, 0x898A817D, 0x767F7C77, 0x77737E7B,
+ 0x7A77727A, 0x74787872, 0x79757A7A, 0x7A79757A,
+ 0x73787773, 0x78777877, 0x7B7A767A, 0x7077746F,
+ 0x766E7875, 0x79776F78, 0x73767670, 0x77737877,
+ 0x75756F78, 0x70787970, 0x79737879, 0x7D7D7779,
+ 0x6F7B7C73, 0x796F7879, 0x7C7D7478, 0x757C7D74,
+ 0x786F7D7E, 0x7D7E7577, 0x7F7E7E78, 0x7E788585,
+ 0x6E6F6B7E, 0x2A52534F, 0x06022D2E, 0x05060405,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x31020100, 0x9B973635, 0x9A9C969A, 0x98A0A499,
+ 0xA599A0A4, 0x9FA398A1, 0x97A1A59A, 0xA59E9BA0,
+ 0xA0A8A19E, 0x9CA2AAA0, 0xA99F9FA7, 0xA2A9A2A1,
+ 0xA2A2A6A0, 0xA8A2A4A8, 0xA1A69DA4, 0x9FA5A99E,
+ 0xABA2A6AA, 0xA6A9A0A8, 0xA2A8ABA2, 0xABA2A8AB,
+ 0xA8AEA3A6, 0xA0A6AA9F, 0xABA2A7AB, 0xA6ACA1A6,
+ 0xA2A6ACA1, 0xAEA5A7AD, 0xA9AEA5A9, 0xA4A6ACA1,
+ 0xAEA5A9AF, 0xA9AFA4A9, 0xA1A8ACA0, 0xB1A5ABB0,
+ 0xADB1A5AD, 0xA1AAB0A5, 0xADA2A4AC, 0xA9B1A6A7,
+ 0xA5A9B1A7, 0xADA3A7AF, 0xACB1A8A5, 0xA3A6ACA1,
+ 0xB1A5A9B0, 0xA9AFA4AD, 0xABABAFA9, 0xAFA9ADB1,
+ 0xADB2A9AD, 0xA6ACB4AA, 0xB0A6A9B1, 0xABB3A9A8,
+ 0xB7ADB4AD, 0xBBB5B7BE, 0xB8BCB6B7, 0xB7BBBFBA,
+ 0xBFB9B8BC, 0xBCC0BABB, 0xB8B7BEB7, 0xBEB7B8BF,
+ 0xB8BFB8B7, 0xB8BABEB8, 0xBEB8BABE, 0xBABEB8BA,
+ 0xBABBBFB9, 0xBFBABBBF, 0xBDC1BCBB, 0xA8B8BEB9,
+ 0xB3AEA7AD, 0xB9BFBAAD, 0xBAB9BFBA, 0xBEB9B9BF,
+ 0xB7BDB8B8, 0xBBB9BFBA, 0xBEBCBCC0, 0xBCC0BBBB,
+ 0xBBB9C0B9, 0xB5B4B7C1, 0xA7B5B4A5, 0xBBB5BCB9,
+ 0xC0BABCC0, 0xBDBFB9BE, 0xB9BBBFB9, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBEBCBBBF, 0xBBBEBCBB,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBBBABEB9,
+ 0xBDBBBABD, 0xBABDBBBA, 0xBAB5BBB6, 0xBDBBB9BF,
+ 0xB2B5B3BA, 0xB9B9BCBA, 0xBCB7BABE, 0xBABEB9B8,
+ 0xB8B7BDB8, 0xBAB8B7BD, 0xB9BDB8B7, 0xB8B8BCB7,
+ 0xBDBBB9BD, 0xBABDBBBA, 0xBBBABDBB, 0xBEB9BABD,
+ 0xB8BEB9BA, 0xBAB9BFBA, 0xBFBAB9BF, 0x868C87B9,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0595E5D, 0xC0C0BCC1,
+ 0xC0C0C0C0, 0xBEBCBFBD, 0xBEBDBBC0, 0xB7BEBBB8,
+ 0xB9B8BEB9, 0xBDBBBABE, 0xB8BDBCB8, 0xBFB9BEBF,
+ 0xBFBEB9BE, 0xB7BDBCB9, 0xBEB6BCBB, 0xBFBEB9BF,
+ 0xB8BEBDB9, 0xBEB9BFBE, 0xC0BFB9BF, 0xB7BEBBBA,
+ 0xBEB7BCBA, 0xBFBEBBC0, 0xB8BEBDBA, 0xBCB9C0BD,
+ 0xBFBEB8BF, 0xBABFBEBA, 0xBDB7BEBB, 0xBFBEB9C0,
+ 0xB9BFBEB9, 0xBDB9C0BD, 0xBCBBB9C0, 0xB5BDBCB4,
+ 0xBDB9C0BD, 0xC0BDBABF, 0xBAC1BEB9, 0xBDBABFBD,
+ 0xBEBEBABF, 0xBCBEBEBC, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xBAC0BFB9, 0xBCBABFBE, 0xBDBCB8BD, 0xB8C0BFB7,
+ 0xBEBAC1BE, 0xC0BEBAC1, 0xBABFBDBB, 0xBDBABFBE,
+ 0xC0BEB9BE, 0xBCBFBDBD, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB9BBBFB9, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBFBABEB9, 0xC4BFC0C4, 0xB5B9B4C0, 0xACB0B4AE,
+ 0xB1AAAEB2, 0xABB3A9AA, 0xAAACB4AA, 0xB5ABADB5,
+ 0xACB4AAAD, 0xA8ABB3A8, 0xB4A9ABB3, 0xACB2A7AE,
+ 0xA8ADB1A5, 0xB1A5B0B4, 0xABAFA3AD, 0xA5ADB1A5,
+ 0xACA0ADB1, 0xADB1A5A8, 0xA3ADAEA4, 0xADA3ACAD,
+ 0xA6AA9EAC, 0xA1A7AC9D, 0xAFA0ABB0, 0xA5AC9DA8,
+ 0x9CA4AB9C, 0xAB9CA4AB, 0xA2A99AA4, 0x9AA4AB9C,
+ 0xAB9CA2A9, 0x9FA697A4, 0x98A1A899, 0xA798A0A7,
+ 0xA1A899A0, 0x96A0A596, 0xA596A0A5, 0xA2A596A2,
+ 0x939FA594, 0xA5929EA4, 0xA1A592A1, 0x92A0A693,
+ 0xA4919FA5, 0xA1A592A0, 0x95A1A494, 0xA595A2A5,
+ 0xA0A393A2, 0x98A0A596, 0xA4989EA5, 0xA0A498A0,
+ 0x969DA495, 0xA4989EA5, 0x9CA297A0, 0x9A98A099,
+ 0xA09B989F, 0x999F9A99, 0x00323331, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000100, 0x2C280001, 0x5757512B,
+ 0x727D7B73, 0x7C717E7C, 0x7E7C717E, 0x737F8077,
+ 0x78707B7C, 0x79776F7A, 0x707B7971, 0x6F6A7A78,
+ 0x76746C72, 0x6E75746A, 0x7D737978, 0x7D7C727E,
+ 0x76828177, 0x7D737F80, 0x8280787E, 0x777D7D77,
+ 0x82797D7D, 0x7E7F7681, 0x737D7A75, 0x7C737D7B,
+ 0x7D7E747B, 0x757B7C73, 0x7E757D7E, 0x7B7C727D,
+ 0x737A7B71, 0x7C737C7D, 0x7E7F767B, 0x727C7D74,
+ 0x7F767A7B, 0x7D7D777E, 0x827D7A76, 0x79758783,
+ 0x62635F7A, 0x3F62635F, 0x03004044, 0x00040000,
+ 0x3B000000, 0x58583D3B, 0x58585858, 0x82666561,
+ 0x7D748888, 0x7E7C747C, 0x717E7B76, 0x7B777976,
+ 0x7B78747E, 0x6F75756F, 0x77737575, 0x75747078,
+ 0x75757470, 0x78777A79, 0x7776727A, 0x70797671,
+ 0x766E7875, 0x78757078, 0x73787773, 0x78747877,
+ 0x7A7A7479, 0x70787970, 0x7D787879, 0x7D7A7580,
+ 0x737B7C73, 0x7C737B7C, 0x7B7C737B, 0x737E7F76,
+ 0x7C737B7C, 0x7D7E757B, 0x787E7F76, 0x77717E7E,
+ 0x77777177, 0x717A7B72, 0x7B75777A, 0x52534F79,
+ 0x01282927, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00020000, 0x35330001, 0x9A9B9734, 0x989FA398,
+ 0xA397A0A4, 0xA2A498A1, 0x9AA2A69B, 0xA49DA0A3,
+ 0xA1A8A19D, 0x9D9FA89E, 0xA69F9EA7, 0xA0A7A09E,
+ 0x9FA2A6A0, 0xA8A2A1A5, 0xA5AAA1A4, 0xA2A6A9A0,
+ 0xA89FA8AB, 0xA6A8A2A5, 0xA2A6A9A0, 0xADA4A8AB,
+ 0xA9AEA5AA, 0x9EA7ABA0, 0xABA0A5A9, 0xA6ACA1A5,
+ 0xA2A7ABA0, 0xAFA4A9AD, 0xA7ADA2A9, 0xA0A7ADA2,
+ 0xAEA5A5AB, 0xA9AEA5A9, 0x9EABAFA3, 0xB1A5A8AD,
+ 0xABB2A5AD, 0xA2A9B1A6, 0xADA2A5AD, 0xA9B1A6A5,
+ 0xA9A8B0A9, 0xADA4A8B0, 0xABB0A7A8, 0xA3AEB4A9,
+ 0xB2A3A9B0, 0xACB3A6AD, 0xABA9B1A7, 0xB0AAABB2,
+ 0xACB1A8AC, 0xA6ABB3A8, 0xB2A8A8B2, 0xAAB2A8AA,
+ 0xADADB4AD, 0xBCB6ADB4, 0xB8BCB6B8, 0xB7B9BDB8,
+ 0xBCB6B8BC, 0xBCC0BAB8, 0xB7B8BFB8, 0xBEB7B7BE,
+ 0xBABEB8B7, 0xB8BABEB8, 0xBFB6BABE, 0xBABFB6BA,
+ 0xBBB7BBB5, 0xC0BBBCC0, 0xBDC1BCBC, 0xA5BAC1BA,
+ 0xADA6A5AC, 0xB3BAB3A6, 0xB9B6BEB7, 0xBFB8B8C0,
+ 0xB7BEB7B8, 0xBBBAC0BB, 0xBEBCBAC0, 0xBBBFBABB,
+ 0xBAB9C0B9, 0xB8B7B6C0, 0xA6B4B3A8, 0xB9B3BCB9,
+ 0xBFB9B8BE, 0xBDBFB9BD, 0xB9BBBFB9, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB9BCC0BA, 0xBEBCBBBF, 0xBBBEBCBB,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBBBABDBB,
+ 0xBDBBBABD, 0xBABDBBBA, 0xB9BBBFBA, 0xBDBBBABE,
+ 0xBABDBBBA, 0xB8B7BCBA, 0xBEB9B7BD, 0xB9BDB8BA,
+ 0xB8B7BDB8, 0xBBB9B7BD, 0xBBBCBAB8, 0xB8B8BCB7,
+ 0xBDBBB9BD, 0xBBBEBCBA, 0xBBBABCBC, 0xBDBBBABD,
+ 0xB8BEB9BA, 0xB9B8C0B9, 0xBFBAB8C0, 0x868C87B9,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC1595D5E, 0xC0C0BCC0,
+ 0xC1C1C1C0, 0xBDBCBFBD, 0xBFBEBABF, 0xB4BBB8B9,
+ 0xB9B2B8B3, 0xBDBBBABE, 0xB8BDBCB8, 0xC0BABFC0,
+ 0xBFBEBABF, 0xBAC1BEB9, 0xBBB7BEBB, 0xBEBDB7BE,
+ 0xB9BFBEB8, 0xBEB9BFBE, 0xBEBBB9BF, 0xB7BEBBB7,
+ 0xBEB9C0BD, 0xBFBCB9BF, 0xB9C0BDB8, 0xBDBAC1BE,
+ 0xBEBCB9C0, 0xB9BEBCB9, 0xBDB9C0BD, 0xC0BFB7C0,
+ 0xB9BFBEB8, 0xBFB8BFBC, 0xBDBABBC2, 0xB4BDBAB4,
+ 0xBEB9BFBE, 0xBFBDB9BF, 0xBABFBDBA, 0xBDB9BEBC,
+ 0xBFBFBABF, 0xBCBEBEBD, 0xBDBABFBD, 0xBFBEB9C0,
+ 0xBAC0BFB9, 0xBDBAC0BF, 0xBCB9B8BE, 0xB7BEBBB5,
+ 0xBCBBC1BC, 0xC0BBBBC1, 0xBCC0BBBC, 0xBCBABFBD,
+ 0xBFBDB9BE, 0xBABDBBBC, 0xB9B9BFBA, 0xBFBAB9C0,
+ 0xBBBFBABB, 0xB9BBBFB9, 0xBFBABBBF, 0xBBBEBCBB,
+ 0xBFC0C4BF, 0xB8B3C0C4, 0xB1B5B0B4, 0xAAAEB5AE,
+ 0xB0A6ACB4, 0xACB4AAA8, 0xA9ACB4AA, 0xB4ABABB3,
+ 0xABB0A7AF, 0xA8AEB4A9, 0xB1A8ADB3, 0xABB1A6AC,
+ 0xA6ACB0A4, 0xB1A5B0B2, 0xABAFA3AD, 0xA4ADB1A5,
+ 0xAEA2ACB0, 0xABAFA3AA, 0xA2AAAEA2, 0xA599AAAE,
+ 0xA6AA9EA1, 0x9CA9AE9F, 0xA99AA4AB, 0xA6AD9EA2,
+ 0x9CA4AB9C, 0xAB9CA4AB, 0xA0A798A4, 0x98A0A798,
+ 0xA99AA0A7, 0xA1A899A2, 0x9AA0A79A, 0xA798A0A7,
+ 0xA1A899A0, 0x97A2A897, 0xA798A2A8, 0xA4A798A4,
+ 0x949FA594, 0xA696A1A7, 0xA3A696A3, 0x919FA592,
+ 0xA6939EA4, 0xA1A592A2, 0x96A3A696, 0xA696A2A5,
+ 0xA2A595A3, 0x89898E7F, 0xA4989398, 0xA0A498A0,
+ 0x959EA596, 0xA0919DA4, 0x9BA29599, 0x9997A096,
+ 0xA19A98A0, 0x99A09999, 0x00959692, 0x01000302,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000100, 0x01000001,
+ 0x02020002, 0x4E2B2D27, 0x847B5457, 0x82837981,
+ 0x727E7C72, 0x7B70817D, 0x7E7C717F, 0x707E7F76,
+ 0x7B757679, 0x7A77727B, 0x777F7C77, 0x736E7F7C,
+ 0x73716976, 0x6D747369, 0x80767979, 0x82817781,
+ 0x73828177, 0x7F757E7D, 0x807F7580, 0x757E7F76,
+ 0x7E757B7B, 0x7D7E747D, 0x73787970, 0x81787B7C,
+ 0x7D7E7580, 0x737B7C73, 0x79707B7C, 0x78797078,
+ 0x70797A71, 0x78727879, 0x78797078, 0x747E7F76,
+ 0x7E747D7E, 0x7B7C737D, 0x77797874, 0x7A767A78,
+ 0x62635F7B, 0x3F636460, 0x03004044, 0x00040000,
+ 0x3B000100, 0x58583B3B, 0x58585858, 0x82656460,
+ 0x88808A87, 0x7F7C748A, 0x787E7A75, 0x7976807B,
+ 0x7B78747E, 0x727A7975, 0x7B777576, 0x7677737A,
+ 0x72787975, 0x7A767576, 0x7877737B, 0x6F787570,
+ 0x746F7774, 0x77746F77, 0x73757470, 0x79777677,
+ 0x7A7B7778, 0x71797973, 0x7873797A, 0x7A77727B,
+ 0x737F7D75, 0x7E787D7B, 0x7D7D777E, 0x757F8077,
+ 0x7C727D7E, 0x7B7C737B, 0x78817E79, 0x7D78807D,
+ 0x78797080, 0x71797A70, 0x7C717A7B, 0x777A7178,
+ 0x50797A78, 0x50505050, 0x28282850, 0x00000000,
+ 0x00000000, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00010101, 0x00000000, 0x32363100, 0x98A1A49B,
+ 0xA498A0A4, 0xA0A498A0, 0x9AA2A399, 0xA39AA0A3,
+ 0xA1A69DA0, 0x9EA0A89E, 0xA49DA0A8, 0xA1A8A19D,
+ 0xA0A2A6A0, 0xABA2A2A6, 0xA6A9A0A8, 0xA0A4A79E,
+ 0xA9A0A6A9, 0xA6A9A0A6, 0xA3A8A9A0, 0xADA7A9AC,
+ 0xA7AAA1AB, 0x9FA7ADA2, 0xABA0A4AA, 0xA5ABA0A5,
+ 0xA1A7ADA2, 0xADA2A6AC, 0xA8AEA3A7, 0xA2A9ADA2,
+ 0xACA3A7AD, 0xA8ADA4A7, 0xA0ABAFA3, 0xAFA3A8AC,
+ 0xABB1A6AB, 0xA7AAB2A8, 0xADA2A9B1, 0xA7AFA4A5,
+ 0xA8A8B0A9, 0xAAA4A7AF, 0xAAAFA6A6, 0xA5B0B4A9,
+ 0xB0A4ADB1, 0xABB2A5AC, 0xA9A9B1A7, 0xB3AAABB3,
+ 0xACB2A7AE, 0xA7ABB3A8, 0xB3AAAAB2, 0xAAAEA8AE,
+ 0xADADB4AD, 0xB8B3ADB4, 0xB6BCB7B2, 0xB7B9BDB8,
+ 0xBCB7B8BC, 0xB6BCB7B6, 0xB8B8BEB9, 0xBDB8B7BD,
+ 0xBCBDB9B9, 0xB8BCBEB8, 0xBFB6BCBE, 0xBABFB6BA,
+ 0xB5B6BDB6, 0xBCB7B5BC, 0xBBBFBAB8, 0xB3BAC1BA,
+ 0xBAB3B3BA, 0xACB4ADB2, 0xBAB3BAB5, 0xBFBAB8BF,
+ 0xB7BDB8B9, 0xB9B8BFB8, 0xC0BBB9C0, 0xBBBFBABC,
+ 0xBBB8BFB8, 0xBBB8B9C0, 0xB0BBB8B0, 0xBAB7BEB9,
+ 0xBEBAB9BF, 0xBEBFBBBD, 0xBAB9BDB8, 0xBFBAB9BF,
+ 0xB9BFBAB9, 0xB9BBBFB9, 0xBEBCBBBF, 0xB9BEBCB9,
+ 0xB9BBBFBA, 0xBEBABBBF, 0xBDBEBABD, 0xBBBABDBB,
+ 0xBDBBBABD, 0xBBBCB8BC, 0xBBBCBDBB, 0xBCBABABD,
+ 0xBABDBBB9, 0xB8B7BDB8, 0xBCB7B7BD, 0xB7BDB8B6,
+ 0xB7B7BDB8, 0xBCB7B6BC, 0xB9BDB8B8, 0xB7B8BCB7,
+ 0xBDBBB8BC, 0xBABDBBBA, 0xBBBABDBB, 0xBDBBBABD,
+ 0xB8BEB9BA, 0xB9B8C0B9, 0xBFBAB8C0, 0x868C87B9,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000200, 0x00000000, 0xC0595D5E, 0xC0C0BBBF,
+ 0xC0C0C0C0, 0xBDBCBFBD, 0xBFBEBABF, 0xB4BBB8B9,
+ 0xB9B2B8B3, 0xC0BEB8BE, 0xB8BDBCBB, 0xBBB9BFBE,
+ 0xBEBBB6BC, 0xB9C0BDB7, 0xBDBAC1BE, 0xBDBCB9C0,
+ 0xB9BFBEB7, 0xBBB9BFBE, 0xBEBBB7BE, 0xB7BEBBB7,
+ 0xBEB9C0BD, 0xC0BDB9BF, 0xB9C0BDB9, 0xB9B6BDBA,
+ 0xC0BEB5BC, 0xB9C0BDBB, 0xBBB9C0BD, 0xC1C0B5BE,
+ 0xBAC0BFB9, 0xBCB9C0BD, 0xBDBAB8BF, 0xB4BDBAB4,
+ 0xBEBAC0BF, 0xC0BEB9BF, 0xBABFBDBB, 0xBDBABFBD,
+ 0xBDBDBABF, 0xBCBEBEBB, 0xBDBABFBD, 0xC0BDBABF,
+ 0xBAC0BFB9, 0xBDB9BFBE, 0xC0BBBABF, 0xB8BEB9BA,
+ 0xBBBAC0BB, 0xC0BBBAC0, 0xBCC0BBBC, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABEB9BC, 0xB9BBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABBBFB9, 0xBFBABBBF, 0xBEC2BDBB,
+ 0xB3BFC3BE, 0xB4AEB5B9, 0xB0B4AEB0, 0xACAEB5AE,
+ 0xB4AAAEB6, 0xACB4AAAC, 0xABACB4AA, 0xB4AAADB5,
+ 0xAEB3AAAC, 0xA8ADB3A8, 0xB2A7ADB3, 0xAEB2A7AC,
+ 0xA5ABAFA3, 0xB1A5AFB1, 0xABAFA3AD, 0x9FADB1A5,
+ 0xAFA3A7AB, 0xABAFA3AB, 0x9EAAAEA2, 0xAA9EA6AA,
+ 0xAAAEA2A6, 0x9BA6AD9E, 0xAB9CA3AA, 0xA5AC9DA4,
+ 0x9AA4AB9C, 0xA99AA2A9, 0xA0A798A2, 0x9DA0A798,
+ 0xA99AA5AC, 0xA0A798A2, 0x98A2A798, 0xA798A0A7,
+ 0xA2A798A2, 0x98A3A998, 0xA697A3A9, 0xA2A897A1,
+ 0x949FA592, 0xA895A1A7, 0xA1A592A4, 0x94A0A491,
+ 0xA794A1A7, 0xA1A494A3, 0x94A2A596, 0x9F8F9EA3,
+ 0x9EA4939C, 0x8F999E8F, 0x9D91999E, 0x999D9199,
+ 0x94989F90, 0xA3949CA3, 0x9DA4979C, 0x999AA298,
+ 0x9F9898A0, 0x9AA19A97, 0x60949892, 0x01006364,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000200, 0x02000002, 0x25020100, 0x544F2B2B,
+ 0x7F7D7557, 0x78828379, 0x84788284, 0x82847882,
+ 0x707E7C71, 0x7C717D7B, 0x7E7C7280, 0x767D7E74,
+ 0x7E757E7F, 0x7879707D, 0x777F7C77, 0x79737F7C,
+ 0x797A7179, 0x6E79786E, 0x81777A7A, 0x80817782,
+ 0x75808177, 0x8278807F, 0x807F7583, 0x737A7B72,
+ 0x7C737B7C, 0x7B7C727B, 0x737B7C72, 0x7C737B7C,
+ 0x7D7E757B, 0x727D7E75, 0x7E787A7B, 0x7D7D777E,
+ 0x737D7E75, 0x7E787B7C, 0x7B7C737E, 0x727B7C73,
+ 0x796F7B7C, 0x78797078, 0x757A7975, 0x79757A79,
+ 0x62635F7A, 0x3F60645F, 0x04004044, 0x00030000,
+ 0x3A000100, 0x58583D3B, 0x5A58575A, 0x83676460,
+ 0x7D758B88, 0x7F7C7480, 0x78817D78, 0x7B78807B,
+ 0x7F7C7880, 0x787C7B77, 0x79757D7C, 0x7879757A,
+ 0x70787975, 0x74707374, 0x77767275, 0x707A7772,
+ 0x77727875, 0x7777717A, 0x73787773, 0x7B797677,
+ 0x7677737A, 0x72787872, 0x79747878, 0x7E7B767C,
+ 0x747F7D75, 0x7D777E7C, 0x80807A7D, 0x75808178,
+ 0x7F767D7E, 0x7B7C737E, 0x79807D78, 0x7D78817E,
+ 0x807E7680, 0x717A7B71, 0x7C717A7B, 0x787B7278,
+ 0x77787975, 0x79777879, 0x78797778, 0x4062605F,
+ 0x00004240, 0x00000002, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x01000000, 0x00000101, 0x00010000, 0x9A22241E,
+ 0xA499A0A3, 0xA0A499A0, 0x98A0A198, 0xA39AA0A1,
+ 0xA0A59CA0, 0x9DA1A69D, 0xA49D9FA7, 0xA1A8A19D,
+ 0x9EA3A7A1, 0xAAA1A2A7, 0xA6A9A0A7, 0xA0A4A79E,
+ 0xACA3A6A9, 0xA6A9A0A9, 0xA0A9AAA1, 0xAAA1A8A9,
+ 0xA8ABA2A7, 0x9EA5ABA0, 0xA99EA3A9, 0xA6ACA1A3,
+ 0xA2A9AFA4, 0xACA1A7AD, 0xA6ACA1A6, 0xA1ABAFA4,
+ 0xACA3A8AC, 0xA9AEA5A7, 0xA3ABB1A6, 0xADA1ABAF,
+ 0xABB1A6A9, 0xA7A7AFA5, 0xADA2A9B1, 0xA7ADA2A7,
+ 0xA8A9B1A7, 0xACA5AAB2, 0xA9AEA5A5, 0xA4ABB1A6,
+ 0xAFA3AAB1, 0xABB1A6AB, 0xA6AAB2A7, 0xB2A7A9B1,
+ 0xACB2A7AC, 0xA7AAB2A7, 0xB1A8AAB2, 0xAAB2A8AC,
+ 0xADA9B0A9, 0xB4ADADB4, 0xB8BCB7AD, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB6BCB7B8, 0xB6B8BCB6, 0xBDB7B8BC,
+ 0xBCBEB8BB, 0xB8BBBDB7, 0xBFB6BCBE, 0xBABFB6BC,
+ 0xB6B6BDB6, 0xBCB7B6BD, 0xB9BFBAB6, 0xB9B9C0B9,
+ 0xC0B9B9C0, 0xB8C0B9B8, 0xBAB6BDB8, 0xBDB8B8BF,
+ 0xB6BCB7B7, 0xB9B9C0B9, 0xBFBAB9C0, 0xB9C0B9B9,
+ 0xB9B9C0B9, 0xBBB6B9C0, 0xB8BFBAB4, 0xBFBEC4BF,
+ 0xC5C0BEC4, 0xBDC1BCC1, 0xBDBBBFBA, 0xC1BCBEC2,
+ 0xB9BFBABD, 0xBABBBFB9, 0xBFBAB9BF, 0xB9BFBAB9,
+ 0xB9BCC0BB, 0xBEBABBBF, 0xBDBEBABD, 0xBBBABDBB,
+ 0xBDB9BABD, 0xBABBB7BC, 0xBBBCBDB9, 0xBEBCBABD,
+ 0xBABEB9BB, 0xB7B7BEB7, 0xBCB7B7BE, 0xB7BDB8B6,
+ 0xB8B6BCB7, 0xBCB7B7BD, 0xB9BDB8B8, 0xB9B7BDB8,
+ 0xBDBBB6BB, 0xB7BCBAB8, 0xBBBABDBB, 0xBEBCBABD,
+ 0xBABEB9BB, 0xB9B9C0B9, 0xBFBAB9C0, 0x868C87B9,
+ 0x00000100, 0x00000001, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0xC2595D5E, 0xC0C0BFC1,
+ 0xC2C0C0C0, 0xBCBCBCBC, 0xC0C0BABC, 0xBABCBCBE,
+ 0xBBBABFBD, 0xBFBEB7BE, 0xB9BFBEB9, 0xBDBABFBE,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEBABFBE, 0xBDBBBABF,
+ 0xBBC0BEB8, 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8,
+ 0xBDBABFBD, 0xBEBCBABF, 0xBABFBDB9, 0xBDB6BDBA,
+ 0xC0BDB9C0, 0xB9C0BDB9, 0xBBB9C0BD, 0xBFBEB7BE,
+ 0xBAC0BFB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB7BDBCB9,
+ 0xBDB9C0BD, 0xBFBEB9C0, 0xBABFBEBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBCC1BFBB, 0xBABBC0BE, 0xBFBABBBF, 0xBCC0BBBB,
+ 0xB7BABEB9, 0xBCBAB8BC, 0xBCBFBDB9, 0xBBBCBFBD,
+ 0xC0BBBABD, 0xBCC0BBBC, 0xBBBBBFBA, 0xBEB9BCC0,
+ 0xBBBFBABA, 0xBABBBFBA, 0xBEBABBBF, 0xC2C3BFBD,
+ 0xAAB2B6B0, 0xB5ACAEB3, 0xB0B5ACB0, 0xAEAEB5AE,
+ 0xB3ACADB5, 0xA8B0A9AB, 0xABABB3AC, 0xB5AEAAB2,
+ 0xACB3ACAD, 0xA5AEB4A9, 0xB0A4ADB1, 0xB0B4A8AC,
+ 0xA5ADB1A5, 0xB2A6ADB1, 0xABAFA3AE, 0xA0ABAFA3,
+ 0xB2A6A8AC, 0xABAFA3AE, 0xA2A9ADA2, 0xAEA3A9AD,
+ 0xA6AA9EAA, 0x9DA6AB9C, 0xAB9CA7AC, 0xA4AB9CA4,
+ 0x98A6AA9E, 0xA79BA0A4, 0xA5AA9BA3, 0x97A1A796,
+ 0xA796A2A8, 0xA0A695A1, 0x98A5A898, 0xA798A2A7,
+ 0xA6AB9CA4, 0x97A2A897, 0xA897A2A8, 0xA2A897A2,
+ 0x91A1A794, 0xA28EA1A6, 0x9EA28FA0, 0x8EA0A491,
+ 0xA3939DA1, 0xA0A393A0, 0x949EA394, 0xA1929CA3,
+ 0x9AA1929C, 0x949CA394, 0xA1929CA3, 0x979E8F9A,
+ 0x8C929788, 0xA498969B, 0x9EA499A0, 0x9899A197,
+ 0xA298989F, 0x969F9599, 0x9998A099, 0x6B6699A0,
+ 0x00010067, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000301, 0x03010004, 0x03040200, 0x06080606,
+ 0x06050806, 0x2F2E2A08, 0x7A5C5A52, 0x847A8584,
+ 0x86847986, 0x73848277, 0x81738281, 0x81817581,
+ 0x75808074, 0x8177807F, 0x807F7583, 0x727D7C72,
+ 0x7F757D7C, 0x7F80767E, 0x757F7D75, 0x7B727F7D,
+ 0x7D7E757A, 0x727E7F75, 0x7F757D7C, 0x7E7F7580,
+ 0x737F8077, 0x7E757B7C, 0x7F80767D, 0x757D7B73,
+ 0x7C747F7D, 0x7D7C727E, 0x727B7C72, 0x796F7B7C,
+ 0x7D7C727A, 0x757D7E75, 0x7B737D7E, 0x7D7B737D,
+ 0x7B7D7D77, 0x7D748181, 0x7B7C737C, 0x707A7870,
+ 0x7C737A78, 0x7B7C737B, 0x7A747670, 0x807A7E80,
+ 0x60645E7E, 0x3F60645F, 0x04003E44, 0x02030000,
+ 0x3C020000, 0x5B5A413D, 0x5F5C585F, 0x8267645F,
+ 0x7C748A87, 0x7E7C747E, 0x77807D78, 0x7E7A7F7C,
+ 0x7F7C7881, 0x757B7873, 0x78737D7A, 0x7878727B,
+ 0x73767773, 0x77737677, 0x7A777378, 0x6D797671,
+ 0x77727775, 0x7676707A, 0x75787773, 0x79757677,
+ 0x76777378, 0x76787773, 0x7D797B7A, 0x7E7E787E,
+ 0x79808178, 0x7D778182, 0x7D7D777D, 0x767E7F76,
+ 0x7E767E7F, 0x817F7780, 0x7884817C, 0x7C77807D,
+ 0x807C7780, 0x737D7B73, 0x79707B7C, 0x78797078,
+ 0x75777771, 0x77737B7B, 0x807F7B78, 0x7A7F7C78,
+ 0x5F5E7F7B, 0x2A282763, 0x02010200, 0x03010104,
+ 0x00040000, 0x00000200, 0x03010004, 0x00020000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01010001, 0x00000001, 0x33000100,
+ 0xA49E3637, 0xA0A49EA0, 0x979DA097, 0xA1969DA0,
+ 0x9BA1969D, 0x9FA3A89F, 0xA19BA1A9, 0xA1A59F9D,
+ 0x9EA4A9A0, 0xA79EA2A7, 0xA6A9A0A4, 0x9EA1A59F,
+ 0xACA3A2A7, 0xA5A99EA9, 0x9DA5A99E, 0xAB9FA5A9,
+ 0xA8ACA0A7, 0xA0A4AA9F, 0xAAA0A5AB, 0xA5ADA3A2,
+ 0xA2A9AFA4, 0xACA1A7AD, 0xABAFA4A8, 0xA1A9AFA4,
+ 0xABA2A6AC, 0xA9AEA5A6, 0xA4ABB0A7, 0xACA1A9AF,
+ 0xA9AFA4A6, 0xA6ACB2A7, 0xAFA3ABB1, 0xA5AC9FAB,
+ 0xA5AAB0A5, 0xAFA5A8B0, 0xA7AFA4A7, 0xA5A9B1A6,
+ 0xB0A5A8B0, 0xA6AEA3AA, 0xA6ABB3A8, 0xB1A6A9B1,
+ 0xAAB2A8A9, 0xA5A9B1A7, 0xB2A7A8B0, 0xABB3A8AA,
+ 0xA9A8B1A7, 0xB2ABA8B0, 0xB4B8B2AB, 0xB8BCBDB9,
+ 0xBCB8BBBC, 0xB9BDB7BB, 0xAAB0B3AA, 0xBCB3B0B3,
+ 0xC0C1B8B9, 0xB4C1C2B9, 0xC0BABCBD, 0xB8BCB6C0,
+ 0xB9B5BCB5, 0xBCB5B8C0, 0xB8C0B9B4, 0xB9B3BBB4,
+ 0xC0B9B8C0, 0xB9C0B9B9, 0xB9B9C0B9, 0xC0B9B9C0,
+ 0xB5BDB6B8, 0xB9B8C0B9, 0xC0B9B8C0, 0xB9C0B9B8,
+ 0xB7B9C0B9, 0xC0B9B9C1, 0xC2C8C3B9, 0xBFBAC0BB,
+ 0xC0BEBCC1, 0xBAC0BBBB, 0xBEC2C3BF, 0xC3BFC2C4,
+ 0xC0C4BFC2, 0xBBBAC0BB, 0xC0BBBAC0, 0xB7BBB6BA,
+ 0xBAB8BCB7, 0xC0BBBBBF, 0xBBBFBABC, 0xBABBBFBA,
+ 0xBEBABBBF, 0xB9BAB6BD, 0xB6B7BBB6, 0xBBB6B5BB,
+ 0xB5BBB6B5, 0xB5B5BCB5, 0xBBB6B5BC, 0xB4BAB5B5,
+ 0xB9B8C0B9, 0xC0B9B8C0, 0xB9BFBAB9, 0xBFBAC1BC,
+ 0xBFBEBBC2, 0xBAC0BFB7, 0xB7B6BBB9, 0xBBB7B8BC,
+ 0xBBBDB7BA, 0xB8BEC0BA, 0xC1BBBEC1, 0x878B85BF,
+ 0x00000100, 0x00000001, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0xC15B5D5E, 0xC0C0BEC0,
+ 0xC2C0C0C0, 0xBCBBBBBB, 0xBFBFBCBC, 0xBEC0C0BF,
+ 0xBBBABFBD, 0xBFBEB7BE, 0xB9BFBEB9, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBCBABFBE, 0xBBB9B8BD,
+ 0xBABFBDB6, 0xBAB8BFBC, 0xBFBCB8BF, 0xB9C0BDB8,
+ 0xBDB9BEBC, 0xC0BEBABF, 0xB8BDBBBD, 0xBDB9C0BD,
+ 0xC1BEB9C0, 0xB9C0BDBA, 0xBEB9C0BD, 0xBEBDBAC1,
+ 0xBABFBEB9, 0xBEBAC0BF, 0xBFBEB9BF, 0xB7BDBCB9,
+ 0xBDB9C0BD, 0xBFBEB9C0, 0xBABFBEBA, 0xBDB9BEBC,
+ 0xBFBDBABF, 0xBBC0BEBA, 0xBEBBC0BE, 0xC1BFBBC0,
+ 0xBBC0BEBC, 0xBCBDC1BC, 0xBEBABDC1, 0xBDBEBABD,
+ 0xB7BBBFBA, 0xBAB8B8BC, 0xB9BCBAB7, 0xBBBCBFBD,
+ 0xBEB9BABD, 0xBABEB9BA, 0xB9BEBFBB, 0xBFBABCBD,
+ 0xBBBFBABB, 0xBABBBFBA, 0xC4BFBBBF, 0xB5B9B3C0,
+ 0xABAEB2AC, 0xB6ABAFB4, 0xACB4A9B0, 0xACACB3AC,
+ 0xB2ABABB3, 0xA7AFA8AA, 0xADA8B0A9, 0xB3ACACB4,
+ 0xACB3ACAB, 0xA3AEB4A9, 0xB2A6ABAF, 0xB0B4A8AE,
+ 0xA3ADB1A5, 0xB0A4ABAF, 0xABAFA3AC, 0xA3A8ACA0,
+ 0xAFA3ABAF, 0xA9ADA1AB, 0xA3A9ADA2, 0xABA0AAAE,
+ 0xA7AB9FA7, 0x9EA7AB9F, 0xAD9EA8AD, 0xA2A99AA6,
+ 0x9EA4A89C, 0xA99DA8AA, 0xA3A899A5, 0x97A1A796,
+ 0xAD9DA4AA, 0xA7AA9AAA, 0x99A2A595, 0xA697A6A9,
+ 0xA5A899A3, 0x95A2A897, 0xA493A0A6, 0x9EA4939C,
+ 0x8F9DA390, 0xA4919EA2, 0xA1A592A0, 0x94A2A693,
+ 0xA696A1A4, 0x9EA493A3, 0x979BA293, 0xA3949FA6,
+ 0x9DA4959C, 0x949CA394, 0xA3949CA3, 0x9DA4959C,
+ 0x98A0A596, 0xA094A0A4, 0x9AA1949C, 0x9798A096,
+ 0xA09699A1, 0x98A19797, 0x9A96A199, 0x9F9A99A1,
+ 0x686C6799, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x00010001,
+ 0x00000400, 0x03000004, 0x01020000, 0x2C080605,
+ 0x7F7E312D, 0x827F7A81, 0x7A86847A, 0x84798785,
+ 0x88847988, 0x75868375, 0x81738683, 0x84837582,
+ 0x77807F75, 0x7E768281, 0x807F7580, 0x75817F74,
+ 0x81758181, 0x7F80767F, 0x727F7D75, 0x7A717C7A,
+ 0x80817879, 0x747E7F75, 0x82787F7E, 0x807F7583,
+ 0x737B7C73, 0x7C73797C, 0x7D7E757B, 0x747F7E74,
+ 0x7D757F7E, 0x7D7B7380, 0x6D78796F, 0x7C727779,
+ 0x7C7B717D, 0x737B7C73, 0x7B737B7C, 0x7F7D757D,
+ 0x7780807A, 0x7E757F80, 0x797A717D, 0x707A7870,
+ 0x7E757A78, 0x7D7E757D, 0x7775786F, 0x807A7D80,
+ 0x60645E7E, 0x3F60645F, 0x04003E44, 0x02030000,
+ 0x3C020000, 0x5B58413D, 0x605B5860, 0x8267645F,
+ 0x7C748A87, 0x7E7C747E, 0x79817E79, 0x7C78817E,
+ 0x807D797F, 0x737E7A75, 0x79717C78, 0x7B7B757B,
+ 0x737D7C78, 0x77737677, 0x77746F7A, 0x6F77746F,
+ 0x75707977, 0x76767078, 0x77787773, 0x79757A7B,
+ 0x73747078, 0x78787773, 0x7A767D7C, 0x7B7A767B,
+ 0x707B7B75, 0x7B757879, 0x7D7E757B, 0x757A7B71,
+ 0x81797E7F, 0x83807B83, 0x76817F77, 0x7E79807E,
+ 0x817D7882, 0x757F7C77, 0x81787B7B, 0x7C7D7480,
+ 0x73787970, 0x77717B7C, 0x7D7A7577, 0x78807B78,
+ 0x7B7A807B, 0x7F7B7A80, 0x517B7C7A, 0x04005053,
+ 0x00040000, 0x00000400, 0x04000105, 0x00040000,
+ 0x01010101, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x01000000,
+ 0x6C6A0101, 0xA0A49F69, 0x979C9E98, 0xA0979DA0,
+ 0x9DA1969D, 0x9BA3A89F, 0xA49E9DA5, 0xA0A59CA0,
+ 0xA0A2A79E, 0xA89FA4A9, 0xA6A9A0A5, 0x9EA3A7A1,
+ 0xA9A0A2A7, 0xA8ACA1A6, 0x98A5A99D, 0xA596A0A4,
+ 0xA5AA9BA0, 0xA1A4AB9E, 0xABA1A6AC, 0xA0A89EA3,
+ 0xA2A5ABA0, 0xACA1A7AD, 0xA8ACA1A8, 0xA4A7ADA2,
+ 0xADA2A9AF, 0xA7ACA3A7, 0xA5A7AFA5, 0xADA2A7AF,
+ 0xA7ADA2A7, 0xA3ACB0A5, 0xB0A4ABAF, 0xA8ACA0AC,
+ 0xA4AAB0A5, 0xB0A5A9AF, 0xA7AFA4A8, 0xA5A8B0A5,
+ 0xAFA4A8B0, 0xA8B0A5A7, 0xA9AAB2A7, 0xB0A6ACB4,
+ 0xABB3A9A8, 0xA6AAB2A8, 0xB1A6A9B1, 0xACB4A9A9,
+ 0xA6A8B1A7, 0xB4AAA7B0, 0xAEB3AAAC, 0xC0BABCB6,
+ 0xC3BFC3C4, 0xBBBDB7C2, 0xB6B8BBB2, 0xC2B9BDC1,
+ 0xC0C1B8C1, 0xB8C0C1B8, 0xBBB5C0C1, 0xBEC0BABB,
+ 0xB9B9C0B9, 0xC0B9B8C0, 0xB8C0B9B8, 0xB9B9C0B9,
+ 0xC1BAB9C0, 0xB9C0B9BA, 0xBAB9C0B9, 0xC0B9BAC1,
+ 0xB8C0B9B8, 0xB9B8C0B9, 0xBFB8B8C0, 0xB8BFB8B7,
+ 0xB7B9C1B7, 0xC7C1BBC0, 0xBABEB8C3, 0xA2A2A6A1,
+ 0xA4A29FA4, 0xA1A5A09F, 0xABAEB0AA, 0xB1ABB1B1,
+ 0xB7BBB6AF, 0xBBBAC0BB, 0xC4BFBAC0, 0xBFC3BEC0,
+ 0xBABDC1BC, 0xBFBABBBF, 0xBDC1BCBB, 0xBABBBFBA,
+ 0xBEB9BBBF, 0xBBBFBABA, 0xBBB7BBB5, 0xC0BBBBC2,
+ 0xBAC0BBBA, 0xBBBAC1BA, 0xBFBABBC2, 0xBEC4BFB9,
+ 0xABB9C0B9, 0xB1ABABB2, 0xACB3ACAD, 0xBEADB2B0,
+ 0xC0BFBAC1, 0xB8C0BFB8, 0xBBB9BEBC, 0xC0BABCC0,
+ 0xBDBFB9BE, 0xB8C0C1B8, 0xC0BAC0C1, 0x8A8C86BE,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000002, 0xC15B5D5E, 0xC0C0BEC0,
+ 0xC2C0C0C0, 0xBCBCBCBC, 0xB8B6BCBC, 0xB7BCBAB5,
+ 0xBDB9BFBE, 0xBFBEB6BE, 0xB9BFBEB9, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEBABFBE, 0xBDBCBABF,
+ 0xB8BFBCB7, 0xBCB8BFBC, 0xBFBCB8BF, 0xB7BEBBB8,
+ 0xBCBBC0BE, 0xBFBDB9BE, 0xBABFBDBA, 0xBDB9C0BD,
+ 0xBFBDB9C0, 0xBABFBDBA, 0xBEBAC1BE, 0xBFBDBAC1,
+ 0xBBC0BEBA, 0xBDBBC0BE, 0xC0BDBABF, 0xB9C0BDB9,
+ 0xBFB9BFBE, 0xC0BFBAC0, 0xBABFBEBB, 0xBDBABFBD,
+ 0xC0BBBABF, 0xBAC0BBBA, 0xBEBCC1BF, 0xC0BBBBC0,
+ 0xBBC1BCBA, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBDBCBFBD, 0xBEBCBCBF, 0xB8BBB9BB, 0xBDBABDBB,
+ 0xBDB8BCBF, 0xB8BEB9B7, 0xBCB8BBB9, 0xBEBCBBBE,
+ 0xBBBEBCBB, 0xBFC1C5C0, 0xB9B4C0C4, 0xB0B4AEB5,
+ 0xADB0B4AE, 0xB6ABB1B6, 0xAEB6ABB0, 0xAEAEB5AE,
+ 0xB5AEADB5, 0xACB3ACAE, 0xABA9B0A9, 0xB4ADABB2,
+ 0xADB5ABAC, 0xA3AAB0A5, 0xAFA0ABAF, 0xADB2A3AA,
+ 0xA0ABAFA3, 0xAFA4A8AC, 0xABAFA4AB, 0xA0A8ACA0,
+ 0xACA0A8AC, 0xA8ACA0A8, 0xA1AAAEA2, 0xABA0A9AD,
+ 0xA7AB9FA7, 0x9BA8ACA0, 0xA99AA5AA, 0xA2A99AA2,
+ 0x9DA8ACA0, 0xA397A5A9, 0xA2A596A1, 0x97A3A696,
+ 0xAA9AA6AA, 0xA5A696A9, 0x98A2A596, 0xA596A4A7,
+ 0xA4A798A2, 0x95A2A897, 0xA493A0A6, 0x9EA4939E,
+ 0x97A2A897, 0xA897A2A8, 0xA3A998A2, 0x969FA594,
+ 0xA596A0A5, 0xA0A596A0, 0x939AA192, 0xA3949BA2,
+ 0x9EA3949E, 0x979CA394, 0xA5969FA6, 0x9CA3949E,
+ 0x949CA094, 0xA1949CA0, 0x9AA1949A, 0x9699A295,
+ 0xA09699A1, 0x98A09997, 0x9896A199, 0xA099979F,
+ 0x676B6699, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x01010001,
+ 0x00000001, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000400, 0x04000004, 0x2C2E2800, 0x7A80807A,
+ 0x7F798080, 0x8381797F, 0x7886847A, 0x83788783,
+ 0x88847987, 0x76868577, 0x81738686, 0x82817382,
+ 0x76807F75, 0x80768180, 0x83817782, 0x71818175,
+ 0x7F757D7D, 0x7F80767E, 0x717B7C73, 0x7E75797A,
+ 0x8081787D, 0x76807E76, 0x7C728280, 0x7E7C717E,
+ 0x747D7E74, 0x7B737D7E, 0x7F7D757D, 0x72807D75,
+ 0x7C747D7A, 0x7F7D757E, 0x727E7C72, 0x7C727E7C,
+ 0x7D7C727D, 0x737D7E74, 0x7E757C7D, 0x7D7E757D,
+ 0x757F7D75, 0x7E757D7E, 0x767A6F7D, 0x747B7C72,
+ 0x7F767D7E, 0x7B7C737E, 0x7777786F, 0x807A7D80,
+ 0x60645F7E, 0x3E61655F, 0x04004044, 0x02030000,
+ 0x3D020000, 0x5B58423E, 0x605B5860, 0x8268645F,
+ 0x7C748B87, 0x7E7C747E, 0x77807E76, 0x7D78817F,
+ 0x807D7880, 0x727F7C77, 0x7A757A77, 0x7979737D,
+ 0x737C7B77, 0x74707677, 0x77746F77, 0x70797671,
+ 0x79707A78, 0x76767078, 0x7375756F, 0x78747877,
+ 0x75747079, 0x76787773, 0x7D7B7B7A, 0x7D7E7A7C,
+ 0x7A7D7D77, 0x7B758080, 0x7B7C737B, 0x75797A70,
+ 0x7E767E7F, 0x87847F80, 0x77817F77, 0x7F7A817F,
+ 0x807C7783, 0x757F7C77, 0x7B727D7E, 0x7D7E757A,
+ 0x737D7C72, 0x80787E7D, 0x7F7D7582, 0x77807C77,
+ 0x7B78827C, 0x7F7C7880, 0x777D7C78, 0x7D787A7B,
+ 0x50544F79, 0x00020300, 0x04000003, 0x01050000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010200,
+ 0x00000001, 0x00000000, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x6D6E6A00, 0x96B6B8B2, 0xA0979C9F,
+ 0x9DA0979D, 0x9B9EA499, 0xA59CA0A6, 0x9EA39AA0,
+ 0xA1A1A69D, 0xA6A0A3A7, 0xA6A8A2A4, 0x9CA4A8A2,
+ 0xA9A0A0A5, 0xAAABA1A8, 0x9CA8ACA0, 0xA596A4A8,
+ 0xA3A899A0, 0xA0A5AC9F, 0xABA0A6AD, 0xA4AB9EA5,
+ 0xA0A8ACA0, 0xACA0A8AC, 0xA8ACA0A8, 0xA2A7ADA2,
+ 0xADA2A7AD, 0xA6ACA1A9, 0xA3A5ADA2, 0xAFA4A6AE,
+ 0xA5ABA0A7, 0xA5ABAFA3, 0xB1A5ADB1, 0xA6ADA0AD,
+ 0xA5A6ACA1, 0xB0A5AAB0, 0xA9AFA4AA, 0xA3A7AEA1,
+ 0xB1A4A9B0, 0xA9AFA4AA, 0xA9AAB2A7, 0xB1A7ABB3,
+ 0xA9B1A7A9, 0xA7ABB3A9, 0xB2A7AAB2, 0xABB3A9AA,
+ 0xA7ABB4AA, 0xB4AAA8B1, 0xAEB3AAAC, 0xBEB2B6B0,
+ 0xC5BFC2C4, 0xC4C4BEC3, 0xB8BEC1B8, 0xC1B7BEC1,
+ 0xC1BFB7C0, 0xB5C0C1B8, 0xC1B8BBBB, 0xBEC1B8BE,
+ 0xB9B9C0B9, 0xC0B9B9C0, 0xB9C0B9B9, 0xB7B7BCB3,
+ 0xBEB8BBC0, 0xBBBFB9BA, 0xB8B9C0B9, 0xBFBAB8BF,
+ 0xB9BFBAB9, 0xB9B9C0B9, 0xBAB3B9C0, 0xBBBFB9B3,
+ 0xB7BBC0B7, 0xC0B7BDC0, 0xAEB0AABD, 0x93969892,
+ 0x98939498, 0xA3A4A094, 0xA2A8A8A2, 0xA8A2A8A8,
+ 0xA6A8A2A8, 0xBAB2B6B0, 0xC5BFBAC1, 0xC0C4BEC1,
+ 0xBFC0C4BF, 0xC4BEC0C4, 0xC2C4BEC2, 0xBFC0C4BF,
+ 0xC4BFC0C4, 0xC0C4BFC0, 0xBFBBBFB9, 0xC4BFC1C5,
+ 0xBEC4BFBE, 0xBABEC5BE, 0xC4BFBAC1, 0xBCC0BBC0,
+ 0x8FADB1AB, 0x958F9395, 0x93958F95, 0xB1969795,
+ 0xC0BFAEB3, 0xBAC0BFBA, 0xBFBEC3C1, 0xC4BEC0C4,
+ 0xBDC1BBC0, 0xB7BFC2B9, 0xC1B8BEC2, 0x8C8D84C0,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000002, 0xC05B5D5E, 0xC0C0BBBF,
+ 0xC0C0C0C0, 0xBABCBCBC, 0xB3B1B9BC, 0xAEB3B1B0,
+ 0xBDBAC0BF, 0xBFBEB6BE, 0xB9BFBEB9, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEBABFBE, 0xBDBCB9BF,
+ 0xB9BFBEB7, 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8,
+ 0xBEBABFBD, 0xC0BEBBC0, 0xB8BDBBBB, 0xB8B4BBB8,
+ 0xBDBBB4BB, 0xB9BEBCB8, 0xBDB9C0BD, 0xC0BEB9C0,
+ 0xBABFBDBB, 0xBDB8BDBB, 0xBFBDBABF, 0xB9C0BDBA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xC0BBBABF, 0xB8BEB9BA, 0xBEBABFBD, 0xC1BCBBC0,
+ 0xBBC1BCBB, 0xB9BBBFBA, 0xBFBABABE, 0xB7BBB6BB,
+ 0xBDBABDBB, 0xBCBABCBF, 0xB8BBB9B9, 0xBAB9BCBA,
+ 0xC0BBBBBF, 0xBCC0BBBC, 0xB8BCBFBD, 0xBEBCB7BA,
+ 0xBDC1BCBB, 0xB9BFC3BE, 0xB5AFBBBF, 0xAEB5AEB1,
+ 0xABB1B6AD, 0xB5AAAFB4, 0xB0B5ACAF, 0xADAEB6AC,
+ 0xB5AEADB4, 0xADB5ABAE, 0xA7A9B0A9, 0xB5ABA9B1,
+ 0xA8B0A5AD, 0xA2B0B4A8, 0xB2A3AAAE, 0xADB2A3AD,
+ 0xA0ABAFA3, 0xACA1A8AC, 0xA8ACA0A8, 0x9FABAFA3,
+ 0xB1A2A9AE, 0xABB0A1AC, 0xA1A9AE9F, 0xAEA2A9AD,
+ 0xA6AA9EAA, 0x9AA4A99A, 0xAB9CA4A9, 0xA4AB9CA4,
+ 0x9BA5A99D, 0xA599A3A7, 0xA5A899A3, 0x91A3A696,
+ 0xA696A0A4, 0xA3A696A3, 0x98A5A899, 0xA798A2A7,
+ 0xA2A798A4, 0x95A0A695, 0xA695A0A6, 0xA2A897A0,
+ 0x98A0A798, 0xA798A0A7, 0x9EA394A2, 0x96A2A798,
+ 0xA596A0A5, 0xA2A798A0, 0x96A1A697, 0xA394A0A5,
+ 0xA0A5969E, 0x959EA394, 0xA5969DA4, 0x9EA3949E,
+ 0x99A0A498, 0xA598A1A5, 0x9EA5989E, 0x92989F90,
+ 0xA197969F, 0x98A19799, 0x9A98A197, 0xA09999A1,
+ 0x676B6699, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010002,
+ 0x50020400, 0x82795459, 0x81847B7F, 0x78808178,
+ 0x80788280, 0x82817782, 0x7986847A, 0x84798884,
+ 0x87857A88, 0x75848375, 0x83758483, 0x84827784,
+ 0x727E7D73, 0x7E747D7C, 0x7D7C7280, 0x75818076,
+ 0x847A8181, 0x83847A83, 0x757D7E75, 0x7E757D7E,
+ 0x7B7C737D, 0x747E7C74, 0x7C727F7C, 0x8280767E,
+ 0x757D7C72, 0x7D757D7E, 0x7F7D757F, 0x7285827A,
+ 0x78707E7C, 0x7E7C727B, 0x7A847F76, 0x80768883,
+ 0x7C7B7182, 0x7478796F, 0x7E757D7E, 0x7E7F767D,
+ 0x78828078, 0x7E748081, 0x797D727D, 0x737B7C72,
+ 0x7B727C7D, 0x7F80777A, 0x79808178, 0x7F798182,
+ 0x62645E7F, 0x3E62645E, 0x04004044, 0x00040000,
+ 0x3C000100, 0x5C583F3D, 0x5F5C585F, 0x82686560,
+ 0x7C748A87, 0x7E7C747E, 0x77817F77, 0x807B817F,
+ 0x807D7883, 0x737B7873, 0x78737B78, 0x7777717B,
+ 0x78797874, 0x78747B7C, 0x7A77737B, 0x707A7772,
+ 0x786F7A78, 0x78797077, 0x72787872, 0x7A747878,
+ 0x7777717A, 0x787B7B75, 0x7D797E7E, 0x7C7D797C,
+ 0x777C7C76, 0x807A7D7D, 0x7A7B7280, 0x707E7F75,
+ 0x8179797A, 0x83807B83, 0x78817F77, 0x7B76807D,
+ 0x7F7C777E, 0x767D7D77, 0x7D747E7F, 0x7D7B737C,
+ 0x767F7E74, 0x7B738180, 0x7D7B737D, 0x77807C77,
+ 0x7C77807C, 0x7F7C7780, 0x777C7C76, 0x7A767A7B,
+ 0x7A7B7779, 0x486F6E6A, 0x03004B4C, 0x02030102,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010101,
+ 0x01000000, 0x00010000, 0xB36D6E6A, 0xA097B7B9,
+ 0x9DA0979D, 0x9B9CA297, 0xA59CA0A6, 0x9CA198A0,
+ 0xA0A2A6A0, 0xA6A0A2A6, 0xA1A59FA2, 0x9CA2A6A0,
+ 0xA89FA0A5, 0xAAABA1A7, 0xA1A8ACA1, 0xA89CA9AD,
+ 0xA3AA9DA4, 0x9DA3AA9D, 0xADA2A3AA, 0xA4AB9EA7,
+ 0xA1A6ADA0, 0xACA0A9AD, 0xA9ADA1A8, 0xA2A5ABA0,
+ 0xAEA3A7AD, 0xA6ACA1A8, 0xA4A5ADA2, 0xAFA4A7AF,
+ 0xA7ADA2A7, 0xA4A8ACA0, 0xAFA3ACB0, 0xA9B0A3AB,
+ 0xA4A6ACA1, 0xB0A5A9AF, 0xAAB0A5AA, 0xA2A5AC9F,
+ 0xB1A4A8AF, 0xAAB0A5AA, 0xA9ABB1A6, 0xB3A9ABB3,
+ 0xA9B1A7AB, 0xA8AAB2A7, 0xB0A5ABB3, 0xABB3A8A8,
+ 0xA6ACB4AA, 0xB3A8A9B1, 0xB0B6ABAD, 0xAAB3B8AF,
+ 0xB1ABAEB0, 0xB0B1A8B1, 0xA9AFB2A9, 0xB3A9AFB2,
+ 0xB3B4ABB2, 0xACB3B4AB, 0xB5ACB4B5, 0xB2B5ACB4,
+ 0xACB0B5AC, 0xB5AFB0B5, 0xB0B4AEB1, 0xA7ADB0A7,
+ 0xB4AEABB0, 0xACB0AAB2, 0xAEB0B4AE, 0xB4AEB0B4,
+ 0xB0B4AEB0, 0xA6ACB3AC, 0xACA6A6AD, 0xAFB3ADA8,
+ 0xA7B3B8AF, 0xB1A8ADB0, 0xAEB1A8AE, 0xA0A3A59F,
+ 0xA5A0A2A6, 0xB2B3AFA1, 0xABAFB1AB, 0xB2A9AFB1,
+ 0xADB2A9AF, 0xB1B4B8B2, 0xBBB5B1B8, 0xB6BAB4B7,
+ 0xBAB8BCB7, 0xC2BCBBBF, 0xBABEB8BE, 0xBABBBFBA,
+ 0xBFBAB9BF, 0xB6BCB7B9, 0xB5B4B8B2, 0xB7B2B7BB,
+ 0xB5BBB6B3, 0xB1B1B8B1, 0xB7B2B1B8, 0xB3B7B2B3,
+ 0x9DADB1AB, 0xA39DA1A3, 0xA1A39DA1, 0xB0B1B2AE,
+ 0xB3B0AFB2, 0xACB3B0AC, 0xB8B6BCB7, 0xBDB6B7BD,
+ 0xB8BCB6B6, 0xA7ACAFA6, 0xC0B7ADB0, 0x8C8D84BF,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC25B605F, 0xC3C1BEC3,
+ 0xC0C3C1BE, 0xBDBCBFBD, 0xBAB8BABF, 0xB3BAB7B5,
+ 0xBEBAC0BF, 0xBFBDB9BF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEB9BFBE, 0xBDBCB9BF,
+ 0xBAC0BFB7, 0xBDB9C0BD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xC0BCC1C0, 0xC0BFBCC1, 0xB2B8B7BA, 0xBFB2B8B7,
+ 0xC1BFBAC0, 0xBBC0BEBC, 0xBDBAC1BE, 0xBFBDB9C0,
+ 0xBBC0BEBA, 0xBABCC0BB, 0xBFBAB9BF, 0xB9BFBAB9,
+ 0xBEBAC1BE, 0xC0BEBAC1, 0xBBC0BEBB, 0xBCBBC0BE,
+ 0xC1BCBBC1, 0xBBBFBABD, 0xBABBBFBA, 0xBEBCBBBF,
+ 0xBBBEBCBB, 0xBDBCBFBD, 0xC2C0BCBF, 0xBABDBBBF,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBCC0BBBB, 0xB6B6BCB7,
+ 0xBFB9B8BC, 0xBABEB8BB, 0xB7BCC0BB, 0xBAB5B6BC,
+ 0xC0C4BEB4, 0xACBCC0BA, 0xB5ACB0B5, 0xB0B5ACB0,
+ 0xACB0B5AC, 0xB5ACB0B5, 0xAEB3AAB2, 0xAAAEB3AA,
+ 0xB4ABAEB3, 0xADB3A8AF, 0xA4ABB0A7, 0xB1A6A9AF,
+ 0xAEB5A8AB, 0xA3B1B5A9, 0xB4A8ADAF, 0xADB1A5B0,
+ 0xA5ABAFA3, 0xB0A4ADB1, 0xAAACA0AE, 0x9BA8AB9C,
+ 0xB09FA8AB, 0xA7AD9CAA, 0xA1AAAD9D, 0xAC9DADB0,
+ 0xA8AB9CA9, 0x9CA4A99A, 0xAA9EA6AB, 0xA8ACA0A6,
+ 0x9BA3AA9D, 0xA79BA1A8, 0xA0A596A3, 0x97A2A595,
+ 0xA798A4A7, 0xA2A798A4, 0x98A2A798, 0xA798A0A7,
+ 0xA1A697A2, 0x96A0A695, 0xA595A1A7, 0xA0A695A2,
+ 0x969EA596, 0xA5989EA5, 0xA0A5969E, 0x939DA293,
+ 0xA393A0A3, 0xA0A393A0, 0x93A0A393, 0xA090A0A3,
+ 0xA0A3949D, 0x969DA293, 0xA1959EA2, 0x9DA2939D,
+ 0x939DA293, 0xA0949DA2, 0x9CA0949C, 0x8DA0A498,
+ 0x998E939A, 0x93998E93, 0xA1A3ADA1, 0x736EA2AB,
+ 0x0609076D, 0x00000100, 0x01010000, 0x02000103,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000000, 0x00020000,
+ 0x00010200, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x05080606, 0x07030806, 0x302D280A,
+ 0x7973746A, 0x83798084, 0x82837982, 0x7A86847A,
+ 0x81778684, 0x83817783, 0x7B87857B, 0x847A8785,
+ 0x86847986, 0x78858378, 0x82778583, 0x83817786,
+ 0x79838278, 0x7B738483, 0x8382787D, 0x7A807F75,
+ 0x7F758384, 0x8081777E, 0x78808178, 0x7C728081,
+ 0x7B7C727B, 0x737B7C73, 0x7D757D7B, 0x8280787F,
+ 0x757D7E75, 0x7C737D7E, 0x7F7D757B, 0x717D7B71,
+ 0x7B717E7C, 0x807B727D, 0x74837E75, 0x857D827D,
+ 0x85837B88, 0x737D7E75, 0x7D777B7C, 0x7D7D777D,
+ 0x74818279, 0x7C737C7D, 0x7B7C737B, 0x73818278,
+ 0x7C737C7D, 0x7E7F767B, 0x807C7D73, 0x89838889,
+ 0x66666089, 0x3B61615B, 0x03003F41, 0x01050000,
+ 0x3B000100, 0x5B573A3D, 0x5C5B575A, 0x82676761,
+ 0x7E758888, 0x7D7E757D, 0x747D7E74, 0x7E757D7E,
+ 0x7D7E757D, 0x737B7873, 0x78737B78, 0x7878727B,
+ 0x74787872, 0x7874787A, 0x7C79757B, 0x76807B78,
+ 0x79737E7B, 0x78787279, 0x75787872, 0x78727B7B,
+ 0x76797076, 0x75787970, 0x7F797D7E, 0x7C7C767F,
+ 0x79787970, 0x7E758182, 0x7B7C737D, 0x78808178,
+ 0x81788081, 0x7D7E7580, 0x7480807A, 0x7B757A7A,
+ 0x7D7D777B, 0x7B81817B, 0x81798181, 0x7F7D7583,
+ 0x777F7D75, 0x7D747F80, 0x797A717C, 0x70838179,
+ 0x78707A78, 0x7A78707A, 0x767A7870, 0x7C767C7C,
+ 0x7C7C767C, 0x787F7C78, 0x6A697F7C, 0x4A48476E,
+ 0x05080606, 0x04060705, 0x08050707, 0x01000000,
+ 0x00000101, 0x01010100, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x67000100, 0xA29C6A6B,
+ 0x9FA299A0, 0x949EA39A, 0xA499989D, 0x9EA39A9E,
+ 0xA1A0A49E, 0xA99FA3A7, 0xA1A99FA1, 0x9CA3A89F,
+ 0xAAA1A2A5, 0xA6A9A0A7, 0xA0A8ABA2, 0xA89FA6A9,
+ 0xA4A9A0A3, 0x9FA6ABA2, 0xA9A0A4AA, 0xA6ACA1A4,
+ 0xA2A3A99E, 0xADA2A7AD, 0xA5ABA0A7, 0xA3A4AA9F,
+ 0xACA1A8AE, 0xA3ABA1A6, 0xA4A4ACA1, 0xAEA5A7AF,
+ 0xA6ACA1A9, 0xA3A8ACA0, 0xB2A3ABAF, 0xABAFA3AD,
+ 0xA1A8ACA1, 0xB1A5A8AC, 0xADB1A5AD, 0xA3ABAFA3,
+ 0xB4A9ABAF, 0xAEB4A9B0, 0xA5ABB1A6, 0xB5A8ABB2,
+ 0xA9B0A3AE, 0xABAAB2A7, 0xB2A7AEB6, 0xAAB3A6AA,
+ 0xA8AEB4A9, 0xB4A8AEB5, 0xAFB3A8B0, 0xA4AEB1A8,
+ 0xACA3ACAD, 0xAFB0A6AB, 0xA4A9AFA4, 0xAEA5A7AF,
+ 0xABAEA5A9, 0xA6AEAFA6, 0xB1A8AEAF, 0xB0B1A8B0,
+ 0xA7ACADA3, 0xB1A8B0B1, 0xAEB1A8B0, 0xA8B0B1A8,
+ 0xB0A7AEB1, 0xAEB1A8AF, 0xA6AEB1A8, 0xAFA6ACAF,
+ 0xAEB1A8AC, 0xA2ADB2A9, 0xB2ACA6AB, 0xADB1ABAE,
+ 0xACADB1AB, 0xB2A9AEB2, 0xAEB1A8AF, 0xADA8AFA8,
+ 0xB4ADADB4, 0xAEB2ACAD, 0xABADB1AB, 0xB4ADADB1,
+ 0xAEB5AEAD, 0xABADB3AE, 0xB4ADABB2, 0xAEB6ACAD,
+ 0xB0B1B8B1, 0xB8B1B0B7, 0xB2B9B2B1, 0xB0B1B8B1,
+ 0xB8B1AFB7, 0xB1B8B1B0, 0xB1B1B5AF, 0xB7B3B5B7,
+ 0xB4B8B3B6, 0xB0B2B6B0, 0xB6B0B2B6, 0xB2B6B0B2,
+ 0xB1B2B6B1, 0xB7B0B0B6, 0xB1B8B1B0, 0xB1B2B9B2,
+ 0xB6B1B0B6, 0xACB3AEB0, 0xB1B0B7B2, 0xB8B1B0B8,
+ 0xB1B8B1B0, 0xAFB6B9B0, 0xB8B3B7B8, 0x403D38BB,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC25B605F, 0xC4BFBEC5,
+ 0xBEC4BFBE, 0xBDBABFBD, 0xBFBDBABF, 0xB9C0BDBA,
+ 0xBEBAC1BE, 0xBFBDB9BF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEB9BFBE, 0xBDBCB9BF,
+ 0xB9BFBEB7, 0xBDB9BEBC, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBBBBC0BF, 0xBCBBB7BC, 0xB1B7B6B6, 0xBFB3B9B8,
+ 0xC0BEBAC0, 0xBBC0BEBB, 0xBEBAC1BE, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBCBDC1BC, 0xBFBABDC1, 0xB9BFBAB9,
+ 0xBEBBC0BE, 0xC0BEBAC1, 0xBBC0BEBB, 0xBABBC1BC,
+ 0xBFBAB9BF, 0xBABEB9BB, 0xBBBABEB9, 0xBEBCBCC0,
+ 0xBBBEBCBB, 0xBDBCBFBD, 0xBEBCBCBF, 0xBCBFBDBB,
+ 0xBABBBFBA, 0xC1BCBBBF, 0xBBBFBABD, 0xB9B9C0B9,
+ 0xBCB6BBBF, 0xBBBFB9BA, 0xBBBAC0BB, 0xC2BBBAC0,
+ 0xB5BCB5BB, 0xACB0B5AC, 0xB6ABB0B5, 0xB0B6ABB0,
+ 0xADB0B5AC, 0xB5ACB1B6, 0xAEB1A8B2, 0xAAAEB3AA,
+ 0xB3A8AEB3, 0xAEB4A9AD, 0xA5AEB4A9, 0xB0A3ABB2,
+ 0xB0B4A8A9, 0xA0B2B4A8, 0xADA1AAAC, 0xABAFA3A9,
+ 0xA5ABAFA3, 0xB1A5ADB1, 0xAAAD9EAF, 0x9BABAE9F,
+ 0xA895A6AC, 0xA6AC99A2, 0x9DA9AC9C, 0xA899AAAD,
+ 0xA2A798A5, 0x9CA4A99A, 0xACA0A6AB, 0xA5A99DA8,
+ 0x9BA2A99C, 0xA498A1A8, 0xA3A79BA0, 0x98A8AB9C,
+ 0xA899A5A8, 0xA3A899A5, 0x99A2A798, 0xA798A1A8,
+ 0xA0A798A0, 0x95A1A796, 0xA393A0A6, 0x9BA190A0,
+ 0x929A9F90, 0xA3969AA1, 0x9CA3949C, 0x939EA493,
+ 0xA595A0A3, 0xA2A595A2, 0x90A0A393, 0xA0909DA0,
+ 0xA0A3939F, 0x95A2A498, 0x9F939DA1, 0x9FA1959D,
+ 0x919BA091, 0xA0919BA0, 0x9CA0949B, 0x8C95998D,
+ 0x998D9498, 0x95998D95, 0x6FA3ABA0, 0x0B066F76,
+ 0x070A0805, 0x00000100, 0x01010000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00010000, 0x00000100, 0x00020000,
+ 0x00010000, 0x00000000, 0x00000000, 0x01000000,
+ 0x02000000, 0x29090706, 0x7A75302D, 0x7E7B737E,
+ 0x727D7E74, 0x7F737C7E, 0x8284787D, 0x79838176,
+ 0x81778684, 0x86847A83, 0x7B87857B, 0x857B8785,
+ 0x89877D87, 0x78868479, 0x83798583, 0x84827885,
+ 0x76838278, 0x827A8180, 0x82807884, 0x7A84857B,
+ 0x80768384, 0x83847A7F, 0x75808178, 0x7E747D7E,
+ 0x77786E7D, 0x757D7E75, 0x7D747D7E, 0x7B7C737C,
+ 0x757D7D77, 0x79707B7B, 0x7C7D7478, 0x7D7D7C72,
+ 0x7C718A88, 0x807C7180, 0x7B837E75, 0x847F8882,
+ 0x85817C88, 0x74817F77, 0x7D777C7D, 0x7D7D777D,
+ 0x707B7C73, 0x79707879, 0x7B7C7378, 0x717D7E74,
+ 0x7C737A7B, 0x7D7E757B, 0x7E7D7E74, 0x87828788,
+ 0x67645F8A, 0x39606158, 0x04003F42, 0x00040003,
+ 0x3A000100, 0x5C57373C, 0x5A5B5758, 0x82686862,
+ 0x7E758888, 0x7D7E757D, 0x717E7F75, 0x7E757A7B,
+ 0x7D7E757D, 0x767D7A75, 0x7A757E7B, 0x7D7A757D,
+ 0x757B7B75, 0x7975797B, 0x7E7B777A, 0x787D7875,
+ 0x79737F7C, 0x7C7C7679, 0x777D7D77, 0x7C737D7D,
+ 0x797C7379, 0x6F77786F, 0x7F767879, 0x7B7C737E,
+ 0x787B7C73, 0x7D748081, 0x7C7D747C, 0x757D7E75,
+ 0x7E757D7E, 0x8081787D, 0x777A7C76, 0x81787B7D,
+ 0x7D7E7580, 0x7B81817B, 0x81798181, 0x83817983,
+ 0x74808178, 0x7B727C7D, 0x7B7C737A, 0x737C7D74,
+ 0x796F7B7C, 0x7A796F7A, 0x737E7C74, 0x7B767D7B,
+ 0x83807B7E, 0x67807B78, 0x7B7A6F6A, 0x7F7B7A7F,
+ 0x4F777372, 0x0507534E, 0x0805070A, 0x00020000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x6C660001,
+ 0xA0A39A6A, 0x949DA299, 0x9D94989D, 0x9EA39A98,
+ 0x9EA0A49E, 0xA99F9EA5, 0xA1A99FA1, 0x9CA5AAA1,
+ 0xAAA1A2A5, 0xA5A89FA7, 0x9EA6A9A0, 0xA6A0A4A7,
+ 0xA2A6A0A2, 0xA2A3ABA1, 0xAAA1A6AB, 0xA8ABA2A7,
+ 0x9FA4AA9F, 0xACA3A2AA, 0xA5ABA0A7, 0xA2A5ABA0,
+ 0xACA2A5AD, 0xA5ADA3A4, 0xA2A4ACA1, 0xACA3A5AD,
+ 0xAAB0A5A7, 0xA3ACB0A5, 0xAFA3ABAF, 0xABAFA3AB,
+ 0xA0ABAFA3, 0xB1A5A8AC, 0xADB1A5AD, 0xA3ADB1A5,
+ 0xB2A6ABAF, 0xADB1A5AE, 0xA3ABB2A5, 0xB2A3A9B0,
+ 0xABB2A5AB, 0xAAA7ADA2, 0xB2A7ADB5, 0xABB4A7AA,
+ 0xA7B0B4A8, 0xB4A8AFB3, 0xB1B5AAB0, 0xA4B0B1A7,
+ 0xABA1ADAE, 0xACADA3AC, 0xA2A7ADA2, 0xAFA5A5AD,
+ 0xABB0A7A7, 0xA3AFB0A6, 0xB0A7AEAD, 0xAEAFA5AF,
+ 0xA7AEADA3, 0xB1A8B2B1, 0xB0B1A8B0, 0xA8ADAEA5,
+ 0xB2A9B0B1, 0xB0B1A8B1, 0xA3AEAFA5, 0xB2A8ACAD,
+ 0xB0B1A7B1, 0xA1AFB3A8, 0xB1A8A6AC, 0xADB1ABAC,
+ 0xABADB1AB, 0xB2A9ADB1, 0xADB2A9AD, 0xACA9B0A9,
+ 0xB2ABACB3, 0xAAB1AAAB, 0xACADB4AD, 0xB2ABACB3,
+ 0xACB4ADAB, 0xACACB2AD, 0xB4ADABB1, 0xADB5ABAD,
+ 0xB1B1B9B2, 0xB7B0B0B8, 0xB0B8B1AF, 0xADAFB7B0,
+ 0xB8B1ACB4, 0xB1B8B1B0, 0xB5B1B5AF, 0xB3B1B8B9,
+ 0xB3B4B0B2, 0xAFB4B5B1, 0xB6B0B1B5, 0xB2B6B0B2,
+ 0xB0AFB5B0, 0xB7B0AFB5, 0xAFB7B0B0, 0xAFADB4AD,
+ 0xB6B1AFB6, 0xAFB6AFB0, 0xB1ADB5AE, 0xB8B1B0B8,
+ 0xB0B7B0B0, 0xB2B7BAB1, 0x7A76B8B8, 0x0201007B,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC15C615F, 0xC4BFBDC4,
+ 0xBFC5C0BE, 0xBDBCBFBD, 0xC1BFBABF, 0xBABFBDBC,
+ 0xBDB9C0BD, 0xBFBDB9C0, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDBBC0BF, 0xBDBCB8BE,
+ 0xB9BFBEB7, 0xBDBABFBD, 0xBFBDBABF, 0xBBC0BEBA,
+ 0xBABCC1BF, 0xC1BEB7BC, 0xBAC1BEBA, 0xB5B6BDBA,
+ 0xC0BEB1B8, 0xBBC0BEBB, 0xBDBBC0BE, 0xC1BCBABF,
+ 0xBDC1BCBD, 0xBBBDC1BC, 0xBEB9BCC0, 0xBBC1BCBA,
+ 0xBEBABFBD, 0xC1BFBBC0, 0xBBC0BEBC, 0xB9BDC1BC,
+ 0xBFBABABE, 0xBBBFBABB, 0xBCBBBEBC, 0xBFBABBBE,
+ 0xBCC0BBBB, 0xB9B8BCB7, 0xC0BBBABE, 0xBCC0BBBC,
+ 0xBABCC0BB, 0xBFBABBBF, 0xBBBFBABB, 0xBBBBBFBA,
+ 0xBFB9BCC0, 0xB8BCB6BD, 0xBFBBC1BC, 0xC0B9BDC4,
+ 0xB2B9B2B8, 0xACA9B1A7, 0xB5ACB0B5, 0xB0B5ACB0,
+ 0xACB0B5AC, 0xB2A9B0B5, 0xAEB1A8AF, 0xA9AEB4A9,
+ 0xB4A9AEB4, 0xB0B4A9B0, 0xA8B1B5A9, 0xAFA3B0B4,
+ 0xABB0A1AB, 0xA0AFB1A5, 0xACA0AAAC, 0xABAFA3A8,
+ 0xA5ABB2A5, 0xAFA3ABB2, 0xA9AE9FAB, 0x9DA9AE9F,
+ 0xAF9EA6AE, 0xA3AB9AA7, 0x97A2A897, 0xA798A2A8,
+ 0xA1A697A2, 0x9BA6AB9C, 0xA99AA3AA, 0xA1A899A2,
+ 0x9D9DA497, 0xA99DA3AA, 0xA7A99DA5, 0x9CAAAA9C,
+ 0xA99AA8AB, 0xA2A798A6, 0x97A1A697, 0xA596A1A6,
+ 0xA2A798A0, 0x93A0A695, 0xA3939EA4, 0x9EA493A0,
+ 0x949DA293, 0xA3949CA3, 0x9CA3949C, 0x93A0A695,
+ 0xA595A0A6, 0xA0A393A2, 0x93A0A393, 0xA090A0A3,
+ 0xA0A3939F, 0x95A0A296, 0xA1959DA1, 0x9DA1959D,
+ 0x8E9D9F93, 0x9D8E989D, 0x959C8D98, 0x8D939A8D,
+ 0x9A8B9599, 0xA0A49895, 0x0470746E, 0x08060509,
+ 0x09090905, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x312E2902, 0x727E7B73, 0x7B727E7C, 0x7E7C7280,
+ 0x787D7F73, 0x7F738084, 0x7C7E727B, 0x73808276,
+ 0x83777F7F, 0x85857983, 0x7987857A, 0x84798884,
+ 0x89857A88, 0x79848277, 0x83798684, 0x84837985,
+ 0x7784827A, 0x827A7F80, 0x82807884, 0x757D7C72,
+ 0x82768181, 0x7D7C7282, 0x737A7B72, 0x7D747B7C,
+ 0x7B7C737C, 0x757B7C73, 0x7C737D7E, 0x7B7E7579,
+ 0x6F777A71, 0x81787578, 0x7D7E7580, 0x7E87887E,
+ 0x7C718988, 0x807C717E, 0x7E817F75, 0x817C8986,
+ 0x85817C87, 0x757D7B73, 0x77717D7E, 0x78787277,
+ 0x727B7C73, 0x7C737A7B, 0x7B7C737B, 0x707A7B72,
+ 0x7C737879, 0x7D7E757B, 0x7F7C7D73, 0x88838889,
+ 0x67645F8B, 0x39616259, 0x03003F42, 0x00040002,
+ 0x3B000100, 0x5C57383D, 0x5A5B5758, 0x80686862,
+ 0x7D758889, 0x7F7D757F, 0x75828078, 0x7B737F7D,
+ 0x7D7B737D, 0x747A7870, 0x7A757E7C, 0x7C79747E,
+ 0x797B7A76, 0x7D797C7D, 0x7B7A767E, 0x767F7C78,
+ 0x7B757D7A, 0x7B7C737B, 0x73808178, 0x7D777B7C,
+ 0x7B7C737D, 0x747E7F76, 0x7E757C7D, 0x7B7C737D,
+ 0x78808178, 0x7E758081, 0x7D7E757D, 0x6F7E7F76,
+ 0x81787778, 0x7D7E7580, 0x717D7E75, 0x7B73797A,
+ 0x7D7B737D, 0x797E7F76, 0x7F768182, 0x7E7F767E,
+ 0x737D7E75, 0x81797B7C, 0x82807883, 0x74818279,
+ 0x82797C7D, 0x7C7D7481, 0x757E7C74, 0x7B767F7D,
+ 0x88847F7F, 0x787F7C78, 0x7A797F7C, 0x6F6A697F,
+ 0x70787370, 0x73727873, 0x534F4E78, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x01010101, 0x00000000, 0x00000100, 0x01000001,
+ 0xA0A29C00, 0x9BA3A7A1, 0x9D949FA4, 0x989D949A,
+ 0x9FA0A49E, 0xA59E9FA6, 0x9DA59B9E, 0x9AA3A89F,
+ 0xA9A0A0A3, 0xA6A8A2A6, 0xA2A4A79E, 0xA6A0A6AB,
+ 0xA0A49EA2, 0xA0A5AAA1, 0xACA1A4A9, 0xA9ADA2A8,
+ 0x9EA5ABA0, 0xABA0A3A9, 0xA8ACA1A7, 0xA2A4AA9F,
+ 0xAEA4A5AD, 0xA5ADA3A6, 0xA2A4ACA1, 0xAFA5A7AD,
+ 0xA7AFA4A7, 0xA0A9AFA4, 0xAFA2A6AD, 0xA9B0A3A8,
+ 0xA0ABAFA3, 0xACA0A8AC, 0xADB1A5A8, 0xA0AEB2A7,
+ 0xAFA3A8AC, 0xABAFA3AB, 0xA3ACB0A4, 0xB0A1ABAF,
+ 0xABB2A3AB, 0xA2A8AFA2, 0xB1A6A8AF, 0xADB5AAA9,
+ 0xA9AFB3A7, 0xABA0B1B5, 0xA6AA9FA7, 0xA1AEB2A7,
+ 0xABA1A8AC, 0xADAEA4AA, 0xA1A9ADA2, 0xAFA5A6AC,
+ 0xAAAFA6A7, 0xA3ACB0A5, 0xB2A8ACAD, 0xADAEA4B1,
+ 0xA7AEAFA5, 0xB2A9B0B1, 0xAEAFA6B1, 0xA8AAABA1,
+ 0xB1A7B1B2, 0xB0B1A7B0, 0xA4ACADA4, 0xB0A8ACAD,
+ 0xB0B1A8B2, 0xA1AFB3A8, 0xAFA6A8AC, 0xACB1A8AC,
+ 0xAAACB1A8, 0xB1ABAEB3, 0xACB3ACAD, 0xACACB0AB,
+ 0xB2ABABB1, 0xABB2ABAB, 0xABAFB3AD, 0xB2ABABB2,
+ 0xABB2ABAB, 0xACABB1AC, 0xB2ABABB1, 0xAAB2ABAA,
+ 0x8FB0B9AF, 0x98918E96, 0xB0B7B290, 0xADAEB9B1,
+ 0xB6B1AAB5, 0xADB3AEAF, 0xAFB1B5B0, 0xB1B0B2B3,
+ 0xB4B5B1B3, 0xB0B5B6B2, 0xB6B0B4B6, 0xB2B6B0B2,
+ 0xAFB0B4AF, 0xB5B0AEB4, 0xB1B7B2AF, 0xB0AFB6AF,
+ 0xB5AFB0B7, 0xB2B6B0B1, 0xACABB2AB, 0xB7ADAEB6,
+ 0xB3B8AFAF, 0xB3B6B9B0, 0x3D39B9B9, 0x0001003E,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF5B605E, 0xC4BFBDC4,
+ 0xBEC4BFBE, 0xBEBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBDB9C0BD, 0xBFBDB9C0, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD, 0xC0BFBABF,
+ 0xB8BFBCBB, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBEBBC0BE, 0xC1BEBBC0, 0xBAC1BEBA, 0xBABAC1BE,
+ 0xBCBAB6BD, 0xBBC0BEB7, 0xBEBCC1BF, 0xC0BBBBC0,
+ 0xBEC2BDBC, 0xB9BDC1BC, 0xC1BCBABE, 0xBDC1BCBD,
+ 0xBEBABFBD, 0xC0BEBBC0, 0xBBC0BEBB, 0xBABDC1BC,
+ 0xC1BCBBBF, 0xBEC2BDBD, 0xBCBBBEBC, 0xBFBABBBE,
+ 0xBABEB9BB, 0xB7BDC1BC, 0xBEB9B8BC, 0xBCC0BBBA,
+ 0xBABBBFBA, 0xBFBAB9BF, 0xB9BFBAB9, 0xBABBBFBA,
+ 0xBFB9BBBF, 0xBBBFB9BB, 0xBBBAC0BB, 0xB8B1BAC0,
+ 0xB1B8B1B1, 0xA7AEB5AE, 0xB5ABA9B1, 0xADB5ABAD,
+ 0xACB0B5AC, 0xB1A8B0B5, 0xAEB2A7AE, 0xA8ADB3A8,
+ 0xB4A9ADB3, 0xAFB3A8B0, 0xA9B0B4A8, 0xB6A7B1B5,
+ 0xA8AD9EB1, 0xA5ADAFA3, 0xB1A5AFB1, 0xA8ACA0AD,
+ 0xA3A9B0A3, 0xAFA3A9B0, 0xA8ACA0AB, 0x9FA8AFA0,
+ 0xAD9CA8B0, 0xA6AE9DA5, 0x9DA5AB9A, 0xAD9EA8AE,
+ 0xA2A798A8, 0x99A1A899, 0xAA9BA1A8, 0xA2A99AA3,
+ 0x9EA1A89B, 0xA99DA6AA, 0xA7A99DA5, 0x96A4A798,
+ 0xA596A2A5, 0xA0A596A2, 0x98A2A798, 0xA798A2A7,
+ 0xA2A798A2, 0x97A2A897, 0xA595A2A8, 0xA2A595A2,
+ 0x96A0A596, 0xA1929EA5, 0x9CA3949A, 0x919EA493,
+ 0xA3939EA4, 0xA0A393A0, 0x93A0A393, 0xA090A0A3,
+ 0x9C9F909F, 0x939DA195, 0x9C909B9F, 0x989C9098,
+ 0x91989C91, 0x9D90989C, 0x969D9096, 0x8E9EA598,
+ 0xA4999399, 0x80837AA0, 0x08080905, 0x0808070A,
+ 0x08080808, 0x00020000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00010200, 0x00000100, 0x00000000,
+ 0x00000000, 0x00010000, 0x2B000100, 0x5D572E2F,
+ 0x8D8B835D, 0x717E7C71, 0x7C717E7C, 0x7E7C717E,
+ 0x78828478, 0x7F738284, 0x7D7F737D, 0x717D7F73,
+ 0x7E727B7D, 0x7F7F737E, 0x79868479, 0x84798884,
+ 0x87837888, 0x77858379, 0x82788281, 0x82817783,
+ 0x77818279, 0x7F777F80, 0x83817981, 0x77818076,
+ 0x7B718281, 0x7D7C727C, 0x707F7D75, 0x79707879,
+ 0x7A7B7278, 0x757D7E75, 0x7D747D7E, 0x7B7E757A,
+ 0x75787B72, 0x7E757B7E, 0x7B7C737D, 0x9685897E,
+ 0x7C719FA0, 0x7E7C727E, 0x7685827A, 0x7A75817E,
+ 0x817D787E, 0x707C7A72, 0x78727879, 0x78787278,
+ 0x747B7C73, 0x7C737C7D, 0x7879707B, 0x73787970,
+ 0x7E757B7C, 0x7D7E757D, 0x807C7D73, 0x88828889,
+ 0x65655F88, 0x3A60605A, 0x03003E40, 0x00030102,
+ 0x3B000100, 0x5C57383D, 0x5A5C5658, 0x80686862,
+ 0x7D758889, 0x7F7D757F, 0x75817F77, 0x7D757F7D,
+ 0x7A78707F, 0x737B7971, 0x78737D7B, 0x7C79747B,
+ 0x727E7E78, 0x7A767678, 0x7E7E787B, 0x77807D79,
+ 0x7C737F7C, 0x797A717B, 0x757B7C73, 0x7D777D7E,
+ 0x7878727D, 0x757D7E75, 0x81787D7E, 0x7D7E7580,
+ 0x757D7E75, 0x7C737D7E, 0x7E7F767B, 0x747D7E75,
+ 0x7C737C7D, 0x7D7E757B, 0x70808178, 0x78707879,
+ 0x7C7A727A, 0x797E7F76, 0x7F768182, 0x7A7B727E,
+ 0x797B7C73, 0x7D758182, 0x7D7B737F, 0x74838179,
+ 0x7D747C7D, 0x7C7D747C, 0x747E7C74, 0x7A757E7C,
+ 0x7A77727E, 0x787F7C78, 0x7B7A7F7C, 0x807B787F,
+ 0x6F78746F, 0x73707874, 0x77747078, 0x1C5D5C58,
+ 0x01002120, 0x00010000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x36373300, 0xA0949893, 0xA29CA2A6, 0x989C96A0,
+ 0x9E9AA19A, 0xA59E9EA5, 0xA1A69D9E, 0x9B9EA499,
+ 0xA9A0A2A6, 0xA8A9A0A8, 0xA1A4A79E, 0xA9A0A5AA,
+ 0xA0A59CA6, 0x9FA3A89F, 0xAA9FA6AA, 0xA7ABA0A6,
+ 0xA0A6ACA1, 0xAA9FA5AB, 0xA8ACA1A6, 0x9FA7ADA2,
+ 0xADA2A2AA, 0xA5ADA2A5, 0xA1A6ADA0, 0xADA2A7AE,
+ 0xA8B0A5A5, 0xA0AAB1A4, 0xB0A5A6AD, 0xABB2A5AA,
+ 0xA1ACB0A4, 0xACA0ABB0, 0xAEB2A6A8, 0xA3ACB0A5,
+ 0xADA1ABAF, 0xADB2A3A9, 0xA5ADB1A5, 0xB0A1ADB1,
+ 0xADB2A3AB, 0xA6ABB2A5, 0xB9AEACB3, 0xAFB4ABB1,
+ 0x8F969A8F, 0xABA0969A, 0xA7ABA0A7, 0xA0A8ACA1,
+ 0xACA1A8AC, 0xA9ADA2A8, 0xA2ABAFA4, 0xABA2A6AB,
+ 0xAAAFA6A6, 0xA3ACB0A5, 0xB0A5AAAE, 0xACB0A5AC,
+ 0xA5ACB0A5, 0xB1A8ACB0, 0xACAFA6AE, 0xA6AAADA4,
+ 0xB0A5ADB1, 0xACB0A5AC, 0xA4A8ABA2, 0xB1A8AAAD,
+ 0xB0B1A8B0, 0xA1ACB0A5, 0xB0A7A8AC, 0xAFB2A9AD,
+ 0xA8ACB1A8, 0xB3A9ACB1, 0xABB2ABAB, 0xA9ADB1AB,
+ 0xB2ABABAF, 0xADB1ABAB, 0xA9ADB1AB, 0xB1ABABAF,
+ 0xACB0AAAD, 0xADABAFA9, 0xB0A9AFB3, 0xA9B1A7A9,
+ 0x6DB1B9AF, 0x544D6F77, 0xB0B7B24D, 0xACB0B8B1,
+ 0xB4ADABB3, 0xA5ACA5AC, 0xAFB0B4AE, 0xB7B3B1B5,
+ 0xB2B3AFB6, 0xB0B4B6B0, 0xB6B0B2B6, 0xB2B6B0B2,
+ 0xAFB0B4AE, 0xB4AEB1B5, 0xAFB6AFB0, 0xAFAFB6AF,
+ 0xB6B0AFB6, 0xB2B6B0B2, 0xACAFB3AD, 0xB5ACB0B5,
+ 0xB0B5ACB0, 0xB2B6B9B0, 0x3D3BB6B8, 0x0001003C,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBA565B59, 0xBFBAB8BF,
+ 0xB8BFBAB8, 0xBEB9C0BD, 0xBFBEBAC1, 0xB9BFBEB9,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBDC0BEBD, 0xBABCBFBD, 0xBEBCB9BF,
+ 0xBBC0BEB9, 0xBCBBBEBC, 0xC0BBBBBE, 0xB9BFBABA,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBCBBBEBC, 0xC1BCBBBE,
+ 0xBBBFBABD, 0xBBBBBFBA, 0xC0BABCC0, 0xBEC2BCBC,
+ 0xBCBDC1BC, 0xBFBDBDC1, 0xBCBFBDBC, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBEBEC1BF, 0xBFBDBDC0,
+ 0xBBBEBCBC, 0xBABBBFBA, 0xBEB9BBBF, 0xB9BDB8BA,
+ 0xB9B6BDB6, 0xC0B9B8C0, 0xB8C0B9B8, 0xB5BAC1BA,
+ 0xBBB6B5BC, 0xBAC0BBB5, 0xAFBEC4BF, 0xB4AFB0B4,
+ 0xB0B4AEB0, 0xACAFB6AF, 0xB0A9ABB3, 0xADB5AEA8,
+ 0xA9ACB4AA, 0xB2A7ABB3, 0xACB2A7AC, 0xA6AEB5A8,
+ 0xB4A8ACB3, 0xB0B4A8B0, 0xA8B0B4A8, 0xB4A8B0B4,
+ 0xA8ACA0B0, 0xA3A8ACA0, 0xAFA0ABAF, 0xABB0A1AA,
+ 0xA1A9ADA1, 0xAFA2A9AD, 0xA6ADA0A8, 0x9EA6AD9E,
+ 0xAD9EA6AD, 0xA8AD9EA8, 0x9EA6AD9E, 0xAB9EA6AD,
+ 0xA2A99CA4, 0x9BA4AB9C, 0xAC9CA3AA, 0xA3AA9BA2,
+ 0x9DA2A99C, 0xA79BA5A9, 0xA0A498A3, 0x959A9F90,
+ 0xA79B9FA4, 0xA2A99CA3, 0x98A0A798, 0xA798A0A7,
+ 0xA0A798A0, 0x97A2A897, 0xA693A2A8, 0xA2A693A2,
+ 0x96A0A695, 0xA394A1A7, 0x989F909C, 0x929BA190,
+ 0xA3949FA2, 0xA0A394A0, 0x96A2A596, 0xA092A2A5,
+ 0x989B8CA0, 0x8F999D91, 0x9B8F949A, 0x989E9397,
+ 0x989BA097, 0xA1979AA2, 0x98A09699, 0x9FA0A89E,
+ 0x706CA3A8, 0x0607056F, 0x00000000, 0x00010000,
+ 0x02000102, 0x00020000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000002, 0x01010402,
+ 0x03010003, 0x00040000, 0x7851534D, 0x81787E81,
+ 0x8081777E, 0x777F8175, 0x81758386, 0x81817581,
+ 0x76828276, 0x857B8282, 0x85847A86, 0x77848478,
+ 0x82788383, 0x83827884, 0x77838176, 0x82788482,
+ 0x82817784, 0x78828078, 0x7F768081, 0x8081787E,
+ 0x76808177, 0x7B727F80, 0x7A7B727A, 0x74808178,
+ 0x7D757C7D, 0x7D7B737F, 0x6E7D7B73, 0x746A7978,
+ 0x7D7C7275, 0x757D7E75, 0x7C737D7E, 0x7D7E757B,
+ 0x737A7B72, 0x7C737B7C, 0x7879707B, 0x9386877D,
+ 0x92889C9D, 0x7E7C7294, 0x78828078, 0x7B738280,
+ 0x7D7B737D, 0x727B7873, 0x78737A77, 0x7D7A757B,
+ 0x6F7B7C73, 0x7C737879, 0x7D7E757B, 0x75808178,
+ 0x7C727D7E, 0x7F7E747D, 0x807E7C74, 0x88828889,
+ 0x62635F88, 0x4F535450, 0x01005253, 0x00010000,
+ 0x3B000100, 0x5B573A3D, 0x5A5C565A, 0x88686862,
+ 0x837B9091, 0x77756D85, 0x757F7D75, 0x7A757F7D,
+ 0x7A77727D, 0x70787970, 0x79707879, 0x7B7C7378,
+ 0x707B7C73, 0x7B757879, 0x7D7E757B, 0x757D7D77,
+ 0x7C737D7E, 0x7D7E747B, 0x797F7D75, 0x7C778381,
+ 0x7F7C777F, 0x737D7E75, 0x81787B7C, 0x7C7F767E,
+ 0x707B7C73, 0x79707879, 0x80817878, 0x727B7C72,
+ 0x7E757B7C, 0x8081787D, 0x77828078, 0x7B76817F,
+ 0x7F7C777E, 0x76807E76, 0x7B71807E, 0x7E7F757A,
+ 0x75828078, 0x7D757F7D, 0x817F7780, 0x75838179,
+ 0x79707F7D, 0x78797078, 0x737B7873, 0x78737B78,
+ 0x7D7A757B, 0x797E7B77, 0x7B777E7D, 0x7C79757C,
+ 0x737B7873, 0x736E7B78, 0x726F6A76, 0x72787872,
+ 0x5C567878, 0x2524205C, 0x00020000, 0x00000200,
+ 0x00000002, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x9F343735, 0xA49FA0A4, 0xA0A49EA0,
+ 0x979AA19A, 0xAAA099A1, 0xA0A59CA2, 0x9FA2A69B,
+ 0xA9A0A8A9, 0xA8A9A0A8, 0x9FA8A9A0, 0xA99FA6AA,
+ 0xA5A99EA8, 0xA0A5A99D, 0xACA0A8AC, 0xA5A99DA8,
+ 0xA0A6AA9E, 0xAB9FA8AC, 0xA7AB9FA7, 0x9EA9ADA1,
+ 0xAA9DA4AB, 0xA4AB9EA3, 0xA1A5AC9D, 0xAFA0A9B0,
+ 0xA8AFA0A8, 0xA0A9AE9F, 0xAB9FAAAF, 0xA9ADA1A7,
+ 0xA2A8AFA2, 0xAC9DA8AF, 0xA8AFA0A5, 0xA6ACB0A4,
+ 0xACA0AEB2, 0xABAFA3A8, 0xA5B0B4A9, 0xB0A1ADB1,
+ 0xABAFA3AB, 0xA7ACB2A7, 0xBBB1ACB2, 0xA3A89FB3,
+ 0x87909188, 0xA9A08F90, 0xA6A9A0A8, 0xA0A3A99E,
+ 0xAB9FA3AB, 0xA7ABA0A7, 0xA2AAADA4, 0xABA2A6AB,
+ 0xA8ADA4A6, 0xA2A8ADA4, 0xB0A7A6AB, 0xA9AEA5AB,
+ 0xA7A8ADA4, 0xB0AAABB0, 0xA6ABA2AC, 0xA5A7ACA3,
+ 0xAEA5A9AE, 0xABB0A7A9, 0xA2A5ACA5, 0xAFA9A2A9,
+ 0xABB0A7AB, 0xA5ACB0A5, 0xB1A8ACB0, 0xAEB1A8B0,
+ 0xA2AFB5AA, 0xADA2A7AD, 0xA8B0A6A5, 0xA6AAAFA6,
+ 0xB3AAAAAF, 0xAEB3AAAE, 0xA8AFB2A9, 0xB1A8AEB1,
+ 0xAEB1A8AE, 0xAAB1B2A9, 0xB3AAB2B3, 0xB0B3AAB0,
+ 0x74B6BBB2, 0x403A787D, 0xB6BAB43C, 0xADAFB7AD,
+ 0xB7ADAEB7, 0xAEB7ADAE, 0xABADB5AB, 0xB8AFADB5,
+ 0xB3B8AFB3, 0xACB1B6AD, 0xB5ACB0B5, 0xB0B5ACB0,
+ 0xACACB4AA, 0xB5ACB0B5, 0xB0B4AEB0, 0xADAFB3AD,
+ 0xB3ADAFB3, 0xAFB3ADAF, 0xADB1B3AD, 0xB3ADB1B3,
+ 0xB0B4AEAF, 0x79B7BBB5, 0x01007A7E, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0xBA565C57, 0xC0B9B8BF,
+ 0xB8C0B9B8, 0xBDB8BFBA, 0xBFBEB9C0, 0xBABFBEBA,
+ 0xBEBBC0BE, 0xBFBDBBC0, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBEC1BFBD, 0xBABDC1BC, 0xBFBABBBF,
+ 0xB9BFBAB9, 0xBCBCBFBD, 0xBFBABBBE, 0xBBC1BCB9,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBCBDC0BE, 0xBFBABBBE,
+ 0xBABEB9BB, 0xBABBBFBA, 0xBFB9BBBF, 0xBDC1BBBB,
+ 0xBBBDC1BC, 0xC0BEBCC0, 0xBCBFBDBD, 0xBBBBBFBA,
+ 0xC0BBBCC0, 0xBBBFBABC, 0xBDBCBFBD, 0xBFBDBCBF,
+ 0xBCBFBDBC, 0xBABBBFBA, 0xBFBABBBF, 0xB9BFBABB,
+ 0xB6B6BDB6, 0xBDB6B5BD, 0xB9C1BAB5, 0xB5BAC1BA,
+ 0xBBB6B5BC, 0xBEC4BFB5, 0xAFB3B9B4, 0xB3AFB0B4,
+ 0xB0B4AFB2, 0xAEAEB5AE, 0xB1A9ADB5, 0xA8B0A9A6,
+ 0xA9ABB3A9, 0xB4A9ABB3, 0xABB2A5AE, 0xA3AFB6A9,
+ 0xB2A6ABB2, 0xAEB2A6AE, 0xA5B1B5A9, 0xAEA2ADB1,
+ 0xABAFA3AA, 0xA3ABAFA3, 0xADA1ABAF, 0xAAAFA0A9,
+ 0xA2AAAEA2, 0xAEA2AAAE, 0xA6ADA0AA, 0x9CA4AB9C,
+ 0xAFA0A4AB, 0xAAAFA0AA, 0x9AA6AB9C, 0xAB9EA2A9,
+ 0xA6ADA0A4, 0x9CA6AD9E, 0xA798A4AB, 0xA0A798A0,
+ 0x9DA5A99D, 0xA79BA5A9, 0xA3A79BA3, 0x9AA4A99A,
+ 0xAA9DA4A9, 0xA2A99CA3, 0x98A0A798, 0xA798A0A7,
+ 0xA1A899A0, 0x95A0A695, 0xA491A0A6, 0x9DA18EA0,
+ 0x8F9AA08F, 0x9E8F9AA0, 0x9A9F9099, 0x909B9E8E,
+ 0xA0919DA0, 0x9A9D8E9D, 0x8D949788, 0x9789999C,
+ 0x999C8D97, 0x90999D92, 0x9D91959B, 0x989E9399,
+ 0x9999A197, 0x9F9898A0, 0x98A09997, 0x6CA2A9A2,
+ 0x06066D71, 0x06050706, 0x00000000, 0x00010000,
+ 0x02000102, 0x00020000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000001,
+ 0x00020000, 0x00000200, 0x00010002, 0x00020300,
+ 0x2C280203, 0x7B7D772B, 0x787E807A, 0x82777E81,
+ 0x7D81767E, 0x757D8175, 0x85797F81, 0x83857983,
+ 0x78848478, 0x847A8484, 0x84827886, 0x79858378,
+ 0x83798684, 0x86847A85, 0x79838176, 0x83798585,
+ 0x85837B84, 0x76828078, 0x82797E7F, 0x80817781,
+ 0x757E7F75, 0x7D747E7F, 0x7C7D747C, 0x727C7F76,
+ 0x7B757A7B, 0x7D7B737B, 0x72838278, 0x73687D7C,
+ 0x79786E75, 0x737B7C73, 0x7C737B7C, 0x7D7E757B,
+ 0x737B7C73, 0x7D747B7C, 0x8081787C, 0x897C7B71,
+ 0x92889493, 0x7E7C7294, 0x737D7B73, 0x7C737B7C,
+ 0x75766D7B, 0x767B7873, 0x78737E7B, 0x7A78707B,
+ 0x727D7E74, 0x79707B7C, 0x7B7C7378, 0x737C7D74,
+ 0x7D757B7C, 0x7C7B717F, 0x827E7C74, 0x88828888,
+ 0x62635F86, 0x504F534E, 0x00005155, 0x00000000,
+ 0x3B000100, 0x5A563A3D, 0x5A5C5659, 0x87686862,
+ 0x837B8F90, 0x77756D85, 0x747D7B73, 0x78737E7C,
+ 0x7B78737B, 0x707B7C73, 0x7C737879, 0x7C7D747B,
+ 0x737B7C73, 0x7C737B7C, 0x7C7D747B, 0x787B7C73,
+ 0x7C728081, 0x7D7E757B, 0x8488867E, 0x7F7C8C89,
+ 0x7F7C7884, 0x787F7C77, 0x7D748081, 0x7679707A,
+ 0x757C7D74, 0x81787D7E, 0x7C7D7480, 0x747D7E74,
+ 0x81787D7E, 0x81827980, 0x75817F77, 0x7D787F7D,
+ 0x817E7980, 0x78838179, 0x7F758280, 0x7E7F757E,
+ 0x76817F77, 0x7D75807E, 0x807E7680, 0x757D7B73,
+ 0x7C737F7D, 0x7A7B727B, 0x777F7C77, 0x78737F7C,
+ 0x7C79747B, 0x787A7975, 0x7D797D7C, 0x7E7D797E,
+ 0x767F7C77, 0x78737E7B, 0x7E7B767B, 0x70787970,
+ 0x78727879, 0x78787278, 0x0052504F, 0x00000200,
+ 0x02000002, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x6B000000, 0xA4A26A6D, 0x9EA49FA1,
+ 0x9799A099, 0xA19798A1, 0x9EA39A99, 0x9DA2A69B,
+ 0xA49CA6A7, 0xA8A69EA6, 0x9FA6A79D, 0xAAA0A8A9,
+ 0xA1A298A9, 0x9CA3A79B, 0xAA9BA6AB, 0xA3A79BA5,
+ 0x9FA6AA9E, 0xACA1A6AA, 0xA8ACA1A8, 0xA0A7AB9F,
+ 0xAD9EA8AC, 0xA4AB9CA6, 0x9DA2A99A, 0xAFA0A5AC,
+ 0xA8AFA0A8, 0xA1A8AD9E, 0xADA1A9AD, 0xA9ADA1A9,
+ 0xA2A1A89B, 0xAFA0A8AF, 0xA5AC9DA8, 0xA4AEB2A6,
+ 0xB1A5ACB0, 0xABAFA3AD, 0xA5ACB0A5, 0xAFA3ADB1,
+ 0xABAFA3AB, 0xA8ABB1A6, 0xBBB1ACB1, 0xA3A89FB3,
+ 0x91909188, 0xA7A19B99, 0xA5A7A1A7, 0x9EA1A99F,
+ 0xACA1A1A9, 0xA6AA9FA6, 0xA7A6ABA2, 0xABA2A9AD,
+ 0xA8ADA4A6, 0xA1A8ADA4, 0xAFA9A5AA, 0xA6AAA4AB,
+ 0xA4A6AEA4, 0xB0A9A6AE, 0xA3ABA1A9, 0xA5A8ADA4,
+ 0xAFA5A7AF, 0xA7AFA5A7, 0x9DA6ADA6, 0xACA59DA4,
+ 0xA7ABA5A5, 0xA3ABAEA5, 0xAFA5AAAE, 0xACB0A5AE,
+ 0xA6ACB0A5, 0xAEA3ABB1, 0xA1A99EA6, 0xA4A5ADA2,
+ 0xB0A5A9AF, 0xAAB0A5AA, 0xA8AEB1A8, 0xB1A7B0B1,
+ 0xB0B1A7B0, 0xAAB3B1A9, 0xB3AAB4B2, 0xB2B3AAB2,
+ 0x38B8BBB2, 0x01003E41, 0x797A7600, 0xACBBC0B7,
+ 0xB7ACAFB7, 0xADB7ABAF, 0xAEB0BAAE, 0xB0A5B0BA,
+ 0xADB5AAA8, 0xACB0B8AE, 0xB8AFAEB6, 0xB0B5ACB3,
+ 0xABB0B5AC, 0xB5ACB0B6, 0xB0B5ACB0, 0xADAFB3AD,
+ 0xB4AEAFB3, 0xAFB3ADB0, 0xAEB1B2AE, 0xB4AEAFB3,
+ 0xAEB2ACB0, 0x3CB6BCB7, 0x01003B3E, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0xB9555B56, 0xC0B9B9C0,
+ 0xB8C0B9B8, 0xBBB6BCB7, 0xBDBDB8BD, 0xBABFBEBB,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBDB7BBB6, 0xC0BEBEC2, 0xBDC0BEBD,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBDC0BEBD, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBDC0BE, 0xC1BCBDC0,
+ 0xBBBFBABD, 0xBBBBBFBA, 0xBFBABCC0, 0xBABEB9BB,
+ 0xBBBBC1BC, 0xC0BEBAC0, 0xBDC0BEBD, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBDBCBFBD, 0xBFBDBCBF,
+ 0xBCBFBDBC, 0xBABBBFBA, 0xBFBABBBF, 0xB9BFBABB,
+ 0xB7B9C0B9, 0xBCB7B6BE, 0xB7BDB8B6, 0xBBBAC0BB,
+ 0xC4BFBAC0, 0xBAC0BBBE, 0xAFAEB4AF, 0xB4AFAEB4,
+ 0xB0B4AFB0, 0xAEACB3AC, 0xB2ADADB5, 0xA8B0A9AB,
+ 0xAAABB3A9, 0xB4A9AEB3, 0xACB3A6AE, 0xA5A7AEA1,
+ 0xB3A4ADB4, 0xAEB3A4AE, 0xA5ACB0A4, 0xAFA3ADB1,
+ 0xABAFA3AB, 0xA5ADB1A6, 0xAEA2ADB1, 0xA9ADA1AA,
+ 0xA1ABADA1, 0xAEA2A9AD, 0xA7AB9FAA, 0x9EA8AD9E,
+ 0xAD9DA9AF, 0xA6AC9BAA, 0x9AA6AB9C, 0xADA1A4A9,
+ 0xA8ACA0A9, 0x98A6AB9C, 0xA99CA0A7, 0xA2A99CA2,
+ 0x9DA4A89C, 0xAA9EA5A9, 0xA5A99DA6, 0x9CA3A79B,
+ 0xA89CA4A8, 0xA5A99DA4, 0x95A0A596, 0xA394A0A6,
+ 0x9DA2939E, 0x939BA190, 0xA6959EA4, 0x9FA594A0,
+ 0x94A0A491, 0xA493A1A7, 0x9FA5949E, 0x8F9DA090,
+ 0x9D8E9C9F, 0x9C9F909A, 0x90979B8F, 0x9B8D9A9C,
+ 0x9FA2939B, 0x93999D92, 0x9D919A9E, 0x999D929B,
+ 0x9998A197, 0x9F9A96A1, 0x989F9A98, 0x066A6F6E,
+ 0x05070305, 0x09060808, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00010000, 0x772D2C28,
+ 0x7B777D7D, 0x7F7C777E, 0x7880807A, 0x81788081,
+ 0x81827880, 0x757B7C72, 0x80748181, 0x82827680,
+ 0x7A848277, 0x83798684, 0x84827885, 0x76848277,
+ 0x82798381, 0x87827987, 0x79838176, 0x83798684,
+ 0x83827884, 0x75807F75, 0x7D73807F, 0x7E7D737E,
+ 0x747C7D73, 0x7C737C7D, 0x8081787B, 0x737F8077,
+ 0x7C737B7C, 0x7B7C737B, 0x6E7C7B71, 0x786E7978,
+ 0x79786E79, 0x73787970, 0x7D757B7C, 0x7E7C747F,
+ 0x727A7A74, 0x7E757878, 0x8280787D, 0x707E7C72,
+ 0x7B727D7B, 0x7E7C7280, 0x6F7C7A72, 0x7C737575,
+ 0x75766D79, 0x737A7772, 0x78707B78, 0x797A717A,
+ 0x6F7A7B71, 0x7C737879, 0x7B7C737B, 0x737A7A74,
+ 0x78707B7C, 0x807E767A, 0x827C7C76, 0x88828888,
+ 0x60645E86, 0x4F515550, 0x01015054, 0x00000001,
+ 0x3B000100, 0x5C573A3D, 0x585C5658, 0x88666862,
+ 0x847B8E91, 0x75766D83, 0x74797973, 0x7B757A7A,
+ 0x7979737B, 0x76787970, 0x7E747E7F, 0x7B7C727D,
+ 0x757D7E75, 0x7D747D7E, 0x7B7C737C, 0x7577786F,
+ 0x7E757D7E, 0x7E7F767D, 0x8181817B, 0x7F7C8885,
+ 0x7F7C7884, 0x7A827F7A, 0x81788080, 0x7B7C7380,
+ 0x757B7C73, 0x7D737D7E, 0x7C7D737C, 0x727D7E75,
+ 0x7F767A7B, 0x8081787E, 0x7B7F7C77, 0x7F798380,
+ 0x7F7F797F, 0x79828078, 0x7B728381, 0x7D7E757A,
+ 0x77827F7A, 0x7D787F7C, 0x807D7880, 0x76817F77,
+ 0x7E757E7F, 0x7D7E757D, 0x757B7873, 0x7A757D7A,
+ 0x7F7C777D, 0x787C7C76, 0x7F797E7E, 0x7E7B767F,
+ 0x78807B78, 0x7B78807B, 0x7F7C7780, 0x70787970,
+ 0x79707879, 0x76787276, 0x4F787977, 0x28284F4F,
+ 0x00000128, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x6D6B0000, 0x9EA49F6A,
+ 0x979CA39C, 0xA29898A1, 0x9EA39A9A, 0x9EA4A79E,
+ 0xA69DA6A7, 0xA6A79EA5, 0x9CA6A79D, 0xAAA0A5A6,
+ 0xA3A49AA9, 0x9DA3A79B, 0xA99DA3AA, 0xA3A79BA5,
+ 0x9FA4AA9F, 0xA9A0A3A8, 0xA6A9A0A6, 0xA1A6ACA1,
+ 0xADA0A7AE, 0xA6ADA0A6, 0x9AA4A89C, 0xAFA0A4A9,
+ 0xA9B0A1A8, 0x9EABAFA3, 0xAEA2A8AA, 0xA9ADA1AA,
+ 0xA29FA699, 0xAFA0A8AF, 0xA5AC9DA8, 0xA5AAAEA2,
+ 0xB1A5ADB1, 0xABAFA3AD, 0xA3ABAFA3, 0xB0A4ABAF,
+ 0xABAFA4AC, 0xB1ACB2A7, 0xBBB1B5BA, 0xA2A6A0B3,
+ 0x928D8F89, 0xA9A39898, 0xA7A9A3A9, 0x9FA3A89F,
+ 0xADA2A2AA, 0xA6AA9FA7, 0xA4A8ABA2, 0xABA2AAAD,
+ 0xAAADA4A8, 0xA2A8ABA2, 0xACA6A8AB, 0xA8AAA4AA,
+ 0xA4A8ADA4, 0xAEA5A8AD, 0xA7ACA3A9, 0xA4A9ADA2,
+ 0xAFA4A9AF, 0xA9AEA5A9, 0xA3A4A8A2, 0xA7A2A3AA,
+ 0xA8ACA6A1, 0xA3AAADA4, 0xAFA5ACAD, 0xAEB2A7AE,
+ 0xA4ACB0A5, 0xAFA6A9AF, 0xA5ADA3AA, 0x9FA1A99F,
+ 0xAFA6A1A9, 0xAAAFA6AA, 0xA8AFB2A9, 0xB2A7AEB1,
+ 0xB0B1A7AE, 0xAAB2B0A8, 0xB0AAB4B2, 0xB0B2ACB0,
+ 0x3AB8BAB4, 0x01003E40, 0x3F403E00, 0xADBBBFB9,
+ 0xB5ACB1B6, 0xAFB7ADB0, 0xAEB0BAAE, 0xACA1B0BA,
+ 0xAAB0A5A4, 0xAEB3B8AF, 0xB4AEB0B4, 0xB0B5ACB2,
+ 0xACB0B5AC, 0xB4AEB0B5, 0xADB4ADB0, 0xABACB4AA,
+ 0xB5ACAFB4, 0xABADA7B0, 0xAEAFB3AE, 0xB3ADAFB3,
+ 0xB3BAB3AF, 0x3EB8BCB7, 0x01003D40, 0x00010000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0xBB565C57, 0xBFBAB9C0,
+ 0xB8BFBAB8, 0xB8B6BCB7, 0xBCBCB9BD, 0xB8BDBCBA,
+ 0xBCB8BDBB, 0xBEBCB9BE, 0xBABFBDB9, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC1BCBB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB7BBB6BB, 0xBCBBBFBA, 0xBEBCBDC1, 0xBABDBBBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBDC0BEBD, 0xBEBBC0BE,
+ 0xC1BFBBC0, 0xBBC0BEBC, 0xBEBDC0BE, 0xC1BCBDC0,
+ 0xBDC1BCBD, 0xBABDC1BC, 0xBFBABBBF, 0xBCC0BBBB,
+ 0xBDBBC1BC, 0xBFBDBABF, 0xBDC0BEBA, 0xBABBBEBC,
+ 0xBFBABBBF, 0xBCC0BBBB, 0xBBBABDBB, 0xBDBBBABD,
+ 0xBABEB9BA, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xB8B9C0B9, 0xBDB8B8BF, 0xB7BDB8B9, 0xBAB4BBB6,
+ 0xC0BBB8BF, 0xB3B7B1BC, 0xAEB0B4AF, 0xB5B0B0B4,
+ 0xB0B4AEB1, 0xAEAEB5AE, 0xB3ACAEB5, 0xACB3ACAC,
+ 0xA8ABB0A7, 0xB3A8ADB3, 0xADB4A7AD, 0xA4A8AFA2,
+ 0xB3A4ACB3, 0xAFB4A5AE, 0xA5AEB2A6, 0xB1A5ADB1,
+ 0xA8ACA0AD, 0xA3ABAFA4, 0xAFA3ABAF, 0xA8ACA0AB,
+ 0x9FA9AB9F, 0xAEA2A7AB, 0xA9ADA1AA, 0x9BA7AC9D,
+ 0xAC9BA6AC, 0xA6AB9CA6, 0x9CA8AD9E, 0xAA9EA6AB,
+ 0xA4A89CA6, 0x99A4A89C, 0xA99CA3A8, 0xA1A89BA2,
+ 0x9D9FA397, 0xA69AA5A9, 0xA3A79BA2, 0x98A5A99D,
+ 0xA397A0A4, 0xA0A5969F, 0x97A0A596, 0xA798A2A8,
+ 0xA3A899A2, 0x95A0A596, 0xA897A0A6, 0xA1A796A2,
+ 0x92A0A695, 0xA4939FA5, 0x9EA4939E, 0x8E9EA493,
+ 0x9F909B9E, 0x9BA0919C, 0x939CA094, 0xA1929B9F,
+ 0x9EA1929E, 0x92979B8F, 0x9D91999D, 0x999D929B,
+ 0x9899A099, 0x4540979F, 0x1419173F, 0x07050708,
+ 0x04090605, 0x07040608, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x01000001, 0x00010000,
+ 0x00000000, 0x01000000, 0x41403C00, 0x777D7D77,
+ 0x7C777F7C, 0x7F7C777F, 0x78828078, 0x82798081,
+ 0x7F807781, 0x77808177, 0x81758281, 0x81817581,
+ 0x7A848379, 0x82788584, 0x85847A83, 0x78868479,
+ 0x837A8583, 0x87827988, 0x79848278, 0x81778583,
+ 0x82817782, 0x77817F75, 0x7F758381, 0x807F7580,
+ 0x75828177, 0x82797D7E, 0x80817881, 0x73808178,
+ 0x7D747B7C, 0x7B7C737C, 0x727D7C72, 0x786E7D7C,
+ 0x75746A79, 0x73787970, 0x7C747B7C, 0x7F7D757E,
+ 0x707E7C74, 0x7F777A78, 0x7D7C7281, 0x727E7C72,
+ 0x7B717E7C, 0x7D7A727D, 0x757D7A75, 0x7C737B7B,
+ 0x74756C7B, 0x76797973, 0x79707E7B, 0x78797078,
+ 0x70797A70, 0x79707879, 0x7B7B7578, 0x757E7E78,
+ 0x7B737B7B, 0x7B7C737D, 0x757D7D77, 0x8882797B,
+ 0x60645E86, 0x4F50544F, 0x01005253, 0x00000000,
+ 0x3B000100, 0x5C573A3D, 0x585C5758, 0x88666862,
+ 0x857C8E91, 0x75766D84, 0x737C7C76, 0x78727979,
+ 0x79797378, 0x707B7C73, 0x796F7879, 0x78796F78,
+ 0x787D7E75, 0x7E758081, 0x7B7C737D, 0x75808178,
+ 0x82797D7E, 0x7F807781, 0x7781817B, 0x7C787D7D,
+ 0x7F7C777F, 0x777D7D77, 0x7D747D7D, 0x7B7C737C,
+ 0x757D7E75, 0x7D737D7E, 0x8182787C, 0x757D7E75,
+ 0x7E757D7E, 0x7C7C767D, 0x76807D78, 0x817B7E7B,
+ 0x80807A81, 0x79838179, 0x82798381, 0x82837A81,
+ 0x79817E79, 0x7E79817E, 0x807D7881, 0x727B7C73,
+ 0x79707A7B, 0x7B7C7378, 0x747D7A75, 0x7A757C79,
+ 0x7D7A757D, 0x777E7E78, 0x807A7D7D, 0x7C7C7680,
+ 0x77807C77, 0x7772807C, 0x807D787A, 0x71787872,
+ 0x7970797A, 0x76787276, 0x77787975, 0x78787879,
+ 0x50505078, 0x00101010, 0x00000001, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x01000000, 0x00000001,
+ 0x00000000, 0x00010002, 0x36360000, 0x9FA2A034,
+ 0x9AA2A9A2, 0x9F989CA4, 0x9BA09798, 0x9EA0A59C,
+ 0xA79EA4A7, 0xA2A59CA4, 0x9CA2A69B, 0xA79CA3A7,
+ 0xA0A499A3, 0x98A0A498, 0xA3979EA5, 0xA0A4989F,
+ 0x9EA2A69B, 0xA9A0A2A7, 0xA6A9A0A6, 0x9EA6AA9F,
+ 0xAC9FA4AB, 0xA6ADA0A5, 0x95A4A89C, 0xAC9D9FA4,
+ 0xA7AB9FA5, 0x9FA7AB9F, 0xAFA3A7AB, 0xA8AFA2AB,
+ 0x9EA8AFA2, 0xAC9DA4AB, 0xA8AFA0A5, 0xA5ABAFA3,
+ 0xB1A5ADB1, 0xADB1A5AD, 0xA3ABAFA3, 0xAFA4ABAF,
+ 0xA9AFA4AB, 0xBAB4BAAF, 0xB1AABCC4, 0xA2A9A2AA,
+ 0xA29EA09A, 0xA9A3A6A8, 0xA6A8A2A7, 0x9FA2AAA0,
+ 0xABA2A1A9, 0xA5AAA1A6, 0xA5A6A9A0, 0xABA2ABAE,
+ 0xA8ABA2A8, 0xA2A5AAA1, 0xADA4A6AB, 0xA7AAA1AA,
+ 0xA4A8ADA4, 0xAEA5A8AD, 0xA8ABA2AB, 0xA2A9ADA2,
+ 0xADA2A9AD, 0xA7ACA3A7, 0xA5A3A89F, 0xACA5A7AB,
+ 0xAAAEA8A5, 0xA3AAADA4, 0xB0A4AAAE, 0xACB0A4AC,
+ 0xA5AAB0A5, 0xAFA6AAB0, 0xA8B0A6AA, 0x9EA5ADA3,
+ 0xA89FA0A8, 0xAAAFA6A3, 0xA8AEB1A8, 0xB2A7AEB1,
+ 0xB0B1A7AE, 0xA9B0B1A7, 0xB0A7B1B2, 0xB6B9B0AD,
+ 0x007A7C76, 0x01000001, 0x00010000, 0xAD9EA29C,
+ 0xB6B0B1B6, 0xA5ADA3B2, 0xAAACB5AB, 0xB5ABACB6,
+ 0xADB5ABAD, 0xAAABB3A9, 0xB3AAACB4, 0xAEB3AAAE,
+ 0xACADB2A9, 0xB5AEB0B5, 0xAEB5AEAE, 0xABAEB6AC,
+ 0xB4ABAFB4, 0xAFB4ABAF, 0xAFB0B4AE, 0xB1AAAEB4,
+ 0xB5BBB6AA, 0x007A7D7B, 0x00000001, 0x00010000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0xBE565B59, 0xC1BEBAC1,
+ 0xBAC1BEBA, 0xB7B6BCB7, 0xBDBCB6BC, 0xB9BEBDB8,
+ 0xBCB9BEBC, 0xBFBAB8BF, 0xB9BFBAB8, 0xBAB9BFBA,
+ 0xBFBABBBF, 0xBABEB9BB, 0xB9BDBEBA, 0xBEB9BDBF,
+ 0xBBBFBABA, 0xBEBABFBD, 0xC0BEBBC0, 0xBCC1BFBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBDC0BE,
+ 0xC0BEBDC0, 0xBABFBDBB, 0xBEBDC0BE, 0xC1BCBDC0,
+ 0xBAC0BBBB, 0xBABCC0BB, 0xBFBABBBF, 0xB9BFBABB,
+ 0xBCB8BFBC, 0xBCBBB7BD, 0xB8BDBBB6, 0xBCBBBEBC,
+ 0xBFBABBBE, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB9BFBAB9, 0xB9BBBFBA, 0xBFB9BBBF, 0xBBBFB9BB,
+ 0xB8B8BCB7, 0xBCB7B9BD, 0xBAC0BBB8, 0xB3B4BFB7,
+ 0xB4AEB0BB, 0xB0B5ACB0, 0xACAEB2AC, 0xB4AEB0B5,
+ 0xB0B3AAB2, 0xABB1B4AB, 0xB4ABAFB4, 0xAFB5AAAF,
+ 0xA3AEB4A9, 0xB4A8ABAF, 0xB1B5A9B0, 0xA5ABAFA3,
+ 0xB3A7ADB1, 0xADB1A5AF, 0xA8AFB3A7, 0xB0A4B0B4,
+ 0xABAFA3AC, 0xA6ADB1A5, 0xACA0AEB2, 0xA8AD9EA8,
+ 0xA0A8ACA0, 0xACA0A8AC, 0xA6ADA0A8, 0x9AA2A99A,
+ 0xAE9FA2A9, 0xA6ADA0A7, 0x9DA6ADA0, 0xA89DA3AA,
+ 0xA3A79BA4, 0xA1A8ACA0, 0xA79BA9AD, 0xA5A99DA3,
+ 0x99A3A79C, 0xA89CA0A4, 0xA0A498A4, 0x9BA3A79B,
+ 0xA89BA3A7, 0xA1A899A1, 0x939FA697, 0xA3949CA4,
+ 0x9EA5969C, 0x96A0A596, 0xA697A0A5, 0x9DA392A1,
+ 0x929EA493, 0x9F909DA3, 0x9A9F909A, 0x909A9F90,
+ 0xA0919A9F, 0x9CA1929B, 0x919A9F90, 0x9F909BA0,
+ 0x9A9F909A, 0x98A0A498, 0xA399A0A4, 0xA0A499A2,
+ 0x19565852, 0x01001A1E, 0x00010000, 0x00010101,
+ 0x00010000, 0x02000102, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01020301, 0x02000203, 0x02030001,
+ 0x0F0F100E, 0x59551011, 0x8081785A, 0x71808177,
+ 0x7B727A7B, 0x807E767A, 0x73838278, 0x7D747E7D,
+ 0x8081787C, 0x757D7E74, 0x7E757E7F, 0x83847B7D,
+ 0x77828379, 0x80768081, 0x8081777F, 0x78838377,
+ 0x81778484, 0x83807882, 0x78828078, 0x7E768280,
+ 0x7E7C7480, 0x73807E76, 0x7C747D7B, 0x807F757F,
+ 0x76838278, 0x7F77807E, 0x827F7A81, 0x75838179,
+ 0x786F7F7D, 0x7D7B7377, 0x707E7C72, 0x786D7D7B,
+ 0x7271677A, 0x706F7067, 0x78727879, 0x82807878,
+ 0x6D7D7B71, 0x7C727977, 0x7E7C727E, 0x737C7B71,
+ 0x78707D7B, 0x7A78707A, 0x72777771, 0x7C737878,
+ 0x797A707B, 0x6F787970, 0x79707778, 0x78797078,
+ 0x7172736A, 0x7873797A, 0x7B78737B, 0x727B7873,
+ 0x7D747A77, 0x7B7C737C, 0x807C7D74, 0x88828689,
+ 0x62645E86, 0x3C5E605A, 0x01003F40, 0x00000000,
+ 0x3B000100, 0x5C573A3D, 0x585C5758, 0x8A656761,
+ 0x827A9090, 0x85837B84, 0x707D7B73, 0x7A757A78,
+ 0x807D787D, 0x6C797A71, 0x756D7475, 0x7B797177,
+ 0x7377786F, 0x7D757B7C, 0x7D7B737F, 0x7A828177,
+ 0x82788584, 0x84827A83, 0x75808178, 0x807A7D7E,
+ 0x7D7E7580, 0x777D7E75, 0x7F767F80, 0x7B7C737E,
+ 0x7478796F, 0x7E757D7E, 0x7C7D747D, 0x7A818279,
+ 0x817B8283, 0x7D7D7781, 0x7B85827D, 0x817B8380,
+ 0x7F7F7981, 0x787F7D75, 0x7F798280, 0x7D7F797F,
+ 0x757C7D74, 0x78707D7E, 0x7D7B737A, 0x747F7D75,
+ 0x736E7E7C, 0x7C797476, 0x787F7C78, 0x7F797F7C,
+ 0x7F7F797F, 0x727D7E75, 0x7E757A7B, 0x7A7B727D,
+ 0x737D7E75, 0x79707B7C, 0x7B7B7578, 0x71797B75,
+ 0x7D747577, 0x7878727C, 0x707A7975, 0x72717574,
+ 0x7A797574, 0x28797874, 0x07072D2C, 0x08050709,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000100, 0x00000000,
+ 0x00000100, 0x00000000, 0x00000000, 0x26292700,
+ 0x9EA0A49F, 0xA49FA0A4, 0x9DA49DA0, 0x9C99A099,
+ 0xA1989CA3, 0x9EA39A9C, 0x9B9FA49B, 0xA59A9FA4,
+ 0xA0A4999F, 0x9EA1A59A, 0xA79BA5A9, 0x9FA397A5,
+ 0x99A2A69A, 0xA399A0A4, 0xA5A99EA2, 0xA0A9ADA1,
+ 0xAEA1A8AC, 0xA6ADA0A7, 0x9AA8AFA0, 0xA99AA2A9,
+ 0xA8ACA0A4, 0xA1A6AA9E, 0xADA0A7AE, 0xA8AFA2A6,
+ 0x98A5AC9F, 0xA79BA2A7, 0xB0B4A8A3, 0xA3A8ACA0,
+ 0xB0A4ABAF, 0xABAFA3AC, 0xA7B3B8A9, 0xB8ABB1B6,
+ 0xB0B6ABB1, 0x9F7E8479, 0xA8A1A1A9, 0xA0A7A0A1,
+ 0x9F9DA59B, 0xA6A0A1A5, 0xA3A7A1A2, 0x9DA1A99F,
+ 0xA99F9EA7, 0xA0A89EA1, 0xA1A4A9A0, 0xACA1A7AA,
+ 0xA6ACA1A6, 0xA2A5ADA3, 0xABA2A4AC, 0xA6ACA1A6,
+ 0xA2A7ADA2, 0xACA3A7AD, 0xA8ABA2A9, 0xA4AAADA4,
+ 0xADA4AAAD, 0xABAEA5AA, 0xA2A8ADA4, 0xADA4A6AB,
+ 0xA8ADA4A8, 0xA2A7ADA2, 0xAFA4A7AD, 0xA7AFA4A9,
+ 0xA2A7AFA4, 0xAFA5A5AD, 0xA8B0A6A7, 0xA4A8B0A6,
+ 0xACA1A7AF, 0xA7ADA2A6, 0xA7ABAFA4, 0xB1A8AEB2,
+ 0xB0B1A7B0, 0xA6AFB0A6, 0xB0A5ADB1, 0xB8BCB1AC,
+ 0x00767B72, 0x01000003, 0x00010000, 0xB17C807B,
+ 0xB7B2B1B8, 0xAFB7B0B1, 0xADADB5AE, 0xB0A9AEB7,
+ 0xA8B1A7A8, 0xA896A197, 0xB4A8A8B4, 0xAAB4A8A8,
+ 0xABAEB6AC, 0xACA3ADB5, 0xAEB3AAA7, 0xACB0B5AC,
+ 0xB7ACB0B5, 0xB0B5ACB1, 0xB1B0B8B1, 0xB9B2B0B8,
+ 0xB1B7B2B1, 0x01353737, 0x00010001, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBE575C5A, 0xC0BFBAC1,
+ 0xBAC0BFB8, 0xB8B8BEB9, 0xBEBCB7BD, 0xB8BDBCB9,
+ 0xBCB8BFBC, 0xBFBAB8BF, 0xB8BFBAB8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xB9BDBFB9, 0xBEB9BDBF,
+ 0xBABEB9BA, 0xBEBBC0BE, 0xC1BFBBC0, 0xBBC0BEBC,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBCBFBD,
+ 0xC0BEBDC0, 0xBABFBDBB, 0xBEBDC0BE, 0xC1BCBDC0,
+ 0xBBC1BCBB, 0xBABBBFBA, 0xBFBABBBF, 0xB9BEBCBB,
+ 0xBCB5BDBC, 0xBDBCB5BD, 0xB7BDBCB5, 0xBABABFBD,
+ 0xC0BBBBBF, 0xBBBFBABC, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB9BFBAB9, 0xB9BBBFB9, 0xBFB9BBBF, 0xBBBFB9BB,
+ 0xB7BCC0BB, 0xBCB7B8BC, 0xBDC3BEB8, 0xAEB6C1B9,
+ 0xB1A8ADB5, 0xACB1A8AC, 0xADB0B5AC, 0xB5ACB1B6,
+ 0xB5B6ADB2, 0xA8B1B5AA, 0xB4A9AFB3, 0xB0B4A9B0,
+ 0xA3B0B4A8, 0xAEA2ABAF, 0xB0B4A8AA, 0xA3ADB1A5,
+ 0xB1A5ABAF, 0xB0B4A8AD, 0xA5B0B4A8, 0xAB9FADB1,
+ 0xADB1A5A7, 0xA2ABAFA3, 0xAD9EAAAE, 0xABB0A1A8,
+ 0xA0A8ACA0, 0xAA9DA8AC, 0xA3AA9DA3, 0x9BA4AB9C,
+ 0xADA0A3AA, 0xA6ADA0A6, 0xA1A3AA9D, 0xACA1A7AE,
+ 0xA0A499A8, 0x9BA3A79B, 0xA79BA3A7, 0xA3A79BA3,
+ 0x9CA5A99E, 0xA99DA3A7, 0xA2A69AA5, 0x9DA3A79B,
+ 0xA99CA5A9, 0xA1A89BA2, 0x949EA596, 0xA3969CA3,
+ 0x9CA3969C, 0x929EA394, 0xA3949CA1, 0x9CA1929E,
+ 0x8F979E8F, 0xA29398A0, 0x9CA1929D, 0x90989F90,
+ 0xA293989F, 0x989F909D, 0x90989F90, 0x9F90989F,
+ 0x999D919A, 0x99A1A599, 0x6F66A2A3, 0x393A316E,
+ 0x00000100, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00010200, 0x03000203, 0x02030002,
+ 0x7B343531, 0x807A807F, 0x7F807780, 0x737E7F75,
+ 0x7B727C7D, 0x7F80777A, 0x73828177, 0x7F767E7D,
+ 0x8081787E, 0x7A81857A, 0x857C8185, 0x83847B84,
+ 0x78808479, 0x82788084, 0x7F807781, 0x77808177,
+ 0x7E768081, 0x817F7780, 0x79828078, 0x80788381,
+ 0x82807882, 0x797D7B73, 0x80788381, 0x807E7682,
+ 0x747F7E74, 0x7E767F7E, 0x817E7681, 0x787F7D75,
+ 0x7E758280, 0x7A78707D, 0x717E7C72, 0x7C71807C,
+ 0x7474687E, 0x68727068, 0x6F697071, 0x7A78706F,
+ 0x697E7C72, 0x776E7674, 0x7B796F7C, 0x707A7870,
+ 0x7B727879, 0x7B7C737A, 0x73787872, 0x7D757B7C,
+ 0x78796F7F, 0x737B7C73, 0x7D747B7C, 0x797A717C,
+ 0x71797A71, 0x7C797B79, 0x7C777481, 0x757F7C77,
+ 0x7A717D7A, 0x7B7C7379, 0x807C7D74, 0x87818689,
+ 0x62645E85, 0x3C60605A, 0x01004140, 0x01010100,
+ 0x3B000100, 0x5C573A3D, 0x585C5758, 0x8A686862,
+ 0x837B9090, 0x77756D85, 0x747D7B73, 0x7A757E7C,
+ 0x7D7D777D, 0x717C7D74, 0x7C74797A, 0x8280787E,
+ 0x78808178, 0x80788081, 0x7F7D7582, 0x7A86847A,
+ 0x82788684, 0x83827883, 0x75808178, 0x7E757D7E,
+ 0x7B7C737D, 0x787D7E75, 0x7C738081, 0x7A7B727B,
+ 0x727B7C73, 0x7C737B7C, 0x8182797B, 0x7C83847B,
+ 0x807A8485, 0x81817B80, 0x7B83807B, 0x7E7A8380,
+ 0x80807A7F, 0x77817E79, 0x7F79817F, 0x7F7F797F,
+ 0x757D7E75, 0x7B737D7E, 0x7A78707D, 0x747D7B73,
+ 0x78737E7C, 0x7D7A757B, 0x7A807D79, 0x7C76817E,
+ 0x7F7F797C, 0x707D7E75, 0x7C737879, 0x7B7C737B,
+ 0x72797D72, 0x7970797D, 0x7B7E7576, 0x7280827C,
+ 0x7B757678, 0x7C7C767B, 0x70787773, 0x74707574,
+ 0x77747077, 0x73787872, 0x4E4D7979, 0x08060650,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x9E6A6D6B, 0xA49F9FA3, 0x9FA5A0A0, 0x9998A099,
+ 0xA69C98A0, 0xA0A59C9E, 0x9F9FA79D, 0xAA9FA1A9,
+ 0x9FA59AA4, 0x9EA3A79C, 0xA99DA6AA, 0xA5A79BA7,
+ 0x9EA8ACA0, 0xA99DA6AA, 0xA2A498A7, 0x9DA3A79B,
+ 0xA89CA5A9, 0xA7AEA1A4, 0x9DA5AC9D, 0xA89CA5AC,
+ 0xA3A79BA4, 0x9FAAAFA0, 0xAFA2A7AE, 0xA6ADA0A8,
+ 0xA2ACB0A4, 0xB0A4ACB1, 0xACB0A4AC, 0xA0ABAFA3,
+ 0xB2A6A8AC, 0xADB1A5AE, 0xABB1B6A7, 0xB7AAB3B7,
+ 0x8A9085B0, 0x9F6A7268, 0xA8A1A1A9, 0xA1A9A2A0,
+ 0x9DA1A99F, 0xA39D9FA7, 0xA1A8A19F, 0x9DA0A99F,
+ 0xA69F9EA7, 0xA1A8A19E, 0xA1A4A9A0, 0xACA1A7AA,
+ 0xA4AA9FA6, 0xA2A4ACA2, 0xABA0A3AC, 0xA4ACA1A3,
+ 0xA2A6ACA1, 0xABA2A7AD, 0xA8ABA2A8, 0xA3A8ABA2,
+ 0xAAA4A9AC, 0xAAACA6A8, 0xA3A6ABA2, 0xABA2A7AC,
+ 0xA7ACA3A6, 0xA3A7ADA2, 0xADA2A8AE, 0xA5ADA2A7,
+ 0xA2A8B0A5, 0xAFA5A5AD, 0xA7AFA4A7, 0xA3A7AFA4,
+ 0xB0A3A8AE, 0xA5AC9FA9, 0x9FA1A59A, 0xADA4A6AA,
+ 0xAEB2A7AC, 0xA5ACB0A4, 0xB1A5ADB1, 0xB3B7ACAD,
+ 0x00767A74, 0x00000002, 0x00000000, 0xB1454846,
+ 0xB8B3B0B6, 0xB0B7B2B1, 0xADADB5AE, 0xB5ADACB4,
+ 0xA7B2AAAA, 0xA9A5B3A8, 0xB5A7A7B5, 0xA8B4A8A6,
+ 0xABACB5AB, 0xB4ABADB5, 0xAFB4ABAF, 0xADB0B5AC,
+ 0xB4ABB1B6, 0xAEB6ACAF, 0xB1B0B9AF, 0xB7B0AEB9,
+ 0x8B918CAF, 0x01121414, 0x00010000, 0x00000100,
+ 0x00020000, 0x01000200, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBE565B59, 0xC0BFBAC1,
+ 0xBAC0BFB8, 0xB7B8BEB9, 0xBDBBB8BC, 0xB8BDBBBA,
+ 0xBCB8BEBD, 0xC0BBB8BF, 0xB8BFBAB9, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xB9BABEB8, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBDBCC1BF, 0xC0BEBABF, 0xBCC1BFBB,
+ 0xBCBABFBD, 0xC1BEB9BE, 0xBBC0BEBA, 0xBEBCBFBD,
+ 0xC0BEBDC0, 0xBBC0BEBB, 0xBDBABFBD, 0xC1BCBABF,
+ 0xBCC2BDBB, 0xBABBBFBA, 0xBFBABBBF, 0xBABFBDBB,
+ 0xBAB4BCBB, 0xBDBCB0BA, 0xB7BDBCB5, 0xBAB9BEBC,
+ 0xBEBABBBF, 0xBDBFB9BD, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB9BFBAB9, 0xBAB9BFBA, 0xBFBAB9BF, 0xBBBFBABB,
+ 0xB7BAC0BB, 0xC0BBB6BC, 0xBBC1BCBA, 0xABADB4AD,
+ 0xB5ACAFB4, 0xACB1A8B0, 0xAEABAFA9, 0xB5ACB0B4,
+ 0xB1B4ABB2, 0xABB1B5AA, 0xB4A9B2B6, 0xAFB3A8B0,
+ 0xA5B0B4A8, 0xB0A4ADB1, 0xABAFA3AC, 0xA3ADB1A5,
+ 0xAB9FABAF, 0xADB1A5A7, 0xA3ADB1A5, 0xAFA3ABAF,
+ 0xABAFA3AB, 0xA0AAB1A4, 0xAFA3A6AD, 0xABAFA3AB,
+ 0x9DA8ACA0, 0xA79BA5A9, 0xA3A79BA3, 0x9DA6AD9E,
+ 0xA99AA5AC, 0xA4AB9CA2, 0x9DA8AD9E, 0xA89CA7AC,
+ 0xA3A79BA4, 0x9BA3A79B, 0xA89EA3A7, 0xA7A89EA7,
+ 0xA1A8ACA1, 0xA79BA8AC, 0xA4A89CA3, 0x9BA3A79B,
+ 0xA498A3A7, 0xA0A498A0, 0x959CA394, 0xA4979DA4,
+ 0x9CA3969D, 0x96A0A498, 0xA2969EA2, 0x9EA3949E,
+ 0x959CA394, 0xA2939DA4, 0x9CA3949B, 0x929CA394,
+ 0x9F909AA1, 0x9AA19298, 0x90989F90, 0x9E92989F,
+ 0x9B9F949A, 0x316E6F66, 0x0400393A, 0x07040007,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x01020000, 0x00020301, 0x04000203, 0x76787203,
+ 0x7A80807A, 0x807A8080, 0x81827980, 0x757E7F75,
+ 0x81787E7F, 0x7D7E7580, 0x77808178, 0x7F767F80,
+ 0x7F80777E, 0x747E7F75, 0x857C7D7E, 0x83847A84,
+ 0x78808478, 0x81778084, 0x80817880, 0x777F8378,
+ 0x7F778081, 0x817E7981, 0x7881817B, 0x7E768081,
+ 0x82817780, 0x76828177, 0x7F77807E, 0x7E7F7681,
+ 0x777E7F75, 0x7F758281, 0x817E7681, 0x797D7B73,
+ 0x7D778182, 0x7D7B737D, 0x71807B72, 0x7B70807C,
+ 0x78786C7D, 0x68716F67, 0x685F7071, 0x71726967,
+ 0x6A7D7C72, 0x786D7574, 0x7A786E7A, 0x757A7870,
+ 0x80767D7E, 0x7B7C727F, 0x747B7C73, 0x7E757C7D,
+ 0x7B7C737D, 0x75808178, 0x79707B7E, 0x78797078,
+ 0x7178766E, 0x77747B79, 0x807B787C, 0x757C7974,
+ 0x7B737D7A, 0x797A717D, 0x807C7D74, 0x89838889,
+ 0x62645E87, 0x3B5F6057, 0x00004141, 0x00000002,
+ 0x3B000100, 0x5D583A3D, 0x575B5659, 0x8A696963,
+ 0x847B9090, 0x75766D83, 0x757B7C72, 0x7E757E7F,
+ 0x8081787D, 0x797F8077, 0x7F7A8182, 0x82807882,
+ 0x76808178, 0x80787F80, 0x7F7D7582, 0x78817F75,
+ 0x7F778482, 0x7C7D7481, 0x757D7D77, 0x7C737D7E,
+ 0x7B7C727B, 0x757D7E75, 0x807A7D7E, 0x7E7F7680,
+ 0x73787970, 0x7C737B7C, 0x7D7E757B, 0x7982837A,
+ 0x827C8182, 0x7D7D7780, 0x797F7F79, 0x7B777F7F,
+ 0x797B757A, 0x777C7C76, 0x7F7A817F, 0x80807A82,
+ 0x757D7E75, 0x7E757D7E, 0x7D7E757D, 0x747F7D75,
+ 0x78707E7C, 0x7F7D757A, 0x78807D78, 0x7E79807D,
+ 0x827F7A81, 0x79787970, 0x81788182, 0x80817880,
+ 0x73808178, 0x7C737B7C, 0x7B7C737B, 0x757C7E78,
+ 0x7872797B, 0x7B7B7578, 0x72787773, 0x74707776,
+ 0x76736E77, 0x70787970, 0x79737879, 0x52514D79,
+ 0x00252525, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x6B000100, 0xA49F6A6D, 0x9EA49F9E, 0x9998A099,
+ 0xA79D98A0, 0xA0A69B9F, 0x9DA1A69D, 0xA79CA1A6,
+ 0x9DA398A1, 0x9B9EA598, 0xAA9EA1A8, 0xA5AA9BA6,
+ 0x9CA3A79B, 0xA99DA4A8, 0xA4A89CA5, 0x98A2A69A,
+ 0xA498A0A4, 0xA3A79BA0, 0x9AA2A99A, 0xA89CA2A9,
+ 0xA4A89CA4, 0x9FA6AB9C, 0xAEA1A9AE, 0xA7AEA1A7,
+ 0xA4ACB0A4, 0xB0A4ACB0, 0xACB0A4AC, 0xA0ABB0A1,
+ 0xB1A5AAAF, 0xAEB2A6AD, 0xABB1B5A9, 0x8E85B3B7,
+ 0x3E433A89, 0xA1A1A8A1, 0xA8A1A1A8, 0x9EA9A1A0,
+ 0x9D9EA79D, 0xA39C9EA7, 0xA2A9A29C, 0xA19FA7A0,
+ 0xA39CA0A8, 0xA3A7A19C, 0x9EA4A8A2, 0xACA1A2A7,
+ 0xA4AA9FA8, 0xA2A4ACA2, 0xA99EA4AC, 0xA7ADA2A3,
+ 0xA2A7ADA2, 0xADA2A7AD, 0xA7ADA2A7, 0xA1A8ACA1,
+ 0xADA4A8AC, 0xAAADA4AA, 0xA1A7AAA1, 0xABA2A7AA,
+ 0xA8ABA2A8, 0xA1A6ACA1, 0xADA0A7AE, 0xA6ADA0A6,
+ 0xA2A7ADA2, 0xACA1A7AD, 0xA7ADA2A6, 0x9FA7ADA2,
+ 0xAFA4A5AC, 0xA9AFA4A9, 0x9EAAAEA3, 0xA69BA5A9,
+ 0xAAAEA3A2, 0xA3ADB1A5, 0xB1A5ABB2, 0xB3B7ACAD,
+ 0x00282A24, 0x01010001, 0x00000001, 0xB30E110F,
+ 0xB7B2B2B8, 0xAFB7B0B0, 0xADACB3AC, 0xB3ADACB4,
+ 0xA6B1A9A9, 0xA8A8B3A9, 0xB4A8A8B4, 0xABB5A9A8,
+ 0xABADB5AB, 0xB5ABADB5, 0xA8B0A6AD, 0xABB0B4AE,
+ 0xB3AAAFB4, 0xB0B5ACB0, 0xAEB1B9AF, 0xB9AFAFB8,
+ 0x656C65B1, 0x00000100, 0x00000000, 0x02000002,
+ 0x00020000, 0x01000200, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBE575A58, 0xC0BFBBC0,
+ 0xBAC0BFBA, 0xB6B8BCB7, 0xBDBBB7BB, 0xBABDBBBA,
+ 0xBDB9BEBD, 0xBEBCB8BE, 0xB9BFBAB9, 0xBABABEB9,
+ 0xBFBABBBF, 0xBBBFBABB, 0xB9BBBFB9, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBDBBC0BE, 0xC1BEBABF, 0xBBC0BEBA, 0xBEBCBFBD,
+ 0xBFBDBDC0, 0xBABFBDBA, 0xBDBABFBD, 0xC1BCBABF,
+ 0xBBC1BCBB, 0xBABBBFBA, 0xC0BBBBBF, 0xB9BEBCBC,
+ 0xB6B3BBBA, 0xBDBCADB8, 0xB8BDBBB7, 0xBABBBEBC,
+ 0xBEBABBBF, 0xBDBFB9BD, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB9BFBABB, 0xBAB9BFBA, 0xBFBAB9BF, 0xB9BFBABB,
+ 0xC2BAC0BB, 0xC7C2C1C7, 0xB6BCB7C1, 0xA8ACB0AA,
+ 0xB5ACACB1, 0xAEB6ACB0, 0xA7ABAFA9, 0xB3AAABB0,
+ 0xB0B3AAB0, 0xAAB1B5AA, 0xB2A8B1B5, 0xB2B3A9B1,
+ 0xA8B0B4A8, 0xB4A8B0B4, 0xABAFA3B0, 0xA5ADB1A5,
+ 0xADA1ADB1, 0xAAAEA2A9, 0xA0ABAFA3, 0xAFA3A8AC,
+ 0xA9B0A3AB, 0xA0A5AC9F, 0xB0A3A6AD, 0xA7AEA1A9,
+ 0x9DA5A99D, 0xACA0A5A9, 0xA3A79BA8, 0x98A0A798,
+ 0xAA9BA0A7, 0xA2A99AA3, 0x96A3A899, 0xA69AA0A5,
+ 0xA4A89CA2, 0x9BA3AA9D, 0xA99EA3A7, 0xA5A99EA5,
+ 0x9CA3A79C, 0xA498A1A7, 0xA0A498A0, 0x9B9FA397,
+ 0xA99CA3A7, 0xA1A89BA2, 0x969EA596, 0xA6999EA5,
+ 0xA0A4989F, 0x98A0A498, 0xA498A0A4, 0xA0A596A0,
+ 0x949CA394, 0xA2939CA3, 0x989F909B, 0x929AA192,
+ 0xA1929AA1, 0x989F909A, 0x92969F92, 0x9E95989F,
+ 0x55575199, 0x00050400, 0x04000504, 0x07030207,
+ 0x01020000, 0x00010000, 0x01000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x25020300, 0x7872292B, 0x78787276,
+ 0x78808178, 0x807A8280, 0x80817880, 0x77808177,
+ 0x81788081, 0x7E7F7680, 0x78808178, 0x82798081,
+ 0x7E7F7581, 0x757E7F75, 0x887F7E7F, 0x83847A87,
+ 0x75808478, 0x80767D81, 0x8081787F, 0x75808177,
+ 0x7E797E7F, 0x83807B81, 0x78827F7A, 0x7F758280,
+ 0x82817780, 0x73828177, 0x82797B7C, 0x80817881,
+ 0x777E7F75, 0x7C728081, 0x807F757E, 0x78828078,
+ 0x7D778081, 0x7D7B737D, 0x717F7D73, 0x7C71807C,
+ 0x75746A7E, 0x70737169, 0x71687879, 0x70716870,
+ 0x6773746A, 0x796F7071, 0x7D7C727B, 0x727A7870,
+ 0x7E747A7B, 0x7B7C727D, 0x747A7B72, 0x7F767C7D,
+ 0x7A7B727E, 0x737B7C73, 0x7970797C, 0x78797078,
+ 0x717B7971, 0x78737B79, 0x7E7B767B, 0x727B7873,
+ 0x78707A77, 0x7879707A, 0x827C7D74, 0x87818688,
+ 0x62645E85, 0x3B5E605A, 0x00003F41, 0x00010002,
+ 0x3B000100, 0x5B563A3D, 0x5B5C5857, 0x8A676761,
+ 0x837D9090, 0x83847B83, 0x747E7F75, 0x81787D7E,
+ 0x7B7C7380, 0x78808178, 0x7C748081, 0x7D7B737E,
+ 0x77808178, 0x7D758081, 0x7F7D757F, 0x7A848278,
+ 0x80788684, 0x81827982, 0x7580807A, 0x7B727D7E,
+ 0x8081777A, 0x757D7E75, 0x7E787D7E, 0x7C7C767E,
+ 0x737A7B72, 0x7E757B7C, 0x7B7C737D, 0x797D7E75,
+ 0x837D8182, 0x81837D81, 0x767F7F79, 0x7C767C7C,
+ 0x7A7C767A, 0x7A7C7D74, 0x7E798482, 0x7F7C7781,
+ 0x73808178, 0x7C737B7C, 0x8081787B, 0x747E7C74,
+ 0x79717E7C, 0x7E7C747B, 0x777F7C77, 0x7C777F7C,
+ 0x807E767F, 0x75808178, 0x82797D7E, 0x80817881,
+ 0x757C7D74, 0x81787D7E, 0x81817B80, 0x757E7E78,
+ 0x7B75797B, 0x7B7B757B, 0x777A7A74, 0x79757C7B,
+ 0x7B78737C, 0x70797A71, 0x78727879, 0x78777378,
+ 0x4A72706F, 0x01004B4C, 0x00010000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x35000100, 0xA3A13437, 0x9EA49F9E, 0x979CA39C,
+ 0xA49999A1, 0x9EA4999E, 0x9F9FA49B, 0xA59AA3A8,
+ 0x9EA4999F, 0x9BA1A89B, 0xA99DA1A8, 0xA5A99DA5,
+ 0x9BA3A79B, 0xA99DA3A7, 0xA5A99DA5, 0x9DA5A99D,
+ 0xA99DA5A9, 0xA5A99DA7, 0x9DA5AC9F, 0xAB9FA5AC,
+ 0xA5A99DA7, 0x9FA3A79B, 0xAEA1A7AB, 0xA7ADA2A7,
+ 0xA4A6AA9E, 0xB0A4ACB0, 0xACB0A4AC, 0xA1ADB2A3,
+ 0xAFA3ABB0, 0xB0B4A8AB, 0x84B2B6AB, 0x433A8B8F,
+ 0x8A8E883E, 0xA1A3A7A1, 0xA9A2A1A8, 0xA0A8A1A1,
+ 0x9EA0A99F, 0xA59BA0A8, 0x9DA59B9D, 0xA1A2A9A2,
+ 0xA59FA1A8, 0x9EA29CA1, 0x9EA2A6A0, 0xAA9FA2A7,
+ 0xA5ABA0A6, 0xA1A6ACA1, 0xAA9FA6AC, 0xA5ABA0A4,
+ 0xA2A7ADA2, 0xACA1A7AD, 0xA8AEA3A6, 0xA1A4AA9F,
+ 0xABA2A8AC, 0xA8ABA2A8, 0x9FA8ABA2, 0xABA2A5A8,
+ 0xAAAEA3A8, 0xA1A6ACA1, 0xADA2A7AE, 0xA8ACA1A9,
+ 0xA2A7ADA2, 0xADA2A7AD, 0xA7ADA2A7, 0xA4A8ACA0,
+ 0xAFA4ACB0, 0xA9AFA4A9, 0xA8A9ADA2, 0xA99EAFB3,
+ 0xA2A69BA5, 0xA5A6ADA0, 0xB2A5ABB2, 0xB1B6ADAB,
+ 0x00282925, 0x00000000, 0x00000000, 0x450F1111,
+ 0xB7B24447, 0xB1B9B2B1, 0xACAEB5AE, 0xB3ACACB3,
+ 0xABB3ACAB, 0xA8AAB3A9, 0xB4A8AAB4, 0xABB3A8AA,
+ 0xABADB5AB, 0xB6ACADB5, 0xADB5ABAE, 0xACACB3AC,
+ 0xB2ACAEB2, 0xAEB3AAAE, 0xAFB1B9AF, 0xBAB0B1B9,
+ 0x40443FB2, 0x00000100, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF585B59, 0xC0C0BEC1,
+ 0xBEC0C0BE, 0xB9B8BBB9, 0xBDBBB8BB, 0xBABDBBBA,
+ 0xBCBABCBC, 0xBDBBB8BD, 0xBABDBBBA, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBEBCC1BF, 0xC0BDBBC0, 0xBAC1BEB9,
+ 0xBDBABFBD, 0xC0BEBABF, 0xBABFBDBB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBCBBBEBC, 0xBFBABBBE, 0xB9BFBABB,
+ 0xB9B6BBB9, 0xBCBAB5BC, 0xB9BCBAB9, 0xBDBDBEBC,
+ 0xC1BCC0C1, 0xBCC0BBBD, 0xBABBBFBA, 0xBEBCBBBF,
+ 0xBCC0BBBB, 0xBBBAC0BB, 0xC0BBB9C0, 0xBABFBDBA,
+ 0xC2C1C7C2, 0xBBB6C0C7, 0xAAB0ABB5, 0xA9AEB5AE,
+ 0xB0A9A9B0, 0xACB3ACA9, 0xA6ABB0A7, 0xAFA6ACAF,
+ 0xAEB1A8AC, 0xA8AEB4A9, 0xB4A8AEB5, 0xB0B4A8B0,
+ 0xA5B0B4A8, 0xB2A3ADB1, 0xABB2A3AB, 0xA3A8AD9E,
+ 0xB1A5ADB2, 0xA8ACA0AD, 0xA4A6ACA1, 0xAFA2A9AF,
+ 0xA8AFA2A8, 0xA2A5ADA2, 0xADA2A5AD, 0xA2AA9FA5,
+ 0xA2A6ACA1, 0xACA0A9AD, 0xA5A99DA8, 0x9AA3AA9D,
+ 0xA596A0A7, 0xA3A899A0, 0x9DA5A99D, 0xACA0A5A9,
+ 0xA1A89BA8, 0x9B9FA89B, 0xA79C9FA8, 0xA0A499A3,
+ 0x9899A197, 0xA5989BA3, 0x9EA5989E, 0x98A2A798,
+ 0xA999A0A7, 0x9EA8989F, 0x969EA596, 0xA498A0A5,
+ 0xA0A498A0, 0x94A0A596, 0xA1929CA3, 0x9AA1929A,
+ 0x949CA192, 0xA0949CA0, 0x9CA0949C, 0x90989F90,
+ 0x9F90989F, 0x989F9298, 0x66A1A79C, 0x38336A6F,
+ 0x00010034, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x07070707, 0x08070809,
+ 0x0A08070A, 0x7A52534F, 0x807A7E80, 0x80817880,
+ 0x7680807A, 0x81787C7C, 0x82837A80, 0x757C8075,
+ 0x80757C80, 0x8084797C, 0x79808177, 0x84798283,
+ 0x7E827780, 0x79818278, 0x81788283, 0x7E81787E,
+ 0x77808177, 0x7F768081, 0x7E7F767E, 0x73808177,
+ 0x7B767E7D, 0x827F7A7E, 0x78838179, 0x82788482,
+ 0x84827884, 0x7B85837B, 0x857C8384, 0x7D807784,
+ 0x757F8076, 0x80757F81, 0x81807682, 0x787F7D75,
+ 0x7B728081, 0x7B7C737A, 0x707A7B71, 0x7B717C7C,
+ 0x7372687D, 0x7375736B, 0x736A7979, 0x73746B72,
+ 0x6B72736A, 0x746B7374, 0x78797073, 0x737A7B72,
+ 0x7C737B7C, 0x7B7C737B, 0x78797B75, 0x7C737E7E,
+ 0x77786F7B, 0x757B7C73, 0x79707D7E, 0x78797078,
+ 0x707B7C73, 0x7B757879, 0x7D7D777B, 0x737D7D77,
+ 0x79707B7C, 0x7B7C7378, 0x7F787A74, 0x837F8283,
+ 0x63646082, 0x3F62635F, 0x03004044, 0x00040002,
+ 0x3C000100, 0x5C57393E, 0x5A5B5758, 0x8C6D6D67,
+ 0x78739491, 0x7B78737B, 0x74828078, 0x80787F7E,
+ 0x7F7D7582, 0x7A817F77, 0x81798582, 0x85827A84,
+ 0x77828078, 0x80777F80, 0x8081787F, 0x787F7D75,
+ 0x7E758280, 0x7E7F767D, 0x757F8077, 0x81787D7E,
+ 0x7E7F7680, 0x787D7E75, 0x7E758081, 0x7D7E757D,
+ 0x7577786F, 0x7E757D7E, 0x8081787D, 0x737E7F76,
+ 0x7D747B7C, 0x8081787C, 0x757F8077, 0x7E787D7E,
+ 0x85857F7E, 0x7986847C, 0x7C778381, 0x83807B7F,
+ 0x78828078, 0x80768280, 0x7D7E757F, 0x777F7C77,
+ 0x79717F7C, 0x7B79717B, 0x727D7E75, 0x7C737A7B,
+ 0x8182797B, 0x76808178, 0x7C767C7C, 0x7E7E787C,
+ 0x77807E76, 0x7D78817F, 0x7E7E7880, 0x757B7B75,
+ 0x7C737D7E, 0x7D7E757B, 0x727D7B73, 0x7A767A77,
+ 0x7978747B, 0x6F787872, 0x74707575, 0x77747077,
+ 0x727A7772, 0x554F7878, 0x12110D55, 0x00020000,
+ 0x00010200, 0x01000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x68680000, 0x969C9766, 0x989EA39A,
+ 0xA498A0A4, 0xA0A498A0, 0x9AA0A499, 0xA499A0A3,
+ 0x9EA499A0, 0x9DA2A89D, 0xA79CA0A8, 0xA2A89DA1,
+ 0x9BA5A99D, 0xAA9BA3A7, 0xA5A99DA5, 0x9FA6AA9F,
+ 0xABA0A6AA, 0xA8ACA0A7, 0xA0A6ADA0, 0xAFA0A6AD,
+ 0xA8ACA0AA, 0x99A0A498, 0xADA39EA4, 0xA9B1A7A5,
+ 0xA4AAB0A5, 0xB0A4ACB0, 0xACB0A4AE, 0xA6B0B5A6,
+ 0xB5A9AEB5, 0xB0B4A9B1, 0x0573746B, 0xA8A10B0E,
+ 0xA1A8A1A1, 0x9AA2A59C, 0xA8A1A0A3, 0xA1A8A1A1,
+ 0x9CA0A89E, 0xA59AA1A7, 0x9DA59A9F, 0x9D9FA79D,
+ 0xA7A19FA7, 0xA3A7A1A3, 0x9CA3A69D, 0xAA9DA3A7,
+ 0xA6ADA0A3, 0x9CA5A99D, 0xA89CA4A8, 0xA5A99DA4,
+ 0xA0A8ACA0, 0xACA1A8AC, 0xA6ACA1A8, 0xA1A4A9A0,
+ 0xACA1A5AA, 0xA5ABA0A6, 0x9EA6ACA1, 0xAA9FA3A9,
+ 0xA6ACA1A4, 0xA1A8ACA1, 0xABA2A8AC, 0xA7AAA1A8,
+ 0xA2A8ACA1, 0xAEA2A9AD, 0xA9ADA1AA, 0xA0A8AA9E,
+ 0xAEA3A8AC, 0xA7ADA2A8, 0xA5ABAFA3, 0xAFA3ADB1,
+ 0xA9AFA4AB, 0xA7A9B1A7, 0xB1A7A9B1, 0x7D847DA9,
+ 0x000E110F, 0x00000000, 0x00000000, 0x3B010101,
+ 0xB7B23A3D, 0xB1B8B1B1, 0xACAFB4AB, 0xB4AAB0B5,
+ 0xACB4AAAC, 0xABAFB6AF, 0xB6ACADB5, 0xACB4AAAE,
+ 0xAAACB4A9, 0xB5ABACB6, 0xACB4AAAD, 0xAEACB3AC,
+ 0xB5AEADB5, 0xACB3ACAD, 0xAAAEB4A9, 0xB2ACB1B5,
+ 0x060907AE, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF585B59, 0xC0C0BEC1,
+ 0xC1C1C1C0, 0xB9BABDBB, 0xBBB9B8BB, 0xBABDBBB8,
+ 0xBCBABCBC, 0xBCBABABC, 0xBABDBBB9, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBEBBC0BE, 0xC1BEBBC0, 0xBAC1BEBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xB8BDBBBA, 0xBABABEB9,
+ 0xBFBABBBF, 0xBCC0BBBB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBCBBBEBC, 0xBFBABBBE, 0xBBBFBABB,
+ 0xB7B6BCB7, 0xC0BEB8BC, 0xBABBB9BD, 0xBBBABBB9,
+ 0xBFBABCBD, 0xBBBFBABB, 0xB9BBBFBA, 0xBEBCBABE,
+ 0xBABEB9BB, 0xBCBBC1BC, 0xBFBABAC1, 0xC6CCC7B9,
+ 0xB7C0C7C2, 0xB0ABB5BC, 0xAAB0ABAA, 0xAFADB5AE,
+ 0xB1ACAEB6, 0xA9B0A9AA, 0xA9AEB3AA, 0xB2A9B0B4,
+ 0xADB1A6AF, 0xA7ABB1A6, 0xB4A8ADB4, 0xAFB3A7B0,
+ 0xA6ADB1A5, 0xB1A4AEB2, 0xABB2A3AA, 0xA3A8AD9E,
+ 0xB0A4ADB2, 0xABAFA3AC, 0xA3A5ABA0, 0xAEA3A8AE,
+ 0xA8AEA3A8, 0x9EA1A99E, 0xAB9FA0AA, 0xA3ABA0A1,
+ 0xA0A6ACA1, 0xACA0A7AB, 0xA6AA9EA8, 0x9BA1A89B,
+ 0xAA9BA1A8, 0xA5AA9BA5, 0x9DA5A99D, 0xA99DA5A9,
+ 0x9EA598A5, 0x989CA598, 0xA79C9CA5, 0xA1A79CA1,
+ 0x9B9BA399, 0xA69B9EA6, 0xA0A79A9E, 0x9AA0A79A,
+ 0xA598A0A7, 0x9CA5989C, 0x949CA394, 0xA0949EA3,
+ 0x9CA0949E, 0x909CA192, 0xA291989F, 0x9AA1929A,
+ 0x949CA094, 0xA0949CA0, 0x9CA0949C, 0x93989F92,
+ 0x9F9299A0, 0x989E9398, 0x006B7067, 0x01000002,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x07080808, 0x07060809,
+ 0x7D7C7809, 0x7880807A, 0x80777E81, 0x8081787F,
+ 0x7A808178, 0x7F768283, 0x8081787E, 0x7A7C8075,
+ 0x80758185, 0x7C80757C, 0x76818278, 0x83797F80,
+ 0x83847A82, 0x767F8076, 0x847B7F80, 0x80817883,
+ 0x777E7F75, 0x7F768081, 0x7E7F757E, 0x77828177,
+ 0x80788281, 0x82807882, 0x7A848278, 0x847A8684,
+ 0x84827886, 0x7B828078, 0x847B8384, 0x83877C81,
+ 0x75818377, 0x7F748181, 0x807E7381, 0x737F7D75,
+ 0x7C737B7C, 0x7B7C727B, 0x6D75796E, 0x786E7779,
+ 0x76756B79, 0x6B6D6E65, 0x746B7374, 0x74756C73,
+ 0x656D6E65, 0x736D6D6E, 0x6A6D6471, 0x72787970,
+ 0x7C737A7B, 0x7D7E757B, 0x77797B75, 0x7C737B7D,
+ 0x7A78707B, 0x757B7C73, 0x7B727D7E, 0x7879707A,
+ 0x737B7C73, 0x7B757B7C, 0x7B7B757B, 0x73797A71,
+ 0x79707B7C, 0x797C7378, 0x7F767A74, 0x837F8084,
+ 0x63646084, 0x3F62635F, 0x04004044, 0x00040000,
+ 0x3A000100, 0x5C57373C, 0x5A5C5658, 0x8A6D6D67,
+ 0x85819492, 0x7A777288, 0x747F7D75, 0x7D757F7E,
+ 0x7B787080, 0x77848179, 0x7F76827F, 0x84827884,
+ 0x78828078, 0x847B8081, 0x80817883, 0x797D7E75,
+ 0x7E758182, 0x7D7E757D, 0x787C7D74, 0x7D748081,
+ 0x7A7B727C, 0x757D7E75, 0x7C737D7E, 0x7B7C737B,
+ 0x757D7E75, 0x7E757D7E, 0x8081787D, 0x787C7D74,
+ 0x82798081, 0x7C7D7481, 0x797E7F75, 0x81788283,
+ 0x81817B80, 0x75838179, 0x7F7A7F7D, 0x83807B82,
+ 0x74828078, 0x7E747E7C, 0x7D7E757D, 0x717A7A74,
+ 0x716C7976, 0x7A787074, 0x7377786F, 0x7D737B7C,
+ 0x7C7D747C, 0x7780807A, 0x7E787D7D, 0x7C7C767E,
+ 0x76817F77, 0x7D78807E, 0x7F7C7780, 0x757C7D74,
+ 0x7D747D7E, 0x7B7C737C, 0x707D7B73, 0x7A747A78,
+ 0x7D7C787A, 0x737A7975, 0x74707877, 0x78757077,
+ 0x6F797671, 0x79707778, 0x79797378, 0x002B2928,
+ 0x00000000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010002, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x999C9A00, 0x989EA39A,
+ 0xA498A0A4, 0xA0A498A0, 0x9AA1A59A, 0xA196A0A3,
+ 0xA1A79C9D, 0x9EA1A99E, 0xA89FA1A9, 0xA2A79EA3,
+ 0x9DA5A99E, 0xAA9BA5A9, 0xA5A99DA5, 0xA2A6AA9F,
+ 0xAA9FA8AB, 0xA7ABA0A6, 0xA1A6ADA0, 0xAD9EA7AE,
+ 0xA8ACA0A8, 0x9EA2A89D, 0xADA3A2A7, 0xA9B1A7A5,
+ 0xA4AAB0A5, 0xB0A4ACB0, 0xACB0A4AE, 0xA8AEB5A8,
+ 0xB4A9AEB5, 0x41443BB0, 0x6C0B0D07, 0xA8A16E72,
+ 0xA2A9A2A1, 0x98A0A59C, 0xA49E9EA1, 0xA1A99FA0,
+ 0x9CA1A79C, 0xA499A1A7, 0xA1A79C9E, 0x9B9FA79C,
+ 0xA39D9DA5, 0xA3A7A19F, 0x9BA8ACA1, 0xAA9DA3A7,
+ 0xA6ADA0A3, 0xA1A8ACA0, 0xA79BABAD, 0xA5A99DA3,
+ 0x9FA8ACA0, 0xABA0A7AB, 0xA5ABA0A7, 0xA0A3ABA1,
+ 0xAA9FA2AA, 0xA5ABA0A4, 0x9EA6ACA1, 0xA99EA3A9,
+ 0xA7ADA2A3, 0xA4A6AA9F, 0xADA4AAAD, 0xA7AAA1AA,
+ 0xA2A5A99E, 0xADA1A9AD, 0xA7AB9FA9, 0xA1A7A99D,
+ 0xADA2A9AD, 0xA7ADA2A7, 0xA3ABAFA3, 0xAFA3ABAF,
+ 0xABB1A6AB, 0xA9A9B1A7, 0xB0A9A8B0, 0x7D837EA8,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x7B760001, 0xB1B8B177, 0xADAFB4AB, 0xB6ADB1B6,
+ 0xB1B6ADB1, 0xAEAEB2AC, 0xB5ACB0B4, 0xAEB6ACB0,
+ 0xAAACB4AA, 0xB4AAABB4, 0xACB4AAAC, 0xADADB5AE,
+ 0xB6AEACB4, 0xABB3ACAB, 0xA9B0B4A9, 0x7A76B0B4,
+ 0x06090779, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585B59, 0xC0C0BFC2,
+ 0xC0C0C0C0, 0xB8BABDBB, 0xBBB6B7BD, 0xB8BCB7B7,
+ 0xBBBABDBB, 0xBDBBBABD, 0xBABDBBBA, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBDBABFBD, 0xC0BEBABF, 0xBBC0BEBB,
+ 0xBDBABFBD, 0xBEBCBABF, 0xB9BCBABB, 0xBBBBBFBA,
+ 0xBFBABCC0, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBBB8BBB9, 0xBFBABABD, 0xBCC0BBBB, 0xB9B8BBB9,
+ 0xBEBAB8BB, 0xBDBEBABD, 0xBABABEB9, 0xBFBABBBF,
+ 0xB9BFBABB, 0xBBBAC0BB, 0xCCC7BAC0, 0xBBC2BBC6,
+ 0xAAAAB1AA, 0xB0ABAAB1, 0xAAB0ABAA, 0xADAEB6AF,
+ 0xB4AFACB4, 0xA9B0A9AD, 0xA8AAAFA6, 0xB2A9ACB1,
+ 0xAEB2A7AF, 0xA3A9ADA2, 0xB0A4ABAF, 0xB2B4A8AE,
+ 0xA5ADB1A5, 0xB2A6ADB1, 0xADB1A5AE, 0xA4A9AB9F,
+ 0xAFA3ACB0, 0xA9B0A3AB, 0xA3A7AEA1, 0xADA2A8AE,
+ 0xA7ADA2A7, 0xA2A4AA9F, 0xADA2A5AD, 0xA1A99EA5,
+ 0xA0A6ADA0, 0xA79BA8AC, 0xA0A498A3, 0xA0A3A79B,
+ 0xA99DA8AC, 0xA5A99DA5, 0x98A4A89C, 0xA79BA0A4,
+ 0xA1A89BA3, 0x9DA1A99E, 0xA79CA0A8, 0x9FA59AA1,
+ 0x999EA69B, 0xA3989CA4, 0x9BA3989B, 0x999BA398,
+ 0xA1979CA4, 0x99A19699, 0x939BA295, 0xA3949DA2,
+ 0x9EA394A0, 0x949EA394, 0xA5959CA3, 0x99A0919B,
+ 0x959CA094, 0x9F939DA1, 0x999D919B, 0x939A9E92,
+ 0x9D949A9E, 0x3638329A, 0x00000100, 0x01000001,
+ 0x01020000, 0x00000100, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x2E080808, 0x7B7A312F,
+ 0x7F7C787F, 0x78808178, 0x82798081, 0x81827881,
+ 0x787E8277, 0x84798084, 0x7E827780, 0x757D8176,
+ 0x7F757C80, 0x7E7F757E, 0x78808178, 0x80778081,
+ 0x817F777F, 0x77817F77, 0x7E79817F, 0x817F7781,
+ 0x747E7D73, 0x7F757F7E, 0x7E7F757E, 0x77807F75,
+ 0x81778281, 0x82817780, 0x77848278, 0x82788381,
+ 0x84837983, 0x7884857C, 0x847A8081, 0x80817783,
+ 0x75818175, 0x7C718181, 0x7E7C717E, 0x727D7B73,
+ 0x7F767A7B, 0x7D7E747E, 0x6A7A7B71, 0x75697476,
+ 0x79786E75, 0x6B787970, 0x6E657374, 0x71756A6B,
+ 0x5F797A70, 0x6A616869, 0x6C6D6469, 0x6F787970,
+ 0x79707879, 0x797C7376, 0x747B7D77, 0x7D74787A,
+ 0x8182797C, 0x737F7D75, 0x7C737D7B, 0x7879707B,
+ 0x70787970, 0x79707879, 0x7C7D7478, 0x727A7B72,
+ 0x7D747A7B, 0x7679707A, 0x7E767A74, 0x827E8084,
+ 0x63646083, 0x3F62635F, 0x04004044, 0x00040000,
+ 0x3B000100, 0x5C573A3D, 0x5A5C5658, 0x8A6C6C66,
+ 0x77739293, 0x7C79747A, 0x6F7F7C74, 0x7A737B79,
+ 0x7E787180, 0x79827F77, 0x7E778481, 0x84817984,
+ 0x77828078, 0x8078817F, 0x83817982, 0x747C7D74,
+ 0x82797C7D, 0x7D7E7581, 0x757D7E75, 0x81787D7E,
+ 0x81827980, 0x75808178, 0x7D757D7E, 0x7D7B737F,
+ 0x75808178, 0x7E757D7E, 0x7E7F767D, 0x787B7C73,
+ 0x7E758081, 0x7B7C737D, 0x787E7F75, 0x7F778182,
+ 0x817F7781, 0x7C7F7D75, 0x807B8684, 0x83807B83,
+ 0x73808178, 0x7B737B7C, 0x7D7E757D, 0x69797A71,
+ 0x716C7172, 0x78766E74, 0x747D7E75, 0x7C737B7F,
+ 0x7B7C737B, 0x767E7E78, 0x81787C7C, 0x7F807780,
+ 0x78808178, 0x7F7A8280, 0x807D7882, 0x757D7E75,
+ 0x7B757D7E, 0x7B7B757B, 0x737B7971, 0x7B757D7B,
+ 0x7B7B757B, 0x777A7B77, 0x79757C7B, 0x7976717C,
+ 0x707B7873, 0x79707879, 0x75777178, 0x517A7B77,
+ 0x00005053, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x32353300, 0x999DA19B,
+ 0xA5989EA4, 0xA0A4989E, 0x98A0A499, 0xA59C9EA1,
+ 0x9FA49BA2, 0x9FA2AAA0, 0xA9A2A0A9, 0xA2A79EA2,
+ 0x9DA6AA9F, 0xAA9BA5A9, 0xA5A99DA5, 0xA0A6ACA1,
+ 0xABA0A5AB, 0xA6ACA1A5, 0xA1A8ACA0, 0xAFA0A9AD,
+ 0xA9ADA1AC, 0x9EA7ADA2, 0xA79EA2A7, 0xA7ADA2A2,
+ 0xA4ADB1A5, 0xB0A4ACB0, 0xACB0A4AC, 0xA8AFB6A9,
+ 0x443BADB3, 0x080C063F, 0xA13D413B, 0xA8A1A1A8,
+ 0x9FA7A0A0, 0x98A1A99F, 0xA2999CA1, 0xA1A69D9D,
+ 0x999FA59A, 0xA59A9EA4, 0xA0A69B9F, 0x9A9DA59A,
+ 0xA79D9DA5, 0xA3A89F9F, 0x9BA8ACA1, 0xA89BA3A7,
+ 0xA6ADA0A1, 0x9CA5A99D, 0xACA1A4A8, 0xA4A89DA8,
+ 0xA2A5ABA0, 0xAAA1A7AD, 0xA4A9A0A5, 0xA0A3ABA1,
+ 0xABA0A2AA, 0xA3ABA0A3, 0xA1A4ACA2, 0xA89FA3AB,
+ 0xA5AAA1A3, 0xA5A6A9A0, 0xADA4ABAE, 0xA8ABA2AA,
+ 0xA2A6AA9F, 0xADA2A9AD, 0xA4AA9FA7, 0xA1A6AA9E,
+ 0xACA1A9AD, 0xA8AEA3A6, 0xA3ABAFA3, 0xB0A4ABAF,
+ 0xA9AFA4AC, 0xA9A9B1A7, 0xAEA9A8B0, 0x7D8280A8,
+ 0x01000000, 0x00000301, 0x00000000, 0x00000000,
+ 0x7B760002, 0xB3B7B177, 0xAAAFB4AB, 0xB7ACAFB5,
+ 0xB0B6ABB1, 0xACAEB3AA, 0xB2ACB0B5, 0xACB3ACAE,
+ 0xABACB3AC, 0xB4AAACB5, 0xADB5ABAC, 0xACADB6AC,
+ 0xB6ACADB6, 0xACB5ABAB, 0xAAAEB4A9, 0x413DB0B3,
+ 0x090A0840, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585B59, 0xC0C0BFC2,
+ 0xBDC0BEC0, 0xB9B7BCBA, 0xBCB7B8BE, 0xB8BCB7B8,
+ 0xBBBABEB9, 0xBDBBBABD, 0xBABDBBBA, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBDBABFBD, 0xC0BEBABF, 0xBBC0BEBB,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBCBFBDBC, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBBBABDBB, 0xBFBABABD, 0xBCC0BBBB, 0xBABBBFBA,
+ 0xBBB6BBBF, 0xBBBFBAB7, 0xBABBBFBA, 0xC0BBBBBF,
+ 0xB9BFBABA, 0xC7BAC0BB, 0xC1BAC7CE, 0xA1A8A1BA,
+ 0xA8A0A59C, 0xB0AAAAB2, 0xAAB1AAAC, 0xAEAEB5AE,
+ 0xB6AFADB5, 0xAAB2ABAE, 0xA7ACB1A8, 0xAFA6ABB0,
+ 0xB0B4A9AC, 0x9FADB1A5, 0xACA0A7AB, 0xABAFA3AA,
+ 0xA3ADB1A5, 0xB1A5ABAF, 0xABAFA3AD, 0xA3AAACA0,
+ 0xB0A4ABAF, 0xA9B0A3AC, 0x9DA6ADA0, 0xA79CA3AA,
+ 0xA0A69BA1, 0xA2A7ADA2, 0xADA2A7AD, 0xA7AEA1A7,
+ 0x9BA3A79B, 0xA79BA3A7, 0xA0A498A3, 0xA0A3A79B,
+ 0xAA9EA8AC, 0xA3A79BA6, 0x9BA0A498, 0xA99DA3A7,
+ 0xA4AB9EA5, 0x9DA1A79C, 0xA89DA2A8, 0x9EA499A2,
+ 0x969DA398, 0xA29799A1, 0x9DA4979C, 0x999EA499,
+ 0xA49A9EA4, 0x9CA49A9C, 0x989CA499, 0xA4989EA5,
+ 0xA1A599A0, 0x949CA394, 0xA1929CA3, 0x9AA1949A,
+ 0x959B9F93, 0xA0949CA0, 0xA2A69A9C, 0x659B9E95,
+ 0x0703696B, 0x06070506, 0x00000000, 0x00000000,
+ 0x00010000, 0x00010200, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x01010100, 0x00000100,
+ 0x02000001, 0x00010001, 0x7A2F302E, 0x7C787D7B,
+ 0x7F7C777F, 0x78828177, 0x81778182, 0x7F807680,
+ 0x78808478, 0x85798084, 0x7F837881, 0x7A81857A,
+ 0x847A8384, 0x83847B83, 0x76808178, 0x7F777C7C,
+ 0x817F7781, 0x77817F77, 0x7C77817F, 0x807D7580,
+ 0x767D7B71, 0x80768280, 0x81807681, 0x74808074,
+ 0x7F758080, 0x7E7F757E, 0x76838278, 0x80768180,
+ 0x7E7F7581, 0x78808178, 0x847A8081, 0x80817783,
+ 0x76818076, 0x7C718282, 0x7E7C727E, 0x737E7C74,
+ 0x7C737B7C, 0x7D7E747B, 0x6D7A7B71, 0x786C7979,
+ 0x7B7B6F78, 0x71787970, 0x6E63797A, 0x666A5F6A,
+ 0x646D6E64, 0x6E656D6E, 0x73746B6D, 0x747B7C72,
+ 0x7D747D7E, 0x7A7D747A, 0x73797B75, 0x7A71797C,
+ 0x7D7B7379, 0x73828078, 0x7B737D7B, 0x7879707D,
+ 0x707B7C73, 0x79707879, 0x78797078, 0x74787970,
+ 0x7E757C7D, 0x7679707D, 0x7E757973, 0x837F8084,
+ 0x63646082, 0x3F62635F, 0x04004044, 0x00040000,
+ 0x3B000100, 0x5C573A3D, 0x575B5558, 0x8A6B6D67,
+ 0x87819293, 0x7B787387, 0x727B7971, 0x7D757E7C,
+ 0x7D7A7280, 0x78827F77, 0x7F778380, 0x84817982,
+ 0x77817F77, 0x7F77817F, 0x807E7681, 0x797D7B73,
+ 0x80788381, 0x7B797182, 0x73787970, 0x81787B7C,
+ 0x7F807780, 0x787C7D74, 0x7B738081, 0x77786F7D,
+ 0x78818279, 0x81788081, 0x7D7E7580, 0x75787970,
+ 0x81787D7E, 0x80817880, 0x787E7F76, 0x7D758182,
+ 0x807E767F, 0x7D86847C, 0x87828785, 0x83807B8A,
+ 0x707B7C73, 0x7C737879, 0x7B7C737B, 0x6F76776D,
+ 0x78707778, 0x7E7C747A, 0x717B7C73, 0x7C73787C,
+ 0x7B7C737B, 0x787E7E78, 0x7F767E7E, 0x8081787E,
+ 0x75808178, 0x7E797F7D, 0x807E7681, 0x757D7E75,
+ 0x7D777D7E, 0x7B7B757D, 0x767A7870, 0x7B75807E,
+ 0x7979737B, 0x73777672, 0x77737877, 0x7A777378,
+ 0x70787872, 0x79707879, 0x76787278, 0x797A7B77,
+ 0x53517A7B, 0x00000052, 0x00000100, 0x01000001,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00010000, 0x9A636761,
+ 0xA59A9EA3, 0x9EA4999F, 0x9C9BA097, 0xA59CA2A5,
+ 0xA0A59CA2, 0x9FA0A89E, 0xA89EA1A9, 0xA3A89FA0,
+ 0x9DA5A99E, 0xA99DA5A9, 0xA5A99DA5, 0xA0A4AA9F,
+ 0xABA0A3AB, 0xA6ACA1A5, 0xA0A8ACA0, 0xAEA2A8AC,
+ 0xA8ACA0AA, 0xA2ABB1A6, 0xA89DA7AD, 0xA2A89DA2,
+ 0xA4ABAFA3, 0xB0A4ACB0, 0xB2B6AAAC, 0x3BB0B4A9,
+ 0x0C063F44, 0x080C0608, 0x9FA3A89F, 0xA99FA1A9,
+ 0xA0A99FA0, 0x9BA1A99F, 0xA1989DA5, 0x9EA39A9C,
+ 0x9A9EA499, 0xA59A9FA5, 0xA0A69B9F, 0x9A9EA69B,
+ 0xA79D9DA5, 0x9FA79D9F, 0x9BA3A99E, 0xA89BA3A7,
+ 0xA6ADA0A1, 0x9BA3A79B, 0xADA1A3A7, 0xA4A89DA9,
+ 0xA1A5A99E, 0xAAA1A8AC, 0xA5AAA1A7, 0x9EA6ACA1,
+ 0xA99EA1A9, 0xA3ABA0A3, 0xA2A4ACA2, 0xA89FA4AC,
+ 0xA3A89FA3, 0xA1A6A9A0, 0xABA2A8AC, 0xA8ACA1A8,
+ 0xA2A5A99E, 0xABA0A9AD, 0xA8AEA3A5, 0xA0A9ADA1,
+ 0xAEA3A8AC, 0xA7AEA1A8, 0xA3A8ACA0, 0xAFA3ABAF,
+ 0xABAFA3AB, 0xA7A9B1A6, 0xB0ABA9B1, 0x282B29AA,
+ 0x00000000, 0x01010200, 0x00000001, 0x00000000,
+ 0x3D3B0000, 0xB3B7B23A, 0xAAB1B6AD, 0xB4ABADB5,
+ 0xAFB4ABAF, 0xAAAFB4AB, 0xB2A9B0B3, 0xAEB2ACAD,
+ 0xACABB3AC, 0xB4AAABB3, 0xACB4AAAC, 0xACABB4AA,
+ 0xB4AAADB6, 0xABB4AAA9, 0xACAEB3AA, 0x0905B0B2,
+ 0x08090708, 0x00030101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF585B59, 0xC0C0BEC1,
+ 0xBEC1BFBE, 0xB8B6BBB9, 0xBCB7B7BD, 0xB7BDB8B6,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBEBCBBBF, 0xBBBEBCBB, 0xBCBBBEBC, 0xBEB9BBBE,
+ 0xBBBFBABA, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBABCC0BB, 0xBFBABBBF, 0xBBBFBABB, 0xBDBABDBB,
+ 0xC0BBBCBF, 0xBABEB9BC, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBBBBBEBC, 0xBEBABABD, 0xBCC0BBBD, 0xB9BABEB9,
+ 0xBEB9B8BE, 0xB5BBB6B8, 0xBAB5BCB5, 0xBFBABAC1,
+ 0xBAC0BBB9, 0xB9B8C0B9, 0xA39DB9C0, 0x959A919F,
+ 0xA8A2A69B, 0xB3AAADB3, 0xAEB3AAB0, 0xA9AAB2A8,
+ 0xB4AAABB3, 0xA9B2A8AB, 0xA9A9AFA4, 0xB0A5AEB4,
+ 0xACB0A5AC, 0xA5ABB2A5, 0xACA0ABB2, 0xA8ACA0A8,
+ 0xA6A9ADA1, 0xACA0AEB2, 0xA8AA9EA8, 0xA0A3A79B,
+ 0xACA0A8AC, 0xA6ADA0A8, 0x9DA4AB9E, 0xA497A1AA,
+ 0xA3A99E9D, 0xA0A8ACA1, 0xACA0A7AB, 0xA3A79BA8,
+ 0x9DA4A89C, 0xAB9FA7AC, 0xA4A89CA7, 0x9EA3A49A,
+ 0xA69CA7A8, 0xA3A79CA5, 0x9DA2A89D, 0xA89DA2A8,
+ 0xA2A89DA2, 0x989EA598, 0xA296A0A4, 0xA0A4989E,
+ 0x95A0A498, 0xA1959BA2, 0xA0A5969D, 0x98A0A498,
+ 0xA598A0A4, 0x99A1969E, 0x979AA298, 0xA19699A1,
+ 0x99A19699, 0x959BA295, 0xA1959DA1, 0x9DA1959D,
+ 0xA1A8ACA0, 0xAAA1A8AC, 0x71746BA7, 0x00373834,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000000, 0x00010001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x01010000, 0x00000001, 0x070A0807,
+ 0x08070A08, 0x5B5A560A, 0x767E7E78, 0x7C737C7C,
+ 0x807F757B, 0x767F7E74, 0x81758282, 0x7F7F7381,
+ 0x75808074, 0x84787F81, 0x81857A80, 0x7B84857B,
+ 0x847B8384, 0x80817883, 0x78808178, 0x807B8081,
+ 0x817E7983, 0x78807E76, 0x7F778280, 0x83817981,
+ 0x75848278, 0x82788280, 0x83827884, 0x78818076,
+ 0x81778382, 0x80817780, 0x76858579, 0x81758282,
+ 0x83827881, 0x767E7F76, 0x80777E7F, 0x797A717F,
+ 0x73808178, 0x7D737E7D, 0x7E7D737E, 0x707E7F76,
+ 0x786F7879, 0x7B7C7277, 0x6F7B7A70, 0x7C717B7B,
+ 0x7E7C717E, 0x6B7A7870, 0x6E657374, 0x6C6D646D,
+ 0x6976776D, 0x71697273, 0x78766E73, 0x757B7C73,
+ 0x7E757D7E, 0x7A7B727D, 0x757B7C73, 0x7B737D7E,
+ 0x7E7D737D, 0x727F7D73, 0x786E7E7C, 0x79776F7A,
+ 0x737A7870, 0x7C747B78, 0x7B79717E, 0x707A7870,
+ 0x79707879, 0x76797078, 0x7E757973, 0x847E8084,
+ 0x5E605A82, 0x3B5E605A, 0x03003F41, 0x01050002,
+ 0x3A000200, 0x5C57393C, 0x585C5656, 0x8A686C66,
+ 0x86809093, 0x77797384, 0x767B7C73, 0x8078807E,
+ 0x7A787082, 0x75828078, 0x7D747D7E, 0x7D7E757C,
+ 0x757C7D74, 0x80787D7E, 0x82807882, 0x7B7D7A72,
+ 0x7D758683, 0x7D7A7280, 0x7A807E76, 0x80778482,
+ 0x7D7E757F, 0x737B7E75, 0x7C73797C, 0x797A717B,
+ 0x787D7E74, 0x82787F83, 0x7E7F7681, 0x797D8077,
+ 0x7F797D7F, 0x7F80777F, 0x767E8178, 0x7F777E7F,
+ 0x817F7781, 0x76818278, 0x807B7E7F, 0x87847F83,
+ 0x7380807A, 0x7C737B7C, 0x78796F7B, 0x6A75766D,
+ 0x776E7273, 0x78797076, 0x737B7C73, 0x7A747B7C,
+ 0x7D7D777A, 0x737D7E75, 0x7E757B7C, 0x7C7D747D,
+ 0x78828078, 0x80788280, 0x817F7782, 0x777F8077,
+ 0x7D777F80, 0x7D7D777D, 0x757B7C73, 0x7B727D7E,
+ 0x7B7C737A, 0x6E7A7A74, 0x76727474, 0x7A797577,
+ 0x72787872, 0x78727878, 0x7A777278, 0x74797672,
+ 0x83827975, 0x5B595885, 0x00020300, 0x04000204,
+ 0x00030100, 0x01000101, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x99000100,
+ 0xA0999B9F, 0x99A19799, 0x9E99A099, 0xA59CA0A4,
+ 0xA7AAA1A2, 0x9EA2A89D, 0xA99EA1A9, 0xA3A79CA3,
+ 0x9CA3A79C, 0xA99DA4A8, 0xA5A99DA5, 0xA0A3A99E,
+ 0xACA1A5AB, 0xA8ACA0A8, 0xA1A6ADA0, 0xAFA2A7AE,
+ 0xA7AEA1A8, 0xA3A9B0A3, 0xADA1A9B0, 0xA8ACA0A9,
+ 0xA8B0B4A8, 0xB4A8B0B4, 0xB2B3A9B2, 0x0035382F,
+ 0x02000002, 0x6A6F6600, 0x9DAAAEA3, 0xA89DA4A8,
+ 0xA1A79CA2, 0x9AA2AAA0, 0xA2989BA4, 0x9FA59A9A,
+ 0x989EA598, 0xA598A0A4, 0x9FA59A9E, 0x9C9CA499,
+ 0xA8A19EA6, 0xA1A99FA1, 0x9AA2A79E, 0xA6999FA5,
+ 0xA2A99C9F, 0x9CA3A79B, 0xAA9EA4A8, 0xA4A89CA6,
+ 0x9EA4A89D, 0xA9A0A6A7, 0xA7A89EA8, 0x9DA5A99D,
+ 0xA89CA3AA, 0xA6ACA1A4, 0xA2A6ACA1, 0xAAA1A6AB,
+ 0xA3A89FA5, 0x9FA6AA9F, 0xACA1A7AB, 0xA8ACA0A8,
+ 0x9FA6AA9E, 0xA99DA7AB, 0xA5A99DA5, 0xA2A6AA9E,
+ 0xAEA1AAAE, 0xA7AEA1A7, 0x9FA8ACA0, 0xADA1A9AE,
+ 0xA8ACA0AB, 0xA2A9B0A1, 0xADA4A8AF, 0x3C3D39A8,
+ 0x01000100, 0x01000101, 0x00010000, 0x00000000,
+ 0x00000000, 0x7F828000, 0xAFB1B8B1, 0xB8B1B0B9,
+ 0xB1B9AFB1, 0xA9AFB4AB, 0xB7ACAEB4, 0xAFB4ABB3,
+ 0xACACB4AD, 0xB4ADABB3, 0xACB3ACAD, 0xAEACB4AD,
+ 0xB5ADADB5, 0xABB3ACAA, 0x3CB9C0B9, 0x02003D41,
+ 0x00000001, 0x00000000, 0x00020000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBE585B59, 0xC0C0BDC0,
+ 0xBFC2C0BE, 0xB8B7BCBA, 0xBDB8B7BD, 0xB8BEB9B7,
+ 0xB9BBBFB9, 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBEBCBBBF, 0xBBBEBCBB, 0xBCBBBEBC, 0xBFBABBBE,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBFB9BBBF, 0xBBBFB9BB,
+ 0xB9BBBFBA, 0xBFBABABE, 0xBBBFBABB, 0xBBB9BCBA,
+ 0xC0BBBABD, 0xBABEB9BC, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBDBBBEBC, 0xBEBABCBF, 0xBCBDB9BD, 0xB8BABEB8,
+ 0xBEB9B8BF, 0xB8BEB9B8, 0xB5B1B8B1, 0xC0BBB5BC,
+ 0xBFC5C0BA, 0xACB8BFB8, 0xA59CACB3, 0xA1A59AA0,
+ 0xA8B0B4A9, 0xB4A9B0B4, 0xB0B4A9B0, 0xA7AEB4A9,
+ 0xB2A8AAB2, 0xA9B1A7AA, 0xA8AAB0A5, 0xB5AAAEB5,
+ 0xAFB3A8B1, 0xA0ABB2A5, 0xAFA3A6AD, 0xADB1A5AB,
+ 0x9DA4AB9E, 0xAA9EA3AA, 0xA8AA9EA6, 0x9DA3A79B,
+ 0xACA0A5A9, 0xA5A99DA8, 0xA1A2A99C, 0xADA0A7AE,
+ 0xA3AA9DA6, 0x9CA9ADA2, 0xA397A3A7, 0xA3A79B9F,
+ 0x9EA6AB9C, 0xA89CA8AD, 0xA4A89CA4, 0x9AA2A399,
+ 0xA69CA3A4, 0xA6AA9EA5, 0x9CA1A79C, 0xA499A1A7,
+ 0xA0A4999E, 0x949CA094, 0xA1959CA0, 0xA0A4989D,
+ 0x989FA397, 0xA195A0A4, 0xA0A4989D, 0x939DA293,
+ 0xA1959DA2, 0x999F949D, 0x9498A096, 0x9D93959E,
+ 0x929A8F94, 0x90969C91, 0x9C92989C, 0x9D9E949B,
+ 0xA1A8ACA1, 0x746EA8AC, 0x08090572, 0x00000100,
+ 0x00000000, 0x00000000, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x01000000, 0x00000001, 0x00010000, 0x050B0908,
+ 0x5A550C09, 0x86847C5D, 0x74797A71, 0x7F757C7D,
+ 0x7E7F757E, 0x7384867A, 0x80757F7F, 0x83817682,
+ 0x75808074, 0x84788181, 0x81857A82, 0x7B808178,
+ 0x82798384, 0x80817881, 0x787E8178, 0x7F798081,
+ 0x7F7C777F, 0x77807E76, 0x8078817F, 0x84837982,
+ 0x79848277, 0x847A8684, 0x87857B86, 0x76848379,
+ 0x81778180, 0x83857980, 0x6F828276, 0x82767B7B,
+ 0x7F7F7382, 0x767D7E74, 0x7B727E7F, 0x7C7D747A,
+ 0x78808178, 0x7D738081, 0x7A796F7E, 0x707B7C73,
+ 0x7E757879, 0x7D7E747D, 0x6F7C7B71, 0x7B707B7B,
+ 0x7C7A6F7D, 0x657A7870, 0x69606D6E, 0x73746B68,
+ 0x6C7A7B71, 0x71697576, 0x78766E73, 0x747B7C73,
+ 0x7C737C7D, 0x7B7C737B, 0x73787970, 0x786E7B7C,
+ 0x7E7D7379, 0x6D7D7B70, 0x746A7C78, 0x76746A76,
+ 0x737B7971, 0x7A727B78, 0x7C7A727C, 0x717D7B73,
+ 0x7970797A, 0x76797078, 0x7E747872, 0x847E8084,
+ 0x5E605A82, 0x395E6158, 0x03003F42, 0x02030002,
+ 0x3B000100, 0x5C573A3D, 0x565D5656, 0x8A676C63,
+ 0x79738E93, 0x75797375, 0x787D7E75, 0x7F778081,
+ 0x7F7D7581, 0x747A7B72, 0x81787C7D, 0x7F82797E,
+ 0x75797C73, 0x7D757D7E, 0x7F7D757F, 0x7A817E76,
+ 0x7D768781, 0x817E7683, 0x7B838078, 0x7F778583,
+ 0x7F807781, 0x78808178, 0x7B727E81, 0x7D7E757A,
+ 0x75787C71, 0x7F757C80, 0x797A717E, 0x797C7D74,
+ 0x817B7D7F, 0x7E7E7881, 0x777F8077, 0x7F777F80,
+ 0x817F7781, 0x757E7F75, 0x807B7E7F, 0x807D7883,
+ 0x757C7C76, 0x7D747D7E, 0x767A6F7A, 0x6B73746B,
+ 0x766D7374, 0x78797075, 0x707B7C73, 0x7B757879,
+ 0x7C7C767B, 0x737B7C73, 0x7E757B7C, 0x7D7E757D,
+ 0x77817F77, 0x8078817F, 0x817F7782, 0x78808178,
+ 0x807A8081, 0x7F7F7980, 0x787D7E75, 0x7D748081,
+ 0x7D7E757C, 0x757B7873, 0x7A767D7A, 0x7776727B,
+ 0x73797973, 0x78737979, 0x7C79747B, 0x737B7675,
+ 0x76757974, 0x7875717A, 0x23787872, 0x0400292C,
+ 0x00030102, 0x01000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x31000100,
+ 0x9F9A3236, 0x98A09999, 0x9D98A099, 0xA59C9DA4,
+ 0xA1A59AA2, 0x9CA2A89D, 0xA89DA2A9, 0xA4A89DA4,
+ 0x9CA3A79C, 0xA99DA3A7, 0xA5A99DA5, 0x9FA4AA9F,
+ 0xABA0A4AA, 0xA6ADA0A7, 0xA2A7AEA1, 0xACA1A7AD,
+ 0xA7ADA2A6, 0xA1A9B0A3, 0xAFA3A9B0, 0xA8ACA0AB,
+ 0xA8B1B5A9, 0xB3A9B2B4, 0x424038B4, 0x00000200,
+ 0x70670002, 0xA0A69B6B, 0x9CA0A498, 0xA89CA6A8,
+ 0xA5A99DA4, 0x9B9DA59A, 0xA2979EA6, 0x9CA4999A,
+ 0x96A0A498, 0xA598A0A5, 0x9EA4999E, 0x9B9EA69B,
+ 0xA8A19DA5, 0x9DA49DA1, 0x9CA3A89F, 0xA499A1A7,
+ 0x9FA6999E, 0x9DA5A99D, 0xA99DA5A9, 0xA8ACA0A5,
+ 0x9EA8A99F, 0xA8A0A6A7, 0xA8A99FAA, 0x9BA7A99D,
+ 0xA69AA5AA, 0xA5A99DA2, 0xA0A4AA9F, 0xA9A0A5AB,
+ 0xA3A89FA4, 0xA0A5A99E, 0xACA0A8AC, 0xA8ACA0A8,
+ 0xA0A8ACA0, 0xA99DA8AC, 0xA3A79BA5, 0xA1A9ADA1,
+ 0xAEA1A9AD, 0xA7AEA1A7, 0x9FA9AE9F, 0xAEA2A9AE,
+ 0xAAAEA2AC, 0xA3A8AFA0, 0xADA4A9B0, 0x050602AA,
+ 0x00000100, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x2A2D2B00, 0xB1B0B6B1, 0xB8B1B0B8,
+ 0xB0B9AFB0, 0xAAADB5AB, 0xB5AAAFB5, 0xAEB4A9B1,
+ 0xACACB5AB, 0xB2ABABB3, 0xACB3ACAB, 0xADACB3AC,
+ 0xB5AEACB4, 0xADB5AEAD, 0x3EB9BFBA, 0x00003D40,
+ 0x00000000, 0x00010101, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF585B59, 0xC0C0BEC1,
+ 0xBEC1BFC0, 0xB8B7BCBA, 0xBEB7B7BD, 0xB8BFB8B7,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBBBBBFBA, 0xBFBABCC0, 0xBBBFBABB,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBBBCBFBD,
+ 0xC0BBBABD, 0xBABEB9BC, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBCB9BEBC, 0xBDB9BBBE, 0xBDBFB9BC, 0xB9BABEB8,
+ 0xBEB8BBBF, 0xBCC0BABA, 0xB0B5BCB5, 0xBBB6B0B7,
+ 0xC0C4BFB7, 0x9EAEB2AC, 0xA69DA0A4, 0xB0B4A9A1,
+ 0xA8B0B4A9, 0xB4A8B2B4, 0xAFB3A7B0, 0xA8ACB3A6,
+ 0xB4AAABB3, 0xABB3A9AC, 0x9EADB3A8, 0xB0A5A3A9,
+ 0xAEB4A9AA, 0xA0A9B0A3, 0xAEA3A6AD, 0xABAFA4AA,
+ 0x9EACB3A6, 0xAA9EA4AB, 0xA9ADA1A6, 0xA0A8ACA0,
+ 0xAB9FA8AC, 0xA9ADA1A7, 0xA0A8ACA0, 0xACA1A6AD,
+ 0xA0A69BA6, 0x9BA0A498, 0xA89CA3A7, 0xA5A99DA6,
+ 0x9CA7AC9D, 0xACA0A4AB, 0xA0A498A8, 0x9DA1A599,
+ 0xA99DA5A9, 0xA5AA9BA5, 0x98A0A498, 0xA499A0A4,
+ 0xA2A69BA0, 0x96A0A498, 0xA3949EA5, 0x9EA5969C,
+ 0x99A0A596, 0xA095A1A5, 0x9BA1969A, 0x939DA195,
+ 0x9C909B9F, 0x969D9098, 0x8F929A8F, 0x9B8F929A,
+ 0x929A8F91, 0x91969C91, 0x9B8F989C, 0xA0A49997,
+ 0x39A9ACA3, 0x08043D3F, 0x08090707, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000001, 0x00000100, 0x03010002, 0x5434312C,
+ 0x847A5E5C, 0x86847986, 0x737C7D73, 0x7E757A7E,
+ 0x7D7E747D, 0x737C7E72, 0x82747D7F, 0x83817682,
+ 0x79817F74, 0x83778483, 0x7F807681, 0x7A828078,
+ 0x857F827F, 0x83847B85, 0x7782837A, 0x7D777F80,
+ 0x7F7F797D, 0x78838179, 0x7F758280, 0x7E7F757E,
+ 0x79838377, 0x84798684, 0x88847988, 0x79858378,
+ 0x84788585, 0x83837784, 0x77838176, 0x7E738482,
+ 0x7C7C7080, 0x77818278, 0x7F758081, 0x7E7F757E,
+ 0x787F8077, 0x7C748081, 0x7B79717E, 0x737D7E75,
+ 0x7970797C, 0x7B7C7278, 0x6E7C7B71, 0x7C717A7A,
+ 0x7D7B707E, 0x667A7870, 0x69606E6F, 0x6B6E6566,
+ 0x73717269, 0x7B717B7C, 0x76776D7A, 0x76787970,
+ 0x7C737E7F, 0x7B7C737B, 0x74787970, 0x7D757C7D,
+ 0x7D7C727F, 0x717A786D, 0x74697E7C, 0x76746A76,
+ 0x737B7971, 0x7A717B78, 0x7A7B7279, 0x73787970,
+ 0x7872797C, 0x75777176, 0x7F747873, 0x847E8084,
+ 0x60605A82, 0x395E6158, 0x04003F42, 0x00040000,
+ 0x3B000100, 0x5C573A3D, 0x585C5658, 0x89686D64,
+ 0x79738D92, 0x75797375, 0x747D7E75, 0x7E767C7D,
+ 0x7F7D7580, 0x737B7C73, 0x7C737B7C, 0x7B7C737B,
+ 0x7377786F, 0x81797B7C, 0x82807883, 0x76817E76,
+ 0x7E76817E, 0x7C797181, 0x78827F77, 0x80788280,
+ 0x80817882, 0x727D7E75, 0x7F767A7B, 0x7E81787C,
+ 0x787E7F75, 0x827A8182, 0x81827984, 0x767F8077,
+ 0x807B7E7F, 0x7F7F7983, 0x767F8077, 0x7F777F80,
+ 0x7F7D7581, 0x757A7B71, 0x807B7E7F, 0x83807B83,
+ 0x757D7E75, 0x7C737D7E, 0x7879707B, 0x6D75766D,
+ 0x776F7576, 0x78797079, 0x757D7E75, 0x7E757D7E,
+ 0x807E767D, 0x747D7E75, 0x81777C7D, 0x80817780,
+ 0x78808178, 0x807A8081, 0x7C7D7480, 0x7782837A,
+ 0x7E797F80, 0x807D7881, 0x777F7D75, 0x8078817F,
+ 0x82807882, 0x77807C77, 0x78747E7B, 0x74736F79,
+ 0x737B7873, 0x7A757D7B, 0x7A77727D, 0x74797574,
+ 0x74737975, 0x79767278, 0x6F797A71, 0x2B257778,
+ 0x0203002B, 0x01000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x01010000, 0x00000001, 0x00000000,
+ 0x6B660001, 0x98A09967, 0x9C98A099, 0xA59C9DA6,
+ 0xA1A59AA0, 0x9CA4A89D, 0xA89DA4A8, 0xA4A89DA4,
+ 0x9DA7A99D, 0xA79BA7A9, 0xA5A99DA3, 0xA0A5ABA0,
+ 0xABA0A3AB, 0xA7ADA2A5, 0xA2A5ABA0, 0xADA2A5AD,
+ 0xA7ADA2A7, 0xA3ACB0A4, 0xAFA3ABAF, 0xA8ACA0AB,
+ 0xA9B0B4A8, 0x4038B2B3, 0x07040042, 0x30000200,
+ 0xA69B3439, 0x9FA699A0, 0x98A0A498, 0xA596A2A4,
+ 0xA0A498A2, 0x96A0A79A, 0x9F929AA3, 0x9EA79A96,
+ 0x98A0A498, 0xA499A0A4, 0x8D93889E, 0x9B969C91,
+ 0xA59E9FA4, 0x9DA49D9E, 0x9AA1A69D, 0xA4999FA5,
+ 0xA0A69B9E, 0x9BA3A79B, 0xA79BA3A7, 0xA5A99EA3,
+ 0x9DA8A99F, 0xA69CA6A7, 0xA6A79DA7, 0x9DA7A99D,
+ 0xA89DA5A9, 0xA5A99EA4, 0xA1A3A89F, 0xA8A1A3AB,
+ 0xA1A99FA1, 0xA1A1A79C, 0xAC9DA7AE, 0xA8AD9EA7,
+ 0xA0A9ADA1, 0xACA0A8AC, 0xA0A498A8, 0xA2A7ABA0,
+ 0xADA1A9AD, 0xA9ADA1A9, 0x9EA9AE9F, 0xADA1A8AD,
+ 0xA9ADA1A9, 0xA2A8AFA0, 0x7670A8AF, 0x06070574,
+ 0x00000100, 0x01010001, 0x00000001, 0x00000000,
+ 0x00000000, 0x2A2D2B00, 0xB19EA49F, 0xB9AFB0B8,
+ 0xB0B9AFB0, 0xAAAFB7AD, 0xB4A8AFB5, 0xB0B7AAB0,
+ 0xABACB4A9, 0xB2A8ADB5, 0xACB4AAAA, 0xACABB2AB,
+ 0xB3ACACB3, 0xB1B7B2AC, 0x017C7F7D, 0x00000001,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585B59, 0xC0C0BFC2,
+ 0xBEC1BFC0, 0xB8BABDBB, 0xBEB7B7BD, 0xB9C0B9B7,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBBBBBFBA, 0xBFBABCC0,
+ 0xBBBFBABB, 0xBCBBBFBA, 0xBFBABDC1, 0xBBBFBABB,
+ 0xBBBBBFBA, 0xBFBABCC0, 0xBBBFBABB, 0xB9BCBFBD,
+ 0xBEB9B8BB, 0xBABEB9BA, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBAB9BEBC, 0xBFB9BBBF, 0xBDBFB9BD, 0xB8BABEB8,
+ 0xBEB8BABE, 0xBABEB8BA, 0xBABBBFB9, 0xC0BBBAC1,
+ 0xC1C5C0BC, 0x90AEB2AC, 0xA49B9499, 0xAEB4A99F,
+ 0xA8B0B4A9, 0xB4A8B0B4, 0xB0B4A8B0, 0xA8ADB4A7,
+ 0xB3A9ADB3, 0xA9B1A7AB, 0x9EAAB0A5, 0xB1A6A3A9,
+ 0xAAB1A4AB, 0xA3ABB2A5, 0xADA1A9B0, 0xA8ACA0A9,
+ 0x9EA6ADA0, 0xADA2A4AB, 0xA9ADA2A9, 0xA0A5A99D,
+ 0xAB9FA8AC, 0xA4A89CA7, 0x9FA8ACA0, 0xA99EA7AB,
+ 0xA0A69BA3, 0x9DA3A79B, 0xA79BA5A9, 0xA7A99DA5,
+ 0x9DA7AB9F, 0xA397A3AA, 0xA0A4989F, 0x9BA0A498,
+ 0xA79BA3A7, 0xA1A599A3, 0x9CA0A498, 0xA79CA4A8,
+ 0xA0A498A3, 0x95A0A498, 0xA3949DA4, 0x9CA3949C,
+ 0x919EA394, 0x9B90999D, 0x959B9095, 0x8F959B90,
+ 0x9C90979B, 0x989C9098, 0x91989F92, 0x9E91959E,
+ 0x929A8F95, 0x91969C91, 0xA499989C, 0xA0A39AA0,
+ 0x053E403A, 0x09070809, 0x07070708, 0x01000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x01010200, 0x3D3C3803, 0x7985837B,
+ 0x84798684, 0x86847986, 0x747E7F75, 0x82797B7F,
+ 0x80817881, 0x737D7E74, 0x82767D7F, 0x86847982,
+ 0x75817F75, 0x8276807F, 0x84837982, 0x7885837B,
+ 0x837B8280, 0x82807885, 0x77848379, 0x81788081,
+ 0x7D7D7780, 0x79807E76, 0x7F768381, 0x797A707E,
+ 0x767D7D71, 0x82778381, 0x88847986, 0x78868479,
+ 0x85778484, 0x86867885, 0x79868479, 0x84798684,
+ 0x7F7F7386, 0x77828177, 0x7D738081, 0x7A7B717C,
+ 0x77808177, 0x7C748281, 0x7E7C747E, 0x78808178,
+ 0x7E757E81, 0x7B7C737D, 0x6F7D7C72, 0x796E7B7B,
+ 0x7C7A6F7B, 0x647B7A70, 0x6E656D6E, 0x73746A6D,
+ 0x6D6D6E65, 0x7C727677, 0x7172687B, 0x73787970,
+ 0x79707B7C, 0x7B7C7378, 0x737B7C73, 0x7D757B7C,
+ 0x7D7B737F, 0x727D7C72, 0x776D7D7C, 0x75746A79,
+ 0x717A7870, 0x786F7B79, 0x78797077, 0x70787970,
+ 0x78727679, 0x76787278, 0x7F767773, 0x837F8283,
+ 0x60605A84, 0x3B5E6158, 0x03003F41, 0x00030102,
+ 0x38000100, 0x5C58393D, 0x585C565B, 0x8A6A6D64,
+ 0x79738E93, 0x787A7477, 0x757B7C73, 0x78707D7E,
+ 0x7D7B737A, 0x737C7D74, 0x7B727B7C, 0x7B7C737A,
+ 0x707B7C73, 0x7B737879, 0x8280787D, 0x6D7C7A72,
+ 0x7A727775, 0x7C7A727D, 0x75827F77, 0x7E767F7D,
+ 0x7F7D7580, 0x737D7E75, 0x7C737B7C, 0x7E817879,
+ 0x75818278, 0x7E767E7F, 0x81827980, 0x7A818279,
+ 0x807B8283, 0x827F7A83, 0x7882837A, 0x7F778081,
+ 0x7F7D7581, 0x75818278, 0x7E767E7F, 0x83817980,
+ 0x73818279, 0x7D747B7C, 0x7879707C, 0x7072736A,
+ 0x756D7879, 0x7A787077, 0x787D7E75, 0x7E758081,
+ 0x8280787D, 0x737D7E75, 0x81777B7C, 0x7D7E7480,
+ 0x79817F77, 0x7E798381, 0x817F7781, 0x777F8077,
+ 0x7C777F80, 0x817F777F, 0x767F7D75, 0x8078807E,
+ 0x7F7D7582, 0x777F7C77, 0x79757F7C, 0x7A7A747A,
+ 0x727A7870, 0x7C777C7A, 0x7B78737F, 0x72787571,
+ 0x75747976, 0x79767279, 0x717A7772, 0x7872797A,
+ 0x51504C78, 0x00050505, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00010101,
+ 0x35330000, 0x999F9A32, 0x9C98A099, 0xA59B9DA6,
+ 0xA0A59C9D, 0x9DA4A89D, 0xA89DA4A8, 0xA2A89DA2,
+ 0x9EA5A99E, 0xA79CA5A9, 0x9EA499A3, 0xA0A4AA9F,
+ 0xACA1A3AB, 0xA5ABA0A6, 0xA3A7ACA3, 0xADA2A7AC,
+ 0xA7ADA2A7, 0xA0A8ACA0, 0xACA0A8AC, 0xB0B4A9A8,
+ 0x37AFB3A8, 0x04003F40, 0x06050107, 0x9C373933,
+ 0xA79AA0A5, 0xA0A79AA0, 0x9CA0A498, 0xA596A6A8,
+ 0xA0A596A2, 0x96A1A599, 0x9E919CA3, 0x9CA39697,
+ 0x999EA598, 0xA499A0A4, 0x92988D9E, 0x9A9AA095,
+ 0xA49B9FA5, 0x9FA49B9F, 0x9A9FA59A, 0xA4999FA5,
+ 0xA1A79C9E, 0x9BA3A79B, 0xA89DA3A7, 0xA3A79CA4,
+ 0x9DA4A89D, 0xA79DA4A8, 0xA3A49AA6, 0x9DA3A79B,
+ 0xA69BA3AA, 0x9EA499A2, 0x9FA2AAA0, 0xA9A2A1A9,
+ 0xA2AAA0A2, 0x9D9DA398, 0xA99DA3AA, 0xA5A99DA5,
+ 0xA1A8ACA0, 0xACA1A8AC, 0xA5A99EA8, 0xA0A6A9A0,
+ 0xAB9FA7AB, 0xAAAEA2A7, 0x9EA8AD9E, 0xACA0A6AD,
+ 0xA7AEA1A8, 0xA3A8AFA2, 0x3D39A8AE, 0x0607053C,
+ 0x00010200, 0x00000001, 0x01010100, 0x00000000,
+ 0x00000000, 0x00010000, 0xAF797F7A, 0xB9AFB1B9,
+ 0xB1B9AFB1, 0xA9ADB5AB, 0xB5A8ACB4, 0xAEB5A8AE,
+ 0xA9ADB3A8, 0xB4A9ACB4, 0xAEB3AAAE, 0xAAAFB4AB,
+ 0xB3A9ACB4, 0xB1B8B1AB, 0x003D403E, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF585B59, 0xC0C0BEC1,
+ 0xBEC1BFC0, 0xBBBBBEBC, 0xBFB9BAC0, 0xBBBFB9BB,
+ 0xBCBBBFBA, 0xC0BBBBBE, 0xBBBFBABC, 0xBABBBFBA,
+ 0xC0BBBBBF, 0xBBBFBABC, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBEB9BBBF, 0xBBBFBABA,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBBBCBFBD,
+ 0xBCB7BABD, 0xBCC0BBB8, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB9BCC0BA, 0xBFBABBBF, 0xB9BDB8BB,
+ 0xB9B8BEB9, 0xBEB8BABE, 0xBBBDB7BC, 0xB8BABEB8,
+ 0xBEB8BABE, 0xBABEB8BA, 0xBABCC0BB, 0xC4BFBBBF,
+ 0xB7BBB5BE, 0x97A3A69D, 0xAEA39EA2, 0xADB3A8A8,
+ 0xA9AEB4A9, 0xB4A9AEB4, 0xADB3A8AE, 0xA7ACB2A7,
+ 0xB2A9ACB2, 0xADB2A9AD, 0xA8B0B4A9, 0xB1A5B0B4,
+ 0xADB1A5AD, 0xA1ABAFA3, 0xB1A2ABB0, 0xABAFA3AE,
+ 0xA2A6ADA0, 0xAFA4A7AD, 0xA9ADA2AB, 0xA2A7ADA2,
+ 0xAA9EA9AD, 0xA8AA9EA6, 0xA1A8ACA1, 0xA99CA8AC,
+ 0xA3AA9DA2, 0x98A5A99D, 0xA498A0A4, 0xA7A99DA2,
+ 0x99A4A89D, 0xA49AA0A4, 0xA6A79DA3, 0x96A1A599,
+ 0xA1989EA2, 0xA2A59C9E, 0x9EA3A99E, 0xA59AA3A9,
+ 0xA1A599A1, 0x93A1A599, 0x9F939B9F, 0x9B9F939B,
+ 0x939B9F93, 0xA1969B9F, 0x9BA1969D, 0x949AA095,
+ 0xA094999F, 0x989C909C, 0x90989C90, 0x9D90969D,
+ 0x969D9096, 0x9BA0A79A, 0x706AA2A6, 0x0806056E,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x06080606, 0x2E2A0806, 0x80807A2F, 0x75828076,
+ 0x82778280, 0x80807484, 0x75808177, 0x7E767E7F,
+ 0x80817880, 0x78808178, 0x80768182, 0x81807681,
+ 0x79828177, 0x84798585, 0x86847986, 0x7786847A,
+ 0x80778580, 0x85807785, 0x7A838176, 0x857D8584,
+ 0x827F7A87, 0x7783847B, 0x81787F80, 0x82807880,
+ 0x7686847A, 0x81768581, 0x85817685, 0x76868577,
+ 0x85778484, 0x87877985, 0x76868479, 0x82748381,
+ 0x85857983, 0x74807F75, 0x81757F7E, 0x80807481,
+ 0x767F7F73, 0x82788381, 0x7C7B7184, 0x76787970,
+ 0x81787C7F, 0x7B7C7380, 0x6A7D7C72, 0x786D7574,
+ 0x7674697A, 0x65727065, 0x746A7171, 0x72726675,
+ 0x6E7A796F, 0x786E7978, 0x72716779, 0x7577756D,
+ 0x7B737D7A, 0x817F777D, 0x717B7C73, 0x7B72797A,
+ 0x7E7F767A, 0x70787970, 0x78707879, 0x73746B7A,
+ 0x7076776E, 0x746C7879, 0x76756B76, 0x6E7C7B71,
+ 0x78737677, 0x7777717B, 0x7D747571, 0x817D8081,
+ 0x60605A82, 0x3B5F6057, 0x00004141, 0x00010002,
+ 0x36020000, 0x5753393A, 0x56585258, 0x87686960,
+ 0x766D8D90, 0x75766D75, 0x747B7C73, 0x7C737C7D,
+ 0x7B7C737B, 0x737B7C73, 0x7C737B7C, 0x75766D7B,
+ 0x707D7B73, 0x7E757A78, 0x8081787D, 0x757D7E75,
+ 0x7D757D7E, 0x7B7C737F, 0x737F7D75, 0x79707B7C,
+ 0x7B7C7378, 0x73787970, 0x81787B7C, 0x80817880,
+ 0x79828379, 0x80768283, 0x8283797F, 0x7B83847B,
+ 0x7F7A8384, 0x827F7A82, 0x78818279, 0x807B8081,
+ 0x7F7C7783, 0x76808178, 0x80767D81, 0x7F80777F,
+ 0x747E7C74, 0x7B767E7C, 0x77746F7E, 0x7177786F,
+ 0x7772797A, 0x7D7A757A, 0x757D7E75, 0x7D777D7E,
+ 0x7D7E757D, 0x77828078, 0x81788281, 0x82807880,
+ 0x727E7C72, 0x7D767E7C, 0x86837B83, 0x77828078,
+ 0x81788081, 0x83847B80, 0x71818279, 0x7F767A7B,
+ 0x7D7E757E, 0x757D7E75, 0x7B757D7E, 0x7B7E757B,
+ 0x737E7F76, 0x7D747B7C, 0x7A7B727C, 0x75787872,
+ 0x7D797D7A, 0x7E797680, 0x757D7875, 0x76727C79,
+ 0x7D7C7879, 0x05545553, 0x05060305, 0x01050601,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x5F635E00, 0xA1A0A7A2, 0xA8A1A0A8,
+ 0xA1A99FA0, 0x9DA1A69D, 0xA99FA1A6, 0xA1A99FA1,
+ 0xA0A1A99F, 0xA59CA2AA, 0x9EA499A2, 0x9D9FA59A,
+ 0xABA2A0A8, 0xA6ABA2A6, 0xA2A7ACA3, 0xACA3A8AB,
+ 0xA9ADA2A9, 0xA8B0B4A8, 0xB4A9B0B4, 0xB0B3AAB0,
+ 0x00343531, 0x00000001, 0x00010002, 0xA9787B72,
+ 0xA196B0B4, 0x9DA1959D, 0x97A0A498, 0xA4989FA3,
+ 0xA0A498A0, 0x959DA196, 0x9F939DA1, 0x9BA2959B,
+ 0x9B9FA59A, 0x9F94A0A6, 0x9AA09599, 0x99A0A499,
+ 0xA498A0A4, 0xA0A498A0, 0x98A0A498, 0xA195A0A4,
+ 0xA0A4989D, 0x9C9FA59A, 0xA79EA1A7, 0x9EA39AA2,
+ 0xA0A1A69D, 0xA69DA4A9, 0xA1A79CA3, 0x999EA598,
+ 0xA59A9DA6, 0x9CA4999F, 0x9FA1A99F, 0xA9A2A0A9,
+ 0xA0A8A1A1, 0x9A9FA79D, 0xA99E9DA5, 0xA3A99EA3,
+ 0x9FA4AA9F, 0xA9A0A3A8, 0xA3A89FA4, 0xA0A4A9A0,
+ 0xAEA1A5AB, 0xA6ADA0A7, 0x9EA6AD9E, 0xAC9FA4AE,
+ 0xA3ABA0A5, 0xA9A8B0A6, 0x3C3AA9B0, 0x0000003B,
+ 0x00000100, 0x00000001, 0x00000100, 0x00000001,
+ 0x00000000, 0x00010002, 0xAA40423C, 0xB4A9AEB3,
+ 0xAEB4A9AE, 0xAAACB4AA, 0xB4A9ACB4, 0xAEB4A9AE,
+ 0xA8AEB4A9, 0xB4A9ADB3, 0xADB3A8B0, 0xA9AEB4A9,
+ 0xB4A9AEB4, 0xAFB3ADAE, 0x00232422, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF595C5A, 0xC0C0BEC1,
+ 0xC0C1BFC0, 0xBABBBEBC, 0xBFB9B9BF, 0xBABEB9BB,
+ 0xBDBBBFBA, 0xBFBABCBF, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB9BBBFBA, 0xC0BBBABE, 0xBBBFBABC,
+ 0xBABBBFBA, 0xC0BBBBBF, 0xBBBFBABC, 0xBDBCBFBD,
+ 0xBCB7BCBF, 0xB8BCB7B8, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB7B9BDB7, 0xC0BBB9BD, 0xBBBFBABC,
+ 0xB9BABEB9, 0xBEB8BABE, 0xBCBEB8BC, 0xB8BABEB8,
+ 0xBEB8BABE, 0xBABEB8BA, 0xBCBCC0BB, 0xC4BFBDC1,
+ 0xB7BBB5BE, 0xA39EA198, 0xB3A7AAAE, 0xB1B5A9AF,
+ 0xA8ADB3A8, 0xB3A8ADB3, 0xADB3A8AD, 0xA7ACB2A7,
+ 0xB1A8ACB2, 0xADB3A8AC, 0xA4ADB1A6, 0xB1A5ACB0,
+ 0xAEB2A6AD, 0xA1AEB2A6, 0xB3A4ABB0, 0xA8ACA0B0,
+ 0xA3A6ACA1, 0xB0A5A6AE, 0xA8ACA0AA, 0xA1A9ADA2,
+ 0xA79BA9AD, 0xA8AA9EA3, 0x9CA8ACA1, 0xA89BA4A8,
+ 0xA6ADA0A1, 0x9DA5A99D, 0xA99DA5A9, 0xA2A498A7,
+ 0x9CA1A59A, 0xA69CA2A5, 0xA4A59BA5, 0x9A9FA397,
+ 0xA9A0A1A5, 0xA5A89FA6, 0x9B9FA49B, 0xA499A0A6,
+ 0x9EA296A0, 0x959B9F93, 0xA1969DA1, 0xA0A4999D,
+ 0x959DA195, 0x9F939DA1, 0x9BA1969B, 0x959AA095,
+ 0x9F939AA0, 0x989C909B, 0x90989C90, 0x9C90989C,
+ 0x999D9198, 0x6AA3A79C, 0x05046E70, 0x09070707,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x2C070504, 0x807A2F2D, 0x80817880, 0x747E7C72,
+ 0x7E73817F, 0x81817580, 0x75808177, 0x7E767E7F,
+ 0x82807880, 0x767F8077, 0x81797E7F, 0x84837983,
+ 0x76828177, 0x84798282, 0x87837888, 0x79858077,
+ 0x84798884, 0x837F748A, 0x7A878378, 0x837B8684,
+ 0x86837E85, 0x8085867D, 0x817B8889, 0x85837B81,
+ 0x7A86847A, 0x83788985, 0x83817687, 0x78848478,
+ 0x87798686, 0x88877987, 0x79868479, 0x82748684,
+ 0x81817383, 0x727E7E72, 0x81757D7C, 0x81817581,
+ 0x79838176, 0x81768684, 0x7C7B7183, 0x7577786F,
+ 0x82797B7E, 0x77786F81, 0x6E828177, 0x7C717978,
+ 0x7A786D7E, 0x656D6B60, 0x6E627270, 0x7171656E,
+ 0x6B757569, 0x786E7675, 0x75746A79, 0x7578756D,
+ 0x7B737E7A, 0x7D7B737E, 0x6F7C7D74, 0x79707778,
+ 0x78797078, 0x70787970, 0x736D7879, 0x70716873,
+ 0x7076776E, 0x776D7879, 0x76756B78, 0x717A796F,
+ 0x7671797A, 0x77777179, 0x80747573, 0x807C8182,
+ 0x60605A81, 0x3B60605A, 0x00004141, 0x02000002,
+ 0x36020000, 0x58523B3A, 0x58585258, 0x87686960,
+ 0x857C8F90, 0x74756C84, 0x73787970, 0x79707B7C,
+ 0x77786F78, 0x7375766D, 0x7C737B7C, 0x7A7B727B,
+ 0x707D7B73, 0x7E757A78, 0x7D7E757D, 0x7377786F,
+ 0x7C737B7C, 0x7B7C737B, 0x757D7E75, 0x7E757D7E,
+ 0x7B7C737D, 0x73787970, 0x7F767B7C, 0x8081787E,
+ 0x78828379, 0x82788182, 0x81827881, 0x79808178,
+ 0x80788182, 0x82807882, 0x82818279, 0x85808A8B,
+ 0x7F7C7788, 0x797F8077, 0x847A8084, 0x80817783,
+ 0x747E7C74, 0x7C777E7C, 0x7B78737F, 0x71787970,
+ 0x7A757B79, 0x7B78737D, 0x757D7E75, 0x7B757D7E,
+ 0x8081787B, 0x77838179, 0x887F8281, 0x93918987,
+ 0x7185827A, 0x7D767F7A, 0x837D7685, 0x7785837B,
+ 0x847B8081, 0x7F807783, 0x757C8075, 0x82797C80,
+ 0x7E7F7681, 0x747B7C73, 0x7B727C7D, 0x797C737A,
+ 0x76808178, 0x7D747E7F, 0x7D7E757C, 0x72787970,
+ 0x827D7A7B, 0x7E797685, 0x777D7877, 0x79757D78,
+ 0x7B78747C, 0x537A7B79, 0x05065255, 0x03050603,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x01000001,
+ 0x01010000, 0x00010001, 0xA2717674, 0xA7A0A0A7,
+ 0xA0A8A19F, 0x9D9FA79D, 0xA79D9FA7, 0xA0A99F9F,
+ 0xA1A1A9A2, 0xA39AA1A8, 0x9EA39A9E, 0x9A9FA59A,
+ 0xA49B9DA5, 0xA2A79E9F, 0xA3A9ACA3, 0xADA4A9AC,
+ 0xA9ACA3AA, 0xA9B1B5AA, 0xB2A9B0B4, 0x40423CAF,
+ 0x00000100, 0x02000000, 0x6A6B6701, 0x94B0B4A9,
+ 0xA0959CA0, 0x9EA2969C, 0x95A0A498, 0xA1959DA1,
+ 0xA1A5999D, 0x9AA0A499, 0x9F93A1A5, 0x9B9F939B,
+ 0x9C9FA59A, 0xA095A0A5, 0xA0A69B9A, 0x989FA398,
+ 0xA498A0A4, 0xA0A596A0, 0x97A2A498, 0xA0949FA3,
+ 0xA1A5999C, 0x9A9FA59A, 0xA69D9FA5, 0xA2A79EA1,
+ 0x9AA0A89E, 0xA49B9CA4, 0xA1A79C9F, 0x989BA497,
+ 0xA1969CA5, 0x9CA49999, 0x9E9FA79D, 0xA8A19FA8,
+ 0xA0A8A1A0, 0x9B9FA79D, 0xA49B9DA5, 0xA3A89F9F,
+ 0x9FA1A99F, 0xA8A2A1A9, 0xA4A9A0A4, 0xA1A4A9A0,
+ 0xACA1A6AC, 0xA6ADA0A6, 0x9EA5AF9F, 0xAC9FA4AE,
+ 0xA0A89EA3, 0xAAA8B0A9, 0x3939A9AF, 0x01010137,
+ 0x00000100, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x02000002, 0xAA080A04, 0xB4A9B0B3,
+ 0xAEB5A8B0, 0xAAACB4AA, 0xB4A9ACB4, 0xADB3A8AE,
+ 0xA8ACB2A7, 0xB3A7ADB3, 0xB0B4A8AF, 0xA7AEB5A8,
+ 0xB4A9ADB4, 0x7B8077AE, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF575A58, 0xC0C0BEC1,
+ 0xC1C2C0C0, 0xBABBBEBC, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBABBBFBA, 0xBEB9BBBF, 0xBBBFBABA, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBDBDC0BE,
+ 0xBCB7BCBF, 0xB8BCB7B8, 0xBABBBFBA, 0xBEBABBBF,
+ 0xBDBEBABD, 0xB9BBBFB9, 0xBFBABBBF, 0xB9BDB8BB,
+ 0xB8BCBEB8, 0xBEB8BCBE, 0xBCBEB8BC, 0xB8BABEB8,
+ 0xBEB8BABE, 0xBABEB8BA, 0xBBB7BBB6, 0xC4BFBAC0,
+ 0xB3B7B1C0, 0xA2A9AFA4, 0xADA1AAAE, 0xB1B3A7AB,
+ 0xA8B0B4A9, 0xB4A9ADB3, 0xADB3A8AE, 0xA8ACB2A7,
+ 0xB3A8ADB3, 0xAEB2A7AF, 0xA8ADB1A6, 0xB1A6AFB3,
+ 0xAAAEA2AD, 0xA2ABAFA3, 0xAFA3AAAE, 0xA8ACA0AB,
+ 0xA5A9AFA4, 0xADA0A8B0, 0xA8AD9EA6, 0x9EA5A99D,
+ 0xAA9EA6AA, 0xAAAEA3A6, 0x9CA5A99D, 0xADA0A4A8,
+ 0xA3AA9BA6, 0x9EA5AA9B, 0xA99DA8AD, 0xA0A498A5,
+ 0x9DA4A89D, 0xA49BA4A8, 0xA0A197A3, 0x99A0A498,
+ 0xA69B9FA6, 0xA1A599A2, 0x939EA296, 0xA3989B9F,
+ 0x9DA1969F, 0x98A0A498, 0xA3969EA5, 0x9DA1959C,
+ 0x949CA094, 0xA0949CA0, 0x99A0939C, 0x93999F94,
+ 0x9C90989E, 0x989C9098, 0x90969C91, 0x9D92959B,
+ 0x979A9197, 0x063A3B39, 0x05070806, 0x08050708,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x00010000,
+ 0x7A2F2E2A, 0x807A8080, 0x7F807780, 0x78818076,
+ 0x80768484, 0x807F7582, 0x777E7F76, 0x7B767F80,
+ 0x8280787E, 0x777F8077, 0x80788081, 0x81807682,
+ 0x737E7D73, 0x82747F7F, 0x86837585, 0x78838176,
+ 0x84798583, 0x86837588, 0x7A868277, 0x827A8684,
+ 0x82807884, 0x8083847B, 0x867D8889, 0x87857D85,
+ 0x7986847A, 0x81778884, 0x817F7483, 0x79848478,
+ 0x84768585, 0x85847685, 0x76858378, 0x82748381,
+ 0x86857783, 0x74817F74, 0x8177817F, 0x84837982,
+ 0x767F7F73, 0x81778282, 0x7A7B7182, 0x72787970,
+ 0x7B727A7B, 0x7B7C7378, 0x727D7C72, 0x7B707D7C,
+ 0x7B796E7D, 0x6E6D6D61, 0x7A707A7A, 0x7270667C,
+ 0x67727167, 0x7D737271, 0x76756B7E, 0x72737068,
+ 0x7B737D7A, 0x7D7B737E, 0x707C7D74, 0x7C737879,
+ 0x7B7C737B, 0x70787970, 0x746B7879, 0x73746B73,
+ 0x6D787970, 0x756B7677, 0x76776D74, 0x6B77786F,
+ 0x77717174, 0x75777177, 0x7F737472, 0x827E8081,
+ 0x5F5F5983, 0x3B60605A, 0x01004141, 0x00000000,
+ 0x36000100, 0x5852393A, 0x58595058, 0x89686960,
+ 0x837A9192, 0x75766D82, 0x737D7E75, 0x79707B7C,
+ 0x76797076, 0x7375766D, 0x7B737B7C, 0x8381797D,
+ 0x74797A71, 0x81787C7D, 0x7D7E7580, 0x727C7D74,
+ 0x7E757A7B, 0x7D7E757D, 0x767B7C73, 0x7E757E7F,
+ 0x7879707D, 0x6F787970, 0x7B727778, 0x7B7C737A,
+ 0x7B817F77, 0x80788583, 0x80817882, 0x78808178,
+ 0x80788081, 0x87857D82, 0x8286877E, 0x85808A8B,
+ 0x7F7C7788, 0x787F8077, 0x81798081, 0x82807883,
+ 0x74828078, 0x7A757E7C, 0x7B78737D, 0x777B7873,
+ 0x7A757F7C, 0x7D7A757D, 0x757D7E75, 0x7D777D7E,
+ 0x8081787D, 0x76828078, 0x89808180, 0x8A888088,
+ 0x7688857D, 0x7D78817E, 0x85827A83, 0x7A85837B,
+ 0x857C8283, 0x83847B84, 0x797E7F75, 0x81798283,
+ 0x807D7883, 0x72807E76, 0x7C737A7B, 0x7D7E757B,
+ 0x747B7C73, 0x7D747C7D, 0x7B7C737C, 0x73797C73,
+ 0x7B757B7C, 0x7D7A757B, 0x797F7C78, 0x7673807D,
+ 0x7A77737B, 0x7A7F7C78, 0x53537D7B, 0x07050555,
+ 0x00020000, 0x00000200, 0x00000000, 0x01010002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x02000001, 0x00010001, 0x01000001,
+ 0x00010000, 0x00000002, 0xA2424543, 0xA8A1A1A7,
+ 0xA1A9A2A0, 0x9C9DA59B, 0xA79D9FA7, 0x9DA69C9F,
+ 0xA1A0A8A1, 0xA49BA0A8, 0x9EA39A9F, 0x9B9FA49B,
+ 0xA49B9DA5, 0x9FA49B9F, 0xA2A0A499, 0xA39AA9AD,
+ 0xA9ACA3A0, 0xAAB0B3AA, 0x423DB0B3, 0x0609073E,
+ 0x00000100, 0x35330001, 0x9B9F9A32, 0x959EA297,
+ 0xA3969DA1, 0x9BA2959C, 0x93A1A599, 0xA1959DA2,
+ 0xA0A4989D, 0x969CA095, 0x9C909DA1, 0x9B9F9398,
+ 0x95999F94, 0x9F949AA0, 0x999F9499, 0x97A0A499,
+ 0xA4979FA3, 0x9EA5969D, 0x98A0A498, 0x9F93A0A4,
+ 0x9EA5989B, 0x9AA0A499, 0xA59AA1A5, 0x9FA59AA1,
+ 0x999DA59A, 0xA59A9CA4, 0x9FA59A9F, 0x989EA79A,
+ 0xA2979CA5, 0x9CA4999C, 0x9D9EA69C, 0xA69F9FA7,
+ 0x9FA69F9F, 0x9B9DA59B, 0xA69B9EA6, 0xA1A79CA0,
+ 0xA1A4A9A0, 0xA9A0A5AA, 0xA7AAA1A6, 0xA1A4A9A0,
+ 0xACA1A6AC, 0xA6ADA0A8, 0x9EA4AE9E, 0xADA0A3AE,
+ 0xA2ACA0A3, 0x70A8B0A9, 0x00006F75, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x3C0A0905, 0xB5AA4242,
+ 0xADB4A7B1, 0xAAADB5AB, 0xB3A9ABB4, 0xADB5AAAB,
+ 0xA7ADB3A8, 0xB4A7ADB4, 0xADB4A7AD, 0xA8B0B4A8,
+ 0xB5AAB0B4, 0x4A4E48AF, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF585B59, 0xC0C0BEC1,
+ 0xC1C2C0C0, 0xBABBBEBC, 0xC0BBBBBF, 0xBABEB9BC,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBABEB9BB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xB9BABEB9, 0xBFBABABE,
+ 0xBCC0BBBB, 0xBBBBBFBA, 0xBFBABCC0, 0xBBBFBABB,
+ 0xBABBBFBA, 0xC0BBBBBF, 0xBBBFBABC, 0xBEBCBFBD,
+ 0xC1BCBDC0, 0xB8BCB7BD, 0xBABBBFBA, 0xBEBABBBF,
+ 0xBDBEBABD, 0xB9BBBFB9, 0xBFBABBBF, 0xBBBFBABB,
+ 0xB8BEBEB8, 0xBEB8BEBE, 0xB9BDB7BC, 0xB6BCBEB8,
+ 0xBEB8BABF, 0xBABEB8BA, 0xBABAC1BA, 0xC1BBBAC1,
+ 0xB3B7B1BD, 0xA8ADB3A8, 0xAEA2B0B4, 0xACAEA2AC,
+ 0xA8AEB2A6, 0xB3A8ADB3, 0xADB3A8AD, 0xA8ACB2A7,
+ 0xB3A8ADB3, 0xAEB2A7AF, 0xA5ADB1A6, 0xB1A6ACB0,
+ 0xADB1A6AD, 0xA4ABAFA3, 0xACA0ACB0, 0xA6ADA0A8,
+ 0xA1A9AFA4, 0xADA0A5AE, 0xA8AD9EA6, 0x9EA9ADA1,
+ 0xAEA2A8AA, 0xA9ADA1AA, 0x9DA6AA9E, 0xA99DA5A9,
+ 0xA6AB9CA5, 0x98A8AD9E, 0xA498A2A7, 0xA5A99DA0,
+ 0x9AA4A89D, 0xA59CA1A5, 0xA0A499A4, 0x99A2A69B,
+ 0xA2969FA6, 0x9EA2969E, 0x999DA293, 0xA59AA1A5,
+ 0xA1A59AA1, 0x99A0A498, 0xA2959FA6, 0x9BA2959B,
+ 0x939B9F94, 0xA0939B9F, 0x969D9099, 0x91969C91,
+ 0x9C91969C, 0x959B9096, 0x91969C91, 0x9B92959A,
+ 0x3F433E96, 0x07060606, 0x05070805, 0x08050708,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00010001, 0x00000100, 0x01000001, 0x3D3E3A00,
+ 0x7880807A, 0x81788081, 0x81827880, 0x767F8076,
+ 0x80767F80, 0x82807681, 0x757F7E74, 0x8078807F,
+ 0x807E7682, 0x777F8076, 0x81778081, 0x81807682,
+ 0x79828276, 0x85778585, 0x86857786, 0x7A868479,
+ 0x857A8785, 0x83817687, 0x77848075, 0x847A8381,
+ 0x85837B85, 0x7A85867D, 0x847A8384, 0x85847A83,
+ 0x7586847A, 0x81778480, 0x82807683, 0x78828276,
+ 0x84768484, 0x85847685, 0x7687857A, 0x7D728381,
+ 0x807F717F, 0x74828075, 0x7E748080, 0x8483797F,
+ 0x767C7B71, 0x7E748180, 0x7A7B717D, 0x70787970,
+ 0x7D747879, 0x7D7E757A, 0x6E7D7C72, 0x796D7978,
+ 0x78786C79, 0x6A757569, 0x796F7574, 0x7170667A,
+ 0x69727068, 0x73697371, 0x79786E74, 0x6D78756D,
+ 0x7B737875, 0x7D7B737E, 0x6F7C7D74, 0x79707879,
+ 0x7D7E7578, 0x70787970, 0x79707879, 0x75766D78,
+ 0x6E78796F, 0x796F7778, 0x76776D78, 0x6C76776E,
+ 0x77717275, 0x77797375, 0x7D727671, 0x817D7E82,
+ 0x60605A80, 0x3B616259, 0x01004141, 0x00010000,
+ 0x35000100, 0x5A51393B, 0x58595059, 0x88686960,
+ 0x847B9091, 0x75766D83, 0x757D7E75, 0x79707D7E,
+ 0x76797076, 0x6C7B7C73, 0x70687475, 0x77756D72,
+ 0x70787970, 0x79707879, 0x78797078, 0x757A7B72,
+ 0x7F767D7E, 0x8182797E, 0x6F7D7E75, 0x7E757778,
+ 0x7879707D, 0x7377786F, 0x81787B7C, 0x7A7B7280,
+ 0x777E7C74, 0x7F77817F, 0x82807881, 0x7B808178,
+ 0x81778384, 0x87867C82, 0x757D7E75, 0x807B7D7E,
+ 0x7F7C7783, 0x77808178, 0x7F777F80, 0x82807881,
+ 0x747E7C74, 0x7B767E7C, 0x7B78737E, 0x727B7873,
+ 0x7A757A77, 0x7F7C777D, 0x757D7D77, 0x7D777B7B,
+ 0x8081787D, 0x7077786F, 0x81787879, 0x80807A80,
+ 0x7685827A, 0x817A817E, 0x817E7687, 0x79828078,
+ 0x81788182, 0x80817880, 0x75818278, 0x807B7E7F,
+ 0x807D7883, 0x737D7B73, 0x7E757D7B, 0x7A7B727D,
+ 0x75787970, 0x7E757D7E, 0x7879707D, 0x767B7C73,
+ 0x7B757C7F, 0x7B7B757B, 0x787C7974, 0x7B787F7C,
+ 0x7B767380, 0x787F7C78, 0x7C7B7F7C, 0x58535480,
+ 0x000A0808, 0x00000200, 0x00000002, 0x02000001,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000002, 0x72161715, 0xA8A17377,
+ 0xA0A89EA1, 0x9A9EA69B, 0xA79D9DA5, 0x9FA79D9F,
+ 0xA1A0A8A1, 0xA59CA1A8, 0x9FA49BA0, 0x9C9CA49A,
+ 0xA79E9EA6, 0xA2A79EA2, 0x9AA0A499, 0xA39AA1A5,
+ 0xBABDB4A0, 0x04797B75, 0x09070708, 0x06080806,
+ 0x00010200, 0xA09B0001, 0x9B9F999C, 0x959AA095,
+ 0xA1969BA2, 0x9BA1969B, 0x999BA295, 0x9F93A1A5,
+ 0x9DA1969B, 0x969EA297, 0x9F949DA1, 0x9BA2959B,
+ 0x91A0A69B, 0x9C91969C, 0x9BA19696, 0x989FA398,
+ 0xA3969FA3, 0x9EA5989C, 0x98A0A498, 0x9F94A0A4,
+ 0x9EA4999B, 0x9A9FA59A, 0xA59A9FA5, 0xA0A69BA1,
+ 0x999FA59A, 0xA59A9EA4, 0xA0A69B9F, 0x999EA598,
+ 0xA4979FA6, 0x9BA1969D, 0x9D9FA49B, 0xA79D9FA7,
+ 0x9FA79D9F, 0x9A9CA49A, 0xA59A9DA5, 0xA1A79C9F,
+ 0x9FA3A99E, 0xA99EA4AA, 0xA5A99EA5, 0xA0A3A89F,
+ 0xABA0A4A9, 0xA5ABA0A7, 0x9FA4ADA0, 0xADA0A2AC,
+ 0xA2ACA0A3, 0x72A7AFA8, 0x00006F74, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x3D0A0807, 0xB2A94041,
+ 0xAFB5AAAF, 0xAAABB3A9, 0xB4AAABB4, 0xACB4AAAC,
+ 0xA7AEB4A9, 0xB3A6ADB4, 0xADB4A7AC, 0xAAB0B4A8,
+ 0xB2A9B1B5, 0x181C16AF, 0x00000100, 0x01010000,
+ 0x00000001, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF575A58, 0xC0C0BEC1,
+ 0xC0C1BFC0, 0xB6B7BAB8, 0xBBB6B5BB, 0xB7BBB6B7,
+ 0xB9B4B9B7, 0xBDB8B6BB, 0xB6BCB7B7, 0xB6B7BBB6,
+ 0xBDB8B7BB, 0xBABEB9B9, 0xB9BABEB9, 0xBEB9BABE,
+ 0xBBBFBABA, 0xBBBCBFBD, 0xBFBDBABD, 0xBCBFBDBC,
+ 0xBDBCBFBD, 0xBEBCBCBF, 0xBABDBBBB, 0xB9BCC0BB,
+ 0xBFBABABE, 0xB9BDB8BB, 0xB8BBBCB8, 0xBDB9BBBC,
+ 0xBDBEBABC, 0xB9BABEB9, 0xBFB9BABE, 0xBABEB8BB,
+ 0xB9BEBDB9, 0xBEB8BCBD, 0xB9BDB7BA, 0xB5BCBFB6,
+ 0xBFB6BCC0, 0xB9BEB5BC, 0xB7BAC2B8, 0xBBB2B9C1,
+ 0xB0B3AAB6, 0xA9AFB4AB, 0xB4AAB0B4, 0xB2B4A8B3,
+ 0xA3ABAFA3, 0xB1A5ABAF, 0xB0B4A8AD, 0xA5ACB0A4,
+ 0xB1A5ADB1, 0xADB1A5AD, 0xA3AEB2A6, 0xAFA3ABAF,
+ 0xADB1A5AB, 0xA3ADB1A5, 0xADA0ABAF, 0xA9B0A3A6,
+ 0xA2A7AEA1, 0xA99DA8AF, 0xA9ADA1A5, 0xA0A8ACA1,
+ 0xACA0A8AC, 0xA5A99DA8, 0x9DA6ADA0, 0xA79BA5A9,
+ 0xA7AB9FA3, 0x98A4A89C, 0xA498A0A4, 0xA3A79BA0,
+ 0x9BA2A498, 0xA99EA5A7, 0xA0A499A5, 0x989EA297,
+ 0xA3989FA3, 0xA2A69A9F, 0x989FA697, 0xA4999EA5,
+ 0x9DA3989E, 0x919CA094, 0x9F939BA0, 0x969C919B,
+ 0x9799A197, 0x9F9599A1, 0x979F9597, 0x9799A197,
+ 0xA19799A1, 0x99A19799, 0x999EA198, 0x38329FA2,
+ 0x00040034, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x060C0D09, 0x5C530A0C, 0x80837A59,
+ 0x767F8076, 0x80767F80, 0x7F80767F, 0x787E8277,
+ 0x81798081, 0x83817783, 0x7687857A, 0x7D738282,
+ 0x7C7D737E, 0x767F8076, 0x7E747F80, 0x8280757F,
+ 0x7786867A, 0x85778585, 0x88887A85, 0x78848478,
+ 0x84788484, 0x84837984, 0x7B87857B, 0x82788785,
+ 0x87867C83, 0x7A86857B, 0x877B8686, 0x83837787,
+ 0x7D86847A, 0x897F8987, 0x86847A8B, 0x77848478,
+ 0x83788585, 0x86847985, 0x75848379, 0x7C718280,
+ 0x7E7C717E, 0x73868479, 0x7C707F7F, 0x7C7D737C,
+ 0x70808177, 0x7C747879, 0x7D7B737E, 0x70787970,
+ 0x7E757879, 0x7B7C737D, 0x727B7A70, 0x796F7D7C,
+ 0x77786E7A, 0x687A7B71, 0x71687071, 0x76776E70,
+ 0x70797A71, 0x79707879, 0x79776F78, 0x70807E76,
+ 0x766E7A78, 0x797A7178, 0x6D7A7B71, 0x766B7579,
+ 0x74786D72, 0x71787970, 0x766D797A, 0x75766D75,
+ 0x70787970, 0x78707879, 0x7879707A, 0x6D787970,
+ 0x79707576, 0x76787278, 0x786F736E, 0x7A76797D,
+ 0x5E605A79, 0x39606158, 0x00004142, 0x00010002,
+ 0x35010200, 0x584F393B, 0x5B5A5057, 0x8867685F,
+ 0x847B9091, 0x75766D83, 0x70787970, 0x756F7879,
+ 0x72746E73, 0x747B7C73, 0x71687C7D, 0x70716870,
+ 0x64737268, 0x776D6F6E, 0x7A7B7176, 0x757B7E75,
+ 0x81787B7E, 0x7E81787E, 0x737B7C73, 0x7F767B7C,
+ 0x7879707E, 0x74787970, 0x81787C7D, 0x80817880,
+ 0x78808178, 0x81778081, 0x81827880, 0x787D7E75,
+ 0x81788081, 0x7F807780, 0x787D7E75, 0x7B758081,
+ 0x80807A7B, 0x757F8077, 0x827A7D7E, 0x82807884,
+ 0x747D7E75, 0x7D777C7D, 0x7B7B757D, 0x72787872,
+ 0x7B737878, 0x7B7B757D, 0x797A7C76, 0x817B7D7F,
+ 0x81827981, 0x77808178, 0x7D747F80, 0x8081787C,
+ 0x77827F77, 0x817A827F, 0x82807687, 0x75807F75,
+ 0x7F757E7F, 0x7E7F757E, 0x77808479, 0x7E798081,
+ 0x817D7881, 0x747D7B73, 0x7E757F7E, 0x7C7D747D,
+ 0x737D7A75, 0x7A757B78, 0x7D7D777D, 0x717B7B75,
+ 0x7B757777, 0x80807A7B, 0x737D7A75, 0x7A757B78,
+ 0x7C78737E, 0x767C7975, 0x736F7D7A, 0x7F7B7A76,
+ 0x06575253, 0x06060806, 0x08060608, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x35000100, 0xABA23839,
+ 0xA6ACA1A6, 0x9C9CA499, 0xA59C9FA7, 0x9FA49BA0,
+ 0xA2A4A8A2, 0xAAA1A4A8, 0xA4A9A0A7, 0xA0A2A9A2,
+ 0xA8A19FA7, 0xA1A99FA1, 0xAFB6BDB0, 0xBCB1B5BC,
+ 0x7D7F79B8, 0x00000100, 0x00000001, 0x01010100,
+ 0x6B070A08, 0xA29C6C70, 0x9EA39AA0, 0x91999F94,
+ 0x9F95949C, 0x99A19797, 0x9799A099, 0x9D949BA0,
+ 0x989D9498, 0x92999E95, 0x9C91979D, 0x999F9496,
+ 0x9298A095, 0xA298959D, 0x9BA0979A, 0x97A1A59A,
+ 0xA3989EA2, 0x9EA2979F, 0x99A3A599, 0x9F96A0A4,
+ 0x9CA1989C, 0x989DA398, 0xA3989BA3, 0x9EA39A9D,
+ 0x9AA0A39A, 0xA398A1A5, 0xA1A59A9F, 0x98A0A499,
+ 0xA599A0A4, 0x9DA195A1, 0x9A9EA297, 0xA59C9EA3,
+ 0x9FA49BA0, 0x9E9EA39A, 0xA49BA2A7, 0x9FA59A9F,
+ 0x9CA4A89D, 0xA99DA4A8, 0xA4A89CA5, 0x9EA3A99E,
+ 0xABA0A2A7, 0xA5ABA0A7, 0xA2A5ADA2, 0xADA2A5AD,
+ 0xA8B0A6A5, 0x39A9AFAA, 0x0000363B, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x7F7B0001,
+ 0xBBBFB97E, 0xA9ACB4AA, 0xB1A7ACB4, 0xACB4AAA8,
+ 0xA8ACB2A7, 0xB3A8ADB3, 0xADB3A8AD, 0xA8AEB2A7,
+ 0x7872AEB1, 0x02030076, 0x00020000, 0x00000200,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF585B59, 0xC0C0BEC1,
+ 0xBEC0C0C0, 0xB9BABDBB, 0xBEB9B8BE, 0xBABEB9BA,
+ 0xBBB8BDBB, 0xBCB7B8BD, 0xB6BCB7B6, 0xB7B7BBB6,
+ 0xBBB6B8BC, 0xB6BAB5B7, 0xB2B7BBB6, 0xBBB6B3B7,
+ 0xB6BAB5B7, 0xBAB8BBB9, 0xBAB8B9BC, 0xBABDBBB7,
+ 0xB9B8BBB9, 0xBDBBB8BB, 0xB7BAB8BA, 0xBAB9BDB8,
+ 0xC0BBBBBF, 0xB9BDB8BC, 0xB8BABBB7, 0xBFBBBBBC,
+ 0xBEBFBBBE, 0xB8BABEB9, 0xBEB8B9BD, 0xBABEB8BA,
+ 0xB8BCBEB8, 0xBEB8BCBE, 0xBABFB6BA, 0xB5BCC0B5,
+ 0xC0B5BEBF, 0xB9BFB4BC, 0xB6BBC0B7, 0xB4A9B9C1,
+ 0xB0B4A9AE, 0xACAFB4AB, 0xB5AAB2B5, 0xB2B4A8B1,
+ 0xA1B0B4A8, 0xAFA3ABB0, 0xADB1A5AB, 0xA5B0B4A8,
+ 0xB1A5ADB1, 0xAEB2A6AD, 0xA3ADB1A5, 0xB1A5ABAF,
+ 0xABAFA3AD, 0xA0ABAFA3, 0xB0A3A8AC, 0xA9B0A3A9,
+ 0x9EA6ADA0, 0xAEA3A6AA, 0xA9ADA2AA, 0xA0A8ACA1,
+ 0xA99DA8AC, 0xA8ACA0A5, 0x9DA6ADA0, 0xACA0A5A9,
+ 0xA7A99DA8, 0x9DA1A599, 0xA79BA5A9, 0xA0A498A3,
+ 0x9DA7A99D, 0xA79CA7A9, 0xA0A499A3, 0x9A9FA398,
+ 0xA79CA1A5, 0xA2A69BA3, 0x979EA598, 0xA1969BA4,
+ 0x99A19699, 0x939DA195, 0xA1959DA2, 0x9CA2979D,
+ 0x9899A197, 0xA096989F, 0x969E9498, 0x9998A099,
+ 0xA09698A0, 0x99A19797, 0x329EA09A, 0x04003638,
+ 0x00040000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x530B0D07, 0x8479595C, 0x80847880,
+ 0x787F8175, 0x82788284, 0x83847A81, 0x787F8279,
+ 0x81798081, 0x817F7583, 0x70828075, 0x7F737E7E,
+ 0x7D7F737F, 0x74808177, 0x7E727D7E, 0x7E7C717E,
+ 0x77858577, 0x85778585, 0x84847685, 0x76868678,
+ 0x85798282, 0x85857985, 0x76848478, 0x857B8282,
+ 0x82827686, 0x7B838377, 0x7F738787, 0x8383777F,
+ 0x7B868479, 0x877D8785, 0x87857B89, 0x76858579,
+ 0x84788484, 0x83837784, 0x73818076, 0x7F747E7D,
+ 0x817F7481, 0x73838377, 0x7E727F7F, 0x7D7F737E,
+ 0x747D7E75, 0x7C747C7D, 0x7F7D757E, 0x707D7E75,
+ 0x7C737879, 0x7B7C737B, 0x717B7A70, 0x7A707C7B,
+ 0x797A7079, 0x6E7A7B72, 0x71687677, 0x6D70676E,
+ 0x6F75786F, 0x776E7578, 0x74756C76, 0x71737169,
+ 0x7A717B79, 0x76776D79, 0x68787C70, 0x75697074,
+ 0x797D7171, 0x70787970, 0x79707879, 0x73746B78,
+ 0x6D75766D, 0x78707576, 0x7A78707A, 0x6D75766D,
+ 0x756C7576, 0x71746B74, 0x7671736D, 0x7D77777B,
+ 0x5E605A7B, 0x39606158, 0x00004142, 0x02000002,
+ 0x35000100, 0x5950393B, 0x5A594F58, 0x88686960,
+ 0x847B9091, 0x75766D83, 0x70797A71, 0x79737879,
+ 0x75777177, 0x737B7C73, 0x766D7B7C, 0x75766D75,
+ 0x6D737268, 0x7B717877, 0x7A7B717A, 0x707B7C73,
+ 0x7E757679, 0x7B7E757B, 0x787B7C73, 0x7C738081,
+ 0x7B7C737B, 0x767D7E75, 0x81787E7F, 0x7D7E7580,
+ 0x78808178, 0x81778081, 0x7D7E7480, 0x787C7D74,
+ 0x81788081, 0x7B7C7380, 0x78808178, 0x7C768081,
+ 0x7B7B757C, 0x777F8077, 0x81797F80, 0x807E7683,
+ 0x78808178, 0x7D778081, 0x7878727D, 0x727B7B75,
+ 0x7B737878, 0x7C7D747D, 0x777A7B77, 0x7F797A7B,
+ 0x83847B7F, 0x757D7D77, 0x7F76797B, 0x7C7D747E,
+ 0x77838179, 0x837A827F, 0x84827888, 0x77828177,
+ 0x82788081, 0x81827881, 0x7A808479, 0x7B768283,
+ 0x817D787F, 0x727F7D75, 0x7C737B7C, 0x7B7C737B,
+ 0x727B7873, 0x78737B77, 0x7B78737B, 0x757A7A74,
+ 0x7D777B7B, 0x7D7D777D, 0x737D7B73, 0x7B767D7B,
+ 0x7D7A757F, 0x757B7874, 0x79757C79, 0x7A77737C,
+ 0x54807C7B, 0x05065853, 0x0806060A, 0x00020000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000102, 0x00000000, 0x00000000, 0x746B0001,
+ 0xA5ABA071, 0x9B9BA196, 0xA59C9EA6, 0xA0A59CA0,
+ 0x9EA2A49E, 0xA49BA2A4, 0x9EA39AA1, 0xA2A1A8A1,
+ 0xA7A0A1A9, 0xA1A99FA0, 0xB1B6BCB1, 0x8077B8BC,
+ 0x0708047D, 0x01000100, 0x01010101, 0x00010001,
+ 0x9C3A3E39, 0xA4999EA2, 0x9EA499A0, 0x939BA196,
+ 0x9D93969E, 0x99A09995, 0x9999A099, 0x9E9799A0,
+ 0x949C9297, 0x91969E94, 0x9C91949C, 0x999F9496,
+ 0x9599A196, 0xA099969F, 0x99A09999, 0x989EA198,
+ 0xA1989EA1, 0x9EA1989E, 0x99A1A59A, 0x9E98A0A4,
+ 0x9A9E989C, 0x999BA398, 0xA49A9CA4, 0x9DA2999C,
+ 0x9AA2A59C, 0xA399A2A3, 0xA2A399A2, 0x98A1A59A,
+ 0xA195A0A4, 0x9FA1959F, 0x98A0A499, 0xA4999EA1,
+ 0xA1A79C9E, 0x9B9EA39A, 0xA39A9FA4, 0x9FA59A9E,
+ 0x9DA5A99D, 0xAA9BA5A9, 0xA3AA9DA5, 0xA0A2AA9F,
+ 0xABA0A2AA, 0xA6ACA1A5, 0xA3A5ADA3, 0xADA3A5AD,
+ 0xA4ACA2A5, 0x38AAB0AB, 0x0101353A, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x403E0000,
+ 0xBBBFBA3D, 0xA9ABB0A7, 0xB2A8ACB4, 0xABB4AAA9,
+ 0xA9ABB3A9, 0xB2A7AEB4, 0xACB2A7AC, 0xA7AFB2A9,
+ 0x3D37AFB0, 0x0203003B, 0x01020000, 0x00000301,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF575A58, 0xC0C0BEC1,
+ 0xBEC0C0C0, 0xBCBABDBB, 0xBDBBB9BE, 0xBABDBBBA,
+ 0xBBB8BEB9, 0xBFBAB9C0, 0xB9BFBAB9, 0xB8BBBFBA,
+ 0xBDBBB9BD, 0xBABDBBBA, 0xBBBABDBB, 0xBDBBBABD,
+ 0xBABDBBBA, 0xBBBBBEBC, 0xBBB9BABD, 0xB8BBB9B8,
+ 0xBBBABDBB, 0xBEBCBABD, 0xBABDBBBB, 0xB9BBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xB7BBBCB8, 0xBDB7BABB,
+ 0xBBBDB7BB, 0xB9BABEB9, 0xBEB8BABE, 0xBABEB8BA,
+ 0xB8BABEB8, 0xBEB8BABE, 0xBCBFB6BC, 0xB5BCC0B5,
+ 0xC0B5BCC0, 0xBBC0B7BC, 0xADBBC1B6, 0xB3A8B0B8,
+ 0xAEB4A9AD, 0xABB1B4AB, 0xB4A9B1B4, 0xB0B4A8B0,
+ 0xA8B2B4A8, 0xAFA3B2B4, 0xA7AB9FAB, 0xA6ADB1A6,
+ 0xB0A4ADB1, 0xADB1A5AC, 0xA5ABAFA3, 0xB0A4ADB1,
+ 0xA7AB9FAC, 0xA0A9ADA1, 0xAFA3A8AC, 0xAAAEA2AB,
+ 0x9EAAAEA2, 0xACA0A6AA, 0xA5AC9FA8, 0x9CA5A99D,
+ 0xA99DA4A8, 0xA5A99DA5, 0x9EA3A79B, 0xA89CA6AA,
+ 0xA0A498A4, 0x9AA5A99D, 0xA498A2A6, 0xA7A99DA2,
+ 0x9BA4A89C, 0xA498A3A7, 0x9FA397A0, 0x99A0A79A,
+ 0xA398A1A5, 0x9EA2979F, 0x989DA497, 0xA3989CA5,
+ 0x9CA4999B, 0x989FA397, 0xA195A0A4, 0x9DA1969D,
+ 0x93999E95, 0x9D93959D, 0x959D9395, 0x9999A19A,
+ 0xA29898A0, 0x99A09999, 0x00343833, 0x04000004,
+ 0x00030000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x14151100, 0x79585B52, 0x84788084, 0x82847880,
+ 0x75818175, 0x85798181, 0x80847883, 0x797E8277,
+ 0x81788084, 0x81807680, 0x7186867A, 0x84797F7F,
+ 0x86867A86, 0x77828478, 0x81758183, 0x82827681,
+ 0x79838176, 0x81758684, 0x84847681, 0x79888779,
+ 0x84768887, 0x84847685, 0x757F7F71, 0x867A8383,
+ 0x7F7F7186, 0x777F7F71, 0x867A8383, 0x8A8A7E86,
+ 0x7A88867B, 0x847A8883, 0x86847A86, 0x7887877B,
+ 0x81758484, 0x8082767F, 0x74818175, 0x83778080,
+ 0x80807483, 0x767C7C70, 0x82768282, 0x82827682,
+ 0x6F7D7E75, 0x82797778, 0x7D7E7581, 0x707F7D75,
+ 0x79707A78, 0x7C7D7478, 0x717A7B71, 0x7C727A7B,
+ 0x78796F7B, 0x6E73776C, 0x736A7579, 0x70716872,
+ 0x6F777B70, 0x786E767A, 0x79786E77, 0x70747369,
+ 0x766C7B7A, 0x76776D75, 0x6D707468, 0x74687579,
+ 0x74786C70, 0x70797A71, 0x7A717A78, 0x70716879,
+ 0x6A73746B, 0x736B7273, 0x75736B75, 0x6D74756C,
+ 0x71677376, 0x6E716870, 0x7671736D, 0x7C76787C,
+ 0x5E605A7A, 0x3B606158, 0x00004141, 0x00000000,
+ 0x36000100, 0x5A513A3C, 0x58594F59, 0x88686960,
+ 0x766D9091, 0x75766D75, 0x72787872, 0x76707878,
+ 0x73756F74, 0x7475766D, 0x756C7C7D, 0x7B7C7374,
+ 0x6C7B7C72, 0x776D7576, 0x7C7B7178, 0x747F7E74,
+ 0x7C737D7E, 0x7879707B, 0x747B7C73, 0x7C737C7D,
+ 0x7D7E757B, 0x757F8077, 0x7D757D7E, 0x7F7D757F,
+ 0x73818279, 0x7E757B7C, 0x7D7E757D, 0x757E7F76,
+ 0x77717D7E, 0x78797077, 0x747C7D74, 0x7C747D7E,
+ 0x7F7D757E, 0x78828078, 0x7B768280, 0x807D787E,
+ 0x73808178, 0x7D747B7C, 0x7A7B727C, 0x74797C73,
+ 0x7C737A7D, 0x7B7C737B, 0x777A7B77, 0x7F797A7B,
+ 0x7C7C767D, 0x71787970, 0x7E75797A, 0x8182797D,
+ 0x787F7C77, 0x81788380, 0x84827886, 0x737E7D73,
+ 0x81787C7D, 0x80817880, 0x787F8077, 0x7E798081,
+ 0x807C7782, 0x747D7E75, 0x7E757D7E, 0x7C7D747D,
+ 0x757D7A75, 0x78737D7A, 0x7A77727B, 0x73787970,
+ 0x7C737B7C, 0x7879707B, 0x777D7A75, 0x77737F7C,
+ 0x7B78747A, 0x767C7975, 0x78727B7A, 0x7A797578,
+ 0x7B7F7B7A, 0x5354807C, 0x08060658, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00020000, 0x3A340200,
+ 0xA6ABA238, 0x97A0A59C, 0xA39C99A1, 0x9CA39C9C,
+ 0x9A9EA39A, 0xA39A9EA3, 0x9EA39AA0, 0x9FA0A99F,
+ 0xA99FA0A9, 0xABB0A7A1, 0x77B8BBB2, 0x09077D80,
+ 0x09090908, 0x00000000, 0x00000000, 0x30312D02,
+ 0x989EA39A, 0xA5999EA5, 0x9EA499A1, 0x969BA196,
+ 0x9D9299A1, 0x979D9299, 0x969BA097, 0x9F98969D,
+ 0x969E9498, 0x92979F94, 0x9C91959D, 0x979D9296,
+ 0x93979F94, 0x9E97959D, 0x99A09997, 0x999C9E98,
+ 0x9E989D9F, 0x9CA09A9A, 0x9A9EA39A, 0x9F999CA0,
+ 0x9A9E989B, 0x989BA399, 0xA0979AA2, 0x9DA2999B,
+ 0x9AA0A39A, 0xA198A0A3, 0xA2A399A0, 0x95A0A499,
+ 0x9E929BA2, 0xA0A4989A, 0x9AA0A499, 0xA198A0A3,
+ 0x9FA2999E, 0x9B9FA59A, 0xA59AA0A6, 0x9FA59A9F,
+ 0x9CA6AA9E, 0xA99DA4A8, 0xA3AA9DA5, 0xA0A2AA9F,
+ 0xABA0A3AB, 0xA5ABA0A5, 0xA3A5ADA3, 0xADA2A5AD,
+ 0xA8B0A5A5, 0x39A7AFA8, 0x0000363B, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x3F3F0000,
+ 0xBCC0BB3D, 0xA9AFB4AB, 0xB1A7AEB4, 0xABB3ACA9,
+ 0xA8AAB2AB, 0xB1A7AAB2, 0xABB0A7A9, 0xA8AEB2A7,
+ 0x0300B0B1, 0x00040001, 0x00010101, 0x01000000,
+ 0x00010000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF585B59, 0xC0C0BEC1,
+ 0xBFBFBFC0, 0xBEBABDBB, 0xBEBCBBC0, 0xBABDBBBB,
+ 0xB9B9BFBA, 0xBDB8B8BE, 0xB7BDB8B7, 0xB9BEC2BD,
+ 0xBDBBBABE, 0xB9BCBABA, 0xBBBABDBB, 0xC1BFBABD,
+ 0xBABDBBBE, 0xBDBCBFBD, 0xBDBBBCBF, 0xBCBFBDBA,
+ 0xBDBCBFBD, 0xBFBDBCBF, 0xBCC0BBBC, 0xB9BBBFBA,
+ 0xC0BBBBBF, 0xBBBFBABC, 0xB6BBBCB8, 0xBEB8B9BA,
+ 0xBDBFB9BC, 0xB9BABEB9, 0xBEB8BABE, 0xBABEB8BA,
+ 0xB6BABFB6, 0xBEB8BABF, 0xBCBFB6BC, 0xB5BCC0B5,
+ 0xC1B6BCC0, 0xBFC3B8BD, 0xA9B7BDB2, 0xB5A8ACB4,
+ 0xAEB4A9AE, 0xABB0B3AA, 0xB4A9B1B4, 0xB0B4A8B0,
+ 0xA8B2B4A8, 0xB0A4B0B4, 0xABAFA3AC, 0xA1A7ABA0,
+ 0xADA1A8AC, 0xACB0A4A9, 0xA3ADB1A5, 0xACA0ABAF,
+ 0xA8ACA0A8, 0xA3A7AB9F, 0xAFA3ABAF, 0xA8ACA0AB,
+ 0xA1A8AA9E, 0xADA1A9AD, 0xA7AEA1A9, 0x9DA3A79B,
+ 0xAB9FA5A9, 0xA5A99DA7, 0x9BA3AA9D, 0xA89BA1A8,
+ 0xA3A79BA1, 0x989FA397, 0xA99DA0A4, 0xA6A89CA7,
+ 0x9BA3A79B, 0xA99DA3A7, 0xA3A79BA5, 0x959DA497,
+ 0xA2979DA1, 0x9EA2979E, 0x999DA398, 0xA3989CA4,
+ 0x9DA3989B, 0x959BA295, 0xA1959DA1, 0x9DA1969D,
+ 0x979BA097, 0xA19799A1, 0x99A29899, 0x9998A099,
+ 0x756B98A0, 0x151C156D, 0x01000301, 0x03010003,
+ 0x00030100, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x40403A02, 0x77828379, 0x84788183, 0x82857682,
+ 0x74818175, 0x84788080, 0x80847882, 0x797E8277,
+ 0x81788084, 0x80817780, 0x767F7F73, 0x82778282,
+ 0x83817684, 0x79848478, 0x84788585, 0x82807584,
+ 0x7988867B, 0x867A8684, 0x86847986, 0x79868577,
+ 0x87798B88, 0x87877988, 0x71868678, 0x82747D80,
+ 0x83837582, 0x79807F71, 0x857A8684, 0x87857A87,
+ 0x7989857A, 0x877D8884, 0x86847A89, 0x79868479,
+ 0x84788585, 0x80827682, 0x75818175, 0x82768181,
+ 0x80807482, 0x767C7C70, 0x82768282, 0x7F7E7482,
+ 0x737F7D75, 0x7C737B7C, 0x7B7C737B, 0x7577786F,
+ 0x7D747D7E, 0x7B7C737C, 0x6F78796F, 0x7B717879,
+ 0x797A707A, 0x6D7B7C72, 0x776E7677, 0x76776D76,
+ 0x6B707469, 0x756B7276, 0x77766C74, 0x6D747369,
+ 0x786E7877, 0x77786E77, 0x6E73776C, 0x7C71767A,
+ 0x75766C78, 0x7076776D, 0x79707A78, 0x70716878,
+ 0x6B75766D, 0x736B7374, 0x75766D75, 0x6773746B,
+ 0x71686F70, 0x73746B70, 0x766F736D, 0x716D787C,
+ 0x5E605A70, 0x3B606158, 0x01004141, 0x00000000,
+ 0x36000100, 0x59503B3A, 0x58595058, 0x88686960,
+ 0x756F9091, 0x76767075, 0x6F777771, 0x746E7575,
+ 0x78787274, 0x737B7C73, 0x776E7B7C, 0x7B7C7376,
+ 0x6A76776E, 0x776D7273, 0x78776D78, 0x727A796F,
+ 0x786F7D7C, 0x78797077, 0x707D7E75, 0x7E757879,
+ 0x7B7C737D, 0x6F7C7D74, 0x796F7879, 0x80817778,
+ 0x757B7C73, 0x7E757D7E, 0x7D7E757D, 0x737D7E75,
+ 0x78727B7C, 0x7D7D7778, 0x747B7C73, 0x7E767D7E,
+ 0x7A787080, 0x75817F77, 0x7E797F7D, 0x7F7C7781,
+ 0x707B7B75, 0x786F7879, 0x7B7C7377, 0x737D7E75,
+ 0x7C73797C, 0x7B7C737B, 0x787A7C76, 0x7C767C7E,
+ 0x7D7F797A, 0x7577786F, 0x7C737D7E, 0x7B7C737B,
+ 0x777F7C77, 0x8179817F, 0x84827884, 0x75807F75,
+ 0x7F767E7F, 0x8081787E, 0x7A818279, 0x7E79827F,
+ 0x7F7C7782, 0x6F787970, 0x7C73767A, 0x7D7E757B,
+ 0x737B7873, 0x77727B78, 0x7979737A, 0x737A7870,
+ 0x7C737B7C, 0x7B7C737B, 0x777B7873, 0x7A767F7C,
+ 0x7A77737D, 0x75787773, 0x77737A79, 0x78777376,
+ 0x7A7F7C78, 0x7B7A7F7B, 0x5752537F, 0x010A0808,
+ 0x00000301, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01010000, 0x00000101, 0x00020000, 0x01000200,
+ 0x70726C00, 0x99A0A49E, 0xA09999A0, 0x99A09999,
+ 0x9C9CA39C, 0xA9A09EA6, 0xA4A9A0A4, 0x9FA1A99F,
+ 0xB1A7A0A9, 0xBDC2B9A9, 0x057D7F79, 0x08080A09,
+ 0x08070908, 0x00010101, 0x01000001, 0x8E908A00,
+ 0x989EA499, 0xA4979EA5, 0x9EA4999D, 0x9298A096,
+ 0x9D92969B, 0x989C9199, 0x97989D94, 0xA19A99A1,
+ 0x959E9499, 0x92979F94, 0x9C91959D, 0x979D9296,
+ 0x95959D92, 0x9E97979F, 0x999F9A97, 0x989A9E98,
+ 0x9F989A9E, 0x989F9898, 0x979A9E98, 0x9D97999D,
+ 0x979B9599, 0x9999A197, 0xA1989DA2, 0x9EA1989C,
+ 0x9AA0A39A, 0xA39AA0A3, 0x9EA198A2, 0x93999F94,
+ 0xA19599A0, 0xA0A4999D, 0x9CA2A69B, 0xA39AA2A5,
+ 0x9EA297A0, 0x9A9DA398, 0xA4999FA5, 0x9FA59A9E,
+ 0x9CA3A99E, 0xA99EA1A7, 0xA3A99EA5, 0xA0A2ACA0,
+ 0xABA0A2AC, 0xA2AAA0A3, 0xA3A1A8A1, 0xADA2A5AD,
+ 0xACB4A9A5, 0x006F766F, 0x00000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x7B7E7C00, 0xABB4B9B0, 0xB0A9AFB4, 0xA8B0A9A8,
+ 0xAAA8B0A9, 0xB3A9A9B1, 0xABB0A7AB, 0x71AEB1A8,
+ 0x03007577, 0x00030102, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF585B59, 0xC0C0BEC1,
+ 0xC0C0C0C0, 0xBABBBEBC, 0xC0BBBBBF, 0xBBBFBABC,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBCBBBEBC,
+ 0xBEB9BBBE, 0xBBBFBABA, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xB9BABEB9, 0xBCBABABE, 0xBABDBBB9,
+ 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA, 0xBABBBFBA,
+ 0xBEBCBBBF, 0xBBBEBCBB, 0xB7BCC0BB, 0xBCB6B8BC,
+ 0xBBBFB9B8, 0xBABBBFBA, 0xBFBABBBF, 0xBCC0BABB,
+ 0xB6B9BEB5, 0xBFB6BBC1, 0xBCBFB6BC, 0xB2C0C1B8,
+ 0xC1B7BBBC, 0xBEC2B7C0, 0xA8AEB4A9, 0xB5A8AEB5,
+ 0xADB4A7AE, 0xA9B1B5AA, 0xB4A9B0B4, 0xAFB3A8B0,
+ 0xA8B0B4A8, 0xB1A2B0B4, 0xACB3A4AC, 0xA5ABB2A5,
+ 0xADA1ABB2, 0xA8ACA0A9, 0xA0A8ACA0, 0xAFA4A8AC,
+ 0xADB1A5AB, 0xA0A8AFA2, 0xAFA0A8AF, 0xA7AC9DA8,
+ 0xA0A7A99D, 0xACA1A8AC, 0xA3AA9DA8, 0x9EA9ADA1,
+ 0xA89CA8AD, 0xA6ADA0A4, 0x9FA1A99F, 0xA99FA1A9,
+ 0xA2A89DA1, 0x9BA0A498, 0xA899A3A7, 0xA4A99AA3,
+ 0x9DA8ACA0, 0xA99DA5A9, 0xA0A498A5, 0x959DA195,
+ 0xA1969DA1, 0x9FA3989D, 0x9A9FA59A, 0xA69B9DA5,
+ 0x9FA59AA0, 0x989EA598, 0x9F949EA5, 0x999F949B,
+ 0x9999A197, 0xA09998A0, 0x979F9898, 0x70ABB4AA,
+ 0x0500727A, 0x00040000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00000101, 0x00000000, 0x05060507, 0x2F2A0806,
+ 0x86847A33, 0x75838377, 0x83778181, 0x83837783,
+ 0x79868479, 0x83798684, 0x80817784, 0x7A83847A,
+ 0x847A8384, 0x83847A83, 0x7683847A, 0x80748282,
+ 0x83817680, 0x79858378, 0x85778884, 0x83827488,
+ 0x78868479, 0x877C8583, 0x86847989, 0x77868577,
+ 0x887D8685, 0x88887C8A, 0x76858577, 0x84768386,
+ 0x86857784, 0x76878378, 0x84798581, 0x88847988,
+ 0x77888479, 0x84798482, 0x86847988, 0x76868479,
+ 0x83778282, 0x82847881, 0x76828276, 0x81768282,
+ 0x81817583, 0x6E818076, 0x7C727978, 0x7D7B737D,
+ 0x787F7D75, 0x7C738280, 0x7B7C737B, 0x787B7C73,
+ 0x7E758081, 0x7B7C737D, 0x6E75746A, 0x7C727978,
+ 0x7A78707D, 0x6F78776D, 0x796F7A79, 0x78776D7A,
+ 0x6D76776D, 0x776D7478, 0x73746B76, 0x7073746B,
+ 0x79707879, 0x78797078, 0x6A73746B, 0x766D7374,
+ 0x78796F75, 0x6F75766C, 0x766D7879, 0x73746B75,
+ 0x6C707168, 0x746B7475, 0x73746B73, 0x65717268,
+ 0x766E6F6D, 0x75756F78, 0x6F70746E, 0x6B697074,
+ 0x5B5A566A, 0x365A5752, 0x05003C3C, 0x00030101,
+ 0x34000100, 0x534F3938, 0x57544F56, 0x8064645E,
+ 0x79758686, 0x7C79747C, 0x6C787872, 0x70687475,
+ 0x79776F72, 0x6D797A71, 0x766D7576, 0x70716875,
+ 0x6A696B65, 0x79706E70, 0x797A7178, 0x7079776F,
+ 0x76717A78, 0x7A777279, 0x6D7A7870, 0x78737775,
+ 0x7F7D757B, 0x7077786E, 0x7C707A7C, 0x7A7C707A,
+ 0x73787970, 0x79707B7C, 0x7C7D7378, 0x6D7D7E75,
+ 0x7A747576, 0x7D7D777A, 0x737D7E75, 0x7E757B7C,
+ 0x7B7C737D, 0x787B7C73, 0x7E758081, 0x7D7D777D,
+ 0x757F7C77, 0x7A757D7A, 0x7A7A747D, 0x757D7E75,
+ 0x7E757D7E, 0x7C7D747D, 0x757A7B72, 0x7C737D7E,
+ 0x7D7E757B, 0x727D7E75, 0x7C737A7B, 0x7D7E757B,
+ 0x757D7E75, 0x81797D7E, 0x7F7D7583, 0x78808178,
+ 0x7D778081, 0x7D7D777D, 0x757B7B75, 0x7A757B7B,
+ 0x7B7C737D, 0x74787970, 0x7E757C7D, 0x7D7E757D,
+ 0x737D7B73, 0x7E757D7B, 0x7D7E757D, 0x6F77746F,
+ 0x7C747774, 0x7E7C747E, 0x747C7D74, 0x7F7A7C7D,
+ 0x76736E82, 0x77797874, 0x77737C7B, 0x78777378,
+ 0x73787773, 0x74707A77, 0x7E7A7977, 0x02545252,
+ 0x03020402, 0x06020107, 0x00020000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x42434100, 0x9FA0A49F, 0xA49FA0A4, 0x9EA59E9E,
+ 0xA2A0A8A1, 0xA99FA1A9, 0xA1A99FA1, 0xB1B6BCB1,
+ 0xBBB2B6BC, 0x7D7F79B6, 0x000B0C08, 0x00010001,
+ 0x00000100, 0x00000000, 0x6C660001, 0x9EA39A6A,
+ 0x92989E93, 0x9F94959D, 0x979F9597, 0x93979F95,
+ 0xA097959D, 0x979C939B, 0x94949C92, 0x9E94969E,
+ 0x99A19796, 0x9299A197, 0x9E94949C, 0x99A19796,
+ 0x95979F95, 0x9D96979F, 0x99A09996, 0x999A9E98,
+ 0xA1979B9F, 0x979F9599, 0x92989D94, 0xA197969B,
+ 0x949C9299, 0x98989D94, 0xA0979CA1, 0x9EA1989D,
+ 0x989EA198, 0x9F999EA1, 0x9A9D949D, 0x999A9F96,
+ 0xA4999EA4, 0xA0A499A0, 0x999FA398, 0xA499A0A4,
+ 0xA0A499A0, 0x969AA095, 0xA2979A9F, 0x9EA4999E,
+ 0x9CA3A89F, 0xA89F9EA6, 0xA1A99FA3, 0x9FA0A99F,
+ 0xA99F9EA9, 0xA0A8A1A0, 0xA5A0A8A1, 0xADA3A5AC,
+ 0xADB2A9A5, 0x00747873, 0x00000001, 0x02000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010002, 0x00000000,
+ 0x383B3900, 0xA7ABAFA9, 0xB0A9A9B1, 0xA6B1A9A8,
+ 0xA9A6B1A9, 0xB0A9A8B0, 0xABAFA9A9, 0x36AAABA7,
+ 0x0100393A, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xC0585B59, 0xC1C1BFC2,
+ 0xC0C1BFC1, 0xB9BBBFBA, 0xBFBABABE, 0xBBBFBABB,
+ 0xBABABEB9, 0xBFBABBBF, 0xBBBFBABB, 0xBABABDBB,
+ 0xBFBABBBF, 0xBBBFBABB, 0xB7B8BCB7, 0xC4BFB8BC,
+ 0xBFC3BEC0, 0xC6C6CAC5, 0xC9C7C7CB, 0xBABDBBC6,
+ 0xBABAC0BB, 0xC0BBBAC1, 0xBAC0BBBA, 0xBABBBFBA,
+ 0xBEBCBBBF, 0xBBBEBCBB, 0xB8BBBFBA, 0xBDB7B9BD,
+ 0xBBBFB9B9, 0xBABBBFBA, 0xBFBABBBF, 0xBABEB8BB,
+ 0xB4BABFB6, 0xBFB6B9BF, 0xB8BBB2BC, 0xB3BBBCB3,
+ 0xBCB2BBBC, 0xB0B4A9BB, 0xA6AFB3A8, 0xB4A7ACB3,
+ 0xAEB5A8AD, 0xA8B0B4A8, 0xB4A9B0B4, 0xB0B4A8B0,
+ 0xA4B0B4A8, 0xB3A4AEB3, 0xACB3A4AC, 0xA4ACB3A6,
+ 0xB0A4AAB1, 0xABAFA3AC, 0xA0A7AB9F, 0xAFA4A8AC,
+ 0xABAFA3AB, 0xA0A7AE9F, 0xAC9DA8AF, 0xA2A99AA5,
+ 0xA1A8ACA0, 0xA99EA9AD, 0xA3AA9DA5, 0x9BA7AB9F,
+ 0xADA1A5AA, 0xA2A89DA9, 0xA1A1A99F, 0xA399A0A8,
+ 0x8F978D9B, 0x98A0A499, 0xA79BA0A4, 0xA8ACA0A3,
+ 0x9BA5A99D, 0xA498A3A7, 0xA0A498A0, 0x9AA1A599,
+ 0xA499A1A5, 0x9FA59AA0, 0x9C9FA49B, 0xA59AA0A5,
+ 0x9FA59A9F, 0x9399A093, 0xA09599A0, 0x999F949C,
+ 0x9899A298, 0x9F98979F, 0x99A19A97, 0x00717871,
+ 0x04000006, 0x00040000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010101, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010100, 0x2D070505, 0x827B3431,
+ 0x87837888, 0x73828173, 0x83788281, 0x84827785,
+ 0x78858378, 0x83798583, 0x84837984, 0x7B83847A,
+ 0x847A8485, 0x83847A83, 0x7783847A, 0x81778081,
+ 0x87857A82, 0x79888479, 0x84798884, 0x86847988,
+ 0x7C89877C, 0x877C8987, 0x89877C89, 0x7C868577,
+ 0x847A8987, 0x86847986, 0x79878779, 0x85778588,
+ 0x86847985, 0x73858176, 0x8176847E, 0x88847987,
+ 0x73868577, 0x84798281, 0x86827788, 0x73858378,
+ 0x7B6F807E, 0x7D7F737B, 0x757C7C70, 0x84798181,
+ 0x86847986, 0x73807F75, 0x7C727E7D, 0x7A78707D,
+ 0x737D7B73, 0x79707B7C, 0x7D7E7578, 0x73797C73,
+ 0x7970797C, 0x7B7C7278, 0x717E7D73, 0x7C727D7D,
+ 0x79766E7E, 0x6B7C7A70, 0x766C7775, 0x78776D78,
+ 0x727A7B71, 0x746B797D, 0x76776E73, 0x6B73746B,
+ 0x766D7374, 0x75766D75, 0x6C75766D, 0x70677475,
+ 0x7879706F, 0x6A75766C, 0x766D7374, 0x70716875,
+ 0x6C707168, 0x746B7475, 0x6F706773, 0x66706F65,
+ 0x6D657170, 0x6E6E686F, 0x7170746F, 0x6A6A7073,
+ 0x5A58576A, 0x365B5853, 0x03003C3C, 0x00040000,
+ 0x35020000, 0x53503A36, 0x57524F58, 0x8066635F,
+ 0x79758584, 0x7A79757A, 0x6C787872, 0x746C7674,
+ 0x77756D76, 0x6B73746B, 0x766D7374, 0x73746B75,
+ 0x6E6E706A, 0x78727274, 0x78797078, 0x7078766E,
+ 0x746F7A78, 0x79767177, 0x6C76746C, 0x78737674,
+ 0x7B79717B, 0x6D79786E, 0x7C707779, 0x7B7C727A,
+ 0x707B7C73, 0x7C727879, 0x7C7D737B, 0x6E75766D,
+ 0x78727677, 0x77777178, 0x757A7B72, 0x7C737D7E,
+ 0x7B7C737B, 0x73787970, 0x7D747B7C, 0x7D7E757C,
+ 0x727B7873, 0x78737A77, 0x7D7A757B, 0x737D7E75,
+ 0x7C737B7C, 0x7B7C737B, 0x6F7C7D74, 0x79707778,
+ 0x7B7C7378, 0x7377786F, 0x7E757B7C, 0x8081787D,
+ 0x737A7B72, 0x7C737B7C, 0x7B7C737B, 0x75818279,
+ 0x807A7D7E, 0x80807A80, 0x737B7B75, 0x7B727B7C,
+ 0x75766D7A, 0x6F7B7C73, 0x7E757778, 0x7D7E757D,
+ 0x737D7B73, 0x7C737B7C, 0x7879707B, 0x737A7772,
+ 0x79717C78, 0x7E7C747B, 0x747C7D74, 0x7B767C7D,
+ 0x7875707E, 0x7374736F, 0x79787877, 0x7775747B,
+ 0x707B7A76, 0x736F7574, 0x77747076, 0x517A7877,
+ 0x03025351, 0x07030207, 0x00020000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0xA09FA2A0, 0xA39EA1A5, 0x9EA49F9D,
+ 0xA0A0A8A1, 0xA99F9FA7, 0xA1A99EA0, 0xB1B6BCB1,
+ 0x7F79B8BC, 0x0809057D, 0x00000100, 0x00010000,
+ 0x00000000, 0x31010200, 0xA39A3537, 0x9EA499A0,
+ 0x92979F94, 0x9F95959D, 0x979F9597, 0x95979F95,
+ 0x9E94979F, 0x959D9396, 0x94979C93, 0xA097969E,
+ 0x969E949B, 0x92969B92, 0x9D96949C, 0x98A09696,
+ 0x94959D93, 0xA298969E, 0x98A0969A, 0x95999D97,
+ 0x9C93999E, 0x9BA09797, 0x91999E95, 0x9E94959A,
+ 0x929A9096, 0x9493988F, 0x9D94989D, 0x9EA1989A,
+ 0x949EA198, 0x9B929A9D, 0x9A9D9498, 0x989DA299,
+ 0xA1989CA1, 0x9C9F969E, 0x989EA198, 0xA4999EA1,
+ 0xA0A499A0, 0x969BA097, 0x9E959A9F, 0x9EA39A9B,
+ 0x9B9FA49B, 0xA49D9DA5, 0x9DA59B9D, 0x9D9EA79D,
+ 0xA79D9EA7, 0x9FA7A09E, 0xA1A0A8A1, 0xA89FA0A8,
+ 0xABAFA9A3, 0x004D514C, 0x00000001, 0x02000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00000000,
+ 0x13161400, 0xA8AAB1AA, 0xB0A9A8AF, 0xA6B1A9A8,
+ 0xA8A7B2AA, 0xB0A9A7AF, 0xAFB3AEA9, 0x00AAABA9,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF575A58, 0xC1BFBEC1,
+ 0xC0C1BFC0, 0xB9BBBFBA, 0xBFB9BBBF, 0xBBBFB9BB,
+ 0xBDBBBFBA, 0xC1BCBEC2, 0xBBC1BCBB, 0xBBBEC2BD,
+ 0xBFBABCC0, 0xBBBFB9BB, 0xBFB7BBB6, 0xC4BFC0C4,
+ 0xC1C5C0C0, 0xADB9C0B9, 0xB2B0ACB2, 0xB9BEBCAD,
+ 0xBFBDC3BE, 0xC4BFBEC4, 0xC0C4BFC0, 0xBFBFC3BE,
+ 0xC5C0C0C4, 0xC0C4BFC1, 0xBCBDC1BC, 0xBFB9BDC1,
+ 0xBDC1BBBB, 0xBCBDC1BC, 0xC0BEBDC1, 0xBCC0BBBD,
+ 0xB5BCBFB6, 0xBFB6BCC0, 0xBCBFB6BC, 0xB8BABBB2,
+ 0xBCB3C0C1, 0xB0B4A9BB, 0xA8B0B4A9, 0xB2A6ADB3,
+ 0xAEB2A6AE, 0xA5ADB1A5, 0xAFA3ADB1, 0xABAFA3AB,
+ 0xA0A8AFA0, 0xB1A2A8AF, 0xAAB1A2AA, 0xA4ADB1A5,
+ 0xB1A5ABAF, 0xA8ACA0AD, 0xA4A8ACA0, 0xAFA3ACB0,
+ 0xA8ACA0AB, 0x9DA9B0A1, 0xA99CA5AC, 0xA9B0A3A2,
+ 0x9DA9ADA1, 0xA79BA5A9, 0xA6AA9EA3, 0xA0A7A99D,
+ 0xA99DAAAC, 0xA3A99EA5, 0x99A0A89E, 0xA8A19BA3,
+ 0xA2AAA0A1, 0x97A3A79C, 0xA89C9FA3, 0xA8AA9EA6,
+ 0x98A0A498, 0xA79AA0A4, 0xA4A89CA0, 0x9AA3A79B,
+ 0xA299A2A6, 0x9DA2999D, 0x969FA49B, 0x9C919A9F,
+ 0x969C9196, 0x939B9F93, 0x9E929B9F, 0x9B9F949C,
+ 0x9999A197, 0xA09999A0, 0x6F757099, 0x00000400,
+ 0x02000004, 0x02030101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x01000000,
+ 0x00010101, 0x02000000, 0x7B31302C, 0x837A8583,
+ 0x88847988, 0x78878476, 0x83758986, 0x86857786,
+ 0x78868479, 0x85798484, 0x84837985, 0x7B808178,
+ 0x867D8384, 0x83847B85, 0x7A86857B, 0x847A8584,
+ 0x85847A85, 0x73868479, 0x7D72807E, 0x807E737F,
+ 0x7B868479, 0x84798C89, 0x8A887D86, 0x7A87857A,
+ 0x877D8785, 0x8A887E89, 0x78848478, 0x84788484,
+ 0x85837884, 0x76858176, 0x7B708581, 0x8381767F,
+ 0x70878678, 0x83757F80, 0x82817384, 0x77858176,
+ 0x7B6F8482, 0x7D7F737B, 0x73828276, 0x8274807E,
+ 0x83827483, 0x79828075, 0x7E728684, 0x7A796F7E,
+ 0x757B7C73, 0x77717D7E, 0x78787277, 0x71787872,
+ 0x7C747777, 0x7D7C727E, 0x6D79776D, 0x82787A78,
+ 0x7A796F83, 0x6B76756B, 0x78707675, 0x78796F7A,
+ 0x6D71756A, 0x746B7478, 0x6D706771, 0x68707168,
+ 0x73697071, 0x74756B72, 0x6E72736A, 0x766D7677,
+ 0x75766D75, 0x6D71746B, 0x766D7376, 0x70716875,
+ 0x6A707167, 0x756C7374, 0x73746B74, 0x65737268,
+ 0x6E64706F, 0x6E6F666D, 0x71686C66, 0x6A6A7073,
+ 0x5957576A, 0x37585852, 0x04003D3D, 0x00030100,
+ 0x37020000, 0x53503C38, 0x58535058, 0x8066635F,
+ 0x6F6D8584, 0x6E6F6B6E, 0x6E77746F, 0x706B7673,
+ 0x73706B73, 0x6E707168, 0x746B7677, 0x73746B73,
+ 0x6D6E7168, 0x78727173, 0x74746E76, 0x71797671,
+ 0x77717976, 0x77746F77, 0x6B727068, 0x736E7673,
+ 0x7B787376, 0x6F79776F, 0x79717977, 0x7676707B,
+ 0x70787970, 0x7C727879, 0x7C7D737B, 0x6E73746B,
+ 0x79737677, 0x79797379, 0x757B7971, 0x7C737F7D,
+ 0x7D7E757B, 0x737B7C73, 0x7E757B7C, 0x7B7C737D,
+ 0x717B7971, 0x78727976, 0x79797378, 0x757B7B75,
+ 0x7B727B7B, 0x7D7E757A, 0x75787872, 0x7E757B7B,
+ 0x7D7E757D, 0x7278796F, 0x7E757B7C, 0x7E7F767D,
+ 0x747C7D74, 0x7E757C7D, 0x8081787D, 0x73808178,
+ 0x7D747B7C, 0x7D7E757C, 0x747B7C73, 0x766D7C7D,
+ 0x7B7B7575, 0x747D7E75, 0x7E757C7D, 0x7D7E757D,
+ 0x737B7C73, 0x7E757B7C, 0x7879707D, 0x737B7873,
+ 0x7B767B78, 0x7F7C777E, 0x777B7873, 0x746F7F7C,
+ 0x7B787377, 0x727C7B77, 0x77737576, 0x75747078,
+ 0x75787977, 0x74707A79, 0x77747077, 0x787A7877,
+ 0x51507A78, 0x05030253, 0x01000000, 0x00000101,
+ 0x02000002, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x9F5D605E, 0xA5A0A0A4, 0x9EA59EA1,
+ 0xA1A0A8A1, 0xB1A7A0A8, 0xB3B9AEA9, 0x7AB6BBB2,
+ 0x08067C80, 0x08090707, 0x01000000, 0x00000001,
+ 0x00010000, 0x99363832, 0xA399A2A3, 0xA0A498A2,
+ 0x9399A093, 0xA19697A0, 0x959D9299, 0x95959D92,
+ 0x9E9398A0, 0x979D9298, 0x929A9E93, 0x9D94979D,
+ 0x969B929A, 0x92969A8F, 0xA097979D, 0x989D949B,
+ 0x94979C93, 0x9F94999F, 0x959D9297, 0x92979C93,
+ 0x9D92979D, 0x979D9297, 0x97989E93, 0x9D949CA2,
+ 0x989D9498, 0x9191998F, 0xA297939B, 0x9CA2979C,
+ 0x92989D94, 0x978E969B, 0x989D9492, 0x989A9F96,
+ 0xA19B9A9E, 0x9A9E989D, 0x999CA09A, 0xA09A9B9F,
+ 0x9EA09A9E, 0x9A9B9F99, 0x9C969CA0, 0x9A9E9898,
+ 0x9AA0A59C, 0xA49B9FA5, 0x9FA59A9F, 0x9B9DA59A,
+ 0xA59A9EA6, 0x9FA79D9D, 0x9FA1AAA0, 0xA7A1A0A9,
+ 0xABAFA9A3, 0x00242823, 0x01010001, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0xA9848A85, 0xB0A9A9B0, 0xA9B1AAA8,
+ 0xA9A7AFA8, 0xAFAAA8B0, 0xB6BAB5A9, 0x00727371,
+ 0x00000001, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xBF585B59, 0xC1BFBEC1,
+ 0xBDC1BCBE, 0xB9BBBFB9, 0xBEB8BBBF, 0xBBBFB9BA,
+ 0xBFBDC1BC, 0xC4BFBEC4, 0xBEC4BFBE, 0xC0C0C4BF,
+ 0xC4BEC1C5, 0xBBBFB9C0, 0xA6B8BCB7, 0xACA7A7AB,
+ 0xA8ACA7A8, 0xA2A2A6A0, 0xA7A2A4A8, 0xA2A6A1A3,
+ 0xBFB1B7B2, 0xC4BFBEC4, 0xC1C5C0C0, 0xBCBEC2BD,
+ 0xC4BFBDC1, 0xC0C4BFC0, 0xC0C0C4BF, 0xC1BBC1C5,
+ 0xB8BCB6BD, 0xBDBEC2BD, 0xC1BCBCC2, 0xBDC1BCBD,
+ 0xB8BFC2B9, 0xC2B9BFC3, 0xB8BBB2BF, 0xB4B9BCB3,
+ 0xB7AEBCBD, 0xB0B3AAB6, 0xA8ADB3A8, 0xB3A7ADB3,
+ 0xB0B4A8AF, 0xA8B0B4A8, 0xB1A5B0B4, 0xABAFA3AD,
+ 0xA2ACB3A4, 0xB1A2AAB1, 0xAAB1A2AA, 0xA6AEB2A6,
+ 0xAFA3ADB1, 0xA7AB9FAB, 0x9FACB0A4, 0xADA1A7AB,
+ 0xABAFA3A9, 0x9AA4AB9E, 0xA99CA2A9, 0xA5AC9FA2,
+ 0x9DA3A79B, 0xACA0A5A9, 0xA2A69AA8, 0x9DAAACA0,
+ 0xA99DA7A9, 0xA5A99DA5, 0x9EA4AA9F, 0xA89FA0A8,
+ 0x9DA299A3, 0x9DA5A99E, 0xA399A5A9, 0xA2A399A2,
+ 0x9DA3A79B, 0xA99CA5A9, 0xA0A498A2, 0x97A1A697,
+ 0xA0979FA3, 0x9BA0979B, 0x969A9F96, 0x9F949A9F,
+ 0x9FA59A99, 0x89909489, 0xA59A9094, 0x9FA398A1,
+ 0x989BA097, 0xA09B989F, 0x1E221D9A, 0x01000400,
+ 0x04020003, 0x01020003, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x3F3B3A02, 0x7A85837B, 0x84798785,
+ 0x87837886, 0x77878476, 0x82748885, 0x88857785,
+ 0x77858378, 0x877B8383, 0x82817787, 0x7D828078,
+ 0x867D8383, 0x8B898185, 0x7685847A, 0x837B8180,
+ 0x85847A86, 0x73818076, 0x7F757F7F, 0x82817780,
+ 0x7A868479, 0x83788B88, 0x86847985, 0x7989877C,
+ 0x857B8684, 0x87857B87, 0x76858378, 0x83798282,
+ 0x83817785, 0x767E7C71, 0x81768784, 0x817F7483,
+ 0x72858577, 0x82748182, 0x84837583, 0x79807E73,
+ 0x80748684, 0x7C7C7080, 0x76817F74, 0x7E738381,
+ 0x83827480, 0x71828075, 0x7F747E7C, 0x7D7D7181,
+ 0x6F7B7C72, 0x7E757778, 0x7879707D, 0x707B7C73,
+ 0x78707879, 0x7D7C727A, 0x6979786E, 0x786E7575,
+ 0x7D7C7279, 0x7076756B, 0x79707A78, 0x797A7178,
+ 0x7176776D, 0x766D787C, 0x70716875, 0x6B707168,
+ 0x746B7374, 0x75766D73, 0x7075766D, 0x7A717879,
+ 0x75766D79, 0x6D71746B, 0x746B7376, 0x70716873,
+ 0x6A707167, 0x71677374, 0x75766C70, 0x6578776D,
+ 0x6B61706F, 0x696A616A, 0x6E6A6C66, 0x6A6A7172,
+ 0x5A58586C, 0x38585753, 0x03013B3C, 0x01020000,
+ 0x34020000, 0x53503B38, 0x58535058, 0x7564635F,
+ 0x6F6A7879, 0x6E6F6B6B, 0x6673706B, 0x6D686F6B,
+ 0x7A777270, 0x6B73736D, 0x706A7374, 0x70716870,
+ 0x6D707168, 0x746E7376, 0x74746E74, 0x7177746F,
+ 0x7A747976, 0x77746F7A, 0x7176746C, 0x736E7B79,
+ 0x7B787376, 0x6F77756D, 0x77727977, 0x75756F7A,
+ 0x70787970, 0x7C727879, 0x78796F7B, 0x7172736A,
+ 0x7973797A, 0x7D7D7779, 0x747D7B73, 0x79707E7C,
+ 0x78797078, 0x727B7C73, 0x7C737A7B, 0x7B7C737B,
+ 0x717B7971, 0x7B757B79, 0x7979737B, 0x757D7D77,
+ 0x79737B7B, 0x7B7B7579, 0x767B7B75, 0x7B727E7F,
+ 0x7C7D747A, 0x727B7C72, 0x7E757B7C, 0x7B7C737D,
+ 0x6F7A7B72, 0x7C737778, 0x7D7E757B, 0x757D7E75,
+ 0x7E757D7E, 0x7879707D, 0x677C7D74, 0x756F6F70,
+ 0x7B7B7575, 0x737B7C73, 0x7E757B7C, 0x7B7C737D,
+ 0x707C7D74, 0x7C737879, 0x7B7C737B, 0x737E7B76,
+ 0x7B767B78, 0x7D7A757E, 0x737B7873, 0x78737B78,
+ 0x7B78737B, 0x737A7975, 0x77737677, 0x7A797578,
+ 0x73787675, 0x77727877, 0x7A77737A, 0x777A7877,
+ 0x79787A78, 0x5351507B, 0x000A0808, 0x00000000,
+ 0x02000002, 0x00010002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x01010101,
+ 0x00010001, 0x9F3D413C, 0xA49EA0A4, 0x9FA39DA0,
+ 0xA9A1A8A1, 0xB8AFA9B0, 0xBCC1B8B3, 0x047C807A,
+ 0x08080509, 0x08080808, 0x00000000, 0x00000000,
+ 0x04050100, 0x986B6C63, 0xA399A2A4, 0xA0A498A2,
+ 0x92969C91, 0x9C91979D, 0x969C9196, 0x93979D92,
+ 0x9C93979C, 0x9A9D9499, 0x8F9A9E93, 0x9990969A,
+ 0x96999096, 0x92999C93, 0x9D94969B, 0x989D9498,
+ 0x92989B92, 0x9D92979D, 0x969C9197, 0x91979D92,
+ 0x9C91989C, 0x999D9298, 0x91969A8F, 0x9D94989C,
+ 0x959A919A, 0x8F93988F, 0x978E9398, 0x969C9192,
+ 0x8E93988F, 0x9C919297, 0x989D9496, 0x969C9F96,
+ 0x9C96989C, 0x989C969A, 0x969A9E98, 0x9C96989C,
+ 0x9A9C969A, 0x98979B95, 0x9F999A9E, 0x979B959B,
+ 0x95969B92, 0xA69B9AA0, 0x9AA095A0, 0x989EA499,
+ 0xA4999EA5, 0x9FA59A9E, 0x9FA1A99F, 0xA7A1A1A9,
+ 0xA3A7A1A3, 0x00252826, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0xAB383B39, 0xB0A9AAB0, 0xA8B0A9A9,
+ 0xA9A9B1AA, 0xAFAAA9B0, 0xAFB3AEAB, 0x00393A38,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xB2434644, 0xB7B2B1B7,
+ 0xB0B7B2B1, 0xAFAEB5AE, 0xB9B3B1B9, 0xB1B5AFB5,
+ 0xB1B2B9B2, 0xB5AEB1B8, 0xB0B4AEAE, 0xAEAEB5AE,
+ 0xB5AFAEB5, 0xAFB3ADB1, 0x9DAEB0AA, 0x9B95A1A3,
+ 0x9A9C9699, 0x989C9E98, 0x9E989C9E, 0xA4A6A09C,
+ 0xB1A3A7A1, 0xB8B2B3B7, 0xAAAEA8B4, 0xADADB4AD,
+ 0xB3AEADB4, 0xADB3AEAD, 0xAEAFB3AD, 0xB4AEB0B4,
+ 0xABAFA9B2, 0xA9A3AAA3, 0xB0A9A8B0, 0xA9B0A9A9,
+ 0xA8ACB1A8, 0xB2A9AEB1, 0xAEB1A8AF, 0xABAFB1AB,
+ 0xB6ADAFB1, 0xB4B7AEB3, 0xA9AFB5AA, 0xB5A8AEB4,
+ 0xB0B4A8AE, 0xA8B1B5A9, 0xB1A6B2B4, 0xB0B4A8AD,
+ 0xA3AEB5A8, 0xB2A3ABB2, 0xAEB3A4AD, 0xA3ADB1A5,
+ 0xACA0ABAF, 0xABAFA3A8, 0xA2A8AEA3, 0xAFA4A7AD,
+ 0xA8ACA1AB, 0x9DA5A99D, 0xA899A5A9, 0xA2A798A3,
+ 0xA0A8ACA0, 0xA99EA8AC, 0xA4A89DA5, 0x9DA3A79B,
+ 0xACA0A5A9, 0xA5A99DA8, 0x9CA5A99E, 0xA79CA1A7,
+ 0xA5A99EA3, 0x9CA8ACA0, 0xA498A4A8, 0xA4A89CA0,
+ 0x9BA5A99D, 0xA99AA3A7, 0x9FA495A4, 0x969EA394,
+ 0xA2979EA2, 0xA2A59C9E, 0x9B9FA49B, 0xA49B9FA4,
+ 0x9FA49B9F, 0x959A9C96, 0x9C96999B, 0x989C969A,
+ 0x94969B92, 0x3530969A, 0x00010031, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020001, 0x00000200, 0x00000000, 0x07080808,
+ 0x302F0A08, 0x87837E34, 0x7686847A, 0x84798381,
+ 0x83817686, 0x75848375, 0x84798483, 0x88847988,
+ 0x73828173, 0x83788281, 0x86847A85, 0x7E84827A,
+ 0x87828886, 0x87857D8A, 0x7B89877D, 0x867D8785,
+ 0x86847A8B, 0x7A85847A, 0x847A8584, 0x8D8C8285,
+ 0x7989877C, 0x847A8684, 0x86847A86, 0x7887877B,
+ 0x83788484, 0x86847985, 0x79868479, 0x82798684,
+ 0x83817787, 0x7A838176, 0x83798785, 0x83817685,
+ 0x77868577, 0x84768685, 0x84837585, 0x79808074,
+ 0x7F738585, 0x8080747F, 0x75817F75, 0x81768280,
+ 0x82807583, 0x75828075, 0x7E738280, 0x817F7480,
+ 0x767E7C71, 0x7C728180, 0x7A796F7D, 0x6E75766C,
+ 0x786E7778, 0x75746A79, 0x6F727369, 0x7970767A,
+ 0x78797078, 0x70787970, 0x736A7879, 0x73746B72,
+ 0x6C787970, 0x736E7475, 0x76736E76, 0x6B73706B,
+ 0x706B7370, 0x78757073, 0x6B75756F, 0x706A7171,
+ 0x72726C70, 0x686D6E65, 0x71687071, 0x70716870,
+ 0x666F7066, 0x71676F70, 0x71726870, 0x6468695F,
+ 0x6D646C6D, 0x6C6D646C, 0x6970706A, 0x63626F6F,
+ 0x52505065, 0x33515250, 0x00003435, 0x00020000,
+ 0x31000100, 0x4F4B3435, 0x51514B50, 0x6E575751,
+ 0x746E7274, 0x71736D70, 0x6771716B, 0x6F6C6F6C,
+ 0x77747074, 0x6A72736F, 0x706C6E70, 0x6C6C666F,
+ 0x6F70706A, 0x716C7575, 0x77746F74, 0x7076736E,
+ 0x74707875, 0x73706B77, 0x7077756D, 0x756C7879,
+ 0x73746B74, 0x7074756C, 0x766D7879, 0x75766D75,
+ 0x7074756C, 0x766D7879, 0x75766D75, 0x70787970,
+ 0x79707879, 0x7D7E7578, 0x727D7A75, 0x7A757A77,
+ 0x7A77727D, 0x717A7870, 0x78737B79, 0x7D7A757B,
+ 0x737B7C73, 0x7D747B7C, 0x7B7B757C, 0x737C7C76,
+ 0x77737877, 0x78787278, 0x72787872, 0x79707A7B,
+ 0x7B7C7278, 0x727D7E75, 0x7F767A7B, 0x7B7C737E,
+ 0x757B7873, 0x7B757D7A, 0x80807A7B, 0x77807D78,
+ 0x77727F7C, 0x7B79717A, 0x6E74726A, 0x78737876,
+ 0x7B78737B, 0x757D7E75, 0x7C777D7E, 0x7976717F,
+ 0x767B7873, 0x76717E7B, 0x7B787379, 0x737E7B73,
+ 0x7D757E7B, 0x7D7B737F, 0x747F7C74, 0x7B767F7C,
+ 0x7B78737F, 0x737A7975, 0x77737877, 0x7574707A,
+ 0x72787773, 0x736E7776, 0x78737077, 0x77787473,
+ 0x72717C78, 0x7C7A7976, 0x014D4B4B, 0x00000200,
+ 0x01010100, 0x00000000, 0x01010000, 0x00010001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x6F000300, 0xACA77074, 0xA8ACA7A8,
+ 0xB0B0B4AF, 0xB3AEB1B5, 0x757974AF, 0x000B0C08,
+ 0x00000001, 0x00000100, 0x00010101, 0x01000000,
+ 0x67666200, 0x8FA2A39A, 0x9A919899, 0x98998F99,
+ 0x91969990, 0x9990979A, 0x979A9196, 0x969A9D94,
+ 0x98929A9C, 0x9A9C9696, 0x8E989B92, 0x978E9497,
+ 0x999C9394, 0x96949892, 0x9892989C, 0x979C9394,
+ 0x8F989990, 0x99909798, 0x96999096, 0x90969990,
+ 0x99909899, 0x97988F98, 0x9095968D, 0x98929899,
+ 0x98989298, 0x90969892, 0x99909699, 0x91948B96,
+ 0x8F91968D, 0x99909398, 0x95988F96, 0x8F989990,
+ 0x99909598, 0x96999098, 0x9292978E, 0x9C93969B,
+ 0x989B9299, 0x91989B92, 0x9B92979A, 0x989B9298,
+ 0x91989C91, 0x9B92989C, 0x989C9198, 0x979EA297,
+ 0xA1989EA2, 0x9FA2999E, 0x999EA198, 0xA09A9FA2,
+ 0x73756F9E, 0x00010200, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0xA7060907, 0xADA6A6AC, 0xA6ADA6A6,
+ 0xA6A6ACA7, 0xABA6A5AB, 0x797D78A7, 0x00010200,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0xB2434644, 0xB7B2B1B7,
+ 0xAEB9B1B0, 0xABACB4AA, 0xB2ACADB5, 0xAEB2ACAE,
+ 0xACACB3AC, 0xB3AAAEB6, 0xAEB3AAAE, 0xADAFB3AD,
+ 0xB3ADADB4, 0xAFB3ADAF, 0xAAAEB0AA, 0xB0AAB0B0,
+ 0xAEB0AAAE, 0xA0ADAFA9, 0x9E98A2A6, 0x92948E9C,
+ 0xA79BA097, 0xAFA9ABB0, 0xAAB1AAAB, 0xA9A8B0A9,
+ 0xAFAAA8B0, 0xA9AFAAA9, 0xA8ABAFA9, 0xA29CAAAE,
+ 0x9EA29CA0, 0xA29DA49D, 0xB1AAA1A9, 0xA9B1A7A9,
+ 0xA4AAAFA6, 0xABA2AAAD, 0xA7ACA3A8, 0xA6A8ACA6,
+ 0xB7AEA8AC, 0xB9BCB3B4, 0xA9AEB3AA, 0xB5AAAEB4,
+ 0xB0B4A8AF, 0xA8B0B4A8, 0xB4A9B0B4, 0xB1B5AAB0,
+ 0xA9ABB2A5, 0xB5A6AFB6, 0xAAAFA0B0, 0xA0A9ADA1,
+ 0xACA0A8AC, 0xABAFA3A8, 0xA5A9AFA4, 0xABA2AAB0,
+ 0xA8ACA1A8, 0xA0A8ACA1, 0xA99DA8AC, 0xA5AA9BA5,
+ 0xA0A8ACA0, 0xA79CA8AC, 0xA4A89DA3, 0xA0A4A89C,
+ 0xA99DA8AC, 0xA6AA9EA5, 0x9BA5A99D, 0xAA9EA3A7,
+ 0xA8ACA0A6, 0x99A3A79B, 0xA89CA1A5, 0xA2A69AA4,
+ 0x9CA4A89C, 0xA394A4A8, 0x989F909E, 0x9A9CA394,
+ 0xA69AA2A6, 0xA2A69BA4, 0x9B9FA49B, 0x9F969DA5,
+ 0x9A9F969A, 0x979A9C96, 0x9C97989C, 0x989C9798,
+ 0x30969A94, 0x01003236, 0x00010000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01020001, 0x00000200, 0x00000000, 0x05080907,
+ 0x5A550A09, 0x86847A5E, 0x70838176, 0x82777F7E,
+ 0x86847984, 0x73848375, 0x84798281, 0x83807288,
+ 0x75807F71, 0x81768483, 0x85837885, 0x7B87867C,
+ 0x81798583, 0x87857D83, 0x7B87857B, 0x867D8984,
+ 0x87857B8B, 0x7E8A897F, 0x847A8988, 0x82817785,
+ 0x7A87857A, 0x867C8785, 0x8A887E88, 0x77848478,
+ 0x82768383, 0x83817682, 0x79868277, 0x80778782,
+ 0x837E7585, 0x79838177, 0x847A8684, 0x84827786,
+ 0x75828075, 0x7E708483, 0x8281737F, 0x70808074,
+ 0x81757A7C, 0x80807481, 0x76817F75, 0x7F748280,
+ 0x83817681, 0x70817F74, 0x7C717D7B, 0x7D7B707E,
+ 0x747F7D72, 0x7C72817F, 0x7D7C727D, 0x707A7C70,
+ 0x786D7C7C, 0x77776B7A, 0x6F6F7368, 0x7970767A,
+ 0x78797078, 0x6E75756F, 0x766D7474, 0x75766D75,
+ 0x6976746C, 0x706B7371, 0x6F6C6773, 0x67726F6A,
+ 0x706B6F6C, 0x73706B73, 0x6770706A, 0x726C6D6D,
+ 0x71716B72, 0x646A6B62, 0x6C636C6D, 0x6D6E656B,
+ 0x6A6F7067, 0x6F657374, 0x73746A6E, 0x6A707168,
+ 0x6C667070, 0x6C6C666C, 0x6A70706A, 0x65647070,
+ 0x53515167, 0x364F4F4F, 0x00003636, 0x00010000,
+ 0x30000100, 0x504A3135, 0x50504A50, 0x6C595A51,
+ 0x746E7275, 0x73756F72, 0x6B70706A, 0x706D7370,
+ 0x77747075, 0x6B72736F, 0x6E6A6C70, 0x70706A6D,
+ 0x6D70706A, 0x706B7572, 0x716E6973, 0x6A75726D,
+ 0x6F6A726F, 0x74716C72, 0x7076746C, 0x756C7879,
+ 0x78797074, 0x6D787970, 0x79707576, 0x76797076,
+ 0x70797A71, 0x766D7879, 0x75766D75, 0x70787970,
+ 0x7C737879, 0x7B7C737B, 0x737A7772, 0x78737B78,
+ 0x7D7A757B, 0x717D7B73, 0x77727B79, 0x7A77727A,
+ 0x75797A71, 0x7E757D7E, 0x7B7C737D, 0x70777672,
+ 0x77737574, 0x74746E78, 0x707B7B75, 0x796F7879,
+ 0x7B7C7278, 0x747D7E75, 0x7E757C7D, 0x7D7E757D,
+ 0x7579776F, 0x7C767D7A, 0x7C7C767C, 0x767F7C77,
+ 0x78737E7B, 0x7875707B, 0x6F78766E, 0x7D797977,
+ 0x7F7C7780, 0x787D7E75, 0x7A728081, 0x7B78737C,
+ 0x737C7974, 0x77727B78, 0x7C79747A, 0x737B7870,
+ 0x7D757E7B, 0x7D7B737F, 0x717F7C74, 0x7B767C79,
+ 0x7E7B767F, 0x747A7975, 0x78747978, 0x7877737B,
+ 0x73777672, 0x77727877, 0x7873707B, 0x74777372,
+ 0x74707975, 0x77737277, 0x25737171, 0x00002423,
+ 0x00000000, 0x01010101, 0x01000101, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x01020000, 0x37000200, 0xACA7383C, 0xA7ABA6A8,
+ 0xB1B0B3B1, 0x3D3BB0B3, 0x0001003A, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x332F0001,
+ 0x97979134, 0x949B9C93, 0x9C939C9D, 0x9899909B,
+ 0x8D999A91, 0x99909396, 0x999C9396, 0x979A9C96,
+ 0x96929B9D, 0x97989495, 0x90989A94, 0x958C9699,
+ 0x96989292, 0x93959791, 0x98929498, 0x94989294,
+ 0x9197988F, 0x9990999A, 0x96999096, 0x8F95958F,
+ 0x99919595, 0x95968D9B, 0x8D989990, 0x948E9393,
+ 0x98989294, 0x8B90928C, 0x958C9194, 0x8C8F8694,
+ 0x8A8E938A, 0x948B8E93, 0x92958C91, 0x8B92958C,
+ 0x958C9296, 0x979A9192, 0x8E92978E, 0x978C9399,
+ 0x94988D91, 0x8D91958A, 0x978D9498, 0x95968C96,
+ 0x8D989C91, 0x978E9498, 0x96978E96, 0x91989C91,
+ 0x9B92989C, 0x9A9B929A, 0x979EA198, 0xA09A9DA0,
+ 0x767571A0, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x3D060907, 0xACA73C3F, 0xA6ADA6A8,
+ 0xA6A6ACA7, 0xACA7A5AB, 0x474A48A8, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0xB2434644, 0xB8B1B1B7,
+ 0xAEB9B1B0, 0xAAACB4AA, 0xB3ACACB4, 0xB0B4AEAC,
+ 0xAAB0B3AA, 0xB3AAB0B3, 0xB0B5ACB0, 0xACAFB3AD,
+ 0xB4ADAEB2, 0xAFB3ADAD, 0xA9AEB1A8, 0xB0AAB1B2,
+ 0xAEB0AAB0, 0xA9ABAFA9, 0xAFA9A9B0, 0xA3A7A1AB,
+ 0xA79CA198, 0xB1A7ABB0, 0xA9B1A7A9, 0xA7A8B1A7,
+ 0xB0A9A8B1, 0xA9B0A9A9, 0xA2A8AFA8, 0xA39AA4A8,
+ 0xA0A39AA0, 0x9D989C96, 0xB0A69DA4, 0xAAB2A8A8,
+ 0xA1AAAFA6, 0xADA4A6AC, 0xA7ACA3A8, 0xABA8ACA6,
+ 0xB2ACADB1, 0xB1B6ADAE, 0xA8B7BCB3, 0xB4A9ADB3,
+ 0xB0B4A9B0, 0xA5ADB1A5, 0xB1A5ADB1, 0xB0B4A8AD,
+ 0xA5ADB4A7, 0xAFA3ABB2, 0xA8ACA0AB, 0xA1ACAEA2,
+ 0xACA0A9AD, 0xABB2A5A8, 0xA1A9AFA4, 0xACA1A6AC,
+ 0xA9AFA4A6, 0x9BA9ADA2, 0xA99DA3A7, 0xA8ACA0A5,
+ 0x9DA7AEA1, 0xA498A5A9, 0xA6A89CA0, 0x9DA9ADA1,
+ 0xAB9FA5A9, 0xA5A99DA7, 0x9BA1A599, 0xAD9EA5AA,
+ 0xA3A899A8, 0x9BA0A498, 0xA89CA3A7, 0xA5A99DA6,
+ 0x96A4A99A, 0xA4959EA5, 0x9CA3949D, 0x9AA0A79A,
+ 0xA296A2A6, 0x9EA297A0, 0x959A9F96, 0xA095979F,
+ 0x9A9F969A, 0x97989C96, 0x9C97989C, 0x989C9798,
+ 0x00313530, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02020001, 0x00010300, 0x00000000, 0x520A0A04,
+ 0x847A5A5B, 0x88847986, 0x76838176, 0x81768381,
+ 0x87857A83, 0x73868577, 0x7F718281, 0x84817382,
+ 0x74868375, 0x81738683, 0x82807584, 0x78838278,
+ 0x847B8081, 0x83847A83, 0x7B87857A, 0x84798A86,
+ 0x86847988, 0x7D848478, 0x887E8789, 0x85847A87,
+ 0x7D86847A, 0x847B8987, 0x85837989, 0x79828276,
+ 0x81758585, 0x82817781, 0x78848278, 0x81788681,
+ 0x87827986, 0x76838177, 0x83798180, 0x86847985,
+ 0x767E7E72, 0x83758484, 0x82817384, 0x72808072,
+ 0x84788080, 0x7D7D7184, 0x757E7C71, 0x80748280,
+ 0x81817580, 0x71858378, 0x7D6F7E7C, 0x8181737E,
+ 0x767D7D71, 0x7B718282, 0x7A796F7C, 0x6D78786C,
+ 0x77697979, 0x78786C78, 0x6B78796F, 0x776D7276,
+ 0x76776D76, 0x6775766D, 0x72696F70, 0x78797071,
+ 0x707A7870, 0x746F7A78, 0x6F6C6777, 0x6573706B,
+ 0x6C646D6A, 0x7371696E, 0x67737169, 0x746B716F,
+ 0x71726973, 0x636A6B62, 0x70676B6C, 0x7071686F,
+ 0x696F6C67, 0x6F6A716E, 0x6F6F6972, 0x686B6B65,
+ 0x67636B6C, 0x66686266, 0x6B666660, 0x5B59706F,
+ 0x5050505A, 0x35505050, 0x00003535, 0x00010000,
+ 0x32000200, 0x504A3337, 0x50514850, 0x6357584F,
+ 0x756F6B6C, 0x72736F73, 0x6A75756F, 0x706C726F,
+ 0x73706C73, 0x666E706A, 0x706A6A6C, 0x6C6D6470,
+ 0x67707168, 0x6F6A6F70, 0x73706B72, 0x68727068,
+ 0x736B7270, 0x73716976, 0x6C76746C, 0x746C7674,
+ 0x7A787076, 0x6B75766D, 0x756C7374, 0x78797074,
+ 0x6E787970, 0x746B7677, 0x75766D73, 0x73787970,
+ 0x7C737B7C, 0x797A717B, 0x737A7A74, 0x7A757979,
+ 0x7F7C777D, 0x707A7870, 0x77727A78, 0x7D7A757A,
+ 0x737B7C73, 0x79707B7C, 0x78797078, 0x70757470,
+ 0x7A767574, 0x7D7D777B, 0x787D7D77, 0x7D738081,
+ 0x8081777C, 0x777D7E75, 0x82797F80, 0x7D7E7581,
+ 0x747B7C73, 0x7B727C7D, 0x7879707A, 0x717B7971,
+ 0x78737B79, 0x7B78737B, 0x717F7D75, 0x78747B79,
+ 0x7F7C777B, 0x727B7C73, 0x7D737B7C, 0x7B7C737C,
+ 0x767A7772, 0x7B767D7A, 0x7D7A757E, 0x707D7B73,
+ 0x7B737A78, 0x7D7B737D, 0x727B7873, 0x78747A77,
+ 0x7B78747B, 0x74787773, 0x77737978, 0x78777378,
+ 0x747A7975, 0x74707978, 0x7A777375, 0x75787675,
+ 0x74707A76, 0x77737277, 0x70716F6F, 0x25257070,
+ 0x00010125, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x3A020301, 0xACA73B3C, 0xA8ACA7A8,
+ 0x3CB2B3B1, 0x00003C3C, 0x00010100, 0x00000000,
+ 0x01010200, 0x00000003, 0x2F000000, 0x98923233,
+ 0x98999098, 0x909B9C93, 0x9C929899, 0x9B9C929B,
+ 0x91969A8F, 0x978E979A, 0x91938D94, 0x93969793,
+ 0x98939498, 0x94989394, 0x91949892, 0x948E9397,
+ 0x94969090, 0x8D979993, 0x8F8B9193, 0x91938D8E,
+ 0x8C93968D, 0x928C9095, 0x8E928C8E, 0x8B93948B,
+ 0x948B9593, 0x93948B93, 0x8F90908A, 0x8F8B9293,
+ 0x8E908A8E, 0x858C8F86, 0x90858C90, 0x888C818C,
+ 0x8A8C948A, 0x938C8C94, 0x8B93898C, 0x878C948A,
+ 0x928C8991, 0x8C948A8E, 0x8B8C948A, 0x968C8D95,
+ 0x8F948B8E, 0x8B8E9188, 0x938B9394, 0x95948A95,
+ 0x8D96978D, 0x958C9498, 0x90938A92, 0x9292958C,
+ 0x9B92989B, 0x9A9B929A, 0x98A0A198, 0xA09AA0A1,
+ 0x4D4C48A0, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x3E090909, 0xACA73D40, 0xA8ACA6A8,
+ 0xA7A8ACA7, 0xABA9A8AC, 0x161917A8, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0xB20C0F0D, 0xB8B1B3B7,
+ 0xB0B8B1B1, 0xA7A9B1A7, 0xB0A9A9B1, 0xAAAEA8A9,
+ 0xAAB0B3AA, 0xB1A8B0B3, 0xADB2A9AE, 0xAEAFB3AD,
+ 0xB4ADB0B4, 0xADB1ABAD, 0xAAAFB1AB, 0xB0AAAEB0,
+ 0xACB0AAAE, 0xA9AAB1AA, 0xB0A9A9B0, 0xA9B0A9A9,
+ 0xA7ABAFA9, 0xB0A9ABB0, 0xAAB2A8A9, 0xA7A8B1A7,
+ 0xB2ABA8B1, 0xABAFA9AB, 0xA8A9B0A9, 0xA9A0AAAE,
+ 0xA0A39AA6, 0x9E9DA49D, 0xB0A99EA5, 0xA9B1A7A9,
+ 0xA6A8B0A6, 0xADA3AAAF, 0xA5ADA3A5, 0xA9A8ADA4,
+ 0xADA4ADB2, 0xADB2A9A8, 0xB3BBC0B7, 0xB4A9B7BC,
+ 0xB0B4A9B0, 0xA5AEB4A9, 0xB1A5ABB2, 0xABAFA3AD,
+ 0xA3ABB2A5, 0xACA0A9B0, 0xABAFA3A8, 0xA0AFB1A5,
+ 0xAC9FA8AC, 0xA9B0A3A5, 0xA0A6ADA0, 0xAFA4A6AD,
+ 0xA6ACA1A9, 0xA0A4A89D, 0xA99DA7AB, 0xA5A99DA5,
+ 0x9BA6ADA0, 0xA79BA1A8, 0xA8AA9EA3, 0x9BA3A79B,
+ 0xA99DA3A7, 0xA0A498A5, 0x9EA3A899, 0xAA9BA8AD,
+ 0xA0A596A5, 0x98A0A498, 0xA79DA0A4, 0xA3A79BA6,
+ 0x979EA598, 0xA99C9DA4, 0x9DA497A0, 0x96A2A69A,
+ 0xA2969EA2, 0xA2A69B9E, 0x9B9FA59A, 0xA095A0A6,
+ 0x9AA0959A, 0x96999E95, 0x9B99989C, 0x3E413F98,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01030002, 0x00010200, 0x0B0C0A00, 0x7B5B5C53,
+ 0x84798685, 0x86847986, 0x76838176, 0x81778381,
+ 0x7C7A6F83, 0x75828075, 0x84768483, 0x82817385,
+ 0x73868374, 0x83758582, 0x7F7D7286, 0x7785847A,
+ 0x81768081, 0x8082767D, 0x77878678, 0x85778885,
+ 0x86857788, 0x7B858577, 0x847A878A, 0x86857B83,
+ 0x7B89877D, 0x847B8785, 0x89847B89, 0x79868479,
+ 0x83798585, 0x85847A84, 0x7786847A, 0x837A8381,
+ 0x84827888, 0x79828177, 0x81778483, 0x86847983,
+ 0x71828276, 0x83757F7F, 0x85847684, 0x73828173,
+ 0x81758181, 0x80807481, 0x747E7C71, 0x8175817F,
+ 0x7D7D7181, 0x71807E73, 0x80747E7C, 0x7D7D7180,
+ 0x79818175, 0x7C728585, 0x79786E7D, 0x6F79786E,
+ 0x776C7B7B, 0x78786C79, 0x6B76776D, 0x756B7276,
+ 0x76776D74, 0x6873746B, 0x746B7071, 0x77756D73,
+ 0x6C76746C, 0x736E7674, 0x73706B76, 0x6673706B,
+ 0x6C646E6B, 0x6A68606E, 0x62737169, 0x70676A6B,
+ 0x6E6F666F, 0x65686862, 0x71686B6E, 0x6D6E6570,
+ 0x676D6D67, 0x6C676F6C, 0x6D6D676F, 0x62686862,
+ 0x635F6668, 0x62645E62, 0x60666660, 0x514F6564,
+ 0x50514F50, 0x354F4F4F, 0x00003535, 0x00000002,
+ 0x31000100, 0x504A3435, 0x524F4A50, 0x595A5850,
+ 0x6B656162, 0x696A6669, 0x676C6B67, 0x6B676C6B,
+ 0x6C6B676E, 0x626A6C66, 0x6D646668, 0x6869606C,
+ 0x68707168, 0x6F697071, 0x726F6A6F, 0x6A727068,
+ 0x756D7574, 0x72706877, 0x686F6D65, 0x746C7270,
+ 0x76746C76, 0x67707168, 0x71686F70, 0x75766D70,
+ 0x6875766D, 0x71687071, 0x78797070, 0x70787970,
+ 0x79707879, 0x7B7C7378, 0x71797973, 0x77727777,
+ 0x7F7C777A, 0x707C7A72, 0x78737A78, 0x7C79747B,
+ 0x737A7B72, 0x7C737B7C, 0x7878727B, 0x70787872,
+ 0x74707574, 0x74746E75, 0x75787872, 0x7E757D7E,
+ 0x7A7B717D, 0x757D7E75, 0x7D747D7E, 0x8081787C,
+ 0x76808178, 0x7F767F80, 0x7879707E, 0x6A78766E,
+ 0x78737472, 0x7F7C777B, 0x777B7873, 0x78737F7C,
+ 0x7B78737B, 0x727C7D74, 0x7B717B7C, 0x7879707A,
+ 0x737B7873, 0x78737B78, 0x7A78707B, 0x727C7A72,
+ 0x7C747D7C, 0x7A78707E, 0x767E7C74, 0x746F7E7B,
+ 0x76736E77, 0x6F757470, 0x77737575, 0x77767278,
+ 0x737C7B77, 0x77737877, 0x75747078, 0x75757470,
+ 0x73707A76, 0x7A777378, 0x6F737170, 0x6F6F7071,
+ 0x0000006F, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01020301, 0x73710203, 0xAAABA970,
+ 0x003C3C3C, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000200, 0x00010002, 0x61000100, 0x988F6266,
+ 0x96999093, 0x90989990, 0x99909899, 0x9B9C9398,
+ 0x90969990, 0x98929499, 0x94969096, 0x8F919590,
+ 0x948F9094, 0x90948F90, 0x8F8F938D, 0x948E9195,
+ 0x8F938D90, 0x8A92948E, 0x938F8E90, 0x93958F94,
+ 0x878B9087, 0x90898991, 0x8A8E8889, 0x888D8F89,
+ 0x908A9091, 0x8E908A90, 0x868E908A, 0x8A868A8C,
+ 0x8C908A89, 0x818C8F86, 0x8C81888C, 0x888C8188,
+ 0x878C9188, 0x90898991, 0x89908989, 0x87899187,
+ 0x8F898991, 0x8A8F868B, 0x87899187, 0x8F898991,
+ 0x8B8F898B, 0x888E908A, 0x908A8E91, 0x90918890,
+ 0x898E9287, 0x948B9094, 0x8E918891, 0x8C8D8F89,
+ 0x9B929295, 0x9A9B929A, 0x9AA0A198, 0x9F9B9EA0,
+ 0x1F201EA0, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x07090909, 0x77720809, 0xA8ACA673,
+ 0xA7A7ABA6, 0x7B79A8AC, 0x171A1878, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0xAC080907, 0xB0AAAFB0,
+ 0xACB1A8AE, 0xA9ABB3A9, 0xB4ADABB3, 0xABB2ABAD,
+ 0xACAFB3AD, 0xB3ADAEB2, 0xAEB5AEAF, 0xACADB4AD,
+ 0xB1ABABB1, 0xAFB3ADAD, 0xAAADB1AB, 0xB0ABABAF,
+ 0xACB2ADAA, 0xAAABB2AB, 0xB0ABAAB1, 0xA9B0ABAA,
+ 0xAAA9AFAA, 0xAEA9AAB1, 0xA9B0A9AA, 0xA7A9B1A7,
+ 0xB0A7A9B1, 0xADB0A7AD, 0xA5ACB1A8, 0xAEA5A7AF,
+ 0xA7AFA5A9, 0xA1A9B0A9, 0xACA5A0A8, 0xA5ADA6A4,
+ 0xA6A5ACA5, 0xACA3A8B0, 0xA9AFA4A7, 0xA2A6AEA3,
+ 0xAEA3A7AD, 0xA8ACA1A8, 0xB6ADB3A8, 0xB9B0BBC1,
+ 0xAEB4A9B4, 0xA6ADB1A6, 0xB2A5ADB1, 0xABB2A5AB,
+ 0x9DA5AC9D, 0xB0A4A5AC, 0xACB0A4AC, 0xA4ACB0A4,
+ 0xAB9CACB0, 0xA5AC9DA4, 0xA2A3AD9D, 0xAC9FA8B2,
+ 0xA0A79AA5, 0xA0A8ACA0, 0xACA1A8AC, 0xA5A99EA8,
+ 0x9DA1A89B, 0xA99DA3AA, 0xA3A79BA5, 0x9CA3A79C,
+ 0xA79BA3A7, 0xA5A99DA3, 0x98A0A498, 0xA79BA0A4,
+ 0xA5A99DA3, 0x9AA2A89D, 0xA0979FA5, 0x9EA1989D,
+ 0x9BA0A69B, 0xA499A0A6, 0x9EA4999E, 0x99A1A599,
+ 0xA59AA1A5, 0x9FA59A9F, 0x949BA295, 0x9F939CA0,
+ 0x9B9F949B, 0xA4A8ABA2, 0x7371A8AA, 0x06060672,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x08080507, 0x06060906, 0x2F302C06, 0x75808177,
+ 0x81768181, 0x82807583, 0x76818076, 0x7E768180,
+ 0x83827880, 0x76848379, 0x85778282, 0x85857785,
+ 0x74848375, 0x84768382, 0x83837785, 0x7A808177,
+ 0x83798384, 0x83857982, 0x75807F71, 0x84748585,
+ 0x85847684, 0x77858577, 0x83798585, 0x85847A84,
+ 0x7987857A, 0x837A8884, 0x88837A88, 0x778C8A7F,
+ 0x847A8383, 0x83827885, 0x787E7D73, 0x83798382,
+ 0x83827885, 0x79808074, 0x80748385, 0x84847880,
+ 0x75808074, 0x80758181, 0x817F7482, 0x73838176,
+ 0x7C70807E, 0x8383777C, 0x747E7D73, 0x81777F7E,
+ 0x82817782, 0x71828076, 0x7C727D7B, 0x787A6E7D,
+ 0x767D7D71, 0x786E8282, 0x7E7D7379, 0x717D7C72,
+ 0x7C717D7D, 0x7674697E, 0x6B75746A, 0x756D7374,
+ 0x75736B77, 0x6B73706B, 0x6F6A7370, 0x73706B72,
+ 0x69727068, 0x72697172, 0x70716871, 0x62727068,
+ 0x6C636C6A, 0x6B6C636B, 0x6370706A, 0x69636969,
+ 0x66686269, 0x6761625E, 0x6C66696D, 0x6A6D646A,
+ 0x60686960, 0x69606869, 0x68696068, 0x58606158,
+ 0x605A6061, 0x60605A60, 0x575F5C57, 0x47435D5D,
+ 0x46474346, 0x39373A38, 0x0000383B, 0x00000000,
+ 0x21000100, 0x33302422, 0x39343138, 0x5843433D,
+ 0x605A5E61, 0x5E5F5B5E, 0x5F60615D, 0x61606061,
+ 0x60615D63, 0x60666862, 0x68626669, 0x5D5F5966,
+ 0x66696B65, 0x6B676A6C, 0x6C6C666A, 0x68707168,
+ 0x71687071, 0x6B6C6370, 0x68707168, 0x71687071,
+ 0x70716870, 0x68707168, 0x766D7071, 0x75766D73,
+ 0x6A74746E, 0x716B726F, 0x73736D71, 0x6D74756C,
+ 0x79707576, 0x75766D78, 0x75797973, 0x7A717B7B,
+ 0x78797079, 0x71787970, 0x7B75797A, 0x7B7B757B,
+ 0x727C7A72, 0x746F7C7A, 0x77746F77, 0x72797671,
+ 0x75707A77, 0x79767178, 0x70787872, 0x79707879,
+ 0x78797078, 0x747B7C72, 0x7C737C7D, 0x8182797B,
+ 0x70787970, 0x746F7879, 0x7A777277, 0x6E7B7971,
+ 0x78737876, 0x7F7C777B, 0x737F7C77, 0x78737B78,
+ 0x7875707B, 0x707D7B73, 0x7C737A78, 0x7879707B,
+ 0x6F787970, 0x79707778, 0x7B7C7278, 0x6D7D7C72,
+ 0x786E7979, 0x7D7C7279, 0x787D7E74, 0x7E758081,
+ 0x7B7C737D, 0x6F7B7B75, 0x78727778, 0x79797378,
+ 0x74797973, 0x78727A7A, 0x78787278, 0x72777470,
+ 0x73707976, 0x7B767378, 0x6E76736F, 0x72717372,
+ 0x59575674, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x01000001, 0x0A0B0900,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x01000001, 0x00010000, 0x99696F6A, 0x918A98A0,
+ 0x89908989, 0x8E92948E, 0x948E9494, 0x97979194,
+ 0x92969892, 0x98929698, 0x96989296, 0x8F979993,
+ 0x8F8A9195, 0x8A908B8B, 0x8D8A908B, 0x908B8C92,
+ 0x868C878A, 0x8B8C908B, 0x908A8C90, 0x8E908A8E,
+ 0x87899187, 0x91878991, 0x89908989, 0x86888C86,
+ 0x8A868A8C, 0x8A8C8689, 0x80878983, 0x88828689,
+ 0x86888286, 0x7E82847E, 0x857F8284, 0x88898085,
+ 0x80868980, 0x88828689, 0x86888286, 0x81868B82,
+ 0x8B82868C, 0x888B8288, 0x7F868980, 0x887F868A,
+ 0x86888285, 0x85868882, 0x8783878B, 0x8A8C8686,
+ 0x87888C86, 0x8C86898D, 0x888C8688, 0x86888C87,
+ 0x908A888C, 0x8D8F898E, 0x8F92948E, 0x938F9094,
+ 0x31323092, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x6A660001, 0x9CA09B69,
+ 0x9A9B9F9A, 0x6A68999F, 0x00010067, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xAB080907, 0xB1ABAEAF,
+ 0xAEB1A8B1, 0xA9ADB2A9, 0xB1AAABB3, 0xA9B0A9AA,
+ 0xA8ABB2AB, 0xB3ACA8AF, 0xABB2ABAC, 0xACABB1AC,
+ 0xB1ABABB1, 0xABB2ABAD, 0xAAAAB0AB, 0xAFAAA9AF,
+ 0xAAB0ABA8, 0xA9AAB1AA, 0xB0ABA9B0, 0xAAB1ACA9,
+ 0xA9A9AFAA, 0xAFAAA8AE, 0xAAAEA8AB, 0xA7AAAFA6,
+ 0xAFA6ABB0, 0xACAFA6AC, 0xA5A9AEA5, 0xB1A7A7AF,
+ 0xA6AEA4A9, 0xA1A3ABA4, 0xABA5A0A8, 0xA5ADA6A1,
+ 0xA5A7AEA7, 0xAFA4A7AF, 0xA7ADA2A9, 0xA1A7AEA1,
+ 0xACA0A7AE, 0xA8ACA0A8, 0xA8A6ACA1, 0xB9B0ADB3,
+ 0xACB2A7B4, 0xA5ACB0A5, 0xB2A5ADB1, 0xA4AB9EAB,
+ 0xA2ABB2A3, 0xB0A4AAB1, 0xACB0A4AC, 0xA4ACB0A4,
+ 0xA798ACB0, 0xA5AC9DA0, 0x9DA8B2A2, 0xA798A3AD,
+ 0xA5AC9DA0, 0xA0A9ADA1, 0xACA1A8AC, 0xA5A99DA8,
+ 0x9FA1A89B, 0xA99DA5AC, 0xA3A79BA5, 0x9CA5A99E,
+ 0xAA9EA3A7, 0xA5A99DA6, 0x98A0A498, 0xA99DA0A4,
+ 0xA4A89CA5, 0x99A2A89D, 0xA1989EA4, 0x9EA1989E,
+ 0x9B9EA39A, 0xA69DA0A6, 0xA3A99EA1, 0x979FA699,
+ 0xA1969DA4, 0x9BA1969B, 0x909DA195, 0xA1959A9F,
+ 0x9B9F949D, 0x6FA8ABA2, 0x06067273, 0x06050706,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x05080507, 0x302C0705, 0x81847B2F, 0x7C88877D,
+ 0x81758888, 0x81817581, 0x7983847A, 0x827A8182,
+ 0x83817984, 0x75848379, 0x85797F81, 0x85887983,
+ 0x75838375, 0x83758383, 0x83837783, 0x76858579,
+ 0x897D7F80, 0x85857789, 0x75888779, 0x85758585,
+ 0x88887885, 0x7B868678, 0x877B8787, 0x83817787,
+ 0x78888479, 0x80778783, 0x86847A85, 0x78858378,
+ 0x91878583, 0x92918792, 0x7387867C, 0x7D737E7D,
+ 0x8382787E, 0x737F8175, 0x81737D7F, 0x83837781,
+ 0x72848478, 0x7F747E7C, 0x84807583, 0x6F858378,
+ 0x7F737C7A, 0x8585797F, 0x737E7D73, 0x7D737E7D,
+ 0x7E7D737E, 0x737D7B71, 0x80767E7D, 0x78796F81,
+ 0x7179796D, 0x7C727D7D, 0x79786E7D, 0x7279786E,
+ 0x7C717E7C, 0x7A786D80, 0x6D75736B, 0x756D7576,
+ 0x77756D77, 0x6B77746F, 0x746F7370, 0x73706B77,
+ 0x656D6E65, 0x71686D6E, 0x70716870, 0x63727068,
+ 0x665D6D6B, 0x6B6C6365, 0x6B70706A, 0x67637171,
+ 0x68696566, 0x5D5F635E, 0x635D5F63, 0x61645B5F,
+ 0x60686960, 0x6960696A, 0x60615868, 0x4F606158,
+ 0x58505758, 0x5956515A, 0x4C54514C, 0x46425252,
+ 0x3A3B3745, 0x25393D38, 0x00002427, 0x00000100,
+ 0x21020000, 0x33322622, 0x38333038, 0x4834342E,
+ 0x514B4E51, 0x50524C4F, 0x54565753, 0x57535758,
+ 0x57585456, 0x5A5D5F59, 0x5F595E60, 0x5D5F595D,
+ 0x5F61655F, 0x65616165, 0x63655F64, 0x626C6D64,
+ 0x6D646A6B, 0x6E71686A, 0x67707168, 0x6E656F70,
+ 0x6D6E656D, 0x6B707168, 0x756C7374, 0x73746B72,
+ 0x6B73706B, 0x706A7370, 0x71716B70, 0x6873746B,
+ 0x79707071, 0x78797078, 0x757B7B75, 0x79707B7B,
+ 0x78797078, 0x707A7B72, 0x7B757879, 0x7C7C767B,
+ 0x6F7A7870, 0x76717977, 0x79767179, 0x7077746F,
+ 0x776F7875, 0x7A787079, 0x72787872, 0x766D7878,
+ 0x75766D75, 0x7278796F, 0x7E787A7B, 0x7B7B757E,
+ 0x6C797A71, 0x78737475, 0x77756D7B, 0x6F737169,
+ 0x7C777977, 0x807D787F, 0x737F7C77, 0x78737B78,
+ 0x7B79717B, 0x737D7B73, 0x7D747B7C, 0x77786F7C,
+ 0x73787970, 0x7A717B7C, 0x7B7C7279, 0x6C7E7D73,
+ 0x7E727878, 0x7D7D717E, 0x727A7B71, 0x81787B7C,
+ 0x77786F80, 0x757B7C73, 0x7E757D7E, 0x7B7C737D,
+ 0x727B7873, 0x79707A77, 0x78787278, 0x73777470,
+ 0x74707A77, 0x77747077, 0x7076736F, 0x736F7774,
+ 0x84817D76, 0x00525351, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x01020000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x02000001, 0x383C3701, 0x9998A099, 0x8F8996A1,
+ 0x878E8985, 0x8E8E908A, 0x938D9494, 0x93958F93,
+ 0x8F92938F, 0x938F9293, 0x92948E92, 0x8E92948E,
+ 0x908B9294, 0x8A908B8C, 0x8E8A908B, 0x93918C93,
+ 0x8A908B8E, 0x8A868C87, 0x8D878C90, 0x8688828B,
+ 0x82828A80, 0x8B81838C, 0x858C8583, 0x83898D88,
+ 0x88838488, 0x878B8584, 0x80868980, 0x89808689,
+ 0x80857C86, 0x7B7F817B, 0x7E7A7E7F, 0x84847E7F,
+ 0x7E84847E, 0x837D8284, 0x82847E83, 0x7885887F,
+ 0x887F7E81, 0x85887F85, 0x7B83847B, 0x89808384,
+ 0x84847E88, 0x8481837D, 0x837F8589, 0x84888382,
+ 0x82858984, 0x88838387, 0x84888384, 0x83838782,
+ 0x88828488, 0x8B8D8786, 0x9090948F, 0x63619195,
+ 0x00010060, 0x00010101, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x01000000, 0x35330101, 0x9CA09B34,
+ 0x9A9B9F9A, 0x3634999F, 0x00020033, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x74080907, 0xAFA97778,
+ 0xAEB1A8AF, 0xA9ACB1A8, 0xB3ACABB3, 0xA9B0A9AC,
+ 0xA9AAB2AB, 0xB2A8A8B0, 0xA8B1A7A9, 0xABAAB1AA,
+ 0xB1AAABB2, 0xABB2ABAA, 0xA9AAB0AB, 0xB0ABA7AE,
+ 0xAAB0ABAA, 0xA9A9B0A9, 0xB1ACA8B0, 0xA9B0ABAA,
+ 0xAAA9B0A9, 0xB0A9AAB1, 0xABAFA9A9, 0xA5AAAFA6,
+ 0xAFA5ABAE, 0xACB0A5AE, 0xA3A9AFA4, 0xAFA4A6AE,
+ 0xA5ADA3A9, 0xA5A3ABA4, 0xABA4A2AD, 0xA3ABA4A3,
+ 0xA2A7AFA5, 0xADA2A7AD, 0xA6ADA0A7, 0xA1A7AEA1,
+ 0xACA1A9AD, 0xA8ACA1A8, 0xA1A8ACA1, 0xBAAFA8AC,
+ 0xB7BBB0B6, 0x9EADB1A6, 0xA295A6AA, 0xABB2A39B,
+ 0xA3ACB0A4, 0xB0A4ABAF, 0xACB0A4AC, 0x9DACB1A2,
+ 0xA798A7AC, 0xA5AC9DA0, 0x98AAB1A2, 0xAC9DA0A7,
+ 0xAEB5A6A5, 0xA0A8ACA0, 0xA99DA8AC, 0xA6AA9EA5,
+ 0x9DA8ACA0, 0xA99DA5A9, 0xA6AA9FA5, 0x9DA1A89B,
+ 0xAC9FA3AA, 0xA3A79BA5, 0x9CA3A79B, 0xA99DA6A8,
+ 0xA6AA9EA7, 0x979CA297, 0xA49B9CA2, 0x9CA1989F,
+ 0x9CA0A39A, 0xA59CA2A5, 0xA0A59CA2, 0x959CA297,
+ 0xA3989BA2, 0x9EA5989D, 0x969DA195, 0xA1929EA2,
+ 0xA2A3999E, 0x0674736F, 0x05070806, 0x08050708,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000001, 0x00010100,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x2E060606, 0x847B2F30, 0x80847981, 0x70818076,
+ 0x81757C7C, 0x80827681, 0x777F8076, 0x8078817F,
+ 0x84817983, 0x78848379, 0x81758484, 0x86897A81,
+ 0x7486897A, 0x83778083, 0x89897D81, 0x7D8D8D81,
+ 0x897E8989, 0x8584768B, 0x73807F71, 0x83738383,
+ 0x84857582, 0x78848476, 0x83788484, 0x83817685,
+ 0x79868277, 0x81768884, 0x83817683, 0x78858378,
+ 0x897E8583, 0x8484788B, 0x737A796F, 0x7C727C7D,
+ 0x7C7D737B, 0x72818175, 0x80748080, 0x84847880,
+ 0x75838176, 0x7C718280, 0x837F7480, 0x70838176,
+ 0x82767C7C, 0x82827682, 0x6F7B7B6F, 0x82787B7B,
+ 0x7D7C7283, 0x727D7C72, 0x847A7D7C, 0x7D7C7285,
+ 0x6D7A786D, 0x7D737A78, 0x79786E7E, 0x6D76746A,
+ 0x786D7A78, 0x7C786D7C, 0x6B72736A, 0x746F7374,
+ 0x76736E77, 0x6B73706B, 0x71697370, 0x6A6B6273,
+ 0x676E6F66, 0x71686F70, 0x6D6E6570, 0x686B6C63,
+ 0x6C637071, 0x66675E6B, 0x5A676A61, 0x635D6063,
+ 0x61635D61, 0x5B61635D, 0x5D526164, 0x595D5259,
+ 0x50585950, 0x57525859, 0x5A57525A, 0x48595651,
+ 0x4D48504D, 0x504D4951, 0x4E52514D, 0x3C385152,
+ 0x3A3B373B, 0x26383C37, 0x00002528, 0x00000100,
+ 0x22020000, 0x32312723, 0x38333037, 0x3D32342E,
+ 0x514B4143, 0x51514B4F, 0x494F5249, 0x524C4F52,
+ 0x50504A52, 0x50535450, 0x54505155, 0x5E5F5B53,
+ 0x605D5E5A, 0x5F596364, 0x6666605F, 0x6364655C,
+ 0x655F6B6C, 0x6B6B6565, 0x65707168, 0x6B656D6E,
+ 0x6D6D676B, 0x68707168, 0x71677071, 0x70716870,
+ 0x6D73706B, 0x726D7471, 0x78757075, 0x6872736A,
+ 0x766D7071, 0x78797075, 0x71787970, 0x7A71797A,
+ 0x77786F79, 0x70787970, 0x78727879, 0x77777178,
+ 0x6D79776F, 0x76717775, 0x79767179, 0x6D79776F,
+ 0x766E7775, 0x7A787078, 0x6D75766D, 0x79707576,
+ 0x76776E78, 0x757B7C73, 0x7D777D7E, 0x7878727D,
+ 0x6D767970, 0x79707376, 0x75766D78, 0x6D76776D,
+ 0x7D777677, 0x7878727D, 0x71767670, 0x7A71797A,
+ 0x77786F79, 0x767B7C73, 0x7D747E7F, 0x797C737C,
+ 0x737B7B75, 0x7C737B7C, 0x7A7B717B, 0x6B7C7B71,
+ 0x786E7775, 0x7D7C727A, 0x757B7C73, 0x7E757D7E,
+ 0x7D7E757D, 0x767D7A75, 0x7A757E7B, 0x7A77727D,
+ 0x727B7873, 0x77727A77, 0x7B78737A, 0x707A7773,
+ 0x74707774, 0x78777375, 0x6F74736F, 0x736F7673,
+ 0x76736F76, 0x287A7B79, 0x0000272A, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x01000200, 0x71757000, 0x8999A099, 0x8F8A8890,
+ 0x898F8A88, 0x898D918B, 0x918B8D8F, 0x8D8F898F,
+ 0x8F8D8F89, 0x928E9293, 0x95949091, 0x8A8F918B,
+ 0x908A8E90, 0x888C868E, 0x87868C87, 0x908B868C,
+ 0x898F8A8A, 0x87838781, 0x8B858B8D, 0x8688828B,
+ 0x8280847E, 0x857E8289, 0x7E847F7E, 0x7E7D837E,
+ 0x847D7D83, 0x7D857B7D, 0x7A7E867C, 0x847A7C84,
+ 0x7A82787C, 0x76787C76, 0x7B77777B, 0x7E7F7B7A,
+ 0x777E7F7B, 0x7C76797D, 0x787C767A, 0x76787C76,
+ 0x7B75787C, 0x787C7677, 0x767E807A, 0x7C767A7C,
+ 0x7B7B757C, 0x7A80807A, 0x807A7E80, 0x7E807A80,
+ 0x7A7E807A, 0x807A7E80, 0x82847E7E, 0x7F82837F,
+ 0x847E8283, 0x85878182, 0x8F90948F, 0x64629094,
+ 0x00000063, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x676A6800,
+ 0x659CA09B, 0x0100646A, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x3B080907, 0xB0AA3E3F,
+ 0xACB1A8AE, 0xAAAEB3AA, 0xB3ACACB4, 0xA9B0A9AC,
+ 0xA7ABB2AB, 0xB1A7A8B1, 0xA9B1A7A9, 0xAAA9B0A9,
+ 0xB1AAAAB1, 0xABB2ABAA, 0xABA9B0A9, 0xB0ABAAB0,
+ 0xA9AFAAAA, 0xA8A8B0A9, 0xB0A9A7AF, 0xA8B0A9A8,
+ 0xA9A8AFA8, 0xAFA8A9B0, 0xA8B0A6A8, 0xA6ABB0A7,
+ 0xAEA3AAAF, 0xACB0A5AA, 0xA4A9AFA4, 0xADA2A7AF,
+ 0xA6ACA1A7, 0xA4A5ADA3, 0xAEA4A5AE, 0xA4ACA2A6,
+ 0xA2A7ADA2, 0xAEA1A7AD, 0xA6ADA0A7, 0xA0A8ACA0,
+ 0xACA1A8AC, 0xA8ACA1A8, 0xA0A7ABA0, 0xACA1A8AC,
+ 0xB5B9ADA8, 0x9EB5B9AD, 0xAB9EA6AA, 0xACB3A6A4,
+ 0xA5ACB0A4, 0xB0A4ADB1, 0xADB1A5AC, 0x9DA7AC9D,
+ 0xB1A2A7AC, 0xA5AC9DAA, 0x9CA5AC9D, 0xB1A2A4AB,
+ 0xA0A798AA, 0x9CA0A498, 0xA99DA4A8, 0xA8ACA0A5,
+ 0x9DA5AA9B, 0xACA0A5A9, 0xA2A69BA8, 0xA0A4AB9E,
+ 0xAA9DA6AD, 0xA0A498A3, 0xA0A5A99D, 0xA99DAAAC,
+ 0x9FA397A7, 0x9D9FA699, 0xA89DA2A8, 0xA2A79EA2,
+ 0x97A2A59C, 0xA1989DA0, 0x9DA2999E, 0x989DA398,
+ 0xA4979DA3, 0x9DA4979D, 0x939DA195, 0xA1959B9F,
+ 0xA2A3999F, 0x073F3D3C, 0x05070805, 0x07040608,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x52080605, 0x83795858, 0x82847882, 0x7588887C,
+ 0x81738181, 0x7F817581, 0x78848379, 0x81798382,
+ 0x86847A84, 0x76848278, 0x84788282, 0x84847684,
+ 0x7A828576, 0x887C8489, 0x89897D86, 0x7D868479,
+ 0x887D8A88, 0x8685778A, 0x74858476, 0x83738484,
+ 0x7F7F7183, 0x77848476, 0x81768383, 0x86847983,
+ 0x72858378, 0x7F737F7D, 0x7F7F737F, 0x78848277,
+ 0x7C718583, 0x8484787E, 0x6F7E7D73, 0x7D737879,
+ 0x8183777C, 0x73808074, 0x80748181, 0x7F7F7380,
+ 0x737F7F73, 0x7C71807E, 0x817F747E, 0x7A807E73,
+ 0x7C708686, 0x7C7C707C, 0x6F7E7E72, 0x7D737B7B,
+ 0x8281777E, 0x6F7D7C72, 0x7D737A79, 0x7A796F7E,
+ 0x717A786D, 0x776D7E7C, 0x79786E79, 0x687A786E,
+ 0x756A7573, 0x76746A79, 0x6C73746A, 0x71687475,
+ 0x72736A70, 0x6A73706B, 0x72697273, 0x6A6B6271,
+ 0x656D6E65, 0x6E656D6E, 0x6869606D, 0x636B6C63,
+ 0x665D6B6C, 0x5F605765, 0x545B5E55, 0x5C565A5D,
+ 0x5B5D575A, 0x535B5B55, 0x53495B5C, 0x52534952,
+ 0x48505148, 0x4F4A5051, 0x514E4952, 0x3F47443F,
+ 0x443F4744, 0x47444047, 0x43484743, 0x3A364647,
+ 0x383C3739, 0x26383C37, 0x00002528, 0x00000000,
+ 0x21010101, 0x34332422, 0x37343038, 0x3D31332D,
+ 0x433D4143, 0x43443B43, 0x40484940, 0x47424849,
+ 0x4A47424A, 0x474A4C46, 0x4B474B4D, 0x5354504A,
+ 0x53565753, 0x56525657, 0x58585257, 0x5A61615B,
+ 0x5F596060, 0x65655F5F, 0x61686862, 0x6B656767,
+ 0x71716B6B, 0x67707168, 0x72686E72, 0x74756C71,
+ 0x6E76736E, 0x6F6A7572, 0x73706B72, 0x70717269,
+ 0x756C7879, 0x78797074, 0x70787970, 0x79707879,
+ 0x797A7178, 0x71787970, 0x7872797A, 0x79797378,
+ 0x6F77756D, 0x746F7977, 0x77746F77, 0x6F79776F,
+ 0x78707977, 0x77756D7A, 0x6D75766D, 0x736A7576,
+ 0x78797072, 0x707B7C73, 0x78727879, 0x78787278,
+ 0x6B75786F, 0x71687174, 0x75766D70, 0x6D797A70,
+ 0x7A717677, 0x7A7A7479, 0x6E76776E, 0x73697677,
+ 0x75766C72, 0x737A7B72, 0x7C737B7C, 0x7E817879,
+ 0x757D7D77, 0x79707B7B, 0x797A7178, 0x6D75746A,
+ 0x7C727877, 0x79786E7E, 0x747B7C73, 0x7E757C7D,
+ 0x7B7C737D, 0x7B7E7B76, 0x7C778380, 0x7D7A757F,
+ 0x737D7A75, 0x78737B78, 0x7A77727B, 0x737B7874,
+ 0x78747877, 0x77787477, 0x6F757470, 0x726F7673,
+ 0x76736F77, 0x777A7B77, 0x2A28787C, 0x01020029,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00010000, 0x00000100, 0x00020000,
+ 0x3B390200, 0xADB1AC3A, 0x999AA19A, 0x9F9A99A0,
+ 0x999F9A99, 0x97979B96, 0x98949A9B, 0x92948E97,
+ 0x96949893, 0x9B99999A, 0x9C9A999A, 0x93969793,
+ 0x97939697, 0x96979396, 0x8D8C908B, 0x98938C92,
+ 0x93979294, 0x8A8F918B, 0x908A8E90, 0x8F918B90,
+ 0x898B8F89, 0x8F8A8990, 0x858B868B, 0x83888C87,
+ 0x847E8488, 0x7A7F7680, 0x777C847A, 0x827C7981,
+ 0x7E827C7E, 0x7F7B827B, 0x83818084, 0x7E7F7D82,
+ 0x7A7C807B, 0x847F7B7F, 0x7B7F7980, 0x7C7D817C,
+ 0x817C7D81, 0x7D817C7D, 0x7B7C807B, 0x7F7B7C80,
+ 0x84837F7E, 0x7F85857F, 0x847E8585, 0x85857F84,
+ 0x82868783, 0x87838688, 0x81827E86, 0x8382837F,
+ 0x88848687, 0x8A8B8787, 0x91919590, 0x32309093,
+ 0x00000031, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x34353300,
+ 0x349B9E9C, 0x00003136, 0x00010100, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x3F080808, 0xAFA93E41,
+ 0xAAB2A8AB, 0xA7A8B0A6, 0xAFA6A9B1, 0xA8B0A6AA,
+ 0xA6A9B1A7, 0xAFA6A8B0, 0xAAB0A5AA, 0xA5A9AEA5,
+ 0xAFA5A9AE, 0xA9B1A7A7, 0xA8A8B0A6, 0xB0A9A8AF,
+ 0xA8AFA8A9, 0xA7A5ADA6, 0xAEA7A6AE, 0xA7AFA5A7,
+ 0xA7A7AFA5, 0xAEA5A9B1, 0xA7AFA5A9, 0xA6A7AFA5,
+ 0xAEA3A9B1, 0xA7ADA2A8, 0xA4A7ADA2, 0xAEA1A9AF,
+ 0xA7ADA2A7, 0xA3AAAEA3, 0xAEA3AAAE, 0xA6AA9FAA,
+ 0x9FA9ADA1, 0xACA0A7AB, 0xA8ACA0A8, 0xA1A8ACA0,
+ 0xACA0A9AD, 0xA9ADA1AA, 0x9DA8ACA0, 0xAB9EA5AC,
+ 0xA6ADA0A4, 0xB1B9BDB1, 0xB0A4B9BD, 0xABAFA3AC,
+ 0xA0ADB1A5, 0xAB9FA8AC, 0xA8ACA0A7, 0x9FA6AD9E,
+ 0xAFA2A7AE, 0xA8AFA2A8, 0xA2A4AB9E, 0xAFA0A8AF,
+ 0x9CA394A8, 0x90909488, 0xACA0989C, 0xA8ACA0A8,
+ 0x9DA5A99D, 0xA99DA5A9, 0xA2A69AA5, 0x9DA8ACA0,
+ 0xA596A5A9, 0xA5AA9BA0, 0x9DA7AB9F, 0xA498A5A9,
+ 0xA0A498A0, 0x9AA0A79A, 0xA59AA0A7, 0x9FA398A1,
+ 0x999FA096, 0xA299A0A4, 0x9DA2999F, 0x959EA499,
+ 0x9F939DA1, 0x9B9F939B, 0x9AA0A79A, 0xA69AA0A7,
+ 0x3D4037A2, 0x00000100, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000001, 0x02010001,
+ 0x7A57544F, 0x84798684, 0x86857786, 0x75858476,
+ 0x87798483, 0x82827488, 0x797D7B70, 0x837A8684,
+ 0x86847988, 0x73848277, 0x82777F7F, 0x83837784,
+ 0x77828576, 0x85778386, 0x85857985, 0x7A89877C,
+ 0x877C8883, 0x8885778B, 0x798B887A, 0x84768B88,
+ 0x7F7E7087, 0x73818072, 0x80758281, 0x86847984,
+ 0x778B897E, 0x7F738383, 0x8282767F, 0x76868479,
+ 0x7F718381, 0x7F7F7180, 0x70828276, 0x82767A7C,
+ 0x7F7F7382, 0x727E7E72, 0x81777E7E, 0x82817782,
+ 0x787E7D73, 0x81778382, 0x7B796F83, 0x7A838177,
+ 0x7C728684, 0x7A796F7D, 0x7278766C, 0x7C717E7C,
+ 0x7F7D727E, 0x7279786E, 0x7A707D7C, 0x7C7B7179,
+ 0x717E7C71, 0x796F7E7C, 0x7B796F7B, 0x6A79786E,
+ 0x796F7574, 0x75766C7A, 0x69727369, 0x73697273,
+ 0x70746972, 0x67707168, 0x71677071, 0x68695F70,
+ 0x5F686960, 0x69606768, 0x68696068, 0x5A60635A,
+ 0x645B6063, 0x58595063, 0x485B5C53, 0x504A5051,
+ 0x504F4B50, 0x4054514D, 0x443F4744, 0x47443F47,
+ 0x3E484940, 0x49414748, 0x4A48404B, 0x40484940,
+ 0x48404849, 0x4747414A, 0x55575854, 0x3C3A5457,
+ 0x393C3A39, 0x2F2D332E, 0x09072E34, 0x06090706,
+ 0x340C0F0D, 0x35343536, 0x37363237, 0x4851514B,
+ 0x50475051, 0x5152494F, 0x474C4C46, 0x4C484F4C,
+ 0x4F4C474F, 0x40484940, 0x48424849, 0x48484248,
+ 0x4B4E4D49, 0x4B4A4E4C, 0x504D494F, 0x4F56534F,
+ 0x534F5653, 0x5D5C5854, 0x5F62635F, 0x635F6263,
+ 0x61635D62, 0x60686C61, 0x6C60666D, 0x686C6168,
+ 0x6B696963, 0x6F6A726F, 0x6B686372, 0x646D6E65,
+ 0x70676C6D, 0x7172696F, 0x6A75766D, 0x72697273,
+ 0x75766D71, 0x7076746C, 0x77727A78, 0x726F6A7A,
+ 0x6D707168, 0x78707576, 0x7B79717A, 0x70737169,
+ 0x746C7A78, 0x7A787076, 0x6975766D, 0x79707172,
+ 0x797A7178, 0x7075766D, 0x786F7879, 0x78797077,
+ 0x6F77786F, 0x76707778, 0x78797076, 0x6E78796F,
+ 0x7A717778, 0x77786F79, 0x6D74756C, 0x756C7576,
+ 0x75766D74, 0x6F787970, 0x7F767778, 0x7E7F767E,
+ 0x71787B72, 0x7B72777A, 0x7879707A, 0x7077786F,
+ 0x79717879, 0x7B7C737B, 0x777D7D77, 0x807A7D7D,
+ 0x7E807A7E, 0x777D7E75, 0x81787F80, 0x7D7E7580,
+ 0x747D7E75, 0x77717C7D, 0x78787277, 0x73787773,
+ 0x79737877, 0x72746E77, 0x6F757470, 0x74717673,
+ 0x77747079, 0x71787872, 0x77737577, 0x0D0E0A78,
+ 0x00000100, 0x00000000, 0x01010100, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000102, 0x00000000, 0x00020001,
+ 0x1B1B0200, 0x50514F1B, 0x47464947, 0x49474649,
+ 0x46494746, 0x47484947, 0x49474849, 0x48494548,
+ 0x47484947, 0x4A484849, 0x48484849, 0x47474846,
+ 0x49474849, 0x48494748, 0x41424341, 0x44424043,
+ 0x42434143, 0x3F42433F, 0x433F4243, 0x42433F42,
+ 0x4D50514D, 0x514F4E52, 0x4F525050, 0x31343531,
+ 0x36303435, 0x35373134, 0x353B3B35, 0x3A363B3B,
+ 0x393A363B, 0x39373B36, 0x3C3A383B, 0x3A3B393B,
+ 0x37383B39, 0x3C38383C, 0x3A3B373B, 0x37393A36,
+ 0x3B393A3B, 0x383B393A, 0x39383B39, 0x3C37383B,
+ 0x3A3B3738, 0x373A3B37, 0x3B373A3B, 0x3A3B373A,
+ 0x383D3B3A, 0x3B3A3D3C, 0x3E3C3B3D, 0x3E40413F,
+ 0x403E3F40, 0x40413F3F, 0x41424341, 0x16154243,
+ 0x02000018, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010200, 0x00000102, 0x02030100,
+ 0x000C0F0D, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000000, 0x00000100,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x06080808, 0xAFA80508,
+ 0xA8B1A7A8, 0xA7A9B1A7, 0xB1A8A9B1, 0xABB0A7AC,
+ 0xA7ABB0A7, 0xB0A5ABB0, 0xACB0A5AC, 0xA6A9AEA5,
+ 0xADA3AAAF, 0xA7AFA5A5, 0xA5ABB0A7, 0xAFA9A9AE,
+ 0xAAB1AAAB, 0xA7A4ABA4, 0xB1A7A6AE, 0xA7AFA5A9,
+ 0xA4A7AFA5, 0xACA3A6AE, 0xAAAFA6A7, 0xA4A6AEA3,
+ 0xB0A5A7AF, 0xA7AFA4A8, 0xA2A7ADA2, 0xAEA1A7AD,
+ 0xA9ADA1A7, 0xA3AAAEA3, 0xAEA2ACAD, 0xA8AA9EAC,
+ 0xA1A8ACA0, 0xACA0A9AD, 0xA9ADA1A8, 0xA0A8ACA0,
+ 0xACA0A8AC, 0xA8ACA0AA, 0x98A2A99A, 0xA798A0A7,
+ 0xA1A899A0, 0xB0ABAFA3, 0xBCB1B8BC, 0xACB0A4B8,
+ 0xA3A8ACA0, 0xB1A5ABAF, 0xA8ACA0AD, 0x9FA8AFA0,
+ 0xAEA1A7AE, 0xA7AEA1A7, 0x9FA4AB9E, 0xAFA0A5AC,
+ 0xA0A798A8, 0x98909488, 0xACA0A0A4, 0xA8ACA0A8,
+ 0x9DA7AB9F, 0xA69AA5A9, 0xA6AA9EA2, 0x97A5A99D,
+ 0xA99A9FA3, 0xA4A99AA4, 0x97A5A99D, 0xA4989FA3,
+ 0xA5A99DA0, 0x99A1A899, 0xA2979FA6, 0x9EA2979E,
+ 0x99A3A79B, 0xA2999EA4, 0x9CA2979D, 0x939B9F94,
+ 0x9F939B9F, 0x9B9F939B, 0x9BA0A79A, 0x7469A0A6,
+ 0x090B056E, 0x01000100, 0x00000101, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000100, 0x01000001, 0x2C2B2700,
+ 0x7977746C, 0x83788884, 0x89867887, 0x70807F71,
+ 0x82748080, 0x81807283, 0x79838176, 0x84798684,
+ 0x83817688, 0x74878779, 0x82778282, 0x86867A84,
+ 0x7A858577, 0x86788888, 0x85857786, 0x7A868479,
+ 0x84798883, 0x87847688, 0x758C897B, 0x897B8784,
+ 0x8B887A8C, 0x75828173, 0x83788483, 0x86847987,
+ 0x7986867A, 0x83778585, 0x83837781, 0x76868479,
+ 0x81768381, 0x807E7383, 0x6F7E7E72, 0x7F737B7B,
+ 0x8282767F, 0x737B7B6F, 0x80767E7D, 0x81807681,
+ 0x777C7D73, 0x80768281, 0x7D7B7181, 0x727D7B71,
+ 0x80767E7C, 0x7A796F82, 0x727E7C72, 0x796E7E7C,
+ 0x7D7B707B, 0x6C78786C, 0x786E7878, 0x79796D79,
+ 0x6E7B796E, 0x7C727B79, 0x7A796F7E, 0x6C77756D,
+ 0x766C7475, 0x767A6F75, 0x68727468, 0x74697274,
+ 0x6D716670, 0x686E7267, 0x71676F73, 0x68695F70,
+ 0x56686960, 0x5D545E5F, 0x5D5E555C, 0x52585852,
+ 0x4F495858, 0x4F50474F, 0x40484940, 0x48424849,
+ 0x48474348, 0x42474440, 0x433F4743, 0x47443F46,
+ 0x3F494A41, 0x59504849, 0x58595058, 0x54595C53,
+ 0x5D545A5D, 0x5A5C565C, 0x53545853, 0x57555258,
+ 0x52585354, 0x58565D58, 0x5D58565D, 0x5A5E5957,
+ 0x5D5B5E5C, 0x5F5D5C5F, 0x5C5D595C, 0x5E4E504A,
+ 0x645E6464, 0x64645E64, 0x5B605F5B, 0x4C48605F,
+ 0x4F4C474F, 0x40484940, 0x483F4849, 0x46484247,
+ 0x4A42433F, 0x44434D4B, 0x47434246, 0x464D4948,
+ 0x49484D4A, 0x54534F4B, 0x54565753, 0x56525758,
+ 0x62645E55, 0x605E6158, 0x6C61676B, 0x686B6268,
+ 0x63696963, 0x706B6A67, 0x6B686373, 0x646C6D64,
+ 0x71686C6D, 0x70716870, 0x6A6E6F66, 0x72697273,
+ 0x6E6F6671, 0x6C737169, 0x736E7674, 0x73706B76,
+ 0x69707168, 0x70687172, 0x75736B72, 0x6B7B7971,
+ 0x70687573, 0x7B797172, 0x6A73746B, 0x746B7273,
+ 0x70716873, 0x6D73746B, 0x79707576, 0x77786F78,
+ 0x6F74756C, 0x77717778, 0x78797077, 0x6C787970,
+ 0x79707576, 0x75766D78, 0x6875766D, 0x756C7071,
+ 0x7B7C7374, 0x70787970, 0x7D747879, 0x7C7D747C,
+ 0x70787970, 0x7A717679, 0x77786F79, 0x737B7C73,
+ 0x7E757B7C, 0x7B7C737D, 0x76777771, 0x7D777C7C,
+ 0x7D7F797D, 0x737B7C73, 0x7C737B7C, 0x7C7D747B,
+ 0x767D7E75, 0x78727E7F, 0x78787278, 0x78787773,
+ 0x7A747D7C, 0x7878727A, 0x73787773, 0x77737A77,
+ 0x7976717A, 0x71777771, 0x7970797A, 0x55554F78,
+ 0x00000100, 0x00000000, 0x00000000, 0x01000000,
+ 0x01010101, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000102,
+ 0x00010000, 0x00000100, 0x02000001, 0x00010001,
+ 0x00000100, 0x02000001, 0x00010001, 0x04080A04,
+ 0x362D0A0A, 0x36372E35, 0x195B5853, 0x0100201D,
+ 0x02000002, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000102, 0x01020000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x01020000,
+ 0x00020000, 0x00000301, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x02000002, 0x00010200, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000100, 0x01010001, 0x00000001,
+ 0x00000000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00010001, 0x00000100,
+ 0x00040000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x080A0808, 0xB0A9090A,
+ 0xA8B1A7A9, 0xA7A8B0A6, 0xB0A7A9B1, 0xAAAFA6AB,
+ 0xA4ACB0A5, 0xB0A5ABAF, 0xACB0A5AC, 0xA5A9AEA5,
+ 0xADA3A7AF, 0xA5ADA3A5, 0xA8AAAEA8, 0xAEA8ACAE,
+ 0xAAAEA8AC, 0xA5A5ADA3, 0xAFA5A7AF, 0xA6AFA5A6,
+ 0xA5A7AFA5, 0xB0A7A7AF, 0xA8ADA4AB, 0xA4A6ACA1,
+ 0xAFA4A9AF, 0xA7ADA2A9, 0xA1A9ADA2, 0xADA1A8AC,
+ 0xABAFA3A9, 0xA3A9ADA2, 0xADA1AAAE, 0xA8AA9EAB,
+ 0x9FA3A899, 0xACA0A9AE, 0xA4A89CA8, 0x9AA5A79B,
+ 0xA89CA4A6, 0xA3A79BA4, 0x99A0A798, 0xAD9D9FA9,
+ 0xA2AC9CA3, 0xA29DA495, 0xBCB0AAB1, 0xADB1A5B8,
+ 0xA2AAAD9E, 0xAC9DAEB1, 0xA8AD9EA7, 0xA0A8AFA0,
+ 0xAEA2A8AF, 0xA8ACA0AA, 0xA2A6AA9E, 0xAB9CAAAE,
+ 0xA6AB9CA6, 0x97A9ADA1, 0xA4989FA3, 0xA8ACA0A0,
+ 0x9BAAAD9E, 0xA99DA5A7, 0xA5A99EA5, 0x9C9FA397,
+ 0xA99AA4A8, 0xA5AA9BA4, 0x9CA0A498, 0xACA0A3A7,
+ 0xA5A99DA8, 0x97A1A599, 0xA59A9FA3, 0xA0A69B9F,
+ 0x9699A196, 0xA09698A2, 0x9BA19698, 0x959CA095,
+ 0xA2969DA1, 0x9A9E92A0, 0x69A0A69B, 0x0D046E74,
+ 0x080C0608, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x2A260001, 0x81817B29,
+ 0x7986847A, 0x84798884, 0x87847688, 0x76848375,
+ 0x867A8484, 0x86867A86, 0x76838176, 0x84798381,
+ 0x86847986, 0x7A848478, 0x857B8686, 0x7F7F7386,
+ 0x79858577, 0x85758787, 0x85857784, 0x7C89877C,
+ 0x877C8987, 0x86857789, 0x75858476, 0x897B8585,
+ 0x8B887A8C, 0x71848375, 0x83757F7F, 0x84837584,
+ 0x78838375, 0x86788686, 0x83837586, 0x79858378,
+ 0x81768684, 0x83817683, 0x79817F74, 0x81768684,
+ 0x7F7F7383, 0x73828177, 0x7A707C7D, 0x7C7D7379,
+ 0x727E7E72, 0x7E727E7E, 0x7E7E727E, 0x6F7D7C72,
+ 0x80767B79, 0x7E7C7282, 0x717C7A6F, 0x796E7E7C,
+ 0x7E7C717B, 0x6F7A7A6E, 0x786C7D7D, 0x78786C78,
+ 0x6B77776B, 0x776B7777, 0x76776D77, 0x70787970,
+ 0x766D7879, 0x75766C75, 0x64727468, 0x6F656E70,
+ 0x6D6E656E, 0x6068695F, 0x695E696A, 0x61625865,
+ 0x555D5E54, 0x534B5F5D, 0x4A474255, 0x40484541,
+ 0x44404744, 0x46433E47, 0x4149473F, 0x49404B49,
+ 0x47474148, 0x4E52514D, 0x514D5352, 0x60605A52,
+ 0x5F686960, 0x69606869, 0x66686268, 0x6C6E726C,
+ 0x736A6C73, 0x6C746A6E, 0x6C6C746D, 0x736E6B73,
+ 0x6D746D6D, 0x81808881, 0x88818088, 0x81888181,
+ 0x81818782, 0x87828086, 0x81878281, 0x73747873,
+ 0x77737677, 0x76777376, 0x6D70716D, 0x5F5B7071,
+ 0x605F5B60, 0x51555751, 0x47415557, 0x44484345,
+ 0x4B4A4D4B, 0x44424A4D, 0x45434243, 0x40433F3E,
+ 0x40404541, 0x413F3E42, 0x454A4945, 0x49454A49,
+ 0x5857534A, 0x4F575751, 0x61585758, 0x60605A60,
+ 0x5E65625E, 0x69636562, 0x696A6169, 0x6367685F,
+ 0x6D646B6C, 0x6D6E656C, 0x686E6F65, 0x71697172,
+ 0x706E6673, 0x6B73706B, 0x6C677370, 0x726F6A70,
+ 0x67707168, 0x71687071, 0x73746B70, 0x7179776F,
+ 0x736E7B79, 0x76736E76, 0x6D76776E, 0x71687576,
+ 0x70716870, 0x7075766D, 0x786F7879, 0x75766D77,
+ 0x7079786E, 0x786F7B7A, 0x77786F77, 0x6F75766D,
+ 0x79707778, 0x78797078, 0x6C75766D, 0x756C7475,
+ 0x75766D74, 0x737A7B72, 0x796F7B7C, 0x78796F7A,
+ 0x70787970, 0x746C7879, 0x79776F76, 0x75787970,
+ 0x82797D7E, 0x7B7C7381, 0x787D7B73, 0x7E758081,
+ 0x7C7D747D, 0x737B7C73, 0x7C737B7C, 0x77786F7B,
+ 0x727E7F76, 0x786F7A7B, 0x77777175, 0x78787773,
+ 0x77737F7C, 0x7A79757A, 0x72787773, 0x79757776,
+ 0x7979737A, 0x70767872, 0x79707679, 0x78787278,
+ 0x00262725, 0x00000000, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000000, 0x00000100, 0x00000001,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x01010000, 0x00000001, 0x01000000,
+ 0x00010101, 0x01010100, 0x00010200, 0x00000001,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000200, 0x00020000, 0x5936372E,
+ 0x65596463, 0x64635965, 0x35585950, 0x01003B3B,
+ 0x00000000, 0x01000000, 0x01000101, 0x00010000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000001, 0x00010002, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000102, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000102, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000100, 0x00010001, 0x00000100,
+ 0x00040000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x080B0909, 0xAFAA0808,
+ 0xA9B0A9AB, 0xA7A8B0A6, 0xB0A6A9B1, 0xAAAFA6A8,
+ 0xA6ACAFA6, 0xB0A5AFB0, 0xACB0A5AC, 0xA3AAAFA6,
+ 0xACA3A7AC, 0xA7ACA3A7, 0xA7AAAFA6, 0xAEA8ADB0,
+ 0xAAAFA6AC, 0xA5A8ADA4, 0xAFA5A7AF, 0xA6AFA5A7,
+ 0xA3A5ADA3, 0xACA3A5AD, 0xA7ACA3A7, 0xA2A9ADA2,
+ 0xADA2A9AD, 0xA7ADA2A7, 0xA2AAAEA3, 0xAB9FA9AD,
+ 0xA8ACA0A7, 0xA3A4AA9F, 0xAEA2AAAE, 0xA6AA9EAA,
+ 0x99A3A899, 0xA79BA3A8, 0xA0A498A3, 0x9BA5A79B,
+ 0xA79BA5A7, 0xA5A99DA3, 0x9CA3AA9B, 0xAC9CA2AC,
+ 0xA4AB9CA2, 0xA29DA495, 0x968AACB1, 0x9FA49592,
+ 0x9EB4B9AA, 0xAD9EA8AD, 0xACB1A2A8, 0xA0A8AFA0,
+ 0xACA0A8AF, 0xA8ACA0A8, 0xA0AAAEA2, 0xAA9EAAAF,
+ 0xA6AA9EA6, 0x98A8ACA0, 0xA498A0A4, 0xA8ACA0A0,
+ 0x9AA6A99A, 0xACA0A4A6, 0xA3A79CA8, 0x9DA3A79B,
+ 0xAB9CA5A9, 0xA3A79BA6, 0x9EA1A79C, 0xA99EA3A9,
+ 0xA0A498A5, 0x999FA397, 0xA398A1A5, 0x9CA2979F,
+ 0x9899A196, 0xA3989AA4, 0x9DA3989B, 0x95A0A499,
+ 0xA1959DA1, 0x9DA1969D, 0x05A3A69D, 0x0C06070B,
+ 0x090D0808, 0x00000100, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x55510001, 0x80807A54,
+ 0x7986847A, 0x84798684, 0x86847988, 0x76838377,
+ 0x84788282, 0x8A8A7E84, 0x76868479, 0x84798381,
+ 0x82807586, 0x7A838377, 0x867A8686, 0x83837786,
+ 0x77858476, 0x86768685, 0x86867885, 0x7A8A897B,
+ 0x897D8988, 0x87877989, 0x79868577, 0x87798989,
+ 0x89887A8A, 0x71868577, 0x7F717F7F, 0x86857780,
+ 0x75848375, 0x83758483, 0x84837584, 0x73838176,
+ 0x8176807E, 0x83817683, 0x79838176, 0x84798684,
+ 0x84827786, 0x77828177, 0x7D738081, 0x77766C7E,
+ 0x6F7B7B6F, 0x7E72797B, 0x77776B7E, 0x767A796F,
+ 0x80768180, 0x7E7C7282, 0x717A7A6E, 0x7A6E7D7D,
+ 0x7474687A, 0x6C76786C, 0x7A6E7678, 0x79796D7A,
+ 0x6C77776B, 0x796F7576, 0x72736978, 0x68707167,
+ 0x71687071, 0x70716770, 0x64727369, 0x6C626E70,
+ 0x696A616B, 0x57616258, 0x63586061, 0x5A5B515F,
+ 0x3F55544A, 0x48404947, 0x4B48434A, 0x4046433F,
+ 0x433F4744, 0x47443F46, 0x53474741, 0x645E5B5C,
+ 0x62645E64, 0x666A6B67, 0x6B67676B, 0x6B6D676A,
+ 0x70767970, 0x79707679, 0x74787276, 0x81818881,
+ 0x88818088, 0x81897F81, 0x87889187, 0x8F898991,
+ 0x8A8E888B, 0x81818982, 0x88818088, 0x81888181,
+ 0x81808881, 0x87828088, 0x80878280, 0x87888C87,
+ 0x8B87888C, 0x8A8B878A, 0x7E818580, 0x83817F83,
+ 0x82837F82, 0x6E72746E, 0x746F7074, 0x5F656070,
+ 0x535B615C, 0x57555258, 0x56575554, 0x52545251,
+ 0x49495452, 0x42403F4B, 0x383D3C38, 0x49453D3C,
+ 0x4B4A464A, 0x474D4D47, 0x4D474D4D, 0x5757514D,
+ 0x5D5F5C58, 0x645B6562, 0x63645B63, 0x656B6C63,
+ 0x6C636D6E, 0x6869606B, 0x636A6B62, 0x69636B6C,
+ 0x6C696469, 0x6C6F6C67, 0x6C677471, 0x74726A70,
+ 0x67727068, 0x746B7071, 0x70716873, 0x686F6D65,
+ 0x716C7270, 0x76736E74, 0x6875766D, 0x71687071,
+ 0x75766D70, 0x6B75766D, 0x71687374, 0x75766D70,
+ 0x6F7A796F, 0x79707A79, 0x7A7B7278, 0x6D73746B,
+ 0x79707576, 0x78796F78, 0x7275766D, 0x7C737B7C,
+ 0x8081787B, 0x707B7C73, 0x7A707879, 0x7A796F7B,
+ 0x70787970, 0x78707879, 0x7A78707A, 0x73787970,
+ 0x81787B7C, 0x78797080, 0x757D7B73, 0x7E757F7D,
+ 0x7D7E757D, 0x737D7E75, 0x7D747B7C, 0x7B7C737C,
+ 0x707B7C73, 0x79707879, 0x797A7176, 0x75777672,
+ 0x7C787C79, 0x7B7A767F, 0x70797874, 0x74707574,
+ 0x76777373, 0x70797973, 0x79707879, 0x78787278,
+ 0x27767775, 0x00002727, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000003, 0x00000000,
+ 0x00000002, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000001, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000000, 0x00000001, 0x00010000,
+ 0x00020000, 0x524C0201, 0x7A7B7152, 0x818F8F83,
+ 0x8F818F8F, 0x6464588F, 0x3358594F, 0x01003B3C,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010002, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x01010100,
+ 0x00000001, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000002, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000000, 0x00000100,
+ 0x00000000, 0x00020000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000100,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07060507, 0x40400605,
+ 0xB4B8B340, 0xA5A7AEA7, 0xAFA5A7AF, 0xA7AFA5A7,
+ 0xA3A9ACA3, 0xADA4ABAC, 0xABACA3AC, 0xA3A9ACA3,
+ 0xACA3A9AC, 0xA8ADA4A9, 0xA2A7ACA3, 0xB0A7A7AD,
+ 0xABB1A6AB, 0xA2A6ACA1, 0xAFA5A5AD, 0xA9B1A7A7,
+ 0xA2A7ADA2, 0xADA2A7AD, 0xA7ADA2A5, 0xA2A9ADA2,
+ 0xADA2A9AD, 0xA7ADA2A7, 0xA0A9ADA1, 0xACA1A8AC,
+ 0xA7ABA0A8, 0xA1A8ACA1, 0xA89CA8AC, 0xA3A79BA4,
+ 0x9BA3A79B, 0xAA9DA1A8, 0xA2A99CA3, 0x9DA5A99D,
+ 0xA99DA5A9, 0xA5A99DA7, 0x9DA3AA9D, 0xAC9FA3AA,
+ 0xA3A79BA5, 0x959FA495, 0xA495A1A4, 0x727768A1,
+ 0xA2A8AFA2, 0xAE9FA8AF, 0xA8B09FA7, 0x9EAAAFA0,
+ 0xAB9CA8AD, 0xA7AC9DA6, 0x9CA9B0A1, 0xA99DA6AB,
+ 0xACAEA2A5, 0x9CAAACA0, 0xACA0A8AB, 0xA8ACA0A8,
+ 0xA0A3A79B, 0xAA9EA8AC, 0x9FA397A6, 0xA1A6ADA0,
+ 0xA79BA7AE, 0x9EA598A3, 0x9FA1A99E, 0xA297A2AA,
+ 0xA1A59A9C, 0x99A4A59B, 0xA299A0A4, 0xA0A39A9F,
+ 0x999EA499, 0xA4999EA4, 0xA0A4999E, 0x99A0A499,
+ 0xA397A0A4, 0xA0A4999F, 0x00464743, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000000, 0x2D0D0C08, 0x7F793333, 0x80807A7F,
+ 0x77838278, 0x83788281, 0x86847985, 0x76848478,
+ 0x84788082, 0x82827684, 0x7A818076, 0x80758584,
+ 0x817F7482, 0x797E7E70, 0x84768787, 0x88877984,
+ 0x75858476, 0x887A8585, 0x85847689, 0x7989887A,
+ 0x84768989, 0x807F7185, 0x7A88887A, 0x86788888,
+ 0x88877987, 0x75858575, 0x80728585, 0x83807283,
+ 0x79888479, 0x84798884, 0x89857A8A, 0x75828173,
+ 0x81738383, 0x807E7382, 0x75868479, 0x81738280,
+ 0x7E7C7182, 0x727D7C72, 0x847A7D7C, 0x82807586,
+ 0x717C7E72, 0x8074797D, 0x7E80747E, 0x71828177,
+ 0x82767C7B, 0x7D7D7182, 0x7176776D, 0x746A7A7B,
+ 0x70716773, 0x6E78796F, 0x746A7778, 0x7A796F75,
+ 0x707A796F, 0x71687A78, 0x68696070, 0x5D67665C,
+ 0x6F676867, 0x70716771, 0x606A6B61, 0x6258686C,
+ 0x61625861, 0x4A5E5F56, 0x554C5253, 0x48494054,
+ 0x3F4A4840, 0x48404947, 0x49473F4A, 0x4A50504A,
+ 0x504A5050, 0x67676150, 0x67696B65, 0x6B676B6D,
+ 0x6A6B676A, 0x77787C77, 0x7C77767C, 0x898D8778,
+ 0x878B9087, 0x8F868B90, 0x959C958A, 0x96969D96,
+ 0x9D96969D, 0x9FA79D96, 0x999EA39A, 0xA39A9EA4,
+ 0x9EA39AA0, 0x9E9EA59E, 0xA59E9EA5, 0xA6ADA69E,
+ 0xA1A1A8A1, 0xA8A3A0A8, 0xA0A7A2A1, 0x9A9CA09A,
+ 0x9F999EA0, 0x9CA09A9B, 0x97969997, 0x97979699,
+ 0x98999797, 0x898B8F8A, 0x90898990, 0x88908989,
+ 0x7C7B837C, 0x6F6A7B83, 0x686E6968, 0x576B6F6A,
+ 0x58565859, 0x58595757, 0x40575854, 0x443F4344,
+ 0x40443F40, 0x3F42433F, 0x433F4243, 0x42433F42,
+ 0x4B4B4B45, 0x59515350, 0x5A58505B, 0x5F67645F,
+ 0x645F6764, 0x67645F67, 0x676A6C66, 0x6B696A6B,
+ 0x6867636A, 0x666C6B67, 0x69616E6B, 0x7270686C,
+ 0x686F6D65, 0x71687071, 0x6B6C6370, 0x6B73706B,
+ 0x706B7370, 0x73706B73, 0x6A70706A, 0x736D7070,
+ 0x71716B73, 0x68727068, 0x746A7270, 0x77786E73,
+ 0x70787970, 0x796F7879, 0x75766C78, 0x6E74776E,
+ 0x786E7477, 0x76786C77, 0x6D79786E, 0x7C727979,
+ 0x7C7B717D, 0x6E7A7B71, 0x79707778, 0x7A7B7278,
+ 0x73787970, 0x78727B7C, 0x7D7D7778, 0x737D7E75,
+ 0x796F7B7C, 0x7B7C7278, 0x757D7E75, 0x7E757D7E,
+ 0x7D7E757D, 0x757B7C73, 0x7E757D7E, 0x7C7D747D,
+ 0x737B7C73, 0x7C737B7C, 0x797A717B, 0x73787773,
+ 0x78777877, 0x7573727A, 0x73787773, 0x77737677,
+ 0x78777378, 0x737A7773, 0x7A767A77, 0x7C79757D,
+ 0x517B7978, 0x05075151, 0x08050708, 0x00010101,
+ 0x01000000, 0x00010000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000100, 0x00000001, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00030100,
+ 0x00000200, 0x00000000, 0x00000301, 0x03000004,
+ 0x02030002, 0x05080907, 0x08070809, 0x34312D0C,
+ 0x7C615F57, 0x877B8786, 0x87877B87, 0x79888779,
+ 0x87798887, 0x76756788, 0x3B67675B, 0x01004445,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00010000, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x01010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x06060509, 0x40400504,
+ 0xB5B6B440, 0xA3A9ADA7, 0xB0A6A5AD, 0xA7AFA5A8,
+ 0xA3A8AAA4, 0xADA4ABAC, 0xABACA2AC, 0xA3ACADA4,
+ 0xA79EABAC, 0xA4A89DA4, 0xA1A4AA9F, 0xACA1A7AE,
+ 0xA7ADA2A6, 0xA2A7ADA2, 0xAEA5A7AD, 0xA7ACA3A9,
+ 0xA2A7ADA2, 0xADA2A7AD, 0xA6ACA1A7, 0xA2A9ADA2,
+ 0xACA1A9AD, 0xA7AEA1A6, 0xA0A8ACA0, 0xADA2A8AC,
+ 0xA6AA9FA9, 0x9FA5A99E, 0xACA0A6AA, 0xA8ACA0A8,
+ 0x9DA3AA9D, 0xA99CA3AA, 0xA4AB9EA2, 0x9DA5A99D,
+ 0xA99DA5A9, 0xA5A79BA7, 0x9DA4A89C, 0xA79BA3AA,
+ 0xA0A498A3, 0x95A1A495, 0xBBACA1A4, 0xB5BAABB8,
+ 0xA24E5548, 0xAFA0A8AF, 0xA8B09FA8, 0x98A8AD9E,
+ 0xAD9EA2A7, 0xAAAFA0A8, 0x9CA5AA9B, 0xAEA2A6AB,
+ 0xACAEA2AA, 0x9DA8AA9E, 0xADA1A9AC, 0xA3A79BA9,
+ 0x9EA8ACA0, 0xA397A6AA, 0xA3A79B9F, 0x9DA1A89B,
+ 0xA498A3AA, 0xA2A99CA0, 0x969DA59A, 0xA59A99A1,
+ 0xA1A59A9F, 0x9AA2A399, 0xA59CA0A3, 0xA1A49BA2,
+ 0x97A0A39A, 0xA2979EA2, 0x9CA0959E, 0x99A0A499,
+ 0xA499A0A4, 0x6F746B9E, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x7A33322E, 0x807A827F, 0x80817880,
+ 0x78828379, 0x877C8284, 0x88867B89, 0x79828177,
+ 0x81758283, 0x85857981, 0x7A85847A, 0x84798584,
+ 0x81817586, 0x79838377, 0x82748787, 0x88877983,
+ 0x758A8A7A, 0x84768585, 0x807F7185, 0x75808070,
+ 0x8E7E8585, 0x8A8A7A8E, 0x79888779, 0x85778887,
+ 0x88877986, 0x78888878, 0x84768888, 0x87847687,
+ 0x79858176, 0x857A8884, 0x8884798B, 0x77807F71,
+ 0x83758585, 0x84837584, 0x75828075, 0x80758280,
+ 0x82807582, 0x6F818175, 0x847A7B79, 0x86847A86,
+ 0x71797B6F, 0x7E72797D, 0x7B7F737A, 0x647A7B71,
+ 0x75696F6E, 0x7C7C7075, 0x707A7C70, 0x786D777B,
+ 0x71746B74, 0x6B73746B, 0x756B7374, 0x74736976,
+ 0x70727068, 0x685F7A78, 0x60615867, 0x5D5F5D53,
+ 0x675D6967, 0x68675D68, 0x57616258, 0x594F5E62,
+ 0x57584F58, 0x4C52534A, 0x49405455, 0x48494048,
+ 0x40484940, 0x473F4849, 0x595A5149, 0x6265685F,
+ 0x67616668, 0x65676167, 0x7A686C67, 0x817C7B7F,
+ 0x7C807B7D, 0x88878D88, 0x8D88878D, 0x979E9787,
+ 0x9E959D93, 0xA89EA0A8, 0xA0A89EA0, 0xA9A8AFA8,
+ 0xAFA8A8AE, 0xB1B8B1A8, 0xA7ACB1A8, 0xB2A7ACB2,
+ 0xACB1A8AC, 0xB1B1B8B1, 0xB2ABB1B8, 0xB1B8B1AB,
+ 0xACB1B8B1, 0xB4ADABB3, 0xABB3ACAC, 0xA8ABB0A7,
+ 0xB0A7ACB1, 0xAAAEA8AB, 0xA8A8ABA9, 0xAAAAA7AA,
+ 0xA1A2A0AA, 0x9E9EA59E, 0x9B949DA5, 0x939B9493,
+ 0x8E8B968E, 0x958E8B96, 0x7B837C8D, 0x7D7D837E,
+ 0x6F6A7E82, 0x6A6E696B, 0x54555954, 0x59545559,
+ 0x3E443F53, 0x3F40443F, 0x443F4044, 0x42433F40,
+ 0x45464640, 0x49444D4A, 0x53504B4C, 0x555D5A55,
+ 0x59555D5A, 0x6764605C, 0x67656662, 0x68666A6B,
+ 0x66676567, 0x6365655F, 0x6C646B68, 0x6E6C646F,
+ 0x69727068, 0x71687172, 0x70716870, 0x6F73706B,
+ 0x706B7774, 0x73706B73, 0x6B73736D, 0x726C7171,
+ 0x70706A72, 0x68716F67, 0x746A7270, 0x73746A75,
+ 0x6F787970, 0x766D7778, 0x78797075, 0x6D777A71,
+ 0x73697478, 0x797A7072, 0x717D7D71, 0x7D717D7D,
+ 0x79796D7D, 0x7077786E, 0x796F797A, 0x7B7C7378,
+ 0x737F8077, 0x78727B7C, 0x78787278, 0x717B7C73,
+ 0x7C72797A, 0x7D7E747B, 0x737D7E75, 0x7A717B7C,
+ 0x7B7C7379, 0x707C7D74, 0x7C737879, 0x7C7D747B,
+ 0x707E7F76, 0x7C737879, 0x77786F7B, 0x73787773,
+ 0x77767877, 0x77767279, 0x75757672, 0x76727879,
+ 0x78777377, 0x777B7675, 0x78757D78, 0x7A77737D,
+ 0x787A7878, 0x2B2D7878, 0x0805072E, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000100, 0x00000001, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x03010102, 0x00020000,
+ 0x00000301, 0x00010000, 0x00000300, 0x04000004,
+ 0x04040002, 0x2B0A0A04, 0x827D3131, 0x86837B86,
+ 0x7988867B, 0x87798887, 0x88887888, 0x6F888878,
+ 0x7F717F7F, 0x76756782, 0x3B676759, 0x01004445,
+ 0x00000002, 0x01000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x01010100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07060509, 0x41410605,
+ 0xB5B6B241, 0xA4A9ADA7, 0xAFA5A6AE, 0xA9AEA5A7,
+ 0xA4A9ACA3, 0xA89DACAD, 0xA4A89CA4, 0x99A0A499,
+ 0xA499A0A4, 0xA4A89DA0, 0xA0A6AA9E, 0xAA9EAAAF,
+ 0xA6AA9EA6, 0xA2A8ACA0, 0xACA3A9AD, 0xA6ABA2A9,
+ 0xA1A7ADA2, 0xACA3A6AC, 0xA8ABA2A9, 0xA2A9ADA2,
+ 0xAA9EA7AD, 0xA6AA9EA6, 0xA0A7AB9F, 0xABA0A8AC,
+ 0xA9ADA2A7, 0xA0A5A99D, 0xACA0A8AC, 0xA8ACA0AA,
+ 0x9DA3AA9D, 0xAA9DA3AA, 0xA4AB9EA3, 0x9DA5A99D,
+ 0xAA9EA5A9, 0xA7A99DA8, 0x9BA5A99D, 0xA498A3A7,
+ 0xA2A69AA0, 0x96A1A495, 0xA494A4A4, 0xB9BCADA1,
+ 0x1A7D8175, 0xAFA21F25, 0xA8AFA0A8, 0x9EA6AC9B,
+ 0xAFA0ABAE, 0xAAAFA0AC, 0xA1A7AB9F, 0xAEA2A9AD,
+ 0xA6AA9EAA, 0xA1A4A89C, 0xA99DA9AD, 0xA7A99DA7,
+ 0x9BA8ACA0, 0xA79BA3A7, 0xA4A89CA3, 0x9CA5A99E,
+ 0xA79BA3A7, 0xA3A79BA3, 0x999CA396, 0xA5999FA6,
+ 0x9EA297A1, 0x9EA2A59C, 0xA49EA2A4, 0x9DA19BA2,
+ 0x979CA09A, 0x9E959BA0, 0x9EA2979B, 0x99A0A499,
+ 0xA49BA0A4, 0x12140EA1, 0x00000100, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x1A1B1900, 0x78595953, 0x81798081, 0x82817783,
+ 0x78808276, 0x80758284, 0x83817782, 0x7C848379,
+ 0x84798786, 0x88867B86, 0x7B85847A, 0x847A8685,
+ 0x84837986, 0x777F7E74, 0x887A8383, 0x8B887A89,
+ 0x74858575, 0x87788686, 0x8989798A, 0x70858575,
+ 0x89797F80, 0x85857589, 0x79868577, 0x88788887,
+ 0x88887888, 0x788A8778, 0x7D6F8A87, 0x83807280,
+ 0x76868479, 0x81768381, 0x82807583, 0x6F818072,
+ 0x82747F7F, 0x807F7183, 0x78828075, 0x81758583,
+ 0x7E7E7281, 0x727D7B70, 0x78707E7C, 0x7D7B737B,
+ 0x707A7B71, 0x7D70787C, 0x777B6F76, 0x70808276,
+ 0x7C707C7C, 0x7575697C, 0x6F7A7C70, 0x7D71797B,
+ 0x76776D7B, 0x6B767970, 0x736A7174, 0x74756C72,
+ 0x7070706A, 0x72697879, 0x68695F71, 0x53605E54,
+ 0x675D5F5D, 0x5E5D5369, 0x5058594F, 0x59505859,
+ 0x50504A58, 0x42494943, 0x49404848, 0x53544B48,
+ 0x53585852, 0x59535759, 0x696B6559, 0x78646660,
+ 0x7C787B7C, 0x7B7C787D, 0x8D8D948D, 0x948D8C94,
+ 0x8D948D8D, 0x98989F98, 0xB0A9979F, 0xA9B0A9A8,
+ 0xA8A2A89D, 0xB4A9ADB3, 0xADB5ABAE, 0xB1A7AEA7,
+ 0xB8B1B0B8, 0xAFB7B0B0, 0xAFB0B8AE, 0xB2A8B1B9,
+ 0xAAB2A8AA, 0xABB0B8B1, 0xB2ABAAB2, 0xB0B8B1AA,
+ 0xAFB0B9AF, 0xB4AAB0B9, 0xABB4AAAB, 0xA5ABB0A7,
+ 0xB9AFAAB0, 0xB1B8B1B1, 0xAFB0B4AF, 0xB3B1B0B4,
+ 0xA8ACA7B0, 0xA8A8B0A9, 0xB0A9A7B2, 0x9DA59EA8,
+ 0xA19EA9A1, 0xA6A19EA9, 0x8E95909F, 0x91909891,
+ 0x847D9198, 0x7D837E7D, 0x6A80847F, 0x6F6A6B6F,
+ 0x6B6F6A6B, 0x4B596059, 0x514C4B52, 0x4344404D,
+ 0x40474440, 0x44404843, 0x4C494447, 0x4854514C,
+ 0x5B565250, 0x5B5B555E, 0x5D63635D, 0x615D6261,
+ 0x61605C62, 0x6167645F, 0x6C646B69, 0x6E6C646F,
+ 0x646F6D65, 0x71686C6D, 0x70716870, 0x6975766D,
+ 0x6C677172, 0x73706B6F, 0x6A71716B, 0x726D7070,
+ 0x73706B75, 0x68727068, 0x786E7270, 0x7D7C7279,
+ 0x6C787970, 0x756C7275, 0x78797074, 0x6D75786F,
+ 0x776E7478, 0x7B797176, 0x727B7C72, 0x7D717B7C,
+ 0x79796D7D, 0x6F77786E, 0x7A6F7879, 0x787C7176,
+ 0x737B7C73, 0x786F7B7C, 0x78797077, 0x6F787970,
+ 0x7B727778, 0x76797078, 0x73787970, 0x7C737B7C,
+ 0x7B7C737B, 0x707C7D74, 0x786F7879, 0x7C7D7477,
+ 0x78828078, 0x7C738280, 0x7879707B, 0x7076736F,
+ 0x77737774, 0x7A797578, 0x72787773, 0x7A747878,
+ 0x7878727A, 0x73787370, 0x76737B76, 0x7A77737B,
+ 0x797A7878, 0x77797979, 0x2D2A2C7A, 0x01000000,
+ 0x00000101, 0x00000000, 0x00020000, 0x00000200,
+ 0x02000002, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01010002, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x02000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00020300, 0x342C0404,
+ 0x65645A36, 0x7A85847A, 0x847A8684, 0x86847A86,
+ 0x78888779, 0x88788788, 0x89897988, 0x708A8778,
+ 0x8072827F, 0x75746683, 0x3B676759, 0x01004445,
+ 0x02000002, 0x01020001, 0x00000200, 0x00010000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000100, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000001, 0x00000000, 0x01010002,
+ 0x00010000, 0x00000100, 0x00000000, 0x01010000,
+ 0x00000001, 0x01020000, 0x00010301, 0x02000102,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x02000002,
+ 0x01000000, 0x00000101, 0x01010100, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07060507, 0x06060605,
+ 0xB5B6B206, 0xA3AAAEA8, 0xADA3A7AC, 0xAAAFA6A5,
+ 0x9CA9ACA3, 0xA499A3A7, 0x9FA397A0, 0x98A0A498,
+ 0xA99EA0A4, 0xA9ADA1A5, 0x9FA9ADA1, 0xAB9CA9AE,
+ 0xA3A899A6, 0xA1A8ACA0, 0xACA1A8AC, 0xA7ACA3A8,
+ 0xA1A7ADA2, 0xACA3A6AC, 0xA8ABA2A9, 0xA3A7ADA2,
+ 0xAA9EA8AE, 0xA6AA9EA6, 0xA0A5ABA0, 0xABA0A5AB,
+ 0xA5ABA0A5, 0x9CA5A99E, 0xAA9FA3A7, 0xA5A99EA6,
+ 0x9DA3A79C, 0xA99EA3AA, 0xA3AA9DA3, 0x9DA3AA9D,
+ 0xA79BA5A9, 0xA3A79BA3, 0x999EA499, 0xA5989FA6,
+ 0xA0A4989E, 0x95A1A397, 0xA495A1A4, 0xA1A495A1,
+ 0x49AAAEA2, 0x251A5054, 0xA8AEA31F, 0x9CAAAFA0,
+ 0xAD9EA9AC, 0xA7AB9FAA, 0xA3A5A99D, 0xAA9EAAAE,
+ 0xA7AB9FA6, 0x9DA8ACA0, 0xA397A5A9, 0xA3A79BA1,
+ 0x9BA3A79B, 0xA99DA3A7, 0xA5A99DA5, 0x9C9FA398,
+ 0xA99EA3A7, 0xA3A79BA5, 0x99A3AA9D, 0xA3969FA6,
+ 0x9FA59A9C, 0x9FA0A59C, 0xA29CA1A5, 0x9CA09A9E,
+ 0x989A9E98, 0xA2999A9E, 0x9C9F969F, 0x9AA0A499,
+ 0x423CA0A3, 0x12130F40, 0x00000100, 0x00000000,
+ 0x00000100, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000100, 0x00000000, 0x01000000,
+ 0x4F4E4A00, 0x7880807A, 0x80768182, 0x83837781,
+ 0x7B87877B, 0x85798787, 0x86857B85, 0x77828177,
+ 0x867A8383, 0x87877B86, 0x7685847A, 0x80768280,
+ 0x82807682, 0x6F7A796F, 0x82777A79, 0x84837584,
+ 0x75858575, 0x84758585, 0x85857587, 0x6F848476,
+ 0x7F717E7F, 0x85847680, 0x77868577, 0x86788685,
+ 0x87877787, 0x76827F71, 0x84768784, 0x84827787,
+ 0x70828276, 0x7F737A7C, 0x8282767D, 0x74808072,
+ 0x82748484, 0x82817383, 0x75828075, 0x7C728280,
+ 0x7A796F7D, 0x76838176, 0x79718280, 0x7D7B737B,
+ 0x707A7C70, 0x7C70787C, 0x7A7E7278, 0x697B7D71,
+ 0x7C707575, 0x7C7C707C, 0x667C7C6E, 0x72667474,
+ 0x73756972, 0x6B797A70, 0x6F667174, 0x6A6B626E,
+ 0x6870706A, 0x70677071, 0x68695F6F, 0x535E5D53,
+ 0x5E545F5D, 0x55544A60, 0x47505147, 0x51485051,
+ 0x4F504750, 0x4C484842, 0x5D575052, 0x6668625D,
+ 0x65696B65, 0x6B65676B, 0x787C7667, 0x8F797D77,
+ 0x948E9195, 0x92948E92, 0xA2A1A8A1, 0xA8A1A1A9,
+ 0xA2A9A2A1, 0xA9A9B0A9, 0xB0A9A8B0, 0xA9B1A7A8,
+ 0xA9AEB4A9, 0xB4A9AEB4, 0xAEB3AAAE, 0xB1B2B9B2,
+ 0xB7B0B0B8, 0xB1B9B2AF, 0xAFB0B9AF, 0xB9AFB0B9,
+ 0xAAB2A8B1, 0xB1B1B9B2, 0xB8B1B0B8, 0xB1B8B1B0,
+ 0xAFB1B9AF, 0xB8AEB1B9, 0xB1B9AFB0, 0xAEB3B9AE,
+ 0xB9AFB3B9, 0xB1B9AFB1, 0xAEB0B4AE, 0xB4AFB0B4,
+ 0xB0B4AEB0, 0xA6A8B0A9, 0xB1AAA7B0, 0xA8B0A9A9,
+ 0xA1A0A8A1, 0xA8A3A0A8, 0xA0A7A2A1, 0x91909891,
+ 0x99929098, 0x91989191, 0x7E7E847F, 0x847F7F83,
+ 0x80847F80, 0x67666D66, 0x5F5A676E, 0x5D5E5A5B,
+ 0x4051504C, 0x44404744, 0x47444047, 0x424A4742,
+ 0x47424A47, 0x53504B4A, 0x575D5D57, 0x615D5D5D,
+ 0x5E5E5862, 0x636E6B66, 0x68636B68, 0x6A67626C,
+ 0x636F6D65, 0x6E656B6C, 0x6D6E656D, 0x626E6F66,
+ 0x706B6C6A, 0x73706B73, 0x6D73736D, 0x6F6A7373,
+ 0x726F6A72, 0x6B727068, 0x786E7573, 0x79786E7A,
+ 0x6B727167, 0x7A717374, 0x78797079, 0x6D717268,
+ 0x79717677, 0x807E767B, 0x717C7D74, 0x81777A7B,
+ 0x7C7B7182, 0x7178796F, 0x7C717A7B, 0x787C7178,
+ 0x74787970, 0x79707C7D, 0x78797078, 0x73787970,
+ 0x79707B7C, 0x7B7C7376, 0x7077786F, 0x7C747879,
+ 0x7B7C737E, 0x747D7E75, 0x79707C7D, 0x7C7D7478,
+ 0x737F7D75, 0x7C737B7C, 0x7879707B, 0x737A7773,
+ 0x77737A77, 0x7A797578, 0x71787872, 0x78727777,
+ 0x78757078, 0x737D7875, 0x726F7B76, 0x7C797577,
+ 0x777A7877, 0x78787977, 0x5452527A, 0x000A0808,
+ 0x00010000, 0x00000100, 0x00020000, 0x00000200,
+ 0x02000002, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x02000000,
+ 0x00020000, 0x00000102, 0x00010002, 0x00020000,
+ 0x0A060200, 0x1C1B170B, 0x5B34342E, 0x958B6563,
+ 0x96948996, 0x76868479, 0x857A8584, 0x86847989,
+ 0x78888878, 0x88768788, 0x88887688, 0x79878777,
+ 0x7E6F8989, 0x6E6D5F81, 0x3B676759, 0x01004645,
+ 0x02000002, 0x01020001, 0x00000200, 0x00010000,
+ 0x00000000, 0x00010000, 0x01000200, 0x00000000,
+ 0x01010000, 0x01010101, 0x00020000, 0x00000200,
+ 0x01010102, 0x02050406, 0x03030202, 0x05060403,
+ 0x02010402, 0x05030104, 0x03030304, 0x04040404,
+ 0x04040404, 0x04040404, 0x02030303, 0x05030304,
+ 0x04050304, 0x04040503, 0x03030404, 0x04040405,
+ 0x05030303, 0x05050505, 0x05050505, 0x05050505,
+ 0x05050505, 0x05050505, 0x05060606, 0x05050505,
+ 0x05050505, 0x07080907, 0x09080809, 0x0809070B,
+ 0x08090909, 0x08080808, 0x08080808, 0x00040404,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00000000,
+ 0x9FA09C00, 0xA3AEB2AC, 0xAEA4A7AC, 0xA5ADA3A6,
+ 0x99A3A99E, 0xA4999EA4, 0xA0A499A0, 0x9BA3A79B,
+ 0xABA0A3A7, 0xA9ADA1A7, 0x9DA7A99D, 0xAA9EA7AC,
+ 0xA4AB9EA6, 0x9EA6ACA1, 0xABA0A3A9, 0xA6ACA1A5,
+ 0xA0A5ABA0, 0xABA0A3AB, 0xA5ABA0A5, 0xA0A3ABA0,
+ 0xAA9FA3AB, 0xA4A9A0A4, 0xA2A0A7A0, 0xA9A2A2A9,
+ 0xA1A99FA2, 0x9CA3A89F, 0xA89FA0A5, 0xA3A89FA3,
+ 0x9BA2A59C, 0xA59CA2A6, 0xA0A69BA0, 0x979FA59A,
+ 0xA2979AA2, 0x9DA59A9A, 0x9AA1A99F, 0xA59A9DA5,
+ 0x9FA6999D, 0x969EA598, 0xA293A0A5, 0xA0A5969D,
+ 0xA2AAAFA0, 0x1813A8AF, 0x11171212, 0xA0A8ABA2,
+ 0xADA1A8AC, 0xA7AB9FA9, 0x9DA8ACA0, 0xA79CA5A9,
+ 0xA8ACA1A3, 0x9EA6ADA0, 0xA89CA4AB, 0xA5A99DA4,
+ 0x9DA4A89C, 0xA99DA3AA, 0xA5A99DA5, 0x9A9EA297,
+ 0xA89DA1A5, 0xA2A89DA2, 0x98A0A79A, 0xA59A9EA5,
+ 0x9FA79D9D, 0x9C9EA59E, 0xA0999CA3, 0x9BA29B99,
+ 0x979CA198, 0xA0979BA0, 0x9DA0979B, 0x70AAADA4,
+ 0x07077676, 0x08060609, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x01020301, 0x2D290203,
+ 0x7E7E782E, 0x777F8077, 0x84788081, 0x87877B84,
+ 0x77858579, 0x867A8383, 0x84847886, 0x76828276,
+ 0x85798082, 0x85847A83, 0x74838278, 0x7F767F7C,
+ 0x85807784, 0x6F79776F, 0x83777879, 0x83837583,
+ 0x79858577, 0x87798787, 0x85847688, 0x78848478,
+ 0x85798686, 0x83837785, 0x747F7F73, 0x83788080,
+ 0x88857785, 0x75858176, 0x81768480, 0x83837783,
+ 0x7A83847A, 0x80758185, 0x7E80747C, 0x73818173,
+ 0x81758181, 0x84847881, 0x6F7E7E70, 0x7D737B7B,
+ 0x7E7D737E, 0x777D7C72, 0x786E8281, 0x76766A7A,
+ 0x6D7B7D71, 0x7D71797C, 0x7B7D717B, 0x6D7A7A6E,
+ 0x796F7979, 0x76766A7A, 0x68767567, 0x6F617776,
+ 0x75756970, 0x686F7066, 0x71677071, 0x6B6C6270,
+ 0x60686960, 0x69606869, 0x60615868, 0x4B5D5C52,
+ 0x4E445655, 0x4E4F454F, 0x3F4A4C40, 0x4C40474B,
+ 0x484C4148, 0x686A6C66, 0x6B67696D, 0x686C676A,
+ 0x797A817A, 0x93897980, 0x8C948A8B, 0x9F9BA097,
+ 0xA89FA3A8, 0xA4A79EA5, 0xA7A8B0A6, 0xB1A7A9B1,
+ 0xA8B0A6A9, 0xAEA9B0A9, 0xB5AEAEB5, 0xB4BBB4AE,
+ 0xB0B3BBB1, 0xBBB2B4B9, 0xB9BEB5B6, 0xB8B9C0B9,
+ 0xBFB8B8BF, 0xB8BFB8B8, 0xB7B6BEB4, 0xBEB4B9C1,
+ 0xB4BCB2B6, 0xB8B6BDB6, 0xBCB7B7BD, 0xB8BCB6B8,
+ 0xB2B8BDB4, 0xBBB2B6BB, 0xB6BBB2B6, 0xB4B8BBB2,
+ 0xBAB1BABD, 0xB6BBB2B5, 0xB2B8BBB2, 0xB8B2B8BB,
+ 0xB7B9B3B6, 0xB3B5BCB5, 0xB7B2B3BA, 0xB1B7B2B1,
+ 0xADADB4AD, 0xB4ADADB4, 0xA9B0A9AD, 0x9EA5ACA5,
+ 0xABA49EA5, 0x9EA59EA4, 0x98979E97, 0x948F989F,
+ 0x8E948F8E, 0x81808681, 0x78718086, 0x73777171,
+ 0x5C5F605C, 0x4B475F60, 0x4C4B474A, 0x41474440,
+ 0x43404845, 0x48434048, 0x4B4D4A45, 0x57525350,
+ 0x5956515A, 0x605D5A55, 0x63606764, 0x67646068,
+ 0x60696661, 0x69606869, 0x68696068, 0x676F6D65,
+ 0x6F67716F, 0x70716871, 0x65787970, 0x6F666D6E,
+ 0x6C6D646E, 0x7073746B, 0x736B7879, 0x76746A75,
+ 0x6D7A786E, 0x746A7977, 0x75746A75, 0x6C757369,
+ 0x7C727876, 0x7D7B737E, 0x707D7E75, 0x7E757879,
+ 0x7E7F767D, 0x747B7C73, 0x7D747C7D, 0x7879707C,
+ 0x75787970, 0x7D747D7E, 0x7B7C737C, 0x6F7D7E75,
+ 0x7A717778, 0x7B7C7379, 0x6D7A796F, 0x796F7877,
+ 0x78776D7B, 0x70787970, 0x7A717879, 0x78797079,
+ 0x6F787970, 0x79707778, 0x7B7C7378, 0x747A7773,
+ 0x7A767B78, 0x7978747B, 0x73797671, 0x77727B78,
+ 0x7B78737A, 0x78807B78, 0x7875807B, 0x7B76737D,
+ 0x777B7874, 0x77767C78, 0x7F7B7A7B, 0x004F4D4C,
+ 0x00010200, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00010101, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x02000000,
+ 0x00050302, 0x02010504, 0x05040006, 0x252F2C27,
+ 0x5F552F2D, 0x77766C60, 0x7C858579, 0x83798888,
+ 0x84827784, 0x78868479, 0x82748986, 0x84847483,
+ 0x77848474, 0x88788989, 0x88887888, 0x76888876,
+ 0x7E6C8789, 0x6A6B5B7E, 0x3B676759, 0x01004645,
+ 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x01000101, 0x00010000, 0x05080907, 0x2C280A09,
+ 0x4E4C4B2D, 0x30303030, 0x2F2F3030, 0x2E312F2F,
+ 0x29282C27, 0x302B2A2E, 0x282B292C, 0x29292A28,
+ 0x2B292A2B, 0x272A2828, 0x27282B29, 0x2C27282C,
+ 0x2B2F2A28, 0x29282C27, 0x3030282B, 0x2F2F2F30,
+ 0x2D2A2A2A, 0x30302E2F, 0x2F2F2F30, 0x302D2F2F,
+ 0x30302E30, 0x2E30302E, 0x302E3030, 0x312F2E30,
+ 0x3538362E, 0x42414540, 0x45414347, 0x48494544,
+ 0x4F50514F, 0x514F5051, 0x50514F50, 0x003D3E3C,
+ 0x01000102, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x01000000,
+ 0x9FA09C00, 0xA4AEB2AC, 0xAEA5A8AD, 0xA0A89EA9,
+ 0x9DA0A89D, 0xA499A0A8, 0xA0A4999E, 0x9CA0A498,
+ 0xACA1A4A8, 0xA8ACA0A8, 0x9FABADA1, 0xA99DA9AE,
+ 0xA6ADA0A5, 0x9FA5ABA0, 0xAA9FA4AA, 0xA4AA9FA4,
+ 0xA0A5ABA0, 0xAA9FA3AB, 0xA3ABA0A2, 0x9FA2AA9F,
+ 0xAAA0A2AA, 0xA1A8A1A2, 0xA19EA59E, 0xA8A1A0A8,
+ 0x9EA59EA1, 0x9AA1A69D, 0xA49E9EA3, 0xA0A49EA0,
+ 0xA0A0A59C, 0xA39AA6A9, 0x9CA1989E, 0x9A9BA398,
+ 0xA49A9DA5, 0xA0A99F9B, 0x9BA0A99F, 0xA59A9CA5,
+ 0x9DA59A9D, 0x959EA499, 0xA3979BA2, 0xA1A6979F,
+ 0xA1AAAFA0, 0x7B76A7AE, 0x11161475, 0xA1373B35,
+ 0xADA2A7AA, 0xA8ACA0A9, 0x9CA8ACA0, 0xA99EA4A8,
+ 0xA8ACA1A5, 0x9BA5A99D, 0xACA0A3A7, 0xA0A498A8,
+ 0x9EA2A69A, 0xA99DA6AA, 0xA0A498A5, 0x9EA1A59A,
+ 0xABA0A3A9, 0x9FA59AA5, 0x9A9EA499, 0xA79C9DA5,
+ 0x9FA79D9F, 0x989BA39C, 0xA29B979F, 0x9BA39C9A,
+ 0x999AA298, 0xA1989DA2, 0x9BA0979C, 0x05ACABA7,
+ 0x05070806, 0x08050708, 0x00000001, 0x00000000,
+ 0x00000000, 0x00010101, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020301, 0x54500403,
+ 0x7F7C7757, 0x79808178, 0x85798283, 0x88877985,
+ 0x79848478, 0x83778585, 0x85857983, 0x79858579,
+ 0x83798385, 0x85847A82, 0x77848179, 0x8279827F,
+ 0x86817887, 0x737A796F, 0x7E727C7D, 0x8383757E,
+ 0x77848476, 0x867B8585, 0x85837888, 0x79838377,
+ 0x84788585, 0x85857984, 0x767F7F73, 0x81768282,
+ 0x85817683, 0x7A858176, 0x81768785, 0x81817583,
+ 0x767C8075, 0x81767C7F, 0x7E80747D, 0x72808074,
+ 0x84788080, 0x7E807482, 0x6F7B7B6F, 0x7A707B7B,
+ 0x7E7D737B, 0x727A796F, 0x7C717D7C, 0x7A786D7E,
+ 0x6E757569, 0x786C7A7D, 0x79796D78, 0x6A747468,
+ 0x776D7676, 0x79776D78, 0x64757368, 0x6F617372,
+ 0x72726670, 0x62717268, 0x6C626A6B, 0x65665C6B,
+ 0x57616259, 0x59505F60, 0x58595058, 0x4B56554B,
+ 0x4F455655, 0x4D4E444E, 0x40484C40, 0x4C40484C,
+ 0x5A605548, 0x67686C66, 0x837E686C, 0x7D837E7F,
+ 0x9E8A908B, 0xA49D9EA5, 0x9DA59B9D, 0xA7ABB0A7,
+ 0xB0A5ACB2, 0xAEB2A7AC, 0xABAFB4AB, 0xB9AFADB5,
+ 0xB0B8AEB1, 0xB4B4BBB4, 0xBCB5B4BB, 0xB8BFB8B5,
+ 0xB4BDC2B9, 0xBDB4B8BD, 0xB9BCB3BA, 0xB8BDC1BB,
+ 0xBEB8B8BF, 0xB9BDB7BA, 0xB7BBC0B7, 0xC1B7B9C1,
+ 0xB6BEB4B9, 0xBAB9C0B9, 0xBEB9B9BF, 0xBABCB6BA,
+ 0xB4BABDB4, 0xBAB1BABD, 0xB9BCB3B7, 0xB2B7BAB1,
+ 0xBEB5B8BB, 0xBABDB4BB, 0xB1B8BBB2, 0xBEB5B7BA,
+ 0xBABDB4BB, 0xB5B5BCB5, 0xB9B4B5BC, 0xB7BBB6B5,
+ 0xB2B8BCB6, 0xB4ADB2B9, 0xA9B0A9AD, 0xABA5ACA5,
+ 0xACA5ABB2, 0xA5ACA5A5, 0xA0A1A8A1, 0x9D98A0A7,
+ 0x979D9897, 0x90909691, 0x87808F95, 0x80878080,
+ 0x72737772, 0x605C7377, 0x5F605C5F, 0x40565551,
+ 0x44404544, 0x47423F47, 0x4547443F, 0x4A454D4A,
+ 0x53504B4D, 0x5653504B, 0x58555D5A, 0x6764605D,
+ 0x616A6762, 0x635A696A, 0x68696062, 0x68716E66,
+ 0x70687370, 0x70716872, 0x606D6E65, 0x6D646869,
+ 0x73746B6C, 0x6A797A71, 0x6D657273, 0x7B787070,
+ 0x697A786E, 0x786E7674, 0x76746A7A, 0x7278766C,
+ 0x81777E7C, 0x7D7C7283, 0x787A7B72, 0x7B757E7E,
+ 0x7B7B757B, 0x70787970, 0x7C737879, 0x7B7C737B,
+ 0x70787970, 0x7C737879, 0x7E7F767B, 0x737A7B72,
+ 0x7E757B7C, 0x7E7F767D, 0x6B7A786E, 0x756B7775,
+ 0x7B7A7077, 0x707D7E75, 0x79707879, 0x77786F78,
+ 0x757B7C73, 0x7D747D7E, 0x7B7C737A, 0x747D7A75,
+ 0x78747B78, 0x7B7A7679, 0x727A7772, 0x78737A77,
+ 0x7B78737B, 0x757E7976, 0x78757D78, 0x7A75727D,
+ 0x737B7673, 0x75727B76, 0x7D78757A, 0x26777372,
+ 0x00002927, 0x00000102, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000200, 0x02000004, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x1E060501, 0x413C2623, 0x423F3A44, 0x54605E56,
+ 0x7769615F, 0x78776978, 0x77828274, 0x867C8585,
+ 0x84837987, 0x73828075, 0x7E708481, 0x8484747F,
+ 0x71888878, 0x87778383, 0x85857587, 0x76888A77,
+ 0x7F6C8789, 0x6A6C597D, 0x3B676858, 0x01004445,
+ 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x48090A06, 0x6F694C4E,
+ 0x71716B6F, 0x2E444543, 0x30302D30, 0x2E312F2E,
+ 0x2D2D312C, 0x302B2E32, 0x2D312C2C, 0x2F2F302C,
+ 0x312C3233, 0x2C302B2D, 0x2C2D312C, 0x312C2D31,
+ 0x30342F2D, 0x2E2D312C, 0x34342D30, 0x32343432,
+ 0x34333432, 0x35353536, 0x34343435, 0x33333535,
+ 0x34343133, 0x32343432, 0x36353737, 0x38363338,
+ 0x3A403B33, 0x43454944, 0x4C464549, 0x484C4748,
+ 0x4F50514F, 0x52505051, 0x50514F51, 0x003D3E3C,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x696A6600, 0x9FB6B8B2, 0xADA4A3A8, 0xA8ADA4A8,
+ 0xA3A5ADA3, 0xADA3A5AD, 0xA2A89DA5, 0x9CA1A599,
+ 0xAB9FA4A8, 0xA8ACA0A7, 0x9CA5A99D, 0xAA9FA4A8,
+ 0xA8ACA1A6, 0x9FA6ACA1, 0xAAA0A2AA, 0xA3A89FA2,
+ 0xA0A4A9A0, 0xAA9FA4A9, 0xA4AA9FA4, 0xA0A5AAA1,
+ 0xA9A2A2AA, 0xA1A8A1A2, 0x9F9FA69F, 0xA69DA1A9,
+ 0xA0A59CA1, 0x9D9EA29C, 0xA49E9FA3, 0xA3A7A1A0,
+ 0x98A0A59C, 0xA39A9CA1, 0x9FA49B9E, 0x9BA1A99F,
+ 0xA59B9DA5, 0x9AA2989D, 0x9A98A096, 0xA59C9CA4,
+ 0x9AA095A0, 0x949BA196, 0xA4989AA1, 0x9DA293A0,
+ 0xA2A8AFA0, 0xACA3A8AF, 0x454943A7, 0x6D000400,
+ 0xACA17173, 0xA8ACA1A8, 0x9BA3A79B, 0xADA1A3A7,
+ 0xAAACA0AB, 0x9DA5A79B, 0xA99DA5A9, 0xA0A498A5,
+ 0x9EA5A99E, 0xA79BA7A8, 0xA0A498A5, 0x9DA3AA9D,
+ 0xA89DA0A8, 0x9DA299A2, 0x9D9FA79D, 0xA59AA0A8,
+ 0x9DA2999F, 0x9D989F98, 0xA49C9CA4, 0x9BA39C99,
+ 0x979AA298, 0xA19899A1, 0xACB0AA9C, 0x063D3B3A,
+ 0x04090806, 0x08050708, 0x00000001, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x28030100, 0x7C772D2C,
+ 0x807D787F, 0x76808178, 0x85797F80, 0x85857785,
+ 0x79858476, 0x847A8684, 0x82817786, 0x7E85847A,
+ 0x897D8988, 0x84847889, 0x7886847A, 0x81788482,
+ 0x847F7686, 0x777A796F, 0x87798383, 0x87877988,
+ 0x76848476, 0x84788285, 0x85857984, 0x78858378,
+ 0x867A8583, 0x85857986, 0x78858579, 0x83788583,
+ 0x807E7385, 0x75838176, 0x84798280, 0x83837786,
+ 0x7A7E7F75, 0x857B8384, 0x7A7C7084, 0x73808074,
+ 0x85768181, 0x82847882, 0x787C7D73, 0x7D738081,
+ 0x7D7C727E, 0x6D7D7D71, 0x786E7979, 0x79776C7A,
+ 0x6979796D, 0x786C7575, 0x79796D78, 0x6977766C,
+ 0x766C7473, 0x77756B78, 0x6977756A, 0x6E637674,
+ 0x6E6E6270, 0x63707167, 0x675C6B6C, 0x64685D63,
+ 0x50606158, 0x594F5859, 0x50514758, 0x454E4F45,
+ 0x49404E4F, 0x48493F48, 0x55484C41, 0x5F565C60,
+ 0x6D72695A, 0x7D7F837D, 0x9A937D84, 0x949A9593,
+ 0xAF9DA39E, 0xB3AEB0B4, 0xB0B4AFAF, 0xA6ACB0AA,
+ 0xB0A7AAAF, 0xADB0A7AD, 0xAAAFB5AA, 0xBCB1ADB5,
+ 0xB5BDB2B6, 0xB8B4BCB2, 0xC1B7B9C2, 0xBAC2B8B8,
+ 0xB8BEC1B8, 0xC1B8C0C1, 0xC0C1B8C0, 0xB6BABFB6,
+ 0xBEB8BABF, 0xBCC0BABC, 0xB8BBC0B7, 0xC0B7BCC1,
+ 0xB8BDB4BB, 0xB8B8BFB8, 0xBFB8B8BF, 0xBBBFB9B8,
+ 0xB2B7BCB3, 0xBDB4B6BB, 0xBABCB6BA, 0xB4B6BAB4,
+ 0xBDB4B6BA, 0xB8BDB4B8, 0xB0B8BCB1, 0xBEB5B7BB,
+ 0xB8BDB4BB, 0xB5B6BDB6, 0xBCB7B5BC, 0xB8BCB7B8,
+ 0xB3B6BCB7, 0xB0A9B2B8, 0xA8B0A9A9, 0xAFABB4AA,
+ 0xB2ABB0B9, 0xABB2ABAB, 0xA1A8AFA8, 0xA6A1A1A8,
+ 0xA1A7A2A0, 0x9FA0A49F, 0x9690A0A4, 0x90948E92,
+ 0x87898D88, 0x7772888C, 0x73777273, 0x53646765,
+ 0x55535255, 0x45444054, 0x4547443F, 0x443F4D4A,
+ 0x48443F48, 0x4B4A4742, 0x5A555151, 0x5D5A555D,
+ 0x5B5F5D55, 0x69606364, 0x6A6B6268, 0x62706D65,
+ 0x6E666D6A, 0x72706871, 0x656D6E65, 0x756C6D6E,
+ 0x73746B74, 0x65706D65, 0x736B706D, 0x7C797176,
+ 0x6775726A, 0x786D7371, 0x7E7C717A, 0x747D7C72,
+ 0x7C727E7C, 0x77766C7D, 0x757D7E75, 0x7B757D7E,
+ 0x7B7B757B, 0x7077786F, 0x7B737879, 0x7D7B737D,
+ 0x737C7D74, 0x7C727B7C, 0x7B7C727B, 0x737C7D74,
+ 0x7C737B7C, 0x7879707B, 0x6D79776D, 0x756B7977,
+ 0x78776D76, 0x7077786F, 0x7D747879, 0x8081787C,
+ 0x74808178, 0x7C737C7D, 0x7879707B, 0x737B7873,
+ 0x79747B78, 0x7D7A757C, 0x737D7A75, 0x7A757B78,
+ 0x7B77727E, 0x747C7975, 0x78757B78, 0x7B76737D,
+ 0x73827B78, 0x78757D76, 0x7B76737D, 0x4C777470,
+ 0x00004F4D, 0x02000002, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x02000000, 0x00020000,
+ 0x00000200, 0x02000004, 0x00000100, 0x02000001,
+ 0x00010001, 0x00000100, 0x01000001, 0x585A5400,
+ 0x5860605A, 0x61586061, 0x63625860, 0x69615F54,
+ 0x78687877, 0x77786878, 0x76868577, 0x847A8484,
+ 0x84837985, 0x73838176, 0x83758281, 0x80807084,
+ 0x73888878, 0x84748383, 0x83837384, 0x6C7C7E6B,
+ 0x806D7D7F, 0x6A6C597E, 0x3A676858, 0x01004446,
+ 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000100,
+ 0x01000200, 0x24252100, 0x686D6F69, 0x72696E71,
+ 0x6D706771, 0x406B6F69, 0x312F3F45, 0x2E312F2E,
+ 0x2F303331, 0x342F2E34, 0x31353030, 0x2F2F332E,
+ 0x302C3034, 0x32332F2F, 0x2F32332F, 0x342F3233,
+ 0x30333130, 0x33343434, 0x34343333, 0x35353534,
+ 0x33323533, 0x34323235, 0x34353333, 0x35343636,
+ 0x38363335, 0x35383635, 0x3C333836, 0x403B3B41,
+ 0x4147423A, 0x48484C47, 0x4B46494D, 0x484C4745,
+ 0x5050514F, 0x50505050, 0x51515150, 0x00141414,
+ 0x00000000, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x01000000, 0x01000101,
+ 0x696A6600, 0xA4B6B8B2, 0xADA4AAAD, 0xA8ADA4A8,
+ 0xA3A7ACA3, 0xACA3A7AC, 0xA7ADA2A7, 0xA0A5A99E,
+ 0xADA1A8AC, 0xA5A99DA9, 0x9DA8ACA0, 0xA99EA5A9,
+ 0xA5A99EA5, 0x9EA3A99E, 0xAAA0A1A9, 0xA2A9A2A2,
+ 0xA0A4A9A0, 0xAA9FA6A9, 0xA3A99EA4, 0x9FA5AAA1,
+ 0xA8A1A1A9, 0xA1A8A1A1, 0x9C9FA79D, 0xA69DA0A5,
+ 0xA1A69DA1, 0x9EA4A8A2, 0xA29CA0A4, 0xA0A39AA0,
+ 0x999EA39A, 0xA59C9EA4, 0xA0A69BA0, 0x9A9FA49B,
+ 0xA1989DA5, 0x9AA2979C, 0x9A9FA49B, 0x9F969FA5,
+ 0x969C919A, 0x98999F94, 0xA1959EA5, 0x9DA1959D,
+ 0xA2A8AFA2, 0xAEA3A8AF, 0xA8ADA4A8, 0x00373B35,
+ 0x746B0105, 0xA8ACA171, 0x9DA3A99E, 0xA99DA3AA,
+ 0xA5A99DA5, 0x9EA3A79B, 0xA499A6AA, 0xA0A499A0,
+ 0x9B9FA398, 0xA397A4A5, 0xA1A89B9F, 0x9DA0A99C,
+ 0xA59B9FA9, 0x9FA49B9D, 0x9B9FA79D, 0xA49B9FA4,
+ 0x9EA39A9F, 0x9B9CA49A, 0xA1999CA5, 0x96A19796,
+ 0x9899A298, 0xA1989AA2, 0x7E827D9C, 0x07060606,
+ 0x05070805, 0x08050708, 0x01000000, 0x01000101,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x782D2C28, 0x7D777E7E,
+ 0x7C7D747D, 0x79808178, 0x84788283, 0x84847884,
+ 0x78868479, 0x83798583, 0x83807885, 0x7785847A,
+ 0x847A8281, 0x85847A85, 0x78848278, 0x81788482,
+ 0x86847A86, 0x777D7D71, 0x83758383, 0x87877984,
+ 0x77878779, 0x84788585, 0x85837884, 0x78858378,
+ 0x84788583, 0x82827684, 0x73858579, 0x8176807E,
+ 0x83817683, 0x79868479, 0x82768684, 0x7C7C7082,
+ 0x75807F75, 0x897F7E7F, 0x85857988, 0x6F7E7C71,
+ 0x82737D7D, 0x7F81757F, 0x78808178, 0x81788081,
+ 0x80817780, 0x71828177, 0x7C727D7D, 0x7D7C727D,
+ 0x6D7C7C70, 0x7C707979, 0x78786C7C, 0x7077766C,
+ 0x73697B7A, 0x77756A75, 0x66767469, 0x71657371,
+ 0x6F6E6471, 0x636C6D63, 0x665D6B6C, 0x60615865,
+ 0x4857584F, 0x51475051, 0x50514750, 0x3F484940,
+ 0x48424548, 0x52554C46, 0x695B5E55, 0x716B6D72,
+ 0x7F837D6D, 0x93939A93, 0xB0A9939A, 0xAAB1AAA9,
+ 0xAFB0B4AF, 0xB3AFB0B4, 0xB2B3AFB2, 0xB2B3B7B1,
+ 0xBAB1B4B8, 0xB6B9B0B7, 0xAEB2B7AE, 0xBBB2B0B8,
+ 0xB6BBB2B6, 0xB8B4BCB2, 0xC1B7BAC2, 0xBBC0B7B9,
+ 0xB8BEC1B8, 0xC1B8C0C1, 0xC0C1B8C0, 0xB8BABFB6,
+ 0xC1BBBCC1, 0xBBBFB9BD, 0xB4B8BCB6, 0xB9B3B8BD,
+ 0xB6BAB4B5, 0xB7B6BDB6, 0xBFB8B7BE, 0xB8BFB8B8,
+ 0xB2B8BDB4, 0xBAB4B6BB, 0xB6BAB4B6, 0xB6B8BCB6,
+ 0xBDB6B8BC, 0xB6BBB2B6, 0xB5B6BBB2, 0xBCB6B9BE,
+ 0xBAC1BAB8, 0xB4B5BCB5, 0xBBB6B3B9, 0xB8BCB7B5,
+ 0xAFB6BCB7, 0xB0A9AEB4, 0xABB3ACA9, 0xAFAFB7B0,
+ 0xB8B1B0B9, 0xB1B8B1B1, 0xA9A9B0A9, 0xAFAAA9B0,
+ 0xA9AFAAA9, 0x9FA0A49F, 0xA39DA0A4, 0xA0A49E9F,
+ 0x87878B86, 0x8C87888C, 0x868C8788, 0x76737876,
+ 0x66647378, 0x54555163, 0x4651504C, 0x43404D4A,
+ 0x4D4A4548, 0x404A4840, 0x504B4849, 0x53504B53,
+ 0x555B5951, 0x645B5F5D, 0x67685F63, 0x636C6961,
+ 0x6B636E6B, 0x6D6B636E, 0x65686960, 0x736A6D6E,
+ 0x76746C72, 0x656C6961, 0x736B706D, 0x75736B76,
+ 0x67727068, 0x786D7271, 0x7E7C717A, 0x727E7D73,
+ 0x82787D7C, 0x7D7C7283, 0x737D7E75, 0x78727B7C,
+ 0x77777178, 0x737B7C73, 0x7B737B7C, 0x7C7A727D,
+ 0x727D7B73, 0x7C727D7C, 0x7E7D737D, 0x737B7C73,
+ 0x79707B7C, 0x78797078, 0x6F78766E, 0x796F7A79,
+ 0x7A796F7A, 0x70787970, 0x7F767879, 0x7C7D747E,
+ 0x737B7C73, 0x81787B7C, 0x7C7D7480, 0x737B7873,
+ 0x78737B78, 0x7B78737B, 0x727A7772, 0x78737A77,
+ 0x7B78737B, 0x757C7975, 0x79757C79, 0x7B76737C,
+ 0x737B7673, 0x76737B76, 0x7B76737B, 0x70777470,
+ 0x27267774, 0x02000029, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x13141200,
+ 0x363A3B37, 0x3B373C3C, 0x3E3B373C, 0x383F3C38,
+ 0x3C383F3C, 0x3F3C383F, 0x2F32332F, 0x322E3233,
+ 0x35343031, 0x1B1F1E1A, 0x0100201F, 0x5A595502,
+ 0x58606158, 0x61576260, 0x61615562, 0x68787769,
+ 0x77697878, 0x78776978, 0x77848375, 0x81758685,
+ 0x85857981, 0x75817F74, 0x86788280, 0x807F7187,
+ 0x75808070, 0x83738585, 0x86867683, 0x6C7D7E6E,
+ 0x73617D7F, 0x6B6B5973, 0x3A686858, 0x01004646,
+ 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x48440001, 0x6A6C6647, 0x676E7168, 0x71676D70,
+ 0x6E716870, 0x6A697069, 0x4641696F, 0x2E312F42,
+ 0x31303331, 0x33313033, 0x2F332E30, 0x2F313530,
+ 0x322E3335, 0x32332F31, 0x2E32332F, 0x33313132,
+ 0x31343230, 0x38363838, 0x38383638, 0x36393738,
+ 0x37363937, 0x39373639, 0x38393738, 0x3A383A3A,
+ 0x3C3A383A, 0x383B3939, 0x3B3C403B, 0x47423A40,
+ 0x41474241, 0x49484C47, 0x4B49484B, 0x484B4948,
+ 0x4F3B3C3A, 0x50504F4F, 0x10101050, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x01000101,
+ 0x52534F00, 0xA3B1B3AD, 0xADA4A9AC, 0xA9ACA3AA,
+ 0xA1A8ACA1, 0xABA2A8AC, 0xA8ACA1A8, 0xA0A8ACA1,
+ 0xAB9FA6AD, 0xA8ACA0A7, 0x9DA2A89D, 0xACA1A2A8,
+ 0xA7ADA2A6, 0x9EA1AA9D, 0xA69CA1A9, 0x9DA59B9D,
+ 0x9EA1A69D, 0xA59CA2A7, 0xA1A69DA0, 0xA19EA59E,
+ 0xA8A1A1A8, 0xA1A8A1A1, 0x999DA59B, 0xA59A9CA4,
+ 0x9EA4999F, 0x989BA399, 0xA0979AA2, 0x9CA1989B,
+ 0x95A0A499, 0xA4999DA1, 0xA0A498A0, 0x95A0A499,
+ 0xA1969BA2, 0x9BA2959D, 0x989DA196, 0xA196A0A4,
+ 0x9DA1959D, 0x929B9F93, 0xA2939CA1, 0x99A0939D,
+ 0x9799A197, 0xA89E99A1, 0xAEB6ACA0, 0x05A3A7A1,
+ 0x0903060A, 0x6F736D05, 0xA1A3ABA0, 0xABA0A3AD,
+ 0xA2AA9FA3, 0x9EA1A99E, 0xA399A1A9, 0xA3A89F9B,
+ 0x97A4A89D, 0xA89B9FA3, 0xA0A99CA1, 0x9BA1AB9F,
+ 0xA49A9CA5, 0xA1A99F9C, 0x9EA0A49E, 0xA29CA0A4,
+ 0xA0A59C9E, 0x959BA399, 0xA39997A1, 0x98A39998,
+ 0x9998A197, 0x9F9999A0, 0x3236319B, 0x01000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x01000301,
+ 0x03010003, 0x00030100, 0x7A53554F, 0x83798283,
+ 0x82837982, 0x7D83847B, 0x847A8586, 0x80817783,
+ 0x7D85847A, 0x857B8887, 0x88877D87, 0x7B85867D,
+ 0x867D8384, 0x87867C85, 0x78848278, 0x82788482,
+ 0x83817784, 0x76828276, 0x82768282, 0x85857982,
+ 0x79818175, 0x84798585, 0x85817686, 0x79858176,
+ 0x7E748684, 0x7F7E747F, 0x71808276, 0x84797D7D,
+ 0x85817688, 0x73838176, 0x7E73807E, 0x85857980,
+ 0x71818175, 0x81757D7D, 0x83837781, 0x717D7B70,
+ 0x7C707D7D, 0x787C707A, 0x757B7C73, 0x7E757D7E,
+ 0x7E82777D, 0x727A7B71, 0x7C707B7C, 0x7C7C707A,
+ 0x6A7A796F, 0x70657574, 0x72706572, 0x6B737166,
+ 0x7C707876, 0x77776B7C, 0x606D6B60, 0x746A6D6B,
+ 0x6C6B6176, 0x5A626359, 0x5C536263, 0x54554C5B,
+ 0x3F484940, 0x49404849, 0x48494048, 0x4E52544E,
+ 0x544F5054, 0x696D6850, 0x76777B75, 0x918A767D,
+ 0x9DA39E8A, 0xAAA6AAA4, 0xB0AAACB0, 0xB2B6B0AC,
+ 0xB4B5B9B3, 0xBAB4B8BA, 0xB7B9B3B8, 0xB4B6BBB2,
+ 0xBDB4B8BD, 0xB6BBB2B8, 0xB7B9BEB5, 0xBDB7B9BD,
+ 0xBABEB8B9, 0xB9BBBFB9, 0xBEB8BBBF, 0xBDBFB9BA,
+ 0xB8C0C1B8, 0xC0BAC0C1, 0xBEC0BAC0, 0xB8BABEB8,
+ 0xBFB8B8BF, 0xB9C0B9B8, 0xB8B9C0B9, 0xBCB7B8BF,
+ 0xB7BDB8B6, 0xB7B9BDB8, 0xBDB8B8BC, 0xB7BDB8B7,
+ 0xB7BABEB8, 0xBCB7B8BC, 0xB9BDB8B8, 0xB8B9BDB8,
+ 0xBFB9BABE, 0xB7BBB5BB, 0xB7B9BDB7, 0xBDB8B7BE,
+ 0xB7BDB8B7, 0xB9B6BCB7, 0xBCBAB6BB, 0xB6BBB9B7,
+ 0xAFB8BCB7, 0xB4AFB0B4, 0xB1B8B1B0, 0xB5B4BCB5,
+ 0xBBB1B4BC, 0xB1B8B1B2, 0xB2AEB5AE, 0xB4AFB3B7,
+ 0xB0B4AFB0, 0xA5A4ABA4, 0xABA6A5AC, 0xA1A7A2A5,
+ 0x9B9AA09B, 0x98919AA0, 0x91979291, 0x84838984,
+ 0x7C778389, 0x7A7B7778, 0x63646563, 0x4F4E6664,
+ 0x53524E51, 0x40484842, 0x49404849, 0x4A484048,
+ 0x4F4F4C47, 0x544F5854, 0x5F5C5757, 0x626A6762,
+ 0x68606A67, 0x6869606A, 0x68686960, 0x71687071,
+ 0x71726970, 0x6E77756D, 0x71687876, 0x71726970,
+ 0x7178766E, 0x7B717B79, 0x7A796F7A, 0x6E76746A,
+ 0x786E7A78, 0x8281777A, 0x6D808177, 0x776E7478,
+ 0x7B7C7376, 0x737C7A72, 0x7F767D7B, 0x7F7D757E,
+ 0x717E7C72, 0x7C717E7C, 0x7E7C727E, 0x757F7D75,
+ 0x77717F7D, 0x77786F77, 0x727D7B73, 0x78707C7A,
+ 0x8081787A, 0x747B7C73, 0x7D737C7D, 0x78796F7C,
+ 0x757B7C73, 0x7E757D7E, 0x7B7C737D, 0x707B7C73,
+ 0x79707879, 0x78797078, 0x75797973, 0x79757B7B,
+ 0x7574707A, 0x75787975, 0x77737879, 0x7A777378,
+ 0x727B7673, 0x77727A75, 0x7C79747B, 0x727A7772,
+ 0x77737A77, 0x100E0D78, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x2A282700,
+ 0x66727068, 0x7C727371, 0x7E7C727E, 0x727E7C72,
+ 0x7C727E7C, 0x76746C7E, 0x68707168, 0x635B7071,
+ 0x59574F65, 0x3555534B, 0x05063C39, 0x3C38370A,
+ 0x525C5954, 0x5B525E5C, 0x605B5260, 0x67767469,
+ 0x7B707675, 0x807D6F7F, 0x72888577, 0x7F718180,
+ 0x81807280, 0x77828173, 0x85778685, 0x81807286,
+ 0x74808070, 0x82748484, 0x84847483, 0x6E808070,
+ 0x73618080, 0x6D6C5875, 0x3A6D6B59, 0x01004948,
+ 0x01010104, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x01010000, 0x00010001, 0x4E151612,
+ 0x736A5254, 0x6F756A70, 0x6771746B, 0x71686D70,
+ 0x70716870, 0x72717871, 0x635E7077, 0x363C375D,
+ 0x38363838, 0x38383838, 0x38393738, 0x30363832,
+ 0x3C363639, 0x3638323A, 0x33353934, 0x3A353438,
+ 0x34383336, 0x36333634, 0x3C37353B, 0x373B3638,
+ 0x39383B39, 0x3B37383B, 0x3A3B373A, 0x3E383B39,
+ 0x3F3F3D40, 0x3F403E3F, 0x3F42433F, 0x49444044,
+ 0x45484645, 0x504E5050, 0x50505050, 0x50514F50,
+ 0x494A4B49, 0x08064A4B, 0x08090707, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x1C1D1900, 0xAAA1A39D, 0xACA3B0B3, 0xA9ACA3A9,
+ 0xA0A9ADA2, 0xAAA1A7AB, 0xA6A9A0A7, 0x9DA8ACA1,
+ 0xAA9EA5A9, 0xA5A99DA6, 0x9DA1A79C, 0xA59AA2A8,
+ 0x9FA79C9D, 0x9EA1A99E, 0xA498A1A9, 0x9EA79D9A,
+ 0x9A9CA49A, 0xA49B9EA3, 0x9FA49B9F, 0x9E9EA59E,
+ 0xA59E9EA5, 0x9EA69C9E, 0x9698A096, 0x9B9099A1,
+ 0x9BA19695, 0x989BA196, 0xA1989CA1, 0x9CA2979C,
+ 0x95A0A499, 0xA0949DA1, 0xA0A4989C, 0x939B9F93,
+ 0xA5999B9F, 0x9DA195A1, 0x959EA296, 0x9F939DA1,
+ 0x9DA1959B, 0x919A9F90, 0x9F909BA0, 0x9AA1949A,
+ 0x9999A099, 0x9F9898A0, 0x9AA19A98, 0x6EA1A7A2,
+ 0x0B066F73, 0x040A0507, 0xA16B736C, 0xACA0A0AB,
+ 0xA2ACA0A2, 0x99A0AA9E, 0xA8A19BA3, 0xA2A79EA1,
+ 0x98A4A89D, 0xA497A0A4, 0xA0A89D9D, 0x979DA59A,
+ 0xAAA098A1, 0x9DA59BA2, 0x999FA69F, 0xA29C9B9F,
+ 0x9CA49A9E, 0x9598A096, 0xA49897A1, 0x98A49898,
+ 0x9A98A099, 0x6B669AA1, 0x00010067, 0x00010101,
+ 0x01000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000102, 0x00010000, 0x00000301,
+ 0x04000004, 0x2C302B00, 0x7971746B, 0x83778283,
+ 0x8185797F, 0x7A83847A, 0x867D8283, 0x83847B85,
+ 0x7D88877D, 0x877D8887, 0x86857B89, 0x7C83847B,
+ 0x89808285, 0x84857C88, 0x78858379, 0x83798482,
+ 0x85837985, 0x78838377, 0x84788484, 0x85857984,
+ 0x72858579, 0x81767F7D, 0x85817683, 0x79888479,
+ 0x847A8684, 0x82817786, 0x737D7F73, 0x84797F7F,
+ 0x88847988, 0x79888479, 0x84798684, 0x85857986,
+ 0x75848478, 0x7E728181, 0x8585797E, 0x75848278,
+ 0x7E72807F, 0x787C717C, 0x78787970, 0x7E758081,
+ 0x7B7E757D, 0x6B777B70, 0x7B6F7276, 0x77776B79,
+ 0x6B75746A, 0x70657775, 0x77756A72, 0x666E6C61,
+ 0x73657371, 0x72716374, 0x5F6D6B60, 0x6C626C6A,
+ 0x6261576E, 0x535C5D53, 0x534E5B5C, 0x4F4C4756,
+ 0x4047483F, 0x49404849, 0x57595348, 0x68696D67,
+ 0x6D68676D, 0x80868167, 0x9D8A918A, 0xA49D9DA4,
+ 0xB2B9B29D, 0xB0B2B6B0, 0xB7B1B2B6, 0xB2B6B0B3,
+ 0xB4B9BCB3, 0xBCB3BABD, 0xBABDB4B9, 0xB4BBC0B7,
+ 0xBCB3B8BD, 0xB8BDB4B7, 0xB8BABEB8, 0xBEB9BABE,
+ 0xBABEB9BA, 0xB9BEC0BA, 0xBEBABDBF, 0xBBBDB7BD,
+ 0xB8BCBEB8, 0xC1BBBEC1, 0xBABEB8BF, 0xB6B8BFB8,
+ 0xBFB8B6BD, 0xB8BFB8B8, 0xB9B8BEB9, 0xBDB8B8BE,
+ 0xB8BEB9B7, 0xB7B9BDB8, 0xBDB8B8BC, 0xB8BEB9B7,
+ 0xB8B9BDB8, 0xBBB9B9BD, 0xB6BCB7B6, 0xB9BABEB9,
+ 0xBBB5BABE, 0xB7BBB5B7, 0xB9B7BDB8, 0xBBB9B8BE,
+ 0xB8BDBBB6, 0xBAB8BBB9, 0xBCBAB9BC, 0xB6BBB9B7,
+ 0xB3B9BDB8, 0xB4AFB4B8, 0xB8BCB7B0, 0xB5B6BDB6,
+ 0xBDB3B4BC, 0xB0B7B0B5, 0xB2B0B4AF, 0xB7B2B3B7,
+ 0xB3B7B2B3, 0xAAAEB5AE, 0xB0ABAAB1, 0xA1A7A2AA,
+ 0xA4A3A9A4, 0xA9A4A3A9, 0x9AA19AA3, 0x91909691,
+ 0x89849096, 0x85888685, 0x64777876, 0x64646464,
+ 0x4F504E64, 0x40464743, 0x4A414849, 0x4A484049,
+ 0x47504C47, 0x544F504C, 0x5F5C5758, 0x5B61615B,
+ 0x69606161, 0x68696068, 0x666B6C63, 0x6D646E6F,
+ 0x7071686C, 0x69737169, 0x6D647371, 0x7071686C,
+ 0x6F79776F, 0x79707977, 0x77786F78, 0x6D757369,
+ 0x786E7A78, 0x7A796F7A, 0x7276776D, 0x7C72797D,
+ 0x7B7C737B, 0x737A7870, 0x80777D7B, 0x7F7E747F,
+ 0x717D7B71, 0x7C71807C, 0x7F7D7380, 0x6F7F7D75,
+ 0x77717977, 0x7D7D7777, 0x747F7D75, 0x79707C7D,
+ 0x78797078, 0x73787970, 0x796F7B7C, 0x78796F78,
+ 0x757D7E75, 0x7E757D7E, 0x7C7D747D, 0x737B7C73,
+ 0x7C737B7C, 0x7B7C737B, 0x727B7D77, 0x76727678,
+ 0x74757177, 0x777A7B77, 0x7773787C, 0x7A797576,
+ 0x757F7C78, 0x77727D78, 0x7B78737A, 0x707A7870,
+ 0x78727A78, 0x32312D78, 0x00000100, 0x00000000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x2A292500,
+ 0x5A68665C, 0x71666B68, 0x807C7175, 0x6A78766B,
+ 0x6F657775, 0x706F6571, 0x5A66655B, 0x584D6564,
+ 0x4D4B405A, 0x353C3931, 0x04063E3A, 0x0A050709,
+ 0x5425221E, 0x5B525F5C, 0x605B5260, 0x686D6B60,
+ 0x74697573, 0x807C7178, 0x72838072, 0x82728380,
+ 0x80807082, 0x73828173, 0x81738281, 0x82827282,
+ 0x73808070, 0x7F718383, 0x82817380, 0x6E7F7F6F,
+ 0x73618080, 0x6F6B5877, 0x3B6E6A58, 0x01004C49,
+ 0x00000004, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x26272500, 0x6970726C,
+ 0x74696F72, 0x6D74676E, 0x6A70736A, 0x72697073,
+ 0x72746E71, 0x72717871, 0x78717077, 0x5C625D70,
+ 0x38363937, 0x38383838, 0x38393738, 0x35383935,
+ 0x3A34393B, 0x393B3538, 0x36363A35, 0x3C37373B,
+ 0x363A3538, 0x36353B36, 0x3A35353B, 0x353B3634,
+ 0x3C383C37, 0x3A363B3E, 0x3D3E3A39, 0x3E3D403E,
+ 0x44443D40, 0x43434344, 0x44474846, 0x48464748,
+ 0x4A4D4B45, 0x51505050, 0x50505151, 0x4F4F4F50,
+ 0x064A4B49, 0x09070708, 0x08090708, 0x00010200,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0xAAA0A29C, 0xADA2B0B3, 0xA9ADA2A9,
+ 0xA2A4AA9F, 0xAAA1A7AD, 0xA3A89FA5, 0x9CA3A79C,
+ 0xA99DA3A7, 0xA3A79BA5, 0x9CA3AA9D, 0xA59AA1A7,
+ 0x9DA59A9D, 0x9FA1A99E, 0xA498A2AA, 0x9DA79B9A,
+ 0x9C9FA79C, 0xA59A9FA7, 0x9EA4999F, 0x9D9EA39A,
+ 0xA49BA1A6, 0x9EA39A9F, 0x969A9F96, 0xA0959A9F,
+ 0x999F9498, 0x999EA499, 0xA2999EA4, 0x9EA4999D,
+ 0x98A0A499, 0xA599A0A4, 0x9EA296A1, 0x959B9F93,
+ 0xA4989DA1, 0x9CA094A0, 0x939DA195, 0xA1959B9F,
+ 0x9B9F939D, 0x939B9F93, 0x9C909B9F, 0x989E9398,
+ 0x9999A298, 0xA09996A1, 0x989F9A98, 0xA4A0A7A2,
+ 0x3C3AA1A6, 0x06090739, 0x6C000200, 0xACA26B73,
+ 0xA0ACA0A1, 0x999BA399, 0xAA9F9DA2, 0xA3A99EA4,
+ 0x98A0A498, 0xA79CA0A4, 0x9FA79CA1, 0x979AA297,
+ 0xA99F9AA2, 0x9DA59BA1, 0x9899A099, 0xA49D989F,
+ 0x99A1979D, 0x96959D93, 0xA19699A1, 0x98A09599,
+ 0x9999A099, 0x3533989E, 0x00000032, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000000, 0x00000000, 0x02000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000200,
+ 0x04000105, 0x585C5600, 0x78808479, 0x84788284,
+ 0x80847880, 0x7D85867C, 0x89808687, 0x85867D88,
+ 0x7988877D, 0x857A8684, 0x87857A89, 0x7783847A,
+ 0x81777E82, 0x80817780, 0x7986847A, 0x81778583,
+ 0x86847A83, 0x79868479, 0x84788684, 0x84837984,
+ 0x76848277, 0x81768381, 0x7F7D7283, 0x76828075,
+ 0x83788381, 0x84827785, 0x73838377, 0x8176807E,
+ 0x84807583, 0x7A848075, 0x7C708785, 0x7C7C707C,
+ 0x72818173, 0x7D6F8080, 0x7E7D6F7E, 0x72808074,
+ 0x7C727C7E, 0x7A7B717B, 0x7375786F, 0x7E757B7C,
+ 0x7D7E757D, 0x6B787C71, 0x7B717377, 0x7371677C,
+ 0x65727065, 0x756A7270, 0x716F6477, 0x60706C61,
+ 0x6D5F6F6B, 0x6F6E6070, 0x616D6B60, 0x61596D6B,
+ 0x64615964, 0x4C5D5C52, 0x4B465654, 0x4F4C474E,
+ 0x42484842, 0x58524848, 0x6A6C6656, 0x80696D67,
+ 0x87808087, 0x979F9880, 0xB19CA49D, 0xB8B1B0B8,
+ 0xB1B8B1B0, 0xB7B8BCB6, 0xBCB7B8BC, 0xB7BBB5B8,
+ 0xB4B5BAB1, 0xBDB4B8BD, 0xB8BDB4B8, 0xB6BBC1B6,
+ 0xBEB3BBC1, 0xB8BDB4BA, 0xB9B9C0B9, 0xBDB8B8BE,
+ 0xB9BDB8B7, 0xB9BDBFB9, 0xBFB9BDBF, 0xBABCB6BF,
+ 0xB9B9BBB5, 0xBDB7BBBF, 0xBABEB8B9, 0xB6B8BFB8,
+ 0xBFB8B6BD, 0xB8BFB8B8, 0xB7B7BFB8, 0xBDB8B6BE,
+ 0xB8BEB9B6, 0xB7B8BCB6, 0xBDB8B9BD, 0xB7BDB8B7,
+ 0xB7B8BEB9, 0xBDB8B6BC, 0xB8BCB7B9, 0xB5B5BBB6,
+ 0xBCB5B5BC, 0xB5BCB5B5, 0xB8B7BDB8, 0xBDB8B7BD,
+ 0xB8BCB7B9, 0xB9B7BDB8, 0xBBB9B8BE, 0xB8BBB9B8,
+ 0xB4B8BCB7, 0xB4AFB5B9, 0xB8BCB7B0, 0xB5B8BCB6,
+ 0xB9B3B5BC, 0xB3B7B1B5, 0xB2B8BCB7, 0xB7B2B3B7,
+ 0xB3B7B2B3, 0xAFB0B4AF, 0xB5B0B0B4, 0xA7ABA6B1,
+ 0xA6A5A8A6, 0xA9A4A5A8, 0xA5A9A4A5, 0xA0A0A49F,
+ 0x9593A1A5, 0x93969492, 0x8A888B89, 0x7977898C,
+ 0x61646276, 0x4E5A5D5B, 0x483F5254, 0x4B494147,
+ 0x48504B48, 0x4A47524B, 0x5754504F, 0x55595B55,
+ 0x6259595B, 0x68696061, 0x686B6C63, 0x71697071,
+ 0x6F6D6573, 0x666F6B66, 0x6A656F6B, 0x7875706D,
+ 0x72787570, 0x76717A77, 0x77746F79, 0x6E75746A,
+ 0x786D7B79, 0x7674697A, 0x7276776D, 0x7C72797D,
+ 0x7B7C727B, 0x757B7C73, 0x82797D7E, 0x807F7581,
+ 0x717E7C72, 0x7C727E7C, 0x706E647E, 0x7079776F,
+ 0x766E7A78, 0x79776F78, 0x70787970, 0x7C737879,
+ 0x797C737B, 0x6F777A71, 0x79707578, 0x7B7E7576,
+ 0x787E8178, 0x7F767E81, 0x7D7E757E, 0x74797D72,
+ 0x7E757B7F, 0x7B7C737D, 0x777A7C76, 0x7B777A7B,
+ 0x7576727C, 0x73787975, 0x77737478, 0x7A797576,
+ 0x75797672, 0x76717D78, 0x7E7A757A, 0x707A7870,
+ 0x77717A78, 0x78777377, 0x001C1D19, 0x00000001,
+ 0x00000000, 0x00030101, 0x00000200, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x2A292500,
+ 0x515E5C52, 0x7166605C, 0x807C7175, 0x6577756B,
+ 0x6E66716F, 0x6A695F70, 0x5966655B, 0x584D6463,
+ 0x4E4C415A, 0x333D3A32, 0x06083C38, 0x0805070B,
+ 0x3A080606, 0x5C54413E, 0x5E5C525F, 0x5F626458,
+ 0x74696B6E, 0x76746976, 0x6F7D7C6E, 0x80727E7D,
+ 0x7D7C6E83, 0x727E7E6E, 0x7E6E8182, 0x8182727D,
+ 0x72808070, 0x81738282, 0x807F7182, 0x66808070,
+ 0x73617878, 0x6F6B5877, 0x3C6D6B59, 0x01004947,
+ 0x00000002, 0x00010101, 0x00000000, 0x01010100,
+ 0x00000000, 0x4E4C0001, 0x6F736E4B, 0x696E736A,
+ 0x74686E74, 0x71756970, 0x6A72776E, 0x726C6E73,
+ 0x74787270, 0x71717871, 0x78717078, 0x70787170,
+ 0x375D635E, 0x39373639, 0x35383636, 0x393B3E3C,
+ 0x3E393A3E, 0x3A3E393A, 0x37383C37, 0x3D36383C,
+ 0x353B3636, 0x393A3E39, 0x3D383A3E, 0x3A3E3939,
+ 0x3C393F3A, 0x413C3B41, 0x3C403B3D, 0x43444543,
+ 0x43434445, 0x48484843, 0x47474846, 0x4D4B4849,
+ 0x50514F4C, 0x4F515151, 0x50504F4F, 0x3F403E50,
+ 0x08060808, 0x09090608, 0x06080807, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0xA29B9D97, 0xADA2A8AB, 0xA9ADA2A9,
+ 0xA0A5ABA0, 0xA99FA2AA, 0xA3A89FA1, 0x9EA8ABA2,
+ 0xAA9FA5A9, 0xA1A79CA6, 0x9DA2A89D, 0xA99FA0A8,
+ 0x9DA59BA1, 0x9E9AA297, 0xA79BA1A9, 0x9DA79B9D,
+ 0x9A9CA499, 0xA59A9DA5, 0x9FA59A9F, 0x9B9DA299,
+ 0xA2979FA4, 0x9EA2979E, 0x9A9AA095, 0xA69B9FA5,
+ 0x98A0959E, 0x989FA397, 0xA0959FA3, 0x9DA3989A,
+ 0x989FA59A, 0x9F93A0A4, 0x9B9F939B, 0x93A0A499,
+ 0xA1969B9F, 0x9B9F939D, 0x95989C90, 0xA1959DA1,
+ 0x989C909D, 0x959DA195, 0x9E939CA0, 0x969C919A,
+ 0x9798A096, 0xA09998A1, 0x99A09999, 0xA1A1A8A1,
+ 0xA7A2A1A8, 0x060A05A3, 0x00000200, 0x736B0003,
+ 0xA2ABA168, 0x989AA297, 0x988B9DA3, 0x9DA49791,
+ 0x99A0A498, 0xA69D9EA4, 0x9EA39AA1, 0x9A9AA297,
+ 0xA59A9DA5, 0x9AA2989D, 0x9B99A197, 0x9F989DA5,
+ 0x9AA19A98, 0x9598A096, 0xA09698A0, 0x929A9098,
+ 0x6699A099, 0x0000656B, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000000, 0x00000000, 0x02000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020301,
+ 0x2F2B0003, 0x8789832E, 0x78828379, 0x85798284,
+ 0x80847881, 0x7A83847A, 0x847B8384, 0x88877D83,
+ 0x7988887C, 0x877C8684, 0x88867B8B, 0x7984857B,
+ 0x857B8084, 0x85867C84, 0x7885847A, 0x82788482,
+ 0x84827884, 0x79858378, 0x847A8684, 0x84837985,
+ 0x76807E73, 0x84798381, 0x84827786, 0x737F7F73,
+ 0x7E747F7F, 0x8381767F, 0x77868479, 0x84798482,
+ 0x84827786, 0x73868479, 0x7C70807E, 0x7D7F737C,
+ 0x74808072, 0x7F748382, 0x7E7C7181, 0x707C7C70,
+ 0x7B717A7C, 0x7C7D737A, 0x717D7E75, 0x7870797A,
+ 0x79786E7A, 0x6B7A7C70, 0x71667577, 0x6E6C6173,
+ 0x66706C61, 0x70657571, 0x72706572, 0x61706C61,
+ 0x6C61706C, 0x6E6C6170, 0x59646258, 0x574F6563,
+ 0x5A58505A, 0x4456554B, 0x4C484E4C, 0x4F4C484F,
+ 0x65595953, 0x6B65696B, 0x787C7669, 0x99828680,
+ 0xA09699A0, 0x99A29898, 0xB1B0B9AF, 0xB9AFB0B8,
+ 0xB1B9AFB0, 0xB6B9BDB7, 0xBBB6B8BC, 0xB8BCB6B7,
+ 0xB4BBBFB9, 0xB9B3B8BD, 0xB8BDB4B5, 0xB3B9BEB5,
+ 0xBDB2B8BE, 0xB6BBB2B9, 0xB9B7BEB7, 0xBEB9B7BE,
+ 0xB7BDB8B8, 0xB9BABCB6, 0xBFB9BDBF, 0xBDBFB9BD,
+ 0xB6BABCB6, 0xBEB8B8BC, 0xBABEB8BA, 0xB7B7BEB7,
+ 0xBFB8B7BE, 0xB8BEB9B8, 0xB6B7BDB8, 0xBDB8B4BB,
+ 0xB7BDB8B6, 0xB7B6BDB6, 0xBEB9B7BE, 0xB9BFBAB8,
+ 0xB9B5BBB6, 0xBEB9B8BE, 0xB9BDB8BA, 0xB6B8BFB8,
+ 0xBBB4B6BD, 0xB7BEB7B4, 0xB7B6BCB7, 0xBDB8B6BC,
+ 0xB8BCB7B9, 0xB8B7BEB7, 0xBBB9B7BD, 0xB8BBB9B8,
+ 0xB4B8BCB7, 0xB7B2B5B9, 0xB8BCB7B3, 0xB5B8BCB6,
+ 0xB9B3B7BB, 0xB7BBB5B5, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB5B9B4B8, 0xB0AFB3AE, 0xB4AFB1B5, 0xACB0ABB0,
+ 0xAFAEB1AF, 0xB3AEAEB1, 0xA4A8A3AF, 0x9FA1A5A0,
+ 0xA49FA0A4, 0xA0A3A1A0, 0x89888B89, 0x8B89888B,
+ 0x767A7588, 0x59666967, 0x544B5A5E, 0x4A484053,
+ 0x42484340, 0x43404843, 0x4F4C4848, 0x4E52544E,
+ 0x625C5054, 0x61625960, 0x65686960, 0x6C646D6E,
+ 0x6A68606E, 0x6B6F6C67, 0x706B7370, 0x79757074,
+ 0x7177746F, 0x746F7976, 0x76746C77, 0x6D75746A,
+ 0x786E7979, 0x7A786E7A, 0x6E76776D, 0x74687579,
+ 0x72736972, 0x737B7C73, 0x79707B7C, 0x7A787078,
+ 0x727D7C72, 0x7C727E7C, 0x6A685E7E, 0x6F6D6B63,
+ 0x776F7977, 0x79776F79, 0x6F7A7870, 0x7C737778,
+ 0x797C737B, 0x7075786F, 0x79707679, 0x7A7D7476,
+ 0x78797C73, 0x81787E81, 0x7D7E7580, 0x727B7C72,
+ 0x7E75797D, 0x7B7C737D, 0x777B7A76, 0x7B777C7B,
+ 0x7A79757C, 0x77777874, 0x77737A7B, 0x75747078,
+ 0x75777470, 0x76737D78, 0x7C78737B, 0x707A7772,
+ 0x77727A78, 0x7878727A, 0x00585753, 0x00000001,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x29282400,
+ 0x505C5A52, 0x71675D5B, 0x73716773, 0x66716F65,
+ 0x6E667270, 0x6A695F71, 0x4D65645A, 0x4C425857,
+ 0x4D4C424D, 0x353C3A32, 0x05073D3A, 0x0805070A,
+ 0x05080507, 0x3E390806, 0x5D5B5341, 0x58626359,
+ 0x75696264, 0x76746975, 0x6878766B, 0x7C6E7776,
+ 0x8380727F, 0x737A796B, 0x7E6E8283, 0x8282727D,
+ 0x7080806E, 0x84748080, 0x82817384, 0x6A807F71,
+ 0x73617A7A, 0x6D6B5975, 0x3C6D6B59, 0x01004848,
+ 0x00000002, 0x00000000, 0x00000000, 0x00010000,
+ 0x4A262725, 0x746F4D4E, 0x70746E70, 0x686E7469,
+ 0x74686E75, 0x6F736870, 0x696E736A, 0x736D6D72,
+ 0x7377716F, 0x71717871, 0x79727078, 0x70787171,
+ 0x5E717772, 0x38365D63, 0x373A3835, 0x393A3E39,
+ 0x3E393A3E, 0x373B363A, 0x37383C37, 0x3B35383C,
+ 0x373B3637, 0x3B3A3D3B, 0x3D3B3A3D, 0x3A3D3B3A,
+ 0x3C383D3B, 0x3F3D3B41, 0x3C3F3D3A, 0x43454644,
+ 0x45434445, 0x48494744, 0x4B474846, 0x4D4B4C4D,
+ 0x4C4D4B4C, 0x4F4E514F, 0x514F4E51, 0x1B1E1C4E,
+ 0x06060907, 0x07070508, 0x07090905, 0x10101010,
+ 0x0B0B1010, 0x0000000B, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00010000, 0xA343453F, 0xACA1A9AC, 0xA8ACA1A8,
+ 0xA0A4AA9F, 0xA9A0A4A9, 0xA3A89FA4, 0x9FA1A99F,
+ 0xAAA0A1A9, 0xA0A89EA2, 0x9DA1A99F, 0xA79D9FA7,
+ 0x9FA79D9F, 0x9C9EA69B, 0xA5989FA7, 0x9DA6999C,
+ 0x99A0A69B, 0xA39A9EA4, 0xA0A39AA0, 0x98A0A499,
+ 0xA3969FA3, 0x9EA5989C, 0x99A0A498, 0xA3989EA4,
+ 0x9BA3989B, 0x959CA095, 0xA1969CA0, 0x999F949D,
+ 0x949BA196, 0xA095999F, 0x9CA0959A, 0x959C9F96,
+ 0x9F969E9F, 0x9B9C929E, 0x979C9D93, 0x9C92A0A1,
+ 0x9C9D939B, 0x97A0A197, 0x9E959FA0, 0x9B9E959D,
+ 0x929CA095, 0x9F949A9E, 0x969C9199, 0x949AA095,
+ 0xB4A99AA1, 0x70766BB0, 0x00000400, 0x04000004,
+ 0x70786E00, 0x99A0A79A, 0xA898A1A8, 0x9EA79A9E,
+ 0x99989F92, 0x9F969EA4, 0x99A1979A, 0x9A9DA59A,
+ 0xA59A9DA5, 0x9BA1969F, 0x999EA499, 0xA1979EA4,
+ 0x99A09999, 0x9798A099, 0xA19A98A1, 0x99A09999,
+ 0x3199A099, 0x00003236, 0x00000100, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00010000, 0x00000000, 0x04070707,
+ 0x57530506, 0x80807A58, 0x7B83847B, 0x847B8384,
+ 0x83847B83, 0x7A88877D, 0x847A8686, 0x8A897F85,
+ 0x7889897D, 0x847A8484, 0x86847A86, 0x7B88897F,
+ 0x847A8485, 0x84857B83, 0x7E848478, 0x83798A8A,
+ 0x83827884, 0x7B86857B, 0x857B8685, 0x84827887,
+ 0x7A85847A, 0x847A8584, 0x86847A86, 0x76818076,
+ 0x82797F80, 0x82817781, 0x7A85847A, 0x81778584,
+ 0x807E7483, 0x72838177, 0x83777D7C, 0x7B7B6F81,
+ 0x707F7D72, 0x82787D7B, 0x7E7C7284, 0x717E7C72,
+ 0x7C727C7B, 0x7D7C727D, 0x6979786E, 0x756B7473,
+ 0x75746A76, 0x6A7E7C71, 0x71637978, 0x7B786A74,
+ 0x62727163, 0x71667170, 0x76746973, 0x586E6C61,
+ 0x63586563, 0x64635965, 0x4D626157, 0x554D5755,
+ 0x4B4C4357, 0x4047483F, 0x5A564849, 0x5B5A565B,
+ 0x74676963, 0x8D84767A, 0x898E8588, 0x9990948E,
+ 0xB0A59DA2, 0xB6BDB0AA, 0xB4B5BAB1, 0xBEB4B6BE,
+ 0xB5BDB3B6, 0xB6BABFB6, 0xBFB8BABF, 0xB8BFB8B8,
+ 0xB7B8BFB8, 0xBEB9B7BE, 0xB6BCB7B8, 0xB2B3B8AF,
+ 0xBBB2B8BB, 0xB6BBB2B6, 0xB7B8BFB8, 0xBFB8B7BE,
+ 0xB8BFB8B8, 0xB9BBBDB7, 0xBEBABDBF, 0xBDBEBABD,
+ 0xBABDBEBA, 0xBBB6BBBF, 0xB6BCB7B7, 0xBBB9BFBA,
+ 0xBFBABAC0, 0xB9BEBCBB, 0xB9BABFBD, 0xBBB9B6BB,
+ 0xB6BCB7B6, 0xB9B7BEB7, 0xC0B9B9C0, 0xB7BEB7B9,
+ 0xB8B7BDB8, 0xBDB8B9BD, 0xB7BDB8B7, 0xB7B9BDB8,
+ 0xBEB9B8BC, 0xB7BDB8B8, 0xB0B7BBB6, 0xB5AFB1B5,
+ 0xABAFA9B1, 0xB6B7BBB6, 0xBAB8B7BB, 0xBABDBBB7,
+ 0xB7B7BDB8, 0xBCB7B6BC, 0xB7BDB8B6, 0xB5B8BCB7,
+ 0xBBB6B6BA, 0xB9BDB8B7, 0xB7B5BCB5, 0xBBB6B7BE,
+ 0xB5BBB6B5, 0xAEB3B7B2, 0xB4AFAFB3, 0xB4B8B3B0,
+ 0xAEADB3AE, 0xB3AEADB3, 0xACB0ABAD, 0xA8A8ACA7,
+ 0xADA9A9AD, 0xA6A7A3AC, 0x9A989B99, 0x938E999C,
+ 0x90948E8F, 0x74898F8A, 0x645E767A, 0x62645E60,
+ 0x40575652, 0x43404744, 0x47444048, 0x4D4A4B47,
+ 0x57534E52, 0x5C5E5856, 0x6361615B, 0x68626969,
+ 0x68686268, 0x68707168, 0x71697071, 0x726F6773,
+ 0x66706E66, 0x73696E6F, 0x72736972, 0x6C727167,
+ 0x78707776, 0x7A796F7A, 0x6D76776D, 0x776D7478,
+ 0x7A7B7176, 0x747F7D75, 0x776F7C79, 0x78766E79,
+ 0x767F7D75, 0x776F807E, 0x6C6A6279, 0x6C706E64,
+ 0x786E7876, 0x79776D7A, 0x6F7A796F, 0x7A717879,
+ 0x7B7C7379, 0x707B7C73, 0x7C737879, 0x7D7E757B,
+ 0x737E7F75, 0x7E767C7D, 0x7F807780, 0x6F77786E,
+ 0x7E757879, 0x7D7E757D, 0x767B7A76, 0x7B777D7A,
+ 0x807D797E, 0x73787872, 0x7A767979, 0x7D7A767D,
+ 0x727B7675, 0x73707A75, 0x78746F78, 0x727B7772,
+ 0x78757B77, 0x7C79757D, 0x24787773, 0x00002928,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x27282400,
+ 0x50585950, 0x68605B5A, 0x7371676A, 0x6976746A,
+ 0x70667674, 0x6B695F72, 0x5166645A, 0x4F495C5B,
+ 0x44443E4F, 0x33383930, 0x04063B38, 0x08050709,
+ 0x00020001, 0x18160001, 0x44433F17, 0x4953504B,
+ 0x71675351, 0x72726672, 0x68747267, 0x7C717573,
+ 0x807C7180, 0x6E79786A, 0x80707D7C, 0x80807080,
+ 0x6D7F7F6F, 0x80707D7D, 0x807F7180, 0x6F7E7D6F,
+ 0x70607E7D, 0x65655370, 0x35626451, 0x01004144,
+ 0x00000000, 0x00000000, 0x01000000, 0x27282403,
+ 0x796E706A, 0x746E7B7F, 0x70756C72, 0x6E757B70,
+ 0x796E7179, 0x74797073, 0x6E71746B, 0x79707274,
+ 0x74797076, 0x7071796F, 0x786E717A, 0x7078716D,
+ 0x79767C77, 0x5957787B, 0x55595456, 0x4A4E504A,
+ 0x504A4E50, 0x4E504A4E, 0x4A4E504A, 0x4F4B4E50,
+ 0x4C504B4E, 0x504E514F, 0x50504E50, 0x4E50504E,
+ 0x514E5352, 0x54534E53, 0x4E53514F, 0x51505351,
+ 0x53515253, 0x50544F50, 0x57575B56, 0x5C57585C,
+ 0x585C5758, 0x9C6D736E, 0xA29D9BA1, 0x9BA19C9C,
+ 0xA3A0A6A1, 0xA5A3A2A8, 0xA2A5A3A2, 0xB9B8BBB9,
+ 0x7D7BB8BB, 0x0001007C, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00010000, 0xA143453F, 0xADA1A8AC, 0xA8ACA0A9,
+ 0xA0A4A9A0, 0xA9A0A4A9, 0xA3ABA1A4, 0x9FA0A89E,
+ 0xA7A0A0A9, 0xA0A7A0A0, 0x9D9FA79D, 0xA79D9FA7,
+ 0x9FA79D9F, 0x999FA79C, 0xA6999CA4, 0x9FA6999F,
+ 0x99A0A69B, 0xA299A0A4, 0xA0A39A9F, 0x98A0A499,
+ 0xA3969DA3, 0x9DA4979C, 0x989EA598, 0xA4999DA3,
+ 0x9EA4999E, 0x959DA299, 0xA0959CA0, 0x9CA0949C,
+ 0x92969C91, 0x9E95959D, 0x999E9599, 0x969C9F96,
+ 0x9B939E9F, 0x97988E9D, 0x949E9F95, 0x9B919D9E,
+ 0x9D9E949A, 0x969D9E95, 0x9B959E9F, 0x9D9E959B,
+ 0x8E9A9C90, 0x9C90989D, 0x9B9F9398, 0x929CA094,
+ 0xA2939CA1, 0xAFB3A79D, 0x00393D37, 0x04000004,
+ 0x00040000, 0x996A7065, 0xA7989FA6, 0x9FA89BA0,
+ 0x959AA194, 0x998E9AA0, 0x999F9493, 0x9BA1A99E,
+ 0xA0959EA6, 0x9AA0959A, 0x97A0A499, 0x9E959CA2,
+ 0x99A09999, 0x9999A19A, 0xA09998A0, 0x99A09998,
+ 0x00323631, 0x00000001, 0x00000100, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000001, 0x00010100, 0x00000000, 0x2C070505,
+ 0x7F7B2F2D, 0x80807A80, 0x7C85867D, 0x86808485,
+ 0x85867D86, 0x7B88877D, 0x857B8787, 0x89887E86,
+ 0x7989897D, 0x8C828585, 0x88877D8E, 0x7C86857B,
+ 0x83798586, 0x86877D82, 0x788A8A7E, 0x897F8484,
+ 0x88897F88, 0x7B87867C, 0x887E8685, 0x87857B8A,
+ 0x7F85847A, 0x80768A89, 0x7D7C7281, 0x78807E76,
+ 0x81788081, 0x7F7E7480, 0x747C7B71, 0x83797F7E,
+ 0x83817785, 0x727F7E74, 0x7E727E7E, 0x76766A7C,
+ 0x6E767469, 0x7C727D79, 0x7F7D737E, 0x73838177,
+ 0x7C727F7D, 0x7C7B717D, 0x717A786E, 0x786E7D7B,
+ 0x72726679, 0x6A79786A, 0x786A7978, 0x79786A79,
+ 0x5F737264, 0x6C616E6D, 0x7270656E, 0x586E6C61,
+ 0x594F6563, 0x5B5A505A, 0x4357554D, 0x4D444D4B,
+ 0x4041384C, 0x55474741, 0x6D6C5B5B, 0x6C6D6B6F,
+ 0x84767A74, 0x8D84888D, 0x888D8488, 0x9992958C,
+ 0xBDB19FA2, 0xB8BCB0B9, 0xB4B8BDB4, 0xC1B7B8BD,
+ 0xB9C1B7B9, 0xB7BCC2B7, 0xBEB8BCC2, 0xB9C0B9BA,
+ 0xB9B8BFB8, 0xBEB9B9C0, 0xB8BEB9B7, 0xB4B6BAB4,
+ 0xBBB2B8BD, 0xB4B9B0B6, 0xB7B7BEB7, 0xBFB8B7BE,
+ 0xB8BFB8B8, 0xB7BBBFB9, 0xBFBABBBD, 0xBBBEBCBB,
+ 0xBCBDBEBA, 0xBEBCBDC1, 0xB9BEBCB9, 0xBAB5BBB6,
+ 0xBEBCB9BF, 0xBBBEBCBB, 0xBCBBC0BF, 0xBFBDB8BD,
+ 0xB8BBB9BA, 0xB7B7BDB8, 0xBFB8B7BE, 0xB7BEB7B8,
+ 0xB8B6BCB7, 0xBDB8B9BD, 0xB8BEB9B7, 0xB6B8BCB7,
+ 0xBEB9B7BB, 0xB7BDB8B8, 0xB7B8BCB7, 0xAEA8B8BC,
+ 0xA2A6A0AA, 0xB5B7BBB6, 0xBDBBB6BA, 0xBABDBBBA,
+ 0xB7B8BEB9, 0xBDB8B6BC, 0xB7BDB8B7, 0xB6B7BBB6,
+ 0xBCB7B7BB, 0xB8BCB7B8, 0xB5B6BDB6, 0xBCB7B5BC,
+ 0xB5BBB6B6, 0xB2B3B7B2, 0xB9B4B3B7, 0xB5B9B4B5,
+ 0xB3B2B9B2, 0xB2ADB3BA, 0xADB3AEAC, 0xAEAEB4AF,
+ 0xACA8AFB3, 0xA6A7A3AB, 0x9FA7ABA6, 0x9D98A0A4,
+ 0x989C9699, 0x898A918A, 0x79748990, 0x60645F75,
+ 0x53696A66, 0x44405857, 0x47444047, 0x474A4B47,
+ 0x514D4A4B, 0x56575350, 0x545B5B55, 0x615B5A5A,
+ 0x69696361, 0x686C6D64, 0x69617071, 0x6F6D656B,
+ 0x656E6F66, 0x73686E6F, 0x7273696F, 0x717B7971,
+ 0x746C7B79, 0x76746C76, 0x717B7C73, 0x7B71787C,
+ 0x76776D7A, 0x6D7B7971, 0x79717775, 0x7B79717B,
+ 0x6F78766E, 0x776F7977, 0x6C6A6279, 0x736F6D63,
+ 0x766D7F7D, 0x78766C7B, 0x747E7D73, 0x7D747D7E,
+ 0x7879707C, 0x757D7B73, 0x80777F7D, 0x7E7F767F,
+ 0x717C7D73, 0x7E767A7B, 0x82807880, 0x6E808177,
+ 0x7D747778, 0x7D7E757C, 0x767D7A75, 0x7A767D7A,
+ 0x7D7A767D, 0x757E7B76, 0x7B787D7A, 0x7D787580,
+ 0x787D7877, 0x7572807B, 0x7B76737A, 0x6F78746F,
+ 0x73707874, 0x7C797578, 0x4C7A7773, 0x01005150,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x26282200,
+ 0x4F585852, 0x69605758, 0x72706868, 0x6576746A,
+ 0x6C617270, 0x6B695F6E, 0x5166645A, 0x4F495B59,
+ 0x42433F4F, 0x31383930, 0x05063737, 0x0805070A,
+ 0x00000001, 0x01000000, 0x16171500, 0x4B54514D,
+ 0x51495350, 0x72716753, 0x68747369, 0x7B727573,
+ 0x807C7180, 0x6E79786A, 0x7C6D7D7C, 0x7F7F6F7F,
+ 0x6D818171, 0x80707D7D, 0x807F7180, 0x717E7C71,
+ 0x71637E7C, 0x64645472, 0x34626353, 0x01004043,
+ 0x00000000, 0x00010101, 0x504C0001, 0x75777151,
+ 0x6C70756C, 0x756C7075, 0x70756C70, 0x6F727A70,
+ 0x7970727A, 0x757A7174, 0x6F767970, 0x776E7578,
+ 0x74797074, 0x6F71796F, 0x7A727079, 0x7078716F,
+ 0x77767C77, 0xBEBC787C, 0xBBBFBABB, 0xB4B8BCB6,
+ 0xBEB5BABD, 0xB9BBB5BB, 0xB6BABCB6, 0xBBB7BABC,
+ 0xBABBB7BA, 0xB8B6B9B7, 0xB8B9B6B8, 0xB6B8B9B6,
+ 0xB7B3B8B7, 0xB8B7B2B8, 0xB2B8B7B2, 0xB1B1B4B2,
+ 0xB5B0B2B3, 0xAFB3AEB1, 0xAFB0B4AF, 0xB5B0B0B4,
+ 0xADB3AEB1, 0xB1B1B8B1, 0xB8B1B0B8, 0xB1B8B1B1,
+ 0xB7B5BBB6, 0xBCB7B6BC, 0xB8BCB7B8, 0xB8B8BBB9,
+ 0x7D7BB7BA, 0x0001007C, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x01020000, 0xA143453F, 0xAB9FA8AC, 0xA6ADA0A7,
+ 0xA1A2AAA0, 0xA99FA1A8, 0xA1A99FA1, 0xA0A0A7A0,
+ 0xA7A0A0A7, 0xA0A7A0A0, 0x9A9DA59B, 0xA49B9FA5,
+ 0xA2A79E9F, 0x9AA1A69D, 0xA5999FA5, 0xA0A498A1,
+ 0x9B9FA398, 0xA59AA1A4, 0xA0A499A1, 0x989CA297,
+ 0xA2979DA3, 0x9BA3989C, 0x999AA297, 0xA1989DA2,
+ 0x9DA2999C, 0x9A9DA19B, 0x9F949EA3, 0x999D929B,
+ 0x92979D92, 0x9C93979D, 0x979C9397, 0x929DA097,
+ 0x988E989B, 0x9B9C9297, 0x929A9B91, 0x9C909A9E,
+ 0x9A9B9198, 0x939A9B92, 0x9B959D9B, 0x97988F9B,
+ 0x95989C91, 0x9F949DA1, 0x9FA1959B, 0x949CA094,
+ 0xA1959CA0, 0xB0B4A99D, 0x00ABB0A7, 0x05000004,
+ 0x02030001, 0x67000200, 0xA59A6B70, 0x9FA6999F,
+ 0x99A1A599, 0xA498A1A5, 0xA0A499A0, 0x9A9FA59A,
+ 0x9F969DA5, 0x9FA49B9A, 0x969EA39A, 0x9E989A9F,
+ 0x989F989A, 0x9998A099, 0xA09998A0, 0x7B817C98,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000100, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x7A2F2E2A,
+ 0x7F7A8080, 0x80817882, 0x7D85867D, 0x857C8586,
+ 0x85837B84, 0x7D8A897F, 0x847C8887, 0x8A897F86,
+ 0x7D8A887D, 0x887E8A88, 0x8A88808A, 0x7F8A897F,
+ 0x887D8889, 0x86877D84, 0x6F848478, 0x84787D7D,
+ 0x89897D84, 0x7B838278, 0x857A8685, 0x84827787,
+ 0x8085847A, 0x8B7F8B8A, 0x8585798B, 0x757F7E74,
+ 0x7E74807F, 0x7D7C727F, 0x767C7B71, 0x857A8282,
+ 0x807E7387, 0x6F7E7E72, 0x7B6F7B7B, 0x7B7B6D7B,
+ 0x697A786D, 0x786D7674, 0x7A786D7A, 0x6E7D7C72,
+ 0x796E7978, 0x7A786D7B, 0x6D7E7C71, 0x7A6E7A78,
+ 0x7575697A, 0x63717163, 0x71657171, 0x71716571,
+ 0x60727065, 0x695F6D6B, 0x6A695F6A, 0x50656359,
+ 0x59515C5A, 0x5250485B, 0x434B4C43, 0x41384B4C,
+ 0x4B4B4540, 0x6B5A5B57, 0x6B6B6C6D, 0x7F82806B,
+ 0x84898D87, 0x8E84868E, 0x868E8486, 0xB19DA299,
+ 0xBCB0B6BC, 0xB9BDB1B8, 0xB9B8BDB4, 0xBDB6B9C0,
+ 0xB9C1B7B6, 0xB8BBC1B6, 0xBEB8BDC3, 0xBABEB8BA,
+ 0xB8B8BFB8, 0xBFB8B8BF, 0xB7BEB7B8, 0xB7B8BDB4,
+ 0xBEB3BBC0, 0xB6BEB4B8, 0xB6B6BDB6, 0xBCB7B6BD,
+ 0xB7BDB8B6, 0xB9BBBFB9, 0xC0BBBBBF, 0xBBBFBABC,
+ 0xB9BBBFBA, 0xBEB9BABE, 0xBAC0BBB8, 0xB7BBBFBA,
+ 0xBFBAB8BC, 0xBCC1BFBB, 0xBCB9BFBE, 0xBFBDB7BD,
+ 0xB7BCBABA, 0xB8B7BDB8, 0xBEB9B7BD, 0xB6BCB7B8,
+ 0xB8B7BDB8, 0xBCBAB7BD, 0xB7BAB8B9, 0xB7B6B9B7,
+ 0xBBB9B6B9, 0xB7BDB8B6, 0xB5B8BCB7, 0xBDB8B7BB,
+ 0xB9BDB8B9, 0xBBB8BDBB, 0xBBB6BABD, 0xBABEB9B7,
+ 0xB7B7BDB8, 0xBDB8B6BC, 0xB7BBB6B9, 0xB8B7BBB6,
+ 0xBCB7B9BD, 0xB8BCB7B8, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB5B9B4B8, 0xB4B0B6B1, 0xB9B4B3B9, 0xB5B9B4B5,
+ 0xB3B3B9B4, 0xB9B2B2B8, 0xB1B8B3B1, 0xB0ACB3B0,
+ 0xADA8ADB2, 0xAAAEA9A9, 0x9FA8ACA7, 0xA49FA0A4,
+ 0xA0A49FA0, 0x8B9FA39E, 0x8E8C8C90, 0x8B8E8C8B,
+ 0x68666967, 0x6967696A, 0x58565568, 0x474B4A46,
+ 0x524E4A4B, 0x52514D51, 0x5557544F, 0x5A555D5A,
+ 0x625F5A5D, 0x666B6863, 0x68636E6B, 0x6B69616B,
+ 0x5F6B6C63, 0x6D636869, 0x6E6F666C, 0x6A737169,
+ 0x706B726F, 0x77746C74, 0x6D72736A, 0x756C7576,
+ 0x72736974, 0x7178776D, 0x7A707C7B, 0x75766C79,
+ 0x6E7A7870, 0x786F7876, 0x73716977, 0x71757369,
+ 0x7C717F7A, 0x7E7C7280, 0x737D7C72, 0x7C737B7C,
+ 0x7B7C737B, 0x747D7B73, 0x7C737E7C, 0x7B7E757B,
+ 0x757C7D73, 0x81787E7F, 0x80817880, 0x6F818279,
+ 0x7C737778, 0x7B7C7379, 0x747D7A75, 0x78737C79,
+ 0x7D7A757B, 0x757D7A75, 0x78737E7A, 0x7E7B767B,
+ 0x757D7875, 0x73707D78, 0x807C7778, 0x78817C79,
+ 0x7673807B, 0x7875717B, 0x737A7772, 0x26257979,
+ 0x03010028, 0x00020000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x26282200,
+ 0x50585852, 0x6A615859, 0x70716869, 0x626D6C62,
+ 0x6D636D6C, 0x69685E6E, 0x5066645A, 0x4E4A5C5A,
+ 0x42433F4F, 0x32363930, 0x06063638, 0x08050708,
+ 0x00000001, 0x00000000, 0x00010000, 0x4B14130F,
+ 0x51495350, 0x53524853, 0x6A6A695F, 0x73687574,
+ 0x75736875, 0x697A796B, 0x7C6C7979, 0x7E7E6E7C,
+ 0x6D7D7D6D, 0x7C6E7D7D, 0x7F7C6E7D, 0x71817D72,
+ 0x6F61807C, 0x65655572, 0x36626353, 0x02004042,
+ 0x00010000, 0x73292726, 0x79707877, 0x777A7176,
+ 0x7270756C, 0x7A74767B, 0x757D7376, 0x7071796F,
+ 0x7B70727A, 0x747A6F75, 0x6F767C71, 0x7C71747A,
+ 0x757A7178, 0x71717871, 0x77727078, 0x70787170,
+ 0xB9757D76, 0xBFBAB9C0, 0xB9BFBAB9, 0xB6B6BDB6,
+ 0xBCB6B8BC, 0xB8BCB7B8, 0xB7B8BCB7, 0xBCB6B8BC,
+ 0xB9BDB8B8, 0xB8B7B8B6, 0xB9B9B8B8, 0xB6B8B8B9,
+ 0xB8B2B7B8, 0xB8B8B0B8, 0xB2B8B7B0, 0xB1B0B3B1,
+ 0xB3AEB0B3, 0xB0B4AFAF, 0xB1B0B4AF, 0xB4AFB0B3,
+ 0xAFB5B0B0, 0xAEB2B9B2, 0xB9B2AFB8, 0xB0B8B1B1,
+ 0xB0B6BDB8, 0xB4AFAEB5, 0xAFB5B0AE, 0xB9B8BBB9,
+ 0x7D7BB8BB, 0x0001007C, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00010000, 0xA210120C, 0xACA0A8AB, 0xA8ACA0A8,
+ 0xA0A4A9A0, 0xA9A0A2AA, 0xA2AAA0A4, 0xA0A0A7A0,
+ 0xA7A0A0A7, 0xA2A79EA0, 0x9AA1A79C, 0xA79C9FA5,
+ 0x9FA59AA1, 0x999FA49B, 0xA498A0A4, 0xA2A498A0,
+ 0x99A3A49A, 0xA499A2A3, 0x9EA297A0, 0x989FA398,
+ 0xA3989DA3, 0x9CA2979D, 0x969CA297, 0xA2999A9F,
+ 0x9CA1989D, 0x96999D97, 0x9C919C9F, 0x9B9F9498,
+ 0x92999F94, 0xA198979D, 0x9B9E959C, 0x90969990,
+ 0x9C929699, 0x999D929B, 0x909A9E92, 0x9C90989C,
+ 0x999D9298, 0x939E9F95, 0x9C939B9C, 0x9699909B,
+ 0x949BA196, 0xA196999F, 0x9B9F949D, 0x949CA095,
+ 0xA0959CA0, 0x9DA1969C, 0x6FABB1A6, 0x04007378,
+ 0x02030002, 0x00000100, 0x6F660001, 0xA2A69B6C,
+ 0x989FA397, 0xA094A0A4, 0xA0A4989E, 0x9A9FA699,
+ 0x9F969FA5, 0x9FA49B9A, 0x949CA198, 0x9E98989D,
+ 0x989F989A, 0x9998A099, 0x9F9A98A0, 0x40434199,
+ 0x01000000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010100, 0x00000000, 0x00010000,
+ 0x00000100, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x01000000, 0x01020000, 0x7A585753,
+ 0x80788080, 0x83817982, 0x7B85867D, 0x89808384,
+ 0x8A888088, 0x7F86857B, 0x88808A89, 0x88877D8A,
+ 0x7E8E8C82, 0x847A8B89, 0x85847A86, 0x7987867C,
+ 0x84798283, 0x84857B80, 0x708B8B7F, 0x776B7C7C,
+ 0x7D7D7177, 0x7B86857B, 0x82778685, 0x87857A84,
+ 0x7A85847A, 0x847A8584, 0x7F807683, 0x77808177,
+ 0x7F758281, 0x807F7580, 0x767F7F73, 0x7E738282,
+ 0x807E7380, 0x73828276, 0x7B6F7F7F, 0x7A7A6E7B,
+ 0x6D7D7D71, 0x7C717979, 0x79796D7E, 0x727F7D73,
+ 0x786E7E7C, 0x7674697A, 0x6D7D7D71, 0x73697979,
+ 0x75756974, 0x60717165, 0x6B5F6C6C, 0x7170666B,
+ 0x65767469, 0x695F7270, 0x6A695F6A, 0x475B5A50,
+ 0x50485251, 0x50514852, 0x383F4037, 0x4C434041,
+ 0x5F5F594B, 0x7D6C6E68, 0x817F8081, 0x7E817F7E,
+ 0x97888C86, 0xA19799A1, 0x99A19799, 0xB2B6BCB1,
+ 0xBCB1B7BD, 0xB6BCB1B6, 0xB5B6BDB6, 0xC0B9B5BC,
+ 0xB9C0B9B9, 0xB8BBC0B7, 0xBFB9BCC1, 0xB9BDB7BB,
+ 0xB8B8BFB8, 0xBFB8B8BF, 0xB8BFB8B8, 0xB7B8BCB6,
+ 0xBEB4BBC0, 0xB6BEB4B6, 0xB9B8BFB8, 0xBDB8B8BE,
+ 0xB6BCB7B7, 0xBAB9BDB8, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBBBDC1BC, 0xC1BCBCC0, 0xB9BFBABB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBCC0BBBB, 0xBBB9C0BD, 0xBEBCB7BE,
+ 0xB9BEBCB9, 0xB8B8BEB9, 0xBDB8B7BD, 0xB9BDB8B9,
+ 0xB7BABEB9, 0xBDB8B8BC, 0xB8BBB9B9, 0xBAB9BCBA,
+ 0xBBB9B9BC, 0xB6BCB7B6, 0xB6B8BCB7, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xBCB8BDBB, 0xBBB6B9BE, 0xBABEB9B7,
+ 0xB8B6BCB7, 0xBDB8B7BD, 0xB5B9B4B9, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B7BBB6, 0xBCB7B8BC,
+ 0xB5B9B4B8, 0xB7B6BAB5, 0xBCB7B8BC, 0xB5B9B4B8,
+ 0xB3B2B8B3, 0xB9B2B2B8, 0xB2B8B3B2, 0xB6B4B9B7,
+ 0xB3AEB3B8, 0xAFB3AEAF, 0xA7A8ACA7, 0xACA7A8AC,
+ 0xA8ACA7A8, 0x9EA0A49F, 0x8E8C9FA3, 0x8B8E8C8B,
+ 0x79787B79, 0x6967787B, 0x68696766, 0x475B5C58,
+ 0x524E4A4B, 0x4C4B4751, 0x56575450, 0x5A555E5B,
+ 0x63605B5D, 0x5F67645F, 0x6B666764, 0x6B68636E,
+ 0x5F686960, 0x6C636869, 0x6E6F666B, 0x666D6E65,
+ 0x6C64706E, 0x6F6D656F, 0x67727068, 0x746B6F70,
+ 0x73746A73, 0x6C78786C, 0x766C7878, 0x73746A75,
+ 0x7579776F, 0x776E7F7D, 0x79776F76, 0x7279776D,
+ 0x7C71807B, 0x7E7C7280, 0x737A7870, 0x81787B7C,
+ 0x7879707E, 0x757B7C73, 0x7C737D7E, 0x7B7C737B,
+ 0x777F8076, 0x7F768081, 0x8081787E, 0x73808178,
+ 0x7C737B7C, 0x7D7E7579, 0x757F7C77, 0x7B757D7A,
+ 0x7D7D777B, 0x777B7873, 0x7974807C, 0x7B78737C,
+ 0x777F7C77, 0x7974807C, 0x807C777D, 0x787F7C78,
+ 0x7C787F7C, 0x7F7C777F, 0x72797671, 0x514D7878,
+ 0x02000052, 0x00020000, 0x01000200, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x26282200,
+ 0x50585852, 0x69605859, 0x70716866, 0x66717066,
+ 0x685F7170, 0x696A6067, 0x4F66645A, 0x4E495A59,
+ 0x44443E51, 0x32363930, 0x06063638, 0x08050708,
+ 0x00000001, 0x00000000, 0x00010000, 0x2E151410,
+ 0x504B3434, 0x53514953, 0x60626157, 0x73696B6A,
+ 0x75736874, 0x6A767567, 0x79697A7A, 0x7C7C6C79,
+ 0x6B7D7D6D, 0x796B7B7B, 0x7F7C6E7A, 0x71807C71,
+ 0x7062807C, 0x58574971, 0x36626254, 0x01004042,
+ 0x00010000, 0x72272824, 0x78727678, 0x74797076,
+ 0x7470756C, 0x7B74767A, 0x747B7474, 0x6F727A70,
+ 0x7C71747A, 0x767C7176, 0x6F767C71, 0x7B72747A,
+ 0x767B7278, 0x71717871, 0x77727178, 0x89918A70,
+ 0xB9B8C0B9, 0xC0B9B9C0, 0xB9BFBAB9, 0xB6B6BDB6,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B8BCB7, 0xBCB6B8BC,
+ 0xB7BBB6B8, 0xB8B8B9B7, 0xB7B7B8B8, 0xB6B8B8B7,
+ 0xB7B2B8B7, 0xB7B8B0B8, 0xB2B8B7B2, 0xB1AEB3B1,
+ 0xB4AFB0B3, 0xB0B4AFB0, 0xB1B0B4AF, 0xB4AFB0B3,
+ 0xB0B4AFB0, 0xB1B0B7B0, 0xB8B1B0B8, 0xB0B8B1B0,
+ 0xB0ADB4AF, 0xB5B0AEB5, 0xAFB5B0AF, 0xB9B8BCB7,
+ 0x7D7BB8BB, 0x0001007C, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0xA2090A06, 0xA9A0A6A8, 0xA8A99FA8,
+ 0xA0A6AA9F, 0xA9A0A6A9, 0xA4A9A0A6, 0xA1A0A8A1,
+ 0xA79DA0A8, 0xA3A89F9F, 0x9CA1A59A, 0xA69BA3A7,
+ 0xA2A69AA2, 0x98A1A59A, 0xA499A0A4, 0xA0A498A0,
+ 0x959DA196, 0xA1959DA1, 0x9DA1959D, 0x959DA195,
+ 0xA1959DA1, 0x9DA1959D, 0x939DA195, 0x9F949A9E,
+ 0x9B9F949B, 0x939A9D94, 0xA499999C, 0x9CA095A0,
+ 0x949BA097, 0x9C91989D, 0x989C9198, 0x9292958C,
+ 0x9C91989B, 0x989C9198, 0x8F959C8F, 0x9D92959C,
+ 0x989C9199, 0x92979B90, 0x9A8F999D, 0x979C9396,
+ 0x9999A099, 0xA19799A0, 0x92978E99, 0x93979A91,
+ 0x9E959A9E, 0x969A8F9B, 0x99A2A69A, 0x423CA1A5,
+ 0x10110D40, 0x00000100, 0x01000001, 0x90938A00,
+ 0x98A0A499, 0xA499A0A4, 0xA0A498A0, 0x95A0A498,
+ 0xA1959DA1, 0x9BA1969D, 0x939BA097, 0xA099959D,
+ 0x99A09999, 0x97969C97, 0x9C9A969C, 0x04060699,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000001, 0x01000000, 0x28292500, 0x7B757470,
+ 0x807B8380, 0x8A878283, 0x81888980, 0x8A81898A,
+ 0x88898089, 0x7F87887E, 0x89808889, 0x88897F88,
+ 0x7E8D8C82, 0x887D8A8A, 0x85847A8A, 0x7B85847A,
+ 0x847B8384, 0x88898083, 0x7A8A897F, 0x80768584,
+ 0x7E7C7282, 0x7E86847A, 0x887D8A88, 0x8A887D8A,
+ 0x7B86857B, 0x80788384, 0x80817782, 0x76828379,
+ 0x81758082, 0x8080747F, 0x7A8A897F, 0x80768584,
+ 0x7E7C7282, 0x76807F75, 0x7F757F80, 0x7E7D7380,
+ 0x6F7A796F, 0x796F7879, 0x7A796F7A, 0x6F7D7A72,
+ 0x79717A77, 0x7A796F7C, 0x6E73746A, 0x766E7778,
+ 0x72706878, 0x61707167, 0x685D6D6D, 0x6664596A,
+ 0x626E6C61, 0x63586F6D, 0x5B5A5065, 0x4056554B,
+ 0x49404849, 0x48494048, 0x4F3C3C36, 0x6F695355,
+ 0x6D70676D, 0x7A80837A, 0x827C8083, 0x8D918B80,
+ 0x9F9BA196, 0xB2A7A4AA, 0xB6BCB1AC, 0xB5B6BEB4,
+ 0xBDB4B7BF, 0xB9BDB7B8, 0xB9B6BEB7, 0xBDB8B7BE,
+ 0xB7BDB8B6, 0xB7B9BDB7, 0xBEB8B9BD, 0xB7BEB7BA,
+ 0xB8B8BFB8, 0xBFB8B8BF, 0xB8BFB8B8, 0xB7B8BFB8,
+ 0xBDB6B7BE, 0xB7BDB8B6, 0xBABCC0BB, 0xC0BEB9BC,
+ 0xBABDBBBD, 0xB9BABDBB, 0xBBB9B8BB, 0xBABDBBB8,
+ 0xBAB8BCB7, 0xBEB8BBBF, 0xB8BCB6BA, 0xBAB8BCB7,
+ 0xC0BCBBBF, 0xBBBFBABF, 0xBBB8BCB7, 0xBFBDB8BD,
+ 0xB7BCBABA, 0xB7BBBFBA, 0xBAB8B8BC, 0xBEBFBDB9,
+ 0xB9BCBDB9, 0xBBB6BABE, 0xB4BBB4B7, 0xB8B9BDB7,
+ 0xBEB8BABE, 0xBABEB9BA, 0xB6B8BEB9, 0xBAB8B7BB,
+ 0xBABDBBB7, 0xB9BBC0BE, 0xBCBAB6BB, 0xBABDBBB9,
+ 0xBAB5BBB6, 0xBCB7B9BF, 0xBABEB9B8, 0xBBB8BDBB,
+ 0xBBB9B8BD, 0xB8BBB9B8, 0xB7B8BCB7, 0xBBB6B8BC,
+ 0xB6BAB5B5, 0xB3B8BCB7, 0xBDB8B4B8, 0xB8BCB7B9,
+ 0xB4B5B9B4, 0xB7B2B5B9, 0xB2B6B1B3, 0xB2B3B7B2,
+ 0xB7B2B3B7, 0xB0B4AFB3, 0xA9AEB5AE, 0xB0A9A9B0,
+ 0xA9B0A9A9, 0xA7A8ACA7, 0xA39FA8AC, 0x989C97A2,
+ 0x8E8F938E, 0x807B8D93, 0x686C677A, 0x62626563,
+ 0x514F6364, 0x52504F50, 0x4B51504C, 0x5B555151,
+ 0x5D5B535B, 0x58605D58, 0x6360615D, 0x68645F68,
+ 0x65686960, 0x6F666B6E, 0x6B6C636E, 0x696C6F66,
+ 0x74687074, 0x6E706472, 0x6B727369, 0x796F7475,
+ 0x75746A7A, 0x6D727266, 0x796D7979, 0x79786E79,
+ 0x727E7C74, 0x78737C7A, 0x7B79717B, 0x7279776D,
+ 0x7C727E7C, 0x7D7C727E, 0x777D7E75, 0x7C737D7D,
+ 0x7B7C737B, 0x757B7C73, 0x7E757D7E, 0x7D7E757D,
+ 0x737D7E75, 0x7E757B7C, 0x7B7C737D, 0x757D7E75,
+ 0x79707D7E, 0x7D7E7578, 0x707B7C73, 0x7B757879,
+ 0x80807A7B, 0x757D7A75, 0x77727D7A, 0x7B78737A,
+ 0x79827F7A, 0x79718381, 0x7B78737C, 0x797E7D79,
+ 0x7A767C7D, 0x7A77727B, 0x767F7C77, 0x7C787E7B,
+ 0x3C3A397F, 0x01020000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x26282200,
+ 0x4F585852, 0x69605758, 0x70716866, 0x6676746A,
+ 0x6B637270, 0x68695F6D, 0x4C606157, 0x4C445658,
+ 0x45433B4F, 0x323A3B31, 0x06063A3B, 0x06050706,
+ 0x00000001, 0x00000000, 0x02000002, 0x00000100,
+ 0x2B250001, 0x4041382B, 0x5F535248, 0x695F6A69,
+ 0x6A695F6A, 0x656E6E62, 0x78687373, 0x78786878,
+ 0x6E7B7B6B, 0x7A6C7E7E, 0x7D7C6E7B, 0x6A7B7C6C,
+ 0x6F61797A, 0x5A5A4E6F, 0x30555549, 0x01003A38,
+ 0x00010002, 0x502A2B27, 0x7F7A5155, 0x7B7F7A7B,
+ 0x77787C77, 0x7C77787C, 0x787C7678, 0x73777D72,
+ 0x7D727A7E, 0x797D7279, 0x75787C76, 0x7C76777B,
+ 0x787C7678, 0x60666862, 0x857E6469, 0xB9C0B97E,
+ 0xB6C1C8C1, 0xBCB6B6BD, 0xB8BCB6B8, 0xB6B7BBB6,
+ 0xB8B2B7BB, 0xB6B8B2B6, 0xB5B7BBB5, 0xBCB6B7BB,
+ 0xB9BAB6B8, 0xB9B7BAB8, 0xB3B1B8BB, 0xB5B8B6B2,
+ 0xB8B5BAB8, 0xB9B8B4BB, 0xB4B9B8B4, 0xB7B4B7B5,
+ 0xB8B6B6B9, 0xB2B8B3B3, 0xB3B0B4AF, 0xB9B4B4B8,
+ 0xB5B9B4B5, 0xB4B1B7B2, 0xB7B2B3B9, 0xB3B9B4B1,
+ 0xB4B3B9B4, 0xB9B4B3B9, 0xB5B9B4B5, 0xB7B8BCB7,
+ 0x7D7BB8BC, 0x0000007C, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000101, 0x01000000,
+ 0x00010000, 0xA4080907, 0xA8A2A7A8, 0xA9AAA1A8,
+ 0x9FA8A99F, 0xA9A0A8A9, 0xA4A79EA8, 0xA1A2A9A2,
+ 0xA59CA0A8, 0xA2A59CA0, 0x99A2A69B, 0xA296A1A5,
+ 0x9EA2969E, 0x98A0A498, 0xA599A0A4, 0xA0A498A1,
+ 0x959DA195, 0xA1959DA1, 0x9CA0949D, 0x969D9F93,
+ 0xA2969EA2, 0x9DA1959E, 0x939D9F93, 0x9F939D9F,
+ 0x9B9F939B, 0x969B9C92, 0x9E959E9F, 0x999C939D,
+ 0x93989B92, 0x998F999C, 0x98998F98, 0x8F969A8F,
+ 0x9C91969A, 0x989C9198, 0x8F939A8D, 0x9D92959C,
+ 0x969A8F99, 0x8E979D92, 0x9C919399, 0x979D9296,
+ 0x99959C95, 0x9D9399A0, 0x979C9395, 0x909B9E95,
+ 0x99909699, 0x989C9196, 0x98A2A798, 0xA59CA2A7,
+ 0x10110DA2, 0x00000100, 0x01000102, 0x30312D00,
+ 0x99A0A39A, 0xA499A0A4, 0x9FA397A0, 0x93A0A498,
+ 0xA1959DA2, 0x9BA2959D, 0x93999F94, 0x9D96959D,
+ 0x959C9596, 0x99989C97, 0x3636989B, 0x06050734,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x01000000, 0x51504C00, 0x8281817B,
+ 0x7F7A8A87, 0x88898082, 0x8186877E, 0x8980898A,
+ 0x88898088, 0x7C86877D, 0x877E8586, 0x88897F86,
+ 0x7889897D, 0x887D8484, 0x89897D8A, 0x7B818076,
+ 0x87818384, 0x898A8187, 0x7F848379, 0x847A8A89,
+ 0x83817786, 0x7A838177, 0x84798684, 0x85837886,
+ 0x7886847C, 0x81798081, 0x80817783, 0x77838579,
+ 0x84788183, 0x7F817582, 0x76818076, 0x7C728280,
+ 0x8280767E, 0x777F7E74, 0x7F758281, 0x807F7580,
+ 0x75808178, 0x7F767D7E, 0x7D7B737E, 0x6D7A776F,
+ 0x78707875, 0x77786F7A, 0x6B75766D, 0x736A7174,
+ 0x75736B72, 0x63707168, 0x695E6E6D, 0x6563586B,
+ 0x57666459, 0x5A4F6462, 0x5251475C, 0x4055564D,
+ 0x48424849, 0x48484248, 0x6A53554F, 0x6F696E70,
+ 0x8689806D, 0x79808479, 0x91888185, 0x9EA2978E,
+ 0xB0AFB3A8, 0xBCB1B8BC, 0xB6BCB1B8, 0xB4B8C0B6,
+ 0xC1BBB5BE, 0xBBC2BBBD, 0xBAB7BEB9, 0xBFBAB6C0,
+ 0xB8BFBAB8, 0xB9B8BEB9, 0xBEB7B8BE, 0xB6BDB6B7,
+ 0xB7B7BEB7, 0xBEB7B7BE, 0xB8BFB8B7, 0xBAB9BFBA,
+ 0xBDB8B9BF, 0xB7BDB8B7, 0xBDBCBFBD, 0xBFBDBCBF,
+ 0xBABDBBBC, 0xBCB9BCBA, 0xBBB9BBBE, 0xB8BBB9B8,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB9BDB8B8, 0xB9B8BCB7,
+ 0xC2BDBABE, 0xBDC1BCBE, 0xBAB8BCB7, 0xBFBDB9BC,
+ 0xBABFBDBA, 0xB7B7BBB6, 0xBDBBB8BC, 0xBDBEBCBC,
+ 0xB9BCBDBB, 0xBBB6BABE, 0xB5BCB5B5, 0xB8B8BCB6,
+ 0xBEB8BABE, 0xBCC0BBBA, 0xBAB8BEB9, 0xBCBAB9BF,
+ 0xBBBEBCB9, 0xBDBABFBD, 0xBDBBB9C0, 0xBABDBBB8,
+ 0xB8B8BEB9, 0xBBB6B7BD, 0xBBBFBAB7, 0xBDBABFBD,
+ 0xBEBCBABF, 0xBABDBBBB, 0xB6B7BAB8, 0xBBB6B5BB,
+ 0xB8BCB7B5, 0xB7B8BCB7, 0xB9B4B8BC, 0xB5B9B4B5,
+ 0xB2B3B7B2, 0xB8B4B3B7, 0xBABBB7B7, 0xB4B9BAB6,
+ 0xB7B2B7B8, 0xB0B4AFB3, 0xAEB2B8B3, 0xB3ACAEB5,
+ 0xADB4ADAC, 0xA7A8ACA7, 0xABA7A8AC, 0x9FA39EAA,
+ 0x8D8E958E, 0x938E8D94, 0x7A807B8D, 0x63606661,
+ 0x65636265, 0x52504F64, 0x4B474642, 0x52495151,
+ 0x51524951, 0x58605D58, 0x6360615D, 0x68645F6A,
+ 0x60686862, 0x685F6869, 0x6D6E6567, 0x64696D62,
+ 0x75696B6F, 0x72746871, 0x6F787A6E, 0x746A7A79,
+ 0x75746A75, 0x6976766A, 0x776C7575, 0x7E7C7179,
+ 0x747E7C74, 0x807B7E7C, 0x77746F83, 0x6D76746C,
+ 0x7C727877, 0x7D7C727D, 0x757D7E75, 0x7C737D7E,
+ 0x7879707B, 0x70797C73, 0x7C737879, 0x7B7C737B,
+ 0x747B7C73, 0x79707C7D, 0x7B7C7378, 0x737B7C73,
+ 0x786F7B7C, 0x7D7E7577, 0x70767970, 0x78727679,
+ 0x7B7B7578, 0x757D7A75, 0x77727D7A, 0x7B78737A,
+ 0x787C7D74, 0x79718280, 0x77746F7C, 0x797C7E78,
+ 0x7D797C7D, 0x7877737E, 0x77807C77, 0x7C78807C,
+ 0x6A67637F, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x26282200,
+ 0x50585852, 0x69605859, 0x70716868, 0x6576746A,
+ 0x6B637270, 0x6869606D, 0x4C606157, 0x4D435556,
+ 0x46443A4F, 0x323C3C30, 0x06063A3B, 0x06050706,
+ 0x00000001, 0x01010000, 0x00000003, 0x00000000,
+ 0x01000000, 0x40403A00, 0x48535248, 0x695F5352,
+ 0x6A695F6A, 0x676D6C62, 0x77697373, 0x78786878,
+ 0x6C7C7C6C, 0x7A6C7C7C, 0x7A7A6A7B, 0x69787C69,
+ 0x7061787C, 0x5A5A4E6D, 0x3056544A, 0x00003A38,
+ 0x01020002, 0x00000100, 0x2C2A0001, 0x51545229,
+ 0x77787B79, 0x7C77787C, 0x787C7678, 0x72797C73,
+ 0x7C72797D, 0x797C737B, 0x77787C76, 0x7C77787C,
+ 0x797D7878, 0x7C666862, 0xA39A8285, 0xB9C0B99E,
+ 0xB7BAC0BB, 0xBCB7B8BC, 0xBCC0BAB8, 0xB9BBBFBA,
+ 0xBAB6BABE, 0xB9BBB5B9, 0xB5B5B9B3, 0xBCB6B5BC,
+ 0xB7BBB5B8, 0xB9B9BDB8, 0xB8B4B8BB, 0xB5B9B4B7,
+ 0xB9B6BCB7, 0xBAB8B6BB, 0xB5BAB9B5, 0xB7B3B6B4,
+ 0xB7B5B4B9, 0xADB2B0B2, 0xB1B3B7B2, 0xB9B4B2B6,
+ 0xB4B8B3B5, 0xB4B5B9B4, 0xB9B4B5B9, 0xB5B9B4B5,
+ 0xB7B4BAB5, 0xBCB7B6BC, 0xB8BCB7B8, 0xB7B9BDB8,
+ 0x7D7BB8BC, 0x0000007C, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x6E080907, 0xA9A37172, 0xA5A89FA7,
+ 0x9FA6A79D, 0xAAA0A8A9, 0xA5A99EA9, 0x9CA0A59C,
+ 0xA299A0A5, 0xA1A59A9F, 0x939EA296, 0xA3949BA2,
+ 0x9A9F909C, 0x949CA094, 0xA4989EA0, 0x92968AA0,
+ 0x95989C90, 0xA1929DA1, 0x9EA2969C, 0x939B9F93,
+ 0x9F939B9F, 0x9AA1949B, 0x8E979C8D, 0x9F93989D,
+ 0x989C909B, 0x939B9C92, 0x99909B9C, 0x98999098,
+ 0x929B9E95, 0x9990989B, 0x9A9B9198, 0x8E9A9B91,
+ 0x9C90989A, 0x999D9198, 0x93969C91, 0x9B90989E,
+ 0x969A8F97, 0x909A9E93, 0x9D91979B, 0x969A8F99,
+ 0x8E969C91, 0x968D9297, 0x979C9391, 0x92989B92,
+ 0x9B92989B, 0x989C9198, 0x98A0A79A, 0xA69BA0A7,
+ 0x6F736DA0, 0x00000200, 0x01000001, 0x00010000,
+ 0x9A333731, 0xA4989EA3, 0xA0A498A0, 0x93A1A599,
+ 0xA2969B9F, 0x99A0939E, 0x92979D92, 0x9F95959D,
+ 0x959C9597, 0x37989B99, 0x05073737, 0x06050706,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x27260001, 0x78777329, 0x80888882,
+ 0x89808889, 0x88898088, 0x7A84857C, 0x857B8584,
+ 0x88897F84, 0x7F84887D, 0x8A808889, 0x85847A89,
+ 0x7E868479, 0x887C8B89, 0x89897D88, 0x7F87867C,
+ 0x847B8A89, 0x83847B83, 0x7F828379, 0x83798889,
+ 0x807F7584, 0x7A828177, 0x83788584, 0x8A887D85,
+ 0x7984827A, 0x80768381, 0x8081777F, 0x757B7D71,
+ 0x86777F81, 0x84847683, 0x75828075, 0x81768280,
+ 0x82807583, 0x73817F75, 0x7E747F7D, 0x82817780,
+ 0x717D7E75, 0x786F797A, 0x7A7B7277, 0x6F79786E,
+ 0x776F7977, 0x78797079, 0x6875766D, 0x71686E71,
+ 0x71726970, 0x62727068, 0x6C616D6C, 0x6664596E,
+ 0x505B594F, 0x51475B5A, 0x50514852, 0x42484940,
+ 0x47434848, 0x5D5E5A46, 0x6A6D6F69, 0x89806E70,
+ 0x86898086, 0x77828379, 0xA2998183, 0xB0B1A7A1,
+ 0xB0BABBB1, 0xBAB0BABC, 0xB8BCB1B9, 0xB5B7BFB5,
+ 0xC1BBB6BF, 0xBAC1BABD, 0xB8B7BFB8, 0xC0BAB7BF,
+ 0xB8BFBAB6, 0xB9B7BEB9, 0xBFB8B8BE, 0xB7BEB7B8,
+ 0xB6B6BDB6, 0xBCB7B6BD, 0xB6BCB7B6, 0xB9B7BDB8,
+ 0xBBB9B8BE, 0xB6BBB9B6, 0xBCBABDBB, 0xBDBBBBBE,
+ 0xBDC0BEBA, 0xBBBCBFBD, 0xBFBDBABD, 0xB8BBB9BC,
+ 0xB9B6BCB7, 0xBEB9B8BE, 0xB9BDB8BA, 0xBDBABEB9,
+ 0xC0BABEC2, 0xB9BFBABC, 0xBBB9BFBA, 0xBDBBB8BD,
+ 0xB9BEBCB8, 0xB9B8BCB7, 0xBFBDBABE, 0xBCBFBDBC,
+ 0xBCBABDBB, 0xB9B7BBBE, 0xB8BEB9B4, 0xBAB7BDB8,
+ 0xBDB8B9BF, 0xB7BDB8B7, 0xB9B5BBB6, 0xBFBAB8BE,
+ 0xBABEB9BB, 0xB7B8BEB9, 0xBAB8B5BC, 0xB6BCB7B5,
+ 0xB5B7BBB5, 0xBBB6B7BB, 0xB6B9B7B7, 0xB7B8BCB7,
+ 0xBCBAB8BC, 0xB8BBB9B9, 0xB7B4B9B7, 0xBAB8B4B9,
+ 0xB7BAB8B5, 0xB7B8BCB7, 0xBBB6B8BC, 0xB2B8B3B7,
+ 0xB4B3B7B2, 0xBCB7B5B9, 0xB4B8B3B8, 0xB7B9BDB8,
+ 0xB8B6B8BC, 0xB4B7B5B5, 0xB4B6BBB9, 0xB8B3B3B9,
+ 0xACB2ADB2, 0xB0B0B4AF, 0xAAA8B1B5, 0xA8ACA7A7,
+ 0xA1A0A7A0, 0x948DA0A8, 0x8D948D8D, 0x76889089,
+ 0x6661747B, 0x64656162, 0x424F514B, 0x49404648,
+ 0x51524946, 0x565A5850, 0x645F615E, 0x68645F68,
+ 0x626A6762, 0x6D656A67, 0x6D6E656F, 0x626B6C63,
+ 0x70666B6C, 0x6E70646F, 0x69717165, 0x70667674,
+ 0x76746A72, 0x6C7A786D, 0x7D6F7977, 0x7E7C7180,
+ 0x767B7971, 0x7B767E7B, 0x7875707E, 0x7875736B,
+ 0x81778081, 0x80817780, 0x71808178, 0x7970797A,
+ 0x767A6F76, 0x70797A71, 0x79707879, 0x78797078,
+ 0x7478796F, 0x7E757D7E, 0x77786F7D, 0x757B7C73,
+ 0x7F767D7E, 0x7C7D747E, 0x727D7E75, 0x79707A7B,
+ 0x797A7178, 0x737B7B75, 0x79737979, 0x79797379,
+ 0x757B7873, 0x7B767D7A, 0x78746F7F, 0x757B7B75,
+ 0x7D797B7B, 0x7B7A767E, 0x79807B78, 0x7B78817C,
+ 0x7F7C7880, 0x00474747, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x28282202,
+ 0x50585852, 0x68625859, 0x716F6768, 0x6576746A,
+ 0x6B637270, 0x696A616D, 0x4E606158, 0x4D435958,
+ 0x46443A4F, 0x323A3C30, 0x0606383B, 0x08050708,
+ 0x00020001, 0x00000200, 0x00000000, 0x00000001,
+ 0x01000000, 0x14161000, 0x473C3B31, 0x52475452,
+ 0x6B6A6054, 0x676A695F, 0x73657373, 0x74736574,
+ 0x6B787868, 0x7A6A7B7B, 0x7C7C6A7A, 0x68787D68,
+ 0x7162767D, 0x59594D6E, 0x30555349, 0x01003B38,
+ 0x00010004, 0x01000100, 0x00000001, 0x00000000,
+ 0x51292929, 0x7C775253, 0x797D7878, 0x7380827C,
+ 0x7C737B7C, 0x797B7579, 0x77787C77, 0x7B79787C,
+ 0x767C7776, 0xB99EA29D, 0xC0B9BBBF, 0xBAC1BAB9,
+ 0xBAB8BCB7, 0xBCB7BBBF, 0xB8BCB7B8, 0xBABABDBB,
+ 0xBDB8B9BF, 0xBABEB9B9, 0xB7B6BCB7, 0xBAB3B6BC,
+ 0xB7BBB5B3, 0xB8B5B9B4, 0xBCB7B9BD, 0xB4B8B3B8,
+ 0xB8B5BAB8, 0xBAB8B4BB, 0xB4B9B7B5, 0xB8B5BAB9,
+ 0xB7B5B4B9, 0xB1B6B4B2, 0xB3B5B9B4, 0xB9B4B5B9,
+ 0xB5B9B4B5, 0xB8B5B9B4, 0xBAB6BBBC, 0xB6BAB5B9,
+ 0xB5B5BBB6, 0xB8B6B3BA, 0xB1B7B2B3, 0xB7B8BCB7,
+ 0x7E7CB8BC, 0x0000007B, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x3A090909, 0xA7A33B3C, 0xA6A8A2A6,
+ 0x9DA8A9A0, 0xA79DA6A7, 0xA2A69BA6, 0x9A9FA398,
+ 0xA49B9EA3, 0xA0A499A1, 0x969CA396, 0x9F929CA3,
+ 0x9CA39698, 0x95A0A498, 0xA1929FA1, 0x9297889C,
+ 0x91989C90, 0x9F90999D, 0x9B9F939A, 0x919B9F93,
+ 0xA093989C, 0x969D9099, 0x8D989D8E, 0x9C90979C,
+ 0x999D9198, 0x929B9C92, 0x9C939B9C, 0x9B9C939B,
+ 0x90979A91, 0x99909699, 0x9A9B9196, 0x909A9C90,
+ 0x9A8E9A9C, 0x94988D96, 0x91949A8F, 0x978E959A,
+ 0x999C9394, 0x90979B90, 0x9D91979B, 0x979B8F9B,
+ 0x8D94988D, 0x988F9298, 0x999C9395, 0x9295988F,
+ 0x9990999D, 0x989C9196, 0x9AA0A79A, 0xA79AA0A7,
+ 0xA0A59CA0, 0x002E322D, 0x01000001, 0x00010000,
+ 0x32000200, 0xA4993438, 0xA0A499A0, 0x95989E93,
+ 0xA1969AA0, 0x999F949B, 0x93979D92, 0xA09A979C,
+ 0x9B9F9A9C, 0x07363735, 0x05070707, 0x08050708,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00030100, 0x504C0200, 0x7A777253, 0x80888882,
+ 0x89808889, 0x86898086, 0x8088897F, 0x857B8B8A,
+ 0x84857B84, 0x7A81857A, 0x877D8185, 0x86857B86,
+ 0x7C89897D, 0x897D8888, 0x86867A89, 0x7F85847A,
+ 0x847B8A89, 0x83847B83, 0x7983847A, 0x857B8283,
+ 0x85847A86, 0x7E828177, 0x887D8A88, 0x8A887D8A,
+ 0x7B87857D, 0x81778583, 0x84857B80, 0x72838278,
+ 0x84787D7C, 0x84847882, 0x74868479, 0x8075817F,
+ 0x7E7C7182, 0x71817F75, 0x7D737D7B, 0x807F757F,
+ 0x717F7D75, 0x7970797A, 0x7C7D7378, 0x6E7A7B71,
+ 0x756D7978, 0x79776F77, 0x6A75766D, 0x736B7374,
+ 0x71706675, 0x636D6B63, 0x685D6E6D, 0x6565596A,
+ 0x475C5B51, 0x51475051, 0x4F504750, 0x41484940,
+ 0x5E5C4547, 0x6A6B695D, 0x826D6F69, 0x89808688,
+ 0x86898086, 0x978F9388, 0xB1A89EA2, 0xAEB1A8B0,
+ 0xB1AFB3A8, 0xBCB2B8BC, 0xB8BCB1BB, 0xB9B6BEB4,
+ 0xC2BBBAC3, 0xBBC2BBBB, 0xB9B9C0B9, 0xBFBAB8C0,
+ 0xB8BFBAB8, 0xBAB8BFBA, 0xC0B9B8BF, 0xB9C0B9B9,
+ 0xB8B8BFB8, 0xBDB8B8BF, 0xB7BDB8B7, 0xB8B7BDB8,
+ 0xBAB8B7BD, 0xB6BBB9B5, 0xB9B7BAB8, 0xBBB9B8BB,
+ 0xB8BBB9B8, 0xB9B8BBB9, 0xBDBBB8BB, 0xB9BDB8BA,
+ 0xB9B6BCB7, 0xC1BCB9C0, 0xBCBFBDBD, 0xBABBBFBA,
+ 0xBFBABBBF, 0xB9BFBABB, 0xBCB7BDB8, 0xBAB8B9BE,
+ 0xBABDBBB5, 0xBABBBFBA, 0xBEBEB9BC, 0xBABCBCBC,
+ 0xBBBABDBB, 0xBAB8BABD, 0xB5BAB8B5, 0xB9B8BEB9,
+ 0xBDBBB8BE, 0xB5BAB8B8, 0xB6B5BBB6, 0xBAB8B5BB,
+ 0xB5BAB8B7, 0xB9B8BDBB, 0xBDBBB5BC, 0xB8BEB9B8,
+ 0xB8B5BCB5, 0xBEB9B8BF, 0xBABDBBBA, 0xB7B8BCB7,
+ 0xBBB9B8BC, 0xB8BBB9B8, 0xB9B3B8B7, 0xBAB8B5BA,
+ 0xB6B9B7B5, 0xB4B4B8B3, 0xBAB5B5B9, 0xB1B7B2B6,
+ 0xB5B5B9B4, 0xBCB7B6BA, 0xB5B9B4B8, 0xB8B4B8B3,
+ 0xB6B4B9BD, 0xB4B7B5B3, 0xB3B1B6B4, 0xB8B3B2B8,
+ 0xB2B8B3B2, 0xAFB0B4AF, 0xABA9B0B4, 0xA5ABA6A8,
+ 0xA1A2A9A2, 0xA8A1A0A8, 0x8D948DA1, 0x89878F88,
+ 0x7C768890, 0x62666078, 0x41636460, 0x49434547,
+ 0x48494049, 0x51514E49, 0x5D585956, 0x67645F60,
+ 0x606A6762, 0x6A626A68, 0x6E6F666C, 0x6667685F,
+ 0x6F656E6F, 0x6E6F656E, 0x616C6C60, 0x746A6D6D,
+ 0x75746A75, 0x7179786E, 0x7B707E7C, 0x7A786D7D,
+ 0x737B7971, 0x78737B78, 0x7B79717B, 0x737D7B73,
+ 0x7D737D7B, 0x8281777E, 0x74828078, 0x796F7C7D,
+ 0x78796F78, 0x71787970, 0x7970797A, 0x78797076,
+ 0x737B7C73, 0x7B737B7C, 0x7D7E757D, 0x787E7F76,
+ 0x7E758081, 0x7879707D, 0x737B7C73, 0x7C737B7C,
+ 0x7879707B, 0x75787872, 0x7B757B7B, 0x7777717B,
+ 0x747A7772, 0x7B767C79, 0x78746F7F, 0x777A7772,
+ 0x827E7D7D, 0x7D7A7683, 0x767F7C78, 0x7B787F7B,
+ 0x7F7C7880, 0x006A6B69, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x28272302,
+ 0x50585852, 0x5F575859, 0x6B6A6061, 0x65727066,
+ 0x6B617270, 0x6A695F6C, 0x57626157, 0x4D436261,
+ 0x47453B4F, 0x35393A30, 0x0707393B, 0x08050709,
+ 0x00020000, 0x00000200, 0x01010100, 0x01000001,
+ 0x00000000, 0x00010000, 0x3126241C, 0x544A3D3B,
+ 0x54524756, 0x626A695F, 0x77696E6E, 0x78776978,
+ 0x6B787969, 0x7B6B7B7B, 0x7A7A687B, 0x687A7C68,
+ 0x6F61777B, 0x5A5A4E6F, 0x3057554B, 0x01003A38,
+ 0x00010002, 0x00000100, 0x01000001, 0x02000000,
+ 0x00000100, 0x02000001, 0x282A2400, 0x766A6C66,
+ 0x7C737C7C, 0x797B7579, 0x78787C76, 0x7C77797D,
+ 0x9EA49F76, 0xB9BAC0BB, 0xC0B9B9C0, 0xB9C0B9B9,
+ 0xB9B8BBB9, 0xBCB7B8BB, 0xB8BCB7B8, 0xBBBABDBB,
+ 0xBEB9B8BD, 0xB8BEB9B8, 0xB7B6BCB7, 0xBCB5B6BC,
+ 0xB3BAB3B5, 0xB4B5B9B4, 0xBCB7B5B9, 0xB5B9B4B8,
+ 0xBAB4BBB8, 0xB9B7B6BD, 0xB3B8B6B4, 0xB3B2B7B6,
+ 0xB8B6AFB4, 0xADB2B0B3, 0xAFADB3AE, 0xB3AEAEB4,
+ 0xB0B4AFAF, 0xAFB1B5B0, 0xB3AFB0B4, 0xB0B4AFB2,
+ 0xB2B1B7B2, 0xB6B4B0B7, 0xB1B6B4B1, 0xB8B8BCB7,
+ 0x7C7CB7BA, 0x0000007A, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01020000, 0x00010301,
+ 0x00000000, 0x3B050707, 0xA7A23A3D, 0xA3A7A1A3,
+ 0x9BA1A49B, 0xA39AA3A4, 0xA2A69BA2, 0x99A0A499,
+ 0xA4999EA4, 0x9AA0959E, 0x969AA297, 0xA19799A1,
+ 0x9BA19699, 0x90989C91, 0x9C909A9C, 0x989C9098,
+ 0x90979B8F, 0x9C909A9C, 0x95998D98, 0x91969D90,
+ 0x9C90979E, 0x989C9098, 0x90989C90, 0x998D989C,
+ 0x9A9C9097, 0x90989C90, 0x9B90989C, 0x989C9197,
+ 0x9191958A, 0x9C91989C, 0x989C9098, 0x8C9A9C90,
+ 0x958B9698, 0x94988D94, 0x90959A91, 0x9C969296,
+ 0x96989298, 0x9293968D, 0x998D9B9C, 0x93978B95,
+ 0x8D969A8F, 0x99909498, 0x999A9198, 0x8B97988E,
+ 0x978C9597, 0x95998D93, 0x9395998D, 0x998D9B9F,
+ 0xA0A49995, 0x329A9C96, 0x03003536, 0x02030002,
+ 0x00000100, 0x342F0001, 0x93979130, 0x9699A099,
+ 0xA19798A0, 0x9BA09799, 0x9FA0A49E, 0xA2A0A2A3,
+ 0x3B3B3BA1, 0x00000100, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000000,
+ 0x2D070302, 0x8380322E, 0x87847F88, 0x80898983,
+ 0x867D8889, 0x83867D83, 0x7B828379, 0x877D8485,
+ 0x86877D86, 0x7982867B, 0x837A8084, 0x85867C82,
+ 0x7A86887C, 0x897F8486, 0x81827888, 0x7D84857B,
+ 0x857B8687, 0x84857B84, 0x7B83847B, 0x867D8384,
+ 0x86857B85, 0x79858379, 0x857A8884, 0x86847989,
+ 0x7B87857D, 0x81788384, 0x83847B80, 0x7883847B,
+ 0x81788081, 0x898A8080, 0x7485847A, 0x80728080,
+ 0x7F7F7180, 0x72828276, 0x7D737E7E, 0x807F757E,
+ 0x6F7B7A70, 0x7D737A79, 0x7B7B6F7E, 0x727A7A6E,
+ 0x7C727E7C, 0x78766C7E, 0x6976746A, 0x746A7674,
+ 0x76746976, 0x616E6C62, 0x665A6E6C, 0x5C5C5066,
+ 0x3F52564A, 0x4C40474B, 0x484C4148, 0x6B50524C,
+ 0x6D6B6C6D, 0x6C6D6B6C, 0x8B848680, 0xA49B9194,
+ 0xA0A39AA1, 0xA8A8ABA2, 0xB1A8ACB1, 0xB2B7AEAE,
+ 0xAFB3B8AF, 0xBBB2B3B8, 0xB8BDB4B8, 0xB7B8BFB8,
+ 0xBDB8B6BE, 0xB9BFBAB7, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0, 0xBCC0BBBC,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBBBABDBB,
+ 0xBBB9BABD, 0xBABDBBB8, 0xBBBBBEBC, 0xBDBBBABD,
+ 0xB9BCBABA, 0xBAB7BAB8, 0xBBB9B9BC, 0xBABEB9B8,
+ 0xB9B8BCB7, 0xBEBABBBF, 0xBDBEBABD, 0xB9BDBEBC,
+ 0xC0BBBCBD, 0xBCC0BBBC, 0xBABCC0BB, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBBBABDBB, 0xBFBEB8BD, 0xBBC0BFBA,
+ 0xB7BABDBB, 0xBBB9B8BC, 0xB9BCBAB8, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xBBB7BDB8, 0xBDBCB8BD,
+ 0xBABFBEB8, 0xBBB8BDBC, 0xBDBBB8BD, 0xB6BBB9BA,
+ 0xBBB7BDB8, 0xBFBDB9C0, 0xB7BCBABA, 0xBBB8BDBB,
+ 0xBEB9BABD, 0xB7BBB6BA, 0xB8B3B8B6, 0xBAB8B5BA,
+ 0xB6B9B7B5, 0xB6B9BDB8, 0xB9B4B8BC, 0xB5B9B4B5,
+ 0xB6B6BCB7, 0xBAB8B5BB, 0xB6BBB9B5, 0xB7B6BCB7,
+ 0xB6B1B6BC, 0xB8BCB7B2, 0xB3B8BCB7, 0xB8B3B4B8,
+ 0xB8BCB6B4, 0xB3B2B9B2, 0xB8B3B3BA, 0xA9AFAAB2,
+ 0xA5A5ACA5, 0xABA4A5AC, 0xA1A8A1A4, 0x87999D98,
+ 0x8C87888C, 0x787C7788, 0x5E5F605E, 0x4C486362,
+ 0x4F4C474F, 0x484D4C48, 0x54504B4C, 0x5C5C5655,
+ 0x5C64655C, 0x6B616566, 0x686C616A, 0x65666A5F,
+ 0x6F646C70, 0x6C70656B, 0x6C717268, 0x766D7576,
+ 0x78797075, 0x6E787970, 0x796F7978, 0x7A796F7A,
+ 0x70787970, 0x7E757879, 0x8382787D, 0x6F7E7C72,
+ 0x7B737D78, 0x7F7C747E, 0x707D7A72, 0x79717A78,
+ 0x7B79717B, 0x757D7E75, 0x7E747D7E, 0x7B7C737D,
+ 0x777B7873, 0x77727F7C, 0x7B78737B, 0x757B7B75,
+ 0x7A717B7B, 0x797C7377, 0x6F7A7B71, 0x81787879,
+ 0x7B7C7380, 0x777B7B75, 0x78747D7D, 0x7C79757B,
+ 0x75787773, 0x77737A79, 0x7774707A, 0x7E7A7773,
+ 0x79748582, 0x807D787C, 0x757E7B76, 0x7B767F7D,
+ 0x827F7A7F, 0x287F7C78, 0x00002B29, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000100, 0x00000001, 0x28272302,
+ 0x4F585852, 0x685E5859, 0x706E6369, 0x61706C61,
+ 0x6D616E6C, 0x6A6A5E6D, 0x4F67655A, 0x4E475C5A,
+ 0x48453D54, 0x333A3830, 0x05073837, 0x08050708,
+ 0x00000000, 0x01010000, 0x00000101, 0x01000001,
+ 0x00000000, 0x00010000, 0x15020100, 0x4B431D1A,
+ 0x4E4C424E, 0x64656559, 0x6E607070, 0x7070606F,
+ 0x67787868, 0x78687777, 0x78786878, 0x68787866,
+ 0x6F617878, 0x5E5C5170, 0x365C5B51, 0x01003C3C,
+ 0x00010000, 0x464E504A, 0x50474D51, 0x4F52494D,
+ 0x4E52544E, 0x554F5254, 0x52554C53, 0x86585B52,
+ 0x90858C8F, 0x8D91868C, 0x7B7D817B, 0xADA67D81,
+ 0xB8C0B9A6, 0xB1B4BCB5, 0xB8B1B1B8, 0xB7BBB5B1,
+ 0xB9BCBDBB, 0xBDB8BABB, 0xB8BCB7B9, 0xB8B9BDB8,
+ 0xBDBBB9BD, 0xBBBEBCBA, 0xB7B6BCB7, 0xBEB9B6BC,
+ 0xB9BFBAB8, 0xB6B5BBB6, 0xBBB5B7BB, 0xB6BAB5B9,
+ 0xB9B4BBB8, 0xBCBBB2BA, 0xB2B8B7B6, 0xAFAAB0AF,
+ 0xB0AFAAB0, 0xABB0AEAB, 0xB0AFB5B0, 0xB0AEAEB5,
+ 0xAFB4B2AB, 0xB8B3B8B6, 0xBCBAB5BA, 0xB6BBB9B9,
+ 0xB7B6BCB7, 0xBBB9B6BC, 0xB8BBB9B8, 0xBFBFC2C0,
+ 0x8080BEC1, 0x01010180, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00010200,
+ 0x00000100, 0x07070909, 0xA6A10609, 0xA3A7A1A0,
+ 0x9BA1A49B, 0x9F96A3A4, 0x9C9F969E, 0x95999F94,
+ 0xA0959AA0, 0x959D929A, 0x94959D93, 0x9D93959E,
+ 0x979C9395, 0x8D989C91, 0x998D9599, 0x95998D95,
+ 0x8C969A8E, 0x9A8E9698, 0x94988C96, 0x8D939A8D,
+ 0x9A8E939A, 0x95998D96, 0x8D94988C, 0x998D9599,
+ 0x97998D97, 0x8D95998D, 0x998D9599, 0x95998D95,
+ 0x8E94988D, 0x9B909599, 0x989C9097, 0x8A96978D,
+ 0x988E9394, 0x96978E97, 0x9294978E, 0x9A949498,
+ 0x90938A96, 0x9195998E, 0x978B989C, 0x93978B93,
+ 0x8F94958B, 0x99909899, 0x96978D98, 0x8B97998D,
+ 0x998D9597, 0x95998D95, 0x8E94988C, 0x998D969A,
+ 0x9B9F9495, 0x979A9C96, 0x03009A9B, 0x02030002,
+ 0x00000100, 0x01000001, 0x30333100, 0x9A999F9A,
+ 0xA09999A1, 0x99A09999, 0xA1A2A39F, 0x393BA2A3,
+ 0x0805073C, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000000,
+ 0x56070302, 0x827F5E59, 0x86837E87, 0x7C88867E,
+ 0x867D8485, 0x81847B83, 0x7C87887E, 0x857B8586,
+ 0x83847A84, 0x7B84887D, 0x82798286, 0x86877D81,
+ 0x7D888A7E, 0x867C8789, 0x84857B85, 0x7988877D,
+ 0x83798483, 0x84857B82, 0x7D85867D, 0x847B8586,
+ 0x83847A83, 0x74868479, 0x8075837F, 0x86847A84,
+ 0x7885837B, 0x81788081, 0x83847B80, 0x7D83837D,
+ 0x817B8383, 0x7F807781, 0x7385847A, 0x7E707F7F,
+ 0x8282747E, 0x72818175, 0x7E747E7E, 0x7E7D737F,
+ 0x737E7D73, 0x83777E7D, 0x7C7A6F83, 0x6E78766B,
+ 0x796F7B79, 0x77766C7A, 0x69787469, 0x73687874,
+ 0x73716677, 0x596E6C61, 0x5C506565, 0x5254485C,
+ 0x3F484C40, 0x4C41454C, 0x52554C48, 0x6B6C6D69,
+ 0x6D6B6C6D, 0x898A886C, 0x9A92948E, 0xB1A8A0A3,
+ 0xAEB1A8AE, 0xAFACB1A8, 0xB5AFB3B8, 0xB8BCB6B1,
+ 0xB2B4BCB2, 0xBDB4B6BB, 0xB8BDB4BA, 0xB7B8BFB8,
+ 0xBEB9B6BE, 0xB9BFBAB8, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0, 0xBCC0BBBC,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBBBABDBB,
+ 0xBBB9BABD, 0xBABDBBB8, 0xBBBABDBB, 0xBCBABABD,
+ 0xBCBFBDB9, 0xBBBBBEBC, 0xBFBDBABD, 0xBCBFBDBC,
+ 0xB6B8BCB7, 0xC0BCB8BC, 0xC0C1BDBF, 0xBBBEBFBD,
+ 0xBFBABCBD, 0xBCC0BBBB, 0xBCBBBFBA, 0xBEBABDC1,
+ 0xBDC1BCBD, 0xBBB8BDBB, 0xC0BFB7BE, 0xB9BFBEBA,
+ 0xB7BBC0BE, 0xBFBDB8BC, 0xBCBFBDBC, 0xB8BCBDB9,
+ 0xBCB7BBBC, 0xB8BCB7B8, 0xBDBAC0BB, 0xBCBBBABF,
+ 0xBBC0BFB7, 0xBCB8BDBC, 0xBDBBB8BD, 0xB6BBB9BA,
+ 0xBDB9C0BD, 0xBEBBB9C0, 0xB8BFBCB7, 0xBBB7BCBA,
+ 0xBCB8BABD, 0xB9BAB6BB, 0xBAB7BAB8, 0xBAB8B7BC,
+ 0xB7BBB6B5, 0xB0B5B9B4, 0xB7B2B4B6, 0xB5B9B4B3,
+ 0xB9B6BCB7, 0xBAB8B6BB, 0xB5BAB8B5, 0xB4B7BDB8,
+ 0xB9B4B3B9, 0xB8BCB7B5, 0xB4B7BBB6, 0xBDB7B5B9,
+ 0xB5B9B3B9, 0xB2B2B9B2, 0xB8B3B2B9, 0xADB3AEB2,
+ 0xA5AAB0AB, 0xA8A1A5AC, 0xA4ABA4A1, 0x97A8ACA7,
+ 0x9A98989C, 0x888B8997, 0x60767775, 0x605C6361,
+ 0x4F4C4863, 0x3F42433F, 0x4B474044, 0x5456504A,
+ 0x595D5E54, 0x6D626365, 0x686C6169, 0x66696D62,
+ 0x70656D71, 0x6C70656C, 0x6A707167, 0x766D7374,
+ 0x73766D73, 0x7173746B, 0x7A71797A, 0x78797079,
+ 0x767D7E75, 0x7C737E7F, 0x7E7D737B, 0x717C776E,
+ 0x756E7F7A, 0x7A746D7B, 0x6F7A776F, 0x7A727A77,
+ 0x7B79717D, 0x737D7B73, 0x7C727B7C, 0x7B7C737B,
+ 0x777F7C77, 0x7D787F7C, 0x807D7881, 0x72787872,
+ 0x7C737878, 0x7B7E7579, 0x777D7E74, 0x82798081,
+ 0x80817881, 0x77797973, 0x78777D7D, 0x7C78777C,
+ 0x73787773, 0x77767877, 0x7C7B7779, 0x767C7975,
+ 0x7A767D7A, 0x85827D7D, 0x71787570, 0x7D757B79,
+ 0x83807880, 0x4F7F7C78, 0x00005653, 0x00000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000100, 0x00000001, 0x28272302,
+ 0x4E595953, 0x675C5958, 0x706F6169, 0x5B716D62,
+ 0x695E6A66, 0x6B695E6B, 0x4F676358, 0x4E475E5A,
+ 0x48443F54, 0x333A3732, 0x05073837, 0x08050708,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x01010000, 0x00000001, 0x00020000, 0x322D0201,
+ 0x4D4C4235, 0x5959584E, 0x6F616565, 0x70706070,
+ 0x69787868, 0x78687979, 0x74756577, 0x697A7768,
+ 0x6F617B78, 0x5E5C5172, 0x355A5B51, 0x0100393B,
+ 0x00010000, 0xA18C8D84, 0xAB9FABAD, 0xA8ACA0A7,
+ 0xA2A8ACA1, 0xABA2A8AB, 0xA8ACA1A8, 0xA2A7AAA1,
+ 0xADA1A9AD, 0xA8ACA1A9, 0xA5A7ACA3, 0xC0B9A5AC,
+ 0xB8C0B9B9, 0xB1B0B9AF, 0xB8B1B0B8, 0xB6BAB5B1,
+ 0xBCB9BCBA, 0xBEB9BBBE, 0xB8BCB7BA, 0xB8B8BCB7,
+ 0xBBB9B9BD, 0xB9BCBAB8, 0xB9B8BDBB, 0xBFBAB8BE,
+ 0xB8BEB9B9, 0xBAB8BEB9, 0xBAB6BBBF, 0xB7BBB6B9,
+ 0xB6B2B9B6, 0xBAB9AFB7, 0xB4BAB9B4, 0xB7B3BBBA,
+ 0xB4B3B2B8, 0xB3B8B6AF, 0xB7B6BCB7, 0xB5B2B5BC,
+ 0xAFB4B2AE, 0xB9B6BBB9, 0xBBB9B6BB, 0xB5BAB8B6,
+ 0xB7B6BCB7, 0xBCBAB6BC, 0xB8BBB9B9, 0xBFBEC1BF,
+ 0x8080BEC1, 0x00000080, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000100, 0x00020000, 0x00010200,
+ 0x01000202, 0x07050707, 0xA8A30609, 0xA3A7A1A2,
+ 0x959B9E95, 0xA0979CA0, 0x9B9E959D, 0x9399A197,
+ 0x9D93959D, 0x949C9295, 0x92959D92, 0x988D959D,
+ 0x92988D92, 0x8E95998D, 0x978B969A, 0x92968A93,
+ 0x8B93978B, 0x94889397, 0x93978B90, 0x8B93978B,
+ 0x94889397, 0x90948892, 0x86909586, 0x978B8E95,
+ 0x93978B93, 0x8A909488, 0x988C9296, 0x93978B94,
+ 0x8A96978D, 0x958B9394, 0x93948A94, 0x8E93948B,
+ 0x978E9697, 0x93948B96, 0x8D94978E, 0x988D9498,
+ 0x94988D94, 0x8C95998D, 0x978B9498, 0x93978B93,
+ 0x8D929389, 0x94899697, 0x979B9090, 0x8B94988C,
+ 0x998E9397, 0x93978C95, 0x8995998E, 0x93879094,
+ 0x95998E8F, 0x97989C96, 0x6866989C, 0x00020065,
+ 0x01000000, 0x00000101, 0x00000000, 0x9A303533,
+ 0xA099999F, 0x99A09999, 0x39A2A3A1, 0x05073939,
+ 0x05040606, 0x01010002, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000000,
+ 0x55070302, 0x83805D58, 0x88858088, 0x7D87857D,
+ 0x857C8586, 0x86898082, 0x7F86877D, 0x857B8A89,
+ 0x82837984, 0x7E84887D, 0x897F8589, 0x84857B88,
+ 0x7C86887C, 0x877D8688, 0x88867E86, 0x7B88867C,
+ 0x84788785, 0x82837984, 0x7D83847B, 0x857A8386,
+ 0x84857B81, 0x75858579, 0x7C718280, 0x86847A80,
+ 0x7985837B, 0x80778182, 0x7F80777D, 0x78808178,
+ 0x80778081, 0x8182787F, 0x76828276, 0x7F738381,
+ 0x8282767F, 0x72817F75, 0x7C727E7C, 0x8180767E,
+ 0x707B7A70, 0x766B7B7A, 0x7F7E7078, 0x6D7B7A6C,
+ 0x73677B7B, 0x76786C71, 0x6577756A, 0x70667470,
+ 0x71706672, 0x50656559, 0x5C505C5C, 0x5254485C,
+ 0x41484C40, 0x544B484C, 0x66686253, 0x696C6E68,
+ 0x8A866C6D, 0x8B8A868B, 0xA8A0A29C, 0xB0AAAEB1,
+ 0xAEB0AAB0, 0xB0B2B6B0, 0xBCB7B2B6, 0xB8BCB7B8,
+ 0xB4B7BBB5, 0xBCB3B8BD, 0xBABDB4B9, 0xB6B9BDB7,
+ 0xBFB8B6BD, 0xB6BDB6B8, 0xBAB9C1BA, 0xC0BBB9C1,
+ 0xBAC0BBBA, 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA,
+ 0xBABBBFBA, 0xBEB9BBBF, 0xBBBFBABA, 0xBCBABDBB,
+ 0xBBB9BBBE, 0xBABDBBB8, 0xBDBABDBB, 0xBDBBBCBF,
+ 0xBABDBBBA, 0xBBBBBEBC, 0xBFBDBABD, 0xBCBFBDBC,
+ 0xB7B9BFBA, 0xBFBAB6BC, 0xBBBFBABB, 0xBBBCBFBD,
+ 0xBBB9BABD, 0xBABDBBB8, 0xBDBDBEBA, 0xBDB9C0C1,
+ 0xBBBFBABC, 0xBCB8BDBB, 0xBFBEB8BF, 0xB9BFBEB9,
+ 0xBBBABFBD, 0xC0BEBABD, 0xBBBEBCBD, 0xBCB9BDB8,
+ 0xBDBBBDC1, 0xB8BBB9BA, 0xBBBBC0BE, 0xBDBCB7BE,
+ 0xB9BFBEB7, 0xBBBABFBE, 0xBBB9B8BD, 0xB8BDBBB6,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBDBA, 0xB6BABDBB,
+ 0xBAB6B7BB, 0xB8B9B5B9, 0xB9B8BBB9, 0xBDB8B8BB,
+ 0xB8BCB7B9, 0xB2B6BAB5, 0xB8B4B3B7, 0xB4B8B3B7,
+ 0xB6B4B9B7, 0xB9B8B2B9, 0xB5BAB9B4, 0xB4B3B6B4,
+ 0xBBB7B5B9, 0xB6B7B3BA, 0xB4B8B9B7, 0xB9B3B7B8,
+ 0xB6BAB4B5, 0xB3B1B7B2, 0xB7B4B2B8, 0xA8AFAAB0,
+ 0xACAAB0AB, 0xABA6ABB1, 0xA5ABA6A5, 0xA7A8ACA7,
+ 0x9C97A8AC, 0x888C8798, 0x738A8B87, 0x615D7877,
+ 0x62615D64, 0x3F4B4C48, 0x4C484044, 0x53554F4B,
+ 0x55585950, 0x655B5E5F, 0x6A6B6164, 0x666B6C63,
+ 0x74696C6F, 0x6C706570, 0x6A727369, 0x746B7374,
+ 0x75766D73, 0x6F797A71, 0x79707778, 0x78797078,
+ 0x72787872, 0x7C737A7B, 0x7B79717B, 0x7178756D,
+ 0x756D7C79, 0x78756D78, 0x707C7A70, 0x796F7C7A,
+ 0x7B7A707A, 0x737A7870, 0x7D747D7B, 0x7879707C,
+ 0x6E77786F, 0x756D7677, 0x76776E77, 0x737B7C73,
+ 0x7E757B7C, 0x8182797D, 0x77808177, 0x7D748081,
+ 0x8081787C, 0x6E7D7D77, 0x76757474, 0x7D79787A,
+ 0x73797874, 0x74707677, 0x7A797575, 0x767B7A76,
+ 0x7D797B7A, 0x807D7980, 0x73787370, 0x7C747C78,
+ 0x7B79717E, 0x78807B78, 0x29257F7C, 0x0301002A,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000100, 0x00000001, 0x28272302,
+ 0x4F585852, 0x675C5A59, 0x726F6169, 0x61706C61,
+ 0x6A5F706C, 0x68665B6C, 0x4F686459, 0x50485D58,
+ 0x47453D53, 0x33383832, 0x06063637, 0x08050708,
+ 0x00010101, 0x00000000, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000200,
+ 0x36332E02, 0x5A504E46, 0x65576664, 0x706F6166,
+ 0x66747466, 0x75677474, 0x75756775, 0x60797667,
+ 0x6F61726F, 0x5E5C5172, 0x365A5B51, 0x01003A3C,
+ 0x00010000, 0x9F8A8E83, 0xAE9FA7AB, 0xA9AE9FA9,
+ 0xA0A8ACA0, 0xACA0A8AC, 0xA8ACA0A8, 0xA0AAABA1,
+ 0xACA0AAAC, 0xA8ACA1A8, 0xA5A7ACA3, 0xC0B9A5AC,
+ 0xB8C0B9B9, 0xB0B0B8B1, 0xBAB5AFB7, 0xB8BDBBB4,
+ 0xBBB8BDBB, 0xBCBAB8BD, 0xB8BDBBB7, 0xBAB8BDBB,
+ 0xBCBBB7BC, 0xB7BCBAB7, 0xBBB8BDBB, 0xBEBCB8BD,
+ 0xBABFBDB9, 0xBCB8BDBB, 0xBDBBB9BE, 0xB8BEB9BA,
+ 0xB8B6BDBA, 0xB9B8B4BB, 0xB0B8B7B1, 0xB6B5BCB9,
+ 0xB9B7B2B9, 0xB6BBB9B4, 0xB7B6BCB7, 0xB8B6B6BC,
+ 0xB8BBB9B3, 0xB7B8BBB9, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB8B8BCB7, 0xBCBAB9BD, 0xB9BBBBB9, 0xBFC0C1BF,
+ 0x8080C0C1, 0x00000080, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000000, 0x00020000, 0x00010200,
+ 0x00000102, 0x06080808, 0x736E0508, 0xA3A7A16F,
+ 0x919DA097, 0x9B92989C, 0x989B9298, 0x8E959D92,
+ 0x998F9199, 0x93988F91, 0x8C92988D, 0x94899299,
+ 0x8E94898E, 0x898E9489, 0x94898E94, 0x8F958A8E,
+ 0x88909488, 0x94889094, 0x90948890, 0x888E9588,
+ 0x94898E95, 0x90948890, 0x898E9588, 0x94898F96,
+ 0x8E94898E, 0x898E9489, 0x93888E94, 0x8E94898D,
+ 0x8B91958A, 0x91889194, 0x8E91888E, 0x8B909188,
+ 0x90879394, 0x9091888F, 0x8D909489, 0x94889298,
+ 0x94988C90, 0x8893978B, 0x988B9094, 0x90948991,
+ 0x8B92968B, 0x958A9495, 0x94988D91, 0x8B909488,
+ 0x968B9397, 0x90948992, 0x8995998E, 0x94889094,
+ 0x90948990, 0x96989D94, 0x9C97989C, 0x33363498,
+ 0x00000000, 0x00010000, 0x00000100, 0x32000101,
+ 0x9F9A3134, 0x9B9F9A9B, 0x063A3B39, 0x05070606,
+ 0x07060806, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000000,
+ 0x7F33302C, 0x847F8884, 0x87857D88, 0x7D85867D,
+ 0x89808586, 0x88898088, 0x7B8A897F, 0x877D8685,
+ 0x87887E86, 0x7B86877D, 0x877D8485, 0x84857B86,
+ 0x79838579, 0x877D8283, 0x88867E86, 0x7D89877D,
+ 0x887E8987, 0x82837989, 0x7A7F8076, 0x847A8384,
+ 0x80827683, 0x71828276, 0x7C727E7C, 0x87857B7E,
+ 0x7D8A8880, 0x847B8586, 0x83847B83, 0x78828078,
+ 0x857B8280, 0x83847A84, 0x72828276, 0x7F737E7E,
+ 0x807F757F, 0x727D7C72, 0x7F757E7C, 0x7F7E7481,
+ 0x737E7D73, 0x756A7F7F, 0x78776977, 0x687B7A6C,
+ 0x74687676, 0x72746872, 0x65727065, 0x695F7270,
+ 0x6A695F6A, 0x4F656559, 0x5347595B, 0x52544851,
+ 0x414A4C40, 0x6A614A4B, 0x68686269, 0x856C6E68,
+ 0x8B858B8B, 0xA8A8A28B, 0xA8AEB0AA, 0xB0AAAEB1,
+ 0xAEB0AAB0, 0xB0B2B6B0, 0xBBB6B2B6, 0xB8BCB7B7,
+ 0xB1B8BCB6, 0xBDB4B5BA, 0xBABCB6BA, 0xB8B8BFB8,
+ 0xBFB8B8BF, 0xB7BEB7B8, 0xB9B9C0B9, 0xC0BBB8C0,
+ 0xBAC0BBBA, 0xBCBBC1BC, 0xC0BBBBC1, 0xBBC1BCBA,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBEBCBFBD,
+ 0xBCBABDC0, 0xBABDBBB9, 0xBDBCBFBD, 0xBCBABCBF,
+ 0xBDC0BEB9, 0xBDBBBEBC, 0xBFBDBCBF, 0xBFC2C0BC,
+ 0xBABDC0BE, 0xBFBABBBF, 0xBDC1BCBB, 0xBDBCBFBD,
+ 0xBFBDBCBF, 0xB8BBB9BC, 0xBCBDBEBA, 0xC1BDBFC0,
+ 0xBEC1BFC0, 0xBDBABFBD, 0xBFBEB9C0, 0xB9BFBEB7,
+ 0xBBB8BDBB, 0xBFBDBABD, 0xBBBEBCBC, 0xBBBBC1BC,
+ 0xBEBCBAC0, 0xB8BDBBBB, 0xBBBAC1BE, 0xBFBEB7BE,
+ 0xB9BFBEB9, 0xBBBBC0BE, 0xBBB9B8BD, 0xBAC1BEB6,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBEBA, 0xB6BABDBB,
+ 0xBAB6B7BB, 0xBDBEBAB9, 0xB9B8BBB9, 0xBBB9B8BB,
+ 0xB7BBB6B8, 0xB8B3B7B2, 0xBBB7B9BD, 0xB9BDB8BA,
+ 0xB9B6BBB9, 0xBAB9B5BC, 0xB3B8B7B5, 0xB4B5B8B6,
+ 0xB8B4B5B9, 0xB7B8B4B7, 0xB4B7B8B6, 0xB7B2B3B6,
+ 0xB5B9B3B3, 0xB7B2B8B3, 0xBCB9B6BC, 0xB1B8B5B5,
+ 0xAEAEB4AF, 0xB4AFADB3, 0xACB0ABB0, 0xA7A8ACA7,
+ 0xACA7A8AC, 0x969C97A6, 0x87888C87, 0x77738A8B,
+ 0x62615D78, 0x3F5B5C58, 0x423E4243, 0x4C4E4841,
+ 0x56585950, 0x665C5E5F, 0x6A6B6165, 0x6367685F,
+ 0x6F656B6C, 0x696D626E, 0x69707167, 0x796F7273,
+ 0x78797078, 0x6D707168, 0x79707576, 0x78797078,
+ 0x70787872, 0x79707879, 0x78797078, 0x7378766E,
+ 0x776F7D7B, 0x7A776F7A, 0x707A776F, 0x78707B7A,
+ 0x7B79717A, 0x747D7B73, 0x79707C7D, 0x78796F78,
+ 0x6D717268, 0x776E7677, 0x76776E76, 0x72787970,
+ 0x7F767A7B, 0x7C7D747E, 0x747A7B72, 0x7F767D7E,
+ 0x7B7C737E, 0x727D7D77, 0x736F7878, 0x7C797576,
+ 0x737C7B77, 0x736F7877, 0x77767274, 0x747B7B75,
+ 0x79757A7A, 0x7E7B777C, 0x6F787370, 0x79747774,
+ 0x7B78737C, 0x7A7F7C78, 0x54507F7B, 0x02010055,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000100, 0x00000001, 0x28272302,
+ 0x51585852, 0x675C5B59, 0x726E636B, 0x616F6B60,
+ 0x695E6E6C, 0x6563586B, 0x5066645A, 0x4E465C5A,
+ 0x47443F51, 0x35383832, 0x06063637, 0x08050708,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000100,
+ 0x00020000, 0x00000101, 0x01000000, 0x00000101,
+ 0x32312D02, 0x50504C47, 0x645A5B58, 0x66645966,
+ 0x69737367, 0x766A7575, 0x74746676, 0x69787769,
+ 0x65577877, 0x5E5C5168, 0x345C5B51, 0x01003C3D,
+ 0x00010000, 0xA16D7067, 0xACA1A6AC, 0xA8ACA0A8,
+ 0xA0A8ACA0, 0xAB9FA8AC, 0xA7AB9FA7, 0xA0A8ACA0,
+ 0xACA0A8AC, 0xA6ACA1A8, 0xA5A7ACA3, 0xC0B9A5AC,
+ 0xB9C0B9B9, 0xB5B0B7B0, 0xBFBAB5BC, 0xB8BDBBB9,
+ 0xBBB8BDBB, 0xBEBCB8BD, 0xB8BDBBB9, 0xBDBAC1BE,
+ 0xBFBEB9C0, 0xB8BDBCBA, 0xBBB5BAB8, 0xBDBCB8BD,
+ 0xBABFBEB8, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBAB7BDB8, 0xBBB8B6BD, 0xB0B8B7B4, 0xB6B2B9B6,
+ 0xBBB9B2B9, 0xB8BBB9B8, 0xB9B6BBB9, 0xBBB9B6BB,
+ 0xB5B8B6B8, 0xB9B8BBB9, 0xBBB9B8BB, 0xB8BBB9B8,
+ 0xB9B9BDB8, 0xBABAB8BB, 0xB8BABAB8, 0xBFC0C1BF,
+ 0x8080C0C1, 0x00000080, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x00000000, 0x00000000, 0x35300002, 0x969A9431,
+ 0x90969990, 0x99909899, 0x969A8F98, 0x888E9588,
+ 0x94898E95, 0x9094898E, 0x89909488, 0x94899195,
+ 0x8A8F8690, 0x878B9087, 0x92888991, 0x8991878A,
+ 0x80858B80, 0x8D7E888C, 0x858C7F88, 0x86899186,
+ 0x91878991, 0x848C8189, 0x87858D82, 0x90898991,
+ 0x89908989, 0x87899187, 0x91878991, 0x89918789,
+ 0x8A899187, 0x90898A91, 0x89908988, 0x848E9188,
+ 0x91888A8D, 0x8E918890, 0x858A9085, 0x94898890,
+ 0x9094898E, 0x898E9287, 0x958A9094, 0x8E928791,
+ 0x8A92958C, 0x958C9093, 0x92968B92, 0x8B8F9387,
+ 0x958A9397, 0x8F938891, 0x8792968A, 0x968A8F93,
+ 0x91958992, 0x8B8F958A, 0xA99F8F94, 0x868A84A1,
+ 0x07060606, 0x04090805, 0x06050708, 0x00000000,
+ 0x0D0B0001, 0x1213110C, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x806E6B66, 0x877F8A88, 0x88898089, 0x7D87887F,
+ 0x877E8687, 0x8B898186, 0x798C8B81, 0x887C8585,
+ 0x89897D88, 0x7E8D8D81, 0x877B8A8A, 0x87877B87,
+ 0x7A88877D, 0x847A8584, 0x85847A85, 0x7D83847B,
+ 0x8C838586, 0x86877D8B, 0x77808177, 0x81778281,
+ 0x82827682, 0x73868479, 0x71677F7D, 0x7E7D7373,
+ 0x78848278, 0x81778382, 0x83827882, 0x76818076,
+ 0x80768180, 0x81807681, 0x77828177, 0x796F8081,
+ 0x7C7D7478, 0x737D7E75, 0x78707D7B, 0x7A796F7A,
+ 0x6B7D7D71, 0x796E7876, 0x7B796E7B, 0x6A7B796E,
+ 0x73677775, 0x6F6F6373, 0x616F6E60, 0x685C706F,
+ 0x61615568, 0x4657584E, 0x51474F50, 0x494A4050,
+ 0x5158594F, 0x6F69595A, 0x6F6F696F, 0x88909188,
+ 0xA8A29091, 0xB2B4AEA8, 0xAEAEB0AA, 0xB8B2B0B4,
+ 0xBABCB6B6, 0xB6B9BDB7, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB2AEB5AE, 0xBBB5B2B9, 0xB5BBB6B7, 0xB8B6BCB7,
+ 0xBCB7B7BD, 0xB8BEB9B6, 0xB9B8BEB9, 0xBDB8B8BE,
+ 0xB7BDB8B7, 0xBCBBBFBA, 0xBFBABDC1, 0xBAC0BBB9,
+ 0xBABBBFBA, 0xC0BBBBBF, 0xBBBFBABC, 0xBBBCC0BB,
+ 0xBDBBBCC0, 0xBABDBBBA, 0xBDBCBFBD, 0xBDBBBCBF,
+ 0xBDC0BEBA, 0xBEBDC0BE, 0xC0BEBDC0, 0xBDC0BEBD,
+ 0xBDBEC1BF, 0xBDBBBCBF, 0xBCBFBDBA, 0xBDBABFBE,
+ 0xC0BEBABF, 0xB8BEB9BB, 0xBBBCBFBD, 0xBDBBBABD,
+ 0xBABFBDBA, 0xBDB7BEBB, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xBDB8BDBB, 0xBFBDBCBF, 0xBABFBDBC, 0xBCB9C0BD,
+ 0xBFBEB8BF, 0xB7BCBBBA, 0xBAB9C0BD, 0xBCBAB6BD,
+ 0xBABFBDB7, 0xBBBABFBD, 0xBDBCB8BD, 0xB9BFBEB7,
+ 0xBDB9C0BD, 0xBFBEB9C0, 0xBCBEBEBA, 0xB9B8BDBB,
+ 0xBEBCB6BB, 0xB6BBB9BB, 0xBBB7BCBB, 0xBCBBB7BC,
+ 0xB3B8B6B7, 0xB7B6BCB7, 0xBBB9B6BC, 0xB8BBB9B8,
+ 0xBAB6BCB7, 0xBBB9B7BC, 0xB6BBB9B6, 0xB7B9BDB8,
+ 0xBBB5B8BC, 0xB8BCB7B7, 0xB8B7BAB8, 0xBCB7B7BA,
+ 0xB5BBB6B8, 0xB9B6BBB9, 0xBBBAB6BB, 0xB5BAB8B6,
+ 0xADB2B6B1, 0xB2AEAEB2, 0xB1B2AEB1, 0xA4ACB0AA,
+ 0xB1ACA4AB, 0xA0A6A1AB, 0x99989B99, 0x8A889A9B,
+ 0x78797589, 0x595F5E5A, 0x47415F5F, 0x49494347,
+ 0x514C4E48, 0x61585557, 0x60615860, 0x606A6860,
+ 0x72696869, 0x70716771, 0x68707469, 0x74687074,
+ 0x72736972, 0x6D75766D, 0x786F7576, 0x76797075,
+ 0x6D71746B, 0x746B7376, 0x78796F73, 0x707C7D74,
+ 0x76717879, 0x827F7A79, 0x717F7C77, 0x78737B79,
+ 0x797A717B, 0x6E7A7B72, 0x73697677, 0x72736972,
+ 0x6F78796F, 0x7C737879, 0x7D7E757B, 0x79807D78,
+ 0x7873817E, 0x7B79717B, 0x757B7C73, 0x7B757D7E,
+ 0x7B7B757B, 0x7A7E7B76, 0x7774827F, 0x7774707C,
+ 0x7376736E, 0x79737979, 0x79797379, 0x77797973,
+ 0x77747F7C, 0x7F7A777C, 0x6D7B7874, 0x78737572,
+ 0x7B78747B, 0x787A7878, 0x78777A78, 0x2726227A,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x25232202,
+ 0x4E575450, 0x635C5753, 0x706B6269, 0x616E6C62,
+ 0x695E6E6C, 0x6664596B, 0x4F65645A, 0x4F475A59,
+ 0x48443F52, 0x383A3837, 0x06083838, 0x08050709,
+ 0x00000001, 0x00000000, 0x02000002, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x2D2C2802, 0x45403C37, 0x58504E4A, 0x6B695F5B,
+ 0x69717165, 0x75697575, 0x75756975, 0x66717367,
+ 0x65577275, 0x605D4F66, 0x30565449, 0x01003A38,
+ 0x00010002, 0x99323631, 0x9F9999A0, 0x9BA0979B,
+ 0x9A9FA59A, 0xA4999FA5, 0xA3A99E9E, 0x9DA4A89D,
+ 0xABA0A4A8, 0xA5AAA1A7, 0xA8A3A89F, 0xC1B8AAB2,
+ 0xB3B8AFBC, 0xB9B9BDB7, 0xC0BBBBBF, 0xBBBFBABC,
+ 0xBEB8BDBB, 0xBDBABAC1, 0xB7BEBBB6, 0xBAB3B8B6,
+ 0xBCBBB7BC, 0xB8BDBCB7, 0xBBB6BDBA, 0xBDBCB7BE,
+ 0xB9BEBDB8, 0xBBB8BDBB, 0xBEB9B8BD, 0xB7BDB8BA,
+ 0xB9B8BDBB, 0xBEBBB5BC, 0xB7BEBBB7, 0xB7B6BCBB,
+ 0xB3B1B2B8, 0xB5B8B6B0, 0xBBB7BCBA, 0xBCBBB7BC,
+ 0xB6BBBAB7, 0xBBB7BCBB, 0xBCBBB7BC, 0xB7BCBBB7,
+ 0xB9B7BCBA, 0xBCBBB6BB, 0xB7BCBBB7, 0xC1C0C3C1,
+ 0x8282C0C3, 0x00000082, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x68630001, 0x989A9464,
+ 0x8B989990, 0x938A9394, 0x91958A92, 0x848A9184,
+ 0x91848A91, 0x8C90858A, 0x858C9085, 0x8F868C90,
+ 0x8A8F868C, 0x838C9188, 0x8A83858D, 0x868B8283,
+ 0x8084887D, 0x877B888C, 0x868D8083, 0x82848C81,
+ 0x8D83848C, 0x838B8185, 0x8380887E, 0x8D86858D,
+ 0x858C8586, 0x83858D83, 0x8D83858D, 0x848D8385,
+ 0x83858D83, 0x918A848D, 0x88918789, 0x82878F85,
+ 0x8D84868B, 0x8E91888A, 0x83858D82, 0x8F84868E,
+ 0x898D8289, 0x898C9085, 0x93889094, 0x8E91888F,
+ 0x8A90928C, 0x938A8E90, 0x90948990, 0x898F9387,
+ 0x93889195, 0x91958A8F, 0x8691958A, 0x95898E92,
+ 0x92968A91, 0x8B8F958A, 0x958A9096, 0xA2A79E8D,
+ 0x056B6C6A, 0x04090705, 0x07040608, 0x00020001,
+ 0x01000200, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x2D2B2A02,
+ 0x777F7F79, 0x80777F80, 0x8889807F, 0x8186877D,
+ 0x89818A8B, 0x88877D8B, 0x7D88877D, 0x897D8989,
+ 0x85857989, 0x7F89877C, 0x867B8C8A, 0x88887C88,
+ 0x778A897F, 0x847A8281, 0x82817785, 0x7E82837A,
+ 0x877E8487, 0x87887F86, 0x7787867C, 0x81768281,
+ 0x89877C83, 0x7386847A, 0x776D7F7D, 0x7E7C7279,
+ 0x778B897F, 0x83798381, 0x7C7A7085, 0x7F86857B,
+ 0x847A8A89, 0x807F7586, 0x797F7E74, 0x7E758182,
+ 0x7B7C737D, 0x78808178, 0x80788081, 0x7D7C7282,
+ 0x6978766B, 0x766B7877, 0x7A7A6E78, 0x67747267,
+ 0x796E7472, 0x7472677B, 0x5A706F61, 0x685C6868,
+ 0x61615568, 0x40505147, 0x4B40494A, 0x4A4B4147,
+ 0x67585950, 0x70676F70, 0x8689806F, 0x948F9087,
+ 0xB4AE9A9D, 0xB0B4AEB2, 0xB3B0B4AE, 0xBBB5B5B9,
+ 0xB8BCB6B9, 0xB9BABEB8, 0xBEB9BABE, 0xBABEB9BA,
+ 0xB5B2B9B2, 0xBBB6B5BC, 0xB4BAB5B5, 0xB7B7BEB9,
+ 0xBCB7B6BC, 0xB9BDB8B6, 0xB9B9BFBA, 0xBEB9B8BE,
+ 0xB7BDB8B8, 0xBABBBFBA, 0xBEB9BBBF, 0xB9BFBAB8,
+ 0xBBBBBFBA, 0xBEB9BCC0, 0xBABEB9BA, 0xBBBABEB9,
+ 0xC0BEBCC0, 0xB8BBB9BD, 0xBEBCBFBD, 0xBEBCBDC0,
+ 0xBCBFBDBB, 0xBEBEC1BF, 0xC1BFBDC0, 0xBDC0BEBE,
+ 0xC0C0C0C0, 0xBBB9C0C0, 0xBCBFBDB8, 0xBEBCC1C0,
+ 0xC0BEB9BF, 0xB9BFBABB, 0xBDBCBFBD, 0xBDBCBCBF,
+ 0xB8BDBCB8, 0xBDB7BEBB, 0xC0BFB9C0, 0xB9BFBEBA,
+ 0xBBB8BBB9, 0xBEBCBABD, 0xBBC0BEBB, 0xBBB9C0BD,
+ 0xBFBEB7BE, 0xB8BDBCBA, 0xBBB8BFBC, 0xBFBDB7BE,
+ 0xBABFBDBA, 0xB9B9BEBC, 0xBFBEB6BB, 0xBAC0BFB9,
+ 0xBEB7C0BD, 0xBFBEBAC1, 0xBABCBCBA, 0xBDB6BBB9,
+ 0xBFBDBABF, 0xB7BCBABA, 0xBBB6BCBB, 0xB8B7B6BC,
+ 0xB8BDBCB2, 0xB9BABFBD, 0xBBB9B8BE, 0xBCBFBDB8,
+ 0xB7B8BEB9, 0xBDBBB6BC, 0xB8BDBBB8, 0xB7B8BCB7,
+ 0xBCB6B8BC, 0xB8BCB7B8, 0xB8B7BAB8, 0xBBB6B5BA,
+ 0xB4BAB5B5, 0xB7B5BAB8, 0xBAB9B4B9, 0xB3B8B6B5,
+ 0xAEB0B5B3, 0xB3AFAFB3, 0xB1B2AEB2, 0xAAB0B4AF,
+ 0xB0ABAAB1, 0xAAB0ABAA, 0x99A8ABA9, 0x9B99989B,
+ 0x898A889A, 0x5972736F, 0x5F595F5F, 0x4747415F,
+ 0x4842433F, 0x5751494D, 0x60615857, 0x606B6961,
+ 0x6A616A68, 0x70716869, 0x646C7065, 0x70646C70,
+ 0x7172686E, 0x6B73746B, 0x746B7374, 0x71746B71,
+ 0x6D71746B, 0x756B7376, 0x797A7074, 0x7377786F,
+ 0x7C767B7C, 0x7D7D777C, 0x737F7C77, 0x746E7B78,
+ 0x74746E74, 0x6F70736A, 0x72687578, 0x72736971,
+ 0x7278796F, 0x7E757B7C, 0x7879707D, 0x727C7974,
+ 0x736E7A77, 0x7B797176, 0x737B7C73, 0x7C737B7C,
+ 0x7D7D777B, 0x737E7B76, 0x746F7B78, 0x78746F78,
+ 0x68726F6A, 0x6E697270, 0x75756F71, 0x7374746E,
+ 0x76737979, 0x807C777B, 0x6F726F6A, 0x7C777774,
+ 0x7F7C787F, 0x787A7878, 0x77767878, 0x43414079,
+ 0x00000100, 0x00000000, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x25232202,
+ 0x4F56534F, 0x635C5854, 0x706B6269, 0x626E6C62,
+ 0x685D6D6C, 0x67655A6A, 0x4F646458, 0x4F475A59,
+ 0x49444152, 0x393A3837, 0x04093837, 0x08040908,
+ 0x00020001, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x2F2C2802, 0x453F3C38, 0x58534E4A, 0x6B68605C,
+ 0x65727065, 0x73697171, 0x73746A74, 0x61707468,
+ 0x6557696D, 0x605D4F66, 0x30585449, 0x00003B38,
+ 0x00000002, 0x9D303533, 0x9F9A9A9F, 0x99A09999,
+ 0x9A9FA49B, 0xA49A9FA5, 0xA3A89F9C, 0x9CA4A89D,
+ 0xAAA1A3A7, 0xA5AAA1A5, 0xA7A0A89E, 0xB8AFA9B1,
+ 0xB5B8AFB3, 0xB9B8BCB6, 0xBDB9BBBF, 0xBCC0BBBC,
+ 0xBDB8BDBB, 0xC1BEB9C0, 0xB5BCB9BA, 0xB6AEB3B1,
+ 0xBCBBB3B8, 0xB6BCBBB7, 0xBDB9BFBE, 0xBFBEB9C0,
+ 0xB9BEBDBA, 0xBDB8BDBB, 0xBDBBBABF, 0xB8BEB9B8,
+ 0xBBB7BCBA, 0xBEBBB8BD, 0xB7BEBBB7, 0xBCB6BCBB,
+ 0xB7B7B7BD, 0xB5B8B6B5, 0xBAB7BCBB, 0xBDBCB6BB,
+ 0xB7BCBBB8, 0xBBB7BCBB, 0xBCBBB7BC, 0xB8BDBCB7,
+ 0xB9B6BDBA, 0xBCBBB5BC, 0xB7BCBBB7, 0xC1C0C3C1,
+ 0x8282C0C3, 0x00000082, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000001, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000102,
+ 0x00000000, 0x00000000, 0x332F0001, 0x989A9432,
+ 0x8A989990, 0x90869394, 0x8C90858F, 0x858A9085,
+ 0x8D838890, 0x878C8385, 0x84858A81, 0x8983868A,
+ 0x85898385, 0x7E80847E, 0x847B8284, 0x82857C81,
+ 0x7A83847B, 0x857A8384, 0x82867B81, 0x7C80857C,
+ 0x847B8085, 0x83867D81, 0x7D82887D, 0x877C8288,
+ 0x82887D81, 0x7C82887D, 0x897E8187, 0x858D8283,
+ 0x7D888E83, 0x8D838088, 0x858D8385, 0x84828B81,
+ 0x8D84848B, 0x888D8488, 0x83858D83, 0x9087858D,
+ 0x82877E8B, 0x888C9188, 0x8D848C91, 0x8E908A88,
+ 0x8A8E908A, 0x92899090, 0x90918891, 0x88929389,
+ 0x91879192, 0x93948A90, 0x88919288, 0x968B9192,
+ 0x8E928792, 0x8A8E9489, 0x958B8F95, 0x8F948B8D,
+ 0x37A0A09A, 0x05073C38, 0x08050708, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x55545002,
+ 0x80888882, 0x89808889, 0x8B898188, 0x7D85867C,
+ 0x8A818687, 0x8B8A8089, 0x7C8C8B81, 0x897E8987,
+ 0x89877C8B, 0x7D87877B, 0x897E8A88, 0x8E8C818B,
+ 0x7E89887E, 0x857B8988, 0x82817786, 0x78808178,
+ 0x80778081, 0x83847B7F, 0x7786877D, 0x81768281,
+ 0x83817683, 0x737E7D73, 0x847A7F7D, 0x7F7D7386,
+ 0x787D7B70, 0x82788583, 0x83817784, 0x7A86847A,
+ 0x7F778684, 0x817F7782, 0x74828078, 0x7E757C7D,
+ 0x8081787D, 0x717D7E75, 0x7A72797A, 0x7F7E747C,
+ 0x6B7D7B70, 0x74687876, 0x72746874, 0x64747466,
+ 0x72647272, 0x74746672, 0x526F6F61, 0x5B4F5E61,
+ 0x58594F59, 0x48505148, 0x4B415051, 0x57584E4A,
+ 0x666F7067, 0x89806C6F, 0x82877E86, 0xA39A9C96,
+ 0xB4AFA4A8, 0xAFB3AEB0, 0xB6B3B7B1, 0xBDB8B6BD,
+ 0xB7BBB6B9, 0xB9B9BDB8, 0xBEB9B8BE, 0xB8BEB9B8,
+ 0xBAB7BBB5, 0xBCB5BCC0, 0xB9C0B9B5, 0xB7B8BFB8,
+ 0xBEB9B7BE, 0xB6BCB7B8, 0xB8B6BCB7, 0xBEB9B7BD,
+ 0xB7BDB8B8, 0xB9BBBFBA, 0xBDB8BABE, 0xBBBFBAB9,
+ 0xBABABEB9, 0xBFBABBBF, 0xBBBFBABB, 0xB7B9BDB8,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xBDBCBFBD, 0xBDBBBCBF,
+ 0xBCBFBDBA, 0xBEBDC0BE, 0xC0BEBDC0, 0xBDC0BEBD,
+ 0xC0BFBFBF, 0xBDBBC0C0, 0xBABDBBBC, 0xBDBABFBE,
+ 0xBFBDB8BE, 0xB8BDBBBA, 0xBDBEC2BD, 0xBFBEBCBF,
+ 0xBABFBEBA, 0xBBB7BEBB, 0xC0BFB7BE, 0xB9BFBEBA,
+ 0xBCB9BBBB, 0xBEBEBABC, 0xBCC1C0BC, 0xBCB9BFBE,
+ 0xBDBCB7BD, 0xB8BDBCB8, 0xB7B9C0BD, 0xC0BEB3BA,
+ 0xBABFBDBB, 0xBBB8BDBB, 0xC1BEB8BD, 0xB9C0BDBA,
+ 0xBEB7BFBE, 0xBDBBB9BF, 0xB8BBB9BA, 0xBEB7BDBC,
+ 0xBFBDB9BF, 0xB9BEBCBA, 0xB7B7BCBA, 0xB7B6B3BA,
+ 0xB6BCBBB1, 0xBCB8BFBC, 0xBDBBB8BF, 0xB8BDBBB8,
+ 0xB6B9BDB8, 0xBEB9B8BC, 0xB8BCB7BA, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB3B9B4B6, 0xB7B4B9B7, 0xB9B7B4B9,
+ 0xB3BAB7B4, 0xB6B5BBB6, 0xBAB8B5BB, 0xB4B9B7B7,
+ 0xB3B3B8B6, 0xB6B4B0B5, 0xB1B5B0B1, 0xAFAFB5B0,
+ 0xAFAAAEB4, 0xA4ABA6A8, 0xA7A7ADA8, 0x9A98A6AC,
+ 0x989B9997, 0x70888C87, 0x5E5A7374, 0x5D5E5A5D,
+ 0x4840443F, 0x5852494D, 0x57575158, 0x605F6057,
+ 0x69606869, 0x68696068, 0x696D7166, 0x6F657074,
+ 0x6E6F656E, 0x6873746B, 0x706A7071, 0x73736D70,
+ 0x7077786F, 0x7A707879, 0x74756B79, 0x737A7870,
+ 0x7C737B7C, 0x797C737B, 0x6C7A7B72, 0x736B7475,
+ 0x74756C75, 0x7170736A, 0x7E76797A, 0x7F7D7580,
+ 0x737D7B73, 0x79707D7B, 0x7B7C7378, 0x6E77756D,
+ 0x79717876, 0x7B79717B, 0x72787970, 0x7C727B7C,
+ 0x7D7E757B, 0x717D7B73, 0x79717C79, 0x807C777C,
+ 0x6E7B7873, 0x746C7673, 0x76746C76, 0x68707168,
+ 0x726D7071, 0x77736E76, 0x6C76746C, 0x78707674,
+ 0x7B78737A, 0x777B7978, 0x79777777, 0x797A7878,
+ 0x00131110, 0x00000200, 0x00000000, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x24222102,
+ 0x4F575450, 0x655B5854, 0x6E6C6267, 0x62727167,
+ 0x64596D6C, 0x66645966, 0x4F59594D, 0x50485A59,
+ 0x46433F53, 0x3A3A3837, 0x03083938, 0x08040907,
+ 0x00020001, 0x00000200, 0x00000000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x2F2C2802, 0x453F3C38, 0x58544D4A, 0x6B67625B,
+ 0x686E6C62, 0x7A707573, 0x6F70667B, 0x68707468,
+ 0x63587274, 0x605C5165, 0x3056544A, 0x01003A38,
+ 0x00010100, 0x99000100, 0x9F9A989E, 0x99A09998,
+ 0x999EA39A, 0xA39A9EA4, 0xA1A69D9E, 0x9DA4A89D,
+ 0xAAA1A4A8, 0xA5A9A3A5, 0xA7A1A99F, 0xAFA9A9B1,
+ 0xBCC0BAAB, 0xBCBDC1BC, 0xC0BBBDC1, 0xBABDBBBC,
+ 0xBDBBC0BF, 0xBFBEB8BE, 0xB8BDBCBA, 0xBAB5BBBA,
+ 0xBBBCB5BB, 0xBAC0BFB6, 0xBFB9BFBE, 0xBDBCBAC0,
+ 0xB8BDBCB7, 0xBBB7BCBB, 0xBFBDB8BD, 0xB7BEBBBA,
+ 0xBDB7BEBB, 0xBFBDB9C0, 0xB8BDBBBA, 0xBBB6BCBB,
+ 0xBBBBB6BC, 0xB5B7B7B9, 0xBBB7BCBA, 0xBBBCB8BD,
+ 0xB7BBBCB6, 0xBAB7BCBA, 0xBCBBB9BC, 0xB7BCBBB7,
+ 0xBAB7BCBA, 0xBCBBB7BC, 0xB7BCBBB7, 0xC1C0C3C1,
+ 0x8282C0C3, 0x00000082, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x01000000, 0x98999500,
+ 0x8293948B, 0x8A818A8B, 0x868B8287, 0x7F83887F,
+ 0x88818189, 0x81888181, 0x7F7E857E, 0x847F7F86,
+ 0x7F837E80, 0x787E807A, 0x81787E81, 0x7E817880,
+ 0x787E8178, 0x81787E81, 0x7B80777C, 0x787D8279,
+ 0x81787C81, 0x7E82777E, 0x787D8378, 0x84787E85,
+ 0x7F837780, 0x79808479, 0x84798084, 0x7E84797E,
+ 0x797D8279, 0x877E7B83, 0x81897F82, 0x81808881,
+ 0x887F8188, 0x83887F83, 0x8383887F, 0x8A84858D,
+ 0x878B8586, 0x888A8E88, 0x8C868A8E, 0x8A8E8888,
+ 0x888E9188, 0x91889091, 0x90918790, 0x88929389,
+ 0x91879192, 0x92938990, 0x87919289, 0x92898D90,
+ 0x8E91888F, 0x8B8F948B, 0x958B8F94, 0x8F948B8D,
+ 0x9AA0A198, 0x0505A0A0, 0x07040607, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x2A290001, 0x81807C2C,
+ 0x80888882, 0x89808889, 0x8A888088, 0x7D898A80,
+ 0x887F8687, 0x8C8A8287, 0x7D89887E, 0x887D8989,
+ 0x87877B8A, 0x8187877B, 0x8C818E8C, 0x8E8C818E,
+ 0x7E8A887E, 0x83798988, 0x81807684, 0x78808178,
+ 0x847B8081, 0x86877E83, 0x81898A80, 0x8B818A8B,
+ 0x7D7D718C, 0x73727167, 0x857B7E7D, 0x7F7D7387,
+ 0x6976746A, 0x82787573, 0x84827884, 0x7B7D7B71,
+ 0x897F8785, 0x817F778B, 0x73828078, 0x7D747B7C,
+ 0x8182797C, 0x737B7C73, 0x78707B7C, 0x7A796F7A,
+ 0x6E7C7A6F, 0x74687A7A, 0x72746872, 0x65717367,
+ 0x70647373, 0x6F6F6170, 0x5568685A, 0x594F6161,
+ 0x58594F58, 0x41505148, 0x5249494A, 0x5D5E5551,
+ 0x7E6C7065, 0x897E8589, 0x9BA09783, 0xA2A4A8A2,
+ 0xB4AFA4A8, 0xB0B4AFB0, 0xB5B4B8B2, 0xBCB6B7BB,
+ 0xB8BCB7B8, 0xBAB7BDB8, 0xBDB8B7BC, 0xB8BEB9B7,
+ 0xB4B7BBB5, 0xBCB5B6BA, 0xB9C0B9B5, 0xB8B8BFB8,
+ 0xBEB9B8BF, 0xB9BFBAB8, 0xB7B7BDB8, 0xBDB8B6BC,
+ 0xB7BDB8B7, 0xBBBBBFBA, 0xBFBABCC0, 0xBABEB9BB,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBCBEC2BD,
+ 0xBEB9BDC1, 0xB7BBB6BA, 0xBBB8BBB9, 0xC0BEBABD,
+ 0xBCBFBDBD, 0xBDBDC0BE, 0xC0BEBCBF, 0xBCBFBDBD,
+ 0xBFBFC1C1, 0xBEBCBDBF, 0xBABDBBBB, 0xBFBABFBE,
+ 0xBFBDBAC0, 0xBABFBDBA, 0xBBBEC2BD, 0xBFBDBCC0,
+ 0xBABFBEBC, 0xBCB7BEBB, 0xC1C0B8BF, 0xB8BEBDBB,
+ 0xBEBBC0BF, 0xBEBEBABF, 0xBCC1C0BC, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEBA, 0xB9B9C0BD, 0xC0BDB5BC,
+ 0xBABFBDB9, 0xBBB7BCBA, 0xC1BEB7BE, 0xB9BFBEBA,
+ 0xBEB7BFBE, 0xBBBBB9BF, 0xB9BCBAB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB8BDBBBA, 0xB5B3B8B6, 0xBDBAB2B7,
+ 0xB7BEBBB6, 0xBCB6BCBB, 0xBFBDB9BE, 0xB8BBB9BA,
+ 0xB8B8BCB7, 0xBDB8B9BD, 0xB7BBB6B9, 0xB1B0B3B1,
+ 0xBBB9B0B3, 0xB3B8B6B6, 0xB8B5BAB8, 0xBCB9B5BA,
+ 0xB5BCB9B5, 0xB7B6BCB7, 0xBAB8B6BC, 0xB5BAB8B7,
+ 0xB3B4B9B7, 0xB5B3B0B5, 0xB1B6B4B0, 0xABADB3AE,
+ 0xB0ABAAB0, 0xA4AAA5AA, 0xA7A6ACA7, 0xACAAA6AC,
+ 0x989B99A7, 0x88888C87, 0x7470898D, 0x5D5E5A73,
+ 0x3E494D48, 0x4B473F43, 0x5757514A, 0x58595953,
+ 0x685F6061, 0x68696067, 0x65666960, 0x6C626C70,
+ 0x6B6C626B, 0x68707168, 0x756F7071, 0x78787275,
+ 0x6D787970, 0x73697576, 0x78796F72, 0x707D7B73,
+ 0x79707879, 0x777A7178, 0x686F7067, 0x746C7071,
+ 0x7B797176, 0x71797A71, 0x7D75797A, 0x7F7D757F,
+ 0x737D7B73, 0x7A717B7C, 0x78797079, 0x767B7971,
+ 0x7E76807E, 0x817F7780, 0x727D7E75, 0x786F7B7C,
+ 0x7C7D7477, 0x747E7C74, 0x79717E7C, 0x76746C7B,
+ 0x747B7873, 0x736E7C79, 0x7C7A7276, 0x7374746E,
+ 0x78737979, 0x75726D7B, 0x6B7B7971, 0x7A727573,
+ 0x75726D7C, 0x78797776, 0x7977797A, 0x78797578,
+ 0x00353332, 0x00000200, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x26252102,
+ 0x4D57544F, 0x645A5855, 0x6E6C6266, 0x626D6C62,
+ 0x675D6D6C, 0x69695D69, 0x4F65645A, 0x4E465859,
+ 0x47443F50, 0x383A3837, 0x06083A38, 0x08050709,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x302C2B02, 0x453F3C38, 0x58534D4A, 0x6A67625B,
+ 0x6A6E6C62, 0x73697674, 0x6F706674, 0x60727468,
+ 0x64596A6C, 0x5F5D5266, 0x31565449, 0x01003B39,
+ 0x00010000, 0x66000100, 0x9F98656B, 0x99A19798,
+ 0x9BA1A69D, 0xA39AA0A6, 0x9FA49B9E, 0xA1A2A79E,
+ 0xA8A2A5AA, 0xA2A6A0A4, 0xA8A1A8A1, 0xAFA9A8AF,
+ 0xBCC0BAAB, 0xBAC0C4BF, 0xBFBABBBF, 0xBCBFBDBB,
+ 0xBEBABFBE, 0xBFBEBABF, 0xB8BDBCBA, 0xBBB7BCBB,
+ 0xBCBBB6BC, 0xBAC0BFB6, 0xBEBAC0BF, 0xC0BFB9BF,
+ 0xB9BEBDBA, 0xBDB7BCBB, 0xBDBBB9BE, 0xB7BEBBB8,
+ 0xBDB9C0BD, 0xBCBAB9C0, 0xB9BEBCB7, 0xBCB6BCBB,
+ 0xBCBBB7BD, 0xB5B7B7B7, 0xBBB5BAB8, 0xBBBCB8BD,
+ 0xB7BCBDB6, 0xB2B9BCBA, 0xBCBAB1B4, 0xB7BCBBB7,
+ 0xBAB7BCBA, 0xBCBBB7BC, 0xB7BCBAB7, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x8A8B8700,
+ 0x7E82837F, 0x857F8284, 0x81857F83, 0x78787C76,
+ 0x7B76797D, 0x787C7777, 0x77767C77, 0x7C77767C,
+ 0x7A7B7778, 0x70777973, 0x79707679, 0x74797076,
+ 0x7270786E, 0x77707179, 0x71787170, 0x71717871,
+ 0x796F7178, 0x71796E71, 0x70767C71, 0x7C70787C,
+ 0x787C7178, 0x76787D74, 0x7C77787C, 0x787C7778,
+ 0x79798079, 0x80797880, 0x79807979, 0x787C807A,
+ 0x81787E81, 0x7F807780, 0x7D80847E, 0x847E7F83,
+ 0x80847E80, 0x81818881, 0x88818188, 0x83887F81,
+ 0x80888C81, 0x8C80888C, 0x878B7F88, 0x80888C80,
+ 0x8C80888C, 0x888C8188, 0x878A8C86, 0x8C868B8D,
+ 0x878B858A, 0x87888C87, 0x8C87888C, 0x888C8686,
+ 0x89909489, 0x645E9094, 0x02030162, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x01020301, 0x59550203, 0x8584805A,
+ 0x7D85857F, 0x847B8586, 0x88898083, 0x7E8D8C82,
+ 0x88808988, 0x8B89818A, 0x7E89887E, 0x8A7E8788,
+ 0x89897D8A, 0x7E8E8E82, 0x897F8B89, 0x88867C8B,
+ 0x7D8B897E, 0x887E8A88, 0x8382788A, 0x7A808177,
+ 0x847A8384, 0x80817783, 0x7B84857C, 0x867C8485,
+ 0x85847A85, 0x767D7C72, 0x847A8180, 0x86847A85,
+ 0x687F7D73, 0x776D7472, 0x7F7D7379, 0x74848075,
+ 0x8479837F, 0x85847A86, 0x77807F75, 0x7C728081,
+ 0x7E7F757B, 0x727D7C72, 0x786E7D7C, 0x7575697A,
+ 0x7075776B, 0x776B7A7C, 0x76786C75, 0x5F727468,
+ 0x695F696B, 0x6B6B5F68, 0x4D5E5C51, 0x51475A58,
+ 0x50514852, 0x484E5148, 0x655F4E51, 0x64655C65,
+ 0x80898D82, 0x988F868D, 0xA2A79E93, 0xAEB0B3AA,
+ 0xB7B1B4B7, 0xB9BCB3B5, 0xB8BDC0B7, 0xC1B8BEC1,
+ 0xBDBFB9BE, 0xB8BABEB9, 0xBDB8B7BD, 0xB8BCB7B9,
+ 0xB6B6BCB7, 0xBDB8B5BB, 0xB8BCB7B9, 0xB7B8BCB7,
+ 0xBDBBB8BC, 0xB9BCBABA, 0xBBBABDBB, 0xBBB9BABD,
+ 0xB8BBB9B8, 0xBBB9BCBA, 0xBCBABABD, 0xB9BEBCB7,
+ 0xB9BABDBB, 0xBDB8B8BB, 0xBCC0BBB9, 0xBABDC1BC,
+ 0xC1BCBBBF, 0xB9BDB8BD, 0xB9B8BCB7, 0xBBB9BABE,
+ 0xBABDBBB8, 0xBDBBBEBC, 0xBFBDBCBF, 0xBEC1BFBC,
+ 0xBFBBC0BF, 0xBEBCBBC0, 0xB7BCBAB9, 0xBFB9BFBE,
+ 0xBFBEBAC0, 0xB8BDBBB9, 0xBCBBBFBA, 0xC0BEBDC1,
+ 0xB9BEBCBD, 0xBEB7BDBC, 0xBFBEB9BF, 0xB7BDBCB9,
+ 0xBDBAC1BE, 0xBFBDB9C0, 0xBBC0BEBA, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xBAC0BFB9, 0xBEB9BFBE, 0xC0BFB7BF,
+ 0xB7BDBCB8, 0xBEB6BCBB, 0xC0BFB9BF, 0xB8C0C0BA,
+ 0xBDB9BEBF, 0xBCBBB8BE, 0xBABFBEB7, 0xBDB7BDBC,
+ 0xBDBCB8BE, 0xB9BBBBB8, 0xB9B8BBB9, 0xBEB9BABE,
+ 0xB7BCBAB8, 0xBAB7BCBB, 0xB8B6B6BB, 0xB5B8B6B5,
+ 0xB9B9BCBA, 0xBBB9B8BB, 0xB8BBB9B8, 0xBBACB1B0,
+ 0xBCBBB7BC, 0xB7BCBBB7, 0xBBB7BCBB, 0xBDBCB7BC,
+ 0xB7BCBAB8, 0xB6B6BCB7, 0xBAB8B5BB, 0xB5BAB8B5,
+ 0xB4B3B8B6, 0xB6B4B3B6, 0xB3B6B4B3, 0xB4B3B6B4,
+ 0xB4AFB3B6, 0xAEB4AFB0, 0xABABB1AC, 0xB0ABAAB0,
+ 0xA1A7A2AA, 0x92929893, 0x817B9197, 0x686C677D,
+ 0x475D615C, 0x4C47484C, 0x4A4C4648, 0x5351534D,
+ 0x62595759, 0x5F605761, 0x6565665D, 0x6E656D6E,
+ 0x7071686D, 0x696F7066, 0x736A7273, 0x70716872,
+ 0x6D73746B, 0x79707576, 0x72736A78, 0x6D75766D,
+ 0x736A7576, 0x70716872, 0x6A737169, 0x756D7472,
+ 0x79776F77, 0x6D78796F, 0x766C7677, 0x74756C75,
+ 0x70787970, 0x79707679, 0x76797076, 0x70787970,
+ 0x7B757879, 0x7C7C767B, 0x767D7D77, 0x79737E7F,
+ 0x7D7D7779, 0x767B7B75, 0x7C737C7C, 0x7C7D7479,
+ 0x737A7772, 0x7B777A77, 0x787A747C, 0x727A7975,
+ 0x77737776, 0x7877737A, 0x6F7D7D77, 0x7C777774,
+ 0x7F7C787F, 0x7A7D7B7A, 0x77737B7C, 0x79797378,
+ 0x0051504C, 0x01000201, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x2A272202,
+ 0x4A55524A, 0x635C5853, 0x706D6569, 0x646F6E64,
+ 0x695F6D6E, 0x68695F68, 0x4D606158, 0x4C435556,
+ 0x40403A4B, 0x3037342F, 0x03023734, 0x07030207,
+ 0x00020000, 0x01000200, 0x00010000, 0x00000100,
+ 0x00000200, 0x00000002, 0x00000000, 0x00000000,
+ 0x312F2E02, 0x43403D39, 0x534E4B48, 0x62605856,
+ 0x6769685E, 0x6F677271, 0x70716771, 0x5A6D6F63,
+ 0x61556669, 0x61615561, 0x2B4F4F43, 0x01003635,
+ 0x00010000, 0x30000100, 0x9B923135, 0x969C9196,
+ 0x9CA0A69B, 0xA39DA0A5, 0xA3A7A1A1, 0xA1A1A8A1,
+ 0xA8A1A1A8, 0xA1A8A1A1, 0xA7A8ACA6, 0xACA7A8AC,
+ 0xB8BCB7A8, 0xBAC3C4C0, 0xBEB9BDBE, 0xBBBEBCBA,
+ 0xBFBDBFBF, 0xBDBDBDBF, 0xBABDBBBB, 0xBFBCBEBE,
+ 0xBFBEBBC0, 0xBABFBDBA, 0xBEBBC0BE, 0xBFBDBBC0,
+ 0xBBC0BEBA, 0xBBB9BEBD, 0xBDBBB7BC, 0xB8BDBBB8,
+ 0xBDBABFBD, 0xC0BBBABF, 0xB7BDB8BC, 0xBFB9BFBE,
+ 0xBFBEBAC0, 0xB5BAB8BA, 0xBAB8BDBB, 0xBDBEB7BC,
+ 0xB5BABBB8, 0xB9B7BAB8, 0xBDBBB8BB, 0xB7BEBBB8,
+ 0xBAB8BDBB, 0xBCBAB7BC, 0xB9BCBAB9, 0xBFC2C3BF,
+ 0x8282C2C3, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x01000000, 0x5C5D5B00,
+ 0x7F838482, 0x83818283, 0x80847F80, 0x79787B79,
+ 0x7B79787B, 0x7B7C7A7A, 0x77787B79, 0x7B77787C,
+ 0x7A7B777A, 0x72757771, 0x79707678, 0x74787276,
+ 0x71717871, 0x78736F76, 0x70767172, 0x73717772,
+ 0x78717278, 0x71787171, 0x70767B72, 0x7C73777B,
+ 0x787B7279, 0x797A7B77, 0x7B79787B, 0x787B7978,
+ 0x7A7A7F7D, 0x807B797F, 0x7A807B7A, 0x7A7B7F79,
+ 0x817B7E80, 0x80807A81, 0x7F82837F, 0x847F8084,
+ 0x80847F80, 0x82828883, 0x86818187, 0x83878180,
+ 0x81888B82, 0x8C81888C, 0x888C8188, 0x81888C81,
+ 0x8C81888C, 0x888B8288, 0x878A8B87, 0x8B868A8B,
+ 0x898D8887, 0x89888B89, 0x8B89888B, 0x898D8788,
+ 0x888D9388, 0x635D8F93, 0x02030061, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x00020301, 0x59550403, 0x87847F5C,
+ 0x7C89877F, 0x887F8485, 0x88898087, 0x808A897F,
+ 0x89818B8A, 0x8A897F8B, 0x828A8B81, 0x8C808B8C,
+ 0x8A8C808A, 0x7B8A8A7E, 0x8C828886, 0x8E8C828D,
+ 0x7E908C81, 0x887E8D89, 0x89887E8A, 0x8183847A,
+ 0x877D8A8B, 0x83847A86, 0x7B85867D, 0x847A8384,
+ 0x83847A83, 0x7F8A897F, 0x80768A89, 0x85847A81,
+ 0x6D7E7C74, 0x7C727877, 0x7F7D737D, 0x757E7C71,
+ 0x80758280, 0x7C7C7082, 0x777C7D73, 0x82788081,
+ 0x7C7D7381, 0x72828177, 0x7C717D7C, 0x7A786D7E,
+ 0x6B707266, 0x786C7577, 0x71716578, 0x60696A60,
+ 0x6A60676B, 0x63625869, 0x4A5E5C51, 0x544A5755,
+ 0x50514855, 0x5E4E5148, 0x625E6264, 0x77797361,
+ 0x8F878B80, 0xA79E949A, 0xB0B4AEA2, 0xADB5B8AF,
+ 0xBCB3B4B8, 0xC0C1B8BB, 0xB8BEC1B8, 0xC1B8BEC1,
+ 0xBDBFB9C0, 0xB9BABEB8, 0xBEB9B8BE, 0xB9BDB8BA,
+ 0xB9B6BCB7, 0xBCB7B8BE, 0xBABEB9B8, 0xB8BABEB9,
+ 0xBDBBB9BD, 0xBBBEBCBA, 0xBABABDBB, 0xBDBBB9BC,
+ 0xBABDBBBA, 0xB9B8BBB9, 0xBCBAB8BB, 0xB7BCBAB7,
+ 0xB9BABDBB, 0xBEB9B8BB, 0xBBBFBABA, 0xBABBBFBA,
+ 0xC2BDBBBF, 0xBABEB9BE, 0xBCB7BBB6, 0xBDBBBDC1,
+ 0xB8BBB9BA, 0xBABABDBB, 0xBFBDB9BC, 0xBEC1BFBC,
+ 0xC0BBC0BF, 0xC0BEBBC1, 0xB6BBB9BB, 0xBFB8BDBC,
+ 0xBDBCBAC0, 0xB7BEBBB7, 0xBABBBFBA, 0xBDBBBBBF,
+ 0xB8BDBBBA, 0xC0B9BEBD, 0xC0BFBBC1, 0xB7BDBCBA,
+ 0xBDB7C0BD, 0xC1BEB9C0, 0xBBC0BEBA, 0xBEB9C0BD,
+ 0xBFBEBAC1, 0xBAC0BFB9, 0xBEB7BFBE, 0xBEBDB7BF,
+ 0xB4BCBBB6, 0xBEB9BFBE, 0xC0C0B9BF, 0xB7BFBFB8,
+ 0xBCB9BFBE, 0xBFBEB7BD, 0xBCC1C0BA, 0xBCB6BCBB,
+ 0xBBBCB7BD, 0xB7BCBBB7, 0xB7B8BBB9, 0xBBB6B8BC,
+ 0xB8BDBBB7, 0xBBB7BCBB, 0xBBBBB7BC, 0xB9BCBAB9,
+ 0xBBBABDBB, 0xBDBBBABD, 0xBABDBBBA, 0xBBB7BCBB,
+ 0xBCBBB7BC, 0xB7BCBBB7, 0xBBB7BCBB, 0xBCBBB7BC,
+ 0xB7BCBBB7, 0xB6B5BAB8, 0xBBB9B5BB, 0xB5BAB8B6,
+ 0xB1B5B9B4, 0xB2B0B2B6, 0xB5B6B4B1, 0xB4B3B6B4,
+ 0xB7B2B5B9, 0xB3B7B2B3, 0xABB0B4AF, 0xB0ABAAB0,
+ 0xA9B0ABAA, 0x92A5ABA6, 0x97919197, 0x7D817C93,
+ 0x485D605E, 0x4C47474A, 0x484C4748, 0x4D4A4C46,
+ 0x61585153, 0x60615860, 0x62696963, 0x6C666868,
+ 0x7071686C, 0x676E6F65, 0x70677071, 0x7071686F,
+ 0x6B73746B, 0x766D7374, 0x75766D75, 0x686F7067,
+ 0x71687071, 0x70716870, 0x7074756C, 0x756D7A78,
+ 0x7A787077, 0x6B78796F, 0x766B7475, 0x767A6F72,
+ 0x70787970, 0x786F7879, 0x76776E77, 0x72787970,
+ 0x7B757A7B, 0x7D7D777B, 0x747B7B75, 0x78737A7A,
+ 0x7878727B, 0x737C7C76, 0x7C737779, 0x797B7579,
+ 0x747C7975, 0x77737B78, 0x75767276, 0x73787773,
+ 0x76727877, 0x7D7C7877, 0x737D7C78, 0x7A777A77,
+ 0x7F7C787F, 0x7D7B7A76, 0x7A768081, 0x7A7A747B,
+ 0x24787872, 0x01002928, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x2B282302,
+ 0x4A57554B, 0x635C5853, 0x6F6C6469, 0x63737169,
+ 0x69606C6D, 0x66696066, 0x4D606158, 0x4C435556,
+ 0x40413849, 0x2E37342F, 0x03003733, 0x07040008,
+ 0x00020000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000200, 0x02000002, 0x00000000, 0x00000000,
+ 0x32302F00, 0x433F3C38, 0x544C4B48, 0x62605856,
+ 0x6169685E, 0x71686C6B, 0x70716870, 0x5A6D7061,
+ 0x61556669, 0x5A594F61, 0x2B4F4F43, 0x01003435,
+ 0x00010002, 0x31000000, 0x9D923233, 0x979B8F99,
+ 0x9CA0A499, 0xA39AA0A5, 0xA3A7A1A0, 0xA1A1A8A1,
+ 0xA8A1A0A8, 0x9EA59EA1, 0xA7A8ACA7, 0xACA7A8AC,
+ 0xB8BCB7A8, 0xBBBFC3BE, 0xC0BBBCC0, 0xBBBFBABC,
+ 0xBBBABDBB, 0xBEBCBABD, 0xBCBFBDBB, 0xBEBFC1C1,
+ 0xBFBDBCBE, 0xBEC1BFBC, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBABFBE, 0xBFBEB9BF, 0xBABFBDBA,
+ 0xBDBABFBD, 0xC0BBBABF, 0xBABFBDBC, 0xBFB9BFBE,
+ 0xBDBCB9BE, 0xBABFBDB7, 0xBBB7BCBA, 0xBFC0B7BC,
+ 0xB8BDBEBA, 0xBDB8BDBC, 0xC0BDBABF, 0xB7BEBBB9,
+ 0xBBB9BEBC, 0xBDBBB8BD, 0xBABDBBB8, 0xBFC0C4BF,
+ 0x8282C2C3, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x07060808, 0x09090609, 0x08090709, 0x08070707,
+ 0x09090808, 0x07070709, 0x07080808, 0x09070809,
+ 0x0A080708, 0x07090A08, 0x09070809, 0x08090708,
+ 0x07080907, 0x08060809, 0x06090705, 0x07060907,
+ 0x09070609, 0x06090706, 0x05080907, 0x09070809,
+ 0x08090708, 0x08080808, 0x08080808, 0x06090706,
+ 0x07060907, 0x09070609, 0x06090706, 0x07060907,
+ 0x08060809, 0x08090707, 0x060A0807, 0x09070708,
+ 0x05080606, 0x07060907, 0x09070609, 0x08090706,
+ 0x05080907, 0x09050809, 0x08090508, 0x07080907,
+ 0x09070809, 0x08090708, 0x06090A08, 0x09050708,
+ 0x08090708, 0x08080808, 0x09070808, 0x060A0508,
+ 0x00000400, 0x04000004, 0x01050000, 0x01000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00010000,
+ 0x02000102, 0x00020000, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x2A020301, 0x84802F2E, 0x88858087,
+ 0x7C8A8880, 0x89808485, 0x88898088, 0x7F8C8B81,
+ 0x8A808A89, 0x8D8C828B, 0x8087887E, 0x8C80888C,
+ 0x8A8C8088, 0x7C8D8D7F, 0x8C818B8A, 0x8B897E8E,
+ 0x7E908B82, 0x84798C87, 0x89897D86, 0x8183847A,
+ 0x877E8A8B, 0x81847B84, 0x7883847B, 0x81788081,
+ 0x80817880, 0x8084827A, 0x847A8A88, 0x85847A85,
+ 0x73818278, 0x847A7C7D, 0x82847883, 0x6F7D7C72,
+ 0x80767A79, 0x7B7C7281, 0x737A7B71, 0x7D737C7D,
+ 0x7C7D737C, 0x727C7B71, 0x786D7E7C, 0x7674697C,
+ 0x6778776D, 0x6C617271, 0x74726770, 0x5F737569,
+ 0x6A60666A, 0x58594F69, 0x49555549, 0x544A5555,
+ 0x50514855, 0x5E4E5148, 0x78746264, 0x898B8577,
+ 0x9E969892, 0xB4AEA4A7, 0xB0B4AEB0, 0xB3B4B7AE,
+ 0xBCB3BBBC, 0xB9BCB3B9, 0xB9BEC1B8, 0xBFB9BDBF,
+ 0xBDBFB9BF, 0xB8BABEB8, 0xBEB9B8BF, 0xB8BCB7BA,
+ 0xB9B7BBB6, 0xBEB9BABE, 0xBABEB9BA, 0xBBBABDBB,
+ 0xBCBABABD, 0xBABDBBB9, 0xBBBCBDBB, 0xBCBABCBD,
+ 0xBABDBBB9, 0xBBB8BDBB, 0xBBB9B8BD, 0xB7BAB8B8,
+ 0xB9BABDBB, 0xBDBBB8BB, 0xBABDBBBA, 0xB9BBBFBA,
+ 0xBFBABABE, 0xBBBFBABB, 0xBBB9BDB8, 0xBFBDBCC0,
+ 0xBCBFBDBC, 0xBBBCBFBD, 0xBBB9BABD, 0xBABDBBB8,
+ 0xBBBABFBD, 0xBDBBB8BD, 0xB6BBB9BA, 0xBEB8BDBC,
+ 0xBEBBBABF, 0xB9C0BDB7, 0xBABDC1BC, 0xC0BBBBBF,
+ 0xB9BFBABC, 0xBDB8BDBB, 0xBFBEB9C0, 0xB7BDBCB9,
+ 0xBDB9C0BD, 0xC0BFB9C0, 0xBAC0BFBA, 0xBFB9BFBE,
+ 0xBEBDBAC0, 0xBAC0BFB8, 0xBBB8C1BE, 0xBFBEB5BE,
+ 0xBAC0BFB9, 0xBFBAC0BF, 0xC0BFBAC0, 0xB8C0BFB8,
+ 0xBBB7BEBB, 0xBEBCB8BD, 0xB5BAB8B9, 0xBBB3B9B8,
+ 0xBBBCB6BC, 0xB6BCBBB6, 0xBDB8BDBB, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBBBBC0BF, 0xBBBAB6BC, 0xB7BCBBB6,
+ 0xBCB8BDBB, 0xBEB9B9BE, 0xB8BDBBB8, 0xBCB6BBBA,
+ 0xBDBCB8BD, 0xB7BCBAB8, 0xBAB9BCBA, 0xBBBBB9BC,
+ 0xB9BBBBB9, 0xB8B5BAB8, 0xBAB9B5BA, 0xB4B9B7B4,
+ 0xB2B3B7B2, 0xB8B3B3B7, 0xB5B9B4B4, 0xB6B4B8B3,
+ 0xB9B3B8BC, 0xB3B7B1B7, 0xABB0B4AF, 0xAFADAAB0,
+ 0xABB0AEAA, 0xA7A8ABA9, 0x9791A8AC, 0x93979293,
+ 0x5F747573, 0x4C476061, 0x474D4848, 0x4D484C46,
+ 0x59535153, 0x60605A59, 0x5F676460, 0x6B666764,
+ 0x6E6C646E, 0x676F6E64, 0x746A7271, 0x72736973,
+ 0x6C787970, 0x70677475, 0x71746B6D, 0x6B707168,
+ 0x796F7374, 0x78796F78, 0x6E787970, 0x79707677,
+ 0x73746B78, 0x6F76776D, 0x79707879, 0x78797078,
+ 0x7077756D, 0x79717A78, 0x7879707B, 0x6F7B7C72,
+ 0x79707879, 0x7B7C7378, 0x737F7D75, 0x7A757D7B,
+ 0x7D7A757E, 0x75797973, 0x7B75797B, 0x76787279,
+ 0x73787773, 0x7A747877, 0x7779737A, 0x78787975,
+ 0x77737B7C, 0x7A797576, 0x767A7975, 0x7C777D7A,
+ 0x7F7C7780, 0x767B7B75, 0x7A767B7A, 0x7C7B777B,
+ 0x4D787872, 0x01005251, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000001, 0x2A272202,
+ 0x4A555349, 0x635C5654, 0x706D6569, 0x636F6D65,
+ 0x69606B6C, 0x68696068, 0x4D626058, 0x4C435556,
+ 0x40413849, 0x3037342F, 0x03003833, 0x08050108,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x02000002, 0x00000000, 0x00000000,
+ 0x32302F00, 0x433F3C38, 0x544C4B48, 0x62605856,
+ 0x6267655B, 0x71686D6C, 0x70716770, 0x5A6D7061,
+ 0x61556669, 0x5A594F61, 0x2B4F4F43, 0x01003435,
+ 0x00000002, 0x00020001, 0x675E0200, 0x989C9166,
+ 0x9AA0A39A, 0xA198A0A3, 0xA3A89F9E, 0xA1A1A8A1,
+ 0xA8A1A0A8, 0xA1A8A1A0, 0xA0A8ACA7, 0xA49FA3A4,
+ 0xB0B4AFA0, 0xBAC0C4BF, 0xBCB7BBBF, 0xBBBFBAB8,
+ 0xBDBBBEBC, 0xC1BFBCBF, 0xBCC0BBBE, 0xBDB9BEBC,
+ 0xC0BEBCBF, 0xBEC1BFBD, 0xBEBCC1BF, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xC0BAC0BF, 0xBFC0B8C0, 0xBAC0BFBA,
+ 0xBCB9C0BD, 0xBFBEB8BF, 0xBABFBEBA, 0xBFB9BEBF,
+ 0xBEBFB9BE, 0xBAC0BFB9, 0xB8B8BDBC, 0xBFC0B4B9,
+ 0xB6BBBCBA, 0xBBB8BDBC, 0xBFBEB8BD, 0xB8BEBDB9,
+ 0xBBB9C0BD, 0xBEBBB7BE, 0xB9BEBCB7, 0xBFBEC4BF,
+ 0x8282C0C4, 0x00000080, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x09060808, 0x08080709, 0x08080808, 0x07080808,
+ 0x08080707, 0x08080808, 0x08080808, 0x08070808,
+ 0x0B09080A, 0x08070707, 0x08080808, 0x08080808,
+ 0x080A0808, 0x08080A08, 0x08080808, 0x08070707,
+ 0x08080808, 0x08080808, 0x08080808, 0x08080808,
+ 0x08080808, 0x090A0709, 0x08080807, 0x08080808,
+ 0x07080808, 0x09070809, 0x090A0808, 0x08060808,
+ 0x08080608, 0x09090908, 0x080A0808, 0x08080A08,
+ 0x06080808, 0x08080808, 0x07070808, 0x08080807,
+ 0x08070707, 0x09070808, 0x07070708, 0x08080808,
+ 0x08080808, 0x08080808, 0x08080808, 0x09070808,
+ 0x08090708, 0x09080808, 0x08080807, 0x08090708,
+ 0x00000301, 0x04020004, 0x00030101, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00010000,
+ 0x02000102, 0x00020000, 0x01000200, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x00010000, 0x55040201, 0x84815A59, 0x88847F89,
+ 0x7C8A8880, 0x89808485, 0x88898088, 0x80898A80,
+ 0x8A808B8A, 0x898A808B, 0x808A8B81, 0x887D888C,
+ 0x87897D84, 0x7D8A8A7E, 0x897E8989, 0x8B897F8B,
+ 0x828E8C82, 0x81778E8C, 0x85847A82, 0x7A85847A,
+ 0x877D8384, 0x8A8B8286, 0x7883847B, 0x847B8081,
+ 0x85867D83, 0x7A86847C, 0x847A8482, 0x83847A85,
+ 0x78828379, 0x84797F83, 0x82837980, 0x72818076,
+ 0x796F7D7C, 0x7B7C7278, 0x737C7D73, 0x7C727E7D,
+ 0x7C7B717D, 0x6A76756B, 0x756A7574, 0x76746977,
+ 0x677C7B71, 0x6C627271, 0x6E6C616E, 0x60696A60,
+ 0x6157676B, 0x58594F60, 0x4755544A, 0x51475251,
+ 0x57584F52, 0x7362655C, 0x8C877779, 0x888C8688,
+ 0xAEA4A6A0, 0xB4AEB2B4, 0xB0B4AEB0, 0xB8BEC0BA,
+ 0xC2B9BEC1, 0xB9BCB3BF, 0xB7BCBEB8, 0xBBB7BBBD,
+ 0xBABBB7BA, 0xB7B9BDB8, 0xBDB8B6BC, 0xB8BCB7B9,
+ 0xB9B9BDB8, 0xBDB8BABE, 0xBABEB9B9, 0xB9B9BCBA,
+ 0xBBB9B8BB, 0xBABDBBB8, 0xBBBCBDBB, 0xBDBBBABD,
+ 0xBABDBBBA, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BBB9BA,
+ 0xBBB9BCBA, 0xBDBBBABD, 0xBABDBBBA, 0xBBBBBEBC,
+ 0xBEBCBCC0, 0xB8BCB7BB, 0xB9B7BCBA, 0xC1BFB6BB,
+ 0xBCBFBDBC, 0xBDBCBFBD, 0xBDBBBCBF, 0xBABDBBBA,
+ 0xB9B8BBB9, 0xBBB9B8BB, 0xBABDBBB8, 0xBCB8BDBC,
+ 0xC0BDB7BD, 0xBAC1BEB9, 0xBAB9BEBC, 0xBEBCBBBF,
+ 0xB6BBB9BB, 0xBDB7BEBB, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xBEBAC1BE, 0xC0BFB9BF, 0xB9BEBFBA, 0xBFB9BEBF,
+ 0xBEBDBAC0, 0xBBC2BFB8, 0xBEBAC1BE, 0xBDBCB8C1,
+ 0xB9BFBEB7, 0xBEB9BFBE, 0xC0BFB9BF, 0xB7BDBCB8,
+ 0xBBB5BCB9, 0xBDBBBAC0, 0xB8BDBBB8, 0xBFBAC0BF,
+ 0xBBBCBAC0, 0xB7BDBCB6, 0xBBB9BFBE, 0xBDBBB7BE,
+ 0xB8BDBBB8, 0xBBB7BDBC, 0xBCBBB6BC, 0xB5BBBAB6,
+ 0xBBBABFBD, 0xBDBBB8BD, 0xB6BBB9B8, 0xBAB2B7B5,
+ 0xBCBAB7BC, 0xB7BCBAB7, 0xBAB7BCBA, 0xBCBCB9BC,
+ 0xB8BDBCBA, 0xB9B6BBBA, 0xBAB7B5BC, 0xB3B8B6B3,
+ 0xB7B5B9B4, 0xB7B2B8BC, 0xB4B8B3B3, 0xB3B8BCB6,
+ 0xBCB6B5B9, 0xB5B9B3BA, 0xAFB0B4AF, 0xB3B1B0B4,
+ 0xAAAFADAE, 0xA7A7ABA6, 0xACA6A8AC, 0x939791A8,
+ 0x73888987, 0x605E7475, 0x484C475D, 0x46484C47,
+ 0x534D484C, 0x59595351, 0x63676460, 0x6B666B68,
+ 0x6E6C646E, 0x66716F67, 0x70667170, 0x6F70666F,
+ 0x69707168, 0x71687172, 0x70716870, 0x7073746B,
+ 0x79707879, 0x78796F78, 0x6F767970, 0x7A717578,
+ 0x73746B79, 0x6D74756B, 0x756C7677, 0x76776E74,
+ 0x6F79776F, 0x78707977, 0x79776F7A, 0x70787970,
+ 0x7C737879, 0x7A78707B, 0x707B7971, 0x78737A78,
+ 0x7A77727B, 0x757B7B75, 0x7973797B, 0x76787277,
+ 0x73787975, 0x78727677, 0x787A7478, 0x73787975,
+ 0x77737677, 0x7C7B7776, 0x767C7975, 0x7C777D7A,
+ 0x7F7C7780, 0x787D7A75, 0x7D797E7E, 0x7B7A767E,
+ 0x73787872, 0x00007877, 0x00000002, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000001, 0x28282202,
+ 0x4955544A, 0x655B5555, 0x716E6667, 0x636F6D65,
+ 0x69606B6C, 0x6A695F68, 0x4D626058, 0x4C435755,
+ 0x40403A4B, 0x3037342F, 0x03023833, 0x07030208,
+ 0x00020000, 0x00010000, 0x00000000, 0x00000000,
+ 0x01000001, 0x02000000, 0x00000000, 0x01000000,
+ 0x30312D00, 0x433D3D37, 0x544F4B48, 0x62605857,
+ 0x606A685E, 0x71696C6C, 0x70716773, 0x5A6D6F63,
+ 0x60566669, 0x5A594F61, 0x2B4F4F43, 0x01003334,
+ 0x00000000, 0x00020001, 0x99930200, 0x989B9299,
+ 0x98A0A39A, 0xA1969EA1, 0x9EA4999D, 0xA19CA39C,
+ 0xA7A0A0A8, 0x9EA59EA0, 0x9FA0A49E, 0xA49FA0A4,
+ 0xB0B4AFA0, 0xB8BBC1BC, 0xBFBAB7BD, 0xBDC1BCBB,
+ 0xBEBCBFBD, 0xBFBDBDC0, 0xBCBFBDBC, 0xBEBABFBD,
+ 0xBCBABBC0, 0xBDC0BEB9, 0xBFBBC0BF, 0xBFBEBBC0,
+ 0xBAC0BFBA, 0xBFBAC0BF, 0xBFC0B8C0, 0xBAC0BFBA,
+ 0xBFBAC0BF, 0xBEBFBAC0, 0xBABFC0B9, 0xBFB7BCBD,
+ 0xC0C0B7BF, 0xB8C0C0B8, 0xB8BAC0BF, 0xBCBDB4B9,
+ 0xBBC0C1B8, 0xBCBABFBE, 0xBDBCB7BD, 0xB9BFBEB7,
+ 0xBBBAC1BE, 0xBEBBB7BE, 0xB8BFBCB7, 0xBFBEC4BF,
+ 0x8282BEC4, 0x00000080, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x01000200, 0x00000000, 0x01000000,
+ 0x00010000, 0x00020000, 0x00000200, 0x00000100,
+ 0x00000000, 0x00000000, 0x02000002, 0x01000001,
+ 0x00010000, 0x00000000, 0x00020000, 0x01000200,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x01020001, 0x00000200,
+ 0x00000000, 0x01020000, 0x00000301, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x03010000, 0x821C1817, 0x83828883, 0x88838088,
+ 0x7E8B8883, 0x86808687, 0x898A8186, 0x7F8A8B81,
+ 0x867C8889, 0x85867D85, 0x848B8C83, 0x91888D8E,
+ 0x8B8C8290, 0x7D87887E, 0x8A808687, 0x88877D8B,
+ 0x7B88877D, 0x857B8685, 0x86857B86, 0x7989887E,
+ 0x85798585, 0x89887E85, 0x7D83847B, 0x837D8183,
+ 0x86888281, 0x7E83847B, 0x81788687, 0x80817880,
+ 0x797F8077, 0x837A8182, 0x81827982, 0x7987857D,
+ 0x7F758381, 0x797A707E, 0x7176766A, 0x7C717E7C,
+ 0x7A7A6E7E, 0x6C7A7C70, 0x74687478, 0x72746872,
+ 0x686F7066, 0x70687071, 0x6D6C6272, 0x57686960,
+ 0x594F6061, 0x50514758, 0x48525147, 0x51485250,
+ 0x61625950, 0x78676A61, 0x96907E81, 0x94969094,
+ 0xACAEB0AA, 0xB5ACB2B5, 0xBCC0BAB0, 0xBBBDC1BB,
+ 0xC2BCBDC1, 0xBBBFB9BE, 0xBABABEB9, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBBB7BBB6, 0xBBB9BABD, 0xB8BCB7B8,
+ 0xB6B8BCB7, 0xBCB7B8BC, 0xB6BCB7B6, 0xB7B9BDB8,
+ 0xBEB9B8BC, 0xB8BCB7BA, 0xB9BABEB9, 0xBEB9BABE,
+ 0xB8BEB9BA, 0xBBBABFBD, 0xBCBAB8BD, 0xB8BDBBB7,
+ 0xBBB8BDBB, 0xBDBCB8BD, 0xB8BDBCB8, 0xBDB7BCBB,
+ 0xBDBCBABF, 0xB8BDBBB8, 0xBAB9BFBE, 0xBFBEB5BB,
+ 0xBBC0BFB9, 0xBEBBC0BE, 0xC0BFBBC0, 0xBCBFBDBB,
+ 0xBBBBBEBC, 0xBEBCBCC0, 0xBABFBDBB, 0xBCB9BFBE,
+ 0xC0BFB7BD, 0xBAC0BFBA, 0xBDBBC0BF, 0xC0BFBABF,
+ 0xB7BDBCBB, 0xBEB6BCBB, 0xBFBEB9BF, 0xB7BDBCB9,
+ 0xBEB7BFBE, 0xC0BFB9BF, 0xBBC0BFBA, 0xBFB9BFBE,
+ 0xBEBCBAC0, 0xBAC1BEB9, 0xB9BAC1BE, 0xBBB9B5BC,
+ 0xB9C0BDB6, 0xBDB9C0BD, 0xBFBEB7C0, 0xB7BDBCB9,
+ 0xBEB8BFBC, 0xBFBEBAC1, 0xBBC0BFBA, 0xBBB9BFBE,
+ 0xBCBDB6BC, 0xB8BEBDB7, 0xBDB9BFBE, 0xBFBEB9C0,
+ 0xB8BDBCBA, 0xBDB3BAB7, 0xC0BEB9C0, 0xBABFBDBB,
+ 0xBBB7BEBB, 0xBCBAB7BE, 0xB7BCBAB7, 0xB9B8BDBB,
+ 0xBDB8B8BE, 0xB8BDBBB7, 0xB8B8BDBB, 0xBBBCB4B9,
+ 0xB8BDBCB7, 0xB6B4BAB9, 0xB9B6B2B9, 0xB6BCB7B2,
+ 0xB7B8BCB7, 0xBCB6B8BC, 0xB9BDB7B8, 0xB4B5BCB5,
+ 0xBBB6B4BB, 0xB8BCB7B7, 0xB2B5B9B3, 0xB6B4B1B7,
+ 0xB0B4AFB3, 0xABACB3AC, 0xADA3ABB2, 0x9FA39DA5,
+ 0x92929391, 0x615F9394, 0x5E625D60, 0x3F4D514C,
+ 0x514C4044, 0x4F504C4D, 0x5F60605A, 0x6A616768,
+ 0x68696069, 0x686D6E65, 0x6E657071, 0x6B6C636D,
+ 0x6B6A6762, 0x706B7370, 0x77746F73, 0x6B7A7772,
+ 0x766D7573, 0x75766D75, 0x6D75766D, 0x756C7576,
+ 0x73746B74, 0x6D74786D, 0x776E7677, 0x79797376,
+ 0x727B7B75, 0x78707878, 0x7D7B737A, 0x757B7971,
+ 0x7A757D7A, 0x7D7A757D, 0x757F7D75, 0x7C737D7E,
+ 0x797B757B, 0x737B7D77, 0x736F7677, 0x76777372,
+ 0x76747872, 0x7773787C, 0x76777376, 0x73767773,
+ 0x77737877, 0x7A797578, 0x727B7873, 0x78737A77,
+ 0x7F7C777B, 0x777D7B73, 0x7A75817F, 0x7D7A757D,
+ 0x787E7B77, 0x2F2E7F7C, 0x0A080831, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000100, 0x01000001, 0x22231F00,
+ 0x48525349, 0x675D5254, 0x69685E68, 0x62727167,
+ 0x685E6D6C, 0x66645969, 0x5066645A, 0x4F495B5A,
+ 0x44443E4F, 0x333A3732, 0x05063A37, 0x0906080A,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x01000200,
+ 0x2E2F2B00, 0x3E383832, 0x504B4643, 0x605C5753,
+ 0x6166645A, 0x70686D6D, 0x70716872, 0x5F68695F,
+ 0x5F556A69, 0x57554B61, 0x24424339, 0x02002A2D,
+ 0x00000001, 0x00000000, 0x68660000, 0x9A9C9667,
+ 0x999EA09A, 0xA2979FA2, 0xA0A69B9C, 0x9E9CA39C,
+ 0xA59C9EA5, 0x9EA39AA0, 0x9E9FA39D, 0xA39E9DA3,
+ 0xA6ABA99D, 0xBEBBBEBC, 0xC0BBBDC0, 0xBDC1BCBC,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBABFBDBB, 0xBEBBC0BE,
+ 0xC1BCBBC0, 0xBBC0BEBB, 0xC0BABFC0, 0xBEBFBABF,
+ 0xBAC0BFB9, 0xBEBAC0BF, 0xC0BFBAC1, 0xBDC3C2BB,
+ 0xC0BAC0BF, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB7BFBF,
+ 0xC0C0B7BF, 0xB8C0C0B8, 0xBBBAC0BF, 0xBBBAB8BD,
+ 0xBABFBEB6, 0xBDBAC0BF, 0xBFC0B7BC, 0xBAC0BFBA,
+ 0xB7B8BDBB, 0xBCB9B6BC, 0xB7BEBBB5, 0xBFBDC3BE,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000000, 0x01000101,
+ 0x00010000, 0x00000100, 0x00000000, 0x01000000,
+ 0x00010000, 0x00020000, 0x00000000, 0x00000100,
+ 0x00000000, 0x00000000, 0x02000002, 0x01000001,
+ 0x00010000, 0x00000000, 0x00020000, 0x01000200,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x00030101, 0x01010200, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x01000000,
+ 0x02000000, 0x82403C3B, 0x83828883, 0x89848188,
+ 0x81888580, 0x8983898A, 0x85867D89, 0x82898A80,
+ 0x8B828B8C, 0x87887F8A, 0x7F888980, 0x8C838788,
+ 0x898A818B, 0x7B86877D, 0x89808485, 0x87887F88,
+ 0x7D86877D, 0x88808687, 0x88877D8A, 0x7D86847A,
+ 0x887D8A88, 0x89887E8A, 0x80888980, 0x857F8486,
+ 0x84877E83, 0x7B83847B, 0x82798384, 0x80817881,
+ 0x77817F77, 0x8077817F, 0x8182797F, 0x76838179,
+ 0x7F767E7F, 0x7E7F757E, 0x6E78766B, 0x7C717B79,
+ 0x7A786D80, 0x6C787C70, 0x74687279, 0x70746870,
+ 0x69707168, 0x70677172, 0x66675E6F, 0x50686960,
+ 0x50465859, 0x5051474F, 0x49525048, 0x615B5152,
+ 0x5F615B61, 0x8D7E8178, 0x96909396, 0xAAACA694,
+ 0xABB2B4AE, 0xBBB2AFB4, 0xBABFB6B6, 0xBBBBC2BB,
+ 0xC4BDBBC2, 0xBCC3BCBD, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBBBBBEBC, 0xBDBBBABD, 0xBABDBBBA,
+ 0xBBBABEB9, 0xBCB7BCC0, 0xB8BCB7B8, 0xB9BABEB9,
+ 0xBCB7BABE, 0xB8BCB7B8, 0xB7B7BBB6, 0xBCB7B8BC,
+ 0xB6BCB7B6, 0xBAB6BBB9, 0xBEBCB7BC, 0xB7BCBAB9,
+ 0xBDB8BDBB, 0xC0BFBABF, 0xBABFBEBB, 0xBDB7BDBC,
+ 0xBCBBB9C0, 0xB8BDBCB7, 0xBCBBC1C0, 0xBCBBB5BD,
+ 0xBBC1C0B6, 0xBEBBC0BE, 0xC0BFBBC0, 0xBBC0BFBB,
+ 0xBCBDC0BE, 0xC1BCBDC1, 0xBBC0BEBD, 0xBDBAC0BF,
+ 0xBDBCB6BE, 0xBAC0BFB7, 0xBEB9BFBE, 0xC0BFB9BF,
+ 0xB7BDBCBA, 0xBFBAC0BF, 0xC0BFBAC0, 0xB7BDBCBA,
+ 0xBEB7BDBC, 0xBFBEB9BF, 0xB8BDBCBA, 0xBEB9BFBE,
+ 0xBBB9B9BF, 0xB6BBB9B6, 0xBBB9C0BD, 0xBEBCB7BE,
+ 0xB9C0BDB9, 0xBFB8C0BF, 0xC0BFB8C0, 0xB7BDBCBA,
+ 0xBEBAC0BF, 0xBEBFB9BF, 0xBABFC0B9, 0xBBB9BFBE,
+ 0xBFC0B6BC, 0xB9BEBFBA, 0xBDB9BFBE, 0xBFBEB9C0,
+ 0xB6BBB9BA, 0xBDBAC1BE, 0xBEBCB9C0, 0xBABFBDB9,
+ 0xBBB7BEBB, 0xBCBBB7BE, 0xB8BDBCB7, 0xB9B8BDBB,
+ 0xBEB9B8BE, 0xB8BDBBB8, 0xB8B7BEBB, 0xBBBCB3B9,
+ 0xB6BABBB7, 0xB8B2B8B7, 0xBCB7B4BB, 0xB6BCB7B6,
+ 0xB7B9BDB8, 0xBCB6B8BC, 0xBABEB8B8, 0xB6B6BDB6,
+ 0xB9B4B6BD, 0xB8BCB7B5, 0xB6B6BDB6, 0xBCB7B6BD,
+ 0xB6BAB5B8, 0xA9B1B8B1, 0xADA3ABB3, 0xA5ACA5A5,
+ 0x91A8ACA7, 0x7A789293, 0x5D605E79, 0x3F4E524D,
+ 0x443F4044, 0x4D514C40, 0x58585852, 0x60576061,
+ 0x6869605F, 0x646A6A64, 0x6C636A6A, 0x6B6C636B,
+ 0x6F6A6762, 0x73707874, 0x74716C78, 0x6F726F6A,
+ 0x79707575, 0x797A7178, 0x6875766D, 0x71687071,
+ 0x73746B70, 0x69727369, 0x79747273, 0x7B78737C,
+ 0x70777771, 0x79707879, 0x7D7B7378, 0x727D7A75,
+ 0x78737A77, 0x7976717B, 0x757B7C73, 0x7C737D7E,
+ 0x787B7279, 0x73747873, 0x7A767478, 0x76777379,
+ 0x72787A74, 0x7B777678, 0x7A7B777A, 0x757A7975,
+ 0x77737A79, 0x78777378, 0x787B7873, 0x7974807D,
+ 0x7D7A757C, 0x747D7B73, 0x77727E7C, 0x7B78737A,
+ 0x78817C79, 0x5655807B, 0x0A08085A, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000100, 0x01000001, 0x22231F00,
+ 0x48505449, 0x675D5054, 0x66675D66, 0x62737268,
+ 0x685D6D6C, 0x6A685D6A, 0x4F666459, 0x504A5A59,
+ 0x43423E50, 0x32383832, 0x05073A37, 0x08050708,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x01000200,
+ 0x2F312B00, 0x3C383832, 0x4F4C4445, 0x605C5754,
+ 0x616B695F, 0x6F676E6C, 0x70716871, 0x60686960,
+ 0x60566A68, 0x57554B62, 0x24404439, 0x0100282D,
+ 0x00000000, 0x00000000, 0x35330000, 0x979B9632,
+ 0x989EA09A, 0xA4999EA1, 0xA3A89F9E, 0x9A9FA39D,
+ 0xA59C9EA3, 0x9EA499A2, 0x9D9FA39D, 0x9F9A9DA4,
+ 0xA2A7A599, 0xBCB8BBB9, 0xBFBABBBE, 0xBDC1BCBB,
+ 0xBEBBC0BE, 0xC0BFBBC0, 0xBBC0BFBB, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBAC1BEBB, 0xC2B6C0C0, 0xC1C1B6BF,
+ 0xBABFC0B9, 0xC1BBC0BF, 0xC0BEBEC3, 0xBAC0BFBB,
+ 0xC0B8C0BF, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B6C0C0,
+ 0xC1C1B6C0, 0xB8C0BFB9, 0xBEBAC1BE, 0xBBB9BBC0,
+ 0xBABFBDB6, 0xC0B9BFBE, 0xBCBDB8C0, 0xB6BCBBB7,
+ 0xB9B6BBB9, 0xC0BDB8BE, 0xB9C0BDB9, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x02000003, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x01000000, 0x00010000, 0x01000100, 0x00000101,
+ 0x00000100, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x02000002, 0x8063605C, 0x84808784, 0x86837E87,
+ 0x8186877E, 0x8883898A, 0x8885808B, 0x7F88867E,
+ 0x857D8987, 0x8A888087, 0x838A8880, 0x8C838D8B,
+ 0x87887F8B, 0x7B85867C, 0x897F8485, 0x88897F88,
+ 0x7F87887E, 0x89818889, 0x8A897F8B, 0x7989887E,
+ 0x877C8585, 0x88877D89, 0x7F85867D, 0x867D8788,
+ 0x88898085, 0x77888980, 0x847B8081, 0x83847B83,
+ 0x77838179, 0x7F758281, 0x8081777E, 0x767E7F75,
+ 0x82797E7F, 0x81827881, 0x717D7B70, 0x786D807C,
+ 0x78786C7A, 0x6C77786E, 0x75687377, 0x7074686E,
+ 0x626C6D64, 0x6D626A6B, 0x66675D69, 0x505F6057,
+ 0x52495859, 0x4E514851, 0x5B50504A, 0x615B6161,
+ 0x70746E5F, 0x8F92978E, 0xADA79398, 0xA8ACA6A9,
+ 0xB4B0B4AE, 0xBFB9B6BA, 0xBAC1BABB, 0xBDBBC2BB,
+ 0xC3BCBDC4, 0xBBC2BBBC, 0xB9B9BFBA, 0xBFBAB8BE,
+ 0xBBBFBABB, 0xBBBBBEBC, 0xBFBDBABD, 0xBABDBBBC,
+ 0xBCBBBCBA, 0xBDBBBDBE, 0xBCBFBDBC, 0xBDBABDBB,
+ 0xBFBDBABF, 0xB8BDBBBA, 0xBBBABDBB, 0xBBB9BABD,
+ 0xB8BBB9B8, 0xB9B6BBB9, 0xBAB8B6BB, 0xB8BBB9B7,
+ 0xB9B8BCB7, 0xBDBCB8BB, 0xBABFBEB8, 0xB8B7BCBA,
+ 0xBBB9B7BD, 0xB8BDBBB6, 0xBDB9C0BD, 0xBBBAB9C0,
+ 0xBABFBEB6, 0xBEB9C0BD, 0xC0BFBAC1, 0xBBC0BFBB,
+ 0xBCBDC0BE, 0xC2BDBDC1, 0xBBC1BCBE, 0xBFBABFC0,
+ 0xBCBBB7BF, 0xBAC0BFB6, 0xC0BBC1C0, 0xC1C0BABF,
+ 0xB9BFBEBB, 0xBDB8BFBC, 0xBFBDB9C0, 0xB5BAB8BA,
+ 0xBAB6BBBA, 0xBBB9B6BB, 0xB6BBB9B6, 0xBDB9BFBE,
+ 0xBCBBB6BE, 0xBAC0BFB6, 0xBCBBC0BF, 0xC0BFB8BD,
+ 0xB7BDBCBA, 0xC0B8C0C0, 0xBEBFB8C0, 0xB9BFBEB9,
+ 0xBEBAC0BF, 0xC0C0B7BF, 0xB8C0C0B8, 0xBEB5BDBC,
+ 0xC0C0B7BF, 0xB6BEBEB8, 0xBFBAC0BF, 0xBCBABAC0,
+ 0xB8BDBBB7, 0xBAB9C0BD, 0xC0BDB4BD, 0xB9BFBEB9,
+ 0xBBB7BDBC, 0xBABBB6BC, 0xB6BCBBB5, 0xBEB8BDBB,
+ 0xBFBDBBC0, 0xB8BDBBBA, 0xBCB8BDBB, 0xBABBB8BD,
+ 0xB6B8B8B8, 0xB8B5BAB8, 0xBCB7B7BD, 0xB7BBB6B8,
+ 0xB9B9BDB8, 0xBBB7BABE, 0xB8BCB7BA, 0xB7B6BCB7,
+ 0xBBB6B6BC, 0xB5B9B4B7, 0xB3B8BCB6, 0xBCB7B5B9,
+ 0xB8BCB7B8, 0xB2B1B8B1, 0xB1AAB1B9, 0xABB1ACA9,
+ 0xA9A9ACAA, 0x9391A8AB, 0x777A7890, 0x4C5A5E59,
+ 0x443F4D51, 0x40443E40, 0x4F4F5047, 0x605A5957,
+ 0x68686260, 0x636C6D64, 0x6C636B6C, 0x6F70676B,
+ 0x646E6C64, 0x716C6E6C, 0x71716B74, 0x7073736D,
+ 0x7A717879, 0x6D706779, 0x6B73746B, 0x6F6A7374,
+ 0x71726972, 0x6D727369, 0x7C777677, 0x7B78737F,
+ 0x737A7772, 0x7C737B7C, 0x7B7C737B, 0x737D7D77,
+ 0x79717979, 0x7B79717B, 0x767A7B72, 0x7B727E7F,
+ 0x7B7E757A, 0x73787C77, 0x7D777478, 0x7C7C767B,
+ 0x78787773, 0x7A787B7C, 0x797A7879, 0x75767773,
+ 0x7E787A79, 0x807D787E, 0x757B7B75, 0x7C787B7B,
+ 0x7D7A757F, 0x737B7971, 0x7D787D7B, 0x7D7A7680,
+ 0x797F7B76, 0x7C7B817C, 0x0A080780, 0x01000000,
+ 0x00000101, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000100, 0x01000001, 0x22231F00,
+ 0x484E5449, 0x675D5054, 0x70716866, 0x626C6B61,
+ 0x6C616D6C, 0x6A685D6E, 0x4F666459, 0x4E4A5A59,
+ 0x44433F4F, 0x32393933, 0x05073838, 0x08050708,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x01000001,
+ 0x2E302A00, 0x30383832, 0x4F4C3839, 0x605C5754,
+ 0x5D68635A, 0x70686A68, 0x72706872, 0x6067685F,
+ 0x5F556A68, 0x4E4C4161, 0x24424339, 0x01002A2D,
+ 0x01000200, 0x00000000, 0x34320000, 0x9A9B9733,
+ 0x97A0A29C, 0xA49B9DA0, 0xA0A59C9F, 0x9CA3A7A1,
+ 0xA59CA2A5, 0x9EA499A2, 0x9D9FA39D, 0xA39E9DA4,
+ 0xA2A8A39D, 0xBCB7BBB6, 0xBFBBBDC1, 0xBBBFBABE,
+ 0xBEBBC0BE, 0xC0BFBAC1, 0xBBC0BFBB, 0xBEBBC0BF,
+ 0xC0BEBBC0, 0xB8C0BFBB, 0xBAAFBCBE, 0xC1C1A9B8,
+ 0xB4BCBCB7, 0xBBBBC1C0, 0xB8B7B7BC, 0xB2B8B7B2,
+ 0xBAB0B8B7, 0xBCBCB1BC, 0xB3BBBBB4, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xBCBBC0BE, 0xBBB9BBC1,
+ 0xB7BCBAB6, 0xB8B3B9B8, 0xBCBBB3B9, 0xB7BCBBB7,
+ 0xBDBABFBD, 0xBFBCBABF, 0xB7BEBBB8, 0xBFC0C4BF,
+ 0x8181C0C4, 0x00000081, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000001, 0x00010000, 0x00000100,
+ 0x00000001, 0x02000002, 0x00020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x1D1B1A02, 0x7F878480, 0x847F8784, 0x87857D87,
+ 0x7E8D8E85, 0x89848687, 0x8B88838C, 0x7F88867E,
+ 0x877F8987, 0x8D8B8389, 0x838A8880, 0x89808D8B,
+ 0x88898088, 0x7F898A80, 0x877D8889, 0x86877D86,
+ 0x7D88897F, 0x867E8887, 0x8A897F88, 0x7D89897D,
+ 0x887D8989, 0x88887C8A, 0x7D808178, 0x89808586,
+ 0x83847B88, 0x7A83847A, 0x82798384, 0x80817881,
+ 0x7885837B, 0x827A8280, 0x80817884, 0x76818278,
+ 0x7C737F80, 0x7E7F7679, 0x727D7C72, 0x7C717F7D,
+ 0x7C7B717E, 0x6977786E, 0x756A7074, 0x70746971,
+ 0x646E7168, 0x675D6C6D, 0x62635966, 0x50585950,
+ 0x51485859, 0x50514850, 0x6E50504A, 0x736D7474,
+ 0x7F837D71, 0x8E92978E, 0xACA69297, 0xA7ABA6A8,
+ 0xB4AFB3AD, 0xBFB9B6BA, 0xB9C0B9BB, 0xBBBBC2BB,
+ 0xC1BABBC2, 0xB9C0B9BA, 0xBAB9BFBA, 0xBFBAB9BF,
+ 0xBBBFBABB, 0xBBBABDBB, 0xBDBBBABD, 0xBABDBBBA,
+ 0xBDBABBB9, 0xBFBDBEBF, 0xBCBFBDBE, 0xBCBCBFBD,
+ 0xBFBDB9BE, 0xBABFBDBA, 0xBDBABDBB, 0xBFBDBCBF,
+ 0xBCBFBDBC, 0xBBB9BEBC, 0xBDBBB8BD, 0xBABDBBBA,
+ 0xB7B8BCB7, 0xBAB8B8BC, 0xB5BCB9B5, 0xBDB7BEBB,
+ 0xBDBBB9C0, 0xB8BDBBB8, 0xBEB9C0BD, 0xBFBEBAC1,
+ 0xB7BCBBBA, 0xBEBBC2BF, 0xC0BFBAC1, 0xBBC0BFBA,
+ 0xBDBBC0BE, 0xC1BCBCC2, 0xBAC1BEBB, 0xC1BABFC0,
+ 0xBFBEBBC0, 0xBAC0BFB9, 0xBEB9BFBE, 0xBFBEB7BF,
+ 0xB5BBBAB9, 0xBBB7BDBC, 0xBFBCB7BE, 0xB8BDBBB8,
+ 0xBEBABFBE, 0xBFBEBABF, 0xB7BEBBBA, 0xBEBAC0BF,
+ 0xBEBDB7BF, 0xBAC0BFB8, 0xBEBABFBE, 0xBFC0BABF,
+ 0xB7BCBDBA, 0xBFB7BFBF, 0xBFC0B7BF, 0xBABFC0BA,
+ 0xBEB8C0BF, 0xC1C1B7BF, 0xB7BFBFB9, 0xBFB7BFBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBEBABFC0, 0xBDBCB9BF,
+ 0xBBC0BEB8, 0xBDB9C0BD, 0xBFBEB7C0, 0xB9BFBEB9,
+ 0xBAB6BCBB, 0xBDBEB5BB, 0xB7BDBCB8, 0xBDB7BCBA,
+ 0xBDBBBABF, 0xB8BDBBB8, 0xB8B8BDBB, 0xB7B7B4B9,
+ 0xB9BBBBB5, 0xBAB9BCBA, 0xBCBAB9BC, 0xB8BBB9B9,
+ 0xB8B8BCB7, 0xBCB7B9BD, 0xB8BCB7B8, 0xB7B2B8B3,
+ 0xBCB7B6BC, 0xB7BBB6B8, 0xB3B4B8B2, 0xBCB7B3BA,
+ 0xB6BCB7B8, 0xB1B1B8B3, 0xB8B3B0B8, 0xABB1ACB1,
+ 0xA9A6ACA7, 0x9391A8AB, 0x8E93918E, 0x5A686C67,
+ 0x443E5B5F, 0x42453C40, 0x4A524F4A, 0x605B524F,
+ 0x60605A63, 0x62686960, 0x6C636A6B, 0x6B6C636B,
+ 0x656C6D64, 0x72696D6E, 0x75766D71, 0x6D75766D,
+ 0x746B7576, 0x6E716873, 0x6B707168, 0x746E7374,
+ 0x74746E74, 0x6E797A71, 0x76707677, 0x79787476,
+ 0x737F7C77, 0x786E7D7B, 0x7B7C7277, 0x737B7B75,
+ 0x79717979, 0x7D7B737B, 0x73787970, 0x7C737B7C,
+ 0x7C7D747B, 0x6E757771, 0x7C767274, 0x7C7C767C,
+ 0x74767571, 0x7C7A7978, 0x797A767B, 0x72767773,
+ 0x79747878, 0x7C79747C, 0x73787872, 0x7C787979,
+ 0x807D787F, 0x757A7772, 0x7E797D7A, 0x7C797481,
+ 0x78807C77, 0x7C78807D, 0x312F2E7F, 0x01000000,
+ 0x00000101, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000100, 0x01000001, 0x22231F00,
+ 0x4A50534A, 0x675E5155, 0x73716966, 0x626D6B63,
+ 0x685E6D6C, 0x65655969, 0x5067655A, 0x4E4A5A58,
+ 0x44433F4F, 0x33383832, 0x05073939, 0x08050708,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x2E2F2B00, 0x3C383832, 0x514D4644, 0x605C5754,
+ 0x5A67655B, 0x665E6664, 0x6D6B6368, 0x556B6961,
+ 0x554B605F, 0x4E4C4157, 0x26424339, 0x01002A2C,
+ 0x00000100, 0x00000000, 0x01000000, 0x9A9B9700,
+ 0x9AA3A7A1, 0xA49B9EA3, 0xA0A49E9F, 0x9AA2A49E,
+ 0xA39AA0A3, 0x9FA59AA0, 0x9D9DA49D, 0xA39E9DA4,
+ 0xA2A8A39D, 0xBBB9BDB8, 0xBFBDBCC0, 0xBABDBBBE,
+ 0xBEBBC0BE, 0xC0BFBAC1, 0xBBC0BFBB, 0xBFBBC0BF,
+ 0xC1BFBBC0, 0xB8C0BFBC, 0xBAA8B6B5, 0xC0C0A9B8,
+ 0xB8C0BFB6, 0xBFBAC0BF, 0xC0BFBAC0, 0xB8C0BFBA,
+ 0xBDB5BDBC, 0xBCBCB3BD, 0xB2BABAB4, 0xBAB3BBBA,
+ 0xBBBAB3BB, 0xB5BBBAB5, 0xB9B6BBB9, 0xBBB9B6BB,
+ 0xB5BCB9B6, 0xBFB7BDBC, 0xC0BFBAC0, 0xB9BEBDBA,
+ 0xBBBABFBD, 0xBDBAB8BD, 0xB7BEBBB6, 0xBFC0C4BF,
+ 0x8181C0C4, 0x00000081, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000301, 0x03010004, 0x01050000, 0x00000300,
+ 0x04000004, 0x02030103, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x02000002, 0x00020000,
+ 0x00000200, 0x02000002, 0x00010101, 0x01010000,
+ 0x01010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00020001, 0x00000200,
+ 0x2C2A2902, 0x7F85827E, 0x857F8784, 0x83847B85,
+ 0x8187887F, 0x887F8A8B, 0x88898087, 0x80898A81,
+ 0x89808889, 0x88898088, 0x7B84857B, 0x857D8485,
+ 0x8A888087, 0x7D89887E, 0x897D8989, 0x89897D89,
+ 0x7C8C8C80, 0x877D8888, 0x88877D88, 0x808A8A7E,
+ 0x8A7E8C8C, 0x8282768A, 0x7B808178, 0x847B8384,
+ 0x80817883, 0x7D85867D, 0x827C8586, 0x81817B80,
+ 0x7B84817C, 0x7F7A8380, 0x83807B82, 0x74808178,
+ 0x81787C7D, 0x797C737E, 0x70797A70, 0x796F7B7A,
+ 0x7A7B717A, 0x6E787C71, 0x71667579, 0x6E71686D,
+ 0x606F7269, 0x61586869, 0x58595060, 0x4A555751,
+ 0x50474E50, 0x5250484F, 0x616A6860, 0x7C766767,
+ 0x8E908A7A, 0x9E999C93, 0xB1ABA4A7, 0xADB1ABAD,
+ 0xB7B6B7B3, 0xBBB7BABB, 0xB8BCB7BA, 0xB7BCC0BB,
+ 0xBBB6B8BC, 0xB8BCB7B7, 0xB8B7BBB6, 0xBCB7B9BD,
+ 0xB8BCB7B8, 0xB9B7BAB8, 0xBBB9B8BB, 0xB8BBB9B8,
+ 0xBBB9BAB8, 0xBDBBBCBD, 0xBABEB9BA, 0xB9BABEB9,
+ 0xBFBDBABE, 0xBCBFBDBC, 0xBBBABEB9, 0xBFBDBCC0,
+ 0xBBBDBDBC, 0xBAB7BCBB, 0xBDBBB6BB, 0xB9BEBCB8,
+ 0xBAB9BFBA, 0xC0BBB8BF, 0xB6C0BAB9, 0xBCB5BDBC,
+ 0xBDBCB5BD, 0xB7BDBCB7, 0xBEB8BDBC, 0xBFBEBABF,
+ 0xB7BCBBBA, 0xBFB7BDBC, 0xBFC0BAC0, 0xBBC0C1BA,
+ 0xC2BDC2C1, 0xC0BFBEC3, 0xBAC0BFBA, 0xBFBABFC0,
+ 0xBFBEB9BE, 0xB6BCBBB9, 0xBEB7BDBC, 0xC0BFB9BF,
+ 0xB8BEBDBA, 0xBFBABFC0, 0xC0BFB9BE, 0xB9BFBEBA,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xB7BDBCBA, 0xBFBAC1BE,
+ 0xC0BFBAC0, 0xB9BEBFBA, 0xBEB7BDBC, 0xBFC0B9BF,
+ 0xB9BEBFBA, 0xBCB9BFBE, 0xBFC0B5BD, 0xB7BFBFBA,
+ 0xBFB8C0BF, 0xBFBEB8C0, 0xB9BFBEB9, 0xBFB9C1C1,
+ 0xBFC2B7BF, 0xB8C0C0B8, 0xBCBABFC0, 0xBFC0B6BB,
+ 0xBAC0BFBA, 0xC0B8C0BF, 0xC0C1B8C0, 0xB8BCBDBB,
+ 0xC0B5BBBA, 0xBCBBBBC1, 0xB7BDBCB6, 0xBAB8BFBC,
+ 0xBDBCB6BD, 0xBABFBEB8, 0xB7B5BBBA, 0xBBBAB2B8,
+ 0xBBBDBDB6, 0xBBB7BCBB, 0xBABAB7BC, 0xB8BABAB8,
+ 0xB9B8BDBB, 0xBDB8B6BB, 0xB6BCB7B7, 0xB7B6BCB7,
+ 0xBEB9B6BC, 0xB7BDB8B8, 0xB5B8BEB9, 0xBAB8B3BA,
+ 0xB4BBB6B5, 0xBAB6BDB8, 0xBFBAB8BF, 0xB4BAB5B9,
+ 0xAEADB3AE, 0xA5A3ADB3, 0x949997A0, 0x66828583,
+ 0x5148676B, 0x5051484E, 0x4D504C47, 0x56535550,
+ 0x5E5B565B, 0x5F64625A, 0x69606A69, 0x68696068,
+ 0x696C6D63, 0x74697074, 0x6E6F6570, 0x696D6E65,
+ 0x6D677172, 0x7879706D, 0x6B74776E, 0x756F7174,
+ 0x73756F73, 0x727A7C76, 0x77737678, 0x76777376,
+ 0x717D7D77, 0x7A707B79, 0x797A7079, 0x7A7C7974,
+ 0x7970827F, 0x7B7C7378, 0x767D7A75, 0x79707E7B,
+ 0x77786F78, 0x72797973, 0x78727878, 0x78787278,
+ 0x77777874, 0x77737879, 0x78777378, 0x72777771,
+ 0x79747A77, 0x7B78737C, 0x70787872, 0x7B757679,
+ 0x817E797B, 0x757F7C77, 0x7A757E7A, 0x7E7B767D,
+ 0x72797671, 0x76717A77, 0x5B5A5679, 0x00000100,
+ 0x01010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x24231F02,
+ 0x474F4C48, 0x625D4F4C, 0x716F6765, 0x64706E66,
+ 0x6D636D6E, 0x68695F6C, 0x556A695F, 0x4F4B5D5E,
+ 0x42433F4E, 0x32383832, 0x05073838, 0x08050708,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x2C2B2702, 0x3B37342F, 0x504C4543, 0x625F5A53,
+ 0x6262635A, 0x71686B6C, 0x6B6C6370, 0x5066645A,
+ 0x52485C5A, 0x4A493F54, 0x25404138, 0x01002B2B,
+ 0x01010100, 0x00000000, 0x00000000, 0x7E817F00,
+ 0x9AA1A7A2, 0xA19A9AA1, 0x9DA49D9A, 0x949EA29C,
+ 0xA198989D, 0x9EA4999C, 0x9D9DA49D, 0xA29D9CA4,
+ 0xA0A6A19C, 0xC0B8BBB9, 0xC0C0BFC2, 0xBFC1C1C0,
+ 0xBBBABFBD, 0xC0BEBAC0, 0xBBC0BEBD, 0xBFBBC0BF,
+ 0xBFBDBAC0, 0xB7BEBBBA, 0xB6ABB8B6, 0xBDBCABB8,
+ 0xBCC2C1B5, 0xBEB9BFBE, 0xC1C1B9BF, 0xB8C0C0B9,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xB8BDBEBA, 0xBFB8C0C0,
+ 0xBFBEB8C0, 0xB9BFBEB9, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xB7BFBEBA, 0xC0B9C1C1, 0xBDBCB8C0, 0xB7BDBCB5,
+ 0xBBB8BDBB, 0xBEBBB8BD, 0xB7BEBBB7, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000301, 0x02000003, 0x00040000, 0x00000400,
+ 0x03000004, 0x02030002, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x02000002, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x01000001,
+ 0x00010000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x01020001, 0x00000301,
+ 0x56555102, 0x828A8782, 0x877E8A87, 0x85867D86,
+ 0x7F86877D, 0x8A818889, 0x8B8C8389, 0x8086877E,
+ 0x89808889, 0x88898088, 0x7C898A80, 0x89818586,
+ 0x87867C8B, 0x7E85847A, 0x897B8A8A, 0x87877989,
+ 0x79868479, 0x887E8684, 0x89887E89, 0x7E8C8C80,
+ 0x887C8A8A, 0x8A897F88, 0x7B85867D, 0x847B8384,
+ 0x80817883, 0x7B83847B, 0x86808384, 0x85857F84,
+ 0x7B83807B, 0x807B8380, 0x807D7884, 0x757D7D77,
+ 0x7E757D7E, 0x7B7E757B, 0x6F78796F, 0x79707879,
+ 0x7A7B7278, 0x7174786D, 0x776E787C, 0x70716876,
+ 0x5F666960, 0x60586568, 0x595A5162, 0x51555751,
+ 0x504A5557, 0x57584F50, 0x776A6860, 0x908C7D7D,
+ 0x8D8F898F, 0xA9A4A79E, 0xB1ABAFB2, 0xB8BCB6AD,
+ 0xBBBABBB7, 0xBFBBBEBF, 0xBFC0BCBE, 0xB9BABEB9,
+ 0xC0BBBABE, 0xBCC0BBBC, 0xB9BABEB9, 0xBDB8BABE,
+ 0xBABEB9B9, 0xBBBABDBB, 0xBFBDBABD, 0xBABDBBBC,
+ 0xBBB8BBB9, 0xBBB9BABD, 0xB8BCB7B8, 0xB8B8BCB7,
+ 0xBBB9B9BD, 0xB8BBB9B8, 0xB7B8BCB7, 0xBBB9B8BC,
+ 0xB9BBBBB8, 0xBBB7BCBB, 0xBCBBB7BC, 0xB7BCBAB7,
+ 0xBCB9BEBC, 0xBFBAB8BF, 0xB5BEBBB8, 0xBDB7BFBE,
+ 0xBCBDB5BD, 0xBAC0BFB7, 0xBCBABFBE, 0xBBBAB8BD,
+ 0xBABFBEB6, 0xBFB9BEBD, 0xBFC0BAC0, 0xBABFC0BA,
+ 0xBFBAC0BF, 0xC0C0BAC0, 0xB8C0C0B8, 0xBFB8C0C0,
+ 0xBFC0B9BE, 0xB8BEBDBA, 0xBFB9BFBE, 0xC1BEBAC0,
+ 0xB9BFBEBA, 0xC0B9BEBF, 0xBFBEBABF, 0xB7BFBEB7,
+ 0xC0B8C0C0, 0xC0BFB8C0, 0xB7BDBCBA, 0xBEB7BEBB,
+ 0xC0BFB9BF, 0xB9BFBEBA, 0xBEB9BFBE, 0xBFC0B9BF,
+ 0xBAC0BFBA, 0xBEB9BFBE, 0xC0C0B9BF, 0xB8C0C0B8,
+ 0xBFB7BFBE, 0xBFBEB8C0, 0xBAC0BFB9, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC2BABFC2, 0xBFC2BABF,
+ 0xBABFC2BA, 0xC0BABFC0, 0xBBBFBABF, 0xB8BCBDB8,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBDB7BEBB,
+ 0xBFBEB9C0, 0xB8BDBCBA, 0xBAB5BBBA, 0xBEBDB5BB,
+ 0xBABCBCB9, 0xBBB6BBBA, 0xBBBCB7BC, 0xB7BCBBB9,
+ 0xBBB9BEBC, 0xBCB7B7BE, 0xB7BDB8B6, 0xB7B7BDB8,
+ 0xBCB7B6BC, 0xB6BCB7B6, 0xB6B4BBB6, 0xBBB8B4BB,
+ 0xB6BDBAB4, 0xBAB5BCB7, 0xBDB8B9BF, 0xB7BEB7B7,
+ 0xADADB4AD, 0xB3AEADB4, 0xA0A5A3AD, 0x66808583,
+ 0x6C63676B, 0x52504869, 0x47504C47, 0x504D514A,
+ 0x5B575255, 0x60636159, 0x6A616A68, 0x68696069,
+ 0x62666960, 0x7166696D, 0x6B6C626D, 0x686F6D65,
+ 0x6C677270, 0x74756C6F, 0x6D71746B, 0x756F7376,
+ 0x76787273, 0x727B7D77, 0x736F7678, 0x75777172,
+ 0x6E787872, 0x73697876, 0x76776D72, 0x7A7E7B76,
+ 0x7E75827F, 0x7D7E757D, 0x757B7B75, 0x79707B7B,
+ 0x797A7178, 0x757B7873, 0x786F7D7A, 0x78787277,
+ 0x78767773, 0x7B777B7C, 0x7777717C, 0x737B7873,
+ 0x7A757B78, 0x7D7A757D, 0x707A7A74, 0x7B757679,
+ 0x7B7B757B, 0x787F7C78, 0x7A75807B, 0x7B78737D,
+ 0x707B7971, 0x78727A78, 0x6E6D6978, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x24222102,
+ 0x484F4C48, 0x625D504B, 0x73706B66, 0x636D6E65,
+ 0x6C636B6C, 0x6B6C636B, 0x54686960, 0x504A5A5D,
+ 0x40443E4E, 0x33393A31, 0x05073837, 0x08040908,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x2B2A2602, 0x3B37342F, 0x504B4543, 0x61615B53,
+ 0x5D62635A, 0x6B626468, 0x6C6D6468, 0x5166645A,
+ 0x52485E5C, 0x4A493F53, 0x24404138, 0x01002A2A,
+ 0x00000000, 0x00000000, 0x00000000, 0x7E817F00,
+ 0x969DA39E, 0x9B96959D, 0x9AA09B95, 0x969A9E98,
+ 0xA198989C, 0x9CA49A9C, 0x9A9DA49D, 0xA09B99A1,
+ 0x9CA29D9A, 0xB9ABAEAC, 0xBABAB8BB, 0xB8BABABA,
+ 0xB7B8BBB9, 0xBBB9B8BC, 0xB7BAB8B8, 0xBDB7BCBB,
+ 0xBFBEB8BE, 0xB9BFBEBA, 0xBAB3BEBC, 0xBDBCB1BC,
+ 0xB9BEBDB7, 0xBFB9BFBE, 0xBFBEBAC0, 0xB8C0C0B7,
+ 0xBFB9C1C1, 0xBFC0B7BF, 0xB9BEBFBA, 0xBFB9BEBF,
+ 0xC0BFBAC0, 0xB9BFBEBA, 0xBFBBC0BF, 0xBFBEBAC0,
+ 0xB8C0BFB9, 0xBCB9BEBF, 0xBDBCB4BC, 0xB7BDBCB7,
+ 0xBBBABFBD, 0xBEBBB8BD, 0xB7BEBBB7, 0xBFC0C4BF,
+ 0x8383C0C4, 0x00000083, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x1F1D1F1F, 0x1F1F1D1F, 0x1E1E1E1F, 0x1B1B1F1A,
+ 0x201B1C20, 0x1C201B1C, 0x13111412, 0x13131113,
+ 0x11131311, 0x13131313, 0x13131313, 0x13131313,
+ 0x13131313, 0x13131313, 0x13131313, 0x10111210,
+ 0x12101112, 0x0F12100F, 0x10101010, 0x10101010,
+ 0x10101010, 0x10101010, 0x10101010, 0x12101012,
+ 0x10101010, 0x0F0F1010, 0x1010100F, 0x100F1210,
+ 0x12100F12, 0x10110F11, 0x20232422, 0x25212324,
+ 0x23242024, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00010101, 0x2A290000,
+ 0x807F7B2C, 0x7A83837D, 0x80778283, 0x8889807F,
+ 0x7D8A8880, 0x857D8785, 0x87857D87, 0x7C87857D,
+ 0x867E8684, 0x8A888088, 0x7F88897F, 0x89808889,
+ 0x88897F88, 0x7C88877D, 0x8B808888, 0x89877C8D,
+ 0x7B88887A, 0x887C8989, 0x87877B88, 0x7A8C8C80,
+ 0x887E8686, 0x89887E89, 0x7D888980, 0x847B8586,
+ 0x80817883, 0x7A85867D, 0x807A8283, 0x80807A80,
+ 0x7F84817D, 0x7E798784, 0x807D7882, 0x757D7D77,
+ 0x8178797B, 0x7B7E757E, 0x72777B70, 0x7A71797D,
+ 0x78797079, 0x6B76776E, 0x70687374, 0x70716872,
+ 0x586E7168, 0x5F5A5E61, 0x5A575262, 0x49585950,
+ 0x514B4D4F, 0x61635D51, 0x8A686862, 0x8E8A8E90,
+ 0xA0A49E8D, 0xAAADB2A9, 0xBCB6AEB3, 0xB8BCB7B8,
+ 0xBBBCC0BB, 0xC0BBBCC0, 0xBCC0BBBC, 0xBCBDC1BC,
+ 0xBFBABDC1, 0xBBBFBABB, 0xBBBABEB9, 0xBDBBBCC0,
+ 0xBABDBBBA, 0xBCBCBFBD, 0xBFBDBBBE, 0xBCBFBDBC,
+ 0xBDBCBFBD, 0xBFBDBCBF, 0xBDC0BEBC, 0xBBBBBFBA,
+ 0xBEBCBCC0, 0xBABDBBBB, 0xBBBABDBB, 0xBEBCBABD,
+ 0xBCBFBDBB, 0xBCB7BDB8, 0xBEBEB9BE, 0xB7BCBBBC,
+ 0xB9B5BAB9, 0xBEBDB5BA, 0xB8BEBDB9, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xBDBBC0BE, 0xBEBEBABF,
+ 0xB7BCBBBC, 0xB9B6BBB9, 0xC0BFB6BB, 0xB9BFBEBB,
+ 0xC0BAC0BF, 0xC1C0BBC1, 0xB9C1C0B9, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB5BDBC, 0xC1BEB9BF,
+ 0xB7BDBCBA, 0xC0BBC0C1, 0xBFBEB8C0, 0xB7BFBEB9,
+ 0xBFB8C0C0, 0xC0BFB5BF, 0xB9BFBEB8, 0xBCB8BEBD,
+ 0xBDBCB8BD, 0xB7BDBCB7, 0xBFB8C0BF, 0xC0BFB7BF,
+ 0xB7BDBCBA, 0xC0B7BDBC, 0xC0BFBBC1, 0xB7BFBEB8,
+ 0xBDBAC0BF, 0xC0C0B6BE, 0xB8C0C0B8, 0xBFB8C0C0,
+ 0xBFC0B7BF, 0xBABFC0BA, 0xC3BABFC2, 0xBEC3BABE,
+ 0xBCBFC4BB, 0xC0BABDC1, 0xBCBDBBBF, 0xBBBFC0B8,
+ 0xBAB6BCBB, 0xBDBCB3BB, 0xB8BEBDB7, 0xBDB7BEBB,
+ 0xBDBCB9C0, 0xB6BBBAB8, 0xBAB6BBBA, 0xBEBCB6BB,
+ 0xBCBFBDBB, 0xBBB7BCBB, 0xBDBCB7BC, 0xB6BBBAB8,
+ 0xBBB8BDBB, 0xBFBCB8BD, 0xB7BCBAB8, 0xB8B7BDB8,
+ 0xBCBAB9BD, 0xB7BCBAB9, 0xB8B6BDBA, 0xBBB8B4BB,
+ 0xB6BDBAB4, 0xB9BAC0BB, 0xC1BAB9C0, 0xB7BEB7BA,
+ 0xAEADB4AD, 0xB4ADB0B4, 0xADB3AEAD, 0x819BA09E,
+ 0x6B658086, 0x514E4969, 0x484F4A47, 0x4B48504B,
+ 0x55504D50, 0x595D5A55, 0x69606361, 0x68696068,
+ 0x63686960, 0x6C636B6C, 0x6C6D646B, 0x676F6D65,
+ 0x736B6F6C, 0x78797075, 0x6D73766D, 0x756F7376,
+ 0x78787275, 0x6B74746E, 0x746E7374, 0x78797074,
+ 0x6E78766E, 0x776D7876, 0x7A7B7176, 0x747B7B75,
+ 0x7D747A7A, 0x7B7C737C, 0x717B7C73, 0x786F797A,
+ 0x7B7C7377, 0x737B7873, 0x7A717B78, 0x7B7B7579,
+ 0x757A7975, 0x79757A79, 0x78787278, 0x757B7873,
+ 0x7C777E7A, 0x807D787F, 0x73787872, 0x76727979,
+ 0x7B7A7677, 0x757F7C77, 0x79747D7A, 0x7A77727D,
+ 0x6F7A7870, 0x7A717778, 0x78787279, 0x002C2D2B,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x24222100,
+ 0x474F4C48, 0x635E4F4A, 0x726F6A66, 0x666F7067,
+ 0x6C636E6F, 0x6B6C636B, 0x54686960, 0x504A5A5D,
+ 0x40443E4E, 0x3337382F, 0x05073837, 0x09050A08,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x2C2B2702, 0x3B37342F, 0x504B4543, 0x60615853,
+ 0x5D626359, 0x6C636468, 0x65665D69, 0x5A66645A,
+ 0x52486664, 0x48493F53, 0x26404138, 0x00002C2C,
+ 0x00000100, 0x00000001, 0x00000000, 0x292D2800,
+ 0x969DA49D, 0xA09B959D, 0x9DA19C9A, 0x959A9E98,
+ 0x9D97979B, 0x969D9699, 0x96979E97, 0xA099959D,
+ 0xA3A7A299, 0xB9ABAEAC, 0xBCBAB8BB, 0xB8BBB9B9,
+ 0xB9BABEB9, 0xBDBBBABE, 0xB9BCBABA, 0xBBB8BDBB,
+ 0xBBBAB7BC, 0xB4BAB9B5, 0xBAB3BBBA, 0xBBBAB3BB,
+ 0xB8BDBCB5, 0xBBB8BEBD, 0xBEBBB7BE, 0xB8BEBDB7,
+ 0xBEB7BDBC, 0xC0BFB9BF, 0xB8BDBCBB, 0xBDBABFBE,
+ 0xBEBCBABF, 0xBABFBDB9, 0xBEBCBFBD, 0xBFBDBBC0,
+ 0xB9C0BDBA, 0xBBB4B9B8, 0xBDBCB6BC, 0xB8BDBCB8,
+ 0xBBB8BDBB, 0xBEBBB8BD, 0xB7BEBBB7, 0xBEC0C4BF,
+ 0x8282BFC3, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x4B4B4B00,
+ 0x57595A58, 0x57575859, 0x595A5857, 0x4F525351,
+ 0x544F5054, 0x35383650, 0x38363937, 0x38383638,
+ 0x36393736, 0x38383838, 0x38383838, 0x38383838,
+ 0x37383838, 0x38383839, 0x38393738, 0x31323331,
+ 0x33313233, 0x30333130, 0x30303030, 0x30303030,
+ 0x30303030, 0x2F30312F, 0x30303031, 0x30303030,
+ 0x30303030, 0x30303030, 0x30312F30, 0x31303331,
+ 0x33312E33, 0x32332F30, 0x20212520, 0x47412125,
+ 0x686A6443, 0x0052514D, 0x01000200, 0x00010000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x2B270001,
+ 0x80807A2C, 0x78808178, 0x81788081, 0x85867D80,
+ 0x808B8981, 0x88808A88, 0x89877F8A, 0x7E86847C,
+ 0x88808886, 0x86847C8A, 0x7D86877D, 0x887F8687,
+ 0x88897F87, 0x8189897D, 0x8C808D8D, 0x88887C8C,
+ 0x8188887C, 0x887C8D8D, 0x89897D88, 0x7E89887E,
+ 0x857B8988, 0x86857B86, 0x79808178, 0x81788182,
+ 0x80817880, 0x7B85867D, 0x81788384, 0x85827D80,
+ 0x7B87847F, 0x807B8380, 0x83817984, 0x7580807A,
+ 0x7C73797B, 0x7B7E7579, 0x6F777B70, 0x7B727879,
+ 0x7879707A, 0x6B73746B, 0x6F677374, 0x70716871,
+ 0x58686960, 0x57526061, 0x5A57525A, 0x48505148,
+ 0x5C565051, 0x62645E5A, 0x89787C76, 0x908A8B8F,
+ 0xA0A49E8E, 0xAAADB1AB, 0xBCB6ACB0, 0xB8BCB7B8,
+ 0xBCBCC0BB, 0xC0BBBDC1, 0xBCC0BBBC, 0xBABEC2BD,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBBBDC1BC, 0xBFBDBCC0,
+ 0xBCBFBDBC, 0xBDBCBFBD, 0xBFBDBCBF, 0xBCBFBDBC,
+ 0xBDBABFBD, 0xBEBEBABF, 0xBCBFBDBC, 0xBDBCBFBD,
+ 0xBFBDBCBF, 0xBCBEBEBC, 0xBEBABFBE, 0xBEBFBABF,
+ 0xBEC0C0BC, 0xBCBBBDBD, 0xB7BDB9BB, 0xB6B5BEB7,
+ 0xB8B4B3BC, 0xAFB8B0AF, 0xADAFB7B0, 0xB9B1B4B9,
+ 0xB3BBB0B4, 0xB4B7BCB1, 0xB9B4B7BB, 0xBABEB6B8,
+ 0xBCBEBFB9, 0xB9BABFBE, 0xBDBCB6BB, 0xBABFC0B8,
+ 0xC1BBC1C0, 0xC1C0BCC2, 0xB8C0BFB9, 0xBFB6C0C0,
+ 0xBFC2B5BF, 0xB8C0C0B8, 0xBEB7BFBF, 0xC0BDB7BF,
+ 0xB7BEBBB9, 0xC1B8C0C0, 0xBFBEB9C1, 0xB9BFBEB9,
+ 0xC0B8C0C0, 0xBFBEB8C0, 0xB9BFBEB7, 0xBEB9BFBE,
+ 0xBFBCBABF, 0xB7BDBCB8, 0xBFB8C0BF, 0xBFBEB8C0,
+ 0xB8BEBDB9, 0xBFB9BFBE, 0xC0BFBAC0, 0xB7BFBEB8,
+ 0xC0B9BFBE, 0xBFC2BABF, 0xB8BFC2B8, 0xC3BABEC3,
+ 0xBBC0BABE, 0xB4B6BEB8, 0xBAB3B4BE, 0xAEBAAEAE,
+ 0xAFADB9B0, 0xB9B4B3BC, 0xB7BDB3B3, 0xB9B9BFB7,
+ 0xBDBBC0C3, 0xBABDB3BA, 0xB7BCBDB5, 0xBBB8BFBC,
+ 0xBBB9B7BE, 0xB8BDBBB6, 0xBCB9BEBD, 0xBEBCB9BE,
+ 0xB4B7B5BB, 0xBBB2B7B6, 0xBCBBB7BC, 0xB7BCBAB7,
+ 0xBBB8BDBB, 0xBEBBB8BD, 0xB7BEBBB7, 0xB8B9BDB8,
+ 0xBBB9B9BD, 0xB6B9B7B8, 0xB8B3B8B6, 0xBAB8B4BB,
+ 0xB7BCBAB5, 0xB7BAC0BB, 0xC0B9B7BE, 0xB9C0B9B9,
+ 0xADBBBFB9, 0xB5AEAFB3, 0xADB4ADAE, 0x9C9AA09B,
+ 0x85819BA1, 0x6B6A6684, 0x484F4C48, 0x4B48504B,
+ 0x504B4850, 0x5B57544F, 0x685F6360, 0x68696067,
+ 0x65686862, 0x6C636B6B, 0x6B6C636B, 0x6873706B,
+ 0x746C7370, 0x76746C76, 0x6873746B, 0x756F7071,
+ 0x78787275, 0x6874756C, 0x746C7071, 0x76746C76,
+ 0x707B7971, 0x73697A78, 0x76776D72, 0x707B7C73,
+ 0x786F7879, 0x797C7377, 0x747B7E75, 0x7C737B7F,
+ 0x7B7C737B, 0x757B7873, 0x7E757D7A, 0x7879707D,
+ 0x707A7A74, 0x7A747574, 0x7A7A747A, 0x727B7873,
+ 0x77727A77, 0x7D7A757A, 0x777E7E78, 0x7A767D7D,
+ 0x7B7A767B, 0x727F7C77, 0x77727A77, 0x7D7A757A,
+ 0x707A7772, 0x78707879, 0x7878727A, 0x00444241,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x24222100,
+ 0x474F4C48, 0x635E4F4C, 0x70716866, 0x68707168,
+ 0x6E657071, 0x696A616D, 0x61686960, 0x504A696A,
+ 0x42443E4E, 0x33383930, 0x05073837, 0x08040908,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x2C2B2702, 0x3C37342F, 0x514C4644, 0x60615854,
+ 0x5A626359, 0x6C626466, 0x6B6C636B, 0x5166645A,
+ 0x51495D5B, 0x48494053, 0x26404138, 0x00002B2A,
+ 0x00000102, 0x00000001, 0x01010000, 0x282C2701,
+ 0x969DA49D, 0x9C97969D, 0x989C9798, 0x979A9E98,
+ 0x9E98999D, 0x9CA09A9A, 0x9A9AA19A, 0xA39D9AA1,
+ 0xA3A7A19F, 0xB7ABAFAA, 0xBBB9B8BC, 0xB9BDB8B8,
+ 0xBBBABDBB, 0xBDBBBABD, 0xBABDBBBA, 0xBDBABFBD,
+ 0xBFC0BABF, 0xBABFC0BA, 0xBCB9C1C0, 0xBCBDB7BD,
+ 0xBBC0C1B7, 0xBDB9BFBE, 0xBFBDB9C0, 0xBABFBDBA,
+ 0xBFB9BFBE, 0xBFBEBAC0, 0xB5BAB9BA, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBDBCBFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBCB7BCBB, 0xBDBCB7BD, 0xB8BDBCB8,
+ 0xBDB8BDBB, 0xC0BDBABF, 0xB7BEBBB9, 0xC0C0C4BF,
+ 0x8282C1C5, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00010000, 0x40404000,
+ 0x51565753, 0x58525757, 0x56575358, 0x4B4C4D49,
+ 0x49474C4D, 0x46494746, 0x393D403E, 0x3A38383B,
+ 0x383C3737, 0x31373836, 0x33313233, 0x30342F32,
+ 0x2F333732, 0x33313034, 0x30333130, 0x2F303331,
+ 0x342F3034, 0x30342F30, 0x3130312F, 0x30303131,
+ 0x30303030, 0x2F2C2F2D, 0x2F2F2E31, 0x2F2F2F2D,
+ 0x2F303030, 0x302F3031, 0x30312F32, 0x31313432,
+ 0x342F2E33, 0x30342F30, 0x3D272D28, 0x70693D44,
+ 0x6B6F6969, 0x456E706A, 0x25214B4B, 0x00010024,
+ 0x00020301, 0x03000203, 0x02030102, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01020202, 0x56520203,
+ 0x80807A57, 0x78818279, 0x7F7A8081, 0x85827D82,
+ 0x7F85857F, 0x89808585, 0x88898088, 0x7E888980,
+ 0x867E8687, 0x86847C88, 0x7F8A897F, 0x8A808A89,
+ 0x89887E8B, 0x818A8C80, 0x857A8B8D, 0x84887D81,
+ 0x7D888C81, 0x877D8687, 0x85867C86, 0x7D85867D,
+ 0x857D8586, 0x87857D87, 0x79888980, 0x847A8182,
+ 0x85847A85, 0x7685847A, 0x7C728180, 0x7D7B737D,
+ 0x79807E76, 0x807B8182, 0x83807B83, 0x75808178,
+ 0x7C737D7E, 0x7B7C737B, 0x71787970, 0x7A71797A,
+ 0x76776E79, 0x6D75766D, 0x70677775, 0x696A616F,
+ 0x53626359, 0x534E5B5C, 0x56534E56, 0x48505148,
+ 0x655C5051, 0x60645E62, 0x89899089, 0xA59C8B8F,
+ 0xAEB1A8A2, 0xB2ADB4AD, 0xBBB5B2B9, 0xBEC0BAB9,
+ 0xBABCC0BB, 0xBEB9BBBF, 0xBBBFBABA, 0xBABBBFBA,
+ 0xBCB7BBBF, 0xB8BCB7B8, 0xBBB7BAB8, 0xBDBBBABD,
+ 0xBABDBBBA, 0xBBBABDBB, 0xBCBABABD, 0xBCBFBDB9,
+ 0xBABABDBB, 0xBFBDB9BC, 0xBBC0BEBA, 0xBCBABCBC,
+ 0xBDBDBABC, 0xB8BCBDBB, 0xC1B8BDC0, 0xBBC3B8BC,
+ 0xBBBAC3B9, 0xB7B3AFBA, 0xA3B4AFAB, 0xABA5B8A9,
+ 0xB7AAA4B7, 0xA2B5AAA4, 0xA59FB2A8, 0xBCA9A3B4,
+ 0xAABBB1AB, 0xB0AABBB0, 0xBCB2ADBC, 0xB3C2B2AD,
+ 0xB6B5BFB8, 0xBEB9BCC0, 0xBDC0B8BD, 0xB8BDC0B8,
+ 0xC0BABFC0, 0xC0BFB8C0, 0xB9C1C0B8, 0xBFB8C0C0,
+ 0xBFC0B7BF, 0xB8C0C0BA, 0xBFB8C0C0, 0xBDBCB7BF,
+ 0xB7BEBBB7, 0xC0B8C0C0, 0xBEBFB8C0, 0xB9BEBFB9,
+ 0xC0B8BFC2, 0xC0BFB8C0, 0xBAC1BEBA, 0xBEB9BFBE,
+ 0xBDBCB9BF, 0xB9BFBEB7, 0xBFB8C0BF, 0xBFBEB8C0,
+ 0xB7BDBCB9, 0xC0BAC0BF, 0xC0BFB8C0, 0xB8C0BFB8,
+ 0xBFB9BEBF, 0xBCC1B8BB, 0xBABBC5B8, 0xBDADAAB9,
+ 0xA2B6B0AA, 0xA8A2B5AB, 0xB4A69FB4, 0x9EB5A59D,
+ 0xA69FB4A6, 0xB1A59FB2, 0xA6B5A6A0, 0xAEA9B8AB,
+ 0xC1B0B0BC, 0xB8C1B4B6, 0xB2B8BDB3, 0xB5B8BFBC,
+ 0xBFBAB3BA, 0xB8BFBAB8, 0xBDB8BDBB, 0xBFBDBCBF,
+ 0xB6BBBABA, 0xBDB3B7B8, 0xBDBCB9BE, 0xB9BEBCB8,
+ 0xB6BABEB9, 0xBBB6B5BB, 0xB8BFBAB4, 0xB6B7BBB6,
+ 0xBCBAB7BB, 0xB7BAB8B9, 0xB4B3B7B2, 0xBBB9B3B9,
+ 0xB8BBB9B8, 0xBCBBBFBA, 0xBFBABDC1, 0xB9BFBAB9,
+ 0xB9BABEB9, 0xB8B1BABE, 0xB2B9B2B1, 0x9CAEB4AF,
+ 0x908B9DA1, 0x797A768C, 0x4763605C, 0x4B48504C,
+ 0x504B4850, 0x5355524E, 0x61585B58, 0x60615860,
+ 0x5F65655F, 0x6A616764, 0x70716869, 0x65716F67,
+ 0x6F676F6D, 0x72706871, 0x6B75736B, 0x726E7370,
+ 0x77746F75, 0x6C797A71, 0x766D7475, 0x75766D75,
+ 0x70787872, 0x7A707879, 0x73746A79, 0x6E75746A,
+ 0x776E7876, 0x777A7174, 0x70787C71, 0x7C71787C,
+ 0x7A7B7178, 0x76807E76, 0x7A71807E, 0x74756C79,
+ 0x73797973, 0x736F7B78, 0x6F6E6A76, 0x6F74736F,
+ 0x77737473, 0x7C79757A, 0x727F7C78, 0x77737976,
+ 0x7F7C787A, 0x757F7C78, 0x79757C79, 0x7A77727C,
+ 0x757D7A75, 0x79717D7A, 0x7D7A757C, 0x00777470,
+ 0x00000200, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x22231F00,
+ 0x4750504A, 0x675E4F50, 0x70746964, 0x6973746A,
+ 0x70667473, 0x6D6C6271, 0x5B707168, 0x564D6364,
+ 0x48494055, 0x282D2D27, 0x05072D2C, 0x08040908,
+ 0x00000001, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000000, 0x00000000,
+ 0x2D2C2802, 0x3C3A3732, 0x544B4644, 0x60615853,
+ 0x5D65645A, 0x6C626969, 0x69685E6D, 0x546A695F,
+ 0x504B5E5C, 0x47443F53, 0x23403D38, 0x00002827,
+ 0x02000002, 0x01000000, 0x00000101, 0x38393700,
+ 0x95989C97, 0x9B97999B, 0x9A9B979A, 0x969EA09A,
+ 0x9F9B9A9C, 0x9CA09B9E, 0x9D9DA49D, 0xA39A9DA4,
+ 0xA4A8A29E, 0xB9A6ADA6, 0xC0BBB9C0, 0xB9BFBABA,
+ 0xBDBABFBD, 0xBEBEBBBD, 0xBCBEBEBC, 0xBDB9BEBC,
+ 0xBEBFBABF, 0xB7BFBFB9, 0xBDB8BEBD, 0xBDBEB8BE,
+ 0xBABFC0B8, 0xBFBAC0BF, 0xBFBEBAC0, 0xBBC0BFBA,
+ 0xBEB9BFBE, 0xC0BFB7BF, 0xB7BDBCBA, 0xBDB8BEBD,
+ 0xBEBDB8BE, 0xB7BDBCB8, 0xBCB8BDBB, 0xBDBBB9BE,
+ 0xBABFBDB8, 0xBBB7BDBC, 0xBDBEB3BB, 0xB7BDBCB8,
+ 0xBBB7BCBA, 0xBEBBB8BD, 0xB7BEBBB7, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x01010101, 0x00000000, 0x00010000, 0x00000000,
+ 0x533C3B37, 0x584F5959, 0x56585257, 0x4E4F504C,
+ 0x4C4C4F50, 0x4A4C4C4A, 0x43434644, 0x413C4245,
+ 0x3D413C3D, 0x34373834, 0x39343539, 0x363A3535,
+ 0x32333A33, 0x37323137, 0x33373233, 0x30333732,
+ 0x332D3135, 0x30342F2F, 0x35363735, 0x33333535,
+ 0x2F2F2F33, 0x34333634, 0x34343234, 0x32343432,
+ 0x2F333432, 0x332F3233, 0x32332F34, 0x2F313530,
+ 0x342F3034, 0x30342E30, 0x69535A53, 0x70696870,
+ 0x686F6868, 0x686D7067, 0x716B7071, 0x494B456F,
+ 0x00020400, 0x02000204, 0x02030001, 0x01000100,
+ 0x00000101, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020301, 0x57510203,
+ 0x80807A57, 0x79808178, 0x847F8182, 0x84817C87,
+ 0x82868680, 0x867D8888, 0x88898085, 0x8087887F,
+ 0x88808889, 0x8A88808A, 0x7F8B8A80, 0x887E8A89,
+ 0x8A897F89, 0x7C8A8C80, 0x887D8688, 0x84887D84,
+ 0x7D84887D, 0x8B828488, 0x87887F8A, 0x8086877E,
+ 0x89818889, 0x87857D8B, 0x7D85867D, 0x867C8586,
+ 0x85847A87, 0x7B85847A, 0x847A8685, 0x81807686,
+ 0x727A7B71, 0x7E767A7B, 0x83817980, 0x797B7C73,
+ 0x7E758182, 0x7A7B727D, 0x707B7873, 0x776E7879,
+ 0x6F726976, 0x67716F67, 0x6960716F, 0x61625968,
+ 0x525B5C53, 0x534E5A5B, 0x4F4C4757, 0x5B505148,
+ 0x655C6266, 0x767A7460, 0x94899089, 0xB1A8969A,
+ 0xAFB0A7B0, 0xB5B4B8B2, 0xC1B8B7BB, 0xBEC1B8BE,
+ 0xBCBFC0BC, 0xC2BDBDC1, 0xBDC1BCBE, 0xBCBDC1BC,
+ 0xC1BCBDC1, 0xBBBFBABD, 0xBCBDC0BE, 0xBFBDBBBE,
+ 0xBBBEBCBC, 0xBDBDC0BE, 0xBFBDBCBF, 0xBCBFBDBC,
+ 0xBDBCBFBD, 0xBFBDBCBF, 0xBABFBDBA, 0xBEBABCBC,
+ 0xBCBDBBBD, 0xBDC0C4BA, 0xC4B8BCC1, 0xB2BEB8BA,
+ 0xAEABBAB2, 0xB7B1A9BA, 0x9DB7ACA3, 0xA79CB6A8,
+ 0xB7A89DB7, 0x9CB8A89D, 0xAA9FB9A8, 0xB7ABA1B8,
+ 0xA1B8ABA2, 0xACA2B9AB, 0xBBA8A1B6, 0xA7BCADA6,
+ 0xAFACBCAE, 0xBBAFB0BA, 0xBBC3B3B6, 0xB9BCC1B9,
+ 0xC0B7BCBF, 0xC0BFB8C0, 0xB8C0BFB8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xC0B8BFC2, 0xBFBEB8C0,
+ 0xB7BDBCB9, 0xBFB8C0BF, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xBEB8C0C0, 0xBDBCB6BE, 0xBBC1C0B7, 0xBEB7BDBC,
+ 0xBDBCB9BF, 0xBBC1C0B7, 0xBEB8C0BF, 0xBDBBB7BF,
+ 0xB6BBBAB8, 0xC1B9BEBF, 0xBFC2B9BE, 0xBABEC3BA,
+ 0xC5B9BBC3, 0xAFBEBCBB, 0xABA5B8B2, 0xB3ABA1B8,
+ 0x99B3A699, 0xA698B4A6, 0xB8A79BB7, 0x9CB8A89C,
+ 0xA99DB9A8, 0xB7A89DB7, 0xA4B9AAA0, 0xABA4B9AD,
+ 0xB9A4A2B5, 0xAFBFA9A9, 0xAFB1BBAF, 0xBCB3B7B8,
+ 0xBFBCB9BE, 0xB2B9B6B8, 0xBDB6BBB9, 0xC0BFBCBF,
+ 0xBABFBEBB, 0xBDB6BABB, 0xBBBAB9BE, 0xB6BBB9B6,
+ 0xB6B7BBB6, 0xBAB5B7BB, 0xB5BBB6B4, 0xB6B8BCB7,
+ 0xB9B7B7BB, 0xB7BAB8B6, 0xB4B5B9B4, 0xBBB9B5B9,
+ 0xB9BCBAB8, 0xBABDBEBA, 0xC1BCBBBF, 0xBCC0BBBD,
+ 0xB9B9BCBA, 0xBBB6BABE, 0xB7BBB5B7, 0xAFB0B4AF,
+ 0xA19CB0B4, 0x787C779D, 0x4861605C, 0x4C494F4C,
+ 0x504B4851, 0x4D504B48, 0x605A5552, 0x60615860,
+ 0x66696963, 0x6C636E6B, 0x7172696B, 0x66727068,
+ 0x6F67706E, 0x72706871, 0x6F74716C, 0x74707575,
+ 0x71716B77, 0x6D73746B, 0x79707576, 0x75766D78,
+ 0x6D75756F, 0x746B7576, 0x70716773, 0x7175746A,
+ 0x7D747B79, 0x7A7D747A, 0x71777B70, 0x7C70797D,
+ 0x787C7178, 0x7183847B, 0x7A71797A, 0x797A7179,
+ 0x7773736D, 0x77737F7C, 0x7B78747A, 0x77787773,
+ 0x79757C7B, 0x7F7C787C, 0x727F7C78, 0x7C787776,
+ 0x7877737F, 0x797C7975, 0x7C787E7D, 0x7976727D,
+ 0x737B7873, 0x7C747C78, 0x7F7B767F, 0x26777470,
+ 0x00002927, 0x00000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x22231F00,
+ 0x47505148, 0x685D5051, 0x70746964, 0x6B74756B,
+ 0x71657675, 0x71706671, 0x68717268, 0x625A7071,
+ 0x49473F64, 0x282C2C26, 0x05072D2C, 0x08050708,
+ 0x00000001, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000000, 0x00000000,
+ 0x2D2C2802, 0x3D3B3833, 0x544B4745, 0x60615753,
+ 0x5D646458, 0x6C626A68, 0x6C6B616E, 0x546B6A60,
+ 0x504B5C5D, 0x48434054, 0x243F3C38, 0x00002B28,
+ 0x02000002, 0x00000000, 0x00000000, 0x393A3800,
+ 0x96A6A7A3, 0x9B979A9C, 0x9C9B979C, 0x969B9D97,
+ 0x9F9B9A9C, 0xA0A49F9E, 0x9D9FA39D, 0xA59C9DA4,
+ 0x9FA49BA0, 0xB9A6ADA6, 0xBFB8B9C0, 0xB8BFBAB7,
+ 0xBEBBC0BE, 0xBDBDBABF, 0xBABCBCBB, 0xBCB7BCBA,
+ 0xBFBFB7BD, 0xB8C0BFB7, 0xBBB9BFBE, 0xBFBEB7BE,
+ 0xB8C0BFB7, 0xC0B8BEBD, 0xC0BFBBC1, 0xBABFBEBB,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB7BDBCB9, 0xBCB7BDBC,
+ 0xBCBDB7BD, 0xB6BCBBB7, 0xB8B5BCB9, 0xBBB9B4BB,
+ 0xB5BBBAB6, 0xB8B5BABB, 0xBBBBB0B8, 0xB5BDBCB3,
+ 0xBBB8BDBB, 0xBEBBB8BD, 0xB7BEBBB7, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x02000001,
+ 0x00010001, 0x00000000, 0x00000000, 0x00000000,
+ 0x38050604, 0x59533B3C, 0x56585257, 0x4D4F504C,
+ 0x4F4F4C4F, 0x4A4C4C4D, 0x42484B49, 0x47424347,
+ 0x3B413C41, 0x3A3B3F3A, 0x3F393B3F, 0x383F383B,
+ 0x36393D38, 0x3934373B, 0x35393335, 0x32353933,
+ 0x37323438, 0x35393433, 0x34343533, 0x35353536,
+ 0x35353535, 0x34343434, 0x34343434, 0x34353334,
+ 0x2E343630, 0x372E3437, 0x38383236, 0x2E32342E,
+ 0x342E3034, 0x474A4132, 0x66697167, 0x72686770,
+ 0x6A726869, 0x686F7269, 0x71687071, 0x6E716870,
+ 0x004C4F46, 0x05000004, 0x00040001, 0x00000100,
+ 0x00010000, 0x00000100, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x28020301, 0x807A2B2C,
+ 0x80817880, 0x7B827F7A, 0x83808380, 0x87848088,
+ 0x7D80807A, 0x857C8383, 0x86877D84, 0x7D86857B,
+ 0x847C8887, 0x86837B87, 0x7F8B8A80, 0x8B7F8B8B,
+ 0x8C8C808B, 0x7C8A8C80, 0x81778688, 0x7E817880,
+ 0x8185897E, 0x847B888C, 0x83847B83, 0x8082857C,
+ 0x847B8689, 0x80817883, 0x8083847B, 0x88808889,
+ 0x87857D8A, 0x7F828379, 0x84798A89, 0x86857B86,
+ 0x727E7F75, 0x7A727A7B, 0x807E767C, 0x787F7D75,
+ 0x81778280, 0x82817782, 0x6E7B7971, 0x776E7677,
+ 0x74786D76, 0x6777756D, 0x695F716F, 0x62635A68,
+ 0x4E5B5C53, 0x524F5454, 0x4F4C4757, 0x5B4D5047,
+ 0x655C6066, 0x8C908A60, 0x9C8A8E88, 0xB1A8A0A5,
+ 0xB0B1A8B0, 0xB7BABDB4, 0xC1B8BDC0, 0xBEC1B8C0,
+ 0xBABFC0BC, 0xBFBABBBF, 0xBDC1BCBB, 0xBCBEC2BD,
+ 0xC0BEBDC1, 0xBFC0BEBF, 0xBDBEBFBD, 0xC1BFBEBF,
+ 0xBCBFBDBE, 0xBDBCBFBD, 0xC1BFBCBF, 0xBBBEBCBE,
+ 0xBCBABFBD, 0xC0BEB9BE, 0xBCBFBDBD, 0xBDBABCBC,
+ 0xBCBDBABC, 0xBABAC0BA, 0xC1B9BAC4, 0xA9B9B3B3,
+ 0xA8A2B5AC, 0xB3A89FB3, 0x9CB8A99D, 0xAB9DB9AA,
+ 0xB8A89CB8, 0x9CBAA89C, 0xA99DB9A8, 0xB7ABA0BA,
+ 0x9EB8AAA0, 0xA89DB7AB, 0xB6A8A0B7, 0xA1B6A6A1,
+ 0xAEA8BBA8, 0xB5ADABB7, 0xAFBAACAB, 0xB1B0BAB3,
+ 0xBEB2B5BA, 0xC1C1B6BB, 0xB7BFBEB9, 0xC1BABFC0,
+ 0xC0BFBBC0, 0xBABFC0BA, 0xC0B8BFC2, 0xC0BFB8C0,
+ 0xB7BDBCBA, 0xBEBAC0BF, 0xBFBEBAC1, 0xB6BEBDB7,
+ 0xC0B8C0BF, 0xBEBFB8C0, 0xBABFC0B9, 0xC0B8BEBD,
+ 0xBEBFB9C1, 0xBBC0C1B9, 0xBFB6BEBD, 0xBFBEB8C0,
+ 0xBABFBEBA, 0xC6BBBEC2, 0xB2BEBCBE, 0xADAABAB2,
+ 0xBBABA4B9, 0x9AB4AEA4, 0xA799B5A7, 0xB4A698B4,
+ 0x98B4A798, 0xAE9EBDA7, 0xB8A898B7, 0x9AB9A999,
+ 0xA99BB7A9, 0xB8A89DB7, 0x9FB9A99E, 0xA8A0B7AA,
+ 0xBBA6A1B6, 0xA7BCACA8, 0xACA9B9AC, 0xB9ADA9B5,
+ 0xB8BCB3B0, 0xB4B8B9B7, 0xBDBABCBC, 0xBFBEBBBD,
+ 0xBABEBFBA, 0xBAB9BEBD, 0xBABAB6BB, 0xBBBEBCB8,
+ 0xBBBABDBB, 0xBDBBBABD, 0xBABDBBBA, 0xB6B9BDB8,
+ 0xBCBAB7BB, 0xB3B8B6B7, 0xB4B3B7B2, 0xBCB7B5B9,
+ 0xB3B9B4B6, 0xBAB8BCB7, 0xBFBABBBF, 0xBDC1BCBB,
+ 0xBEBABDBB, 0xBDB8BFC3, 0xB7BBB5B9, 0xAFB0B4AF,
+ 0xA19CB0B4, 0x8B8F8A9B, 0x5E727573, 0x4B475F60,
+ 0x504B484E, 0x4D4F4A47, 0x58535552, 0x6162595B,
+ 0x66696963, 0x6D646C6C, 0x6B6C636C, 0x686F6C67,
+ 0x736A7270, 0x70716872, 0x6A71716B, 0x716B6E70,
+ 0x73756F71, 0x7172756C, 0x786F777A, 0x78797077,
+ 0x6A73766D, 0x776E7073, 0x78797076, 0x727B7971,
+ 0x7A717C7A, 0x7A7E7379, 0x70787C70, 0x7D72787C,
+ 0x70736A79, 0x73797A71, 0x79737979, 0x74746E79,
+ 0x7374746E, 0x7C787B78, 0x7C77747F, 0x787D7875,
+ 0x7A76807B, 0x7F7C787D, 0x74777574, 0x78747778,
+ 0x76787279, 0x73787773, 0x76727877, 0x7F7C7877,
+ 0x727C7974, 0x7A757A77, 0x7B77727E, 0x4C787571,
+ 0x00004F4D, 0x00000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x22231F00,
+ 0x4850504A, 0x685D5051, 0x6F736864, 0x69737569,
+ 0x746A7575, 0x75746A75, 0x676F7066, 0x645B6E72,
+ 0x55564D63, 0x2840403A, 0x05072D2C, 0x08050708,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x2D2C2802, 0x3D383832, 0x544B4546, 0x60615753,
+ 0x616A6A5E, 0x71676D6D, 0x6D6B6373, 0x546A6860,
+ 0x504B5C5D, 0x48434054, 0x243F3C38, 0x00002B28,
+ 0x01010102, 0x00010101, 0x00000000, 0x25262400,
+ 0x968E8F8B, 0x9C969C9C, 0x9D9D979C, 0x969A9C96,
+ 0xA09B9A9C, 0x9CA09B9C, 0x9D9FA39D, 0xA39D9FA3,
+ 0xA4A8A29F, 0xBAA6ACA7, 0xC0B9B8BF, 0xB8C0B9B8,
+ 0xBBB8BEB9, 0xBFBDBABD, 0xBCBFBDBC, 0xBFBBC0BF,
+ 0xC0C0BAC0, 0xB8C0BFB8, 0xBAB9BFBE, 0xC0BDB6BD,
+ 0xBAC1BEB9, 0xBDB9C0BD, 0xBFBEB9C0, 0xBABFBEBA,
+ 0xBEBABFBD, 0xBCBABBC0, 0xB8BDBBB7, 0xBCB7BDBC,
+ 0xBEBDB7BD, 0xB7BDBCB8, 0xBDB8BDBB, 0xBFBDBABF,
+ 0xB9BFBEBA, 0xBEB6BBBC, 0xB7B7B6BE, 0xB6BEBDAF,
+ 0xBBB9BEBC, 0xBEBBB8BD, 0xB7BEBBB7, 0xBFBFC3BE,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x01020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x04050505, 0x3C380506, 0x5556523B, 0x4E4F5250,
+ 0x504E4D50, 0x4A4D4B4D, 0x47484B49, 0x4644484C,
+ 0x41474243, 0x3F3F433E, 0x443E4044, 0x39403940,
+ 0x37383C37, 0x3C36383C, 0x383C3638, 0x37383C37,
+ 0x3836383C, 0x37383635, 0x35383935, 0x38363839,
+ 0x35363437, 0x36393A38, 0x38383738, 0x393A3838,
+ 0x30363832, 0x39333639, 0x38383239, 0x2F32342E,
+ 0x5E583135, 0x70736A5E, 0x67697167, 0x70666971,
+ 0x6A6F6668, 0x686F7269, 0x71687071, 0x6E716870,
+ 0x6A6E7469, 0x28226F75, 0x00040024, 0x00000100,
+ 0x01010000, 0x00000001, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x52020301, 0x807A5556,
+ 0x80817880, 0x7B85827D, 0x7F7C8380, 0x88838084,
+ 0x7E85827D, 0x867D8484, 0x85867C85, 0x7B86857B,
+ 0x88808685, 0x8A88808A, 0x7F8C8B81, 0x8B7F8B8B,
+ 0x8A8A7E8B, 0x7E85877B, 0x877E8788, 0x85867D86,
+ 0x7D84887D, 0x847B8488, 0x80817883, 0x7C7E8178,
+ 0x867D8285, 0x7F807785, 0x7B808178, 0x88808384,
+ 0x85867D8A, 0x7A83847A, 0x80768384, 0x85847A81,
+ 0x7985867D, 0x7E768182, 0x7C7A7280, 0x737E7C74,
+ 0x7D757D7B, 0x7F7E747F, 0x6D807E76, 0x776D7576,
+ 0x76776D76, 0x6875766D, 0x685F7270, 0x62635A67,
+ 0x4E5B5B55, 0x4C485454, 0x4F4C474F, 0x5C61645B,
+ 0x7C736065, 0x8B8F8977, 0xAA969A94, 0xB0AAACB0,
+ 0xAEB0AAAE, 0xBAB9BBB5, 0xC1BBBEC0, 0xBEC0BABF,
+ 0xBCBCC0BB, 0xBFBABDC1, 0xB8BCB7BB, 0xBABBBFBA,
+ 0xC0BEBBBF, 0xBFC0BEBF, 0xBDC1C2C0, 0xBFBDBEBF,
+ 0xBCBFBDBC, 0xBFBCBFBD, 0xBFBDBEC1, 0xBBBEBCBC,
+ 0xBEBABFBD, 0xBFBDBBC0, 0xBCBFBDBC, 0xC0BEC0C0,
+ 0xB7BDBBBC, 0xB3B2BCB7, 0xB5ADAABA, 0xA1B6A6A2,
+ 0xA99FB6A8, 0xBBAA9DB5, 0x9BB7AEA1, 0xA99AB9A9,
+ 0xBAA599B7, 0x98B8A89C, 0xA89CBAA5, 0xB7AB9FBB,
+ 0x9CB8AA9D, 0xAA9CB8AA, 0xB7A89FB9, 0xA0B7A6A0,
+ 0xA79FB6A8, 0xBAAEA8BB, 0xA8B9B1A9, 0xB3AEBDB0,
+ 0xB8AEAFB9, 0xBABFADB0, 0xBBC0C3B6, 0xC0B7BCBF,
+ 0xBFC0BABF, 0xBABFC0BA, 0xC0B8C0C0, 0xBFBEB8C0,
+ 0xB7BDBCB9, 0xBCB7BDBC, 0xBEBDB8BF, 0xB8C1BEB6,
+ 0xBDB8C0BF, 0xBFC0B6BE, 0xB8C0C0BA, 0xBEB7BFBF,
+ 0xBEBFB7BF, 0xBABFC0B9, 0xBFB8C0BF, 0xBEBFB8C0,
+ 0xBBBEC2BA, 0xB9B5B4BE, 0xA0B5ADAA, 0xABA0BAA7,
+ 0xB7A697B6, 0x98B8A798, 0xA899B9A7, 0xAFA797B6,
+ 0x8EAFA090, 0xA796B79F, 0xB8A897B8, 0x98B8A897,
+ 0xA899B8A7, 0xB7A89CB8, 0x9CB8A89D, 0xAA9FB9A8,
+ 0xB7A8A0B7, 0x9FB6A7A2, 0xAAA1B6A7, 0xB8B1A9BA,
+ 0xA9B4B0A9, 0xB4B1BAAD, 0xBFBBBBC1, 0xBCBDBCBE,
+ 0xB8BCBDB8, 0xBDB6BBBA, 0xC1C0B8BE, 0xBABFBEBC,
+ 0xBBB8BDBC, 0xBDBBB8BD, 0xBBBEBCBA, 0xB6B9BDB8,
+ 0xBDBBB7BB, 0xB5BAB8B8, 0xB8B4B8B3, 0xBCB7B9BD,
+ 0xB7BDB8B6, 0xB7B8BCB7, 0xBEBAB8BC, 0xBFC0BCBD,
+ 0xB9BEC1BF, 0xC2BCBABE, 0xB7BBB5BE, 0xAEB0B4AF,
+ 0xB4AFADB3, 0x9DA19CAE, 0x5E858886, 0x4B4A5D60,
+ 0x4F4C484D, 0x47504D49, 0x58504F4C, 0x6260585A,
+ 0x6465665D, 0x6A616C6D, 0x6C6D6469, 0x676F6C67,
+ 0x70676F6C, 0x7071686F, 0x6B71716B, 0x716B7171,
+ 0x71716B71, 0x6D707168, 0x756C7576, 0x73746B74,
+ 0x6D75766D, 0x756C7576, 0x75766D74, 0x6D74756C,
+ 0x766E7576, 0x7A7B7278, 0x707A7C70, 0x7B72787C,
+ 0x62655C78, 0x7874746E, 0x79737E7E, 0x79797379,
+ 0x72787872, 0x78747A77, 0x817C797B, 0x787F7A77,
+ 0x7D79807B, 0x76736F80, 0x696B6968, 0x6B676A6B,
+ 0x6A6C666A, 0x7473756F, 0x7A767A7A, 0x7F7C787D,
+ 0x757F7C77, 0x7C777D7A, 0x7B78737F, 0x4A77746F,
+ 0x01004F4E, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x22231F00,
+ 0x484E504A, 0x675D5051, 0x72736966, 0x6A747468,
+ 0x73697676, 0x7A796F74, 0x68707167, 0x71686E71,
+ 0x56574E70, 0x2840403A, 0x07072D2C, 0x07040609,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x2C2B2702, 0x3D393933, 0x544B4546, 0x60615753,
+ 0x62656559, 0x71676E6E, 0x6E6C6473, 0x5369675F,
+ 0x504B5D5B, 0x48454153, 0x263D3C38, 0x00002927,
+ 0x00000000, 0x00000000, 0x00000000, 0x01020000,
+ 0x9F82847E, 0x9D94A7A8, 0x9A9D949C, 0x9A9A9D94,
+ 0xA09B9EA0, 0xA0A49F9C, 0x9D9FA39D, 0xA29C9FA3,
+ 0xA5ACA59E, 0xBAA5ACA7, 0xC0B9B8BF, 0xB9C0B9B8,
+ 0xB7B6BCB7, 0xBBB9B8BC, 0xB8BDBBB8, 0xBEBABFBE,
+ 0xC0BFB9BF, 0xB9C1C0B8, 0xBDB9C0BD, 0xBEBBB9C0,
+ 0xBAC1BEB7, 0xBEB9C0BD, 0xBFBEBAC1, 0xBABFBEB9,
+ 0xBDBABFBD, 0xBBB9BABF, 0xB8BDBBB6, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBBB8BDBB, 0xBEBCB8BD,
+ 0xB8BDBCB9, 0xBDB7BCBD, 0xBCBBB5BD, 0xB4BAB9B4,
+ 0xBBBABFBD, 0xBEBBB8BD, 0xB7BEBBB7, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x01000301, 0x04000003,
+ 0x00030000, 0x07060907, 0x09070609, 0x06090706,
+ 0x08080808, 0x09070808, 0x40413F08, 0x4F505351,
+ 0x524E5054, 0x52535151, 0x47484947, 0x47474649,
+ 0x46494745, 0x474B4C48, 0x4C47484C, 0x494D4848,
+ 0x37363C37, 0x3C37363C, 0x383C3738, 0x38383937,
+ 0x38383838, 0x39373638, 0x32383733, 0x39333838,
+ 0x36383239, 0x2F32332F, 0x33313034, 0x30333130,
+ 0x36383937, 0x39373738, 0x38393738, 0x5D343833,
+ 0x79735F63, 0x75777179, 0x6B6E736A, 0x736A6F74,
+ 0x71746B70, 0x6B72726C, 0x71687171, 0x6D70676E,
+ 0x6E686E63, 0x77717179, 0x54585273, 0x00000100,
+ 0x01000001, 0x01010100, 0x00010101, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x4F020000, 0x7D785453,
+ 0x7F7C7780, 0x7C84817C, 0x817E8481, 0x86817E86,
+ 0x7A898580, 0x827D827F, 0x85837B85, 0x8185867D,
+ 0x857F898A, 0x88898085, 0x7F86877D, 0x897F8889,
+ 0x86877D88, 0x80898A80, 0x867D8889, 0x83867D83,
+ 0x7F83847A, 0x847A8889, 0x7E7F7583, 0x75787C71,
+ 0x857A7C80, 0x868A7F81, 0x7885867D, 0x81788081,
+ 0x83847B80, 0x7D83847B, 0x867D8586, 0x80817885,
+ 0x7B83807B, 0x807B8380, 0x807D7883, 0x727C7C76,
+ 0x7A717A7B, 0x78797079, 0x7177786F, 0x7970797A,
+ 0x73746B78, 0x63707168, 0x6C636B6C, 0x65655F6B,
+ 0x505D5D57, 0x4C475554, 0x56534E4F, 0x63696A66,
+ 0x90876769, 0x8B90878D, 0xAEA6ACA7, 0xB3AEADB3,
+ 0xB3B9B4AD, 0xBBB9BFBA, 0xC0BBBAC0, 0xBDC1BCBC,
+ 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA, 0xB6B6BCB7,
+ 0xBDBBB5BB, 0xBBBEBCBA, 0xBEBCBFBD, 0xBFBDBDC0,
+ 0xBFC2C0BC, 0xBDBCBFBD, 0xBFBDBCBF, 0xBCBFBDBC,
+ 0xB6B7BDB8, 0xBBB9B5BB, 0xB8BABAB8, 0xBEB8B7B9,
+ 0xABBAB8B5, 0xA9A3B6B0, 0xB7A8A0B7, 0x9CB8A89D,
+ 0xAA9CB8A8, 0xB8A99CB6, 0x9BBAAB9C, 0xA899B8AA,
+ 0xB7A798B7, 0x98B8A798, 0xA798B8A7, 0xBBAA9BBA,
+ 0x98B7AB9C, 0xA999B8A8, 0xB6A69AB8, 0x9DB8A49B,
+ 0xA69DB7A6, 0xB6AEA3BD, 0xA4BBA99F, 0xB0A9BEAE,
+ 0xBCAFACBC, 0xAEBAB0AD, 0xB4B5BFB0, 0xC1BABEC3,
+ 0xC0C0B7BE, 0xB8C0C0B8, 0xBDB5BDBD, 0xBDBCB5BD,
+ 0xB7BDBCB7, 0xC0BAC0BF, 0xBEBFB9C1, 0xB9BFBEB9,
+ 0xBBB6BDBA, 0xBFBEB7BE, 0xB8C0C0B7, 0xBEB8C0C0,
+ 0xBBBCB6BE, 0xBABFC0B6, 0xC0B8C0C0, 0xBFC4B8C0,
+ 0xB5B3BFBC, 0xB7B0AABD, 0x97B6AA9D, 0xA695B6A7,
+ 0xB7A798B8, 0x99B9A697, 0xA396B6A6, 0xB5A798B8,
+ 0x8CAEA594, 0x9C8CAE9C, 0xBBA898BA, 0x94B6A999,
+ 0xA79ABAA2, 0xB7A99BB7, 0x9CB8A99B, 0xA89CB8AA,
+ 0xB7A89FB9, 0x9DB7A8A0, 0xAB9EB6A8, 0xB6AFA4B8,
+ 0xA5B6AFA5, 0xACA5B4AF, 0xBAAEAAB6, 0xB9BDB2B1,
+ 0xB6BBBAB8, 0xC0BBC0C1, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BDBBBA, 0xB8B8BCB7,
+ 0xBBB9B9BD, 0xB5BAB8B6, 0xB7B9BDB8, 0xBBB9B8BC,
+ 0xB6BBB9B6, 0xB9B7BCBA, 0xBCB7B6BB, 0xB8BCB7B8,
+ 0xBABABEB9, 0xBFB9BBBF, 0xB8BFB8BB, 0xB3B2BAB3,
+ 0xB8B3B1B8, 0xA6AAA5B4, 0x738F9290, 0x59577275,
+ 0x58595756, 0x40484842, 0x50484A48, 0x5E5C5452,
+ 0x6064655C, 0x69606869, 0x66686266, 0x69686862,
+ 0x72696F6F, 0x70716871, 0x6874716C, 0x6F6A6F6C,
+ 0x75716C73, 0x6B727068, 0x79707374, 0x78787278,
+ 0x73797973, 0x78727979, 0x78787278, 0x71717269,
+ 0x7873797A, 0x7B79717B, 0x757C7A72, 0x736A7D7E,
+ 0x6C706A70, 0x7473766D, 0x736D7A7A, 0x7C797473,
+ 0x757D7A75, 0x7A767D7A, 0x7C79757D, 0x77817C79,
+ 0x78737F7A, 0x726F6A7B, 0x646D6C68, 0x635F6566,
+ 0x62645E62, 0x716E7168, 0x7C77797A, 0x7B78747F,
+ 0x707C7B77, 0x78747574, 0x75756F79, 0x72787872,
+ 0x02007878, 0x03030301, 0x01000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x22232100,
+ 0x4E52534F, 0x69615254, 0x75746A6B, 0x6D79796D,
+ 0x786E7979, 0x75746A7A, 0x666C6D64, 0x6E656E6F,
+ 0x65685F6B, 0x24494943, 0x07072928, 0x08080807,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x2B2C2800, 0x423A3C36, 0x554C4648, 0x60615752,
+ 0x6169695D, 0x71676D6D, 0x6D6C6272, 0x556D6C62,
+ 0x514B605F, 0x42433F51, 0x263B3C3A, 0x01012728,
+ 0x00000000, 0x00000000, 0x00000200, 0x01020002,
+ 0x998C8F86, 0xA499A0A4, 0xA0A499A0, 0x9A9CA095,
+ 0xA19C9EA3, 0x9DA19C9D, 0x9D9DA49D, 0xA39E9DA4,
+ 0xA2A8A39D, 0xB7A8B0A9, 0xC5BEB6BE, 0xB7BEB7BE,
+ 0xBDBAC0BB, 0xBFBDBABF, 0xBABFBDBA, 0xBEBCC1BF,
+ 0xC0BEBBC0, 0xBABFBDBB, 0xBDB9C0BD, 0xBEBBB9C0,
+ 0xB7BEBBB7, 0xBAB8BDBC, 0xBBBAB5BB, 0xB9BFBEB5,
+ 0xBCB9BFBE, 0xBDBCB7BD, 0xB7BCBBB8, 0xBDB7BEBB,
+ 0xBDBCB8BE, 0xB9BEBDB8, 0xBEB8BDBB, 0xBDBDBBC0,
+ 0xB8BDBCBB, 0xBDB7BCBD, 0xBCBBB7BC, 0xB4B9B8B6,
+ 0xBCB8BDBC, 0xBDBCB8BD, 0xB7BEBBB7, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x02000301, 0x04000104,
+ 0x00040000, 0x07060907, 0x09070609, 0x06090706,
+ 0x07090909, 0x08080707, 0x07070708, 0x4F505351,
+ 0x544F5054, 0x50544F50, 0x47484947, 0x48484649,
+ 0x46494746, 0x48494A46, 0x4C474B4C, 0x484C4748,
+ 0x37383C37, 0x3C37383C, 0x383C3738, 0x38363937,
+ 0x38383838, 0x38393738, 0x30383832, 0x39303839,
+ 0x36393038, 0x2E2F332D, 0x342F3034, 0x2F332E30,
+ 0x37373836, 0x39373839, 0x38393538, 0x7161625E,
+ 0x78727577, 0x76787278, 0x6B70756C, 0x746B6F74,
+ 0x70736A71, 0x6C70726C, 0x736A7072, 0x70756C70,
+ 0x70666E64, 0x7771727A, 0x73777173, 0x2550524C,
+ 0x01002829, 0x00010000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x782A2827, 0x7C787D7C,
+ 0x7F7C777F, 0x7D83807B, 0x827F8582, 0x89848187,
+ 0x7A84807B, 0x807B837F, 0x85827D83, 0x7D83847B,
+ 0x847E8586, 0x85867D84, 0x7D87887E, 0x857B8687,
+ 0x86877D84, 0x80888980, 0x887F8889, 0x81847B85,
+ 0x7A83847B, 0x7E748384, 0x7B7C727D, 0x75787C71,
+ 0x857A7C80, 0x81857A81, 0x80898A81, 0x837A8889,
+ 0x86877E82, 0x7B81847B, 0x867D8184, 0x88898085,
+ 0x7B87847F, 0x817C8380, 0x81817B84, 0x737C7C76,
+ 0x7B72797C, 0x7879707A, 0x6D73746B, 0x78707576,
+ 0x74726A7A, 0x67717269, 0x645E6F70, 0x60605A64,
+ 0x485E5D59, 0x4D474D4C, 0x5D5C584D, 0x79686965,
+ 0x8F867C7D, 0x9EA39A8C, 0xAEA6ACA7, 0xB9B4ADB3,
+ 0xB9BFBAB3, 0xBDB8BFBA, 0xC0BEBABF, 0xBABFBDBB,
+ 0xBBBAC0BB, 0xC0BBB9C0, 0xBAC0BBBA, 0xBBBBC1BC,
+ 0xBEBCBAC0, 0xBABDBBBB, 0xBBBABDBB, 0xBDBBBABD,
+ 0xBABDBBBA, 0xBCBABDBB, 0xBCBABBBE, 0xBABDBBB9,
+ 0xB9B6BBB9, 0xBBBCB8BB, 0xB2B0B6B9, 0xBAB0ACB7,
+ 0xA0B5B0AB, 0xA89FB9A7, 0xB6A99DBB, 0x98B7A697,
+ 0xA898B7A7, 0xB7A797B6, 0x99B8A898, 0xA697B7A8,
+ 0xB8A798B8, 0x96B8A798, 0xA898BAA6, 0xB6A798B8,
+ 0x96B7A797, 0xA897B8A7, 0xB9A699B9, 0x9AB8A499,
+ 0xA69AB6A4, 0xBAAC9DBC, 0x9FBBAC9E, 0xAEA3BDAD,
+ 0xBEAFA8BD, 0xA8BBAFAB, 0xB0ADBDAE, 0xC5B2B4BF,
+ 0xBFC2B8BE, 0xB8C0C0BA, 0xC0B9C1C1, 0xC1C0B8C0,
+ 0xB8BEBDBB, 0xC0BABFC0, 0xC0C0B8C0, 0xBABFC0B8,
+ 0xBBB9C0BD, 0xBFBEB7BE, 0xB8C0C0B7, 0xBDB8C0C0,
+ 0xBCBDB7BC, 0xB6BBBCB7, 0xC3BABFC2, 0xB2BEBABE,
+ 0xAFA9BCB2, 0xB6A89CB8, 0x94B7A695, 0xA894B7A8,
+ 0xB8A796B7, 0x97B7A798, 0xA295B5A4, 0xB8A899B9,
+ 0x95B7A897, 0x9B8BADA5, 0xB9A294B6, 0x95B7A597,
+ 0xA699B9A3, 0xB6A899B8, 0x9BB7A89A, 0xA89AB6A9,
+ 0xB7A89CB8, 0x9EB8A59C, 0xAC9FB9AB, 0xB6AC9FB7,
+ 0x9FB7ACA0, 0xAFA3B9AD, 0xB2AEA8BB, 0xABB4A6A3,
+ 0xB6B9BDAC, 0xBFBABFC0, 0xBFC2B7BF, 0xB8C0C0B8,
+ 0xBFB9BFBE, 0xC0BFBAC0, 0xB8BDBCBB, 0xB7B5BAB8,
+ 0xBAB8B6BC, 0xB4B9B7B5, 0xB9B8BBB9, 0xBCBABABE,
+ 0xB7BCBAB7, 0xB2B6BBB9, 0xBCB7AFB4, 0xB8BCB7B6,
+ 0xB9B9BDB8, 0xBFB8BABE, 0xB8BFB8B8, 0xBAB8C0B9,
+ 0xB8B3B9C1, 0xACB0ABB4, 0x718D938E, 0x59577076,
+ 0x595A5856, 0x40474741, 0x4E464849, 0x58564E50,
+ 0x6063645B, 0x67616869, 0x66686265, 0x666B6B65,
+ 0x71676E6F, 0x716F6770, 0x6D6F6B66, 0x746F7570,
+ 0x736F6A7A, 0x6D727068, 0x766D7775, 0x75756F75,
+ 0x777A7772, 0x79737F7C, 0x78787279, 0x71797A71,
+ 0x7873797A, 0x7975707B, 0x777B7772, 0x79737F7C,
+ 0x77797379, 0x797F8279, 0x7B758182, 0x7D7A757B,
+ 0x727D7A75, 0x7D797878, 0x7B7A767E, 0x787F7C78,
+ 0x736B817D, 0x726F6A75, 0x656A6965, 0x635F6667,
+ 0x62645E62, 0x71707168, 0x7873797A, 0x7B78747B,
+ 0x777A7975, 0x77737A7B, 0x78787278, 0x70787970,
+ 0x29257879, 0x02030128, 0x01000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x22232100,
+ 0x4E50544F, 0x69615254, 0x76746A6B, 0x6C79796D,
+ 0x73687878, 0x76756B75, 0x6C73746B, 0x756C7272,
+ 0x6B6E6572, 0x45686862, 0x09074A49, 0x08080808,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x2A2B2900, 0x423A3B37, 0x544E4648, 0x60615852,
+ 0x606A695F, 0x6C626C6C, 0x6D6C626D, 0x556E6C61,
+ 0x514B605F, 0x4145404F, 0x27383B39, 0x00002629,
+ 0x00010100, 0x00020000, 0x01010200, 0x03010003,
+ 0x988D9087, 0xA498A0A4, 0xA1A599A0, 0x99969C91,
+ 0xA19B9DA2, 0x9EA29D9D, 0x9C9EA59E, 0xA29D9CA3,
+ 0xA7ADA89C, 0xB1A7AFA8, 0xC6BFB0B8, 0xB7BDB8BF,
+ 0xBDB8BDBB, 0xC0BDBABF, 0xBABFBDB9, 0xBEBBC0BE,
+ 0xC1BFBDC0, 0xBBC0BEBE, 0xBCB9C0BD, 0xC0BDB8BF,
+ 0xB5BBBAB9, 0xBEB8BDBC, 0xC0BFB9BF, 0xBAC0BFBA,
+ 0xBBB8BEBD, 0xBDBCB6BC, 0xB7BCBBB8, 0xBDB7BEBB,
+ 0xBFBEB9C0, 0xBABFBEBA, 0xBCB9BEBD, 0xC0BFB8BD,
+ 0xB8BDBCBB, 0xBEB7BCBD, 0xBDBCB8BD, 0xB4B9B8B8,
+ 0xBCB7BCBB, 0xBDBCB8BD, 0xB7BEBBB7, 0xBFC0C3C1,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000400, 0x04000004,
+ 0xA0A49F00, 0xAFB1B5B0, 0xB3B1B0B4, 0xB0B3B1B0,
+ 0xB0B0B0B0, 0xB1B1B0B0, 0xB0B0B0B1, 0x96959896,
+ 0x77729598, 0x4E544F73, 0x67686C67, 0x6A68666C,
+ 0x666C6765, 0x47484C47, 0x4B45484C, 0x484C4647,
+ 0x5D61635D, 0x635D6163, 0x5E625C61, 0x5F616560,
+ 0x645F5E64, 0x5E645F5E, 0x5C5E625C, 0x635A5E62,
+ 0x5E635A5E, 0x565A5F56, 0x5E585A5F, 0x5C5E585A,
+ 0x5A5E605A, 0x61585E60, 0x5E61585E, 0x73767970,
+ 0x79737979, 0x75777179, 0x6E717871, 0x756E6D75,
+ 0x7377716E, 0x6C6F776D, 0x756B6E76, 0x71796F6D,
+ 0x7171796F, 0x78717078, 0x71787171, 0x72777C73,
+ 0x524C767B, 0x00010050, 0x00000100, 0x01010000,
+ 0x00000001, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x792A2827, 0x7B78807D,
+ 0x807B7880, 0x7C83807C, 0x837E8380, 0x87837E87,
+ 0x7E83807B, 0x817C8683, 0x85827D84, 0x7C83847B,
+ 0x89808485, 0x85867D88, 0x7A85867C, 0x877D8486,
+ 0x88897F86, 0x8086877E, 0x857B8889, 0x84857C84,
+ 0x8083847B, 0x847A8889, 0x7A7B7183, 0x70777B6F,
+ 0x8075767D, 0x81857A7C, 0x8088897F, 0x867E898A,
+ 0x84857C88, 0x7D81847B, 0x847B8386, 0x80817883,
+ 0x7982837A, 0x82798182, 0x7D7E7581, 0x757E7F76,
+ 0x786F7D7E, 0x78797077, 0x68787970, 0x71687071,
+ 0x70716870, 0x636F7067, 0x6D646B6C, 0x61615B6A,
+ 0x48555450, 0x54504D4C, 0x62635F55, 0x89686965,
+ 0x90878D8F, 0xA0A39A8D, 0xAEAFB3AE, 0xBAB3ADB3,
+ 0xB7BFB8B3, 0xBBBBC1BC, 0xC1BCBAC0, 0xBBC1BCBB,
+ 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA, 0xBEBCBFBD,
+ 0xBFBDBDC0, 0xBCBFBDBC, 0xBBBCBFBD, 0xBBB9BABD,
+ 0xB8BBB9B8, 0xB9B8BBB9, 0xBBB9B8BB, 0xB8BBB9B8,
+ 0xBEB8BBB9, 0xA9B5B9BA, 0xA59FB2AD, 0xB9A8A1B6,
+ 0x9EBCA89F, 0xA295B5A8, 0xB8A798B8, 0x97B8A897,
+ 0xA998B9A8, 0xB8A897B8, 0x96B7A897, 0xA897B9A7,
+ 0xB8A897B9, 0x97BCA696, 0xA797B9A8, 0xB9A798B8,
+ 0x98B9A998, 0xA697B7A9, 0xB7A597B9, 0x9BB9A297,
+ 0xA899B8A7, 0xB8A798B8, 0x9DBCA798, 0xAA9EBAAC,
+ 0xBCA8A0B7, 0xA7BCAEA7, 0xACA7BCAE, 0xBFAEADBD,
+ 0xBFC4B2B4, 0xBABFC0BC, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB9BEBFB8, 0xC0B9BFBE, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBEBAC0BF, 0xC0C1B9BF, 0xBABFC0BB, 0xBCB9BEBF,
+ 0xBFC0B6BB, 0xBABFC2BA, 0xBFBABDC5, 0xA8BBB3B3,
+ 0xA89DB7AE, 0xB7A596B6, 0x94B7A695, 0xAD9ABBA8,
+ 0xB8A796B7, 0x95B7A798, 0xA295B5A3, 0xB8A798B8,
+ 0x97B9A897, 0xA191B3A7, 0xB59F8FB1, 0x98BAA495,
+ 0xA899B9A8, 0xB8A999B8, 0x99B8A999, 0xA898B7A9,
+ 0xB7A899B8, 0x9BB7A798, 0xAB9DB9A9, 0xB9A89DB7,
+ 0x9EB8AA9F, 0xAA9FB9AB, 0xB5A8A0B7, 0xA2B3A6A2,
+ 0xB1AFBBA8, 0xC0BBBEC3, 0xC0C0B8C0, 0xBABFC0B8,
+ 0xBDBABFBE, 0xBFBEBABF, 0xB9BFBEBA, 0xB5B6BDBA,
+ 0xB8B7B1B8, 0xB4B9B7B2, 0xB9B8BBB9, 0xBBB9B8BB,
+ 0xBABDBBB8, 0xAEB8BBB9, 0xB8B6ABB0, 0xB6BBB9B3,
+ 0xB9B8BCB7, 0xBFB8BABE, 0xB8BFB8B8, 0xB9B9C0BB,
+ 0xBFB8B8C0, 0xB2B9B2B8, 0x8FA8B0A9, 0x75738E94,
+ 0x58595772, 0x40484842, 0x4F474849, 0x58564E51,
+ 0x5E5E5E58, 0x67616264, 0x696A6167, 0x62686960,
+ 0x6E646A6B, 0x7270686F, 0x6B736F6A, 0x6E6B736E,
+ 0x74706B73, 0x6D78766E, 0x756C7576, 0x75766D74,
+ 0x70787970, 0x77727879, 0x7C79747A, 0x71807E76,
+ 0x766E7B79, 0x79767178, 0x78807D78, 0x78747F7C,
+ 0x7E7B767B, 0x727C7D74, 0x7B757A7B, 0x81817B7B,
+ 0x737B7B75, 0x79757677, 0x7B7A7678, 0x737F7C78,
+ 0x746C7B78, 0x726F6A76, 0x656A6965, 0x635F6667,
+ 0x68686262, 0x7374746E, 0x78737B78, 0x76736E7B,
+ 0x75787773, 0x78747A79, 0x7B78737B, 0x70787970,
+ 0x514D7879, 0x01020050, 0x01000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x22232100,
+ 0x4E50544F, 0x68605254, 0x76746A6A, 0x6A7A7A6E,
+ 0x7A6C7878, 0x79796D7A, 0x6C787970, 0x726C7475,
+ 0x6E6E6872, 0x43676761, 0x28244949, 0x0A080729,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x2A2B2900, 0x42383C37, 0x544E4448, 0x60615852,
+ 0x5D69685E, 0x6C626A68, 0x6D6C626D, 0x566F6D62,
+ 0x52496160, 0x42443E51, 0x26383C37, 0x00002528,
+ 0x00000000, 0x00020000, 0x00000200, 0x02030100,
+ 0x9A8B8E85, 0xA397A1A5, 0xA0A4989F, 0x99959B90,
+ 0xA29C9DA2, 0x9DA19B9E, 0x9D9DA49D, 0xA9A49DA4,
+ 0xA6ACA7A3, 0xB0A8B0A9, 0xC4BFAFB7, 0xB9BDB8BE,
+ 0xBEB8BDBB, 0xBFBDBBC0, 0xBABFBDBA, 0xBEBBC1BC,
+ 0xC0BEBBC0, 0xBBC0BFBB, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB7BFBEB7, 0xBFB7BDBC, 0xBEBDBAC0, 0xB9BFBEB8,
+ 0xBBB7BDBC, 0xBCBBB6BC, 0xB7BCBBB7, 0xBDB7BEBB,
+ 0xC0BFB9C0, 0xBABFBEBB, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB7BDBCB9, 0xBCB5BDBD, 0xBEBDB4BC, 0xB6BCBBB8,
+ 0xBCB5BAB9, 0xBDBCB8BD, 0xB7BEBBB7, 0xBFC0C3C1,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x01020301, 0x03010003,
+ 0xA0A49F00, 0xB0B0B4AF, 0xB4AFB1B5, 0xB0B3B1B0,
+ 0xB0AEB1AF, 0xB1AFAFB2, 0xAEB1AFAE, 0xB7B8BBB9,
+ 0xBBB6B8BC, 0xB5BBB6B5, 0xAAA9AFAA, 0xAFAAA9AF,
+ 0xA9AFAAA9, 0xAEB0B4AF, 0xB5AFAFB3, 0xB0B4AEB1,
+ 0xAAAEB0AA, 0xB1ABAEB0, 0xACB0AAAF, 0xB1B3B7B1,
+ 0xB8B1B1B8, 0xB1B8B1B1, 0xB1B1B8B1, 0xB8AFB1B8,
+ 0xB3B8AFB3, 0xAAAEB3AA, 0xB3AAAEB3, 0xAFB4ABAE,
+ 0xA2A8ABA2, 0xACA1A8AB, 0xA8ACA1A8, 0x70767970,
+ 0x786F7879, 0x76797077, 0x7071796F, 0x7871717A,
+ 0x71796F71, 0x6C71796F, 0x796F6E76, 0x71796F71,
+ 0x71717871, 0x77717178, 0x74797073, 0x72757A71,
+ 0x7B72767B, 0x50524C78, 0x000E0F0D, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x78555352, 0x7C787F7C,
+ 0x7F7C777F, 0x7D817E7A, 0x827D8582, 0x87847F85,
+ 0x7F827F7A, 0x827D8784, 0x85827D85, 0x7D85867D,
+ 0x847B8586, 0x83847B83, 0x7C84857B, 0x877D8688,
+ 0x84857B86, 0x7E86877E, 0x857B8687, 0x88898084,
+ 0x80888980, 0x847A8889, 0x7F807683, 0x70787C70,
+ 0x8075787C, 0x7C80757C, 0x7F85867C, 0x857D8889,
+ 0x85867D87, 0x80888980, 0x847B8689, 0x80817883,
+ 0x767E7F76, 0x7F767E7F, 0x7E7F767E, 0x7178796F,
+ 0x7C737A7B, 0x77786F7B, 0x6D75766D, 0x71687576,
+ 0x70716870, 0x636C6D64, 0x61586B6C, 0x6061585E,
+ 0x48585550, 0x5C584F4C, 0x62635F5D, 0x897B7D77,
+ 0xA29C8D8F, 0xA0A29CA0, 0xADB1B3AD, 0xC1B7AFB3,
+ 0xB9C2B8B9, 0xBCBAC0BB, 0xC0BBBBC1, 0xBBC1BCBA,
+ 0xBABAC0BB, 0xC0BBB9BF, 0xBAC0BBBA, 0xBDBCBFBD,
+ 0xBEBCBCBF, 0xBABDBBBB, 0xBBBABDBB, 0xBFBDBABD,
+ 0xBEC1BFBC, 0xBDBABFBD, 0xBCBCBABF, 0xB9BBBCBA,
+ 0xB5BAB8BE, 0x9FB4ADA9, 0xA89DB7A8, 0xB4A296B4,
+ 0x95B5A096, 0xA294B6A0, 0xB6A596B6, 0x95B7A596,
+ 0xA594B6A6, 0xB8A695B6, 0x97B9A798, 0xA797B9A7,
+ 0xBBA896BB, 0x96BBA796, 0xA797B9A7, 0xB5A797B9,
+ 0x97B8A594, 0xA899B9A8, 0xB8A496B8, 0x99B9A496,
+ 0xA998B9A8, 0xB8A796B7, 0x9DBCA897, 0xAC9EBAAC,
+ 0xB9A99DB9, 0xA5BFA89F, 0xA59FB6AE, 0xBCB0ABC0,
+ 0xB3BCB0AD, 0xBBBEC2B4, 0xC1BABFC2, 0xC0C0B9C1,
+ 0xB8C0C0B8, 0xBEB7BDBC, 0xC0C0B9BF, 0xB9C1C1B8,
+ 0xBFB7BFBF, 0xBFC0B9BE, 0xBABFC0BA, 0xC2B7BCBD,
+ 0xBEC3BABF, 0xB2B4BCBA, 0xBBACA9B8, 0x9DB7AEA8,
+ 0xAA9BBAA8, 0xB7A695B7, 0x94B7A695, 0xA895B6A8,
+ 0xB7A897B8, 0x94B6A697, 0xA595B7A4, 0xB8A798B8,
+ 0x98B8A897, 0xA494B6A7, 0xB59E8FAF, 0x98BAA495,
+ 0xA999BBA8, 0xB8A897B8, 0x98B9A897, 0xA897B8A9,
+ 0xBBA695B6, 0x9CBBAB9A, 0xAA9CB8AB, 0xB8A89CB8,
+ 0x9DB9A89C, 0xA79BB7AB, 0xB6A89FB9, 0xA0B7A79F,
+ 0xA8A2B5AA, 0xC3ACADB7, 0xBFC2BABE, 0xB5BABBBA,
+ 0xBBB6BBBA, 0xC0BFBABD, 0xBABFBDBB, 0xB7B4BBB8,
+ 0xBCB9B3BA, 0xB5BAB8B5, 0xB9B7BAB8, 0xBCBAB8BB,
+ 0xB9BCBAB9, 0xB2B9BCBA, 0xB3B1B1B4, 0xB6BBB9AE,
+ 0xB7B8BCB7, 0xBFBAB8BC, 0xB8BFB8B9, 0xBAB9BFBA,
+ 0xC1BAB8BF, 0xB8C0B9B9, 0x8EA8B0A9, 0x76748D93,
+ 0x58595773, 0x404F4F49, 0x4E494849, 0x514E4951,
+ 0x5D5A5A54, 0x68626163, 0x67685F68, 0x636B6C63,
+ 0x6E656B6C, 0x6F6D656D, 0x70726F6A, 0x6E6B7873,
+ 0x77746F73, 0x6A75756F, 0x796F7273, 0x78797078,
+ 0x72787970, 0x78737878, 0x7B78737B, 0x6E78766E,
+ 0x766E7876, 0x7F7D7578, 0x777B7873, 0x7A777F7C,
+ 0x7F7C777F, 0x737B7C73, 0x7B757B7C, 0x7B7B757B,
+ 0x7980817D, 0x7D797C7D, 0x7E7D797C, 0x6E797874,
+ 0x746C7673, 0x70706A76, 0x636B6C68, 0x635F6667,
+ 0x68686264, 0x73726F6A, 0x7C777B78, 0x76736E7F,
+ 0x7374736F, 0x79757877, 0x74736F7A, 0x707A7870,
+ 0x504C7879, 0x02030151, 0x01000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x22232100,
+ 0x4E50544F, 0x69615254, 0x76746A6C, 0x6D79796D,
+ 0x7B6F7979, 0x7A7A6E7B, 0x6B78796F, 0x746B7374,
+ 0x73736D73, 0x61686862, 0x49456767, 0x2827234A,
+ 0x00000100, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000000,
+ 0x2A2B2900, 0x44383B39, 0x544E4549, 0x60615852,
+ 0x6169685E, 0x70666E6C, 0x73716772, 0x546E6C61,
+ 0x52496060, 0x42443E51, 0x243A3C36, 0x01002529,
+ 0x00000000, 0x00000000, 0x01010200, 0x01020001,
+ 0x9A62645E, 0xA499A0A3, 0x9DA398A0, 0x95969C91,
+ 0xA2999AA0, 0x9DA19B9D, 0x9D9DA49D, 0xA8A39DA4,
+ 0xA6ACA7A2, 0xB1A9AFAA, 0xC3BEB0B6, 0xB9BCBABF,
+ 0xBEBABDBB, 0xBFBDBBC0, 0xBABFBDBC, 0xBCBBC1BC,
+ 0xC0BEBBC1, 0xBBC0BEBB, 0xBEB9BFBE, 0xC0C0B7BF,
+ 0xB7BFBFB8, 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBEBA,
+ 0xBBBAC0BF, 0xBCBBB7BE, 0xB8BDBBB7, 0xBDB7BEBB,
+ 0xBEBDB9C0, 0xB8BDBCB9, 0xBEB7BDBC, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBDB7BCBD, 0xBDBCB7BC, 0xB7BDBCB7,
+ 0xBCB3B8B7, 0xBDBCB8BD, 0xB8BDBBB7, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000000, 0x07050406, 0x06060605,
+ 0xA8ABA906, 0xB6BABEB9, 0xBBB6B5BB, 0xB5BBB6B5,
+ 0xB6B5BBB6, 0xBCB7B5BB, 0xB6BCB7B6, 0xB7B3B9B4,
+ 0xBBB6B6BC, 0xB8BCB7B7, 0xB4B8BCB6, 0xBBB5B6BA,
+ 0xB8BCB6B7, 0xBCBBBFBA, 0xC1BCBDC1, 0xBDC1BCBB,
+ 0xBCBDC1BC, 0xC3BFBFC0, 0xBDC1BCC2, 0xBAC0C4BF,
+ 0xBFBAB9BF, 0xB9BFBAB9, 0xB9B9C0B9, 0xC0B9B9C0,
+ 0xBAC1BAB9, 0xBAB8BFB8, 0xC0B9BAC1, 0xB9C0B9B9,
+ 0xB6B5B9B3, 0xC0B5BABF, 0xBFC3B8BC, 0x71A9ADA2,
+ 0x7C71787C, 0x787C7178, 0x70757B70, 0x7B72757B,
+ 0x74797076, 0x71767B72, 0x7C727178, 0x71796F74,
+ 0x70777A71, 0x79707679, 0x777A7176, 0x72787B72,
+ 0x786F787B, 0x7A7C7675, 0x2C807F7B, 0x07072F2D,
+ 0x07040609, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00010000, 0x7A585955, 0x807A8080,
+ 0x7F807780, 0x7880807A, 0x81788081, 0x82837A80,
+ 0x7B83847B, 0x847B8384, 0x85867D83, 0x7B85867D,
+ 0x867D8384, 0x83847B85, 0x7D84857B, 0x857B8687,
+ 0x88897F84, 0x7E888980, 0x847B8687, 0x84857C83,
+ 0x80888980, 0x897F8889, 0x80817788, 0x717A7B71,
+ 0x847A7A7B, 0x83847A83, 0x80888980, 0x89808889,
+ 0x83847B88, 0x7D83847B, 0x867D8586, 0x88898085,
+ 0x7683807B, 0x7F76807E, 0x7A7B717E, 0x73797C73,
+ 0x786F7B7C, 0x7A787077, 0x6C76736E, 0x736E7471,
+ 0x73706B76, 0x57686960, 0x59506061, 0x50514858,
+ 0x4A525048, 0x625E524F, 0x76757163, 0x91858781,
+ 0xA59F9597, 0xB2B4AEA3, 0xB0B6B9B0, 0xC2B8B6B9,
+ 0xB9C1B7BA, 0xBCBDC1BC, 0xC1BCBDC1, 0xBDC1BCBD,
+ 0xB9BAC0BB, 0xBEB9B8BE, 0xB8BCB7BA, 0xBBB8BDBB,
+ 0xBFBDBABD, 0xBCBFBDBC, 0xBDBCBFBD, 0xBEBEBABF,
+ 0xBBC0BFBC, 0xBFBAC0BF, 0xBEC2BAC0, 0xBDBCC6BB,
+ 0xB1B2A9BD, 0x99B5A699, 0xA898B7A8, 0xB6A697B6,
+ 0x97B7A498, 0xA396B6A4, 0xB6A294B6, 0x94B6A294,
+ 0xA294B6A4, 0xB6A294B6, 0x94B8A294, 0xA193B7A0,
+ 0xB7A595B7, 0x97B9A595, 0xA797B9A7, 0xB7A595B7,
+ 0x97B9A595, 0xA595B7A8, 0xB6A496B8, 0x96B7A294,
+ 0xA897B8A7, 0xB8A897B8, 0x99B8A897, 0xAA9BBAA8,
+ 0xBCAA9BBA, 0xA1BCAA9E, 0xACA6BFA8, 0xBDACA7BC,
+ 0xADBCB2AC, 0xB6B5BFB2, 0xC2BABEC3, 0xC0C0B8BF,
+ 0xB8C0C0B6, 0xBFB7BDBC, 0xBFC0BAC0, 0xB7BFBFBA,
+ 0xC0B5BDBD, 0xC0C0B8C0, 0xB7BFBFB8, 0xC3B8C0C0,
+ 0xB3BFBABE, 0xA6A3B3B3, 0xB5A59BB2, 0x98B7A799,
+ 0xA999B8A7, 0xB7A594B6, 0x95B8A695, 0xA793B6A9,
+ 0xB7A998BA, 0x94B9A695, 0xA898BAA6, 0xB9A899B9,
+ 0x98B9A899, 0xA596B6A9, 0xB8A494B6, 0x95BAA496,
+ 0xA898BAA6, 0xB8A897B8, 0x97B9A897, 0xA393B5A7,
+ 0xBBA596B6, 0x99B8AA9B, 0xA899B8A9, 0xBAA69AB8,
+ 0x9AB8A69C, 0xA69AB6A6, 0xB9A89DB7, 0x9DB7AA9F,
+ 0xABA1B8AA, 0xB9A6A2B5, 0xBEC3ABAB, 0xBABFC0BA,
+ 0xBFBABFBE, 0xBFBDBDBF, 0xBCBFBDBC, 0xB6B8BEB9,
+ 0xBAB8B5BB, 0xB7BAB8B5, 0xB7B6B9B7, 0xB9B5B8BC,
+ 0xB9BAB6B8, 0xB7B5B9B4, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB8B9BCBA, 0xC0BBB9BD, 0xB9BDB8BC, 0xBABEC2BD,
+ 0xC5C0B9BF, 0xBBC2BBBF, 0x9BB0B8B1, 0x8B869BA2,
+ 0x71726E87, 0x3F61605C, 0x44404545, 0x54514C47,
+ 0x5A585852, 0x69636060, 0x68686269, 0x63676A61,
+ 0x6C66696C, 0x6C6C666A, 0x6C70706A, 0x716D7471,
+ 0x77746F74, 0x6871716B, 0x756D7071, 0x7A787077,
+ 0x73797973, 0x79737979, 0x74756C79, 0x71787970,
+ 0x7A75797A, 0x7B79717D, 0x7477756D, 0x7A757E7C,
+ 0x827F7A7D, 0x747D7E75, 0x7C737D7E, 0x7B7B757B,
+ 0x7A7C7B77, 0x7D797F7E, 0x7E7D797E, 0x707C7B77,
+ 0x70677676, 0x6869606F, 0x63666862, 0x635F6667,
+ 0x69686464, 0x7873726E, 0x7C787D7C, 0x7A77737F,
+ 0x787C7975, 0x7B7A7D7C, 0x74736F7D, 0x6F77746F,
+ 0x75717774, 0x1A181778, 0x00010101, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x26242302,
+ 0x4F565551, 0x5F575754, 0x76746A62, 0x707A7870,
+ 0x746A7879, 0x76756B75, 0x6F787970, 0x736B7778,
+ 0x716F6775, 0x5B707168, 0x514D6161, 0x47444054,
+ 0x001A1817, 0x00000001, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x282B2900, 0x43383B39, 0x534F4448, 0x61615B52,
+ 0x6267655D, 0x695F6E6C, 0x6E6C626B, 0x526E6C61,
+ 0x4F475F5D, 0x40413851, 0x20383930, 0x01002426,
+ 0x00010000, 0x00000100, 0x00000001, 0x00010000,
+ 0x9F303331, 0xA49EA0A4, 0x9EA69CA0, 0x9599A197,
+ 0xA49B98A0, 0x9EA29C9F, 0x9E9DA49D, 0xA39E9DA3,
+ 0xA6ACA79D, 0xB8A6ACA7, 0xC1BFB5BA, 0xC0C1BFC0,
+ 0xBFBCBDBB, 0xBFBDBEC1, 0xBCBFBDBE, 0xBCBBBFBA,
+ 0xC1BCBDC1, 0xBBC1BCBB, 0xC0BAC0BF, 0xC0C0B8C0,
+ 0xB8C0BFB8, 0xBDB9C0BD, 0xC0BFBABF, 0xBBC0BFBB,
+ 0xB9B9C0BD, 0xBBB9B7BE, 0xB7BCBAB6, 0xBEB7BEBB,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEBAC0BF, 0xBDBCB9BF,
+ 0xB8BDBCB7, 0xBCB8BDBC, 0xBEBFB8BD, 0xB9BFBEB9,
+ 0xBAB6BBBA, 0xBFBDB7BC, 0xB8BDBBBA, 0xBEC0C4BF,
+ 0x8282BFC3, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000000, 0x07080409, 0x05070805,
+ 0xAAABA906, 0xB6BBBEBC, 0xBCB5B5BB, 0xB5BCB5B5,
+ 0xB5B5BCB5, 0xBCB5B5BC, 0xB5BCB5B5, 0xB7B4BBB4,
+ 0xBCB7B7BE, 0xB7BBB5B8, 0xB3B7BBB5, 0xBAB4B5BD,
+ 0xB7BBB5B6, 0xBAB8BCB7, 0xBFBABBBF, 0xB9BFBAB9,
+ 0xBCBBBFBA, 0xBEBABDC1, 0xBCC0BBBD, 0xB4BBBFBA,
+ 0xB9B4B3B9, 0xB0B4AFB5, 0xAEB2B9B2, 0xB5AEAEB5,
+ 0xAEB5AEAE, 0xB1AFB6AF, 0xB9B4B1B8, 0xB1B7B2B3,
+ 0xB4B5B9B3, 0xBFB6B6BA, 0xBEC3BABA, 0xA2C0C5BC,
+ 0x7C71A7AD, 0x787C7178, 0x71777B70, 0x7B70787C,
+ 0x777B7077, 0x72767B72, 0x7C72767B, 0x757A7174,
+ 0x71777A71, 0x796F797A, 0x7A7B7178, 0x72797C73,
+ 0x7970787B, 0x76797076, 0x7B81817B, 0x5554807F,
+ 0x09070757, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x00000000, 0x11121000, 0x7A646561, 0x81787E80,
+ 0x81827980, 0x78818279, 0x857C8081, 0x85867D84,
+ 0x7D85867D, 0x8A818586, 0x85867D89, 0x7E85867D,
+ 0x89808687, 0x83847B88, 0x7D86877D, 0x8A808687,
+ 0x86877D89, 0x7A85867D, 0x847B8283, 0x83847B83,
+ 0x7783847B, 0x867C7F80, 0x87887E85, 0x707E7F75,
+ 0x857B797A, 0x88897F84, 0x80898A81, 0x857C8889,
+ 0x83847B84, 0x7D85867D, 0x847B8586, 0x83847B83,
+ 0x7D83807B, 0x82788785, 0x81827881, 0x737C7D74,
+ 0x7C737B7C, 0x7A78707B, 0x7276736E, 0x736F7A77,
+ 0x6F6C6776, 0x58686960, 0x59506061, 0x50514858,
+ 0x4A535149, 0x625E5050, 0x73747063, 0x91969892,
+ 0xA39F9597, 0xB3B5AFA2, 0xB0B8B9B0, 0xC1B7B7BB,
+ 0xB9C0B9B9, 0xBABDC1BC, 0xBDB8BBBF, 0xB8BCB7B9,
+ 0xB7B7BBB6, 0xC0BBB8BC, 0xBCC0BBBC, 0xBDBBC0BE,
+ 0xC0BEBABF, 0xBCBFBDBD, 0xBCBABFBD, 0xC0BFB9BE,
+ 0xBABFBEBB, 0xC2B8C0BF, 0xBDC5B8BF, 0xAEABBBBB,
+ 0xB7A59AB4, 0x97B8A898, 0xA897B8A8, 0xB7A798B8,
+ 0x99B9A798, 0xA396B6A6, 0xB8A297B8, 0x96B8A297,
+ 0xA294B6A4, 0xB8A395B7, 0x97B8A297, 0xA095B6A2,
+ 0xB5A494B6, 0x94B6A393, 0xA594B6A5, 0xB9A595B7,
+ 0x97B9A797, 0xA595B7A8, 0xB7A496B8, 0x96B7A595,
+ 0xA897B8A7, 0xB7A897B8, 0x97B6A796, 0xAA9BBAA6,
+ 0xBBAB9CBC, 0x9DBBA89B, 0xA8A1BCA7, 0xBBAFA8BD,
+ 0xA6BAAEA8, 0xB2ADBCAF, 0xC3B5B6C0, 0xBFC2B8BE,
+ 0xB8C0C0B8, 0xBFB6BEBE, 0xBFC0BAC0, 0xB8C0C0BA,
+ 0xC0B9C1C1, 0xC0BFB6C0, 0xB9C1C1B8, 0xBEBABEC3,
+ 0xA3B3B2B4, 0xA8A0B7A4, 0xB7A799B5, 0x98B7A898,
+ 0xA897B8A8, 0xBAA796B8, 0x97BCA998, 0xA795BAA9,
+ 0xB7A695B7, 0x97BCA695, 0xA997BCA9, 0xB8AC9CBE,
+ 0x98B9A798, 0xA695B7A9, 0xB9A797B9, 0x97BBA597,
+ 0xA797B9A5, 0xB8A797B9, 0x93B8A897, 0xA595B7A4,
+ 0xB9A797B9, 0x99B8A899, 0xA798B7A9, 0xB7A699B9,
+ 0x97B7A297, 0xA89CBAA4, 0xB7A99BB7, 0x9DB7AA9D,
+ 0xAA9FB9AA, 0xB5A89FB9, 0xB4BEA6A2, 0xBBBEC2B3,
+ 0xBCBDBFC0, 0xBDBBBBBE, 0xBCC0BBBA, 0xB6B8BFB8,
+ 0xB9B7B6BD, 0xBABDBBB6, 0xB9BABEB9, 0xBAB6BABE,
+ 0xB9BAB6B9, 0xB4B5B9B4, 0xB9B4B5B9, 0xB5B9B4B5,
+ 0xB9B6B9B7, 0xBDB8B8BB, 0xB8BCB7B9, 0xB7B8BCB7,
+ 0xBFBAB8BC, 0xBBC1BCB9, 0xB1AFB7B0, 0x8B86B0B8,
+ 0x70746F85, 0x4D5E5F5B, 0x44405251, 0x47443F47,
+ 0x58505148, 0x67616061, 0x68686267, 0x63696C63,
+ 0x6A66696C, 0x6A6B6769, 0x6C70706A, 0x726E7272,
+ 0x72726C73, 0x6B74746E, 0x756D7374, 0x7A787077,
+ 0x767C7C76, 0x79737C7C, 0x78797079, 0x70787970,
+ 0x7B767879, 0x7D7A757E, 0x747E7C74, 0x78737E7C,
+ 0x7B79717B, 0x747D7E75, 0x81787D7E, 0x7D7E7580,
+ 0x777C7C76, 0x807B7C7B, 0x7D7A7583, 0x697E7D79,
+ 0x68626F6F, 0x68696068, 0x5E62645E, 0x68646264,
+ 0x6A6B6767, 0x7972716D, 0x77737E7D, 0x7A77737A,
+ 0x757C7975, 0x78777A79, 0x7876757A, 0x70777470,
+ 0x736F7873, 0x19171676, 0x00020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x27232204,
+ 0x4F575450, 0x68615854, 0x76746A6E, 0x6B7A7870,
+ 0x746A7374, 0x75746A75, 0x6F74756B, 0x746A7879,
+ 0x71706675, 0x5A707168, 0x524D6263, 0x46433F55,
+ 0x16484743, 0x01001718, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x282B2900, 0x43383C37, 0x534F4647, 0x60605A54,
+ 0x6167665C, 0x685F6C6B, 0x716D626D, 0x526E6C61,
+ 0x4E465F5D, 0x42403850, 0x20383930, 0x01002626,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0xA2303331, 0xA49FA1A4, 0x9EA59EA0, 0x9C9CA49A,
+ 0xA49B9FA7, 0x9BA0979F, 0x9E9DA49D, 0xA39E9DA3,
+ 0xA8ACA79F, 0xB1A8ABA9, 0xC0C0B0B3, 0xC0C0C0C0,
+ 0xBDBEBFBD, 0xBFBDBEBF, 0xC0C1BFBE, 0xBCBDC1BC,
+ 0xC2BBBDC1, 0xB8BEB9BB, 0xBFB9BFBE, 0xC0C0B7BF,
+ 0xB8C0BFB8, 0xBDB9C0BD, 0xBFBEBABF, 0xBABFBEBA,
+ 0xBBBAC1BE, 0xBDB8B7BE, 0xB8BDBBB7, 0xBFB9BFBE,
+ 0xBFBEBAC0, 0xBAC0BFB9, 0xBDB9C0BD, 0xC1C0B9C0,
+ 0xB8BDBCBC, 0xBCBCBEBE, 0xBDBCB8BD, 0xBAC0BFB7,
+ 0xBCB6BBB9, 0xBFBDB9BE, 0xBABFBDBA, 0xC0C0C4BF,
+ 0x8282C1C5, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xAAABA906, 0xB6BEC1BF, 0xBBB6B7BB, 0xB5BBB6B5,
+ 0xB6B8BCB7, 0xBBB5B7BB, 0xB8BCB6B7, 0xB6B7BBB5,
+ 0xBBB6B8BC, 0xB5BCB5B5, 0xB3B5BCB5, 0xBCB5B4BD,
+ 0xB5BCB5B5, 0xB8B6BCB7, 0xBCB7B7BD, 0xB8BCB7B8,
+ 0xB7B6BCB7, 0xBCB7B6BC, 0xB8BCB7B8, 0xB3B5B9B4,
+ 0xB3AFB4B8, 0xAFB3AEB2, 0xAFAFB5B0, 0xB4AFAEB4,
+ 0xB0B4AFB0, 0xAFAEB4AF, 0xB3AEAEB4, 0xB0B4AFAD,
+ 0xAEB0B4AE, 0xB5AFB0B4, 0xB6BAB4B1, 0xBEBFC3BD,
+ 0x958CC0C4, 0x7A7B7192, 0x68707469, 0x74687074,
+ 0x777B6F70, 0x74767C71, 0x7D74767E, 0x767B7278,
+ 0x6F797D72, 0x7B72767A, 0x7A7D7478, 0x737A7C76,
+ 0x7A717779, 0x787B7277, 0x7B808178, 0x7F7B8181,
+ 0x58575380, 0x001E1E1E, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x24222102, 0x7981807C, 0x81787F7F,
+ 0x80817880, 0x77808177, 0x877D8081, 0x87887E86,
+ 0x7B808178, 0x887F8384, 0x86877E87, 0x8185867D,
+ 0x867D898A, 0x85867D85, 0x8185867D, 0x857C898A,
+ 0x84857C84, 0x7E85867D, 0x867D8687, 0x88898085,
+ 0x7D888980, 0x867D8586, 0x88898085, 0x7683847B,
+ 0x7F767E7F, 0x83847B7E, 0x7B888980, 0x81788384,
+ 0x85867D80, 0x8083847B, 0x847B8889, 0x83847B83,
+ 0x7D87847F, 0x7E748785, 0x7E7F757F, 0x76808178,
+ 0x7B757E7F, 0x7878727B, 0x70797A71, 0x716B7879,
+ 0x6D6D6771, 0x5060605A, 0x51485859, 0x50514850,
+ 0x4A505148, 0x625E5050, 0x88898563, 0x9F959791,
+ 0xB4AFA1A5, 0xB0B4AEB0, 0xB2B8BBB2, 0xBBB4B8BB,
+ 0xB4BBB4B4, 0xB7B6BCB7, 0xBFBAB8BC, 0xBBBFBABB,
+ 0xBBBCBFBD, 0xBDBBBABD, 0xB9BCBABA, 0xBBB8BDBB,
+ 0xBEBCB8BD, 0xBABDBBBB, 0xBBBABFBD, 0xBDBCB8BD,
+ 0xB8BEBDB8, 0xC3BABFC0, 0xB2C1BABE, 0xA8A1B6B5,
+ 0xB8A799B5, 0x97B9A897, 0xA897B8A8, 0xB7A697B7,
+ 0x97B7A497, 0xA497B7A4, 0xB8A496B8, 0x97B7A496,
+ 0xA497B7A6, 0xB7A598B8, 0x98B8A497, 0xA497B7A5,
+ 0xB6A798B8, 0x94B6A695, 0xA393B5A4, 0xB6A393B5,
+ 0x94B9A494, 0xA594B9A5, 0xB8A496B8, 0x98B8A496,
+ 0xA697B7A7, 0xB8A798B8, 0x96B7A798, 0xA897B8A7,
+ 0xBCA897B8, 0x9CBCAB9C, 0xA89EBCA9, 0xB7A99EB8,
+ 0xA7BCAAA0, 0xB2ACBDAE, 0xBEB1B1BD, 0xBFC4B3B6,
+ 0xB8C0C0B9, 0xBFB9C1C1, 0xBFC0B7BF, 0xB7BFBFBA,
+ 0xC0B8C0C0, 0xC0BFB6C0, 0xBBC0C3B8, 0xB2B3B4BE,
+ 0xA1B6A3A2, 0xA89FB9A6, 0xBAAA9EBA, 0x99B8AA9B,
+ 0xA895B6AB, 0xBCA595B7, 0x97BCA897, 0xA897BCA8,
+ 0xBAA594B9, 0x97BCA695, 0xA998BDA8, 0xBAAE9EC0,
+ 0x96B8A898, 0xA593B8A7, 0xBBA796BB, 0x97BBA597,
+ 0xA597B9A5, 0xB6A797B9, 0x92B7A596, 0xA897B9A4,
+ 0xB8A595B7, 0x97B8A798, 0xA798B8A8, 0xB5A395B7,
+ 0x99BBA193, 0xA798B8A9, 0xB7A899B5, 0x9DB9A99B,
+ 0xA79BB7AB, 0xB6A89FB9, 0xA3B3A6A1, 0xB5B4BDA6,
+ 0xB9B9BBBC, 0xBFBAB8BB, 0xB6BDB6BB, 0xB5B5BCB5,
+ 0xBEBCB5BC, 0xBBBEBCBB, 0xBBBABDBB, 0xBCBAB8BD,
+ 0xBABEB9B9, 0xB6BABBB7, 0xBDB8B8BC, 0xB7BDB8B9,
+ 0xB7B6B9B7, 0xBBB9B6B9, 0xB9BCBAB8, 0xB7BBBFBA,
+ 0xBBB6B8BC, 0xB9BFBAB5, 0xB2AFB6B1, 0xA29BB0B7,
+ 0x858C859A, 0x5B5E5F5B, 0x4340625F, 0x48443F48,
+ 0x4F525048, 0x62595859, 0x68696061, 0x5F696A61,
+ 0x6B676768, 0x6B6A666C, 0x666A6C66, 0x6E6A6A6C,
+ 0x6F716B6D, 0x6D71736D, 0x79707376, 0x78797078,
+ 0x6D797973, 0x79737373, 0x7A7A7479, 0x7177786F,
+ 0x7873797A, 0x7D7A757B, 0x707F7D75, 0x746F7A78,
+ 0x7B797178, 0x747B7C73, 0x7C737D7E, 0x7D7E757B,
+ 0x787E7E78, 0x7F7B7E7E, 0x7F7C7882, 0x68777470,
+ 0x6862706D, 0x68696068, 0x666D6D67, 0x6B676A6C,
+ 0x6468636A, 0x7A6B6C6A, 0x76757B7C, 0x7F7B7A78,
+ 0x737A7975, 0x76757877, 0x78767578, 0x6F777470,
+ 0x74707772, 0x39383477, 0x00020000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x27232204,
+ 0x4D585350, 0x69605855, 0x76746A6E, 0x6A75746A,
+ 0x746A7374, 0x6D6D6175, 0x696D6D61, 0x75697575,
+ 0x75756975, 0x68707167, 0x605B7071, 0x55524D63,
+ 0x434A4742, 0x18164949, 0x00010017, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000000, 0x01000000,
+ 0x2A2B2900, 0x433A3B37, 0x544E4647, 0x60615854,
+ 0x5E67675B, 0x695E6A6A, 0x6C685D6D, 0x536D6B60,
+ 0x4E46605E, 0x423F3A50, 0x20383832, 0x01002626,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x9F323331, 0xA49FA0A4, 0xA0A49EA0, 0x9C9EA39A,
+ 0xA9A0A0A5, 0xA3A69DA6, 0x9D99A099, 0xA8A39DA4,
+ 0xA8ACA7A4, 0xB1A8ACA7, 0xC0C0B2B3, 0xB9B9B9C0,
+ 0xB7B9BAB8, 0xBBB9B8BC, 0xB9BCBAB8, 0xB6B8BCB7,
+ 0xBCB6B8BC, 0xB6BCB7B8, 0xBCB8BFBC, 0xBFBFB5BD,
+ 0xB8C0BFB7, 0xBDB9C0BD, 0xBFBEBABF, 0xBABFBEBA,
+ 0xBCB8BEBD, 0xBDBBB7BD, 0xB8BDBBB8, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB8BDBB, 0xBDBCB9BE,
+ 0xB8BDBCB8, 0xBDB8BDBB, 0xBEBBBABF, 0xB7BEBBB7,
+ 0xBBBABFBD, 0xBDBBB8BD, 0xBABFBDB8, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xAAABA906, 0xB6BEC1BF, 0xBAB5B7BB, 0xB5BBB6B4,
+ 0xB7B8BCB7, 0xBBB5B8BC, 0xB8BCB6B7, 0xB5B8BCB6,
+ 0xBCB7B7BB, 0xB6BCB7B6, 0xB5B6BDB6, 0xBDB6B4BC,
+ 0xB4BAB5B6, 0xB7B6BCB7, 0xBCB7B6BC, 0xB6BCB7B6,
+ 0xB7B6BCB7, 0xBCB7B6BC, 0xB8BCB7B8, 0xB4B5B9B4,
+ 0xB2AEB5B9, 0xB0B4AFB1, 0xB4B4B8B3, 0xB3B1B3B9,
+ 0xB0B4AFB0, 0xB0ADB3AE, 0xB4AFAFB5, 0xB4B8B3B0,
+ 0xB3B7B9B3, 0xBAB3B5B9, 0xB2B9B2B3, 0xC0C0C4BF,
+ 0xABA5C1C5, 0x90938AA9, 0x69878B80, 0x74687074,
+ 0x757C6F70, 0x74787E73, 0x7D74767E, 0x767B7278,
+ 0x75787B72, 0x7D747B7E, 0x787A747A, 0x75787A74,
+ 0x7A74777B, 0x787B7278, 0x7A7E807A, 0x807A8080,
+ 0x7F7E7A80, 0x005A5B59, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x35343002, 0x6D807F7B, 0x807A7373,
+ 0x80817880, 0x7783847B, 0x81778081, 0x83847A80,
+ 0x7C85867D, 0x877E8485, 0x84857C86, 0x7D898A81,
+ 0x867D8586, 0x88898085, 0x7C87887F, 0x857C8485,
+ 0x86877E84, 0x7C85867D, 0x847B8485, 0x83847B83,
+ 0x7B83847B, 0x847B8384, 0x83847B83, 0x7B82837A,
+ 0x847B8384, 0x83847B83, 0x7B82837A, 0x81788384,
+ 0x83847B80, 0x7C85867D, 0x81788485, 0x83847B80,
+ 0x79838179, 0x7F758381, 0x81807680, 0x737C7D74,
+ 0x7C737B7C, 0x797C7379, 0x6B787970, 0x716B7374,
+ 0x71716B71, 0x50686862, 0x504A5859, 0x50514850,
+ 0x5C4F4F49, 0x74706062, 0x88898573, 0x9F969892,
+ 0xB5AFA1A5, 0xAFB3ADB1, 0xB1B6BBB2, 0xC0B9B5BA,
+ 0xB9C0B9B9, 0xBAB9BFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBBBEBFBB, 0xBDBBBABD, 0xBABDBBBA, 0xBCBABFBD,
+ 0xBFBDB9BE, 0xBBBEBCBC, 0xBDBABFBD, 0xBFBEBABF,
+ 0xBAC0BFB9, 0xC3BABEBF, 0xAAB9BBBE, 0xAAA0B7AF,
+ 0xB7A89AB6, 0x97B8A898, 0xA899B9A8, 0xB8A596B6,
+ 0x97B7A598, 0xA497B7A4, 0xB8A496B8, 0x96B8A496,
+ 0xA598B8A4, 0xB7A497B7, 0x98B8A497, 0xA697B7A5,
+ 0xB8A697B7, 0x97B9A798, 0xA595B7A7, 0xB6A494B6,
+ 0x93B8A494, 0xA392B7A4, 0xB6A395B7, 0x95B7A294,
+ 0xA497B7A3, 0xB8A697B7, 0x97B8A798, 0xA897B8A8,
+ 0xB8A897B8, 0x9CBCA897, 0xA99DBBAB, 0xBAAA9EBA,
+ 0xA6BDABA0, 0xB2ABC0B0, 0xBCB3B0C0, 0xBBC0B0B0,
+ 0xB8BFC2B7, 0xC1B7BFBF, 0xBEBFB9C1, 0xB7BFBFB9,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xB8BBC0BA, 0xB7A4A4B2,
+ 0x9FB9A7A2, 0xA79EB9A8, 0xB8A89CB8, 0x97B8A899,
+ 0xA695B7A8, 0xBCA897BC, 0x98BDA698, 0xA897BCA9,
+ 0xBCA594B9, 0x96BBA897, 0xA897BCA7, 0xB7A898BA,
+ 0x95B7A595, 0xA695B7A6, 0xBBA597BB, 0x97BBA597,
+ 0xA597B9A5, 0xB4A596B6, 0x95B7A394, 0xA797B9A5,
+ 0xB6A798B8, 0x98B8A596, 0xA899B9A7, 0xB9A494B6,
+ 0x95B7A597, 0xA899B9A5, 0xB7A798B7, 0x98B6A798,
+ 0xA599B7A4, 0xB8A89FBA, 0xA1B4A9A1, 0xB5B3BFA5,
+ 0xB9B8B9BD, 0xBBB9B8BB, 0xB5BBB6B6, 0xB6B5BBB6,
+ 0xBDBBB5BB, 0xBABDBBBA, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xBABDBBBA, 0xB7B8BCB7, 0xBCB7B8BC, 0xB6BCB7B8,
+ 0xB9B8BBB9, 0xBDBBB8BB, 0xB9BCBABA, 0xBABDC1BC,
+ 0xBFBABBBF, 0xB9BFBAB9, 0xB1B0B7B2, 0xA29BAFB6,
+ 0x858C859B, 0x5B6A6B67, 0x504C605F, 0x48454053,
+ 0x50525048, 0x61585859, 0x68696060, 0x63686960,
+ 0x6B656969, 0x6B6B656B, 0x656D6D67, 0x706C696B,
+ 0x6F716B71, 0x68707168, 0x756C7071, 0x797A7174,
+ 0x73797973, 0x79737979, 0x7B7B7579, 0x70797A71,
+ 0x78737879, 0x7D7A757B, 0x717D7B73, 0x78737B79,
+ 0x7E7C747B, 0x717D7E75, 0x7C737A7B, 0x7B7C737B,
+ 0x797E7E78, 0x7F7B7F7F, 0x7C797582, 0x71787571,
+ 0x6F697875, 0x6E6F666F, 0x6B70706A, 0x6B67706F,
+ 0x6468636A, 0x74686B69, 0x7B7A7576, 0x7A76757F,
+ 0x767D7A76, 0x7B7A7B7A, 0x7A78777D, 0x71777470,
+ 0x74707875, 0x38373377, 0x00000100, 0x00000102,
+ 0x00000000, 0x00000000, 0x00000000, 0x27232202,
+ 0x5A615C59, 0x6960635F, 0x79746B6E, 0x6B7A796F,
+ 0x71677675, 0x6D6D6172, 0x6A6E6C61, 0x796E7775,
+ 0x7575697B, 0x67707167, 0x61597071, 0x63615963,
+ 0x414A4840, 0x47434946, 0x02000048, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000000, 0x01000000,
+ 0x2A2B2900, 0x423A3B37, 0x544E4648, 0x60615854,
+ 0x5E66665A, 0x695E6A6A, 0x716D626D, 0x536E6C61,
+ 0x4E465F5D, 0x423F3A51, 0x213A3732, 0x01002625,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x9F32332F, 0xA49FA2A3, 0xA0A49EA0, 0x9CA1A59F,
+ 0xA9A0A0A5, 0xA6A9A0A6, 0x9A9FA39D, 0xA8A39CA0,
+ 0xA8ACA7A4, 0xAEABACA8, 0xC1BFB1B2, 0xBEC1BFC0,
+ 0xBCBCC0BB, 0xBDBBBDC1, 0xBCBFBDBA, 0xBBBBBFBA,
+ 0xC1BBBDC1, 0xBBC1BCBD, 0xBEBBC0BE, 0xC0BFB9BF,
+ 0xBBC1C0B8, 0xBDBABFBD, 0xC0BEBABF, 0xBABFBEBB,
+ 0xBDBBC0BF, 0xBDBBB8BE, 0xB9BEBCB8, 0xBDBABFBE,
+ 0xBDBCB8BE, 0xB8BEBDB7, 0xBABABFBD, 0xC0BFB7BC,
+ 0xBABFBEBB, 0xBDB9BEBC, 0xC0BDBABF, 0xB5BCB9B9,
+ 0xBDB8BDBB, 0xBFBDBABF, 0xBABFBDBA, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA9AAA806, 0xB8BDC0BE, 0xBBB6B9BD, 0xB6BCB7B5,
+ 0xB6B6BCB7, 0xBCB7B5BB, 0xB8BCB7B8, 0xB7B8BCB7,
+ 0xBBB9B8BC, 0xB8BCB7B8, 0xB7B8BCB7, 0xBCB7B6BC,
+ 0xB6BBB9B8, 0xB8B5BAB8, 0xB9B6B4BB, 0xB4B9B7B2,
+ 0xB1B4BAB5, 0xB9B4B2B6, 0xB3B9B4B3, 0xB4B6BAB5,
+ 0xB4AFB5B9, 0xB3B7B2B0, 0xB2B3B7B2, 0xB8B4B3B7,
+ 0xB4B8B3B7, 0xB1B4BAB5, 0xBAB3B1B8, 0xB3BAB3B3,
+ 0xB4B5B9B3, 0xBAB3B6BA, 0xB2BAB3B3, 0xB7ADB3AE,
+ 0xBCB6B8BC, 0x9EA09ABA, 0x8BA7AAA1, 0x7E758F94,
+ 0x787D7479, 0x76787C76, 0x7C76787C, 0x797B757A,
+ 0x75787C76, 0x7C76777B, 0x787C7778, 0x70717570,
+ 0x76716F75, 0x71756F72, 0x76787C77, 0x7C78797A,
+ 0x4344407B, 0x00262725, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000001,
+ 0x00000000, 0x51504C02, 0x78807F7B, 0x7C787D7C,
+ 0x81817B7D, 0x7883847B, 0x837A8081, 0x85867D82,
+ 0x7D87887F, 0x867D8586, 0x85867D85, 0x7D85867D,
+ 0x867D8586, 0x88898085, 0x7D85867D, 0x867D8586,
+ 0x82837A85, 0x8185867D, 0x8980898A, 0x83847B88,
+ 0x78808178, 0x847B8081, 0x83847B83, 0x7A83847B,
+ 0x847B8283, 0x84857C83, 0x80898A81, 0x89808889,
+ 0x83847B88, 0x7B808178, 0x81788384, 0x82837A80,
+ 0x76828078, 0x7E76807E, 0x807E7680, 0x76808178,
+ 0x79707E7F, 0x78797078, 0x6D797A71, 0x736A7373,
+ 0x6D6E6572, 0x53616259, 0x534E5B5C, 0x4F4C4756,
+ 0x6B5A5B57, 0x837F6F71, 0x96989282, 0xA99A9C96,
+ 0xBCB1AFB2, 0xB6BCB1B8, 0xB8BABFB6, 0xBFB8B8BF,
+ 0xB9C0B9B8, 0xB9BABEB9, 0xC0BBBABE, 0xB8BEB9BC,
+ 0xBABCC0BB, 0xBEB9BBBF, 0xB9BFBABA, 0xB9B9BFBA,
+ 0xBFBAB8BE, 0xBBBFBABB, 0xB8BCC0BB, 0xBDBAB7BD,
+ 0xB7BCBAB6, 0xB7B8BABA, 0xACB9B4B3, 0xAFA4B8B5,
+ 0xB8AB9EB6, 0x98B7AB9E, 0xA798B8A8, 0xB9A697B7,
+ 0x97B7A597, 0xA598B8A4, 0xBCA499BA, 0x97BBA498,
+ 0xA799BBA3, 0xBAA597B9, 0x96BBA898, 0xA797B9A7,
+ 0xB7A696B8, 0x98B8A697, 0xA597B9A7, 0xBAA698BA,
+ 0x94B9A695, 0xA594B9A6, 0xB39E90B2, 0x97B99D92,
+ 0xA898BAA5, 0xB6A598B8, 0x98B8A396, 0xA897B8A7,
+ 0xB7A797B6, 0x97B8A898, 0xA798B7A8, 0xB8AA9CB8,
+ 0xA0BAA89C, 0xAEA6BDAB, 0xBBABA5B8, 0xB5BDAFAC,
+ 0xB9BEC1B2, 0xC0B8C0C0, 0xBFC2B8C0, 0xB8C0C0BA,
+ 0xC0B9C1C1, 0xBDC2B8C0, 0xADADB9B9, 0xBBA5A3B7,
+ 0x9DBBA8A2, 0xA69AB8A9, 0xB8A69AB8, 0x96B6A598,
+ 0xA494B6A5, 0xBCA698BC, 0x97BDA596, 0xA496BAA6,
+ 0xB9A294B8, 0x97BCA597, 0xA796BBA8, 0xB5A597B9,
+ 0x96B6A495, 0xA596B6A5, 0xB9A496B8, 0x97B9A597,
+ 0xA696B8A5, 0xB5A394B4, 0x97B9A495, 0xA597B9A7,
+ 0xB6A396B6, 0x96B8A396, 0xA494B6A4, 0xB8A595B7,
+ 0x97B7A696, 0xA497B7A4, 0xB6A496B8, 0x99B9A294,
+ 0xA89CBAA6, 0xB5A89CB8, 0xA6B9A69E, 0xB1B1BDAA,
+ 0xBCB5B8BC, 0xBBBCB7BB, 0xB9BEBDB9, 0xB9B3B8B7,
+ 0xBDBDB6BB, 0xBCBEBEBB, 0xBCBABFBD, 0xBDBBB9BE,
+ 0xB8BDBBB8, 0xBAB7BCBA, 0xBCBAB9BC, 0xB8BBB9B9,
+ 0xB8B8BCB7, 0xBBB9B9BD, 0xB6BBB9B6, 0xB9BABEB9,
+ 0xBEB9BABE, 0xBABEB9BA, 0xB7B6BCB7, 0xAFAAB6BC,
+ 0x90948FAB, 0x5D777973, 0x4B476163, 0x4C4B474A,
+ 0x4C4D4D47, 0x61585654, 0x60615860, 0x62676761,
+ 0x68626868, 0x68696068, 0x696C6D64, 0x6B667172,
+ 0x72726C6E, 0x6C76746C, 0x746F7674, 0x79797377,
+ 0x73797874, 0x77737677, 0x7C7C7678, 0x6C76746C,
+ 0x746C7674, 0x7B797176, 0x757E7F76, 0x7E757D7E,
+ 0x7B7C737D, 0x797C7D74, 0x807B8182, 0x7E7B7683,
+ 0x7B7E7B76, 0x817C8380, 0x83807B85, 0x717E7B77,
+ 0x706A7675, 0x77777170, 0x6D706F6B, 0x69677271,
+ 0x67686668, 0x736A6B67, 0x7C787677, 0x7F7C787F,
+ 0x777A7773, 0x7C787C7B, 0x7B7A767D, 0x70757470,
+ 0x756F7574, 0x69696375, 0x00141511, 0x00000001,
+ 0x00000000, 0x01000000, 0x01000101, 0x2A282700,
+ 0x575F5C58, 0x7069605C, 0x7E797076, 0x6E807B72,
+ 0x70667A78, 0x7071676F, 0x6C727266, 0x786E7977,
+ 0x7A786E7A, 0x6C79776C, 0x70667878, 0x6D6C6271,
+ 0x445D5B53, 0x49454C49, 0x3A38374C, 0x00020000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x27282600, 0x3E383832, 0x554C4647, 0x62635954,
+ 0x5E67665C, 0x6C616A6A, 0x706C6170, 0x50686459,
+ 0x4F475C5A, 0x47443F52, 0x243F3C38, 0x01012928,
+ 0x00000001, 0x00000000, 0x00000000, 0x00010000,
+ 0x9E363733, 0xA49FA2A4, 0xA0A49EA0, 0x9CA0A29C,
+ 0xA7A1A0A5, 0xA3A7A1A3, 0x9AA2A59C, 0xA9A49EA0,
+ 0xA3A7A2A5, 0xA2A6A8A2, 0xBDBBA6A8, 0xB8BDBBBA,
+ 0xBABAC0BB, 0xBDBBB9BF, 0xBCC1BFB8, 0xBCB8BEB9,
+ 0xC0BBBBC1, 0xB9BFBABC, 0xBDBABFBD, 0xBEBBB8BE,
+ 0xB7BEB9B7, 0xB6B6BCB7, 0xBBB9B7BB, 0xB6BBB9B8,
+ 0xB9B6BBB9, 0xBBB9B6BB, 0xB7BCBAB8, 0xBEB8BDBC,
+ 0xBFBEBABF, 0xB9BFBEB9, 0xBABBC0BE, 0xBCB9B7BC,
+ 0xB6BDBAB5, 0xBEBBC1C0, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBCB6BBB9, 0xBFBDB9BE, 0xBBC0BEBA, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xAAABA906, 0xBABDC0BE, 0xBDB8BBBF, 0xB9BFBAB7,
+ 0xB8B5BBB6, 0xBBB9B7BD, 0xB8BCB7B8, 0xB7B8BCB7,
+ 0xBDBBB8BC, 0xB8BBB9BA, 0xB6B7BBB6, 0xBBB9B7BB,
+ 0xB7BCBAB8, 0xB8B6BBB9, 0xBAB8B4BB, 0xB6BBB9B5,
+ 0xB7B7BBB6, 0xBDB8B8BC, 0xB4BAB5B7, 0xB2B5B9B4,
+ 0xB9B4B3B7, 0xB2B6B1B5, 0xB2B5B9B4, 0xB7B2B3B7,
+ 0xB5B9B4B3, 0xB5B3BAB3, 0xBDB6B5BC, 0xB5BCB5B6,
+ 0xB4B5B9B3, 0xBBB4B4BB, 0xB3BAB3B4, 0xB8ADB3AE,
+ 0xBBB5B9BD, 0xB1B3ADB9, 0xA2A6AAA4, 0x938CA2A9,
+ 0x787C768C, 0x77787C77, 0x7C77787C, 0x787C7778,
+ 0x76787C77, 0x7C77787C, 0x787C7678, 0x706F7570,
+ 0x75706F75, 0x4D534E6F, 0x0840443F, 0x0B07090D,
+ 0x090A060A, 0x00000100, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x00000000, 0x51504C02, 0x7884837F, 0x7E7A7D7C,
+ 0x83837D7F, 0x7D85857F, 0x8A818586, 0x87887F89,
+ 0x7885867D, 0x837A8081, 0x85867D82, 0x7D86877E,
+ 0x867D8586, 0x84857C85, 0x7D85867D, 0x867D8586,
+ 0x86877E85, 0x7A85867D, 0x82798283, 0x82837A81,
+ 0x80888980, 0x837A8889, 0x83847B82, 0x7B83847B,
+ 0x847B8384, 0x80817883, 0x80888980, 0x89808889,
+ 0x898A8188, 0x7B83847B, 0x81788384, 0x83847B80,
+ 0x76818076, 0x7D78807E, 0x827F7A80, 0x73818279,
+ 0x7C727B7C, 0x7879707B, 0x6D72736A, 0x746B7373,
+ 0x6D6E6573, 0x53626359, 0x4B465B5C, 0x4F4C484F,
+ 0x6B595A56, 0x837D6C70, 0x99999381, 0xB1A4A79E,
+ 0xBDB1B8BC, 0xB8BCB1B9, 0xB9B8C0B6, 0xBFB8B9C0,
+ 0xBABEB8B8, 0xBABEBFBB, 0xBFBABBBF, 0xB9BFBABB,
+ 0xB9BBBFB9, 0xBEB9BBBF, 0xB9BFBAB8, 0xBABAC0BB,
+ 0xBFBAB9BF, 0xBBBFBABB, 0xB8BCC0BB, 0xB7B5B7BD,
+ 0xB8BDBBB2, 0xB4B8BABA, 0xA6B3B3AF, 0xB0A4B6AF,
+ 0xBAAA9FB3, 0x9DB9AFA2, 0xA898B7AC, 0xB8A596B6,
+ 0x96B6A496, 0xA496B8A3, 0xBCA397BB, 0x98BCA498,
+ 0xA69ABEA4, 0xBBA597BB, 0x95BCA796, 0xA796BBA7,
+ 0xB8A696B8, 0x98B8A798, 0xA496B8A5, 0xBBA597BB,
+ 0x96BBA597, 0xA796BBA8, 0xB7A395B7, 0x95B9A196,
+ 0xA595B7A3, 0xB8A598B8, 0x99B9A598, 0xA697B7A8,
+ 0xB7A897B8, 0x98B7A898, 0xAA9BBAA8, 0xBBAD9FBB,
+ 0x9CB8AD9F, 0xADA2BCA8, 0xB5A9A2B7, 0xB5BFA8A5,
+ 0xBBC0C3B4, 0xC0B9BEBF, 0xBDBEB8C0, 0xB5BDBDB8,
+ 0xC3B8C0BF, 0xB6C0B9C0, 0xA6A4B7B5, 0xBEAAA6BF,
+ 0x9BBBA8A0, 0xA798B8A8, 0xB8A396B6, 0x96B8A598,
+ 0xA395B7A4, 0xBDA698BC, 0x97BDA697, 0xA294B8A6,
+ 0xB8A698BC, 0x95BAA496, 0xA597BBA6, 0xB5A496B8,
+ 0x97B7A295, 0xA798B8A6, 0xB9A497B7, 0x97B9A597,
+ 0xA494B6A5, 0xB8A495B5, 0x97B9A798, 0xA597B9A5,
+ 0xB6A496B8, 0x93B5A396, 0xA395B7A1, 0xB8A696B8,
+ 0x97B7A696, 0xA297B8A4, 0xB69F94B5, 0x98BAA095,
+ 0xA699B9A6, 0xB5A89CB8, 0xA0B3A69E, 0xABABB7A4,
+ 0xBEB5B8BD, 0xBBBFB9BD, 0xB7B8BCBA, 0xBDB3B7B8,
+ 0xBDBDB9BE, 0xBBBDBDBB, 0xBBBABFBD, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBAB7BCBA, 0xBBB9B7BC, 0xB8BBB9B8,
+ 0xB7B8BCB7, 0xBAB8B8BC, 0xB7BCBAB5, 0xB9BABEB9,
+ 0xBCB7BABE, 0xB7BBB6B8, 0xB7B7BBB6, 0xBBB7B8BC,
+ 0x9FA09CBA, 0x5D8E908A, 0x635E6163, 0x4A4B475F,
+ 0x4D4F4C47, 0x59515552, 0x6061585B, 0x5D61615B,
+ 0x69606363, 0x68696068, 0x656E6C64, 0x6B666F6D,
+ 0x73706B6E, 0x6B76746C, 0x736E7573, 0x7F7C7776,
+ 0x75797874, 0x77737879, 0x78787278, 0x6B76746C,
+ 0x746C7675, 0x7F7D7576, 0x757D7E75, 0x7E757D7E,
+ 0x7D7E757D, 0x747C7D74, 0x7B767C7D, 0x83807B7E,
+ 0x7B83807B, 0x807B8380, 0x7E7B7684, 0x777C7B77,
+ 0x75717C7B, 0x7C7B7776, 0x6C787773, 0x68677170,
+ 0x6869676A, 0x7270716D, 0x7C787878, 0x7B78747F,
+ 0x797C7975, 0x7672807D, 0x76777377, 0x70757470,
+ 0x6F697574, 0x6868626F, 0x00141511, 0x00000001,
+ 0x00000000, 0x00000000, 0x01000000, 0x2A282700,
+ 0x575F5C58, 0x6E6A605C, 0x80787177, 0x6E807B72,
+ 0x746A7A78, 0x70716773, 0x71767469, 0x7B727E7C,
+ 0x7F7A7180, 0x6C79776C, 0x776C7977, 0x71716579,
+ 0x546E6C62, 0x48435E5C, 0x4C49454B, 0x00312F2E,
+ 0x00000102, 0x00000000, 0x00000000, 0x00000000,
+ 0x28292700, 0x3E383832, 0x554B4647, 0x62635954,
+ 0x6267665C, 0x6C616E6C, 0x706C6170, 0x59676358,
+ 0x4F476762, 0x48443F52, 0x263F3C38, 0x00002927,
+ 0x00000102, 0x00000000, 0x01000000, 0x00010000,
+ 0x9E353632, 0xA49FA2A4, 0xA1A59FA0, 0x989FA19B,
+ 0xA39C9CA1, 0x9EA59E9C, 0x9EA3A69D, 0xA8A3A2A4,
+ 0xA4A8A2A4, 0xA2A5A7A1, 0xBCBAA6A8, 0xB9BEBCB9,
+ 0xB7B6BCB7, 0xBBB9B6BC, 0xB8BDBBB8, 0xB7B6BCB7,
+ 0xBCB7B6BC, 0xB6BBB9B8, 0xBAB8BDBC, 0xBEBBB5BB,
+ 0xB6BDB8B7, 0xB9B7BDB8, 0xBDBBB8BE, 0xB8BDBBBA,
+ 0xBCBABFBD, 0xBDBBB9BE, 0xBABFBDB8, 0xBFBABFBE,
+ 0xBFBEBAC0, 0xBAC0BFB9, 0xBEBBC0BF, 0xBDBABBC0,
+ 0xBAC1BEB6, 0xBDB9BFBE, 0xBFBEB8BE, 0xB9BFBEB9,
+ 0xBABABFBD, 0xBCBAB7BC, 0xB7BCBAB7, 0xBFC0C4BF,
+ 0x8383C0C4, 0x00000083, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xAAABA906, 0xBABDC0BE, 0xBCB7BBBF, 0xBBBFBAB8,
+ 0xBBB7BCBA, 0xBDBDB8BD, 0xBABDBBBB, 0xBCB8BDBB,
+ 0xBDBCB9BE, 0xB8BDBBB8, 0xB8B8BEB9, 0xBCBAB7BD,
+ 0xB6BBB9B7, 0xB7B5BAB8, 0xBBB9B4B9, 0xB9BCBAB8,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB5BBB6B6, 0xAEB3B9B4,
+ 0xB7B2ADB3, 0xB0B4AFB3, 0xB4B3B9B4, 0xB9B4B3B9,
+ 0xB3B9B4B3, 0xB1B3BAB3, 0xBAB3B2BB, 0xB4BBB4B3,
+ 0xB5B3BAB3, 0xBAB3B5BC, 0xB5B9B3B3, 0xB8AEB2AD,
+ 0xBBB7B9BD, 0xB8BCB7BA, 0xBAB9C0B9, 0xC0B9B9C1,
+ 0xA3AAA3B8, 0x778C928D, 0x7D76767C, 0x787C7676,
+ 0x83787C76, 0x8B85878C, 0x868B8287, 0x4E929690,
+ 0x544D5054, 0x4E554E4D, 0x3F40443F, 0x443E4044,
+ 0x40443F40, 0x00242725, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x28240101, 0x78787229, 0x7B82817D, 0x817D807F,
+ 0x82827C82, 0x7D868680, 0x867D8586, 0x86877E85,
+ 0x8085867D, 0x89808889, 0x88898088, 0x7D87887F,
+ 0x89808586, 0x85867D88, 0x80898A81, 0x89808889,
+ 0x83847B88, 0x7E85867D, 0x857C8687, 0x898A8184,
+ 0x7985867D, 0x847B8182, 0x87887F83, 0x78808178,
+ 0x81788081, 0x80817880, 0x7B85867D, 0x867D8384,
+ 0x87887F85, 0x80888980, 0x877E8889, 0x83847B86,
+ 0x77817F77, 0x7D78817F, 0x7F7C7780, 0x737B7C73,
+ 0x7C737B7C, 0x7B7C737B, 0x6B7A7870, 0x746B7573,
+ 0x68696073, 0x4A5B5C53, 0x4C475253, 0x4F4C4850,
+ 0x6B585C57, 0x99936C70, 0x95988F97, 0xB1AEB1A8,
+ 0xBCB0B8BC, 0xB8BCB0BA, 0xBBB8BFB8, 0xBFB8BAC0,
+ 0xBABEB8B8, 0xB9BEBFBB, 0xBFB9BABE, 0xB9C0B9BB,
+ 0xBABBBFBA, 0xBEBCBBBF, 0xBBBEBCBB, 0xBABBBFBA,
+ 0xBFB9BBBF, 0xBBBFB9BB, 0xB8BDC1BB, 0xB7B5B7BD,
+ 0xB9BEBDB2, 0xB4BAB9BB, 0xACB9B2AE, 0xB0A4B6B5,
+ 0xBCB2A8B9, 0x9CB7B2A6, 0xA898B7AB, 0xB8A798B8,
+ 0x96B8A496, 0xA294B6A4, 0xBDA195B9, 0x98BEA497,
+ 0xA599BDA3, 0xB9A597BB, 0x97BBA597, 0xA597BBA5,
+ 0xB7A496B8, 0x98B8A497, 0xA797B9A7, 0xBCA597BB,
+ 0x97BBA596, 0xA799BDA5, 0xB7A597B9, 0x95B7A395,
+ 0xA595B7A5, 0xB5A497B7, 0x94B6A295, 0xA494B6A2,
+ 0xB7A594B5, 0x9CB8A898, 0xAA9EBAAA, 0xBBAEA2BE,
+ 0x9FBBAB9F, 0xAA9FB9AB, 0xB7ABA3BA, 0xADB9A8A4,
+ 0xB3B6BEAD, 0xBEB7BCBD, 0xBDBCB9BF, 0xB5BDBCB5,
+ 0xC3B8C0BF, 0xADBBB9C0, 0xA7A2B7AD, 0xBEABA4BF,
+ 0x9CBCAAA0, 0xA798B8A9, 0xB9A496B8, 0x98B8A597,
+ 0xA797B9A7, 0xBBA695BA, 0x96BAA597, 0xA094B8A2,
+ 0xBBA496BA, 0x97BBA597, 0xA597BBA5, 0xB6A294B8,
+ 0x97B7A294, 0xA697B7A6, 0xB9A697B7, 0x96B8A597,
+ 0xA294B6A4, 0xB9A496B8, 0x96B8A597, 0xA496B8A4,
+ 0xB6A297B8, 0x94B6A095, 0xA496B8A2, 0xB7A697B7,
+ 0x97B8A497, 0xA095B6A2, 0xB8A196B7, 0x98BAA297,
+ 0xA699B9A6, 0xB7A99AB9, 0xA6B6A89D, 0xB2B3BDA9,
+ 0xBDB5B8BC, 0xBBBFB8BC, 0xB7B8BCBA, 0xBDB3B7B8,
+ 0xBDBDB9BE, 0xBBBDBDBB, 0xBBB8BDBB, 0xBEBBB8BD,
+ 0xB8BFBCB7, 0xBAB7BCBB, 0xBBB9B7BC, 0xB8BCB7B8,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB5BBB6B6, 0xB9B8BEB9,
+ 0xBBB6B8BE, 0xB5BBB6B5, 0xB7B7BDB8, 0xBBB6B6BC,
+ 0xACB0ABB7, 0x738E908A, 0x625E7779, 0x4A4B4761,
+ 0x47504D49, 0x5951504C, 0x6260585C, 0x5B5F5C57,
+ 0x6A616360, 0x68695F69, 0x636E6C64, 0x6B666E6B,
+ 0x6F6B666F, 0x6C76746C, 0x79747674, 0x7B78737C,
+ 0x70757470, 0x77737574, 0x78787278, 0x7176746C,
+ 0x7C777B79, 0x7C797480, 0x6F787970, 0x7D757778,
+ 0x8280787F, 0x747E7C74, 0x7A757E7C, 0x85817C7E,
+ 0x7C878480, 0x7D758481, 0x7A78707F, 0x7E7A7C76,
+ 0x807F8182, 0x82807F82, 0x747F807C, 0x706F7978,
+ 0x6A686772, 0x7372716D, 0x78747877, 0x79767279,
+ 0x787A7773, 0x79757F7C, 0x7978747A, 0x6A737470,
+ 0x6F696D6E, 0x6F6F696F, 0x00292824, 0x01010302,
+ 0x00000001, 0x00000000, 0x01010000, 0x28292700,
+ 0x575F5C58, 0x6E6A605C, 0x80797077, 0x6C817D72,
+ 0x756B7977, 0x75746A76, 0x6E7A786D, 0x7C717F7C,
+ 0x7C786D80, 0x71807C71, 0x776C807C, 0x78766B7B,
+ 0x61706C61, 0x5A556D6B, 0x4C49445E, 0x2C484743,
+ 0x01003130, 0x00000000, 0x00000000, 0x00000000,
+ 0x28292700, 0x3E363832, 0x554B4447, 0x62645854,
+ 0x5E646458, 0x6C616B69, 0x6F695E70, 0x5A676358,
+ 0x4E476863, 0x48443F54, 0x263F3C38, 0x01012927,
+ 0x00000103, 0x00000000, 0x00000000, 0x00010000,
+ 0x9F373834, 0xA49FA2A3, 0xA1A59FA0, 0x9A9EA29C,
+ 0xA8A19EA3, 0xA0A8A1A0, 0xA2A3A7A1, 0xACA7A4A8,
+ 0xA8ACA6A8, 0xADA5A7A1, 0xCAC5B1B3, 0xB8BDBBC6,
+ 0xBEBEC1BF, 0xBEBEBDC0, 0xBCBFBDBE, 0xBBBEC2BD,
+ 0xC1BCBDC1, 0xBBC0BEBD, 0xBFBBC0BF, 0xC1C0B9BE,
+ 0xB9BFBEBB, 0xBEB8BEBD, 0xBFBEBAC1, 0xB9BFBEBA,
+ 0xBEBAC0BF, 0xBFBEB9BF, 0xB9BFBEB9, 0xC0B9BFBE,
+ 0xBEBFBABF, 0xB9BFBEB9, 0xBFBBC0BF, 0xBCBBBBC0,
+ 0xB7BCBBB7, 0xBFB9BEBD, 0xBFBEBBC0, 0xBABFBEBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xB6BBB9BA, 0xBFC1C5C0,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x0709050A, 0x05070805,
+ 0xAAABA906, 0xBABCBFBD, 0xBCB7BBBF, 0xBBBFBAB8,
+ 0xBDB8BDBB, 0xBCBCB9BE, 0xBBBEBCBA, 0xBBB8BDBB,
+ 0xBDBCB8BD, 0xB7BEBBB7, 0xB9B8BDBB, 0xBDBBB8BE,
+ 0xB8BDBBB8, 0xB9B6BBB9, 0xBAB8B6BB, 0xB9BAB8B7,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB3B9B4B6, 0xB4B3B9B4,
+ 0xB9B4B3B9, 0xB3B7B2B5, 0xB2B1B7B2, 0xB9B4B1B7,
+ 0xB3B9B4B3, 0xB5B4BCB5, 0xBCB5B4BC, 0xB5BBB6B5,
+ 0xB3B5BCB5, 0xBBB5B3BA, 0xB5B9B3B7, 0xB7AFB3AE,
+ 0xBBB7B8BC, 0xB8BCB7BA, 0xB8B9C1BA, 0xC1BAB5C0,
+ 0xB8C0B9B9, 0x8BB3B9B4, 0x938C8B92, 0x9FA69F8C,
+ 0xA2A6ABA2, 0xABA2A6AB, 0xA6ABA2A6, 0xAFB3B8AF,
+ 0xB8B1B3B8, 0xB1B8B1B1, 0xAFB0B4AF, 0xB5AFB0B4,
+ 0xB1B5B0B1, 0x00707371, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000001,
+ 0x28240000, 0x78787229, 0x7B7D7C78, 0x827E807F,
+ 0x82817D83, 0x7E85857F, 0x867D8687, 0x85867D85,
+ 0x7D898A81, 0x867D8586, 0x88898085, 0x7E888980,
+ 0x867D8687, 0x85867D85, 0x7B84857C, 0x877E8384,
+ 0x87887F86, 0x7E888980, 0x867D8687, 0x88898085,
+ 0x7D83847B, 0x857C8586, 0x86877E84, 0x7885867D,
+ 0x867D8081, 0x84857C85, 0x78808178, 0x847B8081,
+ 0x898A8183, 0x78888980, 0x81788081, 0x80817880,
+ 0x767F8077, 0x7F777E7F, 0x817F7781, 0x737D7E75,
+ 0x79707B7C, 0x78797078, 0x6B73746B, 0x6E657374,
+ 0x6869606D, 0x4F5B5C53, 0x4C475555, 0x5B5A564F,
+ 0x7F6E6F6B, 0x98928084, 0x979A9196, 0xB1AEB1A8,
+ 0xBBB0B8BC, 0xB8BCB1B7, 0xB8BBBFB9, 0xBFB9B8BF,
+ 0xBABEB8BB, 0xBABDBEBA, 0xBFBABBBF, 0xB9BFBABB,
+ 0xBCBBBFBA, 0xBEBCBBBE, 0xBBBEBCBB, 0xBABCC0BB,
+ 0xBFB9BBBF, 0xBBBFB9BB, 0xB8BCC0BA, 0xBAB8B7BD,
+ 0xB8BDBCB5, 0xB7B5B4B8, 0xA4B6B2AC, 0xB0A3B9B0,
+ 0xB8AFA4B8, 0x9DB8AEA2, 0xA898B7AC, 0xB7A697B7,
+ 0x96B8A497, 0xA496B8A4, 0xBCA597BB, 0x96BCA396,
+ 0xA397BBA3, 0xB9A597B9, 0x97BBA597, 0xA597B9A5,
+ 0xB7A496B8, 0x98B8A497, 0xA696B8A7, 0xBBA597BB,
+ 0x97BBA597, 0xA599BDA3, 0xB7A597B9, 0x96B8A595,
+ 0xA797B9A6, 0xB8A597B9, 0x96B8A496, 0xA294B6A4,
+ 0xB8A696B8, 0x9CB8A798, 0xAB9FBBA8, 0xB8ACA0BC,
+ 0x9DBBA89C, 0xA79EB9A9, 0xB7AAA2B9, 0xACBCA8A4,
+ 0xADADB9AD, 0xBFB3B7BC, 0xC0C0B7BC, 0xB8C0BFB8,
+ 0xBCB8C0C0, 0xACBCB3B7, 0xA8A2B9AD, 0xBAAAA1BC,
+ 0x9CBCA89C, 0xA798B8AB, 0xB7A696B8, 0x95B7A595,
+ 0xA696B8A5, 0xBAA493B8, 0x94B8A496, 0xA094B8A0,
+ 0xBBA597BB, 0x97BBA597, 0xA597BBA5, 0xB6A094B8,
+ 0x96B8A095, 0xA697B7A4, 0xB8A697B7, 0x94B6A696,
+ 0xA294B8A2, 0xB8A597B9, 0x97BBA496, 0xA597B9A5,
+ 0xB6A095B6, 0x94B6A095, 0xA496B8A2, 0xB7A595B7,
+ 0x95B6A497, 0xA095B6A0, 0xB9A095B6, 0x95B7A597,
+ 0xA294B6A3, 0xB7AA9BBB, 0xA5B8A89D, 0xACACB8A9,
+ 0xBDB1B3BB, 0xB6BCB5B8, 0xB7B8BCB6, 0xBDB6BABB,
+ 0xBDBDB9BE, 0xBCBEBEBB, 0xBBB8BDBB, 0xBEBBB8BD,
+ 0xB7BEBBB7, 0xBBB7BCBA, 0xBBB9B8BD, 0xB8BCB7B8,
+ 0xB7B8BCB7, 0xBBB6B8BC, 0xB3B9B4B5, 0xB6B5BBB6,
+ 0xB7B2B5BB, 0xB5BBB6B1, 0xB7B6BCB7, 0xBCB7B6BC,
+ 0xABAFAAB8, 0x738E908A, 0x625E7779, 0x4A4B4761,
+ 0x474F4C48, 0x534B504C, 0x5C595156, 0x5B63605B,
+ 0x685F6360, 0x68695F67, 0x696A6860, 0x706B7471,
+ 0x77746F74, 0x6C7B7971, 0x78737674, 0x7B78737B,
+ 0x757A7975, 0x79757A79, 0x75756F7A, 0x7176736E,
+ 0x736E7B79, 0x76736E77, 0x7377786F, 0x7D757B7C,
+ 0x8381797F, 0x74838179, 0x7B767E7C, 0x84807B7F,
+ 0x75888380, 0x7C747D7A, 0x84827A7E, 0x7782827C,
+ 0x7A797A7B, 0x7C7A797C, 0x7C807F7B, 0x78748180,
+ 0x6C68677B, 0x787A7773, 0x76727D7C, 0x78777377,
+ 0x757C7975, 0x736F7C79, 0x79787474, 0x71737470,
+ 0x6F697475, 0x7C7C766F, 0x003E3D39, 0x01000001,
+ 0x01010100, 0x00000000, 0x00000000, 0x28292700,
+ 0x575F5B5A, 0x6F68605C, 0x7E797075, 0x71807C71,
+ 0x756B807C, 0x7A786E77, 0x6F807C71, 0x7C71807D,
+ 0x807C7180, 0x71807C71, 0x7C71807C, 0x7A766B80,
+ 0x62706C61, 0x6B63706B, 0x5D5A556E, 0x434A4742,
+ 0x17164949, 0x00000019, 0x00000000, 0x00000000,
+ 0x28292700, 0x3E363832, 0x554B4647, 0x62645854,
+ 0x6167675B, 0x6C616D6D, 0x6D695E70, 0x5B686459,
+ 0x58516964, 0x48443F5E, 0x263F3C38, 0x00002927,
+ 0x00000102, 0x00000000, 0x00000000, 0x00010000,
+ 0xA0363735, 0xA49FA3A4, 0xA0A49EA0, 0x9C9CA09A,
+ 0xA8A19EA6, 0xA0A8A1A0, 0xA3A2A9A2, 0xA8A3A2A8,
+ 0xA7ABA6A4, 0xADA7A9A3, 0xC9C4B1B3, 0xBABDBBC5,
+ 0xBFBFBFBF, 0xC0C0BFBF, 0xC1C2C0C0, 0xBBBDC1BC,
+ 0xC1BCBDC1, 0xBBC0BEBD, 0xC0BABEBF, 0xBFC0BABF,
+ 0xB9BEBFBA, 0xBFB9BFBE, 0xBFBEBAC0, 0xB9BFBEB9,
+ 0xBCB9BFBE, 0xBDBCB7BD, 0xB9BFBEB7, 0xBFBAC0BF,
+ 0xBFC0BAC0, 0xBAC0BFBA, 0xBFBAC0BF, 0xBCBBBAC0,
+ 0xB7BCBBB7, 0xBDBBC0BF, 0xC0BFB9BE, 0xBABFBEBB,
+ 0xBDBABFBD, 0xBFBDBABF, 0xB8BDBBBA, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x06080409, 0x05070704,
+ 0xAAABA906, 0xBABDC0BE, 0xBCB7BBBF, 0xBBBFBAB8,
+ 0xBDB8BDBB, 0xBDBBB9C0, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBDBBBAC0, 0xB9BEBCB8, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBBB8BDBB, 0xBDBBB8BD, 0xBABDBBBA,
+ 0xB7B7BBB6, 0xBDB8B8BC, 0xB6BCB7B9, 0xB7B2B7B5,
+ 0xBBB9B4B9, 0xB7BAB8B8, 0xB7B6BBB9, 0xB9B7B4B9,
+ 0xB4B9B7B4, 0xB6B7BEB7, 0xBBB9B6BD, 0xB8BBB9B8,
+ 0xB5B6BCB7, 0xB8B3B4BA, 0xB5B9B4B4, 0xB4B5B9B4,
+ 0xB9B4B5B9, 0xB6BCB7B5, 0xB1B2BAB3, 0xBAB3AEB9,
+ 0xB5BDB6B2, 0xAFB6BDB6, 0xAFA8AFB6, 0xA8B1A7A8,
+ 0xA9A9B0A9, 0xB1A7A9B0, 0xA5ADA3A9, 0x9FA1A99F,
+ 0xA8A1A1A9, 0x9EA59EA1, 0x9FA0A49F, 0xA49FA0A4,
+ 0xA0A49FA0, 0x00636664, 0x00000001, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010101,
+ 0x2B270001, 0x80807A2C, 0x777A7B77, 0x7E7D7C7B,
+ 0x85827E80, 0x7A83807B, 0x847F827F, 0x84817C87,
+ 0x7D83847B, 0x89808586, 0x85867D88, 0x80888980,
+ 0x867D8889, 0x88898085, 0x7D888980, 0x847B8586,
+ 0x898A8183, 0x7B87887F, 0x867D8384, 0x88898085,
+ 0x7D85867D, 0x867D8586, 0x83847B85, 0x7B85867D,
+ 0x81788384, 0x85867D80, 0x7B83847B, 0x81788384,
+ 0x80817880, 0x787F8077, 0x81788081, 0x80817880,
+ 0x747D7F79, 0x847B7A7D, 0x7E7F7683, 0x747B7C73,
+ 0x78727C7D, 0x75786F76, 0x676E7168, 0x71687071,
+ 0x61625970, 0x4E53534D, 0x49435454, 0x60605A49,
+ 0x8272736F, 0x9C968586, 0x9A9C969A, 0xAFB3B8AF,
+ 0xBDB4B1B9, 0xBEC1B8BA, 0xBABDC0B7, 0xBFB9BEC0,
+ 0xBABBB7BD, 0xBBBCBFBD, 0xBDBBBABD, 0xBCBFBDBA,
+ 0xBDBABFBD, 0xBFBDBCBF, 0xBBBCBABC, 0xB9BBBFBA,
+ 0xBFBABBBF, 0xBABEB9BB, 0xBAB9C0B9, 0xBEBCB9BF,
+ 0xB6B8B9B9, 0xB7B0ACB7, 0x9FBAAEA6, 0xAC9DB9AE,
+ 0xB7AA9DB7, 0x9AB9AA9D, 0xA898B7AA, 0xB6A697B7,
+ 0x98B8A498, 0xA798B8A7, 0xBBA797B9, 0x97BBA597,
+ 0xA597BBA5, 0xB9A597B9, 0x97B9A597, 0xA797B9A7,
+ 0xB9A597B9, 0x97B9A597, 0xA797B9A7, 0xBBA597BB,
+ 0x97BBA397, 0xA397BBA3, 0xB6A496B8, 0x97B7A294,
+ 0xA797B9A6, 0xB9A698BA, 0x97B9A597, 0xA597B9A5,
+ 0xBBA999BB, 0x9FBDA999, 0xADA4BFAB, 0xBAAAA0BE,
+ 0x98B8A69C, 0xA79EB9A5, 0xBDA8A0B7, 0xACC0ADA8,
+ 0xADABBEAE, 0xC2AEAEBC, 0xBFC2B6B8, 0xB8C0C0B8,
+ 0xBDB8BDC0, 0xACBCB2B5, 0xA7A2B7AD, 0xBBAAA1BC,
+ 0x98B8A99D, 0xA798B8A7, 0xB7A797B9, 0x96BBA595,
+ 0xA597BBA7, 0xBEA495BB, 0x93B9A798, 0xA496BAA2,
+ 0xB9A597BB, 0x97B9A597, 0xA294B6A5, 0xB8A095B6,
+ 0x97B8A297, 0xA496B8A2, 0xB7A797B9, 0x94B6A595,
+ 0xA597B9A4, 0xB8A496B8, 0x97B8A297, 0xA69BBCA2,
+ 0xB8A496B8, 0x94B6A496, 0xA496B8A2, 0xB6A494B6,
+ 0x95B5A494, 0xA396B6A2, 0xBAA395B7, 0x93B8A898,
+ 0xA494B6A4, 0xB8A798B8, 0x9EB5A89C, 0xA6A2B5A6,
+ 0xB6A6A6B4, 0xB5BEABAC, 0xB7B8BCB6, 0xBBB6BBBA,
+ 0xBDBBB8BD, 0xB7BCBAB8, 0xBAB8BDBB, 0xBDBBB7BC,
+ 0xB8BDBBB8, 0xBAB6BBB9, 0xBBB9B7BC, 0xB8BCB7B8,
+ 0xB5B6BCB7, 0xBAB3B5BC, 0xB3BAB3B3, 0xB3B8BCB6,
+ 0xB9B4B5B9, 0xB8BCB7B5, 0xB9B5BCB5, 0xBCB5B9C0,
+ 0xAEB5AEB5, 0x7690948F, 0x645F777B, 0x62635F60,
+ 0x45484842, 0x4D454F4D, 0x5A58504F, 0x5B5F5C57,
+ 0x69606360, 0x68696068, 0x6B6E6B66, 0x74707370,
+ 0x75756F77, 0x6C707168, 0x6F6A7674, 0x7B787372,
+ 0x717A7975, 0x75717475, 0x76767076, 0x6C73736D,
+ 0x736E7475, 0x7C797476, 0x737D7E75, 0x796F797C,
+ 0x80817778, 0x77828078, 0x827A817F, 0x837F7A84,
+ 0x78807B78, 0x7F7A807B, 0x807C7783, 0x75817F77,
+ 0x7C787F7D, 0x817C797F, 0x78807B78, 0x7B78807B,
+ 0x75726E80, 0x7A7C7877, 0x79757F7B, 0x7A79757A,
+ 0x73787773, 0x736F7877, 0x7A797574, 0x737C7C76,
+ 0x746F7979, 0x79797377, 0x00504F4B, 0x04000203,
+ 0x00020000, 0x00000000, 0x00000000, 0x2A282700,
+ 0x575F5B5A, 0x7169605C, 0x807B7274, 0x72817D72,
+ 0x776E817D, 0x817C737C, 0x71837F74, 0x8075807C,
+ 0x7E7C7182, 0x717E7C71, 0x7C717E7C, 0x807C7180,
+ 0x72807C71, 0x736B7E7C, 0x66645C75, 0x3456544C,
+ 0x3B373E3C, 0x2523223E, 0x00000000, 0x00010000,
+ 0x2C2C2C00, 0x413D3C38, 0x574D494A, 0x62635956,
+ 0x62696A60, 0x6C616D6C, 0x6E6C616E, 0x5A666459,
+ 0x58506664, 0x504C475B, 0x2B474440, 0x00002E2C,
+ 0x01010102, 0x00000000, 0x00000000, 0x00010000,
+ 0x9F3A3B39, 0xA49FA2A3, 0xA0A49EA0, 0x9C9EA29C,
+ 0xA8A19EA6, 0xA0A8A1A0, 0x9E9BA59F, 0xA9A49CA3,
+ 0xA8ACA7A3, 0xAEAAACA6, 0xC5C0B2B4, 0xB8BCB7C1,
+ 0xBDBEBFBD, 0xBEBEBEBF, 0xC0C1BFBE, 0xBBBEC2BD,
+ 0xBFBDBCC0, 0xBCC1BFBC, 0xC2BBBFC0, 0xBFC0BABF,
+ 0xB9BEBFBA, 0xBEB7BFBE, 0xBFBEB7BF, 0xB7BFBEB7,
+ 0xBCBAC0BF, 0xBFBEB7BD, 0xBAC0BFB9, 0xBEBAC0BF,
+ 0xC0BFBBC0, 0xB6BCBBBB, 0xC0B7BDBC, 0xBFC0B8C0,
+ 0xB7BCBDBA, 0xBFBAC0BF, 0xC0BDBAC0, 0xB9C0BDB9,
+ 0xBDBABFBD, 0xBFBDBABF, 0xB8BDBBBA, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x08070308, 0x05070906,
+ 0xAAABA906, 0xBAC0C3C1, 0xBBB6BBBF, 0xBBBFBAB7,
+ 0xBCBABFBD, 0xBDBBB8BF, 0xB9BEBCB8, 0xB9B8BDBB,
+ 0xBEBCB8BE, 0xB8BDBBB9, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBBB9BEBC, 0xBDBBB8BD, 0xB9BCBAB8,
+ 0xB6BABEB9, 0xBCB7B7BB, 0xB6BBB9B8, 0xB6B5BBBA,
+ 0xBBB9B1B7, 0xB8BBB9B8, 0xB7B5BAB8, 0xBAB9B4B9,
+ 0xB6BBB9B5, 0xB2B2B8B3, 0xB7B5B1B7, 0xB4B6B6B4,
+ 0xB4B3B6B4, 0xB9B4B5B9, 0xB3B7B2B5, 0xB4B3B7B2,
+ 0xB9B4B5B9, 0xB3B9B4B5, 0xB1B2BAB3, 0xB8B1AEB9,
+ 0xB5BCB5B0, 0xA9B6BDB6, 0xA89EA9B0, 0xA7B0A69F,
+ 0x9EA0A89E, 0xA89DA0A8, 0xA0A89DA2, 0x9BA1A69D,
+ 0xA59E9DA5, 0x9AA19A9E, 0x9FA0A49F, 0xA5A0A0A4,
+ 0x9FA39EA1, 0x00202321, 0x00000001, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x55510001, 0x80807A56, 0x7B797A76, 0x7E7D7E7F,
+ 0x83807C80, 0x7D84817D, 0x827D8582, 0x83807B85,
+ 0x7B84857C, 0x867D8384, 0x88898085, 0x7D898A81,
+ 0x89808586, 0x898A8188, 0x7B86877E, 0x89808384,
+ 0x88898088, 0x7B898A81, 0x89808384, 0x85867D88,
+ 0x7E87887F, 0x867D8687, 0x88898085, 0x7E84857C,
+ 0x867D8687, 0x85867D85, 0x8085867D, 0x847B8889,
+ 0x83847B83, 0x7D85867D, 0x81788586, 0x80817880,
+ 0x767D7F79, 0x80777A7C, 0x8182787F, 0x74808178,
+ 0x7B757C7D, 0x7A7D7479, 0x686E7168, 0x71686F73,
+ 0x61625970, 0x4254544E, 0x48424848, 0x60605A48,
+ 0x83737470, 0x9C968687, 0xAEB0AA9C, 0xAFB0B8AE,
+ 0xBCB6B1B9, 0xBFC1BBB8, 0xB8C0C1B8, 0xBFB9C0C1,
+ 0xBBBCB8BD, 0xBBB8BBB9, 0xBFBDBABD, 0xBDC0BEBC,
+ 0xBEB9BEBD, 0xBFBDBABF, 0xBCBDB9BC, 0xB9BBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBAB9BFBA, 0xBEBDB9BF,
+ 0xB6B6BCB9, 0xB5B0ABBA, 0x98B4A9A0, 0xA898B7A7,
+ 0xB6A799B5, 0x99B8A89A, 0xA798B8A9, 0xB6A498B6,
+ 0x97B6A498, 0xA897B8A7, 0xB9A797B9, 0x96BBA797,
+ 0xA597BBA7, 0xBAA597BB, 0x97B9A698, 0xA797B9A7,
+ 0xB9A597B9, 0x96BBA597, 0xA597BBA7, 0xB9A597BB,
+ 0x97BBA398, 0xA597BBA3, 0xB6A496B8, 0x96B6A294,
+ 0xA697B7A5, 0xBBA496BA, 0x97BBA597, 0xA597B9A5,
+ 0xBBA998BD, 0xA0BEA999, 0xA99FBDAC, 0xB8AA9DBD,
+ 0x98B8A598, 0xACA0BEA5, 0xBDACA3BD, 0xA7BEADA8,
+ 0xAEACC0AD, 0xC1AEACBF, 0xBEC6B3B3, 0xBABEC3BB,
+ 0xBEB8BCC1, 0xA4B4B3B4, 0xA8A3B8A5, 0xBBA9A0BB,
+ 0x9BBBA99D, 0xA897B8AA, 0xB6A797B9, 0x97BBA494,
+ 0xA495BBA5, 0xBBA596BC, 0x93B9A495, 0xA496BAA2,
+ 0xB9A597BB, 0x97B9A597, 0xA294B6A7, 0xBAA297B8,
+ 0x95B6A499, 0xA297B8A0, 0xB6A595B7, 0x95B7A494,
+ 0xA597B9A5, 0xB9A496B8, 0x97B8A398, 0xA297B8A2,
+ 0xB8A598B8, 0x95B7A598, 0xA496BAA3, 0xB5A696B8,
+ 0x96B6A393, 0xA396B6A5, 0xB5A595B7, 0x94B6A393,
+ 0xA595B7A4, 0xB9A899B9, 0x9CB8A99A, 0xA8A0B7A8,
+ 0xB4A8A3B8, 0xABB6A8A5, 0xB8B7BBAF, 0xBBBABCBC,
+ 0xBCBAB8BD, 0xBABFBDB7, 0xB9B7BCBA, 0xBDBBB6BB,
+ 0xB8BEB9B8, 0xB9B8BEB9, 0xBEB9B8BE, 0xB8BCB7BA,
+ 0xB5B6BDB6, 0xBCB5B5BC, 0xB3BAB3B5, 0xB4B3BAB3,
+ 0xBCB7B6BA, 0xB6BAB5B8, 0xB4B2B9B2, 0xBBB4B4BB,
+ 0xB2B9B2B4, 0x90A7ABA6, 0x7C779195, 0x60645F78,
+ 0x3F4D4D47, 0x4D454748, 0x55534B4F, 0x5C5F5C57,
+ 0x685F6461, 0x68696067, 0x666E6B66, 0x706C6E6B,
+ 0x75756F71, 0x7175756F, 0x7C777B79, 0x7F7C7780,
+ 0x6E72716D, 0x736F7172, 0x73736D74, 0x6770706A,
+ 0x79746F70, 0x7E7B767C, 0x737D7E75, 0x7C72797C,
+ 0x7D7E747B, 0x77817F77, 0x7D75817F, 0x817E797F,
+ 0x787F7B76, 0x7B78807B, 0x807C7780, 0x77827F77,
+ 0x7C77827F, 0x807B7880, 0x78827B78, 0x7B78807B,
+ 0x7F7C7880, 0x777C7877, 0x7C787C78, 0x7A79757D,
+ 0x76797874, 0x736F7B7A, 0x7D7C7874, 0x737C7C76,
+ 0x78737979, 0x827F7A7B, 0x004F4E4A, 0x03000203,
+ 0x00040000, 0x00000100, 0x00000200, 0x2A282700,
+ 0x585F5B5A, 0x7068615D, 0x7E7C7273, 0x72817D72,
+ 0x776E817D, 0x837C737E, 0x74837F74, 0x7F74817F,
+ 0x7E7C7181, 0x717E7C71, 0x7D727E7C, 0x807C717F,
+ 0x71807C71, 0x746A7E7C, 0x75746A75, 0x4B6E6C62,
+ 0x3B365755, 0x3E3B373F, 0x00161715, 0x01010000,
+ 0x2E2C2C01, 0x413E3B37, 0x574D4B49, 0x63645A56,
+ 0x6667685E, 0x6C617170, 0x6E6C616E, 0x5A67655A,
+ 0x645A6765, 0x504D4566, 0x2B47443F, 0x0000302F,
+ 0x00000002, 0x00000000, 0x00000000, 0x00010000,
+ 0x9E393A38, 0xA5A0A1A2, 0xA0A49EA1, 0x9CA0A49E,
+ 0xA8A1A0A5, 0xA0A8A1A1, 0xA49AA3A0, 0xACA79EA7,
+ 0xA9ADA8A6, 0xADA8ACA6, 0xC4BFAFB3, 0xB8BCB7C0,
+ 0xBDBEBFBD, 0xC0C0BEBF, 0xC0C0C0C0, 0xBCBDC0BE,
+ 0xBFBDBDC1, 0xBCC1C0BC, 0xC0B9BEBF, 0xBFC0BABF,
+ 0xB9BFBEBA, 0xBEBAC0BF, 0xBFBEB7BF, 0xB8BEBDB7,
+ 0xBCB9BFBE, 0xBFBEB7BD, 0xB9BFBEB9, 0xBEBCC1BF,
+ 0xC0BEBBC0, 0xB6BCBBBB, 0xC0B8BDBE, 0xBDBDB8C0,
+ 0xB5BDBDB5, 0xC0B8BEBD, 0xC0BDBBC1, 0xB9C0BDB9,
+ 0xBDBABFBD, 0xBFBDBABF, 0xB9BEBCBA, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x0709050A, 0x05070805,
+ 0xAAABA906, 0xBABDC0BE, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBBB8BDBB, 0xBDBCB7BC, 0xB8BDBBB8, 0xBBB7BEBB,
+ 0xC0BDB7BE, 0xB8BFBCB9, 0xBCB8BDBB, 0xBFBDB9BE,
+ 0xB8BDBBBA, 0xBCB7BEB9, 0xBDBABAC1, 0xB8BDBBB6,
+ 0xBBB9BCBA, 0xBBB9BABD, 0xB7BCBAB6, 0xB7B4BAB9,
+ 0xBBB9B2B8, 0xB8BCB7B8, 0xB8B7BAB8, 0xBABAB7BA,
+ 0xB7BAB8B8, 0xB7B8BCB7, 0xB6B4B8BC, 0xABADADB3,
+ 0xB6B0B3B1, 0xB7B2B5B8, 0xB0B4AFB3, 0xB3B0B4AF,
+ 0xB3AFB4B8, 0xB3B7B2B2, 0xB3B1B8B1, 0xB9B4B2BA,
+ 0xB5BBB6B3, 0xA0AFB6AF, 0xA8A19FA7, 0xA1A99FA0,
+ 0x989EA499, 0xA4989EA5, 0x9EA598A0, 0x9DA2A69B,
+ 0xA09AA1A6, 0x9EA29C9C, 0x9FA0A49F, 0xA3A1A0A4,
+ 0xA0A3A1A0, 0x00212422, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x55510001, 0x807F7B56, 0x7D7E7F7B, 0x84838081,
+ 0x87848086, 0x7B83807C, 0x827D8380, 0x84817C85,
+ 0x7D83847B, 0x847B8586, 0x85867D83, 0x7D808178,
+ 0x89808586, 0x88898088, 0x7985867D, 0x867D8182,
+ 0x85867D85, 0x7B85867D, 0x837A8384, 0x88898082,
+ 0x7B83847B, 0x867D8384, 0x86877E85, 0x7B83847B,
+ 0x867D8384, 0x85867D85, 0x78888980, 0x81788081,
+ 0x83847B80, 0x7D898A81, 0x81788586, 0x83847B80,
+ 0x767F817B, 0x7D747A7C, 0x8182797C, 0x737D7E75,
+ 0x79707B7C, 0x78797078, 0x67707168, 0x69606F70,
+ 0x5A5B5268, 0x4054554C, 0x544E4849, 0x6B6D6752,
+ 0x9772736F, 0x9B959A9B, 0xAFB1AB9B, 0xB2B1B9AF,
+ 0xBBB5B4BC, 0xBFC1BBB7, 0xB8C0C1B8, 0xBFB9C0C1,
+ 0xBCC0BBBD, 0xB9BABDBB, 0xBDBBB8BB, 0xBCBFBDBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABEB9BC, 0xB9BBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBDB8BEB9, 0xB7BBB9BE,
+ 0xB1B0BAB4, 0xB2B1ABBC, 0x98B7A59B, 0xA797B6A8,
+ 0xB9A799B5, 0x9BBAA99D, 0xA798B7AA, 0xB7A396B6,
+ 0x96B7A497, 0xA796B7A7, 0xB9A897B9, 0x96BBA797,
+ 0xA796BBA7, 0xBBA597BB, 0x96BBA597, 0xA796BBA7,
+ 0xB9A597B9, 0x97BBA597, 0xA597BBA5, 0xBBA597BB,
+ 0x97BBA597, 0xA597BBA5, 0xB8A496B8, 0x96B6A496,
+ 0xA497B7A3, 0xBBA395B9, 0x97BBA597, 0xA597BBA5,
+ 0xB9A999BB, 0x99B9A899, 0xA89BBBA8, 0xB8A697B7,
+ 0x98B8A798, 0xAA9EBCA7, 0xBBAEA3BD, 0xA8BDACA4,
+ 0xB1ADC0AF, 0xBDAFAABF, 0xB7C3AEAD, 0xB7B8C2B7,
+ 0xB8B3B4BE, 0xACBCACAC, 0xA8A3B8AF, 0xB9AAA1BB,
+ 0x9DBCA79E, 0xA798B7AC, 0xB9A695B6, 0x97BBA797,
+ 0xA596BCA5, 0xBAA698BC, 0x94B8A496, 0xA698BCA2,
+ 0xBBA597BB, 0x94B6A796, 0xA294B6A4, 0xB8A69BBC,
+ 0x97B8A097, 0xA297B8A2, 0xB8A594B9, 0x95B7A493,
+ 0xA395B7A5, 0xB8A497B7, 0x94B5A297, 0xA095B69D,
+ 0xB7A295B5, 0x95B7A697, 0xA395B7A3, 0xB8A393B5,
+ 0x95B7A696, 0xA595B7A5, 0xB6A493B8, 0x97B9A494,
+ 0xA897B8A8, 0xB7A998B9, 0x9CBAA798, 0xA69DB7A8,
+ 0xB5A7A1B8, 0xA6B3A8A5, 0xBAB6BCAD, 0xBCB9BBBB,
+ 0xBDBBBBBE, 0xB8BDBBB8, 0xB9B6BBB9, 0xBBB6B6BB,
+ 0xB8BCB7B7, 0xB8B6BCB7, 0xBCB6B8BF, 0xB7BBB5B8,
+ 0xB4B6BDB6, 0xBCB5B4BB, 0xB0B8B1B4, 0xB3B0B8B1,
+ 0xBBB6B3BA, 0xB6BCB7B5, 0xB5B5BCB5, 0xBFB9B5BC,
+ 0xB7BBB5BB, 0x8FAAABA7, 0x7C779293, 0x60645F78,
+ 0x464D4D47, 0x4E454E4F, 0x5859504D, 0x5A5D5D57,
+ 0x69636060, 0x68686269, 0x66696661, 0x706C6E6B,
+ 0x73706B73, 0x7576736E, 0x7C77807D, 0x7F7C7780,
+ 0x72767571, 0x726C7776, 0x73736D72, 0x7376736E,
+ 0x78737B78, 0x7A77727C, 0x707B7C73, 0x7D737679,
+ 0x7C7D737C, 0x797F7D75, 0x7C77817E, 0x817E7980,
+ 0x7C82827C, 0x7C788282, 0x7E7B777F, 0x79807D78,
+ 0x7C78817E, 0x817E7A7F, 0x76817D78, 0x78737F7B,
+ 0x7F7C787C, 0x757F7B7A, 0x79757876, 0x7B78747C,
+ 0x727A7A74, 0x76727878, 0x79767279, 0x727B7873,
+ 0x77727C7A, 0x7E7B767A, 0x00767571, 0x04000102,
+ 0x00040000, 0x00000100, 0x00000000, 0x2A282700,
+ 0x575F5B5A, 0x726A605C, 0x807B7275, 0x78817C73,
+ 0x7C738681, 0x86817883, 0x74828076, 0x7C71807E,
+ 0x8280757E, 0x72818175, 0x7E747E7E, 0x817F757F,
+ 0x71807C71, 0x7C71807C, 0x7E7C717E, 0x4B706C61,
+ 0x3B345954, 0x3F3B3641, 0x1444433F, 0x00001516,
+ 0x2F2D2C00, 0x423F3C37, 0x584E4C4A, 0x62635957,
+ 0x6A6E6D63, 0x6F647674, 0x78746971, 0x58706E63,
+ 0x645A6563, 0x5B585066, 0x2A47443F, 0x00002F2E,
+ 0x00000002, 0x01000102, 0x01010000, 0x00010001,
+ 0x9F383B39, 0xA49FA0A4, 0xA0A49EA0, 0x9CA0A49E,
+ 0xA49EA0A5, 0xA1A8A1A0, 0xA79EA7A4, 0xACA7A1AA,
+ 0xA8ACA7A6, 0xAFA8ACA7, 0xC3C1B0B4, 0xB8BBB9C0,
+ 0xBEBBBEBC, 0xBEBEBDC0, 0xBCBEBEBC, 0xBDBCBFBD,
+ 0xBFBDBCBF, 0xBABFBDBC, 0xBEB9BFBE, 0xC0BDBAC1,
+ 0xBAC1BEB9, 0xBEBAC1BE, 0xC0BFBAC1, 0xBAC0BFBA,
+ 0xBEBABFC0, 0xC0C0B8BD, 0xBAC0BFB8, 0xBEBCC1BF,
+ 0xC0BFBBC0, 0xB6BCBBBB, 0xB9B7BCBD, 0xBDBDAFB6,
+ 0xB6BEBEB5, 0xBEB8BEBD, 0xC0BEB9BF, 0xBABFBDBB,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBFC0C4BF,
+ 0x8282C0C4, 0x01010182, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xAAABA906, 0xBABDC0BE, 0xBFBABBBF, 0xB8BCB7BB,
+ 0xBEB8BDBB, 0xC0BFBABF, 0xBABFBEBB, 0xBDBAC1BE,
+ 0xC0BDB9C0, 0xB7BEBBB9, 0xBBB7BEBB, 0xBFBDB7BE,
+ 0xB7BEBBBA, 0xBDB7BEBB, 0xC0BDB9C0, 0xB8BDBBB9,
+ 0xBBB8BDBB, 0xBBB9B8BD, 0xB7BCBAB6, 0xB6B4BBB8,
+ 0xBCB7B3B8, 0xB7BBB6B8, 0xB9B7BAB8, 0xBABAB8BB,
+ 0xB6B8B8B8, 0xB7B8BBB9, 0xBAB8B8BC, 0xB3B5B5B7,
+ 0xB9B9BCBA, 0xB7B2B8BB, 0xB1B5B0B3, 0xB6B5B9B4,
+ 0xB8B4B7BB, 0xB8BCB7B7, 0xB1B5BCB5, 0xB7B0B0B8,
+ 0xB6BDB6B0, 0xA1AFB6AF, 0xA8A1A1A8, 0xA1A99FA1,
+ 0x9BA2A99C, 0xA89CA3AA, 0xA0A498A4, 0x9AA2A69B,
+ 0xA09AA0A3, 0xA0A49E9C, 0x9EA0A49E, 0xA49FA0A4,
+ 0x6E726DA0, 0x00000100, 0x00000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x01010100, 0x00000000,
+ 0x55510001, 0x807F7B56, 0x7B7E7F7B, 0x807C7E7F,
+ 0x84817D81, 0x7B83807B, 0x847F8380, 0x84817C87,
+ 0x7D84857C, 0x867D8586, 0x85867D85, 0x8083847B,
+ 0x8A818889, 0x88898089, 0x7D85867D, 0x867D8586,
+ 0x83847B85, 0x7B83847B, 0x89808384, 0x88898088,
+ 0x7B85867D, 0x847B8384, 0x83847B83, 0x7A86877E,
+ 0x81788283, 0x7F807780, 0x79808178, 0x81788182,
+ 0x83847B80, 0x7D84857C, 0x857C8586, 0x7F807784,
+ 0x797F7F79, 0x7C737D7F, 0x7F80777B, 0x717D7E75,
+ 0x7970797A, 0x78797078, 0x68707168, 0x62597071,
+ 0x595A5161, 0x40484940, 0x554F4849, 0x6A6C6653,
+ 0x96878983, 0x9C969A9C, 0xAEB1A89A, 0xB1B3B8AF,
+ 0xC0BAB3BB, 0xBEC0BABC, 0xBABEC0BA, 0xBFB9BEC0,
+ 0xBABEB8BB, 0xBBBCC0BB, 0xBBB9BABD, 0xB8BBB9B8,
+ 0xBCB8BDBB, 0xBFBDB9BE, 0xBABDBBBC, 0xB9BABEB9,
+ 0xBFBABABE, 0xB9BEBCBB, 0xB9B9BEBC, 0xB0B9B3B8,
+ 0xACA9B8B1, 0xB9ACA5BA, 0x98B7AA9F, 0xA798B7A7,
+ 0xB9A89CB8, 0x9DBCAA9F, 0xAA9BBAAC, 0xB7A497B7,
+ 0x98B8A497, 0xA897B8A7, 0xB8A998BA, 0x96BBA796,
+ 0xA796BBA7, 0xBBA597BB, 0x96BBA597, 0xA796BBA7,
+ 0xBBA597BB, 0x97BBA597, 0xA596BCA5, 0xBBA597BB,
+ 0x96BBA597, 0xA796BBA7, 0xB9A595B7, 0x96B8A597,
+ 0xA496B8A4, 0xBBA496BA, 0x96BCA597, 0xA597BBA5,
+ 0xBCA898BA, 0x99BBAA9A, 0xAA9ABCA9, 0xB8A798B8,
+ 0x99B9A798, 0xAA9BBAA8, 0xB9A99DB9, 0xA8BDAA9F,
+ 0xAFA8BDAF, 0xBFB0ABC0, 0xB2C2B0AC, 0xAEAEBCB3,
+ 0xBCADADBB, 0xA3B8AFAC, 0xABA3BAAA, 0xBBAAA1BC,
+ 0x9DBBA79D, 0xA697B7A9, 0xB7A596B6, 0x97BBA595,
+ 0xA397BBA5, 0xB8A698BC, 0x94B8A493, 0xA698BCA2,
+ 0xBBA796BB, 0x94B6A796, 0xA597B9A4, 0xB6A499BA,
+ 0x97B8A095, 0xA496B8A2, 0xB8A294B8, 0x95B7A493,
+ 0xA395B7A5, 0xB6A095B6, 0x94B8A095, 0xA095B6A0,
+ 0xB7A597B9, 0x96B8A497, 0xA494B6A4, 0xB7A494B6,
+ 0x94B6A595, 0xA595B7A4, 0xB7A190B5, 0x95B7A595,
+ 0xA998B9A6, 0xB8A798B8, 0x9BB9A899, 0xAA9EBAA7,
+ 0xB7AAA2B9, 0xA4B3AAA4, 0xB5B0B9AB, 0xBBBEBDBF,
+ 0xBDBBBABD, 0xB8BDBBB8, 0xBDB7BCBA, 0xBFBABABF,
+ 0xBABEB9BB, 0xB6B8BEB9, 0xBCB6B6BD, 0xB8BCB6B8,
+ 0xB6B5BCB5, 0xBBB4B6BD, 0xAFB7B0B4, 0xB3B0B8B1,
+ 0xB9B4B2BA, 0xB2B8B3B3, 0xB5B1B8B1, 0xBBB5B5BC,
+ 0xB6BAB4B7, 0x8FAAABA7, 0x7D789293, 0x62635F79,
+ 0x424D4C48, 0x524C4848, 0x53534D52, 0x5B5D5D57,
+ 0x645E6161, 0x68686264, 0x6B6F6C67, 0x706B7370,
+ 0x76736E73, 0x7177746C, 0x78737C79, 0x76736E7C,
+ 0x6A72726C, 0x6F697070, 0x70706A6F, 0x74797973,
+ 0x78737C79, 0x7B78737B, 0x70767872, 0x7B727679,
+ 0x7D7E757A, 0x77807D78, 0x7C777F7C, 0x827F7A7F,
+ 0x7783837D, 0x7F7B7D7D, 0x827F7B82, 0x787F7C77,
+ 0x7E7A7E7E, 0x817E7A81, 0x797E7B77, 0x7C78807D,
+ 0x7A79757F, 0x75787773, 0x79757A79, 0x7A77737A,
+ 0x77787872, 0x7C787D7D, 0x7F7C787F, 0x707B7873,
+ 0x78737A78, 0x7B78737B, 0x00757470, 0x04000203,
+ 0x00040000, 0x00000100, 0x00000000, 0x28292700,
+ 0x575F5C58, 0x71685F5C, 0x7F7A7176, 0x73868178,
+ 0x7C73817C, 0x817D7283, 0x76817F75, 0x80758282,
+ 0x82807582, 0x75808074, 0x8177807F, 0x807F7582,
+ 0x717E7C72, 0x7B717E7C, 0x7E7C717D, 0x60716D62,
+ 0x544B6F6B, 0x403D3559, 0x2944443E, 0x00002C2D,
+ 0x2D2B2A02, 0x433F3C38, 0x56504B48, 0x60635A54,
+ 0x676D6B63, 0x6F67716F, 0x77756B72, 0x5B6F6D65,
+ 0x635B6563, 0x5A575265, 0x2C474440, 0x01002F2D,
+ 0x01010100, 0x01000001, 0x00000000, 0x00010000,
+ 0x9F383B39, 0xA49FA0A4, 0xA1A59FA0, 0x9FA3A7A1,
+ 0xA49EA3A8, 0x9EA59EA0, 0xA49CA39E, 0xACA7A0A7,
+ 0xA8ACA7A8, 0xA7A8ACA7, 0xBBB9A6AC, 0xB6BBB9B6,
+ 0xBBBBBEBC, 0xBDBBBABD, 0xBABDBBBA, 0xBBBABDBB,
+ 0xBBB9BABD, 0xB6BBB9B8, 0xBAB5BCB9, 0xBBB9B4BD,
+ 0xB6BBB9B6, 0xBBB7BEBB, 0xBFBEB7BE, 0xBABFBEBA,
+ 0xBCB9BEBD, 0xBFC0B7BD, 0xBAC0BFBA, 0xBFB9C0BD,
+ 0xC0BFBBC2, 0xB2B8B7BB, 0xBDB7BCBD, 0xBDBDB5BD,
+ 0xB7BDBCB5, 0xBFBBC1C0, 0xBFBEBAC0, 0xBABFBDBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBBC0BEBA, 0xC0C0C4BF,
+ 0x8282C1C5, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xAAABA906, 0xB9BCBFBD, 0xC0BBBABE, 0xB8BCB7BC,
+ 0xBEB7BCBA, 0xBFBEBAC1, 0xB8BDBCBA, 0xBDBABFBD,
+ 0xBFBEBABF, 0xB9BFBEBA, 0xBFB9BFBE, 0xC0BFB8C0,
+ 0xB9BFBEBA, 0xBEB7BDBC, 0xBFBEB9BF, 0xBABFBEBA,
+ 0xBCB9BEBD, 0xBDBCB8BD, 0xB9BEBCB8, 0xB7B6BBB9,
+ 0xBEB9B6BC, 0xBABEB9BA, 0xBBB7BCBA, 0xBABBB7BC,
+ 0xB9BBBBB8, 0xB7B6BBB9, 0xBCBAB6BC, 0xB5BAB8B7,
+ 0xB4B4BBB8, 0xB2AFB0B7, 0xB0B5B3AB, 0xB9B5B8B6,
+ 0xB9B4B8BB, 0xB3B7B1B5, 0xB2B1B9AF, 0xBBB2B4BC,
+ 0xB8BDB4B6, 0x99A8ADA4, 0xA39A9DA2, 0xA2A79E9E,
+ 0x9A9FA79C, 0xA4999EA7, 0x9FA59A9E, 0x9CA0A39A,
+ 0xA39AA2A5, 0xA0A39AA0, 0x99A0A499, 0xA39AA0A4,
+ 0x757771A0, 0x00000100, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x28000100,
+ 0x7D79292A, 0x7D7C787E, 0x7A7E807A, 0x817B7E80,
+ 0x85827D81, 0x7B85837B, 0x867D8583, 0x88898085,
+ 0x7B84857C, 0x847B8384, 0x83847B83, 0x81888980,
+ 0x867D898A, 0x88898085, 0x7C888980, 0x847B8485,
+ 0x88898083, 0x8085867D, 0x89808889, 0x85867D88,
+ 0x8083847B, 0x867D8889, 0x85867D85, 0x8184857C,
+ 0x867D898A, 0x84857C85, 0x7C828078, 0x847C8684,
+ 0x82807886, 0x7B838179, 0x7F7A8583, 0x80807A82,
+ 0x7A7D7D77, 0x7C738080, 0x7B7C737B, 0x727B7873,
+ 0x746C7A77, 0x7C7A7276, 0x5D707168, 0x5C536566,
+ 0x5152495B, 0x41484940, 0x5953494A, 0x6A6C6657,
+ 0x8F868882, 0xA89F9598, 0xB3B8AFA3, 0xB6B8BBB2,
+ 0xC1BBBCBF, 0xBDC1BBBD, 0xB9BDC1BB, 0xC1BBBBBF,
+ 0xBBBFB9BD, 0xBABBBFBA, 0xBEB9BBBF, 0xBBBFBABA,
+ 0xBCBABDBB, 0xBFBDBBBE, 0xBBBEBCBC, 0xBDBCBFBD,
+ 0xBFBDBCBF, 0xBABFBDBC, 0xBBBCC0C1, 0xA5B4B2B6,
+ 0xA8A4B7A8, 0xB8A59DB4, 0x9CB8A99E, 0xA799B5AA,
+ 0xBDAA9FB9, 0xA1C0AEA3, 0xAC9DBCB0, 0xB8A699B9,
+ 0x99B9A598, 0xA798B8A8, 0xB5A798B8, 0x96B8A495,
+ 0xA696B8A6, 0xBBA597BB, 0x96BBA597, 0xA796BBA7,
+ 0xBBA597BB, 0x97BBA397, 0xA597BBA5, 0xBBA796BB,
+ 0x97B9A796, 0xA797B9A7, 0xB7A494B6, 0x97B9A595,
+ 0xA496BAA5, 0xBBA397BB, 0x97BBA397, 0xA597BBA5,
+ 0xBBA698BC, 0x98BDA597, 0xA898BAA9, 0xB7A798B8,
+ 0x9DBDA697, 0xAA9DBDAA, 0xBCA89CBA, 0xA5BCACA0,
+ 0xB0A8BFAD, 0xBCADA7BE, 0xA9BCACA7, 0xADA9BCAD,
+ 0xBDAEA9BE, 0x9FB9ADA8, 0xAA9EBAAA, 0xBAA69CBA,
+ 0x99B9A69C, 0xA597B9A6, 0xB5A294B6, 0x94B8A193,
+ 0xA195B9A0, 0xB6A395B9, 0x94B6A294, 0xA496BAA2,
+ 0xBAA698BC, 0x94B6A496, 0xA798B8A4, 0xBAA597B9,
+ 0x97B9A698, 0xA294B6A5, 0xB9A294B6, 0x96B8A597,
+ 0xA698BAA4, 0xB8A499BA, 0x94B8A094, 0xA499BAA0,
+ 0xB8A99BBD, 0x94B6A598, 0xA292B4A2, 0xB7A494B6,
+ 0x96B8A595, 0xA193B7A6, 0xB7A594B9, 0x97B9A595,
+ 0xA798B8A8, 0xB8A498B6, 0x9CBAA69A, 0xA89CB8A8,
+ 0xB7A79DB4, 0xA7B8A9A2, 0xB0ACB8AF, 0xBBBABBBF,
+ 0xBCBCB9BB, 0xBABCBCBA, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBBB9BCBA, 0xBEB9BABD, 0xB5BBB6B8,
+ 0xB4B8BCB7, 0xB4ADB3B9, 0xB2B9B2AD, 0xB4B3B9B4,
+ 0xBDB6B3B9, 0xB4BBB4B6, 0xB5B2BAB3, 0xB9B4B4BC,
+ 0xB6BCB7B3, 0x97B0B4AF, 0x8280989C, 0x68696581,
+ 0x404D4C48, 0x4C484744, 0x504D484F, 0x525A5752,
+ 0x5E595A57, 0x68656061, 0x676D6B63, 0x6B66716F,
+ 0x74706B6F, 0x6D77756D, 0x75707775, 0x73706B78,
+ 0x6870706A, 0x756C7071, 0x76787272, 0x757A7C76,
+ 0x74707A79, 0x79787475, 0x727A7B77, 0x78727678,
+ 0x80807A78, 0x757D7D77, 0x7B757B7B, 0x7F7F797B,
+ 0x737C7C76, 0x7B787B78, 0x807B7880, 0x787D7A75,
+ 0x7E78807D, 0x7B7A767E, 0x7F7F7D7C, 0x78778280,
+ 0x7C7B777A, 0x787A7B77, 0x7B777B7C, 0x7A79757C,
+ 0x757D7A75, 0x7A767D7A, 0x7877737B, 0x77787872,
+ 0x7C777D7D, 0x76736E7F, 0x00787872, 0x03000103,
+ 0x00040000, 0x00000100, 0x01010000, 0x28292701,
+ 0x58625F5A, 0x74696260, 0x827E7378, 0x74858176,
+ 0x7D72837F, 0x827F7181, 0x77848277, 0x82778383,
+ 0x807E7384, 0x78838177, 0x7E768482, 0x7F7D7581,
+ 0x78808178, 0x80788182, 0x82817782, 0x727D7B70,
+ 0x5449817D, 0x55534958, 0x484E4B46, 0x32314D4C,
+ 0x02000036, 0x0A0D0B0B, 0x0C0A0B0C, 0x10110F0B,
+ 0x0F10110F, 0x100F1210, 0x11100C12, 0x1010110F,
+ 0x100F1112, 0x12100F12, 0x060D0B0A, 0x01000907,
+ 0x00010000, 0x00000000, 0x00000000, 0x01020000,
+ 0x9F383B39, 0xA49FA0A4, 0xA0A49EA0, 0x9FA0A49E,
+ 0xA9A2A3A8, 0xA2A9A2A2, 0xA2A0A49F, 0xA8A6A3A7,
+ 0xA5A8A6A7, 0x96A5A9A4, 0xB6B3959B, 0xBAC1BEAF,
+ 0xBCBABFBD, 0xC1BCBDC1, 0xBCC0BBBD, 0xBDBDC1BC,
+ 0xC0BEBEC2, 0xBBC0BEBD, 0xBFB8BEBD, 0xBBBAB8C0,
+ 0xB8BDBCB6, 0xBBB5BBBA, 0xBBBAB6BC, 0xB7BCBBB6,
+ 0xB8B5BAB8, 0xBDBCB5BA, 0xB8BEBDB7, 0xBAB6BDBA,
+ 0xBCBBB4BD, 0xB3B9B8B6, 0xC0B9BFBE, 0xBFBEBBC1,
+ 0xBAC0BFB9, 0xBEB8BEBD, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBBB8BDBB, 0xBFBDB8BD, 0xBABFBDBA, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xABACAA06, 0xBBC0C3C1, 0xBFBABCC0, 0xB9BFBABB,
+ 0xBDB8BDBB, 0xBFBEB9C0, 0xBABFBEB9, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBABFBEBA, 0xC0BAC0BF, 0xB7B7B9C1,
+ 0xB8C0C0AF, 0xBEB9BFBE, 0xBCBDB9BF, 0xBBC0BFB8,
+ 0xBBB7BDBC, 0xBDBCB6BC, 0xB8BDBCB8, 0xB7B6BBB9,
+ 0xBCB7B6BC, 0xB8BCB7B8, 0xBBB7BCBA, 0xBBBBB7BC,
+ 0xB9BBBBB9, 0xB6B6BBB9, 0xB9B6B2B9, 0xB3BBBAB2,
+ 0xB5B3BBBA, 0xB7B4ACB7, 0xB5BCB9B0, 0xB9B2B7B5,
+ 0xB7B2B8BB, 0xB3B7B1B3, 0xB1B4BCB2, 0xBCB1B4BC,
+ 0xB6BCB1B6, 0x9DA5ABA0, 0xA79EA2A8, 0xA6ABA2A4,
+ 0x9A9DA59A, 0xA59A9DA5, 0x9FA59A9F, 0x9AA1A49B,
+ 0xA39AA0A3, 0xA0A499A0, 0x97A1A599, 0xA4999FA3,
+ 0x1A1C16A0, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x28000100,
+ 0x7C782B29, 0x7F7C787F, 0x7A81817B, 0x857D8283,
+ 0x85837B87, 0x7D85837B, 0x857C8586, 0x85867D84,
+ 0x7E84857C, 0x867D8687, 0x83847B85, 0x7D898A81,
+ 0x867D8586, 0x84857C85, 0x7B85867D, 0x847B8384,
+ 0x83847B83, 0x7B83847B, 0x89808384, 0x898A8188,
+ 0x8085867D, 0x847B8889, 0x83847B83, 0x7B83847B,
+ 0x847B8384, 0x84857C83, 0x7D8F8D85, 0x837B8785,
+ 0x82807885, 0x7B838179, 0x7E798583, 0x85827D81,
+ 0x7A80807A, 0x7C738080, 0x7B7C737B, 0x6E7C7974,
+ 0x70687673, 0x74756C72, 0x5C707168, 0x5C536465,
+ 0x5051485B, 0x40484940, 0x6A664849, 0x68696569,
+ 0x8F868882, 0xA99F9398, 0xB1B9AFA1, 0xB8B8BCB1,
+ 0xC0BABFC3, 0xBDC1BBBC, 0xBABDC1BC, 0xBEB8BBBF,
+ 0xBCC0BABA, 0xBABBBFBA, 0xC0BABBBF, 0xBBBFBABC,
+ 0xBCBCBFBD, 0xBDBBBBBE, 0xBABDBBBA, 0xBDBBBEBC,
+ 0xBFBDBCBF, 0xBABFBEBC, 0xBFBBBFC0, 0xA5B5B4B7,
+ 0xA8A2B9A8, 0xB9A69DB7, 0x9EBAAA9F, 0xA799B5AC,
+ 0xBEAB9DB9, 0xA1C0B0A2, 0xAC9DBCB0, 0xB9A79ABA,
+ 0x98B8A699, 0xA798B8A7, 0xB6A798B8, 0x98B8A596,
+ 0xA697B7A7, 0xBBA597B9, 0x97BCA597, 0xA796BBA8,
+ 0xBCA596BC, 0x97BBA396, 0xA597BBA5, 0xBBA796BB,
+ 0x97B9A796, 0xA797B9A7, 0xB5A898BA, 0x96BBA393,
+ 0xA597BBA7, 0xBBA597BB, 0x97BBA397, 0xA597BBA5,
+ 0xBCA698BC, 0x97BCA698, 0xA897BCA8, 0xBAAA9ABC,
+ 0x99B9A99A, 0xA99CBCA6, 0xBAA89CBA, 0xA3BDAA9E,
+ 0xADA5BCAC, 0xBBAFA7BE, 0xA4BBAAA4, 0xADA8BDAA,
+ 0xBDAEA8BF, 0x9CBBACA3, 0xAC9DBCAB, 0xB9A89CBA,
+ 0x99BBA499, 0xA395B7A7, 0xB6A294B6, 0x98BCA095,
+ 0x9F93B7A4, 0xB7A496B8, 0x97B9A395, 0xA496BAA5,
+ 0xBBA597BB, 0x95B7A597, 0xA798B8A5, 0xB8A597B9,
+ 0x97B9A496, 0xA494B6A7, 0xB9A294B6, 0x98BAA597,
+ 0xA597BBA6, 0xB8A294B8, 0x94B8A294, 0xA698BAA2,
+ 0xB5A69BBC, 0x92B49F94, 0xA494B6A0, 0xB7A595B7,
+ 0x94B6A595, 0xA594B9A4, 0xB8A493B8, 0x96B6A696,
+ 0xA596B6A5, 0xB9A297B7, 0x9AB8A59B, 0xA89CB8A6,
+ 0xB7ACA1BB, 0xA6B9ABA2, 0xB0ACB8AC, 0xBDB7B7BD,
+ 0xBDBDBABC, 0xBABCBCBB, 0xBAB6BBB9, 0xBBB9B7BC,
+ 0xB8BDBBB6, 0xBBBABDBB, 0xBBB6BABD, 0xB5BBB6B5,
+ 0xB2B3B7B2, 0xB7B2B3B7, 0xB3B9B4B1, 0xB3B2B8B3,
+ 0xBBB4B2B8, 0xB2B9B2B4, 0xB5B2BAB3, 0xB9B4B4BC,
+ 0xB5BBB6B3, 0x97B0B4AF, 0x817F989C, 0x696A6880,
+ 0x40565551, 0x44404744, 0x4F4C4847, 0x595A5752,
+ 0x6560615E, 0x6F6C6768, 0x606B6961, 0x68636A68,
+ 0x6B68636C, 0x69727068, 0x6A657371, 0x73706B6D,
+ 0x6B74726A, 0x766D7374, 0x76797075, 0x75797A76,
+ 0x77737879, 0x7A797578, 0x73757672, 0x78727478,
+ 0x80807A76, 0x727B7B75, 0x7A747878, 0x76787278,
+ 0x747A7A74, 0x77747C79, 0x7D78757C, 0x747B7873,
+ 0x7B757C79, 0x7E7D797B, 0x80797A78, 0x7C7B8080,
+ 0x7B7A767E, 0x74787975, 0x7975787A, 0x7C7B7778,
+ 0x757C7C76, 0x7A767D7A, 0x7D7C787B, 0x77797973,
+ 0x77727D7D, 0x75756F7A, 0x25787872, 0x0500292B,
+ 0x00040001, 0x00000000, 0x00000000, 0x27282600,
+ 0x5760605A, 0x74696261, 0x827F7176, 0x76837F74,
+ 0x81738581, 0x86837584, 0x75848375, 0x82778483,
+ 0x84827784, 0x76858379, 0x7F778280, 0x7F7C7782,
+ 0x78808178, 0x82797E81, 0x82817781, 0x727D7B71,
+ 0x7C727F7D, 0x56544A7E, 0x2F4F4C47, 0x18173433,
+ 0x0200001A, 0x00020000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00020000, 0x01000200,
+ 0x01020000, 0x00000000, 0x00000000, 0x00010000,
+ 0x9F373A38, 0xA49FA0A4, 0xA0A49EA0, 0x9C9DA19B,
+ 0xA59EA0A5, 0x9DA19B9E, 0xA7A0A49F, 0xABA9A8AC,
+ 0xA8ABA9AA, 0xA7A6AAA5, 0xC0BFA4A9, 0xBAC0BFBA,
+ 0xB9B6BBB9, 0xBFBABABE, 0xBCC0BBBB, 0xBCBDC1BC,
+ 0xC0BEBDC1, 0xBABFBDBD, 0xC0BAC0BF, 0xBEBFBBC1,
+ 0xBBC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0, 0xBBC0BEBB,
+ 0xBBB8BDBB, 0xBDBCB8BD, 0xB6BCBBB7, 0xBAB4BCBB,
+ 0xB9B8B4BD, 0xAEB6B5B1, 0xB8B5BBBA, 0xBBB9B4BB,
+ 0xB8BDBBB6, 0xBEBBC0BF, 0xBFBEB9BF, 0xB9BEBDBA,
+ 0xBCBABFBD, 0xBFBDB9BE, 0xBABFBDBA, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x0609050A, 0x05070704,
+ 0xAAABA906, 0xB9BDC0BE, 0xBFBABABE, 0xB9BFBABB,
+ 0xBDB8BDBB, 0xBFBEB9C0, 0xB9BFBEB9, 0xBDB9C0BD,
+ 0xC0BEB9C0, 0xBBC0BEBB, 0xABBAC0BF, 0xACADA6AC,
+ 0xBABFC0A7, 0xBDB9BFBE, 0xC0BFB9C0, 0xB9BFBEBA,
+ 0xBAB7BDBC, 0xBDBCB5BB, 0xB6BCBBB7, 0xBBBBC0BF,
+ 0xBEBCB8BD, 0xB8BDBBB9, 0xBBB7BCBB, 0xBBBBB7BC,
+ 0xB6BBB9B9, 0xB2B5BBBA, 0xB2B2ABB3, 0xACB8B8A8,
+ 0xB2A9B5B5, 0xBAB9A6B2, 0xB5BCB9B2, 0xB4B3B8B6,
+ 0xB6B1B3B9, 0xB3B7B1B2, 0xAFB1B9AF, 0xB9AFB0B9,
+ 0xB6BBB2B1, 0x9EA6ABA2, 0xA89DA4A7, 0xA2A89DA4,
+ 0x9C9DA59B, 0xA3989FA7, 0xA1A59A9D, 0x9AA1A49B,
+ 0xA39AA0A3, 0x9FA398A0, 0x989FA397, 0xA499A0A4,
+ 0x1A1C16A0, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x01010100, 0x28000100,
+ 0x7B7A2B29, 0x817C7980, 0x7D80807A, 0x857D8586,
+ 0x85837B87, 0x7B85867D, 0x867D8384, 0x83867D85,
+ 0x7D888980, 0x89808586, 0x83847B88, 0x7D82837A,
+ 0x867D8586, 0x85867D85, 0x7F85857F, 0x837D8585,
+ 0x84847E83, 0x7B83847B, 0x867D8384, 0x84857C85,
+ 0x8083847B, 0x847B8889, 0x86877E83, 0x7D85867D,
+ 0x867D8586, 0x85867D85, 0x828F8D85, 0x81798C8A,
+ 0x82807883, 0x7A87847F, 0x807B827F, 0x827F7A83,
+ 0x787D7E75, 0x7F768081, 0x7D7E757E, 0x737E7B76,
+ 0x71687B78, 0x70716870, 0x5D707168, 0x5C536366,
+ 0x5051485B, 0x5247483E, 0x6B66585B, 0x797D7867,
+ 0x8F959791, 0xA8A19398, 0xB1B9AFA1, 0xB5B8BCB1,
+ 0xC2BCBCC0, 0xBDC1BBBE, 0xBCBCC0BB, 0xBFB9BDC1,
+ 0xBAC1BABB, 0xB9B9BFBA, 0xBFBAB8BE, 0xBABEB9BB,
+ 0xBDBEBFBD, 0xBFBDBCBF, 0xB8BDBBBC, 0xBCB9BBBB,
+ 0xBEBCBABC, 0xBBC0BFBB, 0xBEBBBFC0, 0xA4B7B3B6,
+ 0xA8A2B9A8, 0xBBA69DB7, 0x9BBAAB9F, 0xA999B8AA,
+ 0xBCA898B7, 0x9CBDAD9D, 0xA798B8AD, 0xBAA597B9,
+ 0x98BAA698, 0xA897B8A8, 0xB7A897B8, 0x97B8A898,
+ 0xA697B7A8, 0xB9A597B9, 0x97B9A597, 0xA696B8A7,
+ 0xBBA597BB, 0x96BBA597, 0xA796BBA7, 0xBBA597BB,
+ 0x97BBA597, 0xA597BBA5, 0xB9A998BD, 0x96BBA594,
+ 0xA597BBA7, 0xBBA597BB, 0x97BBA597, 0xA597BBA5,
+ 0xBCA799BD, 0x96BDA698, 0xA897BCA8, 0xBAA999BB,
+ 0x9ABCA99A, 0xAC9DBDAA, 0xBAA89CBA, 0xA5BFABA0,
+ 0xACA3BDB0, 0xBBABA2BC, 0xA3BAACA4, 0xADA5BCAB,
+ 0xBAACA3BD, 0x9CBBABA0, 0xA796B7AC, 0xB9A699B9,
+ 0x99BAA499, 0xA196B7A4, 0xBAA397BB, 0x98BCA296,
+ 0xA397BBA4, 0xB6A297B8, 0x96BAA095, 0xA496BAA2,
+ 0xB7A597BB, 0x93B5A595, 0xA898BAA3, 0xB9A597BB,
+ 0x93B5A597, 0xA393B5A3, 0xBBA597B9, 0x98BCA597,
+ 0xA496BAA6, 0xB8A294B8, 0x94B6A294, 0xAA9CBEA2,
+ 0xB4A499BA, 0x97B99E93, 0xA294B6A5, 0xB6A595B7,
+ 0x95B7A494, 0xA595B7A5, 0xB7A595B7, 0x97B7A497,
+ 0xA497B7A4, 0xB7A398B8, 0x9AB8A297, 0xAA9CB8A6,
+ 0xB8ADA0BA, 0xA8B9ACA3, 0xB0ACB8AE, 0xBDB7B7BD,
+ 0xBCBCBABC, 0xBABCBCBA, 0xBBB6BBB9, 0xBEBCB8BD,
+ 0xB8BDBBB9, 0xB9BABDBB, 0xBCB7BABE, 0xB0B7B0B6,
+ 0xB3B5B9B4, 0xB9B4B4B8, 0xB4B8B3B5, 0xB5B7BBB6,
+ 0xBBB4B7BB, 0xB3BAB3B4, 0xB4B0B8B1, 0xBAB3B3BB,
+ 0xB4BBB4B2, 0x97B0B4AF, 0x9B99989C, 0x8182809A,
+ 0x3F535450, 0x433F4443, 0x504D4946, 0x57575751,
+ 0x65605F60, 0x6F6C6768, 0x61727068, 0x68636B69,
+ 0x67645F6B, 0x6B696661, 0x706C7370, 0x76736E73,
+ 0x6C7A7870, 0x776E7475, 0x75766D76, 0x73757470,
+ 0x79757877, 0x7C7B777C, 0x72777874, 0x7C767377,
+ 0x7E807A7A, 0x71777771, 0x7A767777, 0x7C7D7979,
+ 0x777D7D77, 0x7C777F7C, 0x817D7880, 0x75797671,
+ 0x7C787D7A, 0x7C7D7B7D, 0x7D7C7C7C, 0x7B7A7D7D,
+ 0x7B7A767D, 0x73787773, 0x7C7A7677, 0x7677737B,
+ 0x727B7B75, 0x7C767A7B, 0x7E7E787C, 0x737B7873,
+ 0x79717B78, 0x74756C7B, 0x4B797A71, 0x03004F51,
+ 0x00040000, 0x00000000, 0x01010000, 0x28292701,
+ 0x575D5F59, 0x6B606061, 0x7F7E706D, 0x79888479,
+ 0x84798884, 0x85817688, 0x748A8779, 0x867B8582,
+ 0x8A867B8A, 0x78888479, 0x7F788681, 0x837F7A85,
+ 0x77838179, 0x81788081, 0x80817880, 0x4A7D7B73,
+ 0x554C5452, 0x2B2B2554, 0x00000100, 0x00000001,
+ 0x00000000, 0x00020000, 0x01010000, 0x00010001,
+ 0x00020000, 0x00000200, 0x00000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x9E3A3B39, 0xA49FA1A2, 0xA0A49EA0, 0x9FA1A8A1,
+ 0xA7A1A1A9, 0x9DA19BA3, 0xA4A0A49E, 0xABA9A3A9,
+ 0xA8ABA9A8, 0xA6979B96, 0xC0BFA3A8, 0xBAC0BFBA,
+ 0xB7B9BEBC, 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B8BCB7,
+ 0xBBB6B8BC, 0xB9BFBAB7, 0xBDB8BFBC, 0xBDBCB9C0,
+ 0xBBC0BFB8, 0xBEB9BFBE, 0xC0BEBAC1, 0xBBC0BEBB,
+ 0xBBB8BDBB, 0xBFBEB7BE, 0xB8C0BFB9, 0xBBB9C1C0,
+ 0xB9B8B4BC, 0xB4BCBBB1, 0xBCB9C0BD, 0xBBB9B9BE,
+ 0xB5BBB6B8, 0xB9B6BBB9, 0xBEBCB6BB, 0xBBBEBCBB,
+ 0xBDBBC0BE, 0xBFBDBABF, 0xBABFBDBA, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA9AAA806, 0xBABDC0BE, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBDB8BDBB, 0xBFBEB9C0, 0xB7BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xBBC0BEBA, 0xA3B1B7B6, 0xADAC9EA4,
+ 0xBAC0BFA7, 0xBDB9BFBE, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xBFB7BEBB, 0xC0BFBBC2, 0xB7BDBCBA, 0xBCB8BDBC,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB7BCBB, 0xBBB9B7BC,
+ 0xB6BBB9B8, 0xB6B5BBBA, 0xB5B5AFB7, 0xAEB7BAAB,
+ 0xABA1ADAD, 0xB6B5A1AB, 0xB1B8B5AE, 0xB3B1B6B4,
+ 0xBCB7B2B8, 0xB5B9B4B8, 0xB4B4BBB4, 0xBDB6B4BB,
+ 0xB3B7B1B6, 0x9EA2A6A0, 0xA79EA2A7, 0x9DA398A2,
+ 0x9AA1A69D, 0xA59A9FA5, 0xA0A4999F, 0x9CA0A39A,
+ 0xA39AA2A5, 0xA0A499A0, 0x98A0A498, 0x776EA0A4,
+ 0x1A1B1774, 0x00000000, 0x00000000, 0x01020000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00000000, 0x28000100,
+ 0x7B7A2B29, 0x807B7880, 0x7D827F7A, 0x88808586,
+ 0x87857D8A, 0x7D83847B, 0x867D8586, 0x86898083,
+ 0x7B83847B, 0x867D8384, 0x82837A85, 0x7E86877E,
+ 0x89808687, 0x88898088, 0x8082827C, 0x807A8686,
+ 0x85857F80, 0x8083847B, 0x867D8889, 0x83847B85,
+ 0x7D85867D, 0x867D8586, 0x85867D85, 0x7C85867D,
+ 0x867D8485, 0x83847B85, 0x8186847C, 0x847C8B89,
+ 0x86847C86, 0x7B827F7A, 0x7F7A8380, 0x827F7A82,
+ 0x737D7E75, 0x7C737B7C, 0x7B7C737B, 0x6D7B7873,
+ 0x71687572, 0x6F706770, 0x536E7168, 0x5C535B5C,
+ 0x5051485B, 0x51484940, 0x6B66575A, 0x787C7767,
+ 0x8F959791, 0xA99F9398, 0xB1B9AFA1, 0xB6B6BBB2,
+ 0xC2B9BCBF, 0xBDC1BBBD, 0xBABFC0BC, 0xC0B9BBBF,
+ 0xB9C0B9B9, 0xBAB9BFBA, 0xBEB9B9BF, 0xBBBFBABA,
+ 0xBDBCBFBD, 0xBFBDBCBF, 0xBABFBDBA, 0xBEBCBEBE,
+ 0xBEBCBCBE, 0xBABCBCBB, 0xB6BBBFC0, 0xA4B7ACAE,
+ 0xAAA2B9A8, 0xB8A89DB7, 0x98B7A89C, 0xA897B8A7,
+ 0xB8A998B9, 0x97B8A897, 0xA798B8A8, 0xBAA698BA,
+ 0x98BAA698, 0xA897B8A8, 0xB7A897B8, 0x97B8A898,
+ 0xA897B8A8, 0xB9A797B9, 0x97B9A597, 0xA597B9A5,
+ 0xBBA597BB, 0x97BBA597, 0xA597BBA5, 0xBBA597BB,
+ 0x97BBA597, 0xA597BBA3, 0xBBA597BB, 0x94B9A796,
+ 0xA496BAA5, 0xBBA597BB, 0x97BBA597, 0xA799BBA5,
+ 0xBDAA9CBE, 0x98BDA99B, 0xA897BCA9, 0xBBA999BB,
+ 0x98BDA999, 0xA799BBA9, 0xB8A89CBA, 0x9CB8A89C,
+ 0xAB9FBBA8, 0xB9AA9EBA, 0xA0BAA89F, 0xAA9FB9A9,
+ 0xB9AEA3BD, 0x98B7AB9D, 0xA798B8A8, 0xB9A396B6,
+ 0x98B9A398, 0xA095B6A3, 0xBEA599BD, 0x96BAA69A,
+ 0xA397BBA2, 0xB6A196B7, 0x94B8A095, 0xA395B9A0,
+ 0xB6A597BB, 0x94B6A294, 0xA698BAA4, 0xBBA597BB,
+ 0x94B6A597, 0xA294B6A2, 0xBCA597BB, 0x95BBA596,
+ 0xA697BDA4, 0xB5A294B8, 0x98BAA193, 0xAB9DBFA6,
+ 0xB6A398B9, 0x97B9A095, 0xA294B6A5, 0xB8A392B7,
+ 0x97B9A493, 0xA897B9A8, 0xB7A697B7, 0x97B7A497,
+ 0xA497B7A4, 0xB7A095B6, 0x99B9A297, 0xAA9CB8A6,
+ 0xB7AA9DB7, 0xA7B8ABA2, 0xAEADB7AD, 0xBDB3B6BB,
+ 0xBCBDB8BC, 0xBABCBCBA, 0xBEB8BDBC, 0xBDBBBBC0,
+ 0xB8BDBBB8, 0xB8B9BEBC, 0xB7B2B5BA, 0xB6BCB7B1,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB5B9B4B8, 0xB4B7BBB5,
+ 0xBCB5B4BB, 0xB1B8B1B5, 0xB1B1B9AF, 0xB9AFB3BB,
+ 0xB2B9B2B1, 0xB0AFB3AE, 0x9B99B1B5, 0x8182809A,
+ 0x405B5C58, 0x44404646, 0x44443E45, 0x59585852,
+ 0x66605F5F, 0x66666066, 0x616E6C64, 0x645F6B69,
+ 0x67645F67, 0x6B686862, 0x746F7171, 0x78757077,
+ 0x6876736E, 0x71687071, 0x78787270, 0x757C7B77,
+ 0x74707A79, 0x75747075, 0x76757672, 0x7C76787C,
+ 0x7C7C767A, 0x757B7B75, 0x7D797B7B, 0x7E7D797E,
+ 0x757A7A74, 0x77727B7B, 0x7976717A, 0x7D7D7A75,
+ 0x7D7B8281, 0x7B7C7A7C, 0x7B7C7D7B, 0x7A767C7D,
+ 0x7B7A767B, 0x737A7975, 0x7A787877, 0x78797579,
+ 0x7A787872, 0x7A758080, 0x7B7B757D, 0x6E7F7C77,
+ 0x736E7673, 0x76736E76, 0x4B787872, 0x03014F51,
+ 0x00030102, 0x00000000, 0x00000000, 0x28292700,
+ 0x575E605A, 0x74696061, 0x807E7376, 0x76888479,
+ 0x84798581, 0x88847988, 0x79868375, 0x87798A87,
+ 0x8682778A, 0x77888479, 0x7C778381, 0x86827D80,
+ 0x78828078, 0x6D678081, 0x4848426D, 0x002C2B27,
+ 0x03000403, 0x02030002, 0x00000100, 0x01010000,
+ 0x00000100, 0x00000000, 0x01000200, 0x00010000,
+ 0x00020000, 0x00000200, 0x00000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000101, 0x00000000, 0x00010000,
+ 0x9F393A36, 0xA49FA2A3, 0xA0A49EA0, 0x9C9EA59E,
+ 0xA7A19EA6, 0xA0A49EA3, 0xA1A1A8A1, 0xA9A4A1A8,
+ 0xA7ADA8A3, 0x99989C97, 0xC0BF969B, 0xBAC0BFBB,
+ 0xBCBBC0BE, 0xC1BCBDC1, 0xBCC0BBBD, 0xBABBBFBA,
+ 0xBFBABBBF, 0xB8BEB9BB, 0xBBB7BEBB, 0xBDBCB7BE,
+ 0xBABFBEB8, 0xBEBAC0BF, 0xC0BEBAC1, 0xBBC0BEBB,
+ 0xBAB7BEBB, 0xC0BFB6BD, 0xB8C0C0BA, 0xBBB8C0BF,
+ 0xBCBBB4BC, 0xBAC0BFB4, 0xBCBAC0BF, 0xBFBDB9BE,
+ 0xBABFBDBA, 0xBBBABFBD, 0xBBB9B8BD, 0xB8BBB9B8,
+ 0xB9B6BBB9, 0xBDBBB6BB, 0xB8BDBBB8, 0xBFBFC3BE,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xAAABA906, 0xBABDC0BE, 0xBFBAB9BF, 0xBBBFBABB,
+ 0xBDB6BBB9, 0xBFBEB9C0, 0xB9BEBFB9, 0xC0B8C0C0,
+ 0xBEBFB8C0, 0xB2B8B7B9, 0xA9AEB3B1, 0xB2B1A5AC,
+ 0xB7BFBEAC, 0xBEB7BFBE, 0xBDBBB9BF, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBFBCB8BD, 0xB8BEBDB8, 0xBDB9BFBE,
+ 0xBCBAB8BE, 0xB6BBB9B7, 0xB9B6BBB9, 0xBDBCB6BB,
+ 0xB8BDBCB8, 0xBAB9BEBD, 0xB6B7B5BB, 0xB8BDBEB1,
+ 0xB9B6BBBA, 0xBDBBB6BB, 0xB8BDBBB8, 0xBAB8BBB9,
+ 0xBCBAB9BC, 0xB8BCB7B9, 0xB7B6BCB7, 0xBCB7B6BC,
+ 0xADB1ABB8, 0x9FA0A7A0, 0xA79DA1A9, 0xA3A89F9F,
+ 0x999FA59A, 0xA59A9EA4, 0x9EA4999F, 0x9AA2A59C,
+ 0xA39AA0A3, 0xA0A499A0, 0x99A0A498, 0x6E6AA0A4,
+ 0x0809076D, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x2D040201,
+ 0x8380302E, 0x89858088, 0x7F86847C, 0x89818A89,
+ 0x8A88808B, 0x7B84857C, 0x867D8384, 0x88898085,
+ 0x7B84857C, 0x857B8384, 0x86847C86, 0x7D84857C,
+ 0x837D8383, 0x83837D83, 0x7987857D, 0x807B8381,
+ 0x83837D83, 0x7D808178, 0x867C8386, 0x85867C85,
+ 0x7F85867C, 0x89808889, 0x84857C88, 0x7D86877E,
+ 0x867D8586, 0x83847B85, 0x7D83807B, 0x807B8582,
+ 0x85827D83, 0x79827F7A, 0x807B817E, 0x807D7883,
+ 0x757D7E75, 0x7B757D7E, 0x7B7B757B, 0x6B797A71,
+ 0x746B7374, 0x6C6D6473, 0x54686960, 0x504B5C5D,
+ 0x48454054, 0x5642443E, 0x746F585C, 0x888C8770,
+ 0x9B959791, 0xB0A7A1A4, 0xB6BBB2AB, 0xB9BBBEB5,
+ 0xC1B8BFC2, 0xBEC1B8BE, 0xB9BDBFB9, 0xBFBABABE,
+ 0xB9BFBAB9, 0xBABBBFBA, 0xBEBABBBF, 0xBBBFBABD,
+ 0xBDBCBFBD, 0xBFBEBABF, 0xBABFBEBA, 0xBDBCBFBD,
+ 0xBEBCBCBF, 0xBABCBCBB, 0xB3B8BABB, 0xA9B9ADAD,
+ 0xA8A0B7AC, 0xBAACA1BB, 0x97B6AA9E, 0xA798B8A6,
+ 0xB7A798B8, 0x96B8A595, 0xA797B9A6, 0xB7A598B8,
+ 0x97B7A497, 0xA697B7A4, 0xB8A798B8, 0x97B8A798,
+ 0xA998B9A8, 0xBAA898BA, 0x98BAA698, 0xA799BBA6,
+ 0xB9A597B9, 0x97BBA597, 0xA597BBA5, 0xBBA597BB,
+ 0x97BBA597, 0xA698BCA5, 0xBDA697BD, 0x95BBA697,
+ 0xA294B8A4, 0xBBA094B8, 0x98BAA59A, 0xAB9EBEA6,
+ 0xB6AFA1BD, 0x98BAA89A, 0xA698BAA6, 0xBBA796BB,
+ 0x97BBA796, 0xA597BBA5, 0xB5A598B8, 0x97B6A596,
+ 0xA498B6A6, 0xBBA99DBB, 0x9DBBA99D, 0xA599B5A9,
+ 0xB8AB9FBB, 0x9CB8A89C, 0xA89CBAAA, 0xB8A398B9,
+ 0x95B9A094, 0xA294B8A3, 0xBBA597BB, 0x95B9A597,
+ 0xA597BBA3, 0xB5A496B8, 0x94B8A193, 0xA193B7A2,
+ 0xB8A294B8, 0x94B8A094, 0xA397BBA2, 0xBBA396BC,
+ 0x94B8A397, 0xA294B8A0, 0xBDA495BB, 0x94BDA494,
+ 0xA093B9A2, 0xB8A095B6, 0x97B9A496, 0xA496BAA5,
+ 0xC1A499BA, 0x99BDABA0, 0xA294B8A7, 0xB9A190B5,
+ 0x96B9A694, 0xA594B6AA, 0xB8A697B7, 0x96B8A598,
+ 0xA395B7A4, 0xB9A294B6, 0x9BBBA699, 0xA89CB8A8,
+ 0xB8AA9FB9, 0xA9B8AAA3, 0xAEADB7AE, 0xC1AEB1B6,
+ 0xBFC0BBC0, 0xB6BCBBBA, 0xBDB9BEBD, 0xBEBDBBBD,
+ 0xB9BEBDB9, 0xB7B6BBBA, 0xBBBAB3B8, 0xBBBDBDB6,
+ 0xB9BABDBB, 0xBCB5BABE, 0xB6BDB6B5, 0xB2B6BEB4,
+ 0xBCB2B4BC, 0xB4BCB2B4, 0xB1B6BCB1, 0xBCB1B6BC,
+ 0xB8BBB2B8, 0xA7AAACA6, 0x9F9BAAAB, 0x8788849E,
+ 0x40686862, 0x38324849, 0x48484238, 0x524C4C46,
+ 0x635F5658, 0x61625E62, 0x646B6863, 0x67646D69,
+ 0x6F6C686C, 0x6871716B, 0x76716E6E, 0x76736E79,
+ 0x6A726F6A, 0x746E7070, 0x7A7B7774, 0x73757672,
+ 0x77737677, 0x76777376, 0x71767872, 0x7B757577,
+ 0x7D7E757B, 0x777F7C77, 0x7C777F7C, 0x7C79747F,
+ 0x6D7B7B75, 0x7C737576, 0x7676707B, 0x797B7B75,
+ 0x7D7B7E7D, 0x7C7D7B7C, 0x767B7C7A, 0x7872797A,
+ 0x78787278, 0x727B7874, 0x78747773, 0x807D7979,
+ 0x757C7975, 0x7B787C79, 0x7C797580, 0x757A7975,
+ 0x77737A79, 0x7774707A, 0x4E777470, 0x0507534F,
+ 0x06050708, 0x00000000, 0x00000000, 0x28282800,
+ 0x585F5F59, 0x786E6061, 0x8884797A, 0x798A8479,
+ 0x85778C86, 0x8B887A88, 0x79888779, 0x87798887,
+ 0x87877988, 0x808A897F, 0x87828A88, 0x5E5B578A,
+ 0x164D4C48, 0x01001B1A, 0x02010002, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x9F767773, 0xA49EA3A5, 0xA0A49EA0, 0x9E9EA59E,
+ 0xA89F9EA5, 0xA0A59CA3, 0xA4A1A8A1, 0xAAA3A4AB,
+ 0xA3AAA3A2, 0xA69B9F99, 0xC1C1A7AB, 0xBDBFBFBF,
+ 0xBCBABFBD, 0xC0BEBBC1, 0xBDC0BEBD, 0xBEBEC1BF,
+ 0xC0BEBDC0, 0xBDC0BEBD, 0xBFBCC1C0, 0xBFC0BBC0,
+ 0xBDC2C1BB, 0xBFBAC0BF, 0xC0BFBAC0, 0xBBC0BFBB,
+ 0xBBB6BBB9, 0xBFBEB8BD, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xBFC0BAC0, 0xBAC0BFBA, 0xBEBBC1C0, 0xC0BFB9BF,
+ 0xBABFBDBA, 0xBEBCC1BF, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBDBABFBD, 0xBCBBBABF, 0xB6BDBAB6, 0xBFBEC4BF,
+ 0x8282BEC4, 0x00000080, 0x00000000, 0x01000000,
+ 0x00000000, 0x01000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8ABA906, 0xBABDC0BE, 0xBFBAB9BF, 0xBBBFBABB,
+ 0xBDB6BBB9, 0xBEBFBABF, 0xB7BCBDB9, 0xC0B8C0C0,
+ 0xC0C1B8C0, 0xACB1B0BB, 0xA9ADB2B0, 0xBAB9A6AB,
+ 0xB9C1C0B4, 0xBFB8C0BF, 0xC0BFBAC0, 0xB8BDBBBB,
+ 0xBEB8BDBB, 0xC0BFBAC1, 0xBBC1C0BA, 0xBFB9BEBF,
+ 0xBEBDB9BE, 0xBABFBDB9, 0xBDB9BEBC, 0xC0BFBABF,
+ 0xBABFBEBB, 0xB9B9BEBD, 0xB8B7B5BA, 0xB6BBBAB2,
+ 0xB9B8BBB9, 0xBFBABABE, 0xB7BDB8B9, 0xBAB9BCBA,
+ 0xBCBAB9BC, 0xB8BBB9B9, 0xB2B6BCB7, 0xBDB8B3B7,
+ 0xADB1ACB9, 0x9AA1A8A1, 0xA59B9BA4, 0x9FA79D9D,
+ 0x9A9FA59A, 0xA4999FA5, 0x9FA59A9E, 0x9DA0A39A,
+ 0xA299A3A6, 0xA1A59A9F, 0x99A0A499, 0x3C3AA0A4,
+ 0x0808083B, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x57040201,
+ 0x84805A58, 0x86837E87, 0x7D828078, 0x88808785,
+ 0x8A88808A, 0x81888980, 0x857C898A, 0x88898084,
+ 0x7D888980, 0x877D8687, 0x88877D88, 0x7D85867D,
+ 0x857F8383, 0x85857F85, 0x7785837B, 0x837E827F,
+ 0x87847F86, 0x7C898A81, 0x857B8285, 0x88897F84,
+ 0x8085867C, 0x867D898A, 0x83847B85, 0x7E84857C,
+ 0x847B8687, 0x83847B83, 0x7F85827D, 0x827D8784,
+ 0x87847F85, 0x7883807B, 0x817C807D, 0x827F7A84,
+ 0x78808178, 0x7A718081, 0x78797079, 0x6B77786F,
+ 0x6E657374, 0x6D6E656D, 0x54686960, 0x504B5C5D,
+ 0x46433E54, 0x5742433F, 0x746F585C, 0x888C8770,
+ 0x9B969892, 0xB0A5A1A4, 0xB8BCB1AC, 0xB9BDC0B7,
+ 0xC0B7BDBF, 0xBEC1B8BD, 0xBABCC0BA, 0xBFBABBBF,
+ 0xB9BFBAB9, 0xBABBBFBA, 0xBEBABBBF, 0xBBBFBABD,
+ 0xBEBCBFBD, 0xC0BFBBC0, 0xBABFBEBB, 0xBDB9BEBC,
+ 0xBFBDBCBF, 0xBCBEBEBC, 0xB5B8BABB, 0xA2B3ADAC,
+ 0xA79FB6A8, 0xBAABA0BA, 0x9CBBAA9E, 0xA798B7AB,
+ 0xB8A497B7, 0x97B9A496, 0xA596B6A7, 0xB7A497B7,
+ 0x97B7A497, 0xA497B7A4, 0xB9A899B9, 0x99B9A899,
+ 0xA899B9A8, 0xBAA898BA, 0x99BAA698, 0xA499BAA4,
+ 0xB9A597B9, 0x97BBA597, 0xA397BBA3, 0xBBA597BB,
+ 0x97BBA597, 0xA698BCA5, 0xBBA798BE, 0x97BDA495,
+ 0xA597BBA6, 0xB6A094B8, 0x99BBA095, 0xAB9EBEA7,
+ 0xB6AFA1BD, 0x95B5A89A, 0xA294B6A2, 0xBBA493B8,
+ 0x97BDA597, 0xA597BBA6, 0xB6A798B8, 0x96B6A697,
+ 0xA899B9A5, 0xBBA99CBC, 0x9DBBA89B, 0xA89CBAA9,
+ 0xB8A89CB8, 0x9FBBA89C, 0xA99DBBAB, 0xBCA59ABB,
+ 0x94B8A498, 0xA294B8A2, 0xBBA698BC, 0x96BBA796,
+ 0xA496BAA7, 0xB8A496BA, 0x96BDA294, 0xA596BCA8,
+ 0xB9A094B8, 0x97BBA195, 0xA397BBA3, 0xB9A196BC,
+ 0x94B89E93, 0xA397BBA0, 0xBFA495BB, 0x93BCA696,
+ 0xA194BAA1, 0xB6A095B6, 0x96B8A196, 0xA294B6A4,
+ 0xBAA799BB, 0x98BCA499, 0xA294B8A6, 0xBAA493B8,
+ 0x96B8A795, 0xA796B8A7, 0xB7A697B7, 0x94B6A497,
+ 0xA395B7A2, 0xB9A898BA, 0x9BBBA899, 0xA89CB8A8,
+ 0xB9A89FB9, 0xA8B7ABA4, 0xAFAEB8AD, 0xC2AEB1B6,
+ 0xC0C0BABF, 0xBABFC0B8, 0xBDB9BEBD, 0xBCBBB9BE,
+ 0xB6BBBAB7, 0xBCB5BBBA, 0xBDBEB7BB, 0xBBBDBDB9,
+ 0xB9B9BCBA, 0xBCB5BABE, 0xB5BCB5B5, 0xB2B4BCB2,
+ 0xBCB2B4BC, 0xB4BCB1B4, 0xB0B6BCB1, 0xBCB0B8BC,
+ 0xBBBCB2BA, 0xA6AAACA6, 0xA09CA9AA, 0x8587819F,
+ 0x4067685F, 0x39304849, 0x36393038, 0x524A4C46,
+ 0x645F5658, 0x62635F60, 0x5D625F5A, 0x67646662,
+ 0x6F6C686C, 0x6671706C, 0x6C676C6C, 0x7371696F,
+ 0x6F6F6F69, 0x74707575, 0x75767273, 0x73777874,
+ 0x77737677, 0x7A7C7676, 0x75787A74, 0x7B72797B,
+ 0x7D7E757A, 0x777C7974, 0x7C77807C, 0x7C797480,
+ 0x73808178, 0x766D7B7C, 0x7B7C7375, 0x767B7A76,
+ 0x7E7C7B7A, 0x797A767D, 0x78797A76, 0x78727C7E,
+ 0x7B7B7578, 0x777B7874, 0x77737C78, 0x7B78747A,
+ 0x78807B78, 0x7875807B, 0x7C79757D, 0x767C7B77,
+ 0x75747B7A, 0x77737279, 0x4E787370, 0x0409534F,
+ 0x0804090A, 0x00000000, 0x00000000, 0x27282600,
+ 0x5660605A, 0x786E6160, 0x8884797A, 0x7A8A8479,
+ 0x86788B88, 0x86857789, 0x7C88867B, 0x887C8987,
+ 0x87877B88, 0x56898A81, 0x302C5C5C, 0x06030033,
+ 0x00020000, 0x00000200, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00020000,
+ 0x9E858682, 0xA59FA2A4, 0xA0A49EA1, 0xA19EA59E,
+ 0xA99FA1A8, 0xA1A99FA1, 0xA3A1A8A1, 0xACA5A3AA,
+ 0xA6ADA6A4, 0xB2A5ACA5, 0xBFBFB3B7, 0xBEC0C0BF,
+ 0xBCBCBFBD, 0xC0BEBBC1, 0xBDC0BEBD, 0xBEBCBFBD,
+ 0xBFBDBDC0, 0xBDC0BEBC, 0xBFBCC1C0, 0xC1C0BBC0,
+ 0xBCC1C0BC, 0xBFBAC0BF, 0xBFC0BAC0, 0xBBC0BFBB,
+ 0xBDBABFBD, 0xC0BFBABF, 0xB9BFBEBB, 0xBCB7BDBC,
+ 0xBEBFB7BD, 0xB9BEBFB9, 0xBFB9BFBE, 0xC0BFBAC0,
+ 0xB9BEBDBA, 0xBEBBC0BE, 0xC1BEBBC0, 0xBAC1BEBA,
+ 0xBFBBC0BE, 0xBFBEBCC1, 0xB9C0BDB9, 0xBEBEC4BF,
+ 0x8282BDC3, 0x00000080, 0x00000000, 0x01000000,
+ 0x00000000, 0x01000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8ABA906, 0xBABDC0BE, 0xBFBAB9BF, 0xBBBFBABB,
+ 0xBDB8BDBB, 0xBCBDB9C0, 0xB7BCBDB7, 0xBEB9C1C1,
+ 0xB8B7B9BF, 0xA6A9A7B3, 0xA9A8ACA7, 0xB9B8A6AB,
+ 0xB8C0C0B3, 0xC0B8C0C0, 0xC1C0B8C0, 0xB7BDBCBB,
+ 0xC0BAC0BF, 0xC0C0B9C1, 0xB8C0C0B8, 0xC0B8BFC2,
+ 0xBEBFB8C0, 0xB9BFBEB9, 0xBEB9BFBE, 0xBCBBB9BF,
+ 0xBABCBCB7, 0xBDB9BEBD, 0xBFBEB9BE, 0xB9BEBCBA,
+ 0xB9B8BDBB, 0xBBB9B6BB, 0xB6BBB9B6, 0xB7B8BCB7,
+ 0xBDB8B8BC, 0xB8BCB7B9, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xA8ACA7B8, 0x9DA1A8A1, 0xA59B9EA7, 0x9FA79C9D,
+ 0x9A9FA49B, 0xA4999EA3, 0x9FA59A9E, 0x9AA0A39A,
+ 0xA39AA0A3, 0x9FA398A0, 0x99A0A499, 0x0907A0A4,
+ 0x08080808, 0x00010101, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00010000, 0x55020301,
+ 0x84805A59, 0x87848087, 0x82888580, 0x89838888,
+ 0x88888289, 0x7C888980, 0x847B8485, 0x83847B83,
+ 0x7B81857A, 0x877D8286, 0x85867C86, 0x7A83847B,
+ 0x847B8283, 0x83847B83, 0x7E83807B, 0x827E8683,
+ 0x87847F85, 0x7C85867D, 0x877E8586, 0x85867D86,
+ 0x7C81847B, 0x88828285, 0x85857F88, 0x7D85867D,
+ 0x867D8586, 0x83847B85, 0x7F827F7A, 0x7F7A8784,
+ 0x85827D82, 0x7C838179, 0x817B8684, 0x7F7F7981,
+ 0x767D7E75, 0x7C737E7F, 0x77786F7B, 0x6A73746B,
+ 0x6D647273, 0x6D6E656C, 0x56666862, 0x504D5C5C,
+ 0x48454155, 0x5742433F, 0x7371585C, 0x888C8770,
+ 0x9A959791, 0xBBB1A2A3, 0xBABBB1BA, 0xB7BABDB4,
+ 0xC1B8BBBD, 0xBBC0B7BE, 0xB9BBBFB9, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBDBCC0BB, 0xBCBCBCBF, 0xB8BDBCBA, 0xBEB9BEBD,
+ 0xBEBCBABF, 0xBABCBCBB, 0xB4B6B9BD, 0xA9B9AAAC,
+ 0xA9A1B8AC, 0xB8A89DB7, 0x9EBCA89C, 0xA89CBAAA,
+ 0xB7A497B7, 0x98B8A497, 0xA697B7A7, 0xB6A497B7,
+ 0x97B7A498, 0xA297B7A2, 0xBAA698BA, 0x98BAA698,
+ 0xA698BAA6, 0xBAA698BA, 0x99B9A499, 0xA499BAA4,
+ 0xBBA597B9, 0x97BBA597, 0xA597BBA5, 0xB9A597B9,
+ 0x97BBA597, 0xA597BBA5, 0xBDA694BB, 0x95BBA694,
+ 0xA294B8A4, 0xBAA094B8, 0x9EBEA499, 0xAB9EBEAB,
+ 0xB8ADA1BD, 0x94B6A69A, 0xA897BCA4, 0xBBA698BC,
+ 0x96BAA597, 0xA597B9A4, 0xB7A798B8, 0x96B6A898,
+ 0xA797B9A5, 0xBCAB9CBC, 0x9DBBA99C, 0xAEA5C0A7,
+ 0xBBAAA1BC, 0x9FBBA9A0, 0xAB9FBDAB, 0xBBA59ABB,
+ 0x94B8A397, 0xA094B8A0, 0xBBA397BB, 0x96BCA597,
+ 0xA496BAA5, 0xB8A294B8, 0x97BDA094, 0xA697BDA6,
+ 0xBBA397BB, 0x99BDA397, 0xA599BDA5, 0xB8A397BB,
+ 0x94B8A094, 0xA397BBA0, 0xBDA697BD, 0x96BCA697,
+ 0xA193B7A5, 0xB7A196B7, 0x95B5A297, 0xA496B8A2,
+ 0xBBA597B9, 0x94B8A799, 0xA193B7A0, 0xBBA395B9,
+ 0x97B9A796, 0xA596B6A7, 0xB8A597B9, 0x96B6A496,
+ 0xA596B6A5, 0xB9A698BA, 0x99B9A699, 0xA69AB6A6,
+ 0xB7A8A0B7, 0xA8B8AAA4, 0xAEACB8AB, 0xBFAEB1B6,
+ 0xC0C0B7BC, 0xB4BCBCB8, 0xB9B9BFBE, 0xBBBAB5BC,
+ 0xB2B8B7B5, 0xBCB3B8B7, 0xBEBDB8BD, 0xB9BEBDB9,
+ 0xBBBABDBB, 0xBEB9BABD, 0xB7BBB6BA, 0xB4B7BBB5,
+ 0xBAB1B6BA, 0xB6BCB1B5, 0xB0B9BDB2, 0xBBB1B8BC,
+ 0x98998FBA, 0x8F85887F, 0x938D9395, 0x88888293,
+ 0x41686960, 0x382F494A, 0x35382F35, 0x534B4D47,
+ 0x635D5559, 0x62645E5F, 0x61696A61, 0x6C676B69,
+ 0x706B6870, 0x6B73706C, 0x6C677171, 0x73706B6F,
+ 0x6D707168, 0x736D7576, 0x73756F71, 0x6E72746E,
+ 0x746E7474, 0x78787274, 0x70787872, 0x7E757879,
+ 0x7D7E757D, 0x787F7C77, 0x7C787F7C, 0x7A79757F,
+ 0x747B7B75, 0x756C7C7D, 0x81827974, 0x76797A76,
+ 0x7C78797A, 0x7E7D797D, 0x747E7D79, 0x78727A7A,
+ 0x7B7B7578, 0x7B797874, 0x7675807C, 0x7873727A,
+ 0x70777470, 0x76737774, 0x7976727B, 0x6F787773,
+ 0x74707473, 0x7B767377, 0x72787370, 0x05077773,
+ 0x0804090A, 0x00000001, 0x00000000, 0x2A282702,
+ 0x62625F5A, 0x796E6D6C, 0x8884797B, 0x7889857A,
+ 0x84768783, 0x89877C87, 0x7D88867C, 0x5D588785,
+ 0x39363160, 0x00070400, 0x04010603, 0x08050109,
+ 0x01020000, 0x00000301, 0x00000000, 0x00010101,
+ 0x00000000, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x01000001, 0x01020000,
+ 0xA0838782, 0xA49FA1A5, 0xA0A49EA0, 0xA09EA29C,
+ 0xA8A1A2AA, 0xA1A8A1A1, 0xA3A1A8A1, 0xAEA4A3AA,
+ 0xA5ADA3A6, 0xB1A4ABA4, 0xC0BEB2B6, 0xBEC0C0BF,
+ 0xBBBCBFBD, 0xC0BEBAC0, 0xBDC0BEBD, 0xBFBEC1BF,
+ 0xC0BEBEC1, 0xBDC0BEBD, 0xBFBDC2C0, 0xC0BEBCC1,
+ 0xBDC2C1BB, 0xBFBAC0BF, 0xC1C0BAC0, 0xBABFBEBC,
+ 0xBDBBC0BE, 0xC0BFBABF, 0xBAC0BFBA, 0xBCB5BBBA,
+ 0xBFBEB7BD, 0xB9BFBEB9, 0xBFBABFBE, 0xBFBDBBC0,
+ 0xBABFBDBA, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBABFBD, 0xBFBDBBC0, 0xBABFBDBA, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x06080409, 0x04060704,
+ 0xA8AAAA05, 0xBABDC0BE, 0xBFBAB9BF, 0xB9BFBABB,
+ 0xBEB8BDBB, 0xBFBEB9BF, 0xB9BFBEB9, 0xB7BAC0BF,
+ 0xB1AFB2B8, 0xA6A9A7AC, 0xB0A8ABA9, 0xC1C0ADB2,
+ 0xB8C0C0BB, 0xC0B8BFC2, 0xBFC0B8C0, 0xB9BFBEBA,
+ 0xBDB9BFBE, 0xBEBFB8BE, 0xB8BFC2B9, 0xC0B8C0C0,
+ 0xC0C1B8C0, 0xBBC1C0BB, 0xBEB8C0BF, 0xBFBEB9BF,
+ 0xBABFBEBA, 0xB9B9BEBD, 0xBEBDB5BA, 0xB9BEBCB9,
+ 0xBDB8BDBB, 0xC0BEBABF, 0xB9BEBCBB, 0xB7B9BDB8,
+ 0xBDB8B8BC, 0xB9BDB8B9, 0xB7B3B7B2, 0xBCB7B8BC,
+ 0xA6ACA7B8, 0x9C9EA69F, 0xA59B9DA6, 0x9FA79C9D,
+ 0x9BA0A59C, 0xA59A9FA4, 0x9EA4999F, 0x99A2A69B,
+ 0xA2999FA2, 0x9EA2979F, 0x99A1A599, 0x0804A0A4,
+ 0x09090907, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00010000, 0x54020300,
+ 0x8480585A, 0x85857F85, 0x8283837D, 0x88828888,
+ 0x88898088, 0x7B84857C, 0x827A8583, 0x85867C84,
+ 0x7C82867B, 0x887E8387, 0x84857B87, 0x8185867D,
+ 0x857C898A, 0x83847B84, 0x7B85837B, 0x827D8380,
+ 0x83807B85, 0x7C86877E, 0x867D8586, 0x898A8185,
+ 0x7D81847B, 0x89808386, 0x85867D88, 0x80888980,
+ 0x857C8889, 0x85867D84, 0x7F86837E, 0x847F8784,
+ 0x85827D87, 0x76838179, 0x817B807E, 0x81817B81,
+ 0x72808178, 0x7F767A7B, 0x7879707E, 0x6B74756C,
+ 0x6E657374, 0x696A616D, 0x4A666862, 0x44405050,
+ 0x47444047, 0x5744433F, 0x73715A5B, 0x8A8B8772,
+ 0x9A979993, 0xBCB1A0A3, 0xB8BCB1B8, 0xB9BDC0B7,
+ 0xC0B7BDBF, 0xBBC0B7BB, 0xBABBBFB9, 0xBFBABCC0,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBDBCC0BB, 0xBFBDBCBF, 0xBABFBEBC, 0xBEB9BFBE,
+ 0xBEBCB9BF, 0xBABCBCB9, 0xB5B6B9BD, 0xA8B9ACAB,
+ 0xA8A1B6AE, 0xB4A89DB7, 0x98B7A498, 0xAA9BBAA7,
+ 0xB6A497B7, 0x98B8A396, 0xA598B8A5, 0xB6A599B7,
+ 0x97B7A498, 0xA497B7A4, 0xB9A597B9, 0x98BAA597,
+ 0xA698BAA6, 0xBAA698BA, 0x99BAA499, 0xA499BAA4,
+ 0xB9A597B9, 0x97BBA597, 0xA597B9A5, 0xB9A597B9,
+ 0x97B9A597, 0xA597BBA5, 0xBCA694BB, 0x95BBA596,
+ 0xA496BAA4, 0xC0A599BD, 0x9DBFAA9F, 0xAB9EBEAB,
+ 0xB9A69AB8, 0x97B9A699, 0xA698BCA7, 0xBBA496BA,
+ 0x97BBA597, 0xA698BAA5, 0xB8A697B7, 0x95B7A798,
+ 0xA595B7A5, 0xB8A798B8, 0xA1BCA69A, 0xAAA4BDAA,
+ 0xBEAEA5BF, 0xA3BFADA4, 0xAB9FBDAF, 0xBCA799BB,
+ 0x94B8A698, 0xA395B9A2, 0xBCA597BB, 0x96BCA698,
+ 0xA596BCA5, 0xBAA294B8, 0x97BDA296, 0xA697BDA6,
+ 0xB8A397BB, 0x97BBA094, 0xA397BBA3, 0xB8A597BB,
+ 0x97BBA294, 0xA597BBA5, 0xBBA697BD, 0x93B9A495,
+ 0xA496BAA2, 0xB6A196B7, 0x96B6A196, 0xA497B7A3,
+ 0xB6A698BA, 0x94B8A294, 0xA094B8A0, 0xB9A294B8,
+ 0x98B8A597, 0xA697B7A7, 0xB6A496B8, 0x96B8A294,
+ 0xA797B9A6, 0xB7A698BA, 0x98B6A497, 0xA89CB8A4,
+ 0xB9A8A0B7, 0xA7B8ACA6, 0xADABB7AD, 0xBFB0B0B6,
+ 0xBFC0B8BB, 0xB7BDBCBA, 0xB9B5BBBA, 0xBAB9B5BC,
+ 0xB6BBBAB5, 0xBCB7BCBA, 0xBEBDB9BE, 0xB9BEBCB9,
+ 0xBCBABDBB, 0xBCBABBBE, 0xBABEB9B9, 0xB6B6BAB4,
+ 0xC1B8B8BC, 0xB8BDB4BC, 0xA0B8BCB1, 0x998FA7AB,
+ 0x86898098, 0x8292958C, 0x948E8688, 0x87878192,
+ 0x50686960, 0x39305659, 0x36383236, 0x463D3F39,
+ 0x5852484C, 0x62655C54, 0x6164655C, 0x68636B69,
+ 0x706C676C, 0x686E6B67, 0x716B6D6C, 0x71716B71,
+ 0x68707168, 0x6F697071, 0x6E706A6D, 0x6A75756F,
+ 0x6F6A7070, 0x74746E72, 0x70797A71, 0x7E757679,
+ 0x7E7E787B, 0x757D7C78, 0x71707C79, 0x74736F73,
+ 0x6975756F, 0x76706F6F, 0x797B7576, 0x797C7D79,
+ 0x7A767C7D, 0x7B7A767B, 0x7582827C, 0x78727B7B,
+ 0x7B7A7678, 0x7F7D7C78, 0x7C7B8480, 0x85807F81,
+ 0x737C7975, 0x78757A77, 0x7A77737D, 0x757B7A76,
+ 0x77737A79, 0x7875717A, 0x7377726F, 0x04067874,
+ 0x06050707, 0x00010002, 0x00000000, 0x2B282402,
+ 0x616C6A62, 0x776C6E6C, 0x88857779, 0x838B877C,
+ 0x8E83908E, 0x85847A90, 0x0B605E56, 0x0E0D100F,
+ 0x100E0D12, 0x01060201, 0x04000805, 0x06020107,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00020000, 0x01000001, 0x00010000,
+ 0x9F838782, 0xA49EA0A4, 0xA1A59FA0, 0x9C9CA198,
+ 0xA59EA0A5, 0xA1A8A19E, 0xA3A3AAA3, 0xACA5A3AA,
+ 0xA5ACA5A5, 0xB1A6ADA6, 0xC1BFB2B6, 0xBEC0C0BE,
+ 0xBCBABFBD, 0xC0BEBBC1, 0xBDC0BEBD, 0xBEBDC0BE,
+ 0xC1BFBDC0, 0xBEC1BFBE, 0xC2C0C3C1, 0xC0BEBFC4,
+ 0xBCC1BFBB, 0xBFBBC0BF, 0xBFBEBAC0, 0xBCC1C0BA,
+ 0xBEB9BEBC, 0xC0BFBAC1, 0xBAC0BFBA, 0xBEB5BBBA,
+ 0xBEBDB9BF, 0xB9BFBEB8, 0xBEBABFBE, 0xBFBDBABF,
+ 0xBBC0BEBA, 0xBEBBC0BE, 0xC0BEBBC0, 0xBABFBDBB,
+ 0xBDBABFBD, 0xBEBCBABF, 0xBABFBDB9, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA9ABAB06, 0xBDBFC2C0, 0xBFBDBABF, 0xBABFBDBC,
+ 0xBEB8BDBC, 0xBFBEB9BF, 0xB9BFBEBA, 0xBBB9BFBE,
+ 0xBBBAB7BE, 0xB6BBB9B6, 0xBAB4B9B7, 0xC0BFB7BC,
+ 0xB7BFBFBA, 0xC0B8C0C0, 0xC1C1B8C0, 0xB9BFBEB9,
+ 0xBFBBC0BF, 0xBFC0BBC0, 0xBABFC0BB, 0xBDB6BEBD,
+ 0xBFBEB6BE, 0xB9BFBEB9, 0xBDB6BFBC, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBEB8BDBC, 0xBFBEB9BF, 0xB8BDBCBA,
+ 0xBBB8BDBB, 0xBCB7B8BD, 0xB6BCB7B6, 0xB6B5BBB6,
+ 0xBBB6B5BB, 0xB5BBB6B5, 0xBEB5B8B6, 0xB8B6BDC0,
+ 0xA1A7A2B3, 0x9F9FA7A0, 0xA89EA0A9, 0xA1A99FA0,
+ 0x9E9EA499, 0xA59AA3A9, 0x9FA59A9F, 0x98A0A499,
+ 0xA4999FA3, 0x9DA3989E, 0x6AA8ACA0, 0x04007175,
+ 0x00030100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02020001, 0x00000100, 0x00010000, 0x4F030500,
+ 0x807A5558, 0x80817880, 0x7B808178, 0x847B8184,
+ 0x83847B83, 0x7F84827A, 0x897F8B89, 0x86857B8B,
+ 0x7D808177, 0x887D8488, 0x84887D84, 0x8087887F,
+ 0x89808889, 0x85867D88, 0x7D85867D, 0x867D8586,
+ 0x83847B85, 0x7B84857C, 0x827C8384, 0x83837D82,
+ 0x7B85867D, 0x847B8384, 0x81827983, 0x7D808178,
+ 0x81788586, 0x83847B80, 0x7B818279, 0x867D8384,
+ 0x84857C85, 0x78808178, 0x81788081, 0x80817880,
+ 0x75828078, 0x7C747F7D, 0x7B78737E, 0x67787872,
+ 0x6D646D6D, 0x6669606A, 0x4C606158, 0x48435455,
+ 0x3E3B374B, 0x624B4C48, 0x7E7A6364, 0x9697937D,
+ 0xA399A099, 0xBEB5A3AA, 0xB7BCB3B9, 0xB8BBBFB9,
+ 0xBEB8BABE, 0xBABEB8BA, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBABEB9BB, 0xBCBABDBB, 0xBDBBBBBE, 0xBABDBBBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xBABEBFBA, 0xB8BABAC0, 0xA6B7B1AD,
+ 0xAFA3B9AE, 0xB7AA9DB7, 0x99B8A99B, 0xA897B8A9,
+ 0xB7A595B7, 0x97B7A395, 0xA497B7A4, 0xB7A497B7,
+ 0x97B7A697, 0xA497B7A6, 0xBBA597B9, 0x97BBA397,
+ 0xA597BBA5, 0xBBA597BB, 0x97BBA597, 0xA597B9A5,
+ 0xB7A496B8, 0x96B8A497, 0xA497B7A4, 0xB7A497B7,
+ 0x97B7A497, 0xA496B8A4, 0xBBA597BB, 0x98BCA597,
+ 0xA397BBA6, 0xBDA599BD, 0x98BCA599, 0xA59ABBA4,
+ 0xB9A799BB, 0x94B6A597, 0xA294B6A2, 0xB7A294B6,
+ 0x96B8A196, 0xA597B9A4, 0xB8A798B8, 0x94B8A798,
+ 0xA496BAA2, 0xB7A797B9, 0xA5BFA599, 0xB3ABC2AE,
+ 0xBBB0A8BF, 0xA2BEACA4, 0xAC9DBCAE, 0xB7A797B9,
+ 0x93B8A595, 0xA392B7A4, 0xBAA694BB, 0x94BBA593,
+ 0xA394BAA6, 0xBAA294B8, 0x97BDA496, 0xA697BDA6,
+ 0xB8A094B8, 0x93B9A094, 0xA597BBA0, 0xB7A493B8,
+ 0x97BCA695, 0xA698BCA8, 0xBAA495BB, 0x92B8A194,
+ 0xA496BAA1, 0xB4A398B9, 0x97B79F94, 0xA497B7A4,
+ 0xB6A597B9, 0x94B8A095, 0xA599BDA0, 0xB7A496B8,
+ 0x98B8A697, 0xA697B7A7, 0xB6A193B5, 0x97B9A294,
+ 0xA797B9A7, 0xB5A597B9, 0x9AB8A095, 0xA89CB8A6,
+ 0xB6AAA1B6, 0xA9BAABA2, 0xAEAAB6B1, 0xBAAEADB6,
+ 0xB9B8B3B6, 0xB4BAB9B3, 0xBDB8BDBC, 0xBBB9B9BE,
+ 0xB8BDBBB8, 0xBDB9BEBC, 0xBFBDBABF, 0xBBC0BEBA,
+ 0xBABBBEBC, 0xBEBABBBF, 0xBDBEBABD, 0xB5B9BDB7,
+ 0xB6ADB7BB, 0xA5A89FB3, 0x92969B92, 0x9B92969B,
+ 0x989B9298, 0x92939791, 0xA39D9498, 0x969892A1,
+ 0x4D676963, 0x3C364F53, 0x3A3B3738, 0x4B40413D,
+ 0x534A4F51, 0x575A5150, 0x5D5D5E55, 0x615C6562,
+ 0x6B686364, 0x666D6D67, 0x6A666C6C, 0x70706A6B,
+ 0x6D73746B, 0x766D7576, 0x73766D73, 0x6D75766D,
+ 0x766D7576, 0x74756C75, 0x76747872, 0x7872787C,
+ 0x75767274, 0x6F787773, 0x77767473, 0x78767579,
+ 0x74777470, 0x7B777978, 0x7A7B777A, 0x79797A76,
+ 0x7B757C7D, 0x7B7B757B, 0x757C7E78, 0x7975797B,
+ 0x7B7A7678, 0x7A7C7B77, 0x8180817E, 0x827D7C86,
+ 0x757D7A76, 0x7A757D7A, 0x7D7A757D, 0x737A7A74,
+ 0x79737979, 0x78787279, 0x7077746F, 0x08087774,
+ 0x0808080A, 0x00000000, 0x02000000, 0x312E2903,
+ 0x6976736B, 0x756A7674, 0x76756777, 0x74807E73,
+ 0x554D817F, 0x2C292458, 0x00020100, 0x00000001,
+ 0x00010002, 0x00020000, 0x00000200, 0x02000002,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x00000000, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x9D858682, 0xA3999FA3, 0x9BA3999B, 0x9A9EA39A,
+ 0xA59C9EA3, 0xA7AAA1A2, 0xA3A5A7A1, 0xAAA3A5A9,
+ 0xA6ADA6A3, 0xAEA1A59F, 0xC0BFAFB3, 0xBAC0BFBA,
+ 0xBAB9BEBC, 0xBEBCBBBF, 0xBDBEBCBD, 0xC0BEC1BF,
+ 0xC1C1BEC0, 0xBEC1BFC1, 0xBFC1C4C2, 0xC4BFC0C4,
+ 0xBEC4BFC0, 0xC0BCC1BF, 0xC0C1BCC1, 0xBBC0BFBE,
+ 0xBDBABFBD, 0xBFBDB9C0, 0xBABFBDBA, 0xBEB6BDBA,
+ 0xBFBEBAC1, 0xB9BFBEB9, 0xBDBABFBD, 0xC0BEBABF,
+ 0xBABFBDBB, 0xBEBABFBD, 0xC1BFBBC0, 0xBABFBDBE,
+ 0xBCBAC0BB, 0xBFBDBBC1, 0xBCBFBDBA, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x06080409, 0x05070704,
+ 0xA8AAAA06, 0xBDBFC2C0, 0xBFBDBABF, 0xBABFBDBC,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBBC0BFBA, 0xBEB7BEBB,
+ 0xBCBBBAC1, 0xBABFBEB7, 0xBDB8BDBB, 0xBCBBB8BE,
+ 0xB9C1C1B6, 0xC0B8C0C0, 0xC0C0B8C0, 0xBABFC0B8,
+ 0xC0BCC1C0, 0xC1C0BCC1, 0xBBC0BFBC, 0xBEBBC1C0,
+ 0xC0BFB8C1, 0xBAC0BFBA, 0xBDBAC1BE, 0xC0BDB9C0,
+ 0xB9BEBCB9, 0xBEB9BFBE, 0xBEBFB9BF, 0xB9BEBDBA,
+ 0xB9B8BDBC, 0xBBB6B6BB, 0xB8BEB9B5, 0xB5B5BBB6,
+ 0xBBB6B4BA, 0xB5BBB6B5, 0xBFB6B9B7, 0xAFADBEC1,
+ 0xA1A7A2AA, 0x9EA0A8A1, 0xA99F9DA5, 0x9DA59BA1,
+ 0x9AA2A89D, 0xA59A9FA5, 0x9EA4999F, 0x98A0A498,
+ 0xA499A0A4, 0x9DA3989E, 0x6AA8ACA0, 0x04007175,
+ 0x00030100, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01020001, 0x01010301, 0x00010001, 0x78010300,
+ 0x81787E81, 0x80817880, 0x7A808177, 0x847B8185,
+ 0x8B898183, 0x828E8C82, 0x897E8E8C, 0x8B897E8D,
+ 0x7D83847A, 0x887D8488, 0x7E827784, 0x7C83847B,
+ 0x877E8485, 0x82837A86, 0x7C84857B, 0x89808586,
+ 0x85867D88, 0x8085867D, 0x88828889, 0x85857F88,
+ 0x7C85867D, 0x80768485, 0x7F80767F, 0x78808178,
+ 0x867D8081, 0x88898085, 0x7D83847B, 0x847B8586,
+ 0x83847B83, 0x78808178, 0x81788081, 0x80817880,
+ 0x747E7C74, 0x78737E7C, 0x77746F7B, 0x6D7A7772,
+ 0x6F667373, 0x6669606E, 0x4C606158, 0x48435455,
+ 0x3F3C384C, 0x624A4B49, 0x7E7A6164, 0x9698927F,
+ 0xA398A099, 0xB3ACA2AA, 0xB9BDB7AC, 0xB8BABEB8,
+ 0xBEB8BABE, 0xBABEB8BA, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABABDBB, 0xBDBBB9BC, 0xBBBEBCBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBABEBFBA, 0xB8BBBBC1, 0xA5B6B1AD,
+ 0xB0A3B9AF, 0xB7AA9DB5, 0x97B6A99B, 0xA897B8A7,
+ 0xB6A696B8, 0x96B6A294, 0xA497B7A3, 0xB8A798B8,
+ 0x98B8A798, 0xA697B7A7, 0xBBA597B9, 0x97BBA597,
+ 0xA597BBA5, 0xBBA796BB, 0x97BBA796, 0xA597B9A5,
+ 0xB7A396B6, 0x97B7A497, 0xA497B7A4, 0xB7A497B7,
+ 0x97B7A497, 0xA496B8A4, 0xBCA496BA, 0x97BBA698,
+ 0xA397BBA3, 0xBAA296BA, 0x97BBA296, 0xA397BBA3,
+ 0xBBA597BB, 0x97BBA597, 0xA496B8A5, 0xB5A196B6,
+ 0x94B6A095, 0xA294B6A2, 0xB7A596B6, 0x93B7A595,
+ 0xA193B7A1, 0xBBA598B8, 0xA3BDAB9F, 0xB2AAC1AC,
+ 0xBEAFA7BE, 0x9CBBAFA4, 0xA798B8AB, 0xB7A797B9,
+ 0x94B9A595, 0xA493B8A5, 0xBBA694BB, 0x94BBA694,
+ 0xA695BAA6, 0xBAA294B8, 0x97BDA496, 0xA697BDA6,
+ 0xBAA094B8, 0x95BBA296, 0xA496BAA2, 0xB7A694B9,
+ 0x97BCA695, 0xA698BCA9, 0xB9A495BB, 0x95BBA093,
+ 0xA698BCA4, 0xB7A095B6, 0x97B7A297, 0xA497B7A4,
+ 0xB8A095B6, 0x97BBA094, 0xA296BAA3, 0xB7A597B9,
+ 0x97B7A697, 0xA495B5A6, 0xB9A294B6, 0x96BBA597,
+ 0xA797B9A7, 0xBBA395B7, 0x9CBAA69B, 0xA89CB8A8,
+ 0xB9ABA1B8, 0xA8B9AEA5, 0xAEAAB6B0, 0xB7B0ADB6,
+ 0xBFBEB0B3, 0xB7BEBBBA, 0xBDBCBFBD, 0xBDBBBBBD,
+ 0xBCBFBDBA, 0xBEBABFBD, 0xBFBDBBC0, 0xBABFBDBA,
+ 0xBABBBFBA, 0xBEBABBBF, 0xBBBFBABD, 0xB6B8BCB6,
+ 0xAFA9B8BC, 0xA6A9A0AD, 0xB5ADB1AB, 0xBCB6B9BE,
+ 0xB8BCB6BA, 0xB4B4BAB5, 0xAEA9B3B9, 0x959791AA,
+ 0x4E7E807A, 0x3C375054, 0x3B3C3838, 0x4B40413D,
+ 0x534A5151, 0x5B5C5250, 0x5D65625D, 0x68636562,
+ 0x71716B6B, 0x666C6C66, 0x6E6A6C6C, 0x72746E6D,
+ 0x6D75756F, 0x766D7576, 0x76797075, 0x7072736A,
+ 0x79707879, 0x77797378, 0x6F70746E, 0x746F6E74,
+ 0x72736F70, 0x7772736F, 0x79787C7B, 0x7876757B,
+ 0x797A7877, 0x79757C7A, 0x787C7778, 0x797B7C78,
+ 0x7E787C7D, 0x7E7E787E, 0x757C7C76, 0x7D79797B,
+ 0x797A767C, 0x7A807D79, 0x7D7C817E, 0x827D7A82,
+ 0x777D7A75, 0x7B767F7C, 0x7C79747E, 0x737B7873,
+ 0x78727979, 0x78787278, 0x7077746F, 0x08077774,
+ 0x0808080A, 0x00000000, 0x01000000, 0x322F2A02,
+ 0x6976736B, 0x746A7573, 0x75746A76, 0x002D2C22,
+ 0x01000402, 0x02010004, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000001,
+ 0x00000000, 0x01000000, 0x00000101, 0x36393700,
+ 0x9A9EA29D, 0xA49A9EA3, 0x9CA4999C, 0x9AA5AAA1,
+ 0xA59C9EA3, 0xA5A89FA2, 0xA3A2A49E, 0xABA6A5A9,
+ 0xA8ACA7A7, 0xA0A3A59F, 0xC0BFA1A5, 0xB8C0BFBA,
+ 0xBAB9BEBC, 0xBEBABBBF, 0xBEBFBDBD, 0xBFBDC0BE,
+ 0xB4B4BEC1, 0xBEC1BFB4, 0xA7B8BCB7, 0xACA6A8AC,
+ 0xB0B4AFA8, 0xC0B9BEBC, 0xBEBEBCC1, 0xBCBEBEBC,
+ 0xBDBABFBD, 0xBEBCBABF, 0xB8BDBBB9, 0xBEBABFBD,
+ 0xBEBDBAC1, 0xB9BFBEB8, 0xBDBABFBD, 0xBFBDBABF,
+ 0xB9BEBCBA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBC,
+ 0xBBB9C0BB, 0xBFBDB9C0, 0xBBBEBCBC, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x06080409, 0x05070704,
+ 0xA8AAAA06, 0xBDBFC2C0, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBDB8BEBD, 0xBEBDB7BC, 0xB9BFBEB8, 0xBBB7BEBB,
+ 0xC0BFB7BE, 0xB9BFBEBA, 0xBBB7BDBC, 0xBEBDB6BC,
+ 0xB7BDBCB8, 0xBEB9BFBE, 0xBFC0B9BF, 0xB9BEBFBA,
+ 0xC0BAC0BF, 0xC2C1BCC1, 0xBCC1C0BD, 0xBFBAC0BF,
+ 0xC0BFB8C0, 0xBAC0BFB8, 0xBFBAC0BF, 0xBFBEBAC0,
+ 0xB9BFBEB9, 0xBEB9C0BD, 0xBCBDB9BF, 0xB8BDBCB8,
+ 0xBEB9BFBE, 0xBDBBBAC1, 0xB7BCBAB8, 0xB6B4BBB6,
+ 0xBBB6B4BB, 0xB5BBB6B4, 0xBDB5B9B4, 0xB0ABBEC2,
+ 0xA0A7A2AA, 0xA2A0A7A0, 0xA69DA2A9, 0x9FA49BA1,
+ 0x99A1A79C, 0xA59A9EA4, 0x9EA4999F, 0x96A0A498,
+ 0xA59A9EA2, 0x9CA2979F, 0x6BA8ACA1, 0x04007174,
+ 0x00030100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x01010200, 0x00010001, 0x782C2E28,
+ 0x81787E81, 0x80817880, 0x7D888980, 0x867E8586,
+ 0x89877F88, 0x828E8C82, 0x8A7F8F8D, 0x87877B8C,
+ 0x7D8A8C80, 0x877D8488, 0x86877D86, 0x7C898A81,
+ 0x87818485, 0x86877E87, 0x7A85867C, 0x867C8384,
+ 0x85867C85, 0x7C888980, 0x847B8485, 0x85867D83,
+ 0x808A8880, 0x857C8A88, 0x80817884, 0x787F8077,
+ 0x807A8081, 0x80807A80, 0x7D83847B, 0x80778586,
+ 0x8081787F, 0x7A827F7A, 0x847C827F, 0x817F7786,
+ 0x717E7C74, 0x746F7B79, 0x77746F78, 0x6B7A7772,
+ 0x6E657374, 0x67685F6D, 0x4C606158, 0x48435455,
+ 0x3F3C384C, 0x604B4C4A, 0x7F796165, 0x9698927F,
+ 0xAC99A099, 0xBCB7ABB3, 0xB8BCB7B6, 0xB8BBBDB7,
+ 0xBDB7BCBE, 0xBBBFB9B9, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB3B9BDB8, 0xBCBAB4B8, 0xBABDBBB9,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBCBABFBD,
+ 0xBFBEB9BE, 0xBABEBFBA, 0xB8BCBCC2, 0xA5B7B1AD,
+ 0xB0A3B9B1, 0xB7A89EB5, 0x9AB9A79B, 0xA796B7AA,
+ 0xB6A797B9, 0x96B6A494, 0xA697B7A5, 0xB7A798B7,
+ 0x98B8A798, 0xA697B7A7, 0xB7A596B6, 0x94B9A595,
+ 0xA594B9A5, 0xB7A594B9, 0x95B7A595, 0xA595B7A5,
+ 0xB6A295B5, 0x94B6A396, 0xA294B6A4, 0xB6A294B6,
+ 0x95B6A095, 0xA095B6A0, 0xBAA395B9, 0x94B8A496,
+ 0xA197BBA0, 0xBBA197BB, 0x96BAA197, 0xA397BBA2,
+ 0xBBA596BC, 0x97BBA597, 0xA398B9A3, 0xB7A497B7,
+ 0x97B7A497, 0xA596B6A6, 0xB6A494B6, 0x94B6A494,
+ 0xA295B5A4, 0xBAA498B4, 0xA4BEABA0, 0xB3AAC4AD,
+ 0xB9AEA3BD, 0x98B8A99D, 0xA897B9A7, 0xB7A797B9,
+ 0x94B6A595, 0xA395B7A4, 0xBBA496BA, 0x95BAA597,
+ 0xA695BAA6, 0xBAA294B8, 0x96BCA496, 0xA495BBA5,
+ 0xBBA293B9, 0x94BAA495, 0xA695BAA3, 0xBAA694B9,
+ 0x97BCA998, 0xA698BCA9, 0xB9A496BA, 0x95BBA195,
+ 0xA496BAA4, 0xB7A297B8, 0x97B8A297, 0xA297B8A2,
+ 0xB8A094B8, 0x97BBA094, 0xA397BBA3, 0xB8A395B7,
+ 0x96B6A496, 0xA396B6A3, 0xBAA597B9, 0x97B9A496,
+ 0xA494B6A7, 0xBBA698BA, 0x9CBAA69B, 0xA89CB8A8,
+ 0xBBA79FB6, 0xA8B9ADA6, 0xAEAAB6B0, 0xBBB0ACB7,
+ 0xBEBCB4B7, 0xB8BFBAB9, 0xBDBCBFBD, 0xBBB9BCBF,
+ 0xBBBEBCB8, 0xBCBABFBD, 0xBFBDB9BE, 0xBCBFBDBC,
+ 0xB9B9BEBC, 0xBFBAB8BE, 0xBBBFB9BB, 0xB7B8BCB7,
+ 0xBBB7B8BC, 0xBABCB6BA, 0xB6B8BCB7, 0xBCB7B6BD,
+ 0xB9BDB8B8, 0xB7B4B9B8, 0xADA8B3B8, 0x979993A9,
+ 0x4D7E807A, 0x3B375153, 0x3A3B373A, 0x4D3F403C,
+ 0x5C515153, 0x5A5B5158, 0x5E5F5C57, 0x625D6562,
+ 0x6B686365, 0x666C6D64, 0x706C6C6C, 0x6D6F696F,
+ 0x6D767670, 0x71687576, 0x70716870, 0x6F70706A,
+ 0x746E7575, 0x76787274, 0x7570746F, 0x72707477,
+ 0x76777371, 0x757A7B77, 0x7672797B, 0x76777375,
+ 0x737A7975, 0x7B797877, 0x787C777A, 0x75797A76,
+ 0x7A757B7B, 0x7C7C767D, 0x797B7B75, 0x7D797F7F,
+ 0x7C7D797C, 0x79817E7A, 0x7A76817E, 0x7D7A767D,
+ 0x737F7C77, 0x77727B78, 0x7B78737B, 0x757D7A75,
+ 0x78737D7A, 0x7A77727B, 0x73777470, 0x08087874,
+ 0x0808080A, 0x00000001, 0x01000000, 0x302F2B00,
+ 0x6D75726D, 0x2C287572, 0x0A09052D, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000102, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x01000000, 0x36393700,
+ 0x9A9FA39E, 0xA39A9CA4, 0x9EA4999E, 0x979DA299,
+ 0xA39A9BA0, 0xA3A69DA0, 0xA4A2A6A0, 0xACA7A5A9,
+ 0xA3A7A2A8, 0x92969892, 0xC0BF9498, 0xB8C0BFBA,
+ 0xBBB9BEBC, 0xBEB9BAC0, 0xBBBFBABA, 0xB1BEC2BD,
+ 0x9E9CB2B6, 0xA7ABA69B, 0xA6A8ACA7, 0xACA7A6AD,
+ 0xAFB3AEA8, 0xBAB6BBB9, 0xBFBDB7BC, 0xBCBFBDBC,
+ 0xBDBABFBD, 0xC0BEBABF, 0xBABFBDBB, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBDBABFBD, 0xBFBEBABF,
+ 0xB9BEBDBA, 0xBDB9BEBC, 0xBEBCB9C0, 0xBABFBDB9,
+ 0xBDB9C0BD, 0xBFBDB9C0, 0xBABDBBBC, 0xBFC2C3BF,
+ 0x8282C2C3, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8AAAA06, 0xBDBFC2C0, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBFB8BEBD, 0xBEBDB9BE, 0xB8BEBDB8, 0xBDB8BEBD,
+ 0xBFBEB9C0, 0xB8BEBDB9, 0xBCBAC0BF, 0xBDBCB7BD,
+ 0xB7BDBCB7, 0xBEB9BFBE, 0xBEBFB9BF, 0xB6BBBCB9,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBDC2C1BB, 0xBFB9BFBE,
+ 0xBFBEB8C0, 0xB9BFBEB7, 0xBFB9BFBE, 0xBFBEBAC0,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBEBFB9BF, 0xB9BFBEB9,
+ 0xBAB7BDBC, 0xBCBAB6BD, 0xB8BDBBB7, 0xB9B7BDB8,
+ 0xBEB9B7BE, 0xB5BBB6B7, 0xBDB5B9B4, 0xB0ABBCC2,
+ 0xA0A7A2A9, 0xA1A2A9A2, 0xA49BA1A8, 0xA1A69D9F,
+ 0x9C9FA49B, 0xA59AA1A7, 0x9EA4999F, 0x999FA398,
+ 0xA398A0A4, 0x9CA2979D, 0x32A8ACA1, 0x0400383B,
+ 0x00030100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00010000, 0x782B2D27,
+ 0x80787E81, 0x83817982, 0x7E83847B, 0x847C8687,
+ 0x8A888086, 0x7B848379, 0x897F8785, 0x8A897F8B,
+ 0x7D8A8B81, 0x877D8488, 0x8A8B8186, 0x7B888980,
+ 0x8A818384, 0x88898089, 0x7C85867D, 0x887E8586,
+ 0x85867C87, 0x7B888980, 0x847B8384, 0x80817883,
+ 0x7C85867D, 0x837A8485, 0x85867D82, 0x7785867D,
+ 0x82797F80, 0x83847B81, 0x7E83837D, 0x837D8687,
+ 0x7F7F7983, 0x8386837E, 0x8D858B88, 0x8F8D858F,
+ 0x74828078, 0x78737E7C, 0x7B78737B, 0x6B7A7870,
+ 0x6E657374, 0x6869606D, 0x4C606158, 0x48435455,
+ 0x3E3B374B, 0x604A4B47, 0x7F796364, 0x9597917D,
+ 0xAD99A099, 0xBDB8ADB4, 0xB8BCB7B7, 0xB8BCBDB9,
+ 0xBEB9BBBC, 0xBABEB9BA, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB1BABEB9, 0xBEBCB2B6, 0xBABDBBBB,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBCBFBD,
+ 0xBFBEBCBF, 0xBBBFC0BA, 0xB8BBBBC1, 0xA5B6B1AD,
+ 0xB0A2BAAF, 0xB8A79CB6, 0x98B7A89C, 0xA798B8A7,
+ 0xB8A797B9, 0x97B7A696, 0xA596B6A6, 0xB6A495B5,
+ 0x97B7A596, 0xA697B7A6, 0xB9A798B8, 0x97B9A797,
+ 0xA797B9A7, 0xB9A797B9, 0x97B9A797, 0xA798B8A7,
+ 0xB9A496B8, 0x96B8A597, 0xA496B8A6, 0xB8A297B8,
+ 0x97B8A297, 0xA095B6A2, 0xB8A294B8, 0x94B8A294,
+ 0x9E94B8A0, 0xB89E94B8, 0x94B8A094, 0xA294B8A0,
+ 0xBCA596BC, 0x97BBA596, 0xA597B9A3, 0xB7A496B8,
+ 0x97B7A697, 0xA798B8A6, 0xB9A696B8, 0x97B9A797,
+ 0xA798B8A7, 0xB8ABA0BA, 0x9FB9ABA1, 0xAB9FBBAA,
+ 0xBCAA9EBC, 0x97B9AA9E, 0xA797B9A7, 0xB6A494B6,
+ 0x96B8A294, 0xA395B7A4, 0xB5A193B7, 0x93B5A193,
+ 0xA193B5A3, 0xBAA294B8, 0x98BCA496, 0xA495BBA6,
+ 0xBBA394BA, 0x96BCA495, 0xA694BBA5, 0xBCA694B9,
+ 0x97BCA997, 0xA698BCA8, 0xB9A296BA, 0x93B9A195,
+ 0xA496BAA2, 0xB7A496B8, 0x96B8A297, 0xA196B7A4,
+ 0xBCA294B8, 0x96BAA498, 0xA397BBA4, 0xB6A496BA,
+ 0x94B6A095, 0xA496B8A2, 0xB9A597B9, 0x94B6A597,
+ 0xA294B6A4, 0xB9A496B8, 0x9AB8A499, 0xA89CB8A6,
+ 0xB8A89FB9, 0xA6B7AAA3, 0xB0A9B6AE, 0xBBB0ACB7,
+ 0xBEBCB6B7, 0xB9BFBAB9, 0xB9BCC0BB, 0xBBB9B8BB,
+ 0xBABFBDB8, 0xBBBABFBD, 0xBDBBB8BD, 0xBABDBBBA,
+ 0xBAB9BEBC, 0xBFBAB9BF, 0xBBBFB9BB, 0xB7B6BDB6,
+ 0xBCB7B6BC, 0xB8BCB7B8, 0xB7B6BCB7, 0xBCB7B6BC,
+ 0xABB1ACB8, 0xB6B2B9B6, 0xB9B4B2B9, 0x939791B3,
+ 0x4B7F8279, 0x544E5154, 0x3A3B3752, 0x4440413D,
+ 0x5449484A, 0x5A5B5150, 0x565F5C57, 0x625D5E5B,
+ 0x69696365, 0x666C6C66, 0x6B676A6C, 0x6D6F696A,
+ 0x6870706A, 0x766D7071, 0x78797075, 0x6F75756F,
+ 0x706A7575, 0x70706A70, 0x6F72736F, 0x77737273,
+ 0x7A7B7776, 0x767A7C76, 0x7B777A7C, 0x7A7B777A,
+ 0x79767773, 0x7B797A7B, 0x787B797A, 0x757C7D79,
+ 0x7872797B, 0x7B7B7578, 0x74797B75, 0x7D79787A,
+ 0x7C7D797C, 0x75797B75, 0x7A767B7B, 0x7D7A767B,
+ 0x737D7A75, 0x78737B78, 0x807D787C, 0x767D7A75,
+ 0x7A757E7B, 0x7C79747D, 0x72787370, 0x08077773,
+ 0x0707070A, 0x00000000, 0x00000000, 0x00010000,
+ 0x060A0905, 0x09070B0A, 0x08080808, 0x00000000,
+ 0x00000000, 0x01010100, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000001, 0x02000000, 0x00010001,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x363A3500,
+ 0x99ABAFA9, 0xA39A9DA2, 0xA0A4999E, 0x9CA2A59C,
+ 0xA59CA2A5, 0xA2A59CA2, 0x9FA0A49F, 0xA9A49EA4,
+ 0xA3A7A1A5, 0x9E969892, 0xC0BFA0A4, 0xBAC0BFBB,
+ 0xBAB9BEBC, 0xC0BBB9BF, 0xBBBFB9BC, 0xB1BEC2BD,
+ 0x9F9AB2B6, 0xA6AAA59B, 0xB6AEB5AE, 0xC4BFB6BD,
+ 0xC1C5C0C0, 0xBFBCBFBD, 0xC1BFBCC1, 0xBCBFBDBE,
+ 0xBEB8BDBB, 0xC1BFBBC0, 0xBCC1BFBC, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBCC1BFBA, 0xBDBABFBD, 0xC0BFBABF,
+ 0xB7BCBBBB, 0xBDB4BBB8, 0xC0BDB9C0, 0xB9C0BDB9,
+ 0xBDB9C0BD, 0xBFBDB9C0, 0xBABDBBBA, 0xC1C2C3BF,
+ 0x8282C2C3, 0x00000082, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8AAAA06, 0xBEBFC1C1, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBEB8BEBD, 0xBEBFB9BF, 0xB9BFBEB9, 0xBDB9BFBE,
+ 0xBFBEB8BE, 0xB9BFBEB9, 0xBEB9BFBE, 0xBEBFB9BF,
+ 0xB9BEBFB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB5BBBAB9,
+ 0xC0B7BFBF, 0xBFC0B8C0, 0xBABFC0BA, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xB9BEBFBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xC0B9C1C0, 0xC0C0B8C0, 0xBAC0BFB8,
+ 0xBDB9BFBE, 0xBDBBB9C0, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBEB9B8BD, 0xB8BEB9B8, 0xB7B8BCB7, 0xAFA8B6BC,
+ 0x9EA9A1A7, 0xA19FA7A0, 0xA9A2A0A8, 0xA3A89FA2,
+ 0x9AA0A59C, 0xA39AA0A3, 0xA0A39AA0, 0x9BA1A49B,
+ 0xA299A1A4, 0xA1A49B9F, 0x049EA198, 0x0806080A,
+ 0x08080807, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00010000, 0x00000000, 0x7A20211D,
+ 0x807B7E80, 0x827F7A83, 0x80888980, 0x88828889,
+ 0x88898088, 0x7C84857C, 0x847C8684, 0x86847C86,
+ 0x7F87887F, 0x877F8788, 0x87887F89, 0x868E8F85,
+ 0x8F848D91, 0x8C8F868B, 0x8C7C7D74, 0x948B9495,
+ 0x93948B93, 0x8B92968B, 0x948A9296, 0x91958A93,
+ 0x898F9289, 0x7E788D92, 0x8F92897A, 0x7D84877E,
+ 0x877D8488, 0x85867D86, 0x7F87847F, 0x84808784,
+ 0x87847F87, 0x90878781, 0x99909899, 0x87887F98,
+ 0x78808178, 0x81788081, 0x81827980, 0x6477786F,
+ 0x6E656C6D, 0x6C6D646D, 0x4558594F, 0x443B4D4E,
+ 0x38383243, 0x604D4C48, 0x938F6564, 0x90948F92,
+ 0xA8A0A49F, 0xB7B0A7AD, 0xB9BFBAB0, 0xBAB7BAB8,
+ 0xBCBAB9BC, 0xBBBCB8BB, 0xB9BBBFBA, 0xBDBBBABE,
+ 0xBABDBBBA, 0xBBBCC0BB, 0xBFBDBCC0, 0xBCBFBDBC,
+ 0xBEBABFBE, 0xBFBEB9BF, 0xB9BEBDB9, 0xBEBCBEBE,
+ 0xBFBDBCBE, 0xBDBFBFBC, 0xB6B8B9BD, 0xA8B9AFAB,
+ 0xAB9EB6B0, 0xB8AA9DB7, 0x99B8A89C, 0xA899B8A8,
+ 0xB8A697B7, 0x95B6A897, 0xA796B7A6, 0xB5A596B6,
+ 0x98B8A495, 0xA798B8A7, 0xB9A897B9, 0x98BAA897,
+ 0xA798B8A9, 0xB7A697B7, 0x98B8A497, 0xA598B8A5,
+ 0xBAA496B8, 0x97BBA496, 0xA597B9A5, 0xB7A297B8,
+ 0x98B8A297, 0xA597B9A5, 0xBBA597BB, 0x96BCA597,
+ 0xA396BCA3, 0xB8A397BB, 0x94B8A294, 0xA294B8A2,
+ 0xB9A293B9, 0x94B8A093, 0xA294B6A2, 0xB8A695B7,
+ 0x97B8A897, 0xA798B8A8, 0xB9A696B8, 0x9ABAA597,
+ 0xAA9BBAA9, 0xBAAA9FB9, 0x9FB9ADA3, 0xA99DB9AA,
+ 0xB9A79ABA, 0x97B9A597, 0xA597BBA5, 0xB8A294B8,
+ 0x96BAA294, 0xA496BAA4, 0xB7A294B6, 0x97B7A497,
+ 0xA396B6A4, 0xBAA095B6, 0x96BAA296, 0xA195B9A2,
+ 0xBDA495BB, 0x97BDA697, 0xA394BAA6, 0xBBA391B8,
+ 0x97BDA694, 0xA798BEA6, 0xB8A094B8, 0x93B9A094,
+ 0xA496BAA2, 0xB8A395B7, 0x95B7A598, 0xA294B8A5,
+ 0xBCA595B7, 0x97BCA698, 0xA698BCA8, 0xB8A094B8,
+ 0x97BB9E94, 0xA397BBA3, 0xB6A297B8, 0x94B6A294,
+ 0xA597B9A4, 0xB9A699B9, 0x99B9A499, 0xA89CBAA6,
+ 0xB5A99EB8, 0xA5B9A9A0, 0xB0A9B8AE, 0xB9B4AFB8,
+ 0xBBB9B6B5, 0xB8BCB7BA, 0xB9BABEB9, 0xBFBDB6BB,
+ 0xBABFBEBA, 0xBAB8BDBC, 0xBDBBB6BB, 0xBABDBBBA,
+ 0xBBB8BEB9, 0xBCB7BAC0, 0xBABEB8B8, 0xB7B8BFB8,
+ 0xBDB8B7BE, 0xB7BDB8B7, 0xB5B6BDB6, 0xBAB3B5BC,
+ 0xB3BAB3B3, 0xB3B0B7B2, 0xB8B1B1B8, 0x99A099B0,
+ 0x6381867D, 0x514B696C, 0x3838324F, 0x443E403A,
+ 0x59504A4D, 0x58595058, 0x5C65665D, 0x71686465,
+ 0x70706A70, 0x62666763, 0x736F6566, 0x72746E72,
+ 0x636A6C66, 0x796F6B6C, 0x797A7178, 0x6B6E706A,
+ 0x6F6B6E6F, 0x70706A70, 0x6D73736D, 0x736D7373,
+ 0x7C7C7673, 0x7B81817B, 0x817B8181, 0x81807C81,
+ 0x86868785, 0x86868686, 0x84878586, 0x84868A85,
+ 0x8B82868A, 0x868B8286, 0x82868B82, 0x89848488,
+ 0x83898485, 0x82828982, 0x88828488, 0x88888286,
+ 0x777C7B77, 0x7B777C7B, 0x7F7C777E, 0x707A7772,
+ 0x79707879, 0x79776F78, 0x70787370, 0x29257774,
+ 0x0102002A, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x01010200, 0x00000001, 0x01000001,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x02000002, 0x00000100,
+ 0x00000001, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000100, 0x01000001, 0x2A2E2900,
+ 0x98A6ABA2, 0xA49B9CA1, 0xA3A49BA3, 0x9BA6A79D,
+ 0xA9A0A4A5, 0xA7AAA1A8, 0xA3A5A9A4, 0xA9A2A2A8,
+ 0x9DA49DA2, 0x9A99A099, 0xB5B3999F, 0xBEC0C0B2,
+ 0xB8BABDBB, 0xBDB9B9BD, 0xBCBDB9BC, 0xBAC0C4BF,
+ 0xB4AFBBBF, 0xB0B4AFB0, 0xBFBDC1BC, 0xC0BEC0C4,
+ 0xBDC0BEBF, 0xBFBCBFBD, 0xC0C0BEC1, 0xBCBEBEC0,
+ 0xBFB8BDBC, 0xC0C0BBC0, 0xBCBFBDBE, 0xBBBABFBD,
+ 0xBDBABAC0, 0xB5BAB8B6, 0xB7B7BCBA, 0xBCBBB4B9,
+ 0xBAC0BFB7, 0xBFB2B8B7, 0xC0BFB8C0, 0xBAC0BFB8,
+ 0xBFB9BFBE, 0xBEBCBAC0, 0xBCBFBDB9, 0xBFC0C1BF,
+ 0x8080C0C1, 0x00000080, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8AAAA06, 0xBEBDC2C1, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBFBAC0BF, 0xBEBFBAC0, 0xB9BFBEB9, 0xBCB9BFBE,
+ 0xBEBDB7BD, 0xB9BFBEB8, 0xBEB8BEBD, 0xBEBFB9BF,
+ 0xB9BEBFB9, 0xBFB9BFBE, 0xC0BFBAC0, 0xB8BEBDBA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBAC0BFBA, 0xBFB8C0BF, 0xC0BFB8C0,
+ 0xB8C0C0BA, 0xC2B7C0C3, 0xC0C0B6BF, 0xB8C0BFB8,
+ 0xBBB7BDBC, 0xBFBDB7BE, 0xBDC0BEBA, 0xB9B8BDBB,
+ 0xBCB7B6BB, 0xB8BEB9B6, 0xB7B8BCB7, 0xA8A1B6BC,
+ 0x9EA9A1A0, 0xA0A0A8A1, 0xA8A19FA7, 0x9FA39DA1,
+ 0x9AA0A39A, 0xA69DA0A3, 0xA2A59CA3, 0x98A0A39A,
+ 0xA49B9EA1, 0xA1A49BA1, 0x059EA09A, 0x0A080809,
+ 0x07070709, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010002, 0x00010000, 0x00000000, 0x7B1F201E,
+ 0x7F7B7E7F, 0x827F7A82, 0x80888980, 0x88828889,
+ 0x88898088, 0x8D95968D, 0x958D9596, 0x97958D97,
+ 0x90999A91, 0x98909899, 0x9A98909A, 0x98A2A399,
+ 0xA4999FA3, 0xA2A399A0, 0xA0A9AAA1, 0xA9A0A8A9,
+ 0xA8A9A0A8, 0xA1AAABA1, 0xABA1A8AC, 0xA8ACA1AA,
+ 0x9DA0A69B, 0xA49E9FA7, 0xA0A59CA0, 0x8F969A8F,
+ 0x988E969A, 0x999A9197, 0x9097948F, 0x94909794,
+ 0x95949097, 0x91989892, 0x9892999A, 0x87887F98,
+ 0x78808178, 0x80788081, 0x80817882, 0x72787970,
+ 0x76717878, 0x6E6C6479, 0x45585950, 0x443B4B4E,
+ 0x43443B43, 0x784E4B47, 0x93917D7C, 0x90948F92,
+ 0xB0A0A49F, 0xB7B0B0B7, 0xBAC1BAB0, 0xB7B7BAB8,
+ 0xBAB8B6B9, 0xB9BAB8B9, 0xB6B8BCB7, 0xBBB9B7BB,
+ 0xB8BCB7B8, 0xB9BABEB9, 0xBEBCBABE, 0xBABDBBBB,
+ 0xBDB8BDBB, 0xBFBEB8BE, 0xBABFBEB9, 0xBDBCBEBE,
+ 0xBFBDBCBF, 0xBDBFBFBC, 0xB5B2B3B7, 0xA8B9ACAB,
+ 0xAAA0B7AE, 0xBAA89CB8, 0x99B7A89C, 0xA699B9A5,
+ 0xB8A798B8, 0x97B8A897, 0xA898BAA8, 0xB8A696B8,
+ 0x97B9A696, 0xA797B9A7, 0xBAA796B8, 0x97B8A998,
+ 0xA798B8A8, 0xB7A598B8, 0x97B7A497, 0xA497B7A4,
+ 0xBBA698BA, 0x96BBA796, 0xA597B9A7, 0xB7A496B8,
+ 0x97B7A497, 0xA496B8A4, 0xBBA597BB, 0x96BCA597,
+ 0xA396BCA3, 0xBCA496BA, 0x95BAA698, 0xA698BCA6,
+ 0xBDA396BC, 0x97BBA497, 0xA496B8A5, 0xB8A798B8,
+ 0x98B7A999, 0xA798B7A8, 0xBAA698BA, 0x95B7A698,
+ 0xA699B9A5, 0xB8AA9EBA, 0x9EBAA99E, 0xA69AB8AA,
+ 0xB7A798B8, 0x97BBA395, 0xA597BBA5, 0xB8A195B9,
+ 0x95BBA094, 0xA596BCA4, 0xB7A395B7, 0x97B7A497,
+ 0xA497B7A4, 0xBAA095B6, 0x97B8A296, 0xA294B6A2,
+ 0xBDA495BB, 0x97BDA697, 0xA293B9A6, 0xBBA495BB,
+ 0x96BCA495, 0xA495BBA5, 0xBAA094B8, 0x97BDA296,
+ 0xA496BAA6, 0xB7A595B7, 0x93B8A697, 0xA493B8A4,
+ 0xBCA797B9, 0x97BCA897, 0xA697BDA8, 0xB8A094B8,
+ 0x97BD9E94, 0xA197BBA2, 0xB6A196B7, 0x97B9A095,
+ 0xA496B8A5, 0xB9A499B9, 0x99B9A499, 0xA89CBAA6,
+ 0xB7A89DB7, 0xA7BBABA2, 0xB0A9B8B0, 0xB9AFAAB3,
+ 0xBBB9B6B5, 0xB8BCB7BA, 0xBBB8BEB9, 0xBFBEBAC0,
+ 0xB9BFBEB9, 0xBFB7BDBC, 0xBCBABBC0, 0xBABDBBB7,
+ 0xBABAC0BB, 0xBFBAB9BF, 0xB9BDB8BB, 0xB7B8BFB8,
+ 0xBBB6B7BE, 0xB7BDB8B5, 0xB5B6BCB7, 0xBAB3B5BC,
+ 0xB1B8B1B3, 0xB0B0B8B1, 0xB8B1AFB7, 0x98A099B0,
+ 0x6380857C, 0x514B676C, 0x38383251, 0x443F413B,
+ 0x5A514A4D, 0x58595059, 0x5D63665D, 0x71686366,
+ 0x6E706A70, 0x6F71726E, 0x736F7074, 0x72746E72,
+ 0x71767872, 0x7970797A, 0x78797078, 0x757A7A74,
+ 0x7A767879, 0x7A7A747B, 0x757D7E75, 0x7D757D7E,
+ 0x8889807F, 0x8B90908A, 0x908A9191, 0x908F8B90,
+ 0x97989997, 0x99999597, 0x96999799, 0x999B9F9A,
+ 0xA09799A0, 0x9BA0979B, 0x999BA097, 0x9F9A9B9F,
+ 0x9B9F9A9B, 0x9999A099, 0x9F999B9F, 0x8887839D,
+ 0x898E8D89, 0x7B778E8D, 0x7C7B777E, 0x70787872,
+ 0x79707879, 0x78797078, 0x70777470, 0x504A7774,
+ 0x02030050, 0x00020000, 0x00000200, 0x00000000,
+ 0x00020000, 0x00000000, 0x01010100, 0x00000001,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x01020002, 0x00000100,
+ 0x00000001, 0x00000000, 0x00020000, 0x01010200,
+ 0x00000001, 0x00000100, 0x01000001, 0x595A5600,
+ 0x97A6ABA2, 0xA49B9EA2, 0xA5A39BA3, 0x9DA4A59B,
+ 0xA89FA6A7, 0xA6A9A0A7, 0xA4A4A8A3, 0xACA5A3A9,
+ 0x9DA49DA5, 0x9A99A099, 0xB5B3999F, 0xC0C0C0B2,
+ 0xB9BABDBB, 0xBDB9BABE, 0xBABEB9BC, 0xBBBCC0BB,
+ 0xC4BFBCC0, 0xC0C4BFC0, 0xBDBDC1BC, 0xBEBCBEC2,
+ 0xBBBEBCBD, 0xBDBABDBB, 0xC1C1BCBF, 0xBCBEBEC1,
+ 0xC0BCBEBE, 0xC1C1BEC0, 0xBFC2C0BF, 0xBEBCBFBD,
+ 0xBFBDBBC0, 0xB9C0BDBA, 0xBAB9BEBC, 0xBDBCB7BC,
+ 0xBAC0BFB7, 0xBEB8C0BF, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xBEB9BFBE, 0xBBB9B9BF, 0xB8BDBBB6, 0xBFC0C1BF,
+ 0x8181C0C1, 0x00000081, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8AAAA06, 0xBDBDC2C0, 0xBFBDB9C0, 0xBABFBDBA,
+ 0xBEB9BFBE, 0xBFBEB7BF, 0xB9BFBEB9, 0xBDB7BFBE,
+ 0xBFBEB7C0, 0xB9BFBEB9, 0xBFB9BEBF, 0xBEC1B9BE,
+ 0xB9BEBFB9, 0xBEBABFBE, 0xBEBDBABF, 0xB7BDBCB8,
+ 0xBEBAC0BF, 0xBDBEB9BF, 0xB9BEBFB8, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xB9BFBEBA, 0xBDBAC0BF, 0xBFBEB9C0,
+ 0xB3BDBDB9, 0xC5A7B5BB, 0xBFC2B1BF, 0xB8C0BFB6,
+ 0xBBB9BFBE, 0xBFBDB7BE, 0xBABFBDBA, 0xBABABFBD,
+ 0xBCB7B7BC, 0xB6BCB7B6, 0xB7B8BCB7, 0xA8A1B6BC,
+ 0xA0A8A1A0, 0x9EA1A8A1, 0xA29C9EA5, 0x9EA29C9E,
+ 0x9D9FA299, 0xA39AA3A6, 0xA1A49BA0, 0x9D9DA19B,
+ 0xA39D9FA3, 0x9EA09AA1, 0x059E9F9B, 0x09070809,
+ 0x08080808, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x5C212220,
+ 0x7E7A5F60, 0x827F7A81, 0x7077786F, 0x79707679,
+ 0x77786F78, 0x7B85867D, 0x857B8485, 0x84857C84,
+ 0x8189877F, 0x85808986, 0x89877F89, 0x858E8F85,
+ 0x8F868E8F, 0x7B7C738E, 0x747F7D75, 0x7D757E7C,
+ 0x7D7E757F, 0x767E7F76, 0x7F767E7F, 0x7B7F747E,
+ 0x758D9388, 0x7F767A80, 0x7C7F767C, 0x7C86877D,
+ 0x877D8688, 0x85867D86, 0x82858480, 0x84838583,
+ 0x83848086, 0x6F868783, 0x736F7375, 0x73756F72,
+ 0x6E75726D, 0x736E7673, 0x76736E77, 0x676E6B66,
+ 0x605C6E6B, 0x63605C63, 0x45575751, 0x433A4D4E,
+ 0x44453C42, 0x5F4E4B47, 0x94906463, 0x90948F93,
+ 0xB09EA49F, 0xC0B9B0B7, 0xB9C0B9B9, 0xBAB9BCBA,
+ 0xBCBAB9BC, 0xBBBCB8BB, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xB7B7BBB6, 0xBBB9B8BC, 0xB8BBB9B8,
+ 0xB9B5BAB8, 0xBCBAB6BB, 0xB6BBB9B7, 0xB9B8BBB9,
+ 0xBBB9B8BB, 0xBBBBBBBA, 0xB5B3B4B8, 0xA2B2ACAB,
+ 0xA8A0B7A5, 0xB9A99DB9, 0x98BAA699, 0xA496B8A6,
+ 0xB7A595B7, 0x96B8A595, 0xA595B7A6, 0xB7A595B7,
+ 0x94B6A395, 0xA494B6A4, 0xB6A897B9, 0x97B9A695,
+ 0xA797B9A7, 0xB9A496B8, 0x96B8A597, 0xA497B7A4,
+ 0xB7A797B9, 0x95B7A695, 0xA695B7A6, 0xB7A595B7,
+ 0x95B7A395, 0xA294B6A3, 0xBCA796BB, 0x95BBA596,
+ 0xA295BBA2, 0xBBA397BB, 0x96BBA597, 0xA89ABEA7,
+ 0xBCA296BA, 0x99BDA298, 0xA69BBCA5, 0xB9A89CBA,
+ 0x9EB8A99D, 0xA89CB8A9, 0xB9A598B8, 0x94B6A398,
+ 0xA496B8A2, 0xB4A699B9, 0x95B5A096, 0xA294B6A0,
+ 0xB7A696B8, 0x97B9A595, 0xA597B9A7, 0xB8A296BA,
+ 0x95BBA094, 0xA495BBA4, 0xB7A496BA, 0x98B8A395,
+ 0xA497B7A5, 0xB8A294B6, 0x96B8A496, 0xA395B7A4,
+ 0xBBA495BB, 0x95BBA495, 0xA293B9A4, 0xBFA494BD,
+ 0x95BBA696, 0xA394BAA4, 0xBAA094B8, 0x95BBA296,
+ 0xA698BCA2, 0xB5A898BA, 0x91B6A495, 0xA695BAA2,
+ 0xBDA998BD, 0x98BDA998, 0xA897BCAA, 0xB8A293B9,
+ 0x97BB9F92, 0xA094B8A3, 0xB8A094B8, 0x96B8A297,
+ 0xA497B7A4, 0xB7A499BA, 0x99B9A297, 0xA69AB6A6,
+ 0xB6A89DB7, 0xA3B7AAA1, 0xB1AAB9AC, 0xB9AEABB4,
+ 0xBABAB6B5, 0xB7BAB8BA, 0xBBBAC0BB, 0xBFBEBAC0,
+ 0xB7BFBEB9, 0xBFB7BFBE, 0xBDBBBAC0, 0xBABFBDB8,
+ 0xBDBBBEBC, 0xBAB8BCBF, 0xBABEB9B9, 0xB7B7BDB8,
+ 0xBCB7B6BC, 0xB7BDB8B6, 0xB7B5BBB6, 0xB9B2B6BC,
+ 0xB2B9B2B2, 0xB2B0B8B1, 0xB9B2B1B9, 0x979F98B1,
+ 0x6580847E, 0x5249676B, 0x38383251, 0x3A32342E,
+ 0x4C463E40, 0x5859504C, 0x535B5C53, 0x665D5B5C,
+ 0x6E706A65, 0x6E72746E, 0x736D7074, 0x72746E6F,
+ 0x72787872, 0x77727A77, 0x7976717A, 0x7F84837F,
+ 0x837D8483, 0x84847E83, 0x7F8B8981, 0x897F8A89,
+ 0x87887F88, 0x898F918B, 0x918B8D8F, 0x8E908A8F,
+ 0x85848883, 0x86848487, 0x84888383, 0x82868A84,
+ 0x766D868B, 0x72756C73, 0x6D73736D, 0x87837373,
+ 0x87888486, 0x84868783, 0x706C8988, 0x736F6E73,
+ 0x797B7978, 0x7B7A7C7A, 0x7C7B777D, 0x686D6E6A,
+ 0x6F696C6E, 0x6F6E6A6D, 0x70757470, 0x2A247574,
+ 0x02030028, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x02000000, 0x00010001, 0x00000101,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010200, 0x00000001, 0x85868202,
+ 0x97A2A89D, 0xA49B9EA2, 0xA5A39BA3, 0x9FA4A59B,
+ 0xA79EA8A9, 0xA6A9A0A6, 0xA6A2A8A3, 0xACA7A5AB,
+ 0x9DA39EA6, 0xA6999F9A, 0xC2C0A5AB, 0xB4B5B3BF,
+ 0xB9B7BBB6, 0xBEB9B8BE, 0xBABDBBBA, 0xB9BCC0BB,
+ 0xBFBAB8BE, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBBBABDBB, 0xBFBDB8BD, 0xBDC0BEBC,
+ 0xBDBCBFBD, 0xBFBDBCBF, 0xBCBFBDBC, 0xBEBCBFBD,
+ 0xBFBEBABF, 0xB9BFBEBA, 0xBEBAC0BF, 0xC0C0B9BF,
+ 0xB8C0C0B8, 0xB1BAC0BF, 0xABAAACB2, 0xB3B9B8A5,
+ 0xBBB8BDBC, 0xBCBBB7BC, 0xB6BBBAB7, 0xC0BFC0BE,
+ 0x8080C1C2, 0x0000007E, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x04060805,
+ 0xA8AAAA05, 0xBDBDC2C0, 0xBFBDB9C0, 0xBABFBDBA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEBAC1BE,
+ 0xC0BFB8C1, 0xB9BFBEBA, 0xC0BABFC0, 0xBFC2BABF,
+ 0xB9BEBFBA, 0xBEBABFBE, 0xBEBDBABF, 0xB7BDBCB8,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xB7BFBFB9, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBAC0BFBA, 0xBDBAC0BF, 0xBFBEB8BE,
+ 0xB3BCBFB9, 0xBE94A4AA, 0xC0C2A7B7, 0xB8C0C0B4,
+ 0xBBB9BFBE, 0xBBB9B7BE, 0xB6BBB9B6, 0xB9B8BDBB,
+ 0xBCB7B6BB, 0xB5BBB6B6, 0xB7B8BCB7, 0xA8A1B6BC,
+ 0x9FA7A0A0, 0x9F9EA59E, 0xA7A19FA6, 0xA3A7A1A3,
+ 0x9BA0A59C, 0xA39AA1A4, 0x9FA49BA0, 0x9D9FA39D,
+ 0xA09A9FA3, 0xA7A9A39E, 0x046C6E68, 0x09070708,
+ 0x09090908, 0x00000000, 0x02000000, 0x00010001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x3E20211F,
+ 0x605C413F, 0x63605B63, 0x60686862, 0x69606669,
+ 0x68696068, 0x59626359, 0x63596263, 0x62635A62,
+ 0x5D65665D, 0x665E6765, 0x67655D68, 0x5E68695F,
+ 0x685E6569, 0x68695F67, 0x606A695F, 0x68606B6A,
+ 0x6869606A, 0x5F686960, 0x68626568, 0x66696068,
+ 0x61686C61, 0x6C61666C, 0x686C6168, 0x59626359,
+ 0x63596263, 0x62635A62, 0x5F64635F, 0x635F6463,
+ 0x62635F62, 0x5F61625E, 0x635F6263, 0x62635F62,
+ 0x585F5C58, 0x5C585F5C, 0x605D595F, 0x4F575450,
+ 0x55515653, 0x57545058, 0x3D4D4D47, 0x3A314343,
+ 0x38383239, 0x60504D49, 0x938F6564, 0x90948E92,
+ 0xB0A0A49E, 0xC1B7B2B6, 0xB9C0B9B9, 0xBAB9BDB8,
+ 0xBCB8BBBC, 0xBBBCB8BB, 0xB9BABEB9, 0xBEB9BABE,
+ 0xBABEB9BA, 0xB9BABEB8, 0xBDBBBABE, 0xB9BCBABA,
+ 0xB7B6BBB9, 0xBCB7B6BC, 0xB6BCB7B6, 0xB9B8BBB9,
+ 0xBBB7B8BB, 0xBABABABA, 0xB6B2B2B8, 0xA2B3ACAA,
+ 0xA8A0B7A8, 0xB7A79BB7, 0x94B6A497, 0xA294B6A2,
+ 0xB6A494B6, 0x93B8A494, 0xA493B8A4, 0xB6A294B6,
+ 0x94B6A294, 0xA393B5A4, 0xB4A594B6, 0x94B6A493,
+ 0xA393B5A4, 0xB7A294B6, 0x94B6A395, 0xA595B7A2,
+ 0xB7A595B7, 0x95B7A695, 0xA695B7A6, 0xB7A594B9,
+ 0x95B7A595, 0xA294B8A3, 0xBCA796BB, 0x96BCA596,
+ 0xA397BBA5, 0xBBA597BB, 0x95BAA597, 0xA796BBA6,
+ 0xBDA498BC, 0x99BDA399, 0xA59ABBA5, 0xB8A69CBA,
+ 0x9FB9A89C, 0xAA9EBAAA, 0xB6A699B9, 0x94B8A294,
+ 0xA496BAA2, 0xB6A095B6, 0x95B6A095, 0xA294B6A0,
+ 0xB7A595B7, 0x97B9A595, 0xA597B9A7, 0xB8A296BA,
+ 0x96BCA094, 0xA495BBA5, 0xB8A294B8, 0x96B8A496,
+ 0xA497B7A4, 0xB6A294B6, 0x95B7A294, 0xA695BAA5,
+ 0xBDA697BD, 0x95BBA697, 0xA495BBA4, 0xBFA494BD,
+ 0x97BDA696, 0xA293B9A6, 0xBCA294B8, 0x95BBA498,
+ 0xA698BCA4, 0xB8A597B9, 0x94B6A696, 0xA594B9A4,
+ 0xBCA897BC, 0x97BCA897, 0xA594B9A9, 0xB8A597BB,
+ 0x96BAA094, 0xA094B8A4, 0xBAA195B9, 0x96B8A296,
+ 0xA597B9A4, 0xB7A297B8, 0x97B7A297, 0xA69AB6A4,
+ 0xB6A99EB8, 0xA4B8AAA1, 0xB0A9B8AD, 0xB9AEABB4,
+ 0xBABAB6B5, 0xB8BBB9B8, 0xBBBABEB9, 0xBFBCB8BD,
+ 0xB9BFBEB8, 0xBBB9BFBE, 0xBDBBB7BE, 0xBABDBBB8,
+ 0xBEBDC0BE, 0xBDBBBDC0, 0xBABDBBBC, 0xB7B8BEB9,
+ 0xBCBAB6BC, 0xB7BCBAB7, 0xB6B7BDB8, 0xBAB3B5BB,
+ 0xB1B8B1B3, 0xA9B1B8B1, 0xB7B0A8B0, 0x99A099B0,
+ 0x6580847E, 0x3832676B, 0x36383236, 0x3A32342E,
+ 0x403A3E40, 0x4C4C4640, 0x48515249, 0x51485051,
+ 0x4F504750, 0x4A4D4F49, 0x504A4E50, 0x5C5C564E,
+ 0x5056534F, 0x534E5754, 0x65615C57, 0x5F67645F,
+ 0x66606565, 0x65665D66, 0x5F6A6860, 0x695F6869,
+ 0x676A6168, 0x5E62655C, 0x635D6064, 0x62645E61,
+ 0x6161625E, 0x63616063, 0x60636160, 0x5A5C605B,
+ 0x5F595E60, 0x60605A5D, 0x585D5C58, 0x5C585D5C,
+ 0x5D5C585D, 0x585B5958, 0x58575B59, 0x5D59585C,
+ 0x575C5857, 0x57565C58, 0x5A58575B, 0x57595A58,
+ 0x5B59585C, 0x5A5B595A, 0x4C4E4F4D, 0x29254D4E,
+ 0x02030028, 0x00030101, 0x00000200, 0x00000000,
+ 0x00010101, 0x01000000, 0x00010000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000001, 0x86888202,
+ 0x99A5A89F, 0xA49BA0A4, 0xA6A79EA3, 0x9DA2A69B,
+ 0xA79EA4A8, 0xA3A89FA4, 0xA7A2A9A2, 0xACA7A5AC,
+ 0x9DA39EA6, 0xBD999F9A, 0xC1BFBCC2, 0xBFC2C0BE,
+ 0xB6B6BCB7, 0xBDBBB5BB, 0xBABDBBBA, 0xBAB9BFBA,
+ 0xBFBAB9BF, 0xBBBFBABB, 0xB9BBBFBA, 0xBCB7BABE,
+ 0xBBBFBAB8, 0xBBBBC0BE, 0xBEBCB8BD, 0xBABDBBBB,
+ 0xBDBABDBB, 0xBFBDBABF, 0xB9BEBCBA, 0xBEBABFBE,
+ 0xBFBEBABF, 0xBAC0BFBA, 0xBDBAC0BF, 0xBCBDB7BC,
+ 0xBABFC0B7, 0xB8BAC0BF, 0xB2B1B3B9, 0xB3B9B8AC,
+ 0xBEBABFBE, 0xC1C0BABF, 0xB6BBBABC, 0xC0BEC1BF,
+ 0x8080C1C2, 0x0000007E, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA9ABAB06, 0xBEBFC4C2, 0xC0BEBAC1, 0xBBC0BEBB,
+ 0xBEBABFBE, 0xBFBEBABF, 0xB9BFBEBA, 0xBEBAC1BE,
+ 0xC0BFBAC1, 0xBAC0BFBA, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xBFB8C0BF, 0xC0C0B8C0, 0xB7BFBFB8,
+ 0xC0B8C0C0, 0xBFC2B8C0, 0xB8BFC2B8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xC1B8C0C0, 0xC0C0B9C1,
+ 0xB6BFC2B8, 0xB89CACB2, 0xC0C2A2B2, 0xB8C0C0B4,
+ 0xBEB9BEBF, 0xBFBEB9BF, 0xB7BCBBBA, 0xB9BBC0BF,
+ 0xBEB9B6BB, 0xB8BCB7BA, 0xB1B9C0B9, 0xA9A2B1B8,
+ 0xA0A8A1A1, 0x9EA1AAA0, 0xA59CA0A8, 0x9EA39AA0,
+ 0x9AA0A59C, 0xA39A9EA3, 0x9EA39A9E, 0x9B9FA49B,
+ 0xA1989DA5, 0xA5AAA19C, 0x00636761, 0x01000002,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x380A0807,
+ 0x54503B39, 0x57544F57, 0x585F5F59, 0x61586061,
+ 0x60615860, 0x58606158, 0x61586061, 0x60615860,
+ 0x5962635A, 0x62586263, 0x60645961, 0x58606458,
+ 0x64585E65, 0x60645860, 0x57606458, 0x63596163,
+ 0x60635A62, 0x5E63655F, 0x635F6064, 0x62655C62,
+ 0x58606459, 0x64586064, 0x61655A60, 0x575E6257,
+ 0x61585D60, 0x60615860, 0x5A60605A, 0x605A6060,
+ 0x60605A60, 0x585E5D59, 0x5A595F5C, 0x5D5B5A5E,
+ 0x565A5857, 0x5A585758, 0x58595759, 0x4950504A,
+ 0x504A4F4F, 0x50504A50, 0x383E4138, 0x413B4041,
+ 0x423F3A41, 0x6D474544, 0x9993706E, 0x96999099,
+ 0xAFA7AAA1, 0xC0BAB5B8, 0xBFC1BBBE, 0xB9B9BAB6,
+ 0xBCB8BCBD, 0xBBBCB8BB, 0xBCBBBEBC, 0xBFBABBBE,
+ 0xB9BFBAB9, 0xBBBCC0BB, 0xBFBDBCC0, 0xBBBEBCBE,
+ 0xBDBABFBD, 0xC0BBBABF, 0xBAC0BBBA, 0xBDBCBFBD,
+ 0xBDBBBCBF, 0xBABCBCBA, 0xB4BAB8BE, 0xA4B5ACA8,
+ 0xADA4B9AC, 0xB5A69BB5, 0x97B8A599, 0xA897B9A8,
+ 0xB7A494B6, 0x95B7A395, 0xA395B7A3, 0xB6A395B7,
+ 0x96B8A294, 0xA395B7A4, 0xB6A494B6, 0x97B9A494,
+ 0xA797B9A7, 0xBDA597BB, 0x98BDA799, 0xA897BCA9,
+ 0xBBA796BB, 0x96BBA796, 0xA796BBA7, 0xBBA596BC,
+ 0x97BBA597, 0xA597BBA5, 0xBBA597BB, 0x97BBA597,
+ 0xA597BBA5, 0xBCA594B9, 0x94B9AA9A, 0xA694B9A6,
+ 0xBBA597BB, 0x97BBA397, 0xA496B8A5, 0xB9A698BA,
+ 0x9DBCA699, 0xAD9EBDAC, 0xB6A797B9, 0x94B8A294,
+ 0xA395B9A2, 0xB8A095B6, 0x99BBA297, 0xA99BBDA7,
+ 0xB8A193B5, 0x97BBA294, 0xA496BAA5, 0xB5A297B8,
+ 0x96BA9F94, 0xA496BAA4, 0xB7A294B6, 0x97B9A395,
+ 0xA395B7A7, 0xB7A294B6, 0x94B8A196, 0xA496BAA2,
+ 0xBBA697BD, 0x96BCA495, 0xA394BAA5, 0xBFA494BD,
+ 0x95BBA696, 0xA192B8A4, 0xBBA597BB, 0x97BCA597,
+ 0xA597BBA8, 0xB6A597B9, 0x94B6A294, 0xA496B8A2,
+ 0xBBA597BB, 0x93B8A597, 0xA594B9A4, 0xBAA796BB,
+ 0x93B8A496, 0xA395B9A4, 0xBBA597BB, 0x97BBA597,
+ 0xA597B9A5, 0xB5A095B6, 0x97B7A095, 0xA89CB8A4,
+ 0xB7A79CB6, 0xA4B9AAA0, 0xB0A9B8AD, 0xB9AEABB4,
+ 0xBCBAB4B5, 0xB7BBB6B9, 0xBBBABDBB, 0xBCBABABD,
+ 0xBABDBBB9, 0xB9B5BAB8, 0xBBB9B8BB, 0xB8BCB7B8,
+ 0xB9B9BCBA, 0xBBB9B6BB, 0xB8BBB9B8, 0xB9B6BBB9,
+ 0xBCB7B6BB, 0xBABEB9B8, 0xB7B8BCB7, 0xBCB5B8BC,
+ 0xB2B9B2B5, 0xAFAFB5B0, 0xB4AFAEB4, 0xA0A49FB0,
+ 0x5F888C87, 0x39376064, 0x393A3638, 0x3A2B2D27,
+ 0x413B4040, 0x40403A41, 0x404A4840, 0x49404A48,
+ 0x48494048, 0x484F4C47, 0x4B48504B, 0x504B4850,
+ 0x50585350, 0x53505853, 0x58544F58, 0x505A5752,
+ 0x59505859, 0x56595058, 0x50595A51, 0x59505859,
+ 0x55584F58, 0x50565950, 0x584F5659, 0x58585257,
+ 0x585A5857, 0x58585858, 0x56585856, 0x58585957,
+ 0x5957595A, 0x58595758, 0x58585858, 0x58585858,
+ 0x58595758, 0x58585858, 0x58585858, 0x5A58575A,
+ 0x50585352, 0x53505853, 0x57535258, 0x4F50514F,
+ 0x50505051, 0x50514F50, 0x3550514F, 0x1E193437,
+ 0x0203001A, 0x01030101, 0x00000200, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000002, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x01000000,
+ 0x00010000, 0x00010402, 0x02000004, 0xA7A9A301,
+ 0x9AA0A39A, 0xA59CA2A3, 0xA2A59CA4, 0x9FA0A59C,
+ 0xA59CA1A9, 0x9EA69CA0, 0xA29FA89E, 0xADA6A1A9,
+ 0xA1A8A1A6, 0xC4B3BAB5, 0xBFBAC2C9, 0xBBBFBABB,
+ 0xB8B7BDB8, 0xB9B7B5BA, 0xB7BAB8B6, 0xBABABEB9,
+ 0xBDBBBBBF, 0xBABDBBBA, 0xBBBEC1BF, 0xBDBBBABD,
+ 0xBABDBBBC, 0xBBB8BDBB, 0xBDBBB8BD, 0xBABDBBBA,
+ 0xBEB8BDBC, 0xBFBEB9BF, 0xB9BFBEB9, 0xBDB9C0BD,
+ 0xBEBBB9C0, 0xB7BEBBB7, 0xBDB9C0BD, 0xBFBEB9BE,
+ 0xBABFBEBA, 0xBDBABFBE, 0xC0BFB9BE, 0xBABFBEBB,
+ 0xBDBBBDBD, 0xBDBEBBBD, 0xB3B8B7B9, 0xC0C0C3C1,
+ 0x8282BFC2, 0x00000082, 0x00000000, 0x01000000,
+ 0x00000000, 0x01000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8AAAA06, 0xBEBFC4C2, 0xC0BEBAC1, 0xBBC0BEBB,
+ 0xBEBBC0BF, 0xBFBEBABF, 0xB9BFBEBA, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xC0B8C0BF, 0xC0C0B8C0,
+ 0xB6C0C0B8, 0xBFB8C0BF, 0xC0C0B8C0, 0xB4BEBEB8,
+ 0xBEB6BEBE, 0xBDC0B6BE, 0xB7BFBFB6, 0xC0B6C0C0,
+ 0xBEBFB8C0, 0xB9BEBFB9, 0xC0B7BFBF, 0xBFBFB8C0,
+ 0xB6BFC2B7, 0xBEB3BFC3, 0xBFC2AEBA, 0xB8C0C0B6,
+ 0xBDB9BEBF, 0xBDBCB7BC, 0xBBC0BFB8, 0xBBB9BEBD,
+ 0xBCB7B8BD, 0xB8BCB7B8, 0xA9B9C0B9, 0xA8A1A9B0,
+ 0xA0A8A1A0, 0xA09FA89E, 0xA59CA1AA, 0xA0A59CA0,
+ 0x999CA49A, 0xA39A9BA3, 0x9FA49B9E, 0x979DA59B,
+ 0xA59A99A1, 0xA2A79E9F, 0x00606760, 0x00000002,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010100, 0x3A090706,
+ 0x3A393D3B, 0x5855513E, 0x5A60605A, 0x605A6060,
+ 0x60605A60, 0x5A60605A, 0x605A6060, 0x60605A60,
+ 0x5A60635A, 0x635A6063, 0x60635A60, 0x5960635A,
+ 0x635A5E64, 0x60645960, 0x5A606459, 0x635A6165,
+ 0x5F615B60, 0x5F60645F, 0x62606064, 0x60645F5F,
+ 0x595F6259, 0x64596064, 0x5F625960, 0x5B5F615B,
+ 0x605A5F61, 0x60605A60, 0x5B60605A, 0x605A6161,
+ 0x60605A60, 0x5A5D5C58, 0x5B5A5F5B, 0x5E5C5B5F,
+ 0x58585858, 0x58585658, 0x58595756, 0x4A504F4B,
+ 0x4F4B5050, 0x4D4E4A50, 0x3B3D3E3A, 0x3F3B3E3F,
+ 0x302C2B40, 0x6D474545, 0x9892706E, 0x97988E98,
+ 0xB1AAABA2, 0xC1B8B9BA, 0xBFBFB9C0, 0xB8BEBDB9,
+ 0xBCB8BBBC, 0xBDBEBABB, 0xBABBBEBC, 0xBFBABBBF,
+ 0xB9BFBAB9, 0xBBBABEB9, 0xBFBDBCC0, 0xBCBFBDBE,
+ 0xBCBBBDBD, 0xBFBDB9BE, 0xBAC0BBBA, 0xBEBCBFBD,
+ 0xBFBDBDC0, 0xBDBFC0BC, 0xB9B9B6BF, 0xA5B6B1AD,
+ 0xAFA3B9AF, 0xB7AAA0B7, 0x9AB9A79B, 0xA897B8AA,
+ 0xB8A696B8, 0x96B8A496, 0xA496B8A4, 0xB7A496B8,
+ 0x98B8A395, 0xA497B7A5, 0xB7A797B9, 0x97B9A595,
+ 0xA797B9A7, 0xBDAA99BE, 0x94B9A998, 0xA897BCA6,
+ 0xBBA796BB, 0x96BCA597, 0xA596BCA5, 0xBBA596BC,
+ 0x97BBA597, 0xA597BBA5, 0xBBA597BB, 0x96BBA597,
+ 0xA796BBA7, 0xBBA595B7, 0x95B7A999, 0xA694B9A6,
+ 0xBBA597BB, 0x97BBA397, 0xA597BBA5, 0xBAA799BB,
+ 0x99BBA698, 0xA999BBA9, 0xB6A797B9, 0x93B8A291,
+ 0xA294B8A4, 0xB8A095B6, 0x9BBDA297, 0xA499BAA9,
+ 0xB8A094B8, 0x96BAA094, 0xA496BAA4, 0xB6A297B8,
+ 0x96B8A095, 0xA496B8A4, 0xB7A294B6, 0x95B7A395,
+ 0xA494B6A5, 0xB7A294B6, 0x96B8A196, 0xA294B8A4,
+ 0xBBA495BB, 0x93B9A495, 0xA596BCA2, 0xBFA595BE,
+ 0x95BBA696, 0xA293B9A4, 0xBBA796BB, 0x96BBA796,
+ 0xA597BBA7, 0xB6A196B7, 0x95B7A095, 0xA496B8A3,
+ 0xBBA698BC, 0x94B9A597, 0xA897BCA5, 0xB7A797B9,
+ 0x92B7A595, 0xA594B9A3, 0xBBA597BB, 0x97BBA597,
+ 0xA597BBA5, 0xB5A095B6, 0x99B99F94, 0xA79BB9A6,
+ 0xB7A99DB9, 0xA4B9AAA0, 0xADA5B6AD, 0xBBAEABB4,
+ 0xBBB9B8BA, 0xB8BCB7B8, 0xBCBABDBB, 0xBDBBBDBE,
+ 0xBCBDBBBC, 0xBBB8BBB9, 0xBEB9BABD, 0xBABEB9BA,
+ 0xBAB6BBB9, 0xB9B7B7BC, 0xB8BBB9B6, 0xB9B8BBB9,
+ 0xBCB7B6BB, 0xB7BBB6B8, 0xB7B8BCB7, 0xBDB6B6BC,
+ 0xB3BAB3B6, 0xAAAFB3AE, 0xB4AFABAF, 0xA0A49FB0,
+ 0x5F878B86, 0x62626064, 0x393A3862, 0x3B403F3B,
+ 0x3E3A403F, 0x403F3B3F, 0x424A4743, 0x48424848,
+ 0x49494348, 0x49504B4A, 0x4B4A4F4A, 0x504B4A50,
+ 0x51595453, 0x53525652, 0x58555157, 0x525A5752,
+ 0x58525858, 0x56585256, 0x52585852, 0x59535658,
+ 0x56585257, 0x52565852, 0x58525658, 0x58575358,
+ 0x585B5958, 0x58585858, 0x56585858, 0x58585858,
+ 0x58585858, 0x58585858, 0x5A585759, 0x57575958,
+ 0x58585857, 0x58575757, 0x58585858, 0x5B595958,
+ 0x52575352, 0x53525853, 0x58545357, 0x50525050,
+ 0x50524F4E, 0x50505051, 0x36333634, 0x1E193538,
+ 0x0102001A, 0x01000000, 0x00000200, 0x2A2B2900,
+ 0x2D636160, 0x302F3231, 0x03010032, 0x00020000,
+ 0x01010001, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00010000, 0x00000100, 0x01000001, 0x02010002,
+ 0x00020000, 0x01000200, 0x00010003, 0x00000100,
+ 0x01000102, 0x00000000, 0x00000000, 0x01000000,
+ 0x01020000, 0x00000400, 0x3B350004, 0xA6A8A239,
+ 0x9AA2A39A, 0xA299A2A3, 0xA0A39AA1, 0xA09AA298,
+ 0xAAA0A1AA, 0xA1A99FA2, 0x9EA0A99F, 0xA8A1A0A8,
+ 0xA6ADA6A1, 0xC0BDC4BF, 0xC0B9BEC5, 0xBBBFB9B9,
+ 0xBCB9BFBA, 0xBEBCB9BE, 0xB9BCBABB, 0xB8B7BAB8,
+ 0xBBB9B7BA, 0xB7BAB8B8, 0xBBB9BCBA, 0xBDBBBABD,
+ 0xBBBEBCBC, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBBA,
+ 0xBEBABFBE, 0xC0BFB9BF, 0xB9BFBEBA, 0xBCB9C0BD,
+ 0xBFBCB8BF, 0xB7BEBBB8, 0xBDB9C0BD, 0xBEBDBABF,
+ 0xB7BCBBB9, 0xBEBABFBE, 0xBFBEBBC0, 0xBABFBEBA,
+ 0xBDBBBDBD, 0xBDBEBBBD, 0xB3B8B7B9, 0xBFC0C3C1,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x01000000,
+ 0x00010000, 0x01000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x06080409, 0x04060704,
+ 0xA8AAAA05, 0xBEBFC4C2, 0xC0BEBAC1, 0xBBC0BEBB,
+ 0xBEBAC1BE, 0xC0C0B7BF, 0xB8C0C0B8, 0xBFB8C0C0,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xBFB9BFBE, 0xBFBFB8C0,
+ 0xB8C0C0B7, 0xC1BABFC0, 0xBFC2B9C1, 0xB6BDC0B8,
+ 0xC0B6BEBE, 0xC1C1B8C0, 0xB8C0C0B9, 0xBDB7BFBE,
+ 0xBDBEB6BE, 0xB9BEBFB8, 0xBEB7BFBF, 0xBDBCB7BF,
+ 0xB7BFBFB5, 0xC2B8BFC2, 0xC0C0B6BF, 0xB8C0C0B8,
+ 0xBFB9BEBF, 0xBDBCB9BE, 0xB8BDBCB8, 0xBEB7BCBA,
+ 0xBFBABBC0, 0xB8BCB7BB, 0xB2B9BFBA, 0xA8A1B0B7,
+ 0xA0A8A1A0, 0xA19FA7A0, 0xA59CA0A8, 0xA0A59CA0,
+ 0x9B9CA49A, 0xA39A9DA5, 0x9FA49B9E, 0x9B99A099,
+ 0xA59A9DA5, 0xA6ABA29F, 0x00616861, 0x00000002,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x07080808,
+ 0x08080907, 0x0A08080A, 0x050A0807, 0x09070809,
+ 0x07080608, 0x07080907, 0x08070809, 0x0A08070A,
+ 0x06080907, 0x09070708, 0x08090708, 0x04080907,
+ 0x08070708, 0x0809050A, 0x05080905, 0x08060809,
+ 0x090A0807, 0x07080907, 0x08080809, 0x08090708,
+ 0x05080907, 0x08040809, 0x08090707, 0x07070806,
+ 0x09070809, 0x08090708, 0x06080907, 0x0A080708,
+ 0x07080609, 0x08080907, 0x08080A08, 0x0808080A,
+ 0x08080808, 0x08080808, 0x09090908, 0x05080606,
+ 0x05070705, 0x08050708, 0x06060507, 0x06060606,
+ 0x07050508, 0x6D221D1F, 0x9892726E, 0x98999098,
+ 0xAFA8ACA1, 0xC1B7B6BA, 0xC0C1B8C0, 0xB8BBBDB7,
+ 0xBCB6BBBC, 0xBBBFB9BA, 0xBABBBFBA, 0xC0BBBBBF,
+ 0xBBBFBABC, 0xBBBCC0BB, 0xBFBDBABD, 0xBCBFBDBC,
+ 0xBDBCBFBD, 0xBFBDBCBF, 0xBABFBDBA, 0xBDB9BEBC,
+ 0xBFBEBABF, 0xBBBFC0BA, 0xBBBDBCC5, 0xA5B6B3AF,
+ 0xAFA3B9AF, 0xB7AAA0B7, 0x9AB9A79B, 0xA898B7AA,
+ 0xB8A798B8, 0x97B7A798, 0xA497B7A4, 0xB7A497B7,
+ 0x97B7A497, 0xA697B7A6, 0xB6A597B9, 0x94B8A294,
+ 0xA796BBA2, 0xBCA998BD, 0x95BAA997, 0xA897BCA7,
+ 0xBBA796BB, 0x97BBA597, 0xA597BBA5, 0xBBA597BB,
+ 0x97BBA597, 0xA397BBA3, 0xBCA596BC, 0x97BBA596,
+ 0xA597BBA5, 0xBBA799BB, 0x95B7A999, 0xA594B6A6,
+ 0xBBA597BB, 0x96BBA597, 0xA597BBA7, 0xBAA698BA,
+ 0x98BAA698, 0xA897BCA6, 0xB6A493B8, 0x94B9A291,
+ 0xA493B8A5, 0xB6A294B8, 0x97B8A095, 0xA297B8A2,
+ 0xB9A195B9, 0x95BBA093, 0xA496BAA4, 0xB6A597B9,
+ 0x97B7A294, 0xA598B8A4, 0xB6A294B6, 0x94B9A294,
+ 0xA493B8A5, 0xB9A294B6, 0x96B8A597, 0xA395B7A4,
+ 0xBBA597BB, 0x93B9A495, 0xA497BDA0, 0xBDA495BB,
+ 0x93B9A697, 0xA495BBA2, 0xBCA597BB, 0x97B9A698,
+ 0xA597B9A5, 0xB7A196B7, 0x97B7A395, 0xA697B7A6,
+ 0xB7A797B9, 0x98BCA595, 0xA597BBA6, 0xB5A797B9,
+ 0x95B7A393, 0xA594B9A5, 0xBAA597BB, 0x96BBA496,
+ 0xA395B7A7, 0xB9A095B6, 0x99B9A398, 0xA69AB8A6,
+ 0xBAAA9CB8, 0xA1B8ADA0, 0xAAA2B3AB, 0xBBAEABB4,
+ 0xBBB9B8BA, 0xB6BCB7B8, 0xB8B5BBB6, 0xBCBAB9BD,
+ 0xB7BAB8B9, 0xB9B8BCB7, 0xBFBDBABE, 0xBABFBDBA,
+ 0xB7B7BDB8, 0xBBB9B6BC, 0xB8BBB9B8, 0xB9BBBFBA,
+ 0xBEB9BABE, 0xB8BCB7BA, 0xB5B5BCB5, 0xB9B2B5BC,
+ 0xB0B8B1B2, 0xABA9AFAA, 0xB4AFACB0, 0xA2A39FB0,
+ 0x888A8B87, 0x39398B8C, 0x10101039, 0x07060606,
+ 0x06080605, 0x08050709, 0x06080507, 0x06060806,
+ 0x08050708, 0x09090406, 0x05070A04, 0x0805070A,
+ 0x08090707, 0x07070A08, 0x0A080809, 0x080A0807,
+ 0x08060B09, 0x08090707, 0x07080907, 0x08040809,
+ 0x05090407, 0x07090A08, 0x08040809, 0x090A0807,
+ 0x08080808, 0x08080808, 0x08090708, 0x080A0808,
+ 0x09070A08, 0x08090708, 0x08080808, 0x08080808,
+ 0x09090908, 0x08070707, 0x080A0808, 0x07060809,
+ 0x080A0808, 0x08080A08, 0x0A08080A, 0x0907060A,
+ 0x04090605, 0x06050708, 0x00000301, 0x03000003,
+ 0x03040202, 0x00000000, 0x01000000, 0x2A2B2700,
+ 0x5D63635D, 0x625A6562, 0x64625A64, 0x002D2A25,
+ 0x01000201, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000000, 0x01000000,
+ 0x13141000, 0x20262620, 0x271E2626, 0x26271E26,
+ 0x242C2924, 0x29242C29, 0x2A2A242C, 0x292E2D29,
+ 0x2C282E2D, 0x2E2C2B2D, 0x181B1918, 0x01001B19,
+ 0x00010000, 0x00020300, 0x3B350203, 0xA8A8A23B,
+ 0x98A0A198, 0xA29CA0A1, 0x9DA19BA0, 0x9A9FA79D,
+ 0xA8A19CA4, 0xA0A8A1A0, 0x9FA1A99F, 0xAEA5A1A9,
+ 0xAEB2ACA9, 0xBEBDC4C1, 0xC1BABCC3, 0xBBC0B7BA,
+ 0xB9B7BDB8, 0xBFBAB8BE, 0xBBBEBCBB, 0xBBB8BDBB,
+ 0xBCBAB8BD, 0xB7BAB8B9, 0xB6B8BCB7, 0xBBB6B7BB,
+ 0xB6BAB5B7, 0xB9B5BBB6, 0xBAB8B8BE, 0xB8BDBBB5,
+ 0xBCBABFBD, 0xBFBEB9BE, 0xB8BDBCBA, 0xBDBABFBD,
+ 0xBFBEBABF, 0xB9BFBEBA, 0xBDB6BDBA, 0xBDBCB9C0,
+ 0xB7BCBBB7, 0xBAB9BEBC, 0xBEBCB9BF, 0xBABFBDB9,
+ 0xBDBBBDBD, 0xBEBEBBBD, 0xB8BABABC, 0xC0BEC3C1,
+ 0x8282C1C5, 0x00000082, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA8AAAA06, 0xBEBFC4C3, 0xC0BFBAC1, 0xBAC1BEBA,
+ 0xBEBAC1BE, 0xC0C0B7BF, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xC0B9BFBE, 0xBFBFBBC1,
+ 0xB7BFBFB7, 0xC0B6BEBE, 0xBFC2B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0BFB8, 0xBFB8C0BF,
+ 0xC0C1B8C0, 0xBABFC0BB, 0xBFB8C0BF, 0xBFBEB8C0,
+ 0xB9BFBEB7, 0xC1BABFC0, 0xBFC0BBC0, 0xBBC1C0BA,
+ 0xBEB8BDBE, 0xBFBEB9BF, 0xBBC0BEBA, 0xB7BABFBD,
+ 0xBCB7B6BC, 0xB6BCB7B8, 0xAAB8BFBA, 0xA8A1A8AF,
+ 0xA0A8A1A0, 0xA1A2A9A2, 0xA89FA1A8, 0xA0A59CA3,
+ 0x9B9CA49A, 0xA49B9EA6, 0x9EA39A9F, 0x9B98A096,
+ 0xA1969DA5, 0xA6ABA29B, 0x00636761, 0x00000001,
+ 0x02000100, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x08070707,
+ 0x07090808, 0x0A08080A, 0x07080808, 0x08080809,
+ 0x09090908, 0x08070707, 0x08080808, 0x08080808,
+ 0x08080808, 0x07090808, 0x08080808, 0x070A0808,
+ 0x08080A08, 0x0808080A, 0x08070707, 0x09090808,
+ 0x08080809, 0x07080808, 0x08080707, 0x08080808,
+ 0x06080808, 0x08080708, 0x08090708, 0x07080907,
+ 0x09070809, 0x08090708, 0x08080808, 0x07070808,
+ 0x09090907, 0x08080808, 0x08080808, 0x09090908,
+ 0x07080808, 0x09070809, 0x08080808, 0x07090707,
+ 0x04090805, 0x08040908, 0x07060509, 0x05070605,
+ 0x07050506, 0x6D201E1E, 0x9892706E, 0x96999098,
+ 0xAFA8ABA2, 0xC2B7B6BA, 0xBEC1B8BE, 0xBABBBDB7,
+ 0xBCB6BDBE, 0xBBBFB9B8, 0xBABCC0BB, 0xBFB9BBBF,
+ 0xBBBFBABB, 0xBCBCC0BB, 0xBDBBBBBE, 0xBABDBBBA,
+ 0xBBB9BCBA, 0xBFBDBABD, 0xBABFBDBC, 0xBDBCBFBD,
+ 0xBFBEBABF, 0xBABEBFBA, 0xB8BBBEC3, 0xA5B5AFAE,
+ 0xB0A5B9AF, 0xB8AAA0B7, 0x9AB9A89C, 0xA898B7A9,
+ 0xB7A899B9, 0x97B7A697, 0xA497B7A4, 0xB9A497B7,
+ 0x96B8A597, 0xA797B9A6, 0xB9A597B9, 0x97BBA597,
+ 0xA496BAA5, 0xBDA997BC, 0x94B9AA98, 0xA897BCA5,
+ 0xBBA796BB, 0x97BBA597, 0xA597B9A5, 0xB9A597B9,
+ 0x98B9A597, 0xA397BBA3, 0xBCA597BB, 0x97BBA596,
+ 0xA597BBA5, 0xC4AB9DC1, 0x99BBB2A2, 0xA595B7A9,
+ 0xB9A597B9, 0x96BBA597, 0xA797B9A7, 0xBAA698BA,
+ 0x97BBA698, 0xA698BCA5, 0xB8A391B8, 0x93B8A391,
+ 0xA594B9A5, 0xB5A294B8, 0x97B89F94, 0xA297B8A2,
+ 0xBA9E94B8, 0x97BDA194, 0xA698BCA6, 0xB6A597B9,
+ 0x95B7A294, 0xA496B8A3, 0xB7A294B6, 0x94B9A395,
+ 0xA493B8A5, 0xB8A395B7, 0x95B7A496, 0xA496B8A3,
+ 0xBAA698BC, 0x93B9A496, 0xA697BDA2, 0xBBA495BB,
+ 0x93B9A495, 0xA495BBA2, 0xBBA596BC, 0x97BBA597,
+ 0xA395B7A5, 0xB6A294B6, 0x96B8A294, 0xA897B8A6,
+ 0xB8A797B9, 0x97B9A696, 0xA496B8A5, 0xB6A595B7,
+ 0x95B7A494, 0xA395B7A5, 0xBBA597BB, 0x94B9A597,
+ 0xA494B6A5, 0xB9A294B6, 0x99B9A499, 0xA69AB8A6,
+ 0xB7AA9CB8, 0x9FB4AA9D, 0xADA6B5A8, 0xBAB6B4BA,
+ 0xBDB8BABA, 0xB6BCB7B9, 0xB8B5BBB6, 0xBAB8B5BA,
+ 0xBABDBBB7, 0xB7BABEB9, 0xBDBBB6BC, 0xB5BCB9B8,
+ 0xB8B6BBB9, 0xBCBAB7BD, 0xB9BCBAB9, 0xB9BABDBB,
+ 0xBDB8BABE, 0xB8BCB7B9, 0xB3B7BBB6, 0xBAB3B3BA,
+ 0xB1B8B1B3, 0xAAAEB5AE, 0xB4AFABAF, 0xA2A39FB0,
+ 0x87888C87, 0x3A38888C, 0x10101039, 0x07050406,
+ 0x04090605, 0x08040908, 0x07070308, 0x05090605,
+ 0x06050906, 0x09080409, 0x04090804, 0x06050708,
+ 0x08080808, 0x07090808, 0x08080808, 0x07080808,
+ 0x07070809, 0x08090707, 0x06080808, 0x09070708,
+ 0x070A0806, 0x08070707, 0x09070808, 0x08090708,
+ 0x09060808, 0x09070709, 0x08090708, 0x080A0808,
+ 0x09070A08, 0x08090708, 0x08080808, 0x08080808,
+ 0x07070708, 0x08080808, 0x07090808, 0x08070908,
+ 0x09080709, 0x08080807, 0x08080808, 0x07060507,
+ 0x04060605, 0x06060605, 0x00020301, 0x03010004,
+ 0x02030102, 0x00000000, 0x01000000, 0x2C2B2700,
+ 0x5B63635D, 0x625A6563, 0x95948A64, 0x4D7F7E74,
+ 0x2A245755, 0x0302002A, 0x00020000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000000, 0x14120000,
+ 0x39383413, 0x414A4B42, 0x6E644A4B, 0x6F6E646F,
+ 0x737F7C74, 0x7B737E7B, 0x7E7C747D, 0x82888882,
+ 0x88838888, 0x5A5A548B, 0x324D4C48, 0x01003533,
+ 0x00010000, 0x00020301, 0x716B0203, 0xA8A9A071,
+ 0x9AA0A09A, 0xA7A19EA0, 0xA3A7A1A5, 0xA0A2A79E,
+ 0xA8A1A2AA, 0xA1A8A1A1, 0xA5A8ADA4, 0xABA5A9AE,
+ 0xB4B8B2A9, 0xBCC2C9C6, 0xC0B9B8BF, 0xBBC0B7B9,
+ 0xBAB7BEB7, 0xBDB8B9BF, 0xB9BDB8B9, 0xBCB9BEBC,
+ 0xBDBBB8BD, 0xBABDBBBA, 0xBABEC2BD, 0xBEB9BBBF,
+ 0xBABEB9BA, 0xB6B5BBB6, 0xB6B4B5BB, 0xB5BAB8B1,
+ 0xBCB6BBB9, 0xBFBDB9BE, 0xB8BDBBBA, 0xBBB8BDBB,
+ 0xBBB9B8BD, 0xBABFBDB6, 0xBDB9C0BD, 0xBAB9B9C0,
+ 0xB7BCBAB4, 0xBABAC0BB, 0xC0BBB9BF, 0xBAC0BBBA,
+ 0xBCBBBEBC, 0xBDBDBBBE, 0xBBBEBCBB, 0xBFBEC4BF,
+ 0x8282C0C4, 0x00000080, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090804,
+ 0xA9ADAE06, 0xBFBDC2C3, 0xC0C0B8C0, 0xBAC0BFB8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xB8C0BFBA, 0xC0B8C0BF,
+ 0xC0C1B9C1, 0xBABFC0BB, 0xC1B8C0C0, 0xC0C0B9C1,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBEBEB8C0, 0xB7BFBFB6,
+ 0xBCB9BEBF, 0xBFBEB7BD, 0xBBC1C0B9, 0xBFB8C0BF,
+ 0xC0C0B7BF, 0xB7BFBFB8, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xB8C0BFB8, 0xBDBAC0BF, 0xBFBEB8BE, 0xBAC1BEB9,
+ 0xBCB7BDBC, 0xBDBBB8BF, 0xB8BDBBB8, 0xB7B6BCB7,
+ 0xBBB6B6BC, 0xB8BEB9B7, 0xA9B8BFBA, 0xA8A1A6B1,
+ 0xA1A8A1A0, 0x9EA4A9A0, 0xA7A1A2A7, 0x9EA69CA3,
+ 0x999FA59A, 0xA4999FA6, 0xA0A498A0, 0x96A0A79A,
+ 0xA2969CA3, 0xA6AA9F9E, 0x004A4B47, 0x00000001,
+ 0x02000002, 0x00020000, 0x01000200, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01020000, 0x00000301, 0x02000002, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00030402,
+ 0x03010203, 0x02030102, 0x00000100, 0x01000200,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000301, 0x03010004, 0x00040000, 0x00000400,
+ 0x03000004, 0x01020002, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000200, 0x00000000,
+ 0x00000301, 0x04000105, 0x02030000, 0x00020000,
+ 0x00010200, 0x01000202, 0x00000001, 0x01010000,
+ 0x00010001, 0x6C1A1B19, 0x9C966F70, 0x989D949A,
+ 0xB2ACB1A8, 0xC2B8B6BB, 0xB8BFB8BA, 0xBAB8BCB7,
+ 0xBCB7BBBF, 0xB9BDB8B8, 0xB9BCC0BB, 0xBFBABABE,
+ 0xBCC0BBBB, 0xBAB9BFBA, 0xBFBAB9BF, 0xB9BEBCB9,
+ 0xBEBABFBD, 0xBFBDBCBE, 0xBBBEBCBC, 0xBDBEBFBD,
+ 0xBFBEBCBF, 0xBABFC0BA, 0xC0B9BEC1, 0xA9B6B6B8,
+ 0xAFA6BAB0, 0xBAAC9FB7, 0x97B6AC9E, 0xA897B8A7,
+ 0xB7A797B6, 0x97B7A798, 0xA497B7A4, 0xBBA597B9,
+ 0x97BCA597, 0xA796BBA8, 0xB9A797B9, 0x97BBA797,
+ 0xA597BBA5, 0xBBA896BB, 0x97BBA796, 0xA597BBA5,
+ 0xBBA796BB, 0x97B9A597, 0xA59ABBA5, 0xB9A499BA,
+ 0x9ABAA499, 0xA698BAA7, 0xBBA597BB, 0x97BDA597,
+ 0xA597BBA6, 0xC1A796BB, 0x96BBAD9C, 0xA797B9A7,
+ 0xB7A496B8, 0x96B8A497, 0xA798B8A6, 0xB9A899B9,
+ 0x96B8A699, 0xA496B8A4, 0xB7A392B7, 0x93BAA392,
+ 0xA496BAA5, 0xB6A195B9, 0x97B89E95, 0xA196B7A2,
+ 0xB7A094B8, 0x97BB9F93, 0xA597BBA5, 0xB6A297B8,
+ 0x97B8A095, 0xA297B8A2, 0xB6A095B6, 0x95B7A095,
+ 0xA595B7A3, 0xBAA595B7, 0x93B5A898, 0xA395B7A1,
+ 0xB7A796BB, 0x93B8A595, 0xA796BBA5, 0xBAA896BD,
+ 0x92BBA394, 0xA394BAA2, 0xBCA697BD, 0x98BCA698,
+ 0xA294B8A6, 0xB9A092B6, 0x97B9A797, 0xA695B7A8,
+ 0xB8A494B6, 0x95B7A496, 0xA496B8A3, 0xB6A294B6,
+ 0x96B6A294, 0xA395B7A3, 0xB8A395B7, 0x93B8A493,
+ 0xA494B6A5, 0xB7A497B7, 0x98B8A497, 0xA899B8A7,
+ 0xB5A89CB8, 0xA4B8A89E, 0xB4AEB9AD, 0xB9BAB9BB,
+ 0xBCB7BCBD, 0xB6BCB7B8, 0xB7B5BAB8, 0xBCBAB4B9,
+ 0xB8BCB7B9, 0xB8B8BCB7, 0xB9B7B7BD, 0xB3BAB7B4,
+ 0xB9B6BBB9, 0xBABAB6BB, 0xB9BCBAB8, 0xB8B7BCBA,
+ 0xBBB9B5BA, 0xB7BBB6B6, 0xB6B8BCB7, 0xBDB8B7BB,
+ 0xB5B9B3B9, 0xA6AEB2AC, 0xB7B1A8AC, 0xA4A8A2B3,
+ 0x8A899089, 0x3533898F, 0x0A080834, 0x00020000,
+ 0x00010200, 0x01000200, 0x00010002, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000301,
+ 0x03010004, 0x00040000, 0x00000301, 0x04000004,
+ 0x00020000, 0x00000000, 0x00000000, 0x00010000,
+ 0x01000301, 0x04000003, 0x00030100, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000301, 0x03010003,
+ 0x02030100, 0x00010101, 0x00000200, 0x02000002,
+ 0x00020000, 0x00000000, 0x00000000, 0x01000200,
+ 0x03010003, 0x02030100, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x28272302,
+ 0x5B63635D, 0x6D646364, 0x797A706C, 0x7B828276,
+ 0x877D8886, 0x77756D88, 0x0535322D, 0x08070A09,
+ 0x0907060A, 0x00020301, 0x03010203, 0x02030102,
+ 0x00010101, 0x00000000, 0x00010000, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000000, 0x11110000,
+ 0x35343013, 0x45404138, 0x5D53504F, 0x6D6B615F,
+ 0x606F6C64, 0x6C626A68, 0x75746A6E, 0x70797A71,
+ 0x6F657A78, 0x5C5B5171, 0x26404138, 0x0000292A,
+ 0x00000000, 0x00000100, 0x736A0001, 0xA8ABA270,
+ 0x979EA09A, 0xA39F9A9B, 0xA6A8A2A2, 0xA0A6A9A0,
+ 0xA9A3A4A9, 0xA4A8A2A5, 0xA9A6A8A2, 0xAEAAADAF,
+ 0xB1B5B0AD, 0xB7BDC3BE, 0xBBB6B6BC, 0xBCC0BAB7,
+ 0xB6BCC0BA, 0xBCB7B8BC, 0xB8BCB7B8, 0xBBBBBEBC,
+ 0xBDBBBABD, 0xBABDBBBA, 0xBBBEBFBD, 0xBEB9BCBD,
+ 0xB9BDB8BA, 0xB8B7BDB8, 0xBBB9B7BD, 0xB4B9B7B6,
+ 0xB6B5BBB6, 0xBAB5B5BB, 0xBABEB9B6, 0xB5BABEB9,
+ 0xBEB9B6BA, 0xBABEB9BA, 0xBBB8BEB9, 0xBBB9BAC0,
+ 0xBABDBBB6, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBABBBFBA, 0xBEBCBBBF, 0xBBBFBABB, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000180, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090605,
+ 0xA9ACB006, 0xC0BDC2C3, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBFB8C0BF,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xC0B8C0C0, 0xC1C1B8C0,
+ 0xB7BFBFB9, 0xBFB8C0C0, 0xBFBFB5BF, 0xB8C0C0B7,
+ 0xBEBAC0BF, 0xBDBCB9BF, 0xB9BFBEB7, 0xC1B8C0C0,
+ 0xBFBFB9C1, 0xB8C0C0B7, 0xC0B7BFBF, 0xC0BFB8C0,
+ 0xB8C0BFB8, 0xBEB9BFBE, 0xBFBDB9BF, 0xBABFBDBA,
+ 0xBDB9BEBC, 0xBFBDBABF, 0xB8BDBBBA, 0xB9B8BEB9,
+ 0xBBB9B8BE, 0xBAC0BBB8, 0xAAB7BEB9, 0xA8A1A7B2,
+ 0xA1A99FA0, 0x9EA5AAA1, 0xA6A0A4A7, 0xA1A99FA2,
+ 0x99A1A79C, 0xA4989FA6, 0xA0A498A0, 0x939EA394,
+ 0xA79B9DA2, 0x9EA297A3, 0x00191A16, 0x00000001,
+ 0x02000002, 0x00020000, 0x01010200, 0x00010001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000002, 0x00000000,
+ 0x00000000, 0x01020000, 0x00000000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000200, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00020300,
+ 0x03000203, 0x02030002, 0x00020100, 0x01000201,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00020300, 0x04000004, 0x00040000, 0x00000400,
+ 0x04000204, 0x01020002, 0x00000100, 0x00000001,
+ 0x00010000, 0x00010101, 0x00000001, 0x00010000,
+ 0x00020300, 0x04000102, 0x02030002, 0x00020000,
+ 0x00000200, 0x00010002, 0x00000100, 0x01000102,
+ 0x00010000, 0x6C171B16, 0x9C976D71, 0x989C9698,
+ 0xB2ACB1A8, 0xC0B9B4BC, 0xB9C0B9B9, 0xBAB8BCB7,
+ 0xBCB7BBBF, 0xB8BCB7B8, 0xB8BABEB9, 0xBEB9B9BD,
+ 0xBBBFBABA, 0xBABBBFBA, 0xBFBAB9BF, 0xB9BFBAB9,
+ 0xBDBBC0BE, 0xBEBCBABF, 0xBABDBBBB, 0xBBBABDBB,
+ 0xBDBCBABD, 0xB9BEBFB8, 0xBCBABFC0, 0xB0BBB4B7,
+ 0xB0A8B9B4, 0xB9ACA0B6, 0x98B7AC9F, 0xA796B7A8,
+ 0xB8A796B7, 0x97B7A798, 0xA496B8A6, 0xBBA597BB,
+ 0x95BCA796, 0xA796BBA7, 0xB9A797B9, 0x97BBA797,
+ 0xA597BBA5, 0xB9A897BC, 0x97BBA594, 0xA597BBA5,
+ 0xBBA597BB, 0x97B9A597, 0xA799BBA5, 0xBDA89DBE,
+ 0x98B8A89D, 0xA294B6A5, 0xBBA597BB, 0x96BCA597,
+ 0xA596BCA5, 0xBBA796BB, 0x94B8A597, 0xA597BBA2,
+ 0xB7A496B8, 0x96B8A497, 0xA798B8A4, 0xB9A899B9,
+ 0x96B8A899, 0xA294B6A4, 0xB7A392B7, 0x95BCA392,
+ 0xA695BAA7, 0xB5A297B8, 0x96B6A095, 0xA297B8A1,
+ 0xB8A397BB, 0x94B8A094, 0xA597B9A2, 0xB5A59ABB,
+ 0x96BAA095, 0xA296BAA2, 0xB79E95B6, 0x96B8A196,
+ 0xA494B6A4, 0xB9A595B7, 0x93B8A797, 0xA493B8A4,
+ 0xB6A493B8, 0x94B6A494, 0xA896BBA5, 0xBBA698BC,
+ 0x93B9A495, 0xA494BDA2, 0xBDA596BC, 0x96BAA697,
+ 0xA193B7A4, 0xB9A493B8, 0x96B8A797, 0xA696B8A6,
+ 0xB9A294B6, 0x97B7A597, 0xA497B7A4, 0xB7A295B5,
+ 0x97B7A497, 0xA297B7A2, 0xB8A595B7, 0x93B8A493,
+ 0xA595B7A5, 0xB6A798B8, 0x99B9A498, 0xA798B7A8,
+ 0xB7A89CB8, 0xA6BAA89D, 0xB8B4BFAF, 0xB7BAB9BB,
+ 0xBCB7B8BC, 0xB8BEB9B8, 0xB6B5BAB8, 0xBAB8B3B8,
+ 0xB8BCB7B5, 0xB7B8BCB7, 0xB8B7B4B9, 0xB3B9B8B3,
+ 0xBAB6BBB9, 0xBABAB7BC, 0xB8BBB9B8, 0xB8B6BBB9,
+ 0xBAB8B5BA, 0xB9BCBAB5, 0xB8B8BCB7, 0xBAB6BBBC,
+ 0xB9BBB5B9, 0xA3B1B4AB, 0xB6B0A9AC, 0xA2A9A2B2,
+ 0x8A889089, 0x3533898F, 0x0A080734, 0x00020000,
+ 0x01000200, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x02000001, 0x00010001,
+ 0x00000100, 0x01000001, 0x00010000, 0x00020300,
+ 0x03000004, 0x00040002, 0x00000400, 0x04000004,
+ 0x02030100, 0x00020000, 0x00000200, 0x00010002,
+ 0x00000400, 0x04000004, 0x00040000, 0x00000100,
+ 0x01000001, 0x00010000, 0x01000301, 0x03010003,
+ 0x02030100, 0x00020000, 0x00000200, 0x03010104,
+ 0x00020000, 0x00000000, 0x00010000, 0x00000400,
+ 0x04000003, 0x02030002, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x28282202,
+ 0x5D63635D, 0x6E656363, 0x78796F6B, 0x79838377,
+ 0x867B8887, 0x88867B88, 0x7B858379, 0x312C8583,
+ 0x33322E34, 0x00040400, 0x05000204, 0x02030003,
+ 0x01000000, 0x00000101, 0x00010000, 0x01020000,
+ 0x00000301, 0x00000000, 0x00000000, 0x11110000,
+ 0x37343013, 0x45404137, 0x5C525151, 0x6F6D635E,
+ 0x606A6860, 0x70666A68, 0x76746A72, 0x70706E66,
+ 0x6F657B7A, 0x5E5C5271, 0x25404138, 0x0000292B,
+ 0x00000000, 0x00000100, 0x736A0001, 0xA8ABA270,
+ 0x9B9CA09A, 0x9B979E9F, 0xA3A39D9A, 0xA0A6A8A2,
+ 0xA9A3A6A9, 0xA9ABA5A7, 0xA3A8A8A2, 0xAEAAA9A9,
+ 0xBABBB7AD, 0xB7BDC1BC, 0xBDB8B6BC, 0xB8BCB7B9,
+ 0xB3B7BDB8, 0xBCB7B2B8, 0xB8BCB7B8, 0xBBBABDBB,
+ 0xBBB9BABD, 0xB8BBB9B8, 0xBBBCBDBB, 0xBEB9BCBD,
+ 0xBBBFBABA, 0xB7B7BDB8, 0xBCBAB6BC, 0xB6BBB9B7,
+ 0xB9B7BDB8, 0xBFBAB8BE, 0xB7BBB6BB, 0xB6B7BBB6,
+ 0xBEB9B7BB, 0xBABEB9BA, 0xBABABEB9, 0xBBB9BBBF,
+ 0xBABDBBB8, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000180, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090605,
+ 0xA9ACB006, 0xC0BEC3C4, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xC0BABFC0,
+ 0xC0C1BABF, 0xBBC0C1BB, 0xBFB7BFBF, 0xBFC0B7BF,
+ 0xB8C0C0BA, 0xC0B9C1C1, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0BF, 0xC0BFB9C1, 0xB7BFBEB8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB7BFBE, 0xBFBEB7BF,
+ 0xBAC0BFB9, 0xBDBABFBD, 0xBFBDBABF, 0xBCBFBDBC,
+ 0xB8BCC0BB, 0xBDBBB7BD, 0xB8BDBBB8, 0xBDBBBEBC,
+ 0xBAB8BCBF, 0xB8BEB9B7, 0xA8B8BFBA, 0xA8A1A7AF,
+ 0xA1A99FA0, 0xA0A4A9A0, 0xA6A0A6A9, 0xA2A6A0A2,
+ 0x98A2A89D, 0xA5989EA5, 0x9FA6999E, 0x949CA394,
+ 0xA79A9CA3, 0x9CA297A0, 0x00171B16, 0x00000000,
+ 0x01010100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010101, 0x00000000, 0x361A1C1C,
+ 0x37353538, 0x50544F34, 0x58585B59, 0x5B59595D,
+ 0x5A5B595A, 0x595F5B5A, 0x5A595E5A, 0x5F5C585E,
+ 0x5A60605A, 0x605A6060, 0x61615B60, 0x464C4C46,
+ 0x4C464A4C, 0x494B454A, 0x5B5F5F59, 0x605A6161,
+ 0x60605A60, 0x5A60605A, 0x5F596060, 0x61615B5F,
+ 0x464C4C46, 0x4B454A4C, 0x494B4549, 0x585F615B,
+ 0x605A6061, 0x60605A60, 0x585F5C58, 0x5B5A5F5C,
+ 0x5D5C585F, 0x58595A58, 0x5A58595D, 0x5B5C5857,
+ 0x40454440, 0x44404744, 0x47444045, 0x484F4C48,
+ 0x4B4A4F4C, 0x4D4C484F, 0x2A42433F, 0x2D2B2B2F,
+ 0x2A2D2B2A, 0x6E444745, 0x9B996D70, 0x989C9798,
+ 0xB2AAB1AA, 0xBBB4B4BC, 0xB8BFB8B4, 0xB9B9BDB7,
+ 0xBDB7BDBF, 0xBBBDB7BB, 0xB9BBBFBA, 0xBEBCBABE,
+ 0xBCBFBDBD, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBBBAC0BB, 0xC0BBBAC0, 0xBAC0BBBA, 0xBDBABFBD,
+ 0xBEBDBABF, 0xB9BEBFB8, 0xBCB9C1C1, 0xB1BAB4B9,
+ 0xB7B0BDB4, 0xB3AFA4B8, 0x98B7A699, 0xA798B8A7,
+ 0xB9A798B8, 0x96B8A797, 0xA696B8A6, 0xBBA796BB,
+ 0x96BBA796, 0xA496BAA7, 0xB9A696B8, 0x97BBA797,
+ 0xA597BBA5, 0xBBA597BB, 0x97B9A597, 0xA597B9A5,
+ 0xBBA698BC, 0x97BCA597, 0xA797B9A8, 0xBBA698BA,
+ 0x98BAA59A, 0xA597B9A6, 0xBBA498BC, 0x95BCA397,
+ 0xA795BCA7, 0xBBA698BC, 0x94B8A397, 0xA397BBA0,
+ 0xB7A094B8, 0x93B7A196, 0xA395B79F, 0xB9A699B9,
+ 0x98BAA699, 0xA294B6A6, 0xB5A494B6, 0x95BAA393,
+ 0xA695BAA7, 0xB7A798B8, 0x96B6A497, 0xA395B7A3,
+ 0xB9A597BB, 0x94B8A293, 0xA597B9A2, 0xB7A69BBC,
+ 0x93B7A297, 0xA397BB9F, 0xB8A095B6, 0x96B8A297,
+ 0xA494B6A4, 0xB8A392B7, 0x92B9A493, 0xA493B8A4,
+ 0xB8A493B8, 0x93B8A493, 0xA493B8A4, 0xBAA496BA,
+ 0x92B8A296, 0xA697BDA1, 0xBDA697BD, 0x94B8A697,
+ 0xA294B8A2, 0xB9A494B6, 0x98B8A797, 0xA295B5A7,
+ 0xB7A598B8, 0x96B8A497, 0xA194B4A6, 0xB7A396B6,
+ 0x96B6A297, 0xA297B8A1, 0xB8A493B8, 0x94B9A493,
+ 0xA595B7A5, 0xB7A697B7, 0x98B7A697, 0xA697B6A7,
+ 0xB7A89CB8, 0x9EB5A89D, 0xB3AEBDA6, 0xB9BCBBBF,
+ 0xBDBDB8BB, 0xB8BDBCBB, 0xB7B6BBB9, 0xB9B7B4B9,
+ 0xB6BBB9B4, 0xB6B4B9B7, 0xB9B8B2B7, 0xB5BAB9B4,
+ 0xBBB7BCBA, 0xBAB8B8BD, 0xB8BBB9B7, 0xB9B7BAB8,
+ 0xBBB9BABE, 0xB9BCBAB8, 0xB7B8BCB7, 0xBDB7B8BC,
+ 0xB7B9B3BB, 0xA4AEB3AA, 0xB7B1A8AD, 0xA2A9A2B3,
+ 0x5F889089, 0x35335D64, 0x34353332, 0x3A2C2B27,
+ 0x3F394040, 0x41413B3F, 0x42484842, 0x49404848,
+ 0x48494048, 0x4B50504A, 0x504A5151, 0x50504A50,
+ 0x4C504F4B, 0x504A5150, 0x4F4F4950, 0x3B42423C,
+ 0x413B3F41, 0x3F413B41, 0x3F40443F, 0x43414044,
+ 0x42434140, 0x51555352, 0x53525855, 0x57545058,
+ 0x3F434440, 0x443F4044, 0x40443F40, 0x52565852,
+ 0x58525858, 0x56585258, 0x40414240, 0x42404142,
+ 0x43414041, 0x53585453, 0x53525854, 0x57535258,
+ 0x50525050, 0x51515050, 0x4E514F4F, 0x3A3E403A,
+ 0x42394043, 0x40423C41, 0x35353634, 0x1A1C3535,
+ 0x0000001B, 0x00000000, 0x01000001, 0x28282202,
+ 0x50585852, 0x645B5859, 0x78796F63, 0x74818175,
+ 0x81768382, 0x85817685, 0x7A888479, 0x83798684,
+ 0x86847A85, 0x2785837B, 0x05002F30, 0x04040004,
+ 0x00030100, 0x00000200, 0x02000002, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x11100000,
+ 0x37343013, 0x44404137, 0x5C525050, 0x5F5D535E,
+ 0x606A6860, 0x6C626A68, 0x76746A6E, 0x6F7B7A70,
+ 0x796F7A79, 0x5D5C527B, 0x25404138, 0x0100292B,
+ 0x00000000, 0x36000100, 0xABA2393A, 0xA8ABA2A8,
+ 0x9E9EA09A, 0x9B97A2A4, 0xA2A49E9A, 0xA0A6A8A2,
+ 0xABA2A6A9, 0xA7AAA1A8, 0x9FAFB0A7, 0xA9A3A7A8,
+ 0xBABCB6A9, 0xBAC0C4BE, 0xC0BCBBBF, 0xBBBEBCBF,
+ 0xB7AEB5B2, 0xC0BBB3BA, 0xB8BCB7BA, 0xBBBABDBB,
+ 0xBBBBBCBD, 0xBBBDBDB9, 0xBCBABDBB, 0xBDBBBBBE,
+ 0xBABDBBBA, 0xB7B9BDB8, 0xBBB9B8BC, 0xB8BBB9B8,
+ 0xB8B6BCB7, 0xBEB9B7BD, 0xB8BEB9B8, 0xB5B4BBB4,
+ 0xBBB6B5BC, 0xBABEB9B7, 0xBABABEB9, 0xBDBBBBBF,
+ 0xBCBDBBBC, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBABBBFBA, 0xBEBCBBBF, 0xBBBFBABB, 0xBFC0C4BF,
+ 0x8282C0C4, 0x00000082, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090605,
+ 0xA9ACB006, 0xC0BEC3C4, 0xBFBFB8C0, 0xB8C0C0B7,
+ 0xBFBAC0BF, 0xBFBEBAC0, 0xBAC0BFB9, 0xC1BBC0C1,
+ 0xBFC0BBC0, 0xBABFC0BA, 0xC0B9C1C1, 0xBFC0B8C0,
+ 0xBABFC0BA, 0xC0B8C0C0, 0xC0C0B8C0, 0xB9C1C1B8,
+ 0xBEB7BFBE, 0xC0BFB7BF, 0xB7BFBEB8, 0xBFB6BEBE,
+ 0xC0C0B7BF, 0xB6BEBEB8, 0xBEB6BEBD, 0xC0BFB7BF,
+ 0xB9BFBEBA, 0xBDB9BEBD, 0xC0BEBABF, 0xBCBFBDBD,
+ 0xBBB9BCBA, 0xBDBBB8BD, 0xB8BDBBB8, 0xBBBABCBC,
+ 0xBFBABABD, 0xB8BCB7BB, 0xAAB9BFBA, 0xA8A1A8AF,
+ 0xA0A99FA1, 0xA29EA59E, 0xA6A0A2A9, 0xA2A6A0A2,
+ 0x989DA398, 0xA79C9EA5, 0x9EA598A1, 0x989CA396,
+ 0xA396A0A7, 0x9CA1989C, 0x00171B16, 0x01010000,
+ 0x00000001, 0x01010002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000000, 0x341A1D1B,
+ 0x544F3539, 0x50544F50, 0x56595B55, 0x5C565A5C,
+ 0x5C5B575A, 0x585F5C58, 0x5D595F5C, 0x5F5C5760,
+ 0x58606158, 0x61586061, 0x5F605760, 0x6A70706A,
+ 0x706A7070, 0x71716B70, 0x58616259, 0x61586061,
+ 0x61625960, 0x5B5F5F59, 0x605A6161, 0x60605A60,
+ 0x6A70706A, 0x706A7070, 0x70706A70, 0x5860605A,
+ 0x605A5E61, 0x5F5F5960, 0x585F5C58, 0x5B58605B,
+ 0x5F5C5860, 0x565D5C58, 0x5B57595A, 0x5C5B575A,
+ 0x60676460, 0x64606863, 0x68656167, 0x474E4B47,
+ 0x4C474F4C, 0x4F4C474F, 0x3E42443E, 0x2C284244,
+ 0x2C2D292B, 0x6E424543, 0x9C9A6D70, 0x999D9899,
+ 0xB3AAB1AA, 0xBBB4B5BD, 0xB3BAB3B4, 0xB9B9BDB7,
+ 0xBFB9BDBF, 0xB9BDB7BD, 0xBABCC0BB, 0xBEBCBBBF,
+ 0xBEBFBBBD, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBBBAC0BB, 0xC0BDBAC0, 0xB9C0BDB9, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBABFC0BA, 0xC2B8C0C0, 0xB7BDBABF,
+ 0xB5AFBAB7, 0xB7B2ABBA, 0x99B5ADA1, 0xA798B8A7,
+ 0xB8A697B7, 0x95B7A696, 0xA595B7A5, 0xBBA795BA,
+ 0x96BBA896, 0xA597BBA7, 0xBAA597B9, 0x97BBA698,
+ 0xA597BBA5, 0xB9A799BD, 0x99BBA597, 0xA597B9A7,
+ 0xBAA597BB, 0x96BBA695, 0xA594B9A7, 0xB6A294B6,
+ 0x98BAA294, 0xAA9CBEA6, 0xBBA799BD, 0x94B9A597,
+ 0xA594B9A5, 0xB7A294B8, 0x95B99F93, 0xA094B8A1,
+ 0xB8A094B8, 0x93B7A094, 0x9F93B79F, 0xBBA698BA,
+ 0x98BAA89B, 0xA496B8A6, 0xB6A395B7, 0x96B8A494,
+ 0xA595B7A6, 0xB7A697B7, 0x97B7A798, 0xA898BAA6,
+ 0xBBA796BB, 0x94B8A597, 0xA89ABCA2, 0xB5A89BBB,
+ 0x94B6A295, 0xA496BAA2, 0xB8A294B6, 0x96B8A496,
+ 0xA595B7A4, 0xB9A595B7, 0x94B9A594, 0xA593BAA5,
+ 0xB8A493B8, 0x93B8A294, 0xA294B8A4, 0xB7A294B6,
+ 0x95BB9F93, 0xA697BDA4, 0xB9A697BD, 0x94B8A293,
+ 0xA294B8A2, 0xB7A395B9, 0x95B5A395, 0xA295B5A2,
+ 0xB8A497B7, 0x96B8A496, 0xA494B6A6, 0xB5A497B7,
+ 0x97B7A295, 0xA597B9A4, 0xB9A493B8, 0x95B7A594,
+ 0xA697B7A5, 0xB8A596B6, 0x96B6A798, 0xA798B7A5,
+ 0xB7A89CB8, 0x9EB5A89D, 0xB0ADBCA6, 0xBBBABBBF,
+ 0xBBBCB8BD, 0xB8BDBCB7, 0xB8B6BBB9, 0xB8B6B5BA,
+ 0xB5BAB8B3, 0xB8B4B9B8, 0xB9B8B5BA, 0xB4B9B7B4,
+ 0xB6B7BCBA, 0xB9B7B5B8, 0xBABBB9B8, 0xB8B9BDB8,
+ 0xBDBBB9BD, 0xB9BCBABA, 0xB7B8BCB7, 0xBBB5B8BC,
+ 0xB9BCB3B9, 0xA4ADB2A9, 0xB7B1A8AD, 0xA2A9A2B3,
+ 0x5E899089, 0x36315E65, 0x34353132, 0x3A40403A,
+ 0x42394040, 0x40413841, 0x40484940, 0x49404849,
+ 0x48494048, 0x48505148, 0x504A5051, 0x50504A50,
+ 0x4A50504A, 0x514B5050, 0x50514851, 0x585F6057,
+ 0x605A6061, 0x60605A60, 0x5E62645E, 0x65605F63,
+ 0x62635F61, 0x4F555450, 0x53505754, 0x56534F58,
+ 0x5F62635F, 0x645F6064, 0x62645E60, 0x52555751,
+ 0x58525658, 0x56585256, 0x5D61625E, 0x605F6061,
+ 0x62615D62, 0x4F575450, 0x54535653, 0x56525158,
+ 0x5052504F, 0x50505152, 0x50514F50, 0x5860605A,
+ 0x615B6061, 0x5F5F5961, 0x3350514F, 0x1C1C3435,
+ 0x0000001C, 0x00000000, 0x01000001, 0x27272102,
+ 0x505A5752, 0x635B5A58, 0x7B7A7065, 0x747E7C71,
+ 0x81768382, 0x8B877C85, 0x77888479, 0x857A8885,
+ 0x87857A89, 0x79868479, 0x847A8684, 0x5B5A5085,
+ 0x0E36332E, 0x00001512, 0x02000004, 0x00020000,
+ 0x00000001, 0x00000002, 0x00010101, 0x11100200,
+ 0x37343015, 0x45404138, 0x5E54504F, 0x5F5E545F,
+ 0x626A695F, 0x746A6D6C, 0x77756A76, 0x6E7A7A6E,
+ 0x6F657A7A, 0x5D5C5270, 0x25404138, 0x01002B2B,
+ 0x00000000, 0x34000100, 0xABA23738, 0xA6ABA2A6,
+ 0xA2A2A59C, 0x9F9BA6A8, 0x9D9F999E, 0xA1A6A9A0,
+ 0xA9A0A7AA, 0xA7AAA1A6, 0xA0A5A89F, 0xAFA9A6A9,
+ 0xBABCB6AD, 0xBABBBFB9, 0xBEBCBBBF, 0xBCBFBDBD,
+ 0xB6B5BCB9, 0xB8B6B0B9, 0xB6BBB9B3, 0xBBBBBEBC,
+ 0xBDBDBABD, 0xB9BBBBBB, 0xBCBABDBB, 0xBDBBBBBE,
+ 0xB8BBB9BA, 0xBAB9BDB8, 0xBCBABBBF, 0xB9BCBAB9,
+ 0xB9B5BBB6, 0xBEB9B8BE, 0xB7BDB8B8, 0xB9B8BFB8,
+ 0xBEB9B9C0, 0xB7BBB6BA, 0xB9BABEB9, 0xBDBBBABE,
+ 0xBABDBBBA, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBABBBFBA, 0xBEBCBBBF, 0xBABDBBBB, 0xC1C0C3C1,
+ 0x8381C0C3, 0x01010182, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090605,
+ 0xA9ACB006, 0xC0BFC4C5, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0BABFC0, 0xC0C0BABF, 0xB8C0C0B8, 0xC1BBC0C1,
+ 0xC0C0BBC0, 0xB8C0C0B8, 0xC0BABFC0, 0xC1C1BABF,
+ 0xB9C1C1B9, 0xC2BCC1C2, 0xC2C2BCC1, 0xB8C0C0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB9C1C1B8, 0xC1B5BDBD,
+ 0xC1C1B9C1, 0xB8C0C0B9, 0xBFB8C0C0, 0xBEBFB7BF,
+ 0xB9BFBEB9, 0xBCB9BFBE, 0xBCBCB8BD, 0xBABCBCBA,
+ 0xBFB9BEBD, 0xBFBEBAC0, 0xB8BEBDB9, 0xBBB9BEBC,
+ 0xBDB8B8BD, 0xB8BCB7B9, 0xA2B9BCBA, 0xA7A1A1A7,
+ 0x959C97A3, 0xA7808C8C, 0xA7A29EA9, 0xA6A9A0A3,
+ 0x9BA1A69D, 0xA49B9EA6, 0x9EA4999F, 0x979EA598,
+ 0xA4999DA4, 0x9DA2999E, 0x00181C17, 0x01010001,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000001, 0x3D22231F,
+ 0x615B4143, 0x5F615B5F, 0x58606158, 0x61586061,
+ 0x60615860, 0x62686862, 0x68626868, 0x696A6168,
+ 0x5E686960, 0x69616768, 0x6B69616B, 0x5F67645F,
+ 0x645F6764, 0x67645F67, 0x5F67645F, 0x645F6764,
+ 0x68656067, 0x62686862, 0x68626868, 0x67676168,
+ 0x5E65655F, 0x64606464, 0x65655F65, 0x5D62645E,
+ 0x635F5F63, 0x63646062, 0x5F65655F, 0x65616764,
+ 0x67646068, 0x5F67645F, 0x64606565, 0x67646067,
+ 0x575F5C57, 0x5C575F5C, 0x5F5C575F, 0x4A5C5C56,
+ 0x534A5253, 0x52534A52, 0x304D4E45, 0x39333839,
+ 0x37373139, 0x60474846, 0x93915F62, 0x90948F90,
+ 0xB6ABAFA9, 0xB8B3B8BC, 0xB6BCB7B2, 0xB8BABEB9,
+ 0xBEB8B9BD, 0xB7BEB7BA, 0xBAB9BFBA, 0xBFBAB9BF,
+ 0xBCC0BBBB, 0xBABBBFBA, 0xBFBABBBF, 0xB9BEBCBB,
+ 0xBDBABFBD, 0xBFBEBABF, 0xBABFBDBA, 0xBEBCBFBD,
+ 0xC0BEBBC0, 0xBAC0BFBB, 0xC2B8C0C0, 0xBBBFBABF,
+ 0xB4B4BAB8, 0xB6B2AEB9, 0x9EB5ADA5, 0xA89CB8A8,
+ 0xBBA899B9, 0x98BAA999, 0xA695BAA6, 0xB7A695B7,
+ 0x94B9A695, 0xA395B9A5, 0xB8A294B8, 0x95B6A094,
+ 0xA395B7A0, 0xB9A797B9, 0x97B9A797, 0xA696B8A7,
+ 0xB9A594B9, 0x94B9A594, 0xA496BAA5, 0xBAA698BA,
+ 0x9CBEA698, 0xAF9FC1AA, 0xBEAD9CC1, 0x96BBAB99,
+ 0xA797B9A7, 0xB7A595B7, 0x96B8A595, 0xA897BCA6,
+ 0xBDA796BB, 0x95BBA697, 0xA294B8A4, 0xB9A597B9,
+ 0x98B8A699, 0xA196B6A3, 0xB7A297B8, 0x96B8A395,
+ 0xA598B8A4, 0xBAA69AB8, 0x99B9A89C, 0xA899B9A8,
+ 0xB8A898BA, 0x98B8A798, 0xAB9CBCA7, 0xB6A897B8,
+ 0x94B7A695, 0xA796B8A8, 0xB8A493B8, 0x93B7A294,
+ 0xA294B6A1, 0xB7A396B6, 0x94B8A497, 0xA395B9A2,
+ 0xB8A094B8, 0x96B8A094, 0xA395B7A4, 0xB8A496BA,
+ 0x95BBA294, 0xA697BDA4, 0xBAA395B9, 0x95BBA496,
+ 0xA093B9A2, 0xB9A295BB, 0x94B8A395, 0xA698BCA2,
+ 0xBAA597B9, 0x92B7A698, 0xA694B9A3, 0xB6A798B8,
+ 0x95B7A596, 0xA393B5A5, 0xB7A493B8, 0x98B6A595,
+ 0xA498B6A4, 0xB8A497B7, 0x94B6A496, 0xA798B8A4,
+ 0xB5A89CB8, 0x9FB2A89E, 0xB4B2BEA5, 0xBCB9BDBE,
+ 0xBCBDB9BE, 0xB8BDBCB8, 0xB9B5BAB8, 0xB8B7B6BB,
+ 0xB3B8B7B2, 0xB8B3B8B6, 0xB8B6B9BD, 0xB3B9B4B3,
+ 0xB2B5B9B4, 0xB8B6B3B7, 0xBABBB9B7, 0xB9B9BCBA,
+ 0xBCBAB6BB, 0xB7BCBAB7, 0xB9B8BDBB, 0xBBB5BABE,
+ 0xB9BCB3B9, 0xA4AEB3AA, 0xB7B1A8AD, 0xA8ACA6B3,
+ 0x69848980, 0x3A366B6F, 0x3A3B3739, 0x3D383832,
+ 0x463D4546, 0x45463D45, 0x464F4C47, 0x4E45504E,
+ 0x5859504D, 0x565A5C56, 0x5B575A5C, 0x6364605A,
+ 0x56636460, 0x5B555A5C, 0x5A5C5659, 0x5A5E605A,
+ 0x605A5E60, 0x60605A60, 0x5F62645E, 0x645E6365,
+ 0x62645E60, 0x5860605A, 0x5E596061, 0x60605A61,
+ 0x5B5D5F59, 0x605A5F61, 0x5D5F595E, 0x5D60615D,
+ 0x625D5E62, 0x5E625D5E, 0x5A5E5F5B, 0x5F5B6060,
+ 0x605F5B60, 0x5F60615D, 0x60606061, 0x62605F62,
+ 0x585D5B5A, 0x5A595D5C, 0x5D5C585C, 0x555C5B57,
+ 0x5B575B5B, 0x5D5C585C, 0x4D51504C, 0x26255251,
+ 0x02000028, 0x00010101, 0x02000001, 0x2A272303,
+ 0x57605B58, 0x6C64605C, 0x76746A6F, 0x76807C71,
+ 0x83788581, 0x88847987, 0x75858476, 0x7F718585,
+ 0x80807080, 0x778A8778, 0x897A8B89, 0x8D8A7C8C,
+ 0x7B86847A, 0x504D8683, 0x3C393555, 0x050A0703,
+ 0x05070806, 0x0805070A, 0x00020000, 0x1A190200,
+ 0x3936321E, 0x4747443F, 0x5850514F, 0x6463595A,
+ 0x6469685E, 0x6F647070, 0x78756771, 0x6979786A,
+ 0x6F637777, 0x6262566F, 0x2545443A, 0x00002F2D,
+ 0x00000002, 0x6E040606, 0xA7A06D70, 0xA1A99FA0,
+ 0x9C9EA39A, 0xA7A1A0A5, 0x9EA09AA3, 0xA1A1A49B,
+ 0xA9A0A9AA, 0xA6A9A0A6, 0xA6A8ACA6, 0xB4AFA8AC,
+ 0xC1C5C0B0, 0xB7B8BEB9, 0xBBB9B8BC, 0xB9BCBABA,
+ 0xBAB9BCBA, 0xB8B7B7BC, 0xB3B8B7B3, 0xB9B6BBB9,
+ 0xBBB9B6BB, 0xB6BBB9B6, 0xBAB9BCBA, 0xBEB9B9BC,
+ 0xB9BDB8BA, 0xBCB8BDBB, 0xBDBBB9BE, 0xBABDBBBA,
+ 0xB8B7BBB6, 0xBDB8BABE, 0xBABEB9B9, 0xB6B9BDB8,
+ 0xBCBAB7BB, 0xB8BBB9BB, 0xB8B9BDB8, 0xBCBAB7BD,
+ 0xB7BCBAB7, 0xB9B8BEB9, 0xBDBBB8BE, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBDB8B8BD, 0xB8BBB9B9, 0xBFC0C1BF,
+ 0x817FC0C1, 0x00010080, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090605,
+ 0xA9ACB006, 0xC0BEC3C4, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC1BABFC0, 0xC0C0BBC0, 0xB8C0C0B8, 0xC1BBC0C1,
+ 0xC0C0BBC0, 0xB8C0C0B8, 0xC0BABFC0, 0xC0C0BABF,
+ 0xB8C0C0B8, 0xC2BABFC0, 0xC2C2BCC1, 0xB9C1C1BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B6BEBE,
+ 0xC0C0B8C0, 0xB9C1C1B8, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xB9BEBFBA, 0xBEBAC0BF, 0xC0BFB9BF, 0xBABFBEBB,
+ 0xBEBABFBE, 0xBDBCB9BF, 0xB9BFBEB7, 0xB9B9BEBC,
+ 0xBBB9B6BB, 0xB6BBB9B6, 0xACB8BBB9, 0xA7A2ADB1,
+ 0x949B98A3, 0x9D818D8D, 0xA8A3919D, 0xA6A8A2A2,
+ 0x9CA0A59C, 0xA39A9EA6, 0x9EA4999E, 0x979EA499,
+ 0xA4999DA4, 0x9BA0979E, 0x00181C17, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x01010100, 0x5C22231F,
+ 0x817B6062, 0x7F807781, 0x6D76776D, 0x776D7677,
+ 0x76776D76, 0x6B73746B, 0x7E757374, 0x70736A7B,
+ 0x7C76776D, 0x837B8586, 0x87857D85, 0x7F89877F,
+ 0x86818987, 0x89868189, 0x818A8681, 0x86818A86,
+ 0x89868189, 0x8F95958F, 0x94909595, 0x95958F95,
+ 0x85898B85, 0x8A86898B, 0x8A8B8789, 0x80858781,
+ 0x86828286, 0x85878185, 0x80848680, 0x86808486,
+ 0x86868086, 0x7B827F7A, 0x7F7C8380, 0x83807B84,
+ 0x6F817E79, 0x736E7774, 0x74746E76, 0x5D66675E,
+ 0x685E6366, 0x5B5C5267, 0x3B585950, 0x38304344,
+ 0x3838323A, 0x79484947, 0x948F787B, 0x8F938E90,
+ 0xB7B0B4AE, 0xB8B3B7BE, 0xB6BCB7B2, 0xB8B8BCB7,
+ 0xBFB8B7BD, 0xB8BFB8B8, 0xBAB9BFBA, 0xBFBAB9BF,
+ 0xBBBFBABB, 0xB9BBBFB9, 0xBEBCBBBF, 0xB9BEBCBB,
+ 0xBEB9BEBD, 0xBFBEBABF, 0xBBC0BEBA, 0xBDBDC1BC,
+ 0xC0BEBEC2, 0xBBC0BEBB, 0xC2B8C0C0, 0xBEC1B8BF,
+ 0xB2B5B9B9, 0xBBB0AFB8, 0xA4B9B3AF, 0xA89DB7AD,
+ 0xBAA69AB8, 0x98BCA698, 0xA496BAA6, 0xB8A595B7,
+ 0x95B7A696, 0xA294B6A5, 0xB6A294B6, 0x9BBBA095,
+ 0xA194B4A6, 0xB8A798B8, 0x97B9A897, 0xA797B9A8,
+ 0xBBA796BB, 0x97BBA796, 0xA698BCA5, 0xB9A698BA,
+ 0x9CBEA597, 0xAB9DBFAA, 0xBEAA99BE, 0x96B8AB99,
+ 0xA797B9A6, 0xB8A797B9, 0x97B9A696, 0xA896BBA8,
+ 0xBBA694BB, 0x97BDA694, 0xA294B8A6, 0xB8A193B5,
+ 0x97B7A598, 0xA297B7A2, 0xB6A297B8, 0x96B6A095,
+ 0xA598B8A3, 0xBBA699B9, 0x97B7A89B, 0xA495B5A4,
+ 0xB9A798B8, 0x9BBAA99A, 0xAA9CB8AA, 0xB6A999B8,
+ 0x94B7A695, 0xAB97BAA8, 0xB8A493B8, 0x94B8A294,
+ 0xA095B6A0, 0xB7A396B6, 0x94B6A497, 0xA395B9A2,
+ 0xB6A195B9, 0x96B8A095, 0xA496B8A4, 0xB8A496BA,
+ 0x97BDA294, 0xA495BBA6, 0xBCA496BA, 0x93B9A698,
+ 0xA093B9A0, 0xB8A497BD, 0x93B99F92, 0xA698BCA2,
+ 0xB7A395B9, 0x93B8A595, 0xA694B9A4, 0xB7A897B9,
+ 0x92B7A595, 0xA493B8A3, 0xB7A595B7, 0x98B6A497,
+ 0xA498B6A4, 0xB6A297B8, 0x96B8A095, 0xA699B9A4,
+ 0xB4A89CB8, 0xAAB9A69F, 0xBBBDC5AD, 0xBAB6BBBC,
+ 0xBDBCB5BB, 0xB8BDBCB8, 0xB5B6BBB9, 0xB9BAB2B7,
+ 0xB2B7B6B4, 0xB3B3B8B6, 0xB9B4B4B8, 0xB3B9B4B3,
+ 0xB4B3B7B2, 0xB8B6B5B9, 0xB8BBB9B7, 0xBAB7BAB8,
+ 0xBBB9B7BC, 0xB7BCBAB6, 0xB9B8BDBB, 0xB8B2BABE,
+ 0xB6B9B0B6, 0xA4AFB4AB, 0xB7B1A8AD, 0xA8ACA6B3,
+ 0x69868980, 0x54506D6F, 0x3A3C3653, 0x4A45453F,
+ 0x544B5253, 0x53544B53, 0x4E5A5850, 0x61585657,
+ 0x686B6260, 0x6B61655F, 0x6E6A6C70, 0x7678726D,
+ 0x71767773, 0x78727577, 0x76787276, 0x777B7D77,
+ 0x6F697B7D, 0x7E7E786F, 0x8085887F, 0x88828689,
+ 0x7A7C7686, 0x737B7C73, 0x7C737B7C, 0x7B7C737B,
+ 0x777C7E78, 0x7D777B7D, 0x7B7C787D, 0x76747873,
+ 0x83817578, 0x80847F7E, 0x767A7B77, 0x7A767C7C,
+ 0x7A7B777B, 0x76777874, 0x76767578, 0x77787676,
+ 0x77797A76, 0x7B777C7B, 0x72716D7C, 0x6D7D7C78,
+ 0x716D7271, 0x72716D74, 0x72777771, 0x28247878,
+ 0x02010029, 0x00000000, 0x00000000, 0x2A272302,
+ 0x57605B58, 0x6B64625C, 0x78736A71, 0x73807C71,
+ 0x8277827E, 0x85827486, 0x76858476, 0x85758686,
+ 0x7F7F6F85, 0x76878573, 0x88768C88, 0x8C88768C,
+ 0x7A898678, 0x827B8883, 0x86827D88, 0x507E7B76,
+ 0x2D2C5855, 0x312C2D31, 0x00020000, 0x1C180200,
+ 0x3835311F, 0x48474440, 0x5950504D, 0x62635958,
+ 0x5D69695D, 0x70626969, 0x78756771, 0x68787868,
+ 0x786C7878, 0x62625678, 0x2647453B, 0x0000302E,
+ 0x01010102, 0x6D040606, 0xA7A26A6F, 0xA0A8A1A1,
+ 0x9C9EA39A, 0xA7A1A0A5, 0x9EA29CA3, 0x9DA0A198,
+ 0xA9A0A5A6, 0xA6A8A2A6, 0xA7A7ABA5, 0xBDB8A6AC,
+ 0xBEC4BFB7, 0xB8B8BEB9, 0xBCB7B7BD, 0xB9BCBAB8,
+ 0xB8B7BBB6, 0xBABAB7BA, 0xB7BCBBB8, 0xB9B6BBB9,
+ 0xBCBAB6BB, 0xB7BCBAB7, 0xB7B9BCBA, 0xBAB5B6B9,
+ 0xB8BCB7B6, 0xB8B5BAB8, 0xBDBBB5BA, 0xBBBFBABA,
+ 0xB8B7BBB6, 0xBDB8B9BD, 0xB9BDB8B9, 0xB8B9BDB8,
+ 0xBCBAB9BD, 0xB9BCBAB9, 0xB8B7BDB8, 0xBCBAB7BD,
+ 0xB7BCBAB7, 0xB9B8BEB9, 0xBDBBB8BE, 0xB8BDBBB8,
+ 0xBBB9BEBC, 0xBDB8B8BD, 0xB8BCB7B9, 0xC0C0C0C0,
+ 0x817FC0C0, 0x00010080, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090605,
+ 0xA9ACB006, 0xC0BDC2C3, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BABFC0,
+ 0xBFBFBABF, 0xB8C0C0B7, 0xC2BAC2C2, 0xC0C0BAC2,
+ 0xBAC2C2B8, 0xC2B8C0C0, 0xC1C1BAC2, 0xB8C0C0B9,
+ 0xBFB9C1C1, 0xBEBFB7BF, 0xB8BDBEB9, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xB7BFBEB8, 0xBCB9BFBE, 0xBDBBB7BD, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBEBCB8BD, 0xB9BEBCB9, 0xBBB8BDBB,
+ 0xBEBBB8BD, 0xB9C0BDB7, 0xACB8BBB9, 0xA6A1AFB0,
+ 0xA2A8A3A2, 0x9C97A09D, 0x9F9C969F, 0xA2A8A398,
+ 0x9A9CA39C, 0xA39A9EA3, 0x9EA4999E, 0x979CA297,
+ 0xA4999DA4, 0x9CA1989E, 0x00181C17, 0x01010001,
+ 0x00000001, 0x01000001, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00010000, 0x7A24231F,
+ 0x80778080, 0x8081787F, 0x7881857A, 0x84798084,
+ 0x80847980, 0x8088897F, 0x89808889, 0x898A8188,
+ 0x88909489, 0x93899094, 0x92938992, 0x8F97988E,
+ 0x99919899, 0x9B99919B, 0x909A9890, 0x98909A98,
+ 0x9B99919A, 0x8C95968D, 0xACA69295, 0xA9ABA5AA,
+ 0x989B9F99, 0x9F999AA2, 0x9D9F999B, 0x92969892,
+ 0x98929698, 0x96989298, 0x8F939791, 0x988F9398,
+ 0x95988F93, 0x88909188, 0x8F8A9290, 0x83807B92,
+ 0x78827F7A, 0x80788081, 0x80817882, 0x68717269,
+ 0x675C6E71, 0x66685C63, 0x4358594F, 0x453C4E4D,
+ 0x38383244, 0x79484945, 0x938E787B, 0x8E948F8D,
+ 0xB2A9B0A9, 0xB3AEB1B9, 0xB6BDB8AC, 0xB9B7BDB8,
+ 0xBFB8B8BE, 0xB7BFB8B8, 0xBAB9BFBA, 0xBFBAB9BF,
+ 0xBBBFBABB, 0xB9BDBFB9, 0xBEBCBBBF, 0xBBBEBCBB,
+ 0xBEBCBEBE, 0xBFBEBABF, 0xBABFBDBA, 0xBBBCC0BB,
+ 0xC1BCBDC1, 0xBBC0BEBD, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xB8BBBFBA, 0xB9B0B0B6, 0xA5B9B2AE, 0xA89DB7AE,
+ 0xB6A197B5, 0x94B8A095, 0xA294B8A0, 0xB6A294B8,
+ 0x94B6A494, 0xA194B4A4, 0xBEA89CBA, 0xA4BFACA3,
+ 0xA89CBAAD, 0xBAA798B8, 0x99BBA998, 0xA597B9A9,
+ 0xBBA597BB, 0x96BBA597, 0xA796BBA7, 0xB8A294B8,
+ 0x98BCA294, 0xA498BCA4, 0xBCA496BA, 0x97BCA698,
+ 0xA796BBA8, 0xB7A395B7, 0x93B8A595, 0xA594B9A4,
+ 0xBBA694BB, 0x99BDA495, 0xA496BAA7, 0xB7A294B6,
+ 0x97B7A395, 0xA497B7A4, 0xB6A496B8, 0x94B6A294,
+ 0xA395B7A2, 0xB8A297B8, 0x97B8A297, 0xA294B6A2,
+ 0xBBA599B7, 0xA1BBAB9F, 0xA89FB9AA, 0xB8AA9EBA,
+ 0x95B6A899, 0xA998BAA6, 0xB7A294B6, 0x97B8A196,
+ 0xA095B6A2, 0xB6A396B6, 0x94B6A596, 0xA496BAA2,
+ 0xB6A297B8, 0x96B8A095, 0xA294B6A4, 0xB8A496BA,
+ 0x93B9A294, 0xA396BCA0, 0xBDA697BD, 0x93B9A697,
+ 0xA093B9A0, 0xB9A397BB, 0x93B9A195, 0xA496BAA2,
+ 0xB5A796BB, 0x94B9A393, 0xA594B9A5, 0xB7A797B9,
+ 0x91B6A595, 0xA294B8A2, 0xB7A496B8, 0x98B6A497,
+ 0xA397B5A4, 0xB7A196B7, 0x99BAA196, 0xA69AB8A4,
+ 0xB4A89CB8, 0xBBC5A69F, 0xBBC0C3BA, 0xBBB7BDBC,
+ 0xBEBDB6BC, 0xB6BCBBB8, 0xB8B3B8B6, 0xBBBCB5BA,
+ 0xB5BAB9B7, 0xB5AEB3B1, 0xB9B4B4BA, 0xB1B8B1B3,
+ 0xB3B3BAB3, 0xB9B4B3BA, 0xB8BCB7B5, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB7BDB8B6, 0xB5BABEB9, 0xB9B0B7BB,
+ 0xB6BAAFB6, 0xA4AEB3AA, 0xB3AAA8AD, 0xA5A89FB0,
+ 0x68868882, 0x54506C6E, 0x3B3B3555, 0x4B464640,
+ 0x62585354, 0x60615761, 0x61606157, 0x6C626A6B,
+ 0x686C616B, 0x726B6F69, 0x78727478, 0x78797076,
+ 0x70787872, 0x79707879, 0x78787278, 0x787C7E78,
+ 0x8D877B7C, 0x898B858B, 0x82888882, 0x7C768888,
+ 0x7C7C767C, 0x8089877F, 0x8A818A88, 0x88898089,
+ 0x86898B85, 0x8C88898A, 0x7B7C788B, 0x7F80847F,
+ 0x847F8084, 0x80847F80, 0x85888985, 0x88878A89,
+ 0x8889858A, 0x7E82837F, 0x83817F83, 0x74777580,
+ 0x77797D78, 0x7B777A7B, 0x7B7A767A, 0x787F7C78,
+ 0x7A777F7C, 0x7F7C787F, 0x73787872, 0x4F4B7979,
+ 0x0001004E, 0x00000000, 0x00000000, 0x2A262502,
+ 0x57605B58, 0x6B64605C, 0x78736A71, 0x76837F74,
+ 0x84798581, 0x88857788, 0x75858476, 0x84768585,
+ 0x81817185, 0x76868374, 0x84728A88, 0x8A887686,
+ 0x798A8477, 0x837A8884, 0x86847A88, 0x727F7F73,
+ 0x7E747E7E, 0x7F7D7580, 0x3051514B, 0x1B153636,
+ 0x3737311B, 0x4945453F, 0x59504F4F, 0x62635958,
+ 0x5D646458, 0x6F646969, 0x76756771, 0x68797667,
+ 0x776B7878, 0x61615577, 0x2546443A, 0x02002F2D,
+ 0x00000001, 0xA2393C3A, 0xA8A1A1A7, 0xA0A8A1A1,
+ 0x9E9EA39A, 0xA7A1A2A7, 0xA3A7A1A3, 0x98A0A198,
+ 0xA8A2A0A1, 0xA6A8A2A8, 0xA6ABADA7, 0xBCB7A8AC,
+ 0xBEC4BFB8, 0xB8B9C0B9, 0xBBB6B7BF, 0xB8BEB9B5,
+ 0xB6B9BDB8, 0xBAB8B9BA, 0xB5B8B6B9, 0xB9B6B9B7,
+ 0xBDB8B8BB, 0xB9BFBAB7, 0xB8B6BCB7, 0xBCBAB7BD,
+ 0xB7BCBAB7, 0xB8B5BAB8, 0xBBB6B5BA, 0xB1B7B2B5,
+ 0xB6B2B7B5, 0xBAB8B3B8, 0xB4B9B7B5, 0xB7B6BBB9,
+ 0xBAB8B4B9, 0xB5BAB8B5, 0xB9B6BBB9, 0xBCBAB6BB,
+ 0xB9BCBAB9, 0xB9BABEB9, 0xBEB9BABE, 0xBABEB9BA,
+ 0xB9B8BEB9, 0xBDB8B8BE, 0xB9BDB8B9, 0xC0C0C0C0,
+ 0x8080C0C0, 0x00000080, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090605,
+ 0xA9ACB006, 0xC0BDC2C3, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFBFB8C0, 0xB7BFBFB7, 0xC1BBC0C1,
+ 0xC0C0BBC0, 0xBAC2C2B8, 0xC2BAC2C2, 0xC0C0BAC2,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC1B8C0C0, 0xBFC0B9C1, 0xB8BDBEBA, 0xC0B6BEBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B6BEBE, 0xBFBEB8C0,
+ 0xB7BFBEB7, 0xBEB9BFBE, 0xBDBCB9BF, 0xB8BDBBB8,
+ 0xBBBABDBB, 0xBAB8BABD, 0xB7BCBAB5, 0xBCB8BDBB,
+ 0xBDBCB8BD, 0xBBC0BEB7, 0xA2B8BBB9, 0xA7A2A5A6,
+ 0xA1A7A2A3, 0xA4A1A7A2, 0x9F9CA2A9, 0x989F9A98,
+ 0x979CA39C, 0xA59C9BA0, 0x9EA499A0, 0x979DA398,
+ 0xA2979DA4, 0x9DA2999C, 0x00181C17, 0x00000001,
+ 0x00000000, 0x01000001, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x01010200, 0x00010001, 0x7A23221E,
+ 0x81788080, 0x80817880, 0x78808479, 0x84798084,
+ 0x80847980, 0x7F88897F, 0x89808889, 0x88898088,
+ 0x7982867B, 0x857B8185, 0x84857B84, 0x7E87887E,
+ 0x887E8788, 0x89877F89, 0x7F89877F, 0x877F8987,
+ 0x87887F89, 0x777D8077, 0x968D7D80, 0x93968D93,
+ 0x829CA198, 0x8C83868B, 0x898B8587, 0x81878781,
+ 0x86808787, 0x85887F86, 0x7E84877E, 0x776E8287,
+ 0x74776E72, 0x79818279, 0x716C8381, 0x75726D74,
+ 0x6C74756C, 0x746C7475, 0x76746C76, 0x686F7067,
+ 0x72676E71, 0x66675D6E, 0x445A594F, 0x443B4F4E,
+ 0x36383243, 0x79484945, 0x948F787B, 0x8E948F90,
+ 0xB2A8B0A9, 0xB3AEB1B9, 0xB2B8B3AD, 0xB6B8BCB7,
+ 0xBEB7B8BC, 0xB8BFB8B7, 0xBAB9BFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB9BDBEBA, 0xBEBCBCBD, 0xBABDBBBB,
+ 0xBEBCBFBD, 0xBFBEBCBE, 0xBABFBDBA, 0xBCBAC0BB,
+ 0xC1BCBBC1, 0xBBC0BEBD, 0xBFB8C0BF, 0xBFC0B8C0,
+ 0xBBBFC0BA, 0xB9B4B7BB, 0xA6B7B0AF, 0xA69EB5AC,
+ 0xB7A298B6, 0x96B8A196, 0xA496B8A4, 0xB7A395B7,
+ 0x96B6A595, 0xA599B7A5, 0xC4AEA3BD, 0xA8C2B3AA,
+ 0xAEA2BEB1, 0xBAA899B9, 0x98BAA898, 0xA698BAA6,
+ 0xBBA597BB, 0x96BBA796, 0xA695BAA7, 0xB8A493B8,
+ 0x94B8A294, 0xA294B8A2, 0xB8A395B9, 0x92B7A294,
+ 0xA493B8A3, 0xB5A294B6, 0x93B8A193, 0xA594B9A4,
+ 0xBBA495BB, 0x98BCA495, 0xA496BAA6, 0xB7A695BA,
+ 0x95B7A395, 0xA496B8A3, 0xB6A496B8, 0x94B6A294,
+ 0xA395B7A2, 0xBAA296BA, 0x96BAA296, 0xA294B6A2,
+ 0xBAA599B7, 0xA1BBA89F, 0xAAA1BBAA, 0xBAA9A0BA,
+ 0x96B6AA9E, 0xA595B7A5, 0xB8A294B6, 0x96B7A297,
+ 0xA294B6A1, 0xB7A496B8, 0x95B9A395, 0xA496BAA3,
+ 0xB6A195B9, 0x97B7A095, 0xA396B6A4, 0xB8A496B8,
+ 0x92B8A294, 0xA697BDA1, 0xBBA697BD, 0x93B9A597,
+ 0xA195B9A2, 0xB8A296BA, 0x94B8A094, 0xA496BAA2,
+ 0xB6A595B7, 0x94B9A594, 0xA594B9A5, 0xB8A594B9,
+ 0x94B8A493, 0xA395B9A2, 0xB7A297B8, 0x97B7A297,
+ 0xA497B7A4, 0xBAA294B6, 0x99B9A698, 0xA498B4A6,
+ 0xBFA69FB4, 0xBFC2B5B3, 0xB8C0BFBA, 0xBCB6BCBB,
+ 0xBCBBB7BD, 0xB3BAB7B6, 0xB9B5BAB8, 0xB9B8B6BB,
+ 0xB3B8B7B4, 0xB4AEB3B1, 0xB7B2B1B6, 0xB3BAB3B1,
+ 0xB4B3B9B4, 0xB9B4B3B9, 0xB8BCB7B5, 0xB7B6BAB5,
+ 0xBDB8B8BC, 0xB7BEB7B9, 0xB5B7BBB6, 0xBCB3B7BB,
+ 0xB4BAAFB9, 0xA3AEB3AA, 0xB8AFA7AC, 0xA4A9A0B3,
+ 0x69848980, 0x554F6D6F, 0x3C3C3653, 0x4B45463D,
+ 0x61575354, 0x60615760, 0x57606157, 0x6A606061,
+ 0x686C6169, 0x6963665D, 0x70676D6F, 0x7879706F,
+ 0x70787970, 0x786F7879, 0x6F706777, 0x776D6F69,
+ 0x7D777B7D, 0x7B7D777B, 0x757C7C76, 0x7B767B7B,
+ 0x7D7A757E, 0x737D7B73, 0x7C737D7B, 0x7B7C737B,
+ 0x787B7D77, 0x7C787B7C, 0x7B7C787B, 0x74757974,
+ 0x79747579, 0x82837F75, 0x797C7A79, 0x7A797C7A,
+ 0x7B79787C, 0x74777874, 0x79747579, 0x75797475,
+ 0x6C797D78, 0x7B776D71, 0x7D7C787A, 0x787F7C78,
+ 0x706D807B, 0x74716C75, 0x72787872, 0x504C7878,
+ 0x0001004F, 0x00000000, 0x00000000, 0x2A262502,
+ 0x57605B58, 0x6B64605C, 0x78736A71, 0x757E7C72,
+ 0x81768280, 0x83817683, 0x76868577, 0x8D7F8584,
+ 0x8584768E, 0x78827F71, 0x83748A87, 0x86837486,
+ 0x778A8477, 0x84798885, 0x86857788, 0x707F7E70,
+ 0x7F717F80, 0x57574B80, 0x4A525048, 0x514B5050,
+ 0x36363051, 0x49464640, 0x594F4F4F, 0x64645858,
+ 0x5D646458, 0x6F646969, 0x706E6371, 0x69727163,
+ 0x776B7877, 0x62625677, 0x2545443A, 0x01002F2D,
+ 0x00020000, 0xA1393D38, 0xA89EA3A7, 0xA1A99FA0,
+ 0x9A9EA39A, 0xA69D9EA3, 0xA4A9A0A1, 0x9AA1A39D,
+ 0xA7A19EA0, 0xA6A8A2A5, 0xA6AAACA6, 0xC4BFA9AA,
+ 0xC0C4BFC0, 0xB7B8BFB8, 0xBDB8B6BE, 0xB7BDB8B7,
+ 0xB8BABEB9, 0xBFBDB9BD, 0xBBBCBABE, 0xB9B8BBB9,
+ 0xBCB7B8BB, 0xB6BCB7B8, 0xB8B7BDB8, 0xBCBAB7BD,
+ 0xB7BCBAB7, 0xB9B8BDBB, 0xBBB6B8BE, 0xB5BBB6B5,
+ 0xB8B7BCBA, 0xB9B7B5BA, 0xB5BAB8B4, 0xB6B4B9B7,
+ 0xB8B6B3B8, 0xB3B8B6B3, 0xB5B4BAB5, 0xBAB5B4BA,
+ 0xB6BAB5B6, 0xB7B7BBB6, 0xBBB6B8BC, 0xB7BBB6B7,
+ 0xB7B6BCB7, 0xBBB6B6BC, 0xB8BCB7B7, 0xC0C0C0C0,
+ 0x8080C0C0, 0x00000080, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090605,
+ 0xA9ACB006, 0xC0BDC2C3, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xB8C0BFB8, 0xC1BBC1C0,
+ 0xC0BFBCC2, 0xB8C0BFB8, 0xC3BAC2C2, 0xC0C0BBC3,
+ 0xB8C0C0B8, 0xC2BBC3C3, 0xC2C2BAC2, 0xBAC2C2BA,
+ 0xC3B8BFC2, 0xBFC2B9C0, 0xB8BDC0BA, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xBEB8C0C0, 0xBFBEB7BF, 0xB9BFBEB9,
+ 0xBCB8BDBC, 0xBFBDB8BD, 0xB8BDBBBA, 0xBCBABCBC,
+ 0xBCBCBABC, 0xBEC1BFBA, 0xA7B9BCBA, 0xA49FA8AC,
+ 0x9EA49FA0, 0x9EA1A8A1, 0xA49D9DA5, 0x9CA49A9D,
+ 0x9AA0A59C, 0xA39A9EA3, 0x9EA297A0, 0x98A0A499,
+ 0xA499A0A4, 0xA0A39AA0, 0x001A1B17, 0x00000001,
+ 0x01010100, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00010000, 0x7A2F2E2A,
+ 0x81788080, 0x80817880, 0x77808177, 0x81788081,
+ 0x86877E80, 0x7F85867C, 0x877E8889, 0x83847B86,
+ 0x7E88897F, 0x877D8788, 0x87887E86, 0x8081847B,
+ 0x857C8689, 0x83847B84, 0x7D87887F, 0x867D8586,
+ 0x85867D85, 0x7E84877E, 0x8C838487, 0x8A8B818B,
+ 0x7B88897F, 0x897F8485, 0x86877E88, 0x7E83847B,
+ 0x80778687, 0x83847A7F, 0x7A83847A, 0x7B718384,
+ 0x7E7D737C, 0x7479776F, 0x78707E7C, 0x7A78707A,
+ 0x6C7B7971, 0x746F7674, 0x76736E77, 0x60716F67,
+ 0x69606869, 0x62635A68, 0x485D5C52, 0x3C365352,
+ 0x3A3B373C, 0x634D4C48, 0x817D6867, 0x989C9782,
+ 0xB6A3AAA3, 0xB3ADB6BD, 0xB9BDB7AF, 0xB0B8BAB4,
+ 0xBBB2B6B9, 0xBABCB6B8, 0xBBBCBDB9, 0xBEBCBABD,
+ 0xBCBFBDBB, 0xBBBABDBB, 0xBFBDBABD, 0xBCBFBDBC,
+ 0xBCBCBFBD, 0xBEBCBBBE, 0xBABFBDBB, 0xBDBABFBD,
+ 0xC0BEB9C0, 0xBAC1BEBB, 0xB8BAC0BF, 0xBCBBB4BB,
+ 0xB8BDBCB7, 0xBDBABFC2, 0xAAB9B2B5, 0xA8A2B5AD,
+ 0xB8AA9EBA, 0x98B8A598, 0xA798B8A7, 0xB6A798B8,
+ 0x9BB7A697, 0xABA0BAA9, 0xC1AEA3BD, 0xA7C1B2A7,
+ 0xAEA2C0B2, 0xBAA496B8, 0x96BAA496, 0xA395B9A4,
+ 0xB7A494B6, 0x93B8A695, 0xA594B9A5, 0xB9A594B9,
+ 0x95B7A594, 0xA695B7A6, 0xB9A493B8, 0x95B7A594,
+ 0xA797B9A5, 0xB9A597B9, 0x97BBA597, 0xA597BBA5,
+ 0xBDA896BD, 0x96BDA896, 0xA594B9A8, 0xBAA795BA,
+ 0x95BAA695, 0xA695BAA6, 0xB6A595B7, 0x93B8A494,
+ 0xA294B8A4, 0xBCA596BC, 0x96BCA596, 0xA395B9A5,
+ 0xBAA599B7, 0x9FBAA89F, 0xA89FB9A8, 0xB7A89FB9,
+ 0x96B4A59C, 0xA597B9A2, 0xB9A294B6, 0x95B9A395,
+ 0xA294B6A3, 0xB8A496B8, 0x93B9A297, 0xA194BAA0,
+ 0xB6A094B8, 0x97B7A095, 0xA497B7A2, 0xB6A496B8,
+ 0x94B9A494, 0xA594B9A5, 0xB6A594B9, 0x93B8A494,
+ 0xA395B7A4, 0xB7A294B6, 0x96B8A395, 0xA496B8A4,
+ 0xB7A595B7, 0x95B7A595, 0xA594B9A5, 0xB8A594B9,
+ 0x93B8A493, 0xA395B7A4, 0xB7A297B7, 0x99B9A297,
+ 0xA194B4A4, 0xB8A797B9, 0x97B6A798, 0xA69DB2A6,
+ 0xBEB0ACB7, 0xBFBCB9BD, 0xB8BFBCB8, 0xB9B6BBB9,
+ 0xBAB7B6BB, 0xB4BBB8B3, 0xB8B6BBB9, 0xB7B7B7BA,
+ 0xB6B8B8B5, 0xB2B3B8B6, 0xB8B6AFB4, 0xB3B9B4B3,
+ 0xB7B3B8B6, 0xB8B6B4B9, 0xB5B8B6B5, 0xB7B9BAB8,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB6BABBB7, 0xBDB4BABC,
+ 0xB6BBB2B8, 0xA9A8AFA8, 0xB0A9A9B0, 0x9DA59BA9,
+ 0x62798177, 0x413B646C, 0x3F413B3F, 0x48484940,
+ 0x58505051, 0x5A58505A, 0x5E5F5D55, 0x675D6667,
+ 0x6A6B6166, 0x6C73746B, 0x756C7272, 0x73746A74,
+ 0x7273746A, 0x7C72797D, 0x7273697B, 0x6873746B,
+ 0x776E7071, 0x76776E76, 0x74787970, 0x7E757C7D,
+ 0x7D7E757D, 0x727B7B75, 0x81787878, 0x7B7C7380,
+ 0x76787B72, 0x756F7A7C, 0x797B7573, 0x767A7C76,
+ 0x7B777A7C, 0x7A7B777A, 0x767B7A76, 0x7D797B7A,
+ 0x7B7A7680, 0x747C7B77, 0x76727778, 0x797A7675,
+ 0x70787975, 0x7B777374, 0x7D7C787C, 0x757C7975,
+ 0x78747C79, 0x7A7A747B, 0x72787872, 0x2C2B7878,
+ 0x0A08082E, 0x00000000, 0x00000000, 0x27242002,
+ 0x525E5A55, 0x6D62605B, 0x76746971, 0x727A796F,
+ 0x7D717D7C, 0x7E7C717D, 0x7A807F71, 0x968C8988,
+ 0x89877D98, 0x737E7A6F, 0x7E73847E, 0x827E7382,
+ 0x717F7B70, 0x7D72807C, 0x7E7D6F81, 0x69787769,
+ 0x5F547877, 0x605F5561, 0x383F3C37, 0x15113D3C,
+ 0x3F3C3818, 0x47484541, 0x584E4F4C, 0x5F5F5359,
+ 0x5D656559, 0x6C626969, 0x7272666D, 0x70717165,
+ 0x71657C7C, 0x5D5D5171, 0x25424137, 0x01002B2B,
+ 0x00010000, 0xA17A7D74, 0xACA1A8AC, 0xA6ACA1A6,
+ 0xA1A8ACA1, 0xACA1A8AC, 0xA6ABA2A6, 0xA3A4A8A2,
+ 0xA7A2A4A8, 0xA4A8A3A3, 0xA3A4A8A3, 0xBBB7A4A8,
+ 0xB8BCB7BA, 0xB6BABEB8, 0xBEB9B6BD, 0xB6BCB7BA,
+ 0xB8B9C0B9, 0xBDB8B8BF, 0xBABEB9B9, 0xBBBCBDBB,
+ 0xBDBBBCBD, 0xBABDBBBC, 0xB7B8BEB9, 0xBDB8B6BC,
+ 0xB7BDB8B7, 0xB7B8BCB7, 0xB9B4B8BC, 0xB8BCB7B5,
+ 0xB6B8BEB9, 0xBEB9B5BB, 0xBABEB9BA, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB5B6BDB6, 0xBCB5B5BC,
+ 0xB6BDB6B5, 0xB3B5BCB5, 0xB9B3B5B9, 0xB7BBB5B5,
+ 0xB5B5BCB5, 0xB9B4B4BC, 0xB5B9B4B3, 0xC0C0C0C0,
+ 0x8080C0C0, 0x01010180, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090605,
+ 0xA9ACB006, 0xC0BDC2C3, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xB8C0BFB8, 0xC0BBC1C0,
+ 0xC0BFBBC1, 0xB7BFBEBA, 0xC0B9C1C1, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC2BAC2C2, 0xC3C3BAC2, 0xBAC2C2BB,
+ 0xC2B8BFC2, 0xBFC2B8BF, 0xB9BEBFBA, 0xC0B8C0C0,
+ 0xBFBFB8C0, 0xB8C0C0B7, 0xBFB8C0C0, 0xC0C0B7BF,
+ 0xB7BFBFB8, 0xC0B8C0C0, 0xBFBEB8C0, 0xB9BFBEB9,
+ 0xBCBBC0BF, 0xBCBAB8BD, 0xB8BDBCB7, 0xBDB9BBBB,
+ 0xBCBCBCBB, 0xC1C2C0BC, 0xA6B8BCB7, 0xA49FA7AB,
+ 0x9EA49FA0, 0x9EA0A8A1, 0xAAA09FA8, 0xA0A69BA2,
+ 0x9BA0A59C, 0xA1989FA4, 0xA0A4999E, 0x989FA398,
+ 0xA499A0A4, 0xA1A49BA0, 0x00191A16, 0x00000001,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x7A302E2D,
+ 0x807A7F7E, 0x80817880, 0x76808177, 0x857C7F80,
+ 0x80817884, 0x7D87887E, 0x847B8687, 0x86877E83,
+ 0x7F88897F, 0x847A8889, 0x85867C83, 0x80888980,
+ 0x89838689, 0x87878189, 0x7B83847B, 0x887F8384,
+ 0x88898087, 0x7E84877E, 0x847A8487, 0x83847A83,
+ 0x7B88897F, 0x877D8485, 0x85867C86, 0x7C84857C,
+ 0x81788485, 0x83847A80, 0x7A848379, 0x80768584,
+ 0x82807682, 0x7384827A, 0x7C747D7B, 0x7E7C747E,
+ 0x717F7D75, 0x78737B79, 0x7B78737B, 0x6777756D,
+ 0x6862716F, 0x67685F68, 0x485D5C52, 0x46425352,
+ 0x3A3B3747, 0x624E4D49, 0x807C6766, 0x9B9C9881,
+ 0xB6A3AAA3, 0xBCB6B5BD, 0xBABCB6B8, 0xB2B8BBB2,
+ 0xBAB1B8BB, 0xB8BAB4B9, 0xBBBCBDB9, 0xBCBCBABD,
+ 0xBABCBCBA, 0xBBBABDBB, 0xBCBABABD, 0xBBBEBCB9,
+ 0xBBBDC1BC, 0xBFBDBCC0, 0xBEC1BFBC, 0xBEBBC0BF,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBAB8BDBB, 0xBDBBB7BC,
+ 0xB8BEBDB8, 0xC3B9C0C3, 0xB4BEB8BE, 0xAEABBAB3,
+ 0xBBB0A8BF, 0x9EBDAB9F, 0xA798B7AD, 0xB8AA9AB9,
+ 0x9DB7AA9C, 0xAA9FB9A8, 0xBBAFA4BE, 0x9EBAAB9F,
+ 0xA599B7AC, 0xB5A193B5, 0x95B79F94, 0xA193B5A3,
+ 0xB8A595B7, 0x96BBA696, 0xA796BBA7, 0xBBA796BB,
+ 0x97B9A796, 0xA897B9A8, 0xBBA796BB, 0x96BBA796,
+ 0xA797B9A7, 0xB9A597B9, 0x97BBA597, 0xA597BBA5,
+ 0xBDA997BE, 0x96BDA896, 0xA996BDA9, 0xBBA896BB,
+ 0x94BBA896, 0xA695BAA6, 0xB7A595B7, 0x93B8A595,
+ 0xA492B9A4, 0xBCA697BD, 0x96BCA596, 0xA597BBA5,
+ 0xB8A095B5, 0x9BB7A49A, 0xAA9EBAA7, 0xB1A89FBA,
+ 0x95B59F96, 0xA398B9A0, 0xB9A294B6, 0x95B9A395,
+ 0xA294B8A3, 0xB89F94B5, 0x92B8A094, 0xA295BB9F,
+ 0xB6A094B8, 0x97B7A095, 0xA295B5A2, 0xB6A595B7,
+ 0x93B8A494, 0xA493B8A4, 0xB6A494B6, 0x94B6A494,
+ 0xA494B6A4, 0xB7A294B6, 0x97B7A395, 0xA396B6A4,
+ 0xB7A494B6, 0x97B9A595, 0xA595B7A7, 0xB8A594B9,
+ 0x95B7A493, 0xA596B6A5, 0xB9A699B9, 0x97B7A499,
+ 0xA497B7A2, 0xB4A697B7, 0x9AB2A798, 0xADA6B5A8,
+ 0xBBBBBDBE, 0xBAB5BAC0, 0xB7BEB9B3, 0xB7B5BAB8,
+ 0xBCB9B4B9, 0xB6BCB7B5, 0xB8B5BAB8, 0xB8B8B7BA,
+ 0xB6BBBAB6, 0xB2B2B7B5, 0xB4B2AFB4, 0xB2B7B5AF,
+ 0xB6B3B8B6, 0xB4B2B3B8, 0xB5B8B6B1, 0xB7B9BCBA,
+ 0xBAB5B8BC, 0xB8BCB7B6, 0xB7B9BAB6, 0xB9B3BBBD,
+ 0xB4B9B0B5, 0xA8A9B0A9, 0xB0A9A7AF, 0x969D96A9,
+ 0x4C788177, 0x40374E56, 0x3E403A3D, 0x47484940,
+ 0x58504F50, 0x6260585A, 0x58636159, 0x675D6260,
+ 0x6B6C6266, 0x6B72726C, 0x736B7374, 0x73746A75,
+ 0x7274786D, 0x8278797D, 0x7B7C7281, 0x6A7B7C72,
+ 0x7B727374, 0x76776E7A, 0x73797A71, 0x81787B7C,
+ 0x7C7D7480, 0x777D7D77, 0x7D747D7D, 0x7B7C737C,
+ 0x6C808178, 0x71687275, 0x797C736E, 0x757A7C76,
+ 0x7874797B, 0x7B7C7877, 0x767B7A76, 0x7A767B7A,
+ 0x7B7A767D, 0x757D7C78, 0x7A74797B, 0x797B7578,
+ 0x74797A76, 0x77737778, 0x75747076, 0x7275726E,
+ 0x77737976, 0x7A7A747A, 0x72787970, 0x08077878,
+ 0x0907070A, 0x00000000, 0x00000000, 0x28252104,
+ 0x51605A53, 0x6D5F605C, 0x76756770, 0x717C7C70,
+ 0x7D717B7D, 0x7F7F717D, 0x7A807F71, 0x968C8988,
+ 0x89877D98, 0x73827E73, 0x7C73827E, 0x827E7381,
+ 0x72807C71, 0x7B70817D, 0x7F7E707D, 0x5179786A,
+ 0x5E54605F, 0x47453D60, 0x11403D39, 0x15111615,
+ 0x3F3C3818, 0x4746433F, 0x564B4F4C, 0x61605258,
+ 0x5D666459, 0x6C626969, 0x6D6C626D, 0x70717165,
+ 0x71657C7C, 0x5D5C5271, 0x25404138, 0x01002B2B,
+ 0x00010000, 0xA07A7D74, 0xACA0A8AC, 0xA7AB9FA8,
+ 0xA1A8ACA1, 0xACA1A8AC, 0xA6ABA2A6, 0xA2A4A8A2,
+ 0xBDB8A3A7, 0xB8BCB7B9, 0xB8B8BCB7, 0xBAB6BBBC,
+ 0xBABBB7B9, 0xB7B8BCB6, 0xBFBAB9BD, 0xB9BDB8BB,
+ 0xB7B6BDB6, 0xBCB7B7BE, 0xB8BCB7B6, 0xBBBBBFBA,
+ 0xBBB9BCBD, 0xBABDBBBA, 0xB8B9BCBA, 0xBDB8B7BD,
+ 0xB7BDB8B7, 0xB7B8BCB7, 0xB6B1B8BC, 0xB3B7B2B2,
+ 0xB5B5BCB5, 0xBEB9B5BC, 0xBABEB9BA, 0xB6B8BCB7,
+ 0xBCB7B7BB, 0xB8BCB7B8, 0xB6B6BDB6, 0xBCB5B6BD,
+ 0xB6BDB6B5, 0xB6B6BDB6, 0xBCB6B6BD, 0xB8BCB6B8,
+ 0xB5B7BEB7, 0xB9B4B4BC, 0xB4BAB5B3, 0xC0C0C1BF,
+ 0x8181C0C0, 0x00000081, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090605,
+ 0xA9ACB006, 0xC0BEC3C4, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xC0BCC1C0,
+ 0xC0BFBBC1, 0xBAC0BFBA, 0xC0BCC1C2, 0xC0C0BABF,
+ 0xB7BFBFB8, 0xC2BABFC0, 0xC1C2BCC1, 0xBCC1C2BC,
+ 0xC0B9C1C1, 0xC0C1B8C0, 0xBABFC0BB, 0xBFB8C0C0,
+ 0xBEBDB8C0, 0xB8C0BFB6, 0xBFBBC1C0, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBEBAC0BF, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xC0BFB9BF, 0xB8BDBCBA, 0xBBBBBDBD,
+ 0xC1C1BBBB, 0xBBBCBAC3, 0x9EB1B5B0, 0xA49FA0A4,
+ 0x9FA5A0A0, 0x9FA0A8A1, 0xA99FA0A9, 0xA0A69BA1,
+ 0x9AA0A39A, 0xA198A0A3, 0xA0A4999E, 0x98A0A499,
+ 0xA499A0A4, 0xA0A39AA0, 0x001A1B17, 0x01000001,
+ 0x00010000, 0x00000000, 0x01000000, 0x01020000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x55080606,
+ 0x807A5856, 0x80817880, 0x7B808178, 0x847B8384,
+ 0x80817883, 0x7B828379, 0x857C8485, 0x86877E84,
+ 0x7A83847B, 0x897F8283, 0x84857B8A, 0x7A85867D,
+ 0x867D8283, 0x88898085, 0x7C84857C, 0x867D8485,
+ 0x88898085, 0x7A83847A, 0x877D8384, 0x8B8C8286,
+ 0x7F86877D, 0x877D8889, 0x88897F86, 0x7B888980,
+ 0x867D8384, 0x82837A85, 0x7B85837B, 0x847A8685,
+ 0x85847A85, 0x7B84827A, 0x807B8380, 0x7F7B7684,
+ 0x6E807C77, 0x736E7773, 0x78746F77, 0x67716F67,
+ 0x6960716F, 0x6A686068, 0x485D5B51, 0x47415452,
+ 0x3A3B3747, 0x624D4C48, 0x827E6868, 0x989C9781,
+ 0xAD979F98, 0xBDB6ACB4, 0xB8BCB6B6, 0xB4B8BDB4,
+ 0xBFB6B8BD, 0xB6BAB4BC, 0xB8B8BCB7, 0xBBB9B7BA,
+ 0xB9BEBCB8, 0xB8B9BCBA, 0xBDBBB7BA, 0xBCBFBDBA,
+ 0xBEC0C1BF, 0xBFBDBFC0, 0xBCBFBDBC, 0xBBB8BDBB,
+ 0xBEBBB8BD, 0xB7BEBBB7, 0xBEB9BFBE, 0xC0BFB9BF,
+ 0xB9BEBFBA, 0xC3B8C0C0, 0xC0C3B9C0, 0xBBBDC5BB,
+ 0xBEB3B0C0, 0xA0BAAFA7, 0xAB9FBBAB, 0xB9AC9EBA,
+ 0xA0BAAA9F, 0xAA9EBAAB, 0xB8AD9EBD, 0x96B7A798,
+ 0xA798B8A7, 0xB7A396B6, 0x97B7A497, 0xA497B7A4,
+ 0xBBA597B9, 0x97BBA597, 0xA597BBA5, 0xBBA597BB,
+ 0x96BBA796, 0xA796BBA7, 0xBCA596BC, 0x96BCA596,
+ 0xA597BBA5, 0xBBA597BB, 0x96BCA597, 0xA495BBA5,
+ 0xBEAA9CC0, 0x97BCA89A, 0xA897BCA8, 0xBAA795BA,
+ 0x95BAA795, 0xA796BBA6, 0xB9A897B9, 0x94B9A897,
+ 0xA395B9A5, 0xBCA599BD, 0x97BBA498, 0xA499BAA3,
+ 0xB89F94B5, 0x9BB9A398, 0xA69AB8A7, 0xB4A69CBA,
+ 0x94B4A096, 0xA499BA9F, 0xB7A294B6, 0x95B9A395,
+ 0xA294B8A3, 0xB8A095B6, 0x93B9A094, 0xA597BBA2,
+ 0xB7A297B8, 0x9AB8A297, 0xA497B7A6, 0xB6A595B7,
+ 0x93B8A494, 0xA493B8A4, 0xB8A593B8, 0x93B8A593,
+ 0xA494B6A4, 0xB7A395B7, 0x97B9A497, 0xA395B7A5,
+ 0xB9A291B6, 0x95B7A594, 0xA496B8A3, 0xB7A393B5,
+ 0x97B9A595, 0xA798B8A8, 0xB9A598B8, 0x96B6A699,
+ 0xA69AB8A3, 0xB3A798B7, 0xA6B3A89B, 0xBAB9BDAF,
+ 0xBBB9BEBC, 0xBFBAB9C0, 0xB3B8B6B9, 0xB7B5BAB9,
+ 0xB9B7B4B9, 0xB5BAB8B4, 0xB7B5BBB6, 0xBCBAB6BC,
+ 0xB5BAB8B7, 0xB6B4B9B7, 0xB0AFB3B8, 0xB3B9B8AB,
+ 0xB1B2B9B6, 0xB4B2ADB4, 0xB3B8B6AF, 0xB6B5BBB6,
+ 0xB9B4B5BB, 0xB8BCB7B5, 0xB6B8BCB7, 0xB9B3B8BC,
+ 0xB2B7AEB7, 0xA9A9B0A9, 0xAFAAA8B0, 0x959D96A8,
+ 0x4C798177, 0x40374E56, 0x4041383D, 0x48484940,
+ 0x59505051, 0x61625958, 0x57616259, 0x675D6061,
+ 0x66675D66, 0x6B6D6D67, 0x746B7374, 0x73746A73,
+ 0x78797D72, 0x80777F83, 0x7B7C737F, 0x717A7B71,
+ 0x776C7A7B, 0x74786D73, 0x74787C71, 0x82777B7F,
+ 0x7B7F747E, 0x75797C73, 0x81787D7E, 0x807E7680,
+ 0x747D7B73, 0x7C737C7D, 0x7C7D747B, 0x75797B75,
+ 0x7C76797B, 0x797B757A, 0x797B7A76, 0x7F797E7D,
+ 0x7F7F797F, 0x757D7D77, 0x7A74797B, 0x787C7678,
+ 0x73797D78, 0x77717478, 0x797B7573, 0x757F7C78,
+ 0x78757D78, 0x7F7C777D, 0x70787970, 0x08067879,
+ 0x09090907, 0x00000001, 0x00000000, 0x26231F04,
+ 0x51605B52, 0x6C5E605C, 0x7675676F, 0x717D7D6F,
+ 0x7F717F7F, 0x7F7F717F, 0x71807F71, 0x887A807F,
+ 0x807E7389, 0x717B7A6C, 0x7A6F807F, 0x7C7A6F7C,
+ 0x6F807C71, 0x7567807D, 0x706F6176, 0x54616052,
+ 0x463E615F, 0x47443F49, 0x002B2824, 0x14130200,
+ 0x3E3A3918, 0x45494441, 0x574C504D, 0x5F5E505B,
+ 0x5E666459, 0x6D616A6A, 0x6B6D616D, 0x656F7165,
+ 0x72667171, 0x5D5C5272, 0x25404138, 0x01002B2B,
+ 0x02010003, 0xA17C7D74, 0xACA1AAAB, 0xA8ACA1A8,
+ 0xA1A8ABA2, 0xABA2A7AA, 0xA8ABA2A8, 0xA3A6A8A2,
+ 0xA8A2A6A7, 0xA6A8A2A6, 0xA3A6A8A2, 0xBBB7A6A7,
+ 0xBABBB7BA, 0xB6B8BCB6, 0xBDB8B8BC, 0xB8BCB7B9,
+ 0xB7B7BEB7, 0xBDB8B7BE, 0xB6BCB7B7, 0xB7B1B7B2,
+ 0xBEB9B8BC, 0xBABDBBBA, 0xBAB7BAB8, 0xBCBAB9BC,
+ 0xB9BCBAB9, 0xB7B8BCB7, 0xB7B1B8BC, 0xB3B7B1B5,
+ 0xB1B1B8B1, 0xB8B1B1B8, 0xB5BCB5B1, 0xB1B5BCB5,
+ 0xBBB6B1B8, 0xB3B9B4B5, 0xB7B5BBB6, 0xBCB7B6BC,
+ 0xB8BCB7B8, 0xB7B5BBB6, 0xBCB7B6BC, 0xB7BBB6B8,
+ 0xB6B5BCB5, 0xBBB4B5BD, 0xB6BCB7B4, 0xBEC1C2C0,
+ 0x8080BFC0, 0x00000080, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090605,
+ 0xA9ACB006, 0xC0BDC2C3, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xB9BFBEBA, 0xC0BBC0BF,
+ 0xC1C0BCC1, 0xBBC1C0BB, 0xC0BABFC0, 0xC0C0BABF,
+ 0xB8C0C0B8, 0xC2BCC1C2, 0xC0C1BCC1, 0xBCC1C2BB,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA, 0xBFB8C0BF,
+ 0xBFBEB8C0, 0xB8C0BFB7, 0xBDB9BFBE, 0xBDBCB8BE,
+ 0xB7BDBCB7, 0xBCB7BDBC, 0xBEBDB7BD, 0xB9BFBEB8,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBEB9, 0xBBB9BBBB,
+ 0xBDBBBCBD, 0xB7B8B6BC, 0x9EA1A29E, 0xADA7A0A4,
+ 0xA0A49EA9, 0x9EA0A8A1, 0xA59C9DA5, 0xA0A69BA0,
+ 0x99A0A499, 0xA198A0A4, 0xA1A59A9E, 0x98A0A498,
+ 0xA499A0A4, 0x6E7168A0, 0x00000100, 0x02000001,
+ 0x00010001, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x56080606,
+ 0x807A5957, 0x80817880, 0x78808178, 0x81788081,
+ 0x84857C80, 0x7984857B, 0x857C8283, 0x84857C84,
+ 0x7E898A81, 0x877D8687, 0x8B8A8088, 0x7B84857C,
+ 0x867D8384, 0x84857C85, 0x80898A81, 0x877E8889,
+ 0x83847B86, 0x7A83847A, 0x82788384, 0x82837981,
+ 0x7D83847A, 0x857B8687, 0x84857B84, 0x7D85867D,
+ 0x877E8383, 0x85867D86, 0x7B84827A, 0x847A8583,
+ 0x85837B85, 0x7B87857D, 0x807B8380, 0x7F7B7684,
+ 0x767F7C77, 0x78737E7B, 0x7270687B, 0x67727068,
+ 0x7067716F, 0x69685E6F, 0x495E5C51, 0x47415553,
+ 0x3B3D3747, 0x624D4D47, 0x817D6868, 0x989C9780,
+ 0xA399A099, 0xBDB6A3AA, 0xB7BBB5B6, 0xB5B6BAB4,
+ 0xBFB9B9BE, 0xB8BCB6BB, 0xBBB9BDB8, 0xBAB8BABD,
+ 0xB8BDBBB5, 0xBABCBFBD, 0xBEBCB9BC, 0xBCBFBDBB,
+ 0xBBBABDBB, 0xBDBBBABD, 0xBABDBBBA, 0xBBB7BCBA,
+ 0xBDBBB8BD, 0xB7BEBBB8, 0xBEBAC0BF, 0xBFC0B9BF,
+ 0xBABFC0BA, 0xBFB9C1C1, 0xBFC0B7BF, 0xBCBFC3BA,
+ 0xBAB1B1BD, 0xA8BDADAA, 0xABA1B8AF, 0xB7AAA0B7,
+ 0x9CB6A89D, 0xA89CB8A7, 0xB9A798B8, 0x98BAA897,
+ 0xA897B9A9, 0xB8A697B7, 0x98B8A598, 0xA396B6A5,
+ 0xBAA698BA, 0x97BBA496, 0xA597BBA5, 0xBBA597BB,
+ 0x96BBA597, 0xA597BBA7, 0xBCA596BC, 0x96BCA396,
+ 0xA596BCA5, 0xBBA496BA, 0x96BCA597, 0xA597BBA5,
+ 0xBCA89ABE, 0x97BCA698, 0xA897BCA8, 0xBBA795BA,
+ 0x95BAA796, 0xA797B9A6, 0xB8A797B9, 0x95B7A798,
+ 0xA294B8A5, 0xB9A397BB, 0x97B8A398, 0xA297B8A2,
+ 0xB6A094B8, 0x98B8A095, 0xA79BB9A5, 0xB8A49AB8,
+ 0x95B5A49A, 0xA398B9A0, 0xB7A496B8, 0x95B9A395,
+ 0xA294B8A3, 0xB8A496B8, 0x93B9A294, 0xA496BAA2,
+ 0xB7A497B7, 0x9DB9A79B, 0xA89CBAA9, 0xB6A597B9,
+ 0x94B8A294, 0xA594B9A2, 0xB9A796BB, 0x93B8A694,
+ 0xA595B7A4, 0xB7A496B8, 0x96B8A497, 0xA294B6A4,
+ 0xB9A294B8, 0x97BBA395, 0xA294B6A5, 0xB8A595B7,
+ 0x97B8A798, 0xA798B7A8, 0xB8A69AB8, 0x9AB6A69A,
+ 0xA89CB8A6, 0xB6A59AB4, 0xB9BDADA5, 0xB9BCBABA,
+ 0xBAB9BFBA, 0xBAB5B8BF, 0xB5BAB8B4, 0xB8B3B8B7,
+ 0xBAB8B5BA, 0xB5BAB8B5, 0xB8B6BBB9, 0xBBB8B5BA,
+ 0xB3B8B6B4, 0xB7B3B8B6, 0xB0AFB4B9, 0xAEB4B3AA,
+ 0xB2B2B8B7, 0xB8B6AEB5, 0xB7BCBAB3, 0xB2B7BEB7,
+ 0xBBB6B2B9, 0xB8BCB7B7, 0xB7B8BCB7, 0xB8B2B8BC,
+ 0xAEB3AAB6, 0xA9A3AAA3, 0xAFAAA9B0, 0x979E97A9,
+ 0x4C7A817A, 0x41385055, 0x4041383E, 0x49484940,
+ 0x59505152, 0x5F605758, 0x5D66675D, 0x665C6667,
+ 0x66675E65, 0x65686960, 0x6D636D6E, 0x73746A6C,
+ 0x6D73776C, 0x81787478, 0x80817880, 0x71797A70,
+ 0x786D7A7B, 0x787C7174, 0x75797D72, 0x7E737C80,
+ 0x797D727A, 0x7375786F, 0x7D74797C, 0x7B7C737C,
+ 0x7377756D, 0x81787B7C, 0x7B7C7380, 0x75797973,
+ 0x7973797B, 0x7B7B7579, 0x757C7B77, 0x7B757A79,
+ 0x7A7A747B, 0x75777973, 0x786F797B, 0x75797375,
+ 0x74767A75, 0x78727579, 0x797B7574, 0x757F7C78,
+ 0x7B787D78, 0x7F7C7780, 0x72787970, 0x09077878,
+ 0x08080808, 0x00000001, 0x00000000, 0x27242004,
+ 0x5A605A53, 0x6D5F6965, 0x77746670, 0x6F7D7C6E,
+ 0x7D6F7D7D, 0x7D7E6E7D, 0x70808070, 0x7F718080,
+ 0x807F7180, 0x6C7C7C6C, 0x7B6D7C7C, 0x7D7C6E7C,
+ 0x67807D6F, 0x6F617976, 0x69685A70, 0x3C615F54,
+ 0x45404746, 0x2F2C2848, 0x00020000, 0x14130200,
+ 0x3F3B3A18, 0x4546433F, 0x574D504D, 0x605E5359,
+ 0x5D666459, 0x695D6969, 0x6B6D6169, 0x64717165,
+ 0x70657070, 0x5E5C5272, 0x26423F3A, 0x00002B2A,
+ 0x03010002, 0x1820201A, 0x21182021, 0x1E21181E,
+ 0x1B20231A, 0x22192124, 0x4E51481F, 0x7A7D7F79,
+ 0x807A7E80, 0x7E807A7E, 0x7A7E807A, 0x938F7E80,
+ 0xB8BCB792, 0xB8BEC2BC, 0xBDB6BABE, 0xB8BFB8B6,
+ 0xB7B7BEB7, 0xBDB8B7BE, 0xB5BBB6B7, 0xB5B9C0B9,
+ 0xBAB5B5BC, 0xBBBFBAB6, 0xB9BABDBB, 0xBBB9B8BB,
+ 0xB7BAB8B8, 0xB3B8BCB7, 0xB7B1B4B8, 0xB8BCB6B5,
+ 0xB9B8BFB8, 0xBCB5B9C0, 0xB5BCB5B5, 0xB5B6BDB6,
+ 0xBBB6B5BC, 0xB5BBB6B5, 0xB6B7BDB8, 0xBCB7B5BB,
+ 0xB9BDB8B8, 0xB6B6BCB7, 0xBAB8B5BB, 0xB8BCB7B7,
+ 0xB5B3BAB3, 0xBAB3B4BC, 0xB6BAB5B3, 0xBFC0C1BD,
+ 0x8080C0C1, 0x01010180, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090605,
+ 0xA9ACB006, 0xC0BDC2C3, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0BABFC0, 0xC0BFBABF, 0xBAC0BFBA, 0xC0BAC0BF,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xC0BAC2C2, 0xC1C2B8C0,
+ 0xB9BEBFBC, 0xC2BDC2C3, 0xC1C2BCC1, 0xBCC1C2BD,
+ 0xC2B8BFC2, 0xBDBEB8BF, 0xBABFC0B8, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xC0BABFC0, 0xBEBFBABF,
+ 0xBABFC0B9, 0xBFB9BEBF, 0xBDBCB9BE, 0xB8BDBCB8,
+ 0xBBB9BEBC, 0xBEBCB8BD, 0xBABFBDB9, 0xB7B9BCBA,
+ 0xC4BFB8BC, 0xA9AAA6C0, 0x9B9A9C96, 0xA9A09FA1,
+ 0xA6A9A0A6, 0x9DA2A9A2, 0xA49B9CA4, 0xA2A69B9F,
+ 0x96A1A59A, 0xA2979EA2, 0x9DA1959E, 0x91A0A498,
+ 0xA499999D, 0x8C8F86A0, 0x0010110F, 0x00000000,
+ 0x01010100, 0x01000001, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x55080606,
+ 0x807A5856, 0x80817880, 0x797F7F79, 0x81797F7F,
+ 0x82807883, 0x7A83847A, 0x867D8384, 0x83847B85,
+ 0x7F86877D, 0x88808889, 0x88867E8A, 0x7D87867C,
+ 0x897F8887, 0x88877D8A, 0x7B86857B, 0x857D8685,
+ 0x8B898187, 0x8185867D, 0x8980898A, 0x88898088,
+ 0x7B898A80, 0x867C8685, 0x85867C87, 0x7C83847B,
+ 0x867D8285, 0x83847B85, 0x7884857C, 0x847B8081,
+ 0x84857C83, 0x79828078, 0x827A8381, 0x807E7684,
+ 0x737D7E75, 0x7B727B7C, 0x7879707A, 0x6574756C,
+ 0x6E646E6F, 0x706F656D, 0x4E666459, 0x4B435A58,
+ 0x40403A4D, 0x523E3B36, 0x736D5858, 0x8C908A71,
+ 0x82868882, 0xAAA68688, 0xBABBB7A9, 0xB7B8BCB7,
+ 0xBFBAB7BE, 0xB6BCB7B9, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB9BABEB9, 0xBFBDBABE, 0xBBBEBCBC,
+ 0xBBBAC0BB, 0xC0BEBAC0, 0xBDC0BEBD, 0xBCBBBEBC,
+ 0xBEB9B9BE, 0xB8BEB9B8, 0xBEBBC0BE, 0xBFBEBBC0,
+ 0xBAC0BFBA, 0xC0B8C0BF, 0xC0BFB9C1, 0xBBBFC0BB,
+ 0xBAB5B8BD, 0xABB7B1B0, 0xB0A8B9AF, 0xB7A8A1B6,
+ 0x9FB6A8A0, 0xAA9FB9A7, 0xBCAB9CBB, 0x97B8AB9C,
+ 0xA998B9A8, 0xBAA797B9, 0x98BAA898, 0xA799BBA6,
+ 0xB9A796BB, 0x95BAA594, 0xA796BBA6, 0xBAA898BA,
+ 0x98BAA898, 0xA698BAA6, 0xBBA597BB, 0x97BBA597,
+ 0xA597BBA5, 0xBCA695BA, 0x96BBA897, 0xA897BCA7,
+ 0xB9A597BB, 0x97B9A597, 0xA597B9A5, 0xBBA796BB,
+ 0x96BBA796, 0xA597B9A7, 0xB7A597B9, 0x97B7A497,
+ 0xA294B6A4, 0xB8A196B7, 0x96B8A297, 0xA496B8A4,
+ 0xB8A193B7, 0x94B6A294, 0xA396B6A4, 0xB6A79DBB,
+ 0x98B8A298, 0xA398B8A3, 0xB7A196B7, 0x95B7A395,
+ 0xA494B6A5, 0xB9A796BB, 0x93BAA594, 0xA796BBA5,
+ 0xBCAC9DBC, 0xA1BBAFA2, 0xADA1BDAE, 0xB8A89ABC,
+ 0x93B9A094, 0x9F92B8A0, 0xB7A594B9, 0x91B6A392,
+ 0xA494B6A3, 0xB6A395B7, 0x95B7A396, 0xA395B7A5,
+ 0xBAA294B6, 0x97BBA296, 0xA294B8A3, 0xB9A798B8,
+ 0x99B8A99A, 0xA99BB7A8, 0xB9ABA0BA, 0xA0BAA89F,
+ 0xA8A1B6A9, 0xBAABA8B7, 0xBABAB4B4, 0xB6BCB7B8,
+ 0xB7B8BEB9, 0xBEB9B6BC, 0xB8BEB9B8, 0xB9B7BAB8,
+ 0xBBB9B8BB, 0xB6BBB9B8, 0xBAB7BCBA, 0xB8B6B6BD,
+ 0xB3B8B6B3, 0xB4B6BCB7, 0xB4B1B3B9, 0xAAB0AFAD,
+ 0xB5AAB0AF, 0xB6B5B0B6, 0xB4B9B7B1, 0xB3B3BAB3,
+ 0xBBB6B3BA, 0xB8BCB7B7, 0xB7B6BBB9, 0xB8B2B8BC,
+ 0xAFB1ABB6, 0xA6A8ACA7, 0xADA8A7AB, 0x8F938DA9,
+ 0x476A716A, 0x42374B50, 0x3F40363E, 0x47484940,
+ 0x5A514F50, 0x5F625957, 0x5D63675C, 0x675E6468,
+ 0x64675E64, 0x636B6C63, 0x6C626B6C, 0x6B6C626D,
+ 0x6D717569, 0x8277737A, 0x797D727E, 0x757C7D74,
+ 0x7C737D7E, 0x7B7C737B, 0x747D7E75, 0x7C737C7D,
+ 0x7B7E757B, 0x777B7E75, 0x7B727B80, 0x76797078,
+ 0x75797A71, 0x7A747D7E, 0x7B7B757A, 0x757B7B75,
+ 0x77727B7B, 0x7D7D777A, 0x767B7A76, 0x7D77797A,
+ 0x7A7C767B, 0x787B7B75, 0x7B757E7E, 0x797B757B,
+ 0x757A7B77, 0x79757879, 0x7C7B7778, 0x757F7C77,
+ 0x78737D7A, 0x7B7B757B, 0x73787872, 0x06067877,
+ 0x07040608, 0x00000000, 0x00000000, 0x27242004,
+ 0x53635D58, 0x6F64615C, 0x7B786A73, 0x6D7F7C6D,
+ 0x7D6D7D7D, 0x7D7D6B7D, 0x6B7D7D6B, 0x7D6D7D7D,
+ 0x7C7D6D7C, 0x687A7C69, 0x7C697A7C, 0x7475657A,
+ 0x60707060, 0x6F617070, 0x5E5C5172, 0x3A424038,
+ 0x2A264040, 0x0200002B, 0x00000100, 0x120E0001,
+ 0x39383413, 0x4845453F, 0x574F504D, 0x62615759,
+ 0x5B626157, 0x6B5F6665, 0x6A6A5E6B, 0x69767469,
+ 0x746A7674, 0x63615776, 0x204A4742, 0x00002524,
+ 0x00010002, 0x00010200, 0x01000001, 0x02020002,
+ 0x5522251C, 0x7C715C60, 0x767C7176, 0x72797E75,
+ 0x7B72767B, 0x787D7476, 0x7E787C76, 0x7C777F83,
+ 0x8D918C78, 0xAFB3B7B1, 0xBAB0B1B9, 0xB0B8B1B1,
+ 0xB6BAC1BA, 0xBBB5B5BB, 0xB7BBB5B7, 0xB6B9BDB8,
+ 0xBCB7B7BB, 0xB4BAB5B6, 0xB6B3B9B4, 0xBDB8B5BB,
+ 0xB7BBB6B7, 0xB2B8BCB7, 0xB4AFB5B6, 0xB8BCB7B0,
+ 0xB5B5BCB5, 0xBCB7B5BC, 0xB8BCB7B8, 0xB7B5B9B4,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB6B6BDB6, 0xBDB7B6BD,
+ 0xB7BBB6B9, 0xB8B8BCB7, 0xBBB7B9BD, 0xB3B7B2BA,
+ 0xB3AEB5AE, 0xBCB7B3BA, 0xB9BDB8B8, 0xBABEBFBB,
+ 0x7F7EBDBE, 0x02000081, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090605,
+ 0xA9ACB006, 0xC0BDC2C3, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0BABFC0, 0xC0BFBABF, 0xBAC0BFBA, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBBC1C0BB, 0xC0BAC2C2, 0xC1C2B8C0,
+ 0xBBC0C1BC, 0xC2BCC1C2, 0xC1C2BCC1, 0xBBC0C1BD,
+ 0xC2B8BFC2, 0xBDBEB8BF, 0xBABFC0B8, 0xBEB8C0BF,
+ 0xC0BFB7BF, 0xB8C0BFB8, 0xC0BBC0C1, 0xBEBFBABF,
+ 0xBABFC0B9, 0xBFB9BEBF, 0xBFBEB9BE, 0xBABFBEBA,
+ 0xBBB9BEBC, 0xBCBAB8BD, 0xB5BAB8B7, 0xB7B8BCB7,
+ 0xC3BDB8BC, 0xA8ACA6BF, 0x9B92948E, 0xA9A09FA1,
+ 0xA6A9A0A8, 0xA3A0A89E, 0xA49BA3AA, 0x9FA3989F,
+ 0x989EA296, 0xA599A0A4, 0x9EA296A1, 0x98A0A596,
+ 0xA499A0A4, 0x93968DA0, 0x00181917, 0x00000000,
+ 0x00000000, 0x01000001, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x56080606,
+ 0x807A5957, 0x81827980, 0x767F7F79, 0x81797C7C,
+ 0x84827A83, 0x7A83847A, 0x837A8384, 0x85867D82,
+ 0x7F86877D, 0x88808889, 0x8A88808A, 0x7D8A897F,
+ 0x877D8887, 0x88877D88, 0x7B87857B, 0x867E8785,
+ 0x86847C88, 0x7B888980, 0x827C8384, 0x85867D82,
+ 0x7F85847A, 0x8A808A89, 0x88877D8B, 0x7B85867D,
+ 0x867D8184, 0x85867D85, 0x7883847B, 0x837A8081,
+ 0x86877E82, 0x7582837A, 0x81797F7D, 0x7E7F7683,
+ 0x737C7D74, 0x7E757B7C, 0x797A717D, 0x6B75766C,
+ 0x756B7475, 0x76756B74, 0x4D666459, 0x4B435A58,
+ 0x3F40374D, 0x52403D38, 0x736D5858, 0x8A8E8871,
+ 0x82858781, 0xAAA68888, 0xBABBB7AB, 0xB8B8BCB7,
+ 0xBDB8B7BD, 0xB7BDB8B7, 0xBABABEB9, 0xC0BBBBBF,
+ 0xBBBFBABC, 0xB6B9BDB8, 0xBDBBB7BB, 0xBCBFBDBA,
+ 0xBCBBC1BC, 0xC0BEBBC1, 0xBDC0BEBD, 0xBABBBEBC,
+ 0xBFBABBBF, 0xB9BFBABB, 0xBEB9BEBC, 0xC0BEBBC0,
+ 0xBBC0BFBB, 0xBFBAC0BF, 0xC0BFBAC0, 0xBBC0BFBB,
+ 0xBEBCBFC3, 0xB0B9B6B9, 0xB4B0BBB1, 0xBBACA9B9,
+ 0xA0B5ACA8, 0xA8A0B7A7, 0xBCA99DBB, 0x9CBCAB9C,
+ 0xA897B8AB, 0xBAAC9CBE, 0x98BAA898, 0xA698BAA6,
+ 0xBBA597BB, 0x97BCA796, 0xA897BCA8, 0xBBA898BA,
+ 0x99BBA999, 0xA698BAA7, 0xBBA597BB, 0x97BBA597,
+ 0xA597BBA5, 0xBEA796BB, 0x97BCAA99, 0xA897BCA8,
+ 0xB9A597B9, 0x97B9A597, 0xA496B8A5, 0xBBA796BB,
+ 0x97BBA796, 0xA597BBA5, 0xB6A496B8, 0x97B7A396,
+ 0xA295B5A4, 0xB8A095B6, 0x98B8A297, 0xA696B8A5,
+ 0xB8A695BA, 0x96BBA493, 0xA494B6A7, 0xB8A599B7,
+ 0x98B8A49A, 0xA398B9A3, 0xB8A095B6, 0x95B7A496,
+ 0xA595B7A5, 0xBBA796BB, 0x95BAA796, 0xA897B9A7,
+ 0xBBA899B9, 0x9EBAAD9F, 0xAA9EBAAC, 0xB8A597B9,
+ 0x96BCA094, 0xA498BCA3, 0xB8A597BB, 0x93B8A493,
+ 0xA594B9A5, 0xB7A696B8, 0x95B7A497, 0xA294B6A5,
+ 0xB9A193B5, 0x94B8A398, 0xA294B6A0, 0xB7A598B8,
+ 0x9CB8A79B, 0xA89DB7AA, 0xB7A8A0B7, 0xA1B4A9A2,
+ 0xACA9B8A7, 0xBAB4B4BA, 0xBBB9B6BB, 0xB6BCB7B6,
+ 0xB9B6BCB7, 0xBFBAB8BE, 0xB6BCB7B9, 0xB8B7BBB6,
+ 0xBCB7B9BD, 0xB5BAB8B8, 0xBBB7BCBA, 0xB8B6B6BC,
+ 0xB3B8B6B3, 0xB4B7BDB8, 0xB9B6B3B9, 0xAEB4B3B2,
+ 0xB6ABB0B1, 0xB8B8B0B5, 0xB3B6B4B6, 0xB3B3BAB3,
+ 0xBBB5B5BD, 0xB8BCB7B7, 0xB2B6BBB9, 0xB7B2B3B7,
+ 0xAFB1ABB3, 0xA7A8ACA7, 0xACA7A8AC, 0x8F938EA8,
+ 0x476B6F69, 0x41384B50, 0x4142383E, 0x48484940,
+ 0x584F5051, 0x5D605757, 0x6261655A, 0x7168696D,
+ 0x6E71686E, 0x64686B62, 0x6F656C6D, 0x7273696E,
+ 0x67707468, 0x74696F73, 0x797D7270, 0x737E7F76,
+ 0x7C767B7C, 0x7E7E787C, 0x757A7870, 0x7C737F7D,
+ 0x7E81787B, 0x727A7D74, 0x7B72767B, 0x787B7276,
+ 0x72767970, 0x79737878, 0x77797377, 0x757B7B75,
+ 0x7A757D7A, 0x7B7B757D, 0x77767773, 0x78727A7B,
+ 0x76787276, 0x757A7A74, 0x7B757B7B, 0x7B7B757B,
+ 0x787A7B77, 0x7A767B7C, 0x7E7D797B, 0x757F7C77,
+ 0x7C767D7A, 0x7979737C, 0x74777771, 0x06067978,
+ 0x08050708, 0x01000001, 0x00000101, 0x27232204,
+ 0x5E605B58, 0x6F646B65, 0x7A776973, 0x6D7C796A,
+ 0x7D6B7D7D, 0x7D7D6B7D, 0x6D7D7D6B, 0x7B6B7D7D,
+ 0x7B7D6A7A, 0x68787D68, 0x7764787D, 0x75766675,
+ 0x61707060, 0x5C51706F, 0x4B493F60, 0x2641413B,
+ 0x0100292A, 0x00000000, 0x00000000, 0x130F0102,
+ 0x37373114, 0x4845453F, 0x564E4E4E, 0x63615958,
+ 0x5B5F6056, 0x6B5F6465, 0x6C6A5F6B, 0x69777368,
+ 0x746A7874, 0x63605876, 0x204A4742, 0x01002724,
+ 0x00010003, 0x24000100, 0x504C2728, 0x78787251,
+ 0x71797C73, 0x7D70787C, 0x767C7176, 0x747B8077,
+ 0x7B72787D, 0x787D7476, 0x76797D77, 0x7C77777B,
+ 0x767D7676, 0x9783887F, 0xBAB09BA0, 0xAFB8AEB2,
+ 0xBBBEC4BF, 0xBBB4BAC0, 0xB7BBB5B4, 0xB7B6BAB4,
+ 0xBCB7B8BC, 0xB6BCB7B8, 0xB2B1B8B1, 0xBBB6B1B9,
+ 0xB5BBB6B5, 0xB7B8BCB7, 0xB9B4BABB, 0xB8BCB7B5,
+ 0xB5B5BCB5, 0xBBB6B5BC, 0xB6BAB5B7, 0xB2B0B4AF,
+ 0xB7B2B3B7, 0xB3B7B2B3, 0xB3B3BAB3, 0xB8B2B3BA,
+ 0xB7BBB5B4, 0xB6B8BCB7, 0xBCB8B7BB, 0xB3B7B2BB,
+ 0xB7B2B6B1, 0xBDB8B6BC, 0xB8BCB6B9, 0xBABEC0BA,
+ 0x7F7EBEC0, 0x02000081, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090605,
+ 0xA9ACB006, 0xC0BDC2C3, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA, 0xC1B8C0C0,
+ 0xBFC0B9C1, 0xBABFC0BA, 0xBFB9C1C1, 0xBFBFB5BF,
+ 0xB8C0C0B7, 0xC2B8C0C0, 0xC1C2BAC2, 0xBCC1C2BC,
+ 0xBFB8C0C0, 0xBDBEB7BF, 0xBABFC0B8, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBBC1C0BA, 0xBFBAC0BF, 0xBFBEBAC0,
+ 0xB9BFBEB9, 0xBEB7BFBE, 0xBFBEB7BF, 0xB9BFBEB9,
+ 0xBEBAC0BF, 0xBDBBB9BF, 0xB6BBB9B8, 0xB7B9BDB8,
+ 0xBCB7B8BC, 0xA8ACA7B8, 0x9B999B95, 0xA9A0A1A1,
+ 0xA6A9A0A8, 0x9CA3A89F, 0xA9A09EA6, 0x9EA499A4,
+ 0x979DA497, 0xA2969FA6, 0xA1A5999E, 0x979FA397,
+ 0xA59A9FA3, 0x91968D9F, 0x00191A18, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x55080606,
+ 0x81785856, 0x80817880, 0x787D7F79, 0x82797C7E,
+ 0x80817781, 0x7B808178, 0x857F8384, 0x83847B85,
+ 0x7C88877D, 0x877D8786, 0x88877D88, 0x7E8A8880,
+ 0x867E8886, 0x85837B88, 0x7B88867C, 0x867C8785,
+ 0x86857B87, 0x7984857C, 0x89808182, 0x87857D88,
+ 0x7C87857B, 0x867C8886, 0x87867C87, 0x7B86877E,
+ 0x837D8384, 0x83867D81, 0x7C898A81, 0x867D8586,
+ 0x85867D85, 0x76818279, 0x7F767E7F, 0x7D7E757E,
+ 0x737F8077, 0x7C737B7C, 0x7B7E757B, 0x71797D72,
+ 0x756B787C, 0x6A695F74, 0x4D666459, 0x4B435A58,
+ 0x4041384D, 0x533E3B36, 0x736D5B58, 0x8B8F896F,
+ 0x91979A91, 0x9892999A, 0xB8BCB696, 0xB8B7BDB8,
+ 0xBDB8B6BD, 0xB8BEB9B7, 0xBABCC0BB, 0xBEB9BBBF,
+ 0xBBBFBABA, 0xB9BCBFBD, 0xBABAB8BB, 0xBCBFBDBA,
+ 0xBDBDC0BE, 0xC0BEBCBF, 0xBDC0BEBD, 0xBABDBEBA,
+ 0xBEBABDBE, 0xBABEB8BD, 0xBCBAC0BB, 0xC1BCBBC1,
+ 0xBBC0BEBD, 0xBDBCC1BF, 0xC0BEBABF, 0xBBC0BFBB,
+ 0xC2BABFC2, 0xBEC2BABF, 0xB5B8BDBB, 0xBEB5B6C0,
+ 0xA9B9B0B0, 0xABA6BBAC, 0xBBAAA1BC, 0x9CBCA79D,
+ 0xA798B8AB, 0xB9AB9CBC, 0x97B9A899, 0xA799BBA5,
+ 0xBBA597BB, 0x97BBA597, 0xA597BBA5, 0xBAA597B9,
+ 0x98BAA698, 0xA698BAA6, 0xBBA597BB, 0x97BBA597,
+ 0xA597BBA5, 0xBFA799BD, 0x98BDA99B, 0xA897BCA9,
+ 0xBBA597BB, 0x97BBA597, 0xA597BBA5, 0xBBA796BB,
+ 0x96BCA796, 0xA597BBA5, 0xB7A297B8, 0x96B8A196,
+ 0xA294B6A4, 0xB7A095B5, 0x96B8A297, 0xA496B8A4,
+ 0xB8A294B8, 0x95B7A493, 0xA696B8A5, 0xB5A598B8,
+ 0x95B6A295, 0xA195B9A0, 0xBAA094B8, 0x95B9A296,
+ 0xA294B8A3, 0xBBA496BA, 0x94B9A597, 0xA695B7A5,
+ 0xB7A493B8, 0x94B4A395, 0xA295B5A1, 0xB8A294B6,
+ 0x97BBA094, 0xA397BBA3, 0xB5A496BA, 0x93B8A393,
+ 0xA594B9A5, 0xB8A696B8, 0x95B9A496, 0xA294B6A3,
+ 0xBAA698BA, 0x97B9A79A, 0xA598B8A5, 0xB8A79BB9,
+ 0x9FB9A69D, 0xA8A0B7AA, 0xB4A8A0B7, 0xA4B0A7A1,
+ 0xB2B1BAA6, 0xB9B8BABB, 0xBBB6B8BB, 0xB8BCB7B7,
+ 0xBAB8BDBB, 0xBCB7B7BC, 0xB8BCB6B8, 0xB6B8BCB6,
+ 0xBCB7B7BB, 0xB6BBB9B8, 0xB6B7BCBA, 0xB9B6B2B9,
+ 0xB2B9B6B2, 0xB6B2B9B6, 0xB9B8B2B9, 0xB3B8B7B4,
+ 0xB2ADB3B2, 0xB6B6ADB3, 0xB6B9B7B4, 0xB3B6BDB6,
+ 0xBCB5B5BD, 0xB6BDB6B5, 0xB2B8BCB7, 0xB7B2B3B7,
+ 0xA7ABA6B3, 0xA7A8ACA7, 0xA09BA8AC, 0x8387829C,
+ 0x475B5F59, 0x41384D50, 0x40413840, 0x50525048,
+ 0x59505859, 0x60615858, 0x62626359, 0x71686B6C,
+ 0x6E716870, 0x65696C63, 0x6E636C70, 0x6C70656A,
+ 0x6D707469, 0x74687677, 0x7A7B7172, 0x757B7C73,
+ 0x7F767D7E, 0x7B7E757C, 0x787D7E75, 0x7D778081,
+ 0x787A747D, 0x707B7E75, 0x7B727479, 0x797C7378,
+ 0x75797B75, 0x7B75797B, 0x76787279, 0x757E7E78,
+ 0x79737B7B, 0x7B7D7779, 0x75767872, 0x7773797B,
+ 0x797A7676, 0x767D7E7A, 0x7B75797A, 0x7B7B757B,
+ 0x767A7975, 0x7B777977, 0x807F7B7C, 0x717F7C77,
+ 0x78737976, 0x7D7A757B, 0x4D787970, 0x06065251,
+ 0x09060808, 0x00000001, 0x00000000, 0x27232204,
+ 0x5F605B58, 0x766B6864, 0x78776978, 0x6B7A7A6A,
+ 0x7D6D7D7D, 0x7D7E6E7D, 0x6D7D7D6D, 0x7C6C7D7D,
+ 0x7A7C697C, 0x67787D68, 0x7666777C, 0x71716375,
+ 0x51706E63, 0x493F5E5C, 0x4A48404B, 0x003E403A,
+ 0x00000102, 0x00000000, 0x00020000, 0x130F0200,
+ 0x38383214, 0x47474440, 0x574F4F4C, 0x5A585059,
+ 0x5B606157, 0x6B5F6465, 0x7170626B, 0x69787567,
+ 0x756B7874, 0x68665E77, 0x1F4A4742, 0x01002724,
+ 0x48484202, 0x72797973, 0x79707878, 0x78797078,
+ 0x71787C71, 0x7C71797D, 0x787C7178, 0x737A7D74,
+ 0x7B72797C, 0x777A7178, 0x78777B75, 0x7C77797D,
+ 0x787C7676, 0x676D7067, 0xA0976E72, 0xB2BAB09B,
+ 0xBBBAC0BB, 0xBCB5B9C0, 0xB6BDB6B4, 0xB5B7BBB5,
+ 0xBCB6B7BB, 0xB6BAB4B8, 0xB4B6BDB6, 0xBCB5B4BB,
+ 0xB5BCB5B5, 0xB0B3B7B1, 0xB7B2B2B6, 0xB8BCB7B3,
+ 0xB7B9BDB8, 0xBDB8B8BC, 0xB6BAB5B9, 0xB4AFB3AD,
+ 0xBCB7B6BA, 0xB8BCB7B8, 0xB3B3BAB3, 0xB7B2B3BA,
+ 0xB3B7B2B3, 0xB1B0B7B0, 0xB9B4B1B8, 0xB0B4AFB5,
+ 0xB6B0B4AF, 0xBBB7B7BB, 0xBABCB6BA, 0xBAC0C0BA,
+ 0x7F7EC0C0, 0x02000081, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090804,
+ 0xA9ADAE06, 0xC0BEC3C4, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xB8C0C0BA, 0xC0B7BFBF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC2BAC2C2, 0xC0C1BAC2, 0xBCC1C2BB,
+ 0xC0B9C1C1, 0xC0C1B8C0, 0xBABFC0BB, 0xBFBABFC0,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEBAC0BF, 0xBFBEB7BF, 0xB8BEBDB9,
+ 0xBCB9BFBE, 0xBDBBB7BD, 0xBBC0BEB8, 0xB7B8BBB9,
+ 0xBCBAB8BC, 0xAAABA7B9, 0x9A9FA19B, 0xA9A09EA0,
+ 0xA4A9A0A6, 0x9CA3A89F, 0xA59C9EA6, 0x9EA499A0,
+ 0x999FA699, 0xA3969FA6, 0xA0A4999C, 0x99A0A499,
+ 0xA499A0A4, 0x91968DA0, 0x00181917, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x2C060606,
+ 0x807A2F2D, 0x80817880, 0x7A7C7E78, 0x80777E80,
+ 0x7F82797D, 0x7A808178, 0x857F8283, 0x82827C85,
+ 0x7D86847C, 0x847A8887, 0x86857B85, 0x7E86847C,
+ 0x88808886, 0x8A88808A, 0x7E86857B, 0x897F8988,
+ 0x89887E8A, 0x7B85867D, 0x867D8384, 0x87857D85,
+ 0x7A87857B, 0x877D8684, 0x87867C88, 0x7D85867D,
+ 0x857F8586, 0x81847B85, 0x7A83847A, 0x847A8384,
+ 0x80817883, 0x797E7F76, 0x82798182, 0x7F807781,
+ 0x73807E76, 0x7E757B7C, 0x7879707D, 0x647A7B71,
+ 0x695F6E70, 0x6A695F68, 0x4E65645A, 0x4C435958,
+ 0x4041384B, 0x533F3D35, 0x726E5B58, 0x8B8F8971,
+ 0x80979A91, 0x88828889, 0xB8BCB686, 0xB7B8BFB8,
+ 0xBDB8B7BE, 0xB8BEB9B7, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBDBDC0BE, 0xBBB9BCBF, 0xBEBFBDBA,
+ 0xBEBDC0BE, 0xC0BEBDC0, 0xBDC0BEBD, 0xBABDBEBA,
+ 0xBFB9BDBE, 0xBBBFB9BD, 0xBCBCC0BB, 0xC0BBBBC1,
+ 0xBCC0BBBC, 0xBFBBC0BE, 0xC0BEBCC1, 0xBBC0BFBB,
+ 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA, 0xC1B4B8BD,
+ 0xB1BFB6B7, 0xB2AEC1B1, 0xBCABA5BC, 0xA0BEAAA1,
+ 0xA798B7AC, 0xBDAC9DBD, 0x9ABAAC9D, 0xA597B9A7,
+ 0xBDA799BD, 0x97BBA799, 0xA597BBA5, 0xBAA698BA,
+ 0x98BAA698, 0xA698BAA6, 0xBBA597BB, 0x97BBA597,
+ 0xA597BBA5, 0xBDA799BD, 0x97BCA799, 0xA897BCA8,
+ 0xBBA597BB, 0x97BBA597, 0xA496BAA5, 0xBBA597BB,
+ 0x96BCA597, 0xA698BCA5, 0xB6A395B7, 0x96B8A294,
+ 0xA294B6A4, 0xB7A193B5, 0x95B7A196, 0xA597BBA3,
+ 0xB6A395B9, 0x95B7A294, 0xA797B9A5, 0xB6A597B9,
+ 0x94B8A294, 0xA397BBA0, 0xBAA094B8, 0x95B9A296,
+ 0x9F93B7A3, 0xB9A398B9, 0x97B9A597, 0xA797B9A7,
+ 0xB8A294B8, 0x95B6A294, 0xA095B6A0, 0xB8A294B8,
+ 0x97BBA294, 0xA398B9A3, 0xB6A597B9, 0x93B8A494,
+ 0xA595B7A4, 0xB9A696B8, 0x96B8A597, 0xA496B8A6,
+ 0xB8A699B9, 0x97B6A69A, 0xA89CBAA6, 0xB9A69DB8,
+ 0xA0B7A89F, 0xA8A1B6A8, 0xB6A8A2B3, 0xB2B8AEAA,
+ 0xB8BABBB2, 0xB9B8BABA, 0xBCBAB8BB, 0xB8BBB9B9,
+ 0xBBBABFBD, 0xBCB7B8BD, 0xB8BCB6B8, 0xB6B8BCB6,
+ 0xBBB9B8BC, 0xB8BBB9B8, 0xB6B7BCBA, 0xB8B6B2B9,
+ 0xB1B8B5B3, 0xB3B0B5B3, 0xB3B1B0B5, 0xAFB4B3AE,
+ 0xB2AEB3B2, 0xB2B2AEB3, 0xB3B6B4B0, 0xB3B3B9B4,
+ 0xBCB5B3BA, 0xB5BCB5B5, 0xB2B3B7B2, 0xB6B1B1B7,
+ 0xABB1ACB0, 0xA7A8ACA7, 0xA09BA8AC, 0x8387829A,
+ 0x495D5F59, 0x403A4D4F, 0x40413840, 0x504A4840,
+ 0x60575A58, 0x6061575F, 0x5D626359, 0x6C636667,
+ 0x7071686B, 0x6A6C7065, 0x73686F75, 0x7074696F,
+ 0x69727369, 0x776D7273, 0x80817776, 0x727A7B72,
+ 0x7E757A7B, 0x7E81787B, 0x78808178, 0x7D778081,
+ 0x7B7B757D, 0x7475786F, 0x7B727A7D, 0x7A7B727A,
+ 0x72767872, 0x7B757678, 0x7A7C7679, 0x757B7B75,
+ 0x77717B7B, 0x77797375, 0x757A7C76, 0x7B77797B,
+ 0x7A7B777A, 0x787C7D79, 0x7E787C7E, 0x7877737E,
+ 0x7B7C7B77, 0x7D797E7C, 0x7C7B777E, 0x767B7873,
+ 0x78737E7B, 0x7B78737B, 0x4D787872, 0x06065251,
+ 0x08050708, 0x00000001, 0x01010200, 0x27232203,
+ 0x5D605B58, 0x6E636865, 0x78776972, 0x6B7C7C6C,
+ 0x7D6D7D7D, 0x7A7B6B7D, 0x6D797A6A, 0x7B6B7C7D,
+ 0x7A7B6B7B, 0x69737764, 0x7262787C, 0x6D6D5F71,
+ 0x3F5E5C51, 0x48404B49, 0x37342F4B, 0x00000100,
+ 0x01010001, 0x01000201, 0x00000000, 0x130F0200,
+ 0x3A373214, 0x4846433F, 0x574F504D, 0x59584E59,
+ 0x5B606157, 0x6B5F6567, 0x706F616B, 0x62787567,
+ 0x7469716D, 0x68675D76, 0x1F4A4840, 0x25202724,
+ 0x6B6B6528, 0x70787970, 0x786E7879, 0x78796F77,
+ 0x70787C71, 0x7C71777B, 0x787C7178, 0x74767872,
+ 0x7B72787A, 0x7679707A, 0x767A7C76, 0x7D77787C,
+ 0x787C7679, 0x67717268, 0x71687071, 0x9BA0976E,
+ 0xBEBAC1BA, 0xBCB5BEC5, 0xB4BCB2B5, 0xB3B7BCB3,
+ 0xBBB5B9BC, 0xB9BBB5B9, 0xB6B3BAB3, 0xBDB6B6BD,
+ 0xB5BCB5B6, 0xB1B8BDB4, 0xB7B1B5BA, 0xB3B7B1B3,
+ 0xB8B4B8B3, 0xBCB7B9BD, 0xB8BCB7B8, 0xB2B3B7B1,
+ 0xBCB7B4B8, 0xB9BDB8B8, 0xB5B5BCB5, 0xBBB6B5BC,
+ 0xB5BBB6B5, 0xB7B3BAB3, 0xB9B4B7BE, 0xB0B4AFB5,
+ 0xB4B0B3B1, 0xBAB6B5B9, 0xBABCB6B9, 0xBAC0C1B8,
+ 0x807CC0C0, 0x02000081, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA8AAAB06, 0xBFBCC1C2, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFC2B8C0, 0xB8BDC0BA, 0xC1B8C0C0,
+ 0xC0C0B9C1, 0xB8C0C0B8, 0xBFB8C0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xC0BBC1C0, 0xC1C0BBC1, 0xBBC1C0BB,
+ 0xC0B8C0C0, 0xBFC2B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xBFBAC0BF, 0xBEBFBAC0,
+ 0xB9BEBFBA, 0xBFB9BFBE, 0xBFBEBAC0, 0xB9BFBEB9,
+ 0xBBB7BEBB, 0xBFBDB7BE, 0xB8BDBBBA, 0xBBBABDBB,
+ 0xC0C0BCBD, 0xB1B2B0C0, 0x9DA5A9A4, 0xABA49DA4,
+ 0xA3ABA1A4, 0x9BA1A99F, 0xA99E9EA6, 0x9DA398A3,
+ 0x9899A196, 0xA3999BA3, 0x9DA2999B, 0x989EA198,
+ 0xA1989EA1, 0x989A949E, 0x00171816, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x28000000,
+ 0x79772828, 0x78797578, 0x797A7C76, 0x807A7D7F,
+ 0x7D817B7E, 0x8182857C, 0x847E878A, 0x84847E84,
+ 0x7D808178, 0x847B8586, 0x88898083, 0x7B888980,
+ 0x887F8384, 0x85867D87, 0x7E808178, 0x8A818687,
+ 0x85867D89, 0x7D888980, 0x857C8586, 0x83847B84,
+ 0x7E85837B, 0x867D8886, 0x88898085, 0x7D87857D,
+ 0x89808586, 0x85867D88, 0x78808479, 0x84788084,
+ 0x81857A80, 0x787D8077, 0x81787E81, 0x80817880,
+ 0x767E7F75, 0x7E767E7F, 0x7B797180, 0x6075746A,
+ 0x6C616C6C, 0x6E6C626E, 0x586A6860, 0x59506061,
+ 0x50514858, 0x4D413F37, 0x65635552, 0x78797764,
+ 0x92989B92, 0x9995989B, 0xB8B9B598, 0xB2B8BDB4,
+ 0xBDB6B6BB, 0xB6BDB6B6, 0xBAB8BCB6, 0xBFBBBEC0,
+ 0xBEBFBBBE, 0xBABCC0BB, 0xBFBABBBF, 0xBCC0BBBB,
+ 0xBCBBBFBA, 0xC1BCBDC1, 0xBDC1BCBD, 0xBABCC0BB,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABCC0BB, 0xBFBDBBBF,
+ 0xBDC0BEBC, 0xBEBBC0BE, 0xC0BEBBC0, 0xBCC1BFBB,
+ 0xBFBBC0BF, 0xC0BFBBC0, 0xBBC1C0BB, 0xC2BABFC2,
+ 0xB5C0B7BA, 0xB1B0C0B3, 0xBCACA8BB, 0x9FB9ACA7,
+ 0xAA9EBAA8, 0xBCAA9EBC, 0x9EBCAA9E, 0xA497B7AA,
+ 0xBBA597B9, 0x97BBA597, 0xA597BBA5, 0xB9A595B7,
+ 0x97BBA797, 0xA597BBA5, 0xBBA597BB, 0x96BAA597,
+ 0xA597BBA4, 0xBBA597BB, 0x97B9A597, 0xA597B9A5,
+ 0xBBA597BB, 0x96BBA597, 0xA597BBA7, 0xB9A597B9,
+ 0x97BBA398, 0xA597BBA3, 0xB7A294B6, 0x95B7A595,
+ 0xA395B7A5, 0xB9A294B8, 0x96BAA395, 0xA698BCA4,
+ 0xB6A296BA, 0x95B7A095, 0xA696B8A5, 0xB9A698BC,
+ 0x95BBA195, 0xA698BCA4, 0xB7A395B9, 0x92B7A395,
+ 0xA294B6A3, 0xB8A598B8, 0x9CBBA69A, 0xA798B8AB,
+ 0xB8A294B6, 0x96B6A094, 0xA497B7A3, 0xB8A294B8,
+ 0x95B7A294, 0xA297B8A3, 0xB6A297B8, 0x94B6A095,
+ 0xA595B7A2, 0xB8A797B9, 0x97B8A798, 0xA798B8A8,
+ 0xB9A89CBA, 0x9CB8A99D, 0xAA9FB9A8, 0xB8ABA3BA,
+ 0xA3B8AAA3, 0xA8A5B5A8, 0xBAAEADB7, 0xBABBB5B6,
+ 0xB9BBBBB8, 0xB9BBBCBA, 0xBBBBBABB, 0xB9BBBBB9,
+ 0xB6B6BBB9, 0xBBB6B5BB, 0xB8BCB7B7, 0xB7B8BCB6,
+ 0xBAB8B9BD, 0xB8BBB9B7, 0xB5B6B9B7, 0xB7B5B2B7,
+ 0xB3B8B6B4, 0xB3B4B7B5, 0xB5B3B2B5, 0xB0B3B1B2,
+ 0xB1AFB2B0, 0xB3B1B0B3, 0xB1B4B2B0, 0xB2B3B6B4,
+ 0xB8B3B3B7, 0xB5B9B4B4, 0xB1B1B8B1, 0xB3ACB0B8,
+ 0xA5ADA6AB, 0xA8A6ACA7, 0x9791A9AD, 0x7D817B93,
+ 0x3F565852, 0x3C364345, 0x43453F3A, 0x4E505148,
+ 0x5D535657, 0x6263595C, 0x6068695F, 0x69606869,
+ 0x70716868, 0x68707168, 0x79706E71, 0x73746B78,
+ 0x6B75766D, 0x736A7374, 0x78797072, 0x70777A71,
+ 0x7B727679, 0x787B7278, 0x787D7E75, 0x7E758081,
+ 0x7D7E757D, 0x74797C73, 0x7C737A7D, 0x77786F7B,
+ 0x727B7C73, 0x78727878, 0x7A7A7478, 0x727B7B75,
+ 0x79707878, 0x777A7176, 0x72757771, 0x79737678,
+ 0x7A7A7479, 0x727B7B75, 0x7E787878, 0x7D7C787E,
+ 0x787F7C78, 0x79757D7C, 0x73726E7A, 0x7276736E,
+ 0x79717A77, 0x76736E7B, 0x4977746F, 0x01014E4D,
+ 0x00000003, 0x00020000, 0x01010200, 0x22201F03,
+ 0x5A5E5853, 0x6C616863, 0x7A776972, 0x6B787868,
+ 0x7D6D7B7B, 0x7B7B6B7D, 0x69787C69, 0x7969787C,
+ 0x77786878, 0x61707461, 0x73637074, 0x68685872,
+ 0x434F4F41, 0x35304F4F, 0x09070638, 0x00000100,
+ 0x00010000, 0x00000100, 0x00010101, 0x14130001,
+ 0x3F3C3818, 0x464A4742, 0x544C504E, 0x5E5C5257,
+ 0x5B626359, 0x6A5E6567, 0x6D6B606A, 0x69736F64,
+ 0x73687874, 0x6A685E75, 0x1E49483E, 0x05002826,
+ 0x6A676208, 0x70797A71, 0x79707879, 0x78797078,
+ 0x6D73746B, 0x7B717677, 0x76776D7A, 0x72767872,
+ 0x79707678, 0x74786D76, 0x73797C73, 0x7C73797C,
+ 0x797C7379, 0x6F787C71, 0x776E767A, 0x76797074,
+ 0xB9979C93, 0xC4B9BEC4, 0xBEC4B9BE, 0xBAC0C1B8,
+ 0xC2B9C0C0, 0xBEC1B8C1, 0xB9B9C0B9, 0xC0B9B8C0,
+ 0xB9C1B7B8, 0xB1B6BCB1, 0xBCB0B8BC, 0xB8BCB1B8,
+ 0xB7B8BCB6, 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B8BCB7,
+ 0xBCB6B8BC, 0xB8BCB6BA, 0xB9B9C1BA, 0xC1BAB8C0,
+ 0xB9C0B9B9, 0xB7B6BCB7, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB8B8BCB7, 0xBCB7B9BD, 0xB8BCB6B8, 0xBABEC1B8,
+ 0x807CBEC0, 0x0203017F, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA8AAAB06, 0xBFBDC3C2, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFC2B8C0, 0xB9BEC1BA, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xC0BAC0BF, 0xC1C0BBC1, 0xBBC1C0BB,
+ 0xC0B9C1C1, 0xBFC2B8C0, 0xB8BFC2B8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xBCB9BFBE, 0xBFC0B7BD,
+ 0xBABFC0BA, 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9,
+ 0xBCB9C0BD, 0xBDBBB8BF, 0xB6BBB9B8, 0xBCBCBCBC,
+ 0xC0C0BCBC, 0xB2B3B1C2, 0x9EA8AEA9, 0xA9A29DA5,
+ 0xA3ABA4A1, 0x9BA2AAA0, 0xA69B9EA6, 0x9CA297A0,
+ 0x969CA499, 0xA39999A1, 0x9B9F999B, 0x989EA198,
+ 0xA198A0A1, 0x9597919E, 0x01181917, 0x00000101,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x01010100, 0x28000000,
+ 0x78782828, 0x797A7878, 0x7A7A7B77, 0x7F7B7E80,
+ 0x7B7F7A7E, 0x75797D77, 0x807A797B, 0x84847E80,
+ 0x77808178, 0x81787F80, 0x88898080, 0x7D85867D,
+ 0x867D8586, 0x83847B85, 0x7D808178, 0x837A8586,
+ 0x83847B82, 0x7C83847B, 0x847B8485, 0x85867D83,
+ 0x7C898A81, 0x867D8485, 0x85867D85, 0x7B85837B,
+ 0x847B8384, 0x81827883, 0x78808479, 0x84788084,
+ 0x80847980, 0x777F8279, 0x81787D80, 0x81827980,
+ 0x757E7F75, 0x79747E7F, 0x78756D7C, 0x6975746A,
+ 0x6F647575, 0x72706671, 0x596A6860, 0x50475F5F,
+ 0x5152494F, 0x37424137, 0x64623F40, 0x78797763,
+ 0x92888B82, 0xAAA6989B, 0xB9BAB6A9, 0xB2BABDB4,
+ 0xBBB5B6BB, 0xB9C0B9B7, 0xBABBBFB9, 0xBFBBBEC0,
+ 0xBEBFBBC0, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBBBBBFBA, 0xC1BCBCC0, 0xBCC0BBBD, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBBBBBFBA, 0xC0BEBCC0,
+ 0xBEC1BFBD, 0xBEBBC0BE, 0xBFBDBBC0, 0xBBC0BEBA,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBAC0BFBB, 0xC1B8C0C0,
+ 0xB6C0B6BC, 0xAFB1BCB4, 0xB9B0B0BE, 0xA7BCACA9,
+ 0xA89FB9AE, 0xBBAEA2BE, 0x9EBCAB9F, 0xAA9EBCAA,
+ 0xBBA797B9, 0x98BCA597, 0xA698BCA6, 0xB9A595B7,
+ 0x97BBA797, 0xA597BBA5, 0xBBA597BB, 0x97BBA597,
+ 0xA597BBA5, 0xBBA597BB, 0x97B9A597, 0xA597B9A5,
+ 0xBBA597BB, 0x96BBA597, 0xA597BBA7, 0xB9A597B9,
+ 0x97BBA398, 0xA698BCA3, 0xB6A594B9, 0x94B6A494,
+ 0xA594B9A4, 0xBBA293B9, 0x95BBA495, 0xA496BAA4,
+ 0xB6A296BA, 0x96B6A095, 0xA496B8A3, 0xB9A498BC,
+ 0x93B9A093, 0xA496BAA2, 0xB5A595B7, 0x93B8A393,
+ 0xA696B8A4, 0xB8A798B8, 0x9BBAA899, 0xA798B8AB,
+ 0xB6A193B5, 0x96B6A095, 0xA497B7A3, 0xB8A294B8,
+ 0x96B8A294, 0xA497B7A4, 0xB6A297B8, 0x93B5A095,
+ 0xA696B8A1, 0xB8A798B8, 0x97B8A897, 0xA99AB9A8,
+ 0xB7A79BB7, 0x9DB7A89D, 0xAEA4BBA8, 0xB6AAA4B7,
+ 0xABBAA9A6, 0xACADB7AE, 0xBAB8B9BD, 0xBBB9B8BA,
+ 0xB8BBB9B8, 0xBAB9BCBA, 0xBABAB9BC, 0xB8BDBCB8,
+ 0xB6B6BBB9, 0xBBB9B5BB, 0xB8BCB7B8, 0xB7B6BAB5,
+ 0xBBB9B8BC, 0xB6B9B7B8, 0xB5B4B7B5, 0xB7B5B4B7,
+ 0xB2B5B3B4, 0xB3B2B5B3, 0xB5B0B2B5, 0xB0B4AFB1,
+ 0xB1B0B3B1, 0xB4B2B0B3, 0xB1B4B2B1, 0xB6B2B5B3,
+ 0xBCB7B5B8, 0xB9BDB8B8, 0xB1B1B8B1, 0xB4ACB0B8,
+ 0xA5ADA6A9, 0xA6A6ACA7, 0x9893A7AB, 0x686C6694,
+ 0x3F565852, 0x3B374345, 0x43453F3A, 0x54505148,
+ 0x5D535D5E, 0x6263595C, 0x636B6C63, 0x69606B6C,
+ 0x6D6E6568, 0x68707168, 0x79707071, 0x78797078,
+ 0x6F797A71, 0x766D7778, 0x78797075, 0x7273766D,
+ 0x7970787B, 0x76797076, 0x747B7C73, 0x7E757C7D,
+ 0x7D7E757D, 0x747A7D74, 0x79707A7D, 0x78797078,
+ 0x747A7B72, 0x79707C7D, 0x78787278, 0x75787872,
+ 0x7D747B7B, 0x797C737A, 0x72767872, 0x7A747678,
+ 0x7B7B757A, 0x717B7B75, 0x7A767777, 0x7C7B777B,
+ 0x737A7773, 0x79757877, 0x72746E78, 0x747F7C77,
+ 0x736B7C79, 0x76746C75, 0x4A777470, 0x0000514E,
+ 0x00000002, 0x00020000, 0x00000200, 0x22211D00,
+ 0x505E5851, 0x6C616059, 0x7A776972, 0x6D7B7A6C,
+ 0x796A7D7D, 0x7C7C6C7C, 0x677A7C69, 0x786A767A,
+ 0x78796978, 0x61707461, 0x68587274, 0x5E5D4F68,
+ 0x2D4F4F41, 0x06053837, 0x07050508, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x14130001,
+ 0x3F3C3818, 0x464A4742, 0x554B504E, 0x5E5C5257,
+ 0x5B626458, 0x695F6567, 0x6F6D626A, 0x63736F64,
+ 0x756A706E, 0x6A685D77, 0x1E49483E, 0x04002826,
+ 0x07040008, 0x7254514C, 0x78727878, 0x78787278,
+ 0x6C73746B, 0x776D7475, 0x73776C76, 0x7075786F,
+ 0x7A6F7679, 0x777B7076, 0x6D76776D, 0x7C737677,
+ 0x7B7C737B, 0x71787C71, 0x7C71787C, 0x76797078,
+ 0x9271746B, 0xC4B9999D, 0xC0C4B9BE, 0xBAC1C1BB,
+ 0xC0BAC0C0, 0xBEC0BAC0, 0xB9B8BFB8, 0xBFBAB8C0,
+ 0xBAC1BAB9, 0xB1B6BCB1, 0xBCB0B8BC, 0xB9BDB2B8,
+ 0xB6B8BCB6, 0xBDB8B7BB, 0xB8BCB7B9, 0xB7B7BBB6,
+ 0xBCB6B8BC, 0xB8BCB6BA, 0xB9B8C0B9, 0xBFB8B8C0,
+ 0xB9C0B9B7, 0xB7B9BDB8, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB8BCB7B8, 0xBABEC0BA,
+ 0x807CBEC0, 0x0203007F, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA8AAAA06, 0xBFBDC3C2, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFB8C0C0, 0xC0C0B7BF, 0xB7BFBFB8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB8C0BF, 0xC0BFB8C1,
+ 0xB8C0BFB8, 0xC0B8C0BF, 0xC1C1B9C1, 0xB8C0C0B9,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB7BFBE, 0xC0BFB7BF,
+ 0xBBC1C0B8, 0xBDBAC0BF, 0xBEBDB8BE, 0xB7BCBBB9,
+ 0xBEBAC1BE, 0xBDBCBAC1, 0xB7BCBBB8, 0xBCBCBCBC,
+ 0xC1BFBCBC, 0xB7B8B6C0, 0x96A9AFAA, 0xABA4959B,
+ 0xA2AAA3A3, 0x9CA0A89E, 0xA49B9EA6, 0x9EA4999F,
+ 0x999EA69B, 0xA1979BA5, 0x9BA09799, 0x949EA198,
+ 0xA0979A9D, 0x989A949D, 0x00181917, 0x00010000,
+ 0x01000200, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x29000000,
+ 0x77792929, 0x78787878, 0x7681807C, 0x7F7B7A7C,
+ 0x7E7F7B7E, 0x7A82847E, 0x837D7E80, 0x88888283,
+ 0x7C808178, 0x867D8485, 0x80817885, 0x7C85867D,
+ 0x877E8485, 0x85867D86, 0x7B808178, 0x847B8384,
+ 0x83847B83, 0x8185867D, 0x837A898A, 0x86877E82,
+ 0x7B83837D, 0x857C8384, 0x83847A84, 0x80888980,
+ 0x897F8889, 0x868A7F88, 0x79808479, 0x776D8084,
+ 0x76776D76, 0x787B7C73, 0x81788081, 0x80817880,
+ 0x747C8075, 0x78737D7E, 0x77746F7B, 0x7075736B,
+ 0x766A7B7A, 0x706F6576, 0x596A6860, 0x59506361,
+ 0x50514858, 0x38404137, 0x65614041, 0x78797564,
+ 0x92888B82, 0xA8A4989B, 0xB8B9B7A7, 0xB5BABCB6,
+ 0xC0BAB9BE, 0xB9C0B9BC, 0xB8BDC1BB, 0xBFB9BCC1,
+ 0xBDBEBABD, 0xBCBBBFBA, 0xBFBAB9BE, 0xBBBFBABB,
+ 0xBABCC0BB, 0xC1BCBBBF, 0xBBBFBABD, 0xBABABEB9,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBBBCC0BB, 0xC0BEBCC0,
+ 0xBBC0BEBB, 0xBFBBC0BE, 0xC0BEBCC1, 0xBBC0BEBB,
+ 0xBEBAC1BE, 0xC0BFBAC1, 0xB8C0BFBA, 0xC2B8C0C0,
+ 0xBBC0B6BF, 0xB4B7BFB5, 0xBCB0B1BB, 0xAABAB0B0,
+ 0xADA6BBAD, 0xBDAEA4BB, 0xA2BEAEA3, 0xAB9CBBB0,
+ 0xB8A799BB, 0x97BBA297, 0xA597BBA3, 0xB9A595B7,
+ 0x97B9A797, 0xA597B9A5, 0xBBA597BB, 0x96BBA597,
+ 0xA796BBA7, 0xBBA597BB, 0x97BBA597, 0xA397BBA3,
+ 0xB9A499BA, 0x97BBA398, 0xA597BBA5, 0xBBA597BB,
+ 0x96BCA597, 0xA597BBA5, 0xB9A796BB, 0x93B8A594,
+ 0xA493B8A4, 0xBBA394BA, 0x95BBA295, 0xA496BAA4,
+ 0xB6A296BA, 0x96B6A095, 0xA496B8A3, 0xB8A397BB,
+ 0x96BA9E94, 0xA597BBA2, 0xB6A595B7, 0x93B8A494,
+ 0xA695B7A5, 0xB8A897B8, 0x95B6A897, 0xA897B9A6,
+ 0xB5A294B8, 0x97B79F94, 0xA497B7A4, 0xB8A094B8,
+ 0x96B8A294, 0xA697B7A4, 0xB7A395B7, 0x95B7A193,
+ 0xA696B8A5, 0xB7A798B8, 0x98B7A798, 0xA89CB8A7,
+ 0xB4AAA0B7, 0xA1B6A89F, 0xADA4B8AA, 0xB6A9A4B3,
+ 0xB3B9AEAD, 0xB9BBBCB3, 0xBAB8BBB9, 0xBCB7B9BC,
+ 0xB6BCB7B6, 0xBAB6BCB7, 0xBCBBB7BC, 0xB8BDBCB7,
+ 0xB6B5BAB9, 0xBAB9B2B9, 0xB6BBB9B5, 0xB8B3B8B6,
+ 0xB9B9B5BA, 0xB5B7B7B7, 0xB5B1B4B2, 0xB8B6B4B7,
+ 0xB3B6B4B5, 0xB6B2B7B5, 0xB6B1B3B8, 0xB0B4AFB2,
+ 0xAFAEB3B1, 0xB3AEACB1, 0xB0B6B1AD, 0xB4B3B7B2,
+ 0xBAB8B5B9, 0xB7BDB8B7, 0xB0B0B8B1, 0xB3ACAFB7,
+ 0xA5ADA6AB, 0xA7A6ACA7, 0x9692A8AC, 0x696A6695,
+ 0x354B4F49, 0x3C37373B, 0x41453F38, 0x534E5148,
+ 0x645A5A5E, 0x5C5D5363, 0x61686960, 0x6960696A,
+ 0x70716868, 0x6C75766D, 0x766D7475, 0x78797075,
+ 0x71797A71, 0x796F797A, 0x75766C78, 0x7074776E,
+ 0x776E7679, 0x76797074, 0x727D7E74, 0x796F7B7C,
+ 0x7E7F7578, 0x73808178, 0x79707B7C, 0x7B7C7378,
+ 0x73787970, 0x7C737B7C, 0x7B7C737B, 0x75797973,
+ 0x78727B7B, 0x77777178, 0x70767970, 0x7A747679,
+ 0x797B7578, 0x797C7E78, 0x7A767C7D, 0x797A7679,
+ 0x737A7975, 0x78727877, 0x75777176, 0x6B75726D,
+ 0x6F677573, 0x73716971, 0x4A787370, 0x0000514E,
+ 0x00000002, 0x00000000, 0x01000000, 0x22211D00,
+ 0x4F5C5951, 0x6D625E5A, 0x7A776971, 0x6B7D7C6E,
+ 0x7C6C7B7B, 0x7878687C, 0x68777767, 0x77697878,
+ 0x76756778, 0x56737464, 0x5E506769, 0x56524761,
+ 0x03504D45, 0x06060A07, 0x08050708, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x14130200,
+ 0x3F3C3818, 0x454A4840, 0x554B504F, 0x5E5C5257,
+ 0x55646458, 0x675B6164, 0x6D6D6167, 0x62716F64,
+ 0x74697170, 0x69695D76, 0x1E49483E, 0x04002826,
+ 0x07040008, 0x2A0A0605, 0x77762D2B, 0x7877737B,
+ 0x6A73736D, 0x796E7073, 0x74786D75, 0x6F767970,
+ 0x7A6F7378, 0x787C7176, 0x69797D72, 0x786F7074,
+ 0x75766D77, 0x6F767A6F, 0x7B70767A, 0x787B7277,
+ 0x6D70726C, 0x9D947173, 0x989B929A, 0x8F91938D,
+ 0x938F9293, 0x91959092, 0x8F8F938E, 0x92908E94,
+ 0x8F938E8F, 0x878C908A, 0x92898B90, 0x8E91888F,
+ 0x8F90948F, 0x948F9094, 0x91959090, 0x8F93958F,
+ 0x94909395, 0x93949095, 0x93939A93, 0x9994939A,
+ 0x93999493, 0xB7B8BCB7, 0xBDB8B8BC, 0xB6BCB7B7,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB8BCB7B8, 0xB9BEC0BA,
+ 0x817DBDBF, 0x03040080, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA8AAAA06, 0xBFBDC3C2, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFB8C0C0, 0xC0C0B7BF, 0xB8C0C0B8, 0xC0B7BFBF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB9C1C0, 0xC0BFB8C1,
+ 0xB8C0BFB8, 0xC0B9C1C0, 0xC0C0B9C1, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0BF, 0xBDBCB8C0,
+ 0xB9BFBEB5, 0xBFB9BFBE, 0xBEBDBAC0, 0xBABFBDB9,
+ 0xBAB8BDBB, 0xBDBCB7BC, 0xBDBFBFB8, 0xBABABCBC,
+ 0xC2C0BBBC, 0xB7B8B6C1, 0x97ABAFAA, 0xA49D969C,
+ 0xA3AAA39D, 0x9C9EA69C, 0xA59CA0A5, 0x9EA39AA2,
+ 0x999EA69B, 0xA3999BA5, 0x9AA2989B, 0x989CA198,
+ 0xA2999EA1, 0x9A9C969F, 0x00181917, 0x00010000,
+ 0x00000100, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x27000000,
+ 0x787A2727, 0x78787879, 0x7A7C7B77, 0x78728080,
+ 0x7E807A76, 0x7A82847E, 0x857F7E80, 0x84847E85,
+ 0x7A83847B, 0x847B8283, 0x80817883, 0x7B808178,
+ 0x847B8384, 0x82837A83, 0x7C84857C, 0x847B8485,
+ 0x7F807783, 0x7D83847B, 0x877E8586, 0x82837A86,
+ 0x8085867D, 0x867C8889, 0x88897F85, 0x7B83847B,
+ 0x857C8384, 0x7E827782, 0x6274786D, 0x6157696D,
+ 0x60615760, 0x78707168, 0x82798081, 0x80817881,
+ 0x76808479, 0x78737E7F, 0x7B78737B, 0x6775736B,
+ 0x7066716F, 0x71706671, 0x586A695F, 0x574F6260,
+ 0x50514859, 0x38404137, 0x524E4041, 0x787A7451,
+ 0x92888B82, 0xAAA6989B, 0xB8B9B5A9, 0xB4B8BAB4,
+ 0xBBB5B8BD, 0xBAC1BAB7, 0xB4B8BDB4, 0xBCB6B8BD,
+ 0xB9BDB7BA, 0xBABBBFBA, 0xBFBAB9BF, 0xBCC0BBBB,
+ 0xBABDC1BC, 0xBFBABBBF, 0xBBBFBABB, 0xBABCC0BB,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBBBCC0BB, 0xBFBDBCC0,
+ 0xBBC0BEBA, 0xBDBBC0BE, 0xBFBDBABF, 0xBBC0BEBA,
+ 0xBEBAC1BE, 0xC0BFBAC1, 0xB8C0BFB8, 0xC0B8C0BF,
+ 0xBFC2B8C0, 0xB8BFC2B8, 0xBAB5B9BE, 0xAFBBB0B2,
+ 0xB2AFBEB1, 0xBDB0AABD, 0xA3BBB1A8, 0xAC9EBAB0,
+ 0xB7A79BB9, 0x97BBA196, 0xA597BBA3, 0xB9A797B9,
+ 0x97B9A797, 0xA597B9A7, 0xBBA597BB, 0x96BBA597,
+ 0xA796BBA7, 0xBBA597BB, 0x97BBA597, 0xA397BBA5,
+ 0xB9A398B9, 0x97BBA398, 0xA597BBA5, 0xBBA597BB,
+ 0x97BDA597, 0xA597BBA6, 0xB9A695BA, 0x93B8A594,
+ 0xA493B8A4, 0xBBA495BB, 0x95BBA495, 0xA596BCA4,
+ 0xB6A296BA, 0x96B6A095, 0xA496B8A3, 0xB9A296BA,
+ 0x96BA9F95, 0xA297B8A2, 0xB9A595B7, 0x93B8A797,
+ 0xA695B7A5, 0xB6A897B9, 0x95B7A695, 0xA897B9A6,
+ 0xB6A395B9, 0x96B8A294, 0xA496B8A4, 0xB6A095B6,
+ 0x96B8A095, 0xA798B8A4, 0xB7A696B8, 0x95B5A595,
+ 0xA899B9A4, 0xB7A99AB9, 0x9CB8A79B, 0xAAA0B7A8,
+ 0xB4AAA1B6, 0xA5B6A9A0, 0xAEA9B8AB, 0xBDB4B3BC,
+ 0xBABAB8B9, 0xB8BBB9B8, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB5BBB6B6, 0xBAB7BDB8, 0xBDBCB7BC, 0xB6BBBAB8,
+ 0xB9B2B8B7, 0xBAB9B4BA, 0xB4B9B8B5, 0xB9B6BBBA,
+ 0xB7B7B6BB, 0xB5B8B6B5, 0xB5B5B8B6, 0xB4B2B4B7,
+ 0xB2B5B3B1, 0xB2B0B5B3, 0xB9B4B1B7, 0xAFB3AEB5,
+ 0xADAEB3B1, 0xB4AFACB2, 0xB1B7B2AE, 0xB3B3B7B2,
+ 0xBCB7B4B8, 0xB6BCB7B6, 0xB2B0B8B1, 0xB3ACB1B9,
+ 0xA1A8A1AC, 0x94A6ACA7, 0x807B9396, 0x686C677C,
+ 0x364C4E48, 0x3C363A3C, 0x43453F3A, 0x4C4F5249,
+ 0x5D515357, 0x6263595B, 0x5F696A61, 0x6A616768,
+ 0x6D6E6569, 0x6C6F7067, 0x736A7475, 0x73746B72,
+ 0x6A707168, 0x796F7273, 0x75766C78, 0x70767970,
+ 0x756C7679, 0x72756C72, 0x727B7C73, 0x79707B7C,
+ 0x7C7D7478, 0x707D7E75, 0x7C737879, 0x7D7E757B,
+ 0x727B7C73, 0x80777A7B, 0x82837A7F, 0x737B7B75,
+ 0x79737979, 0x77777179, 0x75767970, 0x7C767B7E,
+ 0x787A747A, 0x79767773, 0x817D7C7D, 0x7D7E7A80,
+ 0x727E7D79, 0x7D797776, 0x7A7A747C, 0x6D797973,
+ 0x746F7775, 0x7A777277, 0x25787370, 0x00002C29,
+ 0x00000002, 0x00000000, 0x00000000, 0x22211D00,
+ 0x4F5B5951, 0x6C615C5A, 0x7A766B70, 0x6B7B7A6C,
+ 0x78687B7B, 0x78786878, 0x66787868, 0x75677875,
+ 0x78756778, 0x58727363, 0x5B506768, 0x5650495F,
+ 0x06211E1A, 0x05070806, 0x09060808, 0x00000000,
+ 0x01010000, 0x01010101, 0x00000000, 0x14130200,
+ 0x3F3C3818, 0x4547483F, 0x544C504F, 0x5E5C5257,
+ 0x5B646458, 0x6B5F6767, 0x6D6B606B, 0x69717062,
+ 0x70647674, 0x65645A70, 0x1E49483E, 0x05012826,
+ 0x07030208, 0x06070505, 0x05060806, 0x51504C0A,
+ 0x6C787A74, 0x736A7275, 0x73766D70, 0x6E727670,
+ 0x79707277, 0x777A7176, 0x6D73776C, 0x72697478,
+ 0x76776D71, 0x70767A6F, 0x7A6F777B, 0x767A6F76,
+ 0x6D71736D, 0x4C467173, 0x4A4C464A, 0x373A3B37,
+ 0x3C373A3B, 0x383C3738, 0x35363A35, 0x3937363A,
+ 0x363A3536, 0x36373B36, 0x3B37383C, 0x3A3B373A,
+ 0x4040443F, 0x443F4145, 0x40443F40, 0x43464743,
+ 0x46424647, 0x46474347, 0x47484C47, 0x4C47464C,
+ 0x484B4946, 0x7F606361, 0x807E7E81, 0x5E645F7D,
+ 0x6F707371, 0x73717074, 0x70746F70, 0x7C80817D,
+ 0x413D7F80, 0x01020040, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA8AAAB06, 0xBFBEC4C3, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC2B9C0C3, 0xC0C0B8BF, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB9C1C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC2B8C0, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B9C1C1,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xBEB9BFBE, 0xBABBB9BF,
+ 0xB9BEBFB5, 0xBCB9BFBE, 0xBEBBB7BD, 0xB9BEBCB7,
+ 0xB6B5BAB8, 0xBAB8B7BB, 0xBABDBBB7, 0xB9BBBEBC,
+ 0xC1BDBABE, 0xB9BAB6C0, 0x97AAABA7, 0xA19B989C,
+ 0xA3A7A19D, 0x9C9FA49B, 0xA59CA0A5, 0x9CA198A2,
+ 0x979DA59B, 0xA09998A1, 0x98A09698, 0x959BA097,
+ 0xA0959AA0, 0x9A9F969A, 0x001E211F, 0x00010000,
+ 0x01000200, 0x00010101, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x55550001, 0x80817F55, 0x74787872, 0x7D747C7D,
+ 0x7E81787A, 0x7A7E807A, 0x847E7E80, 0x7E807A82,
+ 0x7885867D, 0x847B8081, 0x88898083, 0x7B85867D,
+ 0x867D8384, 0x85867D85, 0x7A808178, 0x81788283,
+ 0x80817880, 0x78808178, 0x867D8081, 0x83847B85,
+ 0x8184877E, 0x8A80888C, 0x86877D89, 0x7585867D,
+ 0x6B627D7E, 0x6A6B626A, 0x71787C71, 0x7B72787C,
+ 0x797C7378, 0x7C81857A, 0x847A8387, 0x83847A83,
+ 0x787C7D73, 0x7B768081, 0x7B78737E, 0x6977756D,
+ 0x6B617371, 0x706F656A, 0x5C6E6D63, 0x5E566766,
+ 0x58595060, 0x3A4F5046, 0x504A4043, 0x6A6C664E,
+ 0x9280857C, 0x9993969B, 0xACB0AA95, 0xB3B6B9B0,
+ 0xBCB6B7BC, 0xB9C0B9B8, 0xB6BABFB6, 0xBEB8BCBF,
+ 0xB9BDB7BC, 0xB8BBBFB9, 0xBDB8B8BF, 0xB7BDB8B7,
+ 0xB7B8BFB8, 0xBFB8B7BE, 0xB8BFB8B8, 0xB7B8BFB8,
+ 0xC0B9B7BE, 0xB9C0B9B9, 0xBCBBC1BC, 0xC1BCBBC1,
+ 0xBDC1BCBD, 0xBEBDC0BE, 0xC0BEBDC0, 0xBBC0BEBD,
+ 0xBEBAC1BE, 0xC0BFBAC1, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xC0BFB8C0, 0xB9C1C1B8, 0xC0B8C0C0, 0xB8BDB8BD,
+ 0xB6B5BFB5, 0xBCB1ACBB, 0xABBFB3AB, 0xADA0B8B6,
+ 0xB6A79BB7, 0x94B5A196, 0xA294B89F, 0xB8A797B9,
+ 0x96B8A897, 0xA797B9A7, 0xBBA597BB, 0x97BBA597,
+ 0xA597BBA5, 0xBCA796BB, 0x97BBA596, 0xA597BBA5,
+ 0xBBA597BB, 0x97BBA597, 0xA597BBA5, 0xB9A597B9,
+ 0x97BBA597, 0xA597BBA5, 0xB7A594B9, 0x93B8A595,
+ 0xA493B8A5, 0xBDA694BB, 0x94BDA694, 0xA596BCA6,
+ 0xB6A296BA, 0x94B6A095, 0xA395B7A2, 0xB9A195B9,
+ 0x97B89F95, 0xA196B7A2, 0xB7A595B7, 0x93B8A595,
+ 0xA595B7A4, 0xB7A696B8, 0x94B6A697, 0xA695BAA4,
+ 0xB7A595B7, 0x96B8A595, 0xA595B7A6, 0xB6A294B6,
+ 0x96B7A095, 0xA79ABAA1, 0xB6A699B9, 0x99B5A498,
+ 0xA99BB7A7, 0xB7AA9FB9, 0xA0B7A8A0, 0xA8A1B6A8,
+ 0xB8B0A7BB, 0xAAB6AEA9, 0xB5B7BFAC, 0xBEB9BCC0,
+ 0xBCBABABF, 0xBBBFBAB9, 0xBBBDC0BE, 0xBDBBBABD,
+ 0xB7BCBABA, 0xBCB8BDBB, 0xBDBCB7BD, 0xB8BDBCB8,
+ 0xB8B2B8B7, 0xB9B8B3B9, 0xB5BAB9B4, 0xB7B9BCBA,
+ 0xB6B4B8BC, 0xB2B7B5B1, 0xB3B4B7B5, 0xB8B3B2B5,
+ 0xB2B6B1B4, 0xB1B1B7B2, 0xB4ADB0B8, 0xADB4ADAD,
+ 0xABADB3AE, 0xB3AEAAB0, 0xB1B8B1AD, 0xB3B4B8B2,
+ 0xBDB7B5B9, 0xB6BDB6B9, 0xB1B1B9B2, 0xADA4B1B8,
+ 0xA4A8A2A8, 0x9A999F9A, 0x8782999F, 0x696D6781,
+ 0x3043463D, 0x3F363839, 0x44453C3E, 0x534F5046,
+ 0x5D535C5D, 0x6263595C, 0x6363665D, 0x6B62696C,
+ 0x6F70676A, 0x6B6F6F69, 0x766D7171, 0x78797075,
+ 0x6B73746B, 0x756C7374, 0x75766D74, 0x6D797A70,
+ 0x756A7677, 0x72756C71, 0x70787970, 0x7A747879,
+ 0x7D7E757A, 0x6D787B72, 0x776E7376, 0x76797074,
+ 0x7A7A7C76, 0x807A7E80, 0x797B757E, 0x767B7D77,
+ 0x78727A7C, 0x79797378, 0x757B7B75, 0x7B757B7B,
+ 0x7B7B757B, 0x75787872, 0x79757B7B, 0x7B7A767A,
+ 0x777C7B77, 0x76727C7B, 0x7A797577, 0x747A7975,
+ 0x79757A7A, 0x7F7C787C, 0x0076736F, 0x03000302,
+ 0x00030102, 0x00010101, 0x00000000, 0x20211F00,
+ 0x4F585852, 0x6A5F5A59, 0x7874696C, 0x6D7C7B6D,
+ 0x77697C7B, 0x78776978, 0x61787566, 0x75667570,
+ 0x7370617A, 0x51606050, 0x5D55605F, 0x26231F60,
+ 0x01020000, 0x00010101, 0x01000200, 0x00000000,
+ 0x00000001, 0x00000000, 0x00000000, 0x14130200,
+ 0x3F3C3818, 0x47484842, 0x5550514F, 0x605C5759,
+ 0x5E616056, 0x6C616A6A, 0x6E6C616E, 0x6A767469,
+ 0x6D637676, 0x6160566E, 0x2646443A, 0x0100302E,
+ 0x02000002, 0x00010002, 0x00000000, 0x04020102,
+ 0x6F272824, 0x756F7175, 0x70746E71, 0x6F70746F,
+ 0x746F7074, 0x70746E70, 0x70767970, 0x756A7679,
+ 0x767A6F71, 0x68707469, 0x74687074, 0x70746870,
+ 0x49747970, 0x3B354B4F, 0x393D3837, 0x3B3C3D39,
+ 0x3D393C3D, 0x3C3D393C, 0x37383C37, 0x3B36393D,
+ 0x383C3737, 0x3A3C3D39, 0x413F3D3E, 0x40413F40,
+ 0x3C3D413C, 0x433C3B41, 0x3B413C3C, 0x473D413C,
+ 0x48474849, 0x4849474A, 0x4B4A4D4B, 0x4D4B4A4D,
+ 0x5050504A, 0x50505050, 0x50504E50, 0x1619174E,
+ 0x00000000, 0x00000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA8AAAB06, 0xBFBEC4C3, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8BFC2, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B7BFBF,
+ 0xC0C0B8C0, 0xB8C0BFB8, 0xBFB7BFBE, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xC0B7BFBF, 0xBFBFB8C0, 0xB8C0C0B7,
+ 0xBDB7BFBE, 0xBFBEB7C0, 0xB8C0C0B7, 0xBFB8C0C0,
+ 0xBFC0B8C0, 0xBAC0BFBA, 0xBDBBC1C0, 0xC0BFB8BE,
+ 0xBBC0BFBB, 0xBEB9BFBE, 0xBEBBB9BF, 0xB8BDBBB7,
+ 0xB9B8BEB9, 0xBAB8BABE, 0xB6B9B7B7, 0xB7B7BBB6,
+ 0xBEB9B8BC, 0xB9BAB6BA, 0x97ABACA8, 0xA19B9A9B,
+ 0xA4A8A29F, 0x9CA1A69D, 0xA39AA0A5, 0x9EA39AA0,
+ 0x9999A099, 0xA29B98A0, 0x98A1979A, 0x959A9F96,
+ 0x9C919AA0, 0x9A9F9696, 0x001D201E, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x55550000, 0x7F807E55, 0x717D7D77, 0x7B707A7B,
+ 0x797C7377, 0x767E807A, 0x807A7A7C, 0x7E807A7E,
+ 0x7880807A, 0x80778081, 0x84857C7F, 0x7E85867D,
+ 0x89808687, 0x85867D88, 0x7D85867D, 0x867D8586,
+ 0x85867D85, 0x7885867D, 0x81788081, 0x85867D80,
+ 0x7A83847A, 0x887E8384, 0x86877E87, 0x7685857F,
+ 0x69637C7C, 0x73746B69, 0x8083847B, 0x8A818689,
+ 0x7C7F7687, 0x7A81847B, 0x81778185, 0x80817780,
+ 0x74808177, 0x77727C7D, 0x7B78737A, 0x6A77746F,
+ 0x72687472, 0x6E6F6571, 0x596D6D61, 0x60566664,
+ 0x5A585061, 0x394E5247, 0x42394044, 0x6A6C663F,
+ 0x9280857C, 0x9B94969B, 0xAAB1AA94, 0xB2B6BBB2,
+ 0xC0B9B6BB, 0xB9C0B9B9, 0xB6BBC0B7, 0xBEB8BCBF,
+ 0xBABEB8BC, 0xB8B9BEB5, 0xBEB9B8BF, 0xB6BCB7B8,
+ 0xB7B8BFB8, 0xBEB7B7BE, 0xB7BEB7B7, 0xB8B8BFB8,
+ 0xBFB8B8BF, 0xB8BFB8B8, 0xBBB9BFBA, 0xC0BBBAC0,
+ 0xBCC0BBBC, 0xBEBDC0BE, 0xC0BEBDC0, 0xBCBFBDBD,
+ 0xBEBBC0BE, 0xC0BFBAC1, 0xBAC0BFBA, 0xBEBAC1BE,
+ 0xC0BFBAC1, 0xB8C0BFB8, 0xBFB8C0BF, 0xBCC0B9BE,
+ 0xB9BCC1B9, 0xBFB5B4BE, 0xABBBB7B3, 0xADA2B6B5,
+ 0xB7ABA1B8, 0x95B5A59C, 0xA294B6A2, 0xB8A798B8,
+ 0x97B8A897, 0xA797B9A8, 0xBBA796BB, 0x97BBA597,
+ 0xA796BBA5, 0xBBA796BB, 0x97BBA796, 0xA597BBA5,
+ 0xBAA597BB, 0x97BBA496, 0xA597BBA5, 0xB9A597B9,
+ 0x97BBA597, 0xA597BBA5, 0xB7A797B9, 0x92B7A595,
+ 0xA693BAA4, 0xBEA694BB, 0x94BDA795, 0xA495BBA6,
+ 0xB6A296BA, 0x94B6A095, 0xA395B7A2, 0xB8A094B8,
+ 0x97B8A094, 0xA597B9A2, 0xB7A798B8, 0x94B6A697,
+ 0xA494B6A4, 0xB7A697B7, 0x94B6A697, 0xA594B9A4,
+ 0xB6A594B9, 0x97B9A594, 0xA797B9A8, 0xB6A294B6,
+ 0x98B9A095, 0xA499B9A3, 0xB4A89CBA, 0x9DB7A498,
+ 0xAAA0B7A8, 0xB6A79FB6, 0xA1B4A6A1, 0xADAABAA5,
+ 0xBBAEAAB6, 0xB7BFB2B1, 0xBABFC2B5, 0xBDBABFC0,
+ 0xBBB6B9C0, 0xBABEB9B5, 0xB9BCC0BB, 0xBBB9B8BB,
+ 0xB6BBB9B8, 0xBCB8BDBC, 0xBEBDB7BD, 0xB6BBBAB9,
+ 0xB9B3B9B8, 0xBAB9B4BA, 0xB5BAB9B5, 0xB5B5B8B6,
+ 0xB7B2B6BA, 0xAEB4AFB1, 0xB3B3B6B4, 0xB8B3B2B5,
+ 0xB2B8B3B4, 0xB1B1B8B1, 0xB4ADB0B8, 0xADB4ADAD,
+ 0xAAADB3AE, 0xB4ADA9AF, 0xB1B8B1AD, 0xB3B6BAB4,
+ 0xBBB5B5B9, 0xB5BCB5B7, 0xABB1B8B1, 0xADA4ABB2,
+ 0xA8ADA4AA, 0x82999F9A, 0x6D688087, 0x4E554E66,
+ 0x2F3E3F36, 0x453B3839, 0x4B4C4244, 0x52505147,
+ 0x5E545B5C, 0x6263595D, 0x5E60635A, 0x72696467,
+ 0x66675E71, 0x7270706A, 0x79707878, 0x78797078,
+ 0x6875766D, 0x746B7071, 0x72736A73, 0x6D76776D,
+ 0x7A6F7677, 0x72756C76, 0x7277786F, 0x79737878,
+ 0x7D7D7779, 0x73777A71, 0x7970797C, 0x797C7376,
+ 0x7F7A7C76, 0x7B758385, 0x7F817B79, 0x727E807A,
+ 0x7C767678, 0x7C7C767C, 0x7A7D7D77, 0x7D778080,
+ 0x7B7B757D, 0x787A7A74, 0x7B757E7E, 0x7877737B,
+ 0x75787773, 0x76757A79, 0x78767578, 0x73787773,
+ 0x76727877, 0x78777377, 0x00787571, 0x02000403,
+ 0x01040201, 0x01000000, 0x00000000, 0x1F201E00,
+ 0x57595953, 0x6B606261, 0x7773686D, 0x6B7B7A6C,
+ 0x786D7A79, 0x7D7A6C7A, 0x617A7467, 0x70617570,
+ 0x6F6C5D75, 0x545F5F4F, 0x231F6060, 0x08060526,
+ 0x00000000, 0x00010000, 0x00000000, 0x00000100,
+ 0x00000102, 0x00000000, 0x00000000, 0x14130000,
+ 0x3F3C3818, 0x47484842, 0x5451514F, 0x605C5759,
+ 0x5E66645C, 0x675C6968, 0x706C616B, 0x636F6D62,
+ 0x6C646E6D, 0x69675F6E, 0x2447453B, 0x00002E2C,
+ 0x00000002, 0x00000001, 0x00000000, 0x01020002,
+ 0x00000400, 0x4F4A0004, 0x70746F4B, 0x71707371,
+ 0x746F7073, 0x70746E70, 0x6B71746B, 0x756A7174,
+ 0x72766B71, 0x68707468, 0x74687074, 0x70746970,
+ 0x374C504A, 0x3C37383C, 0x383C3738, 0x35393A36,
+ 0x3A363839, 0x3C3E383B, 0x36383C36, 0x3C36383C,
+ 0x383C3638, 0x363C3D39, 0x3E3C393A, 0x3C3D3B3D,
+ 0x3A383C37, 0x4039393F, 0x393F3A39, 0x443C3F3D,
+ 0x44424346, 0x44454343, 0x46454846, 0x4C4C4548,
+ 0x4B4B4B4C, 0x50515052, 0x50504F4E, 0x50505050,
+ 0x001D1D1D, 0x01010000, 0x00000001, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA8AAAB06, 0xC0BFC4C5, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0BABFC0, 0xBEBFBABF, 0xB9BFBEB9, 0xBFB9BFBE,
+ 0xBFBEBAC0, 0xB7BFBEB7, 0xBDB9BFBE, 0xC0BFB9C0,
+ 0xB9BFBEBA, 0xC0B7BFBF, 0xBEBFB8C0, 0xB9BFBEB9,
+ 0xBAB3BCB9, 0xBDBCB4BD, 0xB7BDBCB7, 0xBBB7BDBC,
+ 0xBDBCB7BE, 0xB8BDBBB8, 0xBBB7BEBB, 0xBDBBB7BE,
+ 0xB7BCBAB8, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xB9B8BEB9, 0xBDBBB8BE, 0xB8BDBBB8, 0xB5B5BBB6,
+ 0xBEB9B5BC, 0xB9BDB8B8, 0x97A8ACA7, 0xA29C989C,
+ 0x9DA19B9E, 0xA1A0A49E, 0xA59CA1A8, 0xA0A59CA0,
+ 0x9D9EA59E, 0xA0999CA2, 0x9BA49A98, 0x959A9F96,
+ 0xA0939AA0, 0x9DA59A97, 0x003C403B, 0x00000002,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x54560000, 0x80808055, 0x707B7A76, 0x79707879,
+ 0x7E817878, 0x7B7E807A, 0x7C777C80, 0x7E807A78,
+ 0x7A85857F, 0x837D8080, 0x86868083, 0x7B83847B,
+ 0x867D8384, 0x85867D85, 0x7A85867D, 0x81788283,
+ 0x86877E80, 0x7E85867D, 0x847B8687, 0x84857C83,
+ 0x78808178, 0x837B8280, 0x88867E85, 0x8087847F,
+ 0x84808784, 0x85857F87, 0x8383837D, 0x88828989,
+ 0x87887F88, 0x7883847B, 0x837B8081, 0x86847C85,
+ 0x74828078, 0x79747E7C, 0x78746F7D, 0x6974706B,
+ 0x72697371, 0x6E6F6571, 0x5A6D6D61, 0x5F556765,
+ 0x5A585061, 0x464D5146, 0x443B4B51, 0x5A5F563F,
+ 0x7C6E7168, 0x9C958085, 0xA8AFA895, 0xB4B8BCB6,
+ 0xBFBAB6BA, 0xB9C0B9B9, 0xB6BABFB6, 0xBEB8BABF,
+ 0xBABEB8BC, 0xB8B9BDB7, 0xBFBAB8BF, 0xB7BDB8B9,
+ 0xB8B7BDB8, 0xBDB8B7BD, 0xB7BDB8B7, 0xB8B8BFB8,
+ 0xBEB7B8BF, 0xB7BEB7B7, 0xB9B6BCB7, 0xBFBAB8BE,
+ 0xB9BFBAB9, 0xBDBABFBD, 0xC0BEBABF, 0xBDC0BEBD,
+ 0xBFBBC0BF, 0xC0BFBBC0, 0xBBC0BFBB, 0xBFBBC0BF,
+ 0xBFC0BAC0, 0xB8C0C0BA, 0xC0B8C0C0, 0xBFC2B8C0,
+ 0xBABEC3BA, 0xBDBBBEC3, 0xB3BEB5B4, 0xB3ACBBB9,
+ 0xB8ADA2B6, 0x9BB7ABA1, 0xA99AB9A9, 0xB7A798B7,
+ 0x98B7A798, 0xA697B7A7, 0xBBA696B8, 0x94B9A796,
+ 0xA695BAA5, 0xBBA695BA, 0x96BAA796, 0xA394BAA4,
+ 0xBAA695BA, 0x95BAA695, 0xA796BBA6, 0xBBA597BB,
+ 0x96BDA597, 0xA796BBA8, 0xB7A797B9, 0x91B6A595,
+ 0xA492B9A2, 0xBCA694BB, 0x95BCA795, 0xA495BBA7,
+ 0xB8A296BA, 0x96B8A094, 0xA597B9A4, 0xB6A196B7,
+ 0x95B7A095, 0xA696B8A3, 0xB8A798B8, 0x95B7A798,
+ 0xA393B5A5, 0xB7A497B7, 0x93B5A497, 0xA597BBA1,
+ 0xB6A493B8, 0x95B7A291, 0xA898BAA6, 0xB6A395B7,
+ 0x99BAA294, 0xA499B9A4, 0xB7A69DB8, 0x9DB7A69D,
+ 0xAAA2B9A6, 0xBBA6A2B5, 0xB2BEACAB, 0xBABCC4B2,
+ 0xC3B5B7BF, 0xBFC2BBBE, 0xB8C0C0BA, 0xBBB9BFBE,
+ 0xBCB7B7BE, 0xBAC0BBB6, 0xB7B8BCB7, 0xBBB9B8BC,
+ 0xB8BDBBB8, 0xBCB7BCBB, 0xBCBCB7BB, 0xB6B8B8BA,
+ 0xB9B3B8B7, 0xB7B8B4BA, 0xB4B9B8B2, 0xB6B5B8B6,
+ 0xB7B2B5B8, 0xB2B8B3B1, 0xB5B4B7B5, 0xB8B3B4B7,
+ 0xB2B8B3B4, 0xB2B2B8B3, 0xB3AEB0B7, 0xADB3AEAD,
+ 0xABADB4AD, 0xB7B0ABB2, 0xB0B8B1AF, 0xB1B3BBB1,
+ 0xBAB3B3BB, 0xB5BCB5B3, 0xAAB1B9AF, 0xA9A0ACB4,
+ 0xAAADA4A6, 0x819CA09B, 0x6D688086, 0x51554F67,
+ 0x30363930, 0x443B3839, 0x494C4343, 0x4D56574D,
+ 0x5D535657, 0x6263595C, 0x59606459, 0x6C636064,
+ 0x6B6C636B, 0x70707168, 0x7A717879, 0x78797079,
+ 0x6D787970, 0x756C7576, 0x76776E74, 0x6D76776D,
+ 0x79707677, 0x76776E78, 0x737B7C73, 0x79707B7C,
+ 0x797C7376, 0x6E72756C, 0x756C7477, 0x787B7272,
+ 0x72767872, 0x7C767678, 0x7B7E757A, 0x6F7A7D74,
+ 0x807A7578, 0x84847E80, 0x737F8077, 0x7C737B7C,
+ 0x7D7D777B, 0x787E7E78, 0x7B757E7E, 0x7B7B757B,
+ 0x73767773, 0x74707877, 0x77747077, 0x6F74736F,
+ 0x736F7273, 0x7B7C7872, 0x004F4E4A, 0x04020203,
+ 0x00020001, 0x00000000, 0x00000000, 0x20211F00,
+ 0x4E585950, 0x6B605958, 0x7874696D, 0x6C7B7A6C,
+ 0x796B7C7C, 0x7A77697C, 0x627A7467, 0x7062756F,
+ 0x6D6C5E73, 0x38616052, 0x05064240, 0x0805070A,
+ 0x00010101, 0x00000001, 0x00000000, 0x00010200,
+ 0x00000001, 0x00000000, 0x00000000, 0x14130000,
+ 0x3F3C3818, 0x47484842, 0x5451514F, 0x605C5759,
+ 0x5F65635B, 0x6C616A69, 0x706C6170, 0x636F6D63,
+ 0x6C646F6D, 0x6260586E, 0x25454339, 0x01002F2D,
+ 0x00010100, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000400, 0x04000004, 0x25292400, 0x71707371,
+ 0x736F7073, 0x72746E72, 0x6A71746B, 0x70657175,
+ 0x6D71666C, 0x68707468, 0x73687074, 0x5E61586F,
+ 0x37383C37, 0x3D38383C, 0x393B3539, 0x303B3B35,
+ 0x38303839, 0x3838323A, 0x33363A34, 0x3C37333A,
+ 0x35393438, 0x36393A36, 0x3B353B3A, 0x393B353B,
+ 0x373A3B37, 0x3C37383C, 0x373B3638, 0x3D3D403E,
+ 0x44443C3F, 0x44454344, 0x45454846, 0x4D4B464A,
+ 0x4C4D4B4C, 0x50514F4F, 0x4F4F5250, 0x50505051,
+ 0x1D585858, 0x00001D1D, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA8AAAB06, 0xC0BFC4C5, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0BABFC0, 0xBFBEBABF, 0xB9BFBEB9, 0xBFB9BFBE,
+ 0xC0BFBAC0, 0xB7BFBEB8, 0xBDBAC1BE, 0xBFBEB9C0,
+ 0xB9BFBEB9, 0xC1B8C0C0, 0xBFBEB9C1, 0xB9BFBEB9,
+ 0xBEB7C0BD, 0xC0BFB8C1, 0xB9BFBEBA, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB7BDBCBA, 0xBBB7BDBC, 0xBCBBB7BE,
+ 0xB9BEBCB7, 0xB9B8BDBB, 0xBAB8B6BB, 0xB8BDBBB5,
+ 0xBAB8BEB9, 0xBDBBB9BF, 0xB8BEB9B8, 0xB5B5BBB6,
+ 0xBBB6B4BC, 0xB8BEB9B5, 0x97A8ACA7, 0xA29C989C,
+ 0xA1A8A19E, 0xA19CA39C, 0xA59CA1A8, 0xA0A59CA0,
+ 0x9C9EA59E, 0xA0999CA3, 0x99A19798, 0x95999E95,
+ 0xA0959AA0, 0xA1A99F98, 0x005C605B, 0x00000001,
+ 0x01010100, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010101,
+ 0x2B2B0000, 0x80817F2B, 0x757B7A76, 0x7E757B7B,
+ 0x7B7D777D, 0x7A787C76, 0x807B7B7F, 0x7E7F7B7C,
+ 0x7B80807A, 0x857F8181, 0x85857F85, 0x7B82837A,
+ 0x847B8384, 0x83847B83, 0x7D888980, 0x857C8586,
+ 0x83847B84, 0x7D85867D, 0x89808586, 0x85867D88,
+ 0x7B85837B, 0x80788583, 0x85827D82, 0x7F87847F,
+ 0x84808784, 0x87847F87, 0x827E7E78, 0x88828888,
+ 0x89898388, 0x7885867D, 0x867D8081, 0x82807885,
+ 0x747E7C74, 0x736E7E7C, 0x77746F76, 0x66737169,
+ 0x6F66706E, 0x6E6F656E, 0x5A6D6D61, 0x5F556765,
+ 0x5A594F61, 0x47505147, 0x433A4E52, 0x4E514840,
+ 0x7E6E7168, 0x9B948084, 0xA8B0A994, 0xB5B8BCB6,
+ 0xBCB7B7BB, 0xBAC0BBB6, 0xB9BABEB8, 0xBDB7BBBF,
+ 0xBABEB8BB, 0xB8BABEB8, 0xBEB9B8BF, 0xB7BDB8B8,
+ 0xB9B7BDB8, 0xBDB8B8BE, 0xB8BEB9B7, 0xB7B9BFBA,
+ 0xBEB7B7BE, 0xB7BEB7B7, 0xB7B6BCB7, 0xBBB6B6BC,
+ 0xB6BCB7B5, 0xBCB9BEBC, 0xBFBDB9BE, 0xBCBFBDBC,
+ 0xBFBBC0BF, 0xC0BFBBC0, 0xBBC0BFBB, 0xBFBBC0BF,
+ 0xBFC0BAC0, 0xB8C0C0BA, 0xC0B8C0C0, 0xBFC2B8C0,
+ 0xB7BEC1B8, 0xC3BABFC2, 0xB4BDBABE, 0xB1ADB8B5,
+ 0xB9B0A9B8, 0xA2B7B0A8, 0xABA1B8AB, 0xB8A89DB7,
+ 0x9FB9A99E, 0xA79BB7AA, 0xB9A798B8, 0x95B7A797,
+ 0xA998BAA6, 0xB9A797B9, 0x97BBA797, 0xA496BAA5,
+ 0xBBA597BB, 0x96BBA597, 0xA597BBA7, 0xBBA597BB,
+ 0x95BCA597, 0xA594B9A7, 0xB6A493B8, 0x90B7A494,
+ 0xA492B9A2, 0xBBA694BB, 0x93BAA694, 0xA496BAA5,
+ 0xB7A496BA, 0x96B8A395, 0xA696B8A6, 0xB6A294B6,
+ 0x94B6A294, 0xA595B7A2, 0xB8A697B7, 0x95B7A798,
+ 0xA595B7A5, 0xB6A497B7, 0x96B7A396, 0xA496B8A1,
+ 0xB8A395B9, 0x95B7A493, 0xA797B9A5, 0xB7A79ABA,
+ 0x99B9A497, 0xA69CBAA4, 0xB7A89FB9, 0xA1B6A8A0,
+ 0xA8A4B7A8, 0xBCABABB9, 0xBDC2B1B2, 0xB9BEC1B9,
+ 0xC0B5B8BC, 0xBFC0BABF, 0xB8C0BFBA, 0xBBB7C0BD,
+ 0xBEBBB7BE, 0xBAC0BBB7, 0xB6BABEB8, 0xBCB7B8BC,
+ 0xB8BDBBB8, 0xBCB8BDBC, 0xBBBBB8BD, 0xB6B8B8B9,
+ 0xB8B4B9B8, 0xB8B7B3B9, 0xB2B8B7B2, 0xB1B0B3B1,
+ 0xB4AFB0B3, 0xAEB4AFAE, 0xB1B1B5B0, 0xB6B1B2B6,
+ 0xB1B7B2B2, 0xABACB2AD, 0xB0ABA9B0, 0xAAB0ABAA,
+ 0xA6AAB0AB, 0xB4ADA6AD, 0xB1B8B1AD, 0xB5B5BCB5,
+ 0xB8B1B5BC, 0xB4BBB4B1, 0xA5B1B9AF, 0xA9A0A7AF,
+ 0xA6A8A2A6, 0x81999F9A, 0x6E698086, 0x50544E68,
+ 0x36353731, 0x463D3E3F, 0x474A4143, 0x5356574D,
+ 0x5C525C5D, 0x6263595B, 0x62696D62, 0x7168696D,
+ 0x70716870, 0x70707168, 0x786F7879, 0x78797077,
+ 0x70787970, 0x79707879, 0x78797078, 0x6B73746A,
+ 0x756C7475, 0x76776E74, 0x70787970, 0x7E757879,
+ 0x797C737B, 0x7072756C, 0x79707679, 0x74776E76,
+ 0x72767872, 0x7C767678, 0x7E81787A, 0x757A7D74,
+ 0x7C767B7E, 0x7C7C767C, 0x737E7F76, 0x7C737B7C,
+ 0x7D7E757B, 0x757E7E78, 0x7B757B7B, 0x7979737B,
+ 0x75767773, 0x74707A79, 0x7A777377, 0x6F777672,
+ 0x74707273, 0x7B7C7873, 0x004E4F4B, 0x02000203,
+ 0x00030100, 0x00000000, 0x00000000, 0x20211F00,
+ 0x4F585950, 0x6B605A59, 0x7976686F, 0x6A787769,
+ 0x76687A7A, 0x7A776977, 0x5F787567, 0x6C5E706D,
+ 0x6867596D, 0x395F5F53, 0x04054142, 0x08050709,
+ 0x00000000, 0x00000001, 0x00010100, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x14140000,
+ 0x3D3C3816, 0x47484842, 0x55504F50, 0x5F5C5758,
+ 0x5E626058, 0x685E6866, 0x6E6C626A, 0x636E6C62,
+ 0x665E6F6D, 0x63615968, 0x2545443A, 0x01002F2D,
+ 0x00000000, 0x01000001, 0x00000000, 0x00010000,
+ 0x00000301, 0x03010004, 0x00030100, 0x520E1010,
+ 0x736F5052, 0x72746E72, 0x656C6F66, 0x6F666C70,
+ 0x686C616C, 0x6971756A, 0x61587074, 0x393B355E,
+ 0x39383C37, 0x3C37383B, 0x383C3738, 0x3037382F,
+ 0x39303839, 0x36383238, 0x3230342E, 0x37323239,
+ 0x35393433, 0x36363733, 0x3B35393A, 0x393B353B,
+ 0x363A3C36, 0x3B373A3C, 0x383C373A, 0x38393C3A,
+ 0x3F3F373A, 0x3D403E3F, 0x3F40443F, 0x48464044,
+ 0x4C4D4B47, 0x50535151, 0x50505250, 0x52505052,
+ 0x57585957, 0x1E1C5859, 0x0001001D, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA9ADAE06, 0xC0BEC3C4, 0xC0C0B8C0, 0xB7BFBFB8,
+ 0xC0BABFC0, 0xBFC0BABF, 0xBBC0BFBB, 0xBFB9BFBE,
+ 0xC0C0BAC0, 0xB8C0C0B8, 0xBEB9BFBE, 0xC0BDBBC0,
+ 0xB9BFBEB9, 0xC0B8C0C0, 0xC0BFB8C0, 0xB8BEBDBA,
+ 0xBFB8C0BF, 0xBFC0B8C0, 0xBABFC0BA, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xB9BEBFBA, 0xBFBABFC0, 0xBFC0B8C0,
+ 0xB9BFBEBA, 0xBEB9BFBE, 0xBDBBB9BF, 0xB9BEBCB8,
+ 0xBBB9C0BD, 0xBDBBB8BD, 0xB8BEB9B8, 0xB8B8BEB9,
+ 0xBCB7B8BF, 0xBABEB9B8, 0x99AEB4AF, 0xA09999A0,
+ 0xA2AAA399, 0xA2A0A8A1, 0xA49BA2A9, 0xA0A59C9F,
+ 0x989CA499, 0xA3999BA3, 0x99A1979B, 0x969BA097,
+ 0x9F969A9F, 0x9FA49B9A, 0x005F6560, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x2C2A0001, 0x7E7F7B2B, 0x737C7C76, 0x78727B7C,
+ 0x7C7E7876, 0x79797D77, 0x7F7A7B7F, 0x7E7F7B7B,
+ 0x7B85857F, 0x7D788380, 0x83807B80, 0x79838179,
+ 0x7F768381, 0x7E7F767E, 0x7883847B, 0x81788081,
+ 0x84857C80, 0x7D83847B, 0x867D8586, 0x83847B85,
+ 0x7E86837E, 0x807B8683, 0x8B888383, 0x7E87847F,
+ 0x88828687, 0x85867D88, 0x7A84857C, 0x867D8283,
+ 0x83847B85, 0x787F8077, 0x7E758081, 0x7B7C737D,
+ 0x707B7C73, 0x78727879, 0x78787278, 0x6B76776E,
+ 0x71687374, 0x73746B6E, 0x60737268, 0x62596D6B,
+ 0x5E5C5267, 0x4555544A, 0x493F4D4E, 0x4D4E4548,
+ 0x7E6C6E68, 0x98937F83, 0x90979292, 0xB3B4B8B3,
+ 0xB8B3B4B8, 0xC1C5C0B4, 0xB8BCC0BB, 0xBDB9BBBC,
+ 0xB9BDB8BC, 0xB9B9BDB8, 0xBDB8B8BE, 0xB7BDB8B7,
+ 0xBAB7BCBA, 0xBCBAB7BC, 0xB7BDB8B7, 0xB8B7BDB8,
+ 0xBDB8B7BD, 0xB7BDB8B7, 0xB8B6BCB7, 0xBDB8B7BD,
+ 0xB7BDB8B7, 0xBBB7BCBA, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBDBCB8BD, 0xBABFBEB8, 0xBFBAC0BF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB8C0BF, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC2B8C0C0, 0xBFC2B8BF, 0xB9BDC2B8,
+ 0xBCB4B6BE, 0xAAB6B3B2, 0xABA8B7AE, 0xB7A7A4B4,
+ 0xABBEA6A4, 0xAAA2B9AF, 0xB7A89CB8, 0x97B8A697,
+ 0xA897B8A8, 0xB9A596B6, 0x96B8A797, 0xA597BBA6,
+ 0xBBA597BB, 0x96BCA397, 0xA396BCA5, 0xB9A295BB,
+ 0x93B9A093, 0xA294B8A2, 0xB6A493B8, 0x92B9A494,
+ 0xA492B9A4, 0xBCA795BC, 0x97BBA795, 0xA597BBA5,
+ 0xB6A395B9, 0x95B7A494, 0xA797B9A5, 0xB8A294B6,
+ 0x94B8A294, 0xA294B6A2, 0xBAA295B5, 0x96B8A79A,
+ 0xA294B6A4, 0xB6A497B7, 0x94B6A396, 0xA496B8A2,
+ 0xB6A597B9, 0x98B8A294, 0xA598B8A5, 0xBAA89CBA,
+ 0x9CB8A89C, 0xA69DB7A8, 0xB6ABA3BA, 0xA5B5A7A3,
+ 0xAEACB8A8, 0xBBB5B7BF, 0xBCBDB4B7, 0xB7BDBCB7,
+ 0xBCB7BCBB, 0xBDBCB7BD, 0xB6BEBDB7, 0xBAB4BDBA,
+ 0xBAB7B4BD, 0xB7BCBAB3, 0xB3B8BCB7, 0xB9B4B5B9,
+ 0xB6BCB7B3, 0xB9B8BBB9, 0xBABAB8BB, 0xB3B8B7B8,
+ 0xB8B2B9B6, 0xBBB8B4BB, 0xB3BAB7B4, 0xAFB6BAB5,
+ 0xB3B1B0B4, 0xB4B8B3B0, 0xB2B4B8B3, 0xBAB5B3B7,
+ 0xB3B9B4B6, 0xB1B0B5B3, 0xB6B1ADB4, 0xB0B6B1B0,
+ 0xAFB0B4AF, 0xB4AEB0B4, 0xB3B7B1B0, 0xB7B9BDB7,
+ 0xB7B2B8BC, 0xB1B8B1B3, 0xA3AEB6AC, 0xABA4A5AD,
+ 0xA5ACA5A4, 0x6E848987, 0x58536B70, 0x3E403A54,
+ 0x403D3D37, 0x483F4646, 0x4E514845, 0x555A5B51,
+ 0x5F555E5F, 0x63645A5E, 0x60686960, 0x6E656869,
+ 0x6D6E656D, 0x6B707168, 0x766D7374, 0x78797075,
+ 0x777D7D77, 0x7C737D7D, 0x7B7C737B, 0x73787970,
+ 0x7C737B7C, 0x7879707B, 0x6F787970, 0x79707778,
+ 0x78797078, 0x70787970, 0x7A717879, 0x77786F79,
+ 0x7D81847B, 0x7C768183, 0x7A7C767A, 0x727C7F76,
+ 0x7E75787B, 0x7D7E757D, 0x777F7D75, 0x8078817F,
+ 0x807E7682, 0x73797A71, 0x78727979, 0x75756F78,
+ 0x75767773, 0x736F7A79, 0x77747076, 0x72767473,
+ 0x75717374, 0x7E7F7B74, 0x0040443F, 0x02000002,
+ 0x00000001, 0x00000000, 0x00000000, 0x20211F00,
+ 0x52505148, 0x685D5D5C, 0x7976686C, 0x68757466,
+ 0x78687878, 0x75756578, 0x61707060, 0x67597171,
+ 0x5C5C4E68, 0x294A4C40, 0x04003233, 0x07030207,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000001, 0x14140000,
+ 0x38393714, 0x433E403A, 0x564D4B4C, 0x60615855,
+ 0x5E65665D, 0x6B636667, 0x6D6C626D, 0x616E6C62,
+ 0x645A6E6C, 0x605F5565, 0x294A493F, 0x01003132,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00000000,
+ 0x1F1D0000, 0x5B5C581E, 0x686E706A, 0x706A6E71,
+ 0x70716870, 0x60666960, 0x352F6669, 0x32332F33,
+ 0x2F30342F, 0x33312E34, 0x30342F2E, 0x2E30342E,
+ 0x342E3234, 0x30342F32, 0x2F30342F, 0x342E3034,
+ 0x30342E30, 0x2F30342F, 0x342E3034, 0x32342E32,
+ 0x30363832, 0x37313639, 0x36383235, 0x36353934,
+ 0x38363538, 0x35383635, 0x3F40443F, 0x433F4044,
+ 0x42434142, 0x504F4F4F, 0x51515050, 0x50514F51,
+ 0x52585753, 0x57535858, 0x2A292558, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070605,
+ 0xAAAEAF06, 0xC0BEC3C4, 0xC0C0B8C0, 0xB7BFBFB8,
+ 0xC0BABFC0, 0xBFC0BABF, 0xBBBFC0BB, 0xBFB9BFBE,
+ 0xC0C0BAC0, 0xB8C0C0B8, 0xBDB9BFBE, 0xC0BDBABF,
+ 0xB9C0BDB9, 0xC0B8C0C0, 0xC0BFB8C0, 0xB9BFBEBA,
+ 0xBFBAC0BF, 0xBFC0B8C0, 0xB9BEBFBA, 0xC0B9C1C1,
+ 0xBDBEB8C0, 0xBABFC0B8, 0xBEB8C0C0, 0xC0C1B6BE,
+ 0xBABFC0BB, 0xBEB9BFBE, 0xC0BEB9BF, 0xB7BCBABB,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xBABEB9BA, 0xB6B6BDB6,
+ 0xBCB7B6BD, 0xB8BCB7B8, 0x99ACB3AC, 0xAAA399A0,
+ 0xA2AAA3A2, 0x9EA1A9A2, 0xA59C9EA5, 0xA0A69BA0,
+ 0x979DA59A, 0xA2979BA4, 0x99A1979A, 0x969A9F96,
+ 0x9E959A9F, 0xA3A7A199, 0x005D635E, 0x00000002,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000100,
+ 0x2B290102, 0x7E7F7B2A, 0x71787872, 0x7C767777,
+ 0x797B757A, 0x79797D77, 0x7F7A7B7F, 0x7D7E7A7B,
+ 0x7881817B, 0x807B807D, 0x83807B83, 0x7A838179,
+ 0x82798482, 0x81827981, 0x7D808178, 0x847B8586,
+ 0x83847B83, 0x7B84857C, 0x847B8384, 0x80817883,
+ 0x7B7F7C77, 0x7F7A8380, 0x827F7A82, 0x7885867D,
+ 0x81788081, 0x81827980, 0x78808178, 0x847B8081,
+ 0x82837A83, 0x78818279, 0x81788081, 0x7A7D747E,
+ 0x737E7F76, 0x78727B7C, 0x76787278, 0x6C787970,
+ 0x766D7475, 0x73746B73, 0x60727167, 0x63586C6A,
+ 0x5F5B5067, 0x4B5A5850, 0x483E5354, 0x48494049,
+ 0x696C6E68, 0x97926A6E, 0x91979291, 0xB4B4B8B3,
+ 0xB8B3B5B9, 0xC0C4BFB4, 0xB8BCC0BB, 0xBCB8BBBC,
+ 0xB9BDB8BB, 0xB9B9BDB8, 0xBDB8B8BE, 0xB7BDB8B7,
+ 0xB9B6BBB9, 0xBBB9B6BB, 0xB7BCBAB6, 0xB7B6BCB7,
+ 0xBCB7B6BC, 0xB7BDB8B6, 0xB8B7BDB8, 0xBDB8B7BD,
+ 0xB8BEB9B7, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBBABFBD, 0xBDBCB8BD, 0xB9BEBDB8, 0xBFB9BFBE,
+ 0xBFBFB8C0, 0xB9C1C0B7, 0xBEB8C0BF, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xBFB7BFBF, 0xC1C1B8C0, 0xB8C0C0B9,
+ 0xC3BABFC2, 0xB7C0BBBE, 0xB5B6C0B8, 0xBEB3B4BE,
+ 0xB3C1B1B3, 0xADABBEB3, 0xBBAAA1BB, 0x98B7A99D,
+ 0xA798B8A7, 0xB7A697B7, 0x94B6A595, 0xA294B6A4,
+ 0xB8A094B8, 0x93B9A094, 0xA093B9A0, 0xB99F92B8,
+ 0x96BCA093, 0xA395B9A5, 0xB7A696B8, 0x93B8A595,
+ 0xA290B7A4, 0xBCA795BC, 0x97BBA795, 0xA597BBA5,
+ 0xB6A696B8, 0x95B6A494, 0xA898BAA6, 0xB8A294B8,
+ 0x96BAA294, 0xA496BAA4, 0xBCA496B8, 0x98BCA89A,
+ 0xA395B9A6, 0xB7A597B9, 0x94B6A497, 0xA497B7A2,
+ 0xB5A398B8, 0x99B7A095, 0xA59BB9A3, 0xB7A79BB7,
+ 0xA2BCA89D, 0xABA4B9AD, 0xBBA7A3B6, 0xB3BFADAD,
+ 0xBABCC4B3, 0xBBB8BCBD, 0xC0BFB7BC, 0xB7BDBCBA,
+ 0xBBB7BCBB, 0xC0BFB8BD, 0xB5BDBCBA, 0xB7B3BCB9,
+ 0xB9B8B1BA, 0xB3BAB7B1, 0xB1B3B9B4, 0xB8B3B3B7,
+ 0xB4BAB5B2, 0xB7B8BCB7, 0xB9B8B8BC, 0xB4B9B8B4,
+ 0xB9B5BBBA, 0xBBB6B5BC, 0xB5BBB6B4, 0xB5B8BCB7,
+ 0xB6B4B6BA, 0xB3B7B2B3, 0xB4B3B7B2, 0xB7B2B6BA,
+ 0xAEB3B1B3, 0xB5B1B6B5, 0xB6B4B0B6, 0xB0B6B1B1,
+ 0xAFB0B3B1, 0xB7B2B2B3, 0xB5B9B3B3, 0xB7B9BAB6,
+ 0xBAB5BABB, 0xB0B4AEB6, 0xA2AEB5AE, 0xACA5A3AC,
+ 0x9BA19CA5, 0x6F828785, 0x56526C71, 0x3E403A55,
+ 0x3F3C3C36, 0x51484748, 0x5A5B5250, 0x55595A50,
+ 0x645A5E5F, 0x63645A63, 0x60686960, 0x69606869,
+ 0x6B6C6368, 0x6B707168, 0x766D7374, 0x78797075,
+ 0x7B7D7D77, 0x80778181, 0x7D7E757F, 0x707D7E75,
+ 0x7C737879, 0x7B7C737B, 0x707B7C73, 0x79707879,
+ 0x77786F78, 0x767D7E75, 0x7C737E7F, 0x7879707B,
+ 0x8A8E9188, 0x7B778E90, 0x7A7B777A, 0x75767872,
+ 0x81787B7E, 0x80817880, 0x78817F77, 0x81798280,
+ 0x82807883, 0x73808178, 0x7D777B7C, 0x7878727D,
+ 0x75797A76, 0x78747879, 0x7976727B, 0x6F767473,
+ 0x76747071, 0x74757175, 0x00131712, 0x00000001,
+ 0x01010100, 0x00000000, 0x00000000, 0x1F201E00,
+ 0x52505148, 0x685D5D5C, 0x7774666C, 0x65787769,
+ 0x73637575, 0x72736372, 0x5F707060, 0x67596F6F,
+ 0x5D5D4F68, 0x2A4A4C40, 0x04003334, 0x07040007,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x01000001, 0x13130000,
+ 0x38393713, 0x433E403A, 0x564D494C, 0x60615855,
+ 0x5D606158, 0x6D646566, 0x6D6B636C, 0x616E6C62,
+ 0x665C6E6C, 0x59584E68, 0x2948493F, 0x01003132,
+ 0x00000000, 0x01000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000001,
+ 0x00000000, 0x00010000, 0x6B494A46, 0x706A6F71,
+ 0x70706A70, 0x49656761, 0x352F4D4F, 0x33343033,
+ 0x2F30342F, 0x33312E34, 0x30333130, 0x2F30342F,
+ 0x342F3034, 0x30342F30, 0x2F30342F, 0x342F3034,
+ 0x30342E30, 0x2F30342F, 0x342F3034, 0x32342E30,
+ 0x30383832, 0x39303839, 0x36383236, 0x36353934,
+ 0x38363538, 0x35383635, 0x34353934, 0x433F3539,
+ 0x42433F42, 0x5050514F, 0x50505050, 0x50514F50,
+ 0x50575751, 0x58525859, 0x58575358, 0x00191A18,
+ 0x01010001, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070605,
+ 0xAAAEAF06, 0xC0BEC3C4, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFC0BABF, 0xBBBFC0BB, 0xBFBAC0BF,
+ 0xC0C0BAC0, 0xB8C0C0B8, 0xBDB9BFBE, 0xC0BDB9C0,
+ 0xB9C0BDB9, 0xC0B8C0C0, 0xBFBEB8C0, 0xBAC0BFB9,
+ 0xBFBAC0BF, 0xBEBFBAC0, 0xBBC0C1B9, 0xBEB8C0BF,
+ 0xBFBEB7BF, 0xB9BFBEB9, 0xBFB9BFBE, 0xBFBEBAC0,
+ 0xBABFBEBA, 0xBCB8BDBC, 0xBBB9B8BD, 0xB8BDBBB6,
+ 0xBAB6BCB7, 0xBEB9BBBF, 0xB8BCB7BA, 0xB6B8BCB6,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xA1B7BEB7, 0xA9A2A3AB,
+ 0xA3AAA3A2, 0x9EA1A8A1, 0xA59C9EA5, 0xA0A69BA0,
+ 0x979CA297, 0xA3989DA4, 0x9AA2979B, 0x959BA196,
+ 0xA0959AA0, 0xA3A89F9A, 0x005F6560, 0x00000002,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x55565200, 0x797E7D79, 0x77737E7D,
+ 0x797A7676, 0x757A7E78, 0x7D77777B, 0x7D7F797B,
+ 0x7880807A, 0x7E76807D, 0x807E7680, 0x7D807E76,
+ 0x81798785, 0x807E7683, 0x7B808178, 0x8A818384,
+ 0x85867D89, 0x7D85867D, 0x89808586, 0x85867D88,
+ 0x7E86837E, 0x807B8683, 0x84817C83, 0x77828078,
+ 0x8178817F, 0x7F807780, 0x7E808178, 0x847A8687,
+ 0x80817783, 0x72808178, 0x7A717A7B, 0x7B7C7379,
+ 0x717A7870, 0x7970797A, 0x7B7C7378, 0x6D787970,
+ 0x746B7576, 0x74756C73, 0x5F707167, 0x63586A69,
+ 0x5E5C5167, 0x4B56544C, 0x4E455354, 0x47483F4D,
+ 0x6A575953, 0x847D6B6F, 0x9299927D, 0xB2A8ACA6,
+ 0xB8B2B4B8, 0xB4B8B3B4, 0xBAB9BDB8, 0xBCBAB9BC,
+ 0xB9BDB8B9, 0xB6B7BBB6, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB7B6BCB7, 0xBCB7B6BC, 0xB7BDB8B6, 0xB8B7BDB8,
+ 0xBEB7B7BD, 0xB7BEB7B7, 0xB8B9C0B9, 0xBDB8B8BF,
+ 0xB8BEB9B7, 0xBAB9BDB8, 0xBEB9BBBF, 0xBABEB9BA,
+ 0xBAB7BCBA, 0xBCBAB7BC, 0xB9BEBCB9, 0xBEBABFBD,
+ 0xBFBEBBC0, 0xBABFBEBA, 0xBDBABFBE, 0xC0BFB9C0,
+ 0xB9BFBEBA, 0xBDBAC0BF, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xC2BABFC0, 0xBEC2BABF, 0xB5B8BDBB, 0xC1B9BCC1,
+ 0xBAC4B8BC, 0xACACBAB8, 0xBAA8A0B7, 0x9CB8AA9E,
+ 0xA599B7A8, 0xB6A294B6, 0x94B6A294, 0xA294B6A2,
+ 0xB8A195B9, 0x94B8A094, 0xA094B8A0, 0xBCA295BB,
+ 0x98BCA396, 0xA799BDA6, 0xB9A595B7, 0x93B8A797,
+ 0xA190B5A4, 0xBBA897BC, 0x97BBA796, 0xA597BBA5,
+ 0xB6A595B7, 0x96B6A494, 0xA696B8A5, 0xB9A294B8,
+ 0x95BBA093, 0xA397BBA2, 0xBBA297B8, 0x96BAA59A,
+ 0xA094B8A2, 0xB8A496B8, 0x96B6A496, 0xA497B7A5,
+ 0xB7A59ABA, 0x9CB7A399, 0xA9A0BBA5, 0xB7ABA2BC,
+ 0xA4BBA69D, 0xAEAABDAC, 0xBDACAEB9, 0xBCC1B2B5,
+ 0xB8BDC0B8, 0xBCBABFC0, 0xBFC0B7BD, 0xB7BDBCBA,
+ 0xBBB8BDBC, 0xBCBBB7BC, 0xB5BDBCB6, 0xB7B5BEBB,
+ 0xB9B8B1BA, 0xB6BDBAB1, 0xB2B3B9B4, 0xBCB7B3B7,
+ 0xB3B9B4B6, 0xB7B8BCB6, 0xB9B8B8BC, 0xB2B7B6B4,
+ 0xB8B6BBBA, 0xBDB8B5BA, 0xB8BCB7B7, 0xB4B8BCB7,
+ 0xB8B3B7B8, 0xB0B4AFB4, 0xB5B3B7B2, 0xB5B3B6BA,
+ 0xB0B5B3B2, 0xB6B2B7B6, 0xB7B5B1B7, 0xAEB3B1B2,
+ 0xB2B0B4AF, 0xB8B3B3B7, 0xB5B9B4B4, 0xB6B8BCB7,
+ 0xB7B3B7BB, 0xB3B7B1B6, 0xA2A5ACA5, 0xACA5A4AC,
+ 0x919792A5, 0x6E828785, 0x58546D70, 0x40403A57,
+ 0x3F3F3D35, 0x50484947, 0x5A5B5152, 0x5B64655C,
+ 0x645B6364, 0x63645B63, 0x61686960, 0x6C63696A,
+ 0x7071686B, 0x6A707168, 0x79707273, 0x78797078,
+ 0x787A7A74, 0x807A7E7E, 0x7D7D7780, 0x737D7E75,
+ 0x7C727B7C, 0x7B7C737B, 0x73787970, 0x7B757979,
+ 0x7C7C767B, 0x6F787970, 0x7C737778, 0x7C7D747B,
+ 0x7782847E, 0x7C77787C, 0x787C7778, 0x74797B75,
+ 0x8279787A, 0x7D7E7581, 0x77807D78, 0x7E767F7C,
+ 0x817F7780, 0x787E7C74, 0x7A758280, 0x7D7D777D,
+ 0x757A7B77, 0x77737879, 0x7774707A, 0x70767473,
+ 0x73727371, 0x71727075, 0x00141715, 0x00000001,
+ 0x00000000, 0x00020000, 0x00000000, 0x20211F00,
+ 0x52505148, 0x685D5D5C, 0x7875676C, 0x65787769,
+ 0x76637575, 0x6F715E74, 0x596F7060, 0x5C4E6969,
+ 0x5553485D, 0x2A4D4C42, 0x04003334, 0x07040007,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x13130001,
+ 0x38393713, 0x44403F3B, 0x554D4A4A, 0x63615957,
+ 0x5D66675E, 0x6B656566, 0x7270686B, 0x5A6E6C62,
+ 0x655B6765, 0x5A585067, 0x2948493F, 0x01002F32,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x20000100, 0x4A462324,
+ 0x70706A4B, 0x2E4E504A, 0x36303234, 0x32342E34,
+ 0x2F32332F, 0x33313034, 0x30333132, 0x31303331,
+ 0x33313033, 0x30333130, 0x2F323331, 0x332F3233,
+ 0x32332F32, 0x31303331, 0x33313033, 0x32332F32,
+ 0x32383832, 0x38323838, 0x36373336, 0x36353836,
+ 0x37373538, 0x35383637, 0x33363A35, 0x38343539,
+ 0x41423E37, 0x4F4E524D, 0x514F4E51, 0x50514F4E,
+ 0x51585852, 0x57535757, 0x55565256, 0x004B4C4A,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA8ACAD06, 0xC0BEC3C4, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFC0BABF, 0xBBBFC0BA, 0xBEB9BFBE,
+ 0xC0C0B9BF, 0xB7BFBFB8, 0xBDB9BFBE, 0xC0BDB9C0,
+ 0xB9BFBEB9, 0xBFB8C0C0, 0xBEBDB7BF, 0xBAC0BFB8,
+ 0xBFBBC1C0, 0xBFC0BAC0, 0xBBC0C1BA, 0xBFB8C0BF,
+ 0xBFBEB8C0, 0xB9BFBEB9, 0xBBB9BFBE, 0xBDBCB7BE,
+ 0xB8BDBCB8, 0xBCB9BEBD, 0xBCBAB8BD, 0xB8BDBBB7,
+ 0xB6B8BCB7, 0xBDB8B7BB, 0xB8BCB7B9, 0xB8B8BCB7,
+ 0xBEB9B9BD, 0xB6BCB7BA, 0xABB6BDB6, 0xAAA3ADB5,
+ 0xA3AAA3A3, 0x9E9EA59E, 0xA59C9EA5, 0xA0A59CA0,
+ 0x979FA59A, 0xA3989CA2, 0x9BA3989B, 0x959AA095,
+ 0xA0959AA0, 0xA3A89F9A, 0x005D635E, 0x01010001,
+ 0x00000001, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x54555300, 0x7783827E, 0x7D797C7B,
+ 0x7C7E787C, 0x787E807A, 0x7C767C7E, 0x81817B7A,
+ 0x7B84817C, 0x81798380, 0x83817983, 0x76838179,
+ 0x7E76807E, 0x83817980, 0x7D888980, 0x867D8586,
+ 0x85867D85, 0x8083847B, 0x867D8889, 0x83847B85,
+ 0x7E86847C, 0x807B8683, 0x83807B83, 0x78817F77,
+ 0x81788280, 0x80817880, 0x7C808178, 0x867C8485,
+ 0x84857B85, 0x797D7E75, 0x7B728182, 0x7D7E757A,
+ 0x727E7C74, 0x79707C7A, 0x78797078, 0x70787970,
+ 0x766D7879, 0x73746B75, 0x61717268, 0x63586A6B,
+ 0x5E5C5165, 0x4C59574F, 0x544B5455, 0x46494053,
+ 0x69585A54, 0x847D6B6F, 0x9198917D, 0xB39CA09A,
+ 0xB8B2B5B9, 0xB4B8B2B4, 0xB6B5BBB6, 0xBAB8B5BB,
+ 0xB7BBB6B7, 0xB7B8BCB7, 0xBCB7B9BD, 0xB8BCB7B8,
+ 0xB8B6BCB7, 0xBDB8B7BD, 0xB7BDB8B7, 0xB9B7BDB8,
+ 0xBEB7B8BE, 0xB6BDB6B7, 0xB7B6BDB6, 0xBDB8B7BE,
+ 0xB5BBB6B7, 0xB5B5B9B4, 0xBBB6B6BA, 0xB7BBB6B7,
+ 0xBAB6BBB9, 0xBBB9B7BC, 0xB6BBB9B8, 0xB8B6BBB9,
+ 0xBBBAB5BA, 0xB6BBBAB6, 0xB9B7BCBA, 0xBDBCB6BB,
+ 0xB7BDBCB8, 0xBBB7BEBB, 0xBDBBB7BE, 0xB5BBBAB8,
+ 0xC0B8C0C0, 0xB9BAB8C0, 0xB4B8B9B5, 0xC1B7BCBD,
+ 0xB6BBB9BE, 0xADADB9B2, 0xB7A9A5B8, 0xA0B7A8A0,
+ 0xA89CB8AA, 0xB8A497B7, 0x96B8A496, 0xA496B8A4,
+ 0xB9A597B9, 0x95B9A597, 0xA496BAA3, 0xBBA798BE,
+ 0x98BCA495, 0xA698BCA6, 0xBAA595B7, 0x94B9A898,
+ 0xA493B8A5, 0xBBA796BB, 0x97BBA597, 0xA597B9A5,
+ 0xB6A595B7, 0x96B6A494, 0xA595B7A5, 0xB9A395B9,
+ 0x95BBA093, 0xA195B9A2, 0xB79F93B7, 0x94B8A196,
+ 0xA294B6A0, 0xB7A496B8, 0x97B7A497, 0xA599B7A6,
+ 0xB5A89CBA, 0x9FB9A39A, 0xA8A0B7A8, 0xB9ABA3BA,
+ 0xA9BCA9A4, 0xB1B1BDAD, 0xC0B8BBC3, 0xBDBEB6BD,
+ 0xB9BEBFB8, 0xBDB7BCBD, 0xBBBCB7BC, 0xB6BCBBB6,
+ 0xBBB4B9B8, 0xBDBCB7BC, 0xB6BCBBB7, 0xB7B6BDBA,
+ 0xBCBBB1BA, 0xB7BDBCB4, 0xB4B6BBB9, 0xBDB8B3B9,
+ 0xB6BCB7B7, 0xB7B8BCB7, 0xB9B8B8BC, 0xB3B8B7B4,
+ 0xB7B4B9B8, 0xBBB9B4B9, 0xB8BCB7B8, 0xB5BABBB7,
+ 0xB7B2B8B9, 0xB3B7B2B3, 0xB2B3B7B2, 0xB9B4B3B7,
+ 0xB5B8B6B5, 0xB4B0B5B3, 0xB6B4B1B6, 0xB0B3B1B1,
+ 0xB0AFB3AE, 0xB7B2B1B5, 0xB7BBB6B3, 0xB5B8BCB7,
+ 0xB6B2B8B9, 0xB0B4AEB5, 0xA4A7ABA5, 0xACA5A4AB,
+ 0x929992A5, 0x536D716C, 0x3F395657, 0x41413B3D,
+ 0x48474741, 0x51485051, 0x5A5B5250, 0x5B63645B,
+ 0x69606364, 0x68696068, 0x5F686960, 0x6D646768,
+ 0x6D6E656C, 0x6B74756C, 0x746B7374, 0x75766D73,
+ 0x72797973, 0x7D777878, 0x81817B7D, 0x737B7C73,
+ 0x786F7B7C, 0x78797077, 0x73787970, 0x78727B7C,
+ 0x7D7E7578, 0x707D7E75, 0x79707879, 0x7B7C7378,
+ 0x767A7C76, 0x7B77787C, 0x7B7D777A, 0x727B7D77,
+ 0x7D74787B, 0x7D7E757C, 0x79807D78, 0x7C74817E,
+ 0x7F7D757E, 0x787F7D75, 0x7B768280, 0x7979737E,
+ 0x77797A76, 0x77737A7B, 0x75747078, 0x6F767473,
+ 0x74737270, 0x72706F76, 0x00161715, 0x00000001,
+ 0x00000000, 0x00020000, 0x00000200, 0x20211F00,
+ 0x5250504A, 0x675D5D5C, 0x76746969, 0x6479786A,
+ 0x75657474, 0x6F706074, 0x58676858, 0x5D4F6868,
+ 0x5654495E, 0x2C343329, 0x04013634, 0x07030209,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x13130000,
+ 0x3A383713, 0x4540403A, 0x554D4D4A, 0x62605857,
+ 0x5D67655D, 0x6C636566, 0x7270686B, 0x5B6E6C62,
+ 0x60566866, 0x58595061, 0x2948493F, 0x02002F32,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x4B4A4602, 0x17333430, 0x1B171A1B, 0x1B1C181A,
+ 0x1D20211D, 0x211F2021, 0x20211F20, 0x1F1E211F,
+ 0x20201E21, 0x1E20201E, 0x1F20211F, 0x211F2021,
+ 0x20211D20, 0x1F1E211F, 0x211F1E21, 0x20211F20,
+ 0x1D20211D, 0x211D2021, 0x20211D20, 0x1F1E211F,
+ 0x20201E21, 0x20211F20, 0x1F1F231E, 0x231F2024,
+ 0x22232122, 0x32303331, 0x33313134, 0x32333130,
+ 0x34393834, 0x37333938, 0x38393736, 0x00313230,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA9ABAC06, 0xBFBFC4C3, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA, 0xBDB9BFBE,
+ 0xBFBFB8BE, 0xB7BFBFB7, 0xBEB9BFBE, 0xC0BFB9BF,
+ 0xB8C0C0B8, 0xBFB8C0C0, 0xBDBCB7BF, 0xB9BFBEB7,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xB8C0BFB8, 0xBFB8C0BF,
+ 0xBEBFB8C0, 0xB9BFBEB9, 0xBDB8C0BF, 0xC0BFB6BE,
+ 0xB9BFBEBA, 0xBCB8BFBC, 0xBEBBB8BF, 0xB6BBB9B7,
+ 0xB9B9BCBA, 0xBCBAB8BB, 0xB6BBB9B7, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB9BFBAB8, 0xB9B9C0B9, 0xA8A1B8C0,
+ 0xA1A8A1A1, 0x9F9CA59B, 0xA49DA0A9, 0x9DA49D9D,
+ 0x979CA49A, 0xA59A99A1, 0x9BA1969F, 0x939CA094,
+ 0x9C909B9F, 0x9BA19698, 0x0899A099, 0x0808050A,
+ 0x08080808, 0x00000000, 0x01000000, 0x01020000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x4C4A4902, 0x79807F7B, 0x817B7F7F,
+ 0x7F827981, 0x747D8077, 0x7F797A7D, 0x83807B7F,
+ 0x78838179, 0x847C8280, 0x85837B86, 0x7C85837B,
+ 0x857D8684, 0x85837B87, 0x7B818279, 0x82798384,
+ 0x80817881, 0x7B85867D, 0x837A8384, 0x82837A82,
+ 0x7B85867D, 0x847B8384, 0x85867D83, 0x7885867D,
+ 0x81788081, 0x83847B80, 0x787E8178, 0x82797E81,
+ 0x7E81787F, 0x757F8076, 0x7B737E7F, 0x807E767D,
+ 0x76808178, 0x7C737E7F, 0x7B7C737B, 0x6D74786D,
+ 0x746B7478, 0x6F706773, 0x63707469, 0x695E6D6F,
+ 0x6664596B, 0x4D5D5B53, 0x574E5556, 0x4E514856,
+ 0x58474B40, 0x77715C61, 0x888C8773, 0xB2989C96,
+ 0xB9B0B4B8, 0xB6B8B2B6, 0xB9BBBFB9, 0xBDB8B9C0,
+ 0xB7BDB8B7, 0xB9B7BDB8, 0xBEB7B8BE, 0xB6BDB6B7,
+ 0xB8B8BCB7, 0xBDB8B9BD, 0xB8BCB7B9, 0xB6B7BBB6,
+ 0xBBB6B7BB, 0xB5BBB6B5, 0xB6B5BBB6, 0xBBB6B5BB,
+ 0xB5BBB6B5, 0xB9B5BBB6, 0xBEB9B8BE, 0xB7BDB8B8,
+ 0xBBB8BDBB, 0xBDBCB8BD, 0xB8BDBCB8, 0xBBB8BDBB,
+ 0xBDBCB7BE, 0xBABFBEB7, 0xBEB8BDBC, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBEBABF, 0xBABFC0B9,
+ 0xC0B8C0C0, 0xBFBEB8C0, 0xBABFBEBA, 0xC0BAC0BF,
+ 0xBBBEB8C0, 0xAEB0B8B6, 0xB6B2AEBA, 0xA3B7ADA5,
+ 0xAFA2BAAE, 0xB8A698B4, 0x97B7A798, 0xA798B8A6,
+ 0xB8A798B8, 0x97B9A798, 0xA796BBA7, 0xBCA795BC,
+ 0x97BBA596, 0xA597BBA5, 0xB9A595B7, 0x94B8A797,
+ 0xA294B8A2, 0xB8A294B8, 0x96B8A496, 0xA496B8A4,
+ 0xB6A595B7, 0x96B6A494, 0xA595B7A5, 0xB8A294B8,
+ 0x96BCA294, 0xA294B8A5, 0xB7A496BA, 0x93B5A395,
+ 0xA494B6A1, 0xB7A798B8, 0x98B7A798, 0xA89CBAA7,
+ 0xB7AA9FB9, 0xA0B7A8A0, 0xADA6BBA8, 0xB8ACA8BB,
+ 0xB0BAACA9, 0xBABDC2B1, 0xBCB7BCBD, 0xBBBCB5BD,
+ 0xB7BCBDB6, 0xBBB7BCBD, 0xBDBDB3BB, 0xB7BDBCB5,
+ 0xBBB6BBB9, 0xBEBBB8BD, 0xBAC1BEB7, 0xBAB8BEBD,
+ 0xBABBB5BB, 0xB8BEBDB5, 0xB9B3BAB7, 0xBDBAB5BC,
+ 0xB3BAB5B6, 0xB7B7BDB8, 0xB8B6B6BC, 0xB5B8B6B5,
+ 0xBAB7BCBA, 0xBBB9B7BC, 0xB9BCBAB8, 0xB2B8BCB7,
+ 0xB7B1B3B7, 0xB1B5AFB3, 0xB4B0B4AF, 0xB9B4B5B9,
+ 0xB3B7B2B5, 0xB2B2B6B1, 0xB6B4B1B4, 0xB1B4B2B3,
+ 0xADAFB3AE, 0xB7B2AFB3, 0xB4B8B3B1, 0xB1B6B8B2,
+ 0xB8B2B5B7, 0xACB0AAB6, 0xA6A8ACA6, 0x9992A8AC,
+ 0x7D847D92, 0x46646862, 0x3C364A4C, 0x3A3C363A,
+ 0x4842443E, 0x57514C4E, 0x55575155, 0x575E6158,
+ 0x695E5D60, 0x66675D65, 0x60686960, 0x685F6A68,
+ 0x67685F67, 0x65686C61, 0x746B6C70, 0x78797073,
+ 0x7375726D, 0x78737B78, 0x75726D7B, 0x777A7772,
+ 0x7D787F7C, 0x77786F80, 0x6D7A7B72, 0x7C737478,
+ 0x787B7279, 0x737D7E75, 0x79707B7C, 0x78797078,
+ 0x7176776E, 0x7670777A, 0x78797076, 0x707B7C73,
+ 0x7B727879, 0x7B7C727A, 0x7A817F77, 0x81798482,
+ 0x817F7783, 0x787B7B75, 0x78727E7E, 0x78787278,
+ 0x77797A76, 0x7872787C, 0x71716B76, 0x72787872,
+ 0x78727878, 0x59585478, 0x00020301, 0x00000001,
+ 0x00000100, 0x00020000, 0x01000200, 0x1F201C00,
+ 0x544C4B47, 0x675D5C59, 0x74746868, 0x64747468,
+ 0x71637272, 0x70706072, 0x58686858, 0x61516868,
+ 0x57564861, 0x23424137, 0x03002D2B, 0x07030208,
+ 0x00020000, 0x00010000, 0x00000100, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x12110000,
+ 0x39383414, 0x4747443F, 0x5951524F, 0x66635B5C,
+ 0x6265645A, 0x6C626D6C, 0x6C6B616D, 0x606C6C60,
+ 0x5E546C6C, 0x48493F5D, 0x25404138, 0x00002B2B,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00020000, 0x01000200, 0x00000000, 0x01000000,
+ 0x01010101, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA8AAAA06, 0xBFBFC4C3, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xBFBAC0BF, 0xBFC0BAC0, 0xBAC0BFBA, 0xBEB9BFBE,
+ 0xBFBFB9BF, 0xB7BFBEB7, 0xBEB9BFBE, 0xC0C0B9BF,
+ 0xB7BFBFB8, 0xBDB7BFBF, 0xBDBCB8BE, 0xB9BFBEB7,
+ 0xBFB7BFBE, 0xBFBEB8C0, 0xB8C0BFB7, 0xBEB9C1C0,
+ 0xBFC0B7BF, 0xBAC0BFBA, 0xBFB8C0BF, 0xBFBEB8C0,
+ 0xB9BFBEB9, 0xBDB9C0BD, 0xBEBBB9C0, 0xB8BDBBB7,
+ 0xB9BABDBB, 0xBDBBB8BB, 0xB9BEBCB8, 0xB9B7BEBB,
+ 0xBDBBB5BC, 0xB8BEB9B8, 0xB9B8C0B9, 0xA8A1B8C0,
+ 0xA1A8A1A1, 0x9FA0A99F, 0xA8A1A0A9, 0x9DA49DA1,
+ 0x9B9CA39C, 0xA4999DA5, 0x9AA0959E, 0x959DA195,
+ 0x9E929DA1, 0x999F949A, 0x049B9F99, 0x08080309,
+ 0x08080808, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x34323102, 0x7381807C, 0x79707979,
+ 0x80817878, 0x747E8178, 0x7F777C7D, 0x807E7681,
+ 0x79828078, 0x80788381, 0x83817982, 0x7A87857D,
+ 0x857D8482, 0x82807887, 0x7A808178, 0x81788283,
+ 0x80817880, 0x7883847B, 0x81788081, 0x84857C80,
+ 0x7882837A, 0x867D8081, 0x85867D85, 0x7B83847B,
+ 0x837A8384, 0x84857C82, 0x79808178, 0x81787F82,
+ 0x80817880, 0x787E7F76, 0x81798182, 0x807E7683,
+ 0x757D7E75, 0x79707D7E, 0x7B7C7378, 0x6C74786D,
+ 0x746B7377, 0x70716873, 0x646B6F64, 0x6F636E70,
+ 0x6565596F, 0x53616259, 0x564D5B5C, 0x4F504655,
+ 0x40484C41, 0x7670454B, 0x898D8772, 0xA28B8F89,
+ 0xB9B0A6AB, 0xB6B9B0B6, 0xB9B9BDB7, 0xC0B9B9C0,
+ 0xB7BEB7B9, 0xB8B7BDB8, 0xBFB8B7BD, 0xB7BEB7B8,
+ 0xB9BABEB9, 0xBEB9BABE, 0xBABEB9BA, 0xB8B9BDB8,
+ 0xBEB9B9BD, 0xBAC0BBB8, 0xB9B8BEB9, 0xBEB9B8BE,
+ 0xB8BEB9B8, 0xB9B7BDB8, 0xBEB9B8BE, 0xB8BDBBB8,
+ 0xBDB8BDBB, 0xBFBEBABF, 0xBABFBEBA, 0xBEB9BFBE,
+ 0xBFBEBAC1, 0xB9BFBEB9, 0xBEBABFBE, 0xBFBDBABF,
+ 0xBBC0BEBA, 0xBEB9BEBC, 0xBFC0BAC1, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xBFBEB8C0, 0xBABFBDB9, 0xC0BAC0BF,
+ 0xBFC0B8C0, 0xB6BBBEBA, 0xB9B7B6BF, 0xAEBBB2AE,
+ 0xB4ACBDB5, 0xB5ACA2B9, 0x98B7A799, 0xA697B6A7,
+ 0xB6A696B5, 0x95B6A797, 0xA796B8A6, 0xBBA796BB,
+ 0x97BBA796, 0xA496B8A5, 0xB7A595B7, 0x93B8A595,
+ 0xA294B8A4, 0xB7A094B8, 0x97B7A196, 0xA497B7A4,
+ 0xB6A595B7, 0x96B6A494, 0xA696B8A5, 0xB9A294B8,
+ 0x96BBA395, 0xA796BBA7, 0xB8A597B9, 0x95B7A496,
+ 0xA798B8A5, 0xB8AA9BBA, 0x9AB6AA9C, 0xA89CB8A8,
+ 0xB5A8A0B7, 0xA1B6A7A0, 0xACA9B9A8, 0xBAABA8B7,
+ 0xBCC1AFB0, 0xB8BDBEB9, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB7BBBCB8, 0xBDB5BABD, 0xBCBCB3BA, 0xB7BDBCB4,
+ 0xB9B6BBB9, 0xBFBDB8BE, 0xB8BFBCBA, 0xB9B9BFBE,
+ 0xBABBB4BA, 0xB8BEBDB5, 0xB6B4BBB8, 0xBBB8B2B9,
+ 0xB8BDBBB4, 0xB7B6BCB7, 0xB9B4B6BC, 0xB5B9B4B5,
+ 0xB9B9BDB8, 0xBBB9B6BB, 0xB8BBB9B8, 0xAFB5B9B4,
+ 0xB7B1B0B4, 0xB0B4AEB3, 0xB4B2B6B1, 0xB9B4B5B9,
+ 0xB5B9B3B5, 0xB8B8BCB7, 0xBBB9B9BD, 0xB8BCB7BA,
+ 0xB6B8BCB7, 0xB8B3B8BC, 0xB4B8B3B2, 0xB2B6B8B2,
+ 0xB4AEB6B8, 0xACB0AAB2, 0xA7AAABA7, 0x9992A8AC,
+ 0x7D847D92, 0x45575953, 0x3C36494B, 0x393D3738,
+ 0x51414540, 0x57535455, 0x5D5F5956, 0x5861645B,
+ 0x655A5E61, 0x64685D61, 0x60686960, 0x69606A68,
+ 0x6D6E6468, 0x5F6C7065, 0x7A71676B, 0x78797079,
+ 0x7A7B7873, 0x7873827F, 0x7C79747B, 0x717F7C77,
+ 0x76717976, 0x6F706779, 0x6D76776D, 0x7C717478,
+ 0x787C7178, 0x707B7C73, 0x7C737879, 0x7879707B,
+ 0x6E787970, 0x79707677, 0x71726978, 0x73787970,
+ 0x79707B7C, 0x7B7C7278, 0x77807E76, 0x7F77817F,
+ 0x817F7781, 0x767B7B75, 0x7E787C7C, 0x7B7B757E,
+ 0x747A7B77, 0x78727579, 0x71736D76, 0x70787970,
+ 0x78727879, 0x38373378, 0x00000100, 0x00010000,
+ 0x00000100, 0x00020000, 0x01000200, 0x201F1B00,
+ 0x524F4C48, 0x675E5A57, 0x72736966, 0x66757569,
+ 0x72647272, 0x6D6C5E72, 0x5769685A, 0x61516966,
+ 0x4D4C3E61, 0x27424137, 0x03002F2C, 0x07030208,
+ 0x00020000, 0x00010000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x130F0001,
+ 0x3A373214, 0x4747443C, 0x5851524F, 0x68635A5E,
+ 0x616A685E, 0x6E626D6D, 0x6B6D616E, 0x616A6C60,
+ 0x544A6B6D, 0x47483E53, 0x25404138, 0x00002B2B,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000100,
+ 0x01010001, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA8AAAA06, 0xBEBFC4C3, 0xC0BEBAC1, 0xBBC0BEBB,
+ 0xBDBAC1BE, 0xBFBEB9C0, 0xB9BFBEB9, 0xBDB9BFBE,
+ 0xBFBEB8BE, 0xB8BEBDB9, 0xBFB8C0BF, 0xBFC0B8C0,
+ 0xB9BEBFBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFC0B9,
+ 0xBCB9BFBE, 0xBEBFB7BD, 0xBABFC0B9, 0xBEB6BEBD,
+ 0xBFBEB7BF, 0xB9BFBEB9, 0xBCBAC0BF, 0xC0BFB8BF,
+ 0xBABFBEBB, 0xBBB9BEBD, 0xBDBBB7BC, 0xBCBFBDB8,
+ 0xB8B9BDB8, 0xBDBBB9BD, 0xB8BDBBB8, 0xB9B8BDBB,
+ 0xBCB7B6BB, 0xB6BCB7B8, 0xB9B8C0B9, 0xA8A1B8C0,
+ 0xA1A9A2A0, 0x95949C92, 0xA59B98A0, 0x9DA59B9D,
+ 0x999BA399, 0xA1969CA4, 0x9BA1969B, 0x949DA195,
+ 0xA0949CA0, 0x9BA1969C, 0x069B9F99, 0x0808050B,
+ 0x08080808, 0x00000001, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x1A181703, 0x7A797874, 0x7A718080,
+ 0x80817879, 0x777F8077, 0x81797F80, 0x83817983,
+ 0x78838179, 0x82798081, 0x83847B81, 0x7B83847B,
+ 0x807A8384, 0x82827C80, 0x7B85857F, 0x82798181,
+ 0x83847B81, 0x78808178, 0x81788081, 0x82837A80,
+ 0x7C828078, 0x847B8684, 0x83847B83, 0x7A85867D,
+ 0x857C8283, 0x83847B84, 0x7B81817B, 0x807B8181,
+ 0x827F7A83, 0x7D838179, 0x807B8785, 0x807E7683,
+ 0x757D7E75, 0x7C737B7E, 0x7879707B, 0x6D74786D,
+ 0x71687478, 0x70716870, 0x636B6F64, 0x6B5F6D6F,
+ 0x6565596B, 0x53606158, 0x564D5B5C, 0x50514755,
+ 0x41484C41, 0x6158484C, 0x71766D5E, 0x948B9087,
+ 0xB9B0989D, 0xB6B9B0B6, 0xB7B6BDB6, 0xBFBAB6BE,
+ 0xB7BEB9B8, 0xB8B8BEB9, 0xBDB8B7BD, 0xB6BCB7B7,
+ 0xBBB9BEBC, 0xBDBBB8BD, 0xB8BDBBB8, 0xB8B7BCBA,
+ 0xB9B7B5BA, 0xB7BAB8B6, 0xBBBABDBB, 0xBDBBBABD,
+ 0xBABDBBBA, 0xBBBABDBB, 0xBDBBBABD, 0xB9BCBABA,
+ 0xBDB8BDBB, 0xBDBCBABF, 0xB9BEBDB8, 0xBFBABFBE,
+ 0xC0BDBBC0, 0xB9C0BDB9, 0xBEBAC1BE, 0xBFBEBAC1,
+ 0xB9BFBEB9, 0xBEBAC1BE, 0xBEBFBAC1, 0xBABFC0B9,
+ 0xC0B8BFC2, 0xBFBEB8C0, 0xBABFBDBA, 0xC0BAC0BF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBDBABFC2, 0xB7BCB5BA,
+ 0xB7B6C0B4, 0xBAAFABBE, 0x99B5A9A0, 0xA599B7A5,
+ 0xB7A798B7, 0x97B8A798, 0xA897B9A8, 0xBBA796BB,
+ 0x95B9A796, 0xA597B9A3, 0xB7A595B7, 0x92B7A595,
+ 0xA092B6A3, 0xB6A094B8, 0x95B7A095, 0xA395B7A3,
+ 0xB7A595B7, 0x95B7A595, 0xA595B7A5, 0xB8A294B8,
+ 0x97BCA294, 0xA898BAA8, 0xB7A496B8, 0x96B6A497,
+ 0xA697B6A5, 0xB7A89CB8, 0x9CB6A89D, 0xA89FB9A7,
+ 0xBBAEA7BC, 0xA9B9AEA8, 0xACA9B8AC, 0xC1B5B4BD,
+ 0xBCC0B9BC, 0xB9BEC1B9, 0xBCB7BCBD, 0xBCBBB7BD,
+ 0xB8BCBDB7, 0xB9B5BABD, 0xBCBFAFB6, 0xB5BABBB5,
+ 0xB7B6BBB9, 0xBDBBB6BC, 0xB7BEBBB8, 0xB9B5BBBA,
+ 0xBBBAB4BA, 0xB5BBBAB5, 0xB7B4BBB8, 0xBAB8B3BA,
+ 0xB5BAB8B5, 0xB9B6BBB9, 0xB9B4B6BB, 0xB5B9B4B5,
+ 0xBAB8BBB9, 0xBABAB8BA, 0xB9BAB8BA, 0xB1B3B7B2,
+ 0xB4AFB2B6, 0xB3B7B2B0, 0xB2B1B4B2, 0xB9B4B3B7,
+ 0xB3B9B4B3, 0xB3AFB4B2, 0xB5B3B0B5, 0xB2B6B1B2,
+ 0xB6B4B8B3, 0xBDB8B6BD, 0xB4B8B3B7, 0xAEB6B8B2,
+ 0xB0AAB2B4, 0xA8ACA6AE, 0xA7A8ACA7, 0x9992A8AC,
+ 0x69706992, 0x37585A54, 0x3B373B3D, 0x494A463A,
+ 0x514B4D47, 0x605A5557, 0x60615860, 0x5B5E6158,
+ 0x655A6164, 0x686C6161, 0x60686960, 0x6E656869,
+ 0x6C6D636D, 0x646B6F64, 0x746B6C70, 0x77786F73,
+ 0x737C7974, 0x78737B78, 0x75726D7B, 0x77797671,
+ 0x766E7F7C, 0x6A6B6278, 0x7073746A, 0x7C71777B,
+ 0x787C7178, 0x747C7D73, 0x81787D7E, 0x7A7B7280,
+ 0x737B7873, 0x7A717B78, 0x797A7179, 0x757D7D77,
+ 0x7D747D7E, 0x7D7E757C, 0x777F7D75, 0x7F7A817F,
+ 0x817E7982, 0x747B7B75, 0x7D797A7A, 0x7B7A767E,
+ 0x6E767872, 0x736F7274, 0x76787272, 0x6F787970,
+ 0x78727778, 0x1A191578, 0x00000100, 0x00010000,
+ 0x00000100, 0x00020000, 0x00000200, 0x21201C02,
+ 0x524F4C47, 0x736A5A57, 0x71726872, 0x66757569,
+ 0x6F637272, 0x6B6E5F6D, 0x51686759, 0x6052605F,
+ 0x4E4C4163, 0x24414238, 0x04002C2D, 0x07040007,
+ 0x00020000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x02000002, 0x00000000, 0x130F0001,
+ 0x3A373214, 0x4649463E, 0x635A534D, 0x68635A68,
+ 0x626B695F, 0x70666D6C, 0x70716771, 0x54696D61,
+ 0x544A5C60, 0x48494053, 0x23404137, 0x01002B2C,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8AAAA06, 0xBEBFC4C2, 0xC0BEBAC1, 0xBBC0BEBB,
+ 0xBDB9C0BD, 0xC0BDB9C0, 0xB9C0BDB9, 0xBCB9BFBE,
+ 0xBFBEB7BD, 0xB9BFBEB9, 0xBEB7C0BD, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xBEBABFBE, 0xBFBEBABF, 0xB9BEBFB9,
+ 0xBFB9BFBE, 0xBEBFBAC0, 0xBABFC0B9, 0xBEB7BFBE,
+ 0xBFBEB7BF, 0xB9BFBEB9, 0xBBB8BFBC, 0xBDBCB7BE,
+ 0xB8BDBCB8, 0xB9B6BBBA, 0xBAB8B6BB, 0xB8BBB9B7,
+ 0xB7BABEB9, 0xBDBBB8BC, 0xB9BEBCB8, 0xBBB8BDBB,
+ 0xBCB7B8BD, 0xB6BCB7B8, 0xB9B8C0B9, 0xB0A9B8C0,
+ 0xA0A8A1A8, 0x9AA1A99F, 0xA49A9DA5, 0x9DA59B9C,
+ 0x999CA499, 0xA4999EA4, 0xA0A4999E, 0x969DA195,
+ 0x9F939EA2, 0x9BA1969B, 0x379B9F99, 0x0808383C,
+ 0x08070908, 0x00000001, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x03010002, 0x7A6A6965, 0x80788080,
+ 0x80817882, 0x7B81817B, 0x81798384, 0x84827883,
+ 0x78838179, 0x837A8081, 0x84857C82, 0x7883847B,
+ 0x7F798081, 0x80807A7F, 0x7B80807A, 0x847B8181,
+ 0x86877E83, 0x7D888980, 0x89808586, 0x80817888,
+ 0x7D85827D, 0x867D8582, 0x82837A85, 0x7C82837A,
+ 0x847B8485, 0x83847B83, 0x7E827F7A, 0x807B8683,
+ 0x827F7A83, 0x7983807B, 0x807B8381, 0x81827983,
+ 0x787D7E75, 0x79707E81, 0x7B7C7378, 0x6C787C71,
+ 0x776D7478, 0x73746A76, 0x68727369, 0x6F637274,
+ 0x6A6A5E6F, 0x53606158, 0x5C535B5C, 0x5051485B,
+ 0x414A4B41, 0x4C41484C, 0x74776E48, 0x948B9087,
+ 0xACA1989D, 0xB6B9B0A8, 0xB7B8BDB4, 0xBFBAB7BE,
+ 0xB9BFBAB9, 0xB7B8BEB9, 0xBDB8B6BC, 0xB9BDB8B9,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBABABDBB,
+ 0xBAB8B9BC, 0xB5B8B6B7, 0xBBB9BCBA, 0xBDBBBABD,
+ 0xBABDBBBA, 0xBBBABDBB, 0xBEBCBABD, 0xBABDBBBB,
+ 0xBBB8BDBB, 0xBDBCB8BD, 0xBABFBEB8, 0xBEBABFBE,
+ 0xBEBBBABF, 0xB9C0BDB7, 0xBDBAC1BE, 0xBFBEB9C0,
+ 0xB9BFBEB9, 0xBDB9C0BD, 0xBFBEB9C0, 0xB9BEBFBA,
+ 0xC0B8C0C0, 0xBFBEB8C0, 0xBBC0BFBA, 0xC1BABFC0,
+ 0xC0C0B9C1, 0xB8C0C0B8, 0xBFBABFC0, 0xBFC0B9BE,
+ 0xB4B8BDBA, 0xBEB3B3BF, 0xA1B8AFAB, 0xACA0BCA9,
+ 0xB8A89CB8, 0x9BBAA89C, 0xAA9BBBAA, 0xB9A797B9,
+ 0x97B9A797, 0xA797B9A7, 0xBAA798B8, 0x94B9A898,
+ 0xA294B8A5, 0xB7A294B6, 0x95B7A196, 0xA496B8A3,
+ 0xB6A595B7, 0x97B9A494, 0xA595B7A7, 0xB8A294B8,
+ 0x9ABCA294, 0xA797B9AA, 0xB8A697B7, 0x97B7A598,
+ 0xA697B6A6, 0xB7A89DB7, 0xA0B7A8A0, 0xABA3BAA8,
+ 0xB9AEA8BB, 0xB0BCADAA, 0xB8B7C0B2, 0xBEB9BCC0,
+ 0xBEBFB9BD, 0xB7BCBDBA, 0xBDB7BCBD, 0xBCBBB7BC,
+ 0xB4B8B9B7, 0xBDB3BBBB, 0xBCBFB3BA, 0xB7BCBDB5,
+ 0xB9B6BBB9, 0xBFBDB8BE, 0xB9BEBCBA, 0xB9B4BBB8,
+ 0xBBBAB5BC, 0xB5BCB9B5, 0xB6B5BCB9, 0xBAB8B3B8,
+ 0xB5BAB8B5, 0xBAB6BBB9, 0xB7B2B9BC, 0xB1B5B0B3,
+ 0xB8B6B8B8, 0xB8B8B6B8, 0xB8BBB9B6, 0xB4B8BCB7,
+ 0xB7B2B5B9, 0xB3B7B2B3, 0xB1B5B8B6, 0xB4AFB0B3,
+ 0xADB3AEAE, 0xB3AAAFAD, 0xAFADB0B5, 0xA5A9A4AC,
+ 0xA9ABAFAA, 0xB3AEA9B0, 0xB4B8B3AD, 0xAEB6B8B2,
+ 0xB0AAB2B4, 0xA8ACA6AC, 0x93A8ACA7, 0x837D9498,
+ 0x6B6F697F, 0x36494B45, 0x4B453A3C, 0x494B4549,
+ 0x50555751, 0x61585859, 0x60615860, 0x5B5E6158,
+ 0x675E6164, 0x686B6264, 0x606D6E65, 0x6E656869,
+ 0x7879706D, 0x6A767A6F, 0x746A7175, 0x78797073,
+ 0x7A7A7772, 0x807B827F, 0x6F6C6783, 0x716C6964,
+ 0x776F7976, 0x77786F79, 0x6A76776D, 0x72677175,
+ 0x71756A6E, 0x727D7E74, 0x7E757B7C, 0x7B7C737D,
+ 0x757B7873, 0x7A717F7D, 0x797A7179, 0x76787872,
+ 0x7B757C7C, 0x7D7E757B, 0x797F8077, 0x7E798381,
+ 0x7F7C7781, 0x797B7B75, 0x7A767F7F, 0x7B7A767B,
+ 0x6E767872, 0x77737274, 0x79797376, 0x72787872,
+ 0x77737A77, 0x1A19157A, 0x00000000, 0x00010000,
+ 0x00000100, 0x00020000, 0x00000200, 0x201F1B02,
+ 0x514F4C47, 0x73695B59, 0x73756972, 0x66757569,
+ 0x6C607272, 0x6B6D616A, 0x5367675B, 0x5449605E,
+ 0x4D4D4156, 0x26404138, 0x04002C2C, 0x07040007,
+ 0x00020000, 0x00000200, 0x00000000, 0x00020000,
+ 0x00000200, 0x02000002, 0x00000000, 0x120E0001,
+ 0x3B383313, 0x5148453D, 0x635A5E58, 0x68645968,
+ 0x616E6C62, 0x70686D6B, 0x70716872, 0x55686C61,
+ 0x544B5C60, 0x48484251, 0x25404138, 0x01002B2B,
+ 0x00000003, 0x00000000, 0x01000000, 0x00010000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x0709050A, 0x05070805,
+ 0xA8AAAA06, 0xBFBEC3C1, 0xC0BFBCC1, 0xBBC0BFBB,
+ 0xBEB9BFBE, 0xC0BFB9BF, 0xB9BFBEBA, 0xBEB8C0BF,
+ 0xBFBEB7BF, 0xB7BFBEB7, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB7BDBCB7, 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BEBDB9,
+ 0xBDB9BFBE, 0xBFBEB8BE, 0xB9BFBEB9, 0xBDB9BFBE,
+ 0xBFBEB8BE, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBDB9BF,
+ 0xB8BDBBBA, 0xBBBABDBB, 0xBDBBBABD, 0xB8BCB7BA,
+ 0xB8B6BCB7, 0xBCBAB7BD, 0xB7BCBAB7, 0xB8B6BCB7,
+ 0xBCBAB7BD, 0xB7BDB8B7, 0xB9B8C0B9, 0xB4ADB8C0,
+ 0xA1A8A1AD, 0x9AA1A99F, 0xA49A9CA4, 0xA1A99F9B,
+ 0x989EA499, 0xA498A0A4, 0x9FA397A0, 0x959CA094,
+ 0xA0919DA1, 0x9CA39699, 0x6A9EA39A, 0x06066D6E,
+ 0x06050706, 0x00000001, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000000, 0x78575450, 0x7C777F7C,
+ 0x7F7C7780, 0x777B7B75, 0x81797F80, 0x86847A83,
+ 0x79838179, 0x7F758381, 0x7A7B717E, 0x7E808177,
+ 0x847E8687, 0x80807A84, 0x787E8178, 0x847B7E81,
+ 0x85867D83, 0x7B85827D, 0x807B8380, 0x83807B83,
+ 0x7B85827D, 0x827D8380, 0x83807B85, 0x7885867D,
+ 0x81788081, 0x80817880, 0x7F807D78, 0x817C8784,
+ 0x807D7884, 0x7A7D7D77, 0x7E758080, 0x8081787D,
+ 0x747D7E75, 0x7C747C7D, 0x7B7C737E, 0x6C787C71,
+ 0x756A7478, 0x76776D71, 0x6A75746A, 0x6F637574,
+ 0x6B6D616D, 0x5563645B, 0x58525D5E, 0x58595058,
+ 0x3F484940, 0x4A3F4849, 0x666A5F46, 0x8A787D74,
+ 0xA9A08E93, 0xA8A9A0A6, 0xB9B8BBB2, 0xC0BABDC2,
+ 0xBEC0BABE, 0xB6BBBFB9, 0xBFB9B8BC, 0xBABBB7BD,
+ 0xBCBABDBB, 0xBEB9B9BE, 0xBABEB9B8, 0xBABBBCB8,
+ 0xBAB8BBBC, 0xB3B8B6B7, 0xBAB9BEBC, 0xBDBBB7BC,
+ 0xBABCBCBA, 0xBABCBCBC, 0xBDBBBBBC, 0xBCBFBDBA,
+ 0xBBBDC0BE, 0xBDBBBABD, 0xBABCBCBA, 0xBEBABFBE,
+ 0xBDBCBABF, 0xB9BFBEB7, 0xBEBAC1BE, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBAC0BFBB,
+ 0xBEB8C0BF, 0xBFBEB7BF, 0xBABFBEBA, 0xC1BABFC0,
+ 0xBFBFB9C1, 0xBABFC0B7, 0xBFBBC0BF, 0xBFC0BBC0,
+ 0xBABFC2BA, 0xBCB5B7BF, 0xA9BAB2B0, 0xB0A7BCAF,
+ 0xBBAAA1BB, 0x9CB8ACA1, 0xAA9CB8A8, 0xB7AA9BBA,
+ 0x97B9A898, 0xA797B9A8, 0xB7A798B8, 0x94B6A697,
+ 0xA496B8A4, 0xB6A193B5, 0x95B7A294, 0xA496B8A3,
+ 0xB8A594B9, 0x94B6A493, 0xA494B6A4, 0xB7A494B6,
+ 0x94B9A595, 0xA797B9A5, 0xB7A899B9, 0x99B8A798,
+ 0xA89AB6A8, 0xB6AAA0B7, 0xA1B6A8A1, 0xABA7BAA8,
+ 0xBDB0ADBC, 0xB8BCB2B3, 0xB9BEBDB5, 0xB9BABFBE,
+ 0xBBB9B6BB, 0xB6BBB9B6, 0xBEB8BDBE, 0xBCBDB8BD,
+ 0xB3BBBBB7, 0xBAB4BEBE, 0xBCBFB0BA, 0xB4BCBCB5,
+ 0xB8B3B9B8, 0xBCB7B5BA, 0xB5BBB6B6, 0xB4B6BCB7,
+ 0xB8B6B3B9, 0xB6BCB7B3, 0xB4B6BCB7, 0xB8B6B3B9,
+ 0xB3B8B6B3, 0xB7B5BAB8, 0xB6B1B6B9, 0xA9AFAAB2,
+ 0xB3AFB4B3, 0xB8B6AFB4, 0xB5B8B6B3, 0xB4B8BCB7,
+ 0xB7B2B5B9, 0xB2B6B1B3, 0xB2B5B6B2, 0xB4AFB3B7,
+ 0xAEB4AFAE, 0xAAABAFAA, 0xACA7ABAF, 0xA8ACA7A8,
+ 0x9FA5A9A4, 0xAFAAA0A4, 0xB0B4AFAB, 0xAFB0B4AF,
+ 0xADA7B0B4, 0xA3A7A1A9, 0x97989C97, 0x807A989C,
+ 0x62645E7E, 0x38404138, 0x49404041, 0x50514848,
+ 0x4F585950, 0x5F555859, 0x6064595E, 0x6364675E,
+ 0x69636769, 0x696A6169, 0x61686960, 0x6C63696A,
+ 0x7071686B, 0x6D71746B, 0x786D7478, 0x787C7174,
+ 0x767E7F76, 0x7E757C7C, 0x7879707D, 0x6D707168,
+ 0x7C737576, 0x8081787B, 0x727E7F76, 0x79707A7B,
+ 0x78797078, 0x72767970, 0x7970787B, 0x78797078,
+ 0x7178766E, 0x7A727B79, 0x797A717C, 0x7374746E,
+ 0x7B777677, 0x7C7C767C, 0x757D7E75, 0x7B737D7E,
+ 0x7D7A757D, 0x777C7C76, 0x7B777A7B, 0x7A79757C,
+ 0x73767773, 0x7C767677, 0x7C7C767C, 0x7077736E,
+ 0x73727873, 0x0A050678, 0x00020000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x22211D02,
+ 0x5250504A, 0x685D5D5C, 0x77756A6A, 0x64747468,
+ 0x6C5E7070, 0x696B5F6C, 0x58626157, 0x594F6362,
+ 0x4849405A, 0x253A3C36, 0x04002829, 0x07040007,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x120E0001,
+ 0x3A373213, 0x4F504C47, 0x61585A57, 0x6F6B6066,
+ 0x67726D64, 0x6E69746E, 0x706E6672, 0x53696A61,
+ 0x4D49595C, 0x42413D4C, 0x233D3D37, 0x00002929,
+ 0x02000002, 0x00020000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8AAAA06, 0xC0C0C3C1, 0xBFC0BCC1, 0xBBBFC0BB,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB8C0BF,
+ 0xBFBEB7BF, 0xB7BFBEB7, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB7BDBCB7, 0xBEB9BFBE, 0xC0BFB9BF, 0xB9BFBEBA,
+ 0xBEB8BEBD, 0xBFBEB9BF, 0xB9BFBEB9, 0xBFB9BFBE,
+ 0xBFBEBAC0, 0xB9BFBEB9, 0xBEB9BFBE, 0xBDBBB9BF,
+ 0xB8BDBBB8, 0xB9B8BBB9, 0xBCB7B8BB, 0xB8BCB7B8,
+ 0xB8B8BEB9, 0xBCBAB7BD, 0xB7BCBAB7, 0xB8B8BEB9,
+ 0xBCBAB7BD, 0xB7BDB8B7, 0xB8B8BFBA, 0xB4ADB7BF,
+ 0xA2A9A2AD, 0x9A9CA49A, 0xA3999CA4, 0xA1A99E9A,
+ 0x989EA499, 0xA498A0A4, 0xA3A599A2, 0x98A0A498,
+ 0xA295A0A4, 0x9BA2959B, 0x69A0A499, 0x06066D6F,
+ 0x06050706, 0x00000001, 0x01000000, 0x02000003,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x782F2B2A, 0x7C79807B,
+ 0x7F7C7881, 0x7B7F7F79, 0x81798181, 0x84827883,
+ 0x797F7D75, 0x82788381, 0x7D7E7481, 0x7D83847A,
+ 0x857C8586, 0x83837D84, 0x7B83867D, 0x847B8184,
+ 0x80817883, 0x7E827F7A, 0x827D8683, 0x83807B85,
+ 0x7B83807B, 0x7E798380, 0x83807B81, 0x7985867D,
+ 0x81788182, 0x85867D80, 0x7B83807B, 0x81798380,
+ 0x807E7683, 0x7A7D7D77, 0x7C738080, 0x7D7E757B,
+ 0x747A7B72, 0x7B737C7D, 0x7B7C737D, 0x70797D72,
+ 0x786D787C, 0x76776D74, 0x68737167, 0x6F637472,
+ 0x6B6F636D, 0x5B68695F, 0x5D576364, 0x5658525D,
+ 0x3F53544B, 0x483F4748, 0x5B5E5545, 0x8A777C73,
+ 0x938A8E93, 0xA6A9A090, 0xB2B9BCB3, 0xC1BBB8BB,
+ 0xC0C0BAC1, 0xB6BDBFB9, 0xBDB7BABC, 0xBBBCB8BB,
+ 0xB9BABDBB, 0xBEB9B6BB, 0xB8BCB7B8, 0xB8BBBCB8,
+ 0xBCBABBBC, 0xB4B9B7B9, 0xB9B8BEB9, 0xBDBBB8BE,
+ 0xBABCBCBA, 0xBDBCBCBC, 0xBDBBBCBF, 0xBABEB9BA,
+ 0xBBBABDBB, 0xBDBBBABD, 0xB8BBB9BA, 0xBEBABFBE,
+ 0xBFBEBABF, 0xB8BEBDB9, 0xBEB9C0BD, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBFBBC1C0, 0xBFBEBAC0, 0xBABFBEBA, 0xC0BAC0BF,
+ 0xC1C1B8C0, 0xB8C0BFB9, 0xBEBBC0BF, 0xBFC0BBC0,
+ 0xB8C0C0BA, 0xBFBBC0C3, 0xB0BCB5B7, 0xAEA8B9B4,
+ 0xBBAFA7BE, 0x9DB7AAA1, 0xA89DB7A8, 0xB7A99CB6,
+ 0x99BAA99B, 0xA797B9AA, 0xB8A798B8, 0x93B5A798,
+ 0xA496B8A1, 0xB7A496B8, 0x94B6A395, 0xA294B6A2,
+ 0xB8A493B8, 0x94B6A493, 0xA595B7A4, 0xB5A595B7,
+ 0x94B9A393, 0xA897B9A6, 0xB8A798B8, 0x98B7A899,
+ 0xA79CB6A7, 0xB8A8A1B6, 0xA7BAABA8, 0xABA8B7AB,
+ 0xC0B2B3BD, 0xBAB9B9BC, 0xB8BDBBB5, 0xB8BABFBD,
+ 0xBCB7B7BD, 0xB8BDBBB8, 0xBDB6BBBC, 0xBDBDB7BC,
+ 0xB1BBBBB5, 0xBEB1BDBD, 0xBCBCB2BE, 0xB5BDBDB2,
+ 0xB8B1B9B8, 0xBBB9B4BB, 0xB8BCB7B6, 0xB4B6BCB7,
+ 0xBCB7B3B9, 0xB8BCB7B8, 0xB7B6BCB7, 0xB9B6B6BC,
+ 0xAEB5B2B2, 0xB0ACB1AF, 0xB6B1AFB2, 0xA8ADABB0,
+ 0xBBABB0AE, 0xBAB8B6BC, 0xB3B8B6B5, 0xB4B9BDB8,
+ 0xB7B2B5B9, 0xB4B8B3B3, 0xB4B1B2AE, 0xB9B4B5B9,
+ 0xB4BAB5B5, 0xACB0B4AF, 0xACA7ADB1, 0xAAAEA9A8,
+ 0xAAADAEAA, 0xB4AFABAF, 0xB0B4AFB0, 0xA9AFB3AE,
+ 0xA7A1AAAE, 0xA2A6A0A3, 0x7B999D98, 0x645E7C80,
+ 0x48484264, 0x383F4037, 0x49404041, 0x50514848,
+ 0x525B5C52, 0x60545B5C, 0x5C60555C, 0x6364675E,
+ 0x69636769, 0x69696369, 0x636B6C63, 0x6C636B6C,
+ 0x7172696B, 0x6F6E7168, 0x7C717578, 0x74786D78,
+ 0x73787970, 0x7C737B7C, 0x7879707B, 0x7375766D,
+ 0x766D7B7C, 0x6E716873, 0x767C7D74, 0x7C737E7F,
+ 0x7A7B727B, 0x777A7D74, 0x7B727D80, 0x77786F7A,
+ 0x6E75736B, 0x766C7876, 0x73746B77, 0x6F767872,
+ 0x7B777273, 0x80807A7C, 0x737E807A, 0x7970797C,
+ 0x80807A78, 0x757A7B77, 0x78747879, 0x75747079,
+ 0x77787773, 0x726C7C7B, 0x6F6C6772, 0x73787370,
+ 0x4D4E7974, 0x0A050753, 0x00020000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x22201F02,
+ 0x5150504A, 0x695E5C5B, 0x7675676B, 0x606F6F63,
+ 0x6A5C6C6C, 0x67675B6A, 0x58606157, 0x59506061,
+ 0x46494058, 0x253B3C38, 0x03002829, 0x08050106,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000000, 0x130F0001,
+ 0x39393314, 0x59504C47, 0x6A616461, 0x706C616F,
+ 0x67746F66, 0x6E67746E, 0x706C6774, 0x5667685F,
+ 0x4D4B5A5C, 0x3F403E4C, 0x243F3C38, 0x00002B28,
+ 0x02000002, 0x00020000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8AAAA06, 0xBFBFC1C1, 0xBFC0BBC0, 0xBBBFC0BB,
+ 0xBEBABFBE, 0xBFBEBABF, 0xB9BFBEB9, 0xBDB9BFBE,
+ 0xBEBDB8BE, 0xB8BEBDB8, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB7BDBCB7, 0xBFB7BDBC, 0xBEBDBAC0, 0xB9BFBEB8,
+ 0xBEBAC0BF, 0xBEBDB9BF, 0xB9BFBEB8, 0xBBB8BDBB,
+ 0xBEBBB8BD, 0xB9C0BDB7, 0xBDBABFBD, 0xBDBBBABF,
+ 0xBABDBBBA, 0xB8B8BEB9, 0xBEB9B7BD, 0xB8BEB9B8,
+ 0xB7B9BDB8, 0xBCBAB8BC, 0xB8BDBBB7, 0xB8B9BCBA,
+ 0xBDBBB7BA, 0xB6BCB7BA, 0xB9B8BFBA, 0xA8A1B8C0,
+ 0x989C96A1, 0x9A93988F, 0xA69A9CA4, 0x9CA4999C,
+ 0x999CA297, 0xA4989EA4, 0x9FA397A0, 0x949DA195,
+ 0xA2959CA0, 0x989E939B, 0x69A0A499, 0x05056F6F,
+ 0x09060807, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x782F2B2A, 0x7B787F7C,
+ 0x7F7C7880, 0x7A81817B, 0x7F778080, 0x84827A81,
+ 0x79807E76, 0x81798381, 0x87857D83, 0x7983847B,
+ 0x80778182, 0x83847B7F, 0x7F868680, 0x837A8585,
+ 0x85867D82, 0x7A87847F, 0x827D827F, 0x827F7A85,
+ 0x7B85837B, 0x817B8380, 0x83837D81, 0x7B83847B,
+ 0x82798384, 0x83847B81, 0x7B84817C, 0x7A728380,
+ 0x7C7A727C, 0x777C7C76, 0x81787D7D, 0x7B7C7280,
+ 0x757A7870, 0x7D747F7D, 0x7879707C, 0x6D74786D,
+ 0x73697478, 0x75746A72, 0x6776746A, 0x72667371,
+ 0x6D6F6372, 0x5A65645A, 0x584F6364, 0x595A5157,
+ 0x4054524A, 0x4A414849, 0x46494047, 0x73646960,
+ 0x9289787E, 0xA6A9A08F, 0xB2B2B5AC, 0xBBB2B8BB,
+ 0xBFC0B7BA, 0xB5BEC0BA, 0xBDB9B9BB, 0xB8BCB7BC,
+ 0xBAB7BCBA, 0xBDB8B7BC, 0xB8BCB7B7, 0xB8BBBCB8,
+ 0xBAB8BBBC, 0xB7BAB8B7, 0xB7B5BBB6, 0xBEBCB6BC,
+ 0xB8BDBBB9, 0xBBBABDBB, 0xBDBBBABD, 0xB9BEBCBA,
+ 0xBCBABDBB, 0xBCBABBBE, 0xB8BDBBB7, 0xBCB8BDBB,
+ 0xC0BEB9BE, 0xBABFBDBB, 0xBFBBC0BE, 0xC0BEBCC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBDBBC0BE, 0xBFBDBABF, 0xBABFBDBA, 0xBFB9BFBE,
+ 0xC1C1B8C0, 0xB8C0BFB9, 0xBEBBC0BF, 0xBFC0BBC0,
+ 0xB8C0C0BA, 0xC3B8BFC2, 0xBDC5B8BE, 0xB2B0BCBB,
+ 0xBFB0ABC0, 0xA2BCAEA5, 0xABA0BAAD, 0xB7A89DB7,
+ 0x99B8A89D, 0xA798B8A8, 0xB6A798B8, 0x95B7A596,
+ 0xA496B8A3, 0xB7A497B7, 0x95B7A497, 0xA496B8A3,
+ 0xB5A494B6, 0x94B6A393, 0xA494B6A2, 0xB7A696B8,
+ 0x95B7A695, 0xA897B8A6, 0xB8A899B8, 0x9CB8AA9C,
+ 0xA89DB7AA, 0xB6ABA7BA, 0xA8B4AAA7, 0xB4B3BCAA,
+ 0xBDBABDC1, 0xBAB9B8BE, 0xB4BBB8B4, 0xBBB9BEBC,
+ 0xBBB9B8BD, 0xB7BCBAB8, 0xBFB8BDBE, 0xBDBDB5BC,
+ 0xAFB9B9B5, 0xB9ADBBBA, 0xBBBAACBA, 0xB2BFBDAD,
+ 0xB8B1B9B8, 0xBBBAB3B9, 0xB6BBB9B6, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB6B7BCBA, 0xB0AFB3B8,
+ 0xAAB0AFAA, 0xB3ADB2B0, 0xB5B3B0B5, 0xADB2B0B2,
+ 0xBAAFB4B2, 0xBBB9B7BC, 0xB8BBB9B8, 0xB4B8BCB7,
+ 0xB7B2B5B9, 0xAFB3AEB3, 0xB2B2B6B1, 0xB7B2B3B7,
+ 0xB5B9B4B3, 0xAFAEB4AF, 0xB2ADB0B4, 0xAFB0ACAE,
+ 0xA5ABAFAA, 0xAEA9A6AA, 0xABAFAAAA, 0xA1A9ADA8,
+ 0xA7A1A4A5, 0xA5A7A1A5, 0x7A989C97, 0x645E7B7F,
+ 0x48494064, 0x40404138, 0x51484849, 0x595A5150,
+ 0x53595D52, 0x63585A5E, 0x6064595F, 0x63676A61,
+ 0x68646769, 0x67696367, 0x6567685F, 0x70676D6E,
+ 0x7071686F, 0x6B74756C, 0x74697374, 0x797D7270,
+ 0x737B7C72, 0x7B737B7C, 0x7E7C747D, 0x787B7C73,
+ 0x766D8081, 0x75766D75, 0x737C7D74, 0x7C737B7C,
+ 0x7B7C737B, 0x72787B72, 0x7A71787B, 0x7A7B7279,
+ 0x72797A71, 0x776E7A7B, 0x76776E76, 0x73777973,
+ 0x77737478, 0x7A7C7676, 0x737B7D77, 0x7D77797C,
+ 0x7D7D777D, 0x777A7B77, 0x7A767A7B, 0x7C7B7779,
+ 0x6D7C7B77, 0x716D7471, 0x74716D74, 0x73787370,
+ 0x2A2B7974, 0x0A050730, 0x00020000, 0x00010000,
+ 0x00000100, 0x00000000, 0x01000000, 0x20211F00,
+ 0x5450504A, 0x695D5C5D, 0x75756969, 0x5D6C6C5E,
+ 0x7064696C, 0x696B5F6E, 0x58606157, 0x59506061,
+ 0x46494058, 0x25393A36, 0x04002829, 0x06030005,
+ 0x00020000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000000, 0x00000001, 0x14100000,
+ 0x37373115, 0x5A504C47, 0x6B626562, 0x706C6170,
+ 0x68767267, 0x6F677671, 0x726F6772, 0x556A6860,
+ 0x4E4C5B5B, 0x40413F4D, 0x243F3C38, 0x00002B28,
+ 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8AAAA06, 0xBFBFC1C1, 0xBFC0BBC0, 0xBBC0BFBB,
+ 0xBEBABFBE, 0xBFBEBABF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB7BDBCB7, 0xBFB5BBBA, 0xBFBEBAC0, 0xB9BFBEB9,
+ 0xBEB8BEBD, 0xBFBEB9BF, 0xB7BDBCB9, 0xBBB8BDBB,
+ 0xBEBBB8BD, 0xB7BEBBB7, 0xBAB8BDBB, 0xBCBAB7BC,
+ 0xB8BBB9B9, 0xB7B6BCB7, 0xBBB6B6BC, 0xB5BBB6B5,
+ 0xB7B8BCB7, 0xBBB9B8BC, 0xB4B9B7B6, 0xB9B8BBB9,
+ 0xB9B7B8BB, 0xB6BCB7B6, 0xB9B9C0B9, 0xA8A2B8C0,
+ 0x989C96A4, 0x94949990, 0xA49A969E, 0xA0A89E9C,
+ 0x989BA398, 0xA3989DA3, 0xA0A4989F, 0x96A0A498,
+ 0xA1969BA1, 0x999F949B, 0x9AA0A499, 0x0707A2A3,
+ 0x07040609, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x78030100, 0x7C787F7C,
+ 0x7E7B767F, 0x797C7C76, 0x7B767F7F, 0x807E767E,
+ 0x79838179, 0x81798381, 0x83817983, 0x787F8077,
+ 0x81788081, 0x80817880, 0x7A83837D, 0x8A818080,
+ 0x8A888089, 0x7B838179, 0x827D8380, 0x83817985,
+ 0x78828078, 0x817B8280, 0x82827C81, 0x7B83847B,
+ 0x81788384, 0x83847B80, 0x7987847F, 0x7E768381,
+ 0x807F7580, 0x7380807A, 0x7D747B7C, 0x7A7B717C,
+ 0x737F7D75, 0x79707D7B, 0x7B7C7378, 0x7176776E,
+ 0x736B7A7B, 0x76736B75, 0x6A76746A, 0x6F637674,
+ 0x6B6B5F6F, 0x5A6A6A5E, 0x5F566564, 0x5859505E,
+ 0x4055534B, 0x47414A48, 0x46494047, 0x73646960,
+ 0x938D777C, 0x91938D91, 0xB3ADB0A7, 0xBAB1B9BC,
+ 0xC0C1B8B9, 0xB6BDBFB9, 0xBCB6B8BC, 0xB9BDB8B8,
+ 0xBBB6BCB7, 0xBCB7B8BD, 0xBABEB9B6, 0xB8BBBCB8,
+ 0xBCBABBBC, 0xB8BCB7B9, 0xB7B5BCB5, 0xBEB9B7BE,
+ 0xB9BEBCB8, 0xBBBABDBB, 0xBDBBBABD, 0xBABDBBBA,
+ 0xBBBABDBB, 0xBDBBBABD, 0xB7BCBAB8, 0xBBB9BEBC,
+ 0xBFBDB8BD, 0xBABFBDBA, 0xBEBBC0BE, 0xBFBDBBC0,
+ 0xBBC0BEBA, 0xBEBCC1BF, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBDBABFBD, 0xC0BBBABF, 0xB9C0BBBA, 0xBFB6BCBB,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFBAC0BF, 0xC0C0BAC0,
+ 0xB8C0C0B8, 0xC2B8BFC2, 0xBFC2B8BF, 0xB5B7BFBA,
+ 0xBBADADBB, 0xA6BBACA8, 0xACA2B9AD, 0xB5AAA0B7,
+ 0x9CBAA89E, 0xA79ABAA8, 0xB7A598B8, 0x95B7A497,
+ 0xA496B8A3, 0xB6A498B6, 0x98B8A498, 0xA496B8A5,
+ 0xB5A595B7, 0x96B8A393, 0xA595B7A6, 0xB6A595B7,
+ 0x94B6A494, 0xA798B8A4, 0xB7A89AB6, 0x9DB7A89D,
+ 0xA79EB3A8, 0xB7ABA8B7, 0xB5BAACAD, 0xB1B4B8B2,
+ 0xB9B4BAB9, 0xBAB9B4BA, 0xB4BAB9B4, 0xB8B8BDBB,
+ 0xBCBAB5BA, 0xB8BDBCB9, 0xBDB6BBBC, 0xBDBDB5BD,
+ 0xAEB8B8B5, 0xB8AAB8B7, 0xB9B8A9B9, 0xADBAB8AB,
+ 0xB6B1B9B8, 0xB9B7B2B9, 0xB2B7B5B4, 0xB4B6BAB5,
+ 0xB4AFB5B9, 0xB5B9B4B0, 0xB1AFB5B0, 0xB4B2AEB3,
+ 0xB3B8B6AF, 0xB3B5BAB8, 0xB9B7B2B5, 0xB2B5B3B6,
+ 0xB8B5B8B6, 0xBBB9B7BA, 0xB8BBB9B8, 0xB4B5B9B4,
+ 0xB7B2B5B9, 0xB3B7B2B3, 0xB2B3B7B2, 0xB7B2B3B7,
+ 0xB3B7B2B3, 0xAFAEB4AF, 0xB4AFAEB4, 0xB2B3AFB0,
+ 0xAAABAFAA, 0xAFAAABAF, 0xACB0ABA9, 0xA2A9ADA8,
+ 0xA09AA5A6, 0x9D9F999E, 0x5E7C807B, 0x49436064,
+ 0x48494049, 0x40404138, 0x51484849, 0x58595050,
+ 0x5A5B5F54, 0x63586165, 0x60635A5F, 0x63676963,
+ 0x6B676769, 0x6A6C666A, 0x636D6D67, 0x6D646B6C,
+ 0x6F70676C, 0x6B73746B, 0x786D7374, 0x73776C74,
+ 0x7278796F, 0x7D757B7C, 0x7E7C747F, 0x78808178,
+ 0x7C738081, 0x75766D7B, 0x737B7C73, 0x7B727B7C,
+ 0x7D7E757A, 0x727A7B72, 0x7970787B, 0x78797078,
+ 0x747C7D74, 0x7A717C7D, 0x7A7C7679, 0x6E767773,
+ 0x77736F73, 0x76787276, 0x73767872, 0x807A797C,
+ 0x80807A80, 0x73777672, 0x74707677, 0x75747073,
+ 0x6873726E, 0x6C686F6C, 0x74716D6F, 0x71777470,
+ 0x05067672, 0x0704060A, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x01000000, 0x22211D00,
+ 0x48504F4B, 0x685E5250, 0x69695D69, 0x646E7064,
+ 0x6B5F6E70, 0x65665C69, 0x57616056, 0x50486261,
+ 0x48494052, 0x243A3C36, 0x04002728, 0x07040007,
+ 0x00020000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000001, 0x130F0001,
+ 0x3B393114, 0x63595651, 0x6B626E6B, 0x706C6170,
+ 0x69787469, 0x72687674, 0x726F6774, 0x556B6961,
+ 0x4B4A5D5A, 0x42403F4D, 0x263F3B3A, 0x00002927,
+ 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8AAAA06, 0xBDBFC2C0, 0xBFBEBABF, 0xBABFBEBA,
+ 0xBDBABFBE, 0xBFBDBABF, 0xBABFBDBA, 0xBEBABFBE,
+ 0xBFBEBABF, 0xBBC0BFBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBBB6BCBB, 0xC0BFB6BC, 0xB5BBBABA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBEBA, 0xBDB9C0BD,
+ 0xBFBDB9C0, 0xB8BDBBBA, 0xB9B6BBB9, 0xBCBAB6BB,
+ 0xB8BDBBB7, 0xBCB7BCBA, 0xBCBAB9BE, 0xB8BDBBB7,
+ 0xBBB6BBB9, 0xBCB7B8BD, 0xB7BBB6B8, 0xB7B6BCB7,
+ 0xBCB7B6BC, 0xB7BDB8B8, 0xB9B9C0B9, 0xA49EB8C0,
+ 0x939791A0, 0x9D9BA29B, 0xA59E9DA4, 0xA1A8A19E,
+ 0x9B9EA69C, 0xA49B9FA4, 0xA0A499A1, 0x989DA398,
+ 0xA2999DA3, 0x9BA0979D, 0x9AA0A499, 0x0606A0A3,
+ 0x08050708, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x51000100, 0x7F795655,
+ 0x80807A7F, 0x7A81817B, 0x7E798080, 0x84817C81,
+ 0x7B827F7A, 0x827D8380, 0x83807B85, 0x7F888580,
+ 0x7B728784, 0x7D7E747A, 0x7984827A, 0x807B8381,
+ 0x83817983, 0x7684827A, 0x8179807E, 0x88867E83,
+ 0x7885837B, 0x827C8081, 0x81817B82, 0x76818279,
+ 0x7A717E7F, 0x81827979, 0x7981817B, 0x7F768182,
+ 0x7E7F757E, 0x737B7B75, 0x80777B7C, 0x8182787F,
+ 0x707F7D75, 0x79737A78, 0x78797079, 0x6C787970,
+ 0x746F7674, 0x78746F77, 0x68747169, 0x71677472,
+ 0x6E6C6173, 0x5469675C, 0x5C526060, 0x5A5B515B,
+ 0x4556554B, 0x4840504F, 0x4849404A, 0x6F5D6057,
+ 0x89857375, 0x88898588, 0xB29EA09A, 0xB9B0B6B8,
+ 0xB6B9B0B8, 0xB7BBC0B7, 0xBEB4B9C1, 0xB6BDB6B6,
+ 0xB9B6BCB7, 0xBDB8B8BE, 0xB7BDB8B7, 0xB9BABEB9,
+ 0xBEB9BABE, 0xB6BCB7BA, 0xB9B6BDB6, 0xBEB9B9C0,
+ 0xB9BDB8BA, 0xB6B9BDB8, 0xBCBAB7BB, 0xB8BBB9B9,
+ 0xBBBABDBB, 0xBDBBB8BD, 0xB5BAB8B8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBDBBC0BE, 0xC0BEBABF, 0xBBC0BEBB,
+ 0xBCBBC1BC, 0xC1BCBBC1, 0xBAC1BCBA, 0xBEB7BDBC,
+ 0xC0C0B7BF, 0xB8C0C0B8, 0xBFBAC0BF, 0xC0C0BAC0,
+ 0xB8C0C0B8, 0xC0B7BFBF, 0xBFC0BABF, 0xB9BEC1BA,
+ 0xBCBBBEC6, 0xACB8B1B2, 0xB0AABBB0, 0xBAAEA5B9,
+ 0x9CB8AEA5, 0xA89CBAA8, 0xB6A89CBA, 0x95B6A196,
+ 0xA496B8A0, 0xB8A89CBA, 0x97B7A89C, 0xA297B8A2,
+ 0xB8A594B9, 0x94B6A493, 0xA595B7A4, 0xB6A595B7,
+ 0x94B6A294, 0xA297B7A2, 0xB8A89FBA, 0xA1B6A9A1,
+ 0xA8A2B3A8, 0xBCAFAEB7, 0xBEBFB5B8, 0xB1B7B6BA,
+ 0xC0B6BCBB, 0xBBBBBABF, 0xB0B8B7B3, 0xB8B6BDBA,
+ 0xB8B6B4BB, 0xB6BBB9B3, 0xBCB8BDBC, 0xC0BDB8BF,
+ 0xB3BBBAB9, 0xB6A5B2B4, 0xB4B4A7B4, 0xB0B8B7A8,
+ 0xB4B3B8B6, 0xBAB5B3B9, 0xAEB4AFB4, 0xB3AFB3AE,
+ 0xB4AFB4B8, 0xB2B6B1B0, 0xB4B5B9B4, 0xB9B4B5B9,
+ 0xB5B8B6B5, 0xB8B6B9B7, 0xB8B8B8B8, 0xB8B9B7B8,
+ 0xB7B4B5B3, 0xBCB7B8BC, 0xB5B9B4B8, 0xB4B5B9B4,
+ 0xB4AFB5B9, 0xB0B4AFB0, 0xB0AFB5B0, 0xB7B2AFB5,
+ 0xAEB4AFB1, 0xAEAEB5AE, 0xB4AEAEB5, 0xADB1ACB0,
+ 0xA9A8ACA7, 0xACA7A8AB, 0xA8ACA7A8, 0x9FA0A49F,
+ 0xA49FA0A4, 0x90948FA0, 0x4D757974, 0x403A4F53,
+ 0x41423940, 0x3F484940, 0x59504748, 0x595A5158,
+ 0x5B5E6158, 0x655A6164, 0x60635A61, 0x63676963,
+ 0x67636667, 0x6E706A66, 0x6A6F6F69, 0x71687273,
+ 0x70716870, 0x6B717269, 0x7A717374, 0x76797077,
+ 0x7274786D, 0x7C73797D, 0x8182797B, 0x757D7E75,
+ 0x77717D7E, 0x79797377, 0x737B7873, 0x7E767B78,
+ 0x7C7D7480, 0x727B7C73, 0x7C727A7B, 0x7D7E757D,
+ 0x727A7D74, 0x79737678, 0x7A7B7779, 0x77787975,
+ 0x7974787C, 0x77797375, 0x6D6E706A, 0x756C7576,
+ 0x78787274, 0x6F757470, 0x6B677270, 0x706F6B6C,
+ 0x6B6D6C68, 0x716D706F, 0x72716D72, 0x6B6C6B67,
+ 0x00006E6C, 0x00000102, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x21201C02,
+ 0x4F4F4C48, 0x61575A57, 0x6F6D6363, 0x676F6E64,
+ 0x6C627071, 0x6A695F6B, 0x5967655B, 0x5A506664,
+ 0x46443A5C, 0x2A303128, 0x04003030, 0x07040007,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x1D170001,
+ 0x39382E1D, 0x63626058, 0x74696F6D, 0x78746978,
+ 0x6D767469, 0x796F7A78, 0x75746A7B, 0x556D6B61,
+ 0x4F4B5F5D, 0x42403F50, 0x263F3B3A, 0x00002927,
+ 0x00000102, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8AAAA06, 0xBDBFC2C0, 0xBFBEBABF, 0xBABFBEBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBE,
+ 0xBDBCB9BE, 0xBABFBEB8, 0xBDB6BCBB, 0xBCBBB8BE,
+ 0xBAC0BFB6, 0xBBB6BCBB, 0xC0BFB6BC, 0xBAC0BFBA,
+ 0xBDBAC0BF, 0xBDBCB8BE, 0xBBC0BFB8, 0xBDB9C0BD,
+ 0xBDBBB9C0, 0xB8BDBBB8, 0xBBB9BEBC, 0xBCBAB8BD,
+ 0xB8BDBBB7, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xB9B9BEBC, 0xBCB7B6BB, 0xB8BCB7B8, 0xB7B4BBB4,
+ 0xBBB6B7BE, 0xB3BAB3B7, 0xB9B9C0B9, 0xB2ACB8C0,
+ 0xA1A59FAE, 0xA1A0A7A0, 0xA39EA0A8, 0xA2A9A29D,
+ 0x9BA2AAA0, 0xA2999FA4, 0xA0A39A9F, 0x979DA398,
+ 0xA19A9AA2, 0x99A1979A, 0x9B9EA499, 0x3837A1A4,
+ 0x0805073A, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000000, 0x27000100, 0x807A2A2B,
+ 0x81817B80, 0x7A797A76, 0x837D7F7E, 0x84817C83,
+ 0x7D85827D, 0x847F8582, 0x83807B87, 0x7F83807C,
+ 0x7F768784, 0x8081777E, 0x77838179, 0x817C817F,
+ 0x827F7A85, 0x79838179, 0x7E768381, 0x807E7680,
+ 0x79818279, 0x837A8182, 0x80807A82, 0x797E7F76,
+ 0x80778182, 0x8182797F, 0x7681817B, 0x7F767E7F,
+ 0x7E7F757E, 0x75808178, 0x81787D7E, 0x7D7E7480,
+ 0x747C7A72, 0x77717E7C, 0x77777177, 0x737C7A72,
+ 0x77747B78, 0x7D78757C, 0x687B7870, 0x71677472,
+ 0x6D6B6173, 0x5568665B, 0x5C506161, 0x5A5B515C,
+ 0x4456554B, 0x48404F4E, 0x4849404A, 0x59484B42,
+ 0x75735D5F, 0x88898774, 0xA692938F, 0xBAB1AAAC,
+ 0xB6B9B0B9, 0xB4B9BEB5, 0xBDB3B6BE, 0xB7BEB7B5,
+ 0xB9B7BEB7, 0xBDB8B8BE, 0xB6BCB7B7, 0xB9BABEB9,
+ 0xBCB7BABE, 0xB6BCB7B6, 0xB8B7BEB7, 0xBEB9B8BF,
+ 0xB9BDB8BA, 0xB3B9BDB8, 0xBAB8B4B8, 0xB9BCBAB9,
+ 0xBAB8BDBB, 0xBDBBB7BC, 0xB8BDBBB8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBDBBC0BE, 0xBFBDBABF,
+ 0xBBC0BEBA, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBCBBC1BC, 0xC1BEBBC1, 0xBAC1BEBA, 0xBDB9BFBE,
+ 0xC0C0B6BE, 0xB7BFBFB8, 0xBFB9BFBE, 0xC1C1BAC0,
+ 0xB8C0C0B9, 0xBFBBC0C1, 0xBDBEB9BE, 0xBABFC0B8,
+ 0xC2BABFC0, 0xB2BBBABF, 0xB3B2BCB3, 0xBAB2ACBD,
+ 0x9CB6AEA5, 0xA89CB8A7, 0xB8A69CBA, 0x95B6A398,
+ 0xA196B7A0, 0xBBA79BB9, 0x99B9A99D, 0xA095B6A4,
+ 0xB8A594B9, 0x94B6A593, 0xA596B6A4, 0xB9A798B8,
+ 0x96B8A699, 0xA298B6A4, 0xB5A6A0B9, 0xA9B8A6A2,
+ 0xB1B0B9AE, 0xB9B5B8BC, 0xBFBCB5BA, 0xB5BCB9B8,
+ 0xBBB6BCBB, 0xBDBCB6BC, 0xB0B8B7B7, 0xB7B2B8B7,
+ 0xBAB8B3BA, 0xB5BAB8B5, 0xBAB8BDBB, 0xBEB9B7BC,
+ 0xB5BEBBB7, 0xB7A9B5B7, 0xB8B8A9B5, 0xB5BBBAB0,
+ 0xB2B4B9B7, 0xBAB3B3B7, 0xAFB6AFB3, 0xB4B0B4AF,
+ 0xB7B2B5B9, 0xB6BAB5B3, 0xB3B5B9B3, 0xB9B4B5B9,
+ 0xB7B8B4B5, 0xB8B8B9B7, 0xB8B8B8B8, 0xB8B9B7BA,
+ 0xB6B2B3B1, 0xBCB7B9BA, 0xB8BCB7B8, 0xB7B9BDB8,
+ 0xB9B4B8BC, 0xADB3AEB5, 0xAFAEB4AF, 0xB7B2ADB4,
+ 0xAEB4AFB1, 0xABAEB5AE, 0xB1ABADB1, 0xADB1ABAD,
+ 0xA0A8ACA7, 0xADA8A1A5, 0xA1A5A0A9, 0x9FA0A49F,
+ 0x938EA0A4, 0x80847F8F, 0x4D626661, 0x41385153,
+ 0x40413840, 0x48494A41, 0x584F5051, 0x60615857,
+ 0x585E6158, 0x61565E61, 0x62655C5D, 0x63656761,
+ 0x6B676667, 0x6A6C666A, 0x6974756C, 0x756C7172,
+ 0x78797074, 0x6D787970, 0x746B7576, 0x71746B71,
+ 0x7374786D, 0x7B727A7E, 0x7A7B727A, 0x737D7E75,
+ 0x7B757B7C, 0x7878727B, 0x737A7772, 0x766E7B78,
+ 0x79776F78, 0x76787970, 0x7A727E7F, 0x7879707C,
+ 0x76767872, 0x7B777A7C, 0x7A7B777C, 0x77797A76,
+ 0x7A75787C, 0x75797376, 0x6B70706A, 0x766D7374,
+ 0x78797075, 0x6B777470, 0x7470726F, 0x73726E77,
+ 0x6B6D6C68, 0x6F6B706F, 0x6F6E6A70, 0x466A6B67,
+ 0x00004748, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x201F1B02,
+ 0x514F4C48, 0x60595A56, 0x6E6C6266, 0x68727068,
+ 0x6C637071, 0x6A695F6B, 0x4D666459, 0x4F445C58,
+ 0x47453A53, 0x28323028, 0x04003230, 0x07040007,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x38300302,
+ 0x55544A3A, 0x63626157, 0x74696F6D, 0x78746978,
+ 0x727A786D, 0x786E7F7D, 0x72716779, 0x546E6C62,
+ 0x4E4A5E5C, 0x42403F4F, 0x263F3B3A, 0x00002927,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8AAAA06, 0xBDBFC2C0, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBCBABFBD,
+ 0xBCBAB9BE, 0xBABFBDB7, 0xBBB8BDBB, 0xBEBDB8BD,
+ 0xB7BCBBB9, 0xBBB7BDBC, 0xC0BFB6BC, 0xBBC1C0BA,
+ 0xBCB8BDBC, 0xBDBBB8BD, 0xBBC0BEB8, 0xBEB9BEBC,
+ 0xBEBBBBC0, 0xB6BDBAB7, 0xB9BAC0BB, 0xBDBBB8BE,
+ 0xB8BDBBB8, 0xB9B8BDBB, 0xBDBBB6BB, 0xBABDBBBA,
+ 0xB7B6BCB7, 0xBCB7B6BC, 0xB8BCB7B8, 0xB6B5BCB5,
+ 0xBBB5B6BD, 0xB5BCB5B7, 0xB9B9C0B9, 0xBFB9B8C0,
+ 0xA0A49FBB, 0xA29AA19A, 0xA49DA2A9, 0xA1A8A19D,
+ 0x9A9FA49B, 0xA49BA0A3, 0xA0A39AA1, 0x969CA297,
+ 0xA29B99A1, 0x99A1979B, 0x9A9EA499, 0x6D6CA0A3,
+ 0x0705056F, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000000, 0x27000100, 0x807A2A2B,
+ 0x7F817B7E, 0x7D807F7B, 0x817D8281, 0x80807A82,
+ 0x7983807B, 0x827D8381, 0x86827D86, 0x7B83807B,
+ 0x81798380, 0x83817983, 0x7B83807B, 0x817C8380,
+ 0x85827D84, 0x7C87847F, 0x807B8481, 0x87857D83,
+ 0x7A82837A, 0x82798283, 0x80817881, 0x7882827C,
+ 0x817C7E7E, 0x83807B84, 0x7983807B, 0x7F768381,
+ 0x8182787E, 0x727D7E74, 0x7E757A7B, 0x7C7D747D,
+ 0x747F7E74, 0x7E757F7E, 0x7C7D747D, 0x76827F7A,
+ 0x77747E7B, 0x77726F7C, 0x67737169, 0x6B617271,
+ 0x6D6B616D, 0x5C6A685D, 0x61556868, 0x5C5C5061,
+ 0x4B5E5C51, 0x4D455755, 0x4849404F, 0x42484C41,
+ 0x7570464B, 0x868A8571, 0x9A90948F, 0xB9B09EA0,
+ 0xB8B9AFB8, 0xB4B8BBB2, 0xB8B2B8BD, 0xB8BCB6B4,
+ 0xB7B9BDB7, 0xBDB8B9BD, 0xB9BDB8B9, 0xB9B8BCB7,
+ 0xBDB8BABE, 0xB9BDB8B9, 0xB9B9BFBA, 0xBCB7B8BE,
+ 0xB8BEB9B6, 0xB5B9BDB8, 0xB8B6B6BA, 0xB9BCBAB5,
+ 0xB8B8BDBB, 0xBDBBB4BB, 0xB8BDBBB8, 0xB9BBBFBA,
+ 0xC0BBBABE, 0xBBBFBABC, 0xBBBBBEBC, 0xBDBBBABD,
+ 0xBCBFBDBA, 0xBEBABFBD, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBDC0BE, 0xC0BFBBC0, 0xBAC0BFBA, 0xBEBABFC0,
+ 0xBFBEB8BD, 0xB9BFBEB9, 0xBFB7BFBE, 0xC1C0B8C0,
+ 0xB9BFBEBB, 0xBEB7BDBC, 0xC1C1B9BF, 0xB8C0C0B9,
+ 0xC0BABFC0, 0xC0C3BABF, 0xB5B7BFBB, 0xBEB6B3C2,
+ 0xA4BEB1AB, 0xA79BB7AF, 0xB4A99DBB, 0x95B7A194,
+ 0xA397BBA3, 0xB7A297B8, 0x95B6A196, 0xA297B8A0,
+ 0xB6A594B9, 0x97B8A494, 0xA697B6A8, 0xBAA899B8,
+ 0x98B8A89C, 0xA49AB8A5, 0xB8A6A1B6, 0xB8BEACA9,
+ 0xB9BBBBB8, 0xB6B9BEBC, 0xBBB6B5BB, 0xB4BBB6B4,
+ 0xB9B3B9B4, 0xBEBBB5BC, 0xB2B8B7B7, 0xB7B4BAB9,
+ 0xB9B8B2B8, 0xB4B9B7B4, 0xB9B8BDBB, 0xBCB7B8BE,
+ 0xB4BBB8B6, 0xB6ABB4B7, 0xBBBAAAB3, 0xB7BCBAB5,
+ 0xB2B3B9B4, 0xB8B3B1B7, 0xB0B4AFB4, 0xB7B6BAB5,
+ 0xB7B2B8BC, 0xB3B7B2B3, 0xB6B3BAB3, 0xBCB7B6BD,
+ 0xB6BAB5B6, 0xB3B4B5B3, 0xAFAFB4B5, 0xB4B5B3AF,
+ 0xB2B2B3B1, 0xB9B4B3B7, 0xB5B9B4B5, 0xB4B5B9B4,
+ 0xB9B7B5B9, 0xB1B6B4B6, 0xB1AFB5B0, 0xB6B1AFB6,
+ 0xB1B5B0B0, 0xABB0B4AE, 0xAFA6AFB1, 0xABAFA9AC,
+ 0xA1A1A5A0, 0x9D98A0A6, 0x989F9897, 0x9FA0A49F,
+ 0x948FA0A4, 0x70746F8E, 0x4D4F534D, 0x42395153,
+ 0x42403841, 0x484F5047, 0x5A515051, 0x5E615857,
+ 0x5862655C, 0x61585E61, 0x63665D5E, 0x6262645E,
+ 0x706A6668, 0x70706A70, 0x68707168, 0x756C7071,
+ 0x74756C74, 0x70787970, 0x776E7879, 0x70716876,
+ 0x6C707469, 0x776D7478, 0x7B7C7276, 0x737D7E75,
+ 0x79707B7C, 0x77786F78, 0x777B7873, 0x746F7F7C,
+ 0x77746F77, 0x70787872, 0x79707879, 0x78797078,
+ 0x767A7C76, 0x7A767A7C, 0x7677737B, 0x76757771,
+ 0x7671787C, 0x71756F72, 0x6B73736D, 0x766C7374,
+ 0x70716875, 0x6D74716D, 0x716D7471, 0x716E6974,
+ 0x6A6F6E6A, 0x6F6B6F6E, 0x74736F70, 0x246B6C6A,
+ 0x00002326, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x201F1B02,
+ 0x464F4C48, 0x60594F4B, 0x6E6C6266, 0x686F6D65,
+ 0x6F657071, 0x6A695F6E, 0x4C686459, 0x4F445F59,
+ 0x46443953, 0x28323028, 0x03003230, 0x06030006,
+ 0x01020000, 0x00000000, 0x00000002, 0x00000000,
+ 0x00000000, 0x02000000, 0x32020100, 0x38303838,
+ 0x56544A3B, 0x6A69675D, 0x72697674, 0x78736A77,
+ 0x6C7A786D, 0x786E7977, 0x75736B79, 0x556D6C62,
+ 0x504A5F5D, 0x42413D50, 0x263D3C38, 0x01002927,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8AAAA06, 0xBEBFC2C0, 0xBFBDBBC0, 0xBABFBDBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBCBABFBD,
+ 0xBBB9B9BE, 0xB9BEBCB6, 0xBBB8BDBB, 0xBDBCB8BD,
+ 0xB9BEBDB8, 0xBBB6BCBB, 0xBBBAB6BC, 0xACB2B1B5,
+ 0xB8B8BDBC, 0xBAB8B5BA, 0xB8BDBBB5, 0xBBB8BDBB,
+ 0xBEBBB8BD, 0xB5BCB9B7, 0xB7B8BEB9, 0xBDBBB6BC,
+ 0xB8BDBBB8, 0xB9B5BAB8, 0xBBB9B6BB, 0xBABDBBB8,
+ 0xB9B8BEB9, 0xBEB9B8BE, 0xB8BCB7BA, 0xB5B4BBB4,
+ 0xBBB5B5BC, 0xB8BCB6B7, 0xB9B9C0B9, 0xBFB9B9C0,
+ 0xA0A49EBB, 0x9D969D96, 0xA49D9DA4, 0x9DA59B9D,
+ 0x9A9EA39A, 0xA39A9EA3, 0xA0A39AA0, 0x969CA297,
+ 0xA49A99A1, 0x99A1979C, 0x989EA499, 0x6E6A9FA3,
+ 0x0607056F, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x55510001,
+ 0x80807A54, 0x7D7C7B77, 0x817D8281, 0x807F7B82,
+ 0x7880807A, 0x7E798280, 0x86827D82, 0x7983807B,
+ 0x7D78817E, 0x807D7880, 0x7B83807B, 0x7F7A8380,
+ 0x827F7A82, 0x7B83807B, 0x807B8380, 0x84817C83,
+ 0x78818279, 0x81788081, 0x80817880, 0x7A7E7E78,
+ 0x7D788080, 0x83807B80, 0x7B83807B, 0x7E758380,
+ 0x7D7E747D, 0x6E7D7E74, 0x7E757778, 0x8081787D,
+ 0x78828078, 0x81788280, 0x78797080, 0x6F7B7873,
+ 0x73707774, 0x77747078, 0x697A7870, 0x6B617273,
+ 0x6D6B616C, 0x626D6B61, 0x6D616E6E, 0x6161556B,
+ 0x4A5E5C51, 0x4F455755, 0x48493F50, 0x41484C40,
+ 0x5F59464C, 0x7276705B, 0x8E90948F, 0xADA49094,
+ 0xB6B9B0A8, 0xB1B8BBB2, 0xBFB9B5BA, 0xBBBFB9BB,
+ 0xB8BABEB8, 0xBEB9BABE, 0xB9BDB8BA, 0xB6BABEB9,
+ 0xBCB7B7BB, 0xB8BCB7B8, 0xB8B7BDB8, 0xBDB8B7BD,
+ 0xB7BDB8B7, 0xB8B9BDB8, 0xBAB8B9BD, 0xB7BCBAB7,
+ 0xBCB8BDBB, 0xBDBBB8BF, 0xB7BCBAB8, 0xBABABEB9,
+ 0xBEB9BBBF, 0xBBBFBABA, 0xBBBCBFBD, 0xBEBCBABD,
+ 0xBCBFBDBB, 0xBEBABFBD, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBEBBC0BE, 0xBFC0BBC0, 0xB9C1C1BA, 0xBDBBBFC0,
+ 0xBDBCB9BE, 0xB9BFBEB7, 0xBFB8C0BF, 0xBFBEB8C0,
+ 0xBAC0BFB9, 0xBFB9BFBE, 0xBEBFBAC0, 0xBABFC0B9,
+ 0xC0BAC0BF, 0xC0C0BABF, 0xBABEC3B8, 0xB7B4B5BF,
+ 0xA4BBAAA7, 0xA89DB7AC, 0xB5A69AB8, 0x97B9A295,
+ 0xA698BAA7, 0xB6A499BA, 0x95B6A095, 0xA698BAA0,
+ 0xB7A595B7, 0x98B8A595, 0xA798B7A7, 0xB9AA9CB8,
+ 0x9CB8A99D, 0xA69DB7A8, 0xBAA5A2B2, 0xBABAB2B1,
+ 0xB8BCB7B8, 0xB6B5BAB8, 0xC0BBB5BB, 0xB8BFBAB9,
+ 0xBFBBC1BC, 0xC4C1BEC4, 0xB7BEBBBD, 0xBAB3B9B8,
+ 0xB9B8B5BB, 0xB3B8B7B4, 0xB9B7BEBB, 0xBBB6B7BE,
+ 0xB5BCB9B5, 0xBAB0B7BA, 0xBCBBB0B7, 0xB8BCB7B7,
+ 0xB4B1B7B2, 0xBCB7B3B9, 0xB5B9B4B8, 0xB4B8BCB7,
+ 0xB8B3B5B9, 0xB3B7B2B4, 0xB7B3B9B4, 0xBDB8B6BC,
+ 0xB0B3B1B7, 0xAEA8ABA9, 0xB4B4AFB0, 0xB2B5B3B4,
+ 0xAEB0B4AF, 0xB8B3AFB3, 0xB5B9B4B4, 0xB4B5B9B4,
+ 0xB6B4B5B9, 0xB3B6B4B3, 0xAFAFB5B0, 0xB5B0AEB4,
+ 0xB0B4AFB1, 0xAEAFB1AB, 0xB3AAB2B4, 0xACAFA6B0,
+ 0x9FA8ACA6, 0x9F999FA6, 0x9397919B, 0x8F90948E,
+ 0x847F9094, 0x70746E80, 0x3B51534D, 0x41383F41,
+ 0x42403840, 0x4F505148, 0x60575758, 0x5E61585D,
+ 0x5D61645B, 0x61586366, 0x60635A5E, 0x6262645E,
+ 0x6B656668, 0x70706A6B, 0x6B73746B, 0x746B7374,
+ 0x75766D73, 0x70787970, 0x766D7879, 0x70716875,
+ 0x6A76776D, 0x73697374, 0x7B7C7272, 0x737D7E75,
+ 0x7C737B7C, 0x7C7D747B, 0x73787570, 0x7C777B78,
+ 0x7979737F, 0x757B7B75, 0x7A717B7B, 0x78797079,
+ 0x73787872, 0x7B757979, 0x7979737B, 0x7771726E,
+ 0x7C77787C, 0x71736D78, 0x6873736D, 0x746B7071,
+ 0x70716873, 0x7074716C, 0x746F7975, 0x74716C77,
+ 0x6B74736F, 0x6C68706F, 0x72716D6D, 0x00696A68,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x201F1B02,
+ 0x474F4C48, 0x61584F4C, 0x6E6C6266, 0x656E6C64,
+ 0x6C626D6E, 0x6A695F6B, 0x4E666459, 0x50455D59,
+ 0x46443A52, 0x29323028, 0x0400312E, 0x07040007,
+ 0x00000000, 0x00000000, 0x00000002, 0x00000000,
+ 0x00000001, 0x02000000, 0x31383832, 0x392F3B39,
+ 0x56544A3B, 0x6269675D, 0x736A6E6C, 0x78736A78,
+ 0x727E7C71, 0x776F7D7C, 0x75736B79, 0x546D6C62,
+ 0x504B5F5E, 0x41403C53, 0x243D3C38, 0x00002928,
+ 0x00010002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xA8AAAA06, 0xBAC0C3C1, 0xBEBCB9BF, 0xB9BEBCBB,
+ 0xBBB9BEBC, 0xBFBCB7BE, 0xB9C0BDB8, 0xBBB8BDBB,
+ 0xBBB9B8BD, 0xB8BDBBB6, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBCB8BDBB, 0xBCBAB9BE, 0xB3B8B6B7,
+ 0xB9B7BCBA, 0xBDB8B8BE, 0xB8BEB9B7, 0xB9B8BEB9,
+ 0xBDB8B8BE, 0xB7BDB8B7, 0xB7B7BDB8, 0xBCB7B6BC,
+ 0xB8BCB7B8, 0xB8B9BDB8, 0xBCB7B9BD, 0xB8BCB7B8,
+ 0xB7BABEB9, 0xBEB9B8BC, 0xB8BCB7BA, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB6B8BCB7, 0xAAA4B8BC,
+ 0x9EA29CA6, 0xA0969B92, 0xA9A0A4A9, 0xA2AAA0A4,
+ 0x9A9FA79D, 0xA59A9DA5, 0xA1A59A9F, 0x979BA196,
+ 0xA2999CA2, 0x9BA0979D, 0x99A0A499, 0xA29CA0A4,
+ 0x20211DA0, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x2D290001,
+ 0x8784802E, 0x787F7C78, 0x7F7B7D7C, 0x80817D7E,
+ 0x7A81817B, 0x807B8080, 0x827F7A83, 0x77848179,
+ 0x7B76807C, 0x7F7C777F, 0x7E827F7A, 0x877E8687,
+ 0x83847B86, 0x7887857D, 0x81798280, 0x83817983,
+ 0x767E7F76, 0x7F757E7F, 0x83817980, 0x79817E79,
+ 0x7F77817E, 0x82807881, 0x7B83807B, 0x7F768380,
+ 0x7E7F767E, 0x797E7F76, 0x817B8182, 0x81817B81,
+ 0x78827F7A, 0x7E758280, 0x7879707D, 0x6E77746F,
+ 0x73707673, 0x77746F78, 0x6C78766E, 0x736B7576,
+ 0x75746A75, 0x65747369, 0x6C626E6F, 0x68695F6B,
+ 0x4C616155, 0x584A5858, 0x4F4F4159, 0x42484C40,
+ 0x4B42494D, 0x6A6D6448, 0x84838A83, 0xA8A1838B,
+ 0xA1A8A1A0, 0xB0B3B7B1, 0xC0B9B2B6, 0xB9C0B9B9,
+ 0xB8BABEB8, 0xC0BABABE, 0xBABEB8BC, 0xBABBBFBA,
+ 0xBCB7BBBF, 0xBABEB9B8, 0xBBBBBEBC, 0xBCBABABD,
+ 0xBABDBBB9, 0xBBBABDBB, 0xBFBDBABD, 0xBABFBDBC,
+ 0xBBB7BCBA, 0xBFBDB7BE, 0xB6BBB9BA, 0xBABABDBB,
+ 0xBFBDB9BC, 0xBDC0BEBC, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBEBABFBD, 0xC0C0BAC1, 0xB8C0C0B8, 0xBFBBC0BF,
+ 0xC0BFBBC0, 0xB6BDBABA, 0xBDB7C0BD, 0xC0BDB7C0,
+ 0xBBC0BEB9, 0xBDBAC1BE, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xC0BABFC0, 0xBEBFB8C0, 0xBABFC0B9, 0xBEBABFC2,
+ 0xACBCB2B4, 0xA8A0B7AD, 0xB7A799B5, 0xA0C1A798,
+ 0xA798B8B1, 0xB7A396B6, 0x98B8A497, 0xA396B6A5,
+ 0xB9A798B8, 0x98B7A899, 0xA89CB8A7, 0xB7AA9FB9,
+ 0xA1B8A8A0, 0xA8A2B3A9, 0xBCB6B5BE, 0xBCBCB9BB,
+ 0xB9BCBABA, 0xBAB3B8B7, 0xBDBAB6BD, 0xB2B9B6B6,
+ 0xBAB2B9B6, 0xC0BFB6BD, 0xB6BCBBBA, 0xBBB6BCBB,
+ 0xBBBAB6BC, 0xB3B9B8B5, 0xB7B1B9B8, 0xB9B7B1BA,
+ 0xB6BBBAB4, 0xB7B3B8B9, 0xB8B7AFB4, 0xB6BBB9B3,
+ 0xABB0B6B1, 0xB5B3AAB0, 0xB2B6B1B0, 0xB3B8BCB7,
+ 0xB9B3B7B9, 0xB0B4AFB5, 0xB9B5B8B6, 0xBBB9B8BB,
+ 0xB5B8B6B8, 0xB3B4B7B5, 0xB0AEB4B8, 0xADB0AEAD,
+ 0xAAACB0AB, 0xADA8AAB1, 0xADB3AEA7, 0xB3AEB4AF,
+ 0xB7B2B4B8, 0xB2B3AFB3, 0xAFB0B4AF, 0xB1ABB0B4,
+ 0xA7ABA5AD, 0xA9AEB0AA, 0xB1A8AFAF, 0xA8ABA2B0,
+ 0x97A6A9A0, 0x988F9BA0, 0x95988F95, 0x8185887F,
+ 0x6F698587, 0x53554F6D, 0x384A4C46, 0x41383E41,
+ 0x4B4C4340, 0x55585950, 0x5E555D5E, 0x5D5E555D,
+ 0x62686862, 0x645B6868, 0x65665D63, 0x60686960,
+ 0x69606869, 0x6D6E6568, 0x6B73746B, 0x746B7374,
+ 0x78797073, 0x6D787970, 0x766D7576, 0x78797075,
+ 0x6F7A7B72, 0x776F7977, 0x79776F79, 0x70787970,
+ 0x7C737879, 0x7B7C737B, 0x70787970, 0x7C737879,
+ 0x7D7E757B, 0x71787970, 0x7970777A, 0x78797076,
+ 0x70797973, 0x726D7875, 0x76767075, 0x73767773,
+ 0x736F7478, 0x72746E72, 0x6873736D, 0x766D7071,
+ 0x78797075, 0x6B76736E, 0x736E7370, 0x76736E76,
+ 0x657A7772, 0x6A656D6A, 0x7A77736D, 0x00474846,
+ 0x00000001, 0x00000000, 0x00020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x1F1C1802,
+ 0x4A4A4742, 0x5F565554, 0x6E6C6164, 0x62737268,
+ 0x6C626B6C, 0x65645A6D, 0x57626157, 0x4E446261,
+ 0x42433A4D, 0x31383530, 0x04003934, 0x07040008,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000301,
+ 0x03010004, 0x1B1C1802, 0x3942433A, 0x53484443,
+ 0x66645955, 0x69737167, 0x7B727573, 0x807B7280,
+ 0x6F7A796F, 0x7A727A79, 0x7A78707C, 0x5A727369,
+ 0x534E6564, 0x46433E56, 0x243F3C38, 0x00002928,
+ 0x02000002, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x0709050A, 0x05070805,
+ 0xAAABA906, 0xBAC0C3C1, 0xBFBDB9BF, 0xB9BEBCBC,
+ 0xBCB9BEBC, 0xBFBCB8BF, 0xB7BEBBB8, 0xBBB6BBB9,
+ 0xBAB8B8BD, 0xB8BDBBB5, 0xBDB8BDBB, 0xBDBBBABF,
+ 0xB8BDBBB8, 0xBBB9BEBC, 0xBEBCB8BD, 0xB7BDB8B9,
+ 0xB9B7BDB8, 0xBDB8B8BE, 0xB8BEB9B7, 0xB9B7BDB8,
+ 0xBDB8B8BE, 0xB7BDB8B7, 0xB8B7BDB8, 0xBDB8B7BD,
+ 0xB9BDB8B9, 0xB8B9BDB8, 0xBCB7B9BD, 0xB9BDB8B8,
+ 0xB6B8BCB7, 0xBCB7B7BB, 0xB8BCB7B8, 0xB7B8BCB7,
+ 0xBBB9B8BC, 0xB8BCB7B8, 0xB7B8BCB7, 0xBCB6B8BC,
+ 0xA8ACA6B8, 0xA09DA299, 0xA9A0A5AB, 0xA3A89FA4,
+ 0x9AA0A89D, 0xA59A9DA5, 0xA0A4999F, 0x989DA398,
+ 0xA2979DA3, 0x9CA2979C, 0x99A0A499, 0xA39AA0A4,
+ 0x20221CA0, 0x00000100, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x2C2B0000,
+ 0x8784802E, 0x7B827F7B, 0x8480807F, 0x80827C83,
+ 0x7B83837D, 0x807B8181, 0x827F7A83, 0x78848179,
+ 0x7B788380, 0x7F7C7780, 0x787F7F79, 0x80778081,
+ 0x83847B7F, 0x79838179, 0x7E768381, 0x807E7680,
+ 0x767A7B72, 0x7E767E7F, 0x82807880, 0x77817E79,
+ 0x7D757F7C, 0x7E7C747F, 0x7A827F7A, 0x7F768482,
+ 0x8182797E, 0x79818279, 0x82798182, 0x7E7E7881,
+ 0x75827F7A, 0x7C737D7A, 0x7879707B, 0x777B7971,
+ 0x77727F7C, 0x7C79747B, 0x6E7A7B72, 0x726A7778,
+ 0x76776E74, 0x6273746A, 0x6C636B6C, 0x6869606B,
+ 0x55616056, 0x584A6161, 0x58584A59, 0x404A4D3E,
+ 0x4C42484C, 0x54584D4B, 0x82686D64, 0x8B84838C,
+ 0xA0A8A183, 0xB2B4B8B2, 0xC1BAB4B8, 0xB8BFB8BA,
+ 0xB8BABEB8, 0xC0BABABE, 0xBBBFB9BC, 0xBABBBFBA,
+ 0xBCB7BBBF, 0xBBBFBAB8, 0xBBB9BCBA, 0xBEBCBABD,
+ 0xB9BCBABB, 0xBEBDC0BE, 0xBBB9BDC0, 0xB6BBB9B8,
+ 0xBCB7BCBA, 0xBFBDB8BF, 0xBBC0BEBA, 0xBDB9BCBA,
+ 0xBFBDBCBF, 0xBCBFBDBC, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBDB8BFBC, 0xC0BFB9C0, 0xBAC0BFBA, 0xC0BCC1C0,
+ 0xC1BEBCC1, 0xB2B9B6BA, 0xBEB5BEBB, 0xC0BDBAC1,
+ 0xB9C0BDB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xBAC0BFBA, 0xC4B8C0C0,
+ 0xB4BFB9BF, 0xA6A2B5B2, 0xB5AAA0B7, 0x98B7A899,
+ 0xA898B7A8, 0xB8A798B8, 0x97B7A598, 0xA596B6A4,
+ 0xB7A798B8, 0x9CBAA798, 0xAB9FBBA8, 0xB5A8A0B7,
+ 0xA2B1A8A2, 0xB2B1BBA7, 0xBDBABBBF, 0xB8B8BBBD,
+ 0xB4B9B8B6, 0xBBB2B8B7, 0xC1BEB6BC, 0xB1B8B5BA,
+ 0xB7ADB4B1, 0xB3B2B2B8, 0xB2B8B7AD, 0xC0B6BCBB,
+ 0xBCBBBBC1, 0xB2B8B7B6, 0xB8AFB7B6, 0xBBB9B1B9,
+ 0xB8BABAB6, 0xB6B5B9BA, 0xB9B8B1B5, 0xB4B9B7B4,
+ 0xABB1B6B4, 0xA8A6AAB0, 0xAAAFADA3, 0xB2B5B9B4,
+ 0xBAB4B6B8, 0xB2B6B1B6, 0xB4B2B5B3, 0xB7B7B2B4,
+ 0xB5B7B7B5, 0xB3B9BEBC, 0xB0AEB2B8, 0xA5ABA6AD,
+ 0xADADB3AE, 0xAFAAADB4, 0xB1B7B2A9, 0xB2AEB4AF,
+ 0xB4AFB3B7, 0xAEB2ADB0, 0xABB2B3AF, 0xB1AAACB0,
+ 0xA7ABA5AA, 0xABA8AAA4, 0xB1A8B1B1, 0xA8ABA2AE,
+ 0x98A6A9A0, 0x988F9EA1, 0x95988F95, 0x80868980,
+ 0x6F698689, 0x53554F6F, 0x383E4138, 0x4C433E41,
+ 0x56574E4B, 0x5B5D5E55, 0x5E556364, 0x63645B5D,
+ 0x6263635D, 0x655C6868, 0x65665D64, 0x656B6C63,
+ 0x6F666D6E, 0x7071686E, 0x69707168, 0x746B7172,
+ 0x73746B73, 0x7076776E, 0x766D7879, 0x73746B75,
+ 0x6F77756D, 0x766E7977, 0x7D7B7378, 0x6F77786F,
+ 0x79707778, 0x78797078, 0x74787970, 0x7C737C7D,
+ 0x7D7E757B, 0x6F797C73, 0x7A717578, 0x787B7277,
+ 0x737C7C76, 0x766E7979, 0x79797378, 0x73747873,
+ 0x726E7478, 0x72746E71, 0x6D707168, 0x78727576,
+ 0x75756F78, 0x6C76746C, 0x77727674, 0x6F6C677A,
+ 0x656D6A65, 0x6B666D6A, 0x7A77736F, 0x00333130,
+ 0x00000001, 0x00000000, 0x00020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000200, 0x1F1C1804,
+ 0x4A4A4840, 0x60555654, 0x6E6C6164, 0x62727167,
+ 0x6C626B6C, 0x69685E6D, 0x4E616259, 0x4D445657,
+ 0x42433A4A, 0x30373430, 0x04003833, 0x06030008,
+ 0x00000100, 0x00000002, 0x00000000, 0x00020301,
+ 0x1B170203, 0x4D4D471A, 0x48424339, 0x64595454,
+ 0x76746966, 0x6E76746A, 0x7C737A78, 0x7D7B7181,
+ 0x707A796F, 0x7B71797A, 0x7A796F7C, 0x5A727468,
+ 0x544C6364, 0x48443F57, 0x263F3C38, 0x00002927,
+ 0x02000002, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x04060805,
+ 0xA9AAA805, 0xBABDC0BE, 0xBFBABBBF, 0xB9BFBABB,
+ 0xBCB8BDBB, 0xBFBCB8BF, 0xB9C0BDB8, 0xBBB8BDBB,
+ 0xBBB6B8BD, 0xB6BCB7B5, 0xB9B9BFBA, 0xBEB9B8BE,
+ 0xB8BEB9B8, 0xB9B8BEB9, 0xBEB9B8BE, 0xB9BFBAB8,
+ 0xB7B6BDB8, 0xBDB8B6BE, 0xB7BDB8B7, 0xB8B7BDB8,
+ 0xBDB8B7BD, 0xBABEB9B9, 0xB9B9BDB8, 0xBDB8BABE,
+ 0xB9BDB8B9, 0xB8B9BDB8, 0xBCB7B9BD, 0xB9BDB8B8,
+ 0xB7B6BDB6, 0xBCB7B8BC, 0xBCBDBBB8, 0xB9B9BDB8,
+ 0xBCB7BABE, 0xB5BBB6B6, 0xB7B8BCB7, 0xBCB7B9BD,
+ 0xB8BCB6B8, 0x9FA9B1A7, 0xA99EA1A9, 0x9EA499A3,
+ 0x9DA0A89D, 0xA79CA0A8, 0x9FA59AA1, 0x979FA59A,
+ 0xA3989CA2, 0x9DA3989D, 0x99A0A499, 0xA49AA0A4,
+ 0x4D4D47A3, 0x00000100, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x59575602, 0x7C84817D, 0x807A8180, 0x80827C7E,
+ 0x7B80807A, 0x81788384, 0x81827980, 0x7C86847C,
+ 0x807C8684, 0x827F7A83, 0x7880807A, 0x837D8081,
+ 0x84847E83, 0x7B7F7C77, 0x807B8380, 0x807D7883,
+ 0x79838179, 0x81798381, 0x83807B83, 0x77827F7A,
+ 0x7E767F7C, 0x83817980, 0x7682837A, 0x7F767E7F,
+ 0x7D7E757E, 0x777E7F76, 0x7D757F80, 0x807E767F,
+ 0x757D7E75, 0x81787D7E, 0x80817880, 0x747E7C74,
+ 0x7B767E7C, 0x7B78737E, 0x717A7B72, 0x756C787C,
+ 0x70716874, 0x69717268, 0x6C637074, 0x67685F6B,
+ 0x54616056, 0x62566060, 0x58584A62, 0x3E4A4D3E,
+ 0x4C40484D, 0x4A4C404A, 0x826A6E63, 0x8A83868B,
+ 0xA1A8A183, 0xAFABAFA9, 0xB7AEB3B8, 0xBCC1B8B2,
+ 0xB8BABEB8, 0xBEB8BABE, 0xBEC0BABC, 0xBABBBFBA,
+ 0xC1BCBBBF, 0xBDC1BCBD, 0xBDBBBEBC, 0xBFBDBCBF,
+ 0xBABDBBBC, 0xBCB9BBBB, 0xBBB9BABC, 0xB6BBB9B8,
+ 0xBDBABFBD, 0xC0BEB9C0, 0xB9BEBCBB, 0xBBBABDBB,
+ 0xBFBDBABD, 0xB9BCBABC, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBDBCBFBD, 0xBFBDBCBF, 0xBABFBDBC,
+ 0xBDBAC1BE, 0xBFBDB9C0, 0xBABCBCBC, 0xBBB6BBBA,
+ 0xB9B6B7BC, 0xB6BDBAB2, 0xBEB7BDBC, 0xC1C0B9BF,
+ 0xB8C0BFBB, 0xBFB9C1C1, 0xC0BFB8C0, 0xB8C0BFB8,
+ 0xC0B8C0BF, 0xC0BFB9C1, 0xBAC0BFBA, 0xC2B8C0C0,
+ 0xBDC4B8BF, 0xADADB9B7, 0xBBACA6B7, 0x99B5B1A5,
+ 0xA797B6A8, 0xB8A697B7, 0x94B6A798, 0xA798B8A4,
+ 0xB5AA9BBA, 0x9CB8A599, 0xA8A0B7A8, 0xB5A7A1B4,
+ 0xB2B8ADA9, 0xB8BABBB2, 0xBFB8BDBC, 0xBDBCBBC0,
+ 0xB7BCBBB8, 0xBEB6BDBA, 0xBFBEBAC1, 0xBCC1C0BA,
+ 0xBFB6BCBB, 0xB8B7BAC0, 0xB2B7B5B3, 0xBEB6BCBB,
+ 0xBCBBB9BF, 0xB2B8B7B7, 0xB8AFB7B6, 0xBBB9B3B9,
+ 0xB8BBB9B6, 0xB7B4B9B8, 0xB7B6B3B8, 0xB4B9B7B2,
+ 0xB8B8BBB9, 0xB5B3B9BD, 0xB0B5B3B0, 0xB4B2B6B1,
+ 0xB7B2B5B9, 0xB3B7B2B3, 0xB0AEB1AF, 0xB6B6AEB0,
+ 0xADAFAFB6, 0xBCB2B7B5, 0xB0AEB9BE, 0xAAB0ABAB,
+ 0xB1B1B7B2, 0xB4AFB0B8, 0xA5ABA6AE, 0xB2B0B4AF,
+ 0xB6B1B3B7, 0xAEB4AFB2, 0xABACB0AB, 0xA9A2AAB0,
+ 0xA3A7A1A2, 0xA4A8AAA4, 0x9F99A8AA, 0x99A0999B,
+ 0x8E9DA097, 0x99909497, 0x93988F94, 0x6A838781,
+ 0x54506C70, 0x393B3553, 0x433E4138, 0x4A444B4C,
+ 0x55554F4A, 0x5D5F5C57, 0x635B6562, 0x66645C65,
+ 0x5F65655F, 0x665D6565, 0x68696065, 0x676D6E65,
+ 0x6C636F70, 0x6B6C636B, 0x6B73746B, 0x706A7374,
+ 0x70706A70, 0x6E707168, 0x796F7677, 0x76776D78,
+ 0x6F76746C, 0x776F7977, 0x7A787079, 0x767B7C73,
+ 0x7C737E7F, 0x7879707B, 0x70787970, 0x7C737879,
+ 0x7E7F767B, 0x72767872, 0x76707478, 0x76787272,
+ 0x73767872, 0x79707779, 0x777A7178, 0x6E787C76,
+ 0x706A7074, 0x72756C6E, 0x6B73746B, 0x756C7374,
+ 0x75766D74, 0x6976746C, 0x726D7371, 0x6F6C6776,
+ 0x656D6A65, 0x69646B6B, 0x6D6A666C, 0x00020000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000200, 0x201B1804,
+ 0x4A4A4840, 0x60555654, 0x6F6B6064, 0x62727167,
+ 0x685E6B6C, 0x69685E69, 0x4D606158, 0x4E455356,
+ 0x42433A4B, 0x30383330, 0x04003A33, 0x08050108,
+ 0x00020000, 0x00010000, 0x03010102, 0x18040201,
+ 0x4C481D1C, 0x4F4C474D, 0x57545448, 0x73686565,
+ 0x78746975, 0x71807C71, 0x7B70807C, 0x807C717F,
+ 0x717E7C71, 0x7B717D7D, 0x7B7A707C, 0x5A727468,
+ 0x544C6364, 0x47433E57, 0x263F3C38, 0x00002927,
+ 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xAAABA906, 0xBABDC0BE, 0xBFBABBBF, 0xB9BFBABB,
+ 0xBCB9BEBC, 0xBEBBB8BF, 0xB8BFBCB7, 0xBBB8BDBB,
+ 0xBEB9B8BD, 0xB5BBB6B8, 0xB9B8BEB9, 0xBEB9B8BE,
+ 0xB9BFBAB8, 0xB6B8BEB9, 0xBEB9B5BB, 0xB8BEB9B8,
+ 0xB8B7BFB8, 0xBDB8B7BF, 0xB8BEB9B7, 0xB7B7BDB8,
+ 0xBCB7B6BC, 0xB9BDB8B8, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB9BDB8B8, 0xB8B9BDB8, 0xBCB7B9BD, 0xB8BCB7B8,
+ 0xB8B6BCB7, 0xBEB9B9BD, 0xBDBEBABA, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB6BCB7B6, 0xB6B8BCB6, 0xBCB7B8BC,
+ 0xB8BCB6B8, 0xA1A9B0A9, 0xAAA1A3AB, 0x9CA297A5,
+ 0x999FA79C, 0xA59A9CA4, 0x9EA4999F, 0x989DA398,
+ 0xA2959DA3, 0x9DA4979B, 0x999EA499, 0xA499A0A4,
+ 0x75786FA0, 0x00000100, 0x01000000, 0x01020000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x5A585700, 0x7A858480, 0x827C8080, 0x82827C82,
+ 0x78818279, 0x81788081, 0x80817880, 0x7784857C,
+ 0x807C7F7C, 0x8C898583, 0x7C85857F, 0x857F8485,
+ 0x83837D85, 0x7B83807B, 0x807B8380, 0x83807B83,
+ 0x76807E76, 0x817C807E, 0x83807B84, 0x78817E79,
+ 0x81798280, 0x817F7783, 0x7284857C, 0x7A707A7B,
+ 0x82837A79, 0x7B82827C, 0x7E768181, 0x83827880,
+ 0x757D7E75, 0x81787D7E, 0x7F807780, 0x747E7D73,
+ 0x79717E7C, 0x797A717B, 0x6D74776E, 0x71687376,
+ 0x72736A70, 0x61727369, 0x695F6B6D, 0x68696068,
+ 0x5F6A695F, 0x61556A69, 0x56584C61, 0x404A4C40,
+ 0x4C3E4A4C, 0x4A4C404C, 0x64505147, 0x8A846A6D,
+ 0x868A8486, 0xA7A7AAA1, 0xB9AEADB0, 0xBABFB6B3,
+ 0xBAB9BDB7, 0xBEB8BCC0, 0xBCBEB8BC, 0xBCBCC0BB,
+ 0xBFBABDC1, 0xBCC0BBBB, 0xBBB9BCBA, 0xBFBDBABD,
+ 0xBBBEBCBC, 0xBCBABCBC, 0xBDBBBABC, 0xBABFBDBA,
+ 0xBCB7BCBA, 0xBFBDB8BF, 0xBBC0BEBA, 0xBBBCBFBD,
+ 0xBFBDBABD, 0xB8BBB9BC, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBBBABDBB, 0xBDBBBABD, 0xBABDBBBA,
+ 0xBDBABFBD, 0xC0BEBABF, 0xBCBFBDBD, 0xBABBC0BF,
+ 0xC1BEB6BB, 0xBAC1BEBA, 0xBEBAC0BF, 0xBDBEB9BF,
+ 0xB9C1C1B8, 0xC0B8C0C0, 0xC0C0B6C0, 0xB9C1C0B8,
+ 0xBDB8C0BF, 0xC1C0B9C0, 0xBBC0BFBC, 0xC0B9C1C1,
+ 0xC0C3B8C0, 0xBABEC3B9, 0xB9AEADB6, 0xA1B6B1AA,
+ 0xA799B5AA, 0xB8A798B7, 0x96B8A798, 0xA798B8A6,
+ 0xB7A89CB8, 0x9DB7A89D, 0xA9A2B7A6, 0xB8AFABB7,
+ 0xB9B9B4B2, 0xB8BBB9B7, 0xBBB9BEBD, 0xBDBCB6BC,
+ 0xB7BCBBB8, 0xBFB7BCBA, 0xC0BFBBC2, 0xBBC0BFBB,
+ 0xBBB7BCBB, 0xB8B6B7BC, 0xB3B8B6B3, 0xBBB7BCBA,
+ 0xBCBAB8BD, 0xB2B7B5B7, 0xB6B3BAB7, 0xBBB9B2B9,
+ 0xB7BAB8B6, 0xB8B4B9B8, 0xB8B7B3B9, 0xB6BBBAB3,
+ 0xB9B8BBB9, 0xB4B2B8BB, 0xB0B5B3B1, 0xB2B3B6B4,
+ 0xB7B5B3B7, 0xB3B6B4B4, 0xB4AEB1AF, 0xB7B7B2B4,
+ 0xADAFAFB5, 0xA6ADB0AE, 0xA9A7A3A8, 0xABB0AEA4,
+ 0xADAEB4AF, 0xB3AEADB4, 0xADB3AEAD, 0xB0AEB2AD,
+ 0xB8B3B1B5, 0xAFB5B0B2, 0xA5AEB4AF, 0xACA5A4AA,
+ 0xA5ACA5A5, 0xA4A0A49E, 0xABA4A6AA, 0x9EA59EA4,
+ 0x8F9DA097, 0x988F9598, 0x8B8F8995, 0x4E6B6F69,
+ 0x3C375054, 0x393D3838, 0x433F3F39, 0x554F4B4C,
+ 0x60605A55, 0x5D64645E, 0x67626363, 0x6A68606A,
+ 0x62686862, 0x69606868, 0x68696068, 0x63686960,
+ 0x71686B6C, 0x6D6E6570, 0x6B717269, 0x736D7374,
+ 0x73746B73, 0x6D73746B, 0x766C7576, 0x75766C75,
+ 0x6F7D7B73, 0x7A727977, 0x7C7A727C, 0x747D7E75,
+ 0x7C737C7D, 0x7B7C737B, 0x757C7D74, 0x7C737D7E,
+ 0x7879707B, 0x71747670, 0x746E7377, 0x74767072,
+ 0x777A7C76, 0x7B727B7D, 0x7A7D7478, 0x72737771,
+ 0x79707478, 0x76797076, 0x6A797A71, 0x756C7273,
+ 0x74756C74, 0x6F74756C, 0x706B7774, 0x76736E73,
+ 0x656B6B65, 0x78726B6B, 0x53524E78, 0x01000100,
+ 0x00000101, 0x01010100, 0x00020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000200, 0x201B1804,
+ 0x4A4A4840, 0x60555554, 0x706C6164, 0x6269685E,
+ 0x685E6D6C, 0x66645A6A, 0x59606158, 0x4D446162,
+ 0x42433A4C, 0x3038342F, 0x03003833, 0x07030208,
+ 0x00020000, 0x00000000, 0x02000002, 0x2F040300,
+ 0x4C473535, 0x4F4D454F, 0x67646458, 0x76687675,
+ 0x78746979, 0x71807C71, 0x7C71807C, 0x807D6F82,
+ 0x6F7F7E70, 0x7C707D7D, 0x7B7B6F7C, 0x59727468,
+ 0x554D6365, 0x48443F58, 0x263F3C38, 0x00002927,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x06080409, 0x06080704,
+ 0xAAABA907, 0xBABFC2C0, 0xBFBABBBF, 0xB8BEB9BB,
+ 0xBBBABFBD, 0xBDBBB7BE, 0xB8BDBBB8, 0xB8B7BDB8,
+ 0xBDB8B7BD, 0xB7BDB8B7, 0xB8B8BEB9, 0xBDB8B7BD,
+ 0xB6BCB7B7, 0xB8B9BFBA, 0xBCB7B7BD, 0xB7BDB8B6,
+ 0xB8B7BDB8, 0xBDB8B7BD, 0xB7BDB8B7, 0xB6B8BCB7,
+ 0xBBB6B7BB, 0xB7BBB6B7, 0xBAB9BCBA, 0xBCBAB9BC,
+ 0xB9BCBAB9, 0xBAB8BDBB, 0xBBB9B7BC, 0xB7BBB6B8,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB9BDB8B8, 0xB6B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB1B6BDB6, 0xB7B1B1B8,
+ 0xB9BDB7B3, 0xA2B6BDB6, 0xAAA3A2A9, 0xA3ABA1A3,
+ 0x98A2A89D, 0xA99E9EA5, 0xA0A499A5, 0x999FA397,
+ 0xA598A1A5, 0x9EA5989E, 0x9A9FA59A, 0xA69B9FA5,
+ 0x93988FA0, 0x001F2220, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x02000002, 0x01000000, 0x00000101,
+ 0x28292700, 0x78807F7B, 0x81788081, 0x80817880,
+ 0x7B80807A, 0x817B7F81, 0x81817B81, 0x7680807A,
+ 0x7F7B7C7C, 0x84837F80, 0x7C83837D, 0x81788282,
+ 0x80817880, 0x7B83807B, 0x81788380, 0x81827980,
+ 0x77817F77, 0x8179817F, 0x83817983, 0x77817F77,
+ 0x847B817F, 0x80817783, 0x7884857C, 0x82798081,
+ 0x83847B81, 0x7B81817B, 0x827A8181, 0x7F7D7584,
+ 0x78808178, 0x81788081, 0x7D7E7580, 0x757C7A72,
+ 0x7B727F7D, 0x7879707A, 0x727A7C76, 0x79737678,
+ 0x74756C79, 0x616B6C62, 0x6C626B6D, 0x68695F6B,
+ 0x586D6C62, 0x63576362, 0x62645861, 0x425B5A50,
+ 0x4C414E4C, 0x4E4C414E, 0x59505147, 0x746E5F62,
+ 0x82847E72, 0x988D9087, 0xB6A99FA3, 0xAEB4A9AF,
+ 0xBABABDB4, 0xC1BBBEC0, 0xBABCB6C1, 0xBCBDC1BC,
+ 0xBFBABDC1, 0xBABEB9BB, 0xBBBBBFBA, 0xBFBABCC0,
+ 0xBBBEBCBB, 0xC0B8BDBC, 0xBCBBBCC1, 0xB6BBB9B7,
+ 0xBBB9BEBC, 0xBFBABAC0, 0xBBBFBABB, 0xBBBABDBB,
+ 0xBDBBBABD, 0xBABDBBBA, 0xBBBABDBB, 0xBDBBBABD,
+ 0xB8BDBBB8, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBCBBC1BC, 0xBFBABBC1, 0xBABDBBBB, 0xBCB8BDBC,
+ 0xC0BDB8BD, 0xB9C0BDB9, 0xC0BAC0BF, 0xBCBDBABF,
+ 0xB9BEBFB7, 0xC1B8C0C0, 0xBEBFB9C1, 0xBBC0C1B9,
+ 0xBFBBC1C0, 0xC0BFBAC0, 0xBBC0BFBB, 0xC0B8C0C0,
+ 0xBFBFB8C0, 0xBABFC0B7, 0xB8B8BABB, 0xAAB6B2B2,
+ 0xA8A1B6AC, 0xB8A599B5, 0x98B8A798, 0xA899B8A7,
+ 0xB7AA9FB9, 0xA1B8A8A0, 0xA9A3B6A9, 0xBAAEADB6,
+ 0xBBB9B7B9, 0xB8BBB9B8, 0xBEB6BBBA, 0xBDBDB9BD,
+ 0xB6BBBABB, 0xBDB5BAB9, 0xBEBDB9BE, 0xB6BBBAB8,
+ 0xB2B1B6B4, 0xB9B4B3B7, 0xB3B7B2B5, 0xB2B0B4AF,
+ 0xBBB6B3B7, 0xB8BCB7B7, 0xB7B3B9B4, 0xB9B4B6BC,
+ 0xB6BBB9B5, 0xB7B2B8B7, 0xB8B7AFB7, 0xB1B7B6B2,
+ 0xB5B4B9B8, 0xB5B3B4B7, 0xAFB2B0B2, 0xB5B1B6B4,
+ 0xB7B6B2B7, 0xB3B8B6B2, 0xB0AEB3B1, 0xB8B6ADB2,
+ 0xB4B9B7B3, 0xB5ADAFAF, 0xAAAAB3B5, 0xA8ABA9A8,
+ 0xA6A8ACA7, 0xABA6A8AC, 0xB0B4AFA7, 0xABADB3AE,
+ 0xB0ABAAB0, 0xAEB4AFAA, 0xA7ABAFA9, 0xB0A9A7AE,
+ 0xA8B0A9A9, 0xA19FA7A0, 0xA8A1A0A8, 0x9BA29BA1,
+ 0x888E9188, 0x908A8E91, 0x7879758E, 0x4D585C57,
+ 0x3C374E52, 0x373B3636, 0x504D4D47, 0x5C585656,
+ 0x5B5C585D, 0x5D60645F, 0x68625F63, 0x6A6C6666,
+ 0x60686960, 0x6C636869, 0x6E6F666B, 0x60686960,
+ 0x69606869, 0x78797068, 0x6B73746B, 0x7A717374,
+ 0x73746B79, 0x6A73746B, 0x766D7374, 0x78797075,
+ 0x74787970, 0x7E757C7D, 0x7E7F767D, 0x737D7E75,
+ 0x7B727B7C, 0x7A7B727A, 0x73787970, 0x7B727B7C,
+ 0x7879707A, 0x73787970, 0x7C73797C, 0x797A717B,
+ 0x73797973, 0x79737979, 0x79797379, 0x72777A71,
+ 0x7A71787B, 0x76797077, 0x71797A71, 0x72697B79,
+ 0x76776E71, 0x6A797973, 0x706C6D6E, 0x6A6C666F,
+ 0x686D6F69, 0x706A6E71, 0x494A466E, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000200, 0x1F1C1804,
+ 0x4F4D4D47, 0x62575758, 0x706E6364, 0x67727167,
+ 0x685E7271, 0x6563586A, 0x515D5D51, 0x51455D5D,
+ 0x45443A51, 0x333A3830, 0x05063A37, 0x0805070A,
+ 0x00000000, 0x00000000, 0x02000002, 0x443F3C37,
+ 0x4D454E4C, 0x615F5550, 0x65706F61, 0x7A6B7575,
+ 0x7D7A6C7D, 0x6E817E70, 0x7F717F7C, 0x7F7E7082,
+ 0x707C7C6E, 0x7D717C7F, 0x7C7C707D, 0x5C77776B,
+ 0x564F6868, 0x4E48435C, 0x26403B38, 0x00002927,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x06080409, 0x05070704,
+ 0xAAABA906, 0xBABEC1BF, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBDB8BDBB, 0xBEBCB9C0, 0xB8BDBBB9, 0xBAB7BDB8,
+ 0xBDB8B9BF, 0xB7BDB8B7, 0xB8B7BDB8, 0xBDB8B7BD,
+ 0xB8BEB9B7, 0xB7B8BEB9, 0xBDB8B6BC, 0xB7BDB8B7,
+ 0xB8B7BDB8, 0xBDB8B7BD, 0xB7BDB8B7, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB8B7BAB8, 0xBBB9B7BA,
+ 0xB8BBB9B8, 0xBAB7BCBA, 0xBCBAB7BC, 0xB9BCBAB9,
+ 0xB7B8BCB7, 0xBDB8B8BC, 0xB8BCB7B9, 0xB6B8BCB6,
+ 0xBCB7B8BC, 0xB9BDB8B8, 0xB3B3BAB3, 0xB9B3B3BA,
+ 0xB8BCB6B5, 0xA3B6BDB6, 0xA9A4A3AA, 0xA3AAA3A3,
+ 0x98A0A89D, 0xA89D9EA5, 0xA0A499A2, 0x98A0A498,
+ 0xA598A0A4, 0x9DA4979E, 0x9A9DA59A, 0xA4999DA5,
+ 0x9DA59B9C, 0x001F2220, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x02000002, 0x00010101, 0x00010000,
+ 0x0D0D0D00, 0x785E5E58, 0x80788081, 0x80817882,
+ 0x7A81837D, 0x827E7E80, 0x7E7F7B81, 0x7A7E7F7B,
+ 0x7F7B7E80, 0x85857F7E, 0x7D83837D, 0x82798383,
+ 0x82807881, 0x7A807D78, 0x837A827F, 0x81827982,
+ 0x7987857D, 0x7F778381, 0x807E7681, 0x78817F77,
+ 0x82788280, 0x80817781, 0x7885867D, 0x847B8081,
+ 0x83847B83, 0x7B81817B, 0x81798181, 0x807E7683,
+ 0x757D7E75, 0x7E757D7E, 0x7D7E757D, 0x757E7C74,
+ 0x7E757F7D, 0x7B7E757D, 0x737A7C76, 0x746E7478,
+ 0x70716874, 0x61706F65, 0x6C626D6D, 0x6E6D636D,
+ 0x5B6E6C62, 0x65596767, 0x64665A63, 0x48636157,
+ 0x53485452, 0x4E4C4157, 0x47525147, 0x746E4F50,
+ 0x82847E72, 0x988E9188, 0xB3A79FA3, 0xB0B4A8AF,
+ 0xB6B6B9B0, 0xBFB9BABC, 0xBEC0BABF, 0xBBBDBEBA,
+ 0xC0BBBCC0, 0xBBBFBABC, 0xB9BBBFBA, 0xBFBABABE,
+ 0xBBBFBABB, 0xBBB7BCBA, 0xB7B6B7BC, 0xB6BDBAB1,
+ 0xBAB9BFBA, 0xBFBAB9BF, 0xBBBFBABB, 0xBDBCBFBD,
+ 0xBDBBBCBF, 0xBDC0BEBA, 0xBDBCBFBD, 0xBFBDBCBF,
+ 0xBABFBDBA, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBABBC1BC, 0xC0BBB9BF, 0xBBBFBABC, 0xBCB8BDBC,
+ 0xC0BDB8BD, 0xB9C0BDB9, 0xC1BAC0BF, 0xBEBFBBC0,
+ 0xBABFBEBA, 0xC1B9BFBE, 0xC0C1BBC0, 0xBABFC0BB,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBBC0BFBB, 0xC1B8C0C0,
+ 0xBFC0B7C1, 0xB9BFBEBA, 0xBAB7BAB8, 0xB3B8B8BA,
+ 0xACA9B8B0, 0xB9A89DB7, 0x98B7A99A, 0xA89CB8A7,
+ 0xB6A8A0B7, 0xA2B5A8A1, 0xADABB7A8, 0xB9B5B6BA,
+ 0xBDB8B8BB, 0xB6BBB9B9, 0xBEB6BBBA, 0xBDBDB9BD,
+ 0xB6BBBABB, 0xBDB4B9B8, 0xBDBCB8BE, 0xB3B8B7B7,
+ 0xB1B0B4AF, 0xB7B1B2B6, 0xB5B7B1B5, 0xAFB3B7B2,
+ 0xB9B3B0B4, 0xB8BCB6B5, 0xB2B2B6B0, 0xB9B4B3B7,
+ 0xB3B8B6B5, 0xB7B0B8B7, 0xB8B7B0B8, 0xB2B7B6B2,
+ 0xB5B2B7B6, 0xB6B4B4B7, 0xB0B3B1B3, 0xB6B2B7B6,
+ 0xB5B4B1B7, 0xB0B5B3B0, 0xB2B0B5B3, 0xB5B3AFB4,
+ 0xB2B7B5B0, 0xB8B2B4B4, 0xB5B5B8B8, 0xA8ABA9B3,
+ 0xABA7ABA6, 0xB0ABADB1, 0xB0B4AFAC, 0xA6AEB4AF,
+ 0xA6A1A5AB, 0xA6ACA7A0, 0xA4A5A9A3, 0xB0A9A4AB,
+ 0xA7AFA8A9, 0x9CA0A8A1, 0x9C959BA3, 0x979B9595,
+ 0x8B8E9188, 0x8F8B9191, 0x6364608E, 0x424D514C,
+ 0x3C374347, 0x44484336, 0x4E4D4D47, 0x5C585454,
+ 0x5A5E595B, 0x5F60645F, 0x68626064, 0x6A6C6664,
+ 0x656C6D64, 0x6D646D6E, 0x6B6C636C, 0x6C73746B,
+ 0x746B7475, 0x78797073, 0x70797A71, 0x79707879,
+ 0x75766D78, 0x6C78796F, 0x756C7576, 0x73746B74,
+ 0x73787970, 0x79707B7C, 0x7D7E7578, 0x727D7E75,
+ 0x79707A7B, 0x7D7E7578, 0x70787970, 0x7C737879,
+ 0x7B7C737B, 0x74787970, 0x7C737C7D, 0x7B7C737B,
+ 0x75797973, 0x7B757B7B, 0x7B7B757B, 0x717B7C73,
+ 0x7B72797A, 0x78797078, 0x7177746F, 0x79717B79,
+ 0x7979737B, 0x6F777771, 0x706B7273, 0x6C706A6C,
+ 0x686F7269, 0x706A6E71, 0x2425216E, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000200, 0x1F1C1804,
+ 0x50494A46, 0x63595659, 0x6F6F6364, 0x676F7066,
+ 0x6C627271, 0x6A685D6E, 0x515D5D51, 0x50455D5D,
+ 0x46443A52, 0x333A392F, 0x04063939, 0x08040907,
+ 0x00000000, 0x00000001, 0x48474302, 0x444E4C44,
+ 0x5E544F4E, 0x706E6360, 0x6B757466, 0x7A6B7B7B,
+ 0x7E7B6C7D, 0x6F807D6F, 0x7D6F807D, 0x7F7E7080,
+ 0x6F7C7C6E, 0x7D717B7E, 0x7C7C707D, 0x5C777769,
+ 0x574E6967, 0x4F49425C, 0x26403B38, 0x00002927,
+ 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080409, 0x05070805,
+ 0xAAABA906, 0xBABCBFBD, 0xBFBABBBF, 0xBCC0BBBB,
+ 0xBCB8BDBB, 0xBBB6B9BE, 0xB6BCB7B5, 0xB8B7BDB8,
+ 0xBEB7B7BD, 0xB7BEB7B7, 0xB7B8BEB9, 0xBEB9B6BC,
+ 0xB8BEB9B8, 0xB9B8BEB9, 0xBEB9B8BE, 0xB7BDB8B8,
+ 0xB8B7BDB8, 0xBDB8B7BD, 0xB8BCB7B9, 0xB6B6BCB7,
+ 0xBCB7B5BB, 0xB6BCB7B6, 0xB7B8BCB7, 0xBDB8B8BC,
+ 0xB6BCB7B7, 0xB9B8BBB9, 0xBCBAB8BB, 0xB9BCBAB9,
+ 0xB7B8BCB7, 0xBCB8B8BC, 0xBABBB7BB, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB5B0B7B0, 0xB7B2B5BC,
+ 0xB3B7B2B3, 0xADB6BDB6, 0xAAA3ACB4, 0xA3AAA3A3,
+ 0x9EA5ADA2, 0xA89EA1A9, 0xA2A89DA0, 0x9DA5A99D,
+ 0xA397A5A9, 0x9FA6999F, 0x9A9DA59A, 0xA59A9DA5,
+ 0xAAAFA69F, 0x00626361, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x01010100, 0x795D5D57, 0x81788182, 0x80817880,
+ 0x797E8178, 0x817B7F82, 0x7D817C7F, 0x7B7C807B,
+ 0x807A7C80, 0x8688827C, 0x7B81817B, 0x807B8380,
+ 0x85827D83, 0x79838179, 0x807B8381, 0x83807B83,
+ 0x76888580, 0x7971807E, 0x7C7B717B, 0x787F8077,
+ 0x80768081, 0x8283797F, 0x7D85867D, 0x837A8586,
+ 0x83847B82, 0x797E7F76, 0x81798182, 0x83817983,
+ 0x707D7E75, 0x7D747879, 0x797C737A, 0x777B7C72,
+ 0x7E748081, 0x7B7E757D, 0x70767872, 0x706A7175,
+ 0x73746B70, 0x6176756B, 0x6C626E6C, 0x6E6C626E,
+ 0x5E6F6D62, 0x665A6B69, 0x65675B64, 0x51626157,
+ 0x52475C5B, 0x54544854, 0x48505147, 0x4F495051,
+ 0x74746E4F, 0x887E807A, 0xA3988E91, 0xB0B4A99F,
+ 0xB3B2B4AE, 0xC0BAB6B7, 0xBDBFB9C0, 0xBCBFC0BC,
+ 0xBEB9BBBE, 0xBABEB9BA, 0xB9BBBFB9, 0xBFB9BBBF,
+ 0xBABEB9BB, 0xBCB7BCBA, 0xB2B1B8BD, 0xB5BCB9AC,
+ 0xB9B9BFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBBBCC0BB,
+ 0xBEB9BCC0, 0xBCC0BBBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBABBBFBA, 0xBFBABBBF, 0xB8BCB7BB, 0xBDBBC0BF,
+ 0xBDBBB8BE, 0xBBC0BEB8, 0xBFBAC0BF, 0xBFBEBAC0,
+ 0xBABFBDBA, 0xBCB8BDBB, 0xBFC0B9BE, 0xB8C0C0BA,
+ 0xBEBAC0BF, 0xBFBDBAC1, 0xBAC1BEBA, 0xBDB8C0BF,
+ 0xC1C0B4BF, 0xB7BDBCBB, 0xBAB8BBB9, 0xB9BAB9BC,
+ 0xADACB6B7, 0xB7AAA1B6, 0x9CB8A79B, 0xA89DB7AA,
+ 0xB3A79FB6, 0xACB6A6A3, 0xB4B5B9AD, 0xB7B8BABA,
+ 0xBCB7B8BC, 0xB6BBB9B6, 0xBDB7BCBB, 0xBEBDB8BE,
+ 0xB6BBBAB9, 0xBAB2B8B7, 0xBEBFB5BB, 0xB6BBBAB9,
+ 0xB2B0B4AF, 0xB4AFB4B8, 0xB5B9B4B0, 0xB1B8BCB7,
+ 0xB9B4B2B6, 0xB8BCB7B5, 0xB2B3B9B4, 0xB9B4B3B7,
+ 0xB5B9B4B5, 0xB7B1B8B5, 0xB7B6B0B8, 0xB1B6B5B1,
+ 0xB6B5B7B7, 0xB6B4B5B8, 0xB0B4AFB3, 0xB5B1B6B4,
+ 0xB5B3B2B7, 0xAFB4B2B0, 0xAFB2B5B3, 0xB3B1B0B4,
+ 0xB0B3B1B0, 0xB8B8B8B8, 0xB4B4B8B8, 0xAFB0AEB4,
+ 0xAFA9ADA8, 0xB4AFB0B4, 0xAFB3AEB0, 0xA7AFB3AE,
+ 0xB0ABA8AC, 0xAEB4AFAA, 0xA9A9B0A9, 0xAEA8A9B0,
+ 0xA4A8A2AA, 0x9BA2A9A2, 0x9B969BA2, 0x92948E97,
+ 0x8A909188, 0x79759090, 0x62656378, 0x39434644,
+ 0x3B36383B, 0x43474237, 0x5052544E, 0x5C585456,
+ 0x6063615B, 0x63646863, 0x6C666468, 0x6C6C666A,
+ 0x676C6D64, 0x71686F70, 0x70716870, 0x7173736D,
+ 0x7A717777, 0x78797079, 0x7172736A, 0x786F797A,
+ 0x78797077, 0x6A78796F, 0x756C7374, 0x797A7174,
+ 0x737B7C73, 0x7B737B7C, 0x7D7B737D, 0x73787970,
+ 0x7C737B7C, 0x7D7E757B, 0x737D7E75, 0x7E757B7C,
+ 0x7B7C737D, 0x6F77786F, 0x7D747778, 0x7D7E757C,
+ 0x6F777A71, 0x79737578, 0x7A7A7477, 0x73797973,
+ 0x78727979, 0x7B7B7576, 0x77807B78, 0x7873807C,
+ 0x7979737B, 0x6E74746E, 0x706A7274, 0x6E706A6C,
+ 0x686F7067, 0x4C467071, 0x0001004A, 0x00000100,
+ 0x00000000, 0x00000000, 0x00020000, 0x01000200,
+ 0x00000000, 0x00000000, 0x00000200, 0x1D1C1804,
+ 0x4E4B4C48, 0x65595457, 0x6F6F6363, 0x62707167,
+ 0x6C626D6C, 0x6A685E6E, 0x516B6A60, 0x4F455C5B,
+ 0x46443A51, 0x323A392F, 0x05073838, 0x0804090A,
+ 0x00010101, 0x312B0001, 0x47483F31, 0x544F4E44,
+ 0x6F61615F, 0x726F6172, 0x707B7B6B, 0x806E8080,
+ 0x80807080, 0x71827F71, 0x7C71807C, 0x7E7C717E,
+ 0x707D7D71, 0x7C727C7C, 0x7C7C707D, 0x5C787769,
+ 0x574E6B67, 0x4D47405E, 0x26403B38, 0x00002927,
+ 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xAAAAAA06, 0xBABDC0BE, 0xBEBCBBBF, 0xBBBEBCBB,
+ 0xB9B8BDBB, 0xBCB7B6BB, 0xB6BCB7B6, 0xB9B7BDB8,
+ 0xBDB8B8BE, 0xB7BDB8B7, 0xB8B8BEB9, 0xBDB8B7BD,
+ 0xB7BDB8B7, 0xB8B7BDB8, 0xBDB8B7BD, 0xB7BDB8B7,
+ 0xB7B7BDB8, 0xBDB8B6BC, 0xB8BCB7B9, 0xB5B5BBB6,
+ 0xBBB6B4BA, 0xB6BCB7B5, 0xB7B8BCB7, 0xBDB8B8BC,
+ 0xB7BDB8B7, 0xB9B8BCB7, 0xBBB9B8BB, 0xB8BCB7B8,
+ 0xB7B8BCB7, 0xBDB9B8BC, 0xBBBCB8BC, 0xB8B9BDB8,
+ 0xBCB7B9BD, 0xB9BDB8B8, 0xB6B5BCB5, 0xB9B4B6BD,
+ 0xB5BBB6B3, 0xA3B6BDB6, 0xA099A2AA, 0xA3AAA399,
+ 0xA7A5ADA3, 0xB1A7A9B1, 0xA7ACA3A9, 0xAAB0B4A9,
+ 0xB4A9B1B5, 0xB0B4A9B0, 0xA6AAAFA6, 0xAFA6AAAF,
+ 0xB8BAB4AA, 0x00626361, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000000, 0x791B1A16, 0x807A7F7F, 0x80817880,
+ 0x7D81837D, 0x837D8183, 0x82847E81, 0x7B82837F,
+ 0x807A7E7F, 0x82857C7E, 0x7985827D, 0x7F7A817E,
+ 0x85827D83, 0x76807E76, 0x7F77807E, 0x83817981,
+ 0x7A83807B, 0x81798482, 0x807E7683, 0x75817F77,
+ 0x80777D7E, 0x82837A7F, 0x7B85867D, 0x82798184,
+ 0x83847B7F, 0x76818279, 0x7E767E7F, 0x7E7F7680,
+ 0x757B7C73, 0x7E757B7E, 0x7B7E757B, 0x727E7F76,
+ 0x7B717B7C, 0x7C7D747A, 0x73767872, 0x736D7677,
+ 0x74756C73, 0x6575746A, 0x746A7171, 0x72706675,
+ 0x61706C61, 0x675B6E6C, 0x5F635765, 0x56626157,
+ 0x54486160, 0x54544854, 0x47505147, 0x50485051,
+ 0x60615852, 0x7A7E807A, 0x91887E80, 0xA1A29990,
+ 0xB2B3B5AF, 0xBCB6B4B8, 0xBFC1BBBA, 0xBEBDC0BE,
+ 0xC1BCBDC0, 0xBBBFBABD, 0xB9BBBFB9, 0xBFB9BBBF,
+ 0xBBBFBABB, 0xBBB7BCBA, 0xB6B5B7BC, 0xB6BCBBB0,
+ 0xBAB9BFBA, 0xBFBABBBF, 0xBBBFBABB, 0xB8BCC0BB,
+ 0xC0BBB9BD, 0xBCC0BBBC, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBABBBEBC, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBABBBFBA, 0xBFBABBBF, 0xB9BEBCBB, 0xBDBABFBD,
+ 0xBCB7BABF, 0xBBC1BCB6, 0xBDBBC0BE, 0xBFBDBABF,
+ 0xBABFBDBA, 0xB9BCC0BB, 0xBDBCB6BB, 0xBAC0BFB7,
+ 0xBDBAC0BF, 0xC0BFB9C0, 0xBAC0BFBA, 0xBFB7BFBE,
+ 0xBFBEB8C0, 0xB8BEBDB9, 0xB8B6BBB9, 0xBBBBB7BA,
+ 0xB2B2B8B9, 0xB4A8A2B5, 0x9EB5A79D, 0xAAA0B7A8,
+ 0xB8A8A2B5, 0xB5B9AEAC, 0xB9BEBDB4, 0xB7B8BBB9,
+ 0xBCB7B8BC, 0xB6BBB9B6, 0xBCB6BBB9, 0xBEBDB8BF,
+ 0xB6BBB9B9, 0xBAB2B8B7, 0xBDBCB5BB, 0xB6BBB9B8,
+ 0xB1B0B4AF, 0xBCB7B3B7, 0xB5B9B4B8, 0xB2B3B7B2,
+ 0xB9B4B3B7, 0xB9BDB8B5, 0xB4B3B8B6, 0xB8B6B1B6,
+ 0xB2B5B3B5, 0xB6B0B7B4, 0xB7B6B2B9, 0xB0B5B4B2,
+ 0xB3B4B7B5, 0xB8B3B2B5, 0xAEB4AFB2, 0xB3AEB4AF,
+ 0xB5B3B0B5, 0xB0B5B3B0, 0xAFB0B4AF, 0xB3B1B0B4,
+ 0xB2B3B1B2, 0xB4B4B4B4, 0xB4B4B2B4, 0xADB0AEB4,
+ 0xACA8ABA9, 0xAFAAADB1, 0xAEB2ADAB, 0xAFB0B4AF,
+ 0xB1ACB0B4, 0xAAB0ABAB, 0xA9A9B0A9, 0xAAA4ABAF,
+ 0xA4A8A2A8, 0x959DA19B, 0x9590959C, 0x92938F91,
+ 0x7490908A, 0x6560787A, 0x4A4D4B61, 0x39383B39,
+ 0x4843383B, 0x4D514C44, 0x5853554F, 0x64625B5C,
+ 0x60636163, 0x6660645F, 0x706A6A6C, 0x6C6C6670,
+ 0x656A6B62, 0x71686B6E, 0x70716870, 0x7274746E,
+ 0x746B7878, 0x797A7173, 0x6D787970, 0x79707576,
+ 0x78797078, 0x6F78796F, 0x79707879, 0x78797078,
+ 0x70787970, 0x7B737A78, 0x7F7D757D, 0x7177786F,
+ 0x786F797A, 0x78797077, 0x75787970, 0x81787D7E,
+ 0x7D7E7580, 0x737B7C73, 0x7E757B7C, 0x7D7E757D,
+ 0x73797C73, 0x7973777C, 0x76787277, 0x75787872,
+ 0x7A767B7B, 0x7978747B, 0x787F7C78, 0x7873807B,
+ 0x7F7C777B, 0x6E787872, 0x736F7474, 0x6E706A72,
+ 0x6B70706A, 0x24207171, 0x00010023, 0x00000100,
+ 0x00000000, 0x00000000, 0x00020000, 0x01000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x1D1B1A02,
+ 0x504A4C46, 0x64585659, 0x6F6F6164, 0x62727266,
+ 0x6C626D6C, 0x69685E6D, 0x5268695F, 0x50465B5C,
+ 0x46443A52, 0x323A3830, 0x05073A37, 0x0805070A,
+ 0x2C020000, 0x49403130, 0x4B4A4048, 0x61615F54,
+ 0x6F60706F, 0x726F6072, 0x707B7B6B, 0x80708080,
+ 0x7F7F6F80, 0x71807C71, 0x7C71807C, 0x7E7C717E,
+ 0x717C7C70, 0x7B717C7B, 0x7C7A707C, 0x5C7A766B,
+ 0x564D6B67, 0x4E48415B, 0x243F3C37, 0x00002928,
+ 0x00010002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x09070308, 0x05090804,
+ 0xA6A8A906, 0xBCBBC0BF, 0xBDBCB9BE, 0xB8BDBBB8,
+ 0xB8B7BCBA, 0xBDB8B7BD, 0xB9BDB8B9, 0xB7B6BCB7,
+ 0xBCB7B6BC, 0xB8BCB7B8, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xB7B7BBB6, 0xBCB7B8BC, 0xB6BAB5B8,
+ 0xB4B5BCB5, 0xBCB6B4BB, 0xB7BBB5B8, 0xB4B5B9B4,
+ 0xB8B3B5B9, 0xB9BDB8B4, 0xB7B6BCB7, 0xBDB6B6BC,
+ 0xB6BDB6B6, 0xB8B5BCB5, 0xBCB7B7BD, 0xB8BCB7B8,
+ 0xB5B5BBB6, 0xBDB8B7BB, 0xB8BCB7B9, 0xB7B8BCB7,
+ 0xBBB9B8BC, 0xB9BDB8B8, 0xBAB9C0B9, 0xC0B9B9C1,
+ 0xBAC1BAB8, 0x7A929992, 0x807B7A81, 0x858C8579,
+ 0x8A808780, 0x908A8C90, 0x999B958C, 0x5B7E8178,
+ 0x655C6364, 0x63645B64, 0x72767872, 0x77737678,
+ 0x76777376, 0x00424242, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x54000100, 0x837F5758, 0x81837D82,
+ 0x7A82837F, 0x817B7E80, 0x8081787F, 0x76818279,
+ 0x807B7E7F, 0x83807B83, 0x7A83807B, 0x807B827F,
+ 0x83807B83, 0x797D7B73, 0x847A8381, 0x83827885,
+ 0x7888867E, 0x81798280, 0x83817983, 0x79838179,
+ 0x80788381, 0x807D7882, 0x787F817B, 0x847E7A7E,
+ 0x7F817B80, 0x7A7E807A, 0x7D777E80, 0x7D7D777D,
+ 0x7A7F7F79, 0x7D777E80, 0x7B7E757B, 0x747D7E75,
+ 0x7C727C7D, 0x7D7E757B, 0x74797973, 0x746E7A7A,
+ 0x75766D74, 0x68727369, 0x746A7274, 0x74736973,
+ 0x65767469, 0x6F637270, 0x686C606D, 0x58646458,
+ 0x5C516464, 0x5654495E, 0x4657574B, 0x51475252,
+ 0x4D4C4253, 0x6E5E6158, 0x89807274, 0x88898088,
+ 0xB1A5A89F, 0xB9B2B3B7, 0xB1B8B1B2, 0xBDBCBFBD,
+ 0xC4BFBCBF, 0xBAC0BBBE, 0xB7B9BFBA, 0xC0BBB6BC,
+ 0xBBBFBABC, 0xB8BCC0BB, 0xBAB9B5BA, 0xB2BAB9B2,
+ 0xBDB9BEBC, 0xBEBCBCBF, 0xBBBFBABB, 0xB8BCC0BB,
+ 0xBFBABABE, 0xBCC0BBBB, 0xBCB9BEBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBBB8BDBB, 0xBDBBBABD, 0xBCBFBDBA,
+ 0xBDBABFBD, 0xBDBBBABF, 0xBABFBDB8, 0xBBB9BEBC,
+ 0xBEB9BCC0, 0xBBBFBABA, 0xBCBCC0BB, 0xC1BCBDC1,
+ 0xBDC1BCBD, 0xBABDC1BC, 0xBBB9BBBF, 0xB9BEBCB6,
+ 0xBEBAC0BF, 0xC0C0B7BF, 0xB7BFBEB8, 0xBEBAC0BF,
+ 0xBDBCB9BF, 0xB9BFBEB7, 0xBAB5BBBA, 0xBEBDB6BB,
+ 0xBBBBC1B9, 0xB6ACA9B8, 0xA0B5A8A1, 0xA8A2B5A7,
+ 0xB8AEA9B8, 0xBABAB0AF, 0xB8BBB9B8, 0xBBB6BBB9,
+ 0xBDBBB8BD, 0xB6BBB9BA, 0xB7B5BAB8, 0xBBB9B6BC,
+ 0xB8BCB7B8, 0xB9B5B8B6, 0xBBB9B8BB, 0xB5B9B4B8,
+ 0xB1B0B4AF, 0xBCB7B2B6, 0xB5B9B4B8, 0xB4B4B8B3,
+ 0xB7B2B5B9, 0xB3B9B4B3, 0xB6B2B9B6, 0xB7B6B1B7,
+ 0xB2B7B5B1, 0xB5ADB2B0, 0xB7B5B2B7, 0xAEB3B1B2,
+ 0xB0AEB5B2, 0xB5B0AEB5, 0xAEB5B0AE, 0xAFA8AEA9,
+ 0xAFAAB0B4, 0xB0B4AFAB, 0xAFAFB3AE, 0xAFAAB0B4,
+ 0xABAEACAB, 0xAFA8AAAA, 0xAFAFABB0, 0xA9ACAAAD,
+ 0xACADB0AE, 0xB4AEADB1, 0xB0B4AEB0, 0xABACB0AA,
+ 0xB1ACADB1, 0xA6ADA6AB, 0xA2A6ABA2, 0xABA2A8AB,
+ 0xA0A49EA8, 0x97989C96, 0x8D88969C, 0x888C8789,
+ 0x63787977, 0x524D6465, 0x383B394E, 0x44373836,
+ 0x514C4546, 0x4C504B4D, 0x5F5E5F5B, 0x62606263,
+ 0x62635F61, 0x63696B65, 0x7168696C, 0x70716870,
+ 0x686A6C66, 0x71686A6E, 0x6A6D646E, 0x7273736D,
+ 0x756D7878, 0x75736B77, 0x6F7A796F, 0x79707A79,
+ 0x76776E78, 0x707A7870, 0x79707A78, 0x78797078,
+ 0x6F79776F, 0x7A727977, 0x7B7C737C, 0x787D7E75,
+ 0x79708081, 0x78797078, 0x7873766D, 0x81788081,
+ 0x7D7B7380, 0x727B7C73, 0x79707A7B, 0x797C7378,
+ 0x72787E73, 0x7670747C, 0x74787272, 0x75767773,
+ 0x77737A79, 0x77767278, 0x73787773, 0x7A747877,
+ 0x7A7A747A, 0x76827F7A, 0x716F7B7A, 0x70716F70,
+ 0x676A6B69, 0x01006A6B, 0x00010000, 0x00000100,
+ 0x00000102, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x20211F00,
+ 0x4750504A, 0x65595051, 0x706F6165, 0x65767469,
+ 0x6C627171, 0x6A695F6D, 0x53686960, 0x4F455B5C,
+ 0x43443B4E, 0x2E36332E, 0x00013532, 0x02000005,
+ 0x4C282723, 0x534B5654, 0x56554B55, 0x5F686759,
+ 0x77686F6F, 0x827F707A, 0x72838072, 0x7F718380,
+ 0x83807282, 0x717D7B70, 0x7B707D7B, 0x7C7C707D,
+ 0x6F78796F, 0x796F7879, 0x7B796F7A, 0x69787469,
+ 0x685E7874, 0x5251476A, 0x20383930, 0x00002626,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05090804,
+ 0xA6A8A906, 0xBCBBC0BF, 0xBDBCB7BD, 0xB6BBB9B8,
+ 0xB9B7BDB8, 0xBDB8B8BE, 0xB7BBB6B9, 0xB7B6BCB7,
+ 0xBBB9B6BC, 0xB7BAB8B8, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xB8B8BCB7, 0xBCB7B9BD, 0xB5BBB6B8,
+ 0xB5B6BDB6, 0xBBB5B5BC, 0xB7BBB5B7, 0xB2B2B6B1,
+ 0xB8B3B3B7, 0xB5B9B4B4, 0xB6B5BBB6, 0xBDB6B5BB,
+ 0xB4BBB4B6, 0xB5B5BCB5, 0xBCB7B5BC, 0xB8BCB7B8,
+ 0xB7B5BCB5, 0xBCB7B7BE, 0xB7BBB6B8, 0xB6B9BDB8,
+ 0xBBB9B7BB, 0xB8BCB7B8, 0xA4BAC1BA, 0xABA4A4AB,
+ 0x8E958EA4, 0x7A7A817A, 0x807B7A81, 0x6C736E79,
+ 0x76787C77, 0x7B75787C, 0x797B7579, 0x5D63635D,
+ 0x46406363, 0x2A2A2446, 0x00020200, 0x01000201,
+ 0x02000002, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x2B000100, 0x827E2C2D, 0x83848081,
+ 0x7B81827E, 0x807A7F81, 0x8081787E, 0x767E7F76,
+ 0x7F7A807E, 0x817D7883, 0x7B817E79, 0x7D788380,
+ 0x82807880, 0x79808178, 0x82788182, 0x81807683,
+ 0x7A7D7E75, 0x807B8283, 0x7F7D7583, 0x78807E76,
+ 0x81798382, 0x87847F84, 0x7380847E, 0x807A737A,
+ 0x7B7F797C, 0x797B7D77, 0x7C787D7F, 0x7F7E7A7D,
+ 0x787E807A, 0x807A7C7E, 0x7D7F797E, 0x757D7E75,
+ 0x7E747D7E, 0x7B7C737D, 0x74797973, 0x78737A7A,
+ 0x74756C7B, 0x6D76776D, 0x776D7677, 0x77766C76,
+ 0x6A767469, 0x75697775, 0x6A6C6073, 0x58626458,
+ 0x5C516464, 0x5553485E, 0x4956594A, 0x51465558,
+ 0x4D4C4253, 0x6E4A4C46, 0x88827274, 0x898A8188,
+ 0x9F95988F, 0xB8B1A3A8, 0xB0B8B1B1, 0xBBBAC0BB,
+ 0xC0BBBCC0, 0xB9BFBABA, 0xBABCC2BD, 0xBEB9B9BF,
+ 0xB8BCB7BA, 0xB6B8BCB7, 0xB6B5B5BB, 0xAAB2B1AE,
+ 0xBCBABFBD, 0xBEBCBBBE, 0xBBBFBABB, 0xB9BABEB8,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBCB9BEBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBEB8BDBC, 0xBDBBBCBE, 0xBABFBDBA,
+ 0xB8BABFBD, 0xBDBBB4BB, 0xB8BDBBB8, 0xBABBBFBA,
+ 0xC0BABBBF, 0xBBBFB9BC, 0xBBBDC1BC, 0xC1BCBCC0,
+ 0xBDC1BCBD, 0xBABABEB9, 0xBFBABBBF, 0xB9BEBCBB,
+ 0xC0B9BFBE, 0xC0C0B9C1, 0xB8C0BFB8, 0xBBBAC0BF,
+ 0xC0BFB6BC, 0xB7BDBCBA, 0xB9B5BBBA, 0xBBBAB4BA,
+ 0xB6B9BDB6, 0xB1B2B1BB, 0xA3B6A5A2, 0xA8A2B3A9,
+ 0xBBAEABB4, 0xBBB9BAB9, 0xB8BCB7B8, 0xBBB8BDBB,
+ 0xBBB9B8BD, 0xB8BBB9B8, 0xB8B4BAB5, 0xBCB7B7BD,
+ 0xB8BCB7B8, 0xB8B7B8B4, 0xBCB7B9BD, 0xB3B7B2B8,
+ 0xB2AFB3AE, 0xB9B4B3B7, 0xB4B8B3B5, 0xB7B5B9B4,
+ 0xB7B2B8BC, 0xB4B9B7B3, 0xB6B3B9B8, 0xB5B4AFB7,
+ 0xB2B8B7AF, 0xB3AEB3B1, 0xB8B6B0B5, 0xB0B5B3B3,
+ 0xB0ACB3AE, 0xB6B0ACB6, 0xAEB5B0AC, 0xA9AAB0AB,
+ 0xAFAAABAF, 0xABAFAAAB, 0xA9ACB0AB, 0xB4AFAAAE,
+ 0xA4A8A3B0, 0xA7A3A8A6, 0xB1B0A3A8, 0xABB0AEAC,
+ 0xAAADB0AE, 0xB1ABABAF, 0xADB1ABAD, 0xACAEB2AC,
+ 0xB1ACADB1, 0xABAFA9AD, 0x9CA8ABA2, 0xA59CA2A5,
+ 0xA1A39DA2, 0x97989C97, 0x8B86989C, 0x898C8A87,
+ 0x4E787977, 0x3C374F50, 0x383C3738, 0x43383937,
+ 0x514C4245, 0x585C574D, 0x5F62635F, 0x67636263,
+ 0x66676366, 0x696E706A, 0x71686F72, 0x6E71686E,
+ 0x686B6F69, 0x6D646A6E, 0x6C6F6668, 0x6F787872,
+ 0x78707575, 0x79776F7A, 0x6F747369, 0x796F7A79,
+ 0x76776E78, 0x757A7870, 0x7F767F7D, 0x7879707E,
+ 0x6F79776F, 0x78707977, 0x77786F7A, 0x73797A71,
+ 0x7F767B7C, 0x7C7D747E, 0x6E797C73, 0x776E7677,
+ 0x76776E76, 0x767D7E75, 0x7E757E7F, 0x7679707D,
+ 0x6F767B72, 0x7C727179, 0x767A7474, 0x6F767773,
+ 0x77737273, 0x7B7A7678, 0x747A7B77, 0x78727778,
+ 0x78787278, 0x757D7A75, 0x75737B7B, 0x70707074,
+ 0x466A6B69, 0x01004748, 0x00010000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x20211F00,
+ 0x4650504A, 0x64594F50, 0x706F6166, 0x65727065,
+ 0x6C627270, 0x6D6C626D, 0x54686960, 0x4F445C5D,
+ 0x4243394B, 0x2F36332E, 0x00003633, 0x1E1A1904,
+ 0x4B56534E, 0x564C5655, 0x6E6C6158, 0x68706F61,
+ 0x7F707878, 0x827F7082, 0x72838072, 0x81738380,
+ 0x81807284, 0x71868479, 0x7A6F7D7B, 0x7373677C,
+ 0x6977786E, 0x796F7273, 0x7A796F78, 0x5D787469,
+ 0x5C526C68, 0x5251475E, 0x20383930, 0x00002426,
+ 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA8A7A908, 0xB9BCBEBE, 0xBDBBB6BB, 0xB8BDBBB8,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB9BDB8B8, 0xB8B4B9B7,
+ 0xBBBAB5BA, 0xB5BAB8B6, 0xB7B5BBB6, 0xBEB7B7BE,
+ 0xB5BCB5B7, 0xB6B5BCB5, 0xBBB6B6BD, 0xB6BCB7B5,
+ 0xB6B4BBB4, 0xBCB5B5BD, 0xB5BCB5B5, 0xB2B6BAB5,
+ 0xB7B2B3B7, 0xB5B9B4B3, 0xB5B5B9B3, 0xBBB4B7BB,
+ 0xB4BBB4B4, 0xB5B3BAB3, 0xBCB5B5BC, 0xB5BCB5B5,
+ 0xB4B5BCB5, 0xBCB5B4BB, 0xB5BCB5B5, 0xB7B6BCB7,
+ 0xBDB8B8BC, 0xBABBB7B9, 0x8DA6AAA4, 0x81789196,
+ 0x7C807A7E, 0x7B7B7F79, 0x807B7A80, 0x6B726D79,
+ 0x77787C77, 0x7C78787C, 0x7A7B777B, 0x7A80807A,
+ 0x81788080, 0x80817880, 0x4B797A71, 0x29235151,
+ 0x27282427, 0x01000100, 0x00000101, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x2C010200, 0x837F2D2E, 0x82837F82,
+ 0x7B81817B, 0x807A7F81, 0x81837D7E, 0x7781817B,
+ 0x847F7D7D, 0x83807B87, 0x79827F7A, 0x7E768381,
+ 0x83817980, 0x79818279, 0x7C747F7F, 0x817F777E,
+ 0x76818279, 0x7D777E7F, 0x7E7F767D, 0x79818279,
+ 0x81798283, 0x80817883, 0x7680857C, 0x7E787880,
+ 0x7F817B7A, 0x767C807A, 0x7F79787C, 0x7E807A7D,
+ 0x7A7A7C76, 0x807A7E80, 0x7F7F797E, 0x747D7E75,
+ 0x7E757C7D, 0x7B7C737D, 0x73797973, 0x79737979,
+ 0x79797379, 0x7176776E, 0x78707B79, 0x7C7A707A,
+ 0x65737166, 0x70617270, 0x6D70616D, 0x586A6C60,
+ 0x63596464, 0x5D5D5164, 0x4A595C4D, 0x564A5659,
+ 0x52514756, 0x5A4B4D47, 0x746E5C60, 0x86888272,
+ 0x9F85887F, 0xB9AFA3A8, 0xB1B9B2B1, 0xB6B5BBB6,
+ 0xC4BFB5BB, 0xBAC1BABE, 0xBCBDC1BC, 0xC2BDBDC1,
+ 0xBBBFBABE, 0xB6B8BAB4, 0xBBB9B7BB, 0xB0B7B4B6,
+ 0xBABBBFBA, 0xC1BCBBBF, 0xBAC0BBBB, 0xB9BBBFB9,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBCB9BEBC, 0xBEBCB9BE,
+ 0xB9BEBCB9, 0xBEBCBEBE, 0xBEBCBCBE, 0xBABFBDBB,
+ 0xBDB8BDBB, 0xC0BDB9C0, 0xB9C0BDB9, 0xB9BAC0BB,
+ 0xBEB9B8BE, 0xBBBFBABA, 0xBBBAC0BB, 0xC0BBBAC0,
+ 0xBCC0BBBC, 0xBCBBBFBA, 0xC1BCBDC1, 0xBBC1BCBB,
+ 0xBDB7BEBB, 0xC0BFB9C0, 0xB9BFBEBA, 0xBFB8BDBC,
+ 0xC0BDBBC0, 0xB5BCB9B9, 0xBBB6BBBA, 0xBBBAB7BC,
+ 0xB3B7B8B6, 0xB4B8B9BD, 0xA4B0ACAB, 0xACAAB6A6,
+ 0xB9B3B4B8, 0xBCB7B8BB, 0xB8BCB6B8, 0xB9BAC0BB,
+ 0xBCBAB8BE, 0xBABDBBB9, 0xB9B4B9B7, 0xB9B7B6BB,
+ 0xB6BBB9B4, 0xB7B6BAB5, 0xB9B7B8BC, 0xADB3AEB6,
+ 0xB3B4B8B3, 0xB9B4B5B9, 0xB5B9B4B5, 0xB7B5B9B4,
+ 0xB6B4B8BC, 0xB1B6B4B3, 0xB4B1B7B6, 0xB3B2AFB5,
+ 0xB2B8B7AD, 0xB3AFB6B3, 0xB8B6AFB6, 0xB0B5B3B3,
+ 0xAEADB3AE, 0xB5B2ACB3, 0xADB4AFAE, 0xA4A9AFAA,
+ 0xB0ABA5A9, 0xABAFAAAC, 0xAAA3A9A4, 0xB5B0A9AF,
+ 0xB1B5B0B1, 0xAEABB0AE, 0xAFADABB0, 0xABB0AEAA,
+ 0xA7ABB0AE, 0xACA6A8AC, 0xABAFA9A8, 0xAAACB0AB,
+ 0xACA7ABAF, 0xA8ACA6A8, 0x98A8ABA2, 0xA09A9EA1,
+ 0x9E9F9BA0, 0x89999A96, 0x8B898A8B, 0x797A788A,
+ 0x4E626563, 0x3C374D50, 0x383C3738, 0x4E424543,
+ 0x514C4D50, 0x585C564D, 0x5E62645E, 0x67636264,
+ 0x696D6766, 0x62666B62, 0x7168676D, 0x6E71686E,
+ 0x696A6E68, 0x71686B6F, 0x6C6F666E, 0x68707168,
+ 0x736A7071, 0x78797072, 0x6C78766E, 0x766C7776,
+ 0x767A6F75, 0x70787970, 0x7D747879, 0x7B7C737C,
+ 0x7177786E, 0x776F7C7B, 0x79776F79, 0x757A7B72,
+ 0x79707D7E, 0x7D7E7578, 0x72818279, 0x776D7A7B,
+ 0x72736976, 0x767D7E75, 0x7C737E7F, 0x7D7E757B,
+ 0x747E8178, 0x7D74787D, 0x767B7278, 0x73787A74,
+ 0x77737677, 0x79787478, 0x757A7975, 0x79757A79,
+ 0x7878727A, 0x7A80807A, 0x79778080, 0x70716F78,
+ 0x236A6B69, 0x01002425, 0x01020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x20211F00,
+ 0x4650504A, 0x655A4F50, 0x706F6167, 0x65727065,
+ 0x7066716F, 0x6D6C6272, 0x53686960, 0x50455B5C,
+ 0x4243394C, 0x2F36332E, 0x1A163633, 0x504D491D,
+ 0x4A58554D, 0x6B625654, 0x6D6C5E70, 0x6E787868,
+ 0x806E8080, 0x80806E80, 0x6D7D7D6D, 0x7D6D7D7D,
+ 0x7D7C6E7D, 0x707D7B70, 0x7C707C7C, 0x7373677C,
+ 0x66727566, 0x6D617275, 0x7474686B, 0x5D777368,
+ 0x5C526C68, 0x5352485E, 0x20383930, 0x01002626,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x09080409, 0x05070804,
+ 0xA8A8A808, 0xB9BDC0BE, 0xBCBAB6BB, 0xB8BEB9B7,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB8BCB7B8, 0xB6B6BCB7,
+ 0xBBB9B5BB, 0xB4B9B7B6, 0xB3B2B9B4, 0xBAB3B2BA,
+ 0xB3BAB3B3, 0xB3B2BAB3, 0xB8B3B2BA, 0xB5BBB6B2,
+ 0xB5B4BCB5, 0xBCB5B4BC, 0xB2B9B2B5, 0xB4B0B6B1,
+ 0xBCB7B3B9, 0xB1B7B2B8, 0xB3B3B7B1, 0xBAB3B3BA,
+ 0xB3BAB3B3, 0xB5B3BAB3, 0xBCB5B5BC, 0xB5BCB5B5,
+ 0xB3B4BBB4, 0xBBB4B3BA, 0xB5BCB5B4, 0xB5B5BDB6,
+ 0xB0AAB5BC, 0x969892AC, 0x777F8279, 0x81787D80,
+ 0x7E817880, 0x7A7C807A, 0x807B7A81, 0x7A807B7A,
+ 0x77787C77, 0x7C76787C, 0x7A7C767A, 0x7A80807A,
+ 0x81788080, 0x80817880, 0x72787970, 0x79737678,
+ 0x75767277, 0x00424341, 0x00020000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x58560001, 0x83848057,
+ 0x7B81817B, 0x847E7F81, 0x81837D82, 0x7B85857F,
+ 0x85818181, 0x83807B88, 0x7684817C, 0x7E76807E,
+ 0x84827A80, 0x797F8077, 0x7F797F7F, 0x81817B7F,
+ 0x797D7E75, 0x82798182, 0x81827981, 0x767D7E75,
+ 0x7E767E7F, 0x7E7F7680, 0x737D8279, 0x8279777C,
+ 0x82847E7F, 0x797E807A, 0x7D777B7F, 0x7D7F797B,
+ 0x767B7D77, 0x7D777A7C, 0x80807A7D, 0x757A7B72,
+ 0x7F767D7E, 0x7C7D747E, 0x73797973, 0x7B757979,
+ 0x7B7B757B, 0x71797973, 0x78707B79, 0x78766E7A,
+ 0x66737167, 0x72667272, 0x6A6C6072, 0x616B6D61,
+ 0x63596A6B, 0x62635964, 0x51595D51, 0x564C595D,
+ 0x54554C55, 0x464A4C46, 0x605A4A4C, 0x72756C5E,
+ 0x90868980, 0xA99F9499, 0xB1B8B1A1, 0xB5B1B8B1,
+ 0xBCB5B4BA, 0xBAC1BAB5, 0xBCBDC1BC, 0xC1BCBDC1,
+ 0xBDC1BCBD, 0xBBBFC1BB, 0xBFBDBCC0, 0xB7BAB8BC,
+ 0xBAB8BCB7, 0xBFBABBBF, 0xB6BCB7B9, 0xB9BBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBAB9BFBA, 0xBEBCB9BF,
+ 0xB9BEBCB9, 0xBCB8BDBB, 0xBCBABABC, 0xB9BEBCB9,
+ 0xBDB6BDBA, 0xC0BDB9C0, 0xB9C0BDB9, 0xBBB8BDBB,
+ 0xBFBABAC0, 0xBBBFBABB, 0xBCBAC0BB, 0xC0BBBBC1,
+ 0xBCC0BBBC, 0xBCBDC1BC, 0xC1BCBDC1, 0xBCC2BDBB,
+ 0xBBBCC1BF, 0xC0BDB7BE, 0xBAC1BEB9, 0xBFBABFBE,
+ 0xBEB9BBC0, 0xB5BCB7B7, 0xBDB9BEBC, 0xBBBAB9BE,
+ 0xB6BBBAB6, 0xBBB7B9B9, 0xABB4B8BA, 0xB3B2BBAC,
+ 0xB9B8BABB, 0xBCB7B8BB, 0xB7BBB6B8, 0xB7B8BEB9,
+ 0xBAB8B6BC, 0xBABDBBB7, 0xB9B5BAB8, 0xBAB8B6BB,
+ 0xB6BBB9B5, 0xB5B6BAB5, 0xBAB8B6BA, 0xB3B9B4B5,
+ 0xB3B8BCB7, 0xB9B4B5B9, 0xB5B9B4B5, 0xB7B5B9B4,
+ 0xB9B7B8BC, 0xB3B6B4B6, 0xB6B3B8B7, 0xB5B4B1B7,
+ 0xB1B7B6AF, 0xB2B1B8B5, 0xB5B3AEB5, 0xB0B5B3B0,
+ 0xAEACB1AF, 0xB3B0ABB0, 0xABB2AFAC, 0xA0A1A5A0,
+ 0xA49FA1A5, 0xA5A9A4A0, 0xA59EA49F, 0xAFAAA4AA,
+ 0xB0B4AFAB, 0xAAACB1AF, 0xACAAA7AC, 0xABB0AEA7,
+ 0xABA9AEAC, 0xAFA9AAB0, 0xA8ACA6AB, 0xA7A9AFAA,
+ 0xADA8A6AC, 0xA8ACA6A9, 0x9FA0A49E, 0xA09AA3A5,
+ 0x9899959E, 0x898A8B89, 0x7B79888B, 0x686B697A,
+ 0x374F504C, 0x3C36383C, 0x393D3738, 0x4C4D514C,
+ 0x5D584D51, 0x585C5659, 0x625E605A, 0x68636668,
+ 0x686C6664, 0x62676C63, 0x6B62666B, 0x6F716B68,
+ 0x676C706A, 0x736D696D, 0x6E71686F, 0x6B6D7067,
+ 0x70677374, 0x73746B6F, 0x6F7A7870, 0x776D7879,
+ 0x74786D76, 0x74767970, 0x786F7C7D, 0x78797077,
+ 0x6F7A7B71, 0x766E7879, 0x77756D78, 0x74787970,
+ 0x7B727C7D, 0x7B7C737A, 0x6E7B7C73, 0x786D7677,
+ 0x73776C74, 0x72787970, 0x79707A7B, 0x7B7C7378,
+ 0x747C7C76, 0x7B727A7D, 0x787D7478, 0x74797B75,
+ 0x77737778, 0x79787478, 0x747A7975, 0x736F7A7A,
+ 0x78787274, 0x767A7A74, 0x7674797A, 0x75767475,
+ 0x006B6C6A, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x21222000,
+ 0x4850504A, 0x64585250, 0x716F6464, 0x61767469,
+ 0x685E6E6C, 0x6A695F6A, 0x53686960, 0x50455B5C,
+ 0x4243394C, 0x2E34352C, 0x34303633, 0x4F4C4737,
+ 0x4B57544C, 0x544B5755, 0x6E6C6159, 0x66797969,
+ 0x7F6D7878, 0x80806E7F, 0x6D828272, 0x7D6D7D7D,
+ 0x7878687D, 0x66737367, 0x6A5E7272, 0x6A6A5E6A,
+ 0x66676759, 0x7A6E7474, 0x7474687A, 0x6977756A,
+ 0x685E7674, 0x52514769, 0x20383930, 0x01002626,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x09070308, 0x05070804,
+ 0xAAAAAA08, 0xB7BDC0BE, 0xBCB7B6BC, 0xB8BCB6B8,
+ 0xB5B6BDB6, 0xBDB6B5BC, 0xB5BCB5B6, 0xB5B5BCB5,
+ 0xBDB8B5BC, 0xB3B9B4B7, 0xB3B1B8B3, 0xB8B3B1B8,
+ 0xB3B9B4B2, 0xB4B2BAB3, 0xBBB6B3BB, 0xB3BAB5B4,
+ 0xB1B0B8B1, 0xB7B2B0B8, 0xB1B8B3B0, 0xB4B0B8B1,
+ 0xBBB4B3BB, 0xB3BBB4B4, 0xB4B4BBB4, 0xBBB4B3BB,
+ 0xB4BBB4B3, 0xB1B2BAB0, 0xB9B3B5BA, 0xB5B9B3B5,
+ 0xB1B1B8B1, 0xB8B1B1B8, 0xAFB7B0B1, 0xB1B0BBB3,
+ 0xBBB0B2BB, 0x868C81B3, 0x746A6D64, 0x8178787A,
+ 0x80817880, 0x73797C73, 0x7C76777C, 0x767B7278,
+ 0x72747970, 0x7D74787B, 0x7A7D747A, 0x72787B72,
+ 0x7B72787B, 0x787B7278, 0x767B7D77, 0x7C77787C,
+ 0x787B7978, 0x00515250, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000000, 0x29270001, 0x77787428,
+ 0x797E807A, 0x837F7D7F, 0x82837F82, 0x7B83837D,
+ 0x837D8181, 0x81817B83, 0x7881817B, 0x807B7E7E,
+ 0x83817983, 0x7B808178, 0x7C767F81, 0x7D7D777A,
+ 0x767E7F76, 0x7B72807E, 0x797A717A, 0x787D7E75,
+ 0x7E758081, 0x7D7E757D, 0x71787C71, 0x8178787C,
+ 0x81827980, 0x7A7E807A, 0x81787E80, 0x7B7C7380,
+ 0x75808178, 0x786F7D7E, 0x7B7E7575, 0x727C7D74,
+ 0x7A747A7B, 0x7878727A, 0x737B7C73, 0x7C737B7C,
+ 0x7D7D777B, 0x727C7C76, 0x746E7878, 0x70716874,
+ 0x66727068, 0x70667170, 0x72736971, 0x5D707167,
+ 0x675D6468, 0x63645A66, 0x545C6055, 0x594F5B5F,
+ 0x58594F58, 0x414F5047, 0x4B414A4B, 0x5B5F544A,
+ 0x8A72746E, 0x908A8E90, 0xA8ACA68C, 0xB2B1B8B1,
+ 0xB8B1B1B9, 0xB1B8B1B0, 0xBCBCC0BB, 0xBEBABFC0,
+ 0xBFC0BCBD, 0xBCBDC1BC, 0xBFBDBDC1, 0xBBBEBCBC,
+ 0xB9B4B7B5, 0xB8B6B6BB, 0xB2B7B5B3, 0xB9B9BDB8,
+ 0xBFB9BCBD, 0xBCC0BABD, 0xB9B9C0B9, 0xBEB9B9C0,
+ 0xB8BFBAB7, 0xBBB6BDBA, 0xBBB9B8BD, 0xB6BBB9B6,
+ 0xBBB7BEBB, 0xBDBCB7BE, 0xBABFBDB8, 0xBCB9C0BD,
+ 0xC0BBB8BF, 0xB5BBB6BA, 0xBDBDC0BE, 0xC0BBBCBF,
+ 0xBAC0BBBA, 0xBCBAC0BB, 0xC0BEBBC1, 0xBBC0BEBB,
+ 0xBCBBC1BC, 0xBBB9BBC1, 0xB9BEBCB6, 0xBBBDC2C0,
+ 0xBBB6B8BD, 0xB5BBB6B5, 0xBDB9BEBC, 0xBBB9BABF,
+ 0xB7BCBAB6, 0xB9B8BBB9, 0xB7B8B8BB, 0xB4B8B9B3,
+ 0xB7B7B9B9, 0xB9B7B6B9, 0xB5BAB8B4, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB9B4BAB5, 0xBAB8B6BB,
+ 0xB5BAB8B5, 0xB4B5B9B4, 0xBCB7B5B9, 0xB8BCB7B8,
+ 0xB4B8BCB7, 0xB9B4B5B9, 0xB3B7B2B5, 0xB4B3B9B4,
+ 0xB8B3B3B9, 0xB2B6B1B4, 0xB3B3B8B6, 0xB5B3B0B5,
+ 0xB0B5B3B0, 0xB3B2B8B7, 0xB4B3AEB4, 0xB0B5B4AF,
+ 0xB3AEB4B3, 0xB4B3AEB4, 0xA5ACA9AE, 0x8F8F938E,
+ 0x948F9094, 0x90948F90, 0xA08E958E, 0xB0A99FA7,
+ 0xA9B0A9A9, 0xABABAFAA, 0xACA7ACB0, 0xABAFAAA8,
+ 0xA9A9AFAA, 0xAFA9A9B0, 0xA5ACA5AB, 0xA19FA7A0,
+ 0xA7A0A0A8, 0x9DA49DA0, 0xA0A1A8A1, 0x9791A2A6,
+ 0x92969193, 0x81818482, 0x6F6A7E83, 0x5559546B,
+ 0x3A3F413B, 0x403A3E40, 0x4749433E, 0x575A5B57,
+ 0x5A565A5B, 0x5A5B5759, 0x64656662, 0x6A656768,
+ 0x65696466, 0x67696D67, 0x706A6B6D, 0x6A6E686E,
+ 0x6D697069, 0x746D6D74, 0x70746E6D, 0x6D767970,
+ 0x776E7376, 0x6D706774, 0x7173746A, 0x7B717A7B,
+ 0x787C717A, 0x70777A71, 0x7E737679, 0x7A7B717A,
+ 0x717A7B72, 0x786F7B79, 0x76776E77, 0x6E74746E,
+ 0x78727474, 0x76787276, 0x70787B72, 0x796E777B,
+ 0x767A6F75, 0x777E7F76, 0x7B737D7D, 0x797A717D,
+ 0x73797A71, 0x7D74797C, 0x7A7C767A, 0x75797B75,
+ 0x7D77797B, 0x797B757B, 0x72797973, 0x79737A7B,
+ 0x79797379, 0x77787975, 0x78787879, 0x75777778,
+ 0x003F3F3F, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x23212000,
+ 0x474E4B47, 0x645A4F4C, 0x71716565, 0x60747466,
+ 0x6E626E6E, 0x69685E6E, 0x535C5D53, 0x4E445C5D,
+ 0x4041384D, 0x32383930, 0x14103838, 0x27262215,
+ 0x404A4742, 0x6B634A48, 0x6E6C626E, 0x68787769,
+ 0x79697878, 0x77776779, 0x66787866, 0x79697878,
+ 0x78786879, 0x69767469, 0x6D637674, 0x6361576F,
+ 0x62646257, 0x746A6F6D, 0x76746A76, 0x68737367,
+ 0x675B7274, 0x4D4C4267, 0x25404138, 0x01002B2B,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07070406, 0x06060805,
+ 0xAAABA908, 0xB7BBBEBC, 0xBCB6B6BC, 0xB8BCB6B8,
+ 0xB3B3BBB1, 0xBAB3B5BD, 0xB3BAB3B3, 0xB1B5BCB5,
+ 0xB9B2B3BB, 0xB3BAB3B2, 0xB4B2B8B3, 0xB8B3B2B9,
+ 0xB2B9B2B2, 0xB4B4BCB5, 0xBAB5B3BB, 0xB3BAB5B3,
+ 0xB0B3BBB4, 0xB8B1AFB7, 0xB3BBB4B0, 0xB1B1B9B2,
+ 0xB8B1B0B8, 0xB3BBB4B0, 0xB4B4BCB5, 0xBBB4B3BB,
+ 0xB1B8B1B3, 0xB0B2B7AE, 0xB9B3B4B9, 0xB4B8B2B5,
+ 0xB1B1B8B1, 0xBDB6B1B8, 0xB7BFB5B6, 0xB1B0BBB1,
+ 0x8D80B3BD, 0x6E746984, 0x7371746B, 0x80777979,
+ 0x7F80777F, 0x747B7E75, 0x7B72787D, 0x777A7178,
+ 0x73787B72, 0x7C717A7E, 0x7A7E7378, 0x72797C73,
+ 0x7C73787B, 0x75777179, 0x77787C76, 0x7B79787C,
+ 0x51545278, 0x001B1B1B, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x01000000, 0x797A7800,
+ 0x7E868783, 0x7F7B8284, 0x7E7F7B7E, 0x7B80807A,
+ 0x817B8181, 0x81817B81, 0x7881817B, 0x7D78807D,
+ 0x81827980, 0x797D8077, 0x7F797D7F, 0x7B7D777D,
+ 0x76807D78, 0x7E75807E, 0x7E7F767D, 0x787C7D74,
+ 0x7C738081, 0x7B7C727B, 0x747F8076, 0x81797D7E,
+ 0x83817983, 0x777F7F79, 0x81787B7D, 0x7B7C7380,
+ 0x737D7E75, 0x79707B7C, 0x787B7276, 0x747B7C73,
+ 0x7D777C7D, 0x7B7B757D, 0x797D7E75, 0x81788182,
+ 0x7A7B7280, 0x747A7B77, 0x746E7778, 0x71736D72,
+ 0x68707168, 0x6D657270, 0x7172696F, 0x686B6C63,
+ 0x675D6E71, 0x61625866, 0x5562665B, 0x5F555C60,
+ 0x58594F5E, 0x46515248, 0x4B414F50, 0x4A4B414A,
+ 0x6E74746E, 0x908A7274, 0x8E908A8E, 0xB0A1A8A1,
+ 0xB8B1AFB7, 0xB1B8B1B1, 0xBBBEBFBB, 0xC0BCBEBF,
+ 0xBEBFBBBF, 0xBABBBFBA, 0xBDBBBBBF, 0xBBBEBCBC,
+ 0xB9B2B5B3, 0xBBBAB6BB, 0xB8BBB9B6, 0xB7B9BAB6,
+ 0xBDB7BABB, 0xBABEB8BB, 0xBABBBFB9, 0xBAB3BAC1,
+ 0xB2B9B4B2, 0xBBB8BFBC, 0xBFBDB7BE, 0xB7BCBABA,
+ 0xBDB7BEBB, 0xBDBCB9C0, 0xB8BDBCB8, 0xBAB9C0BD,
+ 0xC1BCB6BD, 0xB8BEB9BB, 0xBDBCBFBD, 0xC0BBBCBF,
+ 0xBAC0BBBA, 0xBCBAC0BB, 0xC1BFBBC1, 0xBABFBDBC,
+ 0xBABDC1BC, 0xBEBCBBBF, 0xB9BEBCBB, 0xB9B7BCBA,
+ 0xBBB6B8BE, 0xB8BEB9B5, 0xBCB7BDB8, 0xBBB9B9BE,
+ 0xB8BDBBB6, 0xB7B7BBB6, 0xBBB9B8BC, 0xB6BBB9B6,
+ 0xB9B7BAB8, 0xBBBAB8BB, 0xB6BBB9B6, 0xB7B9BCBA,
+ 0xBBB6B8BC, 0xB8BCB7B7, 0xB9B4BAB5, 0xBBBAB6BB,
+ 0xB5BAB8B6, 0xB3B5B8B6, 0xBCB7B4B8, 0xB8BCB7B8,
+ 0xB4B5B9B4, 0xB9B4B5B9, 0xB3B7B2B5, 0xB5B3B9B4,
+ 0xB9B4B4BA, 0xB4B8B3B5, 0xB3B0B5B3, 0xB6B4B0B5,
+ 0xB1B6B4B1, 0xAAAEB4B3, 0xB1B0A5AB, 0xB3B8B7AC,
+ 0xAEAEB4B3, 0xB4B3A9AF, 0xAEB5B2AE, 0x8F9DA09E,
+ 0x95909094, 0x8E948F91, 0xA8969E97, 0xB0A9A7AF,
+ 0xA9B0A9A9, 0xACABAFAA, 0xAEAAADB1, 0xA8ACA7AD,
+ 0xAAA8AFA8, 0xACA6AAB1, 0xA6ADA6A8, 0xA0A0A99F,
+ 0xA39CA1AA, 0x9DA49D9C, 0x90A2A9A2, 0x97909097,
+ 0x80868190, 0x6C7E847F, 0x5954696E, 0x40443F53,
+ 0x3A3E403A, 0x49434040, 0x51534D47, 0x5C5A5B57,
+ 0x635F5F60, 0x62635F62, 0x64656664, 0x69646566,
+ 0x686C6765, 0x67696B65, 0x6B676B6D, 0x6C706B6A,
+ 0x6B697069, 0x726B6A72, 0x6F736D6B, 0x6F767970,
+ 0x766D7578, 0x6E716873, 0x6A727369, 0x776D7374,
+ 0x787C7176, 0x707C7F76, 0x79707479, 0x7A7B7176,
+ 0x6E797A71, 0x7A717677, 0x76776E79, 0x6D74746E,
+ 0x77737173, 0x74787276, 0x70767970, 0x7A6F777B,
+ 0x76797076, 0x73787970, 0x786F7979, 0x7B7C7377,
+ 0x70787970, 0x78727879, 0x7A7C7676, 0x737B7D77,
+ 0x79737779, 0x75777177, 0x70787970, 0x7A717879,
+ 0x7B7B7579, 0x78787977, 0x78787878, 0x77797976,
+ 0x00161616, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x24222100,
+ 0x534F4C48, 0x645C5C58, 0x73736766, 0x65737365,
+ 0x6E627373, 0x6A695F6E, 0x536A6C60, 0x4F465C5D,
+ 0x4041384E, 0x3037382F, 0x02003839, 0x02030001,
+ 0x00020100, 0x25200201, 0x4A484028, 0x6B515046,
+ 0x776B7777, 0x78776977, 0x69787868, 0x77677979,
+ 0x78776977, 0x69767469, 0x6D637674, 0x69675D6F,
+ 0x5D68675D, 0x6C626967, 0x6F6D636E, 0x68727369,
+ 0x665B7274, 0x4E4C4168, 0x25424137, 0x01002B2B,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080507, 0x06060805,
+ 0xAAABA908, 0xB8BBBEBC, 0xBDB7B9BD, 0xB9BDB7B9,
+ 0xB2B5BDB3, 0xBAB3B3BC, 0xB3BAB3B3, 0xB3B6BDB6,
+ 0xB9B3B3BA, 0xB3BAB3B5, 0xB5B2B9B2, 0xBDB6B5BC,
+ 0xB1B8B1B6, 0xB4B3BBB4, 0xB9B4B3BB, 0xB3BAB5B2,
+ 0xB4B2BAB3, 0xBDB6B3BB, 0xB5BDB6B5, 0xB9B5BDB6,
+ 0xBFBAB8C0, 0xB5BCB7B8, 0xB7B5BDB6, 0xC0B9B6BE,
+ 0xB5BCB5B9, 0xB7B8BCB6, 0xBCB6B9BD, 0xB8BCB6B8,
+ 0xB5B8BDB4, 0xBDB4B9BE, 0xBEC3BAB8, 0x81B3BBB1,
+ 0x7467848C, 0x71756A6D, 0x7373746B, 0x807A7979,
+ 0x79797380, 0x767A7A74, 0x7A747A7C, 0x797B757A,
+ 0x71797B75, 0x7A71777A, 0x787B7277, 0x72787C71,
+ 0x7B72787B, 0x777B7576, 0x79787C77, 0x2A28787B,
+ 0x00000027, 0x01000000, 0x01010101, 0x02000003,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x27282600,
+ 0x7B888783, 0x7F7B807F, 0x82837F7E, 0x7A7F817B,
+ 0x807C7E80, 0x80807A81, 0x7683807B, 0x7D75807E,
+ 0x8182797F, 0x777E8178, 0x7F79797D, 0x7D7F797D,
+ 0x7983807B, 0x82798381, 0x81827981, 0x78808178,
+ 0x78708081, 0x78796F7A, 0x777E7F75, 0x81797F80,
+ 0x827F7A83, 0x787E7F76, 0x7E758081, 0x8081787D,
+ 0x757B7C73, 0x7D727D7E, 0x797D7279, 0x737B7C73,
+ 0x807A7B7C, 0x7D7D7780, 0x777D7E75, 0x80778081,
+ 0x8081787F, 0x727A7B77, 0x77737576, 0x73756F76,
+ 0x66707168, 0x6F656E6F, 0x7071676E, 0x62707168,
+ 0x6C626A6B, 0x66675D6B, 0x5B696B5F, 0x5F556465,
+ 0x5859505E, 0x5058564E, 0x51485A58, 0x4A4B4250,
+ 0x6E585852, 0x756F7474, 0x8E918875, 0x9F949990,
+ 0xB8AFA1A9, 0xB3B8AFB3, 0xB6B6B8B2, 0xBFBBBCBC,
+ 0xBEBFBBBE, 0xBABDC1BC, 0xBFBABBBF, 0xBBBFBABB,
+ 0xB6B8BCB7, 0xBCBAB7BB, 0xBCC0BBB9, 0xB7BEBFBB,
+ 0xBCB6BBBD, 0xB8BCB6BA, 0xB3B5B9B3, 0xAAA5B3BA,
+ 0xA6ACA7A4, 0xBAB8BDBB, 0xBDBCB7BC, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xC1BEBAC0, 0xB9C0BDBA, 0xBAB7BCBA,
+ 0xBDBBB7BC, 0xB8BDBBB8, 0xBEB9BEBC, 0xC0BBBBC0,
+ 0xBDC1BCBC, 0xBCBBC1BC, 0xC0BEBBC1, 0xBBC0BEBB,
+ 0xBABBBFBA, 0xC1BCBBBF, 0xBDC1BCBD, 0xB6B9BFBA,
+ 0xBBB6B5BB, 0xB8BEB9B7, 0xB7B8BEB9, 0xBDB8B6BC,
+ 0xB8BCB7B7, 0xB7B5BBB6, 0xBBB9B6BC, 0xB4B9B7B6,
+ 0xB9B5BAB8, 0xBAB9B6BB, 0xB6BBB9B5, 0xB9B7BAB8,
+ 0xBCB7BABE, 0xB8BCB7B8, 0xB8B4B9B7, 0xBABAB5BA,
+ 0xB6B9B7B8, 0xAFB3B6B4, 0xB9B3B0B4, 0xB8BCB7B5,
+ 0xB6B4B8B3, 0xB8B4B5B8, 0xB3B7B2B7, 0xB4B1B7B2,
+ 0xB9B4B3B9, 0xB3B7B2B5, 0xB0ADB3AE, 0xB5B3AFB5,
+ 0xA9AEACB2, 0xAFAAB1AE, 0xB0AFABB2, 0xAFB4B3AB,
+ 0xB2AEB4B3, 0xB0AFADB3, 0xB2B9B6AA, 0x9BABAEAC,
+ 0xA29B9CA0, 0x9AA19A9B, 0xA9A8B0A9, 0xB0A9A8B0,
+ 0xA9B0A9A8, 0xACABAFAA, 0xB0ACADB1, 0xAAABA7AF,
+ 0xA9A8ACA6, 0xACA3ABAF, 0xA6ABA2A7, 0xA0A1A8A1,
+ 0xAAA09FA7, 0x9CA39CA2, 0x918F968F, 0x86819096,
+ 0x7F858080, 0x556A6E69, 0x443F565A, 0x40443F40,
+ 0x443E403A, 0x514D4A4A, 0x5A5B5750, 0x5F60645E,
+ 0x68626165, 0x65676166, 0x6460645F, 0x69646569,
+ 0x63676265, 0x686C6E68, 0x6C6A6B6C, 0x686B696B,
+ 0x6A6A706B, 0x736E686F, 0x70746E6D, 0x7171746B,
+ 0x7970797A, 0x75766D78, 0x6974756B, 0x71677273,
+ 0x71746B70, 0x77787A74, 0x7B727B80, 0x78797078,
+ 0x71797A71, 0x7369797A, 0x70746972, 0x6D6E7168,
+ 0x7C767173, 0x7678727A, 0x70777A71, 0x786F777B,
+ 0x797A7177, 0x6F7C7D74, 0x7C737778, 0x7B7E757B,
+ 0x74777A71, 0x7B757A7D, 0x7A7C7679, 0x76787C76,
+ 0x7B75787C, 0x797B7579, 0x737A7D74, 0x7B75797C,
+ 0x7B7A767B, 0x78787977, 0x79797878, 0x58585879,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x24222100,
+ 0x545B5854, 0x645C5C59, 0x72716766, 0x65747365,
+ 0x6D627473, 0x6E6D636F, 0x536A6B61, 0x4E485A5E,
+ 0x40403A4E, 0x30363930, 0x03003639, 0x02030002,
+ 0x00000100, 0x00000001, 0x02000002, 0x23020100,
+ 0x50472929, 0x5150464F, 0x6B77776B, 0x766B7777,
+ 0x79776C78, 0x636E6C61, 0x6C646F6D, 0x6E6C646F,
+ 0x5766675D, 0x60586061, 0x68675D62, 0x5C65665C,
+ 0x5A4F6566, 0x4D4B405C, 0x23424137, 0x01002B2C,
+ 0x00000000, 0x01000001, 0x00000000, 0x02000002,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07080507, 0x06060805,
+ 0xAAAAAA08, 0xBABDC0BE, 0xBCB7BBBF, 0xB6BDB6B8,
+ 0xB6B6BDB6, 0xBCB7B5BD, 0xB5BBB6B6, 0xB6B5BCB5,
+ 0xBCB6B6BD, 0xB8BCB6B8, 0xB5B7BBB5, 0xBFB9B5BC,
+ 0xB5BCB5BB, 0xB5B5BCB5, 0xBCB5B4BC, 0xB5BCB5B5,
+ 0xB9B6BDB6, 0xC1B7B9C0, 0xB9C1B7B9, 0xB9B6BDB6,
+ 0xBFBAB9C0, 0xB8BFBAB9, 0xB9B9C0B9, 0xC0B9B9C0,
+ 0xB9C0B9B9, 0xB3B8BCB6, 0xB2ACB5B9, 0xB2B6B0AE,
+ 0xC0BEC2BC, 0xC9C0C4C9, 0xB3B8AFC4, 0x6A878C83,
+ 0x74696E73, 0x7074696E, 0x73777A71, 0x79737979,
+ 0x79797379, 0x74797973, 0x7A747A7A, 0x7B7B757A,
+ 0x72797B75, 0x78727678, 0x76797076, 0x70767970,
+ 0x7A747679, 0x7B7F7A76, 0x00505351, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x28292700,
+ 0x7E7E7F7B, 0x807A8284, 0x82847E7E, 0x7D82847E,
+ 0x827E8383, 0x81817B83, 0x79838179, 0x7F778381,
+ 0x81827981, 0x767E807A, 0x7F79787C, 0x7E807A7D,
+ 0x7D81817B, 0x7F768785, 0x7E7F767E, 0x78808178,
+ 0x7C728081, 0x7F7E747D, 0x767E7F76, 0x827A7E7F,
+ 0x83817984, 0x78808178, 0x81788081, 0x7D7E7580,
+ 0x78808178, 0x7E748081, 0x7F80767D, 0x737D7E75,
+ 0x7D777B7C, 0x7B7C737D, 0x727B7C72, 0x7A717B7C,
+ 0x7B7C7379, 0x73787872, 0x736F7877, 0x78787274,
+ 0x6772736A, 0x73697071, 0x72736972, 0x696B6C63,
+ 0x71677172, 0x6B6C6270, 0x5B6A6B61, 0x5F566465,
+ 0x5859505E, 0x4F59574F, 0x584F5758, 0x50514857,
+ 0x52585852, 0x756C5858, 0x72756C74, 0x8F848980,
+ 0xA7A19398, 0xB4B8B2A3, 0xB6B6B8B2, 0xBCB7BABC,
+ 0xBCC0BBB8, 0xB8BBBFBA, 0xC0BBBABE, 0xB8BCB7BC,
+ 0xB6B8BCB7, 0xC0BBB7BB, 0xB8BCB7BC, 0xB9BBBFBA,
+ 0xC0BABBBF, 0xB8BCB6BC, 0xB4B9BFBA, 0xB3AEB3B9,
+ 0xB3B9B4AD, 0xBBB6BBB9, 0xBDBBB8BD, 0xB7BCBAB8,
+ 0xB9B8BEB9, 0xBDBBB8BE, 0xBABFBDB8, 0xBAB8BDBB,
+ 0xBDBBB7BC, 0xB8BDBBB8, 0xBEBABFBD, 0xC0BBBBC0,
+ 0xBDC1BCBC, 0xBCBBC1BC, 0xBFBDBBC1, 0xBCBFBDBA,
+ 0xBDBBBFBA, 0xBFBAC0C1, 0xBBBFBABB, 0xB5B8BEB9,
+ 0xBAB8B4BA, 0xB8BDBBB7, 0xBAB6BCB7, 0xBEB9B8BF,
+ 0xB8BCB7BA, 0xB5B5BBB6, 0xBAB8B4BA, 0xB5BBB6B5,
+ 0xB7B6BCB7, 0xB8B6B6BC, 0xB4B9B7B3, 0xB1B9BDB8,
+ 0xB9B4B2B6, 0xB8BCB7B5, 0xB8B4B9B7, 0xBBB9B5BA,
+ 0xB5B8B6B8, 0xB2B5B9B4, 0xB9B3B3B7, 0xB5B9B3B5,
+ 0xB4B5B9B4, 0xB5B1B3B6, 0xB2B3AFB4, 0xB4B3B7B2,
+ 0xB8B3B3B9, 0xB2B6B1B4, 0xB1ADB3AE, 0xB5B3B0B6,
+ 0xB3B6B4B2, 0xB2AFB4B2, 0xB4B2AEB5, 0xAAAFADAF,
+ 0xB3ABB0AE, 0xB0AFAEB4, 0xAFB4B2AA, 0xAAA9AFAA,
+ 0xBDB6ABAF, 0xB6BDB6B6, 0xA9A8B0A9, 0xB0A9A8B0,
+ 0xA7AFA8A8, 0xAAABB1AC, 0xAFAAABAF, 0xABAFAAAB,
+ 0xA4A7AEA7, 0xABA2A4AB, 0xA4A9A0A6, 0xA1A1A8A1,
+ 0xA99FA0A8, 0x969D96A1, 0x80909691, 0x85807F85,
+ 0x6E746F7F, 0x54545853, 0x443F5559, 0x40443F40,
+ 0x4D474943, 0x5B575353, 0x5A5B575A, 0x5C5C605A,
+ 0x645E6065, 0x66686262, 0x64656964, 0x6C676569,
+ 0x686C6768, 0x696D6F69, 0x6E6A6D6F, 0x6B6C6A6D,
+ 0x6C6D716C, 0x736D6C73, 0x70746E6F, 0x6D73756F,
+ 0x756F7576, 0x75766D75, 0x6D76776D, 0x776E7677,
+ 0x6E716876, 0x74767872, 0x79707A7D, 0x7A7B7276,
+ 0x6E787970, 0x786D7677, 0x70746974, 0x6E6E7168,
+ 0x7C767274, 0x797C737A, 0x71767970, 0x7970777A,
+ 0x797A7178, 0x73787970, 0x7C737B7C, 0x76797079,
+ 0x73767872, 0x79737779, 0x76787277, 0x75777973,
+ 0x7B75797B, 0x77797379, 0x71797B75, 0x7A74777A,
+ 0x7979737A, 0x76797A78, 0x78787778, 0x18181878,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x22232100,
+ 0x535B5853, 0x645C5B58, 0x72716766, 0x69777668,
+ 0x72677877, 0x6E6D6374, 0x546A6B61, 0x4E485C5D,
+ 0x40403A4E, 0x31383930, 0x03003537, 0x02030102,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x02020002, 0x4E181812, 0x564E5856,
+ 0x76756B58, 0x636E6D63, 0x6D636E6D, 0x68675D6F,
+ 0x5766675D, 0x61576061, 0x62615762, 0x5C67665C,
+ 0x584E6766, 0x4E4C425A, 0x25424137, 0x01002B2B,
+ 0x00000000, 0x01000001, 0x00000000, 0x02000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0xA2A2A200, 0xB4B3B6B4, 0xB6B4B3B6, 0xB1B7B2B3,
+ 0xA9A9AFAA, 0xAFAAA7AE, 0xA9B0A9A9, 0xAAA9AFAA,
+ 0x908BA9AF, 0x6F706C8C, 0x696F716B, 0x706A6B6F,
+ 0x6C706A6E, 0x66686C66, 0x6C66666D, 0x686C6668,
+ 0x64696D67, 0x6C66686D, 0x696D6768, 0x63656963,
+ 0x68626569, 0x62696264, 0x67686C67, 0x6C67686C,
+ 0x686C6768, 0x66686C66, 0x5C57686C, 0x585C5758,
+ 0x69696F6A, 0x70696970, 0x6B6F6969, 0x76787C76,
+ 0x7C76787C, 0x787C7678, 0x72787D74, 0x7B72787B,
+ 0x7879707A, 0x70797A71, 0x79707879, 0x78797078,
+ 0x6F72736F, 0x746F7074, 0x70746E70, 0x73767872,
+ 0x79737779, 0x27282477, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x7A555751, 0x84798083, 0x80837A80, 0x7F81817B,
+ 0x837E8683, 0x83837D86, 0x777F8077, 0x7C737F80,
+ 0x81817B7B, 0x797E807A, 0x7C787D7F, 0x7B7C787B,
+ 0x797F8077, 0x80778182, 0x8182797F, 0x7782837A,
+ 0x7F778081, 0x82807881, 0x79818279, 0x7E748182,
+ 0x7A7B717D, 0x757D7E75, 0x7C737D7E, 0x7879707B,
+ 0x76767970, 0x7E757E7F, 0x8081787D, 0x75808178,
+ 0x7C737D7E, 0x7B7C737B, 0x72808177, 0x79707B7C,
+ 0x7B7C7378, 0x777D7A75, 0x77737F7C, 0x77746F7A,
+ 0x6D727369, 0x786D7478, 0x70746974, 0x6B6D6E65,
+ 0x6F647374, 0x666A5F6B, 0x5E64685D, 0x645B6467,
+ 0x5E615861, 0x50585950, 0x5B50595A, 0x50544957,
+ 0x4055564D, 0x564D4849, 0x6E716855, 0x7E81857F,
+ 0x9D988084, 0x989C9799, 0xB2B1B7B2, 0xB8B1B1B7,
+ 0xB1B8B1B1, 0xB4B8BCB6, 0xBAB4B8BD, 0xB6BAB4B6,
+ 0xB8B7BDB8, 0xBCBAB7BD, 0xB7BDB8B7, 0xBAB9BFBA,
+ 0xBFBAB9BF, 0xB8BFBAB9, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB9BEBCB8, 0xB6B8BDBB, 0xB7B5B5B8, 0xB5B9B4B4,
+ 0xB9B5BBB6, 0xBEBCB8BE, 0xB8BDBBB9, 0xBBB8BDBB,
+ 0xBFBAB8BD, 0xB8BEB9B9, 0xBDBABDBB, 0xC0BBBCBF,
+ 0xBAC0BBBA, 0xBDBDC0BE, 0xBCBCBCBF, 0xBCBFBDBA,
+ 0xBBBDC1BC, 0xBFBDBCC0, 0xBABDBBBC, 0xB7B5BBB6,
+ 0xBDBBB6BC, 0xB5BAB8BA, 0xBAB5BAB8, 0xBDB8B6BD,
+ 0xB7BBB6B9, 0xB9B5B8B6, 0xB9B4B8BB, 0xB5B9B4B5,
+ 0xB7B8BCB7, 0xB9B4B8BC, 0xB4BAB5B3, 0xB2B5B9B4,
+ 0xB8B3B5B6, 0xB5B9B4B4, 0xB5B3B9B4, 0xB9B4B4BA,
+ 0xB5B9B4B5, 0xB2B5B9B4, 0xB9B3B3B7, 0xB5B9B3B5,
+ 0xAFB3B7B2, 0xB6B2B0B4, 0xB5B6B2B5, 0xB5B2B5B3,
+ 0xB7B5B4B7, 0xB4B7B5B4, 0xB1B0B3B1, 0xB7B2B0B3,
+ 0xB0B4AFB3, 0xB0ACB2AD, 0xB4AFAFB5, 0xABB1ACAE,
+ 0xB1AEB4AF, 0xAEACAEB3, 0xA9AEACA9, 0xABAEB4AF,
+ 0xB4AFAAB0, 0xAEB4AFAE, 0xA7A8AFAA, 0xB0A9A5AC,
+ 0xA0A8A1A8, 0xA1A5ADA6, 0xADA6A0A8, 0xA9B1AAA5,
+ 0xA5A8B0A9, 0xA59EA4AC, 0x9EA59E9E, 0xA1A0A8A1,
+ 0x9790A0A8, 0x90979090, 0x87868987, 0x72708689,
+ 0x585B596F, 0x404B4F4A, 0x3B364145, 0x41454037,
+ 0x5651524E, 0x68625A5C, 0x65676168, 0x6360645E,
+ 0x6B676569, 0x6667636A, 0x666B6C68, 0x6C6A696A,
+ 0x696D6869, 0x6B6E706A, 0x756F7174, 0x70706A75,
+ 0x6B6E706A, 0x766D7174, 0x71746B73, 0x76767872,
+ 0x736F7A7C, 0x76787272, 0x77797B75, 0x7A717B7D,
+ 0x74776E77, 0x6F777A71, 0x7B727578, 0x787C7178,
+ 0x70787970, 0x7D747879, 0x787B727A, 0x6E70746E,
+ 0x7C737274, 0x7A7B7279, 0x7274776E, 0x79737678,
+ 0x76767079, 0x70797A71, 0x7B757879, 0x76787279,
+ 0x7572736F, 0x7A747879, 0x74746E7A, 0x75777672,
+ 0x78747A79, 0x78787279, 0x75787872, 0x7B757B7B,
+ 0x7878727B, 0x7B80807A, 0x5757807F, 0x08050759,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x28292700,
+ 0x50595651, 0x635E5A58, 0x73716966, 0x707C7C70,
+ 0x72687C7C, 0x72736973, 0x546B6C62, 0x4C475C5D,
+ 0x4F4B4650, 0x3A404138, 0x06054040, 0x06060608,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x09050201,
+ 0x1A1A140A, 0x5B45463D, 0x675B6567, 0x67675967,
+ 0x525E5C52, 0x5C525E5C, 0x5E5C515E, 0x525E5C51,
+ 0x544A5E5C, 0x4A484056, 0x2A47443F, 0x01002F2E,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x35353500, 0x3B3A3D3B, 0x3D3B3A3D, 0x3A3D3B3A,
+ 0x39363B39, 0x3C37363B, 0x363C3736, 0x6C4E524D,
+ 0x514F6D71, 0x50514D50, 0x464A4B47, 0x4C464A4C,
+ 0x4A4C464A, 0x3F3F433E, 0x443F4044, 0x41453F40,
+ 0x383E403A, 0x403A3E41, 0x3F413B3E, 0x363A3C36,
+ 0x3C363A3C, 0x383C3638, 0x37383C37, 0x3C37383C,
+ 0x383C3738, 0x37373B36, 0x3B36383C, 0x383C3737,
+ 0x37363C37, 0x3D36363C, 0x363D3636, 0x76636762,
+ 0x7C77777B, 0x787C7678, 0x71767B72, 0x7B72787C,
+ 0x7879707A, 0x6E787970, 0x776D7677, 0x76797076,
+ 0x6F70746F, 0x746F7074, 0x70746F70, 0x4B767773,
+ 0x01004E4F, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x79292D27, 0x84787E84, 0x81857A80, 0x7E827F7A,
+ 0x807B8582, 0x85827D83, 0x777F8077, 0x7F797D80,
+ 0x81817B7F, 0x797B7D77, 0x7F7B7D7F, 0x7B7C787E,
+ 0x787C7D74, 0x80778081, 0x8081787F, 0x767F8076,
+ 0x7F777F80, 0x817F7781, 0x76818279, 0x7F757E7F,
+ 0x797A707E, 0x727B7C72, 0x7C737A7B, 0x7C7D747B,
+ 0x73797C73, 0x7D747B7C, 0x7F7D757C, 0x757B7C73,
+ 0x7D747D7E, 0x7B7C737C, 0x6F7B7C72, 0x7D747879,
+ 0x7B7C737C, 0x7A7F7C77, 0x7875837F, 0x77746F7D,
+ 0x6976776E, 0x756A7074, 0x74786D71, 0x6B787970,
+ 0x6F647374, 0x6B6F646B, 0x5B64675E, 0x66606164,
+ 0x5E615864, 0x51595A51, 0x5B505A5B, 0x575B5057,
+ 0x4D55564D, 0x49405556, 0x53554F46, 0x7F686C67,
+ 0x837E8084, 0x999D987F, 0xB2A0A6A1, 0xB8B1B0B7,
+ 0xB0B8B1B0, 0xB4B5BDB3, 0xBBB2B8BD, 0xB7BBB5B6,
+ 0xB6B4BAB5, 0xBDBBB5BB, 0xB7BDB8B8, 0xB8B9BFBA,
+ 0xC0BDB6BD, 0xB8BFBCB9, 0xBCB8BFBC, 0xC0BDB6BF,
+ 0xB8BDBBB9, 0xBBBBBEBC, 0xB9B7BABD, 0xB5B9B4B6,
+ 0xB6B5BBB6, 0xBDBBB5BB, 0xBABDBBBA, 0xBBB9BEBC,
+ 0xBDB8B8BD, 0xB9BFBAB7, 0xBBBABDBB, 0xBEB9BABD,
+ 0xBAC0BBB8, 0xBDBCBFBD, 0xBCBCBCBF, 0xBCBFBDBA,
+ 0xBBBCBFBD, 0xBDBBBCC0, 0xB8BBB9BA, 0xB8B6BCB7,
+ 0xBEBCB7BD, 0xB7BCBABB, 0xB8B5BAB8, 0xBAB8B5BA,
+ 0xB6B9B7B5, 0xB7B5B8B6, 0xB9B4B8BC, 0xB6BAB5B5,
+ 0xB7B8BCB7, 0xB9B4B8BC, 0xB3B7B2B3, 0xB7B9BDB8,
+ 0xB7B2BABB, 0xB4B8B3B3, 0xB1B1B7B2, 0xBAB5B0B6,
+ 0xB6BAB5B6, 0xB2B5B9B4, 0xB7B2B3B7, 0xB5B9B3B3,
+ 0xAFB3B7B2, 0xB8B4B0B4, 0xB2B3AFB7, 0xB5B2B5B3,
+ 0xB7B5B4B7, 0xB4B7B5B4, 0xB1B1B4B2, 0xB4AFB0B3,
+ 0xB1B5B0B0, 0xADADB3AE, 0xB6AFACB2, 0xADB4ADAF,
+ 0xAFB0B4AF, 0xB4B2B0B4, 0xA9AFAAAF, 0xA6AFB5B0,
+ 0xA7A2A5AB, 0xAAB0ABA1, 0xA5A4ABA6, 0xAEA7A3AA,
+ 0xA6AEA7A6, 0xA6A5ADA6, 0xACA4A5AD, 0xA3AEA6A1,
+ 0xA4A1ACA4, 0xA59EA1AC, 0x98A0999D, 0xA0A1A9A2,
+ 0x97909FA7, 0x7F858090, 0x71868987, 0x5B597171,
+ 0x40434158, 0x37393D38, 0x4440383C, 0x4D4E4A43,
+ 0x5B52534F, 0x68625F61, 0x61615B68, 0x6663655F,
+ 0x6864696A, 0x66676367, 0x6A6A6B67, 0x6B696D6E,
+ 0x686C6768, 0x686E706A, 0x766D6E71, 0x797A7175,
+ 0x6C707168, 0x746B7475, 0x73746B73, 0x7373756F,
+ 0x77737478, 0x7B7C7876, 0x737B7C78, 0x756F7779,
+ 0x72776E71, 0x71787970, 0x7B72797A, 0x7A7D7478,
+ 0x727A7B72, 0x79707A7B, 0x76797076, 0x7072756C,
+ 0x756C7679, 0x78797072, 0x7373756F, 0x7A747779,
+ 0x7979737A, 0x717B7C73, 0x7C76797A, 0x797B757A,
+ 0x73767773, 0x77737677, 0x78777378, 0x757A7877,
+ 0x76727876, 0x7C7B7777, 0x787B7B75, 0x7B757E7E,
+ 0x7B7B757B, 0x7A808178, 0x2C2D8080, 0x09060831,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x28292701,
+ 0x4F66635E, 0x645F5957, 0x73716967, 0x707C7B71,
+ 0x7A707C7C, 0x7273697B, 0x536C6D63, 0x5C545C5D,
+ 0x504C475F, 0x3A424038, 0x06064040, 0x07040608,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00020400, 0x271B0105, 0x65675B25,
+ 0x515E5C52, 0x5C535D5B, 0x605C5161, 0x525F5B50,
+ 0x544C605B, 0x4A474257, 0x2C46433F, 0x00002F2D,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000002, 0x373A3800, 0x4F50514F,
+ 0x4F4F5051, 0x50514F4F, 0x47484C47, 0x4B45484C,
+ 0x4A4C4649, 0x3F3F433E, 0x443F4044, 0x40443E40,
+ 0x3A3E403A, 0x403A4040, 0x40403A40, 0x373A3B37,
+ 0x3C373A3B, 0x373B3638, 0x36383C37, 0x3C37373B,
+ 0x383C3738, 0x36383C37, 0x3C37373B, 0x373B3638,
+ 0x37373B36, 0x3C37383C, 0x383C3738, 0x633A3B37,
+ 0x7B796667, 0x7A7B777A, 0x73767872, 0x7970797C,
+ 0x78797078, 0x717A7870, 0x786F797A, 0x76797077,
+ 0x6F70746E, 0x75707074, 0x70746F71, 0x00272824,
+ 0x00000102, 0x02000002, 0x01000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x4F000100, 0x84785558, 0x80847880, 0x7D828078,
+ 0x847F8582, 0x85827D87, 0x77818279, 0x7F797F80,
+ 0x7B7A767F, 0x797B7D77, 0x7E787D7F, 0x7E807A7C,
+ 0x7780807A, 0x81797F80, 0x81807683, 0x777E7F75,
+ 0x81778081, 0x817F7782, 0x79838179, 0x7F768381,
+ 0x7D7E747E, 0x757B7C72, 0x7D737E7F, 0x7D7E747C,
+ 0x72808178, 0x82797A7B, 0x7F807781, 0x757A7A74,
+ 0x7E757B7B, 0x7D7E757D, 0x767D7E75, 0x7F767E7F,
+ 0x7D7E757E, 0x737D7B73, 0x78747B78, 0x7978747B,
+ 0x6D777973, 0x736A7176, 0x777A716E, 0x6B797A71,
+ 0x746A7374, 0x6B6F6473, 0x5D64685D, 0x6B626468,
+ 0x67685F68, 0x57606158, 0x5B505F60, 0x575B5057,
+ 0x4D55564D, 0x49405556, 0x45474148, 0x6A50544F,
+ 0x8280696C, 0x80847F7F, 0xA08F9590, 0xB9B29FA7,
+ 0xB1B9B2B1, 0xAFB3BCB2, 0xBDB4B1B9, 0xBCC0BAB8,
+ 0xBAB9BDB8, 0xBFBAB9BC, 0xB8BEB9BB, 0xB8B9BFBA,
+ 0xBFBAB8BF, 0xB5BCB7B9, 0xBCB8BFBC, 0xBEBBB8BF,
+ 0xB9BEBCB7, 0xBBBABCBC, 0xBDBBBCBD, 0xAFB3AEBC,
+ 0xB5B4BAB5, 0xBBB6B5BC, 0xB5BBB6B5, 0xB7B7BBB6,
+ 0xBEB9B8BC, 0xBABEB9BA, 0xBCB6BBB9, 0xBDBBB9BE,
+ 0xBCBFBDBA, 0xBDBDC0BE, 0xBCBCBCBF, 0xBCBFBDBA,
+ 0xBBBCBFBD, 0xBCBABCC0, 0xB6BBB9B7, 0xBBB9BCBA,
+ 0xBEB9BABD, 0xB8BEB9B8, 0xB7B8BDBB, 0xB8B6B4B9,
+ 0xB5BAB8B3, 0xB7B5B8B6, 0xB8B3B8BC, 0xB5B9B4B4,
+ 0xB4B5B9B4, 0xBAB5B5B9, 0xB3B7B2B6, 0xB4B5B8B6,
+ 0xB7B2B5B9, 0xB5B9B3B3, 0xB3B1B7B2, 0xB9B4B2B8,
+ 0xB5B9B4B5, 0xB2B4B7B5, 0xB7B2B3B7, 0xB4B8B3B3,
+ 0xB3AEB4AF, 0xB9B4B2B8, 0xB4B8B3B5, 0xB5AFB2B0,
+ 0xB7B5B4B7, 0xB4B7B5B4, 0xADB0B4AF, 0xB4AFAEB2,
+ 0xB2B6B1B0, 0xADAEB5AE, 0xB3ADADB4, 0xAFB3ADAF,
+ 0xABABAFA9, 0xB0ABADB1, 0xAAB0ABAA, 0xAEAAB0AB,
+ 0xB0ABAEB5, 0xAAB0ABAA, 0xA7A9B0AB, 0xA8A1A5AC,
+ 0xA4ACA5A0, 0xA5A6ADA6, 0xADA5A4AC, 0x9DA8A0A2,
+ 0x9CA3ACA2, 0xA59E9DA6, 0x9CA49D9D, 0x918F968F,
+ 0x847F9198, 0x7F85807D, 0x5A6F7270, 0x5B59585A,
+ 0x42433F5A, 0x403A3B37, 0x4F494344, 0x5858524F,
+ 0x5B5A5A54, 0x615B6161, 0x61615B61, 0x666A6C66,
+ 0x6D676A6C, 0x6F6F696D, 0x676B6C68, 0x6C686A6B,
+ 0x6D6F696B, 0x6773746B, 0x70687071, 0x75736B72,
+ 0x6C73736D, 0x71687475, 0x70716870, 0x6D72746E,
+ 0x756F7173, 0x76787275, 0x6F777973, 0x736D7175,
+ 0x7579736F, 0x707A7B72, 0x7A717879, 0x76797077,
+ 0x70787B72, 0x79707679, 0x777A7178, 0x7174776E,
+ 0x786F777A, 0x76797075, 0x6F777973, 0x79737375,
+ 0x797A7179, 0x70767970, 0x7A717679, 0x78787279,
+ 0x6F72736F, 0x79757273, 0x7877737A, 0x77787675,
+ 0x77737A78, 0x7D7C787A, 0x777F7F79, 0x79707B7D,
+ 0x77786F78, 0x527E8178, 0x06065658, 0x08050708,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x28292700,
+ 0x5C66635E, 0x635D6664, 0x74716C63, 0x707C7C70,
+ 0x7B717D7B, 0x7C7B717D, 0x62696D61, 0x5C54696D,
+ 0x4F4C475E, 0x3A413F37, 0x0606423F, 0x08050708,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00020300, 0x03000004, 0x02040001,
+ 0x3820201A, 0x5C52403D, 0x605B525E, 0x52605C51,
+ 0x534B605B, 0x4B474256, 0x2B484541, 0x00002E2C,
+ 0x00000000, 0x00020000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x3B390001, 0x7475733A, 0x4F4F504E,
+ 0x514F5051, 0x50514F50, 0x47484B49, 0x4B47484C,
+ 0x4A4B474A, 0x40414442, 0x42403F42, 0x4344403F,
+ 0x3A3D3F39, 0x403A3E40, 0x3E403A40, 0x373A3B37,
+ 0x3C373A3B, 0x383C3738, 0x37383C37, 0x3B36383C,
+ 0x383C3737, 0x39383B39, 0x3C37383B, 0x383C3738,
+ 0x37393D38, 0x3C37383C, 0x383C3738, 0x363A3B37,
+ 0x6664393A, 0x7A7B7765, 0x70767872, 0x78727679,
+ 0x78797076, 0x6D75766D, 0x766D7576, 0x72767073,
+ 0x6F70746E, 0x514C7074, 0x070A084D, 0x00000100,
+ 0x01010001, 0x02000003, 0x01000001, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x27000100, 0x84792B2D, 0x82837980, 0x7D838179,
+ 0x7E798582, 0x84817C81, 0x7983847B, 0x7F798182,
+ 0x81817B7F, 0x797D7F79, 0x7E757D7F, 0x7A7D747B,
+ 0x777F7F79, 0x81797F80, 0x86857B83, 0x78808177,
+ 0x80768182, 0x817F7781, 0x7B807D78, 0x82798380,
+ 0x7E7F7681, 0x787C7D74, 0x7D748081, 0x7C7D747C,
+ 0x737D7E75, 0x7E757B7C, 0x7B7C737D, 0x757B7B75,
+ 0x81787B7B, 0x7F807780, 0x747D7E75, 0x7C737C7D,
+ 0x7879707B, 0x6D797A71, 0x78737576, 0x75756F7B,
+ 0x77777973, 0x7973797D, 0x757A7175, 0x6B787970,
+ 0x746B7374, 0x74756B73, 0x5D64685D, 0x6B626468,
+ 0x66675E6A, 0x58686960, 0x62586162, 0x58594F61,
+ 0x4C55564C, 0x544C5556, 0x48494056, 0x4E52534F,
+ 0x6C684F53, 0x8384806B, 0x8F81857F, 0xA7A08F96,
+ 0xB0B8B1A0, 0xB0B3BBB1, 0xBCB2B2BA, 0xB5B9B3B4,
+ 0xB8B8BCB7, 0xBDB8B9BD, 0xB9BDB7B9, 0xB7B6BDB6,
+ 0xC0B9B7BE, 0xB6BCB7B9, 0xBBB9BFBA, 0xBFBAB9C0,
+ 0xB9BEBCB8, 0xBBBABDBB, 0xBDBBBABD, 0xB0B4AFBA,
+ 0xB7B5BCB5, 0xBEB9B7BE, 0xB5BBB6B8, 0xB5B4B8B3,
+ 0xBBB6B6BA, 0xB7BBB6B7, 0xBBB6BBB9, 0xBDBBB8BD,
+ 0xBCBFBDBA, 0xBBBABDBB, 0xBBBBBABD, 0xBCBFBDB9,
+ 0xB9BCC0BB, 0xBBB9BABE, 0xB8BDBBB6, 0xBBBABDBB,
+ 0xBDBBBABD, 0xB9BEBCB8, 0xB9B4B9B7, 0xB8B6B6BB,
+ 0xB5BAB8B3, 0xB7B5B9B4, 0xBAB4B8BC, 0xB2B6B1B6,
+ 0xB4B5B9B4, 0xB8B3B5B9, 0xB3B7B2B4, 0xB9B5B8B6,
+ 0xB9B4B8BB, 0xB3B7B2B5, 0xB4B4BAB5, 0xB8B6B1B6,
+ 0xB5B8B6B5, 0xB4B6B9B7, 0xB4AFB3B6, 0xB5B9B4B0,
+ 0xB1AEB4AF, 0xB7B2B0B6, 0xAFB3AEB3, 0xB5B1B4B2,
+ 0xB5B3B4B7, 0xB2B6B1B2, 0xADB0B4AF, 0xB4AFAEB2,
+ 0xB1B5B0B0, 0xABADB4AD, 0xB1ABABB2, 0xAFB3ADAD,
+ 0xA9ABAFA9, 0xB1ACABAF, 0xA9AFAAAB, 0xA9A5ACA5,
+ 0xB0ABA9B0, 0xA5ABA6AA, 0xA7A7AEA9, 0xABA4A5AC,
+ 0xA0A8A1A3, 0xA1A1A8A1, 0xA7A0A1A8, 0xA0A8A19F,
+ 0x9799A19A, 0xA59E98A1, 0x98A0999D, 0x7E909790,
+ 0x85807E85, 0x6E73717F, 0x5A585A5A, 0x43415A5A,
+ 0x42433F42, 0x4A434440, 0x59534D4E, 0x58585259,
+ 0x6261615B, 0x68626868, 0x68686268, 0x64656761,
+ 0x68606C6D, 0x6F6D656A, 0x6A70706A, 0x6A666E70,
+ 0x6A6C6669, 0x7173746B, 0x736B797A, 0x75736B75,
+ 0x7070706A, 0x736A7676, 0x70716872, 0x7273756F,
+ 0x746E7678, 0x74756C74, 0x71777A71, 0x7973777A,
+ 0x77797377, 0x70787970, 0x78727879, 0x76787276,
+ 0x7275786F, 0x7970787B, 0x78797078, 0x70777B70,
+ 0x7970777B, 0x76797076, 0x767A7C76, 0x7B727A7C,
+ 0x76776E7A, 0x71767970, 0x7970777A, 0x77777178,
+ 0x7372746E, 0x79757677, 0x7A79757A, 0x737A7877,
+ 0x79757877, 0x7A79757C, 0x7A787975, 0x78727D7E,
+ 0x78787278, 0x2A7F817B, 0x06062D2E, 0x08050708,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x28292700,
+ 0x5E71706C, 0x706C6663, 0x7F7C7773, 0x80838278,
+ 0x89818B8A, 0x8381798C, 0x72787C71, 0x5C56787B,
+ 0x4F4C475C, 0x3B40403A, 0x0406403F, 0x07040607,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000301, 0x05000004, 0x02030001,
+ 0x00000100, 0x1F1A0201, 0x3F3C3422, 0x5359534C,
+ 0x544F605A, 0x4A474358, 0x2D46433F, 0x0000302E,
+ 0x00000002, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x39080B09, 0x5351383B, 0x52534F52, 0x4F515550,
+ 0x4F4B5054, 0x4A4B474E, 0x48464947, 0x4543474A,
+ 0x44454344, 0x3C3D3F3F, 0x3C3C3A3C, 0x3C3D3B3C,
+ 0x353B3C38, 0x3834373B, 0x35393437, 0x34353934,
+ 0x39343539, 0x35393435, 0x34353934, 0x39343539,
+ 0x35393435, 0x34343833, 0x35333539, 0x34373532,
+ 0x35333634, 0x37353437, 0x37383636, 0x32303331,
+ 0x332F3134, 0x56575332, 0x6E737470, 0x736F7274,
+ 0x70746E72, 0x71737771, 0x78717377, 0x70777071,
+ 0x4160645F, 0x01004243, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000301, 0x605A0004, 0x8D8D875E, 0x7D838179,
+ 0x807B8785, 0x81817B83, 0x787E7E78, 0x81788081,
+ 0x80817880, 0x787E807A, 0x7F767C7E, 0x7D80777C,
+ 0x767E7F76, 0x81797E7F, 0x82807883, 0x78838179,
+ 0x7D758280, 0x7F7D757F, 0x7A807D78, 0x867D827F,
+ 0x81827985, 0x797D7D77, 0x817B7F7F, 0x80817881,
+ 0x75808178, 0x80777D7E, 0x8081787F, 0x757D7E75,
+ 0x81787D7E, 0x80817880, 0x767D7E75, 0x7D747E7F,
+ 0x7B7C737C, 0x757A7B72, 0x79707B7E, 0x797C7378,
+ 0x75757A71, 0x7C76777B, 0x787C7678, 0x6B787872,
+ 0x7A717374, 0x75766D79, 0x6C71746B, 0x6E657275,
+ 0x6F6D656D, 0x5A6B6A60, 0x62586564, 0x5B5D5163,
+ 0x525D5F53, 0x5A505C5E, 0x55544A5C, 0x42484940,
+ 0x544E4648, 0x6C6F6652, 0x757B7E75, 0x99907B7E,
+ 0x96999096, 0xB0A3A7A1, 0xB9B2B0B7, 0xB1B8B1B2,
+ 0xB3B5BCB5, 0xBBB4B3BA, 0xB4BCB2B4, 0xB4B6BEB4,
+ 0xBDB4B6BE, 0xB4BBB4B8, 0xB5B6BDB6, 0xBDB6B5BC,
+ 0xB6BCB7B6, 0xB9B8BEB9, 0xBCB7B8BE, 0xB7BDB8B6,
+ 0xB6B7BEB7, 0xBDB8B6BD, 0xB8BCB7B9, 0xB9B6BCB7,
+ 0xBDB8B8BE, 0xB6BCB7B7, 0xBAB6B9B7, 0xBCBAB9BC,
+ 0xB9BCBAB9, 0xBBB8BBB9, 0xBDBBBABD, 0xBABDBBBA,
+ 0xB7BCC0BB, 0xBBB9B8BC, 0xBABFBDB6, 0xBBBABEB9,
+ 0xBDBBBABD, 0xB7BCBAB8, 0xBAB7BCBA, 0xB9B6B7BC,
+ 0xB4BAB5B2, 0xB7B4B8B3, 0xB9B4B8BC, 0xB6BAB5B5,
+ 0xB3B8B9B5, 0xB7B2B6B7, 0xB4B8B3B3, 0xB2B0B5B3,
+ 0xB5B3AFB4, 0xB0B5B3B0, 0xB3B3B8B6, 0xB8B7AFB4,
+ 0xB3B8B7B3, 0xB3B6B9B7, 0xB3AEB2B5, 0xB2B6B1AF,
+ 0xB1AFB5B0, 0xB7B0B0B6, 0xAFB6AFB0, 0xAEAEB2AD,
+ 0xB3AEAFB3, 0xB0B4AFAF, 0xABABB1AC, 0xB5AEABB2,
+ 0xAEB5AEAE, 0xABB1B5B0, 0xAFAAACB0, 0xB1B5B0AB,
+ 0xACABB1AC, 0xB1ACABB1, 0xA9AFAAAB, 0xA9A9B0A9,
+ 0xACA5A9B0, 0xA5ACA5A5, 0xA9A3ABA4, 0xB0A9A8B0,
+ 0xA4ACA5A8, 0x9F9EA49F, 0xA49FA0A4, 0x9EA59E9E,
+ 0x99979F98, 0xA09998A0, 0x8B928B99, 0x76787C77,
+ 0x7B79777B, 0x64656378, 0x42585858, 0x37374242,
+ 0x43444237, 0x4E50544F, 0x5C565054, 0x62645E5A,
+ 0x63686960, 0x6C636B6C, 0x66696069, 0x61696A61,
+ 0x6E646A6B, 0x706E666F, 0x6D74756C, 0x706A7376,
+ 0x71726970, 0x6B70706A, 0x766D7374, 0x73746B75,
+ 0x6A73746B, 0x786F7273, 0x73746B77, 0x6E707168,
+ 0x776E7677, 0x73746B76, 0x7175766D, 0x7973797A,
+ 0x79797379, 0x73787872, 0x78727979, 0x76787278,
+ 0x74767872, 0x7B72767A, 0x76797078, 0x70787970,
+ 0x78727879, 0x77777178, 0x787A7B72, 0x756C8081,
+ 0x75766D74, 0x72767872, 0x746E7478, 0x76787272,
+ 0x72747670, 0x77737678, 0x76777376, 0x737A7B77,
+ 0x77737877, 0x7877737A, 0x77797A78, 0x79777679,
+ 0x78797778, 0x005E5F5B, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x20202000,
+ 0x4B4D4B4A, 0x4B4A504C, 0x4F4B4A4F, 0x545D5A55,
+ 0x5A565A5A, 0x5B5A565D, 0x5B5E5F5B, 0x2F2E5E5F,
+ 0x312F2E31, 0x2D2D2E2C, 0x00012E2F, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x01010001, 0x02000003, 0x28040100,
+ 0x56522F2C, 0x55565257, 0x28565753, 0x00002B2C,
+ 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00010000, 0x00000100, 0x00000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x1C1C1C00,
+ 0x51505351, 0x534F5053, 0x52534F52, 0x4B4C504B,
+ 0x4D474C50, 0x4A4B474B, 0x42434644, 0x3F3F4144,
+ 0x3F3F3F3F, 0x3D3A3C3C, 0x37373B3D, 0x37383637,
+ 0x32353934, 0x38333438, 0x35393434, 0x30333732,
+ 0x342F3135, 0x30342F30, 0x32333732, 0x342F3337,
+ 0x30342F30, 0x3130342F, 0x35333236, 0x30333132,
+ 0x33303331, 0x35333235, 0x32353334, 0x2F2F3230,
+ 0x332F3034, 0x32332F32, 0x6E464743, 0x746F6F73,
+ 0x70746F70, 0x72717772, 0x77727177, 0x4D534E71,
+ 0x001E211F, 0x00000102, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000301, 0x312D0004, 0x8D8C8830, 0x79827F7A,
+ 0x7B768381, 0x7D7D777E, 0x757E7E78, 0x81787D7E,
+ 0x80817880, 0x7A7D7F79, 0x7F797E80, 0x7D80777D,
+ 0x797D7E75, 0x857C8182, 0x807E7684, 0x757E7C74,
+ 0x7D757F7D, 0x8280787F, 0x7F83807B, 0x817B8784,
+ 0x7E7E7881, 0x797E7E78, 0x7F797F7F, 0x7D7D777F,
+ 0x787F8077, 0x82798081, 0x7F807781, 0x78808178,
+ 0x7B728081, 0x7879707A, 0x757B7C73, 0x7C737D7E,
+ 0x8081787B, 0x737D7E75, 0x7C73797C, 0x7A7D747B,
+ 0x717A7D74, 0x7A74757A, 0x76787276, 0x6D787872,
+ 0x766D7373, 0x75766D75, 0x7070736A, 0x6D657879,
+ 0x6F6D656F, 0x606C6B61, 0x63596B6A, 0x64645864,
+ 0x59626458, 0x5A4E6365, 0x5553485A, 0x40484940,
+ 0x49404649, 0x53564D46, 0x7463645B, 0x7F767D7E,
+ 0x97988F7E, 0xA1959791, 0xB8B1A3A7, 0xB1B8B1B1,
+ 0xB2B4BCB2, 0xBCB2B4BC, 0xB4BCB2B4, 0xB3B6BEB4,
+ 0xBDB4B8BE, 0xB8BDB4B8, 0xB3B8BDB4, 0xBDB6B5BD,
+ 0xB6BDB6B6, 0xB8B7BDB8, 0xBDB8B7BD, 0xB6BDB8B6,
+ 0xB6B7BEB7, 0xBCB7B6BD, 0xB6BCB7B6, 0xB7B6BCB7,
+ 0xBDB8B6BC, 0xB7BDB8B7, 0xB9B7BAB8, 0xBAB8B8BB,
+ 0xB8BBB9B7, 0xBCBABDBB, 0xBDBBBBBE, 0xBABDBBBA,
+ 0xB7BABEB9, 0xBDBBB8BC, 0xBDC0BEB8, 0xBBBCBDB9,
+ 0xBDBBBCBD, 0xB6BBB9BA, 0xB9B6BBB9, 0xB9B6B6BB,
+ 0xB2B9B4B2, 0xB7B5B9B4, 0xB7B2B8BC, 0xB5B9B4B3,
+ 0xB4B7B8B4, 0xB8B2B7B8, 0xB0B4AFB4, 0xB1ADB2B0,
+ 0xB5B3AEB3, 0xB0B5B3B0, 0xB3AFB4B3, 0xB3B4AFB4,
+ 0xAFB4B3AF, 0xB2B5B8B6, 0xB6B1B3B7, 0xADB3AEB2,
+ 0xB3AEB4AF, 0xB7B0B2B8, 0xAFB6AFB0, 0xAFB0B4AF,
+ 0xB4AFB0B4, 0xAFB3AEB0, 0xADABB2AB, 0xB2ABADB4,
+ 0xABB2ABAB, 0xACADB1AC, 0xACA7ADB1, 0xADB1ACA8,
+ 0xA7B0B4AF, 0xAEA9A6AC, 0xA8AEA9A8, 0xA5A9B0A9,
+ 0xA49DA5AC, 0xA5ACA59D, 0xA4A3ABA4, 0xABA4A3AB,
+ 0xA4ABA4A3, 0xA09FA39E, 0x9893A1A5, 0xA0A49F94,
+ 0x999AA19A, 0x928B98A0, 0x7D847D8B, 0x77777B76,
+ 0x6664787C, 0x4E4E4E65, 0x38434343, 0x43433838,
+ 0x4D4E4C43, 0x57515550, 0x5C56595D, 0x686C6658,
+ 0x656E6F66, 0x6E656D6E, 0x6B6E656B, 0x666E6F66,
+ 0x7169706E, 0x73716974, 0x68707168, 0x746B6E71,
+ 0x72736A73, 0x6F73736D, 0x7A717575, 0x75766D79,
+ 0x6B76776E, 0x746B7374, 0x76776E73, 0x6C72736A,
+ 0x71687475, 0x73746B70, 0x6D727369, 0x79717677,
+ 0x7D7D777B, 0x747C7C76, 0x79737A7A, 0x7B7B7579,
+ 0x74787A74, 0x7E75787A, 0x787B727B, 0x70797A71,
+ 0x7A747879, 0x7B7B757A, 0x737B7C73, 0x766D7B7C,
+ 0x72756C75, 0x7373756F, 0x746E7677, 0x76787272,
+ 0x72767970, 0x75717678, 0x72736F74, 0x72767773,
+ 0x79747576, 0x7978747C, 0x78787977, 0x77777678,
+ 0x78787877, 0x003F403E, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010101, 0x00000101,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000001,
+ 0x00030100, 0x00000200, 0x04000004, 0x00020000,
+ 0x00000200, 0x00010002, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000200, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x02000001,
+ 0x00010001, 0x00000100, 0x00000102, 0x02000002,
+ 0x00000100, 0x00000001, 0x00000000, 0x00020000,
+ 0x01000302, 0x2B2D2700, 0x27292D27, 0x01002B2D,
+ 0x01020000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01010001,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00000000, 0x00000000, 0x52525200,
+ 0x4F505351, 0x544F4E54, 0x51555050, 0x4C4C504B,
+ 0x4C464D51, 0x4648424A, 0x3D3F403C, 0x3A384041,
+ 0x3A3B3939, 0x36343735, 0x38363538, 0x35383635,
+ 0x3030342F, 0x342F3135, 0x30342F30, 0x31303331,
+ 0x33313033, 0x30333130, 0x2F30342F, 0x342F3034,
+ 0x30342F30, 0x2F2F332E, 0x35303034, 0x30342F31,
+ 0x2F2E342F, 0x342F2E34, 0x30342F30, 0x2F30342F,
+ 0x342F2E34, 0x30342E30, 0x44313530, 0x736E4549,
+ 0x70746F6F, 0x75717772, 0x2D2B7277, 0x0609072A,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000301, 0x03000003, 0x605F5B02, 0x7B83807B,
+ 0x7C778380, 0x827F7A7F, 0x747D7D77, 0x81787C7D,
+ 0x80817880, 0x767D7F79, 0x7F797A7C, 0x7E807A7D,
+ 0x787F8279, 0x7F747E81, 0x7A7B717B, 0x78808178,
+ 0x81778081, 0x7D7E7580, 0x7B838179, 0x817B8380,
+ 0x7E7E7881, 0x787B7D77, 0x817B7C7E, 0x7D80777F,
+ 0x777D7E75, 0x7F777F80, 0x82807881, 0x74818278,
+ 0x7C737D7E, 0x7B7C737B, 0x757D7E75, 0x7D747D7E,
+ 0x7B7C737A, 0x757B7C73, 0x7E747D7E, 0x7B7C727F,
+ 0x71777A71, 0x7973777A, 0x79797377, 0x6D74746E,
+ 0x79707576, 0x75766D78, 0x6A74756C, 0x6D657273,
+ 0x6F6D656F, 0x606A6860, 0x6A606B6A, 0x6A695F6C,
+ 0x57626458, 0x5F535F63, 0x595B4F5D, 0x4C52554C,
+ 0x48425255, 0x48494046, 0x5A484940, 0x7E756263,
+ 0x7B7E757D, 0x8E888980, 0xA89F9497, 0xB1B9AFA3,
+ 0xB7B4BCB2, 0xBBB4B9C1, 0xB4BCB2B4, 0xB2B6BBB2,
+ 0xBEB5B8BB, 0xB7BCB3BB, 0xB4B8BDB4, 0xBDB4B8BD,
+ 0xB7BBB5B8, 0xB9B7BDB8, 0xBDB8B8BE, 0xB6BCB7B7,
+ 0xB7B7BDB8, 0xBDB8B6BC, 0xB6BCB7B7, 0xB9B7BDB8,
+ 0xBCB7B8BE, 0xB7BDB8B6, 0xB9BABDBB, 0xBBB9B8BB,
+ 0xBABBB9BA, 0xBBB8BBB9, 0xC0BEBABD, 0xB8BDBBBB,
+ 0xB7B8BCB7, 0xBFBDB8BC, 0xBCBFBDBC, 0xBBBCBDBB,
+ 0xBCBABCBD, 0xB8BCB7B9, 0xB7B3B9B4, 0xB3B0B4B9,
+ 0xB1B8B5AC, 0xB4B5B9B4, 0xB6B4B5B9, 0xB5B8B6B3,
+ 0xB4B6B7B3, 0xB7B2B7B8, 0xB0B4AFB3, 0xB6B3B8B6,
+ 0xB7B6B1B7, 0xB1B7B6B1, 0xB5B2B9B6, 0xB4B3B1B8,
+ 0xABB0AFAE, 0xB0B3B7B2, 0xB2ADB1B5, 0xADB3AEAC,
+ 0xB1B0B7B0, 0xB9B2B0B8, 0xB0B7B0B2, 0xAFAEB4AF,
+ 0xB3AEAEB4, 0xADB1ACAF, 0xAEA9B0A9, 0xB2ABADB5,
+ 0xABB2ABAB, 0xB0ADB1AC, 0xAFAAB1B5, 0xABAFAAAB,
+ 0xA7ADB1AC, 0xACA7A8AC, 0xA8ACA7A8, 0xA5A6ADA6,
+ 0xA9A2A5AC, 0xA4ACA5A1, 0x9EA3ABA4, 0xA59E9DA5,
+ 0x9EA59E9D, 0x9FA0A49F, 0x9892A2A3, 0x94989294,
+ 0x8B8A918A, 0x837E8B92, 0x7F837E7F, 0x63626661,
+ 0x4D4D6265, 0x3838384D, 0x42393939, 0x4E4E4242,
+ 0x5757574E, 0x5F595C5A, 0x635E6064, 0x696D675F,
+ 0x60686960, 0x6C636869, 0x7172696B, 0x6B737169,
+ 0x706B7370, 0x726F6A74, 0x6D787872, 0x756D7373,
+ 0x73746B77, 0x6E70706A, 0x736A7474, 0x77766C72,
+ 0x6A73746A, 0x73697374, 0x76756B74, 0x6C73746A,
+ 0x746A7576, 0x73746A73, 0x6D75796E, 0x776D7478,
+ 0x76776E76, 0x757A7A74, 0x7872797B, 0x79797378,
+ 0x707A7B72, 0x786F7679, 0x7A7D7475, 0x71787B72,
+ 0x7A74777A, 0x787A7478, 0x727B7C73, 0x71687B7C,
+ 0x73766D6E, 0x6E71736D, 0x756F7274, 0x74787273,
+ 0x6E72746E, 0x736F7274, 0x73747072, 0x72767872,
+ 0x79757678, 0x7877737C, 0x78787977, 0x78787878,
+ 0x6260607A, 0x0022201F, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010003, 0x00000100,
+ 0x01000001, 0x2C2D2B00, 0x2E2A2F2D, 0x302E2B30,
+ 0x2C302B2B, 0x2D2C302B, 0x2F2D2C2F, 0x2C2F2D2C,
+ 0x2F2E3331, 0x33312E34, 0x2E33312E, 0x2C2C2F2D,
+ 0x312C2D31, 0x2D312C2D, 0x2C30322C, 0x322C3032,
+ 0x30322C30, 0x2A2E302A, 0x2F2B2E30, 0x2F302C2E,
+ 0x292C2D29, 0x2E2A2C2D, 0x2B2C282D, 0x262B2D27,
+ 0x2D272A2C, 0x2B2D272B, 0x252A2C26, 0x2C262B2E,
+ 0x2B2D272A, 0x272A2C26, 0x2B272D2D, 0x2C2B272C,
+ 0x272C2B27, 0x2B272C2B, 0x2D2C282C, 0x28282925,
+ 0x2A28292A, 0x272A2827, 0x29282B29, 0x2B29282B,
+ 0x282C2728, 0x272A2B27, 0x2B272A2B, 0x2C2B272C,
+ 0x2B2C2D2B, 0x2D2B2C2D, 0x2A2D2B2A, 0x292A2D2B,
+ 0x2E292A2E, 0x2A2E292A, 0x2C2D312C, 0x01002D31,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00010101, 0x01010000, 0x51515101,
+ 0x4F505351, 0x53515054, 0x4F534E50, 0x4F505351,
+ 0x4F4B5054, 0x4647434E, 0x373A3B37, 0x3B393A3B,
+ 0x3A3B393A, 0x36363937, 0x38363538, 0x35383635,
+ 0x32303331, 0x37323337, 0x33363433, 0x34333634,
+ 0x36343336, 0x30333133, 0x2E303331, 0x33312F33,
+ 0x30342F30, 0x2F30342F, 0x332E3034, 0x30342F2F,
+ 0x2F313530, 0x33313034, 0x30342F30, 0x2F303331,
+ 0x342F3034, 0x30342F30, 0x2F2F332E, 0x5F5A3034,
+ 0x70746F5B, 0x064F5250, 0x08080508, 0x08080808,
+ 0x00000000, 0x00000000, 0x01010100, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000202, 0x03010002, 0x30312D02, 0x7283807C,
+ 0x7B767A77, 0x83807B7E, 0x767E7E78, 0x7F767C7C,
+ 0x8081787E, 0x7780807A, 0x7C767B7D, 0x7C7E787A,
+ 0x757C7F76, 0x7C717B7E, 0x777B7078, 0x737B7C73,
+ 0x7D727B7C, 0x7D7E7479, 0x79818279, 0x7F768381,
+ 0x7E7E787E, 0x777D7F79, 0x8178797D, 0x8182797E,
+ 0x77808178, 0x7E79817F, 0x82807881, 0x757F7D75,
+ 0x7B737F7D, 0x7D7E757D, 0x757B7C73, 0x81787D7E,
+ 0x7D7E757E, 0x7377786F, 0x7C727D7B, 0x78796F7D,
+ 0x74797A71, 0x7B757A7D, 0x7B7B757B, 0x70787872,
+ 0x756F7879, 0x75766D75, 0x716D6E65, 0x736B797A,
+ 0x75736B75, 0x68727068, 0x6A607270, 0x6B6A606B,
+ 0x58626458, 0x64586064, 0x5D5E5462, 0x4C606459,
+ 0x49405255, 0x48494046, 0x40484940, 0x655C4849,
+ 0x7B7E7562, 0x80888980, 0x978E8689, 0xA3A89F94,
+ 0xB2ACB1A8, 0xC0B7B4BC, 0xB5BAB1BB, 0xB3B8BBB2,
+ 0xBDB4B9BC, 0xBABDB4BA, 0xB4B8BDB4, 0xBDB4B8BD,
+ 0xB8BDB4B8, 0xB7B9BDB7, 0xBDB7B7BE, 0xB6BDB6B9,
+ 0xB7B7BEB7, 0xBEB7B7BE, 0xB7BDB8B7, 0xB8B7BDB8,
+ 0xBCB7B7BD, 0xB7BDB8B6, 0xB9B8BCB7, 0xBCBAB8BB,
+ 0xBBBCBABB, 0xB9B8BBB9, 0xBDBBB8BB, 0xB6BCB7B8,
+ 0xB9B8BCB7, 0xBFBDBABE, 0xBABDBBBC, 0xB9BABDBB,
+ 0xBCB7BABE, 0xB8BCB7B8, 0xB4B3B9B4, 0xB6B4B3B9,
+ 0xB3B8B6B1, 0xB5B5B9B4, 0xB5B3B6BA, 0xB5B8B6B2,
+ 0xB4B7B8B4, 0xB7B2B7B8, 0xB3B7B2B3, 0xB6B3B8B6,
+ 0xB7B6B1B7, 0xB2B9B6B1, 0xB6B2B9B6, 0xB8B7B2B9,
+ 0xA9AFAEB2, 0xB1ADB3AE, 0xB4AFB0B6, 0xB0B6B1AE,
+ 0xB1B0B8B1, 0xB7B0B0B8, 0xB0B7B0B0, 0xABAFB6AF,
+ 0xB4AFABB2, 0xB0B4AEB0, 0xABAAB1AA, 0xB5AEAAB2,
+ 0xA9B0A9AE, 0xAFADB1AC, 0xAFAAB0B4, 0xABAFAAAB,
+ 0xACABAFAA, 0xAFAAADB1, 0xA6ACA7AB, 0xA9A9B0A9,
+ 0xAAA3A9B0, 0xA6ADA6A3, 0x9998A099, 0xA09998A0,
+ 0x99A09998, 0x92939791, 0x807A9698, 0x7C807A7C,
+ 0x7D7F837D, 0x746F7D84, 0x70746F70, 0x4B626661,
+ 0x37374C50, 0x38383837, 0x4D414343, 0x58584B4D,
+ 0x56595758, 0x5F606361, 0x65606064, 0x6A6C6661,
+ 0x686D6E65, 0x70677071, 0x7071686F, 0x6F73706B,
+ 0x746F7774, 0x77746F77, 0x6B74746E, 0x756D7374,
+ 0x75736B77, 0x6B70706A, 0x72697374, 0x70716771,
+ 0x7173746A, 0x7C727A7B, 0x7B7A707D, 0x7273746A,
+ 0x7A707B7C, 0x76776D79, 0x6D76776D, 0x776E7677,
+ 0x72736A76, 0x727B7B75, 0x79737878, 0x7B7B7579,
+ 0x707A7B72, 0x79707879, 0x7A7D7476, 0x707B7E75,
+ 0x78727679, 0x76797076, 0x737C7D74, 0x776E7B7C,
+ 0x6E716876, 0x6A74746E, 0x706A6E70, 0x7678726E,
+ 0x72767872, 0x746E7878, 0x73756F72, 0x757A7C76,
+ 0x77737879, 0x78777378, 0x78787878, 0x77797878,
+ 0x3533337A, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x01000000, 0x84878500, 0x8A8A8F8D, 0x908B898F,
+ 0x898F8A8A, 0x86888C87, 0x8C87878B, 0x868C8788,
+ 0x91919891, 0x98919098, 0x91989191, 0x8A8A908B,
+ 0x9089898F, 0x8B8F8989, 0x8B8E938A, 0x938A8F94,
+ 0x8E938A8E, 0x82888B82, 0x8A84888B, 0x888A8488,
+ 0x82868882, 0x88828688, 0x87898386, 0x7A80837A,
+ 0x837D7E83, 0x7E827C81, 0x7A80837A, 0x837A7E83,
+ 0x7F827980, 0x7A7E8178, 0x817B7E80, 0x7E807A7F,
+ 0x7A80807A, 0x807A7E80, 0x7E807A80, 0x767A7C76,
+ 0x7B777A7C, 0x787C777A, 0x7A7B7F7A, 0x7F7A7B7F,
+ 0x7B7F7A7B, 0x7A7E807A, 0x807A7E80, 0x807F7B80,
+ 0x7F838480, 0x837F8283, 0x81858082, 0x82838782,
+ 0x87818488, 0x83878183, 0x8A8B8F89, 0x8F8A8B8F,
+ 0x2D302E8B, 0x00000100, 0x00000001, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x17171700,
+ 0x15161616, 0x16161617, 0x16171516, 0x10121212,
+ 0x13111112, 0x0C0D0B12, 0x0D0E0F0D, 0x0F0F0E0F,
+ 0x0D0D0D0F, 0x0A0C0C0C, 0x0B0B0A0A, 0x0B0C0A0B,
+ 0x0A0B0C0A, 0x0C0A0B0C, 0x0B0B0B0B, 0x0B0B0B0B,
+ 0x0B0B0B0B, 0x0B0B0B0B, 0x0A0C0C0C, 0x0B0B0B0C,
+ 0x0B0C0A0B, 0x09080B09, 0x0B09080B, 0x080B0908,
+ 0x0A0B0C0A, 0x0B0B0B0C, 0x0B0C0A0B, 0x0A0B0B0B,
+ 0x0C0A0B0C, 0x0B0C0A0B, 0x09090A08, 0x14120A0B,
+ 0x1A1B1913, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x05060200, 0x785A5753,
+ 0x7B78807B, 0x7F7C7880, 0x797E7D79, 0x7E787C7D,
+ 0x7D7D777E, 0x7880807A, 0x7B758081, 0x7B7B757B,
+ 0x757D7E75, 0x7E757D7E, 0x7B7C737D, 0x737D7E75,
+ 0x7E757B7C, 0x8081787D, 0x757E7F75, 0x7F757E7F,
+ 0x8182797E, 0x757B7D77, 0x807A797B, 0x80807A80,
+ 0x777F7C77, 0x7C787F7C, 0x7F7C777F, 0x7784807B,
+ 0x7C77807C, 0x7F7C7780, 0x757E7F76, 0x7F757E7F,
+ 0x7E7F757E, 0x6F78796F, 0x7C737879, 0x7B7C737B,
+ 0x73797973, 0x786F7979, 0x78787277, 0x72767872,
+ 0x736F7678, 0x74746E74, 0x6D73746B, 0x746B7576,
+ 0x73746B73, 0x69737169, 0x6F657371, 0x6A6B616E,
+ 0x5A686C61, 0x645A6165, 0x60615763, 0x4E5B5F54,
+ 0x54495559, 0x50534A50, 0x40484940, 0x49404849,
+ 0x62635A48, 0x73777973, 0x908A7779, 0x8E908A8E,
+ 0x989EA09A, 0xB3AA9CA1, 0xB0B4A9B0, 0xB1B9BDB2,
+ 0xBCB1B8BC, 0xB9BDB2B8, 0xB2B8BBB2, 0xBBB2B8BB,
+ 0xB8BBB2B8, 0xB3B9BCB3, 0xBCB3B7BC, 0xB7BCB3B9,
+ 0xB3B7BCB3, 0xBCB3B7BC, 0xB7BBB5B7, 0xABB8BCB7,
+ 0xAFAAAAAD, 0xB6BCB7A9, 0xB7B8BCB7, 0xBDBBB8BC,
+ 0xBABDBBBA, 0xBBBABDBB, 0xBBB6BABD, 0xB8BCB7B7,
+ 0xB9B9BFBA, 0xBFBAB9C0, 0xBBBFBABB, 0xB7BABEB9,
+ 0xBCB7B8BC, 0xB9BCBAB8, 0xB1B6BCB7, 0xB7B2B0B6,
+ 0xB5B9B4B3, 0xB4B5B9B4, 0xB7B2B5B9, 0xB5B6B2B3,
+ 0xB4B3B7B2, 0xB8B4B5B9, 0xB3B7B2B7, 0xB5B0B5B3,
+ 0xB5B3B1B8, 0xB2B7B5B0, 0xB5B1B6B4, 0xB5B6B1B6,
+ 0xAAB0AFB0, 0xB5ADB3B2, 0xB4AFB1B8, 0xAEB5AEAE,
+ 0xB0B0B8B1, 0xB7B0AFB7, 0xB0B7B0B0, 0xA9B0B4AE,
+ 0xB5AFADB2, 0xB0B4AEB3, 0xA9ABB2AB, 0xB3ACA8B0,
+ 0xA9B0A9AC, 0xADABB2AB, 0xB2ABADB4, 0xAAB1AAAB,
+ 0xA8A9B0A9, 0xB3AEA8AF, 0xA9AFAAAD, 0xA8A9B0A9,
+ 0xA89FAAB2, 0x9CA09AA3, 0xA2A1A8A1, 0x9F98A0A7,
+ 0x989F9898, 0x7C8E928C, 0x726C8082, 0x7D817B70,
+ 0x6F70746F, 0x645F7074, 0x60645F60, 0x37444842,
+ 0x3B37383C, 0x4647453A, 0x554E514F, 0x5D5B5457,
+ 0x60645F5A, 0x6360645F, 0x68626468, 0x66696064,
+ 0x66686960, 0x706A6E6F, 0x70706A70, 0x6D73746B,
+ 0x79707576, 0x74756C78, 0x6E76776E, 0x726A7677,
+ 0x78776D74, 0x6F787970, 0x746B7778, 0x72756C73,
+ 0x6D74776E, 0x79707376, 0x78797078, 0x6F77786F,
+ 0x776F7778, 0x7D7B7379, 0x6D79776F, 0x736E7775,
+ 0x77746F76, 0x72797671, 0x79707878, 0x7A7B7278,
+ 0x757B7C73, 0x7E757D7E, 0x7B7C737D, 0x73808178,
+ 0x766D7B7C, 0x70716875, 0x6D76746C, 0x746C7775,
+ 0x73746B76, 0x6C72746E, 0x716D6F70, 0x70726C70,
+ 0x7076736E, 0x79707A78, 0x777A7178, 0x73787975,
+ 0x79757677, 0x7877737A, 0x79787878, 0x50557877,
+ 0x08040954, 0x00020000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x6D6E6C00, 0x8F90948F, 0x948F9094,
+ 0x90948E90, 0x77798079, 0x877D7981, 0x858D837F,
+ 0x86889086, 0x8F868890, 0x81897F8A, 0x81818881,
+ 0x8B848088, 0x868D8683, 0x84848B84, 0x8881848B,
+ 0x81888181, 0x777B8077, 0x81787D80, 0x82857C7E,
+ 0x7B80857C, 0x847E7F84, 0x80847E80, 0x7A7F847B,
+ 0x80777D85, 0x7981777B, 0x777B8077, 0x7F797981,
+ 0x7B7F797B, 0x76787C76, 0x7C77787C, 0x787C7778,
+ 0x777A7B77, 0x7B77787C, 0x7A7C767A, 0x71767872,
+ 0x7872777A, 0x76787276, 0x767B7C78, 0x7C77797A,
+ 0x787C7778, 0x77787C77, 0x7C77787C, 0x787C7778,
+ 0x7A7E807A, 0x807A8080, 0x7D7F7980, 0x787D7F79,
+ 0x81787C81, 0x80857C7C, 0x89858A81, 0x9F988D92,
+ 0x9AA09B98, 0x00383935, 0x04000504, 0x07040007,
+ 0x00020000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00010000, 0x790F0C08,
+ 0x7A77817C, 0x807D797F, 0x767C7B77, 0x7D79797A,
+ 0x7C7C767E, 0x757D7B73, 0x807A7F7D, 0x81817B80,
+ 0x76808178, 0x7E757E7F, 0x7D7E757D, 0x757B7C73,
+ 0x81787D7E, 0x80817880, 0x75818278, 0x7F757E7F,
+ 0x7E7F767E, 0x7A7D7E75, 0x7B757E80, 0x7B7B757B,
+ 0x7E7F7C78, 0x7C788681, 0x807D797F, 0x77807C77,
+ 0x807D807C, 0x7F7C7785, 0x74817F77, 0x83797D7E,
+ 0x797A7082, 0x7578796F, 0x81787D7E, 0x7D7E7580,
+ 0x72797973, 0x79707878, 0x79797378, 0x73767872,
+ 0x77737677, 0x74746E78, 0x6D72726C, 0x756C7576,
+ 0x70716874, 0x69716F67, 0x72697371, 0x6C706571,
+ 0x5A686C61, 0x645B6165, 0x63645A63, 0x53616559,
+ 0x584D5B5F, 0x565A4F52, 0x41505148, 0x4940494A,
+ 0x48494048, 0x7461635D, 0x79737778, 0x76787279,
+ 0x888C8E88, 0xA1988C8E, 0xB0B3AA9E, 0xB1B8BBB2,
+ 0xBCB1B8BC, 0xB8BCB1B8, 0xB0B6BAAF, 0xB9B0B6B9,
+ 0xB8BBB2B6, 0xB2B8BCB1, 0xBDB2B9BD, 0xB9BDB2B9,
+ 0xB2B7BDB2, 0xBCB3B7BD, 0xB9BBB5B9, 0xB3B7BBB6,
+ 0xB2ADB4B8, 0xB1B7B2AC, 0xB7BABEB9, 0xBDBBB8BC,
+ 0xBABDBBBA, 0xBBBCBFBD, 0xBCB7BABD, 0xB9BDB8B8,
+ 0xB9B9BFBA, 0xBFBAB9C0, 0xBBBFBABB, 0xB7B6BDB6,
+ 0xBBB9B6BC, 0xB8BBB9B8, 0xAFB4BAB5, 0xB8B4B0B4,
+ 0xB7B8B4B7, 0xB4B5B9B4, 0xB4AFB5B9, 0xB2B3AFB0,
+ 0xB3B5B9B4, 0xB7B3B4B8, 0xB3B7B2B6, 0xB6B0B5B3,
+ 0xB2B0B2B9, 0xB0B5B3AD, 0xB5B3B5B5, 0xB5B6B1B6,
+ 0xAAAFB0B1, 0xAFA5ADAC, 0xB4AFAAB0, 0xAFB3ADAE,
+ 0xB2B1B8B1, 0xB7B0B1B9, 0xB0B7B0B0, 0xACB3B8AF,
+ 0xB5ACB0B5, 0xB1B6ADB2, 0xABADB4AD, 0xB5AEABB2,
+ 0xABB2ABAE, 0xADA9B0A9, 0xB5AEADB4, 0xA9B0A9AE,
+ 0xA9A8B0A9, 0xAFA8A8B0, 0xA7AFA8A7, 0xA7AAB1AA,
+ 0xB0A7A9B1, 0xA3A89FAD, 0xA2A1A8A1, 0x9F98A1A7,
+ 0x8F968F98, 0x7990938A, 0x827C7F82, 0x81827E80,
+ 0x5F70746F, 0x544F6064, 0x40443F50, 0x36373B35,
+ 0x46423A3C, 0x50514D45, 0x5B545755, 0x645F5A5D,
+ 0x60645F60, 0x6160645F, 0x6C666367, 0x6F72696A,
+ 0x656B6C63, 0x706A6D6E, 0x70706A70, 0x6B73746B,
+ 0x776E7374, 0x75766D76, 0x7172736A, 0x766C797A,
+ 0x78776D77, 0x6E72736A, 0x766D7677, 0x71746B73,
+ 0x6A6E7168, 0x79707073, 0x78797078, 0x70787970,
+ 0x776F7879, 0x76746C79, 0x707B7772, 0x746F7975,
+ 0x77746F77, 0x6F77746F, 0x786F7774, 0x77786F77,
+ 0x7077786F, 0x7C737879, 0x7B7C737B, 0x6D7B7C73,
+ 0x756C7576, 0x76776E74, 0x6E76736E, 0x746C7673,
+ 0x75766D76, 0x6F72736F, 0x716D7074, 0x706F6B70,
+ 0x696F6C67, 0x79717471, 0x797A717B, 0x75767773,
+ 0x77737677, 0x78777378, 0x78787977, 0x2A2F7878,
+ 0x0804092E, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x01000000, 0x00010000, 0x90909391, 0x948F9195,
+ 0x8F938D90, 0x8381867D, 0x8D82888E, 0x878D8287,
+ 0x82858D82, 0x8D82858D, 0x81897F87, 0x84838B84,
+ 0x9089838B, 0x858D8688, 0x80848B84, 0x8D868087,
+ 0x81888185, 0x7D80857C, 0x857C8186, 0x80857C82,
+ 0x7E82877E, 0x887F8287, 0x83887F83, 0x7D82887D,
+ 0x887D8088, 0x7D857A80, 0x7C81897F, 0x847B7E86,
+ 0x7D857B7F, 0x797D8279, 0x817B7D82, 0x7D817C7D,
+ 0x7B7E7F7B, 0x7E7A7C80, 0x787C767D, 0x7580837A,
+ 0x7A717B7E, 0x76797077, 0x7A7E807A, 0x7E7A7E80,
+ 0x7E807A7D, 0x75777B75, 0x7C77777B, 0x7D817C78,
+ 0x7A7E807A, 0x7F797E80, 0x83857F7D, 0x7C83867D,
+ 0x8C828085, 0x848C8184, 0x90868C81, 0xA19A9499,
+ 0x989F989A, 0x6BA1A29E, 0x0501706F, 0x05040008,
+ 0x00030100, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x02000002, 0x00020000, 0x00000000, 0x00000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000000, 0x530F0C08,
+ 0x7B785B56, 0x7F7C7880, 0x757B7B75, 0x7A767B7B,
+ 0x7B7B757B, 0x787A7B72, 0x7F768182, 0x8081787E,
+ 0x727B7E75, 0x7F76787B, 0x7F80777E, 0x737D7E75,
+ 0x7E757B7C, 0x8081787D, 0x79828078, 0x7E768381,
+ 0x7E7F7680, 0x787D7E75, 0x7F768081, 0x7F80777E,
+ 0x7786837E, 0x7C777F7C, 0x918E897F, 0x798C8A82,
+ 0x7C778381, 0x7F7C7780, 0x75807E76, 0x7E767E7F,
+ 0x807E7680, 0x757D7E75, 0x7D747D7E, 0x7B7C737C,
+ 0x737B7D77, 0x78727779, 0x76787278, 0x71737771,
+ 0x78747377, 0x74746E77, 0x6D6E706A, 0x79707376,
+ 0x73746B78, 0x6F77746F, 0x706B7774, 0x6D6E6573,
+ 0x60686C61, 0x675D686C, 0x63645A66, 0x59606458,
+ 0x5F546165, 0x5B5F545B, 0x46595A50, 0x52484F50,
+ 0x48494051, 0x474A4C46, 0x635D484C, 0x787A7461,
+ 0x877A7C76, 0x8E88898D, 0x9CA09A8A, 0xA8A3A7A1,
+ 0xBCB1ACB1, 0xB8BCB1B8, 0xB1B8BEB3, 0xBBB2B6BC,
+ 0xB6BBB2B6, 0xB2B8BCB1, 0xBCB3B9BD, 0xB9BCB3B9,
+ 0xB2B9BDB2, 0xBCB3B9BD, 0xB9BBB5B9, 0xB7B8BCB6,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB9BABEB9, 0xBDBBB8BB,
+ 0xBDC0BEBA, 0xBBBEBFBD, 0xBBB9BCBD, 0xB9BDB8B8,
+ 0xBAB9BFBA, 0xBFBAB9BF, 0xBCC0BBBB, 0xB8B7BDB8,
+ 0xBCBAB7BD, 0xB6BBB9B7, 0xB2B3B7B2, 0xB8B4B3B7,
+ 0xB7B8B4B7, 0xB2B5B9B4, 0xB5B0B3B7, 0xB3B7B2B1,
+ 0xB1B5B9B3, 0xB9B4B3B7, 0xB3B7B2B5, 0xB5B2B7B5,
+ 0xB8B5B1B8, 0xAFB6B3B1, 0xB8B1B6B5, 0xBAB9B4B9,
+ 0xAAB0AFB5, 0xACA5ADAD, 0xB3B1A5AD, 0xB0B4AFAE,
+ 0xB1B0B7B0, 0xB7B0B1B8, 0xB0B7B0B0, 0xAAB1B9AF,
+ 0xB3AAAEB3, 0xB2B5ACB0, 0xAAB0B4AE, 0xB4AFACB0,
+ 0xB0B4AFB0, 0xABACB0AA, 0xB4AFADB1, 0xABB2ABB0,
+ 0xAEA9B1AA, 0xB3ACADB5, 0xADB5AEAB, 0xA7A9B0A9,
+ 0xB1A8A9B1, 0xA5A89FAE, 0x989A9E98, 0x9590989F,
+ 0x8F968F8F, 0x7C81847B, 0x716D8082, 0x60615F70,
+ 0x4F60645F, 0x443F5054, 0x40443F3E, 0x43454944,
+ 0x514D4647, 0x5D5C5854, 0x5F62635F, 0x645F6064,
+ 0x60645F60, 0x626A6C66, 0x6D676668, 0x6D6F696B,
+ 0x656B6E65, 0x706A6B6E, 0x70706A70, 0x6E73746B,
+ 0x756C7677, 0x78797074, 0x747B7A70, 0x776D7F7E,
+ 0x72736976, 0x6B73746B, 0x796F7374, 0x75766C78,
+ 0x6D73746B, 0x766D7576, 0x77786F75, 0x7077786F,
+ 0x786F7879, 0x78797077, 0x7279776F, 0x78707C7A,
+ 0x79776F7A, 0x6D79776F, 0x776F7775, 0x7A787079,
+ 0x707A7870, 0x7B757A78, 0x7D7D777B, 0x737B7C73,
+ 0x746C7B7C, 0x77756D76, 0x727C7974, 0x7E767A77,
+ 0x797A7180, 0x6F70716D, 0x6F6B7074, 0x6D6C686E,
+ 0x65706D68, 0x746C706D, 0x78797076, 0x73767773,
+ 0x78747677, 0x78777379, 0x53787977, 0x03085353,
+ 0x07030807, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010101, 0x00000100, 0x01010101,
+ 0x00000101, 0x00000000, 0x91343636, 0x938E9093,
+ 0x90948E8F, 0x81888E83, 0x9589898D, 0x91958A91,
+ 0x858D9388, 0x8C83898E, 0x858D8387, 0x84848C85,
+ 0x9189818C, 0x86918986, 0x87888F8A, 0x8B84858C,
+ 0x838B8483, 0x84848B84, 0x8B82848B, 0x878C8386,
+ 0x81868C81, 0x8C81888C, 0x868C8188, 0x80868C81,
+ 0x8D80868D, 0x878E8186, 0x7C82887D, 0x887D8187,
+ 0x82887D84, 0x7B84887C, 0x887D8387, 0x84877E84,
+ 0x7E85857F, 0x847E8284, 0x82847E84, 0x737F847B,
+ 0x7E73777C, 0x7E837A78, 0x7C82857C, 0x847E8485,
+ 0x84857C84, 0x7E84887D, 0x877E8589, 0x82877E84,
+ 0x83848882, 0x87828488, 0x84888383, 0x82848B84,
+ 0x8B81848C, 0x8A928882, 0x908D9388, 0xA0999499,
+ 0x999F9A99, 0x9FA0A49F, 0xA39FA2A3, 0x383937A2,
+ 0x00000100, 0x00000001, 0x01010100, 0x00000000,
+ 0x00010000, 0x01000200, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x02000002, 0x00020000, 0x00000200, 0x00000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x02000000, 0x090F0B0A,
+ 0x7B78100D, 0x7F7C7780, 0x737A7772, 0x7A767979,
+ 0x7B7B757D, 0x757B7C73, 0x7E757D7E, 0x7B7C737D,
+ 0x757B7E75, 0x7E757B7E, 0x7B7C737D, 0x737B7C73,
+ 0x7E757B7C, 0x8081787D, 0x79818279, 0x81798182,
+ 0x7E7F7683, 0x757B7B75, 0x7D777D7E, 0x8081787D,
+ 0x7782827C, 0x7C777F7C, 0x9290887F, 0x7A8A8B82,
+ 0x7C778482, 0x7E7B767F, 0x767E7F76, 0x81797E7F,
+ 0x87857D83, 0x78808178, 0x7D748081, 0x7E7F767C,
+ 0x737A7D74, 0x78727779, 0x787A7478, 0x73797D77,
+ 0x6E6A7579, 0x74746E6D, 0x6C73756F, 0x79707275,
+ 0x75756F78, 0x6B787570, 0x6D687370, 0x71726970,
+ 0x606A6B61, 0x6B61686C, 0x6A6B616A, 0x57606458,
+ 0x64595F63, 0x60645960, 0x50595A50, 0x5147595A,
+ 0x50514750, 0x47494B45, 0x4B454B4D, 0x61635D49,
+ 0x767A7C76, 0x8E89787C, 0x8B8F8A8A, 0xA0979B95,
+ 0xA79EA4A6, 0xAEB2A7A4, 0xB7B8BEB3, 0xC0B7BBC0,
+ 0xB8BDB4BB, 0xB1BABEB3, 0xBCB1B8BC, 0xB8BCB1B8,
+ 0xB3B9BDB2, 0xBBB5B9BC, 0xB7BBB5B9, 0xB1B8BCB6,
+ 0xBCB6B3B7, 0xB8BCB7B8, 0xB8B8BCB7, 0xBDBBB7BA,
+ 0xBABDBBBA, 0xB9BABDBB, 0xBCBAB8BB, 0xBABEB9B9,
+ 0xBAB9BFBA, 0xBFBAB9BF, 0xBBBFBABB, 0xB8B7BDB8,
+ 0xBCBAB7BD, 0xB6BBB9B7, 0xB4B3B7B2, 0xB8B4B5B9,
+ 0xB5B6B2B7, 0xB2B3B7B2, 0xB4AFB3B7, 0xB3B7B2B0,
+ 0xB1B5B9B3, 0xB3AEB3B7, 0xAFB3AEAF, 0xB3AFB4B2,
+ 0xB6B3AFB6, 0xB0B5B3AF, 0xB4B1B6B4, 0xB3B2B1B6,
+ 0xADB3B2AE, 0xAFA9B1B0, 0xB3B1A8B0, 0xB0B4AFAE,
+ 0xB0AFB5B0, 0xB7B0B0B7, 0xB1B8B1B0, 0xAAAEB5AE,
+ 0xB4ABAEB3, 0xB2B5ACB1, 0xABB0B4AE, 0xB3AEADB1,
+ 0xB0B4AFAF, 0xAAADB1AB, 0xB4AFACB0, 0xADB3AEB0,
+ 0xB0ADB5AE, 0xB8B1AFB7, 0xADB5AEB0, 0xA9B0B8B1,
+ 0xA9A0A9B0, 0xA4A9A0A4, 0x8F9A9F96, 0x8C879195,
+ 0x888C8788, 0x6C80827C, 0x615F7072, 0x60615F60,
+ 0x3F424341, 0x443F4044, 0x40443F40, 0x4D454642,
+ 0x5C585051, 0x5D5C585D, 0x5F62635F, 0x645F6064,
+ 0x62635F60, 0x666C6C66, 0x68626C6C, 0x66686266,
+ 0x68696C63, 0x6D676E71, 0x6F716B6B, 0x6C75766D,
+ 0x776E7475, 0x78797076, 0x707A796F, 0x776D7B7A,
+ 0x797A7076, 0x68787970, 0x756C7071, 0x74756C74,
+ 0x7075766D, 0x79707879, 0x797A7178, 0x7077786F,
+ 0x7A717879, 0x7A7B7279, 0x717A7870, 0x78707B79,
+ 0x79776F7A, 0x7277756D, 0x78707C7A, 0x79776F7A,
+ 0x737A7870, 0x7B757D7B, 0x7878727B, 0x7474756C,
+ 0x7C747C7D, 0x7D7B737E, 0x757F7C77, 0x79717F7D,
+ 0x797A717B, 0x6F71736D, 0x736F7074, 0x74736F72,
+ 0x6F726F6A, 0x736E7774, 0x71716B76, 0x6F777874,
+ 0x736F7273, 0x72736F72, 0x2C797A78, 0x05072C2C,
+ 0x08050708, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x62060808, 0x95906164,
+ 0x90948E91, 0x888D9388, 0x94889094, 0x90948990,
+ 0x8691948B, 0x8F868A8F, 0x898E858A, 0x86858D86,
+ 0x9089858D, 0x88908988, 0x88888F8A, 0x9089868D,
+ 0x88908988, 0x85848B84, 0x8F86878B, 0x868B828A,
+ 0x7D888C81, 0x867B8488, 0x888C8182, 0x80868C81,
+ 0x8B80868D, 0x868D8085, 0x81888C80, 0x8C80898D,
+ 0x888C8088, 0x81878B7F, 0x8C80898D, 0x888C818A,
+ 0x82868980, 0x88828688, 0x84888286, 0x7F82877E,
+ 0x8479828A, 0x83897E7C, 0x80868980, 0x89808689,
+ 0x86898088, 0x81888C81, 0x8C81868C, 0x868B8288,
+ 0x87818881, 0x8D88868C, 0x868C8789, 0x87889089,
+ 0x90898891, 0x89918788, 0x918D9289, 0xA099959A,
+ 0x989F9A98, 0x9E9EA59E, 0xA49FA0A4, 0xA0A49FA0,
+ 0x00464743, 0x01000001, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x01010101, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x01020000, 0x00020000,
+ 0x504C0200, 0x7A777253, 0x777F7C77, 0x7B787E7B,
+ 0x7F7C7880, 0x787B7B75, 0x7B757E7E, 0x7A7A747B,
+ 0x74797B75, 0x7A74787A, 0x7A7C7678, 0x707B7C73,
+ 0x7D747879, 0x8081787C, 0x7A7D7D77, 0x7F797E80,
+ 0x7D7F797F, 0x757B7C78, 0x7C78797B, 0x7B7D777B,
+ 0x747B7C73, 0x7E757C7D, 0x7D7E757D, 0x77828078,
+ 0x7D75817F, 0x7F7D757F, 0x797B7C73, 0x7C738182,
+ 0x8182797B, 0x757D7E75, 0x7D747D7E, 0x7B7C737C,
+ 0x70787970, 0x7D747879, 0x7B7C737C, 0x72767872,
+ 0x78727678, 0x76787276, 0x6E72746E, 0x756F7274,
+ 0x73736D73, 0x6A75756F, 0x706A7070, 0x6F706770,
+ 0x656F7066, 0x6F656E6F, 0x6A6B616E, 0x5C64685C,
+ 0x685D6269, 0x5F635864, 0x515B5D51, 0x5D515D5D,
+ 0x55574B5B, 0x40515249, 0x4A414849, 0x48484249,
+ 0x695B5B55, 0x82806C6D, 0x7F807C81, 0x927F817B,
+ 0x99909898, 0x96999098, 0xB6A6ABA2, 0xBCB6B8BC,
+ 0xB8BCB6B8, 0xAFB8BCB1, 0xBDB0B7BB, 0xB6BCB1B6,
+ 0xB4B8BEB3, 0xBAB4B8BD, 0xB6BAB4B6, 0xB2B6BBB2,
+ 0xBDB4B8BB, 0xB9BDB7B8, 0xB8B7BDB8, 0xBEB9B9BD,
+ 0xB9BDB8BA, 0xB7BABEB9, 0xBEB9B6BC, 0xB8BEB9B8,
+ 0xBABBBFBA, 0xBFBABBBF, 0xB9BDB8BB, 0xBCB9BCBA,
+ 0xBDBBBBBE, 0xB5BAB8B8, 0xB4B4B8B3, 0xB9B4B7B8,
+ 0xB4B8B3B5, 0xB2B6BAB5, 0xB4AFB3B7, 0xB5B9B4B0,
+ 0xB4B5B9B4, 0xB9B4B5B9, 0xB0B4AFB5, 0xB2AEB4AF,
+ 0xB7B2B1B7, 0xB3B7B2B1, 0xB1B1B5B0, 0xB2B0B2B6,
+ 0xADB4B1AD, 0xAFA7AFAE, 0xB5B2A8B0, 0xAFB5B0AE,
+ 0xB2B0B4AF, 0xB4AFB3B7, 0xB2B6B1B0, 0xAEB1B5B0,
+ 0xB4AEB0B4, 0xB5B7B1B2, 0xAFB3B7B2, 0xB3AEB0B4,
+ 0xAFB3AEAF, 0xAFAEB4AF, 0xB8B6AEB4, 0xB1B8B3B3,
+ 0xB1B1B9B2, 0xB8B1B0B8, 0xB0B8B1B0, 0xA19FA7A0,
+ 0xA99FA0A8, 0xA1A99FA0, 0x81868980, 0x88848587,
+ 0x6F706C87, 0x576A6A64, 0x4D495D5D, 0x3E3F3B4E,
+ 0x4040413F, 0x4B474142, 0x4C4B474C, 0x5750514F,
+ 0x5F5A5659, 0x6367625B, 0x64646863, 0x6D686569,
+ 0x67686469, 0x666C6C66, 0x66626C6C, 0x62645E65,
+ 0x64666960, 0x6D646A6D, 0x676C6368, 0x6B6E7168,
+ 0x756C7374, 0x78797074, 0x7074756C, 0x79707879,
+ 0x78797078, 0x6E747670, 0x746E7274, 0x76776E74,
+ 0x6D76776E, 0x766D7677, 0x78797075, 0x73787970,
+ 0x7C737B7C, 0x7879707B, 0x73787970, 0x7B737B7C,
+ 0x7A78707D, 0x6F77756D, 0x76717977, 0x77746F79,
+ 0x6E7A7870, 0x786F7876, 0x78797077, 0x757A7B72,
+ 0x7B737D7E, 0x7E7C747D, 0x75807E76, 0x7C747F7D,
+ 0x7B7C737E, 0x6E757771, 0x76707274, 0x7B7B7576,
+ 0x6D777672, 0x756F7373, 0x75777175, 0x7072736F,
+ 0x736F7374, 0x72736F72, 0x005F605E, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00010101,
+ 0x01000000, 0x00010000, 0x31000000, 0x96913033,
+ 0x92999290, 0x8D90988D, 0x988D9298, 0x90948992,
+ 0x8793968D, 0x938A8D90, 0x8C918890, 0x8A8B9087,
+ 0x968C8C94, 0x8C948A8E, 0x8989918A, 0x918A8890,
+ 0x89908989, 0x888C9188, 0x938A8E91, 0x8E918890,
+ 0x80888C81, 0x8C81858B, 0x90958C86, 0x8A8E938A,
+ 0x91878F95, 0x8A928789, 0x858A9085, 0x90858A90,
+ 0x888C818C, 0x858B9186, 0x8F868A90, 0x8A8F868C,
+ 0x89899089, 0x90898890, 0x89918789, 0x81889085,
+ 0x8B80848C, 0x8A908585, 0x89899187, 0x90898990,
+ 0x89908989, 0x87899187, 0x90878991, 0x8990898B,
+ 0x88899089, 0x928B878F, 0x8C938C8B, 0x8B889187,
+ 0x958B8C95, 0x8D958B8D, 0x8F90988E, 0xA39C9199,
+ 0x9BA39C9B, 0x9D9CA49A, 0xA49EA1A6, 0xA1A69DA0,
+ 0x6FA9ACA3, 0x110D7578, 0x11121010, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x28240200, 0x78787229, 0x787F7C78, 0x7C79807B,
+ 0x7F7C7881, 0x787C7975, 0x7E787E7E, 0x7B7B757E,
+ 0x74767872, 0x7B75787A, 0x777A7179, 0x70787970,
+ 0x7C737879, 0x7D7E757B, 0x797B7D77, 0x7E7A7D7F,
+ 0x7B7C787D, 0x787C7D79, 0x7F7A7B7C, 0x7D7F797B,
+ 0x77808178, 0x7E758081, 0x7B7C737D, 0x767D7E75,
+ 0x7E74807E, 0x8280787F, 0x75808178, 0x7C737D7E,
+ 0x7A7B727B, 0x777B7C72, 0x7E758081, 0x7777717D,
+ 0x74787970, 0x7C737C7D, 0x7879707B, 0x72797973,
+ 0x7B757678, 0x7A7C7679, 0x6E787A74, 0x78727274,
+ 0x73756F76, 0x6F75756F, 0x746B7575, 0x70716873,
+ 0x676E6F66, 0x6F666F70, 0x6A6B616E, 0x62686C61,
+ 0x685D696D, 0x61655A64, 0x58626359, 0x64586464,
+ 0x5B5D5162, 0x48505147, 0x51485051, 0x48494050,
+ 0x42484842, 0x5B574746, 0x6C6D695A, 0x7B81817B,
+ 0x98928181, 0x98989298, 0xA6969892, 0xABA5A8AC,
+ 0xBBBDB7A9, 0xB0B8BCB1, 0xBCB0B8BC, 0xB6BDB0B8,
+ 0xB2B6BCB1, 0xBAB4B6BB, 0xB3B7B1B6, 0xB2B7BCB3,
+ 0xBBB2B8BB, 0xB5BAB1B6, 0xB6B7BBB6, 0xBCB7B7BB,
+ 0xB9BDB8B8, 0xB8B9BDB8, 0xBFB8B7BD, 0xB7BEB7B8,
+ 0xBCBBBFBA, 0xBEB9BDC1, 0xBBBFBABA, 0xBABBBEBC,
+ 0xBFBAB9BC, 0xB2B6B1B9, 0xB4B5B6B2, 0xB4AFB7B8,
+ 0xB5B9B4B0, 0xB2B5B9B4, 0xB4AFB3B7, 0xB5B9B4B0,
+ 0xB4B5B9B4, 0xB7B2B5B9, 0xB0B4AFB3, 0xB5B1B7B2,
+ 0xB7B2B4BA, 0xB3B7B2B3, 0xB1B1B5B0, 0xB4AFB2B6,
+ 0xB0B7B4AE, 0xAEADB6B3, 0xB6B1A8B1, 0xADB3AEAF,
+ 0xAFB0B4AF, 0xB4AFB0B4, 0xB0B4AFB0, 0xB3B0B4AF,
+ 0xB3ADB4B8, 0xB4B8B2B1, 0xAFB5B9B4, 0xB4AFB0B4,
+ 0xB3B7B2B0, 0xB3B3B9B4, 0xB9B7B2B8, 0xB4BBB6B4,
+ 0xB2AFB7B0, 0xB8B1B1B9, 0xA5ACA5B1, 0x9FA0A8A1,
+ 0x948AA0A9, 0x8E938A8C, 0x6B878A81, 0x706C7171,
+ 0x5B5A5671, 0x484D4D47, 0x413B4E4E, 0x40403A41,
+ 0x4742413D, 0x55514C4B, 0x55545058, 0x5B555954,
+ 0x615C5A60, 0x6167625B, 0x62616762, 0x67626367,
+ 0x66676363, 0x666C6C66, 0x66626C6C, 0x6A6B6765,
+ 0x6A6A6C66, 0x746A6E73, 0x6E736A6C, 0x6D6E7168,
+ 0x746B7576, 0x72736A73, 0x6E72736A, 0x786F7677,
+ 0x777A7177, 0x6F777973, 0x78727175, 0x797A7176,
+ 0x6E76776D, 0x776E7778, 0x797A7176, 0x73787970,
+ 0x7C737B7C, 0x7879707B, 0x737A7B72, 0x7B737B7C,
+ 0x7A78707D, 0x7079776F, 0x79747A78, 0x7C79747C,
+ 0x6F79776F, 0x786F7977, 0x7A7B7277, 0x737C7D74,
+ 0x7B737B7C, 0x79776F7D, 0x737C7A72, 0x7C727D7B,
+ 0x7C7D747D, 0x70757771, 0x77717476, 0x77777177,
+ 0x72767773, 0x756F7576, 0x75777173, 0x6F72736F,
+ 0x746F7273, 0x70746F70, 0x003F403E, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00010000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x65600002,
+ 0x90979061, 0x8990988E, 0x988D8C94, 0x92988D92,
+ 0x8992958C, 0x91888F92, 0x92958C8E, 0x8C90958C,
+ 0x938A9095, 0x8C948A8E, 0x8C899089, 0x8F888B93,
+ 0x8A918A87, 0x878E9188, 0x91888F90, 0x90938A90,
+ 0x858A9085, 0x948B8A90, 0x8F948B8F, 0x8C90958C,
+ 0x958C9095, 0x8E938A90, 0x8A8A9085, 0x90859195,
+ 0x878B808C, 0x8A858B80, 0x938A8F95, 0x8F938D8E,
+ 0x898C938C, 0x938C8890, 0x8991878B, 0x81889085,
+ 0x9085848C, 0x8D958B8A, 0x8A8C948A, 0x90898A91,
+ 0x888F8889, 0x8C8B8F89, 0x938D8E92, 0x8B928B8F,
+ 0x8C8C938C, 0x968D8C93, 0x90958C91, 0x8F8D958B,
+ 0x978D9199, 0x90988E8F, 0x8F929A90, 0xA29B9099,
+ 0xA0A8A19A, 0x9D9FA79D, 0xA89FA1A6, 0x9EA39AA3,
+ 0xA2A7ABA0, 0x786FA9AD, 0x10110D75, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000100,
+ 0x01000001, 0x51504C00, 0x777E7B76, 0x74717F7C,
+ 0x78757179, 0x787D7A75, 0x7B757E7E, 0x7B7B757B,
+ 0x70787970, 0x7A717879, 0x797A7179, 0x727E7C74,
+ 0x7E757D7C, 0x8182797D, 0x787A7C76, 0x7C787B7C,
+ 0x7A7B777B, 0x797D7F79, 0x7E787D7F, 0x7B7D777C,
+ 0x78808178, 0x82798081, 0x7D7E7581, 0x747D7E75,
+ 0x7F767C7D, 0x7B7C737E, 0x787D7B73, 0x7C738280,
+ 0x7879707B, 0x747A796F, 0x7E757D7E, 0x7A7D747D,
+ 0x757E8178, 0x7C737D7E, 0x7879707B, 0x76797B75,
+ 0x7A747A7C, 0x77797378, 0x74787975, 0x77737579,
+ 0x71736D76, 0x6A71736D, 0x71687073, 0x73746B70,
+ 0x68737169, 0x6D68706D, 0x71716B70, 0x62707168,
+ 0x685D696D, 0x5F635864, 0x5E696A60, 0x63596768,
+ 0x5C5D5364, 0x51595A50, 0x5148585C, 0x50514850,
+ 0x424B4843, 0x47414848, 0x595B5545, 0x7B6C6C66,
+ 0x817B8181, 0x81817B81, 0x91888882, 0x9A91979A,
+ 0xABACA399, 0xA8AAABA1, 0xBCB0B0B4, 0xB8BCB0B8,
+ 0xB5B7BDB2, 0xBBB2B9BE, 0xB6BBB2B6, 0xB3B6BBB2,
+ 0xBDB4B7BC, 0xB9BEB5BA, 0xB5B7BBB6, 0xBBB9B6BA,
+ 0xB7BBB6B8, 0xB6B8BCB7, 0xBEB9B6BD, 0xB8BEB9B8,
+ 0xBCBBBEBC, 0xBFBBBBBE, 0xBEBFBBBE, 0xBABABEB9,
+ 0xBBB5BBBF, 0xB3B7B1B7, 0xB5B7B8B4, 0xB3B1B8B9,
+ 0xB1B2B0B2, 0xB3B5B9B4, 0xB7B1B4B8, 0xB2B6B1B3,
+ 0xB7B7B8B4, 0xB7B2B8B9, 0xB0B4AFB3, 0xB6B0B3B1,
+ 0xB8B4B5B8, 0xB2B6B1B7, 0xAEB2B6B0, 0xB6B1ADB3,
+ 0xB1B6B4B0, 0xB1ADB4B1, 0xB6B1AFB6, 0xAEB5AEAF,
+ 0xB2B0B4AF, 0xB4AFB3B7, 0xB3B7B2B0, 0xB2AEB4AF,
+ 0xB7B2B1B7, 0xB0B4AFB3, 0xB3B6BAB5, 0xB7B2B2B8,
+ 0xB7BBB6B3, 0xB5B7BBB5, 0xB8B3B5BC, 0xB2B8B3B2,
+ 0xB0B1B8B1, 0xADA4B0B7, 0xA9AEA5AA, 0x8BA1A99F,
+ 0x7D748D95, 0x7A7D7478, 0x556F716B, 0x5A56595B,
+ 0x42433F59, 0x3940403A, 0x3E394142, 0x40403A41,
+ 0x504C4C46, 0x544F5656, 0x60605A57, 0x61646862,
+ 0x68616068, 0x61686160, 0x61616861, 0x67626367,
+ 0x63676263, 0x6762635F, 0x66646A6B, 0x6A6B6765,
+ 0x6C646862, 0x78716E72, 0x71787171, 0x6B6D7067,
+ 0x746B7374, 0x76776E73, 0x6C777A71, 0x796F7275,
+ 0x767A6F78, 0x73767970, 0x7C73777C, 0x787C7179,
+ 0x6D76776D, 0x786E7677, 0x76776D77, 0x70787970,
+ 0x7C737879, 0x77786F7B, 0x72797A71, 0x7D747A7B,
+ 0x7D7E757C, 0x7079776F, 0x77727A78, 0x7976717A,
+ 0x6F7C7A72, 0x7A707A79, 0x7A7B7179, 0x7278796F,
+ 0x7E747B7C, 0x7B7C727D, 0x73787970, 0x7C737B7C,
+ 0x7879707B, 0x71747670, 0x79737577, 0x77777179,
+ 0x6F737470, 0x77717074, 0x73777173, 0x6F71736D,
+ 0x736E7273, 0x4E53516F, 0x00000100, 0x00000001,
+ 0x00000000, 0x00030101, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x01010100, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x02000000,
+ 0x93979200, 0x8D979C93, 0x998E9298, 0x94988D95,
+ 0x8A92958C, 0x908A8E90, 0x9597918E, 0x8C90958C,
+ 0x958A9095, 0x8C948A8F, 0x8C8C938C, 0x918A8B93,
+ 0x888F8889, 0x898C9188, 0x948B9094, 0x8F948B91,
+ 0x8B8C948A, 0x958B8D95, 0x9397918D, 0x90949990,
+ 0x9A919699, 0x92958C97, 0x8A92958C, 0x8F869293,
+ 0x8C8F868E, 0x8E889085, 0x968C9199, 0x8E938A8E,
+ 0x8C8F948B, 0x938A9095, 0x8D92898E, 0x868F948B,
+ 0x90868A8F, 0x8D958B88, 0x8A8C948A, 0x938A8E93,
+ 0x90958C8E, 0x8C91948B, 0x938D9295, 0x92948E91,
+ 0x8C91948B, 0x948B9295, 0x98999093, 0x9294988D,
+ 0x988D979D, 0x969B9292, 0x9691998F, 0xA39C959D,
+ 0x9EA9A19B, 0x9FA0A8A1, 0xA49BA1A9, 0x9FA49B9F,
+ 0xA1A8ACA1, 0xACA1A8AC, 0xA8ABA2A8, 0x00383A34,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x78686862, 0x7C78807D,
+ 0x7F7C787F, 0x737B7B75, 0x7B757B7C, 0x7A7A747B,
+ 0x72787970, 0x7A717B7C, 0x7C7D7479, 0x737C7A72,
+ 0x81787E7D, 0x80807A80, 0x7A7E7F7B, 0x7C787D7E,
+ 0x7B7C787B, 0x797B7D77, 0x817B7D7F, 0x7D7F797F,
+ 0x757D7E75, 0x7E757D7E, 0x7D7E757D, 0x79797C73,
+ 0x81787F82, 0x7D7E7580, 0x79828177, 0x7D778182,
+ 0x7878727D, 0x757D7E75, 0x7C737E7F, 0x797C737B,
+ 0x70797C73, 0x79707879, 0x7B7C7378, 0x757A7C76,
+ 0x7A74797B, 0x77797378, 0x6F747873, 0x736F7074,
+ 0x76777372, 0x6A73756F, 0x736D7070, 0x78787273,
+ 0x6B75756F, 0x706B7171, 0x71716B73, 0x5E707168,
+ 0x6D626667, 0x64685D69, 0x5F696A60, 0x63596869,
+ 0x62635962, 0x50626359, 0x5A50575B, 0x595A5159,
+ 0x42484940, 0x49404848, 0x46494048, 0x4E54544E,
+ 0x6B655454, 0x81817B6B, 0x80888882, 0x89808889,
+ 0x999A9188, 0x99A2A399, 0xACA0A2A3, 0xB1B5A9A8,
+ 0xB4B6BCB1, 0xBDB4B8BD, 0xBABDB4BA, 0xB4B8BDB4,
+ 0xBCB6B8BD, 0xBABCB6BA, 0xB8B9BDB7, 0xBDB8B9BD,
+ 0xB9BDB8B9, 0xB6B8BCB6, 0xBEB7B8BC, 0xB7BDB8B7,
+ 0xBABBBFBA, 0xBEBABBBF, 0xBBBFBABD, 0xB9BABEB9,
+ 0xBBB5BABE, 0xB8BCB6B7, 0xB7B9BAB6, 0xB3B1BABB,
+ 0xB0B3B1B2, 0xB2B3B7B2, 0xB7B1B1B7, 0xB5B9B3B3,
+ 0xB4B5B9B4, 0xB9B4B5B9, 0xB1B7B2B5, 0xB4B1B4B2,
+ 0xB5B1B5B9, 0xB0B4AEB4, 0xB0AFB6AF, 0xB5B0B0B7,
+ 0xB1B7B2AF, 0xAFB1B8B3, 0xB8B1ADB4, 0xB0B8B1B0,
+ 0xB4B2B8B3, 0xB6B1B5B9, 0xB6BCB7B2, 0xB4B3B9B4,
+ 0xB9B4B3B9, 0xB1B7B2B3, 0xB7B6BCB7, 0xB9B4B6BC,
+ 0xB7BDB8B3, 0xB5B7BBB5, 0xB4AFB5BC, 0xAEB4AFAE,
+ 0xA6B1B8B1, 0xA29CA6AD, 0x969892A0, 0x748E938A,
+ 0x6960787D, 0x66686266, 0x3F595B55, 0x433F4243,
+ 0x41423E42, 0x393E403A, 0x4F493F3F, 0x4E4E484F,
+ 0x5A565650, 0x605A6060, 0x5E605A60, 0x61626660,
+ 0x68616168, 0x61686161, 0x66686C66, 0x6964686C,
+ 0x666A6565, 0x63646863, 0x645F6468, 0x686C6760,
+ 0x6C6E726C, 0x78716E72, 0x73777171, 0x6B73766D,
+ 0x71687374, 0x73746B70, 0x7073766D, 0x7A707679,
+ 0x78796F79, 0x70767970, 0x7A6F7679, 0x777B7076,
+ 0x6976776D, 0x776D7273, 0x797A7076, 0x737B7C73,
+ 0x81787B7C, 0x7E7F7680, 0x6F787970, 0x7C737778,
+ 0x7879707B, 0x6F79776F, 0x776F7977, 0x77756D79,
+ 0x6F7A796F, 0x796F7A79, 0x797A7078, 0x747D7E74,
+ 0x7D737D7E, 0x7B7C727C, 0x73787970, 0x7C737B7C,
+ 0x7679707B, 0x6E72746E, 0x77717074, 0x78787277,
+ 0x6F737470, 0x77717273, 0x72746E75, 0x6F74746E,
+ 0x73717273, 0x0D100E70, 0x00000100, 0x00000102,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x30342F00, 0x8C969B92, 0x988D9197, 0x94988D92,
+ 0x8A8E9188, 0x948E8E90, 0x95988F92, 0x89949990,
+ 0x94898E94, 0x8E94898E, 0x8C8F978D, 0x938C8C93,
+ 0x8991878C, 0x898C9287, 0x968B9094, 0x93998E90,
+ 0x8F91998F, 0x958B9199, 0x8F948B8D, 0x8B969990,
+ 0x968B9296, 0x93978C92, 0x9092938A, 0x99909899,
+ 0x91948B98, 0x8D8E968B, 0x958B9098, 0x9499908D,
+ 0x90969A8F, 0x958C979B, 0x90958C92, 0x8C93988F,
+ 0x8F869095, 0x9499908A, 0x8B90958C, 0x968D9194,
+ 0x91958A93, 0x8F98998F, 0x99909899, 0x97988F98,
+ 0x8E969990, 0x98909599, 0x98998F9A, 0x909A9C90,
+ 0x9D92989C, 0x989C9199, 0x94989D94, 0xA39C969E,
+ 0xA0A8A19B, 0x9F9EA69F, 0xA89FA1A9, 0x9FA59AA3,
+ 0xA0A8ACA1, 0xADA1A7AB, 0xA8ACA0A9, 0x6CA8ABA2,
+ 0x01007072, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x01000000,
+ 0x00000101, 0x00000000, 0x01000001, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010100, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x77292A28, 0x7B777C7B,
+ 0x7C7B777C, 0x767A7C76, 0x76727A7C, 0x75756F77,
+ 0x73787970, 0x7B757B7C, 0x7A7B727B, 0x75787970,
+ 0x807A7D7E, 0x7D7D7780, 0x787D7E7A, 0x7E7A7B7C,
+ 0x7B7C787D, 0x777B7B75, 0x7B757D7D, 0x7B7B757B,
+ 0x797A7C76, 0x7D747D7F, 0x8182797C, 0x797C7F76,
+ 0x82797F82, 0x83817981, 0x797F8077, 0x7C768182,
+ 0x7A7C767A, 0x7B888980, 0x847B8485, 0x7D7E7583,
+ 0x6F787970, 0x7B757778, 0x7D7D777B, 0x727A7D74,
+ 0x78727678, 0x74787376, 0x71737674, 0x79747073,
+ 0x72736F75, 0x73787773, 0x77737A77, 0x7878727A,
+ 0x6D71736D, 0x716B7173, 0x71726971, 0x646C6D64,
+ 0x6C636B6F, 0x68695F6B, 0x5E66675D, 0x675D6768,
+ 0x62635966, 0x5563645B, 0x60555E5F, 0x585C515C,
+ 0x484E5148, 0x51485051, 0x50514850, 0x3A484940,
+ 0x49404243, 0x53554F46, 0x6D73736D, 0x89807373,
+ 0x88898088, 0x90969990, 0x998F9699, 0x979B9098,
+ 0xA1A4A9A0, 0xBCB1A5AA, 0xB9BCB3B8, 0xB6B8BCB6,
+ 0xBCB7B6BD, 0xB8BCB6B8, 0xB4B8BAB4, 0xBAB4B8BA,
+ 0xBEC0BAB8, 0xB5BABDB4, 0xBCB3BBBE, 0xB6BAB4B9,
+ 0xBAB8BCB6, 0xBFB9BCC0, 0xB8BCB6BB, 0xB9BABEB9,
+ 0xBBB5B8BE, 0xB7BBB5B7, 0xB7B8BCB7, 0xB8B3B8BC,
+ 0xB0B4AFB4, 0xB1B1B7B2, 0xB8B1AFB6, 0xB2B9B2B1,
+ 0xB1B1B8B1, 0xB8B1B1B8, 0xB0B8B1B0, 0xAFB3B9B4,
+ 0xB4AFAEB4, 0xB0B4AEB0, 0xB1B1B8B1, 0xB9B2B1B8,
+ 0xB5BCB5B2, 0xB1AFB7B0, 0xBDB6B0B8, 0xB4BCB5B5,
+ 0xB5B1B8B1, 0xBCB5B5BC, 0xB5BCB5B5, 0xB3B3BAB3,
+ 0xBFB8B2BA, 0xB2BAB3B7, 0xB8B8C0B9, 0xC1BAB7BF,
+ 0xB8C0B9B9, 0xA9A9B0A9, 0xB1AAA9B0, 0xA9B0A9AA,
+ 0x918F9790, 0x807B9198, 0x7E7F7B7C, 0x5B6C6D69,
+ 0x514D5E5F, 0x42433F50, 0x37434442, 0x38373839,
+ 0x4645413A, 0x504A4B47, 0x544F5155, 0x585C5750,
+ 0x6260645F, 0x68646566, 0x6A6C6667, 0x66686C66,
+ 0x6C66686C, 0x62645E6A, 0x65636761, 0x6B65656C,
+ 0x676B6567, 0x65686C67, 0x6661666A, 0x60676060,
+ 0x70686C66, 0x736A7479, 0x76797070, 0x7175766D,
+ 0x766D797A, 0x72736A75, 0x6D73746B, 0x746B7576,
+ 0x75766D73, 0x737B7C73, 0x7C737B7C, 0x7B7C737B,
+ 0x70787970, 0x7C737879, 0x7D7E757B, 0x707B7C73,
+ 0x7C737879, 0x7E7F767B, 0x737B7C73, 0x79707B7C,
+ 0x7B7C7378, 0x7177786F, 0x7A71797A, 0x76776D79,
+ 0x6F78796F, 0x7C737879, 0x7D7E757B, 0x757D7E75,
+ 0x7E757D7E, 0x7C7D747D, 0x727C7C76, 0x7A717878,
+ 0x777A7179, 0x6F757771, 0x736F7074, 0x78777374,
+ 0x707A7773, 0x74707774, 0x77747077, 0x70777470,
+ 0x27267774, 0x01010129, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x01020001,
+ 0x00000200, 0x00000000, 0x00000000, 0x01000000,
+ 0x00020000, 0x93676C63, 0x9F92989E, 0x989F9298,
+ 0x888E9287, 0x948B9091, 0x93948B93, 0x88909489,
+ 0x988B8E95, 0x8E948991, 0x8791948B, 0x948B8D90,
+ 0x8F958A8F, 0x8A93978C, 0x978B9296, 0x95998D93,
+ 0x8E93998E, 0x978C9399, 0x90948891, 0x8B93978B,
+ 0x9A8D9397, 0x91988B93, 0x8E969A8F, 0x998F9599,
+ 0x979B9098, 0x8F959B90, 0x9A8F949A, 0x95998E94,
+ 0x91969990, 0x998E979A, 0x969A8F95, 0x89969A8F,
+ 0x94899094, 0x95998E90, 0x8F969A8F, 0x998F9899,
+ 0x98998F98, 0x90989C91, 0x9C91989C, 0x989C9098,
+ 0x90989C90, 0x9B91989C, 0x9A9B919C, 0x909A9C90,
+ 0x9E92989C, 0x9CA0949C, 0x95969C91, 0xA59B98A0,
+ 0xA1A8A19D, 0x9C9FA79D, 0xA79C9FA7, 0xA0A499A1,
+ 0x9DA5A99E, 0xA99DA5A9, 0xA5A99DA5, 0xA1A9ADA1,
+ 0x7C73A8AC, 0x191A1679, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00010000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000000, 0x00000000, 0x51000000, 0x7B795253,
+ 0x7A7B777A, 0x74787975, 0x7874787A, 0x75747079,
+ 0x6F787872, 0x78727778, 0x78787278, 0x757B7C73,
+ 0x7D777D7E, 0x7B7B757D, 0x777B7D77, 0x7A767B7D,
+ 0x7B7D7779, 0x757D7D77, 0x7B767B7B, 0x7B7B757E,
+ 0x797A7C76, 0x81787D7F, 0x83847B80, 0x76818279,
+ 0x837A7E7F, 0x7C7A7282, 0x7B7B7C73, 0x7C768181,
+ 0x7A7C767A, 0x7481847B, 0x7E757D7E, 0x7879707D,
+ 0x73787970, 0x7B757B7C, 0x7D7D777B, 0x717B7E75,
+ 0x78737577, 0x70746F74, 0x75707371, 0x736E7477,
+ 0x72736F6F, 0x75787675, 0x77737A76, 0x74736F7A,
+ 0x6B6F716B, 0x71686F71, 0x72736A70, 0x676D6E65,
+ 0x6E657071, 0x6B6C626D, 0x5C6B6C62, 0x685D6566,
+ 0x60645964, 0x5B64655C, 0x655A6465, 0x585C5161,
+ 0x4D53564D, 0x51485356, 0x55564D50, 0x4047483F,
+ 0x49404849, 0x40433A48, 0x57484842, 0x746B5D5D,
+ 0x73746B73, 0x777E8178, 0x98927D80, 0x96999098,
+ 0x91949990, 0xABA0959A, 0xA5AAA1A5, 0xB6ADB1AB,
+ 0xBCB6B8BC, 0xB7BBB5B8, 0xB2BEC1B8, 0xBBB2B8BB,
+ 0xBABBB2BA, 0xB4BCBDB4, 0xBCB3BABD, 0xBABDB4B9,
+ 0xB3B6BBB2, 0xBDB4B7BC, 0xB9BDB7B8, 0xB9BABEB9,
+ 0xBBB6BABE, 0xB7BBB5B7, 0xB7B8BCB7, 0xB7B2B8BC,
+ 0xB4B8B3B3, 0xB4B5BBB6, 0xB9B2B2B9, 0xB5BCB5B1,
+ 0xB4B5BCB5, 0xBCB5B3BB, 0xB0B8B1B4, 0xB3ADB5AE,
+ 0xB8B2B3BA, 0xB6BDB6B4, 0xB1B5BCB5, 0xBAB4B1B8,
+ 0xB7BBB6B6, 0xB2B5BBB6, 0xBAB5B1B7, 0xB9BFBAB4,
+ 0xB5B5BCB5, 0xC0B9B5BC, 0xBAC1BAB9, 0xB9B8C0B9,
+ 0xC1BAB8C0, 0xB9C1BAB9, 0xBAB8C0B9, 0xC0B9B9C1,
+ 0xA8AFA8B8, 0xA9AAB1AA, 0x928CA9B0, 0x8F938D8E,
+ 0x7C7A817A, 0x67657B81, 0x67686664, 0x4D4F504E,
+ 0x443F5051, 0x40443F40, 0x42383937, 0x534F4543,
+ 0x52514D54, 0x5752534F, 0x645F585C, 0x5E645F5E,
+ 0x62636762, 0x67626367, 0x686C6663, 0x626A6C66,
+ 0x6C666668, 0x6A6C666C, 0x65636761, 0x6B65656C,
+ 0x696B6567, 0x666A6B67, 0x6861686C, 0x616A6061,
+ 0x6B63685F, 0x79706F74, 0x78797078, 0x7176776E,
+ 0x776E797A, 0x76776E76, 0x6B73746B, 0x746B7374,
+ 0x70716873, 0x6D75766D, 0x7C737576, 0x7C7D747B,
+ 0x73787970, 0x7B727B7C, 0x7E7F767A, 0x757D7E75,
+ 0x82797D7E, 0x7D7E7581, 0x74787970, 0x786F7C7D,
+ 0x78797077, 0x6A787970, 0x73697273, 0x76776D72,
+ 0x6F78796F, 0x79707879, 0x7C7D7478, 0x757C7D74,
+ 0x7C737D7E, 0x7B7C737B, 0x727B7B75, 0x7A717878,
+ 0x76797079, 0x70737470, 0x736F7175, 0x75747072,
+ 0x70777470, 0x73707873, 0x78757178, 0x73787370,
+ 0x00007874, 0x02000002, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x01000000, 0x00000101, 0x00010000,
+ 0x36000100, 0x01003538, 0x00000000, 0x01010101,
+ 0x00000200, 0x01010100, 0x00000000, 0x01000000,
+ 0x00020000, 0x93373B35, 0x9F92989E, 0x989F9298,
+ 0x8691958A, 0x91888F90, 0x93948A90, 0x8C909489,
+ 0x9A8D9299, 0x93978B93, 0x8B909187, 0x988D9394,
+ 0x91958A94, 0x8B909488, 0x998D9397, 0x93978B95,
+ 0x8893978B, 0x93879094, 0x95998D8F, 0x8E95998D,
+ 0x9D8E989D, 0x949B8C96, 0x90979B8F, 0x9C92979B,
+ 0x999D919B, 0x92979B90, 0x9D92989F, 0x979B9099,
+ 0x90979B90, 0x9B91979B, 0x999A909A, 0x8F94988D,
+ 0x9488969A, 0x989C9090, 0x92999A90, 0x9D939B9C,
+ 0x9B9C929C, 0x90999D91, 0x9C90989C, 0x999D9198,
+ 0x929B9F93, 0x9D939C9E, 0x9D9E949C, 0x93989C90,
+ 0xA1959B9F, 0x9CA0949F, 0x949AA194, 0xA69C999F,
+ 0xA1A8A19E, 0x9DA3ABA1, 0xA79CA0A8, 0xA3A79BA1,
+ 0xA0A4A89C, 0xACA0A8AC, 0xA9ADA1A8, 0xA0A8AD9E,
+ 0xADA2A8AC, 0xA8ABA2A9, 0x00393B35, 0x01000001,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000001, 0x00000100, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x02000002, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x01020000, 0x00020000, 0x01000200, 0x00010002,
+ 0x00000000, 0x02000000, 0x00010001, 0x00020000,
+ 0x00000200, 0x02000002, 0x01020000, 0x00000301,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x00020000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x00000001, 0x00000000, 0x01000001,
+ 0x00010000, 0x01000200, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01020001, 0x00000200, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x28000000, 0x7B79272A,
+ 0x7A7B777A, 0x76787975, 0x7574797A, 0x7C7B7777,
+ 0x737D7A75, 0x78727979, 0x77797378, 0x787D7E75,
+ 0x80778081, 0x8081787F, 0x787D8077, 0x807A7C81,
+ 0x7B7E757E, 0x737D7E75, 0x7E757B7C, 0x7A7B727D,
+ 0x797D7F79, 0x7F797D7F, 0x7F7F797F, 0x767E7F76,
+ 0x82787E7F, 0x7A7B7281, 0x767F8077, 0x7F797C7C,
+ 0x7D7F797D, 0x7B7C7F76, 0x7E788184, 0x7D7D777E,
+ 0x73807E76, 0x7C737D7B, 0x7B7C737B, 0x76767872,
+ 0x736F7A7C, 0x72736F72, 0x73747873, 0x77737478,
+ 0x7A7B7776, 0x777C7B77, 0x76727C7B, 0x75747077,
+ 0x6D73736D, 0x746E7373, 0x74756C74, 0x65707168,
+ 0x71676D6E, 0x6D6E6470, 0x63696D62, 0x675E696C,
+ 0x64675E64, 0x5A61655A, 0x5E546165, 0x5B5C525D,
+ 0x535B5C53, 0x564C5B5C, 0x57564C57, 0x47514F47,
+ 0x47414F50, 0x49494347, 0x42474741, 0x483F4848,
+ 0x5D5E5547, 0x7963655F, 0x7E7A7D7F, 0x7E807A7F,
+ 0x7E81897F, 0x9A908088, 0x94999092, 0x9DA4A79E,
+ 0xB2A9A3A6, 0xB8BDB4AD, 0xB8B9BCB3, 0xC1B7BEC1,
+ 0xBFC0B6C0, 0xB4BBBEB5, 0xBDB4BABD, 0xBABDB4BA,
+ 0xB1B9BFB4, 0xBDB4B6BC, 0xBABCB6BA, 0xB6BBBCB8,
+ 0xB9B5B9BA, 0xB9BAB6B8, 0xB8B8BCB7, 0xBCB6B9BD,
+ 0xB8BCB6B8, 0xB3B6BDB6, 0xBDB6B3BA, 0xB6BDB6B6,
+ 0xB5B5BCB5, 0xBBB6B4BC, 0xB5BDB6B4, 0xB4B1B9B2,
+ 0xBCB5B3BB, 0xB5BCB5B5, 0xB6B5BCB5, 0xBBB6B5BB,
+ 0xBABDBBB7, 0xBABBBEBC, 0xC2C0B9BC, 0xBDC0BEBF,
+ 0xBABAC0BB, 0xC0BBB9C1, 0xBDC3BEBA, 0xB9B9C0B9,
+ 0xC0B9B9C0, 0xB3BAB3B9, 0xA9A8AEA9, 0xAEA9A8AE,
+ 0x999D98AA, 0x8D91938D, 0x78749193, 0x77787479,
+ 0x66656964, 0x514F6568, 0x50514F4E, 0x3F50514D,
+ 0x443F4044, 0x40443F40, 0x4C464541, 0x61585252,
+ 0x60615860, 0x575A5B57, 0x645F585C, 0x60645F60,
+ 0x63686C66, 0x67616569, 0x686C6663, 0x646D6F69,
+ 0x6D676C6D, 0x696B656D, 0x65636761, 0x7269676B,
+ 0x7172696F, 0x6A70706A, 0x6C626E70, 0x60695F64,
+ 0x6C686D64, 0x786F6E72, 0x78797077, 0x777C7974,
+ 0x7D757F7C, 0x78766E7F, 0x6B76746C, 0x756D7573,
+ 0x77756D77, 0x6D717268, 0x7D727677, 0x797D7279,
+ 0x767C7D74, 0x7C737E7F, 0x8081787B, 0x737D7E75,
+ 0x81787B7C, 0x80817880, 0x727D7E75, 0x7C737A7B,
+ 0x7E7F767B, 0x6A7D7E75, 0x73697273, 0x78796F72,
+ 0x707D7E75, 0x79707879, 0x7B7C7378, 0x747D7E75,
+ 0x7C737C7D, 0x7A7B727B, 0x73797973, 0x79707979,
+ 0x76797078, 0x72737470, 0x77717377, 0x77777175,
+ 0x6F77746F, 0x78747774, 0x7A79757B, 0x25777372,
+ 0x01012826, 0x00000003, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00000000, 0x01000000, 0x00010000,
+ 0xA26A6F6D, 0x706BA1A7, 0x0002006A, 0x00000000,
+ 0x00000000, 0x01010100, 0x00000000, 0x02000000,
+ 0x00010001, 0x35080905, 0x9E93373B, 0x989F9298,
+ 0x8A91978C, 0x948B9195, 0x96978D93, 0x8793978C,
+ 0x978B8F93, 0x93978B93, 0x8A96978D, 0x988D9394,
+ 0x94988D94, 0x8A93978B, 0x998D9296, 0x97998D97,
+ 0x8E969A8F, 0x998E9599, 0x989C9095, 0x90989C90,
+ 0x9D8E989C, 0x969D8E96, 0x91989C90, 0x9D91999D,
+ 0x9A9F909B, 0x8F989C90, 0x9D91979E, 0x999D9199,
+ 0x92999D91, 0x9D92999D, 0x9A9E9399, 0x8D95998D,
+ 0x978B9599, 0x9A9C9095, 0x91999D91, 0x9D91999D,
+ 0x999D9199, 0x919A9E93, 0x9D92989C, 0x9B9F9497,
+ 0x959CA095, 0x9F959E9F, 0xA1A2989E, 0x929DA195,
+ 0xA3949AA1, 0x9DA1959E, 0x959AA194, 0xA09698A0,
+ 0xA1A8A198, 0x9DA0A89E, 0xA499A0A8, 0x9EA5989E,
+ 0x95A4A89C, 0xA6979FA4, 0x9FA495A1, 0xA1A8ACA0,
+ 0xADA0A9AD, 0xA6ACA1A6, 0x6DA8ADA4, 0x01006F73,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00010000, 0x290E0F0D,
+ 0x2A28282B, 0x292D2827, 0x27262927, 0x29272629,
+ 0x26292726, 0x27282927, 0x28282829, 0x28292728,
+ 0x22252322, 0x23222523, 0x23242225, 0x21222321,
+ 0x23212223, 0x20232120, 0x211F2220, 0x23212023,
+ 0x22232122, 0x22262725, 0x27232526, 0x26272326,
+ 0x27262927, 0x29272629, 0x28292526, 0x24262725,
+ 0x26252728, 0x26272528, 0x282A2827, 0x2927292A,
+ 0x28292728, 0x28282927, 0x2727292A, 0x292A2827,
+ 0x26282B29, 0x2C27272B, 0x282C2728, 0x27282C27,
+ 0x2C27282C, 0x282C2728, 0x26282C27, 0x2C27272B,
+ 0x282C2728, 0x27282C27, 0x2C27282C, 0x282C2728,
+ 0x27282C27, 0x2B29282C, 0x2A2B292A, 0x2F2D2E2C,
+ 0x2D2D2F2F, 0x2D2D2D2D, 0x00070707, 0x00000000,
+ 0x01010100, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01020001, 0x00000200, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000101, 0x2B290000,
+ 0x7A7B792A, 0x70767773, 0x75717374, 0x7C7B7776,
+ 0x737A7772, 0x7B757B78, 0x7979737B, 0x757B7B75,
+ 0x817B7D7E, 0x7F807781, 0x777E8178, 0x80777D80,
+ 0x7A7D747D, 0x757C7F76, 0x7D747D7E, 0x7D7E757C,
+ 0x797D7F79, 0x7F797D7F, 0x7F7F797D, 0x79818279,
+ 0x7F768182, 0x7E7F767E, 0x797F8077, 0x7F797F7F,
+ 0x7F817B7D, 0x767C7E78, 0x7D777A7C, 0x7D7D777D,
+ 0x737F7D75, 0x7C737D7B, 0x7879707B, 0x76767872,
+ 0x807C7A7C, 0x7677737F, 0x6E72736F, 0x7B777274,
+ 0x80807A7C, 0x727A7B77, 0x77717678, 0x75756F77,
+ 0x6A74746E, 0x716B7070, 0x71716B71, 0x68716F67,
+ 0x71677270, 0x6D6E6470, 0x696F7269, 0x6C636F72,
+ 0x696C6369, 0x5A666A5F, 0x5F556364, 0x6263595E,
+ 0x58606158, 0x61576061, 0x57564C60, 0x4D57554D,
+ 0x4F495556, 0x4747414F, 0x42484842, 0x49404848,
+ 0x48494048, 0x474A4C46, 0x64604A4B, 0x7D7F7965,
+ 0x80818881, 0x8881828A, 0x94999081, 0x93989B92,
+ 0xA69D999C, 0xA2A79EA1, 0xABADB0A7, 0xBBB1B2B6,
+ 0xBFC3B8BA, 0xB8BBC0B7, 0xC2B9BCC1, 0xBFC2B9BF,
+ 0xB4BBC0B7, 0xBBB2B8BD, 0xB8BBB2B8, 0xB2B9BBB5,
+ 0xB9B3B6B8, 0xB9BBB5B7, 0xB5B8BCB6, 0xBCB6B7BB,
+ 0xB5BCB5B8, 0xB6B6BDB6, 0xBBB5B6BD, 0xB6BDB6B7,
+ 0xBABAC1BA, 0xC4BFBAC1, 0xBAC1BAC0, 0xB8B8BFB8,
+ 0xC1BAB9C2, 0xB9C0B9BA, 0xBDBCC2BD, 0xC1BFBCC2,
+ 0xBFC2C0BE, 0xBBBEC1BF, 0xBDBBBCBD, 0xBCBDBBBC,
+ 0xB5B5BBB6, 0xBBB6B5BC, 0xB4BAB5B5, 0xAEB3BAB3,
+ 0xB3ACAEB5, 0xA8ACA6AC, 0x99999D98, 0x8B879A9E,
+ 0x8D8C888A, 0x73797874, 0x5B577979, 0x5D5C585E,
+ 0x4F52514D, 0x504F5051, 0x51525052, 0x3E41423E,
+ 0x443F4044, 0x4D514C40, 0x5A53534D, 0x61586060,
+ 0x60615860, 0x5F62645E, 0x635F6263, 0x61625E62,
+ 0x666A6C66, 0x6963686C, 0x67696367, 0x666E706A,
+ 0x68626A6C, 0x6A6C6668, 0x65636761, 0x7168676B,
+ 0x78766E70, 0x63726F6A, 0x6F646B6C, 0x646C6169,
+ 0x6A676C63, 0x7A717073, 0x78797079, 0x787B7873,
+ 0x7D75807D, 0x78766E7F, 0x70797A71, 0x736B7879,
+ 0x78766E75, 0x6B74756B, 0x766C7475, 0x76776D75,
+ 0x737C7D73, 0x7C737B7C, 0x7B7C737B, 0x757D7E75,
+ 0x7B727D7E, 0x7B7C737A, 0x737B7C73, 0x7D747B7C,
+ 0x7D7E757C, 0x6E797A71, 0x776D7677, 0x797A7076,
+ 0x737B7C73, 0x7D747B7C, 0x7B7C737C, 0x737A7B72,
+ 0x79707B7C, 0x78797078, 0x72797973, 0x7A717A7B,
+ 0x777A7179, 0x6F72746E, 0x756F7074, 0x77777173,
+ 0x6F76736E, 0x74707774, 0x7D7C7877, 0x004F4D4C,
+ 0x00000200, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000002, 0x00000000, 0x01000001, 0x2E342F00,
+ 0xA1A1A8A1, 0xA99FA1A8, 0x6C706AA1, 0x00000100,
+ 0x00000102, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x05080808, 0x6C630809, 0x989E9369,
+ 0x91969C91, 0x958A989C, 0x9A9B9191, 0x8E989C90,
+ 0x978B969A, 0x92968A93, 0x8B94988C, 0x958A9397,
+ 0x93978B91, 0x8D93978B, 0x9C909599, 0x989C9098,
+ 0x8E989C91, 0x998E9599, 0x989C9195, 0x8F989C90,
+ 0x9E8F979B, 0x969D8E97, 0x92999D91, 0x9C909A9E,
+ 0x9B9E8F9A, 0x909BA091, 0x9E8F989F, 0x999E8F99,
+ 0x919A9E92, 0x9D91999D, 0x999D9199, 0x8D989C90,
+ 0x978B9599, 0x9A9C9095, 0x91999D91, 0x9D91999D,
+ 0x9A9E9299, 0x929CA094, 0x9D92999D, 0x9B9F9497,
+ 0x959E9F95, 0x9D939E9F, 0x9CA0959C, 0x9599A093,
+ 0xA1949BA2, 0x99A0939A, 0x949BA196, 0x9A91999F,
+ 0x9FA49B95, 0x9DA0A89E, 0xA497A0A8, 0x9FA6999D,
+ 0x99A3A899, 0xAD9EA3A8, 0xA8ACA0A8, 0xA0A8ACA0,
+ 0xADA0A8AC, 0xA7AEA1A6, 0xA4A8AEA3, 0x736DA8AD,
+ 0x00010071, 0x00010200, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00010000, 0x88373A38,
+ 0x8D88898D, 0x868D8689, 0x7E828883, 0x837E7D83,
+ 0x7D837E7D, 0x7B818580, 0x7F7D7C80, 0x7C807B7C,
+ 0x7C80817D, 0x7E7A7F80, 0x7B7F7A7D, 0x7B7B7F7A,
+ 0x7F7A7C80, 0x7B7F7A7B, 0x7B7B7F7A, 0x7F7A7C80,
+ 0x7A7E797B, 0x7C787C77, 0x807B7D81, 0x7B827B7C,
+ 0x7D7C827D, 0x827D7C82, 0x7E827C7C, 0x757E827D,
+ 0x8682777B, 0x82868085, 0x80848680, 0x87828286,
+ 0x84888383, 0x83848883, 0x8B898488, 0x888C8788,
+ 0x8B888C86, 0x8F898D91, 0x8B8F898B, 0x8C8A8E88,
+ 0x8E888E92, 0x8C908A8A, 0x8E90948E, 0x97919094,
+ 0x94989293, 0x8E939791, 0x948E9094, 0x93979190,
+ 0x8F93988F, 0x988F9398, 0x92958C95, 0x92989990,
+ 0x97939898, 0x99989498, 0x0020211F, 0x00000000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x55545002, 0x71787872, 0x79737777, 0x78787279,
+ 0x73807D78, 0x7C777C78, 0x7F7C777F, 0x757B7B75,
+ 0x7D797B7B, 0x7B7B757E, 0x7880807A, 0x80777E7E,
+ 0x7B7E757F, 0x777D7F79, 0x7F767B7D, 0x7D80777C,
+ 0x797B7D77, 0x7F7B7D7F, 0x7D7F797E, 0x78838179,
+ 0x7F798280, 0x7A7C767D, 0x78808178, 0x81788081,
+ 0x7B7D777E, 0x777A7C76, 0x7F797B7D, 0x80807A7F,
+ 0x747E7F76, 0x7B717C7D, 0x7B7C737A, 0x77767872,
+ 0x7F7B7A7B, 0x78777380, 0x70777771, 0x77717879,
+ 0x7C7D7477, 0x6D787872, 0x766D7576, 0x73766D73,
+ 0x6B73746B, 0x70677374, 0x73746B6F, 0x6C73746B,
+ 0x73697475, 0x70716772, 0x5F6D6E65, 0x6C626768,
+ 0x6B6C626B, 0x5D696A60, 0x675D6867, 0x68675D68,
+ 0x5B63645B, 0x5F566364, 0x5A5B525E, 0x4F595A50,
+ 0x544B5859, 0x52534A53, 0x4652524C, 0x4C474E4B,
+ 0x4F4C474F, 0x3C454642, 0x403A3F40, 0x4B4D4740,
+ 0x63656963, 0x7C776569, 0x787C7678, 0x86888C86,
+ 0x8D87888C, 0x888C8689, 0x9AA0A39A, 0xA499A1A5,
+ 0xA0A499A0, 0xB1B4B9B0, 0xB8B1B3B7, 0xB1B7B2B1,
+ 0xB7B6BCB7, 0xBCB6B8BC, 0xB8BDB4B8, 0xB2B6BBB2,
+ 0xBBB2B6BB, 0xB6BBB2B6, 0xB1B3B8AF, 0xB9B2B1B8,
+ 0xB1B8B1B2, 0xB1B2B9B2, 0xB8B1B0B8, 0xB0B7B0B1,
+ 0xB7B9BDB8, 0xBBB7BABB, 0xB9BBB5BC, 0xBFC2C9C2,
+ 0xC8C1C0C9, 0xC1C8C1C1, 0xC1BEC4BF, 0xC4BFBEC3,
+ 0xC0C4BFC0, 0xB1B6B8B2, 0xB8B2B7B7, 0xB8B8B2B8,
+ 0xAFB1B5B0, 0xB4AFB0B4, 0xB1B5B0B0, 0x97989C97,
+ 0x9D98989C, 0x9A9B9799, 0x7F80817F, 0x6C6B8280,
+ 0x6D6C686E, 0x55656460, 0x4F4B5A59, 0x47444052,
+ 0x40474440, 0x44434744, 0x47434248, 0x474A4B47,
+ 0x544E4A4B, 0x54565054, 0x575A5B57, 0x625C585C,
+ 0x67676162, 0x5F65655F, 0x635F6565, 0x6F6C6866,
+ 0x666B6A66, 0x6B67696A, 0x696A666C, 0x6A6E6F6B,
+ 0x6B676B6F, 0x686C676A, 0x66696D67, 0x6D64686C,
+ 0x72736A6C, 0x68797A71, 0x756A7071, 0x6E726771,
+ 0x6D6D6E64, 0x766C7677, 0x76776D75, 0x6D79776F,
+ 0x786F7775, 0x78797077, 0x70767970, 0x79707679,
+ 0x78797078, 0x71797A70, 0x7B6F7B7D, 0x74746879,
+ 0x7177776B, 0x7B717C7B, 0x77786E7A, 0x727B7C72,
+ 0x81787B7C, 0x80817880, 0x757F8077, 0x7C737D7E,
+ 0x7B7C737B, 0x707B7C73, 0x7C737879, 0x7B7C737B,
+ 0x757B7C73, 0x7C737D7E, 0x7879707B, 0x72797A71,
+ 0x7C727A7B, 0x78796F7B, 0x6B76776E, 0x7A717374,
+ 0x76797079, 0x6F72746E, 0x736D7175, 0x78787271,
+ 0x70787370, 0x73727873, 0x78747377, 0x00070505,
+ 0x00000200, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000100, 0x01000001, 0x6C736C00,
+ 0x919FA49B, 0xA499969C, 0xB0B4A99E, 0x0070736A,
+ 0x00000001, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020001, 0x38320001, 0xA0A49936,
+ 0x8D94988D, 0x988C9599, 0x94988C94, 0x8A95998D,
+ 0x998A9296, 0x93988994, 0x8E969B8C, 0x998C969D,
+ 0x92998A92, 0x8A939889, 0x9B8C9499, 0x969B8C96,
+ 0x90989C90, 0x9C90989C, 0x989C9098, 0x939B9F93,
+ 0xA0919B9F, 0x989D8E9B, 0x929C9E92, 0x9F959B9C,
+ 0x9D9F939E, 0x939B9F93, 0x9D8E9B9F, 0x9A9D8E9A,
+ 0x939B9F93, 0x9F939B9F, 0x9CA0949B, 0x919D9F93,
+ 0x978B9B9D, 0x9A9E9293, 0x959B9F93, 0xA1969DA1,
+ 0x9BA2959B, 0x939DA195, 0xA0949B9F, 0x9DA1959C,
+ 0x969EA094, 0x9F93A0A2, 0x9B9F949B, 0x9999A196,
+ 0xA1969CA4, 0x9DA39899, 0x999DA398, 0xA499A0A4,
+ 0xA6AA9FA0, 0x9DA6ACA1, 0xA79BA3AA, 0xA3A79BA3,
+ 0xA0A7AB9F, 0xAB9FA8AC, 0xA7ABA0A7, 0xA3A7ADA2,
+ 0xADA2A8AE, 0xA9AFA4A7, 0xA2A7AEA1, 0xB8AFA7AD,
+ 0x91968DB3, 0x00393B35, 0x03010203, 0x01020002,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x03040200, 0x87535752,
+ 0x8D86888C, 0x868D8686, 0x7D7D847D, 0x837E7D84,
+ 0x797F7A7D, 0x7B7C807B, 0x807B7C80, 0x787C777C,
+ 0x7B7A7E79, 0x807B7C80, 0x7A7E797C, 0x7A787C77,
+ 0x7E797B7F, 0x7B7F7A7A, 0x77787C77, 0x7C77787C,
+ 0x787C7778, 0x7B7A807B, 0x817A7A80, 0x7A817A7A,
+ 0x79798079, 0x80797980, 0x7C807A79, 0x74787C76,
+ 0x817B787D, 0x7D82797D, 0x7B80857C, 0x847E7F84,
+ 0x82868080, 0x7F848883, 0x87838283, 0x87898386,
+ 0x8282877E, 0x8B82868B, 0x868B8286, 0x87888D84,
+ 0x8D848B90, 0x888D8488, 0x898C9188, 0x91888D92,
+ 0x8B90878C, 0x898C9188, 0x938A8D92, 0x8C91888E,
+ 0x898E9489, 0x92878E94, 0x8E92878E, 0x90999A90,
+ 0x99939899, 0x97969299, 0x00151614, 0x01010000,
+ 0x00000101, 0x00000000, 0x01000000, 0x01020000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x1E1D1902, 0x70797973, 0x79707879, 0x78797078,
+ 0x7376736E, 0x78737C78, 0x807D787C, 0x787E7D79,
+ 0x7D797D7C, 0x7B7B757E, 0x797D7D77, 0x7F767F7F,
+ 0x797C737E, 0x797A7C76, 0x7F797B7F, 0x7D7F797D,
+ 0x777E807A, 0x7D787B7D, 0x7D7F7979, 0x7A85827D,
+ 0x807A8080, 0x7A7C767E, 0x777D7E75, 0x82798081,
+ 0x797C737F, 0x797A7C76, 0x7E787D7F, 0x80807A7E,
+ 0x737D7E75, 0x7B717B7C, 0x7B7C737A, 0x777B7D77,
+ 0x77737A7B, 0x79797378, 0x757C7D74, 0x7F767D7E,
+ 0x7879707E, 0x6D75766D, 0x766D7576, 0x73776C73,
+ 0x68707168, 0x766D7071, 0x77786F75, 0x6D75766D,
+ 0x766C7576, 0x73746A75, 0x65707168, 0x6E646D6E,
+ 0x696A606D, 0x5C68675D, 0x665E6766, 0x66675E68,
+ 0x5B63645B, 0x5F566364, 0x5C5F565C, 0x50595A50,
+ 0x5950595A, 0x575A5156, 0x4F515249, 0x50485957,
+ 0x4F4C4752, 0x414B4C48, 0x46404445, 0x3F413B46,
+ 0x3F3F433E, 0x57524044, 0x65696453, 0x6F717570,
+ 0x746F7074, 0x888C8670, 0x82878C83, 0x8D82898D,
+ 0xA0A49989, 0x9EA2A59C, 0xA59EA0A4, 0x9FA5A09E,
+ 0xB7A8ADAB, 0xBCB7B8BC, 0xABAFA9B8, 0xA1A7ACA3,
+ 0xADA2A6AC, 0xA7ACA3A7, 0x9FA3A89F, 0xA89FA1A9,
+ 0xA1A8A1A3, 0xA3A3AAA3, 0xAAA3A3AA, 0xA3AAA3A3,
+ 0x93A1A39D, 0x96929697, 0xB1B1AB99, 0xB2B6BBB2,
+ 0xBBB5B4BC, 0xB6BAB4B7, 0xB4B3B7B2, 0xB7B2B3B6,
+ 0xB3B7B1B3, 0xB0B6B9B0, 0xB9B0B8B9, 0xB8B8B2B8,
+ 0x98B2B4AE, 0x9C98999D, 0x9B9C989B, 0x809A9B97,
+ 0x84808185, 0x83848083, 0x6B6E6C6B, 0x57566E6C,
+ 0x5B57565B, 0x40504F4B, 0x433F4544, 0x47444046,
+ 0x41474440, 0x44404845, 0x4D4C4847, 0x51535450,
+ 0x5B565655, 0x5F5C575E, 0x5D60615D, 0x67635E62,
+ 0x6D6C6866, 0x636C6964, 0x68636B68, 0x6E6B666B,
+ 0x6B6D6D67, 0x6D697171, 0x6E6D696E, 0x67737470,
+ 0x706B686C, 0x686C676C, 0x656C706A, 0x6F66676B,
+ 0x72736A6C, 0x7077786F, 0x736A7879, 0x76776D72,
+ 0x6D6F6E64, 0x786E7877, 0x76776D77, 0x6F79776F,
+ 0x79707977, 0x7A7B7278, 0x73797C73, 0x7970797C,
+ 0x7B7C7278, 0x6B74756B, 0x7A6E7577, 0x77776B7A,
+ 0x7078786C, 0x7A707C7C, 0x7A7B7179, 0x727A7B71,
+ 0x7B727B7C, 0x7E7F767A, 0x757D7E75, 0x7E757D7E,
+ 0x7879707D, 0x6F7B7C73, 0x7C737778, 0x7879707B,
+ 0x757D7E75, 0x81787D7E, 0x7D7E7580, 0x757A7B72,
+ 0x7C727D7E, 0x7B7C727B, 0x70787970, 0x79707879,
+ 0x777A7178, 0x6D767872, 0x746E6F73, 0x74746E72,
+ 0x6F787370, 0x73727772, 0x2D2B2A77, 0x00020000,
+ 0x00000200, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00010000, 0x00000100, 0x3A350002, 0xA2A9A234,
+ 0x90A1A59A, 0x9C90989C, 0xA0A49898, 0x6AA8ACA1,
+ 0x01007073, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000200, 0x00020001, 0x02000200, 0x6A6D6401,
+ 0x8BB2B3A9, 0x988C9597, 0x95998D94, 0x8C999D91,
+ 0x9A8B9498, 0x92978895, 0x8C949B8C, 0x9A8B949B,
+ 0x939A8B93, 0x8C959A8B, 0x9D8E969B, 0x969D8E96,
+ 0x91979B8F, 0x9D91999D, 0x999D9199, 0x939DA195,
+ 0x9F939B9F, 0x9B9F939B, 0x939C9D93, 0x9F959C9D,
+ 0x9E9F959E, 0x939DA195, 0x9E929B9F, 0x9FA1959C,
+ 0x959EA296, 0xA0919DA1, 0x9BA0919B, 0x929B9D91,
+ 0x9A8E9C9E, 0x9EA29696, 0x959DA195, 0xA2959DA1,
+ 0x9BA2959B, 0x919DA195, 0xA1959BA0, 0xA0A4989D,
+ 0x95A2A596, 0xA599A1A4, 0x9EA598A1, 0x969BA398,
+ 0xA19699A1, 0x9DA3989B, 0x9CA0A499, 0xA399A3A7,
+ 0xA3A79CA2, 0x9CA3AA9D, 0xA498A2A9, 0xA1A599A0,
+ 0xA1A7AB9F, 0xADA2A9AD, 0xA9ADA2A9, 0xA4A7ACA3,
+ 0xACA1A8AD, 0xA7ADA2A6, 0xA1A7ADA2, 0xADA2A7AE,
+ 0xB3B9AEA7, 0x33A8ACA1, 0x0400393C, 0x03040002,
+ 0x00010101, 0x01010000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x06090700, 0x87888C87,
+ 0x8C87888C, 0x888C8788, 0x84848883, 0x88838589,
+ 0x83878284, 0x7F82847E, 0x847E8385, 0x81837D82,
+ 0x7C7D817C, 0x817C7D81, 0x7D817C7D, 0x7F7D817C,
+ 0x827D8084, 0x7D817C7E, 0x7C7D817C, 0x817C7D81,
+ 0x7C827D7B, 0x7A7D847D, 0x847D7A81, 0x7D847D7D,
+ 0x7C81867D, 0x857C8085, 0x80837A80, 0x787F8279,
+ 0x877E7F83, 0x85887F84, 0x7E84877E, 0x867D8487,
+ 0x878A8183, 0x868A8C86, 0x88828C8C, 0x8C8C8688,
+ 0x848B8E85, 0x8D848A8D, 0x8E91888A, 0x848C8F86,
+ 0x8D848A8D, 0x8C8F868A, 0x888D9289, 0x91888C91,
+ 0x8E938A8C, 0x8A8E938A, 0x948B8E93, 0x90958C8F,
+ 0x8B8F948B, 0x91888F94, 0x90938A8E, 0x90989990,
+ 0x98929899, 0x34332F98, 0x00030100, 0x00000200,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x02000002, 0x732E2F2B, 0x79707779, 0x78797078,
+ 0x6976736E, 0x746F716E, 0x7A777277, 0x757B7B75,
+ 0x7B757B7B, 0x7B7B757B, 0x757B7B75, 0x7B727D7E,
+ 0x75786F7A, 0x7A7C7E78, 0x7C777B7F, 0x7A7E7978,
+ 0x787B7C78, 0x7C767B7C, 0x7A7C767A, 0x7A7F7F79,
+ 0x7F797E80, 0x7D7F797D, 0x75818279, 0x7E757D7E,
+ 0x7A7B727D, 0x787E8178, 0x807A7C7E, 0x7D7F797E,
+ 0x757D7E75, 0x79707D7E, 0x7D7E7578, 0x727E807A,
+ 0x77737678, 0x7B7B7578, 0x72797C73, 0x7E747B7C,
+ 0x7D7B737D, 0x70787970, 0x766D7879, 0x73746B75,
+ 0x6C73746B, 0x786F7475, 0x797A7177, 0x6D787970,
+ 0x766D7576, 0x73746B75, 0x636D6E65, 0x6B636B6C,
+ 0x6B69616D, 0x5F686960, 0x69636768, 0x66675E69,
+ 0x5B686960, 0x5F566164, 0x61645B5C, 0x57606157,
+ 0x61586061, 0x575B505E, 0x5054584D, 0x574D5A5C,
+ 0x51524956, 0x424B4D47, 0x46424347, 0x45464245,
+ 0x3E40443F, 0x443F3F43, 0x40443F40, 0x573F433E,
+ 0x5C57585C, 0x70746F58, 0x6D6F736D, 0x8C836F73,
+ 0x888C8187, 0x8B90938A, 0x928C9194, 0x8D918B90,
+ 0x9D9DA19C, 0xB0AB9EA2, 0xAAAEA8AC, 0x95A6AEA4,
+ 0x9087979F, 0x8B90878B, 0x8F848980, 0x988F9398,
+ 0x93988F95, 0x93979C93, 0x9C95959D, 0x959C9595,
+ 0x92969892, 0xA39E9698, 0xB0B0AAA6, 0xA4ABAEA5,
+ 0xADA4A8AD, 0xAAACA6AA, 0xA4A7A8A4, 0xA9A4A5A9,
+ 0xA5A9A3A5, 0x9FA3A89F, 0xA9A0A3A8, 0x939791A4,
+ 0x809C9E98, 0x88828486, 0x85878188, 0x6983857F,
+ 0x6F696D6F, 0x6F6F696F, 0x545B5854, 0x43405B58,
+ 0x47444048, 0x40454440, 0x44404544, 0x504F4B47,
+ 0x50555450, 0x55505354, 0x585C5751, 0x575B5C58,
+ 0x5B585D5D, 0x68636060, 0x636A6763, 0x67636867,
+ 0x68676366, 0x636A6763, 0x6D656B68, 0x7071686F,
+ 0x66717269, 0x6E686E6F, 0x70706A6E, 0x6A6A6B67,
+ 0x736F6D6E, 0x6E6F6B72, 0x696A6E68, 0x6E686B6F,
+ 0x6E706A6A, 0x6D6F7067, 0x79707576, 0x72736A78,
+ 0x6E737169, 0x776E7876, 0x76776E76, 0x71787570,
+ 0x766E7976, 0x78766E78, 0x757D7E75, 0x7A727D7E,
+ 0x7A796F7C, 0x6878796F, 0x74687274, 0x7F7D7274,
+ 0x6978786A, 0x776D7575, 0x7C7B7178, 0x737C7D74,
+ 0x7F767B7C, 0x7879707E, 0x737D7E75, 0x7C727B7C,
+ 0x7B7C727B, 0x737A7B72, 0x7E757B7C, 0x7879707D,
+ 0x757B7C73, 0x80777D7E, 0x7B7C737F, 0x737D7E75,
+ 0x7B737B7C, 0x79776F7D, 0x70797973, 0x766D7879,
+ 0x76797075, 0x73767872, 0x74707478, 0x78777373,
+ 0x73787372, 0x4F4E7974, 0x09070653, 0x02000000,
+ 0x00000100, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000100, 0x716C0002, 0xA4ACA26B,
+ 0x98A0A499, 0x9D92A2A4, 0x9FA39799, 0xA1A8ACA0,
+ 0x7269A8AC, 0x0001006F, 0x00000100, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000101, 0x00010000,
+ 0x8D94988D, 0x988C9599, 0x93978B94, 0x8E979B8F,
+ 0x9C90969A, 0x94988C98, 0x8C969D8E, 0x998A949B,
+ 0x979E8F92, 0x8C969B8C, 0x9D8E969B, 0x989D8E98,
+ 0x8F979E8F, 0x9C90979E, 0x9A9E9298, 0x969B9F94,
+ 0xA1969DA1, 0x9B9F949D, 0x97A0A197, 0x9D93A0A1,
+ 0x9EA0949C, 0x93A0A498, 0x9F939B9F, 0x9DA1959B,
+ 0x959CA094, 0xA2969DA1, 0x9B9F939E, 0x939DA195,
+ 0x9A8E9B9F, 0x9EA29696, 0x959DA195, 0xA1959DA1,
+ 0xA0A4989D, 0x97A1A599, 0xA4989FA3, 0xA0A498A0,
+ 0x999FA397, 0xA498A1A5, 0xA0A498A0, 0x979DA497,
+ 0xA3989DA4, 0xA1A59A9F, 0x98A2A498, 0xA599A2A4,
+ 0xA3A79BA1, 0x9DA4AB9E, 0xA599A3AA, 0xA4A89CA1,
+ 0xA0A9ADA1, 0xADA1A8AC, 0xA9ADA2A9, 0xA5A9AEA5,
+ 0xACA3A9AE, 0xA9AFA4A7, 0xA2A7ADA2, 0xADA2A7AD,
+ 0xA7ADA2A7, 0xA2A7ABA0, 0x746BA9AD, 0x02040071,
+ 0x01000100, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x06090700, 0x87888C87,
+ 0x8B86888C, 0x888C8787, 0x86888C87, 0x8C87888C,
+ 0x8A8C8688, 0x82868882, 0x88828688, 0x86888286,
+ 0x7F80847E, 0x847F8084, 0x80847F80, 0x7E80847E,
+ 0x837E8084, 0x80847F7F, 0x7E80847F, 0x847F8084,
+ 0x7E857E7E, 0x81818881, 0x88818188, 0x82877E81,
+ 0x80848980, 0x89808689, 0x86898086, 0x7D888C81,
+ 0x8C818488, 0x888C8188, 0x82888C81, 0x8980888B,
+ 0x888B8286, 0x8690908A, 0x8A858C8C, 0x8C8C868D,
+ 0x878D9087, 0x91888D90, 0x8E91888E, 0x868E9188,
+ 0x91888C8F, 0x8E938A8E, 0x8C90938A, 0x938A9095,
+ 0x91968D90, 0x8C90958C, 0x958C9095, 0x90958C90,
+ 0x8990958C, 0x91888D92, 0x92958C8E, 0x92989990,
+ 0x66609898, 0x02010066, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000000, 0x00020000, 0x00000200,
+ 0x02000002, 0x4E0A0B07, 0x78725254, 0x77777178,
+ 0x6D7B7873, 0x736E7572, 0x7B787376, 0x727B7B75,
+ 0x78727878, 0x7C7C7678, 0x757D7D77, 0x7E757D7E,
+ 0x7B7D777D, 0x787C7E78, 0x7B77797D, 0x7A7C767A,
+ 0x787B7C78, 0x7F797C7E, 0x7B7D777D, 0x797B7D77,
+ 0x807A7D7F, 0x7A7C767E, 0x747C7D74, 0x7C737C7D,
+ 0x7879707B, 0x777D8077, 0x7D777D80, 0x7E807A7B,
+ 0x73808178, 0x7E757B7C, 0x7D7E757D, 0x767A7C76,
+ 0x7C767A7C, 0x7C7C767C, 0x727B7C73, 0x796F7B7C,
+ 0x7B7C7378, 0x71787872, 0x756F7777, 0x75766D75,
+ 0x6C787872, 0x79737475, 0x78797079, 0x6D75766D,
+ 0x79707576, 0x73746B78, 0x636D6E65, 0x6E656B6C,
+ 0x6D6E656D, 0x636D6E65, 0x69636969, 0x696A6169,
+ 0x60686960, 0x69606669, 0x68696066, 0x5F68695F,
+ 0x6A616869, 0x575B5067, 0x50585C50, 0x5B51585C,
+ 0x5A5B525A, 0x4E52544E, 0x544E5054, 0x4C4E4852,
+ 0x3E42443E, 0x443E4044, 0x40443E42, 0x3F42433F,
+ 0x433F4243, 0x40443F42, 0x56585C57, 0x736D585C,
+ 0x71746B6F, 0x78808178, 0x807A8081, 0x90928C7E,
+ 0x8F939490, 0x938F9293, 0x90948F92, 0x95999D97,
+ 0x9D97979F, 0x999D9799, 0x8F959791, 0x988F9598,
+ 0x84898093, 0x86898E85, 0x8C85888C, 0x979B9585,
+ 0x9B979A91, 0xA59FA3A4, 0xA4A49EA5, 0x989D9F99,
+ 0xA09A9EA1, 0x9FA19B9E, 0x979A9C96, 0x9C97989C,
+ 0x999D9798, 0x7F93988F, 0x88818189, 0x83878181,
+ 0x6B858781, 0x706A6F71, 0x70706A70, 0x526D6F69,
+ 0x58525858, 0x5A575258, 0x40474440, 0x43404744,
+ 0x47444048, 0x4B474440, 0x4F4B524F, 0x59585452,
+ 0x565A5B57, 0x5C57575B, 0x585C5758, 0x5F5B5D57,
+ 0x64606565, 0x68636067, 0x676A6763, 0x68626F6C,
+ 0x68686268, 0x6365655F, 0x6C636B68, 0x7071686B,
+ 0x68707168, 0x71687071, 0x70716870, 0x6A74746E,
+ 0x706A6E70, 0x72746E6E, 0x6A70726C, 0x6E686C70,
+ 0x6E71686A, 0x6C73746B, 0x766D7475, 0x75766D75,
+ 0x6E737169, 0x776E7677, 0x7A7B7276, 0x6F7A7772,
+ 0x776E7977, 0x79776F76, 0x6F7A7870, 0x78707A79,
+ 0x79786E7A, 0x6E7E7E72, 0x766B7A7A, 0x7B796E78,
+ 0x6D7A796B, 0x776D7979, 0x7C7B7178, 0x737D7E75,
+ 0x7C737B7C, 0x7879707B, 0x75808178, 0x79707D7E,
+ 0x7B7C7278, 0x6F7D7E75, 0x7C737778, 0x7B7C737B,
+ 0x70787970, 0x7E757879, 0x7D7E757D, 0x757D7E75,
+ 0x7B737D7E, 0x7A78707D, 0x6F787872, 0x71687575,
+ 0x78797070, 0x7372746E, 0x726E7677, 0x7B787473,
+ 0x72777372, 0x08077773, 0x0909090A, 0x01000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x34000200, 0xAAA33539, 0xA5AAA1A3,
+ 0x98A0A498, 0x9C91A2A4, 0x999D9198, 0xA0A9ADA1,
+ 0xACA1A8AC, 0x70726CA8, 0x00010200, 0x01000001,
+ 0x00000000, 0x01000000, 0x00000000, 0x01020000,
+ 0xA95A5D54, 0x988CB0B4, 0x95998D94, 0x9095998D,
+ 0x9A8E989C, 0x94988C96, 0x8C94998A, 0x9B8C949B,
+ 0x949B8C94, 0x8C969B8C, 0x9B8C969B, 0x999E8F96,
+ 0x8F9A9F90, 0x9D91999E, 0x9A9E9299, 0x969DA196,
+ 0xA2979DA1, 0x9B9F949E, 0x979EA198, 0x9C929EA2,
+ 0x9B9F939B, 0x939DA195, 0xA1959B9F, 0x9DA1959D,
+ 0x959DA195, 0xA1959DA1, 0x9DA1959D, 0x929EA296,
+ 0x9A8E9A9E, 0x9A9E9296, 0x959DA195, 0xA1959DA1,
+ 0x9DA1959D, 0x989FA397, 0xA498A0A4, 0x9CA094A0,
+ 0x97A0A498, 0xA1969DA4, 0xA0A4989D, 0x99A1A599,
+ 0xA69AA1A5, 0xA3A599A4, 0x9BA3A79B, 0xA498A3A7,
+ 0xA3A79BA0, 0x9DA7AB9F, 0xA79BA5A9, 0xA6AA9EA3,
+ 0xA1A9ADA1, 0xADA1A9AD, 0xA7AB9FA9, 0xA4A7ADA2,
+ 0xACA3A9AF, 0xA9AFA4A7, 0xA2A6ACA1, 0xADA2A7AD,
+ 0xA7ADA2A7, 0x9FA8ACA0, 0xACA1A7AB, 0xA8ABA2A8,
+ 0x00393A36, 0x01010001, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000301, 0x03010004, 0x01020002, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000001, 0x00000000, 0x00010000, 0x9580847E,
+ 0x908B959C, 0x8C908B8A, 0x888C908A, 0x908A8E91,
+ 0x8E908A8E, 0x858A8C86, 0x8C86898B, 0x888C868A,
+ 0x84868A84, 0x8781868A, 0x85878183, 0x82868B82,
+ 0x8B85868B, 0x83878187, 0x7F838781, 0x86808388,
+ 0x868B8282, 0x80848980, 0x8B828489, 0x888D8486,
+ 0x85888D84, 0x8D828A90, 0x8A8E8387, 0x80898C83,
+ 0x8C838889, 0x898D828B, 0x81868C81, 0x8C81868C,
+ 0x8A8F8686, 0x8A8E908A, 0x91888E90, 0x90918890,
+ 0x8A90938A, 0x94899093, 0x90968B8E, 0x8891948B,
+ 0x928C8E91, 0x90948E8E, 0x8C94978E, 0x958B9295,
+ 0x93978C94, 0x9092978E, 0x96909296, 0x92978E92,
+ 0x89969990, 0x938A9094, 0x98999092, 0x92999993,
+ 0x03009898, 0x02030001, 0x00020000, 0x00000200,
+ 0x01010100, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x02000002, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x24000100, 0x77732728, 0x78787276,
+ 0x7375726D, 0x78747B78, 0x7C79757B, 0x72777771,
+ 0x78747878, 0x78777379, 0x77797B75, 0x7A747B7D,
+ 0x797B7578, 0x75787A74, 0x7D77797B, 0x7B7C737D,
+ 0x747D7D77, 0x7B727C7D, 0x7D7E757A, 0x737D7E75,
+ 0x7C737B7C, 0x7B7C737B, 0x757B7C73, 0x807A7D7E,
+ 0x80807A80, 0x7680807A, 0x7C767C7C, 0x80807A7C,
+ 0x757D7B73, 0x7E757F7D, 0x7D7E757D, 0x73787970,
+ 0x7B737B7C, 0x7879707D, 0x6E7D7E75, 0x736A7677,
+ 0x78797072, 0x6E75756F, 0x736D7274, 0x77797371,
+ 0x73767773, 0x7A767779, 0x7878727B, 0x6F73736D,
+ 0x766D7575, 0x71746B73, 0x656A6E63, 0x70656C70,
+ 0x6E6F656C, 0x696F7066, 0x6F677371, 0x6F706771,
+ 0x61686960, 0x6C636A6B, 0x6869606B, 0x636C6D64,
+ 0x685D6B6C, 0x61655A64, 0x5A63645A, 0x645B6364,
+ 0x60615863, 0x56585B52, 0x5A515C5F, 0x5A5B5259,
+ 0x48505148, 0x51484E51, 0x4E514850, 0x40474741,
+ 0x3D374646, 0x3C3C363D, 0x393E403A, 0x534D3D3F,
+ 0x595B5551, 0x5D63635D, 0x736F6363, 0x72736F72,
+ 0x7F80817F, 0x817F8081, 0x80817D80, 0x86888C86,
+ 0x8C87888C, 0x888C8788, 0x8F92938F, 0x948F9094,
+ 0x8F95908E, 0x85888C87, 0x8C86878B, 0x888C8688,
+ 0x81868980, 0x887F898A, 0x88888287, 0x868A8C86,
+ 0x8C87888C, 0x888C8688, 0x797B7F79, 0x80797980,
+ 0x79807979, 0x69697069, 0x70696970, 0x6C706B69,
+ 0x595B5C58, 0x5C585E5D, 0x5554505D, 0x414E4D49,
+ 0x3C384645, 0x3F3C383F, 0x383F3C37, 0x48433E3E,
+ 0x4A47424B, 0x5057544F, 0x5A555855, 0x61615B5D,
+ 0x5E62645E, 0x605A6064, 0x62645E5E, 0x5E666763,
+ 0x67636162, 0x6C6B6768, 0x606E6B66, 0x68606A68,
+ 0x6C6D646A, 0x60686960, 0x6A656869, 0x6A6B626D,
+ 0x7073746B, 0x776E7879, 0x73746B76, 0x6B73746B,
+ 0x746B7374, 0x71746B73, 0x6B72756C, 0x746B7174,
+ 0x6E6F6571, 0x6A73746A, 0x74697374, 0x787B7270,
+ 0x727A7B72, 0x776E7A7B, 0x76797076, 0x737B7C73,
+ 0x7D747B7C, 0x76776D7A, 0x6C79776D, 0x7B717977,
+ 0x79796D7C, 0x6E79776C, 0x7C717D79, 0x78746980,
+ 0x727A786D, 0x786E7F7D, 0x75746A79, 0x75787970,
+ 0x7C737D7E, 0x7B7C737B, 0x737D7D77, 0x7C737B7C,
+ 0x7B7C737B, 0x707B7C73, 0x7C737879, 0x7B7C737B,
+ 0x737B7C73, 0x7E757B7C, 0x7D7E757D, 0x737B7C72,
+ 0x80787C7D, 0x7A787082, 0x737B7873, 0x6F677B78,
+ 0x76746C71, 0x7077746F, 0x73707875, 0x79747178,
+ 0x246C6A69, 0x00002624, 0x01010100, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00010000, 0x69060703, 0xA39A6D6F, 0xA0A498A0,
+ 0x96A0A498, 0xA498A0A5, 0x9B9F93A0, 0x9A989C90,
+ 0xA49BA1A5, 0xB3B7B19F, 0x00717570, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x65080703, 0x9E92696B, 0x9A9F909A, 0x91999D91,
+ 0x9D929B9D, 0x969A8E99, 0x8D939889, 0x9F8E989E,
+ 0x979D8C99, 0x8D8F9687, 0x9C90959C, 0x9CA09498,
+ 0x909C9F90, 0x9F909C9F, 0x9C9F909C, 0x959FA195,
+ 0xA1959FA1, 0x9B9F939D, 0x999CA095, 0x9E939EA4,
+ 0x93998E9A, 0x909AA192, 0xA192989F, 0x9AA1929A,
+ 0x929AA192, 0xA3949AA1, 0x9CA3949C, 0x969EA394,
+ 0x9F93A0A5, 0x9B9F939B, 0x979FA398, 0xA3989EA2,
+ 0x9FA3979F, 0x98A0A498, 0xA596A0A4, 0xA0A498A0,
+ 0x9A9FA59A, 0xA49B9DA5, 0x9BA1969F, 0x98A0A499,
+ 0xA498A0A4, 0xA0A498A0, 0x9B9FA699, 0xA59A9EA6,
+ 0xA3A79C9F, 0x9BA8ACA0, 0xA89CA5AA, 0xA8ACA0A4,
+ 0xA1A9ADA1, 0xAEA2A9AD, 0xA9ADA1AA, 0xA3ACB0A4,
+ 0xAFA4ABAF, 0xA9B0A3AB, 0xA5A9B0A3, 0xAFA4A8B0,
+ 0xA9AFA4A9, 0xA0A8ACA0, 0xB0A5A8AC, 0xB3B8AFAA,
+ 0x3CB0B2AC, 0x09073F40, 0x08090708, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000000, 0x01000000, 0x00000001, 0x00000000,
+ 0x2F313530, 0x03003135, 0x02030102, 0x00010101,
+ 0x00000000, 0x00010000, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x01000001, 0x00000000, 0x32333100, 0x93959C95,
+ 0x9C95959D, 0x8A918A95, 0x8C8D9289, 0x91889095,
+ 0x8E91888E, 0x868B8E85, 0x8E888C8F, 0x8A8E888A,
+ 0x84888D84, 0x8D84888D, 0x8E91888A, 0x848A8D84,
+ 0x8C83888D, 0x888D8487, 0x82888D84, 0x8E85868B,
+ 0x8A8D848B, 0x84898C83, 0x8D84888D, 0x888D8488,
+ 0x858A9085, 0x90858A90, 0x8C90858A, 0x838C8F86,
+ 0x8E858B8C, 0x8C90858D, 0x85898F84, 0x90858890,
+ 0x8F948B8A, 0x8B8D9289, 0x90879194, 0x8E91888D,
+ 0x8C90938A, 0x978D9095, 0x8E968C8F, 0x8893988F,
+ 0x98918C91, 0x93979191, 0x8D93968D, 0x998F9697,
+ 0x94988D98, 0x9092978E, 0x96909296, 0x94999092,
+ 0x89979B90, 0x9A919094, 0x98999099, 0x30979791,
+ 0x03003436, 0x00040000, 0x00000100, 0x00000000,
+ 0x00010000, 0x30343531, 0x01003334, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x02000002, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x28240001, 0x76777327,
+ 0x6D7B7873, 0x78747572, 0x7A77737B, 0x72797973,
+ 0x74707776, 0x7A797575, 0x71767872, 0x79737577,
+ 0x797B7577, 0x7880807A, 0x7C738081, 0x7D7E757B,
+ 0x727D7E75, 0x7C737A7B, 0x7D7E757B, 0x737B7C73,
+ 0x7C737B7C, 0x7A7B727B, 0x757D7E75, 0x7D777D7E,
+ 0x7D7D777D, 0x767C7C76, 0x7C767C7C, 0x7878727C,
+ 0x787B7C73, 0x7E758081, 0x7B7C737D, 0x757D7E75,
+ 0x7B737D7E, 0x7D7B737D, 0x6E787970, 0x786F7677,
+ 0x77786F77, 0x726D6F69, 0x77737678, 0x7A7B7776,
+ 0x737A7B77, 0x736F7677, 0x74746E74, 0x6A75756F,
+ 0x71687070, 0x6E71686E, 0x68707469, 0x71667074,
+ 0x6E6F656D, 0x69727369, 0x70687473, 0x716F6772,
+ 0x626B6C62, 0x6C636B6C, 0x6B6C636B, 0x636B6C63,
+ 0x685D6B6C, 0x60645964, 0x5E63645A, 0x675E6667,
+ 0x63645B66, 0x5561655A, 0x5F555C60, 0x5E5F555E,
+ 0x525C5D53, 0x574E5B5C, 0x55564D56, 0x48505148,
+ 0x483F5051, 0x47483F47, 0x383E4138, 0x403A3E41,
+ 0x3E403A3E, 0x4B3F3F39, 0x504C5151, 0x4F504C4F,
+ 0x68545551, 0x6B676D6C, 0x6A6B676C, 0x6F737470,
+ 0x746F7074, 0x70746F70, 0x777A7B77, 0x7B79787C,
+ 0x767B7976, 0x87898D88, 0x8C87888C, 0x8B8D8788,
+ 0x80898983, 0x89808889, 0x85878188, 0x6B6D716C,
+ 0x716C6C70, 0x6D716C6D, 0x61626660, 0x66606367,
+ 0x63676162, 0x5C5A605B, 0x605B5B61, 0x4D514C5C,
+ 0x3F42433F, 0x423E4243, 0x43423E43, 0x373D3C38,
+ 0x3C383D3D, 0x4845403F, 0x42494943, 0x544C4848,
+ 0x56544C56, 0x5B5D5A55, 0x605B6360, 0x61615B63,
+ 0x63666862, 0x645E6569, 0x62645E62, 0x63666763,
+ 0x67636468, 0x6D6D6766, 0x6473706B, 0x6C646E6C,
+ 0x6E6C646E, 0x656C6D64, 0x6C676D6E, 0x6F6C676F,
+ 0x6D74756C, 0x746B7576, 0x70716873, 0x6B787970,
+ 0x6E647374, 0x6A6B616D, 0x6B71746B, 0x6F657174,
+ 0x6E6F656E, 0x6773746A, 0x766B7071, 0x73776C72,
+ 0x70787970, 0x7B727879, 0x7A7B727A, 0x7376776E,
+ 0x776C7B7C, 0x70746973, 0x6C79796D, 0x776B7977,
+ 0x7B7B6F77, 0x697E7C71, 0x796E7874, 0x807C717F,
+ 0x6C7A786D, 0x7C727878, 0x79786E7D, 0x73787970,
+ 0x7E757B7C, 0x7C7D747D, 0x767B7B75, 0x7E757C7C,
+ 0x7D7E757D, 0x707B7C73, 0x79707879, 0x7B7C7378,
+ 0x757D7E75, 0x7E757D7E, 0x7D7E757D, 0x747B7C72,
+ 0x7B737D7E, 0x7E7C747D, 0x777F7C77, 0x70687F7C,
+ 0x76746C72, 0x6F797570, 0x73707874, 0x77747078,
+ 0x00494746, 0x01010000, 0x00000001, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00010000, 0x9A393A36, 0xA399A0A3, 0xA3A599A2,
+ 0x999FA397, 0xA498A1A5, 0x989C90A0, 0x91989C91,
+ 0xA59A989C, 0x9FA49B9F, 0x6FA9B0A9, 0x01006E74,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000001,
+ 0x34080606, 0x9E933738, 0x989F929A, 0x92999D91,
+ 0x9D929A9E, 0x979B8F99, 0x8E989D8E, 0x9E8D999F,
+ 0x9AA08F98, 0x88959C8D, 0x9B8F9097, 0x9CA09497,
+ 0x909C9F90, 0x9E8F9C9F, 0x9DA0919B, 0x959FA195,
+ 0xA4989FA1, 0x9DA195A0, 0x989FA59A, 0x9C939DA3,
+ 0x92988D97, 0x9399A091, 0xA4949CA4, 0x98A2929A,
+ 0x929AA192, 0xA5969AA1, 0x9AA1929E, 0x93979C8D,
+ 0x9F939DA2, 0x9B9F939B, 0x97A0A499, 0xA2979EA2,
+ 0x9FA3989E, 0x98A0A498, 0xA498A0A4, 0x9EA598A0,
+ 0x9B9FA59A, 0xA59B9DA5, 0x9DA59B9D, 0x99A3A79C,
+ 0xA79BA0A4, 0xA1A89BA3, 0x9A9FA79C, 0xA49B9DA5,
+ 0xA1A79C9F, 0x9EA8ACA0, 0xA79BA8AD, 0xA8ACA0A3,
+ 0xA1A9ADA1, 0xAEA2A9AD, 0xA9ADA1AA, 0xA4ABAFA3,
+ 0xAFA3ACB0, 0xABB2A5AB, 0xA4A8B1A4, 0xAEA5A8B1,
+ 0xA9AFA4A9, 0xA5A9ADA2, 0xB0A5ADB1, 0xA9AEA5AA,
+ 0xAAAFB2A9, 0x7A74B0B3, 0x08090578, 0x00000100,
+ 0x02000001, 0x00010001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000102,
+ 0x00000000, 0x00000000, 0x01010000, 0x00010001,
+ 0x90969892, 0x04009699, 0x00030100, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x494A4802, 0x93A1A8A1,
+ 0x9C95949D, 0x959C9595, 0x8C90998F, 0x938A8E96,
+ 0x8F92898E, 0x898E9287, 0x90879094, 0x8D90878D,
+ 0x878E9287, 0x8D838E92, 0x9091888C, 0x88909188,
+ 0x92898E91, 0x8E91888F, 0x838B8E85, 0x91888A8E,
+ 0x8A8D8490, 0x84888B82, 0x8B85888D, 0x868E8487,
+ 0x858A9085, 0x90858A90, 0x8C8F868C, 0x868C9085,
+ 0x948A8D91, 0x90948993, 0x858F958A, 0x9086898E,
+ 0x8D958B88, 0x8B8B9389, 0x968B9096, 0x8E948990,
+ 0x8C8E938A, 0x958B9095, 0x8E958E8D, 0x8C90948E,
+ 0x98918E92, 0x92999291, 0x8D94978E, 0x9A8F9697,
+ 0x96999096, 0x91949990, 0x9A91959A, 0x96999097,
+ 0x89949A8F, 0x988F9094, 0xA4A49E97, 0x00666862,
+ 0x05000004, 0x00040001, 0x00000100, 0x01000000,
+ 0x383C3700, 0x9A9EA09A, 0x35319EA0, 0x00010034,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010200, 0x01000001, 0x4F504C00,
+ 0x6D827F7A, 0x78737572, 0x7C79747B, 0x75787773,
+ 0x77737A79, 0x7574707A, 0x71767970, 0x786F777A,
+ 0x797C7375, 0x707B7C73, 0x79707879, 0x80817878,
+ 0x747D7E75, 0x7E757C7D, 0x7D7E757D, 0x767D7E75,
+ 0x7C737E7F, 0x7D7E757B, 0x757D7E75, 0x7C737D7E,
+ 0x7B7C737B, 0x78818279, 0x786F8081, 0x7C7D7477,
+ 0x76808178, 0x7C737E7F, 0x7D7E757B, 0x757D7E75,
+ 0x7C737D7E, 0x7879707B, 0x7077786F, 0x736A7879,
+ 0x76776E72, 0x777A7C76, 0x746F7B7D, 0x75797470,
+ 0x73747873, 0x756F7478, 0x74746E73, 0x6873756F,
+ 0x746B6E71, 0x797A7173, 0x5F6E6F65, 0x6F666869,
+ 0x6E6F666E, 0x67707168, 0x6F676F70, 0x716F6771,
+ 0x636B6C63, 0x7065696C, 0x6C70656C, 0x62707168,
+ 0x675D6A6B, 0x6B6C6266, 0x5D65665C, 0x645B6667,
+ 0x64655C63, 0x6167685F, 0x635B696A, 0x5E5F5565,
+ 0x52595D52, 0x5E535A5E, 0x5A5E535A, 0x52585C51,
+ 0x5046595D, 0x5051484F, 0x42474A41, 0x4A444648,
+ 0x3E403A48, 0x3840403A, 0x413B4041, 0x40403A41,
+ 0x3941413B, 0x403A3F3F, 0x54565040, 0x575A5B57,
+ 0x5C57585C, 0x585C5756, 0x61626361, 0x63616263,
+ 0x60636160, 0x60606361, 0x63615F62, 0x62636162,
+ 0x5D64645E, 0x655F6363, 0x3C403A63, 0x53373B36,
+ 0x57525458, 0x53575253, 0x494E4D49, 0x4D494E4D,
+ 0x4E4D494E, 0x3F40413F, 0x413F3E41, 0x40413F40,
+ 0x3E40443F, 0x433F3F43, 0x43453F42, 0x46464640,
+ 0x4F4A4E4F, 0x504E4652, 0x4D54554C, 0x61585556,
+ 0x60615860, 0x59616259, 0x69606162, 0x61615B68,
+ 0x63666763, 0x635F6468, 0x66676362, 0x67666763,
+ 0x6C666A6B, 0x6C6C666C, 0x676D6A65, 0x6B666F6C,
+ 0x73706B6E, 0x676B6B65, 0x6E656D6D, 0x7071686D,
+ 0x7075766D, 0x78707879, 0x75736B7A, 0x6773746B,
+ 0x6F656F70, 0x6A6B616E, 0x6A6C6F66, 0x746A7073,
+ 0x77786E73, 0x6E73746A, 0x786C7778, 0x75796D74,
+ 0x6D77786E, 0x786F7677, 0x78797077, 0x737B7C73,
+ 0x776D7B7C, 0x75766C76, 0x6D77796D, 0x75697979,
+ 0x7A786D75, 0x71807C71, 0x7C71807C, 0x807C7182,
+ 0x6E7E7C72, 0x786E7978, 0x7B7C7279, 0x707B7C73,
+ 0x7A717879, 0x7B7C7379, 0x737B7C73, 0x7E757B7C,
+ 0x7D7E757D, 0x747D7E75, 0x79707C7D, 0x78797078,
+ 0x787E7F76, 0x7C738081, 0x76797079, 0x757B7C73,
+ 0x7B767D7E, 0x7D7A757E, 0x737D7D77, 0x70687979,
+ 0x72706872, 0x7078746F, 0x75707873, 0x55545078,
+ 0x00000100, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x01010000,
+ 0x1E1F1B01, 0x98A0A39A, 0xA498A0A4, 0xA0A498A0,
+ 0x94A0A498, 0x9F939CA0, 0x9B9F939B, 0x90989C90,
+ 0xA79A989C, 0x9FA59AA0, 0xAAAAB1AA, 0x7570A8AF,
+ 0x0001006F, 0x00000000, 0x01010000, 0x02000003,
+ 0x06080507, 0x6B650606, 0x989E9369, 0x92979E91,
+ 0x9D929A9E, 0x969A8E99, 0x8D9A9F90, 0x9C8B989E,
+ 0x989E8D96, 0x8D959C8D, 0xA094959C, 0x979B8F9C,
+ 0x909B9D91, 0x9B8F9A9C, 0x9A9E9299, 0x959B9F93,
+ 0xA1959DA1, 0x9DA1959D, 0x959EA499, 0x9D929AA0,
+ 0xA0A49999, 0x92989F90, 0xA3949AA1, 0x9CA3949C,
+ 0x949CA394, 0xA5969CA3, 0x9AA1929E, 0x95999D91,
+ 0x9F939DA1, 0x9DA1959B, 0x98A1A599, 0xA599A0A4,
+ 0xA1A599A1, 0x9CA1A79C, 0xA79CA1A7, 0xA1A79CA1,
+ 0x9DA2A89D, 0xA89EA2A8, 0x9DA59BA0, 0x9DA5A99E,
+ 0xAA9BA5A9, 0xA1A899A5, 0x9DA1A99E, 0xA4999FA7,
+ 0x9FA59A9E, 0xA1A5A99D, 0xA79BA9AD, 0xA6ADA0A3,
+ 0xA1A8ACA0, 0xADA1A9AD, 0xA9ADA1A9, 0xA2ABAFA3,
+ 0xACA0AAAE, 0xA9B0A3A8, 0xA4A8B1A4, 0xAFA5A7B1,
+ 0xAAB0A5A7, 0xA4A7ABA0, 0xB1A6ACB0, 0xAAB0A5AB,
+ 0xA8B0B4A9, 0xB4A9B0B4, 0xB1B5AAB0, 0x003B3D37,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000001, 0x01000000, 0x3A3B3700,
+ 0x91969990, 0x3530979A, 0x00020031, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000001, 0x4A4B4901, 0x93A1A8A1,
+ 0x9C95949D, 0x949C9595, 0x8F919A90, 0x988F9099,
+ 0x90958C93, 0x898F9388, 0x94899094, 0x90938A90,
+ 0x88909188, 0x91889192, 0x90918890, 0x88909188,
+ 0x91889091, 0x8E91888E, 0x878F9086, 0x90879091,
+ 0x9192898F, 0x87898C83, 0x8F898B90, 0x8B90878B,
+ 0x878E9489, 0x938A8D94, 0x91948B90, 0x858A8F86,
+ 0x938A8A90, 0x91948B90, 0x8B91948B, 0x948B8F94,
+ 0x9499908F, 0x8B90968B, 0x998E9096, 0x90968B93,
+ 0x8F91968D, 0x988F9398, 0x93979193, 0x8D8E928C,
+ 0x98918F93, 0x93988F91, 0x8D969990, 0x99909697,
+ 0x979A9196, 0x90969990, 0x99909699, 0x969A8F96,
+ 0x89949A8F, 0x9F969094, 0x90928C9C, 0x00000400,
+ 0x04000105, 0x00040000, 0x00010101, 0x3B390000,
+ 0xA9AFAA36, 0x989BA097, 0x9E9A9EA1, 0x0001009D,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x00010000,
+ 0x7A6F6C68, 0x7873827F, 0x7B78737B, 0x777A7975,
+ 0x79757A7B, 0x74746E7A, 0x72767970, 0x7B72787B,
+ 0x76797078, 0x747B7C73, 0x7C737C7D, 0x7D7E757B,
+ 0x737B7C73, 0x7B727B7C, 0x7B7C737A, 0x72787970,
+ 0x7C737A7B, 0x7D7E757B, 0x757D7E75, 0x7C737D7E,
+ 0x7D7E757B, 0x747C7D74, 0x7D747C7D, 0x7C7D747C,
+ 0x777B7E75, 0x7C737D80, 0x7E7F767B, 0x747B7C73,
+ 0x786F7C7D, 0x78797077, 0x6E797A71, 0x786F7677,
+ 0x7B7E7577, 0x6E7B7D77, 0x78737274, 0x74787374,
+ 0x72747873, 0x78727478, 0x73756F76, 0x686E7168,
+ 0x756C6E71, 0x78797072, 0x6272736A, 0x6C636B6C,
+ 0x6C6D646B, 0x686D7067, 0x70676E71, 0x6F70676F,
+ 0x696C6F66, 0x74697074, 0x6C706570, 0x63707167,
+ 0x675D6C6D, 0x6B6C6266, 0x606B6D61, 0x635A6A6C,
+ 0x66675E62, 0x60696A61, 0x69606869, 0x63645A68,
+ 0x58606459, 0x64595E65, 0x60645960, 0x51595D52,
+ 0x5B51585C, 0x5B5C525A, 0x4D52544E, 0x534D5153,
+ 0x48484253, 0x38404138, 0x41384041, 0x40413840,
+ 0x38424038, 0x41384240, 0x40403A40, 0x3F42433F,
+ 0x443F4044, 0x3F433E40, 0x494A4B47, 0x4B49484B,
+ 0x484B4948, 0x39373A38, 0x1010383B, 0x10110F10,
+ 0x171C1B17, 0x3F3B1C1B, 0x3C403B3E, 0x37383C37,
+ 0x3C37383C, 0x3A3B3738, 0x30353430, 0x34303734,
+ 0x35343037, 0x40434140, 0x40404240, 0x42403F42,
+ 0x484A4B47, 0x544E4B4C, 0x54544E52, 0x50575751,
+ 0x57525859, 0x5A58505A, 0x5760605A, 0x615B5F60,
+ 0x60615861, 0x6067685F, 0x69606869, 0x68686268,
+ 0x65666763, 0x67636467, 0x66676366, 0x676A6B67,
+ 0x6B656A6B, 0x70706A6B, 0x6B71716B, 0x706B7171,
+ 0x75756F73, 0x6771716B, 0x71686D6D, 0x71726970,
+ 0x70707168, 0x78707879, 0x77756D7A, 0x6A74756C,
+ 0x70667374, 0x6E6F656F, 0x616A6B61, 0x6F656A6B,
+ 0x78796F6E, 0x7176776D, 0x786C7A7B, 0x75776B76,
+ 0x7177786E, 0x78707A7B, 0x7C7A727A, 0x737B7C73,
+ 0x766C7B7C, 0x7C7D7375, 0x707A7C70, 0x786D7C7C,
+ 0x79776C7A, 0x727B796E, 0x786D7F7D, 0x79776C7C,
+ 0x727D7C72, 0x7C727B7C, 0x7B7C727B, 0x747D7E75,
+ 0x786F7C7D, 0x78797077, 0x757B7C73, 0x81787D7E,
+ 0x80817880, 0x787B7C73, 0x7F768081, 0x7A7B727E,
+ 0x757A7B72, 0x7E757D7E, 0x787B727B, 0x75797A71,
+ 0x7A757D7E, 0x7D7A757D, 0x71797973, 0x7974797A,
+ 0x76736E7C, 0x7077746F, 0x756F7875, 0x11120E75,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00000000, 0x01000001,
+ 0x595B5500, 0x96A0A498, 0xA498A0A5, 0xA0A498A0,
+ 0x959DA196, 0xA0949CA0, 0x9DA1959C, 0x90989C90,
+ 0xA79A989C, 0x9EA499A0, 0xA7A9B1A7, 0xB0A9A9B1,
+ 0x717570A9, 0x00000200, 0x00000001, 0x02000002,
+ 0x06080507, 0x06020806, 0x989D9405, 0x92989F92,
+ 0x9D91989F, 0x989C9099, 0x8C989F90, 0x9C8B959D,
+ 0x969B8C96, 0x8F959C8D, 0xA195959C, 0x979B8F9D,
+ 0x929C9E92, 0x9C909C9E, 0x999D9198, 0x959DA195,
+ 0xA3979FA4, 0x9DA1959F, 0x94A1A599, 0x9C909AA1,
+ 0xA0A49898, 0x949BA295, 0xA2939CA3, 0x9DA4959B,
+ 0x969CA394, 0xA3949EA5, 0x9BA2939C, 0x95A1A599,
+ 0xA1959DA1, 0x9B9F939D, 0x97A1A599, 0xA4989FA3,
+ 0xA1A599A0, 0x9CA2A89D, 0xA69DA1A7, 0xA2A79EA1,
+ 0x9EA2A89D, 0xA79CA3A9, 0x9FA59AA1, 0x9AA2A89D,
+ 0xAA9BA2A6, 0xA1A899A5, 0x99A1A79C, 0xA59A9CA4,
+ 0x9FA59A9D, 0xA0A5A99D, 0xA79AA8AC, 0xA7AEA1A0,
+ 0xA1A9ADA1, 0xAEA2A9AD, 0xAAAEA2AA, 0xA3ABAFA3,
+ 0xB1A5ABAF, 0xA6ADA0AD, 0xA3A7B0A3, 0xB0A5A6B0,
+ 0xA9B1A6A8, 0xA5A6ADA0, 0xB0A5ADB1, 0xAAB0A5AA,
+ 0xA8B0B4A8, 0xB4A8B0B4, 0xAFB3A7B0, 0x36B0B3AA,
+ 0x01003A3C, 0x01020000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x07080409, 0x06060805, 0x6F706C06,
+ 0x98A1A59A, 0x756F9FA3, 0x18191773, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000000,
+ 0x00010402, 0x03000004, 0x61656000, 0x99A2A9A2,
+ 0x9F9A99A0, 0x979F9898, 0x93949C92, 0x9990979C,
+ 0x96999096, 0x8F92978E, 0x96909398, 0x94969094,
+ 0x8B969690, 0x948E9394, 0x93948B94, 0x8992938A,
+ 0x938A9293, 0x90938A90, 0x818E8F85, 0x8B828A8B,
+ 0x92938A8A, 0x8691948B, 0x948B8C8F, 0x91948B91,
+ 0x8891958A, 0x958C9094, 0x91948B94, 0x8B899187,
+ 0x938C8C95, 0x8E938A8C, 0x8C888B82, 0x90859295,
+ 0x9094898C, 0x8C93968D, 0x978E9295, 0x90938A94,
+ 0x8D8F9388, 0x998F9697, 0x96999098, 0x8B93968D,
+ 0x99908F94, 0x96999096, 0x90989990, 0x9A8F9899,
+ 0x95988F96, 0x94989990, 0x9B929A9A, 0x989C9198,
+ 0x92979B90, 0x9B92999D, 0x33352F98, 0x00000400,
+ 0x04000004, 0x00040000, 0x3C060808, 0xA6A43A3C,
+ 0xA1A7A2A1, 0x94979C93, 0x9C96989D, 0x6F706C98,
+ 0x00000100, 0x01010200, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x01010101, 0x00010001,
+ 0x782C2827, 0x7B787F7C, 0x807D7980, 0x77767773,
+ 0x7B77787C, 0x7677737A, 0x72767872, 0x736D7678,
+ 0x76787271, 0x767A7C76, 0x78727A7C, 0x76787276,
+ 0x707B7C73, 0x7F767879, 0x7B7C737E, 0x7477786F,
+ 0x79707C7D, 0x7B7C7378, 0x747B7C73, 0x7B727C7D,
+ 0x7B7C737A, 0x787C7D74, 0x82798081, 0x7C7D7481,
+ 0x787A7B72, 0x81788081, 0x7A7D747E, 0x737B7E75,
+ 0x7A71797C, 0x76797077, 0x70787970, 0x79707879,
+ 0x787B7276, 0x75787B72, 0x7D77797E, 0x787C767B,
+ 0x6C747872, 0x756C7075, 0x70736A70, 0x6E70736A,
+ 0x78727477, 0x777A7176, 0x68707168, 0x71687071,
+ 0x6E716870, 0x6C6B7067, 0x726C7075, 0x70736A70,
+ 0x6E70736A, 0x776B7579, 0x73776B73, 0x60707468,
+ 0x6C60686C, 0x686C6068, 0x60686C60, 0x6B62686C,
+ 0x686B6268, 0x61686960, 0x695F696A, 0x60645968,
+ 0x5E606459, 0x695D6569, 0x60645965, 0x5A61655A,
+ 0x645A6364, 0x5F605663, 0x525D5D57, 0x58505858,
+ 0x5B59515A, 0x4B4D4F49, 0x504A4F51, 0x50504A50,
+ 0x40484940, 0x48424849, 0x49494348, 0x3A40403A,
+ 0x3F393E40, 0x3E403A3D, 0x433B3D37, 0x3C374448,
+ 0x363B3938, 0x332F3230, 0x00003133, 0x00000000,
+ 0x14020000, 0x2B2B1715, 0x292C2A2B, 0x37383B39,
+ 0x3D38363C, 0x3A3B3739, 0x383D3C38, 0x47433F3C,
+ 0x48474348, 0x4A4D4B4A, 0x4B4A4D4B, 0x5553524D,
+ 0x4F575450, 0x5A555754, 0x5D5A555D, 0x575F5C57,
+ 0x5F5C5F5C, 0x64615C64, 0x62656460, 0x66626868,
+ 0x6A676269, 0x636A6762, 0x66616B68, 0x6B6A6669,
+ 0x67686967, 0x6B676869, 0x6C6D696C, 0x6B696B65,
+ 0x6C666F71, 0x70706A6C, 0x6E74746E, 0x746E7274,
+ 0x74746E74, 0x6F75756F, 0x71687774, 0x70716770,
+ 0x6A6E7168, 0x756F7073, 0x75766D75, 0x6A6F7066,
+ 0x71677374, 0x6F706670, 0x626D6C62, 0x70666D6C,
+ 0x74736971, 0x6C78776D, 0x786C7878, 0x78786C78,
+ 0x6D76786C, 0x7B717779, 0x7C7B717C, 0x6F797A70,
+ 0x7A707879, 0x797A7079, 0x6D79796D, 0x786D7979,
+ 0x7A7A6E7A, 0x6C79796D, 0x7C707678, 0x7A7C707A,
+ 0x7178796F, 0x7D72787C, 0x777B7079, 0x75787970,
+ 0x7C737D7E, 0x7879707B, 0x73787970, 0x7C737B7C,
+ 0x7879707B, 0x737B7C73, 0x786D7B7C, 0x797D7274,
+ 0x6F78796F, 0x79707879, 0x78797078, 0x73787970,
+ 0x7C767B7C, 0x7C7C767C, 0x6F79776F, 0x76717977,
+ 0x79767179, 0x727A7772, 0x2B257878, 0x03040029,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000301, 0x36320004,
+ 0x9EA19835, 0x939DA195, 0x9F939DA2, 0x979B909B,
+ 0x93989C90, 0xA2969B9F, 0x9A9E929E, 0x969FA397,
+ 0xA3979EA2, 0xA2A69A9F, 0x9DA2A89D, 0xAFA6A2A8,
+ 0xB5BAB1AA, 0x006E726C, 0x01000002, 0x00000000,
+ 0x00020000, 0x01000200, 0x3E403A00, 0x99A0A499,
+ 0xA498A1A5, 0xA0A498A0, 0x8D9BA091, 0x9E8F989E,
+ 0x9B9F9399, 0x8E9CA094, 0x9B8F969A, 0x9CA09497,
+ 0x939DA195, 0x9B8F9B9F, 0x9B9F9397, 0x959EA394,
+ 0xA394A0A6, 0x9FA495A0, 0x8DA2A798, 0x9484979C,
+ 0x989D8E91, 0x989DA497, 0xA5989CA5, 0x9DA4979C,
+ 0x9A9CA396, 0xA296A2A6, 0x9EA2969E, 0x989DA195,
+ 0xA394A0A4, 0x9A9F909E, 0x989FA699, 0xA5989EA5,
+ 0x9EA5989E, 0x9CA1A79C, 0xA89DA1A7, 0xA1A79CA2,
+ 0x9CA0A499, 0xA89CA3A7, 0xA1A89BA4, 0x9DA2A89D,
+ 0xAA9DA2A8, 0xA0A79AA3, 0x999EA598, 0xA59A9CA4,
+ 0x9DA59A9D, 0x9CA3AA9D, 0xA99AA4A8, 0xA7AC9DA4,
+ 0x9FA6ADA0, 0xAFA3A5AC, 0xABAFA3AB, 0xA3ADAFA3,
+ 0xAFA3ADAF, 0xA9B0A3AB, 0x9FA3AC9F, 0xAFA3A2AC,
+ 0xA6AEA3A5, 0xA5A6ADA0, 0xAFA4ADB1, 0xABB1A6A9,
+ 0xA4ABAFA4, 0xB2A6ACB0, 0xADB1A5AE, 0xAAB0B4A9,
+ 0x7A74B1B5, 0x08090578, 0x00000100, 0x00010000,
+ 0x00000100, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x09080409, 0x06060804, 0xA5A6A206,
+ 0x99A0A499, 0xA29CA0A4, 0x191A16A0, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000400, 0x04000105, 0x90948E00, 0x999EA59E,
+ 0x9F9A99A0, 0x99A09999, 0x94969E94, 0x9A91989D,
+ 0x989B9297, 0x8E93988F, 0x98929297, 0x96989296,
+ 0x8B93938D, 0x978E9394, 0x90918896, 0x8D8E9188,
+ 0x948B9396, 0x8E938A8F, 0x8A91948B, 0x958C9394,
+ 0x94958C94, 0x8B91948B, 0x948B9194, 0x92968B91,
+ 0x8A92968B, 0x978E9296, 0x91948B96, 0x89899089,
+ 0x90898890, 0x8E938A89, 0x8A8C8F86, 0x94899093,
+ 0x91958A90, 0x8D93948B, 0x958C9596, 0x92958C92,
+ 0x8B95968C, 0x978D9495, 0x98998F98, 0x8D91948B,
+ 0x9A919196, 0x98999097, 0x8F999A91, 0x9A8F9798,
+ 0x96999096, 0x92989990, 0x99909898, 0x989B9296,
+ 0x91989C91, 0x6761989C, 0x00010065, 0x00000400,
+ 0x04000004, 0x00030000, 0x6F070A08, 0xA7A26C71,
+ 0xA0A8A1A0, 0x93989C96, 0x9D94979C, 0xAEB2AC98,
+ 0x00363735, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x27020000, 0x7B7A2C28, 0x7F7C787F, 0x77757672,
+ 0x7873787C, 0x75767274, 0x6F72746E, 0x77737375,
+ 0x75767276, 0x76767872, 0x7B777A7C, 0x7A7C767A,
+ 0x777E7F76, 0x7C737F80, 0x7C7D747B, 0x75808178,
+ 0x7F767D7E, 0x7B7C737E, 0x737B7C73, 0x7F767B7C,
+ 0x7C7D747E, 0x757C7D74, 0x7B727D7E, 0x7D7E757A,
+ 0x747C7D74, 0x7D747A7D, 0x787B727A, 0x74767970,
+ 0x7C737A7D, 0x75786F79, 0x73767970, 0x7A71797C,
+ 0x787B7277, 0x73777C73, 0x7C76777C, 0x73786F78,
+ 0x6C747970, 0x736A7075, 0x6E736A6E, 0x73777A71,
+ 0x7A74797C, 0x77797376, 0x696E7168, 0x736A7172,
+ 0x6E716872, 0x6A6C7168, 0x716B6C74, 0x72756C6D,
+ 0x6B74786D, 0x796D7377, 0x73776B75, 0x606D7165,
+ 0x7065686C, 0x686C606C, 0x60686C60, 0x6F66676B,
+ 0x6C6F666C, 0x606F7067, 0x695F6869, 0x60645968,
+ 0x626A6E63, 0x675C696D, 0x66675D63, 0x6063645B,
+ 0x645B6869, 0x60615863, 0x5763645B, 0x58505D5D,
+ 0x5F5D555A, 0x575C5E58, 0x5751595D, 0x57575155,
+ 0x4952534A, 0x514B5152, 0x51514B51, 0x41464940,
+ 0x4943474A, 0x47494349, 0x42464842, 0x3C374448,
+ 0x363C3738, 0x32313432, 0x01013032, 0x00000001,
+ 0x2C020000, 0x3F412C2C, 0x3E404040, 0x43383B39,
+ 0x48434448, 0x45464244, 0x43484743, 0x514D4847,
+ 0x52514D52, 0x52555450, 0x5B5A5553, 0x5D5C585D,
+ 0x555C5954, 0x5A555D5A, 0x64615C5D, 0x5D62615D,
+ 0x615D6261, 0x6A676364, 0x63696864, 0x6D696867,
+ 0x6F6C6870, 0x676E6A65, 0x6A66706C, 0x6968646D,
+ 0x676A6867, 0x6D696A6B, 0x6E6D696E, 0x6A6A6C66,
+ 0x746E6E70, 0x6F6F6974, 0x6E6E706A, 0x78727274,
+ 0x74746E76, 0x7175756F, 0x766C7B79, 0x70716775,
+ 0x6B6D7067, 0x78727174, 0x78797078, 0x6A707167,
+ 0x71687476, 0x72716770, 0x65717066, 0x70687270,
+ 0x7A796F72, 0x6979796D, 0x786D7674, 0x7575697A,
+ 0x707A7C70, 0x7B717A7C, 0x79786E7C, 0x7078796F,
+ 0x7A70797A, 0x7A7B7179, 0x6B7C7C70, 0x786D7777,
+ 0x7C7C707A, 0x6D7A7C70, 0x7C707579, 0x74786C78,
+ 0x72767A6F, 0x7B70797D, 0x797D7277, 0x737B7C73,
+ 0x7D747B7C, 0x7879707C, 0x767B7C73, 0x7E757E7F,
+ 0x7E7F767D, 0x6F7B7C73, 0x74697778, 0x70746970,
+ 0x6E727369, 0x79707778, 0x78797078, 0x757C7D74,
+ 0x7A747D7E, 0x7C7D747A, 0x6F79776F, 0x7D787977,
+ 0x716E6980, 0x4B797973, 0x04004F51, 0x00040000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000300, 0xA09A0004,
+ 0x9FA2999E, 0x959DA195, 0xA0949DA1, 0x9B9F939C,
+ 0x939DA195, 0xA1959B9F, 0x9B9F939D, 0x96A0A498,
+ 0xA3979EA2, 0xA1A5999F, 0x9CA4A89C, 0xA89CA4A8,
+ 0xA4A89DA4, 0x6CA5AAA1, 0x02006E72, 0x00010001,
+ 0x00020000, 0x00000200, 0x00010000, 0x996D7067,
+ 0xA498A0A4, 0xA0A498A0, 0x929DA293, 0x9B8F9CA1,
+ 0x9B9F9397, 0x969CA095, 0xA0949DA1, 0x9DA1959C,
+ 0x939DA195, 0x9F939B9F, 0x9BA0919B, 0x959FA495,
+ 0xA393A0A6, 0xA0A393A0, 0x82A2A897, 0x88758D93,
+ 0x989E8D84, 0x999DA497, 0xA5989CA4, 0x9EA5989C,
+ 0x97A0A499, 0xA4989EA2, 0x9FA397A0, 0x98A0A498,
+ 0xA394A0A4, 0x9BA0919E, 0x98A1A89B, 0xA5989EA5,
+ 0x9EA5989E, 0x9CA1A79C, 0xA79CA1A7, 0xA1A79CA1,
+ 0x9EA3A79C, 0xA498A6AA, 0xA0A498A0, 0x9CA0A69B,
+ 0xA89DA1A7, 0xA2A89DA2, 0x9CA0A79A, 0xA99F9FA7,
+ 0x9FA79DA1, 0x9FA1A79C, 0xAD9EA7AB, 0xAAAFA0A8,
+ 0xA4A7AB9F, 0xAEA2ACB0, 0xABAFA3AA, 0xA3ADAFA3,
+ 0xAFA3ADAF, 0xABB2A5AB, 0xA6A9B2A5, 0xB1A6A9B3,
+ 0xA9B1A6A9, 0xA7ADB1A5, 0xB2A7AFB3, 0xABB1A6AE,
+ 0xA4ADB1A6, 0xB1A5ABAF, 0xADB1A5AD, 0xA9B0B4A8,
+ 0xB3AAB0B4, 0x797B75B0, 0x003B3C38, 0x00000001,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010101,
+ 0x00000100, 0x07060509, 0x706E0605, 0xA5A7A16F,
+ 0x999EA499, 0xA2999EA4, 0x72746E9F, 0x00050604,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000400, 0x03000004, 0x91958F00, 0x9AA4A8A2,
+ 0x9F989CA4, 0x9CA39C98, 0x94969E94, 0xA09A969E,
+ 0x989C969C, 0x90949892, 0x99909699, 0x96978D96,
+ 0x8E93948A, 0x988D9798, 0x94978E94, 0x9193988F,
+ 0x958E9198, 0x8E938A8E, 0x8C91948B, 0x928A9495,
+ 0x92938A94, 0x8A91958A, 0x8F868F95, 0x858B808A,
+ 0x8A92968B, 0x958C9296, 0x90938A94, 0x8A899187,
+ 0x968C8B94, 0x90958C8E, 0x8B91948B, 0x948B9394,
+ 0x999A9193, 0x8B96978D, 0x978D9495, 0x94958B96,
+ 0x8E919289, 0x99919697, 0x9899909B, 0x8A90958C,
+ 0x938A8E93, 0x979A9190, 0x90969990, 0x9A919699,
+ 0x96999097, 0x9395988F, 0x9B92999C, 0x96999098,
+ 0x929A9B92, 0x01009A9B, 0x00010000, 0x00000400,
+ 0x04000004, 0x01050000, 0xA26C726D, 0xA7A0A2A9,
+ 0x9FA7A09F, 0x94989C96, 0x9E94989D, 0x989D9496,
+ 0x006A6E69, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x52510200, 0x7F7C7856, 0x6D6E6F6B,
+ 0x756F7173, 0x74746E73, 0x6E70706A, 0x7C777274,
+ 0x75797478, 0x776F736E, 0x7B757A7B, 0x7C7C7679,
+ 0x747C7D74, 0x7C737C7D, 0x7B7C737B, 0x78808178,
+ 0x7E758081, 0x7B7C737D, 0x737B7C73, 0x7C737B7C,
+ 0x7C7D747B, 0x737D7E75, 0x7E757B7C, 0x8081787D,
+ 0x727A7D74, 0x7B72767B, 0x767B7276, 0x75797C73,
+ 0x7C737B7E, 0x777A717B, 0x737A7D74, 0x7B72797C,
+ 0x7A7D7478, 0x747C8178, 0x796F767E, 0x717A7071,
+ 0x686E736A, 0x736A6D73, 0x70736A70, 0x71777A71,
+ 0x7973777A, 0x74767077, 0x6A70736A, 0x736A7073,
+ 0x6E716870, 0x6A6A6F66, 0x78726E73, 0x72756C76,
+ 0x70787C71, 0x7A6E767D, 0x767A6E76, 0x656B6F64,
+ 0x79706C70, 0x73746A78, 0x666E6F65, 0x6F666F70,
+ 0x6C6F666C, 0x5F707168, 0x675F6967, 0x68696069,
+ 0x63707168, 0x6C636B6C, 0x66675E6B, 0x6064655C,
+ 0x645B6669, 0x65665D63, 0x5B67685F, 0x645B6364,
+ 0x63645B63, 0x585B5D57, 0x5C58595D, 0x5B5D575B,
+ 0x53585B52, 0x5B55595C, 0x585A545B, 0x4D50544E,
+ 0x534D4F53, 0x51534D51, 0x4C53564D, 0x48425255,
+ 0x44484344, 0x304A4B47, 0x00003132, 0x00000000,
+ 0x2B000000, 0x41412B2B, 0x3E413F41, 0x4E444843,
+ 0x544E5254, 0x52544E52, 0x5852514D, 0x5A565B5C,
+ 0x5A5B5759, 0x585B5C58, 0x5C585B5C, 0x5D5C585B,
+ 0x5B63605B, 0x67626360, 0x6868626A, 0x636A6B67,
+ 0x68646667, 0x68676369, 0x65686965, 0x6C686A69,
+ 0x6C69656F, 0x656C6964, 0x67626D6A, 0x6B6B656A,
+ 0x676C6B67, 0x6D696A6B, 0x6B6B656E, 0x726F716B,
+ 0x746E7678, 0x71716B74, 0x716E7168, 0x7A71777A,
+ 0x74756C79, 0x7077786F, 0x766C7879, 0x72736975,
+ 0x6B707168, 0x78727374, 0x78797078, 0x7074786D,
+ 0x776E7A7C, 0x72716776, 0x69727167, 0x726A7575,
+ 0x7A796F74, 0x6C79796D, 0x776B7A7A, 0x78786C77,
+ 0x6D79776C, 0x796D7A78, 0x7C7C7079, 0x6F797A70,
+ 0x7B717879, 0x78796F7A, 0x7078786C, 0x796D7C7C,
+ 0x77776B79, 0x6B77796D, 0x7D707377, 0x737A6D76,
+ 0x7075796E, 0x7B70777B, 0x777B7077, 0x737A7D74,
+ 0x7E75797C, 0x7D7E757D, 0x6F7D7E75, 0x7C737778,
+ 0x7C7D747B, 0x737B7C72, 0x776D7C7D, 0x76776D76,
+ 0x77707468, 0x877E8081, 0x807D7886, 0x737E7F76,
+ 0x7D747B7C, 0x7879707C, 0x6E79776F, 0x776F7876,
+ 0x7D7D7779, 0x004F514B, 0x04000004, 0x00040000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x66020300, 0xA09A6A6C,
+ 0x9EA1989E, 0x999B9F94, 0xA195A1A5, 0x9DA1959D,
+ 0x929DA195, 0xA5999CA1, 0x9C9E92A3, 0x999EA296,
+ 0xA59AA1A5, 0xA1A599A1, 0x9AA4A89C, 0xA899A4A9,
+ 0xA2A99CA1, 0xA1A7AEA1, 0x726CA6AC, 0x02010070,
+ 0x00000100, 0x02020000, 0x00010002, 0x9B3B3D37,
+ 0xA59AA1A4, 0xA0A499A1, 0x8F9CA094, 0xA093979B,
+ 0x9CA39699, 0x949B9F93, 0xA0949CA0, 0x9CA0949C,
+ 0x939B9F93, 0x9F939B9F, 0x9DA2939B, 0x95A0A596,
+ 0xA493A0A6, 0xA0A6959E, 0x78A2A897, 0x89768389,
+ 0x9A9D8D85, 0x999DA497, 0xA79A9CA4, 0x9DA497A0,
+ 0x999FA397, 0xA397A1A5, 0x9FA3979F, 0x98A0A498,
+ 0xA599A0A4, 0x9CA094A1, 0x9CA2A89D, 0xA79CA1A7,
+ 0xA1A79CA1, 0x9D9FA79C, 0xA89DA0A8, 0xA2A89DA0,
+ 0x9FA5A99D, 0xA89CA7AB, 0xA0A498A6, 0x9D9EA499,
+ 0xA79CA2A8, 0xA1A79CA1, 0x9C9EA499, 0xA79D9FA7,
+ 0xA1A99F9F, 0xA0A2A89D, 0xAFA0A6AD, 0xABB0A1AA,
+ 0xA4ADB1A5, 0xAEA2ACB0, 0xACB0A4AA, 0xA4ABAFA3,
+ 0xB1A5ACB0, 0xADB1A5AD, 0xA8AFB6A9, 0xB2A5ACB5,
+ 0xABB2A5AB, 0xA3ADB1A5, 0xB1A5ABAF, 0xB0B4A8AD,
+ 0xA5ADB1A5, 0xAFA3ADB1, 0xB0B4A8AB, 0xA9B0B4A9,
+ 0xB4A9B0B4, 0xB0B4A9B0, 0x37B0B3AA, 0x01003B3D,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x06060507, 0xA6A20606, 0xA5A89FA5,
+ 0x999DA398, 0xA59A9EA4, 0xA0A39AA1, 0x0010110F,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020301, 0x04000004, 0x90948E03, 0x9AA4A9A0,
+ 0xA39C9EA3, 0x99A0999C, 0x9799A197, 0xA09998A1,
+ 0x969D9699, 0x91949892, 0x9A8F979A, 0x969A8F96,
+ 0x909B9D91, 0x9D92989C, 0x92978E99, 0x9191998F,
+ 0x98919098, 0x91989191, 0x8B969990, 0x99909394,
+ 0x98999098, 0x8A8E938A, 0x948B8F95, 0x8F958A8F,
+ 0x8994988D, 0x948C9293, 0x94958C96, 0x8C8B9087,
+ 0x968B8E96, 0x90948990, 0x8B989990, 0x948B9394,
+ 0x92938A93, 0x8895968C, 0x958B9192, 0x96978D94,
+ 0x8E96978D, 0x958C9798, 0x96978D94, 0x8A8F948B,
+ 0x90878E93, 0x92958C8D, 0x90969990, 0x99909699,
+ 0x96999096, 0x92969990, 0x9B92989B, 0x9A9D9498,
+ 0x2F9A9B92, 0x01003535, 0x00000000, 0x00000400,
+ 0x04000004, 0x84888200, 0x9FA1A8A1, 0xA99FA1A9,
+ 0xA1A99FA0, 0x94989D94, 0x9E94989D, 0x969E9496,
+ 0x6C9EA49F, 0x00006B6E, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x54534F02, 0x6E7C7C76,
+ 0x736D7274, 0x78787273, 0x72787872, 0x7C777678,
+ 0x74787378, 0x7370746F, 0x78727677, 0x7C7C7676,
+ 0x737B7C73, 0x7E757B7C, 0x7D7E757D, 0x767D7E75,
+ 0x7C737E7F, 0x7B7C737B, 0x727B7C73, 0x7C737A7B,
+ 0x7B7C737B, 0x757D7E75, 0x7D747D7E, 0x7D7E757C,
+ 0x727E8178, 0x7D74787B, 0x797C737A, 0x75797C73,
+ 0x7E757B7E, 0x7B7C737D, 0x72787B72, 0x7970787B,
+ 0x787B7276, 0x727C8178, 0x796F767B, 0x71796F71,
+ 0x7170756C, 0x7A71777A, 0x76797077, 0x71787D74,
+ 0x756F757A, 0x77797373, 0x6B73786F, 0x70676F74,
+ 0x6D72696B, 0x6C697167, 0x78726E76, 0x76797076,
+ 0x70787C71, 0x7B6F787C, 0x73776C77, 0x7071746B,
+ 0x79707679, 0x76797076, 0x6B74756C, 0x746B7374,
+ 0x71746B71, 0x6775766D, 0x6F676F70, 0x68696071,
+ 0x6570706A, 0x6B636B6B, 0x6A6B626D, 0x6065665D,
+ 0x665D6669, 0x68696065, 0x5F696A61, 0x645B6768,
+ 0x69696363, 0x5F62645E, 0x635F6263, 0x5B5D5762,
+ 0x5E60645E, 0x5B556064, 0x595B5559, 0x56585C56,
+ 0x5C56585C, 0x5A5C565A, 0x5A60605A, 0x48426060,
+ 0x46474346, 0x314A4B47, 0x00003233, 0x00000000,
+ 0x2B000000, 0x413F2B2B, 0x3E413F3E, 0x5A464743,
+ 0x605A5E60, 0x60605A60, 0x565A5B57, 0x5B57595A,
+ 0x5A5B575A, 0x5E60645E, 0x635F6064, 0x63625E62,
+ 0x5A686862, 0x68626060, 0x68686268, 0x626B6D67,
+ 0x68626668, 0x6B6D6766, 0x656D6C68, 0x6C686A69,
+ 0x6F6C686F, 0x636A6965, 0x6B656969, 0x6B6B656B,
+ 0x676A6B67, 0x6E686A6B, 0x6F716B6E, 0x6F6E706A,
+ 0x77737375, 0x72746E76, 0x7071736D, 0x79707679,
+ 0x78797078, 0x70797A71, 0x79707879, 0x75766D78,
+ 0x6873746B, 0x78727071, 0x75766D78, 0x717A7B71,
+ 0x786E7A7B, 0x72716779, 0x66717066, 0x746A7170,
+ 0x78796F75, 0x6D7A7C70, 0x7A6E797C, 0x7674697A,
+ 0x6C767469, 0x786C7977, 0x7A7A6E78, 0x6F78796F,
+ 0x796F7879, 0x78796F78, 0x6C79796D, 0x7C707878,
+ 0x7274687C, 0x6D787C70, 0x7B6E7579, 0x757C6F74,
+ 0x6F787C71, 0x7B70767A, 0x777B7077, 0x7275796E,
+ 0x7970797D, 0x78796F78, 0x73787970, 0x7C737B7C,
+ 0x7879707B, 0x727B7C72, 0x73697B7C, 0x76776D72,
+ 0x696F7368, 0x80777074, 0x817E797F, 0x70787970,
+ 0x79707879, 0x797A7178, 0x6F79776F, 0x76717977,
+ 0x6A6A6479, 0x01020300, 0x03010003, 0x00030100,
+ 0x00000000, 0x01010000, 0x00000001, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x98363832, 0xA1989EA1,
+ 0x9FA3989E, 0x989B9F94, 0xA1959FA3, 0x9EA2969D,
+ 0x96A0A596, 0xA397A0A5, 0x9DA195A1, 0x9A9FA397,
+ 0xA69AA2A6, 0xA1A599A2, 0x9AA4A89C, 0x9F90A4A9,
+ 0x979E8F98, 0xA0A6ADA0, 0xABA2A6AD, 0x70726CA8,
+ 0x00000100, 0x00000102, 0x00000000, 0x37080905,
+ 0xA39A3B3D, 0xA1A59AA0, 0x949B9F94, 0xA0939AA1,
+ 0x9EA59899, 0x949CA094, 0xA0949CA0, 0x92968A9C,
+ 0x959B9F93, 0xA1959DA1, 0x9A9F909D, 0x95A0A695,
+ 0xA594A0A6, 0xA2A8979F, 0x78989E8D, 0x89768389,
+ 0x9A9D8D87, 0x9B9BA295, 0xA4999EA6, 0x9DA4979E,
+ 0x99A1A599, 0xA599A1A5, 0xA2A69AA1, 0x99A0A498,
+ 0xA499A1A5, 0x9EA297A0, 0x9CA3A79C, 0xA89DA1A7,
+ 0xA3A99EA2, 0x9DA1A79C, 0xA89DA0A8, 0xA2A89DA0,
+ 0x9DA3AA9D, 0xA89CA5A9, 0xA6AA9EA4, 0x9DA3A79C,
+ 0xA99EA2A8, 0x9EA499A3, 0x9C9FA59A, 0xAAA0A1A7,
+ 0xA0A89EA2, 0x9FA0A89D, 0xAFA2A5AC, 0xAAAFA0A8,
+ 0xA3ABAFA3, 0xB5A9ABAF, 0xB0B4A8B1, 0xA5ADB1A6,
+ 0xB4A8ADB1, 0xABB2A5B0, 0xA5AEB5A8, 0xB2A5ABB2,
+ 0xABB2A5AB, 0xA6ADB1A5, 0xB1A5B0B2, 0xB0B4A8AD,
+ 0xA9B0B4A8, 0xB1A5B1B5, 0xABAFA3AD, 0xA9B0B4A9,
+ 0xB4A8B0B4, 0xB0B4A8B0, 0xAAB0B4A9, 0x7771B0B3,
+ 0x00010075, 0x01000100, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x01010001,
+ 0x00000001, 0x40101311, 0xABA24246, 0xA8ACA1A8,
+ 0x9DA2A89D, 0xA89DA2A8, 0xABB1A6A2, 0x00343833,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x06060507, 0x07030606, 0xA8AAA408, 0x9BA3A89F,
+ 0xA59B9DA5, 0x9DA59B9D, 0x9298A197, 0x9B94919C,
+ 0x99A19A93, 0x9799A197, 0x978C9BA0, 0x878E8191,
+ 0x8B898D82, 0x968D9096, 0x91968D91, 0x8E91998F,
+ 0x98918F98, 0x91989190, 0x9092978E, 0x948E9699,
+ 0x90958C92, 0x8A8E938A, 0x958A8E93, 0x91958A8F,
+ 0x8E94958B, 0x978F9998, 0x92938A99, 0x8C8C9188,
+ 0x968B9095, 0x90948990, 0x88929389, 0x968C9192,
+ 0x94958B95, 0x8B94958B, 0x968A9495, 0x96988C94,
+ 0x8B909488, 0x93889397, 0x93978B8F, 0x8C8F9388,
+ 0x988D9397, 0x93978C94, 0x90979B90, 0x998F999A,
+ 0x98998F98, 0x989EA198, 0xA1979EA1, 0x9FA097A0,
+ 0x00777A71, 0x00000001, 0x01010100, 0x0E10140F,
+ 0x79701014, 0xA6ACA176, 0x9799A197, 0xA29799A1,
+ 0x9EA4999A, 0x999EA198, 0x9B929FA2, 0x949C9296,
+ 0x9A999F9A, 0x3B39999F, 0x08090738, 0x00000000,
+ 0x00000200, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07060202, 0x6F787872,
+ 0x78707778, 0x7879707A, 0x6F777973, 0x79737175,
+ 0x787C7675, 0x76767773, 0x7B75797A, 0x797B7579,
+ 0x747B7C73, 0x79707C7D, 0x7D7E7578, 0x757A7C76,
+ 0x7973797B, 0x77797377, 0x757B7C73, 0x7F767D7E,
+ 0x7B7C737E, 0x757B7C73, 0x7C737D7E, 0x7B7C737B,
+ 0x757E7F76, 0x7C737D7E, 0x7D7E757B, 0x75808178,
+ 0x7E757D7E, 0x7D7E757D, 0x707B7C73, 0x7D747879,
+ 0x797C737C, 0x72747970, 0x7970767B, 0x76797076,
+ 0x72787B72, 0x7B72787B, 0x787D7478, 0x73798176,
+ 0x7B72767E, 0x787B7278, 0x6B767B72, 0x70696D75,
+ 0x68706969, 0x69687069, 0x7B726970, 0x787B7278,
+ 0x71797C73, 0x776D7A7B, 0x70746976, 0x7473786F,
+ 0x7B72787D, 0x73786F76, 0x72767970, 0x76707678,
+ 0x76787274, 0x6671746B, 0x6B626C6F, 0x6C6F666A,
+ 0x6A6E706A, 0x6F6A7070, 0x6F706772, 0x626B6C63,
+ 0x685E696D, 0x6B6C6267, 0x606C6D64, 0x68626869,
+ 0x68686268, 0x65686862, 0x68626B6B, 0x67696368,
+ 0x5E656963, 0x645D6064, 0x5E655E5D, 0x5A5C605A,
+ 0x62595E60, 0x60605A5F, 0x5D60625C, 0x4B476261,
+ 0x4D4B4A4E, 0x3552504F, 0x00003535, 0x00000000,
+ 0x31000000, 0x4B473033, 0x4A4B474A, 0x5C52544E,
+ 0x615B6062, 0x61615B61, 0x5E5E605A, 0x635F6264,
+ 0x66676362, 0x645F635E, 0x68626569, 0x6C6C6666,
+ 0x626C6C66, 0x69606868, 0x67685F68, 0x626B6C62,
+ 0x69606B6C, 0x6B6C6368, 0x676F6C67, 0x6F6B6F6C,
+ 0x72716D72, 0x676B6C68, 0x6A666A6B, 0x6A6B6769,
+ 0x67686C67, 0x6B67686C, 0x6D6E6A6A, 0x6F6E726D,
+ 0x75737074, 0x70746F72, 0x7270746E, 0x76707478,
+ 0x76787274, 0x75777973, 0x7B75797B, 0x7879707B,
+ 0x6875736B, 0x79707270, 0x78797078, 0x727B7A70,
+ 0x7A707D7C, 0x77756B7C, 0x67727167, 0x746A7271,
+ 0x76776D73, 0x6D75776B, 0x786D7979, 0x7674697A,
+ 0x6D7A786D, 0x796D7A78, 0x76786C79, 0x6D78786C,
+ 0x796D7979, 0x76786C77, 0x6C78786C, 0x796D7878,
+ 0x7A7C7077, 0x6D75796D, 0x796D7579, 0x777B6F75,
+ 0x70777B70, 0x7A6F7679, 0x767A6F76, 0x6D75796E,
+ 0x776C7579, 0x75796D73, 0x72787C71, 0x7B71797D,
+ 0x76776D7A, 0x6D787970, 0x776E7576, 0x77786F76,
+ 0x6871746B, 0x78726E71, 0x78787278, 0x74797973,
+ 0x7E757A7A, 0x797A717D, 0x6F77746F, 0x74707774,
+ 0x03020075, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01020301,
+ 0x03010203, 0x00040000, 0x96878B80, 0xA1959EA2,
+ 0x9DA1969D, 0x969DA196, 0x9F939DA1, 0x9DA1959B,
+ 0x98A0A498, 0xA195A0A4, 0x9DA1959D, 0x999FA397,
+ 0xA6999FA6, 0xA0A79A9F, 0x9BA3A79B, 0xA295A3A7,
+ 0xA1A89B9B, 0x9AA0A79A, 0xACA0A0A7, 0xB3B7ACA8,
+ 0x0071746B, 0x01000002, 0x00010000, 0x00000400,
+ 0xA39A0004, 0x9EA4999E, 0x909DA497, 0x9F90989F,
+ 0x989F9098, 0x9599A093, 0x9F939BA2, 0x9B9F939B,
+ 0x8F989F90, 0xA394979E, 0x9AA1929C, 0x969EA695,
+ 0xA8979FA7, 0xA2A897A2, 0x779BA190, 0x90808288,
+ 0x9DA0918F, 0x9B9CA095, 0xA49B9FA4, 0xA1A59AA1,
+ 0x98A2A498, 0xA399A2A4, 0xA7A89EA2, 0x9DA6A79D,
+ 0xA79EA6A7, 0xA1A59AA6, 0x9FA3A79C, 0xA89CA6AA,
+ 0xA4A89CA4, 0x9DA5A99D, 0xA99EA3AA, 0xA3A99EA3,
+ 0x9FA3A99E, 0xAA9FA4AA, 0xA6AA9FA4, 0xA0A3A79B,
+ 0xA99DA8AC, 0xA5A99DA5, 0x98A5A99D, 0xA79CA0A4,
+ 0xA3A99EA1, 0x9FA6AEA4, 0xB1A4A1A9, 0xAAB1A4AA,
+ 0xA6ACB2A7, 0xB2A7ABB1, 0xACB2A7AC, 0xA8ACB1A8,
+ 0xB3A8ADB3, 0xADB3A8AD, 0xA5ADB3A8, 0xB3A8A8B0,
+ 0xAEB4A9AB, 0xA9AFB3A8, 0xB3A8B0B4, 0xAFB3A7AF,
+ 0xA7ACB3A6, 0xB5A9AFB6, 0xABAFA3B1, 0xA9AEB5A8,
+ 0xB5AAAFB6, 0xAFB5AAAF, 0xABB1B5AA, 0xC9C0B2B6,
+ 0x868882C6, 0x003A3E39, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x00000001,
+ 0x00010000, 0x7010140E, 0xABA07479, 0xA8ACA0A7,
+ 0x9DA2A89D, 0xAA9DA2A8, 0xA7ADA2A3, 0x00A0A49E,
+ 0x01000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x07080507, 0x3E3A0805, 0xA9ABA53F, 0x9C9EA39A,
+ 0xA59B9EA6, 0x979F959D, 0x9297A096, 0x9C94919C,
+ 0x8C948D91, 0x7A858D86, 0x84797C84, 0x7C84797C,
+ 0x7A7C8479, 0x988E7C84, 0x8F978D90, 0x92949C92,
+ 0x9D93939C, 0x91998F95, 0x9292978E, 0x9990969B,
+ 0x92978E94, 0x8D8D958B, 0x968B8F97, 0x90948990,
+ 0x8E94958B, 0x968E9998, 0x92938A98, 0x8C8F9289,
+ 0x948B9095, 0x93978C91, 0x8A909489, 0x978D9394,
+ 0x94958B96, 0x8994958B, 0x958B9293, 0x93958994,
+ 0x8D909488, 0x978B939A, 0x95998D93, 0x8D95998D,
+ 0x998E9599, 0x95998E95, 0x90989C90, 0x9A909A9C,
+ 0x9A9B9199, 0x979EA198, 0xA1989DA0, 0xA1A299A0,
+ 0x00272923, 0x01010001, 0x00010001, 0x7010140E,
+ 0xACA17479, 0xA6ADA0A8, 0x999EA499, 0xA3989CA4,
+ 0x9DA3989B, 0x97A0A198, 0x9D949FA0, 0x91989198,
+ 0x9A979F98, 0x6C6A989F, 0x06090769, 0x00000000,
+ 0x00000200, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x73282723,
+ 0x76717979, 0x78787279, 0x6D72746E, 0x77716F73,
+ 0x75797373, 0x77797A76, 0x7A747C7B, 0x797B7578,
+ 0x757D7E75, 0x7E757D7E, 0x7B7C737D, 0x75787A74,
+ 0x7B75797B, 0x77797379, 0x737B7C73, 0x7C737B7C,
+ 0x7E7F767B, 0x747D7E75, 0x7C737C7D, 0x7B7C737B,
+ 0x757B7C73, 0x80787D7E, 0x7F7D7582, 0x747B7C73,
+ 0x7B727C7D, 0x7B7C737A, 0x737A7870, 0x7B727D7B,
+ 0x7C7D747A, 0x737D8077, 0x786F777C, 0x76797075,
+ 0x76757771, 0x7D747A7C, 0x767E7478, 0x73798176,
+ 0x7C73767E, 0x7A7D7479, 0x6C787B72, 0x70697075,
+ 0x68706968, 0x74697069, 0x8178767A, 0x777A717E,
+ 0x73808178, 0x776D7B7C, 0x74786D76, 0x747D8279,
+ 0x7B71767E, 0x767B7273, 0x6F767970, 0x78727578,
+ 0x75786F76, 0x666B6E65, 0x6F666C6F, 0x6C6F666C,
+ 0x6C6E706A, 0x706A7072, 0x70716870, 0x656E6F65,
+ 0x6C626C70, 0x6B6C626B, 0x63707168, 0x6C666B6C,
+ 0x6868626C, 0x60696A61, 0x69606869, 0x68686268,
+ 0x5E62645E, 0x655E6064, 0x5E655E5E, 0x6160645E,
+ 0x67616567, 0x64645E67, 0x5E60615D, 0x56556362,
+ 0x4F4B4A5A, 0x35525050, 0x00013535, 0x00000000,
+ 0x31000100, 0x4B473033, 0x4A4C464A, 0x6252544E,
+ 0x68626668, 0x68686268, 0x5D62645E, 0x67636163,
+ 0x66676366, 0x6662645E, 0x6C666A6C, 0x6C6C666C,
+ 0x666A6C66, 0x6C666A6C, 0x67685F6C, 0x636D6E64,
+ 0x6A606C6D, 0x6F6D656B, 0x6A74716C, 0x6F6B726F,
+ 0x706F6B72, 0x69696A68, 0x706B686B, 0x686C676C,
+ 0x67686C67, 0x736F686C, 0x72736F72, 0x706D736E,
+ 0x74726F75, 0x6E746F6F, 0x726F736D, 0x78727478,
+ 0x75777176, 0x73767773, 0x7B757779, 0x7979737B,
+ 0x6878766E, 0x746B7270, 0x77756D73, 0x707C7A70,
+ 0x7C727C7A, 0x7E7C727E, 0x67727167, 0x786D7071,
+ 0x74786D74, 0x7076786C, 0x7D717C7C, 0x7575697D,
+ 0x6979776C, 0x7D717575, 0x7A7C707B, 0x6D79796D,
+ 0x7C707979, 0x7A7C707A, 0x6C77796D, 0x786C7678,
+ 0x787C7076, 0x6D787C70, 0x796D7579, 0x787C7075,
+ 0x70797D72, 0x7B70777B, 0x777B7077, 0x71787C70,
+ 0x776B797D, 0x75796D73, 0x6C787C70, 0x7B717478,
+ 0x73746A7A, 0x6B75766D, 0x70677374, 0x73746B6F,
+ 0x7271746B, 0x756F7678, 0x73736D75, 0x6E76776E,
+ 0x7A717677, 0x797A7179, 0x7076736F, 0x28247574,
+ 0x02030129, 0x02000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00010000, 0x00020301,
+ 0x03000102, 0x63676100, 0x93A9ADA2, 0xA2969DA2,
+ 0x9DA1959E, 0x959B9F93, 0x9F939DA1, 0x9B9F939B,
+ 0x97A0A498, 0xA0949FA3, 0x9DA1959C, 0x989EA598,
+ 0xA7989EA5, 0xA0A798A0, 0x9B9EA296, 0xA497A3A7,
+ 0xA1A89B9D, 0x9AA0A79A, 0xA798A0A7, 0xA8AD9EA2,
+ 0x6BA8AFA2, 0x02006F74, 0x00020000, 0x00000400,
+ 0x3A310004, 0x9EA49935, 0x909CA696, 0x9F9096A0,
+ 0x9DA49598, 0x9599A093, 0xA4989BA2, 0xA1A697A0,
+ 0x909CA394, 0xA293989F, 0x9BA2939B, 0x939FA796,
+ 0xA6959CA4, 0xA0A695A0, 0x76939988, 0x8F7F8187,
+ 0x9EA1928E, 0x9BA1A59A, 0xA49B9FA4, 0xA6A9A0A1,
+ 0x9AA4A59B, 0xA49AA4A6, 0xA4A59BA3, 0x9FA6A79E,
+ 0xA79EA7A8, 0xA0A197A6, 0x9EA5A99E, 0xA99DA5A9,
+ 0xA4A89CA5, 0x9DA2A69A, 0xA99EA5A9, 0xA1A79CA3,
+ 0xA1A6ACA1, 0xACA1A6AC, 0xA4AA9FA6, 0xA0A3A79B,
+ 0xACA0A8AC, 0xA8ACA0A8, 0xA0A5A99D, 0xAA9EA8AC,
+ 0xA3A99EA6, 0x9FA0A89E, 0xB1A6A1A9, 0xAEB5A8AB,
+ 0xA9ACB2A7, 0xB2A9AEB4, 0xADB2A9AD, 0xA8ADB2A9,
+ 0xB3A8ABB3, 0xADB3A8AD, 0xA7ADB2A9, 0xB3A8A9B1,
+ 0xADB3A8AB, 0xA8AFB3A8, 0xB5AAAFB3, 0xB1B5AAB1,
+ 0xA8AFB6A9, 0xB5A9AEB5, 0xB1B5A9B1, 0xA9AEB5A8,
+ 0xB6ABAFB6, 0xAEB4A9B0, 0xABB1B5AA, 0xB4ABB1B4,
+ 0xB1B3ADB1, 0x39B2B6B0, 0x01003A3E, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x00010000, 0xA110140E, 0xADA1A6AC, 0xA7AB9FA9,
+ 0x9DA2A89D, 0xA89DA2A8, 0xA2A89DA2, 0x31A0A59C,
+ 0x01003337, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x07080507, 0x3D390805, 0xA8AAA43C, 0x9A9A9F96,
+ 0xA59B9FA5, 0x9DA59B9D, 0x9999A099, 0x9F9A98A0,
+ 0x88908998, 0x8F848C85, 0xA1978E96, 0x98A19798,
+ 0x9998A197, 0xA09998A0, 0x98A09998, 0x92969E94,
+ 0x9B92949C, 0x979C9396, 0x8F949990, 0x9C91969A,
+ 0x969C9198, 0x8F91998F, 0x968D9199, 0x91948B91,
+ 0x8E96978E, 0x958B9697, 0x92958C94, 0x888E938A,
+ 0x958C8C91, 0x8F958A90, 0x898E9489, 0x968A9195,
+ 0x94958B94, 0x8D96978D, 0x958B9697, 0x92938994,
+ 0x8C93978B, 0x98899498, 0x969B8C93, 0x8B90978A,
+ 0x998D9198, 0x93978B95, 0x91989C91, 0x9B90989C,
+ 0x989C9197, 0x98A0A198, 0xA09AA0A1, 0x41403CA0,
+ 0x00020000, 0x01000200, 0x00010000, 0xA1767970,
+ 0xAB9FA8AC, 0xA6ADA0A7, 0x989EA499, 0xA3989BA3,
+ 0x9EA1989D, 0x98A1A299, 0x97919EA1, 0x91989193,
+ 0x9998A099, 0x9F9A98A0, 0x383B399B, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00000000, 0x26000100,
+ 0x76722728, 0x78777377, 0x6F72736F, 0x79747074,
+ 0x75797475, 0x75797B75, 0x7A76797B, 0x7C7C767B,
+ 0x757D7E75, 0x7E757D7E, 0x7C7D747D, 0x76787A74,
+ 0x7C767A7C, 0x7678727A, 0x757E7F76, 0x7E757D7E,
+ 0x7D7E757D, 0x767A7B72, 0x7E757E7F, 0x7D7E757D,
+ 0x75797C73, 0x81787B7E, 0x7A7B7280, 0x787A7B72,
+ 0x82798081, 0x7B7C7381, 0x7677786F, 0x7F767E7F,
+ 0x7B7C737E, 0x6F7A7D74, 0x7B727378, 0x7B807776,
+ 0x7A757C75, 0x7C737A81, 0x787D7477, 0x70767C71,
+ 0x7D74757B, 0x7A7D747A, 0x6B7F8279, 0x756E6F74,
+ 0x686F686E, 0x7870746E, 0x7B727E81, 0x8182797A,
+ 0x73808178, 0x776E7B7C, 0x7E817876, 0x757C8178,
+ 0x7D74797E, 0x787D7478, 0x6D767970, 0x79707478,
+ 0x75796E76, 0x6673746A, 0x736A6E6F, 0x73736D72,
+ 0x6B71746B, 0x70677174, 0x73746B6F, 0x5F727369,
+ 0x69606869, 0x6B6C6368, 0x62717269, 0x6F6A6A6B,
+ 0x6A676272, 0x656A6B62, 0x6E666D6E, 0x6D6E6570,
+ 0x616E6F66, 0x645E676A, 0x62645E62, 0x63616560,
+ 0x635F6468, 0x67686462, 0x5E6A6B69, 0x5753615F,
+ 0x4F4B4A5A, 0x35525050, 0x00003735, 0x00000000,
+ 0x31000100, 0x4C4A3233, 0x484C4749, 0x6251524E,
+ 0x68626668, 0x68686268, 0x63666862, 0x6C676468,
+ 0x686C6668, 0x686B6C63, 0x6C667071, 0x6C6C666C,
+ 0x676E6F6B, 0x6A666A6B, 0x6A6C6669, 0x69707168,
+ 0x68607172, 0x6F6C676A, 0x6B70706A, 0x706C706F,
+ 0x75747071, 0x6A6F706E, 0x726E6B6C, 0x70716D71,
+ 0x67676B66, 0x746E686C, 0x72746E72, 0x6F6F766F,
+ 0x76716E76, 0x70777070, 0x6F727670, 0x746E7175,
+ 0x72767070, 0x72787A74, 0x7A747678, 0x7B7C737A,
+ 0x6A787970, 0x70687273, 0x7B797172, 0x717D7B71,
+ 0x7A707D7B, 0x7B7A707C, 0x6A76776D, 0x7C717175,
+ 0x74786D78, 0x7077796D, 0x786C7A7C, 0x77796D76,
+ 0x6D7C7C70, 0x796D7779, 0x76786C77, 0x7078786C,
+ 0x7C707C7C, 0x787C707A, 0x7075796D, 0x7D71787C,
+ 0x787C7079, 0x7075796D, 0x796D787C, 0x7A7C7075,
+ 0x707C7D73, 0x7B70797A, 0x777B6F77, 0x71787C70,
+ 0x786C797D, 0x73776B74, 0x6C74786C, 0x73687478,
+ 0x6D71666F, 0x6973746B, 0x71687172, 0x73746B70,
+ 0x6E73746B, 0x766D7677, 0x71746B73, 0x6C76776D,
+ 0x766E7678, 0x78766E78, 0x4B757470, 0x0300504F,
+ 0x02030104, 0x00000000, 0x01000000, 0x01020000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000301,
+ 0x34300004, 0x96989233, 0x959BA196, 0xA1959BA2,
+ 0x9DA1959D, 0x93A0A498, 0xA3949DA2, 0x9BA0919E,
+ 0x96A0A498, 0xA1959EA2, 0xA0A4989D, 0x999EA598,
+ 0xA5969FA6, 0xA2A798A0, 0x98A3A899, 0xA397A2A7,
+ 0xA3A79B9F, 0xA09FA699, 0xA899A6AD, 0x9FA796A1,
+ 0xA2A8AFA0, 0x746BA8AF, 0x0002006F, 0x00010300,
+ 0x04000204, 0x6A706500, 0x90A6AD9E, 0x9F90989F,
+ 0x9DA49798, 0x989BA295, 0xA5969EA5, 0x9FA495A0,
+ 0x9199A091, 0xA4939AA2, 0x9BA3929C, 0x95A0A695,
+ 0xA695A0A6, 0x9EA493A0, 0x78939988, 0x8F818389,
+ 0x9C9E928F, 0x9C9CA095, 0xA39AA0A5, 0xA1A49BA0,
+ 0x9BA4A59B, 0xA79DA6A5, 0xA5A69CA6, 0x9DA6A79D,
+ 0xA79DA6A7, 0xA1A298A6, 0x9DA5A99E, 0xA99DA5A9,
+ 0xA4A89CA5, 0x98A3A79B, 0xA99DA0A4, 0xA8ACA1A5,
+ 0xA0A5ABA0, 0xABA0A4A9, 0xA3A99EA5, 0xA1A4A89C,
+ 0xAB9FA9AD, 0xA8ACA0A7, 0x9FA5A99D, 0xACA0A7AB,
+ 0xA6ACA1A8, 0x9EA1A99F, 0xB5AAA0A8, 0xAFB3A7AF,
+ 0xA7AEB5A8, 0xB4A9ADB4, 0xADB3A8B0, 0xA8ACB2A7,
+ 0xB3A8ADB3, 0xADB4A7AF, 0xA8ADB3A8, 0xB3A8ADB3,
+ 0xABB1A6AD, 0xA8AFB3A7, 0xB4AAB0B4, 0xB1B5AAB3,
+ 0xAAAEB4A9, 0xB5AAAFB5, 0xB1B5AAB1, 0xA9AEB5A8,
+ 0xB6A9AFB6, 0xAFB5AAAF, 0xADB2B5AC, 0xB2ACB1B3,
+ 0xB2B4AEB0, 0xB2B3B7B1, 0x3C3AB1B7, 0x00010139,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x00010000, 0xA141463D, 0xACA1A6AC, 0xA8ACA1A8,
+ 0x9DA1A79C, 0xA89DA2A8, 0xA2A89DA2, 0x66A0A69B,
+ 0x01006A6F, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00000000,
+ 0x07070406, 0x3C380805, 0xA8ABA23B, 0x9A979D92,
+ 0xA4999FA5, 0x9EA69C9E, 0x9999A099, 0x9F9A99A0,
+ 0x98A09998, 0x8E99A099, 0xA19A8E95, 0x98A09999,
+ 0x998E968F, 0xA19996A1, 0x98A09996, 0x92989D94,
+ 0x9C93969B, 0x93988F97, 0x91969A8F, 0x9C91989C,
+ 0x979D9298, 0x8F91998E, 0x948B9199, 0x93968D8F,
+ 0x8F94978E, 0x968B969A, 0x92968B92, 0x8C93988F,
+ 0x988F9095, 0x91978C93, 0x898E9588, 0x988C8F96,
+ 0x97988E94, 0x8A94958B, 0x978D9394, 0x94958B96,
+ 0x8B93978B, 0x95869397, 0x93988990, 0x8D93978B,
+ 0x998D939A, 0x93978B95, 0x91969C91, 0x9C91969C,
+ 0x989C9198, 0x989DA196, 0x706C9EA1, 0x12100F71,
+ 0x00020000, 0x00000200, 0x76787202, 0xA0A7ABA0,
+ 0xACA0A8AC, 0xA8ACA0A8, 0x969DA398, 0xA2999BA1,
+ 0x9EA1989F, 0x989EA198, 0x9F999CA1, 0x959C959B,
+ 0x9999A099, 0x9F9999A0, 0x696D689B, 0x00040503,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000001, 0x00000100, 0x00000000, 0x00000000,
+ 0x26250000, 0x76777328, 0x7272736F, 0x78747576,
+ 0x7A7B7777, 0x75787A74, 0x7D79797B, 0x7D7D777E,
+ 0x737B7B75, 0x7E757B7C, 0x7A7B727D, 0x757A7C76,
+ 0x7B75797B, 0x797B7579, 0x757D7E75, 0x7E757D7E,
+ 0x7B7C737D, 0x767D7E75, 0x7D747E7F, 0x7D7E757C,
+ 0x737B7C73, 0x82797B7C, 0x7E7F7681, 0x757D7E75,
+ 0x776E7D7E, 0x7D7E7576, 0x75808178, 0x7C737D7E,
+ 0x7D7E757B, 0x72787B72, 0x8077787B, 0x7981777B,
+ 0x74767E74, 0x7D74767E, 0x7B807778, 0x74787B72,
+ 0x7B727A7D, 0x787B7278, 0x727E8178, 0x746E787B,
+ 0x6A6E6870, 0x7872756C, 0x7B727E81, 0x8081787A,
+ 0x74808178, 0x81787C7D, 0x7E817880, 0x747B7E75,
+ 0x7A71787D, 0x75786F75, 0x71787C71, 0x7B70787C,
+ 0x75796E77, 0x70767A6F, 0x79707679, 0x71746B76,
+ 0x6D767970, 0x746B7376, 0x74756C73, 0x5E6E6F65,
+ 0x69606768, 0x72736A68, 0x686D7067, 0x6D676E71,
+ 0x6C6C666D, 0x65707168, 0x70666D6E, 0x72716771,
+ 0x6673746A, 0x6E686E6F, 0x6E6E686E, 0x67696A66,
+ 0x6B676A6B, 0x6A6B676A, 0x676A6B67, 0x615D6A6B,
+ 0x4D4C4862, 0x35514F4E, 0x00003535, 0x00000000,
+ 0x31000100, 0x4B493233, 0x474B4648, 0x6352534F,
+ 0x69636667, 0x66686269, 0x67666862, 0x6C67686C,
+ 0x696D6768, 0x676C6D64, 0x706A6F70, 0x70706A70,
+ 0x6B74736F, 0x736F706F, 0x70706A74, 0x676F6F69,
+ 0x6D676D6D, 0x6D6D676D, 0x6D6E6F6B, 0x6F6B7071,
+ 0x71726E6E, 0x69717270, 0x6B676A6B, 0x72716D6C,
+ 0x6B6E6F6B, 0x736D6C70, 0x76787273, 0x71727670,
+ 0x756F7178, 0x73777171, 0x7271756F, 0x78727678,
+ 0x74767076, 0x75797B75, 0x7970797B, 0x78797078,
+ 0x6C787970, 0x70687475, 0x77756D72, 0x727C7B71,
+ 0x7C727D7C, 0x78776D7D, 0x6D73776C, 0x7A707478,
+ 0x797A7079, 0x707C7C70, 0x7C707C7C, 0x77796D7A,
+ 0x7077796D, 0x796D7A7C, 0x7A7C7077, 0x6D7A786D,
+ 0x7C707979, 0x7A7C707C, 0x70787C70, 0x7C70787C,
+ 0x787C7078, 0x6772766A, 0x7D716F73, 0x7B7D7179,
+ 0x6F797A70, 0x7B6F7879, 0x777B6F77, 0x7075796D,
+ 0x776B787C, 0x74786C73, 0x6E73776B, 0x756A7579,
+ 0x6E726771, 0x6773746B, 0x71686F70, 0x73746B70,
+ 0x6B74756B, 0x756C7475, 0x70746972, 0x68727468,
+ 0x766E7274, 0x79797378, 0x01504F4B, 0x04020402,
+ 0x01020003, 0x01000000, 0x01000101, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00010001, 0x00000400,
+ 0x98920004, 0x96999096, 0x9691978C, 0xA1959CA3,
+ 0x9DA1959D, 0x979CA192, 0xA596A1A6, 0x9DA293A0,
+ 0x939CA094, 0x9F939B9F, 0x9DA1959B, 0x99A1A599,
+ 0xA899A1A5, 0xA2A798A3, 0x99A3A899, 0xA397A3A8,
+ 0xA3A79B9F, 0x98A3A79B, 0xA798A0A7, 0xA0A897A2,
+ 0xA0A8AFA0, 0xAEA3A8AF, 0x71746BA8, 0x00030500,
+ 0x03000204, 0x35393302, 0x95A2A99C, 0xA4979DA4,
+ 0x9DA4979D, 0x989EA598, 0xA5969EA5, 0xA1A697A0,
+ 0x939DA293, 0xA3949BA2, 0x9EA5969C, 0x959EA493,
+ 0xA695A0A6, 0xA0A695A0, 0x77939988, 0x87788288,
+ 0x8D8F8384, 0x99979B90, 0xA49B9EA4, 0xA1A59AA1,
+ 0x9DA4A59B, 0xA79DA6A7, 0xA6A79DA6, 0x9EA6A79D,
+ 0xA79DA7A8, 0xA2A399A6, 0x9EA3A79B, 0xA89CA6AA,
+ 0xA5A99DA4, 0x98A5A99D, 0xA89B9EA5, 0xA6ACA1A1,
+ 0xA2A5ABA0, 0xABA0A6AB, 0xA3A99EA5, 0x9AA0A498,
+ 0xACA0A2A6, 0xA8ACA0A8, 0xA0A8ACA0, 0xACA0A8AC,
+ 0xA9ADA2A8, 0xA3A2A79E, 0xB4A9A7AC, 0xB0B4A8B0,
+ 0xA7AEB5A8, 0xB4A9ADB4, 0xAEB4A9B0, 0xA8AEB4A9,
+ 0xB4A9ADB3, 0xB0B4A8B0, 0xAAAEB4A9, 0xB5AAAFB5,
+ 0xADB3A8AF, 0xA9AFB3A7, 0xB5AAB1B5, 0xAFB3A8B1,
+ 0xAAB0B6AB, 0xB4ABAFB5, 0xB2B6ABB1, 0xA7AEB4A9,
+ 0xB6A9ADB4, 0xAFB5AAAF, 0xABB2B5AC, 0xB5ACB1B4,
+ 0xAFB4ABB2, 0xB2B3B7B1, 0xB6B4B1B7, 0x3A3C3CB3,
+ 0x00000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x02000000,
+ 0x00010001, 0xA28D8F89, 0xABA2A8AB, 0xA9ADA2A8,
+ 0xA0A6ACA1, 0xABA0A4AD, 0xA3A99EA5, 0xA1A7AB9F,
+ 0x0D07A8AC, 0x080B0909, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x06080507, 0x706A0806, 0xA1A59A6E, 0x999FA397,
+ 0xA397A1A5, 0x9EA4999F, 0x999BA097, 0xA09999A0,
+ 0x98A09998, 0x93989C96, 0x9E94979C, 0x959E9496,
+ 0x96929A93, 0x9E97959D, 0x959E9496, 0x93989D94,
+ 0x9E95999C, 0x95988F9B, 0x90959B90, 0x9B90959B,
+ 0x959B9095, 0x8E929A8F, 0x9A919199, 0x96999095,
+ 0x8C95998E, 0x978C9397, 0x95998E93, 0x8B969A8F,
+ 0x978B9397, 0x8F938793, 0x8B91988B, 0x988D9198,
+ 0x92968B94, 0x8C93978C, 0x94889498, 0x93978B90,
+ 0x8B94988C, 0x998A9397, 0x93988996, 0x8B909488,
+ 0x9D8E9397, 0x959A8B98, 0x929A9E92, 0x9C929A9E,
+ 0x9A9E929B, 0x9299A091, 0x332F989F, 0x02000032,
+ 0x06090608, 0x3B370806, 0xA8A8A23C, 0x98A1A298,
+ 0xA498A2A4, 0x9DA195A0, 0x989CA095, 0xA1989EA1,
+ 0x9FA2999E, 0x999B9F99, 0xA19799A0, 0x959D9399,
+ 0x94929A90, 0x9D94989D, 0xA3A7A198, 0x06363937,
+ 0x05070406, 0x06050706, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000001,
+ 0x01000000, 0x56575500, 0x7A7D7B7A, 0x7C787F7B,
+ 0x7F7C787F, 0x757C7C76, 0x7A767B7B, 0x7A7C7679,
+ 0x757B7B75, 0x7E757D7E, 0x7A7D747B, 0x72797B75,
+ 0x7B757678, 0x787A7479, 0x757B7C73, 0x7E757D7E,
+ 0x8081787D, 0x747D7E75, 0x7C737C7D, 0x7C7D747B,
+ 0x757D7E75, 0x7B727D7E, 0x8081787A, 0x757D7E75,
+ 0x79707D7E, 0x7B7C7378, 0x757B7C73, 0x7E757D7E,
+ 0x7879707D, 0x787B7C73, 0x81787E81, 0x7A7F767E,
+ 0x77798177, 0x7E757981, 0x7A7F7679, 0x77797C73,
+ 0x7C767B7D, 0x7B7D777A, 0x70787B72, 0x786F7679,
+ 0x767B7275, 0x74787B72, 0x7A74787D, 0x797B7578,
+ 0x747D7D77, 0x7F767C7D, 0x7F83787C, 0x757E8178,
+ 0x81787B7E, 0x7D7E757E, 0x787B7C73, 0x7C738081,
+ 0x74776E7B, 0x71787B72, 0x786F757A, 0x74797073,
+ 0x6D74776E, 0x7C727677, 0x7172687B, 0x5C6C6F66,
+ 0x645E6265, 0x6C6E6862, 0x696E736A, 0x70676D72,
+ 0x6B70676B, 0x6972736A, 0x71687172, 0x70716870,
+ 0x666C6D64, 0x6C666C6C, 0x6767616C, 0x676B6B65,
+ 0x6F696D6D, 0x71716B6F, 0x796D716B, 0x625D7980,
+ 0x5354505E, 0x49494A46, 0x01004A4B, 0x01020000,
+ 0x36000100, 0x544F3538, 0x50544F50, 0x675F605C,
+ 0x6A666A6B, 0x6A6C6669, 0x69676963, 0x6F696D6F,
+ 0x6D6F696D, 0x6E6A6C66, 0x736D7274, 0x6C6D6471,
+ 0x6B74746E, 0x6C677370, 0x74716C6F, 0x6B72726C,
+ 0x706C706F, 0x6E6F6B71, 0x6E72736F, 0x726D6F73,
+ 0x70746F6E, 0x7070746F, 0x6C687374, 0x6D6C686D,
+ 0x686A6B67, 0x716B696D, 0x77777171, 0x737A7C76,
+ 0x78727579, 0x77797376, 0x73777973, 0x7B757979,
+ 0x7979737B, 0x757A7C76, 0x7970797B, 0x78797078,
+ 0x6A787970, 0x70677273, 0x7071686F, 0x7178796F,
+ 0x7C737A7B, 0x7B7C727B, 0x6C7B7C72, 0x7C727678,
+ 0x7D7C727D, 0x6E7B796E, 0x7A6E7B79, 0x7173677A,
+ 0x6D7B7C72, 0x776D7478, 0x76776D76, 0x6E7E7C71,
+ 0x7A6F7B79, 0x7C7C707C, 0x707A7C70, 0x7B6F787C,
+ 0x787A6E79, 0x6B73776B, 0x7C707377, 0x75796D78,
+ 0x6B75796D, 0x796D7377, 0x75796D75, 0x70787C70,
+ 0x786D787C, 0x787C7174, 0x6A707469, 0x736A7073,
+ 0x70736A70, 0x6B73746B, 0x746B7374, 0x73746B73,
+ 0x6B76776E, 0x71687374, 0x6E71686E, 0x686F7066,
+ 0x71687071, 0x4E4D4970, 0x00020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00010000, 0x690E0F0B,
+ 0x9E936D6F, 0x989E9398, 0x90989C90, 0x9C90989C,
+ 0x989C9098, 0x90999D91, 0x9F93989C, 0x9CA0949B,
+ 0x959EA094, 0xA1959FA1, 0x9FA1959F, 0x989FA195,
+ 0xA498A0A4, 0xA0A498A0, 0x98A0A798, 0xA79BA0A7,
+ 0xA2A69AA3, 0x99A0A596, 0xA596A3A8, 0xA3A899A2,
+ 0x98A0A498, 0xADA2A0A4, 0xBABEB3A9, 0x0073746B,
+ 0x01000202, 0x00010000, 0xA23E403A, 0xACA0A9AD,
+ 0xA8ACA0A8, 0x98A1A599, 0xA599A0A4, 0x9FA397A1,
+ 0x999FA397, 0xA397A1A5, 0x9EA2969F, 0x989BA091,
+ 0xA697A2A7, 0xA0A7989F, 0x88A1A899, 0x8F809097,
+ 0x8A8F8088, 0x9B999D91, 0xA79CA3A7, 0xA3A79BA3,
+ 0x9BA3A79B, 0xA99DA3A7, 0xA5A99DA5, 0x9AA6AA9E,
+ 0xADA1A2A6, 0xA3A79BA9, 0x9D9FA397, 0xADA0A5A9,
+ 0xA6ADA0A6, 0xA0A7ADA2, 0xAA9FA3AB, 0xA1A99EA2,
+ 0xA1A3A99E, 0xABA2A6AC, 0xA6AA9FA8, 0x9BA2A99C,
+ 0xAB9FA1A8, 0xA8ACA0A7, 0xA0A8ACA0, 0xACA1A8AC,
+ 0xA9ADA2A8, 0xA1A9ADA2, 0xB4A8A8AC, 0xAFB3A7B0,
+ 0xAAAFB5AA, 0xB7ACAFB5, 0xAEB4A9B1, 0xA7A5ADA3,
+ 0xB4A9AAB2, 0xB0B4A9AE, 0xACAEB3AA, 0xB6ABB0B5,
+ 0xAFB3A8B2, 0xABAFB6A9, 0xB5AAB1B8, 0xAFB5AAAF,
+ 0xAAAFB5AA, 0xB5AAAFB5, 0xB1B5AAB1, 0xA9AEB4A9,
+ 0xB6ABAEB4, 0xAEB4A9B0, 0xA8B0B4A8, 0xB4A9B0B4,
+ 0xAEB4A9B0, 0xAAABB0A7, 0xAFADA9AF, 0x383B39AC,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x01000000,
+ 0x36373300, 0xA1B6B8B2, 0xABA2A7AA, 0xA8ACA1A8,
+ 0xA0A5AC9F, 0xABA0A4AD, 0xA5ABA0A5, 0xA2A8ACA0,
+ 0x4138A9AD, 0x090D083C, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x06080409, 0xA29C0806, 0xA0A498A0, 0x8EA1A599,
+ 0xA498969A, 0x959B90A0, 0x928D9289, 0xA0999299,
+ 0x99A19A98, 0x94999E95, 0xA197989D, 0x969E9499,
+ 0x9698A099, 0xA099959D, 0x969F9598, 0x92989D94,
+ 0x9B92989B, 0x9A9E9398, 0x8F979B8F, 0x988D959C,
+ 0x959B9094, 0x8F91998E, 0x9990929A, 0x969A8F94,
+ 0x8B949B8E, 0x998E9198, 0x969A8F95, 0x8A92968A,
+ 0x988C9296, 0x96998A96, 0x8D95998D, 0x978C939A,
+ 0x94988D93, 0x8C94988C, 0x94889498, 0x93978B90,
+ 0x8895998D, 0x95869094, 0x979A8B92, 0x9095998D,
+ 0x9D91989C, 0x95998D99, 0x919B9F93, 0x9E92999D,
+ 0x999D919C, 0x60989F90, 0x0100636B, 0x00000000,
+ 0x3A080606, 0xA6A23F3B, 0xA9AAA1A7, 0x97A3A49A,
+ 0xA2969FA3, 0x9A9E929E, 0x969CA095, 0xA0979E9F,
+ 0x9EA1989F, 0x9899A099, 0xA298979F, 0x979F959A,
+ 0x94949990, 0x9D949A9D, 0x9EA39A98, 0x069B9F9A,
+ 0x05070406, 0x05040806, 0x00020001, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x01000000, 0x02000000, 0x7A565453, 0x7B787F7B,
+ 0x7F7A7780, 0x767B7B75, 0x7D777C7C, 0x797B757B,
+ 0x737B7C73, 0x7D747B7C, 0x797C737A, 0x77777973,
+ 0x7B757B7D, 0x7A7C7679, 0x75818279, 0x7D747D7E,
+ 0x7E7F767C, 0x737D7E75, 0x7C737B7C, 0x7B7C737B,
+ 0x75828078, 0x7E757F7D, 0x7C7D747D, 0x737E7F76,
+ 0x7C737B7C, 0x7B7C737B, 0x737B7C73, 0x79707B7C,
+ 0x7A7B7278, 0x74808178, 0x7B727C7D, 0x7C7F7678,
+ 0x757B8176, 0x81787A80, 0x7B80777C, 0x7A7E807A,
+ 0x7E7A7E80, 0x7D7F797D, 0x707A7A74, 0x7B727679,
+ 0x787D7478, 0x74757A71, 0x7B75787D, 0x7D7F7977,
+ 0x737B7B75, 0x81767B7C, 0x797D727D, 0x797D8077,
+ 0x7E758182, 0x7B7C737D, 0x737B7C73, 0x7C737B7C,
+ 0x76776E7B, 0x72777A71, 0x786F767B, 0x767B7273,
+ 0x7275796E, 0x7C727B7C, 0x7074697B, 0x6270736A,
+ 0x6960666B, 0x6A6F6666, 0x6B6C746A, 0x746A6D75,
+ 0x6D72696C, 0x6B72756C, 0x746B7374, 0x70716873,
+ 0x6B6C6C66, 0x6B656F71, 0x6B6B656B, 0x6A686862,
+ 0x6C67726F, 0x6B6E656F, 0x786C746A, 0x635E787F,
+ 0x50544F5F, 0x47484C47, 0x0100484C, 0x00010000,
+ 0x36000100, 0x55503538, 0x4F534D51, 0x736A6B67,
+ 0x77737677, 0x76777376, 0x6E73756F, 0x756F7274,
+ 0x6E706A73, 0x6D6A6B67, 0x736D7071, 0x73746B71,
+ 0x6C76746C, 0x6C677674, 0x73706B70, 0x6D73726E,
+ 0x6E6A7271, 0x6A6B676D, 0x7070746F, 0x6F6A7175,
+ 0x6B6F6A6B, 0x6F6F736E, 0x6C687273, 0x6C6B676D,
+ 0x676A6B67, 0x6C66686C, 0x7979736A, 0x75767872,
+ 0x7973797B, 0x79797379, 0x737B7B75, 0x79737979,
+ 0x78787279, 0x73787A74, 0x7B727779, 0x7879707A,
+ 0x7177786F, 0x766D797A, 0x70716875, 0x6F797A70,
+ 0x7C737879, 0x7A7B7279, 0x6C7D7C72, 0x786E7878,
+ 0x7A786E7A, 0x6E7B796E, 0x796D7B79, 0x72746879,
+ 0x727B7C72, 0x786D797D, 0x71726874, 0x6B77776B,
+ 0x796E7876, 0x7E7C717B, 0x6D7A7C70, 0x796D7779,
+ 0x7A7C7079, 0x6B77796D, 0x796D7377, 0x74786C75,
+ 0x6E787C70, 0x7C70767A, 0x767A6E78, 0x6C73776B,
+ 0x7D727478, 0x74786D79, 0x676F7269, 0x6D646D70,
+ 0x6E71686A, 0x68707168, 0x71687071, 0x73746B70,
+ 0x6874756C, 0x70677071, 0x6E71686D, 0x6A707168,
+ 0x6F6B7070, 0x0A080770, 0x01000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00010000, 0x920D0F09,
+ 0x9E93999D, 0x989F9298, 0x949B9F93, 0x9F939CA0,
+ 0x9B9F939B, 0x949B9F93, 0x9D919CA0, 0x9B9F9399,
+ 0x929D9F93, 0xA2969C9E, 0x9FA195A0, 0x99A2A498,
+ 0xA498A3A5, 0xA0A498A0, 0x9AA0A79A, 0xA599A0A7,
+ 0xA1A599A1, 0x96A2A596, 0xA498A2A5, 0xA5A99DA2,
+ 0x98A1A599, 0xA499A0A4, 0xABACA2A0, 0x6CB0AFA5,
+ 0x00007674, 0x00000002, 0x6E080905, 0xACA17274,
+ 0xA8ACA0A8, 0x99A2A69A, 0xA69AA1A5, 0xA1A599A2,
+ 0x9AA1A397, 0xA499A4A6, 0x9EA296A0, 0x98A0A596,
+ 0xA596A2A7, 0xA1A8999E, 0x99A0A798, 0x9E8F9FA9,
+ 0x90978897, 0x9B9CA094, 0xA79BA3A7, 0xA9ADA1A3,
+ 0x9CA6AA9E, 0xAA9DA2A9, 0xA3AA9DA3, 0x9EA4A89C,
+ 0xAB9FA6AA, 0xA0A498A7, 0x9FA3A79B, 0xADA0A7AB,
+ 0xA6ADA0A6, 0x9EA6ACA1, 0xACA1A1A9, 0xA3ABA0A4,
+ 0xA1A6ACA1, 0xAEA5A6AC, 0xA8ABA2AB, 0x9BA1A79C,
+ 0xAA9EA1A8, 0xA7AB9FA6, 0x9FA9ADA1, 0xACA1A7AB,
+ 0xA9ADA2A8, 0xA0A8ACA0, 0xB4A8A8AC, 0xB0B4A8B0,
+ 0xAAAFB5AA, 0xB5AAAFB5, 0xACB4A9AF, 0xA8A7B0A6,
+ 0xB3AAA9B2, 0xAEB4A9AE, 0xACB0B5AC, 0xB5ACB0B5,
+ 0xAFB3A8B2, 0xACAFB5AA, 0xB6ABB1B7, 0xAFB5AAB0,
+ 0xABAEB4A9, 0xB4A9B0B6, 0xAFB3A8B0, 0xADAFB5AA,
+ 0xB6ABB2B8, 0xAFB5AAB0, 0xA6B1B5A9, 0xB4A8B0B5,
+ 0xAFB3A8B0, 0xAAAAAEA8, 0x3B39A9AF, 0x00010038,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x01000001,
+ 0x6A6C6600, 0xA2B6B9B0, 0xABA2A8AB, 0xA7ABA0A8,
+ 0x9EA6ADA0, 0xAC9FA6AD, 0xA4AB9EA5, 0xA0A6ADA0,
+ 0xADA2A6AD, 0x0A0C06A9, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x0609050A, 0xA39A0806, 0x9FA699A0, 0x98A0A498,
+ 0xA499A0A4, 0x82877E9E, 0x90858A81, 0xA298929A,
+ 0x98A0969A, 0x9999A099, 0xA19A99A0, 0x98A09999,
+ 0x99959C97, 0xA19998A0, 0x98A09996, 0x94969E94,
+ 0x9F94989D, 0x989C9199, 0x90979B8F, 0x9C90989C,
+ 0x999D919A, 0x8F979B8F, 0x9D92959C, 0x989C9199,
+ 0x8B92968A, 0x9C90959A, 0x96988C9A, 0x8E95998E,
+ 0x9488969A, 0x97998D92, 0x8D95998D, 0x998D9599,
+ 0x93978B95, 0x8B969A8E, 0x94889397, 0x93978B90,
+ 0x8B93978B, 0x97889397, 0x959A8B92, 0x9095998D,
+ 0x9C90989C, 0x989C9098, 0x929C9E92, 0x9E929C9E,
+ 0xA2A69A9A, 0x00676A61, 0x01000002, 0x00010000,
+ 0xA33D3C38, 0xA8A2A9A9, 0xA7A89FA8, 0x96A0A498,
+ 0xA094A0A5, 0x9B9F939C, 0x939C9D93, 0xA1979C9D,
+ 0x9A9E93A0, 0x9799A197, 0xA09998A1, 0x999D9799,
+ 0x8F969892, 0x9E939798, 0x999E959A, 0x6A999F9A,
+ 0x0408686A, 0x06050905, 0x00020001, 0x00000200,
+ 0x00010000, 0x00000000, 0x00000000, 0x02000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x02000002, 0x54070505, 0x7B7A5853,
+ 0x7F7C787F, 0x757C7B77, 0x7B75797B, 0x7C7D747B,
+ 0x747D7E75, 0x7D747D7E, 0x787B727A, 0x76797B75,
+ 0x7B757A7C, 0x7A7C7679, 0x747D7E75, 0x7E757C7D,
+ 0x7B7C737D, 0x737B7C73, 0x7C737B7C, 0x7B7C737B,
+ 0x737C7D74, 0x81787B7C, 0x81827980, 0x737D7E75,
+ 0x7C737B7C, 0x7B7C737B, 0x737D7E75, 0x79707B7C,
+ 0x7D7E7578, 0x78808178, 0x7D748081, 0x7D80777C,
+ 0x767C8075, 0x80777B81, 0x7A7F767B, 0x777E807A,
+ 0x7E7A7B7D, 0x7A7C767D, 0x6F7A7772, 0x7B727778,
+ 0x767E7476, 0x737A8277, 0x7E75787E, 0x7A7D7479,
+ 0x7677786F, 0x84797E7F, 0x80847980, 0x78808178,
+ 0x7F768081, 0x7D7E757E, 0x727E8277, 0x776D797D,
+ 0x76776D76, 0x6F777B70, 0x7A6F747A, 0x767C7174,
+ 0x7274776E, 0x7D727A7B, 0x70746979, 0x65707469,
+ 0x70656C70, 0x6E74696C, 0x6A697167, 0x73696A71,
+ 0x71766D6B, 0x6871746B, 0x79706E71, 0x73736D78,
+ 0x6B6E6F6B, 0x6C666C70, 0x6F716B6A, 0x656D6E65,
+ 0x71686D6E, 0x6E716870, 0x796B7369, 0x635E7980,
+ 0x52534F5F, 0x49484B49, 0x0000484B, 0x00000000,
+ 0x35000100, 0x55503437, 0x4F534E51, 0x72686C66,
+ 0x77717678, 0x76787275, 0x777A7C76, 0x7C76797D,
+ 0x7A7C7678, 0x7B71726E, 0x807A807F, 0x80807A80,
+ 0x6F7A7772, 0x736E7774, 0x76736E76, 0x6D706F6B,
+ 0x726E7271, 0x6A6B6773, 0x6E6D716B, 0x716C7074,
+ 0x6D716C6D, 0x6E71756F, 0x716D7074, 0x70716D70,
+ 0x676C706B, 0x6F69686C, 0x71736D6D, 0x73777973,
+ 0x78727779, 0x7A777278, 0x75797973, 0x7B757B7B,
+ 0x7779737B, 0x74787A74, 0x7B72787A, 0x76797078,
+ 0x7075766D, 0x79707879, 0x75766D78, 0x74787970,
+ 0x7C737C7D, 0x7E7F767B, 0x6E828177, 0x796E7978,
+ 0x7D7B707B, 0x6B78766B, 0x7B6F7777, 0x7A7C707B,
+ 0x6E75766C, 0x786D7477, 0x70746974, 0x6E717367,
+ 0x7A6E7A7A, 0x79796D7A, 0x7076786C, 0x796D7A7C,
+ 0x7A7C7079, 0x71797B6F, 0x796D797D, 0x73776B75,
+ 0x6F787C70, 0x776B757C, 0x75796D73, 0x6D74786D,
+ 0x786D7478, 0x72766B74, 0x686E7168, 0x71686E71,
+ 0x6E71686E, 0x6D73746B, 0x71687576, 0x70716870,
+ 0x67727369, 0x746B7071, 0x71726973, 0x6B6D6F69,
+ 0x0A086E6F, 0x07070709, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00020000, 0x926B7166,
+ 0x9F92989F, 0x989F9298, 0x939B9F93, 0x9F909B9F,
+ 0x9BA0919A, 0x90989C90, 0x9F94989C, 0x9B9F949B,
+ 0x939B9F93, 0x9F909B9F, 0x9DA2939A, 0x99A0A498,
+ 0xA498A1A5, 0xA0A498A0, 0x98A0A79A, 0xA5999EA5,
+ 0xA0A498A1, 0x9AA5A79B, 0xAB9FA4A6, 0xA3A79BA7,
+ 0x98A0A498, 0xA599A0A4, 0xA1A397A3, 0xA3AFAFA1,
+ 0x3B35AFAF, 0x0001003B, 0x3A080907, 0xACA13E40,
+ 0xA7AC9DA8, 0x99A3A79B, 0xA79B9FA6, 0xA0A498A3,
+ 0x99A1A599, 0xA59AA1A5, 0xA2A69AA1, 0x95A2A897,
+ 0xA695A0A6, 0x9EA596A0, 0x99A0A798, 0xA798A1A8,
+ 0xA0A798A0, 0x9BA3A79B, 0xADA1A3A7, 0xA3A79BA9,
+ 0xA1A4A89C, 0xACA0A9AD, 0xA5A99DA8, 0xA1A6AA9F,
+ 0xAB9FA8AC, 0xA3A79BA7, 0xA0A2A69A, 0xAA9BA8AC,
+ 0xA7AE9FA5, 0x9EA7AEA1, 0xABA0A2AB, 0xA4ACA1A3,
+ 0xA4A6ABA2, 0xADA4A8AD, 0xAAADA4AA, 0x9CA5A99E,
+ 0xAA9DA3A7, 0xA6ADA0A3, 0xA2A8ACA0, 0xADA1AAAE,
+ 0xA9ADA1A9, 0xA0AAABA1, 0xB4A8AAAC, 0xB0B4A8B0,
+ 0xADAEB4A9, 0xB6ABB1B6, 0xADB5ABB0, 0xA4A5B0A8,
+ 0xB3A9A1AC, 0xADB2A9AB, 0xADAEB2AC, 0xB2ACAFB3,
+ 0xAFB2A9B0, 0xACAFB5AA, 0xB7ADAFB7, 0xAFB7ADAF,
+ 0xA8AFB5AA, 0xB3A8AEB5, 0xB1B5AAAF, 0xACB0B6AB,
+ 0xB5AAB1B7, 0xB0B6ABAF, 0xA8AFB3A7, 0xB4A9B2B4,
+ 0xB0B4A9B0, 0x00727670, 0x01000002, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x38320001,
+ 0xA0A39A36, 0xA2A8ABA2, 0xABA2A8AB, 0xA8ACA1A8,
+ 0x9DA8ACA0, 0xADA0A5AC, 0xA5AC9FA6, 0xA0A6ADA0,
+ 0xADA0A6AD, 0x3F4239A6, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x06080507, 0xA39A0606, 0x9EA598A0, 0x999EA499,
+ 0xA39A9EA4, 0x81897F9E, 0x968B9389, 0xA19798A0,
+ 0x99A19799, 0x99969D96, 0x9F9898A0, 0x989F9A97,
+ 0x9A959C97, 0xA199989F, 0x96A19996, 0x9498A197,
+ 0x9C92969E, 0x989E9394, 0x939A9E93, 0x9C919B9F,
+ 0x989C9198, 0x91989C90, 0x9B90999D, 0x979B9097,
+ 0x8B989C90, 0x998D959A, 0x95998D97, 0x8E989C91,
+ 0x978C9599, 0x95998D93, 0x8D95998D, 0x998D9599,
+ 0x95998D95, 0x8A95998D, 0x978B9296, 0x95998D93,
+ 0x8B989C90, 0x9889959A, 0x959A8B93, 0x90989C90,
+ 0x9C91989C, 0x989C9198, 0x959C9E92, 0xA2969FA1,
+ 0x969A8F9E, 0x0032342E, 0x01000001, 0x33343000,
+ 0xA0A8A9A0, 0xA9A0A8A9, 0xA6AA9FA8, 0x93A0A498,
+ 0xA1959BA2, 0x9B9F939D, 0x989C9D93, 0x9B91A1A2,
+ 0x9CA0959A, 0x95979F95, 0xA099979F, 0x9A9E9899,
+ 0x90989892, 0x9F949899, 0x979D929B, 0x9C99A099,
+ 0x0607999E, 0x06050904, 0x00020001, 0x00000200,
+ 0x00010000, 0x00000000, 0x00000000, 0x02000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x02000002, 0x05080606, 0x55540705,
+ 0x7D7C7857, 0x757B7A76, 0x7C73797B, 0x7B7C737B,
+ 0x70787970, 0x7C737879, 0x7E817879, 0x73797B75,
+ 0x79737779, 0x77797377, 0x6F7D7E75, 0x7C737778,
+ 0x8081787B, 0x707B7C73, 0x7D777879, 0x7D7E757D,
+ 0x737D7E75, 0x7E757B7C, 0x8081787D, 0x737D7E75,
+ 0x7F767B7C, 0x7D7E757E, 0x707D7E75, 0x7C737879,
+ 0x7B7C737B, 0x757B7C73, 0x81787D7E, 0x7D7E7580,
+ 0x73797D72, 0x7F767A7E, 0x7C7E787A, 0x767F7F79,
+ 0x7D777C7C, 0x7A7C767B, 0x72797671, 0x7D747A7B,
+ 0x767E7478, 0x76757D72, 0x80777B81, 0x7679707B,
+ 0x73787970, 0x7D727B7C, 0x7E7F7579, 0x75808177,
+ 0x7B727F7D, 0x7D7E757A, 0x697B7C73, 0x776D7273,
+ 0x76776D76, 0x71777B70, 0x7B70767C, 0x767C7175,
+ 0x78797C73, 0x786D7E81, 0x70746974, 0x65707469,
+ 0x6B606C70, 0x6A706567, 0x666C746A, 0x736A6870,
+ 0x70756C6E, 0x6D73766D, 0x79707376, 0x75756F78,
+ 0x6B72736F, 0x716B6E6F, 0x6E706A6F, 0x68707168,
+ 0x6E647071, 0x6B6E656D, 0x796B726B, 0x635E7980,
+ 0x50544F5F, 0x49484C47, 0x0000484B, 0x00000000,
+ 0x34000100, 0x544F3539, 0x50544F50, 0x7E686C67,
+ 0x78728084, 0x6A6C6676, 0x696D6F69, 0x6F696B6F,
+ 0x6D6F696B, 0x6E6A6B67, 0x79737372, 0x79797379,
+ 0x6471716B, 0x706B6C6D, 0x71716B73, 0x6D70706A,
+ 0x74707271, 0x6B6A6675, 0x6B6A6C66, 0x736F6D71,
+ 0x6B6F6A72, 0x6E70746E, 0x726C7074, 0x6C706A70,
+ 0x6B6C706B, 0x706A6C70, 0x7478726C, 0x757A7C76,
+ 0x7973797B, 0x79797379, 0x73797973, 0x79737979,
+ 0x797B7577, 0x77767872, 0x7D747B7D, 0x7679707A,
+ 0x7073766D, 0x79707679, 0x76797076, 0x70787970,
+ 0x7C737679, 0x7A7B7279, 0x6F7B7C72, 0x73697A79,
+ 0x79796D74, 0x6E7A7A6E, 0x766A7A7A, 0x7E7E7276,
+ 0x6D7C7D73, 0x7D727478, 0x74786D79, 0x6B74766A,
+ 0x776B7777, 0x74746877, 0x6D757569, 0x796D7779,
+ 0x77796D79, 0x6775776B, 0x776B7173, 0x77796D75,
+ 0x6E72766A, 0x7C70747B, 0x72766B78, 0x6A71756A,
+ 0x72677175, 0x6E72676E, 0x666E7168, 0x6C636C6F,
+ 0x6E716869, 0x69707168, 0x71687172, 0x73746B70,
+ 0x67707167, 0x71687071, 0x78797070, 0x046F716B,
+ 0x08080708, 0x08070908, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x4E514800, 0x91979E91,
+ 0x9F9299A0, 0x989F9298, 0x969DA195, 0xA2939EA2,
+ 0x9DA2939D, 0x939CA094, 0xA1969B9F, 0x9B9F939D,
+ 0x959B9F93, 0xA2939DA1, 0x989D8E9D, 0x93989D8E,
+ 0xA1959B9F, 0xA0A4989D, 0x989FA699, 0xA5989EA5,
+ 0xA1A5999E, 0xA0A5A79B, 0xACA0AAAC, 0xA3A79BA8,
+ 0x98A0A498, 0xA498A2A4, 0xA2A596A2, 0xA1AFAFA1,
+ 0xAFA5AFAF, 0x3A3A34AE, 0x05080905, 0x766B0809,
+ 0xA9ADA172, 0x9AA2A69A, 0xA398A2A6, 0xA1A5999F,
+ 0x99A2A69A, 0xA398A1A5, 0xA2A69A9F, 0x95A2A798,
+ 0xA897A0A6, 0xA0A596A2, 0x98A0A798, 0xA798A0A7,
+ 0xA0A798A0, 0x9BA3A79B, 0xA79BA3A7, 0xA3A79BA3,
+ 0xA0AAACA0, 0xA99DA8AC, 0xA8ACA0A5, 0x9EA8ACA1,
+ 0xACA0A5A9, 0xA5A99DA8, 0xA0A0A499, 0xAB9FA6AD,
+ 0xA6ADA0A7, 0xA0A5AC9F, 0xACA1A6AD, 0xA4ACA1A6,
+ 0xA4A8ADA4, 0xADA4A8AD, 0xADB0A7A8, 0x9EA8ACA1,
+ 0xA99EA5A9, 0xA6ADA0A5, 0xA0A8ACA1, 0xADA1A6AD,
+ 0xA9ADA1A9, 0xA1A8ACA1, 0xB1A5AAAB, 0xB0B4A8AD,
+ 0xACAFB5AA, 0xB5AAB0B5, 0xACB4AAAF, 0xA8A7AFA8,
+ 0xAFA8A7AF, 0xADB1ABA8, 0xAFACB3AC, 0xB2ACB1B5,
+ 0xB0B5ACAE, 0xAAAEB4A9, 0xB7ADADB5, 0xAFB7ADAF,
+ 0xA9AFB5AA, 0xB5AAAEB4, 0xB1B7ACAF, 0xADB1B6AD,
+ 0xB5ACAFB7, 0xAFB5AAB0, 0xA9B0B4A9, 0x847BB0B4,
+ 0x20221C81, 0x00000200, 0x00000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x05080507, 0x42390806,
+ 0xB2B6AB3F, 0xA2A7ADA2, 0xACA1A7AD, 0xA9ADA2A8,
+ 0xA1A9ADA1, 0xACA0A9AD, 0xA8ACA0A8, 0xA1AAAEA2,
+ 0xB0A3A7AE, 0x6F756AA9, 0x00000100, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000100,
+ 0x3A030506, 0xABA2393C, 0xA6ACA1A6, 0x9C9FA79D,
+ 0xA39C9CA3, 0x99A0999C, 0x989CA49A, 0xA1989CA1,
+ 0x9DA2999C, 0x9A9AA298, 0xA09B9AA1, 0x939A9599,
+ 0x9A929C96, 0xA19996A0, 0x96A19996, 0x9896A199,
+ 0x9C95979F, 0x979F9594, 0x93979F94, 0x9F95989E,
+ 0x959D9397, 0x93979D92, 0x9C9199A0, 0x989C9198,
+ 0x90969D90, 0x9C91969D, 0x999D9298, 0x89989C91,
+ 0x988D8E94, 0x979D9292, 0x90979B90, 0x9B90979B,
+ 0x979B8F97, 0x8C949B8E, 0x9F90949B, 0x969B8C9A,
+ 0x8D959C8D, 0x9C8D959C, 0x9EA09497, 0x909D9F93,
+ 0xA1959A9C, 0x9D9F939F, 0x98A0A498, 0xA499A0A4,
+ 0x40433AA0, 0x050A0905, 0x41380A09, 0xA8ACA13E,
+ 0x9AA2A69B, 0xA499A1A5, 0xA0A498A0, 0x929EA394,
+ 0xA3949CA1, 0x989D8E9E, 0x94989C90, 0xA0959CA0,
+ 0x9A9E939C, 0x95999E95, 0xA099979F, 0x99A09999,
+ 0x939A9D94, 0x9B919A9E, 0x9A9E939A, 0x9A99A197,
+ 0x6A6A999F, 0x06050768, 0x00000001, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x01000101,
+ 0x5D5C5800, 0x79807F7B, 0x80787F7F, 0x81827982,
+ 0x757B7C73, 0x7872797B, 0x79797378, 0x74767970,
+ 0x7C767A7D, 0x7878727C, 0x727A7C76, 0x7D777678,
+ 0x7B7B757D, 0x72767872, 0x736F7678, 0x76787272,
+ 0x727D7E75, 0x81787A7B, 0x7D7E7580, 0x737B7C73,
+ 0x7D747B7C, 0x7B7C737C, 0x72787970, 0x7E757A7B,
+ 0x7B7C737D, 0x777D7D77, 0x7D777D7D, 0x7D7D777D,
+ 0x767A7D74, 0x78727A7C, 0x71736D76, 0x7580807A,
+ 0x7C737D7E, 0x7878727B, 0x737A7A74, 0x7B72797C,
+ 0x787E7376, 0x74787D74, 0x7B72787D, 0x72776E76,
+ 0x737E8178, 0x7E757B7C, 0x8081777D, 0x727F8076,
+ 0x7C737B7C, 0x7D7E757B, 0x6B797A71, 0x766E7573,
+ 0x76776E78, 0x7373786F, 0x7E74757D, 0x747C7276,
+ 0x6D787B72, 0x73687376, 0x74786D6F, 0x6B787970,
+ 0x6B657171, 0x5F635D69, 0x65626A60, 0x74696870,
+ 0x71756A6E, 0x7477786F, 0x7C767C7D, 0x7979737C,
+ 0x6F75756F, 0x706A7575, 0x75766D70, 0x6775766D,
+ 0x71686F70, 0x71746B70, 0x7A70726C, 0x726C7C80,
+ 0x5158516E, 0x3B596059, 0x01003A40, 0x00000000,
+ 0x36000100, 0x5753393A, 0x56575356, 0x866B6F6A,
+ 0x6F69878B, 0x6B6F696B, 0x6A72756C, 0x70677073,
+ 0x6F72696D, 0x6E6E706A, 0x78727274, 0x74746E78,
+ 0x6D707168, 0x746B7478, 0x70716873, 0x6A707168,
+ 0x746E7070, 0x70706A74, 0x6E70706A, 0x746E7274,
+ 0x71736D74, 0x6E72746E, 0x736A7274, 0x6E736A6E,
+ 0x696E726C, 0x6F686970, 0x6E756E68, 0x6F73786F,
+ 0x7B727378, 0x767B7276, 0x75787872, 0x7C737B7B,
+ 0x7B7E7579, 0x73808178, 0x7C737B7C, 0x73766D7B,
+ 0x74767A74, 0x7B72767A, 0x74797076, 0x6C6E7267,
+ 0x7B727177, 0x767B7276, 0x6F7A7B71, 0x756B7879,
+ 0x78796F74, 0x707A7C70, 0x75697A7C, 0x75756975,
+ 0x717A7C70, 0x7C727A7B, 0x7C7B717D, 0x6D78786C,
+ 0x776C7A78, 0x75736879, 0x6D79796D, 0x7C707979,
+ 0x7A7C707A, 0x6A78786C, 0x786C7676, 0x79796D78,
+ 0x7275796E, 0x766C797D, 0x7B7C7375, 0x6B787970,
+ 0x79707374, 0x73746B78, 0x61686C61, 0x6C61686C,
+ 0x6C706568, 0x666E6F65, 0x706B706E, 0x77756D73,
+ 0x606A6B61, 0x6C61686C, 0x686A6468, 0x0012130F,
+ 0x00000001, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x01010000,
+ 0x00000001, 0x02000001, 0x00000100, 0x00000000,
+ 0x07070707, 0x09030809, 0x9EA39A05, 0x919DA195,
+ 0x9F939BA0, 0x989C909B, 0x959B9F93, 0xA1959DA1,
+ 0xA0A2969F, 0x99A0A498, 0xA498A1A5, 0x9B9F93A0,
+ 0x9699A093, 0xA3949EA5, 0x9A9F909E, 0x9099A091,
+ 0x9F90989F, 0x9CA39498, 0x9B9EA596, 0xA89BA1A8,
+ 0xA4AB9EA1, 0xA0A8ACA0, 0xACA0AAAC, 0xA3A79BA8,
+ 0x93A1A397, 0xA2969D9F, 0xA7AA9BA0, 0x98A7A799,
+ 0xBDAFA7A8, 0xA5A69CBD, 0x15181A14, 0x1A141819,
+ 0xABAEA518, 0x9FA6A9A0, 0xA9A0A6AA, 0xA6AA9FA6,
+ 0x98A3A79B, 0xA59BA0A4, 0xA3A79CA4, 0x99A0A498,
+ 0xA596A1A8, 0xA3A79BA0, 0x98A3A79B, 0xA79BA0A4,
+ 0xA3A79BA3, 0x99A3A899, 0xA495A3A8, 0xA3A8999F,
+ 0x9AA3A899, 0xAA9BA4A9, 0xA6AD9EA5, 0xA0A8ACA0,
+ 0xACA0A8AC, 0xA6AA9FA8, 0xA3A2A79E, 0xACA3A5AD,
+ 0xA7ADA2A7, 0x9FA6ADA0, 0xADA2A5AC, 0xA7ACA3A7,
+ 0xA6A4ACA2, 0xAFA5A8B0, 0xA7ACA3A7, 0xA0AAADA4,
+ 0xABA2A6A9, 0xA8ACA1A8, 0xA2A7ACA3, 0xAFA4A5AD,
+ 0xAAB0A5A9, 0xA4AAAEA3, 0xB1A5ABAF, 0xB0B4A8AD,
+ 0xAAAFB5AA, 0xB5ABAFB5, 0xAFB7ADAD, 0xB2ADB4AD,
+ 0xB4ADB2B9, 0xA5ACA5AD, 0xADB1B5AF, 0xB4ABB1B6,
+ 0xAFB5AAAF, 0xABB2B8AD, 0xB5AAB0B6, 0xAFB5AAAF,
+ 0xACB0B5AC, 0xB5ACB0B5, 0xAEB6ACB0, 0xB1B1B8B1,
+ 0xB8B1B0B8, 0xB1B8B1B1, 0x33A4ABA4, 0x01003539,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00000101, 0x01010100, 0x05070505, 0x7C730607,
+ 0xB2B6AA79, 0xA1A7ADA2, 0xADA2A6AC, 0xA7ABA0A9,
+ 0xA0AAACA0, 0xAB9FAAAC, 0xA9ADA1A7, 0xA0AAAEA2,
+ 0xAF9FA8AF, 0xA7AFA4A5, 0x002E2F2B, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000100,
+ 0x39020607, 0xAAA1363B, 0xA7ADA2A5, 0x9D9CA39C,
+ 0xA39C9BA2, 0x9BA39C9B, 0x989AA298, 0xA39A9CA1,
+ 0x9EA39A9E, 0x989BA097, 0xA09B9AA2, 0x949B9699,
+ 0x9B929C96, 0xA09A95A1, 0x95A09896, 0x9895A098,
+ 0xA19A979F, 0x99A19A99, 0x95979F95, 0x9F98979F,
+ 0x98A19797, 0x94969E94, 0x9C91999F, 0x999F9496,
+ 0x91979D92, 0x9D92969C, 0x979D9297, 0x8C989E93,
+ 0x9D939197, 0x959D9395, 0x92979B90, 0x9B90999D,
+ 0x9A9E9297, 0x8E979E91, 0x9E92949B, 0x979B8F9A,
+ 0x8D969D8E, 0x9B8F959C, 0x9EA09497, 0x8F9D9F93,
+ 0xA094999B, 0x9D9F939E, 0x9AA0A498, 0x736AA1A5,
+ 0x0F110B70, 0x3A0A0905, 0xACA13E40, 0xA8ACA0A8,
+ 0x9BA1A599, 0xA79AA3A7, 0x9DA497A0, 0x969DA195,
+ 0xA293A0A5, 0x9BA0919D, 0x94979B8F, 0x9E939CA0,
+ 0x9A9E939A, 0x97999E95, 0xA19A99A1, 0x979E979A,
+ 0x8F959B90, 0x9D93979B, 0x9EA2979C, 0x9999A197,
+ 0x9E9C99A0, 0x0606069B, 0x01010002, 0x00000000,
+ 0x00010000, 0x00020000, 0x01010200, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x02000000,
+ 0x00010001, 0x7A595854, 0x7F7A8080, 0x80807A82,
+ 0x72787A74, 0x7B757678, 0x7B7B757B, 0x6F7A7C76,
+ 0x7D777578, 0x7B7B757D, 0x72797B75, 0x77717678,
+ 0x7D7D7777, 0x757F817B, 0x736F797B, 0x76787272,
+ 0x727B7C73, 0x7D747A7B, 0x7879707C, 0x757D7E75,
+ 0x7C737D7E, 0x7879707B, 0x75787970, 0x7C737D7E,
+ 0x7B7C737B, 0x75808178, 0x7D777D7E, 0x7D7D777D,
+ 0x71767872, 0x726E7577, 0x7B7D7771, 0x737B7C73,
+ 0x7A727B7C, 0x7879707C, 0x72767872, 0x7E73787B,
+ 0x787E7378, 0x747A7D74, 0x7B727A7D, 0x777C7376,
+ 0x747B7E75, 0x7F767C7D, 0x8081787E, 0x747D7E75,
+ 0x7E757C7D, 0x7B7C737D, 0x73767670, 0x7C767979,
+ 0x7476707C, 0x71737771, 0x796F7178, 0x747C7271,
+ 0x696D7269, 0x786D6F72, 0x74776E72, 0x6571716B,
+ 0x635F6B6B, 0x696B6562, 0x696F746B, 0x7B706E74,
+ 0x73746A77, 0x7176776E, 0x7670797A, 0x79797376,
+ 0x6A77746F, 0x7168726F, 0x75766D70, 0x6B727068,
+ 0x746B7573, 0x75766D73, 0x7A70726C, 0x726C7E80,
+ 0x5158516E, 0x3B5A615A, 0x01003A40, 0x00010000,
+ 0x36000100, 0x5852393A, 0x56585258, 0x856B6F6A,
+ 0x7873868A, 0x737A7372, 0x6C71766D, 0x766D7275,
+ 0x72756C73, 0x6D6E706A, 0x706A7173, 0x72746E6E,
+ 0x7174786D, 0x756A787C, 0x6E726771, 0x6874756C,
+ 0x716B7071, 0x74746E71, 0x6E70706A, 0x706A7474,
+ 0x73756F70, 0x7071736D, 0x7A717679, 0x6F746B77,
+ 0x68697069, 0x7069686F, 0x6C736C69, 0x74747C72,
+ 0x7C72767E, 0x757A7174, 0x727B7B75, 0x7C737878,
+ 0x797C737B, 0x737B7C73, 0x756C7B7C, 0x797C7374,
+ 0x797C807A, 0x80777980, 0x797E757B, 0x6B6F756A,
+ 0x7C727076, 0x767B7274, 0x6F767A6F, 0x786F7879,
+ 0x77786E77, 0x6D787C71, 0x7C707779, 0x77756A7C,
+ 0x7179796D, 0x7B717D7D, 0x7D7B717C, 0x697A786D,
+ 0x74697674, 0x76746976, 0x6B79796D, 0x776B7777,
+ 0x7A7A6E75, 0x6D7A786D, 0x786D7A78, 0x78786C7A,
+ 0x6E797A70, 0x79707579, 0x76776E78, 0x6D7A7772,
+ 0x746B7775, 0x78797073, 0x6571756A, 0x70656C70,
+ 0x6C70656C, 0x666A6B61, 0x746F706E, 0x77746F78,
+ 0x616A6B61, 0x6B62696D, 0x080A0468, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x04090A08, 0x6F690708, 0x9FA59A6B, 0x919B9F93,
+ 0xA1959BA0, 0x9DA1959D, 0x939B9F93, 0x9F939B9F,
+ 0x9B9F939D, 0x959B9F93, 0xA1959DA1, 0x9B9F939D,
+ 0x949AA192, 0xA3949CA3, 0x9CA1929E, 0x8F989F90,
+ 0xA09198A0, 0x989F9099, 0x959DA495, 0xA89B9DA4,
+ 0xA5AC9FA1, 0xA1A8ACA0, 0xA99DABAD, 0xA3A79BA5,
+ 0x97A0A296, 0xA99DA3A3, 0xA6A99AA7, 0x98A7A799,
+ 0xAF9FA7A8, 0xBDBDAFAE, 0x14AAADA4, 0x1915181A,
+ 0x48494518, 0xA0A8A8A2, 0xA9A0A8A9, 0xA6A9A0A8,
+ 0x97A0A499, 0xA89E9FA3, 0xA2A69BA7, 0x9BA2A99C,
+ 0xA397A1A8, 0xA3A79B9F, 0x9CA3A79C, 0xA69AA3A7,
+ 0xA6AA9EA2, 0x96A5AA9B, 0xA99AA0A5, 0xA3A899A4,
+ 0x99A0A596, 0xA697A3A8, 0xA1A8999F, 0xA0A9ADA1,
+ 0xAB9FA8AC, 0xA3A99EA7, 0xA9A2A79E, 0xADA3A9B0,
+ 0xA6AEA3A5, 0x9FA7AEA1, 0xADA2A5AC, 0xA7ACA3A7,
+ 0xA4A7AFA5, 0xB1A7A6AE, 0xA9B1A7A9, 0xA2A8ADA4,
+ 0xA9A0A8AB, 0xA8ABA2A6, 0xA3A3A89F, 0xB1A6A5AD,
+ 0xA8B0A5A9, 0xA4ABAFA4, 0xB0A4ABAF, 0xB0B4A8AC,
+ 0xADAFB5AA, 0xB7ADB2B8, 0xB0B8AEAF, 0xADAFB3AD,
+ 0xB3AEAFB3, 0xAFB3ADAF, 0xADB1B5AF, 0xB5AAB1B6,
+ 0xACB4A9AD, 0xACB1B7AC, 0xB7ACB1B7, 0xAFB5AAB1,
+ 0xACB0B5AC, 0xB7ADB0B5, 0xADB4ADAF, 0xB2B0B8B1,
+ 0xB7B2B0B7, 0x777D78B0, 0x00333934, 0x01010001,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000001, 0x00000100, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x3B060606, 0xB6AB3E3F,
+ 0xB0B7AAB2, 0xA2A6ACA1, 0xADA1A7AD, 0xA8ACA0A9,
+ 0xA0A8ACA0, 0xADA2A8AC, 0xAAAEA2A9, 0xA0A7AE9F,
+ 0xB0A0A8AF, 0xA6AEA3A6, 0x005C5D59, 0x00000001,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x3A010605, 0xABA2373C, 0xA6ACA1A6, 0x9C9FA69F,
+ 0xA39C9BA3, 0x9CA49D9B, 0x989CA49A, 0xA49A9BA3,
+ 0x9EA39A9C, 0x9A9CA297, 0xA49A9CA4, 0x929D959B,
+ 0x98899491, 0x9F9C8E9C, 0x94A09A94, 0x9A9AA399,
+ 0x9F989CA4, 0x939B9497, 0x97979F95, 0xA09999A1,
+ 0x979F9898, 0x9999A19A, 0x9C9298A0, 0x98A09694,
+ 0x96979F95, 0x9F9598A0, 0x949C9297, 0x8E959D93,
+ 0x9D939098, 0x969E9395, 0x92999D91, 0x9D919A9E,
+ 0x999D9199, 0x93979B8F, 0xA1969A9E, 0x92968B9D,
+ 0x9691958A, 0x9B8F9DA1, 0x9D9F9399, 0x949B9F93,
+ 0x9F939CA0, 0x9B9F939B, 0x9AA0A499, 0x100CA0A3,
+ 0x11120E0F, 0xA2080A04, 0xACA1A8AB, 0xA5AC9FA8,
+ 0x97A0A798, 0xA69A9FA6, 0xA0A498A2, 0x959EA296,
+ 0xA0949DA1, 0x9B9F939C, 0x939A9B91, 0x9D949C9D,
+ 0x9B9E959A, 0x95999F94, 0x9D93979F, 0x949C9295,
+ 0x94989E93, 0x9D949B9F, 0x9C9F969C, 0x9A99A099,
+ 0xA09999A1, 0x686C6799, 0x01000000, 0x00000000,
+ 0x00000000, 0x01020000, 0x00000301, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x53070504, 0x7F7B5857, 0x807F7B80,
+ 0x777A7B77, 0x7A767A7B, 0x7A7A747B, 0x777F7F79,
+ 0x7A767D7D, 0x7C7B777B, 0x727A7B77, 0x7D777576,
+ 0x7C7C767D, 0x6C7A7C76, 0x78727275, 0x7C7D7478,
+ 0x74787970, 0x7B727C7D, 0x7C7D747A, 0x737B7C73,
+ 0x7C737B7C, 0x7B7C737B, 0x737D7E75, 0x7D737B7C,
+ 0x7D7E747C, 0x77818278, 0x7E758081, 0x7D7E757D,
+ 0x737D7E75, 0x7C767B7C, 0x7E807A7A, 0x757D7E75,
+ 0x7A717D7E, 0x78797079, 0x72787B72, 0x7F74767B,
+ 0x787E7379, 0x747A7D74, 0x7D747A7D, 0x787D7478,
+ 0x797B7D77, 0x7D758182, 0x7F7D757F, 0x747B7C73,
+ 0x81787C7D, 0x7B7E757E, 0x7374776E, 0x7B757779,
+ 0x797D7779, 0x797D817B, 0x7A747D82, 0x7B807776,
+ 0x63787B72, 0x7C716A6E, 0x6F726978, 0x5F62645E,
+ 0x645E6263, 0x70726C62, 0x6B72756C, 0x746B7174,
+ 0x75736B73, 0x6E78776D, 0x726C7876, 0x79797372,
+ 0x6775756F, 0x71686F70, 0x75766D70, 0x6B73746B,
+ 0x736A7374, 0x75766D72, 0x7A72726C, 0x726C7E80,
+ 0x53575170, 0x3B585F58, 0x01003A40, 0x00010000,
+ 0x36000100, 0x5852393A, 0x57595358, 0x856C706B,
+ 0x7873848A, 0x69706972, 0x6A6E736A, 0x716B6E73,
+ 0x71756F6D, 0x6F70746F, 0x716C7074, 0x6E706A6D,
+ 0x7173776C, 0x776D787C, 0x74756C76, 0x6D74746E,
+ 0x78727373, 0x75777176, 0x736F706C, 0x7C767677,
+ 0x72746E7A, 0x7073766D, 0x79707679, 0x76797076,
+ 0x6970746E, 0x6F696970, 0x70746E6B, 0x73787D74,
+ 0x7B72777C, 0x7E817876, 0x70787970, 0x7B727879,
+ 0x7B7C737A, 0x797B7C73, 0x7C738182, 0x797C7379,
+ 0x777A7F76, 0x7D747981, 0x797C7378, 0x71777C73,
+ 0x7C72757A, 0x767B7274, 0x71777B70, 0x79707A7B,
+ 0x78796F78, 0x71787C71, 0x786E7B7D, 0x76746A79,
+ 0x6F7A796F, 0x796F7A79, 0x7C7B717A, 0x6D7C7C70,
+ 0x786C7979, 0x79796D78, 0x6D78776D, 0x796D7877,
+ 0x78786C79, 0x6C79776C, 0x7D717977, 0x77796D7D,
+ 0x6F767A6F, 0x7A71767A, 0x76767079, 0x6D75766D,
+ 0x746B7576, 0x77786E73, 0x6A767970, 0x6F667073,
+ 0x686B626C, 0x666A6B62, 0x6E666E6F, 0x706E6670,
+ 0x626A6B62, 0x0903686B, 0x08090507, 0x00000100,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x01010101,
+ 0x00000001, 0x00000000, 0x00000000, 0x00010000,
+ 0x37080905, 0xA39A3B3D, 0xA0A499A0, 0x8E9B9F93,
+ 0x9F93989D, 0x9DA1969B, 0x959DA195, 0xA1959DA1,
+ 0x9CA0949D, 0x949DA195, 0xA0939AA1, 0x9BA29599,
+ 0x959CA394, 0xA3969DA4, 0x9CA3949C, 0x959BA293,
+ 0xA3949DA4, 0x9FA4959E, 0x979FA397, 0xA0919FA3,
+ 0xA2A7989B, 0x9EA8AD9E, 0xA79BA8AD, 0xA1A599A3,
+ 0x9CA6A89C, 0xA89CA6A8, 0xA6A99AA6, 0x98A7A799,
+ 0xA799A8A8, 0xAEAEA0A8, 0xA3AAAEA2, 0x1A14A8AE,
+ 0x18191516, 0xA27E7E78, 0xA7A1A8A8, 0xA8A9A0A7,
+ 0x9DA1A59A, 0xA89CA5A9, 0xA3A79BA4, 0x9BA2A99C,
+ 0xA99DA1A8, 0xA7A99DA5, 0x9BA3A79B, 0xA79BA3A7,
+ 0xA5A99DA3, 0x9BA3A79B, 0xA79BA3A7, 0xA3A79BA3,
+ 0x9CA4A89C, 0xA397A4A8, 0xA0A4989F, 0x9BA5A899,
+ 0xACA0A7AA, 0xA3A99EA8, 0xA9A2A79E, 0xADA3A9B0,
+ 0xA5ADA3A5, 0xA3A6AEA3, 0xACA3A8AE, 0xA7ACA3A7,
+ 0xA5A4ACA2, 0xADA2A7AF, 0xA7AFA5A5, 0xA4A8B0A6,
+ 0xABA2A6AA, 0xA6ABA2A6, 0x9FA5ADA3, 0xADA3A1A9,
+ 0xA7AFA4A5, 0xA3ABAFA4, 0xB1A5ABAF, 0xB0B4A8AD,
+ 0xACB1B7AC, 0xB7ACAFB7, 0xB0B6ABAF, 0xB0B1B4AB,
+ 0xB8B2B6B9, 0xAFB3ADB6, 0xADB1B5AF, 0xB5AAAFB7,
+ 0xADB6A9AD, 0xAEB0B8AD, 0xB6ABB1B9, 0xAFB5AAAE,
+ 0xADB0B6AB, 0xB5ABB1B6, 0xAFB6AFAD, 0xB2B1B8B1,
+ 0x443FB1B7, 0x0609073E, 0x00000100, 0x00000000,
+ 0x00000100, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x75050604, 0xB6AB797B,
+ 0xB0B7AAB2, 0xA2A9AFA4, 0xACA0A7AD, 0xA8ACA0A8,
+ 0xA1A8ACA0, 0xACA1A9AD, 0xA9ADA1A8, 0xA0A8AFA2,
+ 0xB0A3A8AF, 0xA6AEA3A7, 0x008A8C86, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x6E010605, 0xABA26D73, 0xA6ACA1A6, 0x9A9EA69C,
+ 0xA39C9BA4, 0x9CA49A9C, 0x999CA499, 0xA49A9CA4,
+ 0x9FA59A9C, 0x979DA398, 0xA2979CA2, 0x99A2989A,
+ 0x9C929C96, 0x9592949F, 0x8C98928A, 0x989AA298,
+ 0xA19A9AA2, 0x949C9599, 0x95969E94, 0x9D96979F,
+ 0x99A19A95, 0x9998A099, 0x9D9398A0, 0x99A19795,
+ 0x9799A197, 0x9D9399A1, 0x9AA29895, 0x93959D93,
+ 0xA097959D, 0x979D929B, 0x8F989C90, 0x9B8F999E,
+ 0x999D9197, 0x97999D92, 0xA1989EA2, 0x9A9D949E,
+ 0x95A3A49A, 0xA1959E9F, 0x9EA0949F, 0x939DA195,
+ 0xA1969B9F, 0x9DA1969D, 0x3AA2A399, 0x120E4043,
+ 0x10110D13, 0xA172746E, 0xADA0A8AC, 0xA6ADA0A6,
+ 0x96A0A798, 0xA69A9EA5, 0xA2A69AA2, 0x969CA095,
+ 0xA1959DA1, 0x9B9F939D, 0x959B9C92, 0x9E939E9F,
+ 0x9DA1969A, 0x91999F94, 0x9B92969C, 0x9BA09796,
+ 0x959DA196, 0x9B929CA0, 0x9EA1989A, 0x9799A197,
+ 0xA19799A1, 0x9B9F9999, 0x00363937, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x05090706, 0x56550806, 0x807F7B58,
+ 0x767A7B77, 0x7A76797A, 0x7777717B, 0x767D7D77,
+ 0x77737C7C, 0x74736F78, 0x7871726E, 0x7C767B7C,
+ 0x7A7C767C, 0x70787D74, 0x81787679, 0x80817880,
+ 0x737D7E75, 0x7C737B7C, 0x7879707B, 0x727B7C73,
+ 0x7C737A7B, 0x7D7E757B, 0x707D7E75, 0x7E747879,
+ 0x7D7E747D, 0x777D7E74, 0x7B718081, 0x7A7B717A,
+ 0x78808178, 0x807A8081, 0x7A7C767E, 0x74808178,
+ 0x7B727C7D, 0x7D7E757A, 0x707A7D74, 0x7C717479,
+ 0x787E7376, 0x757A7D74, 0x7A717B7E, 0x7B7E7575,
+ 0x727D7D77, 0x7B737A7B, 0x807E767D, 0x7B7D7E75,
+ 0x81788181, 0x7B7E757E, 0x71777A71, 0x7C76777A,
+ 0x777B757A, 0x74787C76, 0x7C767A7D, 0x7F82797A,
+ 0x6D787C71, 0x7C717478, 0x6A6D6478, 0x5D62645E,
+ 0x6B656163, 0x76797069, 0x6F71746B, 0x79707578,
+ 0x7A787078, 0x6D78776D, 0x7A747775, 0x7C7C767A,
+ 0x6D75766D, 0x81787576, 0x7B7C7380, 0x6B75766D,
+ 0x766D7374, 0x78797075, 0x77808178, 0x726C7F80,
+ 0x55575170, 0x3C5A5E58, 0x01003B41, 0x00010000,
+ 0x36000100, 0x5652393A, 0x56585255, 0x856B6F69,
+ 0x7873848A, 0x72797272, 0x6C70746E, 0x78727075,
+ 0x73777174, 0x6B767872, 0x6B676E6F, 0x6A6C666A,
+ 0x7174786D, 0x756C787C, 0x70716874, 0x77787872,
+ 0x7C767B7D, 0x7478727A, 0x776B6F6A, 0x7C76787C,
+ 0x74787278, 0x7071746B, 0x756C7679, 0x77786F74,
+ 0x6D747872, 0x6F696F73, 0x70746E6B, 0x79777C73,
+ 0x81787D82, 0x7E81787E, 0x787A7B72, 0x7F768280,
+ 0x7A7B727E, 0x6D7B7C73, 0x71687576, 0x6D70676E,
+ 0x74747970, 0x7B72787D, 0x777A7178, 0x727C7F76,
+ 0x7A71767B, 0x767B7275, 0x6E73776C, 0x7B727778,
+ 0x7A7B727A, 0x6F75796E, 0x7B71797B, 0x79786E7C,
+ 0x7279786E, 0x796F7D7C, 0x7C7B717A, 0x6D77796D,
+ 0x7B6F7779, 0x79796D7B, 0x7179786E, 0x7B6F7C7B,
+ 0x79796D7B, 0x6C79776C, 0x776D7878, 0x76776D76,
+ 0x70787C71, 0x776E7679, 0x76776E76, 0x6B787970,
+ 0x766C7374, 0x78796F75, 0x6B71746B, 0x6F667174,
+ 0x686B626C, 0x656E6F66, 0x6E666D6E, 0x75766D70,
+ 0x04696B65, 0x0905080A, 0x08090708, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x9A3B3D37, 0xA39AA0A3, 0xA0A499A0, 0x95979B8F,
+ 0x9C909DA1, 0x989C9098, 0x969B9F93, 0xA3979EA2,
+ 0x9DA1959F, 0x969FA699, 0xA2959CA3, 0x9BA2959B,
+ 0x929CA396, 0xA598989F, 0x9EA5989E, 0x989DA495,
+ 0xA798A0A7, 0xA0A596A2, 0x9B9FA397, 0xA394A3A7,
+ 0x9FA4959E, 0x9BA3A899, 0xA89CA5AA, 0xA3A79BA4,
+ 0x9CA6A89C, 0xA89CA6A8, 0xA1A397A6, 0x99A8A89A,
+ 0xA799A7A7, 0xA5A899A7, 0xA3AAAEA2, 0xAEA5A8AE,
+ 0x181A14A9, 0xA32A2A24, 0xA9A3A9A9, 0xA8A9A0A9,
+ 0x9DA5A99E, 0xA79BA5A9, 0xA6AA9EA3, 0x9DA1A89B,
+ 0xACA0A5A9, 0xA5A79BAA, 0x9DA5A99D, 0xA498A5A9,
+ 0xA2A99CA0, 0x9DA5A99D, 0xAA9EA3AA, 0xA5AC9FA6,
+ 0x9EA4A89D, 0xA79CA3A9, 0xA5A99DA3, 0x9BA0A498,
+ 0xA99DA3A7, 0x9EA499A5, 0xA3A2A79E, 0xADA3A5AD,
+ 0xA8B0A6A5, 0xA3A9B1A7, 0xAFA5A5AD, 0xA7AFA5A7,
+ 0xA6A9B1A7, 0xB1A7A8B0, 0xA7AFA5A9, 0xA9A8AFA8,
+ 0xB0A9A9B0, 0xA5ADA3A9, 0xA3A5ADA3, 0xADA3A5AD,
+ 0xA7ACA3A5, 0xA5ABAFA4, 0xB1A6ADB1, 0xADB3A8AD,
+ 0xAAB0B8AD, 0xB8ADADB5, 0xAFB7ADB0, 0xB0B1B4AB,
+ 0xB9B0B6B9, 0xB0B2ACB6, 0xADB2B6B0, 0xB5AAAFB7,
+ 0xAFB5AAAD, 0xACB1B7AC, 0xB7ACB1B7, 0xB1B7ACB1,
+ 0xACB0B5AC, 0xBEB8B0B5, 0xAAB1AABA, 0x05777D78,
+ 0x0A08060A, 0x06090707, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0xAA2B2A26, 0xB4A8B0B3,
+ 0xB0B4A8B0, 0xA1AAB0A5, 0xACA1A6AC, 0xA6ACA1A6,
+ 0xA1A6ADA0, 0xADA2A7AE, 0xA6ACA1A7, 0xA2A7ADA2,
+ 0xACA2A7AD, 0xA7AFA5A4, 0x38B0B2AC, 0x01003B3C,
+ 0x00000000, 0x01000100, 0x00000101, 0x00000000,
+ 0xA2060B09, 0xA99FA0A7, 0xA0A89DA1, 0x99A1A99E,
+ 0xA59C9CA4, 0x9FA49BA0, 0x999FA59A, 0xA59A9EA4,
+ 0xA0A69B9F, 0x99A0A499, 0xA69AA1A5, 0x9EA499A2,
+ 0x9C9CA49A, 0x99939BA3, 0x8F99938F, 0x999CA59B,
+ 0xA49A9CA4, 0x9CA49A9C, 0x979BA399, 0xA09998A1,
+ 0x99A19799, 0x989DA398, 0xA1989DA3, 0x9BA0979C,
+ 0x989EA39A, 0xA1989DA3, 0x9CA1989C, 0x91999F94,
+ 0xA196969C, 0x9B9F949D, 0x939B9F93, 0x9E929B9F,
+ 0x9DA1959A, 0x95989C90, 0xA1969DA1, 0x9B9F949D,
+ 0x95A0A498, 0xA1959DA1, 0x9DA1959D, 0x97A0A197,
+ 0xA198A0A1, 0xA0A198A0, 0x0D817F77, 0x150D1516,
+ 0x7E7F7617, 0x9AAAADA4, 0xA89CA1A5, 0xA4A99AA4,
+ 0x999FA699, 0xA4999FA6, 0xA0A69B9E, 0x939CA396,
+ 0xA19599A0, 0x9B9F939D, 0x939B9F93, 0xA2969B9F,
+ 0x9DA1969E, 0x919B9F94, 0xA095989C, 0x9B9F949C,
+ 0x98A1A299, 0x9B93A0A1, 0xA0A1989D, 0x989CA198,
+ 0xA1969DA3, 0x9EA39A9B, 0x069FA39D, 0x0907070B,
+ 0x09090908, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x5E5C5B02,
+ 0x7880807A, 0x81788081, 0x80817880, 0x73797B75,
+ 0x7A747779, 0x7878727A, 0x75757470, 0x7A747A79,
+ 0x76787278, 0x73787D74, 0x7973777C, 0x79797377,
+ 0x75787970, 0x7E757D7E, 0x7B7C737D, 0x747D7E75,
+ 0x7F767C7D, 0x8081787E, 0x737B7C73, 0x81787B7C,
+ 0x80817880, 0x797D7E75, 0x80778182, 0x7E7F767F,
+ 0x797A7B72, 0x7A718182, 0x7A7B7279, 0x737F7D75,
+ 0x81787D7B, 0x7C7D7480, 0x75797C73, 0x7E757B7E,
+ 0x7B7E757B, 0x74787D74, 0x7E75787D, 0x797C737B,
+ 0x757D7E75, 0x7E767D7E, 0x7F7D7580, 0x787B7C73,
+ 0x7E758081, 0x7B7C737D, 0x757A7B72, 0x7E757B7E,
+ 0x7B7D777B, 0x777A7C76, 0x807A7D7D, 0x7C7D7480,
+ 0x71787C71, 0x766C787C, 0x67685F75, 0x64696C63,
+ 0x736A6A6D, 0x70736A70, 0x6E72756C, 0x79707477,
+ 0x78797078, 0x6F7A796F, 0x78707A79, 0x7A78707A,
+ 0x6C75766D, 0x7C737475, 0x76776E7B, 0x69787C71,
+ 0x7A6F7074, 0x777B7076, 0x8A7F8378, 0x71689195,
+ 0x5E605A70, 0x3E60645E, 0x04023F43, 0x00030101,
+ 0x39000100, 0x5B573C3D, 0x595D575A, 0x8470746E,
+ 0x746E868A, 0x70746E70, 0x6E72746E, 0x746E7274,
+ 0x76787272, 0x6C75756F, 0x6F6A7272, 0x71716B72,
+ 0x7176776D, 0x766D787C, 0x71746B73, 0x7373756F,
+ 0x7B777677, 0x7A7B777A, 0x71707770, 0x77717178,
+ 0x75777173, 0x70777A71, 0x786F7679, 0x7D7E7577,
+ 0x74767970, 0x79707A7D, 0x777A7176, 0x74767B72,
+ 0x8178787D, 0x7E81787E, 0x787D7E75, 0x7B728081,
+ 0x797A717A, 0x6E7B7C73, 0x71687677, 0x70716870,
+ 0x726E7267, 0x7D73797D, 0x7B7C727C, 0x707B7C73,
+ 0x7A717679, 0x76797077, 0x737B7C73, 0x7D747B7C,
+ 0x77786F7C, 0x747B7C72, 0x7E757D7E, 0x7879707D,
+ 0x747B7C73, 0x79707C7D, 0x78796F78, 0x707A7C70,
+ 0x7C727A7C, 0x7A796F7D, 0x717B7C72, 0x7C727A7B,
+ 0x76776D7B, 0x6F7A796F, 0x79707A79, 0x797A7178,
+ 0x70787970, 0x756C7879, 0x76797072, 0x6974776E,
+ 0x776E7074, 0x7A7D7474, 0x6B77786F, 0x71677374,
+ 0x70716870, 0x6A707168, 0x71687070, 0x71716B70,
+ 0x0012130F, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010100, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x07070406, 0x07070805, 0x05060209,
+ 0x9A868980, 0x9A919EA3, 0x959B9095, 0x959CA095,
+ 0xA1959DA1, 0x9B9F939D, 0x919B9F93, 0xA1959BA0,
+ 0x9EA2969D, 0x90989F90, 0xA394989F, 0x9CA3969C,
+ 0x9899A196, 0xA4999BA3, 0xA0A79A9C, 0x99A1A899,
+ 0xA999A3A8, 0xA1A494A6, 0x9BA0A596, 0xA596A3A7,
+ 0xA0A596A2, 0x9DA4A99A, 0xAB9FA5AC, 0xA3A79BA7,
+ 0x99A5AA9B, 0xA498A3A8, 0xA3A79BA0, 0x9BA6A89C,
+ 0xA596A7AA, 0xA4A89CA2, 0xA5A6AA9F, 0xBDB4ACB0,
+ 0xA6A9A0BA, 0x7B30322C, 0xABA27F81, 0xA9ADA2A8,
+ 0x9CA5A99D, 0xA99EA4A8, 0xA3A79CA5, 0x9DA3A79B,
+ 0xA99DA5A9, 0xA7A99DA7, 0xA1A7ABA0, 0xA99EA6AC,
+ 0xA2AA9FA3, 0xA0A5ABA0, 0xAA9FA3AB, 0xA2AA9FA4,
+ 0x9FA5AAA1, 0xA9A0A1A9, 0xA2A79EA4, 0x9CA3AA9D,
+ 0xA79CA2A9, 0x9BA196A1, 0x9E9EA499, 0xACA1A3A9,
+ 0xA6ACA1A6, 0xA2AAB2A8, 0xACA5A4AC, 0xA9B0A9A5,
+ 0xA7A9B0A9, 0xAEA7A7AE, 0xA6AEA7A6, 0xA9A9B1AA,
+ 0xAFA8A8B0, 0xA9B0A9A8, 0xA2A8ADA4, 0xABA2A6AB,
+ 0xAAADA4A6, 0xA5A8ACA1, 0xB1A8ACB0, 0xAEB3AAAC,
+ 0xADAFB7AD, 0xB7ADAFB7, 0xB0B8AEAF, 0xAEB0B8AE,
+ 0xB7AEB2B7, 0xB4B5ACB6, 0xADB1B6AD, 0xB4ABAFB7,
+ 0xB4B7AEAF, 0xB1B5B8AF, 0xB9B0B7BA, 0xB5BAB1B6,
+ 0xA9ABAFA9, 0xB0AAABAF, 0x373B36AC, 0x00000100,
+ 0x00000102, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000001, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0xAA585852, 0xB4A8B3B4,
+ 0xAFB3A7B0, 0xA2A6ACA1, 0xADA2A7AD, 0xA7ADA2A7,
+ 0xA1A6ACA1, 0xADA2A6AC, 0xA7ADA2A7, 0xA3A9AEA5,
+ 0xAEA7A7AC, 0xA9AEA5A7, 0x72B0B3AA, 0x01007678,
+ 0x00000000, 0x00000100, 0x00010000, 0x00010100,
+ 0xA1060B09, 0xA9A2A0A8, 0xA0A99FA1, 0x9AA2A89D,
+ 0xA79C9FA5, 0xA2A79EA1, 0x9AA3A79C, 0xA69BA1A5,
+ 0xA1A79CA0, 0x97A0A498, 0xA4989FA3, 0x9FA397A0,
+ 0x969EA499, 0xA29899A1, 0x9BA49A99, 0x9A9DA59B,
+ 0xA69B9DA5, 0x9FA59AA0, 0x9B9EA69C, 0xA39C9DA5,
+ 0x9CA49A9C, 0x979DA497, 0xA1989FA3, 0x9EA39A9E,
+ 0x979EA499, 0xA39A9CA2, 0x9BA1969E, 0x939A9E92,
+ 0x9F949B9F, 0x9DA1969B, 0x959DA195, 0xA1959DA1,
+ 0x9EA2969D, 0x969DA195, 0xA4999EA2, 0x9DA195A0,
+ 0x97A0A498, 0xA195A1A6, 0xA0A4989D, 0x97A0A198,
+ 0xA0989FA0, 0xA2A098A2, 0x0D16140C, 0x7F751715,
+ 0xB2B3A980, 0x98A0A499, 0xA89CA0A4, 0xA4A99AA4,
+ 0x999FA699, 0xA59A9FA6, 0x9FA59A9F, 0x959AA194,
+ 0xA1959BA2, 0x9DA1959D, 0x939B9F93, 0xA0949B9F,
+ 0x9A9E929C, 0x939C9D93, 0x9F959C9D, 0xA0A1979E,
+ 0x98A0A198, 0x9D95A0A1, 0xA0A1989F, 0x989FA398,
+ 0xA3989DA3, 0x9BA1969D, 0x669EA499, 0x0A086A6F,
+ 0x08080809, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x02000003,
+ 0x7A585753, 0x81788080, 0x80817880, 0x76797B75,
+ 0x7C767A7C, 0x7979737C, 0x77787773, 0x79737C7B,
+ 0x76787277, 0x76777B75, 0x7973787C, 0x797B7577,
+ 0x757D7E75, 0x7F767D7E, 0x7B7C737E, 0x737B7C73,
+ 0x80777B7C, 0x8081787F, 0x757B7C73, 0x7D747D7E,
+ 0x7E7F767C, 0x777E7F76, 0x7F767F80, 0x7A7B727E,
+ 0x777D7E75, 0x7F767F80, 0x8081787E, 0x727F7D75,
+ 0x7C737C7A, 0x7B7C737B, 0x72797C73, 0x7E75787B,
+ 0x7C7F767B, 0x72787D74, 0x7D74767B, 0x7A7D747A,
+ 0x757D7E75, 0x7C777D7E, 0x7F7C777F, 0x787B7C73,
+ 0x81788081, 0x7A7B7280, 0x747B7C73, 0x7C737C7D,
+ 0x7A7D747B, 0x767C7C76, 0x7B757C7C, 0x7879707B,
+ 0x7072766B, 0x6F65787C, 0x696A616E, 0x636A6E63,
+ 0x736A6A6E, 0x777A7170, 0x6F72766B, 0x7970767A,
+ 0x73746B78, 0x7079776F, 0x79717A78, 0x76746C7B,
+ 0x746F7067, 0x766D7C7D, 0x75766D75, 0x6C75796E,
+ 0x7C707377, 0x787C7078, 0x877E8276, 0x71678F93,
+ 0x60615870, 0x3F62645E, 0x03014044, 0x00030100,
+ 0x3B000100, 0x5C573C3D, 0x575B5558, 0x8271766D,
+ 0x7B75868B, 0x777B7577, 0x767B7D77, 0x746E7A7C,
+ 0x74746E74, 0x6C7A7870, 0x736E7674, 0x7A787076,
+ 0x6D73746B, 0x776E7478, 0x71746B74, 0x7370746E,
+ 0x78747478, 0x7A7B7777, 0x75727972, 0x7C76757C,
+ 0x7D7F797A, 0x73797C73, 0x7C73797C, 0x7B7C737B,
+ 0x707B7C73, 0x79707679, 0x77786F78, 0x74787B72,
+ 0x7C73787D, 0x787B7279, 0x787C7D74, 0x7C738081,
+ 0x7A7B727B, 0x78808178, 0x71688081, 0x70716870,
+ 0x6D717268, 0x7C727677, 0x7C7D737B, 0x6F7B7C73,
+ 0x786F7778, 0x7B7C7377, 0x757B7C73, 0x7C737D7E,
+ 0x7B7C737B, 0x747B7C73, 0x7C737D7E, 0x7879707B,
+ 0x777B7B75, 0x7C737D7D, 0x78796F7B, 0x707A7B71,
+ 0x7B717A7C, 0x7B7A707C, 0x7275766C, 0x776D7B7C,
+ 0x76776D76, 0x707A7870, 0x7A717A78, 0x78797079,
+ 0x7076776E, 0x79707879, 0x74776E76, 0x6D74786D,
+ 0x736A7478, 0x74776E70, 0x6B76776E, 0x756C7374,
+ 0x78797074, 0x6A70706A, 0x706A7070, 0x0A0A0470,
+ 0x00000100, 0x00000001, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x07080409, 0x05040805, 0x989A9407,
+ 0x90A0A39A, 0x9B92959B, 0x959B9096, 0x9A9DA196,
+ 0xA195A1A5, 0x9B9F939D, 0x96A0A596, 0xA498A0A5,
+ 0x9FA397A0, 0x909DA495, 0xA394989F, 0x9CA3969C,
+ 0x989CA499, 0xA1969AA4, 0x9CA49999, 0x969CA396,
+ 0xA392A0A5, 0x9FA5949D, 0x98A0A596, 0xA899A0A4,
+ 0xA5AA9BA5, 0x9EA7AC9D, 0xAA9EA6AD, 0xA5A99DA6,
+ 0x96A2A798, 0xA69AA0A5, 0xA4A89CA2, 0x96A4A89C,
+ 0xAA9BA0A5, 0xA4A89CA5, 0xA0A6AA9F, 0xB0A6A6A9,
+ 0xB9BDB2AF, 0x29A9ACA3, 0x84792F32, 0xA8ACA180,
+ 0xA0A3A79B, 0xA99EA8AC, 0xA5A99EA5, 0x9DA8ACA0,
+ 0xA99DA5A9, 0xA6AA9EA7, 0xA0A5ABA0, 0xA99FA5AB,
+ 0xA3ABA1A1, 0xA0A3ABA0, 0xAAA1A3AB, 0xA2AAA0A5,
+ 0xA0A2AAA0, 0xA99FA2AA, 0xA2AAA0A1, 0xA1A6ACA1,
+ 0xA89DA6AC, 0x9DA59AA2, 0x9DA1A89B, 0xACA1A3AA,
+ 0xA5A99EA8, 0xA4A7ACA3, 0xB0A9A6AE, 0xA8B0A9A9,
+ 0xA9A9B0A9, 0xB0A9A8B0, 0xA8B0A9A8, 0xA9A8B0A9,
+ 0xB0A9A8B0, 0xAAB1AAA9, 0xA3AAB2A8, 0xABA2A7AC,
+ 0xA5AAA1A6, 0xA1ACAFA6, 0xB0A7A8AC, 0xB0B5ACAB,
+ 0xAEAFB7AD, 0xB8B1B0B8, 0xB1B8B1B1, 0xAFB1B9AF,
+ 0xB8ADB1B9, 0xB4B8ADB4, 0xADB1B6AD, 0xB4ABAFB7,
+ 0xB2B5ACAF, 0xAFB9BAB1, 0xB8B2B7B8, 0xB4B8B2B6,
+ 0x70ABAFAA, 0x01006F75, 0x00010000, 0x00000000,
+ 0x00000000, 0x01010100, 0x01000000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010002,
+ 0x00000000, 0x00010000, 0xA782867B, 0xB4A8AFB3,
+ 0xB0B4A8B0, 0xA3A9AFA4, 0xAEA5A7AC, 0xA9AEA5A9,
+ 0xA3AAAFA6, 0xACA1A7AC, 0xA7ADA2A6, 0xA2A7ADA2,
+ 0xAEA5A7AD, 0xA8ADA4A9, 0xAAB0B4A9, 0x3C3AB0B3,
+ 0x0000003B, 0x00000000, 0x00010000, 0x00000000,
+ 0xA1080C07, 0xA8A1A1A8, 0xA0A99FA0, 0x9D9EA499,
+ 0xA89DA2A8, 0x9FA59AA2, 0x9B9EA499, 0xA59AA0A6,
+ 0x9EA4999F, 0x9AA0A69B, 0xA59A9FA5, 0xA0A69B9F,
+ 0x98A1A599, 0xA4999EA5, 0x9EA4999E, 0x9A9DA59A,
+ 0xA39A9DA5, 0x9FA49B9E, 0x99A1A69D, 0xA49D9BA3,
+ 0x9CA49A9D, 0x989DA398, 0xA4999FA3, 0x9FA398A0,
+ 0x98A0A498, 0xA196A0A4, 0x9AA0959B, 0x96A1A599,
+ 0x9F93A0A5, 0x9B9F939B, 0x98A1A599, 0xA498A0A4,
+ 0x9DA195A0, 0x97A0A498, 0xA6999FA3, 0x9DA1959F,
+ 0x93A0A498, 0x9F939D9F, 0xA0A4989B, 0x99A0A198,
+ 0x9F99A1A2, 0x75766D9F, 0x7515160D, 0xB3A97E7F,
+ 0xB0B4A8B2, 0x9FA4A89C, 0xA89CA5AC, 0xA4A89CA4,
+ 0x98A1A79C, 0xA69C9DA3, 0xA1A79C9E, 0x959EA598,
+ 0xA4989DA1, 0xA2A498A2, 0x939B9F93, 0xA1959B9F,
+ 0x9CA0949D, 0x929FA096, 0x9E969A9B, 0xA09E96A0,
+ 0x98A0A198, 0x9D94A0A1, 0x9D9E959C, 0x999FA299,
+ 0xA4999DA2, 0x9FA398A0, 0x99A1A59A, 0x3C38A0A4,
+ 0x0809073D, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000000,
+ 0x55080606, 0x7F7B5856, 0x80807A80, 0x71797B75,
+ 0x7970777A, 0x797A7178, 0x76797973, 0x7B777C7C,
+ 0x7A7B777A, 0x77797A76, 0x7B777A7B, 0x7779737A,
+ 0x737E7F76, 0x7B727B7C, 0x7C7D747A, 0x757D7E75,
+ 0x7F767D7E, 0x7B7C737E, 0x757B7B75, 0x7B757B7B,
+ 0x80807A7B, 0x7881817B, 0x7C777E7E, 0x84817C7F,
+ 0x7D838179, 0x867C8785, 0x7F7E7487, 0x707A7870,
+ 0x7D777A78, 0x7D7E757D, 0x747E7F76, 0x7E757D7E,
+ 0x7E81787B, 0x72787D74, 0x7B72767B, 0x787D7476,
+ 0x757B7E75, 0x7E757B7E, 0x7D7E757D, 0x78807E76,
+ 0x7D758280, 0x7F7D757F, 0x787F7D75, 0x7E758081,
+ 0x7B7C737D, 0x727A7C76, 0x7B777678, 0x7878727C,
+ 0x7072766B, 0x756B787C, 0x6D6E6474, 0x6465685F,
+ 0x7269686D, 0x70736A6F, 0x6B74786D, 0x73697276,
+ 0x76776E72, 0x6E77756D, 0x7B727876, 0x7B7C737A,
+ 0x737D7B73, 0x7C737D7B, 0x7B7C737B, 0x6F787C71,
+ 0x7E71777B, 0x767D7077, 0x887F8377, 0x82789094,
+ 0x60615881, 0x3F62645E, 0x04004044, 0x00020000,
+ 0x3B000100, 0x5C573A3D, 0x585C5658, 0x82757D73,
+ 0x7B75848C, 0x787C7677, 0x77787C77, 0x7773787C,
+ 0x72746E76, 0x6C787970, 0x746E7475, 0x71726974,
+ 0x6D72756C, 0x786E7478, 0x787B7277, 0x72747872,
+ 0x77737377, 0x7E7F7B76, 0x72787C76, 0x8178767B,
+ 0x8081787E, 0x75787B72, 0x81787B7E, 0x7D7E7580,
+ 0x737D7E75, 0x78707B7C, 0x797A717A, 0x6F75786F,
+ 0x7B727578, 0x7B7C737A, 0x737F8077, 0x7C737B7C,
+ 0x7B7C737B, 0x737C7D74, 0x71687B7C, 0x70716870,
+ 0x73707167, 0x83797D7F, 0x84837984, 0x777A7B72,
+ 0x7C737F80, 0x7B7C737B, 0x727B7C73, 0x78727A7B,
+ 0x7B7C7378, 0x757B7C73, 0x786F7D7E, 0x78797077,
+ 0x757B7C73, 0x7C737D7E, 0x7E7F757B, 0x707C7B71,
+ 0x7D717C7C, 0x7E7E727D, 0x6D7B7C72, 0x776C7478,
+ 0x74786D73, 0x70797A71, 0x78707879, 0x7A78707A,
+ 0x6F74756C, 0x78727778, 0x797A7178, 0x6D73776C,
+ 0x746A7478, 0x72736A73, 0x6B75766D, 0x756C7374,
+ 0x76776E74, 0x6A70706A, 0x09057070, 0x090A0808,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x02000103, 0x05080409, 0x68640705, 0x989B9269,
+ 0x90979B90, 0x9A8F969D, 0x959B9094, 0x989DA196,
+ 0xA498A0A4, 0x9EA296A0, 0x989DA195, 0xA498A0A4,
+ 0xA0A498A0, 0x94979E8F, 0xA5999CA3, 0xA0A79AA1,
+ 0x999BA497, 0xA4989CA4, 0x9BA3989A, 0x9B9EA499,
+ 0xA89BA1A8, 0xA0A798A1, 0x9DA6ADA0, 0xAA9BA5A9,
+ 0xA8AD9EA7, 0x9DA7AC9D, 0xAD9EA5AC, 0xA0A596A8,
+ 0x9BA0A498, 0xA99EA3A7, 0xA3A79BA5, 0x9A9EA596,
+ 0xAB9CA2A9, 0xABAFA3A4, 0xA0A8A99F, 0xA8A0A9AA,
+ 0xAEAFA5AA, 0xA0A7AB9F, 0x5C51A8AC, 0xA6ACA156,
+ 0x9BA6ADA0, 0xA99DA5AA, 0xA8AA9EA5, 0xA1A5A99D,
+ 0xAA9EA9AD, 0xA5A99DA6, 0xA1A3A99E, 0xA9A0A3AB,
+ 0xA5AAA1A4, 0xA0A5ABA0, 0xA9A0A5AB, 0xA3A89FA6,
+ 0xA0A2AAA0, 0xABA2A2AA, 0xA5ABA0A6, 0x9CA4A89D,
+ 0xA89DA1A7, 0x9FA59AA2, 0x9DA0A498, 0xA99DA5A9,
+ 0xA3A79BA7, 0x9DA2A89D, 0xADA3A0A8, 0xA5ADA3A5,
+ 0xA7A6AFA5, 0xAFA8A8B1, 0xA9B1AAA7, 0xA9A8B0A9,
+ 0xB0A9A9B0, 0xAAB1AAA9, 0xA7A8B0A6, 0xB1AAA9B1,
+ 0xA5ADA3AA, 0xA5AAAFA6, 0xABA0ACB0, 0xADB3A8A7,
+ 0xAFB1B9AF, 0xB8B1AEB6, 0xB1B8B1B0, 0xAEB1B9AF,
+ 0xB6ADB3B9, 0xB2B7AEB1, 0xADAFB7AD, 0xB5ABAFB7,
+ 0xB1B6ADAD, 0xB0B8B9B0, 0xB8B2B8B9, 0x7B7F7AB6,
+ 0x00383B39, 0x00000001, 0x00000000, 0x01020001,
+ 0x00000301, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x01000000, 0x43453F00, 0xA8B0B4A9, 0xB4A8B0B4,
+ 0xAFB3A8B0, 0xA4A9AFA4, 0xAFA4A9AF, 0xA9AEA5A9,
+ 0xA5A9AEA5, 0xACA3A9AE, 0xA7ADA2A7, 0xA2A7ADA2,
+ 0xAEA5A7AD, 0xAAB0A5A9, 0xA9B0B4A9, 0x7672B0B4,
+ 0x00010075, 0x00000000, 0x00010000, 0x00000000,
+ 0xA13E3F3B, 0xA8A1A3A7, 0xA0A89EA1, 0x9DA0A89E,
+ 0xA79CA2A8, 0xA2A89DA1, 0x9AA1A79C, 0xA59A9FA5,
+ 0xA1A79C9F, 0x9A9EA69B, 0xA79C9DA5, 0x9FA59AA1,
+ 0x999EA499, 0xA4999EA4, 0x9EA4999E, 0x9A9CA499,
+ 0xA49B9DA5, 0xA0A59C9F, 0x9AA1A69D, 0xA39C9CA4,
+ 0x9CA49A9C, 0x999EA499, 0xA498A0A4, 0xA3A599A0,
+ 0x989FA397, 0xA297A0A4, 0x9DA4979C, 0x96A0A596,
+ 0xA296A0A5, 0x9DA1959E, 0x98A0A498, 0xA599A0A4,
+ 0xA0A498A1, 0x98A0A498, 0xA498A0A4, 0xA0A498A0,
+ 0x97A0A498, 0xA1959FA3, 0xA0A4989D, 0x98A0A197,
+ 0xA198A0A1, 0x1B1C13A0, 0xA87E7F75, 0xB4A8B2B4,
+ 0xB0B4A8B2, 0x9FA3AA9D, 0xA89CA5AC, 0xA4A89CA4,
+ 0x99A1A89B, 0xA59A9EA4, 0xA1A79C9F, 0x98A0A498,
+ 0xA498A0A4, 0xA2A498A2, 0x949B9F93, 0xA5999CA0,
+ 0xA1A599A1, 0x959EA297, 0xA1989E9F, 0xA1A299A0,
+ 0x97A0A198, 0xA2999FA0, 0x9DA097A1, 0x989BA097,
+ 0xA39A9CA1, 0x9FA398A0, 0x99A0A499, 0xA39DA0A4,
+ 0x080905A3, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000100,
+ 0x06080507, 0x57560806, 0x807F7B59, 0x73797B75,
+ 0x7A71797C, 0x7C7D7477, 0x6E7D7D77, 0x7A747474,
+ 0x7B7D777A, 0x73797A76, 0x7B777779, 0x797B757A,
+ 0x78808178, 0x7C738081, 0x7879707B, 0x787D7E75,
+ 0x7C738081, 0x7E7F767B, 0x777D7D77, 0x807A7D7D,
+ 0x80807A80, 0x7B7E7E78, 0x817C8181, 0x83807B84,
+ 0x79838179, 0x81798381, 0x807F7583, 0x757F7D75,
+ 0x7B757D7E, 0x7C7D747B, 0x727B7C73, 0x81787B7C,
+ 0x7B7E757E, 0x71787B72, 0x7D74777A, 0x787B727A,
+ 0x757B7E75, 0x7D747B7E, 0x7D7E757C, 0x78828078,
+ 0x7E768280, 0x7F7D7580, 0x73828078, 0x7C737B7C,
+ 0x8081787B, 0x6E7B7D77, 0x736F7474, 0x78787274,
+ 0x71787C71, 0x7C71787C, 0x787C7178, 0x706E736A,
+ 0x79707479, 0x76797076, 0x6D767A6F, 0x79707478,
+ 0x76776E78, 0x7177746F, 0x79717976, 0x77786F7B,
+ 0x737E7C74, 0x7C737D7B, 0x7C7D747B, 0x71787C71,
+ 0x7C70797D, 0x787C7078, 0x897E8277, 0x71679293,
+ 0x60615870, 0x3F63655F, 0x03004044, 0x01050000,
+ 0x3B000100, 0x5C573A3D, 0x585D5458, 0x82787E73,
+ 0x7C73858D, 0x777B7577, 0x73757973, 0x7A767677,
+ 0x70706A79, 0x656D6D67, 0x746E6D6E, 0x6D6D6774,
+ 0x7171746B, 0x7B71787C, 0x76776E7A, 0x7372746E,
+ 0x77737478, 0x7E807A76, 0x727A7D74, 0x8178787B,
+ 0x80817880, 0x747B7E75, 0x7B727A7D, 0x7879707A,
+ 0x757B7C73, 0x7B737D7E, 0x7D7E757D, 0x797A7D74,
+ 0x7D747F82, 0x7C7D747C, 0x757E7F76, 0x7D747D7E,
+ 0x7D7E757C, 0x6D7B7C73, 0x7C737576, 0x75766D7B,
+ 0x797C7D73, 0x7D738283, 0x7C7D737E, 0x7683847B,
+ 0x7B727E7F, 0x7B7C737A, 0x737D7E75, 0x78727B7C,
+ 0x78797078, 0x747B7C73, 0x7C737D7E, 0x7D7E747B,
+ 0x747D7E75, 0x7F767C7D, 0x7D7E747E, 0x707E7D73,
+ 0x7C707C7C, 0x7A7B717C, 0x6976776D, 0x73687074,
+ 0x74786D6F, 0x70787970, 0x78707879, 0x7B79717A,
+ 0x70787970, 0x79707879, 0x78797078, 0x6D74776E,
+ 0x73697478, 0x72736A72, 0x7075756F, 0x77717676,
+ 0x78787277, 0x054E4D49, 0x09070A09, 0x08090708,
+ 0x00010101, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x02000000, 0x00010100,
+ 0x02000102, 0x36080507, 0x9B923937, 0x989C909A,
+ 0x8F959C8F, 0x9B90959C, 0x959B9095, 0x989B9F93,
+ 0xA498A0A4, 0xA0A498A0, 0x98A0A498, 0xA195A0A4,
+ 0x9B9F939D, 0x9A979E91, 0xA79BA0A7, 0xA0A79AA3,
+ 0x9AA0A79A, 0xA4999EA7, 0x9EA69B9C, 0x9CA0A89D,
+ 0xA89BA1A7, 0xA1A89BA1, 0x9BA3AA9D, 0xAA9BA3AA,
+ 0xA5AA9BA5, 0x9AA4A99A, 0xAC9DA2A9, 0xA7AC9DA7,
+ 0x9BA5A99D, 0xA79BA3A7, 0xA3A79BA3, 0xA0A5AC9D,
+ 0xAFA0A8AF, 0xAAAEA2A8, 0x9FAEB0A4, 0xA99FAAA9,
+ 0xA8A99FAA, 0xA1A8ACA0, 0xABA0A9AD, 0xA6ACA1A5,
+ 0x9AA3AA9D, 0xA99DA4A9, 0xA8ACA0A5, 0xA0A5A99D,
+ 0xACA1A8AC, 0xA4AA9FA8, 0xA1A1A99F, 0xAAA0A3AB,
+ 0xA3A89FA2, 0x9FA7AAA1, 0xAAA1A6AA, 0xA7AAA1A7,
+ 0x9FA4A9A0, 0xABA0A1A9, 0xA5ABA0A5, 0x9EA2A79E,
+ 0xABA2A2A7, 0x9FA59AA6, 0x9B9DA398, 0xA79BA3A7,
+ 0xA8ACA0A3, 0x9DA9ADA2, 0xA79EA2A8, 0xA5ADA3A2,
+ 0xA6A7AFA5, 0xB0A9A7B0, 0xA8B1A7A8, 0xA8ABB3A9,
+ 0xB1A7AAB2, 0xA9B0A9A9, 0xA8A9B1A7, 0xAFA8A9B2,
+ 0xA9B0A9A7, 0xA6AEB3AA, 0xB0A5AAAF, 0xAAB0A5AC,
+ 0xB1B1B9AF, 0xB8B1B0B8, 0xB0B9AFB0, 0xADB0B8AE,
+ 0xB7AEB2B8, 0xB2B7AEB2, 0xACB1B9AF, 0xB5AFAEB6,
+ 0xB1B5B0B1, 0xB5B8B6B5, 0x7E7CB8B6, 0x080B097D,
+ 0x00000000, 0x00010000, 0x01000200, 0x00020001,
+ 0x01000200, 0x00010000, 0x02000001, 0x00000100,
+ 0x00010000, 0x00000000, 0x00010000, 0x00000100,
+ 0x01020001, 0x00010200, 0x00000100, 0x00010101,
+ 0x02000000, 0x777B7500, 0xA6B1B7AC, 0xB0A7ABB1,
+ 0xADB2A9AB, 0xA5B0B4A8, 0xAFA3ADB1, 0xABAFA4AB,
+ 0xA1A7ADA2, 0xACA3A6AC, 0xA6ACA1A7, 0xA4A6ACA1,
+ 0xABA1A9AF, 0xA9AFA4A3, 0xA9B0B4A9, 0x7F76B0B4,
+ 0x12130F7C, 0x00000100, 0x00000102, 0x00010000,
+ 0xA24D4F49, 0xABA2A8AB, 0xA3ABA1A6, 0x9DA1A99F,
+ 0xA79C9FA7, 0x9DA59A9F, 0x9B9FA89B, 0xA89B9FA8,
+ 0xA1A99E9F, 0x9D9EA69B, 0xA79C9FA7, 0x9EA499A1,
+ 0x9B9FA59A, 0xA99F9DA5, 0x9CA59BA0, 0x9C9FA79C,
+ 0xA79C9FA7, 0x9FA79D9F, 0xA1A1A99F, 0xA399A1A8,
+ 0x9CA49A9B, 0x9CA1A79C, 0xA498A4A8, 0xA0A498A0,
+ 0x97A0A498, 0xA4989FA3, 0xA3A79BA0, 0x9BA3A899,
+ 0xA498A5AA, 0xA0A498A0, 0x959FA699, 0xA4989DA4,
+ 0xA0A498A0, 0x9BA2A399, 0xA499A2A6, 0xA2A69BA0,
+ 0x9BA4A89C, 0xA498A3A7, 0x9EA598A0, 0xA2A8ACA0,
+ 0x392FA9AD, 0x84857B38, 0x98B5B5A9, 0xAC9DA4A7,
+ 0xA7AC9DA9, 0x9EA2A99C, 0xAB9CA4AB, 0xA0A798A4,
+ 0x9BA3AA9D, 0xA89BA1A8, 0xA5A99DA1, 0x98A3A79B,
+ 0xA899A0A4, 0xA3A899A3, 0x98A0A498, 0xA59AA0A4,
+ 0x9FA6999F, 0x929CA396, 0xA0969A9E, 0xA4A59B9F,
+ 0x99A2A399, 0xA499A0A4, 0x9FA59AA0, 0x979EA39A,
+ 0xA39A9BA0, 0xA0A4999E, 0x98A0A499, 0xA39AA1A2,
+ 0x6D6F69A0, 0x02000400, 0x03010104, 0x00020000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x50514F00, 0x767A7B77,
+ 0x7C767A7C, 0x7A7C767A, 0x757D7D77, 0x78727B7B,
+ 0x7B7C7378, 0x747A7C76, 0x78727A7D, 0x7B7C7378,
+ 0x767B7C73, 0x79707E7F, 0x7B7C7378, 0x75808178,
+ 0x79707D7E, 0x7D7E7578, 0x7B7E807A, 0x7F797F81,
+ 0x7B7D777D, 0x7F82827C, 0x7F7A8585, 0x807D7882,
+ 0x7880807A, 0x81788081, 0x80817880, 0x7B7F8077,
+ 0x7C768184, 0x7A7D747A, 0x777D7E75, 0x82798081,
+ 0x80817881, 0x75808178, 0x7B727D7E, 0x7B7C737A,
+ 0x757D7E75, 0x7C737D7E, 0x7D7E757B, 0x737E7B76,
+ 0x7C747C78, 0x7E7C747E, 0x74808177, 0x7C737D7E,
+ 0x7D7E757B, 0x6A73746B, 0x78747070, 0x7F7C777B,
+ 0x73787B72, 0x7E73787E, 0x757B7078, 0x6F70756C,
+ 0x79737378, 0x777A7177, 0x70787C71, 0x78727679,
+ 0x78787276, 0x77797671, 0x78707F7C, 0x6C6A627A,
+ 0x6F787970, 0x79707778, 0x7B7C7378, 0x72767A6F,
+ 0x7D72797D, 0x7B7C7279, 0x88808178, 0x71689091,
+ 0x5E615870, 0x3F60645E, 0x04003E44, 0x00040000,
+ 0x3C000200, 0x635A3D41, 0x5E645960, 0x817D8477,
+ 0x7D74868C, 0x787C7678, 0x6F797B75, 0x76707575,
+ 0x726F6A76, 0x6666635E, 0x6B666E6B, 0x6D6A656E,
+ 0x73787970, 0x7970797C, 0x78797078, 0x72767872,
+ 0x7B757678, 0x7B7E757B, 0x70787B72, 0x7B727679,
+ 0x7A7B727A, 0x777A7E73, 0x7C737E82, 0x7B7C737B,
+ 0x737B7C73, 0x78707B7C, 0x7D7E757A, 0x787A7D74,
+ 0x81787E81, 0x80817880, 0x757A7B71, 0x80767E7F,
+ 0x7A7B717F, 0x6D75766D, 0x71687576, 0x75766D70,
+ 0x757B7C73, 0x7E757D7E, 0x7B7C737D, 0x757F8077,
+ 0x7F767B7E, 0x7879707E, 0x72767970, 0x7970787B,
+ 0x76797076, 0x6D75796E, 0x7C717579, 0x77796D78,
+ 0x717A7B71, 0x7C727C7B, 0x7B7C727B, 0x727B7C72,
+ 0x796F7B7C, 0x7B7C7278, 0x6B78796F, 0x756B7475,
+ 0x76776D74, 0x6C787970, 0x786E7475, 0x78796F77,
+ 0x70787970, 0x786F7879, 0x77786F77, 0x6A73746B,
+ 0x746B7273, 0x73746B73, 0x73787872, 0x77737979,
+ 0x51504C78, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x00010000, 0x00000100, 0x09060507, 0x04090605,
+ 0x08050708, 0x931C1A19, 0x9C919B9C, 0x989C9098,
+ 0x91959C8F, 0x9D92979E, 0x979D9297, 0x989CA094,
+ 0xA596A0A4, 0xA0A596A0, 0x9AA1A697, 0xA79CA2A6,
+ 0x9EA297A3, 0x9B9EA499, 0xA598A1A8, 0xA1A89B9E,
+ 0x9CA2A89D, 0xA79C9FA7, 0xA0A89D9F, 0x9D9FA79C,
+ 0xA89DA0A8, 0xA0A99CA0, 0x9AA0AA9A, 0xAB9CA2A9,
+ 0xA6AB9CA4, 0xA1A9ADA1, 0xAEA2A9AD, 0xAAAEA2AA,
+ 0x96A4A99A, 0xA899A0A5, 0xA7AC9DA3, 0xA5ABAFA3,
+ 0xAFA3ADB1, 0xA8ACA0AB, 0xA3ADAFA3, 0xACA0ADAF,
+ 0xAAACA0AA, 0xA5A8ACA0, 0xB6B0AAB0, 0xB3B8AFB2,
+ 0xA0A8ACA1, 0xACA1A8AC, 0xA7ABA0A8, 0xA2A9ADA2,
+ 0xACA3A7AD, 0xA0A89EA7, 0x9D9CA59B, 0xA8A19AA5,
+ 0xA5ADA3A0, 0xA2A7AAA1, 0xABA2AAAB, 0xA8ABA2A8,
+ 0xA4A6ABA2, 0xADA2A8AD, 0xA6ABA2A9, 0xA2A8ACA6,
+ 0xA49DA2A9, 0x99A1979D, 0x9D99A197, 0xADA0A2A8,
+ 0xA8ACA0A6, 0x9FA8ACA1, 0xADA4A4AA, 0xA9AEA5A8,
+ 0xA4A7ABA5, 0xABA2A6AA, 0xACB1A8A6, 0xA7ACB2A7,
+ 0xB0A7ACB2, 0xA8B0A6AB, 0xABACB4AA, 0xB4AAADB5,
+ 0xACB4AAAC, 0xA9A9B1A7, 0xB0A7ABB3, 0xA9B1A7AB,
+ 0xAFAFB4AB, 0xB8B1B1B9, 0xB0B9AFB0, 0xABAEB6AC,
+ 0xB6ABB0B6, 0xB6BCB1B0, 0xB0B6BAAF, 0xB6B2B6B9,
+ 0xB7B6B8B5, 0x43A8A2AD, 0x040D3D36, 0x06040A07,
+ 0x00000000, 0x00000001, 0x00000000, 0x01000000,
+ 0x00000101, 0x02000002, 0x01020001, 0x00000200,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x01020001, 0x00010200, 0x00000100, 0x00000000,
+ 0x3E390001, 0xB3B8AF3A, 0xA8ABB3A9, 0xB1ABABB3,
+ 0xADB2A9AD, 0xA3ADB1A5, 0xB1A5ADB2, 0xABAFA3AD,
+ 0xA2A5AC9F, 0xAFA6A7AD, 0xAAB0A5AA, 0xA4A9AFA4,
+ 0xAFA4AAB1, 0xA8B0A5A7, 0xA8B0B4A8, 0xB5AAB0B4,
+ 0x474943B1, 0x00000100, 0x00000001, 0x00010000,
+ 0xA150504A, 0xACA1AAAB, 0xA6ACA1A8, 0x9DA2AAA0,
+ 0xA69C9EA7, 0xA0A89D9E, 0x9B9EA69B, 0xA89B9FA8,
+ 0xA0A89D9F, 0x9E9FA79D, 0xA499A0A8, 0x9EA4999E,
+ 0x9FA3A99E, 0xA8A1A1A9, 0x9EA9A1A0, 0x9CA0A89E,
+ 0xA99D9FA7, 0x9EA79D9F, 0x9CA0A8A1, 0xA49A9BA3,
+ 0x9EA4999C, 0x9DA6AA9E, 0xA79BA5A9, 0xA3A79BA3,
+ 0x9CA0A498, 0xA99DA4A8, 0xA5A99DA5, 0x9AA2A798,
+ 0xA499A4A9, 0xA3A79CA0, 0x969DA497, 0xA4989EA5,
+ 0xA2A69AA0, 0x99A5A69C, 0xA499A2A3, 0xA3A79CA0,
+ 0x9CA2A69A, 0xA498A4A8, 0x9DA497A0, 0x54A9ADA1,
+ 0x3A2E5C60, 0xABADA138, 0x98A9AB9F, 0xAC9DA4A7,
+ 0xA7AC9DA9, 0xA0A3AA9D, 0xAD9EA6AD, 0xA3AA9BA6,
+ 0x9BA3AA9D, 0xA79BA1A8, 0xA4A89CA3, 0x98A5A99D,
+ 0xA79BA0A4, 0xA3A899A3, 0x98A1A599, 0xA59AA0A4,
+ 0x9FA59A9F, 0x96A0A79A, 0xA59B9EA2, 0xA4A59BA4,
+ 0x99A1A59A, 0xA699A0A4, 0xA2A89D9F, 0x9D9EA39A,
+ 0xA49B9FA3, 0x9FA49B9F, 0x999FA398, 0xA499A2A3,
+ 0xA0A39AA0, 0x01343833, 0x03010003, 0x01040200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010002, 0x00000000, 0x00000000, 0x77292A28,
+ 0x7C77787C, 0x787C7678, 0x777E807A, 0x78707D7D,
+ 0x7D7B737A, 0x727C7D74, 0x7C76787B, 0x7979737A,
+ 0x707A7B72, 0x79707879, 0x7B7C7378, 0x787A7B72,
+ 0x7E758081, 0x7D7E757D, 0x757D7F79, 0x7D77797B,
+ 0x7D7F797B, 0x7881817B, 0x807B7E7E, 0x83807B84,
+ 0x767D7D77, 0x81787A7C, 0x7F807780, 0x747F8279,
+ 0x7B757A7D, 0x7E807A79, 0x747B7C73, 0x7E757D7E,
+ 0x8182797D, 0x757F8077, 0x7D757D7E, 0x8381797F,
+ 0x747D7E75, 0x81787C7D, 0x82807880, 0x6E7B7873,
+ 0x79717773, 0x7F7D757B, 0x767B7C72, 0x81787D81,
+ 0x7D7E7580, 0x6975766D, 0x7873716E, 0x7F7C777C,
+ 0x747A7D74, 0x7E73787D, 0x71796E76, 0x6F767B72,
+ 0x77717378, 0x75786F75, 0x70767970, 0x78727679,
+ 0x72746E76, 0x77797671, 0x766E807C, 0x72706878,
+ 0x757B7C73, 0x7C737D7E, 0x7C7D747B, 0x72767A6F,
+ 0x7F76797D, 0x7B7C737E, 0x88808178, 0x71689091,
+ 0x5E615870, 0x3F60645F, 0x04003E44, 0x00040000,
+ 0x3C000200, 0x64593E42, 0x61655960, 0x817F8377,
+ 0x8279868C, 0x787C767D, 0x73808178, 0x736E7B7C,
+ 0x726F6A76, 0x666E6B66, 0x645F6E6B, 0x66635E67,
+ 0x74787970, 0x7F767A7D, 0x7B7C737E, 0x73767872,
+ 0x7D74797C, 0x8081787C, 0x72767970, 0x7E75787B,
+ 0x797A717B, 0x6E707469, 0x81787579, 0x7A7B7280,
+ 0x757D7E75, 0x7C747D7E, 0x7879707E, 0x78787B72,
+ 0x81787C81, 0x8081787E, 0x757E7F75, 0x7F757E7F,
+ 0x8283797E, 0x78808178, 0x7C738081, 0x7C7D747B,
+ 0x767A7B72, 0x81787E7F, 0x80817880, 0x727F8279,
+ 0x7C73787B, 0x7B7C737B, 0x70777A71, 0x7B727679,
+ 0x767A6F78, 0x6D75796E, 0x7A6E7579, 0x6F736776,
+ 0x70787A6E, 0x796F7C7C, 0x78796F78, 0x6F7B7C72,
+ 0x7D747879, 0x7D7E757C, 0x6D78796F, 0x776D7677,
+ 0x76776D76, 0x7075766D, 0x796F7879, 0x797A7078,
+ 0x6C787970, 0x786E7475, 0x78796F77, 0x6C797A71,
+ 0x79707475, 0x72736A78, 0x73787872, 0x2A297877,
+ 0x0806062C, 0x00020000, 0x01010200, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x0A050408, 0x04090706,
+ 0x08060608, 0x9170706A, 0x9B8F9A9B, 0x989D8E97,
+ 0x91979B8F, 0x9D92979E, 0x979D9297, 0x959B9F93,
+ 0xA5969DA1, 0xA0A596A0, 0x9AA1A697, 0xA297A2A6,
+ 0x9FA3989E, 0x9BA1A79C, 0xA598A1A8, 0x9EA5989E,
+ 0x9D9EA499, 0xA499A2A8, 0x9FA79C9E, 0x9C9EA499,
+ 0xA79C9FA7, 0xA0A99C9F, 0x99A0AA9A, 0xAB9CA2AA,
+ 0xA5AC9DA4, 0xA2A9ADA1, 0xAA9EAAAE, 0xA7AB9FA6,
+ 0x9AA7AC9D, 0xAC9DA4A9, 0xAAAFA0A7, 0xA0ABAFA3,
+ 0xADA1A8AC, 0xABAFA3A9, 0xA5ADAFA3, 0xB0A1AFB1,
+ 0xABAFA3AD, 0xA6AAB0A5, 0xB4AEAAAF, 0xAEB3AAB0,
+ 0xA0B1B5AA, 0xACA1AAAC, 0xA9ADA2A8, 0xA3A7ACA3,
+ 0xACA3A7AC, 0xA0A89EA7, 0xA19EA9A1, 0xACA59EA9,
+ 0xA5ACA5A4, 0xA4A7ACA3, 0xABA2AAAD, 0xA8ABA2A8,
+ 0xA4A9ACA3, 0xABA2AAAD, 0xA5AAA1A8, 0xA7A4A8A3,
+ 0xA8A3A6AC, 0x98A099A1, 0x9D9DA59B, 0xADA0A0A8,
+ 0xA7AEA1A6, 0xA3A8ACA1, 0xADA4AAAE, 0xA6ABA2A8,
+ 0xA3A6ABA2, 0xABA2A7AC, 0xA8ADA4A6, 0xA9AEB2A7,
+ 0xB0A7B0B4, 0xAAAFA6AB, 0xA9ACB4AA, 0xB4AAABB3,
+ 0xACB4AAAC, 0xACADB5AB, 0xB2ABAEB6, 0xA9B0A9AB,
+ 0xADACB1A8, 0xB8B1B1B6, 0xB0B9AFB0, 0xAAB6BBB2,
+ 0xB5ACAFB5, 0xB0B5ACB0, 0xB3B8B8B2, 0xB6B8B8B7,
+ 0x3F3A43B9, 0x13080011, 0x01100800, 0x05010C06,
+ 0x04020006, 0x00040200, 0x02000402, 0x03000004,
+ 0x00040000, 0x03000502, 0x07030007, 0x00060200,
+ 0x00000600, 0x04020004, 0x00060200, 0x02000602,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x3E390001, 0xB3B8AF3A, 0xA8AAB2A8, 0xAFA9ABB3,
+ 0xADB2A9AB, 0xA2ADB1A5, 0xB2A5ACB1, 0xABB2A5AB,
+ 0xA1A9AFA4, 0xACA3A6AC, 0xA9AFA4A7, 0x9FA8AEA3,
+ 0xB1A6A5AC, 0xABB3A8A9, 0xA8B0B4A8, 0xB4A9B0B4,
+ 0x7B7E75B0, 0x00000100, 0x00000001, 0x00010000,
+ 0xA0505148, 0xACA0AAAC, 0xA6ACA1A8, 0x9DA1A99F,
+ 0xA89E9EA7, 0xA1A99EA0, 0x9CA0A89D, 0xA89D9FA7,
+ 0xA1A99EA0, 0x9BA3A89F, 0xA3989FA4, 0xA0A69B9F,
+ 0x96959B90, 0xA99F99A1, 0x9DA8A0A0, 0x9D9FA79D,
+ 0xA79D9FA7, 0xA2A9A29F, 0xA1A1A9A2, 0x9C93A1A8,
+ 0x9A9E9397, 0x9BA5A99D, 0xA69AA5AA, 0xA3A79BA2,
+ 0x9DA5A79B, 0xA99DA7A9, 0xA5A99DA5, 0x98A6AB9C,
+ 0xA499A2A7, 0xA5A99EA0, 0x98A4A89C, 0xA99EA0A4,
+ 0xA4A89DA5, 0x9DA8A99F, 0xA69AA6A7, 0xA6A89CA4,
+ 0x9AA7A99D, 0xA79BA2A6, 0xA5A99DA3, 0x5484857B,
+ 0xACA05E60, 0xAAACA0AA, 0x9BA9AB9F, 0xAC9DA3A7,
+ 0xA7AC9DA7, 0x9EA4AB9E, 0xAD9EA4AB, 0xA3A899A8,
+ 0x9DA8ACA0, 0xAA9EA5A9, 0xA5A99DA6, 0x9BA5A99E,
+ 0xA89BA3A7, 0xA4AB9EA1, 0x99A1A79C, 0xA49B9EA4,
+ 0xA2A89D9F, 0x96A2A69A, 0xA59B9EA2, 0xA4A59BA4,
+ 0x99A3A79C, 0xA4999EA4, 0xA1A59AA0, 0x9BA3A69D,
+ 0xA59FA1A4, 0xA0A59CA1, 0x98A0A499, 0xA498A0A4,
+ 0xA0A499A0, 0x00A0A49E, 0x05000004, 0x00020001,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000000, 0x28000000,
+ 0x7C7A272A, 0x787C7779, 0x72757771, 0x78707878,
+ 0x7D7B737A, 0x767B7C73, 0x7B777A7C, 0x797A767A,
+ 0x75787872, 0x7B757D7E, 0x7A7A747B, 0x73818279,
+ 0x7E757B7C, 0x7E81787B, 0x757D7F79, 0x7D77797B,
+ 0x7E807A7B, 0x767A7B72, 0x7E767E7F, 0x82807881,
+ 0x777E7E78, 0x807A7B7D, 0x80807A80, 0x777D8077,
+ 0x7F797D80, 0x7F7F797F, 0x767F7D75, 0x7F76807E,
+ 0x7D7E757E, 0x757B7C73, 0x7E757D7E, 0x7D7E757D,
+ 0x737F7E74, 0x7D757E7D, 0x7F7D757F, 0x757B7971,
+ 0x7C747F7D, 0x7F7D757E, 0x767A7B72, 0x7E757E7F,
+ 0x7879707D, 0x6E76736E, 0x79747773, 0x7F7C777D,
+ 0x74777C73, 0x7C72767E, 0x747C7274, 0x6E747970,
+ 0x79707477, 0x76797078, 0x6C72756C, 0x776E7075,
+ 0x76787272, 0x717F7C77, 0x776F7976, 0x7F7D7579,
+ 0x787F8077, 0x7F768081, 0x7879707E, 0x757B7C73,
+ 0x7C767D7E, 0x7878727C, 0x88808178, 0x71689091,
+ 0x5F625970, 0x3F60645F, 0x04003E44, 0x00040000,
+ 0x3C000100, 0x64594042, 0x60645860, 0x82808479,
+ 0x817B888B, 0x787C767D, 0x78808178, 0x766E8081,
+ 0x72706878, 0x6A73746B, 0x635E7273, 0x6E6B6666,
+ 0x757B7C73, 0x7C737D7E, 0x77786F7B, 0x71787970,
+ 0x7A72797A, 0x7B7C727C, 0x72767C71, 0x7A71777D,
+ 0x7A7D7477, 0x6974786D, 0x7C737074, 0x7B7C737B,
+ 0x757C7D74, 0x7B737D7E, 0x7879707D, 0x74787B72,
+ 0x8178787D, 0x7A7D747C, 0x75787C71, 0x7C717C80,
+ 0x7F837878, 0x78808178, 0x7A728081, 0x77756D7C,
+ 0x7B827F7A, 0x81788380, 0x7C7D7480, 0x78808178,
+ 0x7E758081, 0x7D7E757D, 0x747A7D74, 0x7A717A7D,
+ 0x787C7177, 0x6D787C71, 0x75687579, 0x7074686E,
+ 0x6E7A7C70, 0x796F7A7A, 0x77786F78, 0x6F7B7C73,
+ 0x7C737778, 0x7879707B, 0x6B77786F, 0x7A707374,
+ 0x7A796F7B, 0x70787970, 0x776D7879, 0x78796F76,
+ 0x6D76776D, 0x756C7677, 0x74756C74, 0x6B787970,
+ 0x746B7374, 0x79797373, 0x2B787773, 0x06062D2B,
+ 0x06060606, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000100, 0x07060509, 0x05070605,
+ 0x7F7E7A08, 0x90989C91, 0x9D91989C, 0x989C9099,
+ 0x9395998E, 0x9C939A9E, 0x999D9299, 0x8E9D9F93,
+ 0xA2939A9D, 0xA0A5969D, 0x98A1A599, 0xA297A0A4,
+ 0xA1A59A9E, 0x9DA1A89B, 0xA79AA3AA, 0xA3A99EA0,
+ 0x9DA0A69B, 0xA89BA2A8, 0xA2A99CA1, 0x9CA1A59A,
+ 0xA69DA1A7, 0xA2A89DA1, 0x9AA2A99C, 0xADA0A2A9,
+ 0xA5AC9FA6, 0x9FA6AA9E, 0xADA1A9AB, 0xAAAEA2AB,
+ 0x9CAAAFA0, 0xAFA0A4AB, 0xAAAFA0AA, 0xA0ACB0A4,
+ 0xAB9FA8AC, 0xB1B5A9A7, 0xA3ADB1A5, 0xB0A4ABAF,
+ 0xABB2A5AC, 0xA6A9AFA4, 0xACA2A8B0, 0xAAB0A5A4,
+ 0xA4B6BAAE, 0xACA1ACB0, 0xA7ABA0A8, 0xA3A8ADA4,
+ 0xADA3A5AD, 0xA0A89EA5, 0xA5A4ACA5, 0xADA6A4AC,
+ 0xA4ACA5A5, 0xA4A5ADA3, 0xABA2A8AD, 0xA8ABA2A8,
+ 0xA2ABAEA5, 0xABA2A8AB, 0xA5A9A3A8, 0xA7A4A8A3,
+ 0xA8A3A6AC, 0x9DA49DA2, 0x9AA2A79E, 0xADA19FA5,
+ 0xA7AB9FA9, 0xA1AAABA1, 0xABA2A8AC, 0xA5ADA3A6,
+ 0xA4A6AEA4, 0xACA3A8AD, 0xA8ACA6A7, 0xA8AAAEA8,
+ 0xB0AAAAAE, 0xAAAEA8AC, 0xAAAEB3AA, 0xB4AAAEB3,
+ 0xACB4AAAC, 0xAEABB3AC, 0xB2ABADB5, 0xABB2ABAB,
+ 0xAEB0B5AC, 0xB6ADB2B7, 0xB3B8AFB1, 0xACB2B5AC,
+ 0xB5AFB2B5, 0xB5B9B4B1, 0x8EB8B6B6, 0x3B448F8C,
+ 0x40394640, 0x493D3546, 0x34453E35, 0x3E36473C,
+ 0x40352A3E, 0x2840372A, 0x35293F35, 0x49150D1E,
+ 0x384B4038, 0x3E374C3E, 0x45342B45, 0x2C46342B,
+ 0x362C4337, 0x3F34283E, 0x293D3529, 0x362A3E35,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000100,
+ 0x7B750001, 0xB3B8AF77, 0xA8ADB3A8, 0xB0A7ABB3,
+ 0xAFB4ABAB, 0xA5B0B4A8, 0xB2A5ABB2, 0xABB1A6AB,
+ 0xA1A9AFA4, 0xB0A5A6AC, 0xA7ADA2AA, 0xA4A7ADA2,
+ 0xB0A5A7AF, 0xA8B0A5A8, 0xA8AEB5A8, 0xB3A8B0B4,
+ 0xB0B3AAAF, 0x00282925, 0x00000001, 0x0D0E0C00,
+ 0xA08C8D84, 0xACA0A8AC, 0xA6ACA1A8, 0x9FA1A99F,
+ 0xA79D9EA6, 0x9FA79D9F, 0xA0A0A89E, 0xA89EA2AA,
+ 0xA0A89EA0, 0x9B9FA79D, 0xA49B9FA4, 0xA1A79C9F,
+ 0x9A969C91, 0xA89E9DA5, 0xA1A9A29F, 0x9DA0A89E,
+ 0xA79D9FA7, 0x9FA69F9F, 0xA1A0A8A1, 0xA49BA0A8,
+ 0x9499909F, 0x9C9EA598, 0xA89BA2A9, 0xA6AA9EA1,
+ 0x9DA5A99D, 0xA99DA5A9, 0xA8ACA0A5, 0x9BA5A99D,
+ 0xA79CA3A7, 0xA5A99EA3, 0x9CA3A79C, 0xACA1A3A7,
+ 0xA5A99EA8, 0x9BA8A99F, 0xA69AA4A5, 0xA8AA9EA4,
+ 0x9EA5A99E, 0xA99EA5A9, 0xA0A499A5, 0xA05D5E54,
+ 0xACA0AAAC, 0xAAACA0AA, 0x9FA7AB9F, 0xAB9FA7AB,
+ 0xA7AB9FA7, 0x9EA6AA9E, 0xACA0A6AA, 0xA6AA9EA8,
+ 0xA0A5A99D, 0xA99DA8AC, 0xA8ACA0A5, 0x9BA8ACA0,
+ 0xA89CA3A7, 0xA3AA9DA4, 0x99A1A79C, 0xA89D9EA4,
+ 0xA0A69BA2, 0x9AA3A79B, 0xA49AA2A6, 0xA2A69BA3,
+ 0x98A1A59A, 0xA59A9FA3, 0xA4A89DA1, 0x97A2A59C,
+ 0xA59C9DA0, 0xA0A59CA0, 0x98A0A499, 0xA498A0A4,
+ 0xA0A499A0, 0x68A3A69D, 0x03006A6E, 0x00040000,
+ 0x00000100, 0x00000000, 0x00000000, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00010000, 0x00000100, 0x00000000,
+ 0x2A280000, 0x50535127, 0x757E7F7B, 0x7E757B7B,
+ 0x7B7C737D, 0x72797973, 0x7A767878, 0x7B7C7879,
+ 0x707B7D77, 0x7B757879, 0x7D7D777B, 0x707D7E75,
+ 0x7B727879, 0x7B7E7578, 0x767A7C76, 0x7F797A7C,
+ 0x7D80777D, 0x76797A71, 0x827A807E, 0x83817984,
+ 0x7780807A, 0x7F797B7D, 0x7F7F797F, 0x777A7D74,
+ 0x817B7D80, 0x7C7C7681, 0x737F7D75, 0x7B727D7B,
+ 0x7A7B727A, 0x747C7D74, 0x7F767C7D, 0x7B7C737E,
+ 0x757A796F, 0x7E76807F, 0x7D7B7380, 0x747A7870,
+ 0x80787E7C, 0x7E7C7482, 0x727D7E75, 0x7E757A7B,
+ 0x7879707D, 0x787B7873, 0x7B76817D, 0x7D7D777E,
+ 0x73767B72, 0x796F757D, 0x767B7271, 0x6D767970,
+ 0x756C7478, 0x78797074, 0x6C767970, 0x756C7075,
+ 0x797C7372, 0x6F7D7E75, 0x776F7977, 0x7F7D7579,
+ 0x757D7E75, 0x79707D7E, 0x77786F78, 0x737B7C73,
+ 0x7E757B7C, 0x7B7C737D, 0x88808178, 0x71689091,
+ 0x5E615870, 0x3F60645F, 0x04003E44, 0x00040000,
+ 0x3B000100, 0x64593F41, 0x61655960, 0x7E86877E,
+ 0x7D748487, 0x7F82797A, 0x797A7B72, 0x7C738182,
+ 0x74756C7B, 0x72787C71, 0x746B787B, 0x73736D73,
+ 0x747B7C73, 0x7B727C7D, 0x8081787A, 0x737B7C73,
+ 0x786E7B7C, 0x7C7D7377, 0x727B8176, 0x7A6F777D,
+ 0x767A6F74, 0x6C797D72, 0x7C737377, 0x7B7C737B,
+ 0x707B7C73, 0x7E767879, 0x7C7D7480, 0x7275786F,
+ 0x7D74767B, 0x767B7278, 0x75797D72, 0x80757C80,
+ 0x7C80757C, 0x787A7B72, 0x71698081, 0x716F6773,
+ 0x717F7C77, 0x79707976, 0x78797078, 0x707B7C73,
+ 0x7C737879, 0x8081787B, 0x72787970, 0x7E75787B,
+ 0x787B727D, 0x7075796E, 0x7468787C, 0x70746870,
+ 0x717B7D71, 0x79707A7B, 0x78797078, 0x7377786F,
+ 0x7C737B7C, 0x7879707B, 0x70787970, 0x756B7879,
+ 0x76756B76, 0x6F787970, 0x756B7778, 0x75766C74,
+ 0x6C74756B, 0x746B7576, 0x74756C73, 0x6C74756C,
+ 0x79737475, 0x68676379, 0x06070504, 0x05070806,
+ 0x06050706, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x06070608, 0x7E7A0606,
+ 0xBBBCB37F, 0x8D989C90, 0x9C90979C, 0x989C9098,
+ 0x8F999A90, 0x9A8F9899, 0x979B9096, 0x8E9A9C90,
+ 0xA2939A9D, 0xA1A6979D, 0x989FA495, 0xA297A0A4,
+ 0xA1A59A9E, 0x979EA598, 0xA4999DA4, 0xA0A69B9E,
+ 0x9DA1A79C, 0xA499A2A8, 0xA1A89B9E, 0x999FA398,
+ 0xA69D9EA4, 0xA3A79CA3, 0x9AA2A69A, 0xAB9EA2A9,
+ 0xA6ADA0A4, 0xA1A9ADA1, 0xADA1A9AD, 0xA9ADA1A9,
+ 0x9DA8AFA2, 0xAC9DA5AC, 0xA6AB9CA7, 0xA3ABAFA3,
+ 0xAFA3ABAF, 0xAAAEA2AB, 0xA0ABAFA3, 0xB2A6A8AC,
+ 0xAAB0A5AE, 0xA5AAB0A5, 0xB0A5A8B0, 0xAAB0A5A8,
+ 0xAAACB0A5, 0xB5AAB1B5, 0xAAB0A5B1, 0xA3A6ABA2,
+ 0xACA3A5AD, 0xA4ACA2A7, 0xA5A6ADA6, 0xABA4A4AC,
+ 0xA6ADA6A3, 0xA4AAAFA6, 0xADA4A8AD, 0xA8ABA2AA,
+ 0xA4A8ABA2, 0xA9A3A8AA, 0xA6AAA4A7, 0xA7A6ACA7,
+ 0xACA7A6AC, 0xA1A8A1A6, 0x9BA2A79E, 0xA89DA0A6,
+ 0xA8ACA1A4, 0xA2A6A9A0, 0xB0A7A8AB, 0xA5ADA3AB,
+ 0xA7A9B1A7, 0xB0A9A9B1, 0xAAB1AAA9, 0xA8AAAEA9,
+ 0xAEA9A9AD, 0xAAAEA8AA, 0xAAADB1AB, 0xB3AAAEB3,
+ 0xAEB3AAAE, 0xADADB4AD, 0xB3ADADB4, 0xADB1ABAF,
+ 0xADAEB1A8, 0xB2A9B3B6, 0xB2B5ACAF, 0xAEB2B5AC,
+ 0xBEBAB2B4, 0xAFB0AEBD, 0x42403D3F, 0x3A45403C,
+ 0x41394A40, 0x493F3349, 0x33493F33, 0x3F324A3F,
+ 0x5A4E3F5A, 0x3E5D4D3E, 0x4D405A4E, 0x4B160D22,
+ 0x364D4037, 0x3F36513E, 0x634E4363, 0x42645043,
+ 0x52436350, 0x5A4D3E5D, 0x40584E3F, 0x36293F4E,
+ 0x00000000, 0x00000000, 0x00010000, 0x3C080905,
+ 0xB3AA4042, 0xAEB4A9B0, 0xA8AEB5A8, 0xB2A7ADB3,
+ 0xADB3A8AC, 0xA7ADB3A8, 0xB0A7ACB2, 0xAAB2A8AB,
+ 0xA3A9AFA4, 0xAEA3A8AE, 0xA6ACA1A8, 0xA6A5ADA2,
+ 0xB1A7A8B0, 0xA9B1A7A9, 0xA8ADB3A8, 0xB3A8ADB3,
+ 0xBBC0B7AD, 0x08464743, 0x0808090A, 0x07080608,
+ 0xA89EA198, 0xABA0AFB3, 0xA4A9A0A7, 0xA3A2A9A2,
+ 0xA8A1A3AA, 0xA2A9A2A1, 0xA0A0A8A1, 0xA7A09FA7,
+ 0x9FA89E9F, 0x9C9DA69C, 0xA99F9EA6, 0xA1A99FA1,
+ 0xA0A3ABA1, 0xA9A2A2AA, 0xA1A99FA2, 0x9D9FA79C,
+ 0xA89DA0A8, 0xA0A89EA2, 0x9FA0A99F, 0xA8A1A0A9,
+ 0x9FA79DA1, 0x9699A197, 0xA69B99A1, 0xA1A79C9E,
+ 0xA0A4AA9F, 0xABA0A5AB, 0xA5AC9FA5, 0x9CA7AEA1,
+ 0xA79CA2A9, 0xA4AA9FA1, 0xA0A7ABA0, 0xA9A0A6A9,
+ 0xA6A9A0A6, 0x9DA8ACA1, 0xA69CA5A9, 0xA5A99EA5,
+ 0x9FA0A89E, 0xA9A0A1A9, 0xA4A9A0A4, 0xA5ABAFA4,
+ 0xADA1ADB1, 0xA8ACA0A9, 0xA1ABAFA3, 0xAB9FA9AD,
+ 0xABAFA4A7, 0xA1AAAEA3, 0xADA3AAAB, 0xA8ACA0AC,
+ 0xA1A7AB9F, 0xABA0A7AE, 0xA6ADA0A5, 0x9BA8ACA0,
+ 0xA69AA3A7, 0xA5A99DA2, 0x98A5A99D, 0xA498A0A4,
+ 0xA6AA9EA0, 0x9AA7A99D, 0xA599A4A6, 0xA3A79BA1,
+ 0x9BA3A79C, 0xA39AA4A5, 0xA4A79EA2, 0x9AA3A79C,
+ 0xA59A9FA5, 0x9FA59A9F, 0x96A1A59A, 0xA69C9DA1,
+ 0xA0A499A5, 0x9AA0A499, 0x6E68A0A3, 0x0206016A,
+ 0x00000100, 0x00000000, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x02000003, 0x00020000,
+ 0x00000000, 0x05060400, 0x77525351, 0x7A767A7B,
+ 0x7A7C7679, 0x737A7A74, 0x78727979, 0x77797376,
+ 0x72777973, 0x7A767678, 0x787A7479, 0x75787970,
+ 0x7F767D7E, 0x7D7E757E, 0x7680807A, 0x7D747C7C,
+ 0x7B7C737C, 0x757D7B73, 0x8179807F, 0x80817883,
+ 0x7A7E807A, 0x807C7C80, 0x7D7F797F, 0x787E8178,
+ 0x807A7E81, 0x7F7F7980, 0x757D7B73, 0x82797F7D,
+ 0x7C7D7481, 0x72777A71, 0x7B72787B, 0x76797078,
+ 0x74787970, 0x7E757C7D, 0x7B7C737D, 0x757D7E75,
+ 0x7E757D7E, 0x7D7E757D, 0x757D7E75, 0x7C737D7E,
+ 0x77786F7B, 0x747F7D75, 0x7B757E7C, 0x797B757B,
+ 0x747E8178, 0x7B72787D, 0x777C7376, 0x6A787C71,
+ 0x756B7276, 0x74756B74, 0x6F787970, 0x7C737578,
+ 0x77786F7B, 0x6E7A7B72, 0x72697677, 0x797A7171,
+ 0x7476746C, 0x7C747E7C, 0x7B79717E, 0x757D7E75,
+ 0x7E757D7E, 0x7B7C727D, 0x897E8277, 0x70679293,
+ 0x5D5E556F, 0x3F62635F, 0x04004044, 0x00040000,
+ 0x3C000100, 0x62584042, 0x62645861, 0x7F81847B,
+ 0x857C8588, 0x7B7F7482, 0x787F8076, 0x867C8182,
+ 0x787C7185, 0x6F787C70, 0x746B777B, 0x76776E71,
+ 0x737D7E75, 0x7E767B7C, 0x7E7C7480, 0x787D7B73,
+ 0x7E758081, 0x797D727D, 0x727B7F74, 0x8073787F,
+ 0x757B7079, 0x747B7F74, 0x7C737A7D, 0x79776F7B,
+ 0x70787970, 0x7C737879, 0x7B7C737B, 0x74767970,
+ 0x7B727A7D, 0x787B7278, 0x747E7F75, 0x857A7E80,
+ 0x81857A81, 0x797A7B72, 0x7E758182, 0x7A7B727D,
+ 0x68808178, 0x766D7071, 0x7A7B7275, 0x707D7E75,
+ 0x79707879, 0x7B7C7378, 0x6F7B7C73, 0x7B767778,
+ 0x77786F7E, 0x7171756A, 0x756A787C, 0x73746A71,
+ 0x727B7C72, 0x82797B7C, 0x797C7381, 0x6F78796F,
+ 0x786E7879, 0x77786E77, 0x7177786E, 0x786E7A7B,
+ 0x79786E79, 0x71787970, 0x766D797A, 0x75766D75,
+ 0x70787970, 0x79707879, 0x78797078, 0x7275786F,
+ 0x77737678, 0x02030176, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x01000000, 0x01020000, 0x00000301,
+ 0x03010002, 0x02030102, 0x6A060705, 0xA39A6D6E,
+ 0x9FA397A0, 0x909A9E92, 0x9C90989C, 0x9B9F9398,
+ 0x8F9EA094, 0x9C90999B, 0x92968A98, 0x909A9C90,
+ 0xA1959A9C, 0xA2A7989D, 0x94A3AA9B, 0xA89C9CA3,
+ 0xA4A89DA4, 0x9C9FA59A, 0xA499A1A7, 0xA1A79C9E,
+ 0x9B9FA79D, 0xA79C9EA6, 0x9FA79C9F, 0x9DA1A79C,
+ 0xA79CA0A8, 0xA3A99EA1, 0x9DA5AC9F, 0xADA0A5AC,
+ 0xA4ADA0A6, 0xA1A7ADA2, 0xADA2A6AC, 0xA4ADA0A5,
+ 0xA0A6ADA0, 0xAFA3A8AC, 0xADAFA3AD, 0xA3ABAFA3,
+ 0xB1A5ABAF, 0xABAFA3AD, 0xA5ADAFA3, 0xB1A6ADB1,
+ 0xACB2A7AD, 0xA5AAB0A5, 0xB0A5AAB0, 0xAAB0A5AA,
+ 0xABAEB2A7, 0xB8AFB1B4, 0xAEB3AAB3, 0xA7ACB1A8,
+ 0xAFA9ABB0, 0xA6A8A2AD, 0xA7A6ACA7, 0xAEA7A6AC,
+ 0xA8ACA6A7, 0xA3B1B3AD, 0xA9A3A9A9, 0xA7A9A3A9,
+ 0xA3A5A9A3, 0xAAA3A3AA, 0xA3AAA3A3, 0xA5A5ACA5,
+ 0xADA6A5AC, 0xA5ACA5A6, 0x9EA1A59F, 0xA59FA0A4,
+ 0xA8ACA6A1, 0xA7A9ADA8, 0xACA7A8AC, 0xA6ADA6A8,
+ 0xA9A9B0A9, 0xB1AAA8B0, 0xA8B0A9A9, 0xA9A9B0A9,
+ 0xB0A9A9B0, 0xABAFA9A9, 0xAEACB0AA, 0xB0A7B2B4,
+ 0xAEB1A8AD, 0xAAAFB1AB, 0xB3AFAEB0, 0xAEB0AAB2,
+ 0xB0B8B9B0, 0xB9B0B8B9, 0xB6B8B2B8, 0xC2C3C7C1,
+ 0x8585C3C7, 0x08060685, 0x02020000, 0x212C0300,
+ 0x3D334429, 0x4E40314C, 0x324E4132, 0x41324E41,
+ 0x4D413150, 0x324C3F31, 0x2C20363F, 0x1D08010E,
+ 0x2E421710, 0x382D4737, 0x4E3D314F, 0x31513E2F,
+ 0x3F304F40, 0x4A3F314D, 0x23343F32, 0x0A010E2D,
+ 0x00000000, 0x00000000, 0x00010000, 0x72080905,
+ 0xB3A8787B, 0xB0B4A8AF, 0xA8AEB5A8, 0xB4A9AEB5,
+ 0xADB3A8AE, 0xA9ADB3A8, 0xB2A8AEB4, 0xA9B1A7AA,
+ 0xA1A9AFA4, 0xADA0A6AC, 0xA9AFA4A6, 0xA7A8B0A5,
+ 0xAEA7A9B1, 0xA8B1A7A6, 0xA8ADB2A9, 0xB1A8ADB3,
+ 0xB4B9B0AC, 0x0482847E, 0x09070708, 0x08090708,
+ 0xA995988F, 0xABA2B0B4, 0xA5AAA1A6, 0x9EA2AAA0,
+ 0xA9A2A0A8, 0xA2A9A2A2, 0xA0A0A7A0, 0xA8A19FA7,
+ 0xA1A9A2A0, 0x9F9DA59B, 0xA8A1A1A9, 0xA0A8A1A0,
+ 0xA1A1A8A1, 0xA9A2A1A8, 0xA2AAA0A2, 0x9DA1A99E,
+ 0xA99EA0A8, 0xA1A99FA1, 0x9F9EA79D, 0xA7A0A0A9,
+ 0xA1A8A1A0, 0x979DA59B, 0xA19799A1, 0x99A19799,
+ 0xA1A1A99E, 0xACA1A4AC, 0xA5ABA0A6, 0xA0A6ADA0,
+ 0xA79CA6AD, 0xA3A99EA1, 0xA3A9ADA2, 0xA9A0A9AC,
+ 0xA7AAA1A6, 0x9FA9ADA2, 0xA399A7AB, 0xA5A99EA2,
+ 0xA1A1A99F, 0xA89FA0A8, 0xAAAFA6A3, 0xA3A9ADA2,
+ 0xAFA4ABAF, 0xA8ACA0AB, 0xA3A8ACA0, 0xACA1ABAF,
+ 0xA8ACA1A8, 0xA3AEAFA5, 0xADA3ACAD, 0xABAFA4AC,
+ 0xA0A7AB9F, 0xABA0A6AD, 0xA4AA9FA5, 0x99A8ACA0,
+ 0xA99DA3A8, 0xA9ADA1A5, 0x9BA8ACA0, 0xA89CA3A7,
+ 0xA4A89CA4, 0x9BAAACA0, 0xA498A5A7, 0xA5A99DA0,
+ 0x9BA6A79D, 0xA59CA4A5, 0xA2A59CA4, 0x99A1A59A,
+ 0xA69B9EA4, 0x9FA59AA0, 0x98A0A499, 0xA59C9EA1,
+ 0x9FA398A2, 0x98A0A499, 0xA39A9FA3, 0x363A349E,
+ 0x00000100, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x02000002, 0x00020000,
+ 0x00000200, 0x00000000, 0x28000100, 0x7B79292A,
+ 0x797D7878, 0x73777973, 0x79737979, 0x77797379,
+ 0x767A7C76, 0x7C787A7C, 0x7576727B, 0x75787872,
+ 0x7E757D7E, 0x8081787D, 0x7B85857F, 0x827C8181,
+ 0x7E7C7482, 0x78807E76, 0x7E768382, 0x7E7F7680,
+ 0x7A82847E, 0x7B777C80, 0x7E7F7B7A, 0x757E8178,
+ 0x7F797B7E, 0x7F7F797F, 0x737D7B73, 0x7E757D7B,
+ 0x7D7E757D, 0x72787B72, 0x7B72787B, 0x787B7278,
+ 0x787D7E75, 0x7E758081, 0x7B7C737D, 0x757C7D74,
+ 0x7E757D7E, 0x7D7E757D, 0x737C7D74, 0x7C737B7C,
+ 0x7879707B, 0x747D7B73, 0x7D777C7D, 0x7E81787D,
+ 0x747A7D74, 0x7B727A7D, 0x73786F76, 0x6A787C70,
+ 0x756B7276, 0x7A7B7174, 0x73787970, 0x7C737B7C,
+ 0x7E7F767B, 0x6978796F, 0x746B7273, 0x76776E73,
+ 0x747E7C74, 0x7C747E7C, 0x7F7D757E, 0x74808178,
+ 0x81777C7D, 0x7B7C7280, 0x897E8277, 0x6F679293,
+ 0x5C5C5671, 0x4062635F, 0x04004145, 0x00040000,
+ 0x3C000100, 0x655A4042, 0x5F635761, 0x8081857A,
+ 0x7F74878B, 0x7C80757B, 0x75797A70, 0x80767E7F,
+ 0x787C717F, 0x70787C70, 0x756A787C, 0x6E716871,
+ 0x767D7E75, 0x7C747E7F, 0x7F7D757E, 0x787F7D75,
+ 0x81788081, 0x7B7F7480, 0x797B7F73, 0x82758185,
+ 0x7C83767B, 0x797D8176, 0x82798182, 0x7A787081,
+ 0x71787970, 0x786F797A, 0x7B7C7377, 0x72767970,
+ 0x7C73787B, 0x787C7179, 0x707A7B71, 0x7C717A7C,
+ 0x81857A78, 0x7A818279, 0x82798283, 0x81827981,
+ 0x687B7C73, 0x756C7071, 0x81827974, 0x737B7C73,
+ 0x7D747B7C, 0x7B7C737C, 0x737F7D75, 0x77727D7B,
+ 0x7B7C737A, 0x6D787C71, 0x71677478, 0x70716770,
+ 0x727B7C72, 0x7C737B7C, 0x7F827979, 0x6F797A70,
+ 0x796F7879, 0x78796F78, 0x6E77786E, 0x796F7778,
+ 0x7A796F7A, 0x6B74756C, 0x7A717374, 0x78797079,
+ 0x70787970, 0x79707879, 0x76797078, 0x4B767872,
+ 0x03004F51, 0x02030102, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x01000000, 0x00010000, 0x01000200,
+ 0x03000003, 0x01020002, 0x9B393B35, 0xA498A1A4,
+ 0x9FA495A0, 0x939EA296, 0x9B8F9B9F, 0x979B8F97,
+ 0x949EA094, 0xA1929CA0, 0x9CA1929C, 0x909A9C90,
+ 0x9C90989C, 0x999D9198, 0x96A2A99A, 0xA89C9EA5,
+ 0xA4A89DA4, 0x9DA0A69B, 0xA79CA2A8, 0xA2A89DA1,
+ 0x9EA2A79E, 0xA89DA0A8, 0x9FA79CA0, 0x9CA0A89D,
+ 0xABA09FA7, 0xA0A89DA3, 0xA0A4ADA0, 0xAEA1A4AD,
+ 0xA7B0A3A5, 0xA1A3ABA0, 0xADA0A4AC, 0xA4ADA0A4,
+ 0xA3A9B0A3, 0xB2A6ABAF, 0xAEB0A4B0, 0xA4ABAFA3,
+ 0xAFA3ACB0, 0xABAFA3AB, 0xA5AFB1A5, 0xB1A5AFB1,
+ 0xABAFA3AD, 0xA4AAB1A4, 0xB0A5AAB1, 0xAAB0A5AA,
+ 0xADAFB2A9, 0xB8AFB3B6, 0xAFB4ABB3, 0xA7ABB0A7,
+ 0xA8A2ABB0, 0xA5A7A1A6, 0xA7A6ACA7, 0xACA6A6AC,
+ 0xAAACA6A8, 0xA3A9A9A3, 0xA8A2A9A9, 0xA8AAA4A8,
+ 0xA4A4AAA5, 0xAAA3A2A9, 0xA3AAA3A3, 0x9EA5ACA5,
+ 0xACA59EA5, 0xA5ABA6A5, 0x9FA0A49F, 0xACA7A0A4,
+ 0xA7ABA6A8, 0xAFA6ACA7, 0xACA7AEB4, 0xAEB4AFA8,
+ 0xADADB4AD, 0xB4ADACB4, 0xACB4ADAC, 0xADADB5AE,
+ 0xB5AEACB4, 0xAFB3ADAE, 0xAFB0B4AE, 0xB0A7B3B5,
+ 0xB4B5ACAF, 0xAFB4B4AE, 0xB4B0B2B3, 0xB2B4AEB3,
+ 0xB0B8B9B0, 0xB8B2B8B9, 0xB6B8B2B8, 0x45828583,
+ 0x05074345, 0x07040606, 0x01020000, 0x00070200,
+ 0x2B203005, 0x4D372941, 0x304F4031, 0x40304F40,
+ 0x383F314D, 0x21372D20, 0x0A00102D, 0x0C07010C,
+ 0x101F0803, 0x281F3417, 0x49392C46, 0x2A49392A,
+ 0x392B4739, 0x362D203A, 0x010E2D22, 0x08030C08,
+ 0x00000100, 0x00000001, 0x00010000, 0xAA080A04,
+ 0xB4A9B0B3, 0xB1B5A9B0, 0xA8AFB6A9, 0xB3A8ACB5,
+ 0xADB3A8AD, 0xA8ADB3A8, 0xB2A7ADB3, 0xA9B1A6AA,
+ 0xA0A6ACA1, 0xACA1A8AC, 0xA9AFA4A6, 0xA7A8B0A5,
+ 0xB0A9A9B1, 0xA5AEA4A8, 0xA9A5AAA1, 0xB2A9AEB4,
+ 0xACB1A8AD, 0x43C0C3BA, 0x08064749, 0x08090707,
+ 0xA99CA198, 0xABA0AEB4, 0xA5ABA0A5, 0x9FA3ABA0,
+ 0xA9A0A2AA, 0xA1A99FA4, 0xA1A1A99F, 0xA8A1A0A8,
+ 0xA0A8A1A0, 0x9CA0A59C, 0xA49DA0A5, 0xA1A8A19D,
+ 0xA1A1A99F, 0xA9A0A3AB, 0xA4A9A0A4, 0x9FA2A79E,
+ 0xA99FA1A9, 0xA0A8A1A0, 0xA1A0A8A1, 0xA69DA0A8,
+ 0x9FA49BA1, 0x9BA2A79E, 0xA1969FA4, 0x9FA59A9B,
+ 0xA1A4AA9F, 0xACA0A6AC, 0xA7AB9FA8, 0x9DA9ADA1,
+ 0xA89CA5A9, 0xA8ACA0A4, 0xA2A9ADA1, 0xABA0AAAE,
+ 0xA7ABA0A7, 0xA0A6ADA0, 0xA79CA6AD, 0xA5A99EA3,
+ 0xA3A5ADA3, 0xB0A5A5AD, 0xB0B4A8AA, 0xA1AAAEA3,
+ 0xAFA3A8AC, 0xADB1A5AB, 0xA2ABAFA3, 0xACA0ACB1,
+ 0xA8ACA0A8, 0xA4ADAFA3, 0xADA1AEB0, 0xA9ADA1AB,
+ 0xA1A7ABA0, 0xADA2A6AC, 0xA7ABA0A9, 0x9BA8ACA0,
+ 0xA99DA3A7, 0xA7AB9FA5, 0x9DA8ACA0, 0xA79BA5A9,
+ 0xA5A99DA3, 0x9EA5A99D, 0xA79BA6AA, 0xA4A89CA3,
+ 0x9DA5A69C, 0xA79CA6A7, 0xA4A89DA3, 0x9AA1A59A,
+ 0xA4999FA5, 0xA1A79C9E, 0x98A0A39A, 0xA59C9EA1,
+ 0xA0A69BA0, 0x97A0A499, 0xA4999FA3, 0xA0A39AA0,
+ 0x002C2D2B, 0x00000000, 0x00000000, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00010000, 0x00030101,
+ 0x00000200, 0x00000000, 0x00000000, 0x2A280001,
+ 0x787C7727, 0x73777973, 0x7A747979, 0x7979737A,
+ 0x747A7C76, 0x7B77787A, 0x7A7B777A, 0x77797B75,
+ 0x7E757B7D, 0x7D7E757D, 0x7B83807B, 0x807B8380,
+ 0x83817983, 0x7E828078, 0x82798886, 0x7D7E7581,
+ 0x757B7D77, 0x7B77797B, 0x7A7B777A, 0x797E8178,
+ 0x7D777F82, 0x7A7C767B, 0x73808178, 0x7E757B7C,
+ 0x7B7C737D, 0x72777A71, 0x7970787B, 0x7A7D7476,
+ 0x727D7E75, 0x7F767A7B, 0x7D7E757C, 0x757D7E75,
+ 0x7E757D7E, 0x7D7E757D, 0x747B7E75, 0x79707A7D,
+ 0x78797078, 0x787D7E75, 0x7C738081, 0x7E7F767B,
+ 0x72787B72, 0x7E75787B, 0x767B7279, 0x70787C70,
+ 0x756B787C, 0x74756B74, 0x747B7C73, 0x7B737C7D,
+ 0x7C7A727D, 0x6977786E, 0x79717273, 0x7F7C777B,
+ 0x757F8077, 0x78707D7E, 0x7A78707A, 0x797D7D77,
+ 0x7F758182, 0x7B7C727E, 0x8A7E8277, 0x6E699293,
+ 0x5F5C5871, 0x3F62635F, 0x05004044, 0x00040000,
+ 0x3C000100, 0x64584042, 0x60645860, 0x7E7C8075,
+ 0x7F748788, 0x787C717B, 0x797F8076, 0x867D8182,
+ 0x7E7F7585, 0x6C797B6F, 0x71677678, 0x70716770,
+ 0x78808178, 0x7B758081, 0x7E7E787B, 0x747D7E75,
+ 0x7E747C7D, 0x7D7E747D, 0x757B7F73, 0x84787D81,
+ 0x80847880, 0x76818278, 0x7E757E7F, 0x80807A7D,
+ 0x6F7D7E75, 0x7C737778, 0x7D7E757B, 0x74767970,
+ 0x7D747A7D, 0x787C7178, 0x707A7B71, 0x80757A7C,
+ 0x787C717C, 0x79808178, 0x817B8182, 0x82827C81,
+ 0x737B7C73, 0x7D747B7C, 0x7A7B727C, 0x737D7B73,
+ 0x7C737D7B, 0x7B7C737B, 0x727D7E74, 0x7F767B7C,
+ 0x7B7C737E, 0x6E797D72, 0x71687579, 0x70716870,
+ 0x7375766D, 0x7C737B7C, 0x72756C79, 0x707B7C72,
+ 0x786F797A, 0x77786F77, 0x6F797A71, 0x776F7778,
+ 0x78766E79, 0x6B75766D, 0x786F7374, 0x78797077,
+ 0x71787970, 0x7872797A, 0x77797376, 0x00292A26,
+ 0x03000004, 0x00030100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00010101, 0x00000000, 0x00010000, 0x00000301,
+ 0x02000004, 0x36383201, 0x99A0A39A, 0xA498A0A4,
+ 0xA0A498A0, 0x989FA495, 0xA295A0A4, 0x99A0939B,
+ 0x939CA094, 0x9F939DA2, 0x9BA2959B, 0x939CA094,
+ 0xA0959B9F, 0x9AA1949C, 0x95989F90, 0xA4959DA4,
+ 0xA0A4989F, 0x99A1A599, 0xA59AA0A4, 0xA1A79CA1,
+ 0x9EA2A79E, 0xA79CA2A7, 0xA3AA9DA1, 0x9DA0A89D,
+ 0xACA1A0A8, 0xA0A89DA4, 0xA0A2AA9F, 0xABA0A3AB,
+ 0xA4ACA1A3, 0x9FA4ADA0, 0xAE9EA3AC, 0xA8AFA0A4,
+ 0xA3ABAFA3, 0xAFA0ABAF, 0xABB0A1AA, 0xA3ADB2A3,
+ 0xB0A4ABAF, 0xADB1A6AC, 0xA6ADB1A6, 0xAEA2AEB2,
+ 0xABAFA3AA, 0xA4AEB5A8, 0xB0A6A9AF, 0xAFB4ABA8,
+ 0xAAB1B4AB, 0xB1ABB0B3, 0xB3B7B1AF, 0xA7B3B8AF,
+ 0xB0A7ABB0, 0xAAAFA6AB, 0xADACB3AC, 0xB3ADADB4,
+ 0xAAACA6AF, 0x9AA0A09A, 0xAAA4A0A0, 0xB1B3ADAA,
+ 0xA3ADB4AD, 0xAAA4A3AA, 0x9B9F99A6, 0x9E9DA59B,
+ 0xA49F9EA5, 0x9EA49F9E, 0xA6A8ACA7, 0xB4AFA7AB,
+ 0xAFB5B0B0, 0xB3B2B9B4, 0xBAB3B2BA, 0xB3BAB3B3,
+ 0xB4B1B7B2, 0xB8B3B3B9, 0xB3B9B4B2, 0xB3B2B8B3,
+ 0xB3AEB2B8, 0xB4B8B3AF, 0xAEB4B8B3, 0xB1A8B0B4,
+ 0xB2B4AEAE, 0xB3B6B7B3, 0xB8B3B4B8, 0xB5B9B3B4,
+ 0xB0B6B9B0, 0xB8B2B8B9, 0x7C7B77B8, 0x07060606,
+ 0x05090605, 0x06050906, 0x04020001, 0x00060300,
+ 0x170E1B02, 0x36221829, 0x29432C20, 0x36294336,
+ 0x242D2137, 0x00101D13, 0x09010C0A, 0x0D08030C,
+ 0x020D0904, 0x17101F08, 0x412A2037, 0x24423125,
+ 0x2C1F3930, 0x0D1C1125, 0x020D0900, 0x0A020D0A,
+ 0x00010101, 0x00000000, 0x00010000, 0xAA40423C,
+ 0xB5AAB0B3, 0xAEB4A9B1, 0xA9AEB4A9, 0xB3A8AEB4,
+ 0xAEB4A9AD, 0xA8ADB3A8, 0xB2A7ADB3, 0xABB1A6AA,
+ 0x9FA9ADA2, 0xADA2A7AB, 0xA9AFA4A7, 0xA5A7AFA4,
+ 0xB0A9A7AF, 0xA9B0A9A9, 0xA8ADB2A9, 0xB2A9ADB3,
+ 0xAEB3AAAD, 0x7CC0C4B9, 0x09058285, 0x44484308,
+ 0x9FAEB3AA, 0xAAA1A2AA, 0xA3ABA0A5, 0x9FA4ACA1,
+ 0xAAA0A2AA, 0xA1A99FA2, 0x9FA1A99F, 0xA8A1A1A9,
+ 0xA0A8A1A0, 0x9A9CA198, 0xA8A19EA3, 0xA2A9A2A1,
+ 0x9FA2AAA0, 0xA9A0A1A9, 0xA5AAA1A4, 0xA1A2A6A0,
+ 0xA9A2A1A8, 0xA0A8A1A1, 0xA0A0A8A1, 0xA49B9FA7,
+ 0xA1A69D9F, 0x9EA2A79E, 0xACA1A2A7, 0xA6ACA1A6,
+ 0xA0A5ABA0, 0xABA0A5AB, 0xA9ADA1A7, 0x9CA5A99E,
+ 0xADA1A4A8, 0xA7AB9FA9, 0xA2AAAEA2, 0xADA2AAAE,
+ 0xA7ABA0A9, 0xA2A6ACA1, 0xABA0A7AD, 0xA5A99EA7,
+ 0xA5A7ADA2, 0xB4A8AAB0, 0xB0B4A8B0, 0xA1ABAFA3,
+ 0xB1A5A8AC, 0xADB1A5AD, 0xA3ADB1A5, 0xAFA3ADB2,
+ 0xA8ACA0AB, 0xA4AEB0A4, 0xADA1AEB0, 0xA8ACA0AB,
+ 0xA1A4AA9F, 0xABA0A6AC, 0xA6AA9FA7, 0x9DA8ACA0,
+ 0xADA0A5A9, 0xA6ADA0A6, 0x9FA8ACA0, 0xA79BA7AB,
+ 0xA8ACA0A3, 0x9DA5A99D, 0xA79BA5A9, 0xA5A99DA3,
+ 0x9FA8A99F, 0xA69BA8A9, 0xA6AA9FA2, 0x9AA2A69B,
+ 0xA59AA1A5, 0xA1A79C9F, 0x9AA2A59C, 0xA39AA0A3,
+ 0xA0A59C9E, 0x989EA499, 0xA4999EA5, 0xA0A39A9E,
+ 0x00838480, 0x00000001, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00010000, 0x00020000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000000,
+ 0x272A2801, 0x835A5B57, 0x79738789, 0x79797379,
+ 0x75797B75, 0x7B77797B, 0x797A767A, 0x73797B75,
+ 0x7E75797C, 0x8182797D, 0x7683807B, 0x807B7E7B,
+ 0x83817983, 0x75807E76, 0x867D7F7D, 0x7E7F7685,
+ 0x7A7C7C76, 0x7F7B7E80, 0x80807A7E, 0x787F8077,
+ 0x817B8081, 0x7D7D7781, 0x75808178, 0x81787D7E,
+ 0x7D7E7580, 0x727A7D74, 0x7970787B, 0x787B7276,
+ 0x757B7C73, 0x7E757D7E, 0x7B7C737D, 0x757D7E75,
+ 0x7E757F7D, 0x7D7E757D, 0x737B7E75, 0x7E75797C,
+ 0x7B7C737D, 0x757B7C73, 0x7C737D7E, 0x7D7E757B,
+ 0x787C7D74, 0x7D747E81, 0x787B727A, 0x5F787C71,
+ 0x695F6869, 0x74756B68, 0x737C7D74, 0x7D757B7C,
+ 0x7B7C737F, 0x6E787970, 0x79737677, 0x79797379,
+ 0x74808178, 0x766D7C7D, 0x7C7D7475, 0x76808178,
+ 0x7C737E7F, 0x7D7E747B, 0x8A808178, 0x6E699293,
+ 0x5F5C5871, 0x3E62635F, 0x05004044, 0x00040000,
+ 0x3C000100, 0x64594042, 0x60645860, 0x807D7E74,
+ 0x80758889, 0x82867B7C, 0x797E7F76, 0x7E768182,
+ 0x807F7580, 0x717A7B71, 0x776D7A7B, 0x7A7B7176,
+ 0x6F7D7E75, 0x7D777578, 0x797B757B, 0x75797C73,
+ 0x81787B7E, 0x7E82777E, 0x737D8176, 0x857A7B7F,
+ 0x80847981, 0x747D7E74, 0x7C737C7D, 0x7B7C737B,
+ 0x73787970, 0x7E757B7C, 0x7B7C737D, 0x70787B72,
+ 0x7D747679, 0x7A7D747A, 0x757A7B71, 0x7F757E7F,
+ 0x7C80757E, 0x767E7F76, 0x7E787E7F, 0x81817B7E,
+ 0x737B7C73, 0x7C737B7C, 0x7C7D747B, 0x707D7B73,
+ 0x7E757A78, 0x8182797D, 0x74808177, 0x7C737D7E,
+ 0x7B7C737B, 0x6671756A, 0x72696D71, 0x72736A71,
+ 0x6D7B7C73, 0x71687576, 0x70716870, 0x7174756B,
+ 0x79707A7B, 0x77786F78, 0x72787872, 0x776E7878,
+ 0x79776F76, 0x6B7A7870, 0x746F7573, 0x76776E77,
+ 0x72787872, 0x57537878, 0x16171356, 0x00000400,
+ 0x03010004, 0x00020000, 0x01000000, 0x01000101,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000301,
+ 0x38330003, 0x9DA19B34, 0x98A0A499, 0xA498A0A4,
+ 0xA0A498A0, 0x98A0A596, 0xA499A0A4, 0xA0A498A0,
+ 0x92A0A498, 0xA2959CA1, 0x9AA1949B, 0x949CA094,
+ 0xA3989CA0, 0xA0A79A9D, 0x9AA2A99C, 0xA99AA2A9,
+ 0xA4A89CA4, 0x98A0A498, 0xA499A0A4, 0xA3A79CA0,
+ 0x99A2A89D, 0xA5989EA4, 0x9DA4979E, 0x9C9FA59A,
+ 0xA79C9FA7, 0x9FA79CA1, 0x9EA1A99E, 0xABA0A1A9,
+ 0xA4ACA1A3, 0x9DA4ADA0, 0xAFA0A1AA, 0xA8AFA0A8,
+ 0xA3A9B0A3, 0xB1A5ABAF, 0xADB2A3AD, 0xA0ABB0A1,
+ 0xB0A4A8AC, 0xADB1A6AC, 0xA4ADB1A6, 0xAFA3ABAF,
+ 0xB0B4A8AB, 0xA5AAB0A5, 0xB4ABAAB0, 0xAFB4ABAF,
+ 0xA9AEB3AA, 0xB4AEADB2, 0xB0B4AEB0, 0xB7BBC0B7,
+ 0xC1B8BBC0, 0xBBC0B7BC, 0xB9B9C0B9, 0xC0B9B9C0,
+ 0xAFB3ADB9, 0xA39EA09A, 0xBDB7A7A9, 0xB8BCB6BB,
+ 0xB6B8BCB6, 0xBBB5B6BD, 0xAEB2ACB7, 0xABACB3AC,
+ 0xB7B2ABB2, 0xB1B6B4B1, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB5BBB6B8, 0xB7B8C0B9, 0xC1B7B8C1, 0xB9C0B9B9,
+ 0xB7B7BEB7, 0xBBB9B6BC, 0xB5BAB8B6, 0xB7B6BCB7,
+ 0xBCB7B6BC, 0xB8BCB7B8, 0xB6B8BCB7, 0xB8B2B8BC,
+ 0xBABCB6B6, 0xB7B8BCB7, 0xBCB7B8BC, 0xB8BCB6B8,
+ 0xB3B5B7B1, 0x3D39B9B9, 0x0200003E, 0x07080507,
+ 0x05090805, 0x05040806, 0x2B020003, 0x232C2925,
+ 0x150E1B28, 0x36221829, 0x28442C20, 0x36284436,
+ 0x232D2137, 0x13201C12, 0x1C141F1D, 0x2D17111C,
+ 0x121B2822, 0x17101F17, 0x4A2C1F39, 0x294B392A,
+ 0x32244039, 0x201B1122, 0x24311C13, 0x1B121F2D,
+ 0x00000001, 0x00000000, 0x00010002, 0xAE91928E,
+ 0xB4AEB0B4, 0xB0B4AEB0, 0xABAFB4AB, 0xB5ACB1B4,
+ 0xB0B3AAB2, 0xA6ACB1A8, 0xAEA5AAAF, 0xAAAFA6A9,
+ 0xA1A8ACA1, 0xACA3A8AC, 0xA9AEA5A7, 0xA5A7AFA5,
+ 0xAFA8A7AF, 0xA9ADA7A8, 0xA8ACB1A8, 0xB1A8AEB1,
+ 0xACB2A7AC, 0xA9B0B4A8, 0x241EB0B4, 0x4F534D20,
+ 0xA4B1B8B1, 0xADA6A5AE, 0xA5AEA4A6, 0xA2A3ACA2,
+ 0xABA4A3AC, 0xA3AAA3A3, 0xA3A5ACA5, 0xA8A1A3AA,
+ 0xA0A8A1A0, 0xA1A1A8A1, 0xADA6A1A8, 0xA4ACA5A5,
+ 0xA3A3AAA3, 0xACA5A3AA, 0xA3AAA3A5, 0xA3A4ABA4,
+ 0xAAA3A2AA, 0xA0A8A1A3, 0xA1A0A8A1, 0xABA4A0A8,
+ 0xA0A7A0A3, 0xA2A6ABA2, 0xABA2A8AB, 0xA8ADA4A8,
+ 0xA4A6ABA2, 0xAEA5A8AD, 0xA8ACA1AB, 0xA1A7AAA1,
+ 0xACA1A8AC, 0xA9ADA2A8, 0xA2A7ADA2, 0xADA2A7AD,
+ 0xA8ACA1A9, 0xA4A6ACA1, 0xADA4A8AD, 0xA6AA9FAA,
+ 0xA8ABAFA4, 0xB4A8B0B4, 0xABAFA3B0, 0xA3ADB1A5,
+ 0xACA1ABAF, 0xADB1A5A8, 0xA5ADB1A5, 0xB2A7ADB1,
+ 0xAAAEA3AE, 0xA5ABAFA3, 0xAB9FADB1, 0xA8ACA0A7,
+ 0xA2A6ACA1, 0xB0A3A7AD, 0xA6ADA0A9, 0x9DA8ACA0,
+ 0xA99DA5A9, 0xA8ACA0A5, 0xA1A8ACA1, 0xA79BA8AC,
+ 0xA8ACA0A3, 0x9FA6ACA1, 0xA397A4AA, 0xA5A99D9F,
+ 0x9DA5A99D, 0xA79BA5A9, 0xA5A99DA3, 0x9BA4A89D,
+ 0xA59CA2A6, 0xA4A89DA2, 0x96A2A69A, 0xA59C9EA2,
+ 0xA2A59CA2, 0x999EA499, 0xA1979CA4, 0x9BA09799,
+ 0x66A0A09A, 0x01006B6A, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x25000100, 0x77732829, 0x76777376,
+ 0x77787C77, 0x7C77787C, 0x7A7B7778, 0x757B7D77,
+ 0x786F7D7E, 0x7D7E7577, 0x757B7C73, 0x80777D7E,
+ 0x7D7E757F, 0x757A7B72, 0x83797E7F, 0x7E7F7584,
+ 0x787F8077, 0x807A8081, 0x82807880, 0x75817F77,
+ 0x7B767F7D, 0x817E797E, 0x78828078, 0x807A8280,
+ 0x7D7E7580, 0x74808178, 0x7E747D7E, 0x7B7C727D,
+ 0x757B7C73, 0x7E757D7E, 0x8081787D, 0x727D7E75,
+ 0x7C737A7B, 0x7D7E757B, 0x6F7B7C73, 0x7E757778,
+ 0x7879707D, 0x757D7E75, 0x7B737D7E, 0x7B7C737D,
+ 0x737D7E75, 0x7C737B7C, 0x7B7C737B, 0x6077786F,
+ 0x69606869, 0x78797068, 0x707B7C73, 0x7D777879,
+ 0x7D7D777D, 0x6E72746E, 0x77737274, 0x7A7C7676,
+ 0x74787D74, 0x7C76787D, 0x7B7C737A, 0x787F8077,
+ 0x80778280, 0x8081787F, 0x8F82827C, 0x706B9794,
+ 0x625F5A74, 0x41666862, 0x04004347, 0x00040000,
+ 0x3D000100, 0x61584041, 0x6061585E, 0x8280807A,
+ 0x7F7B8888, 0x7A7C767E, 0x717C7F76, 0x7B71787C,
+ 0x7D7E747A, 0x72808177, 0x7E757A7B, 0x7A7B727D,
+ 0x74787B72, 0x8079787D, 0x79807979, 0x747B7F79,
+ 0x7A74767A, 0x7D807776, 0x747B7E75, 0x7E757D7E,
+ 0x7D7E757D, 0x757B7C73, 0x7C737D7E, 0x7D7E757B,
+ 0x71787B72, 0x7C71787C, 0x787C7178, 0x747B7C73,
+ 0x786F7C7D, 0x78797077, 0x757C7D74, 0x7E757D7E,
+ 0x7D7E757D, 0x78808178, 0x7F768081, 0x797C737C,
+ 0x757D7D77, 0x7C737B7B, 0x7B7C737B, 0x737D7E75,
+ 0x7C737B7C, 0x7B7C737B, 0x737B7C73, 0x7C737B7C,
+ 0x7D7E757B, 0x6B75766D, 0x736A7374, 0x78797072,
+ 0x6D76756B, 0x766E7877, 0x78797078, 0x6D78796F,
+ 0x756B7478, 0x74756B74, 0x6D73766D, 0x766D7376,
+ 0x75766D73, 0x70797570, 0x73707975, 0x77746F78,
+ 0x4873726E, 0x01004B4C, 0x00010000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00010101, 0x00000000, 0x00000002,
+ 0x02000202, 0x04020104, 0x00030101, 0x37040705,
+ 0x9F9A3639, 0x99A09999, 0x96979B90, 0xA5999FA0,
+ 0xA0A498A1, 0x9A9CA396, 0xA69CA2A6, 0xA4A69AA5,
+ 0x98A2A69A, 0xA495A0A7, 0x9AA1929D, 0x98A0A498,
+ 0xA79BA0A4, 0xA6AA9EA3, 0x9DA5A99D, 0xA99DA5A9,
+ 0xA5A99DA5, 0x9DA2A69A, 0xADA1A5A9, 0xA7AB9FA9,
+ 0x9DA5A99D, 0xA79BA5A9, 0xA3A79BA3, 0x9BA3A79B,
+ 0xA79BA1A8, 0xA6ADA0A3, 0xA2A7AEA1, 0xAEA1A8AF,
+ 0xA6ADA0A7, 0x9DA6ADA0, 0xB0A0A3AA, 0xA6B0A0A6,
+ 0xA5A8B0A5, 0xB0A5AAB0, 0xA7AEA1AA, 0xA5ABAFA3,
+ 0xB0A4ADB1, 0xADB1A6AE, 0xA6ABB1A6, 0xB2A9AAAF,
+ 0xACB1A8AD, 0xAAAEB1A8, 0xB3AAB0B3, 0xAEB1A8B0,
+ 0xAFA9B0A9, 0xB8B1AFB6, 0xB2B6B0B1, 0xBBBCC0BA,
+ 0xBFB9BDC1, 0xBABCB6BD, 0xB7B8BCB6, 0xBEB7B7BE,
+ 0xB8BCB6B7, 0xBABABCB6, 0xBFBBBEC0, 0xB9BDB8BE,
+ 0xB8B9BDB8, 0xBDB8B9BD, 0xB7BDB8B7, 0xB8B7BBB6,
+ 0xBDB8B9BD, 0xB9BDB8B9, 0xB1B5BBB6, 0xB7B2B0B6,
+ 0xB3BAB3B1, 0xB1B4BCB2, 0xBCB1B6BC, 0xB6BCB1B6,
+ 0xB5B3B7B1, 0xBBB6B7BB, 0xB6BCB7B5, 0xBABBBFBA,
+ 0xC0BABBBF, 0xBBBFB9BC, 0xB7BDBFB9, 0xBEB8BBBD,
+ 0xBCBEB8BC, 0xBABDBFB9, 0xBCB8BDBE, 0xB8BCB7BB,
+ 0xB7BABBB7, 0x3F3DBABB, 0x0000003E, 0x00000000,
+ 0x00010000, 0x00000100, 0x2A020004, 0x1E29251F,
+ 0x261C2C26, 0x59362840, 0x375D4A3A, 0x4C385B4C,
+ 0x324C3A57, 0x1B30281A, 0x271B2D2A, 0x321C1222,
+ 0x1B2B2A23, 0x25192F25, 0x69463556, 0x416B5542,
+ 0x46355755, 0x282A1E34, 0x20312218, 0x20182928,
+ 0x00000001, 0x00000000, 0x35363402, 0xAFA6AAA5,
+ 0xB4AFB0B4, 0xB0B4AFB0, 0xADB1B3AD, 0xB1A8B1B3,
+ 0xAFB2A9B0, 0xA6AEB1A8, 0xAEA8AAAF, 0xAAAEA8AA,
+ 0xA6A7ACA3, 0xABA2ABB1, 0xAAAFA6A6, 0xA4A7AFA5,
+ 0xACA6A6AE, 0xABAFA9A8, 0xA8AEB0AA, 0xB2A9AEB1,
+ 0xA9AFA4AD, 0xA8B0B4A8, 0x544BB0B4, 0x4D544D4F,
+ 0xA5B1B8B1, 0xADA6A4AC, 0xA4ACA5A5, 0xA4A5ADA6,
+ 0xABA4A3AB, 0xA3ABA4A3, 0xA3A6ADA6, 0xA8A1A3AA,
+ 0xA0A8A1A0, 0xA0A0A8A1, 0xACA59FA7, 0xA3ABA4A4,
+ 0xA5A3AAA3, 0xAAA3A5AC, 0xA2A9A2A3, 0xA4A1A9A2,
+ 0xA8A1A3AB, 0xA0A8A1A1, 0xA39EA9A1, 0xABA4A0AB,
+ 0xA5ACA5A3, 0xA2A6ABA2, 0xABA2A8AB, 0xA6ABA2A8,
+ 0xA4A8ADA4, 0xADA4A8AD, 0xA6A9A0A8, 0xA4A8ABA2,
+ 0xAEA3AAAD, 0xA9AFA4AA, 0xA2A9AFA4, 0xADA2A7AD,
+ 0xA6ACA1A7, 0xA4A6ABA2, 0xADA4A8AD, 0xA8ACA1AA,
+ 0xA8B0B4A9, 0xB1A5B0B4, 0xADB1A5AD, 0xA8AFB3A7,
+ 0xB0A5B0B4, 0xACB0A5AC, 0xA4ABAFA3, 0xB1A6ACB0,
+ 0xADB1A6AD, 0xA6A8ACA0, 0xACA0AEB2, 0xABAFA3A8,
+ 0xA1A9AFA4, 0xB1A4A6AC, 0xA7AEA1AA, 0x9DA8ACA0,
+ 0xA79BA5A9, 0xA8ACA0A3, 0xA0A8ACA0, 0xA99DA8AC,
+ 0xA5A99DA5, 0x9BA7AEA1, 0xA79BA1A8, 0xA4A89CA3,
+ 0x9DA8ACA0, 0xA498A5A9, 0xA6AA9EA0, 0x9BA5A99E,
+ 0xA69DA2A6, 0xA7A89EA5, 0x96A2A69A, 0xA59B9EA2,
+ 0xA2A59CA4, 0x99A0A69B, 0xA0999BA3, 0x9EA29C99,
+ 0x9AA0A198, 0x6A66A0A0, 0x00010069, 0x00010200,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x01020000, 0x00000100, 0x29250001, 0x77787428,
+ 0x77787C77, 0x7D78767C, 0x7A7C7679, 0x70777771,
+ 0x7E747879, 0x7C7D737D, 0x757B7C73, 0x82797D7E,
+ 0x7C7D7481, 0x797E7F76, 0x82788283, 0x7F7E7483,
+ 0x787F8077, 0x7F778081, 0x817F7781, 0x77838179,
+ 0x7E79817F, 0x817F7781, 0x75828078, 0x7B757F7D,
+ 0x7D7E757B, 0x737D7E75, 0x796F7C7D, 0x7B7C7278,
+ 0x78818279, 0x80788081, 0x7F7D7582, 0x757D7E75,
+ 0x7C737D7E, 0x7D7E757B, 0x747B7C73, 0x7E757C7D,
+ 0x7B7C737D, 0x757D7E75, 0x7B737D7E, 0x7E7C747D,
+ 0x727F8077, 0x7D747A7B, 0x7C7D747C, 0x687B7971,
+ 0x71687270, 0x80817870, 0x727C7D74, 0x79737A7B,
+ 0x7B7B7579, 0x6F757672, 0x77737074, 0x7A7C7676,
+ 0x72787D74, 0x7C76767B, 0x7E81787A, 0x77817F77,
+ 0x7F798281, 0x82827C7F, 0x8F85827D, 0x706B9794,
+ 0x625F5A74, 0x3F666960, 0x04004348, 0x00040000,
+ 0x3B000100, 0x605A3E3F, 0x60615860, 0x7F80807A,
+ 0x7B798483, 0x7A7B777A, 0x747E8178, 0x7D737B7F,
+ 0x7F80767C, 0x757A7B72, 0x7E757D7E, 0x7679707D,
+ 0x77767970, 0x80797B80, 0x78807979, 0x79798079,
+ 0x7F797980, 0x7B80777B, 0x73808178, 0x7B727B7C,
+ 0x7D7E757A, 0x757B7C73, 0x7C737D7E, 0x7D7E757B,
+ 0x75808479, 0x83787C80, 0x82867B7F, 0x737D7E75,
+ 0x7D747B7C, 0x7B7C737C, 0x78818279, 0x81788081,
+ 0x7A7B7280, 0x757A7B72, 0x7E757D7E, 0x797C737B,
+ 0x707D7E75, 0x7D747879, 0x7D7E757C, 0x717B7C73,
+ 0x7C73797A, 0x7879707B, 0x73797A71, 0x7C737B7C,
+ 0x7C7D747B, 0x6B77786F, 0x746B7374, 0x75766C73,
+ 0x6F7A796F, 0x78707A79, 0x7A78707A, 0x6D76776D,
+ 0x776D7478, 0x71726876, 0x6D75766D, 0x746B7376,
+ 0x76767071, 0x7078746F, 0x74717873, 0x53504C79,
+ 0x00282723, 0x01000001, 0x00010000, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000002,
+ 0x00000301, 0x04000002, 0x00040000, 0x9C343937,
+ 0xA09B999E, 0x99A19799, 0x91989C91, 0xA0949A9B,
+ 0x9B9F939C, 0x9BA0A79A, 0xA59BA3A7, 0xA4A69AA4,
+ 0x99A2A69A, 0xA899A1A8, 0xA0A798A1, 0x98A0A498,
+ 0xA99DA0A4, 0xA3A79BA5, 0x9CA6AA9E, 0xA99EA4A8,
+ 0xA8ACA0A5, 0x9DA3A79B, 0xA99DA5A9, 0xA8ACA0A5,
+ 0xA0A8ACA0, 0xA99DA8AC, 0xA5A99DA5, 0x9EA5A99D,
+ 0xA99DA6AA, 0xA5A99DA5, 0xA0A6ADA0, 0xADA1A6AD,
+ 0xA9ADA1A9, 0xA0A5AC9F, 0xAFA2A6AD, 0xA6AFA2A6,
+ 0xA3A1A99E, 0xB0A5A5AD, 0xAAB0A5AA, 0xA4AEB2A6,
+ 0xB2A6ACB0, 0xABAFA3B0, 0xAAACB2A7, 0xB0AAACB4,
+ 0xACB0AAAC, 0xACB1B4AB, 0xB3AAB2B5, 0xAEB1A8B2,
+ 0xB0A9B0A9, 0xAFA8AFB7, 0xB7BEB7A8, 0xB9C1C5BF,
+ 0xBCB6BDBF, 0xBBBDB7BA, 0xB7B9BDB7, 0xBEB7B7BE,
+ 0xB8BFB8B7, 0xB9BBBFB9, 0xBDB8BDBF, 0xB9BDB8B9,
+ 0xB7B9BDB8, 0xBDB8B6BC, 0xB7BDB8B7, 0xB8B9BDB8,
+ 0xBDB8B9BD, 0xBABEB9B9, 0xB1B2B8B3, 0xB8B1B1B8,
+ 0xB3BAB3B1, 0xB3B5BAB1, 0xBEB3B8BE, 0xBABEB3BA,
+ 0xB9B7BBB5, 0xBEB9BABE, 0xB8BEB9B8, 0xBABCC0BB,
+ 0xBFB9BBBF, 0xBBBFB9BB, 0xB7BBBDB7, 0xBDB7BBBD,
+ 0xBCBEB8BB, 0xB7BBBDB7, 0xBCB8BBBD, 0xBABBB7BB,
+ 0xB9B8BCB7, 0x3E3EB8BB, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x3A020006, 0x2E3B352F,
+ 0x261B2F37, 0x5D362743, 0x4A764C37, 0x634A7663,
+ 0x354F395C, 0x1B332A18, 0x281B312B, 0x331C1125,
+ 0x1B2C2A22, 0x2D1E3925, 0x7F574269, 0x4F7F674F,
+ 0x57416B67, 0x2A32253F, 0x263A2116, 0x281F332F,
+ 0x00000000, 0x02000000, 0x6A6B6701, 0xB0AFB3AE,
+ 0xB4AFB1B5, 0xB0B4AFB0, 0xAEB1B3AD, 0xB1ABB2B4,
+ 0xAFB1ABB1, 0xA8ADAFA9, 0xAEA8AAAE, 0xABAFA9AA,
+ 0xA8A9AEA5, 0xB0A6AAB2, 0xA7AFA5A8, 0xA5A7AFA4,
+ 0xAEA7A7AF, 0xA9ADA7A7, 0xA8ACAEA8, 0xAEA8ACAE,
+ 0xA8ADA4AA, 0xA7B0B4A9, 0x8479AFB3, 0x4D554B7E,
+ 0xA6ACB3AC, 0xADA6A5AD, 0xA5ADA6A5, 0xA5A5ADA6,
+ 0xADA6A4AC, 0xA3ABA4A5, 0xA5A3AAA3, 0xAAA3A5AC,
+ 0xA2AAA3A2, 0xA1A0A8A1, 0xAAA5A0A8, 0xA3AAA5A3,
+ 0xA5A5ACA5, 0xAAA3A5AC, 0xA3AAA3A3, 0xA3A0A7A0,
+ 0xAAA3A3AA, 0xA4ACA5A2, 0xA4A1ACA4, 0xABA4A1AC,
+ 0xA5ADA6A3, 0xA5A6AEA4, 0xADA4A9AE, 0xA9AEA5A8,
+ 0xA3A8AEA3, 0xABA2A8AE, 0xA6ABA2A6, 0xA4A7ACA3,
+ 0xADA4A8AD, 0xA6ABA2A8, 0xA3AAAFA6, 0xACA3A7AC,
+ 0xA9AEA5A7, 0xA4A5AAA1, 0xABA2A8AD, 0xA8AEA3A6,
+ 0xA5ADB1A6, 0xB1A5ADB1, 0xB1B5A9AD, 0xA8B0B4A8,
+ 0xB2A6B0B4, 0xACB0A4AE, 0xA5ADAFA3, 0xB1A5AFB1,
+ 0xADB1A5AD, 0xA0AAAEA2, 0xACA0A8AC, 0xADB1A5A8,
+ 0xA1A9AFA4, 0xADA0A6AC, 0xA6ADA0A6, 0x9DA8ACA0,
+ 0xA99DA5A9, 0xA5A99DA5, 0xA1A5A99D, 0xA89CA9AD,
+ 0xA8ACA0A4, 0xA0A5A99D, 0xA498A8AC, 0xA5A99DA0,
+ 0x9DA5A99D, 0xA498A5A9, 0xA5A99DA0, 0x9CA9AAA0,
+ 0xA399A4A5, 0xA4A59BA2, 0x96A1A599, 0xA59B9EA2,
+ 0xA2A69BA4, 0x9BA0A59C, 0x9F989DA5, 0x9EA29C98,
+ 0x98A0A198, 0xA09AA0A1, 0x3435319E, 0x00000100,
+ 0x00000001, 0x00000100, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000100, 0x01000001, 0x00010000,
+ 0x7850544F, 0x7B77797D, 0x7A7C767A, 0x737B7B75,
+ 0x7E747B7C, 0x7B7C727D, 0x737D7E75, 0x7D777B7C,
+ 0x7D7E757D, 0x797A7B72, 0x81798182, 0x817F7783,
+ 0x79817E79, 0x7B76817E, 0x817E797E, 0x77838179,
+ 0x80777F80, 0x7F80777F, 0x747D7E75, 0x7B727D7E,
+ 0x7B7C737A, 0x757D7E75, 0x7E757D7E, 0x7D7E757D,
+ 0x797D7E75, 0x7E758182, 0x7D7E757D, 0x757D7E75,
+ 0x7C737D7E, 0x7B7C737B, 0x757D7E75, 0x7E757D7E,
+ 0x7D7E757D, 0x757D7E75, 0x7D747D7E, 0x7D7E757C,
+ 0x757D7E75, 0x7B727D7E, 0x7D7E757A, 0x70787970,
+ 0x79707879, 0x80817878, 0x737D7E75, 0x7E757B7C,
+ 0x7D7E757D, 0x7272746E, 0x807A7678, 0x7E807A80,
+ 0x6F787D74, 0x7B757378, 0x7E817879, 0x76828078,
+ 0x7E788180, 0x7F7F797E, 0x8F83837D, 0x706B9595,
+ 0x625F5A73, 0x3F666960, 0x04004548, 0x00040000,
+ 0x3C010200, 0x605A3F40, 0x60615860, 0x7E7E807A,
+ 0x7B778284, 0x7E807A7A, 0x757E7F76, 0x81777E7F,
+ 0x82817782, 0x757D7E75, 0x7E757D7E, 0x7B7E757D,
+ 0x747D8077, 0x7D76787D, 0x787F7876, 0x70787D74,
+ 0x7B727479, 0x7B807776, 0x747D7E75, 0x81787D7E,
+ 0x7C7D7480, 0x757D7E75, 0x7C737D7E, 0x797A717B,
+ 0x767C8075, 0x837A7D81, 0x7C7F7680, 0x737E7F76,
+ 0x786F7B7C, 0x7C7D7477, 0x757D7E75, 0x7D747B7E,
+ 0x7B7E757A, 0x737B7C73, 0x7C737B7C, 0x7B7C737B,
+ 0x737B7C73, 0x786F7B7C, 0x7B7C7377, 0x747B7C73,
+ 0x7E757D7E, 0x7B7C737D, 0x6F7B7B75, 0x79707778,
+ 0x7D7E7478, 0x6A74756B, 0x71677374, 0x75766C70,
+ 0x6E7A796F, 0x766C7A7A, 0x76756B77, 0x6E78796F,
+ 0x776D7778, 0x77786E78, 0x6B75766D, 0x736D7374,
+ 0x75756F73, 0x7077746F, 0x514D7774, 0x0C0A0952,
+ 0x00010200, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01030402, 0x04000003, 0x33393400, 0x9A989F9A,
+ 0xA098989F, 0x99A29895, 0x90999F94, 0x9C90989C,
+ 0x9CA09498, 0x9A9EA296, 0xA69AA2A6, 0x9EA296A2,
+ 0x9A9CA094, 0xA798A2A6, 0xA2A798A2, 0x97A0A498,
+ 0xA79B9FA3, 0xA3A79BA3, 0x9BA0A498, 0xA498A3A7,
+ 0xA3A79BA0, 0x96A0A498, 0xA89CA0A5, 0xA4A89CA4,
+ 0x99A0A596, 0xA899A3A8, 0xA1A899A1, 0x9B9FA397,
+ 0xA596A3A7, 0xA0A596A0, 0xA1A9ADA1, 0xAFA0A9AD,
+ 0xAAAFA0AA, 0xA3A8AFA0, 0xAFA2A7B0, 0xA1A99EA6,
+ 0xA5A1A99F, 0xB0A5A7AF, 0xAAB0A5AA, 0xA5ADB1A5,
+ 0xAFA3ADB1, 0xB0B4A8AB, 0xA6ADB3A8, 0xB0A7ABB1,
+ 0xACB1A8AB, 0xABB0B3AA, 0xB3A8B1B4, 0xB2B5ACAF,
+ 0xA9AFB6AF, 0xB6B0A9B0, 0xC1C5BFB2, 0xB6BDBFB9,
+ 0xB6B2BABC, 0xB9BAB6B5, 0xBAB9BDB8, 0xBDB8B9BF,
+ 0xB8BEB9B7, 0xB6B8BCB7, 0xBBB7B7BB, 0xB8BCB7BA,
+ 0xB8B8BFB8, 0xBFBAB8BF, 0xB7BDB8B9, 0xB6B7BBB6,
+ 0xBAB8B7BB, 0xB5BBB6B7, 0xAFB5B9B3, 0xBCB5B1B9,
+ 0xB5BCB5B5, 0xB4B7BEB7, 0xBDB4B6BE, 0xB8BCB6B8,
+ 0xBCBABEB9, 0xBDBBBBBE, 0xBABDBBBA, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBCB8, 0xBBB7BDBE,
+ 0xBBBCB8BA, 0xB9BCBEB8, 0xBDB9BDBF, 0xBBBCB8BC,
+ 0xB7BABBB7, 0x3F3DBABB, 0x0000003E, 0x00000000,
+ 0x01000000, 0x00000100, 0x3A020006, 0x2D3D342D,
+ 0x271A3037, 0x75372445, 0x5C91614B, 0x785D8F78,
+ 0x37604870, 0x19342A18, 0x392B432A, 0x3B1C1125,
+ 0x2135342A, 0x2D1E3A2D, 0x8357406D, 0x5B92694C,
+ 0x67507D78, 0x3431233F, 0x2F44281F, 0x281F3438,
+ 0x00000101, 0x01000001, 0xA0A19D00, 0xAFB1B5B0,
+ 0xB3AEB0B4, 0xB1B5B0AF, 0xADAFB3AD, 0xB4AEB1B3,
+ 0xAFB1ABB2, 0xA8ACB0AA, 0xAEA8AAAE, 0xAAAEA8AA,
+ 0xA5A7AEA7, 0xB1A7A7AF, 0xA5ADA3A9, 0xA5A4ACA2,
+ 0xB0A9A7AF, 0xA9B0A9A9, 0xAAAAAEA8, 0xB1AAACB0,
+ 0xA6AEA4AA, 0xAAADB3A8, 0xB4A9B1B5, 0xAEB3AAB0,
+ 0xA6A0A7A0, 0xA8A1A5AD, 0xA5ADA6A1, 0xA4A4ABA4,
+ 0xADA6A3AB, 0xA6ADA6A6, 0xA5A5ACA5, 0xABA4A5AC,
+ 0xA4ACA5A4, 0xA4A3AAA3, 0xACA7A3AB, 0xA4AAA5A6,
+ 0xA3A5ACA5, 0xAAA3A3AA, 0xA3AAA3A3, 0xA5A4ABA4,
+ 0xADA6A5AC, 0xA5ADA6A6, 0xA6A5ADA6, 0xADA6A5AD,
+ 0xA5ADA6A5, 0xA4A6ADA6, 0xADA7A6AE, 0xA8ADA4A9,
+ 0xA2A8ADA4, 0xADA4A4AC, 0xA9B1A7A8, 0xA7A6AEA4,
+ 0xACA6A9B1, 0xA8ADA4A8, 0xA5A9ADA7, 0xAEA7A9AE,
+ 0xA7AFA5A7, 0xA4A4ACA2, 0xB1A8A6AE, 0xA7ACA3AC,
+ 0xA5ADB1A6, 0xB4A8ADB1, 0xAEB5A8B0, 0xA8AEB4A9,
+ 0xB4A9AEB5, 0xB1B5A9AE, 0xA3ADB1A5, 0xAFA3ABAF,
+ 0xADB1A5AB, 0xA3ADB1A5, 0xB0A4ABAF, 0xADB1A6AC,
+ 0xA1A9AFA4, 0xADA0A6AC, 0xA6ADA0A6, 0x9BA5A99D,
+ 0xA99DA3A7, 0xA8ACA0A5, 0xA0A5AA9B, 0xA99DA8AC,
+ 0xA5A99DA5, 0x9EA8ACA0, 0xA79BA8AD, 0xA3A79BA3,
+ 0x9DA6AA9E, 0xA89CA5A9, 0xA2A69AA4, 0x9DA4A89D,
+ 0xA499A3A6, 0xA4A89DA0, 0x97A0A69B, 0xA1969CA2,
+ 0x9FA49B9D, 0x9A9FA49B, 0x9F999CA4, 0x9EA29C9B,
+ 0x999FA097, 0xA09AA1A2, 0x9FA19B9E, 0x002A2C26,
+ 0x00000001, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x00010000,
+ 0x26000100, 0x7B77272B, 0x7A7C767A, 0x707D7D77,
+ 0x7C727879, 0x7B7C737B, 0x74797A71, 0x807A7A7A,
+ 0x7D7D7780, 0x797E7F76, 0x827A8182, 0x7F7D7584,
+ 0x777F7C77, 0x7F7A7F7C, 0x85827D82, 0x7782837A,
+ 0x7E757F80, 0x8081787D, 0x74808178, 0x7C737D7E,
+ 0x7D7E757B, 0x75808178, 0x7E757D7E, 0x7D7E757D,
+ 0x757D7E75, 0x7E757D7E, 0x7D7E757D, 0x727C7D74,
+ 0x7C737A7B, 0x7B7C737B, 0x78787970, 0x7C738081,
+ 0x7C7D747B, 0x737C7D74, 0x7B727B7C, 0x7C7D747A,
+ 0x737B7C73, 0x7D74797C, 0x797C737A, 0x70767970,
+ 0x80777679, 0x7E81787F, 0x737B7C73, 0x7C737B7C,
+ 0x77786F7B, 0x72757771, 0x807A7678, 0x7E807A80,
+ 0x727A7D74, 0x7C76767B, 0x7F82797A, 0x79818076,
+ 0x807A8483, 0x7F7F7980, 0x9082827C, 0x706B9696,
+ 0x5F5F5973, 0x3F686960, 0x04004548, 0x00040000,
+ 0x3B000100, 0x605A3F41, 0x60615860, 0x827F817B,
+ 0x7D778688, 0x7E807A7B, 0x757E7F76, 0x80767E7F,
+ 0x807F7581, 0x757B7C73, 0x80777D7E, 0x8081787F,
+ 0x727D8077, 0x807A767B, 0x7C81787C, 0x727A7D74,
+ 0x7B72787B, 0x787B7278, 0x74797D72, 0x7E757D7E,
+ 0x7E7F767D, 0x737D7E75, 0x7E757B7C, 0x7D7E757D,
+ 0x717B7F74, 0x7E75787C, 0x7F82797B, 0x73808178,
+ 0x79707B7C, 0x7C7D7478, 0x74797C73, 0x82797A7D,
+ 0x7B7E757F, 0x77808178, 0x7E757F80, 0x7B7C737D,
+ 0x747B7C72, 0x7E757D7E, 0x7A7B727D, 0x747C7D74,
+ 0x7D747D7E, 0x7B7C737C, 0x737B7C73, 0x79707B7C,
+ 0x7B7C7278, 0x6A75766C, 0x71677374, 0x73746A70,
+ 0x6C76766A, 0x7A707878, 0x78776D7B, 0x6D78796F,
+ 0x756C7576, 0x73746B74, 0x6D73746B, 0x736D7373,
+ 0x78787273, 0x2A767571, 0x0B092F2E, 0x0A0B090A,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x01010100,
+ 0x00020301, 0x38330203, 0x9EA59E34, 0x99979F98,
+ 0xA29898A0, 0x99A19699, 0x90989C90, 0x9B8F9A9C,
+ 0x9DA09199, 0x9A9EA296, 0xA396A2A6, 0x989F929C,
+ 0x90989C90, 0x9C8D989C, 0x9CA19297, 0x9DA1A599,
+ 0xADA1A5A9, 0xA8ACA0A9, 0x9DA5A99D, 0xA99DA5A9,
+ 0xA5A99DA5, 0x96A0A596, 0xA79BA0A5, 0xA3A79BA3,
+ 0x9AA5A99D, 0xAA9BA4A9, 0xA3AA9BA3, 0xA0A8ACA0,
+ 0xAD9EA8AC, 0xA8AD9EA8, 0xA2A9ADA1, 0xAEA2AAAE,
+ 0xA7AEA1AA, 0xA2A8AFA2, 0xACA1A6AF, 0xA1A99EA4,
+ 0xA6A1A99F, 0xAFA4A8B0, 0xAEB4A9A9, 0xA4ABAFA4,
+ 0xB1A6ABAF, 0xAEB2A7AD, 0xA7ACB2A7, 0xB2A9ACB2,
+ 0xAEB3AAAD, 0xABACB1A8, 0xB9B0AFB4, 0xAEB3AAB6,
+ 0xB0ABAFA9, 0xC3BDB2B6, 0xBFC3BDBF, 0xB6BABCB6,
+ 0xBCB8B8BC, 0xB8BCB7BB, 0xB9BABEB9, 0xBDB8B8BE,
+ 0xB6BCB7B7, 0xB8B8BEB9, 0xBDB9B9BD, 0xBCC0BBBC,
+ 0xB6B8BFB8, 0xBCB7B5BD, 0xB7BDB8B6, 0xBAB9BDB8,
+ 0xBCBAB9BC, 0xB7BDB8B9, 0xB3B8BCB6, 0xB9B4B5B9,
+ 0xB8BCB7B5, 0xB9B9BFBA, 0xBFB9B9C0, 0xB8BCB7BB,
+ 0xBBBABDBB, 0xBDBBBABD, 0xBABDBBBA, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBBBEBFBB, 0xBBB7BEBF,
+ 0xBBBCB8BA, 0xB7BBBCB8, 0xBDB9BBBD, 0xBBBCB8BC,
+ 0xB7BABBB7, 0x3E3EBABB, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x3A020004, 0x2C3C352F,
+ 0x26192F36, 0x77392548, 0x5B93614A, 0x785B9378,
+ 0x39614874, 0x19352A16, 0x382B4328, 0x3D1D1125,
+ 0x2236372B, 0x2F1D3A2E, 0x92694F7F, 0x5C94775A,
+ 0x674F7F79, 0x353A2B4B, 0x2E452920, 0x281F3438,
+ 0x08080808, 0x433F090A, 0xB7B9B344, 0xAFB0B4AF,
+ 0xB4AFB0B4, 0xAEB4AFAE, 0xABAEB5AE, 0xB3ADAFB4,
+ 0xAFB3ADAF, 0xABADB1AC, 0xB0ABAAB0, 0xA6ACA7AA,
+ 0xA6A8ACA7, 0xADA4A8AC, 0x9DA299A8, 0x8F90988E,
+ 0xA5A08F96, 0xAEB4AF9F, 0xA9A9B0A9, 0xAFA8A9B0,
+ 0xA9B0A9A8, 0xA7ACB1A8, 0xB1A8ADB0, 0xA8ABA2AE,
+ 0xA6A8ACA6, 0xACA7A6AD, 0xA6ACA7A8, 0xA7A8ACA7,
+ 0xACA7A6AC, 0xA8ACA7A8, 0xA7A8ACA7, 0xABA6A8AC,
+ 0xA6ACA7A7, 0xA8A9ADA8, 0xACA7A7AD, 0xA6ACA7A8,
+ 0xA4A3AAA3, 0xB0A9A4AB, 0xA8AFA8A9, 0xA7A9ADA7,
+ 0xADA8A9AD, 0xA9ADA8A9, 0xA8A8AEA9, 0xADA8A7AD,
+ 0xA7ADA8A7, 0xA6A7ABA6, 0xABA7A8AC, 0xA8ACA6AA,
+ 0xAAA8AFA8, 0xB0A9A9B1, 0xA9B0A9A9, 0xA5A7AEA7,
+ 0xACA7A5AC, 0xA6ADA6A6, 0xA7A6ACA7, 0xADA8A7AE,
+ 0xA6ADA6A9, 0xA9AAB1AA, 0xB0A9A8B0, 0xA9B1A7A9,
+ 0xA8AEB4A9, 0xB5AAAFB3, 0xABB3A8AF, 0xA6AAB2A8,
+ 0xB1A7A9B1, 0xACB2A7A9, 0xA3ABB2A5, 0xACA0ABAF,
+ 0xADAFA3A8, 0xA2ABADA1, 0xB0A5ACAE, 0xACB0A5AC,
+ 0xA0A7ADA2, 0xACA1A5AB, 0xABAFA3A8, 0x9CA9B0A3,
+ 0xA69AA4AB, 0xAAAEA2A2, 0x9DA8ACA0, 0xA99DA5A9,
+ 0xA4A89CA5, 0x9DAAACA0, 0xA79BA7A9, 0xA1A599A3,
+ 0x9BA5AA9B, 0xA596A5AA, 0x9EA598A0, 0x9FA3A99E,
+ 0xA59CA1A9, 0x9DA59BA0, 0x9C9DA59E, 0xA0999BA3,
+ 0x9CA49A99, 0x9B9DA59B, 0xA0979DA5, 0x9BA0979B,
+ 0x97A0A198, 0xA0979FA0, 0x9EA39A9D, 0x329EA39A,
+ 0x01003438, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x1B170001, 0x4E504A1A, 0x70787872,
+ 0x79707879, 0x78797078, 0x76797B75, 0x7C767A7C,
+ 0x797B757A, 0x787E7F76, 0x81788081, 0x7D7E7580,
+ 0x757D7E75, 0x7E757D7E, 0x8081787D, 0x79838179,
+ 0x7D788381, 0x82807880, 0x757D7E75, 0x7C737D7E,
+ 0x7D7E757B, 0x757D7E75, 0x7B727D7E, 0x7A7B727A,
+ 0x757D7E75, 0x7F767D7E, 0x7D7E757E, 0x757C7D73,
+ 0x7C737E7F, 0x7B7C737B, 0x777A7C76, 0x7C767B7D,
+ 0x7D7F797A, 0x757D7E75, 0x7E757D7E, 0x7B7C737D,
+ 0x74797D72, 0x7D74797F, 0x777C7378, 0x74787D74,
+ 0x7B72787D, 0x777C7378, 0x72797C73, 0x7B72787B,
+ 0x76797078, 0x72797C73, 0x7D74787B, 0x797C737A,
+ 0x727A7D74, 0x7B72787B, 0x7A7D7478, 0x78838278,
+ 0x847F8382, 0x81817B87, 0x96888783, 0x736E9B9A,
+ 0x60605A76, 0x3F686960, 0x04004548, 0x00040000,
+ 0x3B010200, 0x605A3F41, 0x60615860, 0x867E807A,
+ 0x807A888C, 0x7E81787E, 0x757E7F75, 0x7E767E7F,
+ 0x807E7680, 0x75808178, 0x7C737D7E, 0x7B7C737B,
+ 0x767B7D77, 0x80777A7C, 0x7C7F767D, 0x757A7B72,
+ 0x82787E7F, 0x7E827781, 0x71808479, 0x7B72787C,
+ 0x7D807778, 0x737B7C73, 0x7C737B7C, 0x7D7E757B,
+ 0x757D7E75, 0x7D747D7E, 0x7D7E757C, 0x787D7E75,
+ 0x7C738081, 0x7B7C737B, 0x757D7E75, 0x7C737D7E,
+ 0x7E7F767B, 0x77808177, 0x80768081, 0x7D7C7281,
+ 0x737E7F75, 0x7E747C7D, 0x7C7D747F, 0x737A7B72,
+ 0x7970797C, 0x76797076, 0x6F787B72, 0x7B727578,
+ 0x74776E78, 0x6874756C, 0x746B7071, 0x78797073,
+ 0x6C75746A, 0x786E7977, 0x7D7C727A, 0x6F72756C,
+ 0x746E7375, 0x72746E72, 0x7075756F, 0x74707774,
+ 0x504F4B75, 0x00141211, 0x01000102, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00030002, 0x00000000,
+ 0x00000000, 0x0909050A, 0x05090804, 0x06060606,
+ 0x33020301, 0xA19A3539, 0x99A1979A, 0x8F949C91,
+ 0x9B8E939C, 0x959C8F92, 0x8D9A9D8E, 0x97899B9B,
+ 0x9B9C8C98, 0x919C9F90, 0x9F909BA0, 0x99A09198,
+ 0x93989F92, 0x9F9299A0, 0x99A09398, 0x98A0A498,
+ 0xA498A0A4, 0xA3A79BA0, 0x9CA4A89C, 0xA99CA4A8,
+ 0xA6ADA0A2, 0x96A2A99A, 0xA99A9EA5, 0xA1A89BA2,
+ 0x9EA5A99D, 0xA79AA6AA, 0x9EA598A0, 0x9BA5A99D,
+ 0xAC9DA3A7, 0xA5AC9DA7, 0xA1AAAFA0, 0xADA1A9AD,
+ 0xA7ADA2A9, 0xA3A7ADA2, 0xA99FA6AE, 0xA0A89EA1,
+ 0xA5A7ADA2, 0xB1A6AAB0, 0xAEB2A7AD, 0xAAADB1A6,
+ 0xB3AAB0B3, 0xABAEA5B2, 0xAAAAB2A8, 0xB4AAACB4,
+ 0xA9B1A7AC, 0xB0ABB2AB, 0xB7B1B0B7, 0xA0A49EB3,
+ 0xB6A0A49E, 0xC9C3BABC, 0xBABCB6C7, 0xB8B7BBB5,
+ 0xBAB5B8BF, 0xB7BBB6B6, 0xB9BABEB9, 0xBBB9B8BE,
+ 0xB8BDBBB6, 0xBDB8BDBB, 0xC0BEBABF, 0xB8BCB7BD,
+ 0xB9B6BDB6, 0xBEB9B9C0, 0xB8BDBBB8, 0xBBBABDBB,
+ 0xBDBBBABD, 0xBABDBBBA, 0xB5BBBCB8, 0xB7B7B6B7,
+ 0xBBBBBBB7, 0xBABABDBB, 0xBCB7BBBF, 0xB6BCB7B6,
+ 0xBBBABDBB, 0xBEBCBABD, 0xBABDBBBB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBBBDC0BE, 0xBBB9BABD,
+ 0xB8BCB7B8, 0xB9BABEB9, 0xBDBBBABE, 0xBABEB9BA,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000013E, 0x00000001,
+ 0x00000000, 0x02000102, 0x3C000004, 0x313E3833,
+ 0x281C3238, 0x80402F51, 0x619C6A53, 0x80629D7F,
+ 0x46654E7B, 0x23423321, 0x32253F32, 0x3E201329,
+ 0x21383829, 0x3A254531, 0x9B684E7E, 0x619C8063,
+ 0x6D54867F, 0x37392B4D, 0x2C462820, 0x2A203737,
+ 0x06070707, 0x7D790708, 0xB8B8B27E, 0xB0B1B2AE,
+ 0xB5B0B1B5, 0xAEB4AFB1, 0xABACB3AC, 0xB3ADADB5,
+ 0xAEB5AEAF, 0xABA9AFAA, 0xB0ABAAB0, 0xAAB0ABAA,
+ 0x9CA7ABA6, 0x978E9EA2, 0x91968D94, 0x828F968F,
+ 0xA4A28187, 0xAFB5B09F, 0xA9A8AFAA, 0xB0A9A8B0,
+ 0xAEB5AEA9, 0xA8ACB1A8, 0xB1A8ACB1, 0xAEB1A8AE,
+ 0xA6A8ACA6, 0xACA7A8AC, 0xA8ACA7A8, 0xA7A8ACA7,
+ 0xACA7A8AC, 0xA8ACA7A8, 0xA6AAABA7, 0xADA8A9AA,
+ 0xA8ACA7A9, 0xA7A4A8A3, 0xA6A1A8AC, 0xA3A7A2A2,
+ 0xA39DA49D, 0xAAA3A3AA, 0x9FA39DA3, 0x999D9F99,
+ 0x9E9A9D9F, 0x9B9F9A9D, 0x9FA0A49F, 0xADA89EA4,
+ 0xA7ADA8A7, 0xA7A6ACA7, 0xACA7A8AC, 0xA8ACA7A8,
+ 0xA9A9B0A9, 0xAFA8A8B0, 0xA9B0A9A8, 0xA7A5ABA6,
+ 0xACA7A6AC, 0xA6ACA7A6, 0xA6A6ACA7, 0xABA6A5AB,
+ 0xA6ACA7A7, 0xA9A9B0A9, 0xB4ADA8B0, 0xADB5ABAC,
+ 0xA7AEB4A9, 0xAFA6AEB2, 0xA9B1A7AA, 0xA8AAB2A8,
+ 0xB3A9AAB2, 0xAAB2A7AB, 0xA3A9B0A3, 0xB2A6A9B0,
+ 0xB1B3A7AE, 0xA4B0B2A6, 0xABA1AEB0, 0xA9ACA3AA,
+ 0xA3A9AFA4, 0xACA1A8AE, 0xA8ACA0A8, 0x9EA3AA9D,
+ 0xAA9EA4AB, 0xA6AA9EA6, 0xA0A8ACA0, 0xA99DA8AC,
+ 0xA5A99DA5, 0x9FABADA1, 0xA99DA9AB, 0x9FA397A5,
+ 0x9AA6AA9E, 0xA596A4A9, 0x9EA598A0, 0xA0A1A99E,
+ 0xA197A1AA, 0x9CA59B99, 0x9D9DA59E, 0xA09999A3,
+ 0x9BA39C98, 0x9B9DA59B, 0x9C919DA5, 0x999F9496,
+ 0x989EA198, 0x9F969EA1, 0x9A9F969C, 0x9A9EA499,
+ 0x37339EA3, 0x00010036, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x72292923,
+ 0x78727878, 0x77777178, 0x787A7C76, 0x7C767B7C,
+ 0x797B757A, 0x737F8077, 0x7D747B7C, 0x7B7C737C,
+ 0x787D7E75, 0x7E758081, 0x7D7E757D, 0x7A807E76,
+ 0x7C778482, 0x817E797F, 0x757D7E75, 0x7C737D7E,
+ 0x7E7F767B, 0x727B7C73, 0x79707A7B, 0x7B7C7378,
+ 0x747F8077, 0x7C737C7D, 0x7B7C737B, 0x717D7E74,
+ 0x7C737A7B, 0x7D7E757B, 0x7681837D, 0x7D777A7C,
+ 0x7A7C767B, 0x737B7C73, 0x7C737B7C, 0x7B7E757B,
+ 0x72767C71, 0x8177777D, 0x777F7579, 0x72787D74,
+ 0x7C73767B, 0x787D7477, 0x74787D74, 0x7D74787D,
+ 0x787B727A, 0x73767970, 0x7A71797C, 0x797C7377,
+ 0x727A7D74, 0x7B72787B, 0x7A7B7278, 0x737C7D73,
+ 0x7B767E7D, 0x7C7C767E, 0x97868783, 0x746E9A9B,
+ 0x60605A74, 0x3F686960, 0x04004548, 0x00040000,
+ 0x3C000100, 0x605A3F40, 0x5F625960, 0x857D7F79,
+ 0x8178898E, 0x7E81787E, 0x78818278, 0x7E768182,
+ 0x807E7681, 0x75828078, 0x7D747D7E, 0x8081787C,
+ 0x7B7E807A, 0x7E757F81, 0x7C7D747D, 0x77828177,
+ 0x82788281, 0x7E7F7581, 0x767C8075, 0x7F767D81,
+ 0x7C7F767C, 0x77808178, 0x7C737F80, 0x7D7E757B,
+ 0x747B7C73, 0x81787C7D, 0x7D7E7580, 0x787D7E75,
+ 0x7E758081, 0x7B7C737D, 0x757D7E75, 0x82797D7E,
+ 0x80817881, 0x77808177, 0x7E748081, 0x7C7B717F,
+ 0x737C7D73, 0x7D737C7D, 0x7B7C727E, 0x71787B72,
+ 0x7B72777A, 0x787C7178, 0x6F777B70, 0x7B72767A,
+ 0x73766D78, 0x6B75766D, 0x726C7374, 0x73746B72,
+ 0x7276746A, 0x746A7F7D, 0x78766E76, 0x6E72746E,
+ 0x746F7074, 0x70746F70, 0x7074736F, 0x28277574,
+ 0x0203012A, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x09080409, 0x05070804, 0x07070706,
+ 0x99676B66, 0xA0999B9F, 0x98A09699, 0x8D959C8F,
+ 0x9C8D959C, 0x9DA29395, 0x8E9EA192, 0x97899C9C,
+ 0x96968898, 0x909C9F90, 0xA1929A9F, 0x9FA6979A,
+ 0x9CA2A99C, 0xA99CA2A9, 0xA1A89BA2, 0x9EA6AA9E,
+ 0xA89CA6AA, 0xA5A99DA4, 0x9CA4A89C, 0xA89BA4A8,
+ 0xA2A99CA1, 0x96A2A99A, 0xA99A9EA5, 0xA2A99CA2,
+ 0x9CA3A79B, 0xA497A3A7, 0x9EA5989D, 0x9CA0A498,
+ 0xB0A1A4A8, 0xA8AFA0A9, 0xA1A9AE9F, 0xADA1A9AD,
+ 0xA3A99EA9, 0xA3A1A99E, 0xB0A6A5AD, 0xA9B1A7A8,
+ 0xA5AAB0A5, 0xACA1AAB0, 0xABAFA4A8, 0xA6AFB2A9,
+ 0xAEA8ACAF, 0xAEB1A8AC, 0xA6ABB3A9, 0xB0A6A7B0,
+ 0xACB4AAA8, 0xB3A9B1AA, 0xB1ACB1B8, 0xA0A49FAB,
+ 0xB6A2A49E, 0xBCB6BABC, 0xBABCB6BC, 0xB8BABEB8,
+ 0xBBB6B8BF, 0xB8BEB9B5, 0xB6B8BCB7, 0xBBB9B7BB,
+ 0xB6BBB9B8, 0xB9B8BDBB, 0xBBB9B6BB, 0xB8BBB9B8,
+ 0xB6B6BCB7, 0xBBB6B5BB, 0xBBBEBCB5, 0xBCBABCBC,
+ 0xC0BEBABC, 0xB9BCBABD, 0xB7BDBEBC, 0xB7B7B7B7,
+ 0xBCBCBCB9, 0xB9BABDBB, 0xBCB7B8BB, 0xB6BCB7B6,
+ 0xBBBABDBB, 0xBDBBBABD, 0xBABDBBBA, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBCBCBFBD, 0xBCBABBBE,
+ 0xB8BBB9B9, 0xB6B7BBB6, 0xBAB8B7BB, 0xBBBEBCB7,
+ 0xB9B8BCB7, 0x3E3EB8BB, 0x0000013E, 0x00000001,
+ 0x00000000, 0x02000102, 0x3C000003, 0x323D3633,
+ 0x281D3138, 0x82413052, 0x639E6A52, 0x7E629D81,
+ 0x46674F7F, 0x23423221, 0x32253F32, 0x3E201329,
+ 0x21383829, 0x3A254533, 0x9E684E7E, 0x619E8163,
+ 0x6E548980, 0x3937294B, 0x2E48281F, 0x291E3839,
+ 0x07080907, 0xB7B30809, 0xB9B9B3B8, 0xB2B5B6B2,
+ 0xB7B2B3B7, 0xB3B7B2B3, 0xB2B2B9B2, 0xB7B2B2B9,
+ 0xB2B8B3B1, 0xB1B0B8B1, 0xB9B2B0B8, 0xB1B8B1B1,
+ 0x8FA8ACA7, 0x8B829395, 0x878C8388, 0x82818881,
+ 0xB3B18087, 0xAEB4AFAE, 0xADACB3AE, 0xB9B2ACB4,
+ 0xB3B7B1B2, 0xB0B3B7B1, 0xB7AEB2B6, 0xADB2A9B2,
+ 0xB3ADB1AB, 0xB7B3B4B8, 0xAFB0ACB6, 0xACADB1AC,
+ 0xB0ABADB1, 0xADB1ACAC, 0xA7A9AAA6, 0xA49FAAAB,
+ 0x9FA39EA0, 0x9D9DA19C, 0xA19C9EA2, 0x9DA19C9D,
+ 0x9D969D96, 0xA39D9DA4, 0x989C969F, 0x8A8D8F89,
+ 0x908A9090, 0x9B9F998E, 0xA89FA39D, 0xB7B0A8AF,
+ 0xB0B7B0B0, 0xB3B3BAB3, 0xBAB3B3BA, 0xB3BAB3B3,
+ 0xB7B7BDB8, 0xBDB8B6BC, 0xBABEB9B9, 0xA7B9BDB8,
+ 0xACA6A8AC, 0xB8BCB6A8, 0xB8B8BFB8, 0xBFB9B8BF,
+ 0xAFB6AFBB, 0xA9ACB3AC, 0xB4ADA8B0, 0xA9B1A7AC,
+ 0xA7ACB2A7, 0xB3A8AFB3, 0xAFB5AAAF, 0xA8ADB3A8,
+ 0xB3A8ADB3, 0xADB3A8AD, 0xA1ACB3A6, 0xAFA0A9B0,
+ 0xADB2A3AA, 0xA5AEB0A4, 0xAFA5AFB1, 0xACADA3AE,
+ 0xA2ABAFA4, 0xACA0A7AD, 0xAAAEA2A8, 0xA3ABAFA3,
+ 0xAA9EABAF, 0xA5AA9BA6, 0xA0A4A89C, 0xADA0A8AC,
+ 0xA1A89BA6, 0xA0A5A99D, 0xA99EA8AC, 0xA0A498A5,
+ 0x9DA0A498, 0xA89CA5A9, 0x9EA598A4, 0x9B9DA59A,
+ 0xA2969DA7, 0x99A39798, 0x9F9DA59E, 0xA0999DA4,
+ 0x9AA29B98, 0x9B9DA59B, 0x9F949DA5, 0x9BA19697,
+ 0x989EA297, 0x9F969EA1, 0x9A9F969C, 0x9A9DA398,
+ 0xA39D9EA3, 0x363733A1, 0x00000100, 0x00000000,
+ 0x01010100, 0x00000100, 0x00000001, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000100,
+ 0x504C0001, 0x7678724F, 0x6A7A7C76, 0x7C766E70,
+ 0x7A7C7678, 0x737B7C73, 0x7E757B7C, 0x8081787D,
+ 0x7A7E807A, 0x81787E80, 0x7B7C7380, 0x78807F75,
+ 0x7E768382, 0x807E7680, 0x74808178, 0x7B757C7D,
+ 0x7A7A747B, 0x747B7C73, 0x7C737C7D, 0x7B7C737B,
+ 0x6F7B7C73, 0x7C737778, 0x7D7E757B, 0x757D7E75,
+ 0x7E757D7E, 0x7D7E757D, 0x797F7F79, 0x7F797F7F,
+ 0x7F7F797F, 0x757B7C73, 0x7F747D7E, 0x7E82777B,
+ 0x72777D72, 0x8177757D, 0x79817779, 0x727B8077,
+ 0x7D74767B, 0x7A7D747A, 0x767A7E78, 0x7B72787C,
+ 0x7A7D7478, 0x71777B70, 0x7D74787C, 0x787D7478,
+ 0x70767970, 0x7C737679, 0x7A7B727B, 0x6F797A70,
+ 0x77717879, 0x7C7C7677, 0x97868783, 0x746E9A9B,
+ 0x60605A74, 0x3F686960, 0x04004548, 0x00040000,
+ 0x3C000100, 0x605A3F40, 0x5E605A60, 0x83797C73,
+ 0x8077878C, 0x8081777D, 0x727E7F75, 0x81797B7C,
+ 0x807E7684, 0x747F7D75, 0x82797C7D, 0x7D7E7581,
+ 0x787B7C73, 0x81788081, 0x78797080, 0x757D7E74,
+ 0x81777E7F, 0x7C7D7380, 0x757A7C70, 0x82797E7F,
+ 0x7F807781, 0x767F7D75, 0x7C73807E, 0x7D7E757B,
+ 0x727D7E75, 0x7D747A7B, 0x7D7E757C, 0x737D7E75,
+ 0x7C737B7C, 0x7879707B, 0x757D7E75, 0x81787D7E,
+ 0x7D7E7580, 0x77808177, 0x7D738081, 0x7D7E747C,
+ 0x747C7D74, 0x7D737C7D, 0x7A7B717C, 0x74797C73,
+ 0x7C73787D, 0x757B7077, 0x70787C71, 0x7970777B,
+ 0x75786F76, 0x6D72736A, 0x746B7576, 0x70716873,
+ 0x6E737167, 0x786E7A78, 0x75736B7A, 0x6F73756F,
+ 0x746F7074, 0x6F736E6E, 0x004E4F4B, 0x03000203,
+ 0x02030102, 0x00000100, 0x01010000, 0x00000001,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x07080507, 0x07070805, 0x797A7609,
+ 0x99999F9A, 0xA09998A0, 0x9AA29899, 0x8890978A,
+ 0xA1929097, 0x9CA1929C, 0x939CA094, 0xA4989D9F,
+ 0xA2A498A2, 0x989EA296, 0x9F939EA5, 0xA0A4989B,
+ 0x9DA4A89C, 0xA89CA5A9, 0xA4A89CA4, 0xA0A5A99D,
+ 0xAD9EA8AC, 0xA6AD9EA6, 0x9CA5AC9D, 0xAC9DA4AB,
+ 0xA5AC9DA5, 0x9BA9AE9F, 0xACA0A5AA, 0xA8ACA0A8,
+ 0xA0A8ACA0, 0xACA1A8AC, 0xA6ACA1A6, 0x9EAAAEA2,
+ 0xAC9FA6AA, 0xA8AFA2A5, 0x9FA9ADA1, 0xAEA1A7AB,
+ 0xA8AFA2A7, 0xA3A8B0A5, 0xB0A7A5AD, 0xAAAFA6AB,
+ 0xA4ABAFA3, 0xB0A4ACB0, 0xB0B4A9AC, 0xA6AAAFA6,
+ 0xB1A8AAAF, 0xACB1A8AE, 0xA6AAB2A8, 0xB6ACA8B2,
+ 0xACB4AAAE, 0xB1AAB2AB, 0xB7B2B0B8, 0xA5ABA6B0,
+ 0xB6A0A49E, 0xBCB6BABC, 0xBCBCB6BC, 0xB9BBBCB8,
+ 0xB6B4BABE, 0xB8BDBBB1, 0xBDBABDBB, 0xBDBBBCBF,
+ 0xBABDBBBA, 0xB8B6BBB9, 0xBBB9B5BA, 0xBABDBBB8,
+ 0xBAB9BCBA, 0xBEB9BBBF, 0xB9BDB8BA, 0xBCBABDBB,
+ 0xC0BEBBBE, 0xBCBFBDBD, 0xB7BABCBC, 0xB7B7B5B7,
+ 0xBCBCBCB7, 0xBBBABDBB, 0xBDBBBCC0, 0xB7BAB8BA,
+ 0xBBB9BEBC, 0xBDBBB8BD, 0xBABDBBBA, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBBBABDBB, 0xBDBBBABD,
+ 0xBDC0BEBA, 0xBCBABDBB, 0xBDBBBBBE, 0xBABDBBBA,
+ 0xB9B8BCB7, 0x3E3EB8BB, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000000, 0x3D000003, 0x303D3734,
+ 0x281C3237, 0x82422E51, 0x629D6C52, 0x7F649C80,
+ 0x47664F7C, 0x22413322, 0x33264031, 0x3F20122A,
+ 0x223A3629, 0x38254632, 0x9D684D7F, 0x619E8062,
+ 0x6F558A82, 0x39392B4D, 0x2C48281F, 0x2E223E38,
+ 0x07080907, 0xB7B30809, 0xB6B8B2B6, 0xB8BABBB7,
+ 0xB9B4B9BD, 0xB3B9B4B5, 0xB6B1B8B1, 0xB7B2B6BD,
+ 0xB6BCB7B1, 0xB1B0B8B1, 0xB8B1B0B8, 0xB1B8B1B0,
+ 0xA7A8ACA7, 0xA299A9AD, 0x868B829D, 0xA0818881,
+ 0xB3B19EA5, 0xAEB4AFAE, 0xB6B4BBB6, 0xBCB7B5BD,
+ 0xB9BDB7B6, 0xB6B8BCB6, 0xBCB5B8BC, 0xB6BDB6B5,
+ 0xB7B8BCB7, 0xBBB7B8BC, 0xB8BCB7BA, 0xB6B8BCB7,
+ 0xBCB7B7BB, 0xB8BCB7B8, 0xAFBABBB7, 0xACA7B2B3,
+ 0xA0A49FA8, 0x979DA19C, 0xA19C989C, 0xA3A7A29D,
+ 0xA39DA49D, 0xA9A3A3AA, 0x989C96A5, 0x8A8D8F89,
+ 0xADA78E90, 0xB8BCB6AB, 0xB8BAC1BA, 0xC0B9B8BF,
+ 0xB9C0B9B9, 0xB9B8BFB8, 0xC0B9B9C0, 0xB9C0B9B9,
+ 0xBFBEC4BF, 0xC3BFC0C4, 0xC2C3BFC2, 0xB7C0C4BF,
+ 0xB4AEB8BC, 0xC2C4BEB2, 0xC1C3C7C1, 0xC7C1C1C8,
+ 0xC1C8C1C3, 0xA9B7BEB7, 0xB0A9A9B0, 0xA8B0A6A9,
+ 0xA9ADB3A8, 0xB3AAAEB4, 0xACB1A8AE, 0xA8ACB2A7,
+ 0xB3A8ADB3, 0xAEB4A9AD, 0xA5ABB2A5, 0xAFA2ABB2,
+ 0xA8ACA0A8, 0xA2AAAEA2, 0xB0A6ACAE, 0xA9ADA2AF,
+ 0xA3A8ACA1, 0xACA0A8AE, 0xA8ACA0A8, 0xA3AAAEA3,
+ 0xAA9EAAAE, 0xAAAFA0A6, 0xA0A6AA9E, 0xADA0A8AC,
+ 0xA3AA9DA6, 0x9DA5A99D, 0xACA1A5A9, 0xA3A79CA8,
+ 0x9EA0A499, 0xA79BA6AA, 0x9EA598A3, 0x99A1A99E,
+ 0xA3969DA6, 0x9AA2979A, 0x9C9CA39C, 0xA0999CA3,
+ 0x9CA39C99, 0x9B9DA59B, 0xA0959DA5, 0x98A09598,
+ 0x999EA297, 0x9E98A0A4, 0x999E959A, 0x999EA39A,
+ 0xA39A9EA4, 0x6A6C66A0, 0x00050602, 0x00000102,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x01000000, 0x27282400, 0x76565753, 0x7C767A7C,
+ 0x6C706A78, 0x757B7C73, 0x81787D7E, 0x7D7E7580,
+ 0x767B7B75, 0x7E757C7C, 0x7D7E757D, 0x757E7F75,
+ 0x81797E7F, 0x7E7F7683, 0x79808178, 0x7D778182,
+ 0x7B7B757D, 0x747C7D74, 0x81787C7D, 0x7B7C7380,
+ 0x737B7C73, 0x7E757B7C, 0x7C7D747D, 0x78808178,
+ 0x7E758081, 0x7D7E757D, 0x7A81817B, 0x817B8080,
+ 0x7F7F7981, 0x767B7C73, 0x80757E7F, 0x7B7F747C,
+ 0x76797F74, 0x81777981, 0x777F7579, 0x74767B72,
+ 0x7D74787D, 0x787B727A, 0x73797D77, 0x79707579,
+ 0x7A7D7476, 0x72787C71, 0x7D74797D, 0x767B7278,
+ 0x7275786F, 0x786F787B, 0x7A7B7277, 0x70818278,
+ 0x82797879, 0x7A7C7681, 0x97868783, 0x746E9A9B,
+ 0x60605A74, 0x3F666960, 0x04004548, 0x01050000,
+ 0x3C000100, 0x605A3F40, 0x60605A60, 0x84787B72,
+ 0x81778A8D, 0x7F807680, 0x757E7F75, 0x81797E7F,
+ 0x807E7684, 0x78828078, 0x80778081, 0x7D7E757F,
+ 0x737D7E75, 0x81787B7C, 0x7D7E7580, 0x767E7F75,
+ 0x7F757F80, 0x7D7E747E, 0x757E7F75, 0x7F757E7F,
+ 0x7E7F767E, 0x75808178, 0x7E757D7E, 0x797C737D,
+ 0x767B7E75, 0x81787C7F, 0x80817880, 0x737B7C73,
+ 0x79707B7C, 0x78797078, 0x787B7C73, 0x7D748081,
+ 0x7B7E757C, 0x737E7F75, 0x7A707C7D, 0x80817779,
+ 0x797C7D74, 0x7D748182, 0x7A7D747C, 0x72777C73,
+ 0x7D74767B, 0x767C7178, 0x71787C71, 0x7970787C,
+ 0x72756C76, 0x6E76776E, 0x746A7778, 0x73746A73,
+ 0x6A727167, 0x7C727674, 0x75736B7E, 0x7071726E,
+ 0x73717175, 0x2023216E, 0x00020301, 0x04000203,
+ 0x00030100, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000100, 0x02000001,
+ 0x00010001, 0x05060606, 0x7A760607, 0xB0B4AE79,
+ 0x9799A099, 0xA19798A1, 0x9BA19699, 0x92959C8F,
+ 0xA5969AA1, 0x9CA192A0, 0x99A0A498, 0xA498A1A5,
+ 0xA0A498A0, 0x989EA499, 0xA2969EA5, 0xA0A4989E,
+ 0x9C9FA397, 0xA89CA4A8, 0xA4A89CA4, 0xA0A5A99D,
+ 0xAD9EA8AC, 0xA6AD9EA6, 0x9DA5AC9D, 0xAC9DA5AC,
+ 0xA5AC9DA5, 0x9AA4A99A, 0xACA0A4A9, 0xA8ACA0A8,
+ 0xA0AAACA0, 0xACA1A8AC, 0xA6ACA1A8, 0x9CA7AB9F,
+ 0xA99CA2A9, 0xA6ADA0A2, 0xA1A7AEA1, 0xAFA2A7AE,
+ 0xA8AFA2A8, 0xA2AAB1A4, 0xACA3A7AD, 0xA7ACA3A7,
+ 0xA5ABB2A5, 0xAFA3ABB2, 0xABB1A6AB, 0xA9AAAFA6,
+ 0xB1A8ADB2, 0xAAAFA6AC, 0xADACB4AA, 0xB4AAAEB7,
+ 0xA9B1A7AC, 0xB1AFB7B0, 0xB1ACB0B8, 0xA5ABA6AA,
+ 0xB6ACB0AA, 0xBCB6BABC, 0xBABCB6BC, 0xB6BCBDB9,
+ 0xB6B4B7BB, 0xB8BDBBB1, 0xBCB9BCBA, 0xBDBBBBBE,
+ 0xB7BCBABA, 0xBBBABFBD, 0xBBB9B8BD, 0xBABDBBB8,
+ 0xBBBCBFBD, 0xBFBBBABD, 0xBCBDB9BE, 0xBCB9BCBA,
+ 0xBFBDBBBE, 0xBABDBBBC, 0xB6BABDBB, 0xB7B7B5B8,
+ 0xBABCBCB5, 0xB7B8BBB9, 0xBCBAB8BC, 0xB8BBB9B9,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB9BCBABA, 0xBABBBEBC,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBBBABDBB, 0xBDBBBABD,
+ 0xBABDBBBA, 0xBABABDBB, 0xBEBCB9BC, 0xBABEB9BB,
+ 0xB7B8BCB7, 0x3F3DB8BC, 0x0000003E, 0x00000000,
+ 0x01000000, 0x00000000, 0x3C000003, 0x323E3633,
+ 0x281C3236, 0x82422E51, 0x629D6C52, 0x7F619C80,
+ 0x4667507D, 0x23423321, 0x32253F32, 0x4020122A,
+ 0x20383628, 0x39254830, 0x9F684C81, 0x619E8162,
+ 0x70548982, 0x393A2A4C, 0x2C482A1F, 0x3224403A,
+ 0x07060808, 0xB4AF0609, 0xB0B4AFB0, 0xB7B7BBB6,
+ 0xBDB6B6BC, 0xB5BCB5B6, 0xB6B5BCB5, 0xBAB5B5BD,
+ 0xB3B9B4B4, 0xB0B0B7B0, 0xB4AFB0B7, 0xB0B4AFB0,
+ 0xB0AEB4AF, 0xB7B0AFB5, 0xAFB6AFB0, 0xB0ACB3AE,
+ 0xB5B0AEB5, 0xB0B7B2AE, 0xB4B1B8B3, 0xBBB8B2B9,
+ 0xB5BBB6B4, 0xB7B5B9B4, 0xBCB7B8BC, 0xB3B7B2B8,
+ 0xB4B3B7B2, 0xB9B4B5B9, 0xB4B8B3B5, 0xB2B3B7B2,
+ 0xB7B2B1B7, 0xB1B7B2B1, 0xB7B5B9B4, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xB1B5BBB6, 0xB7B2B0B6, 0xB5BBB6B1,
+ 0xB1B0B6B1, 0xB6B1B0B6, 0xADB1ACB2, 0xB4B0B4AF,
+ 0xC5C0B5B9, 0xC0C4BFC1, 0xB9BCC2BD, 0xBEB9B8BE,
+ 0xB5BBB6B8, 0xB6B6BDB6, 0xBBB6B8BC, 0xB9BDB8B7,
+ 0xB8BBBFBA, 0xBCB8B9BD, 0xB9BAB6BB, 0xBBBDBFB9,
+ 0xBFB9BFC1, 0xBEC0BABF, 0xBABCC0BA, 0xC4BDBAC1,
+ 0xC1C8C1BD, 0xABBFC6BF, 0xB1ABADB1, 0xAFB1ABAF,
+ 0xAAAFB4AB, 0xB3ACACB4, 0xACB3ACAC, 0xA9AFB4AB,
+ 0xB4A9AEB4, 0xACB2A7B0, 0xA7A9B1A7, 0xADA3A9B1,
+ 0xA9B1A7A5, 0xA2A9AFA4, 0xB0A7A7AD, 0xA9AEA5AB,
+ 0xA2A6ACA1, 0xADA1A7AD, 0xA9ADA1A9, 0xA3AAAEA3,
+ 0xAA9EAAAE, 0xA6AA9EA6, 0x9EA8ACA0, 0xADA0A6AA,
+ 0xA6ADA0A6, 0x9DA1A79C, 0xA89DA2A8, 0xA1A79CA2,
+ 0x9C9EA499, 0xA59AA1A7, 0x9EA4999F, 0x989EA598,
+ 0xA5989EA5, 0x9BA2959E, 0x999EA198, 0x9A919FA2,
+ 0x9DA29997, 0x999BA399, 0xA3999AA3, 0x939B919A,
+ 0x979EA297, 0x9D979EA2, 0x9A9F9699, 0x959DA59B,
+ 0xA09598A0, 0xA3A89F9A, 0x006A6E69, 0x00000001,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x2C010200, 0x5C562F30,
+ 0x868A8458, 0x70787970, 0x79707879, 0x78797078,
+ 0x787D7E75, 0x7C738081, 0x7D7E757B, 0x797E7F76,
+ 0x81787F82, 0x80817880, 0x737D7E75, 0x7E757B7C,
+ 0x7E7F767D, 0x737D7E75, 0x7D747B7C, 0x7B7C737C,
+ 0x737D7E74, 0x7C737C7D, 0x7D7E757B, 0x767B7D77,
+ 0x7D777A7C, 0x7B7D777B, 0x737D7E75, 0x7E757B7C,
+ 0x7B7C737D, 0x747A7D74, 0x7B727A7D, 0x7F827978,
+ 0x77787D74, 0x7E747B80, 0x767E7476, 0x72767B72,
+ 0x7C73767B, 0x787D7477, 0x72787D74, 0x7B72767B,
+ 0x767B7276, 0x72787B72, 0x7D74787B, 0x787B727A,
+ 0x767B7E75, 0x7E757C7F, 0x7B7C737D, 0x757B7C73,
+ 0x7E757D7E, 0x7678727D, 0x97868783, 0x746E9A9B,
+ 0x60605A74, 0x3F666960, 0x04004548, 0x00040000,
+ 0x3C000100, 0x605A3F40, 0x60605A60, 0x8C797C73,
+ 0x847A9295, 0x83847A83, 0x76808178, 0x81797E7F,
+ 0x83817984, 0x78817F77, 0x847B8081, 0x82837A83,
+ 0x77817F77, 0x8076817F, 0x8081777F, 0x79808479,
+ 0x7E758084, 0x81857A7B, 0x767C8075, 0x80767D81,
+ 0x7E7F757F, 0x78808177, 0x7D747E81, 0x72767078,
+ 0x777B8077, 0x7D747B80, 0x787B727A, 0x707D7E75,
+ 0x7A717879, 0x77786F79, 0x77777A71, 0x7B727D80,
+ 0x787D7478, 0x747B7E75, 0x7D747A7D, 0x7A7D747A,
+ 0x74787B72, 0x7D747A7D, 0x7A7D747A, 0x72787D74,
+ 0x7B72767B, 0x787B7276, 0x737B7C73, 0x776E7B7C,
+ 0x74776E74, 0x68727369, 0x74687274, 0x70746870,
+ 0x66727167, 0x70687170, 0x70706A72, 0x496D6E6A,
+ 0x0000484B, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000301, 0x04000003,
+ 0x00040000, 0x75262C27, 0xA099747A, 0x99A09999,
+ 0x919BA196, 0x9C91969C, 0x989C9098, 0x979AA194,
+ 0xA7989BA4, 0x9DA495A0, 0x999FA397, 0xA599A1A5,
+ 0xA2A69AA1, 0x98A0A498, 0xA69AA0A4, 0xA3A899A2,
+ 0x97A4A89C, 0x9E929FA3, 0xA4A89C9A, 0x9AA2A798,
+ 0xAB9CA4A9, 0xA4A99AA6, 0x9BA5AA9B, 0xAA9BA5AA,
+ 0xA2A798A5, 0x9D9FA699, 0xAA9DA3AA, 0xA3AA9DA3,
+ 0x9EA6AA9E, 0xA99DA6AA, 0xA6AA9EA5, 0xA0A6ADA0,
+ 0xAA9FA6AD, 0xA4ACA1A4, 0xA4A7AFA4, 0xADA2A9AF,
+ 0xA9B0A3A7, 0xA4A5AC9F, 0xAEA3AAB1, 0xABB1A6A8,
+ 0xA4AAB0A5, 0xADA2A7AF, 0xABB0A7A7, 0xA8ADB2A9,
+ 0xB0A7ACB1, 0xABB3A9AB, 0xAAABB3A9, 0xB2ABAAB1,
+ 0xABB3ACAA, 0xB0B0B7B0, 0xAEA7B0B7, 0x9EA59EA7,
+ 0xBFA8AEA9, 0xBDB8BEC4, 0xB9BDB8B9, 0xB7B8BCB7,
+ 0xBBB9B8BC, 0xB8BDBBB8, 0xBDB8BDBB, 0xC0BFB9C0,
+ 0xBAC0BFBA, 0xBDBAC1BE, 0xBBB9B9C0, 0xB8BDBBB6,
+ 0xB9B6BBB9, 0xBDBBB8BB, 0xBABBB9BC, 0xBBBABDBB,
+ 0xBBB9BABD, 0xB6BBB9B6, 0xB6B7BBB6, 0xB8B6B7BB,
+ 0xB5BAB9B3, 0xB9B5BAB8, 0xBFBDB6BB, 0xB9BCBABC,
+ 0xBCB7BCBB, 0xBFBEB8BD, 0xB9BEBCBA, 0xBBBABDBB,
+ 0xBDB8BABD, 0xBABEB9B9, 0xBCBBBEBC, 0xBFBABBBE,
+ 0xBBBFBABB, 0xBABABEB9, 0xBFBABBBF, 0xBBBFBABB,
+ 0xB7B8BCB7, 0x3F3DB8BC, 0x0000003E, 0x00000000,
+ 0x01000000, 0x00000000, 0x41000004, 0x35443837,
+ 0x291F363A, 0x86422D53, 0x66A37056, 0x8567A287,
+ 0x496D5381, 0x26453823, 0x36274236, 0x4220122A,
+ 0x213D382A, 0x3A254B30, 0xA56C4F86, 0x65A58566,
+ 0x77588F87, 0x3B3A284D, 0x2B462D1F, 0x3425403A,
+ 0x06060808, 0xB3B10508, 0xB0B4AFB0, 0xB6B7BBB6,
+ 0xBCB5B5BB, 0xB5BCB5B5, 0xB6B5BCB5, 0xBAB5B5BD,
+ 0xB2B8B3B4, 0xB1B1B8B1, 0xB4AFB1B8, 0xB1B5B0B0,
+ 0xB0AEB4AF, 0xB6AFAEB5, 0xAFB6AFAF, 0xB0B0B7B2,
+ 0xB5B0AEB5, 0xB0B7B2AE, 0xB6B3BAB7, 0xBAB7B2B9,
+ 0xB2B9B6B3, 0xB4B5B9B4, 0xB7B5B5B9, 0xB0B3B1B4,
+ 0xB2B4B8B3, 0xB7B2B3B7, 0xB3B7B2B3, 0xAFB0B4AF,
+ 0xB9B4AEB4, 0xB3B9B4B3, 0xB2B3B7B2, 0xBCB7B3B7,
+ 0xB8BCB7B8, 0xB9B9BFBA, 0xBFBAB8BE, 0xB7BDB8B9,
+ 0xB6BAC0BB, 0xBBB6B7BB, 0xBCC0BBB7, 0xBFC0C4BF,
+ 0xBEB9C0C4, 0xBBBFBABA, 0xB6B4BAB5, 0xBBB6B5BB,
+ 0xB5BBB6B5, 0xB7B8BCB6, 0xBBB7B9BD, 0xB8B9B5BA,
+ 0xB7B8BCB7, 0xBCB8B8BC, 0xBDBEBABB, 0xB8BDBFB9,
+ 0xBFB9BCBE, 0xBABCB6BD, 0xBAB8BCB6, 0xBDB6BAC1,
+ 0xBAC1BAB6, 0xB5C0C4BE, 0xB1ABB9BB, 0xAFB1ABB1,
+ 0xACACB3AC, 0xB4AFABB3, 0xABB3ACAD, 0xA8ACB1A8,
+ 0xB4A9ADB3, 0xAAAFA6B0, 0xA8A8B0A6, 0xB0A9A7AF,
+ 0xA9B1A7A8, 0xA1A6AEA4, 0xADA3A6AC, 0xA5ADA3A5,
+ 0xA4A6ACA1, 0xADA2A9AF, 0xA8ACA1A9, 0x9FA5A99E,
+ 0xAEA2A6AA, 0xA7AB9FAA, 0x9DA8ACA0, 0xA79BA5A9,
+ 0xA6ADA0A3, 0x9DA1A79C, 0xA89DA2A8, 0xA1A79CA2,
+ 0x9A9EA499, 0xA79C9FA5, 0x9CA4999F, 0x989AA194,
+ 0xA3969EA5, 0x949B8E9C, 0x989EA297, 0xA299A0A1,
+ 0x979A91A1, 0x91929A90, 0xA49A929B, 0x929A8F9B,
+ 0x979EA39A, 0xA2999DA0, 0x9A9F969D, 0x959EA69B,
+ 0xA09598A0, 0x9A9F969A, 0x6BA0A49F, 0x00006A6D,
+ 0x00000000, 0x00010101, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x01010100, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x02000002, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x02000001,
+ 0x2E302A00, 0x72787872, 0x79707878, 0x78797078,
+ 0x757F7D75, 0x7C737F7D, 0x7B7C737B, 0x757A7D74,
+ 0x7E757B7E, 0x7B7E757B, 0x76808178, 0x7E757E7F,
+ 0x7D7E757D, 0x79808178, 0x82798182, 0x7F807781,
+ 0x75808177, 0x7B727E7F, 0x7B7C737A, 0x787A7C76,
+ 0x7D777C7E, 0x7B7D777B, 0x797A7B72, 0x7E758182,
+ 0x7B7C737D, 0x777B7E75, 0x7D747D80, 0x7E81787A,
+ 0x737B8077, 0x7E74777C, 0x767E7476, 0x72787D74,
+ 0x7B72767B, 0x787D7476, 0x72797C73, 0x7B72767B,
+ 0x767B7276, 0x71797C73, 0x7D74777A, 0x787B727A,
+ 0x72797C73, 0x7F76787B, 0x7D7E757E, 0x767B7C73,
+ 0x7E757E7F, 0x7A7D747D, 0x97868783, 0x746E989C,
+ 0x60605A74, 0x41666960, 0x04004547, 0x00040000,
+ 0x3C000100, 0x605A3F40, 0x60605A60, 0x8C8C8D84,
+ 0x847A9295, 0x83847A83, 0x767E7F76, 0x81797E7F,
+ 0x807E7683, 0x787F8077, 0x81788081, 0x80817880,
+ 0x78817F77, 0x83798280, 0x82837982, 0x79808479,
+ 0x80778084, 0x7E837A7B, 0x777D8176, 0x7D737E82,
+ 0x7E7F757C, 0x737E8277, 0x7D74797C, 0x747B7478,
+ 0x71777F75, 0x7B72737B, 0x787B7278, 0x757D7E75,
+ 0x7C737D7E, 0x7879707B, 0x74767970, 0x80777A7D,
+ 0x787D747B, 0x74767B72, 0x7B72787D, 0x7B7E7578,
+ 0x75787D74, 0x8279797E, 0x72776E7F, 0x74767B72,
+ 0x7B72767E, 0x7B7E7576, 0x73808178, 0x746B7B7C,
+ 0x74786D71, 0x68727468, 0x74687074, 0x70746870,
+ 0x68707167, 0x706A7071, 0x494A4670, 0x00000100,
+ 0x00010000, 0x00000100, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000301, 0x04000004,
+ 0x31352F00, 0x9899A099, 0xA099979F, 0x9AA29898,
+ 0x909BA196, 0x9C90989C, 0x989C909A, 0x97969D90,
+ 0xA7989DA4, 0x9DA495A0, 0x9A9FA397, 0xA69AA2A6,
+ 0xA0A498A2, 0x99A0A498, 0xA697A1A5, 0xA2A798A1,
+ 0x97A3A79B, 0xA3979FA3, 0xA8ACA09F, 0x9CA6AB9C,
+ 0xA99AA6AB, 0xA3A899A4, 0x98A2A798, 0xA798A2A7,
+ 0xA2A798A2, 0xA0A6ADA0, 0xAA9DA6AD, 0xA3AA9DA3,
+ 0x9EA5A99D, 0xAA9EA6AA, 0xAAAEA2A6, 0x9DA5ABA0,
+ 0xA89DA0A8, 0xA4ACA2A0, 0xA5A8B0A6, 0xADA2A7AF,
+ 0xA6ACA1A7, 0xA5A8ACA0, 0xB2A5ADB1, 0xABB2A5AB,
+ 0xA4A7AFA4, 0xB1A7A6AE, 0xA7AFA5A9, 0xA8AAB2A8,
+ 0xB2A8AAB2, 0xA9B1A7AA, 0xABAAB1AA, 0xAFA8ABB2,
+ 0xA8B0A9A7, 0xB0B0B7B0, 0xB6B0B0B7, 0xA7AEA7B2,
+ 0xB8B7BDB8, 0xBDB8B6BD, 0xB7BDB8B7, 0xB8BABEB9,
+ 0xBBB9B9BD, 0xBDC0BEB8, 0xBBBABFBD, 0xC0BFB7BE,
+ 0xBAC0BFBA, 0xB9B7BEBB, 0xBCBAB5BC, 0xB8BDBBB7,
+ 0xBCB6BBB9, 0xBFBDBBBE, 0xBFC0BEBC, 0xBDBCBFBD,
+ 0xBBB9BCBF, 0xB9BEBCB6, 0xB5BDC1BC, 0xB8B6B4BA,
+ 0xB4BAB9B3, 0xBDB9C0BD, 0xBEBCB9C0, 0xBABFBDB9,
+ 0xBEB8BDBC, 0xBFBEBABF, 0xB9BEBDBA, 0xBCBCBFBD,
+ 0xBEB9BBBE, 0xBCC0BBBA, 0xBCBBBEBC, 0xBFBABBBE,
+ 0xBCC0BBBB, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xB7B8BCB6, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x42000004, 0x35443636,
+ 0x291F363A, 0x87422D53, 0x66A37055, 0x8766A387,
+ 0x476C5280, 0x26433A24, 0x36284038, 0x4420122A,
+ 0x203F3829, 0x38254C30, 0xA66C4F86, 0x65A68667,
+ 0x77579087, 0x3B422D53, 0x2B462E1F, 0x3625403C,
+ 0x06080808, 0xB3B10708, 0xB0B4AFB2, 0xB6B7BBB6,
+ 0xBBB5B7BB, 0xB5BCB5B7, 0xB6B5BBB6, 0xBBB6B5BB,
+ 0xB3B9B4B5, 0xAFB0B8B1, 0xB9B2B1B9, 0xB0B7B0B2,
+ 0xB0B0B7B0, 0xB4AFB0B7, 0xADB3AEAE, 0xAFAEB5B0,
+ 0xB4AFADB4, 0xAFB6B1AD, 0xB4AEB7B4, 0xB7B4AEB7,
+ 0xB0B7B4B0, 0xB2B5B9B4, 0xB6B4B3B7, 0xAFB2B0B3,
+ 0xB0B0B4AF, 0xB5B1B1B5, 0xB5B9B4B4, 0xAFB5B9B4,
+ 0xB6B1B0B4, 0xB0B6B1B0, 0xB4B3B7B2, 0xB7B2B5B9,
+ 0xB3B7B2B3, 0xB6B6BCB7, 0xBEB9B5BB, 0xBBBFBABA,
+ 0xB6BDC1BC, 0xB7B1B7BB, 0xBEC0BAB5, 0xBABABEB9,
+ 0xBFB9BBBF, 0xB5B9B3BB, 0xB5B7BBB5, 0xBAB5B7BB,
+ 0xB6BCB7B4, 0xB6B7BBB5, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB8BABCB6, 0xBEB8BCBE, 0xBDBFB9BC, 0xBABDBEBA,
+ 0xBDB9BDBE, 0xB8BCB7BC, 0xB7BAC0BB, 0xBCB7B6BC,
+ 0xBBC1BCB6, 0xBEC1C5BF, 0xB1ABC2C4, 0xA6A8A2B1,
+ 0xACACB3AC, 0xB4ADA9B4, 0xA9B1AAAC, 0xA6AAAFA6,
+ 0xAFA6AAAF, 0xA8ADA4AA, 0xA7A6AEA4, 0xAFA5A9B1,
+ 0xA7AFA5A7, 0xA2A6AEA4, 0xB0A6A4AC, 0xA5ADA3A8,
+ 0xA5A4ACA1, 0xADA2A8B0, 0xA8ACA1A7, 0xA2A6AA9F,
+ 0xADA3ACAE, 0xA8A99FAC, 0xA0AAACA0, 0xA79BA8AC,
+ 0xA3AA9DA3, 0x9DA2A89D, 0xABA0A0A8, 0x9FA79CA3,
+ 0x9A9DA398, 0xA4999FA5, 0x9BA3989C, 0x989BA295,
+ 0xA2959EA5, 0x989E939B, 0x989EA198, 0xA198A0A1,
+ 0x8D9087A0, 0x98828A7F, 0xA4989AA4, 0x939B909A,
+ 0x999CA198, 0x9F969FA2, 0x98A0969A, 0x959FA59A,
+ 0x9C919AA0, 0x9FA49B96, 0x9F9FA39D, 0x6D6BA0A4,
+ 0x0001006A, 0x00000000, 0x01010000, 0x01010101,
+ 0x00000000, 0x01010000, 0x00000001, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x4C020000, 0x78725150, 0x78797078,
+ 0x757B7C73, 0x7D777D7E, 0x80807A7D, 0x7A7E807A,
+ 0x7D777E80, 0x7B7D777B, 0x78808178, 0x81788081,
+ 0x7D7E7580, 0x77808178, 0x81787F80, 0x80817880,
+ 0x737D7E75, 0x7D747B7C, 0x7D7E757C, 0x787D7F79,
+ 0x7F797C7E, 0x7E807A7D, 0x727D7E75, 0x7E747A7B,
+ 0x7D7E747D, 0x757B7E75, 0x81787B7E, 0x7B7E757E,
+ 0x72787D74, 0x7D74747C, 0x777C7378, 0x70777A71,
+ 0x79707679, 0x76797076, 0x73797A71, 0x7970797C,
+ 0x7A7D7476, 0x74787B72, 0x78727A7D, 0x787A7474,
+ 0x747A7D74, 0x7B737C7D, 0x7E7C747D, 0x7577786F,
+ 0x7C737D7E, 0x7F82797B, 0x97868783, 0x746E989C,
+ 0x60605A74, 0x41666862, 0x03004547, 0x01020002,
+ 0x3C000100, 0x605A3F40, 0x60605A60, 0x848C8D84,
+ 0x847A8C8D, 0x85847A85, 0x757E7F75, 0x7E767E7F,
+ 0x7F7D7580, 0x797F8076, 0x7F778283, 0x82807881,
+ 0x7783847A, 0x81788081, 0x81827980, 0x787E8178,
+ 0x7F767E81, 0x7C7F767C, 0x737D8176, 0x7D747A7E,
+ 0x7D7E757C, 0x72808178, 0x7D74787B, 0x7C81787A,
+ 0x73767E74, 0x7B72757D, 0x76797078, 0x737B7C73,
+ 0x7C737B7C, 0x7B7C737B, 0x74767970, 0x7D747A7D,
+ 0x787D7478, 0x7273786F, 0x7B72767B, 0x767B7276,
+ 0x74797E75, 0x8178787D, 0x787D747E, 0x77787D74,
+ 0x7C76777E, 0x797B7578, 0x6E7B7C73, 0x776D7677,
+ 0x76776D76, 0x68707468, 0x73687074, 0x70736A6F,
+ 0x476E706A, 0x01004A4B, 0x00010000, 0x00000000,
+ 0x00020000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000002, 0x00000200, 0x67610004,
+ 0x94999065, 0x999AA298, 0xA09998A0, 0x99A09998,
+ 0x8F969D90, 0x9D8E999E, 0x989D8E98, 0x979CA094,
+ 0xA7989FA3, 0xA0A798A0, 0x989BA295, 0xA5999FA3,
+ 0xA2A69AA1, 0x959EA596, 0xA4989DA4, 0xA4A69AA0,
+ 0x97A4A89C, 0xA89B9FA3, 0xA2A99CA1, 0x9A9FA697,
+ 0xAA9BA2A9, 0xA4AB9CA3, 0xA0A5AC9D, 0xAFA0A8AF,
+ 0xA5AC9DA8, 0xA0A7AB9F, 0xACA0A8AC, 0xA8ACA0A8,
+ 0xA2ABAFA3, 0xAEA2AAAE, 0xA9AFA4AA, 0x9BA2AAA0,
+ 0xA59B9DA5, 0xA6ABA29D, 0xA2A6ABA2, 0xACA1A7AD,
+ 0xA6ACA1A6, 0xA5AEB2A6, 0xB0A1ADB1, 0xA8AFA2AB,
+ 0xA7A9B1A6, 0xB0A9A9B1, 0xA9B0A9A9, 0xA7ABB3A9,
+ 0xB1A7A8B1, 0xA8B1A7A8, 0xADABB2AB, 0xB5AEADB4,
+ 0xACB3ACAE, 0xB0A7AEA7, 0xC0B9B0B7, 0xB9C0B9B9,
+ 0xB8B6BCB7, 0xBDB8B7BD, 0xB7BDB8B7, 0xB7BBBFBA,
+ 0xBDBBB8BC, 0xBCBFBDBA, 0xBDBABFBD, 0xBFBEBABF,
+ 0xB9BEBDBA, 0xBDB5BAB8, 0xBFBDBABF, 0xB6BBB9BA,
+ 0xBDBABDBB, 0xBFBDBCBF, 0xBCBFBDBC, 0xB9BCC0BB,
+ 0xBDBBBABE, 0xBBBEBCBA, 0xB6BCC0BB, 0xBBB9B5BB,
+ 0xB5BBBAB6, 0xBEB9BFBE, 0xC0BFB9BF, 0xB9BFBEBA,
+ 0xBDB8BFBC, 0xBFBEB9C0, 0xB8BDBCBA, 0xBBBCBFBD,
+ 0xBCB7BABD, 0xBABEB9B8, 0xBABCC0BB, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000013E, 0x00020001,
+ 0x00000200, 0x00000100, 0x41000004, 0x35443637,
+ 0x291F363A, 0x87402E53, 0x66A37055, 0x8866A388,
+ 0x476F5381, 0x27423A24, 0x3828403A, 0x4420122A,
+ 0x203F3829, 0x38254C30, 0xA56C4F86, 0x65A68566,
+ 0x75589087, 0x3B422D54, 0x2C472E1F, 0x2F1E393D,
+ 0x07080808, 0xB3B10809, 0xB0B4AFB2, 0xB6B7BBB6,
+ 0xBBB5B7BB, 0xB7BBB5B7, 0xB5B3B9B4, 0xBBB6B4BA,
+ 0xB3BAB3B5, 0xB0B0B8B1, 0xB7B0AFB7, 0xAFB6AFB0,
+ 0xAFAFB6AF, 0xB4AFAEB4, 0xAFB5B0AE, 0xB0AFB5B0,
+ 0xB3AEAFB5, 0xAEB5B2AD, 0xB3ADB4B1, 0xB7B4AFB6,
+ 0xB0B7B4B0, 0xB4B3B9B4, 0xB8B6B5B9, 0xB3B6B4B5,
+ 0xB4AFB3AE, 0xB8B4B5B9, 0xB5B9B4B7, 0xB3B6BAB5,
+ 0xB9B4B4B8, 0xB3B9B4B3, 0xB4B5B9B4, 0xB8B3B5B9,
+ 0xB5B9B4B4, 0xB7B0B6B1, 0xBBB6B6BC, 0xB7BBB6B7,
+ 0xB6B7BBB6, 0xBAB6B7BB, 0xBABBB7B9, 0xB4B5B9B4,
+ 0xB9B4B5B9, 0xB5B9B3B5, 0xB5B7BBB5, 0xBBB6B7BB,
+ 0xB8BEB9B5, 0xB5B9BDB7, 0xBBB6B7BB, 0xB7BBB6B7,
+ 0xBABBBFB9, 0xBEB8BCC0, 0xBBBFB9BC, 0xB7B9BDB8,
+ 0xBFBAB8BC, 0xBBBFBABB, 0xB6B8BCB7, 0xC1BCB7BB,
+ 0xBCC0BABD, 0xBEC0C4BE, 0xA8A2C2C4, 0xA4A8A2A6,
+ 0xACABB3AC, 0xB0A9ABB3, 0xACB3ACA8, 0xA4ACB1A8,
+ 0xB1A8A9AF, 0xABB0A7AC, 0xA3A9B1A7, 0xB1A7A5AD,
+ 0xA9B1A7A9, 0xA7A9B1A7, 0xB1A7A9B1, 0xA7AFA5A9,
+ 0xA3A4ACA1, 0xAEA5A6AE, 0xA8AEA3A9, 0xA2A6AA9F,
+ 0xADA3AAAE, 0xAAAEA3AC, 0xA0A7A99D, 0xACA0A8AC,
+ 0xA3AA9DA8, 0x9DA0A69B, 0xAA9FA0A8, 0xA1A99EA2,
+ 0x999FA699, 0xA79C9FA6, 0x9EA499A1, 0x999BA196,
+ 0xA1969EA4, 0x989E9399, 0x979EA198, 0xA197A0A1,
+ 0x989C91A0, 0x979BA398, 0xA59899A3, 0x939B909B,
+ 0x9A9A9F96, 0x9F959CA0, 0x969E9497, 0x959A9F96,
+ 0x9C919AA0, 0x9BA09796, 0x9FA0A49E, 0xA39EA1A5,
+ 0x6A6D6B9F, 0x00282927, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00030100, 0x29230200, 0x51514B29,
+ 0x7A7B7B75, 0x7D778080, 0x80807A7D, 0x7A7D7F79,
+ 0x7F797E80, 0x7E807A7D, 0x737D7E75, 0x7B727B7C,
+ 0x7B7C737A, 0x787D7E75, 0x81788081, 0x80817880,
+ 0x757C7D74, 0x7D747D7E, 0x7D7E757C, 0x7A7B7D77,
+ 0x7F797E80, 0x7D7F797D, 0x707D7E75, 0x7E747879,
+ 0x797D727D, 0x7474776E, 0x7C737A7D, 0x787D7479,
+ 0x72787D74, 0x7B72747C, 0x797E7576, 0x74767B72,
+ 0x79707A7D, 0x76797076, 0x72797C73, 0x7B72787B,
+ 0x787B7278, 0x72767970, 0x7A74787B, 0x7A7D7478,
+ 0x737D7E75, 0x7D757B7C, 0x8280787F, 0x757E7F76,
+ 0x82797D7E, 0x7B7E7581, 0x97868882, 0x746E989C,
+ 0x61615B74, 0x41666862, 0x03004547, 0x02030002,
+ 0x3B000100, 0x5F593E3F, 0x63605B5F, 0x8483847B,
+ 0x83798C8D, 0x86857B84, 0x78828379, 0x82788182,
+ 0x84837983, 0x77828177, 0x7F778081, 0x817F7781,
+ 0x76808177, 0x80777F80, 0x8081787F, 0x78808178,
+ 0x7E757E81, 0x7C7F767B, 0x717C7F76, 0x8178787C,
+ 0x81827980, 0x747B7C73, 0x7D747C7D, 0x787B727A,
+ 0x747A7F76, 0x7D74787D, 0x787B727A, 0x737D7E75,
+ 0x79707B7C, 0x7B7C7378, 0x727B7E75, 0x7C73787B,
+ 0x767B7277, 0x72767B72, 0x7B72767B, 0x797E7576,
+ 0x6F787D74, 0x7E737378, 0x797D727A, 0x75797D77,
+ 0x7C76757C, 0x787C7678, 0x7374776E, 0x736A7B7C,
+ 0x72736972, 0x69707469, 0x736A7074, 0x53554F70,
+ 0x00242523, 0x01010001, 0x00000001, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x01020000, 0x00000100,
+ 0x02000001, 0x00010001, 0x92000400, 0x9A919498,
+ 0x949A8F97, 0x9799A196, 0xA09999A1, 0x99A19799,
+ 0x8E989C90, 0x9C8D989D, 0x9BA09197, 0x949EA094,
+ 0xA7989CA0, 0xA1A899A0, 0x979FA699, 0xA3979DA4,
+ 0xA1A599A1, 0x9AA1A89B, 0xA498A0A7, 0xA4A69AA0,
+ 0x9CA3A79B, 0xA99CA4A8, 0xA1A89BA2, 0x9AA2A99A,
+ 0xA99AA2A9, 0xA0A798A2, 0x9DA0A798, 0xAC9DA5AC,
+ 0xA2A99AA5, 0x9DA9ADA1, 0xA79BA5A9, 0xA3A79BA3,
+ 0x9AA2A69A, 0xA599A2A6, 0xA4AA9FA1, 0x9C9DA59B,
+ 0xA9A09EA6, 0xA6ABA2A4, 0xA6A7ADA2, 0xB1A6ABB1,
+ 0xA6ADA0AB, 0xA5ABAFA3, 0xB2A3ADB1, 0xADB1A5AD,
+ 0xA2ABB1A6, 0xAEA7A4AC, 0xA9B0A9A7, 0xA7A9B1A7,
+ 0xB1A7A8B1, 0xA8B1A7A8, 0xACADB4AD, 0xB5AEACB3,
+ 0xAAB1AAAE, 0xBAB0B7B0, 0xC0B9BAC1, 0xB8BFB8B9,
+ 0xB7B7BDB8, 0xBCB7B6BC, 0xB8BEB9B6, 0xB6BABEB9,
+ 0xBEBCB7BB, 0xBCBFBDBB, 0xB9B8BDBB, 0xBBBAB6BB,
+ 0xB6BBBAB6, 0xBABABFBD, 0xBCBAB7BC, 0xB8BDBBB7,
+ 0xBCBCBFBD, 0xBFBDBBBE, 0xBCBFBDBC, 0xBABABEB9,
+ 0xBEB9BBBF, 0xBBBFBABA, 0xB8B9BDB8, 0xB8B7B5BA,
+ 0xB1B7B6B2, 0xBBB7BDBC, 0xBCBBB6BC, 0xB6BCBBB6,
+ 0xBBB7BEBB, 0xBFBEB7BE, 0xBABFBDBA, 0xBBBCBFBD,
+ 0xBEB9BABD, 0xBABEB9BA, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xB9B8BCB7, 0x3E3EB8BB, 0x0000013E, 0x01020001,
+ 0x00000200, 0x00000100, 0x41000004, 0x35443837,
+ 0x291F363A, 0x87402E53, 0x66A37055, 0x8866A388,
+ 0x476F5381, 0x27423A24, 0x3828403A, 0x4520122A,
+ 0x203F392A, 0x38254C30, 0xA36D5087, 0x65A58766,
+ 0x76599187, 0x3B412C53, 0x2B472E1F, 0x2E1F3A3A,
+ 0x07080808, 0xB3B10809, 0xB0B4AFB0, 0xB5B4BBB4,
+ 0xBCB5B5BC, 0xB5BCB5B5, 0xB6B5BCB5, 0xBCB5B6BD,
+ 0xB3BAB3B5, 0xB2B1B8B1, 0xB7B2B1B7, 0xB0B6B1B3,
+ 0xB3B0B6B1, 0xB4B2B0B5, 0xB0B3B1AF, 0xB1AFB2B0,
+ 0xB3B1B0B3, 0xB0B3B1B0, 0xB1B0B5B3, 0xB9B6AFB6,
+ 0xB1B8B5B2, 0xB4B3B9B4, 0xB8B6B3B9, 0xB3B6B4B5,
+ 0xB4B3B7B2, 0xB9B4B5B9, 0xB5B9B4B5, 0xB9B5B8B6,
+ 0xB8B6B6BB, 0xB3B8B6B3, 0xB4B5B9B4, 0xB9B4B5B9,
+ 0xB5B9B4B5, 0xB1B3B9B4, 0xB9B4B0B6, 0xB8BCB7B5,
+ 0xB8B5BAB8, 0xBAB8B5BA, 0xB7BAB8B5, 0xB8B6BBB9,
+ 0xBBB9B5BA, 0xB6BCB7B6, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xB7B6BCB7, 0xBDB8B6BC, 0xB8BEB9B7,
+ 0xB7B6BDB6, 0xBFB9B7BE, 0xB6BDB6BB, 0xB9B5BDB6,
+ 0xBEB9B8C0, 0xB8BCB7B8, 0xBBB7BBB6, 0xBFB9BEBF,
+ 0xBDBFB9BD, 0xB8BEC0BA, 0xB5ACBEC1, 0xA9B1A7B0,
+ 0xADACB3AC, 0xB5AEADB4, 0xACB4AAAE, 0xA5AEB4A9,
+ 0xB4A9ADB1, 0xAEB4A9B0, 0xA9A9B1A7, 0xB0A9A8B0,
+ 0xA9B1AAA8, 0xA7A8B0A6, 0xB1A7AAB2, 0xAAB2A8A9,
+ 0xA1A6ACA1, 0xADA2A6AC, 0xA6ACA1A7, 0xA0A7ADA2,
+ 0xADA2A5AB, 0xA7ADA2A9, 0x9EA6AA9E, 0xAEA3A4AB,
+ 0xA8AEA3A8, 0x9BA4AB9E, 0xA499A1A8, 0x9DA3989E,
+ 0x97A1A599, 0xA4999FA3, 0x9FA49BA0, 0x9A9BA097,
+ 0xA3999CA4, 0x98A0969B, 0x95999F94, 0x9F939DA1,
+ 0x9B9F939B, 0x9898A095, 0xA3989BA3, 0x949C919B,
+ 0x97999E95, 0xA09999A1, 0x979F9599, 0x999DA299,
+ 0x9F969DA2, 0x9FA2999C, 0x969A9F96, 0xA0999A9F,
+ 0xA0A7A099, 0x32989B99, 0x00003134, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00010000,
+ 0x4E282927, 0x79754F50, 0x787A7478, 0x7980807A,
+ 0x81788182, 0x7F807780, 0x70808178, 0x7A747879,
+ 0x7979737A, 0x737B7C73, 0x7F767B7C, 0x7D7E757E,
+ 0x727E7F76, 0x7C737A7B, 0x7D7E757B, 0x757D7E75,
+ 0x81787D7E, 0x7D7E7580, 0x72777A71, 0x7D74787B,
+ 0x7679707A, 0x74787B72, 0x7D74787D, 0x767B7278,
+ 0x75787D74, 0x7B72797E, 0x787D7476, 0x72767B72,
+ 0x7B72767B, 0x767B7276, 0x72767B72, 0x7A71767B,
+ 0x767B7275, 0x73797C73, 0x7C73797C, 0x7D7E7579,
+ 0x737E7F76, 0x7D747C7D, 0x8081787C, 0x76818279,
+ 0x7F757E7F, 0x7A7D747E, 0x97858781, 0x736F989C,
+ 0x5F5E5A74, 0x40656460, 0x03004344, 0x00040002,
+ 0x3C000100, 0x605A3F40, 0x5F605760, 0x907D7E75,
+ 0x7E759899, 0x7D7E757D, 0x7A848379, 0x81778584,
+ 0x80807483, 0x757D7D71, 0x81778181, 0x81807682,
+ 0x79838179, 0x7F758381, 0x81827880, 0x76808177,
+ 0x82797E7F, 0x7E7F7681, 0x747E8178, 0x7E757A7D,
+ 0x7E81787B, 0x72797D72, 0x786F797D, 0x797C7377,
+ 0x75787B72, 0x7F767B7E, 0x787B727C, 0x737B7C73,
+ 0x7C737B7C, 0x77786F7B, 0x727A7D74, 0x7B72787B,
+ 0x767B7276, 0x74787D74, 0x7970787D, 0x767B7274,
+ 0x6E797C73, 0x73697477, 0x70746972, 0x78787C76,
+ 0x7C77797D, 0x787C7676, 0x70767970, 0x79707879,
+ 0x797A7178, 0x4C787B72, 0x29255052, 0x0200002A,
+ 0x00020000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00020301,
+ 0x03000102, 0x32363102, 0x9E7E827C, 0x9A8FA0A4,
+ 0x959C8F94, 0x90979E91, 0x998E969D, 0x969A8F95,
+ 0x91999D92, 0x9E8F999D, 0x989F9097, 0x949CA094,
+ 0xA4979CA0, 0x9FA6979D, 0x99A0A79A, 0xA3979FA6,
+ 0x9EA296A1, 0x989DA497, 0xA4989EA5, 0xA5A79BA0,
+ 0x9DA4A89C, 0xA79BA5A9, 0xA5A99DA3, 0x9EA5AA9B,
+ 0xAA9BA8AD, 0xA7AC9DA5, 0x9EA6AC9B, 0xAE9DA9AF,
+ 0xAAAFA0A8, 0x9DA7AB9F, 0xA79BA5A9, 0xA3A79BA3,
+ 0x98A5A99D, 0xA498A0A4, 0xA5A99DA0, 0xA1A6ACA1,
+ 0xAFA4A6AC, 0xAEB4A9A9, 0xA6ADB1A6, 0xB1A5ADB1,
+ 0xA8ACA0AD, 0xA3AAACA0, 0xB1A5AFB2, 0xACB0A4AD,
+ 0xA3ADB3A8, 0xAFA6A7AC, 0xAEB3AAAA, 0xADABB2AB,
+ 0xB2ABADB4, 0xAEB5AEAB, 0xADADB5AE, 0xAFA8ACB4,
+ 0xAEB5AEA8, 0xB8B7BFB8, 0xBCB7B7BF, 0xB7BDB8B6,
+ 0xB9B8BEB9, 0xBEB9B8BE, 0xB8BEB9B8, 0xB8BABEB9,
+ 0xBEB9B9BD, 0xBABEB9BA, 0xB9B8BBB9, 0xBDBBB8BB,
+ 0xB9BEBCBA, 0xBBB9BEBC, 0xBFBDB7BE, 0xBABFBDBA,
+ 0xBEBABFBD, 0xBFBDBBC0, 0xBCBFBDBC, 0xB8BBBCB8,
+ 0xC0BABBBC, 0xBDBFB9BE, 0xBABCC2BD, 0xB8B7B6BD,
+ 0xB2B7B8B2, 0xBEB8BEBD, 0xBCBBBABF, 0xB7BDBCB6,
+ 0xB9B7BEBB, 0xBDBBB5BC, 0xBABFBDB8, 0xBABBBEBC,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBAB8BBB9, 0xBDBBB9BC,
+ 0xBBBEBCBA, 0xBABBBFBA, 0xBEBCBBBF, 0xBBBEBCBB,
+ 0xB7BABBB7, 0x3F3DBABB, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x41000003, 0x36453D38,
+ 0x2C1F373D, 0x87402D54, 0x66A37055, 0x8866A387,
+ 0x476F5381, 0x26433A24, 0x38284038, 0x4620132B,
+ 0x233F392C, 0x3B294E31, 0xA36C5085, 0x65A58866,
+ 0x78599088, 0x3A402E53, 0x2B472C1E, 0x32244039,
+ 0x07080808, 0xB4AF0809, 0xAEB4AFB0, 0xB6B4BBB4,
+ 0xBCB5B5BD, 0xB5BCB5B5, 0xB5B4BBB4, 0xBCB5B5BC,
+ 0xB6BDB6B5, 0xB4B3B9B4, 0xB9B4B3B9, 0xB1B7B2B5,
+ 0xB5B2B7B5, 0xB4B2B1B8, 0xB2B5B3AF, 0xB3B4B7B5,
+ 0xB4B4B2B5, 0xB2B5B3B2, 0xB4B4B7B5, 0xB6B3B1B6,
+ 0xB1B8B5AF, 0xB4B4BAB5, 0xB9B4B5B9, 0xB0B4AFB5,
+ 0xB4B3B7B2, 0xB9B4B5B9, 0xB5B9B4B5, 0xAEB2B7B5,
+ 0xB8B6ABB0, 0xB3B8B6B3, 0xB4B5B9B4, 0xB9B4B5B9,
+ 0xB5B9B4B5, 0xB4B3B9B4, 0xB9B4B3B9, 0xB5B9B4B5,
+ 0xB9B5BAB8, 0xBAB8B6BB, 0xB4B9B7B5, 0xB8B5BAB8,
+ 0xBBB9B5BA, 0xB6BBB9B6, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB7BBB6B8, 0xB8B6BCB7, 0xBDB8B7BD, 0xB7BDB8B7,
+ 0xB5B8BEB9, 0xBCB7B5BC, 0xB7BEB7B6, 0xB9B8C0B9,
+ 0xBFBAB8C0, 0xB8BCB7B9, 0xBAB9BDB8, 0xBEB8BDBE,
+ 0xBDBDB7BE, 0xB7BABBB2, 0xC1B8BDC0, 0xB4BCB2BC,
+ 0xADAEB5AE, 0xB4ADADB4, 0xA9B1A7AD, 0xA5AFB6A9,
+ 0xB3A7ADB1, 0xAFB5AAAF, 0xA9A9B1A7, 0xB1ABA8B0,
+ 0xA2AAA3A7, 0xA4A5ADA3, 0xAFA5A7AF, 0xA5ADA3A7,
+ 0xA4A5ADA2, 0xADA2A9AF, 0xA6ACA1A7, 0xA1A9AFA4,
+ 0xABA0A6AC, 0xA6ACA1A5, 0x9EA9B0A3, 0xAB9EA4AB,
+ 0xA4AB9EA4, 0xA0A8ACA0, 0xA499A8AC, 0xA3A79CA0,
+ 0x9B9FA397, 0xA39AA2A6, 0x9FA49BA0, 0x979A9F96,
+ 0xA29B99A1, 0x9DA2999B, 0x98999F94, 0xA5969EA5,
+ 0x9DA195A0, 0x98979F94, 0xA1969BA3, 0x979F949B,
+ 0x97949C92, 0xA09999A1, 0x969D9699, 0x999A9F96,
+ 0x9F999DA2, 0x9FA2999D, 0x959AA095, 0xA59B9AA0,
+ 0x989F989D, 0x99989C97, 0x3533989B, 0x00000034,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x01010101, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00010000,
+ 0x00000000, 0x29270000, 0x50514D28, 0x787E807A,
+ 0x81788081, 0x80817880, 0x79808178, 0x807A8182,
+ 0x79797380, 0x757D7E75, 0x7C737D7E, 0x7B7C737B,
+ 0x73808178, 0x7C737B7C, 0x8182797B, 0x737D7E75,
+ 0x7E757B7C, 0x7C7D747D, 0x72797C73, 0x7C73787B,
+ 0x787B7279, 0x74777C73, 0x7B72787D, 0x767B7276,
+ 0x74757A71, 0x8178787D, 0x767B727C, 0x72747C72,
+ 0x7C72747C, 0x71796F74, 0x72767E74, 0x7B72767B,
+ 0x787D7476, 0x75797C73, 0x7D747B7E, 0x7D7E757C,
+ 0x76797A70, 0x7D747F80, 0x7C7D747C, 0x757E7F76,
+ 0x81777D7E, 0x7A7D7480, 0x97868882, 0x736F989C,
+ 0x605F5B72, 0x40656460, 0x03004544, 0x00040002,
+ 0x3A000100, 0x605A3E40, 0x61625960, 0x90707168,
+ 0x7E759899, 0x7D7E757D, 0x7A85847A, 0x80758686,
+ 0x82807582, 0x79818175, 0x80768585, 0x81807681,
+ 0x76838179, 0x7D75807E, 0x7A7B717F, 0x757B7C72,
+ 0x81797E7F, 0x7D7D7783, 0x75808178, 0x7D747B7E,
+ 0x7D80777A, 0x6F7B7F74, 0x7970767A, 0x80817878,
+ 0x767C7F76, 0x80777C7F, 0x787B727D, 0x757B7C73,
+ 0x7E757D7E, 0x7D7E757D, 0x747E8178, 0x8178787D,
+ 0x767B727C, 0x77767B72, 0x80777B80, 0x787D747B,
+ 0x727F8279, 0x766C797D, 0x70736A75, 0x777A7C76,
+ 0x7C77787C, 0x787C7776, 0x71767872, 0x77737777,
+ 0x52514D78, 0x00282925, 0x01000001, 0x02000003,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00010000, 0x00020300,
+ 0x362D0204, 0x969B9231, 0x91969B92, 0x9B90959A,
+ 0x959C8F95, 0x91989C90, 0x9E92999D, 0x969A8E9A,
+ 0x90969A8F, 0x9E92979B, 0x979E8F9A, 0x939CA094,
+ 0xA4989B9F, 0xA0A79AA0, 0x97A0A798, 0xA5999FA6,
+ 0xA1A599A1, 0x99A0A499, 0xA498A0A4, 0x9FA397A0,
+ 0x98A0A498, 0xA79BA0A4, 0xA4A89CA3, 0x97A2A798,
+ 0xA798A1A6, 0xA2A798A2, 0x9AA7AD9C, 0xAC9BA5AB,
+ 0xA8AE9DA6, 0x98A5A99D, 0xA498A0A4, 0xA0A498A0,
+ 0x999FA397, 0xA99DA1A5, 0xACB0A4A5, 0xA6ABB2A5,
+ 0xB2A5ACB3, 0xABB2A5AB, 0xA3ABAFA4, 0xB1A5AAAE,
+ 0xADB1A5AD, 0xA5ADAFA3, 0xB1A5AFB1, 0xAEB2A7AD,
+ 0xA6AEB3AA, 0xAFA6AAAF, 0xAEB3AAAC, 0xA9AEB5AE,
+ 0xB2ABA9B0, 0xAAB1AAAB, 0xA9A8B0A9, 0xB4ADA8B0,
+ 0xB1B8B1AD, 0xB6B7BFB8, 0xBDB8B5BD, 0xB8BEB9B7,
+ 0xB9B8BEB9, 0xBFBAB8BE, 0xB4BAB5B9, 0xB8BABEB9,
+ 0xBCB7B9BD, 0xBBBFBAB8, 0xBFBBBEBC, 0xC1BFBEC1,
+ 0xBCBFBDBE, 0xBDBABFBD, 0xBFBDB9C0, 0xBABFBDBA,
+ 0xBDBBC0BE, 0xBFBDBABF, 0xBABDBBBC, 0xBBB9BCBA,
+ 0xC0BCBEBF, 0xBDC1BCBF, 0xBABBC1BC, 0xB8B7B6BD,
+ 0xB0B8B8B0, 0xBEB8BDBC, 0xBFBEBABF, 0xB9BFBEB9,
+ 0xBBB9C0BD, 0xBCBAB7BE, 0xB8BDBBB7, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBCBABDBB, 0xBFBDBBBE,
+ 0xBCBFBDBC, 0xBABBBFBA, 0xBEBCBBBF, 0xBBBEBCBB,
+ 0xB7BABBB7, 0x3F3DBABB, 0x0001003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x42020004, 0x35453F37,
+ 0x2D1F373F, 0x87422D54, 0x66A37055, 0x8766A387,
+ 0x476F5381, 0x26433A24, 0x36284038, 0x451F122A,
+ 0x233F382E, 0x3B294E31, 0xA36F5186, 0x65A58866,
+ 0x78599088, 0x3A402E53, 0x304F2C1E, 0x3223423F,
+ 0x070A0808, 0xB4AF0809, 0xAEB5AEB0, 0xB6B4BBB4,
+ 0xBCB5B5BD, 0xB7BBB5B5, 0xB5B3BAB3, 0xB9B3B5BC,
+ 0xB5B9B3B5, 0xB5B2B8B3, 0xB7B2B2B7, 0xB1B7B2B3,
+ 0xB7B2B7B5, 0xB5B4B2B8, 0xB0B5B3AF, 0xB0B2B7B5,
+ 0xB5B3AFB5, 0xAEB3B1B0, 0xB3B2B5B3, 0xB3B2B0B5,
+ 0xB2B7B6AD, 0xB2B5B9B4, 0xB9B3B4B8, 0xB0B4AFB5,
+ 0xB5B3B9B4, 0xB9B4B4BA, 0xB5B9B4B5, 0xB6B4B9B7,
+ 0xB8B6B3B8, 0xB3B8B6B3, 0xB4B5B9B4, 0xB9B4B5B9,
+ 0xB5B9B4B5, 0xB4B5B9B4, 0xB9B4B5B9, 0xB5B9B4B5,
+ 0xB8B7BAB8, 0xBAB8B7BA, 0xB7BAB8B7, 0xB9B6BBB9,
+ 0xBBB9B6BB, 0xB5BAB8B6, 0xB6B7BBB6, 0xBBB7B7BB,
+ 0xB8BCB7BA, 0xBAB7BCBA, 0xBBB9B7BC, 0xB8BBB9B8,
+ 0xB8B7BCBA, 0xBDBBB7BD, 0xB7BDB8B8, 0xB9B9C0BB,
+ 0xBCB7B7BE, 0xB8BCB7B6, 0xB6B9BDB8, 0xBCB6B9BA,
+ 0xBFBFB9BC, 0xB9B7BAB1, 0xC1B8BFC2, 0xBCC1B8BE,
+ 0xAEB1B8B1, 0xB3ACADB5, 0xA9B1A7AB, 0xAAA8B0A5,
+ 0xB0A5AFB5, 0xA5AAA1AA, 0x9E969D96, 0xB0A99DA5,
+ 0xA8B0A9A8, 0xA7A7AFA5, 0xB1AAA9B1, 0xA6AFA5A9,
+ 0xA4A6B0A4, 0xADA2A7AF, 0xA6ACA1A7, 0xA2A6ACA1,
+ 0xACA0A7AD, 0xA8ACA0A8, 0xA3A9ADA1, 0xA69AABAF,
+ 0xA6AA9EA2, 0xA0A8ACA0, 0xA99DA8AC, 0xA5A99DA5,
+ 0x99A2A89D, 0xA49B9EA4, 0x9FA49BA1, 0x98A0A69B,
+ 0xA49B9BA3, 0x9FA2999F, 0x959A9E93, 0xA4989DA1,
+ 0x9DA195A2, 0x9898A095, 0xA3989AA4, 0x959D929B,
+ 0x97949C92, 0xA09998A1, 0x979E9799, 0x989A9F96,
+ 0xA0979DA3, 0x9EA1989D, 0x959AA095, 0xA59B9AA0,
+ 0x9DA59B9D, 0x99979B95, 0x9B999A9E, 0x32353398,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000001,
+ 0x00000000, 0x00000102, 0x00000000, 0x01010100,
+ 0x00020000, 0x00000200, 0x00010000, 0x2E0B0C08,
+ 0x59533234, 0x7E817857, 0x777E8178, 0x81787E82,
+ 0x797A7180, 0x757B7C73, 0x7B757D7E, 0x7D7D777B,
+ 0x737D7E75, 0x7C737B7C, 0x7B7C737B, 0x757F7D75,
+ 0x7D747F7D, 0x7D7E757C, 0x77777A71, 0x7D747B80,
+ 0x787D7478, 0x74787D74, 0x7D74787D, 0x7C817878,
+ 0x74767E74, 0x7C73787D, 0x73786F77, 0x75747B74,
+ 0x7E77757C, 0x71787177, 0x73757A71, 0x8279797C,
+ 0x787B727F, 0x737D7E75, 0x7C727B7C, 0x7F7E747D,
+ 0x77808177, 0x81788081, 0x7E81787E, 0x76808178,
+ 0x81777E7F, 0x7C807580, 0x97868882, 0x736F989C,
+ 0x605F5B72, 0x40656460, 0x03004544, 0x00030002,
+ 0x3A010200, 0x605A3E40, 0x60615860, 0x916F7067,
+ 0x7D74999A, 0x7D7E757C, 0x75818076, 0x80758280,
+ 0x82817382, 0x74818173, 0x80768080, 0x84857B7F,
+ 0x7988867E, 0x7F768381, 0x7E7F757E, 0x707D7E74,
+ 0x7B72777B, 0x7E7F767A, 0x78808178, 0x7E758081,
+ 0x7B7C737D, 0x75797C73, 0x82797B7E, 0x7C7D7481,
+ 0x7C7F8279, 0x7F768085, 0x777A717C, 0x747B7C73,
+ 0x7C737C7D, 0x7B7C737B, 0x797E8178, 0x81787D82,
+ 0x757D737C, 0x74787D74, 0x7C73787D, 0x7A7D7479,
+ 0x71808177, 0x786F7A7B, 0x73756F77, 0x777B7C78,
+ 0x7C77787C, 0x787C7778, 0x50767775, 0x05055351,
+ 0x08060607, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000000, 0x00010001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00010001, 0x5F020400,
+ 0x9C8F666A, 0x969D9095, 0x90979B90, 0x9B90979B,
+ 0x959B9095, 0x91999D92, 0x9D91999D, 0x999D9199,
+ 0x8F9A9E93, 0x9A8E969A, 0x9A9E9296, 0x949CA094,
+ 0xA3979CA0, 0xA2A69A9F, 0x99A0A79A, 0xA4999FA6,
+ 0xA1A59AA0, 0x9BA3A79B, 0xA89CA3A7, 0xA6AA9EA4,
+ 0x9BA3A79B, 0xA79BA5A7, 0xA3A79BA3, 0x9CA0A798,
+ 0xA798A4AB, 0xA3AA9BA0, 0x9EA6AE9D, 0xAE9DA7AF,
+ 0xA7AD9CA8, 0x9BA3A79B, 0xA69AA3A7, 0xA3A79BA2,
+ 0x9DA5A99D, 0xAFA3A5A9, 0xABAFA3AB, 0xA3ABAFA3,
+ 0xAEA2ABAF, 0xACB0A4AA, 0xA4B0B2A6, 0xB1A5AEB0,
+ 0xADB1A5AD, 0xA3ABAFA3, 0xB1A5ABAF, 0xABAFA4AD,
+ 0xABADB1AB, 0xB2ACADB1, 0xADB1ABB0, 0xADADB4AD,
+ 0xB0A9ACB4, 0xABB2ABA9, 0xAEADB4AD, 0xB8B2AEB5,
+ 0xB7BEB7B4, 0xB8B6BDB8, 0xBFB8B6BD, 0xB8BFB8B8,
+ 0xB9BBBFBA, 0xBBB6BABE, 0xB1B7B2B5, 0xB7B8BCB7,
+ 0xC0BBB8BC, 0xBCC0BBBC, 0xBDBCBFBD, 0xBCBABCBF,
+ 0xBCBFBDB9, 0xBDB9BEBC, 0xC0BDBABF, 0xB9C0BDB9,
+ 0xBDBABFBD, 0xBDBBBABF, 0xBBBEBCBA, 0xBEB9BCBA,
+ 0xBFBEBABF, 0xB6BBBABA, 0xBBB7BDBC, 0xB8B8B6BC,
+ 0xB0B8B8B0, 0xBEBABFBE, 0xBFBEBABF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBEBCB9BF, 0xB8BDBBB9, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBDBCBFBD, 0xBFBDBCBF,
+ 0xBCBFBDBC, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xB7B8BCB7, 0x3F3DB8BC, 0x0000003E, 0x00020000,
+ 0x00000200, 0x00000100, 0x42020004, 0x35453F37,
+ 0x2F1F3740, 0x87422D53, 0x66A37055, 0x8766A387,
+ 0x476F5381, 0x26433A24, 0x36284038, 0x451F122A,
+ 0x233F3A2D, 0x3D284E32, 0xA36F5186, 0x65A58866,
+ 0x76599088, 0x3A3F2E53, 0x31502A1E, 0x32234240,
+ 0x070A0808, 0xB4AF0809, 0xB0B4AEB0, 0xB6B5BCB5,
+ 0xBCB7B6BD, 0xB7BBB5B6, 0xB5B5BCB5, 0xB9B3B5BC,
+ 0xB5B9B4B5, 0xB6B3B9B4, 0xB9B4B3B8, 0xB5B9B4B5,
+ 0xB5B2B7B5, 0xB6B5B2B7, 0xB2B7B5B1, 0xB2B0B5B3,
+ 0xB7B5B1B7, 0xB2B7B5B2, 0xB5B2B5B3, 0xB7B6B2B7,
+ 0xB2B7B6B2, 0xB1B2B6B1, 0xB7B2B3B7, 0xB4B8B3B3,
+ 0xB4B5B9B4, 0xB9B4B5B9, 0xB4B8B3B5, 0xB5B3B8B6,
+ 0xB8B6B2B7, 0xB3B8B6B3, 0xB5B2B8B3, 0xB9B4B4BA,
+ 0xB4B8B3B5, 0xB4B5B9B4, 0xB9B4B5B9, 0xB3B6B4B5,
+ 0xB8B7BAB8, 0xBCBAB7BA, 0xB8BBB9B9, 0xB9B6BBB9,
+ 0xBAB8B6BB, 0xB4B9B7B5, 0xB7B6BAB5, 0xBBB7B8BC,
+ 0xB8BCB7BA, 0xB9B7BCBA, 0xBBB9B6BB, 0xB8BBB9B8,
+ 0xBAB7BCBA, 0xBCBAB7BC, 0xB8BDBBB7, 0xBAB9BFBA,
+ 0xBFBAB9BF, 0xB8BCB7BB, 0xB9B8BCB7, 0xBFB9BABE,
+ 0xBDBFB9BD, 0xB9B8BAB4, 0xC0BABFC2, 0xB8BAB4BE,
+ 0xACACB3AC, 0xB5AEACB3, 0xAEB6ACAE, 0xA5ACB4AA,
+ 0xAAA1A8B0, 0xA0A59CA5, 0xA3969E94, 0xB0A9A2AA,
+ 0xA9B0A9A9, 0xA7A5ADA3, 0xAFA8A9B1, 0xA9B0A9A8,
+ 0xA7A8B1A7, 0xAFA4A9B3, 0xA7ADA2A9, 0xA2A7ADA2,
+ 0xADA1A7AD, 0xA8ACA0A9, 0xA1AAAEA2, 0xAB9FA9AD,
+ 0xA4AB9EA7, 0xA1A8ACA0, 0xA99DA9AD, 0xA1A89BA5,
+ 0x9AA1A79C, 0xA4999FA5, 0x9EA4999E, 0x989DA398,
+ 0xA49B9DA3, 0x9FA398A1, 0x959DA195, 0xA4989DA1,
+ 0x9EA296A2, 0x98969C91, 0xA3989BA3, 0x98A0959B,
+ 0x97979F95, 0xA09799A1, 0x9BA0979B, 0x95969B92,
+ 0x9E959AA0, 0x9DA39899, 0x90999F94, 0xA59A969D,
+ 0x9FA49B9F, 0x95989C96, 0x9C97979B, 0x9A9B9798,
+ 0x002A2B27, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x01010100, 0x01000001, 0x01010000, 0x00000001,
+ 0x00020000, 0x00000200, 0x00000000, 0x07080B09,
+ 0x0B07080C, 0x31332D0A, 0x786A6D64, 0x81787E81,
+ 0x80817880, 0x737A7B72, 0x7B757B7C, 0x7D7D777B,
+ 0x707A7B72, 0x7C737879, 0x7C7D747B, 0x757D7B73,
+ 0x7E757F7D, 0x7D7E757D, 0x78767970, 0x7C767C81,
+ 0x787D7478, 0x72777A71, 0x7B72767B, 0x767B7278,
+ 0x74767B72, 0x7B72787D, 0x7A7D7478, 0x74757973,
+ 0x7D76747B, 0x73777176, 0x78787B72, 0x81787E81,
+ 0x787B727E, 0x757B7C73, 0x7E747D7E, 0x8281777F,
+ 0x747E7F75, 0x81787C7D, 0x80817880, 0x77808178,
+ 0x7F758081, 0x7A7B717E, 0x97868882, 0x736F9A9B,
+ 0x5E5F5B72, 0x40656460, 0x03004544, 0x00030002,
+ 0x3C000200, 0x605A3F40, 0x6061585E, 0x90717269,
+ 0x8C839899, 0x7D7E758B, 0x75818076, 0x7D718181,
+ 0x7D7D6F7D, 0x767D7D71, 0x847A8282, 0x7E7F7683,
+ 0x78838179, 0x7B72807D, 0x8182797A, 0x71787C71,
+ 0x7F76787C, 0x7E7F767E, 0x747E7F76, 0x7E757C7D,
+ 0x7D7E757D, 0x78797C73, 0x81787E81, 0x7B7E7580,
+ 0x7C767B72, 0x7F768085, 0x787B727C, 0x737B7C73,
+ 0x7E757B7C, 0x8081787D, 0x747A7D74, 0x7B72787D,
+ 0x767B7276, 0x777A7F76, 0x7A74797D, 0x787B7278,
+ 0x737B7C73, 0x7B757B7C, 0x797B757B, 0x777A7B77,
+ 0x7D78787C, 0x41424079, 0x05060606, 0x05070705,
+ 0x07040608, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x43444000, 0x91979A91,
+ 0x9E91989C, 0x969D9097, 0x91979B90, 0x9A8F989C,
+ 0x959B9094, 0x91999D92, 0x9F92999D, 0x9A9E9298,
+ 0x8F999D91, 0x9E929899, 0x999D919A, 0x90989C90,
+ 0x9C90989C, 0x9CA0949A, 0x9AA0A79A, 0xA79BA0A7,
+ 0xA3A79BA3, 0x9BA3A79B, 0xAA9DA3A7, 0xA5A99DA3,
+ 0x9DA5A99D, 0xAA9EA7A9, 0xA5A99DA6, 0x9DA7AC9D,
+ 0xAB9CA5AC, 0xA5AD9CA6, 0x9FA8AFA0, 0xAFA0A8B0,
+ 0xA6AB9CAA, 0x9DA3A79B, 0xA99DA5A9, 0xA5A99DA5,
+ 0x9EA3AA9D, 0xAFA4A3A9, 0xABAFA4A9, 0xA3A8ACA0,
+ 0xB1A5ABAF, 0xADB1A5AD, 0xA5AFB1A5, 0xAFA3AFB1,
+ 0xADB1A5AB, 0xA4B0B4A9, 0xAFA4ABAF, 0xA9AFA4AB,
+ 0xADADB1AB, 0xB1ABACB2, 0xB0B4AEAD, 0xABACB3AC,
+ 0xB4ADAAB2, 0xADB4ADAD, 0xACADB4AD, 0xBEB7ACB3,
+ 0xB6BDB6B7, 0xB8B6BCB7, 0xBDB8B7BD, 0xBABEB8B7,
+ 0xB6B9BDB8, 0xBEB9B7BB, 0xB5BBB6B8, 0xBBB9BDB8,
+ 0xC0BBBCC0, 0xBCBFBDBC, 0xBDBCBFBD, 0xBFBDBCBF,
+ 0xBABDBBBC, 0xBBBBC0BE, 0xC1BEB8BD, 0xB9C0BDBA,
+ 0xBBBABFBD, 0xBFBDB8BD, 0xB8BDBBBA, 0xBBB6BBBA,
+ 0xBBBCB7BC, 0xB1B7B6B6, 0xBBB6BCBB, 0xBDBDB6BC,
+ 0xB0B8B8B5, 0xBFBABFBE, 0xBFBEBBC0, 0xB9BFBEB9,
+ 0xBEB7BDBC, 0xC0BEB9BF, 0xB9BEBCBB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBDBCBFBD, 0xBFBDBCBF,
+ 0xBCBFBDBC, 0xBABBBEBC, 0xBFBABBBF, 0xBBBFBABB,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00020000,
+ 0x00000200, 0x00000100, 0x43020006, 0x35453F36,
+ 0x2F1F3740, 0x87412C52, 0x66A37055, 0x8866A387,
+ 0x476F5381, 0x26433A24, 0x36284038, 0x451F122A,
+ 0x243E3A2D, 0x3D294C31, 0xA36F5186, 0x65A58866,
+ 0x76599088, 0x3B3E2D52, 0x304F2B1F, 0x3223423F,
+ 0x07080808, 0xB4AF0809, 0xB0B4AFB0, 0xB5B5BBB6,
+ 0xBAB8B4BA, 0xB5BBB6B5, 0xB4B3B9B4, 0xB9B4B3B9,
+ 0xB5B9B4B5, 0xB5B5B9B4, 0xB9B4B6BA, 0xB5B9B4B5,
+ 0xB2B5B9B4, 0xB3B1B3B7, 0xB3B6B4B0, 0xB5B4B7B5,
+ 0xB7B5B4B7, 0xB4B7B5B4, 0xB3B4B7B5, 0xB7B5B0B5,
+ 0xB1B8B5B2, 0xB1B2B7B5, 0xB6B4B0B6, 0xB3B7B2B1,
+ 0xB2B2B6B1, 0xB7B2B3B7, 0xB1B7B2B3, 0xB4B3B9B4,
+ 0xB8B6B3B9, 0xB4B9B7B3, 0xB8B4B9B7, 0xB9B7B4BB,
+ 0xB4B9B7B4, 0xB9B5BAB8, 0xBAB8B6BB, 0xB5B8B6B5,
+ 0xB4B5B8B6, 0xB9B4B7B8, 0xB8BCB7B5, 0xB9B6BBB9,
+ 0xB5B3B6BB, 0xB8BBB9B2, 0xB7BBBCB8, 0xBCB7BABB,
+ 0xB8BCB7B8, 0xB7B6BCB7, 0xBCB7B6BC, 0xB8BCB7B8,
+ 0xB7B8BEB9, 0xBBB9B6BC, 0xB8BDBBB6, 0xB9B8BEB9,
+ 0xBFBABABE, 0xBABEB9BB, 0xBABAC0BB, 0xC0B9B9BF,
+ 0xBAC1BAB9, 0xB6B8BCB6, 0xBFBAB8BC, 0xBDC1BBBB,
+ 0x98AAAEA8, 0xB0A79CA1, 0xAAAFA6AB, 0x97A2A79E,
+ 0x97919BA0, 0x93988F93, 0xA8A6ABA2, 0xB3AAAAB2,
+ 0xAAAFA6AE, 0xA8A8ACA6, 0xAEA8ACAE, 0xAAAEA8AC,
+ 0xA5A7AFA5, 0xAFA4A6AF, 0xA9AFA4A9, 0xA2A7ADA2,
+ 0xADA2A7AD, 0xA8ACA1A9, 0xA6A7ADA2, 0xADA2A9B1,
+ 0x9EA79AA5, 0x9EA3AA9D, 0xAB9CA6AD, 0xA2A99AA4,
+ 0xA1A4AB9E, 0xA497A7AE, 0x9EA5989D, 0x999FA699,
+ 0xA59A9FA6, 0xA1A59AA1, 0x949EA296, 0xA69A9EA3,
+ 0xA4A69AA4, 0x959CA094, 0xA2959BA2, 0x9BA2959B,
+ 0x959BA196, 0xA0959AA0, 0x9C9F969C, 0x97979C93,
+ 0xA19799A1, 0x98A09599, 0x939EA499, 0xA4989B9F,
+ 0x9EA499A0, 0x969A9F96, 0xA09A989C, 0xA0A39A9E,
+ 0x64A0A39A, 0x01006A6D, 0x00000000, 0x01000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00010000, 0x27020100, 0x55512C2B,
+ 0x80807A56, 0x7980807A, 0x81787F7F, 0x80817880,
+ 0x7980807A, 0x81787F7F, 0x80817880, 0x7077786F,
+ 0x7C767879, 0x7C7C767C, 0x777A7C76, 0x7C787B7D,
+ 0x7A7C767B, 0x737D7D77, 0x7E75797C, 0x767A6F7D,
+ 0x72777C73, 0x7970767B, 0x787B7276, 0x72787D74,
+ 0x7B72767B, 0x787D7476, 0x787B7E75, 0x81778081,
+ 0x80817780, 0x777D7E74, 0x80778081, 0x7E7F767F,
+ 0x787D7E75, 0x81788081, 0x80817780, 0x76808177,
+ 0x7E747F80, 0x7B7C737D, 0x9284857C, 0x6F6B9698,
+ 0x5A5B576E, 0x3F62635F, 0x04004243, 0x00040000,
+ 0x39000100, 0x5C573A3E, 0x5A5C5658, 0x8774776E,
+ 0x847B9091, 0x76776E83, 0x77808178, 0x81777F80,
+ 0x7A7C7080, 0x747B7C72, 0x81787D7E, 0x7D7E7580,
+ 0x76808178, 0x81787E7F, 0x7B7C7380, 0x75808178,
+ 0x80777D7E, 0x8081787F, 0x747E7F76, 0x7E757C7D,
+ 0x7D7E757D, 0x727D7E75, 0x7D747A7B, 0x7E81787C,
+ 0x74787D74, 0x7D74767E, 0x797C7378, 0x747C7D74,
+ 0x7B737C7D, 0x8081787D, 0x767C7C76, 0x7C767A7C,
+ 0x7A7C767A, 0x77787C76, 0x7C77787C, 0x787C7778,
+ 0x787E8178, 0x807A7E81, 0x7E807A7E, 0x324D4E4A,
+ 0x1B193536, 0x0001001A, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000301, 0x02000105, 0x00030000,
+ 0x2F000200, 0x685F3335, 0x999C9365, 0x919EA297,
+ 0x9D90989C, 0x969D9096, 0x92969C91, 0x9D92979D,
+ 0x979D9297, 0x91979E91, 0x9E92979E, 0x999D919A,
+ 0x91979B8F, 0xA195999D, 0x9EA2969D, 0x949DA195,
+ 0x9B8F9CA0, 0x989C9097, 0x95989F90, 0xA4959DA4,
+ 0x9DA4959D, 0x99A4A99A, 0xA79BA3A8, 0xA5A99DA3,
+ 0xA0A5A99D, 0xACA0A8AC, 0xA7AB9FA8, 0x9EA8AD9E,
+ 0xAF9FA9AF, 0xA8AE9DAC, 0xA0AAAFA0, 0xAC9FAAAF,
+ 0xA3AA9DA5, 0x9BA3A79B, 0xA89DA3A7, 0xA1A79CA4,
+ 0xA39BA398, 0xB1A7A5AD, 0xACB1A8A9, 0xA8ABAFA4,
+ 0xB1A5B0B4, 0xADB1A5AD, 0xA3ADB1A5, 0xB4A8ABAF,
+ 0xB0B4A8B2, 0xA7AEB2A7, 0xB1A8ACB2, 0xA7AFA5AC,
+ 0xAEABB3AC, 0xB2ADADB5, 0xACB2ADAC, 0xA9A8B0A9,
+ 0xB4ADA8B0, 0xADB4ADAD, 0xB5B0B4AE, 0xC0B9B5BC,
+ 0xB8C0B9B8, 0xB9B6BCB7, 0xC1BCBABE, 0xB9BDB8BD,
+ 0xBAB8BCB7, 0xBEBCBBBF, 0xBABDBBBB, 0xB7B7BBB6,
+ 0xBDBBB8BC, 0xB9BEBCB8, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBEBA, 0xBBB9BEBC, 0xBDBCB8BD, 0xB9C0BDB7,
+ 0xBBB8BDBB, 0xC0BDB8BD, 0xB7BDBCB9, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBAB6BDBA, 0xBAB9B6BD,
+ 0xB0B8B8B2, 0xBEB9BEBD, 0xBDBCBABF, 0xB8BDBCB8,
+ 0xBEB7BDBC, 0xC0BDB9BF, 0xBABFBDB9, 0xBBBBBFBA,
+ 0xBEBABEBF, 0xBDBEBABD, 0xBDBCBFBD, 0xBFBEBCBF,
+ 0xBABFBDBA, 0xBBBABDBB, 0xBEB9BABD, 0xBBBFBABA,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00020000,
+ 0x01000200, 0x00000000, 0x42020004, 0x35453F37,
+ 0x2F1F3740, 0x87402E53, 0x66A36E55, 0x8866A388,
+ 0x496F5283, 0x26433A23, 0x36284038, 0x4420162D,
+ 0x263D372D, 0x3B2A4C30, 0xA36F5186, 0x65A58866,
+ 0x76599188, 0x3A3F2E53, 0x304F2A1E, 0x3223433F,
+ 0x07080808, 0xB3B10809, 0xB0B4AFB0, 0xB8B6BBB9,
+ 0xBAB8B5BA, 0xB5BBB6B5, 0xB4B3B9B4, 0xB9B4B3B9,
+ 0xB6BAB5B5, 0xB3B5B9B4, 0xB7B2B4B8, 0xB3B7B2B3,
+ 0xB1B3B7B2, 0xB6B2B2B6, 0xB6B7B3B5, 0xB5B5B6B4,
+ 0xB6B4B6B7, 0xB1B4B2B3, 0xB0B0B3B1, 0xB5B4ADB2,
+ 0xB1B8B5AF, 0xB3B1B7B6, 0xB3B2AFB6, 0xAEB3B1AD,
+ 0xB1B1B5B0, 0xB9B4B2B6, 0xB3B9B4B5, 0xB4B3B9B4,
+ 0xB8B6B3B9, 0xB2B7B5B3, 0xB7B2B9B6, 0xB9B8B3BA,
+ 0xB4BAB9B3, 0xB7B5BAB8, 0xBAB9B4B9, 0xB3B8B6B5,
+ 0xB4B5B9B4, 0xB3AEB7B8, 0xB0B4AFAF, 0xB3B0B5B3,
+ 0xB5B3B0B5, 0xB8BBB9B2, 0xB7BABBB7, 0xBAB5BABB,
+ 0xB3B7B2B6, 0xAFAFB3AE, 0xBAB5B0B4, 0xB8BCB7B6,
+ 0xB7B8BEB9, 0xBDBBB6BC, 0xB7BCBAB8, 0xB9BCC0BB,
+ 0xBEB9BABE, 0xB8BEB9BA, 0xB4B2B9B6, 0xBFBAB2B9,
+ 0xB3BBB4B8, 0xBAB9BDB8, 0xBFBABBBF, 0xBBBFB9BB,
+ 0x98B9BCB3, 0x938A9EA1, 0x90938A90, 0x9793988F,
+ 0xA7A19BA0, 0xADB2A9A3, 0xA8ADB3A8, 0xABA2ADB3,
+ 0xAAAFA6A6, 0xAAADAFA9, 0xB0AAAEB0, 0xAFB1ABAE,
+ 0xA5A8B0A6, 0xB0A5A6AF, 0xAAB0A5A8, 0xA2A9AFA4,
+ 0xADA2A7AD, 0xA9ADA2A9, 0x9FA4AA9F, 0xAB9FA2AA,
+ 0xA2AA9FA1, 0x9AA2A99C, 0xA99AA2A9, 0xA3AA9BA2,
+ 0xA0A3A79B, 0xA99DA8AC, 0x9EA598A5, 0x959CA396,
+ 0xA1969BA2, 0xA1A5999D, 0x909DA195, 0xA2969A9F,
+ 0xA4A69AA0, 0x909FA195, 0xA094989C, 0x9B9F939C,
+ 0x919CA095, 0x9F95989C, 0x9CA0959E, 0x97969B92,
+ 0xA19799A1, 0x98A09599, 0x949EA499, 0xA1959CA0,
+ 0x9EA5989D, 0x989CA198, 0xA1989A9E, 0x9C9D949E,
+ 0x99A0A499, 0x6B65A0A4, 0x00010069, 0x01000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x2B2A2602, 0x502D2C28, 0x807A5656, 0x80807A80,
+ 0x7B7F7F79, 0x807A8181, 0x7F807780, 0x70797A71,
+ 0x7C767879, 0x7B7B757C, 0x777B7C78, 0x7E7A7A7B,
+ 0x7F7E7A7F, 0x737B7B75, 0x7C737B7C, 0x7B7C727B,
+ 0x747A7D74, 0x7C73787D, 0x7D807779, 0x71787D74,
+ 0x8178757A, 0x757A717C, 0x757C7D74, 0x7E747D7E,
+ 0x8081777D, 0x737E7F75, 0x82797C7D, 0x7C7D7481,
+ 0x7580807A, 0x7D757D7E, 0x7E7D737F, 0x777E7F75,
+ 0x82798081, 0x7C7D7481, 0x9084857C, 0x706C9699,
+ 0x5A5B576F, 0x3F60645F, 0x04004044, 0x00040000,
+ 0x3B000100, 0x5C57383D, 0x585C5658, 0x87676A61,
+ 0x847B8E92, 0x83847B83, 0x797D7D77, 0x80767F82,
+ 0x7D7E747F, 0x75808177, 0x7E757D7E, 0x7B7C737D,
+ 0x757D7E75, 0x7E757D7E, 0x7B7C737D, 0x737A7B72,
+ 0x81787B7C, 0x7C7D7480, 0x75787970, 0x81787D7E,
+ 0x80817880, 0x76808178, 0x81787E7F, 0x7F827980,
+ 0x747B8077, 0x7C73767E, 0x787D7477, 0x73797C73,
+ 0x7E757B7C, 0x8081787D, 0x767C7C76, 0x7C767C7C,
+ 0x7A7C767C, 0x767A7B77, 0x7C7A777B, 0x777B7679,
+ 0x4F7E807A, 0x56505355, 0x2A2B2754, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01020000, 0x00000301, 0x04000004, 0x00040000,
+ 0x9165685F, 0x9C91989C, 0x989C9198, 0x91979B90,
+ 0x9E91989C, 0x979E9197, 0x92979D92, 0x9D92979D,
+ 0x969C9197, 0x92989E93, 0x9D91989F, 0x969A8E99,
+ 0x94989C90, 0xA1959CA0, 0x9DA1959D, 0x959CA094,
+ 0xA2969DA1, 0x9DA1959E, 0x95989F90, 0xA4959DA4,
+ 0x9DA4959D, 0x969FA495, 0xA498A0A5, 0xA0A498A0,
+ 0x9BA3A79B, 0xA79BA3A7, 0xA3A79BA3, 0x97A6A99A,
+ 0xA898A4A7, 0xA8AB9BA5, 0x99A4A99A, 0xA598A1A5,
+ 0x9EA5989E, 0x9BA3A79B, 0xA69BA3A7, 0xA1A79CA2,
+ 0xA7A6AEA4, 0xB0A9A8B1, 0xA8B0A6A9, 0xA5A9AFA4,
+ 0xAFA3ADB1, 0xADB1A5AB, 0xA2B1B5A9, 0xB2A6AAAE,
+ 0xAFB3A7AE, 0xA9AEB4A9, 0xB0A6AEB4, 0xA8AFA8A8,
+ 0xACADB5AE, 0xB2ADABB3, 0xABB2ADAB, 0xADACB4AD,
+ 0xB4ADADB4, 0xADB4ADAD, 0xB9B3BAB3, 0xC0B9B9C0,
+ 0xB9C1BAB8, 0xB9B7BBB6, 0xBAB6B8BB, 0xBBBCB8B9,
+ 0xBBB8BCB7, 0xBFBDBCC0, 0xBBBEBCBC, 0xB7B9BDB8,
+ 0xBDBBB8BC, 0xB8BDBBB8, 0xBBB7BEBB, 0xBFBEB7BE,
+ 0xBABFBEBA, 0xBDBABFBD, 0xBFBEB9C0, 0xB9C0BDB9,
+ 0xBDB8BDBB, 0xBFBEB9C0, 0xB9BFBEB9, 0xBEBAC0BF,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xB7B6BDBA, 0xBAB9B3BA,
+ 0xB2B8B7B4, 0xBEB6BBBA, 0xBFBEBABF, 0xBABFBEBA,
+ 0xBFB9BFBE, 0xC0BDBAC0, 0xB9C0BDB9, 0xBABBBEBC,
+ 0xBEBABBBF, 0xBBBFBABD, 0xBDBCBFBD, 0xBFBEBCBF,
+ 0xBABFBDBA, 0xBBB9BCBA, 0xBEB9BABD, 0xB9BDB8BA,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00020000,
+ 0x01000200, 0x00000000, 0x42020004, 0x35453F37,
+ 0x2F1F3740, 0x87402E53, 0x66A36E55, 0x8866A388,
+ 0x496F5283, 0x26433A23, 0x36284038, 0x4520162D,
+ 0x243B362E, 0x3223432E, 0xA36D5186, 0x63A58866,
+ 0x775A9287, 0x3A402E53, 0x2A492A1E, 0x32234339,
+ 0x07080808, 0xB3B10809, 0xB0B4AFB0, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB6BCB7B6, 0xB4B4BAB5, 0xB8B2B4BB,
+ 0xB5B9B3B4, 0xB4B5B9B4, 0xB9B4B5B9, 0xB4B8B3B5,
+ 0xB2B5B9B4, 0xB6B1B3B7, 0xB4B8B3B2, 0xB5B4B7B5,
+ 0xB9B9B4B7, 0xB6B8B8B9, 0xB7B3B8B7, 0xB6B7B2B8,
+ 0xB1B7B6B1, 0xB7AFB7B7, 0xB8B8B0B8, 0xB1B7B6B0,
+ 0xB4B3B8B6, 0xB9B7B5B9, 0xB5B8B6B6, 0xB6B3B8B6,
+ 0xBAB7B3B8, 0xB2B9B6B3, 0xB8B4BBB8, 0xBBBAB4BB,
+ 0xB5BAB9B6, 0xB9B5BAB9, 0xBAB8B5BA, 0xB6BBB9B5,
+ 0xB4B5B9B4, 0xB8B4B5B9, 0xB3B7B2B7, 0xA6A1A8A5,
+ 0xBCB7A2A9, 0xB8BCB7B6, 0xB5BABBB9, 0xB4AFB6B7,
+ 0xB5B9B4B0, 0xB1B1B4B2, 0xBBB6B0B3, 0xB8BCB7B7,
+ 0xB6B6BDB6, 0xBCB7B6BD, 0xBBBFBAB8, 0xB8B7BAB8,
+ 0xBCBAB7BA, 0xB6BBB9B7, 0xAEABB1B0, 0xBAB5A8B1,
+ 0xB3BAB5B3, 0xBAB8BCB7, 0xBBB5BBBF, 0xBBBFB9B7,
+ 0x89B9BEB5, 0x938A8D92, 0x90938A90, 0x9F93988F,
+ 0xB1A8A3A8, 0xAFB2A9AE, 0xA6A9AFA4, 0xB0A5ABB1,
+ 0xA8ACA1AC, 0xA8ABAEA5, 0xB1ABAEB1, 0xACB0AAAF,
+ 0xA4A7AFA5, 0xAFA4A6B0, 0xA8B0A5A7, 0xA1A4ACA1,
+ 0xACA1A6AC, 0xA7ADA2A8, 0xA0A5ADA3, 0xA99EA1AA,
+ 0xA5ADA2A1, 0x9BA4AB9E, 0xAD9EA1A8, 0xA6AB9CA8,
+ 0xA0A2A498, 0xACA0A8AC, 0xA3A79BA8, 0x999CA396,
+ 0xA2969FA6, 0xA0A2969E, 0x96A1A599, 0xA1959EA2,
+ 0x9FA3979D, 0x939FA195, 0xA1959D9F, 0x9B9F939D,
+ 0x909DA196, 0xA095979B, 0x9CA0959C, 0x93979C93,
+ 0x9F95959D, 0x959B9097, 0x949DA196, 0xA1929CA0,
+ 0x9FA6999A, 0x959CA198, 0xA09A9B9E, 0x9C9F969E,
+ 0x97A0A499, 0xA49B9FA3, 0x696B65A1, 0x00303331,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00020000, 0x01000200, 0x01020000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x02000003, 0x00020000, 0x2B270201, 0x5655512C,
+ 0x7A5A5955, 0x7F7B7F7E, 0x80807A80, 0x777A7C76,
+ 0x7C767B7D, 0x7A7C767A, 0x797B7C78, 0x7F7B7C7D,
+ 0x7A7B777E, 0x757B7B75, 0x7E757D7E, 0x7D7E747D,
+ 0x747A7D74, 0x7B727A7D, 0x767B7276, 0x72787D74,
+ 0x7B72767B, 0x787D7476, 0x757B7C73, 0x7B737D7E,
+ 0x807E767D, 0x787D7E75, 0x7C738081, 0x7B7C737B,
+ 0x757E8178, 0x7E757B7E, 0x7D7E757D, 0x72808177,
+ 0x81787B7C, 0x7D7D7780, 0x7C82857C, 0x6F6B8285,
+ 0x575B566E, 0x3F60645F, 0x03004044, 0x00040000,
+ 0x3B000100, 0x5C57383D, 0x575B5558, 0x7B686B62,
+ 0x847B8286, 0x83847B81, 0x727D7E75, 0x82787A7B,
+ 0x7D7E7481, 0x757F8077, 0x7B737D7E, 0x7D7B737D,
+ 0x747D7E75, 0x7E757D7E, 0x7C7D747D, 0x727B7C73,
+ 0x7F767A7B, 0x7D7E757E, 0x787B7C73, 0x7E758081,
+ 0x7D7E757D, 0x73808178, 0x7E757B7C, 0x7B7E757D,
+ 0x77777F75, 0x81777881, 0x787D7479, 0x73797C73,
+ 0x7D74797C, 0x797C737A, 0x6F7A7D74, 0x7D777578,
+ 0x7E807A7B, 0x777A7B77, 0x7B797A7B, 0x5455537A,
+ 0x002A2B27, 0x01000102, 0x00010000, 0x01000100,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x03010002, 0x00000100,
+ 0x00000001, 0x00000100, 0x00020000, 0x00000200,
+ 0x00010000, 0x00000301, 0x3B350004, 0x6D716B37,
+ 0x90979B90, 0x9D91989C, 0x989C9099, 0x91999D91,
+ 0x9C90999D, 0x989C9098, 0x91979D92, 0x9C93969C,
+ 0x999F9497, 0x939A9E93, 0x9C919A9E, 0x979B9098,
+ 0x939B9F93, 0x9F939B9F, 0x9DA1959B, 0x959DA195,
+ 0xA1959DA1, 0x9DA1959D, 0x90989F90, 0xAA9B989F,
+ 0xA6AD9EA3, 0x9DA6AA9E, 0xA79BA5A9, 0xA4A89CA3,
+ 0x9EA7A99D, 0xA89CA8AA, 0xA6AA9EA4, 0x9CA8AB9C,
+ 0xAC9CA9AC, 0xA5A898A9, 0x97A0A596, 0xA4989FA3,
+ 0xA4A89CA0, 0x98A3A899, 0xAA9EA2A7, 0xA6ACA1A6,
+ 0xA6AAB2A8, 0xB2A8A7B0, 0xA5ADA3AA, 0xA5A9AFA4,
+ 0xB4A8ABB2, 0xB0B4A8B0, 0xA6ABB2A5, 0xB1A5ACB3,
+ 0xB0B4A8AD, 0xA7AEB4A9, 0xB0A7AAB2, 0xAAB2A8AB,
+ 0xA9ACB4AA, 0xB5AEAAB3, 0xABB3ACAD, 0xADAEB5AE,
+ 0xB5AEADB4, 0xB2B9B2AE, 0xB9B8BFB8, 0xC1BAB8C0,
+ 0xB5BCB5BA, 0xB7B8BCB7, 0xBAB8BABB, 0xB9BDB8B7,
+ 0xB7B8BCB7, 0xBDBBB8BC, 0xBCBFBDBA, 0xB8B8BCB7,
+ 0xBFBDB9BD, 0xB7BEBBBA, 0xBBB7BEBB, 0xBDBCB7BE,
+ 0xB6BCBBB7, 0xBCB9C0BD, 0xC0BDBAC1, 0xB7BEBBB9,
+ 0xBFB8BEBD, 0xC0BFBAC0, 0xB7BEBBBA, 0xB6B5BAB8,
+ 0xBBB6B7BB, 0xB8BCB7B7, 0xB8B3B8B6, 0xBEBBB4BB,
+ 0xB3BAB7B7, 0xBFB6BBBA, 0xC0BDBBC0, 0xB9C0BDB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BFBCB7, 0xBCB9BEBC,
+ 0xBEBCB9BE, 0xBBBEBCBB, 0xBBBCC0BB, 0xBCBABCC0,
+ 0xB8BBB9B9, 0xB6B6B9B7, 0xBBB6B7BB, 0xB5BBB6B5,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x01000000, 0x00000000, 0x42020004, 0x35453F37,
+ 0x2D1F3740, 0x87402E53, 0x66A36E55, 0x8866A387,
+ 0x476F5381, 0x27423A24, 0x372A4038, 0x4522162C,
+ 0x253C3930, 0x3021412F, 0xA46E5287, 0x64A68867,
+ 0x76599188, 0x39402E53, 0x2B4A291D, 0x3122413A,
+ 0x07080808, 0xB3B10809, 0xB0B4AFB0, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB5BBB6B6, 0xB4B3B9B4, 0xB9B4B4BB,
+ 0xB5B9B4B5, 0xB4B5B9B4, 0xBBB6B5B9, 0xB8BCB7B7,
+ 0xB4B8BCB7, 0xB9B4B5B9, 0xB6BAB5B5, 0xB7B6B9B7,
+ 0xB8B8B6B9, 0xB4B9B8B6, 0xB8B3B8B9, 0xB5B6B0B8,
+ 0xB1B6B7B0, 0xB8B0B8B8, 0xB8B8B0B8, 0xB1B9B8B0,
+ 0xB6B3B8B6, 0xBAB8B5B8, 0xB8BBB9B7, 0xBAB6BBB9,
+ 0xBCB9B7BC, 0xB2B9B6B5, 0xB9B4BBB8, 0xBAB9B6BB,
+ 0xB4B9B8B5, 0xBAB6BBBA, 0xBAB8B6BB, 0xB5BAB8B5,
+ 0xB2B5B8B6, 0xB9B4B3B7, 0xB5B9B4B5, 0xA6AFB6B3,
+ 0xB5B3A0A9, 0xB7BAB8B0, 0xB9BABBB9, 0xB9B4B8BB,
+ 0xB5B9B4B5, 0xB4B3B6B4, 0xB6B4B3B6, 0xB5B9B4B3,
+ 0xB8B8BEB9, 0xBFBAB8BF, 0xB8BCB7BB, 0xBBBABDBB,
+ 0xBEBEBABD, 0xB6BBBABC, 0xB2A9AFAE, 0xBFBCAEB5,
+ 0xBAC0BBB8, 0xBABBBFBA, 0xC0BBBBBF, 0xC0C4BEBC,
+ 0x98B7BBB5, 0xA09A9CA1, 0x8E938A9E, 0x9893988F,
+ 0xB1A89CA1, 0xAEB1A8AE, 0xA8ADB3A8, 0xB3A8ADB3,
+ 0xACB0A5AF, 0xA8AEB1A8, 0xB0AAAEB1, 0xADB2A9AC,
+ 0xA9ABB3A9, 0xB0A5ABB5, 0xA7AFA4A8, 0xA5A5ADA3,
+ 0xACA1A7AF, 0xA6ACA1A6, 0xA6AAB2A8, 0xAEA3A7B0,
+ 0xA5ADA2A6, 0xA0A5AC9F, 0xAA9EA8AC, 0xA8ACA0A6,
+ 0x9BA7A99D, 0xA79BA5A7, 0xA2A69AA3, 0x999FA699,
+ 0xA4989FA6, 0xA3A599A0, 0x96A2A69A, 0xA3969EA2,
+ 0xA2A69A9C, 0x95A0A498, 0xA2959DA1, 0x9FA6999B,
+ 0x959DA398, 0xA1969CA0, 0x9FA3989D, 0x92989E93,
+ 0x9D94959D, 0x9AA09598, 0x959DA196, 0xA0939DA1,
+ 0x9CA29799, 0x969CA198, 0x9E989A9F, 0x9A9F969A,
+ 0x9AA0A499, 0xA499A1A5, 0xA0A39AA0, 0x30959692,
+ 0x01003132, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x01000200, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x03010102, 0x00020000, 0x00000301, 0x02000002,
+ 0x320F0D0C, 0x58573533, 0x807F7B5A, 0x7A838480,
+ 0x807A7E80, 0x7A7C767E, 0x767D7F79, 0x7C787A7C,
+ 0x7C7E787B, 0x777D7D77, 0x7C737D7D, 0x797C737B,
+ 0x747A7C76, 0x7A74787A, 0x74797076, 0x74767B72,
+ 0x7B72787D, 0x787B7276, 0x757A7D74, 0x7E757D7E,
+ 0x7C7D747D, 0x727B7C73, 0x7B727A7B, 0x7879707A,
+ 0x727B7C73, 0x7D747A7B, 0x7D7E757C, 0x757D7E74,
+ 0x81787D7E, 0x7D7D7780, 0x7E83867D, 0x6F6B8284,
+ 0x585C576E, 0x3E60645F, 0x05003F43, 0x00040001,
+ 0x39000100, 0x5D573A3E, 0x585D5459, 0x7B686B62,
+ 0x776E8184, 0x81847B74, 0x757D7E75, 0x7E747D7E,
+ 0x7D7E747D, 0x747D7E75, 0x7D757C7D, 0x7F7D757F,
+ 0x757D7E74, 0x7C737E7F, 0x7B7C737B, 0x707D7E75,
+ 0x7D747879, 0x7D7E757C, 0x727D7E75, 0x81787A7B,
+ 0x80817880, 0x737E7F76, 0x7C737B7C, 0x797C737B,
+ 0x74777C73, 0x7D74787D, 0x75786F78, 0x70767970,
+ 0x7B727679, 0x797C7378, 0x797D8077, 0x807A7F82,
+ 0x72746E7E, 0x2B545551, 0x09072E2F, 0x07080608,
+ 0x00000100, 0x01000001, 0x01020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x02000003, 0x00000100,
+ 0x00000000, 0x00000100, 0x00020000, 0x00000200,
+ 0x00010000, 0x34000400, 0xA7A1363A, 0xA3A89FA3,
+ 0x90989C91, 0x9C90989C, 0x989D8E98, 0x90989C90,
+ 0x9D91989C, 0x999D9199, 0x92969C91, 0x9D92979D,
+ 0x999F9497, 0x90999D92, 0x9B90979B, 0x9A9E9297,
+ 0x939B9F93, 0xA1959B9F, 0x9EA2969D, 0x959DA195,
+ 0xA1959DA1, 0x9DA1959D, 0x959DA495, 0xA4959DA4,
+ 0x9DA4959D, 0x9DA3A79B, 0xACA0A5A9, 0xA6AA9EA8,
+ 0xA0A7A99D, 0xACA0A8AC, 0xA8ACA0A8, 0x9DA9AE9F,
+ 0xA797A9AC, 0xA5A898A4, 0x9DA4A99A, 0xA89CA5A9,
+ 0xA4A89CA4, 0x99A2A798, 0xA79BA3A8, 0xA7ADA2A3,
+ 0xA3A5ADA2, 0xADA3A5AD, 0xABB1A6A5, 0xA8AEB5A8,
+ 0xB1A5AEB5, 0xA9ADA1AD, 0xA5A9B0A3, 0xB3A8ABB2,
+ 0xB0B4A9AF, 0xAAAAB2A7, 0xB2A8ACB4, 0xAAB2A8AA,
+ 0xACA9B1A7, 0xB3ACAEB6, 0xADB4ADAC, 0xADAFB3AD,
+ 0xB3ACAFB3, 0xB6BDB6AC, 0xB9B8C0B9, 0xBCB5B8C0,
+ 0xB7BBB5B5, 0xB7B8BCB7, 0xC0BEB8BC, 0xB8BDBBBD,
+ 0xB7B9BDB8, 0xBAB8B8BC, 0xBABDBBB7, 0xBBB7BAB8,
+ 0xC0BDB8BD, 0xB7BEBBB9, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xB7BEBBB9, 0xBBB7BEBB, 0xBEBBB7BE, 0xB5BCB9B7,
+ 0xBEB7BDBC, 0xBDBAB9BF, 0xB6BBB9B6, 0xB6B5BBB6,
+ 0xBBB6B7BB, 0xB7BBB6B7, 0xB8B4B9B7, 0xBBB6B5BA,
+ 0xB2B9B4B4, 0xBDB7BCBA, 0xBEBBBABF, 0xB8BFBCB7,
+ 0xBDB8BEBD, 0xBFBEB8BE, 0xB8BEBDB9, 0xBCB9BEBC,
+ 0xBEBCB9BE, 0xB9BEBCB9, 0xBBBABEB9, 0xBDBBBCC0,
+ 0xBABDBBBA, 0xB8BBBFBA, 0xBBB6B9BD, 0xB7BDB8B7,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x01000000, 0x00000000, 0x42020004, 0x35453D37,
+ 0x2D1F3740, 0x87412F54, 0x66A36E55, 0x8766A387,
+ 0x476D5381, 0x27423A24, 0x36293F38, 0x4421152B,
+ 0x263D382F, 0x31224230, 0xA56D5186, 0x64A68765,
+ 0x76599188, 0x3A402E53, 0x304F2A1E, 0x3223423F,
+ 0x07080808, 0xB3B10809, 0xB2B3AFB2, 0xB7B8BCB7,
+ 0xBBB9B8BC, 0xB7BAB8B8, 0xB6B5BAB8, 0xB9B7B5BB,
+ 0xB5BBB6B4, 0xB6B6BCB7, 0xBCB7B5BB, 0xB5BBB6B6,
+ 0xB8B5BAB8, 0xB8B6B5BA, 0xB3B8B6B3, 0xB8B4B9B8,
+ 0xB8B9B4B9, 0xB2B7B8B3, 0xB9B2B7B8, 0xB9B9B3B8,
+ 0xB0B8B8B1, 0xB8B3B9B8, 0xB9B8B3B9, 0xB2B8B7B3,
+ 0xB7B2B7B6, 0xB9B7B3B8, 0xB4B9B7B4, 0xB8B5BAB8,
+ 0xBBB9B5BA, 0xB5BAB8B6, 0xB7B5BAB8, 0xBAB8B6B9,
+ 0xB8BBB9B7, 0xB9B7BCBA, 0xBAB9B6BB, 0xB2B9B6B4,
+ 0xB9B5BAB8, 0xB9B7B6BB, 0xB4B9B7B4, 0xAFB7BCBB,
+ 0xB0AFAAB0, 0xB6BBB9AB, 0xB7B8BBB9, 0xBBB9B8BC,
+ 0xAAAFADB8, 0xB7AFB4B2, 0xB3B1B6B9, 0xB9BCBAB0,
+ 0xB7B8BEB9, 0xBAB8B6BC, 0xBBBCBAB7, 0xBBBDBEBC,
+ 0xBDBBBABD, 0xBABDBBBA, 0xBEB9BEBC, 0xBFBDBBC0,
+ 0xBABDBBBA, 0xBBBCBFBD, 0xC0BBBCC0, 0xBCC0BBBC,
+ 0xBBBEC2BD, 0xBCB7BDC1, 0xB8BCB6B8, 0x8EAEB2AC,
+ 0xA39D9294, 0xAFB1ABA3, 0xA4B0B6AB, 0xB0A5A7AF,
+ 0xAFB4ABAA, 0xAAB1B5AA, 0xB5ACB1B5, 0xAEB3AAB2,
+ 0xA8A9B1A7, 0xB3A9AAB2, 0xAAB2A8AB, 0xAAA8B0A9,
+ 0xB2A8AAB1, 0xA7AFA5AA, 0xA5A5ADA3, 0xB1A7A7AF,
+ 0xA6ACA1A9, 0xA2A9ADA1, 0xAB9FAAAE, 0xA7AB9FA7,
+ 0x9CA8ACA0, 0xA99DA4A8, 0xA5A99DA5, 0x98A1A89B,
+ 0xA5969EA5, 0xA0A596A0, 0x9DA6AA9E, 0xA498A5A9,
+ 0xA0A498A0, 0x9AA5A99E, 0xA2979FA5, 0x9CA69A9A,
+ 0x979DA59A, 0x9D919CA2, 0x9FA39799, 0x939EA598,
+ 0xA19699A0, 0x9AA0959B, 0x989EA297, 0x9D949EA1,
+ 0x9AA19A98, 0x999CA39C, 0xA09698A0, 0x9CA49A98,
+ 0x98999E95, 0x9F969CA1, 0x9A9C969A, 0x9A9EA09A,
+ 0x6A66A0A0, 0x0200006B, 0x07080606, 0x05070805,
+ 0x08050708, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x1A1B1900, 0x4D292726,
+ 0x78725251, 0x78787278, 0x7880807A, 0x807A8081,
+ 0x7F7F7980, 0x767A7C76, 0x7B77797A, 0x787C777A,
+ 0x77787C77, 0x7C77787C, 0x787C7678, 0x76767872,
+ 0x7F797A7C, 0x797B757D, 0x75797B75, 0x7B75797B,
+ 0x7B7B7579, 0x767B7C73, 0x7B737E7F, 0x7F7D757D,
+ 0x797E7C74, 0x81778182, 0x81827880, 0x787F8077,
+ 0x82798081, 0x7D7E7581, 0x73787970, 0x64607979,
+ 0x5A5B5765, 0x3C5E605A, 0x03004042, 0x00040000,
+ 0x35000100, 0x58523839, 0x56595056, 0x76676A61,
+ 0x7C767A7C, 0x7B7D7778, 0x787A7B72, 0x7C738081,
+ 0x7C7D747B, 0x777D7D77, 0x7E757D7D, 0x7D7E757D,
+ 0x777C7D73, 0x7E758081, 0x7B7C737D, 0x737D7E75,
+ 0x78727B7C, 0x7D7D7778, 0x737B7C73, 0x7C737B7C,
+ 0x7D7E757B, 0x71797A70, 0x7C717A7B, 0x797A7078,
+ 0x777D7D77, 0x7C777F7C, 0x807D787F, 0x7A827F7A,
+ 0x807A8080, 0x7F7F7980, 0x4B767872, 0x2B264F51,
+ 0x00040027, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x08080808, 0x09070808,
+ 0x08090508, 0x91838781, 0x958A969C, 0x989C9191,
+ 0x90989C91, 0x9C90989C, 0x999D9198, 0x90979B8F,
+ 0x9F93989C, 0x9B9F939B, 0x8F999D91, 0x9E92979B,
+ 0x989C909A, 0x90979B8F, 0xA195989C, 0x9EA2969D,
+ 0x969DA195, 0xA1959EA2, 0x9B9F939D, 0x959DA195,
+ 0xA1959DA1, 0x9CA0949D, 0x959DA195, 0xA2959DA1,
+ 0x9BA2959B, 0x979EA296, 0xAA9E9FA3, 0xA6AA9EA6,
+ 0xA0A5A99D, 0xACA0A8AC, 0xA6ADA0A8, 0x97A0A798,
+ 0xA998A2A8, 0x9FA594A3, 0x99A3A899, 0xA79BA3A8,
+ 0x9FA397A3, 0x98A0A498, 0xA59AA0A4, 0xA7ADA29F,
+ 0xA5A6ACA1, 0xACA1AAB0, 0xAAB0A5A6, 0xA5ABB2A5,
+ 0xB1A5ABB2, 0xACB0A4AD, 0xA9AAB0A5, 0xB1A8AEB4,
+ 0xAEB1A8AE, 0xACAEB6AC, 0xB0A9ABB3, 0xADB5AEA8,
+ 0xABAEB6AC, 0xB3ADAFB4, 0xB0B4AEAF, 0xAFAEB2AD,
+ 0xBBB6B0B4, 0xB9C0BBB5, 0xB6B8BEB9, 0xBBB6B5BB,
+ 0xBABEB9B7, 0xBDBABDBB, 0xBFBEBCBF, 0xB9C0BDBA,
+ 0xBDBABFBD, 0xBDBBBABF, 0xBCBDBBBC, 0xBCB6B9B7,
+ 0xC0BFB8BD, 0xB5BDBCB8, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBAC1BEBB, 0xBDB9C0BD, 0xBEBCB9C0, 0xB5BAB8B9,
+ 0xB9B7BCBA, 0xC1BFB6BB, 0xBCC1BFBC, 0xBAB9BEBC,
+ 0xBFBAB9BF, 0xB9BFBAB9, 0xBBB6BCBB, 0xBAB7B6BC,
+ 0xB3BAB5B3, 0xB9B5BBB6, 0xBEB9B8BE, 0xB8BEB9B8,
+ 0xBBB8BDBB, 0xBEBBB7BE, 0xB8BFBCB7, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBBBBBFBA, 0xBEBCBCC0,
+ 0xBBBEBCBB, 0xBBBEBFBD, 0xBDBBBABD, 0xBCBFBDBA,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x42020003, 0x35453D37,
+ 0x2D1F3740, 0x87423055, 0x66A36F57, 0x8766A385,
+ 0x476D5381, 0x25423A24, 0x36284037, 0x4422162C,
+ 0x253C382F, 0x3122422F, 0xA36C5085, 0x62A48563,
+ 0x75589086, 0x3A3F2D52, 0x2F4E2A1E, 0x3323423E,
+ 0x07080808, 0xB3B10809, 0xB2B3AFB2, 0xB7B8BCB7,
+ 0xBBB9B8BC, 0xB7BAB8B8, 0xB8B5BAB8, 0xBAB8B5BA,
+ 0xB5BAB8B5, 0xB5B5BBB6, 0xBBB6B4BA, 0xB6BCB7B5,
+ 0xB6B5BBB6, 0xBBB9B5BB, 0xB5BAB8B6, 0xB9B5BAB8,
+ 0xB8B7B5BA, 0xB2B8B7B2, 0xB9B4BAB9, 0xB8B8B3B8,
+ 0xB1B9B9B0, 0xB7B3B9B8, 0xB9B8B2B8, 0xB4BAB9B3,
+ 0xB9B3B7B8, 0xB9B8B4B8, 0xB4B9B7B4, 0xB8B5BAB8,
+ 0xBAB8B5BA, 0xB5BAB8B5, 0xB8B7BAB8, 0xBBB9B7BA,
+ 0xB5BAB8B8, 0xB8B6BBB9, 0xB7B6B5BA, 0xB5BAB9B2,
+ 0xB8B7BCBA, 0xBAB8B5BA, 0xB5BAB8B5, 0xBAB5BAB9,
+ 0xB0AFB6BB, 0xABB0AEAB, 0xB6B8BBB9, 0xB5B3B7BB,
+ 0xAAAFADB0, 0xBAAEB3B1, 0xBBBBB7BC, 0xB9BCBAB9,
+ 0xB7B6BBB9, 0xBBB9B8BC, 0xBCBDBBB8, 0xBBBCBDBB,
+ 0xC0BEBCBD, 0xBCBFBDBD, 0xBDBCBFBD, 0xBFBDBCBF,
+ 0xBABDBBBC, 0xBBBBBEBC, 0xBDB8BABD, 0xB8BCB7B9,
+ 0xB9B9BDB8, 0xC1BCBABE, 0xC0C4BFBD, 0xABBEC0BA,
+ 0x9490AFB1, 0xA1A39D93, 0xA9AAB0A5, 0xB6ACADB6,
+ 0xAFB4ABAE, 0xAAB0B4A9, 0xB4ABB1B5, 0xB0B5ACB1,
+ 0xA7ADB2A9, 0xB1A7A9B1, 0xAAB2A8A9, 0xA9A8B0A9,
+ 0xB1A7A8B0, 0xA7AFA5A9, 0xA3A7AFA5, 0xAFA5A5AD,
+ 0xA9AFA4A7, 0xA1A7ABA0, 0xACA1ABAD, 0xA6AA9FA8,
+ 0x9DA9ADA2, 0xA69AA5A9, 0xA6AA9EA2, 0x9BA3AA9D,
+ 0xA899A1A8, 0xA0A596A3, 0x9DA2A69A, 0xA69AA5A9,
+ 0xA1A599A2, 0x9DA1A79C, 0xA599A0A8, 0x9AA4989B,
+ 0x979DA59A, 0x9F929AA2, 0x9BA29598, 0x959CA396,
+ 0x9F929BA2, 0x9DA19598, 0x9B9EA198, 0x9E98A1A4,
+ 0x9AA19A9A, 0x9C9DA59E, 0xA19A99A4, 0x9BA39C99,
+ 0x9A989F98, 0xA09A9CA0, 0x9B9E959C, 0x989EA198,
+ 0xA09AA0A1, 0x6B6A66A0, 0x08070505, 0x04090906,
+ 0x08050708, 0x00000001, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000001, 0x00010100,
+ 0x00000100, 0x00010101, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x01000200, 0x29282402, 0x50565650, 0x807A5656,
+ 0x81817B80, 0x777A7B77, 0x7B797A7B, 0x787B7978,
+ 0x79787B79, 0x7C77787B, 0x797D7878, 0x6E72746E,
+ 0x7D777274, 0x7A7C767B, 0x74787A74, 0x7B75787A,
+ 0x7A7C7679, 0x757B7C73, 0x7D757D7E, 0x7E7C747F,
+ 0x747F7D75, 0x7E747E7C, 0x7B7C727D, 0x757D7E75,
+ 0x7D747D7E, 0x8182797C, 0x72787970, 0x64607878,
+ 0x5C5B5765, 0x395E605A, 0x04003F42, 0x00040000,
+ 0x36000100, 0x5852393A, 0x56595056, 0x755F615B,
+ 0x7D78797B, 0x797B7579, 0x7481817B, 0x766D7C7D,
+ 0x7B7C7375, 0x7480807A, 0x7C737A7A, 0x7D7E757B,
+ 0x747B7C72, 0x7D747D7E, 0x7B7C737C, 0x7077786F,
+ 0x79707879, 0x78797078, 0x757D7E75, 0x7C737D7E,
+ 0x7E7F767B, 0x717B7C72, 0x7D717A7B, 0x7A7B7179,
+ 0x787F7C77, 0x7B787F7C, 0x7F7C7780, 0x50817E7A,
+ 0x56525656, 0x2A2C2657, 0x00020300, 0x04000304,
+ 0x01050000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x01000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x06080907, 0x39350708,
+ 0x999B9538, 0x8A969B92, 0x95898F95, 0x989C9091,
+ 0x91989C91, 0x9D91989C, 0x999D9199, 0x8F9B9F93,
+ 0xA094979B, 0x9CA0949C, 0x939DA195, 0x9D919B9F,
+ 0x979B8F99, 0x969EA296, 0xA2939EA2, 0x9DA2939D,
+ 0x939EA296, 0xA2969B9F, 0x9DA1959E, 0x939B9F93,
+ 0x9F939B9F, 0x9B9F939B, 0x939B9F93, 0xA2959B9F,
+ 0x9CA3969B, 0x969A9E92, 0x9E929EA2, 0x9EA2969A,
+ 0x97A0A498, 0xA5989FA3, 0x9EA5969E, 0x939BA293,
+ 0xA4939CA4, 0x9EA4939E, 0x96A0A596, 0xA498A0A5,
+ 0xA0A498A0, 0x98A0A498, 0xA89DA0A4, 0xABB1A6A2,
+ 0xA2ADB1A5, 0xACA1AAAE, 0xA8ACA1A8, 0xA5A5AC9F,
+ 0xB1A5ADB1, 0xADB1A5AF, 0xA6AAADA4, 0xB3AAAAAF,
+ 0xB0B3AAB0, 0xACADB4AD, 0xB0A8ABB3, 0xADB5AEA5,
+ 0xAAAEB3AA, 0xB4AEAEB3, 0xB0B4AEB0, 0xB6B1B5B0,
+ 0xBFBAB5BB, 0xB8BFBAB9, 0xB5B5BBB6, 0xBEB9B4BA,
+ 0xBABEB9BA, 0xBDBCBFBD, 0xBFBEBABF, 0xB9BFBEB9,
+ 0xBDB9C0BD, 0xBFBDBABF, 0xBEBFBDBE, 0xBBB6B8B8,
+ 0xBFC0B7BC, 0xB8C0BFBA, 0xBEBABFBD, 0xC0BEBDC0,
+ 0xBBC0BEBB, 0xBEB9BFBE, 0xBDBBB9BF, 0xBABDBBB8,
+ 0xB5ADB2B0, 0xBCBAB2B7, 0xB9BCBAB9, 0xBCB8BFBC,
+ 0xBFBAB8BF, 0xB9C0BDB8, 0xBBB6BCBB, 0xBAB7B6BC,
+ 0xB3BAB5B3, 0xB9B5BBB6, 0xBEBCB8BE, 0xB7BCBAB9,
+ 0xBBB8BDBB, 0xBFBCB8BD, 0xBAC1BEB8, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBBC0BEBA, 0xBABBBFBA, 0xBEBCBBBF,
+ 0xBBBEBCBB, 0xBBBEBFBD, 0xBDBBBCBD, 0xB8BBB9BA,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x41020003, 0x35453D38,
+ 0x2D1F3740, 0x87433254, 0x66A36F57, 0x8766A385,
+ 0x486C5280, 0x26433B25, 0x36284038, 0x4422162C,
+ 0x253C382F, 0x3122422F, 0xA36C4F86, 0x62A48563,
+ 0x74578F86, 0x3A402E53, 0x304F2A1E, 0x3323423F,
+ 0x07080808, 0xB3B10809, 0xB2B3AFB2, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB8B5BAB8, 0xBAB8B5BA,
+ 0xB5BAB8B5, 0xB6B5BBB6, 0xBCB7B5BB, 0xB7BDB8B6,
+ 0xB5B6BCB7, 0xBBB6B5BC, 0xB5BBB6B5, 0xB8B5BBB6,
+ 0xBAB8B5BA, 0xB5BCB9B5, 0xB8B3BAB7, 0xB9B8B3B9,
+ 0xB2B8B7B3, 0xB8B0B8B7, 0xB8B9B1B9, 0xB3B8B9B3,
+ 0xB8B3B7B8, 0xB7B8B3B7, 0xB4B9B8B3, 0xB8B5BAB8,
+ 0xBAB8B5BA, 0xB5BAB8B5, 0xB9B6BBB9, 0xBCB7B6BB,
+ 0xB5BCB9B6, 0xB7B3BAB7, 0xBBB9B3B8, 0xB6BBB9B6,
+ 0xB8B5BAB9, 0xB9B7B3B9, 0xB5BAB8B4, 0xBAB9BCBA,
+ 0xBAB8B9BC, 0xABB0AEB5, 0xB9ADB0AE, 0xB6B3B6BB,
+ 0xA2A9A6AF, 0xB2ADB3B2, 0xB3B1ADB3, 0xB3B8B6AE,
+ 0xB9B8BBB9, 0xBBB9B8BB, 0xB7BAB8B8, 0xBDBBBEBC,
+ 0xBDBDBCBF, 0xBCBEBEBB, 0xBBBBBEBC, 0xC1BCBABD,
+ 0xB9BDB8BD, 0xB9B8BBB9, 0xBEBCB8BB, 0xB9BCBABB,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBDC1BCBB, 0xBABEC0BA,
+ 0xA29EBEC0, 0x90948EA1, 0xADA8B0A5, 0xB4AAB1BA,
+ 0xAEB6ACAC, 0xAAAEB4A9, 0xB4ABB1B5, 0xAFB4ABAF,
+ 0xA8AEB4A9, 0xB0A6ABB3, 0xA8B1A7A8, 0xA6A7AFA5,
+ 0xAFA5A8B0, 0xA9B1A7A6, 0xA1A6AEA3, 0xABA0A6AC,
+ 0xACB0A5A5, 0x9FAAAEA3, 0xAAA1A6AA, 0xA6AA9FA7,
+ 0xA0A5A99E, 0xA89BA8AC, 0xA3AA9BA1, 0x96A5AA9B,
+ 0xA99AA0A5, 0xA1A495A6, 0x9EA0A498, 0xA79BA5A9,
+ 0x9FA699A3, 0x9D9BA398, 0xA49AA0A8, 0x9CA49A9C,
+ 0x9A9DA59B, 0xA2959DA5, 0x989F9299, 0x939AA192,
+ 0x9F939DA2, 0x9B9F939B, 0x989C9F96, 0x9D979EA1,
+ 0x989F9899, 0x9B9BA39C, 0xA1999AA2, 0x9BA39C96,
+ 0x95989F98, 0xA39A999E, 0x9EA1989E, 0x989EA198,
+ 0xA1989EA1, 0xA1A19BA0, 0x37A09F9B, 0x05073A38,
+ 0x06050706, 0x01000001, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x2B270001,
+ 0x2A2B272A, 0x52525351, 0x7A785354, 0x7A7B7979,
+ 0x7A7A7B79, 0x7C777B7C, 0x777B7678, 0x717B7D77,
+ 0x7C767577, 0x7678727A, 0x73767872, 0x79737779,
+ 0x7B7B7579, 0x757B7C73, 0x7C727D7E, 0x78796F7B,
+ 0x757D7B73, 0x7D747F7D, 0x7B7C737C, 0x70787970,
+ 0x796F7879, 0x7D7E7478, 0x72787970, 0x65617878,
+ 0x5C5B5766, 0x3861615B, 0x04003E41, 0x00040000,
+ 0x37000100, 0x59503C3B, 0x56595056, 0x765E605A,
+ 0x7B777A7C, 0x7A7C767A, 0x737B7B75, 0x7C737B7C,
+ 0x7B7C737B, 0x757E7E78, 0x7B727B7B, 0x7B7C737A,
+ 0x73787970, 0x82797B7C, 0x7D7E7581, 0x6F787970,
+ 0x79707778, 0x7A7B7178, 0x7278796F, 0x796F7B7C,
+ 0x78796F78, 0x71777B70, 0x7C71787C, 0x787B7278,
+ 0x517E7D79, 0x52515452, 0x2B2A2656, 0x002D2B2A,
+ 0x01000001, 0x00010000, 0x01020301, 0x03010003,
+ 0x00030100, 0x01000000, 0x00020101, 0x00000101,
+ 0x00010101, 0x00000000, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000200, 0x02000002, 0x01000000,
+ 0x00000101, 0x00010000, 0x62080A04, 0x9B92686B,
+ 0x979A9198, 0x89959B90, 0x968A8F96, 0x979B8F92,
+ 0x92989C90, 0x9D919A9E, 0x999D9199, 0x939B9F93,
+ 0xA1959B9F, 0x9A9E929D, 0x909A9E92, 0x9C90989C,
+ 0x9B9F9398, 0x959DA195, 0x9F939DA1, 0x9B9F939B,
+ 0x939B9F93, 0xA1959B9F, 0x9DA1959D, 0x98A0A498,
+ 0xA094A0A4, 0x9DA1959C, 0x94A0A498, 0xA4989CA0,
+ 0x9DA195A0, 0x969EA296, 0xA2969EA2, 0x9EA2969E,
+ 0x989FA397, 0xA497A0A4, 0x9FA6979D, 0x959EA596,
+ 0xA6959EA6, 0xA0A8979E, 0x9BA1A899, 0xA89BA1A8,
+ 0xA1A89BA1, 0x9DA2A89D, 0xA79EA2A8, 0xA8AEA3A2,
+ 0xA0ACB0A4, 0xACA0A8AC, 0xABAFA3A8, 0xA5ADB1A5,
+ 0xB5A9ADB1, 0xACB0A4B3, 0xA8ACAFA6, 0xB2A9ACB1,
+ 0xACB1A8AF, 0xAEACB3AC, 0xB3ACADB5, 0xB0B8B1AB,
+ 0xAAAEB3AA, 0xB5ACB0B3, 0xB0B5ACB0, 0xB9B2B9B2,
+ 0xC0B9B9C0, 0xB5BCB5B9, 0xB9B7BBB6, 0xBDBBBABE,
+ 0xBABDBBBA, 0xBBB9BFBA, 0xC1BEBAC0, 0xB9C0BDBA,
+ 0xBEBABFBE, 0xBFBDBABF, 0xBCBFBDBC, 0xBBB9BBBB,
+ 0xBCBBB9BB, 0xBAC0BFB7, 0xBEBCC1BF, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBFB9BFBE, 0xBEBCBAC0, 0xB8BDBBB9,
+ 0xBCB2B7B6, 0xC0C0B8BD, 0xB9BBBBBE, 0xBCB8BFBC,
+ 0xBEBBB8BF, 0xB9C0BDB7, 0xBAB6BCBB, 0xBAB5B4BD,
+ 0xB3BBB4B3, 0xB8B5BCB5, 0xBDBCB9BD, 0xBBC0BFB8,
+ 0xBEBABFBE, 0xBFBEBABF, 0xBBC1C0B9, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBBC0BEBA, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABEBFBB, 0xBDBBBDBE, 0xB7BAB8BA,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x41020003, 0x35453D38,
+ 0x2D1F3740, 0x87453154, 0x66A36F57, 0x8766A385,
+ 0x486D5381, 0x26433B25, 0x36284038, 0x4521142C,
+ 0x253C382E, 0x3122422F, 0xA36A5086, 0x62A48563,
+ 0x73568E86, 0x3A402E53, 0x304F2A1E, 0x3223423F,
+ 0x08080808, 0xB3B10808, 0xB2B3AFB2, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB9B5BAB8, 0xBBB9B6BB,
+ 0xB5BAB8B6, 0xB7B6BCB7, 0xBDB8B6BC, 0xB6BCB7B7,
+ 0xB6B6BCB7, 0xBDB8B5BB, 0xB8BCB7B9, 0xB7B6BCB7,
+ 0xBCBAB6BC, 0xB5BAB8B7, 0xB8B4BBB8, 0xB9B8B4BB,
+ 0xB3B9B8B3, 0xB8B0B8B7, 0xB6B7B1B9, 0xB1B6B7B1,
+ 0xB7B3B7B8, 0xB7B8B2B6, 0xB4B9B8B3, 0xB8B5BAB9,
+ 0xBAB8B5BA, 0xB5BAB8B5, 0xB8B4B9B7, 0xBAB8B5BA,
+ 0xB2B9B6B5, 0xB9B3B9B8, 0xBAB8B4BA, 0xB6BBB9B5,
+ 0xB8B6BBBA, 0xB9B7B3B9, 0xB6BBB9B4, 0xB9B7BAB8,
+ 0xBCBAB8BB, 0xB6BBB9B7, 0xB3B2B5B3, 0xB6B3B0B5,
+ 0xB5BCB9AF, 0xB7BBC1C0, 0xB8B6B2B8, 0xB3B8B6B3,
+ 0xB9B6B9B7, 0xBBB9B8BB, 0xB8BBB9B8, 0xBDBABDBB,
+ 0xBFBDBCBF, 0xBCBFBDBC, 0xBBBCBFBD, 0xBDB8BABD,
+ 0xB8BCB7B9, 0xBDB8BBB9, 0xBFBDBCBF, 0xBCBFBDBC,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBABEC0BA,
+ 0xBFBBBEC0, 0xADB1ABBE, 0xA9A3ABA1, 0xB5ABACB4,
+ 0xACB4AAAD, 0xABAFB4AB, 0xB4ABAFB4, 0xAFB4ABAF,
+ 0xA6ADB3A8, 0xB1A7ABB1, 0xACB4AAA9, 0xA7A9B1A7,
+ 0xAFA5A8B1, 0xA4ACA2A6, 0xA2A4ACA2, 0xACA1A7AD,
+ 0xA8ACA0A6, 0xA3A6AA9F, 0xADA2AAAE, 0xA9ADA2A9,
+ 0x9DA3A79C, 0xA99DA3AA, 0xA3A899A5, 0x9BA3A899,
+ 0xA495A5AA, 0xA2A596A1, 0x9EA0A499, 0xA99DA5A9,
+ 0xA3AA9DA5, 0x9A9DA59A, 0xA79E9DA5, 0x9FA49BA2,
+ 0x9F9DA59B, 0xA99EA2AA, 0x9CA396A1, 0x989EA598,
+ 0x9F93A0A4, 0x9D9E949D, 0x989EA297, 0xA09A9EA1,
+ 0x989D949C, 0x9A99A197, 0xA0999CA4, 0x9BA39C98,
+ 0x979CA49A, 0xA4999BA0, 0x9EA297A0, 0x989FA299,
+ 0xA1989EA1, 0xA0A198A0, 0x9BA0A198, 0x6C6CA09F,
+ 0x0606066C, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000100, 0x2B290001, 0x292A282A,
+ 0x594B4C4A, 0x6C6A5A5B, 0x787C7769, 0x7A7E7F7B,
+ 0x7C767E80, 0x7A7C767A, 0x73767872, 0x79737779,
+ 0x79797377, 0x757B7B75, 0x79707D7E, 0x7B7C7378,
+ 0x787B7C73, 0x7A747E7E, 0x7B7B757A, 0x737B7C73,
+ 0x7C737B7C, 0x7B7C737B, 0x72787970, 0x5B557678,
+ 0x5A5C5659, 0x3B5E605A, 0x03003F41, 0x02030002,
+ 0x35020000, 0x59503A39, 0x58595058, 0x6E60605A,
+ 0x726E7372, 0x73726E73, 0x6775756F, 0x756F6F70,
+ 0x73756F75, 0x727B7B75, 0x7B757678, 0x7B7C737B,
+ 0x727B7B75, 0x7B757A7B, 0x7879707B, 0x73787872,
+ 0x7E757B7C, 0x7D7E757D, 0x757D7E75, 0x81787D7E,
+ 0x80817880, 0x58787B72, 0x61585E61, 0x2B2D275E,
+ 0x002B2928, 0x00000200, 0x02000002, 0x00000100,
+ 0x01000001, 0x00010000, 0x01000301, 0x03010003,
+ 0x00030100, 0x00000000, 0x00010000, 0x00000100,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000002, 0x00000000,
+ 0x01000001, 0x4B4C4800, 0x91989B92, 0x9C91989C,
+ 0x999D9298, 0x89969D90, 0x9C908F96, 0x989C9098,
+ 0x91999D91, 0x9D91999D, 0x999D9199, 0x93989C90,
+ 0x9E929B9F, 0x9CA0949A, 0x909B9F93, 0x9F93989C,
+ 0x9DA1959B, 0x959CA094, 0xA1959DA1, 0x9A9E929D,
+ 0x959B9F93, 0xA1959DA1, 0xA0A4989D, 0x98A0A498,
+ 0xA498A0A4, 0xA0A498A0, 0x98A0A498, 0xA397A0A4,
+ 0xA0A4989F, 0x9AA2A69A, 0xA69AA2A6, 0xA2A69AA2,
+ 0x9BA3A79B, 0xA89BA3A7, 0xA1A89BA1, 0x979FA697,
+ 0xA798A0A8, 0xA0A798A0, 0x9DA3AA9D, 0xAA9DA3AA,
+ 0xA3AA9DA3, 0x9CA3A99E, 0xA89DA1A7, 0x9EA499A2,
+ 0xA3A8ACA1, 0xAFA4ABAF, 0xADB1A5AB, 0xA5ADB1A6,
+ 0xB0A4ADB1, 0xABAFA4AC, 0xA9AAAFA6, 0xAFA6ADB2,
+ 0xACB1A8AA, 0xAEAEB5AE, 0xB3ACADB5, 0xAEB5AEAB,
+ 0xABAEB2AC, 0xB5ACAFB4, 0xB1B9AFB0, 0xB9B4BBB4,
+ 0xBCB5B9C0, 0xB6BAB4B5, 0xB9BABEB9, 0xBDBBBABE,
+ 0xBABDBBBA, 0xBBB8BDBB, 0xC0BDBAC0, 0xB9C0BDB9,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBCB7BCBB,
+ 0xBCBBB8BD, 0xB8BDBBB7, 0xBEBBC0BF, 0xC1BFBAC1,
+ 0xBAC1BEBC, 0xBEB9BFBE, 0xBCBBB9BF, 0xB7BDBCB6,
+ 0xBBB7BCBB, 0xBBBBB7BC, 0xB9BBBBB9, 0xBCB8BEBD,
+ 0xBFBCB8BF, 0xB8BFBCB8, 0xBAB4BCBB, 0xBAB7B4BD,
+ 0xB2B9B4B1, 0xBAB5BCB5, 0xBCBBBBBF, 0xB8BDBCB7,
+ 0xBCBABFBE, 0xBDBCB8BD, 0xB9C0BDB7, 0xBDB9BEBC,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBBBBBFBA, 0xBFBABCC0,
+ 0xBBBFBABB, 0xBABEBFBB, 0xBFBDBDBE, 0xBCBFBDBC,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x41020003, 0x35453D38,
+ 0x2D1F3740, 0x87453154, 0x66A37157, 0x8766A387,
+ 0x476D5381, 0x26433A24, 0x36284038, 0x4522152D,
+ 0x253C382E, 0x3122422F, 0xA36A5085, 0x62A48364,
+ 0x75589086, 0x3A3F2D52, 0x2A492A1E, 0x31224139,
+ 0x07080709, 0xB3B10707, 0xB0B4AFB0, 0xB6B8BCB6,
+ 0xBBB6B8BC, 0xB8BCB7B7, 0xB7B6BCB7, 0xBBB9B6BC,
+ 0xB6BBB9B6, 0xBBB7BCBA, 0xBEB9B8BD, 0xB8BEB9B8,
+ 0xBBB9BDB8, 0xBDBBBABD, 0xB8BDBBB8, 0xBAB9BCBA,
+ 0xBCBBB9BC, 0xB7BCBBB7, 0xBAB5BBBA, 0xBBBAB5BB,
+ 0xB5BBBAB5, 0xB7B3B9B8, 0xB8B7B2B8, 0xB2B8B7B2,
+ 0xB8B3B8B7, 0xB9B8B4B9, 0xB3B9B8B3, 0xBAB5BBBA,
+ 0xBBBAB5BB, 0xB6BBBAB6, 0xB9B9BBBB, 0xB8B8B7B9,
+ 0xB7BCBBB6, 0xBAB5BBBA, 0xBCB9B5BB, 0xB6BDBAB5,
+ 0xB8B4B9B8, 0xBBBAB4B9, 0xB6BBBAB6, 0xBCB7BCBB,
+ 0xBCBBB8BD, 0xB7BCBBB7, 0xBAB6BBB9, 0xBEB9B7BC,
+ 0xB9C0BDB8, 0xBEB9BFBE, 0xC0BFB9BF, 0xB7BCBBBA,
+ 0xB8B5B7B7, 0xBDBCB6B8, 0xB7BCBBB8, 0xBDB8BDBC,
+ 0xC0BEBABF, 0xBCC0BBBD, 0xB7B9BDB8, 0xBDBBB8BC,
+ 0xBCBFBDBA, 0xBDB8BBB9, 0xBDBBBCBF, 0xBCBFBDBA,
+ 0xBBBDC0BE, 0xBDB8BABD, 0xBABEB9B9, 0xB7B7BBB6,
+ 0xC3BFBABB, 0xBDC1BCC2, 0xA2A4ABA4, 0xB5ACA4AC,
+ 0xB0B5ACB0, 0xACAEB6AC, 0xB3ACACB3, 0xACB4AAAC,
+ 0xA9ACB1A8, 0xB2A9AFB2, 0xB0B5ACAD, 0xA5A9B1AA,
+ 0xB1AAA4AC, 0xAAB2A8A9, 0xA4A7AFA5, 0xB0A5A7AF,
+ 0xA6ACA1AA, 0xA2A6ADA0, 0xADA1A8AF, 0xA8ACA0A9,
+ 0x9CA2A99C, 0xACA0A2A9, 0xA4A89CA8, 0xA0A5A99D,
+ 0xAA9BA8AC, 0xA4A99AA5, 0x9CA0A499, 0xA99EA3A7,
+ 0xA3A79CA5, 0x989EA499, 0xA4999DA3, 0x9EA4999E,
+ 0x999EA499, 0xA79C9EA4, 0x9EA499A1, 0x969AA095,
+ 0xA3989BA1, 0x9A9E939F, 0x999EA297, 0xA39AA0A4,
+ 0x9C9F96A0, 0x979A9D94, 0xA2999DA0, 0x9CA1989F,
+ 0x949EA39A, 0xA198999F, 0x9EA1989E, 0x979A9C96,
+ 0xA1989DA0, 0x9CA0959E, 0x969CA095, 0xA39F9C9F,
+ 0x9C9D99A2, 0x05393A36, 0x06080607, 0x06050707,
+ 0x00000000, 0x00000001, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x1B1B0000, 0x2829271B, 0x5B413F3E,
+ 0x5F5B605F, 0x5E5F5B60, 0x777A7B77, 0x7C77787C,
+ 0x7A7C7678, 0x7880807A, 0x81788081, 0x80817880,
+ 0x777A7C76, 0x7B777A7B, 0x7A7B777A, 0x7880807A,
+ 0x81788081, 0x80807A80, 0x777A7C76, 0x544E797D,
+ 0x50544E50, 0x3450544F, 0x01003738, 0x00010000,
+ 0x2A020000, 0x443F312E, 0x47443F47, 0x7A585551,
+ 0x7B7A7F7B, 0x7D7C787F, 0x767C7B77, 0x7B777A7C,
+ 0x787C777A, 0x777A7B77, 0x7B77787C, 0x7A7C767A,
+ 0x767A7B77, 0x7B777A7C, 0x7A7C767A, 0x72777874,
+ 0x78727678, 0x78787278, 0x5B605F5B, 0x403C605F,
+ 0x201F1B41, 0x00212220, 0x01000001, 0x00010000,
+ 0x00020000, 0x00000200, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x0D0E110F,
+ 0x706B0C12, 0x9B9F996C, 0x929BA097, 0x9B92969B,
+ 0x989C9198, 0x8B969D90, 0x978C9198, 0x969C9191,
+ 0x92999D91, 0x9E929A9E, 0x999D919A, 0x939CA094,
+ 0x9F939B9F, 0x9EA2969B, 0x90989C90, 0x9F93989C,
+ 0x9EA2969B, 0x949B9F94, 0xA1959B9F, 0x9B9F939D,
+ 0x919B9F94, 0x9F93989C, 0x9DA1959B, 0x929CA192,
+ 0xA2969CA1, 0xA0A4989E, 0x989FA398, 0xA3989FA3,
+ 0xA1A59A9F, 0x97A3A79B, 0xA4959FA3, 0xA1A8999D,
+ 0x9BA3A79B, 0xA69AA3A7, 0xA3A79BA2, 0x99A3A79B,
+ 0xA89CA3A8, 0xA2A69AA4, 0x9CA3A79B, 0xA79BA3A7,
+ 0xA3A79BA3, 0x98A0A498, 0xA89CA0A4, 0xA5A99EA4,
+ 0x9FA8A99F, 0xADA4A8A9, 0xADB1A6AA, 0xAAAFB4AB,
+ 0xB0A5AFB5, 0xA8B0A5AA, 0xACADB4AD, 0xB0A9ACB3,
+ 0xA9B0A9A9, 0xAFABB3AC, 0xB3ACAEB6, 0xAEB5AEAC,
+ 0xADB0B4AE, 0xB9B2AFB3, 0xB9C0B9B2, 0xB7B8BEB9,
+ 0xBCB7B8BC, 0xBBBFBAB8, 0xBDBCBFBD, 0xBEBEBCBF,
+ 0xBCBFBDBC, 0xBDBABFBD, 0xBFBEB9C0, 0xBABFBDBA,
+ 0xBDB9C0BD, 0xBFBDBABF, 0xBABFBDBA, 0xBFB6BCBB,
+ 0xBDBBBAC0, 0xB5BAB8B8, 0xBEB7BDBC, 0xC1C0B7BF,
+ 0xB8C0BFBB, 0xC1B8C0C0, 0xBABAB9C1, 0xABB3B3B0,
+ 0xBBB2B8B7, 0xBCBBB7BC, 0xB7BBBCB7, 0xBCB6BBBC,
+ 0xBDBCB7BD, 0xB5BDBCB7, 0xBAB3BBBA, 0xB8B7B3BB,
+ 0xB0B9B6B0, 0xB6B5BBB6, 0xBDBBB7BB, 0xB8BDBBBA,
+ 0xBCBABFBD, 0xC0BDB8BF, 0xB9C0BDB9, 0xBBB9C0BD,
+ 0xC0BDB9C0, 0xB9C0BDB9, 0xBDBABFBD, 0xC0BEBABF,
+ 0xBABFBDBB, 0xBDBDC0BE, 0xBDBBBCBF, 0xBBBEBCBA,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x42020004, 0x35453D37,
+ 0x2D1F3740, 0x86422E51, 0x66A37056, 0x8766A387,
+ 0x476D5381, 0x27423A24, 0x36293F38, 0x4422162C,
+ 0x253C382F, 0x3122422F, 0xA56A5085, 0x64A68566,
+ 0x75589088, 0x3A402E53, 0x2A492A1E, 0x32234239,
+ 0x08080709, 0xB3B10808, 0xB0B4AFB0, 0xB6B8BCB6,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B6BCB7, 0xBBB9B6BC,
+ 0xB7BCBAB6, 0xBBB8BDBB, 0xBEB9B8BD, 0xB9BFBAB8,
+ 0xBBBABDBB, 0xBDBCBABD, 0xB8BDBCB8, 0xBBB9BBBB,
+ 0xBCBBB7BC, 0xB7BCBBB7, 0xBAB5BBBA, 0xBBBAB5BB,
+ 0xB6BCBBB5, 0xB8B4BAB9, 0xB9B8B3B9, 0xB2B8B7B3,
+ 0xB8B5BAB9, 0xB9B8B4B9, 0xB5BBBAB3, 0xBAB5BBBA,
+ 0xBBBAB5BB, 0xB5BAB9B5, 0xB8B6B8B8, 0xBBBBB6B8,
+ 0xB7BCBBB9, 0xB9B6BBBA, 0xBCB9B5BC, 0xB2B9B6B5,
+ 0xBAB5BBBA, 0xB9B8B6BB, 0xB6BBBAB4, 0xBBB7BCBB,
+ 0xBCBBB7BC, 0xB6BBBAB7, 0xBBB6BBB9, 0xBFBAB8BD,
+ 0xB8BDBBB9, 0xBBB7BEBB, 0xBCBBB6BC, 0xB2B7B6B6,
+ 0xB8B6B8B8, 0xBDBCB6B8, 0xB7BDBCB8, 0xBDB7BCBB,
+ 0xBEBCBABF, 0xBABEB9BB, 0xB9B9BDB8, 0xC0BEBABE,
+ 0xBCBFBDBD, 0xBDBABDBB, 0xBFBDBCBF, 0xBCBFBDBC,
+ 0xBBBCBFBD, 0xBCB7BABD, 0xB9BDB8B8, 0xBBBCBFBD,
+ 0xBEBABABD, 0xC0C4BFBD, 0xA4B9C0B9, 0xABA2A4AB,
+ 0xB0B5ACA6, 0xA9AAB2AB, 0xB3ACA8B0, 0xAEB5AEAB,
+ 0xA9AEB3AA, 0xB4ABAFB2, 0xAEB3AAB1, 0xA5A8AFA8,
+ 0xB3ACA4AC, 0xAAB2A8AC, 0xA8A9B1A7, 0xB1A6AAB2,
+ 0xA8AEA3AB, 0x9FA6ACA1, 0xADA0A5AC, 0xA6ADA0A6,
+ 0x9EA6ADA0, 0xACA0A4AB, 0xAAACA0A8, 0x9EA4A89C,
+ 0xAA9BA6AA, 0xA3A899A5, 0x99A3A79B, 0xA79CA0A4,
+ 0xA1A59AA3, 0x9B9FA59A, 0xA499A0A6, 0xA1A79C9E,
+ 0x999FA59A, 0xA39A9EA4, 0x9FA49B9E, 0x989A9F96,
+ 0xA4999CA1, 0x9DA196A0, 0x999A9E93, 0xA39AA0A4,
+ 0x9EA297A0, 0x979E9F95, 0xA097A0A1, 0x9E9F969F,
+ 0x95A0A499, 0x9F969AA0, 0x9EA1989C, 0x989C9E98,
+ 0xA1989C9E, 0xA0A4999E, 0x959CA095, 0x9F969CA0,
+ 0x9FA2999C, 0x69A0A39A, 0x07076D6F, 0x05050507,
+ 0x00000000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010101, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00010002, 0x28292A28, 0x2A28272A,
+ 0x52534F27, 0x50545551, 0x56505554, 0x7E807A56,
+ 0x78787C77, 0x7C7A777A, 0x7A7B797B, 0x7980807A,
+ 0x817B7F7F, 0x7E807A81, 0x76787C77, 0x544F787C,
+ 0x4E544F4E, 0x36343735, 0x00003538, 0x00010000,
+ 0x2C020000, 0x44402F2D, 0x48454147, 0x7B575352,
+ 0x797A807C, 0x7D7B7A7E, 0x797C7A79, 0x7B797A7B,
+ 0x787C7778, 0x77787B79, 0x7C77787C, 0x787C7778,
+ 0x4F7A7B77, 0x534F5253, 0x53545052, 0x244F504C,
+ 0x28242728, 0x02000029, 0x00020000, 0x00000200,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x9A3B413C,
+ 0xA099999F, 0x99A09999, 0x92959A91, 0x9C93969B,
+ 0x989B9299, 0x90989C91, 0x988D969D, 0x999D9294,
+ 0x91999D91, 0x9D91999D, 0x9A9E9299, 0x939B9F93,
+ 0x9F939B9F, 0x9B9F939B, 0x94989C90, 0xA1959CA0,
+ 0x9DA1959D, 0x959B9F94, 0x9F939DA1, 0x989C909B,
+ 0x939B9F94, 0xA4989A9E, 0xA0A498A0, 0x949EA394,
+ 0x9F939EA3, 0x9EA2969B, 0x989EA297, 0xA2979FA3,
+ 0x9FA3989E, 0x979FA397, 0xA4959FA3, 0x9DA4959D,
+ 0x98A0A498, 0xA89CA0A4, 0xA0A498A4, 0x98A0A498,
+ 0xA397A0A4, 0xA1A5999F, 0x9A9FA398, 0xA79BA1A5,
+ 0xA5A99DA3, 0x9DA5A99D, 0xA89CA5A9, 0xA5A99DA4,
+ 0xA0AAABA2, 0xAAA1A8A9, 0xADB0A7A7, 0xA6B0B5AC,
+ 0xB0A5AAAF, 0xADB5ABA8, 0xACABB3AC, 0xB3ACAAB1,
+ 0xA8B0A9AB, 0xABACB4AD, 0xB1AAAAB2, 0xAEB5AEAA,
+ 0xB3B0B4AF, 0xC0B9B2B8, 0xB9C0B9B9, 0xB9BBBFBA,
+ 0xBFBBBABE, 0xBDBEBABE, 0xBDBABDBB, 0xBBBBBCBF,
+ 0xBABFBEB9, 0xBDBABFBD, 0xBFBEB9C0, 0xBABFBDBA,
+ 0xBCB9C0BD, 0xC0BEBAC1, 0xBABFBDBD, 0xBFB7BDBC,
+ 0xBFBDBAC0, 0xB8BDBBBA, 0xBDB5BABB, 0xBDBDB5BD,
+ 0xB5BDBCB5, 0xBFB8C0C0, 0xB9BCB5BF, 0xA3ADADB0,
+ 0xB2B0B8B7, 0xB7B6ADB3, 0xBBBFC0B2, 0xBDB7BCBD,
+ 0xBDBCB7BC, 0xB7BDBCB7, 0xB9B5BBBA, 0xBBBBB4BA,
+ 0xB0B8B7B3, 0xB9B5BBB6, 0xBAB8BBBF, 0xB8BDBBB7,
+ 0xBBB8BDBB, 0xC0BDB7BE, 0xB9C0BDB9, 0xBCB9C0BD,
+ 0xC0BDBAC1, 0xB9C0BDB9, 0xBEBABFBD, 0xBFBEBBC0,
+ 0xB9BEBCBA, 0xBDBCBFBD, 0xBEBCBCBF, 0xBCBFBDBB,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x42020004, 0x35453D37,
+ 0x2D1F373F, 0x86422E51, 0x66A37056, 0x8866A388,
+ 0x476F5381, 0x27423A24, 0x36293F38, 0x4422162C,
+ 0x253C382F, 0x3122422F, 0xA5694F84, 0x65A68566,
+ 0x75589087, 0x3A402E53, 0x31502A1E, 0x32234240,
+ 0x08080709, 0xB3B10808, 0xB0B4AFB0, 0xB8B9BDB8,
+ 0xBEBCB9BD, 0xB8BDBBB9, 0xBAB6BBB9, 0xBCBBB7BC,
+ 0xB6BBBAB7, 0xBBB7BCBA, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBBABDBB, 0xBDBBBABD, 0xB8BDBBB8, 0xBBB7BCBB,
+ 0xBCBBB7BC, 0xB6BCBBB7, 0xBAB5BBBA, 0xBBBAB5BB,
+ 0xB3BBBAB3, 0xB8B3B9B8, 0xBAB7B3B9, 0xB2B8B7B3,
+ 0xB8B1B6B5, 0xB9B7B4B9, 0xB6BBB9B4, 0xBBB6BBBA,
+ 0xBBBAB5BA, 0xB6BCBBB5, 0xBBB7BCBB, 0xBBBCB7BC,
+ 0xB7BCBBB7, 0xB6B6BBB9, 0xB8B5B2B9, 0xB5BBBAB1,
+ 0xBAB5BBBA, 0xBBBAB5BB, 0xB5BBBAB5, 0xBCB7BCBB,
+ 0xBBBAB8BD, 0xB6BCBBB5, 0xB8B9BEBC, 0xBBB9B7BD,
+ 0xB8BDBBB8, 0xB6B6BDBA, 0xB8B6B2B9, 0xB3B8B7B3,
+ 0xBBB6B8B8, 0xBCBBB9BB, 0xB7BEBBB7, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xBEBFBDBA, 0xBBBABDBB, 0xBFBDBABD,
+ 0xBCBFBDBC, 0xBBBCC0BB, 0xBEBCBABD, 0xBABCBCBB,
+ 0xBBB8BBB9, 0xC0BEBABD, 0xBCBFBDBD, 0xBCBABDBB,
+ 0xBFBABBBE, 0xBDC1BCBB, 0xADB9C0B9, 0xA198ADB4,
+ 0xA6ABA29C, 0xAEADB5AE, 0xB6ACABB6, 0xAEB6ACAD,
+ 0xAAAEB3AA, 0xB2A9AEB3, 0xB0B3AAAF, 0xA8AEB4A9,
+ 0xB2A7ADB3, 0xACB2A7AC, 0xA6A9B1A6, 0xAFA4A9B1,
+ 0xA6ACA1A9, 0xA4A7AFA4, 0xACA1A7AF, 0xA6ACA1A6,
+ 0xA1A7ADA2, 0xA99DA7AE, 0xA8ACA0A5, 0x9AA9ADA1,
+ 0xAA9BA2A6, 0xA8AD9EA5, 0x9BA5AA9B, 0xA499A3A7,
+ 0xA3A99EA0, 0x9F9FA79D, 0xA499A1A9, 0x9FA79C9C,
+ 0x9B9FA79C, 0xA39A9FA4, 0xA1A49B9E, 0x979CA297,
+ 0xA4999CA2, 0x9EA4999E, 0x9B9C9F96, 0xA59AA1A4,
+ 0x9EA4999F, 0x949CA095, 0xA2999D9E, 0xA0A198A1,
+ 0x979EA297, 0x9C939EA2, 0x9CA09A97, 0x969B9D97,
+ 0xA09A9A9C, 0x9CA1989C, 0x959BA196, 0x9F949AA0,
+ 0x9CA0959B, 0x99A0A498, 0xA39AA0A4, 0x393B35A2,
+ 0x00000100, 0x01000002, 0x00010000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x2A2B2900,
+ 0x29272A28, 0x29292729, 0x29292929, 0x51545551,
+ 0x55515455, 0x54555154, 0x4F505351, 0x53515054,
+ 0x282B2950, 0x1C353737, 0x00011A1C, 0x00000000,
+ 0x17000000, 0x2D2C1717, 0x302E2E2F, 0x532F2D2D,
+ 0x53555752, 0x56545458, 0x54565454, 0x54545454,
+ 0x2C2D2B54, 0x28292929, 0x2A28292A, 0x2A2B2729,
+ 0x00010500, 0x03000004, 0x01020002, 0x00000100,
+ 0x01000001, 0x00000000, 0x00010101, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000100, 0x33310001, 0x91979230, 0x98999F9A,
+ 0xA099979F, 0x99A09998, 0x95989D94, 0x9A91999E,
+ 0x9A9D9497, 0x91999D92, 0x998D989C, 0x989C9097,
+ 0x929A9E93, 0x9B90999D, 0x979B9097, 0x91989C90,
+ 0x9D91999D, 0x989C9099, 0x90989C90, 0x9D8E989C,
+ 0x999E8F98, 0x90989C90, 0x9B8F989C, 0x9BA09197,
+ 0x959DA195, 0xA4989DA1, 0xA1A599A0, 0x989FA397,
+ 0xA498A0A4, 0xA0A498A0, 0x99A2A69A, 0xA599A1A5,
+ 0xA1A599A1, 0x9BA3A79B, 0xA89CA3A7, 0xA3A79BA4,
+ 0x9BA3A79B, 0xA69AA3A7, 0xA7A99DA4, 0x9DA3A79B,
+ 0xA99DA5A9, 0xA5A99DA5, 0x9CA5A99E, 0xAB9EA3A7,
+ 0xA2A99CA4, 0x9EA3AA9D, 0xA99DA4AB, 0xA5A99DA5,
+ 0xA1A8A9A0, 0xA9A0A9AA, 0xA6A9A0A6, 0xACAAAFA6,
+ 0xB5AAB0B5, 0xB1B9AFAD, 0xADADB5AE, 0xAFA8ACB4,
+ 0xA7AFA8A7, 0xA7A9B2A8, 0xB0A9A8B1, 0xA8B0A9A8,
+ 0xB5ADB4AD, 0xC0B9B5BC, 0xB5BCB5B9, 0xB9B8BCB7,
+ 0xC0BBBABE, 0xBCC0BBBC, 0xBAB7BBB6, 0xBFBDBBBF,
+ 0xBABFBDBC, 0xBDBBC0BE, 0xBFBDB9C0, 0xBABFBDBA,
+ 0xBEB9C0BD, 0xBEBEBAC1, 0xBABCBCBC, 0xBFB8BEBD,
+ 0xBFBDBAC0, 0xBABFBDBA, 0xBDB7BCBD, 0xBBBBB5BD,
+ 0xB3BBBBB3, 0xC0B8C0C0, 0xB9BCB6C0, 0xB0BABAB0,
+ 0xB7B4BCBB, 0xB8B7B2B8, 0xB2B8B7B2, 0xBBB7BCBB,
+ 0xBDBCB7BC, 0xB8BDBCB8, 0xBEBABCBD, 0xBBBCB9BD,
+ 0xB2B8B7B6, 0xB8B5BBB6, 0xBAB8BABE, 0xB8BDBBB7,
+ 0xBEB8BDBC, 0xBFBEB9BF, 0xBAC1BEB9, 0xBDBABFBD,
+ 0xBFBEBABF, 0xB9BFBEB9, 0xBCBABFBD, 0xBFBDB9BE,
+ 0xBABFBDBA, 0xBCBCBFBD, 0xC0BBBDC1, 0xB8BCB7BC,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x42000004, 0x36433D37,
+ 0x2D20363F, 0x87422D53, 0x65A57055, 0x8866A388,
+ 0x47705482, 0x26433A24, 0x36284038, 0x4422162C,
+ 0x253C382F, 0x3122422F, 0xA5695286, 0x66A78566,
+ 0x76599188, 0x3A412F54, 0x304F2C1E, 0x3223423F,
+ 0x08080709, 0xB4AF0808, 0xB0B4AFB0, 0xB7B8BCB7,
+ 0xBDBBB8BC, 0xB8BDBBB8, 0xBAB7BCBA, 0xBCBBB7BC,
+ 0xB7BCBBB7, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB7BCBB,
+ 0xBCBBB7BC, 0xB6BCBBB6, 0xBBB5BBBA, 0xBBBAB6BC,
+ 0xB5BBBAB5, 0xB8B3B9B8, 0xBAB9B3B9, 0xB4BAB9B4,
+ 0xB7B4B9B8, 0xB8B6B3B8, 0xB7BCBAB3, 0xBAB6BBBA,
+ 0xBBBAB6BB, 0xB4BAB9B5, 0xBCB5BBBA, 0xBDBEB7BD,
+ 0xB7BCBBB9, 0xB6B3B8B6, 0xBBBAB3B8, 0xB5BBBAB5,
+ 0xBCB5BBBA, 0xBAB9B7BD, 0xB5BBBAB4, 0xB9B7BCBB,
+ 0xBCBBB5BA, 0xB6BCBBB6, 0xB9B8BDBB, 0xBDBBB8BE,
+ 0xB8BDBBB8, 0xB7B7BCBA, 0xB8B6B3BA, 0xB3B8B7B3,
+ 0xBCBABCBC, 0xBEBBB8BD, 0xB7BEBBB7, 0xBBB8BDBB,
+ 0xBCBAB8BD, 0xBABDBBB9, 0xBCBCBFBD, 0xC0BEB9BE,
+ 0xBCBFBDBB, 0xB8BBBEBC, 0xBBB9B7BA, 0xB8BABAB8,
+ 0xBDBBBEBC, 0xBFBDBCBF, 0xBCBFBDBC, 0xBDBBBEBC,
+ 0xBEB9BCBF, 0xB6BCB7BA, 0xBAB9C0B9, 0xB4AEB9C1,
+ 0xA4ABA4B0, 0xADA8B0A9, 0xB6AFAAB5, 0xAEB6ACAE,
+ 0xAAB1B6AD, 0xB5ACAEB3, 0xB2B5ACB2, 0xA9B1B5AA,
+ 0xB4A9B0B4, 0xAEB4A9AE, 0xA3A8B0A6, 0xABA2A6AE,
+ 0xA9AEA5A6, 0xA7A9B1A7, 0xB1A6A9B1, 0xA7ADA2AB,
+ 0xA1A6ACA1, 0xA89CA8AC, 0xA6AA9EA4, 0x9DA8ACA0,
+ 0xACA0A5A9, 0xA8ACA0A8, 0x9CA8ACA0, 0xA79BA4A8,
+ 0xA3A99EA3, 0x9FA2AAA0, 0xA79CA1A9, 0x9DA59A9F,
+ 0xA09FA79C, 0xA39AA2AA, 0x9FA49B9E, 0x979EA499,
+ 0xA2979CA2, 0x9EA4999C, 0x989CA198, 0xA4999CA1,
+ 0x9FA59A9E, 0x939CA297, 0xA2989A9E, 0xA0A198A1,
+ 0x9A9EA198, 0x9E95A0A3, 0x9A9E9899, 0x989EA09A,
+ 0x9E989C9E, 0x9CA1989A, 0x949DA398, 0xA196999F,
+ 0x9CA0959D, 0x97A1A599, 0xA3999FA3, 0xA0A39AA2,
+ 0x21646863, 0x01002023, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01010102, 0x00000001, 0x01000000, 0x00010101,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x01000200, 0x03010003,
+ 0x01030300, 0x01000001, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x07080507,
+ 0x05070805, 0x08050708, 0x07050406, 0x06060605,
+ 0x05050506, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000400, 0x03000004, 0x02030102, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x6132332F, 0x97926266, 0x91989193, 0x9699A197,
+ 0xA19797A0, 0x99A19799, 0x93989D94, 0x9B92999C,
+ 0x989B9298, 0x909A9B91, 0x998D9A9C, 0x989A8E97,
+ 0x90969A8F, 0x9B90979B, 0x979B9097, 0x90989C90,
+ 0x9C90989C, 0x989C9098, 0x8F989C90, 0xA192979B,
+ 0x9CA1929C, 0x959DA195, 0xA2939DA1, 0x9DA2939D,
+ 0x959A9E92, 0xA1959DA1, 0xA0A4989D, 0x97A1A599,
+ 0xA5999FA3, 0xA0A498A1, 0x9AA1A599, 0xA599A2A6,
+ 0xA1A599A1, 0x9BA3A79B, 0xA69AA3A7, 0xA3A79BA2,
+ 0x9DA2A69A, 0xA99DA5A9, 0xA8AA9EA7, 0x9DA5A99D,
+ 0xA99DA5A9, 0xA5A99DA5, 0x9CA5A99E, 0xA598A3A7,
+ 0xA1A89B9E, 0x9BA2A99C, 0xA79BA1A8, 0xA2A69BA3,
+ 0x9FA8A9A0, 0xA9A0A7A8, 0xA6ABA2A6, 0xA2A7ACA3,
+ 0xABA0A6AB, 0xADB5ABA5, 0xA9ACB3AC, 0xB3ACA8B0,
+ 0xAEB6AFAB, 0xACACB4AD, 0xB2ABABB3, 0xB1B8B1AB,
+ 0xB5B9C0B9, 0xB8B2B5BC, 0xB7BBB5B4, 0xB6BABEB9,
+ 0xBEB9B7BB, 0xBBBFBABA, 0xB8B9BDB8, 0xBFBDB9BD,
+ 0xBCBFBDBC, 0xBDBABFBD, 0xBFBDB9C0, 0xBBC2BFBA,
+ 0xBEBAC1BE, 0xBEBEBAC1, 0xB9BEBDBC, 0xBFB9BFBE,
+ 0xBFBEBAC0, 0xB9BFBEB9, 0xBDB8C0C0, 0xBABBB5BD,
+ 0xB3BBBBB5, 0xC0B9C1C1, 0xBABAB6C0, 0xAFB9B9B0,
+ 0xBFB6BCBB, 0xC1BEBAC0, 0xACB2B1BA, 0xBCB3B9B8,
+ 0xBDBCB8BD, 0xB8BDBCB8, 0xBFBBBDBD, 0xBCBDBCBE,
+ 0xB2B7B6B8, 0xBAB7BBB6, 0xBDBBBBBF, 0xB9BEBCBA,
+ 0xBFB9BFBE, 0xBFBEBAC0, 0xB9BFBEB9, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBAC0BFB9, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBBBCC0BB, 0xBEB9BCC0, 0xB8BCB7BA,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x42010005, 0x36433B37,
+ 0x2D20363F, 0x87422D53, 0x65A57255, 0x8865A588,
+ 0x476D5383, 0x26433824, 0x36284038, 0x4421152B,
+ 0x253C382F, 0x3121432F, 0xA5674F85, 0x65A68366,
+ 0x75589085, 0x3B3F2D52, 0x2A492D1F, 0x32234239,
+ 0x07080808, 0xB4AF0809, 0xB0B4AEB0, 0xB7B8BCB7,
+ 0xBCBAB8BC, 0xB7BCBAB7, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBBB9BEBC, 0xBEB9B8BD, 0xB8BDBBB8,
+ 0xBBB7BDBC, 0xBDBCB6BC, 0xB7BDBCB7, 0xBBB7BEBB,
+ 0xBDBBB7BE, 0xB8BDBBB8, 0xBAB7BCBA, 0xBCBBB7BC,
+ 0xB6BCBBB7, 0xBCB5BABB, 0xBBBCB6BB, 0xB7BCBBB7,
+ 0xBBB8BDBC, 0xB9B8B7BC, 0xB6BBBAB4, 0xBBB7BCBB,
+ 0xBCBBB7BC, 0xB8BDBBB7, 0xBAB6BBB9, 0xBCBBB7BC,
+ 0xB4B9B8B7, 0xBBB8BDBC, 0xBDBCB7BC, 0xB6BCBBB7,
+ 0xBCB5BDBC, 0xBCBBB7BD, 0xB7BCBBB6, 0xBCB7BCBB,
+ 0xBDBCB8BD, 0xB7BDBCB7, 0xBBB8BDBB, 0xBEB9B8BD,
+ 0xB8BDBBB8, 0xB8B8BDBB, 0xB9B8B4B9, 0xB7BCBBB4,
+ 0xBBB5BAB9, 0xBFBCB8BD, 0xB7BEBBB8, 0xBEB7BDBC,
+ 0xBFBEB9BF, 0xB9BFBEBA, 0xBBB9BFBE, 0xBFBEB6BC,
+ 0xBABFBDB9, 0xB8B8BDBB, 0xBBB9B5BA, 0xBABFBDB6,
+ 0xBEBABFBD, 0xBDBBBBC0, 0xBABDBBBA, 0xB7B7BDB8,
+ 0xBCBAB6BC, 0xB8BEB9B9, 0xB9B9C0B9, 0xC0B9B8C0,
+ 0xA9B1AAB8, 0xADA3ABA4, 0xB3ACACB4, 0xAEB5AEAC,
+ 0xACB0B5AC, 0xB5ACB2B5, 0xB0B3AAB2, 0xA9AEB3AA,
+ 0xB2A8ADB2, 0xA9B1A7AA, 0xA6A5ADA6, 0xB1AAA7B0,
+ 0xA8B0A6AA, 0xA7A5ADA3, 0xB1A6A9B1, 0xA9ADA1AB,
+ 0xA5A9ADA2, 0xAB9CADB1, 0xA8AB9CA8, 0xA1A9ADA1,
+ 0xABA2A9AD, 0xA6A9A0AA, 0xA1A8ACA1, 0xA89BA7AE,
+ 0xA2A99CA1, 0x9EA3A99E, 0xAA9DA3A9, 0xA1A89BA3,
+ 0x9EA0A99C, 0xA89EA1A9, 0x9FA49BA0, 0x9BA0A59C,
+ 0xA39AA1A4, 0x9EA39AA0, 0x989EA39A, 0xA59B9AA2,
+ 0x9EA69C9D, 0x959DA59B, 0x9F949AA0, 0xA1A49B99,
+ 0x989A9F96, 0xA39A9CA1, 0x9C9F96A0, 0x959EA198,
+ 0x9F969B9E, 0xA0A39A9C, 0x989EA198, 0x9E989EA1,
+ 0x9C9E989C, 0x959FA096, 0xA1979E9F, 0x9EA198A0,
+ 0x9A9B9F9A, 0x736E999F, 0x171B166D, 0x00020300,
+ 0x03000203, 0x01020002, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01020001, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010200, 0x00000001,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000000, 0x01010101, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000102, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x100E110F, 0x110F0F12, 0x72736F0E,
+ 0x9AA0A29C, 0x9C93A0A3, 0x96999099, 0x90949A8F,
+ 0x9C8F949D, 0x949B8E95, 0x90969990, 0x99909899,
+ 0x98998F98, 0x909A9C90, 0x9B8F9A9C, 0x9A9C9099,
+ 0x93989C90, 0x9F949B9F, 0x9CA0959B, 0x929AA194,
+ 0xA1929AA1, 0x9AA1929A, 0x909BA293, 0xA394989F,
+ 0x9CA3949C, 0x969CA396, 0xA3949CA3, 0x9CA3949C,
+ 0x939AA192, 0xA1949BA2, 0x9CA3969A, 0x979DA398,
+ 0xA3979CA2, 0xA0A4989F, 0x98A0A498, 0xA899A0A4,
+ 0xA4A99AA3, 0x9BA3A79B, 0xA79CA3A7, 0xA0A499A3,
+ 0x9BA4A89C, 0xA79BA3A7, 0xA3A79BA3, 0x98A0A498,
+ 0xA89BA0A4, 0xA1A89BA1, 0x97A3A79B, 0xA99C9FA3,
+ 0xA3AA9DA2, 0xA0A2AA9F, 0xABA0A3AB, 0xA3A89FA5,
+ 0x9EA2A79E, 0xACA3A2A7, 0xA7ACA3A7, 0xA2A8ADA4,
+ 0xA9A0A8AB, 0xA6ABA2A6, 0xABABB2AB, 0xB6B1ABB2,
+ 0xABB1ACB0, 0xA6A5ABA6, 0xB6B1A5AB, 0xBFC3BEB2,
+ 0xB1BBC2BB, 0xB7B3B3B7, 0xB9BAB6B6, 0xB9BCC2BD,
+ 0xBDBBB8BE, 0xB8BDBBB8, 0xBBB9BCBA, 0xBCBABABD,
+ 0xBEC1BFB9, 0xBEBBC0BE, 0xC0BFBBC0, 0xBAC0BFBA,
+ 0xBEBAC1BE, 0xC0BEBBC0, 0xBAC1BEBB, 0xBFB9BFBE,
+ 0xBFBEBAC0, 0xB9BFBEB9, 0xBEB8C0C0, 0xBBBAB9BF,
+ 0xB9BFBEB6, 0xBCB7BFBE, 0xBDBCB3BE, 0xB4BAB9B5,
+ 0xBEB9BFBE, 0xC1C0BABF, 0xB7BDBCBB, 0xB8B3B8B9,
+ 0xBEBDB2B7, 0xB9BEBCB9, 0xBCB7BEBB, 0xBDBEB7BD,
+ 0xB4B9B8B9, 0xBCB8BBB9, 0xBEBCBBBE, 0xB8BDBBB9,
+ 0xBCB9C0BD, 0xBDBCB8BF, 0xB7BDBCB7, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEBABFBD, 0xBFBDBDC0,
+ 0xBCBFBDBC, 0xBDBDC0BE, 0xBDBBBCBF, 0xB9BCBABA,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x3F000007, 0x33403834,
+ 0x2A1E343A, 0x87422D53, 0x63A36E52, 0x8663A386,
+ 0x496C5282, 0x26433823, 0x38284038, 0x4520132B,
+ 0x243E382E, 0x3121432F, 0xA3695187, 0x61A48062,
+ 0x75589082, 0x3B412F54, 0x2B472E1F, 0x3425413A,
+ 0x07080907, 0xB4AF0809, 0xB0B4AEB0, 0xB9B8BCB7,
+ 0xBEBCBABE, 0xB8BDBBB9, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBCB8BDBB, 0xBDBBB9BE, 0xB7BCBAB8,
+ 0xBDB7BDBC, 0xBDBCB7BC, 0xB7BDBCB7, 0xBDB8BFBC,
+ 0xBDBBB9C0, 0xB8BDBBB8, 0xBBB7BCBA, 0xBCBBB8BD,
+ 0xB7BCBBB7, 0xBDB6BBBC, 0xBCBDB7BC, 0xB8BCBDB8,
+ 0xBBB7BCBB, 0xBDBCB7BC, 0xB8BDBCB8, 0xBBB6BBBA,
+ 0xBEBCB7BC, 0xB8BDBBB9, 0xBBB7BCBA, 0xBCBBB8BD,
+ 0xB6BBBAB7, 0xBBB7BCBB, 0xBCBBB7BC, 0xB7BDBCB6,
+ 0xBCB5BDBC, 0xBCBBB7BD, 0xB7BCBBB6, 0xBDB8BCBD,
+ 0xBDBCB8BC, 0xB7BDBCB7, 0xBBB8BDBB, 0xBEB9B8BD,
+ 0xB8BDBBB8, 0xBBB9BEBD, 0xBCBBB7BC, 0xB8BDBCB7,
+ 0xBDB9BEBC, 0xBDBBBABF, 0xB7BEBBB8, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB8C0BF, 0xBFBEB5BD,
+ 0xB7BDBCB9, 0xBCB8BDBB, 0xBDBBB9BE, 0xB8BDBBB8,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBDC0BEBC, 0xBBBAC0BB,
+ 0xBFBDBAC0, 0xBABEB9BC, 0xBAB8BEB9, 0xBFBAB9C1,
+ 0xB3BAB5B8, 0xA3ADB4AD, 0xB3AEA3AA, 0xADB4ADAD,
+ 0xAAAEB3AA, 0xB1A8B0B3, 0xAEB3AAAE, 0xABAEB3AA,
+ 0xB3ACADB5, 0xA8B0A9AC, 0xABA6AEA7, 0xB1AAAAB2,
+ 0xAAB1AAA9, 0xA3A6AEA4, 0xADA2A5AD, 0xA8ACA1A7,
+ 0x9EA8ACA1, 0xA899A6AA, 0xA8AB9CA5, 0xA2A9ADA1,
+ 0xAAA1A9AD, 0xA6A9A0A9, 0x95A2A89D, 0xA6999AA0,
+ 0xA3AA9D9F, 0x9DA4A89C, 0xAA9DA5A9, 0xA3AA9DA3,
+ 0x999CA598, 0xA79D9CA4, 0x9EA39A9F, 0x9A9DA299,
+ 0xA39AA0A3, 0x9CA198A0, 0x9A9EA39A, 0xA0969CA4,
+ 0x9CA49A98, 0x9A9EA69C, 0xA0959CA4, 0x9AA0959A,
+ 0x999A9F96, 0xA1989DA2, 0x9C9F969E, 0x989EA198,
+ 0x9F969FA3, 0x9EA1989C, 0x999DA097, 0x9E989FA2,
+ 0x9B9D979C, 0x95A1A299, 0xA1989E9F, 0x9EA198A0,
+ 0x9B99A099, 0xA09B9AA0, 0x99A0999A, 0x00373B35,
+ 0x04000103, 0x02030003, 0x00010200, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01020001, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00010000,
+ 0x00000100, 0x00000000, 0x01000000, 0x00010000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000001,
+ 0x00000000, 0x01010002, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00000101, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x01010100, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x3F0E110F, 0xA3A13E41, 0xA0A49FA0,
+ 0x8E969990, 0x99909798, 0x97988E98, 0x8D92968A,
+ 0x9C8D959C, 0x989C9095, 0x93969A8F, 0x9C939B9C,
+ 0x9B9C929B, 0x919D9F93, 0xA0949DA0, 0x9FA1959E,
+ 0x939DA195, 0xA1969B9F, 0x9B9F939D, 0x919BA293,
+ 0xA49599A0, 0x9BA2939D, 0x939CA394, 0xA1929BA2,
+ 0x9CA3949A, 0x969CA396, 0xA2939CA3, 0x9CA3949B,
+ 0x959EA596, 0xA5989DA4, 0x9EA5989E, 0x999FA699,
+ 0xA5999FA6, 0xA1A599A1, 0x98A4A89C, 0xA899A0A4,
+ 0xA3A899A3, 0x98A0A498, 0xA89DA0A4, 0xA0A499A4,
+ 0x99A0A498, 0xA79BA1A5, 0xA0A498A3, 0x9DA3A79B,
+ 0xAA9DA5A9, 0xA3AA9DA3, 0x9BA5A99D, 0xA89CA3A7,
+ 0xA4AB9EA4, 0x9EA3A99E, 0xA89FA1A9, 0xA1A99FA3,
+ 0xA3A5ADA3, 0xADA3A5AD, 0xA4ACA2A5, 0xA2A7ACA3,
+ 0xADA4A8AB, 0xA8ADA4AA, 0xABA7ABA5, 0xB7B2ABB2,
+ 0x9EA49FB1, 0xA7999F9A, 0xB6B4A6AC, 0xC0C1BDB3,
+ 0xAEB4B8B3, 0xB4B0B0B4, 0xB2B3AFB3, 0xBAB5BBB6,
+ 0xBDBBB9BF, 0xB5BAB8B8, 0xBFBABDBB, 0xBDBBBEC1,
+ 0xBABDBBBA, 0xBEBBC0BE, 0xC1C0BBC0, 0xBAC1BEBB,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBAC1BEBB, 0xBFB9BFBE,
+ 0xC0C1BAC0, 0xB8C0C0BB, 0xBEB9C1C0, 0xBFBEB9BF,
+ 0xB8BDBCBA, 0xBCB9C1C0, 0xBDBCB5BD, 0xB5BBBAB7,
+ 0xBFB8BEBD, 0xBFBEBAC0, 0xB9BFBEB9, 0xB8B4B9BA,
+ 0xBDBCB2B7, 0xBABFBDB8, 0xBCB7BEBB, 0xBDBCB7BD,
+ 0xB8BDBCB8, 0xBDB8BBB9, 0xBEBCBABF, 0xB6BBB9B9,
+ 0xBCB7BEBB, 0xBCBBB8BF, 0xB7BDBCB6, 0xBCB9BFBE,
+ 0xBFBEB7BD, 0xB7BDBCB9, 0xBBB8BDBB, 0xBFBDBABD,
+ 0xBCBFBDBC, 0xBDBCBFBD, 0xBFBDBCBF, 0xBCBFBDBC,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x3F000008, 0x34403635,
+ 0x2A1E3438, 0x87402E53, 0x62A46E52, 0x8663A386,
+ 0x496A5282, 0x26433624, 0x38284038, 0x451F122A,
+ 0x243E382E, 0x3121432F, 0xA3684F87, 0x61A48062,
+ 0x72578F80, 0x3B402E53, 0x2B472E1F, 0x3425413A,
+ 0x07080808, 0xB4AF0809, 0xB0B4AFB0, 0xBBB8BBB9,
+ 0xBDBBBABD, 0xB8BDBBB8, 0xBAB8BDBB, 0xBBB9B7BC,
+ 0xB8BDBBB6, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBCB8,
+ 0xBBB8BDBC, 0xBDBCB6BC, 0xB7BDBCB7, 0xBEBABFBE,
+ 0xBDBCBABF, 0xB8BDBCB8, 0xBCB7BCBB, 0xBCBBB8BD,
+ 0xB7BCBBB7, 0xBBB6BBBA, 0xBCBBB7BC, 0xB7BCBBB7,
+ 0xBBB9BBBB, 0xBCBBB7BC, 0xB7BDBCB7, 0xBAB7BEBB,
+ 0xBCBBB6BD, 0xB7BCBBB7, 0xBCB7BCBB, 0xBDBBB8BD,
+ 0xB9BEBCB8, 0xBCB8BDBC, 0xBBBAB8BD, 0xB6BCBBB5,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBBB9C0BD, 0xBCBAB8BD,
+ 0xB8BBB9B9, 0xBBB6BCBB, 0xBCBBB6BC, 0xB7BDBCB6,
+ 0xB9B9C0BD, 0xBEB9B6BB, 0xB8BEB9B8, 0xBBB7BCBA,
+ 0xBEBBB8BD, 0xB9C0BDB7, 0xBBB9BFBE, 0xBDBCB6BC,
+ 0xB8BDBCB8, 0xBEB9BEBD, 0xBFBEBABF, 0xB7BDBCB9,
+ 0xBDBABFBD, 0xBFBDBABF, 0xB9BEBCBA, 0xBDBABFBD,
+ 0xBEBCBABF, 0xBABEB9BB, 0xB9BAC0BB, 0xC0B9B8C0,
+ 0xB8C0B9B8, 0xA2B6BDB6, 0xAAA3A2A9, 0xADB4ADA3,
+ 0xACB0B5AC, 0xB5ACB0B5, 0xB0B4AEB0, 0xAAB0B5AC,
+ 0xB4AAACB4, 0xA9B1A7AC, 0xA8ABB3A9, 0xB2A8AAB2,
+ 0xACB4AAAA, 0xA9A9B0A9, 0xAFA5A9B0, 0xA7ACA3A7,
+ 0xA1A4AA9F, 0xB2A7A7AE, 0xA7ADA2AC, 0xA1A7AB9F,
+ 0xADA2A9AD, 0xA9ADA2A9, 0x999FA699, 0xACA19FA6,
+ 0xA8ACA0A6, 0x9AA4A89C, 0xAA9EA4A9, 0xA2A99CA6,
+ 0x9E9EA69B, 0xA69CA0A8, 0xA2A6A09E, 0x9A9EA39A,
+ 0xA39D9EA3, 0x9EA29C9F, 0x9DA1A59F, 0xA49AA1A6,
+ 0x98A0959C, 0x9B98A096, 0xA0959DA5, 0x969C919A,
+ 0x959B9F93, 0xA29C9CA0, 0xA0A29CA0, 0x9A9B9E95,
+ 0xA097A0A3, 0x9C9F969D, 0x979FA398, 0x9E959EA2,
+ 0x9C9F969B, 0x95A0A197, 0x9D939E9F, 0x9EA1989E,
+ 0x9999A099, 0xA09998A0, 0x99A09999, 0x69A4A8A2,
+ 0x3B356D72, 0x01020039, 0x01000100, 0x00010101,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x01010000, 0x00010001,
+ 0x01010101, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0xA2707371, 0xA49FA1A4, 0xA0A49FA0,
+ 0x94999C93, 0x9C969A9D, 0x9A9B929C, 0x949CA095,
+ 0xA0949CA0, 0x9CA0949C, 0x92999D92, 0x9F94999D,
+ 0x9CA0959B, 0x939DA195, 0x9F939DA2, 0x9DA1959B,
+ 0x939DA195, 0x9F939B9F, 0x9DA1959B, 0x949AA192,
+ 0xA3949CA3, 0x9CA3949C, 0x949DA495, 0xA08F9CA3,
+ 0x9AA19298, 0x989CA396, 0xA3949EA5, 0x9EA5969C,
+ 0x979DA497, 0xA5969DA4, 0x9EA5969E, 0x98A1A899,
+ 0xA697A0A7, 0xA2A798A1, 0x9BA3A79B, 0xA79BA3A7,
+ 0xA5A99DA3, 0x9DA5A99D, 0xA99DA5A9, 0xA5A99DA5,
+ 0x9DA5A79B, 0xA79BA7A9, 0xA8AA9EA5, 0x9EA4A89C,
+ 0xA99DA6AA, 0xA5A99DA5, 0x98A8AA9E, 0xA79BA0A4,
+ 0xA3AA9DA3, 0xA0A5ABA0, 0xABA1A5AB, 0xA3ABA1A3,
+ 0xA3A5ADA3, 0xADA3A4AD, 0xA4ACA2A5, 0xA6A7ABA5,
+ 0xACA3A8AC, 0xA6ABA2A9, 0xABA7ACA3, 0xB7B2ABB2,
+ 0x9EA49FB1, 0x9998A099, 0xB5B3989E, 0xB4B5B1B2,
+ 0xAEB2B3AF, 0xB7B3B2B4, 0xB6B7B3B6, 0xB8B3B7B1,
+ 0xBEB9BABE, 0xBABEB9BA, 0xBEB8BDBB, 0xC2C0BBC0,
+ 0xB8BDBBBD, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBDBBC0BE, 0xC0BEBCC2, 0xBBC0BEBB, 0xC0B9BFBE,
+ 0xC1C1BABF, 0xB8C0C0B9, 0xBFB8C0C0, 0xC0C1B9BE,
+ 0xB8BCBDBC, 0xBFB4BCBB, 0xBDBCB8C0, 0xB7BDBCB7,
+ 0xBEBABFC0, 0xC1C0B6BE, 0xBAC0BFB9, 0xBEB9BDBE,
+ 0xBEBEB9BD, 0xB9BEBDBC, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB8BDBCB8, 0xBEB6BBB9, 0xBEBDBBC0, 0xB7BDBCB9,
+ 0xBEB9BFBE, 0xC0C0B9BF, 0xB7BFBFB8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB9BFBEB8, 0xBBBABFBD, 0xBCB7BABD,
+ 0xB8BCB7B8, 0xBCBBBFBA, 0xBFBDBDC1, 0xBCBFBDBC,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x01000000, 0x00000100, 0x40000008, 0x34403634,
+ 0x281F3438, 0x87402D54, 0x62A46E52, 0x8663A386,
+ 0x476A5282, 0x27423625, 0x38283F38, 0x451F1129,
+ 0x243E3A2D, 0x31214331, 0xA3684F87, 0x63A37E63,
+ 0x684F877E, 0x3A402E53, 0x2B462E1F, 0x2F1E393C,
+ 0x07080808, 0xB3B10809, 0xB1B5B0B0, 0xBBB8BBB9,
+ 0xBCBABABD, 0xB8BDBBB7, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBBB8BDBB, 0xBCBBB7BC, 0xB6BCBBB6,
+ 0xBBB7BCBB, 0xBCBBB7BC, 0xB8BDBCB7, 0xBEBABFBE,
+ 0xBDBCBABF, 0xB8BDBCB8, 0xBCB7BCBB, 0xBDBCB8BD,
+ 0xB8BDBCB8, 0xBCB8BDBC, 0xBDBCB8BD, 0xB7BCBBB8,
+ 0xBBB8BDBC, 0xBCBBB7BC, 0xB7BDBCB6, 0xBBB6BDBA,
+ 0xBDBCB7BE, 0xB7BCBBB8, 0xBAB4B9B8, 0xBCBAB6BB,
+ 0xB7BCBAB7, 0xBCB8BDBC, 0xBDBCB8BD, 0xB6BCBBB7,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBBB9C0BD, 0xBDBBB8BD,
+ 0xBABDBBBA, 0xBCB8BEBD, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xB9B8BEBD, 0xBCBAB6BB, 0xBABDBBB7, 0xBDB8BDBB,
+ 0xC0BDBABF, 0xB9C0BDB9, 0xBCB9BFBE, 0xBFBEB7BD,
+ 0xB9BEBDBA, 0xBBB9BEBD, 0xBFBEB7BC, 0xB9C0BDB9,
+ 0xBDB8BDBB, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xC0BEBABF, 0xBABDBBBD, 0xB9B9BFBA, 0xC0B9B9C0,
+ 0xB9C0B9B9, 0xA3B7BEB7, 0xA099A3AA, 0xA3AAA399,
+ 0xACAEB6AC, 0xB4AEB0B5, 0xADB1ABB0, 0xA9A9B1A7,
+ 0xB4AAABB3, 0xACB4AAAC, 0xA8AAB2A8, 0xB0A7AAB2,
+ 0xABB3A9AB, 0xA9A9B0A9, 0xAEA7A8B0, 0xA7AEA7A7,
+ 0xA7A3A99E, 0xB1A7ACB2, 0xAAB2A8A9, 0xA0A7ADA2,
+ 0xAEA2A7AB, 0xA9ADA1AA, 0xA0A6ADA0, 0xACA1A6AD,
+ 0xA8ACA1A8, 0x9BA6AA9E, 0xA99DA5AA, 0xA3A79BA5,
+ 0x9EA1A99E, 0xA79EA0A8, 0x9EA39AA2, 0x9AA3A89F,
+ 0xA39A9EA3, 0xA0A59C9E, 0x9B9EA39A, 0xA4999FA4,
+ 0x9CA4999E, 0x9A9FA59A, 0xA59A9FA5, 0x9CA0949F,
+ 0x91989C90, 0xA299999D, 0xA2A49E9F, 0x979EA198,
+ 0xA39A9EA2, 0x9CA095A0, 0x96A0A498, 0xA4999EA2,
+ 0x9CA095A0, 0x979E9F95, 0x9D93A0A1, 0x9CA0959C,
+ 0x9799A197, 0xA19798A1, 0x9BA09799, 0xA0A4A9A0,
+ 0xA8A2A4A9, 0x6F706CA6, 0x00393A36, 0x01010001,
+ 0x00000001, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010100, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x01000000, 0x00000101,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x9F3F4240, 0xA49FA0A4, 0xA1A59FA0,
+ 0x96999C93, 0x9F969C9F, 0x9E9F969E, 0x949CA095,
+ 0xA0949CA0, 0x9CA0949C, 0x959DA195, 0xA0959CA0,
+ 0x9CA0949C, 0x939AA192, 0xA1959BA2, 0x9B9F939D,
+ 0x959EA296, 0xA2969DA1, 0x9DA2939E, 0x949CA394,
+ 0xA3949CA3, 0x9CA3949C, 0x969CA394, 0xA3949EA5,
+ 0x9AA1929C, 0x949AA194, 0xA3969AA1, 0x9EA5989C,
+ 0x969CA396, 0xA5989CA3, 0x9EA5969E, 0x969FA697,
+ 0xA6979EA5, 0xA2A798A1, 0x9BA3A79B, 0xA79BA3A7,
+ 0xA3A79BA3, 0x9DA5A99D, 0xAA9EA5A9, 0xA3A79BA6,
+ 0x9CA5A79B, 0xA79BA6A8, 0xA5A99DA5, 0x9DA6AA9E,
+ 0xA79CA5A9, 0xA3A79BA3, 0x9DA3A79B, 0xA99DA5A9,
+ 0xA3A99EA5, 0xA0A7ABA0, 0xACA1A5AB, 0xA2AAA0A6,
+ 0xA3A5ADA3, 0xADA3A5AD, 0xA7ACA3A5, 0xA6ABAFA9,
+ 0xADA4A8AC, 0xA7AAA1AA, 0xB1ADB2A9, 0xB1ACB1B8,
+ 0x9EA49FAB, 0xA6999F9A, 0xB5B3A5AB, 0xB4B5B3B2,
+ 0xB7B6B7B3, 0xBBB7BABB, 0xB8BCB7BA, 0xB6B7BBB6,
+ 0xBBB6B7BB, 0xB7BAB8B7, 0xB4B4B9B7, 0xBDBBB1B6,
+ 0xB8BDBBB8, 0xBAB6BBB9, 0xC0BEB7BC, 0xBBC0BEBB,
+ 0xBCBBC1BC, 0xC0BEBBC1, 0xBBC0BEBD, 0xC0BAC0BF,
+ 0xC0C0BABF, 0xB8C0C0B8, 0xC0B8C0C0, 0xBEBFBABF,
+ 0xBABFC0BA, 0xC0B7BDBC, 0xBDBCB9C1, 0xBAC0BFB7,
+ 0xC0B8C0C0, 0xC0BFB8C0, 0xBAC0BFB8, 0xBDBCC0C1,
+ 0xBDBDBABC, 0xB9BEBDBB, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB7BCBBB8, 0xBDB6BBB9, 0xC0BFBABF, 0xB7BDBCBA,
+ 0xBEB9BFBE, 0xBFC0B9BF, 0xB8C0C0BA, 0xBFB8C0C0,
+ 0xC0C0B7BF, 0xBABFC0B8, 0xBDBCC1C0, 0xBFBDBCBF,
+ 0xBABEB9BC, 0xB9B7BBB6, 0xBBB9B8BB, 0xB8BBB9B8,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x01000000, 0x00000100, 0x3F000008, 0x34403635,
+ 0x281F3438, 0x88402D54, 0x62A46F53, 0x8563A386,
+ 0x476A5282, 0x27423625, 0x36293F38, 0x4520122A,
+ 0x243C3A2D, 0x32214332, 0xA26B5187, 0x62A38063,
+ 0x73598F80, 0x393A294B, 0x2C472C1F, 0x2E1F3A3B,
+ 0x07080808, 0xB3B10809, 0xB2B3AFB2, 0xB9B8BBB9,
+ 0xBEB9B8BB, 0xBABEB9BA, 0xBBBABDBB, 0xBDBBBABD,
+ 0xB9BEBCB8, 0xBDB6BCBB, 0xB9B9B7BC, 0xADB5B5B1,
+ 0xBDB3B8B7, 0xBDBDBBBD, 0xB9BEBDBB, 0xBCB8BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBBB7BDBC, 0xBCBDB6BC,
+ 0xB7BCBDB7, 0xBDB7BCBD, 0xBDBCB7BC, 0xB8BEBDB7,
+ 0xBBB7BDBC, 0xBDBCB6BC, 0xB7BDBCB7, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB8BDBCB8, 0xB8B7BCBB, 0xB9B8B4B9,
+ 0xB7BCBBB4, 0xBCB8BDBC, 0xBDBCB8BD, 0xB7BDBCB7,
+ 0xBDBABFBD, 0xC0BDBABF, 0xB9C0BDB9, 0xBFB9BFBE,
+ 0xC0BFBAC0, 0xB9BFBEBA, 0xBCB8BDBB, 0xBFBEB9BE,
+ 0xBABFBEBA, 0xBFBABEBF, 0xBEBFBABE, 0xB8BDBCBA,
+ 0xBCB7BCBB, 0xBFBEB8BD, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEBABFBD, 0xBEBCBBC0,
+ 0xBABFBDB9, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xB9B8BDBB, 0xC0BEB8BE, 0xB7BCBABB, 0xBAB8BDBC,
+ 0xBDBCB6BB, 0xBABFBDB8, 0xB6BABDBB, 0xBEB9B7BB,
+ 0xB6BCB7BA, 0xAEB7BEB9, 0x9A95ACB3, 0x949B9494,
+ 0xB1AAB1AA, 0xB4ADB1B8, 0xAEB5AEAD, 0xACAEB6AC,
+ 0xB5ACAEB6, 0xAEB6ACB0, 0xAAACB4AA, 0xB3ACABB4,
+ 0xACB3ACAC, 0xA9AAB1AA, 0xAFAAA9B0, 0xA6ADA6A8,
+ 0xA8A7ACA3, 0xB2A8ACB1, 0xA9B1A7AA, 0xA4A7AFA5,
+ 0xACA1A8AD, 0xA8ACA0A8, 0xA0A7AB9F, 0xADA2A8AC,
+ 0xA7ABA0A9, 0x9DA8ACA0, 0xA99DA5A9, 0xA5A99DA7,
+ 0x9DA3A79B, 0xA99EA2A8, 0x9FA398A5, 0x9EA3A79C,
+ 0xA499A5A9, 0xA0A499A0, 0x999EA499, 0xA4999EA4,
+ 0xA1A89B9E, 0x959DA195, 0xA0949DA1, 0x989C909C,
+ 0x90989C90, 0xA196989C, 0x9DA1969D, 0x95A0A499,
+ 0xA59A9DA1, 0x9DA195A1, 0x989DA195, 0xA498A0A4,
+ 0xA0A498A0, 0x989DA195, 0xA498A0A4, 0x9EA296A0,
+ 0x99999F94, 0xA2979EA4, 0x999F949C, 0x95999E95,
+ 0x9D97999E, 0xA1A59F99, 0x6BA0A29C, 0x0E0D6F71,
+ 0x0E0E0E10, 0x00020301, 0x03010004, 0x00030100,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00010101, 0x00000000,
+ 0x01010102, 0x67000100, 0xA39A686C, 0x9EA4999E,
+ 0x969DA196, 0x9F959DA1, 0x9FA0969E, 0x949DA195,
+ 0xA0919CA0, 0x9DA29399, 0x959DA293, 0xA1959FA1,
+ 0x9DA1959D, 0x949CA394, 0xA3949CA3, 0x9CA3949C,
+ 0x949CA394, 0xA3949CA3, 0x9CA3949C, 0x949CA394,
+ 0xA3949CA3, 0x9EA2969E, 0x98A0A498, 0xA498A0A4,
+ 0xA0A498A0, 0x979FA397, 0xA2969FA3, 0x9EA2979E,
+ 0x989EA297, 0xA3989FA3, 0x9FA3979F, 0x989EA598,
+ 0xA4989EA5, 0xA0A498A0, 0x98A0A498, 0xA498A0A4,
+ 0xA1A599A0, 0x98A0A498, 0xA598A0A4, 0x9EA5989E,
+ 0x98A0A596, 0xA89CA2A7, 0xA3A79BA4, 0x9DA0A499,
+ 0xA79EA2A8, 0xA4A89DA4, 0xA1A5ABA0, 0xAA9FA6AC,
+ 0xA4A9A0A4, 0x9FA7AAA1, 0xABA0A6AA, 0xA7ADA2A7,
+ 0xA7A6AEA4, 0xACA1A9B1, 0xAAADA4A6, 0xA3AEB0AA,
+ 0xABA2A7A9, 0xAEB1A8AA, 0xACB6BAB4, 0x9F9AABB1,
+ 0x999F9A99, 0xB99BA19C, 0xBBB9B8BB, 0xB8BBB9B8,
+ 0xB7B9BCBA, 0xBDB8B8BC, 0xB7BDB8B9, 0xBBB8BEB9,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xB9BABFBD, 0xBBBAB6BB,
+ 0xBABFBEB6, 0xBAB9BFBE, 0xC1BEB5BB, 0xB9C0BDBA,
+ 0xBDB9C0BD, 0xBFBDB9C0, 0xBBC0BEBA, 0xBFB6BCBB,
+ 0xBEBFBAC0, 0xB5BABBB9, 0xBBB5BBBA, 0xBBBAB6BC,
+ 0xB6BCBBB6, 0xB8B4B9BA, 0xB8B8B0B8, 0xB5BDBDB0,
+ 0xBCB7BDBC, 0xBFC0B7BD, 0xBABFC0BA, 0xBFBBC0BF,
+ 0xBEBFBBC0, 0xB9BDBEBA, 0xBEB9BFBE, 0xBFBDB9BF,
+ 0xB6BBB9BA, 0xBBB6B9B7, 0xBDBCB8BD, 0xB7BDBCB7,
+ 0xBDBABFBE, 0xC0BFB9C0, 0xBAC0BFBA, 0xBEBBC1C0,
+ 0xBFBFB9BF, 0xBABFC0B7, 0xBDBEC0C0, 0xC0BEBCBF,
+ 0xBABFBDBD, 0xBEBABFBD, 0xC0BEBDC0, 0xBABBB9BD,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x3D000004, 0x323D3734,
+ 0x281C3236, 0x81402E53, 0x5D9D6A4F, 0x7F5D9D7F,
+ 0x44664E7E, 0x24403322, 0x32253D32, 0x3F1C1026,
+ 0x1E353629, 0x3825462E, 0x9B684D7F, 0x5D9D7D5E,
+ 0x6F52897F, 0x393A2A4C, 0x2D472A1F, 0x31233F3A,
+ 0x07080808, 0xB3B10809, 0xB0B4AFB2, 0xB9B8BBB9,
+ 0xBEB9B8BB, 0xBABEB9BA, 0xB9BBBEBC, 0xBAB8B8BB,
+ 0xB8BDBCB5, 0xBDB8BDBE, 0xB7BAB5BD, 0xB1B9B9B0,
+ 0xBEB6BABB, 0xBDBDBCBE, 0xB9BEBDBB, 0xBCB8BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC, 0xBDBDB7BD,
+ 0xB5BDBDB5, 0xBDB7BCBD, 0xBDBCB7BC, 0xB7BDBCB7,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB8BDBCB8, 0xBBB8BDBC, 0xBDBCB7BC,
+ 0xB7BCBBB8, 0xBBB8BDBC, 0xBDBCB7BC, 0xB7BDBCB7,
+ 0xBDBBC0BE, 0xC0BDBABF, 0xB9C0BDB9, 0xBFB9BFBE,
+ 0xBFBEBAC0, 0xB7BDBCB9, 0xBEB7BDBC, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBFBABFBE, 0xBFC0BABE, 0xB7BBBCBB,
+ 0xBDB8BDBC, 0xBDBCB9BE, 0xB8BDBCB8, 0xBDBABFBD,
+ 0xBEBCBABF, 0xBABFBDB9, 0xBDBABFBD, 0xBEBCBABF,
+ 0xBABFBDB9, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xB9BABFBD, 0xBBB9B6BB, 0xB8BDBBB6, 0xBEB8BDBC,
+ 0xBFBEBABF, 0xB6BBBABA, 0xBBBABDBB, 0xBCB7BABD,
+ 0xB5BBB6B8, 0xBAB9C0BB, 0xB3AEB8BF, 0xA1A7A2AD,
+ 0xADA6ADA6, 0xB4ADACB4, 0xADB4ADAD, 0xADAEB6AC,
+ 0xB4ABB1B6, 0xB0B5ACAF, 0xAAABB3A9, 0xB0A9ACB4,
+ 0xA9B0A9A9, 0xA9A9B0A9, 0xA9A4A9B0, 0xA3ABA4A2,
+ 0xA4A5ADA3, 0xAFA5A8AD, 0xA5ADA3A7, 0xA7A9B1A7,
+ 0xAEA3ABB0, 0xA9ADA1AA, 0xA0A9ADA1, 0xABA0A8AC,
+ 0xA9ADA2A7, 0x9DA8ACA0, 0xA79BA5A9, 0xA6AA9EA3,
+ 0x9EA5A99D, 0xA89CA6AA, 0xA5A99DA4, 0x9BA2A69A,
+ 0xA99DA3A7, 0xA0A498A7, 0x9DA2A69B, 0xA79BA2A8,
+ 0xA3A79BA3, 0x95A0A498, 0x9F939DA1, 0xA0A2969D,
+ 0x909DA195, 0x9F93989C, 0xA0A4989B, 0x98A0A498,
+ 0xA195A0A4, 0xA0A4989D, 0x959B9F93, 0xA4989DA1,
+ 0xA0A498A0, 0x939DA195, 0xA4989B9F, 0x9DA195A0,
+ 0x939B9F93, 0xA1959B9F, 0x9DA1959D, 0x999DA398,
+ 0x9D979DA2, 0x999D9799, 0x9AA1A59A, 0xA19DA0A3,
+ 0x3F403CA2, 0x00020300, 0x05000004, 0x00030101,
+ 0x00000100, 0x01010000, 0x00000001, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x33000100, 0xA39A3438, 0xA0A4999E,
+ 0x909DA195, 0xA195989C, 0x989C909F, 0x959B9F93,
+ 0xA2959DA1, 0x9EA5969B, 0x939DA293, 0xA1959FA2,
+ 0x9DA1959D, 0x949CA394, 0xA3949CA3, 0x9DA4959C,
+ 0x939EA596, 0xA5969BA2, 0x9CA3949E, 0x969EA596,
+ 0xA4989EA5, 0xA0A498A0, 0x98A0A498, 0xA498A0A4,
+ 0xA0A498A0, 0x99A1A599, 0xA499A1A5, 0xA1A59AA0,
+ 0x989FA398, 0xA3989FA3, 0xA1A59A9F, 0x9BA0A498,
+ 0xA79BA1A8, 0xA3A79BA3, 0x9CA3A79B, 0xA79BA4A8,
+ 0xA3A79BA3, 0x9DA4A89C, 0xAA9DA5A9, 0xA3AA9DA3,
+ 0x9EA5AA9B, 0xA89CA8AD, 0xA3A79BA4, 0xA4A2A89D,
+ 0xACA3A8AD, 0xA7ACA3A7, 0x9FA3ABA0, 0xAA9FA2AA,
+ 0xA2A89DA2, 0x9FA7ABA0, 0xAEA3A8A9, 0xAAAEA3AA,
+ 0xA4A8ADA4, 0xACA1A8AD, 0xA8ACA1A6, 0xA5A8AAA4,
+ 0xB2A9A9AB, 0xAEB1A8AF, 0x9AADB1AC, 0x9F9A999F,
+ 0x999F9A99, 0xB9A6A9A7, 0xBBB9B8BB, 0xB7BAB8B8,
+ 0xB9B7BAB8, 0xBCB7B8BB, 0xB7BDB8B8, 0xBBB8BDBB,
+ 0xBDBCB8BD, 0xB8BDBCB8, 0xBBB8BDBB, 0xBBBAB8BD,
+ 0xB7BDBCB6, 0xBEBAC0BF, 0xBDBCB9BF, 0xBBC2BFB7,
+ 0xBEBAC1BE, 0xC0BEBAC1, 0xB9BFBEBB, 0xBFBAC0BF,
+ 0xBFC0BAC0, 0xB9BEBFBA, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB7BDBCB8, 0xBBB3BBBB, 0xB7B7B3BB, 0xB3BBBBAF,
+ 0xBAB6BCBB, 0xBBBCB5BB, 0xB6BBBCB6, 0xBEB8BDBC,
+ 0xBEBFBABF, 0xB8BDBEBA, 0xBFB9BFBE, 0xBFBDBAC0,
+ 0xB8BDBBBA, 0xBCB7BCBA, 0xBABBB8BD, 0xB2B8B7B5,
+ 0xB9B6BBB9, 0xBDBCB6BB, 0xB7BDBCB8, 0xBEB9BFBE,
+ 0xC0BFB9BF, 0xBAC0BFBA, 0xBFBEC0C0, 0xC0BEC0C1,
+ 0xBABFBDBD, 0xBEBABFBE, 0xBFBDBABF, 0xBFC0BEBC,
+ 0xB7B8BCB7, 0x3F3DB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x3C000003, 0x313E3633,
+ 0x281C3238, 0x81402E53, 0x5E9E6A4F, 0x7F5E9B80,
+ 0x45664F7C, 0x23423323, 0x30253F32, 0x3E1C1026,
+ 0x2037352A, 0x39244430, 0x9B6A4D7F, 0x5D9D7F5E,
+ 0x6F528980, 0x373A2A4C, 0x2D472820, 0x2A1E3A38,
+ 0x07080808, 0xB3B10809, 0xB0B4AFB0, 0xB9B8BBB9,
+ 0xBDBBB8BB, 0xBABDBBBA, 0xB8B8BDBB, 0xBDBBB5BA,
+ 0xB8BDBCB8, 0xBBB7BCBD, 0xB8BBB1B8, 0xB7BCBDB1,
+ 0xBDB8BCBD, 0xBCBCBBBD, 0xB9BEBDBA, 0xBCB8BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB6BEBDB5, 0xBCB8BEBD, 0xBDBCB7BD, 0xB6BCBBB7,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB6BCBB, 0xBDBCB7BD,
+ 0xB8BDBCB8, 0xBCB6BCBB, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBDB9C0BD, 0xC0BFB9C0, 0xBAC0BFBA, 0xBEB8C0BF,
+ 0xC0BFB7BF, 0xB7BDBCBA, 0xBEBAC0BF, 0xC1C0B9BF,
+ 0xB9BFBEBB, 0xBEB9BFBE, 0xBDBCB9BF, 0xB7BDBCB7,
+ 0xBEB9BFBE, 0xC0BDB9BF, 0xB9C0BDB9, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF, 0xBBC0BEBA,
+ 0xBDB9C0BD, 0xBDBBB9C0, 0xBABFBDB8, 0xBBBAC1BE,
+ 0xC1BEB7BE, 0xBABFBDBA, 0xBBBBBEBC, 0xBDBBBABD,
+ 0xBBBEBCBA, 0xBBB9BFBA, 0xBFB8B9C0, 0xACB3ACB8,
+ 0xABA7ADA8, 0xB8B1AAB0, 0xB1B8B1B0, 0xAEAFB3AD,
+ 0xB4AEB2B4, 0xB1B5AFB2, 0xA9B1B6AD, 0xB3ACABB3,
+ 0xA9B0A9AC, 0xA1A5ADA6, 0xABA4A0A8, 0xA8B0A9A3,
+ 0xA2A7AFA5, 0xAFA5A5AD, 0xA5ADA3A7, 0xA2A6ABA2,
+ 0xB0A7A7AD, 0xA6ACA1AB, 0xA0A7AEA1, 0xABA0A6AD,
+ 0xA8A99FA7, 0xA0A8ACA0, 0xA99DA8AC, 0xA5A99DA5,
+ 0x9FA5A99D, 0xA89CA7AB, 0xA5A99DA4, 0x9DA8ACA0,
+ 0xA79BA5A9, 0x9FA397A5, 0x9BA0A498, 0xA598A1A8,
+ 0x9EA5989E, 0x969DA195, 0x9F939EA2, 0xA0A4989B,
+ 0x96A2A399, 0x9F939FA0, 0x9CA0949B, 0x98A0A498,
+ 0x9F90A0A4, 0x9DA2939A, 0x8F9DA195, 0x9F93979B,
+ 0x9DA1959B, 0x929DA195, 0xA0949A9E, 0x9EA2969C,
+ 0x96A0A499, 0xA1959DA1, 0xA0A4989F, 0x999DA398,
+ 0xA2999DA2, 0x9EA39A9D, 0x99A0A499, 0xA499A0A4,
+ 0xA0A39AA0, 0x006C6F66, 0x03000104, 0x01020002,
+ 0x00000100, 0x01000001, 0x00010000, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010101, 0x00000101, 0x01010100, 0x01000001,
+ 0x00000000, 0x01010100, 0x00010101, 0x00000001,
+ 0x02000002, 0x00000100, 0x37330001, 0xA0A39A36,
+ 0x8EA8ACA0, 0x9C90989D, 0x999D9198, 0x90989C90,
+ 0x9D90969D, 0x99A09396, 0x959B9F93, 0xA1959DA1,
+ 0x9DA1959D, 0x959CA394, 0xA3949DA4, 0x9CA3949C,
+ 0x949EA596, 0xA6999CA3, 0x9EA5989F, 0x999EA598,
+ 0xA3979FA6, 0xA0A4989F, 0x96A0A596, 0xA498A0A5,
+ 0x9FA397A0, 0x99A1A599, 0xA397A1A5, 0xA1A5999F,
+ 0x99A3A599, 0xA599A3A5, 0xA1A599A3, 0x9BA3A79B,
+ 0xA79BA3A7, 0xA3A79BA3, 0x9EA3A79C, 0xA69BA5A9,
+ 0xA3A79CA2, 0x9EA2A69A, 0xA99DA6AA, 0xA5A99DA5,
+ 0xA0A6A89C, 0xACA0AAAC, 0xA0A498A8, 0x9DA2A99C,
+ 0xA79CA0A8, 0xA0A89D9F, 0x9FA2AAA0, 0xABA0A2AA,
+ 0xA6ADA0A5, 0xA1A9ADA1, 0xADA2ABAD, 0xA7ABA0A9,
+ 0xA2A8ABA2, 0xAEA3A6AB, 0xA8AEA3A8, 0xAAA8AAA4,
+ 0xB1A8AEB0, 0x9FA49BAE, 0xA49A9E99, 0xA8A3A3A9,
+ 0xADB1ACA4, 0xB8B7BAB8, 0xBDB8B5BA, 0xB6BCB7B7,
+ 0xB7B7BDB8, 0xBBB6B8BC, 0xB9BDB8B7, 0xBCBABEB9,
+ 0xC0BFBBBE, 0xBABFBEBB, 0xBCB7BEBB, 0xBFBEB8BF,
+ 0xB7BDBCB9, 0xBEBABFC0, 0xBDBCBABF, 0xB7BDBCB7,
+ 0xBFBAC0BF, 0xBFBEBAC0, 0xB9BEBFB9, 0xC0BBC0C1,
+ 0xC0BFB8C0, 0xB9C1C0B8, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xBAC0BFBA, 0xBFB8C0BF, 0xBBBBB6C1, 0xB5BDBDB3,
+ 0xBEB8C0C0, 0xBCBDB8BD, 0xB8BCBDB7, 0xBEB8BEBD,
+ 0xBEBFB9BF, 0xB9BEBFB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB7BDBCB9, 0xBEB7BDBC, 0xBCBDB9BF, 0xB6BCBBB7,
+ 0xB9B6BBB9, 0xBBBAB6BB, 0xB6BBBAB6, 0xB9B6BBB9,
+ 0xBBB9B6BB, 0xB5BAB8B6, 0xBBBABDBB, 0xBFBDBCBD,
+ 0xBCC0BBBC, 0xBBB8BDBB, 0xBCBAB8BD, 0xBABDBBB9,
+ 0xB7BABBB7, 0x3F3DBABB, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x3D000004, 0x313E3734,
+ 0x281C3238, 0x81412F54, 0x5D9A6A4F, 0x7F5E9B7E,
+ 0x4367507D, 0x23423121, 0x30253F32, 0x3C1A1126,
+ 0x2035352B, 0x3A25452F, 0x9B6A4D7F, 0x5D9D7F5E,
+ 0x6F528980, 0x373A2A4C, 0x2D472820, 0x2A1F3938,
+ 0x07080808, 0xB4B20609, 0xAEB4AFB1, 0xBBBABDBB,
+ 0xBEBCBABD, 0xBABDBBBB, 0xBBBBC0BE, 0xBDBBB8BD,
+ 0xB6BCBBB8, 0xB7B7BCBD, 0xB4B7ADB4, 0xB7BCBDAD,
+ 0xBDB9BEBD, 0xBDBDBBBD, 0xB9BEBDBB, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC, 0xBEBDB7BD,
+ 0xB5BDBCB6, 0xBBB7BDBC, 0xBDBCB6BC, 0xB8BEBDB7,
+ 0xBCB7BDBC, 0xBCBBB7BD, 0xB7BDBCB6, 0xBCB7BDBC,
+ 0xBCBBB7BD, 0xB8BEBDB6, 0xBBB6BCBB, 0xBDBCB6BC,
+ 0xB8BDBCB8, 0xBBB7BDBC, 0xBDBCB6BC, 0xB7BDBCB7,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xB9BFBEBA, 0xBDB9C1C0,
+ 0xBCBBB6BE, 0xB8C0BFB4, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xBAC0BFBA, 0xBDB9BFBE, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xC0BDB9BF, 0xB9C0BDB9, 0xBDBABFBD,
+ 0xBFBDBABF, 0xB9BEBCBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBEB7BDBC, 0xBDBBB9BF, 0xB6BBB9B8, 0xBCB7BEBB,
+ 0xC0BDB8BF, 0xB8BDBBB9, 0xBDB8BDBB, 0xBDBBBCBF,
+ 0xBABDBBBA, 0xBAB9BFBA, 0xBEB9B9BF, 0xB8BFBAB8,
+ 0xA7AFB6B1, 0xB0A9A5AC, 0xB1B8B1A9, 0xAEB0B4AE,
+ 0xB4AEB2B4, 0xB2B4AEB2, 0xAAB0B5AC, 0xB3ACACB4,
+ 0xA9B0A9AC, 0xA9A8B0A9, 0xADA6A8B0, 0xA8B1A7A5,
+ 0xA5A9B1A6, 0xB1A7A8B0, 0xA9B1A7A9, 0xA3A5ADA3,
+ 0xACA3A7AC, 0xA9AFA4A7, 0xA2A8AFA2, 0xADA2A8AF,
+ 0xA8A99FA9, 0xA0A7AB9F, 0xAA9DA8AC, 0xA5AC9FA3,
+ 0xA0A6AA9E, 0xAB9FA8AC, 0xA5A99DA7, 0x9FA5A99D,
+ 0xA79BA7AB, 0xA6AA9EA5, 0x9CA4A89C, 0xA99CA2A9,
+ 0x9EA598A2, 0x979FA699, 0xA4989FA3, 0x9B9F93A0,
+ 0x96A0A499, 0xA1969DA1, 0x979B8F9D, 0x95999D91,
+ 0xA2939DA1, 0x9BA0919D, 0x969DA195, 0x9F939EA2,
+ 0x9DA1959B, 0x98A0A498, 0xA498A0A4, 0x9B9F93A0,
+ 0x98A0A499, 0xA195A0A4, 0x9CA0949F, 0x989FA397,
+ 0xA3989DA3, 0x9DA3989D, 0x989FA397, 0xA499A0A4,
+ 0x9FA398A0, 0x9BA0A499, 0x3933A1A4, 0x02030037,
+ 0x00000200, 0x02000001, 0x00010001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010002,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000002, 0x00000000, 0x00000001, 0x36383202,
+ 0xA0989C91, 0xA195A8AC, 0x9DA1959D, 0x90969D8E,
+ 0x9D90969D, 0x979E9196, 0x91989C90, 0x9B8F999D,
+ 0x979B8F97, 0x949A9F90, 0xA3949EA3, 0x9EA3949E,
+ 0x969CA394, 0xA1949CA3, 0x989F929A, 0x949AA194,
+ 0x9F939AA1, 0x9DA1959B, 0x959CA094, 0xA4989DA1,
+ 0xA0A498A0, 0x99A1A599, 0xA599A1A5, 0xA1A599A1,
+ 0x99A3A599, 0xA599A3A5, 0xA4A69AA3, 0x9BA3A79B,
+ 0xA99DA3A7, 0xA4A89CA5, 0x9EA5A99E, 0xA99EA5A9,
+ 0xA5A99DA5, 0x9DA5A99D, 0xA99DA5A9, 0xA5A99DA5,
+ 0xA0A7A99D, 0xACA0A8AC, 0xA6ADA0A8, 0xA2A7AEA1,
+ 0xB1A6A5AD, 0xA5ADA2AB, 0xA0A1A99E, 0xADA0A3AB,
+ 0xA7AB9FA6, 0x9FA8AB9C, 0xAA9FA9AB, 0xA7ABA0A6,
+ 0xA4A8ABA2, 0xAEA4A8AD, 0xA6AEA4A6, 0xA4ACB0AA,
+ 0xA09AA8AA, 0x9B9F999C, 0xACA2A8A3, 0xBAB5ABB1,
+ 0xB6BAB5B6, 0xBAB8BBB9, 0xBBB6B7BC, 0xB6BCB7B5,
+ 0xBAB7BDB8, 0xBDB8B9BF, 0xB6BAB5B9, 0xBDB8BCB7,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBDBCC1BF, 0xC1C0B9C0,
+ 0xB9BFBEBB, 0xBEB7BBBC, 0xBFBEBABF, 0xB7BDBCB9,
+ 0xBFB9BFBE, 0xBFC0BAC0, 0xBABFC0BA, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xB7BFBEB8, 0xC0B9C1C1, 0xC0BFB8C0,
+ 0xB8C0BFBA, 0xBFB8C0BF, 0xBDBDB6C1, 0xB5BDBDB5,
+ 0xC0B8C0C0, 0xBFC0BABF, 0xBABFC0BA, 0xBFBBC1C0,
+ 0xC0C0BAC0, 0xB8C0C0B8, 0xBFB9BFBE, 0xC0BFBAC0,
+ 0xB9BFBEBA, 0xBFB8C0BF, 0xBFC0B8C0, 0xBAC0BFBA,
+ 0xBDBABFBD, 0xBFBEBABF, 0xB9BFBEBA, 0xBDBABFBE,
+ 0xBFBDBABF, 0xB9BEBCBA, 0xBCB9BCBA, 0xBEB9BBBE,
+ 0xBCC0BBBA, 0xB8B8BDBB, 0xBDBBB5BA, 0xBABDBBBA,
+ 0xB7BABBB7, 0x3F3DBABB, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x3D000004, 0x313E3832,
+ 0x281C3238, 0x80422D53, 0x5E9B6A50, 0x7F5F9A7F,
+ 0x44664F7B, 0x23423322, 0x30253F32, 0x3E1A1125,
+ 0x2036332A, 0x3826452D, 0x9B684E7E, 0x5E9B8060,
+ 0x6F53887F, 0x3839294B, 0x2D47291E, 0x2A1F3938,
+ 0x07060808, 0xB4B20609, 0xB0B4AFB1, 0xBBBABDBB,
+ 0xBEBCBABD, 0xBABDBBBB, 0xBBB7BCBA, 0xBDBCB8BD,
+ 0xB7BDBCB7, 0xB8B7BCBD, 0xB4B7B2B7, 0xB7BCBDAF,
+ 0xBDBABFBE, 0xBFBDBABF, 0xBABFBDBA, 0xBCB7BDBC,
+ 0xBEBDB7BD, 0xB9BFBEB8, 0xBCB5BDBC, 0xBFBEB5BD,
+ 0xB4BCBBB7, 0xBFB8BEBD, 0xBFBEBAC0, 0xB9BFBEB9,
+ 0xBDB9BFBE, 0xBDBCB8BE, 0xB9BFBEB7, 0xBFB8C0C0,
+ 0xBEBEB7BF, 0xB7BFBFB6, 0xC0B9C1C1, 0xBDBEB8C0,
+ 0xBABFC0B8, 0xBEB9BFBE, 0xBDBCB9BF, 0xB7BDBCB7,
+ 0xC0B8C0BF, 0xC0C0B8C0, 0xB8C0C0B8, 0xBDB9BEBF,
+ 0xC0C0B5BD, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB7BFBEB8, 0xBEB9BFBE, 0xC0BFB9BF, 0xBBC1C0BA,
+ 0xBFBAC0BF, 0xBFBDBAC0, 0xB9BEBCBA, 0xBDBCBFBD,
+ 0xBFBDBCBF, 0xBCBFBDBC, 0xBBB8BDBB, 0xBDBCB8BD,
+ 0xB9BFBEB7, 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBEBA,
+ 0xBBB6BDBA, 0xBDBBB7BE, 0xB6BBB9B8, 0xBEB8BDBB,
+ 0xBDBBBBC0, 0xB8BDBBB8, 0xBBBBC0BE, 0xBBB9B8BD,
+ 0xB9BEBCB6, 0xBBB8BBB9, 0xBDBBB8BD, 0xB7BEB9B8,
+ 0xB2B8BFBA, 0xAAA5B1B9, 0xADB1ACA4, 0xACAFB3AD,
+ 0xB3ADAEB2, 0xAFB3ADB1, 0xA7ACB4AA, 0xB1A7A8B1,
+ 0xABB4AAA8, 0xA9ADB5AB, 0xB4AAABB3, 0xACB4AAAC,
+ 0xA8AEB4A9, 0xB0A7ADB3, 0xAAB2A8AB, 0xA7A7AFA5,
+ 0xACA3A9B1, 0xA7ACA3A7, 0xA2A8AEA3, 0xABA2A8AB,
+ 0xA6A9A0A8, 0xA1A9ADA2, 0xABA0A9AD, 0xAAAEA3A7,
+ 0x9EA7AEA1, 0xAA9EA6AA, 0xABADA1A8, 0x9DA5A99D,
+ 0xA99DA5A9, 0xA3A79BA5, 0x9DA5A99D, 0xA99DA5A9,
+ 0xA3AA9DA5, 0x989EA598, 0xA5999EA5, 0x9EA598A1,
+ 0x9B9FA59A, 0xA0969DA5, 0xA0A69B98, 0x969CA396,
+ 0xA69A9CA3, 0x9DA195A2, 0x969DA293, 0xA296A0A5,
+ 0x9B9F939E, 0x99A0A498, 0xA498A1A5, 0x9DA195A0,
+ 0x969AA194, 0xA4989CA3, 0xA0A596A0, 0x959DA293,
+ 0xA1959DA1, 0xA0A4989D, 0x939EA094, 0x9F969D9F,
+ 0x9FA2999C, 0x98A0A499, 0xA39A9FA3, 0x6E7168A0,
+ 0x00000400, 0x03000004, 0x00030100, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000101, 0x00000001, 0x01000000, 0x00010000,
+ 0x9A363832, 0xA4999FA5, 0xA0A596A0, 0x8E9CA493,
+ 0x9D91979F, 0x979B8F99, 0x919B9D91, 0x9D919DA0,
+ 0x9A9C909B, 0x91999B8F, 0x9F909B9D, 0x9EA1929C,
+ 0x98A0A498, 0xA3969EA5, 0x9EA5969C, 0x939EA394,
+ 0xA3979DA2, 0x9EA2969F, 0x99A0A498, 0xA598A1A5,
+ 0x9DA4979E, 0x949FA495, 0xA3979EA3, 0x9FA3979F,
+ 0x98A0A498, 0xA498A0A4, 0xA1A599A0, 0x989FA397,
+ 0xA397A0A4, 0xA1A5999F, 0x98A0A498, 0xA598A0A4,
+ 0x9EA5969E, 0x9BA0A596, 0xAA9BA5AA, 0xA5AC9DA3,
+ 0xA4ADB1A5, 0xB0A1ACB0, 0xAEB5A8AB, 0xA7ABB1A6,
+ 0xB4A9ACB2, 0xAEB4A9B0, 0xA0A6ADA0, 0xACA0A6AD,
+ 0xA8ACA0A8, 0xA0AFB1A5, 0xB1A6AAAC, 0xABAFA4AD,
+ 0xA4AAADA4, 0xAEA7A8AD, 0xA9B0A9A7, 0xA1A3A7A2,
+ 0x9B97A2A6, 0xA3A7A29A, 0xB5A6ACA7, 0xBFBAB3BA,
+ 0xB8BEB9B9, 0xB9B9BDB8, 0xBFBDBABE, 0xBABDBBBC,
+ 0xBDB8BDBB, 0xBFBDBABF, 0xB6BBB9BA, 0xBBB6BBB9,
+ 0xBDBCB8BD, 0xB8BDBCB8, 0xBBB7BCBA, 0xBEBCB8BD,
+ 0xBABFBDB9, 0xBBB8BDBC, 0xBFBEB7BC, 0xB9C0BDB9,
+ 0xBCB7BDBC, 0xBFC0B7BD, 0xBABFC0BA, 0xC1BABFC0,
+ 0xC0BFBBC0, 0xBAC0BFBA, 0xC0BABFC0, 0xBFC0BABF,
+ 0xB8C0C0BA, 0xC0B8C0C0, 0xBEBEB6C0, 0xB8BDBEB6,
+ 0xC0B7BCBD, 0xBFC0BABF, 0xB8C0C0BA, 0xBFB8C0BF,
+ 0xC1C0B8C0, 0xBAC0BFBB, 0xC0B8C0BF, 0xC0C0B9C1,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0BFB8,
+ 0xBEBAC1BE, 0xC0BFBAC1, 0xB8C0BFBA, 0xBFBAC0BF,
+ 0xC1BEBAC0, 0xBABFBDBA, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xB8B7BCBA, 0xBFBDB5BA, 0xB7BCBABA,
+ 0xB7B8BCB7, 0x3F3DB8BC, 0x0000003E, 0x00000100,
+ 0x00000001, 0x00000100, 0x3A020004, 0x2E3B352F,
+ 0x271A3037, 0x7A3A2649, 0x5A95644A, 0x775A9278,
+ 0x405E4773, 0x223C301F, 0x2D24392F, 0x3D1A1125,
+ 0x1E363128, 0x3322432B, 0x935F4777, 0x5A95785B,
+ 0x684C817A, 0x3B39284A, 0x29452D1F, 0x2D1F3B37,
+ 0x08060808, 0xB4B20608, 0xB0B4AFB1, 0xBBBABDBB,
+ 0xBEBCBABD, 0xBABDBBBB, 0xBBB8BDBB, 0xBDBCB8BD,
+ 0xB7BDBCB7, 0xBDB7BCBD, 0xB8BBB7BC, 0xB6BBBCB3,
+ 0xBDBABFBE, 0xBFBDBABF, 0xBABFBDBA, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xB6B8C0BF, 0xBBBAAFB7,
+ 0xB8C0BFB3, 0xBDB9BFBE, 0xBFBEB8BE, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBEBDB9BF, 0xBAC0BFB8, 0xC0B8C0C0,
+ 0xBFBFB8C0, 0xB8C0C0B7, 0xBEB8C0C0, 0xBDBEB6BE,
+ 0xB7BCBDB8, 0xBFB9BFBE, 0xC0BFBAC0, 0xB9BFBEBA,
+ 0xBEB6BEBE, 0xC0C0B6BE, 0xB6BEBEB8, 0xC0B8BDBE,
+ 0xC1C1BABF, 0xB8C0C0B9, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB6BEBEB8, 0xBFB8BEBD, 0xBFBEBAC0, 0xBAC0BFB9,
+ 0xBEBAC0BF, 0xBFBDB9BF, 0xBABFBDBA, 0xBDBCBFBD,
+ 0xBFBDBCBF, 0xBABFBDBC, 0xBCBBC0BE, 0xBDBCB9BE,
+ 0xBAC0BFB7, 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBEBA,
+ 0xB9B7BEBB, 0xBEBCB5BC, 0xBABFBDB9, 0xB9B8BDBB,
+ 0xBDBBB6BB, 0xBABFBDB8, 0xB9B8BDBB, 0xBDBBB6BB,
+ 0xBABFBDB8, 0xBABABDBB, 0xBDBBB9BC, 0xB7BCBAB8,
+ 0xB9B8BFBA, 0xB7B2B8C0, 0xA3A9A4B1, 0xAEACB0AA,
+ 0xB3ADB0B4, 0xADB1ABB1, 0xAAAAB2A8, 0xB4AAACB4,
+ 0xAEB6ACAC, 0xACAEB6AB, 0xB4AAAFB7, 0xACB4AAAC,
+ 0xA8ABB1A6, 0xB2A9ADB3, 0xAAB2A8AD, 0xA9A7AEA7,
+ 0xB1A7A8B0, 0xA7ACA3A9, 0xA2A6ABA2, 0xAEA5A8AB,
+ 0xA6A9A0AB, 0x9FA8ACA1, 0xACA1A7AB, 0xAAAEA3A8,
+ 0xA1A7AEA1, 0xAA9EA9AD, 0xA8AA9EA8, 0x9BA8ACA0,
+ 0xA79BA3A7, 0xA5A99DA3, 0x9DA5A79B, 0xA79BA7A9,
+ 0xA2A69AA3, 0x98A1A89B, 0xA5989EA5, 0x9EA4999E,
+ 0x9A9DA59B, 0xA59B9BA4, 0x9DA59B9D, 0x96A0A69B,
+ 0xA1959CA3, 0xA3A79B9D, 0x92A0A596, 0xA3979CA1,
+ 0x9A9E929F, 0x979CA094, 0xA4989FA3, 0xA1A599A0,
+ 0x9399A093, 0xA29399A0, 0xA0A5969D, 0x93A1A697,
+ 0xA1959DA2, 0x9DA1959D, 0x909A9D8E, 0x9F969A9C,
+ 0x9EA1989C, 0x98A1A59A, 0xA499A0A4, 0x9EA499A0,
+ 0x35A1A99F, 0x0400353C, 0x00040000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00000101, 0x1C1C1C00, 0x00373939, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00010000,
+ 0x32000200, 0xA39A3438, 0xA1A599A0, 0x939CA493,
+ 0x9C8D9CA4, 0x999D9197, 0x8F9B9E8F, 0x9D919B9E,
+ 0x9C9C909D, 0x909A9C90, 0x9C8E9A9C, 0x9A9D8E9C,
+ 0x999B9F93, 0xA5969FA6, 0x9EA5969E, 0x989EA394,
+ 0xA599A2A7, 0xA1A599A1, 0x9AA1A599, 0xA79AA2A6,
+ 0xA0A79AA0, 0x99A4A99A, 0xA79BA3A8, 0xA3A79BA3,
+ 0x9BA4A89C, 0xA79BA3A7, 0xA2A69AA3, 0x9CA4A89C,
+ 0xA397A4A8, 0xA0A4989F, 0x9BA3A79B, 0xA899A3A7,
+ 0x9EA596A1, 0x9EA4A99A, 0xAC9DA8AD, 0xA8AFA0A5,
+ 0xA5ADB1A5, 0xB2A5ADB1, 0xAEB5A8AB, 0xA8ACAFA6,
+ 0xB3AAAEB1, 0xABAFA4B0, 0xA4AAB1A4, 0xAFA3ACB3,
+ 0xADB1A5AB, 0xA1AEB0A4, 0xB0A5AAAB, 0xADB1A6AC,
+ 0xA6A5AAA1, 0xB0A9A8AC, 0xA6ACA7A9, 0xA3A3A7A2,
+ 0xA7A3A4A8, 0xA2A6A1A6, 0xBAADB3AE, 0xBFBAB8BF,
+ 0xB7BEB9B8, 0xB9BAC0BB, 0xC0BEBABE, 0xB8BBB9BD,
+ 0xBDB6BBB9, 0xC0BFBABF, 0xB6BCBBBA, 0xBEB7BEBB,
+ 0xBFBEBBC0, 0xBABFBEBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBABABFBE, 0xBEBBB5BB, 0xB9C0BDB7,
+ 0xBBB7BDBC, 0xB9BAB6BC, 0xB7BCBDB4, 0xC0BABFC0,
+ 0xC0BFBABF, 0xBAC0BFBA, 0xC0BABFC0, 0xBFC0BABF,
+ 0xBABFC0BA, 0xC0B8C0C0, 0xBDBEB8C0, 0xBABFC0B8,
+ 0xC0B7BCBD, 0xC0C0BABF, 0xB8C0C0B8, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xBFB8C0BF, 0xBFC2B8C0,
+ 0xB8BFC2B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB9C1C0B8,
+ 0xBEB7C0BD, 0xC0BFB8C1, 0xB8C0C0B8, 0xBFB8C0BF,
+ 0xC2BFBAC0, 0xBBC0BEBB, 0xBDBBC0BE, 0xC1BFBABF,
+ 0xBBC0BEBC, 0xBDBBC0BE, 0xBEBCBABF, 0xBBC0BEB9,
+ 0xB9B8BCB7, 0x3E3EB8BB, 0x0000003E, 0x00000000,
+ 0x00000001, 0x00000100, 0x3A020004, 0x2D3D352F,
+ 0x271A3038, 0x78392548, 0x5A95644A, 0x785B9378,
+ 0x415E4773, 0x223A3320, 0x2F243830, 0x3C181225,
+ 0x1D372E27, 0x32224428, 0x8B5E4878, 0x5B936F55,
+ 0x6A4F8178, 0x3B382749, 0x29452D1F, 0x2F203C38,
+ 0x08070707, 0xB3B10808, 0xB0B3B1B0, 0xBBBABDBB,
+ 0xBDBBBABD, 0xBABDBBBA, 0xBBB8BDBB, 0xBDBCB8BD,
+ 0xB7BCBBB8, 0xBCB8BCBD, 0xBDBEB7BB, 0xBCC0C1B9,
+ 0xBDBABFBE, 0xBFBDBABF, 0xBABFBDBA, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB8BEBDB9, 0xBCBABFC0, 0xBBBBB6BB,
+ 0xB5BDBDB3, 0xBFB9BEBF, 0xBFBEB9BE, 0xBAC0BFB9,
+ 0xC0BABFC0, 0xBFBFBABF, 0xB8C0C0B7, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xBDB7BCBD, 0xBEBFB7BC, 0xB9BEBFB9,
+ 0xC0B8BFC2, 0xBDBEB6BD, 0xBABFC0B8, 0xC0BABFC0,
+ 0xBFC0BABF, 0xB8C0C0BA, 0xC0B8C0C0, 0xBDBEB8C0,
+ 0xB9BEBFB8, 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBEBA,
+ 0xBEBABFBE, 0xC0BEBABF, 0xBBC0BEBB, 0xBDB9BEBC,
+ 0xC0BEBABF, 0xBABFBDBB, 0xBDBABFBE, 0xBDBCB8BE,
+ 0xB9BFBEB7, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BEBDBA,
+ 0xB9B8BDBB, 0xBDBAB8BE, 0xB7BEBBB6, 0xBBBAC1BE,
+ 0xBDBBB8BD, 0xBABDBBB8, 0xBAB8BBB9, 0xBFBDB9BC,
+ 0xB8BDBBBA, 0xB9BABDBB, 0xBCBCB8BB, 0xB8BDBBBA,
+ 0xB8B8BFBA, 0xC0B9B7BF, 0xB1B9B2B8, 0xAAAAB1AA,
+ 0xB0ABACB0, 0xAEB2ACAC, 0xACAEB3AA, 0xB5ACB1B7,
+ 0xAEB3AAB0, 0xABAEB6AC, 0xB4AAADB5, 0xA9B1A7AC,
+ 0xA8ABB1A6, 0xB3A8ADB3, 0xA9B1A6AD, 0xA5A8B0A6,
+ 0xACA2A6AF, 0xA4ACA2A4, 0xA4A6AEA4, 0xADA4A8AD,
+ 0xA8ACA1AA, 0xA3A5ABA0, 0xACA1A8AE, 0xA7ADA2A6,
+ 0xA1A7AEA1, 0xAEA2A7AE, 0xA6AA9EAA, 0xA0A5A99D,
+ 0xA99DA8AC, 0xA6AA9EA5, 0x97A6AA9E, 0xA99D9FA3,
+ 0xA5A99DA5, 0x9AA1A89B, 0xA598A0A7, 0x9FA59A9E,
+ 0xA1A1A99F, 0x9F95A0A8, 0x9A9F9697, 0x9CA3A79C,
+ 0xA296A3A7, 0x9B9D91A0, 0x94A2A498, 0xA2939EA0,
+ 0xA0A5969D, 0x959BA295, 0xA4989BA2, 0x9DA195A0,
+ 0x99A0A498, 0x9F90A1A5, 0x9CA19298, 0x98A0A596,
+ 0xA195A2A4, 0x9B9F939D, 0x95989C90, 0x9F969CA0,
+ 0x9FA2999C, 0x999FA398, 0xA598A0A4, 0x9EA4999E,
+ 0xA2A1A99F, 0x706BA2A9, 0x0003006C, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000200, 0x55535202, 0x71AAABA9, 0x3A387073,
+ 0x00000039, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x36320001, 0xA0A39A35, 0x8DA4A89C,
+ 0x9C90979C, 0x979B8F98, 0x8F9B9E8F, 0x9E909B9E,
+ 0x9D9D8F9E, 0x8F9D9D8F, 0x9D8F9D9D, 0x9B9E8F9D,
+ 0x909A9F90, 0xA192989F, 0x9EA3949C, 0x99A3A599,
+ 0xA599A3A5, 0xA1A599A1, 0x98A2A798, 0xA79AA2A7,
+ 0xA0A79AA0, 0x99A2A798, 0xA79BA3A8, 0xA3A79CA3,
+ 0x9BA5A99D, 0xAA9EA3A7, 0xA5A99DA6, 0xA2AAAEA2,
+ 0xACA0AAAE, 0xA4A89CA8, 0x99A3A899, 0xA899A3A8,
+ 0xA3AA9BA1, 0x9FA5AC9F, 0xA99CA5AC, 0xA8AFA2A2,
+ 0xA5ADB1A6, 0xB4A8ADB1, 0xB0B4A9B0, 0xAAAAAEA8,
+ 0xAEA5ACB0, 0xAAB0A5A9, 0xA5B0B4A8, 0xB4A8AFB4,
+ 0xABAFA4B0, 0xA5ACB0A5, 0xB0A5ACB0, 0xAAB0A5AC,
+ 0xA9A9B1A7, 0xB0A9A9B0, 0xA8ACA6A9, 0xA2A3A7A2,
+ 0xBBB6A3A7, 0xB9BDB8B7, 0xB9B3BAB3, 0xC1B9B8C0,
+ 0xB9C1BAB6, 0xB9BAC0BB, 0xBFBDBABE, 0xBABDBBBC,
+ 0xBDB8BDBB, 0xBFBEB9C0, 0xB9BFBEB9, 0xBCB6BBB9,
+ 0xBFBEB9BE, 0xB7BDBCBA, 0xBCBAC1BE, 0xC2BFB8BF,
+ 0xBAC1BEBB, 0xBFBAC0BF, 0xBDBCBAC0, 0xB9BFBEB7,
+ 0xC0B8C0C0, 0xB9B8BABF, 0xB8BDBCB3, 0xC0BBBFC0,
+ 0xBFC0BBBF, 0xBBBFC0BB, 0xBFBBC0BF, 0xC1C0BBC0,
+ 0xBAC0BFBB, 0xC0B8C0C0, 0xBDBEB8C0, 0xB9BEBFB8,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB8C0BFB7, 0xBFBAC0BF,
+ 0xC1BEBAC0, 0xBAC1BEBA, 0xBFB8BEBD, 0xBFC2BAC0,
+ 0xB9C0C3B8, 0xBEB8C0C0, 0xC0C0B7BF, 0xB8C0BFB8,
+ 0xBEBAC1BE, 0xC0BFBAC1, 0xBABFC0BA, 0xBFBAC0BF,
+ 0xC0BEBAC0, 0xBBC1BCBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBABFBDBB, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xB9B8BCB7, 0x3E3EB8BB, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x3B020006, 0x2D3D352E,
+ 0x27193138, 0x783A2649, 0x5994624B, 0x765B9375,
+ 0x3E604872, 0x2339311F, 0x2F253630, 0x3C181225,
+ 0x1F362E27, 0x32234329, 0x8B5E4878, 0x5A926F55,
+ 0x684D7F77, 0x34382749, 0x28442819, 0x2F203C37,
+ 0x08070707, 0xB3B10808, 0xB0B3B1B0, 0xBDBABDBB,
+ 0xBDBBBCBF, 0xBABDBBBA, 0xBBB8BDBB, 0xBDBCB8BD,
+ 0xBABFBEB8, 0xBDBABCBD, 0xC0C1BABC, 0xB8BDBCBC,
+ 0xBDBABFBE, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBE,
+ 0xBFBEB8BE, 0xB9BFBEB9, 0xC1B9BEBF, 0xBEBFBBC0,
+ 0xB8C0C0B9, 0xBFB9BEBF, 0xC0BFB9BE, 0xBAC0BFBA,
+ 0xC0BABFC0, 0xBEBEBABF, 0xB8C0C0B6, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xBFBABFC0, 0xBEBFB9BE, 0xB9BEBFB9,
+ 0xC0B8BFC2, 0xBDBEB8C0, 0xB7BCBDB8, 0xC0BABFC0,
+ 0xBEBFBABF, 0xBBC0C1B9, 0xBFB8C0C0, 0xBEBFB7BF,
+ 0xBABFC0B9, 0xBEBAC0BF, 0xBFBEB9BF, 0xBBC0BFBA,
+ 0xBEBABFBE, 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBEBDB9BF, 0xB5BAB9B9,
+ 0xBBBABFBD, 0xBEBBB8BD, 0xB9C0BDB7, 0xBEB9C0BD,
+ 0xBBB9BAC1, 0xB8BBB9B6, 0xBDBABDBB, 0xBDBBBABF,
+ 0xB9BEBCB8, 0xBBBABDBB, 0xBDBBBABD, 0xB8BDBBBA,
+ 0xB9B9BFBA, 0xBFBAB8C0, 0xB8BFBAB8, 0xAEB5BBB6,
+ 0xB4AFAFB3, 0xAFB3AEB0, 0xACB2B5AC, 0xB5ACB2B5,
+ 0xB0B5ACB2, 0xACAEB3AA, 0xB3AAB0B5, 0xAEB3AAAE,
+ 0xA9ADB2A9, 0xB4A9AEB4, 0xADB3A8AE, 0xA5A7AFA5,
+ 0xB2A8A7AF, 0xAAB2A8AA, 0xA7A9B1A7, 0xB2A7ABB0,
+ 0xAAAEA3AE, 0xA3A8ACA1, 0xADA2A8AE, 0xA7ADA2A7,
+ 0x9EA7AEA1, 0xADA1A4AB, 0xA9ADA1A9, 0x9CA5A99D,
+ 0xADA1A4A8, 0xA3A79BA9, 0xA1A8ACA0, 0xA99DA9AD,
+ 0xA5A99DA5, 0x9B9FA699, 0xA89BA1A8, 0x9EA499A1,
+ 0x9F9DA59B, 0xA49BA1A9, 0x969B929F, 0x9E9CA297,
+ 0xA79BA5A9, 0x9EA296A3, 0x989B9D91, 0xA293A2A4,
+ 0x9DA2939D, 0x959EA598, 0x9C909BA2, 0x9B9F9398,
+ 0x96A0A498, 0xA3949EA2, 0x9EA3949E, 0x959B9F93,
+ 0xA1969DA1, 0x989C909D, 0x95979B8F, 0x9F969CA0,
+ 0x9C9F969C, 0x99A0A499, 0xA498A0A4, 0x9EA499A0,
+ 0xA0A4A9A0, 0x726DA0A7, 0x0003016E, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000200, 0x55545002, 0xA6ABACA8, 0xABA7AAAC,
+ 0x383937AA, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x36383200, 0xA29FA398,
+ 0x9C90AAAE, 0x989C9098, 0x8F9A9C90, 0xA0919B9E,
+ 0x9DA0919D, 0x919F9F91, 0x9F919DA0, 0x9B9E8F9F,
+ 0x8F9AA08F, 0xA19298A0, 0x9BA0919C, 0x939C9E92,
+ 0xA2969D9F, 0xA1A6979E, 0x96A1A697, 0xA699A0A5,
+ 0x9EA4999F, 0x9B9FA397, 0xA79BA3A7, 0xA3A79BA3,
+ 0x9EA3A79B, 0xA89CA6AA, 0xA5A99DA4, 0xA2ABAFA3,
+ 0xAEA2AAAE, 0xA4A89CAA, 0x9BA3A79B, 0xAA9BA5AA,
+ 0xA2A99AA5, 0x9CA2A99C, 0xA99CA2A9, 0xA9B0A3A2,
+ 0xA9B0B4A9, 0xB1A5B0B4, 0xABB1A6AD, 0xAAA8ACA6,
+ 0xB3AAACB0, 0xA9AFA4AE, 0xA8AEB5A8, 0xB4A9AEB5,
+ 0xAEB3AAAE, 0xA6B2B5AC, 0xACA1ACAF, 0xA6ABA2A8,
+ 0xA9A6ADA6, 0xAFA9A8B0, 0xA4A8A2AB, 0xAC989C97,
+ 0xBCB7ADB1, 0xB6BDB6B8, 0xBAB3BAB3, 0xC0B9B9C1,
+ 0xB8BFBAB8, 0xBBBAC0BB, 0xBFBDBCC0, 0xBABFBDBC,
+ 0xBDB7BEBB, 0xBFBEB9C0, 0xBAC0BFB9, 0xBCB5BAB8,
+ 0xC1C0B9BE, 0xB7BDBCBB, 0xBEB7C0BD, 0xC0BDB8C1,
+ 0xB9C0BDB9, 0xBFB8C0BF, 0xC0BFB8C0, 0xB5BDBCB8,
+ 0xC0B8C0C0, 0xBDBCB8C0, 0xB8BDBCB8, 0xC0BBBFC0,
+ 0xBEBFBBBF, 0xBABEBFBA, 0xC0BBC0BF, 0xC0BFBCC1,
+ 0xBAC0BFBA, 0xC0B8C0C0, 0xC0C1B8C0, 0xBABFC0BB,
+ 0xBFB9BFBE, 0xC0BFBAC0, 0xB8C0BFB8, 0xC0BAC0BF,
+ 0xC0BFBBC1, 0xBAC1BEBA, 0xBEB9BFBE, 0xC0C0B9BF,
+ 0xB8C0C0B8, 0xBFB7BFBE, 0xC0C0B8C0, 0xB8C0BFB8,
+ 0xBEBAC1BE, 0xC0BFBAC1, 0xBABFC0BA, 0xBEBAC0BF,
+ 0xC0BEBAC1, 0xBEC2BDBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBDBABFBD, 0xBFBDBABF, 0xBCC1BFBA,
+ 0xB9B8BCB7, 0x3E3EB8BB, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x3B000006, 0x2D3D352E,
+ 0x271A3037, 0x78382749, 0x5B93624B, 0x785B9278,
+ 0x40604870, 0x223A3321, 0x2F243830, 0x3B181225,
+ 0x1F362C28, 0x2B1C3C29, 0x8B5E4976, 0x5B926F55,
+ 0x62487878, 0x33392647, 0x243F2718, 0x2D1E3933,
+ 0x080A0808, 0xB8B70808, 0xB3B8B7B3, 0xBAB8BDBB,
+ 0xBEBCB7BC, 0xB8BDBBB9, 0xBBB8BDBB, 0xBCBCB8BD,
+ 0xBCBEBEBA, 0xBCBABFBE, 0xBEBFB8BD, 0xBBC0BFBA,
+ 0xBDBABFBE, 0xBFBDBABF, 0xBABFBDBC, 0xBEBABFBE,
+ 0xBFBEBABF, 0xBABFBEBA, 0xC0BBBFC0, 0xBFC0BABF,
+ 0xBABFC0BA, 0xC0BBBFC0, 0xBFC0BBBF, 0xBABFC0BB,
+ 0xC0BABFC0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0,
+ 0xC0C0B7BF, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC1C1B8C0, 0xB5BDBCB9, 0xC0B6BEBE,
+ 0xBFC2B8C0, 0xBBC0C3BA, 0xC0B6BEBE, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEBABFC0, 0xBFBEB9BF, 0xBABFBDBA,
+ 0xBDB9BFBE, 0xBEBDB8BE, 0xB9BFBEB8, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBDBCB9BF,
+ 0xBABFBEB8, 0xBCBABFBE, 0xBDBCB8BD, 0xBABFBEB8,
+ 0xBCB8BDBC, 0xBCBBB8BD, 0xB5BDBCB6, 0xBBB7BEBB,
+ 0xBDBBB7BE, 0xB6BBB9B8, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xB9B8BDBB, 0xBDBBB6BB, 0xB8BEB9B8,
+ 0xB7B8BCB7, 0xBEBCB8BC, 0xBABFBDBB, 0xBBBEC1BF,
+ 0xB2B0BABD, 0xB0B4AFAF, 0xADAEB2AC, 0xB3ADAFB3,
+ 0xAFB4ABAF, 0xACB3B6AD, 0xB5ACB2B5, 0xAEB3AAB2,
+ 0xAAAEB3AA, 0xB1A8AEB3, 0xAFB4ABAE, 0xA8ADB3A8,
+ 0xB3A9ABB3, 0xAAB2A8AB, 0xA2A5ADA2, 0xABA2A7AD,
+ 0xA8ACA1A8, 0x9EA6AA9F, 0xADA2A6AA, 0xA7ADA2A7,
+ 0xA2A9AFA4, 0xADA0A7AD, 0xA6ADA0A6, 0xA1A9ADA1,
+ 0xAA9EA9AD, 0xABADA1A8, 0xA0A5A99D, 0xA99DA8AC,
+ 0xA5A99DA5, 0x9DA5A99D, 0xA99EA5A9, 0xA3A99EA5,
+ 0x9B9FA59A, 0xA89F9FA4, 0x9EA39AA3, 0x9A9CA297,
+ 0xA99E9FA5, 0x9FA59AA3, 0x92A0A498, 0xA1959A9E,
+ 0x9DA1959D, 0x97A0A498, 0xA2969FA3, 0x989C909E,
+ 0x959D9F93, 0xA1959DA1, 0xA1A5999D, 0x959B9F94,
+ 0x9D949AA0, 0x93998E98, 0x959DA195, 0xA1969DA1,
+ 0xA0A4999B, 0x9AA0A499, 0xA397A1A5, 0x9EA4999F,
+ 0x76B3B7B1, 0x0100777B, 0x00000000, 0x01000000,
+ 0x01000101, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x01000000, 0x52534F00, 0x98A8A9A0, 0xA8A2A0A1,
+ 0xA7A9A3A8, 0x07646765, 0x08080409, 0x08080806,
+ 0x00000000, 0x00000000, 0x00010000, 0x9A363832,
+ 0xA498A1A5, 0xA0A498A0, 0x90989C90, 0x9C90989C,
+ 0x989C9098, 0x929EA094, 0xA1959A9E, 0x9BA0919F,
+ 0x909CA291, 0xA1919BA1, 0x9EA1919E, 0x919DA091,
+ 0xA3949DA0, 0xA2A596A0, 0x99A0A596, 0xA79BA3A8,
+ 0xA3A79CA3, 0x9BA3A79B, 0xA79BA3A7, 0xA3A79BA3,
+ 0x96A0A498, 0xA498A0A5, 0xA5A99DA0, 0xA1ABACA2,
+ 0xACA2AAAB, 0xA2A399AB, 0x9DA7A99D, 0xA79BA7A9,
+ 0xA4A89CA5, 0x9DA3A79B, 0xAB9CA5A9, 0xA8ACA0A6,
+ 0xA7ADB3A8, 0xB2A7ACB2, 0xADB3A8AC, 0xA9AEB3AA,
+ 0xB3AAABB3, 0xACB2A7AE, 0xACABB1A6, 0xB6ACAEB6,
+ 0xAEB6ACAE, 0xA7AEB3AA, 0xAFA6AEB2, 0xA8ADA4AA,
+ 0xA7A7AEA7, 0xAEA9A5AC, 0x969A95AA, 0xB09EA59E,
+ 0xC0B9B0B7, 0xB9C0B9B9, 0xB9B6BCB7, 0xC0BBB8BE,
+ 0xBABFBDBA, 0xBDBABFBD, 0xC0BFBABF, 0xBABFBEBB,
+ 0xBDB7BEBB, 0xBFBEB9C0, 0xBAC0BFB7, 0xB9BABFBD,
+ 0xBFBEB6BB, 0xBAC0BFB9, 0xBDB9C0BD, 0xC1C0B9C0,
+ 0xB9BFBEBC, 0xBFB8C0BF, 0xC0C0B6C1, 0xB8C0C0B6,
+ 0xBCB5BDBC, 0xBDBCB5BD, 0xB9BEBDB8, 0xC0BABFC0,
+ 0xBFC0BABF, 0xBABFC0BA, 0xBEB9BFBE, 0xC0BFB9BF,
+ 0xBBC1C0BB, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBEB9BFBE, 0xBFC0B9BF, 0xB9BEBFBA, 0xBEB9C1C1,
+ 0xC0BFB7BF, 0xB8C0BFB8, 0xBEB9C0BD, 0xC0C0B9BF,
+ 0xB8C0C0B8, 0xBFB3BEBC, 0xC0C0B8C0, 0xBAC0BFB8,
+ 0xBEBAC1BE, 0xC0BFBAC1, 0xB8C0C0B8, 0xBEBAC0BF,
+ 0xC0BEBAC1, 0xBBC1BCBB, 0xBEBBC0BE, 0xC1BEBBC0,
+ 0xBAC1BEBA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xB9B8BCB7, 0x3E3EBABB, 0x0000003E, 0x00000000,
+ 0x01000001, 0x00000000, 0x36000004, 0x2B36302D,
+ 0x231B2C31, 0x6E352544, 0x52875A44, 0x6F528470,
+ 0x35584167, 0x19342A18, 0x362A4028, 0x3B181225,
+ 0x20352C28, 0x2B1C3B29, 0x895E4A75, 0x54896E54,
+ 0x62487670, 0x32382645, 0x28402A1A, 0x2A1A3238,
+ 0x080A0808, 0xB8B70808, 0xB2B8B7B3, 0xBCBABFBE,
+ 0xBFBDB9BE, 0xB9BEBCBA, 0xBBB8BDBB, 0xBCBCB8BD,
+ 0xBABFBEBA, 0xBDBABFBE, 0xBEBFB9BE, 0xBABFBEBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBC, 0xBEBABFBE,
+ 0xBFBEBABF, 0xBABFBEBA, 0xC0BBBFC0, 0xBFC0BBBF,
+ 0xBABFC0BA, 0xC0BBBFC0, 0xBFC0BBBF, 0xBABFC0BB,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC1C1B8C0, 0xB8C0C0B9, 0xC0B9C1C1, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB9C1C1B8, 0xBEB8C0C0,
+ 0xBDC0B6BE, 0xB7BCBFB8, 0xC0B6BEBE, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFBABFC0, 0xBFBEBAC0, 0xBABFBEBA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBEBDB9BF,
+ 0xBABFBEB9, 0xBEBABFBE, 0xBFBEBABF, 0xBABFBEBA,
+ 0xBDB8BDBC, 0xBDBCB8BE, 0xB5BDBCB5, 0xBCB7BEBB,
+ 0xBFBDB8BF, 0xBABFBDBA, 0xBBB7BEBB, 0xBEBCB7BE,
+ 0xB8BDBBB9, 0xBABABFBD, 0xBDB8B7BC, 0xB8BCB7B7,
+ 0xBBB8BCB7, 0xBEBCBABD, 0xBCBEBEBB, 0xBFBABDBB,
+ 0xB8B6BEC1, 0xB0B3B1B5, 0xADAFB3AE, 0xB3ADAFB3,
+ 0xAFB3ADAF, 0xAAADB0A7, 0xB3AAB0B3, 0xAFB1ABB0,
+ 0xAAAEB3AA, 0xB3AAAEB3, 0xADB2A9B0, 0xA7AEB3AA,
+ 0xB1A7ACB2, 0xA9B1A7A9, 0xA4A8B0A5, 0xABA2A9AF,
+ 0xA8ABA2A8, 0xA1A9ADA1, 0xAEA3A9AD, 0xA6ACA1A8,
+ 0xA2A6ACA1, 0xAEA1A7AD, 0xA6ADA0A7, 0x9EA6AA9E,
+ 0xAA9EA6AA, 0xA6AA9EA8, 0x9DA9ADA1, 0xA79BA5A9,
+ 0xA0A498A3, 0xA0A5A99D, 0xA79CA8AC, 0xA3A79CA3,
+ 0x9AA1A79C, 0xA59A9FA5, 0x9FA59A9F, 0x979AA297,
+ 0xA4999AA2, 0x9DA59A9C, 0x98A0A498, 0xA195A0A4,
+ 0x9B9F939D, 0x989DA195, 0xA195A0A4, 0x9B9F939D,
+ 0x909A9C90, 0xA1959A9C, 0xA0A4999D, 0x979AA095,
+ 0x9D9399A1, 0x959D9295, 0x939B9F94, 0xA1959B9F,
+ 0x9DA1959D, 0x98A0A499, 0xA4989FA3, 0xA0A499A0,
+ 0x00777B75, 0x01010001, 0x00000001, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x01000000, 0x52544E00, 0x89A1A299, 0x93899293,
+ 0x8F928992, 0x95929893, 0x38369297, 0x08090735,
+ 0x00000100, 0x00000000, 0x00000000, 0x30010200,
+ 0xA39A3639, 0xA0A499A0, 0x8F989C91, 0x9C90979B,
+ 0x989C9098, 0x91979B8F, 0x9C90999D, 0x9BA09198,
+ 0x919CA291, 0x9E8E9CA2, 0x9A9D8D9B, 0x96A0A394,
+ 0xA393A2A5, 0xA2A595A0, 0x96A1A796, 0xA79BA0A5,
+ 0xA3A79CA3, 0x9DA3A79B, 0xA99DA5A9, 0xA5A99DA5,
+ 0x9DA5A99D, 0xAFA3A5A9, 0xAAAEA2AB, 0xA3AAABA1,
+ 0xACA3ACAD, 0xA6A79DAB, 0x98A2A399, 0xA498A2A4,
+ 0xA4A69AA2, 0x9BA3A79B, 0xA798A3A7, 0xA9AE9FA2,
+ 0xA8ADB4A7, 0xB4A9ADB3, 0xAEB4A9AE, 0xA8ADB2A9,
+ 0xB3A8AAB2, 0xADB3A8AD, 0xAFACB4AA, 0xB2ABAEB6,
+ 0xACB4AAAA, 0xA7ABB1A6, 0xAFA6AEB2, 0xAAAEA8AA,
+ 0xA8A6ACA7, 0xADA8A7AD, 0x9EA49FA7, 0xB0B0B7B0,
+ 0xC0B9B0B7, 0xB9C0BBB8, 0xB9BABEB9, 0xBDBBB8BB,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBEB9C0, 0xBABFBEBA,
+ 0xBDB7BEBB, 0xBFBEB9C0, 0xBAC0BFB9, 0xB9B9C0BD,
+ 0xBDBCB6BB, 0xB9BFBEB7, 0xBBB9C0BD, 0xBFBEB7BE,
+ 0xB9BFBEBA, 0xBFB7BFBE, 0xC0C0B8C0, 0xB9C1C1B8,
+ 0xBAB8C0BF, 0xBAB9B5BB, 0xB6BBBAB5, 0xC0BABEBF,
+ 0xBFC0BABF, 0xBABFC0BA, 0xBEBAC0BF, 0xBEBDB9BF,
+ 0xB9BFBEB8, 0xC0B7BFBF, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBDBAC0BF, 0xBFC0B8BE, 0xB9BEBFBA, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xBEB9BFBE, 0xC0C0B9BF,
+ 0xB8C0C0B8, 0xBFB3BEBC, 0xC0C0B8C0, 0xBABFC0B8,
+ 0xBFBAC0BF, 0xC0C0B8C0, 0xB6C0C0B6, 0xBFBAC0BF,
+ 0xC0BEBAC0, 0xBBC1BCBB, 0xBEBBC0BE, 0xC1BEBBC0,
+ 0xBAC1BEBA, 0xBDBBC0BE, 0xBFBDBABF, 0xBCBFBDBA,
+ 0xB7B8BCB7, 0x3E3EBABB, 0x0000003E, 0x00000100,
+ 0x01000001, 0x00000000, 0x36000003, 0x2D38302D,
+ 0x201A2B31, 0x6C342642, 0x51835A45, 0x6F52836E,
+ 0x36584265, 0x18332B19, 0x36294127, 0x3B181225,
+ 0x20352E28, 0x291D3927, 0x8756426C, 0x56886E55,
+ 0x62497571, 0x31372542, 0x283F2A1A, 0x2A1A3138,
+ 0x08080808, 0xB7B80608, 0xAFB7B6B2, 0xBBB7BDBC,
+ 0xBDBBB6BC, 0xB9BEBCB8, 0xBDB7BEBB, 0xBDBCB9C0,
+ 0xBBC0BFB8, 0xBEBABFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEBABFBE,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xC0BBBFC0, 0xBFC0BBBF,
+ 0xBABFC0BA, 0xC0BBBFC0, 0xBFC0BBBF, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB9C1C1B8, 0xBFB8C0C0,
+ 0xBFC2B7BF, 0xB8BFC2B8, 0xC0B8BFC2, 0xC0C0B6BD,
+ 0xB9C1C1B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0BF, 0xC0C0B8C0, 0xB6C0C0B6, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB5BDBDB8, 0xC3B8BDC0, 0xC0C0BBC0,
+ 0xB8C0C0B8, 0xBEB8C0BF, 0xBFBEB7BF, 0xBAC0BFB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xBAC0BFB9, 0xBEBABFBE, 0xBCBBBABF,
+ 0xBABFBEB7, 0xBEB9BFBE, 0xBEBDB9BF, 0xB9BFBEB8,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB5BDBCB5, 0xBBB7BEBB,
+ 0xBEBCB8BD, 0xB9BEBCB9, 0xBBBAC1BE, 0xBDBBB7BE,
+ 0xBABFBDB8, 0xBABBC0BE, 0xBCB7B7BC, 0xBABEB9B8,
+ 0xBBBBBEBC, 0xBDBBBABD, 0xBCBDBBBA, 0xBBBCBDBB,
+ 0xC1C1BCBD, 0xB5B8B6C1, 0xAEAEB2AD, 0xB3ADAEB5,
+ 0xAFB3ADAF, 0xAAAEB3AA, 0xB3AAAEB3, 0xAEB3AAAE,
+ 0xADB0B3AA, 0xB4AEB3B6, 0xAEB3AAB0, 0xA9ADB2A9,
+ 0xB2A7ABB3, 0xADB3A8AC, 0xA6A9B1A7, 0xAFA9A8B0,
+ 0xA9AEA5AB, 0xA1A6ADA0, 0xADA2A7AE, 0xABB0A7A7,
+ 0xA1A5ADA2, 0xACA1A4AC, 0xA8AEA3A6, 0xA2A6ACA1,
+ 0xADA1A7AD, 0xA6AA9EA9, 0x9DA5A99D, 0xA89CA3AA,
+ 0xA5A99DA4, 0x9DA3A79B, 0xAA9FA5A9, 0xA3A79CA6,
+ 0x9B9FA699, 0xA598A1A8, 0x9FA59A9E, 0x999DA59A,
+ 0xA79A9CA4, 0x99A2959E, 0x99A0A499, 0xA498A0A4,
+ 0xA0A498A0, 0x939B9F93, 0xA1959B9F, 0x9EA2969D,
+ 0x909A9E92, 0x9B91989C, 0x989C919A, 0x959BA196,
+ 0x9E9498A0, 0x959D9296, 0x959B9F94, 0x9E929DA1,
+ 0x9CA0949A, 0x98A0A498, 0xA499A0A4, 0xA0A39AA0,
+ 0x013A3E39, 0x00000001, 0x00000100, 0x00000000,
+ 0x02000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x55554F02, 0x889EA297, 0x94889094,
+ 0x8F958A90, 0x92919891, 0x97929097, 0x35393491,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000100,
+ 0x37330001, 0xA0A39A36, 0x95A8ACA1, 0x9C909DA1,
+ 0x9DA19598, 0x939DA195, 0x9F939A9E, 0x989D8E9B,
+ 0x89989C89, 0x9C8C989C, 0x9B9E8E99, 0x92A0A393,
+ 0xA5959FA2, 0xA0A393A2, 0x95A0A695, 0xA89CA0A6,
+ 0xA3A79CA4, 0x9DA3A79B, 0xA99DA5A9, 0xA8ACA0A5,
+ 0xA4ABAFA3, 0xAFA4ABAF, 0xABAFA4AB, 0xA8B1B2A9,
+ 0xACA3B0B1, 0xA6A79DAB, 0x9DA2A69B, 0xA899A5A9,
+ 0xA6AB9CA3, 0x9DA5A99D, 0xAA9BA5A9, 0xA8AD9EA5,
+ 0xA7AEB5A8, 0xB4A9ADB4, 0xAEB4A9B0, 0xA6ADB3A8,
+ 0xB2A7ABB1, 0xAEB3AAAE, 0xA9A8B0A9, 0xB4ACA6B1,
+ 0xAEB7ADA9, 0xA9AEB4A9, 0xAEA5B0B4, 0xAAAEA8A9,
+ 0xA7A9ADA8, 0xB9B2A6AC, 0xB1B9B2B2, 0xB9B8C0B9,
+ 0xBFBAB8C0, 0xB8BFBAB8, 0xB8BCC0BB, 0xBDBBB9BD,
+ 0xBABFBDBA, 0xBFBABFBE, 0xBFBCBAC0, 0xB8BFBCB8,
+ 0xBFB9BEBD, 0xC1C0BBC0, 0xB8BEBDBC, 0xBCB9BFBE,
+ 0xBDBCB7BD, 0xBABFBEB8, 0xBCBBC0BE, 0xBCBBB9BE,
+ 0xBAC0BFB6, 0xBEB9C0BD, 0xBFBEBAC1, 0xBAC0BFB9,
+ 0xBDB7BFBE, 0xB8B9B8BE, 0xB7BBBCB4, 0xC0BBBFC0,
+ 0xBFC0BBBF, 0xBBC0C1BA, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB7BFBE, 0xBFC0B7BF, 0xBBC0C1BA,
+ 0xBCBBC1C0, 0xC0C0B7BD, 0xB8BFC2B8, 0xBFB6BEBE,
+ 0xC0C1B7BF, 0xB9BFBEBB, 0xBFB8C0BF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB5BDBC, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xC0C0B8C0, 0xB6C0C0B6, 0xBFBAC0BF,
+ 0xC0BEBAC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBBBCBFBD, 0xBFBDBABD, 0xBCBFBDBC,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000100, 0x37000004, 0x2D37312E,
+ 0x201A2B2E, 0x6C342642, 0x52845845, 0x6F52836D,
+ 0x35584265, 0x1A352A18, 0x36294129, 0x3C191024,
+ 0x172C2F29, 0x291D391E, 0x7D56426C, 0x4E7E634D,
+ 0x58426C66, 0x3134223F, 0x243B2A1A, 0x29193034,
+ 0x08080808, 0xB7B80608, 0xB0B8B8B2, 0xBEBAC0BF,
+ 0xBDBBB9BF, 0xB7BCBAB8, 0xBDB7BEBB, 0xBDBCB9C0,
+ 0xBBC0BFB8, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xC0BBBFC0, 0xBFC0BABF,
+ 0xBABFC0BA, 0xC0BBBFC0, 0xBFC0BABF, 0xBABFC0BA,
+ 0xC0B9C1C1, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xB9BCB8C0, 0xA8AFB2B2, 0xC0B6BDC0, 0xC0C0B6BD,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC1C1B8C0, 0xB7BFBFB9,
+ 0xC0B8C0C0, 0xBFC2B8C0, 0xB4BDC0B6, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB8BDBE, 0xC0C0B8BD,
+ 0xB8C0C0B8, 0xBCB7BFBE, 0xBEBFB5BD, 0xB9BEBFB9,
+ 0xBEB8BEBD, 0xBFBEB9BF, 0xB9BFBEB9, 0xBDB9BFBE,
+ 0xBFBEB8BE, 0xB9BFBEB9, 0xBCBABFBE, 0xBCBBB8BD,
+ 0xB9BFBEB7, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB5, 0xBCB8BFBC,
+ 0xBDBBB9BE, 0xB7BEBBB8, 0xBEB7BEBB, 0xBDBBBAC1,
+ 0xB8BDBBB8, 0xB9B6BBB9, 0xBDBBB6BB, 0xBCBFBDBA,
+ 0xBBBABFBD, 0xBDBBBABD, 0xBCBDBBBA, 0xBBBBBCBA,
+ 0xBCBCBCBD, 0xBBBEBCBC, 0xADB8BCB7, 0xB4ADADB4,
+ 0xAFB3ADAD, 0xACAFB3AD, 0xB5ACB0B5, 0xADB2A9B0,
+ 0xADB0B3AA, 0xB2ACB3B6, 0xAEB3AAAE, 0xA9ACB1A8,
+ 0xB4A9ADB2, 0xAEB4A9AE, 0xA3A9B1A7, 0xB0A6A5AD,
+ 0xA4ACA2A8, 0xA1A1A89B, 0xB2A7A7AE, 0xABB0A7AC,
+ 0xA4A9B1A6, 0xACA1A7AF, 0xA5ABA0A6, 0xA3A7ADA2,
+ 0xADA1A8AE, 0xA8ACA0A9, 0x9DA7AEA1, 0xACA0A3AA,
+ 0xA6AA9EA8, 0x98A5A99D, 0xA99EA0A4, 0xA8ACA1A5,
+ 0x99A1A89B, 0xA89B9FA6, 0x9EA598A1, 0x969CA297,
+ 0xA6999BA1, 0x9CA3969F, 0x99A0A499, 0xA498A0A4,
+ 0xA0A498A0, 0x909DA195, 0x9C90989C, 0x989C9098,
+ 0x939CA094, 0x9C909B9F, 0x999D929A, 0x8E93998E,
+ 0x9D929199, 0x959D9295, 0x939B9F93, 0xA0949D9F,
+ 0x9CA0949C, 0x999EA499, 0xA39A9EA4, 0x40423CA0,
+ 0x00000200, 0x01010000, 0x00000001, 0x00000000,
+ 0x23210001, 0x15181620, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000001, 0x54544E02, 0x87979B90, 0x95888F93,
+ 0x8F958A8E, 0x9191998F, 0x98919198, 0x94989291,
+ 0x23767872, 0x01002729, 0x00000000, 0x00000000,
+ 0x00000000, 0x36373300, 0xA09DA097, 0x9D8EA8AC,
+ 0x9DA29398, 0x959DA195, 0xA1959DA1, 0x9DA2939D,
+ 0x8C989C89, 0xA28F9B9F, 0x9EA1919E, 0x939DA090,
+ 0xA393A0A3, 0xA0A393A0, 0x969EA493, 0xA397A1A7,
+ 0xA0A4989F, 0x9CA3A79B, 0xADA1A4A8, 0xA8ACA0A9,
+ 0xA4ACB0A5, 0xAFA4ABAF, 0xABAFA4AB, 0xA4ABACA3,
+ 0xA69DACAD, 0xA6A79DA5, 0xA1A4A89C, 0xAA9BA9AD,
+ 0xA5A99DA5, 0xA0A5A99D, 0xA99DA8AC, 0xA6ADA0A5,
+ 0xA6ADB4A7, 0xB2A7ACB3, 0xADB1A6AE, 0xA8ACB2A7,
+ 0xB3A8ADB3, 0xACB1A8AF, 0xACA9B0A9, 0xB5AEABB3,
+ 0xACB5ABAD, 0xA9ACB2A7, 0xB2ACAEB4, 0xA9ADA7AE,
+ 0xA8A0A49F, 0xB8B1A7AD, 0xB0B8B1B1, 0xBAAFB6B1,
+ 0xBEB9B8BF, 0xB9C0BBB7, 0xB9BAC0BB, 0xBBB9B8BB,
+ 0xBABFBDB8, 0xBEB9BEBD, 0xBDBCB9BF, 0xB7BEBBB7,
+ 0xBCB6BBBA, 0xBDBCB8BD, 0xBABFBEB8, 0xBEBBC0BF,
+ 0xBDBCB9BF, 0xB9BEBDB8, 0xBEBABFBD, 0xBCBBBBC0,
+ 0xB6BCBBB6, 0xBDBABFBD, 0xC0BFBABF, 0xBAC0BFBA,
+ 0xBDB9BFBE, 0xBBBCB8BE, 0xB9BBBCB7, 0xC0BBBFC0,
+ 0xBFC0BABF, 0xB8C0C0BA, 0xC0B8C0C0, 0xC0C0B6C0,
+ 0xB8C0C0B6, 0xBFB7BFBE, 0xBEBFB8C0, 0xB8BDBEB9,
+ 0xBFBAC0BF, 0xBFC2B9BE, 0xB8BFC2B8, 0xC0B7BFBF,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xBFB9C1C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB4BCBB, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFBAC0BF,
+ 0xC0BEBAC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBBBCBFBD, 0xBEBCBABD, 0xBBBEBCBB,
+ 0xB9B6BBB9, 0x3E3EB6BB, 0x0000003C, 0x00000000,
+ 0x00000000, 0x00000100, 0x36000004, 0x2D38302D,
+ 0x201B2A31, 0x6C322642, 0x53835845, 0x6D53816B,
+ 0x35564265, 0x1A322819, 0x362A4028, 0x341B1226,
+ 0x192C2721, 0x291D391F, 0x7C56436A, 0x4E7E644F,
+ 0x57416B66, 0x3134223F, 0x233A281B, 0x281B3133,
+ 0x08080808, 0xB7B80608, 0xB0B8B8B2, 0xBEB9BFBE,
+ 0xBDBBB9BF, 0xB8BDBBB8, 0xBDB7BEBB, 0xBDBCB9C0,
+ 0xB9BFBEB7, 0xBDBABFBD, 0xBFBEBABF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBFBAC0BF, 0xBFC0BAC0,
+ 0xB7BFBFBA, 0xBEBAC0BF, 0xC0BFB9BF, 0xB8C0C0BA,
+ 0xC3B8C0C0, 0xC0C0B9C0, 0xB8C0C0B8, 0xC0B7BFBF,
+ 0xBDBDB8C0, 0xAEB6B6B5, 0xBFB6BEBE, 0xC0C0B7BF,
+ 0xB6BEBEB8, 0xC0B8C0C0, 0xBFC2B8C0, 0xB8C0C0B8,
+ 0xC0B6BEBE, 0xC0C3B8C0, 0xB8BFC2B9, 0xC0B6C0C0,
+ 0xC0C0B8C0, 0xBABFC0B8, 0xBCB7BCBD, 0xBCBBB7BD,
+ 0xB8BEBDB6, 0xBDB4BCBC, 0xBCBFB5BD, 0xB4BCBCB5,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBBB7BDBC,
+ 0xBCBDB6BC, 0xB7BCBDB7, 0xBDB7BCBD, 0xBDBCB7BC,
+ 0xB7BDBCB7, 0xBEB9BFBE, 0xC0BDB7BF, 0xB7C0BDB7,
+ 0xBBB7BEBB, 0xBDBCB7BE, 0xB7BDBCB7, 0xBCB7BDBC,
+ 0xBCBBB7BD, 0xB7BDBCB6, 0xBBB8BFBC, 0xBDBBB7BE,
+ 0xB9BCBAB8, 0xBCB8BBB9, 0xBCBABBBE, 0xBBC0BEB7,
+ 0xBBBCBFBD, 0xBDBBBABD, 0xB9BCBABA, 0xB7B8BCB7,
+ 0xBDBBB8BC, 0xBCBFBDBA, 0xB6BABEB9, 0xB7B2B5BB,
+ 0xB1B8B1B1, 0xAEAFB3AD, 0xB4ADB0B4, 0xAFB3ADAD,
+ 0xAAB3B6AD, 0xB1A8B0B3, 0xAEB3AAAC, 0xA8AEB3AA,
+ 0xB5AAAFB3, 0xAEB4A9B1, 0xA0A9B1A7, 0xB1A7A1AA,
+ 0x969E93A9, 0xA19BA295, 0xADA2A7AE, 0xA7ADA2A7,
+ 0xA2AAB0A5, 0xADA2A7AD, 0xAAB0A5A7, 0xA0A8AEA3,
+ 0xACA1A5AB, 0xA9ADA2A8, 0xA0A5AC9F, 0xA99DA6AD,
+ 0xA7AB9FA5, 0xA0ABADA1, 0xA89CAAAC, 0xA5A99DA4,
+ 0x9DA5A99D, 0xAA9EA5A9, 0xA5A99DA6, 0x92A2A69A,
+ 0xA2979A9E, 0xA2A69B9E, 0x98A0A498, 0xA598A0A4,
+ 0x9EA5989E, 0x949BA295, 0xA0949AA1, 0x989C909C,
+ 0x95969C91, 0xA2969BA2, 0x9DA1959E, 0x8F9EA297,
+ 0x968B949A, 0x989F9290, 0x97A0A498, 0xA596A1A3,
+ 0xA0A498A2, 0xAAABB0A7, 0x3B39ACB0, 0x0000003A,
+ 0x00000000, 0x00000000, 0x00010000, 0x6A161917,
+ 0x9694696C, 0x686B6991, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x50504A02, 0x8A969990, 0x968B9195,
+ 0x8E948992, 0x8E8F948B, 0x99909297, 0x95998E96,
+ 0x919B9C92, 0x3A349A9B, 0x0A08073A, 0x09080507,
+ 0x04090804, 0x07050508, 0x9433352F, 0x9E929B9F,
+ 0x9A9F909A, 0x909EA394, 0xA3949A9F, 0x9EA4939C,
+ 0x91A1A494, 0xA491A0A4, 0x9FA390A0, 0x919FA390,
+ 0xA393A0A4, 0xA6A999A0, 0x98A8AB9B, 0xAB9CA4A7,
+ 0xA8AD9EA6, 0xA0AAAFA0, 0xAEA2AAAF, 0xABAFA3AA,
+ 0xA3ABAFA3, 0xB2A6ABAF, 0xADB1A5AE, 0xA2B0B1A7,
+ 0xADA4ABAC, 0xA4A89DAA, 0x9EA6AA9E, 0xA99DA8AD,
+ 0xA5A99DA5, 0xA1A4AA9F, 0xA99EA6AC, 0xA4AA9FA3,
+ 0xA7ADB4A7, 0xB4A9ADB4, 0xB0B3AAB0, 0xAAAEB3AA,
+ 0xB2A9AEB3, 0xB0B3AAAF, 0xACAEB1A8, 0xB4ABB0B5,
+ 0xAFB7ADAF, 0xAEA8B0A6, 0xB7B0B0B8, 0xA8AEA9B0,
+ 0xA9A9B0A9, 0xB9B4A9B0, 0xB1B7B2B3, 0xBDB6BBB9,
+ 0xC0BDBABF, 0xB8BFBCB9, 0xBBB9C0BD, 0xBAB8B8BD,
+ 0xBABFBDB5, 0xBEB9BEBD, 0xBFBEBABF, 0xB9BFBEB9,
+ 0xBEB9C0BD, 0xBFBDBBC0, 0xB8BDBBBA, 0xBDBABFBD,
+ 0xC0BEBABF, 0xB8BDBBBB, 0xBDB8BDBB, 0xBFBEBABF,
+ 0xB7BDBCB9, 0xBFBAC1BE, 0xC0C0BAC0, 0xB8C0C0B8,
+ 0xBCBDC2C1, 0xBBBCB8BD, 0xBABEBFB9, 0xC0B7BCBD,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xC0B8C0C0, 0xBFBFB8C0,
+ 0xB7BFBFB7, 0xC0B7BFBF, 0xC0C0B8C0, 0xB7BFBFB8,
+ 0xC0B6BEBE, 0xBFC2B8C0, 0xB8BFC2B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBDB4BCBB, 0xC0C0B6BE, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBEBAC0BF,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBDB9C0BD, 0xC0BBB9C0,
+ 0xB9C0BBB9, 0xBBBABFBD, 0xBDB8B8BD, 0xB7BCBAB9,
+ 0xB7B2B8B7, 0x3D3DB2B8, 0x0000003B, 0x00020000,
+ 0x00000200, 0x00000100, 0x2C000003, 0x242D2826,
+ 0x1D162527, 0x61291D39, 0x49764D3C, 0x5E4A755E,
+ 0x304A3A5C, 0x152D2214, 0x2F243822, 0x33150D1E,
+ 0x1B2F2A22, 0x25183224, 0x744C3960, 0x46765E47,
+ 0x57416B60, 0x2B2F203B, 0x21372217, 0x271B312E,
+ 0x08080808, 0xB7B80608, 0xB0B8B8B2, 0xBEB9BFBE,
+ 0xBEBCB9BF, 0xB8BDBBB9, 0xBDB6BDBA, 0xBDBCB9C0,
+ 0xB9BFBEB7, 0xBDBABFBD, 0xBEBDBABF, 0xB9BFBEB8,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBFB9BF,
+ 0xB7BFBFB7, 0xBEB9BFBE, 0xBFBEB9BF, 0xB7BFBEB7,
+ 0xC2B8C0C0, 0xC0C0B8BF, 0xB9C1C1B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xC0B8C0C0, 0xBEC1B8C0, 0xB8BFC2B7,
+ 0xC1B8C0C0, 0xBEC1B9C1, 0xB8BFC2B7, 0xC0B5BDBD,
+ 0xC0C1B8C0, 0xBABFC0BB, 0xBBB8BEBD, 0xBDBCB6BC,
+ 0xB6BCBBB7, 0xBDB2B7B8, 0xBCBFB5BD, 0xB6BEBEB5,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC,
+ 0xBCBDB7BD, 0xB7BCBDB7, 0xBDB7BCBD, 0xBEBDB7BC,
+ 0xB7BDBCB8, 0xBCB6BEBD, 0xC0BDB5BD, 0xB9C0BDB7,
+ 0xBCB7BEBB, 0xBDBCB7BD, 0xB7BDBCB7, 0xBBB7BDBC,
+ 0xBCBBB6BC, 0xB7BDBCB6, 0xBBB7BEBB, 0xBCBAB7BE,
+ 0xB8BDBBB7, 0xBBBCBFBD, 0xBEBCBABD, 0xB8BDBBB9,
+ 0xBCB8BDBB, 0xBDBBB9BE, 0xB8BDBBB8, 0xB9BBBEBC,
+ 0xBDBBBABE, 0xBCBFBDBA, 0xB9BEC2BD, 0xBBB6BABE,
+ 0xB1B7B2B5, 0xACAFB3AD, 0xB3AEAEB2, 0xAFB3ADAD,
+ 0xA8B0B3AA, 0xB3AAAEB1, 0xB0B5ACAE, 0xA9B0B4A9,
+ 0xB4A9B0B4, 0xAEB3AAB0, 0xA7A9B1A7, 0xB2A8A8B1,
+ 0xA3ABA0AA, 0xA9A1A89B, 0xB5AAAFB6, 0xA7ADA2AF,
+ 0x9FA4AA9F, 0xB0A5A4AA, 0xABB1A6AA, 0xA5A9AFA4,
+ 0xABA0AAB0, 0xA8ACA1A7, 0xA0A6ADA0, 0xA99DA6AD,
+ 0xA9ADA1A5, 0xA0A9ADA1, 0xACA0A8AC, 0xA2A69AA8,
+ 0xA0A5A99D, 0xA99DA8AC, 0xA5A79BA7, 0x9AA4A69A,
+ 0xA297A2A6, 0x9FA3989E, 0x98A1A599, 0xA194A0A4,
+ 0x99A0939A, 0x9A9CA396, 0xA498A0A7, 0x9CA094A0,
+ 0x90999F94, 0x9F93969D, 0x9DA1959B, 0x949FA397,
+ 0x998D9B9F, 0x9A9E9295, 0x97A1A599, 0xA498A1A3,
+ 0xA0A499A2, 0x37ABAFA9, 0x0101383C, 0x00000000,
+ 0x00000000, 0x01000102, 0x30312D00, 0x91939792,
+ 0x97929096, 0x676C6A91, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x4F4F4902, 0x8C969990, 0x94899295,
+ 0x91958A90, 0x8E8F948B, 0x978D9297, 0x98998F96,
+ 0x909A9C90, 0x9C939A9C, 0x6969639B, 0x07080605,
+ 0x04090805, 0x09060808, 0x2D000100, 0x9E933336,
+ 0x9A9F909A, 0x949EA493, 0xA5949FA5, 0x9CA4939D,
+ 0x93A0A393, 0xA491A0A3, 0xA0A491A0, 0x8FA1A691,
+ 0xA6969FA4, 0xA6A999A3, 0x9CA8AB9C, 0xAE9DA8AB,
+ 0xA8AE9DA8, 0x9EA8AD9E, 0xADA1A8AD, 0xA9ADA1A9,
+ 0xA4ABAFA3, 0xAFA3ACB0, 0xACB0A4AB, 0x9DACADA3,
+ 0xA69DA6A7, 0xA0A499A5, 0x99A3A79B, 0xA79BA3A8,
+ 0xA3A79BA3, 0x9FA3A99E, 0xAAA1A3A8, 0xA5ABA0A5,
+ 0xAAACB4A9, 0xB3AAAFB5, 0xACB1A8AE, 0xAAABB0A7,
+ 0xB5ACAEB3, 0xB2B5ACB2, 0xAAAFB2A9, 0xB5ACB0B3,
+ 0xAEB3AAB0, 0xAFB0B8AE, 0xBDB8AFB6, 0xB7BDB8B7,
+ 0xB2B6BDB6, 0xB6B1B2B9, 0xB3B8B6B0, 0xBCB6BBBA,
+ 0xBEBDB7BD, 0xB9C0BDB8, 0xBFB9BFBE, 0xBCBABAC0,
+ 0xB9BEBCB7, 0xBEB9BEBD, 0xC0BFBABF, 0xB9BFBEBB,
+ 0xBBB9C0BD, 0xBEBCBAC0, 0xBDC0BEB9, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBABFBDBB, 0xBDB8BDBB, 0xBEBFBABF,
+ 0xBAC0BFB9, 0xBDB7BEBB, 0xC0C0B8BE, 0xB8C0C0B8,
+ 0xBBBCC1C0, 0xBABAB9BB, 0xBCC0C1B8, 0xBEBABFC0,
+ 0xC1C1B6BE, 0xB8C0C0B9, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB9C1C1B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB9C1C1B8,
+ 0xBFB6BEBE, 0xBFC2B7BF, 0xB8C0C0B8, 0xBFB7BFBF,
+ 0xC1C1B7BF, 0xB8C0C0B9, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBCB4BCBB, 0xC0C0B5BD, 0xB8C0C0B8,
+ 0xBEBAC0BF, 0xC0BFBAC1, 0xBAC0BFBA, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBDB9C0BD, 0xC0BBB9C0,
+ 0xB9C0BBB9, 0xBBBABFBD, 0xBDB8B8BD, 0xB6BBB9B9,
+ 0xB8B2B8B7, 0x3D3DB2B7, 0x0000003B, 0x00020000,
+ 0x00000200, 0x00000100, 0x2C000003, 0x252E2826,
+ 0x1D16252A, 0x61291E38, 0x4A754D3C, 0x5D49735E,
+ 0x2F483A5C, 0x162C2015, 0x2F253622, 0x33150E1D,
+ 0x1B2C2B24, 0x25183025, 0x744E3B62, 0x46745E47,
+ 0x4F3A6160, 0x2A2D1F37, 0x22362319, 0x22172B2D,
+ 0x08080808, 0xB8B80608, 0xB0B8B8B0, 0xBCB7BDBC,
+ 0xBDBDB8BD, 0xBBC0BFBB, 0xBDB7BEBB, 0xBDBCB9C0,
+ 0xBABFBEB8, 0xBDB9C0BD, 0xBDBCB9C0, 0xBABFBEB8,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB7BFBFB8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B9C1C1, 0xBFBFB8C0, 0xB8C0C0B7,
+ 0xC0B8C0C0, 0xBEBFB8C0, 0xBBC0C1B9, 0xC0B9BEC1,
+ 0xBDC0B8BD, 0xB8BDBEB8, 0xBCB8BDBC, 0xB9B8B8BD,
+ 0xB3B9B8B4, 0xBBB6BBBC, 0xBDBDB3BB, 0xB4BCBCB5,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC,
+ 0xBEBEB7BD, 0xB5BDBDB6, 0xBDB5BDBD, 0xBDBDB5BD,
+ 0xB4BCBCB5, 0xBCB8BEBD, 0xBDBAB7BD, 0xB7BEBBB6,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBBB5BDBC,
+ 0xBDBCB4BC, 0xB7BDBCB7, 0xBBB6BCBB, 0xBDBCB6BC,
+ 0xB7BDBCB7, 0xB9B8BDBB, 0xBDBBB6BB, 0xB8BDBBB8,
+ 0xBDBABFBD, 0xBFBEB8BE, 0xB9BEBCB9, 0xBABABDBB,
+ 0xBCBCB9BC, 0xBABDBBBA, 0xBDBABEB9, 0xBDBBBEC2,
+ 0xB7BBB6BA, 0xADAFB3AD, 0xB4ADAFB3, 0xABAFA9AD,
+ 0xA9AEB1A8, 0xB5ACAFB2, 0xB0B5ACB0, 0xAAADB2A9,
+ 0xB3AAB0B3, 0xB0B2ACB0, 0xA9A9B1AA, 0xAFA8A6B1,
+ 0xAAB2A8A7, 0xA8AEB5A8, 0xACA1AEB5, 0xA7ACA3A6,
+ 0xA2A7ACA3, 0xACA3A6AB, 0xADB0A7A9, 0xA4A9AFA4,
+ 0xAEA3A9AF, 0xA6ACA1A8, 0xA0A5A99D, 0xACA0A8AC,
+ 0xA4A89CA8, 0xA0A8ACA0, 0xA99DA8AC, 0xABADA1A5,
+ 0x9EA5A99D, 0xA99DA6AA, 0xA5A79BA7, 0x9EA2A69A,
+ 0xA69AA6AA, 0x989F92A2, 0x93989C90, 0xA1929B9F,
+ 0x9BA2939A, 0x969EA598, 0xA0949CA3, 0x9FA3979C,
+ 0x95A0A498, 0x9F939DA1, 0x989C909B, 0x8E9A9E92,
+ 0x9D92969A, 0x9FA39899, 0x98A0A498, 0xA59AA0A4,
+ 0xA0A39AA1, 0x003A3B37, 0x00000001, 0x00000000,
+ 0x00000100, 0x322C0001, 0x90928C30, 0x92939791,
+ 0x98939299, 0x676D6892, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x50504A02, 0x86969990, 0x90858B91,
+ 0x8F958A8A, 0x8F92978E, 0x99909398, 0x98998F98,
+ 0x90989C90, 0x9B8F989C, 0x999D9297, 0x34989B92,
+ 0x06063738, 0x07040608, 0x00000000, 0x342E0001,
+ 0x9B9F9432, 0x8FA6AC9B, 0xA3929AA0, 0x9CA3949B,
+ 0x93A1A494, 0xA393A0A3, 0xA0A491A0, 0x90A0A590,
+ 0xA595A0A5, 0xAAAD9DA2, 0x9CA8AB9B, 0xAE9DA9AC,
+ 0xA7AD9CA8, 0xA0AAAFA0, 0xAEA1AAAF, 0xA9ADA1A7,
+ 0xA0A8ACA0, 0xAFA3AAAC, 0xACB0A4AB, 0x9EAAABA1,
+ 0xA79EA6A7, 0xA6A79DA6, 0x9DA5A99D, 0xACA0A5A9,
+ 0xA5A99DA8, 0xA0A5ABA0, 0xABA0A5AB, 0xA6ACA1A5,
+ 0xA8ADB3A8, 0xB0A7ACB1, 0xACB1A8AB, 0xADAEB3AA,
+ 0xB5ACB3B6, 0xB0B3AAB2, 0xACB1B4AB, 0xB5ACB0B5,
+ 0xAFB4ABB0, 0xC0B2B6B0, 0xC3BEC1C5, 0xB7BDB8BD,
+ 0xB1B6BDB6, 0xB8B3B1B8, 0xB6BBB9B4, 0xBEBABFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BEBF, 0xBDBABABF,
+ 0xB8BFBCB6, 0xBEBAC0BF, 0xC0BFBABF, 0xBABFBDBB,
+ 0xBDBABFBD, 0xC0BEBABF, 0xB9BEBCBB, 0xBEBABFBE,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBBB8BDBB, 0xBEBFB8BD,
+ 0xBAC0BFB9, 0xB9B9C0BD, 0xBFC0B5BC, 0xB9BEBFBA,
+ 0xB9B9BEBD, 0xBABAB7B9, 0xBCC1C0B8, 0xC0BABFC0,
+ 0xBDC0B8C0, 0xBABFC2B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB6C0C0B8, 0xC0B6C0C0, 0xC0C0B6C0, 0xB8C0C0B8,
+ 0xC0B8C0BF, 0xC0C0B9C1, 0xB7BFBFB8, 0xBEB8C0BF,
+ 0xC0C0B7BF, 0xB9C1C1B8, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xB9BFBEBA, 0xBCB7BDBC, 0xC0C0B7BD, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBEB8C1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBDB9C0BD, 0xC0BBB9C0,
+ 0xBAC0BBB9, 0xBBB7BEBB, 0xBCB7B8BD, 0xB6BBB9B8,
+ 0xB8B2B8B7, 0x3D3DB2B7, 0x0000003B, 0x00020000,
+ 0x00000200, 0x00000100, 0x2C000003, 0x242D2826,
+ 0x1B162527, 0x5E2B203A, 0x4A744C3C, 0x4E3B625E,
+ 0x2D483B5B, 0x162A1E16, 0x2E26371F, 0x29140D1A,
+ 0x1524231C, 0x261A301C, 0x6C463459, 0x3F6B5740,
+ 0x4F3A6056, 0x292E2137, 0x1D2E2218, 0x22182927,
+ 0x08080808, 0xB8B70608, 0xB0B8B7B2, 0xBBB8BDBC,
+ 0xBCBCBABD, 0xB8BDBBBA, 0xBDBABFBD, 0xBDBCB9C0,
+ 0xBABFBEB8, 0xBDBAC0BF, 0xBCBBB9C0, 0xBABFBEB7,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xBAC0BFB9, 0xBFB9BFBE, 0xBFBEBAC0, 0xB9BFBEB9,
+ 0xC0B9C1C1, 0xBEBEB8C0, 0xB6BEBEB6, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xB8BDBEBA, 0xBEB8BDBE,
+ 0xBDC0B8BD, 0xBBC0C1B8, 0xBCB8BCBD, 0xBCBBB8BD,
+ 0xB7BDBCB7, 0xBBB6BBBC, 0xB8B8B3BB, 0xB5BDBDB0,
+ 0xBCB5BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC,
+ 0xBDBDB7BD, 0xB4BCBCB5, 0xBDB5BDBD, 0xBDBDB5BD,
+ 0xB5BDBDB5, 0xBEB9BFBE, 0xBEBCB9BF, 0xB7BCBBB9,
+ 0xBDB7BDBC, 0xBDBCB7BC, 0xB7BDBCB7, 0xBBB7BDBC,
+ 0xBDBCB6BC, 0xB7BDBCB7, 0xBCB8BEBD, 0xBDBCB7BD,
+ 0xB7BDBCB7, 0xBBB7BDBC, 0xBEBCB8BD, 0xB8BDBBB9,
+ 0xBFB9C0BD, 0xC0BFBAC0, 0xB9C0BDBA, 0xBBBABDBB,
+ 0xBCBCBABD, 0xBABDBBBA, 0xB9BABEB9, 0xBDBBBABE,
+ 0xBABDBBBA, 0xACB8BCB7, 0xB4ADAEB2, 0xAFB3ADAD,
+ 0xABB2B5AC, 0xB5ACB1B4, 0xB0B5ACB0, 0xA9B1B6AD,
+ 0xB2ACADB2, 0xAEB2ACB0, 0xA9A9B0A9, 0xB0A9A8B0,
+ 0xA9B1A7A9, 0xA1A7AEA1, 0xACA3A7AE, 0xAEB3AAA7,
+ 0xA5AAAFA6, 0xACA3ACB0, 0xA9ADA2A9, 0xA4A9ADA2,
+ 0xADA2A9AF, 0xAAAEA3A9, 0x9DA8ACA0, 0xA79BA5A9,
+ 0xA5A99DA3, 0x9DA3AA9D, 0xA99DA5A9, 0xAAACA0A5,
+ 0x98A8ACA0, 0xA89CA0A4, 0xA3A79BA4, 0x96A2A69A,
+ 0xA3969EA2, 0xA0A79A9C, 0x96A1A599, 0xA2939EA2,
+ 0x9EA5969B, 0x97A0A79A, 0xA0949DA4, 0x9FA3979C,
+ 0x99A0A499, 0xA4979EA4, 0x9EA5989D, 0x8A9A9E92,
+ 0x9A909296, 0x9A9E9399, 0x99A0A498, 0xA39AA0A4,
+ 0x42423CA0, 0x00000100, 0x00000000, 0x00010000,
+ 0x5C000100, 0x938A6062, 0x8E938A90, 0x8F949990,
+ 0x98919199, 0x676D6891, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x4E504A02, 0x7F969990, 0x9085848A,
+ 0x8A90858A, 0x8D8D9388, 0x9A8F9498, 0x98998F96,
+ 0x8F989C90, 0x9E8F979B, 0x969D9097, 0x92999D91,
+ 0x38349A9B, 0x08060539, 0x00000000, 0x01000001,
+ 0x33362D00, 0x9C9A9E92, 0x9F90A6AB, 0x9A9F9098,
+ 0x92A0A393, 0xA3939FA2, 0xA0A393A0, 0x94A0A491,
+ 0xAA97A3A7, 0xAAAD9DA6, 0x9CAAAD9D, 0xAE9DA9AC,
+ 0xA9AF9EA8, 0x9FA9AE9F, 0xAEA1A9AE, 0xA9ADA1A7,
+ 0xA2ABAFA3, 0xB0A4ACAE, 0xABAFA3AC, 0xA3ABACA2,
+ 0xACA3ABAC, 0xABACA2AB, 0x9DA5A99E, 0xACA0A5A9,
+ 0xA6ACA1A8, 0xA0A5ABA0, 0xAAA1A5AB, 0xA4A9A0A5,
+ 0xA7ABB0A7, 0xB1A7ABB0, 0xACB1A8A9, 0xACADB1AB,
+ 0xB5ACB2B5, 0xAEB3AAB2, 0xACADB2A9, 0xB4ABB0B5,
+ 0xB3B7B1AF, 0xBFC0C4BF, 0xBCBAC0C4, 0xAFB5B0B7,
+ 0xB3B2B8B3, 0xBCB7B2B8, 0xB6BBB9B6, 0xBEB8BDBC,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BEBF, 0xBDBBB9BF,
+ 0xB6BDBAB8, 0xBFBBC1C0, 0xBFBDBAC0, 0xB9BEBCBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEBABFBE,
+ 0xBCBABABF, 0xBABFBDB7, 0xBCBABFBD, 0xBFBEB8BD,
+ 0xBAC0BFB9, 0xBBBBC2BF, 0xBEBFB6BC, 0xBABFC0B9,
+ 0xBAB9BEBD, 0xBABAB6BB, 0xBCC1C0B8, 0xC1BBC0C1,
+ 0xBFC2B9C1, 0xB8BDC0BA, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB6C0C0B6, 0xC0B5BFBF, 0xC0C0B6C0, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xC1C1B8C0, 0xB8C0C0B9, 0xBEB8C0BF,
+ 0xBFBFB7BF, 0xB8C0C0B7, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xBAC0BFBA, 0xBBB7BDBC, 0xC0C0B6BC, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBEB8C1BE,
+ 0xC1BEBAC1, 0xBAC1BEBA, 0xBDB9C0BD, 0xC0BDB9C0,
+ 0xBABFBDB9, 0xBBB7BEBB, 0xBBB6B8BD, 0xB6BBB9B7,
+ 0xB8B2B8B7, 0x3D3DB2B7, 0x0000003B, 0x00020000,
+ 0x00000200, 0x00000100, 0x2C000003, 0x252E2826,
+ 0x1B162528, 0x5E2A1F39, 0x3C614D3E, 0x4E3C614E,
+ 0x2C3A2E4A, 0x17282017, 0x2019281F, 0x28150F1A,
+ 0x1623231D, 0x1E13271D, 0x5F463556, 0x3B604C3A,
+ 0x4635564D, 0x22271C30, 0x1D2D1C12, 0x22182827,
+ 0x07080808, 0xB7B40609, 0xB0B7B2B0, 0xBABBBFBA,
+ 0xBEBCBBBF, 0xB9BEBCBB, 0xBDB9BEBC, 0xBCBBB9C0,
+ 0xBABFBEB7, 0xBEBAC0BF, 0xBDBCB9BF, 0xB9BFBEB7,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBDBCB9BF, 0xB7BCBBB8, 0xBFB9BFBE, 0xBEBFBAC0,
+ 0xBABFC0B9, 0xBEBAC0BF, 0xBEBFB9BF, 0xB9BEBFB9,
+ 0xC2B8BFC2, 0xBEC1B8BF, 0xB5BCBFB7, 0xC2B8BFC2,
+ 0xC0C0B8BF, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC1BABFC2, 0xBFC2B9BE, 0xB8BDBEBA,
+ 0xBDB8BEBD, 0xBDBEB8BE, 0xB7BCBDB8, 0xBCB7BCBD,
+ 0xBDBEB7BD, 0xB7BCBDB8, 0xBDB7BCBD, 0xBDBCB7BC,
+ 0xB7BDBCB7, 0xBDB7BCBD, 0xBDBDB5BD, 0xB3BBBBB5,
+ 0xBDB5BDBD, 0xBCBDB5BD, 0xB7BCBDB7, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB8BEBDB7, 0xBDB7BCBD, 0xBBBBB7BC,
+ 0xB3BBBBB3, 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBCB7BDBC, 0xBEBDB7BD, 0xB6BCBBB8, 0xBCB7BEBB,
+ 0xBEBBB8BF, 0xB7BEBBB7, 0xBAB7BCBA, 0xBCBBB7BC,
+ 0xB7BDBCB7, 0xBCB7BDBC, 0xBDBCB7BD, 0xB9BEBCB8,
+ 0xBCB8BFBC, 0xBFBCB8BF, 0xB7BEBBB8, 0xB9BABDBB,
+ 0xBFBDBABE, 0xBABDBBBC, 0xB7BCBDB9, 0xBFBDBABB,
+ 0xBCBFBDBC, 0xB5BBBFBA, 0xB4AFB6BA, 0xB0B4AEB0,
+ 0xAAB2B5AC, 0xB3AAB0B3, 0xB0B5ACB0, 0xACAEB5AE,
+ 0xB2ADACB3, 0xACB3ACAC, 0xA6AAAEA8, 0xAFA6AAAF,
+ 0xACB2A7AA, 0xA7ACB2A7, 0xB0A7AAB2, 0xADB2A9AB,
+ 0xA5ADB1A6, 0xAFA4ADB1, 0xA8ACA1AB, 0xA1A8ACA1,
+ 0xAFA5A8AC, 0xACB0A5AE, 0x9FAAAEA3, 0xA69AA6AA,
+ 0xAAAEA2A2, 0x99A9AE9F, 0xACA0A3A8, 0xA8ACA0A8,
+ 0x92A5A99D, 0xA99D9A9E, 0x9DA497A5, 0x959DA495,
+ 0xA3949DA4, 0xA2A99A9C, 0x9DA5A99D, 0xA79BA5A9,
+ 0xA0A498A3, 0x99A1A599, 0xA59AA1A5, 0x9A9E93A1,
+ 0x9A9BA097, 0xA3989CA4, 0x9BA3989B, 0x9399A093,
+ 0xA0959B9F, 0x9B9F949C, 0xA1A8ACA0, 0x3C34AAAB,
+ 0x0704003E, 0x00020000, 0x02000000, 0x30312D01,
+ 0x97787A74, 0x948B9BA0, 0x8F948B8F, 0x898E9489,
+ 0x94898E94, 0x686C668E, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000001,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x4F514B02, 0x87969990, 0x948A8B90,
+ 0x8E94898C, 0x888E9588, 0x94889094, 0x90948890,
+ 0x9096988C, 0x9D90989C, 0x989C9096, 0x90999B8F,
+ 0xA79D9C9C, 0x83847BA8, 0x00343630, 0x04000004,
+ 0x00040000, 0x9B363930, 0xA697A2A6, 0xA2A8979F,
+ 0x909DA090, 0x9F919FA0, 0x9FA0909F, 0x8EA3A494,
+ 0xA8959DA1, 0xA6AC99A4, 0x9BA5AB9A, 0xAE9DA6AC,
+ 0xA8AE9DA8, 0xA0A8AD9E, 0xA89DA8AC, 0xA8ACA1A4,
+ 0xA0A8ACA0, 0xB0A1A8AC, 0xADB1A5AD, 0x9FACB0A5,
+ 0xA9A0A6AA, 0xABACA2A8, 0x9EA7ABA0, 0xABA0A4AB,
+ 0xA5ABA0A5, 0x9FA6ABA2, 0xA8A1A1A9, 0xA0A89EA1,
+ 0xA9A7AFA5, 0xB4AEABB3, 0xAFB3ADB0, 0xADAFB3AE,
+ 0xB3ADAFB3, 0xACB0AAAF, 0xAFADB2A9, 0xB8B1B1B9,
+ 0xBCC2BDB1, 0xBABDC1BC, 0xBFBABBBF, 0xB8BCB7BB,
+ 0xB9B8BCB7, 0xBFBDB6BB, 0xB8BDBBBA, 0xBEB8BDBC,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEBAC0BF, 0xBDBBB9BF,
+ 0xB6BBB9B8, 0xBFB9BFBE, 0xC0BFBAC0, 0xB9BFBEBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBCB9BFBE,
+ 0xBFBEB7BD, 0xB8BEBDB9, 0xBEB9BFBE, 0xBDBCB9BF,
+ 0xBAC0BFB7, 0xBFB8C0BF, 0xBDC0B7BF, 0xBABFC0B8,
+ 0xBBB7BDBC, 0xBDBCB6BC, 0xBBC0C1B8, 0xC1B8C0C0,
+ 0xBEBFB9C1, 0xBBC0C1B9, 0xC0B6BEBE, 0xC0BFB8C0,
+ 0xB8C0BFB8, 0xBFB8C0BF, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B7BFBF, 0xBFC2B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xB7BFBFBA, 0xC0B8C0C0, 0xC0BFB6C0,
+ 0xB8C0BFB8, 0xBBB3BBBB, 0xBFC2B3BB, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xB8C0BFB8, 0xBFBBC1C0,
+ 0xBEBBBAC0, 0xB8BFBCB7, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB7BEBBB9, 0xBABABFBD, 0xBCB7B7BC, 0xB7BDB8B8,
+ 0xB8B2B8B7, 0x3D3DB2B7, 0x0001003B, 0x00000000,
+ 0x00000000, 0x00000100, 0x26020003, 0x1F282420,
+ 0x110C1B22, 0x49241B30, 0x36573B2D, 0x46365547,
+ 0x273A2D45, 0x14241E13, 0x2D24311E, 0x28140C17,
+ 0x1C29251D, 0x251B2C25, 0x4C352842, 0x2D4C3C2D,
+ 0x3528423C, 0x221E1425, 0x15221E15, 0x2016231F,
+ 0x07080808, 0xB7B20609, 0xB1B8B1B1, 0xBABBBFBA,
+ 0xBFBABDBE, 0xB9BFBABB, 0xBEBBC0BE, 0xBDBCBAC1,
+ 0xB9BEBDB8, 0xBFBAC0BF, 0xBFBEBAC0, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9, 0xBEB8BEBD,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xBEB9BFBE, 0xBEBFB9BF,
+ 0xBABFC0B9, 0xBEB9BFBE, 0xBFC0B9BF, 0xBBC0C1BA,
+ 0xC3B8BFC2, 0xBFC2B9C0, 0xB6BDC0B8, 0xC2B8BFC2,
+ 0xC0C0B8BF, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB9C1C1B8, 0xC0BABFC2, 0xBDC0B8BD, 0xB8BDBEB8,
+ 0xBCB7BDBC, 0xBCBDB7BD, 0xB7BCBDB7, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBDB7BCBD, 0xBDBCB7BC,
+ 0xB7BDBCB7, 0xBDB5BDBD, 0xBEBEB5BD, 0xB5BDBDB6,
+ 0xBDB3BBBB, 0xBCBDB5BD, 0xB7BCBDB7, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBDB7BCBD, 0xBBBBB7BC,
+ 0xB3BBBBB3, 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xB9B8BDBB,
+ 0xBEBBB8BE, 0xB8BDBBB7, 0xBAB7BCBA, 0xBBBAB9BC,
+ 0xB8BDBCB6, 0xBCB8BCBD, 0xBCBBB7BD, 0xB7BDBCB7,
+ 0xBCB7BEBB, 0xBFBCB8BF, 0xB9C0BDB8, 0xB8BAC0BB,
+ 0xC0BEB9BD, 0xBCBFBDBD, 0xB8BCBDB9, 0xBEBCBBBC,
+ 0xB9BCBABB, 0xBFBCC0BB, 0xBFBAC0C4, 0xAFB3ADBB,
+ 0xAAB0B2AC, 0xB5ACB0B3, 0xB1B6ADB2, 0xACAEB5AE,
+ 0xB2ADABB3, 0xACB3ACAB, 0xAAA8ADA4, 0xB4A9B0B3,
+ 0xB0B4A9B0, 0xA8ADB3A8, 0xB0A7ABB3, 0xABB0A7AB,
+ 0xA6ADB1A6, 0xB1A5AEB2, 0xA7AB9FAD, 0xA2ADAEA4,
+ 0xADA3ABAC, 0xAEAFA5AC, 0xA4B0B1A7, 0xAA9EABAF,
+ 0xA6AA9EA6, 0x9EA8ACA0, 0xA99DA8AD, 0xA8ACA0A5,
+ 0xA0A9ADA1, 0xA99CA8AC, 0x989F92A2, 0x99979E8F,
+ 0xAD9EA1A8, 0xA3AA9BA6, 0x9AA3A79B, 0xA99DA2A6,
+ 0xA5A99DA5, 0x969FA397, 0xA99E9EA2, 0xA1A59AA5,
+ 0x979DA299, 0xA49899A1, 0x9CA4999A, 0x9399A093,
+ 0x9F939B9F, 0xA8ACA19B, 0x33AAABA1, 0x05003C3D,
+ 0x06030009, 0x00020000, 0x312D0001, 0x90928C32,
+ 0x8B9BA097, 0x948B8F94, 0x8F958A8F, 0x87909489,
+ 0x958A8F93, 0x696C6391, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x4E504A02, 0x87979993, 0x948A8B90,
+ 0x8E94898C, 0x8B93978B, 0x998D959A, 0x93978B95,
+ 0x88929488, 0x998D9094, 0x989C9095, 0x909C9C90,
+ 0x9C8E9C9C, 0xA5A79B9C, 0x2D989C91, 0x04003136,
+ 0x00040000, 0x2F000200, 0xA79A3538, 0xA1A899A0,
+ 0x97A4A797, 0xA698A6A7, 0xA7A797A7, 0x95A3A494,
+ 0xAD98A4A8, 0xA6AD98A8, 0x9CA8AE9B, 0xAE9DA7AD,
+ 0xA9AF9EA8, 0xA0A8ACA0, 0xADA2A8AC, 0xA8ACA1A9,
+ 0xA5ABAFA3, 0xB2A3ADB1, 0xAFB2A3AF, 0xA5B0B4A9,
+ 0xA9A0ACB0, 0xA7ABA0A6, 0x9FA4AB9E, 0xAA9FA5AC,
+ 0xA6ACA1A4, 0xA3A6ADA6, 0xABA4A2AA, 0xA3ABA4A3,
+ 0xABABB3A9, 0xB4AEABB2, 0xB0B4AFB0, 0xAFAFB3AE,
+ 0xB3ADB0B4, 0xABAFA9AF, 0xB7ABB2AB, 0xC2BDB7BE,
+ 0xB6BCB7BC, 0xBAB8BCB7, 0xBEB9BBBF, 0xBCC0BBBA,
+ 0xB9BABDBB, 0xBFBEB6BB, 0xBABFBEBA, 0xBBB6BBB9,
+ 0xBEBDB8BD, 0xB9BFBEB8, 0xBFB7BFBE, 0xBDBBBAC0,
+ 0xB6BBB9B8, 0xBCBBC0BF, 0xBCBBB7BD, 0xB9BFBEB4,
+ 0xBDBBC0BE, 0xBFBDBABF, 0xBABFBDBA, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB7BFBEB7, 0xBEBAC0BF, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xC0B8C0C0, 0xBDC0B8C0, 0xB8BDC0B8,
+ 0xBBB8BEBD, 0xBDBCB6BC, 0xBABFC0B7, 0xC0B9C1C1,
+ 0xBFC0B8C0, 0xB9BEBFBA, 0xBEB8C0C0, 0xC0C0B6BE,
+ 0xB7BFBFB8, 0xC0B8C0C0, 0xC0C0B6C0, 0xB8C0C0B8,
+ 0xBFB9C1C1, 0xBFC2B7BF, 0xB8BFC2B8, 0xC0B7BFBF,
+ 0xBFC0B8C0, 0xB9BEBFBA, 0xC0B8C0C0, 0xC0BFB6C0,
+ 0xB8C0BFB8, 0xBAB3BBBB, 0xBDC0B2BA, 0xB8C0C0B6,
+ 0xBDB7BFBF, 0xBFBEB6BE, 0xB7BFBEB7, 0xBFB9BFBE,
+ 0xBDBABAC0, 0xB8BFBCB6, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB7BDBCB9, 0xBAB8BDBB, 0xC0BBB7BC, 0xB6BCB7BC,
+ 0xB8B2B8B7, 0x3D3DB2B7, 0x0001003B, 0x00000000,
+ 0x00000000, 0x00000000, 0x14020001, 0x0E17130F,
+ 0x130C1913, 0x3E231A2F, 0x22412F24, 0x32233F32,
+ 0x282C1F37, 0x06161F14, 0x0F071211, 0x17040006,
+ 0x0B18150D, 0x261A2C15, 0x422D203A, 0x27433426,
+ 0x2C1F3935, 0x101E1327, 0x010D0A00, 0x0B010D0B,
+ 0x07080808, 0xB7B20609, 0xB1B8B1B1, 0xBCBBBFBA,
+ 0xBEBCBBBE, 0xB9BEBCBB, 0xBCBABFBD, 0xBDBCB8BF,
+ 0xB8BDBCB8, 0xBEB9BFBE, 0xBFBEB9BF, 0xB7BFBEB7,
+ 0xBCB8C0BF, 0xBBBAB7BD, 0xBABFBEB5, 0xBFB9BFBE,
+ 0xBFBEBAC0, 0xB9BFBEB9, 0xBEB9BFBE, 0xBEBFB9BF,
+ 0xBBC0C1B9, 0xBEB8C0BF, 0xBFBEB7BF, 0xB9BFBEB9,
+ 0xBFB8C0C0, 0xBDBDB7BF, 0xB4BCBCB5, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0, 0xBDBDB7BF,
+ 0xB8C0C0B5, 0xC0B8C0C0, 0xBEC1B8C0, 0xB6BEBEB7,
+ 0xBCB7BDBC, 0xBCBDB7BD, 0xB7BCBDB7, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB7BDBCB7, 0xBDB5BDBD, 0xBDBDB5BD, 0xB5BDBDB5,
+ 0xB6B5BDBD, 0xBBBBAEB6, 0xB6BEBEB3, 0xBCB7BDBC,
+ 0xBEBDB7BD, 0xB7BDBCB8, 0xBCB5BDBC, 0xBBBBB5BD,
+ 0xB3BBBBB3, 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBDB7BDBC, 0xBDBDB8BE, 0xB7BDBCB5, 0xBBB8BDBB,
+ 0xBEBCB8BD, 0xB8BDBBB9, 0xB9B8BDBB, 0xBCBBB6BB,
+ 0xB5BAB9B7, 0xBAB7BCBB, 0xBDBCB6BB, 0xB5BEBBB7,
+ 0xBBB5BEBB, 0xBFBCB5BE, 0xB8BFBCB8, 0xB9B9BFBA,
+ 0xBFBDB8BE, 0xBABFBDBA, 0xBABDC0BE, 0xBDBBB9BC,
+ 0xB9BCBABA, 0xB9BBBFBA, 0xC5C0BBBF, 0xB3BAB3BF,
+ 0xADACB0AA, 0xB3ADB1B6, 0xADB1ABAF, 0xAEACB3AC,
+ 0xB3ACADB5, 0xAAB1AAAB, 0xA9AAAFA6, 0xB2A7B0B4,
+ 0xB0B4A9AE, 0xA7ADB3A8, 0xB0A7ACB2, 0xACB1A8AB,
+ 0xA5ACB2A7, 0xB2A3ADB1, 0xAEB2A6AD, 0xA1AEAFA5,
+ 0xABA1AAAB, 0xAEAFA5AA, 0xA1B0B2A6, 0xAEA4ABAD,
+ 0xA8AA9EAD, 0x9FABADA1, 0xAA9BA9AB, 0xA3A79BA5,
+ 0x9DA8ACA0, 0xA89CA4A8, 0xA3A79BA4, 0x95A5AA9B,
+ 0xA89C9FA4, 0xA8ACA0A4, 0x9CA5A99E, 0xA99EA3A7,
+ 0xA8ACA1A5, 0x9AA0A499, 0xA599A1A5, 0xA1A59AA1,
+ 0x989EA499, 0xA2969BA3, 0x99A29598, 0x9399A093,
+ 0xA09499A0, 0xA8ACA09C, 0x0073746B, 0x02000505,
+ 0x07040007, 0x5A020200, 0x94896063, 0x90948990,
+ 0x8B8D958B, 0x958B8D95, 0x90968B8D, 0x88909489,
+ 0x94899094, 0x6A6D6490, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00010200, 0x02000102, 0x00020000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x4E504A02, 0x8A959791, 0x938A8E93,
+ 0x90968B8E, 0x8995998D, 0x978B9398, 0x93978B93,
+ 0x8D95998E, 0x978B9498, 0x95998D93, 0x909D9D91,
+ 0x9A8F9D9B, 0x9C9C909C, 0x919A9C90, 0x6960989C,
+ 0x00040064, 0x00000200, 0x6F660002, 0x9FA6996A,
+ 0x98A5A899, 0xA797A6A6, 0xA6A696A7, 0x99A7A898,
+ 0xAE99A8AC, 0xA8AD98A9, 0x9EA7AD9A, 0xAE9BABB1,
+ 0xAAB09FA8, 0xA1A6ADA0, 0xA89DA6AC, 0xA6ACA1A2,
+ 0xA4AEB2A6, 0xB5A6ACB0, 0xAFB2A3B2, 0xAAACB0A5,
+ 0xB0A5B1B5, 0xA5A99EAC, 0x9FA5AC9F, 0xADA2A5AC,
+ 0xA4ACA1A7, 0xA5A3ABA4, 0xADA6A4AC, 0xA5ACA5A5,
+ 0xABA5ADA6, 0xB2ABAAB2, 0xAEB5AEAB, 0xADAFB3AD,
+ 0xB3AEAFB3, 0xB0B4AEAF, 0xB6B9BDB7, 0xC2BDB8BC,
+ 0xB9BCBABE, 0xBBB8BCB7, 0xBFBBBCC0, 0xBABEB9BE,
+ 0xB7BCC0BB, 0xBDBBB6BC, 0xBABFBDB8, 0xB9B6BBB9,
+ 0xBEBDB6BB, 0xB9BFBEB8, 0xBFB9BFBE, 0xBCBABAC0,
+ 0xB6BBB9B7, 0xBEBBC0BF, 0xBDBCB9BF, 0xB7BDBCB7,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEBAC0BF,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB8C0BF, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xC2B9BEBF, 0xBEC3BABF, 0xBABDC1BB,
+ 0xBCB7BBBC, 0xC0BFB8BD, 0xB9C1C0BA, 0xBFB8C0BF,
+ 0xBFBEB8C0, 0xBBC1C0B9, 0xC0B8C0C0, 0xBFBFB8C0,
+ 0xB8BFC2B7, 0xB4B6BFC2, 0xB5B8A6B2, 0xB6BFC2AC,
+ 0xC0B7BFBF, 0xBDC0B8C0, 0xBABFC2B8, 0xC0B8C0C0,
+ 0xC0C1B8C0, 0xBBC0C1BB, 0xBFB8C0C0, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xB8B3BBBB, 0xBDBDB0B8, 0xB8C0C0B5,
+ 0xBFB9BEBF, 0xBFBEB9BE, 0xB9BFBEB9, 0xBBBABFBD,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBDB9BEBC, 0xBFBDBABF,
+ 0xBABFBDBA, 0xB9B8BDBB, 0xBDB8B6BB, 0xB6BBB9B7,
+ 0xB8B2B7B8, 0x3D3DB3B7, 0x0000003B, 0x00020000,
+ 0x00000200, 0x02000002, 0x01020000, 0x00040200,
+ 0x120B1802, 0x4B2F253C, 0x2B4A392D, 0x3C2C4B3B,
+ 0x363A2D47, 0x05152C20, 0x0F07110F, 0x04020004,
+ 0x0A1A0200, 0x271A3014, 0x4E3D2E4A, 0x2C4D3E2D,
+ 0x3E2C4B3F, 0x2732233E, 0x000D1F13, 0x0A020C09,
+ 0x07080808, 0xB7B20609, 0xB0B8B1B1, 0xBCB9BEBC,
+ 0xBEBCBBBE, 0xB9BEBCBB, 0xBBB7BEBB, 0xBEBDB7BE,
+ 0xBABFBEB9, 0xBEBAC0BF, 0xBFBEB9BF, 0xB6BEBDB7,
+ 0xBEB7BFBE, 0xBFBEB9BF, 0xBBC0BFB9, 0xBEB8BEBD,
+ 0xC0BFB9BF, 0xB9BFBEBA, 0xBEB9BFBE, 0xBEBFB9BF,
+ 0xBABFC0B9, 0xBFB8C0BF, 0xBFBEB8C0, 0xBAC0BFB9,
+ 0xBFB7BFBF, 0xBEBEB7BF, 0xB5BDBDB6, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xBEBEB8C0,
+ 0xB8C0C0B6, 0xC0B6BEBE, 0xBDC0B8C0, 0xB6BEBEB6,
+ 0xBCB7BCBD, 0xBCBDB7BD, 0xB7BCBDB7, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB6BCBBB7, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB7BDBCB7, 0xBDB6BEBE, 0xBCBCB5BD, 0xB4BCBCB4,
+ 0xBBB3BBBB, 0xBEBEB3BB, 0xB5BDBDB6, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBAB3BBBA, 0xBABAB3BB,
+ 0xB3BBBBB2, 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBDB8BEBD, 0xBDBDB7BC, 0xB5BDBDB5, 0xBBB7BDBC,
+ 0xBDBCB7BE, 0xB5BCB9B8, 0xBAB7BCBA, 0xBCBBB6BD,
+ 0xB7BCBBB7, 0xBBB7BCBB, 0xBDBCB7BC, 0xB5BEBBB7,
+ 0xBCB5BEBB, 0xBFBCB6BF, 0xB8BFBCB8, 0xBABAC0BB,
+ 0xBFBDB9BF, 0xBABFBDBA, 0xBBBCBFBD, 0xBCBABABD,
+ 0xBABEB9B9, 0xB9BBBFBA, 0xBEB9BBBF, 0xBAC0BBB8,
+ 0xACB3B7B1, 0xB5AFAEB2, 0xACB3ACB1, 0xABACB3AC,
+ 0xB0A9AAB2, 0xA8AFA8A8, 0xA7AFB4AB, 0xB1A6AEB2,
+ 0xB0B4A9AD, 0xA8ADB3A8, 0xB2A9ADB3, 0xAEB4A9AD,
+ 0xA8ABB1A6, 0xB5A9AEB5, 0xADB1A5B1, 0xA5B0B1A7,
+ 0xAAA0AEAF, 0xACADA3A9, 0xA2ACAEA2, 0xADA3ACAE,
+ 0xACADA3AC, 0xA0AAACA0, 0xAE9FA8AC, 0xA3A899A9,
+ 0x9C9FA397, 0xACA0A4A8, 0xA8AD9EA8, 0x90A8AD9E,
+ 0xA3979A9F, 0xA9ADA19F, 0x9EA8ACA1, 0xA79CA5A9,
+ 0xA3A79CA3, 0x9D9EA297, 0xAA9EA5A9, 0x9DA195A6,
+ 0x999CA297, 0xA89B9CA4, 0x9CA5989F, 0x93989F92,
+ 0xACA099A0, 0x808479A8, 0x00050500, 0x03000504,
+ 0x07040006, 0x8960635A, 0x95899094, 0x8F968991,
+ 0x8B8D958A, 0x958B8D95, 0x8E938A8D, 0x8891958A,
+ 0x94899094, 0x6A6D6490, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x01000000,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00010200, 0x02000102, 0x00020000,
+ 0x00000200, 0x00000000, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x4E504A02, 0x87959A91, 0x938A8B90,
+ 0x91978C8E, 0x8A93978B, 0x998D9499, 0x95998D95,
+ 0x92989C91, 0x9B8F999D, 0x97998D97, 0x909C9C90,
+ 0x9C909C9C, 0x9A9C909C, 0x90989D8E, 0x9C91989C,
+ 0x989B9296, 0x00363930, 0x03000002, 0x6A706500,
+ 0x97AFB3A7, 0xA090A4A7, 0xA0A1919F, 0x9BA5A898,
+ 0xAC99A8AB, 0xA8AC99A8, 0x9AA6AC9B, 0xAC9BA5AB,
+ 0xA8AD9EA6, 0x9AA3AA9D, 0xA0959FA5, 0xA2A89D9A,
+ 0xA3A8ACA0, 0xB2A3ABAF, 0xAEB3A4AD, 0xA9B0B4A8,
+ 0xB4A9B0B4, 0xAAB0A5B0, 0xA1A5ABA0, 0xABA0A6AC,
+ 0xA4ACA2A5, 0xA4A4ADA3, 0xADA6A3AB, 0xA6ADA6A6,
+ 0xABA2AAA3, 0xB2ABAAB2, 0xAAB1AAAB, 0xACB0B4AE,
+ 0xB8B3AEB2, 0xB7BBB6B4, 0xB6B8BCB7, 0xBCB7B7BB,
+ 0xB8BBB9B8, 0xB9B8BCB7, 0xBDB9BABE, 0xBCC0BBBC,
+ 0xB7BCC0BB, 0xBDBBB6BC, 0xBCBFBDBA, 0xB9BABFBD,
+ 0xBFBEB6BB, 0xB9BFBEB9, 0xBFB9BFBE, 0xBDBBBAC0,
+ 0xB6BBB9B8, 0xBFBABFBE, 0xC0BFBAC0, 0xB9BFBEBA,
+ 0xBDB9C0BD, 0xBEBCBABF, 0xBABFBDB9, 0xBEBAC0BF,
+ 0xC0BFB9BF, 0xB9BFBEBA, 0xBEB8C0BF, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xC0B8BDBE, 0xBCC1B8BD, 0xB8BBBFB9,
+ 0xBBB5B9BA, 0xC0BFB6BA, 0xBAC0BFBA, 0xC0B8C0BF,
+ 0xC0BFB9C1, 0xB8C0BFB8, 0xBFB8C0C0, 0xC1C1B7BF,
+ 0xB8BFC2B9, 0xB8B6BFC2, 0xB5B9AAB6, 0xB7C0C3AA,
+ 0xC0B8C0C0, 0xBDBEB9C1, 0xBABFC0B8, 0xBFB8C0C0,
+ 0xBEBFB7BF, 0xBABFC0B9, 0xBFB8C0C0, 0xBFBFB7BF,
+ 0xB8C0C0B7, 0xB8B5BDBD, 0xBEBEB0B8, 0xB7BFBFB6,
+ 0xC0B8C0C0, 0xBEBDBABF, 0xB9BFBEB8, 0xBBB9BEBC,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBDB8BDBB, 0xC0BEBABF,
+ 0xBABFBDBB, 0xBBB8BDBB, 0xBBB9B8BD, 0xB7BCBAB6,
+ 0xB8B2B7B8, 0x3D3DB2B7, 0x0000003B, 0x00000000,
+ 0x00000200, 0x02000002, 0x03020001, 0x0D180200,
+ 0x372D3E15, 0x573B2D49, 0x35574535, 0x46355746,
+ 0x483A2B4B, 0x2F453A2C, 0x0F05153B, 0x18020007,
+ 0x2A3E120B, 0x35284235, 0x57453656, 0x34594635,
+ 0x48345746, 0x53463655, 0x26384738, 0x0A010E32,
+ 0x07080808, 0xB7B20609, 0xB0B8B1B1, 0xBDBABFBD,
+ 0xBFBDBABF, 0xB9C0BDBA, 0xBDB9C0BD, 0xBFBEB7C0,
+ 0xB9BEBFB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBDB9BF, 0xB7BEBBBA, 0xBEB9BFBE, 0xC0BFB7BF,
+ 0xBAC0BFBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9,
+ 0xBEB8BEBD, 0xBFBFB9BF, 0xB7BFBFB7, 0xC0B8C0C0,
+ 0xBFC2B8C0, 0xB8BFC2B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xC0B9C1C1, 0xC0C0B8C0, 0xB6BEBEB8,
+ 0xBEB8BDBE, 0xBDC0B8BD, 0xB8BDBEB8, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB7BDBCB7, 0xBDB5BDBD, 0xBBBEB5BD, 0xB4BBBEB4,
+ 0xBDB5BDBD, 0xBDBDB5BD, 0xB7BFBFB5, 0xBBB5BDBD,
+ 0xBDBDB3BB, 0xB5BDBDB5, 0xBCB4BCBC, 0xBCBBB4BC,
+ 0xB4BCBBB4, 0xBDB6BEBE, 0xBDBDB5BD, 0xB7BCBDB5,
+ 0xC0B8BDBE, 0xBEC1B8BD, 0xB6BEBEB7, 0xBBB5BDBD,
+ 0xBCBDB4BC, 0xB5BDBCB7, 0xBBB6BCBB, 0xBBBCB4BC,
+ 0xB6BBBCB6, 0xBCB7BCBD, 0xBDBCB7BD, 0xB5BDBCB5,
+ 0xBDB8BFBC, 0xBDBBB9C0, 0xBABFBDB8, 0xB8BDC1BC,
+ 0xBFBDB9BD, 0xBABFBDBA, 0xBBBCBFBD, 0xBDBBBABD,
+ 0xBCC0BBBA, 0xB9BBBFBA, 0xBFBABBBF, 0xC0C4BFBB,
+ 0xB4C0C4BF, 0xB4AFB5B9, 0xAEB4AFB0, 0xA9ADB4AD,
+ 0xB0A9A8B0, 0xAAB1AAA8, 0xA8AEB3AA, 0xB3AAAEB1,
+ 0xB0B3AAB0, 0xA8ADB3A8, 0xB3A8ADB3, 0xADB3A8AD,
+ 0xA8ACB2A7, 0xB2A7ADB3, 0xAEB2A7AE, 0xA5AEB2A7,
+ 0xAFA3ADB1, 0xAAACA0AD, 0xA3A9AB9F, 0xB0A4ABAF,
+ 0xABAFA3AC, 0x9EAAAEA3, 0xAB9CA4AB, 0xA4AB9CA4,
+ 0x9EA3A79B, 0xAB9CA6AA, 0xA9AE9FA6, 0x9BA5AA9B,
+ 0xA99EA3A7, 0xA5A99EA5, 0xA0A8ACA0, 0xACA0A8AC,
+ 0xA0A498A8, 0x9CA0A498, 0xA99DA4A8, 0xA0A498A5,
+ 0x9CA0A69B, 0xA79C9FA7, 0x9FA79C9F, 0xA0A6ADA0,
+ 0x746EA7AB, 0x08090572, 0x00000100, 0x36300200,
+ 0x67685F36, 0x8B989C91, 0x978B9198, 0x91988B93,
+ 0x8E91998E, 0x968D9199, 0x92958C91, 0x878E9287,
+ 0x92899091, 0x6F6F6991, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x02000002, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00010000,
+ 0x00000100, 0x00020000, 0x00010200, 0x02000102,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x4B4F4900, 0x8793988F, 0x958B8A92,
+ 0x8F958A8D, 0x8E95998D, 0x998D969A, 0x989C9095,
+ 0x939A9B91, 0x9D939C9D, 0x9C9E929C, 0x919B9F93,
+ 0x9F939BA0, 0x989C909B, 0x87919889, 0x9B8F8F96,
+ 0x9FA39797, 0x399C9E92, 0x140B4243, 0x12150C11,
+ 0xA474796A, 0xB4A1B1B4, 0xB0B4A1B0, 0x9EA8AD9E,
+ 0xAD9EA8AD, 0xAAAD9EAA, 0x9FAAAFA0, 0xACA0A9AE,
+ 0xA6ADA0A8, 0x9FA4ACA1, 0xA198A1A9, 0xA1A79C9C,
+ 0xA2ABB2A5, 0xB3A4AAB1, 0xACB3A4AC, 0xAAAEB5A8,
+ 0xB3A8AFB5, 0xADB2A9AD, 0xA4ABB0A7, 0xABA2A6AE,
+ 0xA8ADA4A6, 0xA4A9B1A7, 0xAEA4A6AE, 0xA6AEA4A6,
+ 0xAEA8B0A9, 0xB4ADADB5, 0xADB4ADAD, 0xB5B0B4AF,
+ 0xBEBCB6BA, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBBB8BCB7, 0xBFBDBCC0, 0xBCBFBDBC,
+ 0xBBBCBFBD, 0xBAB6BABD, 0xBCC0BBB9, 0xBAB8BEB9,
+ 0xBEBDB6BD, 0xB9BFBEB8, 0xBDB9C0BD, 0xBCBAB9C0,
+ 0xB6BBB9B7, 0xBFB8BDBC, 0xBFBEBBC0, 0xBAC0BFBA,
+ 0xBEBAC0BF, 0xC0BFB9BF, 0xBBC1C0BA, 0xBCB9BEBF,
+ 0xBDBCB6BB, 0xBBC1C0B7, 0xBDBBC1C0, 0xBDBCB8BE,
+ 0xB6BCBBB7, 0xC0BBBFC0, 0xBDC1BBBF, 0xBABFC2BA,
+ 0xB8B5BABB, 0xC0C1B2B7, 0xBCC0C1BC, 0xC0BABFC0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0BF, 0xC0BFBAC0,
+ 0xB8C0C0BA, 0xC0B7C1C1, 0xC0C3B6C0, 0xB8C0C0B7,
+ 0xBDB9C1C0, 0xBEBFB6BE, 0xBABFC0B9, 0xBEB7BFBF,
+ 0xBFBEB7BF, 0xB9BFBEB9, 0xBFB8C0C0, 0xBFBFB7BF,
+ 0xB7BFBFB7, 0xBAB6BEBE, 0xBBBBB2BA, 0xB6BEBEB3,
+ 0xBDB8C0C0, 0xBEBDB5BD, 0xB5BDBCB6, 0xBDB7BEBB,
+ 0xBCBBB9C0, 0xB8BDBCB7, 0xBEBABFBE, 0xBFBEBABF,
+ 0xBABFBEBA, 0xBBB8BDBB, 0xBDBBB8BD, 0xB7BCBBB8,
+ 0xB8B2B7B8, 0x3D3DB2B7, 0x0000003B, 0x01000001,
+ 0x00000000, 0x00000100, 0x23020004, 0x2F431F16,
+ 0x3D2B483B, 0x644F3E63, 0x3D644F3D, 0x503D6450,
+ 0x64503C66, 0x3F60503D, 0x36284450, 0x4F170D24,
+ 0x36544038, 0x42345642, 0x5F483A5E, 0x385E4839,
+ 0x4A385F47, 0x55463557, 0x37534534, 0x30223A46,
+ 0x07080808, 0xB7B20609, 0xB0B8B1B1, 0xBDBABFBD,
+ 0xC0BDBABF, 0xB9C0BDB9, 0xBDB7C0BD, 0xBEBFB7C0,
+ 0xB9BEBFB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BEBDB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEBAC0BF,
+ 0xBFBDB9BF, 0xB7BEBBBA, 0xBCB6BCBB, 0xBEBDB5BD,
+ 0xBAC0BFB8, 0xBFB9BFBE, 0xBFBEBAC0, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBFB9BF, 0xB7BFBFB7, 0xC0B8C0C0,
+ 0xBFC2B8C0, 0xB8BFC2B8, 0xC1B8C0C0, 0xC0C0B9C1,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBEB8BDBE, 0xBDC0B8BD, 0xB8BDC0B8, 0xBCB7BCBD,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB7BDBCB7, 0xBCB5BDBD, 0xBBBEB4BC, 0xB5BCBFB4,
+ 0xBDB5BDBD, 0xBCBCB5BD, 0xB4BCBCB4, 0xBCB5BDBD,
+ 0xBDBDB4BC, 0xB3BBBBB5, 0xBCB4BCBC, 0xBCBBB4BC,
+ 0xB4BCBBB4, 0xBDB5BDBD, 0xBCBCB5BD, 0xB3BBBBB4,
+ 0xC0B9BCC0, 0xB6B9B8BD, 0xA5B1B3AD, 0xBDB4BEBE,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xBBB4BCBB, 0xBCBCB4BC,
+ 0xB4BCBCB4, 0xBCB7BCBD, 0xBDBCB6BB, 0xB5BDBCB5,
+ 0xBDB7BEBB, 0xBDBBB9C0, 0xBABFBDB8, 0xB9BCBFBD,
+ 0xBFBDBABE, 0xBABFBDBA, 0xBCBABDBB, 0xBFBDBBBE,
+ 0xBCBFBDBC, 0xB6BBBFBA, 0xBFBAB8BC, 0xBDC1BCBB,
+ 0xBFC0C4BF, 0xB9B4C0C4, 0xB0B4AFB5, 0xACAAB1AA,
+ 0xB4ADABB3, 0xADB4ADAC, 0xAAACB1A8, 0xB6ADB0B3,
+ 0xB1B4ABB3, 0xA9ADB3A8, 0xB3A8AEB4, 0xADB3A8AD,
+ 0xA9ADB2A9, 0xB1A8ADB2, 0xAEB2A7AE, 0xA8ADB1A6,
+ 0xB0A4B0B4, 0xA8ACA0AC, 0xA0A8ACA0, 0xAFA3A8AC,
+ 0xABAFA3AB, 0x9FAAAEA3, 0xA69AA6AA, 0xA6AA9EA2,
+ 0xA0A9ADA1, 0xAB9CA8AC, 0xA3A899A6, 0x9DA3A79B,
+ 0xA89DA5A9, 0xA5A99EA4, 0x9DA3A79B, 0xA89CA5A9,
+ 0xA2A69AA4, 0x96A0A596, 0xA79BA0A5, 0x9EA598A3,
+ 0x9CA1A79C, 0xA79C9FA7, 0xA1A79C9F, 0x6CA8ACA1,
+ 0x09057275, 0x08090708, 0x2F000100, 0x9B923233,
+ 0x989C919A, 0x8D939A8D, 0x9A8E939A, 0x93978B96,
+ 0x8990968B, 0x90878E94, 0x8E91888D, 0x888F9086,
+ 0x91889192, 0x70706A90, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00020000, 0x00010200, 0x02000102,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x4B4F4900, 0x87929A90, 0x93898A92,
+ 0x8D958A8B, 0x8C93978C, 0x998D9498, 0x999D9195,
+ 0x939C9D93, 0x9F959C9D, 0x9D9E949E, 0x919B9F93,
+ 0xA29599A0, 0x9CA3969B, 0x8C949B8C, 0x9B8C949B,
+ 0x959A8B96, 0x919F9F91, 0x70669F9F, 0x14150B6F,
+ 0x68030800, 0xB4A17379, 0xAEB4A3B0, 0xA1A6AD9E,
+ 0xAB9FA7AE, 0xA9ADA1A7, 0xA1AAAEA2, 0xAEA3A9AD,
+ 0xA9AFA4AA, 0x98A5ADA2, 0xA79E9BA3, 0xA7ADA2A2,
+ 0xA4A9B0A3, 0xB3A4ACB3, 0xAEB5A6AC, 0xA8ADB4A7,
+ 0xB0A7ADB3, 0xAAAFA6AB, 0xA2A9B1A7, 0xAAA1A4AC,
+ 0xA6ABA2A5, 0xA5A8ADA4, 0xADA4A9AE, 0xA8ADA4A8,
+ 0xACA9B0A9, 0xB4ADABB3, 0xA9B0A9AD, 0xBFB5B9B4,
+ 0xBEBCC0C4, 0xBABDBBBB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB9B8BCB7, 0xBFBDBABE, 0xBCBFBDBC,
+ 0xBBBCBFBD, 0xBDB8BABD, 0xBABEB9B9, 0xB9B9BFBA,
+ 0xC0BFB5BC, 0xB9BFBEBA, 0xBDBAC0BF, 0xBDBBB9C0,
+ 0xB8BDBBB8, 0xBEB8BDBB, 0xBFBEBABF, 0xB9BFBEBA,
+ 0xBFB7BFBE, 0xC0BFB8C0, 0xB8BEBDBA, 0xBDB8BDBE,
+ 0xBDBCB7BC, 0xB6BCBBB7, 0xBBB6BCBB, 0xC1C0B6BC,
+ 0xB7BDBCBB, 0xC0BBBFC0, 0xBEC2BBBF, 0xBABEBFBB,
+ 0xB9B4BCBC, 0xBDBEB1B9, 0xBEC0C1B9, 0xC0BBC0C1,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BAC0BF, 0xC0BFBBC1,
+ 0xBAC0BFBA, 0xC0B8C0C0, 0xC0C0B6C0, 0xB8C0C0B8,
+ 0xBCB8C0BF, 0xBEBFB7BD, 0xB9BEBFBA, 0xBFB9BFBE,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xC1B8C0C0, 0xC0C0B9C1,
+ 0xB7BFBFB8, 0xBCB5BDBD, 0xB7B7B4BC, 0xB5BDBDAF,
+ 0xBDB7C1C1, 0xBDBDB3BD, 0xB4BCBBB5, 0xBDB7BDBC,
+ 0xBFBEB9C0, 0xBBC0BFBA, 0xBEBABFBE, 0xBFBEBABF,
+ 0xBABFBEBA, 0xBBB8BDBB, 0xBEBDB8BD, 0xB5BBBAB9,
+ 0xB8B2B7B8, 0x3E3DB2B7, 0x00000039, 0x01000000,
+ 0x00000000, 0x00000100, 0x5A000004, 0x4A5E544D,
+ 0x58476256, 0x614E3F5F, 0x40604F3F, 0x4F3F614F,
+ 0x61504062, 0x40604F3F, 0x4F415D4F, 0x4F2D233A,
+ 0x37524038, 0x40365440, 0x5A483C5A, 0x3C5A483C,
+ 0x483C5A46, 0x51453753, 0x38504536, 0x30243A45,
+ 0x070A0808, 0xB7B20809, 0xB0B8B1B1, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBDB9C0BD, 0xBEBFB9C0,
+ 0xB9BEBFBA, 0xBEB9BFBE, 0xC0BFB7BF, 0xB9BFBEBA,
+ 0xBDBABFBD, 0xC0BDBABF, 0xB9C0BDB9, 0xBEB9BFBE,
+ 0xBFBDB9BF, 0xB7BEBBBA, 0xBEB9BFBE, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xC0B9BEBF, 0xBFBFBABF, 0xB7BFBFB7,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB7BFBEB7, 0xBDB6BEBE,
+ 0xBEBEB5BD, 0xB7BFBFB6, 0xBEB6BEBE, 0xBDBDB6BE,
+ 0xB6BEBEB5, 0xC1B7BFBF, 0xC0C0B9C1, 0xB8C0C0B8,
+ 0xC0BABFC2, 0xBDC0B8BD, 0xB8BDC0B8, 0xBDB7BCBD,
+ 0xBDBCB7BC, 0xB7BDBCB7, 0xBDB8BCBD, 0xBCBDB8BC,
+ 0xB8BDBEB7, 0xBCB5BDBD, 0xBCBFB4BC, 0xB5BCBFB5,
+ 0xBEB7BCBD, 0xBDBDB8BD, 0xB5BDBDB5, 0xBDB3BBBB,
+ 0xBBBBB5BD, 0xB4BCBCB3, 0xBCB4BCBC, 0xBCBBB4BC,
+ 0xB4BCBBB4, 0xBDB5BDBD, 0xBDBDB5BD, 0xB5BDBDB5,
+ 0xC0B8BBBF, 0xB1B5B6BD, 0x9EABADA6, 0xBDB1BDBD,
+ 0xBDBDB5BD, 0xB7BCBDB5, 0xBBB3BBBA, 0xBBBCB4BC,
+ 0xB8BDBEB6, 0xBEB7BCBD, 0xBCBBB8BD, 0xB7BDBCB6,
+ 0xBBB6BBB9, 0xBEBCB8BD, 0xB9BEBCB9, 0xBDBABFBD,
+ 0xC0BEBABF, 0xBBC0BEBB, 0xBEBCBEBE, 0xBFBEBCBE,
+ 0xB8BDBBBA, 0xBAB8BCB7, 0xC0BBBBBF, 0xBBBFBABC,
+ 0xBEBBBFBA, 0xC5C0BFC3, 0xB5B9B4C1, 0xADADB4AD,
+ 0xB0A9ADB4, 0xA9B0A9A9, 0xAAACB1A8, 0xB4AEB0B3,
+ 0xB1B4ABB2, 0xA8ADB3A8, 0xB4A7ADB3, 0xAEB5A8AD,
+ 0xA8AFB3A8, 0xB2A9AFB3, 0xABB1A6AD, 0xA5ADB1A6,
+ 0xAFA4ADB1, 0xA8ACA1AB, 0xA3ADB1A6, 0xACA0ABAF,
+ 0xAAAEA2A8, 0xA3ADAEA4, 0xADA3ACAD, 0xA6AA9EAC,
+ 0xA1AAAEA2, 0xAEA2A9AD, 0xA6AA9EAA, 0x9DA8ACA0,
+ 0xAB9FA5A9, 0xA8ACA0A7, 0x9CA8ACA0, 0xA599A4A8,
+ 0xA9ADA1A1, 0x9BA8AD9E, 0xA79AA5AA, 0xA0A69BA0,
+ 0x9CA1A79C, 0xA89BA1A7, 0xB0B6ABA1, 0x0572746E,
+ 0x09070A09, 0x08090508, 0x9164675E, 0x9C91989C,
+ 0x989C9098, 0x8D939A8D, 0x988C939A, 0x95998D94,
+ 0x8B91958A, 0x91889296, 0x9192898E, 0x888E9188,
+ 0x908A8E91, 0x706F6B90, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x4B4F4A00, 0x8391998F, 0x9187858F,
+ 0x8D958A89, 0x8D93978C, 0x998D9599, 0x989C9095,
+ 0x909A9E92, 0x9D93989C, 0x9E9F959C, 0x959B9F93,
+ 0xA2969DA1, 0x9CA0949E, 0x8F9EA296, 0x9B8C979B,
+ 0x9A9F9096, 0x909FA090, 0x9F919FA0, 0x9F9F919F,
+ 0x003E4132, 0x7A6B0106, 0xAEB3A475, 0xA1B2B9AC,
+ 0xACA0A6AC, 0xA8ACA0A8, 0xA2A9ADA2, 0xADA2A7AD,
+ 0xA8AEA3A7, 0x97A0A99C, 0xADA29BA4, 0xAFB3A8A7,
+ 0xA4AAB1A4, 0xB5A6ACB3, 0xAEB5A8AE, 0xA6A9B1A6,
+ 0xB2A9A8B0, 0xADB1ABAD, 0xAAA9B0A9, 0xACA6AAB1,
+ 0xA8ACA6A8, 0xA3A8ACA6, 0xACA3A7AC, 0xA8ADA4A7,
+ 0xB2ADB4AD, 0xB8B3B2B9, 0xB8BCB7B4, 0xBABABEB9,
+ 0xBEBCBBBF, 0xBBBEBCBB, 0xBABCC0BB, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB8BABEB9, 0xBFBDB9BD, 0xBABDBBBC,
+ 0xBBBABDBB, 0xBDBBBABD, 0xB8BDBBBA, 0xBBBAC1BE,
+ 0xC0BFB7BE, 0xB9BFBEBA, 0xBEB8BEBD, 0xBDBBB9BF,
+ 0xBABFBDB8, 0xBAB7BCBA, 0xBFBEB7BC, 0xB9BFBEB9,
+ 0xC1B6BEBE, 0xBFC0B9C1, 0xB9BEBFBA, 0xBDB8C0C0,
+ 0xC0C0B5BD, 0xB5BDBDB8, 0xB8B6BCBB, 0xBCBBB3B9,
+ 0xB8BDBCB7, 0xBFBBBFC0, 0xBFC0BABE, 0xBDBFC0BD,
+ 0xBAB5BABB, 0xB7B6B5BB, 0xB8BEBDB1, 0xC0BBC0C1,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xBFBAC0BF, 0xC0BFBBC0,
+ 0xBAC0BFBB, 0xBFB8C0C0, 0xBEBFB7BF, 0xBABFC0B9,
+ 0xBEBAC0BF, 0xBFC0B9BF, 0xB9BEBFBB, 0xBDB8BEBD,
+ 0xBFBEB7C0, 0xB9BFBEB9, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xBBB5BDBD, 0xB7B7B3BB, 0xB3BBBBAF,
+ 0xBDB3BCBF, 0xBBBBB3BD, 0xB8C0BFB3, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xBAC0BFB9, 0xBBBABFBD, 0xBDBBB8BD, 0xB7BDBCB8,
+ 0xB7B2B7B8, 0x3E3CB2B8, 0x0001003B, 0x00000000,
+ 0x00000000, 0x00000000, 0x1E000003, 0x17221A18,
+ 0x2017241F, 0x231A1322, 0x13241B14, 0x1B13241B,
+ 0x241B1324, 0x13241B13, 0x1C15221B, 0x07000006,
+ 0x00060100, 0x01000800, 0x07000007, 0x00070000,
+ 0x00000600, 0x05020006, 0x00060300, 0x02000402,
+ 0x070A0808, 0xB7B20809, 0xB0B8B1B1, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xB9BEBFBA, 0xBCB9BFBE, 0xBFBEB5BD, 0xB9BFBEB9,
+ 0xBDBABFBD, 0xC0BDBABF, 0xB9C0BDB9, 0xBEB9BFBE,
+ 0xBDBBB9BF, 0xB7BEBBB8, 0xBEB7BDBC, 0xBFBEB9BF,
+ 0xBAC0BFB9, 0xC0BABFC0, 0xC0C0BABF, 0xB7BFBFB8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xB9C1C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B9C1C1, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0BABFC2, 0xBDC0B8BD, 0xB8BDC0B8, 0xBDB7BCBD,
+ 0xBCBDB7BC, 0xB7BDBCB7, 0xBDB8BCBD, 0xBCBDB8BC,
+ 0xB7BCBDB7, 0xBCB5BDBD, 0xBCBFB4BC, 0xB4BCBCB5,
+ 0xBDB7BCBD, 0xBDBDB7BC, 0xB5BDBDB5, 0xBBB3BBBB,
+ 0xBBBBB3BB, 0xB3BBBBB3, 0xBCB5BDBD, 0xBCBBB4BC,
+ 0xB4BCBBB4, 0xBDB5BDBD, 0xBDBDB5BD, 0xB5BDBDB5,
+ 0xC0B9BCC0, 0xB1B5B6BD, 0xA5B2B4A5, 0xBDB1BDBD,
+ 0xBEBEB5BD, 0xB7BCBDB6, 0xBBB6BCBB, 0xBBBCB6BC,
+ 0xB7BCBDB6, 0xBCB7BCBD, 0xBDBCB7BD, 0xB8BDBBB7,
+ 0xBAB6BCB7, 0xBDBCB7BC, 0xBABFBEB8, 0xBDBABFBE,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEBCBEBE, 0xBBBABABF,
+ 0xB6BBBAB6, 0xBBBBBEBC, 0xBFBABCC0, 0xBBBFBABB,
+ 0xBAB5B9B4, 0xC4BFBBBF, 0xBBBFBAC0, 0xB2B6BCB7,
+ 0xB0A9B2B9, 0xABAFA9A9, 0xADADB1AB, 0xB4AEB1B3,
+ 0xB0B4AEB2, 0xA8ADB2A9, 0xB4A9ADB3, 0xAEB5A8AE,
+ 0xA8B0B4A9, 0xB2A9AFB3, 0xACB2A7AD, 0xA5ACB0A5,
+ 0xAFA4ADB1, 0xABB1A6AB, 0xA6ABB1A6, 0xB0A3ABB1,
+ 0xA9ADA1A9, 0xA3ACAEA2, 0xADA3ACAD, 0xACADA3AC,
+ 0xA1A9ADA1, 0xADA2A9AD, 0xA9ADA2A9, 0x9DA8ACA0,
+ 0xA99DA5A9, 0xA5A99DA5, 0xA1A8ACA0, 0xA79BA9AD,
+ 0xA0A498A3, 0x9CA5A99D, 0xADA0A4A8, 0xA1A89BA6,
+ 0x9CA1A79C, 0xB7ACA1A7, 0x82857CB1, 0x05080905,
+ 0x09050A09, 0x72746E08, 0x90989C91, 0x9C90989C,
+ 0x989C9098, 0x8891988B, 0x94889094, 0x92948890,
+ 0x89909489, 0x938A9094, 0x8F928992, 0x878E9188,
+ 0x8F898D90, 0x6E6F6B8D, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x01000200, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x4A4E4900, 0x8791998F, 0x92888A92,
+ 0x8F948B8A, 0x8B93978C, 0x998D9397, 0x989C9095,
+ 0x91989C90, 0x9D93989C, 0x9E9F959C, 0x939B9F93,
+ 0xA1959B9F, 0x9B9F939D, 0x8D9A9E92, 0x9A8E9599,
+ 0x969B8C96, 0x909C9F8F, 0xA0909FA0, 0x9F9F919F,
+ 0x6CB0B2A6, 0x05007478, 0x74786C01, 0xADCBD2C5,
+ 0xACA1B2B8, 0xA9ADA2A8, 0xA2A9ADA2, 0xADA2A7AD,
+ 0xA7AEA1A7, 0x9CA2A99C, 0xADA2A2A9, 0xAEB2A7A9,
+ 0xA4B0B4A8, 0xB5A6ACB3, 0xAAB1A4B0, 0xA9A9B1A6,
+ 0xB2ACABB3, 0xABAFA9AE, 0xA9A9B0A9, 0xAFA9A9B0,
+ 0xABAFA9AB, 0xA6A8ACA6, 0xACA3A8AC, 0xABAFA9A7,
+ 0xB3ADB4AD, 0xBCB7B2B8, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xBEBCBBBF, 0xBCBFBDBB, 0xBABBBFBA, 0xC0BBBBBF,
+ 0xBBBFBABC, 0xB7BABEB9, 0xBDBBB8BC, 0xBABDBBBA,
+ 0xBEB8BDBC, 0xBBB9BABF, 0xB6BBB9B6, 0xBBBABFBD,
+ 0xBFBEB8BD, 0xBBC0BFBA, 0xC0B9BEBF, 0xBAB8BBC1,
+ 0xB8BDBBB5, 0xB9B8BDBB, 0xBFBEB6BB, 0xBBC1C0B9,
+ 0xBFB8C0C0, 0xBFC0B7BF, 0xB9BEBFBA, 0xBDB8C0C0,
+ 0xC0C0B5BD, 0xB7BFBFB8, 0xC0B7BDBC, 0xBDBCBBC1,
+ 0xB8BDBCB8, 0xC0BBBFC0, 0xBFC0BBBF, 0xBDBFC0BD,
+ 0xBAB6BBBA, 0xBBBAB5BB, 0xB5BBBAB5, 0xC0B6BEBE,
+ 0xBEBEB8C0, 0xBABFC0B6, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBB, 0xC0B9C1C1, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xBCBAC0BF, 0xC0C1B7BD, 0xB9BFBEBC, 0xBDB5BBBA,
+ 0xBFBEB7C0, 0xB9BFBEB9, 0xC0B9C1C1, 0xC1C1B8C0,
+ 0xB8C0C0B9, 0xBBB8C0C0, 0xBCBCB3BB, 0xB3BBBBB4,
+ 0xBEB8C0C0, 0xBBBBB6BE, 0xB9BFBEB3, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB7BDBCB9, 0xBBB8BDBB, 0xBDBBB8BD, 0xB5BCB9B8,
+ 0xB7B0B8B7, 0x3E3CB2B8, 0x0001003B, 0x00000000,
+ 0x00000000, 0x00000000, 0x04000003, 0x00070000,
+ 0x04000804, 0x08040008, 0x000A0200, 0x02000A04,
+ 0x0802000A, 0x00080200, 0x02000702, 0x04020006,
+ 0x00040200, 0x02000402, 0x04020004, 0x00040200,
+ 0x02000402, 0x04020004, 0x00040200, 0x02000402,
+ 0x07070707, 0xB7B20609, 0xAFB7B0B1, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBBC0BFBA, 0xBDBABFBD, 0xBFBEBABF,
+ 0xBBC1C0BA, 0xBCBAC0BF, 0xBFBEB5BD, 0xB8BEBDB7,
+ 0xBBBABFBD, 0xC0BEBAC0, 0xBBC0BEBB, 0xBFB9BFBE,
+ 0xBFBCBAC0, 0xB5BCB9B8, 0xBDB9C0BD, 0xBFBDBABF,
+ 0xBAC0BFBA, 0xC1BABFC0, 0xC0C0B9C1, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB7BFBFB8, 0xC0B8C0C0, 0xBFC2B8C0, 0xB7BCBFBA,
+ 0xBEB9C1C1, 0xBDC0B6BE, 0xB9BEC1B8, 0xBEB8BDC0,
+ 0xBDBEB8BD, 0xB8BDBEB8, 0xC0B8BDC0, 0xBDC0B8BD,
+ 0xB8BDC0B8, 0xBDB5BDBD, 0xBDBDB5BD, 0xB5BDBDB5,
+ 0xBDB8BDBE, 0xBDBDB8BE, 0xB5BDBDB5, 0xBBB5BDBD,
+ 0xBBBBB3BB, 0xB6BEBEB3, 0xBDB4BCBC, 0xBDBDB5BD,
+ 0xB4BCBCB5, 0xBBB3BBBB, 0xBABDB3BB, 0xB3BABDB3,
+ 0xBDB8BCBD, 0xB9BBB7BC, 0xADB9BBAD, 0xBBB3BDBD,
+ 0xBDBDB3BB, 0xB7BCBDB5, 0xBEB7BDBC, 0xBDBCBABF,
+ 0xBABFBEB8, 0xBCB9BFBE, 0xBDBCB7BD, 0xB8BDBBB8,
+ 0xBBB8BEB9, 0xBFBEB8BD, 0xB8BEBDB9, 0xBDB9BFBE,
+ 0xC0BFB8BE, 0xBABFBEBB, 0xBBBBC0BE, 0xBDBCB8BD,
+ 0xB8BEBDB8, 0xBDBABFBD, 0xC0BBBABF, 0xBAC0BBBA,
+ 0xBABBBFBA, 0xBBB9BBBF, 0xBDC1BCB8, 0xBAC0C4BF,
+ 0xB4AFBBBF, 0xB0B4AFB0, 0xAEB0B4AF, 0xB4AFAFB3,
+ 0xB0B4AEB0, 0xA9AEB3AA, 0xB4A9ACB4, 0xAEB4A9AC,
+ 0xA9AFB3A8, 0xB3A8B0B4, 0xACB2A7AD, 0xA2AEB2A7,
+ 0xAEA3A9AD, 0xAEB2A7AA, 0xA7A9B1A7, 0xB2A8A9B1,
+ 0xA7ADA2AA, 0xA2A8ACA0, 0xAFA4AAAE, 0xADB1A6AB,
+ 0x9FADB1A5, 0xACA1A7AB, 0xABAFA4A8, 0xA1A9ADA1,
+ 0xADA1A9AD, 0xA8ACA0A9, 0x9DA4A89C, 0xACA0A5A9,
+ 0xA5A99DA8, 0x9CA4A89C, 0xAC9DA4A8, 0xA5AC9DA5,
+ 0xA1A7AB9F, 0x746EA8AC, 0x08090572, 0x2F000100,
+ 0x9B923335, 0x989C9198, 0x8A95998D, 0x9B8C9499,
+ 0x94998A96, 0x8E939889, 0x9D91989D, 0x93978B99,
+ 0x898F9388, 0x91889094, 0x8F92898E, 0x898B8F89,
+ 0x8F8A8B8F, 0x686C678B, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x29020000,
+ 0x00002C2A, 0x00010002, 0x0F10140F, 0x13110E14,
+ 0x10131110, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010101,
+ 0x00000000, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x01010102, 0x00000000,
+ 0x01010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000101, 0x07060507, 0x05070605,
+ 0x06060606, 0x00000000, 0x01000001, 0x36373300,
+ 0x17161917, 0x1A181619, 0x16191717, 0x01000301,
+ 0x03010003, 0x02030102, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00020000,
+ 0x01000000, 0x484C4700, 0x848E928C, 0x938A888D,
+ 0x90938A8E, 0x8D91958A, 0x9B919697, 0x9A9B919A,
+ 0x90979B90, 0x9B90979B, 0x999D9197, 0x939B9F93,
+ 0x9E929B9F, 0x9DA1959A, 0x91999D92, 0x9D91999D,
+ 0x999D9199, 0x8D979C8D, 0x9C8D999C, 0x9B9D9199,
+ 0x98A0A197, 0x8176A1A2, 0x3D41357D, 0xB7606458,
+ 0xC1B7BEC2, 0x9EA297C0, 0xA0A8ACA1, 0xACA0A8AC,
+ 0xAFB3A7A8, 0x9FA9ADA2, 0xACA3A6AA, 0xAEAFA5AB,
+ 0xA4AAACA0, 0xB0A4AEB3, 0xADB1A5AE, 0xA9AEB4A9,
+ 0xB4AAACB4, 0xA9B1A7AC, 0xACB1B6AD, 0xB5ACB0B5,
+ 0xAEB3AAB0, 0xA9ABAFA9, 0xB0A9A9B0, 0xADB4ADA9,
+ 0xBBB7BBB6, 0xBDBBBABD, 0xBABDBBBA, 0xB9BBBFBA,
+ 0xBFBABABE, 0xBBBFBABB, 0xBBBCC0BB, 0xBFBDBCC0,
+ 0xBDC0BEBC, 0xB8BCBFBD, 0xBFBDB7BA, 0xB9BEBDBC,
+ 0xBDBABFC0, 0xBDBCB5BD, 0xB6BBB9B7, 0xBCB9BEBC,
+ 0xBDBDBBBE, 0xBBBDBDBB, 0xBEB8BDBC, 0xC0BDB9BF,
+ 0xB9C0BDB9, 0xBCBAC1BE, 0xBDBCB7BD, 0xBABFC0B7,
+ 0xBFB8C0BF, 0xBBBCB8C0, 0xB7BCBDB6, 0xBEB8C0C0,
+ 0xC0C0B6BE, 0xB6BEBEB8, 0xC0B9BEBF, 0xBFC0BBBF,
+ 0xBBBFC0BB, 0xC2BABFC2, 0xBEC1BABF, 0xBABEBFB9,
+ 0xBAB6BCBB, 0xBCB9B5BB, 0xB3BAB7B5, 0xBDB5BBBA,
+ 0xBABBB8BE, 0xB5BABBB5, 0xC0B7BCBD, 0xBFC0B8C0,
+ 0xB8C0C0BA, 0xC2B8BFC2, 0xC0C1B8BF, 0xBABFC0BB,
+ 0xBCBAC0BF, 0xBEBFB7BD, 0xB9BFBEB9, 0xBCB8BEBD,
+ 0xBFBEB8BF, 0xBAC0BFB9, 0xB8B5BDBD, 0xBFC0B0B8,
+ 0xBABFC0BA, 0xBBB5BDBD, 0xBABAB3BB, 0xB5BDBDB2,
+ 0xBEB7BFBE, 0xBFBEB9BF, 0xBABFBDB9, 0xBDBABFBD,
+ 0xC0BEBABF, 0xB8BDBBBB, 0xBEB9BFBE, 0xBDBCB9BF,
+ 0xB8BEBDB7, 0xBDB8BDBB, 0xBEB9BABF, 0xB5BCB9B8,
+ 0xB8B2BBB8, 0x3F3EB2BB, 0x0000003A, 0x01000000,
+ 0x00000000, 0x00000100, 0x3A000004, 0x2B3F342D,
+ 0x38294436, 0x453A2944, 0x28473A28, 0x392A4638,
+ 0x41362943, 0x29413629, 0x362A4036, 0x3A1D1226,
+ 0x253B3126, 0x31253B31, 0x3D34283E, 0x283E3327,
+ 0x34283E34, 0x40362A40, 0x2B3F362A, 0x20152936,
+ 0x07080808, 0xB7B20609, 0xB0B7B2B1, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBDBABFBD, 0xBFBEBABF,
+ 0xB9BFBEBA, 0xBDB9BFBE, 0xC0BFB6BE, 0xBAC0BFB8,
+ 0xBCBBC0BE, 0xC0BEBBC1, 0xBBC0BEBB, 0xBEB9BFBE,
+ 0xBFBCB9BF, 0xB9C0BDB8, 0xBDBABFBD, 0xBFBDBABF,
+ 0xB9C0BDBA, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B9C1C1, 0xBFC2B8C0, 0xB9BEC1BA,
+ 0xBEB8C0C0, 0xBDC0B6BE, 0xB8BDC0B8, 0xC0B8BDC0,
+ 0xBDBEB8BD, 0xB8BDBEB8, 0xC0B9BEC1, 0xBDC0B8BD,
+ 0xB8BDC0B8, 0xBDB5BDBD, 0xBDBDB5BD, 0xB5BDBDB5,
+ 0xBCB7BDBC, 0xBEBEB7BD, 0xB5BDBDB6, 0xBDB5BDBD,
+ 0xBBBBB5BD, 0xB5BDBDB3, 0xBDB5BDBD, 0xBDBDB5BD,
+ 0xB5BDBDB5, 0xBDB5BDBD, 0xBCBFB5BD, 0xB7BCBFB5,
+ 0xBDB7BBBC, 0xBBBEB7BC, 0xAAB3B6B2, 0xBDB3BBBB,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xB9B7BDBC, 0xBDBCB5BA,
+ 0xBABFBEB8, 0xBEBAC0BF, 0xBDBBBABF, 0xBABFBDB8,
+ 0xBBBBC1BC, 0xBEBDB8BD, 0xB8C0C0B8, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xB8BDBCB9, 0xBAB5BAB8, 0xBFBEB7BC,
+ 0xBBC1C0B9, 0xBDBABFBD, 0xBFBDBABF, 0xB9BFBABA,
+ 0xB8BBBFBA, 0xBBB9B9BD, 0xBCBFBDB8, 0xBABBBFBA,
+ 0xC5C0BBBF, 0xB5B9B4C1, 0xAFB0B4AF, 0xB5B0B0B4,
+ 0xB0B4AEB1, 0xAAACB3AC, 0xB4A9ACB4, 0xACB4A9AC,
+ 0xA8ADB3A8, 0xB4A9AFB3, 0xACB2A7AE, 0xA3AEB2A7,
+ 0xABA1ACAD, 0xACB0A5AA, 0xAAA8B0A6, 0xB0A6AAB1,
+ 0xAAB0A5A8, 0xA4A8ACA0, 0xAFA3ACB0, 0xADB1A6AB,
+ 0xA3ADB1A5, 0xAB9FABAF, 0xA8ACA0A7, 0xA2A9ADA1,
+ 0xADA1AAAE, 0xAAAEA2A9, 0x9CA4A89C, 0xACA0A4A8,
+ 0xA9ADA1A8, 0x9CA4A89D, 0xAA9BA4A8, 0xA4AB9CA3,
+ 0xA2A8ACA0, 0x0903A8AB, 0x08090507, 0x9333352F,
+ 0x9C91999C, 0x989C9098, 0x8D93978B, 0x9D8E979C,
+ 0x959A8B98, 0x86919687, 0x998D9095, 0x95998D95,
+ 0x8A91958A, 0x92899195, 0x8E91888F, 0x89899089,
+ 0x908B8990, 0x666C678A, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000100, 0x01000001, 0x00010000, 0x7B585551,
+ 0x2A26827F, 0x2A2B272B, 0xA1A3A7A2, 0x7770A1A8,
+ 0x3F463F70, 0x00343833, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000102, 0x00000000, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x01000001, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000001, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010100, 0x01000000,
+ 0x00000101, 0x00000000, 0x06060507, 0x06060606,
+ 0x06070506, 0x66363733, 0x6D646A6C, 0xA0A39A6A,
+ 0x157B7F7A, 0x7E7C161A, 0x7B7F7A7B, 0x00000400,
+ 0x02000004, 0x02030101, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00020000,
+ 0x01000200, 0x4A4B4700, 0x848D918B, 0x938A888D,
+ 0x90938A90, 0x8A93948A, 0x978D9394, 0x96978D96,
+ 0x8F969A8F, 0x9D91969A, 0x999D9199, 0x939B9F93,
+ 0x9C909B9F, 0x9B9F9398, 0x8F979B90, 0x9B8F969A,
+ 0x999D9197, 0x92999D91, 0x9D919A9E, 0x9D9D919B,
+ 0x98A0A197, 0xA299A0A1, 0x9EA2979F, 0x59606459,
+ 0xC1B86064, 0xC0C1B8C0, 0xA0A8ACA1, 0xB3A7A8AC,
+ 0xAFB3A7AF, 0xA0A8A99F, 0xACA3A8A9, 0xAEAFA5AB,
+ 0x9EAEB0A4, 0xB1A5AAAD, 0xADB1A5AF, 0xABAFB5AA,
+ 0xB4AAAEB6, 0xA9B1A7AC, 0xACB0B5AC, 0xB5ACB0B5,
+ 0xB0B5ACB0, 0xA9ADB4AD, 0xAFA8A9B0, 0xB6BCB7A8,
+ 0xBBBEC1BF, 0xBEBCBABD, 0xB9BCBABB, 0xBBBBBFBA,
+ 0xBFBABCC0, 0xBCC0BBBB, 0xBBBABEB9, 0xBFBDBCC0,
+ 0xBBBEBCBC, 0xB9BCBFBD, 0xBFBDB8BB, 0xBABFBEBC,
+ 0xBFB9C1C1, 0xC0BFB7BF, 0xB8BDBBBA, 0xBCB9BEBC,
+ 0xBDBDBBBE, 0xB8BDBCBB, 0xBDB9BFBE, 0xBCBBB8BE,
+ 0xBAC1BEB6, 0xBCBAC0BF, 0xBBBCB7BD, 0xBBC0C1B6,
+ 0xBBBAC0BF, 0xBCBDB4BC, 0xBABFC0B7, 0xBEB8C0C0,
+ 0xC0C0B6BE, 0xB8C0C0B8, 0xC0BABFC0, 0xBFC0BBBF,
+ 0xBBBFC0BB, 0xC2BABFC2, 0xBEC1B8BF, 0xB9BEBFB9,
+ 0xBAB5BABB, 0xBEBBB5BB, 0xB5BCB9B7, 0xBAB2B8B7,
+ 0xBDBEB5BB, 0xB5BABBB8, 0xC0B6BBBC, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xBABFC0B8,
+ 0xBEBAC0BF, 0xBFC0B9BF, 0xB9BEBFBA, 0xBDB9BFBE,
+ 0xBDBCB9C0, 0xB9BFBEB7, 0xBBB5BDBD, 0xBCBDB3BB,
+ 0xBABFC0B7, 0xBAB6BEBE, 0xBCBCB2BA, 0xB3BBBAB4,
+ 0xBDB8BEBD, 0xC0BEB9C0, 0xBABFBDBB, 0xBCBABFBD,
+ 0xC0BEB9BE, 0xB8BDBBBB, 0xBCB9BFBE, 0xBDBCB7BD,
+ 0xB7BDBCB7, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BFBAB8,
+ 0xB8B2BBB8, 0x3F3EB2BB, 0x0000003A, 0x01000001,
+ 0x00000000, 0x00000100, 0x54020004, 0x41594E47,
+ 0x50405F4E, 0x64564364, 0x41675741, 0x56426556,
+ 0x5D4E3D5E, 0x3E5A4D3E, 0x4E3F5A4D, 0x5032253D,
+ 0x36524339, 0x46375345, 0x5B4D3F5B, 0x3F5B4D3F,
+ 0x4E3F5B4E, 0x5A4E3E5D, 0x40584D3E, 0x372B414E,
+ 0x07080907, 0xB7B20609, 0xB0B7B2B0, 0xBDBABFBD,
+ 0xBEBEBABF, 0xBCBEBEBC, 0xBDBBC0BE, 0xC0BFBABF,
+ 0xB9BFBEBB, 0xBDB9C0BD, 0xBFBEB7C0, 0xBAC0BFB9,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBDB9C0BD,
+ 0xBDBBB9C0, 0xBABFBDB8, 0xBDB9C0BD, 0xC0BDB9C0,
+ 0xB9C0BDB9, 0xC0B8C0C0, 0xBFC2B8C0, 0xB8BFC2B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B9C1C1,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEBABFC0, 0xBDC0B8BD, 0xB8BDC0B8,
+ 0xBEB6BEBE, 0xBDC0B6BE, 0xB8BDC0B8, 0xC0B8BDC0,
+ 0xBDC0B8BD, 0xB9BEC1B8, 0xC1B9BDC2, 0xBDC0B8BC,
+ 0xB8BDC0B8, 0xBDB5BDBD, 0xBCBDB5BD, 0xB7BCBDB7,
+ 0xBCB7BDBC, 0xBDBEB7BD, 0xB7BCBDB8, 0xBDB4BCBC,
+ 0xBBBBB5BD, 0xB3BBBBB3, 0xBDB5BDBD, 0xBDBDB5BD,
+ 0xB5BDBDB5, 0xBDB4BCBC, 0xBBBEB5BD, 0xB6BBBEB4,
+ 0xBDB8BCBD, 0xBCBFB8BC, 0xB0B7BAB5, 0xBDB3BBBB,
+ 0xBDBDB7BC, 0xB5BDBDB5, 0xBEBAC0BF, 0xBFBEB9BF,
+ 0xB7BDBCB9, 0xBEB7BCBB, 0xBFBDBABF, 0xB8BDBBBA,
+ 0xBCBABFBD, 0xC0BFB9BE, 0xB9BFBEBA, 0xBDB9BFBE,
+ 0xBFBEB8BE, 0xB8BDBCBA, 0xBDB7BCBA, 0xC1C0BABF,
+ 0xB9BFBEBB, 0xBEB9BFBE, 0xBEBCBAC1, 0xBABFBDB9,
+ 0xB7B8BCB7, 0xBFBAB8BC, 0xBABEB9BB, 0xB4B5B9B4,
+ 0xC4BFB5B9, 0xC0C4BFC0, 0xAFBCC0BB, 0xB4AFB0B4,
+ 0xB0B4AEB0, 0xAAACB3AC, 0xB4A9ACB4, 0xACB4A9AC,
+ 0xA7ADB3A8, 0xB2A9ACB2, 0xAFB2A9AD, 0xA2AEAFA6,
+ 0xADA3AAAB, 0xACB0A5AC, 0xA3A9AEA5, 0xB0A9A5AD,
+ 0xABB0A7A9, 0xA0A7ABA0, 0xACA0AAAC, 0xA8ACA0A8,
+ 0x9FA8ACA0, 0xADA1A7AB, 0xA8ACA0A9, 0xA2A8ACA0,
+ 0xADA1AAAE, 0xA8ACA0A9, 0x9AA8AD9E, 0xA798A4A9,
+ 0xA5AA9BA2, 0xA0A4A89C, 0xA99AA8AC, 0xA5AC9FA2,
+ 0x38A8ACA1, 0x0B053E41, 0x72756C09, 0x91999C93,
+ 0x9B8F989C, 0x989C9097, 0x8D989C90, 0x968A9599,
+ 0x989C9092, 0x8B989C90, 0x94899397, 0x90948990,
+ 0x88919288, 0x90869192, 0x8E91888F, 0x89899089,
+ 0x8F8A8890, 0x666C6788, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x47484400, 0x79827F7A,
+ 0x5650817E, 0x2A2B2756, 0xA1A2A6A1, 0xA8A1A1A8,
+ 0xA1A99FA0, 0x9A9EA499, 0x6D649FA5, 0x6A6C666A,
+ 0x33353731, 0x01003637, 0x00010000, 0x00000200,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x01010101,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x02000102,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x31323000, 0x68393A36, 0x6F696C6E,
+ 0xA2A39A6F, 0x9AA0A39A, 0xA499A1A5, 0x9EA499A0,
+ 0x14798079, 0x7F7A141B, 0x79807979, 0x00575B55,
+ 0x04000004, 0x00030100, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x4A4B4700, 0x838E938A, 0x8D84888E,
+ 0x8A8D848A, 0x8B8E9188, 0x958A9194, 0x94988D91,
+ 0x91999D91, 0x9E92999D, 0x999D919A, 0x939D9E94,
+ 0xA1959D9F, 0x9DA1959D, 0x90979D92, 0x9D90959B,
+ 0x949B8E96, 0x91979B8F, 0x9F919B9D, 0xA09E939F,
+ 0x98A3A298, 0xA198A0A1, 0x9EA1989E, 0x78A0A197,
+ 0x81798182, 0xC0C1B883, 0xA1AFB3A8, 0xAB9FA8AC,
+ 0xA9ADA1A7, 0xA2AAABA1, 0xB0A5ABAC, 0xACB0A5AC,
+ 0xA5B0B4A8, 0xAFA4ADB1, 0xABB1A6AB, 0xA9ADB2A9,
+ 0xB4AAADB2, 0xACB4AAAC, 0xACB0B5AC, 0xB5ACB0B5,
+ 0xAFB4ABB0, 0xAEADB4AD, 0xB7B2AEB5, 0xB3B9B4B1,
+ 0xBBB3B6B4, 0xBDBBBABD, 0xBBBEBCBA, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBABEB9BB, 0xBABABEB9, 0xC0BEBBBF,
+ 0xBCBFBDBD, 0xBCBCBFBD, 0xBFBDBBBE, 0xBABFBEBC,
+ 0xBCBABFC0, 0xC0BFB6BB, 0xBBC0BFBA, 0xC0B8BDBC,
+ 0xBBBCBBC1, 0xB5BABBB6, 0xBEB8C0C0, 0xBDBCB7BF,
+ 0xB9BFBEB7, 0xBBB5BCB9, 0xBCBBB7BE, 0xB5BBBAB7,
+ 0xBDB6BBBC, 0xC0C0B7BC, 0xB8C0C0B8, 0xBFB8C0C0,
+ 0xBFBFB7BF, 0xB9C1C1B7, 0xC0BABFC0, 0xBFC0BABF,
+ 0xBBBFC0BB, 0xC3BABFC2, 0xBFC2BBC0, 0xB8BDBEBA,
+ 0xBAB6BABB, 0xBBBAB6BB, 0xB3BBBAB5, 0xB7B3BBBA,
+ 0xBDBCB2B8, 0xB9BEBDB8, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB8C0BFB5, 0xC0B8C0BF, 0xC0BFB9C1, 0xB8C0BFB8,
+ 0xBEB9BFBE, 0xC1C1B9BF, 0xB8C0C0B9, 0xBEBAC0BF,
+ 0xBBBAB9BF, 0xB9BFBEB5, 0xC0B8C0C0, 0xBCBDB8C0,
+ 0xB7BCBDB7, 0xBBB5BDBD, 0xBABAB3BB, 0xB3BBBAB2,
+ 0xBEB7BDBC, 0xC0BDBAC1, 0xB9C0BDB9, 0xBEB9BFBE,
+ 0xC0BDB9BF, 0xB9C0BDB9, 0xBEBAC0BF, 0xC0BFB9BF,
+ 0xB7BDBCBA, 0xBCBABFBE, 0xC0BEB9BE, 0xB7BEBBBB,
+ 0xB8B2BBB8, 0x3F3EB2BB, 0x0000003A, 0x01000001,
+ 0x00000000, 0x00000000, 0x06000001, 0x2B3F0000,
+ 0x4F425C34, 0x5B4A395A, 0x375D4C38, 0x4C375D4C,
+ 0x5D4E3D5E, 0x3E5B4E3E, 0x36284050, 0x3804000F,
+ 0x37512D27, 0x46365544, 0x52443652, 0x35544436,
+ 0x46365545, 0x41372844, 0x2C3D3729, 0x08011036,
+ 0x07080907, 0xB7B40609, 0xAEB7B4B0, 0xBDB9C0BD,
+ 0xBEBEBABF, 0xBABFBEBC, 0xBCBABFBD, 0xBFBEB9BE,
+ 0xB9C0BDBA, 0xBDB9C0BD, 0xBEBDB9C0, 0xBABFBEB8,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBDBAC1BE,
+ 0xBFBDB9C0, 0xBABFBDBA, 0xBDB9C0BD, 0xC0BDB9C0,
+ 0xB9BFBEB9, 0xC0B8C0C0, 0xBFC2B8C0, 0xB8BFC2B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEBABFC0, 0xBCBFB8BD, 0xB8BDC0B7,
+ 0xC0B8C0C0, 0xBFC2B8C0, 0xB9BEC1BA, 0xC0B8BDC0,
+ 0xBDC0B8BD, 0xB8BDC0B8, 0xC2BABEC3, 0xBDC0B9BD,
+ 0xB8BDC0B8, 0xBDB5BDBD, 0xBCBDB5BD, 0xB7BCBDB7,
+ 0xBCB7BDBC, 0xBCBDB7BD, 0xB7BCBDB7, 0xBDB5BDBD,
+ 0xBDBDB5BD, 0xB3BBBBB5, 0xBDB4BCBC, 0xBDBDB5BD,
+ 0xB5BDBDB5, 0xBDB5BDBD, 0xBBBEB5BD, 0xB5BCBFB4,
+ 0xBDB7BCBD, 0xBBBEB7BC, 0xB1B8BBB4, 0xBDB2B7B8,
+ 0xBEBEB7BC, 0xB5BDBDB6, 0xBEB9BFBE, 0xC0BFB9BF,
+ 0xBAC0BFBA, 0xBBB8BDBC, 0xC0BDB7BC, 0xB9C0BDB9,
+ 0xBBBABFBD, 0xBEBDB8BD, 0xB9BFBEB8, 0xBBB9BFBE,
+ 0xBBBAB6BC, 0xB6BBBAB6, 0xBDB8BDBB, 0xBFBEBABF,
+ 0xB7BDBCBA, 0xBFBAC0BF, 0xBFBDBAC0, 0xBABFBDBA,
+ 0xBAB7BBB6, 0xBFBABBBF, 0xB8BCB7BB, 0xBBB4B8B3,
+ 0xBFBABCC0, 0xBBBFBABB, 0xBBC0C4BF, 0xB4AFBCC0,
+ 0xB0B4AFB0, 0xA9ACB3AC, 0xB3A9ABB3, 0xACB4A9AB,
+ 0xA9ADB3A8, 0xB3A8AEB4, 0xACAFA6AD, 0xA6ACADA4,
+ 0xAFA5AEAF, 0xAAAEA3AE, 0xA2A7ADA2, 0xAFA6A6AB,
+ 0xABB0A7AA, 0xA1ACB0A5, 0xAEA3A8AC, 0xA9AFA4AA,
+ 0xA0AAAEA3, 0xACA0A8AC, 0xA8ACA0A8, 0xA0A8ACA0,
+ 0xACA0A8AC, 0xA8ACA0A8, 0x9EA8AD9E, 0xAE9FA8AD,
+ 0xA3A899A9, 0x9FA7AB9F, 0xAFA2A7AB, 0xA7ADA2A8,
+ 0x023E4138, 0x746B080B, 0xA8ACA171, 0x91979B90,
+ 0x9D91989C, 0x989C9099, 0x9195998E, 0x9C90989C,
+ 0x95998D98, 0x8B94988C, 0x978C9397, 0x93978C93,
+ 0x8893948A, 0x92889192, 0x8F938891, 0x89888F88,
+ 0x8F8A8890, 0x656B6688, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x25210001, 0x6A6C6624, 0x78808178,
+ 0x56508081, 0x2A2C2656, 0xA1A3A7A1, 0xA99FA1A8,
+ 0xA1A99EA1, 0x989EA598, 0xA4999EA5, 0xA0A39AA0,
+ 0x9DA0A39A, 0x6C66A1A3, 0x6A6C666A, 0x3F60645F,
+ 0x211F4044, 0x1F22201E, 0x00050604, 0x01000001,
+ 0x01020000, 0x00000100, 0x01000001, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00010101, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000001, 0x00010000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010100, 0x00000000, 0x00000000, 0x00010000,
+ 0x17161917, 0x19171419, 0x46494716, 0x61606361,
+ 0x938F6263, 0x92938F92, 0x9AA0A29C, 0xA39AA0A3,
+ 0xA0A499A2, 0x99A0A499, 0xA5989EA4, 0x9DA3989E,
+ 0x37788076, 0x8079373E, 0x7A7E7879, 0x2A848882,
+ 0x03002C30, 0x02030002, 0x00010200, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x4A4B4700, 0x7F8E938A, 0x8D84848A,
+ 0x90938A8A, 0x8E91948B, 0x988D9497, 0x94988D94,
+ 0x8F999D91, 0x9D91999E, 0x999D9199, 0x949DA196,
+ 0xA1959CA0, 0x9DA1959D, 0x8E959C8F, 0x9E91949B,
+ 0x979E9197, 0x8F989C90, 0x9E90999B, 0xA09E939F,
+ 0x97A2A197, 0xA198A0A1, 0x9FA2999E, 0x98A0A197,
+ 0xA097A1A2, 0xC0C1B89F, 0xA7BEC2B7, 0xADA1AEB2,
+ 0xAEB2A6A9, 0xAAADB1A6, 0xB4A9B1B5, 0xB0B4A9B0,
+ 0xA8B0B4A8, 0xB1A6ADB3, 0xAAAFA6AB, 0xAFB1B6AD,
+ 0xB9B2B1B5, 0xAEB5AEB2, 0xB2B3B7B1, 0xB7B1B4B8,
+ 0xAEB2ACB3, 0xB5B2B9B2, 0xBDB8B5BC, 0xADB3AEB7,
+ 0xBBB3B6B4, 0xBEBCBABD, 0xBABDBBBB, 0xB9BBBFBA,
+ 0xBFBABABE, 0xBBBFBABB, 0xB7B8BCB7, 0xBEBCB8BC,
+ 0xBCBFBDBB, 0xBDBBBEBC, 0xBFBDBCBF, 0xB9BEBDBC,
+ 0xBDBABFC0, 0xB8B7B7BC, 0xB4B9B8B3, 0xB6B4B9B8,
+ 0xB7B8B1B7, 0xAFB7B7B2, 0xC0B9C1C1, 0xBFBEB8C0,
+ 0xBBC1C0B9, 0xBFB7BDBC, 0xBDBCBAC0, 0xB2B8B7B8,
+ 0xC0B7BCBD, 0xBDBDBABF, 0xB5BDBDB5, 0xC0B9C1C1,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BABFC0, 0xBFC0BABF,
+ 0xBBBFC0BB, 0xC2BABFC2, 0xBFC2BABF, 0xB8BDBEBA,
+ 0xBAB4B9B8, 0xBBBAB6BB, 0xB2BAB9B5, 0xB7B3BBBA,
+ 0xBCBBB2B8, 0xBABFBEB7, 0xBCB8BEBD, 0xBDBCB7BD,
+ 0xB7BDBCB7, 0xBEB7BDBC, 0xC0BFB9BF, 0xB8C0BFB8,
+ 0xBDB9BFBE, 0xC1C1B8BE, 0xB9C1C1B9, 0xBEBAC0BF,
+ 0xBBBAB9BF, 0xB9BFBEB5, 0xBDB8C0C0, 0xBDBEB5BD,
+ 0xB8BDBEB8, 0xBBB2BABA, 0xBBBBB3BB, 0xB3BBBBB3,
+ 0xBEB3BBBA, 0xBBBAB7BF, 0xB7BDBCB3, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xBAC1BEB8, 0xBCB7BDBC, 0xBFBEB7BD,
+ 0xB9BFBEB9, 0xBEB7BCBB, 0xBDBBBABF, 0xB8BFBCB8,
+ 0xB8B4BBB8, 0x3F3EB4BB, 0x0000003A, 0x00000000,
+ 0x00000000, 0x00000000, 0x03010101, 0x00080000,
+ 0x342B4000, 0x52382945, 0x30534431, 0x42315344,
+ 0x43372746, 0x2A423728, 0x0B001438, 0x0C06020E,
+ 0x263D0400, 0x31233F30, 0x4C342642, 0x2E4D3E30,
+ 0x3C2E4A3D, 0x3F352840, 0x010E362B, 0x08020D08,
+ 0x080A0808, 0xB8B70808, 0xB0B9B6B2, 0xBEBAC1BE,
+ 0xC0BFBAC1, 0xBBC0BFBB, 0xBCB9BEBC, 0xBFBCB8BF,
+ 0xB9C0BDB8, 0xBBB9C0BD, 0xC0BEB9C0, 0xBBC0BEBB,
+ 0xBEBABFBE, 0xBFBEB9BF, 0xB8BEBDB9, 0xBDB9C0BD,
+ 0xC0BFB9C0, 0xBABFBEBB, 0xBEB9BFBE, 0xBFBEB7BF,
+ 0xB7BFBEB7, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B6BEBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB8C0C0, 0xBDBEB6BE, 0xB9BEBFB8,
+ 0xC0B8C0C0, 0xC0C1B8C0, 0xBABFC0BB, 0xC0B7BCBF,
+ 0xBDC0B8BD, 0xB8BDC0B8, 0xC0B9BEC1, 0xBDC0B8BD,
+ 0xB8BDC0B8, 0xBCB6BBBC, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBCB5BDBC, 0xBDBDB5BD, 0xB5BDBDB5, 0xBDB5BDBD,
+ 0xBEBEB5BD, 0xB5BDBDB6, 0xBBB5BDBD, 0xBBBBB3BB,
+ 0xB3BBBBB3, 0xBDB5BDBD, 0xBDBDB5BD, 0xB5BDBDB5,
+ 0xBCB2BCBC, 0xBBBEB2BC, 0xAFB8BBB2, 0xBDB0B8B8,
+ 0xBBBEB5BD, 0xB5BDBDB4, 0xBEBAC0BF, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBDBCB9BF, 0xB6BCBBB7,
+ 0xBEB9BFBE, 0xBEBCB9BF, 0xBABFBDB9, 0xBBB8BDBC,
+ 0xBABBB7BC, 0xB8BDBCB5, 0xBDBABFBD, 0xBEBCBABF,
+ 0xBABFBDB9, 0xBDB9BFBE, 0xBEBCB8BE, 0xB6BBB9B9,
+ 0xBBB8BBB9, 0xBDBBBABD, 0xB6BBB9B8, 0xB7B6BCB7,
+ 0xBCBAB6BC, 0xB7BCBAB7, 0xBCB9BFBA, 0xBFBABBC1,
+ 0xB3B9B4B9, 0xADADB4AD, 0xB4ADADB4, 0xADB5ABAD,
+ 0xA9AEB5A8, 0xB0A5B1B5, 0xAAB0A5AA, 0xA8ACAFA6,
+ 0xB2A7AEB1, 0xAEB2A7AE, 0xA4ABB1A6, 0xB2A7A9AF,
+ 0xABB1A6AC, 0xA4ABAFA4, 0xADA3A8AD, 0xA6AEA4A5,
+ 0xA5AFB2A9, 0xADA2AEAF, 0xA8ACA0A9, 0x9AA5A99D,
+ 0xA697A2A6, 0xA6AB9CA1, 0xA0A8ACA0, 0xA89CA8AC,
+ 0xA8ACA0A4, 0xA1A7AC9D, 0xABA2A9AD, 0x40423CA8,
+ 0x9120231A, 0x9C91989C, 0x999D9198, 0x90999D91,
+ 0x9C90989C, 0x989C9098, 0x8A92968A, 0x978B9296,
+ 0x989C9093, 0x8B95998D, 0x95899397, 0x8F938891,
+ 0x9097988E, 0x948A9899, 0x8E8F8595, 0x89899089,
+ 0x8E898890, 0x666C6788, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00010200, 0x7C710205, 0x767C7176, 0x72767C71,
+ 0x7A74767B, 0x40453C76, 0xA0A5AAA1, 0xA499A5AB,
+ 0x9DA3989E, 0x9AA0A499, 0xA299A0A3, 0x9EA1989F,
+ 0x9AA0A39A, 0xA59CA0A3, 0xA3A89FA0, 0x9EA6ABA2,
+ 0xA097A2A7, 0xA2A79E9B, 0x5C757A71, 0x655F6065,
+ 0x62645E63, 0x1D1F201C, 0x211D2021, 0x20211F20,
+ 0x06040606, 0x07050406, 0x05060404, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x02000001,
+ 0x00010000, 0x07080907, 0x08070A08, 0x0809070A,
+ 0x00000100, 0x01000002, 0x00020000, 0x00000100,
+ 0x01000001, 0x00010000, 0x191A1B19, 0x1B191A1B,
+ 0x171A1818, 0x73232624, 0x74727275, 0x70737171,
+ 0x99818782, 0xA09998A0, 0x99A09999, 0x9EA0A49E,
+ 0xA097A0A4, 0x9A9F969B, 0x989A9E98, 0xA09A9A9E,
+ 0xA0A39A9E, 0x969AA298, 0xA19698A0, 0xA6ACA199,
+ 0x3B7A7F76, 0x7F763F44, 0x7C7F767A, 0x7275786F,
+ 0x28247678, 0x03020029, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x4A4B4700, 0x868F948B, 0x8F848B91,
+ 0x8A908589, 0x8E8F948B, 0x988D9297, 0x969C9192,
+ 0x91989F92, 0x9E8F979E, 0x979E8F97, 0x969EA598,
+ 0x9F939EA2, 0x9EA2969B, 0x919CA094, 0x9C90999D,
+ 0x999E8F98, 0x909C9F90, 0x9D8F9C9F, 0x9D9D8F9D,
+ 0x939C9E92, 0xA0919D9F, 0x999D919B, 0x96989C91,
+ 0xA79C9DA1, 0xA9ADA2A3, 0xB9B6BCB1, 0xBBB0BEC4,
+ 0xACB2A7B5, 0xA9ADB2A9, 0xB3A8ADB2, 0xADB3A8AD,
+ 0xA9ADB3A8, 0xB4AAACB4, 0xA9B0A9AC, 0xAFB0B4AE,
+ 0xA8A3B0B4, 0xB1B5B0A4, 0xB0AFB5B0, 0xB5B0AFB5,
+ 0xAFB5B0AF, 0xB6BEC4BF, 0xB8B1B5BB, 0xB1B8B1B1,
+ 0xB4B3B7B2, 0xBCB7B5B9, 0xB8BCB7B8, 0xBBBABDBB,
+ 0xBDBBBABD, 0xBABDBBBA, 0xB7B8BCB7, 0xC0BBB8BC,
+ 0xBCC0BBBC, 0xBDBBC0BE, 0xBFBEBABF, 0xBBC0BFBA,
+ 0xBDBABFC0, 0xB9B8B7BC, 0xB8BDBCB4, 0xB7B2B7B6,
+ 0xB9B8B3B8, 0xB3B9B8B4, 0xBEB7BDBC, 0xBFBFB9BF,
+ 0xB8C0C0B7, 0xC0B6BEBE, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC1B7BCBD, 0xC1C1B9C1, 0xB8C0C0B9, 0xBFB8C0C0,
+ 0xC0C1B7BF, 0xBABFC0BB, 0xC0BBBFC0, 0xBFC0BBBF,
+ 0xBBBFC0BB, 0xC0BBBFC0, 0xBFC0BBBF, 0xB9BEBFBA,
+ 0xBCB6BCBB, 0xBCBDB7BD, 0xB7BCBDB7, 0xBAB7BDBC,
+ 0xBCBAB5BB, 0xB7BEBBB7, 0xB9B6BDBA, 0xBCBAB5BC,
+ 0xB8BDBBB7, 0xBEB9BFBE, 0xBEBFB9BF, 0xBABFC0B9,
+ 0xBEB9BFBE, 0xC0C0B9BF, 0xB8C0C0B8, 0xBEBAC0BF,
+ 0xBBBAB9BF, 0xBAC0BFB5, 0xBFB9BFBE, 0xBEBDBAC0,
+ 0xB6BCBBB9, 0xBBB3BBBB, 0xBABDB3BB, 0xB6BDC0B3,
+ 0xBCB2BCBC, 0xB9B9B2BC, 0xB4BCBCAF, 0xBEB8C0C0,
+ 0xBFBEB7BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBBB7BEBB, 0xBDBBB7BE, 0xB7BCBAB8,
+ 0xB7B6BCB7, 0x3E3EB6BC, 0x0000003C, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00060000,
+ 0x0D061302, 0x43281B31, 0x28443728, 0x38294537,
+ 0x333A2D45, 0x000F281F, 0x08010E07, 0x0E06020D,
+ 0x00110602, 0x231A2F08, 0x3F30253F, 0x25412F23,
+ 0x30253F31, 0x10231B2C, 0x040F0A03, 0x09060F08,
+ 0x080A0808, 0xB8B70608, 0xB0B8B7B2, 0xBCBAC1BE,
+ 0xC0BFBAC1, 0xBBC0BFBB, 0xBCB8BFBC, 0xBEBBB8BF,
+ 0xB8BFBCB7, 0xBBB9C0BB, 0xC1BFBAC0, 0xBBC0BEBE,
+ 0xBFBAC0BF, 0xBEBDBAC0, 0xB8BEBDB8, 0xBDBAC1BE,
+ 0xC0BFB9C0, 0xBAC0BFBB, 0xBFB8C0BF, 0xC0BFB8C0,
+ 0xB7BFBEB8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B7BFBF, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B6BEBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB8C0C0, 0xBEBFB6BE, 0xBABFC0B9,
+ 0xC0B9C1C1, 0xBCBDB8C0, 0xB8BDBEB7, 0xC2B8BDC0,
+ 0xBFC2BABF, 0xBBC0C3BA, 0xC0B8BDC0, 0xBDC0B8BD,
+ 0xB8BDBEB8, 0xBDB7BDBC, 0xBEBDB8BE, 0xB7BDBCB8,
+ 0xBBB5BDBC, 0xBEBEB4BC, 0xB5BDBDB6, 0xBDB5BDBD,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xBBB6BEBE, 0xBBBBB3BB,
+ 0xB3BBBBB3, 0xBDB5BDBD, 0xBDBDB5BD, 0xB5BDBDB5,
+ 0xBCB2BCBC, 0xBBBEB0BC, 0xAFB8BBB2, 0xBDAFB7B7,
+ 0xBDC0B5BD, 0xB5BDBDB6, 0xBEB9BFBE, 0xC0BFB9BF,
+ 0xB9BFBEBA, 0xBFB9BFBE, 0xBEBDBAC0, 0xBAC0BFB8,
+ 0xBDB9BFBE, 0xBDBBB8BE, 0xB8BDBBB8, 0xBAB6BBBA,
+ 0xBDBEB6BB, 0xBAC0BFB8, 0xBDBABFBE, 0xBEBCBCBF,
+ 0xBABFBDB9, 0xBFB8BEBD, 0xBDBBBAC0, 0xB7BCBAB8,
+ 0xBBBDC0BE, 0xBBB9BABD, 0xB6BBB9B6, 0xB8B6BCB7,
+ 0xBCBAB7BD, 0xB7BDB8B7, 0xB7B7BDB8, 0xBFBAB6BC,
+ 0xBCC2BDB9, 0xACADB4AD, 0xB4ADACB3, 0xADB5ABAD,
+ 0xA7B0B4A8, 0xB0A3AFB3, 0xAEB4A9A9, 0xA9AEB3AA,
+ 0xB5AAADB2, 0xAFB3A8B1, 0xA3ABB2A5, 0xB1A5A9B0,
+ 0xADB1A5AD, 0xA7A9AEA5, 0xB1A7ABB0, 0xA7ACA3A9,
+ 0xA3AAADA4, 0xB3A8ACAD, 0xAAAEA3AF, 0xA2AAAEA2,
+ 0xAC9DAAAE, 0xA1A697A7, 0xA1A5A99D, 0xACA0A9AD,
+ 0xA8ACA0A8, 0xA1A8ACA0, 0x413BA8AC, 0x40423C3F,
+ 0x90989C91, 0x9C90989C, 0x989C9098, 0x91989C90,
+ 0x9A8E999D, 0x989C9096, 0x8B999D91, 0x998D9397,
+ 0x95998D95, 0x90979B8F, 0x978B989C, 0x90948893,
+ 0x8B92958C, 0x948A9394, 0x91958A93, 0x89899089,
+ 0x8F8A8890, 0x656B6689, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x49030500, 0x7C705054, 0x777E7178, 0x71757B70,
+ 0x7B72747C, 0x41463D76, 0xA7A5ABA0, 0xAB9FACB2,
+ 0xA0A499A7, 0x98A0A499, 0xA59F9EA1, 0xA2A59CA3,
+ 0x999FA299, 0xA4999EA4, 0x9CA2979E, 0x9A9BA196,
+ 0xA59A9FA5, 0x9FA59A9F, 0x9A9EA499, 0xA3989FA5,
+ 0xA0A39A9F, 0x9AA1A49B, 0xA29CA0A3, 0xA0A19DA0,
+ 0x699B9E9C, 0x6B69666B, 0x686C6768, 0x666A6C66,
+ 0x6C666A6C, 0x676B656A, 0x68666C67, 0x6A68656A,
+ 0x33363465, 0x37070804, 0x6E6A3C3B, 0x6B6C686F,
+ 0x65656B66, 0x6B66656C, 0x676B6565, 0x66696A66,
+ 0x6A66696A, 0x696A6669, 0x979A9B97, 0x9B999A9B,
+ 0x989C9798, 0x96989B99, 0x9C9A979B, 0x979D9899,
+ 0x999AA19A, 0xA19798A0, 0x99A29898, 0x969A9F96,
+ 0xA0959A9F, 0x9A9F969A, 0x999BA097, 0x9E989B9F,
+ 0x9DA19B9C, 0x99989F98, 0xA19798A0, 0xA0A89D99,
+ 0x58989C91, 0x80755F63, 0x7C80757C, 0x71787970,
+ 0x514B797A, 0x02010051, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x4A4B4700, 0x808F948B, 0x958A858B,
+ 0x8A90858F, 0x8B8B9087, 0x958A8F94, 0x93998E8F,
+ 0x90949B8E, 0x9E91969D, 0x989F9097, 0x959BA295,
+ 0xA0949BA2, 0x9DA1959C, 0x8F9DA195, 0x9D8E979B,
+ 0x9A9F9098, 0x909B9E8F, 0xA0919C9F, 0x9C9F909D,
+ 0x8F9C9F90, 0x9F8F9C9F, 0x9BA0919C, 0x969CA094,
+ 0xA2969DA1, 0xA1A89B9E, 0xB0A0A89D, 0xC4B9B3BB,
+ 0xB6BCB1BE, 0xA9ADB2A9, 0xB3A8ADB2, 0xADB3A8AD,
+ 0xA9ACB4A9, 0xB3ACAAB3, 0xAEB5AEAC, 0xA4B0B4AF,
+ 0x9E9CA5A9, 0xA4A7A59B, 0x9D9BA09E, 0xBFBA9CA2,
+ 0xB9BFBAB9, 0xB5BAC0BB, 0xB8B1B5BC, 0xB2B9B2B1,
+ 0xB2B3B7B2, 0xB7B2B3B7, 0xB8BCB7B3, 0xB9BABEB9,
+ 0xBCBCB8BB, 0xBCBEBEBA, 0xB8BABDBB, 0xC0BBB9BD,
+ 0xBAC0BBBC, 0xBCBBC0BE, 0xBFBEB9BE, 0xBAC0BFBA,
+ 0xBFB8C0C0, 0xBCBBB9BE, 0xB9BBBBB7, 0xB7B5BAB9,
+ 0xB8B7B3B8, 0xB6BBBAB3, 0xBEB9BFBE, 0xC0C0B9BF,
+ 0xB8C0C0B8, 0xC1B8C0C0, 0xC0C0B9C1, 0xB7BFBFB8,
+ 0xBDB5BDBD, 0xC0C0B5BD, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xB9BEBFBA, 0xC0BBBFC0, 0xBFC0BBBF,
+ 0xBBBFC0BB, 0xC0BBBFC0, 0xBFC0BBBF, 0xBABFC0BA,
+ 0xC0B8C0BF, 0xC0C0B9C1, 0xB9BEBFB8, 0xC0BBC1C0,
+ 0xBDBCBBC1, 0xB7BEBBB7, 0xBEB8C0BF, 0xBDBCBAC1,
+ 0xB5BAB9B8, 0xBEB8BDBC, 0xBEBFB9BF, 0xBABFC0B9,
+ 0xBFB9BFBE, 0xC0C0BAC0, 0xB8C0C0B8, 0xBDBAC0BF,
+ 0xBBBAB8BE, 0xBAC0BFB5, 0xBFBAC0BF, 0xBFBEBAC0,
+ 0xB7BDBCBA, 0xBBB5BABB, 0xBABDB3BB, 0xB3BABDB3,
+ 0xBAAFB8BB, 0xB7BAACB8, 0xB3BDBDAE, 0xBFB6BEBE,
+ 0xBFBEB7BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBDB6BDBA, 0xBDBBB9C0, 0xB8BDBBB8,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000100,
+ 0x00000001, 0x00000000, 0x0C010101, 0x161C0B0A,
+ 0x1C13201A, 0x40281C30, 0x28443628, 0x36274237,
+ 0x202A1E34, 0x121E170F, 0x15111C16, 0x28150E1B,
+ 0x0E1D221B, 0x150C2015, 0x43302440, 0x23433023,
+ 0x30253F30, 0x1B231C2B, 0x1C271410, 0x14101B20,
+ 0x08080808, 0xB7B80608, 0xB0B8B7B2, 0xBCBAC1BE,
+ 0xC0BFBAC1, 0xBBC0BFBB, 0xBCB8BFBC, 0xBFBAB8BF,
+ 0xB8BFBAB8, 0xBCBAC0BB, 0xC0BEBBC1, 0xBBC0BEBD,
+ 0xC0BAC0BF, 0xBEBFB8C0, 0xB8BEBDB9, 0xBDBAC1BE,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xC0B8C0BF, 0xC0C0B9C1,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B6BEBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB8C0C0, 0xC0C0B7BF, 0xB9C1C1B8,
+ 0xC2B5BCBF, 0xBEBFB8BF, 0xBABFC0B9, 0xC0B9BEC1,
+ 0xBDBEB8BD, 0xBABFC0B8, 0xC0B8BDC0, 0xBDC0B8BD,
+ 0xB8BDBEB8, 0xBBB7BDBC, 0xBCBBB7BE, 0xB6BCBBB7,
+ 0xBDB5BDBD, 0xBEBEB5BD, 0xB5BDBDB6, 0xBDB5BDBD,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xBCB5BDBD, 0xBCBCB4BC,
+ 0xB3BBBBB4, 0xBDB4BCBC, 0xBDBCB5BD, 0xB5BDBCB5,
+ 0xBCB2BCBC, 0xBBBDB2BC, 0xB0B9BCAF, 0xBDB3BBBB,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xBEB8BEBD, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEBABFBE, 0xBFBEBABF, 0xB8BEBDBA,
+ 0xBEB9BFBE, 0xBDBBB9BF, 0xB8BCB7B8, 0xBCB7BCBA,
+ 0xC0C0B7BD, 0xB4BCBBB8, 0xBDBABFBE, 0xBFBDBCBF,
+ 0xBABFBDBA, 0xBDB9C0BD, 0xBBBAB9C0, 0xB8BDBCB6,
+ 0xBCBABFBE, 0xC0BEB8BD, 0xB7BCBABB, 0xB7B5BBB6,
+ 0xBDB8B7BE, 0xB7BDB8B7, 0xB6B4BBB6, 0xBDB6B5BD,
+ 0xBAC1BAB6, 0xB9B9C0B9, 0xB3AEB9C0, 0xA2A9A2AD,
+ 0xA4B0B4A9, 0xB0A4ACB0, 0xB0B4A8AC, 0xA8ADB3A8,
+ 0xB2A9ADB3, 0xAEB4A9AD, 0xA5AEB2A6, 0xB4A8ADB1,
+ 0xADB1A5B0, 0xA7AAAFA6, 0xACA3ABB0, 0xA8ACA1A7,
+ 0xA5ABACA2, 0xAEA4AEAF, 0xAEAFA5AD, 0xA2AAAEA2,
+ 0xAA9EAAAE, 0xA6AA9EA6, 0x99A2A798, 0xA99DA3A8,
+ 0xA8ACA0A5, 0x3AA8ABA2, 0x665D4043, 0xA8ACA163,
+ 0x90989C90, 0x9C8F989C, 0x969D9095, 0x8C939A8B,
+ 0x9C8D949B, 0x949B8C95, 0x8B989C90, 0x998D9397,
+ 0x9B9D9197, 0x8B95998D, 0x998C9397, 0x8E958892,
+ 0x868F948B, 0x90858C8F, 0x8C90858C, 0x88899089,
+ 0x8F8A878F, 0x656B6689, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x01010100, 0x00000000, 0x00000000, 0x00010000,
+ 0x7051544B, 0x7D71787C, 0x777B6F79, 0x72767C71,
+ 0x7C71777D, 0x59615674, 0xA8A5AAA1, 0xABA0ACB1,
+ 0xA5ABA0A5, 0x999FA59A, 0xA49B9EA4, 0xA2A59CA1,
+ 0x9CA3A89F, 0xA39AA0A5, 0x9CA49A9E, 0x979AA298,
+ 0xA59B99A1, 0x9DA59B9D, 0x999EA499, 0xA4999EA4,
+ 0xA0A499A0, 0x98A0A499, 0xA4999FA3, 0x9EA39AA0,
+ 0x9A999F9A, 0x9F9A989F, 0x989F9899, 0x999EA39A,
+ 0xA499A0A4, 0x9EA39AA0, 0x9A98A099, 0xA09B989F,
+ 0x999F9A99, 0x9B9FA19B, 0x9F99A1A1, 0x9EA09A9F,
+ 0x9799A099, 0xA09998A1, 0x9BA09799, 0x9A9EA09A,
+ 0xA09AA0A0, 0xA0A09AA0, 0x969A9C96, 0x9C979A9C,
+ 0x999D9798, 0x97959B96, 0x9C97979E, 0x969D9698,
+ 0x9999A099, 0xA19998A0, 0x98A19796, 0x959DA299,
+ 0xA39A9CA0, 0x9DA2999E, 0x979EA198, 0x9D979DA0,
+ 0x9C9E989D, 0x999BA29B, 0xA19798A0, 0xA0A89D99,
+ 0x75989C91, 0x80757C80, 0x7B7F747C, 0x7078796F,
+ 0x78727879, 0x52514D78, 0x00020000, 0x00010200,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x4A4B4700, 0x8192958C, 0x8F84888C,
+ 0x90968B89, 0x8F8C948A, 0x978C9199, 0x92988D91,
+ 0x8F979B90, 0x9B8F979B, 0x999D9197, 0x93989C90,
+ 0xA2979B9F, 0x9DA1969E, 0x90A0A498, 0x9C90989C,
+ 0x9EA0949A, 0x919C9E92, 0x9F909B9D, 0x9A9F909A,
+ 0x909DA090, 0x9F8F9DA0, 0x9C9F909C, 0x969EA296,
+ 0xA1949DA1, 0xA2A99C9A, 0x9FA1A99F, 0xBBB0A1A9,
+ 0xBEC4B9B5, 0xA9B2BAB0, 0xB2A9ABB3, 0xABB3A9AD,
+ 0xAAABB4AA, 0xB3ACABB4, 0xB0B4AEAC, 0xA3B1B5AF,
+ 0x9E99A5A9, 0x9B9F9A9A, 0xAF9DA39E, 0xBFBAAEB4,
+ 0xB9C1BAB8, 0xB0BAC2BB, 0xB8B1AFB7, 0xB1B8B1B0,
+ 0xB2B3B7B2, 0xB9B3B3B7, 0xB5B9B3B5, 0xB9BBBFB9,
+ 0xBFBDBABE, 0xBEBEBEBE, 0xBBBCBEBE, 0xBDBBBABD,
+ 0xBBC0BEB8, 0xBDBABFBD, 0xC0BFB9C0, 0xB8C0BFBA,
+ 0xC0B8C0C0, 0xBCBBB8C0, 0xB8BABAB7, 0xB9B4B8B9,
+ 0xB8B8B4B8, 0xB8BABAB6, 0xBEBBBFC0, 0xBEC1B8BD,
+ 0xB9C0C3B7, 0xBFB8C0C0, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xBBB3BBBB, 0xBDBEB3BB, 0xB5BABBB8, 0xC0B5BDBD,
+ 0xC0C0B8C0, 0xB9BEBFB8, 0xC0BBBFC0, 0xBFC0BBBF,
+ 0xBBBFC0BB, 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BB,
+ 0xC0B5BDBC, 0xC0C0B9C1, 0xB5BDBDB8, 0xC1B8C0C0,
+ 0xBCBDBBC0, 0xB7BDBCB7, 0xBFB8C0C0, 0xBEBFB8C0,
+ 0xB8BDBCB9, 0xBCB8BDBC, 0xBEBDB7BD, 0xB9C1C0B8,
+ 0xBFB9BFBE, 0xBFC0BAC0, 0xBABFC0BA, 0xBCBAC0BF,
+ 0xBBBAB7BD, 0xBAC0BFB5, 0xBDBCC1C0, 0xBFBEB9BE,
+ 0xB5BBBABA, 0xBBB4B9BA, 0xBBBEB3BB, 0xB3BABDB6,
+ 0xBEAEB7BA, 0xBDBDB0BC, 0xB7C1C1B3, 0xBEB7BFBF,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xBEBBC0BF, 0xC0BDBABF,
+ 0xB9C0BDB9, 0xBBB9BFBE, 0xBDBCB6BC, 0xB9BEBDB7,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000100,
+ 0x00000001, 0x00000002, 0x10000001, 0x202B0C0A,
+ 0x1D112328, 0x52281A32, 0x34554536, 0x47355447,
+ 0x203A2D45, 0x101F170F, 0x26222E15, 0x2B150E1D,
+ 0x1A2B241A, 0x24172F24, 0x69423254, 0x41685542,
+ 0x43325354, 0x1D25192F, 0x1B2C150E, 0x221A2B23,
+ 0x08080808, 0xB8B80608, 0xB0B8B7B0, 0xBEBAC1BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBCB9BEBC, 0xBFBAB9BE,
+ 0xB8BEB9B9, 0xBBBAC0BB, 0xBFBDBAC0, 0xBDC0BEBC,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBDB8BFBC,
+ 0xC1C0B9C0, 0xBAC0BFBB, 0xBEB6BEBD, 0xBFBFB7BF,
+ 0xB8C0C0B7, 0xC1B8C0C0, 0xBFC0B9C1, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B7BFBF,
+ 0xC0C1B8C0, 0xB8C0C0BB, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B9C1C1, 0xC0C0B8C0, 0xB6BEBEB8,
+ 0xC0B8BFC2, 0xBCBDB6BD, 0xBABFC0B7, 0xC1B8BDC0,
+ 0xC0C1B9BE, 0xBABFC0BB, 0xC0BABFC2, 0xBDC0B8BD,
+ 0xB8BDBEB8, 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BCBDB7,
+ 0xBDB7BCBD, 0xBDBDB5BD, 0xB5BDBDB5, 0xBDB5BDBD,
+ 0xBEBEB5BD, 0xB4BCBCB6, 0xBEB5BDBD, 0xBDBDB6BE,
+ 0xB3BBBBB5, 0xBDB3BBBB, 0xBDBCB5BD, 0xB5BDBCB5,
+ 0xBCB2BCBC, 0xBBBEB2BC, 0xAAB3B6B2, 0xBDB3BBBB,
+ 0xBBBBB5BD, 0xB3BBBBB3, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEBABFBE, 0xC0BFBABF, 0xB9BFBEBB,
+ 0xBDB9BFBE, 0xBBB9B9C0, 0xB6BBB9B6, 0xBBB8BDBB,
+ 0xC0BFB7BE, 0xB9C1C0B8, 0xBDBABFBE, 0xBFBDBCBF,
+ 0xB9BEBCBA, 0xB9B9C0BD, 0xBDBCB5BC, 0xBABFBEB8,
+ 0xBDBABFBE, 0xBDBBB9BE, 0xB6BBB9B8, 0xB8B9BFBA,
+ 0xBDB8B7BD, 0xB7BDB8B7, 0xB6B9BFBA, 0xBEB7B6BD,
+ 0xB8BFB8B7, 0xB9B9C0B9, 0xA7A2B9C0, 0x979B95A1,
+ 0xA5A0A59C, 0xB5AAACB0, 0xB0B4A9B1, 0xA9AEB4A9,
+ 0xB3A8AEB4, 0xADB3A8AD, 0xA5ADB1A6, 0xB4A8ADB1,
+ 0xABB2A5B0, 0xA4A9AFA4, 0xADA2A9AF, 0xABAFA3A9,
+ 0xA3ACAEA2, 0xAFA5ADAF, 0xAEB0A4AE, 0x9EAAAEA2,
+ 0xA599A6AA, 0xA6AA9EA1, 0x9CA8ACA0, 0xACA1A4A8,
+ 0xA0A499A8, 0x5D63665D, 0xADA26366, 0xA8ACA0A9,
+ 0x8D989C90, 0x9D90979C, 0x969D9096, 0x8C969D8E,
+ 0x9B8C949B, 0x949B8C94, 0x8F989C90, 0x998D979B,
+ 0x97998D97, 0x8D989C90, 0x95889599, 0x8E95888E,
+ 0x8A8A9085, 0x958A8F95, 0x8A908591, 0x7B899187,
+ 0x90897D85, 0x676B6689, 0x00000100, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x23242000,
+ 0x70787B72, 0x7C71787C, 0x787C7178, 0x71787C71,
+ 0x7D70767C, 0x8E968B76, 0xA8B3B8AF, 0xABA0ACB1,
+ 0xA5ABA0A5, 0x9EA4AA9F, 0xA59CA3A9, 0x9EA39AA0,
+ 0x9FA0A59C, 0xA59CA3A8, 0x9EA69CA0, 0x9BA0A89E,
+ 0xA2989DA5, 0x9CA49A9A, 0x999BA399, 0xA4999EA4,
+ 0x9EA4999E, 0x9A9EA499, 0xA4999FA5, 0x9EA4999E,
+ 0x9999A099, 0xA09998A0, 0x99A19798, 0x989EA499,
+ 0xA499A0A4, 0x9EA499A0, 0x9A98A197, 0x9E9997A2,
+ 0x99A09997, 0x989EA198, 0xA198A0A1, 0x9EA198A0,
+ 0x9798A197, 0xA19798A1, 0x99A19798, 0x989EA198,
+ 0xA198A0A1, 0xA0A09AA0, 0x969A9C96, 0x9C969A9C,
+ 0x989C9698, 0x97989C96, 0x9C96979E, 0x999D9798,
+ 0x9999A099, 0xA09998A0, 0x98A19798, 0x959A9F96,
+ 0x9E959AA0, 0x9BA09799, 0x969DA299, 0xA09A9A9F,
+ 0x9CA09A9E, 0x9D99A099, 0xA59B9DA4, 0x9DA59B9D,
+ 0x75969C91, 0x80757C80, 0x7C80757C, 0x70767A6F,
+ 0x79707679, 0x77777176, 0x0023221E, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x4A4B4700, 0x818B8E85, 0x9085888C,
+ 0x8A90858C, 0x8D8F948B, 0x998E8F97, 0x969C9193,
+ 0x909A9E93, 0x9B8F979B, 0x9A9E9297, 0x939A9E92,
+ 0x9E939B9F, 0x9CA0959A, 0x939DA195, 0x9D919B9F,
+ 0x9A9C909B, 0x909B9D91, 0x9E8F9C9F, 0x9C9F909B,
+ 0x939EA191, 0xA091A0A3, 0x9A9D8E9D, 0x969A9C90,
+ 0xA2939EA2, 0x9BA2959D, 0x9EA1A99F, 0xA89FA0A8,
+ 0xB5BBB0A3, 0xB0BBC0B7, 0xB2A9B4B9, 0xA4ACA2AD,
+ 0xA7A8B1A7, 0xB0A7A8B1, 0xABAFA9AB, 0x8E90948E,
+ 0xA9A49094, 0xB0B4AFA5, 0xBBB1B5B0, 0xC0B9BAC0,
+ 0xB8C0B9B8, 0xB1B9C1BA, 0xB8AEB0B8, 0xB1B8B1AF,
+ 0xB1B3B7B2, 0xB9B4B2B6, 0xB5B9B4B5, 0xB7B8BCB7,
+ 0xBFBDB8BC, 0xBCBEBEBC, 0xBEBBC0BF, 0xBDBCBABF,
+ 0xBABFBDB8, 0xBDBBC0BE, 0xBFBEB9C0, 0xB8C0BFB9,
+ 0xC0B8C0C0, 0xBCBBB8C0, 0xB4B9B8B7, 0xB9B4B8B9,
+ 0xB7B7B4B8, 0xB6BBBAB5, 0xBEBABFC0, 0xBEC1B6BE,
+ 0xB8BFC2B7, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBBB5BDBD, 0xBFC0B5BA, 0xBABFC0BA, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B9BEBF, 0xBFC0BBBF,
+ 0xBBBFC0BB, 0xC1BABFC0, 0xBFC0BBC0, 0xBABFC0BA,
+ 0xBEB8C0BF, 0xC0C0B7BF, 0xB8C0C0B8, 0xC0BABFC0,
+ 0xBFC0BABF, 0xB7BCBDBA, 0xBFBABFC0, 0xC0C0B7BF,
+ 0xBABFC0B8, 0xBCB7BDBC, 0xBFBEB7BD, 0xB7BFBEB9,
+ 0xBCB9BFBE, 0xBCBDB7BD, 0xBABFC0B7, 0xBCBAC0BF,
+ 0xBDBCB7BD, 0xBAC0BFB7, 0xBEBABFBE, 0xBFBEBABF,
+ 0xB5BBBABA, 0xBBB7BDBC, 0xBABBB3BB, 0xB5BCBFB5,
+ 0xBEABB4B7, 0xC0C0B0BC, 0xB8C0C0B6, 0xBEBAC0BF,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xBFBBC0BF, 0xBFBEBAC0,
+ 0xB9C0BDB9, 0xBFB9BFBE, 0xBEBFBAC0, 0xB9BFBEB9,
+ 0xB7B8BBB9, 0x3F3DB8BC, 0x0000003E, 0x00000100,
+ 0x00000001, 0x00000002, 0x10000001, 0x1E2B0C0A,
+ 0x1C102427, 0x54281934, 0x41674535, 0x56426558,
+ 0x343A2D47, 0x0F20281F, 0x28203117, 0x3B170D1E,
+ 0x192D3227, 0x25163125, 0x7B544168, 0x4E7C654E,
+ 0x56416868, 0x2F32253F, 0x273B241B, 0x251A2E32,
+ 0x08080808, 0xB7B80608, 0xB0B8B7B2, 0xBDB9C0BD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBABBBEBC, 0xBFBABBBF,
+ 0xB9BFBABB, 0xBBBAC0BB, 0xC0BBBAC0, 0xBDC1BCBC,
+ 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB, 0xBDB9C0BD,
+ 0xC0BFB9C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC1B8BFC2, 0xBEBFB7BE, 0xBABFC0B9,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BABFC0,
+ 0xBFC0BABF, 0xBABFC0BB, 0xBEB8C0C0, 0xC0C0B6BE,
+ 0xB8C0C0B8, 0xC1B8C0C0, 0xC0C0B9C1, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0, 0xBEBEB7BF,
+ 0xB6BEBEB6, 0xBEB6BEBE, 0xBFBFB6BE, 0xB8BDBEB7,
+ 0xBCB7BCBD, 0xBDBCB7BD, 0xB7BDBCB7, 0xBDB5BDBD,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xBDB5BDBD, 0xBDBDB5BD,
+ 0xB4BCBCB5, 0xBBB6BEBE, 0xBBBBB3BB, 0xB5BDBDB3,
+ 0xBCB1BBBB, 0xBDBDB2BC, 0xB2BABAB3, 0xBDB3BBBB,
+ 0xBEBEB5BD, 0xB5BDBDB6, 0xBCB7BDBC, 0xBEBBB8BD,
+ 0xB7BEBBB7, 0xBFBABFBE, 0xBFBEBBC0, 0xB9BFBEB9,
+ 0xBBB9C0BD, 0xBCBBB7BE, 0xBABFBEB7, 0xBDBABFBD,
+ 0xC0BDBABF, 0xB9BFBEB9, 0xBDBABFBE, 0xBFBDBABF,
+ 0xBAC0BBBA, 0xB9B6BDBA, 0xBFBDB5BC, 0xBABFBDBA,
+ 0xBBB7BEBB, 0xBCBBB7BE, 0xB8BDBBB7, 0xBBBABDBB,
+ 0xBDBBBABD, 0xB8BEB9B8, 0xB7B9BDB8, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xB7B8BCB7, 0xB2ACB8BC, 0x9EA29CAE,
+ 0xAAA6ABA2, 0xB2A9AEB3, 0xADB3A8AD, 0xA8AEB4A9,
+ 0xB3A7AEB5, 0xB0B4A9AF, 0xA8ACB2A7, 0xB3A8ADB3,
+ 0xACB3A6AD, 0xA6AAB1A4, 0xB3A6ACB3, 0xAAB1A4AC,
+ 0xA0ABAFA3, 0xAFA3A8AC, 0xADAFA3AD, 0xA0ABAFA3,
+ 0xADA0A8AC, 0xACB0A5A6, 0x9FA6AA9F, 0xA9A0A8A9,
+ 0x595C53A8, 0x9C8E9287, 0x9F93A1A7, 0x95998D9B,
+ 0x90989C90, 0x9D8E989C, 0x989D8E98, 0x9095998D,
+ 0x9C90989C, 0x94988C98, 0x9095998D, 0x998D989C,
+ 0x95998D95, 0x8F93978C, 0x998D969A, 0x93978B95,
+ 0x838E9286, 0x92858B8F, 0x8A91848B, 0x80898D81,
+ 0x8C81888C, 0x666A6486, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x28240001, 0x78787229,
+ 0x737A7D74, 0x7D747A7E, 0x7A7E737A, 0x6F787C71,
+ 0x7C71757C, 0x8B918676, 0xA7B1B9AE, 0xABA0ACB2,
+ 0xA0A499A5, 0x9EA5A99E, 0xA8A2A2A7, 0xA2A6A0A4,
+ 0x9C9EA499, 0xAAA1A3A7, 0xA2A79EA7, 0xA1A1A8A1,
+ 0xA49AA0A8, 0x9AA2989C, 0x9C9EA69C, 0xA69C9EA6,
+ 0x9EA69C9E, 0x979CA49A, 0xA69C99A1, 0x9EA69C9E,
+ 0x969DA59B, 0x9C9298A0, 0x9EA39A94, 0x949C9F96,
+ 0xA1989B9F, 0x9EA39A9C, 0x9C9CA49D, 0xA0999BA3,
+ 0x99A09998, 0x999DA299, 0x9F969FA2, 0x999E959C,
+ 0x9999A099, 0xA09998A0, 0x949B9498, 0x96989B92,
+ 0x9F969E9F, 0x9DA0979C, 0x989C9F96, 0x9F969EA1,
+ 0x989D949C, 0x92989D94, 0x9F99969B, 0x9B9F999B,
+ 0x999DA299, 0xA49A9BA3, 0x9BA3999C, 0x96979F95,
+ 0xA59A98A0, 0x9DA59B9D, 0x9C9CA49A, 0xA39C9CA3,
+ 0x9EA59E9B, 0x979DA59B, 0xA19799A1, 0x9DA59B99,
+ 0x7A99A197, 0x7A6F7F85, 0x767A6F76, 0x6F72776E,
+ 0x72697179, 0x75786F6D, 0x004F514B, 0x03000103,
+ 0x02030102, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x02000002, 0x00000000,
+ 0x01000000, 0x46474300, 0x83909188, 0x91888B8C,
+ 0x90918890, 0x8C8F948B, 0x998F9095, 0x92978E91,
+ 0x8894988D, 0x978D8F93, 0x9B9C9296, 0x959D9F93,
+ 0xA2969FA1, 0x9B9F939E, 0x9399A093, 0x9C9099A0,
+ 0x9B9F9398, 0x909B9E8F, 0x9E909C9F, 0x9F9F919E,
+ 0x919FA293, 0xA2939DA0, 0x9BA0919D, 0x939FA195,
+ 0xA0919B9F, 0x9B9F939B, 0x9E9BA196, 0xA79EA2A7,
+ 0xA7ACA3A2, 0xB4B2B7AE, 0xB6B0B8BD, 0xACB1A8B2,
+ 0xA9ACB4A9, 0xB4A9AEB4, 0xB0B3AAAE, 0xA0989D94,
+ 0xC0B9A4A9, 0xB9C0B9B9, 0xB7BCBEB8, 0xBEB8BBBD,
+ 0xB8BFB8BA, 0xB3B5BDB6, 0xB9B2B2BA, 0xB3BAB3B2,
+ 0xB7B7BBB6, 0xB6B6B6B9, 0xB6B8B8B4, 0xB6AFB4B2,
+ 0xBCBBB3B8, 0xBBC0BFB7, 0xBEB9BEBF, 0xBDBCB9BF,
+ 0xBABFBEB8, 0xBEBBC0BE, 0xC0BEBBC0, 0xBAC0BFBB,
+ 0xC1B8C0C0, 0xBCBDB9C1, 0xB4B8B9B8, 0xBBB5BABB,
+ 0xB7B8B5BA, 0xB5BABBB2, 0xC0B8C0BF, 0xBDBDB9C1,
+ 0xB8C0C0B5, 0xC1B8C0C0, 0xC0C0B9C1, 0xB9BEBFB8,
+ 0xC0BABFC0, 0xBEBDBBBF, 0xBBC0BFB9, 0xC0BABFC0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC2BABFC2, 0xBFC0BABF,
+ 0xBABFC0BB, 0xBFB8C0C0, 0xBEBEB7BF, 0xB7BFBFB6,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xBBC0C1BA, 0xC0BBBFC0,
+ 0xBFC0BBBF, 0xBABFC0BB, 0xBEB9BFBE, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xBBB9BFBE, 0xBEBFB6BC, 0xB9BEBFB9,
+ 0xBFB8C0BF, 0xBFBEB8C0, 0xB7BDBCB9, 0xBAB5BDBD,
+ 0xBDBCB2BA, 0xB8C0BFB5, 0xBEB9BFBE, 0xC0BFB9BF,
+ 0xB7BDBCBA, 0xB9B5BCB9, 0xBCBBB5BC, 0xB2BCBCB4,
+ 0xBFA8B4B6, 0xC0C0B1BD, 0xB3BBBBB6, 0xBDB9BFBE,
+ 0xBEBDB9C0, 0xB9BFBEB8, 0xBEB9BEBF, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xB7B8BBB9, 0x3F3DB8BC, 0x0001003E, 0x00000100,
+ 0x00000001, 0x00000000, 0x14000001, 0x2532120E,
+ 0x22162A2E, 0x6330213C, 0x3F695342, 0x553F6957,
+ 0x34433253, 0x1B31271A, 0x281D3127, 0x411C1125,
+ 0x192F372B, 0x2E1E3D26, 0x895A436F, 0x568B7057,
+ 0x59426E72, 0x31342443, 0x273D271B, 0x2D213733,
+ 0x08080808, 0xB7B80608, 0xB0B8B7B2, 0xBDBABFBE,
+ 0xBFBDBABF, 0xBBC0BEBA, 0xBABBBFBA, 0xBFBABDBE,
+ 0xBBBFBABB, 0xBBBAC0BB, 0xC1BCBAC0, 0xBEC2BDBD,
+ 0xBCBBC1BC, 0xC0BEBBC1, 0xBBC0BEBB, 0xBDB9C0BD,
+ 0xC0C0B9C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8BFC2, 0xBFC0B8C0, 0xB9BEBFBA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BABFC0,
+ 0xBFC0BBBF, 0xBABFC0BB, 0xBEB8C0C0, 0xC0C0B6BE,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB8C0C0,
+ 0xBEBEB4BE, 0xB8C0C0B6, 0xC0B6BEBE, 0xBFBFB8C0,
+ 0xB6BEBEB7, 0xC3B8BFC2, 0xBCBFB9C0, 0xB6BDC0B5,
+ 0xBCB7BCBD, 0xBDBCB7BD, 0xB7BDBCB7, 0xBDB5BDBD,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xBEB4BCBC, 0xBDBDB6BE,
+ 0xB6BEBEB5, 0xBDB5BDBD, 0xBCBCB5BD, 0xB4BCBCB4,
+ 0xBCB1BBBB, 0xBEBEB2BC, 0xB5BDBDB6, 0xBDB5BDBD,
+ 0xBEBEB5BD, 0xB5BDBDB6, 0xBBB6BCBB, 0xBDBCB6BC,
+ 0xB7BDBCB7, 0xBEBABFBE, 0xBFBEBABF, 0xBABFBDBA,
+ 0xBCB7BCBA, 0xBEBDB8BD, 0xB9BFBEB8, 0xBDBABFBE,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDBABFBE, 0xBFBDBABF,
+ 0xB5BCB7BA, 0xBEB3BAB7, 0xC0BDBAC1, 0xBABFBDB9,
+ 0xB9B9C0BD, 0xBBBAB5BC, 0xBABFBDB6, 0xBBB9BCBA,
+ 0xBDBBBABD, 0xB8BBB9BA, 0xB7B8BCB7, 0xBBB6BABB,
+ 0xB8BCB7B7, 0xB7B8BCB7, 0xBDB7B8BC, 0xB8BCB6B9,
+ 0xB7B9C0B9, 0xB2A9B9C1, 0xADB2A9AD, 0xA8ADB3A8,
+ 0xB4A8AEB5, 0xAEB5A8B0, 0xA8ACB2A7, 0xB2A7ADB3,
+ 0xACB5A8AA, 0xA4ABB2A3, 0xB3A4ACB3, 0xACB3A4AC,
+ 0xA5B0B4A8, 0xACA0ADB1, 0xA9AB9FAA, 0x9FA8AD9E,
+ 0xABA0A9AE, 0xB0B4A9A7, 0xA0A8A9A0, 0x8F89A8A9,
+ 0x8F90878F, 0x94A1A79C, 0xA0949AA1, 0x9CA0949C,
+ 0x959DA195, 0xA2939DA1, 0x999E8F9D, 0x8B93978B,
+ 0x9B8F9397, 0x989C9097, 0x8B95998D, 0x988C9397,
+ 0x989C9094, 0x8C95998E, 0x968A9397, 0x93978B92,
+ 0x86909488, 0x91848E92, 0x8990838A, 0x7F888D7E,
+ 0x8D80898E, 0x666B6286, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000100, 0x514B0001, 0x78797051,
+ 0x6F767970, 0x7D747578, 0x777C7378, 0x77777B70,
+ 0x7C717F83, 0x848A7F76, 0xA7ACB2A7, 0xB2A7ACB2,
+ 0xA0A499AC, 0x9F9FA398, 0xA9A3A3A8, 0xA5A9A3A5,
+ 0x99A2A89D, 0xA79CA0A4, 0xA2A79EA3, 0x9EA1A8A1,
+ 0xA99F9DA5, 0x9EA69CA1, 0x9E98A099, 0xA9A29DA5,
+ 0x9DA59EA1, 0x9EA0A8A1, 0xA39C9DA5, 0x9EA79D9B,
+ 0x9B9DA59B, 0x9F969DA5, 0x9FA49B9A, 0x99A1A49B,
+ 0x9E959FA2, 0x9DA29999, 0x9B9EA59E, 0xA29B9AA2,
+ 0x99A0999A, 0x999B9F99, 0xA2999DA2, 0x9BA0979F,
+ 0x9599A099, 0xA099949C, 0x98A09998, 0x969A9F96,
+ 0x9F969C9F, 0x9C9F969C, 0x989EA198, 0xA1989EA1,
+ 0x9CA1989E, 0x949CA198, 0x9B94969E, 0x949B9494,
+ 0x979A9F96, 0x9E959BA0, 0x9DA29999, 0x9A9EA69C,
+ 0xA59A9CA4, 0x9EA69C9D, 0x999BA39C, 0xA19A98A0,
+ 0x98A09999, 0x9B9DA59B, 0xA59B9FA4, 0xA4ACA29D,
+ 0x7C99A197, 0x7A6F8085, 0x76797076, 0x6D717871,
+ 0x766D6C74, 0x71766D71, 0x2575786F, 0x0300292B,
+ 0x01020002, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000002, 0x00000000,
+ 0x01000001, 0x46484200, 0x83909188, 0x8A828B8C,
+ 0x8A8B828C, 0x888D9087, 0x958C8C91, 0x93988F90,
+ 0x9393978C, 0xA1979A9E, 0xA0A197A0, 0x949D9E94,
+ 0x9F939EA0, 0x9CA0949B, 0x959BA295, 0x9C909BA2,
+ 0x979B8F98, 0x919B9E8F, 0x9E909DA0, 0x9F9F939E,
+ 0x909FA195, 0xA295989C, 0x9AA1949B, 0x959EA094,
+ 0xA0949FA1, 0x9DA1959C, 0x9D9EA297, 0xACA3A4A8,
+ 0xA8ADA4A7, 0xAEAEB1A8, 0xBCB3B4B7, 0xB8BDB4B7,
+ 0xAAB6BCB1, 0xBCB3AFB5, 0xB6BBB2B9, 0xB9BBC0B7,
+ 0xC0B9B9C0, 0xB9C0B9B8, 0xB9BABEB8, 0xBDB7BDBF,
+ 0xB8BFB8B9, 0xB3B6BDB6, 0xBAB3B2BA, 0xB3B9B4B3,
+ 0xB8B6B9B7, 0xB5B6B6B8, 0xB1B6B5B3, 0xB6B2B7B6,
+ 0xB8B7B3B8, 0xBAC0BFB3, 0xBEB8C0C0, 0xBFBEB7BF,
+ 0xB8BDBCBA, 0xBEBCC1BF, 0xC0BEBBC0, 0xBAC1BEBB,
+ 0xC0BAC0BF, 0xBCBDB8C0, 0xB6BBBCB7, 0xBAB3BBBB,
+ 0xBBBBB2BA, 0xB5BDBDB3, 0xBFB7BFBE, 0xBEBFB8C0,
+ 0xB9BEBFB9, 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xBFBCC0C1, 0xBFBFBABE, 0xBABFBEBD, 0xC0B9BEBF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC3BABFC2, 0xBFC0BBC0,
+ 0xBABFC0BB, 0xBFB8C0C0, 0xC0C0B5BF, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFC0BABF, 0xBBBFC0BA, 0xC0BBBFC0,
+ 0xBFC0BBBF, 0xBBBFC0BB, 0xBEB9BFBE, 0xC0C0B9BF,
+ 0xB8C0C0B8, 0xBFBAC0BF, 0xBFC0BAC0, 0xBABFC0BA,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xB8BEBDBA, 0xBBB5BDBD,
+ 0xBDBCB3BB, 0xB8C0BFB5, 0xBFB9BFBE, 0xC0BFBAC0,
+ 0xB9BFBEBA, 0xBBB6BDBA, 0xBDBAB7BE, 0xB4BCBBB6,
+ 0xBEB0BCBC, 0xC0C0B0BC, 0xB9C1C1B6, 0xBDB9BFBE,
+ 0xC0BFB9C0, 0xBAC0BFBA, 0xBFB7BFBF, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9C0BDB9,
+ 0xB7B8BBB9, 0x3F3DB8BC, 0x0001003E, 0x00000100,
+ 0x00000001, 0x00000000, 0x12000001, 0x2633100C,
+ 0x2115292F, 0x6430213C, 0x4F7B5342, 0x67507C68,
+ 0x35523E61, 0x1A322819, 0x271B3128, 0x421D1127,
+ 0x2139352B, 0x301F402F, 0x8C654E7B, 0x5F977056,
+ 0x664E7E7C, 0x383B2A4B, 0x2C442D20, 0x2D203839,
+ 0x08080808, 0xB7B80608, 0xB0B8B7B2, 0xBDBABFBE,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBDBABFBD, 0xBFBDBABF, 0xBDC0BEBC,
+ 0xBEBABFBD, 0xC0BFBBC0, 0xBBC0BFBB, 0xBDB9C0BD,
+ 0xC0C0B9C0, 0xB8C0C0B8, 0xC1B8C0C0, 0xC1C1B9C1,
+ 0xB8C0C0B9, 0xC0B8C0C0, 0xBFC0B8C0, 0xB9BFBEBA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BABFC0,
+ 0xBFC0BABF, 0xBABFC0BA, 0xBDB8C0C0, 0xC0C0B5BD,
+ 0xB8C0C0B8, 0xBEB8C0C0, 0xBFBFB6BE, 0xB8C0C0B7,
+ 0xBFB8C0C0, 0xBFC0B7BF, 0xB8C0C0BA, 0xC0B8C0C0,
+ 0xBFC2B8C0, 0xB8BDC0BA, 0xC3B8BDC0, 0xBCBFBBC0,
+ 0xB8BDC0B7, 0xC1B8BCC1, 0xBCC1B8BC, 0xB8BDC0B8,
+ 0xBCB7BCBD, 0xBDBCB7BD, 0xB8BEBDB7, 0xBDB5BDBD,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xBDB5BDBD, 0xBCBCB5BD,
+ 0xB5BDBDB4, 0xBBB3BBBB, 0xBBBAB3BB, 0xB3BBBAB3,
+ 0xBAB0B8B7, 0xBDBEB3BB, 0xB4BCBCB8, 0xBDB5BDBC,
+ 0xBDBDB3BD, 0xB5BDBDB3, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB4BCBBB7, 0xBDB7BDBC, 0xBEBCB9BE, 0xB6BBB9B9,
+ 0xBEB8BDBB, 0xC0BFB9BF, 0xB9BEBDBB, 0xBFBABFBE,
+ 0xBFBDBBC0, 0xBABFBDBA, 0xBDB9C0BD, 0xC0BDB9C0,
+ 0xB6BDBAB9, 0xBBBAC1BC, 0xC0BDB9C0, 0xB9C0BDB9,
+ 0xB6BAC0BB, 0xBDBBB5BB, 0xBBBEBCBA, 0xB8BABDBB,
+ 0xBEBCB9BD, 0xBABDBBBB, 0xB7B8BCB7, 0xBBB7B8BC,
+ 0xBBBCB8BA, 0xB6B9BDB8, 0xB3AEB7BB, 0xB8BCB6AF,
+ 0xB8B9C0B9, 0xC1BAB8BF, 0xB2BAB0BA, 0xA2AEB4A9,
+ 0xB4A9A7AD, 0xAEB4A9AE, 0xA8ABB1A6, 0xB5AAABB3,
+ 0xADB4A7AF, 0xA2ADB2A3, 0xB4A3ADB3, 0xABB2A3AC,
+ 0xA5AFB3A7, 0xAFA3AFB1, 0xA8ACA0AB, 0xA1ADB0A1,
+ 0xB4A9ABB0, 0xACB0A5B0, 0xA1A8A9A0, 0xA8A0A9AA,
+ 0xA8A9A0AA, 0x939FA59A, 0xA19497A0, 0x9AA1949A,
+ 0x939B9F93, 0x9F939B9F, 0x979B8F9B, 0x9092968A,
+ 0x9A8E989C, 0x92968A96, 0x91989C90, 0x968A999D,
+ 0x95998D92, 0x8D999D91, 0x978B9599, 0x8F938793,
+ 0x88909488, 0x91869094, 0x8B92858B, 0x7E888D7E,
+ 0x8C7F888D, 0x676C6385, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x4D010200, 0x78725051, 0x78797078,
+ 0x717A7B72, 0x7D74787C, 0x787D7478, 0x797D8378,
+ 0x83787E84, 0x848A7F7D, 0xA7A6ACA1, 0xB0A7ACB2,
+ 0xA6ABA2AB, 0x9DA2A89D, 0xAAA1A2A8, 0xA5AAA1A5,
+ 0x9DA5ABA0, 0xA59AA2A8, 0xA2A79EA1, 0xA1A1A8A1,
+ 0xA8A1A0A8, 0xA0A8A1A0, 0x9C9DA59E, 0xA49F9BA3,
+ 0xA0A7A29D, 0x9E9EA5A0, 0xA39C9DA5, 0x99A0999C,
+ 0x9F9EA69C, 0xA59AA1A9, 0x9AA0959D, 0x999EA297,
+ 0xA198A0A4, 0x989D949E, 0x9C99A099, 0xA29D9CA3,
+ 0x9BA19C9C, 0x989DA19C, 0xA19B9A9E, 0x9FA19B9F,
+ 0x89969A94, 0xA19A8990, 0x98A09999, 0x9B9DA19B,
+ 0xA19B9DA1, 0x999D979D, 0x9A989C96, 0xA09A9CA0,
+ 0x9A9E989C, 0x98989F98, 0xA099979F, 0x98A09998,
+ 0x9698A096, 0x9F969A9F, 0x9BA0979C, 0x9698A096,
+ 0xA09698A0, 0x98A09698, 0x9A99A099, 0xA39C99A1,
+ 0x98A0999B, 0x9B9EA69C, 0xA49B9FA4, 0xA6ABA29F,
+ 0x7C99A197, 0x786F8085, 0x78797077, 0x716D746D,
+ 0x786F7078, 0x6E746973, 0x72767970, 0x2A267678,
+ 0x00030129, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x47494300, 0x78898C83, 0x877D7F83,
+ 0x8B8C8286, 0x89919289, 0x938A8F92, 0x90958C8E,
+ 0x8D94988D, 0x9B929697, 0x9EA29798, 0x949B9F94,
+ 0x9F939B9F, 0x9CA0949B, 0x959B9F93, 0x9F939DA1,
+ 0x989C909B, 0x909B9D91, 0x9E929A9C, 0x9B9D919C,
+ 0x959D9F93, 0xA2959DA1, 0x9BA1969B, 0x959C9D93,
+ 0xA5999FA1, 0x9DA195A1, 0x989EA297, 0xA99E9EA1,
+ 0xA4A89DA5, 0xA8A8ACA1, 0xB2A7AFB3, 0xBABDB4AE,
+ 0xBBBFC4BB, 0xCCC6BFC4, 0xC8CCC6C8, 0xB9BBBFB9,
+ 0xC0B9B9C0, 0xB8C0B9B8, 0xB9B8BEB9, 0xBFB8BABE,
+ 0xB9C0B9B8, 0xB1B3BAB3, 0xBAB3B1B8, 0xB3B9B4B3,
+ 0xB9B6B8B8, 0xAFB0B6B8, 0xB0B6B5AB, 0xB6B3B9B8,
+ 0xB9B7B2B9, 0xB7BCBAB4, 0xBFB9BFBE, 0xBFBEBAC0,
+ 0xB7BCBABA, 0xBDBBC0BE, 0xC2BDB9C0, 0xBAC1BEBC,
+ 0xC0B9BFBE, 0xBDBCB8C0, 0xB7BDBCB7, 0xBBB3BBBB,
+ 0xBABDB3BB, 0xB8C0C0B3, 0xBFB7BFBE, 0xBFC0B8C0,
+ 0xB9BEBFBA, 0xC0B8C0C0, 0xC0BFB8C0, 0xB8C0BFB8,
+ 0xC0BBC0C1, 0xBFC0BABF, 0xBBBFC0BB, 0xBFB8BEBD,
+ 0xC1C1B8C0, 0xB8C0C0B9, 0xC0BABFC0, 0xC0C3BABF,
+ 0xBABFC2BB, 0xC0B8C0C0, 0xC0C0B6C0, 0xBABFC0B8,
+ 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA, 0xC0BABFC0,
+ 0xBFC0BABF, 0xBABFC0BA, 0xBEB9BFBE, 0xC0C0B9BF,
+ 0xB8C0C0B8, 0xBFBAC0BF, 0xBEBFBAC0, 0xB9BEBFB9,
+ 0xBFB9C1C1, 0xC0C0B7BF, 0xB7BFBFB8, 0xBBB5BDBD,
+ 0xBDBDB3BB, 0xB8C0C0B5, 0xBEB7BFBE, 0xC0BFB7BF,
+ 0xB9BFBEBA, 0xB9B7BEBB, 0xBCB9B5BC, 0xB6BCBBB5,
+ 0xBCB2BCBC, 0xC0C0B2BC, 0xB8C0C0B8, 0xBEB8C0BF,
+ 0xBEBFB7BF, 0xB7BCBDB9, 0xBFB7BFBF, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9C0BDB9,
+ 0xB7B8BBB9, 0x3F3DB8BC, 0x0000003C, 0x00000000,
+ 0x00000000, 0x02000002, 0x12000001, 0x2633100C,
+ 0x21162A2F, 0x6430213C, 0x4F7D5342, 0x654E7B69,
+ 0x37523D63, 0x19342818, 0x271A3228, 0x431B0E26,
+ 0x203B362C, 0x2F1E402F, 0x98654D7D, 0x5F9A7B60,
+ 0x664A7F7D, 0x3A3A2A4C, 0x2D472D20, 0x2E1F3A3A,
+ 0x08080808, 0xB7B80608, 0xAFB7B7B2, 0xBBB9BEBD,
+ 0xBEBCB8BD, 0xB9BEBCB9, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB9BFBABB, 0xBDBABFBD, 0xBFBDB9C0, 0xBBC0BEBA,
+ 0xBEBBC0BE, 0xC0BFBBC0, 0xBBC0BFBB, 0xBDBAC1BE,
+ 0xC0C0B9C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0BFB8C0, 0xBAC0BFBA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BABFC0,
+ 0xBFC0BABF, 0xBABFC0BA, 0xBEB8C0C0, 0xC0C0B6BE,
+ 0xB9C1C1B8, 0xBFB8C0C0, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xC0B9C1C1, 0xBFC0B8C0, 0xBABFC0BA, 0xBFB8C0C0,
+ 0xBDC0B7BF, 0xB8BDC0B8, 0xC3BABFC2, 0xBFC2BBC0,
+ 0xBABFC2BA, 0xC1B8BCC1, 0xBEC3B8BC, 0xBABFC2BA,
+ 0xBCB7BCBD, 0xBDBCB7BD, 0xB8BEBDB7, 0xBDB5BDBD,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xBDB6BEBE, 0xBDBDB5BD,
+ 0xB6BEBEB5, 0xBBB5BDBD, 0xBBBAB3BB, 0xB2BAB9B3,
+ 0xBAB3BBBA, 0xB9BAB3BB, 0xB8BDBEB4, 0xBAB5BDBC,
+ 0xBDBDB1BC, 0xB5BDBDB3, 0xBCB7BDBC, 0xBCBDB7BD,
+ 0xB8BDBEB7, 0xBBB9BFBE, 0xBAB8B8BD, 0xB6BBB9B5,
+ 0xBFBABFBD, 0xC0BFBAC0, 0xBABFBEBA, 0xBEBBC0BF,
+ 0xBFBDBBC0, 0xBABFBDBA, 0xBAB9C0BD, 0xBDBAB6BD,
+ 0xB6BDBAB6, 0xBDBABFBD, 0xC0BDB9C0, 0xB9C0BDB9,
+ 0xBAB6BBB9, 0xBDBBB7BC, 0xB9BCBAB8, 0xB9B8BCB7,
+ 0xBDBBBABE, 0xBCBDBBBC, 0xB7B7BBB6, 0xBDB8B8BC,
+ 0xB9BDB8B9, 0xB7B8BCB7, 0xBDB8B8BC, 0xB8BCB7B9,
+ 0xBAB9BFBA, 0xC0B9BAC1, 0xB9C0B9B9, 0x98ACB4AA,
+ 0xA0979CA1, 0xA7ADA29B, 0xA8ADB3A8, 0xB4A9ADB3,
+ 0xADB4A7AE, 0xA4ACB1A2, 0xB2A3AEB3, 0xADB4A5AB,
+ 0xA5AEB2A6, 0xAFA4ADB1, 0xA8ACA0AB, 0xA3ABB0A1,
+ 0xB1A5AFB2, 0xACB0A5AD, 0xA0A9AAA0, 0xA89FA8A9,
+ 0xA9AAA0A7, 0x9A9AA194, 0xA194A0A7, 0x9CA0949A,
+ 0x969CA094, 0x9C909EA2, 0x989C9098, 0x8B93978B,
+ 0x9C909397, 0x95998D98, 0x8D93978B, 0x998D9599,
+ 0x95998D95, 0x8B93978B, 0x978B9397, 0x8F938793,
+ 0x85909488, 0x90838D91, 0x8B928589, 0x80888C80,
+ 0x8C81888C, 0x666B6288, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00010001, 0x734F504C, 0x79707779, 0x78797078,
+ 0x71797A70, 0x7D74787C, 0x787D747A, 0x777D8378,
+ 0x82797C82, 0x858A817D, 0xA7A7ABA0, 0xB2A9AEB2,
+ 0xA4A9A0AD, 0xA1A3ABA1, 0xA89FA3AB, 0xA5AAA1A3,
+ 0xA1A3ABA1, 0xAAA1A3AB, 0xA2A79EA5, 0xA0A1A8A1,
+ 0xA8A19FA7, 0xA0A8A1A0, 0xA2A0A8A1, 0xA39CA1A9,
+ 0x9DA49F9B, 0x9F9FA6A1, 0xA59E9DA4, 0xA1A8A19E,
+ 0x9B9DA49D, 0xA59B9DA5, 0xA1A99E9D, 0x999CA198,
+ 0xA1989DA2, 0x9FA49B9C, 0x99989F98, 0xA29D99A0,
+ 0x9EA49F9C, 0x9B9EA49F, 0xA19B9DA1, 0x9DA19B9D,
+ 0x999B9F99, 0xA09999A0, 0x99A19A98, 0x9B9BA29B,
+ 0xA29B9BA2, 0x9CA39C9B, 0x989AA19A, 0x9E98989F,
+ 0x979E979A, 0x9B989F9A, 0xA09A99A0, 0x98A09996,
+ 0x999AA19A, 0xA2999DA2, 0xA0A59C9D, 0x9B9DA59B,
+ 0xA59B9DA5, 0x9DA59B9D, 0x9E9CA39C, 0xA69F9EA5,
+ 0x9EA59E9F, 0x9E9EA69C, 0xA79EA2A7, 0xA6ABA2A2,
+ 0x7099A197, 0x796F7479, 0x78797078, 0x71737771,
+ 0x72697178, 0x6F73686D, 0x7078796F, 0x514B7679,
+ 0x0004004F, 0x00010200, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x46474300, 0x7D898C83, 0x8C828488,
+ 0x9091878B, 0x8C8F9289, 0x938A9295, 0x90958C8E,
+ 0x8D94988D, 0x998E9697, 0x94988D95, 0x90989C91,
+ 0x9E92989C, 0x9B9F939A, 0x939B9F93, 0x9E929DA2,
+ 0x989C909A, 0x909A9C90, 0x9C929A9C, 0x9B9D919B,
+ 0x919B9F93, 0xA1949BA0, 0x989F929A, 0x96989C91,
+ 0xA0949DA1, 0x9DA1959C, 0x989EA198, 0xA1969EA1,
+ 0xA5A99E9D, 0xA0A8ACA1, 0xACA1A8AC, 0xAEB1A8A8,
+ 0xC5BFC3BD, 0xC4BFC7CB, 0xBFC3BEC0, 0xBBB8BEB9,
+ 0xC1BABAC0, 0xB8C0B9B9, 0xBAB8BEB9, 0xC0B9B9BF,
+ 0xB8BFB8B9, 0xB3B3BAB3, 0xB9B2B3BA, 0xB5B9B4B2,
+ 0xB5B8B8B8, 0xB0AFB3B5, 0xADB3B2AB, 0xB6B2B9B6,
+ 0xB8B6B3B8, 0xB2B7B5B3, 0xBEB8BDBC, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBAC1BE, 0xC0BEBAC1, 0xBAC1BEBB,
+ 0xC0B8C0C0, 0xBEBDB8C0, 0xB5BBBAB8, 0xB8B2BABA,
+ 0xBABDB0B8, 0xB8C0C0B3, 0xBFB6BEBD, 0xBFC0B8C0,
+ 0xB9BEBFBA, 0xC0B7BFBF, 0xC0BFB8C0, 0xB8C0BFB8,
+ 0xC0BBC0C1, 0xC0C1BABF, 0xB8BDBEBC, 0xBFB7BFBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BABFC0, 0xBEC1BABF,
+ 0xB8BFC2B9, 0xC0B7C1C1, 0xC0C1B6C0, 0xB9BEBFBB,
+ 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA, 0xC0BABFC0,
+ 0xBFC0BABF, 0xBABFC0BA, 0xBEB9BFBE, 0xC0C0B9BF,
+ 0xB8C0C0B8, 0xBFBAC0BF, 0xBDBEBAC0, 0xBABFC0B8,
+ 0xC1B8C0C0, 0xC1C1B9C1, 0xB7BFBFB9, 0xBDB5BDBD,
+ 0xC0C0B5BD, 0xB8C0C0B8, 0xBFB8C0BF, 0xBFBEB8C0,
+ 0xBAC0BFB9, 0xBAB6BDBA, 0xBBB9B6BD, 0xB6BDBAB6,
+ 0xC0B4BCBB, 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB7BFBE,
+ 0xBEBFB7BF, 0xBBC0C1B9, 0xBEB7BFBF, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9C0BDB9,
+ 0xB7B8BCB7, 0x3F3DB8BC, 0x0000003C, 0x00000000,
+ 0x00000000, 0x02000002, 0x13000001, 0x2734110D,
+ 0x21162A30, 0x672F203C, 0x4E7E5641, 0x674F7F66,
+ 0x37523D64, 0x19342818, 0x36284028, 0x421A1027,
+ 0x203C352B, 0x38264B2E, 0x9A654C7E, 0x5D9D7B5F,
+ 0x72558C7F, 0x3B3C2A4F, 0x2C472D1F, 0x2E1F3A3B,
+ 0x08080808, 0xB7B80608, 0xB0B8B8B2, 0xBBB8BDBC,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBCBABDBB, 0xBEB9BBBE,
+ 0xB7BDB8BA, 0xBEB8BDBB, 0xC0BFBAC1, 0xBCC1C0BB,
+ 0xBDBABFBD, 0xBFBEB9C0, 0xB9BFBEB9, 0xBDB9C0BD,
+ 0xBFC0B9C0, 0xBABFC0BA, 0xBEB9BFBE, 0xBFBFB9BF,
+ 0xB8C0C0B7, 0xBFB8C0BF, 0xC0BFB8C0, 0xB8C0BFB8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBEB8C0C0, 0xBEC1B6BE,
+ 0xB8BFC2B7, 0xC0B8C0C0, 0xC0C0B8C0, 0xB6C0C0B6,
+ 0xC1B6C0C0, 0xC0C0B7C1, 0xB7BFBFB8, 0xC1B8C0C0,
+ 0xBFC2B9C1, 0xBABFC2BA, 0xC2B6BDC0, 0xBFC2B8BF,
+ 0xB8BDC0BA, 0xC0B6BDC0, 0xBEC1B6BD, 0xB8BDC0B9,
+ 0xBCB7BCBD, 0xBDBCB7BD, 0xB7BDBCB7, 0xBDB5BDBD,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xBEB5BDBD, 0xBDBDB6BE,
+ 0xB3BBBBB5, 0xBAB5BBBA, 0xBBBAB5BB, 0xB5BBBAB5,
+ 0xBAB6BCBB, 0xBBBAB5BB, 0xB5BBBAB5, 0xBBB0B8B7,
+ 0xBDBDB4BC, 0xB4BCBCB3, 0xBCB7BDBC, 0xBCBDB8BD,
+ 0xB8BDBCB8, 0xB7B6BBB9, 0xBEBBB6BC, 0xB9C0BDB7,
+ 0xBEBABFBD, 0xBFC0B9BF, 0xBABFC0BA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBDB9BFBE, 0xBAB8B9C0,
+ 0xB8BDBBB5, 0xBFB8BFBC, 0xC0BDBBC2, 0xB9BEBCB9,
+ 0xBBB7BCBA, 0xBCBBB7BC, 0xB7BCBAB7, 0xB8B8BCB7,
+ 0xBBB9B9BD, 0xB8BBB9B8, 0xB6B8BCB7, 0xBCB7B7BB,
+ 0xB7BBB6B8, 0xB7B7BBB6, 0xBCB5B8BC, 0xB6BCB7B5,
+ 0xB6B8BCB7, 0xBCB7B7BB, 0xB7BDB8B8, 0xA1BAC1BA,
+ 0x9C96A1A8, 0x989D9498, 0xA9A3A79C, 0xB3A7B1B5,
+ 0xB0B4A8AF, 0xA8B0B4A8, 0xB4A8B0B4, 0xA8AFA2B0,
+ 0xA7A9B1A6, 0xB1A7AAB2, 0xABB1A6A9, 0xA6B0B4A8,
+ 0xB1A2B0B5, 0xA4A89CAC, 0x97A1A599, 0xA69B9EA2,
+ 0x9FA398A2, 0x959DA195, 0xA1959DA1, 0x9CA0949D,
+ 0x939B9F93, 0xA1959B9F, 0x9CA0949D, 0x8284867A,
+ 0x9C908C8E, 0x9B9D919A, 0x88989C90, 0x978B9094,
+ 0x969A8E93, 0x88939687, 0x95899497, 0x94968A93,
+ 0x82909586, 0x8D7E8C91, 0x888C8088, 0x8087887E,
+ 0x88828689, 0x62635F86, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x26272500, 0x6F777973, 0x79707578, 0x7A7B7278,
+ 0x74787B72, 0x7E737A7D, 0x7A7E737A, 0x797C7F76,
+ 0x857F7D82, 0x7E857E81, 0xAA9EA39A, 0xACA3AFB5,
+ 0xA7ABA5A7, 0xA6A8ACA6, 0xABA5A8AC, 0xA0A7A0A7,
+ 0xA4A3ABA4, 0xABA4A3AB, 0xA4ABA4A4, 0xA19FA7A0,
+ 0xABA4A0A8, 0xA5ACA5A4, 0xA3A5ADA3, 0xABA1A5AD,
+ 0xA1A8A1A3, 0xA2A2A8A3, 0xA8A1A1A7, 0xA1A8A1A1,
+ 0x9CA2A9A2, 0xA59E9CA3, 0xA1AAA09D, 0x9EA1A8A1,
+ 0xA39C9EA5, 0x9DA59E9C, 0x9CA0A8A1, 0xA0999BA3,
+ 0x9AA29B98, 0x9B9BA39C, 0xA69C9DA5, 0x9DA59B9E,
+ 0x9C9EA59E, 0xA49A9BA3, 0x9CA59B9B, 0x999CA49D,
+ 0xA09998A0, 0x9BA39C98, 0x9C9CA49D, 0xA29D9BA3,
+ 0x99A09B9C, 0x9B989F9C, 0x9F9C959E, 0x989F9C98,
+ 0x9C9BA39C, 0xA39C9CA3, 0x9DA59E9C, 0x9C9BA49A,
+ 0xA59B9DA6, 0x9CA49A9C, 0xA19DA49D, 0xA29CA3A7,
+ 0x9EA59E9E, 0x9B9DA59B, 0xA49D9DA5, 0xA8B0A69D,
+ 0x71979C93, 0x7C70767C, 0x787C7078, 0x6E767A6F,
+ 0x73697477, 0x71726872, 0x68737569, 0x756A7074,
+ 0x52544E71, 0x00000100, 0x01000102, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000001, 0x44433F02, 0x7D86877E, 0x8B7F8687,
+ 0x888C8089, 0x8990968B, 0x948A8C94, 0x91998F8C,
+ 0x91989C91, 0x9D919B9D, 0x9B9D919B, 0x8D9A9C90,
+ 0x9D8E999C, 0x9DA0919A, 0x969EA192, 0xA091A3A6,
+ 0x9CA1929B, 0x8F9C9F90, 0x9C909B9E, 0x9B9D919C,
+ 0x919DA392, 0xA1929CA2, 0x9AA1929A, 0x959B9F93,
+ 0xA1959DA1, 0x9EA5989D, 0x9BA2A59C, 0xA39AA1A4,
+ 0xA4A89DA0, 0xA3A8AEA3, 0xAEA5A8AE, 0xAAADA4AB,
+ 0xBFB7BBB5, 0xC0BBBFC6, 0xBAC0BBBA, 0xB8B8BFB8,
+ 0xBDB8B8BF, 0xB6BCB7B7, 0xB8B8BFB8, 0xBFBAB8BF,
+ 0xB7BEB9B9, 0xB4B3B9B4, 0xB8B3B3B9, 0xB5B9B4B4,
+ 0xB5B8B9B7, 0xB7B5B4B7, 0xB2B7B5B2, 0xB6B3B8B6,
+ 0xB7B2B3B8, 0xB4BAB5B1, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xC1B7BDBC, 0xBFC0BBC0, 0xBBC0C1BA,
+ 0xC0B9C1C1, 0xC0C0B6C0, 0xB0B8B8B8, 0xB8B4BCBC,
+ 0xBBBBB0B8, 0xB8C0C0B3, 0xBFB4BFBD, 0xC0C1B8C0,
+ 0xBABFC0BB, 0xBCB6BBBC, 0xBEBFB6BB, 0xBABFC0B9,
+ 0xC0B8C0C0, 0xBFC0B8C0, 0xB6BBBCBA, 0xBFB7BFBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xBFBFB8C0,
+ 0xB8C0C0B7, 0xC0B6C0C0, 0xBFC0B6C0, 0xBABFC0BA,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xBEB9BFBE, 0xBEBFB9BF,
+ 0xBABFC0B9, 0xBDBABFBE, 0xBFBEB8BE, 0xB8C0BFB9,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xB8C0BFB8, 0xBAB9BFBE,
+ 0xBFC0B5BB, 0xBABFC0BA, 0xBFB8C0BF, 0xBFC0B8C0,
+ 0xBBC1C0BA, 0xBBB7BEBB, 0xBEB9B7BE, 0xB8BDBBB8,
+ 0xBCB9C0BD, 0xBEBFB7BD, 0xBABFC0B9, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xB9BEBFBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xBABFBDBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9C0BDB9,
+ 0xB7B8BCB7, 0x3F3DB8BC, 0x0000003C, 0x00000000,
+ 0x00000200, 0x00000000, 0x15000001, 0x2E3B130F,
+ 0x281B3137, 0x6F382645, 0x558A5D48, 0x70568B6F,
+ 0x3E5A456C, 0x1F3A311F, 0x2D1F3730, 0x42191025,
+ 0x203C352B, 0x38264B2E, 0xA36A5085, 0x65A58367,
+ 0x75589087, 0x3B402E53, 0x2A452E1F, 0x301F3A39,
+ 0x08080808, 0xB7BA0608, 0xB0B8B8B2, 0xBBB7BDBC,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xB9BABDBB, 0xBCB7B8BB,
+ 0xB7BDB8B8, 0xBAB7BCBA, 0xBCBBB6BD, 0xBBC0BFB7,
+ 0xBDB9C0BD, 0xBFBEB9C0, 0xBAC0BFB9, 0xBDBAC1BE,
+ 0xBFBEB9C0, 0xB9BEBFB9, 0xBEB9BFBE, 0xBFBFB9BF,
+ 0xB8C0C0B7, 0xBFB8C0BF, 0xC0BFB8C0, 0xB8C0BFB8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xC0B9C1C1, 0xBFC2B8C0,
+ 0xB9C0C3B8, 0xC1B8C0C0, 0xC0C0B9C1, 0xB6C0C0B6,
+ 0xBFB7C1C1, 0xC0C0B5BF, 0xB9C1C1B8, 0xBDB7BFBF,
+ 0xBDC0B5BD, 0xBABFC2B8, 0xC2B8BFC2, 0xBDC0B8BF,
+ 0xB8BDC0B8, 0xBFB9C0C3, 0xBDC0B5BC, 0xB8BDBEB8,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBDB5BDBD,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xBDB4BCBC, 0xBBBBB5BD,
+ 0xB3BBBBB3, 0xBAB5BBBA, 0xBAB9B5BB, 0xB5BBBAB4,
+ 0xBAB5BBBA, 0xBBBAB5BB, 0xB4BAB9B5, 0xB9B3BBBA,
+ 0xBEBEB2BA, 0xB6BEBEB4, 0xBCB8BDBC, 0xBCBDB8BD,
+ 0xB7BCBBB8, 0xBBB6BBB9, 0xC1BEBAC0, 0xB9BFBEBA,
+ 0xBEB9BFBE, 0xBFC0B9BF, 0xBAC0BFBA, 0xBCBBC0BE,
+ 0xC0BEBBC1, 0xBBC0BEBB, 0xBBB9BFBE, 0xBDBBB8BD,
+ 0xBBC0BEB8, 0xBDB9BFBE, 0xBDBBB8BE, 0xB5BAB8B8,
+ 0xBBB7BCBB, 0xB2B1B7BC, 0xB7BCBAAC, 0xB7B7BBB6,
+ 0xBBB9B8BC, 0xB9BCBAB8, 0xB7B8BCB7, 0xBBB6B8BC,
+ 0xB3B9B4B5, 0xB7B8BCB7, 0xBCB5B8BC, 0xB3BAB3B5,
+ 0xB8B8BCB7, 0xBCB7B9BD, 0xB6BCB7B8, 0xBAB8BFBA,
+ 0xA9A2B8BF, 0x989D94A2, 0x8D95998E, 0xA79B9799,
+ 0xB0B4A8A3, 0xA8B0B4A9, 0xB4A9AFB3, 0xAEB4A9B0,
+ 0xA7A9B1A7, 0xB6ACA8B1, 0xB2B8ADAE, 0xA1AEB5A8,
+ 0xAA9BABB0, 0xA5A99DA5, 0x97A2A69A, 0xA59A9FA3,
+ 0x9FA398A1, 0x939B9F93, 0xA1959B9F, 0xA3A5999F,
+ 0x939DA195, 0x9F939B9F, 0x9B9F939B, 0x899B9D91,
+ 0x95899395, 0x93958993, 0x8B989C90, 0x978B9397,
+ 0x989C9093, 0x87959889, 0x95899396, 0x93958993,
+ 0x86909586, 0x92839095, 0x898D818D, 0x8088897F,
+ 0x88828889, 0x61625E86, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x72736F00, 0x707D8077, 0x79707679, 0x76797076,
+ 0x74787D74, 0x8177787D, 0x80817780, 0x767C7F76,
+ 0x817B7A7F, 0x7B827B7D, 0xAA9EA39A, 0xACA3AFB5,
+ 0xA7ABA5A7, 0xA6A8ACA6, 0xACA7A8AC, 0xA7ADA8A8,
+ 0xA4A0A7A2, 0xADA6A1AC, 0xA5ADA6A5, 0xA3A4ACA5,
+ 0xA8A1A3AA, 0xA5ACA5A1, 0xA1A5ACA5, 0xADA4A3AB,
+ 0xA8ACA6A8, 0xA2A3AAA3, 0xAAA3A1A7, 0xA5ACA5A3,
+ 0xA3A2A8A3, 0xA49DA2A8, 0x9CA49D9C, 0xA29DA59E,
+ 0xA8A1A1A9, 0x9DA59EA0, 0xA19AA59D, 0xA59E9EA9,
+ 0x9CA49D9D, 0x9A9BA49A, 0xA69C9BA4, 0xA0A99F9D,
+ 0x9CA0A8A1, 0xA2989BA3, 0x9BA49A99, 0x9D9DA59E,
+ 0xA39C9CA4, 0x99A19A9B, 0x9A99A19A, 0xA49F99A1,
+ 0x9BA29D9D, 0x9D98A19E, 0x9A9797A0, 0x989F9C93,
+ 0x99979E99, 0xA19A98A0, 0x98A09999, 0x9A98A197,
+ 0xA1979BA4, 0x98A19798, 0x98989F98, 0x9E989A9E,
+ 0x999E959A, 0x9B9EA69C, 0xA59B9DA5, 0xAAAFA69D,
+ 0x70979C93, 0x7C70757B, 0x797D7178, 0x6B74756B,
+ 0x776D7475, 0x76776D78, 0x68707468, 0x74697074,
+ 0x70736A70, 0x00242521, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x02000000, 0x00000100,
+ 0x00000001, 0x43414002, 0x7783847B, 0x887C8081,
+ 0x888C8086, 0x868B9186, 0x958B8991, 0x929A908D,
+ 0x92979B90, 0x9D919C9E, 0x9EA0949B, 0x919E9E92,
+ 0x9D8E9F9F, 0x9A9D8E9A, 0x919B9E8E, 0x9F8E9EA1,
+ 0x999F8E99, 0x8F9B9E8F, 0x9D919B9E, 0x9D9D8F9D,
+ 0x8C9A9D8D, 0xA291999F, 0x9CA2919C, 0x939DA293,
+ 0xA1959B9F, 0x99A0939D, 0x9B9EA297, 0xA59CA1A4,
+ 0x9FA49BA2, 0xA1A3A99E, 0xABA2A6AC, 0xA9AEA5A6,
+ 0xB9B1B8B1, 0xBBB6B9C0, 0xB5BBB6B5, 0xB8B7BEB7,
+ 0xBEB9B8BF, 0xB6BCB7B8, 0xB7B9BDB7, 0xBEB9B7BE,
+ 0xB7BEB9B8, 0xB2B2B8B3, 0xB8B3B1B7, 0xB4B8B3B4,
+ 0xB4B6BAB5, 0xB4B2B5B9, 0xB2B7B5B1, 0xB6B5B8B6,
+ 0xB7B2B5B8, 0xB2B8B3B3, 0xBDBBC0BE, 0xC1BCBABF,
+ 0xBBC0BEBB, 0xBEB7BDBC, 0xBEC1B8BD, 0xB7BFBFB9,
+ 0xC0B8C0C0, 0xC0C0B6C0, 0xB0B8B8B8, 0xBBB3BBBB,
+ 0xBBBBB3BB, 0xB9C1C1B3, 0xBEB6C1BF, 0xBEBEB5C0,
+ 0xB9BEBFB6, 0xBBB7BCBD, 0xBCBDB5BA, 0xB7BCBDB7,
+ 0xC0B5BDBD, 0xBCBDB8C0, 0xB6BBBCB7, 0xBFB7BFBE,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC0B6C0C0, 0xBEBFB8C0, 0xBABFC0B9,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xBEB9BFBE, 0xBCBDB9BF,
+ 0xB8BDBEB7, 0xBAB8BDBC, 0xBEBDB6BB, 0xB7BFBEB8,
+ 0xBEB7BFBE, 0xC0BFB7BF, 0xBBC2BFBA, 0xBBB9C0BD,
+ 0xBFC0B6BC, 0xB9BEBFBA, 0xBFB8C0BF, 0xC0C0B8C0,
+ 0xBAC0BFB8, 0xBBB8BEBD, 0xBFBAB7BE, 0xB8BEB9B9,
+ 0xBDB8BDBB, 0xBEBFBABF, 0xBABFC0B9, 0xC0B8C0C0,
+ 0xBDBEB8C0, 0xBABFC0B8, 0xBEB9BFBE, 0xBFBDB9BF,
+ 0xB9C0BDBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9C0BDB9,
+ 0xB7B8BCB7, 0x3F3DB8BC, 0x0000003C, 0x00020000,
+ 0x00000200, 0x00000000, 0x14000001, 0x2E3B130F,
+ 0x271A3037, 0x71382645, 0x578D5D47, 0x70568C71,
+ 0x3E5A456C, 0x1F3A311F, 0x2E203830, 0x421A1126,
+ 0x203C352B, 0x38264B2E, 0xA36A5086, 0x65A68566,
+ 0x75589087, 0x3B412C52, 0x2B462E1F, 0x301F3A3C,
+ 0x08080808, 0xB7BA0608, 0xB0B8B8B0, 0xBBB7BDBC,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB8BDBB, 0xBEB9B8BD,
+ 0xB6BCB7BA, 0xBCB7BCBA, 0xBCBBB7BD, 0xB7BCBBB7,
+ 0xBBB8BDBB, 0xBEBCB8BD, 0xBABFBDB9, 0xBDB9C0BD,
+ 0xC0BFB9C0, 0xB8C0BFB8, 0xBFB8C0BF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB6C0C0B6, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBFBFB8C0, 0xB8C0C0B7, 0xC2B8BFC2,
+ 0xBDC0B8BF, 0xB7BEC1B6, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xB8BDBEBA, 0xC1B8C0C0, 0xBEBFB9C1, 0xB7BCBDB9,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBDB5BDBD,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xBDB5BDBD, 0xBABAB5BD,
+ 0xB3BBBBB2, 0xBAB5BBBA, 0xBAB9B5BB, 0xB5BBBAB4,
+ 0xB8B3BCB9, 0xBCBBB2BB, 0xB5BBBAB6, 0xBBB5BDBD,
+ 0xBBBBB3BB, 0xB5BDBDB3, 0xBBB9BEBD, 0xBBBAB8BD,
+ 0xB5BBBAB6, 0xBDB9BFBE, 0xBFBCB9C0, 0xBAC0BFB8,
+ 0xBFB9BFBE, 0xBFBEBAC0, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC1BEBBC0, 0xBAC1BEBA, 0xBBB8BDBB, 0xBFBDB8BD,
+ 0xB9BFBEBA, 0xBEB9BFBE, 0xBBB9B9BF, 0xB8BDBBB6,
+ 0xBCB7BCBB, 0xC1C0B7BB, 0xB7BCBABC, 0xB6B8BCB7,
+ 0xBDB8B8BC, 0xB8BCB7B9, 0xB7B7BDB8, 0xBAB8B6BC,
+ 0xB8BBB9B7, 0xB7B8BCB7, 0xBCB5B8BC, 0xB5BCB5B5,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB6BDB6B8, 0xBAB7BEB9,
+ 0xBFBAB8BF, 0xADB4ADB8, 0x7E95998D, 0x8C80888D,
+ 0xA3A79B88, 0xA9B0B4A9, 0xB4A9B0B4, 0xADB3A8AE,
+ 0xADAFB4AB, 0xB7AEADB4, 0xB2B8ADB2, 0x9DAAB1A4,
+ 0xA99DA3AA, 0xA5A99DA5, 0x9AA2A69A, 0xA398A2A6,
+ 0x9FA3989F, 0x94A1A599, 0xA1959CA0, 0x9A9E929D,
+ 0x959FA195, 0x9D919FA1, 0x9B9F9399, 0x8E9A9D8E,
+ 0x9D8E9A9D, 0x9497889A, 0x8D93978B, 0x998D9599,
+ 0x97998D97, 0x87959889, 0x94889396, 0x94968A94,
+ 0x868C9084, 0x91858E92, 0x8A8E828D, 0x7F868A7F,
+ 0x88828588, 0x62635F86, 0x00000100, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x4D480001,
+ 0x70746E49, 0x6E767970, 0x7B727579, 0x767B7278,
+ 0x74777C73, 0x8077787D, 0x8182797F, 0x797F8279,
+ 0x7F767D82, 0x797E757A, 0xA29EA499, 0xA499A7AD,
+ 0xA0A39AA0, 0x9E9EA198, 0xACA6A4A7, 0xA5ACA5A8,
+ 0xA4A8B0A9, 0xADA6A3AB, 0xA5ADA6A5, 0xA8A5ABA6,
+ 0xACA7A7AD, 0xA3A7A1A8, 0xA7A3AAA3, 0xACA5A6AE,
+ 0xA5ACA5A5, 0xA4A5ACA5, 0xA8A1A4AB, 0xA1A8A1A0,
+ 0xA3A2A8A3, 0xA39EA2A8, 0x9DA49F9C, 0x9E9BA39C,
+ 0xA59E9DA5, 0x9DA59E9D, 0xA09DA59E, 0xA9A29FA7,
+ 0x9EA59EA2, 0x9C9DA49D, 0xA39C9BA3, 0x99A49C9B,
+ 0x9E9BA69E, 0xA59E9DA5, 0x9BA39C9D, 0x9E9AA29B,
+ 0xA8A19BA6, 0x9DA59EA0, 0x9D9EA9A1, 0xA39C9AA5,
+ 0x9BA39C9B, 0x9699A09B, 0x9B96949B, 0x9EA49F95,
+ 0x9C9DA59E, 0xA59E9BA3, 0x9DA59E9D, 0x9898A099,
+ 0xA39C979F, 0x9BA39C9B, 0x9B9DA59B, 0xA49B9DA5,
+ 0xA3A89F9F, 0x8E9FA49B, 0xA59A9399, 0xACAFA69F,
+ 0x72999C93, 0x7D70797D, 0x787C7076, 0x7076776D,
+ 0x776D7879, 0x74756B76, 0x68707468, 0x74696E75,
+ 0x6F726970, 0x006F716B, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x42433F00, 0x7784877E, 0x857A7E82,
+ 0x84887D81, 0x85888C80, 0x958B8A90, 0x91998F8D,
+ 0x90959B90, 0x9D92979B, 0x999D9199, 0x939EA094,
+ 0xA0919D9F, 0x9DA0919D, 0x8F9B9E8F, 0xA2929B9E,
+ 0x9B9E8E9F, 0x8F9E9E90, 0x9C8E9D9D, 0x9D9D8F9C,
+ 0x8D9B9E8E, 0x9F8C9CA0, 0x9B9E8E9B, 0x959EA192,
+ 0xA2969DA1, 0x9DA1959E, 0x979FA398, 0xA49B9EA2,
+ 0x9EA39A9F, 0x9FA2AAA0, 0xABA1A1A9, 0xA4ACA2A3,
+ 0xB8B1B9AF, 0xBCB5B9C2, 0xB9C0B9B5, 0xB7BABEB9,
+ 0xC0B9B8BC, 0xB8BFB8B9, 0xB9B7BDB8, 0xBDB8B8BE,
+ 0xB6BCB7B7, 0xB5B3B8B6, 0xB7B5B2B7, 0xB4B7B5B4,
+ 0xB4B5B8B6, 0xB7B5B3B6, 0xB4B7B5B4, 0xB4B7B8B4,
+ 0xB9B4B5B9, 0xB3B9B4B5, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBDB8BEBD, 0xC0C0B7BC, 0xB8C0C0B8,
+ 0xBFB8C0C0, 0xBFBFB8C0, 0xB3BBBBB7, 0xBBB0B8B8,
+ 0xBEBEB3BB, 0xB7BFBFB6, 0xC0B6C0C0, 0xC0C0B6C0,
+ 0xB9C1C1B8, 0xBCBAC0BF, 0xBDBDB7BD, 0xB8C0C0B5,
+ 0xC0B8C0C0, 0xC1C0B8C0, 0xB5BBBABB, 0xC1B9C1C1,
+ 0xC0BFB9C1, 0xB8C0BFB8, 0xC0B7BFBF, 0xC0BFB8C0,
+ 0xB8C0BFB8, 0xBFB8C0C0, 0xBEBFB7BF, 0xBABFC0B9,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xC0B7BFBF,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBAB8BDBC, 0xBFBEB6BB, 0xBAC0BFB9,
+ 0xBBB9C0BD, 0xBDBBB7BE, 0xB9C0BDB8, 0xBCB8BFBC,
+ 0xBFC0B7BD, 0xBABFC0BA, 0xBFB8C0BF, 0xBFBFB6C1,
+ 0xB8C0BFB5, 0xBBB7BDBC, 0xBCBAB8BD, 0xB6BBB9B7,
+ 0xBBB9BEBC, 0xBFC0B8BD, 0xBABFC0BA, 0xBEB8C0BF,
+ 0xC0BFB7BF, 0xBAC0BFBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xC0BDB7BF, 0xB9C0BDB9,
+ 0xB7B8BCB7, 0x3F3DB8BC, 0x0000003E, 0x00020000,
+ 0x00000200, 0x00000000, 0x14000000, 0x2E3B1110,
+ 0x271B2F37, 0x70382645, 0x568B5C46, 0x70568B70,
+ 0x3D5B466D, 0x1F3A301E, 0x2E203830, 0x421C1026,
+ 0x203C352B, 0x38264B2E, 0xA36A5086, 0x66A78566,
+ 0x75589088, 0x3A422D53, 0x2A452E1F, 0x301F3A3B,
+ 0x08080808, 0xB8B80608, 0xB0B8B8B0, 0xBBB7BDBC,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xB9B8BDBB, 0xBCB7B6BB,
+ 0xB7BBB6B8, 0xBBB8BDBB, 0xBCBBB6BC, 0xB7BCBAB7,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB9BEBCB8, 0xBBB7BEBB,
+ 0xBFBEB7BE, 0xB8C0BFB9, 0xBFB8C0BF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B6, 0xC0B8C0C0, 0xBFC0BABF, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB9C1C1B8, 0xC3B8BFC2,
+ 0xBFC2B9C0, 0xB8BFC2B8, 0xC0B8C0C0, 0xBDBEB8C0,
+ 0xB8BDBEB8, 0xBEB6BEBE, 0xBDBEB6BE, 0xB8BDBEB8,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB8BEBDB7, 0xBDB5BDBD,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xBEB5BDBD, 0xBDBDB6BE,
+ 0xB3BBBBB5, 0xBAB5BBBA, 0xBCBBB5BB, 0xB4BAB9B6,
+ 0xBAB3BBBA, 0xBBBAB3BB, 0xB5BDBCB5, 0xBDB2BABA,
+ 0xBBBAB3BD, 0xB3BBBAB3, 0xB8B4B9B8, 0xBCBBB4B9,
+ 0xB7BDBCB6, 0xBCB9BFBE, 0xBEBDB7BD, 0xB9BFBEB8,
+ 0xC0B9BFBE, 0xC0BFBBC1, 0xB9BEBCBB, 0xBDBBC0BE,
+ 0xC1BEBABF, 0xBBC2BFBA, 0xBBB7BEBB, 0xBFBEB7BE,
+ 0xB9BFBEB9, 0xBCB9BFBE, 0xBCBAB7BD, 0xBABFBEB7,
+ 0xBBB7BCBB, 0xBCBBB7BC, 0xB2B7B5B7, 0xB6A7ABA6,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB2B6BCB7, 0xB8B6B1B7,
+ 0xB8BBB9B5, 0xB7B8BCB7, 0xBCB5B8BC, 0xB6BDB6B5,
+ 0xB7B9BDB8, 0xBCB6B8BC, 0xB8BCB6B8, 0xBAB8BFBA,
+ 0xBFBAB8BF, 0xB9C0B9B8, 0x9BAEB4A9, 0x8C81A3A7,
+ 0x888C8188, 0xA49EA198, 0xB4A9AAAD, 0xAFB5AAB0,
+ 0xB0AFB3AD, 0xB8AEB0B7, 0xA9B1A7B0, 0x9EA3A99E,
+ 0xA99EA3A9, 0xA0A499A5, 0x97A1A59A, 0xA2979FA3,
+ 0xA1A59A9E, 0x96A0A498, 0x9F939EA2, 0x9DA1959B,
+ 0x929A9C90, 0x9F939C9E, 0x989C909B, 0x8E989D8E,
+ 0x9E8F989D, 0x9196879B, 0x8893978B, 0x978B9094,
+ 0x97998D95, 0x86959889, 0x94889295, 0x92948892,
+ 0x85929488, 0x8F838D91, 0x8B8F848B, 0x80848980,
+ 0x88828489, 0x61625E84, 0x00000100, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x4B000000, 0x746F4A4D,
+ 0x70756C70, 0x6F767970, 0x7B72767A, 0x787D7476,
+ 0x72787D74, 0x7E75767B, 0x7E81787B, 0x797D8279,
+ 0x7E787D82, 0x80857C7A, 0xB4AFB4AB, 0xB4ABB8BD,
+ 0x9EA39AAF, 0x91999C93, 0xA09A979A, 0xA2A6A09C,
+ 0xA9A6ADA6, 0xADA6A8B0, 0xA6ADA6A5, 0xA8A7ADA8,
+ 0xABA9A7AA, 0xA8ACA7AA, 0xA3A3AAA3, 0xACA5A2AA,
+ 0xA6ADA6A4, 0xA6A6ADA6, 0xACA5A6AD, 0xA1A8A1A5,
+ 0xA3A2A8A3, 0xACA7A2A8, 0xA0A7A2A5, 0x9E9DA59E,
+ 0xA39C9EA5, 0x9EA59E9C, 0x9E9EA59E, 0xA8A19EA5,
+ 0xA0A7A0A1, 0xA1A2A9A2, 0xA9A2A1A8, 0x9BA39CA1,
+ 0x9998A099, 0xA59E98A0, 0xA1A8A19E, 0x989EA69F,
+ 0xA39C95A0, 0x9FA7A09B, 0xA19EA9A1, 0xA9A29EA9,
+ 0x9DA59EA1, 0x9B9DA59E, 0xA39C9AA2, 0x9BA29B9C,
+ 0x979CA39C, 0xA59E99A1, 0x9EA59E9E, 0x9C9CA39C,
+ 0xA59E9CA3, 0x9DA59E9D, 0x969CA49A, 0x9C9298A0,
+ 0x9FA49B94, 0x9A9EA499, 0xB0A59FA5, 0xB9BDB2AC,
+ 0x72AAADA4, 0x7C71767B, 0x767C7176, 0x6E767970,
+ 0x756C7477, 0x74786D72, 0x69707469, 0x74696E74,
+ 0x676A6170, 0x466E706A, 0x0100474B, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x42433F00, 0x7A82877E, 0x857A7F85,
+ 0x898D8281, 0x85878B7F, 0x948B8A90, 0x9198918F,
+ 0x90959A91, 0x9E93959B, 0x999D929A, 0x939D9F93,
+ 0x9F939D9F, 0x9DA0919D, 0x929EA192, 0x9E8F9EA1,
+ 0x9B9E8F9B, 0x909DA091, 0xA0919C9F, 0x9C9F909D,
+ 0x8F9B9E8E, 0xA08D9EA2, 0x9B9E8E9C, 0x989DA091,
+ 0xA195A2A4, 0xA0A4989D, 0x9AA1A59A, 0xA398A1A5,
+ 0xA2A79E9F, 0x9FA0A89E, 0xACA2A1A9, 0xA4ACA2A4,
+ 0xB8B1B9AF, 0xBCB5B9C2, 0xB6BDB6B5, 0xB8B7BDB8,
+ 0xBCB7B7BD, 0xB8BEB9B6, 0xB8B7BDB8, 0xBEB9B7BD,
+ 0xB6BCB7B8, 0xB6B1B6B4, 0xB6B6B3B8, 0xB2B7B6B4,
+ 0xB5B2B7B6, 0xB7B6B2B7, 0xB4B7B5B2, 0xB7B5B9B4,
+ 0xB9B4BABB, 0xB4B7B5B5, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BFBB, 0xBEB9BFBE, 0xBFC0B9BF, 0xB8C0BFBA,
+ 0xBEB8C0BF, 0xC0C0B7BF, 0xB3BBBBB8, 0xBBB0B8B8,
+ 0xC0C0B3BB, 0xB8C0C0B8, 0xC1B6C0C0, 0xBFBFB7C1,
+ 0xB8C0C0B7, 0xBFBAC0BF, 0xBDBDBAC0, 0xB8C0C0B5,
+ 0xC0B8C0C0, 0xC0BFB8C0, 0xB6BCBBBA, 0xC0B8C0C0,
+ 0xBFBEB8C0, 0xB7BFBEB7, 0xC0B8C0C0, 0xC1C0B8C0,
+ 0xB7BFBEB9, 0xC0B8C0C0, 0xBEBFB8C0, 0xBABFC0B9,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xC0B7BFBF,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBCB8BDBC, 0xBFBEB8BD, 0xB9BFBEB9,
+ 0xBCBABFBD, 0xBEB9B9BE, 0xB8BDBBB8, 0xBCB4BAB9,
+ 0xBFC0B7BD, 0xBABFC0BA, 0xC0BAC2C1, 0xC0C0B7C2,
+ 0xB8C0C0B6, 0xBBB9BFBE, 0xBCBAB8BD, 0xB5BAB8B7,
+ 0xBCB6BBB9, 0xBFC0B8BD, 0xBABFC0BA, 0xBFB8C0BF,
+ 0xBFBEB8C0, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB7BF, 0xB9C0BDB9,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00020000,
+ 0x00000200, 0x00000000, 0x14000001, 0x2E3B100E,
+ 0x271A3037, 0x72362546, 0x558C5D46, 0x70568C72,
+ 0x3D5A446E, 0x1F3A301E, 0x2E20382E, 0x421D1028,
+ 0x203C372A, 0x3A254B2F, 0xA36C5085, 0x64A48766,
+ 0x75588F86, 0x39422D53, 0x2C472D1E, 0x3425403B,
+ 0x08080808, 0xB7B80608, 0xB0B8B8B2, 0xBBB7BDBC,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xB9B8BDBB, 0xBCB7B6BB,
+ 0xB7BBB6B8, 0xB9B6BBB9, 0xBCBAB6BB, 0xB8BDBBB7,
+ 0xB9B7BEBB, 0xBEBBB7BE, 0xB7BEBBB7, 0xBBB8BDBB,
+ 0xBDBCB8BD, 0xB7BDBCB8, 0xBFB9BFBE, 0xBFC0BAC0,
+ 0xBBC0C1BA, 0xBFB7BFBE, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFB8C0C0, 0xC0C0B7BF, 0xB9C1C1B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xBFB8C0BF, 0xC0BFB8C0,
+ 0xB7BFBEB8, 0xC0BABFC0, 0xBFC0BBBF, 0xBBBFC0BB,
+ 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B6C0C0, 0xC0C0B6C0,
+ 0xB8C0C0B8, 0xC0B7BFBF, 0xC0C1B8C0, 0xB4B9BABB,
+ 0xBBB7BDBC, 0xBDBCB6BC, 0xB7BDBCB7, 0xBDB5BDBD,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xBDB5BDBD, 0xBEBEB5BD,
+ 0xB5BDBDB6, 0xBEB4BCBC, 0xBDBDB6BE, 0xB4BCBCB5,
+ 0xBAB7BCBD, 0xBCBBB5BB, 0xB4BCBBB4, 0xB9AFBAB8,
+ 0xBBB8AEBB, 0xB0BBB8B0, 0xBBB0B8B7, 0xBDBDB5BA,
+ 0xB7BCBDB5, 0xBDB7BCBD, 0xBCBDB8BC, 0xBAC0BFB7,
+ 0xBEB9BFBE, 0xC0BFB9BF, 0xBAC0BFBA, 0xBDBBC0BE,
+ 0xC0BEBABF, 0xBAC1BEBB, 0xBBB6BCBB, 0xC0BDB6BC,
+ 0xBABFBDB9, 0xBCB8BDBC, 0xBFBEB8BD, 0xB9BFBEB9,
+ 0xBBB8BDBC, 0xBDBBB8BD, 0xBABDBBBA, 0xB7B6BCB7,
+ 0xBBB9B6BC, 0xB7BAB8B8, 0xB6B6BAB5, 0xBAB8B7BB,
+ 0xB8BBB9B7, 0xB9B6BBB9, 0xBCB7B6BB, 0xB8BCB7B8,
+ 0xB7B8BCB7, 0xBCB8B8BC, 0xB7BBB6BB, 0xB6B8BCB6,
+ 0xBBB6B6BD, 0xB7BBB6B5, 0xB5B8BCB6, 0xB2ACB7BB,
+ 0x989A94AE, 0x767E8178, 0xA79D7F80, 0xB8BCB1A6,
+ 0xB1B1B8B1, 0xB4AAB0B8, 0xA5AEA4AB, 0x9D9FA79D,
+ 0xA69D9FA7, 0x9EA499A1, 0x9A9EA499, 0xA4999FA5,
+ 0xA0A499A0, 0x95A0A498, 0x9D8E9DA1, 0x9BA09198,
+ 0x919DA195, 0x9C90999D, 0x9B9F9398, 0x89979C8D,
+ 0x9D8E9198, 0x94998A98, 0x8C93978B, 0x978B9498,
+ 0x94988C93, 0x8D989C90, 0x93879599, 0x9294888F,
+ 0x89929389, 0x8F839094, 0x868C818B, 0x8181897F,
+ 0x88818188, 0x5F635E81, 0x00000100, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x751E2321, 0x77727277,
+ 0x71796F71, 0x6F747970, 0x7B72767A, 0x7A7D7478,
+ 0x787B7F79, 0x7C767A7E, 0x7A7E7878, 0x76787C76,
+ 0x7C77787C, 0xA5A9A378, 0xB5BEC5BE, 0xC1BAB5BC,
+ 0xBAC1BABA, 0x9AB2B6B1, 0xA09A9B9F, 0x9CA09A9C,
+ 0x9F9EA49F, 0xA5A09EA4, 0xA8ACA79F, 0xA9A8ABA9,
+ 0xABA9A8AB, 0xA9ACAAAA, 0xA1A0A7A2, 0xA99F9EA9,
+ 0x9FA7A09E, 0xA7A6ACA7, 0xABA6A8AC, 0xA6ACA7A7,
+ 0xA2A0A7A2, 0xA6A1A0A7, 0xA0A7A29F, 0x9E9EA59E,
+ 0xA49EA0A4, 0xA0A49EA0, 0x9FA0A49F, 0xA49FA0A4,
+ 0xA8ACA7A0, 0xA7A8ACA7, 0xACA7A8AC, 0xA7ADA8A6,
+ 0x9D9DA49D, 0xA39E9DA4, 0x9EA49F9F, 0x99A2AAA3,
+ 0xA19A98A0, 0x98A09999, 0xA3A1A9A2, 0xAAA3A2AA,
+ 0xA4ABA4A3, 0x9FA0A99F, 0xA8A1A0A9, 0xA1A8A1A1,
+ 0x9EA4A79E, 0xA79EA5A9, 0x959A91A2, 0x9799A197,
+ 0xA09698A1, 0x98A19797, 0x9FA0A99F, 0xA99FA0A9,
+ 0xA6AEA4A0, 0xAEB0B5AC, 0xB9B0B4B7, 0xB6BBB2B4,
+ 0x9BB3B7B1, 0x796F9BA2, 0x71787171, 0x74797D77,
+ 0x7771767A, 0x70756C73, 0x6870736A, 0x72696E71,
+ 0x6E716871, 0x6A6B6F69, 0x2A28696F, 0x06090725,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x42433F00, 0x7B838781, 0x837A7F84,
+ 0x85897E80, 0x7F888C80, 0x948B858C, 0x9198918F,
+ 0x93959A91, 0x9D92999C, 0x9A9E9399, 0x959B9F94,
+ 0xA0949DA1, 0x9DA1959C, 0x959DA195, 0x9B8F9DA1,
+ 0x989D8E97, 0x909A9F90, 0x9E8F9A9F, 0x9BA09199,
+ 0x919CA192, 0xA2919CA2, 0x9BA1909C, 0x939BA091,
+ 0xA1959B9F, 0xA0A4989D, 0x98A2A498, 0xA79BA2A4,
+ 0xA8ACA1A5, 0xA2A6ABA2, 0xAA9FA6AB, 0xA6ABA2A4,
+ 0xB9B2BAB0, 0xBCB5B9C0, 0xB5BCB5B5, 0xB5B2B9B4,
+ 0xBDBAB3BA, 0xB6BDBAB6, 0xB5B8BEB9, 0xBDBBB4BA,
+ 0xB4B7B5BA, 0xB6B0B5B3, 0xB7B5B3B8, 0xB2B7B6B2,
+ 0xB7B2B8B7, 0xB7B8B2B8, 0xB3B8B7B2, 0xB7B8BBB9,
+ 0xBBB9B8BC, 0xB8BBB9B8, 0xBDBBC0BE, 0xC0BFBABF,
+ 0xBBC0BFBB, 0xB9B9BFBE, 0xBBBAB5BC, 0xB9BFBEB5,
+ 0xC0B8C0BF, 0xC0C1B8C0, 0xB7BCBDBB, 0xB8B0B8B8,
+ 0xC0C0B0B8, 0xB6C0C0B6, 0xBFB7BFBE, 0xBFBFB8C0,
+ 0xB8C0C0B7, 0xC0B8C0C0, 0xC0C0B8C0, 0xB7BFBFB8,
+ 0xC0BABFC0, 0xC0BFBABF, 0xB9BFBEBA, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xBBC1C0BA, 0xC0B8C0C0, 0xC1C0B8C0,
+ 0xBAC0BFBB, 0xC0B7BFBF, 0xBFBFB8C0, 0xB8C0C0B7,
+ 0xC0BAC0BF, 0xC0BFBBC1, 0xBAC0BFBA, 0xC0B9C1C1,
+ 0xBFBEB8C0, 0xBAC0BFB9, 0xBFB9BFBE, 0xBFBEBAC0,
+ 0xB9BFBEB9, 0xBBB7BEBB, 0xBFBEB7BE, 0xB9BFBEB9,
+ 0xBBBABFBD, 0xBEB9B8BD, 0xB8BDBBB8, 0xBBB4BAB9,
+ 0xBCBDB5BA, 0xB7BCBDB7, 0xBFBAC0BF, 0xC1C1B8C0,
+ 0xB8C0C0B9, 0xBBB9BFBE, 0xBAB9B6BC, 0xB6BCBBB4,
+ 0xBDB6BBBA, 0xBFC0B9BE, 0xBABFC0BA, 0xBFB7BFBF,
+ 0xC0BFB7BF, 0xBBC0BFBA, 0xBEBABFBE, 0xBFBEBABF,
+ 0xB9BFBEBA, 0xBEB9BEBF, 0xBFBEB9BF, 0xB9C0BDB9,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00020000,
+ 0x00010200, 0x00000100, 0x18000003, 0x3041120F,
+ 0x281B3538, 0x7F3B294E, 0x5E9B674F, 0x7D5F9A7F,
+ 0x43664F7B, 0x24403322, 0x32253D32, 0x451F122A,
+ 0x223E3B2D, 0x3E294F31, 0xA36F5186, 0x65A58866,
+ 0x795A9188, 0x3A402E53, 0x2B472C1E, 0x32244039,
+ 0x08080808, 0xB7B80608, 0xB3B9B8B2, 0xBBB9BFBE,
+ 0xBCBAB8BD, 0xB7BCBAB7, 0xBAB8BDBB, 0xBEB9B7BC,
+ 0xB8BCB7BA, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xB7B5BCB7, 0xBDBAB5BC, 0xB7BEBBB6, 0xBBB8BDBB,
+ 0xBDBCB8BD, 0xB8BDBCB8, 0xBCB7BDBC, 0xBEBFB7BD,
+ 0xB8BEBDB9, 0xBFB8C0BF, 0xBFBFB8C0, 0xB9C1C1B7,
+ 0xC0B9C1C1, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B7BFBF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0BF, 0xC0BFB8C0,
+ 0xB9BFBEB8, 0xC0BABFC0, 0xBFC0BBBF, 0xBBBFC0BB,
+ 0xC0BABFC0, 0xBFC0BABF, 0xBABFC0BA, 0xBEB8C0C0,
+ 0xC0C0B6BE, 0xB6BEBEB8, 0xC1B6C0C0, 0xBDBDB7C1,
+ 0xB7BFBFB5, 0xC0B8C0C0, 0xB9BAB8C0, 0xA8ADAEB4,
+ 0xBCB6BCBB, 0xBDBCB7BD, 0xB7BDBCB7, 0xBDB5BDBD,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xBEB6BEBE, 0xBDBDB6BE,
+ 0xB4BCBCB5, 0xBDB4BCBC, 0xBCBCB5BD, 0xB5BDBDB4,
+ 0xBCB6BBBC, 0xBBBAB6BB, 0xB4BCBBB3, 0xB6B0BBB9,
+ 0xBBB9ACBA, 0xAEBBB9AE, 0xBBB3BDBD, 0xBBBBB3BB,
+ 0xB3BBBBB3, 0xBEB8BCBD, 0xBBBCB9BD, 0xB8BDBEB6,
+ 0xBDBABFBE, 0xC0BFB8BE, 0xBAC0BFBA, 0xBFBBC0BE,
+ 0xC0BEBCC1, 0xBBC0BEBB, 0xBDB6BCBB, 0xC0BDB8BE,
+ 0xB6BBB9B9, 0xBEB8BDBC, 0xBFBEB9BF, 0xBAC0BFB9,
+ 0xBCB8BDBB, 0xBDBBB9BE, 0xBBBEBCBA, 0xB7B6BCB7,
+ 0xBAB8B6BC, 0xB4B7B5B7, 0xB7B7BBB6, 0xBBB9B8BC,
+ 0xB8BBB9B8, 0xB9B6BBB9, 0xBAB8B6BB, 0xB9BCBAB7,
+ 0xB7B8BCB7, 0xBBB7B8BC, 0xB8BCB7BA, 0xB6B8BCB6,
+ 0xBCB7B8BC, 0xB7BBB6B8, 0xB8B7BBB6, 0xBBB6B9BD,
+ 0xB8BCB6B7, 0x8AA4A79E, 0xA79D9394, 0xA4A89DA6,
+ 0xB1B0B9AF, 0xAEA4AEB9, 0xA0A99FA3, 0x9E9FA79D,
+ 0xA69DA0A8, 0x9FA49BA1, 0x9C9FA59A, 0xA59AA1A7,
+ 0xA0A499A1, 0x95A0A498, 0xA2939DA1, 0x9BA0919D,
+ 0x959CA094, 0x9D919DA1, 0x989C9099, 0x8C959C8D,
+ 0x998A949B, 0x92998A92, 0x8A969A8E, 0x998D9296,
+ 0x93978B95, 0x8A93978B, 0x94889296, 0x90948890,
+ 0x83929389, 0x8C808C8D, 0x878D8288, 0x7581897F,
+ 0x8881747C, 0x5E645F81, 0x00000100, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x171A1800, 0x72717674, 0x79727077,
+ 0x70786E71, 0x71777C73, 0x7B72787C, 0x7A7C7678,
+ 0x78797D77, 0x7E787A7E, 0x7A7E787A, 0x77777B76,
+ 0x938E787C, 0xBAC0BB8F, 0xB5BAC0BB, 0xB7B2B4BA,
+ 0xB9C0BBB0, 0xBFBBC0BE, 0xB6B1BCC1, 0xA4AAA5B0,
+ 0xA7A6ACA7, 0xACA7A6AC, 0xA8ACA7A8, 0xB1ADB2B0,
+ 0xB1B1ADB2, 0xAFB2B0AF, 0xA1AAB1AC, 0xA8A1A0A8,
+ 0xA1A8A1A0, 0xA7A7ABA6, 0xACA7A8AC, 0xA6ACA7A8,
+ 0xABA8AFAA, 0xA7A2A7B1, 0xA1A8A3A0, 0xAEA0A49F,
+ 0xB4AEB0B4, 0xB2B4AEB2, 0xA0A8ACA7, 0x9C97A1A5,
+ 0x989C9798, 0xA89DA19C, 0xACA7A9AD, 0xA8ACA7A8,
+ 0xA6A7ABA5, 0xACA7A8AC, 0xA8ACA7A8, 0x99A4ABA4,
+ 0xA09998A0, 0x98A09998, 0x9998A099, 0xA09998A0,
+ 0x99A09999, 0xA1A0A7A0, 0xA8A1A0A8, 0xA2A6A0A1,
+ 0x9DA4A79E, 0xA79EA3A6, 0xA2A79EA4, 0x9699A197,
+ 0xA19797A0, 0xA3ACA298, 0xAFB1BAB0, 0xB4AAB0B9,
+ 0xB0B9AFAB, 0xAEB6BBB2, 0xB7AEB4B7, 0xB2B7AEB2,
+ 0xB1B1B8B1, 0x8D86B0B8, 0x70787185, 0x72757974,
+ 0x746F7377, 0x70746E6E, 0x6A72756C, 0x736A7073,
+ 0x6E716872, 0x68697069, 0x6F6A676F, 0x04090769,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x42433F00, 0x7780847E, 0x82797B80,
+ 0x85897E7F, 0x84888C80, 0x958B8A91, 0x9198918D,
+ 0x90949990, 0x9D92979B, 0x999D9299, 0x979B9F94,
+ 0xA0949EA2, 0x9CA0949C, 0x969DA195, 0x9C909EA2,
+ 0x989C9098, 0x8F969D8E, 0x9F90979E, 0x989F9098,
+ 0x91979E8F, 0xA19299A0, 0x9DA2939C, 0x959CA094,
+ 0x9F939DA1, 0xA0A4989B, 0x9CA2A498, 0xADA1A6A8,
+ 0xA8ACA0AB, 0xA5A8ADA4, 0xACA1A9AE, 0xA4A9A0A8,
+ 0xB9B3B7B1, 0xBCB5B9C0, 0xB4BCB5B5, 0xB6B7BEB9,
+ 0xBEBBB0B9, 0xB6BDBAB5, 0xB9B8BDBB, 0xBDBBB8BE,
+ 0xB7BAB8BA, 0xB5B2B7B5, 0xB7B5B2B7, 0xB1B8B5B2,
+ 0xB8B2B8B7, 0xB6B7B0B8, 0xB2B8B7B1, 0xB9B7BCBA,
+ 0xBBBBB8BB, 0xBABCBCB9, 0xBEBBC0BE, 0xC0BFBBC0,
+ 0xBAC0BFBB, 0xBDBAC0BF, 0xBEBCB9C0, 0xB9C0BDB9,
+ 0xBFB9BFBE, 0xBFC0B7BF, 0xB7BCBDBA, 0xB8AFB7B7,
+ 0xC0C0B0B8, 0xB6C0C0B8, 0xBFB7BFBE, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8BDBE, 0xC0BFBABF, 0xB7BDBCBA, 0xC1B8C0C0,
+ 0xC1C0B9C1, 0xBBC1C0BB, 0xC1BAC2C2, 0xC1C0B9C1,
+ 0xBBC1C0BB, 0xBFB8C0C0, 0xBFBFB7BF, 0xB7BFBFB7,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xC0B8C0C0,
+ 0xBFBEB8C0, 0xB9BFBEB9, 0xBFBAC0BF, 0xBFBEBAC0,
+ 0xB9BFBEB9, 0xBDB6BDBA, 0xBFBEB9C0, 0xB7BDBCB9,
+ 0xBBB8BDBB, 0xC0BBB8BD, 0xB8BDBBBA, 0xBBB5BBBA,
+ 0xBCBDB5BA, 0xB7BCBDB7, 0xBCB7BDBC, 0xBFBEB7BD,
+ 0xBBC1C0B9, 0xBEBAC0BF, 0xBCBBB9BF, 0xB5BBBAB4,
+ 0xBEB7BDBC, 0xBFC0B9BF, 0xB8C0C0BA, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xBABFBEBA, 0xBEBABFBE, 0xBFBEBABF,
+ 0xBABFBEBA, 0xBEB9BEBF, 0xBFBEB9BF, 0xB9C0BDB9,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00020000,
+ 0x00010200, 0x00000100, 0x19000003, 0x2F43120E,
+ 0x281A3638, 0x803B284F, 0x5D9D674E, 0x7F5E9B7F,
+ 0x44664F7C, 0x24423222, 0x30253F30, 0x4520122A,
+ 0x233E3B2D, 0x3C274D32, 0xA36F5186, 0x65A58866,
+ 0x7859908A, 0x3A402E53, 0x2A462A1E, 0x33254138,
+ 0x08080808, 0xB8B70608, 0xB2B8B7B3, 0xBBB7BDBC,
+ 0xBDBBB6BC, 0xB9BEBCB8, 0xBBB8BDBB, 0xBEB9B8BD,
+ 0xB8BCB7BA, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB7BCBA, 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC, 0xBFBEB7BD,
+ 0xB9BFBEB9, 0xBCB9BFBE, 0xC0BFB8BF, 0xBAC0BFBA,
+ 0xBFBABFC0, 0xBEBFB9BE, 0xB9BEBFB9, 0xBFB9BEBF,
+ 0xBFBFB9BE, 0xB7BFBFB7, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBFBAC0BF, 0xBFC0BAC0, 0xBABFC0BA,
+ 0xC0B9BEBF, 0xBFC0BABF, 0xBABFC0BA, 0xBFB8C0C0,
+ 0xC0C0B7BF, 0xB8C0C0B8, 0xBFB6C0C0, 0xC1C1B5BF,
+ 0xB6BEBEB9, 0xC2B8BFC2, 0xB9BCB8BF, 0xA9AEAFB4,
+ 0xBCB6BCBB, 0xBDBCB7BD, 0xB7BDBCB7, 0xBDB4BCBC,
+ 0xBEBEB5BD, 0xB5BDBDB6, 0xBEB5BDBD, 0xBEBEB6BE,
+ 0xB5BDBDB6, 0xBDB4BCBC, 0xBDBDB5BD, 0xB4BCBCB5,
+ 0xBBB7BDBC, 0xBBBCB6BC, 0xB4BCBBB6, 0xB9B0BBB8,
+ 0xB4B6AFBD, 0xABB8BAA7, 0xBDB3BDBD, 0xBCBFB5BD,
+ 0xB5BCBFB5, 0xBCB7BBBC, 0xBDBCB7BB, 0xB9BEBDB8,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9C0BDB9, 0xBEBBC0BE,
+ 0xC0BFBBC0, 0xBBC0BFBB, 0xBDB9C0BD, 0xBDBAB9C0,
+ 0xB5BCB9B6, 0xBFB9BFBE, 0xC0BFBAC0, 0xB8BDBBBA,
+ 0xBBB9C0BD, 0xBDBCB7BE, 0xB8BDBBB8, 0xB7B6BCB7,
+ 0xBAB8B6BC, 0xB5BAB8B5, 0xB6B9BDB8, 0xBBB9B7BB,
+ 0xB6BBB9B6, 0xB8B5BAB8, 0xB9B7B5BA, 0xB5BAB8B4,
+ 0xB7B8BCB7, 0xBBB6B8BC, 0xB8BCB7B7, 0xB5B7BBB5,
+ 0xBCB6B5BC, 0xB7BBB5B8, 0xB6B8BCB7, 0xBDB6B7BB,
+ 0xB8BCB6B6, 0xB1B6BBB2, 0xBCB0B8BC, 0xB6BCB1B8,
+ 0xA1ACB4AA, 0xA8A1A0A8, 0xA1A8A1A0, 0x9A9FA79D,
+ 0xA59F9CA4, 0xA3A89FA1, 0x9B9FA59A, 0xA79CA0A6,
+ 0x9EA499A1, 0x98A0A498, 0xA498A0A4, 0x9DA195A0,
+ 0x939CA094, 0x9F939B9F, 0x989C909B, 0x8C969D8E,
+ 0x998A949B, 0x90978892, 0x8D95998D, 0x978B9599,
+ 0x989C9093, 0x8893978B, 0x94889094, 0x92968A90,
+ 0x86929488, 0x8F839092, 0x858B808B, 0x80828A80,
+ 0x87827F87, 0x5E645F81, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00020000,
+ 0x01000200, 0x484B4900, 0x72717772, 0x77707179,
+ 0x70786E6F, 0x72767B72, 0x7872767B, 0x7A7C7676,
+ 0x787A7E78, 0x807A7A7E, 0x7E807A7E, 0x77787C77,
+ 0xAAA3787C, 0xB9C0B9A3, 0xB5B5BCB5, 0xB7B0B5BC,
+ 0xB1B7B2B0, 0xBFBBC0BE, 0xBFBEBBC0, 0xBBC0BEBA,
+ 0xAFB6BBB9, 0xB4AFB0B4, 0xB6BBB9B0, 0xC0B9BFBE,
+ 0xBFC0BABF, 0xBBC0BFBB, 0xBFBDC2C0, 0xBBB6BEC4,
+ 0xB7BBB5B7, 0xAEBABBB7, 0xB4AFB1B2, 0xAEB4AFB0,
+ 0xADA9B0AD, 0xB0ADA7B0, 0xA9B0ABA9, 0x9FB0B4AF,
+ 0xA39FA0A4, 0xA2A39FA2, 0x96A1A5A0, 0x9C97979B,
+ 0x989C9798, 0x91939792, 0xA29D9296, 0x9DA19C9E,
+ 0x9BA1A39D, 0xA39DA1A4, 0x9EA29C9F, 0x99A5A9A3,
+ 0xA09999A0, 0xA3AAA399, 0xAEADB3AE, 0xB3AEADB3,
+ 0xADB3AEAF, 0xB1AFB5B0, 0xB4AFB0B6, 0xB2B6B1B0,
+ 0xB7B8BCB7, 0xBDB7BBBD, 0xB8BCB6BB, 0xADADB4AD,
+ 0xB5AEADB4, 0xB6BDB6AE, 0xB2B0B8B1, 0xB3ABB1B9,
+ 0xB0B8B1A8, 0xB1B4B8B2, 0xB5AFB3B7, 0xB2B6B0B1,
+ 0xB2B0B7B0, 0xA39CB1B9, 0x7078719B, 0x73757974,
+ 0x77727478, 0x73777271, 0x6A72746E, 0x71687273,
+ 0x6E716870, 0x69697069, 0x6F6A6870, 0x262B2969,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x01000000, 0x42433F00, 0x7880847E, 0x837A7C81,
+ 0x82867B80, 0x84858C7F, 0x958B8A91, 0x9198918D,
+ 0x90959A91, 0x9D92959B, 0x979E9197, 0x959CA094,
+ 0x9F939DA1, 0x9B9F939B, 0x939CA094, 0x9C909B9F,
+ 0x999D9198, 0x8F979B8F, 0x9E8F979B, 0x9A9F9099,
+ 0x909A9F90, 0x9F909A9F, 0x9A9E929A, 0x949A9E92,
+ 0xA0919CA0, 0x9BA0919B, 0xA0A0A498, 0xADA1A8AC,
+ 0xA8ACA0A9, 0xA2A6ABA2, 0xABA2A6AB, 0xA5AAA1A8,
+ 0xB9B0B4AE, 0xBBB4B9C0, 0xB8C0B9B4, 0xBAB6BDB8,
+ 0xBAB7B4BD, 0xB7BCBAB3, 0xBCB8BDBB, 0xBEB9BBBE,
+ 0xBABEB9BA, 0xB5B2B7B5, 0xB8B3B1B8, 0xB1B8B5B2,
+ 0xB7B1B7B6, 0xB7B7B0B8, 0xB2B8B7AF, 0xB9B6BBB9,
+ 0xBDBCB8BB, 0xBBC0BFB8, 0xBEBCC1BF, 0xC0BFBBC0,
+ 0xBAC0BFBA, 0xBDBAC0BF, 0xBEBCB8BE, 0xB9C0BDB9,
+ 0xBFBAC0BF, 0xBFC0B8C0, 0xBABFC0BA, 0xB6B2B8B7,
+ 0xC1C1AFB7, 0xB8C0C0B9, 0xBEBAC0BF, 0xBFC0B9BF,
+ 0xBABFC0BA, 0xBFB9BFBE, 0xC0C1BAC0, 0xBABFC0BB,
+ 0xBFB7BCBD, 0xBEBFB9BE, 0xB8BDBEB9, 0xC0BBC1C0,
+ 0xBFC0BBC1, 0xBBC0C1BA, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xBBC1C0BB, 0xBEB8C0BF, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xBEBAC0BF, 0xC0BFB9BF, 0xBAC0BFBB, 0xBFB7BFBF,
+ 0xBFBEB7BF, 0xB9BFBEB9, 0xBFB7BFBE, 0xBFBEB8C0,
+ 0xB9BFBEB9, 0xBDB8BDBB, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBBBABDBB, 0xBEBCBABD, 0xB8BDBBB9, 0xBDB5BBBA,
+ 0xBCBFB5BD, 0xB5BDBDB5, 0xBCB9BFBE, 0xBDBCB7BD,
+ 0xB6BCBBB7, 0xBBB6BCBB, 0xBFBCB6BC, 0xBAC0BFB8,
+ 0xC0B9BFBE, 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB8C0BF,
+ 0xBFBEB7BF, 0xB9BFBEB9, 0xBEBAC0BF, 0xBFBEB9BF,
+ 0xBAC0BFB9, 0xBEBAC0BF, 0xBFBEB9BF, 0xBAC1BEB9,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000100,
+ 0x00000001, 0x00000100, 0x18000003, 0x3041120F,
+ 0x281B3538, 0x7F3B294E, 0x5E9B674F, 0x7F5E9B80,
+ 0x46664E7E, 0x24423221, 0x30253F30, 0x4420122A,
+ 0x253F3A2C, 0x3C2B4D32, 0xA36F5186, 0x66A38866,
+ 0x765A8F88, 0x3A3F2E53, 0x2B4A2A1E, 0x3223423A,
+ 0x07080808, 0xB8B70507, 0xB2B8B7B3, 0xBEB9BFBE,
+ 0xBFBDB9BF, 0xB8BDBBBA, 0xBBB8BDBB, 0xBEB9B8BD,
+ 0xB8BCB7BA, 0xBBB9BEBC, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBEB7BDBC, 0xBEBDB9BF,
+ 0xB9BFBEB8, 0xBDB9C0BD, 0xBDBCB9C0, 0xB7BDBCB7,
+ 0xBFB7BCBD, 0xBFC0B9BE, 0xBABFC0BA, 0xC0BABFC0,
+ 0xC0C0BABF, 0xB9C1C1B8, 0xBEBAC0BF, 0xBEBDB9BF,
+ 0xB8BEBDB8, 0xBDB8BEBD, 0xBEBEB6BE, 0xB8C0C0B6,
+ 0xC0BBC0C1, 0xBFC0BABF, 0xBBC0C1BA, 0xBEB8C0C0,
+ 0xC0C0B6BE, 0xB8C0BFB8, 0xBFB8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC2B8C0C0, 0xB9BCB8BF, 0xA8ADAEB4,
+ 0xBFB7BCBD, 0xBEBDBAC0, 0xB7BDBCB8, 0xBDB5BDBD,
+ 0xBCBCB5BD, 0xB5BDBDB4, 0xBDB5BDBD, 0xBDBDB5BD,
+ 0xB5BDBDB5, 0xBCB4BCBC, 0xBDBDB4BC, 0xB6BEBEB5,
+ 0xBBB5BBBA, 0xBBBCB6BC, 0xB4BCBBB6, 0xB9B1BCBA,
+ 0xB1B3AEBB, 0xA6B1B5A4, 0xB8AEB7BA, 0xB7BAB0B8,
+ 0xB3BBBBB0, 0xBBB6BBBC, 0xBDBCB6BA, 0xB8BDBCB8,
+ 0xBDB7BDBC, 0xBFBCB8BE, 0xB9C0BDB8, 0xBBBBC0BE,
+ 0xBCBBB8BD, 0xB7BCBBB7, 0xBBB6BDBA, 0xC0BDB7BE,
+ 0xBAC1BEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BDBBB9,
+ 0xBBB9C0BD, 0xBDBCB7BE, 0xB8BDBBB8, 0xB6B6BBB9,
+ 0xBAB8B5BB, 0xB5BAB8B5, 0xB7B9BDB8, 0xBAB8B8BC,
+ 0xB5BAB8B5, 0xB8B4B9B7, 0xBAB8B5BA, 0xB6BBB9B5,
+ 0xB7B9BDB8, 0xBCB7B8BC, 0xB8BCB7B8, 0xB6B8BCB6,
+ 0xBCB6B6BD, 0xB7BBB5B8, 0xB7B8BCB7, 0xBCB6B8BC,
+ 0xB8BCB6B8, 0xB1B6BBB2, 0xBCB1B6BC, 0xB6BCB1B8,
+ 0xA0ACB4AA, 0xA8A1A0A7, 0xA1A8A1A1, 0x9DA1A99F,
+ 0xA69F9EA7, 0x9DA49D9F, 0x9C9FA49B, 0xA79CA1A7,
+ 0x9EA499A1, 0x98A0A499, 0xA498A0A4, 0xA0A498A0,
+ 0x909DA195, 0x9F93989C, 0x9B9F939B, 0x8E949B8C,
+ 0x9D8E969D, 0x939A8B96, 0x8D95998D, 0x978B9599,
+ 0x94988C93, 0x8895998D, 0x978B9094, 0x91958993,
+ 0x848F9185, 0x8C808E90, 0x888C8188, 0x7F828A80,
+ 0x87818189, 0x60645F83, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010101,
+ 0x01000000, 0x31353000, 0x71575B55, 0x796F7178,
+ 0x71796F71, 0x74777C73, 0x7B75767A, 0x767A7477,
+ 0x787A7D74, 0x817B7E81, 0x7C7C7681, 0x8E7A7B77,
+ 0xC1BA8F93, 0xB9C0B9BA, 0xB5B5BCB5, 0xBCB5B5BC,
+ 0xB5BBB6B5, 0xB4B0B5B3, 0xC1C0B0B5, 0xBBC0BEBC,
+ 0xB7B5BAB8, 0xBDB8B8BC, 0xB6BBB9B9, 0xBFBBC1C0,
+ 0xC0BFB8C0, 0xBABFBEBB, 0xBEB7BAB8, 0xC3BFBFC3,
+ 0xC2C3BFC2, 0xBFC2C3BF, 0xC4BFC0C4, 0xBEC4BFC0,
+ 0xBDBAC1BE, 0xC1BEB9C0, 0xBCC1BFBA, 0x9FB1B5B0,
+ 0x8480A0A4, 0x82837F83, 0x9790948F, 0x9C97989C,
+ 0x91959098, 0x87888C87, 0x9792888C, 0x93979293,
+ 0x888B8F89, 0x908A8C91, 0xA0A49E8C, 0xAEA5A9A3,
+ 0xB3ADB0B4, 0xB6BCB7AF, 0xB7B7BDB8, 0xBCB7B6BC,
+ 0xB7BBB6B8, 0xB7B6BCB7, 0xBBB9B6BC, 0xB8BBB9B8,
+ 0xB6B8BCB7, 0xBCB6B7BB, 0xB8BCB6B8, 0xB7B6BCB7,
+ 0xBCB7B6BC, 0xB8BCB7B8, 0xB1B1B8B1, 0xB3ACB0B8,
+ 0xABB2ABAB, 0xAEB0B4AE, 0xB4AEB0B4, 0xB0B4AEB0,
+ 0xB1B1B8B1, 0xB8B1B0B8, 0x9BA39CB0, 0x72757974,
+ 0x73717377, 0x70746F70, 0x6A6F716B, 0x766D7273,
+ 0x6E716875, 0x69697167, 0x4D486970, 0x292C2A49,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x01000000, 0x42433F00, 0x7880847E, 0x82797C81,
+ 0x82867B7D, 0x84888C80, 0x8F868A91, 0x8F948B8A,
+ 0x90949A8F, 0x9E91959B, 0x979E9197, 0x959B9F93,
+ 0x9F939DA1, 0x9DA1959B, 0x909CA094, 0x9C90989C,
+ 0x989C9098, 0x909A9E92, 0x9D91989C, 0x9A9F9099,
+ 0x909A9F90, 0x9E929A9F, 0x9B9F939A, 0x939CA094,
+ 0xA2939B9F, 0x9BA0919D, 0xA19FA397, 0xACA0A9AD,
+ 0xA8ACA0A8, 0xA4A8ADA4, 0xAEA5A8AD, 0xA7ACA3AB,
+ 0xB5AEB6AC, 0xBCB5B5BC, 0xB5BBB6B5, 0xBAB3BAB5,
+ 0xB9B7B6BD, 0xB7BCBAB4, 0xBBBABDBB, 0xBDBBBABD,
+ 0xBABEB9BA, 0xB4B3B9B4, 0xB8B6B2B9, 0xB1B8B5B3,
+ 0xB8B1B7B6, 0xB7B7B1B9, 0xB2B8B7AF, 0xB9B6BBB9,
+ 0xC0BFB6BB, 0xBBC0BFBB, 0xBEBBC0BF, 0xBFC0BBC0,
+ 0xB8C0C0BA, 0xBFBBC1C0, 0xBEBCBAC0, 0xB7BEBBB9,
+ 0xBFB9BFBE, 0xC0C1B8C0, 0xB9BEBFBB, 0xB6B5BBBA,
+ 0xC0C0B1B7, 0xB8C0C0B8, 0xBDBAC0BF, 0xBEBFB8BE,
+ 0xBABFC0B9, 0xBEB6BCBB, 0xBFC0B9BF, 0xBABFC0BA,
+ 0xBFB9BEBF, 0xBFC0B9BE, 0xBBC0C1BA, 0xBFBBC1C0,
+ 0xBFC0BAC0, 0xBBC1C0BA, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xBBC1C0BB, 0xBEB8C0BF, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBB, 0xC0B8C0C0,
+ 0xBFBEB8C0, 0xB9BFBEB9, 0xBFB8C0BF, 0xBFBEB8C0,
+ 0xB7BDBCB9, 0xBEBABFBD, 0xBFBDBBC0, 0xBBC0BEBA,
+ 0xBAB8BDBB, 0xBCBAB7BC, 0xB6BDBAB7, 0xBEB2BABA,
+ 0xBCBFB6BE, 0xB6BEBEB3, 0xBEB9BFBE, 0xBDBBB9BF,
+ 0xB8BDBBB8, 0xB8B6BCBB, 0xBCB9B4BB, 0xB9C0BDB5,
+ 0xC0B8C0BF, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBAC0BFBA, 0xBEBAC0BF, 0xBFBEB9BF,
+ 0xBAC0BFB9, 0xBEBAC0BF, 0xC0BDB9BF, 0xBBC0BEB9,
+ 0xB9B8BBB9, 0x3E3EB8BB, 0x0000003E, 0x00000100,
+ 0x00000001, 0x00000000, 0x18000003, 0x3041140F,
+ 0x291A353A, 0x7F3B294E, 0x5E9B674F, 0x7F5E9B7F,
+ 0x47644E7E, 0x23433220, 0x30253F30, 0x451F122A,
+ 0x243E3A2D, 0x31204231, 0xA36F5186, 0x66A38866,
+ 0x765A8F88, 0x3A3F2E53, 0x2F4E2A1E, 0x3223423E,
+ 0x09090909, 0xBBB90709, 0xB6BBB9B6, 0xBEB9BFBE,
+ 0xBEBCB9BF, 0xB7BCBAB9, 0xBBB8BDBB, 0xBEB9B8BD,
+ 0xB8BCB7BA, 0xBBBABFBD, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBBB7BEBB, 0xBDBCB7BE,
+ 0xB7BDBCB7, 0xBBB4BBB8, 0xBDBCB7BE, 0xB9BFBEB7,
+ 0xBEB6BEBD, 0xC0BFB7BF, 0xB8C0BFB8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xC0BBBFC0, 0xBFC0BBBF,
+ 0xBBC0C1BB, 0xBEBAC0BF, 0xBEBDB9BF, 0xB9BFBEB8,
+ 0xBDB7BDBC, 0xBEBDB8BE, 0xB8BEBDB8, 0xBCB9BFBE,
+ 0xBDBCB7BD, 0xB9C0BDB7, 0xBDB9BFBE, 0xBFBEB9C0,
+ 0xB7BDBCB9, 0xBDB7BDBC, 0xB8B9B7BC, 0xB1B6B7B3,
+ 0xBEB5BDBD, 0xBDBDB6BE, 0xB5BDBDB5, 0xBBB3BBBB,
+ 0xBBBBB3BB, 0xB2BABAB3, 0xBDB3BBBB, 0xBBBBB5BD,
+ 0xB3BBBBB3, 0xBBB3BBBB, 0xBBBBB3BB, 0xB3BBBBB3,
+ 0xBAB6BCBB, 0xB8B8B5BB, 0xB3BBBBB0, 0xB8B3BBBB,
+ 0xB6B9AEB8, 0xAEB7BAAD, 0xBBB3BBBB, 0xBBBBB3BB,
+ 0xB3BBBBB1, 0xBAB5BABB, 0xBABAB6BB, 0xB6BBBAB8,
+ 0xBBB7BEBB, 0xBDBCB7BE, 0xB8BDBCB8, 0xBAB9BEBD,
+ 0xB8B7B6BB, 0xB5BBBAB2, 0xBDB6BDBA, 0xBFBDB9C0,
+ 0xB9C0BDBA, 0xBFB9BFBE, 0xBFBEBAC0, 0xB8BEBDB9,
+ 0xBEB8BDBC, 0xBDBDBABF, 0xBABDBBBB, 0xB8B6BBB9,
+ 0xBDBBB7BD, 0xB8BBB9BA, 0xB8B8BCB7, 0xBCB7B9BD,
+ 0xBABEB9B8, 0xB7B8BCB7, 0xBBB6B8BC, 0xB8BCB7B7,
+ 0xB9B9BCBA, 0xBBB7B8BB, 0xB8BCB7BA, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB7BBB6B8, 0xB6B7B9B3, 0xBCB6BABC,
+ 0xBABCB6BA, 0xB4BABCB6, 0xBDB4BABD, 0xBBBFB4BA,
+ 0xA1AEB3AA, 0xA9A0A5AA, 0xA2AAA0A4, 0xA1A3ABA4,
+ 0xA8A39EA9, 0xA3ABA4A1, 0x9BA0A89E, 0xA59B9DA5,
+ 0xA2A89D9D, 0x99A0A499, 0xA599A0A4, 0xA0A498A1,
+ 0x96A0A498, 0x9F939EA2, 0x9DA1959B, 0x8F999D91,
+ 0x9E92979B, 0x95998D9A, 0x8B93978B, 0x998D9397,
+ 0x97998D97, 0x8C93978B, 0x968A9498, 0x90948892,
+ 0x858C9085, 0x8C828C90, 0x868A7F8B, 0x79808479,
+ 0x837A7E84, 0x5E605A80, 0x00000100, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x02000000, 0x22231F01, 0x45363832, 0x79704B4E,
+ 0x75786F76, 0x77787C76, 0x7B76787C, 0x787C7677,
+ 0x787E8178, 0x81788081, 0x80807A80, 0xA88E8F8B,
+ 0xBCB7A9AD, 0xB8BCB7B8, 0xB7B8BCB7, 0xBBB6B8BC,
+ 0xB8BCB7B7, 0xB2B8BCB7, 0xB6B1B3B7, 0xB6BCB7B2,
+ 0xB2B3B9B4, 0xBCB7B3B7, 0xB8BCB7B8, 0xBBB5BAB8,
+ 0xBDBBB8BD, 0xBABDBBB8, 0xB2B8BCB7, 0xB7B2B3B7,
+ 0xB8BCB7B3, 0xBFBEC2BD, 0xBDBBBCC1, 0xB8BDBBB8,
+ 0xB9B8BBB9, 0xBEBCB8BB, 0xBBBEBCBB, 0xB7B8BCB7,
+ 0xACA7B8BC, 0x8C908BA8, 0x97989C97, 0x9C97989C,
+ 0x989C9798, 0x9FA0A49F, 0xA39EA0A4, 0xA0A49F9F,
+ 0xA1A4A8A2, 0xA7A2A1A8, 0xB8BCB7A1, 0xAEB3B7B2,
+ 0xB4AFAFB3, 0xB3B7B2B0, 0xB2AFB3AE, 0xB7B2B3B7,
+ 0xB3B7B2B3, 0xB3B3B7B2, 0xB9B5B4B8, 0xB7B8B4B8,
+ 0xB2B5B9B4, 0xB7B2B3B7, 0xB0B6B1B3, 0xB0AEB3B1,
+ 0xB3B1ADB2, 0xB0B3B1B0, 0xB2B1B5B0, 0xB4AFB3B7,
+ 0xB3B7B2B0, 0xB4B4B5B1, 0xB9B4B7B8, 0xB3B7B2B5,
+ 0xB7AFB5B0, 0xB5B0B6BC, 0xA1A7A2AF, 0x6F70746F,
+ 0x746F7074, 0x70746F70, 0x686E706A, 0x6F696C6E,
+ 0x6B70676D, 0x47676C63, 0x34304B50, 0x18191733,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x40443F00, 0x777C837C, 0x837A7981,
+ 0x81847B7E, 0x81868A7F, 0x958A888C, 0x8E948991,
+ 0x91949A8F, 0x9C90969C, 0x989C9098, 0x939EA094,
+ 0x9C909D9F, 0x9DA19598, 0x93A0A498, 0x9C909B9F,
+ 0x989C9098, 0x929C9D93, 0x9C909C9E, 0x9B9D919A,
+ 0x93989C90, 0xA09399A0, 0x99A09399, 0x9299A093,
+ 0xA094989F, 0x9DA1959C, 0x9F9BA295, 0xACA0A5AC,
+ 0xA9ADA1A8, 0xA2A6ABA2, 0xAAA1A6AB, 0xA7ACA3A5,
+ 0xB3B1B9AF, 0xBDB6B5BD, 0xB7BBB6B6, 0xB7B5BBB6,
+ 0xBBB6B6BC, 0xB8BBB9B7, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BCB7BA, 0xB7B8BEB9, 0xBDBBB6BC, 0xB5BBBAB8,
+ 0xB8B3B9B8, 0xB8B8B0B8, 0xB2B8B7B0, 0xBDB6BBB9,
+ 0xC0BFBABF, 0xBAC0BFBA, 0xBDBBC0BF, 0xBFC0BABF,
+ 0xBABFC0BA, 0xBEB8C0BF, 0xC0BDB7BF, 0xB9C0BDB9,
+ 0xBFB7BDBC, 0xBFC0BAC0, 0xBABFC0BA, 0xBBB7BCBB,
+ 0xBCBBB6BC, 0xB8C0BFB4, 0xC0B8C0C0, 0xBFBFB8C0,
+ 0xB7BFBFB7, 0xBFB5BBBA, 0xC0C0BAC0, 0xB8C0C0B8,
+ 0xC0B9C1C1, 0xBEBFB8C0, 0xBABFC0B9, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBCC1C0BC, 0xBFBBC1C0, 0xC1C0BBC2,
+ 0xBAC0BFBB, 0xBEB8C0BF, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xC0B9C1C1,
+ 0xBFBEB8C0, 0xB9BFBEB9, 0xBFB9BFBE, 0xC0BDBAC0,
+ 0xB4BBB8B9, 0xBDBABFBD, 0xBFBDBABF, 0xB9BEBCBA,
+ 0xBBBABFBD, 0xC0BDB7BE, 0xB5BCB9B9, 0xBDB4BCBC,
+ 0xBCBFB5BD, 0xB5BDBDB5, 0xBBB7BDBC, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xB6B6BDBA, 0xBAB7B0B9, 0xB6BDBAB3,
+ 0xBFB9BFBE, 0xBFC0BAC0, 0xB8C0C0BA, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xBFB8C0BF, 0xC1BEBAC0,
+ 0xBBC0BEBA, 0xBEBBC0BE, 0xC0BFBBC0, 0xBBC0BEBB,
+ 0xB9B8BBB9, 0x3E3EB8BB, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000000, 0x19000003, 0x33431510,
+ 0x2D1D353E, 0x80422E51, 0x629D6A53, 0x80629D80,
+ 0x48654F7F, 0x23433321, 0x30253F30, 0x4520162D,
+ 0x233D382E, 0x3221432E, 0xA36F5284, 0x66A38866,
+ 0x76599088, 0x3A3F2E53, 0x31502A1E, 0x32234240,
+ 0x08080808, 0xBCBA0808, 0xB7BCBAB9, 0xBEB9BFBE,
+ 0xBFBDB9BF, 0xBBC0BEBA, 0xBBB8BDBB, 0xBEB9B8BD,
+ 0xB8BCB7BA, 0xBBB9BEBC, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBBB7BEBB, 0xBDBCB7BE,
+ 0xB7BDBCB7, 0xBDB9C0BD, 0xBFBEB9C0, 0xBAC0BFB9,
+ 0xBEB9BFBE, 0xBFBEB7BF, 0xB7BFBEB9, 0xC0B8C0C0,
+ 0xBEBFB8C0, 0xB9BEBFB9, 0xC0BABFC0, 0xBFC0BABF,
+ 0xBABFC0BB, 0xBEB9BFBE, 0xBFBEB9BF, 0xBBC1C0B9,
+ 0xBEBAC0BF, 0xC0BFB9BF, 0xBBC1C0BA, 0xBDBAC0BF,
+ 0xBEBDB8BE, 0xB9C0BDB8, 0xBBB7BEBB, 0xBEBBB7BE,
+ 0xB7BEBBB7, 0xBCB8BEBD, 0xBCBDB7BD, 0xB7BCBDB7,
+ 0xBEB4BCBC, 0xBDBDB6BE, 0xB5BDBDB5, 0xBDB5BDBD,
+ 0xBCBCB5BD, 0xB5BDBDB4, 0xBBB5BDBD, 0xBBBBB3BB,
+ 0xB5BDBDB3, 0xBDB5BDBD, 0xBDBDB5BD, 0xB2BABAB5,
+ 0xBDB5BDBD, 0xBBBBB5BD, 0xB4BCBCB3, 0xBFB3BABD,
+ 0xBBBBB5BC, 0xB3BBBBB3, 0xBAB3BBBB, 0xBBBBB2BA,
+ 0xB5BDBDB3, 0xBDB9BFBE, 0xBDBDB9BE, 0xB9BEBDBB,
+ 0xBDBABFBD, 0xBDBCB9C0, 0xB8BDBCB8, 0xBAB9BEBD,
+ 0xB9B8B6BB, 0xB6BCBBB4, 0xBDB6BDBA, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEBABFBE, 0xBEBDBABF, 0xB6BBBAB9, 0xB9B6BBB9,
+ 0xBDBBB8BE, 0xB8BBB9BA, 0xB9BABEB9, 0xBCB7BABE,
+ 0xBABEB9B8, 0xB6B7BBB6, 0xBCB7B7BB, 0xB8BCB7B8,
+ 0xB9B9BCBA, 0xBEB9B8BB, 0xB8BCB7BA, 0xB7B9BDB8,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB5B8BAB4, 0xBDB7B9BB,
+ 0xBABCB6BB, 0xB6B9BBB5, 0xBDB4BABC, 0xBEC1B8BA,
+ 0x9FAFB4AB, 0xA9A0A4AA, 0x979F95A4, 0x9A97A29A,
+ 0xA19B95A2, 0x9CA49D97, 0x9A9DA59B, 0xA1979CA4,
+ 0x9FA49B99, 0x999FA59A, 0xA397A0A4, 0xA1A5999F,
+ 0x97A0A498, 0xA1959FA3, 0x989C909D, 0x919A9E92,
+ 0x9B8F999D, 0x979B8F97, 0x8C989C90, 0x968A9498,
+ 0x97998D94, 0x8D93978B, 0x978B9599, 0x91958993,
+ 0x858C9085, 0x89808C90, 0x88897F88, 0x78808478,
+ 0x83798084, 0x60615882, 0x00000100, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x01010100, 0x00000000,
+ 0x01000000, 0x22231F00, 0x30383832, 0x4E453839,
+ 0x7979734D, 0x777A7B77, 0x7C77787C, 0x787C7678,
+ 0x787E8178, 0x7F798081, 0x7D7F797D, 0xB79D9E9A,
+ 0xBCB7B8BC, 0xB9BDB8B8, 0xB4B4B7B5, 0xBCB7B3B6,
+ 0xB8BCB7B8, 0xB8B7BBB6, 0xB9B4B9BD, 0xB3B7B2B5,
+ 0xB4B5B9B4, 0xBCB7B5B9, 0xB8BCB7B8, 0xB2B4BAB5,
+ 0xBBB6B1B7, 0xB9BDB8B7, 0xB7B9BDB8, 0xB9B4B8BC,
+ 0xAFB3AEB5, 0xBBB7BBB6, 0xBDBBB8BD, 0xBDC2C0B8,
+ 0xBDBEC1BF, 0xBDBBBEBF, 0xB8BBB9BA, 0xB8B8BCB7,
+ 0xBCB7B9BD, 0xB8BCB7B8, 0xB7B8BCB7, 0xCCC7B8BC,
+ 0xC8CCC7C8, 0xBFC1C5C0, 0xC4BFC0C4, 0xBFC3BEC0,
+ 0xB5BEC5BE, 0xBBB6B5BC, 0xBDC3BEB5, 0xB7B8BCB7,
+ 0xB8B6B8BC, 0xB5B9B4B5, 0xB2B5B9B4, 0xB7B2B3B7,
+ 0xB5B9B4B3, 0xB4B2B6B1, 0xB8B4B5B9, 0xB7B8B4B7,
+ 0xB2B3B7B2, 0xB3AEB3B7, 0xAEB4AFAD, 0xB7B0B5B3,
+ 0xB8B7B4B9, 0xB3B6B4B3, 0xB4B0B4AF, 0xB8B4B5B9,
+ 0xB5B6B2B7, 0xB2B5B6B2, 0xB4AFB5B6, 0xB1B5B0B0,
+ 0xB0AFB5B0, 0xBDB8AFB5, 0xABAFAAB9, 0x6F848883,
+ 0x746F7074, 0x71757070, 0x69767872, 0x6F696D6F,
+ 0x6B6F696B, 0x2D676A61, 0x34303336, 0x18191733,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x40443F00, 0x787C837C, 0x837A7A82,
+ 0x80857C7E, 0x83868980, 0x94888B8C, 0x90948890,
+ 0x8F949A8F, 0x9D91949A, 0x9A9E9299, 0x959C9E92,
+ 0xA2969FA1, 0x9DA1959E, 0x95A0A498, 0x9C909DA1,
+ 0x989C9098, 0x949C9D93, 0x9E929D9E, 0x9D9F939E,
+ 0x91989C90, 0xA093979E, 0x989F9299, 0x969BA295,
+ 0xA4989CA3, 0xA0A498A0, 0x9C9EA598, 0xACA0A2A9,
+ 0xA7ABA0A8, 0xA4A9AEA5, 0xADA4A8AD, 0xA8ADA4A8,
+ 0xB6B0B8AE, 0xB8B1B8C0, 0xBABEB9B1, 0xB7BABEB9,
+ 0xBFBAB8BC, 0xB8BBB9BB, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BBB9BA, 0xB9B7BDB8, 0xBFBDB8BE, 0xB9BFBEBA,
+ 0xB8B5BABB, 0xB8B8B0B8, 0xB0B8B7B0, 0xBEB6BDBA,
+ 0xC0BFBAC1, 0xB7BFBEB8, 0xBDBAC0BF, 0xC0BFBABF,
+ 0xBABFC0BA, 0xBCBAC0BF, 0xC0BDB5BD, 0xBBC2BFB9,
+ 0xBEB9BFBE, 0xC0C1B9BF, 0xB9BEBFBB, 0xBBB7BCBB,
+ 0xBDBCB7BC, 0xB5BDBCB7, 0xC1B8C0C0, 0xC0C0B9C1,
+ 0xB3BBBAB8, 0xBEB7BDBC, 0xC1C1B9BF, 0xB6C0C0B9,
+ 0xC0B8C0C0, 0xBEBFB8C0, 0xB9BEBFB9, 0xC0BBC1C0,
+ 0xC1C0BBC1, 0xBCC1C0BC, 0xBFBBC2BF, 0xC1C0BBC2,
+ 0xBBC1C0BB, 0xBDB8C0BF, 0xC0C0B6BE, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBFB8C0C0,
+ 0xBFBEB7BF, 0xBAC0BFB9, 0xBEB9BFBE, 0xBFBCB9BF,
+ 0xB5BCB9B8, 0xBCB9BEBC, 0xC0BEB9BE, 0xBABFBDBB,
+ 0xBDB9C0BD, 0xC0BDB9C0, 0xB4BBB8B9, 0xBDB3BBBB,
+ 0xBABDB5BD, 0xB3BBBBB3, 0xBBB8BDBC, 0xBDBBB8BD,
+ 0xB9C0BDB8, 0xB8B4BDBA, 0xBAB5B2BB, 0xB6BDBAB3,
+ 0xBEB9C0BD, 0xBEBFB9BF, 0xBABFC0B9, 0xC0B7BFBF,
+ 0xBEBFB8C0, 0xB7BFBFB9, 0xBFB8C0BF, 0xC1BEB8C0,
+ 0xBBC0BEBA, 0xBEBBC0BE, 0xC0BFBBC0, 0xBBC0BEBB,
+ 0xB9B8BBB9, 0x3E3EB8BB, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000000, 0x19000003, 0x33431510,
+ 0x2D1D353E, 0x80422E51, 0x639B6A53, 0x7E629D80,
+ 0x47665080, 0x23433220, 0x30253F30, 0x441F152C,
+ 0x253C382F, 0x3221432F, 0xA36F5284, 0x66A68866,
+ 0x78599089, 0x3A402E53, 0x2F4E2A1E, 0x3223423E,
+ 0x08080808, 0xBBB90808, 0xB6BBB9B8, 0xBEB8BEBD,
+ 0xBDBBB9BF, 0xB7BCBAB8, 0xB9B8BEB9, 0xBDBBB8BE,
+ 0xB8BBB9BA, 0xBCB8BDBC, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xB9B8BEB9, 0xBDBBB8BE, 0xB8BDBBB8, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBBB7BEBB, 0xBCBBB7BE,
+ 0xB7BDBCB6, 0xBAB7BEBB, 0xBFBEB6BD, 0xB8BEBDB9,
+ 0xBEB7BDBC, 0xC0BFB9BF, 0xB9BFBEBB, 0xBEB9BFBE,
+ 0xBFBFB9BF, 0xB9C1C1B7, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xB8C0C0BA, 0xC0B8C0C0, 0xBFBEBABF, 0xB9BFBEB9,
+ 0xC0BABFC0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0,
+ 0xBEBFB7BF, 0xBBC1C0B9, 0xBFB8C0BF, 0xBFBEB8C0,
+ 0xBBC1C0B9, 0xC0B6BEBE, 0xBCBFB8C0, 0xB5BCBFB5,
+ 0xBDB5BDBD, 0xBDBDB5BD, 0xB5BDBDB5, 0xBDB5BDBD,
+ 0xBEBEB5BD, 0xB5BDBDB6, 0xBBB5BDBD, 0xB8B8B3BB,
+ 0xB4BCBCB0, 0xBCB6BEBE, 0xBCBCB4BC, 0xB6BEBEB4,
+ 0xBCB4BCBC, 0xBBBBB4BC, 0xB4B9BAB3, 0xBBB3BBBB,
+ 0xBCBCB3BB, 0xB3BBBBB2, 0xBBB3BBBB, 0xBABAB3BB,
+ 0xB3BBBBB2, 0xBAB5BBBA, 0xBEBDB6BB, 0xB7BCBBB9,
+ 0xBBB6BBB9, 0xBDBAB8BD, 0xBABFBDB6, 0xBDBABFBE,
+ 0xBDBEB9BE, 0xB9BEBDB9, 0xBAB6BDBA, 0xC0BBB6BD,
+ 0xBABFBDBA, 0xBFB9BFBE, 0xBEBDBAC0, 0xB8BDBCB9,
+ 0xBBB8BDBB, 0xBBBAB8BD, 0xB7BCBBB6, 0xBBB8BDBB,
+ 0xBEBCBABD, 0xB7BAB8BB, 0xB9B8BCB7, 0xBCB7BABE,
+ 0xB6BCB7B6, 0xB7B8BCB7, 0xBAB8B8BC, 0xB6BBB9B5,
+ 0xB7B8BCB7, 0xBDB8B8BC, 0xB8BCB7B9, 0xB5B8BCB6,
+ 0xBBB5B7BB, 0xBABCB6B9, 0xB6B8BCB7, 0xBCB7B7BB,
+ 0xBABBB7B8, 0xB6BABCB6, 0xBCB6BCBC, 0xBEC1B8BA,
+ 0x96AEB3AA, 0xABA198A0, 0xA2AAA0A3, 0x9D9BA69E,
+ 0xA19B9AA5, 0x9CA49D97, 0xA1A0A89E, 0xA59AA6AC,
+ 0x9FA59A9F, 0x999FA59A, 0xA59A9EA4, 0x9FA398A1,
+ 0x99A0A498, 0xA195A1A5, 0x9B9F939D, 0x92999D91,
+ 0x9A8F9A9E, 0x969A8F96, 0x90939A8D, 0x988C969D,
+ 0x969A8E94, 0x8B94988C, 0x998A9397, 0x90948894,
+ 0x828C9085, 0x897F898D, 0x88897F88, 0x77808478,
+ 0x83797F83, 0x60605A82, 0x00000100, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000002, 0x01000001,
+ 0x01000101, 0x23242000, 0x2F383930, 0x39313A39,
+ 0x63635D3B, 0x797A7B77, 0x7C77787B, 0x7A7C7678,
+ 0x77808178, 0x817C7D80, 0xA8ACA77D, 0xB6B8BBB9,
+ 0xBCB7B7BB, 0xB6BDB6B8, 0xB2B3B9B4, 0xB8B3B3B7,
+ 0xB7B8B4B4, 0xB7BBBCB8, 0xBCB7B8BC, 0xB8BBB9B8,
+ 0xB6B8BBB9, 0xB8B3B5B8, 0xB0B4AFB4, 0xB5B5BCB5,
+ 0xB6B1B5BC, 0xB1B7B2B0, 0xB6B8BCB7, 0xB9B5B8BC,
+ 0xB5B9B4B8, 0xB2B7BBB6, 0xB7B2B3B7, 0xB8BEB9B1,
+ 0xBDBCBFBD, 0xBFBDBCBF, 0xBCBFBDBC, 0xB7BABBB7,
+ 0xBBB7BABB, 0xBABBB7BA, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xBFC2C3BF, 0xC4BFC2C3, 0xB5B9B4C0,
+ 0xB4B7BBB5, 0xBCB5B4BB, 0xB6BDB6B5, 0xB4B5B9B4,
+ 0xBCB7B5B9, 0xB6BCB7B8, 0xAEB5B9B4, 0xB9B3B0B4,
+ 0xBABCB6B7, 0xB7B8BCB7, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB7B9BDB8, 0xB7B2B8BC, 0xAEB4AFB3, 0xB5B1B6B4,
+ 0xB7B4B1B8, 0xB1B6B4B0, 0xADB0B4AF, 0xB4AFAFB3,
+ 0xB0B4AFB0, 0xB5B0B3B1, 0xB6B1B4B7, 0xB0B4AFB2,
+ 0xB7AFB5B0, 0xBCB7B6BC, 0xB8BCB7B8, 0x84B0B4AF,
+ 0x75708589, 0x71726E71, 0x69797973, 0x6F696F6F,
+ 0x6C706A6D, 0x2F4D4F49, 0x34303335, 0x18191733,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x40443F00, 0x777E857E, 0x84797981,
+ 0x7F847B7E, 0x84898C83, 0x8F838A8D, 0x9094888B,
+ 0x90969A8F, 0x9D91979B, 0x999D9199, 0x949DA196,
+ 0xA0949B9F, 0x9DA1959C, 0x93A0A596, 0xA0949DA2,
+ 0x989C909C, 0x929E9F95, 0x9F959B9C, 0x9C9D939E,
+ 0x909D9F93, 0xA192989C, 0x9DA2939C, 0x97A1A599,
+ 0xA3999FA3, 0xA0A499A2, 0x9DA2A99C, 0xACA0A3AA,
+ 0xA8ACA1A8, 0xA7A8ADA4, 0xADA4A9AD, 0xA7ACA3A8,
+ 0xB8B8BCB6, 0xBDB6B8BF, 0xB5BBB6B6, 0xBAB8BEB9,
+ 0xBDBBB7BC, 0xB8BBB9BA, 0xBBB8BDBB, 0xBDBBB7BE,
+ 0xB8BDBBB8, 0xBBB5BAB8, 0xBDBBB8BD, 0xB9BFBEB8,
+ 0xBDB7BCBD, 0xBBBBB5BD, 0xB5BDBDB3, 0xBEB7BFBE,
+ 0xC1C1B7BF, 0xB8C0BFB9, 0xBDB9BFBE, 0xBFBEB9C0,
+ 0xBAC0BFBA, 0xBFBAC0BF, 0xBFBEBAC0, 0xB9BFBEB9,
+ 0xBEBAC0BF, 0xC0C0B9BF, 0xBABFC0B8, 0xBCB7BCBB,
+ 0xC0C1B8BD, 0xB7BCBDBB, 0xBFB8C0BF, 0xBEBDB8C0,
+ 0xB5BDBCB6, 0xBFB6BCBB, 0xBFBFBAC0, 0xB6C0C0B7,
+ 0xC0B6C0C0, 0xBFC0B8C0, 0xB9BEBFBA, 0xC0BBBFC0,
+ 0xBFBFBBBF, 0xBCC1C0BD, 0xC0BBC1C0, 0xC3C0BBC1,
+ 0xBBC2BFBC, 0xBCB8C0BF, 0xBEBFB5BD, 0xBABFC0B9,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBFB7BFBF,
+ 0xBFBEB7BF, 0xB8BFBCB9, 0xBFB9BFBE, 0xBDBBBAC0,
+ 0xB8BDBBB8, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBEB9BFBE, 0xBFBDB9BF, 0xB6BBB9BA, 0xC0B5BABB,
+ 0xBCBFB8C0, 0xB5BDBDB5, 0xBCBABFBE, 0xBFBEB9BE,
+ 0xB9BFBEB9, 0xB7B4BDBA, 0xBAB7B1BA, 0xB3BCB9B1,
+ 0xBCB9C0BD, 0xBEBDB8BF, 0xBAC0BFB8, 0xC0B8C0C0,
+ 0xBFC2B8C0, 0xB8C0C0B8, 0xBFB8C0BF, 0xC1BEB8C0,
+ 0xBAC1BCBA, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xB9B8BBB9, 0x3E3EB8BB, 0x0000003C, 0x00000000,
+ 0x00000000, 0x02000000, 0x19020003, 0x3244170F,
+ 0x2D1C373E, 0x80442E51, 0x629D6C52, 0x7E629D80,
+ 0x47655180, 0x23433021, 0x30244030, 0x4420172C,
+ 0x243C382F, 0x3B2A4C31, 0xA36F5186, 0x65A58866,
+ 0x7858918A, 0x3A402E53, 0x2F4E2A1E, 0x3223423E,
+ 0x07070707, 0xBCB70809, 0xB8BBB9B8, 0xBEB8BDBC,
+ 0xBDBBB9BF, 0xB8BDBBB8, 0xB9B8BEB9, 0xBDBBB8BE,
+ 0xB8BBB9BA, 0xBCB8BDBC, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xB9B9BFBA, 0xBDBBB8BE, 0xB8BDBBB8, 0xBCB8BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBBB7BEBB, 0xBDBCB7BE,
+ 0xB7BDBCB7, 0xBDB8BFBC, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xBEBABFBE, 0xBFBEBABF, 0xBABFBEBA, 0xBEB9BFBE,
+ 0xBFBFB9BF, 0xB8C0C0B7, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC1B8C0C0, 0xBFBEB9C1, 0xB9BEBFB9,
+ 0xC2BABFC0, 0xBFC2B8BF, 0xB8BFC2B8, 0xC0B8C0C0,
+ 0xBEBFB8C0, 0xBABFC0B9, 0xC0B7BFBE, 0xBEBDB9C1,
+ 0xB9BFBEB8, 0xC0B7BFBF, 0xBDBDB8C0, 0xB5BDBDB5,
+ 0xBDB5BDBD, 0xBDBDB5BD, 0xB5BDBDB5, 0xBDB5BDBD,
+ 0xBDBDB5BD, 0xB5BDBDB5, 0xBDB5BDBD, 0xBDBDB5BD,
+ 0xB5BDBDB5, 0xBBB3BBBB, 0xBEBEB3BB, 0xB3BBBBB6,
+ 0xBCB1BBBB, 0xBBBBB4BC, 0xB7BCBDB3, 0xBBB3BBBB,
+ 0xBABAB3BB, 0xB5BDBDB2, 0xBAB3BBBB, 0xBDBDB4B9,
+ 0xB8BDBEB5, 0xB9B6BBBA, 0xBCBAB6BB, 0xB5BAB8B7,
+ 0xBDB8BDBB, 0xC0BDB9C0, 0xB9C0BDB9, 0xBDB8BDBC,
+ 0xBDBEB9BE, 0xB8BEBDB9, 0xBDB9C0BD, 0xBFBDB9C0,
+ 0xB7BCBABA, 0xBEB7BDBC, 0xBFBEB9BF, 0xB6BBB9BA,
+ 0xBBB8BDBB, 0xBDBCB8BD, 0xB7BDBCB7, 0xBBB8BDBB,
+ 0xBDBBBABD, 0xB8BBB9BA, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB6BCB7B6, 0xB7B7BBB6, 0xBAB8B8BC, 0xB7BCBAB5,
+ 0xB8B8BCB7, 0xBCB7B9BD, 0xB6BCB7B6, 0xB5B8BCB6,
+ 0xBBB5B7BB, 0xBABCB6B9, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB9BDB8B8, 0xB4BABCB6, 0xBCB6BCBD, 0xBABCB6BA,
+ 0x8BA4A9A0, 0xA99F8D95, 0xA2A9A2A1, 0xA4A3ABA4,
+ 0xA8A1A3AB, 0xA3ABA4A0, 0x9E9FA59A, 0xA89DA3A9,
+ 0xA2A89DA2, 0x99A2A89D, 0xA4999EA4, 0xA1A599A0,
+ 0x98A0A498, 0xA195A0A4, 0x9DA1959D, 0x91999D91,
+ 0x9D91999D, 0x989C9099, 0x9091988B, 0x9C90969D,
+ 0x95998D98, 0x8B93978B, 0x98899397, 0x90948893,
+ 0x858C9085, 0x8C828C90, 0x88897F8B, 0x797F8378,
+ 0x837A8084, 0x60605A82, 0x00000100, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000001,
+ 0x01000000, 0x22231F00, 0x3037382F, 0x39303839,
+ 0x38383238, 0x795A5B57, 0x7B77787B, 0x7A7B777A,
+ 0x7A80807A, 0xABA67E80, 0xBBC0BEA7, 0xB7B7BCBA,
+ 0xBDB6B6BC, 0xB6BDB6B6, 0xB7B6BCB7, 0xBBB6B8BC,
+ 0xB7B8B4B7, 0xB7B7B8B4, 0xBBB9BABB, 0xB8BBB9B8,
+ 0xB6B8BBB9, 0xB8B3B7B8, 0xB5B9B4B4, 0xB8B7BBB5,
+ 0xBFB8B8BF, 0xB5BBB6B8, 0xB2B5B9B4, 0xB6B1B3B7,
+ 0xB8BCB7B2, 0xB5B7BBB6, 0xB8B3B7BB, 0xB0B6B1B2,
+ 0xB8B8BCB7, 0xBDBBB9BD, 0xBDC1BCBA, 0xB7B8BCB7,
+ 0xBBB7BABB, 0xBABBB7BA, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xB4B7B8B4, 0xB9B4B7B8, 0xB5B9B4B5,
+ 0xB6B7BBB5, 0xBCB5B6BD, 0xB4BCB5B5, 0xB4B3B9B4,
+ 0xB9B4B3B9, 0xB3B9B4B3, 0xB2B3B9B4, 0xB7B1B4B8,
+ 0xB3B7B2B3, 0xAFB3B7B2, 0xB7B2B0B4, 0xB3B7B2B3,
+ 0xB2B3B7B2, 0xB7B2B3B7, 0xB3B7B2B3, 0xB4B1B6B4,
+ 0xB6B4B0B7, 0xB1B7B2B1, 0xB2B5B9B4, 0xB9B4B4B8,
+ 0xB5B9B4B5, 0xB5B9BCBA, 0xB9B4B4B7, 0xB3B7B2B5,
+ 0xB0AFB5B0, 0xB5B0AFB5, 0xB1B5B0B1, 0xAFB0B4AF,
+ 0x746EB0B4, 0x70746E70, 0x70787970, 0x78727879,
+ 0x585C5776, 0x2F33352F, 0x35303335, 0x16191731,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x42433F00, 0x777E827C, 0x837A7981,
+ 0x8489807E, 0x82858781, 0x958A888B, 0x90948891,
+ 0x90969A8F, 0x9D91979B, 0x9A9E9299, 0x949EA297,
+ 0xA1959B9F, 0x9DA1959D, 0x939DA293, 0xA1959DA2,
+ 0x989C909D, 0x959B9D91, 0xA0969E9F, 0x9C9D939F,
+ 0x959B9D91, 0xA3949DA1, 0x9DA2939E, 0x959DA195,
+ 0xA2989DA1, 0xA0A498A1, 0x9CA8ACA0, 0xA89CA2A9,
+ 0xA8ACA1A4, 0xA3A8ADA4, 0xADA4A5A9, 0xA8ADA4A8,
+ 0xB9B6BAB5, 0xBDB6BABE, 0xB5BCB5B6, 0xBBB6BCB7,
+ 0xBDBDB8BD, 0xB6BBB9BB, 0xB9B5BAB8, 0xBDBBB7BE,
+ 0xB8BDBBB8, 0xBBB9BEBD, 0xBDBBB7BC, 0xB7BDBCB8,
+ 0xC0B7BDBC, 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB8C0BF,
+ 0xBEBEB7BF, 0xB8C0BFB4, 0xBEB8C0BF, 0xBEBDBAC1,
+ 0xBABFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9,
+ 0xBEB9BFBE, 0xBFBFB7BF, 0xB8C0C0B7, 0xBFB7BDBC,
+ 0xBFC0BAC0, 0xB7BCBDBA, 0xBDB7BFBE, 0xC0BFB6BE,
+ 0xB9C1C0B8, 0xBEB8BEBD, 0xC0C0B9BF, 0xB6C0C0B8,
+ 0xC0B6C0C0, 0xC0C1B8C0, 0xB9BEBFBB, 0xC1B9BDBE,
+ 0xC1C0BCC0, 0xBCC1C0BC, 0xC0BBC1C0, 0xC1C0BBC1,
+ 0xB8C0BFBB, 0xBEB8C0BF, 0xBFC0B7BF, 0xBABFC0BA,
+ 0xBEBAC0BF, 0xC0BFB9BF, 0xBAC0BFBA, 0xC1B8C0C0,
+ 0xC0BFB9C1, 0xB5BCB9BA, 0xBFB4BAB9, 0xBDBCBAC0,
+ 0xBABFBDB8, 0xBDBABFBD, 0xBEBCBABF, 0xBABFBDB9,
+ 0xBEB9BFBE, 0xBFBDB9BF, 0xB6BBB9BA, 0xC0B7BDBC,
+ 0xBDBDB8C0, 0xB7BCBDB5, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBAB5BDBC, 0xB9B8B4BD, 0xB4BDBAB1,
+ 0xBAB9C0BD, 0xBEBDB6BD, 0xB9BFBEB8, 0xBFB7BFBF,
+ 0xC0C0B7BF, 0xB8C0C0B8, 0xBFB8C0BF, 0xC1BEB8C0,
+ 0xBAC1BEBA, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003C, 0x00000000,
+ 0x00000000, 0x02000002, 0x19020001, 0x32441510,
+ 0x2D1B383E, 0x82442D53, 0x629D6C52, 0x7E629E80,
+ 0x47665080, 0x23433220, 0x33264032, 0x4420172C,
+ 0x243E382F, 0x3B2A4C31, 0xA36F5186, 0x65A58866,
+ 0x7959928A, 0x3A402E53, 0x31502A1E, 0x31224140,
+ 0x07070806, 0xBCB70809, 0xB8BCB7B8, 0xBDB8BDBB,
+ 0xBDBBBABF, 0xB7BCBAB8, 0xBBB8BDBB, 0xBCBAB8BD,
+ 0xB8BBB9B9, 0xBBB8BDBB, 0xBDBBB7BE, 0xB8BDBBB8,
+ 0xB9B6BCB7, 0xBDBBB8BE, 0xB9BEBCBA, 0xBAB8BDBB,
+ 0xBCBBB7BC, 0xBABFBEB7, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xBABFBEBA, 0xBDBAC0BF, 0xBFBEB8BE, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBEBDB9BF, 0xB9BFBEB8, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xB9BFBEB8, 0xBFB9BFBE, 0xC0C0BAC0,
+ 0xB8C0C0B8, 0xBFB8C0C0, 0xBFBFB7BF, 0xB8C0C0B7,
+ 0xC0BABFC0, 0xBFC0BABF, 0xB9BEBFBA, 0xC0BABFC0,
+ 0xC0BFBABF, 0xB9BFBEBA, 0xBEB9BFBE, 0xBFC0B9BF,
+ 0xB9BEBFBA, 0xC0BABFC0, 0xBEBFBABF, 0xB5BBBAB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB6BCBB, 0xBDBCB7BD,
+ 0xB7BDBCB7, 0xBBB3BBBB, 0xBBBBB3BB, 0xB2BABAB3,
+ 0xBBB3BBBB, 0xBBBBB3BB, 0xB3BBBBB3, 0xBAB4B9BA,
+ 0xBABBB5BB, 0xB3BBBBB5, 0xBBB4BCBC, 0xBABDB3BB,
+ 0xB5BABBB3, 0xB7B8BBB9, 0xBCB7B8BC, 0xB8BEB9B8,
+ 0xBDB7BEB9, 0xC0BDB9C0, 0xB9BFBEB9, 0xBFB9BEBF,
+ 0xBDBCB9BE, 0xB9BFBEB7, 0xBDB9C0BD, 0xC0BEBABF,
+ 0xBABFBEBB, 0xBBB7BDBC, 0xBBB9B6BC, 0xB6BBB9B6,
+ 0xBCB8BDBB, 0xBDBCB7BD, 0xB7BDBCB7, 0xBBB8BDBB,
+ 0xBEB9B8BD, 0xB9BDB8BA, 0xB7B8BCB7, 0xBCB6B8BC,
+ 0xB8BCB6B8, 0xB7B8BCB7, 0xBDB8B8BC, 0xB6BCB7B7,
+ 0xB9BABDBB, 0xBDB8B8BB, 0xB8BCB7B9, 0xB8B8BCB7,
+ 0xBCB6B9BD, 0xB9BBB5BA, 0xB7B8BCB7, 0xBBB6B8BC,
+ 0xB8BCB6B5, 0xB1B8BBB2, 0xBFB6B8BC, 0xBFC1BBBC,
+ 0x8A9FA49B, 0xA39D8E93, 0xA8ACA69F, 0xA2A4ABA4,
+ 0xA99FA4AC, 0xA2A79EA1, 0x9BA6ADA0, 0xA79BA3A7,
+ 0xA3A79CA3, 0x9AA2A89D, 0xA2979FA5, 0x9EA2969E,
+ 0x949EA598, 0xA3949CA3, 0x9CA3949C, 0x939BA295,
+ 0xA09399A0, 0x969D8E99, 0x8E92998A, 0x9B8C969D,
+ 0x949B8C94, 0x8893978B, 0x94889094, 0x90948890,
+ 0x868C9085, 0x8B828D91, 0x8889808A, 0x78808178,
+ 0x81788081, 0x5A5B577E, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x22231F00, 0x31353731, 0x39333537,
+ 0x37383437, 0x61383C37, 0x7C776266, 0x797D7878,
+ 0x9380817F, 0xBBB99495, 0xB6BBB9B8, 0xB3B1B7B2,
+ 0xBDB6B3BA, 0xB4BBB4B6, 0xB7B5B9B3, 0xBCB6B9BD,
+ 0xB8BCB6B8, 0xB2BABBB7, 0xB8B4B5B6, 0xB8BCB7B7,
+ 0xB2B5B9B4, 0xB5B1B3B7, 0xB5B9B4B4, 0xB6B5B9B4,
+ 0xBEB7B8BC, 0xB6BCB7B7, 0xB8B5BBB6, 0xB9B7B5BA,
+ 0xB6BAB5B4, 0xB6B9BDB8, 0xBBB6B7BB, 0xB5BBB6B5,
+ 0xB5B5BBB6, 0xBBB6B5BC, 0xB4BAB5B5, 0xBAB7BDB8,
+ 0xBBB9B9BC, 0xBDBEBCBA, 0xBBBABDBB, 0xC3BEB8BD,
+ 0xBABEB9BF, 0xB7B8BCB7, 0xBBB9B8BC, 0xB8BCB7B8,
+ 0xB1B5BCB5, 0xBBB6B1B8, 0xB4BBB6B5, 0xBAB3BAB7,
+ 0xBDBAB6BD, 0xB6BDBAB6, 0xB6B6BCB7, 0xBCB7B5BB,
+ 0xB8BBB9B6, 0xB6B8BBB9, 0xB9B4B5B8, 0xB5B9B4B5,
+ 0xB7BBBCB8, 0xBBB9BABB, 0xB7BAB8B8, 0xB7B8BCB7,
+ 0xB9B4B6BC, 0xB5B9B4B5, 0xB2B5B9B4, 0xB8B3B3B7,
+ 0xB3B7B2B4, 0xB2B5B6B2, 0xB5B3B5B6, 0xB3B7B2B2,
+ 0xAFAFB3AE, 0xB4AFB0B4, 0xB3B7B2B0, 0xB1B1B7B2,
+ 0xA59BB1B8, 0x747A6F9D, 0x71787C71, 0x6761787C,
+ 0x383C3663, 0x2F2F332E, 0x34323034, 0x16191731,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x40413F00, 0x767D817B, 0x817C7A7F,
+ 0x80847F7B, 0x85878983, 0x948B8D8E, 0x969A8F93,
+ 0x90969A8F, 0x9D91979B, 0x9C9E9299, 0x969DA196,
+ 0xA1959DA1, 0x9EA2969D, 0x97A0A498, 0xA2979FA3,
+ 0x9DA1959C, 0x949D9F93, 0x9F939EA0, 0x9B9F939B,
+ 0x929A9E92, 0xA3949A9E, 0x9EA3949E, 0x96A0A596,
+ 0xA498A2A5, 0xA5A99DA0, 0x9FA8ACA0, 0xACA0A9AE,
+ 0xA8ACA1A8, 0xA4A8ADA4, 0xADA4A8AD, 0xABB0A7A8,
+ 0xBAB6BCB7, 0xBEB7B9BF, 0xB6BDB6B7, 0xB9B7BBB6,
+ 0xBDBBBABE, 0xB8BDBBB8, 0xBBB6BBB9, 0xBEBBB8BD,
+ 0xB7BEBBB7, 0xBDB8BDBB, 0xBFBEBABF, 0xBAC0BFB9,
+ 0xC0B7BDBC, 0xBEBFBBC1, 0xB7BFBFB9, 0xBEB7BFBE,
+ 0xBFBFB5C0, 0xB8C0BFB7, 0xBDB8C0BF, 0xBFBEB7C0,
+ 0xB7BDBCB9, 0xBDB9C0BD, 0xBEBDB9C0, 0xB9BFBEB8,
+ 0xC0B8C0C0, 0xBFBEB8C0, 0xB6BEBDB7, 0xBFB7BFBE,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xBFB7BDBC, 0xC0C0BAC0,
+ 0xB7BFBFB8, 0xBEB9BFBE, 0xC0C0B9BF, 0xB9C1C1B8,
+ 0xBFB8C0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBEB7BDBC,
+ 0xC1C0B9BF, 0xB8C0BFBB, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB7BFBEB8, 0xBDB6BEBD, 0xC1C2B6BE, 0xBCC1C2BC,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xB8C0BFB8, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xB3BBBAB8, 0xBEB5BCB9, 0xBDBEB9BF,
+ 0xB9BFBEB8, 0xBDB9C0BD, 0xBFBDB9C0, 0xBABFBEBA,
+ 0xBEB9BFBE, 0xC0BDB9BF, 0xB5BCB9B9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB8BEBD, 0xBDBCB7BD,
+ 0xB8BEBDB7, 0xBBB5BDBC, 0xB8B8B4BC, 0xB3BBBAAE,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBFBAC0BF, 0xBFBEBAC0,
+ 0xB9BFBEB9, 0xBFBAC0BF, 0xC0BFBAC0, 0xBBC0BEBA,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x02000002, 0x1C020103, 0x34481813,
+ 0x2F1D3C40, 0x87422D54, 0x66A37055, 0x8566A387,
+ 0x496A5282, 0x26453624, 0x36284036, 0x451F122A,
+ 0x243E382E, 0x3B294E31, 0xA36F5186, 0x65A58866,
+ 0x78599088, 0x3C402D54, 0x32502A1E, 0x3024423E,
+ 0x07080907, 0xBCB70809, 0xB8BCB7B8, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB8BDBB, 0xBAB8B8BD,
+ 0xBBBEBCB7, 0xB9B8BDBB, 0xBBB9B5BC, 0xB8BDBBB6,
+ 0xB9B7BDB8, 0xBDBBB8BE, 0xB8BDBBBA, 0xBBB8BDBB,
+ 0xBDBCB8BD, 0xB9BEBDB8, 0xBDBAC1BE, 0xBFBEB9C0,
+ 0xBBC0BFBA, 0xBDB9BFBE, 0xBFBEB8BE, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BEBDB9, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xB9BFBEB8, 0xBEB9BFBE, 0xBFBFB9BF,
+ 0xB7BFBFB7, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B6,
+ 0xBFBAC0BF, 0xBFC0BBC0, 0xBABFC0BA, 0xC0BABFC0,
+ 0xBFBEBABF, 0xB9BFBEB9, 0xBFBAC0BF, 0xBFC0BAC0,
+ 0xB9BEBFBA, 0xC0B9BEBF, 0xC1C0BABF, 0xB9BFBEBB,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB8BEBD,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBDB7BDBC, 0xBDBCB8BE,
+ 0xB6BCBBB7, 0xBCB5BDBD, 0xBCBCB4BC, 0xB3BBBBB4,
+ 0xBCB3BBBA, 0xBABDB4BC, 0xB2BABAB3, 0xBAB5BABB,
+ 0xBCBBB5BB, 0xB5BBBAB6, 0xBDB2BABA, 0xBCBFB5BD,
+ 0xB4B9BAB5, 0xB6B8BCB7, 0xBBB6B8BC, 0xB6BCB7B7,
+ 0xBDB7BEB9, 0xBFBEB9C0, 0xB8BEBDB9, 0xC0B9BEBF,
+ 0xBFBEBABF, 0xB9BFBEB9, 0xBEB9C0BD, 0xC0BFBBC0,
+ 0xBABFBEBB, 0xBBBAC0BF, 0xBBB9B8BD, 0xB8BDBBB6,
+ 0xBCB6BCBB, 0xBDBCB7BD, 0xB7BEBBB7, 0xB9B8BDBB,
+ 0xBDB8B6BB, 0xB8BCB7B9, 0xB7B8BCB7, 0xBBB5B8BC,
+ 0xB8BCB6B7, 0xB7B8BCB7, 0xBBB6B8BC, 0xB6BCB7B5,
+ 0xB9B8BBB9, 0xBCB7B8BB, 0xB7BBB6B8, 0xB1B8BCB7,
+ 0xB4AEB2B6, 0xB8BCB6B2, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB5BCB5B6, 0xB5B7BDB2, 0xC2B9BCC0, 0xBFC1BBBF,
+ 0x94A0A59C, 0xABA7969A, 0xA8ACA6AA, 0xA0A7ACA3,
+ 0xABA2A3AB, 0xA3A99EA6, 0x99A3A79B, 0xA69AA3A8,
+ 0xA0A499A4, 0x9DA0A69B, 0xA296A2A8, 0x9EA2969E,
+ 0x959EA596, 0xA3949BA5, 0x9AA1929C, 0x939BA295,
+ 0x9D8E99A0, 0x969D8E96, 0x8C949B8C, 0x9C8D949B,
+ 0x949B8C95, 0x8894988C, 0x94889094, 0x90948890,
+ 0x858C9085, 0x8D848C90, 0x8889808C, 0x787F8077,
+ 0x807A8081, 0x5A5B577E, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x22231F00, 0x31333732, 0x39343337,
+ 0x383C3735, 0x37383C37, 0x6762383C, 0x787C7763,
+ 0xA680817F, 0xBBB9A7A8, 0xB8BCB7B8, 0xB2B2B8B3,
+ 0xBAB3B1B9, 0xB5BCB5B3, 0xB0B3B7B1, 0xBAB4B2B6,
+ 0xB5B9B3B6, 0xB7B7B8B4, 0xB7B3BABB, 0xB3B7B2B6,
+ 0xB4B2B6B1, 0xBCB7B5B9, 0xB8BCB7B8, 0xB6B8BCB7,
+ 0xBAB3B7BB, 0xB3B9B4B3, 0xBAB3B8B6, 0xBBB9B7BC,
+ 0xB5BAB8B6, 0xB8B3B9B4, 0xBBB6B9BD, 0xB6BDB6B5,
+ 0xB7B6BDB6, 0xB9B2B7BE, 0xB3BAB3B2, 0xBBB6BCB7,
+ 0xBDBBBABD, 0xB8BBB9BA, 0xB8B5BAB8, 0xBCB7B5BA,
+ 0xB7BBB6B8, 0xB8B8BCB7, 0xBDBBB9BD, 0xBABEB9BA,
+ 0xB5B5BBB6, 0xBEB9B5BC, 0xB7BEB9B8, 0xB7B6BDBA,
+ 0xB9B8B1BA, 0xB6BCBBB1, 0xB6B5BAB8, 0xBBB9B5BB,
+ 0xB5BAB8B6, 0xB4B5B8B6, 0xB9B4B5B9, 0xB5B9B4B5,
+ 0xB3B5B6B2, 0xB6B4B6B7, 0xB4B7B5B3, 0xB2B5B9B4,
+ 0xB7B2B3B7, 0xB3B7B2B3, 0xB3B2B6B1, 0xB6B1B4B8,
+ 0xB3B7B2B2, 0xB2B5B6B2, 0xB6B4B5B6, 0xB3B7B2B3,
+ 0xB2B3B7B1, 0xB5B3B4B8, 0xB3B6B4B4, 0xB1B2B8B3,
+ 0xB9AFB0B8, 0x868E83B1, 0x71767C71, 0x3C36787C,
+ 0x383C3638, 0x2F30342F, 0x32303034, 0x1518162F,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x40413F00, 0x797C807A, 0x817C7B7F,
+ 0x80847F7B, 0x85888882, 0x948B8D8E, 0x98999093,
+ 0x90989C91, 0x9D91979B, 0x9D9F9399, 0x949DA196,
+ 0xA1959B9F, 0xA0A4989D, 0x999FA397, 0xA398A1A5,
+ 0x9DA4979D, 0x93A0A498, 0xA1959DA2, 0x9DA1959D,
+ 0x8E9A9E92, 0xA394969A, 0x9EA3949C, 0x95A0A596,
+ 0xACA0A1A4, 0xA8ACA0A8, 0x9EA8AD9E, 0xAEA2A8AD,
+ 0xA6ADA0AA, 0xA3A8ADA4, 0xADA4A7AC, 0xA8ADA4A8,
+ 0xBAB6BCB7, 0xBEB7B9BF, 0xB7BEB7B7, 0xB9B7BBB6,
+ 0xBDBBBABE, 0xB8BDBBB8, 0xBBB7BCBA, 0xBEBBB8BD,
+ 0xB7BEBBB7, 0xBDB8BDBB, 0xBFBEBABF, 0xB9BFBEB9,
+ 0xBEB7BDBC, 0xBFC0B9BF, 0xBABFC0BA, 0xBFB7BFBE,
+ 0xBCBCB6C1, 0xB7BFBFB4, 0xBDB8C0BF, 0xBFBEB7C0,
+ 0xB8BEBDB9, 0xBDB9C0BD, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xC0B7BFBF, 0xC0BFB8C0, 0xB9BFBEBA, 0xBFB8C0BF,
+ 0xC0BFB6C1, 0xB7BFBEB8, 0xBEB9BFBE, 0xC0C0B9BF,
+ 0xB7BFBFB8, 0xBEB9BFBE, 0xBFBFB9BF, 0xB8C0C0B7,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xB9BFBEBA, 0xBCBAC0BF,
+ 0xBFBEB7BD, 0xB8C0C0B7, 0xC2B8C0C0, 0xBFBFB6BF,
+ 0xB9C1C1B7, 0xBDB4BFBD, 0xC1C2B6BE, 0xBCC1C2BC,
+ 0xC0BBC1C0, 0xC0BFBBC1, 0xB8C0BFB8, 0xC0B8C0C0,
+ 0xC1C0B8C0, 0xB7BFBEB9, 0xBEB9C0BD, 0xBCBDB9BF,
+ 0xB9BEBFB7, 0xBDB9C0BD, 0xBFBDB9C0, 0xBABFBEBA,
+ 0xBFB9BFBE, 0xC0BDBAC0, 0xB4BBB8B9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB7BDBCB9, 0xBCB5BDBC, 0xBDBCB5BD,
+ 0xB7BDBCB7, 0xBBB5BDBD, 0xB9B9B3BB, 0xB3BBBBB1,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBFBAC0BF, 0xBFBEBAC0, 0xB9C0BDB9,
+ 0xB7B8BBB9, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000000, 0x1C000203, 0x34481613,
+ 0x2F1D3C40, 0x87422C56, 0x66A37055, 0x8766A387,
+ 0x486A5282, 0x26433523, 0x36284038, 0x471F122A,
+ 0x233F382D, 0x3B294E31, 0xA3705287, 0x65A58866,
+ 0x75588F88, 0x3C402D54, 0x304E2A1E, 0x3125433C,
+ 0x06080907, 0xBCB70708, 0xB8BCB7B8, 0xBBB9BEBC,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB8BDBB, 0xBEBCB9BE,
+ 0xB9BCBABB, 0xB9B8BEB9, 0xBDBBB8BE, 0xB9BEBCB8,
+ 0xBBB6BBB9, 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB8BDBB,
+ 0xBDBCB8BF, 0xB8BDBCB8, 0xBBB7BCBA, 0xBDBCB8BD,
+ 0xBABFBEB8, 0xBBB7BEBB, 0xC0BDB7BE, 0xBAC1BEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xB9BFBEB8, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xBFC0BAC0, 0xBABFC0BA, 0xBFBABFC0,
+ 0xBFBEB9BE, 0xB9BFBEB9, 0xBEBAC0BF, 0xBEBFB9BF,
+ 0xB9BEBFB9, 0xC0BABFC0, 0xBFBEBABF, 0xB7BDBCB9,
+ 0xBFB9BEBF, 0xBFBEB9BE, 0xBAC0BFB9, 0xBCB8BDBC,
+ 0xBCBDB8BD, 0xB8BCBDB8, 0xBCB8BDBC, 0xBDBCB8BD,
+ 0xB7BDBCB7, 0xBDB5BDBD, 0xBDBDB5BD, 0xB3BDBDB3,
+ 0xBBB1BBBB, 0xBABDB1BB, 0xB3BBBBB1, 0xBAB5BABB,
+ 0xBDBAB5BB, 0xB1B8B5B6, 0xBDB3BBBA, 0xBBBBB5BD,
+ 0xB3BBBAB1, 0xBAB9BEBC, 0xBDBBB9BF, 0xB6BDBAB8,
+ 0xBCBBC0BE, 0xBDBCB8BF, 0xB8BDBEB7, 0xBEBABFBE,
+ 0xBFBEB9BF, 0xBAC0BFB9, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xBABFBEBA, 0xB9BABFBD, 0xBDBBB6BB, 0xB8BDBBB8,
+ 0xBBB7BDBC, 0xBBB9B6BC, 0xB7BCBAB6, 0xB6B8BDBB,
+ 0xBCB7B5BB, 0xB8BCB7B8, 0xB7B8BCB7, 0xBBB6B8BC,
+ 0xB8BCB7B7, 0xB7B7BBB6, 0xBBB6B8BC, 0xB8BCB7B7,
+ 0xB9B7BBB6, 0xBCB7BABE, 0xB8BCB7B8, 0xB2B8BCB7,
+ 0xB4AFB3B7, 0xB8BCB7B0, 0xB3B8BCB6, 0xBAB5B3BA,
+ 0xB6BDB6B4, 0xB5BABFB6, 0xC3BABAC0, 0xBDC1BBBE,
+ 0x9D9FA39D, 0xABA79FA3, 0xA8ACA6AA, 0x9DA6ACA1,
+ 0xA99EA1AA, 0xA6ADA0A1, 0x9DA5A99D, 0xADA2A5A9,
+ 0xA2A69BA9, 0x9E9FA59A, 0xA498A3A9, 0x9EA394A0,
+ 0x949FA697, 0xA2959CA3, 0x9AA1949B, 0x939DA195,
+ 0x9C909B9F, 0x989C9098, 0x8A949B8C, 0x9B8C9299,
+ 0x949B8C94, 0x8B93978B, 0x978B9397, 0x93978B93,
+ 0x828C9085, 0x8C82898D, 0x898A818B, 0x78828078,
+ 0x807A8081, 0x5A5B577E, 0x00000100, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x01000000, 0x22231F00, 0x2E30342F, 0x39342F33,
+ 0x393D3835, 0x37383C37, 0x3B36383C, 0x64686337,
+ 0xB9929593, 0xBBB9B8BB, 0xB9BDB8B8, 0xB7B3B9B4,
+ 0xBCB5B6BC, 0xB5BCB5B5, 0xB3B6BCB7, 0xB9B4B2B8,
+ 0xB8BCB7B5, 0xB8B7BBB6, 0xBBB6B9BD, 0xB8BCB7B7,
+ 0xB4B5B9B4, 0xB8B2B5B9, 0xB6BDB6B4, 0xB7B6BCB7,
+ 0xBCB7B6BC, 0xB6BCB7B8, 0xB8B4B9B7, 0xB9B8B3B9,
+ 0xB2B8B7B3, 0xB5B6BCB7, 0xBAB3B5BC, 0xB5BCB5B3,
+ 0xB4B5BDB6, 0xB9AFB3BB, 0xB5BCB5B1, 0xB7B8BCB7,
+ 0xBBB9B8BC, 0xBABFBDB8, 0xB6B9BFBA, 0xBBB6B5BB,
+ 0xB9BFBAB5, 0xBAB7BCBA, 0xBCB7B7BC, 0xB6BCB7B6,
+ 0xB6B5BBB6, 0xBBB6B5BB, 0xB4BBB6B5, 0xB6B6BDBA,
+ 0xB9B8B0B9, 0xB6BCBBB3, 0xB9B6BBB9, 0xBBB9B6BB,
+ 0xB8BBB9B8, 0xB6BBBCB8, 0xBCB8B9BA, 0xB7B9B3BB,
+ 0xB3B6BAB5, 0xB9B4B4B8, 0xB3B7B2B5, 0xB5B3B9B4,
+ 0xBAB3B4BA, 0xB6BDB6B3, 0xB3B9BDB7, 0xB9B3B5B9,
+ 0xB5B9B3B5, 0xB3B7BBB5, 0xB8B4B5B9, 0xB7B8B4B7,
+ 0xB1B3B7B1, 0xB9B7B3B7, 0xB1B6B4B6, 0xB1AFB6B1,
+ 0xB9B2AEB9, 0x9CA49AB1, 0x49767B72, 0x3D374D52,
+ 0x373B3639, 0x2F30342F, 0x32303034, 0x191A1831,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x40413F02, 0x777E827C, 0x817C797D,
+ 0x8185807D, 0x86888882, 0x948B908E, 0x98999093,
+ 0x92969A8F, 0x9D91999D, 0x9A9E9299, 0x939B9F93,
+ 0xA0949B9F, 0xA0A4989C, 0x989EA499, 0xA6999DA3,
+ 0x9EA5989F, 0x959EA598, 0xA1969BA2, 0x9BA1969B,
+ 0x959CA396, 0xA3949BA2, 0xA2A7989E, 0x9B9FA397,
+ 0xACA0A3A7, 0xA9ADA1A8, 0xA1A7AEA1, 0xAEA1A7AE,
+ 0xA6ADA0A7, 0xA4A5AAA1, 0xADA4A6AE, 0xA8ADA4A8,
+ 0xBAB6BCB7, 0xBDB8B9BF, 0xB7BDB8B7, 0xB6B5BBB6,
+ 0xBCBAB5BB, 0xB7BCBAB7, 0xBAB8BDBB, 0xBEB9B7BC,
+ 0xB8BEB9B8, 0xBBB6BDBA, 0xBFBEB7BE, 0xB9BFBEB9,
+ 0xBDB8C0BF, 0xBFC0B6BE, 0xB9BEBFBA, 0xC1B8C0C0,
+ 0xBFC0B9C1, 0xB7BCBDBA, 0xBFB7BFBE, 0xBEBDB8C0,
+ 0xB9BFBEB8, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB7BFBE, 0xBEBFB7BF, 0xBABFC0B9, 0xBFB9C1C0,
+ 0xBFBFB8C0, 0xB8C0C0B7, 0xBDBAC0BF, 0xBFC0B8BE,
+ 0xBABFC0BA, 0xBFB9BFBE, 0xBFBEBAC0, 0xB8C0BFB7,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xBAC0BFBA, 0xC0B8C0C0,
+ 0xBBBCB8C0, 0xB7BFBFB6, 0xBFB7BFBF, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC1B6BEBD, 0xC1C2BAC2, 0xBCC1C2BC,
+ 0xBEBAC0BF, 0xC0BFBAC1, 0xBBC1C0BA, 0xC0BABFC0,
+ 0xC0BFBABF, 0xBBC1C0BA, 0xBDBBC2BF, 0xBDBCB9C0,
+ 0xB9BFBEB7, 0xBDB9C0BD, 0xBFBDB9C0, 0xBABFBDBA,
+ 0xBEBABFBE, 0xBEBDBABF, 0xB6BBBAB9, 0xBDB9C0BD,
+ 0xC0BDB9C0, 0xB9C0BDB9, 0xBCB4BCBB, 0xBDBCB5BD,
+ 0xB6BEBDB5, 0xBBB5BDBD, 0xBBBBB3BB, 0xB5BABBB3,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEBAC0BF, 0xBEBDB9BF, 0xB8BFBCB8,
+ 0xB7B8BBB9, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000000, 0x1C000203, 0x34481613,
+ 0x2D1D3C3F, 0x87422D54, 0x66A37055, 0x8766A387,
+ 0x466B5481, 0x26433524, 0x38284038, 0x4720112C,
+ 0x223E3A2D, 0x3B294E30, 0xA36F5186, 0x66A38866,
+ 0x765A8F88, 0x3A402E53, 0x304F2A1E, 0x3223423F,
+ 0x06080907, 0xBCB70708, 0xB7BBB6B8, 0xBBB8BDBB,
+ 0xBFBDB8BD, 0xBBC0BEBA, 0xBBB8BDBB, 0xBAB8B8BD,
+ 0xBABDBBB7, 0xB7B7BDB8, 0xBBB9B6BC, 0xB8BDBBB6,
+ 0xBBB6BBB9, 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB7BEBB,
+ 0xBDBCB7BE, 0xB8BDBCB8, 0xBBB9BEBC, 0xBDBCB8BD,
+ 0xBABFBEB8, 0xBDB9C0BD, 0xC0BDB9C0, 0xB9C0BDB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBDBCB9BF, 0xB9BFBEB7, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBFB7BFBF, 0xBFBFB7BF, 0xB8C0C0B7,
+ 0xBFBAC0BF, 0xBFC0BAC0, 0xBABFC0BA, 0xC0BABFC0,
+ 0xBFBEBABF, 0xB9BFBEB9, 0xBEBAC0BF, 0xBFC0B9BF,
+ 0xB9BEBFBA, 0xBFB9BEBF, 0xBFBEB9BE, 0xB7BDBCB9,
+ 0xBFB8BDBE, 0xBFBEB9BE, 0xB9BFBEB9, 0xBCB8BDBC,
+ 0xBDBCB8BD, 0xB8BDBCB8, 0xBCB9BEBD, 0xBDBCB8BD,
+ 0xB7BDBCB7, 0xBDB5BDBC, 0xBDBDB5BD, 0xB5BDBDB5,
+ 0xBBB5BDBD, 0xBBBBB3BB, 0xB3BBBBB3, 0xB9B5BBBA,
+ 0xBBB9B5BC, 0xB2B9B6B6, 0xBBB2B8B7, 0xBBBBB3BB,
+ 0xB4BCBBB3, 0xB7B6BBB9, 0xBDBBB6BC, 0xB7BEBBB8,
+ 0xBDB7BEBB, 0xBFBEB8BE, 0xBABFC0B9, 0xBDBABFBE,
+ 0xBFBEB9BE, 0xB9BFBEB9, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xBABFBDBA, 0xB9B8BDBB, 0xC0BEB8BE, 0xB8BDBBBB,
+ 0xBCB7BDBC, 0xBCBAB7BD, 0xB7BCBAB7, 0xB7B6BBB9,
+ 0xBBB9B6BC, 0xB7BBB6B8, 0xB7B7BBB6, 0xBDB8B8BC,
+ 0xB8BCB7B9, 0xB7B8BCB7, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB7B8BCB7, 0xBFBAB8BC, 0xB8BCB7BB, 0xB6B8BCB7,
+ 0xBCB7B7BB, 0xB6BAB5B8, 0xB6B5BCB5, 0xBDB6B6BD,
+ 0xB8BCB6B6, 0xB5BAC0B5, 0xC5BCBAC0, 0xB6BAB4C0,
+ 0x9D9FA39D, 0xABA79FA3, 0xAAACA6AA, 0x9EA6ACA1,
+ 0xA99CA4AB, 0xA1A89BA2, 0x9EA4AB9E, 0xA89DA3A9,
+ 0xA3A99EA2, 0x9A9FA59A, 0xA5999FA5, 0x9EA394A1,
+ 0x949BA293, 0xA3969CA3, 0x9BA2959C, 0x909B9F93,
+ 0x9E92989C, 0x999D919A, 0x8892998A, 0x9B8C9097,
+ 0x92998A94, 0x8B93978B, 0x978B9397, 0x93978B93,
+ 0x82909489, 0x8C82898D, 0x88897F8B, 0x79828078,
+ 0x807A8182, 0x5A5B5780, 0x00000100, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x01000000, 0x22232100, 0x2F30342F, 0x39343034,
+ 0x34383335, 0x36393D38, 0x3C37373B, 0x4D514C38,
+ 0xB7A5A9A4, 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B5BBB6,
+ 0xBCB7B6BC, 0xB5BCB5B6, 0xB5B3B9B4, 0xB9B4B4BA,
+ 0xB8BCB7B5, 0xB7B8BBB9, 0xBCB7B6BC, 0xB6BCB7B6,
+ 0xB6B8BCB7, 0xB9B4B7BB, 0xB3B9B4B3, 0xB7B2B8B3,
+ 0xBCB7B6BC, 0xB8BBB9B8, 0xBAB3B8B6, 0xBAB9B5BB,
+ 0xB4BBB8B4, 0xB5B5BBB6, 0xBBB4B5BC, 0xB5BCB5B4,
+ 0xB3B4BCB5, 0xBAB3B2BA, 0xB5BCB5B3, 0xB9B6BCB7,
+ 0xBBB9B6BB, 0xB8BDBBB6, 0xB5B9BFBA, 0xBBB6B4BA,
+ 0xB7BDB8B5, 0xBDBABFBD, 0xC1BCBABF, 0xBAC0BBBB,
+ 0xB9B8BEB9, 0xBAB5B8BE, 0xB8BEB9B4, 0xBAB6BDBA,
+ 0xBAB7B6BD, 0xB4B9B7B3, 0xB8B4B9B7, 0xB8B6B5BA,
+ 0xB7BAB8B3, 0xB4B5B8B6, 0xB9B4B5B9, 0xB3B7B2B5,
+ 0xB4B5B9B4, 0xB9B4B5B9, 0xB4B8B3B5, 0xB1B6BAB5,
+ 0xB8B1B0B6, 0xB1B8B1B1, 0xB3B3B9B4, 0xB7B2B2B8,
+ 0xB0B4AFB3, 0xAEB3B7B2, 0xB3AFAFB3, 0xB5B6B2B2,
+ 0xAFB0B4AE, 0xB2B0B0B4, 0xB0B3B1AF, 0xB2B0B7B2,
+ 0xB8B1B0B7, 0xB1B8B1B0, 0x35767B72, 0x3C37373B,
+ 0x383C3738, 0x2E30342F, 0x34322F33, 0x18191733,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x40413F02, 0x767D817B, 0x817B7A7F,
+ 0x82847E7D, 0x8B8D8E85, 0x948B9394, 0x98998F93,
+ 0x90969A8F, 0x9D91979B, 0x9A9E9299, 0x93989C90,
+ 0xA1959B9F, 0x9DA1959D, 0x999DA398, 0xA6999EA4,
+ 0x9CA3969F, 0x969EA598, 0xA1969BA1, 0x9BA1969B,
+ 0x969CA396, 0xA3979CA3, 0xA2A69A9F, 0x9DA9ADA1,
+ 0xA99DA5A9, 0xA4A89CA5, 0xA0A6ADA0, 0xADA2A6AD,
+ 0xA7ADA2A7, 0xA6A5ADA3, 0xAEA7A6AD, 0xA6ADA6A7,
+ 0xBAB4BAB5, 0xBDB8B9BF, 0xB7BDB8B7, 0xB5B7BDB8,
+ 0xBDBBB4BA, 0xB8BDBBB8, 0xB9B8BDBB, 0xBCB7B6BB,
+ 0xB8BEB9B6, 0xBCB7BEBB, 0xBFBEB8BF, 0xB9BFBEB9,
+ 0xBBB9C1C0, 0xBEBFB4BC, 0xB9BEBFB9, 0xBFB8C0C0,
+ 0xBFC0B7BF, 0xB9BEBFBA, 0xBFB7BFBE, 0xBFBEB8C0,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBFB8C0BF, 0xBFC0B8C0, 0xBABFC0BA, 0xC0B8C0BF,
+ 0xC1C1B9C1, 0xB8C0C0B9, 0xBDB9BEBF, 0xBFC0B8BE,
+ 0xBABFC0BA, 0xBFB9BFBE, 0xBFBEBAC0, 0xB6BEBDB7,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xBAC0BFBA, 0xC0B8C0BF,
+ 0xBFC0B8C0, 0xB9BEBFBA, 0xC0B7BFBF, 0xBFBFB8C0,
+ 0xB7BFBFB7, 0xC1B6BEBD, 0xC2C1BAC2, 0xBCC2C1BC,
+ 0xBFBAC0BF, 0xC0BFBBC2, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBBB9C0BD, 0xBDBCB7BE,
+ 0xBAC0BFB7, 0xBDB9C0BD, 0xBFBDB9C0, 0xBABFBDBA,
+ 0xBEBBC0BF, 0xBCBBBABF, 0xB6BBBAB7, 0xBAB8BEBD,
+ 0xBEBBB6BD, 0xB8BFBCB7, 0xB6B5BDBC, 0xBDBCAFB7,
+ 0xB5BDBCB5, 0xBDB5BDBC, 0xBAB9B8BE, 0xB5BBBAB4,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB8BEBDB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9C0BDB9,
+ 0xB7B8BBB9, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000000, 0x1B000203, 0x35491512,
+ 0x2D1D3C40, 0x87422D54, 0x66A37055, 0x8766A387,
+ 0x476A5380, 0x26433824, 0x38284038, 0x471F122A,
+ 0x253F3A2D, 0x3B2A4C32, 0xA36F5186, 0x66A38866,
+ 0x765A8F88, 0x3A412F54, 0x2F4E2A1E, 0x3223423E,
+ 0x07080808, 0xBCB70809, 0xB8BCB7B8, 0xBBB9BEBC,
+ 0xBDBBB8BD, 0xB5BAB8B8, 0xBBB6BBB9, 0xBBB9B8BD,
+ 0xBABDBBB8, 0xBBB7BCBA, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB7BEBB, 0xBDBCB7BE, 0xB8BDBCB8, 0xBBB8BDBB,
+ 0xBDBCB8BD, 0xB8BDBCB8, 0xBBB6BDBA, 0xBDBCB7BE,
+ 0xB8BEBDB7, 0xBBB9C0BD, 0xBDBBB7BE, 0xBABFBDB8,
+ 0xBFB9BFBE, 0xBFBEBAC0, 0xBAC0BFB9, 0xBEB9BFBE,
+ 0xBDBCB9BF, 0xB9BFBEB7, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBDB9BFBE, 0xBFBEB8BE, 0xBAC0BFB9,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xBABFC0B9, 0xBFBAC0BF,
+ 0xBFBEBAC0, 0xB9BFBEB9, 0xBEB9BFBE, 0xC0BFB9BF,
+ 0xB9BFBEBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBCB7BDBC, 0xBBBCB7BD, 0xB7BCBDB6, 0xBDB7BDBC,
+ 0xBDBCB8BE, 0xB5BBBAB7, 0xBBB6BCBB, 0xBCB9B6BC,
+ 0xADB4B1B5, 0xADA8AFAC, 0xB5B4A8AE, 0xAFB5B4AF,
+ 0xBBB3B8B9, 0xB8B9B5BA, 0xB4B9B8B3, 0xB8B5BAB8,
+ 0xBBB9B5BA, 0xB6BBB9B8, 0xBBB6BBB9, 0xBABBB6BC,
+ 0xB6BCBBB5, 0xB7B6BBB9, 0xBCB7B6BC, 0xB4BBB8B6,
+ 0xBCB7BDBC, 0xBDBCB5BD, 0xB8C0BFB5, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBDBABFBE, 0xBFBDB9BE,
+ 0xBABDBBBC, 0xBEB6BBB9, 0xBDBBBBC0, 0xB8BDBBB8,
+ 0xBBB7BEBB, 0xBDBCB7BE, 0xB7BDBCB7, 0xB8B6BBBA,
+ 0xB8B7B5BA, 0xB6BBB9B3, 0xB8B7BCBA, 0xBBB9B5BA,
+ 0xB8BBB9B8, 0xB7B8BCB7, 0xBBB6B8BC, 0xB8BCB7B7,
+ 0xB8B8BCB7, 0xBCB7B9BD, 0xB5B9B4B8, 0xB9B6B9B7,
+ 0xBCB7B8BB, 0xB7BDB8B6, 0xB6B8BCB6, 0xBCB6B8BC,
+ 0xBABDB4B8, 0xB5BCC0B5, 0xC3BABCC0, 0xB0B5ACC0,
+ 0x9D9BA097, 0xABA79FA3, 0xAAABA7AA, 0xA1A9ACA3,
+ 0xACA1A8AC, 0x989E93A8, 0xA09DA59A, 0xA99FA2AA,
+ 0xA1A99FA1, 0x9A9FA49B, 0xA59A9FA5, 0x9EA5989F,
+ 0x999DA195, 0xA498A1A5, 0x9EA296A0, 0x909DA195,
+ 0x9F93989C, 0x9B9F939B, 0x8C989C90, 0x988C9498,
+ 0x95998D94, 0x8D94988C, 0x95899599, 0x90948891,
+ 0x83909488, 0x8A7E8B8F, 0x87887E86, 0x6B838179,
+ 0x807A7374, 0x5B5C5880, 0x00000100, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x22232100, 0x31323533, 0x38363033,
+ 0x38393737, 0x37373B36, 0x3C36383C, 0x4E504A3A,
+ 0xB8A8ACA6, 0xBCB7B9BD, 0xB1B7B2B6, 0xB7B5BAB8,
+ 0xBCB7B6BC, 0xB5BBB6B6, 0xB9B4B9B7, 0xB9B7B6BB,
+ 0xB5B8B6B6, 0xB8B4B9B8, 0xBBB9B5BA, 0xB6BBB9B6,
+ 0xB9B9BDB8, 0xBCBABABE, 0xB2B9B6B7, 0xB8B5BAB8,
+ 0xBAB8B5BA, 0xB7BAB8B7, 0xBAB8BBB9, 0xBCB7B7BC,
+ 0xB6BCB7B6, 0xB7B8BCB7, 0xBCB7B8BC, 0xB6BCB7B8,
+ 0xB5B2B9B4, 0xBAB5B3BA, 0xB3BAB5B3, 0xB9B0B9B6,
+ 0xBAB9B2BA, 0xB3B8B6B5, 0xB8B2B8B3, 0xBCB6B7BD,
+ 0xB8BCB7B8, 0xB9B6BBB9, 0xBBB9B6BB, 0xB6BBB9B6,
+ 0xB9B6BBB9, 0xBBB9B6BB, 0xB9BCBAB8, 0xB8B6BCB7,
+ 0xBCB7B7BD, 0xB5BAB8B6, 0xB8B6BBB9, 0xBBBAB5BA,
+ 0xB3B8B7B6, 0xB9B5BAB9, 0xB8B7B5BA, 0xB2B9B6B2,
+ 0xB2B3B6B4, 0xB4AFB3B7, 0xB3B7B2B0, 0xAEB3B7B1,
+ 0xB4AFB0B4, 0xAEB4AFB0, 0xA8A8ADAB, 0xB3B1A4AB,
+ 0xAEB3B1AE, 0xB0B0B3B1, 0xB6B1B1B5, 0xB3B7B2B2,
+ 0xB2B5B6B2, 0xB6B4B5B6, 0xB2B5B3B5, 0xB2B2B8B3,
+ 0xBAB3B2B9, 0xBCC0BAB3, 0x36848882, 0x3C373A3C,
+ 0x383C3738, 0x2F30342F, 0x33313034, 0x16161632,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x40404000, 0x777E827C, 0x827C7981,
+ 0x82847E7E, 0x8488897F, 0x948A8D8E, 0x90948993,
+ 0x8D98998F, 0x9D929599, 0x979D9299, 0x949B9F93,
+ 0xA6999CA0, 0x9EA5989F, 0x97A0A498, 0xA5999FA3,
+ 0xA0A79AA1, 0x9A9BA196, 0xA2979DA5, 0x9AA3969A,
+ 0x989DA398, 0xA2979DA3, 0xA0A4999E, 0xA1A2A89D,
+ 0xADA0A6AC, 0xA6ADA0A6, 0xA1A6ADA0, 0xABA2A6AC,
+ 0xA8ACA6A6, 0xA6A5ABA6, 0xADA8A4AB, 0xA7ADA8A6,
+ 0xBCB6BCB7, 0xBDBBBBC1, 0xB8BDBBB8, 0xB6B9BFBA,
+ 0xBBB9B5BB, 0xB7BCBAB8, 0xBAB8BDBB, 0xBDB8B6BD,
+ 0xBAC0BBB7, 0xBCB7BEBB, 0xBDBCB7BD, 0xB9BFBEB7,
+ 0xBEB8C0BF, 0xBCBDB7BF, 0xB8BDBEB7, 0xBFB8C0BF,
+ 0xBFC0B8C0, 0xBABFC0BA, 0xBEB7BFBE, 0xBFC0B7BF,
+ 0xBABFC0BA, 0xBFB7BFBE, 0xBEBFB8C0, 0xB9BEBFB9,
+ 0xBFB7BFBE, 0xBFC0B8C0, 0xBABFC0BA, 0xBFB9BFBE,
+ 0xC0C0BAC0, 0xB8C0C0B8, 0xC0B9BEBF, 0xBFBEBABF,
+ 0xBAC0BFB9, 0xBFB7BFBF, 0xC0BFB8C0, 0xB5BDBCB8,
+ 0xBFB9C1C0, 0xC1C0B7BF, 0xBAC0BFBB, 0xBEB8C0BF,
+ 0xC0C0B7BF, 0xB7BFBFB8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBEB5BFBF, 0xC3C1B7BF, 0xBEC3C1BE,
+ 0xC0BBC1C0, 0xBFC0BBC1, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBBC0BFBB, 0xBCB9BFBE, 0xBDBCB7BD,
+ 0xBAC0BFB5, 0xBEBAC0BF, 0xC0BEBBC0, 0xBBC0BEBD,
+ 0xBEBABFBE, 0xBCBDB9BF, 0xB7BDBCB7, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xB8B6BEBE, 0xBBBAB0B8,
+ 0xB5BDBCB3, 0xB9B7BEBB, 0xBBB9B5BC, 0xB5BAB8B6,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBDB9BFBE,
+ 0xBDBCB8BE, 0xB7BDBCB7, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9C0BDB9,
+ 0xB7B8BBB9, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000000, 0x1B000001, 0x374B1512,
+ 0x2E1E3D40, 0x87422D54, 0x66A37055, 0x8766A387,
+ 0x476D5381, 0x25423824, 0x36284037, 0x4520162D,
+ 0x243B382E, 0x3221432E, 0xA36F5186, 0x64A48A65,
+ 0x76599087, 0x3A3F2D52, 0x31502A1E, 0x32234240,
+ 0x07080808, 0xBBB90809, 0xB8BCB7B8, 0xBBB8BDBB,
+ 0xBEBCB8BD, 0xB8BDBBB9, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xBABDBBBA, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB7BEBB, 0xBDBCB7BE, 0xB8BDBCB8, 0xBBB8BDBB,
+ 0xBDBCB8BD, 0xB8BDBCB8, 0xBBB7BEBB, 0xBDBCB7BE,
+ 0xB7BDBCB7, 0xBBBAC1BE, 0xBEBCB7BE, 0xBABFBDB9,
+ 0xBFB8BEBD, 0xBFBEBAC0, 0xBAC0BFB9, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xB9BFBEB8, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB8BEBD, 0xBFC0B9BF, 0xBABFC0BA, 0xBFBAC0BF,
+ 0xBFBEBAC0, 0xB9BFBEB9, 0xBDB9BFBE, 0xBFBEB8BE,
+ 0xBAC0BFB9, 0xBEBAC0BF, 0xBFBEB9BF, 0xB8BEBDB9,
+ 0xBCB7BDBC, 0xBCBBB7BD, 0xB7BDBCB6, 0xBFB8BEBD,
+ 0xBFBCBAC0, 0xB6BDBAB8, 0xBCB5BBBA, 0xBDBAB7BD,
+ 0xB2B9B6B6, 0xA3A1A8A5, 0xAEAD9FA6, 0xA9AEADA9,
+ 0xB9B1B5B6, 0xB9B8B4B8, 0xB4B9B7B4, 0xB7B8BCB7,
+ 0xBDB8B8BC, 0xB8BBB9B9, 0xBAB7BCBA, 0xBCBBB7BC,
+ 0xB6BCBBB6, 0xB7B6BBB9, 0xBBB6B6BC, 0xB4BBB8B5,
+ 0xBDB7BDBC, 0xBEBDB5BD, 0xB8C0BFB6, 0xBDB9BFBE,
+ 0xBEBDB8BE, 0xB9BFBEB8, 0xBEBABFBE, 0xBDBBBABF,
+ 0xBABDBBBA, 0xBDB7BCBA, 0xBDBBBABF, 0xB8BDBBB8,
+ 0xBBB6BDBA, 0xBDBCB7BE, 0xB7BDBCB7, 0xBDBABFBE,
+ 0xB8B7B9BE, 0xB3B8B7B3, 0xBAB3B8B6, 0xBBB9B7BC,
+ 0xB8BBB9B8, 0xB7B8BCB7, 0xB9B4B8BC, 0xB8BCB7B5,
+ 0xB4B8BCB7, 0xB7B2B5B9, 0xB3B7B2B3, 0xBAB8BBB9,
+ 0xBEB9B7BC, 0xB7BDB8B8, 0xB6B8BCB6, 0xBDB4B8BC,
+ 0xBABDB4BA, 0xB6BDC1B6, 0xC3BABDC1, 0xB0B5ACC0,
+ 0x9D9FA49B, 0xADA89DA4, 0xABACA8A9, 0xA1A9AAA1,
+ 0xACA1AAAB, 0xA6ACA1A8, 0x9AA1A99F, 0xA49D9BA4,
+ 0x929A939C, 0x9C9DA59B, 0xA79CA1A7, 0x9EA499A1,
+ 0x979DA195, 0xA5999FA3, 0xA0A498A1, 0x93A0A498,
+ 0x9C909B9F, 0x989C9098, 0x8B989C90, 0x998D9397,
+ 0x989C9095, 0x8C999D91, 0x94889498, 0x90948890,
+ 0x83909488, 0x887C8B8F, 0x85897E84, 0x787F8077,
+ 0x7F798081, 0x5A5B577F, 0x00000100, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x22232100, 0x34323533, 0x36363336,
+ 0x38393736, 0x37383B39, 0x3C36383C, 0x4D4F493A,
+ 0xB5A9ADA7, 0xBCB7B7BB, 0xB6BCB7B8, 0xB8B3B8B6,
+ 0xBBB9B5BA, 0xB4B9B7B6, 0xB9B6BBB9, 0xBAB8B6BB,
+ 0xB7BAB8B7, 0xB6B5BAB8, 0xB9B7B3B8, 0xB4B9B7B4,
+ 0xB8B5BBB6, 0xB8B7B5BA, 0xB2B8B7B3, 0xB8B6BBB9,
+ 0xBBB9B5BA, 0xB8BBB9B8, 0xB7B8BBB9, 0xBCB6B8BC,
+ 0xB4B8B2B8, 0xB2AEB2AD, 0xBBB6B3B7, 0xB6BCB7B7,
+ 0xBAB7BCBA, 0xBDBAB6BD, 0xB6BDBAB6, 0xB9B0B9B6,
+ 0xB8B7B2BA, 0xB5BAB8B2, 0xB6B1B7B2, 0xBCB6B5BB,
+ 0xB8BCB7B8, 0xBDBABEB9, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBCB9BEBC, 0xBDBBB9BE, 0xBABDBBBA, 0xBAB9BDB8,
+ 0xBEB9BBBF, 0xBBBFBABA, 0xB8B5BAB8, 0xBBB8B4BB,
+ 0xB2B9B6B4, 0xBBB2B8B7, 0xB9B8B6BC, 0xB5BBBAB1,
+ 0xB8B6BBB9, 0xBCB7B9BD, 0xB8BCB7B8, 0xB6B7B9B3,
+ 0xB9B4BABC, 0xB6BBB9B5, 0xACB4B9B8, 0xB8B7A7AD,
+ 0xACB2B1B2, 0xB4B0B3B1, 0xB9B4B3B6, 0xB5B9B4B5,
+ 0xB5B7B8B4, 0xB8B6B8B9, 0xB4B8B3B7, 0xB2B2B9B2,
+ 0xBBB5B2B9, 0xBBBFB9B7, 0x35868882, 0x3C37393B,
+ 0x383C3738, 0x2E30342F, 0x32322F33, 0x16161632,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x3E404000, 0x777E827C, 0x827C7981,
+ 0x81867D7E, 0x84888C81, 0x94898E90, 0x90948890,
+ 0x8E97998D, 0x9C91969A, 0x979D9298, 0x929B9F93,
+ 0xA2959A9E, 0x9EA5989B, 0x99A0A498, 0xA599A1A5,
+ 0x9FA699A1, 0x999FA49B, 0xA59A9CA4, 0x9BA4979D,
+ 0x979CA297, 0xA4999CA2, 0x9EA499A0, 0x9D9BA196,
+ 0xADA0A0A8, 0xA6ADA0A6, 0xA3A8AFA2, 0xADA4A8AE,
+ 0xA6ADA6A8, 0xA8A7AEA9, 0xADAAA4AB, 0xA6ADAAA6,
+ 0xBBB6BCB7, 0xBDBBBAC0, 0xB8BDBBB8, 0xB9B8BEB9,
+ 0xBAB8B8BE, 0xBABDBBB7, 0xBBB8BDBB, 0xBAB8B7BE,
+ 0xB8BDBBB5, 0xBEB8BEBD, 0xBFBEB9BF, 0xBAC0BFB9,
+ 0xC0B6BEBD, 0xBEBFB9C1, 0xB8BDBEB9, 0xBEB8C0BF,
+ 0xC0C1B7BF, 0xBBC0C1BB, 0xBEB8C0BF, 0xBFC0B7BF,
+ 0xBABFC0BA, 0xBFB7BFBE, 0xBEBFB8C0, 0xBABFC0B9,
+ 0xBFB7BFBE, 0xBEBFB7BF, 0xB9BEBFB9, 0xBFB9BEBF,
+ 0xBFBFB9BE, 0xB8C0C0B7, 0xC0B9BEBF, 0xBFBEBABF,
+ 0xBAC0BFB9, 0xBEB7BFBF, 0xC0BFB7BF, 0xB7BFBEB8,
+ 0xC0B6BEBD, 0xBFBEB8C0, 0xBBC1C0B9, 0xBDB8C0BF,
+ 0xC0C0B6BE, 0xB7BFBFB8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB3BBBBB8, 0xBFAAB4B4, 0xC2C0B8C0, 0xBFC5C0BD,
+ 0xC0BCC1C0, 0xBFC0BBC1, 0xBAC0BFBA, 0xBEBAC0BF,
+ 0xC0BFBAC1, 0xBBC0BFBB, 0xBDB9BFBE, 0xBDBCB8BE,
+ 0xBAC0BFB5, 0xBEBBC0BF, 0xC1BFBBC0, 0xBBC1BCBE,
+ 0xBFB9C0BD, 0xBEBFBAC0, 0xB9BEBFB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB8BEBDB9, 0xBBB8C0C0, 0xBBBAB3BB,
+ 0xB5BDBCB3, 0xB7B7BEBB, 0xBCB7B6BC, 0xB6BCB7B8,
+ 0xBEBABFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9C0BDB9,
+ 0xB7B8BBB9, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000000, 0x1A000001, 0x374B1411,
+ 0x2D1E3D40, 0x86422D54, 0x66A36F54, 0x8866A387,
+ 0x476D5381, 0x26433A24, 0x36284038, 0x4420172C,
+ 0x253C362F, 0x3221422F, 0xA36F5186, 0x65A58A65,
+ 0x76599088, 0x3A402E53, 0x304F2A1E, 0x3223423F,
+ 0x07080808, 0xBBB90809, 0xB8BCB7B8, 0xBCBABDBB,
+ 0xBFBDBBBE, 0xB8BDBBBC, 0xBBB8BDBB, 0xBAB8B8BD,
+ 0xBBBEBCB7, 0xBBB7BCBA, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBCB7BDBC, 0xBCBDB7BD, 0xB8BDBCB8, 0xBBB7BEBB,
+ 0xBDBCB7BE, 0xB8BDBCB8, 0xBCB7BDBC, 0xBDBEB7BD,
+ 0xB7BDBCB8, 0xBBB9C0BD, 0xBFBEB7BE, 0xBAC0BFB9,
+ 0xBEB7BDBC, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xB9BFBEB8, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB8BDBCB8, 0xBEBABFBE,
+ 0xBDBCBABF, 0xB8BDBCB8, 0xBAB6BDBA, 0xBCBBB6BD,
+ 0xB9BFBEB6, 0xADB8BEBD, 0xAEADA8AE, 0xAFB5B4A8,
+ 0xB6B2B7B8, 0xBABAB1B5, 0xB6B9B7B8, 0xB7B4BAB5,
+ 0xBBB6B6BC, 0xB8BCB7B7, 0xBAB6BCB7, 0xBDBBB6BD,
+ 0xB5BCB9B8, 0xB9B0B8B7, 0xBBB9B3BC, 0xB5BCB9B6,
+ 0xBDB7BDBC, 0xBDBDB5BD, 0xB5BDBDB5, 0xBEB7BDBC,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBAB9C0BD, 0xBFBEB6BD,
+ 0xB8BDBCBA, 0xBDB7BCBA, 0xBDB8BABF, 0xB9BFBAB7,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBAB9BEBD,
+ 0xBBBAB6BB, 0xB6BBBAB6, 0xB8B5BAB9, 0xB9B7B4B9,
+ 0xB6BBB9B4, 0xB7B5B9B4, 0xBAB5B8BC, 0xB4B8B3B6,
+ 0xB5B4B8B3, 0xB9B4B6BA, 0xB8BCB7B5, 0xBBB7BCBA,
+ 0xBBB9B8BD, 0xB7BDB8B6, 0xB5B8BCB6, 0xBDB4B7BB,
+ 0xBABDB4BA, 0xB5BAC0B5, 0xC3BABAC0, 0xB0B5ACC0,
+ 0x9D9FA39D, 0xACA79DA4, 0xA8ACA6A8, 0xA0A8ACA1,
+ 0xACA0A8AC, 0xA6ACA1A8, 0xA1A1A99F, 0xA8A1A0A8,
+ 0xA0A8A1A0, 0x9DA0A89E, 0xA499A0A8, 0x9EA5989E,
+ 0x959DA195, 0xA4989DA1, 0x9B9F93A0, 0x929B9F93,
+ 0x9C909A9E, 0x989C9098, 0x8D989C90, 0x988C9599,
+ 0x95998D94, 0x8D95998D, 0x978B9599, 0x90948893,
+ 0x83909488, 0x897E8B8F, 0x85897E83, 0x787F8077,
+ 0x746E8081, 0x5A5B5774, 0x00000100, 0x00000000,
+ 0x02000002, 0x01000001, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x22232100, 0x33323533, 0x38383235,
+ 0x38393738, 0x37383B39, 0x3B35383C, 0x4E504A39,
+ 0xB7A9AAA6, 0xBCB7B8BC, 0xB7BBB6B8, 0xB8B8BBB9,
+ 0xB9B7B7BA, 0xB3B8B6B4, 0xB9B5BAB8, 0xBDB8B6BB,
+ 0xB8BCB7B9, 0xB5B6BCB7, 0xBCB7B4BA, 0xB5BBB6B6,
+ 0xB7B3B8B6, 0xBAB9B4B9, 0xB5BAB9B5, 0xBAB6B9B7,
+ 0xBCB7B9BC, 0xB6BCB7B6, 0xB7B8BCB7, 0xB7B1B8BC,
+ 0xA9ABA5B5, 0xABA8ACA7, 0xB8B3ACB0, 0xB6BCB7B4,
+ 0xBAB8BDBB, 0xBDBAB6BD, 0xB6BDBAB6, 0xBAB4BBB8,
+ 0xBAB8B6BD, 0xB7BCBAB5, 0xAFB1B7B2, 0xB9B4AEB4,
+ 0xB5B9B4B5, 0xB7B8BCB7, 0xBCB7B8BC, 0xB6BCB7B6,
+ 0xB9B8BBB9, 0xBBB9B8BB, 0xB5BAB8B6, 0xB7B9BDB8,
+ 0xBBB9B8BC, 0xB8BBB9B8, 0xB6B2B8B3, 0xBEB9B4BB,
+ 0xB4BEB8B7, 0xBAB6BDBA, 0xBAB9B6BD, 0xB4BAB9B4,
+ 0xB7B6BBB9, 0xBDB8B8BC, 0xB6BAB5B9, 0xB6BABCB6,
+ 0xB8B3BABC, 0xAEB3B1B4, 0xB8B3B8B7, 0xB7B8B2B7,
+ 0xADB2B3B2, 0xB1B4B6B6, 0xB4AFB0B3, 0xAFB3AEB0,
+ 0xB2B3B7B2, 0xB6B1B3B7, 0xB0B4AFB2, 0xAEADB4AD,
+ 0xB8B3AEB5, 0xBBBFBAB4, 0x37868783, 0x3C373A3B,
+ 0x383C3738, 0x2F30342F, 0x32323034, 0x15151532,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00010000, 0x3E404000, 0x767B7F79, 0x857C7880,
+ 0x84898080, 0x84898D82, 0x90848C90, 0x9094888C,
+ 0x8E97998D, 0x9D92969A, 0x9CA29799, 0x939B9F93,
+ 0xA0949B9F, 0xA0A4989C, 0x98A1A599, 0xA599A0A4,
+ 0x9FA699A1, 0x9AA0A59C, 0xA59A9DA5, 0x99A2959D,
+ 0x979EA499, 0xA4999CA2, 0x9EA499A0, 0x9A9FA59A,
+ 0xA99E9DA5, 0xA5ABA0A3, 0xA4A5ADA2, 0xADA6A6AE,
+ 0xA9B0A9A6, 0xA8A7AEA9, 0xAAA4A6AD, 0xA5ACA7A0,
+ 0xBDB6BBB9, 0xBDBBBABF, 0xBABDBBBA, 0xBBBABDBB,
+ 0xBBB9BABD, 0xBABDBBB8, 0xBEBABFBE, 0xBDBBBBC0,
+ 0xB8BDBBB8, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBDBAC0BF, 0xBFBEB8BE, 0xB8BEBDB9, 0xBFB8C0BF,
+ 0xC1C0B8C0, 0xBBC1C0BB, 0xBFBABFC0, 0xBFBEB9BE,
+ 0xBAC0BFBA, 0xC0B7BFBF, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBEBFB8C0, 0xB9BEBFB9, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0BFB8, 0xBFB7BDBC, 0xBEBFBAC0,
+ 0xB9BEBFB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB8C0BFB7,
+ 0xBEB7BDBC, 0xC1C1B9BF, 0xB8C0BFB9, 0xBFBAC0BF,
+ 0xC0C0B8C0, 0xB6C0C0B8, 0xC0B6C0C0, 0xC1C0B8C0,
+ 0xADB5B4B9, 0xBFABB5B5, 0xC3C1B6C1, 0xBDC3BEBE,
+ 0xC0BCC1C0, 0xC0C1BBC1, 0xBAC0BFBB, 0xBEBAC0BF,
+ 0xC0BFBAC1, 0xBBC0BFBB, 0xBEB9BFBE, 0xBDBCB9BF,
+ 0xBAC0BFB7, 0xBEBBC0BF, 0xC0BEBBC0, 0xBBC1BCBB,
+ 0xBDB9C0BD, 0xBFBEB9C0, 0xB9BFBEB9, 0xBDB9BFBE,
+ 0xBFBEB8BE, 0xBAC0BFB9, 0xBBB8C0C0, 0xBCBBB3BB,
+ 0xB7BDBCB6, 0xBBB9BEBC, 0xBCB7B8BD, 0xB6BCB7B8,
+ 0xBEBABFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xC0BFB9BF, 0xBAC0BFBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9C0BDB9,
+ 0xB7B8BBB9, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000000, 0x1A000001, 0x374B1411,
+ 0x2D1E3D40, 0x87422D54, 0x66A37055, 0x8866A388,
+ 0x476D5381, 0x26433824, 0x36284038, 0x4420172C,
+ 0x263B362F, 0x3221422F, 0xA26F5186, 0x65A58765,
+ 0x75588F88, 0x3A412F54, 0x29482A1E, 0x33234238,
+ 0x07080808, 0xBCBA0809, 0xB8BCB7B9, 0xBBBABDBB,
+ 0xBFBDBABD, 0xB8BDBBBC, 0xBBBABFBD, 0xBBB9B7BE,
+ 0xB9BCBAB6, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBCB7BDBC, 0xBCBDB7BD, 0xB8BDBCB8, 0xBBB7BDBC,
+ 0xBEBDB7BE, 0xBABFBEB9, 0xBCB7BDBC, 0xBCBDB7BD,
+ 0xB7BCBDB7, 0xBDB8BEBD, 0xC0BFB9C0, 0xB9BFBEBA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB9BFBE,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB9BFBEB7, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBFB9BFBE, 0xBFBEBAC0, 0xB7BDBCB9,
+ 0xBCB7BDBC, 0xBDBBB7BD, 0xB8BDBBB8, 0xBCBABFBE,
+ 0xBCBBB8BD, 0xB8BDBCB7, 0xBAB6BDBA, 0xBCBBB6BD,
+ 0xB6BCBBB6, 0xBDB8BEBD, 0xBEBDB8BE, 0xB8BEBDB8,
+ 0xB6AFB4B5, 0xBABAB1B5, 0xB8BBB9B8, 0xB7B6BBB9,
+ 0xBCB7B6BC, 0xB8BCB7B8, 0xBAB7BDB8, 0xBCBAB6BD,
+ 0xB6BDBAB7, 0xB8ACB4B3, 0xBAB7B1B9, 0xB5BCB9B3,
+ 0xB8B0B8B8, 0xBBBBB0B8, 0xB5BDBDB3, 0xBCB8BDBC,
+ 0xBEBDB8BD, 0xBBC0BEB9, 0xBBB7BEBB, 0xBFBEB7BE,
+ 0xB8BDBCBA, 0xBAB8BDBB, 0xBEB9B7BC, 0xB8BEB9B8,
+ 0xBAB9BEBC, 0xBDBBB7BC, 0xB8BDBBB8, 0xB9B9BEBC,
+ 0xBEBDB6BB, 0xB3B8B6B9, 0xB7B3B8B7, 0xB9B7B4B9,
+ 0xB4B9B7B4, 0xB2B5B9B4, 0xB6B1B3B7, 0xB8BCB7B2,
+ 0xB7B8BCB7, 0xB9B4B8BC, 0xB8BCB7B5, 0xBAB6BBB9,
+ 0xBDBAB7BC, 0xB7BDB8B6, 0xB7B8BCB7, 0xBCB3B9BD,
+ 0xB8BDB4B7, 0xB6BABFB6, 0xC4BBBABF, 0xAFB3ADBF,
+ 0x9D99A099, 0xACA79DA4, 0xA8ACA6A6, 0x9CA6ACA1,
+ 0xABA0A4A8, 0xA3A99EA7, 0x9FA1A99F, 0xA8A1A0A9,
+ 0xA1A99FA1, 0x9A9FA79C, 0xA6999DA5, 0x9FA6999F,
+ 0x95A0A498, 0xA4989DA1, 0x9B9F93A0, 0x939B9F93,
+ 0x9C909B9F, 0x989C9098, 0x8D989C90, 0x9A8E9599,
+ 0x989C9096, 0x8B989C90, 0x978B9397, 0x90948893,
+ 0x83909488, 0x897E8990, 0x83897E83, 0x78808178,
+ 0x807A8081, 0x5A5B577E, 0x00000100, 0x00000000,
+ 0x02000002, 0x01000001, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x22232100, 0x33323533, 0x36363235,
+ 0x38393736, 0x37383C37, 0x3B37383C, 0x4E4F4B3A,
+ 0xB7AFB0AC, 0xB7B2B8BC, 0xB3B7B2B3, 0xB9B8BBB9,
+ 0xBBBAB6BB, 0xB4BAB9B6, 0xB8B4BAB9, 0xBCB7B5BA,
+ 0xB8BCB7B6, 0xB7B6BCB7, 0xBCB7B6BC, 0xB8BBB9B8,
+ 0xBBB5BAB8, 0xBCBBB7BC, 0xB7BCBBB7, 0xB9B9BCBA,
+ 0xBBB6B8BB, 0xB5BBB6B5, 0xB7B7BBB6, 0xBCB6B8BC,
+ 0xBABCB6BA, 0xB8B8BCB7, 0xBCB7B9BD, 0xB3B7B2B8,
+ 0xB8B3B8B6, 0xBAB7B3B9, 0xB3BAB7B3, 0xBAB5BAB8,
+ 0xBCBAB7BC, 0xB5BAB8B7, 0xAFB1B6B4, 0xB4AFAEB4,
+ 0xB5B9B4B0, 0xB9B8BCB7, 0xBEB9BABE, 0xBABFBDB8,
+ 0xBDBBBEBC, 0xBCBABCBF, 0xB8BDBBB7, 0xB7B8BBB9,
+ 0xBDBBB8BC, 0xB8BDBBBA, 0xB6B8BDBB, 0xBBB6B4BB,
+ 0xB4BBB6B4, 0xB6B4BBB6, 0xB8B6B4BB, 0xB3B8B6B3,
+ 0xB7B6BCB7, 0xB9B4B8BC, 0xB5B9B4B5, 0xB3B5B9B3,
+ 0xB7B2B5B9, 0xAEB3B1B3, 0xB7B3B8B7, 0xB2B3B2B8,
+ 0xB3B8B7AE, 0xB4B3B6B4, 0xBAB5B3B6, 0xB3B7B2B6,
+ 0xB1B4B8B3, 0xB9B4B2B6, 0xB3B7B2B5, 0xB2B2B9B2,
+ 0xB8B3B2B9, 0xBBBFBAB4, 0x37868783, 0x3C373A3B,
+ 0x383C3738, 0x2F30342F, 0x33313034, 0x16161632,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x3E413F00, 0x777F837D, 0x837A7981,
+ 0x8489807E, 0x88888C81, 0x94889094, 0x90948890,
+ 0x8E95978B, 0x9E91969A, 0x9BA29597, 0x959B9F93,
+ 0xA1959DA1, 0x9DA1959D, 0x99A0A498, 0xA498A1A5,
+ 0xA0A498A0, 0x9A9FA59A, 0xA1969DA5, 0x959D9299,
+ 0x989CA297, 0xA3989DA3, 0x9FA3989F, 0x9A9FA59A,
+ 0xA59A9FA5, 0xA3A89F9F, 0xA4A6AEA4, 0xB0A9A6AE,
+ 0xA9B0A9A9, 0xA8A9B1AA, 0xAAA4A6AD, 0xA8AFAAA0,
+ 0xBDB8BDBB, 0xBDBBBABF, 0xB9BCBABA, 0xBABABDBB,
+ 0xBDBBB9BC, 0xB8BBB9BA, 0xBEB8BDBC, 0xBDBBBABF,
+ 0xB6BBB9B8, 0xBFBAC0BF, 0xBFBEBAC0, 0xB7BDBCB9,
+ 0xBFB9BFBE, 0xC0BFBAC0, 0xB9BFBEBA, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xBBC1C0BA, 0xC0BABFC0, 0xBFBEBABF,
+ 0xBBC1C0BA, 0xC0BABFC0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B9C1C1, 0xBEBFB8C0, 0xB9BEBFB9, 0xC0B9C1C1,
+ 0xBFBEB8C0, 0xB8C0BFB7, 0xBFB7BDBC, 0xBFC0BAC0,
+ 0xB9BEBFBA, 0xBFB9BFBE, 0xBFBFBAC0, 0xB8C0C0B7,
+ 0xBDBAC0BF, 0xC0C0B6BE, 0xB8C0C0B8, 0xBEBBC1C0,
+ 0xBFBFB9BF, 0xB8C0C0B7, 0xC0B6C0C0, 0xB5B5B8C0,
+ 0xA8B0B0AD, 0xB9ABB5B5, 0xC4C1B0BB, 0xBEC3C1BD,
+ 0xC0BCC2C1, 0xC0C1BBC1, 0xBABFC0BB, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBBC0BFBB, 0xBEB9BFBE, 0xBDBCB9BF,
+ 0xBAC0BFB7, 0xBEBCC1C0, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBDBAC1BE, 0xC0BFB9C0, 0xB9BFBEBA, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBDB7BCBD, 0xC0BFB5BD,
+ 0xBAC0BFBA, 0xB8B7BCBA, 0xBBB9B5BA, 0xB6BBB9B6,
+ 0xBEBABFBD, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBDB9,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000000, 0x1A000001, 0x374B1411,
+ 0x2E1E3D40, 0x87422D54, 0x66A37055, 0x8866A388,
+ 0x466D5381, 0x26433723, 0x36284038, 0x4420172C,
+ 0x263B382F, 0x3221422F, 0xA46D5186, 0x65A58967,
+ 0x795A9188, 0x3A402E53, 0x314D2C1E, 0x32233F40,
+ 0x07080808, 0xBBB90809, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xBEBCBBBF, 0xB9BEBCBB, 0xBBBABFBD, 0xBDBCB7BE,
+ 0xBABFBEB8, 0xBCBABFBE, 0xBFBEB8BD, 0xBABFBEBA,
+ 0xBCB9BFBE, 0xBCBDB7BD, 0xBABFBEB8, 0xBCB9BFBE,
+ 0xBDBCB8BF, 0xB8BDBCB8, 0xBCB7BDBC, 0xBCBDB7BD,
+ 0xB7BCBDB7, 0xBFB7BDBC, 0xBFBEBAC0, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB7BDBCB9, 0xBCB7BDBC, 0xBFBEB7BD, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB7BDBC,
+ 0xBCBBB7BD, 0xB7BDBCB6, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB7BDBCB9, 0xBCB7BDBC, 0xBFBEB7BD, 0xBABFBEBA,
+ 0xBEB9C0BD, 0xBDBBBAC1, 0xBABFBDB8, 0xBEB9BEBD,
+ 0xBDBCBABF, 0xB8BDBCB8, 0xBBB6BDBA, 0xBEBBB7BE,
+ 0xB7BEBBB7, 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBBB6BCBB, 0xBCBBB6BC, 0xB7BCBBB7, 0xBAB7BCBB,
+ 0xBBB9B9BC, 0xB8BBB9B8, 0xBBB7BCBB, 0xBDBCB6BC,
+ 0xB6BCBBB7, 0xBAB6BCBB, 0xBDBAB3BB, 0xB4BDBAB6,
+ 0xBCB4BCBC, 0xBBBEB4BC, 0xB4BCBCB4, 0xBBB8BDBC,
+ 0xBDBBB8BD, 0xB7BCBABA, 0xBEB6BDBA, 0xBFBEBAC1,
+ 0xB7BCBBB9, 0xBBB9BEBC, 0xBFBABCC0, 0xBBBFBABB,
+ 0xBBB9BCBA, 0xBBB9BABD, 0xBABDBBB8, 0xB4BBBEBC,
+ 0xB8B6B5B9, 0xB0B4AFB5, 0xB2A8ABA9, 0xB7B2B3B7,
+ 0xB3B7B2B3, 0xAFB3B7B2, 0xB9B4B0B4, 0xB8BCB7B5,
+ 0xB6B6BAB4, 0xBCB5B8BC, 0xB6BDB6B5, 0xB8B7BDB8,
+ 0xBCBAB7BD, 0xB7BDB8B7, 0xB7B9BDB8, 0xBCB6B9BD,
+ 0xB8BFB8B8, 0xB9B9C0B9, 0xC0B9B9C0, 0xAFB6AFB9,
+ 0x9E98A099, 0xAFAA9DA5, 0xA8AFA8A8, 0xA1A8ADA4,
+ 0xADA4A6AC, 0xA8ACA1AA, 0xA0A6ABA2, 0xAAA1A3AB,
+ 0xA4AA9FA5, 0x9BA3A99E, 0xA69AA1A8, 0xA3A79BA2,
+ 0x969DA497, 0xA4989CA3, 0x9CA094A0, 0x939DA195,
+ 0x9D919B9F, 0x989C9099, 0x8E999D91, 0x978B969A,
+ 0x989C9093, 0x8D999D91, 0x978B9599, 0x90948893,
+ 0x858A9085, 0x8C838A90, 0x83887F87, 0x78808178,
+ 0x807A8081, 0x5A5B577E, 0x00000100, 0x00000000,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x01000000, 0x22232100, 0x2F30342F, 0x38363034,
+ 0x37383637, 0x37383C37, 0x3B37383C, 0x50514D3A,
+ 0xB6ABAFAA, 0xBCB7B6BD, 0xB1B7B2B6, 0xB9B4B9B7,
+ 0xBBBAB6BB, 0xAEB6B5B3, 0xB9B0B8B7, 0xBBB9B3BC,
+ 0xB6BBB9B6, 0xBBB6BBB9, 0xBDBBB8BD, 0xB6BBB9B8,
+ 0xBAB3B8B7, 0xBABAB6BB, 0xBABCBCB8, 0xB9B9BCBA,
+ 0xBDB8BABE, 0xB6BCB7B7, 0xB6B7BBB6, 0xBAB6B7BB,
+ 0xBCBDB9B9, 0xB9BABDBB, 0xBDB8B8BE, 0xB8BCB7B9,
+ 0xBBBABDBB, 0xBBB9B8BD, 0xB6BBB9B6, 0xB7B5BCB9,
+ 0xBBBBB4B9, 0xB5B7B7B9, 0xB7B5BAB9, 0xBBB9B4B9,
+ 0xB8BBB9B8, 0xB9B6BBB9, 0xC0BDB6BB, 0xB9BEBDB9,
+ 0xBABBBDBD, 0xBBBAB8BA, 0xB6BBB9B6, 0xBBB6BBB9,
+ 0xBEBDB8BD, 0xBBC0BFB9, 0xBDBABFBE, 0xBDBBBABF,
+ 0xBBC0BEB8, 0xB7B6BCB7, 0xBDBBB6BC, 0xB8BDBBBA,
+ 0xB6B5BBB6, 0xBAB5B5BB, 0xB1B7B2B4, 0xB5B3BAB3,
+ 0xBAB3B5BC, 0xB3B9B4B3, 0xB6B3B9B4, 0xB8B6B3B8,
+ 0xB5B8B6B5, 0xB4B6BAB5, 0xBCB7B5B9, 0xB5B9B4B8,
+ 0xAFB3B7B2, 0xB5B0B0B4, 0xB3B7B2B1, 0xAEAEB5AE,
+ 0xB8B3AEB5, 0xB6BBB9B2, 0x397E817F, 0x3C37383B,
+ 0x383C3738, 0x2F30342E, 0x33313034, 0x1A181732,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x40443F00, 0x767E837A, 0x847B7981,
+ 0x8689807F, 0x858E8F85, 0x948A8E8F, 0x98998F93,
+ 0x90989C90, 0xA194989C, 0x9AA1949A, 0x929AA194,
+ 0xA3979AA1, 0xA0A4989F, 0x99A0A499, 0xA79BA0A4,
+ 0xA3A79BA3, 0x9DA2A89D, 0xA89DA2A8, 0x9BA097A2,
+ 0x9A99A197, 0xA39A9EA3, 0xA2A59CA0, 0x9CA0A59C,
+ 0xA59CA0A5, 0xA2A49EA2, 0xA9A1A8A1, 0xB0A9A8B0,
+ 0xA5ADA6A8, 0xA9A8B0A9, 0xADA6A8B0, 0xA9B0ABA5,
+ 0xBBB9BEBC, 0xBFBAB8BD, 0xBBBFBABB, 0xBBBABDBB,
+ 0xBDBBBABD, 0xB8BBB9BA, 0xBDB8BDBB, 0xBFBEBABF,
+ 0xB4BAB9B9, 0xBFB7BDBC, 0xBFBEBAC0, 0xBAC0BFB9,
+ 0xBFBAC0BF, 0xBFBEBAC0, 0xBAC0BFB9, 0xBFB7C0BD,
+ 0xC1C0B8C0, 0xBABFC0BB, 0xC0BBC1C0, 0xC0C1BBC1,
+ 0xBABFC0BC, 0xBEBAC0BF, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBEBFB8C0, 0xBABFC0B9, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xBFB5BBBA, 0xBFC0BAC0,
+ 0xBABFC0BA, 0xBFB5BBBA, 0xC0C0BAC0, 0xB7BFBFB8,
+ 0xBEB8C0BF, 0xC0BFB7BF, 0xB8C0BFB8, 0xC0BABFC0,
+ 0xBFBEBABF, 0xBAC0BFB9, 0xC0B8C0C0, 0xB5B5B8C0,
+ 0xA8B0B0AD, 0xBCB0B8B8, 0xC3C0B5BD, 0xBBC4C1BA,
+ 0xC0BBC1C0, 0xC0C0BBC1, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C1BABF, 0xBABFBEBC, 0xBDB9BFBE, 0xBFBEB9C0,
+ 0xBAC0BFB9, 0xBEBBC0BE, 0xC0BEBDC0, 0xBBC0BFBB,
+ 0xBEBABFBE, 0xBEBCBABF, 0xBBC0BEB9, 0xBDB9C0BD,
+ 0xBFBDB9C0, 0xB9C0BDBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBBB6BCBB, 0xBCBBB6BC, 0xB7BCBAB6,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000002, 0x1C000102, 0x35491613,
+ 0x2D1D3C40, 0x87422D54, 0x66A37055, 0x8765A288,
+ 0x486D5683, 0x26433925, 0x38284038, 0x4422162C,
+ 0x253C382F, 0x3122422F, 0xA36A5085, 0x62A48563,
+ 0x77588F86, 0x3C402E53, 0x2C472F22, 0x30213C3B,
+ 0x07080808, 0xBBB90809, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xBEBCBBBF, 0xB9BEBCBB, 0xBDBABFBD, 0xBDBCB9C0,
+ 0xBABFBEB8, 0xBEBABFBE, 0xBDBCBABF, 0xB8BDBCB8,
+ 0xBEB8BEBD, 0xBFC0B9BF, 0xB8BDBCBB, 0xBCB6BDBA,
+ 0xBFBEB8BF, 0xB9BEBDBA, 0xBCB6BCBB, 0xBCBDB7BD,
+ 0xB7BDBCB7, 0xBEB7BDBC, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xC0BFB9BF,
+ 0xB9BFBEBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBDB9BFBE, 0xBEBDB8BE, 0xBABFBEB9,
+ 0xBDB8BFBC, 0xBFBDB9C0, 0xB7BCBBBA, 0xBEB5BAB9,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBCB7BEBB, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBBB6BCBB, 0xBCBBB6BC, 0xB6BCBBB6, 0xBBB7BCBB,
+ 0xBCBAB9BB, 0xB9BBBBB9, 0xBBB7BCBB, 0xBCBBB6BC,
+ 0xB6BCBBB6, 0xBBB6BCBB, 0xBDBAB6BC, 0xB4BCBBB6,
+ 0xBCB4BCBB, 0xBBBEB4BC, 0xB4BCBCB4, 0xBBB7BCBB,
+ 0xBDBBB8BD, 0xB9BEBCBA, 0xBAB9C0BB, 0xBDBAB8BF,
+ 0xBABFBDB6, 0xBABBBEBC, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBBBDC0BE, 0xBDBBBABD, 0xBBBEBCBA, 0xBABABEB9,
+ 0xBAB5BBBF, 0xB0B4AFB6, 0xACADB1AC, 0xBCB7ADB1,
+ 0xB8BCB7B8, 0xB4B7BBB6, 0xB6B1B5B9, 0xB5B9B4B2,
+ 0xB6B7BBB5, 0xBBB4B8BC, 0xB3BAB3B4, 0xB8B6BCB7,
+ 0xBCBAB7BD, 0xB7BDB8B7, 0xB8B9BDB8, 0xBEB7BABE,
+ 0xB7BEB7B7, 0xB4B4BCB5, 0xBFBAB3BB, 0xB2B8B3B9,
+ 0x9998A099, 0xAFAA96A1, 0xA8B0A9A8, 0xA4A7AFA5,
+ 0xADA4A8AD, 0xA7AAA1AA, 0xA1A5ABA0, 0xACA1A6AC,
+ 0xA5ABA0A6, 0x9DA3AA9D, 0xA89CA3AA, 0xA3A79BA4,
+ 0x999EA598, 0xA4989FA6, 0x9CA094A0, 0x959DA195,
+ 0x9C909DA1, 0x9B9F9398, 0x8E989C90, 0x9A8E969A,
+ 0x989C9096, 0x8D989C90, 0x988C9599, 0x93978B94,
+ 0x858A9085, 0x8D838A90, 0x83887F85, 0x787E8178,
+ 0x807A8081, 0x5A5B577E, 0x00000100, 0x00000000,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x00000000, 0x22232100, 0x32333732, 0x37353337,
+ 0x36373536, 0x37393D38, 0x3B39383C, 0x4F534E3A,
+ 0xB5ACB0AB, 0xBCB7B5BC, 0xB6BCB7B6, 0xB7B6BBB9,
+ 0xB4B3B4B9, 0xADB5B4AC, 0xB9AAB2B1, 0xBBB9B3BC,
+ 0xB6BBB9B6, 0xBBB8BDBB, 0xBEBCB8BD, 0xB8BDBBB9,
+ 0xBBB9BEBD, 0xBCBBB6BA, 0xB9BEBDB7, 0xB7B8BBB9,
+ 0xBDB8B6BC, 0xB5BBB6B7, 0xB9BABEB9, 0xBDB9BABE,
+ 0xBABEB9BC, 0xBAB7BAB8, 0xBBB6B7BC, 0xBABEB9B7,
+ 0xBDBABDBB, 0xC0BEBCBF, 0xBBC0BEBB, 0xB9B8BFBC,
+ 0xB8B8B6BB, 0xB6B8B8B6, 0xB7B4B9B8, 0xBBB9B4B9,
+ 0xB6BBB9B8, 0xB6B5BCB9, 0xB7B6B2B9, 0xB5BBBAB1,
+ 0xBDB9BEBD, 0xBEBDB9BE, 0xB9BEBCB9, 0xBBB9BEBC,
+ 0xBAB9B8BD, 0xB6BBBAB5, 0xBAB6BBBA, 0xBBB9B6BB,
+ 0xB8BBB9B8, 0xB6B8BCB7, 0xBDBBB7BB, 0xBABDBBBA,
+ 0xB8B8BEB9, 0xBFBAB7BD, 0xB7BDB8B9, 0xB6B6BDB6,
+ 0xBCB5B6BD, 0xB5BCB5B5, 0xB7B8BCB7, 0xB9B4B8BC,
+ 0xB5B9B4B5, 0xB4B5B9B4, 0xBBB6B5B9, 0xB8BCB7B7,
+ 0xB7B8BCB7, 0xB9B4B8BC, 0xB3B7B2B5, 0xB2B1B8B1,
+ 0xB9B4B2B9, 0xB6BBB9B3, 0x397E817F, 0x3C37383B,
+ 0x383C3738, 0x2E30342E, 0x32303034, 0x1A181731,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x40443F00, 0x7580857C, 0x857C7880,
+ 0x86898082, 0x848C8F86, 0x948B8D8E, 0x98999093,
+ 0x91989C91, 0x9C8F999D, 0x9AA19495, 0x969CA394,
+ 0xA4989EA5, 0xA0A498A0, 0x9CA0A499, 0xA79BA3A7,
+ 0xA3A79BA3, 0xA0A2A89D, 0xACA3A5AB, 0x9FA49BA7,
+ 0x9A99A197, 0xA59C9CA4, 0xA2A59CA0, 0x9EA1A69D,
+ 0xA6A0A4A7, 0xA4A6A0A6, 0xA1A1A8A1, 0xACA5A0A8,
+ 0xA8B0A9A4, 0xA7A8B1A7, 0xAEA7A8B1, 0xA8AFAAA6,
+ 0xBDB9BFBA, 0xBFBABABF, 0xBBBFBABB, 0xBBB9BCBA,
+ 0xBDBBBABD, 0xB9BCBABA, 0xBBB6BBB9, 0xBFBEB8BD,
+ 0xB9BFBEB9, 0xBEB4BAB9, 0xC0BFB9BF, 0xB9BFBEBA,
+ 0xBEB7BDBC, 0xBFBEB9BF, 0xBAC0BFB9, 0xBEB7C0BD,
+ 0xC0BFB7BF, 0xBABFC0BA, 0xC1BBC1C0, 0xC1C2BCC2,
+ 0xBABFC0BD, 0xBFB7BFBE, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xBEBFB8C0, 0xBABFC0B9, 0xBFB8C0C0,
+ 0xC0C0B7BF, 0xB8C0BFB8, 0xBEB7BDBC, 0xBFC0B9BF,
+ 0xBABFC0BA, 0xBFB8BEBD, 0xC0C0BAC0, 0xB7BFBFB8,
+ 0xBEB8C0BF, 0xC1BFB7BF, 0xB8C0BFB6, 0xC0B7BFBF,
+ 0xBFBEBABF, 0xBAC0BFBA, 0xC0BABFC0, 0xB4B7B8C0,
+ 0xA8B0B0AD, 0xBEB0B8B7, 0xC3C0B7BF, 0xB7C2BFB8,
+ 0xC0B9C1C0, 0xC0C0BBC1, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xBFC0B8C0, 0xBABFBEBA, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xBAC0BFB9, 0xBEBDC0BE, 0xC0BFBDC0, 0xBBC0BFBB,
+ 0xBEBABFBE, 0xBFBDBABF, 0xBBC0BEBA, 0xBDB9C0BD,
+ 0xBFBDB9C0, 0xBABFBDBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBBB6BCBB, 0xBCBBB6BC, 0xB6BCBBB6,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000002, 0x1C020103, 0x34481613,
+ 0x2D1D3C3F, 0x87422D54, 0x65A57055, 0x8866A388,
+ 0x476E5784, 0x26433824, 0x38284038, 0x4422162C,
+ 0x253C382F, 0x3122422F, 0xA36A5086, 0x62A48364,
+ 0x76568F86, 0x3C402E53, 0x2D452F22, 0x30223A3B,
+ 0x07080808, 0xBBB90809, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xB9BFBABB, 0xBCBABFBD, 0xBDBCB8BF,
+ 0xB7BCBBB8, 0xBDB9BFBE, 0xBDBCB8BE, 0xB7BDBCB7,
+ 0xBDB9C0BD, 0xBFBEB9C0, 0xB8BDBCBA, 0xBBBABFBD,
+ 0xBCBBB8BD, 0xB8BDBCB7, 0xBBB7BEBB, 0xBDBCB7BE,
+ 0xB7BDBCB7, 0xBCB6BEBD, 0xBFBEB6BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBDB9BFBE, 0xBFBEB8BE, 0xB9BFBEB9, 0xBCB6BCBB,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xBFB7BFBF, 0xBEBDB7BF,
+ 0xB9BFBEB8, 0xBCB9C0BD, 0xBDBBB8BF, 0xB9BEBCB8,
+ 0xBEB9BFBE, 0xBDBCB9BF, 0xB7BDBCB7, 0xBEB9BFBE,
+ 0xC0BDB9BF, 0xBAC1BEB9, 0xBCB7BEBB, 0xBFBAB8BF,
+ 0xB8BFBAB8, 0xB8B6BCB7, 0xBCBAB5BA, 0xB8BDBBB7,
+ 0xBBB6BCBB, 0xBBBCB6BC, 0xB6BCBBB6, 0xBAB7BCBB,
+ 0xBCBBB7BC, 0xB6BBBAB7, 0xBAB4BAB9, 0xBCBBB5BB,
+ 0xB8BDBCB7, 0xBBB6BCBB, 0xBCBBB6BC, 0xB6BCBBB6,
+ 0xBBB4BCBB, 0xBCBCB4BC, 0xB4BCBCB4, 0xBAB7BCBB,
+ 0xBDBBB7BC, 0xB8BEB9B8, 0xBCB6BDB8, 0xBFBDBAC1,
+ 0xBABFBDBA, 0xBBBBBEBC, 0xBEBABABD, 0xBDBEBABD,
+ 0xB9BABDBB, 0xBDBBB8BB, 0xBABDBBBA, 0xBABCC0BB,
+ 0xBFBABBBF, 0xB5B9B4BB, 0xABADB1AB, 0xBCB6ADB1,
+ 0xB8BCB6B8, 0xB4B8BCB7, 0xBAB5B5B9, 0xB8BCB7B6,
+ 0xB3B6BDB6, 0xBBB6B3BA, 0xB3B9B4B5, 0xB7B6BDB6,
+ 0xBCB7B7BE, 0xB8BCB7B8, 0xB6B8BCB7, 0xBCB7B7BB,
+ 0xB7BDB8B6, 0xB9B4BCB5, 0xBFBAB8C0, 0xB2B8B3B9,
+ 0x99979F98, 0xB0A898A0, 0xA8B0A9A5, 0xA2A5ADA3,
+ 0xACA3A6AB, 0xA8ABA2A9, 0xA0A5ABA0, 0xABA0A5AB,
+ 0xA6ACA1A5, 0x9CA4A89C, 0xA79BA4A8, 0xA0A498A3,
+ 0x949EA598, 0xA2969AA1, 0x9CA0949E, 0x959DA195,
+ 0x9F939DA1, 0x9B9F939B, 0x8E999D91, 0x988C969A,
+ 0x999D9194, 0x8E989C90, 0x978B969A, 0x95998D93,
+ 0x838F958A, 0x8B85878C, 0x83878187, 0x787F8279,
+ 0x807A8081, 0x5A5B577E, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x00000000, 0x22232100, 0x2E30342F, 0x37323034,
+ 0x363A3533, 0x37383C37, 0x3C3A383C, 0x4D514C3B,
+ 0xB7ABAFAA, 0xB8B3B7BE, 0xB8BCB7B4, 0xB7B8BBB9,
+ 0xB8B6B4B9, 0xB3BAB7B3, 0xB9AFB6B3, 0xBBB9B6BB,
+ 0xB5B8B6B6, 0xB9B8BBB9, 0xBBB6B8BB, 0xBABDBBB7,
+ 0xBBB9BEBD, 0xB8B7B6BA, 0xB9BFBEB3, 0xBBBABFBD,
+ 0xBCBAB8BD, 0xB8BDBBB7, 0xB9BABEB9, 0xBEB9BABE,
+ 0xBABEB9BA, 0xB8BABDBB, 0xBCB7B7BA, 0xB7BBB6B8,
+ 0xB9B8BDBB, 0xBCB7B6BB, 0xB6BBB9B6, 0xBDB6BDBA,
+ 0xBBBAB8BE, 0xB8BDBCB6, 0xB7B6BBB9, 0xBAB8B4B9,
+ 0xB5BBB6B5, 0xBAB4BBB8, 0xBCB9B6BD, 0xB5BCB9B3,
+ 0xBDB4BAB9, 0xBFBCB8BE, 0xB6BBB9B8, 0xB7B6BBB9,
+ 0xBBB9B8BC, 0xB8BBB9B8, 0xBCB6BBB9, 0xBDBBB9BE,
+ 0xB8BDBBB8, 0xBBB6BBB9, 0xBDBBB8BD, 0xB6BBB9B8,
+ 0xB6B6BCB7, 0xBAB5B5BB, 0xB4BBB6B3, 0xB0B3BAB3,
+ 0xBAB3B0B7, 0xB3BAB3B3, 0xB2B1B7B2, 0xB7B2B1B7,
+ 0xB3B7B2B3, 0xB1B4B8B2, 0xB7B2B3B7, 0xB3B7B2B3,
+ 0xB2B4B8B3, 0xB7B2B3B7, 0xB3B7B2B3, 0xAEAFB3AD,
+ 0xB4AFB0B4, 0xB3B7B2B0, 0x387E827D, 0x3C37393D,
+ 0x373B3638, 0x2E30342E, 0x33313034, 0x18191732,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x40443F00, 0x7781857F, 0x827C7981,
+ 0x86898080, 0x868C8F86, 0x948B8C8F, 0x98999093,
+ 0x93989C91, 0x9F939B9F, 0x9A9F909B, 0x969AA194,
+ 0xA4989CA3, 0xA0A498A0, 0x97A0A498, 0xA79B9FA3,
+ 0xA3A79BA3, 0xA1A4A89C, 0xACA1A9AD, 0x9FA59AA6,
+ 0x969CA49A, 0xA39A98A0, 0xA4A9A09E, 0x9DA4A89D,
+ 0xA79EA4A8, 0xA4A79EA6, 0xA1A1A8A1, 0xA9A2A0A8,
+ 0xA5ADA6A1, 0xA9A8B0A9, 0xAFAAA8B0, 0xA8AFAAA8,
+ 0xBAB9BFBA, 0xBFBAB9BF, 0xBBBFBABB, 0xBBBCBDBB,
+ 0xC0BBBABD, 0xB8BEB9BC, 0xBDB6BBB9, 0xBEBDBABF,
+ 0xB8BEBDB8, 0xBBB7BEBB, 0xC0BDB7BE, 0xB9C0BDB9,
+ 0xBEB7BDBC, 0xBFBEB9BF, 0xBAC0BFB9, 0xBEBAC0BF,
+ 0xC0BFB9BF, 0xBCC1C0BB, 0xC1BCC1C2, 0xC0C1BBC0,
+ 0xBBC0C1BB, 0xC0B7BFBF, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBEB8C0BF, 0xBFBFB7BF, 0xB8C0C0B7, 0xBFBAC0BF,
+ 0xC0C0B7BF, 0xB6C0C0B8, 0xBFB7BFBF, 0xBEBFB7BF,
+ 0xBABFC0B9, 0xC0B7BFBF, 0xBFBEB8C0, 0xB7BFBEB7,
+ 0xBFB8C0BF, 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB7BFBE,
+ 0xBFBEB9BF, 0xBAC0BFBA, 0xC0BABFC0, 0xBBBBB8C0,
+ 0xADB5B5B3, 0xBBB3B9B8, 0xC4C2B4BC, 0xB8C3C1B9,
+ 0xBFB9C1C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B6BFC2,
+ 0xBFC0B8C0, 0xBAC0BFBA, 0xBDBABFBD, 0xBFBEBABF,
+ 0xBAC0BFB9, 0xBEBDC0BE, 0xC0BFBDC0, 0xBBC0BFBB,
+ 0xBEB9BEBF, 0xBFBDB9BF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xBABFBEBA, 0xBCB7BCBD, 0xBCBBB6BB, 0xB6BCBBB6,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0200003E, 0x00000000,
+ 0x00000000, 0x00000002, 0x1B010002, 0x34481512,
+ 0x2D1D3C3F, 0x87422C56, 0x65A57055, 0x8766A387,
+ 0x47705684, 0x26433824, 0x38284038, 0x4422162C,
+ 0x253C3A2E, 0x3122422F, 0xA36A5086, 0x62A48364,
+ 0x76568F86, 0x3C412C52, 0x2D453021, 0x2F22383B,
+ 0x07080808, 0xBBB90809, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xB9BFBABB, 0xBBB9C0BD, 0xBDBCB7BE,
+ 0xB8BDBCB8, 0xBEB7BDBC, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBBB6BDBA, 0xBFBEB7BE, 0xB8BDBCBA, 0xBBBABFBD,
+ 0xBDBCB8BD, 0xB9BEBDB8, 0xBBB7BEBB, 0xBDBCB7BE,
+ 0xB8BEBDB7, 0xBCB8BFBC, 0xBFBEB6BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBEBDB9BF,
+ 0xB9BFBEB8, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xC0B6BEBE, 0xBFBEB8C0,
+ 0xB9BFBEB9, 0xBBB8BFBC, 0xBCBAB7BE, 0xB8BDBBB7,
+ 0xBBB7BDBC, 0xBEBFB6BC, 0xB9BEBFB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9C0BDB9, 0xBCB8BFBC, 0xBEBBB8BF,
+ 0xB8BFBCB7, 0xBAB7BCBA, 0xBDBBB7BC, 0xB6BBB9B8,
+ 0xBBB7BCBB, 0xBBBAB6BC, 0xB5BBBAB5, 0xB9B7BCBA,
+ 0xBCBBB6BB, 0xB7BCBBB7, 0xB9B5BCB9, 0xBBBAB5BC,
+ 0xB7BCBBB6, 0xBBB7BCBB, 0xBCBBB7BC, 0xB7BCBBB7,
+ 0xBBB6BCBB, 0xBCBBB4BC, 0xB6BCBBB6, 0xBBB8BDBC,
+ 0xBDBBB8BD, 0xB8BEB9B8, 0xBBB4BBB6, 0xBFBDB9C0,
+ 0xBABFBDBA, 0xBCB9BEBC, 0xBFBABBBE, 0xBBBFBABB,
+ 0xB9BABDBB, 0xBBB9B8BB, 0xB8BBB9B8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xC0C4BFBB, 0xABB3B7B2, 0xBCB7ADB1,
+ 0xB8BCB7B8, 0xB6B8BCB7, 0xBCB7B7BB, 0xB8BCB7B8,
+ 0xB7B6BCB7, 0xBCB7B6BC, 0xB2B8B3B6, 0xB7B6BDB6,
+ 0xBCB7B7BE, 0xB8BCB7B8, 0xB6B9BDB8, 0xBCB7B7BB,
+ 0xB6BCB7B6, 0xB4B5BCB5, 0xBBB6B4BB, 0xB2B8B3B5,
+ 0xA1AAB1AA, 0xB2A8A2AB, 0xA9B2A8A9, 0xA4A5ADA3,
+ 0xADA4A8AD, 0xA8ACA1AA, 0xA1A7ABA0, 0xABA0A6AC,
+ 0xA5ABA0A5, 0x9DA5A99D, 0xA79BA5A9, 0xA2A69AA3,
+ 0x949FA699, 0x9D919AA1, 0x9CA09499, 0x939CA094,
+ 0x9C909B9F, 0x9B9F9398, 0x91989C90, 0x9B8F999D,
+ 0x989C9097, 0x8D989C90, 0x998D9599, 0x93978B95,
+ 0x828E938A, 0x8B85868B, 0x85878187, 0x787F8077,
+ 0x817B8081, 0x595A567F, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x01000000, 0x22231F00, 0x2D30342F, 0x39342F33,
+ 0x383C3735, 0x37383C37, 0x3B39383C, 0x4E514F3A,
+ 0xB7ABAFAA, 0xBCB7B7BE, 0xB8BCB7B8, 0xB7B8BBB9,
+ 0xBCB7B6B9, 0xB6BCB7B8, 0xB6B8BCB7, 0xBBB9B7BB,
+ 0xB8BBB9B8, 0xB9BABDBB, 0xBBB9B8BB, 0xB7BCBAB8,
+ 0xBEB9BEBD, 0xB8B7BABF, 0xB5BCB9B2, 0xBBB6BCBB,
+ 0xBBBAB7BE, 0xB8BDBBB6, 0xB5B8BDBB, 0xBAB8B4BA,
+ 0xB8BDBBB5, 0xBBB9BEBC, 0xBCB7B8BD, 0xB9BFBAB8,
+ 0xBCB8BDBB, 0xBCB7B9BE, 0xB6BCB7B6, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BDBCB7, 0xB9B5BAB9, 0xB9B7B6BB,
+ 0xB3B8B6B4, 0xBDB6BDBA, 0xBCB9B9C0, 0xB5BCB9B5,
+ 0xB7B2B8B7, 0xBBBAB2B8, 0xB8BFBCB5, 0xB9B8BDBB,
+ 0xC0BEB8BB, 0xB7BCBABD, 0xBBB9BEBC, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xB9BABFBD, 0xBBB9B6BB, 0xB8BDBBB6,
+ 0xB9B8BEB9, 0xBEB9B8BE, 0xB5BCB7B7, 0xB3B5BCB5,
+ 0xBAB3B3BA, 0xB5BBB6B3, 0xB4B6BCB7, 0xB9B7B3B9,
+ 0xB8BCB7B4, 0xB1B4B8B3, 0xB4AFB3B7, 0xB4B8B3B0,
+ 0xAFB4B8B3, 0xB5B0AEB4, 0xB1B7B2AF, 0xB1B4B8B2,
+ 0xB7B2B3B7, 0xB3B7B2B3, 0x367E827D, 0x3D38373B,
+ 0x383C3739, 0x2F30342E, 0x33313034, 0x18191732,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x40443F00, 0x777E857E, 0x847E7981,
+ 0x84888280, 0x868A8F86, 0x9A918A8F, 0x969A8F97,
+ 0x93999D92, 0xA2969B9F, 0x9DA2939E, 0x969AA194,
+ 0xA4989CA3, 0xA0A498A0, 0x9CA3A79B, 0xA79BA4A8,
+ 0xA5A99DA3, 0xA0A8ACA0, 0xACA1A8AC, 0x9FA59AA6,
+ 0x9AA0A69B, 0xA4999DA5, 0x9EA4999E, 0x9DA4A89D,
+ 0xA79DA4A8, 0xA4A79EA6, 0xA1A2AAA0, 0xA7A0A0A8,
+ 0xA0A8A19F, 0xA1A0A8A1, 0xA7A2A0A8, 0xA3AAA5A0,
+ 0xBAB3B9B4, 0xC0BBB9BF, 0xBBBFBABC, 0xBBBCBDBB,
+ 0xBEB9BABD, 0xB8BEB9BA, 0xBBB7BCBA, 0xBFBEB8BD,
+ 0xB7BDBCB9, 0xBBB8BFBC, 0xBFBCB7BE, 0xBBC2BFB8,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEBAC0BF,
+ 0xBFBEB9BF, 0xBAC0BFBA, 0xC1BBC0C1, 0xC0C1BBC0,
+ 0xBBC0C1BB, 0xBFB8C0C0, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xBEB8C0BF, 0xBFBFB7BF, 0xB7BFBFB7, 0xBDBAC0BF,
+ 0xC0C0B5BD, 0xB6BFC2B8, 0xBFB8C0C0, 0xBFC0B7BF,
+ 0xB9BEBFBA, 0xBFB8C0C0, 0xC0BFB7BF, 0xB8C0BFB8,
+ 0xBFB7BFBE, 0xC0C0B8C0, 0xB8C0C0B8, 0xBEB8C0BF,
+ 0xBFBEB7BF, 0xBAC0BFB9, 0xC0B7BFBF, 0xBFBFB8C0,
+ 0xB5BBBAB7, 0xBBB3B9B8, 0xB9B7B4BC, 0xB6C1BFAE,
+ 0xBFB9C1C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8BFC2,
+ 0xC0BFB8C0, 0xB9BFBEBA, 0xBDBABFBD, 0xC0BFBABF,
+ 0xBAC0BFBA, 0xBEBBC0BE, 0xC0BFBDC0, 0xBBC0BFBB,
+ 0xBEBAC0BF, 0xBFBDB9BF, 0xBABFBDBA, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBEB9C0BD, 0xBFBEBAC1,
+ 0xB9BEBDBA, 0xBCB6BBBC, 0xBCBBB6BB, 0xB6BCBBB6,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x02000040, 0x00000000,
+ 0x00000000, 0x00000002, 0x1C000203, 0x34481613,
+ 0x2D1D3C3F, 0x89422C56, 0x65A56E54, 0x8765A587,
+ 0x47705686, 0x26433824, 0x38284038, 0x4423162C,
+ 0x253B3A2E, 0x32234331, 0xA36A5085, 0x63A48364,
+ 0x76568F85, 0x3C432E54, 0x2D453021, 0x3023393B,
+ 0x07080808, 0xBBB90809, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xB9BFBABB, 0xBBBAC1BE, 0xBFBEB5BE,
+ 0xB9BFBEB9, 0xBEB8BEBD, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBAB8BDBB, 0xBFBEB7BC, 0xBAC0BFB9, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xB6BCBBB9, 0xBDBABFBD, 0xBEBCBABF,
+ 0xB9C0BDB9, 0xBCB7BDBC, 0xBDBCB7BD, 0xB5BDBCB5,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBEBDB9BF,
+ 0xB9BFBEB8, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBCB7BDBC, 0xBEBBB7BD, 0xB7BEBBB7, 0xBCB7BDBC,
+ 0xBBBCB7BD, 0xB7BCBDB6, 0xBDB5BDBD, 0xBCBBB5BD,
+ 0xB5BDBCB4, 0xBDB9C0BD, 0xBEBCB9C0, 0xB8BDBBB9,
+ 0xBBB6BCBB, 0xBCBBB6BC, 0xB5BBBAB6, 0xBDB9BEBD,
+ 0xBEBDB9BE, 0xB9BEBDB9, 0xBCB8BDBC, 0xBDBCB8BD,
+ 0xB8BEBDB7, 0xBBB7BDBC, 0xBDBCB6BC, 0xB7BCBBB7,
+ 0xB9B6BBB9, 0xBCB9B6BB, 0xB5BCB9B5, 0xB7B6BBB9,
+ 0xB9B8B4B9, 0xB3B9B8B4, 0xB8B5BAB8, 0xBBB8B5BA,
+ 0xB5BAB8B4, 0xB9B5BAB9, 0xBBB9B7B9, 0xB6BBB9B8,
+ 0xBBB8BDBB, 0xBDBBB7BE, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBEBBB8BD, 0xB7BEBBB7, 0xB9B7BDB8, 0xBEBCB8BE,
+ 0xBABFBEB9, 0xBBBABFBD, 0xBDBBB8BD, 0xBCBFBDBA,
+ 0xB9BBBEBC, 0xBCBAB6BB, 0xB6BBB9B7, 0xB7BBBFBA,
+ 0xBFBAB8BC, 0xBEC2BDBB, 0xBAC0C4BF, 0xBEBCBBBF,
+ 0xB8BCB7BB, 0xB7B9BDB8, 0xBDB7B8BC, 0xB7BBB6B9,
+ 0xB9B8BEB9, 0xBCBAB6BB, 0xB6BCB7B7, 0xB6B9BDB7,
+ 0xBBB7B8BC, 0xBABBB7BA, 0xB6B7BBB6, 0xBCB7B7BB,
+ 0xB5B9B4B8, 0xB6B8BCB6, 0xBCB7B8BC, 0xB8BCB6B8,
+ 0xA5AFB4AB, 0xB0A5AAB0, 0xA8B0A5AA, 0xA3A7ADA2,
+ 0xAFA4A8AE, 0xA8ACA1A9, 0xA0A7ABA0, 0xAB9FA8AC,
+ 0xA7AB9FA7, 0x9DA5A99D, 0xA89BA5A9, 0x9EA598A1,
+ 0x989DA195, 0xA498A0A4, 0x9CA094A0, 0x909B9F93,
+ 0x9C90989C, 0x9B9F9398, 0x90999D92, 0x998E979B,
+ 0x979B9095, 0x8B95998D, 0x978B9397, 0x93978B93,
+ 0x8690938A, 0x8C838C8F, 0x86898089, 0x70888980,
+ 0x79737879, 0x5B5C5877, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x22231F00, 0x2F313530, 0x38362E34,
+ 0x383B3935, 0x37373B36, 0x3B39383C, 0x4E514F3A,
+ 0xB7AEB2AD, 0xBCB7B6BC, 0xB6BCB7B6, 0xB4B3B7B2,
+ 0xBBB6B5B9, 0xB9BDB8B7, 0xB8BCBDBB, 0xBABAB7BA,
+ 0xB9BEBDB8, 0xBBB9BEBC, 0xBFBDB8BD, 0xB9BEBCBA,
+ 0xBBB8BDBC, 0xBFBCB7BE, 0xB9C0BDB8, 0xBDB5BBBA,
+ 0xBABBB8BE, 0xB5BBBAB5, 0xBCB7BDBC, 0xBDBCB8BF,
+ 0xB6BDBAB7, 0xBCB7BEBB, 0xBBB9B8BF, 0xB8BFBCB6,
+ 0xBCB8BEBD, 0xBFBAB8BF, 0xB8BEB9B9, 0xBEB7BDBC,
+ 0xBBBCB9BF, 0xB9BEBDB7, 0xBCB6BCBB, 0xBDBCB7BD,
+ 0xB6BCBBB7, 0xB7B2B8B7, 0xBAB8B3BA, 0xB6BBB9B5,
+ 0xB8B0B8B7, 0xBBBBB0B8, 0xB8BEBDB3, 0xBAB9BEBD,
+ 0xBDBCB6BB, 0xB5BBBAB8, 0xB8B5BBBA, 0xB9B8B3B9,
+ 0xB3B9B8B3, 0xB8B1B8B5, 0xBEB9B5BA, 0xB9BFBAB8,
+ 0xB8B7BDB8, 0xBFBAB6BD, 0xB8BFBAB8, 0xB6B6BCB7,
+ 0xBEB9B7BB, 0xB4BAB5BA, 0xB8B5BAB8, 0xB8B7B4BB,
+ 0xB5BAB8B2, 0xB4B8BCB7, 0xBCB7B5B9, 0xB5B9B4B8,
+ 0xB6B3B8B6, 0xB6B3B2B9, 0xAFB6B1AF, 0xB1B1B8B1,
+ 0xB7B2B3B7, 0xB8BCB7B3, 0x38888C87, 0x3B36393D,
+ 0x383C3737, 0x2F30342F, 0x33313034, 0x18191732,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x40443F00, 0x787D847D, 0x847F787F,
+ 0x84888280, 0x8C899187, 0x978C8E96, 0x989C9191,
+ 0x939B9F94, 0xA4989B9F, 0xA0A498A0, 0x98A0A79A,
+ 0xA7989EA5, 0xA0A798A0, 0x9AA0A798, 0xA99CA2A9,
+ 0xA2A99CA2, 0xA0A5A99D, 0xACA0A8AC, 0xA1A89BA8,
+ 0x9AA0A79A, 0xA598A0A7, 0x9EA5989E, 0x9BA0A498,
+ 0xA99DA3A7, 0xA5A99EA5, 0xA0A4A9A0, 0xA9A2A2AA,
+ 0xA2A9A2A2, 0x98A2A9A2, 0x9F9A989F, 0xA1A7A299,
+ 0xB5B2B9B2, 0xBFBAB5BC, 0xB7BBB6BB, 0xB8BABEB9,
+ 0xBFBAB9BD, 0xB8BCB7BB, 0xBAB8BDBB, 0xBDBCB7BC,
+ 0xB9BFBEB7, 0xBEB9BFBE, 0xBFBCB9BF, 0xB6BDBAB8,
+ 0xBDB9BFBE, 0xBFBEB8BE, 0xB9BFBEB9, 0xBEB9C0BD,
+ 0xBFBEB9BF, 0xB9BEBFB9, 0xC0BCC2C1, 0xC0C0B8C0,
+ 0xB8BFC2B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB0B8B8B8,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xB8C0BFB8, 0xBDBABFC0,
+ 0xC0C0B5BD, 0xB6C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xB9BEBFBA, 0xC0B7BFBF, 0xC0C0B6C0, 0xB8C0C0B8,
+ 0xBFB7BFBE, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0BF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xBCBBB8C0,
+ 0xB2B8B7B6, 0xBCAFB5B4, 0xB0B0B4BC, 0xADB5B5A8,
+ 0xC0B8C0C0, 0xC0BFB8C0, 0xB7BFBEBA, 0xBFB7BFBF,
+ 0xC0BFB7BF, 0xB8BEBDBA, 0xBDBABFBD, 0xC0BFBABF,
+ 0xBAC0BFBA, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBDBAC1BE, 0xC0BDB7C0, 0xB9C0BDB9, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBEB9BFBE, 0xBEBFB9BF,
+ 0xB8BDBEB9, 0xBCB6BBBC, 0xBCBBB6BB, 0xB7BCBBB7,
+ 0xBDB9C0BD, 0xBFBDB9C0, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xB9BFBEB9, 0xBFBABFBE, 0xC0BFBBC0, 0xBABFBDBB,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x02000040, 0x00000000,
+ 0x00000000, 0x00000000, 0x1C000102, 0x34481613,
+ 0x2D1D3C3F, 0x8C402C56, 0x6AAB7157, 0x8A6BAA8A,
+ 0x476D5383, 0x26433A24, 0x38284038, 0x3F20122A,
+ 0x22383629, 0x3525442F, 0x9D664D7F, 0x629F8062,
+ 0x70538A81, 0x3B422D53, 0x2B462E1F, 0x3020383C,
+ 0x08080808, 0xBBB90808, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xB9BFBABB, 0xBBB9C0BD, 0xBFBEB5BE,
+ 0xB8BEBDB9, 0xBDBAC0BF, 0xBEBDB8BE, 0xB7BDBCB8,
+ 0xBBBABFBD, 0xBDBCB8BD, 0xB9BFBEB7, 0xBDB7C0BD,
+ 0xBFBEB7C0, 0xBAC0BFB9, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBCB7BDBC, 0xBDBCB7BD, 0xB5BDBCB5,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBCB7BDBC, 0xBEBBB7BD, 0xB7BEBBB7, 0xBDB8BEBD,
+ 0xBCBDB8BE, 0xB8BDBEB7, 0xBDB5BDBD, 0xBDBCB5BD,
+ 0xB5BDBCB5, 0xBBB7BEBB, 0xBDBBB7BE, 0xB8BDBBB8,
+ 0xBBB6BCBB, 0xBCBBB6BC, 0xB7BDBCB6, 0xBAB6BBBA,
+ 0xBDBEB6BB, 0xB9BDBEB9, 0xBCB7BCBB, 0xBDBCB8BD,
+ 0xB8BEBDB7, 0xBCB7BCBD, 0xBDBCB6BB, 0xB7BDBCB7,
+ 0xBCB9BEBC, 0xBDBAB9BE, 0xB5BCB9B6, 0xB8B6BBB9,
+ 0xBAB9B7BA, 0xB3B8B7B5, 0xB8B4B9B7, 0xBCB9B5BA,
+ 0xB5BAB8B5, 0xB8B7B9B9, 0xBAB8B6B8, 0xB8BBB9B7,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBDBCB8BD, 0xB7BEBBB7, 0xB7B7BDB8, 0xBEBCB6BC,
+ 0xB8BDBCB9, 0xBBBABFBD, 0xBDBBB8BD, 0xBABDBBB8,
+ 0xBBB8BDBB, 0xBFBDB8BD, 0xBBC0BEBA, 0xBBBBBFBA,
+ 0xBFBABCC0, 0xBBBFBABB, 0xBCBBBFBA, 0xBFBDBDC1,
+ 0xB8BCB7BC, 0xB7B9BDB8, 0xBCB6B8BC, 0xB8BCB7B8,
+ 0xBBB7BDB8, 0xBBB9B8BD, 0xB4BAB5B6, 0xB6B7BBB5,
+ 0xBBB7B8BC, 0xB8BCB7BA, 0xB8B8BCB7, 0xBCB7B9BD,
+ 0xB8BCB7B8, 0xB2B6B8B2, 0xBFBBB6B8, 0xBEC0BABE,
+ 0xA5B1B5AA, 0xB0A5ADB1, 0xA9AFA4AA, 0xA2A9AFA4,
+ 0xAEA3A7AD, 0xA6ACA1A8, 0xA1A6AA9E, 0xACA0A9AD,
+ 0xA8ACA0A8, 0x9DA8ACA0, 0xA79BA5A9, 0xA0A79AA3,
+ 0x98A0A498, 0xA397A0A4, 0x9DA1959F, 0x959DA195,
+ 0x9F939DA1, 0x9B9F939B, 0x92999D92, 0x9B90999D,
+ 0x979B9097, 0x90989C90, 0x978B989C, 0x92968A93,
+ 0x83909489, 0x887F898C, 0x88898085, 0x71898A81,
+ 0x7872797A, 0x595A5676, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x20241F00, 0x2F2F332E, 0x36342E34,
+ 0x383B3933, 0x37383C37, 0x3B39383C, 0x50514F3A,
+ 0xB7AEB1AF, 0xBCB7B6BC, 0xB3B9B4B6, 0xB8AFB3AE,
+ 0xBBB7B9BD, 0xBABBB7BA, 0xB9B9BAB8, 0xBDBBB8BB,
+ 0xB8BDBBB8, 0xBBB8BDBB, 0xBFBEB8BD, 0xB7BCBBBA,
+ 0xBBB8BFBC, 0xBEB9B7BE, 0xB7BEBBB7, 0xBDB7BDBC,
+ 0xB9BAB7BC, 0xB5BABBB4, 0xBBB7BDBC, 0xBDBCB6BC,
+ 0xB8BEBDB7, 0xBAB7BEBB, 0xBEBBB6BD, 0xB7BEBBB7,
+ 0xBBB6BDBA, 0xBDB8B7BE, 0xB9BFBAB7, 0xB7B2B9B6,
+ 0xBABBB2B8, 0xB6BABBB6, 0xBCB6BCBB, 0xBDBCB7BD,
+ 0xB8BEBDB7, 0xB8B5BBBA, 0xBBB9B5BA, 0xB5BAB8B6,
+ 0xBCB3BBBA, 0xBEBEB2BC, 0xB3BBBBB6, 0xB7B5BBBA,
+ 0xB8B7B3B8, 0xB2B8B7B2, 0xB8B2B8B7, 0xB9B8B3B9,
+ 0xB2B8B7B3, 0xB8B2B8B7, 0xBAB8B4BB, 0xB5BBB6B5,
+ 0xB8B7BEBB, 0xBDBAB6BD, 0xB4BBB6B6, 0xB8B5BBB6,
+ 0xBDB8B9BD, 0xB7BCBAB9, 0xBAB6BBBA, 0xB9B8B5BB,
+ 0xB4B9B7B3, 0xB2B5B9B4, 0xB7B2B3B7, 0xB3B7B2B3,
+ 0xB6B2B7B5, 0xB9B6B2B9, 0xB1B8B5B2, 0xADB1B7B2,
+ 0xB5B0AFB3, 0xB5B9B4B1, 0x36888C87, 0x3C37373B,
+ 0x393D3838, 0x2F30342F, 0x33313034, 0x18191732,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x40443F00, 0x7C7D837E, 0x88837C83,
+ 0x83898484, 0x8B899089, 0x968B8D95, 0x92988D90,
+ 0x969B9F93, 0xA2969EA2, 0xA0A4989E, 0x999EA598,
+ 0xA6979FA6, 0xA0A7989F, 0x9AA0A798, 0xA99CA2A9,
+ 0xA4AB9EA2, 0xA0A4A89C, 0xADA1A8AC, 0xA3A79BA9,
+ 0x98A0A798, 0xA899A0A7, 0x9FA697A1, 0x96A1A697,
+ 0xA99DA0A5, 0xA5A99DA5, 0x9FA4AA9F, 0xA9A2A3A8,
+ 0xA1A8A1A2, 0x9DA1A8A1, 0xA9A49DA4, 0xA2A8A3A3,
+ 0xB2AEB5AE, 0xBBB6B2B9, 0xBBBFBAB7, 0xB9BABEB9,
+ 0xBDB8BABE, 0xBABEB9B9, 0xBBB6BBB9, 0xBCBBB8BD,
+ 0xBAC0BFB6, 0xBFBAC0BF, 0xBFBEBAC0, 0xB7BEBBB9,
+ 0xBEBAC0BF, 0xBFBEB9BF, 0xBAC0BFB9, 0xBEBAC1BE,
+ 0xBFC0B9BF, 0xB8BDBEBA, 0xC0B8C0BF, 0xC1C1B8C0,
+ 0xB8BFC2B9, 0xC0B8C0C0, 0xB9B9B8C0, 0x9FA7A7B1,
+ 0xBEB6BEBD, 0xC0BFB7BF, 0xB8C0BFB8, 0xBCBABFC0,
+ 0xC0C0B4BC, 0xB6C0C0B6, 0xBFB8C0C0, 0xBFC0B7BF,
+ 0xB7BFBFBA, 0xC0B7BFBF, 0xC0C0B6C0, 0xB8C0C0B8,
+ 0xC0B7BFBF, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0BF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0, 0xB8B6BAC0,
+ 0xADB2B1B3, 0xBBB6BBBC, 0xB0B0B3BB, 0xA9B1B1A8,
+ 0xC0B8C0C0, 0xC0BFB8C0, 0xB9BFBEBA, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xB8BEBDBA, 0xBDBABFBD, 0xBFBEBABF,
+ 0xB9BFBEB9, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBDBAC1BE, 0xBFBEB7C0, 0xB9C0BDB9, 0xBEBAC1BE,
+ 0xC0BEBAC1, 0xBBC0BEBB, 0xBEB9BFBE, 0xBEBFB9BF,
+ 0xB9BEBFB9, 0xBCB6BBBC, 0xBCBBB6BB, 0xB7BCBBB7,
+ 0xBDB9C0BD, 0xBFBDB9C0, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEB9C0BD, 0xC0BFBAC1,
+ 0xB9BFBEBA, 0xBEBABFBE, 0xBFBEBABF, 0xBABFBDBA,
+ 0xB7B8BBB9, 0x3E3EB8BC, 0x02000040, 0x00000000,
+ 0x00000000, 0x00000000, 0x1C000203, 0x34481613,
+ 0x2D1D3C3F, 0x8C402C56, 0x6AAB6F58, 0x8A6BAA88,
+ 0x476D5383, 0x25423A24, 0x38284037, 0x4020122A,
+ 0x21383628, 0x39274631, 0x9B654D7D, 0x619E7E63,
+ 0x70548980, 0x3A3D284E, 0x2B462E1F, 0x301F3A3C,
+ 0x08080709, 0xBBB90808, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xB9BFBABB, 0xBBB9C0BD, 0xBEBDB5BE,
+ 0xB9BFBEB8, 0xBEB9BFBE, 0xBFBEB9BF, 0xB6BEBDB7,
+ 0xBEB9BFBE, 0xBDBCB9BF, 0xB7BDBCB7, 0xBFB9BFBE,
+ 0xBBBCBAC0, 0xB7BCBBB7, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBEBDB9BF,
+ 0xB9BFBEB8, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBCB7BDBC, 0xBEBBB7BD, 0xB7BEBBB7, 0xBCB7BDBC,
+ 0xBCBDB7BD, 0xB7BCBDB7, 0xBDB5BDBD, 0xBDBCB5BD,
+ 0xB5BDBCB5, 0xBBB6BDBA, 0xBEBCB8BD, 0xB8BDBBBB,
+ 0xBBB6BCBB, 0xBCBBB4BC, 0xB5BBBAB6, 0xBAB4BAB9,
+ 0xBBBAB5BB, 0xB6BBBAB6, 0xBBB7BDBC, 0xBCBBB6BC,
+ 0xB6BCBBB6, 0xBBB7BCBB, 0xBDBCB7BC, 0xB7BCBBB8,
+ 0xBAB6BBBA, 0xBBBAB6BB, 0xB5BBBAB5, 0xB9B6BBB9,
+ 0xB9B9B8BB, 0xB4B9B8B7, 0xB8B5BAB8, 0xBAB9B4BB,
+ 0xB5BAB9B5, 0xB7B7BAB8, 0xB9B8B6B9, 0xB4B9B7B4,
+ 0xB8B9BCBA, 0xBCBAB9BD, 0xB7BCBAB7, 0xBBB8BDBB,
+ 0xBEBBB8BD, 0xB7BEBBB7, 0xB9B8BDBB, 0xBCBAB6BB,
+ 0xB9BEBCB9, 0xBDB8BDBB, 0xBFBEBABF, 0xB7BCBBBA,
+ 0xBDB6BBB9, 0xBDBBBABF, 0xB8BDBBB8, 0xB9BBBFBA,
+ 0xBFBABABE, 0xBBBFBABB, 0xB9BDBEBA, 0xBEBABDBF,
+ 0xBEBFBBBD, 0xB7BBBFBA, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB8B7BDB8, 0xBCBAB7BD, 0xB9BDB8B9, 0xB4B9BDB7,
+ 0xBCB6B8BD, 0xB8BCB6B8, 0xB7B8BCB7, 0xBCB7B6BC,
+ 0xB8BCB7B8, 0xB2BABCB6, 0xBBB7B8B8, 0xC2C4BEBA,
+ 0xA0B7BAB1, 0xACA1A7AB, 0xA8ACA1A8, 0xA2A9ADA2,
+ 0xACA1A7AD, 0xA4ACA1A6, 0x9FA5ABA0, 0xA99EA4AA,
+ 0xA5A99DA3, 0x96A2A69A, 0xA498A0A5, 0xA0A498A0,
+ 0x99A0A498, 0xA599A1A5, 0x9A9E92A1, 0x959DA195,
+ 0xA1959DA1, 0x9DA1959D, 0x929B9F94, 0x9C91999D,
+ 0x979B9098, 0x8F92968B, 0x978B969A, 0x93978B93,
+ 0x83909489, 0x8D848A8E, 0x8889808C, 0x73878781,
+ 0x78747979, 0x5A5B5777, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000001,
+ 0x01000000, 0x20232100, 0x3230342F, 0x37323137,
+ 0x35393433, 0x36383C37, 0x3A38373B, 0x51525039,
+ 0xB9AEB1AF, 0xB9B7B8BB, 0xB5B8B6B6, 0xB2B3B7B2,
+ 0xBCB7B3B7, 0xB8BCB7B8, 0xBDBABDBB, 0xBDBBBABF,
+ 0xB7BEBBB8, 0xBBB9BEBC, 0xBFBDB8BD, 0xB8BDBBBA,
+ 0xBBB7BEBB, 0xBBB9B7BE, 0xB5BAB8B6, 0xBDB7BDBC,
+ 0xBEBEB5BD, 0xB5BABBB6, 0xBCB6BCBB, 0xBBBAB8BD,
+ 0xB6BBBAB6, 0xBCB7BCBB, 0xB9B8B8BD, 0xB8BDBBB4,
+ 0xB8BABFBD, 0xBCB7B7BD, 0xB6BCB7B6, 0xBAB3B8B6,
+ 0xBDBEB6BB, 0xB6BABBB9, 0xBDB5BABB, 0xBDBCB7BC,
+ 0xB7BCBBB8, 0xB6B4B9B7, 0xB9B7B3B8, 0xB3B9B8B4,
+ 0xB8B3BBBB, 0xB8B8AEB8, 0xB0B8B8B0, 0xB6B2B8B7,
+ 0xBCBBB1B7, 0xB4BAB9B6, 0xB9B6BBB9, 0xB9B8B6BB,
+ 0xB3B8B7B4, 0xB7B2B8B7, 0xB8B7B2B8, 0xB2B9B6B2,
+ 0xB6B1B7B6, 0xB8B7B0B9, 0xB2B9B6B2, 0xB8B5BAB8,
+ 0xBBB9B5BA, 0xB5BAB8B6, 0xBAB6BBBA, 0xBAB8B6BB,
+ 0xB3B8B6B5, 0xB4B6BAB5, 0xB9B4B5B9, 0xB3B7B2B5,
+ 0xB3AFB4B2, 0xB6B3AFB6, 0xB1B8B5AF, 0xAFAEB4AF,
+ 0xB7B2B0B4, 0xB8BCB7B3, 0x37888C87, 0x3B39383C,
+ 0x383B3938, 0x3030342F, 0x33313135, 0x18191732,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x40443F00, 0x7E7D837E, 0x837E7E85,
+ 0x878D887F, 0x8B8D948D, 0x988D8D95, 0x989C9192,
+ 0x959B9F93, 0xA0949DA1, 0x9DA1959C, 0x9AA0A498,
+ 0xA798A2A6, 0xA0A798A0, 0x9CA2A99A, 0xA99AA4AB,
+ 0xA4AB9CA2, 0x9FA6AA9E, 0xAB9FA7AB, 0xA4A89CA7,
+ 0x98A0A798, 0xA79AA0A7, 0xA0A79AA0, 0x96A0A596,
+ 0xA697A0A5, 0xA3AA9DA1, 0xA0A5ABA0, 0xA9A3A4A9,
+ 0xA3AAA3A5, 0xA3A2A8A3, 0xA6A4A2A8, 0xA4A8A3A1,
+ 0xB2AEB5AE, 0xB7B2B2B9, 0xB7BAB8B3, 0xB9BCC0BB,
+ 0xBCBABABE, 0xBDC0BEB9, 0xBEBABFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBFB8C0C0, 0xBFBEB8C0, 0xB7BDBCB9,
+ 0xBFB9BFBE, 0xBFBEBAC0, 0xBAC0BFB9, 0xBFB8C0BF,
+ 0xC0C0B8C0, 0xB7BFBFB8, 0xC2B8C0C0, 0xC0C1BAC2,
+ 0xB9BEBFBB, 0xBFB8C0C0, 0xC0C0B7BF, 0xB7C1C1B6,
+ 0xC0B7BFBF, 0xC0C1B8C0, 0xBBC0C1BB, 0xBBB8C0BF,
+ 0xC0C0B4BC, 0xB6C0C0B6, 0xBEB8C0BF, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC1B7BFBF, 0xBFC2B9C1, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B6, 0xBFB7BFBE,
+ 0xC0C0BAC0, 0xB8C0C0B8, 0xBFB8C0C0, 0xB7B5BAC0,
+ 0xB0B2B2B4, 0xC2BABFC0, 0xB5B5BABF, 0xACB4B4AD,
+ 0xC0B6C0C0, 0xBEBFB8C0, 0xB9BEBFB9, 0xBEB7BFBE,
+ 0xBFBEB7BF, 0xB8BDBCB9, 0xBDBABFBD, 0xBFBEBABF,
+ 0xB9BFBEB9, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBDBAC0BF, 0xBEBFB8BE, 0xBABFBEBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEB9BFBE, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xBBB6BCBB, 0xBCBBB6BC, 0xB7BCBBB7,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBABFBD, 0xC0BEBBC0,
+ 0xBABFBDBB, 0xBDBABFBD, 0xBFBEBABF, 0xBABFBDBA,
+ 0xB7B8BBB9, 0x3E3EB8BC, 0x02000040, 0x00020000,
+ 0x00000000, 0x00000000, 0x1C000203, 0x34481613,
+ 0x2D1D3C3F, 0x8C402C56, 0x6BAB6F58, 0x886BAA86,
+ 0x476D5383, 0x26433A24, 0x39294138, 0x4022122A,
+ 0x22393828, 0x37254432, 0x9B664E7E, 0x619E7E63,
+ 0x71558A80, 0x3A3C284B, 0x2B46301F, 0x2E20383A,
+ 0x08080709, 0xBBB90808, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xB9BFBABB, 0xBBB9C0BD, 0xBFBEB5BE,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xC1C0B9BF, 0xB9BFBEBB,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB7BDBC,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBBB7BDBC, 0xBEBBB6BC, 0xB7BEBBB7, 0xBCB7BDBC,
+ 0xBDBEB7BD, 0xB8BDBEB8, 0xBCB5BDBD, 0xBDBCB5BD,
+ 0xB7BDBCB5, 0xBBB5BCB9, 0xBDBBB8BD, 0xB6BBB9B8,
+ 0xBBB6BCBB, 0xBCBBB4BC, 0xB6BCBBB6, 0xB9B5BBBA,
+ 0xBCBBB4BA, 0xB6BBBAB7, 0xBBB6BCBB, 0xBCBBB6BC,
+ 0xB6BCBBB6, 0xBBB7BCBB, 0xBCBBB7BC, 0xB7BCBBB7,
+ 0xBAB6BBBA, 0xBBBAB5BB, 0xB5BBBAB5, 0xB8B6BBB9,
+ 0xBAB8B7BA, 0xB5BAB9B7, 0xB7B4B9B7, 0xB9B8B3BA,
+ 0xB4B9B8B3, 0xB8B6B9B7, 0xBAB9B7BA, 0xB5BAB8B5,
+ 0xB8B6BBB9, 0xBDBBB7BD, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBEBBB8BD, 0xB7BEBBB7, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xBBBEBCBA, 0xB9B8BDBB, 0xBCBBB6BB, 0xBABFBEB7,
+ 0xBBB8BDBB, 0xBEBCB8BD, 0xB8BDBBB9, 0xBABBBFBA,
+ 0xBEB9BBBF, 0xBCC0BBBA, 0xB9BDBEBA, 0xC0BABDBF,
+ 0xBDBFB9BE, 0xB7BABEB9, 0xBCB7B8BC, 0xBABEB9B8,
+ 0xB8B6BCB7, 0xBDBBB7BD, 0xB7BBB6BA, 0xB6B8BCB6,
+ 0xBCB6B8BC, 0xB8BCB6B8, 0xB6B6BCB7, 0xBAB5B5BB,
+ 0xB8BCB7B6, 0xB6B9BBB5, 0xBCB6BCBC, 0xC2C4BEBA,
+ 0xA5B6B9B0, 0xACA1ACB0, 0xA8ACA1A8, 0xA2A8ACA1,
+ 0xAFA4A7AD, 0xA5ADA2A9, 0xA1A5ABA0, 0xABA0A6AC,
+ 0xA5ABA0A5, 0x9BA7A99D, 0xA99DA7AA, 0xA3A79BA5,
+ 0x979DA195, 0xA1959FA3, 0x989C909D, 0x949DA195,
+ 0x9F939CA0, 0x989C909B, 0x90999D92, 0x9B90979B,
+ 0x95998E97, 0x8995998E, 0x94889094, 0x93978B90,
+ 0x85909489, 0x8C838C90, 0x8889808B, 0x73888882,
+ 0x78747979, 0x595A5677, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000001, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000001,
+ 0x00000000, 0x22232102, 0x32333732, 0x3A353137,
+ 0x383C3736, 0x37383C37, 0x3B39383C, 0x4F504E3A,
+ 0xBAAEB0B0, 0xB7B5B9BC, 0xB8BBB9B4, 0xB4B8BCB7,
+ 0xBCB7B5B9, 0xB8BCB7B8, 0xBBBABFBD, 0xBEB9B8BD,
+ 0xB7BEB9B7, 0xBCBABFBD, 0xBBB9B9BE, 0xB8BDBBB6,
+ 0xBEB9BEBC, 0xBCBABBC0, 0xB6BBB9B7, 0xBDBAC0BF,
+ 0xBBBBB5BD, 0xB3BBBBB3, 0xBBB7BDBC, 0xBCBBB6BC,
+ 0xB7BDBCB6, 0xBCB8BDBC, 0xBBBAB8BD, 0xB8BDBCB6,
+ 0xB6B6BBB9, 0xBEB9B5BB, 0xB6BBB9B8, 0xBEB9BEBC,
+ 0xBEBDBABF, 0xB6BABBB9, 0xBCB6BBBC, 0xBCBBB6BB,
+ 0xB7BCBBB7, 0xB9B7BCBA, 0xBAB8B6BB, 0xB3B8B7B5,
+ 0xBAB2B8B7, 0xBBBAB3BB, 0xB7BDBCB5, 0xBAB8BEBD,
+ 0xBFBEB5BB, 0xB6BBBAB9, 0xB9B5BAB8, 0xB9B9B8BB,
+ 0xB5BAB9B7, 0xB8B5BBBA, 0xB8B7B3B9, 0xB4BAB9B2,
+ 0xB9B4BAB9, 0xBAB9B4BA, 0xB5BAB9B4, 0xB8B5BAB8,
+ 0xBAB8B5BA, 0xB3B8B6B5, 0xB8B4B9B8, 0xBAB9B4B9,
+ 0xB5BAB8B5, 0xB2B5B9B4, 0xB7B2B3B7, 0xB0B4AFB3,
+ 0xB6B0B5B3, 0xB6B3B2B9, 0xAFB4B2AF, 0xAFB0B4AF,
+ 0xB4AFB0B4, 0xB3B7B2B0, 0x37888C87, 0x3B39383C,
+ 0x383B3938, 0x2F30342F, 0x32303034, 0x18191731,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x42433F00, 0x7A7F837D, 0x837E7C80,
+ 0x888C877F, 0x8B899089, 0x988D8D95, 0x989C9094,
+ 0x939B9F93, 0xA1959B9F, 0xA0A4989D, 0x9AA2A69A,
+ 0xA798A2A6, 0xA0A798A2, 0x9AA2A99A, 0xA99AA2A9,
+ 0xA2A99AA2, 0x9DA5A99D, 0xACA0A5A9, 0xA5A99DA8,
+ 0x98A0A798, 0xA79AA0A7, 0xA0A79AA0, 0x99A3A899,
+ 0xA596A3A8, 0xA1A89B9E, 0xA1A5ABA0, 0xAAA1A5AA,
+ 0xA3A7A1A5, 0x9EA2A8A3, 0xA7A59DA3, 0xA8ACA7A2,
+ 0xB2AEB5AE, 0xB7B5B2B9, 0xB4B7B5B4, 0xB7B8BCB7,
+ 0xC0BEB8BC, 0xBABFBDBD, 0xBFBABFBE, 0xBFBEBAC0,
+ 0xB9BFBEB9, 0xBFBAC0BF, 0xBFBEBAC0, 0xB9BFBEB9,
+ 0xBFB7BDBC, 0xBFBEBAC0, 0xBAC0BFB9, 0xBFB8C0BF,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C1B8C0,
+ 0xBBC0C1BB, 0xC0B8C0C0, 0xBFBFB8C0, 0xB6C0C0B5,
+ 0xC0B8C0C0, 0xBEBFB8C0, 0xBABFC0B9, 0xBBBAC0BF,
+ 0xC0C0B4BC, 0xB6C0C0B8, 0xBEB8C0C0, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C3B8C0, 0xB8C0C0B9,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB7BFBFB8, 0xBFB9BFBE,
+ 0xBFC2BAC0, 0xB8BFC2B8, 0xBFB9C1C1, 0xB3B2BAC0,
+ 0xB3B8B7AE, 0xBDBABFC0, 0xB4B4B5BA, 0xB8C0C0AC,
+ 0xC0B8C0C0, 0xBEBFB8C0, 0xBBC0BFB9, 0xBFB9BFBE,
+ 0xBFBEBAC0, 0xB9BEBCBA, 0xBDBABFBD, 0xC0BFBABF,
+ 0xBAC0BFBA, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBFBAC0BF, 0xBFC0B9BE, 0xBAC0BFBA, 0xBEBBC0BF,
+ 0xC0BEBBC0, 0xBAC1BEBB, 0xBEBAC0BF, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xBBB6BCBB, 0xBCBBB6BC, 0xB6BCBBB6,
+ 0xBDBABFBE, 0xBFBDBABF, 0xBABFBDBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBEBABFBD, 0xC0BFBBC0, 0xBABFBDBB,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0200003E, 0x00020000,
+ 0x00000000, 0x00000000, 0x1C000203, 0x33491613,
+ 0x2D1C3D3F, 0x8C402C56, 0x6AAB6F58, 0x896CAB88,
+ 0x476D5381, 0x26433A24, 0x38284038, 0x4022122A,
+ 0x20373828, 0x311F3E30, 0x9B664E7E, 0x639E7E63,
+ 0x70548981, 0x3A422E51, 0x2C442E1F, 0x2D20383A,
+ 0x08060808, 0xBBB90608, 0xB8BBB9B8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xB9BFBABB, 0xBCB9C0BD, 0xBDBEB5BD,
+ 0xB9BFBEB8, 0xBEB9BFBE, 0xC0BFBAC1, 0xB9BFBEBA,
+ 0xBEB9BEBF, 0xBFBEB6BE, 0xB9BFBEB9, 0xBDBABFBD,
+ 0xBFBDBCBF, 0xBBBEBCBC, 0xBCB9BEBC, 0xBFBEB9BE,
+ 0xB8BEBDB9, 0xBCB7BDBC, 0xBCBDB7BD, 0xB7BCBDB7,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBDB7BDBC,
+ 0xBDBCB8BE, 0xB7BDBCB7, 0xBBB7BEBB, 0xBDBCB7BE,
+ 0xB7BDBCB7, 0xBCB7BDBC, 0xBDBCB7BD, 0xB8BDBCB8,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBBB4BCBB,
+ 0xBDBDB4BC, 0xB3BBBBB5, 0xBBB4BCBB, 0xBCBBB4BC,
+ 0xB6BCBBB6, 0xBBB6BCBB, 0xBDBAB6BC, 0xB5BCB9B6,
+ 0xBAB3BBBA, 0xBBBAB3BB, 0xB5BBBAB5, 0xBAB5BBBA,
+ 0xBBBAB5BB, 0xB5BBBAB5, 0xBAB5BBBA, 0xBBBAB5BB,
+ 0xB3BBBAB3, 0xBAB5BBBA, 0xBBB9B5BB, 0xB6BBB9B6,
+ 0xB9B7BEBB, 0xBCBAB5BC, 0xB6BBB9B7, 0xB7B6B9B7,
+ 0xB9B7B6B9, 0xB6BBB9B6, 0xB9B5BAB9, 0xBBB8B4BA,
+ 0xB3BAB7B4, 0xB8B5BAB8, 0xBBB9B7BA, 0xB6BBB9B8,
+ 0xB9B7BCBA, 0xBBBAB6BB, 0xB7BCBBB6, 0xBBB9BEBC,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xB9B7BEBB, 0xBEB9B5BC,
+ 0xB8BEB9B8, 0xBBB8BDBB, 0xBBB9B8BD, 0xB9BCBAB8,
+ 0xBBBABDBB, 0xBFBABABD, 0xBCC0BBBB, 0xBABCBFBD,
+ 0xBFBDB9BC, 0xBABEB9BC, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBBBABDBB, 0xBDBBBABD, 0xBABDBBBA,
+ 0xBBBABDBB, 0xBEB9BABD, 0xB6BCB7B8, 0xB7B8BCB7,
+ 0xBDB8B8BC, 0xB8BCB7B9, 0xB8B6BCB7, 0xBBB9B7BD,
+ 0xB9BDB8B8, 0xB2B8BBB2, 0xC0B7B8BB, 0xBDC0B7BD,
+ 0xA8B2B7AE, 0xB2A9ACB1, 0xA6ABA2AD, 0xA2A7ADA2,
+ 0xADA2A7AD, 0xA7ADA2A7, 0xA0A6AA9E, 0xABA0A8AC,
+ 0xA5ABA0A5, 0x9CA7A99D, 0xA69AA6A8, 0xA3A79BA4,
+ 0x9AA1A599, 0xA394A2A6, 0x9DA091A0, 0x949FA293,
+ 0xA394A0A3, 0x9FA293A0, 0x919CA094, 0x9E93979E,
+ 0x9CA0959A, 0x90989C90, 0x998D989C, 0x95978B97,
+ 0x84909489, 0x8C838A8D, 0x88898089, 0x7A81817B,
+ 0x7E7A8080, 0x5A5B577F, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00010200, 0x00000100, 0x00000000,
+ 0x00000200, 0x25232204, 0x30353632, 0x38363135,
+ 0x383B3935, 0x3F383C37, 0x3B374044, 0x50514D3A,
+ 0xB6AEB1AF, 0xBBB9B5B8, 0xB6BCB7B6, 0xB8B5BAB8,
+ 0xBDBBB5BA, 0xB9BCBABA, 0xB7B9BFBA, 0xBCB9B6BC,
+ 0xB7BEBBB5, 0xB8B5BAB8, 0xBBB9B5BA, 0xBABFBDB6,
+ 0xBAB9BFBA, 0xBBB9B9BF, 0xB9BEBCB6, 0xBCB7BDBC,
+ 0xB7B7B5BD, 0xB1BBBBAD, 0xBCB3BEBC, 0xBDBDB3BE,
+ 0xB4BCBCB5, 0xBDB5BABB, 0xBABBB7BC, 0xB5BBBAB5,
+ 0xBBB7BCBA, 0xBDBAB8BD, 0xB7BDBCB6, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BCBBB8, 0xBDB7BDBC, 0xBCBBB6BE,
+ 0xB8BDBCB6, 0xB7B6BBB9, 0xBCB7B8BC, 0xB8BBB9B8,
+ 0xB9B6BBB9, 0xBBB9B6BB, 0xB6BBBAB6, 0xBBB7BDBC,
+ 0xBCBDB6BC, 0xB7BCBBB7, 0xBBB6BBB9, 0xBCBBB8BD,
+ 0xB5BAB9B7, 0xB9B4B9B8, 0xB8B7B4BA, 0xB4BAB9B2,
+ 0xB9B6BBB9, 0xBBBAB6BB, 0xB5BAB9B6, 0xB9B5BAB8,
+ 0xBAB9B5BC, 0xB5BAB9B5, 0xB8B3B8B6, 0xB8B7B4B9,
+ 0xB3B8B7B2, 0xAFB0B3B1, 0xB3B1B0B4, 0xB0B3B1B2,
+ 0xB6B1B8B5, 0xB8B7B2B9, 0xB2B7B6B2, 0xB2B6BAB5,
+ 0xB7B2B4B8, 0xB3B7B2B3, 0x36899089, 0x3B36363D,
+ 0x383C3737, 0x2F30342F, 0x32303034, 0x18191731,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00030101, 0x00000200, 0x00000000, 0x00000001,
+ 0x01000000, 0x42433F00, 0x7882847E, 0x81787C81,
+ 0x868B827C, 0x878E9188, 0x958A8E92, 0x969A8E91,
+ 0x90979E8F, 0xA495989F, 0x9DA4959D, 0x98A0A596,
+ 0xA798A4A7, 0xA3A899A4, 0x9CA2A99C, 0xA99AA2A9,
+ 0xA4AB9CA2, 0x9DA3AA9B, 0xAC9DA5AC, 0xA0A798A5,
+ 0x99A2A798, 0xA89BA3A8, 0xA1A89BA1, 0x9CA3A79B,
+ 0xAA9DA4A8, 0xA1A89BA3, 0x9FA2A79E, 0xAAA1A3A8,
+ 0xA2A6A0A7, 0xA2A3A9A4, 0xA9A4A1A7, 0xA6ACA7A3,
+ 0xB0B0B4AE, 0xB6B4B2B6, 0xB5B6B4B5, 0xB2B3B7B2,
+ 0xB8B3B3B7, 0xB6BBB9B4, 0xBBB7BCBB, 0xBCBBB6BC,
+ 0xB7BDBCB6, 0xBEB9BFBE, 0xBDBCBABF, 0xBBBFC0B8,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xC1B8C0C0,
+ 0xC0C0B9C1, 0xB8C0C0B8, 0xC2B8BFC2, 0xC0C1B8BF,
+ 0xBBC0C1BB, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFB7BFBE, 0xC0C0B8C0, 0xBABFC0B8, 0xBBB7BDBC,
+ 0xC0C0B6BC, 0xB8C0C0B8, 0xBFBABFC0, 0xBFBEB9BE,
+ 0xB6BEBDB7, 0xBFB9BEBF, 0xBFC0B9BE, 0xBABFC0BA,
+ 0xBEB9BEBF, 0xC0C0B7BF, 0xB8C0C0B8, 0xBFBAC0BF,
+ 0xBFC2BAC0, 0xB8BFC2B8, 0xBDB8C0C0, 0xB8B9B5BD,
+ 0xB5BABBB3, 0xBBB8C0C0, 0xC0C0B3BB, 0xB8C0C0B8,
+ 0xBFB8C0BF, 0xC0BFBAC0, 0xBBC0BEBB, 0xBEB9C0BD,
+ 0xBFBDBAC1, 0xBCBFBDBA, 0xBCBBC0BE, 0xC0BEBBC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC1BEBBC0, 0xBAC1BEBA,
+ 0xBCB9C0BD, 0xBFC0B7BD, 0xB7BFBEBA, 0xBDB9BFBE,
+ 0xC0BBB9C0, 0xB9C0BDB9, 0xBEB9BFBE, 0xBCBDB9BF,
+ 0xB9BEBFB7, 0xBBB5BABB, 0xBBBBB5BA, 0xAFB7B7B3,
+ 0xBFB9BFBE, 0xBFBEBAC0, 0xBBC0BFBA, 0xBEB9C0BD,
+ 0xC0BFBAC1, 0xBABFBEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBDC0BE, 0xC0BEBDC0, 0xBDC0BEBD,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000000, 0x1B000001, 0x324A1610,
+ 0x2D1C3D3F, 0x87402C56, 0x66A56E55, 0x8766A385,
+ 0x46705684, 0x26433923, 0x38284038, 0x4020122A,
+ 0x21383628, 0x38264531, 0x95654B7B, 0x5D987A5D,
+ 0x6A51837B, 0x363B2A4B, 0x2C462B1E, 0x2A1F3939,
+ 0x08060808, 0xBBB90608, 0xB8BBB9B8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xB9BFBABB, 0xBEB9C0BD, 0xBFC0B7BF,
+ 0xB9BFBEBA, 0xBDB9C0BD, 0xBFBEB9C0, 0xBABFBEBA,
+ 0xBEB9BFBE, 0xC0BFB7BF, 0xBABFBEBA, 0xBDBABFBD,
+ 0xBFBDBCBF, 0xB8BDBBBC, 0xBCB9BEBC, 0xBEBBB9BE,
+ 0xB8BEBDB7, 0xBCB7BDBC, 0xBDBEB7BD, 0xB6BBBCB8,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB7BDBC,
+ 0xBCBBB7BD, 0xB7BDBCB6, 0xBBB7BDBC, 0xBDBCB7BE,
+ 0xB7BDBCB7, 0xBCB7BDBC, 0xBDBCB7BD, 0xB8BDBCB8,
+ 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7, 0xBCB4BCBB,
+ 0xBEBEB5BD, 0xB4BCBBB6, 0xBAB4BCBB, 0xBCBBB4BD,
+ 0xB6BCBBB6, 0xBBB6BCBB, 0xBDBAB6BC, 0xB6BDBAB6,
+ 0xBAB3BBBA, 0xBBBAB3BB, 0xB5BBBAB5, 0xBAB5BBBA,
+ 0xBBBAB5BB, 0xB5BBBAB5, 0xBAB5BBBA, 0xBBBAB5BB,
+ 0xB3BBBAB3, 0xBAB5BBBA, 0xBBB9B5BB, 0xB6BBB9B6,
+ 0xBBB6BDBA, 0xBCBAB8BD, 0xB8BBB9B7, 0xB9B8BBB9,
+ 0xBBB9B8BB, 0xB6BBB9B8, 0xB8B4BAB9, 0xB9B6B3B9,
+ 0xB3BAB7B2, 0xB8B4B9B7, 0xBAB8B7BA, 0xB6BBB9B7,
+ 0xBAB6BDBA, 0xBDBCB6BD, 0xB7BCBBB8, 0xB9B6BBB9,
+ 0xBDBBB6BB, 0xB7BCBAB8, 0xBBB8BDBB, 0xBCB7B7BE,
+ 0xB7BDB8B6, 0xBBB8BDBB, 0xBDBBB8BD, 0xBABDBBBA,
+ 0xB9B8BBB9, 0xBDB8B8BB, 0xBABEB9B9, 0xBBBBBEBC,
+ 0xBFBDBABD, 0xBCBFBDBC, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBBBABDBB, 0xBDBBBABD, 0xBABDBBBA,
+ 0xBBBABDBB, 0xBCB7BABD, 0xB4BAB5B6, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB9B7BDB8, 0xBCBAB8BE,
+ 0xB7BBB6B9, 0xB5BCBFB6, 0xC0B5BCC0, 0xC3C6BDBC,
+ 0xA2B1B6AD, 0xB1A8A6AB, 0xACB2A7AC, 0xA3A8AEA3,
+ 0xAFA4A8AE, 0xA8AEA3A9, 0x9EA7AEA1, 0xABA0A4AB,
+ 0xA7ABA0A5, 0xA0A5A99E, 0xA99DA8AC, 0xA3A79BA7,
+ 0x999FA699, 0xA394A1A5, 0xA2A393A0, 0x959FA293,
+ 0xA193A1A4, 0x9FA293A1, 0x919CA094, 0x9E93979E,
+ 0x9CA0959A, 0x90989C90, 0x998D989C, 0x95978B97,
+ 0x83909489, 0x8C83898C, 0x86898089, 0x7B80807A,
+ 0x7F7B8181, 0x5C5B5780, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00010200, 0x00000100, 0x00000000,
+ 0x00000200, 0x27232204, 0x32343531, 0x39373337,
+ 0x383B3936, 0x3F373B36, 0x3B374044, 0x50514D3A,
+ 0xBAAEB1AF, 0xBDB8B9BC, 0xB6BCB7B9, 0xB8B4BBB8,
+ 0xBCBAB5BA, 0xB8BBB9B9, 0xB9B6BCB7, 0xBEBBB8BE,
+ 0xB9C0BDB7, 0xBBBABFBD, 0xBDBBB8BD, 0xBABFBDB8,
+ 0xBABCC0BB, 0xBBB9BBBF, 0xB9BEBCB6, 0xBAB7BDBC,
+ 0xBBBBB3BB, 0xB1BBBBB3, 0xBBB0BBB9, 0xBCBCB2BD,
+ 0xB3BBBBB2, 0xBCB6BDC0, 0xB7B8B2B9, 0xB5BBBAB2,
+ 0xBBB9BEBD, 0xBBBAB8BD, 0xB7BDBCB5, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB8BDBCB8, 0xBAB7BDBC, 0xBCBBB5BB,
+ 0xB7BCBAB6, 0xB9B7BAB8, 0xBEB9BABE, 0xB8BCB7BA,
+ 0xB7B5B9B4, 0xBBB9B8BC, 0xB5BAB8B8, 0xBCB7BDBC,
+ 0xBDBEB5BD, 0xB7BCBBB9, 0xBAB6BBB9, 0xBDBCB7BC,
+ 0xB7BCBBB8, 0xB9B6BBB9, 0xB9B8B6BB, 0xB3BAB7B3,
+ 0xB9B6BBB9, 0xB8B8B8BB, 0xB7BCBBB6, 0xB7B4BAB9,
+ 0xBBBAB3BA, 0xB6BBB9B6, 0xB9B6BBB9, 0xBBBAB6BB,
+ 0xB2B8B7B5, 0xB2B0B4AF, 0xB8B6B3B7, 0xB2B5B3B7,
+ 0xB5B1B8B5, 0xB7B6B1B8, 0xB2B7B6B2, 0xB1B5B9B4,
+ 0xB8B3B3B7, 0xB4B8B3B4, 0x36888F88, 0x3C37363D,
+ 0x383C3738, 0x2F2F332E, 0x33313034, 0x18191732,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00020000,
+ 0x01000200, 0x42433F00, 0x7C888A84, 0x857C8085,
+ 0x8B918680, 0x8B8D9186, 0x9A8E9495, 0x9A9E9296,
+ 0x9399A091, 0xA5959BA2, 0x9DA4959B, 0x96A2A798,
+ 0xA797A3A6, 0xA3A899A4, 0x9EA4A99A, 0xAB9CA4AB,
+ 0xA4AB9CA4, 0x9DA4AB9C, 0xAFA0A5AC, 0xA0A798A8,
+ 0x999FA697, 0xA79AA1A8, 0xA1A89BA0, 0x9BA3A79B,
+ 0xAA9DA3A7, 0xA3A99EA3, 0xA1A2A79E, 0xA9A0A3A7,
+ 0xA6A8A2A6, 0xA5A7ABA5, 0xA7A2A4AA, 0xA6ACA7A1,
+ 0xB4AFB3AD, 0xB5B1B5B9, 0xB7B8B4B4, 0xB4B5B9B4,
+ 0xB9B4B5B9, 0xB1B7B2B5, 0xBCB7BCBB, 0xBEBDB7BD,
+ 0xB7BDBCB8, 0xBDB8BFBC, 0xBDBCB9C0, 0xB7BCBDB8,
+ 0xBEBAC0BF, 0xC0BFB9BF, 0xBAC0BFBA, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC2B8BFC2, 0xC0C1B8BF,
+ 0xBABFC0BB, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBEB7BFBE, 0xC0C0B7BF, 0xB8C0BFB8, 0xBCB7BDBC,
+ 0xC0C0B7BD, 0xB8BFC2B8, 0xC0BABFC0, 0xC0BFBABF,
+ 0xB7BFBEB8, 0xBFBABFC0, 0xBEBFB9BE, 0xB9BEBFB9,
+ 0xBEB9BFBE, 0xC0C0B9BF, 0xB8C0C0B8, 0xBEB9BFBE,
+ 0xC0C0B9BF, 0xB9C0C3B8, 0xBBB9C1C1, 0xB7B7B3BB,
+ 0xB3BBBBAF, 0xBBB5BDBD, 0xC0C0B3BB, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BEBAC0, 0xBBC0BEBB, 0xBEB9C0BD,
+ 0xBFBDBAC1, 0xBABFBDBA, 0xBCBBC1BC, 0xC0BEBBC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC1BEBBC0, 0xBAC1BEBA,
+ 0xBCB9C0BD, 0xC0C0B7BD, 0xB8C0BFB8, 0xBDB7BFBE,
+ 0xC0BBB7C0, 0xB9C0BBB9, 0xBEBAC0BF, 0xBEBFB9BF,
+ 0xB9BEBFB9, 0xBDB7BCBD, 0xBABDB7BC, 0xB0B8B8B3,
+ 0xBEB8BEBD, 0xBFBEB9BF, 0xBABFBEBA, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xBABFBEBA, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBEBDC0BE, 0xC0BEBDC0, 0xBDC0BEBD,
+ 0xB9B8BCB7, 0x3E3EB8BB, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000000, 0x1B000003, 0x324A1610,
+ 0x2C1D3D3F, 0x87422D54, 0x66A37055, 0x8767A287,
+ 0x46705783, 0x26433825, 0x38284038, 0x4020122A,
+ 0x2138372A, 0x311F3E31, 0x96654B7B, 0x5C977B5E,
+ 0x6A51837A, 0x37392A4A, 0x2E482A20, 0x2A1F3939,
+ 0x08080808, 0xBBB90808, 0xBABBB7BA, 0xBABBBFBA,
+ 0xBFB9BBBF, 0xB9BFBABB, 0xBDB9C0BD, 0xBFBEB7C0,
+ 0xB8BEBDB9, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBEB9C0BD, 0xC0BFB9BF, 0xBABFBEBB, 0xBEBABFBE,
+ 0xC0BEBABF, 0xBABFBDBB, 0xBAB9BFBA, 0xBFBAB8BF,
+ 0xB8BFBCB8, 0xBBB7BEBB, 0xBDBCB7BE, 0xB7BDBCB7,
+ 0xBCB7BDBC, 0xBDBEB7BD, 0xB7BCBDB8, 0xBCB7BDBC,
+ 0xBCBDB7BD, 0xB7BDBCB7, 0xBCB7BDBC, 0xBCBDB7BD,
+ 0xB7BCBDB7, 0xBCB7BDBC, 0xBCBDB7BD, 0xB7BCBDB7,
+ 0xBCB6BCBB, 0xBEBDB7BD, 0xB7BDBCB8, 0xB8B5BCB9,
+ 0xBCBBB4BB, 0xB4BCBBB4, 0xBBB6BCBB, 0xBCBCB6BC,
+ 0xB4BCBCB4, 0xBBB6BCBB, 0xBDBCB6BC, 0xB6BCBBB7,
+ 0xBAB5BBBA, 0xBBBAB5BB, 0xB5BBBAB5, 0xBAB5BBBA,
+ 0xBBBAB5BB, 0xB5BBBAB5, 0xBAB5BBBA, 0xBBBAB5BB,
+ 0xB5BBBAB5, 0xBAB6BBBA, 0xBBB9B6BB, 0xB6BBB9B6,
+ 0xBBB7BCBB, 0xBCBBB7BC, 0xB7BCBBB7, 0xB8B5BAB9,
+ 0xB8B7B4B9, 0xB5BBBAB3, 0xB8B4BAB9, 0xBAB9B3B9,
+ 0xB5BAB8B4, 0xB7B5BAB8, 0xBBB6B6BC, 0xB5BBB6B5,
+ 0xBAB6BDBA, 0xBBBAB6BD, 0xB6BCBBB5, 0xB8B7BEBB,
+ 0xBBB9B5BA, 0xB8BDBBB6, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBAB8BDBB, 0xBDBBB7BC, 0xBCBDBBBA,
+ 0xBDBABDBB, 0xBFBDBCBF, 0xBABDBBBC, 0xBBBABDBB,
+ 0xBDBBBABD, 0xBABDBBBA, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB9BCC0BB, 0xBCB7BABE, 0xBABEB9B8,
+ 0xBCBABDBB, 0xBAB5BBBE, 0xB0B7B2B4, 0xB7B3B9B4,
+ 0xBBB6B6BC, 0xB8BCB7B7, 0xB7B7BDB8, 0xBBB9B6BC,
+ 0xB9BDB8B8, 0xB5BCBFB6, 0xBFB6BEBF, 0xC2C5BCBC,
+ 0xA8BABDB4, 0xABA2AEB1, 0xA8ACA1A8, 0xA1A7ADA2,
+ 0xAFA4A7AE, 0xA7ADA2A9, 0x9FA5AC9F, 0xAA9FA5AC,
+ 0xA7ABA0A4, 0x9EA5A99E, 0xA99EA3A9, 0xA0A69BA5,
+ 0x999EA499, 0xA495A1A5, 0x9F9F91A1, 0x98A2A498,
+ 0xA397A0A4, 0x9FA195A1, 0x929DA195, 0x9E92989F,
+ 0x9CA0949A, 0x909A9C90, 0x998D9A9C, 0x93978B95,
+ 0x8291958A, 0x8E83898D, 0x868A7F8A, 0x77808178,
+ 0x807A7F80, 0x5C5B5780, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000001,
+ 0x00000200, 0x25242004, 0x32353632, 0x39343337,
+ 0x383C3735, 0x3E414540, 0x3C3A3F43, 0x50514F3B,
+ 0xBAB0B1AF, 0xBCB7B9BC, 0xB6BCB7B8, 0xB6B3BAB7,
+ 0xBAB8B3B8, 0xB9BCBAB7, 0xB9B8BEB9, 0xBEBCB8BE,
+ 0xB7BCBBB9, 0xBBB8BDBB, 0xBDBCB8BD, 0xBABFBDB7,
+ 0xBABBBFBA, 0xBEB9BBBF, 0xB9BEBCBA, 0xBCB7BDBC,
+ 0xC1C1B5BD, 0xADB7B7B9, 0xBDADB7B7, 0xBDBDB3BD,
+ 0xB1BBBBB3, 0xBCB4BEBE, 0xBBBBB2BC, 0xB7BDBCB3,
+ 0xB6B8BDBC, 0xBDBCB3B8, 0xB8BDBCB8, 0xBBB8BDBB,
+ 0xBCBBB8BD, 0xB8BDBCB7, 0xB8B6BBBA, 0xBBBBB4B9,
+ 0xBBBEBCB9, 0xB6B8BBB9, 0xBCB7B5BB, 0xB8BCB7B8,
+ 0xAEB5B9B4, 0xB9B4AFB3, 0xB7BCBAB5, 0xBBB7BDBC,
+ 0xBCBBB4BC, 0xB7BCBBB7, 0xBAB7BCBA, 0xBCBBB7BC,
+ 0xB7BCBBB7, 0xB7B7BAB8, 0xBBB8B6BC, 0xB2B9B6B4,
+ 0xB9B6BDBA, 0xBAB9B5BA, 0xB4B9B8B5, 0xB8B4BAB9,
+ 0xB9B7B3B9, 0xB5BAB8B4, 0xB9B6BBB9, 0xBCB9B6BB,
+ 0xB4BBB8B5, 0xB3B7BBB6, 0xB7B2B5B9, 0xB5B9B4B3,
+ 0xB3B1B8B3, 0xB7B5AFB6, 0xB1B6B4B2, 0xB3B5BBB6,
+ 0xB9B4B3BA, 0xB6BAB5B5, 0x368B8F89, 0x3C37383C,
+ 0x393D3838, 0x2F30342F, 0x33313034, 0x18191732,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x41423E00, 0x7C868A84, 0x847B8085,
+ 0x8B90877F, 0x8B92968B, 0x9A8E9495, 0x989F9296,
+ 0x97979E91, 0xA4959DA4, 0xA1A8999D, 0x96A2A897,
+ 0xAD9AA5A9, 0xA6AC99A9, 0x9CA5AA9B, 0xAB9CA4AB,
+ 0xA4AB9CA4, 0x9DA5AC9D, 0xAC9DA5AC, 0xA0A798A5,
+ 0x99A0A798, 0xA89B9FA9, 0xA0A79A9F, 0x9DA3A79B,
+ 0xA89DA5A9, 0xA5A99EA4, 0xA0A6A9A0, 0xA6A0A6A9,
+ 0xA4A6A0A4, 0xA5A6AAA4, 0xA9A4A7AB, 0xA6ACA7A3,
+ 0xB2AEB4AF, 0xB9B4B1B7, 0xB5B9B4B5, 0xB1B3B7B2,
+ 0xB7B2B3B7, 0xB2B8B3B3, 0xBBB4B9B8, 0xBEBFB6BC,
+ 0xBAC0BFB9, 0xBEBAC1BE, 0xC0BFB8C1, 0xB7BDBCBA,
+ 0xBFB9BFBE, 0xBFC0BAC0, 0xBABFC0BA, 0xBFB9BFBE,
+ 0xC0C0BAC0, 0xB8C0C0B8, 0xC0BABFC0, 0xC0C0BABF,
+ 0xB8C0C0B8, 0xBFB8C0BF, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xBEB8C0BF, 0xC0C0B7BF, 0xB8C0BFB8, 0xBEB6BCBB,
+ 0xC0C0B9BF, 0xB8BFC2B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB9C1C1, 0xBEBFB7BF, 0xB9BEBFB9,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xB9BEBFB9, 0xBFB9BFBE,
+ 0xC0C0BAC0, 0xB8C0C0B8, 0xB9B8C0C0, 0xB8B8B1B9,
+ 0xB6BEBEB0, 0xBBB5BDBD, 0xC1C1B3BB, 0xB8C0C0B9,
+ 0xBEBAC0BF, 0xC0BEBAC1, 0xBBC0BEBB, 0xBEB9C0BD,
+ 0xBFBDBAC1, 0xBABFBDBA, 0xBEBBC0BE, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBCB9BFBE, 0xC0C0B7BD, 0xB8C0BFB8, 0xBDB9BFBE,
+ 0xC0BBB9C0, 0xB9C0BBB9, 0xBEB8C0BF, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xBBB7BCBD, 0xBDBDB5BA, 0xB2BABAB5,
+ 0xBEB8BEBD, 0xBEBFB9BF, 0xBABFBEBA, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBEBBC0BE, 0xC1BEBBC0,
+ 0xBAC1BEBA, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xB9B8BCB7, 0x3E3EB8BB, 0x0000013E, 0x00000000,
+ 0x00000000, 0x00000000, 0x1B000003, 0x33491610,
+ 0x2C1D3D3F, 0x87422D54, 0x66A37055, 0x8767A287,
+ 0x46705783, 0x26433825, 0x36284038, 0x3E201329,
+ 0x21383528, 0x311F3E31, 0x95654B7B, 0x5D957A5D,
+ 0x6B52847A, 0x393A2B4B, 0x2C482A1F, 0x2A1E3A38,
+ 0x08080808, 0xBBB90808, 0xBABBB7BA, 0xBABBBFBA,
+ 0xBFBABBBF, 0xB9BFBABB, 0xBDB9C0BD, 0xBFBEB7C0,
+ 0xB9BFBEB9, 0xBDBABFBE, 0xBFBDBABF, 0xBBC0BEBA,
+ 0xBBB7BEBB, 0xBDBCB7BE, 0xB8BDBCB8, 0xBEBABFBE,
+ 0xBFBEBABF, 0xB9BEBCBA, 0xBAB8BFBC, 0xC0BBB8BF,
+ 0xB8BFBAB9, 0xBBB6BDBA, 0xBEBDB7BE, 0xB7BDBCB8,
+ 0xBCB7BDBC, 0xBCBDB7BD, 0xB7BDBCB7, 0xBCB6BCBB,
+ 0xBCBDB7BD, 0xB7BCBDB7, 0xBCB7BDBC, 0xBCBDB7BD,
+ 0xB7BCBDB7, 0xBCB7BDBC, 0xBCBDB7BD, 0xB7BCBDB7,
+ 0xBCB8BEBD, 0xBDBCB7BD, 0xB7BDBCB7, 0xBAB6BCBB,
+ 0xBCBBB6BD, 0xB6BCBBB6, 0xBBB6BCBB, 0xBBBCB6BC,
+ 0xB6BCBBB6, 0xBAB6BCBB, 0xBCBBB5BB, 0xB6BCBBB7,
+ 0xB9B6BBB9, 0xBBB9B5BC, 0xB5BCB9B6, 0xB9B6BBBA,
+ 0xBBBAB5BC, 0xB5BCB9B6, 0xB9B6BBBA, 0xBBBAB5BC,
+ 0xB6BBB9B6, 0xB9B6BBBA, 0xBBB9B6BB, 0xB6BBB9B6,
+ 0xBAB8BDBB, 0xBCBBB7BC, 0xB8BDBCB7, 0xB6B3B7B8,
+ 0xB8B7B1B5, 0xB4BAB9B2, 0xB8B3B9B8, 0xBAB9B3B9,
+ 0xB5BAB8B5, 0xB7B5BAB8, 0xBBB6B6BC, 0xB4BAB5B5,
+ 0xBAB6BBB9, 0xBCBBB6BD, 0xB6BDBAB6, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BBB9BA, 0xBBB6BBB9, 0xBAB8B8BD,
+ 0xB8BDBBB5, 0xBBB8BDBB, 0xBBB9B8BD, 0xB8BBB9B8,
+ 0xBDBABDBB, 0xBFBDBCBF, 0xBCBFBDBC, 0xBDBCBFBD,
+ 0xBDBBBCBF, 0xBCBFBDBA, 0xBABBBEBC, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB9BCC0BB, 0xBDBBBABE, 0xBABDBBBA,
+ 0xBBBABDBB, 0xBBB6BABD, 0xB3BAB5B5, 0xB7B6BCB7,
+ 0xBBB6B6BC, 0xB6BCB7B7, 0xB7B7BDB8, 0xBCBAB6BC,
+ 0xB8BCB7B9, 0xB5BCBFB6, 0xBEB5BCC0, 0xBFC2B9BB,
+ 0xA8BABDB4, 0xB1A8AEB1, 0xA6ACA1AE, 0xA1A5ABA0,
+ 0xADA2A6AC, 0xA4ACA1A7, 0xA0A5AC9F, 0xABA0A6AD,
+ 0xA6AA9FA7, 0x9FA2A89D, 0xA79CA4AA, 0x9EA499A1,
+ 0x9A9FA59A, 0xA498A1A5, 0x9DA091A2, 0x98A1A599,
+ 0xA296A0A4, 0x9FA3979E, 0x929AA194, 0x9E92989F,
+ 0x9CA0949A, 0x909A9C90, 0x9D91989C, 0x94988C99,
+ 0x85909489, 0x8D828C90, 0x898D8289, 0x78808178,
+ 0x7F798081, 0x5C5B577F, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x00000200, 0x25242004, 0x32373834, 0x39343337,
+ 0x383C3735, 0x41373A38, 0x3B394043, 0x50514F3A,
+ 0xB9B4B5B3, 0xBBB6BABB, 0xB8BCB7B7, 0xB7B4B9B7,
+ 0xBAB8B4B9, 0xB9BCBAB7, 0xB9B8BEB9, 0xBCBAB6BB,
+ 0xB8BDBCB7, 0xBBB8BDBB, 0xBEBDB8BD, 0xB8BDBCB9,
+ 0xBAB9BEBC, 0xBFBABBBF, 0xB9BEBCBB, 0xBCB8BFBC,
+ 0xBDBDB7BD, 0xB3BBBBB5, 0xBBAFB7B7, 0xBDBDB1BB,
+ 0xB3BDBDB3, 0xBBB3BDBD, 0xBCBCB1BB, 0xB5BDBDB4,
+ 0xBCB7BDBC, 0xBBBAB7BD, 0xB6BCBBB5, 0xBAB8BDBC,
+ 0xBCBBB7BC, 0xB7BCBBB7, 0xBAB8BDBC, 0xBBBBB6BB,
+ 0xBABDBBB9, 0xB9B8BDBB, 0xBEB9B8BE, 0xB8BCB7BA,
+ 0xAFB3B9B4, 0xB4AFAEB4, 0xB2B7B5B0, 0xBCB7BEBB,
+ 0xBCBBB7BD, 0xB8BDBBB7, 0xBAB5BAB8, 0xBCBAB7BC,
+ 0xB7BCBAB7, 0xB7B8BCB7, 0xBAB8B8BC, 0xB3BAB7B5,
+ 0xB7B3BAB7, 0xBAB9B3BA, 0xB3B8B7B5, 0xB9B3B8B7,
+ 0xB8B6B5BC, 0xB5BBB6B3, 0xB6B5BBB6, 0xBBB8B5BB,
+ 0xB5BBB6B4, 0xB3B8BCB7, 0xB4AFB5B9, 0xB0B4AFB0,
+ 0xB3B3B9B4, 0xB2B0B2B8, 0xADB2B0AD, 0xB1B0B6B1,
+ 0xB7B2B1B8, 0xB6BAB5B3, 0x378B8F8A, 0x3B36383C,
+ 0x383C3737, 0x30303331, 0x34322F32, 0x18191733,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x42433F00, 0x7C878B85, 0x8B847E86,
+ 0x8B908784, 0x8F92958C, 0x9B90969A, 0x989E9397,
+ 0x999BA196, 0xA3969EA4, 0x9DA4959C, 0x97A3A998,
+ 0xAC99A2A8, 0xA6AC9BA8, 0x9DA2A99A, 0xADA0A5AC,
+ 0xA4AB9CA6, 0x9EA0A79A, 0xA798A6AD, 0xA0A798A2,
+ 0x9AA0A798, 0xA79A9EA7, 0xA1A89B9E, 0x9DA3AA9D,
+ 0xA99EA5A9, 0xA6AA9FA5, 0xA2A6A9A0, 0xA8A2A8AB,
+ 0xA6A8A2A6, 0xA4A5A9A3, 0xA7A2A6AA, 0xA6ACA7A1,
+ 0xB2AFB5B0, 0xB5B0B1B7, 0xB3B7B2B1, 0xB1B3B7B2,
+ 0xB9B4B1B8, 0xB3B8B6B5, 0xBBB6BDBA, 0xBCBDB6BC,
+ 0xB8BDBEB7, 0xBDB7BFBE, 0xBFBEB7C0, 0xB4BCBBB7,
+ 0xBFB7BDBC, 0xBFC0BAC0, 0xB9BEBFBA, 0xBFB8BEBD,
+ 0xC0C0BAC0, 0xB8C0C0B8, 0xC0BABFC0, 0xC0C0BABF,
+ 0xB8C0C0B8, 0xBEB8C0BF, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xBEB8C0BF, 0xC0C0B7BF, 0xB8C0BFB8, 0xBFB5BBBA,
+ 0xC0C0BAC0, 0xB7BEC1B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B9C1C1, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xBFBAC0BF, 0xBEBFBAC0, 0xB9BEBFB9, 0xC0B9BFBE,
+ 0xC0C0BBC1, 0xB8C0C0B8, 0xBBB5BDBD, 0xB9B9B3BB,
+ 0xB5BDBDB1, 0xBBB6BEBE, 0xC0C0B3BB, 0xB8C0C0B8,
+ 0xBEBAC0BF, 0xC0BEBAC1, 0xBAC1BEBB, 0xBEB9C0BD,
+ 0xBFBDBAC1, 0xB8BFBCBA, 0xBEBAC0BF, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBCB9C0BD, 0xC0BFB7BD, 0xB8C0BFBA, 0xBDB9C0BD,
+ 0xC0BBB9C0, 0xB9C0BDB9, 0xBFB9BFBE, 0xBFBEB8C0,
+ 0xBAC0BFB9, 0xB9B7BDBC, 0xBCBDB4BA, 0xB4BAB9B7,
+ 0xBFBAC0BF, 0xBFC0BAC0, 0xBBC0BFBB, 0xBDBABFBE,
+ 0xBFBEBABF, 0xBBC0BEBA, 0xBEBBC0BE, 0xC1BEBBC0,
+ 0xBAC1BEBA, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xB9B8BCB7, 0x3E3EB8BB, 0x0000013E, 0x00000000,
+ 0x00000000, 0x00000000, 0x1B000001, 0x33491410,
+ 0x2C1D3D3F, 0x87422D54, 0x66A37055, 0x8767A287,
+ 0x46715884, 0x25423825, 0x36293F37, 0x3E201329,
+ 0x2238362A, 0x311F3E2F, 0x94634B7B, 0x5D95795C,
+ 0x6951817A, 0x373A2B4B, 0x28422C1F, 0x2C1F3935,
+ 0x08080808, 0xB9B70808, 0xB8B9B7B8, 0xBABBBEBC,
+ 0xBFBABBBF, 0xB9BFBABB, 0xBDB9C0BD, 0xBFC0B8BE,
+ 0xB9BFBEBA, 0xBCBBC0BF, 0xBFBEB8BD, 0xB9BEBDBA,
+ 0xBBB7BCBA, 0xBFBEB8BD, 0xBBC0BFBA, 0xBDBABEBF,
+ 0xBFBEB9BE, 0xBAC1BEB9, 0xBDB7BEBB, 0xBDBAB9C0,
+ 0xB6BDBAB6, 0xBBBABFBD, 0xBDBCB8BD, 0xB8BDBCB8,
+ 0xBBB7BEBB, 0xBDBCB7BE, 0xB7BDBCB7, 0xBBB7BDBC,
+ 0xBCBBB7BE, 0xB4BCBBB4, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB7BDBCB7, 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBDB7BCBD, 0xBCBDB7BC, 0xB8BDBCB8, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB8BDBCB7, 0xBAB6BBBA, 0xBBBAB6BB,
+ 0xB6BBBAB6, 0xB9B6BBB9, 0xBBB9B6BB, 0xB6BBB9B8,
+ 0xB7B8BCB7, 0xBCB7B6BC, 0xB6BCB7B8, 0xB7B8BBB9,
+ 0xBAB8B6BC, 0xB5BBB6B7, 0xB7B8BBB9, 0xBBB9B6BC,
+ 0xB8BCB7B8, 0xB7B8BBB9, 0xBCB7B8BC, 0xB6BCB7B6,
+ 0xB7B8BCB7, 0xBBB9B8BC, 0xB6BBB9B8, 0xB6B2B7B6,
+ 0xB8B9B1B5, 0xB3B8B9B3, 0xB7B3B9B8, 0xB9B8B2B8,
+ 0xB2B9B6B3, 0xB7B5BAB8, 0xBCB7B6BC, 0xB5BBB6B8,
+ 0xB5B4BAB5, 0xBAB8B4BA, 0xB6BBB9B5, 0xB9B9BCBA,
+ 0xBFBABABE, 0xBABEB9BB, 0xB7B6BCB7, 0xBCB7B6BC,
+ 0xBABEB9B8, 0xB7B8BEB9, 0xBCB7B6BC, 0xB7BBB6B8,
+ 0xB8B8BCB7, 0xBCB7B7BD, 0xB7BDB8B6, 0xBEB9BEBC,
+ 0xBDBCBBC0, 0xB8BDBBB8, 0xBEB8BDBB, 0xBDBBBBC0,
+ 0xB8BDBBB8, 0xBBBABFBD, 0xBDBCB8BD, 0xBBBEBCB8,
+ 0xB9BABDBB, 0xBBB6BABE, 0xB6BCB7B5, 0xB8B7BDB8,
+ 0xBDB8B7BD, 0xB7BDB8B7, 0xB8B7BDB8, 0xBCBAB6BD,
+ 0xB9BDB8B7, 0xB3B9BEB5, 0xC4BBB8BE, 0xC4C9C0BF,
+ 0xA3B9BEB5, 0xADA4A7AC, 0xA7ACA3A8, 0xA7ABB0A7,
+ 0xADA3A9B1, 0xA5ADA3A5, 0xA1A6ACA1, 0xACA0A9AD,
+ 0xA9ADA2A8, 0x9EA2A89D, 0xA79EA2A7, 0xA3A69DA2,
+ 0x979EA297, 0xA79B9EA2, 0xA0A296A5, 0x9AA1A599,
+ 0xA297A0A7, 0x9DA3989C, 0x959BA295, 0x9F939BA2,
+ 0x989C909B, 0x90989C91, 0x9B8F979B, 0x959C8F97,
+ 0x8691958A, 0x90858D91, 0x888C818C, 0x78828379,
+ 0x837A8182, 0x5D5D5782, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000200, 0x27232204, 0x35373836, 0x38363437,
+ 0x3A3D3B35, 0x3F404040, 0x413F4041, 0x53545240,
+ 0xB7B0B4AF, 0xBCBAB8BC, 0xB8BBB9B9, 0xB9B6BBB9,
+ 0xBAB8B6BB, 0xB8BBB9B7, 0xB9B6BBB9, 0xBBB9B6BB,
+ 0xB7BCBAB6, 0xBBBABDBB, 0xBEBDB8BD, 0xBABFBEB9,
+ 0xBDBBC0BE, 0xBCBABABF, 0xB6BBB9B7, 0xBDB4BBB8,
+ 0xBDBCB9C0, 0xB8C0BFB7, 0xBCB3BBBB, 0xBBBBB4BC,
+ 0xB2BABAB3, 0xBAB4BCBB, 0xBBBCB3BB, 0xB6BEBEB6,
+ 0xBAB2BABA, 0xBCBCB2BA, 0xB5BDBDB4, 0xB8B7BDBC,
+ 0xBCBBB3B9, 0xB8BDBCB7, 0xBAB5BBBA, 0xBDBDB6BB,
+ 0xBBBEBCBB, 0xB9B8BDBB, 0xBDBBB8BE, 0xBABFBDB8,
+ 0xB7B3BAB7, 0xB9B7B3BA, 0xB6BBB9B4, 0xB8B6BBB9,
+ 0xBCBAB5BA, 0xB8BBB9B9, 0xB7B8BBB9, 0xBCB7B8BC,
+ 0xB7BBB6B8, 0xB7BABBB7, 0xBBB9B8BC, 0xB3B8B6B8,
+ 0xB6B1B7B2, 0xBBB9B5BB, 0xB6BCB7B8, 0xB4B3B9B4,
+ 0xBCB5B4BB, 0xB5BCB5B5, 0xB6B5BCB5, 0xBBB6B6BD,
+ 0xB5BBB6B5, 0xB1B6BAB5, 0xB4AFB2B6, 0xB4B8B3B0,
+ 0xB3B5B9B4, 0xB6B4B4B8, 0xB0B3B1B3, 0xAFB0B4AF,
+ 0xB3B1B0B4, 0xB8BBB9B0, 0x3F90918F, 0x413F4041,
+ 0x40413F40, 0x38383838, 0x38383838, 0x18181838,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000002, 0x00000100,
+ 0x01000001, 0x46474302, 0x7F858C85, 0x8D838089,
+ 0x8A8F8685, 0x91979A91, 0x9D94979A, 0x9A9E939A,
+ 0x9A9FA398, 0xA79AA1A5, 0xA0A79AA0, 0x9BA3AA9B,
+ 0xAA9BA3AA, 0xA3AA9BA5, 0x9FA5AC9F, 0xACA1A3AC,
+ 0xA6ADA0A6, 0x9DA9ADA2, 0xA79BA5A9, 0xA3A79BA5,
+ 0x9BA1A89B, 0xA79CA0A6, 0xA1A79CA1, 0x9DA1A79C,
+ 0xA89DA2A8, 0xA2A89DA2, 0xA2A5AAA1, 0xA9A3A6AB,
+ 0xA6AAA5A5, 0xA6A8ACA6, 0xA39EA8AC, 0xA8ABA99F,
+ 0xB6B5B8B6, 0xB4B2B5B8, 0xB1B5B0B1, 0xB4ADB3AE,
+ 0xB8B6B2B9, 0xB7BEBBB3, 0xBEBAC1BE, 0xBEBFB7BF,
+ 0xB8BDBEB9, 0xBEB8C0BF, 0xC1C0B7BF, 0xB8C0BFB9,
+ 0xBEB7BEBB, 0xC0C1B9BF, 0xBABFC0BB, 0xBEB9BFBE,
+ 0xC0C0B9BF, 0xB8C0C0B8, 0xC2BABFC2, 0xC0C0BABF,
+ 0xB8C0C0B8, 0xBEB8C0BF, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xBEB8C0BF, 0xC1C1B7BF, 0xB8C0BFB9, 0xBFB6BCBB,
+ 0xC0C0BAC0, 0xB8BFC2B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0B9BEBF, 0xBFC0BABF, 0xB9BEBFBA, 0xC0B7BFBE,
+ 0xC0C1B9C1, 0xBBC0C1BB, 0xBCB5BDBD, 0xBBBBB4BC,
+ 0xB4BCBCB3, 0xBBB4BCBC, 0xBFC0B3BB, 0xBABFC0BA,
+ 0xBEB9BFBE, 0xC0BFB9BF, 0xB9BFBEBA, 0xBFBAC0BF,
+ 0xC0BFB8C0, 0xB7BDBCBA, 0xBFBABFC0, 0xC0BFB8C0,
+ 0xB9BFBEBA, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBBB8BDBB, 0xC0BFB7BE, 0xB9BFBEBA, 0xBDBBC0BE,
+ 0xBFBDBABF, 0xB9C0BDBA, 0xBFB9BFBE, 0xBFBEBAC0,
+ 0xB9BFBEB9, 0xBBBABFBE, 0xBAB9B8BD, 0xB5BBBAB5,
+ 0xBFB9BFBE, 0xBFC0B8C0, 0xBAC0BFBA, 0xBEBBC0BF,
+ 0xC0BEBBC0, 0xBCC1BFBB, 0xBCBBC0BE, 0xC0BEBBC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xB9B8BCB7, 0x3E3EB8BB, 0x0000003E, 0x00000000,
+ 0x01000000, 0x00000000, 0x1A000001, 0x33491411,
+ 0x2C1D3D3F, 0x87422C56, 0x66A37055, 0x8767A287,
+ 0x466D5480, 0x27443825, 0x36293F39, 0x3B1C1026,
+ 0x1F373125, 0x3223432C, 0x8D5E4878, 0x548F7055,
+ 0x68508070, 0x36362645, 0x283E2D20, 0x2D203635,
+ 0x08080808, 0xB9B70808, 0xB8B9B7B8, 0xBCBBBEBC,
+ 0xBFBABBBE, 0xB9BFBABB, 0xBEB8BDBB, 0xBEBFB9BF,
+ 0xB9BFBEB9, 0xBEB9BEBD, 0xBCBBBABF, 0xB8BDBCB7,
+ 0xBCB9BEBC, 0xBEBDB9BE, 0xBABFBEB9, 0xBFBABFBE,
+ 0xBFBEBBC0, 0xB8BEBDB9, 0xBBB9C0BD, 0xBEBBB7BE,
+ 0xB8BFBCB7, 0xBBBABFBD, 0xBFBEB8BD, 0xB8BDBCBA,
+ 0xBAB7BEBB, 0xBDBCB6BD, 0xB7BDBCB7, 0xBCB7BEBB,
+ 0xBDBCB8BF, 0xB5BDBCB5, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB7BDBCB7, 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BDBCB7,
+ 0xBDB6BBBC, 0xBDBEB7BC, 0xB8BCBDB9, 0xBBB6BCBB,
+ 0xBCBBB6BC, 0xB7BCBBB7, 0xBAB6BBBA, 0xBBBAB6BB,
+ 0xB6BBB9B6, 0xB7B8BBB9, 0xBBB9B8BC, 0xB8BBB9B8,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xB7B8BCB7, 0xBCB7B8BC, 0xB6BCB7B6,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB8BCB7B8, 0xB9B4B9B8,
+ 0xB8B9B4B8, 0xB5BBBAB3, 0xB7B3B9B8, 0xB9B8B2B8,
+ 0xB2B8B7B3, 0xB7B5BAB8, 0xBCB7B6BC, 0xB8BCB7B8,
+ 0xB7B6BCB7, 0xBBB9B6BC, 0xB7BAB8B8, 0xB9B9BDB8,
+ 0xBEB9BABE, 0xBABEB9BA, 0xB9B8BEB9, 0xBCB7B8BE,
+ 0xB8BCB7B8, 0xB9B6BCB7, 0xBBB6B8BE, 0xB8BCB7B7,
+ 0xB8B6BCB7, 0xBDB8B7BD, 0xB8BEB9B7, 0xBAB8BDBB,
+ 0xBBBAB7BC, 0xB9BEBCB6, 0xBDB9BEBC, 0xBDBBBABF,
+ 0xB8BDBBB8, 0xBAB8BDBB, 0xBDBCB7BC, 0xB9BCBAB8,
+ 0xB9BABEB9, 0xBBB6BABE, 0xB8BEB9B5, 0xB8B8BEB9,
+ 0xBDB8B7BD, 0xB5BBB6B7, 0xB8B6BDB8, 0xBBB9B6BD,
+ 0xB8BEB9B6, 0xB3B8BDB4, 0xC3BAB8BE, 0xB8BDB4BE,
+ 0x94A6ABA2, 0xABA5989D, 0xA7ABA5A7, 0x9FA0A89E,
+ 0xABA4A1A9, 0xA5ADA3A4, 0x9DA5A99E, 0xA99DA5A9,
+ 0xA5A99DA5, 0x9BA2A89D, 0xA39A9FA4, 0xA1A49B9E,
+ 0x9BA2A69B, 0xA69AA2A6, 0x9A9E92A4, 0x979DA497,
+ 0xA3989DA4, 0x9DA3989D, 0x939AA194, 0x9F9399A0,
+ 0x9A9E929B, 0x929A9E93, 0x9E91999D, 0x959C8F97,
+ 0x8595998E, 0x90858C90, 0x888C818C, 0x79828379,
+ 0x847B8283, 0x5D5D5783, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01020001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000200, 0x27232204, 0x36363735, 0x37373538,
+ 0x3A3C3C35, 0x40404040, 0x413F4040, 0x51525040,
+ 0xB7B0B4AF, 0xB7B5B8BC, 0xB5B8B6B4, 0xB9B6BBB9,
+ 0xBBB9B6BB, 0xB8BBB9B8, 0xB7B6BBB9, 0xBCBAB4B9,
+ 0xB6BBB9B7, 0xBBB8BBB9, 0xBDBCBABD, 0xB9BEBDB8,
+ 0xBAB8BDBB, 0xBDBBB7BC, 0xB9BEBCB8, 0xBDB8BDBB,
+ 0xBEBDB9C0, 0xB9BFBEB8, 0xBFB8C0C0, 0xB9B9B7BF,
+ 0xB1B9B9B1, 0xB7B3BBBA, 0xBEBDB0B8, 0xB2B8B7B8,
+ 0xBDB0B8B8, 0xBCBFB3BD, 0xB5BDBDB3, 0xBCB7BDBC,
+ 0xBCBBB7BD, 0xB8BDBCB7, 0xBAB5BBBA, 0xBEBDB6BB,
+ 0xBABFBEB9, 0xB9BABDBB, 0xBEBCB8BE, 0xB8BDBBB9,
+ 0xB8B3BAB7, 0xB9B7B4BB, 0xB5BAB8B4, 0xB6B5BBB6,
+ 0xBBB9B5BB, 0xB8BCB7B8, 0xB6B8BCB7, 0xBBB6B7BB,
+ 0xB7BBB6B7, 0xB7B7BBB6, 0xBCB7B8BC, 0xB3B9B4B8,
+ 0xB6B3BAB3, 0xBCB7B6BD, 0xB8BCB7B8, 0xB3B5BCB5,
+ 0xBDB3B3BA, 0xB5BDB3B5, 0xB5B5BCB5, 0xBAB5B5BC,
+ 0xB3B9B4B4, 0xB4B5B9B4, 0xB9B4B5B9, 0xB5B9B4B5,
+ 0xB4B5B9B4, 0xB6B4B5B9, 0xB4B8B3B3, 0xAFAFB3AE,
+ 0xB3B1B0B4, 0xB8BBB9B0, 0x40909090, 0x40404040,
+ 0x3F3F3F40, 0x38383838, 0x38383838, 0x18181838,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000002, 0x00000100,
+ 0x01000001, 0x47494302, 0x7F868E84, 0x8D838089,
+ 0x8A8F8685, 0x93949990, 0x9A91999C, 0x989B9297,
+ 0x989FA398, 0xA3979FA3, 0xA0A79A9F, 0x9CA3AA9D,
+ 0xAA9DA2A9, 0xA3AA9DA3, 0x9FA2AA9F, 0xAA9FA2AA,
+ 0xA3A99EA4, 0x9CA7ABA0, 0xA498A5A6, 0xA4A89CA2,
+ 0x99A1A79C, 0xA69B9EA4, 0xA1A79CA0, 0x9DA2A89D,
+ 0xA89DA2A8, 0xA4A9A0A2, 0xA3A3ABA1, 0xA8A3A3AA,
+ 0xA4A8A3A4, 0xA69FA39D, 0xABA9A8AC, 0xA9ACAAA8,
+ 0xB6B8BBB9, 0xB8B6B5B8, 0xB3B8B6B5, 0xB6ADB4B1,
+ 0xBCB9B2B9, 0xB6BDBAB5, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xB9BEBFB9, 0xBEBAC0BF, 0xC0BFB7BF, 0xB8C0BFB8,
+ 0xBBB9C0BD, 0xBFC0B6BC, 0xBABFC0BA, 0xBBB9BFBE,
+ 0xBFBEB6BC, 0xB8C0C0B7, 0xC0BABFC0, 0xC0C0BABF,
+ 0xB7BFBFB8, 0xBEB8C0BF, 0xC0C0B7BF, 0xB8C0C0B8,
+ 0xBDB7BFBE, 0xC0C0B6BE, 0xB7BFBFB8, 0xBFB7BDBC,
+ 0xC0C0BAC0, 0xB8BFC2B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB8C0C0, 0xBEBFB7BF, 0xB9BEBFB9,
+ 0xBFB8BDBE, 0xBFC0B9BE, 0xB9BFBEBA, 0xC0B8C0BF,
+ 0xC2C1B9C1, 0xB9C1C1BC, 0xB8B3BBBB, 0xBBBBB0B8,
+ 0xB4BCBCB3, 0xBBACB4B4, 0xBFC0B3BB, 0xBABFC0BA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBFB8C0BF,
+ 0xBFC0B8C0, 0xB6BBBCBA, 0xBFB7BFBF, 0xC0BFB7BF,
+ 0xB9BFBEBA, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBBB6BCB7, 0xBFBEB8BD, 0xB9BFBEB9, 0xBCBBC0BF,
+ 0xBFBDB9BE, 0xB9C0BDBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB8BEBDB9, 0xBBB9BEBC, 0xBBB9B8BD, 0xB7BEBBB6,
+ 0xBEB7BDBC, 0xBEBFB7BF, 0xBAC0BFB9, 0xBEBBC0BF,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBCBBC1BC, 0xC0BEBBC1,
+ 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xB9B8BBB9, 0x3E3EB8BB, 0x0000003E, 0x00000000,
+ 0x01000000, 0x00000000, 0x1A000001, 0x33491611,
+ 0x2D1C3D3F, 0x87402C56, 0x66A37055, 0x8766A387,
+ 0x476F5381, 0x26433A24, 0x36293F38, 0x3B1A1125,
+ 0x1F363027, 0x31244429, 0x8D5E4878, 0x558D6E55,
+ 0x60487870, 0x31362743, 0x283D291D, 0x2F203537,
+ 0x08080808, 0xB9B70808, 0xB8B9B7B8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xB9BFBABB, 0xBBB7BCBA, 0xBFBEB7BE,
+ 0xB7BDBCB9, 0xBBB9BFBE, 0xBDBBB7BE, 0xB8BDBBB8,
+ 0xBCB8BDBB, 0xBDBBB9BE, 0xB8BDBBB8, 0xBBB7BEBB,
+ 0xBDBAB7BE, 0xB7BEBBB6, 0xBCB8BDBC, 0xBFBEB8BD,
+ 0xB8BDBCBA, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB6BCBB, 0xBCBBB6BC, 0xB7BCBBB7, 0xBCB6BCBB,
+ 0xBCBDB7BD, 0xB7BCBDB7, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB8BDBCB8, 0xBCB7BDBC, 0xBDBCB7BD, 0xB8BDBCB8,
+ 0xBBB7BCBB, 0xBCBBB7BC, 0xB7BCBBB7, 0xBCB6BCBB,
+ 0xBCBBB7BD, 0xB7BCBBB7, 0xB9B6BBB9, 0xBBBAB6BB,
+ 0xB6BBB9B5, 0xB7B7BAB8, 0xB9B7B8BC, 0xB4B9B7B4,
+ 0xB8B7BAB8, 0xBAB8B7BA, 0xB5BAB8B5, 0xB8B5BAB8,
+ 0xBBB9B5BA, 0xB6BBB9B6, 0xB7B5BBB6, 0xBCB7B6BC,
+ 0xB6BCB7B6, 0xB6B8BCB7, 0xBBB6B7BB, 0xB8BCB7B7,
+ 0xB6B6BDB6, 0xBBB4B6BD, 0xB5BBB6B4, 0xB7B4B9B8,
+ 0xB9B8B3B8, 0xB5BBBAB3, 0xB7B5BAB9, 0xB9B8B4B9,
+ 0xB3B9B8B3, 0xB8B4BBB8, 0xBAB8B4BB, 0xB5BAB8B5,
+ 0xB8B6BBB9, 0xBBB9B5BA, 0xB8BBB9B8, 0xB8B5BBB6,
+ 0xBEB9B7BD, 0xB8BCB7BA, 0xBCB8BDBB, 0xBDBBB9BE,
+ 0xBABEB9BA, 0xB7B9BDB8, 0xBFBAB8BC, 0xBABEB9BB,
+ 0xB9B8BBB9, 0xBBB9B8BB, 0xB8BBB9B8, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBAB7BCBA, 0xBDB8B9BF,
+ 0xB6BCB7B7, 0xB6BABEB9, 0xBBB9B7BB, 0xB8BCB7B8,
+ 0xB7B9BDB8, 0xB7B2B8BC, 0xB7BDB8B1, 0xB8B8BEB9,
+ 0xBEB9B7BD, 0xB8BEB9B8, 0xB8B6BDB8, 0xBDB8B6BD,
+ 0xB7BDB8B7, 0xB4B8BDB4, 0xBDB4B8BD, 0xB3B8AFB8,
+ 0x82999C93, 0x9B95888B, 0xA7ABA597, 0x9E9EA39A,
+ 0xADA3A1A9, 0xA5ADA3A5, 0xA0A8ACA1, 0xA498AAAC,
+ 0x9FA397A0, 0x9DA2A89D, 0xA99EA2A8, 0xA0A499A3,
+ 0x9BA3A79C, 0xA296A4A5, 0x9A9E929E, 0x979EA598,
+ 0xA3989DA4, 0x9DA3989D, 0x95A0A498, 0xA1929DA1,
+ 0x9B9F939C, 0x92999D92, 0x9E93999D, 0x979B909A,
+ 0x85969990, 0x90858B8E, 0x878B808C, 0x7983847A,
+ 0x847B8283, 0x5D5D5783, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000200, 0x25232204, 0x36363735, 0x3C3C3538,
+ 0x3C3C3C3C, 0x40424040, 0x413F4240, 0x52535140,
+ 0xB7B0B4AF, 0xB8B3B8BC, 0xB5B9B4B4, 0xB8B8BBB9,
+ 0xBCB7B7BA, 0xB8BCB7B8, 0xB9B6BBB9, 0xBBB9B6BB,
+ 0xB5BAB8B6, 0xB9B6BCB7, 0xBEBDB6BB, 0xB8BDBCB9,
+ 0xB7B8BDBB, 0xBBB9B6BC, 0xB7BCBAB8, 0xBCBABFBD,
+ 0xBEBDB9BE, 0xB8BEBDB9, 0xBDB5BDBD, 0xB6B7B5BD,
+ 0xB6BBBCB1, 0xB9B5BBBA, 0xB6B4B5BC, 0xB3BAB7B1,
+ 0xBAB3BBBA, 0xBEBEB2BA, 0xB7BCBDB6, 0xBCB6BCBB,
+ 0xBDBCB7BD, 0xBBC0BFB8, 0xB9B7BCBA, 0xBAB9B6BB,
+ 0xB9BEBDB5, 0xB8B9BCBA, 0xBDBBB7BA, 0xB8BDBBBA,
+ 0xBBB3B8B7, 0xBAB8B7BC, 0xB5BAB8B5, 0xB8B5BAB8,
+ 0xBCB7B5BA, 0xB6BAB5B8, 0xB5B3B7B2, 0xBBB6B5BC,
+ 0xB6BCB7B5, 0xB6B5BCB5, 0xBCB5B6BD, 0xB3BAB3B5,
+ 0xB5B2B9B2, 0xBAB5B5BC, 0xB7BBB6B6, 0xB5B5BCB5,
+ 0xBAB3B5BC, 0xB5BCB5B3, 0xB7B5BCB5, 0xBBB5B7BE,
+ 0xB5B9B3B7, 0xB4B5B9B4, 0xB8B3B5B9, 0xB5B9B4B4,
+ 0xB2B5B9B4, 0xB7B2B3B7, 0xB3B7B2B3, 0xB1B3B7B2,
+ 0xB4AFB3B7, 0xB3B6B4B0, 0x40919191, 0x40404040,
+ 0x40404040, 0x38393939, 0x38383838, 0x18181838,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x48484202, 0x7E888D84, 0x90858189,
+ 0x8A90858A, 0x91959A91, 0x9892959A, 0x9EA19894,
+ 0x989EA297, 0xA2969FA3, 0xA1A5999E, 0x98A6AA9E,
+ 0xA89BA0A4, 0xA3AA9DA1, 0xA0A1A99E, 0xAAA0A2AA,
+ 0xA3A89FA2, 0x9DA6ACA1, 0xA498A4A8, 0xA0A498A0,
+ 0x9CA1A79C, 0xA79CA1A7, 0xA0A89D9F, 0x9DA0A89D,
+ 0xA99FA0A8, 0xA0A89EA1, 0xA3A5AAA1, 0xA9A4A5A9,
+ 0xA4A8A3A5, 0xA6A8ACA6, 0xABA9A8AC, 0x9CA19FA6,
+ 0xBAB4B9B8, 0xB8B7B6BB, 0xB3B8B7B3, 0xBBB5BBBA,
+ 0xBCBBB6BC, 0xB7BCBBB7, 0xBAB8BDBB, 0xBDBCB7BC,
+ 0xB7BDBCB8, 0xBFB8BEBD, 0xC0BFBAC0, 0xBAC0BFBA,
+ 0xBCBAC0BF, 0xBEBFB7BD, 0xBABFC0B9, 0xBCB7BFBE,
+ 0xBDBCB5BD, 0xBAC0BFB7, 0xC0B8C0C0, 0xBFC0B8C0,
+ 0xB9BFBEBA, 0xBFB8C0BF, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xBEB8BEBD, 0xC0C0B9BF, 0xB7BFBFB8, 0xBFB9BFBE,
+ 0xC0C0BAC0, 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xBFB7BFBF, 0xBEBFB7BF, 0xB9BEBFB9,
+ 0xC0B7BFBF, 0xC0BFBABF, 0xB9BFBEBA, 0xC0B9C1C0,
+ 0xC1C0B9C1, 0xB7BFBEB9, 0xB7B0B8B8, 0xBEBEADB7,
+ 0xAFB7B7B6, 0xBBADB5B5, 0xC0C0B3BB, 0xB9C1C1B8,
+ 0xBEB9BFBE, 0xC0BDBAC1, 0xB9C0BDB9, 0xBEB7BFBE,
+ 0xBFBEB7BF, 0xB7BDBCB9, 0xBEB6BEBD, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xBEBBC0BE, 0xC0BEBBC0, 0xBBC0BEBB,
+ 0xBDB5BCB9, 0xBFBEB9C0, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBFBABFC0, 0xBFBEB7BF,
+ 0xB7BFBEB7, 0xBAB7BEBB, 0xBFBAB6BD, 0xB7BEBBB9,
+ 0xBFB9BFBE, 0xC0C0B8C0, 0xBAC0BFB8, 0xBFBBC0BF,
+ 0xC0BEBCC1, 0xBBC0BEBB, 0xBCBBC1BC, 0xC0BEBBC1,
+ 0xBBC0BEBB, 0xBEBAC1BE, 0xC0BFBAC1, 0xBBC0BEBB,
+ 0xB9B8BBB9, 0x3E3EB8BB, 0x0000003E, 0x00000000,
+ 0x01000000, 0x00000000, 0x1B000001, 0x33491610,
+ 0x2D1C3D3F, 0x87402D54, 0x66A36E55, 0x8766A387,
+ 0x486F5381, 0x26433B25, 0x35283E38, 0x3C1A1125,
+ 0x1E352F29, 0x291C3C28, 0x8C56416E, 0x548C6E56,
+ 0x6149796F, 0x2F362743, 0x283F271B, 0x29193038,
+ 0x08080808, 0xB9B70808, 0xB8B9B7B8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xB9BFBABB, 0xBBB7BEBB, 0xBFBEB7BE,
+ 0xB9BFBEB9, 0xBBB7BEBB, 0xBDBBB7BE, 0xB9BEBCB8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BEB9B8, 0xB9B7BEBB,
+ 0xBEBBB7BE, 0xB9C0BDB7, 0xBFB8BDBB, 0xBFBEBBC0,
+ 0xB8BDBCBA, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBCB7BDBC, 0xBEBDB7BD, 0xB8BDBCB9, 0xBBB7BDBC,
+ 0xBBBCB6BC, 0xB6BCBBB6, 0xBCB7BDBC, 0xBDBCB7BD,
+ 0xB8BDBCB8, 0xBBB7BDBC, 0xBDBCB7BE, 0xB8BDBCB8,
+ 0xBBB7BCBB, 0xBCBBB7BC, 0xB6BBBAB7, 0xBCB6BCBB,
+ 0xBCBBB7BD, 0xB8BDBCB7, 0xB8B6BBB9, 0xBBBAB5BA,
+ 0xB6BBB9B6, 0xB8B8BCB7, 0xB8B8B9BD, 0xB5BAB9B6,
+ 0xB8B7BAB8, 0xBAB8B7BA, 0xB5BAB8B5, 0xB8B6BBB9,
+ 0xBAB8B5BA, 0xB4B9B7B5, 0xB7B5BBB6, 0xBCB7B6BC,
+ 0xB6BCB7B6, 0xB6B6BCB7, 0xBAB8B5BB, 0xB6BCB7B5,
+ 0xB5B5BCB5, 0xBCB5B5BC, 0xB5BBB6B5, 0xB7B3B8B6,
+ 0xBAB7B4B9, 0xB3BAB7B3, 0xB7B6BBB9, 0xB9B7B4B9,
+ 0xB3BAB7B4, 0xB8B4BBB8, 0xBAB9B4BB, 0xB5BAB9B4,
+ 0xB7B6BBB9, 0xBAB8B4B9, 0xB8BBB9B7, 0xB7B6BCB7,
+ 0xBCB7B6BC, 0xB8BCB7B8, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xBABDBBBA, 0xB7B9BDB8, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB9B8BBB9, 0xBBB9B6BB, 0xB6BBB9B8, 0xB9B6BBB9,
+ 0xBDBBB6BB, 0xB8BDBBB8, 0xB8B8BEB9, 0xBEB9B7BD,
+ 0xB7BDB8B8, 0xB7BABEB9, 0xBDB8B8BC, 0xBABEB9B9,
+ 0xB9BABEB9, 0xB7B2BABE, 0xB8BEB9B1, 0xB8B7BDB8,
+ 0xBCB7B7BD, 0xB7BDB8B6, 0xB9B7BDB8, 0xBDB8B7BE,
+ 0xB7BEB7B7, 0xB4B8BCB6, 0xBDB4B8BD, 0xB8BDB4B8,
+ 0x84A7ACA3, 0x9A94868A, 0xA7ABA596, 0xA3A7ACA3,
+ 0xADA3A5AD, 0xA5ADA3A5, 0x9DA8ACA1, 0xA498A5A9,
+ 0xA3A79CA0, 0x9D9FA59A, 0xA89DA2A8, 0xA2A89DA0,
+ 0x9BA2A69B, 0xA79CA2A6, 0x9CA396A3, 0x9B9FA699,
+ 0xA499A1A8, 0x9DA3989E, 0x929DA195, 0xA2939CA1,
+ 0x9DA2939D, 0x93999D91, 0x9D929A9E, 0x969A8F99,
+ 0x8691948B, 0x90858C8F, 0x888C818C, 0x79818278,
+ 0x837A8283, 0x5D5D5782, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x25232202, 0x36373836, 0x3D3B3738,
+ 0x3C3D3B3C, 0x40404040, 0x413F4142, 0x52535140,
+ 0xB7B0B4AF, 0xB9B4B8BC, 0xB5B9B4B5, 0xB9B7BAB8,
+ 0xBCB7B8BB, 0xB8BCB7B8, 0xB9B6BBB9, 0xBBB9B6BB,
+ 0xB4B9B7B6, 0xB9B8BEB9, 0xBDBBB8BE, 0xB9BEBCB8,
+ 0xB9BABFBD, 0xBDBBB8BE, 0xBDC0BEBA, 0xBBB8BDBB,
+ 0xBEBCB8BD, 0xB8BDBCB9, 0xBBB7BDBC, 0xBCBDB3BB,
+ 0xBAC0BFB7, 0xB4B6BDBA, 0xB7B2B0B7, 0xB6BBB9B1,
+ 0xBCB7BDBC, 0xBCBBB7BD, 0xB7BDBCB7, 0xBCB6BCBB,
+ 0xBCBBB7BD, 0xB4B9B7B6, 0xB9B3B8B6, 0xBBBAB6BB,
+ 0xB7BCBBB5, 0xBAB8BBB9, 0xBDBBB9BC, 0xBABDBBBA,
+ 0xB8B6BBB9, 0xBAB8B5BA, 0xB6B9B7B7, 0xB8B4B9B7,
+ 0xBCB7B5BA, 0xB6BAB5B8, 0xB6B5BBB6, 0xBCB7B5BB,
+ 0xB6BCB7B6, 0xB7B3BAB3, 0xBEB7B7BE, 0xB1B8B1B7,
+ 0xB5B4BBB4, 0xBDB8B5BC, 0xB8BCB7B9, 0xB5B5BCB5,
+ 0xBAB3B5BC, 0xB3BAB3B3, 0xB3B5BCB5, 0xB7B1B3BA,
+ 0xB3B7B1B3, 0xB2B3B7B2, 0xB9B4B3B7, 0xB5B9B4B5,
+ 0xB4B5B9B4, 0xB9B4B5B9, 0xB3B7B2B5, 0xB1B3B7B1,
+ 0xB7B2B3B7, 0xB8BCB7B3, 0x40909090, 0x40404040,
+ 0x40404040, 0x38383838, 0x39393838, 0x18181839,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x48474302, 0x828A8F86, 0x9488878D,
+ 0x90948990, 0x92949A8F, 0x9D94969B, 0x9BA09798,
+ 0x979FA398, 0xA3979FA3, 0x9EA2969F, 0x9B9EA598,
+ 0xA89BA1A8, 0x9FA79C9F, 0xA0A2AA9F, 0xAAA0A2AA,
+ 0xA0A89EA2, 0x9CA1A79C, 0xA79CA1A7, 0x9EA499A3,
+ 0x9D9EA499, 0xA89E9FA7, 0xA0A89DA0, 0xA0A0A89E,
+ 0xA99FA2AA, 0xA2A9A2A1, 0xA3A5AAA1, 0xA8A3A5A9,
+ 0xA5A9A4A4, 0xA6A8ACA7, 0xA2A0A7AB, 0x8B908E9D,
+ 0xBAABB0AF, 0xBBBAB6BB, 0xB5BAB9B6, 0xBBB6BCBB,
+ 0xBCBBB6BC, 0xB7BCBBB7, 0xBAB8BDBB, 0xBFBEB7BC,
+ 0xBABFBEBA, 0xBDB7BDBC, 0xBFBEB8BE, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xBBC0C1B9, 0xBEB8C0BF,
+ 0xBBBAB7BF, 0xBAC0BFB5, 0xC0B8C0C0, 0xC0BFB8C0,
+ 0xB9BFBEBA, 0xBFB8C0BF, 0xC0BFB8C0, 0xBAC0BFBA,
+ 0xBEB8BEBD, 0xC0C0B9BF, 0xB7BFBFB8, 0xBFB9BFBE,
+ 0xBFBFBAC0, 0xB8C0C0B7, 0xBFB8C0C0, 0xC0C0B7BF,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C1B8C0, 0xBABFC0BB,
+ 0xC0B7BFBF, 0xC0BFBABF, 0xB9BFBEBA, 0xC0B9C1C0,
+ 0xC1C0B9C1, 0xB5BDBCB9, 0xBBB0B8B8, 0xBCBCB1BB,
+ 0xB0B8B8B4, 0xC0ADB5B5, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBDB9BFBE, 0xC0BDB9C0, 0xB9C0BDB9, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xB9BFBEBA, 0xBEB7BDBC, 0xBFBEB7BF,
+ 0xBAC0BFB9, 0xBEBBC0BF, 0xBFBDBBC0, 0xBBC0BEBA,
+ 0xBFB7BEBB, 0xBEBDBBC2, 0xB9BFBEB8, 0xBDB9BFBE,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB7BF,
+ 0xB8C1BEB7, 0xBDBAC1BE, 0xC1BCB9C0, 0xB8BDBBBB,
+ 0xBFB9BFBE, 0xBFBFB8C0, 0xB9BFBEB7, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBCBBC1BC, 0xC0BEBBC1,
+ 0xBBC0BEBB, 0xBEBAC1BE, 0xC0BFBAC1, 0xBBC0BFBB,
+ 0xB9B8BBB9, 0x3E3EB8BB, 0x0000003E, 0x00000000,
+ 0x00000000, 0x00000000, 0x1B000003, 0x33491610,
+ 0x2D1D3C3F, 0x86402D54, 0x66A36E56, 0x8767A287,
+ 0x496D5381, 0x26433823, 0x35284038, 0x3B1A1125,
+ 0x20352E28, 0x2A1B3A29, 0x8356426D, 0x568C684E,
+ 0x60497670, 0x30362743, 0x253B281C, 0x281B3132,
+ 0x08080808, 0xB8B80808, 0xB8B9B7B8, 0xBBBCC0BB,
+ 0xC0BBBCC0, 0xBAC0BBBA, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBBB7BEBB, 0xBCBAB7BE, 0xB8BDBBB7,
+ 0xB8B8BEB9, 0xBEB9B7BD, 0xB8BFB8B8, 0xB8B8BEB9,
+ 0xBEB9B8BF, 0xB7BDB8B8, 0xBCB8BDBB, 0xBFBDB9BE,
+ 0xB8BDBBBA, 0xBDBABFBD, 0xC0BBBABF, 0xB7BDB8BA,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xBABFBDB8, 0xBBB8BFBC,
+ 0xBEBDB7BE, 0xB7BDBCB8, 0xBBB8BDBC, 0xBBB9B8BD,
+ 0xB6BBB9B6, 0xB7B8BDBB, 0xBCBAB6BC, 0xB8BBB9B9,
+ 0xB9B3B8B6, 0xBBB9B6BB, 0xB6BBB9B8, 0xBBB6BCBB,
+ 0xBCBBB6BC, 0xB7BCBBB7, 0xB7B7BAB8, 0xBBB9B6BC,
+ 0xB5BAB8B6, 0xB7B8BCB7, 0xBBBBB8BC, 0xB8BABAB9,
+ 0xB8B5BAB8, 0xB9B7B5BA, 0xB4B9B7B4, 0xB8B4B9B7,
+ 0xBAB8B5BA, 0xB4B9B7B5, 0xB8B2B9B6, 0xBBB8B4BB,
+ 0xB3BAB7B4, 0xB7B4BBB8, 0xBAB9B3BA, 0xB4BBB8B4,
+ 0xB5B6BCB7, 0xBDB6B5BC, 0xB2BAB3B5, 0xB7B5BBB6,
+ 0xBAB5B6BC, 0xB5BBB6B4, 0xB4B5B9B4, 0xB9B4B5B9,
+ 0xB3B8B6B5, 0xB7B3BAB7, 0xBBBAB1BA, 0xB3B9B8B3,
+ 0xB4B6BBB9, 0xB7B5B3B9, 0xADB2B0B2, 0xB7B3B8B6,
+ 0xBAB8B4B9, 0xB7BAB8B7, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xB7B6BCB7, 0xBAB8B6BC, 0xB8BBB9B7,
+ 0xB8B4B9B8, 0xB9B8B3B9, 0xB4B9B8B4, 0xB9B3B8B6,
+ 0xBBB9B6BB, 0xB6BBB9B6, 0xBAB7BCBA, 0xBDB8B7BC,
+ 0xB7BDB8B7, 0xBAB9BFBA, 0xBFBAB9BF, 0xB9BFBAB9,
+ 0xB8B8BCB7, 0xB8B3B9BD, 0xB8BCB7B4, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB6BCB7B8, 0xB8B7BDB8, 0xBDB8B7BD,
+ 0xB7BEB7B7, 0xB7B9C0B9, 0xC0B9B9C1, 0xB4BBB4B9,
+ 0x939DA49D, 0xA29C939A, 0xA8ACA69E, 0xA6A9B0A9,
+ 0xAEA4A5AD, 0xA3ACA2A5, 0x96A0A89D, 0xA69B9BA1,
+ 0xA8ACA1A2, 0x9DA1A79C, 0xA89CA0A8, 0x9EA79D9E,
+ 0x9CA1A69D, 0xA79CA1A7, 0x9DA398A1, 0x989DA398,
+ 0xA1969BA3, 0x9DA3989B, 0x949EA598, 0xA0919CA3,
+ 0x9DA49599, 0x939DA195, 0x9F939B9F, 0x989C919B,
+ 0x8B91948B, 0x90859194, 0x888C818C, 0x7288897F,
+ 0x7C737B7C, 0x60605A7B, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x2A282702, 0x32393834, 0x3A363638,
+ 0x40413D39, 0x41424341, 0x43414243, 0x58595742,
+ 0xB7B2B3AF, 0xBCB7BABB, 0xB8BBB9B8, 0xB7B6BCB7,
+ 0xBCB7B6BC, 0xB8BCB7B8, 0xB9B8BBB9, 0xBCB7B8BB,
+ 0xB7BBB6B8, 0xB9B8BEB9, 0xBDBBB8BE, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xBABDBBBA, 0xB8B7BDB8,
+ 0xBEB9B7BD, 0xB8BDBBB8, 0xBBBBC2BF, 0xC0BFB6BC,
+ 0xB6BCBBBA, 0xA1A5AAA8, 0xABA69EA3, 0xB8BCB7A7,
+ 0xB9B6BBB9, 0xB6B4B6BB, 0xB1B6B4B3, 0xAEB0B7B4,
+ 0xABA8A8B1, 0xAAB1AEA2, 0xB0B0B5B3, 0xBCB9AFB5,
+ 0xB6BBB9B5, 0xB8B6B8B8, 0xB8B8B6B8, 0xB4B9B7B6,
+ 0xB8B8BCB7, 0xBCB8B9BD, 0xB5B9B4BB, 0xB7B8BCB7,
+ 0xBAB8B8BC, 0xB5B8B6B7, 0xB7B5BAB8, 0xBAB7B3BA,
+ 0xB2B9B6B3, 0xB2B1B7B2, 0xB9B4B1B7, 0xB3B7B2B5,
+ 0xB1B1B8B1, 0xB7B2B1B8, 0xB3B7B2B3, 0xB2B5BCB5,
+ 0xB8B3B2B9, 0xB2B8B3B2, 0xB4B5B9B3, 0xB9B4B6BA,
+ 0xB3B9B4B3, 0xB5B3BAB3, 0xBAB3B5BC, 0xB3BAB3B3,
+ 0xB4B4B8B3, 0xB8B6B5B9, 0xB4B8B3B5, 0xB1B3B7B1,
+ 0xB4AFB3B7, 0xB8BCB7B0, 0x40909292, 0x413F3E40,
+ 0x3E40403E, 0x39373737, 0x38383837, 0x18181838,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x51524E02, 0x8990938A, 0x94899094,
+ 0x8F938890, 0x99A0A499, 0xA59AA0A4, 0xA0A498A1,
+ 0x98A0A79A, 0xA798A0A7, 0xA0A79AA0, 0xA0A3AC9F,
+ 0xACA0A2AC, 0xA2ACA0A2, 0xA4A0A89D, 0xAFA4A9AF,
+ 0xA0A89DA7, 0x9E9DA59B, 0xA79EA0A8, 0x9EA39AA2,
+ 0x9E9CA39C, 0xA8A19DA5, 0xA0A99FA0, 0x9DA0A8A1,
+ 0xA79D9EA7, 0x9EA79D9E, 0xA4A3AAA3, 0xA8A1A4AB,
+ 0xA3A9A4A1, 0xA8A8ACA7, 0x9D9BA7AA, 0x8C8F8D9A,
+ 0xB0A3A8A7, 0xBAB8ACB1, 0xB6BBB9B5, 0xBDB9C0BD,
+ 0xBDBCB9C0, 0xB8BDBCB8, 0xBBB8BDBB, 0xBFBEB8BD,
+ 0xBABFBEBA, 0xBEB9BFBE, 0xC0BDB9BF, 0xB9C0BDB9,
+ 0xBBB5BDBC, 0xBCBBB4BC, 0xB5BDBCB4, 0xBFB8C0C0,
+ 0xBDBCB8C0, 0xB9BFBEB7, 0xC0B8C0C0, 0xBFBEB8C0,
+ 0xB9BFBEB9, 0xBFBBC1C0, 0xC0BFBAC0, 0xBBC0BFBB,
+ 0xBEB9BFBE, 0xBFBFB9BF, 0xB5BDBDB7, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB7BFBEB7, 0xBEB7BFBE, 0xC0BFB7BF,
+ 0xB9BFBEBA, 0xBFB8C0BF, 0xBFBEB8C0, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xB1B9B8B8, 0xB9ACB4B3, 0xBBB9B2BA,
+ 0xB0BBB9B0, 0xBBB0B8B8, 0xC0C0B3BB, 0xB8C0C0B8,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBFB9BFBE,
+ 0xC0BFBAC0, 0xB9BFBEBB, 0xBFB7BDBC, 0xBFC0BAC0,
+ 0xB9BFBEBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BDBCBA,
+ 0xBDB6BBB9, 0xBCBBBABF, 0xB8BDBCB7, 0xBAB8BDBB,
+ 0xBEBCB9BF, 0xB8BFBCB9, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBEB7BDBC, 0xBFBEB9BF, 0xB9BFBEB9, 0xBDBABFBD,
+ 0xBFBDBCBF, 0xBABFBDBA, 0xBEBBC0BE, 0xBFBDBBC0,
+ 0xBBC0BEBA, 0xBEBAC0BF, 0xBFBEB7BF, 0xBBC0BFB9,
+ 0xB9B8BBB9, 0x3E3EB8BB, 0x0000003C, 0x00000100,
+ 0x00000000, 0x00000100, 0x1A000003, 0x3246150F,
+ 0x2C1D393E, 0x7E3B294E, 0x629D6651, 0x82629D80,
+ 0x46664F7C, 0x23423321, 0x32253D32, 0x341A1125,
+ 0x1B312D23, 0x2E1E3D27, 0x7F563F6B, 0x4B80684D,
+ 0x5F457369, 0x31332440, 0x253D271B, 0x271A3232,
+ 0x08080808, 0xB8B80808, 0xB8B8B8B8, 0xBBBCBFBD,
+ 0xC0BBBCC0, 0xBAC0BBBA, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBDB9C0BD, 0xBEBCB9C0, 0xB8BDBBB9,
+ 0xB7B8BEB9, 0xBEB7B6BC, 0xB7BEB7B7, 0xB6B8BFB8,
+ 0xBDB6B6BD, 0xB7BDB8B6, 0xB9B5BBB6, 0xBDBBB6BB,
+ 0xB8BDBBB8, 0xBAB6BBB9, 0xBCB7B7BC, 0xB8BEB9B6,
+ 0xB9B8BDBB, 0xBDBBB6BB, 0xB8BDBBB8, 0xBCB7BEBB,
+ 0xBDBCB8BF, 0xB7BDBCB7, 0xBDB8BDBB, 0xBDBBBABF,
+ 0xB8BDBBB8, 0xB7B8BDBB, 0xBCB7B6BC, 0xB7BBB6B8,
+ 0xAEB6BBB9, 0xBBB9ABB0, 0xB6BBB9B8, 0xBCB8BDBC,
+ 0xBDBCB7BD, 0xB7BCBAB8, 0xB7B6BBB9, 0xBAB8B6BC,
+ 0xB4B9B7B5, 0xB7B8BCB7, 0xB7B7B6B9, 0xB9BBBBB5,
+ 0xB8B5BAB8, 0xBAB8B5BA, 0xB5BAB8B5, 0xB9B5BAB8,
+ 0xBBB9B6BB, 0xB5BAB8B6, 0xB9B4BBB8, 0xBAB7B5BC,
+ 0xB2BBB8B1, 0xB8B2BAB9, 0xBAB9B3B9, 0xB2B9B6B4,
+ 0xB6B3B9B4, 0xBAB3B6BD, 0xB5BDB6B2, 0xB6B5BCB5,
+ 0xBDB6B6BD, 0xB4BBB4B6, 0xB3B5B9B3, 0xB6B2B5B9,
+ 0xB3B7B2B5, 0xB6B2B9B6, 0xB9B8B0B9, 0xB2B9B6B3,
+ 0xB4B3B8B6, 0xB8B6B3B9, 0xB0B5B3B3, 0xB9B4B9B7,
+ 0xBBB9B6BB, 0xB8BBB9B8, 0xB9B8BCB7, 0xBEB9BABE,
+ 0xBABEB9BA, 0xB8B7BDB8, 0xBDBBB7BD, 0xB7BCBABA,
+ 0xB8B6BBB9, 0xB9B7B4BB, 0xB5BAB8B4, 0xB7B3B8B6,
+ 0xB9B7B4B9, 0xB5BAB8B4, 0xB9B6BBB9, 0xBCB7B6BB,
+ 0xB6BCB7B6, 0xB6B6BDB6, 0xBDB6B6BD, 0xB6BDB6B6,
+ 0xB6B8BCB7, 0xB9B4B7BB, 0xABAFAAB5, 0xB7B4B8B3,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB8B7BDB8, 0xBDB8B7BD,
+ 0xB7BEB7B7, 0xB2B4BBB4, 0xC0B9B4BC, 0xAAB1AAB9,
+ 0x94929994, 0xA39D9399, 0xA7ABA59F, 0xA6A6ACA7,
+ 0xAEA6A5AD, 0xA6AFA5A3, 0x9AA4ACA1, 0xA89D9FA5,
+ 0xA4A89DA4, 0x9DA2A99C, 0xA89CA1AA, 0x9EA79D9E,
+ 0x9B9FA79D, 0xA4999FA4, 0x9EA4999E, 0x999CA499,
+ 0xA3989CA4, 0x9EA4999D, 0x969DA497, 0xA7979EA5,
+ 0x98A2929D, 0x939DA293, 0x9F939B9F, 0x989C909B,
+ 0x8B969990, 0x958A9194, 0x8D918691, 0x7287887E,
+ 0x89807B7C, 0x60605A88, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x2A282702, 0x353C3C36, 0x3A363B3B,
+ 0x3C3D3939, 0x3F40443F, 0x43414044, 0x57585642,
+ 0xB7B2B3AF, 0xBCB7BABB, 0xB8BBB9B8, 0xB5B6BCB7,
+ 0xBCB7B4BA, 0xB8BCB7B8, 0xB9B8BBB9, 0xBCB7B8BB,
+ 0xB5B9B4B8, 0xB9B1B7B2, 0xBAB8B8BE, 0xB4B9B7B5,
+ 0xB6B4B9B7, 0xBDBBB5BB, 0xB8BEB9BA, 0xB8B7BDB8,
+ 0xBDB8B7BD, 0xB7BDB8B7, 0xB9B6BDBA, 0xBCBBB5BC,
+ 0xADB4B1B6, 0xA09EA3A1, 0xB5B09DA2, 0xB7BBB6B1,
+ 0xA6ADB1AC, 0xB1ADA7AB, 0xB3B7B2B0, 0xACAAB1AC,
+ 0xB7B4A8B2, 0xB0B7B4B0, 0xB7B6BCB7, 0xA8A6B6BC,
+ 0xB6BBB9A3, 0xB8B4B9B8, 0xB9B8B6B8, 0xB3B8B6B4,
+ 0xB3B5B9B4, 0xBBB5B5B9, 0xB4B8B3B9, 0xB6B8BCB7,
+ 0xBCBAB7BB, 0xB4B9B7B9, 0xB8B4B9B7, 0xBAB9B4BB,
+ 0xB5BAB8B4, 0xB4B3B9B4, 0xBBB7B5B9, 0xB4B8B3BA,
+ 0xAAB1B8B1, 0xA29DA9B1, 0xB3B7B29E, 0xB2B5BBB6,
+ 0xB8B3B2B9, 0xB2B8B3B2, 0xB3B3B7B1, 0xB9B4B5B9,
+ 0xB4BAB5B3, 0xB2B3BAB3, 0xBBB4B2B9, 0xB4BBB4B3,
+ 0xB4B4B8B3, 0xB8B6B5B9, 0xB4B7B5B5, 0xAEB3B7B2,
+ 0xB3AEB0B4, 0xB8BCB7AF, 0x40909391, 0x413F3E40,
+ 0x3E40403E, 0x39383838, 0x38383837, 0x18181838,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x01020000,
+ 0x00000301, 0x1B1C1A00, 0x2C34342E, 0x938A3435,
+ 0x93948A92, 0x9AA1A59A, 0xA499A1A5, 0xA0A499A0,
+ 0x9AA0A79A, 0xA89BA0A7, 0x9EA79AA1, 0xA0A1AB9F,
+ 0xAB9FA0AC, 0xA0ACA09F, 0x9D9FA79C, 0xA99EA2A8,
+ 0x9AA297A1, 0x9B9DA59B, 0xA49B9DA5, 0xA0A89E9F,
+ 0x9AA0A8A1, 0xA59E989F, 0xA0A8A19D, 0xA1A0A8A1,
+ 0xA89EA0A8, 0x9EA79D9F, 0xA3A1A8A1, 0xABA4A3AA,
+ 0xA3A9A4A4, 0xA9A6A9A7, 0xA9A7A8AB, 0x999C9AA6,
+ 0xAF989D9C, 0xBBB9ACB1, 0xB6BBB9B6, 0xB9B6BDB8,
+ 0xBFBEB7BE, 0xBABFBEBA, 0xBAB8BDBB, 0xBFBEB7BC,
+ 0xB9BFBEBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xB5BDBCB8, 0xBFB6BEBE,
+ 0xBFBEB7BF, 0xB9BFBEB9, 0xC0B8C0BF, 0xC0BFB9C1,
+ 0xB9BFBEBA, 0xBFBAC0BF, 0xC0BEBAC0, 0xBBC0BEBB,
+ 0xBEBAC0BF, 0xC0C0B9BF, 0xB7BFBFB8, 0xBEB9BFBE,
+ 0xBDBCB9BF, 0xB7BFBEB5, 0xBEB7BFBE, 0xBFBEB7BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB7BF, 0xB9BFBEB9,
+ 0xBFB9BFBE, 0xBFBEBAC0, 0xB9BFBEB9, 0xC0B8C0C0,
+ 0xC1C0B8C0, 0xB2B8B7BB, 0xB4A6AEAD, 0xBBB9ADB5,
+ 0xB0BBB9B0, 0xBDB0B8B8, 0xC0C0B5BD, 0xB9C1C1B8,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBFB9BFBE,
+ 0xC0BFBAC0, 0xBABFBEBB, 0xBEB9BFBE, 0xC0C1B9BF,
+ 0xB9BEBFBB, 0xBDB9BFBE, 0xBFBEB8BE, 0xB8BDBCBA,
+ 0xBEB6BBB9, 0xBFBEBBC0, 0xBABFBEBA, 0xBAB9BEBC,
+ 0xBEB9B9BF, 0xB9BFBAB8, 0xBAB8BFBA, 0xBFBAB8BF,
+ 0xB8BFBAB8, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBEB8BEBD, 0xBEBDB9BF, 0xB9BEBDB8, 0xBDBABFBD,
+ 0xBFBDBCBF, 0xBABFBDBA, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBAC1BEBB, 0xBEBAC0BF, 0xBFBEB7BF, 0xB9C0BDB9,
+ 0xB8B8BBB9, 0x3E3EB9BD, 0x0000003C, 0x00000100,
+ 0x00000000, 0x00000100, 0x19010004, 0x33451510,
+ 0x2B1C373F, 0x7E3A2A4C, 0x639B6651, 0x80639B80,
+ 0x4667507D, 0x23423221, 0x30253F32, 0x341B1024,
+ 0x1B312D23, 0x27183428, 0x7E56406A, 0x4D7F684E,
+ 0x583F6B6A, 0x2D332541, 0x263D2118, 0x251B3230,
+ 0x08080808, 0xB8B80808, 0xB8B8B8B8, 0xBDBCBFBD,
+ 0xC0BBBABF, 0xBAC0BBBA, 0xBBB9BEBC, 0xBFBDB8BD,
+ 0xB9BEBCBA, 0xBDB9C0BD, 0xBCBBB9C0, 0xB8BDBBB7,
+ 0xB9B8BEB9, 0xBDB8B8BE, 0xB8BEB9B7, 0xB9B7BEB7,
+ 0xBEB9B9C0, 0xB7BDB8B8, 0xB7B6BCB7, 0xBBB9B6BC,
+ 0xB9BEBCB6, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xB9B8BDBB, 0xBDBCB6BB, 0xB6BBBAB8, 0xBCB6BDBA,
+ 0xBDBCB8BF, 0xB7BDBCB7, 0xBBB7BCBA, 0xBDBCB8BD,
+ 0xB8BDBBB8, 0xBBB7BCBA, 0xBBB9B8BD, 0xB8BBB9B8,
+ 0xAFB7BDB8, 0xBDB8AEB4, 0xB6BBB9B9, 0xBAB7BCBB,
+ 0xBCBBB5BB, 0xB7BCBAB7, 0xB6B5BAB8, 0xBBB8B4BB,
+ 0xB5BAB8B4, 0xB6B6BBB9, 0xB6B5B3B8, 0xB6BBBAB1,
+ 0xB7B5BAB8, 0xBCB7B6BC, 0xB8BCB7B8, 0xB6B8BCB7,
+ 0xBBB6B7BB, 0xB4BAB5B5, 0xB8B6BDB8, 0xBDB8B6BD,
+ 0xB6BDB8B6, 0xB8B4BBB8, 0xBAB8B5BA, 0xB5BAB8B5,
+ 0xB2B5BBB6, 0xBCB5B2B9, 0xB6BDB6B5, 0xB5B6BDB6,
+ 0xBBB4B5BC, 0xB4BBB4B4, 0xB4B5B9B4, 0xB9B4B5B9,
+ 0xB5B9B4B5, 0xB7B4B9B7, 0xBBB9B3BA, 0xB5BAB8B6,
+ 0xB9B6BBB9, 0xBCB7B6BB, 0xB6BCB7B6, 0xB7B6BCB7,
+ 0xBCB7B6BC, 0xB8BCB7B8, 0xB8B8BCB7, 0xBDBBB9BD,
+ 0xBABDBBBA, 0xB8B7BDB8, 0xBDB8B7BD, 0xB7BDB8B7,
+ 0xB7B6BCB7, 0xBBB6B6BC, 0xB6BBB9B7, 0xB8B5BAB8,
+ 0xBAB9B5BA, 0xB6BBBAB5, 0xBAB6BBBA, 0xBEB9B7BC,
+ 0xB9BDB7BA, 0xB2B8BDB4, 0xBCB1B6BB, 0xB6BBB2B6,
+ 0xB4B9BDB7, 0xB2ADB3B9, 0xA9AFAAAC, 0xB7B4B8B3,
+ 0xBCB7B8BC, 0xB9BDB8B8, 0xB8B9BDB8, 0xBDB8B9BD,
+ 0xB9BDB7B9, 0xB2B7BBB5, 0xBFB9B6BB, 0xA9B0A9BB,
+ 0x93889089, 0xACA7939A, 0xA8ACA7A8, 0xA7A6ACA7,
+ 0xABA4A6AE, 0xA3ACA2A3, 0xA1A4ACA1, 0xA89CA7AE,
+ 0xA9ADA1A4, 0x9CA6AB9C, 0xA99CA4AB, 0x9FA79CA2,
+ 0x9B9DA59B, 0xA79D9DA5, 0x9CA49A9F, 0x9B9CA499,
+ 0xA4999EA6, 0x9EA4999E, 0x949DA497, 0xA6969CA3,
+ 0x98A2929C, 0x939DA293, 0x9F939DA2, 0x989C909B,
+ 0x9097988F, 0x93899899, 0x8E8F8592, 0x81888980,
+ 0x8681898A, 0x605F5B89, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x28282800, 0x353B3B35, 0x3D393B3B,
+ 0x40413F3C, 0x3F40443F, 0x43414044, 0x58595742,
+ 0xB8AEAFAB, 0xBCB7BBBC, 0xB8BCB7B8, 0xB9B5BAB8,
+ 0xBBB6B6BB, 0xB8BCB7B7, 0xB8B8BCB7, 0xB9B4B9BD,
+ 0xB3B7B2B5, 0xB1B1B8B1, 0xBDBBB0B6, 0xBABDBBB8,
+ 0xB8B5BBB6, 0xBBB6B8BF, 0xB5BCB5B5, 0xB7B7BEB7,
+ 0xBEB9B5BC, 0xB8BDBBB8, 0xBBB5BBBA, 0xB8B6B6BC,
+ 0xB7BCBAB3, 0xAFB8BBB9, 0xBBB7B0B4, 0xB9BDB8BA,
+ 0xA6A8ACA6, 0xB1ABA6AD, 0xADB1ABAD, 0xB7ABB1AC,
+ 0xBCBAB5BC, 0xB7BCBAB7, 0xB7B7BBB6, 0xAFADB8BC,
+ 0xB6BBB9AA, 0xB7BCC1BF, 0xB9B8B4B9, 0xB5BAB8B4,
+ 0xB7B5B9B4, 0xBDB8B8BC, 0xB2B6B1B9, 0xB7B8BCB7,
+ 0xB8B6B6BC, 0xAAAFADB3, 0xB7B5BAB8, 0xBBB9B4B9,
+ 0xB7BAB8B6, 0xB8B7BBB6, 0xBBB7B9BD, 0xB5B9B4BA,
+ 0xAAB1B8B1, 0xA29DA9B1, 0xACB0AB9E, 0xB2B9BFBA,
+ 0xB8B3B2B9, 0xB3B9B4B2, 0xB3B4B8B2, 0xB9B4B5B9,
+ 0xB5B9B4B5, 0xB6B2B9B2, 0xBCB5B6BD, 0xB1B8B1B5,
+ 0xB8B3B7B2, 0xB8B8B7BA, 0xB6B9B7B6, 0xB2B5B9B4,
+ 0xB8B3B3B7, 0xB5B9B4B4, 0x3F909391, 0x40403E41,
+ 0x40404040, 0x37383838, 0x38383737, 0x18181838,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x02000000, 0x00070400, 0x04000805,
+ 0x07040007, 0x31393933, 0x3930373A, 0x6B706734,
+ 0x9CA2A59C, 0xA69BA2A5, 0xA0A69BA2, 0xA0A2ACA0,
+ 0xAC9EA0AC, 0xA0AD9F9D, 0x9C9BA497, 0xA99CA0A9,
+ 0x9BA398A0, 0x9A9CA59B, 0xA49A9BA4, 0x9DA59B9C,
+ 0x9C9EA69F, 0xA49D99A4, 0x9DA59E9C, 0x9D9FA79D,
+ 0xA99F9FA7, 0xA2AAA0A1, 0xA1A2AAA0, 0xA9A2A3AB,
+ 0xA6ACA7A2, 0xA9A7AAA8, 0xA9A9A7A9, 0xA7A9A9A7,
+ 0xB8A5A8A6, 0xBBB9B7BA, 0xB6BCB7B8, 0xBBBAC1BC,
+ 0xBEBDB9C0, 0xB8BEBDB8, 0xBBB7BEBB, 0xBFBEB7BE,
+ 0xB9BEBFB9, 0xBFBABFC0, 0xBEBFB7BF, 0xB9BEBFB9,
+ 0xC0B8C0C0, 0xC1C1B8C0, 0xB8C0C0B9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB7BFBEB7, 0xBDB7BDBC, 0xBFBEB8BE,
+ 0xBAC0BFB9, 0xC0BBC0BF, 0xC0BFBCC1, 0xBBC0BFBB,
+ 0xBEB9BFBE, 0xC0BFB9BF, 0xB9BFBEBA, 0xBFB9BFBE,
+ 0xBDBCBAC0, 0xBAC0BFB7, 0xBDB8BFBC, 0xBFBEB9C0,
+ 0xB9BFBEBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBDB7C0BD, 0xBDBCB9C0, 0xB7BDBCB7, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xADB3B2BA, 0xB3A6AEAD, 0xB4B3AAB5,
+ 0xA7AFAEAC, 0xBFB3BBBA, 0xBBBBB8C0, 0xB4BCBCB3,
+ 0xBDB9BFBE, 0xC0BDB9C0, 0xB9C0BDB9, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBCB9C0BD, 0xBFBEB8BF,
+ 0xBBC0BFBA, 0xBEB8BEBD, 0xBFBEB9BF, 0xB7BDBCB9,
+ 0xBFB7BDBC, 0xBEBFBAC0, 0xBAC0BFB9, 0xBCB8BFBC,
+ 0xBFBCB8BF, 0xB8BFBCB8, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBCB7BDBC, 0xBDBBB7BD, 0xB8BDBBB8,
+ 0xBDB8BDBB, 0xBFBEBABF, 0xBABFBEBA, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBEBBC0BE, 0xC0BFBBC0,
+ 0xBAC0BFBA, 0xBFB9BFBE, 0xBFBEBAC0, 0xB7BEBBB9,
+ 0xB6B8BBB9, 0x3E3EB7BB, 0x0000003C, 0x00000000,
+ 0x00000000, 0x00000100, 0x19000003, 0x33441510,
+ 0x2B1D353D, 0x7F3A2A4C, 0x639B6652, 0x80639B7E,
+ 0x46664F7C, 0x23423221, 0x2F243E32, 0x341C1125,
+ 0x1C302D23, 0x28193428, 0x724E395F, 0x46745F46,
+ 0x57416B60, 0x2B32253F, 0x22372017, 0x241B302B,
+ 0x08080808, 0xB8B80808, 0xB8B8B8B8, 0xBBBCBFBD,
+ 0xC0BBBAC0, 0xBAC0BBBA, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB9BEBCB8, 0xBBB9BEBC, 0xBDBCB7BE, 0xB8BDBBB8,
+ 0xB9B9BFBA, 0xBDB8B8BE, 0xB8BEB9B7, 0xB9B8BEB9,
+ 0xBEB9B8BE, 0xB6BCB7B8, 0xB8B6BCB7, 0xBDBBB7BD,
+ 0xB8BDBBB8, 0xBBB9BEBC, 0xBDBBB8BD, 0xB7BCBAB8,
+ 0xBBB8BDBB, 0xBDBCB8BD, 0xB7BCBBB8, 0xBBB7BEBB,
+ 0xBDBCB7BE, 0xB7BDBCB7, 0xBBB9BEBC, 0xBDBCB8BD,
+ 0xB8BDBCB8, 0xBBB8BDBB, 0xBDBBB8BD, 0xB9BCBABA,
+ 0xB7B6BBB9, 0xB8B6B6BC, 0xB4B9B7B5, 0xBBB8BDBC,
+ 0xBCBBB6BC, 0xB7BCBBB7, 0xB5B4B9B7, 0xBBB8B3BA,
+ 0xB4BBB8B4, 0xB6B4B9B7, 0xB9B7B3B8, 0xB7BCBAB4,
+ 0xB7B6BCB7, 0xBCB7B6BC, 0xB8BCB7B8, 0xB5B6BAB5,
+ 0xBBB6B6BA, 0xB6BCB7B5, 0xB8B8BEB9, 0xBBB6B6BD,
+ 0xB6BDB8B4, 0xB9B6BBB9, 0xBBB9B6BB, 0xB8BBB9B8,
+ 0xB4B6BCB7, 0xB9B4B3B9, 0xB6BCB7B3, 0xB3B5BBB6,
+ 0xB9B4B2B8, 0xB2B8B3B3, 0xB5B3B9B4, 0xB7B5B4BA,
+ 0xB3B8B6B2, 0xB7B4B9B7, 0xB9B7B4B9, 0xB4B9B7B4,
+ 0xB6B3B8B6, 0xB9B4B3B8, 0xB6BCB7B3, 0xB6B5BBB6,
+ 0xBCB7B5BB, 0xB8BCB7B8, 0xB7B8BCB7, 0xBDBBB8BC,
+ 0xB9BCBABA, 0xB8B9BDB8, 0xBCB7B7BD, 0xB7BDB8B6,
+ 0xB6B5BBB6, 0xBCB7B6BD, 0xB6BCB7B8, 0xB8B6BCB7,
+ 0xBAB8B5BA, 0xB5BAB8B5, 0xB7B6BBBA, 0xBBB9B6B9,
+ 0xB9BDB8B8, 0xB4B8BDB4, 0xBFB4B8BD, 0xB8BDB4B9,
+ 0xB3B8BCB6, 0xB8B3B2B8, 0xB6BCB7B2, 0xAAB4B8B3,
+ 0xBCB7ABAF, 0xB8BCB7B8, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB9BDB8B8, 0xB2B6BAB4, 0xBFB9B6BB, 0xACB0AABB,
+ 0x88899089, 0xACA7888F, 0xA8ACA7A8, 0xA4A7AEA7,
+ 0xACA2A3AB, 0xA4ACA2A3, 0x9CA2A89D, 0xACA0A2A9,
+ 0xA8ACA0A8, 0x9AA4A99A, 0xA99CA4A9, 0xA2A99CA2,
+ 0x9E9FA79C, 0xA89EA0A8, 0x9CA499A0, 0x9B9BA398,
+ 0xA69BA0A6, 0x9EA499A0, 0x969CA396, 0xA1949CA3,
+ 0x9AA1929A, 0x969CA192, 0xA2969EA2, 0x989C919E,
+ 0x8F94958C, 0x958B9798, 0x8E8F8594, 0x7F888980,
+ 0x87828788, 0x605F5B8A, 0x00020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x28282800, 0x353B3A36, 0x3C3A3B3B,
+ 0x40413F3B, 0x41404341, 0x42404043, 0x58595741,
+ 0xB7B2B3AF, 0xBDB8BABB, 0xB8BCB7B9, 0xB8B5BAB8,
+ 0xBCB7B5BA, 0xB8BCB7B8, 0xAEB5B9B4, 0xB7B2AFB3,
+ 0xB0B6B1B3, 0xB2B1B7B2, 0xBAB8B0B7, 0xBABDBBB7,
+ 0xB4B5BBB6, 0xBCB5B4BB, 0xB5BCB5B5, 0xB8B7BEB7,
+ 0xBEB9B7BF, 0xB8BDBBB8, 0xBAB6BDBA, 0xB8B6B6BD,
+ 0xB8BDBBB3, 0xB8B8BCB7, 0xBCB7B9BD, 0xB8BCB7B8,
+ 0xB6B6BCB7, 0xBDB7B6BD, 0xB1B8B1B9, 0xB7B7BDB8,
+ 0xBBB9B6BC, 0xB6BBB9B6, 0xB7B9BDB8, 0xBBB9B8BC,
+ 0xB0B5B3B6, 0xB7A5AAA8, 0xB8B7B4B9, 0xB4B9B7B3,
+ 0xB4B3B8B6, 0xB8B6B5B9, 0xB5B8B6B5, 0xB7B6BCB7,
+ 0xBBB9B6BC, 0xB6BBB9B6, 0xB8B5BAB8, 0xBAB8B5BA,
+ 0xB5BAB8B5, 0xB8B6BCB7, 0xBCB7B7BD, 0xB5B9B4B8,
+ 0xB2B1B8B1, 0xA8A6B2B9, 0xACAFADA5, 0xB6B9BFBA,
+ 0xB8B3B5BB, 0xB3B9B4B2, 0xB3B8BCB7, 0xB8B6B4B8,
+ 0xB4B7B5B5, 0xB3B3B9B4, 0xBAB3B3BA, 0xB5B9B4B3,
+ 0xB7B6BAB5, 0xB9B7B6B9, 0xB4B7B5B6, 0xAFB4B8B3,
+ 0xB7B2B0B4, 0xB8BCB7B3, 0x3F8F9290, 0x3F3F3E41,
+ 0x4040403F, 0x38383838, 0x38383838, 0x17171738,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x02000000, 0x00070302, 0x03020704,
+ 0x07040007, 0x00030400, 0x04000203, 0x00040000,
+ 0x0B0E0F0B, 0x413B0E0F, 0x3C403A3F, 0x85515851,
+ 0x9086868F, 0xA2ACA087, 0xA9ACB4A9, 0xAEA3ACB4,
+ 0xA0A89DA8, 0x9BA2AAA0, 0xA39A9DA5, 0x9DA59B9E,
+ 0x9D9DA59B, 0xA59B9EA7, 0x9BA3999C, 0xA09EA69C,
+ 0xA99FA2AA, 0xA1A99FA1, 0xA3A2AAA0, 0xA8A1A3AA,
+ 0xA3A9A4A1, 0xA9A7AAA8, 0xA9A9A7A9, 0xB5B8B6A7,
+ 0xB9B8BBB9, 0xBBB6B8BB, 0xB8BCB7B7, 0xBAB8BEB9,
+ 0xC0BFB6BD, 0xB7BDBCBA, 0xBBB7BEBB, 0xBFBEB7BE,
+ 0xB9BEBFB9, 0xC0B7BFBF, 0xBFC0B8C0, 0xBABFC0BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB5BDBDB8, 0xBEB9BFBE,
+ 0xC0BFB9BF, 0xB8C0BFB8, 0xBCB9BFBE, 0xBEBDB8BF,
+ 0xB9BFBEB8, 0xBFBBC0BF, 0xC0BFBBC0, 0xBCC1C0BB,
+ 0xBFB9BFBE, 0xBFBEBAC0, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xBAC0BFB8, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xBABFBEBA, 0xBEB9BFBE, 0xBEBDB9BF, 0xB9BFBEB8,
+ 0xBCB9C0BD, 0xC0BFB8BF, 0xB8BEBDBB, 0xC0B8C0C0,
+ 0xC0BFB8C0, 0xA4AAA9BA, 0xB3A0A8A7, 0xB5B4AAB5,
+ 0xACB4B3AD, 0xBCB5BDBC, 0xBCBCB5BD, 0xB4BCBBB4,
+ 0xBDB9BFBE, 0xC0BDB9C0, 0xB9C0BDB9, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBDB9C0BD, 0xBEBDB9C0,
+ 0xBBC0BFB9, 0xBEBAC0BF, 0xC1C0B9BF, 0xB7BDBCBB,
+ 0xBEB7BDBC, 0xBDBEB9BF, 0xB9BFBEB8, 0xBCB8BFBC,
+ 0xBFBCB8BF, 0xB8BFBCB8, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB7BEBBB8, 0xBBB7BDBC, 0xBDBBB7BE, 0xB8BDBBB8,
+ 0xBDB6BBB9, 0xC0BFBABF, 0xBABFBEBB, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBEBBC0BE, 0xC0BFBBC0,
+ 0xBAC0BFBA, 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BDBBB9,
+ 0xB8B7BBB6, 0x3E3EB9BD, 0x0000003C, 0x00000000,
+ 0x00000000, 0x00000000, 0x19000003, 0x33431510,
+ 0x2A1D353D, 0x7D382B4B, 0x63996552, 0x7E649A7D,
+ 0x4364507A, 0x24403322, 0x30263D32, 0x2E1B1024,
+ 0x172B271D, 0x281A3223, 0x714C3B5D, 0x46725D47,
+ 0x5341665D, 0x2B2C1F39, 0x21352017, 0x20172B2A,
+ 0x07080907, 0xB8B80809, 0xB8B8B8B8, 0xBABBBEBC,
+ 0xBFBABBBF, 0xBBBFB9BB, 0xB9BBBFBA, 0xC0BBBABE,
+ 0xB9BFBABC, 0xBDB9BEBC, 0xBDBBBABF, 0xBABFBDB8,
+ 0xB9B8BEB9, 0xBDBBB8BE, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xB8B6BCB7, 0xBFBAB7BD,
+ 0xB8BEB9B9, 0xBBB8BDBB, 0xBDBCB8BD, 0xB8BDBCB8,
+ 0xBBB7BCBA, 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB8BFBC,
+ 0xBEBDB7BE, 0xB7BDBCB8, 0xBDB9BEBC, 0xBDBBBABF,
+ 0xBABFBDB8, 0xBBB8BDBB, 0xBEBCB8BD, 0xB8BDBBB9,
+ 0xB9B8BBB9, 0xB8B7B8BB, 0xB4B9B8B3, 0xBCB8BDBC,
+ 0xBDBCB8BD, 0xB8BDBCB8, 0xB6B3B8B6, 0xBCBAB3B8,
+ 0xB7BCBAB7, 0xB7B8BCB7, 0xBCB7B8BC, 0xB7BBB6B8,
+ 0xB6B9BDB8, 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB6BCB7B8, 0xB7B6BCB7, 0xBBB6B6BC,
+ 0xB6BCB7B5, 0xB8B6BBB9, 0xBAB9B5BA, 0xB5BAB9B5,
+ 0xB7B4B9B7, 0xB8B6B4B9, 0xB5BAB8B3, 0xB9B4BBB8,
+ 0xBAB8B5BC, 0xB5BAB8B5, 0xB8B4B9B7, 0xBAB9B4BB,
+ 0xB3BAB7B4, 0xB2B1B6B4, 0xB8B3B3B7, 0xB3B9B4B4,
+ 0xB9B3B8B6, 0xBBB6B5BC, 0xB4BAB5B5, 0xB8B5BAB8,
+ 0xBAB8B5BA, 0xB6BBB9B5, 0xB7B6BCB7, 0xBDBBB8BC,
+ 0xBABDBBBA, 0xB8B9BDB8, 0xBCBAB9BD, 0xB7BDB8B7,
+ 0xB8B6BCB7, 0xBEB9B6BD, 0xB7BDB8B8, 0xB6B6BCB7,
+ 0xBBB6B5BB, 0xB6BAB5B7, 0xB1B8BBB9, 0xB3B1B0B3,
+ 0xB8BCB7B0, 0xB7B8BEB9, 0xBEB7B7BE, 0xB7BEB7B7,
+ 0xB3B9BDB8, 0xB6B4B4B8, 0xB3B6B4B3, 0xA7B4B8B3,
+ 0xBCB7A8AC, 0xB8BCB7B8, 0xB8B8BCB7, 0xB8B3B9BD,
+ 0xB1B7B2B2, 0xB5B4BBB4, 0xBBB5B5BC, 0xB5B9B3B7,
+ 0x9093988F, 0xB0A99499, 0xA9B0A9A9, 0xA2A4ACA2,
+ 0xACA2A4AC, 0xA4ACA2A4, 0xA0A4A9A0, 0xA99EA7AB,
+ 0xA5AC9FA3, 0x9DA5A99D, 0xA79BA5A9, 0xA1A89BA3,
+ 0x9AA2A89D, 0xA79C9FA5, 0x9FA59AA1, 0x999AA095,
+ 0xA5999FA6, 0xA1A599A1, 0x979FA398, 0xA3979FA3,
+ 0x9FA3979F, 0x94A0A498, 0x9F959CA0, 0x97988F9E,
+ 0x8F96978E, 0x978D9798, 0x92938996, 0x89909188,
+ 0x8F8A9192, 0x5E5D5992, 0x00020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x28282800, 0x373A3B37, 0x3F3F3A3B,
+ 0x4444443F, 0x47484848, 0x49474849, 0x5A5B5948,
+ 0xB7B1B5B0, 0xBCB7B8BC, 0xB5B9B4B8, 0xB9B6B9B7,
+ 0xBBB9B8BB, 0xB8BBB9B8, 0xB2B3B7B2, 0xB7B2B3B7,
+ 0xB2B8B3B3, 0xB8B3B9B4, 0xBCBAB4BB, 0xB7BAB8B9,
+ 0xB8B8BCB7, 0xBCB6B9BD, 0xB8BFB8B8, 0xB8B9C0B9,
+ 0xBEB9B8BF, 0xB7BDB8B8, 0xB6B5BCB7, 0xBCB7B4BB,
+ 0xB6BCB7B6, 0xB8B7BDB8, 0xBDBBB7BD, 0xB7BDB8B8,
+ 0xB9B7BDB8, 0xBEB9B8BE, 0xB8BEB9B8, 0xBAB6BBB9,
+ 0xBCBBB6BD, 0xB4BBB8B6, 0xB5B4BBB6, 0xB3B0B4BA,
+ 0xADB2B0AC, 0xB9A3A8A6, 0xBCBAB8BB, 0xB0B5B3B9,
+ 0xB0B3B8B6, 0xB3AEADB2, 0xB3B9B4AD, 0xB9B6BBB9,
+ 0xBCB7B6BB, 0xB6BCB7B8, 0xB8B5BBB6, 0xBBB8B4BB,
+ 0xB4BBB8B4, 0xB5B4BBB6, 0xB9B7B3BA, 0xB3B8B6B4,
+ 0xB3B0B5B3, 0xA8A6B0B5, 0xB1B4B2A5, 0xB6B7BCBA,
+ 0xB8B6B2B9, 0xB2B8B3B3, 0xB5B5B9B4, 0xB6B4B6BA,
+ 0xB3B6B4B3, 0xB2B3B7B2, 0xB7B2B3B7, 0xB3B7B2B3,
+ 0xB4B3B7B2, 0xB9B4B5B9, 0xB5B9B4B5, 0xB0B3B9B4,
+ 0xB1ACAFB5, 0xB6BCB7AB, 0x47929893, 0x48484449,
+ 0x48484846, 0x38383B39, 0x3A38373A, 0x191A1839,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000101, 0x00010000, 0x01000000,
+ 0x00000101, 0x00000000, 0x00020000, 0x00000200,
+ 0x02000002, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x01000000, 0x00010000, 0x0B000100,
+ 0x02000A0D, 0x24282300, 0x2D626660, 0x685F2F33,
+ 0x94999065, 0xA4A6ABA2, 0xAAA4A6AA, 0xA8ABA2A8,
+ 0x99A0A499, 0xA59A9EA4, 0x9DA59A9F, 0x9FA1A99F,
+ 0xA8A1A0A9, 0xA0A8A1A0, 0xA7A6ADA6, 0xACA7A6AC,
+ 0xA8ACA7A8, 0xACA5A8A6, 0xAEACABAE, 0xADB3AEA9,
+ 0xB9B9BFBA, 0xBBB9B8BE, 0xBABDBBB8, 0xBBB8BDBB,
+ 0xBDBCB8BD, 0xB9BEBDB8, 0xBCB8BDBB, 0xBFBEB9BE,
+ 0xB9BFBEB9, 0xC0B8C0C0, 0xC0C0B6C0, 0xB8C0C0B8,
+ 0xBEB9BFBE, 0xBFBFB9BF, 0xB7BFBFB7, 0xC0B9BFBE,
+ 0xBFBFBBC1, 0xB8C0BFB7, 0xBEBAC0BF, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xBBC0BFBA,
+ 0xBFBBC1C0, 0xBFBEBAC0, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBCBAB9BF, 0xBABFBDB7, 0xBDBAC1BE, 0xBFBEB9C0,
+ 0xBABFBEBA, 0xBFB9BFBE, 0xBEBDBAC0, 0xB9BFBEB9,
+ 0xBCB8BFBC, 0xBEBCB8BF, 0xB7BDBCB9, 0xC0B7BFBF,
+ 0xB2B1B8C0, 0xA5ABAAAC, 0xB0A9B1B1, 0xB5B4A8B0,
+ 0xB3BBBAAD, 0xBCBAC0BF, 0xBEBDB7BD, 0xB9BFBEB8,
+ 0xBEB9BFBE, 0xC0BDB9BF, 0xB9C0BDB9, 0xBDBABFBD,
+ 0xBFBDBABF, 0xBABFBDBA, 0xBFB9BFBE, 0xBDBCBAC0,
+ 0xBABFBEB8, 0xBFB9BFBE, 0xBFBEBAC0, 0xB6BBBABA,
+ 0xBDB7BEBB, 0xBFBEB9C0, 0xBBC0BFBA, 0xBCB8BFBC,
+ 0xBFBCB8BF, 0xB8BFBCB8, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBBB8BDBB, 0xBDB8B8BD, 0xB6BCB7B9,
+ 0xB9B6BCB7, 0xBDBBB7BE, 0xB8BDBBB8, 0xBDB8BFBC,
+ 0xBFBEB9C0, 0xB9BEBDBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xBAC0BFB9, 0xBEBABFBE, 0xBFBDBABF, 0xBABFBDBA,
+ 0xB7B9BDB8, 0x3E3EB8BC, 0x0000003E, 0x01000001,
+ 0x00000000, 0x00000000, 0x15010004, 0x2A3B0F0C,
+ 0x21172E32, 0x6F2A1D3D, 0x588C5846, 0x6E58896F,
+ 0x394E3D5F, 0x20362D1E, 0x2C21352C, 0x2D180E1F,
+ 0x1325271D, 0x281A321F, 0x64453455, 0x3D67503D,
+ 0x50406251, 0x27271A32, 0x1D2E2016, 0x1F152627,
+ 0x07080907, 0xB8B80809, 0xB8B9B7B8, 0xBABBBEBC,
+ 0xBFB9BBBF, 0xBBBFB9BB, 0xBABBBFBA, 0xBEB9BBBF,
+ 0xBBBFBABA, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xB7B7BDB8, 0xBBB9B6BC, 0xB8BDBBB6, 0xBBB6BBB9,
+ 0xBEBCB8BD, 0xB8BDBBB9, 0xB8B7BDB8, 0xBDB8B7BD,
+ 0xB7BDB8B7, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB8BFBC,
+ 0xBEBDB8BF, 0xB7BDBCB8, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xBABFBDB8, 0xBDB8BDBB, 0xBDBBBABF, 0xB8BDBBB8,
+ 0xBCBBBDBD, 0xBEBDBABC, 0xB9BEBDB9, 0xBCB8BDBC,
+ 0xBDBCB8BD, 0xB8BDBCB8, 0xBAB9BCBA, 0xBDBBB9BC,
+ 0xB7BCBAB8, 0xB9BABDBB, 0xBEB9BABE, 0xBABEB9BA,
+ 0xB7BABEB9, 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB8B5BBB6, 0xBDB8B7BD,
+ 0xB6BCB7B7, 0xB8B5BAB8, 0xB8B7B5BA, 0xB5BAB9B3,
+ 0xBAB6BBBA, 0xBBB9B6BB, 0xB4B9B7B6, 0xB8B5BCB9,
+ 0xBAB8B4BB, 0xB4B9B7B5, 0xB8B5BAB8, 0xB9B8B3B9,
+ 0xB3BAB7B3, 0xB6B2B8B3, 0xBDB8B7BB, 0xB8BCB7B9,
+ 0xB9B4B9B7, 0xBBB6B6BB, 0xB4BAB5B5, 0xB8B5BAB8,
+ 0xBBB9B5BA, 0xB6BBB9B6, 0xB9B6BCB7, 0xBDBBBABE,
+ 0xBABEB9BA, 0xB7B9BDB8, 0xBCBAB8BC, 0xB6BBB9B7,
+ 0xB8B5BCB7, 0xBDB8B6BD, 0xB6BDB8B6, 0xB5B6BDB6,
+ 0xBBB5B5BC, 0xB7BBB5B7, 0xB5B7B8B4, 0xB8B6B6B7,
+ 0xB8BBB9B5, 0xB8B8BEB9, 0xBCB7B7BD, 0xB8BEB9B6,
+ 0xAFB8BCB7, 0xB8B6B0B4, 0xB8BBB9B5, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B8BCB7, 0xBDB8B8BC,
+ 0xB6BCB7B7, 0xB5B6BDB6, 0xBAB4B5BC, 0xBCC0BAB6,
+ 0x97A5A89F, 0xB0A99BA0, 0xA8B0A9A9, 0xA1A4ACA2,
+ 0xABA1A4AC, 0xA5ADA3A3, 0xA0A4A9A0, 0xAA9FA6A9,
+ 0xA4AA9FA4, 0x9DA5A99D, 0xA89CA5A9, 0xA4A89CA4,
+ 0x9BA0A69B, 0xA59AA0A6, 0x9EA4999F, 0x999EA499,
+ 0xA4989FA6, 0xA3A599A0, 0x98A1A59A, 0xA2969FA3,
+ 0xA1A397A0, 0x989CA094, 0x9F95A0A4, 0x9B9C939E,
+ 0x949B9C93, 0x978D9C9D, 0x92938996, 0x87909188,
+ 0x8F8A8F90, 0x5E5D5992, 0x00020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x28282800, 0x3A3A3B39, 0x3F3F3B3C,
+ 0x4443453F, 0x48484848, 0x4A484848, 0x5A5B5949,
+ 0xB6B4B8B3, 0xBCB7B7BB, 0xB8BCB7B8, 0xB9B7BAB8,
+ 0xBAB8B8BB, 0xB7BAB8B7, 0xB4B4B8B3, 0xBCB7B5B9,
+ 0xB9BDB8B8, 0xB9B5BAB8, 0xBCBAB5BC, 0xB5B8B6B7,
+ 0xB6B9BDB8, 0xBCB6B7BB, 0xBABEB8B8, 0xB8B7BEB7,
+ 0xBEB9B7BD, 0xB7BDB8B8, 0xB4B6BCB7, 0xBCB7B2B9,
+ 0xB6BCB7B6, 0xBAB6BCB7, 0xBDB8B9BF, 0xB6BCB7B7,
+ 0xB7B7BDB8, 0xBDB8B6BC, 0xB7BDB8B7, 0xB9B5BCB9,
+ 0xBAB9B5BC, 0xB1B8B5B2, 0xB6B2B9B4, 0xB9B6B5BB,
+ 0xB7BCBAB2, 0xBAB8BBB9, 0xBAB8B9BC, 0xB8BBB9B7,
+ 0xB6B3B8B6, 0xBCB7B3B8, 0xB3B9B4B6, 0xB8B4B9B7,
+ 0xBDB8B5BA, 0xB7BBB6B9, 0xB5B5BBB6, 0xBBB8B3BA,
+ 0xB3BAB7B4, 0xB8B3BAB7, 0xBAB9B2BB, 0xB3B9B8B4,
+ 0xB3B5BBBA, 0xAFAEB0B5, 0xB7BCBBAA, 0xB6B4BBB8,
+ 0xB8B6B2B9, 0xB3B9B4B3, 0xB2B3B7B2, 0xB6B4B3B7,
+ 0xB2B6B1B3, 0xB4B6BAB5, 0xB9B5B5B9, 0xB7B8B4B8,
+ 0xAFB3B7B2, 0xB8B3B0B4, 0xB1B7B2B4, 0xB0B2B9B4,
+ 0xB8B3AEB5, 0xB5BBB6B2, 0x47909792, 0x48484449,
+ 0x48484846, 0x37383C37, 0x3B39383C, 0x1819173A,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010102, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00020001,
+ 0x01000200, 0x00010000, 0x00010200, 0x01000001,
+ 0x00020000, 0x3A050602, 0x3C383D3E, 0x3F3F393D,
+ 0x99A0A39A, 0xA499A0A4, 0x9EA4999E, 0xA1A1A99F,
+ 0xA8A3A1A8, 0xA1A7A2A2, 0xA8A6ACA7, 0xACA7A7AD,
+ 0xA8ACA7A8, 0xB1ABAEAC, 0xB3AEB0B3, 0xAFB5B0AD,
+ 0xB9B8BEB9, 0xBBB9B8BE, 0xBABDBBB8, 0xBCB8BDBB,
+ 0xBDBCB9BE, 0xBABFBEB8, 0xBBB9BEBC, 0xBFBEB8BD,
+ 0xBAC0BFB9, 0xBFB8C0BF, 0xC0C0B8C0, 0xBAC0BFB8,
+ 0xBDBAC0BF, 0xBFBFB8BE, 0xB8C0C0B7, 0xBEBAC0BF,
+ 0xC0BFB9BF, 0xB8C0BFB8, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBEBAC0BF, 0xBDBCB9BF, 0xB6BCBBB8,
+ 0xBEB9BFBE, 0xC0BFB9BF, 0xB9BFBEBA, 0xBEB8BEBD,
+ 0xBBB9B9BF, 0xBABFBDB6, 0xBAB7BEBB, 0xBDBCB6BD,
+ 0xB8BDBCB8, 0xBEB8BEBD, 0xBDBCB9BF, 0xBABFBEB8,
+ 0xBCB8BFBC, 0xBEBCB8BF, 0xB8BFBCB9, 0xBAB8C0C0,
+ 0xB2B1B2BA, 0xACB2B1AC, 0xB0A8B0B0, 0xBBBAA8B0,
+ 0xB3BBBAB3, 0xBEB9BFBE, 0xBDBCB9BF, 0xB7BDBCB7,
+ 0xBEB9BFBE, 0xC0BDB9BF, 0xB9C0BDB9, 0xBDBABFBD,
+ 0xBFBDBABF, 0xB9C0BDBA, 0xBEB9BFBE, 0xC0BFB9BF,
+ 0xB7BCBBBB, 0xBEB9BFBE, 0xBFBEB9BF, 0xB6BBBABA,
+ 0xBDB8BFBC, 0xBFBEB9C0, 0xBAC0BFBA, 0xBCB8BFBC,
+ 0xBFBCB8BF, 0xB8BFBCB8, 0xBAB8BDBB, 0xBBB9B7BC,
+ 0xB6BBB9B6, 0xB9B5BAB8, 0xBCB7B6BB, 0xB8BCB6B8,
+ 0xB9B7BDB8, 0xBDBBB7BE, 0xB9BEBCB8, 0xBDBABFBD,
+ 0xBFBEB9C0, 0xBABFBEBA, 0xBCB9BFBE, 0xBDBCB7BD,
+ 0xB9BFBEB7, 0xBEBABFBE, 0xBFBDBABF, 0xBABFBDBA,
+ 0xB7B8BCB7, 0x3E3EB8BC, 0x0000003E, 0x01000001,
+ 0x00000000, 0x00000000, 0x16000003, 0x2A3B100D,
+ 0x22182F30, 0x6C2B1F3D, 0x44715648, 0x58466F58,
+ 0x364E3F5B, 0x12232C20, 0x2B21311C, 0x2C190F1F,
+ 0x1525261C, 0x20132920, 0x63453655, 0x3D644F3E,
+ 0x4435554F, 0x26271C30, 0x1E2E2016, 0x21162629,
+ 0x08080808, 0xB8B80808, 0xB8B9B7BA, 0xBABBBEBC,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBBBBBF,
+ 0xBBBFBABE, 0xBBB8BDBB, 0xBDBBB8BD, 0xBABDBBBA,
+ 0xB6B8BEB9, 0xBCBAB5BB, 0xB8BDBBB7, 0xBAB8BDBB,
+ 0xBDBBB7BC, 0xB8BDBBB8, 0xB9B6BDB8, 0xBCB7B7BE,
+ 0xB7BDB8B6, 0xB6B6BCB7, 0xBCB7B5BB, 0xB8BBB9B8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB8BFBC,
+ 0xBCBBB8BF, 0xB5BDBCB4, 0xBBB7BEBB, 0xBEBDB7BE,
+ 0xB8BEBDB8, 0xBEB7BDBC, 0xBDBCB9BF, 0xB8BDBCB7,
+ 0xBDBBBDBD, 0xBDBDBBBD, 0xBBBDBDBB, 0xBBB9BEBC,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB7BCBB, 0xBCBBB7BC,
+ 0xB7BCBAB7, 0xBBB9BEBC, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBBABDBB, 0xBDBBBABD, 0xB9BEBCB8, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xB9B7BDB8, 0xBCB7B8BE,
+ 0xB8BCB7B8, 0xB6B7BBB6, 0xBAB8B7BB, 0xB7BAB8B7,
+ 0xB9B5BAB9, 0xBBB9B5BA, 0xB6BCB7B6, 0xB7B6BCB7,
+ 0xBCB7B6BC, 0xB7BDB8B8, 0xB9B5BBB6, 0xBAB8B6BB,
+ 0xB5BAB8B5, 0xB7B8BCB7, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB6B8BCB7, 0xBBB6B7BB, 0xB8BCB7B7, 0xB6B5BBB6,
+ 0xBCB7B5BB, 0xB8BCB7B8, 0xB9B8BCB7, 0xBEB9BABE,
+ 0xBABEB9BA, 0xB6B9BDB8, 0xBDB8B6BD, 0xB6BCB7B7,
+ 0xB7B6BCB7, 0xBDB8B6BC, 0xB7BDB8B7, 0xB5B5BCB5,
+ 0xBCB5B5BC, 0xB6BDB6B5, 0xB7B8BCB7, 0xBAB5B8BC,
+ 0xB5B9B4B6, 0xB8B9BDB8, 0xBCB7B7BD, 0xB7BDB8B6,
+ 0xB2B8BCB7, 0xB7B5B3B7, 0xB8BBB9B4, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB6BCB7B6, 0xB7B7BDB8, 0xBCB7B6BC,
+ 0xB8BCB7B8, 0xB5B6BAB4, 0xBBB5B7BB, 0xB9BBB5B9,
+ 0x9FA3A89F, 0xB0A9A3A8, 0xA8B0A9A9, 0xA2A4ADA3,
+ 0xADA3A3AC, 0xA3ABA1A5, 0x9EA7ADA2, 0xAA9FA3A9,
+ 0xA8ACA1A6, 0x9AA9ADA1, 0xA69AA4A9, 0xA5A99DA4,
+ 0x9BA2A89D, 0xA69D9DA5, 0x9FA59AA1, 0x9898A095,
+ 0xA5999BA3, 0xA3A599A1, 0x97A1A59A, 0xA4999EA2,
+ 0xA1A599A0, 0x97A0A498, 0xA0959FA3, 0x989B929C,
+ 0x929A9B91, 0x978D9B9C, 0x92938996, 0x89909188,
+ 0x8F8A9192, 0x78777392, 0x00020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x26282800, 0x3E3A3B39, 0x3F3F3F40,
+ 0x4444443F, 0x48484848, 0x49474848, 0x5A5B5948,
+ 0xB7B3B7B2, 0xBCB6B8BC, 0xB5B9B4B8, 0xB9B8BBB9,
+ 0xBCBAB8BB, 0xB7BCBAB7, 0xB7B8BCB7, 0xB9B5B9BD,
+ 0xB8BCB7B8, 0xB7B5BAB8, 0xBAB9B3BA, 0xB3B8B6B5,
+ 0xB7B9BDB8, 0xBDB8B8BC, 0xB9BDB8B9, 0xB7B7BDB8,
+ 0xBCB7B6BC, 0xB5BBB6B8, 0xB3B0B7B0, 0xBCB7B3BA,
+ 0xB8BCB7B8, 0xB8B8BEB9, 0xBEB9B7BD, 0xB6BCB7B8,
+ 0xB8B6BCB7, 0xBDB8B7BD, 0xB8BCB7B9, 0xB5B6BDB8,
+ 0xBCB9B1BB, 0xB2B9B6B5, 0xB7B8BCB7, 0xBAB5B8BC,
+ 0xB3B9B4B4, 0xB7B8BCB7, 0xBDB8BABB, 0xB8BCB7B9,
+ 0xB5B6BAB5, 0xBCB7B6BA, 0xB4B8B3B8, 0xB6B7BBB6,
+ 0xBAB8B7BB, 0xB7BAB8B7, 0xB6B5BBB6, 0xB9B7B5BB,
+ 0xB5BAB8B4, 0xB7B4BBB8, 0xBBBAB3BA, 0xB3B9B8B6,
+ 0xAEAFB5B4, 0xAFAEA9AF, 0xB6BBBAAA, 0xB7B5BBBA,
+ 0xB9B4B3BA, 0xB3B9B4B3, 0xB4B5B9B4, 0xB9B4B7B8,
+ 0xB4B8B3B5, 0xB3B1B7B2, 0xB8B3B3BA, 0xB5B9B4B4,
+ 0xB4B6BAB5, 0xB9B4B5B9, 0xB3B9B4B5, 0xAFB2B9B6,
+ 0xB5B3ABB2, 0xB6BBB9B0, 0x47909792, 0x48484449,
+ 0x48484848, 0x36373B36, 0x3B39373B, 0x1818183A,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000200, 0x00000000, 0x00010101, 0x00000001,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00010000, 0x00010101,
+ 0x01000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x02000000, 0x07080507, 0x05070805, 0x07070708,
+ 0x00000400, 0x39330105, 0x35393335, 0x6E3A3E39,
+ 0xA6A46F73, 0xA3A6A4A3, 0xA7A8ACA7, 0xACAAA8AC,
+ 0xA6ABA9A7, 0xAAB1B5B0, 0xB4AFABAF, 0xB0B4AFB0,
+ 0xB9B6BBB9, 0xBCBAB6BB, 0xB8BBB9B9, 0xB8B9BFBA,
+ 0xBDBBB7BD, 0xBABFBDB8, 0xBBB8BDBB, 0xBFBEB8BD,
+ 0xB9BFBEBA, 0xBDB8C0BF, 0xBFBEB7C0, 0xB9BFBEB9,
+ 0xBFB9BFBE, 0xBEBFBAC0, 0xB9BEBFB9, 0xBEB8BEBD,
+ 0xC0BFB9BF, 0xB9BFBEBA, 0xC0B7BFBE, 0xBEBDB8C0,
+ 0xB9BFBEB8, 0xBFBAC0BF, 0xBFC0BAC0, 0xB9BEBFBA,
+ 0xBEB8BEBD, 0xC0BFB7BF, 0xB9BFBEBA, 0xBFB8BEBD,
+ 0xBBB9BAC0, 0xBABFBDB6, 0xBBB7BEBB, 0xBDBCB7BE,
+ 0xBABFBEB8, 0xBEB9BFBE, 0xBDBCB9BF, 0xBABFBEB8,
+ 0xBCB9BFBE, 0xBEBCB7BD, 0xB7BEBBB9, 0xC0B8C0C0,
+ 0xBAB9B8C0, 0xB3B9B8B4, 0xBCB3BBBB, 0xC0C0B4BC,
+ 0xB3BBBBB8, 0xBEB7BDBC, 0xBEBDBABF, 0xBABFBEB9,
+ 0xBEB9BFBE, 0xC0BDB9BF, 0xB9C0BDB9, 0xBEBABFBD,
+ 0xC0BFBBC0, 0xB9BFBEBA, 0xBEB9BFBE, 0xBFBEB7BF,
+ 0xB7BDBCB9, 0xBDB7BEBB, 0xBFBDB9C0, 0xB6BBB9BA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB8BFBC,
+ 0xBFBCB6BF, 0xB8BFBCB8, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xBBBEBCBA, 0xBAB8BDBB, 0xBDB8B7BC, 0xB8BCB7B9,
+ 0xB9B6BCB7, 0xBDBBB8BE, 0xB8BDBCBA, 0xBBB8BDBB,
+ 0xBDBCB8BD, 0xB8BCBDB8, 0xBCB9BFBE, 0xBDBCB7BD,
+ 0xB8BEBDB7, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xB8B8BCB7, 0x3E3EB9BD, 0x0000013E, 0x01000000,
+ 0x00000001, 0x00000000, 0x16000003, 0x1A29100D,
+ 0x20192E1F, 0x512A1F39, 0x32543F33, 0x3F325240,
+ 0x223E3149, 0x12231911, 0x2C22321A, 0x2C180F1C,
+ 0x1422291F, 0x20142821, 0x55382A46, 0x34564235,
+ 0x35294542, 0x241E1627, 0x1F2C1E17, 0x20172428,
+ 0x08080808, 0xB8B80808, 0xB8B9B7B8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBEBABBBF,
+ 0xBBBFBABD, 0xBAB8BDBB, 0xBDBBB7BC, 0xB8BBB9BA,
+ 0xBAB6BCB7, 0xBDBBB9BF, 0xB7BCBAB8, 0xBDBBC0BE,
+ 0xBDBBBABF, 0xB8BDBBB8, 0xB8B6BDB8, 0xBEB9B6BD,
+ 0xB6BCB7B8, 0xB9B8BEB9, 0xBEB9B8BE, 0xB6BCB7BA,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB8BFBC,
+ 0xBDBCB8BF, 0xB8BEBDB7, 0xBEB9C0BD, 0xBFBEBAC1,
+ 0xB9BFBEB9, 0xBCB9BFBE, 0xBFBEB7BD, 0xB9BFBEB9,
+ 0xBDB9BEBD, 0xBCBCB9BE, 0xB9BEBDBA, 0xB9BABFBD,
+ 0xBDBBB8BE, 0xBABFBDB8, 0xBBB6BBB9, 0xBCBBB7BC,
+ 0xB7BCBBB7, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBBABDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xB9B8BEB9, 0xBFBAB8BE,
+ 0xBABEB9B9, 0xB8B8BCB7, 0xBCBAB9BD, 0xB9BCBAB9,
+ 0xB8B6BBBA, 0xBAB8B5BA, 0xB5BBB6B5, 0xB6B4BAB5,
+ 0xBBB6B5BB, 0xB8BCB7B7, 0xB7B6BCB7, 0xBBB9B6BC,
+ 0xB5BAB8B6, 0xB7B9BDB8, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B5BBB6,
+ 0xBCB7B6BC, 0xB8BCB7B8, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xB8B7BDB8, 0xBDB8B7BD, 0xB7BDB8B7,
+ 0xB8B7BDB8, 0xBDB8B7BD, 0xB7BDB8B7, 0xB5B5BCB5,
+ 0xBCB5B5BC, 0xB5BCB5B5, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB5B9B4B8, 0xB7B7BBB6, 0xBDB8B8BC, 0xB7BDB8B7,
+ 0xB1B6BCB7, 0xBDB8B2B6, 0xB8BCB7B9, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB6BCB7B6, 0xB8B6BCB7, 0xBCB7B7BD,
+ 0xB7BBB6B8, 0xB5B7BBB5, 0xBBB5B7BB, 0xB9BBB5B9,
+ 0x9FA3A89F, 0xB0A9A1A9, 0xA8B0A9A9, 0xA2A3ACA2,
+ 0xABA1A3AC, 0xA4ACA2A3, 0x9FA5ABA0, 0xABA0A4AA,
+ 0xA8ACA0A7, 0x9AA6AA9E, 0xAA9EA4A9, 0xA3A79CA8,
+ 0x9CA1A79C, 0xA69D9EA6, 0x9FA49BA1, 0x979BA398,
+ 0xA5999AA2, 0xA3A599A1, 0x9AA1A59A, 0xA59AA1A5,
+ 0x9FA397A1, 0x989FA397, 0xA095A0A4, 0x9CA0959C,
+ 0x979EA297, 0xA2979EA2, 0xA0A1979E, 0x87909187,
+ 0x8F8A8F90, 0x45444092, 0x00020000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x26292700, 0x3C3A3B37, 0x45433F40,
+ 0x48494744, 0x48484848, 0x4F4D494A, 0x585C574E,
+ 0xB7B3B7B2, 0xB8B2B8BC, 0xB5B9B4B4, 0xB8B8BCB7,
+ 0xBBB9B7BA, 0xB6BCB7B6, 0xB6B8BCB7, 0xBCB7B7BB,
+ 0xB5B9B4B8, 0xBAB5BAB8, 0xBCBBB6BD, 0xB5BAB8B6,
+ 0xB7B8BCB7, 0xBDB8B8BC, 0xB9BDB8B9, 0xBAB7BCBA,
+ 0xBDB8B7BC, 0xB9BDB8B9, 0xB6B3B9B4, 0xBCB7B6BD,
+ 0xB7BBB6B8, 0xB8B7BDB8, 0xBEB9B7BD, 0xB6BCB7B8,
+ 0xB8B7BDB8, 0xBCB7B7BD, 0xBABEB9B8, 0xB8B6BDB8,
+ 0xBAB7B6BD, 0xB5BAB8B3, 0xB8B8BCB7, 0xB8B3B9BD,
+ 0xB5B9B4B4, 0xB7B8BCB7, 0xBCB7B8BC, 0xB8BCB7B8,
+ 0xB5B5B9B4, 0xBCB7B4BA, 0xB5B9B4B8, 0xB7B7BBB6,
+ 0xBBB9B8BC, 0xB6BBB9B8, 0xB9B6BBB9, 0xBBB9B6BB,
+ 0xB6BBB9B6, 0xB7B4B9B7, 0xBAB9B4B9, 0xB3B8B7B5,
+ 0xA7A2A8A7, 0xA8A7A2A8, 0xB6BBBAA3, 0xB5B5BBBA,
+ 0xB9B4B1B8, 0xB5B9B3B3, 0xB4B4B8B3, 0xB9B4B5B9,
+ 0xB5B9B4B5, 0xB4B2B8B3, 0xB9B4B3B9, 0xB3B7B2B3,
+ 0xB4B5B9B4, 0xB9B4B5B9, 0xB3B9B4B5, 0xADAEB5B2,
+ 0xB0AEA9B0, 0xB8BBB9AB, 0x47919792, 0x48484449,
+ 0x48484848, 0x373A3B39, 0x3B39383C, 0x1818183A,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01020000, 0x00000101, 0x00000000, 0x00000100,
+ 0x00000200, 0x01010100, 0x00000000, 0x00000001,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000001, 0x00000000, 0x00010000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x00010000,
+ 0x02000100, 0x07080507, 0x04090805, 0x05040608,
+ 0x00000301, 0x04000004, 0x00020000, 0x08060907,
+ 0x08080608, 0x08080808, 0x47464947, 0x48464649,
+ 0x868B8943, 0xAF9EA49F, 0xAFAAAEB4, 0xAEB4AFAB,
+ 0xBAB8BDBB, 0xBDBBB7BC, 0xB8BBB9BA, 0xBAB6BCB7,
+ 0xBCBAB9BF, 0xBABFBDB7, 0xBBB8BDBB, 0xBFBEB8BD,
+ 0xB9BFBEBA, 0xBDB9C0BD, 0xBFBDB9C0, 0xBABFBDBA,
+ 0xBEB9C0BD, 0xBFBEB9BF, 0xB8BEBDB9, 0xBEBBC1C0,
+ 0xC0BDB9BF, 0xBAC0BFB9, 0xC0B7BFBF, 0xBFBEB8C0,
+ 0xB9BFBEB9, 0xBEB8BEBD, 0xBFBEB9BF, 0xBAC0BFB9,
+ 0xBDB9BFBE, 0xBDBCB6BE, 0xBAC0BFB7, 0xBEBAC0BF,
+ 0xBAB8B9BF, 0xBABFBDB5, 0xBDB9C0BD, 0xBDBCB9C0,
+ 0xBABFBEB8, 0xBEBAC0BF, 0xBDBCB9BF, 0xB7BDBCB8,
+ 0xBCB8BEBD, 0xBFBCB8BF, 0xB6BCBBB8, 0xBFB8C0BF,
+ 0xB8B7B8C0, 0xBAC0BFB2, 0xBFBBC0C1, 0xC1C1B7BF,
+ 0xB5BBBAB9, 0xBDB9BFBE, 0xBFBEB9BE, 0xBABFBEBA,
+ 0xBEBAC0BF, 0xBFBEB9BF, 0xB9C0BDB9, 0xBEBABFBD,
+ 0xC0BFBBC0, 0xB8BEBDBA, 0xBFB9BFBE, 0xC0BFBAC0,
+ 0xB9BFBEBA, 0xBDB7BEBB, 0xBFBDB9C0, 0xB5BAB8BA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB6BFBC,
+ 0xBFBCB6BF, 0xB8BFBCB8, 0xBCBABFBD, 0xBDBBB9BE,
+ 0xB8BDBBBA, 0xBBB8BDBB, 0xBDB8B8BD, 0xB8BCB7B9,
+ 0xB9B6BCB7, 0xBDBBB8BE, 0xB8BDBBBA, 0xBCB8BDBB,
+ 0xBFBEB9BE, 0xB9BFBEBA, 0xBEBABFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xB9B6BCB7, 0x7D7DB8BB, 0x0000017B, 0x00000000,
+ 0x00000000, 0x00000100, 0x16010004, 0x1B2A100D,
+ 0x100A1D20, 0x3A2A2037, 0x1C3B2A1E, 0x2A1E3A2B,
+ 0x252A2037, 0x11221A11, 0x1A132019, 0x110F0712,
+ 0x06130F07, 0x1F132710, 0x482C1F39, 0x2949362A,
+ 0x2A1E3A36, 0x161E1529, 0x09141009, 0x120A1511,
+ 0x08080808, 0xBBB90808, 0xB8BBB9BA, 0xBABBBFBA,
+ 0xBEBCBBBF, 0xBBBEBCBB, 0xBABBBFBA, 0xBFB9BBBF,
+ 0xBBBFBABB, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBCB8BDBB, 0xBDBBB9BE, 0xB5BAB8B8, 0xB8B6BCB7,
+ 0xBDBBB7BD, 0xB6BBB9B8, 0xBCB8BDBB, 0xBDBBB9BE,
+ 0xBABDBBBA, 0xBBB9BEBC, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBCB9BEBC, 0xBFBCB8BF, 0xB8BFBCB8, 0xBFBABFBE,
+ 0xBEBDBAC0, 0xB9BFBEB8, 0xBEBABFBD, 0xBFBDBBC0,
+ 0xB9BEBCBA, 0xBBB8BDBB, 0xBFBEB8BD, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBEBA, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBABFBDBA, 0xBAB8BDBB, 0xBDBCB7BC,
+ 0xB7BDBCB7, 0xBBB7BEBB, 0xBFBEB7BE, 0xB9BFBEB9,
+ 0xBBB8BDBB, 0xBEBCB8BD, 0xB8BFBCB9, 0xBBB7BEBB,
+ 0xBFBCB7BE, 0xB8BFBCB8, 0xBCB8BFBC, 0xC0BDB8BF,
+ 0xB9BEBCB9, 0xBBB8BDBB, 0xBDBBB8BD, 0xBABDBBBA,
+ 0xBCB9BEBC, 0xBFBCB8BF, 0xB8BFBCB8, 0xB9B8BDBB,
+ 0xBBB9B6BB, 0xB6BBB9B6, 0xB9B7BAB8, 0xBBB9B8BB,
+ 0xBABDBBB8, 0xBBB8BDBB, 0xBDBBB8BD, 0xB6BBB9B8,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B8BCB7,
+ 0xBDBBB8BC, 0xB8BBB9BA, 0xBAB8BCB7, 0xBDBBBBBF,
+ 0xBABDBBBA, 0xBBB8BBB9, 0xBBB9BABD, 0xB8BBB9B8,
+ 0xB9B8BBB9, 0xBCB7B8BB, 0xB8BCB7B8, 0xB7B6BCB7,
+ 0xBDB8B6BC, 0xB7BDB8B7, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB8BCB7B8, 0xB7B8BCB7, 0xBBB9B8BC, 0xB7BDB8B6,
+ 0xB0B5BBB6, 0xBCB5B0B7, 0xB8BEB9B5, 0xB8B8BEB9,
+ 0xBDB8B7BD, 0xB7BDB8B7, 0xB7B6BDB8, 0xBDB8B5BC,
+ 0xB6BCB7B7, 0xB7B8BCB7, 0xBBB7B8BC, 0xBDBFB9BA,
+ 0xA6B0B5AC, 0xB0A9A8B0, 0xA8B0A9A9, 0xA3A3ACA2,
+ 0xAFA5A4AD, 0xA5ADA3A7, 0xA1A7ADA2, 0xACA0A7AE,
+ 0xA8ACA0A8, 0x9FA9ADA1, 0xAAA0A7AB, 0xA7ABA0A9,
+ 0x9CA1A79C, 0xA89DA1A7, 0xA1A79CA4, 0x999EA499,
+ 0xA99D9EA4, 0xA0A498A5, 0x99A0A498, 0xA498A1A5,
+ 0xA0A498A2, 0x9CA4A89C, 0xA398A2A9, 0xA2A89D9D,
+ 0x9EA7ADA2, 0xA79EA2A7, 0x9EA297A2, 0x92989C91,
+ 0x6665989B, 0x08060668, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00010000, 0x01010100, 0x00000000,
+ 0x01000000, 0x2A2B2700, 0x3D383C37, 0x47423E42,
+ 0x484C4743, 0x47484B49, 0x4C47484C, 0x60645F48,
+ 0xB7B3B7B2, 0xBCB7B6BC, 0xB5B9B4B8, 0xB9B8BCB7,
+ 0xBBB6BABE, 0xB8BEB9B5, 0xB9B7BBB6, 0xBAB8B8BB,
+ 0xB4B9B7B5, 0xBAB4BAB9, 0xB7B6B5BB, 0xB5BCB9B1,
+ 0xB7B6BCB7, 0xBEB9B8BC, 0xB6BBB9B8, 0xBBB6BBB9,
+ 0xBDBBB8BD, 0xB6BCB7B8, 0xB8B6BCB7, 0xBCBAB7BD,
+ 0xB7BCBAB7, 0xB9B6BCB7, 0xBEB9B8BE, 0xB6BBB9B8,
+ 0xBAB7BCBA, 0xBDB8B7BC, 0xB7BDB8B7, 0xB9B7BCBA,
+ 0xBCB7B6BB, 0xB6BCB7B6, 0xBBB8BBB9, 0xBCB7BABD,
+ 0xB8BCB7B8, 0xBBB8BBB9, 0xBDBBB8BD, 0xB5BAB8B8,
+ 0xB8B3B8B6, 0xBCBAB4BB, 0xB3B8B6B7, 0xB7B3B8B6,
+ 0xB9B7B4B9, 0xB5BAB8B4, 0xB7B5BAB8, 0xBCB9B3BA,
+ 0xB7BDB8B5, 0xBAB6BCB7, 0xBBB9B9BC, 0xB4B9B8B8,
+ 0xA7A9AFAE, 0xAEACA2A8, 0xB8BBB9A9, 0xB7B6BBB9,
+ 0xBCB7B6BC, 0xB8BCB7B8, 0xB4B6B9B7, 0xB9B4B5B9,
+ 0xB5B9B4B5, 0xB8B5BBB6, 0xB9B8B5BA, 0xB3B8B6B4,
+ 0xB3B8BCB7, 0xBCB7B5B9, 0xB5B9B4B8, 0xB4B1B7B2,
+ 0xB7B2B3B9, 0xB8BCB7B3, 0x4F989B99, 0x4F4F4E51,
+ 0x5050504F, 0x37484848, 0x3A383839, 0x1A1B1939,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000100, 0x01000102, 0x00000000, 0x07060507,
+ 0x05070605, 0x06050706, 0x0F0E1010, 0x110F0E11,
+ 0x4247450E, 0xB2868C87, 0xB7B0B1B9, 0xB0B8B1B0,
+ 0xB9B9C0BB, 0xBDBBB7BE, 0xBABFBDB8, 0xB9B8BDBB,
+ 0xBBB9B6BB, 0xBCBFBDB8, 0xBABABFBE, 0xBEBDB6BB,
+ 0xB9BFBEB8, 0xBDB9C0BD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBEBA, 0xBEBAC0BF,
+ 0xBFBEB9BF, 0xBAC0BFBA, 0xC0B8C0C0, 0xC0C0B8C0,
+ 0xBAC0BFB8, 0xBEB9BFBE, 0xBFBDBBC0, 0xBAC0BFBA,
+ 0xC1BAC0BF, 0xBDBEBBC0, 0xBABFC0B8, 0xBEB7BFBE,
+ 0xBBBAB9BF, 0xBABFBEB6, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xBABFBEBA, 0xBCB7BEBB, 0xBFBCB8BF, 0xB7BEBBB8,
+ 0xBBB7BEBB, 0xC0BDB7BE, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB7BDBCB9, 0xBEB6BCBB, 0xBEBDB9BF,
+ 0xB9BFBEB8, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9C0BDB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB7, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC1BFBBC0,
+ 0xBBC0BEBC, 0xBBB9BFBE, 0xBDBBB7BE, 0xB6BBB9B8,
+ 0xBEBAC0BF, 0xC0BFB9BF, 0xB9BFBEBA, 0xBEB7BFBE,
+ 0xBFBEB7BF, 0xB7BDBCB7, 0xBEBABFBD, 0xBFBEBBC0,
+ 0xB8BDBCBA, 0xBCBABFBD, 0xBEBCB8BF, 0xB6BBB9B9,
+ 0xB9B6BCB7, 0xBFBAB8BE, 0xBAC0BBB9, 0xBCB9BFBA,
+ 0xBFBCB8BF, 0xB9C0BDB8, 0xBDBABFBD, 0xBFBEBABF,
+ 0xBABFBEBA, 0xBDBABFBD, 0xC0BDBABF, 0xB9C0BDB9,
+ 0xBBB7BDBC, 0xC7C8B7BC, 0xA4A9A8C3, 0x003A3F3D,
+ 0x01010001, 0x00000101, 0x0F08060C, 0x03120804,
+ 0x0A021308, 0x462D2038, 0x2B47392C, 0x392C463A,
+ 0x2F382D47, 0x04172218, 0x0905110A, 0x0C0B070D,
+ 0x02120A06, 0x25192F0C, 0x4B392D49, 0x2B4A382B,
+ 0x392B473A, 0x2B21172E, 0x000D221A, 0x09040D07,
+ 0x08080808, 0xBBB90808, 0xB8BBB9B8, 0xBABBBFBA,
+ 0xBEBCBBBF, 0xBBBEBCBB, 0xBABBBFBA, 0xBFB9BBBF,
+ 0xBBBFBABB, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xB9B9BFBA,
+ 0xBDBBB8BE, 0xB8BDBBB8, 0xBAB8BDBB, 0xBCBCB7BC,
+ 0xBBBDBDBA, 0xBBB8BDBB, 0xBFBDB8BD, 0xB8BDBBBA,
+ 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8, 0xBEBABFBE,
+ 0xBEBDBABF, 0xB9BFBEB8, 0xBDBABFBD, 0xBFBDBCBF,
+ 0xBBC0BEBA, 0xBBBABFBD, 0xBDBCB8BD, 0xB8BEBDB7,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBDBABFBD,
+ 0xBFBEBABF, 0xBABFBDBA, 0xBBBBC0BE, 0xBFBCB8BD,
+ 0xB9BFBEB8, 0xBDB9C0BD, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xBDBABFBD, 0xC0BDBABF, 0xB9C0BDB9, 0xBCB8BFBC,
+ 0xBFBCB8BF, 0xB8BFBCB8, 0xBCB9C0BD, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBCB9BEBC, 0xBDBBB9BE, 0xB8BDBBBA,
+ 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8, 0xBCBABFBD,
+ 0xBDBBB9BE, 0xB9BEBCB8, 0xBBBABDBB, 0xBCBABABD,
+ 0xBABDBBB9, 0xBBB8BDBB, 0xBEBCB8BD, 0xB8BDBBB9,
+ 0xB9B8BCB7, 0xBEB9BABE, 0xB8BCB7BA, 0xB7BABEB9,
+ 0xBBB9B8BC, 0xB8BBB9B8, 0xB9B8BCB7, 0xBDBBBABE,
+ 0xBABDBBBA, 0xBCB9BCBA, 0xBDBBBBBE, 0xBABDBBBA,
+ 0xBBBABDBB, 0xBDB8BABD, 0xB9BDB8B9, 0xB8B7BDB8,
+ 0xBDB8B7BD, 0xB7BDB8B7, 0xB7B8BCB7, 0xBDB8B8BC,
+ 0xB4B8B3B9, 0xB8BABEB9, 0xBCBAB9BD, 0xB6BCB7B7,
+ 0xB1B3BAB5, 0xBFB8B0B8, 0xB1B8B1B8, 0xB9B6BCB7,
+ 0xBCB7B8BE, 0xB8BEB9B6, 0xB8B7BDB8, 0xBCB7B6BD,
+ 0xB7BDB8B6, 0xB7B9BDB8, 0xBBB7B8BC, 0xBEC0BABA,
+ 0xA7B3B8AF, 0xB1AAA9B1, 0xA8B0A9A9, 0xA4A8B1A7,
+ 0xAFA5A5AE, 0xA7AFA5A7, 0x9FA8AEA3, 0xACA0A5AC,
+ 0xA9AE9FA8, 0xA1A9ADA1, 0xAA9FA9AD, 0xA6AA9EA6,
+ 0x9BA3A79B, 0xA99EA3A7, 0xA3A79CA5, 0x999EA499,
+ 0xA99D9EA4, 0xA5A99DA5, 0x9DA6AA9E, 0xA99DA5A9,
+ 0xABAFA3A7, 0x9CA8AEA3, 0xA89D9FA7, 0xA5ADA2A2,
+ 0xA3A6AEA4, 0xA79EA5AD, 0x9BA097A2, 0x94989B92,
+ 0x0707989A, 0x07040609, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x01000000, 0x292A2600, 0x423D413C, 0x4C474347,
+ 0x484C4748, 0x47484C47, 0x4D47484C, 0x60645E49,
+ 0xB7B3B7B2, 0xB9B4B6BC, 0xB5B9B4B5, 0xB8B8BCB6,
+ 0xBEB9BABE, 0xB8BEB9B8, 0xB8B9BCBA, 0xB9B7B5BA,
+ 0xB5BCB9B4, 0xBCB5BBBA, 0xBBBAB7BD, 0xB5BCB9B5,
+ 0xB7B8BEB9, 0xBEBCB8BC, 0xB8BDBBB9, 0xBEB9BEBC,
+ 0xBFBDBBC0, 0xB8BDBBBA, 0xB7B7BDB8, 0xBBB9B6BC,
+ 0xB7BCBAB6, 0xB8B8BEB9, 0xBCBAB7BD, 0xB8BDBBB7,
+ 0xB8B7BCBA, 0xBDB8B7BD, 0xB8BEB9B7, 0xB8B8BDBB,
+ 0xBDB8B7BD, 0xB8BCB7B9, 0xBBB8BDBB, 0xBCB7B8BD,
+ 0xBABEB9B8, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xB8B4BBB8, 0xBDBAB4BB, 0xB4BBB8B6, 0xB9B7BCBA,
+ 0xBAB8B6BB, 0xB5BAB8B5, 0xB8B5BAB8, 0xBBB6B4BB,
+ 0xB4BAB5B5, 0xB6B7BBB6, 0xBBB9B7BB, 0xB6BBB9B8,
+ 0xADAFB4B2, 0xBBB9AAAF, 0xB8BBB9B6, 0xB7B8BCB7,
+ 0xBBB9B8BC, 0xB6BBB9B6, 0xB4B2B7B5, 0xB9B5B5B9,
+ 0xB4B8B3B8, 0xB9B8BCB7, 0xBBBAB6BB, 0xB4B9B8B6,
+ 0xB6B8BCB7, 0xBBB6B8BC, 0xB3B7B2B7, 0xB3B3B7B2,
+ 0xB9B4B5B9, 0xB8BCB7B5, 0x4F9A9B99, 0x50505051,
+ 0x4F4F4F50, 0x48484848, 0x3937494A, 0x1A1B1938,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x00000000, 0x06060507,
+ 0x05070504, 0x06060606, 0x7B444646, 0xB4B27A7D,
+ 0xB0B4AFB1, 0xB1B1B8B1, 0xB8B1B0B8, 0xB0B8B1B0,
+ 0xB9B9C0BB, 0xBDBBB7BE, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xBBC0BEBA, 0xB9B8BDBC, 0xC0BFB5BA,
+ 0xB9BFBEBA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBBBAC0BB, 0xBFBDBAC0, 0xBABFBDBC, 0xBEBAC0BF,
+ 0xBEBDB9BF, 0xB9BFBEB9, 0xC0B6BEBE, 0xC0C0B8C0,
+ 0xB8C0BFB8, 0xBDB9BFBE, 0xBFBDBABF, 0xBABFBEBA,
+ 0xC0B9BFBE, 0xBEBFBABF, 0xB7BCBDB9, 0xBFB7BFBE,
+ 0xBDBCBAC0, 0xBABFBEB8, 0xBEB9BFBE, 0xBFBEB7BF,
+ 0xBBC0BFBA, 0xBAB8BFBC, 0xC0BDB8BF, 0xB8BFBCB9,
+ 0xBCB8BDBB, 0xC0BFB9BE, 0xBAC0BFBA, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBEB6BCBB, 0xC0BDB9BF,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB8BEBDB9,
+ 0xBEB9BFBE, 0xBFBFB9BF, 0xB9BFBEB7, 0xBEBBC0BF,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBFBBC1C0, 0xBCBABAC0, 0xB6BBB9B7,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB8C0BF,
+ 0xBFBEB7BF, 0xB9BFBEB7, 0xBCB8BDBB, 0xBDBCB9BE,
+ 0xB8BDBCB8, 0xBCB8BFBC, 0xBEBCB8BF, 0xB8BDBBB9,
+ 0xB9B6BBB9, 0xBCBAB8BE, 0xB8BEB9B7, 0xBAB7BEB9,
+ 0xBFBCB8BF, 0xB7BEBBB6, 0xBDBABFBD, 0xBFBEBCBF,
+ 0xBABFBEBA, 0xBDBABFBD, 0xC0BDBABF, 0xB9BFBEB9,
+ 0xBDB7BDBC, 0xBCBDB7BC, 0xC2C8C7B7, 0x7BB9BFBA,
+ 0x403E7A80, 0x0000013D, 0x1008050E, 0x03120804,
+ 0x3D35460A, 0x46392C46, 0x2A49392A, 0x392A493A,
+ 0x473A2B4A, 0x2E48372B, 0x0B051839, 0x0F09030E,
+ 0x31450A04, 0x3C2E4A3C, 0x55433454, 0x32544333,
+ 0x44335443, 0x493E2F4E, 0x1A2B3C32, 0x07000F22,
+ 0x08080808, 0xBBB90808, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xBEBCBBBF, 0xB9BEBCB9, 0xBAB9BFBA, 0xBFBAB9BF,
+ 0xB9BFBAB9, 0xBBB9BEBC, 0xBEBCB8BD, 0xB8BDBBB9,
+ 0xBBB8BDBB, 0xBCBAB8BD, 0xB6BBB9B7, 0xBBB7BCBA,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBAB8BDBB, 0xBDBBB7BC, 0xB8BDBBB8,
+ 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8, 0xBEB9BFBE,
+ 0xBEBBB9BF, 0xB7BEBBB7, 0xBEB8BDBC, 0xBFBDBABF,
+ 0xB9BEBCBA, 0xBEBABFBE, 0xBFBEBABF, 0xB7BDBCB9,
+ 0xBDB9BFBE, 0xBFBEB8BE, 0xB9BFBEB9, 0xBCBABFBD,
+ 0xC0BDB9BE, 0xBABFBDB9, 0xBBBABFBD, 0xC0BDB8BD,
+ 0xB9C0BDB9, 0xBEBBC0BF, 0xBFBEBABF, 0xB9BFBEB9,
+ 0xBEB9C0BD, 0xBFBEBAC1, 0xB9BFBEB9, 0xBCB8BFBC,
+ 0xBFBCB8BF, 0xB6BFBCB6, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBBB9BEBC, 0xBDBBB8BD, 0xB9BEBCB8,
+ 0xBCB8BFBC, 0xBFBCB6BF, 0xB8BFBCB8, 0xBEB9BFBE,
+ 0xBBB9B9BF, 0xB8BDBBB6, 0xBBB8BDBB, 0xBEB9B8BD,
+ 0xB8BEB9B8, 0xBAB8BDBB, 0xBEBCB7BC, 0xB8BDBBB9,
+ 0xBBB8BDBB, 0xBBB9B8BD, 0xB6BBB9B6, 0xBAB5BAB8,
+ 0xBDBBB7BC, 0xB8BDBBB8, 0xBBB7BCBA, 0xBDBCB8BD,
+ 0xB8BDBCB8, 0xBBB8BDBB, 0xBDBCB8BD, 0xB8BDBCB8,
+ 0xBBBABDBB, 0xBEB9BABD, 0xB7BDB8B8, 0xB8B7BDB8,
+ 0xBEB7B7BD, 0xB7BEB7B7, 0xB7B8BCB7, 0xB9B4B8BC,
+ 0xAEB2ADB5, 0xBAB7BCBA, 0xBDB8B7BC, 0xB7BDB8B7,
+ 0xB2B5BBB6, 0xBEB9B1B7, 0xB3B7B2BA, 0xB7B7BBB6,
+ 0xBEB9B8BC, 0xB7BDB8BA, 0xB9B6BCB7, 0xBCB7B8BE,
+ 0xB9BDB8B8, 0xB6BBBDB7, 0xBDB7BABC, 0xBFC1BBBB,
+ 0xABB4B9B0, 0xAFA8ADB5, 0xA6B1A9A7, 0xA5A9B2A8,
+ 0xAFA8A6AF, 0xA5ADA3A8, 0xA1A7ADA2, 0xAB9FA7AE,
+ 0xA9ADA1A7, 0xA1A9ADA1, 0xAB9FA9AD, 0xA7AB9FA7,
+ 0x9BA4A89C, 0xA99DA5AA, 0xA5AC9FA5, 0x9EA6AA9F,
+ 0xB0A3A5A9, 0xA9B0A3A9, 0xA4ABAFA3, 0xAFA3ACB0,
+ 0xABAFA3AB, 0x9EA5ADA2, 0xADA39FA8, 0xA5ADA3A5,
+ 0xA2A5ADA3, 0xA79EA7AD, 0xA8ACA6A2, 0x05989995,
+ 0x04060607, 0x08050707, 0x00020000, 0x00010200,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x2A2B2900, 0x423E423D, 0x4C474347,
+ 0x484C4748, 0x4F4A4B47, 0x544E5253, 0x60645E52,
+ 0xB7B2B6B1, 0xB6B2B8BC, 0xB8BCB7B5, 0xB8B8BCB7,
+ 0xBBB9B7BD, 0xB8BBB9B8, 0xB8B5BAB8, 0xBAB9B5BA,
+ 0xB6BBBAB5, 0xBAB5BAB9, 0xBBBAB6BB, 0xB9BEBDB6,
+ 0xB9B8BBB9, 0xC0BEB8BB, 0xB7BCBBBB, 0xBCB8BDBC,
+ 0xBFBDB8BD, 0xB8BDBBBA, 0xB8B7BBB6, 0xBDB8B9BD,
+ 0xB6BCB7B7, 0xBBB8BDBB, 0xBDBDB8BD, 0xB8BBB9BB,
+ 0xB7B7BDB8, 0xBFB8B7BE, 0xB8BFB8B8, 0xB8B8BEB9,
+ 0xBEB9B7BD, 0xB9BDB8BA, 0xBBB8BDBB, 0xBBB9B8BD,
+ 0xBABDBBB8, 0xBCB8BDBC, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xB8B4BBB8, 0xBDBAB4BB, 0xB4BBB8B6, 0xB7B6BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB7B8BCB7, 0xBCB7B6BC,
+ 0xB8BCB7B8, 0xB7B8BCB7, 0xBAB8B8BC, 0xB4B9B7B5,
+ 0xB9B7BCBA, 0xBBB9B6BB, 0xB6BBB9B6, 0xB9B7BBB6,
+ 0xB5B5B6BB, 0xADB5B5AD, 0xB6B8BBB9, 0xBBB7B9BA,
+ 0xB8BCB7BA, 0xB7B8BCB7, 0xB9B7B6BC, 0xB5BAB8B4,
+ 0xB4B5B9B4, 0xB8B6B7B8, 0xB3B7B2B5, 0xB7B5B9B4,
+ 0xB8B6B8BC, 0xB6BBB9B3, 0x4F989B99, 0x50504E51,
+ 0x51515150, 0x47484947, 0x3A384849, 0x1A1B1939,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x01000000, 0x01010101, 0x00000001, 0x01010101,
+ 0x00000101, 0x02000002, 0x00000000, 0x00010000,
+ 0x00000100, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010002, 0x3D060705,
+ 0x76713C3F, 0xABAFAA72, 0xAFB3B4B0, 0xB3AFB2B3,
+ 0xB0B4AEB2, 0xB1B1B8B1, 0xB8B1B0B8, 0xAFB7B0B0,
+ 0xBBB7BEB9, 0xBDBBB7BE, 0xB8BDBBB8, 0xBDB8BFBC,
+ 0xBFBDB9C0, 0xB7BCBABA, 0xBDB6BBB9, 0xC0BDB9C0,
+ 0xB9C0BDB9, 0xBCBABFBD, 0xC0BBB9BE, 0xBAC0BBBA,
+ 0xBDB9C0BD, 0xBFBDB9C0, 0xBABFBDBA, 0xBEBAC0BF,
+ 0xBFBEB9BF, 0xBAC0BFB9, 0xC0B6BEBE, 0xC0C0B8C0,
+ 0xB9C1C0B8, 0xBDBAC0BF, 0xC0BFB9C0, 0xBABFBEBB,
+ 0xBEBAC0BF, 0xC0BFB7BF, 0xBAC0BFBA, 0xBEB9BFBE,
+ 0xC0BEB9BF, 0xBABFBDBB, 0xBEBAC0BF, 0xBDBCB7BF,
+ 0xB8BDBCB8, 0xBCB7BEBB, 0xBEBDB8BF, 0xB8BEBDB8,
+ 0xBEB7BDBC, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBCB9BF, 0xBAC1BEB8, 0xBDB5BCB9, 0xBFBEB9C0,
+ 0xBAC0BFB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xB9BFBEB9, 0xBEBBC0BF,
+ 0xC1BFBBC0, 0xBCC1BFBC, 0xBEBBC0BE, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBFBAC0BF, 0xBDBBBAC0, 0xB6BBB9B8,
+ 0xBCBAC0BF, 0xBFBEB7BD, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBDBABFBD, 0xBDBBBABF,
+ 0xB8BDBBB8, 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8,
+ 0xBDB6BBB9, 0xBEBDBABF, 0xB8BDBBB9, 0xBCB7BEBB,
+ 0xBFBCB8BF, 0xB8BFBCB8, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBEBABF, 0xBABFBEBA,
+ 0xBCB8BDBC, 0xBDBCB8BD, 0xB8BDBBB8, 0xB9B8BFBA,
+ 0xBFBAB9C0, 0x7C7E7EB9, 0x1208040F, 0x36450803,
+ 0x3E35493D, 0x57423654, 0x34594535, 0x45345945,
+ 0x4E4F3E63, 0x2A4C382A, 0x382C4A38, 0x460C0016,
+ 0x2E4D3C30, 0x3D2B503E, 0x614D3A61, 0x39634D3A,
+ 0x4D3A614D, 0x4F3D2C51, 0x2F4B3E2F, 0x2417313D,
+ 0x07080808, 0xBBB90809, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xBEBCBBBF, 0xB9BEBCB9, 0xBAB9BFBA, 0xBFBAB9BF,
+ 0xB9BFBAB9, 0xBBB9BEBC, 0xBEBCB8BD, 0xB8BDBBB9,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBAB8BDBB,
+ 0xBDBBB7BC, 0xBABFBDB8, 0xBBBABFBD, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBAB8BDBB, 0xBDBBB7BC, 0xB6BDBAB8,
+ 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BEBDB8, 0xBEB9BFBE,
+ 0xBDBCB9BF, 0xB7BDBCB7, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xBAC0BFBA, 0xBEBBC0BF, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBDB9BFBE, 0xBFBEB8BE, 0xB9BFBEB9, 0xBCB9BFBE,
+ 0xBFBEB8BF, 0xB9C0BDB9, 0xBBB8BDBC, 0xBFBEB8BD,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB8BEBD,
+ 0xBFBCB8BF, 0xB6BFBCB6, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBBB8BEBD, 0xBDBCB7BE, 0xB9C0BDB8,
+ 0xBCB6BEBD, 0xBEBDB6BF, 0xB8BEBDB8, 0xBEB9BFBE,
+ 0xBCBBB9BF, 0xB8BDBBB7, 0xB9BABFBD, 0xBEB9B8BE,
+ 0xB8BEB9B8, 0xB9B9BFBA, 0xBCBAB8BE, 0xB6BCB7B7,
+ 0xB9B8BDBB, 0xBDBBB8BE, 0xB8BEB9B8, 0xB8B7BCBA,
+ 0xBCBAB7BD, 0xB6BCB7B7, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xB9B8BDBB, 0xBEB9B8BE, 0xB7BDB8B8, 0xB7B7BDB8,
+ 0xBEB7B7BE, 0xB7BEB7B7, 0xB7B6BCB7, 0xBCB7B6BC,
+ 0xB3B9B4B8, 0xB8B7BDB8, 0xBEB9B7BD, 0xB7BDB8B8,
+ 0xB6B5BBB6, 0xBEB9B5BB, 0xBABEB9BA, 0xB8BBBFBA,
+ 0xBCB7B9BD, 0xB7BDB8B8, 0xB7B6BCB7, 0xBDB8B6BC,
+ 0xB9BDB8B7, 0xB7B9BDB7, 0xBCB6B9BD, 0xB9BDB7B8,
+ 0xAAB2BAB0, 0xB0A9ABB4, 0xA8B0A9A8, 0xA5A8B1A7,
+ 0xAEA7A7AF, 0xAAAEA8A7, 0xA2A7ACA3, 0xADA2A7AD,
+ 0xA8ACA0A9, 0xA1A9ADA1, 0xADA0A9AD, 0xA9ADA1A6,
+ 0x9EA8AD9E, 0xAA9DA8AD, 0xA6ADA0A3, 0xA4ABAFA4,
+ 0xB5A8ABAF, 0xA9B0A3AE, 0xA3ABAFA3, 0xAFA3ABAF,
+ 0xABAFA3AB, 0xA3A6AEA3, 0xB1A7A5AD, 0xA9B1A7A9,
+ 0xA1A7ADA2, 0xB1A8A6AC, 0x9CA09AAC, 0x06060705,
+ 0x05070606, 0x09060808, 0x00020000, 0x00010200,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x01000000, 0x292A2800, 0x47484C47, 0x4C47484C,
+ 0x484C4748, 0x4F52534F, 0x544E5253, 0x62645E52,
+ 0xB7B5B6B2, 0xB6B2B8BC, 0xBABBB7B5, 0xB9BABEB9,
+ 0xBBB9B8BE, 0xB8BBB9B8, 0xB8B5BAB8, 0xBBBAB5BA,
+ 0xB5BAB9B6, 0xBAB6BBBA, 0xB8B7B6BB, 0xB9BEBCB3,
+ 0xB9B9BCBA, 0xBCBCB8BB, 0xBBC0BFBA, 0xBDBABFBE,
+ 0xBDBBBABF, 0xB6BCB7B8, 0xB8B8BCB7, 0xBCB7B9BD,
+ 0xB7BDB8B6, 0xBBB9BEBC, 0xBEBEB8BD, 0xB8BBB9BC,
+ 0xB8B7BDB8, 0xBFB8B8BF, 0xB8BFB8B8, 0xB8B7BDB8,
+ 0xBEB9B7BD, 0xB9BDB8BA, 0xBBB8BDBB, 0xBBB9B8BD,
+ 0xB7BCBAB8, 0xBCB8BDBC, 0xBEBCB8BD, 0xB8BDBBB9,
+ 0xB7B4BBB8, 0xBBB8B3BA, 0xB5BAB8B4, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xB8B8BCB7, 0xBCB7B9BD,
+ 0xB8BCB7B8, 0xB8B8BCB7, 0xBAB8B9BD, 0xB4B9B7B5,
+ 0xB7B6BCB7, 0xBBB9B6BC, 0xB6BBB9B6, 0xB9B9BDB8,
+ 0xB8B8B6BB, 0xA8B2B2AE, 0xB4B4B7B5, 0xBBB9B7B8,
+ 0xB8BBB9B8, 0xB6B8BCB7, 0xBBB6B8BC, 0xB8BCB7B5,
+ 0xB7B8BCB7, 0xB7B5B8BC, 0xB3B6B4B4, 0xB8B5B9B4,
+ 0xBBB9B9BD, 0xB7BCBAB6, 0x4F989B99, 0x50504E51,
+ 0x4F4F4F50, 0x45484947, 0x49454849, 0x191A1648,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x01010000,
+ 0x01010101, 0x01000000, 0x00000101, 0x00010000,
+ 0x20000100, 0x4A442324, 0x6A6C6648, 0xA8ACB0AA,
+ 0xB0A7A8AF, 0xABB0A7AB, 0xADB0B4AE, 0xB4AEAFB3,
+ 0xB0B4AEB0, 0xB2B0B7B0, 0xB7B0B1B9, 0xB0B8B1AF,
+ 0xBABAC1BE, 0xBDBBB6BD, 0xB8BDBBB8, 0xBDB8BFBC,
+ 0xBDBBB9C0, 0xB8BDBBB8, 0xBDBAC1BE, 0xC0BDB9C0,
+ 0xB9C0BDB9, 0xBDBABFBD, 0xBFBDBABF, 0xBAC0BBBA,
+ 0xBEB9C0BD, 0xC0BEBAC1, 0xBABFBDBB, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xBAC0BFB9, 0xC1B8C0C0, 0xBEBEB9C1,
+ 0xB8C0C0B6, 0xBDBAC0BF, 0xBEBDB9C0, 0xBAC0BFB9,
+ 0xBFB7BFBE, 0xBFBEB8C0, 0xBAC0BFB9, 0xBDBAC0BF,
+ 0xBAB8B8BE, 0xBABFBDB7, 0xBFB9BFBE, 0xBFBEBAC0,
+ 0xBABFBEBA, 0xBCB8BFBC, 0xBEBDB8BF, 0xB8BEBDB8,
+ 0xBEB8BEBD, 0xBFBEB9BF, 0xB9BFBEB9, 0xBFBAC0BF,
+ 0xC0BDBAC0, 0xB9C0BDB9, 0xBDB7BEBB, 0xBFBEB9C0,
+ 0xB7BDBCB9, 0xBFB7BDBC, 0xBFC0BAC0, 0xB9BEBFBA,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xB9BFBEB9, 0xBEBBC0BF,
+ 0xC0BEBBC0, 0xBCC1BFBB, 0xBDBBC0BE, 0xC1BFBABF,
+ 0xBBC0BEBC, 0xC0B9BFBE, 0xBDBBBBC1, 0xBABFBDB8,
+ 0xBEB6BCBB, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBBB6BBB9, 0xBFBDB8BD,
+ 0xBABFBDBA, 0xBCB8BFBC, 0xBEBBB8BF, 0xB7BEBBB7,
+ 0xBEB6BBBA, 0xBFBEBABF, 0xBABFBEBA, 0xBCB8BFBC,
+ 0xBFBCB8BF, 0xB9C0BDB8, 0xBDBBC0BE, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBEB9C0, 0xB9BEBDBA,
+ 0xBCB8BDBC, 0xBDBBB8BD, 0xB8BDBBB8, 0xB8B8BFBA,
+ 0xC0B9B7BF, 0xBBBEBCB9, 0x43A4A2A8, 0x39443C38,
+ 0x3E37463F, 0x6250455F, 0x43615044, 0x5043634F,
+ 0x604D4060, 0x3F5F4D40, 0x4E425E4C, 0x6024182E,
+ 0x46655648, 0x56456656, 0x67564567, 0x456A5645,
+ 0x56456757, 0x67574868, 0x4A665748, 0x3E314B58,
+ 0x07080808, 0xBBB90809, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBBBBBFBA, 0xBEBCBCC0,
+ 0xBBBEBCBB, 0xBBB9BEBC, 0xBFBDB8BD, 0xB9BEBCBA,
+ 0xBCBBC0BF, 0xBCBAB9BE, 0xB8BDBBB7, 0xBCB8BFBC,
+ 0xBEBBB8BF, 0xB8BFBAB7, 0xBCB8BFBC, 0xBEBBB8BF,
+ 0xB7BEBBB7, 0xBCB8BFBC, 0xBFBCB8BF, 0xB7BEBBB8,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC1B8C0C0, 0xBFC0B9C1,
+ 0xB8C0C0BA, 0xC0BABFC0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xBFB8C0C0, 0xC0C0B7BF, 0xB8C0C0B8, 0xBFB8C0C0,
+ 0xC0C0B8C0, 0xB8C0BFB8, 0xBEBABFC0, 0xC0C0B9BF,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0BFB8, 0xBFB8C0BF,
+ 0xC0BFB8C0, 0xB8C0BFB8, 0xBFB8C0BF, 0xC0BFB8C0,
+ 0xB8C0BFB8, 0xBFB8C0C0, 0xBFC0B8C0, 0xB8C0BFBA,
+ 0xBFB8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0,
+ 0xC0BFB8C0, 0xBAC1BEBA, 0xB9B8BFBC, 0xC0BBB7BE,
+ 0xB8C0B9B9, 0xB9B8C0B9, 0xBFBAB8C0, 0xB9C1BAB8,
+ 0xB9B8BFBA, 0xBFBAB8C0, 0xB8C0B9B8, 0xB4B4BBB6,
+ 0xBBB6B3BB, 0xB4BCB5B4, 0xBAB8BFBA, 0xBFBAB8BF,
+ 0xB8BFBAB8, 0xBAB8BFBA, 0xBFBAB8BF, 0xB8BFBAB8,
+ 0xB9B9C0BB, 0xC0B9B8C0, 0xB8C0B9B8, 0xB9B8C0B9,
+ 0xC0B9B8C0, 0xB8C1B7B8, 0xB9B8C0B9, 0xC0B9B8C0,
+ 0xB8C0B9B9, 0xB9B7BFB8, 0xC0B9B8C0, 0xB9C0B9B8,
+ 0xB4B3B9B4, 0xB9B4B5B9, 0xB5B9B4B5, 0xB8B8BCB7,
+ 0xBCB7B9BD, 0xB6BCB7B6, 0xB9BAC0BB, 0xBFBAB7BE,
+ 0xB9BFBAB8, 0xB9B9C0B9, 0xC0B9B9C0, 0xB9C0B9B9,
+ 0xA9B1B9B2, 0xB0A9A8B0, 0xA8B0A9A8, 0xA8A8AFA8,
+ 0xAFA9AAAE, 0xAAAEA8AB, 0xA1A6ABA2, 0xACA1A6AC,
+ 0xA9B0A3A6, 0xA4AAB1A4, 0xB3A4ACB3, 0xAEB3A4AE,
+ 0xA0AFB4A5, 0xB1A2A8AF, 0xA8AFA0AA, 0xA4ADB1A5,
+ 0xAFA3ACB0, 0xADB1A5AB, 0xA5AFB1A5, 0xB1A5AFB1,
+ 0xAAAEA2AF, 0xA7A9ADA1, 0xB1A6ACB2, 0xABB2A5AB,
+ 0xA2A8AFA2, 0xADA7A8AF, 0x3B3C38AB, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000100, 0x00000102, 0x00000000, 0x00010101,
+ 0x01000000, 0x3A3B3900, 0x4F50544F, 0x544E5054,
+ 0x51534D52, 0x50545650, 0x56505456, 0x7E807A56,
+ 0xB6BABCB6, 0xBCB6BABC, 0xB9BAB6BC, 0xBBBABEB9,
+ 0xBFBAB8BD, 0xBBC1BCB9, 0xB7B6BCB7, 0xBDBBB6BC,
+ 0xB9BCBABA, 0xBABABDBB, 0xBBB9B9BC, 0xBABDBBB8,
+ 0xB7BABBB9, 0xBFBDB8BC, 0xB9BCBABC, 0xBBBABDBB,
+ 0xBDBBBABD, 0xB7BBB6BA, 0xB6B8BCB7, 0xBCB7B8BC,
+ 0xB9BDB8B8, 0xBBB6BBB9, 0xC0BFB7BC, 0xB8BDBCBB,
+ 0xBABABDBB, 0xBFBABBBF, 0xBBBFBABB, 0xB9BABDBB,
+ 0xC0BBBABE, 0xBABEB9BC, 0xBBB8BDBB, 0xBBB9B8BD,
+ 0xB9BEBCB6, 0xBBB8BDBB, 0xBEBBB7BE, 0xB9C0BDB7,
+ 0xB6B5BBB6, 0xBDBBB5BB, 0xB9BEBCB8, 0xBBBABDBB,
+ 0xBDBBBABD, 0xBABDBBBA, 0xBBB9BEBC, 0xBCBAB8BD,
+ 0xB8BDBBB7, 0xBBBABDBB, 0xBEB9BABD, 0xB5BBB6BA,
+ 0xB9B8BEB9, 0xBEBBB7BE, 0xB8BDBBB7, 0xB8BBBCB8,
+ 0xBAB9B9BD, 0xAFB7B7B4, 0xADB6BBB9, 0xB3B2AAAF,
+ 0xB7BCBAAE, 0xB6B6BCB7, 0xBCB7B6BD, 0xB8BCB7B8,
+ 0xB6B8BCB7, 0xBAB5B8BC, 0xB4BAB5B6, 0xB7B7BBB6,
+ 0xBBB6B8BC, 0xB7BBB6B7, 0x53B8BCB7, 0x54545255,
+ 0x54545454, 0x4F505351, 0x534F5054, 0x22231F52,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x02000002, 0x01000001,
+ 0x00000000, 0x00000000, 0x00020301, 0x04000304,
+ 0x00040000, 0x0F0F100E, 0x110F1011, 0x0E120D0E,
+ 0x91636761, 0xB3A8959A, 0xAEB4A9AD, 0xACADB4AD,
+ 0xB1A7ABB3, 0xA9B1A7A9, 0xB0AFB6AF, 0xB5B0AFB5,
+ 0xAFB5B0AF, 0xADA9B1AA, 0xB3ACACB4, 0xB0B8B1AB,
+ 0xB9B7BCBA, 0xBBB9B6BB, 0xB8BDBBB6, 0xBBB7BEBB,
+ 0xBEBCB7BE, 0xB7BCBAB9, 0xBEB7BCBA, 0xBFBEBBC0,
+ 0xB7BCBBBA, 0xBBBABCBC, 0xBDBBBABD, 0xB8BDBBB8,
+ 0xBFB9BFBE, 0xBFBEBAC0, 0xBABFBEBA, 0xBFBAC0BF,
+ 0xBFBEB8C0, 0xB9BFBEB9, 0xBBB5BDBD, 0xBCBCB3BB,
+ 0xB8C0C0B4, 0xC0BAC0BF, 0xC0BFBBC1, 0xB9BFBEBA,
+ 0xBFB8C0BF, 0xC0BFB8C0, 0xBAC0BFBA, 0xBEBAC0BF,
+ 0xBBB9B9BF, 0xB7BCBAB8, 0xBCB8BFBC, 0xBEBDB8BF,
+ 0xB9BEBDB9, 0xBDB8BFBC, 0xBEBDB9C0, 0xB9BFBEB8,
+ 0xBCB9C0BD, 0xBFBCB8BF, 0xB8BFBCB8, 0xBEB9BFBE,
+ 0xC0BDB9BF, 0xB7BEBBB9, 0xBDB7BEBB, 0xBFBEB9C0,
+ 0xB9BFBEB9, 0xBBB7BEBB, 0xBEBDB7BE, 0xB9BFBEB8,
+ 0xBEB9BFBE, 0xBEBFB9BF, 0xB9BFBEB9, 0xBDBAC0BF,
+ 0xC0BDB9C0, 0xBAC1BEB9, 0xBFBABFBD, 0xC0BEBCC1,
+ 0xBBC0BEBB, 0xBFBAC0BF, 0xBCBABAC0, 0xBABFBDB7,
+ 0xBCB9BFBE, 0xBFBEB5BD, 0xBAC0BFB9, 0xBEBAC0BF,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xB8B3B6B4, 0xBDBBB7BA,
+ 0xB8BDBBB8, 0xBCB8BFBC, 0xC0BDB8BF, 0xB8BFBCB9,
+ 0xBCB4BBB8, 0xBDBBB8BF, 0xBABFBDB8, 0xBCB8BFBC,
+ 0xBEBDB8BF, 0xB8BEBDB8, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xBABFBEBA, 0xBEB9BFBE, 0xBFBEB7BF, 0xB9BFBEB9,
+ 0xBDBAC1BE, 0xBFBDB9C0, 0xB8BDBBBA, 0xB9B8BDBB,
+ 0xBEB8B8BE, 0xB8BCB7BA, 0xBBBABABA, 0x6266BAB9,
+ 0x38353E63, 0x1C120E1A, 0x0E1D120D, 0x120C1D13,
+ 0x2D221C2D, 0x1C2D221C, 0x221D2C22, 0x2A0F0815,
+ 0x1D2E261D, 0x271D2E27, 0x30271C30, 0x1C30271C,
+ 0x271C3027, 0x2D271D2E, 0x1D2A251E, 0x1A132024,
+ 0x07080808, 0xBCB70809, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA, 0xBEBCBBBF,
+ 0xBBBEBCBB, 0xBBB8BDBB, 0xBEBCB8BD, 0xB8BDBBB9,
+ 0xBDBABFBE, 0xBEBCBABF, 0xB8BEB9B9, 0xBCB7BDBC,
+ 0xC0BDB8BF, 0xB8BFBAB9, 0xBDB7BEBB, 0xBEBBB9C0,
+ 0xB6BDBAB7, 0xBDB9C0BD, 0xBFBCB9C0, 0xB8BFBCB8,
+ 0xBFB8C0BF, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0BABFC0, 0xBFC0B8C0,
+ 0xB8C0C0BA, 0xC0BABFC0, 0xBFC0B8C0, 0xB9C1C1BA,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B8C0C0,
+ 0xC0C0B8C0, 0xB8C0C0B8, 0xC0B9C1C1, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0BFB8, 0xBFB8C0BF,
+ 0xBFC0B8C0, 0xBAC0BFBA, 0xBFB8C0BF, 0xC0C0B8C0,
+ 0xB8C0C0B8, 0xC0B8C0C0, 0xC0C0B8C0, 0xB8C0C0B8,
+ 0xC0B9C1C1, 0xC0C0B8C0, 0xB8C0C0B8, 0xBFB8C0C0,
+ 0xC1C0B8C0, 0xBAC1BEBB, 0xBAB9C0BB, 0xC0B9B8BF,
+ 0xB8C0B9B8, 0xB9B8C0B9, 0xC0B9B8C0, 0xB7BFB8B8,
+ 0xB9B8C0B9, 0xBFB8B8C0, 0xB8C0B9B7, 0xB6B4BCB5,
+ 0xBCB5B5BD, 0xB4BCB5B4, 0xB9B8C0B9, 0xC0B9B8C0,
+ 0xB8C0B9B8, 0xB9B8C0B9, 0xC0B9B8C0, 0xB8C0B9B8,
+ 0xB9B8C0B9, 0xC0B9B8C0, 0xB8C0B9B8, 0xB9B8C0B9,
+ 0xC0B9B8C0, 0xB8C0B9B8, 0xB9B8C0B9, 0xC0B9B8C0,
+ 0xB7BFB8B8, 0xBAB9C1BA, 0xBFB8B9C1, 0xB9C0B9B7,
+ 0xB4B5B9B4, 0xBAB5B5B9, 0xB5B9B4B6, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB6BCB7B6, 0xBAB9BFBA, 0xC0BBB8BF,
+ 0xB8BFBAB9, 0xB9B8C0B9, 0xC1BAB8C0, 0xB8C0B9B9,
+ 0xA9B1B9B2, 0xB0A9A8B0, 0xA9B0A9A8, 0xA8AAAEA8,
+ 0xAEA8AAAE, 0xABADA7AC, 0xABAFB4AB, 0xB0A5AFB4,
+ 0xB0B6ABAA, 0xA6AEB5A8, 0xB4A5AEB5, 0xAEB3A4AF,
+ 0xA0A8AFA0, 0xB1A2A8AF, 0xAEB5A6AA, 0xA4B1B5A9,
+ 0xACA0ACB0, 0xADB1A5A8, 0xA5AFB1A5, 0xB1A5AFB1,
+ 0xA9ADA1AF, 0xA4A9ADA1, 0xB2A5AAB1, 0xABB2A5AB,
+ 0xA2A9B0A3, 0x3D39A7AD, 0x0708063C, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x01000000, 0x3A3B3900, 0x52535752, 0x57515357,
+ 0x52544E55, 0x50555751, 0x56505456, 0x80807A56,
+ 0xB2BEC0BA, 0xBDB7B6B8, 0xBABCB6BD, 0xBCBABEB9,
+ 0xBEB9B9BE, 0xB6BCB7B8, 0xB9B6BCB7, 0xBDBBB8BE,
+ 0xBBBEBCBA, 0xB7BABEB9, 0xBDBBB8BC, 0xBABDBBBA,
+ 0xB7BABBB7, 0xBEBCB8BC, 0xB9BCBABB, 0xBBBABDBB,
+ 0xBDB8BABD, 0xB7BBB6B9, 0xB6B8BCB6, 0xBCB7B8BC,
+ 0xABAFAAB8, 0xC0AEB3B2, 0xBCBBBCC1, 0xB7BCBBB7,
+ 0xBCBABDBB, 0xBFBABBBE, 0xBBBFBABB, 0xBBBABDBB,
+ 0xC0BBBABD, 0xB9BDB8BC, 0xB9BABFBD, 0xBBB9B6BB,
+ 0xB7BCBAB6, 0xBBBABFBD, 0xBEBBB7BE, 0xB7BEBBB7,
+ 0xB6B5BBB6, 0xBDBBB5BB, 0xB9BEBCB8, 0xBBBABDBB,
+ 0xBDBBBABD, 0xBABDBBBA, 0xBBB8BDBB, 0xBFBDB7BE,
+ 0xB8BDBBBA, 0xBBBBBEBC, 0xBEB9BABD, 0xB4BAB5BA,
+ 0xBAB8BEB9, 0xBFBCB6BD, 0xBABFBDB8, 0xB8BBBCB8,
+ 0xBAB9BBBC, 0xB4BAB9B5, 0xB8B6BBB9, 0xB6B4B5BA,
+ 0xB7BCBAB1, 0xB5B5BBB6, 0xBDB8B5BC, 0xB8BCB7B9,
+ 0xB4B8BCB6, 0xB9B4B6BA, 0xB6BCB7B3, 0xB6B8BCB7,
+ 0xBCB7B7BB, 0xB8BCB7B8, 0x86B8BCB7, 0x54548588,
+ 0x54545454, 0x4F515452, 0x524E5054, 0x22231F51,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x02000002, 0x00000001,
+ 0x01010000, 0x00010001, 0x00020300, 0x04000204,
+ 0x00040000, 0x4210120C, 0x7D774648, 0xAEB3AA79,
+ 0xA8AEB4A9, 0xB5A8AEB5, 0xAEB5A8AE, 0xA9A9B1A7,
+ 0xB1A7A8B0, 0xABB3ACA8, 0xB1AEB5B0, 0xB7B4AFB6,
+ 0xAFB6B1B0, 0xADACB3AE, 0xBAB3ACB4, 0xB5BCB7B2,
+ 0xBBBCC1BF, 0xBDBBB8BD, 0xB8BDBBB8, 0xB9B6BDBA,
+ 0xBBB9B5BC, 0xB9BEBCB6, 0xBBB8BDBB, 0xBDBCB8BD,
+ 0xBBC0BFB8, 0xBCB9BEBD, 0xBDBBB8BD, 0xB7BEBBB8,
+ 0xBEB7BDBC, 0xBFBEB9BF, 0xBABFBEBA, 0xBFBAC0BF,
+ 0xBFBEB8C0, 0xB9BFBEB9, 0xBBB3BBBB, 0xC0C0B3BB,
+ 0xB9C1C1B8, 0xBDB9BFBE, 0xC0BFB8BE, 0xB9BFBEBA,
+ 0xBEB7BFBE, 0xBFBEB7BF, 0xB9BFBEB9, 0xBDBAC0BF,
+ 0xBDBBB9BE, 0xB6BBB9BA, 0xBCB9BEBC, 0xBEBDB8BF,
+ 0xB9BEBCB9, 0xBBB7BEBB, 0xBDBCB7BE, 0xBAC0BFB7,
+ 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8, 0xBEB7BDBC,
+ 0xC0BDB9BF, 0xB5BCB9B9, 0xBDB7BEBB, 0xBFBEB9C0,
+ 0xB9BFBEB9, 0xBEB9C0BD, 0xBEBDBAC1, 0xB6BCBBB8,
+ 0xBEB8BEBD, 0xBEBFB9BF, 0xB9BFBEB9, 0xBCB9C0BD,
+ 0xC0BDB8BF, 0xB9C0BDB9, 0xBDBBC0BE, 0xC0BEBABF,
+ 0xBAC1BEBB, 0xBEB7BFBE, 0xBCB9B7BF, 0xB9C0BDB5,
+ 0xBFB7BFBE, 0xBDBCB8C0, 0xB7BDBCB7, 0xBFB8BEBD,
+ 0xBFBEBAC0, 0xB8BDBCBA, 0xBBBABDBB, 0xBDBBBABD,
+ 0xB7BCBAB8, 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8,
+ 0xBBB5BCB9, 0xBDBBB7BE, 0xB9BEBCB8, 0xBCB8BFBC,
+ 0xBFBEB8BF, 0xB8BEBDB9, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xBABFBEBA, 0xBEB9BFBE, 0xBFBEB7BF, 0xB9BFBEB7,
+ 0xBBB6BDBA, 0xBDBBB7BE, 0xB8BDBBB8, 0xBAB8BDBB,
+ 0xBCB7B7BC, 0xB8BCB7B8, 0xB9B8BCB7, 0xBABAB8BB,
+ 0x8D8F90BA, 0x14484A4B, 0x10160F10, 0x12101612,
+ 0x06000006, 0x00060000, 0x00000400, 0x04000004,
+ 0x00040200, 0x02000604, 0x06020006, 0x00060200,
+ 0x02000402, 0x04020004, 0x00030200, 0x02000302,
+ 0x07060907, 0xBCB70609, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xBFB9BBBF, 0xBBBFB9BB, 0xB9BBBFB9, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBAB7BCBB, 0xBCBAB7BC, 0xB8BEB9B7, 0xBCB9BFBE,
+ 0xBFBCB8BF, 0xB8BFBAB8, 0xBBB7BEBB, 0xBDBBB7BE,
+ 0xB9BEBCB8, 0xBCB8BDBB, 0xBEBCB9BE, 0xB7BEBBB9,
+ 0xBEBAC1BE, 0xC0BFBAC1, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBFBBC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBB, 0xBFBBC0BF, 0xC0BFBAC0, 0xBAC0BFBB,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBAC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0,
+ 0xBAC0BFBA, 0xBFBAC0BF, 0xC0BFBAC0, 0xBBC1C0BA,
+ 0xBFBAC0BF, 0xC0BFBAC0, 0xBAC0BFBA, 0xBEBAC0BF,
+ 0xC0BFBAC1, 0xBBC0BFBB, 0xBEBAC0BF, 0xC0BFBAC1,
+ 0xBAC0BFBA, 0xBEBAC0BF, 0xC0BFB9BF, 0xBAC0BFBA,
+ 0xBEB9BFBE, 0xC0BFB9BF, 0xBAC0BFBA, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0xBBC0BEBB, 0xB9B9BFBA, 0xBFBAB9C0,
+ 0xBAC0BBB9, 0xB9B9C0B9, 0xBFBAB9C0, 0xB9BFBAB9,
+ 0xBAB9BFBA, 0xBFBAB9BF, 0xB9BFBAB9, 0xBEBEC5BE,
+ 0xC4BFBEC5, 0xBFC5C0BE, 0xB9B9C0B9, 0xBFBAB9C0,
+ 0xB9BFBAB9, 0xBAB9BFBA, 0xBFBAB9BF, 0xB9BFBAB9,
+ 0xB9B9C0B9, 0xBFBAB9C0, 0xB9BFBAB9, 0xB9B9C0B9,
+ 0xC0B9B9C0, 0xB9C0B9B9, 0xB9B9C0B9, 0xC1BAB9C0,
+ 0xB9C0B9BA, 0xB9B9C0B9, 0xBFBAB9C0, 0xB9BFBAB9,
+ 0xC0C0C4BF, 0xC3BEC1C5, 0xC0C4BFBF, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0xBABBBFBA, 0xC0B9B9BF,
+ 0xB9C0B9B9, 0xBABAC1BA, 0xC0B9BAC1, 0xB9C0B9B9,
+ 0xADB2B9B2, 0xB4ADADB4, 0xADB4ADAD, 0xAEB1B5AF,
+ 0xA7A1B2B4, 0xA0A29CA5, 0xABAFB4AB, 0xAFA6AFB4,
+ 0xB1B5AAAC, 0xA9AEB5A8, 0xB2A6AFB6, 0xB0B4A8AE,
+ 0xA4ACB3A4, 0xB3A6ACB3, 0xB0B4A8AC, 0xAAB2B3A9,
+ 0xAFA3B1B5, 0xA9B0A3AB, 0xA5AEB2A6, 0xB0A1ADB1,
+ 0xA6AD9EAB, 0xA5ABB2A5, 0xB2A5ABB2, 0xABB2A5AB,
+ 0x70A8AEA3, 0x06067476, 0x06050706, 0x00000000,
+ 0x00000000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000001,
+ 0x01000000, 0x3A3B3900, 0x52595D58, 0x57535357,
+ 0x51524E56, 0x51545551, 0x2B275455, 0x80807A2C,
+ 0xB0C2C4BE, 0xBCB6B6B9, 0xBABCB6BC, 0xB9B8BCB7,
+ 0xBEB9B8BE, 0xB8BCB7BA, 0xBAB6BCB7, 0xBCB7B9BF,
+ 0xB9BDB8B8, 0xB7BABEB9, 0xBEBCB8BC, 0xBABDBBBB,
+ 0xB9B9BDB8, 0xBFBABABE, 0xB6BCB7BB, 0xBBB8BDBB,
+ 0xBEB9B8BD, 0xB7BBB6BA, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB2B8B3B6, 0xBBB2B7B6, 0xBCBBB7BC, 0xB7BCBBB7,
+ 0xBCBBBEBC, 0xBEBCBBBE, 0xBBBEBCBB, 0xBBBABDBB,
+ 0xBFBDBABD, 0xBABDBBBC, 0xBBB9BEBC, 0xBCBAB8BD,
+ 0xBABFBDB9, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xB6B8BEB9, 0xBBB9B5BB, 0xB8BDBBB6, 0xBBBBBEBC,
+ 0xBDBBBABD, 0xBABDBBBA, 0xBCB8BDBC, 0xBFBEB8BD,
+ 0xB8BDBCBA, 0xB4B8BDBB, 0xB7B2B1B6, 0xB5BBB6B1,
+ 0xBEB7BCBA, 0xBFBDBBC0, 0xBABDBBBA, 0xB8BBBCB8,
+ 0xBAB8BBBC, 0xB7BCBAB7, 0xB7B8BBB9, 0xBDB8B8BC,
+ 0xB8BCB7B9, 0xB6B8BCB7, 0xB9B7B7BB, 0xB7BBB6B6,
+ 0xB1B8BCB6, 0xBCB5B5BA, 0xB3BAB3B5, 0xB7B7BBB6,
+ 0xB9B7B8BC, 0xB7BAB8B6, 0x54B8BBB9, 0x53535254,
+ 0x54545453, 0x4F4F5250, 0x55505054, 0x20241F51,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x00000000, 0x00020000, 0x00010500, 0x776C0006,
+ 0x70766B71, 0xA9B0B3AA, 0xB4A9AFB2, 0xB0B4A9B0,
+ 0xA6AFB6A9, 0xB5A6AEB5, 0xAEB5A8B0, 0xA7A9B1A7,
+ 0xB0A9A8B1, 0xB1B9B2A8, 0xB1ACB6B0, 0xB5B2ADB7,
+ 0xACB3AEAC, 0xADB1B8B3, 0xB8B3ADB4, 0xB2B8B3B2,
+ 0xBDBAC1BE, 0xBEBCB9C0, 0xB8BDBBB9, 0xBBB7BEBB,
+ 0xBDBBB7BE, 0xB8BDBBB8, 0xBBB8BDBB, 0xC0BFB8BD,
+ 0xB9BFBEBA, 0xBCB9BFBE, 0xBEBBB7BD, 0xBAC1BEB7,
+ 0xBEB8BEBD, 0xBFBEB9BF, 0xBABFBEBA, 0xBEB9BFBE,
+ 0xBEBDB9BF, 0xB9BFBEB8, 0xBDB5BDBD, 0xBDBDB5BD,
+ 0xB5BDBDB5, 0xBEB7BFBE, 0xBFBEB7BF, 0xB9BFBEB9,
+ 0xBCB9BFBE, 0xBFBEB7BD, 0xB9BFBEB9, 0xBEBABFBE,
+ 0xBDBBBABF, 0xB8BDBBBA, 0xBCB9BEBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBAB7BEBB, 0xBBBAB6BD, 0xB7BCBBB6,
+ 0xBAB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8, 0xBCB7BEBB,
+ 0xBFBDB8BF, 0xB6BBB9BA, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBBB9C0BD,
+ 0xBEBDB7BE, 0xB8BEBDB8, 0xBFBBC0BF, 0xC1BEBBC0,
+ 0xBBC2BFBA, 0xBEB7BFBE, 0xBEBBB7BF, 0xBAC1BEB7,
+ 0xBEB7BFBE, 0xBFBEB7BF, 0xB9BFBEB9, 0xBEB7BDBC,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xBBB8BDBB, 0xBEBCB8BD,
+ 0xB8BDBBB9, 0xBCB8BFBC, 0xBEBDB8BF, 0xB8BFBCB8,
+ 0xB9B6BBB9, 0xBDBBB8BE, 0xB9BEBCBA, 0xBCB7BEBB,
+ 0xBFBCB8BF, 0xB8BFBCB8, 0xBDB9C0BD, 0xBEBCB9C0,
+ 0xB9BEBCB9, 0xBCB8BFBC, 0xBEBBB8BF, 0xB8BDBBB7,
+ 0xBBB9BEBC, 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBAB6BBB9, 0xBBB9B7BC,
+ 0xB8BBB9B8, 0x82B9BCBA, 0x11128184, 0x1011150F,
+ 0x03000003, 0x00010000, 0x01000200, 0x01000001,
+ 0x00010000, 0x02000102, 0x03010004, 0x00010000,
+ 0x00000100, 0x01000001, 0x00000000, 0x00000000,
+ 0x07060907, 0xBBB90609, 0xB8BCB7B8, 0xBABBBFBA,
+ 0xBFB9B9BF, 0xB9C0B9BB, 0xB9BBBFB9, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB8BDBC, 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB8BFBC,
+ 0xC0BDB8BF, 0xB8BFBAB9, 0xBBB7BEBB, 0xBDBBB7BE,
+ 0xBABFBDB8, 0xBCB9BEBC, 0xBEBCB9BE, 0xB9BEBCB9,
+ 0xA19FA4A2, 0xA3A29EA3, 0x9EA3A29E, 0xA19EA3A1,
+ 0xA2A29EA3, 0xA0A2A2A0, 0xA1A0A3A1, 0xA2A2A0A3,
+ 0xA0A2A2A0, 0xA1A0A2A2, 0xA2A29EA3, 0x9EA3A2A0,
+ 0xA19EA3A2, 0xA2A29EA3, 0x9EA3A2A0, 0xA19FA4A2,
+ 0xA2A29EA3, 0x9EA3A2A0, 0xA19EA3A1, 0xA2A29EA3,
+ 0x9EA3A2A0, 0xA19EA3A2, 0xA2A29EA3, 0x9EA3A2A0,
+ 0xA19EA3A1, 0xA2A29EA3, 0x9EA3A2A0, 0xA19EA3A1,
+ 0xA2A29EA3, 0xA0A2A2A0, 0xA19EA3A1, 0xA2A29EA3,
+ 0x9EA3A2A0, 0xA19EA3A2, 0xA2A29EA3, 0x9EA3A2A0,
+ 0xA09EA3A2, 0xA3A29DA2, 0x9EA3A29E, 0xA29EA3A1,
+ 0xA3A29FA4, 0xA0A2A29E, 0x9FA0A49F, 0xA3A1A0A4,
+ 0xA0A3A1A0, 0x9FA0A49F, 0xA3A1A0A4, 0xA0A3A1A0,
+ 0x9FA1A4A2, 0xA3A1A0A4, 0x9FA39EA0, 0xA2A3A7A2,
+ 0xA6A4A3A7, 0xA3A7A2A3, 0x9FA0A49F, 0xA3A1A0A4,
+ 0xA0A3A1A0, 0xA1A0A3A1, 0xA3A1A0A3, 0x9FA2A0A0,
+ 0x9FA0A49F, 0xA3A19EA4, 0x9EA49FA0, 0x9FA0A49F,
+ 0xA3A19EA4, 0x9EA49FA0, 0x9EA0A49E, 0xA49FA0A4,
+ 0x9FA39EA0, 0x9FA0A49F, 0xA3A19EA4, 0xA0A3A1A0,
+ 0x9FA0A3A1, 0xA3A1A0A4, 0xA0A49FA0, 0x9FA0A3A1,
+ 0xA3A1A0A4, 0x9FA39EA2, 0x9FA0A3A1, 0xA49FA0A4,
+ 0x9EA49FA0, 0x9EA0A49F, 0xA49F9DA3, 0xA7ADA8A0,
+ 0xADB9BDB7, 0xB4ADADB4, 0xAFB3ADAD, 0xADB0B4AE,
+ 0xB4AEB1B3, 0xB2B4AEB2, 0xABAFB4AB, 0xAFA6AFB4,
+ 0xB1B4ABAC, 0xA8AEB4A9, 0xB4A8AEB5, 0xAEB2A6B0,
+ 0xA6ACB3A6, 0xB2A6ACB3, 0xB0B4A8AE, 0xA5B2B4A8,
+ 0xB5A8ADB1, 0xA9B0A3AE, 0xA8ADB1A5, 0xB0A3B0B4,
+ 0xA9B0A3A9, 0xA6ABB2A5, 0xB1A6A9B1, 0xB3BBB0A9,
+ 0x03AAACA6, 0x05070607, 0x06050706, 0x00010101,
+ 0x00010000, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000001,
+ 0x01000000, 0x3A3B3900, 0x54585C57, 0x56525559,
+ 0x5A5B5755, 0x27545551, 0x00002A2B, 0x807F7B02,
+ 0xB0C2C4BE, 0xBCB6B6B9, 0xBABCB6BC, 0xB7B8BCB7,
+ 0xBEB9B6BC, 0xB8BCB7BA, 0xB9B6BCB7, 0xBCB7B8BE,
+ 0xBBBFBAB8, 0xB7BABEB9, 0xBDBBB8BC, 0xBABDBBBA,
+ 0xB9B7BBB6, 0xBEB9B8BE, 0xB9BFBAB8, 0xBBB8BDBB,
+ 0xBBB6B8BD, 0xB7BBB6B7, 0xB7B8BCB7, 0xBCB7B8BC,
+ 0xB6BCB7B6, 0xBAB7BCBA, 0xBCBBB7BC, 0xB9BCBAB7,
+ 0xBCBBBEBC, 0xBEBCBBBE, 0xBBBEBCBB, 0xBBBABDBB,
+ 0xC0BEBABD, 0xBCBFBDBD, 0xB9BABFBD, 0xBBB9B6BB,
+ 0xBBBEBCB8, 0xBBBABFBD, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xB7B8BEB9, 0xBDBBB6BC, 0xB8BDBBB8, 0xBABCBFBD,
+ 0xBDBBB9BC, 0xBABDBBBA, 0xBBB8BDBC, 0xBFBEB7BC,
+ 0xBABFBEBA, 0xBBB8BDBB, 0xBEB9B8BD, 0xB5BBB6B8,
+ 0xBAB8BDBB, 0xBDBBB7BC, 0xBABDBBBA, 0xB7B9BDB8,
+ 0xBBB9B8BC, 0xB7BAB8B8, 0xB7B8BCB7, 0xBCB6B8BC,
+ 0xB8BCB6B8, 0xB7B8BCB7, 0xBBB9B8BC, 0xB8BCB7B8,
+ 0xB3B7BBB5, 0xBCB5B5B9, 0xB3BAB3B5, 0xB6B9BDB8,
+ 0xBBB6B7BB, 0xB7BAB8B7, 0x54B8BBB9, 0x20205254,
+ 0x54545420, 0x50515353, 0x53514F52, 0x20232150,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000000,
+ 0x15130001, 0x3A403B12, 0xA370756C, 0xAEA3A8AE,
+ 0xA8AEA3A8, 0xAAB0B4A9, 0xB4A8B1B5, 0xB0B4A8B0,
+ 0xA9AEB5A8, 0xB4A8AFB6, 0xAEB5A8B0, 0xA7ACB4AA,
+ 0xB3ACA8B1, 0xAEB6AFAB, 0xB3ACB6B0, 0xB5B2AFB9,
+ 0xAAB1ACAC, 0xADB2B9B2, 0xB3AEADB4, 0xB6BCB7AD,
+ 0xBBBBC0BE, 0xBCBAB8BD, 0xB6BBB9B7, 0xBBB8BDBB,
+ 0xBDBBB7BE, 0xB8BDBBB8, 0xBBB8BDBB, 0xBFBEB8BD,
+ 0xB9BFBEBA, 0xBCB7BDBC, 0xBFBCB7BD, 0xB7C0BDB8,
+ 0xBEB9BFBE, 0xBEBDB9BF, 0xBABFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xB9BFBEB9, 0xBDB5BDBD, 0xBDBDB5BD,
+ 0xB8C0C0B5, 0xBEB7BFBE, 0xBFBEB7BF, 0xB9BFBEB9,
+ 0xBCB9BFBE, 0xBDBCB7BD, 0xB9BFBEB7, 0xBEBABFBE,
+ 0xBFBDBABF, 0xB8BDBBBC, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBBB7BEB9, 0xBCBBB7BE, 0xB8BDBCB7,
+ 0xBCB8BFBC, 0xBEBBB8BF, 0xB8BFBCB7, 0xBAB7BEBB,
+ 0xBDBBB6BD, 0xB6BBB9B8, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xB9BFBEB9, 0xBEB8BEBD, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBEBDB9BF, 0xBAC0BFB8, 0xBBB9C0BD,
+ 0xBFBEB7BE, 0xB9BFBEB9, 0xBFBBC0BF, 0xC1BEBBC0,
+ 0xBAC1BEBA, 0xBFB9BFBE, 0xBEBBB8C0, 0xBAC1BEB7,
+ 0xBEB7BFBE, 0xBFBEB7BF, 0xBAC0BFB9, 0xBCB9BFBE,
+ 0xBDBCB7BD, 0xB7BCBBB8, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBCB7BEBB, 0xBDBCB8BF, 0xB8BEBDB7,
+ 0xBBB7BEBB, 0xBDBBB8BD, 0xBABFBDB8, 0xBCB8BFBC,
+ 0xBFBCB8BF, 0xB8BFBCB8, 0xBBB7BEBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBBB7BEBB, 0xBDBBB7BE, 0xB8BDBBB8,
+ 0xBCB8BDBB, 0xBDBBB9BE, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xB8B6BBB9, 0xBDB8B5BA,
+ 0xB6BCB7B7, 0xB7B8BCB7, 0xBABAB8BC, 0x484A4BB8,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000001,
+ 0x01010000, 0x00000003, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x7D7B0102, 0xB8BCB77A, 0xB8B9BFBA,
+ 0xC0B9B7BF, 0xB8C0B9B9, 0xB8B8BFB8, 0xBFB8B8BF,
+ 0xB8BEB9B8, 0xBBB9BEBC, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xB9B7BDB8, 0xBDBBB8BE,
+ 0xB8BDBBB8, 0xB7B6BCB7, 0xBBB9B6BC, 0xB9BCBAB8,
+ 0x08191C1A, 0x0909070A, 0x07090907, 0x08070A08,
+ 0x0909070A, 0x09090909, 0x08090A08, 0x0909090A,
+ 0x09090909, 0x09090909, 0x080A0709, 0x07090909,
+ 0x09070909, 0x09090709, 0x09090909, 0x09090909,
+ 0x080A0709, 0x09090909, 0x08090A08, 0x0909070A,
+ 0x09090909, 0x09090909, 0x09090709, 0x09090909,
+ 0x09090909, 0x09090709, 0x09090909, 0x08090A08,
+ 0x0909090A, 0x09090909, 0x08090A08, 0x0909070A,
+ 0x09090909, 0x09090909, 0x080A0709, 0x09090909,
+ 0x09090909, 0x090A0709, 0x07090907, 0x08070A08,
+ 0x0909070A, 0x09090907, 0x09090909, 0x080A0909,
+ 0x09080A09, 0x08090909, 0x0909090A, 0x09090909,
+ 0x08090909, 0x0909090A, 0x090A0809, 0x08090A08,
+ 0x0909090A, 0x09090909, 0x08090909, 0x0909090A,
+ 0x09090909, 0x09090909, 0x09090909, 0x09090909,
+ 0x09090909, 0x09090709, 0x07090909, 0x08090909,
+ 0x0909070A, 0x07090909, 0x08090A08, 0x0909090A,
+ 0x09090909, 0x08090909, 0x0909070A, 0x09090909,
+ 0x08090909, 0x0909090A, 0x090A0809, 0x08090909,
+ 0x0909090A, 0x090A080B, 0x080A0A0A, 0x0A08090A,
+ 0x070A0809, 0x0A0B0C0A, 0x0D0B090C, 0x1F22200C,
+ 0xAFB2B3AF, 0xB4AEB0B4, 0xB0B4AEB0, 0xAEAEB2AC,
+ 0xB4AEB0B4, 0xAEB2ACB0, 0xAAB0B5AC, 0xAFA9AEB3,
+ 0xAEB1A8AD, 0xAAB2B8AD, 0xB4A9AFB5, 0xB0B4A9B0,
+ 0xA9B0B4A9, 0xB5A9B1B5, 0xB0B4A8B1, 0xA8B0B4A8,
+ 0xB4A7B0B4, 0xAEB5A8AD, 0xA3A8ACA0, 0xAFA3ABAF,
+ 0xAEB4A9AB, 0xA7AAB2A7, 0xAFA8A9B1, 0xA9B0A9A8,
+ 0x00181917, 0x00010000, 0x00000100, 0x01000000,
+ 0x00010101, 0x00000100, 0x00000000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x01000000, 0x3F424000, 0x59585B59, 0x5B59585B,
+ 0x595C5A58, 0x00000100, 0x00000001, 0x817F7E02,
+ 0xB0C2C4BE, 0xBCB6B6B9, 0xB9BAB6BC, 0xB8B7BDB8,
+ 0xBCBAB7BD, 0xB8BBB9B9, 0xBAB5BAB8, 0xBAB5B7BC,
+ 0xBABEB9B6, 0xB9BABDBB, 0xBFBDB6BB, 0xBBBEBCBC,
+ 0xB8B6BCB7, 0xBDBBB7BD, 0xB5BCB9B8, 0xBEB7BCBB,
+ 0xBCB7BBC0, 0xB8BCB7B8, 0xBABBBFBA, 0xBFB9BBBF,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBEBCBBBF, 0xBBBFBABB,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xB7BCC0BB, 0xBBB6B8BC,
+ 0xBBBFBAB7, 0xBABCC0BB, 0xBFBABBBF, 0xBCC0BBBB,
+ 0xB7BBBFBA, 0xBDBBB8BC, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xBABDBBBA, 0xBCBABDBB, 0xBFBDBBBE,
+ 0xBCBFBDBC, 0xBABABDBB, 0xC0BBB9BC, 0xB6BCB7BA,
+ 0xBABBBFBA, 0xBEBABBBF, 0xBBBFBABD, 0xB9B9BDB8,
+ 0xBCBAB8BE, 0xB6BBB9B7, 0xB7B9BDB8, 0xBDB7B8BC,
+ 0xB9BDB7B9, 0xB7B8BCB7, 0xBCB7B8BC, 0xB0B4AFB8,
+ 0xB4B3B7B2, 0xB8B3B5B9, 0xB3B9B4B2, 0xB5B6BDB6,
+ 0xBCB5B5BC, 0xB3B9B4B5, 0x43C0C4BF, 0x08084448,
+ 0x08080808, 0x58575959, 0x58585658, 0x1F1F1F58,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010100,
+ 0x08050707, 0x09070608, 0x060A0506, 0x613C413F,
+ 0xAFAA5F66, 0xA8B0A9A9, 0xA7B4BCB2, 0xB0A6A9B1,
+ 0xACB4A9A8, 0xA9AEB4A9, 0xB5A8AEB4, 0xAFB6A9AE,
+ 0xA9B0B4A9, 0xB4AAB0B4, 0xB1B4ABB3, 0xAAABB4AA,
+ 0xB4ACA7B2, 0xABB6AEA9, 0xAFAEB6AF, 0xB3AEAEB6,
+ 0xAEB5B0AC, 0xB1B1B8B1, 0xB1ACB1B8, 0xB1B7B2AB,
+ 0xBAB8BDBB, 0xBBB9B9BC, 0xB6BBB9B8, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB9BCBABA, 0xBCBABCBC, 0xBFBEB8BD,
+ 0xB8BDBCBA, 0xBEB8BDBC, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBABFBEBA, 0xBDB7BEBB,
+ 0xBDBCB9C0, 0xB9BFBEB8, 0xBBB4BCBB, 0xBFBEB4BC,
+ 0xB7BFBEB7, 0xBCB7BDBC, 0xBEBDB7BD, 0xB7BDBCB8,
+ 0xBBBBC0BE, 0xBDBCB8BD, 0xB9BEBDB8, 0xBFB9BFBE,
+ 0xBFBDBAC0, 0xB6BBB9BA, 0xBBB9C0BD, 0xBEBBB7BE,
+ 0xB9C0BDB7, 0xBDB8BDBB, 0xBFBEBABF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBCBBC0BF,
+ 0xBDBBB8BD, 0xB6BBB9B8, 0xBDB7BEBB, 0xBFBEB9C0,
+ 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBDB9BFBE, 0xBFBEB8BE, 0xB9BFBEB9, 0xBBB9C0BD,
+ 0xBFBEB7BE, 0xBAC0BFB9, 0xBEB9BFBE, 0xBFBDB9BF,
+ 0xB9C0BDBA, 0xBCBAC0BF, 0xBDBCB7BD, 0xBAC0BFB7,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBFB9BFBE,
+ 0xBFBEBAC0, 0xB8BDBCBA, 0xBBB9BEBC, 0xBCBAB8BD,
+ 0xBABFBDB7, 0xBDB9C0BD, 0xBFBEB9C0, 0xB9BFBEB9,
+ 0xBAB5BBBA, 0xBCBBB5BB, 0xB7BDBCB6, 0xBCB7BDBC,
+ 0xBDBCB7BD, 0xB7BEBBB7, 0xB9B8BDBB, 0xBDBBB8BE,
+ 0xB8BDBBB8, 0xBBB8BDBB, 0xBFBDB8BD, 0xBABDBBBC,
+ 0xBBB8BEB9, 0xBDBCB8BD, 0xB6BBBAB8, 0xB9B8BDBB,
+ 0xBDBBB8BE, 0xB6BBB9B8, 0xB6B8BCB7, 0xBCB7B7BB,
+ 0xB8BCB7B8, 0xB9B6BCB7, 0xC0BFB6BB, 0xBBC0BFBB,
+ 0x3F797B7C, 0x00003E3D, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x03010102,
+ 0x00000000, 0x01000000, 0xB8BBB900, 0xB9B9BFBA,
+ 0xC0B9B8C0, 0xB8C0B9B8, 0xB8B7BFB8, 0xBEB7B7BF,
+ 0xB7BEB7B7, 0xBBB8BEB9, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB7BCBA,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xB8B8BEB9, 0xBDBBB7BD,
+ 0xB8BDBBB8, 0xB7B6BCB7, 0xBBB9B6BC, 0x474A48B8,
+ 0x00000100, 0x01010001, 0x00000001, 0x00000100,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x02000102, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000000,
+ 0x00010000, 0x02000002, 0x00000000, 0x00000000,
+ 0x02000102, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000100,
+ 0x00010000, 0x02000102, 0x00000000, 0x00010000,
+ 0x02000102, 0x00000000, 0x00010000, 0x02000102,
+ 0x00000000, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x00020000, 0x00010200,
+ 0x02000102, 0x00020000, 0x00000200, 0x02000002,
+ 0x00020000, 0x00000200, 0x02000002, 0x00020000,
+ 0x00010200, 0x02000102, 0x00020000, 0x00010200,
+ 0x02000102, 0x00020000, 0x00010200, 0x02000102,
+ 0x01000001, 0x00010000, 0x00000100, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00010000,
+ 0x02000102, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x02000002, 0x01000000, 0x00000101,
+ 0x01010100, 0x00000000, 0x00000000, 0x00010000,
+ 0xAF3E3F3D, 0xB5AFB2B3, 0xB0B4AEB1, 0xADB1B8B1,
+ 0xB4AEADB4, 0xB0B4AEB0, 0xACB0B5AC, 0xB2ACB0B5,
+ 0xAEB1A8B0, 0xAAB1B5AA, 0xB5AAAFB5, 0xB0B4A9B1,
+ 0xAAB3B7AC, 0xB5A9B1B5, 0xB1B5A9B1, 0xA6AFB4A5,
+ 0xB5A8B0B5, 0xAEB5A8AE, 0xA0ADB1A5, 0xB0A5A8AC,
+ 0xABB1A6AC, 0xA9A9B1A7, 0xB0ABA9B0, 0x040705AA,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010101,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01010001, 0x00000001, 0x01010101,
+ 0x01000101, 0x3E413F00, 0x59585B59, 0x3D3B585B,
+ 0x0001003A, 0x00000000, 0x00000000, 0x83818002,
+ 0xB0BEC0BA, 0xBBB7B6B9, 0xBABBB7BC, 0xB9B6BCB7,
+ 0xBDBBB8BE, 0xB8BBB9BA, 0xB8B8BDBB, 0xBBB6B5BA,
+ 0xB9BDB8B7, 0xBBB7BCBA, 0xBDBBB8BD, 0xB6BBB9BA,
+ 0xBAB6BCB7, 0xBEBBB9BF, 0xB8BFBCB7, 0xBDBBC0BF,
+ 0xBBB9B9BE, 0xB8BCB7B8, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFB9BB, 0xBABBBFBA, 0xBEBABBBF, 0xBDBEBABD,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xB7BCC0BB, 0xBCB7B8BC,
+ 0xBCC0BBB8, 0xBABABEB9, 0xBFBABBBF, 0xBBBFBABB,
+ 0xB7BBBCB8, 0xBDBBBABB, 0xB8BDBBBA, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xBABDBBBA, 0xBABABDBB, 0xBFBDB9BC,
+ 0xBCBFBDBC, 0xBBB9BCBA, 0xBEB9BABD, 0xB6BCB7B8,
+ 0xBABBBFBA, 0xBEBABBBF, 0xBBBFBABD, 0xB9B8BEB9,
+ 0xBEB9B8BE, 0xB8BEB9B8, 0xB8B8BEB9, 0xBDB8B7BD,
+ 0xB7BEB7B7, 0xB7B8BCB7, 0xBCB7B8BC, 0xB5B9B4B8,
+ 0xB4B4B8B3, 0xB9B4B5B9, 0xB3B9B4B3, 0xB4B5BCB5,
+ 0xBDB6B4BB, 0xB5BCB5B6, 0x42C1C5BF, 0x09074347,
+ 0x08080808, 0x581D1F1F, 0x58585658, 0x1F1F1F58,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x06050707, 0x78730508, 0xA9AFAA74, 0xA9A7AEA9,
+ 0xB1AAA8B0, 0xA8B0A9A9, 0xAAA8B1A7, 0xB6ACABB4,
+ 0xADB5ABAE, 0xAAAEB4A9, 0xB6A9AFB5, 0xAFB5AAAF,
+ 0xACB1B4AB, 0xB1A8B2B5, 0xB1B4ABB0, 0xADADB5AE,
+ 0xB5ADAAB5, 0xABB6AEAA, 0xADB0B8B1, 0xB3AEACB4,
+ 0xB1B8B3AC, 0xB1B1B8B1, 0xB5B0B1B8, 0xB1B7B2AF,
+ 0xBCBBBEBC, 0xBBB9BBBE, 0xB8BBB9B8, 0xBBB6BBB9,
+ 0xBDBBB8BD, 0xB9BEBCB8, 0xBDBABCBC, 0xBDBCB9BE,
+ 0xB7BCBBB8, 0xBFBABFBE, 0xBDBCBBC0, 0xB9BFBEB7,
+ 0xBCB8BEBD, 0xBDBCB7BD, 0xB8BDBCB8, 0xBBB7BEBB,
+ 0xBCBBB7BE, 0xB8BDBCB7, 0xBBB6BCBB, 0xBCBBB4BC,
+ 0xB5BDBCB4, 0xBCB7BDBC, 0xBCBBB7BD, 0xB7BDBCB6,
+ 0xB9BABFBD, 0xBCBBB6BB, 0xBBC0BFB7, 0xBEB7BDBC,
+ 0xBFBDB9BF, 0xB9BEBCBA, 0xBDB9C0BD, 0xBCB9B9C0,
+ 0xB9C0BDB5, 0xBDB8BDBB, 0xBFBEBABF, 0xB9BFBEB9,
+ 0xBEB9BEBF, 0xBFC0B8BD, 0xBABFC0BA, 0xBEBABFBE,
+ 0xBFBDBABF, 0xB6BBB9BA, 0xBDB6BDBA, 0xBEBDB9C0,
+ 0xB9BFBEB8, 0xBEB7BDBC, 0xBFBEB9BF, 0xB9BFBEB9,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xB9BFBEB9, 0xBBB8BFBC,
+ 0xBFBEB7BE, 0xB9BFBEB9, 0xBFBAC0BF, 0xBFBDBAC0,
+ 0xBABFBDBA, 0xBCB9BFBE, 0xBDBCB7BD, 0xB9BFBEB7,
+ 0xBEBAC0BF, 0xBFBEB9BF, 0xB9BFBEB9, 0xBEB9BFBE,
+ 0xBFBEB9BF, 0xBABFBEBA, 0xBBBABFBD, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBDB9C0BD, 0xC0BFB9C0, 0xB9BFBEBA,
+ 0xBAB3BBBB, 0xBDBDB2BA, 0xB5BDBDB5, 0xBCB5BDBC,
+ 0xBDBCB5BD, 0xB7BDBCB5, 0xBBB8BDBB, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBBB8BDBB, 0xBDBBB8BD, 0xBABDBBBA,
+ 0xBBB8BEB9, 0xBDBCB8BD, 0xB7BCBBB8, 0xB9B9BEBC,
+ 0xBDBBB8BE, 0xB7BCBAB8, 0xB8B7BBB6, 0xBCB7B9BD,
+ 0xB8BCB7B8, 0xB9B9BEBC, 0xBBB9B6BB, 0xB8BDBCB6,
+ 0xB8B6B8B8, 0x7B7BB8B8, 0x0000007B, 0x01000000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x02000003,
+ 0x00000000, 0x00000000, 0x3C3F3D00, 0xBAB8BEB9,
+ 0xC0B9BAC1, 0xB8C0B9B8, 0xB8B6BEB7, 0xBFB8B7BF,
+ 0xB7BEB7B8, 0xB7B6BCB7, 0xBCB7B6BC, 0xB6BCB7B6,
+ 0xB8B8BEB9, 0xBDBBB7BD, 0xB8BDBBB8, 0xB8B8BEB9,
+ 0xBDBBB7BD, 0xB7BCBAB8, 0xB9B6BCB7, 0xBDBBB8BE,
+ 0xBABDBBBA, 0xB8B9BCBA, 0xBBB9B7BA, 0x10110FBA,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00010200, 0x00000100, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00010000, 0x00000100,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x01020001,
+ 0x73000301, 0xB3AE7478, 0xB0B4AFAF, 0xB1B0B7B0,
+ 0xB9AFB0B8, 0xADB5ABB1, 0xABB1B9AF, 0xB5ACAFB4,
+ 0xAEB1A8B2, 0xAAB1B5AA, 0xB4ABAFB5, 0xAFB5AAAF,
+ 0xA9B2B6AB, 0xB6A9B1B5, 0xB0B7AAAF, 0xA9B0B7AA,
+ 0xB5AAAFB6, 0xB0B4A9B1, 0xA2ADB1A5, 0xB2A6AAAE,
+ 0xACB2A7AE, 0xAAAAB2A8, 0x3D3DA9AF, 0x0504063D,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x01000000, 0x40413F00, 0x3B585B59, 0x00003A3D,
+ 0x00000000, 0x01010101, 0x00000101, 0x82807F02,
+ 0xB0BFC1BB, 0xBBB7B6B9, 0xBABBB7BC, 0xB6B9BDB7,
+ 0xBCB7B6BD, 0xB8BCB7B8, 0xB6B9BFBA, 0xBBB6B5BB,
+ 0xBABEB9B7, 0xBBB6BBB9, 0xC0BBB8BD, 0xB6BCB7BA,
+ 0xB9B6BCB7, 0xC0BDB7BE, 0xB8BFBCB9, 0xBEB9BFBE,
+ 0xBBB9B9BF, 0xB8BDBBB6, 0xBABBBEBC, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBABBBFBA, 0xBEBABBBF, 0xBDBEBABD, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xB7BCC0BB, 0xBBB9B8BC,
+ 0xBDC0BEB8, 0xBBBBBFBA, 0xBFBABCC0, 0xBBBFBABB,
+ 0xB7BCBDB9, 0xBBB9BABB, 0xB9BCBAB8, 0xBEBABCBC,
+ 0xBFBDBCBE, 0xBCBDBBBE, 0xBBBBBEBC, 0xBBB9BABD,
+ 0xBABDBBB8, 0xBBBABDBB, 0xBDBBBABD, 0xB8BBB9BA,
+ 0xBABBBFBA, 0xC0BBBBBF, 0xBBBFBABC, 0xB7B8BFB8,
+ 0xBFB8B7BE, 0xB7BDB8B8, 0xB8B7BDB8, 0xBDB8B7BD,
+ 0xB7BDB8B7, 0xB7B8BCB7, 0xBCB7BABB, 0xB5B9B4B8,
+ 0xB7B5B9B4, 0xBAB3B8BC, 0xB1B8B1B3, 0xB6B7BBB6,
+ 0xBBB6B7BB, 0xB6BCB7B5, 0x43BFC3BE, 0x09074448,
+ 0x08080808, 0x1E020301, 0x5A581F20, 0x1E1F1D59,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x01020000, 0x00000100, 0x39370001, 0x6A6F6D36,
+ 0xAA727775, 0xAFAAA9AF, 0xA7AFA8A9, 0xA9A9B1AA,
+ 0xB0A8A8B0, 0xA6B1A7A5, 0xACA8B1A7, 0xB4AAADB6,
+ 0xADB5ABAC, 0xAAADB5AA, 0xB5AAADB5, 0xAFB5AAAF,
+ 0xAFAEB3AA, 0xB5ACB1B5, 0xAEB3AAB2, 0xAEAEB5AE,
+ 0xB6ACADB5, 0xAFB7B0AD, 0xB0B0B8B1, 0xB5B0AEB5,
+ 0xAFB6B1AE, 0xB0AFB5B0, 0xB5B0AFB5, 0xB1B7B2AF,
+ 0xB9C0C4BF, 0xBDB8BABE, 0xB9BDB8B9, 0xB9B6BCB7,
+ 0xBDBBB8BE, 0xB7BEBBB8, 0xBDBABFBE, 0xBFBEB8BE,
+ 0xBAC0BFB9, 0xBFB9BEBF, 0xBDBEB9BE, 0xB7BCBDB8,
+ 0xBCB9BEBD, 0xBDBBB8BD, 0xB8BDBBB8, 0xBBB7BEBB,
+ 0xBDBBB7BE, 0xB8BDBBB8, 0xB9B5BCB9, 0xBDBAB5BC,
+ 0xB5BCB9B6, 0xBCB7BDBC, 0xBEBDB7BD, 0xB7BDBCB8,
+ 0xB7BABFBD, 0xBBB9B8BC, 0xBABFBDB6, 0xBCB9BFBE,
+ 0xC0BDB7BD, 0xB7BEBBB9, 0xBDB9BFBE, 0xBFBEB8BE,
+ 0xB7BDBCB9, 0xBDBABFBD, 0xBFBEBABF, 0xB9BEBFB9,
+ 0xBEB8BEBD, 0xBCBBB9BF, 0xB7BDBCB6, 0xBFBABFBE,
+ 0xBFBDBBC0, 0xB5BAB8BA, 0xBCB7BEBB, 0xBEBDB8BF,
+ 0xB9BFBEB8, 0xBAB7BEBB, 0xBEBCB6BD, 0xBABFBDB9,
+ 0xBEBAC0BF, 0xBFBEB9BF, 0xB9BFBEB9, 0xBCB9C0BD,
+ 0xBFBEB8BF, 0xB9BFBEB9, 0xBEB9BFBE, 0xBFBDB9BF,
+ 0xBABFBDBA, 0xB9BABFBD, 0xBDBCB6BB, 0xB8BEBDB7,
+ 0xBDB9BFBE, 0xBDBCB8BE, 0xB8BEBDB7, 0xBBB8BFBC,
+ 0xBDBCB7BE, 0xB8BEBDB7, 0xBDB8BFBC, 0xBFBEB9C0,
+ 0xB9BFBEB9, 0xBBB6BBB9, 0xBCBBB8BD, 0xB9BFBEB6,
+ 0xBBB2BABA, 0xBDBDB3BB, 0xB3BDBDB3, 0xBDB3BDBD,
+ 0xBBBBB3BD, 0xB4BFBDB1, 0xBBB7BDBC, 0xBDBCB6BC,
+ 0xB7BDBCB7, 0xBCB7BCBA, 0xBDBBB9BE, 0xB8BDBBB8,
+ 0xBBBBBEBC, 0xBDBBBABD, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBEB9B8BD, 0xB8BEB9B8, 0xB9B5BAB8, 0xBBB9B6BB,
+ 0xB8BBB9B8, 0xB9BBBEBC, 0xBAB8B8BB, 0xB8BBB9B7,
+ 0xB8B8B9B7, 0xB8B8B8B8, 0xB9B9B9BA, 0x003A3A3A,
+ 0x00000000, 0x00000000, 0x00000100, 0x00000001,
+ 0x02000002, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0xB87F837E,
+ 0xC1BAB8BF, 0xB8C0B9BA, 0xB8B8BFB8, 0xBFB8B8BF,
+ 0xB9C0B9B8, 0xB9B8BEB9, 0xBCB7B8BE, 0xB6BCB7B6,
+ 0xB6B6BCB7, 0xBDBBB5BB, 0xB8BDBBB8, 0xB6B8BEB9,
+ 0xBDBBB5BB, 0xB9BFBAB8, 0xB7B8BEB9, 0xBDB8B6BC,
+ 0xBABDBBB9, 0xBAB8BBB9, 0x4A48B9BC, 0x10110F49,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x02000003, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00010200, 0x00000100, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00010000, 0x00000100,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000301, 0xB4AF0004, 0xB0B4AFB0, 0xB1B2B9B2,
+ 0xB8AEB0B8, 0xB1B9AFB0, 0xACB1B9AF, 0xB5ACAEB6,
+ 0xB0B3AAB2, 0xAAAFB5AA, 0xB5ACAFB5, 0xB1B6ADB0,
+ 0xA9B0B6AB, 0xB7AAAFB6, 0xB0B7AAB0, 0xA9AEB5A8,
+ 0xB6ABAFB6, 0xB0B4A9B2, 0xAAADB1A6, 0xB3A8AFB5,
+ 0xAEB4A9AD, 0x3AABAFA9, 0x05073B3F, 0x08050706,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x82807F02,
+ 0xAFBEC0BA, 0xBCB6B5B8, 0xB9BAB6BC, 0xB8B9BDB7,
+ 0xBCB7B8BF, 0xB6BCB7B6, 0xB7B8BEB9, 0xBBB6B6BC,
+ 0xBABEB9B7, 0xB9B6BCB7, 0xBEB9B8BE, 0xB6BCB7B8,
+ 0xBAB5BBB6, 0xBEBCB9BF, 0xB9BEBCB9, 0xBBBBC0BF,
+ 0xBCBAB7BC, 0xBCBFBDB7, 0xBCBBBEBC, 0xBEBCBBBE,
+ 0xBBBFBABB, 0xBABBBEBC, 0xBEBCBBBF, 0xBBBFBABB,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xB7BCC0BB, 0xBBB9B8BC,
+ 0xBCBFBDB8, 0xB9BCBFBD, 0xBDBBBABE, 0xBBBFBABA,
+ 0xB9BBBCBA, 0xBBB9BABB, 0xBDC0BEB8, 0xBCBABCBC,
+ 0xBDBBBABC, 0xBABDBBBC, 0xBAB9BCBA, 0xBDBBB9BF,
+ 0xB8BBB9BA, 0xBEBABDBB, 0xBFBDBDC0, 0xB8BBB9BC,
+ 0xBABBBFBA, 0xBFBAB9BF, 0xB9C0B9BB, 0xB5B7BFB8,
+ 0xBEB7B6BF, 0xB7BEB7B7, 0xB8B6BDB8, 0xBDB8B6BD,
+ 0xB7BDB8B6, 0xB7B7BBB6, 0xBCB7BABB, 0xB4B8B3B8,
+ 0xB7B5B9B4, 0xBDB6B8BC, 0xB6BDB6B6, 0xB6B6BAB5,
+ 0xBBB6B7BB, 0xB6BCB7B5, 0x45C1C5C0, 0x08084447,
+ 0x08080808, 0x01020202, 0x03010203, 0x02030102,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00010101, 0x01000001,
+ 0x1A1B1700, 0x6B6C706B, 0xA7A26C70, 0xA1A7A2A1,
+ 0xA9A8AEA9, 0xB0A9A9B0, 0xA8B0A9A9, 0xA9A8B0A9,
+ 0xB1A7A8B0, 0xA8B1A7A8, 0xABA8B1A7, 0xB5ABADB5,
+ 0xAEB6ABAD, 0xAAADB5AA, 0xB5AAADB5, 0xB0B6ABAF,
+ 0xACAEB3AA, 0xB5ACB0B5, 0xB0B3AAB2, 0xADACB4AA,
+ 0xB6ACAFB7, 0xB1B9AFAE, 0xAFB0B8B1, 0xB5B0AEB6,
+ 0xAEB5B0AE, 0xB0AFB5B0, 0xB5B0AFB5, 0xB3B7B2AF,
+ 0xBDC0C4BF, 0xBAB8BEC2, 0xB8BCB7B7, 0xB7B8BEB9,
+ 0xBCB9B6BC, 0xB8BFBCB5, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB7BFBEB7, 0xBEB9BFBE, 0xBEBFB9BF, 0xB9BFBEB9,
+ 0xBDB9BEBD, 0xBDBBB9BE, 0xB8BDBBB8, 0xBBB7BEBB,
+ 0xBDBBB7BE, 0xB8BDBBB8, 0xBAB9C0BD, 0xBDBAB6BD,
+ 0xB9C0BDB6, 0xBCB7BDBC, 0xBDBCB7BD, 0xB7BEBBB7,
+ 0xB7BABFBD, 0xBDBBB6BC, 0xBABFBDB8, 0xBDBAC0BF,
+ 0xC0BDB8BE, 0xB9C0BDB9, 0xBFB9BFBE, 0xBFBEBAC0,
+ 0xB9BFBEB9, 0xBDB8BDBB, 0xBEBDBABF, 0xB9BFBEB8,
+ 0xBDB9C0BD, 0xC1BEB9C0, 0xB9C0BDBA, 0xBBBABFBD,
+ 0xBDBBB8BD, 0xB6BBB9B8, 0xBDB9C0BD, 0xBEBDB9C0,
+ 0xB9BFBEB8, 0xBBB7BEBB, 0xBDBBB7BE, 0xB6BBB9B8,
+ 0xBEB7BDBC, 0xC0BFB9BF, 0xB9BFBEBA, 0xBDB8BFBC,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBEB9BFBE, 0xC0BEB9BF,
+ 0xBABFBDBB, 0xB9BABFBD, 0xBEBDB6BB, 0xB9BFBEB8,
+ 0xBEBAC0BF, 0xBFBEB9BF, 0xB9BFBEB9, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBBB9C0BD, 0xBFBEB7BE,
+ 0xB9BFBEB9, 0xBDBABFBD, 0xBFBEBABF, 0xB9BFBEB9,
+ 0xBAB8BEBD, 0xBAB9B3BB, 0xAEB9B7B2, 0xBBB1BBBB,
+ 0xB6B6B1BB, 0xB1BCBAAC, 0xBEB7BDBC, 0xBDBCB9BF,
+ 0xB8BDBBB7, 0xBBB8BDBB, 0xBBB9B8BD, 0xB8BDBBB6,
+ 0xBBBABDBB, 0xBDBBBABD, 0xB8BDBBB8, 0xBBB8BDBB,
+ 0xBEB9B8BD, 0xB8BEB9B8, 0xB7B5BAB8, 0xBAB8B4B9,
+ 0xB7BAB8B7, 0xB9B8BBB9, 0xBCB7B8BB, 0xB7BBB6B8,
+ 0xB8B5B8B6, 0xB7B7B9BA, 0xB8B8B8B7, 0x75AEB0B0,
+ 0x3B3B7375, 0x00000039, 0x00000100, 0x00000102,
+ 0x00000002, 0x00000100, 0x01010001, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0xB73C3F3D,
+ 0xBCB6B8BC, 0xB7BEB7B8, 0xBABBBFBA, 0xC0BBBBBF,
+ 0xBBBFBABC, 0xB8B9BDB7, 0xBFB8BABE, 0xB8BEB9B8,
+ 0xB9BABEB9, 0xBBB9B8BB, 0xBABDBBB8, 0xB8B7BDB8,
+ 0xBEB9B8BF, 0xB8BEB9B8, 0xB8B8BEB9, 0xBFB8B8BF,
+ 0xB8BEB9B8, 0x7BB6B9B7, 0x0000797B, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x01000200, 0x00000000, 0x01000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00020000, 0x01010200, 0x00010003,
+ 0x00000301, 0x433E0004, 0xC0C4BF3F, 0xB1B1B8B1,
+ 0xB8B1B1B8, 0xB0B9AFB0, 0xACADB6AC, 0xB4ABAFB7,
+ 0xB0B3AAB1, 0xACB1B6AD, 0xB7AEAEB6, 0xAFB4ABB2,
+ 0xABAFB5AA, 0xB6A9B0B6, 0xAFB6A9AF, 0xA9AEB7AA,
+ 0xB5AAAFB6, 0xB1B5AAB1, 0xAFB3B9AE, 0xB8AEB1B9,
+ 0xB4B8B2B0, 0x00545853, 0x00000001, 0x00000000,
+ 0x01010101, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00010101, 0x00000000, 0x807F7B02,
+ 0xB4C2C4BE, 0xBBB5BABD, 0xB9BBB5B9, 0xB9BBBFB9,
+ 0xB8B1B9C0, 0xB1B8B1B1, 0xB5B4BBB4, 0xBCB5B7BB,
+ 0xB5BCB5B5, 0xB5B5BCB5, 0xBBB4B5BC, 0xB5BBB6B4,
+ 0xBFB5B9B4, 0xBFBFBEC1, 0xBFC1C1BD, 0xB7BEC0C0,
+ 0xB7B7B5B7, 0xC0C0C0B5, 0xC0C0C0C0, 0xC0C0C0C0,
+ 0xC0C1BFC0, 0xBFC0C0C0, 0xC0C0C0C1, 0xBEC1BFC0,
+ 0xB8B9BDB8, 0xBDB8B7BD, 0xB7BDB8B7, 0xB8B7BEB7,
+ 0xBDB8B7BD, 0xB9BCBAB9, 0xB5BEC1BF, 0xB7B7B4B7,
+ 0xC0C0C0B7, 0xBFBFBFBF, 0xC1C1C0C1, 0xC0C1BFC1,
+ 0xB6C0C0C0, 0xB8B6B7B8, 0xC0C1BFB7, 0xBAB9B9B9,
+ 0xBCBABABA, 0xB8BBB9B9, 0xB8B9BFBA, 0xBFBAB7BF,
+ 0xBAC0BBB9, 0xC0BEC1BF, 0xC0C0BEC0, 0xB6B6B6C0,
+ 0xB8B9BFBA, 0xC0B9B7BF, 0xB8C0B9B9, 0xB8B8C0B9,
+ 0xC0B9B7BF, 0xB8BFB8B9, 0xB9B9C1BA, 0xC0B9B8C0,
+ 0xB8C0B9B8, 0xB9B8BCB7, 0xBDB8B8BB, 0xB8BCB7B9,
+ 0xB7B8BCB7, 0xBBB6B8BC, 0xB8BCB7B7, 0xB9B8BBB9,
+ 0xBBB9B8BB, 0xB9BCBAB8, 0x41BABBB9, 0x06084243,
+ 0x08050709, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x01000000, 0x00010000, 0x370A0807, 0x6E683C3B,
+ 0x9EA09A6C, 0xA6ABAFA9, 0xABA4A8AC, 0xA5ADA3A4,
+ 0xA3A7ACA3, 0xAEA7A5AD, 0xAAB1AAA7, 0xAAAAB1AA,
+ 0xB2A8AAB1, 0xABB3A8AA, 0xA8AAB2A7, 0xB4A9ADB3,
+ 0xAEB5A8AE, 0xA9AFB6A9, 0xB5AAAFB6, 0xB0B4A9B1,
+ 0xACB2B6AB, 0xB5ABB3B7, 0xB1B5AAB4, 0xA9B2B8AD,
+ 0xB4A9AEB4, 0xB3B8AFAE, 0xADAFB7AD, 0xB6AFAFB7,
+ 0xADB4ADAF, 0xAFAFB3AE, 0xB4AFB0B4, 0xB0B4AFB0,
+ 0xBFBEC1BF, 0xBBBBBCC1, 0xB9BCBAB9, 0xB9B7BCBA,
+ 0xBBB9B6BB, 0xB8BDBBB6, 0xBEB9C0BD, 0xC0BDBAC1,
+ 0xB9C0BDB9, 0xBDBBC0BE, 0xBEBDBABF, 0xBABFBEB9,
+ 0xBEB9BFBE, 0xBDBCB9BF, 0xB8BDBCB8, 0xBBB7BEBB,
+ 0xBDBCB7BE, 0xB8BDBCB8, 0xBBB8BFBC, 0xBFBCB7BE,
+ 0xB8BFBCB8, 0xBEB9BFBE, 0xBFBEB9BF, 0xB9C0BDB9,
+ 0xB7B9BEBC, 0xBEBCB6BC, 0xBAC1BEB9, 0xBFBBC0BE,
+ 0xBFBDBCC1, 0xBCC1BFBA, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBBB7BEBB, 0xBEBDB7BE, 0xB8BFBCB8,
+ 0xB9B8BFBA, 0xBFBAB8C0, 0xB8BFBAB8, 0xBCB9BFBA,
+ 0xBEBCB9BE, 0xB9BEBCB9, 0xBCB8BFBC, 0xBEBDB8BF,
+ 0xB9BFBEB8, 0xBCB9BEBD, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB8BFBC, 0xBDBBB7BE, 0xBABFBDB8, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBFBBC0BF, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBBB9BEBC, 0xBFBEB8BD, 0xB9BFBEB9,
+ 0xBDB9C0BD, 0xC0BDB9C0, 0xB9C0BDB9, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xBABFBEBA, 0xBDBAC1BE, 0xBFBEB9C0,
+ 0xBAC0BFB9, 0xBCB9BEBC, 0xBEBBB9BE, 0xB8BFBCB7,
+ 0xBAB5BCB9, 0xBDBAB6BD, 0xAFB8B5B6, 0xBBB4BCBB,
+ 0xBCBBB4BC, 0xB4BCBBB4, 0xBCB8BEBD, 0xBCBAB9BE,
+ 0xB8BDBBB7, 0xB8B7BCBA, 0xBDB8B7BD, 0xB7BDB8B7,
+ 0xBCB8BDBB, 0xBFBEB9BE, 0xBABFBEBA, 0xBBBBBEBC,
+ 0xBCB7BABD, 0xB8BCB7B8, 0xB7B4B9B7, 0xBAB8B4B9,
+ 0xB5BAB8B5, 0xB7B8BCB7, 0xBBB9B8BC, 0xB8BBB9B8,
+ 0xB7B8BCB7, 0xBBB9B8BC, 0xB5BAB9B8, 0xC0BAC0BF,
+ 0x9998BABF, 0x494B4B94, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x3E000100,
+ 0xBCB73D40, 0xB9BDB7B8, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB8BABEB8, 0xBFB8BABE, 0xB7BEB7B8,
+ 0xBBBABEB9, 0xBDBBBABD, 0xBBBFBABA, 0xB8B7BDB8,
+ 0xBFB8B8BF, 0xB8BFB8B8, 0xB8B8BFB8, 0xBFB8B8BF,
+ 0xB8BEB9B8, 0x3DB6B9B7, 0x00003B3D, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00030101,
+ 0x01000200, 0x00000000, 0x01000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00010000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00020000, 0x00000200, 0x00010002,
+ 0x00000400, 0x04000004, 0x80847F00, 0xB2B1B8B1,
+ 0xB8B1B2B9, 0xB0B8B1B0, 0xACAEB7AD, 0xB6ADAFB7,
+ 0xB0B3AAB3, 0xADB2B7AE, 0xB6ADAFB7, 0xAFB4ABB1,
+ 0xACAFB7AC, 0xB7ACAFB7, 0xAFB5AAB1, 0xAAADB6A9,
+ 0xB4A9B0B7, 0xAAAEA3B0, 0xAFB1B9AF, 0xB8B1B0B9,
+ 0x7D817CB1, 0x001A1D1B, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x01010100, 0x00000001, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000001, 0x7F7E7A02,
+ 0xB3C2C4BE, 0xBBB5B9BC, 0xB7BBB5B9, 0xB1B9C0B9,
+ 0xB8B1B1B8, 0xB8C0B9B0, 0xB5B6BDB6, 0xBCB5B7BB,
+ 0xB5BCB5B5, 0xB5B4BBB4, 0xBCB5B5BC, 0xB5BCB5B5,
+ 0xBFBEC2BD, 0xC1C1C0C1, 0xBDBFBFC1, 0xB7BEC0C0,
+ 0xC0C0B5B7, 0xC0C0C0BE, 0xC0C0C0C0, 0xC0C0C0C0,
+ 0xC0C0C0C0, 0xC0C0C0C0, 0xC0C0C0C0, 0xBEC1BFC0,
+ 0xB8B9BDB8, 0xBDB8B7BD, 0xB7BDB8B7, 0xB8B7BDB8,
+ 0xBCBAB7BD, 0xB9BCBAB9, 0xB6BEC1BF, 0xB7B7B5B8,
+ 0xC0C0C0B7, 0xC0C1C1C1, 0xBFBFC0C0, 0xBFBFBFBF,
+ 0xBFC1C1C1, 0xB7B5C0C1, 0xC1C2C0B6, 0xBABABABA,
+ 0xBBB9BABA, 0xB6BBB9B8, 0xB9B8BFBA, 0xC0B9B8C0,
+ 0xB8C0B9B8, 0xC0BDC2C0, 0xC1C1BEC0, 0xB7B7B7C1,
+ 0xB9B9BFBA, 0xC0B9B8C0, 0xB8C0B9B8, 0xB9B8C0B9,
+ 0xC0B9B8C0, 0xB9C0B9B9, 0xB9B8C0B9, 0xC1B9B8C0,
+ 0xB8C0B9B6, 0xB7B8BCB7, 0xBCB7B8BC, 0xB9BDB8B8,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB8BCB7B8, 0xB8B8BBB9,
+ 0xBCBAB7BA, 0xB8BBB9B9, 0x42BBBCBA, 0x05074242,
+ 0x07040608, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x10110F01, 0x9BA1A09C, 0xA09AA1A1,
+ 0x9EA1989E, 0x9E9EA39A, 0xA89EA2A7, 0xA5ADA3A0,
+ 0xA4A8AEA3, 0xAFA5A7AF, 0xA9B0A9A7, 0xA9ACB0AA,
+ 0xB3A8ADB2, 0xADB3A8AD, 0xA8ADB3A8, 0xB4A8ADB3,
+ 0xAFB3A7B0, 0xA8AEB5A8, 0xB4A9AEB5, 0xB1B5AAB0,
+ 0xAAAEB2A6, 0xB6AAB2B6, 0xB2B6AAB4, 0xADAFB5AA,
+ 0xB4A9B2B8, 0xAFB5AAB0, 0xADB1B6AD, 0xB6ACAFB7,
+ 0xAEB6ACAE, 0xAFB0B4AE, 0xB3AFB0B4, 0xABAEACB2,
+ 0xC0B2B7B6, 0xBABABCC1, 0xB9BBBBB8, 0xBBB9BEBC,
+ 0xBAB8B8BD, 0xB8BDBBB5, 0xBAB7BEBB, 0xBEBBB6BD,
+ 0xB9C0BDB7, 0xBDBABFBD, 0xC0BEBABF, 0xBABFBDBB,
+ 0xBEB9BFBE, 0xBEBDB9BF, 0xB9BFBEB9, 0xBBB8BFBC,
+ 0xBDBCB7BE, 0xB7BDBCB8, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB9C0BDB8, 0xBEB9BFBE, 0xBDBCB9BF, 0xB9C0BDB7,
+ 0xB7B9BEBC, 0xBFBCB6BC, 0xBAC1BEB8, 0xBEBBC0BE,
+ 0xC1BFBBC0, 0xBBC0BEBC, 0xBDBAC0BF, 0xBFBEB8BE,
+ 0xBAC0BFB9, 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8,
+ 0xB9B9C1BA, 0xC0B9B8C0, 0xB8BFBAB8, 0xBAB9BFBA,
+ 0xBEBCB9BF, 0xBABFBDB9, 0xBCB8BFBC, 0xBFBEB8BF,
+ 0xB7BDBCB9, 0xBEBBC0BF, 0xC0BEBABF, 0xB8BDBBBB,
+ 0xBBB7BEBB, 0xBDBBB7BE, 0xB8BDBBB8, 0xBDB7BEBB,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBFBBC0BF, 0xC0BEBBC0,
+ 0xBBC0BEBB, 0xBBB9BEBC, 0xBFBEB8BD, 0xB9BFBEB9,
+ 0xBDB9C0BD, 0xC0BDB9C0, 0xB9C0BDB9, 0xBDB9C0BD,
+ 0xBFBEB9C0, 0xBABFBEBA, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xB8BEBDB9, 0xBCB9BEBC, 0xBFBCB8BF, 0xB8BFBCB8,
+ 0xB8B8BEB9, 0xBDBAB7BD, 0xB6BDBAB6, 0xB9B3BCB9,
+ 0xBDBCB3BC, 0xB4BCBBB5, 0xBCB5BAB8, 0xBDBBB9BE,
+ 0xBCBFBDBA, 0xB7BBBFBA, 0xBDB8B6BC, 0xB9BFBAB7,
+ 0xBBB8BDBB, 0xBDBCB8BD, 0xB8BDBCB8, 0xBBBABDBB,
+ 0xBBB9BABD, 0xB6BCB7B8, 0xB8B6BBB9, 0xBBB9B5BA,
+ 0xB6BBB9B6, 0xB6B7BBB6, 0xB9B7B7BB, 0xB6B9B7B6,
+ 0xB7B5BBB6, 0xBAB8B6BC, 0xB5BAB9B5, 0xC1BABFC0,
+ 0xBFBEB9C1, 0xBBC0BFB9, 0x00575A58, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010100,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x7E790001, 0xB8BCB77A, 0xB9B7BAB8, 0xBDBBB8BB,
+ 0xBCC0BBBA, 0xB6B8BFB8, 0xC0B6B8C0, 0xB7BEB7B8,
+ 0xBBBABEB9, 0xBDBBBABD, 0xBABEB9BA, 0xB8B8BEB9,
+ 0xBFB8B8BF, 0xB8BFB8B8, 0xB7B8BFB8, 0xC1B7B7BE,
+ 0xC0C7C0B9, 0x017A7C7C, 0x00010000, 0x01000200,
+ 0x00000000, 0x00000000, 0x01010100, 0x00020000,
+ 0x01010200, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00010000,
+ 0x00000400, 0x04000004, 0x00040000, 0xB1B1B8B1,
+ 0xB8B1B0B8, 0xB1B8B1B1, 0xACAFB7AD, 0xB7ACAEB6,
+ 0xB0B4A9B3, 0xADAEB3AA, 0xB5ABAFB7, 0xAFB7ADAD,
+ 0xADB1B6AD, 0xB4AAB1B6, 0xADB5ABAC, 0xAAAFB5AA,
+ 0xB2A6AFB5, 0xAEB2A7AE, 0xB2B0B9AF, 0x817CB1B9,
+ 0x1616167D, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00010200, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x01010100, 0x00000000, 0x00000001, 0x81807C02,
+ 0xBEC3C5BF, 0xC4BEC2C4, 0xC0C4BEC2, 0xB8B9C0B9,
+ 0xC0B9B7BF, 0xB8C0B9B8, 0xB5BEC5BE, 0xC5C0B5BC,
+ 0xBEC5BEBF, 0xBBBFC6BF, 0xC5BEBDC5, 0xB5BCB5BE,
+ 0xBDBEC2BD, 0xC1BFBEC2, 0xBBC0BEBE, 0xBFBCC1BF,
+ 0xC1BFBCC1, 0xBEC1BFBC, 0xBFBEC1BF, 0xC1BFBEC1,
+ 0xBEC1BFBE, 0xBFBEC1BF, 0xC1BFBEC1, 0xBEC1BFBE,
+ 0xC2C3C7C2, 0xC6C4C3C7, 0xC3C7C2C3, 0xC2C1C7C2,
+ 0xC6C4C1C7, 0xC3C6C4C3, 0xB3BCC2BD, 0xC1BFB2B8,
+ 0xBEC1BFBE, 0xBFBEC1BF, 0xC1BFBEC1, 0xBEC1BFBE,
+ 0xBDBDC0BE, 0xC2BDBEC2, 0xBEC2BDBE, 0xC1C3C4C2,
+ 0xC2C2C2C3, 0xBEC3C1C0, 0xB9B8BFBA, 0xC2B8B6C1,
+ 0xB8C0B9B7, 0xBFBCC2BD, 0xC1BFBEC1, 0xBEC1BFBE,
+ 0xB9B9BFBA, 0xC0B9B8C0, 0xB8C0B9B8, 0xB7B8C1B7,
+ 0xC0B9B8C1, 0xB9C0B9B9, 0xB9B8C0B9, 0xC0B9B8C0,
+ 0xB8C0B9B8, 0xB7B8BCB7, 0xBCB6BBBD, 0xB9BBB5BA,
+ 0xB7BABCB6, 0xBBB5BBBD, 0xB8BCB6B7, 0xB7B8BCB7,
+ 0xBCB7B8BC, 0xB8BCB7B8, 0x42BABBB9, 0x05074242,
+ 0x09060808, 0x00000001, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0x00000000, 0x12100F02, 0x9A6D6C68, 0xA09AA0A0,
+ 0x9EA1989E, 0x9DA3A89F, 0xA79DA1A6, 0xA4ADA39F,
+ 0xA2A5ADA2, 0xB1A7A5AD, 0xA9B1A7A9, 0xA8ACB1A8,
+ 0xB3A8ACB1, 0xADB4A7AD, 0xA9ACB2A7, 0xB5A9AEB4,
+ 0xB0B4A8B1, 0xA9AEB5A6, 0xB5AAADB6, 0xAFB5AAAF,
+ 0xA2A7AEA1, 0xB6AAAAAE, 0xB2B6ABB4, 0xAAAFB5AA,
+ 0xB4ABADB5, 0xB0B5ACAF, 0xAAAEB4A9, 0xB6ABAFB5,
+ 0xB1B6ADB0, 0xAFB0B4AE, 0xAFADB0B4, 0x9FA2A0AC,
+ 0xBBACB1B0, 0xBCBBB6BC, 0xB7BCBBB7, 0xBBB8BDBB,
+ 0xBBB9B8BD, 0xBABFBDB6, 0xBBB8BDBB, 0xC0BDB8BD,
+ 0xBAC1BEB9, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBEB9BFBE, 0xBFBEB9BF, 0xBAC0BFB9, 0xBCB8BEBD,
+ 0xBCBBB5BD, 0xB7BDBCB6, 0xBCB8BFBC, 0xC1BEB6BF,
+ 0xBAC1BEBA, 0xBEBAC0BF, 0xBFBEB9BF, 0xB9C0BDB9,
+ 0xB9B8BFBC, 0xC1BEB5BC, 0xBAC1BEBA, 0xBEBBC0BE,
+ 0xC0BEBBC0, 0xBBC0BEBB, 0xBEB9BFBE, 0xBFBEB9BF,
+ 0xB9BFBEB9, 0xBAB8BFBC, 0xBFBAB8BF, 0xB8BFBAB8,
+ 0xB9B8C0B9, 0xBFBAB8C0, 0xAAB1ACB8, 0xBAB6BCB7,
+ 0xC0BBBAC1, 0xB8BFBAB9, 0xBCB8BFBC, 0xBEBBB8BF,
+ 0xB8BFBCB7, 0xBCB8BDBC, 0xBCBAB8BD, 0xB8BEB9B7,
+ 0xBAB8BDBB, 0xBCBAB7BC, 0xB8BDBBB9, 0xBDB7BEBB,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBFBBC0BF, 0xC1BFBBC0,
+ 0xBBC0BEBC, 0xBBBABFBD, 0xBFBEB8BD, 0xB9BFBEB9,
+ 0xBDB9C0BD, 0xC0BDB9C0, 0xB9C0BDB9, 0xBBBAC0BB,
+ 0xBFBDBAC0, 0xBABFBDBA, 0xBCB9C0BD, 0xBFBEB8BF,
+ 0xB8BEBDB9, 0xBCB8BFBC, 0xBFBAB8BF, 0xB8BFBAB8,
+ 0xB8B7BDB8, 0xC0BDB7BD, 0xB4BBB8B9, 0xBAAAB3B0,
+ 0xBBBAB2BD, 0xB4BCBBB3, 0xBAB9BEBC, 0xBAB8B7BC,
+ 0xB9BCBAB7, 0xB8B9BDB8, 0xBCBAB9BD, 0xB9BCBAB9,
+ 0xB8B8BCB7, 0xBBB9B9BD, 0xB8BBB9B8, 0xBCB8BDBC,
+ 0xBDBBB9BE, 0xB8BDBBB8, 0xB8B6BBB9, 0xBCB7B7BA,
+ 0xB8BCB7B8, 0xB7B6BCB7, 0xBCBAB6BC, 0xB8BBB9B9,
+ 0xB7B8BCB7, 0xBAB8B8BC, 0xB4B9B8B7, 0xC0BABFC0,
+ 0xC0BFB8C0, 0xBABFBEBA, 0x00838684, 0x00000001,
+ 0x00000100, 0x00000000, 0x00000000, 0x00010002,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x3F3D0000, 0xB8BCB73C, 0xBABDC1BC, 0xBDB8B9BF,
+ 0xB9BFBAB9, 0xB6B8BFB8, 0xBFB8B8C0, 0xB9C0B9B8,
+ 0xBBBCC0BB, 0xBEBCBCC0, 0xBCC0BBBB, 0xB8B8BEB9,
+ 0xBFB8B8BF, 0xB9C0B9B8, 0xB8B8BFB8, 0xC8C1B8BF,
+ 0xA8ACA7C1, 0x01000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000100, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000400, 0x04000003, 0x00040000, 0xB24F5550,
+ 0xB7B0B2B9, 0xB1B8B1B0, 0xADAFB7AD, 0xB7ACB1B6,
+ 0xB0B4A9B3, 0xAFAFB4AB, 0xB9AFB1B9, 0xB1B6ADB1,
+ 0xAFB1B6AD, 0xB7ADB3B8, 0xAEB6ACAF, 0xAAADB5AB,
+ 0xB2A7AFB5, 0xAFB5AAAE, 0xB1B2BAB0, 0x1715B1B8,
+ 0x18161616, 0x01020000, 0x00000200, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000001, 0x00010101, 0x00000001, 0x807F7B02,
+ 0xA3A6A7A3, 0xA7A3A6A7, 0xA4A8A3A6, 0xA2A1A7A2,
+ 0xA7A2A1A7, 0xA1A7A2A1, 0xA3A1A7A2, 0xA6A1A2A8,
+ 0xA1A7A2A2, 0xA1A2A6A0, 0xA7A2A1A8, 0xA3A7A2A3,
+ 0xA4A3A7A2, 0xA6A4A3A6, 0xA1A6A4A3, 0xA4A3A6A4,
+ 0xA6A4A1A6, 0xA3A6A4A3, 0xA4A3A6A4, 0xA6A4A3A6,
+ 0xA3A6A4A3, 0xA4A3A6A4, 0xA6A4A3A6, 0xA3A6A4A3,
+ 0xA5A6A9A7, 0xA9A7A6AA, 0xA6A9A7A6, 0xA7A6A9A7,
+ 0xA9A7A6A9, 0xA6A9A7A6, 0xA2A3A6A4, 0xA6A4A1A7,
+ 0xA2A5A3A3, 0xA2A3A7A2, 0xA6A4A3A7, 0xA2A5A3A3,
+ 0xA1A4A7A5, 0xA5A3A2A6, 0xA3A6A4A2, 0xA7A8A9A7,
+ 0xA8A8A8A9, 0xA6A9A7A6, 0xA2A1A7A2, 0xA8A1A0A7,
+ 0xA0A8A1A0, 0xA4A1A7A2, 0xA6A4A3A6, 0xA3A6A4A3,
+ 0xA2A0A6A1, 0xA7A2A1A7, 0xA1A7A2A1, 0xA1A1A8A1,
+ 0xA7A2A1A8, 0xA1A7A2A1, 0xA2A1A7A2, 0xA7A2A1A7,
+ 0xA1A7A2A1, 0x9B9CA09B, 0x9F9B9E9F, 0x9E9F9B9E,
+ 0x999E9F9B, 0xA09B9D9F, 0xA6AAA59C, 0x9FA0A49F,
+ 0xA49FA0A4, 0xA0A49FA0, 0x42BABBB9, 0x05074242,
+ 0x08050708, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x01010000, 0x02000003, 0x370A0807, 0x6E683C3B,
+ 0x9EA09A6C, 0xA7AAAEA8, 0xADA3ABB0, 0xA5ADA2A5,
+ 0xA2A7AFA4, 0xB1A6A6AF, 0xA9B1A6A9, 0xA7ADB2A9,
+ 0xB4A7ACB2, 0xADB4A7AD, 0xA9AEB4A9, 0xB3A7B0B4,
+ 0xB0B4A8AF, 0xA9AEB5A6, 0xB5AAAFB6, 0xAEB4A9AF,
+ 0xA6ACB3A6, 0xB6ABACB3, 0xB2B6ABB2, 0xAAB2B8AD,
+ 0xB5ACADB5, 0xAFB4ABB0, 0xABAFB5AA, 0xB5AAB0B6,
+ 0xAEB3AAAF, 0xAEB0B4AE, 0xB3AEB0B4, 0xB1B4B2AF,
+ 0xBAB7BCBA, 0xBCBBB7BC, 0xB7BCBAB7, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB8BDBB, 0xBFBDB9BE,
+ 0xBABFBDBA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBEBABFBE, 0xBFBEB9BF, 0xB9BFBEBA, 0xBCB8BFBC,
+ 0xBEBCB8BF, 0xB8BFBCB9, 0xBCB9C0BD, 0xBFBCB6BF,
+ 0xBAC1BEB8, 0xBEBAC0BF, 0xBFBDB9BF, 0xBAC1BEBA,
+ 0xBCB8BFBC, 0xBFBCB8BF, 0xBAC1BEB8, 0xBEBCC1BF,
+ 0xC0BEBBC0, 0xB9BEBCBB, 0xBEB7BDBC, 0xBFBEB9BF,
+ 0xB7BEBBB9, 0xBAB8BFBC, 0xBFBAB8BF, 0xB8BFBAB8,
+ 0xBAB8BFBA, 0xBFBCB8BF, 0xAEB5B2B8, 0xBAB6BCB7,
+ 0xBFBAB9BF, 0xB8BFBAB8, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xB9B8BDBC, 0xBBB9B6BB, 0xB7BDB8B6,
+ 0xBCB8BDBB, 0xC0BEB9BE, 0xBABFBDBD, 0xBDB8BDBB,
+ 0xBFBEB9C0, 0xB9BFBEB9, 0xBFBBC0BF, 0xC0BEBBC0,
+ 0xBCC1BFBB, 0xBDBBC0BE, 0xC0BDBABF, 0xB9C0BDB9,
+ 0xBDB9C0BD, 0xC0BDB9C0, 0xB9C0BDB9, 0xBBBAC0BB,
+ 0xBFBDBAC0, 0xBABFBDBA, 0xBBBABFBD, 0xBEBDB7BE,
+ 0xB7BEBBB8, 0xBDB8BFBC, 0xBFBAB9C0, 0xB8BFBAB8,
+ 0xB8B7BDB8, 0xBDBAB7BD, 0xB4BBB8B6, 0xBAAAB3B0,
+ 0xBCBBB4BD, 0xB6BCBBB4, 0xBBB7BEBB, 0xBDBBB8BD,
+ 0xBABDBBBA, 0xB7B9BDB8, 0xB9B7B6BC, 0xB8BBB9B6,
+ 0xB9B8BCB7, 0xBEB9BABE, 0xBABDBBBA, 0xBCB9BEBC,
+ 0xBEBBB8BD, 0xB8BDBBB7, 0xB9B6BBB9, 0xBCB7B8BB,
+ 0xB8BCB7B8, 0xB7B6BCB7, 0xBCB7B6BC, 0xB8BCB7B8,
+ 0xB6B6BDB6, 0xBBB9B6BD, 0xB6BBBAB6, 0xBFBAC0BF,
+ 0xC0BFBAC0, 0x6E7372BB, 0x002A2D2B, 0x00000001,
+ 0x00000100, 0x00020000, 0x00000200, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x565A5500, 0xB9B9BFBA, 0xC0B9B8C0,
+ 0xB9C0B9B9, 0xB8B9C0B9, 0xBFBABABE, 0xBBBFB9BB,
+ 0xB9B9BFBA, 0xBFBAB9C0, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBEB9BBBF, 0xB9BFBAB8, 0xBFBEC4BF, 0xC3C1BEC4,
+ 0x444745C0, 0x01010002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000102, 0x00010000, 0x7E060907,
+ 0xC0B97D83, 0xB8BFB8B9, 0xB0B5BAB1, 0xB9AEB4B9,
+ 0xB0B4A9B5, 0xACAEB3AA, 0xB4ABB0B5, 0xAEB3AAAF,
+ 0xAAAEB4A9, 0xB5AAAFB5, 0xAFB7ACAF, 0xAFB1B9AF,
+ 0xB9AFB1B9, 0xB2BAB0B1, 0x39B3BAB3, 0x03003B3F,
+ 0x02030100, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x07080601,
+ 0x0A0B0C0A, 0x0C0A0B0C, 0x0B0C0A0B, 0x0A090C0A,
+ 0x0C0A090C, 0x090C0A09, 0x0A090C0A, 0x0C0A090C,
+ 0x090C0A0B, 0x0A0B0C0A, 0x0C0A090C, 0x0B0C0A0B,
+ 0x0B0B0C0A, 0x0B0B0B0B, 0x090B0B0B, 0x0B0B0B0B,
+ 0x0B0B090B, 0x0B0B0B0B, 0x0B0B0B0B, 0x0B0B0B0B,
+ 0x0B0B0B0B, 0x0B0B0B0B, 0x0B0B0B0B, 0x0B0C0A0B,
+ 0x09080B09, 0x0A0A080B, 0x080A0A08, 0x0B090B0B,
+ 0x0B0B0B0B, 0x090C0A0B, 0x09080B09, 0x0B09080B,
+ 0x080B0908, 0x0A090C0A, 0x0B0B090C, 0x090B0B09,
+ 0x0A090B0B, 0x0B0B0B0C, 0x0B0B0B0B, 0x0B0B0B0B,
+ 0x0B0B0B0B, 0x0B0B0B0B, 0x0A090C0A, 0x0C0A090C,
+ 0x090C0A09, 0x0B090C0A, 0x0B0B0B0B, 0x0B0B0B0B,
+ 0x0A090C0A, 0x0C0A090C, 0x090C0A09, 0x0A090C0A,
+ 0x0C0A090C, 0x090C0A09, 0x0A090C0A, 0x0C0A090C,
+ 0x090C0A09, 0x0A0B0C0A, 0x0C0A0B0C, 0x0B0C0A0B,
+ 0x070A0B09, 0x0B090A0B, 0x0A0B090A, 0x090A0B09,
+ 0x0B090A0B, 0x0A0B090A, 0x050E0E0E, 0x00000505,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x0F100C00, 0x713A3E39, 0xB1A87377, 0xACB2A7AC,
+ 0xA0A6ACA1, 0xADA0A6AD, 0xA6ADA0A6, 0xA8B0B4A9,
+ 0xB4A8B0B4, 0xB0B4A8B0, 0xA8B0B4A8, 0xB4A8B0B4,
+ 0xB0B4A8B0, 0xA9AFB3A7, 0xB5AAB1B5, 0xAFB5AAB1,
+ 0xAEAFB5AA, 0xB5AAB1B9, 0xADB5ABAD, 0xAAAFB5AA,
+ 0xB6ADAFB5, 0xB1B6ADB1, 0xABAFB5AA, 0xB7ADAEB6,
+ 0xAFB4ABAF, 0xAEB2B7AE, 0xB6B0B4B7, 0xBABCB6B4,
+ 0xB7C0C4BF, 0xBBB9B8BC, 0xB6BCB7B6, 0xBBB4BBB6,
+ 0xBEBBB7BE, 0xB7BEBBB7, 0xB9B8BDBB, 0xBDBBB8BE,
+ 0xBBBEBCBA, 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBCB9BEBC, 0xBEBCB9BE, 0xB9BEBCBB, 0xBAB9BFBA,
+ 0xBFBAB9BF, 0xBABDBBBB, 0xBDB9C0BD, 0xBFBEB9C0,
+ 0xBBC0BEBA, 0xBCB9BEBC, 0xBFBAB9BE, 0xB9BFBABB,
+ 0xBBB7BEBB, 0xC0BFB7BE, 0xBABFBDBB, 0xBBBABFBD,
+ 0xC0BBBAC0, 0xBABFBDBA, 0xBEB8BEBD, 0xBFBCB9BF,
+ 0xB7BEBBB8, 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8,
+ 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBCB9BEBC, 0xBFBCB9BE, 0xB9BEBCB8,
+ 0xBAB9BFBA, 0xBFBABBBF, 0xB9BFBABB, 0xBCB8BDBB,
+ 0xBFBCB8BF, 0xB9C0BDB8, 0xBDB9BEBC, 0xBFBDBABF,
+ 0xBABFBDBA, 0xB9B8BEB9, 0xBCB7B8BE, 0xB4BAB5B6,
+ 0xBDB8BFBC, 0xBFBCB8BE, 0xB7BEBBB8, 0xBAB9BFBA,
+ 0xBFBABBBF, 0xB9BFBABB, 0xBBBABFBD, 0xBFBDB8BD,
+ 0xB8BDBBBA, 0xB9B9BEBC, 0xBEB9B8BE, 0xB9BFBAB8,
+ 0xBCB9BEBC, 0xBFBCB8BF, 0xB8BFBCB8, 0xBBB7BEBB,
+ 0xBDBAB7BE, 0xB7BEBBB6, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBCB8BFBC, 0xBEBCB8BF, 0xB9BEBCB9,
+ 0xB7B9BDB8, 0xBDB7B9BD, 0xBABEB8B9, 0xBBB8BDBB,
+ 0xBDBCB8BD, 0xB8BDBBB8, 0xBAB5BAB8, 0xBDBBB9BF,
+ 0xB8BDBBB8, 0xB7BBBFBA, 0xBCB7B8BC, 0xB6BDB6B8,
+ 0xB9B8C0B9, 0xC0B9B8C0, 0xB9BFBAB8, 0xADA8ADAB,
+ 0x3A3AA9AE, 0x00000038, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00010101,
+ 0x01000000, 0x00010000, 0xBA7A807B, 0xBFB8B9C1,
+ 0xB9C0B9B7, 0xBAB8BEB9, 0xBEB9BBBF, 0xBBBFBABA,
+ 0xB9B8BFB8, 0xBFB9B9C0, 0xBABEB8BB, 0xBABBBFBA,
+ 0xC0BBBBBF, 0xB9BFBABC, 0xBFBEC4BF, 0x8583BEC4,
+ 0x08080882, 0x01000001, 0x00000200, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00030101, 0x01010200, 0x00000001, 0x07060907,
+ 0xBFBA0609, 0xB9C0B9BB, 0xAEB2B7AE, 0xB8ADB2B7,
+ 0xB4B8ADB4, 0xADAEB3AA, 0xB5ACB1B6, 0xAFB4ABB0,
+ 0xAAAFB4AB, 0xB4A9AFB5, 0xAEB4A9AE, 0xB1B1B9AF,
+ 0xB8B1B0B8, 0xB0B7B0B0, 0x003B3F39, 0x04000004,
+ 0x00040000, 0x00000100, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x01020000, 0x00000200, 0x04000004, 0x393E3500,
+ 0xA1A7AAA1, 0xACA1A8AC, 0xA8ACA1A8, 0xA8B0B4A8,
+ 0xB4A8B0B4, 0xB0B4A8B0, 0xA8B0B4A8, 0xB4A8B0B4,
+ 0xB0B4A8B0, 0xA9B0B4A8, 0xB4A9B1B5, 0xB2B6ABB0,
+ 0xAAADB3A8, 0xB5ABADB5, 0xADB5ABAD, 0xAAADB5AB,
+ 0xB3AAAFB5, 0xAFB7ADAE, 0xACAFB7AC, 0xB6ACAFB7,
+ 0xB2B7AEAE, 0xAEB5B9AE, 0xB6ADB5B9, 0xBBBDB7B3,
+ 0xB9C2C3BF, 0xBCB7BABE, 0xB6BCB7B8, 0xBBB8BEB9,
+ 0xBDBCB7BE, 0xB8BDBBB8, 0xB9B8BDBB, 0xBDBBBABE,
+ 0xBABDBBBA, 0xBDB9BEBC, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBCBBBEBC, 0xBEBCBBBE, 0xBBBEBCBB, 0xB9BBBFBA,
+ 0xBEBABBBF, 0xBBBFBABD, 0xBDBBC0BE, 0xBFBEB9C0,
+ 0xBABFBDBA, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBAB6BBB9, 0xBFBEB6BD, 0xBABFBDBA, 0xBBBABFBD,
+ 0xC0BBBAC0, 0xBABFBDBA, 0xBEB8BFBC, 0xBFBCB9BF,
+ 0xB8BFBCB8, 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8,
+ 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8, 0xBAB8BDBB,
+ 0xBDBBB7BC, 0xB8BDBBB8, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBCB9BEBC, 0xBFBCB9BE, 0xB8BFBCB8,
+ 0xBABBBFBA, 0xBFBABBBF, 0xB9BFBABB, 0xBCB8BDBB,
+ 0xC0BDB8BF, 0xB8BFBCB9, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xB9B8BDBB, 0xBAB5B8BE, 0xB1B7B2B4,
+ 0xBBB8BFBC, 0xBEBBB7BE, 0xB7BEBBB7, 0xBAB9BFBA,
+ 0xBFBABBBF, 0xBBBFBABB, 0xBAB8BDBB, 0xBDBBB7BC,
+ 0xB8BDBBB8, 0xBABBBFBA, 0xBFBABBBF, 0xB9BFBABB,
+ 0xBCB9BEBC, 0xBFBCB8BF, 0xB8BFBCB8, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB7BEBB, 0xBFBCB8BF,
+ 0xB6BFBCB6, 0xBCB8BFBC, 0xBFBCB8BF, 0xB8BFBAB8,
+ 0xB8B8BEB9, 0xBFB6BABE, 0xB8BFB8BA, 0xBBB8BEB9,
+ 0xBDBCB8BD, 0xB8BDBBB8, 0xB6B9BFBA, 0xBDBBB5BB,
+ 0xB8BDBBB8, 0xB7B8BCB7, 0xBDB8B8BC, 0xB6BDB6B9,
+ 0xB9B8C0B9, 0xC0B9B8C0, 0xBAC0BBB8, 0x00717472,
+ 0x00000001, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00010000, 0xBA3B403E, 0xBFBAB9BF,
+ 0xB9BFBAB9, 0xB9B9BFBA, 0xBFBAB8BE, 0xBBBFBABB,
+ 0xBAB9BFBA, 0xBFBAB9BF, 0xBCC0BBBB, 0xBABBBFBA,
+ 0xBEB9BBBF, 0xBABEB9BA, 0xBFC0C4BF, 0x4745C0C4,
+ 0x08090746, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x07080808,
+ 0x45430609, 0xBBBFBA42, 0xAEB4B6B0, 0xB8AFB4B7,
+ 0xB4B7AEB5, 0xACAEB4A9, 0xB9AFAEB6, 0xB1B8B1B1,
+ 0xADAFB6AF, 0xB6ADAFB7, 0xAEB3AAB1, 0xB1B1B9AF,
+ 0xB7B2B1B8, 0x454944B1, 0x00000400, 0x04000004,
+ 0x02030002, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00010000, 0x00020301, 0x04000203, 0x00030000,
+ 0x35000100, 0x726C3839, 0xA9ACA370, 0xA9AFB3A8,
+ 0xB4A8B1B5, 0xB0B5A6B0, 0xA6B0B5A6, 0xB4A8B0B5,
+ 0xB0B4A8B0, 0xAAAFB3A7, 0xB4A8B2B6, 0xB0B4A8B0,
+ 0xAAACB3A6, 0xB4ABAFB5, 0xADB5ABAF, 0xABABB3A9,
+ 0xB7ADADB5, 0xAFB7ADAF, 0xADAFB7AD, 0xB6ADB1B6,
+ 0xB1B6ADB1, 0xADB4B8AD, 0xB7AEB4B8, 0xBABCB6B4,
+ 0xBBC0C4BF, 0xBCB7BABD, 0xBBBFBAB8, 0xB8BABDBB,
+ 0xBBBBB5BA, 0xBABDBBB9, 0xB9BABDBB, 0xBDBBBABE,
+ 0xBBBEBCBA, 0xBDBABFBD, 0xBFBDB9C0, 0xB9BEBCBA,
+ 0xBBBBBFBA, 0xBEBCBEBF, 0xBBBEBCBB, 0xBABBBFBA,
+ 0xBEBCBBBF, 0xBBBEBCBB, 0xBDB9BEBC, 0xBFBDBABF,
+ 0xBCBFBDBC, 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB,
+ 0xBAB6BBB9, 0xBFBEB7BC, 0xB9BEBCBA, 0xBBB8BFBC,
+ 0xBFBDB9C0, 0xB9BEBCBA, 0xBCB8BFBC, 0xBEBCB8BF,
+ 0xB9BEBCB9, 0xBDB8BEBD, 0xBFBCB8BE, 0xB8BFBCB8,
+ 0xBDB8BFBC, 0xC0BDB9C0, 0xB8BFBCB9, 0xBBB8BDBB,
+ 0xBEBCB8BD, 0xB9BEBCB9, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBCB8BFBC, 0xBFBCB8BF, 0xB9C0BDB8,
+ 0xBABBBFBA, 0xBFBABBBF, 0xB9BFBABB, 0xBAB8BEB9,
+ 0xC0BDB8BF, 0xB8BFBCB9, 0xBDB9BEBC, 0xC0BFBABF,
+ 0xBABFBEBB, 0xBBB9BBBB, 0xBDBBBABD, 0xB8BDBBBA,
+ 0xBAB8BFBC, 0xBFBAB8BF, 0xB7BEB9B8, 0xBAB9BFBA,
+ 0xC0BBB9BF, 0xBBBFBABC, 0xBDBABFBD, 0xBDBBBABF,
+ 0xB8BDBBB8, 0xBABBBFBA, 0xBFBABBBF, 0xB9BFBABB,
+ 0xBCB9BEBC, 0xBFBCB8BF, 0xB8BFBCB8, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BDBBB8, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBCB9BEBC, 0xBFBCB9BE, 0xB8BFBAB8,
+ 0xB8B8BEB9, 0xBFB8B8BF, 0xB8BFB8B8, 0xBCB8BEB9,
+ 0xBFBCB9BE, 0xB7BEBBB8, 0xB7B7BEB9, 0xBDBBB5BC,
+ 0xB8BDBBB8, 0xB7B8BCB7, 0xBCB7B8BC, 0xBBBFBAB8,
+ 0xBBB9BFBA, 0x8580BAC0, 0x0E120D7F, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x7C000100, 0xBEB9797E,
+ 0xB9BFBAB8, 0xB9B9BFBA, 0xC0BBB9C0, 0xB9BFBABC,
+ 0xBAB9BFBA, 0xBFBAB9BF, 0xBBBFBABB, 0xB9BBBFBA,
+ 0xBDB9BDBF, 0xBDBEBABC, 0x81C3C4C0, 0x09078485,
+ 0x08090708, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x09080808,
+ 0x09070909, 0x81828008, 0xAEBABCB6, 0xB6B0B4B7,
+ 0xB2B7AEB4, 0xACACB4AA, 0xB5AEAEB6, 0xAEB5AEAE,
+ 0xAFAFB6AF, 0xB6ADAFB6, 0xAFB4ABB1, 0xB2B3B7B1,
+ 0x7F7DB3B7, 0x0E110F7C, 0x00000301, 0x03000004,
+ 0x02030002, 0x00000100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020301, 0x02000102, 0x01040200,
+ 0x00000000, 0x01000000, 0x00010000, 0x7E2A2C26,
+ 0xB3A88487, 0xB0B4A8AF, 0xA8B9BDB1, 0xB4A8B0B4,
+ 0xB0B4A8B0, 0xA7B1B5A9, 0xB4A8AFB3, 0xB1B5A9B0,
+ 0xA9ACB3A6, 0xB5AAAFB6, 0xB0B5ACAF, 0xAAAFB4AB,
+ 0xB5ABADB5, 0xAFB7ADAD, 0xADB1B6AD, 0xB6ADB1B6,
+ 0xB1B6ADB1, 0xADB4B7AE, 0xB7B1B3B6, 0xBABCB6B5,
+ 0xBDBDC1BC, 0xBCB7BCBF, 0xB9BDB8B8, 0xB9B8BBB9,
+ 0xBABAB8BB, 0xBABDBBB8, 0xB8BABEB9, 0xBBB9B9BD,
+ 0xB9BCBAB8, 0xBCB8BDBB, 0xBFBDB9BE, 0xBBC0BEBA,
+ 0xBABBBFBA, 0xBEBCBBBF, 0xBBBEBCBB, 0xBABBBEBC,
+ 0xBEBCBBBF, 0xBBBEBCBB, 0xBDB9BEBC, 0xBFBDBABF,
+ 0xBCC0BBBC, 0xBBBBBFBA, 0xBFBABCC0, 0xBBBFBABB,
+ 0xBAB9BEBC, 0xBDBBB7BC, 0xBABFBDB8, 0xBBBBC1BC,
+ 0xC0BBBAC0, 0xBAC0BBBA, 0xB9B9BEBC, 0xBCBAB7BE,
+ 0xB9BEBCB7, 0xBCB9BEBC, 0xBFBCB8BF, 0xB8BFBCB8,
+ 0xBAB8BFBC, 0xBFBCB8BF, 0xB8BFBCB8, 0xBAB8BDBB,
+ 0xBDBBB7BC, 0xB8BDBBB8, 0xBCB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBCB8BFBC, 0xBFBCB8BF, 0xB9BEBCB8,
+ 0xBAB9BEBC, 0xBFBABBBF, 0xB9BFBABB, 0xB9B8BEB9,
+ 0xBEBCB7BE, 0xB9BEBCB9, 0xBDBABFBD, 0xBFBDBABF,
+ 0xBABFBDBA, 0xBBBABCBC, 0xBCBCBABD, 0xB8BDBBBA,
+ 0xBAB8BFBC, 0xBFBAB8BF, 0xB8BFBAB8, 0xBAB9BFBA,
+ 0xC0BBB9BF, 0xBABEB9BC, 0xBCB6BBB9, 0xBDBBB9BE,
+ 0xB8BDBBB8, 0xBABBBFBA, 0xBFBABBBF, 0xB9BFBABB,
+ 0xBBB9BEBC, 0xBFBCB9C0, 0xB8BFBAB8, 0xB9B9BEBC,
+ 0xBDBBB8BE, 0xB8BEB9B8, 0xBAB8BFBC, 0xBFBCB8BF,
+ 0xB8BFBCB8, 0xBCB9BEBC, 0xBFBCB9BE, 0xB8BFBAB8,
+ 0xB8B8BEB9, 0xBEB9B8BF, 0xB7BEB9B7, 0xBBB8BDBB,
+ 0xBFBCB8BD, 0xB7BEB9B8, 0xB7B7BEB9, 0xBDB8B6BE,
+ 0xB8BEB9B7, 0xB8B5BBB6, 0xBFBAB7BD, 0xC1C5C0BB,
+ 0x47B9BFBA, 0x130E464C, 0x0E110F0F, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000002, 0x00000100, 0xB8B30001,
+ 0xB3B7B2B4, 0xB6B8BFB8, 0xBFB8B8C0, 0xB9C0B9B8,
+ 0xB8B9C0B9, 0xBFB8B7BF, 0xBABEB8B8, 0xB8BEC0BA,
+ 0xC0BAC0C1, 0xBFBFB9C0, 0x35A8A7A3, 0x00003A39,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x33343202, 0xAEB2B3AF, 0xB3AEB2B4,
+ 0xB0B4AEAF, 0xABACB4AA, 0xB6AFADB5, 0xAEB6AFAE,
+ 0xB1B0B7B2, 0xB9AFB0B8, 0xB3B8AFB1, 0xA6A3A7A1,
+ 0x0606A7A8, 0x06050706, 0x00000001, 0x01000000,
+ 0x01020000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00010000,
+ 0x00010101, 0x01010000, 0x00010001, 0x00000100,
+ 0x19150001, 0x484A4418, 0xA371746B, 0xAEA3AAAE,
+ 0xAAAEA3AA, 0xA8B0B4A8, 0xB4A8B0B4, 0xB0B4A8B0,
+ 0xA8B0B7A8, 0xB7AAB0B7, 0xB0B7AAAE, 0xA9ADB4A7,
+ 0xB6ABAFB6, 0xAFB5AAB0, 0xACB0B5AC, 0xB5ACB0B5,
+ 0xB0B5ACB0, 0xB0B2B7AE, 0xB6B0B2B6, 0xB5B9B3B2,
+ 0xBABDC1BC, 0xBBB7BBBF, 0xB7BBB6BA, 0xB8B9BDB8,
+ 0xBCBAB7BD, 0xB7BCBAB7, 0xB7BABEB9, 0xBCB7B9BD,
+ 0xB8BCB7B8, 0xB8B8BCB7, 0xBDB8B9BD, 0xB9BFBAB9,
+ 0xBDBBC0BE, 0xBEBEBABF, 0xBBBEBCBC, 0xBBBABDBB,
+ 0xBCBABABD, 0xBBBEBCB9, 0xBAB9BFBA, 0xBFBAB9BF,
+ 0xB9BFBAB9, 0xB9B9BFBA, 0xBDB8B9C0, 0xB6BCB7B7,
+ 0xBABABEB9, 0xBFBABBBF, 0xBBBFBABB, 0xBABBBFBA,
+ 0xBFB9BCC0, 0xB9C0B9BB, 0xB7B8BEB9, 0xBDB8B7BE,
+ 0xB8BEB9B9, 0xBCB9BEBC, 0xBEBCB9BE, 0xB9BFBAB9,
+ 0xB8B8BEB9, 0xBDB8B8BF, 0xB7BDB8B7, 0xB8B7BDB8,
+ 0xBDB8B7BD, 0xB7BDB8B7, 0xB9B7BEB9, 0xBDB8B7BE,
+ 0xB8BEB9B7, 0xBBB8BDBB, 0xBDBBB8BD, 0xB7BCBAB8,
+ 0xBDB9BEBC, 0xBEBCBABF, 0xB8BDBBB9, 0xBAB9BFBA,
+ 0xBFBAB9BF, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB9BFBAB9, 0xBAB9BEBC, 0xBEBCB9BF, 0xB9BEBCBB,
+ 0xBCB8BFBC, 0xBFBCB6BF, 0xB8BFBCB8, 0xBAB9BFBA,
+ 0xBFBAB9BF, 0xB9BDB8BB, 0xBBB2B7B5, 0xBDBBB8BD,
+ 0xB8BDBBB8, 0xBCBABFBD, 0xBEBCB9BE, 0xB9BEBCB9,
+ 0xB8B8BEB9, 0xBDB8B8BF, 0xB8BFB8B7, 0xB8B8BEB9,
+ 0xBEB9B8BF, 0xB7BEB7B8, 0xB8B7BEB9, 0xBDB8B7BF,
+ 0xB5BCB7B6, 0xB7B6BCB7, 0xBEB9B6BC, 0xBAC0BBB8,
+ 0xB9B7BEB9, 0xBEBBB7BE, 0xB7BEBBB7, 0xBAB8BDBB,
+ 0xBDBBB7BC, 0xB8BEB9B8, 0xB9B9BFBA, 0xC0BBB9C0,
+ 0xB8BFBAB9, 0xB9B8BFBA, 0xC0B9B8C0, 0x7D817CB9,
+ 0x001A1E19, 0x01000001, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01020000,
+ 0x00000301, 0x02000002, 0x00000100, 0x3D3B0102,
+ 0xB2B6B13A, 0xB7B8BFB8, 0xC0B6B9C1, 0xB8C0B6B8,
+ 0xB8B8C0B9, 0xBFB8B7BF, 0xBABEB8B8, 0xB8BEC1B8,
+ 0xC1B8C0C1, 0xC0C0BAC0, 0x0071706C, 0x00000201,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00020000,
+ 0x00000200, 0x00010002, 0xAF777876, 0xB4AFB0B4,
+ 0xB0B4AFB0, 0xADAFB7AD, 0xB8AEAFB7, 0xAEB6AFB0,
+ 0xB1B0B8B1, 0xB9AFB0B8, 0xB3B7B1B1, 0x06A6A7A3,
+ 0x05090606, 0x05040806, 0x00000001, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x01000101, 0x00010000, 0x35000100, 0x746B393B,
+ 0xAAADA471, 0xAAB0B4A9, 0xB3A8B1B5, 0xB0B4A8AF,
+ 0xA8B0B7A8, 0xB6A7B0B7, 0xB0B7A8AF, 0xA9B1B5A9,
+ 0xB5A9B1B5, 0xB1B5AAB1, 0xACAFB4AB, 0xB5ACB0B5,
+ 0xB0B5ACB0, 0xB0B2B6B0, 0xB6B0B2B6, 0xB3B7B1B2,
+ 0xBBBDC1BC, 0xBCB8BCC0, 0xB8BCB7BB, 0xB8B9BDB8,
+ 0xBAB8B7BD, 0xB7BDB8B5, 0xB8BABEB8, 0xBEB9BABE,
+ 0xBABEB9BA, 0xB8B9BDB8, 0xBCB7B7BD, 0xB6BCB7B8,
+ 0xB8B4BBB8, 0xBCBCB4BB, 0xBABCBCBA, 0xBBBABDBB,
+ 0xBCBABABD, 0xB9BCBAB9, 0xBABBBFBA, 0xBFBAB9BF,
+ 0xB9BFBAB9, 0xBAB9C0B9, 0xBDB8B8BF, 0xB6BCB7B7,
+ 0xBABBBFBA, 0xBFBABBBF, 0xBBBFBABB, 0xB9BBBFB9,
+ 0xBFB9BBBF, 0xBCC0BABB, 0xB8B7BEB7, 0xBEB8B8BF,
+ 0xBABEB9BA, 0xBCB9BEBC, 0xBFBAB9BE, 0xBBBFBABB,
+ 0xB7B8BFB8, 0xBEB7B7BE, 0xB7BEB7B7, 0xB8B7BDB8,
+ 0xBEB9B7BD, 0xB8BEB9B8, 0xB9B7BDB8, 0xBEB9B7BE,
+ 0xB8BEB9B8, 0xBBB8BDBB, 0xBEBCB8BD, 0xB9BEBCB9,
+ 0xBEB7BDBC, 0xBFBDB9BF, 0xB8BDBBBA, 0xBBBBBFBA,
+ 0xBFBABCC0, 0xBBBFBABB, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB9BFBAB9, 0xBAB8BEB9, 0xBFBAB9BF, 0xB9BFBABB,
+ 0xBCB7BEB9, 0xBFBCB6BF, 0xB8BFBCB8, 0xBAB9BFBA,
+ 0xBFBAB9BF, 0xBBBFBABB, 0xBCB7BCBA, 0xBDBBB9BE,
+ 0xB8BDBBB8, 0xBBBABFBD, 0xBEBDB8BD, 0xB8BFBCB8,
+ 0xB8B8BEB9, 0xBFB8B8BF, 0xB8BFB8B8, 0xB8B8BFB8,
+ 0xBFB8B8BF, 0xB8BFB8B8, 0xB8B6BEB7, 0xBFB8B7BF,
+ 0xB7BFB8B7, 0xB9B7BDB8, 0xBEB9B8BE, 0xB8BEB9B8,
+ 0xBBB8BDBB, 0xBDBAB7BE, 0xB8BFBCB6, 0xBBB8BDBB,
+ 0xBDBBB8BD, 0xB8BEB9B8, 0xB9B9BFBA, 0xBFBAB9C0,
+ 0xB8BFBAB8, 0x7BB8C0B9, 0x443D7A82, 0x0004003D,
+ 0x00000200, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x777A7800, 0xB7C2C9C2, 0xBEB7B7BE, 0xB8BFB8B7,
+ 0xB9B8BFB8, 0xBEB8B9C0, 0xB9BDB7BA, 0xBABEC0BA,
+ 0xBFB9C0C0, 0xA1A19BBF, 0x00020100, 0x01010200,
+ 0x00000001, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01020000,
+ 0x01010301, 0x00010001, 0xAF020301, 0xB2B0B0B4,
+ 0xAFB5B0AF, 0xACAFB4AB, 0xB7ACAFB7, 0xAFB7ADAF,
+ 0xB1B1B8B1, 0xB9AFB1B8, 0xB3B7B1B1, 0x083B3B3B,
+ 0x040A0703, 0x09050A08, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00010200, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x01010100, 0x00000000, 0x01010000, 0x00000001,
+ 0x01000001, 0x00000000, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000100, 0x01000001,
+ 0x00010000, 0x713B3D37, 0xB3AA7577, 0xB1B5AAB0,
+ 0xA8B2B6AA, 0xB7AAB0B7, 0xB0B7AAB0, 0xA9B1B5AA,
+ 0xB2A7B0B4, 0xB0B4A9AE, 0xAEB0B5AC, 0xB5AEB0B4,
+ 0xADB4ADAE, 0xAEB2B6B1, 0xB4AFAFB3, 0xB2B6B1B0,
+ 0xB9BEC2BD, 0xBBB7BABE, 0xBCC0BBBA, 0xB7B9BDB7,
+ 0xBDB8B7BE, 0xB8BEB9B7, 0xB8B8BFB8, 0xBEB9B8BF,
+ 0xB8BEB9B8, 0xB8B8BFB8, 0xBFB8B7BF, 0xB7BFB8B8,
+ 0xB7B6BDB8, 0xBBB9B5BC, 0xB8BBB9B8, 0xB9B9BCBA,
+ 0xBDBBB8BB, 0xBABDBBBC, 0xBABBBFBA, 0xBFBABBBF,
+ 0xB9BFBABB, 0xB9B8BEB9, 0xBCBAB8BE, 0xB8BBB9B9,
+ 0xBAB9BFBA, 0xBFBAB9BF, 0xB9BFBAB9, 0xBAB9BFBA,
+ 0xBFBAB9BF, 0xB9BFBAB9, 0xB9B7BDB8, 0xBFBAB8BE,
+ 0xB8BEB9B9, 0xBCB9BEBC, 0xBFBAB9BE, 0xBBBFB9BB,
+ 0xB8B8BFB8, 0xBDB8B8BF, 0xB9BDB8B9, 0xB8B9BDB8,
+ 0xBEB9B9BD, 0xB7BDB8BA, 0xB8B6BCB7, 0xBCBAB7BD,
+ 0xB8BDBBB7, 0xBBB8BDBB, 0xBFBDB8BD, 0xBABFBDBA,
+ 0xBCB7BCBA, 0xBFBDB9BE, 0xB8BDBBBA, 0xBABBBFBA,
+ 0xBFBABBBF, 0xBAC0BBB9, 0xB9BBBFB9, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBBBAC0BB, 0xBFBABAC0, 0xB8BEB9BB,
+ 0xBAB8BFBA, 0xBFBAB6C0, 0xB8BFBAB8, 0xBAB9BFBA,
+ 0xBFBAB9BF, 0xBBBFBABB, 0xBBB8BDBB, 0xBDB8B8BD,
+ 0xB8BEB9B7, 0xBAB9C0BB, 0xBFBCB8BF, 0xB8BFBCB8,
+ 0xB8B8BEB9, 0xBEB9B7BD, 0xB8BEB9B8, 0xB8B7BDB8,
+ 0xBEB9B7BD, 0xB7BDB8B8, 0xB8B7BDB8, 0xBDB8B7BD,
+ 0xB7BDB8B7, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBBB8BDBB, 0xBDB8B8BD, 0xB8BEB9B7, 0xBCB8BDBB,
+ 0xBDBBB9BE, 0xB8BEB9B8, 0xB9B8BFBA, 0xBFBAB8C0,
+ 0xB9BFBAB9, 0x007C827D, 0x04000004, 0x00040000,
+ 0x00000100, 0x01010000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00010000, 0xC1A8ACA7, 0xC0B9C1C8, 0xB8BFB8B9,
+ 0xB6B8BFB8, 0xBDB7B6BD, 0xB9BDB7B9, 0xBABEC0BA,
+ 0xC0BABEC0, 0x64635FBE, 0x00020000, 0x00000200,
+ 0x01010100, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00010000, 0x3A000400, 0xB3B13B3F,
+ 0xADB3AEAE, 0xACAFB4AB, 0xB8ADB1B7, 0xAFB7ACB2,
+ 0xAFB1B9AF, 0xB8B1B1B9, 0x50544FB1, 0x09060606,
+ 0x040A0804, 0x08040908, 0x00000000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000100, 0x02000001, 0x3B3E3500,
+ 0x97787C71, 0xB6AB9EA2, 0xB0B6ABB0, 0xA8AFB2A9,
+ 0xB3AAAEB1, 0xAFB2A9B0, 0xADAFB4AB, 0xB5ACB1B6,
+ 0xB0B5ACB0, 0xB1B2B6B0, 0xB5B0B2B6, 0xB2B6B1B1,
+ 0xBBBCC0BB, 0xBCB7BCC0, 0xB8BCB7B8, 0xB7B7BEB7,
+ 0xBEB9B7BE, 0xB7BDB8B8, 0xB6B7BEB7, 0xBDB8B6BD,
+ 0xB7BDB8B7, 0xB8B8BFBA, 0xBFB8B7BF, 0xB7BFB8B7,
+ 0xB9B8BEB9, 0xBDBBB8BE, 0xBABDBBBA, 0xB9B9BEBC,
+ 0xBDBBB6BB, 0xBABDBBBA, 0xBABCC0BB, 0xBFBABBBF,
+ 0xBBBFBABB, 0xB8B8BEB9, 0xBCBAB7BD, 0xB9BCBAB9,
+ 0xBAB9BEBC, 0xBFBAB9BF, 0xB9BFBAB9, 0xB7B9BFBA,
+ 0xBBB9B6BC, 0xB6BCB7B6, 0xB8B6BCB7, 0xBDB8B7BD,
+ 0xB7BDB8B7, 0xBBB9BEBC, 0xBFBAB8BD, 0xBBBFB9BB,
+ 0xB8B7BDB8, 0xBDB8B7BD, 0xB9BDB8B9, 0xB7B9BDB8,
+ 0xBCB7B8BC, 0xB6BCB7B8, 0xB7B6BCB7, 0xBBB9B6BC,
+ 0xB7BCBAB6, 0xBAB8BDBB, 0xBDBBB7BC, 0xB8BDBBB8,
+ 0xBAB8BDBB, 0xBDBBB7BC, 0xB8BDBBB8, 0xBABBBFBA,
+ 0xBFBABBBF, 0xB9BFBAB9, 0xBABBBFBA, 0xBFBABBBF,
+ 0xBBBFBABB, 0xBAB9BFBA, 0xBFBAB9BF, 0xBAC0BBBB,
+ 0xB9B8BFBA, 0xBEB9B8C0, 0xB8BFBAB7, 0xBAB9BFBA,
+ 0xBCB7B9BF, 0xB7BBB6B8, 0xBBB8BDBB, 0xBEB9B8BD,
+ 0xB8BEB9B8, 0xBAB9BFBA, 0xBEBCB8BF, 0xB9BEBCB9,
+ 0xB7B8BEB9, 0xBDB8B6BC, 0xB7BDB8B7, 0xB8B7BDB8,
+ 0xBEB9B7BD, 0xB6BCB7B8, 0xB6B5BBB6, 0xBCB7B5BB,
+ 0xB7BDB8B6, 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8,
+ 0xBABABDBB, 0xBDB8BBBF, 0xB8BEB9B7, 0xBCB6BBB9,
+ 0xBDBCB7BD, 0xB7BEBBB8, 0xB9B8BFBA, 0x9590B9C0,
+ 0x3E423D8F, 0x01000301, 0x04000003, 0x00040000,
+ 0x01000000, 0x00000101, 0x01010100, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00000000, 0x00000000, 0x01000001, 0x00000000,
+ 0x00020000, 0xB83D413C, 0xBCB7B9BD, 0xB9BDB8B8,
+ 0xB8B8BEB9, 0xBDB8B7BD, 0xB8BEB9B7, 0xBAB9BFBA,
+ 0x807BB9BF, 0x0001007C, 0x00000100, 0x00010000,
+ 0x02000102, 0x00020000, 0x00000200, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000400, 0x76710005,
+ 0xA9B0A970, 0xACB2B8AD, 0xB8ADB4B8, 0xB2B8ADB4,
+ 0xBBC1C8BB, 0x4742C0C6, 0x06090743, 0x01000000,
+ 0x00010000, 0x02000102, 0x00000000, 0x01000000,
+ 0x02000000, 0x01000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00010000,
+ 0x00000100, 0x514B0001, 0x7779734F, 0xA7A8ACA7,
+ 0xACA6A8AC, 0xA8ADA4A8, 0xA9B0B4A9, 0xB4A8B0B4,
+ 0xAEB4A9B0, 0xADB0B5AC, 0xB3ACADB4, 0xAEB5AEAC,
+ 0xB9BBC1BC, 0xBAB5B8BE, 0xB7BBB6B6, 0xB6B8BEB9,
+ 0xBBB6B4BB, 0xB5BBB6B5, 0xB9B3BAB5, 0xBDBAB7BE,
+ 0xB3BAB5B6, 0xBAB8BEB9, 0xBCB7B9BF, 0xB8BEB9B6,
+ 0xB7BABEB9, 0xBEBCB8BC, 0xB8BDBBBB, 0xB7B3BAB7,
+ 0xBCBAB3BA, 0xB5BAB8B7, 0xBBB6BBB9, 0xBBB9B8BD,
+ 0xB8BCB7B8, 0xBAB8BEB9, 0xBEB9B9BF, 0xB6BBB9B8,
+ 0xBAB8BDBB, 0xBDBAB7BC, 0xB7BEBBB6, 0xB8B6BDB8,
+ 0xBAB5B6BD, 0xB3BAB5B3, 0xB6B6BCB7, 0xBBB5B6BD,
+ 0xB8BCB7B7, 0xBBB8BDBB, 0xBDBBB8BD, 0xBAC0BBB8,
+ 0xBBB8BDBB, 0xBDBBB8BD, 0xB8BDBBB8, 0xBAB7BCBA,
+ 0xBBB9B7BC, 0xB6BBB9B6, 0xB6B3B9B4, 0xBAB7B4BB,
+ 0xB4BBB8B3, 0xB8B6BDB8, 0xBEBBB6BD, 0xB7BCBAB7,
+ 0xB7B6BCB7, 0xBEB9B8BC, 0xB8BEB9B8, 0xBBB8BDBB,
+ 0xBCBAB8BD, 0xBABFBDB7, 0xBBB8BBB9, 0xBEBCBABD,
+ 0xB8BBB9BB, 0xBCB9BEBC, 0xBFBDB8BF, 0xB9BFBABA,
+ 0xB9B9BFBA, 0xBDB8B8BE, 0xB6BCB7B7, 0xB9B7BDB8,
+ 0xBDB8B8BE, 0xB5BBB6B7, 0xB7B6BCB7, 0xBCB7B6BC,
+ 0xB6BCB7B6, 0xB8B6BCB7, 0xBEB9B7BD, 0xB8BEB9BA,
+ 0xB6B7BCBA, 0xBDBAB2B9, 0xB6BDBAB6, 0xBAB6BDBA,
+ 0xBBB6B6BD, 0xB4BBB6B4, 0xB5B3BAB5, 0xB9B6B3BA,
+ 0xB3BAB7B2, 0xBAB5BCB9, 0xBDBAB6BD, 0xB6BBB9B6,
+ 0xB7B8BCB7, 0xBCB7B8BC, 0xB6BBB9B8, 0xC0BAC0BF,
+ 0xBFC0B8C0, 0xBAC0BFBA, 0x3AADB4B1, 0x0400393F,
+ 0x02030100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010100, 0x01000001,
+ 0x00000000, 0x00000000, 0x00000001, 0x01010000,
+ 0x00010001, 0x7A010500, 0xBCB77B7F, 0xB8BCB7B8,
+ 0xB8B6BCB7, 0xBEB9B7BD, 0xB6BCB7B8, 0xBAB9BFBA,
+ 0x3F3DB9BF, 0x0001003C, 0x00000000, 0x00010000,
+ 0x02000002, 0x00020000, 0x00000200, 0x00000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000400, 0x04000005,
+ 0xACB0AA00, 0xADB4B8AD, 0xB8ADB4B8, 0xB4B8ADB4,
+ 0x7EC0C6BB, 0x09078287, 0x05070706, 0x00000000,
+ 0x00000000, 0x01010102, 0x00000000, 0x00000000,
+ 0x02000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000102, 0x00010000, 0x72383A3A,
+ 0xACA77072, 0xA8ACA6A8, 0xA9B0B3AA, 0xB4A8B0B4,
+ 0xAEB4A9B0, 0xADAFB4AB, 0xB5AEADB4, 0xADB4ADAE,
+ 0xB9B8BEB9, 0xBAB5B8BE, 0xB7BBB6B6, 0xB6B5BBB6,
+ 0xBBB6B4BB, 0xB4BBB6B5, 0xB5B3BAB5, 0xBAB7B3BA,
+ 0xB3BAB7B3, 0xB7B6BCB7, 0xBCB7B6BC, 0xB8BCB7B8,
+ 0xB6B8BCB7, 0xBBB9B7BB, 0xB6BBB9B8, 0xB8B4BBB8,
+ 0xBBB8B2BB, 0xB4BBB8B4, 0xBAB6BBB9, 0xBBB9B7BC,
+ 0xB6BBB9B8, 0xB7B6BCB7, 0xBCB7B6BC, 0xB6BBB9B6,
+ 0xBCB7BCBB, 0xBCB9B8BD, 0xB5BCB9B5, 0xB5B1BAB7,
+ 0xBBB8B1BB, 0xB3BAB5B4, 0xB7B6BCB7, 0xBCB7B6BC,
+ 0xB9BDB8B8, 0xBCB8BDBB, 0xBCBAB8BD, 0xB8BDBBB7,
+ 0xBBB8BDBB, 0xBCBBB8BD, 0xB7BCBBB7, 0xBAB5BCB9,
+ 0xBBBAB6BD, 0xB6BBB9B6, 0xB8B6BDBA, 0xBBB8B6BD,
+ 0xB3BAB7B4, 0xB8B3BDB7, 0xBDBAB4BE, 0xB5BCB9B6,
+ 0xB6B8BEB9, 0xBDB8B7BB, 0xB8BEB9B7, 0xB9B6BBB9,
+ 0xBBB9B6BB, 0xB6BBB9B6, 0xB9B8BBB9, 0xBCBAB8BB,
+ 0xB5BAB8B9, 0xB9B5BCB9, 0xBBB9B5BC, 0xB6BBB9B6,
+ 0xB7B6BCB7, 0xBCB7B6BC, 0xB5BBB6B6, 0xB8B5BBB6,
+ 0xBDB8B7BD, 0xB7BDB8B7, 0xB6B6BCB7, 0xBCB7B5BB,
+ 0xB5BBB6B6, 0xB8B8BEB9, 0xBEB9B9BD, 0xB7BDB8BA,
+ 0xB7B6BDBA, 0xBDBAB3BA, 0xB6BDBAB6, 0xB8B6BDBA,
+ 0xBDB8B4BB, 0xB4BBB6B6, 0xB5B3BAB5, 0xBAB7B3BA,
+ 0xB3BAB7B3, 0xB8B4BBB8, 0xBBB8B4BB, 0xB4BBB8B4,
+ 0xB6B6BCB7, 0xBCB7B8BC, 0xB6BBB9B8, 0xC0BBC1C0,
+ 0xC0C3BABF, 0x7D8283BB, 0x00000301, 0x04000004,
+ 0x02030100, 0x00000000, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x01010000, 0x00000001,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00020000, 0x00000200,
+ 0x00010000, 0x00010200, 0xBCB70203, 0xB8BCB7B8,
+ 0xB7B6BCB7, 0xBDB8B6BC, 0xB5BBB6B9, 0x7BB9BFBA,
+ 0x01007A80, 0x00010000, 0x01000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000400, 0x03010004,
+ 0x393D3800, 0xAFB4B7AE, 0xB7AEB5B8, 0xB4B7AEB4,
+ 0x06848581, 0x08080708, 0x08080808, 0x00010101,
+ 0x02000000, 0x00010001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x393A3800, 0xAD474642, 0xB3AAB3B3,
+ 0xAFB4ABB0, 0xADAFB3AD, 0xB4ADADB4, 0xADB4ADAD,
+ 0xB6B5BBB6, 0xB9B7B7BB, 0xB7BAB8B6, 0xB6B5BBB6,
+ 0xBBB8B4BB, 0xB4BBB8B4, 0xB6B4BBB8, 0xBAB7B0B9,
+ 0xB3BAB7B3, 0xB7B6BCB7, 0xBCBAB6BC, 0xB7BAB8B9,
+ 0xB9B6BBB9, 0xBAB8B6BB, 0xB6BBB9B5, 0xB8B4BBB6,
+ 0xBBB6B4BE, 0xB5BCB7B4, 0xB7B5BCB7, 0xBBB9B5BC,
+ 0xB6BBB9B6, 0xB9B6BBB9, 0xBDBAB5BC, 0xB7BDBCB6,
+ 0xBBB6BCBB, 0xBCBBB6BC, 0xB8BEBDB6, 0xB7B4BCBB,
+ 0xB9B8B1BA, 0xB3BAB7B3, 0xBAB7BEBB, 0xBBB9B7BC,
+ 0xB8BBB9B8, 0xBAB6BBBA, 0xBBB9B6BB, 0xB7BCBAB6,
+ 0xB9B5BCB9, 0xBBBAB5BC, 0xB6BBBAB6, 0xB9B4BBB8,
+ 0xBBBAB5BC, 0xB7BCBAB6, 0xB8B6BDBA, 0xBBB8B4BE,
+ 0xB4BBB8B4, 0xB6B2BCB6, 0xBBB6B2BC, 0xB4BBB6B4,
+ 0xB9B6BBB9, 0xBAB8B6BB, 0xB6BBB9B5, 0xB9B6BBB9,
+ 0xBAB9B6BB, 0xB6BBBAB5, 0xB9B8BBB9, 0xBAB8B8BB,
+ 0xB6BBB9B5, 0xB9B5BCB9, 0xBCB7B5BC, 0xB5BCB7B5,
+ 0xBAB7BEBB, 0xBEBBB6BD, 0xB8BFBCB7, 0xBAB6BDBA,
+ 0xBCB7B6BD, 0xB2B9B4B5, 0xBBB7BEBB, 0xBDBBB7BE,
+ 0xB6BBB9B8, 0xB8B6BBB9, 0xBBB9B5BA, 0xB6BBB9B6,
+ 0xB9B3B9B8, 0xBAB7B4BA, 0xB3BAB7B3, 0xB6B4BBB8,
+ 0xBBB8B2B9, 0xB2BBB8B2, 0xB7B3BAB7, 0xBAB7B3BA,
+ 0xB3BAB7B3, 0xB6B2B9B6, 0xB9B6B2B9, 0xB2B9B6B2,
+ 0xB7B5BBB6, 0xBBB9B6BC, 0xB4BBB8B6, 0x82BBC0BF,
+ 0x45467E83, 0x04090841, 0x00000301, 0x04000004,
+ 0x00040000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x01010000, 0x00000001,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x01000200,
+ 0x00010000, 0x01020301, 0x3F3D0203, 0xB8BBB93E,
+ 0xB7B7BDB8, 0xBEB9B6BC, 0xBABEB9BA, 0x3CB9BFBA,
+ 0x01003B41, 0x00000000, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000100, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000301, 0x04020003,
+ 0x00030101, 0xC28A8C86, 0xB6B0C8CB, 0x9FA19BB4,
+ 0x08080907, 0x08080808, 0x09090908, 0x00000000,
+ 0x01000000, 0x01020000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x01000000,
+ 0x01010000, 0x00000001, 0x0D10110F, 0x47411011,
+ 0x7A7C7645, 0xB2A6AAA5, 0xB7B2B1B7, 0xB3B7B2B3,
+ 0xB9B6BAB5, 0xBDBBBABE, 0xBBBEBCBC, 0xB8B5BBB6,
+ 0xBDBAB6BD, 0xB6BDBAB6, 0xBAB6BDBA, 0xBCBAB6BD,
+ 0xB7BCBAB7, 0xBBBAC0BB, 0xC0BEBAC0, 0xBCBFBDBD,
+ 0xBDBBC0BE, 0xBFBDBABF, 0xBABFBDBA, 0xBAB6BDB8,
+ 0xBDB8B8BF, 0xB8BEB9B7, 0xBEBAC1BE, 0xC0BEBAC1,
+ 0xBBC0BEBB, 0xBEB9C0BD, 0xC0BFBAC1, 0xB9BFBEBA,
+ 0xBCB8BEBD, 0xC1C0B7BD, 0xB7BDBCBB, 0xC0B6BCBB,
+ 0xBFBEBBC1, 0xBCC1C0BA, 0xBFBCC1C0, 0xBFBDBBC0,
+ 0xBCBFBDBC, 0xBEBABFBE, 0xBFBDBABF, 0xBABFBDBA,
+ 0xBDBABFBD, 0xBFBEBABF, 0xBABFBDBA, 0xBAB7BCBA,
+ 0xBDBCB6BD, 0xB8BDBBB8, 0xBAB6BDB8, 0xBFBCB8BF,
+ 0xB6BDBAB8, 0xB8B6BDB8, 0xBDB8B6BD, 0xB7BDB8B6,
+ 0xBDBABFBD, 0xBFBDBABF, 0xBABFBDBA, 0xBDB9BEBC,
+ 0xBFBEBABF, 0xBABFBEBA, 0xBDBDC0BE, 0xBEBCBCBF,
+ 0xBABFBDB9, 0xBEBABFBD, 0xC0BEBAC1, 0xB9C0BDBB,
+ 0xBDBCC1BF, 0xC0BFBABF, 0xBABFBEBB, 0xBAB6BBB9,
+ 0xBFBAB7BC, 0xB7BDB8B9, 0xBEB9BEBC, 0xBFBDBBC0,
+ 0xBABFBDBA, 0xBBB7BCBA, 0xBDBBB8BD, 0xBABFBDB8,
+ 0xBBB8BDBC, 0xBCBAB7BC, 0xB7BCBAB7, 0xBAB6BBB9,
+ 0xBDBAB6BD, 0xB5BCB9B6, 0xBAB7BCBA, 0xBCBAB7BC,
+ 0xB7BCBAB7, 0xB9B7BCBA, 0xBCBAB6BB, 0xB7BCBAB7,
+ 0xBCB9BEBC, 0xC0BEB9BE, 0xB9BEBDBB, 0x087E8382,
+ 0x08090608, 0x06080806, 0x00010402, 0x02000003,
+ 0x00030100, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x01010200, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x06080606, 0x06060806, 0x81818108,
+ 0xB5B3B8B6, 0xB9B4B1B8, 0xB2B8B3B3, 0x00585B59,
+ 0x00000001, 0x01010100, 0x01020001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00020000, 0x00000200,
+ 0x02000002, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x02000002, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x9C090A06, 0xA19DA0A2, 0x3B3C38A0,
+ 0x00000100, 0x01010000, 0x00000001, 0x01000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x3C080907, 0xA3A13B3E, 0xA0A49FA2,
+ 0xA2A4A8A3, 0xA6A4A1A7, 0xA3A6A4A3, 0xA2A1A7A2,
+ 0xA6A4A1A7, 0xA0A5A3A1, 0xA29EA3A1, 0xA3A19FA4,
+ 0xA0A3A1A0, 0xA2A1A7A2, 0xA6A4A1A7, 0xA3A6A4A3,
+ 0xA2A2A8A3, 0xA6A4A1A7, 0xA3A6A4A3, 0xA29EA3A1,
+ 0xA3A19FA4, 0xA0A3A1A0, 0xA7A3A8A7, 0xA9A8A3A8,
+ 0xA3A8A6A4, 0xA2A2A7A5, 0xA6A4A1A7, 0xA0A5A3A1,
+ 0xA4A1A6A4, 0xA6A4A1A6, 0xA1A6A4A1, 0xA19EA3A1,
+ 0xA3A19EA3, 0xA0A3A1A0, 0xA1A0A2A2, 0xA3A19FA1,
+ 0xA0A3A1A0, 0xA1A0A3A1, 0xA3A1A0A3, 0xA0A3A1A0,
+ 0xA2A3A7A2, 0xA6A4A3A7, 0xA3A6A4A3, 0xA2A1A6A4,
+ 0xA6A4A1A7, 0xA1A6A4A3, 0xA2A1A7A2, 0xA6A4A1A7,
+ 0xA1A6A4A1, 0xA2A1A7A2, 0xA6A4A1A7, 0xA3A6A4A1,
+ 0xA2A4A8A3, 0xA6A4A3A7, 0xA1A6A4A3, 0xA09CA19F,
+ 0xA2A19CA3, 0x9CA1A09C, 0xA5A3A5A5, 0xA5A5A3A5,
+ 0xA3A5A5A3, 0xA4A3A6A4, 0xA7A5A1A6, 0xA1A6A4A4,
+ 0xA4A3A6A4, 0xA5A5A3A6, 0xA3A5A5A3, 0xA1A0A3A1,
+ 0xA4A2A0A3, 0xA0A3A1A1, 0xA2A2A2A2, 0xA2A2A2A2,
+ 0xA0A2A2A2, 0xA1A0A3A1, 0xA3A1A0A3, 0xA0A3A1A0,
+ 0xA1A0A3A1, 0xA4A2A0A3, 0x9FA2A0A1, 0xA4A3A6A4,
+ 0xA6A4A1A6, 0xA1A6A4A1, 0xA1A0A3A1, 0xA3A1A0A3,
+ 0xA0A3A1A0, 0xA1A0A3A1, 0xA3A1A0A3, 0xA0A3A1A0,
+ 0xA09DA2A0, 0xA1A19CA1, 0x3739399F, 0x00000000,
+ 0x00010000, 0x01000200, 0x00000000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010101, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x02000002, 0x07080507, 0x05070805, 0x2E2E2E08,
+ 0xB5B4B6B6, 0xB7B2B2B7, 0xB2B8B3B1, 0x001C1F1D,
+ 0x01010001, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00020000, 0x00000200,
+ 0x02000002, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000002, 0x00020000,
+ 0x00000000, 0x00000002, 0x00020000, 0x00000000,
+ 0x00000002, 0x00020000, 0x00000000, 0x00000002,
+ 0x00000000, 0x00000000, 0x02000002, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x06070806, 0x0804090A, 0x08090707,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00020000, 0x00000000,
+ 0x00000002, 0x00020000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000002, 0x00020000,
+ 0x00000000, 0x00000002, 0x00020000, 0x00000000,
+ 0x00000002, 0x00020000, 0x00000000, 0x02000002,
+ 0x00020000, 0x00000200, 0x02000002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000100,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x08080808, 0x09070808, 0x08090708,
+ 0x05050806, 0x0907040A, 0x06090706, 0x06050806,
+ 0x0A08070B, 0x06090707, 0x07060907, 0x09070609,
+ 0x08090708, 0x05060907, 0x0907040A, 0x06090706,
+ 0x05060907, 0x0907040A, 0x06090706, 0x07060907,
+ 0x08080609, 0x08080808, 0x08060808, 0x09080409,
+ 0x04090804, 0x05040907, 0x0907040A, 0x05080606,
+ 0x04060907, 0x09070309, 0x070A0806, 0x07050806,
+ 0x09070609, 0x08090708, 0x08070909, 0x09070608,
+ 0x06090706, 0x07050806, 0x09070609, 0x08090708,
+ 0x05060907, 0x0907060A, 0x06090708, 0x05060907,
+ 0x0907040A, 0x06090706, 0x06060907, 0x0907050B,
+ 0x06090706, 0x06060907, 0x0907050B, 0x06090706,
+ 0x05060907, 0x0907060A, 0x06090706, 0x07040907,
+ 0x09080409, 0x04090804, 0x06040606, 0x06060406,
+ 0x04060604, 0x05040606, 0x06060505, 0x06060606,
+ 0x06040606, 0x05050406, 0x06060605, 0x07080808,
+ 0x08060609, 0x08090707, 0x05080606, 0x06060705,
+ 0x06060606, 0x07080808, 0x09070609, 0x08090708,
+ 0x06060907, 0x09070508, 0x08090708, 0x07060907,
+ 0x0A080609, 0x06090707, 0x07080907, 0x09070809,
+ 0x08090708, 0x07060907, 0x09070609, 0x08090708,
+ 0x07030505, 0x06070308, 0x06050704, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000000, 0x02000002,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00020000,
+ 0x00000200, 0x02000002, 0x00020000, 0x00000301,
+ 0x02000002, 0x06080507, 0x05070704, 0x08060608,
+ 0xE4585858, 0xE8E3E3E6, 0x575B56E4, 0x00000100,
+ 0x00000001, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00020000, 0x00000200, 0x02000002, 0x00000100,
+ 0x01000001, 0x00010000, 0x00020000, 0x00000200,
+ 0x02000002, 0x00020000, 0x00010200, 0x00000100,
+ 0x00020000, 0x00000200, 0x02000004, 0x00040000,
+ 0x00000200, 0x02000004, 0x00040000, 0x00000200,
+ 0x02000004, 0x00040000, 0x00000200, 0x02000004,
+ 0x00020000, 0x00000200, 0x02000004, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000102,
+ 0x00010000, 0x07080907, 0x09070809, 0x08090708,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00020000,
+ 0x00000200, 0x04000004, 0x00040000, 0x00000200,
+ 0x02000004, 0x00040000, 0x00000200, 0x02000002,
+ 0x00020000, 0x00000200, 0x02000004, 0x00040000,
+ 0x00000200, 0x02000004, 0x00040000, 0x00000200,
+ 0x02000004, 0x00040000, 0x00000200, 0x02000004,
+ 0x00020000, 0x00000200, 0x02000002, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x00000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x00000200,
+ 0x02000002, 0x07070806, 0x08080809, 0x07080608,
+ 0x06060907, 0x08080508, 0x06090706, 0x07070A08,
+ 0x08080809, 0x08080808, 0x08080808, 0x08080808,
+ 0x0809070A, 0x07060907, 0x08080609, 0x06090708,
+ 0x07060907, 0x08080609, 0x08080808, 0x07080907,
+ 0x08080809, 0x0808080A, 0x08060808, 0x08080409,
+ 0x06080806, 0x07060907, 0x08080609, 0x06090708,
+ 0x07070A08, 0x08080609, 0x08080808, 0x07080907,
+ 0x08080809, 0x0808080A, 0x08060808, 0x08080608,
+ 0x08080808, 0x08080808, 0x08080808, 0x07080608,
+ 0x07060907, 0x08080609, 0x06090708, 0x07060907,
+ 0x08080409, 0x06090706, 0x07060907, 0x08080609,
+ 0x06090708, 0x07060907, 0x08080609, 0x06090708,
+ 0x07060907, 0x08080609, 0x06080806, 0x08060808,
+ 0x08090608, 0x06080906, 0x07060507, 0x05070605,
+ 0x06050706, 0x07060507, 0x05070805, 0x08050708,
+ 0x07060507, 0x05070605, 0x06060608, 0x08080808,
+ 0x08080808, 0x09090908, 0x07080507, 0x05070805,
+ 0x06060608, 0x08080808, 0x08080808, 0x08080808,
+ 0x09080808, 0x07070909, 0x08080807, 0x08060808,
+ 0x08080608, 0x06080806, 0x08080808, 0x08080808,
+ 0x08080808, 0x08080808, 0x08080808, 0x0A08080A,
+ 0x06060507, 0x05090504, 0x04060704, 0x00000000,
+ 0x01000001, 0x01010100, 0x01030101, 0x00000301,
+ 0x02000002, 0x00040000, 0x00000200, 0x02000004,
+ 0x00020000, 0x00000200, 0x02000002, 0x00020000,
+ 0x00010200, 0x02000102, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x3A292726,
+ 0x3A3B3D3B, 0x3D3B3B3F, 0x393D3B3A, 0x3B3A3A3B,
+ 0x3D3B3B3D, 0x2E2F2D2D, 0x2E2E302E, 0x302E2E30,
+ 0x86585957, 0x88868788, 0x56595787, 0x3B3C3D3B,
+ 0x3C3C3C3D, 0x3C3D3B3C, 0x373A3B39, 0x3B373A3B,
+ 0x3A3B373C, 0x373A3B37, 0x3B373A3B, 0x3C3A393C,
+ 0x393A3B39, 0x3B393A3B, 0x3A3B393A, 0x393A3B39,
+ 0x3B393A3B, 0x3A3B393A, 0x393A3B39, 0x3B39383B,
+ 0x383B393A, 0x39383B39, 0x3B39383B, 0x383B3938,
+ 0x39383B39, 0x3B39383B, 0x383B3938, 0x39383B39,
+ 0x3B39383B, 0x383B3938, 0x39383B39, 0x3B39383B,
+ 0x383B3938, 0x39383B39, 0x3B39383B, 0x383B3938,
+ 0x39383B39, 0x3B39383B, 0x383B3938, 0x39383B39,
+ 0x3B39383B, 0x383B3938, 0x39383B39, 0x3B39383B,
+ 0x383B3938, 0x39383B39, 0x3B39383B, 0x383B3938,
+ 0x39383B39, 0x3B39383B, 0x383B3938, 0x39383B39,
+ 0x3B39383B, 0x383B3938, 0x39383B39, 0x3B39383B,
+ 0x383B3938, 0x39383B39, 0x3B39383B, 0x383B3938,
+ 0x39383B39, 0x3B39383B, 0x383B3938, 0x39383B39,
+ 0x3B39383B, 0x383B3938, 0x393A3B39, 0x3B393A3B,
+ 0x3A3B393A, 0x39383B39, 0x3B39383B, 0x3A3B393A,
+ 0x3A3D3B3A, 0x3B3A3D3B, 0x3D3B3A3D, 0x393A3B39,
+ 0x3B393A3B, 0x393A383A, 0x3A3C3D3B, 0x3A3A3D3B,
+ 0x3E3C3C3C, 0x3F403E3E, 0x3E3E3F3F, 0x3E3E3E3E,
+ 0x3A3D3B3A, 0x3B3A3F3B, 0x3F3B3A3F, 0x3A3F3B3A,
+ 0x3B3A3F3B, 0x3F3B3A3F, 0x3A3D3B3A, 0x3B3A3D3B,
+ 0x3F3B3A3F, 0x3A3F3B3A, 0x3B3A3F3B, 0x3D3B3A3F,
+ 0x3A3D3B3A, 0x3B3A3D3B, 0x3D3B3A3F, 0x373A3B39,
+ 0x3B39383C, 0x393A3838, 0x393A3B39, 0x3B393A3B,
+ 0x3B3C3A3A, 0x3A3B3C3A, 0x3C3A3B3C, 0x3B3C3A3B,
+ 0x37383C37, 0x3A393A3B, 0x3A3B393C, 0x393A3B39,
+ 0x3B39383B, 0x3A3B393A, 0x393A3B39, 0x3B393A3B,
+ 0x3A3B393A, 0x393A3B39, 0x3B373A3B, 0x3A3B373A,
+ 0x39383B39, 0x3B39383B, 0x383B3938, 0x39383B39,
+ 0x3B39383B, 0x383B3938, 0x39383B39, 0x3B39383B,
+ 0x383B3938, 0x39383B39, 0x3B39383B, 0x383C3738,
+ 0x39383B39, 0x3B39383B, 0x383B3938, 0x39383B39,
+ 0x3B39383B, 0x383B3938, 0x39383B39, 0x3B39383B,
+ 0x383B3938, 0x39383B39, 0x3B39383B, 0x383B3938,
+ 0x39383B39, 0x3B39383B, 0x383B3938, 0x39383B39,
+ 0x3B39383B, 0x383B3938, 0x39383B39, 0x3B39383B,
+ 0x383B3938, 0x39383B39, 0x3B393A3B, 0x3A3B393A,
+ 0x393A3B39, 0x3B39383B, 0x383B3938, 0x37383B39,
+ 0x3B39383C, 0x383C3738, 0x373A3B39, 0x3B393A3B,
+ 0x3A3B393A, 0x393A3B39, 0x3B393A3B, 0x3A3B393A,
+ 0x373A3B39, 0x3A393C3B, 0x3C3A393C, 0x3A3D3B3A,
+ 0x3B3A3D3B, 0x3F3B3A3F, 0x3A3F3B3A, 0x3B3A3F3B,
+ 0x3F3B3A3F, 0x383F3C38, 0x3C383D3C, 0x3D3C383D,
+ 0x3A3D3B3A, 0x3B3A3F3B, 0x3F3B3A3F, 0x3A3F3B3A,
+ 0x3B3A3F3B, 0x3F3B3A3F, 0x3A3D3B3A, 0x3B3A3D3B,
+ 0x3D3B3A3D, 0x3A3D3B3A, 0x3B3A3D3B, 0x3F3B3A3F,
+ 0x3A3D3B3A, 0x3B3A3D3B, 0x3D3B3A3D, 0x393C3A39,
+ 0x3B393A3B, 0x393A383A, 0x393A3B39, 0x3B39383B,
+ 0x3A3B393A, 0x393A3B39, 0x3B393A3B, 0x3A3B393A,
+ 0x393A3B39, 0x3B393A3B, 0x3A3B393A, 0x393A3B39,
+ 0x3B393A3B, 0x3A3B393A, 0x393A3B39, 0x3B393A3B,
+ 0x3A3B393A, 0x393A3B39, 0x3B393A3B, 0x3A3B393A,
+ 0x39383B39, 0x3B39383B, 0x383C3738, 0x37383B39,
+ 0x3B39383C, 0x383C3738, 0x39383B39, 0x3B39383B,
+ 0x383B3938, 0x39383B39, 0x3B39383B, 0x383B3938,
+ 0x37383937, 0x39373839, 0x393A3838, 0x37373A38,
+ 0x3C37383C, 0x383B3938, 0x393A3B39, 0x3B393A3B,
+ 0x3A3B393A, 0x40404040, 0x41414040, 0x40413F41,
+ 0x39383B39, 0x3B39383B, 0x383B3938, 0x39383B39,
+ 0x3B39383B, 0x3A3B3938, 0x393A3B39, 0x3B393A3B,
+ 0x3A3B393A, 0x393A3B39, 0x3B393A3B, 0x3A3B393A,
+ 0x393B3C3A, 0x3B393A3B, 0x3A3B393A, 0x373A3B37,
+ 0x3C38383C, 0x3A3B373B, 0x3A3D3B3A, 0x3B3A3D3B,
+ 0x3D3B3A3F, 0x393E3D39, 0x3E3C3C3D, 0x3C3D3B3D,
+ 0x3B3C3D3B, 0x3D3B3A3D, 0x3C3D3B3C, 0x3C3C3D3B,
+ 0x3D3B3D3E, 0x3C3D3B3C, 0x3B3C3C3C, 0x3C3B3C3D,
+ 0x3C3D3B3E, 0x3C3C3D3B, 0x3C3C3B3E, 0x3C3C3C3C,
+ 0x3B3C3D3B, 0x3D3B3A3D, 0x3C3D3B3C, 0x3B3C3D3B,
+ 0x3C3B3C3D, 0x3C3D3B3E, 0x3D3B3D3D, 0x3D3D393E,
+ 0x3B3D3D3B, 0x3B3A3D3B, 0x3D3B3A3D, 0x3C3D3B3C,
+ 0x3B3C3D3B, 0x3C3C3C3D, 0x3C3C3C3C, 0x3B3D3E3C,
+ 0x3C3C3C3D, 0x3C3C3C3E, 0x3B3C3C3C, 0x3C3C3C3D,
+ 0x3C3D3B3C, 0x3B3C3C3C, 0x3C3C3C3D, 0x3C3D3B3C,
+ 0x3B3A3D3B, 0x3D3B3A3D, 0x3A3D3B3C, 0x3B383D3B,
+ 0x3D3B383D, 0x3C3D3B3A, 0x3B3A3D3B, 0x3D3B3A3D,
+ 0x3C3D3B3C, 0x3C3A3D3B, 0x3D3B3B3E, 0x3A3D3B3C,
+ 0x3B373C3A, 0x3C3C383D, 0x3C3C3C3C, 0x3B393B3B,
+ 0x3B3B393B, 0x3B3B3B3B, 0x3B3B3B3B, 0x3C3C3B3B,
+ 0x3B3B3B3C, 0x3C3B3B3B, 0x3A3C3D3A, 0x3D3A3C3D,
+ 0x3B3B3A3C, 0x3B3D3A39, 0x3B3B3B3E, 0x3B3C3C3C,
+ 0x3C3C3B3B, 0x3C3C3C3C, 0x3A3A3A3A, 0x393B3A3A,
+ 0x3A3A3A3C, 0x3B3C3C3C, 0x3C3C3C3D, 0x3C3D3B3C,
+ 0x3B3C3C3C, 0x3C3C3C3D, 0x3C3D3B3C, 0x3B3D3D3D,
+ 0x3C3C3C3D, 0x3C3D3B3C, 0x3B3C3C3C, 0x3C3C3C3D,
+ 0x3C3D3B3C, 0x3B3C3C3C, 0x3C3C3C3D, 0x3E3C3C3E,
+ 0x393B3939, 0x393B3939, 0x3838383A, 0x363A3B39,
+ 0x3A39393A, 0x3B39383C, 0x3A3D3B3A, 0x3B3A3D3B,
+ 0x3F3B3A3F, 0x383F3C38, 0x3B3A3F3C, 0x3E3C3B3F,
+ 0x3A3E3C3B, 0x3A3A3D3B, 0x3E3C3C3C, 0x3F403E3E,
+ 0x3E3E413F, 0x403E3E40, 0x40404040, 0x40404040,
+ 0x40404040, 0x16404040, 0x00001616, 0x00000000,
+ 0x01000001, 0x01010000, 0x00000001, 0x813D3B3B,
+ 0x80808381, 0x82808082, 0x77787977, 0x78787679,
+ 0x78787878, 0x73757674, 0x75747677, 0x78767577,
+ 0x66727371, 0x69676768, 0x72737168, 0x72757372,
+ 0x74737573, 0x75737276, 0x70757470, 0x74707574,
+ 0x77747077, 0x7077746F, 0x746F7875, 0x77747077,
+ 0x70757470, 0x75717574, 0x75747076, 0x70757470,
+ 0x74707574, 0x77747077, 0x70757470, 0x74707374,
+ 0x73747075, 0x6F72736F, 0x736F7273, 0x72736F72,
+ 0x6A717570, 0x73716B6F, 0x70737170, 0x6F6E716F,
+ 0x716F6E71, 0x70716F70, 0x71717472, 0x736F7073,
+ 0x6D6E6A72, 0x6F6E716F, 0x716F6E71, 0x70716F70,
+ 0x6F70716F, 0x72707071, 0x70716F71, 0x6F6B6F6A,
+ 0x746F7074, 0x6F736E70, 0x6F6F7270, 0x716F6E71,
+ 0x70716F70, 0x6F70716F, 0x70707071, 0x70707070,
+ 0x6E6D706E, 0x716F6D70, 0x71727070, 0x72707371,
+ 0x72707174, 0x72737171, 0x6F70746F, 0x746F7074,
+ 0x70746F70, 0x6F72736F, 0x736F7273, 0x72736F72,
+ 0x6F70746F, 0x736F7074, 0x72736F72, 0x6E70746F,
+ 0x736F6F73, 0x72736F72, 0x70767571, 0x74707574,
+ 0x75747075, 0x73767773, 0x77737677, 0x78777378,
+ 0x7373726E, 0x77737677, 0x78777378, 0x78787977,
+ 0x7472777A, 0x78797773, 0x77787977, 0x79777879,
+ 0x797A7878, 0x77787977, 0x78767879, 0x78797777,
+ 0x73787773, 0x77737877, 0x7A77737A, 0x757A7975,
+ 0x78777A79, 0x7A78777C, 0x77777874, 0x78777879,
+ 0x7A78787A, 0x787A7877, 0x78777B79, 0x7A78777A,
+ 0x72787773, 0x77737576, 0x78777378, 0x6E72736F,
+ 0x736F7274, 0x74736F72, 0x7074736F, 0x736F7574,
+ 0x73747074, 0x7072736F, 0x73717374, 0x70737170,
+ 0x6F72736F, 0x726E7273, 0x73747073, 0x6F72736F,
+ 0x736F7074, 0x72736F72, 0x706F736E, 0x746F7175,
+ 0x70746F70, 0x6F737470, 0x736F7273, 0x72736F74,
+ 0x716B6E6C, 0x736F7073, 0x70746F72, 0x6F70746F,
+ 0x746F6E74, 0x6B6F6A70, 0x7070716F, 0x70707172,
+ 0x70716F70, 0x6A6E6F6D, 0x6F6B6D6E, 0x6E706A6E,
+ 0x6B6E6F6B, 0x6F6B6E6F, 0x6D6E6A6E, 0x6F6F7270,
+ 0x716F6E71, 0x70716F70, 0x706E716F, 0x716F6F72,
+ 0x70716F70, 0x706E7070, 0x70706E70, 0x70707070,
+ 0x6F737472, 0x736F7273, 0x71726E72, 0x6A70746F,
+ 0x736E6B6F, 0x70746F6F, 0x6F6E746F, 0x746F7074,
+ 0x72736F70, 0x70737470, 0x74707574, 0x78757177,
+ 0x6F73726E, 0x736F7273, 0x72736F72, 0x6E70746F,
+ 0x74707074, 0x71736D73, 0x6F757470, 0x74707575,
+ 0x77747077, 0x70757470, 0x74707574, 0x75747075,
+ 0x6F757470, 0x74707774, 0x77747077, 0x74787675,
+ 0x77737775, 0x78777378, 0x6D787773, 0x77737271,
+ 0x78777378, 0x72787872, 0x78727878, 0x78787278,
+ 0x73787773, 0x77737877, 0x78777378, 0x73787773,
+ 0x76757877, 0x78767578, 0x77747573, 0x7A787879,
+ 0x78797779, 0x75787975, 0x79757879, 0x74736F7A,
+ 0x6F777470, 0x74707673, 0x75747077, 0x757A7975,
+ 0x736F7A79, 0x74736F74, 0x70757470, 0x74707374,
+ 0x73747075, 0x6F72736F, 0x736F7273, 0x74736F74,
+ 0x70757470, 0x74707574, 0x75747075, 0x70757470,
+ 0x74707574, 0x75747075, 0x6F72736F, 0x726E7273,
+ 0x72736F73, 0x6F72736F, 0x746F7074, 0x70746F70,
+ 0x6B6F706C, 0x6F6B6E6F, 0x6E706A6E, 0x6B6E6F6B,
+ 0x706C6F71, 0x6F716B6F, 0x6F6B6F6A, 0x746F7074,
+ 0x6B6F6A70, 0x6B6C706B, 0x706B6C70, 0x6C706B6C,
+ 0x6B6F706C, 0x6F6B6E6F, 0x6E706A6E, 0x6A6E706A,
+ 0x706A6E70, 0x6C706B6C, 0x6F6E716F, 0x6F6F6E71,
+ 0x7070706F, 0x6C747271, 0x73726F6D, 0x72736F75,
+ 0x6F70746F, 0x746F7074, 0x71757070, 0x6F70746F,
+ 0x746F7074, 0x70746F70, 0x6F70746F, 0x74707074,
+ 0x71726E73, 0x70757470, 0x74707574, 0x75747075,
+ 0x70757470, 0x74707574, 0x73747075, 0x6E72736F,
+ 0x746E7274, 0x72746E72, 0x73787773, 0x77717979,
+ 0x78787277, 0x72797973, 0x78727878, 0x78787278,
+ 0x73787872, 0x77737677, 0x78777378, 0x757A7975,
+ 0x79757A79, 0x7A79757A, 0x73767775, 0x77737677,
+ 0x75767278, 0x77797A78, 0x79797679, 0x78787879,
+ 0x73767775, 0x77737677, 0x78777378, 0x74777874,
+ 0x76727778, 0x77787477, 0x77767977, 0x78787679,
+ 0x74757378, 0x74767773, 0x77737778, 0x79787478,
+ 0x70757470, 0x72717574, 0x75737274, 0x71727371,
+ 0x73717073, 0x72737172, 0x6F727371, 0x72717273,
+ 0x74736F74, 0x6F727371, 0x73717273, 0x73747072,
+ 0x6F70746F, 0x746F7074, 0x70746F70, 0x6F6E746F,
+ 0x746F6E74, 0x70746F70, 0x6F70746F, 0x736F7074,
+ 0x71726E72, 0x6F717570, 0x746F7074, 0x6B6E6C70,
+ 0x706C716F, 0x70706C71, 0x70707070, 0x70707070,
+ 0x6F6F7070, 0x70716F6F, 0x71717472, 0x6E6C7073,
+ 0x6B6E6C6B, 0x716E716F, 0x70707171, 0x71717170,
+ 0x70707070, 0x70706E70, 0x70716F70, 0x6F6E716F,
+ 0x716F6E71, 0x70716F70, 0x6F6D706E, 0x70706E71,
+ 0x70716F70, 0x6F727371, 0x73717074, 0x70746F70,
+ 0x6F707371, 0x73717074, 0x72736F70, 0x70737472,
+ 0x73727574, 0x75747075, 0x6F717270, 0x72717273,
+ 0x74736F74, 0x70757372, 0x73727574, 0x76757175,
+ 0x72767773, 0x77737678, 0x78777378, 0x70757470,
+ 0x74707676, 0x78757177, 0x73787773, 0x78747877,
+ 0x78777379, 0x757A7975, 0x78777A79, 0x7A78777A,
+ 0x757A7877, 0x78777879, 0x7A78777A, 0x77787977,
+ 0x78777879, 0x7A78787A, 0x78787878, 0x78787878,
+ 0x78787878, 0x25727371, 0x00002627, 0x01010100,
+ 0x01000001, 0x00000000, 0x00000000, 0x803D3B3B,
+ 0x69698280, 0x6B69686B, 0x686B6C6A, 0x7070676A,
+ 0x6D6F6F6E, 0x696C6D69, 0x6D696C6D, 0x6C6D6B6E,
+ 0x6B6C6D6B, 0x6C6C6C6D, 0x6C6C6C6C, 0x6B6E6C6B,
+ 0x6C6B6E6C, 0x6E6D696E, 0x666E6B66, 0x6C686E6B,
+ 0x6E6B666F, 0x636E6C64, 0x6A656D6B, 0x6E6B666E,
+ 0x656A6965, 0x69656A69, 0x6A69656A, 0x656A6965,
+ 0x69656C69, 0x6C69656C, 0x656A6965, 0x69656A69,
+ 0x6B6A666A, 0x66696864, 0x69656B6A, 0x6A69656C,
+ 0x65666763, 0x6866666A, 0x65686665, 0x66656866,
+ 0x68666568, 0x65686667, 0x67656866, 0x67636669,
+ 0x67686466, 0x66656866, 0x68666568, 0x62636167,
+ 0x66676866, 0x68666768, 0x65686667, 0x64666A65,
+ 0x69646569, 0x65696465, 0x66646765, 0x68666568,
+ 0x68696767, 0x66676866, 0x67676768, 0x67686667,
+ 0x66656866, 0x68666568, 0x66676567, 0x65656866,
+ 0x68666467, 0x65686667, 0x64656964, 0x69646569,
+ 0x65696465, 0x65686965, 0x69656869, 0x6968646A,
+ 0x65686965, 0x69656869, 0x6A69656A, 0x686A6B67,
+ 0x6B676B6C, 0x6C6B676A, 0x666A6965, 0x69656B6A,
+ 0x6968646A, 0x696C6D69, 0x6D696C6D, 0x6E6D696E,
+ 0x686C6D69, 0x6C6B6B6C, 0x6D6E6C6E, 0x68686B69,
+ 0x6B69676A, 0x6A6B696A, 0x696D706E, 0x6B69686B,
+ 0x676A686A, 0x69676A68, 0x6B69686B, 0x6F706C6A,
+ 0x696C6D69, 0x6C686E6D, 0x6E6D696D, 0x686F6F69,
+ 0x6D696E6E, 0x6F6E6A6E, 0x696D6E6A, 0x6C6B6C6D,
+ 0x6E6C6B6E, 0x696C6D6B, 0x6D696C6D, 0x6E6D696E,
+ 0x696C6D69, 0x6D696C6D, 0x6E6D696E, 0x666A6C66,
+ 0x706A6A6C, 0x6C6C6670, 0x656A6965, 0x6A666A69,
+ 0x6A69656B, 0x666D6C68, 0x6B67696A, 0x6A6B676A,
+ 0x65686965, 0x6A666A69, 0x6968646B, 0x64656964,
+ 0x68646569, 0x67686467, 0x64656964, 0x69646569,
+ 0x65696465, 0x656A6965, 0x6A666A69, 0x6A69656B,
+ 0x64676866, 0x68646569, 0x666A6567, 0x64656964,
+ 0x69646369, 0x65696465, 0x66656866, 0x67676568,
+ 0x67686667, 0x64666763, 0x68626768, 0x66686266,
+ 0x60646660, 0x65616364, 0x64656166, 0x61656866,
+ 0x68666063, 0x67686667, 0x60656866, 0x63615F62,
+ 0x65686662, 0x66656866, 0x68686466, 0x65676766,
+ 0x64676866, 0x68646768, 0x67686467, 0x64656964,
+ 0x69646569, 0x65696465, 0x64656964, 0x6A656569,
+ 0x66676366, 0x66676864, 0x69656B6A, 0x6C69656C,
+ 0x656C6965, 0x69656A69, 0x6869656A, 0x67696B65,
+ 0x6C666B6D, 0x6D6D676C, 0x666B6B65, 0x6C676C6C,
+ 0x6E6B666F, 0x64726F6B, 0x706C6968, 0x6A696571,
+ 0x666E6B66, 0x6A656E6B, 0x6E6B666D, 0x6B6A6867,
+ 0x6C6B6E6C, 0x6C6D696E, 0x656B6C6A, 0x6D6B6869,
+ 0x6C6D696C, 0x64686A64, 0x6A646A6D, 0x6C6C666A,
+ 0x696D6E6A, 0x6C686C6D, 0x6D6C686D, 0x686C6D69,
+ 0x6C6B6B6C, 0x6C6D6B6E, 0x69686B69, 0x6B69686B,
+ 0x6B6C686A, 0x686B6C68, 0x6D696C6E, 0x6E6E686E,
+ 0x666E6B66, 0x6B666E6B, 0x6D6A656E, 0x686E6E68,
+ 0x6D696E6E, 0x6E6D696E, 0x65696864, 0x69656A69,
+ 0x6A69656A, 0x656A6965, 0x69656A69, 0x6A69656A,
+ 0x65696864, 0x68646A69, 0x6A69656B, 0x656A6965,
+ 0x69656A69, 0x6A69656A, 0x656A6965, 0x69656A69,
+ 0x6A69656A, 0x64676864, 0x69646569, 0x65696465,
+ 0x636A6B67, 0x68626667, 0x65676166, 0x62666862,
+ 0x67616668, 0x64686265, 0x5E60645E, 0x6A656064,
+ 0x60645F66, 0x5F5F635E, 0x645F6064, 0x5F635E60,
+ 0x6362645E, 0x68626769, 0x66686266, 0x6162645E,
+ 0x68626567, 0x60645F64, 0x60656964, 0x68665F62,
+ 0x67686667, 0x67676362, 0x64606C68, 0x65646067,
+ 0x64676864, 0x69646569, 0x64686365, 0x64656964,
+ 0x69646569, 0x63696463, 0x64656964, 0x67636569,
+ 0x68696566, 0x656A6965, 0x69656A69, 0x6A69656A,
+ 0x656A6965, 0x69656A69, 0x6968646A, 0x676A6C66,
+ 0x6C666B6D, 0x6B6B656A, 0x676D6D67, 0x6F666D6D,
+ 0x6D6E656E, 0x666C6D64, 0x6D646E6F, 0x6D6E656C,
+ 0x696E6D69, 0x6D696E6D, 0x6E6D696E, 0x696E6D69,
+ 0x6C686E6D, 0x6E6D696D, 0x696D6E6A, 0x6D696C6D,
+ 0x6D6E6A6E, 0x6D6D6E6C, 0x6D6D6D6D, 0x6F6D6D6D,
+ 0x696C6D6B, 0x6D696C6D, 0x6E6D696E, 0x696C6D69,
+ 0x6E6A6C6D, 0x6C6D696F, 0x67676B66, 0x6B69686C,
+ 0x6A6B696A, 0x696C6D69, 0x6D696C6D, 0x6E6D696E,
+ 0x6A6E6C6B, 0x6D6C6D6B, 0x6E6C6B6F, 0x6C6C6C6C,
+ 0x6D6B6B6E, 0x6C6D6B6C, 0x65696A68, 0x68646A69,
+ 0x6C69656B, 0x656A6965, 0x706C6869, 0x68696571,
+ 0x646B6F6A, 0x69646569, 0x65696465, 0x64636964,
+ 0x68636369, 0x65696464, 0x63666A65, 0x68646468,
+ 0x67686467, 0x64656964, 0x69646569, 0x65696465,
+ 0x66656866, 0x68666568, 0x67686665, 0x66676866,
+ 0x68666768, 0x67686667, 0x645F635E, 0x645F6569,
+ 0x65696460, 0x61666967, 0x68666063, 0x65686665,
+ 0x66656767, 0x68666568, 0x66696767, 0x66606361,
+ 0x63616568, 0x65686660, 0x61606361, 0x68666063,
+ 0x67686665, 0x64656964, 0x69646569, 0x65696465,
+ 0x64656964, 0x69646569, 0x666A6565, 0x65696A66,
+ 0x69656A69, 0x6968646A, 0x656A6965, 0x69656A69,
+ 0x6A69656A, 0x656A6965, 0x69656A69, 0x6869656A,
+ 0x64696B65, 0x6B656A6D, 0x6A6A646B, 0x656E6B66,
+ 0x6B666D6A, 0x6E6B666E, 0x6B6E6D69, 0x6C6B6E6C,
+ 0x6C6D696E, 0x696C6D69, 0x6D696C6D, 0x6E6D696E,
+ 0x696C6D69, 0x6D696C6D, 0x6E6D696E, 0x696E6D69,
+ 0x6D696C6D, 0x6D6B6A6E, 0x6E6E6E6E, 0x6D6D6E6E,
+ 0x6869676D, 0x23727371, 0x00002627, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000000, 0x683C3A39,
+ 0x6A696B69, 0x6B69686C, 0x6A6A6B69, 0x6A686B6C,
+ 0x686B6967, 0x6B6D6E6C, 0x69676C6D, 0x69696968,
+ 0x6C6B6B6B, 0x6C6D6A6C, 0x696B6B6A, 0x6B686967,
+ 0x6D6B6C6D, 0x6869656C, 0x646C6C66, 0x68626C6D,
+ 0x6C6C6668, 0x646C6D64, 0x6C646C6D, 0x6D6A656E,
+ 0x65686965, 0x69656869, 0x68696568, 0x66686965,
+ 0x6965696A, 0x68696568, 0x65686965, 0x69656869,
+ 0x6968646A, 0x606C6965, 0x68656764, 0x6C69656D,
+ 0x5E62635F, 0x6A655F63, 0x65696466, 0x62616462,
+ 0x69646164, 0x65696465, 0x5F656964, 0x65605E64,
+ 0x5F635E61, 0x5F60645F, 0x635E6064, 0x60645F5F,
+ 0x6460645F, 0x65606569, 0x60645F61, 0x5F60645F,
+ 0x645F5E64, 0x65696460, 0x5F60645F, 0x63616064,
+ 0x60636160, 0x5F60645F, 0x68666064, 0x5F626065,
+ 0x63656866, 0x6A656468, 0x61656066, 0x5F656964,
+ 0x69646064, 0x60645F65, 0x6460645F, 0x6A656369,
+ 0x65696466, 0x65676864, 0x69656A69, 0x6D6A666C,
+ 0x666A6965, 0x69646D6A, 0x6C69646C, 0x626F6C67,
+ 0x6B656868, 0x6C6C666B, 0x65696963, 0x6965696B,
+ 0x68696568, 0x686A6D6B, 0x68686868, 0x6E6C6C6A,
+ 0x676C6C6C, 0x6C6C6869, 0x6C6D6B6C, 0x69686B69,
+ 0x6C67686B, 0x686C6768, 0x69686B69, 0x6D68686B,
+ 0x686C6769, 0x67686C67, 0x6C67666C, 0x686C6768,
+ 0x6B6A6D6B, 0x6D6B6C6D, 0x6E6C6B6C, 0x676E6D69,
+ 0x6D696D6D, 0x6E6D696E, 0x666E6F66, 0x6E686E6F,
+ 0x6E6E686E, 0x686E6E68, 0x6E686E6E, 0x6E6D696E,
+ 0x6B676866, 0x67666C6D, 0x6A696569, 0x666A6C66,
+ 0x6D676A6C, 0x6E6B666D, 0x646C6965, 0x68646B68,
+ 0x6C69656B, 0x656E6B66, 0x69606D6E, 0x68696068,
+ 0x656A6965, 0x69656C69, 0x6A69656C, 0x64646863,
+ 0x68636369, 0x65696464, 0x5E666A65, 0x69645F63,
+ 0x68696565, 0x606C6965, 0x63606863, 0x67646068,
+ 0x5F62635F, 0x635E6064, 0x6569635F, 0x63666A64,
+ 0x645F6569, 0x60645F60, 0x615E6361, 0x64625E63,
+ 0x61646261, 0x6060645F, 0x645F6165, 0x62635F60,
+ 0x61646561, 0x65616665, 0x64656164, 0x5F5F635E,
+ 0x645F6064, 0x60645F60, 0x6460645F, 0x645F6569,
+ 0x666A6560, 0x6160645F, 0x68665E63, 0x5E636163,
+ 0x5F60645F, 0x68636064, 0x64686364, 0x5F5F635E,
+ 0x69656064, 0x65696468, 0x63656964, 0x69646468,
+ 0x65696465, 0x65666A65, 0x69656869, 0x6A696568,
+ 0x676C6867, 0x69656C68, 0x6A69656C, 0x62686862,
+ 0x6A616868, 0x68696069, 0x60686960, 0x67616869,
+ 0x67676167, 0x656A6965, 0x68666869, 0x696A6667,
+ 0x65676761, 0x68606F6D, 0x6C6C666A, 0x686A6867,
+ 0x68686A68, 0x6C6D6B68, 0x67686868, 0x67676869,
+ 0x676A6867, 0x64676B65, 0x6C66666A, 0x6869656A,
+ 0x6B6B6C6A, 0x69676C6D, 0x6D6E6C68, 0x6B6E6C6B,
+ 0x69676E6C, 0x6C6D6B68, 0x67686C67, 0x6B67686C,
+ 0x6A6C666A, 0x666E6E68, 0x67626E6F, 0x706E666A,
+ 0x646E6C64, 0x6C646E6C, 0x6E6C646E, 0x606A6860,
+ 0x67626A68, 0x6868626A, 0x64686A64, 0x6A64686A,
+ 0x6A6A6468, 0x656A6965, 0x69656C69, 0x6C69656C,
+ 0x656A6965, 0x69656869, 0x6A69656A, 0x65686965,
+ 0x69656869, 0x6A696568, 0x60676460, 0x69656764,
+ 0x6764606C, 0x6462635F, 0x645F6569, 0x60645F60,
+ 0x5F646863, 0x635E6064, 0x60645F5F, 0x5F656964,
+ 0x645F6064, 0x60645F60, 0x5F616560, 0x645F5E64,
+ 0x61656060, 0x6060645F, 0x635F6165, 0x61625E62,
+ 0x5E616560, 0x635E5F63, 0x60645F5F, 0x5F62635F,
+ 0x645F6263, 0x60645F60, 0x5F62635F, 0x64606263,
+ 0x62635F63, 0x5F676460, 0x64606663, 0x67646067,
+ 0x5F61625E, 0x645F6064, 0x61656060, 0x64656964,
+ 0x645F6569, 0x65696460, 0x64656964, 0x6A656569,
+ 0x5F635E66, 0x65686965, 0x69656869, 0x68696568,
+ 0x64686965, 0x6A666768, 0x68696569, 0x66686862,
+ 0x6B656C6C, 0x6C6C666B, 0x676D6D67, 0x6E656D6D,
+ 0x6E6F666D, 0x666D6E65, 0x6E656E6F, 0x6D6D676D,
+ 0x68686967, 0x68686868, 0x68696768, 0x686F6E6A,
+ 0x6F696E6E, 0x6C6D696D, 0x6C6C6D69, 0x6A686D6E,
+ 0x6C6C6C69, 0x6F6C6C6C, 0x67696E6D, 0x68686868,
+ 0x6B6C6D6B, 0x6C6C6C6D, 0x6D6D6D6C, 0x6B6C6D6B,
+ 0x6D6B6C6D, 0x6B6C6A6C, 0x67686C67, 0x6C67666C,
+ 0x676A6868, 0x666B6E6C, 0x6E6C6568, 0x6B6C6A6D,
+ 0x68686868, 0x6B6B6868, 0x6868686B, 0x68666869,
+ 0x68686668, 0x68696768, 0x666A6867, 0x6A666B67,
+ 0x6B68646D, 0x656C6965, 0x69656A69, 0x6A69656C,
+ 0x63676864, 0x6A656468, 0x65696466, 0x64656964,
+ 0x69646569, 0x60645F65, 0x5F626863, 0x645F5E64,
+ 0x65696460, 0x5F646863, 0x635F6064, 0x62635F62,
+ 0x5F62635F, 0x645F6064, 0x60645F60, 0x64646863,
+ 0x645F6569, 0x61656060, 0x5E62635F, 0x635F6162,
+ 0x63646062, 0x6461625E, 0x645F6569, 0x60645F60,
+ 0x5F606361, 0x65606064, 0x5F635E61, 0x6460645F,
+ 0x645F6569, 0x65696460, 0x5E656964, 0x645F5F63,
+ 0x60645F60, 0x5F656964, 0x65606064, 0x60645F61,
+ 0x64636964, 0x69646569, 0x65696465, 0x65666A65,
+ 0x6965666A, 0x6A696568, 0x656A6965, 0x69656C69,
+ 0x6D6A666C, 0x656A6965, 0x69656869, 0x68696568,
+ 0x65676B65, 0x6B66676B, 0x6A6C6667, 0x656D6E65,
+ 0x685F6D6E, 0x68686267, 0x6D6A6867, 0x6C6C6D6D,
+ 0x6C6D6B6C, 0x686C6E68, 0x6E686C6E, 0x6869606E,
+ 0x666E6F66, 0x6C676E6F, 0x6F6F696F, 0x686E6E68,
+ 0x6E686E6E, 0x6F6E6A6E, 0x67686967, 0x68686767,
+ 0x68696768, 0x236F7270, 0x00002428, 0x00000000,
+ 0x00000000, 0x00010000, 0x01010100, 0x663D3C38,
+ 0x6A666B6A, 0x6B6A666B, 0x676A6B67, 0x6C686A6B,
+ 0x6B6C686B, 0x68686965, 0x6967696A, 0x67686668,
+ 0x67686967, 0x68686669, 0x66686868, 0x68666967,
+ 0x6967676A, 0x68696568, 0x60666862, 0x68626669,
+ 0x67696366, 0x5F686862, 0x69606768, 0x68686268,
+ 0x5F62635F, 0x6B666064, 0x666A6567, 0x66676864,
+ 0x635F696A, 0x62635F62, 0x66686965, 0x625E696A,
+ 0x65646063, 0x6066635F, 0x63606764, 0x67646068,
+ 0x5F62635F, 0x635F6263, 0x62635F62, 0x61616260,
+ 0x635F6263, 0x5F635E62, 0x5F60645F, 0x645F6064,
+ 0x60645F60, 0x5F62635F, 0x635F6064, 0x61656062,
+ 0x5F62635F, 0x625E6263, 0x5F635E61, 0x5F616560,
+ 0x645F6064, 0x60645F60, 0x5F60645F, 0x63616064,
+ 0x61646260, 0x5F60645F, 0x63616263, 0x62636162,
+ 0x5F62635F, 0x635F6064, 0x60645F62, 0x5F646863,
+ 0x65606064, 0x60645F61, 0x605E645F, 0x645F5F65,
+ 0x62635F60, 0x60636460, 0x6A666564, 0x6564606B,
+ 0x60656460, 0x645F6764, 0x67645F67, 0x62686862,
+ 0x69636868, 0x66686269, 0x64686A64, 0x6A65686A,
+ 0x666A6566, 0x68666967, 0x68686668, 0x68686868,
+ 0x67686868, 0x6A686669, 0x66696767, 0x67696C6A,
+ 0x6B66686C, 0x686C6767, 0x66686C67, 0x6B67676B,
+ 0x686C676A, 0x67686C67, 0x6B67686C, 0x6A6B676A,
+ 0x67686967, 0x69676869, 0x68696768, 0x62686862,
+ 0x67636868, 0x68686268, 0x60686960, 0x68626869,
+ 0x68686268, 0x60676761, 0x67626A68, 0x6867636A,
+ 0x67686967, 0x69676869, 0x68696568, 0x62666763,
+ 0x68626668, 0x68686268, 0x656A6965, 0x64606A69,
+ 0x67645F67, 0x5F696963, 0x69606768, 0x67685F68,
+ 0x656A6A64, 0x64606A69, 0x65646067, 0x6060645F,
+ 0x645F5F65, 0x60645F60, 0x605F635E, 0x645F6165,
+ 0x61625E60, 0x5F676460, 0x63606762, 0x67646068,
+ 0x6064635F, 0x645E6364, 0x63655F62, 0x5E61635D,
+ 0x635F6064, 0x5F635E62, 0x615E6361, 0x63615E63,
+ 0x6063615E, 0x5E616560, 0x645F5F63, 0x62635F60,
+ 0x5F62605F, 0x615D6260, 0x64656162, 0x5F62635F,
+ 0x635F6263, 0x61625E62, 0x6062635F, 0x635F6364,
+ 0x60645F62, 0x5F60645F, 0x65606064, 0x60645F61,
+ 0x5F60645F, 0x645F6064, 0x60645F60, 0x5F616560,
+ 0x635F6064, 0x63646062, 0x5F60645F, 0x645F6064,
+ 0x666A6560, 0x5F60645F, 0x635F6064, 0x62635F62,
+ 0x61676460, 0x69656865, 0x6564606A, 0x62696963,
+ 0x68626868, 0x696A6168, 0x62686862, 0x68626868,
+ 0x66686268, 0x6562635F, 0x6A656869, 0x68696566,
+ 0x60676761, 0x69606A68, 0x68686268, 0x666B6968,
+ 0x68686967, 0x68696768, 0x676A6868, 0x68686967,
+ 0x68696768, 0x64696A66, 0x6B65686A, 0x6B6A666B,
+ 0x67686967, 0x69676869, 0x68696768, 0x67686967,
+ 0x69676869, 0x68696768, 0x676A6B67, 0x6C666A6B,
+ 0x6B6D676A, 0x62696963, 0x68626868, 0x68696068,
+ 0x606C6D64, 0x6A616869, 0x68696069, 0x60686960,
+ 0x69636869, 0x68686269, 0x5E62645E, 0x645E6064,
+ 0x62645E62, 0x60656460, 0x64606564, 0x67646067,
+ 0x6562635F, 0x635F6869, 0x62635F62, 0x5F62635F,
+ 0x635F6064, 0x6A696562, 0x5F676460, 0x64606663,
+ 0x65646067, 0x5F62635F, 0x645F6064, 0x60645F60,
+ 0x5E60645F, 0x635F5F63, 0x60645F62, 0x5F5F635E,
+ 0x645F6064, 0x60645F60, 0x5F60645F, 0x645F6064,
+ 0x5F635E60, 0x5F60645F, 0x635F6064, 0x63646062,
+ 0x5F61625E, 0x645F6263, 0x60645F60, 0x5F62635F,
+ 0x645F6263, 0x60645F60, 0x5D636460, 0x635F6163,
+ 0x64635F62, 0x60656460, 0x65616764, 0x67646068,
+ 0x5F62635F, 0x645F6064, 0x60645F60, 0x5F5F635E,
+ 0x645F6064, 0x666A6560, 0x5F616560, 0x65606064,
+ 0x60645F61, 0x60686965, 0x625E6364, 0x62635F61,
+ 0x5F60645F, 0x69656064, 0x68696568, 0x63666862,
+ 0x69636969, 0x68686269, 0x616A6762, 0x68606767,
+ 0x6869606A, 0x60686960, 0x69606869, 0x68686268,
+ 0x67696A68, 0x68686767, 0x696A6868, 0x626E6D69,
+ 0x67616868, 0x68676367, 0x676A6965, 0x68676A68,
+ 0x6967676A, 0x68686868, 0x67696766, 0x68686868,
+ 0x67686967, 0x69696869, 0x68686869, 0x67696A68,
+ 0x68666869, 0x68696767, 0x67686C67, 0x6C67686C,
+ 0x686C6768, 0x68666967, 0x67676668, 0x68686867,
+ 0x67666967, 0x68686669, 0x65676768, 0x68666868,
+ 0x68686668, 0x68696766, 0x626A6867, 0x635F6563,
+ 0x67646066, 0x66656460, 0x64606B6A, 0x6B6A6665,
+ 0x5F676864, 0x69646064, 0x5F635E65, 0x5F60645F,
+ 0x645F6064, 0x60645F60, 0x5F60645F, 0x65605E64,
+ 0x5F635E61, 0x5F60645F, 0x635F6064, 0x62635F62,
+ 0x5E62635F, 0x645F6064, 0x60645F60, 0x5F60645F,
+ 0x635F6064, 0x61625E62, 0x5F62635F, 0x635F6263,
+ 0x62635F62, 0x5F636462, 0x63616263, 0x5F635E60,
+ 0x6060645F, 0x645F6165, 0x60645F60, 0x5F60645F,
+ 0x635F6064, 0x62635F62, 0x5F62635F, 0x635F6263,
+ 0x62635F62, 0x5F636460, 0x635F6064, 0x60645F62,
+ 0x5F60645F, 0x635F6064, 0x61625E62, 0x5F60645F,
+ 0x635F6064, 0x62635F62, 0x60666561, 0x64606564,
+ 0x66656167, 0x5F636460, 0x635F6263, 0x62635F62,
+ 0x5E60645E, 0x645F5E65, 0x60645E60, 0x6065685F,
+ 0x69606669, 0x66686268, 0x68686967, 0x68686868,
+ 0x66696766, 0x60666862, 0x68626669, 0x68696066,
+ 0x60686960, 0x66616869, 0x706D6869, 0x60696963,
+ 0x68626869, 0x6E6D6968, 0x66686967, 0x68686768,
+ 0x68696768, 0x23717570, 0x01002428, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000000, 0x6233322E,
+ 0x68626868, 0x68686268, 0x62666660, 0x67616868,
+ 0x68686267, 0x61686862, 0x68646665, 0x65666267,
+ 0x60676963, 0x66626466, 0x67686467, 0x5F62635F,
+ 0x63616263, 0x62635F62, 0x5E61655F, 0x645F6064,
+ 0x60645E60, 0x5E62645E, 0x645E6264, 0x61625E62,
+ 0x5F60645F, 0x635F6064, 0x62635F62, 0x5E61625E,
+ 0x635F6162, 0x62635F62, 0x5F5F605C, 0x635F6263,
+ 0x62635F62, 0x6062635F, 0x635F6364, 0x64635F64,
+ 0x5D656460, 0x605C6261, 0x65646061, 0x5D62615D,
+ 0x615D6261, 0x62615D62, 0x5D62615D, 0x65616061,
+ 0x60615D64, 0x5D62615D, 0x615D6061, 0x60615D62,
+ 0x5C62615D, 0x625E6160, 0x66656163, 0x5F62615D,
+ 0x615D6263, 0x60615D60, 0x5C60645F, 0x605C5D61,
+ 0x5E5F5B5F, 0x5D60615D, 0x635F6261, 0x62615D64,
+ 0x5F64635F, 0x605C6263, 0x60615D61, 0x5F5D615C,
+ 0x645F5E64, 0x60645F60, 0x5F60645F, 0x635F6064,
+ 0x62635F62, 0x5F62635F, 0x635F6263, 0x62635F62,
+ 0x5E62635F, 0x635F6162, 0x62635F62, 0x5F62635F,
+ 0x635F6263, 0x62635F62, 0x6062635F, 0x625E6165,
+ 0x62635F61, 0x615F635E, 0x63616063, 0x5E636160,
+ 0x5F5E6361, 0x645F5E64, 0x5F635E5E, 0x5F60645F,
+ 0x635F6064, 0x62645E62, 0x61666862, 0x66606567,
+ 0x65676166, 0x62666862, 0x68626668, 0x67676168,
+ 0x62686862, 0x67636868, 0x69696368, 0x60686862,
+ 0x68626869, 0x68686268, 0x61686960, 0x6762696A,
+ 0x6966616A, 0x5F67645F, 0x63606864, 0x67646068,
+ 0x5E62635F, 0x645F5F63, 0x5F635E60, 0x5F616560,
+ 0x635E6064, 0x62635F5F, 0x5E62635F, 0x645E6162,
+ 0x62645E62, 0x5E60645E, 0x645E6064, 0x60645E60,
+ 0x5F62635F, 0x615D6263, 0x62635F62, 0x5E5D615C,
+ 0x65605D63, 0x62635F61, 0x5F5E625D, 0x635F6064,
+ 0x60615D62, 0x5D676460, 0x605D6560, 0x66615E65,
+ 0x5D64615D, 0x615D6261, 0x61605C62, 0x5C65655F,
+ 0x615D6062, 0x60615D62, 0x5D60615D, 0x5D5B5E62,
+ 0x5E615F5A, 0x5E5D605E, 0x605E5D60, 0x5F605E5D,
+ 0x5D62615D, 0x615D6261, 0x62615D62, 0x5D63625E,
+ 0x615D6261, 0x62615D62, 0x5D62615D, 0x615D6261,
+ 0x61605C62, 0x5C62615D, 0x5F5B5F60, 0x61625E5E,
+ 0x5D60615D, 0x615D6061, 0x60615D60, 0x5F60615D,
+ 0x615D6263, 0x62635F60, 0x605F635E, 0x625D6165,
+ 0x5E625D5E, 0x5F60645F, 0x635F6064, 0x62635F62,
+ 0x5F62635F, 0x635F6263, 0x62635F62, 0x5F62635F,
+ 0x635F6263, 0x61635D62, 0x6062635F, 0x635F6364,
+ 0x62635F62, 0x5F62635F, 0x645F6064, 0x62645E60,
+ 0x5E696963, 0x645E6464, 0x68686264, 0x60676460,
+ 0x63626764, 0x67646067, 0x62676362, 0x63626763,
+ 0x68636268, 0x60676460, 0x64606764, 0x67646067,
+ 0x61666561, 0x67636665, 0x67686468, 0x63646561,
+ 0x64626465, 0x64656363, 0x62666763, 0x68626868,
+ 0x65676168, 0x5F62635F, 0x635F6263, 0x62635F62,
+ 0x5F62635F, 0x645E6263, 0x63655F62, 0x5E5F635D,
+ 0x625E6064, 0x62635F61, 0x5F616560, 0x635F6064,
+ 0x62635F62, 0x5F62635F, 0x625E6263, 0x62635F63,
+ 0x5F60645F, 0x635F6064, 0x62635F62, 0x5F62635F,
+ 0x635F6263, 0x62635F62, 0x5F64635F, 0x64606463,
+ 0x62635F65, 0x5D60615D, 0x615D6061, 0x60615D60,
+ 0x5D5E5F5B, 0x615D6061, 0x62615D62, 0x5D60615D,
+ 0x605A6061, 0x5F615B5E, 0x5A5E605A, 0x605A5E60,
+ 0x5E605A5E, 0x5B5C605B, 0x605B5C60, 0x5D5E5A5C,
+ 0x5C60605A, 0x5F596262, 0x60625C5D, 0x5A5D615C,
+ 0x615C5B5F, 0x5E5F5B5D, 0x585F5F59, 0x605A6061,
+ 0x60605A60, 0x5B62615D, 0x5F5B605F, 0x62615D60,
+ 0x5F62635F, 0x615D6263, 0x60615D60, 0x5F60615D,
+ 0x625E6263, 0x61625E61, 0x5E62635F, 0x625E6162,
+ 0x62635F61, 0x5E60645F, 0x635F5F63, 0x62635F62,
+ 0x5F616560, 0x635E6064, 0x5E625D5F, 0x5F5F635E,
+ 0x635F6263, 0x64635F62, 0x6067645F, 0x645F6865,
+ 0x66635E68, 0x5E66635E, 0x68626663, 0x68686268,
+ 0x6062635F, 0x635F6165, 0x62635F62, 0x60656460,
+ 0x63606764, 0x68636068, 0x60676460, 0x64606764,
+ 0x67636267, 0x65666463, 0x64646565, 0x64656364,
+ 0x62686763, 0x65616868, 0x66656166, 0x60686862,
+ 0x67636666, 0x66676366, 0x5D62635F, 0x645F5F63,
+ 0x5F635E60, 0x64636462, 0x65636566, 0x64656364,
+ 0x5F60645F, 0x63616064, 0x60636160, 0x61606361,
+ 0x63615E63, 0x6165605E, 0x5F5F635E, 0x635F6263,
+ 0x63646062, 0x5C62635F, 0x64605F60, 0x61625E63,
+ 0x5F60645F, 0x635F6064, 0x62635F62, 0x605F635E,
+ 0x625E6165, 0x5E625D61, 0x5F5F635E, 0x615D6064,
+ 0x60615D60, 0x5F5E625D, 0x615C6064, 0x60645F5D,
+ 0x5D5D615C, 0x63615E62, 0x5D615C60, 0x5D60615D,
+ 0x5F5E6061, 0x60615F61, 0x5B60615F, 0x615F5C5D,
+ 0x60615F60, 0x5F606060, 0x5F5F6061, 0x60615F5F,
+ 0x5B5D615C, 0x615C5C60, 0x5D615C5D, 0x5D646561,
+ 0x615D6061, 0x62615D62, 0x5D62615D, 0x615D6261,
+ 0x62615D62, 0x5D62615D, 0x605C6061, 0x60615D61,
+ 0x5D62635F, 0x625E6061, 0x61625E61, 0x5F616560,
+ 0x625E6064, 0x62635F61, 0x5F62635F, 0x635F6263,
+ 0x62635F62, 0x5F60645F, 0x635F6064, 0x62635F62,
+ 0x5E60645E, 0x635F6064, 0x5F635E62, 0x5E60645E,
+ 0x645E6064, 0x61625E62, 0x6262635F, 0x63616164,
+ 0x62635F62, 0x5D60645F, 0x65605F63, 0x61635D61,
+ 0x60646660, 0x66626466, 0x69686467, 0x61696963,
+ 0x68626767, 0x69696368, 0x63666763, 0x67656667,
+ 0x66676366, 0x1F666763, 0x01002223, 0x01010100,
+ 0x00000000, 0x00010000, 0x00000000, 0x6134342E,
+ 0x6862696A, 0x68686268, 0x60666660, 0x67616666,
+ 0x66666067, 0x61666660, 0x635F6665, 0x64656162,
+ 0x60666660, 0x645E6666, 0x66666064, 0x5F61635D,
+ 0x62606263, 0x62635F61, 0x5E5F635E, 0x635E6064,
+ 0x60645F5F, 0x5C60625C, 0x635F6062, 0x62635F62,
+ 0x5D60615D, 0x615D6061, 0x60615D60, 0x5D5F605C,
+ 0x625E6261, 0x62615D63, 0x5C62615D, 0x615D5F60,
+ 0x60615D62, 0x5D60615D, 0x615D6061, 0x60615D60,
+ 0x5B605F5B, 0x5F5B605F, 0x62615D60, 0x5C62615D,
+ 0x615D6160, 0x605F5B62, 0x5E5F5E5A, 0x5F5B6162,
+ 0x5F605C60, 0x5D605F5B, 0x5F5B6061, 0x5E5F5B60,
+ 0x5B62615D, 0x5F5B605F, 0x605F5B60, 0x5D5F5E5A,
+ 0x5F5B6061, 0x5E5F5B60, 0x5A5B5F5A, 0x5D595B5F,
+ 0x5E5F5B5C, 0x5C60615D, 0x5F5B5F60, 0x62615D60,
+ 0x5B605F5B, 0x605C605F, 0x605F5B61, 0x5C5B5F5A,
+ 0x615C5B61, 0x5D615C5D, 0x5D5E625D, 0x615D6061,
+ 0x60615D60, 0x5D60615D, 0x64606061, 0x62635F63,
+ 0x5D62635F, 0x635F6061, 0x5F605C62, 0x5F60615D,
+ 0x615D6263, 0x5F605C60, 0x5F60615D, 0x64606263,
+ 0x62635F63, 0x5F60615D, 0x645F6064, 0x5E645F60,
+ 0x5F5E645F, 0x645F5E64, 0x60645F60, 0x5F60645F,
+ 0x645E6064, 0x62645E62, 0x60666660, 0x635D6666,
+ 0x66666063, 0x5D666660, 0x65616363, 0x66666068,
+ 0x5E65655F, 0x645E6464, 0x66666064, 0x60666660,
+ 0x66606666, 0x67676166, 0x60666660, 0x65616666,
+ 0x68656168, 0x5F686560, 0x63606864, 0x67646068,
+ 0x5F62635F, 0x645F6064, 0x60645F60, 0x5F60645F,
+ 0x645F6064, 0x5F635E60, 0x5D62635F, 0x645E5E62,
+ 0x61655F62, 0x5C60645E, 0x645F5E62, 0x5E625D60,
+ 0x5C60615D, 0x615D5F60, 0x60615D60, 0x5D60645F,
+ 0x605C5E62, 0x61625E5F, 0x5D5F605C, 0x5F5B6061,
+ 0x62615D5E, 0x5B62615D, 0x615D625F, 0x625F5B64,
+ 0x5D63625E, 0x615D6261, 0x605F5B62, 0x5A5F5E5A,
+ 0x5E5A5E60, 0x5E5F5B5D, 0x595C5D59, 0x5C5A5C5D,
+ 0x5C5D5B5B, 0x5B5F605E, 0x615F5A5D, 0x60615F5E,
+ 0x5D5F5E5A, 0x5F5B6261, 0x60615D60, 0x5B605F5B,
+ 0x5E5A605F, 0x605F5B5F, 0x5A62615D, 0x5F5B5D5E,
+ 0x605F5B60, 0x5C5F5E5A, 0x5F5B5F60, 0x5E5F5B60,
+ 0x5D605F5B, 0x615D6261, 0x61605C62, 0x5D5F605C,
+ 0x615D6061, 0x62615D62, 0x5D60615D, 0x615D6061,
+ 0x60615D60, 0x5D5F605C, 0x615D6061, 0x60615D60,
+ 0x5C60625C, 0x5F5B6062, 0x60615D5E, 0x6060615D,
+ 0x5F5B6364, 0x61625E5E, 0x5E61625E, 0x635F6162,
+ 0x62635F62, 0x6060615D, 0x635D6165, 0x63655F61,
+ 0x5D62645E, 0x645E6363, 0x65655F64, 0x60656460,
+ 0x64616764, 0x67625F69, 0x60686360, 0x63626863,
+ 0x68636068, 0x60686360, 0x63606764, 0x67646068,
+ 0x5E64645E, 0x66606464, 0x64645E66, 0x6161625E,
+ 0x65636465, 0x64656364, 0x5E62635F, 0x645E6264,
+ 0x63646062, 0x5E62635F, 0x645F5F63, 0x60645F60,
+ 0x61626361, 0x635F6063, 0x5F635E62, 0x5D60645F,
+ 0x635F5E62, 0x62635F62, 0x5E61625E, 0x615D6162,
+ 0x60615D60, 0x5D60615D, 0x615D6061, 0x60615D60,
+ 0x5E60645F, 0x5E5A5F63, 0x60615D5D, 0x5D61605C,
+ 0x625E6061, 0x605F5B63, 0x5B62615D, 0x5F5B605F,
+ 0x5E5F5B60, 0x5B5E5F5B, 0x5F5B5E5F, 0x5E5F5B5E,
+ 0x5A5E5F5B, 0x5F5B5D5E, 0x605F5B60, 0x575E5F5B,
+ 0x605A5A5B, 0x61615B5E, 0x585E5E58, 0x5E585E5E,
+ 0x5C5E585E, 0x5B5A5E59, 0x5E595C60, 0x5A5B575A,
+ 0x5C605F5B, 0x5C566262, 0x5A5C565A, 0x5A5B5F5A,
+ 0x5F5A5B5F, 0x5D5E5A5B, 0x575E5E58, 0x5D57615F,
+ 0x60605A5D, 0x5B5D5C58, 0x5F5B605F, 0x61605C60,
+ 0x5B605F5B, 0x5F5B5E5F, 0x5F5E5A60, 0x5B605F5B,
+ 0x615D605F, 0x5F5E5A62, 0x5B62615D, 0x615D605F,
+ 0x5E5F5B62, 0x5D60615D, 0x615D6061, 0x60615D60,
+ 0x5D60615D, 0x605C6061, 0x60615D5F, 0x5F60615D,
+ 0x625E6263, 0x62615D61, 0x5C64615C, 0x65606561,
+ 0x65625D69, 0x5E65625D, 0x645E6464, 0x62645E64,
+ 0x5F62635F, 0x635D6263, 0x64645E61, 0x60656460,
+ 0x63606764, 0x68636068, 0x5F68645F, 0x63606764,
+ 0x67646068, 0x61666561, 0x65636465, 0x66646364,
+ 0x5D666660, 0x645E6363, 0x64645E64, 0x5E65655F,
+ 0x65616464, 0x64656164, 0x5E62635F, 0x645F6264,
+ 0x60645F60, 0x61646561, 0x65616465, 0x61625E64,
+ 0x5E63655F, 0x645F6064, 0x60645F60, 0x5F60645F,
+ 0x625D6064, 0x5F635E5E, 0x5E5E625D, 0x635F5F63,
+ 0x60645F62, 0x5D60615D, 0x625E6061, 0x60615D61,
+ 0x605F605C, 0x635F6364, 0x60615D62, 0x5D60615D,
+ 0x625E6061, 0x5F5E5A63, 0x5B62635F, 0x605C5E5F,
+ 0x5F605C5F, 0x5A5F605C, 0x615C5B5F, 0x5B5F5A5D,
+ 0x5B5A5D5B, 0x605E5A5D, 0x5F605E5D, 0x5B5F605C,
+ 0x5E5D5E5F, 0x5A5B5960, 0x5C5B5C5A, 0x5D5B5D5E,
+ 0x5C5D5B5C, 0x5C5B5B5B, 0x5C5B5D5E, 0x5C5D5B5E,
+ 0x5B5D5E5A, 0x605B5C60, 0x5B5F5A5C, 0x5B5E5F5B,
+ 0x5E5A5E5F, 0x605F5B5F, 0x5C605F5B, 0x615D6160,
+ 0x605F5B62, 0x5B62615D, 0x5F5B5E5F, 0x5E5F5B60,
+ 0x5C605F5B, 0x605C5F60, 0x5E5F5B61, 0x5D5F605C,
+ 0x615D6061, 0x60615D62, 0x5D60615D, 0x615D6061,
+ 0x60615D60, 0x5D60615D, 0x625E6061, 0x5F605C61,
+ 0x5E62645E, 0x635F6264, 0x60615D62, 0x5F60645F,
+ 0x615D6064, 0x60615D60, 0x5D62635F, 0x635F6061,
+ 0x61625E62, 0x6062635F, 0x635F6165, 0x62635F62,
+ 0x6061635D, 0x65616666, 0x67666266, 0x6064635F,
+ 0x66606666, 0x65646066, 0x63676662, 0x67636867,
+ 0x68676368, 0x20676963, 0x00002324, 0x02000002,
+ 0x00000000, 0x00000000, 0x00010000, 0x6034342E,
+ 0x69606869, 0x69696368, 0x5F64645E, 0x605F6463,
+ 0x63616062, 0x61626361, 0x615F6263, 0x62636160,
+ 0x5F646261, 0x635F6463, 0x62615D64, 0x5C61625E,
+ 0x615F5F60, 0x60615D60, 0x5C60615D, 0x625E6062,
+ 0x60615D61, 0x5B61605C, 0x605F605F, 0x63616062,
+ 0x5A61605C, 0x5F5B5F5E, 0x605F5B60, 0x5B605F5B,
+ 0x5F5B605F, 0x625F5B62, 0x5D61605C, 0x5F5B6261,
+ 0x625F5B62, 0x5B625F5B, 0x615D605F, 0x605F5B62,
+ 0x5B5D5E5A, 0x5F5B5E5F, 0x5E5F5B5E, 0x5B5E5F5B,
+ 0x5B575E5F, 0x5E5F5B5A, 0x5B5F605C, 0x5B575C60,
+ 0x5B5F5A5A, 0x575F605C, 0x5B57585C, 0x5C605B5A,
+ 0x575E5F5B, 0x5B575A5B, 0x5A5B575A, 0x575A5B57,
+ 0x5A58585C, 0x585B5959, 0x56585C57, 0x5F5A555B,
+ 0x595D585B, 0x57585C57, 0x5B57585C, 0x5E5F5B5A,
+ 0x5C5D5C58, 0x5F5B6360, 0x5D5C5862, 0x5A5A5E59,
+ 0x5E59595F, 0x5B5F5A5A, 0x5B5D5E5A, 0x5F5B605F,
+ 0x625F5B62, 0x5D61605C, 0x615D6261, 0x64615D64,
+ 0x5D63625E, 0x5F5B6261, 0x62615D60, 0x5D62615D,
+ 0x615D6261, 0x62615D62, 0x5D62615D, 0x615D6261,
+ 0x62615D62, 0x5D62615D, 0x605C6061, 0x61625E5F,
+ 0x5E5F605C, 0x605C5F63, 0x60615D5F, 0x5D62635F,
+ 0x615D6061, 0x60615D60, 0x5F60615D, 0x635F6263,
+ 0x62635F62, 0x5F62635F, 0x62616263, 0x64635F64,
+ 0x5F656460, 0x635F6263, 0x64635F64, 0x5F64635F,
+ 0x635F6463, 0x66635F66, 0x5F64635F, 0x635F6463,
+ 0x64635F64, 0x5D64645E, 0x615D6562, 0x62615D64,
+ 0x5D60615D, 0x605C6061, 0x60615D5F, 0x5D5F605C,
+ 0x615D6061, 0x5E5F5B60, 0x5D62615D, 0x615D6061,
+ 0x60615D62, 0x5D60615D, 0x5F5B6061, 0x60615D5E,
+ 0x5A63625E, 0x5F5B5F5E, 0x5F5E5A60, 0x5B62615D,
+ 0x605C605F, 0x625F5B63, 0x5B625F5B, 0x5F5B605F,
+ 0x605F5B60, 0x5B61605C, 0x605C5E5F, 0x5E5F5B5F,
+ 0x5B595A56, 0x5F5D5E5F, 0x595D585E, 0x5B575B56,
+ 0x5C575C60, 0x595A5658, 0x595C5D59, 0x5E5A5C5D,
+ 0x5B5C5A5F, 0x585C5D5B, 0x5C5C5858, 0x5C5D5B5C,
+ 0x565B5C58, 0x5B57595A, 0x585C575A, 0x57595A56,
+ 0x5B575A5B, 0x5E5F5B5A, 0x5C585C57, 0x5B575D61,
+ 0x5B5C585A, 0x5A5A5B57, 0x5B575B5F, 0x585C575A,
+ 0x5A5A5B57, 0x5F5B5D5E, 0x605F5B60, 0x59605F5B,
+ 0x5F5B5E5D, 0x5F5C5862, 0x59625F5B, 0x5F5B605D,
+ 0x625F5B62, 0x5B605F5B, 0x5F5B605F, 0x61605C60,
+ 0x5B605F5B, 0x5F5B605F, 0x605F5B60, 0x5B605F5B,
+ 0x5F5B605F, 0x605F5B60, 0x5D62615D, 0x5F5B6261,
+ 0x62615D60, 0x5D5F5E5A, 0x615D6061, 0x62635F62,
+ 0x5B5E5F5B, 0x635F5E5F, 0x62635F62, 0x5B5F605C,
+ 0x605B605F, 0x65615C63, 0x5C64615C, 0x64606461,
+ 0x65625E67, 0x5C64615D, 0x615D6262, 0x63625E64,
+ 0x5F656460, 0x64606463, 0x65646067, 0x5D63635D,
+ 0x635D6363, 0x60615D63, 0x5B616560, 0x5F5A5C60,
+ 0x5E5F5B5B, 0x6060615D, 0x615D6364, 0x5F605C60,
+ 0x5D62615D, 0x615D6061, 0x60615D62, 0x5B60615D,
+ 0x605C5E5F, 0x62615D61, 0x5D62615D, 0x605C6261,
+ 0x605F5B61, 0x5B5F5E5A, 0x5F5B605F, 0x605F5B60,
+ 0x5B605F5B, 0x605C605F, 0x605F5B61, 0x5B625F5B,
+ 0x5F5B605F, 0x625F5B62, 0x5B63605C, 0x5E5A625F,
+ 0x605F5B61, 0x5A5E5F5B, 0x5D585B5F, 0x575B5659,
+ 0x57585C57, 0x5B575A5B, 0x595A565A, 0x575A5B57,
+ 0x5B56585C, 0x5A5B5757, 0x565A5B57, 0x5D59595A,
+ 0x595A565E, 0x59595D58, 0x5C57585E, 0x585C5758,
+ 0x575D5E5A, 0x5C575A5B, 0x575B5658, 0x56585C57,
+ 0x5C57575B, 0x5A5B5758, 0x585C5B57, 0x5D595E5E,
+ 0x5F5E5A5E, 0x59605D59, 0x605C5E5A, 0x625F5B63,
+ 0x5B5D5C58, 0x5C58605F, 0x625F5B5F, 0x5B605D59,
+ 0x5B57625F, 0x625F5B5E, 0x5C625F5B, 0x5F5B6360,
+ 0x615E5A62, 0x5B63605C, 0x5F5B605F, 0x605F5B60,
+ 0x5B605F5B, 0x5F5B605F, 0x5F5E5A60, 0x5B605F5B,
+ 0x605C5E5F, 0x62615D5F, 0x5D64615D, 0x615D6461,
+ 0x605F5B64, 0x5B5E5F5B, 0x605C5E5F, 0x5E5F5B5F,
+ 0x5D60615D, 0x615D6261, 0x61605C62, 0x5E62605F,
+ 0x625E635F, 0x64615D65, 0x5D62615D, 0x615C6261,
+ 0x68656064, 0x5B62635A, 0x635D6364, 0x62615D63,
+ 0x5D64635F, 0x635F6061, 0x64635F64, 0x61646261,
+ 0x62616462, 0x65646064, 0x5F62635F, 0x63616263,
+ 0x60615D62, 0x5E63635D, 0x635D6464, 0x63635D63,
+ 0x5C60625C, 0x615D6062, 0x60615D60, 0x5D60615D,
+ 0x5F5B6061, 0x60615D5E, 0x5B61625E, 0x5F5B5E5F,
+ 0x60615D60, 0x5B605F5B, 0x615D605F, 0x605F5B62,
+ 0x5B605F5B, 0x5F5B605F, 0x605F5B60, 0x59605F5B,
+ 0x5F5B5E5D, 0x63605C62, 0x585F5C58, 0x5B575F5C,
+ 0x5D5C585E, 0x585A5B57, 0x5C57595D, 0x5B5E5C58,
+ 0x5C5A5C5C, 0x5D5D5C5C, 0x5B5C5A5D, 0x585B5C58,
+ 0x5B57595D, 0x595A565A, 0x595C5D59, 0x5D595E5D,
+ 0x5E5D595E, 0x595C5D5B, 0x5D595C5D, 0x595A565E,
+ 0x575A5B57, 0x5C57585C, 0x575B5658, 0x57585C57,
+ 0x605C585C, 0x5A5B575F, 0x5B5B5C58, 0x5B575E5F,
+ 0x595A565A, 0x575A5B57, 0x5B57585C, 0x5B5C585A,
+ 0x5C605F5B, 0x5C586160, 0x625F5B5F, 0x5763605C,
+ 0x5F5B5E5B, 0x625F5B62, 0x5B5F5E5A, 0x5F5B605F,
+ 0x605F5B60, 0x5B605F5B, 0x605C605F, 0x61605C61,
+ 0x5B61605C, 0x5E5D605F, 0x605E5D60, 0x5B63625E,
+ 0x615D5E5F, 0x605F5B62, 0x5C605F5B, 0x615D6160,
+ 0x62615D62, 0x5B62615D, 0x615D5E5F, 0x62615D62,
+ 0x5D63635D, 0x625E6363, 0x64635F63, 0x5F62635F,
+ 0x635F6263, 0x64635F64, 0x5D62615D, 0x615D6461,
+ 0x64615D64, 0x1F686763, 0x00002423, 0x01000200,
+ 0x00000000, 0x00000000, 0x00010000, 0x6134332F,
+ 0x68626767, 0x67676168, 0x5F64635F, 0x60606260,
+ 0x63616162, 0x5C60615F, 0x615F5F60, 0x60615F60,
+ 0x5F62605F, 0x605F6260, 0x62605F62, 0x5B60615D,
+ 0x5F5D5E5F, 0x5E5F5D5E, 0x5A5E5F5B, 0x5C585E60,
+ 0x605F5B5D, 0x5A605F5B, 0x605C5F5E, 0x605F5B61,
+ 0x5861605C, 0x5C585D5C, 0x5D5C585D, 0x585D5C58,
+ 0x5B575D5C, 0x5F5C585E, 0x595D5C58, 0x5C585E5D,
+ 0x5F5C585F, 0x585F5C58, 0x5C585F5C, 0x5D5C585F,
+ 0x575B5C58, 0x5C57585C, 0x585C5758, 0x56585C57,
+ 0x5C58575B, 0x5A5B575B, 0x575A5B57, 0x5D58585C,
+ 0x585C5759, 0x575A5B57, 0x5B57585C, 0x585C575A,
+ 0x57585C57, 0x5C57585C, 0x5A5B5758, 0x575A5B57,
+ 0x5B595A5B, 0x585B595A, 0x58585C57, 0x5B56595D,
+ 0x585C5757, 0x57585C57, 0x5C57585C, 0x595A5658,
+ 0x585D5C58, 0x5C585F5C, 0x5F5C585F, 0x575A5B57,
+ 0x5C57585C, 0x5A5B5758, 0x5761605C, 0x5C585C5B,
+ 0x5F5C585F, 0x585C5B57, 0x5C585D5C, 0x5F5C585F,
+ 0x585D5C58, 0x5C585D5C, 0x5D5C585D, 0x585D5C58,
+ 0x5C585D5C, 0x605F5B5D, 0x5B605F5B, 0x5F5B5E5F,
+ 0x5B5C5860, 0x5A5D5C58, 0x5F5B5D5E, 0x5E5F5B5E,
+ 0x5D5E5F5B, 0x5E5D6061, 0x5F5D5C60, 0x5B60615D,
+ 0x5F5B5E5F, 0x60615F5E, 0x5F60615F, 0x615F6061,
+ 0x60615F60, 0x5F60615F, 0x605F6061, 0x62605F62,
+ 0x5D60615F, 0x605F6061, 0x61605C62, 0x5F62605F,
+ 0x605F6260, 0x63605C64, 0x5E62615D, 0x635F6362,
+ 0x62615D64, 0x5A62625C, 0x5F5B6060, 0x605F5B60,
+ 0x5C5E5F5B, 0x615D5F60, 0x60615D60, 0x5B60615D,
+ 0x5F5B5E5F, 0x605F5B60, 0x5A5E5D59, 0x5F5B5F5E,
+ 0x605F5B60, 0x57605F5B, 0x5F5B5A5B, 0x605F5B60,
+ 0x5B5D5C58, 0x5F5B605F, 0x5D5C5860, 0x58605D59,
+ 0x5F5B5F5C, 0x5F5C5862, 0x585F5C58, 0x5C585D5C,
+ 0x5D5C585D, 0x57595A56, 0x5B575A5B, 0x575B565A,
+ 0x575A5B57, 0x5B59585C, 0x585B595A, 0x57585C57,
+ 0x5A56585C, 0x5A5B5759, 0x56595A56, 0x5A56595A,
+ 0x5B5A565B, 0x58575856, 0x58585858, 0x5859575A,
+ 0x575A5B59, 0x5C57585C, 0x595D5858, 0x57585C57,
+ 0x5C58585C, 0x585C575B, 0x57585C57, 0x5D58565C,
+ 0x585C5759, 0x57585C57, 0x5C57585C, 0x575B5658,
+ 0x57585C57, 0x5B575A5B, 0x5C5B575C, 0x575D5C58,
+ 0x5C585C5B, 0x5F5C585F, 0x585F5C58, 0x5C585F5C,
+ 0x625F5B5F, 0x585F5C58, 0x5C585D5C, 0x5D5C585F,
+ 0x5B5D5C58, 0x5E5A605F, 0x5D5C585F, 0x5B5D5C58,
+ 0x5F5B605F, 0x605F5B60, 0x5C5D5C58, 0x5C585F60,
+ 0x5E5F5B5D, 0x585D5C58, 0x5F5B5B5C, 0x5D5E5A60,
+ 0x5B5C605B, 0x605B5C60, 0x5E5F5B5C, 0x5A5E5F5B,
+ 0x625C5D5E, 0x625F5A62, 0x5A60605A, 0x5F5B6060,
+ 0x62615D60, 0x5A60605A, 0x5F5B6060, 0x605F5B60,
+ 0x6061605C, 0x605F6564, 0x64615D64, 0x585F5F59,
+ 0x605A6061, 0x5E605A60, 0x5B5C605B, 0x605B5C60,
+ 0x5D615C5C, 0x5A5C605A, 0x5F5B5E60, 0x5E5F5B5E,
+ 0x585E5F5B, 0x5F5B5B5C, 0x5E5F5B60, 0x5861605C,
+ 0x5B575D5C, 0x5D5C585C, 0x58605F5B, 0x5C585D5C,
+ 0x605F5B5D, 0x58605F5B, 0x5C585D5C, 0x63605C5D,
+ 0x585F5C58, 0x5C585F5C, 0x5D5C585F, 0x585F5C58,
+ 0x5C585F5C, 0x5F5C585F, 0x585F5C58, 0x5C585F5C,
+ 0x5C5B575F, 0x575A5B57, 0x5B57585C, 0x585C575A,
+ 0x575A5B57, 0x5B575A5B, 0x5A5B575A, 0x565A5B57,
+ 0x5D58575B, 0x595A5659, 0x55585955, 0x5A565A59,
+ 0x5C5B575B, 0x57585C57, 0x5C57585C, 0x585C5758,
+ 0x595B5C5A, 0x5B57585B, 0x585C575A, 0x575A5B57,
+ 0x5A565A5B, 0x5A5B5759, 0x575D5C58, 0x59555C5B,
+ 0x5A59555A, 0x5A5E5A59, 0x5B585F5B, 0x5F5C5860,
+ 0x575D5C58, 0x5C585C5B, 0x5F5C585F, 0x585F5C58,
+ 0x5C585F5C, 0x5F5C585F, 0x585F5C58, 0x5C585F5C,
+ 0x5F5C585F, 0x585E5B57, 0x5C585D5C, 0x5D5C585F,
+ 0x585D5C58, 0x5C585D5C, 0x5D5C585D, 0x5B605F5B,
+ 0x5C58605F, 0x5E5F5B5B, 0x5B5F5E5A, 0x5F5B605F,
+ 0x5E5F5B60, 0x5B5E5F5B, 0x5F5B5E5F, 0x5E5F5B5E,
+ 0x5A61625E, 0x5C585D5E, 0x61605C5D, 0x5E62605F,
+ 0x5F5B615F, 0x605F5B60, 0x5B60615D, 0x605A5E5F,
+ 0x62625C60, 0x58606158, 0x605A6061, 0x61605C60,
+ 0x5F62605F, 0x615D6260, 0x62615D62, 0x5F62605F,
+ 0x605F6260, 0x62605F62, 0x5B5E5F5B, 0x5F5D5E5F,
+ 0x5E5F5B5E, 0x5A5E605A, 0x605A6060, 0x60605A60,
+ 0x5A5E605A, 0x5C585E60, 0x5F5E5A5D, 0x5B61605C,
+ 0x5F5B605F, 0x605F5B60, 0x5861605C, 0x5C585D5C,
+ 0x605F5B5D, 0x5B5F5E5A, 0x605C605F, 0x605F5B61,
+ 0x575D5C58, 0x5D595C5B, 0x5D5C5860, 0x585F5C58,
+ 0x5C585F5C, 0x5E5B575F, 0x585F5C58, 0x5C585F5C,
+ 0x5C5B575F, 0x575C5B57, 0x5D585A5B, 0x585B5959,
+ 0x5B5C5C5C, 0x58585B5B, 0x58595758, 0x57595A56,
+ 0x5C57585C, 0x595A5658, 0x56595A56, 0x5A565B5A,
+ 0x5B5A565B, 0x56595A56, 0x5A56595A, 0x5B5B555B,
+ 0x575A5B57, 0x5C57585C, 0x585C5758, 0x575A5B57,
+ 0x5A565A5B, 0x5A5B5759, 0x57585C57, 0x5C57585C,
+ 0x585C5758, 0x57595A56, 0x5B57585C, 0x5A5B575A,
+ 0x585D5C58, 0x5C585F5C, 0x5F5C585F, 0x585F5C58,
+ 0x5C585F5C, 0x5F5C585F, 0x5B605F5B, 0x5C58605F,
+ 0x5D5C585D, 0x585D5C58, 0x5D595D5C, 0x5F5E5A5E,
+ 0x58605F5B, 0x5C5B5D5C, 0x605E5D5E, 0x585F5E5A,
+ 0x5F5B5D5C, 0x605F5B60, 0x5B605F5B, 0x5E5A605F,
+ 0x5F5E5A5F, 0x5A605F5B, 0x5F5B5F5E, 0x605F5B60,
+ 0x5A60605A, 0x605C6060, 0x605F5B61, 0x5D60615D,
+ 0x605F6061, 0x62615D62, 0x5C64615D, 0x605D6461,
+ 0x64615D65, 0x1F686763, 0x00002423, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x5F30312F,
+ 0x615F6061, 0x60615F60, 0x5E5C5C5C, 0x5C5E5E5E,
+ 0x5F5D5D5F, 0x5B5E5D59, 0x605A6161, 0x5E5E5860,
+ 0x595D5F59, 0x5D595C5D, 0x5E5D595E, 0x575A5B57,
+ 0x5B595A5B, 0x595A585A, 0x55585C57, 0x5B57565A,
+ 0x5B5C585A, 0x565A5C56, 0x5C565A5C, 0x5A5B575A,
+ 0x555A5B57, 0x59555859, 0x5A5B5758, 0x57595A56,
+ 0x5B575A5B, 0x5758545A, 0x55585955, 0x59555859,
+ 0x5A595558, 0x57595854, 0x59555C5B, 0x5A59555A,
+ 0x55585955, 0x59555859, 0x58595558, 0x55585955,
+ 0x59555859, 0x5859555A, 0x56585955, 0x5955595A,
+ 0x58595558, 0x555A5955, 0x5A565859, 0x5859555B,
+ 0x57585957, 0x5A565859, 0x59585459, 0x555A5857,
+ 0x57565856, 0x5A585759, 0x55585955, 0x5A565859,
+ 0x58595559, 0x55585955, 0x59555859, 0x5A59555A,
+ 0x545A5955, 0x58545958, 0x5A595559, 0x555C5B57,
+ 0x59555859, 0x5A595558, 0x575A5955, 0x59555C5B,
+ 0x5A59555A, 0x55585955, 0x59555859, 0x5A59555A,
+ 0x555C5B57, 0x5B575A59, 0x5859555C, 0x54595B55,
+ 0x5B55585A, 0x5B5D5759, 0x565A5C56, 0x5B57585C,
+ 0x575B565A, 0x575B5C58, 0x5B59585C, 0x585C5758,
+ 0x585C5D59, 0x5D595E5E, 0x5E5D595E, 0x5B5C5D5B,
+ 0x5D5B5A5D, 0x5A5D5B5A, 0x57585B59, 0x5B57585C,
+ 0x5A5B575A, 0x595A5E59, 0x5D595C5D, 0x5E5D595E,
+ 0x58605F5B, 0x5C585E5E, 0x5E5E585D, 0x59605F5B,
+ 0x5D595E5D, 0x5E5D595E, 0x595E5D59, 0x5C585F5F,
+ 0x5E5D595D, 0x59605F5B, 0x5C585E5D, 0x5E5D595D,
+ 0x595A5B59, 0x5B57585B, 0x5A5B575A, 0x56585C56,
+ 0x5B575A5C, 0x5C5B575C, 0x575A5B57, 0x5B595A5B,
+ 0x5A5B595A, 0x575A5B57, 0x5C56585C, 0x5A5C565A,
+ 0x575A5B57, 0x5C585A5B, 0x5859555B, 0x555A5955,
+ 0x5B575A59, 0x5859555C, 0x575A5B57, 0x59555A5B,
+ 0x58595558, 0x55585955, 0x59555859, 0x58595558,
+ 0x56595756, 0x56555758, 0x58595758, 0x55585955,
+ 0x59555859, 0x5A59555A, 0x55585955, 0x59555859,
+ 0x5958545A, 0x57595756, 0x58575A58, 0x5758565A,
+ 0x57565755, 0x56545659, 0x54575553, 0x55585955,
+ 0x59555859, 0x565A5558, 0x55545755, 0x57555257,
+ 0x56595752, 0x55565A55, 0x5B555859, 0x585A5459,
+ 0x55585955, 0x58545859, 0x5A595559, 0x55585955,
+ 0x5A565859, 0x5958545B, 0x55585955, 0x59555859,
+ 0x5B5A565A, 0x575C5B57, 0x5B575A5B, 0x5A5B575C,
+ 0x575A5B59, 0x59555859, 0x5A5B5758, 0x565A5B57,
+ 0x5B57595A, 0x5758545A, 0x585A5B57, 0x5B57595D,
+ 0x575B565A, 0x575A5B57, 0x5B59585C, 0x585B595A,
+ 0x57585C57, 0x5C57585C, 0x585C5758, 0x57585C57,
+ 0x5B57585C, 0x5A5B575A, 0x575A5B57, 0x5B575A5B,
+ 0x5C5B575A, 0x585C5B57, 0x5D595D5C, 0x5E5D595E,
+ 0x595C5B57, 0x5F5B5E5D, 0x5E5D5960, 0x5A5E5E58,
+ 0x5C586060, 0x5E5D595D, 0x575A5B57, 0x5B56585C,
+ 0x585C5757, 0x57585C57, 0x5C56585C, 0x585C5658,
+ 0x57585C57, 0x5C58585C, 0x585C575B, 0x575B5C58,
+ 0x5B575A5B, 0x5A5B575A, 0x57585955, 0x5B575A5B,
+ 0x5A5B575A, 0x555B5C58, 0x5A585859, 0x5C5A5959,
+ 0x575C5B57, 0x59555C5B, 0x5A5B575A, 0x555C5B57,
+ 0x57535A59, 0x59585458, 0x555A5955, 0x59555A59,
+ 0x5A59555A, 0x55585753, 0x59555859, 0x5657535A,
+ 0x55585753, 0x5A565A59, 0x5C59555D, 0x54585955,
+ 0x58565758, 0x59575657, 0x56575554, 0x57565B57,
+ 0x5957565B, 0x56585655, 0x58565758, 0x57585657,
+ 0x575A5857, 0x57565859, 0x57585659, 0x55585753,
+ 0x58545A59, 0x5A595559, 0x56585655, 0x56555758,
+ 0x5A585758, 0x535D5A56, 0x5A565A57, 0x5C59555D,
+ 0x555B5A56, 0x59555A59, 0x5B5A565A, 0x555B5A56,
+ 0x59555A59, 0x5A59555A, 0x555A5B57, 0x5A565859,
+ 0x5A59555B, 0x555A5955, 0x5B575859, 0x595A565C,
+ 0x57595A56, 0x5B575A5B, 0x5A59555A, 0x575A5955,
+ 0x5B575C5B, 0x5A5B575A, 0x575A5B57, 0x5B575A5B,
+ 0x5A5B575A, 0x585B5C58, 0x5B575D5C, 0x5D5C585E,
+ 0x575A5B57, 0x5C56585C, 0x5A5B575A, 0x5A5A5B59,
+ 0x5B575B5C, 0x5A5B575A, 0x585D5F59, 0x5D595C5E,
+ 0x5C5D595C, 0x575A5C56, 0x5B575A5B, 0x5A5B595A,
+ 0x595C5A59, 0x5B575E5A, 0x5F5C585E, 0x595E5D59,
+ 0x5D595E5D, 0x5E5D595E, 0x575A5B57, 0x5B59585C,
+ 0x5A5B595A, 0x56595A56, 0x5C565A5C, 0x595B555A,
+ 0x57585C57, 0x5A595A5B, 0x5C5A595C, 0x595A5B59,
+ 0x5B575A5B, 0x5A5B575A, 0x565A5B57, 0x5B57595A,
+ 0x5A5B575A, 0x575A5B57, 0x5B575A5B, 0x595A565A,
+ 0x55585955, 0x59555859, 0x5859555A, 0x565A5955,
+ 0x59555B5A, 0x5A59555A, 0x555A5955, 0x59555A59,
+ 0x5A59555A, 0x555A5955, 0x59555A59, 0x56575358,
+ 0x57595A58, 0x57555859, 0x56575354, 0x54585955,
+ 0x5753585A, 0x56575356, 0x52565755, 0x57555354,
+ 0x56575556, 0x535B5958, 0x59555857, 0x5A59555A,
+ 0x53585955, 0x57535657, 0x58595556, 0x53595854,
+ 0x56525857, 0x5A595557, 0x55585955, 0x59555859,
+ 0x58595558, 0x535A5955, 0x58545657, 0x5A595559,
+ 0x545A5955, 0x59555958, 0x5A59555A, 0x555A5955,
+ 0x59555A59, 0x5B5A565A, 0x575A5955, 0x5B575A5B,
+ 0x5859555A, 0x57595A56, 0x59555A5B, 0x5A5B5758,
+ 0x57595B55, 0x5B595A5B, 0x5A5B595A, 0x575A5B57,
+ 0x5B575A5B, 0x5B5C585A, 0x595A5B59, 0x5B575A5B,
+ 0x5A5B575A, 0x565A5C56, 0x5B575A5C, 0x5A5B575A,
+ 0x555A5C56, 0x5B57595B, 0x5A5B575A, 0x575C5D59,
+ 0x5C585A5B, 0x5E5D595D, 0x5660605A, 0x5D585E5F,
+ 0x605D5860, 0x1D60605A, 0x00002221, 0x03010102,
+ 0x00000000, 0x00000000, 0x00000000, 0x5F303030,
+ 0x60605F5F, 0x60606060, 0x5C5A595B, 0x5A5C5B5A,
+ 0x5D5B5B5D, 0x575C5B57, 0x5C565D5D, 0x5C5C565C,
+ 0x575A5C56, 0x5B575A5B, 0x5C5B575C, 0x54575854,
+ 0x59575758, 0x58595758, 0x54585955, 0x59555559,
+ 0x57585458, 0x54585A54, 0x5A54565A, 0x565A5456,
+ 0x55595A56, 0x59555859, 0x58595558, 0x55575854,
+ 0x57535859, 0x565A5556, 0x55565753, 0x5A565859,
+ 0x56575359, 0x54565753, 0x59555758, 0x5857535A,
+ 0x52585955, 0x56525556, 0x595A5655, 0x54595A56,
+ 0x57535758, 0x58575358, 0x53585753, 0x57535657,
+ 0x57565258, 0x53595854, 0x56525857, 0x55545057,
+ 0x55585655, 0x57535856, 0x58575358, 0x545B5756,
+ 0x55545955, 0x59555459, 0x53585753, 0x58545657,
+ 0x56575357, 0x53585753, 0x57535857, 0x5A57535A,
+ 0x53585753, 0x57535657, 0x58575358, 0x555A5955,
+ 0x57535A59, 0x58575358, 0x5354534F, 0x57535857,
+ 0x57585456, 0x55575854, 0x58545859, 0x5A595557,
+ 0x555B5A56, 0x59555A59, 0x595A5658, 0x54585A54,
+ 0x5A54585A, 0x5A5C5658, 0x55585A54, 0x5A55565A,
+ 0x565A5556, 0x55585C57, 0x5957565A, 0x585C5756,
+ 0x565A5B57, 0x59555C5C, 0x5A5B575A, 0x56575856,
+ 0x5D5D5558, 0x5A5D5B5B, 0x57585B59, 0x5B57585C,
+ 0x5A5B575A, 0x56595A56, 0x5A56595A, 0x5B5A565B,
+ 0x565C5B57, 0x5B575C5C, 0x5C5C565C, 0x555C5C56,
+ 0x5B575B5B, 0x5C5B575C, 0x575C5B57, 0x5A565C5B,
+ 0x5B5A565B, 0x565C5B57, 0x5B575B5A, 0x5C5B575C,
+ 0x595A5B59, 0x5A56585B, 0x58595559, 0x54585A54,
+ 0x5955585A, 0x58595558, 0x55585955, 0x58565859,
+ 0x58595757, 0x55565A55, 0x5A54565A, 0x565A5456,
+ 0x54565A55, 0x59555559, 0x58595558, 0x55595A56,
+ 0x5A565859, 0x58595559, 0x53585955, 0x58545458,
+ 0x56575357, 0x53595A56, 0x57535857, 0x58575358,
+ 0x56595756, 0x57565957, 0x59575659, 0x53595854,
+ 0x57535857, 0x5A57535A, 0x53585753, 0x57535657,
+ 0x57565258, 0x55575554, 0x56555856, 0x55565458,
+ 0x52525454, 0x55535154, 0x52555352, 0x5351524E,
+ 0x57535657, 0x56575356, 0x53525553, 0x55535055,
+ 0x55585650, 0x53565753, 0x59535657, 0x56585257,
+ 0x53585753, 0x57535857, 0x58575358, 0x53585753,
+ 0x59555657, 0x57585458, 0x53565753, 0x57535458,
+ 0x57585456, 0x56585955, 0x5955595A, 0x57585458,
+ 0x57585957, 0x59555859, 0x58595558, 0x54585955,
+ 0x5A565758, 0x58595559, 0x55585955, 0x5A55565A,
+ 0x565A5556, 0x55575B56, 0x5856565A, 0x56595755,
+ 0x55565A55, 0x5B56565A, 0x565A5557, 0x55565A55,
+ 0x5A55565A, 0x565A5556, 0x54565A55, 0x59555559,
+ 0x5A5B5758, 0x575C5B57, 0x5B575C5B, 0x5C5B575C,
+ 0x575C5B57, 0x5B575C5B, 0x5B5A565C, 0x575B5A56,
+ 0x5A565A5B, 0x5A5B575B, 0x57585955, 0x5C585A5B,
+ 0x565A555B, 0x57565A55, 0x5C57585C, 0x55595458,
+ 0x55565A55, 0x5A55565A, 0x565A5556, 0x55565A55,
+ 0x59555859, 0x58595558, 0x54585955, 0x59555758,
+ 0x58595558, 0x54575854, 0x59555758, 0x57585458,
+ 0x55555652, 0x58545859, 0x56575359, 0x53585955,
+ 0x57535657, 0x59585458, 0x53575854, 0x57535657,
+ 0x57565258, 0x52555450, 0x57535556, 0x58575358,
+ 0x52555450, 0x54505956, 0x57545057, 0x51585753,
+ 0x52515655, 0x59575654, 0x55575352, 0x56555A56,
+ 0x5A56555A, 0x53565453, 0x53525654, 0x55535255,
+ 0x53545251, 0x54535654, 0x57555456, 0x50555450,
+ 0x56525554, 0x5B585459, 0x55535452, 0x57565657,
+ 0x58575359, 0x52595652, 0x58545956, 0x5A57535B,
+ 0x53585753, 0x57535857, 0x58575358, 0x53585753,
+ 0x57535657, 0x58575358, 0x53575854, 0x57535657,
+ 0x5A595558, 0x55585955, 0x59555859, 0x58595558,
+ 0x55585955, 0x59555859, 0x58595558, 0x555A5955,
+ 0x59555A59, 0x58595558, 0x57565A55, 0x5955585C,
+ 0x58595558, 0x56595854, 0x59555B5A, 0x5C59555C,
+ 0x55585955, 0x5A54565A, 0x565A5556, 0x55585955,
+ 0x59555859, 0x5A5B5758, 0x575A5B57, 0x5B575A5B,
+ 0x5A5B575A, 0x55555954, 0x5B59565A, 0x5A5B5958,
+ 0x595C5A59, 0x5A565C5A, 0x5B5A565D, 0x565C5B57,
+ 0x5B575C5C, 0x5A5B575C, 0x565A5B57, 0x5854575B,
+ 0x5A5B5757, 0x56565A55, 0x5A55575B, 0x565A5556,
+ 0x55565A55, 0x5955565A, 0x58595758, 0x57585957,
+ 0x59555859, 0x58595558, 0x55565A55, 0x5955565A,
+ 0x58595558, 0x55585955, 0x5955565A, 0x56575358,
+ 0x55565753, 0x57535859, 0x595A5656, 0x525A5955,
+ 0x57535756, 0x55545058, 0x53565753, 0x57535657,
+ 0x58575358, 0x54575652, 0x57535958, 0x55545058,
+ 0x53555652, 0x57535657, 0x56575356, 0x52575953,
+ 0x57535858, 0x56575356, 0x54525553, 0x52505356,
+ 0x5455534F, 0x53545251, 0x534F5854, 0x58575354,
+ 0x53585753, 0x54505857, 0x58575355, 0x50575652,
+ 0x54505554, 0x55545057, 0x5351524E, 0x57535657,
+ 0x58575358, 0x52585753, 0x57535756, 0x5A595558,
+ 0x50585753, 0x57535554, 0x5857535A, 0x53565753,
+ 0x57535657, 0x58575358, 0x53555652, 0x58545657,
+ 0x58595557, 0x56575B56, 0x5955575B, 0x56575358,
+ 0x57585A54, 0x58545A5B, 0x5A5B5757, 0x55565A55,
+ 0x5955565A, 0x57585458, 0x57565957, 0x59555659,
+ 0x57585458, 0x55585A54, 0x5A56595B, 0x595B5559,
+ 0x55575953, 0x5B57595B, 0x595A565A, 0x565A5B57,
+ 0x5B57595A, 0x5D5C585C, 0x565C5C56, 0x5D585C5C,
+ 0x5C5C5660, 0x1B60605A, 0x0100201F, 0x02000003,
+ 0x00020000, 0x00010200, 0x02000102, 0x60303030,
+ 0x514F6060, 0x5F62604E, 0x5A5B5B5B, 0x58585A5A,
+ 0x58585858, 0x55575854, 0x59555859, 0x5B5A565A,
+ 0x57585955, 0x59575859, 0x58595758, 0x53565753,
+ 0x59555657, 0x5859555A, 0x53565753, 0x57535657,
+ 0x53545058, 0x53565753, 0x57535657, 0x56575356,
+ 0x53565753, 0x57535657, 0x56575356, 0x53575854,
+ 0x54505657, 0x56575353, 0x50585753, 0x57535554,
+ 0x55545058, 0x4F585753, 0x54505453, 0x56555155,
+ 0x53595854, 0x54505857, 0x55545055, 0x5154534F,
+ 0x534F5655, 0x55545056, 0x51555450, 0x54505655,
+ 0x58555157, 0x51575450, 0x54505855, 0x57545057,
+ 0x4F575450, 0x54505653, 0x58555157, 0x52575554,
+ 0x52515553, 0x56525156, 0x50555450, 0x54505554,
+ 0x55545055, 0x4F575450, 0x54505653, 0x57545057,
+ 0x52555450, 0x54505756, 0x57545057, 0x51555450,
+ 0x54505655, 0x57545057, 0x53555450, 0x534F5857,
+ 0x55545054, 0x50555450, 0x58545554, 0x58575359,
+ 0x53575652, 0x54505657, 0x58575355, 0x53585753,
+ 0x57535857, 0x56575358, 0x54565753, 0x57535758,
+ 0x56575356, 0x54565753, 0x57535758, 0x58595556,
+ 0x55585955, 0x58575859, 0x5859575A, 0x56575856,
+ 0x57555558, 0x55585656, 0x58575A58, 0x5A58575A,
+ 0x595A5859, 0x56595A56, 0x5A56595A, 0x5B5A565B,
+ 0x55585955, 0x58575859, 0x5A59555A, 0x55585955,
+ 0x58575859, 0x5A58575A, 0x575A5B59, 0x57565859,
+ 0x5A585759, 0x575A5857, 0x59585A58, 0x5957565D,
+ 0x54585955, 0x58545758, 0x56575357, 0x53565753,
+ 0x57535657, 0x56575356, 0x53585955, 0x57535657,
+ 0x55595456, 0x53585955, 0x57535657, 0x56575356,
+ 0x53565753, 0x57535657, 0x56575358, 0x53565753,
+ 0x57535657, 0x56555156, 0x51555450, 0x534F5455,
+ 0x57565254, 0x4F595854, 0x57535453, 0x55545058,
+ 0x54555352, 0x53525755, 0x57555455, 0x4F54534F,
+ 0x524E5453, 0x56534F55, 0x50555450, 0x54505554,
+ 0x57545057, 0x5054534F, 0x54505554, 0x53545055,
+ 0x52515452, 0x55534F54, 0x50544F52, 0x4F52534F,
+ 0x534F5253, 0x52534F54, 0x51505351, 0x53515053,
+ 0x54555350, 0x50535450, 0x54505554, 0x55545055,
+ 0x50575450, 0x54505754, 0x55545057, 0x50555450,
+ 0x56525554, 0x55565257, 0x51575854, 0x54505455,
+ 0x57565255, 0x50585753, 0x534F5554, 0x55545054,
+ 0x5354534F, 0x57535857, 0x55545058, 0x53555450,
+ 0x57565857, 0x56575559, 0x55565755, 0x57535657,
+ 0x56575356, 0x53575854, 0x57535657, 0x57585456,
+ 0x53565753, 0x57535657, 0x56575356, 0x53565753,
+ 0x57535657, 0x56575356, 0x53545853, 0x57555458,
+ 0x57585656, 0x57585957, 0x58575859, 0x5957565A,
+ 0x55585955, 0x57565859, 0x5A585759, 0x56585957,
+ 0x59575558, 0x57585658, 0x52565753, 0x58525556,
+ 0x56585256, 0x53575854, 0x57535657, 0x57585656,
+ 0x55565755, 0x59575657, 0x56575558, 0x51575854,
+ 0x57535655, 0x58575358, 0x50565753, 0x57535354,
+ 0x55565256, 0x5352534F, 0x57535657, 0x56575356,
+ 0x52565753, 0x54505556, 0x58575355, 0x50565753,
+ 0x534F5354, 0x58575354, 0x50555450, 0x54505554,
+ 0x56555157, 0x4F52534F, 0x534F5054, 0x53524E52,
+ 0x50555450, 0x54505754, 0x57545057, 0x4F56534F,
+ 0x55515653, 0x57545058, 0x51575450, 0x53505855,
+ 0x57545058, 0x51535150, 0x53515253, 0x52535152,
+ 0x4F535450, 0x534F5453, 0x56534F54, 0x50575450,
+ 0x544F5754, 0x57544F58, 0x4F52534F, 0x534F5253,
+ 0x54534F54, 0x50575450, 0x54505855, 0x56534F57,
+ 0x5056534F, 0x54505754, 0x55545057, 0x50555450,
+ 0x54505554, 0x55545057, 0x53575854, 0x534F5657,
+ 0x55545054, 0x5054534F, 0x54505554, 0x58575355,
+ 0x53565753, 0x57535657, 0x56575356, 0x53575854,
+ 0x57535657, 0x56575356, 0x53565753, 0x58545657,
+ 0x56575357, 0x53595854, 0x57535857, 0x5956525A,
+ 0x52565753, 0x57535556, 0x58595556, 0x53585955,
+ 0x57535657, 0x58575358, 0x57585955, 0x57565859,
+ 0x58595759, 0x55545853, 0x5955565A, 0x58595558,
+ 0x55585955, 0x58575859, 0x5758545A, 0x56585955,
+ 0x5857595A, 0x5859555A, 0x52585955, 0x5A545458,
+ 0x56575358, 0x56565A55, 0x5A585558, 0x56575359,
+ 0x52545853, 0x58525458, 0x56575356, 0x53555652,
+ 0x57535458, 0x55565256, 0x53545853, 0x534F5458,
+ 0x56575352, 0x53575854, 0x534F5657, 0x58575354,
+ 0x5152534F, 0x54505455, 0x57565255, 0x50585551,
+ 0x54505754, 0x57545057, 0x50555450, 0x55515554,
+ 0x58575356, 0x4F555450, 0x534F5453, 0x55545056,
+ 0x4F52534F, 0x534F5253, 0x52534F52, 0x4F52534F,
+ 0x534F5253, 0x52534F52, 0x4F52534F, 0x52505253,
+ 0x5354524F, 0x50555450, 0x54505554, 0x57545057,
+ 0x5056534F, 0x534F5754, 0x58555156, 0x50555450,
+ 0x54505554, 0x55545057, 0x4F52534F, 0x524E5253,
+ 0x54534F53, 0x50555450, 0x54505554, 0x57545057,
+ 0x4F575450, 0x53505653, 0x58555158, 0x50555450,
+ 0x57535354, 0x53545056, 0x53535450, 0x54505657,
+ 0x56555155, 0x53575854, 0x57535657, 0x56575356,
+ 0x53565753, 0x57535657, 0x56585256, 0x52535751,
+ 0x58535458, 0x55595454, 0x53565753, 0x57535657,
+ 0x56575356, 0x54575854, 0x59535758, 0x57595357,
+ 0x54565852, 0x5A56585A, 0x57585459, 0x54585A54,
+ 0x5955585A, 0x5958545A, 0x55585955, 0x58545859,
+ 0x5A5A5459, 0x1C60605A, 0x01001F20, 0x00010000,
+ 0x00020000, 0x00010200, 0x02000102, 0x61303030,
+ 0x615F6161, 0x5E615F5E, 0x5D5D5D5D, 0x5D5D5D5D,
+ 0x5D5D5D5D, 0x5B5C5D5B, 0x5A5A5C5D, 0x5B59585C,
+ 0x595A5B59, 0x5B595A5B, 0x5A5B595A, 0x575A5B57,
+ 0x5C585A5B, 0x5D5C585D, 0x575A5955, 0x5B575A5B,
+ 0x5A59555C, 0x575C5B57, 0x5B575A5B, 0x5859555C,
+ 0x56585955, 0x5955595A, 0x5A5B5758, 0x565A5B57,
+ 0x5955595A, 0x5A59555A, 0x555A5955, 0x59555A59,
+ 0x5A59555A, 0x555A5955, 0x59555A59, 0x5958545A,
+ 0x575A5955, 0x59555A5B, 0x5859555A, 0x555A5955,
+ 0x57535A59, 0x5A595558, 0x55585753, 0x58545A59,
+ 0x5A595559, 0x55585753, 0x59555A59, 0x5D5A565C,
+ 0x545C5955, 0x58545958, 0x59585459, 0x565A5857,
+ 0x57565957, 0x5957565B, 0x555A5955, 0x59555A59,
+ 0x5A59555A, 0x545A5955, 0x59555958, 0x5A59555A,
+ 0x565A5955, 0x59555B5A, 0x5A59555A, 0x55595854,
+ 0x58545A59, 0x5A595559, 0x555A5955, 0x5A565A59,
+ 0x5A59555B, 0x575A5955, 0x58545C5B, 0x5A595559,
+ 0x575C5B57, 0x58545C5B, 0x5C5B5759, 0x575B5A56,
+ 0x59555A5B, 0x5859555A, 0x595A5857, 0x5C585A5B,
+ 0x5A5B575D, 0x57585955, 0x5B575A5B, 0x5859555A,
+ 0x57595A56, 0x5A595A5B, 0x5C5D5B5C, 0x5B5C5D5B,
+ 0x5D5B5A5D, 0x5C5D5B5C, 0x5A5A5A5A, 0x5A595A5A,
+ 0x5C5A595C, 0x5A5D5E5C, 0x5C5B5D5E, 0x5F5D5C5E,
+ 0x5B5D5E5C, 0x5B5B5C5D, 0x5E5C5B5D, 0x5B5C5D5B,
+ 0x5B5A5E5C, 0x5D5B5A5D, 0x595E5C5B, 0x5A595A5B,
+ 0x5E5C5B5C, 0x5B5E5C5B, 0x5C5B5E5C, 0x5C5A5960,
+ 0x575C5B57, 0x5B575A5B, 0x5C5B575A, 0x575C5B57,
+ 0x5B575C5B, 0x5A5B575C, 0x555C5B57, 0x59555859,
+ 0x575B5658, 0x575A5B57, 0x5A565A5B, 0x595A5659,
+ 0x56585955, 0x5A56595A, 0x5859555B, 0x57585955,
+ 0x5B575A5B, 0x5A59555C, 0x555A5955, 0x59555A59,
+ 0x5B5A565A, 0x565A5955, 0x59555B5A, 0x5859555A,
+ 0x57595756, 0x58575A58, 0x5A58575A, 0x54595854,
+ 0x59555958, 0x5A59555A, 0x555A5955, 0x59555A59,
+ 0x5C59555C, 0x54595854, 0x58545958, 0x57585459,
+ 0x54545755, 0x58535156, 0x575B5654, 0x53565753,
+ 0x59555657, 0x5657535A, 0x54545755, 0x55535356,
+ 0x57585654, 0x56585955, 0x59555B5A, 0x5A59555A,
+ 0x555A5955, 0x59555A59, 0x5A59555A, 0x555A5955,
+ 0x5A565A59, 0x5859555B, 0x55585955, 0x59555859,
+ 0x5A59555A, 0x565A5955, 0x59555B5A, 0x5A59555A,
+ 0x555A5955, 0x59555859, 0x5859555A, 0x555A5955,
+ 0x57565A59, 0x5B595859, 0x59585957, 0x5B575A5B,
+ 0x5958545C, 0x575A5955, 0x5B575A5B, 0x5859555C,
+ 0x55585955, 0x5A565859, 0x5A5B5759, 0x585B5C58,
+ 0x5B575B5C, 0x5859555A, 0x57585955, 0x5B595A5B,
+ 0x595A585A, 0x5B5A5B59, 0x5D5C5C5D, 0x5E5C5B5F,
+ 0x585E5D59, 0x5A595D5C, 0x5E5C5B5C, 0x5B5D5E5C,
+ 0x5D5B5C5D, 0x5859575C, 0x56585957, 0x5B57595A,
+ 0x5B5A565C, 0x595C5B57, 0x5B5A5A5B, 0x5C5A595D,
+ 0x595B5958, 0x5A595A5B, 0x595A585C, 0x545A5955,
+ 0x59555758, 0x5859555A, 0x55585955, 0x5B575859,
+ 0x5A59555A, 0x57595854, 0x5B575C5B, 0x5A5B575C,
+ 0x55585C57, 0x57535859, 0x5C5B5758, 0x55585955,
+ 0x58545859, 0x5A595559, 0x565A5955, 0x59555B5A,
+ 0x5A59555A, 0x53545853, 0x58545458, 0x58595557,
+ 0x55585753, 0x59555A59, 0x5857535A, 0x53585753,
+ 0x57535857, 0x58575358, 0x54595854, 0x56525958,
+ 0x59565259, 0x55575554, 0x58565657, 0x57585657,
+ 0x54575854, 0x59555758, 0x5958545A, 0x52585753,
+ 0x56525756, 0x58575359, 0x53575854, 0x59555458,
+ 0x5A595558, 0x54595854, 0x57535958, 0x5B5A565A,
+ 0x55595854, 0x59555A59, 0x5958545A, 0x555A5955,
+ 0x59555A59, 0x5A59555A, 0x56585955, 0x5955595A,
+ 0x5A59555A, 0x555B5A56, 0x58545A59, 0x5A59555B,
+ 0x55595A56, 0x59555859, 0x595A5658, 0x575A5B57,
+ 0x5A565A5B, 0x5A5B5759, 0x555A5B57, 0x5B575859,
+ 0x5A5B575A, 0x555B5C58, 0x59555A59, 0x5A59555A,
+ 0x565B5A56, 0x5A56595A, 0x5B5C5859, 0x575B5C58,
+ 0x5B575A5B, 0x5B5A565C, 0x595C5A59, 0x5B5B5C5A,
+ 0x5E5C5B5D, 0x595A5B59, 0x5B59585B, 0x5A5B595A,
+ 0x595C5D59, 0x5C5B5C5D, 0x5C5D5B5E, 0x595C5D59,
+ 0x5C5B5C5D, 0x5D5B5A5E, 0x565A5B57, 0x5A565A5C,
+ 0x5B5C5859, 0x595A5B59, 0x5B595A5B, 0x5A5B595A,
+ 0x565A5B57, 0x5B575A5C, 0x5A5B575A, 0x57595A56,
+ 0x5B575A5B, 0x595A565A, 0x58585955, 0x59555B5C,
+ 0x5C5B575A, 0x58575854, 0x59555B5C, 0x5859555A,
+ 0x55595A56, 0x59555859, 0x5A59555A, 0x55585753,
+ 0x57535C59, 0x5D5A565A, 0x555B5A56, 0x58545859,
+ 0x56575359, 0x57585753, 0x5A565C5B, 0x5A59555B,
+ 0x55585955, 0x59555859, 0x5758545A, 0x53565753,
+ 0x58545657, 0x58595557, 0x52585955, 0x56545556,
+ 0x55565453, 0x53555652, 0x5A565857, 0x5B58545B,
+ 0x535A5753, 0x58545A57, 0x5A57535B, 0x55585753,
+ 0x58545A59, 0x5B5A5659, 0x53565753, 0x57535458,
+ 0x58575356, 0x53585753, 0x59555857, 0x5D5A565A,
+ 0x545C5955, 0x59555B58, 0x5A59555C, 0x55595854,
+ 0x5B575859, 0x5859555A, 0x55585955, 0x59555859,
+ 0x5C5B575A, 0x55595A56, 0x5C585859, 0x595A565B,
+ 0x555C5B57, 0x5B575A59, 0x5759535C, 0x54595B55,
+ 0x5B57585A, 0x5A5B575A, 0x56585955, 0x5B57595A,
+ 0x5A5B575A, 0x585B5C58, 0x5B575B5C, 0x5A5C565A,
+ 0x565A5C56, 0x5B575A5C, 0x5A5B575A, 0x575D5C58,
+ 0x5B575D5D, 0x5C5B575C, 0x595D5E5C, 0x5C5B5A5B,
+ 0x61605C5E, 0x1C5F605C, 0x01001F20, 0x00010000,
+ 0x00000000, 0x00010000, 0x01000200, 0x30101010,
+ 0x30303030, 0x2E30302E, 0x30303030, 0x30303030,
+ 0x2F2F2F30, 0x2E2E2E2E, 0x2D2F2E2E, 0x302E2E30,
+ 0x282D2B2A, 0x2C282D2C, 0x2D2C282D, 0x2A2D2B2A,
+ 0x2B2A2D2B, 0x2C2A292F, 0x2A2D2B2A, 0x2B2A2D2B,
+ 0x2E2A292F, 0x2A2F2B2A, 0x2C2B2D2B, 0x2C2A2930,
+ 0x292A2B29, 0x2A28282B, 0x2B2C2A29, 0x29282B29,
+ 0x2B2A2A2B, 0x2C2A292D, 0x292A2B29, 0x2A292A2B,
+ 0x2C2A292C, 0x292A2B29, 0x2B292A2B, 0x2A2B292A,
+ 0x292A2B29, 0x2A28282B, 0x282B2929, 0x292A2B29,
+ 0x2B292A2B, 0x2B2C2A2A, 0x292A2B29, 0x2B292A2B,
+ 0x2A2B292A, 0x292A2B29, 0x2A292A2B, 0x2A2B292C,
+ 0x292A2B29, 0x2B292A2B, 0x2A2B292A, 0x292A2B29,
+ 0x2B2A2A2B, 0x2C2A292D, 0x292A2B29, 0x2B292A2B,
+ 0x2B2C2A2A, 0x282B2C2A, 0x2B29292A, 0x2B2C2A2A,
+ 0x29282B29, 0x2B29282B, 0x2A2B292A, 0x29282B29,
+ 0x2A28282B, 0x2A2B2929, 0x292A2B29, 0x2B292A2B,
+ 0x2A2B292A, 0x2A2A2B29, 0x2B292B2C, 0x2A2B292A,
+ 0x2A2D2B2A, 0x2B2A2D2B, 0x2F2B2A2F, 0x292A2B29,
+ 0x2B29282B, 0x2B2C2A2A, 0x2A2E2C2B, 0x2B2A2D2B,
+ 0x2D2B2A2F, 0x292A2B29, 0x2B29282B, 0x2A2B292A,
+ 0x2A282B29, 0x2927292C, 0x2A2B2928, 0x2E2E2E2E,
+ 0x2E2E2E2E, 0x302E2E30, 0x2A2D2B2A, 0x2B2A2D2B,
+ 0x2D2B2A2D, 0x2F30312F, 0x30303031, 0x32303032,
+ 0x2E2E2E2E, 0x2D2F2E2E, 0x302E2E30, 0x2A2E2C2C,
+ 0x2A292D2B, 0x2E2A292E, 0x282D2C28, 0x2C282D2C,
+ 0x2F2C282F, 0x2A2D2B2A, 0x2B2A2D2B, 0x2D2B2A2D,
+ 0x2A2D2B2A, 0x2B2A2D2B, 0x2D2B2A2D, 0x2A2D2B2A,
+ 0x2B2A2D2B, 0x2D2B2A2D, 0x272A2B27, 0x2B292A2B,
+ 0x2A2B292A, 0x29282B29, 0x2B27282B, 0x2A2B272A,
+ 0x28282B29, 0x2A28272A, 0x2A2B2929, 0x2A2B2C2A,
+ 0x2B2A2D2B, 0x2D2B2A2D, 0x292A2B29, 0x2B292A2B,
+ 0x2A2B292A, 0x29292A28, 0x2B292A2B, 0x272A282A,
+ 0x2A292929, 0x2B292A2A, 0x2A2B292A, 0x292A2B29,
+ 0x2B292A2B, 0x2C2A292A, 0x2A2D2B2A, 0x2B2A2D2B,
+ 0x2F2B2A2F, 0x292C2A29, 0x2B292A2B, 0x2A2B292A,
+ 0x27292D28, 0x2B29282C, 0x2A2B292A, 0x29282B29,
+ 0x2A28282B, 0x2A2B2929, 0x29282B29, 0x2B29282B,
+ 0x2A2B292A, 0x292A2B29, 0x2B292A2B, 0x2A2B292A,
+ 0x292A2B29, 0x2B292A2B, 0x2A2B292A, 0x292A2B29,
+ 0x2B292A2B, 0x292A282A, 0x292A2B29, 0x2B29282B,
+ 0x2A2B292A, 0x292A2B29, 0x2B292A2B, 0x2A2B292A,
+ 0x292A2B29, 0x2B29282B, 0x282B292A, 0x292A2B29,
+ 0x2B292A2B, 0x2A2B292A, 0x2A2D2B2A, 0x2B2A2D2B,
+ 0x2F2B2A2F, 0x2A2F2B2A, 0x2B2A2D2B, 0x2D2B2A2F,
+ 0x272A2B27, 0x2B27282C, 0x2A2B272A, 0x2A2B2C2A,
+ 0x2B2A2B2C, 0x2D2B2A2D, 0x2A2D2B2A, 0x2B2A2D2B,
+ 0x2D2B2A2D, 0x2A2D2B2A, 0x2B2A2D2B, 0x2F2B2A2F,
+ 0x2A2F2B2A, 0x2B2A2D2B, 0x2D2B2A2D, 0x2A2D2B2A,
+ 0x2B2C2D2B, 0x2F2B2A30, 0x2A2D2B2A, 0x2B2A2D2B,
+ 0x2C2A292F, 0x2A2D2B2A, 0x2B2A2D2B, 0x2D2B2A2D,
+ 0x2A2D2B2A, 0x2B2A2D2B, 0x2C2A292F, 0x292A2B29,
+ 0x2B29282B, 0x292A282A, 0x2A2B2C2A, 0x2B2A2D2B,
+ 0x2C2A292D, 0x2B2D2B2A, 0x2B2A2E2C, 0x2D2B2A2D,
+ 0x282A2B29, 0x2B29272A, 0x2A2B292A, 0x29292A28,
+ 0x2C2A282B, 0x2A2B292B, 0x292A2B29, 0x2B292A2B,
+ 0x2A2B292A, 0x29282B29, 0x2B29282B, 0x2A2B292A,
+ 0x282A2B27, 0x2B272B2C, 0x2A2B272A, 0x292A2B29,
+ 0x2B292A2B, 0x2A2B292A, 0x292A2B29, 0x2A292A2B,
+ 0x2C2A292C, 0x292A2B29, 0x2B292A2B, 0x2A2B292A,
+ 0x27282C27, 0x2B292A2B, 0x2A2B292A, 0x282A2B29,
+ 0x2A29292A, 0x2A2B292C, 0x29282B29, 0x2B29282B,
+ 0x2A2B292A, 0x2A2A2B29, 0x2A292B2C, 0x2A2B292C,
+ 0x29292A28, 0x2B292A2B, 0x2A2B292A, 0x292A2B29,
+ 0x2B292A2B, 0x2A2B292A, 0x292A2B29, 0x2B292A2B,
+ 0x2A2B292A, 0x2A2D2B2A, 0x2C2B2D2B, 0x2D2B2A2E,
+ 0x29282B29, 0x2B29282B, 0x2C2A292A, 0x2A2D2B2A,
+ 0x2B2A2D2B, 0x2D2B2A2D, 0x2A2D2B2A, 0x2B2A2D2B,
+ 0x2B2C2A2D, 0x292A2B29, 0x2B292A2B, 0x292A282A,
+ 0x2A2D2B2A, 0x2B2A2D2B, 0x2D2B2A2D, 0x2A2D2B2A,
+ 0x2B2A2D2B, 0x2D2B2A2F, 0x272D2C28, 0x2A292C2B,
+ 0x302C2B2E, 0x2E2E2E2E, 0x2D2F2E2E, 0x302E2E30,
+ 0x2A2D2B2A, 0x2B2A2D2B, 0x2D2B2A2F, 0x2A2D2B2A,
+ 0x2B2A2D2B, 0x2C2A292F, 0x282E2C2B, 0x2C2B2D2C,
+ 0x2D2B2A2E, 0x292D2B2A, 0x2B2A2C2A, 0x2D2B2A2D,
+ 0x282D2B2A, 0x2C2B2D2C, 0x2D2B2A2E, 0x2A2C2A29,
+ 0x2C2B2D2B, 0x2C2A292E, 0x2A2D2B2A, 0x2B2A2D2B,
+ 0x2D2B2A2F, 0x292A2B29, 0x2B292A2B, 0x2A2B292A,
+ 0x29282B29, 0x2A28282B, 0x2A2B2927, 0x292A2B29,
+ 0x2A292C2A, 0x2A2B292C, 0x292A2B29, 0x2B29282B,
+ 0x292C2A2A, 0x2A2A2B29, 0x2B292B2C, 0x2A2B292A,
+ 0x292B2C2A, 0x2B292A2B, 0x2A2B292A, 0x29292A28,
+ 0x2B29282B, 0x2A2B292A, 0x2A282B29, 0x2A28292C,
+ 0x2B2C2A29, 0x292A2B29, 0x2B292A2B, 0x292A282A,
+ 0x292A2B29, 0x2A292A2B, 0x2C2A292C, 0x2A2A2B29,
+ 0x2B292B2C, 0x2A2B292A, 0x2A282B29, 0x2A28292C,
+ 0x292A2829, 0x292A2B29, 0x2A282A2B, 0x2A2B2929,
+ 0x292A2B29, 0x2B292A2B, 0x2A2B292A, 0x292A2B29,
+ 0x2B2A2A2B, 0x2C2A292D, 0x292A2B29, 0x2B292A2B,
+ 0x2A2B292A, 0x282A2B29, 0x2B29292A, 0x2A2B292A,
+ 0x2A2D2B2A, 0x2B2A2D2B, 0x2D2C282D, 0x272D2C28,
+ 0x2D292C2B, 0x2D2C282E, 0x27292A26, 0x2B292A2B,
+ 0x2C2A292A, 0x2A2B2C2A, 0x2B2A2B2C, 0x2D2C282D,
+ 0x282D2C28, 0x2C282D2C, 0x2D2C282D, 0x28302D29,
+ 0x2B2A2F2C, 0x2D2B2A2F, 0x302F2F2F, 0x30303030,
+ 0x2F302E30, 0x0F30312F, 0x00001011, 0x03010102,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x01010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000001, 0x00010000, 0x02000102,
+ 0x00020000, 0x00000200, 0x02000002, 0x00020000,
+ 0x00000200, 0x02000002, 0x00020000, 0x00000200,
+ 0x03010002, 0x00040000, 0x00000200, 0x02000004,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x02000001,
+ 0x00010001, 0x00000100, 0x01000002, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010003, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x01020000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000200, 0x02000005, 0x00000100,
+ 0x01000001, 0x01020000, 0x00020000, 0x00000200,
+ 0x02000004, 0x00010200, 0x01000001, 0x00010000,
+ 0x00000100, 0x02000001, 0x00000001, 0x00000000,
+ 0x00000000, 0x02000002, 0x00020000, 0x00000200,
+ 0x02000002, 0x00010101, 0x00000000, 0x02000002,
+ 0x01000001, 0x00010000, 0x02000102, 0x00020000,
+ 0x00000200, 0x04000004, 0x00020000, 0x00000200,
+ 0x02000002, 0x00020000, 0x00000200, 0x02000002,
+ 0x00020000, 0x00000200, 0x02000002, 0x00000100,
+ 0x00000001, 0x02000002, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000200, 0x01000001, 0x00010000, 0x00020000,
+ 0x00000200, 0x02000002, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00020000, 0x00000200,
+ 0x02000002, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x02000001, 0x00010001, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x02000002, 0x00010001, 0x00020000, 0x00000200,
+ 0x02000002, 0x00020000, 0x00000200, 0x02000002,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x00000001, 0x02000002, 0x00020000, 0x00000200,
+ 0x02000002, 0x00020000, 0x00000200, 0x03010002,
+ 0x00050100, 0x00000200, 0x02000002, 0x00020000,
+ 0x00000200, 0x04000004, 0x00020000, 0x00000200,
+ 0x02000002, 0x00020000, 0x00000200, 0x02000002,
+ 0x00020000, 0x00000200, 0x02000002, 0x00000100,
+ 0x01000001, 0x00010000, 0x00010200, 0x00000200,
+ 0x02000002, 0x00020000, 0x00000200, 0x02000002,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x02000001,
+ 0x00010001, 0x00010200, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00010200, 0x01000001,
+ 0x00010000, 0x00020000, 0x00000200, 0x00010002,
+ 0x00000100, 0x01000001, 0x02000000, 0x00020000,
+ 0x00000200, 0x02000002, 0x00020000, 0x00000200,
+ 0x00010002, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x00000200, 0x03010002, 0x00020000,
+ 0x00000200, 0x02000002, 0x00020000, 0x01000200,
+ 0x04000005, 0x01020000, 0x00010000, 0x02000102,
+ 0x00020000, 0x00000200, 0x02000004, 0x00040000,
+ 0x00000200, 0x03010004, 0x00020000, 0x00000200,
+ 0x02000002, 0x00040000, 0x01000301, 0x02000005,
+ 0x00020000, 0x00000200, 0x02000002, 0x00020000,
+ 0x00000200, 0x04000002, 0x00040000, 0x00000400,
+ 0x02000004, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000002, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000000, 0x01000000, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000100, 0x01000001, 0x00010000, 0x00000100,
+ 0x01000001, 0x00010000, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x00010000,
+ 0x00000100, 0x01000002, 0x00010000, 0x00000100,
+ 0x00000001, 0x00010002, 0x00000100, 0x01000001,
+ 0x00010000, 0x00000100, 0x01000001, 0x01020000,
+ 0x00020000, 0x00000200, 0x02000002, 0x00020000,
+ 0x00000201, 0x02010002, 0x00000100, 0x01000001,
+ 0x02000000, 0x00000100, 0x00000001, 0x02000002,
+ 0x00020000, 0x00000200, 0x02000002, 0x00020000,
+ 0x00000200, 0x02000002, 0x01010101, 0x00000101,
+ 0x00000000, 0x00000100, 0x00000102, 0x02000102,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010100, 0x00010101, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000000, 0x00000002,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x01010000, 0x00000001,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x01000000,
+ 0x00000101, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000002,
+ 0x00010101, 0x01010000, 0x00000003, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x00000002, 0x00000000, 0x01000000, 0x00010000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010101, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00020000, 0x00000200, 0x02000002, 0x00000100,
+ 0x00000001, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x01010100, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00000101, 0x00000000, 0x00010101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000000, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000200, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000000, 0x00000101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000200,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000002, 0x00020000,
+ 0x00000000, 0x00000002, 0x00000000, 0x00000000,
+ 0x01010100, 0x00020000, 0x00000000, 0x01010102,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000000, 0x00020000, 0x00000200,
+ 0x01010102, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x00000001, 0x00010000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00020000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000100, 0x00000001, 0x00000000,
+ 0x00000000, 0x01010000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01010000,
+ 0x00000001, 0x00000000, 0x00000000, 0x02000002,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00020000, 0x00000200, 0x02000002,
+ 0x00000000, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00010000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x01010100, 0x01000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x00000000, 0x01010000,
+ 0x00000001, 0x01000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000000, 0x00000101,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x01010100, 0x00000000,
+ 0x00000000, 0x03010102, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000101,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00020000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000100, 0x00010001, 0x02000002, 0x00000000,
+ 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000101, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000101, 0x01010000, 0x00000001, 0x00000000,
+ 0x01010000, 0x00000001, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01000001, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x03010102, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00010000, 0x00000100,
+ 0x00000000, 0x00000000, 0x00000000, 0x01000001,
+ 0x00010000, 0x00000100, 0x00000000, 0x01000000,
+ 0x00010000, 0x00000000, 0x00000000, 0x02000002,
+ 0x00010101, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x02000002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01000000, 0x00000101, 0x00000000,
+ 0x00000000, 0x00010000, 0x00000100, 0x00000000,
+ 0x00000000, 0x00000000, 0x01000001, 0x00000000,
+ 0x02000002, 0x00000000, 0x00000000, 0x01010100,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00010000,
+ 0x00000100, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00020000, 0x00000200,
+ 0x00000000, 0x00010101, 0x00000000, 0x01010100,
+ 0x00020000, 0x00000200, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02000002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00020000,
+ 0x00000200, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00010101, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x01010000, 0x00000001, 0x01000000, 0x00000001,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x01010000, 0x02000003,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00010000, 0x00000100, 0x01000000, 0x00000001,
+ 0x00000000, 0x00000100, 0x00000001, 0x00000000,
+};
diff --git a/src/resources/lavaetc1.dds b/src/resources/lavaetc1.dds
new file mode 100644
index 0000000..9a45188
--- /dev/null
+++ b/src/resources/lavaetc1.dds
Binary files differ
diff --git a/src/resources/mipdxt1.dds b/src/resources/mipdxt1.dds
new file mode 100755
index 0000000..5a5e189
--- /dev/null
+++ b/src/resources/mipdxt1.dds
Binary files differ
diff --git a/src/resources/mipdxt5.dds b/src/resources/mipdxt5.dds
new file mode 100755
index 0000000..fd9a587
--- /dev/null
+++ b/src/resources/mipdxt5.dds
Binary files differ
diff --git a/src/resources/miprgba.dds b/src/resources/miprgba.dds
new file mode 100755
index 0000000..d137763
--- /dev/null
+++ b/src/resources/miprgba.dds
Binary files differ
diff --git a/src/resources/smoke.tga b/src/resources/smoke.tga
new file mode 100644
index 0000000..06a0705
--- /dev/null
+++ b/src/resources/smoke.tga
Binary files differ
diff --git a/src/resources/test_image-dxt1a.dds b/src/resources/test_image-dxt1a.dds
new file mode 100644
index 0000000..2a8f1b4
--- /dev/null
+++ b/src/resources/test_image-dxt1a.dds
Binary files differ
diff --git a/src/resources/test_image-dxt1c.dds b/src/resources/test_image-dxt1c.dds
new file mode 100644
index 0000000..552889e
--- /dev/null
+++ b/src/resources/test_image-dxt1c.dds
Binary files differ
diff --git a/src/resources/test_image-dxt3.dds b/src/resources/test_image-dxt3.dds
new file mode 100644
index 0000000..0e26310
--- /dev/null
+++ b/src/resources/test_image-dxt3.dds
Binary files differ
diff --git a/src/resources/wall1_a8.dds b/src/resources/wall1_a8.dds
new file mode 100644
index 0000000..8eaf1f7
--- /dev/null
+++ b/src/resources/wall1_a8.dds
Binary files differ
diff --git a/src/resources/wall1_l8.dds b/src/resources/wall1_l8.dds
new file mode 100644
index 0000000..a00aa2a
--- /dev/null
+++ b/src/resources/wall1_l8.dds
Binary files differ
diff --git a/src/resources/wani21_sr8.h b/src/resources/wani21_sr8.h
new file mode 100644
index 0000000..3076d37
--- /dev/null
+++ b/src/resources/wani21_sr8.h
@@ -0,0 +1,2893 @@
+const unsigned char image_sr8[]={
+ 0xfd,0x00,0x00,0x8f,0xb4,0x00,0x00,0x69,0x41,0x25,0x21,0x41,0x44,0x02,0x25,0x24,
+ 0x21,0x41,0x40,0x21,0x41,0x20,0x25,0x41,0x40,0x02,0x21,0x40,0x02,0x21,0x40,0x21,
+ 0x41,0x40,0x02,0x21,0x44,0x21,0x41,0x44,0x21,0x41,0x40,0x02,0x21,0x20,0x25,0x21,
+ 0x40,0x02,0x25,0x41,0x21,0x41,0x44,0x21,0x41,0x40,0x21,0x41,0x45,0x25,0x21,0x45,
+ 0x21,0x02,0x41,0x02,0x21,0x24,0x25,0x45,0x44,0x21,0x45,0x24,0x02,0x21,0x41,0x21,
+ 0x02,0x41,0x21,0x41,0x45,0x25,0x41,0x45,0x25,0x02,0x45,0x21,0x02,0x45,0x02,0x25,
+ 0x45,0x25,0x02,0x45,0x21,0x41,0x45,0x25,0x45,0x24,0x21,0x02,0x45,0x21,0x03,0x45,
+ 0x21,0x25,0x24,0x25,0x21,0x44,0x02,0x21,0x25,0x21,0x02,0x45,0x02,0x21,0x41,0x21,
+ 0x45,0x44,0x21,0x41,0x44,0x21,0x41,0x40,0x02,0x21,0x41,0x05,0x45,0x25,0x41,0x44,
+ 0x25,0x02,0x21,0x44,0x25,0x45,0x21,0x02,0x45,0x41,0x02,0x45,0x21,0x02,0x45,0x21,
+ 0x05,0x45,0x02,0x41,0x04,0x45,0x21,0x02,0x45,0x21,0x41,0x07,0x45,0x25,0x02,0x45,
+ 0x41,0x25,0x41,0x24,0x21,0x04,0x45,0x25,0x45,0x44,0x25,0x02,0x45,0x44,0x25,0x45,
+ 0x24,0x21,0x05,0x45,0x21,0x25,0x45,0x21,0x41,0x24,0x21,0x41,0x44,0x02,0x25,0x45,
+ 0x02,0x21,0x45,0x44,0x25,0x02,0x45,0x25,0x24,0x21,0x45,0x44,0x02,0x21,0x44,0x21,
+ 0x25,0x45,0x02,0x21,0x25,0x21,0x25,0x41,0x21,0x45,0x44,0x21,0x45,0x40,0x21,0x41,
+ 0x25,0x02,0x45,0x21,0x44,0x02,0x21,0x24,0x02,0x21,0x44,0x02,0x21,0x44,0x21,0x25,
+ 0x45,0x02,0x21,0x44,0x02,0x21,0x44,0x02,0x21,0x44,0x02,0x21,0x24,0x21,0x41,0x24,
+ 0x02,0x21,0x24,0x02,0x21,0x44,0x25,0x21,0x25,0x02,0x21,0x24,0x02,0x25,0x24,0x25,
+ 0x21,0x44,0x02,0x21,0x24,0x02,0x21,0x44,0x02,0x21,0x44,0x41,0x21,0x44,0x02,0x41,
+ 0x25,0x21,0x25,0x45,0x21,0x25,0x44,0x45,0x25,0x44,0x45,0x21,0x44,0x25,0x02,0x45,
+ 0x02,0x41,0x44,0x02,0x41,0x45,0x21,0x25,0x45,0x41,0x02,0x45,0x41,0x02,0x45,0x41,
+ 0x25,0x24,0x21,0x25,0x44,0x02,0x25,0x44,0x41,0x21,0x24,0x21,0x41,0x21,0x02,0x45,
+ 0x21,0x45,0x44,0x21,0x02,0x45,0x21,0x25,0x45,0x21,0x25,0x02,0x21,0x24,0x21,0x41,
+ 0x44,0x02,0x21,0x45,0x02,0x21,0x45,0x21,0x25,0x45,0x04,0x21,0x02,0x25,0x20,0x21,
+ 0x02,0x45,0x21,0x02,0x45,0x21,0x45,0x40,0x21,0x03,0x45,0x02,0x41,0x07,0x45,0x02,
+ 0x41,0x44,0x21,0x24,0x25,0x41,0x24,0x21,0x41,0x25,0x03,0x45,0x44,0x05,0x45,0x21,
+ 0x45,0x02,0x21,0x45,0x21,0x41,0x25,0x21,0x25,0x45,0x41,0x44,0x02,0x45,0x21,0x02,
+ 0x45,0x21,0x45,0x41,0x21,0x45,0x21,0x25,0x45,0x41,0x21,0x45,0x24,0x25,0x02,0x45,
+ 0x25,0x45,0x41,0x25,0x45,0x24,0x21,0x45,0x44,0x02,0x21,0x24,0x45,0x24,0x21,0x25,
+ 0x45,0x40,0x25,0x45,0x40,0x02,0x25,0x40,0x21,0x45,0x44,0x21,0x44,0x02,0x21,0x24,
+ 0x02,0x21,0x44,0x21,0x44,0x45,0x25,0x44,0x25,0x41,0x40,0x21,0x45,0x44,0x02,0x21,
+ 0x41,0x21,0x44,0x20,0x21,0x02,0x41,0x21,0x41,0x40,0x21,0x25,0x45,0x21,0x25,0x45,
+ 0x21,0x41,0x40,0x21,0x44,0x24,0x21,0x41,0x20,0x21,0x25,0x41,0x21,0x41,0x45,0x21,
+ 0x41,0x40,0x02,0x25,0x40,0x21,0x25,0x45,0x21,0x41,0x44,0x25,0x45,0x44,0x21,0x02,
+ 0x41,0x21,0x41,0x40,0x21,0x02,0x41,0x21,0x02,0x45,0x25,0x45,0x24,0x25,0x45,0x44,
+ 0x25,0x05,0x45,0x21,0x02,0x45,0x21,0x41,0x45,0x21,0x02,0x45,0x21,0x02,0x45,0x41,
+ 0x45,0x44,0x21,0x45,0x44,0x21,0x02,0x41,0x02,0x21,0x25,0x24,0x25,0x21,0x44,0x02,
+ 0x21,0x25,0x21,0x02,0x25,0x02,0x21,0x45,0x25,0x21,0x44,0x21,0x45,0x44,0x25,0x21,
+ 0x40,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x25,0x45,0x21,0x45,0x24,0x02,0x21,0x24,
+ 0x21,0x25,0x45,0x21,0x45,0x44,0x02,0x21,0x45,0x21,0x41,0x44,0x21,0x45,0x24,0x02,
+ 0x21,0x45,0x21,0x25,0x40,0x21,0x45,0x44,0x21,0x45,0x44,0x25,0x21,0x44,0x02,0x21,
+ 0x24,0x21,0x02,0x25,0x21,0x02,0x25,0x03,0x45,0x21,0x41,0x44,0x21,0x41,0x40,0x21,
+ 0x41,0x24,0x21,0x41,0x40,0x02,0x21,0x45,0x21,0x45,0x44,0x02,0x21,0x45,0x02,0x21,
+ 0x45,0x02,0x21,0x40,0x02,0x21,0x45,0x21,0x25,0x24,0x25,0x21,0x40,0x21,0x41,0x40,
+ 0x03,0x45,0x21,0x45,0x44,0x02,0x21,0x41,0x02,0x25,0x24,0x21,0x41,0x24,0x02,0x21,
+ 0x44,0x25,0x21,0x44,0x21,0x25,0x41,0x21,0x02,0x45,0x21,0x02,0x41,0x21,0x24,0x41,
+ 0x02,0x45,0x41,0x24,0x02,0x21,0x24,0x02,0x21,0x44,0x02,0x21,0x44,0x25,0x21,0x44,
+ 0x21,0x41,0x44,0x02,0x21,0x44,0x02,0x21,0x24,0x21,0x02,0x25,0x02,0x21,0x44,0x21,
+ 0x02,0x25,0x21,0x25,0x44,0x02,0x21,0x44,0x02,0x21,0x44,0x02,0x21,0x44,0x21,0x25,
+ 0x24,0x02,0x21,0x44,0x02,0x21,0x45,0x21,0x25,0x45,0x02,0x21,0x45,0x02,0x21,0x24,
+ 0x02,0x21,0x44,0x21,0x25,0x24,0x21,0x45,0x44,0x21,0x25,0x44,0x02,0x21,0x45,0x02,
+ 0x21,0x25,0x02,0x21,0x45,0x41,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x45,0x44,0x41,
+ 0x24,0x02,0x21,0x24,0x25,0x45,0x21,0x45,0x44,0x25,0x02,0x45,0x25,0x45,0x44,0x21,
+ 0x45,0x44,0x21,0x41,0x40,0x21,0x02,0x45,0x21,0x25,0x21,0x25,0x24,0x21,0x45,0x24,
+ 0x21,0x02,0x25,0x02,0x21,0x02,0x45,0x21,0x25,0x21,0x02,0x25,0x02,0x21,0x25,0x02,
+ 0x21,0x45,0x24,0x25,0x45,0x41,0x21,0x45,0x41,0x21,0x45,0x25,0x21,0x02,0x45,0x21,
+ 0x45,0x44,0x21,0x25,0x24,0x25,0x03,0x21,0x24,0x40,0x21,0x41,0x24,0x21,0x45,0x44,
+ 0x21,0x02,0x45,0x21,0x45,0x44,0x04,0x21,0x24,0x02,0x21,0x45,0x21,0x25,0x24,0x02,
+ 0x21,0x44,0x02,0x21,0x45,0x24,0x25,0x45,0x41,0x21,0x45,0x25,0x21,0x02,0x45,0x02,
+ 0x25,0x21,0x25,0x24,0x02,0x25,0x24,0x02,0x21,0x44,0x21,0x24,0x41,0x02,0x21,0x24,
+ 0x02,0x21,0x44,0x21,0x25,0x45,0x02,0x21,0x25,0x41,0x02,0x25,0x20,0x21,0x25,0x41,
+ 0x02,0x21,0x24,0x21,0x24,0x02,0x21,0x45,0x21,0x41,0x44,0x21,0x44,0x25,0x41,0x44,
+ 0x21,0x41,0x20,0x21,0x41,0x20,0x21,0x41,0x40,0x21,0x45,0x41,0x21,0x41,0x20,0x21,
+ 0x41,0x40,0x02,0x21,0x41,0x21,0x25,0x41,0x21,0x45,0x41,0x25,0x21,0x41,0x21,0x45,
+ 0x41,0x21,0x02,0x41,0x21,0x02,0x41,0x21,0x02,0x45,0x21,0x02,0x41,0x21,0x45,0x44,
+ 0x03,0x25,0x21,0x45,0x41,0x04,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x44,0x21,0x25,
+ 0x21,0x41,0x21,0x45,0x44,0x21,0x41,0x44,0x21,0x41,0x40,0x02,0x21,0x41,0x21,0x25,
+ 0x45,0x02,0x21,0x02,0x25,0x02,0x21,0x44,0x25,0x02,0x21,0x45,0x25,0x45,0x21,0x41,
+ 0x24,0x21,0x45,0x44,0x02,0x21,0x24,0x25,0x21,0x24,0x25,0x21,0x24,0x21,0x41,0x44,
+ 0x21,0x41,0x44,0x41,0x45,0x44,0x21,0x45,0x44,0x21,0x02,0x41,0x21,0x41,0x24,0x21,
+ 0x41,0x40,0x21,0x41,0x45,0x21,0x41,0x24,0x25,0x02,0x45,0x21,0x02,0x45,0x21,0x25,
+ 0x45,0x21,0x41,0x24,0x21,0x41,0x44,0x02,0x25,0x45,0x02,0x21,0x45,0x44,0x25,0x02,
+ 0x45,0x25,0x24,0x21,0x45,0x44,0x02,0x21,0x44,0x21,0x25,0x45,0x02,0x21,0x25,0x21,
+ 0x25,0x41,0x21,0x45,0x44,0x21,0x45,0x40,0x21,0x41,0x40,0x21,0x45,0x44,0x21,0x02,
+ 0x45,0x21,0x02,0x45,0x21,0x25,0x45,0x02,0x21,0x45,0x21,0x02,0x45,0x02,0x25,0x45,
+ 0x21,0x02,0x45,0x25,0x03,0x21,0x41,0x21,0x25,0x45,0x21,0x02,0x25,0x41,0x02,0x25,
+ 0x41,0x21,0x45,0x24,0x21,0x41,0x45,0x02,0x21,0x44,0x02,0x21,0x25,0x04,0x21,0x41,
+ 0x20,0x21,0x41,0x20,0x03,0x21,0x45,0x44,0x21,0x24,0x02,0x21,0x44,0x02,0x21,0x24,
+ 0x21,0x25,0x24,0x21,0x41,0x44,0x21,0x45,0x25,0x02,0x21,0x24,0x02,0x21,0x24,0x02,
+ 0x21,0x44,0x21,0x25,0x45,0x02,0x21,0x44,0x02,0x21,0x44,0x02,0x21,0x45,0x02,0x21,
+ 0x25,0x02,0x21,0x24,0x21,0x02,0x25,0x02,0x21,0x24,0x21,0x41,0x44,0x21,0x41,0x44,
+ 0x21,0x25,0x02,0x21,0x25,0x41,0x21,0x25,0x41,0x45,0x21,0x25,0x02,0x21,0x24,0x21,
+ 0x41,0x44,0x02,0x21,0x45,0x02,0x21,0x45,0x21,0x25,0x45,0x21,0x44,0x21,0x02,0x41,
+ 0x21,0x41,0x25,0x45,0x41,0x45,0x21,0x45,0x44,0x25,0x45,0x20,0x25,0x45,0x44,0x21,
+ 0x02,0x45,0x21,0x41,0x45,0x21,0x45,0x44,0x21,0x45,0x44,0x21,0x41,0x40,0x21,0x45,
+ 0x44,0x41,0x24,0x02,0x21,0x24,0x02,0x25,0x45,0x02,0x21,0x44,0x45,0x21,0x45,0x41,
+ 0x21,0x45,0x02,0x21,0x24,0x03,0x25,0x21,0x25,0x45,0x41,0x21,0x45,0x24,0x25,0x02,
+ 0x45,0x25,0x45,0x41,0x25,0x45,0x24,0x21,0x45,0x44,0x02,0x21,0x24,0x45,0x24,0x21,
+ 0x25,0x45,0x40,0x25,0x45,0x40,0x02,0x25,0x40,0x21,0x45,0x44,0x21,0x44,0x02,0x21,
+ 0x24,0x02,0x21,0x44,0x02,0x21,0x24,0x02,0x21,0x24,0x41,0x21,0x25,0x02,0x21,0x25,
+ 0x02,0x21,0x25,0x03,0x45,0x02,0x21,0x44,0x02,0x25,0x44,0x02,0x21,0x44,0x21,0x02,
+ 0x45,0x41,0x21,0x45,0x21,0x25,0x02,0x45,0x21,0x45,0x41,0x45,0x44,0x21,0x25,0x45,
+ 0x21,0x25,0x45,0x21,0x49,0x48,0x21,0x41,0x44,0x21,0x45,0x44,0x21,0x41,0x24,0x02,
+ 0x21,0x44,0x21,0x44,0x21,0x02,0x45,0x21,0x45,0x41,0x21,0x41,0x20,0x02,0x25,0x21,
+ 0x02,0x25,0x02,0x21,0x25,0x41,0x21,0x25,0x02,0x21,0x25,0x41,0x21,0x25,0x41,0x45,
+ 0x25,0x41,0x21,0x45,0x41,0x21,0x25,0x21,0x02,0x25,0x20,0x25,0x45,0x41,0x21,0x25,
+ 0x41,0x21,0x25,0x21,0x25,0x45,0x41,0x21,0x45,0x24,0x21,0x45,0x41,0x21,0x45,0x02,
+ 0x21,0x44,0x25,0x21,0x24,0x21,0x25,0x21,0x44,0x21,0x45,0x44,0x25,0x21,0x40,0x21,
+ 0x41,0x40,0x21,0x41,0x40,0x21,0x25,0x41,0x24,0x02,0x21,0x24,0x02,0x25,0x21,0x41,
+ 0x44,0x25,0x02,0x21,0x44,0x25,0x45,0x24,0x21,0x41,0x24,0x21,0x02,0x45,0x21,0x25,
+ 0x24,0x21,0x41,0x44,0x21,0x41,0x45,0x21,0x25,0x29,0x21,0x41,0x44,0x21,0x25,0x02,
+ 0x21,0x45,0x24,0x21,0x45,0x24,0x02,0x21,0x41,0x21,0x41,0x44,0x21,0x41,0x24,0x25,
+ 0x21,0x20,0x02,0x21,0x44,0x25,0x21,0x40,0x02,0x21,0x45,0x21,0x25,0x24,0x25,0x21,
+ 0x40,0x21,0x41,0x40,0x03,0x45,0x21,0x45,0x44,0x02,0x21,0x41,0x02,0x25,0x24,0x21,
+ 0x41,0x24,0x02,0x21,0x44,0x25,0x21,0x44,0x21,0x25,0x41,0x21,0x02,0x45,0x21,0x02,
+ 0x41,0x21,0x24,0x25,0x02,0x21,0x41,0x21,0x25,0x45,0x21,0x25,0x45,0x21,0x25,0x44,
+ 0x25,0x21,0x41,0x02,0x21,0x45,0x02,0x21,0x45,0x21,0x25,0x02,0x45,0x21,0x44,0x21,
+ 0x45,0x44,0x21,0x41,0x44,0x25,0x21,0x02,0x44,0x02,0x21,0x45,0x02,0x21,0x45,0x21,
+ 0x25,0x45,0x03,0x21,0x45,0x02,0x21,0x25,0x02,0x21,0x45,0x02,0x21,0x45,0x02,0x21,
+ 0x25,0x02,0x45,0x02,0x41,0x44,0x02,0x21,0x44,0x02,0x21,0x44,0x21,0x25,0x45,0x21,
+ 0x45,0x24,0x02,0x21,0x44,0x02,0x21,0x44,0x25,0x21,0x24,0x21,0x41,0x24,0x02,0x21,
+ 0x45,0x21,0x41,0x24,0x21,0x02,0x45,0x02,0x21,0x24,0x21,0x41,0x44,0x21,0x25,0x45,
+ 0x21,0x25,0x24,0x02,0x25,0x44,0x21,0x45,0x24,0x21,0x45,0x44,0x21,0x41,0x02,0x21,
+ 0x25,0x03,0x21,0x02,0x45,0x21,0x25,0x21,0x25,0x24,0x21,0x45,0x24,0x21,0x02,0x25,
+ 0x02,0x21,0x44,0x25,0x02,0x21,0x45,0x24,0x03,0x21,0x02,0x25,0x20,0x21,0x02,0x45,
+ 0x21,0x02,0x45,0x21,0x45,0x40,0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x45,0x40,0x25,
+ 0x45,0x40,0x25,0x45,0x41,0x25,0x02,0x45,0x25,0x45,0x41,0x25,0x45,0x21,0x45,0x24,
+ 0x21,0x25,0x45,0x02,0x21,0x44,0x02,0x21,0x44,0x45,0x25,0x44,0x02,0x21,0x45,0x41,
+ 0x21,0x02,0x45,0x02,0x25,0x21,0x25,0x24,0x02,0x25,0x24,0x02,0x21,0x44,0x21,0x24,
+ 0x41,0x02,0x21,0x24,0x02,0x21,0x44,0x21,0x25,0x45,0x02,0x21,0x25,0x41,0x02,0x25,
+ 0x20,0x21,0x25,0x41,0x02,0x21,0x24,0x21,0x24,0x02,0x21,0x45,0x21,0x41,0x44,0x21,
+ 0x25,0x24,0x45,0x41,0x21,0x45,0x21,0x25,0x02,0x45,0x21,0x45,0x40,0x24,0x45,0x20,
+ 0x24,0x40,0x21,0x41,0x40,0x21,0x25,0x45,0x02,0x21,0x41,0x21,0x25,0x45,0x21,0x45,
+ 0x44,0x25,0x02,0x45,0x40,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x25,0x45,0x02,0x21,
+ 0x41,0x02,0x21,0x41,0x24,0x21,0x45,0x24,0x21,0x45,0x44,0x02,0x21,0x25,0x21,0x44,
+ 0x21,0x41,0x45,0x21,0x44,0x25,0x21,0x44,0x24,0x21,0x45,0x41,0x21,0x25,0x02,0x21,
+ 0x45,0x41,0x21,0x24,0x02,0x21,0x25,0x02,0x21,0x45,0x25,0x21,0x25,0x21,0x02,0x25,
+ 0x02,0x21,0x25,0x02,0x21,0x24,0x02,0x21,0x25,0x21,0x25,0x45,0x41,0x21,0x45,0x41,
+ 0x21,0x25,0x02,0x21,0x25,0x21,0x02,0x25,0x21,0x02,0x25,0x02,0x41,0x24,0x21,0x45,
+ 0x41,0x44,0x21,0x41,0x44,0x41,0x45,0x44,0x21,0x45,0x44,0x21,0x02,0x41,0x21,0x41,
+ 0x21,0x45,0x02,0x21,0x45,0x21,0x45,0x24,0x02,0x21,0x24,0x21,0x25,0x45,0x21,0x45,
+ 0x44,0x02,0x21,0x45,0x21,0x41,0x44,0x21,0x45,0x24,0x02,0x21,0x45,0x21,0x25,0x45,
+ 0x02,0x21,0x44,0x25,0x45,0x44,0x21,0x41,0x44,0x25,0x41,0x44,0x21,0x25,0x21,0x25,
+ 0x21,0x20,0x21,0x41,0x40,0x25,0x45,0x41,0x21,0x41,0x45,0x21,0x02,0x45,0x21,0x02,
+ 0x45,0x21,0x02,0x45,0x02,0x25,0x45,0x21,0x02,0x45,0x25,0x03,0x21,0x41,0x21,0x25,
+ 0x45,0x21,0x02,0x25,0x41,0x02,0x25,0x41,0x21,0x45,0x24,0x21,0x41,0x45,0x02,0x21,
+ 0x44,0x02,0x21,0x25,0x04,0x21,0x41,0x20,0x21,0x41,0x20,0x03,0x21,0x44,0x21,0x45,
+ 0x44,0x21,0x41,0x44,0x21,0x25,0x45,0x25,0x41,0x40,0x21,0x45,0x21,0x02,0x25,0x02,
+ 0x21,0x44,0x02,0x21,0x45,0x20,0x25,0x45,0x21,0x41,0x24,0x21,0x45,0x44,0x02,0x21,
+ 0x45,0x24,0x21,0x02,0x25,0x02,0x21,0x44,0x02,0x21,0x45,0x20,0x25,0x45,0x25,0x02,
+ 0x21,0x25,0x02,0x21,0x24,0x03,0x25,0x02,0x21,0x24,0x02,0x45,0x41,0x45,0x44,0x02,
+ 0x21,0x44,0x02,0x21,0x25,0x02,0x21,0x45,0x02,0x21,0x41,0x02,0x21,0x24,0x25,0x41,
+ 0x24,0x21,0x45,0x25,0x02,0x21,0x44,0x21,0x02,0x25,0x21,0x41,0x44,0x21,0x41,0x44,
+ 0x21,0x41,0x24,0x25,0x41,0x24,0x25,0x45,0x24,0x21,0x25,0x45,0x21,0x41,0x44,0x25,
+ 0x41,0x45,0x02,0x21,0x41,0x21,0x41,0x02,0x21,0x02,0x45,0x44,0x21,0x41,0x40,0x21,
+ 0x45,0x44,0x41,0x24,0x02,0x21,0x24,0x02,0x25,0x44,0x45,0x41,0x21,0x02,0x45,0x21,
+ 0x25,0x21,0x02,0x25,0x02,0x21,0x25,0x02,0x21,0x45,0x24,0x25,0x45,0x41,0x21,0x45,
+ 0x41,0x21,0x45,0x25,0x21,0x02,0x45,0x21,0x45,0x41,0x25,0x02,0x45,0x25,0x45,0x41,
+ 0x21,0x44,0x45,0x21,0x02,0x45,0x21,0x44,0x21,0x41,0x25,0x21,0x20,0x44,0x21,0x45,
+ 0x44,0x21,0x02,0x45,0x02,0x21,0x45,0x02,0x21,0x24,0x21,0x02,0x25,0x02,0x21,0x44,
+ 0x02,0x25,0x44,0x02,0x21,0x44,0x21,0x02,0x45,0x41,0x21,0x45,0x21,0x25,0x02,0x45,
+ 0x21,0x45,0x41,0x45,0x44,0x21,0x25,0x45,0x21,0x25,0x45,0x21,0x49,0x48,0x21,0x41,
+ 0x44,0x21,0x45,0x44,0x21,0x41,0x24,0x02,0x21,0x44,0x21,0x02,0x41,0x25,0x02,0x41,
+ 0x45,0x02,0x21,0x45,0x21,0x02,0x25,0x41,0x21,0x25,0x21,0x25,0x45,0x44,0x02,0x25,
+ 0x24,0x25,0x45,0x40,0x25,0x45,0x25,0x45,0x21,0x40,0x21,0x45,0x44,0x21,0x45,0x44,
+ 0x21,0x02,0x41,0x21,0x02,0x41,0x21,0x02,0x45,0x21,0x45,0x44,0x25,0x45,0x21,0x24,
+ 0x25,0x41,0x24,0x21,0x41,0x44,0x25,0x21,0x40,0x21,0x45,0x21,0x41,0x44,0x21,0x44,
+ 0x02,0x21,0x44,0x02,0x21,0x24,0x03,0x25,0x21,0x41,0x24,0x02,0x21,0x45,0x02,0x21,
+ 0x45,0x21,0x41,0x25,0x21,0x02,0x25,0x21,0x25,0x45,0x02,0x21,0x45,0x02,0x21,0x25,
+ 0x21,0x02,0x25,0x02,0x21,0x24,0x02,0x21,0x25,0x02,0x21,0x45,0x41,0x21,0x25,0x02,
+ 0x21,0x25,0x02,0x21,0x44,0x25,0x41,0x40,0x45,0x21,0x25,0x29,0x21,0x41,0x44,0x21,
+ 0x25,0x02,0x21,0x45,0x24,0x21,0x45,0x24,0x45,0x21,0x45,0x24,0x21,0x41,0x40,0x21,
+ 0x41,0x45,0x21,0x41,0x24,0x25,0x02,0x45,0x21,0x02,0x45,0x21,0x25,0x45,0x21,0x41,
+ 0x24,0x21,0x41,0x44,0x02,0x25,0x45,0x21,0x41,0x45,0x21,0x41,0x44,0x25,0x41,0x44,
+ 0x21,0x02,0x45,0x21,0x45,0x49,0x25,0x02,0x45,0x20,0x21,0x02,0x45,0x41,0x40,0x21,
+ 0x41,0x40,0x21,0x45,0x20,0x25,0x41,0x40,0x25,0x21,0x41,0x02,0x21,0x45,0x02,0x21,
+ 0x45,0x21,0x25,0x02,0x45,0x21,0x44,0x21,0x45,0x44,0x21,0x41,0x44,0x25,0x21,0x02,
+ 0x44,0x02,0x21,0x45,0x02,0x21,0x45,0x21,0x25,0x45,0x03,0x21,0x45,0x02,0x21,0x25,
+ 0x02,0x21,0x45,0x02,0x21,0x45,0x02,0x21,0x25,0x21,0x25,0x02,0x21,0x24,0x25,0x45,
+ 0x44,0x25,0x21,0x44,0x02,0x25,0x44,0x21,0x45,0x44,0x02,0x21,0x44,0x02,0x21,0x24,
+ 0x21,0x41,0x02,0x24,0x02,0x21,0x44,0x21,0x25,0x24,0x25,0x03,0x21,0x24,0x02,0x25,
+ 0x44,0x21,0x02,0x25,0x02,0x21,0x44,0x25,0x45,0x24,0x21,0x25,0x21,0x44,0x02,0x21,
+ 0x24,0x21,0x02,0x25,0x21,0x02,0x25,0x41,0x03,0x45,0x20,0x02,0x21,0x20,0x21,0x41,
+ 0x40,0x21,0x41,0x45,0x02,0x21,0x24,0x21,0x41,0x44,0x21,0x41,0x40,0x21,0x41,0x24,
+ 0x21,0x41,0x40,0x02,0x21,0x41,0x21,0x25,0x45,0x21,0x41,0x24,0x21,0x41,0x24,0x21,
+ 0x45,0x44,0x02,0x25,0x45,0x21,0x45,0x24,0x21,0x41,0x44,0x02,0x21,0x45,0x25,0x45,
+ 0x44,0x21,0x41,0x45,0x40,0x25,0x45,0x41,0x25,0x02,0x45,0x25,0x45,0x41,0x25,0x45,
+ 0x21,0x45,0x24,0x02,0x21,0x25,0x45,0x02,0x21,0x44,0x45,0x21,0x45,0x41,0x21,0x45,
+ 0x02,0x21,0x24,0x03,0x25,0x21,0x25,0x45,0x41,0x21,0x45,0x24,0x25,0x02,0x45,0x25,
+ 0x45,0x41,0x25,0x45,0x41,0x25,0x45,0x41,0x21,0x45,0x25,0x21,0x45,0x41,0x25,0x45,
+ 0x41,0x25,0x45,0x44,0x21,0x41,0x24,0x02,0x21,0x44,0x21,0x24,0x21,0x41,0x44,0x21,
+ 0x25,0x45,0x44,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x25,0x45,0x02,
+ 0x21,0x41,0x21,0x25,0x45,0x21,0x45,0x44,0x25,0x02,0x45,0x40,0x21,0x41,0x40,0x21,
+ 0x41,0x40,0x21,0x25,0x45,0x02,0x21,0x41,0x02,0x21,0x41,0x24,0x21,0x45,0x24,0x21,
+ 0x45,0x44,0x02,0x21,0x25,0x21,0x41,0x44,0x21,0x45,0x25,0x45,0x21,0x25,0x24,0x25,
+ 0x21,0x44,0x02,0x21,0x45,0x02,0x21,0x25,0x41,0x21,0x02,0x45,0x21,0x25,0x02,0x41,
+ 0x21,0x25,0x45,0x21,0x45,0x44,0x25,0x02,0x45,0x25,0x24,0x21,0x45,0x24,0x02,0x25,
+ 0x20,0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x45,0x41,0x40,0x21,0x41,0x24,0x21,0x45,
+ 0x44,0x21,0x02,0x45,0x21,0x45,0x21,0x02,0x45,0x21,0x45,0x02,0x21,0x45,0x02,0x21,
+ 0x24,0x02,0x21,0x24,0x25,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x45,0x21,0x25,0x24,
+ 0x02,0x21,0x44,0x02,0x21,0x25,0x21,0x41,0x25,0x21,0x02,0x25,0x02,0x21,0x25,0x21,
+ 0x02,0x25,0x21,0x25,0x45,0x02,0x21,0x44,0x21,0x02,0x25,0x02,0x21,0x24,0x02,0x21,
+ 0x25,0x02,0x21,0x40,0x44,0x25,0x45,0x44,0x21,0x41,0x44,0x25,0x41,0x44,0x21,0x25,
+ 0x21,0x02,0x25,0x21,0x40,0x02,0x21,0x41,0x21,0x41,0x44,0x21,0x41,0x24,0x25,0x21,
+ 0x20,0x02,0x21,0x44,0x25,0x21,0x40,0x02,0x21,0x45,0x21,0x25,0x24,0x25,0x21,0x40,
+ 0x21,0x41,0x40,0x25,0x02,0x45,0x21,0x41,0x40,0x21,0x41,0x44,0x25,0x45,0x44,0x21,
+ 0x41,0x24,0x41,0x21,0x45,0x41,0x21,0x45,0x02,0x25,0x45,0x41,0x21,0x45,0x02,0x41,
+ 0x25,0x02,0x41,0x45,0x03,0x21,0x44,0x02,0x25,0x02,0x21,0x44,0x02,0x21,0x45,0x20,
+ 0x25,0x45,0x21,0x41,0x24,0x21,0x45,0x44,0x02,0x21,0x45,0x24,0x21,0x02,0x25,0x02,
+ 0x21,0x44,0x02,0x21,0x45,0x20,0x25,0x45,0x25,0x02,0x21,0x25,0x02,0x21,0x24,0x03,
+ 0x25,0x02,0x21,0x24,0x02,0x21,0x24,0x21,0x25,0x44,0x02,0x21,0x45,0x03,0x21,0x02,
+ 0x45,0x21,0x25,0x45,0x21,0x41,0x24,0x21,0x41,0x24,0x21,0x41,0x25,0x45,0x21,0x41,
+ 0x24,0x21,0x45,0x44,0x02,0x21,0x24,0x45,0x24,0x02,0x21,0x24,0x21,0x25,0x45,0x21,
+ 0x45,0x44,0x02,0x21,0x45,0x03,0x21,0x44,0x02,0x21,0x44,0x21,0x25,0x45,0x02,0x21,
+ 0x25,0x45,0x44,0x21,0x45,0x40,0x21,0x41,0x20,0x21,0x41,0x44,0x25,0x21,0x40,0x21,
+ 0x02,0x25,0x21,0x45,0x44,0x21,0x45,0x40,0x21,0x41,0x40,0x21,0x45,0x44,0x02,0x21,
+ 0x40,0x02,0x21,0x20,0x25,0x45,0x24,0x21,0x45,0x24,0x21,0x02,0x45,0x21,0x45,0x44,
+ 0x02,0x21,0x41,0x02,0x21,0x41,0x21,0x02,0x45,0x21,0x41,0x45,0x25,0x02,0x45,0x21,
+ 0x44,0x21,0x41,0x21,0x44,0x45,0x21,0x02,0x45,0x21,0x44,0x21,0x41,0x45,0x21,0x41,
+ 0x25,0x45,0x02,0x21,0x44,0x02,0x21,0x44,0x45,0x25,0x44,0x02,0x21,0x45,0x41,0x21,
+ 0x02,0x45,0x02,0x25,0x21,0x25,0x24,0x02,0x25,0x24,0x02,0x21,0x44,0x02,0x21,0x44,
+ 0x02,0x21,0x45,0x21,0x41,0x44,0x21,0x25,0x45,0x21,0x25,0x45,0x41,0x21,0x25,0x24,
+ 0x02,0x21,0x44,0x21,0x41,0x44,0x02,0x21,0x44,0x02,0x21,0x25,0x02,0x21,0x24,0x25,
+ 0x45,0x21,0x41,0x21,0x45,0x44,0x02,0x25,0x24,0x25,0x45,0x40,0x25,0x45,0x25,0x45,
+ 0x21,0x40,0x21,0x45,0x44,0x21,0x45,0x44,0x21,0x02,0x41,0x21,0x02,0x41,0x21,0x02,
+ 0x45,0x21,0x45,0x44,0x25,0x45,0x21,0x24,0x25,0x41,0x24,0x21,0x41,0x44,0x25,0x21,
+ 0x40,0x02,0x21,0x41,0x21,0x45,0x44,0x21,0x41,0x44,0x21,0x41,0x40,0x02,0x21,0x41,
+ 0x21,0x25,0x45,0x25,0x21,0x25,0x45,0x20,0x02,0x25,0x24,0x21,0x45,0x24,0x21,0x02,
+ 0x45,0x21,0x45,0x44,0x02,0x21,0x41,0x02,0x25,0x02,0x21,0x25,0x02,0x21,0x45,0x24,
+ 0x25,0x45,0x41,0x21,0x45,0x25,0x24,0x25,0x45,0x40,0x25,0x45,0x40,0x02,0x25,0x40,
+ 0x21,0x45,0x21,0x45,0x44,0x21,0x44,0x21,0x25,0x24,0x02,0x21,0x24,0x02,0x21,0x44,
+ 0x02,0x21,0x44,0x02,0x21,0x24,0x02,0x21,0x44,0x02,0x21,0x24,0x02,0x21,0x24,0x25,
+ 0x21,0x24,0x21,0x41,0x44,0x21,0x25,0x24,0x21,0x25,0x45,0x02,0x21,0x24,0x02,0x21,
+ 0x44,0x21,0x02,0x25,0x02,0x21,0x25,0x21,0x25,0x44,0x02,0x21,0x44,0x25,0x02,0x41,
+ 0x21,0x24,0x25,0x44,0x21,0x02,0x45,0x21,0x45,0x49,0x25,0x45,0x41,0x21,0x45,0x21,
+ 0x20,0x21,0x41,0x40,0x25,0x45,0x41,0x21,0x41,0x45,0x21,0x02,0x45,0x21,0x02,0x45,
+ 0x21,0x02,0x45,0x02,0x25,0x45,0x21,0x02,0x45,0x25,0x21,0x41,0x45,0x25,0x41,0x21,
+ 0x02,0x41,0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x41,0x45,0x21,0x25,0x45,0x02,0x21,
+ 0x25,0x02,0x21,0x45,0x41,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,0x21,0x25,0x45,
+ 0x02,0x21,0x25,0x44,0x02,0x21,0x44,0x02,0x21,0x24,0x21,0x41,0x02,0x24,0x02,0x21,
+ 0x44,0x21,0x25,0x24,0x25,0x03,0x21,0x24,0x02,0x25,0x44,0x21,0x02,0x25,0x02,0x21,
+ 0x44,0x25,0x45,0x24,0x21,0x25,0x21,0x44,0x02,0x21,0x24,0x21,0x02,0x25,0x21,0x02,
+ 0x25,0x02,0x21,0x24,0x21,0x41,0x44,0x02,0x21,0x45,0x02,0x21,0x45,0x21,0x25,0x45,
+ 0x03,0x21,0x41,0x44,0x21,0x45,0x44,0x02,0x25,0x24,0x21,0x25,0x45,0x02,0x21,0x24,
+ 0x02,0x21,0x44,0x21,0x25,0x45,0x21,0x41,0x24,0x25,0x02,0x45,0x21,0x02,0x45,0x21,
+ 0x25,0x45,0x03,0x21,0x24,0x21,0x41,0x24,0x02,0x21,0x44,0x25,0x21,0x44,0x45,0x28,
+ 0x02,0x25,0x20,0x02,0x25,0x41,0x21,0x45,0x40,0x21,0x02,0x41,0x21,0x25,0x41,0x21,
+ 0x02,0x45,0x21,0x02,0x41,0x21,0x24,0x25,0x21,0x25,0x20,0x21,0x02,0x45,0x21,0x41,
+ 0x20,0x21,0x02,0x45,0x21,0x25,0x02,0x41,0x25,0x41,0x02,0x25,0x41,0x02,0x25,0x41,
+ 0x21,0x02,0x45,0x21,0x02,0x41,0x25,0x41,0x40,0x21,0x45,0x40,0x41,0x44,0x21,0x25,
+ 0x24,0x21,0x45,0x25,0x45,0x41,0x25,0x45,0x41,0x45,0x24,0x25,0x21,0x20,0x44,0x21,
+ 0x45,0x44,0x21,0x02,0x45,0x02,0x21,0x45,0x02,0x21,0x24,0x21,0x02,0x25,0x02,0x21,
+ 0x44,0x02,0x25,0x44,0x02,0x21,0x44,0x21,0x25,0x45,0x02,0x41,0x24,0x41,0x45,0x44,
+ 0x21,0x25,0x45,0x41,0x45,0x44,0x21,0x25,0x45,0x44,0x21,0x41,0x40,0x02,0x21,0x41,
+ 0x21,0x25,0x45,0x21,0x25,0x45,0x21,0x25,0x44,0x25,0x21,0x40,0x21,0x45,0x21,0x02,
+ 0x41,0x25,0x41,0x21,0x02,0x45,0x21,0x25,0x02,0x41,0x21,0x25,0x45,0x21,0x45,0x44,
+ 0x25,0x02,0x45,0x25,0x24,0x21,0x45,0x24,0x02,0x25,0x20,0x21,0x02,0x45,0x21,0x02,
+ 0x45,0x21,0x45,0x41,0x40,0x21,0x41,0x24,0x21,0x45,0x44,0x21,0x02,0x45,0x21,0x45,
+ 0x44,0x25,0x21,0x40,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x25,0x45,0x02,0x21,0x41,
+ 0x24,0x02,0x21,0x25,0x21,0x25,0x02,0x45,0x21,0x25,0x02,0x41,0x25,0x41,0x02,0x25,
+ 0x41,0x02,0x25,0x41,0x21,0x45,0x02,0x21,0x24,0x41,0x21,0x25,0x02,0x21,0x25,0x02,
+ 0x21,0x25,0x02,0x45,0x21,0x25,0x41,0x02,0x25,0x20,0x21,0x25,0x41,0x21,0x45,0x25,
+ 0x02,0x45,0x21,0x40,0x21,0x25,0x24,0x02,0x21,0x40,0x02,0x21,0x40,0x02,0x21,0x24,
+ 0x02,0x21,0x45,0x21,0x41,0x44,0x21,0x25,0x24,0x21,0x02,0x45,0x21,0x25,0x44,0x21,
+ 0x25,0x24,0x02,0x21,0x45,0x02,0x21,0x44,0x25,0x21,0x45,0x21,0x25,0x24,0x21,0x41,
+ 0x44,0x02,0x21,0x44,0x25,0x21,0x44,0x02,0x21,0x45,0x21,0x41,0x20,0x04,0x21,0x25,
+ 0x20,0x02,0x25,0x20,0x21,0x25,0x45,0x21,0x45,0x20,0x21,0x02,0x45,0x41,0x40,0x21,
+ 0x41,0x40,0x21,0x45,0x20,0x25,0x41,0x40,0x25,0x21,0x41,0x02,0x21,0x45,0x02,0x21,
+ 0x45,0x21,0x25,0x45,0x02,0x21,0x24,0x02,0x21,0x44,0x21,0x25,0x24,0x25,0x21,0x02,
+ 0x44,0x02,0x21,0x45,0x41,0x44,0x02,0x21,0x45,0x02,0x21,0x45,0x21,0x25,0x45,0x02,
+ 0x21,0x24,0x02,0x21,0x44,0x21,0x25,0x24,0x25,0x21,0x44,0x02,0x21,0x25,0x24,0x21,
+ 0x41,0x24,0x21,0x41,0x24,0x21,0x41,0x25,0x45,0x21,0x41,0x24,0x21,0x45,0x44,0x02,
+ 0x21,0x24,0x45,0x24,0x02,0x21,0x24,0x21,0x25,0x45,0x21,0x45,0x44,0x02,0x21,0x45,
+ 0x03,0x21,0x44,0x02,0x21,0x44,0x21,0x25,0x45,0x02,0x21,0x25,0x21,0x25,0x24,0x21,
+ 0x45,0x24,0x21,0x02,0x25,0x02,0x21,0x44,0x02,0x21,0x45,0x20,0x02,0x25,0x21,0x25,
+ 0x44,0x04,0x21,0x45,0x02,0x21,0x44,0x25,0x21,0x45,0x21,0x25,0x24,0x21,0x41,0x40,
+ 0x02,0x21,0x41,0x21,0x25,0x45,0x21,0x25,0x45,0x21,0x25,0x44,0x25,0x21,0x41,0x24,
+ 0x21,0x41,0x45,0x02,0x21,0x44,0x02,0x21,0x45,0x41,0x44,0x21,0x45,0x20,0x21,0x45,
+ 0x20,0x25,0x45,0x20,0x21,0x41,0x20,0x02,0x25,0x02,0x21,0x41,0x20,0x21,0x41,0x20,
+ 0x04,0x21,0x25,0x20,0x02,0x25,0x20,0x21,0x25,0x45,0x21,0x45,0x20,0x21,0x02,0x45,
+ 0x21,0x02,0x41,0x21,0x02,0x45,0x21,0x45,0x41,0x21,0x45,0x21,0x25,0x02,0x45,0x21,
+ 0x45,0x40,0x21,0x45,0x40,0x25,0x44,0x21,0x41,0x45,0x02,0x21,0x44,0x02,0x21,0x44,
+ 0x21,0x41,0x44,0x21,0x41,0x24,0x02,0x21,0x44,0x21,0x24,0x21,0x41,0x44,0x21,0x25,
+ 0x45,0x44,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x25,0x45,0x02,0x21,
+ 0x41,0x21,0x25,0x45,0x21,0x45,0x44,0x25,0x02,0x45,0x40,0x21,0x41,0x40,0x21,0x41,
+ 0x40,0x21,0x25,0x45,0x41,0x40,0x21,0x25,0x45,0x02,0x21,0x41,0x21,0x25,0x45,0x21,
+ 0x45,0x44,0x25,0x02,0x45,0x25,0x45,0x44,0x20,0x02,0x25,0x21,0x25,0x45,0x20,0x02,
+ 0x25,0x24,0x21,0x45,0x24,0x21,0x02,0x45,0x21,0x45,0x44,0x02,0x21,0x41,0x02,0x25,
+ 0x02,0x21,0x25,0x02,0x21,0x45,0x24,0x25,0x45,0x41,0x21,0x45,0x25,0x24,0x25,0x45,
+ 0x40,0x25,0x45,0x40,0x02,0x25,0x40,0x21,0x45,0x44,0x21,0x45,0x44,0x21,0x02,0x41,
+ 0x21,0x02,0x41,0x21,0x02,0x45,0x21,0x45,0x44,0x21,0x02,0x41,0x25,0x41,0x02,0x45,
+ 0x20,0x21,0x02,0x45,0x21,0x02,0x41,0x21,0x02,0x45,0x21,0x45,0x41,0x21,0x02,0x45,
+ 0x41,0x21,0x45,0x21,0x25,0x02,0x45,0x21,0x45,0x40,0x24,0x45,0x20,0x02,0x25,0x41,
+ 0x21,0x25,0x41,0x21,0x45,0x41,0x21,0x04,0x45,0x21,0x24,0x02,0x21,0x44,0x02,0x21,
+ 0x44,0x02,0x21,0x44,0x21,0x45,0x44,0x21,0x41,0x24,0x02,0x21,0x44,0x21,0x41,0x45,
+ 0x02,0x21,0x44,0x02,0x21,0x44,0x21,0x41,0x44,0x21,0x41,0x24,0x02,0x21,0x44,0x21,
+ 0x25,0x44,0x02,0x21,0x44,0x21,0x45,0x44,0x21,0x41,0x44,0x21,0x25,0x45,0x25,0x41,
+ 0x40,0x21,0x41,0x44,0x21,0x25,0x02,0x41,0x25,0x02,0x21,0x25,0x02,0x21,0x45,0x41,
+ 0x21,0x45,0x41,0x21,0x45,0x02,0x25,0x45,0x41,0x21,0x45,0x02,0x41,0x25,0x02,0x41,
+ 0x45,0x03,0x21,0x44,0x02,0x25,0x02,0x21,0x44,0x02,0x21,0x45,0x20,0x25,0x45,0x21,
+ 0x41,0x24,0x21,0x45,0x44,0x02,0x21,0x45,0x24,0x21,0x02,0x25,0x02,0x21,0x44,0x02,
+ 0x21,0x45,0x20,0x25,0x45,0x25,0x21,0x20,0x25,0x45,0x21,0x41,0x24,0x21,0x45,0x44,
+ 0x02,0x21,0x24,0x25,0x21,0x02,0x45,0x21,0x41,0x44,0x21,0x45,0x44,0x02,0x25,0x24,
+ 0x21,0x25,0x45,0x02,0x21,0x24,0x02,0x21,0x44,0x21,0x25,0x45,0x21,0x41,0x24,0x25,
+ 0x02,0x45,0x21,0x02,0x45,0x21,0x25,0x45,0x03,0x21,0x24,0x21,0x41,0x24,0x02,0x21,
+ 0x44,0x25,0x21,0x44,0x21,0x41,0x24,0x02,0x21,0x24,0x02,0x25,0x44,0x21,0x02,0x25,
+ 0x02,0x21,0x44,0x25,0x45,0x44,0x25,0x21,0x44,0x02,0x21,0x02,0x41,0x24,0x02,0x25,
+ 0x45,0x41,0x21,0x45,0x41,0x21,0x44,0x21,0x45,0x21,0x44,0x21,0x45,0x44,0x21,0x41,
+ 0x44,0x21,0x25,0x45,0x25,0x41,0x40,0x21,0x45,0x44,0x02,0x25,0x45,0x21,0x25,0x45,
+ 0x21,0x45,0x24,0x45,0x44,0x02,0x45,0x02,0x21,0x25,0x02,0x21,0x45,0x41,0x21,0x02,
+ 0x45,0x21,0x25,0x02,0x21,0x45,0x02,0x21,0x45,0x02,0x21,0x25,0x02,0x41,0x25,0x02,
+ 0x21,0x25,0x02,0x21,0x45,0x41,0x21,0x45,0x41,0x21,0x45,0x02,0x25,0x45,0x41,0x21,
+ 0x45,0x02,0x41,0x25,0x02,0x41,0x45,0x02,0x21,0x45,0x21,0x02,0x25,0x41,0x21,0x44,
+ 0x45,0x21,0x25,0x21,0x41,0x44,0x21,0x45,0x24,0x21,0x45,0x44,0x21,0x25,0x24,0x02,
+ 0x21,0x44,0x21,0x41,0x44,0x02,0x21,0x44,0x02,0x21,0x25,0x02,0x21,0x24,0x25,0x45,
+ 0x21,0x41,0x21,0x45,0x44,0x02,0x25,0x24,0x25,0x45,0x40,0x25,0x45,0x40,0x02,0x25,
+ 0x40,0x21,0x45,0x44,0x21,0x45,0x44,0x21,0x02,0x41,0x21,0x02,0x41,0x21,0x02,0x45,
+ 0x21,0x45,0x44,0x25,0x02,0x45,0x24,0x21,0x45,0x24,0x21,0x02,0x45,0x21,0x45,0x44,
+ 0x02,0x21,0x41,0x45,0x21,0x25,0x24,0x02,0x21,0x25,0x21,0x25,0x02,0x45,0x21,0x25,
+ 0x02,0x41,0x25,0x41,0x02,0x25,0x41,0x02,0x25,0x41,0x21,0x45,0x02,0x21,0x24,0x41,
+ 0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,0x02,0x45,0x21,0x25,0x41,0x02,0x25,0x20,
+ 0x21,0x25,0x41,0x21,0x25,0x02,0x21,0x45,0x24,0x21,0x45,0x24,0x02,0x25,0x20,0x21,
+ 0x02,0x45,0x21,0x02,0x45,0x25,0x02,0x45,0x02,0x21,0x24,0x21,0x02,0x25,0x02,0x21,
+ 0x44,0x02,0x25,0x44,0x02,0x21,0x44,0x21,0x02,0x45,0x41,0x21,0x45,0x21,0x25,0x02,
+ 0x45,0x21,0x45,0x41,0x45,0x44,0x21,0x25,0x45,0x21,0x25,0x45,0x21,0x49,0x48,0x21,
+ 0x41,0x44,0x21,0x45,0x44,0x21,0x45,0x41,0x44,0x02,0x21,0x24,0x21,0x41,0x44,0x21,
+ 0x41,0x24,0x21,0x45,0x24,0x21,0x45,0x44,0x02,0x21,0x25,0x21,0x41,0x44,0x21,0x45,
+ 0x24,0x21,0x45,0x44,0x21,0x25,0x24,0x02,0x21,0x44,0x21,0x41,0x44,0x02,0x21,0x44,
+ 0x02,0x21,0x25,0x02,0x21,0x24,0x25,0x45,0x44,0x25,0x21,0x44,0x02,0x25,0x44,0x02,
+ 0x25,0x45,0x21,0x24,0x02,0x21,0x24,0x21,0x25,0x44,0x02,0x21,0x45,0x02,0x21,0x25,
+ 0x02,0x21,0x45,0x41,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,0x21,0x25,0x45,0x02,
+ 0x21,0x25,0x44,0x02,0x21,0x44,0x02,0x21,0x24,0x21,0x41,0x24,0x02,0x21,0x44,0x25,
+ 0x21,0x44,0x21,0x41,0x24,0x02,0x21,0x24,0x02,0x25,0x44,0x21,0x02,0x25,0x02,0x21,
+ 0x44,0x25,0x45,0x24,0x02,0x21,0x25,0x24,0x21,0x25,0x45,0x02,0x21,0x24,0x02,0x21,
+ 0x44,0x21,0x02,0x25,0x02,0x21,0x25,0x21,0x25,0x44,0x04,0x21,0x45,0x02,0x21,0x44,
+ 0x25,0x21,0x45,0x21,0x25,0x24,0x21,0x41,0x40,0x02,0x21,0x41,0x21,0x25,0x45,0x21,
+ 0x25,0x45,0x21,0x25,0x44,0x25,0x21,0x41,0x24,0x21,0x41,0x45,0x02,0x21,0x44,0x02,
+ 0x21,0x45,0x02,0x21,0x45,0x21,0x45,0x24,0x02,0x21,0x24,0x21,0x25,0x45,0x21,0x45,
+ 0x44,0x02,0x21,0x44,0x21,0x25,0x41,0x40,0x25,0x21,0x41,0x02,0x21,0x45,0x02,0x21,
+ 0x45,0x21,0x25,0x02,0x45,0x21,0x44,0x21,0x45,0x44,0x21,0x41,0x44,0x25,0x21,0x02,
+ 0x44,0x02,0x21,0x45,0x02,0x21,0x45,0x21,0x25,0x45,0x03,0x21,0x45,0x02,0x21,0x25,
+ 0x02,0x21,0x02,0x45,0x02,0x41,0x45,0x20,0x02,0x25,0x21,0x02,0x25,0x02,0x21,0x25,
+ 0x02,0x21,0x24,0x03,0x25,0x02,0x21,0x24,0x02,0x21,0x24,0x21,0x25,0x44,0x02,0x21,
+ 0x45,0x02,0x21,0x25,0x02,0x21,0x45,0x41,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,
+ 0x21,0x25,0x45,0x21,0x25,0x24,0x25,0x21,0x44,0x02,0x21,0x25,0x21,0x02,0x45,0x02,
+ 0x21,0x41,0x21,0x45,0x44,0x21,0x41,0x44,0x21,0x41,0x40,0x02,0x21,0x41,0x21,0x25,
+ 0x45,0x21,0x25,0x45,0x21,0x25,0x44,0x25,0x21,0x40,0x21,0x45,0x21,0x02,0x41,0x25,
+ 0x41,0x21,0x02,0x45,0x21,0x25,0x41,0x02,0x25,0x20,0x21,0x25,0x41,0x21,0x25,0x02,
+ 0x21,0x45,0x24,0x21,0x45,0x24,0x02,0x25,0x20,0x21,0x02,0x45,0x21,0x02,0x45,0x21,
+ 0x03,0x45,0x21,0x25,0x02,0x41,0x25,0x41,0x02,0x25,0x41,0x02,0x25,0x41,0x21,0x02,
+ 0x45,0x21,0x02,0x41,0x25,0x41,0x02,0x45,0x20,0x21,0x02,0x45,0x21,0x02,0x41,0x21,
+ 0x02,0x45,0x21,0x45,0x41,0x21,0x02,0x45,0x41,0x21,0x45,0x21,0x25,0x02,0x45,0x21,
+ 0x45,0x40,0x24,0x45,0x20,0x02,0x25,0x41,0x21,0x25,0x41,0x21,0x45,0x41,0x21,0x02,
+ 0x45,0x21,0x25,0x21,0x02,0x25,0x02,0x21,0x25,0x02,0x21,0x45,0x24,0x25,0x45,0x41,
+ 0x21,0x02,0x45,0x44,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x25,0x45,
+ 0x02,0x21,0x41,0x21,0x25,0x45,0x21,0x45,0x44,0x25,0x02,0x45,0x40,0x21,0x41,0x40,
+ 0x21,0x41,0x40,0x21,0x25,0x45,0x02,0x21,0x41,0x02,0x21,0x41,0x24,0x21,0x45,0x24,
+ 0x21,0x02,0x41,0x40,0x21,0x41,0x44,0x02,0x21,0x44,0x25,0x21,0x24,0x25,0x41,0x24,
+ 0x21,0x41,0x44,0x25,0x21,0x40,0x02,0x21,0x41,0x21,0x45,0x44,0x21,0x41,0x44,0x21,
+ 0x41,0x40,0x02,0x21,0x41,0x21,0x25,0x45,0x21,0x25,0x45,0x21,0x25,0x44,0x25,0x21,
+ 0x40,0x21,0x02,0x45,0x21,0x45,0x44,0x21,0x02,0x45,0x21,0x25,0x45,0x21,0x25,0x02,
+ 0x21,0x24,0x21,0x41,0x44,0x02,0x21,0x45,0x02,0x21,0x45,0x21,0x25,0x45,0x02,0x21,
+ 0x24,0x02,0x21,0x44,0x21,0x25,0x24,0x25,0x21,0x44,0x02,0x21,0x25,0x24,0x21,0x41,
+ 0x24,0x21,0x41,0x24,0x21,0x41,0x45,0x02,0x21,0x44,0x02,0x21,0x45,0x02,0x21,0x45,
+ 0x21,0x45,0x24,0x02,0x21,0x24,0x21,0x25,0x45,0x21,0x45,0x44,0x02,0x21,0x45,0x03,
+ 0x21,0x45,0x02,0x21,0x44,0x25,0x21,0x45,0x21,0x25,0x24,0x21,0x41,0x44,0x02,0x21,
+ 0x44,0x25,0x21,0x44,0x02,0x21,0x02,0x41,0x24,0x02,0x25,0x45,0x41,0x21,0x45,0x41,
+ 0x21,0x44,0x21,0x45,0x21,0x44,0x21,0x45,0x44,0x21,0x41,0x44,0x21,0x25,0x45,0x25,
+ 0x41,0x40,0x21,0x45,0x44,0x02,0x25,0x45,0x21,0x25,0x45,0x21,0x45,0x24,0x21,0x41,
+ 0x40,0x21,0x41,0x45,0x21,0x41,0x24,0x25,0x02,0x45,0x21,0x02,0x45,0x21,0x25,0x45,
+ 0x21,0x02,0x41,0x45,0x03,0x21,0x44,0x02,0x25,0x02,0x21,0x44,0x02,0x21,0x45,0x20,
+ 0x25,0x45,0x21,0x41,0x24,0x21,0x45,0x44,0x02,0x21,0x45,0x24,0x21,0x02,0x25,0x02,
+ 0x21,0x44,0x02,0x21,0x45,0x20,0x25,0x45,0x25,0x02,0x21,0x25,0x02,0x21,0x24,0x45,
+ 0x21,0x25,0x45,0x02,0x21,0x24,0x02,0x21,0x44,0x25,0x21,0x44,0x02,0x21,0x24,0x21,
+ 0x02,0x25,0x21,0x02,0x25,0x02,0x21,0x24,0x21,0x41,0x44,0x02,0x21,0x45,0x02,0x21,
+ 0x45,0x21,0x25,0x45,0x02,0x21,0x24,0x02,0x21,0x44,0x21,0x25,0x24,0x25,0x21,0x44,
+ 0x02,0x21,0x25,0x21,0x02,0x25,0x02,0x21,0x45,0x25,0x21,0x44,0x21,0x45,0x44,0x25,
+ 0x21,0x40,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x25,0x45,0x02,0x21,0x41,0x21,0x25,
+ 0x45,0x21,0x45,0x44,0x25,0x02,0x45,0x25,0x45,0x44,0x20,0x02,0x25,0x21,0x25,0x45,
+ 0x20,0x02,0x25,0x41,0x21,0x25,0x41,0x21,0x45,0x41,0x21,0x02,0x45,0x21,0x25,0x21,
+ 0x02,0x25,0x02,0x21,0x25,0x02,0x21,0x45,0x24,0x25,0x45,0x41,0x21,0x02,0x45,0x20,
+ 0x21,0x02,0x45,0x21,0x02,0x41,0x21,0x02,0x45,0x21,0x45,0x41,0x21,0x45,0x21,0x25,
+ 0x02,0x45,0x21,0x02,0x45,0x24,0x44,0x21,0x41,0x44,0x02,0x21,0x44,0x02,0x21,0x25,
+ 0x21,0x25,0x03,0x41,0x25,0x02,0x41,0x45,0x02,0x21,0x45,0x21,0x02,0x25,0x41,0x21,
+ 0x25,0x21,0x02,0x25,0x21,0x02,0x25,0x21,0x25,0x45,0x02,0x21,0x44,0x45,0x21,0x45,
+ 0x41,0x21,0x45,0x02,0x21,0x24,0x03,0x25,0x21,0x25,0x45,0x41,0x21,0x45,0x21,0x24,
+ 0x25,0x45,0x21,0x41,0x21,0x45,0x44,0x02,0x25,0x24,0x25,0x45,0x40,0x25,0x45,0x25,
+ 0x45,0x21,0x40,0x21,0x45,0x44,0x21,0x45,0x44,0x21,0x02,0x41,0x21,0x02,0x41,0x21,
+ 0x02,0x45,0x21,0x45,0x44,0x25,0x45,0x21,0x24,0x25,0x41,0x24,0x21,0x45,0x21,0x40,
+ 0x02,0x21,0x40,0x02,0x21,0x20,0x21,0x41,0x40,0x21,0x41,0x24,0x21,0x45,0x44,0x21,
+ 0x02,0x45,0x21,0x45,0x44,0x25,0x21,0x40,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x25,
+ 0x45,0x02,0x21,0x41,0x21,0x25,0x45,0x21,0x45,0x44,0x25,0x02,0x45,0x25,0x45,0x44,
+ 0x21,0x45,0x44,0x21,0x41,0x40,0x21,0x02,0x45,0x21,0x25,0x21,0x25,0x24,0x21,0x45,
+ 0x24,0x21,0x02,0x25,0x02,0x21,0x44,0x02,0x21,0x45,0x20,0x25,0x45,0x21,0x41,0x24,
+ 0x21,0x45,0x44,0x02,0x21,0x24,0x25,0x21,0x02,0x45,0x21,0x41,0x44,0x21,0x45,0x44,
+ 0x02,0x25,0x45,0x21,0x25,0x45,0x21,0x45,0x24,0x21,0x41,0x40,0x21,0x41,0x45,0x21,
+ 0x41,0x24,0x25,0x02,0x45,0x21,0x02,0x45,0x21,0x25,0x45,0x21,0x02,0x41,0x24,0x02,
+ 0x25,0x45,0x41,0x21,0x45,0x41,0x21,0x44,0x21,0x45,0x44,0x21,0x41,0x44,0x21,0x25,
+ 0x45,0x02,0x25,0x02,0x21,0x45,0x41,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,0x03,
+ 0x21,0x25,0x02,0x21,0x24,0x25,0x45,0x44,0x25,0x21,0x44,0x02,0x25,0x44,0x21,0x45,
+ 0x44,0x21,0x41,0x40,0x02,0x21,0x40,0x02,0x21,0x41,0x21,0x41,0x44,0x21,0x41,0x24,
+ 0x25,0x21,0x20,0x02,0x21,0x44,0x25,0x21,0x40,0x02,0x21,0x45,0x02,0x21,0x25,0x45,
+ 0x02,0x21,0x25,0x44,0x02,0x21,0x44,0x02,0x21,0x24,0x21,0x41,0x02,0x24,0x02,0x21,
+ 0x44,0x21,0x25,0x24,0x25,0x03,0x21,0x24,0x02,0x25,0x44,0x21,0x02,0x25,0x02,0x21,
+ 0x44,0x25,0x45,0x24,0x21,0x25,0x21,0x44,0x02,0x21,0x24,0x45,0x02,0x21,0x44,0x02,
+ 0x21,0x44,0x21,0x25,0x44,0x02,0x21,0x44,0x02,0x21,0x44,0x21,0x25,0x45,0x02,0x21,
+ 0x25,0x21,0x25,0x24,0x21,0x45,0x24,0x21,0x02,0x25,0x02,0x21,0x44,0x02,0x21,0x45,
+ 0x20,0x25,0x45,0x21,0x41,0x24,0x21,0x45,0x44,0x02,0x21,0x24,0x25,0x21,0x24,0x25,
+ 0x21,0x24,0x21,0x41,0x44,0x21,0x41,0x44,0x41,0x45,0x44,0x21,0x45,0x44,0x21,0x02,
+ 0x41,0x21,0x02,0x41,0x21,0x02,0x45,0x21,0x45,0x44,0x25,0x45,0x20,0x25,0x45,0x44,
+ 0x21,0x02,0x45,0x21,0x41,0x45,0x21,0x25,0x24,0x02,0x21,0x25,0x21,0x02,0x25,0x21,
+ 0x02,0x25,0x21,0x25,0x45,0x02,0x21,0x44,0x45,0x21,0x45,0x41,0x21,0x45,0x02,0x21,
+ 0x24,0x03,0x25,0x21,0x25,0x45,0x41,0x21,0x45,0x24,0x44,0x21,0x41,0x44,0x02,0x21,
+ 0x44,0x02,0x21,0x25,0x21,0x25,0x02,0x41,0x45,0x02,0x21,0x45,0x21,0x02,0x25,0x02,
+ 0x21,0x41,0x21,0x25,0x45,0x21,0x25,0x45,0x21,0x25,0x44,0x02,0x25,0x03,0x21,0x25,
+ 0x21,0x25,0x45,0x21,0x25,0x24,0x25,0x21,0x44,0x02,0x21,0x45,0x02,0x21,0x44,0x02,
+ 0x21,0x45,0x21,0x25,0x45,0x02,0x21,0x44,0x02,0x21,0x44,0x45,0x25,0x44,0x02,0x21,
+ 0x45,0x41,0x21,0x02,0x45,0x02,0x25,0x21,0x25,0x24,0x21,0x40,0x21,0x45,0x21,0x02,
+ 0x41,0x25,0x41,0x21,0x02,0x45,0x21,0x25,0x02,0x41,0x21,0x25,0x45,0x21,0x45,0x44,
+ 0x25,0x02,0x45,0x25,0x24,0x21,0x45,0x24,0x02,0x25,0x20,0x21,0x02,0x45,0x21,0x02,
+ 0x45,0x21,0x45,0x41,0x40,0x21,0x41,0x24,0x21,0x45,0x21,0x40,0x25,0x21,0x41,0x21,
+ 0x45,0x44,0x02,0x25,0x24,0x25,0x45,0x40,0x25,0x45,0x40,0x02,0x25,0x40,0x21,0x45,
+ 0x44,0x21,0x45,0x44,0x21,0x02,0x41,0x21,0x02,0x41,0x21,0x02,0x45,0x21,0x45,0x44,
+ 0x25,0x45,0x20,0x25,0x45,0x44,0x21,0x02,0x45,0x21,0x41,0x45,0x21,0x45,0x44,0x21,
+ 0x45,0x44,0x21,0x41,0x40,0x21,0x45,0x44,0x41,0x24,0x02,0x21,0x24,0x02,0x25,0x44,
+ 0x21,0x02,0x25,0x02,0x21,0x44,0x25,0x45,0x24,0x21,0x41,0x24,0x21,0x02,0x45,0x21,
+ 0x25,0x21,0x25,0x44,0x02,0x21,0x44,0x21,0x45,0x44,0x21,0x41,0x44,0x21,0x25,0x45,
+ 0x21,0x40,0x02,0x21,0x41,0x21,0x41,0x44,0x21,0x41,0x24,0x25,0x21,0x25,0x02,0x21,
+ 0x45,0x41,0x21,0x45,0x41,0x21,0x45,0x25,0x02,0x21,0x45,0x41,0x21,0x25,0x02,0x21,
+ 0x25,0x02,0x21,0x25,0x02,0x21,0x24,0x25,0x45,0x44,0x25,0x21,0x44,0x25,0x45,0x21,
+ 0x25,0x45,0x02,0x21,0x24,0x02,0x21,0x44,0x21,0x25,0x24,0x25,0x21,0x25,0x44,0x25,
+ 0x21,0x40,0x21,0x02,0x45,0x21,0x45,0x44,0x21,0x02,0x45,0x21,0x25,0x45,0x25,0x45,
+ 0x24,0x21,0x41,0x20,0x21,0x41,0x40,0x25,0x45,0x41,0x21,0x41,0x45,0x21,0x02,0x45,
+ 0x21,0x02,0x45,0x21,0x02,0x45,0x02,0x25,0x45,0x21,0x25,0x21,0x44,0x02,0x21,0x25,
+ 0x24,0x21,0x41,0x24,0x21,0x41,0x24,0x21,0x41,0x25,0x45,0x21,0x41,0x24,0x21,0x45,
+ 0x44,0x02,0x21,0x24,0x45,0x24,0x02,0x21,0x24,0x21,0x25,0x45,0x21,0x45,0x44,0x02,
+ 0x21,0x45,0x03,0x21,0x44,0x02,0x21,0x44,0x45,0x02,0x21,0x44,0x21,0x25,0x44,0x02,
+ 0x21,0x44,0x02,0x21,0x24,0x21,0x41,0x24,0x02,0x21,0x44,0x25,0x21,0x44,0x21,0x41,
+ 0x24,0x02,0x21,0x24,0x02,0x25,0x44,0x21,0x02,0x25,0x02,0x21,0x44,0x25,0x45,0x24,
+ 0x21,0x41,0x24,0x21,0x02,0x45,0x21,0x25,0x24,0x21,0x41,0x44,0x21,0x41,0x45,0x21,
+ 0x25,0x29,0x21,0x41,0x44,0x21,0x25,0x02,0x21,0x45,0x24,0x21,0x45,0x24,0x02,0x25,
+ 0x20,0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x45,0x40,0x21,0x02,0x45,0x21,0x02,0x25,
+ 0x45,0x41,0x21,0x45,0x02,0x41,0x25,0x02,0x41,0x45,0x02,0x21,0x45,0x21,0x02,0x25,
+ 0x41,0x21,0x44,0x45,0x21,0x25,0x21,0x41,0x44,0x21,0x45,0x24,0x21,0x45,0x44,0x21,
+ 0x25,0x24,0x02,0x21,0x44,0x03,0x21,0x41,0x21,0x25,0x45,0x21,0x25,0x45,0x21,0x25,
+ 0x44,0x02,0x25,0x21,0x25,0x45,0x21,0x25,0x24,0x25,0x41,0x02,0x21,0x25,0x45,0x02,
+ 0x21,0x41,0x21,0x25,0x45,0x21,0x45,0x44,0x25,0x02,0x45,0x21,0x25,0x24,0x25,0x21,
+ 0x44,0x02,0x21,0x25,0x21,0x02,0x25,0x02,0x21,0x45,0x25,0x21,0x44,0x21,0x45,0x25,
+ 0x21,0x25,0x44,0x21,0x45,0x44,0x21,0x02,0x45,0x02,0x21,0x45,0x02,0x21,0x24,0x21,
+ 0x02,0x25,0x02,0x21,0x44,0x02,0x25,0x44,0x02,0x45,0x25,0x45,0x44,0x20,0x02,0x25,
+ 0x21,0x25,0x45,0x20,0x02,0x25,0x24,0x21,0x45,0x24,0x21,0x02,0x45,0x21,0x45,0x44,
+ 0x02,0x21,0x41,0x02,0x25,0x02,0x21,0x25,0x02,0x21,0x45,0x24,0x25,0x45,0x41,0x21,
+ 0x45,0x25,0x24,0x25,0x45,0x40,0x25,0x21,0x02,0x41,0x02,0x21,0x02,0x41,0x25,0x41,
+ 0x21,0x02,0x45,0x21,0x25,0x41,0x02,0x25,0x20,0x21,0x25,0x41,0x21,0x25,0x02,0x21,
+ 0x45,0x24,0x21,0x45,0x24,0x02,0x25,0x20,0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x45,
+ 0x40,0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x45,0x40,0x25,0x45,0x40,0x25,0x45,0x41,
+ 0x25,0x02,0x45,0x25,0x45,0x41,0x25,0x45,0x21,0x45,0x24,0x02,0x21,0x24,0x21,0x25,
+ 0x45,0x21,0x45,0x44,0x02,0x21,0x45,0x21,0x41,0x44,0x21,0x45,0x21,0x41,0x44,0x02,
+ 0x21,0x44,0x02,0x21,0x25,0x02,0x21,0x24,0x25,0x45,0x44,0x25,0x21,0x44,0x02,0x25,
+ 0x44,0x02,0x25,0x45,0x21,0x24,0x02,0x21,0x24,0x21,0x25,0x44,0x02,0x21,0x45,0x02,
+ 0x21,0x25,0x03,0x21,0x45,0x21,0x25,0x45,0x02,0x21,0x24,0x02,0x21,0x44,0x21,0x25,
+ 0x24,0x25,0x21,0x44,0x02,0x21,0x25,0x24,0x21,0x41,0x24,0x03,0x21,0x45,0x20,0x25,
+ 0x45,0x21,0x41,0x24,0x21,0x45,0x44,0x02,0x21,0x45,0x44,0x25,0x02,0x45,0x25,0x45,
+ 0x44,0x21,0x45,0x44,0x21,0x41,0x40,0x21,0x02,0x45,0x21,0x25,0x21,0x25,0x24,0x02,
+ 0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x45,0x20,0x25,0x41,0x40,0x25,0x21,0x41,0x21,
+ 0x45,0x40,0x25,0x45,0x24,0x25,0x02,0x21,0x24,0x25,0x21,0x02,0x45,0x21,0x41,0x44,
+ 0x21,0x45,0x44,0x02,0x25,0x24,0x21,0x25,0x45,0x02,0x21,0x24,0x02,0x21,0x44,0x21,
+ 0x25,0x45,0x21,0x41,0x24,0x25,0x02,0x45,0x21,0x02,0x45,0x21,0x25,0x45,0x03,0x21,
+ 0x24,0x21,0x41,0x24,0x45,0x21,0x25,0x45,0x21,0x25,0x24,0x21,0x41,0x24,0x21,0x41,
+ 0x24,0x21,0x41,0x45,0x02,0x21,0x44,0x02,0x21,0x45,0x02,0x21,0x45,0x21,0x45,0x24,
+ 0x02,0x21,0x24,0x21,0x25,0x45,0x21,0x45,0x44,0x02,0x21,0x45,0x21,0x41,0x44,0x21,
+ 0x45,0x24,0x02,0x21,0x45,0x21,0x25,0x45,0x02,0x21,0x44,0x25,0x45,0x44,0x21,0x41,
+ 0x44,0x25,0x41,0x44,0x21,0x25,0x21,0x02,0x25,0x02,0x21,0x25,0x02,0x21,0x45,0x24,
+ 0x25,0x45,0x41,0x21,0x45,0x41,0x21,0x45,0x25,0x45,0x41,0x21,0x25,0x02,0x21,0x25,
+ 0x02,0x21,0x25,0x21,0x25,0x45,0x21,0x25,0x24,0x25,0x21,0x44,0x02,0x21,0x25,0x21,
+ 0x02,0x45,0x02,0x21,0x41,0x21,0x45,0x44,0x21,0x41,0x44,0x21,0x41,0x40,0x02,0x21,
+ 0x41,0x40,0x21,0x25,0x45,0x02,0x21,0x41,0x21,0x25,0x45,0x21,0x45,0x44,0x25,0x02,
+ 0x45,0x25,0x45,0x44,0x20,0x02,0x25,0x21,0x25,0x45,0x21,0x25,0x21,0x45,0x44,0x25,
+ 0x45,0x20,0x25,0x45,0x44,0x21,0x41,0x24,0x21,0x45,0x44,0x02,0x21,0x24,0x25,0x21,
+ 0x24,0x25,0x21,0x24,0x21,0x41,0x44,0x21,0x41,0x44,0x41,0x45,0x44,0x21,0x45,0x44,
+ 0x02,0x21,0x24,0x21,0x41,0x44,0x21,0x25,0x44,0x02,0x21,0x44,0x25,0x21,0x44,0x21,
+ 0x25,0x24,0x21,0x02,0x45,0x44,0x02,0x21,0x41,0x45,0x21,0x25,0x24,0x02,0x21,0x25,
+ 0x21,0x25,0x02,0x45,0x21,0x25,0x02,0x41,0x25,0x41,0x02,0x25,0x41,0x02,0x25,0x41,
+ 0x21,0x45,0x02,0x21,0x24,0x41,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,0x02,0x45,
+ 0x21,0x25,0x41,0x25,0x02,0x45,0x20,0x02,0x25,0x20,0x02,0x25,0x21,0x25,0x45,0x20,
+ 0x02,0x25,0x41,0x21,0x25,0x41,0x21,0x45,0x41,0x21,0x02,0x45,0x21,0x25,0x21,0x02,
+ 0x25,0x02,0x21,0x25,0x02,0x21,0x45,0x24,0x25,0x45,0x41,0x21,0x45,0x41,0x21,0x45,
+ 0x25,0x21,0x02,0x45,0x21,0x45,0x41,0x25,0x02,0x45,0x25,0x45,0x41,0x21,0x44,0x45,
+ 0x21,0x02,0x45,0x21,0x44,0x21,0x41,0x45,0x21,0x41,0x24,0x25,0x02,0x45,0x21,0x02,
+ 0x45,0x21,0x25,0x45,0x21,0x41,0x24,0x21,0x41,0x21,0x25,0x45,0x21,0x25,0x45,0x21,
+ 0x25,0x44,0x25,0x21,0x40,0x21,0x02,0x45,0x21,0x45,0x44,0x21,0x02,0x45,0x21,0x25,
+ 0x45,0x21,0x25,0x02,0x21,0x24,0x21,0x41,0x44,0x02,0x21,0x45,0x02,0x21,0x45,0x21,
+ 0x25,0x21,0x44,0x02,0x21,0x45,0x20,0x25,0x45,0x21,0x41,0x24,0x21,0x45,0x44,0x02,
+ 0x21,0x24,0x25,0x21,0x02,0x45,0x21,0x41,0x44,0x21,0x45,0x21,0x02,0x41,0x21,0x24,
+ 0x21,0x41,0x24,0x44,0x25,0x45,0x20,0x25,0x45,0x44,0x21,0x02,0x45,0x21,0x41,0x45,
+ 0x21,0x45,0x44,0x21,0x45,0x44,0x21,0x41,0x40,0x21,0x45,0x44,0x41,0x24,0x02,0x21,
+ 0x24,0x02,0x25,0x02,0x41,0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x44,0x40,0x25,0x45,
+ 0x40,0x02,0x45,0x21,0x25,0x21,0x44,0x21,0x02,0x25,0x02,0x21,0x25,0x21,0x25,0x44,
+ 0x04,0x21,0x45,0x02,0x21,0x44,0x25,0x21,0x45,0x21,0x25,0x24,0x21,0x41,0x40,0x02,
+ 0x21,0x41,0x21,0x25,0x45,0x21,0x25,0x45,0x21,0x25,0x44,0x25,0x21,0x41,0x24,0x21,
+ 0x41,0x45,0x25,0x02,0x21,0x40,0x21,0x02,0x45,0x21,0x41,0x44,0x21,0x45,0x44,0x02,
+ 0x25,0x45,0x21,0x25,0x45,0x21,0x45,0x24,0x21,0x41,0x40,0x21,0x41,0x45,0x21,0x41,
+ 0x24,0x25,0x02,0x45,0x21,0x02,0x45,0x21,0x25,0x45,0x21,0x41,0x24,0x21,0x41,0x44,
+ 0x02,0x25,0x45,0x21,0x41,0x45,0x21,0x41,0x44,0x25,0x41,0x44,0x21,0x02,0x45,0x21,
+ 0x45,0x49,0x25,0x45,0x41,0x21,0x45,0x02,0x21,0x24,0x03,0x25,0x21,0x25,0x45,0x41,
+ 0x21,0x45,0x24,0x25,0x45,0x25,0x45,0x02,0x21,0x24,0x02,0x21,0x44,0x21,0x25,0x24,
+ 0x25,0x21,0x44,0x02,0x21,0x25,0x21,0x02,0x25,0x02,0x21,0x45,0x25,0x21,0x44,0x21,
+ 0x45,0x44,0x25,0x21,0x40,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x25,0x45,0x02,0x21,
+ 0x02,0x45,0x21,0x45,0x44,0x25,0x45,0x20,0x25,0x45,0x44,0x21,0x02,0x45,0x21,0x41,
+ 0x45,0x21,0x25,0x24,0x02,0x21,0x25,0x21,0x44,0x21,0x02,0x25,0x02,0x21,0x44,0x25,
+ 0x45,0x24,0x21,0x41,0x24,0x21,0x02,0x45,0x21,0x25,0x24,0x21,0x41,0x44,0x21,0x41,
+ 0x45,0x21,0x25,0x29,0x21,0x41,0x44,0x21,0x25,0x02,0x21,0x45,0x24,0x21,0x41,0x05,
+ 0x45,0x25,0x41,0x44,0x25,0x02,0x21,0x44,0x25,0x45,0x21,0x02,0x45,0x41,0x02,0x45,
+ 0x21,0x02,0x45,0x21,0x05,0x45,0x02,0x41,0x04,0x45,0x21,0x02,0x45,0x21,0x41,0x07,
+ 0x45,0x25,0x45,0x41,0x21,0x45,0x21,0x25,0x02,0x45,0x21,0x45,0x40,0x24,0x45,0x20,
+ 0x02,0x25,0x41,0x21,0x25,0x45,0x02,0x41,0x24,0x21,0x25,0x24,0x02,0x21,0x25,0x21,
+ 0x02,0x25,0x21,0x02,0x25,0x21,0x25,0x45,0x02,0x21,0x44,0x45,0x21,0x45,0x41,0x21,
+ 0x45,0x02,0x21,0x24,0x03,0x25,0x21,0x25,0x45,0x41,0x21,0x45,0x24,0x25,0x02,0x45,
+ 0x25,0x45,0x41,0x25,0x45,0x41,0x25,0x45,0x41,0x21,0x45,0x25,0x21,0x45,0x41,0x25,
+ 0x45,0x41,0x25,0x45,0x41,0x45,0x24,0x25,0x21,0x20,0x02,0x21,0x44,0x25,0x21,0x40,
+ 0x02,0x21,0x45,0x21,0x25,0x24,0x25,0x45,0x02,0x21,0x41,0x21,0x25,0x45,0x21,0x45,
+ 0x44,0x25,0x02,0x45,0x25,0x45,0x44,0x21,0x45,0x44,0x21,0x41,0x40,0x21,0x02,0x45,
+ 0x21,0x25,0x21,0x25,0x24,0x21,0x45,0x24,0x21,0x02,0x25,0x02,0x21,0x44,0x02,0x21,
+ 0x45,0x20,0x02,0x21,0x44,0x25,0x45,0x24,0x21,0x41,0x24,0x21,0x02,0x45,0x21,0x25,
+ 0x21,0x25,0x44,0x02,0x21,0x44,0x21,0x45,0x44,0x02,0x21,0x25,0x20,0x21,0x02,0x45,
+ 0x21,0x02,0x45,0x21,0x45,0x40,0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x45,0x40,0x25,
+ 0x45,0x40,0x25,0x45,0x41,0x25,0x02,0x45,0x25,0x45,0x41,0x25,0x45,0x21,0x45,0x21,
+ 0x25,0x45,0x04,0x21,0x02,0x25,0x20,0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x45,0x40,
+ 0x21,0x03,0x45,0x02,0x41,0x07,0x45,0x02,0x41,0x44,0x21,0x24,0x25,0x41,0x24,0x21,
+ 0x41,0x25,0x03,0x45,0x44,0x05,0x45,0x44,0x21,0x41,0x44,0x21,0x25,0x45,0x25,0x41,
+ 0x40,0x21,0x45,0x44,0x02,0x25,0x45,0x25,0x02,0x21,0x44,0x02,0x21,0x24,0x21,0x41,
+ 0x24,0x21,0x45,0x44,0x21,0x41,0x40,0x02,0x21,0x40,0x02,0x21,0x41,0x21,0x41,0x44,
+ 0x21,0x41,0x24,0x25,0x21,0x20,0x02,0x21,0x44,0x25,0x21,0x40,0x02,0x21,0x45,0x21,
+ 0x25,0x24,0x25,0x21,0x40,0x21,0x41,0x40,0x25,0x02,0x45,0x21,0x41,0x40,0x21,0x41,
+ 0x44,0x25,0x45,0x44,0x21,0x41,0x24,0x21,0x02,0x45,0x21,0x44,0x02,0x21,0x45,0x41,
+ 0x21,0x02,0x45,0x02,0x25,0x21,0x25,0x24,0x02,0x25,0x24,0x21,0x45,0x20,0x25,0x45,
+ 0x21,0x41,0x24,0x21,0x45,0x44,0x02,0x21,0x24,0x25,0x21,0x24,0x25,0x21,0x24,0x21,
+ 0x41,0x44,0x21,0x41,0x44,0x41,0x45,0x44,0x21,0x45,0x44,0x21,0x02,0x41,0x21,0x02,
+ 0x41,0x21,0x02,0x45,0x21,0x45,0x44,0x45,0x21,0x02,0x45,0x21,0x45,0x40,0x21,0x02,
+ 0x45,0x21,0x02,0x25,0x45,0x41,0x21,0x45,0x02,0x41,0x25,0x02,0x41,0x45,0x29,0x21,
+ 0x25,0x45,0x21,0x45,0x44,0x02,0x21,0x45,0x21,0x41,0x44,0x21,0x45,0x24,0x02,0x21,
+ 0x45,0x21,0x25,0x45,0x02,0x21,0x44,0x25,0x45,0x44,0x21,0x41,0x44,0x25,0x41,0x44,
+ 0x21,0x25,0x21,0x25,0x45,0x21,0x45,0x24,0x02,0x21,0x24,0x21,0x25,0x45,0x21,0x45,
+ 0x44,0x02,0x21,0x45,0x21,0x41,0x44,0x21,0x45,0x24,0x02,0x21,0x45,0x21,0x25,0x40,
+ 0x21,0x45,0x44,0x21,0x45,0x44,0x25,0x21,0x44,0x02,0x21,0x24,0x21,0x02,0x25,0x21,
+ 0x02,0x25,0x03,0x45,0x21,0x02,0x41,0x45,0x02,0x21,0x45,0x21,0x02,0x25,0x41,0x21,
+ 0x25,0x21,0x02,0x25,0x21,0x02,0x25,0x45,0x02,0x21,0x45,0x02,0x21,0x45,0x21,0x25,
+ 0x45,0x02,0x21,0x44,0x02,0x21,0x45,0x21,0x25,0x45,0x02,0x21,0x44,0x02,0x21,0x44,
+ 0x45,0x25,0x44,0x02,0x21,0x45,0x41,0x21,0x02,0x45,0x02,0x25,0x21,0x25,0x24,0x02,
+ 0x25,0x24,0x02,0x21,0x44,0x02,0x21,0x44,0x02,0x21,0x45,0x21,0x41,0x44,0x21,0x25,
+ 0x45,0x21,0x25,0x45,0x02,0x41,0x44,0x45,0x25,0x45,0x41,0x02,0x45,0x21,0x02,0x45,
+ 0x21,0x02,0x45,0x02,0x25,0x45,0x21,0x02,0x45,0x25,0x45,0x21,0x45,0x44,0x25,0x45,
+ 0x20,0x25,0x45,0x44,0x21,0x02,0x45,0x21,0x41,0x45,0x21,0x45,0x44,0x21,0x45,0x44,
+ 0x21,0x41,0x40,0x21,0x45,0x44,0x41,0x24,0x02,0x21,0x24,0x02,0x25,0x44,0x21,0x02,
+ 0x25,0x02,0x21,0x44,0x25,0x45,0x24,0x21,0x41,0x21,0x45,0x21,0x41,0x44,0x21,0x45,
+ 0x21,0x41,0x44,0x02,0x21,0x44,0x02,0x21,0x25,0x02,0x21,0x24,0x41,0x25,0x02,0x45,
+ 0x21,0x45,0x24,0x25,0x45,0x41,0x21,0x45,0x41,0x21,0x45,0x25,0x21,0x02,0x45,0x21,
+ 0x45,0x41,0x25,0x02,0x45,0x25,0x45,0x41,0x21,0x44,0x45,0x21,0x02,0x45,0x21,0x44,
+ 0x21,0x41,0x45,0x21,0x25,0x21,0x02,0x25,0x02,0x21,0x25,0x02,0x21,0x45,0x24,0x25,
+ 0x45,0x41,0x21,0x45,0x25,0x45,0x41,0x25,0x45,0x24,0x21,0x45,0x44,0x02,0x21,0x24,
+ 0x45,0x24,0x21,0x25,0x45,0x40,0x25,0x45,0x40,0x02,0x25,0x40,0x21,0x45,0x44,0x21,
+ 0x44,0x02,0x21,0x24,0x02,0x21,0x44,0x02,0x21,0x24,0x02,0x21,0x24,0x41,0x21,0x25,
+ 0x02,0x21,0x25,0x02,0x21,0x25,0x45,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x41,0x45,
+ 0x25,0x21,0x40,0x25,0x45,0x24,0x21,0x41,0x20,0x21,0x41,0x40,0x25,0x45,0x41,0x21,
+ 0x41,0x45,0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x02,0x45,0x02,0x25,0x45,0x21,0x02,
+ 0x45,0x25,0x21,0x41,0x45,0x25,0x41,0x21,0x02,0x41,0x21,0x02,0x45,0x21,0x02,0x45,
+ 0x21,0x41,0x45,0x21,0x25,0x45,0x25,0x45,0x44,0x21,0x45,0x44,0x21,0x24,0x21,0x02,
+ 0x25,0x02,0x21,0x44,0x02,0x25,0x44,0x02,0x21,0x44,0x21,0x44,0x25,0x45,0x24,0x21,
+ 0x41,0x24,0x21,0x02,0x45,0x21,0x25,0x24,0x21,0x41,0x44,0x21,0x41,0x45,0x21,0x25,
+ 0x29,0x21,0x41,0x44,0x21,0x25,0x02,0x21,0x45,0x24,0x21,0x45,0x24,0x02,0x25,0x20,
+ 0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x45,0x40,0x02,0x21,0x45,0x41,0x21,0x45,0x25,
+ 0x45,0x41,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,0x21,0x25,0x45,0x44,0x06,0x45,
+ 0x21,0x25,0x45,0x21,0x41,0x24,0x21,0x41,0x44,0x02,0x25,0x45,0x21,0x41,0x45,0x21,
+ 0x41,0x44,0x25,0x41,0x44,0x21,0x02,0x45,0x21,0x45,0x49,0x25,0x45,0x02,0x41,0x40,
+ 0x21,0x41,0x45,0x21,0x41,0x24,0x25,0x02,0x45,0x21,0x02,0x45,0x21,0x25,0x45,0x21,
+ 0x40,0x21,0x41,0x40,0x03,0x45,0x21,0x45,0x44,0x02,0x21,0x41,0x02,0x25,0x24,0x21,
+ 0x41,0x24,0x02,0x21,0x44,0x25,0x21,0x44,0x21,0x25,0x41,0x21,0x02,0x45,0x21,0x02,
+ 0x41,0x21,0x24,0x25,0x02,0x21,0x41,0x21,0x25,0x45,0x21,0x25,0x45,0x21,0x25,0x44,
+ 0x02,0x25,0x44,0x41,0x21,0x44,0x02,0x25,0x45,0x02,0x21,0x24,0x02,0x21,0x44,0x21,
+ 0x02,0x25,0x21,0x25,0x44,0x21,0x45,0x44,0x21,0x02,0x45,0x02,0x21,0x45,0x02,0x21,
+ 0x24,0x21,0x02,0x25,0x02,0x21,0x44,0x02,0x25,0x44,0x02,0x21,0x44,0x21,0x25,0x45,
+ 0x02,0x41,0x24,0x41,0x45,0x44,0x21,0x25,0x45,0x41,0x45,0x44,0x21,0x25,0x45,0x21,
+ 0x25,0x45,0x21,0x49,0x48,0x41,0x02,0x45,0x41,0x45,0x44,0x21,0x45,0x40,0x25,0x45,
+ 0x24,0x25,0x45,0x44,0x21,0x02,0x45,0x41,0x45,0x21,0x45,0x40,0x21,0x02,0x45,0x21,
+ 0x02,0x45,0x21,0x45,0x40,0x25,0x45,0x40,0x25,0x45,0x41,0x25,0x02,0x45,0x25,0x45,
+ 0x41,0x25,0x45,0x21,0x45,0x24,0x02,0x21,0x24,0x21,0x25,0x45,0x21,0x45,0x44,0x02,
+ 0x21,0x04,0x45,0x25,0x45,0x41,0x45,0x48,0x45,0x21,0x25,0x45,0x21,0x25,0x45,0x21,
+ 0x25,0x03,0x45,0x41,0x02,0x45,0x41,0x45,0x44,0x03,0x45,0x41,0x45,0x49,0x02,0x45,
+ 0x44,0x02,0x45,0x25,0x45,0x41,0x25,0x45,0x41,0x25,0x45,0x41,0x21,0x45,0x25,0x21,
+ 0x45,0x41,0x25,0x45,0x41,0x25,0x45,0x41,0x02,0x45,0x21,0x45,0x41,0x21,0x45,0x02,
+ 0x21,0x24,0x03,0x25,0x21,0x25,0x45,0x41,0x03,0x21,0x44,0x21,0x24,0x41,0x02,0x21,
+ 0x24,0x02,0x21,0x44,0x21,0x25,0x45,0x02,0x21,0x25,0x41,0x02,0x25,0x20,0x21,0x25,
+ 0x41,0x02,0x21,0x24,0x21,0x24,0x02,0x21,0x45,0x21,0x41,0x44,0x21,0x25,0x24,0x45,
+ 0x41,0x21,0x45,0x21,0x25,0x02,0x45,0x21,0x45,0x40,0x24,0x44,0x21,0x41,0x40,0x25,
+ 0x21,0x41,0x21,0x44,0x45,0x21,0x02,0x45,0x02,0x21,0x41,0x25,0x45,0x40,0x21,0x41,
+ 0x40,0x21,0x41,0x40,0x21,0x45,0x20,0x25,0x41,0x40,0x25,0x21,0x41,0x21,0x45,0x40,
+ 0x25,0x45,0x24,0x25,0x45,0x44,0x21,0x02,0x45,0x21,0x41,0x45,0x21,0x02,0x45,0x25,
+ 0x45,0x41,0x25,0x02,0x45,0x25,0x45,0x44,0x25,0x02,0x45,0x21,0x04,0x45,0x44,0x25,
+ 0x45,0x40,0x21,0x05,0x45,0x25,0x02,0x45,0x25,0x0b,0x45,0x21,0x02,0x45,0x21,0x04,
+ 0x45,0x44,0x25,0x07,0x45,0x44,0x02,0x45,0x40,0x25,0x02,0x45,0x25,0x05,0x45,0x41,
+ 0x02,0x45,0x25,0x04,0x45,0x44,0x06,0x45,0x21,0x02,0x45,0x41,0x02,0x45,0x41,0x45,
+ 0x44,0x02,0x45,0x02,0x41,0x00,0x11,0x45,0x25,0x45,0x44,0x05,0x45,0x41,0x02,0x45,
+ 0x44,0x07,0x45,0x41,0x44,0x21,0x41,0x24,0x25,0x21,0x20,0x02,0x21,0x44,0x25,0x21,
+ 0x40,0x02,0x21,0x45,0x03,0x21,0x41,0x21,0x25,0x45,0x21,0x02,0x25,0x41,0x02,0x25,
+ 0x41,0x21,0x45,0x24,0x21,0x41,0x45,0x02,0x21,0x44,0x02,0x21,0x25,0x04,0x21,0x41,
+ 0x20,0x21,0x41,0x20,0x03,0x21,0x44,0x21,0x45,0x44,0x21,0x41,0x44,0x21,0x25,0x45,
+ 0x25,0x41,0x40,0x25,0x24,0x21,0x02,0x45,0x02,0x21,0x24,0x21,0x02,0x45,0x21,0x25,
+ 0x44,0x02,0x21,0x44,0x02,0x21,0x44,0x02,0x21,0x24,0x21,0x41,0x44,0x21,0x25,0x44,
+ 0x02,0x21,0x44,0x25,0x21,0x44,0x21,0x25,0x24,0x02,0x21,0x44,0x25,0x21,0x44,0x21,
+ 0x41,0x44,0x21,0x45,0x44,0x21,0x25,0x44,0x21,0x45,0x44,0x02,0x21,0x45,0x02,0x25,
+ 0x44,0x21,0x04,0x45,0x44,0x03,0x45,0x41,0x02,0x45,0x41,0x02,0x45,0x46,0x41,0x44,
+ 0x05,0x45,0x44,0x02,0x45,0x48,0x45,0x41,0x44,0x05,0x45,0x44,0x02,0x45,0x44,0x03,
+ 0x45,0x21,0x45,0x01,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,
+ 0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,
+ 0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,
+ 0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,
+ 0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,
+ 0x63,0x43,0x23,0x01,0x03,0x02,0x45,0x02,0x21,0x44,0x45,0x25,0x44,0x02,0x21,0x45,
+ 0x41,0x21,0x02,0x45,0x02,0x25,0x21,0x25,0x21,0x02,0x45,0x41,0x21,0x45,0x21,0x25,
+ 0x02,0x45,0x21,0x45,0x41,0x45,0x44,0x21,0x25,0x45,0x21,0x25,0x45,0x21,0x49,0x48,
+ 0x21,0x41,0x44,0x21,0x45,0x44,0x21,0x41,0x24,0x02,0x21,0x44,0x21,0x02,0x41,0x25,
+ 0x02,0x41,0x45,0x02,0x21,0x45,0x21,0x02,0x25,0x41,0x21,0x44,0x21,0x02,0x25,0x21,
+ 0x02,0x45,0x21,0x02,0x41,0x02,0x25,0x41,0x21,0x45,0x41,0x21,0x02,0x41,0x21,0x44,
+ 0x45,0x21,0x02,0x41,0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x44,0x40,0x25,0x45,0x40,
+ 0x25,0x45,0x40,0x25,0x45,0x40,0x21,0x02,0x45,0x21,0x02,0x45,0x25,0x02,0x45,0x21,
+ 0x02,0x45,0x25,0x45,0x41,0x02,0x45,0x41,0x25,0x02,0x45,0x49,0x05,0x45,0x41,0x06,
+ 0x45,0x49,0x05,0x45,0x49,0x02,0x45,0x69,0x49,0x45,0x49,0x06,0x45,0x41,0x03,0x45,
+ 0x21,0x02,0x45,0x21,0x02,0x45,0x01,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,
+ 0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,
+ 0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,
+ 0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,
+ 0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,
+ 0xc3,0xa3,0x83,0x63,0x43,0x23,0x01,0x03,0x02,0x41,0x45,0x41,0x21,0x41,0x45,0x21,
+ 0x02,0x45,0x21,0x02,0x45,0x21,0x02,0x45,0x02,0x25,0x45,0x21,0x44,0x21,0x45,0x44,
+ 0x21,0x41,0x44,0x25,0x21,0x02,0x44,0x02,0x21,0x45,0x02,0x21,0x45,0x21,0x25,0x45,
+ 0x03,0x21,0x45,0x02,0x21,0x25,0x02,0x21,0x45,0x02,0x21,0x45,0x02,0x21,0x25,0x21,
+ 0x25,0x02,0x21,0x24,0x25,0x45,0x44,0x25,0x21,0x44,0x02,0x25,0x44,0x02,0x45,0x21,
+ 0x41,0x24,0x02,0x21,0x24,0x21,0x45,0x44,0x02,0x21,0x24,0x21,0x41,0x44,0x25,0x41,
+ 0x44,0x02,0x21,0x44,0x21,0x45,0x24,0x21,0x02,0x25,0x21,0x41,0x24,0x02,0x25,0x24,
+ 0x21,0x41,0x44,0x25,0x21,0x44,0x21,0x41,0x44,0x25,0x41,0x44,0x25,0x41,0x44,0x25,
+ 0x41,0x44,0x25,0x41,0x44,0x21,0x45,0x44,0x25,0x45,0x49,0x45,0x02,0x49,0x45,0x49,
+ 0x69,0x4a,0x69,0x6d,0x02,0x49,0x69,0x02,0x49,0x89,0x6e,0x02,0x8e,0x03,0x69,0x49,
+ 0x69,0x8d,0x8f,0xb2,0x91,0x6a,0x69,0x49,0x02,0x45,0x44,0x05,0x45,0x44,0x02,0x45,
+ 0x44,0x45,0x41,0x01,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,
+ 0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,
+ 0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,
+ 0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,
+ 0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,
+ 0x63,0x43,0x23,0x01,0x03,0x02,0x45,0x21,0x02,0x45,0x02,0x21,0x45,0x02,0x21,0x24,
+ 0x21,0x02,0x25,0x02,0x21,0x44,0x02,0x25,0x41,0x21,0x25,0x45,0x21,0x45,0x44,0x25,
+ 0x02,0x45,0x40,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x25,0x45,0x02,0x21,0x41,0x02,
+ 0x21,0x41,0x24,0x21,0x45,0x24,0x21,0x45,0x44,0x02,0x21,0x25,0x21,0x41,0x44,0x21,
+ 0x45,0x25,0x45,0x21,0x25,0x24,0x25,0x21,0x44,0x02,0x21,0x45,0x02,0x25,0x02,0x21,
+ 0x25,0x41,0x45,0x25,0x41,0x25,0x45,0x40,0x25,0x45,0x41,0x21,0x44,0x02,0x41,0x25,
+ 0x02,0x21,0x02,0x45,0x21,0x45,0x41,0x21,0x02,0x45,0x21,0x03,0x25,0x45,0x21,0x25,
+ 0x45,0x41,0x21,0x02,0x45,0x41,0x45,0x02,0x41,0x02,0x45,0x41,0x07,0x45,0x41,0x05,
+ 0x45,0x65,0x02,0x69,0x65,0x9b,0xf7,0xd6,0xb2,0xb6,0xd3,0xbf,0xb3,0xaa,0xbf,0xff,
+ 0xfb,0xff,0xfb,0xb0,0x8e,0xb2,0xce,0xdf,0x02,0xff,0xf3,0xff,0xdf,0x89,0x2d,0x45,
+ 0x02,0x49,0x41,0x09,0x45,0x01,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,
+ 0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,
+ 0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,
+ 0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,
+ 0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,
+ 0xa3,0x83,0x63,0x43,0x23,0x01,0x03,0x41,0x49,0x41,0x40,0x21,0x45,0x20,0x25,0x41,
+ 0x40,0x25,0x21,0x41,0x02,0x21,0x45,0x02,0x21,0x45,0x25,0x45,0x21,0x41,0x24,0x21,
+ 0x45,0x44,0x02,0x21,0x45,0x24,0x21,0x02,0x25,0x02,0x21,0x44,0x02,0x21,0x45,0x20,
+ 0x25,0x45,0x25,0x02,0x21,0x25,0x02,0x21,0x24,0x03,0x25,0x02,0x21,0x24,0x02,0x21,
+ 0x24,0x21,0x25,0x44,0x02,0x21,0x45,0x03,0x21,0x03,0x45,0x44,0x21,0x02,0x45,0x21,
+ 0x41,0x44,0x21,0x41,0x24,0x21,0x41,0x44,0x21,0x41,0x44,0x25,0x21,0x44,0x02,0x25,
+ 0x24,0x21,0x41,0x24,0x25,0x45,0x24,0x21,0x41,0x44,0x21,0x41,0x44,0x02,0x25,0x24,
+ 0x25,0x21,0x44,0x21,0x45,0x44,0x21,0x45,0x44,0x45,0x41,0x03,0x45,0x02,0x49,0x45,
+ 0x49,0x41,0x04,0x45,0x65,0x46,0x95,0xf7,0xde,0xbf,0xfb,0xff,0xfb,0x9e,0x8e,0x02,
+ 0x92,0x8a,0xb2,0xf2,0xf7,0x02,0xfb,0x07,0xff,0xeb,0xe8,0x02,0xff,0xdf,0x64,0x29,
+ 0x49,0x45,0x02,0x49,0x46,0x45,0x44,0x02,0x45,0x44,0x49,0x45,0x01,0x03,0x23,0x43,
+ 0x63,0x83,0x00,0x3b,0xff,0x01,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,
+ 0xa3,0x83,0x63,0x43,0x23,0x01,0x03,0x45,0x44,0x21,0x41,0x44,0x21,0x25,0x45,0x44,
+ 0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x45,0x25,0x45,0x21,0x40,0x21,
+ 0x45,0x44,0x21,0x45,0x44,0x21,0x02,0x41,0x21,0x02,0x41,0x21,0x02,0x45,0x21,0x45,
+ 0x44,0x25,0x45,0x21,0x24,0x25,0x41,0x24,0x21,0x41,0x44,0x25,0x21,0x40,0x02,0x21,
+ 0x41,0x21,0x45,0x44,0x21,0x41,0x44,0x21,0x41,0x40,0x02,0x21,0x41,0x45,0x21,0x24,
+ 0x02,0x41,0x45,0x02,0x21,0x25,0x02,0x41,0x25,0x21,0x02,0x25,0x02,0x21,0x25,0x21,
+ 0x02,0x25,0x02,0x21,0x44,0x41,0x21,0x45,0x41,0x25,0x45,0x02,0x41,0x24,0x03,0x25,
+ 0x21,0x03,0x25,0x21,0x44,0x41,0x21,0x45,0x41,0x45,0x49,0x02,0x45,0x02,0x69,0x6e,
+ 0x8e,0x6d,0x49,0x69,0x49,0x45,0x49,0x02,0x45,0x90,0xf7,0x02,0xff,0xf7,0x02,0xff,
+ 0xde,0x9f,0xd7,0x6c,0x72,0x91,0xaa,0xba,0xfe,0xff,0xcf,0xfa,0xfb,0x03,0xff,0xd6,
+ 0x96,0x89,0x97,0xfa,0xff,0xee,0xaf,0x44,0x29,0x49,0x45,0x02,0x49,0x41,0x02,0x45,
+ 0x41,0x03,0x45,0x01,0x03,0x23,0x43,0x63,0x83,0x00,0x3b,0xff,0x01,0x03,0x23,0x43,
+ 0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,0x63,0x43,0x23,0x01,0x03,0x45,0x41,
+ 0x21,0x45,0x02,0x41,0x25,0x02,0x41,0x45,0x03,0x21,0x44,0x02,0x25,0x02,0x21,0x44,
+ 0x24,0x02,0x21,0x44,0x21,0x25,0x24,0x25,0x03,0x21,0x24,0x02,0x25,0x44,0x21,0x02,
+ 0x25,0x02,0x21,0x44,0x25,0x45,0x24,0x21,0x25,0x21,0x44,0x02,0x21,0x24,0x21,0x02,
+ 0x25,0x21,0x02,0x25,0x02,0x21,0x24,0x21,0x41,0x44,0x02,0x21,0x45,0x02,0x21,0x45,
+ 0x21,0x25,0x02,0x45,0x21,0x02,0x45,0x21,0x02,0x45,0x02,0x21,0x45,0x02,0x21,0x45,
+ 0x21,0x25,0x24,0x21,0x41,0x44,0x21,0x41,0x24,0x25,0x21,0x40,0x02,0x21,0x45,0x21,
+ 0x25,0x45,0x02,0x21,0x45,0x21,0x41,0x45,0x21,0x25,0x45,0x21,0x02,0x45,0x21,0x45,
+ 0x49,0x4a,0x6d,0xae,0x92,0xb6,0xf6,0xff,0xfb,0xbe,0xbb,0x8e,0x6d,0x69,0x45,0x64,
+ 0x8f,0x02,0xff,0xfb,0xbb,0x9e,0x93,0x8a,0xc9,0xdf,0xcf,0x4c,0x4a,0xbd,0x02,0xff,
+ 0xd3,0xf1,0xd7,0x03,0xff,0xd3,0x55,0x6b,0xae,0x8d,0xb7,0xfb,0xd9,0xdf,0xa7,0x44,
+ 0x25,0x02,0x49,0x41,0x45,0x49,0x05,0x45,0x01,0x03,0x23,0x43,0x63,0x83,0x00,0x3b,
+ 0xff,0x01,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,0x63,0x43,
+ 0x23,0x01,0x03,0x45,0x02,0x44,0x02,0x21,0x25,0x02,0x21,0x24,0x25,0x45,0x21,0x41,
+ 0x21,0x45,0x44,0x02,0x25,0x24,0x21,0x25,0x45,0x21,0x02,0x45,0x44,0x25,0x02,0x45,
+ 0x25,0x24,0x21,0x45,0x44,0x02,0x21,0x44,0x21,0x25,0x45,0x02,0x21,0x25,0x21,0x25,
+ 0x41,0x21,0x45,0x44,0x21,0x45,0x40,0x21,0x41,0x40,0x21,0x45,0x44,0x21,0x02,0x45,
+ 0x21,0x02,0x45,0x21,0x25,0x45,0x02,0x21,0x45,0x48,0x41,0x44,0x25,0x21,0x45,0x41,
+ 0x25,0x45,0x41,0x21,0x45,0x21,0x25,0x45,0x02,0x21,0x25,0x21,0x25,0x45,0x02,0x21,
+ 0x25,0x02,0x21,0x44,0x02,0x21,0x45,0x41,0x21,0x45,0x21,0x02,0x25,0x02,0x21,0x44,
+ 0x45,0x21,0x44,0x02,0x45,0x44,0x42,0x45,0xad,0xef,0x06,0xff,0xfb,0x03,0xff,0x9e,
+ 0x75,0x4a,0xf1,0xff,0xfa,0xbe,0xf7,0xf2,0x75,0x02,0x8e,0xf5,0xff,0xca,0xf5,0xdb,
+ 0xdf,0x9b,0xaa,0xb6,0xd6,0xae,0xdf,0xff,0xb9,0x6a,0xd1,0x96,0x61,0x8c,0xb7,0xd7,
+ 0xfa,0xbd,0x42,0x44,0x02,0x45,0x49,0x06,0x45,0x41,0x01,0x03,0x23,0x43,0x63,0x83,
+ 0x00,0x3b,0xff,0x01,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,
+ 0x63,0x43,0x23,0x01,0x03,0x41,0x45,0x21,0x25,0x02,0x21,0x25,0x21,0x25,0x45,0x02,
+ 0x21,0x25,0x44,0x02,0x21,0x44,0x02,0x21,0x45,0x21,0x41,0x24,0x02,0x21,0x45,0x44,
+ 0x02,0x21,0x24,0x45,0x24,0x21,0x25,0x45,0x40,0x25,0x45,0x40,0x02,0x25,0x40,0x21,
+ 0x45,0x44,0x21,0x44,0x02,0x21,0x24,0x02,0x21,0x44,0x02,0x21,0x24,0x02,0x21,0x24,
+ 0x41,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,0x03,0x45,0x25,0x21,0x45,0x24,0x21,
+ 0x41,0x44,0x02,0x25,0x45,0x25,0x41,0x40,0x21,0x41,0x44,0x02,0x21,0x44,0x21,0x41,
+ 0x44,0x21,0x25,0x45,0x21,0x25,0x45,0x02,0x21,0x44,0x21,0x45,0x24,0x21,0x45,0x44,
+ 0x02,0x21,0x41,0x21,0x04,0x45,0xa5,0xb7,0x03,0xff,0xdb,0xf7,0x03,0xff,0xef,0x02,
+ 0xff,0xda,0x6f,0xa9,0xbf,0xff,0xbe,0x8a,0xb5,0xd6,0xb3,0xd6,0xf7,0xdb,0xd7,0xf7,
+ 0xd3,0xfb,0xdb,0xb7,0x02,0xfb,0x02,0xff,0xf7,0x03,0xff,0xfb,0xd3,0x71,0x47,0xf5,
+ 0xb6,0xb7,0xf7,0x58,0x21,0x45,0x49,0x08,0x45,0x01,0x03,0x23,0x43,0x63,0x83,0x0a,
+ 0xff,0x04,0x00,0x03,0xff,0x04,0x00,0x06,0xff,0x0f,0x00,0x05,0xff,0x06,0x00,0x06,
+ 0xff,0x01,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,0x63,0x43,
+ 0x23,0x01,0x03,0x45,0x49,0x45,0x21,0x25,0x44,0x25,0x21,0x40,0x21,0x45,0x21,0x02,
+ 0x41,0x25,0x41,0x21,0x03,0x45,0x24,0x21,0x03,0x45,0x21,0x45,0x44,0x02,0x21,0x41,
+ 0x02,0x25,0x24,0x21,0x41,0x24,0x02,0x21,0x44,0x25,0x21,0x44,0x21,0x25,0x41,0x21,
+ 0x02,0x45,0x21,0x02,0x41,0x21,0x24,0x25,0x02,0x21,0x41,0x21,0x25,0x45,0x21,0x25,
+ 0x45,0x21,0x25,0x44,0x25,0x21,0x41,0x44,0x21,0x24,0x21,0x25,0x24,0x21,0x25,0x24,
+ 0x02,0x25,0x24,0x02,0x25,0x24,0x21,0x41,0x44,0x02,0x21,0x44,0x02,0x21,0x44,0x02,
+ 0x21,0x45,0x21,0x25,0x24,0x21,0x25,0x44,0x02,0x21,0x25,0x21,0x25,0x24,0x02,0x21,
+ 0x45,0x41,0x45,0x69,0x6a,0x9f,0x04,0xff,0xef,0xfb,0xff,0xf7,0xfb,0xff,0xde,0x97,
+ 0xb6,0xdb,0xb2,0x71,0x03,0x49,0x41,0x49,0x89,0x6a,0x8e,0xd1,0xb6,0xb3,0xfa,0xff,
+ 0xfb,0xba,0xf3,0x05,0xff,0xd7,0xd3,0xfa,0xff,0xf7,0x56,0x62,0x9a,0xfa,0xdf,0xa6,
+ 0x49,0x41,0x45,0x49,0x02,0x45,0x48,0x03,0x45,0x41,0x01,0x03,0x23,0x43,0x63,0x83,
+ 0x0a,0xff,0x04,0x00,0x03,0xff,0x04,0x00,0x04,0xff,0x00,0x12,0x00,0x04,0xff,0x06,
+ 0x00,0x06,0xff,0x01,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,
+ 0x63,0x43,0x23,0x01,0x03,0x02,0x45,0x21,0x44,0x21,0x25,0x24,0x25,0x21,0x44,0x02,
+ 0x21,0x25,0x24,0x21,0x41,0x24,0x21,0x41,0x21,0x25,0x45,0x03,0x21,0x24,0x02,0x21,
+ 0x44,0x21,0x25,0x45,0x02,0x21,0x25,0x41,0x02,0x25,0x20,0x21,0x25,0x41,0x02,0x21,
+ 0x24,0x21,0x24,0x02,0x21,0x45,0x21,0x41,0x44,0x21,0x25,0x24,0x45,0x41,0x21,0x45,
+ 0x21,0x25,0x02,0x45,0x21,0x45,0x40,0x24,0x45,0x20,0x45,0x40,0x21,0x02,0x45,0x02,
+ 0x25,0x45,0x21,0x45,0x44,0x21,0x45,0x44,0x21,0x45,0x41,0x02,0x21,0x41,0x21,0x41,
+ 0x44,0x21,0x41,0x20,0x25,0x21,0x20,0x02,0x25,0x44,0x21,0x25,0x45,0x21,0x45,0x44,
+ 0x21,0x02,0x45,0x41,0x45,0x61,0x73,0xff,0xbf,0x8a,0x95,0xf7,0xff,0xdb,0xf7,0xd7,
+ 0x02,0xff,0xfb,0xb3,0x50,0x53,0xfe,0x9e,0x61,0x48,0x05,0x49,0x91,0xb2,0xb7,0xf6,
+ 0xb1,0xb3,0xfe,0xff,0xf7,0x02,0xff,0xdf,0xbb,0xb7,0x85,0x02,0x8d,0x6a,0xb1,0xf3,
+ 0xf9,0x4f,0x85,0x9b,0xd7,0x96,0x61,0x07,0x45,0x41,0x02,0x45,0x01,0x03,0x23,0x43,
+ 0x63,0x83,0x09,0xff,0x05,0x00,0x03,0xff,0x05,0x00,0x03,0xff,0x00,0x13,0x00,0x02,
+ 0xff,0x06,0x00,0x07,0xff,0x01,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,
+ 0xa3,0x83,0x63,0x43,0x23,0x01,0x03,0x03,0x45,0x21,0x45,0x44,0x25,0x02,0x45,0x25,
+ 0x45,0x44,0x20,0x02,0x25,0x21,0x25,0x45,0x20,0x25,0x02,0x41,0x25,0x41,0x21,0x02,
+ 0x25,0x41,0x02,0x25,0x41,0x21,0x45,0x24,0x21,0x41,0x45,0x02,0x21,0x44,0x02,0x21,
+ 0x25,0x04,0x21,0x41,0x20,0x21,0x41,0x20,0x03,0x21,0x44,0x21,0x45,0x44,0x21,0x41,
+ 0x44,0x21,0x25,0x45,0x25,0x41,0x40,0x21,0x45,0x24,0x45,0x24,0x02,0x21,0x45,0x02,
+ 0x21,0x44,0x02,0x21,0x44,0x02,0x21,0x44,0x21,0x25,0x44,0x21,0x41,0x44,0x02,0x21,
+ 0x44,0x21,0x25,0x45,0x02,0x21,0x24,0x02,0x21,0x44,0x21,0x02,0x45,0x02,0x21,0x03,
+ 0x45,0x44,0x45,0x76,0xf6,0xff,0xab,0x71,0xab,0x03,0xff,0xca,0x50,0xaf,0xfa,0xba,
+ 0x91,0x65,0xac,0xdf,0xca,0x4c,0x46,0x49,0x69,0x6a,0x69,0x6c,0x93,0xba,0xd9,0xdf,
+ 0xae,0x91,0xcf,0x02,0xff,0xdb,0xaa,0x4c,0x6f,0x6a,0x6d,0x02,0x49,0x48,0x46,0x6d,
+ 0xf1,0xb6,0x8a,0xad,0xb3,0xce,0x51,0x41,0x04,0x45,0x44,0x02,0x45,0x49,0x45,0x01,
+ 0x03,0x23,0x43,0x63,0x83,0x09,0xff,0x05,0x00,0x02,0xff,0x06,0x00,0x02,0xff,0x00,
+ 0x14,0x00,0xff,0x06,0x00,0x08,0xff,0x01,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,
+ 0xe3,0xc3,0xa3,0x83,0x63,0x43,0x23,0x01,0x03,0x41,0x45,0x41,0x24,0x21,0x45,0x44,
+ 0x02,0x21,0x24,0x25,0x21,0x02,0x45,0x21,0x41,0x44,0x21,0x45,0x02,0x21,0x44,0x25,
+ 0x21,0x25,0x02,0x45,0x21,0x45,0x41,0x45,0x44,0x21,0x25,0x45,0x21,0x25,0x45,0x21,
+ 0x49,0x48,0x21,0x41,0x44,0x21,0x45,0x44,0x21,0x41,0x24,0x02,0x21,0x44,0x21,0x02,
+ 0x41,0x25,0x02,0x41,0x45,0x02,0x21,0x45,0x21,0x02,0x25,0x41,0x21,0x25,0x21,0x45,
+ 0x03,0x25,0x45,0x21,0x02,0x41,0x21,0x25,0x41,0x25,0x45,0x20,0x21,0x41,0x40,0x02,
+ 0x25,0x20,0x25,0x41,0x20,0x25,0x45,0x24,0x21,0x45,0x24,0x21,0x45,0x41,0x21,0x41,
+ 0x40,0x02,0x25,0x41,0x04,0x45,0x49,0xcb,0xdf,0xd7,0x91,0x8e,0xb2,0xf3,0xda,0xba,
+ 0xb7,0x89,0x98,0xdb,0x02,0xb2,0x6d,0x6e,0xb1,0xb2,0x8d,0x4d,0x89,0x69,0x4d,0x8f,
+ 0x8d,0x71,0xae,0xba,0x92,0x88,0x97,0xfe,0xff,0xda,0x92,0x6d,0x4e,0x6d,0x69,0x04,
+ 0x49,0x69,0x49,0x4a,0xd1,0x95,0x65,0xb1,0xb3,0xad,0x29,0x41,0x02,0x45,0x02,0x41,
+ 0x04,0x45,0x01,0x03,0x23,0x43,0x63,0x83,0x09,0xff,0x06,0x00,0xff,0x06,0x00,0x02,
+ 0xff,0x03,0x00,0x9c,0x43,0x0a,0xff,0x0c,0x00,0x08,0xff,0x01,0x03,0x23,0x43,0x63,
+ 0x83,0x03,0xff,0xe3,0xc3,0xa3,0x83,0x63,0x43,0x23,0x01,0x03,0x02,0x45,0x21,0x02,
+ 0x45,0x21,0x45,0x44,0x02,0x21,0x41,0x45,0x21,0x25,0x24,0x02,0x21,0x25,0x21,0x02,
+ 0x45,0x21,0x02,0x41,0x44,0x25,0x21,0x02,0x44,0x02,0x21,0x45,0x02,0x21,0x45,0x21,
+ 0x25,0x45,0x03,0x21,0x45,0x02,0x21,0x25,0x02,0x21,0x45,0x02,0x21,0x45,0x02,0x21,
+ 0x25,0x21,0x25,0x02,0x21,0x24,0x25,0x45,0x44,0x25,0x21,0x44,0x02,0x25,0x44,0x21,
+ 0x02,0x45,0x21,0x44,0x02,0x21,0x44,0x03,0x25,0x21,0x45,0x24,0x21,0x25,0x24,0x21,
+ 0x41,0x24,0x21,0x02,0x45,0x21,0x41,0x24,0x02,0x21,0x24,0x25,0x21,0x24,0x21,0x25,
+ 0x24,0x02,0x21,0x45,0x21,0x45,0x44,0x02,0x25,0x49,0x6b,0xda,0xfa,0xba,0x92,0xb5,
+ 0xb7,0xb6,0xf9,0xdf,0x8f,0x4c,0x6b,0xde,0xbe,0xba,0xae,0x4c,0x4a,0x02,0x6d,0x93,
+ 0x8e,0xae,0xaf,0xfe,0x5f,0x83,0xfe,0x7f,0x40,0x56,0xf6,0xde,0xbb,0xba,0x02,0x69,
+ 0x6d,0x6e,0x02,0x6d,0x6e,0x69,0x6d,0x6b,0xb1,0x51,0x8f,0xd6,0x55,0x62,0xba,0x9b,
+ 0x40,0x25,0x03,0x45,0x44,0x41,0x02,0x45,0x21,0x01,0x03,0x23,0x43,0x63,0x83,0x08,
+ 0xff,0x07,0x00,0xff,0x07,0x00,0xff,0x03,0x00,0x9c,0x43,0x0b,0xff,0x0a,0x00,0x09,
+ 0xff,0x01,0x03,0x23,0x43,0x07,0xff,0xa3,0x83,0x63,0x43,0x23,0x01,0x03,0x45,0x49,
+ 0x45,0x02,0x21,0x24,0x02,0x21,0x44,0x21,0x02,0x25,0x02,0x21,0x25,0x21,0x25,0x44,
+ 0x21,0x02,0x25,0x45,0x41,0x21,0x25,0x02,0x45,0x40,0x21,0x41,0x40,0x21,0x41,0x40,
+ 0x21,0x25,0x45,0x02,0x21,0x41,0x02,0x21,0x41,0x24,0x21,0x45,0x24,0x21,0x45,0x44,
+ 0x02,0x21,0x25,0x21,0x41,0x44,0x21,0x45,0x25,0x45,0x21,0x25,0x24,0x25,0x21,0x44,
+ 0x02,0x21,0x45,0x21,0x41,0x20,0x21,0x45,0x24,0x25,0x45,0x25,0x21,0x45,0x40,0x21,
+ 0x45,0x02,0x21,0x45,0x25,0x21,0x45,0x41,0x21,0x25,0x21,0x02,0x25,0x45,0x02,0x25,
+ 0x21,0x25,0x45,0x20,0x21,0x45,0x41,0x21,0x45,0x41,0x03,0x45,0x4a,0xd5,0xf7,0xfa,
+ 0xde,0xb6,0xbf,0x96,0xae,0xb2,0x95,0x92,0x6a,0x91,0xb2,0xbf,0xda,0x95,0x89,0x4d,
+ 0xaa,0x92,0x8e,0x89,0x96,0x6e,0x02,0x45,0x69,0xab,0x89,0x4d,0xaa,0xbf,0xff,0xb5,
+ 0xb1,0x4d,0x65,0x6d,0x8d,0x02,0x8e,0x8d,0x89,0x6e,0x8e,0x8d,0x96,0x75,0xd3,0xad,
+ 0x51,0xaa,0xb1,0x4a,0x40,0x02,0x49,0x45,0x25,0x45,0x44,0x02,0x45,0x01,0x03,0x23,
+ 0x43,0x63,0x83,0x08,0xff,0x0f,0x00,0xff,0x03,0x00,0x9c,0x43,0x06,0x00,0x06,0xff,
+ 0x08,0x00,0x0a,0xff,0x01,0x03,0x23,0x09,0xff,0x83,0x63,0x43,0x23,0x01,0x03,0x02,
+ 0x45,0x41,0x44,0x21,0x25,0x24,0x21,0x02,0x45,0x44,0x02,0x21,0x45,0x21,0x02,0x41,
+ 0x25,0x02,0x41,0x44,0x02,0x21,0x02,0x44,0x02,0x21,0x45,0x24,0x21,0x02,0x25,0x02,
+ 0x21,0x44,0x02,0x21,0x45,0x20,0x25,0x45,0x25,0x02,0x21,0x25,0x02,0x21,0x24,0x03,
+ 0x25,0x02,0x21,0x24,0x02,0x21,0x24,0x21,0x25,0x44,0x02,0x21,0x45,0x03,0x21,0x02,
+ 0x45,0x21,0x25,0x45,0x21,0x44,0x21,0x41,0x44,0x21,0x41,0x24,0x21,0x45,0x24,0x02,
+ 0x21,0x44,0x25,0x21,0x44,0x25,0x21,0x44,0x02,0x21,0x44,0x02,0x21,0x44,0x25,0x41,
+ 0x44,0x21,0x02,0x45,0x21,0x02,0x45,0x41,0x45,0x69,0x6f,0xae,0xb1,0xbf,0xd7,0xb5,
+ 0x02,0xb6,0x95,0x02,0x92,0xb2,0x8d,0x71,0x91,0x02,0x6e,0xcd,0xbf,0xaf,0x8d,0x8e,
+ 0xb2,0x96,0x8f,0xb2,0x55,0x46,0x65,0x48,0x4a,0x96,0xb6,0x8d,0x9a,0xfb,0xfe,0xb6,
+ 0x95,0x6a,0x02,0x8d,0x8f,0xba,0xfa,0xdb,0xf6,0xd5,0xd3,0x02,0xff,0x88,0x76,0xb7,
+ 0x69,0x75,0xb2,0x68,0x25,0x06,0x45,0x48,0x4a,0x01,0x03,0x23,0x43,0x63,0x83,0x08,
+ 0xff,0x0f,0x00,0xff,0x0d,0x00,0x05,0xff,0x06,0x00,0x0b,0xff,0x01,0x03,0x0a,0xff,
+ 0x83,0x63,0x43,0x23,0x01,0x03,0x45,0x49,0x44,0x25,0x45,0x40,0x02,0x45,0x21,0x25,
+ 0x21,0x44,0x21,0x02,0x25,0x02,0x21,0x44,0x21,0x41,0x21,0x25,0x02,0x21,0x44,0x21,
+ 0x45,0x44,0x21,0x02,0x41,0x21,0x02,0x41,0x21,0x02,0x45,0x21,0x45,0x44,0x25,0x45,
+ 0x21,0x24,0x25,0x41,0x24,0x21,0x41,0x44,0x25,0x21,0x40,0x02,0x21,0x41,0x21,0x45,
+ 0x44,0x21,0x41,0x44,0x21,0x41,0x40,0x02,0x21,0x41,0x21,0x25,0x41,0x45,0x41,0x44,
+ 0x24,0x21,0x25,0x02,0x21,0x24,0x41,0x21,0x24,0x02,0x21,0x45,0x41,0x21,0x02,0x25,
+ 0x21,0x25,0x02,0x21,0x25,0x41,0x45,0x24,0x02,0x21,0x45,0x20,0x25,0x45,0x41,0x45,
+ 0x49,0x65,0x77,0xfe,0xff,0xd7,0xb6,0xb1,0x9a,0xda,0x95,0x72,0xb1,0x92,0x6e,0x91,
+ 0x6d,0x72,0x8e,0x4c,0x52,0xf5,0xba,0xae,0xb5,0xb2,0xb6,0x96,0x92,0x8d,0x4d,0x45,
+ 0x4e,0x8d,0x8e,0xb1,0x91,0xce,0xff,0xbf,0x8d,0xbe,0xb6,0x6c,0x77,0xfd,0xff,0x02,
+ 0xfe,0x02,0xd2,0xf9,0xf7,0xff,0xbf,0x84,0x77,0x92,0x8a,0x96,0x4e,0x40,0x06,0x45,
+ 0x02,0x49,0x01,0x03,0x23,0x43,0x63,0x83,0x08,0xff,0x00,0x10,0x00,0xff,0x0d,0x00,
+ 0x04,0xff,0x06,0x00,0x0b,0xff,0x01,0x03,0x04,0xff,0xa3,0xc3,0x04,0xff,0x83,0x63,
+ 0x43,0x23,0x01,0x03,0x49,0x45,0x21,0x41,0x45,0x21,0x02,0x45,0x41,0x02,0x45,0x21,
+ 0x02,0x45,0x21,0x04,0x45,0x25,0x45,0x21,0x25,0x45,0x25,0x03,0x21,0x24,0x02,0x25,
+ 0x44,0x21,0x02,0x25,0x02,0x21,0x44,0x25,0x45,0x24,0x21,0x25,0x21,0x44,0x02,0x21,
+ 0x24,0x21,0x02,0x25,0x21,0x02,0x25,0x02,0x21,0x24,0x21,0x41,0x44,0x02,0x21,0x45,
+ 0x02,0x21,0x45,0x21,0x25,0x45,0x21,0x41,0x45,0x24,0x21,0x41,0x44,0x21,0x41,0x24,
+ 0x21,0x41,0x24,0x02,0x21,0x44,0x21,0x41,0x40,0x25,0x21,0x44,0x21,0x25,0x45,0x02,
+ 0x21,0x44,0x02,0x21,0x45,0x21,0x45,0x44,0x21,0x41,0x44,0x42,0xb5,0x9a,0x8a,0xde,
+ 0xff,0xd4,0x9a,0xd6,0xba,0xb6,0x91,0x93,0xb2,0xb1,0x96,0x6a,0x68,0x72,0x6e,0x6c,
+ 0x73,0xd6,0xb5,0x92,0x96,0x03,0xb6,0x75,0x65,0x69,0x48,0x4a,0x95,0xb6,0x91,0x9d,
+ 0xfb,0xd9,0xda,0xb5,0x96,0xb2,0xed,0xff,0xd3,0xcc,0xb5,0xb2,0xad,0x8e,0xfe,0xff,
+ 0xfd,0x8b,0x88,0x03,0x92,0x69,0x45,0x40,0x02,0x45,0x44,0x02,0x45,0x49,0x25,0x01,
+ 0x03,0x23,0x43,0x63,0x83,0x07,0xff,0x00,0x11,0x00,0x02,0xff,0x0c,0x00,0x03,0xff,
+ 0x08,0x00,0x0a,0xff,0x01,0x03,0x03,0xff,0x83,0xa3,0xc3,0x04,0xff,0x83,0x63,0x43,
+ 0x23,0x01,0x03,0x03,0x45,0x41,0x45,0x21,0x45,0x40,0x21,0x03,0x45,0x02,0x41,0x07,
+ 0x45,0x02,0x41,0x21,0x02,0x45,0x25,0x24,0x21,0x45,0x24,0x02,0x25,0x20,0x21,0x02,
+ 0x45,0x21,0x02,0x45,0x21,0x45,0x41,0x40,0x21,0x41,0x24,0x21,0x45,0x44,0x21,0x02,
+ 0x45,0x21,0x45,0x44,0x25,0x21,0x40,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x25,0x45,
+ 0x02,0x21,0x45,0x41,0x21,0x40,0x21,0x25,0x02,0x45,0x21,0x44,0x02,0x21,0x45,0x21,
+ 0x25,0x24,0x21,0x41,0x24,0x02,0x21,0x45,0x41,0x21,0x44,0x21,0x25,0x45,0x02,0x21,
+ 0x25,0x21,0x25,0x45,0x41,0x21,0x8c,0xbf,0xae,0xb5,0xd3,0xff,0xbf,0xd3,0xfe,0xbe,
+ 0x95,0x96,0xb9,0xbe,0xb2,0x91,0x6c,0x72,0x6d,0x6e,0x72,0x91,0x02,0x92,0xb5,0x96,
+ 0x9b,0xb6,0x91,0x96,0xb2,0x6c,0x49,0x68,0x8a,0xba,0x76,0x8d,0xbf,0xff,0xde,0xd2,
+ 0x95,0x8d,0xbf,0xff,0xfd,0xff,0xde,0xb5,0x96,0xb2,0x64,0xbf,0xff,0xbc,0x66,0xad,
+ 0x8d,0x92,0x6e,0x40,0x08,0x45,0x01,0x03,0x23,0x43,0x63,0x83,0x07,0xff,0x0c,0x00,
+ 0xff,0x04,0x00,0x09,0xff,0x05,0x00,0x02,0xff,0x0a,0x00,0x09,0xff,0x01,0x03,0x23,
+ 0x43,0x63,0x83,0xa3,0xc3,0x04,0xff,0x83,0x63,0x43,0x23,0x01,0x03,0x49,0x45,0x03,
+ 0x21,0x45,0x21,0x41,0x44,0x21,0x45,0x24,0x02,0x21,0x45,0x21,0x25,0x40,0x21,0x45,
+ 0x44,0x21,0x45,0x44,0x02,0x21,0x24,0x45,0x24,0x02,0x21,0x24,0x21,0x25,0x45,0x21,
+ 0x45,0x44,0x02,0x21,0x45,0x03,0x21,0x44,0x02,0x21,0x44,0x21,0x25,0x45,0x02,0x21,
+ 0x25,0x21,0x25,0x24,0x21,0x45,0x24,0x21,0x02,0x25,0x02,0x21,0x44,0x02,0x21,0x45,
+ 0x20,0x21,0x45,0x24,0x21,0x41,0x44,0x02,0x21,0x40,0x21,0x41,0x44,0x02,0x21,0x41,
+ 0x21,0x25,0x45,0x02,0x21,0x24,0x21,0x41,0x40,0x21,0x25,0x24,0x02,0x21,0x41,0x21,
+ 0x25,0x45,0x25,0x45,0x44,0x4b,0xd1,0x54,0x6f,0xfa,0xde,0xdb,0xfe,0xff,0xb1,0xb6,
+ 0xb1,0xb6,0xda,0xba,0x8d,0x51,0xce,0x91,0x4e,0x68,0x7b,0x92,0xb1,0x95,0x96,0xd2,
+ 0xb9,0x72,0xad,0x91,0x6d,0x4d,0x4a,0x95,0xb6,0x8d,0x91,0xed,0xff,0xdf,0xda,0xb5,
+ 0x71,0xac,0xbf,0xfe,0xff,0xfe,0xff,0xb9,0x8d,0x69,0x68,0x9b,0xf7,0x58,0x6f,0x8e,
+ 0x89,0x6d,0x45,0x44,0x07,0x45,0x01,0x03,0x23,0x43,0x63,0x83,0x07,0xff,0x04,0x00,
+ 0xff,0x07,0x00,0xff,0x05,0x00,0x09,0xff,0x04,0x00,0x02,0xff,0x0a,0x00,0x09,0xff,
+ 0x01,0x03,0x23,0x43,0x63,0x83,0xa3,0x04,0xff,0xa3,0x83,0x63,0x43,0x23,0x01,0x03,
+ 0x02,0x45,0x25,0x21,0x41,0x21,0x45,0x25,0x45,0x41,0x25,0x45,0x24,0x21,0x45,0x44,
+ 0x02,0x21,0x24,0x45,0x24,0x21,0x25,0x45,0x44,0x02,0x21,0x41,0x02,0x25,0x02,0x21,
+ 0x25,0x02,0x21,0x45,0x24,0x25,0x45,0x41,0x21,0x45,0x25,0x24,0x25,0x45,0x40,0x25,
+ 0x45,0x40,0x02,0x25,0x40,0x21,0x45,0x44,0x21,0x45,0x44,0x21,0x02,0x41,0x21,0x02,
+ 0x41,0x21,0x02,0x45,0x21,0x02,0x45,0x02,0x21,0x24,0x02,0x21,0x45,0x02,0x21,0x25,
+ 0x21,0x25,0x24,0x21,0x25,0x45,0x25,0x21,0x24,0x25,0x21,0x24,0x02,0x21,0x25,0x02,
+ 0x21,0x44,0x02,0x21,0x45,0x21,0x25,0x03,0x45,0x8d,0x75,0x6a,0xad,0xb2,0xda,0xfd,
+ 0xde,0xdf,0xba,0xae,0xba,0xda,0xb2,0xde,0x7a,0x64,0x7f,0x97,0x68,0x4d,0x8c,0xb7,
+ 0xba,0xb6,0xae,0x02,0xde,0xb5,0xba,0x96,0x48,0x4d,0x6d,0x6e,0x9a,0x96,0x65,0x9f,
+ 0xff,0xd9,0xde,0xbd,0x99,0x6d,0x74,0xfb,0x02,0xfe,0xd9,0xfa,0xba,0xb6,0x89,0x90,
+ 0xbb,0xaa,0xb0,0x96,0x8e,0x6d,0x48,0x29,0x49,0x05,0x45,0x44,0x01,0x03,0x23,0x43,
+ 0x63,0x83,0x06,0xff,0x05,0x00,0x02,0xff,0x05,0x00,0x02,0xff,0x00,0x12,0x00,0xff,
+ 0x05,0x00,0xff,0x06,0x00,0x08,0xff,0x01,0x03,0x23,0x43,0x63,0x83,0x05,0xff,0xa3,
+ 0x83,0x63,0x43,0x23,0x01,0x03,0x04,0x45,0x25,0x45,0x21,0x40,0x21,0x41,0x40,0x03,
+ 0x45,0x21,0x45,0x44,0x02,0x21,0x41,0x02,0x25,0x24,0x02,0x21,0x44,0x21,0x25,0x45,
+ 0x21,0x41,0x24,0x25,0x02,0x45,0x21,0x02,0x45,0x21,0x25,0x45,0x03,0x21,0x24,0x21,
+ 0x41,0x24,0x02,0x21,0x44,0x25,0x21,0x44,0x21,0x41,0x24,0x02,0x21,0x24,0x02,0x25,
+ 0x44,0x21,0x02,0x25,0x02,0x21,0x44,0x25,0x45,0x02,0x41,0x21,0x25,0x24,0x21,0x41,
+ 0x24,0x21,0x41,0x20,0x03,0x25,0x21,0x41,0x40,0x02,0x25,0x44,0x21,0x25,0x44,0x21,
+ 0x02,0x41,0x21,0x41,0x06,0x45,0x65,0x7b,0x8f,0x68,0x77,0xba,0xb5,0xba,0xfe,0xff,
+ 0xfe,0xba,0xf6,0xdf,0xfe,0xde,0xb2,0x92,0x8d,0x72,0x6d,0x69,0x6e,0x91,0xad,0x03,
+ 0xb6,0x8d,0x99,0xd6,0xb5,0x4e,0x65,0x72,0x8e,0x8d,0x91,0x6d,0xa9,0xbf,0xdf,0xfa,
+ 0xd9,0x9a,0x95,0x6d,0x74,0xee,0xfe,0xff,0xb5,0xb2,0x02,0xd6,0xb1,0x91,0x71,0x6f,
+ 0xf6,0x95,0x6a,0x46,0x44,0x25,0x49,0x04,0x45,0x21,0x01,0x03,0x23,0x43,0x63,0x83,
+ 0x06,0xff,0x05,0x00,0x02,0xff,0x05,0x00,0x03,0xff,0x00,0x17,0x00,0x02,0xff,0x06,
+ 0x00,0x07,0xff,0x01,0x03,0x23,0x43,0x63,0x05,0xff,0xc3,0xa3,0x83,0x63,0x43,0x23,
+ 0x01,0x03,0x02,0x45,0x41,0x45,0x41,0x03,0x21,0x44,0x21,0x24,0x41,0x02,0x21,0x24,
+ 0x02,0x21,0x44,0x21,0x25,0x45,0x02,0x21,0x25,0x41,0x02,0x25,0x41,0x21,0x45,0x02,
+ 0x21,0x24,0x41,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,0x02,0x45,0x21,0x25,0x41,
+ 0x02,0x25,0x20,0x21,0x25,0x41,0x21,0x25,0x02,0x21,0x45,0x24,0x21,0x45,0x24,0x02,
+ 0x25,0x20,0x21,0x02,0x45,0x21,0x02,0x45,0x25,0x21,0x24,0x21,0x25,0x24,0x02,0x25,
+ 0x24,0x02,0x21,0x24,0x25,0x21,0x24,0x02,0x21,0x44,0x20,0x21,0x44,0x02,0x21,0x25,
+ 0x02,0x21,0x44,0x21,0x45,0x44,0x45,0x6d,0x91,0x02,0xb7,0xf6,0x95,0x72,0xb5,0xba,
+ 0xb6,0xd9,0xdf,0x02,0xff,0xb5,0x02,0xbf,0xaf,0xfe,0x9a,0x8a,0xb5,0x55,0x6a,0x02,
+ 0x91,0x71,0x76,0xb5,0xb6,0xae,0x90,0x96,0xbe,0xde,0x90,0x72,0x8d,0x6e,0x6d,0x6c,
+ 0x6e,0x9a,0xd9,0xdb,0xfe,0xde,0x91,0x9e,0x96,0x6c,0x4d,0xf1,0xde,0xf6,0xb5,0xae,
+ 0xda,0xfa,0xb5,0x65,0xa8,0xb7,0xb2,0x92,0x44,0x21,0x03,0x45,0x44,0x02,0x45,0x44,
+ 0x01,0x03,0x23,0x43,0x63,0x83,0x06,0xff,0x05,0x00,0x02,0xff,0x05,0x00,0x03,0xff,
+ 0x00,0x16,0x00,0x04,0xff,0x06,0x00,0x06,0xff,0x01,0x03,0x23,0x43,0x05,0xff,0xe3,
+ 0xc3,0xa3,0x83,0x63,0x43,0x23,0x01,0x03,0x49,0x02,0x45,0x49,0x02,0x45,0x03,0x21,
+ 0x41,0x21,0x25,0x45,0x21,0x02,0x25,0x41,0x02,0x25,0x41,0x21,0x45,0x24,0x21,0x25,
+ 0x24,0x21,0x41,0x40,0x02,0x21,0x41,0x21,0x25,0x45,0x21,0x25,0x45,0x21,0x25,0x44,
+ 0x25,0x21,0x41,0x24,0x21,0x41,0x45,0x02,0x21,0x44,0x02,0x21,0x45,0x02,0x21,0x45,
+ 0x21,0x45,0x24,0x02,0x21,0x24,0x21,0x25,0x45,0x21,0x45,0x44,0x21,0x25,0x45,0x20,
+ 0x25,0x45,0x40,0x25,0x45,0x24,0x25,0x45,0x40,0x02,0x21,0x41,0x21,0x02,0x25,0x21,
+ 0x41,0x20,0x25,0x45,0x24,0x21,0x45,0x40,0x25,0x45,0x40,0x4a,0x89,0x69,0x6f,0xfa,
+ 0xfb,0xfe,0xbb,0x95,0x9b,0xda,0xb9,0xbf,0xff,0xfa,0xff,0xdb,0xd1,0xba,0xde,0xdf,
+ 0xad,0x55,0xb2,0x8d,0x02,0x91,0x9b,0xb2,0x8d,0x9f,0xde,0x99,0x92,0x95,0x92,0x9b,
+ 0xb6,0x91,0x8d,0x02,0x71,0x02,0x6d,0x68,0x72,0xdd,0x02,0xde,0xb6,0x70,0x72,0x71,
+ 0x02,0x6d,0x94,0xb2,0xb1,0xb5,0xce,0xda,0xb3,0x4c,0x4a,0xd1,0xb6,0xad,0x49,0x44,
+ 0x2a,0x06,0x45,0x01,0x03,0x23,0x43,0x63,0x83,0x05,0xff,0x05,0x00,0x03,0xff,0x05,
+ 0x00,0x03,0xff,0x00,0x15,0x00,0x05,0xff,0x06,0x00,0x06,0xff,0x01,0x03,0x23,0x05,
+ 0xff,0x02,0xe3,0xc3,0xa3,0x83,0x63,0x43,0x23,0x01,0x03,0x45,0x04,0x49,0x44,0x02,
+ 0x49,0x45,0x41,0x21,0x45,0x21,0x25,0x02,0x45,0x21,0x45,0x41,0x45,0x44,0x21,0x25,
+ 0x02,0x45,0x21,0x45,0x41,0x21,0x02,0x45,0x41,0x21,0x45,0x21,0x25,0x02,0x45,0x21,
+ 0x45,0x40,0x24,0x45,0x02,0x21,0x44,0x25,0x21,0x44,0x21,0x25,0x24,0x21,0x02,0x45,
+ 0x44,0x02,0x21,0x41,0x45,0x21,0x25,0x24,0x02,0x21,0x25,0x21,0x25,0x03,0x45,0x21,
+ 0x41,0x24,0x21,0x41,0x44,0x21,0x41,0x24,0x21,0x25,0x24,0x02,0x21,0x24,0x02,0x21,
+ 0x24,0x02,0x21,0x44,0x02,0x21,0x24,0x21,0x45,0x24,0x21,0x51,0x92,0x69,0x6a,0xad,
+ 0xcf,0xfe,0x9f,0xb7,0xba,0x99,0xb7,0xb6,0xd9,0xdf,0xdb,0xfa,0xde,0xb6,0xb5,0x8e,
+ 0xda,0x9a,0x8e,0x02,0x91,0xbb,0xae,0xb1,0xbb,0x02,0xb6,0x8e,0xbe,0xde,0x94,0x4e,
+ 0x8d,0x96,0x8a,0x6c,0x6f,0xae,0x91,0x71,0x6d,0x4d,0x6a,0x9e,0xfa,0xba,0xb2,0x90,
+ 0x71,0x72,0x91,0x72,0x02,0x8d,0x8e,0xde,0xda,0x91,0x46,0x48,0x6b,0xda,0x9a,0x68,
+ 0x45,0x44,0x02,0x45,0x49,0x02,0x45,0x44,0x01,0x03,0x23,0x43,0x63,0x83,0x00,0x3b,
+ 0xff,0x01,0x03,0x0a,0xff,0x83,0x63,0x43,0x23,0x01,0x03,0x44,0x46,0x71,0x92,0x8e,
+ 0x6e,0x6d,0x03,0x69,0x03,0x49,0x44,0x25,0x21,0x02,0x44,0x02,0x21,0x45,0x02,0x21,
+ 0x45,0x40,0x02,0x21,0x45,0x21,0x44,0x21,0x45,0x44,0x21,0x41,0x44,0x21,0x25,0x45,
+ 0x25,0x41,0x40,0x21,0x02,0x45,0x21,0x44,0x40,0x25,0x45,0x40,0x02,0x45,0x21,0x25,
+ 0x21,0x44,0x21,0x02,0x25,0x02,0x21,0x25,0x21,0x25,0x44,0x04,0x21,0x45,0x25,0x41,
+ 0x21,0x45,0x41,0x21,0x41,0x20,0x02,0x25,0x02,0x21,0x45,0x20,0x21,0x45,0x20,0x21,
+ 0x25,0x41,0x21,0x25,0x41,0x21,0x25,0x41,0x25,0x49,0xa6,0xb1,0x51,0x6d,0x77,0xdd,
+ 0xff,0xf2,0x02,0xba,0x02,0x96,0xb3,0xb6,0xda,0xd6,0xdf,0xfe,0xbe,0xae,0xd5,0xb6,
+ 0x8d,0x91,0x92,0x6e,0xd9,0xba,0xb6,0xfe,0xfb,0xd1,0x55,0xce,0xfe,0x9b,0xad,0xb6,
+ 0xb2,0x6d,0x69,0x8d,0x6d,0x6e,0xb1,0x75,0x49,0x4c,0x69,0x77,0xfa,0xbe,0xb1,0x71,
+ 0x04,0x6d,0x6e,0x91,0xae,0xb6,0x92,0x6c,0x49,0x4d,0xcb,0xda,0x4f,0x40,0x03,0x45,
+ 0x41,0x02,0x45,0x25,0x01,0x03,0x23,0x43,0x63,0x83,0x00,0x3b,0xff,0x01,0x03,0x0a,
+ 0xff,0x83,0x63,0x43,0x23,0x01,0x03,0x41,0xb0,0xf7,0x02,0xff,0xfb,0xd3,0xd7,0xb6,
+ 0x92,0x8e,0x6d,0x6e,0x6d,0x49,0x45,0x40,0x21,0x41,0x40,0x21,0x41,0x40,0x21,0x41,
+ 0x44,0x21,0x03,0x41,0x25,0x02,0x41,0x45,0x02,0x21,0x45,0x21,0x02,0x25,0x41,0x21,
+ 0x25,0x44,0x25,0x02,0x21,0x44,0x25,0x45,0x21,0x02,0x45,0x41,0x02,0x45,0x21,0x02,
+ 0x45,0x21,0x05,0x45,0x02,0x41,0x03,0x45,0x02,0x25,0x21,0x40,0x21,0x41,0x24,0x25,
+ 0x45,0x44,0x02,0x21,0x20,0x21,0x45,0x24,0x02,0x21,0x44,0x21,0x41,0x24,0x02,0x21,
+ 0x44,0x25,0x45,0x25,0x46,0x02,0x96,0x6c,0x2d,0x69,0x6f,0xde,0xdf,0xb2,0xba,0xda,
+ 0xb6,0x02,0xba,0xb3,0xfe,0xde,0xb6,0xfe,0xde,0xb2,0xda,0x7a,0x61,0x02,0x6d,0x6a,
+ 0x02,0xde,0xb6,0xfe,0xff,0xb5,0xde,0xfe,0xda,0x02,0xfe,0xb9,0x92,0x91,0x69,0x02,
+ 0x6d,0x73,0x8e,0x4c,0x02,0x49,0x68,0x93,0xda,0x9a,0x02,0x8d,0x71,0x69,0x6d,0x8d,
+ 0x92,0x96,0xb6,0x91,0x02,0x6d,0x69,0x91,0xd2,0x91,0x42,0x40,0x02,0x45,0x44,0x03,
+ 0x45,0x01,0x03,0x23,0x43,0x63,0x83,0x00,0x3b,0xff,0x01,0x03,0x0a,0xff,0x83,0x63,
+ 0x43,0x23,0x01,0x03,0x60,0xf3,0x09,0xff,0xfb,0xda,0xb6,0x92,0x91,0x02,0x6e,0x21,
+ 0x02,0x25,0x02,0x21,0x02,0x44,0x45,0x41,0x25,0x02,0x21,0x45,0x21,0x25,0x40,0x21,
+ 0x44,0x25,0x21,0x44,0x02,0x25,0x44,0x21,0x20,0x21,0x02,0x45,0x21,0x02,0x45,0x21,
+ 0x45,0x40,0x21,0x03,0x45,0x02,0x41,0x07,0x45,0x02,0x41,0x44,0x21,0x25,0x45,0x20,
+ 0x21,0x25,0x21,0x25,0x45,0x41,0x21,0x45,0x20,0x21,0x45,0x20,0x21,0x45,0x20,0x21,
+ 0x25,0x02,0x21,0x45,0x41,0x21,0x45,0x41,0x45,0x90,0xbb,0xad,0x2d,0x45,0x4e,0xb1,
+ 0xb2,0xda,0xba,0xd6,0xdf,0xb7,0xae,0xb2,0xb9,0xdb,0x02,0xfe,0xf7,0xff,0xdf,0xb1,
+ 0x8e,0x6d,0x69,0x4e,0x91,0xae,0x02,0xff,0xd5,0xde,0xdd,0xbe,0xad,0xb8,0xf7,0xfe,
+ 0xbe,0x02,0xb1,0x51,0x69,0x6d,0x71,0x72,0x69,0x49,0x45,0x4d,0x6d,0x69,0x96,0xb5,
+ 0x95,0x8d,0x51,0x02,0x6d,0x02,0x91,0x92,0x8e,0x48,0x4a,0x69,0x89,0x9b,0xf7,0x50,
+ 0x41,0x02,0x45,0x02,0x49,0x02,0x41,0x01,0x03,0x23,0x43,0x63,0x83,0x00,0x3b,0xff,
+ 0x01,0x03,0x0a,0xff,0x83,0x63,0x43,0x23,0x01,0x03,0x41,0xfc,0x0d,0xff,0x02,0xfb,
+ 0xb6,0xb3,0x92,0x8e,0x02,0x41,0x21,0x4a,0x49,0x41,0x40,0x45,0x21,0x45,0x44,0x02,
+ 0x21,0x24,0x45,0x24,0x21,0x25,0x45,0x40,0x25,0x45,0x40,0x25,0x21,0x45,0x44,0x02,
+ 0x21,0x45,0x21,0x41,0x44,0x21,0x45,0x24,0x02,0x21,0x45,0x21,0x25,0x40,0x21,0x45,
+ 0x44,0x21,0x45,0x44,0x25,0x45,0x25,0x21,0x24,0x21,0x41,0x44,0x25,0x21,0x44,0x02,
+ 0x21,0x44,0x21,0x25,0x45,0x02,0x21,0x45,0x21,0x41,0x44,0x21,0x41,0x44,0x25,0x45,
+ 0x44,0x77,0xb2,0x75,0x44,0x45,0x85,0x72,0x96,0xd6,0xbe,0xba,0xda,0xb5,0x92,0xd2,
+ 0xb6,0xda,0xfa,0xde,0x02,0xff,0xfe,0xfb,0x79,0x6a,0x8d,0x6d,0x49,0xbd,0x03,0xff,
+ 0xdd,0x02,0xff,0x99,0x92,0xfe,0xdf,0xb1,0x99,0xb5,0x91,0x71,0x6d,0x69,0x02,0x6d,
+ 0x02,0x69,0x4d,0x49,0x02,0x4d,0x6e,0xb5,0x95,0x02,0x6d,0x8d,0x6e,0x03,0x8d,0x6a,
+ 0x69,0x6e,0x8e,0xed,0xdf,0xab,0x28,0x21,0x45,0x49,0x02,0x45,0x44,0x01,0x03,0x23,
+ 0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,
+ 0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,
+ 0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,
+ 0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,
+ 0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,0x63,0x43,0x23,0x01,0x03,0x60,
+ 0x63,0xfe,0x00,0x12,0xff,0xde,0xb7,0x25,0x71,0x02,0x49,0x24,0x41,0x02,0x21,0x45,
+ 0x44,0x02,0x21,0x41,0x02,0x25,0x24,0x21,0x41,0x24,0x02,0x21,0x44,0x45,0x24,0x25,
+ 0x45,0x41,0x21,0x45,0x25,0x45,0x41,0x25,0x45,0x24,0x21,0x45,0x44,0x02,0x21,0x24,
+ 0x45,0x24,0x21,0x25,0x45,0x40,0x41,0x45,0x02,0x21,0x45,0x20,0x02,0x25,0x02,0x21,
+ 0x03,0x25,0x45,0x20,0x21,0x45,0x41,0x21,0x02,0x25,0x21,0x45,0x41,0x45,0x49,0x45,
+ 0x4a,0x8d,0xb3,0xad,0x31,0x65,0x95,0x91,0x8a,0xbf,0xfe,0xda,0xd6,0x96,0xae,0xb2,
+ 0xf6,0xf7,0x02,0xff,0xdd,0x02,0xff,0xfe,0xd2,0x76,0x6d,0x6e,0x71,0xaa,0xde,0xfe,
+ 0xfb,0x02,0xff,0xfe,0xff,0xdd,0xff,0xf6,0x99,0x02,0x96,0x92,0x69,0x72,0x8e,0x6d,
+ 0x4e,0x6d,0x69,0x03,0x49,0x45,0x48,0x49,0x03,0x6d,0x6e,0x6d,0x8a,0x02,0x92,0x6d,
+ 0x69,0x89,0x8a,0xba,0xfa,0xba,0x85,0x29,0x41,0x45,0x49,0x41,0x45,0x01,0x03,0x23,
+ 0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,
+ 0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,
+ 0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,
+ 0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,
+ 0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,0xa3,0x83,0x63,0x43,0x23,0x01,0x03,0x49,
+ 0x89,0xc3,0x00,0x15,0xff,0xb2,0x92,0x69,0x49,0x25,0x45,0x21,0x25,0x21,0x44,0x21,
+ 0x25,0x45,0x02,0x21,0x25,0x41,0x02,0x25,0x20,0x02,0x21,0x02,0x45,0x21,0x25,0x45,
+ 0x21,0x40,0x21,0x41,0x40,0x03,0x45,0x21,0x45,0x44,0x02,0x21,0x41,0x02,0x25,0x24,
+ 0x21,0x41,0x25,0x21,0x41,0x40,0x02,0x21,0x40,0x21,0x25,0x44,0x02,0x21,0x44,0x21,
+ 0x25,0x24,0x21,0x45,0x24,0x02,0x21,0x45,0x21,0x45,0x69,0x72,0x8e,0xb2,0x93,0xda,
+ 0x7d,0x49,0x99,0x96,0x92,0x96,0xd6,0xbb,0xfa,0xb9,0xb2,0xda,0xd6,0xba,0xbe,0xfa,
+ 0x03,0xfe,0x02,0xff,0xbe,0x8e,0x02,0x8d,0x92,0xb6,0xd1,0xdf,0xfe,0x03,0xff,0xfe,
+ 0x02,0xff,0xbd,0xb7,0xfe,0x9e,0x8e,0x02,0x8d,0x6e,0x8e,0x04,0x6d,0x6a,0x02,0x69,
+ 0x4d,0x02,0x69,0x6e,0x6a,0x69,0x6e,0x8e,0x8d,0x93,0xae,0x4c,0x4a,0xb5,0xf7,0xd6,
+ 0xfe,0x9f,0x41,0x04,0x45,0x44,0x01,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,
+ 0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,
+ 0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,
+ 0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,
+ 0xc3,0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,
+ 0xc3,0xa3,0x83,0x63,0x43,0x23,0x01,0x03,0x85,0x6e,0x86,0xe5,0x00,0x15,0xff,0xae,
+ 0x8e,0x6d,0x4e,0x21,0x25,0x02,0x45,0x02,0x25,0x41,0x21,0x45,0x24,0x21,0x41,0x45,
+ 0x02,0x21,0x44,0x25,0x21,0x25,0x45,0x41,0x03,0x21,0x44,0x21,0x24,0x41,0x02,0x21,
+ 0x24,0x02,0x21,0x44,0x21,0x25,0x45,0x02,0x21,0x25,0x41,0x21,0x24,0x02,0x21,0x45,
+ 0x21,0x25,0x45,0x20,0x25,0x45,0x20,0x21,0x24,0x02,0x21,0x25,0x02,0x21,0x24,0x21,
+ 0x45,0x48,0x8b,0xcd,0x71,0xaf,0xdf,0xbf,0x91,0x72,0x91,0x8e,0x92,0xb5,0xba,0x96,
+ 0xd5,0x02,0xb6,0xb9,0xdb,0xfe,0xde,0x91,0xdf,0xfe,0xf6,0xfe,0xdd,0xff,0xfe,0x5d,
+ 0x8e,0x8d,0xb1,0x91,0xba,0xf9,0xfb,0xff,0x02,0xfe,0xff,0xde,0xda,0xde,0xbe,0xba,
+ 0xb2,0x94,0xb7,0xb2,0x91,0x02,0x8d,0x6d,0x69,0x02,0x6d,0x02,0x69,0x6c,0x6d,0x49,
+ 0x8d,0x6d,0x69,0x8d,0x92,0x6a,0xad,0x95,0x66,0x89,0x8a,0xbe,0xdf,0xf7,0xf2,0x52,
+ 0x41,0x02,0x49,0x02,0x45,0x01,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,
+ 0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,
+ 0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,
+ 0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,
+ 0xa3,0x83,0x63,0x43,0x23,0x02,0x03,0x23,0x43,0x63,0x83,0xa3,0xc3,0x02,0xe3,0xc3,
+ 0xa3,0x83,0x63,0x43,0x23,0x01,0x03,0x4e,0x8e,0x89,0x85,0xf0,0xf7,0x00,0x14,0xff,
+ 0xad,0x6e,0x6d,0x49,0x44,0x25,0x21,0x02,0x44,0x45,0x44,0x21,0x25,0x45,0x21,0x25,
+ 0x45,0x21,0x49,0x25,0x21,0x40,0x02,0x21,0x45,0x21,0x25,0x45,0x40,0x02,0x25,0x40,
+ 0x21,0x02,0x25,0x41,0x02,0x25,0x41,0x21,0x45,0x24,0x21,0x41,0x45,0x25,0x41,0x20,
+ 0x02,0x21,0x44,0x25,0x21,0x40,0x02,0x21,0x24,0x21,0x45,0x25,0x21,0x41,0x44,0x25,
+ 0x45,0x44,0x4b,0xd5,0xbe,0x85,0x9d,0xff,0xe8,0x75,0x96,0x02,0x92,0x71,0x6e,0x02,
+ 0x91,0x9a,0xba,0xb5,0xb6,0xd6,0xb1,0xdf,0xb3,0xc9,0xde,0xfe,0xde,0xdf,0xfe,0xbe,
+ 0x02,0xb6,0x95,0x8d,0x95,0xf2,0xd9,0xbe,0xf6,0xfe,0xde,0xfe,0xdd,0xbd,0xff,0xfe,
+ 0xb6,0x90,0xbb,0xfa,0xb9,0x96,0x8e,0x69,0x6e,0x02,0x6d,0x49,0x91,0x71,0x03,0x69,
+ 0x6a,0x8d,0x6d,0x6f,0xb2,0x95,0x92,0x8e,0x6d,0x69,0x51,0xef,0xda,0xde,0xff,0xcc,
+ 0x2a,0x40,0x49,0x45,0x44,0x03,0x45,0x21,0x02,0x45,0x25,0x45,0x44,0x03,0x45,0x21,
+ 0x45,0x44,0x25,0x45,0x44,0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x05,0x45,0x21,0x45,
+ 0x44,0x02,0x45,0x44,0x45,0x25,0x45,0x02,0x41,0x44,0x02,0x45,0x44,0x21,0x02,0x45,
+ 0x41,0x04,0x45,0x44,0x09,0x45,0x21,0x45,0x44,0x02,0x45,0x44,0x0a,0x45,0x49,0x8a,
+ 0x89,0x6d,0x8e,0x61,0xf5,0xf3,0x00,0x13,0xff,0xfb,0xb5,0x6e,0x6d,0x25,0x02,0x45,
+ 0x40,0x21,0x41,0x45,0x02,0x21,0x45,0x21,0x25,0x45,0x02,0x21,0x02,0x45,0x02,0x25,
+ 0x21,0x25,0x21,0x02,0x45,0x21,0x44,0x25,0x21,0x44,0x21,0x25,0x41,0x21,0x41,0x45,
+ 0x44,0x21,0x25,0x45,0x21,0x45,0x44,0x02,0x21,0x45,0x21,0x45,0x25,0x02,0x21,0x24,
+ 0x21,0x02,0x25,0x02,0x21,0x44,0x02,0x21,0x44,0x24,0x29,0xad,0x96,0xb2,0x91,0xab,
+ 0xfe,0xbf,0x89,0x9a,0xb6,0x6d,0x69,0x4c,0x93,0xd6,0x99,0xb2,0xba,0xb9,0x91,0x96,
+ 0xf5,0xb9,0x96,0xd5,0xdb,0xfe,0xfd,0x02,0xff,0xbf,0x8d,0xba,0x75,0x8a,0xbe,0xde,
+ 0xba,0xde,0xfe,0xbd,0xde,0xbd,0xb5,0x02,0xde,0xb5,0x96,0xf9,0xde,0xda,0xb9,0x91,
+ 0x72,0xb1,0x92,0x8e,0x71,0x6e,0x6d,0x4d,0x66,0x69,0x6d,0x6a,0x69,0x6c,0x93,0xae,
+ 0xd1,0xba,0x8a,0x89,0x8a,0xb6,0xd6,0xcf,0xff,0xdf,0x6c,0x21,0x44,0x4a,0x41,0x48,
+ 0x05,0x45,0x49,0x02,0x41,0x44,0x45,0x25,0x03,0x45,0x29,0x03,0x45,0x41,0x45,0x44,
+ 0x45,0x41,0x45,0x41,0x45,0x49,0x41,0x02,0x45,0x02,0x41,0x44,0x06,0x45,0x21,0x45,
+ 0x25,0x21,0x41,0x44,0x02,0x45,0x44,0x41,0x45,0x25,0x02,0x41,0x44,0x05,0x45,0x29,
+ 0x41,0x45,0x48,0x02,0x45,0x44,0x02,0x45,0x49,0x05,0x45,0x49,0x03,0x45,0x41,0x71,
+ 0x52,0x41,0x4d,0x8e,0x61,0xbf,0x00,0x14,0xff,0xf7,0x9a,0x6e,0x4e,0x02,0x21,0x45,
+ 0x24,0x21,0x25,0x41,0x40,0x21,0x25,0x45,0x02,0x21,0x41,0x21,0x02,0x45,0x02,0x25,
+ 0x45,0x21,0x44,0x21,0x45,0x21,0x25,0x41,0x02,0x21,0x24,0x21,0x24,0x02,0x21,0x45,
+ 0x02,0x21,0x45,0x21,0x49,0x02,0x21,0x20,0x21,0x45,0x24,0x21,0x45,0x40,0x02,0x21,
+ 0x41,0x02,0x21,0x20,0x21,0x45,0x44,0x02,0x25,0x81,0x9f,0x73,0x6c,0x6e,0x8d,0xca,
+ 0xba,0xb6,0xb1,0x91,0x4d,0x48,0x7b,0xda,0xba,0x8e,0xfd,0xbd,0x96,0xb6,0xcd,0xde,
+ 0xba,0xd6,0xda,0xdd,0x04,0xff,0xfd,0x9a,0x95,0x69,0x6d,0xca,0xdf,0xfe,0xdd,0x02,
+ 0xde,0xbe,0x8d,0x71,0x8d,0x96,0xb5,0xad,0xbf,0xfe,0x02,0xde,0x96,0x91,0x97,0xb6,
+ 0x91,0x93,0x8e,0x8d,0x6d,0x49,0x65,0x69,0x6d,0x8e,0x65,0xad,0x8d,0x97,0xf7,0xb9,
+ 0x85,0xb1,0xf7,0xd2,0xfa,0xf7,0xfe,0xb7,0x50,0x46,0x0b,0x45,0x25,0x04,0x45,0x44,
+ 0x06,0x45,0x21,0x02,0x45,0x25,0x07,0x45,0x40,0x41,0x45,0x44,0x02,0x45,0x44,0x02,
+ 0x45,0x41,0x03,0x45,0x21,0x05,0x45,0x41,0x45,0x24,0x25,0x45,0x44,0x05,0x45,0x44,
+ 0x06,0x45,0x41,0x08,0x45,0x41,0x6c,0x8e,0x69,0x25,0x61,0x6e,0x8a,0xa0,0xdf,0x00,
+ 0x14,0xff,0xf2,0x8f,0x6d,0x4a,0x69,0x44,0x21,0x02,0x41,0x21,0x41,0x44,0x02,0x21,
+ 0x45,0x20,0x02,0x25,0x02,0x21,0x44,0x02,0x25,0x41,0x21,0x25,0x45,0x44,0x02,0x21,
+ 0x25,0x04,0x21,0x41,0x20,0x21,0x41,0x20,0x21,0x25,0x45,0x24,0x02,0x25,0x45,0x02,
+ 0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x24,0x21,0x25,0x24,0x21,0x25,0x24,0x21,0x56,
+ 0xd2,0x6c,0x4d,0xad,0x92,0xbe,0xdf,0xb5,0x96,0x72,0x48,0x4d,0xcd,0x91,0xba,0xb9,
+ 0x02,0xb6,0xd5,0xbe,0xbb,0xda,0xb1,0xde,0xdd,0x02,0xff,0xfe,0x03,0xff,0x94,0x51,
+ 0x8d,0x6d,0x72,0xf5,0xff,0xfb,0xfd,0xfe,0xdb,0x59,0x6d,0x02,0x71,0x4d,0x71,0xd0,
+ 0xdf,0xff,0xde,0xb5,0xba,0xb9,0xb6,0x8e,0xb1,0x91,0x8e,0x6d,0x69,0x02,0x6d,0x6a,
+ 0x89,0x4d,0x6a,0x65,0xcd,0xdb,0xfb,0x9a,0x86,0xde,0xff,0xf3,0xfb,0xfe,0xff,0xc6,
+ 0x2c,0x41,0x02,0x49,0x02,0x45,0x44,0x45,0x41,0x44,0x02,0x41,0x44,0x05,0x45,0x44,
+ 0x03,0x45,0x41,0x45,0x44,0x02,0x45,0x44,0x45,0x41,0x45,0x41,0x02,0x45,0x21,0x45,
+ 0x49,0x02,0x41,0x44,0x03,0x45,0x25,0x04,0x45,0x49,0x41,0x02,0x45,0x41,0x02,0x45,
+ 0x02,0x41,0x03,0x45,0x49,0x02,0x45,0x49,0x21,0x45,0x49,0x25,0x45,0x44,0x05,0x45,
+ 0x49,0x02,0x45,0x49,0x41,0x45,0x44,0x67,0x8e,0x51,0x40,0x25,0x69,0x6a,0x8a,0xed,
+ 0xf3,0x00,0x14,0xff,0xf2,0x8a,0x6d,0x6a,0x69,0x24,0x02,0x25,0x44,0x21,0x25,0x02,
+ 0x45,0x21,0x45,0x44,0x02,0x21,0x45,0x02,0x21,0x45,0x25,0x45,0x21,0x41,0x24,0x48,
+ 0x21,0x41,0x44,0x21,0x45,0x44,0x21,0x41,0x24,0x02,0x21,0x44,0x21,0x45,0x21,0x25,
+ 0x45,0x21,0x45,0x20,0x21,0x25,0x21,0x25,0x45,0x24,0x21,0x04,0x25,0x24,0x25,0x49,
+ 0x86,0x95,0x4e,0x49,0x6e,0xb1,0xb2,0xbf,0xb7,0x70,0x49,0x69,0xc6,0xb9,0x9a,0xb6,
+ 0xbb,0xfe,0x9d,0x97,0xd6,0xd1,0xdf,0xbb,0xce,0xde,0xfd,0xff,0xf5,0xfd,0xff,0xfe,
+ 0x77,0x68,0x72,0x6e,0x64,0x7b,0xfe,0xdd,0xdf,0xfe,0x9d,0x6e,0x02,0x91,0x02,0x6d,
+ 0x48,0x4d,0xb8,0xf7,0x02,0xff,0xdd,0xde,0xba,0xb5,0xb6,0xb2,0x6c,0x6e,0x8d,0x69,
+ 0x02,0x6d,0x8e,0x65,0x6d,0x8e,0x8a,0xd1,0xf3,0xfa,0xb7,0xaa,0xbb,0xff,0xfb,0x02,
+ 0xff,0xdf,0x80,0x48,0x45,0x02,0x49,0x03,0x45,0x41,0x03,0x45,0x41,0x45,0x44,0x21,
+ 0x02,0x45,0x25,0x45,0x41,0x0b,0x45,0x41,0x05,0x45,0x40,0x41,0x04,0x45,0x40,0x03,
+ 0x45,0x25,0x45,0x44,0x03,0x45,0x41,0x02,0x45,0x41,0x45,0x41,0x02,0x45,0x02,0x41,
+ 0x02,0x45,0x41,0x09,0x45,0x25,0x04,0x45,0x21,0x89,0x8e,0x60,0x25,0x45,0x41,0x69,
+ 0xaa,0x8a,0xf2,0xef,0x00,0x14,0xff,0xd9,0x8e,0x6d,0x69,0x24,0x21,0x45,0x44,0x02,
+ 0x21,0x44,0x21,0x44,0x25,0x45,0x41,0x40,0x21,0x41,0x40,0x21,0x45,0x25,0x45,0x21,
+ 0x40,0x21,0x45,0x02,0x21,0x25,0x02,0x21,0x45,0x02,0x21,0x45,0x02,0x21,0x25,0x21,
+ 0x25,0x21,0x25,0x44,0x02,0x21,0x44,0x21,0x02,0x45,0x21,0x25,0x45,0x02,0x21,0x40,
+ 0x02,0x25,0x44,0x45,0x75,0x96,0x02,0x6d,0x8d,0x92,0xba,0xfa,0xbd,0x6a,0x6c,0x6f,
+ 0xb6,0xba,0xb6,0xba,0x9d,0xbf,0xd6,0x02,0xb5,0x96,0xf6,0xb9,0xfe,0xbf,0xd7,0xfe,
+ 0x9d,0xba,0xfe,0xbe,0x95,0x92,0x8d,0x02,0x6d,0xac,0xdf,0xff,0xdd,0xdf,0xd2,0x74,
+ 0x92,0xb6,0x96,0x6d,0x4d,0x4c,0x6e,0xbd,0xf9,0x02,0xff,0xfd,0xfe,0xdf,0xb9,0xba,
+ 0x8e,0x8d,0x6e,0x89,0x8d,0x6e,0x8a,0x8d,0x6b,0xaa,0x8d,0x66,0xba,0x02,0xfb,0xcf,
+ 0xd1,0xdb,0x03,0xff,0xfb,0x9e,0x69,0x05,0x49,0x02,0x45,0x44,0x03,0x45,0x41,0x45,
+ 0x44,0x25,0x02,0x45,0x41,0x45,0x48,0x41,0x45,0x24,0x21,0x02,0x45,0x41,0x45,0x28,
+ 0x02,0x45,0x44,0x05,0x45,0x44,0x02,0x41,0x44,0x45,0x41,0x44,0x45,0x41,0x44,0x06,
+ 0x45,0x21,0x45,0x44,0x25,0x41,0x44,0x03,0x45,0x41,0x45,0x48,0x21,0x41,0x44,0x02,
+ 0x45,0x49,0x05,0x45,0x49,0x02,0x45,0x48,0x6f,0x8e,0x2d,0x21,0x45,0x49,0x41,0x6d,
+ 0xce,0xaf,0x02,0xfb,0x00,0x13,0xff,0xf7,0xbe,0x8e,0x6e,0x6d,0x24,0x21,0x25,0x45,
+ 0x40,0x25,0x02,0x45,0x02,0x21,0x44,0x02,0x25,0x02,0x21,0x44,0x24,0x02,0x21,0x44,
+ 0x21,0x25,0x21,0x41,0x24,0x21,0x45,0x24,0x21,0x45,0x44,0x02,0x21,0x25,0x21,0x41,
+ 0x21,0x44,0x45,0x21,0x25,0x02,0x21,0x45,0x20,0x21,0x25,0x41,0x21,0x02,0x24,0x02,
+ 0x25,0x02,0x45,0x4c,0xaf,0xde,0x77,0x69,0x72,0x95,0xb7,0xb2,0xb6,0x91,0x96,0xb6,
+ 0x8d,0x9b,0xba,0xb6,0xb2,0xb9,0xb6,0xba,0xda,0x95,0x9b,0xfe,0xff,0xfe,0xbd,0x02,
+ 0xff,0xbf,0xb1,0xde,0x9a,0x91,0x92,0x91,0x4c,0x52,0xfd,0x02,0xff,0xde,0xb5,0x92,
+ 0x95,0xd7,0xd9,0x55,0x02,0x6d,0x6c,0x6d,0x9a,0xfd,0x02,0xff,0x02,0xfe,0xda,0xb9,
+ 0x95,0x96,0x91,0x8d,0x69,0x02,0x8d,0x89,0x6d,0x8a,0x02,0x8e,0xa6,0xdb,0x02,0xfb,
+ 0xce,0xfe,0x05,0xff,0xfb,0x4c,0x2a,0x04,0x49,0x06,0x45,0x41,0x05,0x45,0x41,0x03,
+ 0x45,0x41,0x05,0x45,0x25,0x45,0x44,0x02,0x45,0x02,0x41,0x45,0x44,0x02,0x45,0x44,
+ 0x02,0x45,0x02,0x41,0x02,0x45,0x41,0x05,0x45,0x41,0x07,0x45,0x02,0x41,0x02,0x45,
+ 0x41,0x06,0x45,0x02,0x49,0x45,0x49,0x04,0x45,0x4a,0x8d,0x76,0x41,0x44,0x02,0x45,
+ 0x25,0x41,0x73,0xf2,0xee,0xf3,0xfe,0x00,0x13,0xff,0xf3,0xbb,0x96,0x6e,0x6d,0x25,
+ 0x24,0x21,0x41,0x24,0x02,0x21,0x44,0x40,0x21,0x45,0x44,0x02,0x25,0x24,0x21,0x25,
+ 0x45,0x21,0x02,0x45,0x25,0x02,0x21,0x25,0x02,0x21,0x24,0x03,0x25,0x02,0x21,0x24,
+ 0x21,0x45,0x02,0x21,0x44,0x21,0x41,0x24,0x25,0x21,0x44,0x25,0x21,0x44,0x02,0x25,
+ 0x03,0x45,0x65,0x97,0xfe,0xbe,0x95,0x76,0x75,0x69,0x6d,0xad,0xb7,0xfe,0xde,0xb5,
+ 0x72,0xf2,0xda,0xde,0x99,0xb7,0xd6,0xb9,0x02,0xb6,0xf5,0xde,0xfe,0xde,0xb6,0xfe,
+ 0xff,0xfe,0xdf,0xde,0xb5,0x9a,0x96,0x92,0x8d,0x4c,0x93,0xfe,0xff,0xda,0xba,0x95,
+ 0x96,0xb6,0x95,0x02,0x91,0x6d,0x4d,0x71,0x8c,0x92,0xdd,0x02,0xfe,0xff,0xdd,0xb6,
+ 0xda,0xba,0x8e,0xb6,0x95,0x02,0x8e,0x8d,0x69,0x02,0x8d,0x72,0x8e,0xad,0xb3,0xf6,
+ 0xfb,0x02,0xff,0xfe,0xfb,0x03,0xff,0xef,0x50,0x46,0x05,0x49,0x41,0x02,0x45,0x41,
+ 0x02,0x45,0x21,0x45,0x49,0x25,0x45,0x44,0x02,0x45,0x44,0x25,0x45,0x44,0x25,0x45,
+ 0x44,0x25,0x45,0x49,0x03,0x45,0x02,0x41,0x03,0x45,0x44,0x04,0x45,0x41,0x44,0x02,
+ 0x45,0x44,0x25,0x02,0x45,0x21,0x45,0x49,0x25,0x41,0x44,0x03,0x45,0x21,0x41,0x28,
+ 0x25,0x45,0x44,0x25,0x45,0x48,0x25,0x45,0x44,0x04,0x45,0x41,0x64,0x6f,0x86,0x28,
+ 0x46,0x89,0x4d,0x02,0x41,0x80,0x97,0x02,0xf6,0xef,0x00,0x14,0xff,0xfb,0xb3,0x92,
+ 0x6a,0x6d,0x21,0x25,0x41,0x02,0x25,0x20,0x21,0x25,0x44,0x02,0x21,0x44,0x02,0x21,
+ 0x45,0x21,0x41,0x24,0x02,0x21,0x45,0x21,0x24,0x25,0x41,0x24,0x21,0x41,0x44,0x25,
+ 0x21,0x40,0x02,0x21,0x45,0x24,0x02,0x21,0x25,0x02,0x21,0x24,0x02,0x41,0x24,0x02,
+ 0x21,0x45,0x21,0x25,0x45,0x62,0x02,0x96,0xd3,0xfa,0x7a,0x91,0x69,0x2c,0x66,0x96,
+ 0xd9,0xba,0xb2,0xd6,0x91,0x9f,0xfa,0xd6,0x02,0xde,0x95,0x96,0xb6,0x8d,0xbf,0x03,
+ 0xfe,0xbe,0xfb,0x03,0xff,0xfe,0x5a,0x8a,0x9a,0x76,0x02,0x69,0x94,0xfb,0x02,0xfe,
+ 0xbd,0xb6,0x95,0xb6,0xb2,0x71,0x6d,0x71,0x6d,0x69,0x71,0x91,0x8d,0xbf,0xfd,0xfe,
+ 0xfa,0xdd,0xff,0xfe,0x9a,0x02,0xb2,0xb5,0x8d,0x92,0xb2,0x91,0x6e,0xd1,0xb6,0xae,
+ 0xb1,0xf7,0xf2,0xfe,0x07,0xff,0xf6,0x32,0x41,0x02,0x49,0x45,0x02,0x49,0x41,0x45,
+ 0x49,0x09,0x45,0x44,0x06,0x45,0x41,0x02,0x45,0x21,0x02,0x45,0x25,0x45,0x44,0x03,
+ 0x45,0x41,0x02,0x45,0x25,0x45,0x41,0x02,0x45,0x02,0x41,0x02,0x45,0x41,0x45,0x02,
+ 0x41,0x09,0x45,0x49,0x02,0x45,0x49,0x0a,0x45,0x4a,0xad,0x4c,0x41,0x89,0x92,0x69,
+ 0x49,0x45,0x41,0x88,0xcf,0xf6,0xfa,0xeb,0x00,0x14,0xff,0xfd,0xae,0x91,0x6d,0x6e,
+ 0x6d,0x41,0x45,0x02,0x21,0x44,0x21,0x41,0x25,0x41,0x25,0x45,0x24,0x21,0x24,0x21,
+ 0x03,0x45,0x21,0x45,0x21,0x44,0x02,0x21,0x24,0x21,0x02,0x25,0x21,0x02,0x25,0x21,
+ 0x45,0x02,0x21,0x44,0x02,0x21,0x20,0x21,0x41,0x24,0x21,0x45,0x24,0x25,0x45,0x44,
+ 0x46,0xb1,0xb6,0x92,0xde,0xff,0xb1,0x8e,0x2c,0x46,0xb9,0xba,0xbb,0xda,0x74,0x9b,
+ 0xb2,0xd1,0x02,0xbe,0xff,0xb1,0xbe,0xda,0xb9,0x6e,0xac,0xbe,0xfe,0xff,0xfd,0xde,
+ 0x04,0xff,0xb0,0x51,0xad,0x95,0x6e,0x68,0x49,0xbd,0xff,0xf9,0xda,0xb5,0x96,0xb6,
+ 0x95,0x8d,0x02,0x6d,0x71,0x02,0x6d,0x71,0x95,0x90,0xbf,0xfe,0xde,0xda,0x02,0xfe,
+ 0xff,0xd7,0xb0,0x92,0xb2,0x91,0x6a,0xb1,0x71,0x6e,0xb2,0xd2,0xae,0xba,0xfb,0xf2,
+ 0xfb,0xf7,0x03,0xff,0xfb,0x02,0xff,0xf0,0x46,0x64,0x4a,0x02,0x49,0x06,0x45,0x41,
+ 0x02,0x45,0x41,0x45,0x49,0x25,0x45,0x44,0x02,0x45,0x44,0x25,0x45,0x49,0x21,0x02,
+ 0x45,0x25,0x41,0x44,0x02,0x45,0x44,0x21,0x02,0x45,0x21,0x41,0x44,0x25,0x45,0x44,
+ 0x45,0x41,0x44,0x02,0x45,0x44,0x02,0x45,0x44,0x21,0x41,0x44,0x02,0x45,0x44,0x02,
+ 0x45,0x44,0x02,0x45,0x28,0x25,0x41,0x45,0x21,0x45,0x49,0x02,0x45,0x49,0x41,0x45,
+ 0x85,0x96,0x42,0x40,0x4f,0x8a,0x6d,0x49,0x69,0x4d,0x21,0x75,0xf3,0xda,0xd7,0xf2,
+ 0x00,0x15,0xff,0xaa,0x8e,0x6d,0x6e,0x69,0x25,0x45,0x21,0x49,0x48,0x02,0x21,0x41,
+ 0x24,0x21,0x25,0x21,0x25,0x41,0x21,0x45,0x44,0x21,0x45,0x40,0x21,0x45,0x44,0x21,
+ 0x45,0x40,0x21,0x41,0x40,0x21,0x45,0x41,0x44,0x21,0x02,0x25,0x21,0x02,0x25,0x21,
+ 0x25,0x45,0x02,0x21,0x45,0x24,0x29,0xac,0xbb,0xae,0xb5,0xdb,0xff,0x7b,0x02,0x69,
+ 0x90,0xbb,0xb6,0xd9,0xb9,0xbf,0xfe,0x9d,0x9f,0xfe,0xbe,0xb6,0xfc,0xff,0xd6,0x95,
+ 0x6d,0x76,0xd5,0xd6,0x02,0xff,0xdc,0x04,0xff,0x9f,0x68,0x71,0x6d,0x69,0x6d,0x4c,
+ 0x8b,0x02,0xfe,0xde,0xd6,0xb5,0xb6,0xb2,0x71,0x6d,0x6e,0x91,0x71,0x6d,0x70,0x75,
+ 0x95,0xb8,0xdb,0xfe,0xff,0xd6,0x02,0xfe,0xde,0xd6,0xb9,0x91,0x96,0x92,0x8d,0x02,
+ 0x92,0x86,0xb6,0xf7,0xef,0x02,0xff,0xf3,0xfb,0xff,0xfb,0x05,0xff,0xd9,0x86,0x69,
+ 0x6a,0x02,0x49,0x03,0x45,0x41,0x45,0x49,0x03,0x45,0x41,0x45,0x49,0x04,0x45,0x41,
+ 0x03,0x45,0x49,0x41,0x45,0x49,0x07,0x45,0x41,0x02,0x45,0x41,0x04,0x45,0x02,0x41,
+ 0x02,0x45,0x41,0x03,0x45,0x49,0x05,0x45,0x49,0x02,0x45,0x49,0x45,0x41,0x45,0x41,
+ 0x45,0x25,0x41,0x45,0x49,0x02,0x45,0x49,0x41,0x76,0x73,0x44,0x45,0xa9,0x75,0x45,
+ 0x04,0x49,0x45,0x76,0xf6,0xf7,0xcf,0xfe,0x00,0x14,0xff,0xbf,0xb2,0x6e,0x6d,0x6a,
+ 0x4a,0x45,0x03,0x21,0x41,0x24,0x21,0x45,0x40,0x21,0x45,0x44,0x21,0x44,0x02,0x21,
+ 0x24,0x02,0x21,0x44,0x02,0x21,0x24,0x02,0x21,0x44,0x02,0x21,0x24,0x21,0x44,0x25,
+ 0x21,0x40,0x02,0x21,0x24,0x02,0x21,0x24,0x21,0x45,0x44,0x02,0x25,0x64,0x9f,0xb3,
+ 0x70,0x73,0xfe,0xff,0xac,0x51,0xce,0xb5,0x9d,0xbe,0x03,0x91,0x97,0xde,0xbe,0xbf,
+ 0xff,0x9c,0xbf,0xfe,0xbe,0x92,0x6e,0x88,0x9a,0x95,0xf1,0xde,0xfe,0xf5,0x03,0xff,
+ 0xfc,0x52,0x89,0x02,0x6e,0x6d,0x45,0x95,0xf3,0xfe,0xfa,0xb5,0x92,0xb6,0x95,0x92,
+ 0x02,0x91,0x02,0x71,0x6d,0x03,0x71,0x75,0x99,0xf6,0x02,0xfe,0xfd,0x02,0xff,0xdd,
+ 0xda,0xba,0xb5,0x92,0x95,0xb6,0x8e,0x02,0x91,0x6b,0x02,0xf2,0xff,0x02,0xf7,0x08,
+ 0xff,0x02,0xfa,0x6b,0x64,0x4a,0x69,0x49,0x05,0x45,0x44,0x08,0x45,0x44,0x09,0x45,
+ 0x41,0x04,0x45,0x24,0x25,0x45,0x44,0x03,0x45,0x21,0x02,0x45,0x41,0x45,0x44,0x41,
+ 0x45,0x49,0x25,0x0a,0x45,0x44,0x02,0x45,0x44,0x07,0x45,0x49,0xaa,0x8d,0x26,0x40,
+ 0x53,0xae,0x4c,0x45,0x49,0x89,0x69,0x45,0x60,0x77,0x02,0xfa,0xd3,0x00,0x15,0xff,
+ 0xd7,0xb6,0x6e,0x6d,0x69,0x6e,0x21,0x41,0x21,0x69,0x40,0x21,0x45,0x44,0x21,0x45,
+ 0x44,0x41,0x21,0x02,0x45,0x21,0x02,0x41,0x21,0x24,0x45,0x21,0x02,0x41,0x21,0x24,
+ 0x25,0x03,0x21,0x24,0x21,0x02,0x25,0x02,0x21,0x24,0x25,0x21,0x24,0x03,0x25,0x21,
+ 0x56,0xf6,0x94,0x72,0xd5,0xdf,0xfe,0x9a,0x89,0xbf,0xdf,0x88,0x02,0xbf,0x91,0x8d,
+ 0x70,0xb3,0xd2,0xd9,0xbe,0x96,0xb5,0xbb,0xdf,0xff,0x94,0x6e,0xb1,0xbb,0xde,0xb9,
+ 0xb1,0x04,0xff,0xbf,0x68,0x51,0x8d,0x6d,0x69,0x49,0x66,0xbe,0xfe,0xb9,0xb6,0xd5,
+ 0xba,0xb6,0x95,0x03,0x71,0x02,0x72,0x71,0x6d,0x71,0x91,0x71,0x75,0xd8,0x02,0xff,
+ 0x02,0xfe,0xff,0xde,0xb6,0x02,0xda,0x03,0xb6,0x91,0x96,0xb2,0x8d,0x92,0xd2,0xae,
+ 0x0b,0xff,0xfd,0xae,0x51,0x4a,0x02,0x49,0x05,0x45,0x49,0x06,0x45,0x41,0x02,0x45,
+ 0x41,0x45,0x49,0x41,0x02,0x45,0x41,0x45,0x49,0x45,0x41,0x44,0x02,0x45,0x49,0x25,
+ 0x45,0x49,0x02,0x41,0x45,0x41,0x45,0x49,0x03,0x45,0x41,0x45,0x49,0x45,0x41,0x03,
+ 0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x04,0x45,0x41,0x03,0x45,0x49,0x46,0x8d,
+ 0x6e,0x44,0x29,0xa9,0x71,0x65,0x68,0x6a,0x9a,0xb6,0x70,0x41,0x48,0xaf,0xf6,0xfa,
+ 0xef,0x00,0x15,0xff,0xcf,0x96,0x8a,0x8d,0x6d,0x6a,0x25,0x02,0x45,0x49,0x25,0x24,
+ 0x25,0x03,0x21,0x02,0x24,0x02,0x21,0x45,0x21,0x41,0x44,0x21,0x25,0x45,0x21,0x41,
+ 0x44,0x21,0x25,0x24,0x45,0x41,0x02,0x21,0x20,0x21,0x25,0x45,0x21,0x41,0x20,0x21,
+ 0x02,0x25,0x21,0x49,0x85,0xbe,0xb6,0xb1,0xbf,0xfe,0xbd,0xb7,0xfe,0xff,0xfe,0x97,
+ 0xee,0x02,0xff,0x79,0x6a,0xb5,0xdb,0x02,0xb2,0xb1,0x96,0xda,0xd9,0xdf,0xdb,0x94,
+ 0x96,0xba,0xb5,0xba,0xfd,0xff,0x02,0xfd,0xff,0xfd,0x76,0x8d,0x03,0x6d,0x49,0x6d,
+ 0xce,0xdf,0xfb,0xb5,0xb7,0xd6,0x95,0x02,0x92,0x91,0x72,0xb9,0x99,0x03,0x6d,0x76,
+ 0x4d,0x02,0x4c,0xbc,0xff,0x04,0xfe,0xde,0xb5,0xbf,0xda,0xb5,0xbb,0xb6,0xb5,0x97,
+ 0xb2,0x6c,0x6e,0x8d,0xea,0x03,0xff,0xf7,0x04,0xff,0xfb,0x03,0xff,0xf5,0x93,0x8d,
+ 0x4a,0x02,0x69,0x02,0x49,0x06,0x45,0x44,0x41,0x02,0x45,0x41,0x02,0x45,0x41,0x07,
+ 0x45,0x44,0x02,0x45,0x49,0x25,0x45,0x44,0x41,0x45,0x44,0x03,0x45,0x21,0x41,0x02,
+ 0x45,0x25,0x41,0x05,0x45,0x24,0x25,0x45,0x44,0x02,0x45,0x44,0x02,0x45,0x44,0x02,
+ 0x45,0x44,0x41,0x45,0x49,0x41,0x6d,0x92,0x69,0x25,0x40,0x76,0x6e,0x68,0x6e,0x8e,
+ 0xea,0xfe,0xb7,0x50,0x41,0x6d,0xef,0xfb,0xf7,0xee,0x00,0x15,0xff,0xce,0x8e,0x89,
+ 0x6e,0x6d,0x69,0x25,0x02,0x69,0x45,0x44,0x25,0x02,0x45,0x25,0x24,0x21,0x41,0x20,
+ 0x21,0x41,0x20,0x04,0x21,0x41,0x20,0x03,0x21,0x44,0x21,0x25,0x24,0x02,0x21,0x24,
+ 0x02,0x21,0x24,0x02,0x21,0x24,0x21,0x45,0x48,0x49,0x7e,0xff,0xbc,0xbe,0xfe,0xb9,
+ 0x8e,0xf4,0x02,0xff,0xfe,0xb8,0x9f,0xfe,0xff,0xf2,0x54,0x8f,0xfe,0xdf,0xdb,0xd6,
+ 0xb9,0xdf,0xb2,0xd4,0xdf,0xfa,0x79,0x8f,0xb5,0xb8,0xdf,0xff,0xfe,0x03,0xff,0xd9,
+ 0xb6,0x95,0x6e,0x6d,0x4d,0x49,0x79,0xf5,0xdf,0xfa,0xd9,0xb6,0xba,0x9a,0x92,0xb6,
+ 0x95,0xbb,0xb6,0x75,0x71,0x76,0x71,0x4c,0x51,0x4c,0x49,0xbe,0xff,0xfd,0xff,0xfe,
+ 0xde,0x02,0xfe,0x02,0xde,0xb9,0x02,0xb6,0xb5,0xb6,0x8e,0xb1,0x02,0x8e,0xf2,0xf7,
+ 0x02,0xff,0xf7,0x02,0xff,0xfb,0x07,0xff,0xde,0xfb,0xfe,0x9e,0x92,0x8e,0x4d,0x02,
+ 0x45,0x49,0x02,0x45,0x44,0x02,0x45,0x44,0x04,0x45,0x41,0x44,0x0a,0x45,0x41,0x44,
+ 0x02,0x45,0x49,0x41,0x45,0x44,0x02,0x41,0x44,0x02,0x45,0x44,0x02,0x45,0x49,0x02,
+ 0x45,0x49,0x08,0x45,0x49,0x41,0x02,0x49,0x41,0x45,0x48,0x4b,0x8e,0x4e,0x20,0x49,
+ 0x03,0x69,0x6d,0x71,0x7a,0xfa,0xff,0xce,0x6d,0x40,0x56,0xf6,0xff,0xf3,0xfa,0x00,
+ 0x15,0xff,0xd2,0x8e,0x71,0x6a,0x02,0x6d,0x69,0x02,0x6d,0x45,0x44,0x02,0x21,0x24,
+ 0x45,0x44,0x21,0x41,0x24,0x02,0x21,0x44,0x21,0x41,0x24,0x02,0x21,0x44,0x21,0x02,
+ 0x41,0x25,0x45,0x21,0x45,0x40,0x21,0x02,0x41,0x21,0x41,0x20,0x21,0x25,0x40,0x45,
+ 0x50,0xef,0xfe,0x9e,0xf6,0xfd,0x56,0xee,0xdf,0xfe,0xde,0xdf,0xfe,0xbd,0xba,0xbd,
+ 0xba,0x8e,0x95,0xd2,0xde,0xfe,0xbf,0xbb,0xfe,0xbe,0xb1,0xbc,0xff,0xd5,0x95,0x8d,
+ 0x91,0xbd,0xfb,0x02,0xff,0xdc,0x02,0xff,0x9c,0x8e,0x8d,0x6d,0x65,0x6c,0x69,0x77,
+ 0xf9,0xfa,0xfe,0xba,0xd2,0xdf,0xbe,0x99,0x9f,0xb6,0x95,0x92,0x91,0x71,0x72,0x4d,
+ 0x69,0x71,0x51,0xe6,0x02,0xff,0xf5,0x07,0xfe,0xbb,0xd1,0x02,0xb6,0xad,0xb2,0xb6,
+ 0xb2,0xb3,0xf6,0xf7,0xff,0xfb,0xef,0x0b,0xff,0xfb,0x03,0xff,0xed,0x2a,0x41,0x02,
+ 0x49,0x06,0x45,0x44,0x09,0x45,0x21,0x05,0x45,0x41,0x02,0x45,0x41,0x05,0x45,0x41,
+ 0x45,0x44,0x02,0x45,0x44,0x02,0x45,0x44,0x03,0x45,0x41,0x02,0x45,0x41,0x45,0x44,
+ 0x45,0x02,0x49,0x45,0x49,0x24,0x25,0x8d,0x72,0x61,0x25,0x41,0x49,0x02,0x6d,0x6e,
+ 0x6d,0x89,0xbf,0xff,0xfa,0xad,0x4a,0x44,0x57,0xfa,0xff,0xd2,0xfe,0x00,0x15,0xff,
+ 0xb5,0x8e,0x6e,0x6d,0x4e,0x6d,0x04,0x69,0x44,0x02,0x21,0x41,0x21,0x45,0x02,0x21,
+ 0x45,0x02,0x21,0x25,0x21,0x25,0x45,0x02,0x21,0x25,0x21,0x25,0x21,0x45,0x24,0x02,
+ 0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x44,0x21,0x45,0x48,0x8f,0xfe,0x9e,0xb3,0xfe,
+ 0x5e,0x65,0xbe,0xff,0xfa,0x02,0xfe,0xff,0xf7,0x98,0x9b,0xb6,0xb5,0xb3,0xfe,0x9e,
+ 0xb7,0xde,0xdd,0x02,0xff,0x9d,0x8e,0xde,0xdf,0xb5,0x91,0x70,0x93,0xfe,0xfd,0xdd,
+ 0xbe,0xfd,0x02,0xff,0x9a,0x69,0x02,0x6d,0x49,0x69,0x8c,0xbb,0xfe,0xde,0xba,0x02,
+ 0xde,0xbe,0xb6,0xd5,0xbe,0x8e,0xac,0x96,0x92,0x71,0x02,0x4d,0x02,0x4c,0x9e,0xff,
+ 0x90,0x5d,0xf5,0x02,0xff,0xdd,0xdf,0x04,0xfe,0xb9,0x03,0xb6,0x8d,0x92,0xb1,0x8e,
+ 0xba,0xfb,0xae,0xaa,0xc9,0xcf,0x05,0xff,0xfe,0x02,0xff,0x02,0xfb,0x04,0xff,0xdc,
+ 0x26,0x64,0x06,0x45,0x41,0x45,0x49,0x41,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,
+ 0x21,0x02,0x45,0x02,0x41,0x44,0x41,0x02,0x45,0x02,0x41,0x45,0x02,0x41,0x45,0x41,
+ 0x45,0x49,0x02,0x45,0x44,0x02,0x45,0x44,0x02,0x45,0x44,0x02,0x45,0x44,0x41,0x45,
+ 0x49,0x02,0x45,0x49,0x02,0x45,0x44,0x6a,0x89,0x2d,0x21,0x45,0x49,0x4a,0x69,0x89,
+ 0x6d,0x8e,0xf2,0xdb,0xfb,0xde,0x95,0x4a,0x48,0x8f,0x02,0xfa,0xce,0x00,0x15,0xff,
+ 0xf7,0xba,0x8e,0x6e,0x6d,0x4a,0x02,0x69,0x4a,0x02,0x69,0x44,0x21,0x25,0x45,0x21,
+ 0x45,0x44,0x02,0x21,0x25,0x21,0x41,0x44,0x02,0x21,0x25,0x21,0x41,0x44,0x21,0x40,
+ 0x02,0x25,0x20,0x21,0x25,0x02,0x21,0x25,0x21,0x25,0x45,0x44,0x53,0xfa,0xbd,0xbf,
+ 0xfe,0xbe,0x89,0xbc,0x02,0xff,0xde,0xfb,0xfa,0xbe,0x95,0x9b,0xd6,0x95,0x96,0xbd,
+ 0xdf,0xad,0xb8,0xff,0xfe,0x9e,0xd2,0xd9,0xb9,0xb6,0xba,0x75,0xae,0xba,0x79,0xb2,
+ 0xba,0xdd,0xde,0xdf,0xfe,0xff,0xf9,0x56,0x89,0x69,0x02,0x6d,0x49,0xb8,0xff,0xfe,
+ 0xde,0xd6,0xff,0xdf,0x91,0x9b,0xfa,0x95,0x96,0xb6,0x02,0x91,0x4d,0x49,0x4d,0x02,
+ 0x71,0x75,0x71,0x4c,0x6d,0xfc,0xff,0xfe,0x02,0xfd,0x02,0xff,0xfd,0xff,0xdb,0xb1,
+ 0xba,0xb6,0x8d,0x02,0x92,0xaa,0xb6,0x93,0x89,0x92,0xae,0xaa,0xdb,0x04,0xff,0xfe,
+ 0xdb,0xff,0xfb,0xf2,0xfa,0xf3,0xfe,0xff,0x99,0x41,0x44,0x03,0x45,0x40,0x02,0x49,
+ 0x41,0x03,0x45,0x21,0x04,0x45,0x40,0x41,0x45,0x41,0x02,0x45,0x41,0x0b,0x45,0x44,
+ 0x02,0x45,0x40,0x41,0x45,0x24,0x25,0x45,0x41,0x45,0x49,0x02,0x45,0x49,0x02,0x45,
+ 0x02,0x49,0x03,0x45,0x4a,0x8d,0x51,0x41,0x45,0x41,0x45,0x49,0x65,0x6e,0x8e,0xae,
+ 0xbb,0x02,0xfb,0xdb,0xd7,0x71,0x45,0x4c,0xcf,0xdf,0xfb,0xee,0x00,0x15,0xff,0xf3,
+ 0xb7,0x8e,0x6e,0x6d,0x69,0x4e,0x04,0x69,0x25,0x41,0x69,0x45,0x03,0x25,0x02,0x21,
+ 0x24,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x45,0x21,0x25,0x45,0x02,
+ 0x21,0x24,0x21,0x41,0x44,0x25,0x29,0xa9,0x02,0xbe,0xfe,0xde,0xae,0x6c,0xdf,0xff,
+ 0xdd,0xde,0xbf,0xfe,0xb9,0xb6,0x91,0x8e,0xbe,0xbf,0xae,0xb5,0x75,0xb7,0xfe,0xff,
+ 0xb8,0x56,0xf1,0xbe,0xb6,0x70,0x93,0xde,0xdf,0x02,0xb6,0x95,0xbb,0xfe,0xde,0xba,
+ 0xfe,0xdf,0xb0,0x6e,0x69,0x49,0x02,0x6d,0x6a,0xdd,0xdf,0xb5,0xbe,0xfe,0xde,0xd6,
+ 0xd5,0xbe,0xba,0xb9,0xba,0xb6,0x71,0x49,0x02,0x4d,0x4e,0x02,0x71,0x6d,0x71,0x70,
+ 0x6d,0x9d,0xf9,0x02,0xff,0xfd,0x03,0xfe,0xfd,0xda,0xfa,0xde,0x92,0xd1,0xb1,0x92,
+ 0xb1,0x95,0x6e,0xad,0x8e,0x8a,0xc9,0xb3,0xd3,0xf7,0xff,0xcf,0xb1,0xb3,0xef,0xb1,
+ 0x8d,0x96,0xf7,0xcf,0xf6,0x39,0x21,0x45,0x49,0x02,0x45,0x44,0x45,0x41,0x44,0x06,
+ 0x45,0x21,0x41,0x44,0x21,0x41,0x06,0x45,0x48,0x02,0x45,0x44,0x02,0x41,0x24,0x45,
+ 0x41,0x44,0x45,0x41,0x44,0x45,0x25,0x45,0x41,0x45,0x44,0x05,0x45,0x44,0x02,0x45,
+ 0x44,0x02,0x45,0x65,0x73,0x62,0x24,0x21,0x49,0x69,0x45,0x6d,0xad,0x02,0x92,0xf2,
+ 0xdb,0xfb,0xde,0xb7,0xb2,0x76,0x41,0x4d,0xee,0xdf,0xf7,0xf5,0x00,0x15,0xff,0xf6,
+ 0xb3,0x91,0x6e,0x6d,0x69,0x4a,0x49,0x69,0x4a,0x69,0x45,0x02,0x69,0x49,0x44,0x25,
+ 0x21,0x40,0x02,0x21,0x41,0x02,0x21,0x40,0x02,0x21,0x41,0x21,0x25,0x21,0x44,0x41,
+ 0x21,0x25,0x02,0x21,0x25,0x21,0x25,0x24,0x41,0x9f,0x9b,0xad,0xde,0xbe,0x94,0x96,
+ 0xfd,0x02,0xff,0xfe,0xbd,0xbf,0xda,0xb1,0xba,0xb6,0xad,0xb6,0x95,0x92,0xbf,0xba,
+ 0xb6,0xde,0x9a,0x95,0x96,0xb9,0xba,0xad,0xbc,0xff,0xf6,0xdd,0x9d,0x92,0x95,0xb6,
+ 0xde,0xbd,0xf7,0xfe,0x7a,0x02,0x69,0x6d,0x69,0x02,0x6d,0xab,0xde,0xbe,0xd2,0x02,
+ 0xff,0xdd,0xdf,0xff,0x02,0xda,0x99,0x91,0x96,0x71,0x69,0x4d,0x02,0x6d,0x05,0x71,
+ 0x6c,0x9f,0xfe,0xdd,0xb2,0xfc,0xff,0x05,0xfe,0x95,0x96,0xb6,0x91,0x02,0x92,0x02,
+ 0x8e,0x6e,0x81,0x9a,0xb7,0xae,0x02,0xb2,0xae,0x81,0xb0,0xbf,0xa1,0x69,0x61,0x97,
+ 0xfe,0xff,0xc0,0x28,0x41,0x45,0x49,0x03,0x45,0x41,0x05,0x45,0x02,0x41,0x45,0x02,
+ 0x41,0x45,0x41,0x25,0x02,0x45,0x41,0x04,0x45,0x02,0x41,0x44,0x45,0x41,0x45,0x41,
+ 0x05,0x45,0x41,0x02,0x45,0x41,0x45,0x49,0x45,0x41,0x45,0x44,0x02,0x45,0x41,0x03,
+ 0x45,0x4a,0x8a,0x48,0x21,0x02,0x45,0x02,0x49,0x69,0x6e,0x8e,0x8a,0xbb,0xfb,0xf7,
+ 0xd6,0xb7,0x02,0xb2,0x6e,0x44,0x53,0xf6,0xff,0xf6,0xfd,0x00,0x15,0xff,0xf6,0xb2,
+ 0x72,0x6d,0x6e,0x6d,0x65,0x49,0x02,0x69,0x4e,0x02,0x6d,0x69,0x49,0x25,0x21,0x02,
+ 0x25,0x02,0x21,0x24,0x21,0x02,0x25,0x02,0x21,0x24,0x45,0x24,0x21,0x02,0x45,0x21,
+ 0x45,0x24,0x02,0x21,0x44,0x25,0x4d,0xce,0xba,0xda,0x79,0x8e,0xde,0xfe,0xfd,0xde,
+ 0xff,0xde,0xda,0xb9,0x02,0xb6,0xd5,0xbe,0xb2,0xac,0x9e,0x96,0xf2,0xbd,0x96,0xb1,
+ 0x96,0xb9,0x95,0x8f,0xfd,0x9e,0x8a,0xfd,0xbf,0xb6,0xb9,0x59,0x6e,0x99,0xb9,0xbf,
+ 0xde,0xfe,0xb0,0x6e,0x6d,0x49,0x02,0x6d,0x6a,0xdd,0xde,0xb9,0xbe,0xfe,0xdd,0x02,
+ 0xde,0xd9,0x02,0xde,0xb1,0xb9,0x95,0x92,0x95,0x75,0x6d,0x02,0x71,0x72,0x91,0x71,
+ 0x6c,0x9d,0xff,0xfe,0xb3,0x6c,0x93,0xfd,0x02,0xfe,0xff,0xfe,0xfd,0xde,0xda,0xb1,
+ 0x02,0xb6,0x8d,0x02,0x91,0x8e,0x02,0x92,0x8e,0x91,0xb1,0x91,0x8e,0x8d,0x6d,0x8d,
+ 0xad,0x02,0x89,0x88,0xb7,0xfb,0xbe,0x88,0x29,0x07,0x45,0x41,0x04,0x45,0x44,0x03,
+ 0x45,0x21,0x41,0x45,0x25,0x45,0x44,0x02,0x45,0x44,0x45,0x41,0x44,0x02,0x45,0x44,
+ 0x41,0x02,0x45,0x41,0x0a,0x45,0x44,0x02,0x45,0x44,0x03,0x45,0x41,0x45,0x85,0x91,
+ 0x46,0x44,0x02,0x45,0x49,0x45,0x49,0x69,0x6f,0xb2,0xf2,0xdb,0xfb,0xff,0x02,0xd7,
+ 0xb6,0x91,0x6a,0x28,0x73,0xfe,0xde,0xf7,0xff,0xdf,0xa3,0xf2,0xf7,0x00,0x11,0xff,
+ 0xdf,0xb3,0x92,0x71,0x6e,0x02,0x69,0x4a,0x02,0x69,0x6a,0x02,0x6d,0x6e,0x69,0x02,
+ 0x45,0x21,0x45,0x44,0x25,0x21,0x45,0x21,0x45,0x44,0x25,0x41,0x21,0x25,0x21,0x41,
+ 0x25,0x21,0x02,0x25,0x21,0x25,0x49,0x87,0xba,0xfe,0x9d,0x6e,0xd8,0xdf,0xff,0xde,
+ 0xb9,0xde,0xdd,0xba,0xb6,0xd9,0xba,0xb2,0xd5,0x95,0x77,0xd2,0x6c,0x9f,0xbb,0x8c,
+ 0x96,0xb2,0x8d,0xbe,0x9a,0xb3,0xfe,0xbd,0xba,0xbe,0xbd,0xba,0x8d,0x4c,0x6a,0x9a,
+ 0x99,0x91,0xbe,0x9b,0x68,0x49,0x69,0x02,0x49,0x6c,0xcf,0xfe,0xbf,0xb1,0xdf,0xfe,
+ 0xb9,0xbe,0xde,0xda,0xd6,0x99,0xdb,0xd2,0x95,0x92,0xbe,0x76,0x64,0x02,0x71,0x02,
+ 0x6d,0x51,0xab,0xfe,0xbf,0x70,0x71,0x94,0xf7,0xff,0x02,0xfe,0xff,0x03,0xfe,0xde,
+ 0x03,0xb6,0xb2,0xb6,0xb5,0xb3,0xb2,0x71,0x02,0x8e,0x91,0x69,0x92,0x8e,0x69,0x6d,
+ 0x02,0x8d,0x6e,0xf1,0xd2,0x02,0xff,0x74,0x22,0x03,0x45,0x49,0x02,0x41,0x44,0x45,
+ 0x41,0x05,0x45,0x41,0x45,0x25,0x21,0x07,0x45,0x02,0x41,0x45,0x41,0x02,0x45,0x02,
+ 0x41,0x45,0x02,0x41,0x25,0x41,0x45,0x49,0x45,0x21,0x06,0x45,0x48,0x03,0x45,0x41,
+ 0x72,0x6e,0x44,0x21,0x44,0x02,0x45,0x49,0x45,0x49,0x8d,0xaf,0xd7,0x02,0xfb,0xff,
+ 0xdf,0xd6,0x02,0xb6,0x96,0x65,0x4c,0xa7,0xd6,0xfd,0xff,0xe6,0x71,0x8f,0x92,0xb2,
+ 0xab,0xd2,0xf6,0xf3,0x0c,0xff,0xf7,0xbf,0xb3,0x6e,0x6d,0x69,0x02,0x6d,0x65,0x69,
+ 0x6d,0x6a,0x6e,0x6d,0x02,0x69,0x49,0x45,0x21,0x25,0x24,0x02,0x21,0x25,0x21,0x25,
+ 0x24,0x45,0x24,0x21,0x41,0x24,0x21,0x41,0x24,0x25,0x41,0x44,0x4b,0xfd,0x02,0xde,
+ 0x92,0xac,0xbf,0xdf,0xfa,0xdf,0xdb,0xb5,0xb6,0xbe,0xfb,0xb5,0xd9,0x79,0x97,0x8e,
+ 0xad,0x99,0x52,0xae,0x8d,0x71,0xad,0x95,0x9a,0xf7,0xd8,0x55,0xad,0x9a,0x92,0x4c,
+ 0x4e,0x91,0x71,0x6d,0x4d,0x6d,0x72,0xb9,0xd6,0xb5,0x4e,0x48,0x49,0x02,0x69,0x49,
+ 0xdd,0xff,0xfe,0xbb,0xf1,0xfe,0xdb,0x95,0x92,0xdd,0xbd,0xb7,0xfe,0xbd,0x91,0x95,
+ 0xf2,0xdd,0x4e,0x68,0x72,0x71,0x6d,0x72,0x71,0x51,0x72,0x91,0x8c,0x68,0xdc,0xff,
+ 0xfc,0x02,0xfe,0x02,0xff,0xfe,0x02,0xff,0xd9,0xd5,0x02,0xba,0xb2,0xd6,0xb5,0xb7,
+ 0x02,0xb6,0x89,0x71,0xae,0xb1,0x91,0xb1,0x89,0x8d,0xad,0xb3,0xfa,0xf6,0xff,0xf7,
+ 0x54,0x21,0x0a,0x45,0x44,0x02,0x45,0x44,0x21,0x02,0x45,0x21,0x45,0x44,0x25,0x45,
+ 0x44,0x25,0x45,0x44,0x02,0x45,0x44,0x02,0x45,0x44,0x21,0x02,0x45,0x41,0x02,0x45,
+ 0x41,0x02,0x45,0x41,0x04,0x45,0x44,0x45,0x02,0x49,0x41,0x49,0x8e,0x68,0x25,0x40,
+ 0x45,0x69,0x4d,0x41,0x45,0x65,0x6f,0xd6,0xfb,0xdb,0x02,0xff,0x02,0xfb,0xda,0xb2,
+ 0xb6,0x9a,0x65,0x49,0xe5,0x02,0xff,0x7c,0x93,0x02,0xb6,0x02,0x92,0xae,0x86,0xaa,
+ 0xea,0xaf,0x02,0xfb,0x09,0xff,0xf6,0xb3,0xb2,0x02,0x6e,0x69,0x6a,0x02,0x69,0x4a,
+ 0x02,0x69,0x4e,0x02,0x6d,0x6e,0x6a,0x49,0x44,0x21,0x02,0x45,0x21,0x45,0x44,0x21,
+ 0x25,0x21,0x24,0x02,0x21,0x24,0x21,0x41,0x24,0x25,0x45,0xac,0xbf,0xff,0xbe,0x94,
+ 0x9f,0xfe,0xdd,0xb6,0xf9,0xdf,0xf6,0x99,0xb7,0xda,0x9d,0x02,0x96,0xb5,0x96,0x02,
+ 0x72,0x6d,0x72,0x02,0x71,0x6d,0x90,0xb7,0xb6,0xb9,0x99,0x72,0xb1,0x71,0x02,0x4d,
+ 0x6a,0x6d,0x51,0x02,0x4d,0x90,0x75,0x76,0x92,0x48,0x49,0x03,0x69,0x4c,0xab,0x02,
+ 0xfe,0xdd,0xdf,0xfe,0xbd,0xb6,0xb5,0xb6,0xba,0xfd,0xde,0xda,0xb9,0x91,0x9e,0xfa,
+ 0xb5,0x8e,0x71,0x6e,0x92,0x91,0x71,0x72,0x02,0x71,0x75,0x71,0x8a,0x02,0xfe,0xb8,
+ 0xbf,0xff,0xfd,0xff,0xfe,0xff,0xfe,0xbd,0xdb,0xfe,0xbe,0xb1,0xb2,0xf5,0xdb,0xd2,
+ 0x92,0x69,0x96,0xb2,0x92,0xb1,0x91,0x8d,0x8e,0xd1,0xf7,0xfb,0x02,0xff,0xe5,0x2c,
+ 0x41,0x02,0x49,0x0a,0x45,0x41,0x44,0x02,0x45,0x44,0x21,0x41,0x45,0x02,0x41,0x03,
+ 0x45,0x49,0x45,0x41,0x06,0x45,0x49,0x02,0x41,0x03,0x45,0x49,0x03,0x45,0x41,0x45,
+ 0x49,0x02,0x45,0x49,0x42,0x91,0x4e,0x20,0x25,0x69,0x49,0x45,0x49,0x45,0x49,0xad,
+ 0xb3,0xdb,0xff,0xfb,0x02,0xff,0xfb,0xf7,0xda,0xd3,0xd6,0x76,0x40,0x5f,0xff,0xfd,
+ 0xab,0xad,0xaf,0xb2,0xb6,0x8e,0x92,0xb1,0x8e,0x02,0x92,0x02,0x8e,0xae,0xcb,0xf7,
+ 0x07,0xff,0xfe,0x8b,0x8e,0x69,0x02,0x6d,0x6a,0x02,0x6d,0x02,0x69,0x6d,0x6a,0x6e,
+ 0x8d,0x69,0x02,0x6d,0x24,0x21,0x49,0x44,0x21,0x41,0x24,0x02,0x25,0x21,0x41,0x40,
+ 0x21,0x41,0x24,0x21,0x45,0x44,0x77,0x02,0xda,0xb5,0x95,0xf2,0x02,0xff,0x9d,0x8e,
+ 0xfd,0xde,0xbb,0xda,0xb9,0xbf,0x93,0x8d,0x96,0x6e,0x6d,0x6e,0xb5,0x59,0x4a,0x91,
+ 0x75,0x69,0x95,0xb6,0xbf,0xb7,0x70,0x72,0x91,0x6d,0x4d,0x02,0x6d,0x02,0x49,0x69,
+ 0x02,0x6d,0x89,0x6d,0x49,0x65,0x02,0x6d,0x02,0x49,0x71,0xf3,0x02,0xff,0xdd,0xdf,
+ 0xff,0xb9,0xba,0xda,0xd6,0xde,0x02,0xfe,0xda,0xb6,0x8c,0x9b,0xfa,0xba,0x89,0x71,
+ 0x92,0x72,0x91,0x71,0x72,0x91,0x03,0x71,0xed,0x02,0xff,0x38,0xbf,0xff,0xfd,0x02,
+ 0xff,0x03,0xfe,0xfa,0xd5,0xda,0x95,0x93,0xfa,0xba,0xad,0x8d,0x89,0x96,0xda,0xb6,
+ 0x8e,0xb1,0x8d,0x8a,0xd5,0xf7,0x02,0xff,0xbe,0x80,0x44,0x45,0x49,0x45,0x44,0x02,
+ 0x45,0x40,0x03,0x45,0x41,0x45,0x44,0x21,0x25,0x03,0x45,0x44,0x03,0x45,0x41,0x02,
+ 0x45,0x41,0x02,0x45,0x41,0x02,0x45,0x41,0x02,0x45,0x41,0x02,0x45,0x41,0x02,0x45,
+ 0x25,0x04,0x45,0x44,0x03,0x45,0x41,0x6d,0x72,0x65,0x25,0x40,0x4a,0x66,0x48,0x49,
+ 0x69,0x89,0x92,0xda,0xff,0xd7,0x02,0xfb,0x02,0xff,0xfe,0xdb,0x02,0xfb,0xd5,0x6a,
+ 0xe1,0xff,0xfb,0xb0,0x8e,0x02,0xb2,0x92,0xb6,0x96,0x92,0x02,0xb6,0x96,0x92,0xb2,
+ 0x02,0x8e,0xaa,0x86,0xca,0xea,0xd3,0x03,0xff,0xfb,0x78,0x6f,0x8e,0x6d,0x6e,0x02,
+ 0x6d,0x6a,0x02,0x6d,0x02,0x69,0x89,0x69,0x8d,0x8e,0x02,0x6e,0x03,0x45,0x25,0x03,
+ 0x21,0x41,0x24,0x21,0x02,0x25,0x21,0x45,0x44,0x45,0x4d,0xd1,0xba,0xb2,0x75,0x8e,
+ 0xde,0xfe,0xff,0xfa,0x7a,0x8a,0xbe,0xdd,0xbe,0xb6,0xf5,0xbd,0x96,0xb6,0x96,0x6a,
+ 0x8c,0x9b,0x8e,0x4c,0x49,0x75,0x91,0x6d,0x9e,0xfa,0xb9,0x92,0x51,0x4a,0x6d,0x71,
+ 0x03,0x6d,0x49,0x02,0x6d,0x69,0x02,0x6d,0x49,0x4d,0x6d,0x49,0x02,0x4d,0x49,0x9e,
+ 0x02,0xfe,0xfa,0xfd,0xff,0xfb,0xfd,0xda,0xde,0xfd,0xde,0xff,0xfe,0xdd,0xb2,0x95,
+ 0xb7,0xde,0x7a,0x69,0x95,0x91,0x95,0x92,0x71,0x02,0x75,0x71,0x6d,0x9e,0xfd,0xff,
+ 0xed,0x58,0x02,0xff,0xfd,0xfe,0x02,0xff,0xfc,0x02,0xfe,0xdd,0xb2,0xd5,0xb6,0xd6,
+ 0x95,0x8e,0x92,0xf5,0xb6,0xd6,0xb6,0x8e,0xb6,0x95,0xae,0x02,0xfe,0xfb,0xf2,0x15,
+ 0x41,0x45,0x49,0x02,0x45,0x49,0x45,0x25,0x07,0x45,0x21,0x02,0x45,0x02,0x41,0x44,
+ 0x45,0x41,0x45,0x41,0x02,0x45,0x41,0x45,0x49,0x41,0x02,0x45,0x21,0x45,0x49,0x45,
+ 0x41,0x44,0x02,0x45,0x29,0x02,0x45,0x48,0x45,0x41,0x44,0x45,0x41,0x45,0x66,0x89,
+ 0x2d,0x21,0x49,0x69,0x49,0x41,0x68,0x02,0x6e,0xb1,0xdb,0xfb,0xff,0xfb,0x08,0xff,
+ 0xb1,0xbf,0xff,0xfc,0x8f,0xd1,0xb6,0xb2,0xb1,0x02,0xb2,0xb6,0x02,0xb2,0xb6,0x02,
+ 0x92,0xb2,0x8e,0x92,0x96,0x02,0x92,0x91,0x8e,0x92,0xf6,0xba,0x8a,0x6d,0x02,0x6a,
+ 0x6d,0x02,0x69,0x6d,0x6e,0x6a,0x6d,0x02,0x69,0x6d,0x6a,0x6e,0x8d,0x02,0x8e,0x4d,
+ 0x45,0x02,0x21,0x03,0x45,0x21,0x24,0x25,0x21,0x03,0x45,0x91,0xd3,0xda,0x96,0x8d,
+ 0x9a,0xb6,0xee,0x02,0xff,0xfa,0xde,0x77,0xae,0xbf,0xfe,0xb9,0xbb,0xfe,0xbe,0xb2,
+ 0xb6,0x50,0x4e,0x02,0x91,0x6d,0x4d,0x49,0x52,0x02,0x95,0x96,0x95,0xb6,0x89,0x4d,
+ 0x49,0x4e,0x02,0x6d,0x4d,0x6d,0x49,0x4e,0x6d,0x49,0x4d,0x49,0x69,0x03,0x49,0x4a,
+ 0x6d,0x68,0x7b,0xfd,0xdd,0xdf,0x02,0xfe,0xff,0xfe,0xdd,0xde,0xfd,0xfe,0x02,0xff,
+ 0xb0,0xba,0x96,0xb2,0xb9,0x76,0x8d,0x9a,0xda,0x78,0x76,0x95,0x75,0x02,0x71,0x8c,
+ 0xbf,0xfe,0xff,0xfd,0x39,0xeb,0xfe,0xff,0xfd,0x03,0xfe,0x02,0xff,0xb9,0x8d,0xb5,
+ 0xb2,0xb1,0x91,0xcd,0xdf,0xfe,0xd9,0xb1,0xb5,0x02,0xb6,0xda,0xd6,0xdf,0xfe,0xff,
+ 0xa0,0x25,0x41,0x45,0x49,0x07,0x45,0x41,0x02,0x45,0x21,0x03,0x41,0x45,0x41,0x03,
+ 0x45,0x25,0x45,0x44,0x05,0x45,0x49,0x21,0x45,0x44,0x41,0x07,0x45,0x44,0x05,0x45,
+ 0x44,0x46,0x02,0x6d,0x40,0x24,0x45,0x49,0x69,0x65,0x6a,0x8e,0x92,0x97,0xfb,0x03,
+ 0xff,0xfb,0x06,0xff,0xfb,0xdb,0xf3,0xfe,0xbf,0xb1,0x92,0xb6,0x04,0xb2,0x92,0x02,
+ 0xb2,0x92,0x02,0xb2,0x02,0x96,0x04,0x92,0x97,0x92,0xb2,0x92,0x8e,0x8d,0x02,0x69,
+ 0x6d,0x4a,0x02,0x6d,0x6a,0x8d,0x69,0x02,0x6e,0x69,0x6a,0x6e,0x69,0x6e,0x02,0x8d,
+ 0x8e,0x6e,0x45,0x44,0x03,0x21,0x24,0x21,0x41,0x44,0x21,0x45,0x88,0xbb,0xda,0xba,
+ 0x91,0x96,0xf6,0xba,0x92,0xf0,0xdf,0xfb,0xfa,0x94,0x7a,0xf6,0x02,0xdf,0xde,0xda,
+ 0xd6,0x94,0xbf,0x92,0x91,0x71,0x4e,0x8d,0x02,0x4d,0x4c,0x6f,0xba,0x79,0x72,0x91,
+ 0x6d,0x02,0x49,0x68,0x4d,0x49,0x6d,0x4d,0x05,0x49,0x45,0x04,0x49,0x48,0x4a,0x69,
+ 0x48,0x8f,0xfe,0xfd,0xde,0x02,0xfe,0xde,0xfe,0xfd,0xde,0x02,0xfe,0xfd,0xda,0xb9,
+ 0x95,0x96,0xd5,0x95,0x9e,0xfd,0xff,0xab,0x6c,0x7a,0x96,0x75,0x6d,0x75,0xb5,0xfb,
+ 0x02,0xff,0xdc,0xdf,0xff,0xfd,0xff,0xdd,0xfb,0xfe,0xff,0xfd,0xde,0xba,0x91,0xba,
+ 0xb6,0x8d,0xbe,0xfa,0xfe,0xd6,0xb5,0x92,0xb6,0xb5,0xdb,0x02,0xfa,0xfb,0xff,0x5f,
+ 0x40,0x02,0x49,0x02,0x45,0x44,0x25,0x02,0x45,0x02,0x41,0x44,0x03,0x45,0x21,0x41,
+ 0x44,0x25,0x02,0x45,0x02,0x41,0x44,0x45,0x25,0x45,0x41,0x45,0x49,0x04,0x45,0x41,
+ 0x44,0x03,0x45,0x41,0x45,0x44,0x02,0x45,0x44,0x41,0x45,0x49,0x45,0x25,0x69,0x6e,
+ 0x65,0x28,0x21,0x45,0x69,0x6a,0x91,0x71,0x6b,0xb2,0xd5,0x0c,0xff,0xf3,0x02,0xff,
+ 0xd0,0x92,0xd2,0x05,0xb2,0xb5,0x02,0xb2,0xb6,0x92,0x02,0x96,0x02,0x92,0x96,0x03,
+ 0x92,0x8e,0x02,0x92,0x6d,0x45,0x65,0x6a,0x04,0x69,0x6d,0x02,0x6e,0x8d,0x6a,0x02,
+ 0x6d,0x6e,0x8e,0x8d,0x6e,0x8e,0x91,0x8e,0x66,0x21,0x44,0x02,0x25,0x21,0x44,0x20,
+ 0x21,0x45,0x40,0x7b,0xfa,0xff,0xf5,0x79,0xb2,0xdf,0xfe,0xbe,0xae,0xb5,0xf3,0xfe,
+ 0xde,0xbd,0xbb,0xfe,0xde,0xdf,0xbe,0xb1,0xbe,0xb6,0x91,0x6e,0x6d,0x48,0x4e,0x6d,
+ 0x4c,0x49,0x4c,0x8f,0x8d,0x6d,0x48,0x4e,0x02,0x6d,0x03,0x49,0x4e,0x6d,0x48,0x02,
+ 0x49,0x04,0x45,0x02,0x49,0x45,0x03,0x49,0x44,0x50,0xf3,0x02,0xfe,0xdd,0xff,0xfe,
+ 0xfd,0x02,0xfe,0xf6,0xff,0xfe,0xbd,0xdf,0xfe,0xb9,0xb1,0x91,0xeb,0x02,0xff,0x6c,
+ 0x76,0x02,0x95,0x6d,0x71,0x6d,0x91,0xbc,0xfb,0x04,0xff,0x9f,0xa8,0xde,0xdd,0xf7,
+ 0xfe,0xff,0xdd,0xda,0xba,0xb5,0xb6,0xb9,0xf2,0x02,0xff,0xbd,0xa9,0xb5,0x95,0x92,
+ 0xd5,0xf6,0xff,0xfe,0xff,0xec,0x01,0x0d,0x41,0x02,0x49,0x45,0x49,0x45,0x41,0x49,
+ 0x45,0x40,0x03,0x45,0x41,0x02,0x45,0x21,0x04,0x45,0x41,0x03,0x45,0x41,0x04,0x45,
+ 0x40,0x03,0x45,0x41,0x02,0x45,0x41,0x06,0x45,0x49,0x04,0x45,0x49,0x8d,0x4d,0x21,
+ 0x02,0x45,0x02,0x49,0x8a,0x89,0x6d,0xaf,0xbb,0x04,0xff,0xfb,0x06,0xff,0xfb,0xfe,
+ 0xff,0xfe,0x9b,0xae,0x02,0xb2,0xae,0xb2,0xb6,0xb2,0x02,0xb6,0x02,0xb2,0xb6,0xb2,
+ 0x92,0xb2,0x92,0x96,0x04,0x92,0xb2,0x92,0x4e,0x48,0x25,0x49,0x65,0x6e,0x6a,0x69,
+ 0x49,0x8d,0x69,0x6a,0x8e,0x69,0x6e,0x6d,0x8e,0x6e,0x02,0x8d,0x02,0x8e,0x8d,0x65,
+ 0x49,0x02,0x21,0x24,0x02,0x21,0x44,0x25,0x49,0xa9,0x96,0xde,0x9e,0x8e,0x02,0xde,
+ 0xff,0xfb,0x7c,0x92,0xbe,0xde,0xdf,0xd6,0xd4,0xbf,0x97,0xb1,0x90,0x7e,0xd7,0x88,
+ 0x71,0x8d,0x6d,0x02,0x49,0x4a,0x02,0x49,0x45,0x02,0x71,0x02,0x45,0x68,0x4d,0x6d,
+ 0x4d,0x02,0x49,0x69,0x49,0x69,0x4d,0x45,0x49,0x48,0x45,0x02,0x49,0x45,0x03,0x49,
+ 0x69,0x28,0x25,0x51,0xf1,0xfe,0xff,0xfd,0xdd,0x02,0xfe,0xfd,0x05,0xfe,0xde,0xda,
+ 0x95,0x8e,0xfe,0xff,0xd8,0x56,0x91,0x96,0x92,0x71,0x72,0x03,0x71,0xb9,0xf5,0x03,
+ 0xff,0xdc,0x2a,0x64,0x51,0x9e,0xff,0xfd,0xfe,0xde,0xb5,0xb6,0x02,0xb5,0xfe,0xff,
+ 0xfe,0xf7,0x94,0x92,0xb6,0xb5,0xba,0xde,0xfe,0x02,0xff,0xbf,0x60,0x25,0x45,0x49,
+ 0x02,0x45,0x21,0x08,0x45,0x41,0x02,0x45,0x21,0x03,0x45,0x25,0x45,0x02,0x41,0x44,
+ 0x02,0x45,0x44,0x45,0x41,0x45,0x41,0x04,0x45,0x44,0x02,0x45,0x49,0x02,0x45,0x49,
+ 0x03,0x45,0x41,0x45,0x65,0x6e,0x42,0x24,0x25,0x49,0x6d,0x45,0x6d,0x72,0x69,0x92,
+ 0xf2,0x03,0xff,0x02,0xfb,0x07,0xff,0xf7,0xff,0xdf,0xaa,0x02,0xb6,0x92,0x02,0xb6,
+ 0x92,0x02,0xb6,0x92,0x02,0xb2,0x92,0xb2,0xb1,0x92,0x02,0xb2,0x92,0x02,0xb2,0x92,
+ 0x02,0xb6,0x68,0x02,0x45,0x21,0x25,0x45,0x46,0x69,0x6d,0x4a,0x69,0x8d,0x02,0x6e,
+ 0x8d,0x6e,0x8e,0x8d,0x6a,0x8e,0x8d,0x6e,0x8e,0x91,0x45,0x02,0x25,0x21,0x25,0x02,
+ 0x21,0x44,0x45,0x9e,0x96,0x8d,0x92,0xb5,0xd3,0xdf,0xde,0xbe,0xbf,0xda,0x99,0x9b,
+ 0xfd,0x9d,0x97,0xb6,0x70,0x76,0x92,0x8e,0x91,0x51,0x6d,0x71,0x6d,0x48,0x03,0x49,
+ 0x45,0x68,0x6a,0x6d,0x4d,0x45,0x4d,0x6d,0x49,0x02,0x4d,0x49,0x02,0x4d,0x04,0x49,
+ 0x45,0x69,0x03,0x49,0x69,0x65,0x6c,0x72,0x41,0x48,0x28,0x4e,0xf8,0x02,0xfe,0xfd,
+ 0xde,0xff,0x02,0xfe,0xfa,0xfd,0xff,0xfe,0xde,0xb9,0xb6,0x95,0xb3,0xd9,0x79,0x91,
+ 0x96,0x95,0x75,0x6e,0x02,0x71,0x75,0x71,0x8d,0xbf,0xfe,0x03,0xff,0xbc,0x89,0x2d,
+ 0xe3,0xff,0x9f,0xa0,0xde,0xfe,0xbd,0x8d,0xb4,0xf3,0x02,0xff,0xbc,0x96,0xd5,0xb6,
+ 0xba,0xda,0xd2,0xde,0xfe,0xff,0xf6,0x2e,0x41,0x45,0x49,0x45,0x02,0x49,0x40,0x09,
+ 0x45,0x25,0x45,0x40,0x05,0x45,0x02,0x41,0x45,0x41,0x05,0x45,0x41,0x04,0x45,0x49,
+ 0x02,0x45,0x49,0x03,0x45,0x41,0x02,0x45,0x41,0x4e,0x8a,0x48,0x21,0x02,0x45,0x49,
+ 0x4d,0x6a,0x8d,0x6d,0xa7,0xdf,0x04,0xff,0xfb,0x06,0xff,0xfb,0xfe,0xff,0xf2,0xb5,
+ 0xae,0x02,0xb6,0xb2,0x02,0xb6,0x03,0xb2,0xae,0x02,0xb2,0xae,0x92,0xb6,0xb2,0x96,
+ 0xb6,0xb2,0x92,0xb6,0xb2,0x8a,0x4a,0x40,0x41,0x25,0x45,0x21,0x25,0x41,0x49,0x03,
+ 0x69,0x6d,0x03,0x8e,0x8a,0x08,0x8e,0x02,0x25,0x24,0x21,0x41,0x44,0x25,0x51,0xf2,
+ 0xb4,0x4d,0x88,0x97,0xba,0xfa,0xff,0xf7,0x94,0xbb,0xb6,0xb1,0x9a,0x96,0xb1,0x6c,
+ 0x75,0x96,0x6d,0x91,0x71,0x6e,0xb5,0x55,0x45,0x49,0x69,0x49,0x45,0x48,0x4a,0x02,
+ 0x6d,0x6e,0x02,0x6d,0x02,0x49,0x69,0x49,0x03,0x4d,0x49,0x48,0x4a,0x49,0x48,0x03,
+ 0x49,0x4e,0x69,0x48,0x4e,0x65,0x28,0x02,0x25,0x48,0x4a,0xfd,0xfe,0xde,0x03,0xfe,
+ 0x03,0xde,0x02,0xfe,0xfd,0xbe,0x02,0xba,0xbe,0x9a,0x91,0x95,0x91,0x03,0x71,0x72,
+ 0x02,0x71,0x72,0x75,0xb1,0x95,0xdd,0xff,0xfa,0xfe,0xff,0xd8,0x7e,0xfb,0x94,0x2d,
+ 0x84,0xbf,0xef,0x2c,0x20,0xdd,0xff,0xfd,0xff,0xd8,0xb9,0xba,0xd5,0xb6,0xda,0xf6,
+ 0xd6,0xfe,0xdf,0x80,0x29,0x03,0x45,0x44,0x03,0x45,0x25,0x02,0x45,0x21,0x02,0x45,
+ 0x21,0x45,0x49,0x21,0x41,0x44,0x05,0x45,0x44,0x03,0x45,0x21,0x45,0x44,0x25,0x07,
+ 0x45,0x28,0x25,0x45,0x48,0x21,0x41,0x44,0x45,0x49,0x89,0x6d,0x45,0x44,0x45,0x49,
+ 0x4d,0x46,0x8d,0x91,0x6e,0xb6,0xf7,0x0e,0xff,0xbe,0xae,0x02,0xb6,0xb7,0x02,0xb2,
+ 0x92,0x03,0xb2,0xae,0xb2,0x92,0x02,0xb2,0x92,0x96,0xb6,0x92,0x02,0xb2,0x8e,0xb2,
+ 0x92,0x40,0x45,0x44,0x21,0x41,0x40,0x02,0x21,0x24,0x21,0x49,0x69,0x49,0x6d,0x8d,
+ 0x02,0x8e,0x8d,0x02,0x8e,0x8d,0x02,0x8e,0x91,0x8e,0x29,0x02,0x25,0x44,0x24,0x45,
+ 0x49,0xa7,0xfe,0x7b,0x48,0x7f,0xda,0xbe,0xb2,0xd9,0xbe,0xb6,0xb9,0xb6,0xda,0x9a,
+ 0x6d,0x9a,0x96,0x6d,0x72,0x02,0x91,0x71,0x91,0x8e,0x91,0x4d,0x41,0x45,0x69,0x05,
+ 0x49,0x4c,0x6e,0x45,0x29,0x41,0x49,0x4d,0x49,0x4d,0x6d,0x4d,0x4e,0x4d,0x49,0x02,
+ 0x4d,0x49,0x4d,0x6d,0x49,0x4d,0x6d,0x48,0x21,0x24,0x02,0x45,0x48,0x61,0xde,0x03,
+ 0xfe,0xde,0xbd,0xbe,0xfd,0xfe,0xff,0xfe,0xbd,0xde,0xdd,0x02,0xbe,0x9a,0x91,0x92,
+ 0x71,0x02,0x6d,0x71,0x6d,0x76,0x55,0x71,0x9a,0x95,0xb7,0xd1,0xfc,0x02,0xff,0xfe,
+ 0x02,0xff,0x36,0x48,0x2e,0xcd,0x50,0x45,0x44,0x60,0x02,0xff,0xfc,0xfe,0xbe,0xb6,
+ 0xd6,0xb9,0xd7,0xfa,0xfe,0xfb,0xed,0x2d,0x41,0x02,0x49,0x03,0x45,0x41,0x45,0x49,
+ 0x41,0x45,0x49,0x07,0x45,0x41,0x02,0x45,0x41,0x0b,0x45,0x25,0x06,0x45,0x49,0x02,
+ 0x45,0x49,0x02,0x45,0x49,0x45,0x52,0x4e,0x40,0x25,0x02,0x45,0x49,0x8d,0x02,0x8e,
+ 0x91,0xcf,0x0d,0xff,0xfe,0xff,0xea,0xb5,0x02,0xb2,0xb6,0x02,0xb2,0xb6,0xb2,0x02,
+ 0xb6,0xb2,0x96,0xb6,0xb2,0x96,0xb6,0x92,0x96,0xb6,0xb2,0x92,0x02,0xb2,0x89,0x29,
+ 0x41,0x02,0x45,0x02,0x41,0x25,0x21,0x02,0x25,0x21,0x25,0x68,0x69,0x6e,0x8d,0x8e,
+ 0x02,0x92,0x02,0x8e,0x91,0x8e,0x92,0xb2,0x21,0x41,0x24,0x21,0x45,0x48,0x45,0xdd,
+ 0xdf,0xad,0x75,0xd2,0xbe,0x02,0xba,0xb5,0xba,0xf6,0xda,0xde,0xba,0xbb,0x8e,0x6c,
+ 0x73,0xd2,0x50,0x73,0xb2,0x71,0x77,0x02,0xb6,0x88,0x49,0x03,0x45,0x49,0x02,0x45,
+ 0x44,0x4a,0x69,0x49,0x21,0x49,0x6d,0x49,0x4d,0x6d,0x49,0x05,0x6d,0x69,0x02,0x6d,
+ 0x4e,0x02,0x6d,0x69,0x45,0x44,0x02,0x25,0x24,0x25,0x45,0x64,0x9b,0x04,0xfe,0xbd,
+ 0xdf,0xff,0xfd,0x02,0xff,0xb8,0xbf,0xfe,0x99,0xbb,0xde,0xfe,0xdd,0x72,0x71,0x72,
+ 0x95,0x75,0x76,0x02,0x75,0x76,0x95,0x75,0x9b,0xde,0xfa,0x03,0xff,0xf6,0xda,0x99,
+ 0x69,0x29,0x03,0x49,0xe0,0x02,0xff,0xfd,0xfe,0xbe,0xda,0xba,0xde,0xfa,0xff,0xfb,
+ 0x59,0x41,0x05,0x45,0x41,0x45,0x44,0x21,0x45,0x49,0x02,0x45,0x44,0x25,0x45,0x44,
+ 0x25,0x45,0x44,0x25,0x45,0x44,0x45,0x41,0x44,0x02,0x45,0x44,0x45,0x41,0x44,0x0e,
+ 0x45,0x44,0x45,0x49,0x6d,0x45,0x25,0x44,0x45,0x49,0x6d,0x6e,0xae,0x8d,0x8f,0xd6,
+ 0xf7,0x0a,0xff,0xfb,0xfa,0xff,0xfb,0xb8,0x93,0x06,0xb2,0x02,0xb6,0x92,0x02,0xb6,
+ 0x92,0x02,0xb2,0x97,0x02,0xb2,0x92,0x02,0xb2,0x93,0xb2,0x51,0x41,0x03,0x45,0x25,
+ 0x45,0x02,0x21,0x25,0x02,0x21,0x20,0x02,0x25,0x65,0x02,0x6d,0x8d,0x02,0x92,0x91,
+ 0x8e,0x92,0xb2,0x92,0x44,0x02,0x25,0x44,0x25,0x52,0xd1,0xb6,0xd6,0xb9,0xb3,0xde,
+ 0xbe,0xfb,0xfe,0x9e,0x91,0x9a,0xf9,0xdf,0xd2,0xf9,0xbd,0x6e,0x8d,0x69,0x92,0x91,
+ 0x02,0x6d,0x71,0x93,0xb2,0x51,0x44,0x49,0x69,0x49,0x45,0x49,0x41,0x49,0x69,0x02,
+ 0x45,0x69,0x49,0x02,0x71,0x6e,0x02,0x91,0x6d,0x8d,0x4d,0x6a,0x8d,0x4d,0x49,0x02,
+ 0x6d,0x69,0x02,0x6e,0x40,0x25,0x03,0x45,0x28,0x24,0x25,0x48,0x8b,0xfe,0xff,0xfd,
+ 0x03,0xfe,0xff,0x02,0xfe,0xdb,0xfd,0xbd,0xb6,0xdc,0x02,0xff,0x9e,0x6c,0x7a,0x02,
+ 0x95,0x96,0x02,0x75,0x76,0x02,0x95,0x96,0x95,0xdb,0xd6,0xd9,0xba,0xdf,0xff,0xd6,
+ 0xdf,0xfe,0xbd,0x65,0x48,0x41,0xdf,0xff,0xfc,0xdf,0xfe,0xdd,0xda,0xb9,0xb2,0xbe,
+ 0xde,0xb9,0x61,0x44,0x41,0x45,0x49,0x02,0x45,0x49,0x05,0x45,0x44,0x03,0x45,0x02,
+ 0x41,0x45,0x02,0x41,0x44,0x45,0x41,0x44,0x03,0x45,0x41,0x45,0x49,0x02,0x45,0x49,
+ 0x45,0x41,0x44,0x41,0x45,0x49,0x41,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x46,
+ 0x69,0x2d,0x21,0x25,0x03,0x49,0x8c,0x96,0x8a,0xad,0xcf,0x0b,0xff,0xfb,0x02,0xff,
+ 0xfd,0x8f,0xd1,0x02,0xb2,0xb6,0x02,0xb2,0xb6,0x03,0xb2,0xb3,0xb2,0xb6,0x02,0xb2,
+ 0xb6,0x02,0xb2,0xb6,0x02,0x92,0xb6,0x92,0x61,0x44,0x02,0x41,0x45,0x41,0x45,0x25,
+ 0x02,0x21,0x25,0x21,0x02,0x25,0x02,0x21,0x44,0x49,0x6d,0x91,0x02,0x8e,0x92,0x8e,
+ 0x92,0xb2,0x25,0x45,0x40,0x21,0x45,0xa6,0x02,0xb6,0xd6,0xb9,0xbe,0xda,0xdb,0xfe,
+ 0xff,0xdb,0xfa,0x99,0x97,0xfd,0x9d,0x03,0x8d,0x97,0x8e,0x6c,0x02,0x71,0x92,0x6d,
+ 0xb9,0x9e,0x69,0x49,0x44,0x4a,0x02,0x69,0x45,0x49,0x02,0x69,0x02,0x49,0x4e,0x8d,
+ 0x6d,0x72,0x02,0x91,0x92,0xb6,0x95,0x69,0x4d,0x02,0x6d,0x4d,0x04,0x6d,0x45,0x25,
+ 0x44,0x25,0x41,0x44,0x45,0x25,0x44,0x25,0x45,0xa0,0xbf,0xff,0xf8,0x02,0xfe,0xf9,
+ 0x02,0xff,0xbd,0x02,0xde,0x98,0xbf,0xfe,0xbd,0xb5,0x95,0x91,0x96,0x02,0x95,0x96,
+ 0x95,0x02,0x91,0x99,0x9e,0x97,0x02,0xb9,0xba,0xdd,0xbe,0xbf,0xb6,0x90,0x92,0xb2,
+ 0xad,0x80,0xbc,0xff,0xfd,0x6f,0xa0,0x02,0xff,0xbc,0x02,0xb6,0xb2,0xb6,0x6a,0x44,
+ 0x25,0x45,0x41,0x05,0x45,0x44,0x03,0x45,0x41,0x04,0x45,0x44,0x45,0x41,0x44,0x03,
+ 0x45,0x21,0x05,0x45,0x25,0x45,0x44,0x02,0x45,0x44,0x02,0x45,0x48,0x41,0x45,0x44,
+ 0x07,0x45,0x6d,0x71,0x41,0x25,0x41,0x4a,0x69,0x89,0x96,0xb2,0x71,0x6f,0xfa,0x0b,
+ 0xff,0xfb,0xf7,0xff,0xf7,0xcd,0x06,0xb2,0x92,0x02,0xb2,0x92,0x05,0xb2,0x92,0x02,
+ 0xb2,0xb6,0x02,0xb2,0x93,0x8e,0x4c,0x21,0x02,0x45,0x21,0x45,0x24,0x21,0x41,0x24,
+ 0x21,0x02,0x25,0x02,0x21,0x20,0x21,0x25,0x45,0x4a,0x02,0x8d,0x02,0x8e,0xae,0x92,
+ 0x25,0x21,0x41,0x24,0x42,0x02,0x95,0x8e,0xba,0xdd,0x02,0xdf,0xfe,0xde,0xdf,0xfe,
+ 0xff,0xd7,0xb8,0xbf,0xb6,0xb9,0x9e,0x92,0x91,0x96,0x72,0x91,0x71,0x69,0x6c,0x6e,
+ 0x6d,0x4d,0x03,0x49,0x46,0x45,0x49,0x45,0x49,0x4d,0x4a,0x6d,0x02,0x91,0xbe,0xba,
+ 0x70,0x72,0xb1,0xba,0xb2,0x71,0x69,0x71,0x51,0x03,0x6d,0x6e,0x45,0x49,0x21,0x45,
+ 0x44,0x25,0x21,0x44,0x02,0x25,0x48,0x02,0x25,0xcc,0xbf,0xfe,0xfd,0xfe,0xff,0x03,
+ 0xfe,0x9d,0xbb,0xda,0xdc,0x02,0xff,0x9e,0x91,0x96,0x02,0x95,0x96,0x02,0x95,0x96,
+ 0x95,0x71,0x9a,0xd9,0xbf,0xfe,0x9d,0xba,0xbe,0xde,0xb5,0xb6,0x75,0x6d,0x8d,0x90,
+ 0xf7,0xff,0x9f,0x40,0x25,0xec,0x02,0xff,0x5d,0x45,0x6d,0x4d,0x06,0x45,0x41,0x45,
+ 0x44,0x25,0x02,0x45,0x25,0x45,0x49,0x02,0x45,0x44,0x25,0x02,0x45,0x41,0x02,0x45,
+ 0x02,0x41,0x45,0x25,0x45,0x29,0x02,0x45,0x49,0x25,0x45,0x49,0x02,0x45,0x48,0x02,
+ 0x45,0x48,0x05,0x45,0x49,0x02,0x45,0x48,0x4e,0x65,0x29,0x21,0x49,0x69,0x65,0x99,
+ 0x02,0xba,0x8e,0xb1,0xd7,0x0e,0xff,0xf4,0x96,0xd6,0xb3,0x02,0xb2,0xaf,0xb2,0xd6,
+ 0x02,0xb2,0xb5,0xb2,0x02,0xb6,0xb2,0x02,0xb6,0x96,0x02,0xb6,0xae,0xb2,0xb6,0x71,
+ 0x45,0x44,0x25,0x45,0x44,0x21,0x41,0x44,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,
+ 0x24,0x02,0x21,0x44,0x45,0x4d,0x8d,0x8a,0x8e,0x91,0x21,0x02,0x24,0x25,0x70,0xb7,
+ 0xb2,0x72,0x8d,0x9b,0xda,0xba,0xdf,0xff,0xbc,0xbf,0xfe,0xde,0xb5,0x99,0xb6,0x96,
+ 0xb9,0x99,0x96,0x92,0x71,0x49,0x6d,0x69,0x02,0x6d,0x4d,0x49,0x69,0x06,0x49,0x48,
+ 0x25,0x49,0x69,0x6e,0xdd,0xdf,0xba,0x96,0x6c,0x7a,0x96,0x95,0x06,0x6d,0x6e,0x6d,
+ 0x4c,0x25,0x45,0x44,0x25,0x45,0x44,0x25,0x02,0x45,0x02,0x25,0x02,0x45,0x74,0xf3,
+ 0x02,0xfe,0xfd,0x02,0xff,0xfd,0xfe,0xbe,0xb9,0xb6,0xfd,0xff,0xfd,0x9e,0xb5,0xb9,
+ 0x99,0x02,0x96,0x02,0x95,0x9a,0x96,0x91,0xbf,0xfe,0xdd,0x02,0xff,0xde,0xbf,0xfd,
+ 0x9d,0x6e,0x02,0x71,0x77,0x6e,0x48,0x49,0x45,0x20,0x7f,0xff,0x7c,0x44,0x28,0x41,
+ 0x45,0x25,0x45,0x03,0x41,0x45,0x25,0x45,0x21,0x02,0x45,0x21,0x04,0x45,0x44,0x02,
+ 0x45,0x40,0x25,0x45,0x44,0x41,0x04,0x45,0x49,0x25,0x0a,0x45,0x44,0x02,0x49,0x45,
+ 0x41,0x06,0x45,0x69,0x4d,0x41,0x44,0x45,0x49,0x70,0xb6,0xbf,0xda,0x95,0x8e,0xfd,
+ 0x0c,0xff,0xfb,0xfe,0xbb,0xcd,0xb6,0xd6,0xb2,0xb3,0xb2,0xae,0xb6,0x03,0xb2,0xb6,
+ 0xb2,0x96,0xb6,0x02,0xb2,0xb6,0x02,0xb2,0xb6,0xb2,0x92,0x6e,0x48,0x21,0x03,0x45,
+ 0x25,0x41,0x21,0x25,0x45,0x41,0x21,0x20,0x21,0x45,0x20,0x02,0x21,0x20,0x03,0x21,
+ 0x25,0x69,0x02,0x8e,0x44,0x21,0x45,0x48,0x6f,0xbf,0xff,0x88,0x5e,0xb6,0x91,0x96,
+ 0xd6,0x02,0xdf,0xfd,0xde,0xdf,0xff,0xcc,0xde,0x9e,0x92,0xb6,0x95,0x92,0x8e,0x6d,
+ 0x6e,0x02,0x6d,0x49,0x71,0x72,0x44,0x02,0x49,0x4a,0x49,0x69,0x02,0x49,0x48,0x6a,
+ 0x91,0x75,0x6e,0x02,0xbe,0x94,0x76,0x91,0x71,0x6d,0x4d,0x49,0x02,0x6d,0x02,0x4d,
+ 0x6d,0x49,0x41,0x44,0x25,0x02,0x45,0x02,0x21,0x44,0x25,0x21,0x44,0x02,0x25,0x44,
+ 0x20,0x75,0xf5,0xfe,0xff,0xfe,0x02,0xff,0xbe,0xb5,0xbe,0xb9,0xb6,0xfe,0x03,0xff,
+ 0x9d,0x9a,0xbe,0xb9,0x96,0xbe,0xf9,0xbd,0xde,0x02,0xfe,0x02,0xff,0xfd,0xfe,0xdd,
+ 0x02,0xff,0x7d,0x92,0x9e,0xba,0x99,0x26,0x44,0x25,0x45,0x44,0x49,0x45,0x44,0x25,
+ 0x45,0x44,0x21,0x02,0x45,0x21,0x04,0x45,0x44,0x02,0x25,0x45,0x21,0x45,0x48,0x25,
+ 0x45,0x49,0x21,0x41,0x44,0x02,0x45,0x29,0x21,0x45,0x44,0x02,0x41,0x44,0x02,0x41,
+ 0x44,0x02,0x45,0x44,0x02,0x45,0x49,0x41,0x49,0x29,0x02,0x45,0x48,0x02,0x45,0x49,
+ 0x02,0x45,0x49,0x4a,0x65,0x28,0x21,0x4d,0x6d,0x92,0xda,0xd9,0xdf,0xae,0xad,0xcf,
+ 0x0b,0xff,0xf7,0x02,0xff,0xc9,0xb6,0xd6,0xb3,0xb2,0xb6,0xb2,0x02,0xb6,0xb3,0x02,
+ 0xb2,0xb3,0xb2,0xb6,0xb2,0x02,0xb6,0x92,0xb2,0xb6,0xb2,0x02,0xb6,0x68,0x45,0x44,
+ 0x21,0x02,0x45,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x24,0x21,
+ 0x25,0x24,0x02,0x21,0x24,0x21,0x29,0x89,0x21,0x44,0x24,0x25,0x90,0xf7,0xfd,0x36,
+ 0xcb,0xb5,0x79,0xf7,0xf6,0xbd,0xfa,0x02,0xff,0xb9,0xbe,0xba,0x03,0xb6,0x75,0x6e,
+ 0x91,0x71,0x69,0x6d,0x69,0x49,0x69,0x8a,0x8d,0x4a,0x44,0x25,0x04,0x49,0x69,0x6e,
+ 0x95,0xb6,0x8d,0x02,0x95,0x96,0x95,0x92,0x91,0x71,0x6d,0x6e,0x6d,0x69,0x6e,0x6d,
+ 0x02,0x49,0x45,0x41,0x25,0x02,0x45,0x21,0x02,0x45,0x25,0x02,0x45,0x21,0x45,0x24,
+ 0x25,0x45,0x44,0x45,0xfc,0x02,0xff,0x03,0xfe,0x9e,0xd6,0xde,0xba,0xef,0x03,0xff,
+ 0xf1,0xbc,0xff,0xfe,0x9e,0xee,0xff,0xfe,0x02,0xff,0x02,0xfe,0xff,0x02,0xfe,0xff,
+ 0x02,0xfe,0xda,0xbd,0x02,0xda,0x6e,0x44,0x25,0x02,0x49,0x02,0x45,0x41,0x03,0x45,
+ 0x21,0x05,0x45,0x21,0x05,0x45,0x21,0x02,0x45,0x25,0x45,0x41,0x45,0x25,0x03,0x45,
+ 0x40,0x41,0x02,0x45,0x41,0x45,0x44,0x02,0x45,0x41,0x05,0x45,0x24,0x25,0x45,0x44,
+ 0x06,0x45,0x41,0x45,0x41,0x4a,0x6a,0x48,0x21,0x48,0x65,0x72,0xd5,0xb5,0xbf,0xfe,
+ 0x9c,0x8a,0xf9,0x0d,0xff,0xf5,0x9a,0xd2,0x03,0xb6,0xb7,0xb6,0x02,0xb2,0xb6,0x04,
+ 0xb2,0x02,0xb6,0x02,0xb2,0xb6,0x04,0xb2,0xad,0x4e,0x45,0x41,0x45,0x02,0x41,0x02,
+ 0x25,0x21,0x45,0x25,0x21,0x45,0x20,0x02,0x21,0x20,0x21,0x25,0x03,0x21,0x20,0x02,
+ 0x21,0x20,0x25,0x44,0x25,0x41,0x44,0x8f,0xfe,0x9e,0x85,0xb9,0x9a,0x8e,0xde,0xfe,
+ 0xff,0xdb,0xd9,0xbe,0xba,0xd9,0xbe,0x9a,0xf6,0x90,0x55,0x92,0x69,0x71,0x6d,0x02,
+ 0x49,0x69,0x4a,0x6d,0x4d,0x49,0x45,0x49,0x4a,0x04,0x49,0x6d,0x6e,0x02,0x95,0x96,
+ 0xb6,0x95,0x02,0x71,0x91,0x71,0x05,0x6d,0x6e,0x6a,0x49,0x21,0x45,0x44,0x25,0x41,
+ 0x44,0x25,0x41,0x44,0x25,0x45,0x44,0x21,0x41,0x24,0x25,0x45,0x28,0x42,0xfd,0xff,
+ 0xfe,0xff,0xde,0xd5,0xde,0xbd,0xb2,0xde,0xfa,0x03,0xff,0xda,0xfe,0xff,0xdc,0xbe,
+ 0xfe,0x02,0xff,0xfe,0x02,0xff,0x03,0xfe,0xfd,0x02,0xff,0xbd,0xba,0xb6,0x75,0x44,
+ 0x02,0x49,0x02,0x45,0x49,0x21,0x02,0x49,0x21,0x45,0x44,0x02,0x45,0x44,0x25,0x45,
+ 0x44,0x25,0x41,0x45,0x21,0x25,0x45,0x21,0x45,0x49,0x25,0x45,0x49,0x25,0x45,0x48,
+ 0x25,0x41,0x44,0x45,0x41,0x44,0x03,0x45,0x41,0x45,0x49,0x41,0x45,0x49,0x25,0x02,
+ 0x49,0x21,0x45,0x49,0x21,0x45,0x49,0x02,0x45,0x49,0x45,0x49,0x69,0x49,0x41,0x24,
+ 0x45,0x49,0xa9,0x9a,0xda,0xf5,0xff,0xf3,0xb4,0xd7,0x0d,0xff,0xbf,0xaf,0x02,0xb6,
+ 0xb3,0xb6,0xd6,0xb2,0xb6,0xd6,0xb3,0xb2,0xb6,0xb2,0x02,0xb6,0xb2,0x02,0xb6,0xae,
+ 0x02,0xb2,0x92,0xb6,0x76,0x02,0x41,0x45,0x21,0x25,0x45,0x02,0x21,0x25,0x02,0x21,
+ 0x45,0x25,0x41,0x40,0x02,0x21,0x24,0x02,0x21,0x24,0x25,0x21,0x24,0x02,0x21,0x24,
+ 0x02,0x45,0x20,0x57,0xfa,0xbe,0xa9,0x94,0xbb,0xaa,0xb5,0xdb,0xfe,0x9e,0xd7,0xfe,
+ 0xbe,0x99,0x9f,0xfb,0xb4,0x9f,0x72,0x69,0x02,0x6d,0x69,0x02,0x6d,0x02,0x49,0x48,
+ 0x03,0x49,0x02,0x45,0x68,0x4d,0x45,0x02,0x49,0x02,0x4d,0x49,0x72,0x03,0x91,0x71,
+ 0x8d,0x91,0x6d,0x69,0x02,0x6d,0x69,0x02,0x6d,0x49,0x45,0x25,0x41,0x02,0x45,0x41,
+ 0x25,0x45,0x41,0x21,0x02,0x45,0x21,0x45,0x02,0x41,0x44,0x24,0x45,0x48,0x61,0xdf,
+ 0xff,0xfe,0x02,0xff,0xb5,0xba,0xda,0xb1,0xdf,0xff,0xfe,0x02,0xff,0x9c,0x9f,0xb7,
+ 0x4c,0x7e,0xfd,0xfe,0xff,0xfe,0xde,0xfe,0xbd,0x9d,0x6d,0x70,0x71,0x6d,0x4d,0x49,
+ 0x45,0x49,0x03,0x45,0x02,0x41,0x02,0x45,0x25,0x45,0x40,0x25,0x45,0x41,0x45,0x25,
+ 0x41,0x03,0x45,0x41,0x45,0x41,0x09,0x45,0x41,0x45,0x02,0x41,0x45,0x02,0x41,0x04,
+ 0x45,0x24,0x25,0x45,0x02,0x41,0x04,0x45,0x41,0x03,0x45,0x21,0x05,0x45,0x49,0x69,
+ 0x24,0x25,0x48,0x49,0x76,0xd9,0xb5,0xdf,0xff,0xdd,0xb3,0xfa,0x0b,0xff,0xfe,0xff,
+ 0xea,0xb5,0x02,0xb2,0xd6,0xb2,0x02,0xb6,0x02,0xb2,0xb6,0xb2,0x02,0xb6,0xb2,0x96,
+ 0xb6,0xae,0xb2,0xb6,0x02,0xb2,0x02,0xb6,0x89,0x49,0x41,0x25,0x45,0x41,0x21,0x25,
+ 0x02,0x21,0x25,0x05,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,0x02,
+ 0x21,0x44,0x25,0x49,0xc9,0xdf,0xd7,0x94,0xbf,0xb2,0x90,0x9b,0xda,0xb9,0x92,0xde,
+ 0x9e,0x92,0xb6,0xb5,0xbf,0x8f,0x8c,0x72,0x02,0x6d,0x69,0x02,0x91,0x97,0x8a,0x2c,
+ 0x03,0x49,0x45,0x49,0x69,0x45,0x02,0x49,0x4e,0x4d,0x6d,0x4d,0x49,0x48,0x4e,0x02,
+ 0x71,0x69,0x8d,0x04,0x6d,0x49,0x6d,0x8d,0x6d,0x45,0x44,0x21,0x45,0x44,0x21,0x45,
+ 0x44,0x21,0x41,0x45,0x21,0x45,0x44,0x21,0x45,0x24,0x02,0x25,0x44,0x25,0x41,0xc0,
+ 0xdf,0xff,0xfe,0xfd,0xda,0xd5,0xba,0xb6,0xd4,0x02,0xff,0xfe,0xff,0xf3,0xd0,0xbd,
+ 0x2a,0x44,0x49,0x4d,0x4c,0x4e,0x91,0x50,0x4d,0x49,0x2c,0x29,0x02,0x49,0x02,0x25,
+ 0x04,0x45,0x21,0x45,0x44,0x21,0x02,0x45,0x25,0x45,0x44,0x25,0x02,0x45,0x21,0x41,
+ 0x44,0x45,0x41,0x44,0x25,0x45,0x44,0x25,0x02,0x45,0x25,0x45,0x44,0x21,0x02,0x45,
+ 0x40,0x25,0x49,0x41,0x45,0x44,0x02,0x45,0x44,0x02,0x45,0x44,0x25,0x45,0x44,0x45,
+ 0x41,0x44,0x02,0x45,0x44,0x03,0x45,0x21,0x45,0x49,0x21,0x45,0x65,0x48,0x25,0x44,
+ 0x49,0x6d,0xad,0xb9,0xde,0xf5,0xff,0xfb,0xf5,0xfb,0x0d,0xff,0xbd,0xaf,0x02,0xd2,
+ 0xb3,0x04,0xb6,0xd6,0xb2,0x02,0xb6,0xb3,0x02,0xb2,0x92,0x03,0xb2,0x02,0xb6,0xb3,
+ 0xae,0x51,0x03,0x45,0x21,0x41,0x45,0x02,0x21,0x24,0x02,0x21,0x25,0x02,0x21,0x24,
+ 0x02,0x21,0x20,0x02,0x21,0x20,0x02,0x21,0x24,0x21,0x25,0x24,0x25,0x45,0x61,0x9e,
+ 0xfe,0xdd,0xbf,0xfe,0x7c,0x7f,0xfa,0xd9,0xdf,0xbf,0xad,0xb5,0xb9,0xfb,0xed,0x95,
+ 0x91,0x92,0x71,0x8e,0x8d,0x4d,0x69,0x9f,0xd7,0x74,0x45,0x49,0x45,0x02,0x49,0x45,
+ 0x02,0x49,0x69,0x72,0x6e,0x48,0x4e,0x6d,0x49,0x4d,0x02,0x6d,0x45,0x6c,0x04,0x6d,
+ 0x69,0x6d,0x69,0x02,0x49,0x03,0x45,0x41,0x21,0x45,0x21,0x25,0x45,0x41,0x02,0x45,
+ 0x41,0x21,0x45,0x41,0x25,0x29,0x02,0x25,0x02,0x24,0x45,0x90,0xf7,0xfe,0xff,0xd9,
+ 0xda,0xd9,0xb5,0xb2,0xf9,0x03,0xff,0xfe,0x02,0xff,0x7c,0x2a,0x69,0x6a,0x9f,0xff,
+ 0x58,0x25,0x44,0x05,0x45,0x44,0x41,0x45,0x25,0x41,0x45,0x49,0x03,0x45,0x41,0x02,
+ 0x45,0x41,0x02,0x45,0x25,0x02,0x45,0x02,0x41,0x45,0x41,0x02,0x45,0x20,0x25,0x45,
+ 0x02,0x41,0x45,0x02,0x41,0x45,0x02,0x41,0x45,0x02,0x41,0x44,0x45,0x21,0x04,0x45,
+ 0x41,0x02,0x45,0x41,0x02,0x45,0x02,0x41,0x45,0x41,0x02,0x45,0x41,0x02,0x45,0x41,
+ 0x02,0x45,0x41,0x02,0x49,0x20,0x25,0x68,0x69,0x99,0xd9,0xb5,0xff,0xfe,0xfd,0x02,
+ 0xff,0x02,0xfb,0x0b,0xff,0xab,0xd1,0xb2,0x02,0xb6,0xb2,0x02,0xb6,0xb2,0x02,0xb6,
+ 0x02,0xb2,0xb6,0x02,0xb2,0xb6,0x02,0xb2,0xb6,0xb2,0x02,0xb6,0x96,0x65,0x29,0x41,
+ 0x02,0x45,0x02,0x41,0x24,0x02,0x21,0x24,0x02,0x21,0x20,0x05,0x21,0x25,0x02,0x21,
+ 0x45,0x20,0x21,0x25,0x20,0x25,0x24,0x26,0x95,0xdb,0xb5,0x9a,0xf6,0xfe,0xb7,0xd1,
+ 0xdf,0xfb,0xb5,0x02,0xbe,0xff,0xb1,0xbd,0x99,0x8f,0xd1,0x95,0x72,0x91,0x71,0x4a,
+ 0x91,0xb1,0x96,0x4e,0x69,0x45,0x03,0x49,0x02,0x45,0x49,0x02,0x6d,0x69,0x4d,0x6d,
+ 0x49,0x02,0x69,0x4a,0x02,0x69,0x6e,0x69,0x48,0x72,0x02,0x6d,0x6e,0x6d,0x4d,0x41,
+ 0x02,0x45,0x25,0x45,0x44,0x21,0x41,0x45,0x21,0x41,0x45,0x25,0x45,0x44,0x21,0x41,
+ 0x45,0x21,0x45,0x28,0x25,0x45,0x44,0x24,0x78,0xf7,0xfe,0xff,0xf9,0xde,0xb6,0xb1,
+ 0xb2,0xfd,0x03,0xff,0xfe,0xff,0xef,0x4c,0x9f,0x02,0xff,0xfe,0x47,0x40,0x03,0x49,
+ 0x06,0x45,0x41,0x45,0x44,0x25,0x41,0x45,0x25,0x08,0x45,0x25,0x02,0x45,0x41,0x02,
+ 0x45,0x41,0x02,0x45,0x21,0x02,0x45,0x02,0x41,0x45,0x25,0x41,0x40,0x45,0x25,0x09,
+ 0x45,0x44,0x21,0x45,0x44,0x21,0x02,0x45,0x21,0x45,0x44,0x25,0x04,0x45,0x48,0x21,
+ 0x49,0x6e,0x40,0x25,0x40,0x4d,0x91,0xb1,0xb9,0xdd,0xfa,0x02,0xff,0xfe,0xff,0x02,
+ 0xf7,0x0a,0xff,0xf7,0xb4,0xb7,0x02,0xb6,0xb7,0xb6,0x02,0xb2,0x02,0xb6,0xb3,0xb6,
+ 0xb2,0x92,0x02,0xb6,0x96,0xb6,0xb2,0xb7,0xb2,0xb1,0xbb,0x8e,0x4c,0x21,0x02,0x45,
+ 0x21,0x45,0x44,0x02,0x21,0x20,0x02,0x21,0x20,0x02,0x21,0x20,0x02,0x21,0x24,0x21,
+ 0x45,0x25,0x02,0x21,0x24,0x02,0x21,0x24,0x45,0x6c,0xb7,0xda,0x9a,0x8d,0xbf,0xff,
+ 0xde,0xdf,0xde,0xb5,0xbf,0xff,0xb5,0xda,0xb9,0xdb,0xd6,0xb9,0xba,0x8e,0x8d,0x71,
+ 0x69,0x8c,0x02,0x92,0x71,0x8e,0x8d,0x2d,0x4a,0x6d,0x4d,0x02,0x45,0x48,0x4a,0x71,
+ 0x6d,0x49,0x02,0x6d,0x02,0x49,0x02,0x69,0x03,0x6d,0x69,0x6d,0x02,0x6e,0x02,0x6d,
+ 0x45,0x44,0x02,0x41,0x45,0x41,0x02,0x45,0x20,0x25,0x45,0x41,0x21,0x02,0x45,0x25,
+ 0x45,0x02,0x41,0x24,0x21,0x25,0x29,0x25,0x45,0x28,0x24,0x56,0xf9,0xfe,0xff,0xde,
+ 0xb5,0x96,0xb5,0xb2,0x02,0xfe,0xff,0xf6,0xfc,0x02,0xff,0xfe,0x02,0xff,0x77,0x40,
+ 0x02,0x49,0x41,0x45,0x44,0x41,0x45,0x44,0x45,0x25,0x04,0x45,0x02,0x41,0x45,0x21,
+ 0x25,0x45,0x41,0x02,0x45,0x02,0x41,0x02,0x45,0x41,0x03,0x45,0x24,0x02,0x41,0x02,
+ 0x45,0x41,0x44,0x24,0x21,0x45,0x41,0x45,0x25,0x41,0x45,0x25,0x21,0x02,0x45,0x41,
+ 0x45,0x49,0x03,0x45,0x02,0x41,0x02,0x45,0x41,0x02,0x45,0x41,0x44,0x06,0x45,0x46,
+ 0x69,0x29,0x41,0x51,0x91,0x8e,0xba,0xd9,0xb9,0x02,0xff,0xfd,0x02,0xff,0xee,0xf7,
+ 0x0a,0xff,0xfc,0x97,0xd6,0xb3,0x02,0xb6,0x02,0xb2,0xb6,0xb2,0x02,0xb6,0xb2,0x02,
+ 0xb6,0xb2,0x02,0xb6,0xb2,0x02,0xb6,0xb2,0x02,0xb6,0x95,0x45,0x44,0x41,0x02,0x45,
+ 0x02,0x21,0x24,0x02,0x21,0x40,0x02,0x21,0x25,0x02,0x21,0x24,0x02,0x21,0x24,0x02,
+ 0x21,0x25,0x02,0x21,0x45,0x02,0x21,0x44,0x53,0xb2,0x91,0x8e,0xdd,0x02,0xdf,0xde,
+ 0x02,0xda,0x02,0xde,0xdf,0xdb,0xb5,0xb6,0xbe,0xdb,0xb6,0x96,0xad,0x9a,0x6e,0x89,
+ 0x72,0x6e,0x89,0x03,0x6d,0x4a,0x8d,0x02,0x6d,0x49,0x48,0x4a,0x49,0x69,0x71,0x6d,
+ 0x69,0x03,0x6d,0x45,0x6d,0x8d,0x02,0x6d,0x69,0x03,0x6d,0x73,0xd6,0x79,0x49,0x04,
+ 0x45,0x44,0x02,0x25,0x40,0x25,0x41,0x40,0x21,0x02,0x45,0x25,0x45,0x44,0x25,0x45,
+ 0x44,0x21,0x45,0x28,0x25,0x45,0x24,0x4f,0xfd,0x02,0xfe,0xbe,0xb9,0xbe,0xb6,0xcc,
+ 0xdf,0xff,0xbe,0x86,0xfd,0xbe,0xbb,0xfe,0x5d,0x09,0x45,0x25,0x02,0x45,0x25,0x03,
+ 0x45,0x41,0x40,0x03,0x45,0x41,0x45,0x44,0x25,0x02,0x45,0x41,0x45,0x44,0x25,0x45,
+ 0x44,0x02,0x45,0x40,0x21,0x41,0x45,0x41,0x02,0x45,0x21,0x41,0x02,0x45,0x25,0x03,
+ 0x45,0x24,0x25,0x45,0x44,0x02,0x45,0x44,0x45,0x25,0x45,0x41,0x02,0x45,0x21,0x45,
+ 0x44,0x03,0x45,0x41,0x45,0x44,0x45,0x69,0x4d,0x41,0x25,0xa6,0x8d,0x95,0xb1,0xb6,
+ 0xfd,0xfa,0x02,0xff,0xfa,0xf6,0xf3,0xf2,0x0a,0xff,0xb3,0xcd,0xb7,0x02,0xd2,0xb2,
+ 0xb6,0xb2,0xb7,0xb6,0x02,0xb2,0x02,0xb6,0xb2,0xb6,0x04,0xb2,0x02,0xb6,0xb2,0xb6,
+ 0x8e,0x48,0x25,0x02,0x45,0x25,0x45,0x40,0x02,0x21,0x20,0x02,0x21,0x20,0x21,0x41,
+ 0x24,0x02,0x21,0x20,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x24,0x2e,0xed,0xba,
+ 0x8a,0xb0,0xfb,0xfe,0x5d,0xaf,0xfa,0xbd,0xdf,0xff,0xdf,0xda,0x02,0xde,0xb6,0xbb,
+ 0xfe,0xdc,0x9b,0xd6,0x91,0x72,0x91,0x92,0x8e,0x6d,0x69,0x71,0x91,0x6d,0x49,0x69,
+ 0x6a,0x69,0x03,0x49,0x6d,0x4d,0x49,0x68,0x6e,0x69,0x6d,0x49,0x69,0x8d,0x6d,0x6e,
+ 0x8d,0x6d,0x92,0xf5,0xff,0xfb,0xdf,0xb1,0x8e,0x4d,0x06,0x45,0x21,0x45,0x44,0x21,
+ 0x45,0x44,0x21,0x25,0x45,0x21,0x45,0x44,0x21,0x41,0x44,0x24,0x29,0x28,0x66,0xfe,
+ 0xff,0xd9,0xfe,0xde,0xb9,0xb2,0xfc,0xff,0xf6,0x3c,0x93,0xbe,0xba,0x95,0x45,0x44,
+ 0x41,0x45,0x49,0x21,0x25,0x24,0x25,0x45,0x44,0x25,0x45,0x44,0x41,0x02,0x45,0x02,
+ 0x41,0x44,0x45,0x21,0x45,0x41,0x45,0x49,0x21,0x45,0x49,0x05,0x45,0x44,0x02,0x45,
+ 0x24,0x25,0x41,0x44,0x21,0x02,0x45,0x41,0x02,0x45,0x41,0x02,0x45,0x02,0x25,0x29,
+ 0x02,0x25,0x44,0x45,0x25,0x45,0x02,0x41,0x44,0x41,0x45,0x24,0x21,0x02,0x45,0x41,
+ 0x45,0x48,0x02,0x45,0x49,0x4a,0x45,0x29,0x42,0x91,0xb5,0x8d,0xb9,0xf9,0x02,0xfe,
+ 0xff,0xfe,0xff,0xfe,0xd7,0xfb,0x0a,0xff,0xcd,0xb6,0xd6,0xb3,0x02,0xb6,0xae,0x02,
+ 0xb6,0xaf,0xb2,0xd6,0x02,0xb2,0xb6,0x02,0xb2,0xd2,0xae,0x02,0xb6,0xb2,0x02,0xb6,
+ 0x6c,0x45,0x44,0x02,0x45,0x44,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x44,0x02,
+ 0x21,0x20,0x02,0x21,0x25,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x61,0x76,0xb2,
+ 0x70,0x77,0xfe,0xbd,0xb1,0x9d,0xbe,0xbb,0xfe,0xff,0xf6,0xfd,0x03,0xff,0xfe,0x02,
+ 0xff,0xbd,0x8e,0xb1,0x71,0x72,0x02,0x8d,0x96,0x8e,0x4c,0x4e,0x8d,0x4c,0x4e,0x05,
+ 0x6d,0x69,0x49,0x45,0x4e,0x8d,0x03,0x6d,0x69,0x65,0x4d,0x89,0x6d,0x8d,0x89,0x9b,
+ 0xda,0xf3,0xfa,0xff,0x02,0xfb,0xb7,0x55,0x42,0x02,0x45,0x25,0x45,0x41,0x25,0x45,
+ 0x44,0x25,0x45,0x02,0x41,0x45,0x41,0x25,0x45,0x44,0x21,0x45,0x44,0x25,0x45,0x80,
+ 0xbf,0xff,0xdd,0xde,0xba,0xb5,0xbb,0xfd,0xfe,0xff,0xfe,0x02,0xff,0xf7,0x2c,0x26,
+ 0x02,0x49,0x02,0x45,0x41,0x02,0x45,0x41,0x03,0x45,0x25,0x45,0x24,0x25,0x02,0x45,
+ 0x25,0x02,0x45,0x21,0x02,0x45,0x21,0x45,0x05,0x49,0x02,0x89,0x8e,0xb2,0x75,0x41,
+ 0x25,0x04,0x45,0x21,0x04,0x45,0x41,0x03,0x45,0x21,0x45,0x44,0x03,0x45,0x41,0x02,
+ 0x45,0x41,0x45,0x44,0x25,0x04,0x45,0x44,0x02,0x45,0x44,0x4a,0x69,0x49,0x40,0x4c,
+ 0xaf,0xad,0x02,0xb5,0xde,0xfd,0xff,0x02,0xfe,0xff,0xf6,0xfb,0xf7,0x05,0xff,0xfb,
+ 0x03,0xff,0xfd,0x9e,0xd2,0xb7,0xb6,0xb2,0x02,0xb6,0xd2,0xb2,0xd2,0x07,0xb2,0xb7,
+ 0x03,0xb2,0xb6,0x02,0xb2,0x4a,0x40,0x03,0x45,0x21,0x25,0x41,0x02,0x21,0x41,0x21,
+ 0x02,0x25,0x02,0x21,0x20,0x02,0x21,0x20,0x02,0x21,0x20,0x02,0x21,0x20,0x02,0x21,
+ 0x20,0x49,0xa9,0x92,0x8e,0xb4,0x02,0xff,0x9e,0xaf,0xfe,0xbe,0xd7,0x02,0xfe,0xd9,
+ 0xdf,0xff,0xfc,0xdf,0xfe,0xff,0xfe,0x9e,0x8d,0x76,0x92,0x6d,0x51,0x91,0x71,0x6d,
+ 0x6c,0x6e,0x6d,0x4c,0x6e,0x6a,0x6d,0x49,0x02,0x6d,0x44,0x49,0x69,0x49,0x02,0x6d,
+ 0x69,0x05,0x6d,0x6e,0x72,0x91,0x6a,0x96,0xf6,0xb2,0xb6,0xf6,0xfb,0xf7,0xba,0x8d,
+ 0x45,0x44,0x02,0x45,0x44,0x25,0x41,0x45,0x21,0x45,0x44,0x25,0x21,0x44,0x21,0x45,
+ 0x44,0x25,0x41,0x44,0x25,0x49,0x68,0x93,0x02,0xfe,0xd9,0xde,0xbe,0xb5,0xbf,0xfe,
+ 0x03,0xff,0xfc,0x42,0x64,0x4a,0x02,0x49,0x02,0x45,0x44,0x02,0x45,0x44,0x25,0x45,
+ 0x49,0x25,0x45,0x44,0x03,0x45,0x41,0x45,0x44,0x02,0x45,0x44,0x6a,0x89,0xad,0x8e,
+ 0xd6,0xfa,0xf7,0xff,0xfe,0xff,0xfb,0x7e,0x65,0x08,0x45,0x21,0x45,0x44,0x45,0x41,
+ 0x44,0x25,0x02,0x45,0x41,0x45,0x44,0x02,0x41,0x44,0x45,0x41,0x44,0x25,0x45,0x49,
+ 0x02,0x45,0x49,0x02,0x45,0x68,0x6e,0x41,0x24,0x47,0xb1,0xb5,0x92,0xde,0xfc,0x02,
+ 0xff,0xfe,0xff,0xfb,0xfa,0xf3,0x02,0xff,0xf7,0xfb,0x06,0xff,0xbf,0xae,0xb2,0xd6,
+ 0xb7,0x02,0xb6,0xb2,0xb6,0xd6,0xb2,0x02,0xb6,0x02,0xb2,0xb6,0xb3,0x02,0xb6,0x03,
+ 0xb2,0xae,0xb6,0x96,0x40,0x02,0x45,0x21,0x45,0x44,0x02,0x21,0x25,0x02,0x21,0x24,
+ 0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x25,0x02,0x21,0x24,0x02,
+ 0x21,0x61,0x9b,0xd6,0x95,0x9b,0xfe,0xbe,0x8e,0xfd,0x03,0xff,0xfe,0xff,0xbf,0xf3,
+ 0xff,0xdf,0xd1,0x02,0xff,0xbc,0xbb,0xb3,0xae,0xb5,0x4e,0x65,0x6d,0x71,0x72,0x6e,
+ 0x6d,0x02,0x49,0x03,0x6d,0x49,0x65,0x4d,0x69,0x48,0x4e,0x6d,0x49,0x4e,0x03,0x6d,
+ 0x02,0x71,0x6e,0x91,0x96,0x65,0x8d,0x8e,0x6e,0xae,0x88,0x92,0xf6,0xf7,0x02,0xff,
+ 0xbe,0x61,0x44,0x03,0x45,0x40,0x25,0x45,0x41,0x25,0x45,0x40,0x21,0x02,0x45,0x21,
+ 0x45,0x24,0x25,0x45,0x24,0x25,0x4c,0xeb,0x02,0xff,0xfd,0xfe,0xfa,0xec,0x02,0xff,
+ 0xfe,0x02,0xff,0x54,0x26,0x65,0x06,0x45,0x41,0x06,0x45,0x41,0x04,0x45,0x02,0x41,
+ 0x69,0x85,0x97,0xfa,0xff,0xfb,0xff,0xf6,0xda,0xfe,0xfb,0x04,0xff,0xb3,0x68,0x41,
+ 0x0e,0x45,0x25,0x45,0x44,0x25,0x45,0x40,0x0b,0x45,0x41,0x49,0x69,0x28,0x21,0xac,
+ 0xb2,0xad,0xb9,0xb5,0xff,0xfe,0xff,0x02,0xfe,0xff,0xf3,0x02,0xfb,0xf7,0xfb,0xf7,
+ 0x03,0xff,0xfb,0xfe,0xff,0xe9,0xb5,0xd2,0xb6,0xd6,0x03,0xb6,0xb2,0xb6,0xd6,0xb2,
+ 0x02,0xb6,0x02,0xb2,0xb6,0xb2,0x02,0xb6,0xb2,0x02,0xb6,0xb2,0xa9,0x29,0x04,0x45,
+ 0x21,0x45,0x41,0x04,0x21,0x25,0x03,0x21,0x20,0x21,0x25,0x20,0x21,0x25,0x20,0x02,
+ 0x21,0x20,0x02,0x25,0x21,0x9d,0xfb,0xb9,0x92,0xd1,0xdf,0xd6,0xb4,0xbb,0xfe,0x04,
+ 0xff,0xfe,0xdf,0xfe,0xfd,0xbe,0xf9,0xdd,0x97,0xd6,0xb2,0xba,0x7a,0x69,0x71,0x6d,
+ 0x66,0x95,0x56,0x45,0x49,0x69,0x49,0x45,0x48,0x02,0x49,0x69,0x4d,0x49,0x69,0x6e,
+ 0x6d,0x4d,0x4a,0x02,0x71,0x6e,0x92,0x91,0x93,0xce,0x51,0x6b,0x8e,0x8d,0x69,0x02,
+ 0x6d,0x6b,0xb6,0xf6,0xf7,0xff,0xdf,0x88,0x21,0x40,0x02,0x45,0x44,0x21,0x41,0x44,
+ 0x45,0x41,0x44,0x25,0x41,0x44,0x25,0x45,0x28,0x25,0x45,0x48,0x24,0x5d,0xf6,0xfe,
+ 0xff,0x02,0xfe,0xde,0xdd,0x03,0xff,0xb0,0x29,0x85,0x6d,0x45,0x44,0x25,0x41,0x44,
+ 0x45,0x41,0x44,0x02,0x21,0x02,0x45,0x41,0x44,0x25,0x02,0x45,0x41,0x45,0x89,0x8f,
+ 0xfe,0xff,0xfb,0x02,0xff,0xfe,0x93,0xb1,0xb2,0xba,0xfa,0x04,0xff,0xf3,0x75,0x41,
+ 0x45,0x49,0x02,0x45,0x44,0x03,0x45,0x25,0x45,0x48,0x03,0x45,0x02,0x41,0x44,0x45,
+ 0x41,0x44,0x02,0x45,0x49,0x41,0x45,0x49,0x41,0x45,0x49,0x41,0x45,0x69,0x49,0x41,
+ 0x40,0x6f,0xd2,0x94,0x95,0xde,0xfd,0x02,0xff,0xfe,0xff,0xfb,0xfa,0xf7,0xfb,0xff,
+ 0xd7,0xfb,0x03,0xff,0xfe,0x02,0xff,0x9e,0xaf,0x02,0xb6,0xb7,0x04,0xb6,0xd6,0xb2,
+ 0xb6,0xd6,0xb3,0xb2,0xb6,0xb2,0x05,0xb6,0xb7,0xb2,0x55,0x02,0x41,0x44,0x21,0x41,
+ 0x45,0x21,0x41,0x25,0x02,0x21,0x24,0x02,0x21,0x25,0x02,0x21,0x24,0x02,0x21,0x24,
+ 0x02,0x21,0x24,0x02,0x21,0x20,0x02,0x21,0xdb,0xfe,0xbe,0xd6,0xff,0xfe,0xbd,0x97,
+ 0xda,0xf7,0xff,0xbf,0xb1,0xbf,0xfe,0xda,0x02,0xff,0xdd,0xde,0x7d,0xfb,0xfa,0xb9,
+ 0x94,0x9f,0xd7,0x6c,0x49,0x90,0x76,0x02,0x69,0x49,0x4d,0x49,0x02,0x45,0x03,0x49,
+ 0x06,0x6d,0x4d,0x69,0x6d,0x02,0x91,0x92,0xd9,0xdf,0xa0,0x4c,0x93,0x8d,0x4d,0x45,
+ 0x49,0x6d,0x89,0x92,0xd6,0xf3,0x02,0xff,0x50,0x21,0x44,0x03,0x45,0x41,0x25,0x45,
+ 0x41,0x45,0x25,0x41,0x03,0x45,0x21,0x03,0x25,0x48,0x24,0x5b,0xfd,0xfe,0xff,0xfe,
+ 0xbd,0xbf,0xfd,0x02,0xff,0xb7,0xa0,0x02,0xff,0x50,0x26,0x02,0x49,0x02,0x45,0x02,
+ 0x41,0x44,0x45,0x41,0x02,0x45,0x25,0x45,0x41,0x45,0x69,0xcb,0xfb,0x02,0xff,0xf6,
+ 0xbe,0xd7,0x02,0xff,0xb9,0x8e,0xb2,0x02,0xae,0xfa,0x04,0xff,0xfa,0x72,0x44,0x45,
+ 0x02,0x49,0x41,0x04,0x45,0x41,0x02,0x45,0x41,0x03,0x45,0x41,0x03,0x45,0x49,0x44,
+ 0x09,0x45,0x49,0x69,0x20,0x2a,0xd1,0x99,0x96,0xb9,0xf2,0x02,0xff,0xfd,0xff,0xfe,
+ 0xff,0xfb,0xff,0xfb,0xf7,0xfa,0xf7,0x03,0xff,0xfb,0xfe,0xff,0xcf,0xd6,0xb2,0x02,
+ 0xb6,0xb2,0x02,0xb6,0xb2,0xb6,0xd6,0xae,0x02,0xb6,0xb2,0x02,0xb6,0xb2,0x06,0xb6,
+ 0x81,0x49,0x41,0x25,0x02,0x45,0x02,0x25,0x41,0x21,0x25,0x02,0x21,0x25,0x02,0x21,
+ 0x24,0x05,0x21,0x25,0x02,0x21,0x25,0x20,0x03,0x21,0xfa,0xd9,0xb5,0xde,0xff,0xfe,
+ 0xdf,0xda,0xbb,0x02,0xfe,0xdf,0xfe,0xbd,0xdf,0x02,0xfe,0xdd,0xba,0xd5,0xdf,0xfb,
+ 0xb8,0xbf,0xb6,0xf1,0xdd,0x76,0x71,0x6a,0x8d,0x4c,0x4a,0x69,0x68,0x03,0x49,0x02,
+ 0x45,0x48,0x4a,0x02,0x6d,0x6e,0x02,0x6d,0x6e,0x8d,0x6c,0x6e,0x92,0xf2,0xff,0xfb,
+ 0x59,0x41,0x91,0x71,0x45,0x02,0x49,0x4a,0x6d,0x8d,0x8f,0x02,0xfa,0xff,0xf7,0x55,
+ 0x41,0x25,0x49,0x02,0x45,0x44,0x21,0x45,0x44,0x21,0x45,0x44,0x02,0x25,0x44,0x21,
+ 0x41,0x44,0x25,0x45,0x44,0xdf,0xff,0x02,0xfe,0xdb,0xb4,0xd7,0xfe,0xff,0xfe,0x02,
+ 0xff,0xd4,0x26,0x44,0x02,0x45,0x48,0x41,0x45,0x44,0x25,0x04,0x45,0x44,0x45,0x69,
+ 0xe9,0xdf,0x03,0xff,0xd7,0xb5,0xae,0xb2,0xf2,0x02,0xff,0xbe,0xae,0x92,0x91,0x93,
+ 0xfe,0xfb,0x03,0xff,0xfe,0xaf,0x2c,0x26,0x02,0x49,0x02,0x45,0x44,0x03,0x45,0x41,
+ 0x02,0x45,0x25,0x04,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x44,0x04,0x45,0x49,0x69,
+ 0x44,0x25,0x80,0x97,0xb6,0xb5,0x92,0xfd,0xff,0xfe,0xff,0xfd,0xff,0xfb,0xfa,0xff,
+ 0xfb,0xff,0xd3,0x04,0xff,0xfe,0xff,0xfb,0xbc,0xb7,0xb6,0xd6,0xb3,0x02,0xb6,0xb2,
+ 0xb6,0xd6,0x02,0xb6,0xd6,0x03,0xb2,0xb3,0x03,0xb2,0x02,0xb6,0xb7,0xae,0x4c,0x41,
+ 0x02,0x45,0x21,0x41,0x45,0x02,0x21,0x25,0x02,0x21,0x24,0x02,0x21,0x25,0x02,0x21,
+ 0x24,0x02,0x21,0x25,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x02,0xba,0x99,0xd3,
+ 0xfe,0xde,0x02,0xda,0xde,0xb5,0xdf,0xfe,0xff,0xfa,0x9c,0xdf,0xfe,0xbd,0xb5,0xdf,
+ 0xfd,0xff,0xf7,0xfe,0xb5,0xbf,0xff,0xb5,0xb1,0x51,0x6e,0x69,0x6c,0x6e,0x02,0x6d,
+ 0x45,0x02,0x49,0x45,0x49,0x69,0x02,0x49,0x89,0x6d,0x6e,0x03,0x91,0xb5,0xd7,0x02,
+ 0xfe,0xda,0xa9,0x2d,0x66,0x6d,0x4d,0x03,0x49,0x6a,0x6e,0x8d,0xa6,0xde,0xfe,0xf7,
+ 0xff,0xbf,0x70,0x45,0x49,0x03,0x45,0x41,0x02,0x45,0x02,0x25,0x02,0x45,0x02,0x25,
+ 0x02,0x41,0x44,0x20,0x40,0x94,0x03,0xff,0x90,0x96,0xf6,0xd5,0x02,0xff,0xbc,0x8e,
+ 0x2d,0x41,0x02,0x45,0x41,0x02,0x45,0x41,0x05,0x45,0x41,0x49,0xd1,0xf7,0x03,0xff,
+ 0xdb,0xda,0xb6,0xae,0xb1,0xe7,0x04,0xff,0xdf,0x95,0x6e,0x91,0xaa,0xbf,0x05,0xff,
+ 0xce,0x4e,0x41,0x02,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x02,0x45,
+ 0x49,0x02,0x45,0x04,0x49,0x65,0x69,0x6d,0x8a,0x02,0x8e,0x6d,0x69,0x49,0x40,0x52,
+ 0xf2,0xb1,0xb5,0xdc,0x03,0xff,0xfd,0x02,0xfe,0x02,0xfb,0xff,0x02,0xf7,0xfe,0x03,
+ 0xff,0xfe,0x02,0xff,0xfd,0xb3,0xd6,0xd3,0xb2,0xd6,0x02,0xb2,0xd6,0xb2,0xb6,0xba,
+ 0x02,0xb6,0xd6,0x02,0xb2,0xd6,0xb2,0x02,0xb6,0x02,0xb2,0xd6,0x95,0x46,0x45,0x41,
+ 0x02,0x45,0x02,0x41,0x45,0x02,0x21,0x25,0x02,0x21,0x44,0x05,0x21,0x25,0x02,0x21,
+ 0x24,0x02,0x21,0x25,0x20,0x21,0x25,0x21,0xda,0xd9,0x02,0xba,0xf6,0xb1,0xbe,0xfb,
+ 0xfe,0xde,0xdd,0xdf,0xff,0xbd,0xdf,0xde,0xdd,0xdf,0xdb,0xd4,0xdf,0xfb,0xf6,0xfd,
+ 0x9b,0xd1,0xbf,0xde,0xbe,0x89,0x02,0x69,0x49,0x02,0x6d,0x02,0x49,0x69,0x45,0x49,
+ 0x69,0x49,0x02,0x6d,0x02,0x49,0x69,0x6e,0x6d,0x8d,0x96,0xba,0xda,0xb6,0xde,0x7e,
+ 0x40,0x6d,0x71,0x4e,0x02,0x49,0x4a,0x69,0x6d,0x6a,0x8d,0xad,0xbb,0xfe,0xfb,0x02,
+ 0xff,0xde,0xa9,0x6a,0x48,0x29,0x49,0x48,0x02,0x25,0x02,0x45,0x25,0x44,0x21,0x45,
+ 0x44,0x21,0x45,0x44,0x20,0x9c,0xff,0xfc,0xbf,0xf6,0xdd,0x9a,0xf6,0xff,0xf7,0x94,
+ 0x92,0x6a,0x48,0x21,0x41,0x44,0x02,0x45,0x44,0x21,0x02,0x45,0x46,0xb5,0xf7,0x02,
+ 0xff,0xfe,0xda,0xd7,0xf6,0xff,0xf7,0x99,0x87,0xfd,0x05,0xff,0xf7,0x99,0x02,0x6e,
+ 0xca,0xdf,0x05,0xff,0xd9,0x4a,0x02,0x45,0x02,0x49,0x45,0x03,0x49,0x45,0x65,0x6a,
+ 0x6d,0x8d,0x8e,0x92,0xb2,0xb7,0xda,0xfa,0xdb,0x06,0xff,0xaf,0x4c,0x02,0x45,0xa5,
+ 0x96,0xb6,0xb5,0xba,0xfd,0xff,0xfe,0xff,0xfe,0xfb,0xff,0x03,0xfb,0xfa,0x05,0xff,
+ 0xfb,0xff,0xf3,0xd1,0xb7,0x02,0xd6,0xb3,0xd6,0xb6,0xb3,0xb6,0xd6,0xb2,0x02,0xb6,
+ 0xb2,0xb6,0xd2,0x02,0xb2,0xd2,0x02,0xb2,0xd2,0xb6,0x8a,0x48,0x21,0x02,0x45,0x21,
+ 0x45,0x24,0x21,0x41,0x24,0x02,0x21,0x20,0x21,0x41,0x20,0x21,0x41,0x24,0x02,0x21,
+ 0x24,0x02,0x21,0x20,0x02,0x21,0x20,0x02,0x21,0xbe,0x8e,0xb1,0x8e,0xde,0x9a,0xcb,
+ 0xfe,0x02,0xde,0xdf,0x02,0xfe,0x02,0xff,0xda,0x02,0xff,0xba,0xdf,0xff,0xb5,0xdf,
+ 0xff,0xb9,0xb6,0xd9,0xdb,0xae,0x91,0x92,0x6e,0x4d,0x45,0x02,0x4d,0x49,0x4d,0x49,
+ 0x45,0x03,0x49,0x03,0x6d,0x69,0x4c,0x6a,0x6e,0xb1,0xb2,0xba,0xbd,0xdb,0xcd,0x30,
+ 0x4a,0x71,0x4d,0x05,0x49,0x6d,0x69,0x6e,0xb1,0xae,0xde,0xff,0xfa,0x02,0xff,0xde,
+ 0xaa,0x2d,0x41,0x02,0x45,0x02,0x41,0x24,0x41,0x02,0x45,0x02,0x25,0x44,0x25,0x45,
+ 0x48,0x40,0x9f,0xff,0xfc,0x02,0xff,0xb8,0x9a,0xfd,0x02,0xff,0xfe,0xde,0x42,0x40,
+ 0x02,0x45,0x44,0x41,0x45,0x48,0x66,0x96,0xf9,0x03,0xff,0xdd,0xae,0xd5,0xfb,0xf6,
+ 0x96,0xcb,0xfa,0xfd,0x07,0xff,0xfb,0x9b,0x8e,0x6e,0xd1,0xf3,0x05,0xff,0xd9,0x86,
+ 0x8c,0x8e,0x92,0xd2,0xae,0xb6,0xf6,0xf3,0xfb,0xff,0xfb,0x0e,0xff,0xbc,0x6a,0x48,
+ 0x41,0x76,0xb1,0x8e,0xb1,0xfc,0x02,0xff,0xfe,0x03,0xff,0xfb,0x02,0xff,0xf7,0x05,
+ 0xff,0xfb,0x02,0xff,0xdc,0xb7,0xf7,0xb3,0xb6,0xda,0x02,0xb6,0xd6,0x02,0xb2,0xb6,
+ 0xb3,0xb2,0xb6,0xb2,0x02,0xb6,0xb2,0x02,0xb6,0xb2,0xb6,0xb7,0x6c,0x45,0x44,0x02,
+ 0x41,0x45,0x02,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x24,0x02,0x21,
+ 0x25,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x25,0x21,0xba,0x75,0x6d,0x99,0xbb,
+ 0x84,0xbc,0xff,0xfb,0xdb,0xf6,0x02,0xff,0x03,0xfe,0x02,0xff,0xfe,0xdf,0xb2,0xde,
+ 0xfa,0x02,0xff,0x9d,0x93,0xfa,0x99,0x92,0x8e,0x6d,0x02,0x49,0x69,0x02,0x49,0x69,
+ 0x49,0x02,0x45,0x02,0x49,0x69,0x4d,0x02,0x6d,0x69,0x6d,0x69,0x72,0xb6,0xf2,0x02,
+ 0xff,0x7d,0x41,0x03,0x6d,0x49,0x48,0x4a,0x49,0x48,0x02,0x49,0x02,0x69,0x02,0x8d,
+ 0x97,0xd6,0xb5,0xb2,0xfe,0xff,0xf9,0x4b,0x40,0x21,0x04,0x45,0x40,0x02,0x45,0x44,
+ 0x21,0x45,0x44,0x02,0x45,0xa0,0x02,0xff,0xfe,0xd0,0x99,0x75,0x6e,0xb9,0xba,0x91,
+ 0x4a,0x40,0x25,0x45,0x40,0x02,0x45,0x65,0x73,0xfe,0x03,0xff,0xde,0xb2,0x8e,0x6d,
+ 0x73,0xd6,0x79,0x41,0x68,0xe5,0x09,0xff,0xfe,0xb7,0x92,0x6e,0x92,0xee,0x05,0xff,
+ 0xfa,0xfb,0x00,0x18,0xff,0x93,0x68,0x45,0x4c,0x8a,0x92,0xd5,0xb1,0xbf,0xfe,0x03,
+ 0xff,0xfe,0x03,0xff,0xfb,0xff,0xfb,0x06,0xff,0xfe,0xbb,0xd2,0xb7,0x02,0xd6,0xb7,
+ 0x02,0xd6,0xb7,0x02,0xd6,0xb3,0xd6,0xb6,0xb3,0x02,0xb6,0xb7,0xb6,0xb2,0x02,0xb6,
+ 0xd2,0xb2,0x6a,0x44,0x03,0x45,0x41,0x45,0x24,0x02,0x21,0x40,0x02,0x21,0x20,0x25,
+ 0x21,0x20,0x02,0x21,0x24,0x02,0x21,0x20,0x21,0x41,0x24,0x02,0x21,0x20,0x02,0x21,
+ 0x91,0x8d,0x51,0x8f,0xad,0x50,0xcf,0xfe,0x9e,0xae,0xbe,0xfe,0x02,0xdf,0xdd,0xdf,
+ 0xff,0xfe,0xff,0xf2,0xd9,0xdb,0xd6,0xfd,0xfe,0xdf,0xfe,0xbc,0x9b,0xfa,0xba,0xb2,
+ 0x71,0x45,0x49,0x69,0x45,0x02,0x49,0x02,0x45,0x69,0x04,0x49,0x6d,0x8d,0x6d,0x91,
+ 0xd5,0xd7,0x02,0xfe,0xff,0xaa,0x2c,0x4a,0x02,0x6d,0x4d,0x07,0x49,0x4c,0x49,0x6d,
+ 0x4d,0x6a,0x89,0x6d,0x8a,0xdf,0xff,0xfe,0x82,0x44,0x25,0x02,0x45,0x41,0x02,0x45,
+ 0x02,0x41,0x25,0x21,0x25,0x02,0x24,0x40,0xd0,0x02,0xff,0x7d,0x8d,0x91,0x31,0x45,
+ 0x02,0x49,0x45,0x41,0x44,0x41,0x45,0x89,0x8a,0xde,0xfe,0x02,0xff,0xbf,0x91,0x72,
+ 0x91,0x02,0x6d,0x8d,0x8e,0x85,0x48,0x41,0x65,0xf0,0x0a,0xff,0xef,0x75,0x6a,0x6e,
+ 0xf1,0xf7,0x02,0xff,0x02,0xfb,0xfe,0x00,0x18,0xff,0xac,0x45,0x44,0x46,0x8d,0xb0,
+ 0x96,0xba,0xfd,0x09,0xff,0xf7,0x05,0xff,0xf7,0x02,0xff,0xc9,0xb6,0xd6,0xb3,0xb6,
+ 0xd6,0xb7,0x02,0xb6,0xb7,0xb6,0xd6,0xb7,0xb2,0xb6,0xb3,0x02,0xb6,0xaf,0xb2,0xb6,
+ 0xb3,0xd6,0x96,0x68,0x45,0x49,0x41,0x45,0x24,0x21,0x41,0x24,0x02,0x21,0x24,0x02,
+ 0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x24,0x20,0x21,0x24,0x02,0x21,
+ 0x24,0x25,0x72,0x6d,0x4a,0xd5,0x7d,0x46,0xd9,0xff,0xf9,0xba,0xb1,0x02,0xff,0xdd,
+ 0xdb,0xfe,0xde,0xdb,0xfe,0xde,0xd6,0xda,0xf5,0xff,0xbf,0xf7,0xfe,0xbf,0xf2,0xde,
+ 0xb7,0x71,0x6d,0x02,0x69,0x45,0x69,0x49,0x02,0x45,0x44,0x02,0x49,0x45,0x49,0x4d,
+ 0x03,0x6d,0x8d,0x96,0xda,0xf6,0xda,0xfe,0x9d,0x61,0x49,0x6d,0x02,0x49,0x04,0x45,
+ 0x25,0x02,0x45,0x04,0x49,0x69,0x4d,0x49,0x4d,0xaa,0xb6,0xfe,0xfb,0xf9,0x4b,0x40,
+ 0x03,0x49,0x21,0x45,0x40,0x45,0x25,0x24,0x25,0x29,0x28,0x29,0x70,0xb2,0xb1,0x6d,
+ 0x4c,0x41,0x04,0x45,0x40,0x41,0x69,0x85,0xbb,0xfe,0x03,0xff,0xba,0xae,0x8e,0x03,
+ 0x6d,0x69,0x02,0x6d,0x69,0x72,0x4a,0x40,0x4b,0xfd,0x0a,0xff,0xcd,0x8e,0x89,0x73,
+ 0xd6,0xf3,0x00,0x1b,0xff,0xfa,0x6f,0x44,0x45,0x8c,0x71,0x96,0xd5,0xd1,0xff,0xfe,
+ 0x0d,0xff,0x02,0xfe,0xff,0xf1,0xba,0xd7,0xb7,0x02,0xd6,0xb7,0xd6,0xd2,0xb6,0xd6,
+ 0xd2,0xb7,0xb6,0xd2,0x02,0xb6,0xb2,0x02,0xb6,0x02,0xb2,0x02,0xb6,0xad,0x2a,0x41,
+ 0x03,0x45,0x02,0x25,0x20,0x02,0x21,0x20,0x02,0x21,0x20,0x02,0x21,0x20,0x02,0x21,
+ 0x20,0x02,0x21,0x20,0x25,0x21,0x20,0x02,0x21,0x20,0x21,0x41,0x75,0x6e,0x91,0xb7,
+ 0xcd,0x30,0xaf,0xfe,0xbe,0xb6,0x04,0xde,0xfd,0xff,0xfb,0xf9,0xfb,0xfe,0x9d,0xba,
+ 0xdf,0x02,0xff,0xfe,0xdd,0xda,0xde,0x9a,0x02,0x8e,0x6d,0x02,0x49,0x69,0x03,0x49,
+ 0x45,0x03,0x49,0x45,0x48,0x49,0x02,0x6d,0x69,0x95,0xb5,0xb3,0xda,0xde,0xff,0xf6,
+ 0x59,0x45,0x02,0x49,0x02,0x45,0x49,0x02,0x45,0x48,0x45,0x04,0x49,0x48,0x03,0x49,
+ 0x41,0x6d,0x8d,0x8a,0xb6,0xfa,0xda,0xaa,0x2c,0x21,0x45,0x49,0x02,0x41,0x44,0x21,
+ 0x25,0x45,0x21,0x25,0x29,0x25,0x02,0x49,0x41,0x45,0x44,0x21,0x45,0x49,0x02,0x45,
+ 0x68,0x8b,0xfe,0x04,0xff,0xfe,0xb7,0x96,0x03,0x6d,0x6a,0x95,0x92,0x6d,0x6a,0xad,
+ 0x6d,0x45,0x44,0x66,0xfe,0x0a,0xff,0xb5,0x6e,0xad,0x8e,0xb6,0xf6,0xfb,0x02,0xff,
+ 0xfb,0x00,0x16,0xff,0xbf,0x8c,0x45,0x64,0x6e,0x91,0xd1,0xb6,0xde,0xfc,0x02,0xff,
+ 0xfe,0x0c,0xff,0xfb,0xff,0xbf,0xaf,0xd2,0xd6,0x02,0xb7,0xd6,0xb7,0xb6,0xd6,0xb3,
+ 0x02,0xd6,0xb7,0xb6,0xd6,0xb3,0xb2,0xb6,0xb3,0xd2,0xb6,0xb7,0xb2,0x72,0x44,0x04,
+ 0x45,0x24,0x02,0x21,0x44,0x02,0x21,0x25,0x21,0x41,0x25,0x02,0x21,0x24,0x21,0x41,
+ 0x24,0x02,0x21,0x24,0x21,0x41,0x24,0x02,0x21,0x24,0x21,0xb2,0x50,0x73,0xd6,0x99,
+ 0x61,0xb8,0xff,0xfe,0x9b,0xb2,0xbe,0xde,0xbd,0xbf,0xfe,0xd9,0xda,0xde,0xda,0xdf,
+ 0xbf,0xf3,0xff,0xfd,0xff,0xf6,0xbd,0xbe,0x92,0x91,0x8d,0x91,0x4d,0x65,0x72,0x4e,
+ 0x44,0x25,0x49,0x48,0x25,0x49,0x45,0x02,0x49,0x69,0x6d,0x71,0x8d,0x96,0xd9,0xdb,
+ 0xd6,0xfd,0xdf,0xa5,0x4d,0x69,0x49,0x45,0x41,0x03,0x45,0x25,0x04,0x49,0x02,0x45,
+ 0x49,0x02,0x45,0x02,0x49,0x4a,0x8d,0xae,0xb7,0xfe,0xff,0xe8,0x01,0x09,0x41,0x49,
+ 0x45,0x44,0x25,0x06,0x45,0x03,0x49,0x6d,0x89,0x8e,0x03,0xb2,0xd6,0xf6,0xff,0xfe,
+ 0x06,0xff,0xfe,0xd2,0x72,0x03,0x6d,0xaa,0xb6,0xb2,0x6d,0x6e,0x8d,0x6d,0x65,0x49,
+ 0xa1,0xdf,0x0a,0xff,0xb9,0x8f,0xb2,0xae,0x92,0xfa,0xf7,0xfb,0xff,0xfb,0x00,0x15,
+ 0xff,0xf1,0x4e,0x45,0x4e,0xad,0x8d,0x96,0xd9,0xf1,0xff,0x02,0xfe,0x02,0xff,0xfe,
+ 0x02,0xff,0xfb,0x06,0xff,0xf7,0xfe,0xff,0xef,0x02,0xd6,0xb7,0x02,0xd6,0xb7,0xd6,
+ 0xd2,0xb2,0xd6,0xb6,0xb2,0xd6,0xb2,0xb6,0xd6,0xd2,0xb2,0xd6,0xd2,0xb6,0xda,0xb6,
+ 0x85,0x29,0x04,0x45,0x41,0x25,0x45,0x21,0x25,0x02,0x21,0x25,0x24,0x21,0x41,0x20,
+ 0x02,0x21,0x20,0x21,0x25,0x20,0x02,0x21,0x20,0x02,0x21,0x20,0x02,0x21,0x96,0x8a,
+ 0x8c,0xbb,0xce,0x50,0x8f,0xfe,0xff,0xdd,0xbe,0xfe,0xde,0xba,0xf9,0x02,0xff,0x9e,
+ 0x8e,0xbe,0xfa,0xd7,0xfe,0xdd,0x02,0xff,0xbd,0xba,0xb6,0x02,0x91,0x76,0xb6,0x91,
+ 0x4d,0x6d,0x49,0x45,0x48,0x45,0x49,0x29,0x21,0x03,0x49,0x69,0x6d,0x49,0x95,0xb6,
+ 0x92,0x02,0xde,0xb2,0xfe,0x7e,0x64,0x02,0x49,0x4a,0x45,0x44,0x02,0x45,0x48,0x4a,
+ 0x6d,0x4d,0x41,0x04,0x45,0x03,0x49,0x4d,0x49,0x69,0x89,0x8f,0xd6,0xfa,0xb4,0x22,
+ 0x44,0x46,0x02,0x69,0x6a,0x8d,0xad,0x93,0xd6,0xf6,0xd7,0x00,0x13,0xff,0xbf,0x91,
+ 0x72,0x8d,0x02,0x6d,0xad,0xb7,0xae,0x71,0x6e,0x71,0x91,0x71,0x41,0xa0,0xd3,0x04,
+ 0xff,0xfe,0x04,0xff,0xfb,0xbf,0x8a,0x8e,0xad,0xaf,0xfa,0xfb,0x00,0x17,0xff,0xbf,
+ 0x60,0x45,0xa4,0x96,0xb2,0xd0,0xb9,0x03,0xfe,0xff,0xfe,0x0b,0xff,0xfd,0xff,0xf7,
+ 0xbd,0xb3,0x02,0xd6,0xb7,0xba,0xda,0xb3,0xd2,0xd6,0x02,0xb6,0xd6,0xb7,0x02,0xd6,
+ 0xb3,0xd6,0xb6,0xb3,0xd6,0xb6,0xb7,0xb2,0x51,0x02,0x41,0x44,0x03,0x45,0x21,0x41,
+ 0x24,0x21,0x41,0x24,0x02,0x21,0x24,0x02,0x21,0x25,0x02,0x21,0x24,0x02,0x21,0x24,
+ 0x02,0x21,0x24,0x02,0x21,0x24,0x25,0x9a,0x91,0x92,0xd9,0xbe,0x89,0xb8,0xff,0xfe,
+ 0x04,0xde,0x02,0xdf,0xde,0xb5,0x02,0xde,0xb5,0xb7,0xfd,0xbd,0xb7,0xfd,0xde,0xdb,
+ 0xfe,0xb9,0x02,0x91,0x8d,0xbf,0x97,0x48,0x4e,0x8e,0x44,0x04,0x45,0x49,0x45,0x04,
+ 0x49,0x02,0x6d,0x92,0xb5,0xb1,0xde,0xfe,0xff,0xf1,0x32,0x45,0x02,0x49,0x04,0x45,
+ 0x49,0x69,0x03,0x49,0x44,0x04,0x45,0x49,0x45,0x49,0x03,0x69,0x6d,0x8a,0x97,0xfa,
+ 0xbd,0xae,0xf6,0xf7,0x00,0x1c,0xff,0xbb,0x8d,0x72,0x02,0x6d,0x6e,0xb1,0xb7,0xb2,
+ 0x72,0x8a,0x02,0x92,0x4c,0x49,0x8c,0xeb,0x02,0xff,0xfe,0xfb,0xff,0xfb,0x04,0xff,
+ 0xb7,0xa9,0x92,0xb6,0xd2,0xdb,0xff,0xfb,0x00,0x15,0xff,0xc5,0x49,0x40,0x76,0xd6,
+ 0x8d,0xba,0xfc,0xfe,0x02,0xff,0xfd,0x0b,0xff,0xfe,0x02,0xff,0xfd,0xcf,0xf6,0xd7,
+ 0x02,0xd6,0xd7,0xb6,0xd6,0xd2,0xb6,0x02,0xd6,0x04,0xb6,0xd6,0xb6,0xb7,0xd6,0xb2,
+ 0xb6,0xda,0x95,0x61,0x02,0x45,0x41,0x02,0x45,0x21,0x02,0x45,0x21,0x25,0x02,0x21,
+ 0x25,0x02,0x21,0x25,0x02,0x21,0x25,0x20,0x21,0x25,0x02,0x21,0x24,0x02,0x21,0x25,
+ 0x03,0x21,0xb6,0x02,0xde,0x02,0xba,0xb9,0xbb,0xde,0x02,0xbe,0xba,0xd9,0xbe,0xba,
+ 0xf5,0xde,0xdf,0xfe,0xb9,0xba,0xd9,0xdf,0xf7,0xd4,0xdf,0x03,0xfe,0xde,0x9a,0x69,
+ 0x95,0xb6,0x91,0x49,0x02,0x69,0x65,0x48,0x05,0x49,0x69,0x04,0x49,0x02,0x6d,0x6e,
+ 0xbe,0xfb,0xfe,0xff,0xbf,0x60,0x03,0x49,0x45,0x49,0x45,0x49,0x69,0x02,0x49,0x48,
+ 0x02,0x45,0x44,0x02,0x45,0x49,0x02,0x45,0x49,0x4a,0x6d,0x4d,0x45,0x69,0xa9,0xb3,
+ 0xfe,0x00,0x20,0xff,0xd3,0x91,0x02,0x6e,0x8d,0x6e,0x91,0xf2,0xb5,0x6e,0x6d,0x6f,
+ 0x8e,0x6d,0x49,0x6d,0xe9,0x03,0xff,0xf7,0x05,0xff,0xfe,0xfb,0xdb,0xb7,0xd7,0xf6,
+ 0xd7,0x00,0x15,0xff,0xfb,0x5d,0x41,0x49,0xca,0xb1,0xb2,0xed,0xde,0xfd,0xff,0xfe,
+ 0xff,0xfe,0x0a,0xff,0xf7,0xfa,0xff,0xf3,0xd5,0xb7,0x02,0xd6,0xb6,0x02,0xd6,0xb7,
+ 0x02,0xd6,0xb3,0x02,0xd6,0xb7,0xd7,0xd6,0xb7,0x02,0xd6,0xb7,0xd7,0xd6,0xb7,0xae,
+ 0x4c,0x41,0x02,0x45,0x21,0x41,0x44,0x21,0x41,0x24,0x25,0x41,0x24,0x21,0x41,0x24,
+ 0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x20,0x02,0x21,0x25,0x02,0x21,0x24,0x21,
+ 0xba,0xb1,0xbe,0xde,0xba,0x02,0xde,0xda,0xdf,0xde,0xba,0xdf,0xde,0xd7,0xfa,0xbd,
+ 0xbe,0x02,0xdf,0x90,0xbf,0xde,0xbd,0xba,0xd9,0xf3,0xfe,0x02,0xff,0xf2,0x75,0x92,
+ 0x96,0x92,0x69,0x02,0x6d,0x65,0x49,0x69,0x48,0x49,0x69,0x49,0x45,0x68,0x6d,0x69,
+ 0x6d,0x69,0x72,0xb5,0xd3,0x02,0xff,0x02,0xfa,0x32,0x40,0x03,0x45,0x25,0x04,0x49,
+ 0x02,0x45,0x49,0x02,0x45,0x49,0x45,0x03,0x49,0x45,0x03,0x49,0x69,0x02,0x49,0x8d,
+ 0xaf,0xdb,0xfe,0x00,0x1f,0xff,0xf2,0x92,0x8a,0x6e,0x8d,0x8e,0x72,0xf5,0xb6,0x8d,
+ 0x6d,0x6a,0x76,0x6e,0x40,0x4e,0xcd,0xef,0xfe,0xff,0xf7,0x05,0xff,0xfb,0x02,0xff,
+ 0xfb,0x02,0xff,0xfb,0x02,0xff,0xfb,0x02,0xff,0xfb,0x02,0xff,0xfe,0xd7,0xf7,0xef,
+ 0xfb,0x07,0xff,0xfd,0x82,0x49,0x62,0x9a,0xd6,0xad,0xd9,0xfc,0x02,0xff,0x02,0xfe,
+ 0x0b,0xff,0xfa,0x02,0xff,0xfc,0xb7,0xfa,0xda,0xb6,0xda,0xd7,0xb6,0xd6,0xd2,0xb6,
+ 0xd6,0xd3,0xb6,0xd6,0xb2,0x02,0xb6,0xb3,0xb6,0xba,0xb6,0xbb,0xb7,0x71,0x45,0x49,
+ 0x41,0x45,0x25,0x02,0x21,0x25,0x24,0x02,0x25,0x20,0x21,0x24,0x20,0x21,0x25,0x20,
+ 0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,0xb5,0x76,
+ 0xf2,0xd9,0xbe,0xfa,0xda,0xb6,0xb4,0xbf,0xde,0xbd,0xb6,0xde,0x02,0xba,0xbe,0xff,
+ 0xd4,0x79,0xf6,0x02,0xde,0xbd,0x96,0xbd,0xfb,0x03,0xff,0xd5,0x03,0x96,0x6e,0x6d,
+ 0x49,0x91,0x96,0x69,0x45,0x65,0x03,0x49,0x45,0x49,0x69,0x49,0x6d,0x8d,0x92,0xda,
+ 0xfa,0xde,0xdf,0xde,0x8c,0x25,0x04,0x45,0x25,0x49,0x69,0x03,0x49,0x02,0x45,0x44,
+ 0x25,0x45,0x49,0x4a,0x49,0x48,0x02,0x45,0x48,0x03,0x49,0x4a,0x8d,0xee,0x00,0x21,
+ 0xff,0xfe,0x93,0x8d,0x72,0x8e,0x8d,0x92,0xda,0xba,0x89,0x49,0x89,0x6e,0x46,0x65,
+ 0x4d,0x75,0xf3,0xff,0xfb,0xf6,0xfb,0xf7,0xf6,0x02,0xfb,0xff,0x02,0xf7,0xdb,0xb7,
+ 0xd7,0x02,0xb6,0x02,0xb2,0x8a,0xae,0xb1,0x92,0x8e,0x8d,0x6a,0x8a,0xa9,0xd7,0x06,
+ 0xff,0xef,0x6c,0x45,0x91,0xd2,0xb5,0xb9,0xd5,0xff,0x03,0xfe,0x0c,0xff,0xdf,0xfb,
+ 0xfe,0xbb,0xd6,0xb7,0x02,0xd6,0xb7,0x02,0xd6,0xb7,0x02,0xd6,0xb7,0x02,0xd6,0x02,
+ 0xb6,0xd6,0xb2,0xb6,0xd6,0xb6,0x02,0xd6,0xba,0x67,0x44,0x41,0x45,0x44,0x45,0x25,
+ 0x44,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x20,0x02,0x21,0x24,0x02,0x21,0x24,
+ 0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x24,0x21,0x56,0x89,0xbe,0xba,0x91,0x9e,
+ 0xda,0x99,0x72,0xf9,0xdf,0xd6,0xdd,0xbe,0xbb,0xda,0xb5,0xde,0xbe,0x02,0xba,0xfd,
+ 0xff,0xfa,0x9d,0xb7,0x02,0xfe,0x02,0xff,0xde,0xb6,0x02,0xdf,0x6c,0x4e,0x91,0xb7,
+ 0xa9,0x6c,0x4d,0x49,0x69,0x05,0x49,0x4c,0x6e,0x72,0x91,0x92,0xbe,0xfe,0xda,0xfe,
+ 0x57,0x40,0x29,0x49,0x41,0x45,0x48,0x04,0x49,0x69,0x49,0x02,0x41,0x03,0x45,0x48,
+ 0x4a,0x69,0x49,0x41,0x05,0x49,0x6a,0x92,0xf5,0xfb,0x00,0x20,0xff,0xfd,0xae,0x91,
+ 0x8e,0x72,0x8d,0x8a,0x96,0xb6,0x91,0x45,0x69,0x6a,0x6e,0x4d,0x45,0x56,0xf6,0xb1,
+ 0x02,0xb2,0xaa,0x8a,0xb1,0x92,0x06,0x8e,0x8a,0x8d,0x6e,0x6a,0x6d,0x02,0x6a,0x8d,
+ 0x6a,0x02,0x8e,0x69,0x65,0xd0,0xfb,0x05,0xff,0xb4,0x6a,0x8d,0x8a,0xb6,0xd9,0xb5,
+ 0xfe,0xfd,0x02,0xff,0xfd,0x02,0xff,0xfe,0x09,0xff,0xf3,0x02,0xff,0xd0,0xba,0x02,
+ 0xd6,0xb6,0xd6,0x02,0xb6,0xda,0x02,0xb6,0xba,0xb7,0xb6,0xba,0xb7,0xb2,0xd6,0xb2,
+ 0x02,0xb6,0xb2,0xba,0xb7,0x68,0x02,0x45,0x02,0x41,0x45,0x02,0x21,0x25,0x02,0x21,
+ 0x25,0x02,0x21,0x25,0x02,0x21,0x02,0x25,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x24,
+ 0x25,0x02,0x21,0x20,0x21,0x25,0x69,0x91,0x8d,0xbf,0x8f,0x6c,0x97,0xd2,0x50,0x77,
+ 0xfe,0x02,0xde,0x9a,0x02,0xb6,0xba,0xb9,0xbf,0xfe,0xdd,0xde,0xfe,0xde,0xb6,0xfe,
+ 0xdf,0xd2,0x02,0xfe,0x02,0xde,0xda,0xb1,0x4d,0x6d,0x77,0xb2,0x71,0x72,0x91,0x6d,
+ 0x69,0x02,0x6d,0x02,0x49,0x48,0x45,0x69,0x89,0x92,0x95,0xd2,0xbe,0x02,0xde,0xb1,
+ 0x26,0x40,0x25,0x45,0x44,0x25,0x05,0x49,0x03,0x45,0x21,0x45,0x49,0x45,0x69,0x4d,
+ 0x04,0x45,0x04,0x49,0x02,0x69,0xd5,0xf7,0xfb,0x00,0x20,0xff,0xae,0x6e,0x8d,0x6e,
+ 0x6d,0x8d,0x73,0xae,0x51,0x4a,0x6d,0x92,0x03,0x69,0x6e,0x8e,0x8d,0x02,0x6d,0x8e,
+ 0x02,0x6a,0x8e,0x02,0x6e,0x8d,0x6e,0x8e,0x8d,0x6e,0x8e,0xae,0x8e,0x92,0xb2,0x02,
+ 0x92,0xb2,0x93,0x8b,0x68,0x66,0xfd,0x04,0xff,0xfe,0x6f,0x89,0x72,0xb2,0xad,0xb6,
+ 0x02,0xfd,0x02,0xff,0xfe,0xff,0xfe,0x0a,0xff,0xfb,0x02,0xff,0xf9,0xbb,0xf2,0xb7,
+ 0x02,0xd6,0xb7,0x02,0xd6,0xb7,0x02,0xd6,0xb6,0x02,0xd6,0xb7,0x02,0xd6,0xb3,0x02,
+ 0xd6,0x02,0xb6,0xd7,0xac,0x02,0x49,0x02,0x45,0x44,0x25,0x41,0x40,0x25,0x21,0x20,
+ 0x02,0x21,0x20,0x02,0x21,0x20,0x02,0x21,0x24,0x02,0x21,0x20,0x02,0x21,0x20,0x02,
+ 0x21,0x24,0x02,0x21,0x20,0x21,0x74,0x76,0x9a,0xb6,0x70,0x56,0xd6,0x99,0x46,0xac,
+ 0x02,0xba,0xb9,0xdb,0xfe,0x9d,0xdf,0xfe,0xdd,0x03,0xff,0xb9,0xde,0xfe,0x02,0xff,
+ 0xde,0xd6,0x02,0xff,0xdf,0xf6,0x75,0x6d,0x76,0x92,0x91,0x72,0x91,0x03,0x6d,0x6a,
+ 0x69,0x6d,0x49,0x45,0x48,0x45,0x4d,0xad,0x91,0x96,0xd6,0xba,0xdf,0xbf,0x44,0x25,
+ 0x45,0x41,0x45,0x49,0x25,0x05,0x49,0x03,0x45,0x41,0x45,0x04,0x49,0x41,0x45,0x49,
+ 0x45,0x04,0x49,0x89,0x8e,0xb6,0xfa,0xfb,0xff,0xfe,0x00,0x1b,0xff,0xfb,0x02,0xff,
+ 0xb5,0x02,0x72,0x6a,0x4d,0x8d,0x93,0x85,0x48,0x67,0x8e,0x8d,0x02,0x69,0x8d,0x02,
+ 0x6e,0x6d,0x02,0x6e,0x8d,0x8a,0x8e,0xb2,0xae,0xb2,0xb6,0xae,0xb2,0xb6,0x02,0xb2,
+ 0xb6,0xb3,0xb7,0xb6,0xb3,0xb2,0xb6,0x96,0x66,0x49,0x83,0x04,0xff,0xdf,0x88,0x4e,
+ 0xd1,0x95,0x96,0xd8,0xde,0xff,0x02,0xfe,0xff,0xfd,0x02,0xff,0xfe,0x09,0xff,0xf7,
+ 0xff,0xdf,0xce,0x02,0xda,0xd3,0xd7,0xda,0xb7,0xb6,0xd6,0xb7,0x02,0xd6,0x02,0xb6,
+ 0xd6,0xb3,0xd2,0xd6,0x02,0xb7,0xda,0xd7,0xd6,0x76,0x44,0x45,0x49,0x03,0x45,0x21,
+ 0x41,0x44,0x21,0x41,0x24,0x02,0x21,0x25,0x21,0x02,0x25,0x02,0x21,0x25,0x02,0x21,
+ 0x24,0x02,0x21,0x25,0x20,0x21,0x24,0x20,0x21,0x24,0x72,0x91,0xb2,0xba,0x4e,0xa5,
+ 0xbe,0x6f,0x68,0x72,0xb9,0x9e,0x92,0xb5,0x95,0xbf,0xfa,0x94,0xbf,0xfe,0xfd,0xff,
+ 0xbb,0xb1,0xbb,0x02,0xfe,0xd9,0xbe,0xda,0xba,0xfe,0xbe,0xad,0x95,0xd6,0xb5,0x92,
+ 0x8d,0x6e,0x6d,0x69,0x49,0x02,0x69,0x05,0x49,0x48,0x4e,0x8d,0xad,0xb6,0x96,0xf3,
+ 0xf8,0x01,0x0a,0x40,0x25,0x45,0x24,0x21,0x45,0x24,0x25,0x02,0x49,0x02,0x45,0x44,
+ 0x21,0x02,0x45,0x02,0x49,0x44,0x45,0x02,0x49,0x45,0x69,0x6d,0x72,0x8e,0x8d,0x03,
+ 0x92,0x8e,0xb9,0xfb,0xff,0xfe,0x00,0x18,0xff,0xfe,0xfb,0xff,0xfb,0xff,0xfb,0xb9,
+ 0x92,0x8e,0x6d,0x6e,0x6d,0x4d,0x41,0x69,0xaa,0x02,0x8e,0xae,0x02,0x92,0xae,0x96,
+ 0x02,0xb2,0x92,0xb2,0xd2,0x02,0xb2,0xce,0xb6,0x08,0xb2,0xb3,0xb6,0x02,0xb2,0xd6,
+ 0x75,0x65,0x49,0xe7,0x03,0xff,0xec,0x4a,0x81,0x96,0xb6,0x91,0x96,0xfd,0xfe,0x02,
+ 0xff,0xfc,0x02,0xff,0xfe,0x0c,0xff,0xf1,0xba,0xd7,0xb7,0x02,0xd7,0xb7,0x02,0xd6,
+ 0xb6,0x02,0xd6,0xb7,0x02,0xd6,0xb6,0x02,0xd6,0xb6,0x02,0xd6,0xb6,0xda,0xbe,0x89,
+ 0x49,0x44,0x02,0x45,0x40,0x41,0x45,0x44,0x02,0x21,0x40,0x02,0x21,0x40,0x02,0x21,
+ 0x20,0x02,0x21,0x24,0x02,0x21,0x20,0x02,0x21,0x20,0x02,0x21,0x24,0x02,0x21,0x20,
+ 0x21,0x55,0x66,0xde,0xbf,0x68,0x52,0xae,0x70,0x49,0x6c,0x97,0xda,0x99,0x92,0x9a,
+ 0xd9,0xb9,0xba,0xf9,0x02,0xff,0xfe,0xdd,0xba,0x99,0xb7,0xfe,0xbe,0xb6,0xd6,0xb5,
+ 0xdb,0xf6,0x79,0xb3,0xfe,0x7e,0x02,0x8e,0x6d,0x69,0x4d,0x6d,0x45,0x49,0x48,0x4d,
+ 0x06,0x49,0x71,0xb1,0xb7,0xff,0xbf,0x44,0x25,0x02,0x45,0x41,0x44,0x45,0x21,0x44,
+ 0x04,0x45,0x06,0x49,0x02,0x6d,0x65,0x96,0xf6,0xfe,0xd7,0xb9,0x96,0x92,0xb5,0xbf,
+ 0xb2,0x55,0x8f,0xbe,0x00,0x1b,0xff,0xfe,0xd7,0xfb,0xfe,0xff,0xfb,0xda,0xae,0x8e,
+ 0x92,0x69,0x02,0x45,0x42,0x8d,0x8e,0x8f,0xb2,0xb6,0xaf,0xb2,0xb6,0xb3,0xb2,0xb6,
+ 0xb3,0xb2,0xb6,0xaf,0x02,0xb6,0xb3,0xb2,0xd6,0xb3,0xb2,0xd6,0xb3,0xb2,0xd6,0xb3,
+ 0xb6,0xd6,0xb3,0xb2,0x55,0x45,0x52,0xf6,0x02,0xff,0xbf,0x60,0x56,0xb2,0x91,0x96,
+ 0xb5,0xdf,0x02,0xfe,0xfd,0xff,0xfe,0x02,0xff,0xfe,0x0b,0xff,0xbe,0x02,0xd7,0xd6,
+ 0xb7,0xd7,0xda,0xb3,0x02,0xd6,0xb6,0x02,0xd6,0x02,0xb6,0xd6,0xb3,0x02,0xd6,0xb7,
+ 0xd7,0xba,0xb7,0xce,0x51,0x03,0x45,0x41,0x02,0x45,0x21,0x02,0x25,0x21,0x41,0x24,
+ 0x02,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x24,0x02,0x21,0x25,0x02,0x21,0x25,0x02,
+ 0x21,0x25,0x02,0x21,0x24,0x89,0xb9,0xdb,0xd1,0x2a,0x81,0x9e,0x6f,0x44,0x49,0xb4,
+ 0xbf,0x8e,0xb5,0x95,0x96,0x95,0x02,0xb6,0xfd,0xff,0x02,0xfe,0xbd,0xba,0xdd,0xff,
+ 0xf9,0x99,0xb2,0xba,0xda,0xb5,0xbe,0xde,0xbe,0xad,0x71,0x92,0x69,0x03,0x6d,0x49,
+ 0x45,0x4d,0x49,0x48,0x03,0x49,0x45,0x49,0x65,0x9f,0xfa,0xba,0xb2,0x4e,0x65,0x4a,
+ 0x02,0x69,0x4a,0x6a,0x69,0x77,0xb2,0x71,0x6e,0x71,0x6d,0x6e,0xb1,0x91,0x6e,0x02,
+ 0xd2,0xdf,0xfe,0xfa,0xfe,0xde,0xd6,0xb6,0x92,0x8d,0x9b,0xb6,0x96,0x6a,0x91,0xb2,
+ 0xb7,0xda,0xd6,0x00,0x17,0xff,0xfe,0xf7,0xfa,0xf2,0xd7,0xfe,0xfb,0xfe,0xb7,0xb2,
+ 0x8e,0x4a,0x44,0x02,0x49,0x82,0x02,0x8e,0xaf,0xb2,0xb6,0x03,0xb2,0xd2,0xb2,0xb6,
+ 0xd7,0xb3,0xd6,0xb6,0xb3,0xd6,0xd2,0xb3,0xd7,0xd2,0xb3,0xd7,0xd2,0xb2,0xd6,0xd7,
+ 0xb3,0x02,0xd7,0xa9,0x4a,0x61,0x6f,0xfd,0xff,0xe5,0x29,0x82,0x02,0x92,0x8d,0x9a,
+ 0xfc,0x03,0xff,0xfd,0x02,0xff,0xfe,0x0c,0xff,0xcf,0xf6,0xd6,0xdb,0xda,0xd6,0xb7,
+ 0xda,0xd6,0xb7,0xda,0xd6,0xb7,0xd7,0xd2,0xb3,0x02,0xd6,0xb7,0xd7,0xd6,0xb7,0xfa,
+ 0x99,0x65,0x49,0x04,0x45,0x03,0x41,0x21,0x02,0x45,0x05,0x21,0x20,0x02,0x21,0x20,
+ 0x02,0x21,0x20,0x02,0x21,0x20,0x21,0x25,0x24,0x02,0x21,0x20,0x21,0x99,0xb7,0xda,
+ 0x9a,0x40,0x55,0xb6,0x6d,0x49,0x6d,0x8f,0xb2,0x95,0x96,0xbe,0xba,0x91,0x02,0x95,
+ 0xb7,0x02,0xfe,0xdd,0xbe,0xdd,0xdf,0xfe,0x9d,0x96,0xba,0xd9,0xb9,0xba,0xd9,0xdf,
+ 0xb2,0x90,0x02,0x92,0x71,0x6a,0x02,0x91,0x03,0x6d,0x02,0x49,0x69,0x03,0x49,0x02,
+ 0x45,0x68,0x6e,0x92,0x91,0x6d,0x69,0x6d,0x69,0x76,0xb6,0x92,0xba,0x9a,0x91,0x92,
+ 0x91,0x6d,0x8e,0xad,0x92,0x8e,0xad,0x92,0x96,0xd5,0xbe,0x96,0xf6,0xb9,0x92,0x91,
+ 0x92,0x8e,0x8d,0x6e,0x6a,0x02,0x6d,0x02,0x69,0x66,0xde,0xff,0xf3,0x00,0x16,0xff,
+ 0xfe,0xfb,0xd7,0xf6,0xd7,0xff,0xfb,0xfe,0xd3,0x71,0x45,0x25,0x65,0x45,0x49,0xaa,
+ 0x8e,0xb6,0xd7,0xaf,0xb2,0xd6,0xb3,0xd2,0xd6,0xb3,0xd3,0xd6,0x02,0xb3,0xd6,0xb3,
+ 0xd7,0xd6,0xb3,0xd7,0xd6,0xb3,0xd7,0xd6,0xb7,0xd7,0xd6,0xb7,0xd7,0xbb,0x85,0x65,
+ 0x88,0xd7,0xff,0x3e,0x41,0x6d,0x92,0x6d,0x71,0xb1,0xbb,0xfe,0xff,0xfe,0xff,0x02,
+ 0xfe,0xff,0xfe,0x08,0xff,0xfe,0xff,0xf3,0xf5,0x02,0xd7,0xda,0xb7,0xd6,0xda,0xb7,
+ 0xd7,0xd6,0xb7,0xd7,0xd6,0xb7,0x02,0xd6,0xb3,0xd7,0xd6,0xb7,0xd7,0xfa,0xba,0xae,
+ 0x4d,0x41,0x04,0x45,0x44,0x21,0x41,0x45,0x21,0x41,0x45,0x02,0x21,0x24,0x21,0x41,
+ 0x24,0x21,0x02,0x25,0x02,0x21,0x24,0x02,0x21,0x25,0x02,0x21,0x24,0x02,0x21,0x24,
+ 0xb6,0x99,0xb7,0xad,0x2d,0x86,0x95,0x75,0x71,0x6a,0xd1,0x79,0x77,0xfa,0x9d,0x92,
+ 0x95,0x71,0x9a,0xb9,0xda,0xfe,0xbe,0xb5,0xbf,0xfe,0xde,0xd6,0xb9,0xb5,0x02,0xba,
+ 0xb1,0xbe,0xde,0xb9,0x92,0xb5,0xb6,0x8e,0x91,0x75,0x6e,0x91,0x92,0x85,0x49,0x45,
+ 0x4e,0x4d,0x05,0x49,0x8d,0x71,0x6e,0x8d,0x03,0x6d,0x8e,0x92,0x71,0x91,0x69,0x90,
+ 0x76,0x69,0x6d,0x89,0x8d,0x6d,0x8a,0x8d,0x95,0xb6,0x96,0xb2,0x8d,0x9a,0x96,0x8d,
+ 0x96,0x72,0x6d,0x72,0x91,0x6d,0x6e,0x6d,0x48,0x45,0x69,0x02,0x8a,0xf9,0x00,0x15,
+ 0xff,0xfe,0x02,0xff,0xda,0xdb,0xfa,0xf2,0xdf,0xfe,0xff,0x81,0x24,0x41,0x02,0x45,
+ 0x41,0x4f,0xae,0xaa,0xb7,0xd7,0xd3,0xb3,0xd7,0xd3,0xb7,0xd7,0xd3,0xb7,0xd7,0xd3,
+ 0xb3,0xd7,0xd6,0xb7,0xd7,0xd3,0x02,0xd7,0xd2,0xb7,0x05,0xd7,0xb7,0xb3,0x6c,0x4e,
+ 0x91,0xb7,0xa1,0x4c,0x8e,0x69,0x6d,0x69,0x96,0xdd,0xfb,0x02,0xff,0xfe,0xff,0xfe,
+ 0x0c,0xff,0xdd,0xb7,0xf7,0xd2,0xd7,0xda,0xd7,0x04,0xd6,0xda,0xd6,0xb7,0x04,0xd6,
+ 0xd2,0xd6,0xda,0xd6,0xdb,0xd7,0x91,0x61,0x05,0x45,0x21,0x45,0x20,0x21,0x45,0x20,
+ 0x21,0x25,0x02,0x21,0x25,0x20,0x21,0x02,0x25,0x04,0x21,0x25,0x20,0x21,0x25,0x02,
+ 0x21,0x25,0x20,0x21,0x91,0x93,0xda,0x7e,0x65,0x9d,0xbf,0x8d,0x71,0x91,0x9f,0x92,
+ 0xb1,0x96,0xb6,0x95,0x02,0x92,0x91,0x02,0x9a,0xd5,0x02,0xbe,0xfa,0xde,0xfe,0xdf,
+ 0xb1,0xb6,0xd6,0xba,0xb6,0xb5,0xbb,0xb6,0xb5,0xb6,0xba,0x9a,0x8d,0x72,0x71,0x72,
+ 0x92,0x71,0x03,0x69,0x02,0x49,0x69,0x03,0x6d,0x4d,0x02,0x71,0x03,0x6d,0x49,0x95,
+ 0x96,0x69,0x02,0x6d,0x4a,0x71,0x51,0x4a,0x02,0x91,0x6d,0x71,0x91,0x92,0x96,0xb5,
+ 0x95,0x6a,0x69,0x6e,0x92,0x95,0x8e,0x91,0x55,0x4a,0x8d,0x71,0x03,0x49,0x45,0x02,
+ 0x69,0x6a,0xfd,0xfe,0x00,0x14,0xff,0xfe,0xfb,0xff,0xda,0xd7,0xda,0xfa,0xdb,0xf3,
+ 0x55,0x41,0x04,0x45,0x85,0x8f,0xae,0xd2,0xb7,0xd7,0xd6,0xb3,0xd7,0xd6,0xb7,0xd7,
+ 0xd6,0xb7,0xd7,0xd6,0xb7,0xd7,0xf6,0x02,0xd7,0xf6,0x02,0xd7,0xd6,0xb3,0xd7,0xd6,
+ 0xb7,0xd7,0xda,0xb6,0x8e,0x6d,0x6f,0x8e,0x51,0x4a,0x8d,0x6d,0x69,0x6d,0xad,0x96,
+ 0xde,0xff,0xfe,0xff,0xfe,0x0d,0xff,0xd7,0xf6,0xd7,0x02,0xf6,0x02,0xd7,0xf6,0x02,
+ 0xd7,0xd6,0xb7,0xd7,0xd6,0xb7,0xd7,0xda,0xb7,0x02,0xd6,0xb7,0xd7,0xf6,0xb6,0x8a,
+ 0x48,0x02,0x45,0x49,0x41,0x02,0x45,0x21,0x41,0x25,0x21,0x41,0x24,0x21,0x41,0x24,
+ 0x25,0x21,0x24,0x02,0x21,0x20,0x02,0x21,0x24,0x02,0x21,0x20,0x02,0x21,0x24,0x02,
+ 0x21,0x24,0x96,0xda,0x9d,0x69,0x70,0xb3,0xb2,0xb5,0xae,0xba,0x76,0xcf,0xd6,0x76,
+ 0xaa,0xde,0x7a,0x8d,0x92,0x75,0x92,0x96,0xd9,0xb9,0xba,0xda,0xd6,0xfe,0xde,0xb5,
+ 0x02,0xdf,0x95,0x9b,0xfa,0xbd,0x96,0xb5,0xb7,0xba,0x9a,0x91,0x72,0xb1,0x95,0x6e,
+ 0x6d,0x02,0x69,0x49,0x62,0x6d,0x4d,0x49,0x52,0x02,0x6d,0x76,0x91,0x8d,0x6e,0x91,
+ 0x92,0x8e,0x91,0x71,0x72,0x6d,0x69,0x91,0x71,0x92,0x8e,0x71,0x6d,0x76,0x91,0x8d,
+ 0xb5,0x51,0x69,0x6e,0x91,0x92,0x8d,0x71,0x92,0x85,0x4c,0x6e,0x8e,0x6d,0x02,0x69,
+ 0x6d,0x02,0x69,0x6d,0xcb,0xfe,0xfd,0x00,0x13,0xff,0xfb,0xfe,0xda,0xdb,0xda,0xd2,
+ 0xbb,0xf6,0x74,0x04,0x45,0x49,0x02,0x45,0xad,0xb7,0x8f,0xf6,0xd7,0x02,0xd6,0xd3,
+ 0x02,0xd7,0xd3,0xb7,0xdb,0xd7,0xb7,0xfb,0x06,0xd7,0xd3,0x03,0xd7,0xbb,0xdb,0xd7,
+ 0xb7,0x02,0xb6,0x8a,0x8d,0x8e,0x6a,0x6d,0x6a,0x69,0x4d,0x49,0x76,0xb5,0xd2,0x04,
+ 0xff,0xfe,0x02,0xff,0xfe,0x09,0xff,0xf1,0xdb,0xfa,0xd3,0xd6,0xf6,0xd3,0xd7,0xfa,
+ 0x02,0xd7,0xda,0xd7,0xd6,0xda,0xd7,0x02,0xdb,0xd7,0xb7,0xfa,0xd7,0xdb,0xb7,0x6c,
+ 0x46,0x03,0x45,0x49,0x44,0x21,0x44,0x45,0x21,0x25,0x02,0x21,0x41,0x20,0x21,0x25,
+ 0x02,0x21,0x25,0x20,0x21,0x25,0x20,0x21,0x25,0x02,0x21,0x25,0x20,0x21,0x25,0x20,
+ 0x21,0x95,0x96,0x8e,0x2c,0x4f,0xb5,0x79,0x66,0xd9,0xba,0x02,0xb6,0xb5,0xbf,0xdb,
+ 0x99,0x8d,0x6d,0x8d,0x02,0x96,0x71,0x92,0xd9,0x02,0xb5,0xba,0xf6,0xdd,0xbe,0xfa,
+ 0xdf,0xfe,0xde,0xdf,0xbe,0x02,0xba,0x9a,0xd6,0xba,0x92,0x91,0x9b,0x8e,0x4c,0x4e,
+ 0x6d,0x4d,0x4a,0x02,0x6d,0x49,0x4d,0x6d,0x6e,0x02,0x6d,0x6f,0xb2,0x71,0x6f,0xb2,
+ 0x95,0x97,0x8e,0x71,0x72,0x6e,0x8d,0x92,0x8e,0x6d,0x72,0x02,0x91,0x92,0x02,0x95,
+ 0x8d,0x02,0x95,0x96,0xb6,0x91,0x92,0x8e,0x6d,0x65,0x69,0x6d,0x03,0x69,0x02,0x6e,
+ 0x8d,0x92,0xb6,0xd2,0xd3,0xfe,0x00,0x13,0xff,0xd2,0xb6,0xb2,0x02,0x8e,0x8d,0x6e,
+ 0x69,0x28,0x21,0x45,0x44,0x02,0x45,0x44,0x47,0xce,0xb2,0xb3,0xd3,0xd6,0xb7,0xd7,
+ 0xf6,0xd3,0xf3,0xf7,0xd3,0xd7,0xf7,0x02,0xd7,0xdb,0x02,0xd7,0xf6,0x02,0xd7,0xf6,
+ 0x02,0xd7,0xf7,0x02,0xd7,0xd6,0xb7,0xd7,0x96,0x6a,0x8e,0x8d,0x6a,0x69,0x6d,0x02,
+ 0x49,0x89,0x92,0xd6,0xf6,0x02,0xff,0xfe,0x02,0xff,0xfe,0x09,0xff,0xfe,0xdb,0xf6,
+ 0xd7,0xdb,0xf6,0xd7,0xd6,0xf6,0x02,0xd7,0xd6,0x02,0xd7,0xd6,0xdb,0xd7,0xd6,0xb7,
+ 0xd6,0xf6,0xd7,0xda,0xfa,0xb1,0x46,0x65,0x04,0x45,0x41,0x44,0x25,0x21,0x20,0x02,
+ 0x21,0x24,0x21,0x41,0x24,0x02,0x21,0x20,0x02,0x21,0x24,0x02,0x21,0x20,0x21,0x41,
+ 0x20,0x02,0x21,0x24,0x02,0x21,0x24,0x72,0x91,0x50,0x45,0x8c,0x9b,0x85,0x6c,0xb3,
+ 0xda,0x9a,0x91,0xb6,0xd9,0xbe,0xb2,0x95,0x91,0x92,0x91,0x6c,0x72,0xb5,0xb6,0xbe,
+ 0xdd,0x99,0x9e,0xfa,0xb9,0xbf,0xfe,0xde,0xdf,0xfe,0xde,0xdf,0xbe,0xb2,0xbe,0xba,
+ 0x95,0x9b,0xd6,0x95,0x72,0xb1,0x71,0x72,0x92,0x4d,0x4e,0x4d,0x49,0x4d,0x02,0x6d,
+ 0x49,0x8c,0x96,0x8e,0x91,0x71,0x76,0xb6,0x91,0x76,0x91,0x02,0x8e,0x6d,0x69,0x72,
+ 0x91,0x71,0x72,0x02,0x91,0x92,0x95,0xb6,0xde,0xba,0xb1,0xba,0x96,0x6d,0x6e,0x02,
+ 0x6d,0x69,0x4d,0x03,0x49,0x45,0x6d,0x91,0x02,0xb2,0xb5,0xef,0x00,0x10,0xff,0xde,
+ 0xb5,0xb2,0x71,0x6d,0x69,0x02,0x6d,0x6e,0x4d,0x03,0x45,0x41,0x02,0x45,0x41,0x45,
+ 0x48,0xab,0xce,0xb2,0xd3,0xd7,0xdb,0xd3,0xd7,0xfb,0xd3,0xd7,0xf7,0xd3,0xd7,0xfb,
+ 0xd7,0xdb,0xfb,0xd3,0xd7,0xfb,0x02,0xd7,0xf7,0xd3,0xd7,0xda,0xd3,0x02,0xd7,0xd3,
+ 0xce,0x72,0x8f,0x8e,0x6e,0x69,0x04,0x49,0xac,0x96,0xbf,0x02,0xfe,0x02,0xff,0xfe,
+ 0xff,0xfe,0x09,0xff,0xf2,0xdb,0xfa,0x02,0xd7,0xda,0xd7,0xdb,0xfa,0xd7,0xdb,0xfa,
+ 0xd7,0xdb,0xda,0xd7,0xdb,0xda,0xd7,0xdb,0xda,0xd7,0xdb,0x97,0x44,0x45,0x49,0x45,
+ 0x02,0x49,0x21,0x25,0x45,0x20,0x21,0x24,0x02,0x21,0x25,0x02,0x21,0x25,0x20,0x21,
+ 0x25,0x02,0x21,0x24,0x02,0x21,0x25,0x20,0x21,0x25,0x20,0x21,0x25,0x20,0x21,0x89,
+ 0x95,0x4a,0x44,0x77,0xce,0x50,0x4a,0xbd,0xbf,0xad,0xb9,0xb6,0x8e,0xd9,0xba,0x8d,
+ 0x99,0x9a,0x91,0x71,0x8d,0x96,0xb6,0xf6,0xde,0xda,0x78,0x97,0xfd,0xbd,0xdf,0xfe,
+ 0xdd,0x02,0xff,0x9d,0x02,0xb6,0xb1,0xba,0x96,0xd1,0xbe,0x92,0xad,0xba,0x4e,0x89,
+ 0x72,0x71,0x51,0x49,0x02,0x6d,0x72,0x02,0x6d,0x6e,0x91,0x95,0x72,0x96,0x95,0x02,
+ 0x92,0x91,0x6e,0x03,0x8d,0x02,0x6d,0x72,0x92,0x03,0x6d,0x8d,0x9b,0xda,0xb9,0xbf,
+ 0xb3,0x91,0x96,0x6e,0x6c,0x6e,0x6a,0x69,0x02,0x6d,0x4d,0x49,0x4d,0x69,0x72,0x8e,
+ 0xa9,0x92,0xfd,0x09,0xff,0xfe,0xff,0xbb,0xb5,0x92,0x8e,0x6d,0x6e,0x02,0x6d,0x4e,
+ 0x02,0x69,0x4a,0x69,0x6d,0x02,0x49,0x48,0x21,0x45,0x44,0x21,0x02,0x45,0x21,0x91,
+ 0xd3,0xae,0xd6,0xfb,0xd7,0xf7,0xfb,0xdb,0x02,0xfb,0xd7,0x02,0xfb,0xd7,0x02,0xf7,
+ 0xd7,0x02,0xf7,0xd7,0x02,0xf7,0xd3,0xd7,0xf7,0x02,0xd7,0xf7,0x02,0xd7,0xd6,0xad,
+ 0x92,0xb2,0x92,0x6a,0x48,0x45,0x02,0x49,0x4a,0x02,0xb5,0xdf,0xff,0xfe,0x02,0xff,
+ 0xfe,0x09,0xff,0xf6,0xde,0xfb,0xd7,0xfb,0xf6,0x02,0xdb,0xf6,0xd7,0xdb,0xd6,0xd7,
+ 0xdb,0xda,0xd7,0xdb,0xd6,0x02,0xdb,0xd6,0x03,0xdb,0xa9,0x49,0x45,0x03,0x49,0x02,
+ 0x45,0x41,0x21,0x41,0x44,0x02,0x25,0x44,0x02,0x21,0x24,0x02,0x21,0x20,0x02,0x21,
+ 0x20,0x02,0x21,0x25,0x02,0x21,0x20,0x02,0x21,0x20,0x02,0x21,0x20,0x02,0x96,0x4c,
+ 0x49,0xcc,0x9e,0x62,0x8c,0xb3,0x02,0xde,0xba,0xb6,0xf9,0xbd,0x96,0xb6,0x92,0xb6,
+ 0x95,0x6d,0x75,0x95,0x92,0x02,0xba,0x02,0x91,0x94,0xba,0xde,0xbd,0xdf,0xff,0xfe,
+ 0xbd,0xbe,0xb9,0x95,0x9e,0xd6,0x91,0x9a,0xb6,0x8d,0x9e,0x9a,0x6d,0x72,0x6d,0x49,
+ 0x51,0x8d,0x6d,0x71,0x51,0x69,0x6d,0x8d,0x6e,0x92,0x91,0x6d,0x72,0x02,0x91,0x92,
+ 0x71,0x02,0x6e,0x02,0x6d,0x71,0x91,0x92,0x03,0x6d,0x76,0xf6,0xde,0x02,0xdf,0x94,
+ 0x6d,0x6c,0x71,0x6e,0x6d,0x49,0x02,0x71,0x6d,0x69,0x4d,0x49,0x4d,0x02,0x6d,0x69,
+ 0xac,0xb3,0x04,0xff,0xfe,0x02,0xff,0xde,0x99,0x4e,0x8d,0x6d,0x6e,0x6d,0x6a,0x02,
+ 0x69,0x6a,0x08,0x69,0x45,0x02,0x49,0x41,0x25,0x45,0x41,0x45,0x25,0x63,0xba,0xb7,
+ 0xaf,0xda,0xff,0x02,0xf7,0xfb,0x02,0xdb,0xff,0x02,0xf7,0xfa,0xf7,0xfb,0xff,0x02,
+ 0xf7,0xfb,0xd7,0x02,0xfb,0xd7,0xf7,0xfa,0x02,0xd7,0xfb,0x03,0xd7,0xae,0x92,0xb2,
+ 0x91,0x45,0x02,0x49,0x45,0x48,0x6f,0xb1,0xfc,0x03,0xff,0xfe,0xff,0xfe,0x08,0xff,
+ 0xde,0xd7,0xfb,0xfa,0xd7,0xdb,0xfb,0xd3,0xd7,0xfa,0x02,0xd7,0xda,0xd7,0xdb,0xda,
+ 0x02,0xd7,0xda,0x02,0xd7,0xfa,0xd7,0xd6,0x56,0x41,0x45,0x49,0x03,0x45,0x21,0x45,
+ 0x24,0x21,0x45,0x25,0x21,0x02,0x25,0x02,0x21,0x25,0x21,0x02,0x25,0x20,0x21,0x24,
+ 0x02,0x21,0x24,0x20,0x21,0x25,0x20,0x21,0x24,0x02,0x21,0x8e,0x8d,0x6d,0x68,0x9f,
+ 0xd3,0x50,0x4f,0xd5,0xd6,0x02,0xba,0xf7,0xfe,0xde,0xda,0xd9,0x02,0x9a,0x8d,0x91,
+ 0x8d,0x9f,0x92,0x8d,0x03,0x91,0x96,0x95,0x91,0x9a,0xfd,0x03,0xff,0xbd,0xba,0x96,
+ 0xb1,0xbe,0x96,0xb2,0xb5,0x99,0xba,0xb2,0x92,0x02,0x6d,0x4d,0x02,0x69,0x91,0x75,
+ 0x6e,0x6d,0x69,0x6e,0x02,0x91,0x71,0x6d,0x8d,0x91,0x51,0xae,0x91,0x02,0x6d,0x6e,
+ 0x6d,0x8d,0x6e,0xb1,0x75,0x6e,0x91,0xae,0xbf,0xfe,0xff,0xde,0x72,0x6c,0x77,0x8e,
+ 0x8d,0x02,0x6d,0x89,0x96,0x8e,0x8d,0x03,0x6d,0x6e,0x91,0x71,0x6e,0xb5,0xd2,0xdf,
+ 0xff,0xde,0xae,0xfe,0xff,0xfe,0x8f,0x4c,0x4e,0x6a,0x69,0x6a,0x02,0x69,0x6a,0x03,
+ 0x69,0x02,0x6d,0x6e,0x6d,0x04,0x69,0x02,0x45,0x49,0x21,0x02,0x45,0x21,0x45,0xc2,
+ 0xde,0xb7,0xf3,0xff,0x02,0xfb,0xdb,0xfb,0xf7,0xdb,0x02,0xfb,0xd3,0xfe,0x03,0xff,
+ 0xfe,0xdb,0x02,0xfb,0xd7,0xfb,0xf7,0xdb,0x02,0xfb,0x02,0xd7,0xf6,0xdb,0xaf,0xa9,
+ 0x93,0xb2,0x51,0x04,0x45,0x4d,0xae,0xb2,0xfd,0x03,0xff,0xfe,0x09,0xff,0xf3,0xfa,
+ 0xfb,0xdb,0xfb,0xf6,0xd7,0x02,0xfb,0xdb,0x02,0xfb,0x02,0xdb,0xf6,0x02,0xdb,0xf6,
+ 0xd7,0xfb,0xf6,0xd7,0xfa,0xbe,0x65,0x08,0x45,0x21,0x25,0x45,0x21,0x41,0x20,0x02,
+ 0x25,0x41,0x02,0x21,0x41,0x20,0x02,0x25,0x02,0x21,0x20,0x02,0x21,0x20,0x02,0x21,
+ 0x20,0x02,0x21,0x20,0x75,0x95,0x6d,0x4e,0xf1,0xbd,0x46,0x8c,0xbb,0xdf,0xbe,0xb5,
+ 0xbe,0xfe,0xdf,0xdb,0xba,0xb2,0xb1,0x94,0x9e,0x6a,0x8c,0x91,0x96,0x55,0x6e,0x8d,
+ 0x71,0x4d,0x49,0x48,0x69,0xde,0xff,0xfe,0xff,0xbe,0x95,0x9a,0x76,0x8e,0xb9,0x79,
+ 0xb3,0xd6,0x99,0x96,0x8a,0x4d,0x46,0x71,0x91,0x6d,0x92,0x91,0x6d,0x02,0x71,0x6d,
+ 0x02,0x71,0x6d,0x8d,0x6d,0x6f,0xad,0x51,0x6e,0x8d,0x4d,0x6b,0x92,0x95,0x8e,0x8d,
+ 0x90,0xbb,0xb6,0xd9,0xdf,0xff,0xbf,0x8c,0x52,0xf1,0x98,0x4e,0x6d,0x6a,0xba,0x96,
+ 0x02,0x6d,0x91,0x92,0x8e,0x71,0x69,0x72,0xb2,0x96,0x8e,0xf1,0xff,0xf7,0xba,0xcf,
+ 0x02,0xff,0xb5,0x66,0x68,0x6a,0x69,0x6d,0x6a,0x02,0x69,0x6a,0x6e,0x8d,0x6a,0x6e,
+ 0x6d,0x6a,0x8e,0x8d,0x03,0x69,0x49,0x45,0x44,0x45,0x41,0x44,0x25,0x56,0xf3,0xb6,
+ 0xb7,0xf6,0xfb,0xf7,0x03,0xfb,0xff,0xfb,0xff,0xbf,0xeb,0x03,0xff,0xf7,0xfe,0x03,
+ 0xfb,0xf7,0x02,0xfb,0xd3,0xf7,0xfb,0x02,0xd7,0xfa,0xdb,0xae,0xb1,0x93,0x8e,0x4d,
+ 0x41,0x02,0x49,0x45,0x71,0xb1,0xaf,0x02,0xff,0xfe,0xff,0xfe,0x07,0xff,0xf7,0xfe,
+ 0xd7,0xf7,0xfa,0x02,0xdb,0xfa,0x02,0xdb,0xfa,0xd7,0xdb,0xda,0xd7,0xdb,0xfa,0xd7,
+ 0xdb,0xda,0xd7,0xdb,0xda,0xdb,0xca,0x4d,0x41,0x02,0x49,0x02,0x45,0x25,0x21,0x41,
+ 0x24,0x21,0x41,0x24,0x02,0x21,0x25,0x02,0x21,0x24,0x21,0x41,0x24,0x02,0x21,0x24,
+ 0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x8d,0x91,0x4d,0x65,0x9b,
+ 0xb3,0x4c,0x57,0xdd,0xff,0xd5,0x99,0xd2,0xdf,0xde,0xb9,0xb6,0xd9,0xbe,0x8e,0x91,
+ 0x71,0x76,0x92,0xb2,0x92,0x4e,0x85,0x91,0x6d,0x48,0x49,0x4c,0x6d,0x9f,0x03,0xfe,
+ 0x76,0x8d,0x72,0x99,0xba,0x92,0xd9,0x99,0xba,0xb2,0x6d,0x6e,0x6d,0x69,0x03,0x6d,
+ 0x71,0x6d,0x02,0x8d,0x03,0x6d,0x02,0x71,0x65,0x02,0x91,0x8d,0x02,0x6d,0x49,0x91,
+ 0x96,0x92,0xb2,0x70,0x72,0xd5,0xb9,0xbf,0xfe,0xf9,0xfe,0xb6,0xad,0xbf,0xb6,0x91,
+ 0x6d,0x71,0x02,0xb2,0x95,0xb6,0x89,0x94,0x9a,0x89,0x02,0x6d,0x72,0xb2,0x91,0x97,
+ 0x02,0xfe,0xd1,0xb9,0xf7,0xff,0xd7,0x91,0x65,0x89,0x8d,0x69,0x6d,0x8d,0x6a,0x8d,
+ 0xcf,0xda,0x93,0x8d,0x02,0x92,0x8d,0x02,0x8e,0x6d,0x6e,0x6a,0x44,0x41,0x21,0x02,
+ 0x41,0x25,0x41,0x7f,0xf7,0xb1,0xbb,0x03,0xfb,0xff,0x02,0xfb,0xff,0xfb,0xf9,0x3a,
+ 0xef,0x03,0xff,0xf3,0xfb,0xf7,0xff,0xfb,0xf7,0xdb,0xfb,0xf7,0xd7,0x02,0xf7,0xdb,
+ 0xfb,0xba,0x8e,0xb5,0xb6,0x8d,0x49,0x41,0x45,0x49,0x65,0x72,0xd5,0xf2,0x02,0xff,
+ 0xfe,0x08,0xff,0xfe,0xdb,0x02,0xfb,0xdb,0xfb,0xf7,0xd7,0xfb,0xf7,0xd7,0xfb,0xf7,
+ 0xdb,0xfb,0xf7,0xdb,0x02,0xfb,0xd7,0xfa,0xda,0xdb,0xf7,0x95,0x65,0x02,0x49,0x45,
+ 0x02,0x49,0x41,0x02,0x45,0x21,0x45,0x25,0x21,0x41,0x40,0x08,0x21,0x20,0x05,0x21,
+ 0x20,0x02,0x21,0x20,0x02,0x21,0x24,0x02,0x71,0x02,0x6d,0xb1,0x99,0x4a,0x8c,0xbf,
+ 0xd6,0x99,0xb3,0xd6,0xd9,0xdb,0xd6,0x99,0xbb,0x92,0xd1,0x99,0x72,0x8d,0x69,0x9a,
+ 0x97,0x60,0x75,0x91,0x8d,0x69,0x48,0x02,0x49,0x8c,0xbf,0x02,0xff,0xb0,0x71,0x8d,
+ 0x8e,0xbe,0xbd,0x02,0xba,0xd9,0xb9,0x6e,0xad,0x71,0x52,0x91,0x6d,0x02,0x71,0x69,
+ 0x91,0x71,0x6a,0x8d,0x71,0x02,0x69,0x8d,0x6e,0x8e,0x4d,0x45,0x6d,0x4c,0x6e,0x91,
+ 0xb1,0x99,0x6e,0xad,0x95,0x9a,0xf6,0xde,0xda,0xd9,0xbe,0xde,0xbe,0x02,0xba,0x75,
+ 0x69,0x6d,0x8d,0x8e,0x92,0x91,0x6d,0x75,0x92,0x6d,0x71,0xb1,0x92,0xae,0xac,0x02,
+ 0xfb,0xbe,0xae,0xdf,0xff,0xfa,0xce,0x50,0x6b,0x8a,0x8d,0x6e,0x92,0xb2,0x8a,0xde,
+ 0xff,0xdd,0x6f,0xad,0x8e,0x92,0x91,0x02,0x8e,0x6d,0x6e,0x62,0x44,0x21,0x02,0x45,
+ 0x25,0x21,0xc9,0xdf,0xd3,0xd6,0x02,0xfb,0xff,0x02,0xfb,0xff,0xfb,0xff,0xdf,0x60,
+ 0x7e,0x04,0xff,0xf3,0xfb,0xff,0x02,0xfb,0xff,0x03,0xfb,0xd7,0xdb,0xfb,0xd7,0xfb,
+ 0x9a,0x8b,0x02,0xb2,0x6c,0x25,0x44,0x4a,0x45,0x89,0x92,0xda,0xfa,0x02,0xff,0xfe,
+ 0x07,0xff,0xf7,0xfa,0xdb,0x02,0xff,0xd7,0xfb,0xfa,0xd7,0xf7,0xfa,0xd7,0xdb,0xfa,
+ 0xd7,0xff,0xfe,0xd7,0x02,0xfb,0xd7,0xfb,0xfe,0xde,0x87,0x68,0x45,0x02,0x49,0x45,
+ 0x49,0x28,0x21,0x41,0x24,0x25,0x41,0x24,0x25,0x41,0x24,0x21,0x41,0x24,0x21,0x41,
+ 0x24,0x21,0x41,0x24,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x91,
+ 0x92,0x8e,0x68,0x9f,0x97,0x6c,0x77,0xd6,0x02,0xb6,0xda,0xb5,0xbf,0xfa,0xb9,0x92,
+ 0xb2,0xae,0xba,0x92,0x8d,0x91,0x4d,0xa6,0xb1,0x51,0xaa,0xad,0x4d,0x03,0x49,0x45,
+ 0x4d,0x8d,0xea,0xff,0xbf,0x90,0x6d,0x94,0x02,0xbb,0xde,0x99,0xbf,0x96,0x70,0x72,
+ 0x71,0x04,0x6d,0x69,0x04,0x6d,0x8e,0x89,0x4d,0x6d,0x72,0x91,0x8e,0x69,0x4d,0x02,
+ 0x69,0x6d,0x02,0x92,0x91,0x70,0x6d,0x91,0xb2,0xdf,0xfe,0xdd,0xd6,0xfd,0xde,0x02,
+ 0xfe,0x02,0xde,0x96,0x68,0x76,0x91,0x6d,0x76,0x6e,0x69,0x72,0x6d,0x69,0x6d,0x91,
+ 0xae,0x89,0xf8,0xff,0xf6,0xb3,0xe6,0x02,0xff,0xba,0x89,0x6d,0x03,0x8e,0x8a,0x02,
+ 0x8e,0xca,0xff,0xfb,0xb1,0x92,0xb2,0x02,0x92,0xb2,0x8d,0x8a,0x8d,0x6d,0x41,0x05,
+ 0x45,0x26,0xf5,0xff,0xcf,0xfa,0xfb,0xf7,0xff,0xfb,0x02,0xff,0xfb,0xff,0x4b,0xa0,
+ 0xdf,0x04,0xff,0xf7,0x02,0xff,0xfb,0xf7,0x05,0xfb,0xd7,0xfb,0xf7,0xd6,0x92,0xaa,
+ 0xb6,0x92,0x4c,0x26,0x02,0x45,0x4a,0x8d,0xae,0xdf,0xfe,0x09,0xff,0xf5,0xdf,0xfb,
+ 0xf7,0xfb,0xff,0xfa,0xdb,0xfb,0xf6,0xdb,0x02,0xfb,0xdb,0xff,0xfb,0xdb,0xfb,0xf6,
+ 0xdb,0xfb,0xf7,0xff,0xfb,0x70,0x45,0x69,0x03,0x49,0x04,0x45,0x41,0x44,0x25,0x21,
+ 0x45,0x24,0x21,0x45,0x24,0x21,0x45,0x24,0x21,0x25,0x02,0x21,0x25,0x20,0x21,0x02,
+ 0x25,0x06,0x21,0xb6,0x02,0xb5,0x96,0x02,0xb6,0xbe,0xba,0x91,0xbe,0xba,0xb5,0xba,
+ 0xf6,0xdb,0xfa,0xd9,0xdf,0xb3,0xd5,0xbf,0x8b,0xc9,0x95,0x4e,0x8d,0x8e,0xba,0x7a,
+ 0x44,0x04,0x49,0x48,0x49,0x6d,0xcc,0xbf,0xd6,0x54,0x72,0x96,0xf5,0xbd,0xba,0x95,
+ 0x96,0x8e,0x6d,0x6e,0x03,0x6d,0x69,0x4d,0x4a,0x69,0x4d,0x4a,0x8d,0x4c,0x4d,0x02,
+ 0x6d,0x6e,0x71,0x51,0x02,0x49,0x48,0x6e,0x02,0x91,0x71,0x6d,0x6c,0x6d,0xbd,0x02,
+ 0xfe,0xde,0xdd,0xda,0xfe,0xfd,0x03,0xff,0xfd,0xb6,0x75,0x93,0xb6,0x75,0x72,0x02,
+ 0x6d,0x02,0x49,0x69,0x49,0x95,0xb2,0xab,0xfe,0xff,0xd1,0xb6,0xf7,0xff,0xfb,0x9a,
+ 0x66,0x91,0x92,0x6e,0x72,0xb2,0x8e,0x72,0xf2,0xb6,0x92,0xb2,0x92,0x02,0xb2,0x8e,
+ 0xb2,0x92,0x69,0x89,0x4d,0x41,0x45,0x49,0x25,0x45,0x48,0x8f,0xfa,0xdf,0xcb,0xfb,
+ 0xff,0x02,0xf7,0xfb,0x03,0xff,0xb0,0x01,0x06,0xe5,0xff,0xfb,0xff,0xfb,0xf3,0xf7,
+ 0x02,0xfb,0xff,0xf7,0x02,0xfb,0x02,0xf7,0xfb,0xd7,0x02,0xf7,0xad,0x92,0xd2,0xb7,
+ 0x87,0x48,0x45,0x02,0x49,0x67,0xb5,0xd5,0xdf,0x08,0xff,0xfe,0xdb,0xfa,0xdb,0xfb,
+ 0xfa,0xdb,0xfb,0xfa,0xdb,0xfb,0xfa,0xdb,0xfb,0xfa,0xd7,0xfb,0xfa,0xd7,0xf7,0xfa,
+ 0xfb,0x02,0xff,0xd5,0x6a,0x48,0x04,0x49,0x41,0x44,0x45,0x41,0x44,0x45,0x21,0x40,
+ 0x21,0x41,0x24,0x02,0x21,0x24,0x21,0x41,0x24,0x02,0x21,0x24,0x02,0x21,0x24,0x02,
+ 0x21,0x24,0x02,0x21,0x24,0x02,0x21,0xcf,0xfe,0xde,0xba,0xb6,0xb9,0xd7,0xda,0xbe,
+ 0xba,0xb2,0xb5,0xd6,0xda,0xdd,0xbe,0xb2,0xf9,0xb9,0xbb,0xfa,0x99,0x6e,0xd1,0x75,
+ 0x45,0xb4,0xdf,0xad,0x70,0x72,0x65,0x6c,0x4d,0x49,0x4c,0x4d,0x49,0x6c,0x8f,0xad,
+ 0x70,0x71,0x9f,0xba,0x95,0x96,0xb6,0x91,0x6e,0x91,0x71,0x02,0x6d,0x02,0x69,0x49,
+ 0x02,0x45,0x02,0x6d,0x4a,0x8d,0x71,0x4e,0xad,0x71,0x4e,0x6d,0x49,0x72,0x02,0x91,
+ 0x6d,0x02,0x4d,0x49,0x2c,0x65,0xbf,0xdf,0xb5,0xb1,0xb9,0xb6,0xde,0xfd,0x03,0xff,
+ 0xfe,0xf2,0x75,0xae,0xbe,0x97,0x68,0x02,0x6d,0x03,0x49,0xa3,0xfe,0x9b,0xeb,0xfe,
+ 0xff,0xad,0xbf,0xff,0xfe,0xd2,0x72,0x8a,0x02,0x92,0x8d,0x76,0x92,0x6e,0x6a,0x6d,
+ 0xaf,0x02,0xb6,0xae,0x8e,0xb6,0x02,0xb2,0x92,0x8e,0x65,0x49,0x02,0x45,0x49,0x45,
+ 0x21,0x6c,0xf3,0xf2,0xd7,0xef,0xfb,0x02,0xff,0xb3,0xfb,0x02,0xff,0x73,0x40,0x4b,
+ 0xf5,0xff,0xfb,0xff,0xf6,0xd7,0xfb,0xf7,0xfb,0xff,0x03,0xfb,0xf7,0xdb,0xfb,0xf7,
+ 0xfb,0xf7,0xa9,0xb2,0xd6,0xb6,0x61,0x48,0x45,0x02,0x49,0x8a,0xb6,0xfa,0xfb,0x08,
+ 0xff,0xf2,0xdf,0xff,0xfa,0xff,0xfe,0xf7,0xfb,0xfe,0xfa,0xfb,0xfa,0x03,0xfb,0xf7,
+ 0xfb,0xfa,0xf7,0xfb,0xff,0xfb,0xff,0xb7,0x68,0x4a,0x49,0x02,0x45,0x49,0x03,0x45,
+ 0x40,0x21,0x45,0x20,0x25,0x45,0x20,0x21,0x45,0x20,0x21,0x25,0x20,0x21,0x45,0x20,
+ 0x21,0x45,0x20,0x21,0x45,0x20,0x02,0x21,0x20,0x21,0x25,0x21,0xb9,0xda,0xde,0xba,
+ 0xd5,0xdf,0xfe,0xbe,0xb7,0xd2,0xb1,0xb3,0xfe,0xdd,0x02,0xdf,0xfa,0xdd,0xba,0xb5,
+ 0xbf,0xf2,0x74,0x9b,0xd2,0x70,0x6f,0xd5,0x95,0x9b,0xb2,0x71,0x6d,0x04,0x49,0x4d,
+ 0x45,0x49,0x68,0x76,0x72,0xcd,0xbf,0xde,0xbd,0xba,0x92,0x70,0x72,0x6e,0x6c,0x4e,
+ 0x02,0x6d,0x41,0x02,0x49,0x4a,0x69,0x6d,0x4a,0x02,0x6d,0x6e,0x8d,0x4c,0x49,0x02,
+ 0x71,0x03,0x6d,0x49,0x45,0x24,0x02,0x25,0x44,0x4d,0x6d,0x4c,0x4d,0x6d,0x6c,0x6d,
+ 0xfd,0xfe,0x03,0xff,0xfe,0x93,0xb1,0x96,0x92,0x8d,0x6c,0x6d,0xae,0x68,0x9d,0xfb,
+ 0xd1,0xba,0xf7,0xff,0xcf,0xed,0xff,0xfb,0xde,0xad,0x8e,0xb2,0x93,0x8e,0xad,0x97,
+ 0x8a,0xa9,0xdf,0xfb,0x9d,0x8f,0x04,0xb2,0xd2,0x8d,0x6e,0x72,0x02,0x45,0x49,0x03,
+ 0x45,0x42,0xb5,0xf7,0xd2,0xd7,0x03,0xf7,0xde,0x02,0xff,0xfe,0xda,0x43,0x40,0x67,
+ 0xfa,0xde,0xae,0xb2,0xf3,0xf7,0x04,0xfb,0xff,0xfb,0xf7,0xfb,0xd7,0xf7,0xfb,0xdb,
+ 0xd3,0xb1,0xb3,0xd2,0x75,0x45,0x03,0x49,0x6d,0xad,0xb6,0xfe,0xfa,0x06,0xff,0xf6,
+ 0xdf,0xff,0xdb,0xff,0xfb,0xdb,0xff,0xfa,0x02,0xfb,0xfa,0xdb,0xfb,0xfa,0xdb,0xfb,
+ 0xfa,0xd7,0xfb,0xfa,0x03,0xff,0xad,0x4a,0x65,0x45,0x02,0x49,0x02,0x45,0x40,0x45,
+ 0x25,0x45,0x41,0x21,0x02,0x45,0x21,0x40,0x45,0x21,0x40,0x02,0x21,0x24,0x21,0x41,
+ 0x24,0x02,0x21,0x20,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x8e,0xb6,0xb5,0x91,
+ 0xbe,0xba,0x91,0xbe,0xda,0x95,0x96,0xb5,0xb6,0xba,0xfe,0xb9,0xde,0xfe,0xbe,0xae,
+ 0xf8,0x9d,0x6e,0x91,0x8e,0xb6,0xd5,0x94,0x7a,0xd6,0x95,0x8d,0x6d,0x69,0x49,0x48,
+ 0x49,0x45,0x48,0x45,0x02,0x4d,0x69,0x9a,0xfa,0xba,0xda,0x9a,0x70,0x52,0x71,0x6d,
+ 0x49,0x02,0x6d,0x45,0x49,0x48,0x4d,0x6d,0x69,0x05,0x6d,0x4c,0x45,0x05,0x49,0x45,
+ 0x24,0x02,0x25,0x24,0x25,0x02,0x29,0x25,0x02,0x4d,0x02,0x49,0x4c,0x69,0x91,0xf8,
+ 0x03,0xff,0xdc,0x8e,0x71,0x6d,0x72,0x6e,0x65,0x96,0x92,0xa7,0xff,0xdb,0xa5,0x02,
+ 0xff,0xde,0x8b,0xf9,0xff,0xfb,0xb7,0x89,0x96,0xb6,0x92,0x8e,0xd2,0x91,0x66,0xf8,
+ 0xff,0xf3,0xb6,0xb3,0x02,0xb6,0xb3,0x02,0xb6,0x02,0x8d,0x4d,0x45,0x41,0x44,0x41,
+ 0x02,0x45,0x82,0xde,0xff,0xf3,0xdb,0xff,0xfb,0xf2,0xfe,0xff,0x02,0xfb,0x70,0x26,
+ 0x69,0x4a,0x45,0x25,0x83,0xfe,0xff,0xf7,0xfb,0xff,0xf7,0xfb,0xff,0xf7,0xd7,0xfb,
+ 0x02,0xf7,0xfb,0xdb,0xae,0xb5,0xb3,0xb2,0x52,0x45,0x02,0x49,0x45,0x72,0xd1,0xd3,
+ 0xfe,0xfd,0x06,0xff,0xfb,0x02,0xff,0xf7,0xfb,0xfe,0x02,0xfb,0xff,0xf7,0xfb,0xff,
+ 0xf7,0x02,0xff,0x02,0xfb,0xfe,0xfb,0x03,0xff,0xf6,0x73,0x61,0x03,0x49,0x45,0x49,
+ 0x02,0x45,0x29,0x21,0x02,0x45,0x20,0x29,0x49,0x20,0x02,0x25,0x02,0x21,0x25,0x20,
+ 0x21,0x25,0x20,0x21,0x25,0x02,0x21,0x25,0x20,0x21,0x25,0x02,0x21,0x24,0x20,0x92,
+ 0x70,0x6f,0xd9,0xbe,0x8d,0x71,0xee,0x02,0xda,0xb5,0xb6,0xfa,0xd9,0xda,0xfe,0xdd,
+ 0xdf,0xd7,0xd1,0xbd,0x9a,0xf6,0xac,0x59,0xf3,0xfd,0x52,0xc9,0xba,0x6e,0x68,0x6d,
+ 0x4d,0x49,0x45,0x02,0x49,0x45,0x49,0x69,0x49,0x03,0x6d,0x9d,0xdf,0xad,0x02,0x6d,
+ 0x02,0x69,0x48,0x49,0x69,0x05,0x49,0x02,0x6d,0x69,0x03,0x6d,0x49,0x48,0x02,0x25,
+ 0x45,0x21,0x25,0x24,0x21,0x25,0x24,0x21,0x45,0x29,0x21,0x25,0x45,0x4e,0x4d,0x6d,
+ 0x49,0x6d,0x89,0x6c,0x9c,0xff,0xfe,0xff,0x7d,0x69,0x45,0x60,0x7b,0x8e,0xad,0x8e,
+ 0xfe,0xff,0xd6,0xb3,0xee,0xff,0xfb,0xb9,0xaf,0xfe,0xff,0xfa,0x8f,0xa9,0x92,0xb2,
+ 0x91,0x93,0xd2,0x91,0x97,0xfe,0xbe,0xaf,0xd6,0xb6,0xb3,0x02,0xd6,0xb7,0xae,0x8d,
+ 0x6d,0x02,0x49,0x25,0x45,0x44,0x25,0x45,0xe2,0xff,0xd3,0xf2,0x03,0xff,0xcf,0xfe,
+ 0xff,0xdb,0xcf,0x4c,0x4a,0x45,0x49,0x21,0x51,0xef,0xf6,0x03,0xfb,0x05,0xf7,0xd7,
+ 0x02,0xfb,0xd7,0xff,0xbe,0xaf,0x02,0xd6,0xb1,0x46,0x60,0x02,0x49,0x69,0x6f,0xd9,
+ 0xf6,0xfa,0xfe,0xff,0xfe,0x02,0xff,0xf7,0xfb,0xfa,0xff,0xfb,0xfa,0x02,0xfb,0xfa,
+ 0xfb,0xff,0xfa,0xfb,0xff,0xfb,0xdb,0x02,0xfb,0xdb,0xff,0xfb,0x02,0xff,0xde,0x89,
+ 0x4d,0x49,0x4a,0x49,0x04,0x45,0x21,0x02,0x41,0x45,0x25,0x02,0x45,0x21,0x41,0x45,
+ 0x25,0x45,0x02,0x21,0x24,0x21,0x41,0x40,0x02,0x21,0x40,0x02,0x21,0x24,0x02,0x21,
+ 0x24,0x02,0x21,0x8d,0x6d,0x71,0xb3,0xf2,0x55,0x44,0x7e,0xdb,0x91,0x96,0xd5,0xb6,
+ 0xb2,0xf5,0xbe,0xb2,0xb4,0xbf,0xd6,0xb9,0xb6,0xd9,0x55,0x8a,0x02,0xbe,0x91,0x96,
+ 0x72,0x48,0x05,0x49,0x45,0x02,0x49,0x45,0x03,0x4d,0x6d,0x71,0x6d,0x71,0x91,0x8e,
+ 0xb6,0x52,0x45,0x03,0x49,0x45,0x48,0x03,0x49,0x45,0x02,0x6d,0x4d,0x45,0x49,0x45,
+ 0x02,0x25,0x02,0x21,0x44,0x02,0x21,0x25,0x02,0x21,0x25,0x02,0x21,0x25,0x21,0x29,
+ 0x69,0x49,0x4e,0x04,0x6d,0x48,0x7e,0xfb,0xbe,0xae,0x71,0x69,0x41,0xcc,0xbf,0x8a,
+ 0x4d,0xc7,0xfe,0xff,0xb5,0x9b,0xfb,0xfe,0xf2,0xb9,0xfb,0x02,0xff,0xad,0x8e,0xce,
+ 0x02,0xae,0x91,0xb3,0xae,0x72,0x69,0x4e,0xf1,0xdb,0xb3,0xd6,0xb3,0xb2,0xd6,0xb6,
+ 0x8e,0x6e,0x69,0x49,0x48,0x03,0x45,0x41,0x52,0xf3,0xf7,0xd3,0xfa,0x02,0xff,0xbf,
+ 0xcf,0xfb,0xff,0xda,0xa1,0x48,0x49,0x02,0x45,0x41,0xbf,0xff,0xeb,0x02,0xff,0xf7,
+ 0xfb,0xff,0x02,0xf7,0xfa,0xf7,0xfb,0xff,0xf7,0xfb,0xbb,0xaf,0x02,0xba,0x91,0x46,
+ 0x69,0x02,0x49,0x6c,0xb3,0xde,0xfe,0xf3,0x03,0xff,0xfb,0xfe,0xfb,0x02,0xff,0xfb,
+ 0xff,0xfe,0xfb,0x02,0xff,0xfb,0xff,0xfe,0xf7,0x02,0xff,0xf7,0x02,0xff,0xfb,0x03,
+ 0xff,0xf2,0x51,0x45,0x65,0x49,0x02,0x45,0x49,0x41,0x45,0x25,0x02,0x41,0x24,0x21,
+ 0x45,0x25,0x21,0x41,0x24,0x02,0x21,0x25,0x20,0x25,0x45,0x20,0x21,0x25,0x02,0x21,
+ 0x24,0x02,0x21,0x24,0x02,0x21,0x25,0x21,0x8e,0x4c,0x4b,0xf9,0xbe,0x84,0x4d,0xcf,
+ 0xb5,0x03,0xb6,0xba,0xd6,0xb5,0xb9,0xd7,0xb2,0xfd,0xbd,0xbf,0xdb,0x94,0x96,0xd9,
+ 0x99,0x92,0xb9,0xba,0x8d,0x4d,0x49,0x45,0x05,0x49,0x45,0x03,0x49,0x6d,0x4d,0x49,
+ 0x4d,0x6d,0x72,0x04,0x6d,0x02,0x69,0x03,0x49,0x69,0x03,0x49,0x4d,0x45,0x25,0x24,
+ 0x02,0x25,0x41,0x21,0x45,0x24,0x21,0x25,0x24,0x02,0x21,0x20,0x02,0x21,0x20,0x02,
+ 0x21,0x41,0x4a,0x69,0x6d,0x02,0x6e,0x6d,0x6e,0x4a,0x48,0x49,0x02,0x6d,0x49,0x6d,
+ 0x4d,0x4b,0xad,0xb2,0x8d,0x95,0xf7,0xfb,0xf7,0xd1,0xdf,0xff,0xfe,0xca,0xfe,0x02,
+ 0xff,0xf3,0x8c,0x97,0xb2,0xae,0x8a,0xd5,0xdb,0x89,0x92,0xef,0xfa,0xb7,0xf3,0xb3,
+ 0x02,0xd6,0xb7,0xd6,0x99,0x93,0x6e,0x69,0x04,0x45,0x41,0x61,0x77,0xf7,0xd6,0xd7,
+ 0x02,0xff,0xfb,0xbb,0xf3,0x02,0xff,0xbe,0x60,0x02,0x45,0x21,0x29,0xe7,0xfe,0xbb,
+ 0xf3,0x03,0xfb,0xdb,0x02,0xfb,0xdb,0x02,0xfb,0xdb,0xfb,0xf7,0xf6,0xb3,0xd3,0xb7,
+ 0xaf,0x4c,0x4a,0x02,0x49,0x45,0xb1,0xf3,0x02,0xff,0xfa,0x02,0xff,0xfe,0x06,0xff,
+ 0xfb,0xff,0x02,0xfb,0xff,0x02,0xfb,0xff,0xfa,0x02,0xff,0x02,0xfb,0x04,0xff,0xbe,
+ 0x61,0x45,0x65,0x03,0x49,0x41,0x02,0x49,0x21,0x02,0x45,0x21,0x45,0x44,0x21,0x45,
+ 0x44,0x21,0x02,0x41,0x02,0x21,0x41,0x21,0x25,0x24,0x02,0x21,0x20,0x21,0x25,0x24,
+ 0x02,0x21,0x20,0x21,0x41,0x6c,0x49,0x8c,0xbf,0xae,0x51,0x66,0xb9,0xba,0x92,0xb2,
+ 0xb5,0xbb,0xd6,0xb6,0x8d,0xb1,0x94,0xbf,0xb6,0xd5,0xb9,0xbe,0x9e,0x8d,0x9a,0xb6,
+ 0x8d,0x9a,0x96,0x48,0x49,0x48,0x4a,0x49,0x69,0x03,0x49,0x45,0x06,0x49,0x4d,0x08,
+ 0x6d,0x69,0x6c,0x6e,0x6d,0x8d,0x03,0x6d,0x48,0x25,0x45,0x21,0x02,0x25,0x02,0x21,
+ 0x44,0x24,0x21,0x45,0x02,0x21,0x25,0x02,0x21,0x24,0x25,0x21,0x64,0x4a,0x6e,0x8e,
+ 0x65,0x02,0x6d,0x02,0x49,0x2c,0x4a,0x49,0x6d,0x49,0x41,0x68,0xb7,0xf2,0xb6,0x85,
+ 0x03,0xff,0xab,0xf5,0x02,0xff,0xbf,0xc7,0x03,0xff,0xcf,0xb1,0x92,0x02,0xb2,0xab,
+ 0xd6,0x97,0xa3,0x02,0xff,0xf5,0xbb,0xfb,0x02,0xd7,0xfa,0xdb,0xd2,0x95,0x96,0x6e,
+ 0x4d,0x41,0x02,0x49,0x02,0x41,0xc4,0xdf,0xf3,0xfa,0xfb,0x02,0xff,0xda,0xdf,0xff,
+ 0xfb,0xf7,0x77,0x40,0x41,0x45,0x21,0x9f,0xff,0xd5,0xb7,0x02,0xf7,0x03,0xfb,0xd7,
+ 0xfb,0x02,0xf7,0xfb,0xf7,0xfb,0xff,0xd1,0xb7,0xf6,0xd3,0xa6,0x4c,0x46,0x02,0x49,
+ 0x67,0xd6,0xfd,0xff,0xfb,0xfe,0x02,0xff,0xfe,0xfb,0xff,0xfe,0x02,0xfb,0xfe,0xfb,
+ 0xff,0xfe,0x02,0xfb,0xfe,0x02,0xfb,0xfe,0x02,0xfb,0xfe,0x02,0xfb,0x02,0xff,0xa6,
+ 0x4c,0x45,0x03,0x49,0x45,0x44,0x45,0x41,0x24,0x02,0x41,0x24,0x25,0x45,0x24,0x21,
+ 0x41,0x24,0x21,0x45,0x25,0x21,0x45,0x25,0x21,0x02,0x25,0x21,0x41,0x24,0x02,0x21,
+ 0x24,0x02,0x21,0x24,0x21,0x4e,0x44,0x7f,0xfa,0x99,0x69,0x75,0xb7,0xb2,0x95,0xb6,
+ 0x02,0xba,0xb6,0xb5,0x02,0x95,0x93,0xf9,0x9d,0x96,0x95,0xd3,0xb1,0xb9,0x9a,0x8d,
+ 0x95,0xb6,0x8d,0x4a,0x02,0x45,0x4c,0x4d,0x49,0x6d,0x4d,0x45,0x02,0x49,0x4d,0x02,
+ 0x6d,0x45,0x48,0x49,0x4e,0x02,0x6d,0x72,0x02,0x91,0x72,0x6e,0x69,0x71,0x75,0x91,
+ 0x96,0xb6,0x91,0x02,0x6e,0x49,0x41,0x02,0x45,0x21,0x45,0x24,0x25,0x41,0x40,0x21,
+ 0x25,0x24,0x21,0x25,0x20,0x02,0x21,0x20,0x26,0x65,0x49,0x4a,0x02,0x69,0x02,0x49,
+ 0x28,0x25,0x02,0x69,0x6a,0x8d,0x92,0x62,0xfc,0xff,0xd7,0xb3,0xeb,0x03,0xff,0xd3,
+ 0xfe,0xff,0xfa,0xbb,0xf3,0x02,0xff,0xde,0xaf,0x02,0xd2,0xb2,0xb6,0xf3,0xd2,0xb6,
+ 0xf3,0xff,0xfb,0xee,0xdb,0xfb,0xf7,0xd7,0xfb,0xdb,0xae,0xb6,0x75,0x02,0x49,0x03,
+ 0x45,0x41,0x42,0xf9,0xff,0xf7,0x03,0xff,0xfb,0xd6,0xdf,0xfb,0xf7,0xd1,0x4a,0x40,
+ 0x02,0x21,0xe3,0xff,0xfb,0xd6,0xb7,0x02,0xf7,0xd7,0xfb,0xf7,0xd7,0x04,0xfb,0xf7,
+ 0xff,0xf7,0xcd,0xb7,0xd6,0xba,0x81,0x49,0x65,0x45,0x4d,0xaa,0xb6,0xfe,0x03,0xff,
+ 0xfa,0x02,0xff,0xfa,0x02,0xff,0xfb,0x02,0xff,0x02,0xfb,0xff,0xfa,0x02,0xff,0xfa,
+ 0x02,0xff,0x04,0xfb,0xff,0xfb,0x78,0x46,0x69,0x03,0x49,0x45,0x41,0x45,0x44,0x21,
+ 0x02,0x45,0x21,0x44,0x45,0x21,0x45,0x24,0x21,0x45,0x44,0x21,0x25,0x41,0x21,0x25,
+ 0x45,0x21,0x25,0x45,0x02,0x21,0x20,0x21,0x45,0x24,0x21,0x41,0x72,0x92,0xd1,0xbe,
+ 0xb2,0x75,0x6a,0x99,0xba,0xb7,0xde,0xbe,0xb2,0xde,0xbe,0xae,0xde,0x9d,0xbb,0xb2,
+ 0xd0,0xb9,0x96,0x95,0xb7,0xda,0x7e,0x8a,0xb9,0x7a,0x45,0x49,0x69,0x04,0x49,0x69,
+ 0x2c,0x45,0x02,0x6d,0x4e,0x02,0x6d,0x49,0x6d,0x8d,0x6d,0x72,0xb2,0x92,0x96,0x75,
+ 0x69,0x02,0x95,0x92,0xb6,0xb5,0x02,0xb6,0x95,0x02,0x6d,0x4d,0x02,0x41,0x44,0x21,
+ 0x25,0x24,0x25,0x21,0x44,0x02,0x21,0x44,0x02,0x21,0x45,0x02,0x21,0x25,0x21,0x02,
+ 0x25,0x21,0x25,0x45,0x02,0x21,0x44,0x46,0x8d,0xb1,0xb3,0xf6,0x7a,0xcb,0x02,0xff,
+ 0xfe,0xbf,0x03,0xff,0xbd,0x03,0xff,0xcd,0x03,0xff,0xf3,0xb9,0xaf,0xd3,0xf7,0xb2,
+ 0xbb,0xfb,0xb2,0x93,0xd2,0x89,0xde,0xff,0xd3,0xf7,0xfb,0xd7,0xfb,0xbf,0xb3,0xb2,
+ 0x51,0x03,0x49,0x45,0x41,0x44,0x87,0xfe,0xff,0xd7,0x02,0xff,0xfb,0xd3,0xf6,0xff,
+ 0x02,0xfb,0x90,0x21,0x40,0x21,0x7a,0xf7,0xfb,0xd3,0xf6,0xd7,0xf7,0xfb,0xd7,0x02,
+ 0xfb,0xd7,0x02,0xfb,0xf7,0xfb,0x02,0xff,0xcf,0xd1,0xb3,0xda,0x9a,0x41,0x49,0x69,
+ 0x45,0x52,0xf2,0xd7,0x02,0xff,0xfe,0xfb,0xfe,0x03,0xff,0xfb,0xff,0xfe,0xfb,0xff,
+ 0xfe,0xfb,0x02,0xff,0x02,0xfb,0xfe,0x02,0xfb,0xfe,0xfb,0x02,0xff,0xdd,0x8a,0x49,
+ 0x45,0x02,0x49,0x45,0x41,0x44,0x49,0x41,0x44,0x45,0x41,0x24,0x45,0x41,0x24,0x25,
+ 0x41,0x24,0x25,0x21,0x24,0x21,0x41,0x24,0x02,0x21,0x24,0x21,0x41,0x24,0x02,0x21,
+ 0x24,0x02,0x21,0x45,0x21,0xb5,0x95,0x97,0xf6,0x78,0x49,0x90,0xb3,0xad,0xb5,0xd6,
+ 0xda,0xba,0xd2,0xd9,0x79,0xb7,0xb2,0xb5,0x91,0xbf,0xb7,0x8c,0x6d,0xdc,0xbf,0xad,
+ 0x71,0x92,0x69,0x03,0x49,0x69,0x49,0x03,0x4d,0x45,0x48,0x49,0x4e,0x02,0x6d,0x71,
+ 0x6d,0x69,0x71,0x91,0x8d,0x6e,0xb5,0x9a,0x89,0x02,0x91,0x96,0x02,0xb5,0xb6,0xda,
+ 0xd6,0x02,0xb6,0x71,0x69,0x49,0x44,0x21,0x02,0x45,0x41,0x25,0x02,0x21,0x25,0x02,
+ 0x21,0x25,0x21,0x02,0x25,0x02,0x21,0x02,0x25,0x21,0x25,0x03,0x21,0x41,0x21,0x88,
+ 0xcf,0xd6,0xde,0xfb,0xc9,0xdc,0x03,0xff,0xf1,0x03,0xff,0xed,0xfd,0x02,0xff,0xfb,
+ 0xed,0x03,0xff,0xe9,0xb5,0xf7,0xd7,0xd3,0xca,0xdf,0xd7,0x91,0x73,0xfb,0xff,0xd7,
+ 0x03,0xfb,0xff,0x02,0xfb,0xbb,0xb6,0x8a,0x69,0x44,0x49,0x69,0x02,0x45,0x4d,0xeb,
+ 0xfb,0xff,0xf7,0x02,0xff,0xfb,0xcf,0xfa,0xff,0xfb,0xd7,0x54,0x21,0x44,0xa7,0xbb,
+ 0xf7,0xd7,0xaa,0xf6,0xff,0xdb,0x02,0xfb,0xdb,0x08,0xfb,0xca,0xd6,0xd7,0xb6,0x6f,
+ 0x40,0x4e,0x49,0x65,0x77,0xf6,0xf3,0x02,0xff,0xf6,0x02,0xff,0x02,0xfb,0xff,0x02,
+ 0xfb,0xff,0x02,0xfb,0xff,0xfb,0x02,0xff,0xfb,0x02,0xff,0xf7,0x04,0xff,0xb7,0x68,
+ 0x49,0x69,0x02,0x45,0x49,0x48,0x25,0x45,0x24,0x25,0x45,0x44,0x25,0x45,0x40,0x02,
+ 0x45,0x20,0x25,0x45,0x24,0x21,0x45,0x25,0x21,0x45,0x24,0x21,0x25,0x20,0x21,0x25,
+ 0x24,0x02,0x25,0x02,0x41,0x45,0x96,0x8e,0xd0,0xbf,0x8b,0x48,0x6b,0xd6,0x95,0x8e,
+ 0x96,0xd6,0xb5,0xb6,0x95,0x92,0xb6,0x95,0x97,0x92,0x91,0x92,0x95,0x55,0x93,0xd6,
+ 0x58,0x97,0xae,0x50,0x06,0x49,0x4a,0x65,0x48,0x4a,0x04,0x6d,0x02,0x4d,0x02,0x71,
+ 0x72,0x6d,0x6c,0x72,0x6e,0x8d,0x6d,0x91,0xb1,0x96,0xb6,0xb5,0xb7,0xda,0xd9,0xbe,
+ 0x8e,0x8d,0x6d,0x49,0x48,0x21,0x41,0x45,0x21,0x41,0x44,0x21,0x02,0x25,0x21,0x41,
+ 0x24,0x25,0x21,0x44,0x02,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x20,0x6b,0xfa,0xfe,
+ 0xdb,0xff,0xdf,0xcb,0x03,0xff,0xef,0xf0,0x03,0xff,0xcb,0xfe,0x02,0xff,0xd7,0xf7,
+ 0x02,0xff,0xdf,0xaf,0xfa,0xfb,0xd7,0xaf,0xf2,0xdb,0xab,0xed,0x02,0xff,0xde,0x02,
+ 0xfb,0xff,0xfb,0x02,0xff,0xda,0xbb,0x9a,0x66,0x65,0x64,0x4a,0x02,0x69,0x45,0x7e,
+ 0xfb,0xf6,0xdb,0xfb,0xff,0xfb,0xdb,0xaf,0xf3,0xb6,0x92,0x66,0x48,0x46,0x49,0x89,
+ 0x6f,0xb2,0xd2,0xd7,0xf7,0xfb,0xd7,0xf7,0xfb,0xd7,0x02,0xfb,0xd7,0xfb,0xff,0xf7,
+ 0xfb,0xdf,0xaa,0xb6,0xd6,0xb5,0x46,0x44,0x4a,0x69,0x68,0x93,0xfe,0xff,0xfa,0x05,
+ 0xff,0x04,0xfb,0x02,0xff,0xfb,0x04,0xff,0xfe,0xfb,0xff,0xfe,0xfb,0x02,0xff,0xb1,
+ 0x66,0x48,0x03,0x49,0x04,0x45,0x41,0x44,0x45,0x25,0x44,0x45,0x21,0x44,0x45,0x41,
+ 0x40,0x45,0x41,0x44,0x21,0x41,0x40,0x25,0x41,0x24,0x25,0x21,0x20,0x21,0x41,0x44,
+ 0x25,0x45,0x24,0x25,0xba,0xad,0xbe,0xbb,0x70,0x4a,0xd4,0xbe,0x92,0x75,0xae,0xda,
+ 0x9a,0xb2,0xb6,0xb2,0x8c,0x9b,0xb3,0x88,0x9e,0x9a,0xb3,0xad,0x54,0xb3,0xb6,0x75,
+ 0x02,0x91,0x4d,0x49,0x02,0x4d,0x03,0x49,0x45,0x49,0x02,0x69,0x6e,0x03,0x6d,0x4d,
+ 0x6d,0x72,0x71,0x02,0x6d,0x91,0x8d,0x6e,0xb1,0xb2,0xb6,0x95,0x91,0xb6,0xb9,0xd6,
+ 0xde,0xda,0x91,0x96,0x92,0x6d,0x69,0x49,0x40,0x21,0x45,0x41,0x21,0x25,0x02,0x41,
+ 0x25,0x02,0x21,0x25,0x21,0x02,0x25,0x02,0x21,0x25,0x20,0x21,0x45,0x20,0x21,0xb0,
+ 0xff,0xfb,0x03,0xff,0x9f,0xeb,0x03,0xff,0xd7,0x03,0xff,0xbf,0xf3,0x02,0xff,0xb8,
+ 0xbf,0x02,0xff,0xfe,0x7f,0xef,0xf7,0xfb,0xd6,0xb7,0xf7,0xd6,0xb3,0xfe,0xff,0xef,
+ 0xfa,0x02,0xfb,0xff,0xfb,0x02,0xff,0x02,0xd6,0x72,0x69,0x4a,0x69,0x65,0x6e,0x4a,
+ 0x82,0xdf,0xff,0xf3,0xd7,0xfb,0x02,0xf7,0xd7,0xae,0xb7,0xb6,0xb2,0x8a,0x6a,0x61,
+ 0x77,0xf6,0xf7,0xdb,0xfb,0xf7,0xd7,0xfb,0xf7,0xd7,0xfb,0xf7,0xd7,0xfb,0xf7,0xd7,
+ 0xfb,0xf7,0xd7,0xb7,0xaf,0xb7,0xd7,0x70,0x4a,0x69,0x65,0x69,0xb0,0xf3,0x02,0xff,
+ 0xf7,0xfb,0xff,0xfb,0x02,0xff,0xfb,0x02,0xff,0xfb,0x05,0xff,0xfb,0x02,0xff,0x02,
+ 0xfb,0xff,0xfb,0xfa,0x77,0x65,0x45,0x02,0x49,0x02,0x45,0x44,0x02,0x45,0x40,0x49,
+ 0x25,0x20,0x02,0x25,0x20,0x02,0x45,0x20,0x21,0x45,0x24,0x21,0x45,0x20,0x21,0x45,
+ 0x20,0x25,0x45,0x20,0x21,0x25,0x02,0x41,0x02,0x45,0x41,0x45,0x02,0xb6,0xd5,0xb5,
+ 0x8e,0x8c,0x9f,0xb3,0x90,0x97,0xba,0x99,0x96,0xd6,0xb5,0xb1,0x92,0xd2,0x8c,0x7d,
+ 0xbb,0x85,0xb5,0x55,0x6f,0xd5,0x59,0x49,0x75,0x71,0x69,0x02,0x6d,0x04,0x49,0x02,
+ 0x69,0x4e,0x02,0x69,0x03,0x6d,0x4d,0x02,0x71,0x69,0x02,0x91,0x6d,0x91,0xb1,0x96,
+ 0xba,0xb5,0xb6,0xba,0x99,0x92,0xbd,0xda,0xb1,0xb6,0xd6,0xb6,0x8e,0x6d,0x69,0x45,
+ 0x44,0x25,0x41,0x24,0x21,0x41,0x24,0x21,0x41,0x20,0x21,0x25,0x24,0x21,0x45,0x24,
+ 0x02,0x21,0x44,0x21,0x41,0x40,0x6f,0xfe,0x04,0xff,0xf1,0xdf,0x03,0xff,0xbd,0x03,
+ 0xff,0xf4,0x7a,0xf3,0xff,0xef,0xec,0x03,0xff,0xf2,0xdb,0x02,0xf7,0xf3,0xd5,0xdb,
+ 0xf7,0xdb,0xaf,0xef,0xd1,0xdf,0x06,0xff,0xdb,0xfb,0xb4,0x6e,0x6d,0x4a,0x02,0x6d,
+ 0x02,0x6a,0xe6,0xff,0xf3,0xf2,0x02,0xfb,0xff,0xfb,0x03,0xff,0xfb,0xda,0x02,0xae,
+ 0xce,0xbb,0x02,0xfb,0xdb,0xf7,0xfb,0x02,0xd7,0xdb,0xb3,0xd3,0xd6,0xaf,0xd3,0xd6,
+ 0xaf,0xd3,0xd6,0xb3,0x02,0xb2,0xb3,0xce,0x51,0x46,0x65,0x69,0x62,0xfd,0xff,0xf7,
+ 0x03,0xfb,0x07,0xff,0xfe,0x02,0xff,0xfe,0x02,0xff,0xfa,0xfb,0x04,0xff,0xde,0x89,
+ 0x49,0x03,0x45,0x49,0x03,0x45,0x40,0x21,0x45,0x02,0x21,0x45,0x02,0x21,0x41,0x40,
+ 0x25,0x02,0x45,0x21,0x40,0x25,0x21,0x40,0x45,0x21,0x40,0x02,0x21,0x24,0x21,0x45,
+ 0x44,0x45,0x41,0x45,0x21,0xb6,0xb1,0xbf,0xde,0x94,0x6e,0xd5,0xb5,0xb6,0xd9,0xbe,
+ 0x02,0xb6,0x92,0xbf,0xdb,0xb1,0xba,0x76,0x8e,0x8d,0x70,0x71,0x69,0xac,0x75,0x02,
+ 0x69,0x49,0x02,0x4d,0x02,0x69,0x05,0x49,0x02,0x4d,0x02,0x49,0x69,0x49,0x02,0x4d,
+ 0x49,0x02,0x6d,0x8e,0x8d,0x02,0x91,0x96,0xb6,0x91,0xb6,0xda,0x03,0xb6,0x95,0x92,
+ 0xd9,0x02,0xda,0xb9,0xb6,0x8e,0x71,0x69,0x45,0x24,0x02,0x41,0x44,0x02,0x21,0x25,
+ 0x02,0x21,0x25,0x02,0x21,0x45,0x41,0x21,0x25,0x02,0x21,0x25,0x20,0x21,0xac,0xfb,
+ 0x04,0xff,0xdf,0xe6,0x03,0xff,0xf2,0xdd,0x03,0xff,0xf7,0x02,0xff,0xfe,0xef,0xfd,
+ 0x03,0xff,0xe6,0x02,0xff,0xf7,0xcf,0xf6,0xff,0xfb,0x73,0x40,0x37,0xf7,0x07,0xff,
+ 0xdf,0xf7,0x8c,0x69,0x6d,0x02,0x6a,0x6d,0x69,0x57,0xf7,0xfb,0xcf,0xfa,0xff,0xfb,
+ 0xff,0x02,0xfb,0xff,0xfb,0x02,0xff,0xfb,0xdb,0xfb,0xd7,0x02,0xdb,0xd7,0xbb,0xb7,
+ 0xaf,0x02,0xb7,0xcf,0xce,0xb5,0xb7,0xab,0xf2,0xb1,0x9b,0xb7,0xaa,0xb2,0x92,0xb3,
+ 0x85,0x49,0x02,0x65,0x6c,0xeb,0xfe,0xff,0xfb,0x08,0xff,0xfb,0x02,0xff,0x02,0xfb,
+ 0xff,0x02,0xfb,0xfe,0x04,0xff,0xee,0x72,0x45,0x02,0x49,0x03,0x45,0x41,0x45,0x25,
+ 0x02,0x41,0x25,0x41,0x45,0x25,0x21,0x41,0x45,0x20,0x02,0x45,0x20,0x25,0x45,0x20,
+ 0x25,0x45,0x20,0x21,0x45,0x20,0x21,0x25,0x02,0x41,0x03,0x45,0x25,0x91,0x92,0xcd,
+ 0xbe,0x6b,0x84,0x9f,0xfb,0xb9,0x96,0xba,0xda,0xb1,0xbd,0xbe,0xba,0x96,0x91,0x8d,
+ 0x71,0x91,0x02,0x6d,0x4c,0x4e,0x6d,0x69,0x45,0x02,0x4d,0x45,0x49,0x48,0x03,0x49,
+ 0x44,0x25,0x45,0x03,0x49,0x4a,0x02,0x6d,0x4d,0x6d,0x8d,0x92,0x02,0x91,0x92,0x95,
+ 0x91,0x96,0xb6,0xb1,0xbb,0xda,0xb5,0x03,0x91,0x97,0x02,0xde,0x02,0xba,0x95,0x92,
+ 0x8e,0x4d,0x41,0x21,0x40,0x21,0x41,0x20,0x21,0x41,0x44,0x25,0x21,0x20,0x25,0x02,
+ 0x45,0x21,0x25,0x44,0x02,0x45,0x28,0x43,0xfd,0xff,0xae,0xb2,0xd2,0x88,0xbd,0x04,
+ 0xff,0xe1,0xfd,0x06,0xff,0xbe,0xd7,0x03,0xff,0xd3,0xef,0x03,0xff,0xd3,0x02,0xff,
+ 0xd9,0x26,0x80,0xbf,0xfb,0x06,0xff,0xfa,0xff,0xcf,0x89,0x6a,0x02,0x8d,0x6e,0x02,
+ 0x6d,0xbf,0xf7,0xfa,0xcf,0xf7,0xfb,0x06,0xf7,0x02,0xd7,0xf7,0x02,0xd7,0xba,0xbb,
+ 0xcf,0xcd,0xbf,0xb3,0xf3,0xaa,0xfa,0xbf,0x87,0xee,0x95,0x97,0x8b,0xaa,0x8d,0x4a,
+ 0x69,0x46,0x69,0x4d,0x02,0x49,0x69,0x41,0xb5,0xf7,0xfe,0xff,0xfa,0x09,0xff,0xfb,
+ 0xff,0x02,0xfb,0x06,0xff,0xfb,0xbe,0x61,0x02,0x49,0x02,0x45,0x49,0x41,0x02,0x45,
+ 0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x25,0x45,0x21,0x25,0x45,0x20,0x21,0x45,0x40,
+ 0x21,0x41,0x02,0x21,0x45,0x02,0x21,0x45,0x21,0x45,0x49,0x03,0x45,0x40,0x96,0x8d,
+ 0xba,0xb6,0x4c,0x36,0xf6,0xbe,0xb6,0xd9,0xbe,0xb6,0xd5,0xb9,0x96,0x75,0x6d,0x9e,
+ 0x76,0x69,0x6d,0x4d,0x6a,0x91,0x51,0x49,0x4d,0x69,0x49,0x45,0x48,0x02,0x45,0x48,
+ 0x02,0x45,0x49,0x41,0x45,0x69,0x49,0x02,0x6d,0x6e,0x69,0x03,0x6d,0x04,0x71,0x91,
+ 0x95,0xb5,0x96,0xb6,0xb9,0xba,0xb2,0x95,0xb6,0x02,0xba,0x8d,0xbe,0xde,0xb5,0xb6,
+ 0x95,0x8d,0x89,0x49,0x41,0x21,0x45,0x21,0x25,0x45,0x41,0x21,0x44,0x02,0x21,0x45,
+ 0x41,0x69,0x29,0x41,0x45,0x49,0x02,0x45,0x4c,0xd3,0xf2,0x75,0x8e,0xae,0x6e,0xe3,
+ 0x04,0xff,0x7f,0xf3,0x06,0xff,0xfb,0xde,0x03,0xff,0xca,0xdf,0xff,0xf7,0xfb,0xff,
+ 0xfb,0xff,0xfb,0x64,0x53,0xf6,0x03,0xff,0xfb,0x02,0xff,0xfb,0xf7,0xfe,0xff,0xa6,
+ 0x8d,0x6a,0x6e,0x8d,0x6e,0x6a,0xd0,0xff,0xf7,0xfb,0x02,0xf3,0xfa,0xfb,0xd3,0xfa,
+ 0xda,0xbf,0xfb,0xcb,0xfb,0xbb,0xd3,0xce,0xf6,0xbe,0x77,0xd3,0x89,0x96,0x52,0x66,
+ 0x85,0x49,0x6a,0x65,0x49,0x45,0x02,0x49,0x02,0x45,0x49,0x46,0x45,0x02,0x49,0x65,
+ 0x6c,0xaf,0xfe,0xff,0xfb,0x02,0xff,0xfb,0x02,0xff,0xfb,0x02,0xff,0xfb,0x02,0xff,
+ 0x02,0xfb,0xff,0xfb,0x02,0xff,0xfb,0x02,0xff,0xfe,0xaa,0x4d,0x41,0x45,0x69,0x02,
+ 0x45,0x24,0x45,0x41,0x44,0x02,0x45,0x25,0x02,0x21,0x24,0x21,0x41,0x24,0x21,0x41,
+ 0x25,0x21,0x41,0x25,0x21,0x45,0x25,0x21,0x45,0x29,0x21,0x41,0x25,0x41,0x45,0x29,
+ 0x02,0x45,0x25,0x92,0x95,0xb2,0xb1,0x4d,0xc5,0xbf,0xdb,0xb5,0xbf,0x93,0xc9,0x02,
+ 0xb6,0x75,0x73,0xb2,0x02,0x91,0x4d,0x6d,0x69,0x75,0x96,0x65,0x04,0x49,0x48,0x25,
+ 0x45,0x24,0x25,0x45,0x44,0x49,0x25,0x40,0x45,0x49,0x6d,0x6a,0x02,0x6d,0x72,0x02,
+ 0x92,0x6d,0x71,0x75,0x6d,0x71,0x91,0x96,0x02,0x95,0x02,0x96,0xb1,0xba,0xb6,0x95,
+ 0x97,0xd6,0xb5,0xba,0xda,0xb5,0xb1,0x91,0x71,0x65,0x45,0x40,0x21,0x41,0x44,0x21,
+ 0x45,0x24,0x21,0x41,0x40,0x25,0x49,0x02,0x69,0x49,0x02,0x69,0x02,0x49,0x41,0x98,
+ 0xbf,0x85,0x89,0x69,0x61,0xfd,0x04,0xff,0xfc,0x9e,0x05,0xff,0xfb,0xba,0xaf,0xfa,
+ 0xda,0xb6,0x92,0xef,0x02,0xff,0xfb,0xf6,0x02,0xff,0x02,0xfb,0xf7,0x09,0xff,0xfb,
+ 0xff,0xbd,0x8a,0x6d,0x8d,0x6e,0x8e,0x8d,0x66,0xfd,0xff,0xf7,0xfb,0xff,0xb3,0xf7,
+ 0xda,0xbf,0xb3,0xef,0xa9,0x92,0x93,0x62,0x69,0x6d,0x4a,0x46,0x45,0x02,0x4a,0x07,
+ 0x49,0x45,0x49,0x69,0x05,0x45,0x49,0x45,0x69,0x49,0x46,0xd9,0xff,0x04,0xfb,0xff,
+ 0xfe,0x02,0xff,0xfe,0x02,0xff,0xfe,0x02,0xff,0xfa,0x02,0xff,0x02,0xfb,0xff,0xfb,
+ 0xff,0xfb,0x79,0x41,0x65,0x02,0x45,0x02,0x49,0x21,0x02,0x45,0x21,0x02,0x45,0x02,
+ 0x21,0x25,0x21,0x45,0x24,0x21,0x25,0x45,0x02,0x21,0x45,0x41,0x25,0x45,0x21,0x41,
+ 0x44,0x02,0x21,0x24,0x21,0x05,0x45,0x40,0x91,0x8e,0x9a,0x76,0x60,0x9a,0xfa,0xdb,
+ 0xfa,0xba,0x8d,0xb6,0xd5,0xba,0xb2,0x91,0x96,0x6e,0x6d,0x6e,0x91,0x71,0x69,0x6d,
+ 0x4d,0x45,0x03,0x49,0x45,0x48,0x49,0x25,0x44,0x21,0x45,0x48,0x25,0x49,0x48,0x45,
+ 0x49,0x8d,0x71,0x6e,0x8d,0x91,0x72,0x91,0x92,0x96,0x02,0x95,0x92,0x71,0x72,0x9a,
+ 0x96,0x8a,0x02,0xba,0xb2,0xb6,0x95,0xb7,0xda,0x99,0x02,0xb6,0x95,0x91,0x6e,0x6d,
+ 0x49,0x41,0x44,0x45,0x21,0x44,0x21,0x25,0x24,0x02,0x21,0x44,0x46,0x72,0x92,0x69,
+ 0x02,0x6d,0x65,0x6d,0xad,0xaf,0xce,0x91,0x8e,0xba,0xda,0xd3,0x04,0xff,0xbf,0xad,
+ 0x9a,0xba,0xb3,0xb2,0xb1,0x92,0x8e,0xb1,0xbb,0xae,0x8d,0x82,0xde,0xff,0xfb,0x02,
+ 0xff,0xf7,0x02,0xff,0xfb,0x02,0xff,0xfb,0x08,0xff,0xf7,0xf6,0x9e,0x8d,0x6e,0x8d,
+ 0x02,0x6e,0x71,0x93,0xb6,0x96,0x8e,0x6a,0x8d,0x6e,0x46,0x69,0x45,0x49,0x69,0x02,
+ 0x45,0x49,0x46,0x45,0x49,0x46,0x45,0x04,0x49,0x45,0x02,0x49,0x02,0x45,0x49,0x02,
+ 0x45,0x49,0x45,0x02,0x49,0x41,0x45,0x49,0x02,0x45,0x8c,0xd3,0xfa,0xfe,0xf7,0xfb,
+ 0xfe,0xfb,0xff,0xfe,0x02,0xff,0xfe,0xfb,0x02,0xff,0xfb,0x02,0xff,0xfb,0xff,0xfe,
+ 0xfb,0x02,0xff,0xd9,0x86,0x48,0x45,0x02,0x49,0x45,0x41,0x02,0x45,0x21,0x02,0x45,
+ 0x41,0x24,0x02,0x41,0x24,0x21,0x41,0x24,0x21,0x41,0x24,0x21,0x41,0x24,0x02,0x21,
+ 0x24,0x21,0x41,0x24,0x02,0x21,0x24,0x45,0x41,0x44,0x45,0x41,0x24,0x69,0x91,0x92,
+ 0x89,0x4d,0xca,0xde,0xdb,0xf2,0xfe,0x9a,0xb1,0xbf,0xda,0x99,0x8e,0xb1,0x95,0x8e,
+ 0x02,0x6d,0x69,0x02,0x6d,0x4a,0x8d,0x4c,0x45,0x02,0x49,0x25,0x45,0x44,0x21,0x02,
+ 0x45,0x21,0x02,0x45,0x25,0x49,0x65,0x02,0x6d,0x89,0x96,0x72,0x8d,0x92,0x95,0x91,
+ 0x92,0x95,0x02,0x96,0x76,0x71,0x72,0xb9,0xba,0xb6,0xba,0x02,0xb6,0xb9,0xd6,0xda,
+ 0x96,0x91,0x02,0x96,0x91,0x8d,0x6d,0x4d,0x41,0x45,0x41,0x25,0x45,0x44,0x25,0x45,
+ 0x20,0x25,0x69,0x89,0x9b,0xb3,0xce,0xda,0xfe,0xfa,0x08,0xff,0xfb,0xff,0xbf,0xf6,
+ 0xda,0x76,0xae,0x92,0xb5,0xb2,0x92,0x91,0x8d,0xbf,0xfb,0xf6,0x02,0xff,0xf7,0x02,
+ 0xff,0xfb,0xff,0xfb,0xf3,0x05,0xff,0xf6,0x02,0xff,0xfb,0x03,0xff,0xfb,0x02,0xff,
+ 0xed,0x92,0x8d,0x72,0x92,0x70,0x9f,0xd3,0x4c,0x2e,0x02,0x69,0x49,0x69,0x49,0x4a,
+ 0x49,0x69,0x02,0x49,0x65,0x02,0x49,0x02,0x45,0x04,0x49,0x02,0x45,0x02,0x49,0x45,
+ 0x02,0x49,0x45,0x69,0x48,0x4a,0x03,0x45,0x49,0x69,0x03,0x45,0x6f,0xfa,0xff,0xfb,
+ 0x07,0xff,0xfb,0x02,0xff,0x02,0xfb,0xff,0xfb,0x03,0xff,0xfb,0xff,0xfb,0xff,0xd3,
+ 0x6c,0x45,0x49,0x04,0x45,0x02,0x41,0x40,0x21,0x45,0x24,0x25,0x45,0x20,0x21,0x41,
+ 0x24,0x21,0x45,0x25,0x21,0x45,0x25,0x02,0x21,0x20,0x02,0x21,0x20,0x21,0x25,0x02,
+ 0x41,0x04,0x45,0x40,0x21,0x6c,0x6e,0x92,0x71,0x61,0x9e,0xbb,0x8d,0x02,0xbe,0xb1,
+ 0xba,0xf9,0xff,0xfb,0xba,0x02,0x8e,0x8d,0x6d,0x72,0x92,0x69,0x49,0x69,0x4d,0x02,
+ 0x49,0x44,0x25,0x45,0x21,0x45,0x29,0x21,0x45,0x48,0x02,0x45,0x49,0x4a,0x04,0x6d,
+ 0x8d,0x92,0x96,0x95,0x92,0x96,0xb5,0x91,0x96,0xb5,0x91,0x76,0xb6,0xba,0xbe,0xb9,
+ 0x02,0xb6,0xb5,0xb6,0xba,0xda,0xb9,0x96,0xb1,0x92,0xb2,0x95,0x6d,0x69,0x29,0x21,
+ 0x45,0x24,0x02,0x25,0x24,0x02,0x21,0x44,0x4a,0x6e,0xee,0xb5,0xbf,0xff,0xfb,0x0b,
+ 0xff,0xdd,0xbf,0xba,0x8d,0x02,0x96,0x8e,0xb2,0x91,0x61,0xbf,0x0f,0xff,0xfe,0xff,
+ 0xf7,0x02,0xfb,0x02,0xff,0xfb,0x02,0xff,0xf7,0x02,0xff,0xad,0x8e,0x8d,0x72,0x7a,
+ 0xf7,0xb8,0x46,0x65,0x6a,0x69,0x49,0x46,0x65,0x69,0x49,0x69,0x49,0x45,0x02,0x49,
+ 0x02,0x45,0x49,0x02,0x45,0x04,0x49,0x45,0x02,0x49,0x45,0x03,0x49,0x45,0x69,0x49,
+ 0x45,0x49,0x41,0x49,0x6d,0x02,0x45,0xc9,0xdf,0x02,0xff,0xfb,0x02,0xff,0x02,0xfb,
+ 0xff,0xfb,0xff,0xfe,0xfb,0x02,0xff,0xfb,0x02,0xff,0xfb,0xff,0xfe,0xfb,0x02,0xff,
+ 0xb9,0x46,0x65,0x02,0x45,0x44,0x45,0x41,0x44,0x21,0x41,0x44,0x21,0x41,0x44,0x25,
+ 0x21,0x44,0x25,0x21,0x24,0x02,0x21,0x24,0x02,0x21,0x24,0x21,0x41,0x24,0x21,0x45,
+ 0x49,0x02,0x41,0x45,0x02,0x41,0x45,0x02,0x41,0x28,0x72,0x02,0x91,0x69,0x4d,0xab,
+ 0xb6,0x9a,0xb6,0xb2,0xd9,0xb5,0xb7,0xfe,0xde,0xd1,0x75,0x92,0x96,0xb2,0x02,0x8d,
+ 0x4d,0x69,0x6d,0x4d,0x48,0x02,0x49,0x45,0x25,0x45,0x40,0x25,0x45,0x20,0x25,0x49,
+ 0x69,0x02,0x49,0x69,0x72,0x6e,0x69,0x72,0xb5,0xb6,0xb2,0xb5,0xb1,0xba,0xb6,0x95,
+ 0x8d,0xb9,0x02,0xbe,0xba,0xb5,0xbf,0xba,0xb5,0x02,0xb6,0xb1,0x92,0x95,0x91,0x92,
+ 0x95,0x96,0x91,0x71,0x6d,0x02,0x45,0x20,0x21,0x45,0x24,0x21,0x45,0x20,0x25,0x02,
+ 0x69,0x9b,0xf7,0xf2,0x0d,0xff,0x77,0x6c,0x7b,0xfe,0xff,0xfb,0xfe,0xff,0xe4,0xd9,
+ 0xf7,0x06,0xff,0xfb,0x04,0xff,0xfb,0x03,0xff,0xef,0xfd,0xff,0xdb,0x07,0xff,0xf7,
+ 0xff,0xbf,0x91,0x6e,0x8d,0xeb,0xfd,0x4f,0x61,0x45,0x02,0x69,0x45,0x69,0x02,0x49,
+ 0x69,0x48,0x02,0x49,0x45,0x02,0x49,0x02,0x45,0x02,0x49,0x45,0x02,0x49,0x45,0x49,
+ 0x02,0x45,0x49,0x02,0x45,0x04,0x49,0x03,0x45,0x81,0x9a,0x8f,0x40,0x7f,0x03,0xfb,
+ 0xff,0x02,0xfb,0xff,0xfb,0x02,0xff,0xfb,0x02,0xff,0xfb,0x02,0xff,0xfb,0x02,0xff,
+ 0xf7,0xfb,0xff,0x02,0xfb,0x93,0x64,0x45,0x49,0x03,0x45,0x24,0x25,0x45,0x40,0x21,
+ 0x41,0x20,0x21,0x45,0x20,0x21,0x45,0x24,0x21,0x41,0x45,0x21,0x25,0x41,0x45,0x25,
+ 0x04,0x45,0x21,0x03,0x45,0x49,0x03,0x45,0x24,0x23,0x04,0x71,0x6a,0xb5,0xd6,0xb7,
+ 0xfa,0xd9,0x02,0xb6,0xf5,0xff,0xfb,0x78,0x92,0xb6,0xb5,0x91,0x72,0x71,0x6a,0x8d,
+ 0x4d,0x46,0x45,0x44,0x49,0x45,0x44,0x02,0x45,0x44,0x25,0x45,0x48,0x45,0x4d,0x02,
+ 0x6d,0x02,0x69,0x6a,0x91,0x71,0x8f,0xb6,0xb9,0xb6,0x02,0xba,0x91,0x95,0xf5,0xde,
+ 0xba,0xb9,0xb6,0xba,0x99,0x97,0xd6,0xb9,0x03,0x95,0x92,0xba,0x95,0x8d,0x02,0x95,
+ 0x03,0x6d,0x45,0x21,0x44,0x21,0x25,0x45,0x21,0x41,0x44,0x4a,0x69,0xe9,0xdf,0xd7,
+ 0xfb,0xff,0xfb,0x0a,0xff,0xcc,0x56,0xf2,0x02,0xff,0xfe,0x03,0xff,0xf7,0xfb,0x07,
+ 0xff,0xf7,0x03,0xff,0xfb,0xfe,0x02,0xff,0xbf,0x89,0x6e,0xee,0x09,0xff,0xfd,0x97,
+ 0x71,0x6b,0xfd,0x7f,0x60,0x49,0x69,0x45,0x69,0x49,0x46,0x45,0x69,0x02,0x45,0x65,
+ 0x02,0x45,0x69,0x02,0x45,0x49,0x4a,0x45,0x48,0x49,0x45,0x49,0x02,0x45,0x49,0x02,
+ 0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x41,0x45,0xe9,0xbd,0x47,0xe5,0x03,0xff,
+ 0x02,0xfb,0xfe,0xfb,0x02,0xff,0xfb,0xff,0xfe,0xfb,0x02,0xff,0xfb,0x02,0xff,0x02,
+ 0xfb,0xfa,0xfb,0x02,0xff,0x88,0x45,0x44,0x4a,0x45,0x44,0x45,0x41,0x45,0x02,0x21,
+ 0x44,0x21,0x25,0x45,0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x02,0x45,0x21,0x41,0x44,
+ 0x45,0x41,0x44,0x03,0x45,0x41,0x02,0x45,0x41,0x45,0x49,0x02,0x41,0xe0,0x92,0x71,
+ 0x6d,0x69,0x6d,0x8a,0x02,0xb6,0xb1,0xb6,0xda,0xb1,0xde,0xfe,0xbd,0x92,0xd9,0x99,
+ 0x96,0x92,0x8e,0xb6,0x72,0x89,0x8d,0x6d,0x48,0x04,0x45,0x49,0x45,0x02,0x49,0x02,
+ 0x45,0x49,0x45,0x6d,0x71,0x4c,0x4e,0xb1,0x71,0x76,0x95,0x91,0xbe,0xde,0xb9,0xb1,
+ 0x75,0xd3,0xfe,0xbe,0x95,0x96,0xb5,0x02,0xb6,0x75,0x8e,0xb6,0x96,0x91,0x96,0xb5,
+ 0x95,0x96,0x95,0x8d,0x92,0x71,0x6d,0x69,0x49,0x45,0x21,0x45,0x41,0x21,0x45,0x20,
+ 0x25,0x65,0x66,0x77,0xf7,0xfa,0x0e,0xff,0xf3,0x06,0xff,0xd3,0xfe,0xff,0xdf,0x07,
+ 0xff,0xfb,0x06,0xff,0xfe,0x37,0x40,0x7f,0xff,0xfb,0x02,0xff,0xfb,0x05,0xff,0x9c,
+ 0x6e,0xb8,0xdf,0xa5,0x4c,0x65,0x69,0x49,0x65,0x45,0x49,0x02,0x45,0x69,0x49,0x45,
+ 0x69,0x45,0x02,0x49,0x02,0x45,0x49,0x45,0x02,0x49,0x02,0x45,0x49,0x02,0x45,0x69,
+ 0x49,0x45,0x69,0x48,0x02,0x49,0x03,0x45,0x41,0x4e,0x8b,0x81,0xbf,0xff,0xfa,0x03,
+ 0xff,0xfb,0x02,0xff,0xfb,0xff,0x02,0xfb,0xff,0xfb,0x02,0xff,0x02,0xfb,0xff,0xfb,
+ 0x03,0xff,0xf1,0x4e,0x41,0x45,0x49,0x03,0x45,0x40,0x21,0x45,0x41,0x03,0x45,0x21,
+ 0x02,0x45,0x41,0x45,0x02,0x41,0x02,0x45,0x41,0x44,0x45,0x41,0x45,0x02,0x41,0x45,
+ 0x02,0x41,0x45,0x25,0x21,0x45,0x40,0x02,0x45,0x20,0x5f,0x95,0x02,0x8e,0x6d,0x65,
+ 0xb5,0xba,0xb2,0xba,0xb9,0xb6,0xba,0xda,0xb6,0xbe,0xda,0xb5,0xb6,0xb5,0x99,0x72,
+ 0xad,0x91,0x92,0x91,0x6d,0x69,0x48,0x49,0x4d,0x8e,0x69,0x45,0x44,0x02,0x49,0x48,
+ 0x25,0x51,0xae,0x6d,0x75,0x96,0x6d,0x02,0x95,0x92,0x02,0x95,0x9b,0xb6,0x74,0x9b,
+ 0xfe,0x9d,0x91,0x95,0xb1,0x96,0xb6,0x95,0x91,0x71,0x91,0x8e,0xb5,0x95,0x02,0x96,
+ 0x95,0x91,0x71,0x91,0x69,0x02,0x6d,0x49,0x41,0x44,0x02,0x21,0x41,0x02,0x21,0x40,
+ 0x46,0x69,0x8d,0xdf,0xf3,0xfa,0x0c,0xff,0xfe,0x02,0xff,0x02,0xfb,0xf6,0x0c,0xff,
+ 0xfb,0x08,0xff,0xb4,0x01,0x06,0xe1,0x08,0xff,0xfe,0xff,0xef,0x90,0xbf,0xcf,0x4c,
+ 0x45,0x02,0x6d,0x45,0x02,0x49,0x45,0x65,0x68,0x49,0x45,0x69,0x45,0x02,0x49,0x02,
+ 0x45,0x49,0x46,0x65,0x49,0x02,0x45,0x49,0x45,0x02,0x49,0x02,0x45,0x49,0x02,0x45,
+ 0x69,0x02,0x45,0x49,0x41,0x45,0x49,0x41,0x75,0xf7,0xfe,0xff,0xfe,0x02,0xff,0xfe,
+ 0x03,0xff,0xfb,0x02,0xff,0x02,0xfb,0x03,0xff,0xfe,0xfb,0xff,0xfa,0x02,0xff,0x9e,
+ 0x61,0x45,0x44,0x02,0x45,0x44,0x03,0x45,0x02,0x41,0x44,0x21,0x41,0x44,0x45,0x41,
+ 0x44,0x03,0x45,0x21,0x41,0x44,0x21,0x02,0x45,0x21,0x41,0x44,0x21,0x41,0x44,0x02,
+ 0x41,0x44,0x41,0x02,0x45,0x02,0x21,0xe2,0xb7,0xda,0x99,0x8d,0x91,0xaf,0xd6,0xb6,
+ 0xb2,0xb6,0xba,0xb6,0xd6,0xb9,0xb6,0xd6,0x99,0xb2,0xdf,0xff,0x94,0x02,0x96,0x8d,
+ 0x96,0xb2,0x70,0x45,0x02,0x69,0x72,0x91,0x4c,0x45,0x48,0x49,0x45,0x48,0x45,0x7a,
+ 0x96,0x02,0x6d,0x70,0x96,0x69,0x6c,0x72,0x8d,0x71,0x8e,0xbe,0xde,0x98,0x96,0x95,
+ 0x91,0x9a,0xb6,0x95,0x8e,0x91,0x71,0x72,0x02,0x95,0x92,0x02,0x91,0x92,0x91,0x71,
+ 0x8d,0x6d,0x69,0x6d,0x4d,0x45,0x41,0x45,0x02,0x41,0x45,0x20,0x25,0x45,0x66,0x6e,
+ 0xf5,0xff,0xfb,0x05,0xff,0xf7,0x07,0xff,0xfe,0xf6,0xfd,0x03,0xff,0xf7,0x02,0xff,
+ 0xfb,0xf7,0xfe,0x06,0xff,0xf3,0x07,0xff,0xdf,0xce,0xbf,0x02,0xff,0xf7,0xfe,0x04,
+ 0xff,0xfb,0xfe,0xff,0xb3,0xf6,0x94,0x4a,0x69,0x65,0x6d,0x4d,0x65,0x69,0x03,0x49,
+ 0x69,0x45,0x49,0x69,0x45,0x02,0x49,0x45,0x41,0x69,0x49,0x45,0x69,0x03,0x49,0x45,
+ 0x02,0x49,0x02,0x45,0x02,0x49,0x45,0x49,0x02,0x45,0x49,0x41,0x65,0x29,0xa3,0xfe,
+ 0xff,0xf7,0x08,0xff,0xfb,0x02,0xff,0xfb,0x02,0xff,0xfb,0x02,0xff,0xf7,0xfb,0xfe,
+ 0xff,0xc5,0x4d,0x41,0x45,0x49,0x45,0x41,0x45,0x41,0x03,0x45,0x41,0x45,0x02,0x41,
+ 0x03,0x45,0x25,0x45,0x41,0x44,0x45,0x41,0x45,0x41,0x45,0x25,0x02,0x41,0x45,0x41,
+ 0x21,0x45,0x41,0x21,0x45,0x02,0x41,0x21,0x82,0xff,0xba,0xbe,0x96,0x95,0x6e,0x02,
+ 0xb5,0xb7,0xf6,0xb5,0x8e,0xb9,0xba,0xb6,0xda,0xb9,0xb5,0xdd,0xdf,0xda,0xb2,0xac,
+ 0xbe,0x8e,0xa9,0xba,0x6e,0x88,0x72,0x8e,0x02,0x6d,0x49,0x48,0x4a,0x49,0x28,0x45,
+ 0x02,0x6d,0x72,0x8e,0xad,0x95,0x4e,0x4d,0x4a,0x02,0x6d,0x71,0x75,0xb5,0xbf,0xb6,
+ 0x70,0x72,0x95,0xb5,0xba,0x96,0x71,0x6e,0x95,0x75,0x72,0x95,0x91,0x8d,0x91,0x8d,
+ 0x72,0x6e,0x04,0x6d,0x49,0x65,0x48,0x21,0x41,0x24,0x25,0x21,0x24,0x26,0x69,0x8d,
+ 0x93,0xff,0xfe,0x04,0xff,0x03,0xfb,0x06,0xff,0xf3,0xed,0xd3,0x08,0xff,0x02,0xfb,
+ 0xda,0xb7,0xd3,0xd2,0xa3,0xfa,0x07,0xff,0xdb,0xb3,0x92,0x6e,0x8e,0xa9,0xb7,0x02,
+ 0xff,0xfb,0x02,0xff,0xfb,0xff,0xde,0xb5,0x4e,0x69,0x4a,0x69,0x49,0x4a,0x69,0x49,
+ 0x4a,0x07,0x49,0x69,0x45,0x02,0x49,0x45,0x65,0x48,0x4a,0x45,0x04,0x49,0x02,0x45,
+ 0x44,0x05,0x45,0x49,0x45,0x69,0x49,0x41,0xbc,0xff,0xfb,0xff,0xfe,0xfb,0x02,0xff,
+ 0xfb,0x04,0xff,0xfe,0xff,0xfb,0xfa,0x03,0xfb,0xf7,0x03,0xfb,0xf7,0x79,0x45,0x02,
+ 0x49,0x03,0x45,0x41,0x05,0x45,0x41,0x21,0x03,0x41,0x44,0x25,0x02,0x45,0x21,0x41,
+ 0x44,0x25,0x21,0x24,0x21,0x41,0x44,0x02,0x21,0x44,0x21,0x41,0x44,0x41,0x65,0x69,
+ 0x6a,0xdd,0xff,0x92,0xf5,0xde,0xae,0x74,0x97,0xb2,0xb5,0xb6,0xba,0xb6,0xad,0xdf,
+ 0xff,0xb9,0xad,0x94,0xb3,0xfa,0xb9,0x95,0x96,0xf6,0x98,0x72,0x91,0x92,0xb1,0x51,
+ 0x6a,0x8d,0x91,0x71,0x45,0x68,0x02,0x49,0x48,0x49,0x02,0x4d,0x49,0x7a,0xb2,0x4c,
+ 0x49,0x4d,0x49,0x76,0xb5,0x99,0x92,0xb4,0x9a,0xb6,0x75,0x92,0xb6,0x95,0x02,0x6d,
+ 0x02,0x8d,0x91,0x71,0x6d,0x95,0x75,0x6d,0x02,0x91,0x06,0x6d,0x49,0x41,0x24,0x21,
+ 0x41,0x24,0x02,0x21,0x44,0x66,0x65,0xd0,0xff,0xf3,0xfe,0x04,0xff,0xf7,0xff,0xfb,
+ 0x05,0xff,0xfe,0xab,0xf5,0xf7,0x04,0xff,0x9f,0xef,0xff,0xbf,0xad,0x72,0xb2,0xae,
+ 0x85,0xa9,0xeb,0xfb,0x04,0xff,0xb4,0x7f,0x0a,0xff,0xfb,0x04,0xff,0x1f,0x62,0x02,
+ 0x6e,0x65,0x69,0x08,0x49,0x45,0x49,0x45,0x02,0x49,0x02,0x45,0x49,0x02,0x45,0x49,
+ 0x02,0x45,0x49,0x02,0x45,0x02,0x49,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x45,
+ 0x41,0x48,0xab,0xfa,0xff,0xfb,0x02,0xff,0xfb,0x02,0xff,0x02,0xfb,0xfe,0xfb,0x02,
+ 0xff,0x02,0xfb,0xfe,0x02,0xf7,0xfa,0xf7,0xfb,0xfe,0xdd,0x86,0x49,0x02,0x45,0x49,
+ 0x45,0x41,0x44,0x03,0x45,0x02,0x41,0x44,0x02,0x21,0x44,0x02,0x41,0x25,0x02,0x21,
+ 0x25,0x02,0x21,0x24,0x21,0x41,0x45,0x02,0x21,0x44,0x02,0x45,0x69,0x65,0x8d,0xad,
+ 0x8e,0xb2,0xda,0xfb,0xff,0x50,0x77,0xfa,0xb9,0xb6,0x92,0x8d,0x96,0xb6,0xb5,0x91,
+ 0xb9,0xb6,0xbb,0xf7,0x74,0x72,0x95,0xb2,0xb6,0xbd,0xb9,0xbb,0xb6,0x91,0x8d,0x99,
+ 0x9a,0x8d,0x95,0x91,0x92,0x6e,0x49,0x45,0x49,0x69,0x6d,0x49,0x48,0x02,0x49,0x69,
+ 0x96,0x6e,0x48,0x45,0x4d,0xaa,0xb9,0x76,0x91,0x95,0x75,0xb1,0xba,0x96,0x75,0x6d,
+ 0x02,0x91,0x8d,0x91,0x71,0x6d,0x71,0x8d,0x91,0x71,0x91,0x6d,0x02,0x71,0x03,0x6d,
+ 0x02,0x49,0x48,0x21,0x41,0x40,0x02,0x21,0x25,0x21,0x49,0x69,0x6b,0xfd,0xff,0xfb,
+ 0x05,0xff,0xfb,0xff,0xfb,0x04,0xff,0xf7,0x54,0x73,0xf6,0xbe,0x8e,0x02,0xb2,0x89,
+ 0x99,0xf7,0xfd,0x4f,0x89,0x6e,0x8e,0x6d,0x42,0xf9,0x00,0x13,0xff,0xdb,0xb7,0xb6,
+ 0x69,0x4d,0x69,0x02,0x49,0x69,0x03,0x49,0x45,0x69,0x02,0x49,0x65,0x45,0x03,0x49,
+ 0x05,0x45,0x44,0x05,0x45,0x49,0x45,0x02,0x49,0x02,0x45,0x49,0x06,0x45,0x42,0xf9,
+ 0xff,0xf6,0x07,0xff,0xfa,0x02,0xfb,0xfa,0x02,0xfb,0xfa,0xfb,0xff,0xfa,0xf7,0xff,
+ 0xfe,0xff,0xb3,0x4c,0x41,0x05,0x45,0x21,0x45,0x44,0x25,0x02,0x45,0x41,0x45,0x44,
+ 0x02,0x25,0x24,0x02,0x21,0x45,0x02,0x21,0x45,0x41,0x45,0x44,0x49,0x02,0x69,0x6e,
+ 0x92,0xb2,0x8e,0xb2,0x02,0xd2,0xd6,0xf6,0x03,0xff,0x8d,0xb0,0x03,0xba,0x8d,0x96,
+ 0xb6,0xb2,0xb6,0x95,0x96,0xb6,0xb5,0x95,0x8e,0x91,0x92,0x9e,0xbe,0xb6,0xae,0x94,
+ 0x9a,0x8e,0xb0,0xbf,0xb6,0xb5,0x91,0xba,0x96,0x02,0x69,0x6c,0x97,0x8e,0x71,0x6d,
+ 0x49,0x48,0x45,0x51,0x91,0x71,0x69,0x8c,0x92,0x96,0x75,0x02,0x92,0x95,0x75,0x76,
+ 0xb5,0x74,0x6e,0xb1,0x95,0x8e,0x91,0x6d,0x02,0x71,0x6d,0x02,0x71,0x6e,0x8d,0x02,
+ 0x71,0x04,0x6d,0x4d,0x03,0x49,0x21,0x41,0x44,0x02,0x21,0x24,0x46,0x69,0x6d,0xf3,
+ 0xfb,0xfe,0x07,0xff,0xf7,0xdb,0xaf,0xb7,0xf7,0x95,0x4e,0xd1,0xbb,0xae,0x91,0x03,
+ 0x8e,0x81,0x02,0xff,0x90,0x2a,0x69,0x6a,0x69,0xcd,0xfb,0x05,0xff,0xfb,0x08,0xff,
+ 0xda,0xb3,0x92,0x8e,0x02,0x6e,0x02,0x6a,0x69,0x45,0x69,0x49,0x02,0x45,0x02,0x49,
+ 0x45,0x49,0x45,0x05,0x49,0x45,0x02,0x49,0x45,0x41,0x48,0x05,0x45,0x02,0x49,0x45,
+ 0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x03,0x45,0x02,0x41,0x48,0xb3,0xfa,0xfe,0xfb,
+ 0xff,0xfe,0x02,0xfb,0xfe,0x02,0xff,0xfe,0xfb,0xff,0xfe,0xf7,0xfb,0xfe,0xd7,0xfb,
+ 0xfe,0xf7,0x02,0xff,0xb5,0x62,0x44,0x45,0x49,0x29,0x41,0x02,0x45,0x21,0x45,0x24,
+ 0x21,0x45,0x44,0x21,0x41,0x44,0x21,0x41,0x44,0x21,0x41,0x45,0x41,0x49,0x6d,0x69,
+ 0x92,0x91,0x8e,0xb2,0xb6,0xb2,0xb6,0xd6,0xd2,0xd6,0xfa,0xf7,0x04,0xff,0x91,0x96,
+ 0xd6,0x95,0x96,0xb6,0x91,0x93,0xb2,0x91,0x9b,0xb6,0x95,0x97,0xb6,0x75,0x6e,0x02,
+ 0x91,0x97,0xb6,0x95,0x92,0xb2,0x90,0x9b,0xb6,0x91,0x9a,0xba,0xb6,0xad,0x71,0x8d,
+ 0x9b,0xb6,0x95,0x8d,0x6d,0x69,0x02,0x49,0x65,0x76,0x92,0xad,0xba,0x76,0x91,0x96,
+ 0x95,0x91,0x9a,0x92,0x70,0x71,0x95,0xb2,0xb9,0x76,0x8d,0x02,0x6d,0x8d,0x03,0x6d,
+ 0x72,0x03,0x6d,0x02,0x71,0x72,0x03,0x6d,0x02,0x49,0x05,0x45,0x44,0x21,0x49,0x02,
+ 0x6a,0xbd,0xff,0xf7,0x07,0xff,0xbe,0x8a,0xb5,0xd7,0xb6,0x8f,0x84,0x9f,0xf7,0x74,
+ 0x4a,0x02,0x69,0x49,0x78,0xf7,0xff,0xfb,0xf1,0xdf,0x0b,0xff,0xd7,0xb3,0xb2,0x03,
+ 0x8e,0x6e,0x04,0x6a,0x04,0x69,0x02,0x49,0x69,0x45,0x02,0x49,0x45,0x49,0x02,0x45,
+ 0x02,0x49,0x45,0x49,0x45,0x49,0x46,0x05,0x45,0x02,0x49,0x0c,0x45,0x41,0x45,0x49,
+ 0x02,0x45,0x48,0x25,0x49,0x8a,0xb6,0xd6,0xf6,0xda,0xff,0xfa,0xdb,0xff,0xfe,0xdb,
+ 0xff,0xfa,0xf7,0xfb,0xfa,0xdb,0x02,0xfb,0xdb,0xff,0xfb,0xfa,0x8f,0x48,0x06,0x45,
+ 0x21,0x02,0x45,0x21,0x45,0x44,0x25,0x45,0x41,0x02,0x45,0x65,0x6a,0x02,0x6d,0x6e,
+ 0x91,0xb1,0x92,0xb5,0xb2,0xb6,0x03,0xd6,0xfa,0xf6,0xdb,0xff,0xfb,0x06,0xff,0x8e,
+ 0xb1,0x96,0x02,0xb6,0x91,0xba,0xb6,0x91,0x96,0xb5,0x91,0x92,0xb1,0x96,0x8e,0x71,
+ 0x6a,0x9a,0xb6,0x95,0x72,0x71,0x6d,0x9a,0xb6,0x91,0xbe,0xbb,0x8c,0x9a,0xba,0x91,
+ 0x9a,0xb6,0x8d,0x02,0x96,0x03,0x6d,0x02,0x4d,0x6d,0x6e,0x9e,0xba,0x6c,0x4d,0x6c,
+ 0x72,0x92,0x91,0x71,0x72,0x91,0x8e,0xbe,0x9e,0x6d,0x02,0x71,0x6d,0x02,0x71,0x02,
+ 0x6d,0x6c,0x03,0x71,0x6d,0x02,0x71,0x03,0x6d,0x69,0x06,0x49,0x41,0x24,0x42,0x6d,
+ 0x6e,0x87,0xfe,0xff,0xf7,0x06,0xff,0xf3,0x98,0x97,0xb2,0x91,0x6a,0x8e,0xf2,0xff,
+ 0xaf,0x70,0x8f,0xda,0x04,0xff,0xfb,0x06,0xff,0xdb,0xbb,0x8f,0x8a,0x8e,0x66,0x6a,
+ 0x6e,0x6a,0x4e,0x6d,0x02,0x6e,0x6d,0x6a,0x02,0x69,0x02,0x49,0x69,0x45,0x69,0x02,
+ 0x49,0x45,0x69,0x02,0x45,0x02,0x49,0x45,0x48,0x49,0x45,0x04,0x49,0x02,0x45,0x49,
+ 0x02,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x41,0x45,0x49,0x02,0x45,0x49,0x02,
+ 0x45,0x49,0x02,0x45,0x49,0x45,0x02,0x49,0x41,0x45,0x49,0x45,0x69,0xad,0x8e,0xb6,
+ 0x02,0xd6,0xdb,0xfe,0xd7,0xfb,0xfa,0xd7,0xfb,0xfe,0xdb,0xff,0xfe,0xd7,0xff,0xde,
+ 0x8c,0x02,0x45,0x02,0x41,0x44,0x45,0x41,0x44,0x21,0x04,0x45,0x02,0x69,0x6d,0x8d,
+ 0x89,0x8d,0xb1,0x92,0xb2,0xb1,0xb2,0xb6,0x03,0xd6,0xfa,0xdb,0xff,0xfe,0xfb,0xff,
+ 0xfe,0x08,0xff,0x8d,0x89,0x02,0xb1,0xb2,0xb5,0x95,0x92,0xb5,0x91,0x96,0xb6,0x91,
+ 0x96,0x92,0x6c,0x6e,0x91,0xae,0xb6,0x92,0x88,0x9f,0xb3,0x6c,0x96,0xd6,0xd2,0x02,
+ 0xde,0xb6,0xba,0xda,0x74,0x72,0x95,0x91,0x8d,0x6d,0x48,0x4e,0x6d,0x4c,0x4d,0x6d,
+ 0x69,0x9a,0x6e,0x48,0x4a,0x8d,0x72,0x69,0x95,0x02,0x96,0x75,0x71,0x76,0x71,0x6c,
+ 0x07,0x6d,0x02,0x71,0x6d,0x02,0x71,0x02,0x6d,0x69,0x02,0x6d,0x48,0x49,0x69,0x03,
+ 0x49,0x45,0x41,0x44,0x66,0x69,0x71,0xef,0xfe,0x07,0xff,0xbe,0x8a,0x8d,0x89,0xbf,
+ 0xff,0xdc,0xdf,0x0a,0xff,0xba,0x92,0x6e,0x8e,0x02,0x6a,0x8a,0x04,0x6a,0x04,0x69,
+ 0x6d,0x46,0x69,0x49,0x4a,0x6a,0x65,0x03,0x49,0x45,0x69,0x49,0x45,0x49,0x45,0x02,
+ 0x49,0x02,0x45,0x05,0x49,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,
+ 0x05,0x45,0x49,0x02,0x45,0x02,0x49,0x45,0x49,0x0e,0x45,0x03,0x49,0x6d,0x8d,0x92,
+ 0x02,0xd6,0xd7,0xdb,0xd6,0xdb,0xfa,0xda,0xdf,0xff,0xdb,0xb2,0x6e,0x40,0x02,0x45,
+ 0x41,0x45,0x49,0x45,0x49,0x02,0x69,0x6e,0x02,0x8d,0x8e,0x02,0xb1,0xb2,0xb6,0xb2,
+ 0xb6,0x02,0xd6,0xdb,0xfb,0xf7,0x02,0xff,0xfb,0x0f,0xff,0x6d,0x91,0x92,0x96,0x95,
+ 0x02,0x8e,0x91,0x92,0xb6,0x95,0x02,0x92,0x91,0x6d,0x02,0x91,0x6d,0x92,0x91,0x02,
+ 0x92,0xb5,0xba,0x8e,0xcc,0xbe,0xb6,0xd5,0xbe,0xba,0xb9,0x95,0x6e,0x6c,0x72,0x92,
+ 0x71,0x48,0x49,0x48,0x4e,0x02,0x69,0x49,0x6d,0xad,0x9a,0x6a,0x48,0x4e,0x76,0xb6,
+ 0x95,0x52,0x91,0x96,0x6e,0x6c,0x03,0x6d,0x69,0x02,0x6d,0x02,0x6e,0x6c,0x6d,0x02,
+ 0x71,0x07,0x6d,0x69,0x4d,0x03,0x49,0x41,0x45,0x24,0x21,0x4d,0x8e,0x65,0xbf,0xff,
+ 0xf2,0x08,0xff,0xfb,0x03,0xff,0xfb,0xfa,0xdb,0xfb,0xff,0xb2,0x93,0x96,0x8f,0x6a,
+ 0x8e,0x6a,0x4a,0x6e,0x4a,0x49,0x6d,0x49,0x02,0x6d,0x49,0x69,0x49,0x4a,0x69,0x49,
+ 0x4a,0x49,0x69,0x45,0x04,0x49,0x69,0x45,0x03,0x49,0x45,0x04,0x49,0x45,0x02,0x49,
+ 0x45,0x02,0x49,0x02,0x45,0x48,0x02,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x02,0x49,
+ 0x45,0x49,0x02,0x45,0x48,0x02,0x45,0x48,0x03,0x45,0x41,0x02,0x45,0x02,0x41,0x44,
+ 0x05,0x45,0x49,0x45,0x02,0x49,0x45,0x49,0x2d,0x04,0x49,0x69,0x8d,0x8e,0xb2,0xb6,
+ 0xb3,0x02,0xda,0xd7,0xd6,0x9a,0x64,0x49,0x69,0x49,0x69,0x89,0x6a,0x8e,0x91,0x8e,
+ 0xb2,0x03,0xb6,0xd6,0xd7,0x02,0xfa,0xdb,0xff,0xfe,0x00,0x17,0xff,0x69,0x76,0x96,
+ 0x91,0x8d,0x71,0x8d,0x02,0x96,0x91,0x96,0xb5,0xb6,0xba,0x76,0x02,0x8d,0x71,0x8d,
+ 0x8e,0x91,0x03,0x8d,0x89,0x9a,0xda,0x98,0x9f,0xfe,0xbd,0xb6,0x95,0x71,0x92,0x91,
+ 0x71,0x69,0x49,0x45,0x49,0x68,0x4d,0x49,0x69,0x49,0x52,0x91,0x75,0x6a,0x94,0xba,
+ 0x8d,0x4d,0x69,0x76,0xb6,0x71,0x6a,0x09,0x6d,0x71,0x6d,0x02,0x71,0x02,0x6d,0x71,
+ 0x02,0x6d,0x4d,0x69,0x03,0x49,0x45,0x49,0x45,0x21,0x24,0x45,0x6e,0x6a,0xe3,0x02,
+ 0xff,0xf3,0x0a,0xff,0xbf,0xba,0x8e,0x6d,0x6e,0x6a,0x69,0x65,0x6a,0x69,0x02,0x6a,
+ 0x03,0x69,0x49,0x45,0x49,0x02,0x69,0x02,0x49,0x02,0x69,0x49,0x45,0x05,0x49,0x45,
+ 0x02,0x49,0x02,0x45,0x02,0x49,0x45,0x69,0x02,0x45,0x49,0x02,0x45,0x49,0x02,0x45,
+ 0x49,0x45,0x02,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,
+ 0x06,0x45,0x44,0x25,0x45,0x40,0x41,0x45,0x41,0x21,0x02,0x45,0x41,0x45,0x41,0x45,
+ 0x49,0x02,0x45,0x49,0x45,0x09,0x49,0x45,0x03,0x69,0x8d,0x89,0x8e,0x02,0xb2,0xad,
+ 0x71,0x89,0x8e,0xb1,0xae,0xb2,0xb5,0xb2,0xb6,0xfa,0xd6,0xda,0xfe,0xfb,0xff,0xfe,
+ 0x00,0x1c,0xff,0x02,0x6d,0x6e,0x8d,0x51,0x6a,0x02,0x91,0x02,0x8e,0x91,0x93,0xfe,
+ 0x9f,0x89,0x02,0x91,0x6d,0x8d,0x04,0x6d,0x69,0x75,0xb2,0x95,0x92,0x90,0x9b,0xb6,
+ 0xb5,0xba,0xb2,0x54,0x6f,0x8e,0x51,0x45,0x29,0x02,0x49,0x6d,0x4d,0x02,0x49,0x68,
+ 0x4d,0x9d,0xbf,0x02,0xb2,0x50,0x6a,0x95,0xb6,0x91,0x6d,0x6c,0x4e,0x0c,0x6d,0x02,
+ 0x71,0x04,0x6d,0x69,0x02,0x49,0x29,0x02,0x49,0x45,0x24,0x21,0x25,0x85,0x69,0x6e,
+ 0xef,0x07,0xff,0xd7,0x96,0x8a,0x6a,0x69,0x6a,0x4a,0x69,0x4a,0x49,0x6d,0x02,0x49,
+ 0x6d,0x4e,0x49,0x69,0x49,0x69,0x68,0x02,0x49,0x69,0x45,0x04,0x49,0x4d,0x45,0x69,
+ 0x49,0x45,0x04,0x49,0x48,0x45,0x02,0x49,0x4a,0x45,0x49,0x05,0x45,0x49,0x45,0x03,
+ 0x49,0x45,0x48,0x49,0x45,0x49,0x41,0x45,0x49,0x41,0x45,0x44,0x41,0x02,0x45,0x21,
+ 0x41,0x44,0x03,0x45,0x41,0x45,0x44,0x45,0x41,0x44,0x02,0x45,0x49,0x02,0x45,0x44,
+ 0x41,0x49,0x69,0x02,0x45,0x69,0x49,0x02,0x69,0x49,0x02,0x6d,0x6a,0x69,0x6d,0x02,
+ 0x6e,0x03,0x6d,0x8d,0x6e,0x8e,0xb1,0x92,0xb6,0xd6,0xb6,0xd6,0xf6,0xdb,0x02,0xfe,
+ 0x02,0xff,0xfe,0x00,0x23,0xff,0x69,0x03,0x6d,0x69,0x02,0x6d,0x8e,0xb1,0x70,0x72,
+ 0xb1,0xb2,0xad,0x71,0x6d,0x02,0x92,0x48,0x4e,0x8d,0x6d,0x49,0x6c,0x8e,0xb1,0x71,
+ 0x6d,0x69,0x90,0xbb,0xae,0xd5,0x9d,0x6e,0xb1,0x70,0x02,0x49,0x45,0x49,0x29,0x45,
+ 0x49,0x4d,0x02,0x49,0x48,0x8a,0xb5,0xbd,0xbe,0x89,0x70,0x92,0x96,0x92,0x6c,0x4e,
+ 0x02,0x6d,0x02,0x71,0x02,0x6d,0x71,0x6d,0x69,0x02,0x6d,0x02,0x71,0x02,0x6d,0x71,
+ 0x03,0x6d,0x02,0x69,0x49,0x45,0x02,0x49,0x02,0x45,0x25,0x41,0x4d,0x6d,0x65,0x9f,
+ 0xff,0xd6,0xaf,0x92,0x69,0x6a,0x6e,0x69,0x49,0x69,0x49,0x4a,0x02,0x69,0x45,0x49,
+ 0x45,0x03,0x49,0x4e,0x4d,0x02,0x49,0x4d,0x03,0x49,0x02,0x45,0x02,0x49,0x45,0x49,
+ 0x45,0x02,0x49,0x02,0x45,0x49,0x45,0x02,0x49,0x45,0x02,0x49,0x45,0x02,0x49,0x45,
+ 0x02,0x49,0x45,0x02,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x09,0x45,
+ 0x44,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x03,0x45,0x41,0x02,0x45,0x41,0x45,
+ 0x49,0x45,0x41,0x48,0x45,0x69,0x6d,0x02,0x69,0x8d,0x69,0x6e,0x8e,0x8d,0x8e,0x91,
+ 0x8e,0x92,0xb5,0x02,0xb2,0xd6,0xb2,0xd6,0xfa,0xf7,0xfb,0x00,0x2f,0xff,0x8a,0x68,
+ 0x02,0x6e,0x4c,0x49,0x8d,0x71,0x72,0xb2,0x95,0x92,0x02,0xb6,0x8d,0x6d,0x8d,0x03,
+ 0x6d,0x6e,0x6a,0x02,0x69,0x04,0x6d,0x4d,0x4e,0xb1,0x91,0x95,0x6e,0x8d,0x6d,0x8d,
+ 0x6d,0x49,0x45,0x48,0x45,0x49,0x4d,0x04,0x49,0x4d,0x8d,0xbb,0xfe,0x5d,0x6a,0x02,
+ 0x95,0x91,0x6e,0x0a,0x6d,0x69,0x03,0x6d,0x02,0x71,0x03,0x6d,0x69,0x6d,0x4d,0x49,
+ 0x45,0x44,0x02,0x45,0x28,0x02,0x25,0x65,0x4e,0x91,0x97,0x66,0x69,0x6d,0x4a,0x69,
+ 0x6d,0x49,0x02,0x69,0x02,0x49,0x69,0x02,0x49,0x69,0x03,0x49,0x4a,0x03,0x49,0x69,
+ 0x04,0x49,0x45,0x02,0x49,0x45,0x02,0x49,0x02,0x45,0x04,0x49,0x45,0x02,0x49,0x45,
+ 0x03,0x49,0x45,0x02,0x49,0x45,0x44,0x49,0x45,0x44,0x02,0x45,0x44,0x02,0x45,0x44,
+ 0x05,0x45,0x44,0x02,0x45,0x44,0x02,0x45,0x44,0x02,0x45,0x44,0x02,0x45,0x44,0x02,
+ 0x45,0x44,0x02,0x45,0x44,0x02,0x41,0x45,0x41,0x45,0x29,0x25,0x45,0x44,0x4a,0x02,
+ 0x8d,0x6e,0xb2,0xb1,0x92,0x02,0xb6,0xb2,0xda,0xd6,0xd7,0xfe,0xfa,0x02,0xff,0xfe,
+ 0x02,0xff,0xfe,0x00,0x32,0xff,0x91,0x8e,0xb1,0x70,0x4a,0x8d,0x6d,0x92,0x95,0x91,
+ 0x6e,0x91,0x96,0xb2,0x91,0x8d,0x02,0x96,0x8e,0xb2,0x55,0x6e,0x69,0x02,0x6d,0x6e,
+ 0x02,0x6d,0x4e,0x6d,0x71,0x02,0x6d,0x49,0x71,0x6e,0x44,0x49,0x69,0x49,0x41,0x64,
+ 0x49,0x45,0x69,0x04,0x49,0x4d,0xf8,0xff,0xe5,0x70,0x72,0x96,0x92,0x6c,0x4d,0x6d,
+ 0x49,0x4d,0x04,0x6d,0x69,0x6d,0x71,0x03,0x6d,0x03,0x71,0x02,0x6d,0x4d,0x69,0x49,
+ 0x69,0x48,0x45,0x44,0x45,0x02,0x25,0x24,0x29,0x6d,0x6e,0x6a,0x4d,0x46,0x69,0x49,
+ 0x45,0x69,0x02,0x49,0x45,0x69,0x45,0x07,0x49,0x69,0x03,0x49,0x45,0x02,0x49,0x45,
+ 0x02,0x49,0x45,0x05,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x45,0x02,0x49,0x41,0x03,
+ 0x45,0x41,0x07,0x45,0x41,0x02,0x49,0x02,0x45,0x49,0x03,0x45,0x41,0x45,0x49,0x41,
+ 0x02,0x45,0x02,0x41,0x44,0x45,0x21,0x03,0x45,0x25,0x02,0x41,0x45,0x02,0x25,0x45,
+ 0x41,0x45,0x49,0x41,0x45,0x49,0x65,0x8d,0xb1,0xb2,0xda,0xfa,0xdb,0xff,0xfe,0x02,
+ 0xff,0xfe,0x02,0xff,0xfe,0x00,0x3a,0xff,0x8e,0xad,0xb6,0x8e,0x4c,0x4a,0x91,0x95,
+ 0x92,0x8e,0x6d,0x6e,0xb2,0xb6,0x8d,0x92,0x91,0x92,0xb6,0x99,0x92,0x8e,0x6c,0x76,
+ 0x6e,0x68,0x72,0x6e,0x48,0x4e,0x6a,0x48,0x02,0x4d,0x49,0x45,0x02,0x49,0x02,0x45,
+ 0x48,0x02,0x45,0x44,0x45,0x69,0x2c,0x25,0x49,0x44,0x73,0xfd,0x9e,0x81,0xb5,0x79,
+ 0x69,0x6d,0x4d,0x49,0x03,0x6d,0x4d,0x0a,0x6d,0x6e,0x02,0x71,0x6d,0x4d,0x02,0x69,
+ 0x49,0x48,0x25,0x45,0x44,0x25,0x41,0x40,0x53,0x8e,0x51,0x02,0x45,0x06,0x49,0x69,
+ 0x45,0x49,0x69,0x49,0x02,0x45,0x02,0x49,0x69,0x45,0x03,0x49,0x02,0x69,0x04,0x49,
+ 0x45,0x44,0x02,0x45,0x49,0x0e,0x45,0x49,0x08,0x45,0x49,0x05,0x45,0x44,0x02,0x45,
+ 0x44,0x02,0x45,0x44,0x02,0x45,0x44,0x21,0x45,0x49,0x45,0x03,0x49,0x02,0x69,0x6e,
+ 0x8e,0x8d,0x92,0x03,0xb6,0xfe,0xfa,0xdf,0x02,0xfe,0x02,0xff,0xfe,0x00,0x44,0xff,
+ 0x69,0x03,0x91,0x6a,0xad,0x91,0x8e,0xb1,0x91,0xb2,0x91,0x69,0x02,0x96,0x8d,0x02,
+ 0x96,0x8e,0xb6,0xd6,0x90,0x96,0xb6,0x6c,0x4e,0x8d,0x6c,0x4d,0x8d,0x6d,0x03,0x49,
+ 0x45,0x49,0x44,0x45,0x44,0x04,0x49,0x45,0x49,0x02,0x45,0x48,0x49,0x4d,0x6d,0xaf,
+ 0xfe,0x9e,0x91,0x72,0x71,0x6d,0x69,0x48,0x49,0x4d,0x02,0x6d,0x49,0x04,0x6d,0x4d,
+ 0x06,0x6d,0x69,0x4c,0x4e,0x6d,0x4d,0x49,0x41,0x44,0x02,0x45,0x24,0x02,0x21,0x88,
+ 0x75,0x65,0x48,0x02,0x49,0x4d,0x07,0x49,0x65,0x49,0x02,0x45,0x49,0x02,0x45,0x49,
+ 0x45,0x02,0x49,0x41,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x45,
+ 0x02,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x45,0x41,0x44,0x45,0x41,
+ 0x44,0x02,0x45,0x49,0x02,0x45,0x48,0x02,0x45,0x29,0x41,0x45,0x48,0x41,0x45,0x49,
+ 0x02,0x45,0x03,0x69,0x8d,0x8e,0x92,0xb5,0xb3,0xd6,0xfa,0xda,0xff,0xfe,0x02,0xff,
+ 0xfe,0x00,0x4f,0xff,0x6d,0x02,0x89,0x02,0x8d,0x92,0xb2,0x8d,0x02,0x92,0x91,0x02,
+ 0x92,0x8d,0xba,0xb6,0x91,0x8d,0xb5,0x95,0x92,0x02,0xb6,0xb1,0x96,0x75,0x65,0x4d,
+ 0x6d,0x69,0x02,0x6d,0x45,0x49,0x45,0x49,0x25,0x40,0x02,0x49,0x48,0x4a,0x69,0x4d,
+ 0x45,0x25,0x02,0x45,0x49,0x4c,0x49,0x91,0x02,0xb6,0x92,0x6c,0x69,0x02,0x49,0x03,
+ 0x45,0x02,0x4d,0x02,0x69,0x02,0x6d,0x69,0x6d,0x4c,0x49,0x02,0x6d,0x69,0x6d,0x4d,
+ 0x4e,0x6d,0x4d,0x49,0x45,0x44,0x21,0x45,0x44,0x21,0x25,0x24,0x2f,0x8a,0x48,0x08,
+ 0x49,0x05,0x45,0x02,0x49,0x02,0x45,0x44,0x02,0x45,0x44,0x02,0x45,0x44,0x03,0x45,
+ 0x41,0x45,0x49,0x45,0x02,0x49,0x04,0x45,0x49,0x48,0x02,0x49,0x45,0x41,0x03,0x45,
+ 0x25,0x08,0x45,0x49,0x02,0x45,0x49,0x02,0x69,0x02,0x8d,0x6e,0x02,0xb1,0xba,0xda,
+ 0xfa,0xff,0x02,0xfe,0xff,0x02,0xfe,0x00,0x59,0xff,0x02,0x69,0x02,0x6d,0x6e,0xb1,
+ 0x91,0x8e,0x91,0x92,0x8e,0x91,0x8d,0xbe,0xff,0xb4,0x8e,0x90,0xb7,0xd6,0xd5,0xb5,
+ 0xb6,0xf6,0xb9,0x8e,0x6d,0x6a,0x02,0x6d,0x6e,0x69,0x4c,0x45,0x02,0x49,0x41,0x02,
+ 0x49,0x41,0x02,0x49,0x46,0x65,0x28,0x25,0x02,0x49,0x02,0x45,0x48,0x49,0x51,0x91,
+ 0x71,0x02,0x69,0x03,0x49,0x46,0x02,0x69,0x02,0x49,0x4d,0x49,0x69,0x4d,0x4a,0x69,
+ 0x6d,0x02,0x49,0x6d,0x49,0x03,0x6d,0x69,0x49,0x45,0x41,0x44,0x21,0x41,0x25,0x02,
+ 0x21,0x44,0x4e,0x41,0x48,0x04,0x49,0x45,0x49,0x02,0x45,0x48,0x02,0x45,0x49,0x41,
+ 0x45,0x49,0x02,0x45,0x48,0x02,0x45,0x48,0x49,0x45,0x48,0x02,0x45,0x49,0x02,0x45,
+ 0x49,0x02,0x45,0x44,0x04,0x45,0x41,0x44,0x02,0x45,0x28,0x45,0x02,0x49,0x41,0x02,
+ 0x49,0x45,0x02,0x69,0x6d,0x8e,0xad,0x8e,0xd6,0xd5,0xd7,0x02,0xfe,0x02,0xff,0xfe,
+ 0x00,0x64,0xff,0x02,0x6d,0x69,0x6d,0x89,0x96,0x6e,0x68,0x72,0xb2,0x91,0x8e,0x91,
+ 0xae,0xb5,0x71,0x8d,0x8e,0xf9,0x9d,0x92,0x95,0xb2,0xda,0x9a,0x92,0x85,0x6d,0x8e,
+ 0x69,0x91,0x7a,0x41,0x44,0x49,0x41,0x49,0x6a,0x65,0x29,0x49,0x45,0x02,0x49,0x41,
+ 0x04,0x45,0x44,0x21,0x49,0x45,0x4d,0x6d,0x4c,0x02,0x49,0x69,0x05,0x49,0x48,0x49,
+ 0x6d,0x4d,0x49,0x02,0x69,0x03,0x49,0x4d,0x04,0x6d,0x02,0x49,0x45,0x24,0x21,0x45,
+ 0x41,0x21,0x25,0x24,0x21,0x45,0x48,0x25,0x45,0x41,0x45,0x49,0x48,0x45,0x49,0x48,
+ 0x45,0x49,0x09,0x45,0x44,0x45,0x02,0x49,0x02,0x45,0x40,0x05,0x45,0x44,0x02,0x45,
+ 0x44,0x45,0x02,0x49,0x45,0x02,0x49,0x6e,0x02,0x8d,0x92,0xb6,0xd2,0xd7,0x02,0xfa,
+ 0x00,0x71,0xff,0x03,0x6d,0x69,0x6d,0x71,0x69,0x6d,0x91,0x6d,0x6e,0x02,0x8d,0x92,
+ 0x02,0x91,0x8d,0x70,0x9b,0xd6,0x99,0x95,0xba,0xda,0xb6,0xd6,0x95,0x93,0x8e,0xad,
+ 0xba,0x86,0x48,0x4a,0x65,0x48,0x46,0x8d,0x4d,0x49,0x45,0x48,0x45,0x02,0x49,0x41,
+ 0x02,0x45,0x21,0x45,0x29,0x25,0x02,0x4d,0x4a,0x69,0x2c,0x02,0x49,0x4d,0x45,0x49,
+ 0x4d,0x49,0x45,0x48,0x49,0x69,0x4d,0x02,0x49,0x6d,0x49,0x4d,0x04,0x6d,0x49,0x69,
+ 0x49,0x45,0x41,0x24,0x21,0x41,0x44,0x02,0x21,0x24,0x25,0x41,0x44,0x25,0x45,0x68,
+ 0x6e,0x6a,0x6d,0x49,0x45,0x49,0x02,0x45,0x49,0x02,0x41,0x03,0x45,0x44,0x02,0x45,
+ 0x44,0x02,0x45,0x44,0x02,0x45,0x49,0x02,0x45,0x69,0x45,0x02,0x69,0x6e,0x92,0xb1,
+ 0xb6,0xda,0xfa,0xda,0xff,0xfe,0x00,0x79,0xff,0x49,0x69,0x65,0x02,0x6d,0x65,0x02,
+ 0x6d,0x02,0x92,0x6c,0x6d,0x8d,0x6d,0x6e,0x8e,0x6c,0x69,0x91,0xb2,0xb6,0xb9,0xbe,
+ 0xb2,0xd6,0xb6,0xb2,0xb6,0xb1,0xb2,0x6e,0x85,0x91,0x4e,0x02,0x45,0x05,0x49,0x41,
+ 0x25,0x03,0x45,0x24,0x21,0x02,0x45,0x41,0x03,0x49,0x6d,0x4d,0x45,0x08,0x49,0x45,
+ 0x02,0x49,0x45,0x69,0x04,0x49,0x4d,0x6d,0x03,0x4d,0x48,0x02,0x49,0x44,0x41,0x25,
+ 0x02,0x41,0x25,0x20,0x02,0x25,0x02,0x21,0x45,0x20,0x49,0x8d,0x92,0x8d,0x4e,0x05,
+ 0x45,0x49,0x02,0x45,0x02,0x49,0x45,0x49,0x45,0x49,0x03,0x69,0x6d,0x8d,0x92,0xb6,
+ 0xd6,0xdb,0xfe,0xfa,0x00,0x83,0xff,0x4a,0x66,0x2c,0x46,0x65,0x48,0x45,0x71,0x92,
+ 0x8d,0x6e,0x8d,0x6d,0x69,0x89,0x02,0x8e,0x6d,0x6a,0xb1,0x95,0x9a,0xb2,0x90,0xbb,
+ 0xb2,0xb1,0xb5,0x02,0x96,0x68,0x71,0x72,0x40,0x02,0x49,0x02,0x45,0x03,0x49,0x28,
+ 0x21,0x02,0x49,0x02,0x21,0x44,0x25,0x45,0x48,0x03,0x49,0x45,0x49,0x4d,0x02,0x49,
+ 0x4d,0x45,0x49,0x48,0x45,0x49,0x48,0x03,0x49,0x45,0x04,0x49,0x69,0x6d,0x02,0x4d,
+ 0x02,0x49,0x48,0x49,0x45,0x44,0x21,0x41,0x45,0x02,0x21,0x24,0x25,0x45,0x44,0x02,
+ 0x21,0x64,0x6e,0xb6,0x9b,0x60,0x45,0x65,0x45,0x02,0x69,0x49,0x02,0x6d,0x6a,0x8d,
+ 0xad,0xb2,0x02,0xf6,0x02,0xff,0xfe,0x00,0x8b,0xff,0x8e,0x48,0x45,0x02,0x69,0x61,
+ 0x48,0x69,0x6d,0x71,0x6d,0x69,0x02,0x6d,0x69,0x8d,0x6d,0x69,0x02,0x8d,0x92,0xb6,
+ 0x70,0x76,0x96,0x8d,0xba,0x96,0x6c,0x02,0x6d,0x02,0x69,0x29,0x41,0x04,0x45,0x29,
+ 0x41,0x02,0x45,0x40,0x21,0x25,0x45,0x41,0x02,0x24,0x02,0x49,0x44,0x02,0x49,0x41,
+ 0x49,0x4d,0x49,0x45,0x49,0x45,0x25,0x02,0x49,0x45,0x05,0x49,0x45,0x02,0x49,0x69,
+ 0x4d,0x03,0x49,0x48,0x02,0x49,0x45,0x21,0x44,0x24,0x02,0x25,0x20,0x21,0x24,0x02,
+ 0x45,0x29,0xc3,0x02,0xff,0xfe,0xfb,0xfe,0x03,0xda,0xd7,0xdb,0xfe,0xfb,0x00,0x95,
+ 0xff,0x6d,0x6a,0x4d,0x49,0x69,0x48,0x46,0x69,0x6d,0x6e,0x8e,0x71,0x6d,0x6e,0x8d,
+ 0x91,0x6e,0x4c,0x49,0x8d,0x71,0x6e,0x8e,0x71,0x6e,0xb6,0x79,0x6d,0x6e,0x89,0x92,
+ 0x8e,0x4c,0x02,0x45,0x48,0x05,0x45,0x49,0x02,0x21,0x44,0x45,0x25,0x45,0x21,0x45,
+ 0x65,0x03,0x49,0x41,0x45,0x02,0x49,0x45,0x48,0x49,0x45,0x48,0x03,0x49,0x02,0x45,
+ 0x48,0x0c,0x49,0x44,0x21,0x44,0x45,0x21,0x44,0x02,0x21,0x20,0x21,0x45,0x44,0x20,
+ 0x9c,0x00,0xa1,0xff,0x02,0x6d,0x49,0x8d,0x71,0x65,0x49,0x69,0x6e,0x02,0x6d,0x72,
+ 0x92,0x6c,0x69,0x8d,0x71,0x69,0x6d,0x02,0x69,0x8d,0x6d,0x69,0x8d,0x71,0x6a,0xad,
+ 0x70,0x49,0x6d,0x49,0x45,0x02,0x48,0x21,0x44,0x02,0x45,0x02,0x49,0x41,0x25,0x21,
+ 0x25,0x45,0x20,0x45,0x49,0x45,0x03,0x49,0x45,0x49,0x44,0x45,0x49,0x45,0x41,0x49,
+ 0x45,0x41,0x49,0x44,0x03,0x49,0x45,0x02,0x49,0x45,0x48,0x09,0x49,0x20,0x21,0x02,
+ 0x45,0x21,0x25,0x20,0x21,0x24,0x21,0x40,0x44,0xa2,0x00,0xa1,0xff,0x49,0x69,0x49,
+ 0x4a,0x8e,0x71,0x65,0x02,0x6d,0x6e,0x6a,0x02,0x6d,0x69,0x68,0x6e,0x8a,0x68,0x02,
+ 0x69,0x6d,0x02,0x69,0x6d,0x02,0x49,0x69,0x72,0x4a,0x48,0x02,0x49,0x48,0x49,0x45,
+ 0x44,0x03,0x45,0x49,0x45,0x44,0x02,0x21,0x03,0x45,0x49,0x02,0x45,0x48,0x02,0x45,
+ 0x48,0x41,0x45,0x44,0x02,0x45,0x44,0x02,0x45,0x24,0x21,0x25,0x49,0x45,0x49,0x48,
+ 0x02,0x49,0x48,0x02,0x49,0x48,0x45,0x02,0x49,0x45,0x02,0x49,0x41,0x21,0x20,0x02,
+ 0x21,0x24,0x25,0x21,0x20,0x02,0x21,0x02,0x40,0x70,0xe7,0x00,0xa0,0xff,0x45,0x49,
+ 0x02,0x69,0x45,0x6d,0x71,0x6e,0x8d,0x91,0x71,0x66,0x6d,0x49,0x69,0x6d,0x02,0x69,
+ 0x4d,0x6a,0x89,0x4d,0x6a,0x69,0x4d,0x6d,0x69,0x4d,0x45,0x02,0x49,0x02,0x45,0x49,
+ 0x03,0x45,0x41,0x45,0x49,0x21,0x41,0x24,0x21,0x41,0x48,0x49,0x45,0x49,0x44,0x45,
+ 0x49,0x02,0x45,0x29,0x02,0x45,0x49,0x45,0x21,0x45,0x24,0x21,0x24,0x25,0x49,0x29,
+ 0x25,0x02,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x49,0x02,0x45,0x29,0x20,
+ 0x21,0x45,0x25,0x45,0x25,0x21,0x45,0x28,0x20,0x40,0x64,0x40,0xdf,0x00,0xa0,0xff,
+ 0x21,0x03,0x49,0x45,0x61,0x6e,0x8e,0x71,0x6e,0x8e,0x4c,0x4a,0x02,0x6d,0x69,0x6d,
+ 0x4d,0x49,0x02,0x6d,0x65,0x69,0x4d,0x49,0x69,0x4d,0x45,0x69,0x48,0x04,0x45,0x25,
+ 0x45,0x21,0x45,0x44,0x02,0x45,0x24,0x21,0x04,0x45,0x24,0x21,0x45,0x44,0x21,0x25,
+ 0x45,0x41,0x45,0x29,0x21,0x25,0x24,0x25,0x45,0x24,0x21,0x25,0x03,0x45,0x24,0x02,
+ 0x45,0x44,0x02,0x45,0x44,0x45,0x05,0x49,0x41,0x21,0x20,0x21,0x25,0x24,0x21,0x25,
+ 0x45,0x20,0x21,0x02,0x40,0x64,0xe1,0x00,0xa0,0xff,0x02,0x25,0x45,0x69,0x48,0x49,
+ 0x89,0x71,0x66,0x68,0x72,0x6a,0x4d,0x02,0x69,0x4d,0x69,0x02,0x92,0x69,0x02,0x6d,
+ 0x69,0x65,0x69,0x49,0x45,0x02,0x49,0x45,0x48,0x02,0x45,0x49,0x03,0x45,0x02,0x41,
+ 0x24,0x21,0x41,0x45,0x21,0x45,0x49,0x44,0x21,0x24,0x21,0x41,0x24,0x25,0x21,0x44,
+ 0x24,0x41,0x24,0x21,0x41,0x24,0x02,0x21,0x24,0x21,0x49,0x29,0x21,0x25,0x29,0x02,
+ 0x45,0x48,0x49,0x45,0x48,0x03,0x49,0x02,0x45,0x29,0x20,0x21,0x24,0x02,0x21,0x24,
+ 0x02,0x21,0x24,0x02,0x21,0x44,0x40,0x95,0xfd,0x00,0x9f,0xff,0x41,0x25,0x02,0x65,
+ 0x49,0x44,0x6e,0x6a,0x40,0x4e,0x6e,0x02,0x69,0x02,0x6d,0x69,0x89,0x68,0x6e,0x8e,
+ 0x8d,0x65,0x6d,0x4d,0x45,0x69,0x48,0x02,0x49,0x48,0x45,0x49,0x44,0x02,0x45,0x44,
+ 0x41,0x45,0x49,0x45,0x25,0x40,0x41,0x25,0x02,0x45,0x25,0x24,0x21,0x45,0x24,0x02,
+ 0x21,0x20,0x21,0x03,0x45,0x49,0x48,0x03,0x45,0x02,0x49,0x02,0x69,0x49,0x44,0x06,
+ 0x49,0x45,0x02,0x49,0x45,0x49,0x48,0x41,0x25,0x20,0x21,0x41,0x25,0x02,0x21,0x20,
+ 0x02,0x21,0x20,0x21,0x65,0xa0,0x00,0x99,0xff,0x00,0x00,0x00,0x06,0x00,0xff,0x24,
+ 0x02,0x25,0x44,0x45,0x41,0x21,
+};
+const unsigned int image_sr8_size = sizeof(image_sr8);
diff --git a/src/test2d/.gitignore b/src/test2d/.gitignore
new file mode 100644
index 0000000..5e4e8f1
--- /dev/null
+++ b/src/test2d/.gitignore
@@ -0,0 +1,12 @@
+bitblt2d
+bitblt2d_from_stream
+clear2d
+bitblt2d_palette
+filterblt2d
+filterblt2d_fromplanar
+bitblt2d_rotate
+line2d
+line2d_patterned
+stretchblt2d
+bitblt2d_alpha
+
diff --git a/src/test2d/Makefile b/src/test2d/Makefile
new file mode 100644
index 0000000..0328655
--- /dev/null
+++ b/src/test2d/Makefile
@@ -0,0 +1,54 @@
+TOP=..
+
+include $(TOP)/Makefile.inc
+
+COMMON_FLAGS += -I$(TOP)/resources -I$(TOP)/driver
+CFLAGS += -DDUMP
+CXXFLAGS +=
+LDFLAGS += -lpng
+
+TARGETS = clear2d line2d bitblt2d_from_stream line2d_patterned bitblt2d \
+ bitblt2d_palette filterblt2d stretchblt2d filterblt2d_fromplanar \
+ bitblt2d_alpha bitblt2d_rotate
+
+ETNA_OBJS = ../lib/write_bmp.o ../lib/etna_bswap.o ../etnaviv/libetnaviv.a ../lib/read_png.o
+
+all: $(TARGETS)
+
+clean:
+ rm -f *.o ../lib/*.o ../resources/*.o
+ rm -f $(TARGETS)
+
+clear2d: clear2d.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+line2d: line2d.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+line2d_patterned: line2d_patterned.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+bitblt2d_from_stream: bitblt2d_from_stream.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+bitblt2d_palette: bitblt2d_palette.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+filterblt2d: filterblt2d.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+filterblt2d_fromplanar: filterblt2d_fromplanar.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+bitblt2d_rotate: bitblt2d_rotate.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+bitblt2d: bitblt2d.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+bitblt2d_alpha: bitblt2d_alpha.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+stretchblt2d: stretchblt2d.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
diff --git a/src/test2d/bitblt2d.c b/src/test2d/bitblt2d.c
new file mode 100644
index 0000000..ff5e14d
--- /dev/null
+++ b/src/test2d/bitblt2d.c
@@ -0,0 +1,210 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Test bit_blt operation.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include <errno.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_2d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/etna_rs.h>
+
+#include "write_bmp.h"
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 256;
+
+ int padded_width = etna_align_up(width, 8);
+ int padded_height = etna_align_up(height, 1);
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_2D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ struct etna_vidmem *bmp = 0; /* bitmap */
+ struct etna_vidmem *src = 0; /* source */
+
+ size_t bmp_size = width * height * 4;
+ size_t src_size = width * height * 4;
+
+ if(etna_vidmem_alloc_linear(conn, &bmp, bmp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &src, src_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK)
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* switch to 2D pipe */
+ etna_set_pipe(ctx, ETNA_PIPE_2D);
+ /* pre-clear surface. Could use the 2D engine for this,
+ * but we're lazy.
+ */
+ for(int i=0; i<bmp_size/4; ++i)
+ ((uint32_t*)bmp->logical)[i] = 0xff000000;
+ for(int y=0; y<height; ++y)
+ {
+ for(int x=0; x<width; ++x)
+ {
+ uint8_t a = 0xff;
+ uint8_t r = x*13;
+ uint8_t g = y*13;
+ uint8_t b = (x+y)*0x12;
+ ((uint32_t*)src->logical)[y*width+x] = ((uint32_t)a << 24)|((uint32_t)b<<16)|((uint32_t)g<<8)|(uint32_t)r;
+ }
+ }
+
+ for(int frame=0; frame<1; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+
+ etna_set_state(ctx, VIVS_DE_SRC_ADDRESS, src->address);
+ etna_set_state(ctx, VIVS_DE_SRC_STRIDE, width*4);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_CONFIG,
+ VIVS_DE_SRC_CONFIG_SOURCE_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_SRC_CONFIG_LOCATION_MEMORY |
+ VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT(DE_FORMAT_A8R8G8B8));
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN,
+ VIVS_DE_SRC_ORIGIN_X(128) |
+ VIVS_DE_SRC_ORIGIN_Y(128));
+ etna_set_state(ctx, VIVS_DE_SRC_SIZE,
+ VIVS_DE_SRC_SIZE_X(width) |
+ VIVS_DE_SRC_SIZE_Y(height)
+ ); // source size is ignored
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_BG, 0xff303030);
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_FG, 0xff12ff56);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_LOW, 0);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_HIGH, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ADDRESS, bmp->address);
+ etna_set_state(ctx, VIVS_DE_DEST_STRIDE, width*4);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_CONFIG,
+ VIVS_DE_DEST_CONFIG_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_DEST_CONFIG_COMMAND_BIT_BLT |
+ VIVS_DE_DEST_CONFIG_SWIZZLE(DE_SWIZZLE_ARGB) |
+ VIVS_DE_DEST_CONFIG_TILED_DISABLE |
+ VIVS_DE_DEST_CONFIG_MINOR_TILED_DISABLE
+ );
+ etna_set_state(ctx, VIVS_DE_ROP,
+ VIVS_DE_ROP_ROP_FG(0xcc) | VIVS_DE_ROP_ROP_BG(0xcc) | VIVS_DE_ROP_TYPE_ROP4);
+ etna_set_state(ctx, VIVS_DE_CLIP_TOP_LEFT,
+ VIVS_DE_CLIP_TOP_LEFT_X(0) |
+ VIVS_DE_CLIP_TOP_LEFT_Y(0)
+ );
+ etna_set_state(ctx, VIVS_DE_CLIP_BOTTOM_RIGHT,
+ VIVS_DE_CLIP_BOTTOM_RIGHT_X(width) |
+ VIVS_DE_CLIP_BOTTOM_RIGHT_Y(height)
+ );
+ etna_set_state(ctx, VIVS_DE_CONFIG, 0); /* TODO */
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN_FRACTION, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_ROT_ANGLE, 0);
+
+ /* Clear color PE20 */
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE32, 0xff40ff40);
+ /* Clear color PE10 */
+ etna_set_state(ctx, VIVS_DE_CLEAR_BYTE_MASK, 0xff);
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE_LOW, 0xff40ff40);
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE_HIGH, 0xff40ff40);
+
+ etna_set_state(ctx, VIVS_DE_DEST_COLOR_KEY, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_SRC_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_DEST_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_COLOR_MULTIPLY_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_PE_TRANSPARENCY, 0);
+ etna_set_state(ctx, VIVS_DE_PE_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_LOW, 0xffffffff);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_HIGH, 0xffffffff);
+#define NUM_RECTS (32)
+ /* Queue DE command */
+ etna_reserve(ctx, 256*2 + 2);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_HEADER_OP_DRAW_2D |
+ VIV_FE_DRAW_2D_HEADER_COUNT(NUM_RECTS) |
+ VIV_FE_DRAW_2D_HEADER_DATA_COUNT(0);
+ (ctx)->offset++; /* rectangles start aligned */
+ for(int rec=0; rec<NUM_RECTS; ++rec)
+ {
+ int x1 = (rand() % width) - 16;
+ int y1 = (rand() % height) - 16;
+ int x2 = x1+30;
+ int y2 = y1+30;
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_TOP_LEFT_X(x1) |
+ VIV_FE_DRAW_2D_TOP_LEFT_Y(y1);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_BOTTOM_RIGHT_X(x2) |
+ VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y(y2);
+ }
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_PE2D);
+ etna_finish(ctx);
+ }
+ bmp_dump32(bmp->logical, width, height, false, "/tmp/fb.bmp");
+ printf("Dump complete\n");
+
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, NULL, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/test2d/bitblt2d_alpha.c b/src/test2d/bitblt2d_alpha.c
new file mode 100644
index 0000000..ec7d635
--- /dev/null
+++ b/src/test2d/bitblt2d_alpha.c
@@ -0,0 +1,239 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Test bit_blt operation with alpha compositing enabled.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include <errno.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_2d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/etna_rs.h>
+
+#include "write_bmp.h"
+
+static int sawtooth(int x, int n)
+{
+ x %= n;
+ if(x >= (n/2))
+ {
+ return n-1-x;
+ } else {
+ return x;
+ }
+}
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 256;
+
+ int padded_width = etna_align_up(width, 8);
+ int padded_height = etna_align_up(height, 1);
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_2D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ struct etna_vidmem *bmp = 0; /* bitmap */
+ struct etna_vidmem *src = 0; /* source */
+
+ size_t bmp_size = width * height * 4;
+ size_t src_size = width * height * 4;
+
+ if(etna_vidmem_alloc_linear(conn, &bmp, bmp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &src, src_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK)
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* switch to 2D pipe */
+ etna_set_pipe(ctx, ETNA_PIPE_2D);
+ /* pre-clear surface. Could use the 2D engine for this,
+ * but we're lazy.
+ */
+ for(int i=0; i<bmp_size/4; ++i)
+ ((uint32_t*)bmp->logical)[i] = 0xff000000;
+ for(int y=0; y<height; ++y)
+ {
+ for(int x=0; x<width; ++x)
+ {
+ uint8_t a = 40+etna_smin(sawtooth(x, 32), sawtooth(y, 32))*4;
+ uint8_t r = 0x00;
+ uint8_t g = 0xc0;
+ uint8_t b = 0x00;
+ ((uint32_t*)src->logical)[y*width+x] = ((uint32_t)a << 24)|((uint32_t)b<<16)|((uint32_t)g<<8)|(uint32_t)r;
+ }
+ }
+
+ for(int frame=0; frame<1; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+
+ etna_set_state(ctx, VIVS_DE_SRC_ADDRESS, src->address);
+ etna_set_state(ctx, VIVS_DE_SRC_STRIDE, width*4);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_CONFIG,
+ VIVS_DE_SRC_CONFIG_SOURCE_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_SRC_CONFIG_LOCATION_MEMORY |
+ VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT(DE_FORMAT_A8R8G8B8));
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN,
+ VIVS_DE_SRC_ORIGIN_X(0) |
+ VIVS_DE_SRC_ORIGIN_Y(0));
+ etna_set_state(ctx, VIVS_DE_SRC_SIZE,
+ VIVS_DE_SRC_SIZE_X(width) |
+ VIVS_DE_SRC_SIZE_Y(height)
+ ); // source size is ignored
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_BG, 0xff303030);
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_FG, 0xff12ff56);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_LOW, 0);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_HIGH, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ADDRESS, bmp->address);
+ etna_set_state(ctx, VIVS_DE_DEST_STRIDE, width*4);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_CONFIG,
+ VIVS_DE_DEST_CONFIG_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_DEST_CONFIG_COMMAND_BIT_BLT |
+ VIVS_DE_DEST_CONFIG_SWIZZLE(DE_SWIZZLE_ARGB) |
+ VIVS_DE_DEST_CONFIG_TILED_DISABLE |
+ VIVS_DE_DEST_CONFIG_MINOR_TILED_DISABLE
+ );
+ etna_set_state(ctx, VIVS_DE_ROP,
+ VIVS_DE_ROP_ROP_FG(0xcc) | VIVS_DE_ROP_ROP_BG(0xcc) | VIVS_DE_ROP_TYPE_ROP4);
+ etna_set_state(ctx, VIVS_DE_CLIP_TOP_LEFT,
+ VIVS_DE_CLIP_TOP_LEFT_X(0) |
+ VIVS_DE_CLIP_TOP_LEFT_Y(0)
+ );
+ etna_set_state(ctx, VIVS_DE_CLIP_BOTTOM_RIGHT,
+ VIVS_DE_CLIP_BOTTOM_RIGHT_X(width) |
+ VIVS_DE_CLIP_BOTTOM_RIGHT_Y(height)
+ );
+ etna_set_state(ctx, VIVS_DE_CONFIG, 0); /* TODO */
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN_FRACTION, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_CONTROL,
+ VIVS_DE_ALPHA_CONTROL_ENABLE_ON |
+ VIVS_DE_ALPHA_CONTROL_PE10_GLOBAL_SRC_ALPHA(0x00) |
+ VIVS_DE_ALPHA_CONTROL_PE10_GLOBAL_DST_ALPHA(0x00));
+ etna_set_state(ctx, VIVS_DE_ALPHA_MODES,
+ VIVS_DE_ALPHA_MODES_SRC_ALPHA_MODE_NORMAL |
+ VIVS_DE_ALPHA_MODES_DST_ALPHA_MODE_NORMAL |
+ VIVS_DE_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE_NORMAL |
+ VIVS_DE_ALPHA_MODES_GLOBAL_DST_ALPHA_MODE_NORMAL |
+ VIVS_DE_ALPHA_MODES_PE10_SRC_COLOR_MULTIPLY_ENABLE |
+ VIVS_DE_ALPHA_MODES_PE10_DST_COLOR_MULTIPLY_ENABLE |
+ VIVS_DE_ALPHA_MODES_SRC_ALPHA_FACTOR_DISABLE |
+ VIVS_DE_ALPHA_MODES_SRC_BLENDING_MODE(DE_BLENDMODE_NORMAL) |
+ VIVS_DE_ALPHA_MODES_DST_ALPHA_FACTOR_DISABLE |
+ VIVS_DE_ALPHA_MODES_DST_BLENDING_MODE(DE_BLENDMODE_INVERSED));
+ etna_set_state(ctx, VIVS_DE_COLOR_MULTIPLY_MODES, /* PE20 */
+ VIVS_DE_COLOR_MULTIPLY_MODES_SRC_PREMULTIPLY_ENABLE |
+ VIVS_DE_COLOR_MULTIPLY_MODES_DST_PREMULTIPLY_ENABLE |
+ VIVS_DE_COLOR_MULTIPLY_MODES_SRC_GLOBAL_PREMULTIPLY_DISABLE |
+ VIVS_DE_COLOR_MULTIPLY_MODES_DST_DEMULTIPLY_DISABLE);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_ROT_ANGLE, 0);
+
+ /* Clear color PE20 */
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE32, 0xff40ff40);
+ /* Clear color PE10 */
+ etna_set_state(ctx, VIVS_DE_CLEAR_BYTE_MASK, 0xff);
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE_LOW, 0xff40ff40);
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE_HIGH, 0xff40ff40);
+
+ etna_set_state(ctx, VIVS_DE_DEST_COLOR_KEY, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_SRC_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_DEST_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_PE_TRANSPARENCY, 0);
+ etna_set_state(ctx, VIVS_DE_PE_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_LOW, 0xffffffff);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_HIGH, 0xffffffff);
+
+#define NUM_RECTS (64)
+ /* Queue DE command */
+ etna_reserve(ctx, 256*2 + 2);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_HEADER_OP_DRAW_2D |
+ VIV_FE_DRAW_2D_HEADER_COUNT(NUM_RECTS) |
+ VIV_FE_DRAW_2D_HEADER_DATA_COUNT(0);
+ (ctx)->offset++; /* rectangles start aligned */
+ for(int rec=0; rec<NUM_RECTS; ++rec)
+ {
+ int x1 = (rand() % width) - 16;
+ int y1 = (rand() % height) - 16;
+ int x2 = x1 + 32;
+ int y2 = y1 + 32;
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_TOP_LEFT_X(x1) |
+ VIV_FE_DRAW_2D_TOP_LEFT_Y(y1);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_BOTTOM_RIGHT_X(x2) |
+ VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y(y2);
+ }
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_PE2D);
+ etna_finish(ctx);
+ }
+ bmp_dump32(bmp->logical, width, height, false, "/tmp/fb.bmp");
+ printf("Dump complete\n");
+
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, NULL, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/test2d/bitblt2d_from_stream.c b/src/test2d/bitblt2d_from_stream.c
new file mode 100644
index 0000000..b5838fd
--- /dev/null
+++ b/src/test2d/bitblt2d_from_stream.c
@@ -0,0 +1,222 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Mono expansion bit blt operation from command stream.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include <errno.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_2d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/etna_rs.h>
+
+#include "write_bmp.h"
+
+/* Text data to expand, packed per 8x4 bits in 32 bit words */
+static const uint32_t text_width = 128;
+static const uint32_t text_height = 8;
+static const uint32_t text_data[] = {
+ 0xa9aada89, 0x00898a88, 0xc20528c8, 0x00c82825, 0x00008080, 0x00808000,
+ 0x724a49f0, 0x00f24a4b, 0x27284887, 0x002728e0, 0x0808881c, 0x001c8888,
+ 0x80804830, 0x00304880, 0x08080000, 0x00020508, 0xa29c0000, 0x001c20be,
+ 0xcab10000, 0x00838083, 0x02e60002, 0x00c722c2, 0x221c0000, 0x001c2222,
+ 0xc8b00000, 0x00888888, 0x03000807, 0x00070800, 0x00808000, 0x00189880,
+ 0xa8988870, 0x007088c8
+};
+static const uint32_t text_size = sizeof(text_data)/4;
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 192;
+
+ int padded_width = etna_align_up(width, 8);
+ int padded_height = etna_align_up(height, 1);
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_2D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ struct etna_vidmem *bmp = 0; /* bitmap */
+ struct etna_vidmem *src = 0; /* source */
+
+ size_t bmp_size = width * height * 4;
+ size_t src_size = width * height * 4;
+
+ if(etna_vidmem_alloc_linear(conn, &bmp, bmp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &src, src_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK)
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* switch to 2D pipe */
+ etna_set_pipe(ctx, ETNA_PIPE_2D);
+ /* pre-clear surface. Could use the 2D engine for this,
+ * but we're lazy.
+ */
+ memset(src->logical, 255, src_size);
+ for(int i=0; i<bmp_size/4; ++i)
+ ((uint32_t*)bmp->logical)[i] = 0xff2020ff;
+ for(int frame=0; frame<1; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+
+ etna_set_state(ctx, VIVS_DE_SRC_ADDRESS, 0); /* source address is ignored for monochrome blits */
+ //etna_set_state(ctx, VIVS_DE_SRC_ADDRESS, src->address);
+ etna_set_state(ctx, VIVS_DE_SRC_STRIDE, 4);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_CONFIG,
+ VIVS_DE_SRC_CONFIG_UNK16 |
+ VIVS_DE_SRC_CONFIG_SOURCE_FORMAT(DE_FORMAT_MONOCHROME) |
+ VIVS_DE_SRC_CONFIG_LOCATION_STREAM |
+ VIVS_DE_SRC_CONFIG_PACK_PACKED8 | /* 8 by 4 blocks */
+ VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT(DE_FORMAT_MONOCHROME));
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_SIZE, 0); // source size is ignored
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_BG, 0xff2020ff);
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_FG, 0xffffffff);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_LOW, 0);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_HIGH, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ADDRESS, bmp->address);
+ etna_set_state(ctx, VIVS_DE_DEST_STRIDE, width*4);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_CONFIG,
+ VIVS_DE_DEST_CONFIG_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_DEST_CONFIG_COMMAND_BIT_BLT |
+ VIVS_DE_DEST_CONFIG_SWIZZLE(DE_SWIZZLE_ARGB) |
+ VIVS_DE_DEST_CONFIG_TILED_DISABLE |
+ VIVS_DE_DEST_CONFIG_MINOR_TILED_DISABLE
+ );
+ // 10101010 0xaa destination
+ // 01010101 0x55 !destination
+ // 11001100 0xcc source
+ // 00110011 0x33 !source
+ // 11110000 0xf0 pattern (8x8)
+ // 00001111 0x0f !pattern (8x8)
+ etna_set_state(ctx, VIVS_DE_ROP,
+ VIVS_DE_ROP_ROP_FG(0xcc) | VIVS_DE_ROP_ROP_BG(0xcc) | VIVS_DE_ROP_TYPE_ROP4);
+ etna_set_state(ctx, VIVS_DE_CLIP_TOP_LEFT,
+ VIVS_DE_CLIP_TOP_LEFT_X(0) |
+ VIVS_DE_CLIP_TOP_LEFT_Y(0)
+ );
+ etna_set_state(ctx, VIVS_DE_CLIP_BOTTOM_RIGHT,
+ VIVS_DE_CLIP_BOTTOM_RIGHT_X(width) |
+ VIVS_DE_CLIP_BOTTOM_RIGHT_Y(height)
+ );
+ etna_set_state(ctx, VIVS_DE_CONFIG, 0); /* TODO */
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN_FRACTION, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_ROT_ANGLE, 0);
+
+ /* Clear color PE20 */
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE32, 0xff40ff40);
+ /* Clear color PE10 */
+ etna_set_state(ctx, VIVS_DE_CLEAR_BYTE_MASK, 0xff);
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE_LOW, 0xff40ff40);
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE_HIGH, 0xff40ff40);
+
+ etna_set_state(ctx, VIVS_DE_DEST_COLOR_KEY, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_SRC_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_DEST_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_COLOR_MULTIPLY_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_PE_TRANSPARENCY, 0);
+ etna_set_state(ctx, VIVS_DE_PE_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_LOW, 0xffffffff);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_HIGH, 0xffffffff);
+
+#define NUM_RECTS (1)
+ /* Queue DE command */
+ etna_reserve(ctx, 256*2 + 2 + text_size);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_HEADER_OP_DRAW_2D |
+ VIV_FE_DRAW_2D_HEADER_COUNT(NUM_RECTS) |
+ VIV_FE_DRAW_2D_HEADER_DATA_COUNT(text_size);
+ (ctx)->offset++; /* rectangles start aligned */
+ for(int rec=0; rec<NUM_RECTS; ++rec)
+ {
+ int x1 = 4+16*rec;
+ int y1 = 4;
+ int x2 = x1 + text_width;
+ int y2 = y1 + text_height;
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_TOP_LEFT_X(x1) |
+ VIV_FE_DRAW_2D_TOP_LEFT_Y(y1);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_BOTTOM_RIGHT_X(x2) |
+ VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y(y2);
+ }
+ /* data in-stream */
+ ETNA_ALIGN(ctx);
+ for(int ptr=0; ptr<text_size; ++ptr)
+ (ctx)->buf[(ctx)->offset++] = text_data[ptr];
+ ETNA_ALIGN(ctx);
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_PE2D);
+ etna_finish(ctx);
+ }
+ bmp_dump32_noflip(bmp->logical, width, height, true, "/tmp/fb.bmp");
+ printf("Dump complete\n");
+
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, NULL, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/test2d/bitblt2d_palette.c b/src/test2d/bitblt2d_palette.c
new file mode 100644
index 0000000..6439af2
--- /dev/null
+++ b/src/test2d/bitblt2d_palette.c
@@ -0,0 +1,254 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Test palette expansion.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include <errno.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_2d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/etna_rs.h>
+
+#include "write_bmp.h"
+
+#include "../resources/wani21_sr8.h"
+
+/* Decompress MSX2 sr8 file from memory.
+ * Output will contain 256x212 image.
+ */
+#define SR8_OUT_SIZE (256*212)
+static void sr8_decompress(const uint8_t *data, uint8_t *data_out)
+{
+ uint16_t size16;
+ size_t in_size;
+ int in_ptr = 7;
+ int out_ptr = 0;
+ memcpy(&size16, &data[3], 2);
+ in_size = size16 + 7;
+
+ while(in_ptr < in_size && out_ptr < SR8_OUT_SIZE)
+ {
+ uint8_t d = data[in_ptr++];
+ uint8_t ch;
+ int rep;
+ if(d == 0)
+ {
+ if((in_ptr+1) >= in_size)
+ break;
+ rep = data[in_ptr++];
+ if(rep == 0)
+ rep = 256;
+ ch = data[in_ptr++];
+ } else if(d < 0x10)
+ {
+ if(in_ptr >= in_size)
+ break;
+ rep = d;
+ ch = data[in_ptr++];
+ } else
+ {
+ rep = 1;
+ ch = d;
+ }
+ for(int i=0; i<rep && out_ptr<SR8_OUT_SIZE; ++i)
+ data_out[out_ptr++] = ch;
+ }
+}
+
+/* Build MSX2 screen 8 palette.
+ */
+static void sr8_palette(uint32_t *palette)
+{
+ for(int i=0; i<256; ++i)
+ {
+ uint8_t a = 0xff;
+ uint8_t r = (i >> 2) & 7;
+ uint8_t g = (i >> 5) & 7;
+ uint8_t b = i & 3;
+ r = (r << 5) | (r << 2) | (r >> 1);
+ g = (g << 5) | (g << 2) | (g >> 1);
+ b = (b << 6) | (b << 4) | (b << 2) | (b << 0);
+ palette[i] = ((uint32_t)a << 24)|((uint32_t)r<<16)|((uint32_t)g<<8)|(uint32_t)b;
+ }
+}
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 212;
+
+ int padded_width = etna_align_up(width, 8);
+ int padded_height = etna_align_up(height, 1);
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_2D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ struct etna_vidmem *bmp = 0; /* bitmap */
+ struct etna_vidmem *src = 0; /* source */
+
+ size_t bmp_size = width * height * 4;
+ size_t src_size = width * height * 4;
+
+ if(etna_vidmem_alloc_linear(conn, &bmp, bmp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &src, src_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK)
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* switch to 2D pipe */
+ etna_set_pipe(ctx, ETNA_PIPE_2D);
+ /* pre-clear surface. Could use the 2D engine for this,
+ * but we're lazy.
+ */
+ for(int i=0; i<bmp_size/4; ++i)
+ ((uint32_t*)bmp->logical)[i] = 0xff000000;
+
+ uint32_t palette[256];
+ sr8_palette(palette);
+ sr8_decompress(image_sr8, (uint8_t*)src->logical);
+
+ for(int frame=0; frame<1; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+
+ etna_set_state(ctx, VIVS_DE_SRC_ADDRESS, src->address);
+ etna_set_state(ctx, VIVS_DE_SRC_STRIDE, width);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_CONFIG,
+ VIVS_DE_SRC_CONFIG_SOURCE_FORMAT(DE_FORMAT_INDEX8) |
+ VIVS_DE_SRC_CONFIG_LOCATION_MEMORY |
+ VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT(DE_FORMAT_INDEX8));
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN,
+ VIVS_DE_SRC_ORIGIN_X(0) |
+ VIVS_DE_SRC_ORIGIN_Y(0));
+ etna_set_state(ctx, VIVS_DE_SRC_SIZE,
+ VIVS_DE_SRC_SIZE_X(width) |
+ VIVS_DE_SRC_SIZE_Y(height)
+ ); // source size is ignored
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_BG, 0xff303030);
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_FG, 0xff12ff56);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_LOW, 0);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_HIGH, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ADDRESS, bmp->address);
+ etna_set_state(ctx, VIVS_DE_DEST_STRIDE, width*4);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_CONFIG,
+ VIVS_DE_DEST_CONFIG_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_DEST_CONFIG_COMMAND_BIT_BLT |
+ VIVS_DE_DEST_CONFIG_SWIZZLE(DE_SWIZZLE_ARGB) |
+ VIVS_DE_DEST_CONFIG_TILED_DISABLE |
+ VIVS_DE_DEST_CONFIG_MINOR_TILED_DISABLE
+ );
+ etna_set_state(ctx, VIVS_DE_ROP,
+ VIVS_DE_ROP_ROP_FG(0xcc) | VIVS_DE_ROP_ROP_BG(0xcc) | VIVS_DE_ROP_TYPE_ROP4);
+ etna_set_state(ctx, VIVS_DE_CLIP_TOP_LEFT,
+ VIVS_DE_CLIP_TOP_LEFT_X(0) |
+ VIVS_DE_CLIP_TOP_LEFT_Y(0)
+ );
+ etna_set_state(ctx, VIVS_DE_CLIP_BOTTOM_RIGHT,
+ VIVS_DE_CLIP_BOTTOM_RIGHT_X(width) |
+ VIVS_DE_CLIP_BOTTOM_RIGHT_Y(height)
+ );
+ etna_set_state(ctx, VIVS_DE_CONFIG, 0); /* TODO */
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN_FRACTION, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_ROT_ANGLE, 0);
+
+ etna_set_state_multi(ctx, VIVS_DE_INDEX_COLOR_TABLE(0), 256, palette);
+ etna_set_state_multi(ctx, VIVS_DE_INDEX_COLOR_TABLE32(0), 256, palette);
+
+ etna_set_state(ctx, VIVS_DE_DEST_COLOR_KEY, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_SRC_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_DEST_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_COLOR_MULTIPLY_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_PE_TRANSPARENCY, 0);
+ etna_set_state(ctx, VIVS_DE_PE_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_LOW, 0xffffffff);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_HIGH, 0xffffffff);
+
+#define NUM_RECTS (1)
+ /* Queue DE command */
+ etna_reserve(ctx, 256*2 + 2);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_HEADER_OP_DRAW_2D |
+ VIV_FE_DRAW_2D_HEADER_COUNT(NUM_RECTS) |
+ VIV_FE_DRAW_2D_HEADER_DATA_COUNT(0);
+ (ctx)->offset++; /* rectangles start aligned */
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_TOP_LEFT_X(0) |
+ VIV_FE_DRAW_2D_TOP_LEFT_Y(0);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_BOTTOM_RIGHT_X(width) |
+ VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y(height);
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_PE2D);
+ etna_finish(ctx);
+ }
+ bmp_dump32_noflip(bmp->logical, width, height, true, "/tmp/fb.bmp");
+ printf("Dump complete\n");
+
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, NULL, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/test2d/bitblt2d_rotate.c b/src/test2d/bitblt2d_rotate.c
new file mode 100644
index 0000000..fed6e5b
--- /dev/null
+++ b/src/test2d/bitblt2d_rotate.c
@@ -0,0 +1,218 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Test bit_blt operation (rotated 90 degrees).
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include <errno.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_2d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/etna_rs.h>
+
+#include "write_bmp.h"
+#include "read_png.h"
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 256;
+
+ size_t dst_stride = etna_align_up(width, 8) * 4;
+
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_2D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ /* Read test image */
+ int src_width, src_height, src_stride;
+ uint32_t *src_data = 0;
+ if(!read_png("amethyst256.png", 8*4, &src_stride, &src_width, &src_height, &src_data))
+ {
+ printf("Unable to read amethyst256.png in current directory\n");
+ exit(1);
+ }
+
+ struct etna_vidmem *bmp = 0; /* bitmap */
+ struct etna_vidmem *src = 0; /* source */
+
+ size_t bmp_size = dst_stride * height;
+ size_t src_size = src_stride * src_height;
+
+ if(etna_vidmem_alloc_linear(conn, &bmp, bmp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &src, src_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK)
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* switch to 2D pipe */
+ etna_set_pipe(ctx, ETNA_PIPE_2D);
+ /* pre-clear surface. Could use the 2D engine for this,
+ * but we're lazy.
+ */
+ for(int i=0; i<bmp_size/4; ++i)
+ ((uint32_t*)bmp->logical)[i] = 0xff000000;
+ memcpy(src->logical, src_data, src_height * src_stride);
+
+ for(int frame=0; frame<1; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+
+ etna_set_state(ctx, VIVS_DE_SRC_ADDRESS, src->address);
+ etna_set_state(ctx, VIVS_DE_SRC_STRIDE, src_stride);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_CONFIG,
+ VIVS_DE_SRC_ROTATION_CONFIG_WIDTH(src_width) |
+ VIVS_DE_SRC_ROTATION_CONFIG_ROTATION_ENABLE);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_HEIGHT,
+ VIVS_DE_SRC_ROTATION_HEIGHT_HEIGHT(src_height));
+ etna_set_state(ctx, VIVS_DE_SRC_CONFIG,
+ VIVS_DE_SRC_CONFIG_SOURCE_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_SRC_CONFIG_LOCATION_MEMORY |
+ VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT(DE_FORMAT_A8R8G8B8));
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN,
+ VIVS_DE_SRC_ORIGIN_X(28) |
+ VIVS_DE_SRC_ORIGIN_Y(28));
+ etna_set_state(ctx, VIVS_DE_SRC_SIZE,
+ VIVS_DE_SRC_SIZE_X(width) |
+ VIVS_DE_SRC_SIZE_Y(height)
+ ); // source size is ignored
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_BG, 0xff303030);
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_FG, 0xff12ff56);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_LOW, 0);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_HIGH, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ADDRESS, bmp->address);
+ etna_set_state(ctx, VIVS_DE_DEST_STRIDE, dst_stride);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_CONFIG,
+ VIVS_DE_DEST_ROTATION_CONFIG_WIDTH(width) |
+ VIVS_DE_DEST_ROTATION_CONFIG_ROTATION_DISABLE);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_HEIGHT,
+ VIVS_DE_DEST_ROTATION_HEIGHT_HEIGHT(height));
+ etna_set_state(ctx, VIVS_DE_DEST_CONFIG,
+ VIVS_DE_DEST_CONFIG_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_DEST_CONFIG_COMMAND_BIT_BLT |
+ VIVS_DE_DEST_CONFIG_SWIZZLE(DE_SWIZZLE_ARGB) |
+ VIVS_DE_DEST_CONFIG_TILED_DISABLE |
+ VIVS_DE_DEST_CONFIG_MINOR_TILED_DISABLE
+ );
+ etna_set_state(ctx, VIVS_DE_ROP,
+ VIVS_DE_ROP_ROP_FG(0xcc) | VIVS_DE_ROP_ROP_BG(0xcc) | VIVS_DE_ROP_TYPE_ROP4);
+ etna_set_state(ctx, VIVS_DE_CLIP_TOP_LEFT,
+ VIVS_DE_CLIP_TOP_LEFT_X(0) |
+ VIVS_DE_CLIP_TOP_LEFT_Y(0)
+ );
+ etna_set_state(ctx, VIVS_DE_CLIP_BOTTOM_RIGHT,
+ VIVS_DE_CLIP_BOTTOM_RIGHT_X(width) |
+ VIVS_DE_CLIP_BOTTOM_RIGHT_Y(height)
+ );
+ etna_set_state(ctx, VIVS_DE_CONFIG,
+ VIVS_DE_CONFIG_MIRROR_BLT_ENABLE_OFF |
+ VIVS_DE_CONFIG_MIRROR_BLT_MODE_NORMAL
+ );
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN_FRACTION, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_ROT_ANGLE, 0);
+
+ /* Clear color PE20 */
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE32, 0xff40ff40);
+ /* Clear color PE10 */
+ etna_set_state(ctx, VIVS_DE_CLEAR_BYTE_MASK, 0xff);
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE_LOW, 0xff40ff40);
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE_HIGH, 0xff40ff40);
+
+ etna_set_state(ctx, VIVS_DE_DEST_COLOR_KEY, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_SRC_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_DEST_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_COLOR_MULTIPLY_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_PE_TRANSPARENCY, 0);
+ etna_set_state(ctx, VIVS_DE_PE_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_LOW, 0xffffffff);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_HIGH, 0xffffffff);
+
+#define NUM_RECTS (1)
+ /* Queue DE command */
+ etna_reserve(ctx, 256*2 + 2);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_HEADER_OP_DRAW_2D |
+ VIV_FE_DRAW_2D_HEADER_COUNT(NUM_RECTS) |
+ VIV_FE_DRAW_2D_HEADER_DATA_COUNT(0);
+ (ctx)->offset++; /* rectangles start aligned */
+ for(int rec=0; rec<NUM_RECTS; ++rec)
+ {
+ int tgt_width = 200;
+ int tgt_height = 200;
+ int x1 = 28;
+ int y1 = 28;
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_TOP_LEFT_X(x1) |
+ VIV_FE_DRAW_2D_TOP_LEFT_Y(y1);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_BOTTOM_RIGHT_X(x1 + tgt_width) |
+ VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y(y1 + tgt_height);
+ }
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_PE2D);
+ etna_finish(ctx);
+ }
+ bmp_dump32_noflip(bmp->logical, width, height, true, "/tmp/fb.bmp");
+ printf("Dump complete\n");
+
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, NULL, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/test2d/clear2d.c b/src/test2d/clear2d.c
new file mode 100644
index 0000000..1997303
--- /dev/null
+++ b/src/test2d/clear2d.c
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Clear 256 small rectangles.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include <errno.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_2d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/etna_rs.h>
+
+#include "write_bmp.h"
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 256;
+
+ int padded_width = etna_align_up(width, 8);
+ int padded_height = etna_align_up(height, 1);
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_2D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ struct etna_vidmem *bmp = 0; /* bitmap */
+
+ size_t bmp_size = width * height * 4;
+
+ if(etna_vidmem_alloc_linear(conn, &bmp, bmp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK)
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* switch to 2D pipe */
+ etna_set_pipe(ctx, ETNA_PIPE_2D);
+ /* pre-clear surface. Could use the 2D engine for this,
+ * but we're lazy.
+ */
+ memset(bmp->logical, 0, bmp_size);
+ for(int frame=0; frame<1; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+
+ etna_set_state(ctx, VIVS_DE_SRC_ADDRESS, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_STRIDE, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_SIZE, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_BG, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_FG, 0);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_LOW, 0);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_HIGH, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ADDRESS, bmp->address);
+ etna_set_state(ctx, VIVS_DE_DEST_STRIDE, width*4);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_CONFIG,
+ VIVS_DE_DEST_CONFIG_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_DEST_CONFIG_COMMAND_CLEAR |
+ VIVS_DE_DEST_CONFIG_SWIZZLE(DE_SWIZZLE_ARGB) |
+ VIVS_DE_DEST_CONFIG_TILED_DISABLE |
+ VIVS_DE_DEST_CONFIG_MINOR_TILED_DISABLE
+ );
+ etna_set_state(ctx, VIVS_DE_ROP,
+ VIVS_DE_ROP_ROP_FG(0xcc) | VIVS_DE_ROP_ROP_BG(0xcc) | VIVS_DE_ROP_TYPE_ROP4);
+ etna_set_state(ctx, VIVS_DE_CLIP_TOP_LEFT,
+ VIVS_DE_CLIP_TOP_LEFT_X(0) |
+ VIVS_DE_CLIP_TOP_LEFT_Y(0)
+ );
+ etna_set_state(ctx, VIVS_DE_CLIP_BOTTOM_RIGHT,
+ VIVS_DE_CLIP_BOTTOM_RIGHT_X(width) |
+ VIVS_DE_CLIP_BOTTOM_RIGHT_Y(height)
+ );
+ etna_set_state(ctx, VIVS_DE_CONFIG, 0); /* TODO */
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN_FRACTION, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_ROT_ANGLE, 0);
+
+ /* Clear color PE20 */
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE32, 0xff40ff40);
+ /* Clear color PE10 */
+ etna_set_state(ctx, VIVS_DE_CLEAR_BYTE_MASK, 0xff);
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE_LOW, 0xff40ff40);
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE_HIGH, 0xff40ff40);
+
+ etna_set_state(ctx, VIVS_DE_DEST_COLOR_KEY, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_SRC_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_DEST_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_COLOR_MULTIPLY_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_PE_TRANSPARENCY, 0);
+ etna_set_state(ctx, VIVS_DE_PE_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_LOW, 0xffffffff);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_HIGH, 0xffffffff);
+
+#define NUM_RECTS (256)
+ /* Queue DE command */
+ etna_reserve(ctx, 256*2 + 2);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_HEADER_OP_DRAW_2D |
+ VIV_FE_DRAW_2D_HEADER_COUNT(NUM_RECTS); /* render one rectangle */
+ (ctx)->offset++; /* rectangles start aligned */
+ for(int rec=0; rec<NUM_RECTS; ++rec)
+ {
+ int x = rec%16;
+ int y = rec/16;
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_TOP_LEFT_X(x*8) |
+ VIV_FE_DRAW_2D_TOP_LEFT_Y(y*8);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_BOTTOM_RIGHT_X(x*8+4) |
+ VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y(y*8+4);
+ }
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_PE2D);
+ etna_finish(ctx);
+ }
+ bmp_dump32(bmp->logical, width, height, false, "/tmp/fb.bmp");
+ printf("Dump complete\n");
+
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, NULL, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/test2d/filterblt2d.c b/src/test2d/filterblt2d.c
new file mode 100644
index 0000000..6ac5ac5
--- /dev/null
+++ b/src/test2d/filterblt2d.c
@@ -0,0 +1,303 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Scale image using filter blit through video rasterizer
+ * (hardware scaling using arbitrary 9-tap kernel and 5 bit subpixel precision).
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_2d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/etna_rs.h>
+
+#include "write_bmp.h"
+#include "read_png.h"
+
+#define M_PIf 3.14159265358979323846f
+
+#define FB_ROWS_TOTAL (32)
+#define FB_ROWS_TO_STORE (FB_ROWS_TOTAL / 2 + 1)
+#define FB_NR_VALUES (9)
+#define FB_VALUES_TO_STORE (FB_ROWS_TO_STORE * FB_NR_VALUES)
+#define FB_EVEN_VALUE_COUNT ((FB_VALUES_TO_STORE + 1) & ~1)
+#define FB_DWORD_COUNT (FB_EVEN_VALUE_COUNT / 2)
+
+static inline float sinc(float x)
+{
+ if(x == 0.0f)
+ return 1.0f;
+ else
+ return sinf(x) / x;
+}
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 512;
+ int height = 256;
+
+ int padded_width = etna_align_up(width, 8);
+ int padded_height = etna_align_up(height, 1);
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_2D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ /* Read test image */
+ int src_width, src_height, src_stride;
+ uint32_t *src_data = 0;
+ if(!read_png("amethyst256.png", 8*4, &src_stride, &src_width, &src_height, &src_data))
+ {
+ printf("Unable to read amethyst256.png in current directory\n");
+ exit(1);
+ }
+
+ struct etna_vidmem *bmp = 0; /* bitmap */
+ struct etna_vidmem *src = 0; /* source */
+
+ size_t bmp_size = width * height * 4;
+ size_t src_size = src_stride * height;
+
+ if(etna_vidmem_alloc_linear(conn, &bmp, bmp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &src, src_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK)
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* switch to 2D pipe */
+ etna_set_pipe(ctx, ETNA_PIPE_2D);
+
+ /* pre-clear surface. Could use the 2D engine for this,
+ * but we're lazy.
+ */
+ for(int i=0; i<bmp_size/4; ++i)
+ ((uint32_t*)bmp->logical)[i] = 0xff404040;
+ memcpy(src->logical, src_data, src_size);
+
+ /* Compute lanczos filter kernel */
+ uint32_t filter_kernel[FB_DWORD_COUNT] = {0};
+ float kernel_in[FB_ROWS_TO_STORE][9] = {{0.0f}};
+ float row_ofs = 0.5f;
+ float radius = 4.0f;
+ for(int row_idx=0; row_idx<FB_ROWS_TO_STORE; ++row_idx)
+ {
+ for(int val_idx=0; val_idx<FB_NR_VALUES; ++val_idx)
+ {
+ float x = val_idx - 4.0f + row_ofs;
+ if(fabs(x) <= radius)
+ kernel_in[row_idx][val_idx] = sinc(M_PIf * x) * sinc(M_PIf * x / radius);
+ }
+ row_ofs -= 1.0 / FB_ROWS_TOTAL;
+ }
+
+ /* Normalize kernel */
+ for(int row_idx=0; row_idx<FB_ROWS_TO_STORE; ++row_idx)
+ {
+ float sum = 0.0f;
+ for(int val_idx=0; val_idx<FB_NR_VALUES; ++val_idx)
+ {
+ sum += kernel_in[row_idx][val_idx];
+ }
+ if(sum != 0)
+ {
+ for(int val_idx=0; val_idx<FB_NR_VALUES; ++val_idx)
+ {
+ kernel_in[row_idx][val_idx] /= sum;
+ }
+ }
+ }
+
+ /* Convert filter to state vector */
+ int ptr = 0;
+ for(int row_idx=0; row_idx<FB_ROWS_TO_STORE; ++row_idx)
+ {
+ for(int val_idx=0; val_idx<FB_NR_VALUES; ++val_idx)
+ {
+ /* -2.0 .. 2.0 to -0x8000..0x7fff
+ * (1.14 fixed point with sign bit)
+ */
+ float val = kernel_in[row_idx][val_idx] * (1<<14);
+ uint16_t bits = 0;
+ if(val <= -0x8000)
+ bits = 0x8000;
+ else if(val >= 0x7fff)
+ bits = 0x7fff;
+ else if(val >= 0)
+ bits = val;
+ else if(val < 0)
+ bits = val + 0x10000;
+ filter_kernel[ptr/2] |= bits << ((ptr&1)*16);
+ ++ptr;
+ }
+ }
+
+ for(int frame=0; frame<1; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+ /* Source configuration */
+ etna_set_state(ctx, VIVS_DE_SRC_ADDRESS, src->address);
+ etna_set_state(ctx, VIVS_DE_SRC_STRIDE, src_stride);
+ etna_set_state(ctx, VIVS_DE_UPLANE_ADDRESS, 0);
+ etna_set_state(ctx, VIVS_DE_UPLANE_STRIDE, 0);
+ etna_set_state(ctx, VIVS_DE_VPLANE_ADDRESS, 0);
+ etna_set_state(ctx, VIVS_DE_VPLANE_STRIDE, 0);
+
+ /* Are these used in VR blit?
+ * Likely, only the source format is.
+ */
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_CONFIG,
+ VIVS_DE_SRC_CONFIG_SOURCE_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_SRC_CONFIG_LOCATION_MEMORY |
+ VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT(DE_FORMAT_A8R8G8B8));
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN,
+ VIVS_DE_SRC_ORIGIN_X(0) |
+ VIVS_DE_SRC_ORIGIN_Y(0));
+ etna_set_state(ctx, VIVS_DE_SRC_SIZE,
+ VIVS_DE_SRC_SIZE_X(src_width) |
+ VIVS_DE_SRC_SIZE_Y(src_height)
+ ); // source size is ignored
+
+ /* Compute stretch factors */
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_LOW,
+ VIVS_DE_STRETCH_FACTOR_LOW_X(((src_width - 1) << 16) / (width - 1)));
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_HIGH,
+ VIVS_DE_STRETCH_FACTOR_HIGH_Y(((src_height - 1) << 16) / (height - 1)));
+
+ /* Destination setup */
+ etna_set_state(ctx, VIVS_DE_DEST_ADDRESS, bmp->address);
+ etna_set_state(ctx, VIVS_DE_DEST_STRIDE, width*4);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_CONFIG,
+ VIVS_DE_DEST_CONFIG_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_DEST_CONFIG_COMMAND_HOR_FILTER_BLT |
+ VIVS_DE_DEST_CONFIG_SWIZZLE(DE_SWIZZLE_ARGB) |
+ VIVS_DE_DEST_CONFIG_TILED_DISABLE |
+ VIVS_DE_DEST_CONFIG_MINOR_TILED_DISABLE
+ // | VIVS_DE_DEST_CONFIG_GDI_STRE_ENABLE
+ );
+ etna_set_state(ctx, VIVS_DE_ROP,
+ VIVS_DE_ROP_ROP_FG(0xcc) | VIVS_DE_ROP_ROP_BG(0xcc) | VIVS_DE_ROP_TYPE_ROP4);
+ /* Clipping rectangle (probably not used in VR blit) */
+ etna_set_state(ctx, VIVS_DE_CLIP_TOP_LEFT,
+ VIVS_DE_CLIP_TOP_LEFT_X(0) |
+ VIVS_DE_CLIP_TOP_LEFT_Y(0)
+ );
+ etna_set_state(ctx, VIVS_DE_CLIP_BOTTOM_RIGHT,
+ VIVS_DE_CLIP_BOTTOM_RIGHT_X(width) |
+ VIVS_DE_CLIP_BOTTOM_RIGHT_Y(height)
+ );
+
+ /* Misc DE/PE setup */
+ etna_set_state(ctx, VIVS_DE_CONFIG, 0); /* TODO */
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN_FRACTION, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_ROT_ANGLE, 0);
+
+ etna_set_state(ctx, VIVS_DE_DEST_COLOR_KEY, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_SRC_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_DEST_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_COLOR_MULTIPLY_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_PE_TRANSPARENCY, 0);
+ etna_set_state(ctx, VIVS_DE_PE_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_LOW, 0xffffffff);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_HIGH, 0xffffffff);
+
+ /* Program video rasterizer */
+ etna_set_state(ctx, VIVS_DE_VR_CONFIG_EX, 0);
+ etna_set_state(ctx, VIVS_DE_VR_SOURCE_IMAGE_LOW,
+ VIVS_DE_VR_SOURCE_IMAGE_LOW_LEFT(0) |
+ VIVS_DE_VR_SOURCE_IMAGE_LOW_TOP(0));
+ etna_set_state(ctx, VIVS_DE_VR_SOURCE_IMAGE_HIGH,
+ VIVS_DE_VR_SOURCE_IMAGE_HIGH_RIGHT(src_width) |
+ VIVS_DE_VR_SOURCE_IMAGE_HIGH_BOTTOM(src_height));
+
+ etna_set_state(ctx, VIVS_DE_VR_SOURCE_ORIGIN_LOW,
+ VIVS_DE_VR_SOURCE_ORIGIN_LOW_X(0));
+ etna_set_state(ctx, VIVS_DE_VR_SOURCE_ORIGIN_HIGH,
+ VIVS_DE_VR_SOURCE_ORIGIN_HIGH_Y(0));
+
+ etna_set_state(ctx, VIVS_DE_VR_TARGET_WINDOW_LOW,
+ VIVS_DE_VR_TARGET_WINDOW_LOW_LEFT(0) |
+ VIVS_DE_VR_TARGET_WINDOW_LOW_TOP(0));
+ etna_set_state(ctx, VIVS_DE_VR_TARGET_WINDOW_HIGH,
+ VIVS_DE_VR_TARGET_WINDOW_HIGH_RIGHT(width) |
+ VIVS_DE_VR_TARGET_WINDOW_HIGH_BOTTOM(height));
+
+ etna_set_state_multi(ctx, VIVS_DE_FILTER_KERNEL(0), FB_DWORD_COUNT, filter_kernel);
+
+ /* Kick off VR */
+ etna_set_state(ctx, VIVS_DE_VR_CONFIG,
+ VIVS_DE_VR_CONFIG_START_HORIZONTAL_BLIT);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_PE2D);
+ etna_finish(ctx);
+ }
+ bmp_dump32_noflip(bmp->logical, width, height, true, "/tmp/fb.bmp");
+ printf("Dump complete\n");
+
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, NULL, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
+
diff --git a/src/test2d/filterblt2d_fromplanar.c b/src/test2d/filterblt2d_fromplanar.c
new file mode 100644
index 0000000..0defc89
--- /dev/null
+++ b/src/test2d/filterblt2d_fromplanar.c
@@ -0,0 +1,377 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Filter blit through video rasterizer.
+ * Source from planar YV12 surface.
+ * Use a horizontal and vertical pass to scale image in both directions using a
+ * sinc filter.
+ * Newer GPUs can do a "one pass blit" as well, but will leave that for another time.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <math.h>
+
+#include <errno.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_2d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/etna_rs.h>
+
+#include "write_bmp.h"
+#include "read_png.h"
+
+#define M_PIf 3.14159265358979323846f
+
+#define FB_ROWS_TOTAL (32)
+#define FB_ROWS_TO_STORE (FB_ROWS_TOTAL / 2 + 1)
+#define FB_NR_VALUES (9)
+#define FB_VALUES_TO_STORE (FB_ROWS_TO_STORE * FB_NR_VALUES)
+#define FB_EVEN_VALUE_COUNT ((FB_VALUES_TO_STORE + 1) & ~1)
+#define FB_DWORD_COUNT (FB_EVEN_VALUE_COUNT / 2)
+
+static inline float sinc(float x)
+{
+ if(x == 0.0f)
+ return 1.0f;
+ else
+ return sinf(x) / x;
+}
+
+int main(int argc, char **argv)
+{
+ int rv;
+ /* target width and height */
+ int width = 176*2;
+ int height = 144*2;
+
+ int padded_width = etna_align_up(width, 8);
+ int padded_height = etna_align_up(height, 1);
+
+ int dest_stride = padded_width * 4;
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_2D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ /* Allocate target bitmap */
+ struct etna_vidmem *bmp = 0;
+ size_t bmp_size = dest_stride * height;
+ if(etna_vidmem_alloc_linear(conn, &bmp, bmp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true) != ETNA_OK)
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ /* Allocate and read test YV12 image */
+ struct etna_vidmem *src[3] = {0}; /* source */
+ int src_width[3], src_height[3], src_stride[3];
+ size_t src_size[3];
+ src_width[0] = 284;
+ src_height[0] = 160;
+ src_stride[0] = etna_align_up(src_width[0], 8);
+ src_width[1] = src_width[0] / 2;
+ src_height[1] = src_height[0] / 2;
+ src_stride[1] = etna_align_up(src_width[1], 8);
+ src_width[2] = src_width[0] / 2;
+ src_height[2] = src_height[0] / 2;
+ src_stride[2] = etna_align_up(src_width[2], 8);
+
+ for(int plane=0; plane<3; ++plane)
+ {
+ src_size[plane] = src_stride[plane] * src_height[plane];
+ if(etna_vidmem_alloc_linear(conn, &src[plane], src_size[plane], VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true) != ETNA_OK)
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+ }
+
+ FILE *f = fopen("bigbuckbunny_yv12.yuv","rb");
+ if(f == NULL)
+ {
+ printf("Cannot open test image bigbuckbunny_yv12.yuv\n");
+ exit(1);
+ }
+ for(int plane=0; plane<3; ++plane)
+ {
+ for(int line=0; line<src_height[plane]; ++line)
+ fread(src[plane]->logical + src_stride[plane]*line, etna_align_up(src_width[plane], 4), 1, f);
+ }
+ fclose(f);
+ printf("Succesfully loaded test image\n");
+ // Debug: uncomment to disable planes
+ //memset(src[0]->logical, 0, src_stride[0]*src_height[0]);
+ //memset(src[1]->logical, 0, src_stride[1]*src_height[1]);
+ //memset(src[2]->logical, 0, src_stride[2]*src_height[2]);
+
+ /* Allocate temporary surface for scaling */
+ struct etna_vidmem *temp = 0;
+ size_t temp_width = width; // horizontal pass first
+ size_t temp_height = src_height[0];
+ size_t temp_stride = etna_align_up(temp_width, 8) * 4; // always align to 8 pixels
+ size_t temp_size = temp_stride * temp_height;
+ if(etna_vidmem_alloc_linear(conn, &temp, temp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true) != ETNA_OK)
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* switch to 2D pipe */
+ etna_set_pipe(ctx, ETNA_PIPE_2D);
+
+ /* pre-clear surface. Could use the 2D engine for this,
+ * but we're lazy.
+ */
+ for(int i=0; i<bmp_size/4; ++i)
+ ((uint32_t*)bmp->logical)[i] = 0xff404040;
+
+ /* Compute lanczos filter kernel */
+ uint32_t filter_kernel[FB_DWORD_COUNT] = {0};
+ float kernel_in[FB_ROWS_TO_STORE][9] = {{0.0f}};
+ float row_ofs = 0.5f;
+ float radius = 4.0f;
+ for(int row_idx=0; row_idx<FB_ROWS_TO_STORE; ++row_idx)
+ {
+ for(int val_idx=0; val_idx<FB_NR_VALUES; ++val_idx)
+ {
+ float x = val_idx - 4.0f + row_ofs;
+ if(fabs(x) <= radius)
+ kernel_in[row_idx][val_idx] = sinc(M_PIf * x) * sinc(M_PIf * x / radius);
+ }
+ row_ofs -= 1.0 / FB_ROWS_TOTAL;
+ }
+
+ /* Normalize kernel */
+ for(int row_idx=0; row_idx<FB_ROWS_TO_STORE; ++row_idx)
+ {
+ float sum = 0.0f;
+ for(int val_idx=0; val_idx<FB_NR_VALUES; ++val_idx)
+ {
+ sum += kernel_in[row_idx][val_idx];
+ }
+ if(sum != 0)
+ {
+ for(int val_idx=0; val_idx<FB_NR_VALUES; ++val_idx)
+ {
+ kernel_in[row_idx][val_idx] /= sum;
+ }
+ }
+ }
+
+ /* Convert filter to state vector */
+ int ptr = 0;
+ for(int row_idx=0; row_idx<FB_ROWS_TO_STORE; ++row_idx)
+ {
+ for(int val_idx=0; val_idx<FB_NR_VALUES; ++val_idx)
+ {
+ /* -2.0 .. 2.0 to -0x8000..0x7fff
+ * (1.14 fixed point with sign bit)
+ */
+ float val = kernel_in[row_idx][val_idx] * (1<<14);
+ uint16_t bits = 0;
+ if(val <= -0x8000)
+ bits = 0x8000;
+ else if(val >= 0x7fff)
+ bits = 0x7fff;
+ else if(val >= 0)
+ bits = val;
+ else if(val < 0)
+ bits = val + 0x10000;
+ filter_kernel[ptr/2] |= bits << ((ptr&1)*16);
+ ++ptr;
+ }
+ }
+
+ for(int frame=0; frame<1; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+ printf("[%ix%i] -> [%ix%i] -> [%ix%i]\n",
+ src_width[0], src_height[0],
+ temp_width, temp_height,
+ width, height);
+ /*((( Horizontal pass )))*/
+
+ /* Source configuration */
+ etna_set_state(ctx, VIVS_DE_SRC_ADDRESS, src[0]->address);
+ etna_set_state(ctx, VIVS_DE_SRC_STRIDE, src_stride[0]);
+ etna_set_state(ctx, VIVS_DE_UPLANE_ADDRESS, src[1]->address);
+ etna_set_state(ctx, VIVS_DE_UPLANE_STRIDE, src_stride[1]);
+ etna_set_state(ctx, VIVS_DE_VPLANE_ADDRESS, src[2]->address);
+ etna_set_state(ctx, VIVS_DE_VPLANE_STRIDE, src_stride[2]);
+
+ /* Are these used in VR blit?
+ * Likely, only the source format is.
+ */
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_CONFIG,
+ VIVS_DE_SRC_CONFIG_SOURCE_FORMAT(DE_FORMAT_YV12) |
+ VIVS_DE_SRC_CONFIG_LOCATION_MEMORY |
+ VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT(DE_FORMAT_YV12));
+
+ /* Compute stretch factors */
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_LOW,
+ VIVS_DE_STRETCH_FACTOR_LOW_X(((src_width[0] - 1) << 16) / (width - 1)));
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_HIGH,
+ VIVS_DE_STRETCH_FACTOR_HIGH_Y(((src_height[0] - 1) << 16) / (height - 1)));
+
+ /* Destination setup */
+ etna_set_state(ctx, VIVS_DE_DEST_ADDRESS, temp->address);
+ etna_set_state(ctx, VIVS_DE_DEST_STRIDE, temp_stride);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_CONFIG,
+ VIVS_DE_DEST_CONFIG_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_DEST_CONFIG_SWIZZLE(DE_SWIZZLE_ARGB) |
+ VIVS_DE_DEST_CONFIG_TILED_DISABLE |
+ VIVS_DE_DEST_CONFIG_MINOR_TILED_DISABLE
+ // | VIVS_DE_DEST_CONFIG_GDI_STRE_ENABLE
+ );
+ etna_set_state(ctx, VIVS_DE_ROP,
+ VIVS_DE_ROP_ROP_FG(0xcc) | VIVS_DE_ROP_ROP_BG(0xcc) | VIVS_DE_ROP_TYPE_ROP4);
+
+ /* Clipping rectangle (not used in VR blit) */
+ etna_set_state(ctx, VIVS_DE_CLIP_TOP_LEFT, 0);
+ etna_set_state(ctx, VIVS_DE_CLIP_BOTTOM_RIGHT, 0);
+ /* Source size and origin not used in VR blit */
+ etna_set_state(ctx, VIVS_DE_SRC_SIZE, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN, 0);
+
+ /* Misc DE/PE setup */
+ etna_set_state(ctx, VIVS_DE_CONFIG, 0); /* TODO */
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN_FRACTION, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_ROT_ANGLE, 0);
+
+ etna_set_state(ctx, VIVS_DE_DEST_COLOR_KEY, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_SRC_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_DEST_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_COLOR_MULTIPLY_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_PE_TRANSPARENCY, 0);
+ etna_set_state(ctx, VIVS_DE_PE_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_LOW, 0xffffffff);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_HIGH, 0xffffffff);
+
+ /* Program video rasterizer */
+ etna_set_state(ctx, VIVS_DE_VR_CONFIG_EX, 0);
+ etna_set_state(ctx, VIVS_DE_VR_SOURCE_IMAGE_LOW,
+ VIVS_DE_VR_SOURCE_IMAGE_LOW_LEFT(0) |
+ VIVS_DE_VR_SOURCE_IMAGE_LOW_TOP(0));
+ etna_set_state(ctx, VIVS_DE_VR_SOURCE_IMAGE_HIGH,
+ VIVS_DE_VR_SOURCE_IMAGE_HIGH_RIGHT(src_width[0]) |
+ VIVS_DE_VR_SOURCE_IMAGE_HIGH_BOTTOM(src_height[0]));
+
+ etna_set_state(ctx, VIVS_DE_VR_SOURCE_ORIGIN_LOW,
+ VIVS_DE_VR_SOURCE_ORIGIN_LOW_X(0));
+ etna_set_state(ctx, VIVS_DE_VR_SOURCE_ORIGIN_HIGH,
+ VIVS_DE_VR_SOURCE_ORIGIN_HIGH_Y(0));
+
+ etna_set_state(ctx, VIVS_DE_VR_TARGET_WINDOW_LOW,
+ VIVS_DE_VR_TARGET_WINDOW_LOW_LEFT(0) |
+ VIVS_DE_VR_TARGET_WINDOW_LOW_TOP(0));
+ etna_set_state(ctx, VIVS_DE_VR_TARGET_WINDOW_HIGH,
+ VIVS_DE_VR_TARGET_WINDOW_HIGH_RIGHT(temp_width) |
+ VIVS_DE_VR_TARGET_WINDOW_HIGH_BOTTOM(temp_height));
+
+ etna_set_state_multi(ctx, VIVS_DE_FILTER_KERNEL(0), FB_DWORD_COUNT, filter_kernel);
+
+ /* Kick off VR */
+ etna_set_state(ctx, VIVS_DE_VR_CONFIG,
+ VIVS_DE_VR_CONFIG_START_HORIZONTAL_BLIT);
+
+ /* (((Vertical pass))) */
+ etna_set_state(ctx, VIVS_DE_SRC_ADDRESS, temp->address);
+ etna_set_state(ctx, VIVS_DE_SRC_STRIDE, temp_stride);
+ etna_set_state(ctx, VIVS_DE_UPLANE_ADDRESS, 0);
+ etna_set_state(ctx, VIVS_DE_UPLANE_STRIDE, 0);
+ etna_set_state(ctx, VIVS_DE_VPLANE_ADDRESS, 0);
+ etna_set_state(ctx, VIVS_DE_VPLANE_STRIDE, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_CONFIG,
+ VIVS_DE_SRC_CONFIG_SOURCE_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_SRC_CONFIG_LOCATION_MEMORY |
+ VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT(DE_FORMAT_A8R8G8B8));
+ etna_set_state(ctx, VIVS_DE_VR_SOURCE_IMAGE_LOW,
+ VIVS_DE_VR_SOURCE_IMAGE_LOW_LEFT(0) |
+ VIVS_DE_VR_SOURCE_IMAGE_LOW_TOP(0));
+ etna_set_state(ctx, VIVS_DE_VR_SOURCE_IMAGE_HIGH,
+ VIVS_DE_VR_SOURCE_IMAGE_HIGH_RIGHT(temp_width) |
+ VIVS_DE_VR_SOURCE_IMAGE_HIGH_BOTTOM(temp_height));
+
+ etna_set_state(ctx, VIVS_DE_DEST_ADDRESS, bmp->address);
+ etna_set_state(ctx, VIVS_DE_DEST_STRIDE, dest_stride);
+
+ etna_set_state(ctx, VIVS_DE_VR_TARGET_WINDOW_LOW,
+ VIVS_DE_VR_TARGET_WINDOW_LOW_LEFT(0) |
+ VIVS_DE_VR_TARGET_WINDOW_LOW_TOP(0));
+ etna_set_state(ctx, VIVS_DE_VR_TARGET_WINDOW_HIGH,
+ VIVS_DE_VR_TARGET_WINDOW_HIGH_RIGHT(width) |
+ VIVS_DE_VR_TARGET_WINDOW_HIGH_BOTTOM(height));
+
+ /* Kick off VR */
+ etna_set_state(ctx, VIVS_DE_VR_CONFIG,
+ VIVS_DE_VR_CONFIG_START_VERTICAL_BLIT);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_PE2D);
+ etna_finish(ctx);
+ }
+ bmp_dump32_noflip(bmp->logical, width, height, true, "/tmp/fb.bmp");
+ printf("Dump complete\n");
+
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, NULL, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
+
diff --git a/src/test2d/line2d.c b/src/test2d/line2d.c
new file mode 100644
index 0000000..abb407a
--- /dev/null
+++ b/src/test2d/line2d.c
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Draw 256 random lines.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include <errno.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_2d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/etna_rs.h>
+
+#include "write_bmp.h"
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 256;
+
+ int padded_width = etna_align_up(width, 8);
+ int padded_height = etna_align_up(height, 1);
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_2D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ struct etna_vidmem *bmp = 0; /* bitmap */
+ struct etna_vidmem *src = 0; /* source */
+
+ size_t bmp_size = width * height * 4;
+ size_t src_size = width * height * 4;
+
+ if(etna_vidmem_alloc_linear(conn, &bmp, bmp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &src, src_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK)
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* switch to 2D pipe */
+ etna_set_pipe(ctx, ETNA_PIPE_2D);
+ /* pre-clear surface. Could use the 2D engine for this,
+ * but we're lazy.
+ */
+ memset(src->logical, 255, src_size);
+ memset(bmp->logical, 0, bmp_size);
+ for(int frame=0; frame<1; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+
+ etna_set_state(ctx, VIVS_DE_SRC_ADDRESS, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_STRIDE, width*4);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_CONFIG,
+ VIVS_DE_SRC_CONFIG_UNK16 |
+ VIVS_DE_SRC_CONFIG_SOURCE_FORMAT(DE_FORMAT_MONOCHROME) |
+ VIVS_DE_SRC_CONFIG_LOCATION_MEMORY |
+ VIVS_DE_SRC_CONFIG_PACK_PACKED8 |
+ VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT(DE_FORMAT_MONOCHROME));
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_SIZE, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_BG, 0xff44ff44);
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_FG, 0xff44ff44);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_LOW, 0);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_HIGH, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ADDRESS, bmp->address);
+ etna_set_state(ctx, VIVS_DE_DEST_STRIDE, width*4);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_CONFIG,
+ VIVS_DE_DEST_CONFIG_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_DEST_CONFIG_COMMAND_LINE |
+ VIVS_DE_DEST_CONFIG_SWIZZLE(DE_SWIZZLE_ARGB) |
+ VIVS_DE_DEST_CONFIG_TILED_DISABLE |
+ VIVS_DE_DEST_CONFIG_MINOR_TILED_DISABLE
+ );
+ etna_set_state(ctx, VIVS_DE_ROP,
+ VIVS_DE_ROP_ROP_FG(0xcc) | VIVS_DE_ROP_ROP_BG(0xcc) | VIVS_DE_ROP_TYPE_ROP4);
+ etna_set_state(ctx, VIVS_DE_CLIP_TOP_LEFT,
+ VIVS_DE_CLIP_TOP_LEFT_X(0) |
+ VIVS_DE_CLIP_TOP_LEFT_Y(0)
+ );
+ etna_set_state(ctx, VIVS_DE_CLIP_BOTTOM_RIGHT,
+ VIVS_DE_CLIP_BOTTOM_RIGHT_X(width) |
+ VIVS_DE_CLIP_BOTTOM_RIGHT_Y(height)
+ );
+ etna_set_state(ctx, VIVS_DE_CONFIG, 0); /* TODO */
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN_FRACTION, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_ROT_ANGLE, 0);
+
+ /* Clear color PE20 */
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE32, 0xff40ff40);
+ /* Clear color PE10 */
+ etna_set_state(ctx, VIVS_DE_CLEAR_BYTE_MASK, 0xff);
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE_LOW, 0xff40ff40);
+ etna_set_state(ctx, VIVS_DE_CLEAR_PIXEL_VALUE_HIGH, 0xff40ff40);
+
+ etna_set_state(ctx, VIVS_DE_DEST_COLOR_KEY, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_SRC_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_DEST_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_COLOR_MULTIPLY_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_PE_TRANSPARENCY, 0);
+ etna_set_state(ctx, VIVS_DE_PE_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_LOW, 0xffffffff);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_HIGH, 0xffffffff);
+
+#define NUM_RECTS (256)
+ /* Queue DE command */
+ etna_reserve(ctx, 256*2 + 2);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_HEADER_OP_DRAW_2D |
+ VIV_FE_DRAW_2D_HEADER_COUNT(NUM_RECTS);
+ (ctx)->offset++; /* rectangles start aligned */
+ for(int rec=0; rec<NUM_RECTS; ++rec)
+ {
+#if 1
+ int x1 = rand() % 256;
+ int y1 = rand() % 256;
+ int x2 = rand() % 256;
+ int y2 = rand() % 256;
+#else
+ int x1 = 0;
+ int y1 = rec;
+ int x2 = 256;
+ int y2 = rec;
+#endif
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_TOP_LEFT_X(x1) |
+ VIV_FE_DRAW_2D_TOP_LEFT_Y(y1);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_BOTTOM_RIGHT_X(x2) |
+ VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y(y2);
+ }
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_PE2D);
+ etna_finish(ctx);
+ }
+ bmp_dump32(bmp->logical, width, height, false, "/tmp/fb.bmp");
+ printf("Dump complete\n");
+
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, NULL, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/test2d/line2d_patterned.c b/src/test2d/line2d_patterned.c
new file mode 100644
index 0000000..a9f1d18
--- /dev/null
+++ b/src/test2d/line2d_patterned.c
@@ -0,0 +1,205 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Draw color-patterned lines.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include <errno.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_2d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/etna_rs.h>
+
+#include "write_bmp.h"
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 256;
+
+ int padded_width = etna_align_up(width, 8);
+ int padded_height = etna_align_up(height, 1);
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_2D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ struct etna_vidmem *bmp = 0; /* bitmap */
+ struct etna_vidmem *src = 0; /* source */
+
+ size_t bmp_size = width * height * 4;
+ size_t src_size = width * height * 4;
+
+ if(etna_vidmem_alloc_linear(conn, &bmp, bmp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &src, src_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK)
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* switch to 2D pipe */
+ etna_set_pipe(ctx, ETNA_PIPE_2D);
+ /* pre-clear surface. Could use the 2D engine for this,
+ * but we're lazy.
+ */
+ for(int i=0; i<bmp_size/4; ++i)
+ ((uint32_t*)bmp->logical)[i] = 0xff000000;
+
+ /* Make pattern */
+ for(int y=0; y<8; ++y)
+ {
+ for(int x=0; x<8; ++x)
+ {
+ uint8_t a = 0xff;
+ uint8_t r = x*32;
+ uint8_t g = y*32;
+ uint8_t b = 0x12;
+ ((uint32_t*)src->logical)[y*8+x] = ((uint32_t)a << 24)|((uint32_t)b<<16)|((uint32_t)g<<8)|(uint32_t)r;
+ }
+ }
+ for(int frame=0; frame<1; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+
+ etna_set_state(ctx, VIVS_DE_SRC_ADDRESS, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_STRIDE, width*4);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_CONFIG,
+ VIVS_DE_SRC_CONFIG_UNK16 |
+ VIVS_DE_SRC_CONFIG_SOURCE_FORMAT(DE_FORMAT_MONOCHROME) |
+ VIVS_DE_SRC_CONFIG_LOCATION_MEMORY |
+ VIVS_DE_SRC_CONFIG_PACK_PACKED8 |
+ VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT(DE_FORMAT_MONOCHROME));
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_SIZE, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_BG, 0xff44ff44);
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_FG, 0xff44ff44);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_LOW, 0);
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_HIGH, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ADDRESS, bmp->address);
+ etna_set_state(ctx, VIVS_DE_DEST_STRIDE, width*4);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_CONFIG,
+ VIVS_DE_DEST_CONFIG_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_DEST_CONFIG_COMMAND_LINE |
+ VIVS_DE_DEST_CONFIG_SWIZZLE(DE_SWIZZLE_ARGB) |
+ VIVS_DE_DEST_CONFIG_TILED_DISABLE |
+ VIVS_DE_DEST_CONFIG_MINOR_TILED_DISABLE
+ );
+ etna_set_state(ctx, VIVS_DE_ROP,
+ VIVS_DE_ROP_ROP_FG(0xf0) | VIVS_DE_ROP_ROP_BG(0xf0) | VIVS_DE_ROP_TYPE_ROP4);
+ etna_set_state(ctx, VIVS_DE_CLIP_TOP_LEFT,
+ VIVS_DE_CLIP_TOP_LEFT_X(0) |
+ VIVS_DE_CLIP_TOP_LEFT_Y(0)
+ );
+ etna_set_state(ctx, VIVS_DE_CLIP_BOTTOM_RIGHT,
+ VIVS_DE_CLIP_BOTTOM_RIGHT_X(width) |
+ VIVS_DE_CLIP_BOTTOM_RIGHT_Y(height)
+ );
+ etna_set_state(ctx, VIVS_DE_CONFIG, 0); /* TODO */
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN_FRACTION, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_ROT_ANGLE, 0);
+
+ etna_set_state(ctx, VIVS_DE_PATTERN_ADDRESS, src->address);
+ etna_set_state(ctx, VIVS_DE_PATTERN_CONFIG,
+ VIVS_DE_PATTERN_CONFIG_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_PATTERN_CONFIG_TYPE_PATTERN);
+ etna_set_state(ctx, VIVS_DE_PATTERN_MASK_LOW, 0xffffffff);
+ etna_set_state(ctx, VIVS_DE_PATTERN_MASK_HIGH, 0xffffffff);
+
+ etna_set_state(ctx, VIVS_DE_DEST_COLOR_KEY, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_SRC_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_DEST_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_COLOR_MULTIPLY_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_PE_TRANSPARENCY, 0);
+ etna_set_state(ctx, VIVS_DE_PE_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_LOW, 0xffffffff);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_HIGH, 0xffffffff);
+
+#define NUM_RECTS (2)
+ /* Queue DE command */
+ etna_reserve(ctx, 256*2 + 2);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_HEADER_OP_DRAW_2D |
+ VIV_FE_DRAW_2D_HEADER_COUNT(NUM_RECTS);
+ (ctx)->offset++; /* rectangles start aligned */
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_TOP_LEFT_X(0) |
+ VIV_FE_DRAW_2D_TOP_LEFT_Y(0);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_BOTTOM_RIGHT_X(width) |
+ VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y(height);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_TOP_LEFT_X(width) |
+ VIV_FE_DRAW_2D_TOP_LEFT_Y(0);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_BOTTOM_RIGHT_X(0) |
+ VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y(height);
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_PE2D);
+ etna_finish(ctx);
+ }
+ bmp_dump32(bmp->logical, width, height, false, "/tmp/fb.bmp");
+ printf("Dump complete\n");
+
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, NULL, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/test2d/stretchblt2d.c b/src/test2d/stretchblt2d.c
new file mode 100644
index 0000000..4e32697
--- /dev/null
+++ b/src/test2d/stretchblt2d.c
@@ -0,0 +1,216 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Use stretch blit. A stretch blit scales up an image with a point
+ * (nearest) filter.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include <errno.h>
+
+#include <etnaviv/common.xml.h>
+#include <etnaviv/state.xml.h>
+#include <etnaviv/state_2d.xml.h>
+#include <etnaviv/cmdstream.xml.h>
+#include <etnaviv/viv.h>
+#include <etnaviv/etna.h>
+#include <etnaviv/etna_mem.h>
+#include <etnaviv/etna_util.h>
+#include <etnaviv/etna_rs.h>
+
+#include "write_bmp.h"
+
+int main(int argc, char **argv)
+{
+ int rv;
+ int width = 256;
+ int height = 256;
+
+ int padded_width = etna_align_up(width, 8);
+ int padded_height = etna_align_up(height, 1);
+
+ printf("padded_width %i padded_height %i\n", padded_width, padded_height);
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_2D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device\n");
+
+ struct etna_vidmem *bmp = 0; /* bitmap */
+ struct etna_vidmem *src = 0; /* source */
+
+ size_t bmp_size = width * height * 4;
+ size_t src_size = width * height * 4;
+
+ if(etna_vidmem_alloc_linear(conn, &bmp, bmp_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK ||
+ etna_vidmem_alloc_linear(conn, &src, src_size, VIV_SURF_BITMAP, VIV_POOL_DEFAULT, true)!=ETNA_OK)
+ {
+ fprintf(stderr, "Error allocating video memory\n");
+ exit(1);
+ }
+
+ struct etna_ctx *ctx = 0;
+ if(etna_create(conn, &ctx) != ETNA_OK)
+ {
+ printf("Unable to create context\n");
+ exit(1);
+ }
+
+ /* switch to 2D pipe */
+ etna_set_pipe(ctx, ETNA_PIPE_2D);
+ /* pre-clear surface. Could use the 2D engine for this,
+ * but we're lazy.
+ */
+ for(int i=0; i<bmp_size/4; ++i)
+ ((uint32_t*)bmp->logical)[i] = 0xff000000;
+ for(int i=0; i<bmp_size/4; ++i)
+ ((uint32_t*)src->logical)[i] = 0xff808080;
+
+ /* Size of source rectangle */
+ int src_width = 2;
+ int src_height = 2;
+ int src_stride = width*4;
+ ((uint32_t*)src->logical)[0] = 0xffff0000;
+ ((uint32_t*)src->logical)[1] = 0xff00ff00;
+ ((uint32_t*)src->logical)[src_stride/4+0] = 0xffff00ff;
+ ((uint32_t*)src->logical)[src_stride/4+1] = 0xff00ffff;
+
+ /* Size of destination rectangle */
+ int dst_width = 30;
+ int dst_height = 30;
+
+ for(int frame=0; frame<1; ++frame)
+ {
+ printf("*** FRAME %i ****\n", frame);
+
+ etna_set_state(ctx, VIVS_DE_SRC_ADDRESS, src->address);
+ etna_set_state(ctx, VIVS_DE_SRC_STRIDE, src_stride);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_CONFIG,
+ VIVS_DE_SRC_CONFIG_SOURCE_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_SRC_CONFIG_LOCATION_MEMORY |
+ VIVS_DE_SRC_CONFIG_PE10_SOURCE_FORMAT(DE_FORMAT_A8R8G8B8));
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN,
+ VIVS_DE_SRC_ORIGIN_X(0) |
+ VIVS_DE_SRC_ORIGIN_Y(0));
+ etna_set_state(ctx, VIVS_DE_SRC_SIZE,
+ VIVS_DE_SRC_SIZE_X(src_width) |
+ VIVS_DE_SRC_SIZE_Y(src_height)
+ ); // source size is ignored
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_BG, 0xff303030);
+ etna_set_state(ctx, VIVS_DE_SRC_COLOR_FG, 0xff12ff56);
+ /* Compute stretch factors */
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_LOW,
+ VIVS_DE_STRETCH_FACTOR_LOW_X(((src_width - 1) << 16) / (dst_width - 1)));
+ etna_set_state(ctx, VIVS_DE_STRETCH_FACTOR_HIGH,
+ VIVS_DE_STRETCH_FACTOR_HIGH_Y(((src_height - 1) << 16) / (dst_height - 1)));
+ printf("%08x\n", ((src_width - 1) << 16) / (dst_width - 1));
+ printf("%08x\n", ((src_height - 1) << 16) / (dst_height - 1));
+ /* Destination setup */
+ etna_set_state(ctx, VIVS_DE_DEST_ADDRESS, bmp->address);
+ etna_set_state(ctx, VIVS_DE_DEST_STRIDE, width*4);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_CONFIG, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_CONFIG,
+ VIVS_DE_DEST_CONFIG_FORMAT(DE_FORMAT_A8R8G8B8) |
+ VIVS_DE_DEST_CONFIG_COMMAND_STRETCH_BLT |
+ VIVS_DE_DEST_CONFIG_SWIZZLE(DE_SWIZZLE_ARGB) |
+ VIVS_DE_DEST_CONFIG_TILED_DISABLE |
+ VIVS_DE_DEST_CONFIG_MINOR_TILED_DISABLE
+ // | VIVS_DE_DEST_CONFIG_GDI_STRE_ENABLE
+ );
+ etna_set_state(ctx, VIVS_DE_ROP,
+ VIVS_DE_ROP_ROP_FG(0xcc) | VIVS_DE_ROP_ROP_BG(0xcc) | VIVS_DE_ROP_TYPE_ROP4);
+ etna_set_state(ctx, VIVS_DE_CLIP_TOP_LEFT,
+ VIVS_DE_CLIP_TOP_LEFT_X(0) |
+ VIVS_DE_CLIP_TOP_LEFT_Y(0)
+ );
+ etna_set_state(ctx, VIVS_DE_CLIP_BOTTOM_RIGHT,
+ VIVS_DE_CLIP_BOTTOM_RIGHT_X(width) |
+ VIVS_DE_CLIP_BOTTOM_RIGHT_Y(height)
+ );
+ etna_set_state(ctx, VIVS_DE_CONFIG, 0); /* TODO */
+ etna_set_state(ctx, VIVS_DE_SRC_ORIGIN_FRACTION, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_ALPHA_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_DEST_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_SRC_ROTATION_HEIGHT, 0);
+ etna_set_state(ctx, VIVS_DE_ROT_ANGLE, 0);
+
+ etna_set_state(ctx, VIVS_DE_DEST_COLOR_KEY, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_SRC_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_GLOBAL_DEST_COLOR, 0);
+ etna_set_state(ctx, VIVS_DE_COLOR_MULTIPLY_MODES, 0);
+ etna_set_state(ctx, VIVS_DE_PE_TRANSPARENCY, 0);
+ etna_set_state(ctx, VIVS_DE_PE_CONTROL, 0);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_LOW, 0xffffffff);
+ etna_set_state(ctx, VIVS_DE_PE_DITHER_HIGH, 0xffffffff);
+
+#define NUM_RECTS (32)
+ /* Queue DE command */
+ etna_reserve(ctx, 256*2 + 2);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_HEADER_OP_DRAW_2D |
+ VIV_FE_DRAW_2D_HEADER_COUNT(NUM_RECTS) |
+ VIV_FE_DRAW_2D_HEADER_DATA_COUNT(0);
+ (ctx)->offset++; /* rectangles start aligned */
+ for(int rec=0; rec<NUM_RECTS; ++rec)
+ {
+ int x1 = (rand() % width) - 16;
+ int y1 = (rand() % height) - 16;
+ int x2 = x1 + dst_width;
+ int y2 = y1 + dst_height;
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_TOP_LEFT_X(x1) |
+ VIV_FE_DRAW_2D_TOP_LEFT_Y(y1);
+ (ctx)->buf[(ctx)->offset++] = VIV_FE_DRAW_2D_BOTTOM_RIGHT_X(x2) |
+ VIV_FE_DRAW_2D_BOTTOM_RIGHT_Y(y2);
+ }
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+ etna_set_state(ctx, 1, 0);
+
+ etna_set_state(ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_PE2D);
+ etna_finish(ctx);
+ }
+ bmp_dump32(bmp->logical, width, height, false, "/tmp/fb.bmp");
+ printf("Dump complete\n");
+
+ /* Unlock video memory */
+ if(etna_vidmem_unlock(conn, NULL, bmp) != 0)
+ {
+ fprintf(stderr, "Cannot unlock vidmem\n");
+ exit(1);
+ }
+
+ etna_free(ctx);
+ viv_close(conn);
+ return 0;
+}
diff --git a/src/utils/.gitignore b/src/utils/.gitignore
new file mode 100644
index 0000000..d25ae7f
--- /dev/null
+++ b/src/utils/.gitignore
@@ -0,0 +1,6 @@
+viv_gpu_top
+viv_info
+viv_registers
+viv_reset
+viv_watch
+viv_throughput
diff --git a/src/utils/Makefile b/src/utils/Makefile
new file mode 100644
index 0000000..f1ccb1b
--- /dev/null
+++ b/src/utils/Makefile
@@ -0,0 +1,45 @@
+TOP=..
+
+include $(TOP)/Makefile.inc
+
+COMMON_FLAGS += -I$(TOP)/driver
+CFLAGS +=
+CXXFLAGS +=
+LDFLAGS +=
+
+ifeq ($(ETNAVIV_PROFILER), 1)
+# Define ETNAVIV_PROFILER=1 if the kernel was built with VIVANTE_PROFILER
+# enabled
+COMMON_FLAGS += -DVIVANTE_PROFILER=1
+endif
+
+TARGETS = viv_gpu_top viv_info viv_registers viv_reset viv_watch viv_throughput
+
+ETNA_OBJS = ../etnaviv/libetnaviv.a
+DRIVER_OBJS = ../lib/fbdemos.o ../lib/etna_bswap.o ../driver/libetnadriver.a ../minigallium/libminigallium.a ../etnaviv/libetnaviv.a
+
+all: $(TARGETS)
+
+clean:
+ rm -f *.o ../lib/*.o ../resources/*.o
+ rm -f $(TARGETS)
+
+viv_gpu_top: viv_gpu_top.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+viv_info: viv_info.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+viv_registers: viv_registers.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+viv_reset: viv_reset.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+viv_watch: viv_watch.o $(ETNA_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+# viv_throughput is the only utility that needs the gallium pipe driver
+viv_throughput: viv_throughput.o $(DRIVER_OBJS)
+ $(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
diff --git a/src/utils/viv_gpu_top.c b/src/utils/viv_gpu_top.c
new file mode 100644
index 0000000..887c32d
--- /dev/null
+++ b/src/utils/viv_gpu_top.c
@@ -0,0 +1,537 @@
+/* Watch usage of Vivante GPU live.
+ * Needs profiling support built-in (build kernel and etnaviv with VIVANTE_PROFILER=1).
+ */
+
+/* Uncomment if the platform has the clock_gettime call, to use a monotonic
+ * clock */
+/* #define HAVE_CLOCK */
+
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <getopt.h>
+#ifdef HAVE_CLOCK
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+
+#include <etnaviv/viv.h>
+#include <etnaviv/viv_profile.h>
+#include <etnaviv/state_hi.xml.h>
+#include <etnaviv/state.xml.h>
+
+static const char *bars[] = {
+ " ",
+ "â–",
+ "â–Ž",
+ "â–",
+ "▌",
+ "â–‹",
+ "â–Š",
+ "â–‰",
+ "â–ˆ"
+};
+
+static const char clear_screen[] = {0x1b, '[', 'H',
+ 0x1b, '[', 'J',
+ 0x0};
+
+static const char color_num_max[] = "\x1b[1;37m";
+static const char color_num_zero[] = "\x1b[1;30m";
+static const char color_num[] = "\x1b[1;33m";
+static const char color_reset[] = "\x1b[0m";
+static const char color_percentage_1[] = "\x1b[38;5;154;48;5;236m";
+static const char color_percentage_2[] = "\x1b[38;5;112;48;5;236m";
+static const char color_title[] = "\x1b[38;5;249m";
+
+static void print_percentage_bar(float percent, int bar_width)
+{
+ int bar_avail_len = bar_width * 8;
+ int bar_len = bar_avail_len * (percent + .5) / 100.0;
+ int cur_line_len = 0;
+ int i;
+ if(bar_len > bar_avail_len)
+ bar_len = bar_avail_len;
+
+ for (i = bar_len; i >= 8; i -= 8) {
+ printf("%s", bars[8]);
+ cur_line_len++;
+ }
+ if (i) {
+ printf("%s", bars[i]);
+ cur_line_len++;
+ }
+
+ /* NB: We can't use a field width with utf8 so we manually
+ * guarantee a field with of 45 chars for any bar. */
+
+ printf("%*s", bar_width - cur_line_len, "");
+}
+
+/* Get time in microseconds */
+static unsigned long gettime(void)
+{
+#ifdef HAVE_CLOCK
+ struct timespec t;
+ clock_gettime(CLOCK_MONOTONIC, &t);
+ return (t.tv_nsec/1000 + (t.tv_sec * 1000000));
+#else
+ struct timeval t;
+ gettimeofday(&t, NULL);
+ return (t.tv_usec + (t.tv_sec * 1000000));
+#endif
+}
+
+/* Return number of lines and columns in the terminal */
+static void get_screen_size(int *lines, int *cols)
+{
+ struct winsize ws;
+ if (ioctl(0, TIOCGWINSZ, &ws) != -1)
+ {
+ *lines = ws.ws_row;
+ *cols = ws.ws_col;
+ } else {
+ *lines = 25; /* default */
+ *cols = 80;
+ }
+}
+
+/* Format unsigned 64 bit number with thousands separators.
+ * Result is always nul-terminated within outsz characters. */
+static void format_number(char *out, int outsz, uint64_t num)
+{
+ char temp[100];
+ int len;
+ int groups, group_size;
+ int in_ptr, out_ptr;
+ if(outsz == 0)
+ return;
+ snprintf(temp, sizeof(temp), "%llu", num);
+ len = strlen(temp);
+ /* group digits per three */
+ groups = (len+2) / 3;
+ group_size = len - (groups - 1) * 3; /* First group */
+ in_ptr = out_ptr = 0;
+ outsz -= 1;
+ for(int i=0; i<groups && out_ptr < outsz; ++i)
+ {
+ for(int j=0; j<group_size && out_ptr < outsz; ++j)
+ out[out_ptr++] = temp[in_ptr++];
+ if(i != (groups-1) && out_ptr < outsz)
+ out[out_ptr++] = ',';
+ group_size = 3;
+ }
+ out[out_ptr] = 0;
+}
+
+/****************************************************************************/
+
+enum display_mode
+{
+ MODE_PERF,
+ MODE_MAX,
+ MODE_OCCUPANCY,
+ MODE_DMA
+};
+
+/* derived counters (derived information computed from existing counters) */
+#define NUM_DERIVED_COUNTERS (1)
+
+static uint32_t derived_counters_base;
+
+static struct viv_profile_counter_info derived_counter_info[] = {
+ [0] = {"TOTAL_INST_COUNTER", "Total inst counter"},
+};
+
+static struct {
+ const char *name;
+ uint32_t bit;
+ bool inv; /* show inverted value */
+} idle_module_names[] = {
+ {"FE", VIVS_HI_IDLE_STATE_FE, true},
+ {"DE", VIVS_HI_IDLE_STATE_DE, true},
+ {"PE", VIVS_HI_IDLE_STATE_PE, true},
+ {"SH", VIVS_HI_IDLE_STATE_SH, true},
+ {"PA", VIVS_HI_IDLE_STATE_PA, true},
+ {"SE", VIVS_HI_IDLE_STATE_SE, true},
+ {"RA", VIVS_HI_IDLE_STATE_RA, true},
+ {"TX", VIVS_HI_IDLE_STATE_TX, true},
+ {"VG", VIVS_HI_IDLE_STATE_VG, true},
+ {"IM", VIVS_HI_IDLE_STATE_IM, true},
+ {"FP", VIVS_HI_IDLE_STATE_FP, true},
+ {"TS", VIVS_HI_IDLE_STATE_TS, true},
+ {"AXI_LP", VIVS_HI_IDLE_STATE_AXI_LP, false}
+};
+#define NUM_IDLE_MODULES (sizeof(idle_module_names)/sizeof(idle_module_names[0]))
+
+static const char* cmd_state_names[]={
+"IDLE", "DEC", "ADR0", "LOAD0", "ADR1", "LOAD1", "3DADR", "3DCMD",
+"3DCNTL", "3DIDXCNTL", "INITREQDMA", "DRAWIDX", "DRAW", "2DRECT0", "2DRECT1", "2DDATA0",
+"2DDATA1", "WAITFIFO", "WAIT", "LINK", "END", "STALL", "UNKNOWN"
+};
+#define NUM_CMD_STATE_NAMES (sizeof(cmd_state_names)/sizeof(cmd_state_names[0]))
+
+static const char* cmd_dma_state_names[]={
+ "IDLE", "START", "REQ", "END"
+};
+#define NUM_CMD_DMA_STATE_NAMES (sizeof(cmd_dma_state_names)/sizeof(cmd_dma_state_names[0]))
+
+static const char* cmd_fetch_state_names[]={
+ "IDLE", "RAMVALID", "VALID", "UNKNOWN"
+};
+#define NUM_CMD_FETCH_STATE_NAMES (sizeof(cmd_fetch_state_names)/sizeof(cmd_fetch_state_names[0]))
+
+static const char* req_dma_state_names[]={
+ "IDLE", "START", "REQ", "END"
+};
+#define NUM_REQ_DMA_STATE_NAMES (sizeof(req_dma_state_names)/sizeof(req_dma_state_names[0]))
+
+static const char* cal_state_names[]={
+ "IDLE", "LDADR", "IDXCALC", "UNKNOWN"
+};
+#define NUM_CAL_STATE_NAMES (sizeof(cal_state_names)/sizeof(cal_state_names[0]))
+
+static const char* ve_req_state_names[]={
+ "IDLE", "CKCACHE", "MISS", "UNKNOWN"
+};
+#define NUM_VE_REQ_STATE_NAMES (sizeof(ve_req_state_names)/sizeof(ve_req_state_names[0]))
+
+static struct viv_profile_counter_info *get_counter_info(uint32_t idx)
+{
+ if(idx < derived_counters_base)
+ return viv_get_profile_counter_info(idx);
+ else
+ return &derived_counter_info[idx - derived_counters_base];
+}
+
+static void print_percentage_row(int l, double percent, const char *name, int name_width, bool color, int bar_width)
+{
+ printf("%-*s ", name_width, name);
+ if(color)
+ {
+ if(percent > 99.0)
+ printf("%s", color_num_max);
+ else if(percent < 1.0)
+ printf("%s", color_num_zero);
+ else
+ printf("%s", color_num);
+ }
+ printf("%5.1f%% ", percent);
+ if(color)
+ printf("%s%s", color_reset, (l%2) ? color_percentage_1 : color_percentage_2);
+ print_percentage_bar(percent, bar_width);
+ if(color)
+ printf("%s", color_reset);
+}
+
+int main(int argc, char **argv)
+{
+ int samples_per_second = 100;
+ bool interactive = true;
+ int mode = MODE_PERF;
+ bool color = true;
+ int opt;
+ bool error = false;
+
+ while ((opt = getopt(argc, argv, "m:s:n")) != -1) {
+ switch(opt)
+ {
+ case 'm':
+ switch(optarg[0])
+ {
+ case 'm': mode = MODE_MAX; break;
+ case 'p': mode = MODE_PERF; break;
+ case 'o': mode = MODE_OCCUPANCY; break;
+ case 'd': mode = MODE_DMA; break;
+ default:
+ printf("Unknown mode %s\n", optarg);
+ }
+ break;
+ case 'n': color = false; break;
+ case 's': samples_per_second = atoi(optarg); break;
+ case 'h':
+ default:
+ error = true;
+ }
+ }
+ if(error)
+ {
+ printf("Usage:\n");
+ printf(" %s [-m <m|p|o|d>] [-n] [-s <samples_per_second>] \n", argv[0]);
+ printf("\n");
+ printf(" -m <mode> Set mode:\n");
+ printf(" p Show performance counters (default)\n");
+ printf(" m Show performance counter maximum\n");
+ printf(" o Show occupancy (non-idle) states of modules\n");
+ printf(" d Show DMA engine states\n");
+ printf(" -n Disable color\n");
+ printf(" -h Show this help message\n");
+ printf(" -s <samples> Number of samples per second (default 100)\n");
+ exit(1);
+ }
+ struct viv_conn *conn = 0;
+ int rv;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ uint32_t orig_num_profile_counters = viv_get_num_profile_counters();
+ derived_counters_base = orig_num_profile_counters;
+ uint32_t num_profile_counters = derived_counters_base + NUM_DERIVED_COUNTERS;
+
+
+ bool *reset_after_read = calloc(num_profile_counters, sizeof(bool));
+ uint32_t *counter_data = calloc(num_profile_counters, 4);
+ uint32_t *counter_data_last = calloc(num_profile_counters, 4);
+ uint64_t *events_per_s = calloc(num_profile_counters, 8);
+ uint64_t *events_per_s_max = calloc(num_profile_counters, 8);
+ /* reset counters and initial values */
+ if(viv_read_profile_counters_3d(conn, counter_data_last) != 0)
+ {
+ fprintf(stderr, "Error querying counters (probably unsupported with this kernel, or not built into libetnaviv)\n");
+ exit(1);
+ }
+ viv_get_counters_reset_after_read(conn, reset_after_read);
+
+ uint32_t begin_time = gettime();
+ useconds_t interval = 1000000 / samples_per_second;
+ while(true)
+ {
+ /* Scale counters by real elapsed time */
+ for(int c=0; c<num_profile_counters; ++c)
+ {
+ events_per_s[c] = 0;
+ }
+
+ uint32_t idle_states[NUM_IDLE_MODULES] = {};
+ uint32_t cmd_state[32] = {};
+ uint32_t cmd_dma_state[4] = {};
+ uint32_t cmd_fetch_state[4] = {};
+ uint32_t req_dma_state[4] = {};
+ uint32_t cal_state[4] = {};
+ uint32_t ve_req_state[4] = {};
+ for(int sample=0; sample<samples_per_second; ++sample)
+ {
+ if(mode == MODE_OCCUPANCY)
+ {
+ uint32_t data = 0;
+ viv_read_register(conn, VIVS_HI_IDLE_STATE, &data);
+ for(int mid=0; mid<NUM_IDLE_MODULES; ++mid)
+ {
+ if(data & idle_module_names[mid].bit)
+ idle_states[mid]++;
+ }
+ } else if(mode == MODE_DMA)
+ {
+ uint32_t data = 0;
+ viv_read_register(conn, VIVS_FE_DMA_DEBUG_STATE, &data);
+ int cmd_state_idx = data & 0x1F;
+ if(cmd_state_idx >= (NUM_CMD_STATE_NAMES-1)) /* Mark unknowns as UNKNOWN */
+ cmd_state_idx = NUM_CMD_STATE_NAMES-1;
+ cmd_state[cmd_state_idx]++;
+ cmd_dma_state[(data>>8) & 3]++;
+ cmd_fetch_state[(data>>10) & 3]++;
+ req_dma_state[(data>>12) & 3]++;
+ cal_state[(data>>14) & 3]++;
+ ve_req_state[(data>>16) & 3]++;
+ } else {
+ if(viv_read_profile_counters_3d(conn, counter_data) != 0)
+ {
+ fprintf(stderr, "Error querying counters (probably unsupported with this kernel, or not built into libetnaviv)\n");
+ exit(1);
+ }
+ for(int c=0; c<num_profile_counters; ++c)
+ {
+ if(!reset_after_read[c])
+ {
+ if(counter_data_last[c] > counter_data[c])
+ {
+ events_per_s[c] += counter_data[c];
+ } else {
+ events_per_s[c] += (uint32_t)(counter_data[c] - counter_data_last[c]);
+ }
+ } else
+ events_per_s[c] += counter_data[c];
+ }
+ for(int c=0; c<num_profile_counters; ++c)
+ counter_data_last[c] = counter_data[c];
+ }
+
+ usleep(interval);
+ }
+ uint32_t end_time = gettime();
+ uint32_t diff_time = end_time - begin_time;
+
+ /* Scale counters by real elapsed time */
+ for(int c=0; c<num_profile_counters; ++c)
+ {
+ events_per_s[c] = events_per_s[c] * 1000000LL / (uint64_t)diff_time;
+ }
+
+ events_per_s[derived_counters_base + 0] = events_per_s[VIV_PROF_VS_INST_COUNTER] + events_per_s[VIV_PROF_PS_INST_COUNTER];
+
+ /* Compute maxima */
+ for(int c=0; c<num_profile_counters; ++c)
+ {
+ if(events_per_s[c] > events_per_s_max[c])
+ events_per_s_max[c] = events_per_s[c];
+ }
+
+ if(interactive)
+ {
+ int max_lines, max_cols;
+ printf("%s", clear_screen);
+ get_screen_size(&max_lines, &max_cols);
+ max_lines -= 1;
+ if(mode == MODE_PERF)
+ {
+ /* XXX check that width doesn't exceed screen width */
+ for(int l=0; l<max_lines; ++l)
+ {
+ int c = l;
+ while(c < num_profile_counters)
+ {
+ char num[100];
+ struct viv_profile_counter_info *info = get_counter_info(c);
+ format_number(num, sizeof(num), events_per_s[c]);
+ if(color)
+ printf("%s", events_per_s_max[c] == 0 ? color_num_zero : color_num);
+ printf("%15.15s", num);
+ if(color)
+ printf("%s", color_reset);
+ printf(" ");
+ printf("%-30.30s", info->description);
+ printf(" ");
+ c += max_lines;
+ }
+ printf("\n");
+ }
+ } else if(mode == MODE_MAX)
+ {
+ /* XXX check that width doesn't exceed screen width */
+ for(int l=0; l<max_lines; ++l)
+ {
+ int c = l;
+ while(c < num_profile_counters)
+ {
+ char num[100];
+ struct viv_profile_counter_info *info = get_counter_info(c);
+ format_number(num, sizeof(num), events_per_s_max[c]);
+ if(color)
+ printf("%s", events_per_s[c] == events_per_s_max[c] ? color_num_max : color_num);
+ printf("%15.15s", num);
+ if(color)
+ printf("%s", color_reset);
+ printf(" ");
+ printf("%-30.30s", info->description);
+ printf(" ");
+ c += max_lines;
+ }
+ printf("\n");
+ }
+ } else if(mode == MODE_OCCUPANCY)
+ {
+ int lines = NUM_IDLE_MODULES;
+ if(lines > max_lines)
+ lines = max_lines;
+
+ if(color)
+ printf("%s", color_title);
+ printf("Module occupancy\n");
+ if(color)
+ printf("%s", color_reset);
+ for(int l=0; l<lines; ++l)
+ {
+ double percent = 100.0 * (double)idle_states[l] / (double)samples_per_second;
+ if(idle_module_names[l].inv)
+ percent = 100.0 - percent;
+ print_percentage_row(l, percent, idle_module_names[l].name, 6, color, 40);
+ printf("\n");
+ }
+ } else if(mode == MODE_DMA)
+ {
+ const struct dma_table {
+ int column;
+ int base_y;
+ const char *title;
+ int data_size;
+ const char **data_names;
+ uint32_t *data;
+ } dma_tables[] = {
+ {0, 1, "Command state", NUM_CMD_STATE_NAMES, cmd_state_names, cmd_state},
+ {1, 1, "Command DMA state", NUM_CMD_DMA_STATE_NAMES, cmd_dma_state_names, cmd_dma_state},
+ {1, 7, "Command fetch state", NUM_CMD_FETCH_STATE_NAMES, cmd_fetch_state_names, cmd_fetch_state},
+ {1, 13, "DMA request state", NUM_REQ_DMA_STATE_NAMES, req_dma_state_names, req_dma_state},
+ {1, 19, "Cal state", NUM_CAL_STATE_NAMES, cal_state_names, cal_state},
+ {1, 25, "VE req state", NUM_VE_REQ_STATE_NAMES, ve_req_state_names, ve_req_state}
+ };
+#define NUM_DMA_TABLES (sizeof(dma_tables) / sizeof(dma_tables[0]))
+ int bar_width = (max_cols/2) - 20;
+ int fill_width = bar_width + 19;
+ for(int l=0; l<max_lines; ++l)
+ {
+ for(int column=0; column<2; ++column)
+ {
+ bool match = false;
+ for(int t=0; t<NUM_DMA_TABLES; ++t) /* find table that this column,row slot is part of, if any */
+ {
+ const struct dma_table *table = &dma_tables[t];
+ if(table->column == column)
+ {
+ if(l == table->base_y-1)
+ {
+ if(color)
+ printf("%s", color_title);
+ printf("%-*s", fill_width, table->title);
+ if(color)
+ printf("%s", color_reset);
+ match = true;
+ break;
+ } else if(l >= table->base_y && l < (table->base_y + table->data_size))
+ {
+ int y = l - table->base_y;
+ double percent = 100.0 * (double)table->data[y] / (double)samples_per_second;
+ print_percentage_row(y, percent, table->data_names[y], 10, color, bar_width);
+ match = true;
+ break;
+ }
+ }
+ }
+ if(!match) /* empty slot */
+ {
+ printf("%-*s", fill_width, "");
+ }
+ printf(" ");
+ }
+ printf("\n");
+ }
+ }
+ }
+ begin_time = end_time;
+ }
+ /*
+ * XXX define new mode MODE_OCCUPANCY and some derived percentage bars:
+ * - [PA] Number of primitives per vertex (max 1)
+ * - [PA] % of primitives culled
+ * - VS -> PA -> SE -> RA primitives/vertices in each stage
+ * - RA -> PS -> PE pixels/quads in each stage
+ * - Pixels per PS inst
+ * - Vertices per VS inst
+ * - % of texture requests trilinear/bilinear
+ * - overdraw (killed by depth)
+ */
+
+ return 0;
+}
+
diff --git a/src/utils/viv_info.c b/src/utils/viv_info.c
new file mode 100644
index 0000000..d59ddf7
--- /dev/null
+++ b/src/utils/viv_info.c
@@ -0,0 +1,366 @@
+/* Get info about vivante device */
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "gc_abi.h"
+
+const char *galcore_device[] = {"/dev/gal3d", "/dev/galcore", "/dev/graphics/galcore", NULL};
+
+const char *vivante_chipFeatures[32] = {
+ /*0 */ "FAST_CLEAR",
+ /*1 */ "SPECIAL_ANTI_ALIASING",
+ /*2 */ "PIPE_3D",
+ /*3 */ "DXT_TEXTURE_COMPRESSION",
+ /*4 */ "DEBUG_MODE",
+ /*5 */ "Z_COMPRESSION",
+ /*6 */ "YUV420_SCALER",
+ /*7 */ "MSAA",
+ /*8 */ "DC",
+ /*9 */ "PIPE_2D",
+ /*10*/ "ETC1_TEXTURE_COMPRESSION",
+ /*11*/ "FAST_SCALER",
+ /*12*/ "HIGH_DYNAMIC_RANGE",
+ /*13*/ "YUV420_TILER",
+ /*14*/ "MODULE_CG",
+ /*15*/ "MIN_AREA",
+ /*16*/ "NO_EARLY_Z",
+ /*17*/ "NO_422_TEXTURE",
+ /*18*/ "BUFFER_INTERLEAVING",
+ /*19*/ "BYTE_WRITE_2D",
+ /*20*/ "NO_SCALER",
+ /*21*/ "YUY2_AVERAGING",
+ /*22*/ "HALF_PE_CACHE",
+ /*23*/ "HALF_TX_CACHE",
+ /*24*/ "YUY2_RENDER_TARGET",
+ /*25*/ "MEM32",
+ /*26*/ "PIPE_VG",
+ /*27*/ "VGTS",
+ /*28*/ "FE20",
+ /*29*/ "BYTE_WRITE_3D",
+ /*30*/ "RS_YUV_TARGET",
+ /*31*/ "32_BIT_INDICES"
+};
+
+const char *vivante_chipMinorFeatures0[32] = {
+ /*0 */ "FLIP_Y",
+ /*1 */ "DUAL_RETURN_BUS",
+ /*2 */ "ENDIANNESS_CONFIG",
+ /*3 */ "TEXTURE_8K",
+ /*4 */ "CORRECT_TEXTURE_CONVERTER",
+ /*5 */ "SPECIAL_MSAA_LOD",
+ /*6 */ "FAST_CLEAR_FLUSH",
+ /*7 */ "2DPE20",
+ /*8 */ "CORRECT_AUTO_DISABLE",
+ /*9 */ "RENDERTARGET_8K",
+ /*10*/ "2BITPERTILE",
+ /*11*/ "SEPARATE_TILE_STATUS_WHEN_INTERLEAVED",
+ /*12*/ "SUPER_TILED",
+ /*13*/ "VG_20",
+ /*14*/ "TS_EXTENDED_COMMANDS",
+ /*15*/ "COMPRESSION_FIFO_FIXED",
+ /*16*/ "HAS_SIGN_FLOOR_CEIL",
+ /*17*/ "VG_FILTER",
+ /*18*/ "VG_21",
+ /*19*/ "SHADER_HAS_W",
+ /*20*/ "HAS_SQRT_TRIG",
+ /*21*/ "MORE_MINOR_FEATURES",
+ /*22*/ "MC20",
+ /*23*/ "MSAA_SIDEBAND",
+ /*24*/ "BUG_FIXES0",
+ /*25*/ "VAA",
+ /*26*/ "BYPASS_IN_MSAA",
+ /*27*/ "HZ",
+ /*28*/ "NEW_TEXTURE",
+ /*29*/ "2D_A8_TARGET",
+ /*30*/ "CORRECT_STENCIL",
+ /*31*/ "ENHANCE_VR"
+};
+
+const char *vivante_chipMinorFeatures1[32] = {
+ /*0 */ "RSUV_SWIZZLE",
+ /*1 */ "V2_COMPRESSION",
+ /*2 */ "VG_DOUBLE_BUFFER",
+ /*3 */ "EXTRA_EVENT_STATES",
+ /*4 */ "NO_STRIPING_NEEDED",
+ /*5 */ "TEXTURE_STRIDE",
+ /*6 */ "BUG_FIXES3",
+ /*7 */ "AUTO_DISABLE",
+ /*8 */ "AUTO_RESTART_TS",
+ /*9 */ "DISABLE_PE_GATING",
+ /*10*/ "L2_WINDOWING",
+ /*11*/ "HALF_FLOAT",
+ /*12*/ "PIXEL_DITHER",
+ /*13*/ "TWO_STENCIL_REFERENCE",
+ /*14*/ "EXTENDED_PIXEL_FORMAT",
+ /*15*/ "CORRECT_MIN_MAX_DEPTH",
+ /*16*/ "2D_DITHER",
+ /*17*/ "BUG_FIXES5",
+ /*18*/ "NEW_2D",
+ /*19*/ "NEW_FP",
+ /*20*/ "TEXTURE_ALIGN_4",
+ /*21*/ "NON_POWER_OF_TWO",
+ /*22*/ "LINEAR_TEXTURE_SUPPORT",
+ /*23*/ "HALTI0",
+ /*24*/ "CORRECT_OVERFLOW_VG",
+ /*25*/ "NEGATIVE_LOG_FIX",
+ /*26*/ "RESOLVE_OFFSET",
+ /*27*/ "OK_TO_GATE_AXI_CLOCK",
+ /*28*/ "MMU_VERSION",
+ /*29*/ "WIDE_LINE",
+ /*30*/ "UBUG_FIXES6",
+ /*31*/ "FC_FLUSH_STALL"
+};
+
+const char *vivante_chipMinorFeatures2[32] = {
+ /*0 */ "LINE_LOOP",
+ /*1 */ "LOGIC_OP",
+ /*2 */ "UNKNOWN_2",
+ /*3 */ "SUPERTILED_TEXTURE",
+ /*4 */ "UNKNOWN_4",
+ /*5 */ "RECT_PRIMITIVE",
+ /*6 */ "COMPOSITION",
+ /*7 */ "CORRECT_AUTO_DISABLE_COUNT",
+ /*8 */ "UNKNOWN_8",
+ /*9 */ "UNKNOWN_9",
+ /*10*/ "UNKNOWN_10",
+ /*11*/ "SAMPLERBASE_16",
+ /*12*/ "UNKNOWN_12",
+ /*13*/ "UNKNOWN_13",
+ /*14*/ "UNKNOWN_14",
+ /*15*/ "EXTRA_TEXTURE_STATE",
+ /*16*/ "FULL_DIRECTFB",
+ /*17*/ "2D_OPF",
+ /*18*/ "THREAD_WALKER_IN_PS",
+ /*19*/ "TILE_FILLER",
+ /*20*/ "UNKNOWN_20",
+ /*21*/ "2D_MULTI_SOURCE_BLIT",
+ /*22*/ "UNKNOWN_22",
+ /*23*/ "UNKNOWN_23",
+ /*24*/ "UNKNOWN_24",
+ /*25*/ "MIXED_STREAMS",
+ /*26*/ "2D_420_L2CACHE",
+ /*27*/ "UNKNOWN_27",
+ /*28*/ "2D_NO_INDEX8_BRUSH",
+ /*29*/ "TEXTURE_TILED_READ",
+ /*30*/ "UNKNOWN_30",
+ /*31*/ "UNKNOWN_31"
+};
+
+#if 0
+const char *vivante_power_state(gceCHIPPOWERSTATE state)
+{
+ switch(state)
+ {
+ case gcvPOWER_ON: return "ON";
+ case gcvPOWER_OFF: return "OFF";
+ case gcvPOWER_IDLE: return "IDLE";
+ case gcvPOWER_SUSPEND: return "SUSPEND";
+#ifndef GCABI_dove_old
+#ifndef GCABI_dove
+ case gcvPOWER_ON_BROADCAST: return "ON_BROADCAST";
+#endif
+ case gcvPOWER_SUSPEND_ATPOWERON: return "SUSPEND_ATPOWERON";
+ case gcvPOWER_OFF_ATPOWERON: return "OFF_ATPOWERON";
+ case gcvPOWER_IDLE_BROADCAST: return "IDLE_BROADCAST";
+ case gcvPOWER_SUSPEND_BROADCAST: return "SUSPEND_BROADCAST";
+ case gcvPOWER_OFF_BROADCAST: return "OFF_BROADCAST";
+ case gcvPOWER_OFF_RECOVERY: return "OFF_RECOVERY";
+#endif
+ default:
+ return "UNKNOWN";
+ }
+}
+#endif
+
+int main()
+{
+ gcsHAL_INTERFACE id = {};
+ vivante_ioctl_data_t ic = {};
+ int fd = -1;
+ int rv = 0;
+
+ for(int idx=0; fd == -1 && galcore_device[idx]; ++idx)
+ {
+ fd = open(galcore_device[idx], O_RDWR);
+ if(fd >= 0)
+ {
+ printf("Succesfully opened %s\n", galcore_device[idx]);
+ }
+ }
+ if(fd < 0)
+ {
+ perror("Cannot open device");
+ exit(1);
+ }
+#ifdef GCABI_HAS_HARDWARE_TYPE
+ for(int hwtype=1; hwtype<8; hwtype<<=1)
+ {
+ printf("********** core: %i ***********\n", hwtype);
+#endif
+ memset((void*)&id, 0, sizeof(id));
+ id.command = gcvHAL_QUERY_CHIP_IDENTITY;
+#ifdef GCABI_HAS_HARDWARE_TYPE
+ id.hardwareType = hwtype;
+#endif
+
+ ic.in_buf = &id;
+ ic.in_buf_size = sizeof(id);
+ ic.out_buf = &id;
+ ic.out_buf_size = sizeof(id);
+ printf("gcsHAL_INTERFACE size %i\n", sizeof(id));
+
+ rv = ioctl(fd, IOCTL_GCHAL_INTERFACE, &ic);
+ if(rv < 0)
+ {
+ perror("Ioctl error");
+ exit(1);
+ }
+#ifdef GCABI_HAS_HARDWARE_TYPE
+ if(id.status != 0) /* no such core */
+ continue;
+#endif
+
+ printf("* Chip identity:\n");
+ printf("Chip model: %08x\n", id.u.QueryChipIdentity.chipModel);
+ printf("Chip revision: %08x\n", id.u.QueryChipIdentity.chipRevision);
+ printf("Chip features: 0x%08x\n", id.u.QueryChipIdentity.chipFeatures);
+ for(int i=0; i<32; ++i)
+ {
+ bool flag = id.u.QueryChipIdentity.chipFeatures & (1 << i);
+ printf(" %c %s\n", flag?'+':'-', vivante_chipFeatures[i]);
+ }
+ printf("\n");
+ printf("Chip minor features 0: 0x%08x\n", id.u.QueryChipIdentity.chipMinorFeatures);
+ for(int i=0; i<32; ++i)
+ {
+ bool flag = id.u.QueryChipIdentity.chipMinorFeatures & (1 << i);
+ printf(" %c %s\n", flag?'+':'-', vivante_chipMinorFeatures0[i]);
+ }
+ printf("\n");
+ printf("Chip minor features 1: 0x%08x\n", id.u.QueryChipIdentity.chipMinorFeatures1);
+ for(int i=0; i<32; ++i)
+ {
+ bool flag = id.u.QueryChipIdentity.chipMinorFeatures1 & (1 << i);
+ printf(" %c %s\n", flag?'+':'-', vivante_chipMinorFeatures1[i]);
+ }
+ printf("\n");
+#ifdef GCABI_HAS_MINOR_FEATURES_2
+ printf("Chip minor features 2: 0x%08x\n", id.u.QueryChipIdentity.chipMinorFeatures2);
+ for(int i=0; i<32; ++i)
+ {
+ bool flag = id.u.QueryChipIdentity.chipMinorFeatures2 & (1 << i);
+ printf(" %c %s\n", flag?'+':'-', vivante_chipMinorFeatures2[i]);
+ }
+#endif
+ printf("\n");
+#ifdef GCABI_HAS_MINOR_FEATURES_3
+ printf("Chip minor features 3: 0x%08x\n", id.u.QueryChipIdentity.chipMinorFeatures3);
+#endif
+ printf("Stream count: 0x%08x\n", id.u.QueryChipIdentity.streamCount);
+ printf("Register max: 0x%08x\n", id.u.QueryChipIdentity.registerMax);
+ printf("Thread count: 0x%08x\n", id.u.QueryChipIdentity.threadCount);
+ printf("Shader core count: 0x%08x\n", id.u.QueryChipIdentity.shaderCoreCount);
+ printf("Vertex cache size: 0x%08x\n", id.u.QueryChipIdentity.vertexCacheSize);
+ printf("Vertex output buffer size: 0x%08x\n", id.u.QueryChipIdentity.vertexOutputBufferSize);
+#ifdef GCABI_CHIPIDENTITY_EXT
+ printf("Pixel pipes: 0x%08x\n", id.u.QueryChipIdentity.pixelPipes);
+ printf("Instruction count: 0x%08x\n", id.u.QueryChipIdentity.instructionCount);
+ printf("Num constants: 0x%08x\n", id.u.QueryChipIdentity.numConstants);
+ printf("Buffer size: 0x%08x\n", id.u.QueryChipIdentity.bufferSize);
+#endif
+#ifdef GCABI_CHIPIDENTITY_VARYINGS
+ printf("Number of varyings: 0x%08x\n", id.u.QueryChipIdentity.varyingsCount);
+ printf("Supertile layout style in hardware: 0x%08x\n", id.u.QueryChipIdentity.superTileMode);
+#endif
+
+ printf("\n");
+
+ memset((void*)&id, 0, sizeof(id));
+ id.command = gcvHAL_QUERY_VIDEO_MEMORY;
+#ifdef GCABI_HAS_HARDWARE_TYPE
+ id.hardwareType = hwtype;
+#endif
+
+ rv = ioctl(fd, IOCTL_GCHAL_INTERFACE, &ic);
+ if(rv < 0)
+ {
+ perror("Ioctl error");
+ exit(1);
+ }
+
+ printf("* Video memory:\n");
+ printf("Internal physical: 0x%08x\n", (unsigned)id.u.QueryVideoMemory.internalPhysical);
+ printf("Internal size: 0x%08x\n", (unsigned)id.u.QueryVideoMemory.internalSize);
+ printf("External physical: %08x\n", (unsigned)id.u.QueryVideoMemory.externalPhysical);
+ printf("External size: 0x%08x\n", (unsigned)id.u.QueryVideoMemory.externalSize);
+ printf("Contiguous physical: 0x%08x\n", (unsigned)id.u.QueryVideoMemory.contiguousPhysical);
+ printf("Contiguous size: 0x%08x\n", (unsigned)id.u.QueryVideoMemory.contiguousSize);
+ printf("\n");
+
+#if 0
+ memset((void*)&id, 0, sizeof(id));
+ id.command = gcvHAL_QUERY_POWER_MANAGEMENT_STATE;
+#ifdef GCABI_HAS_HARDWARE_TYPE
+ id.hardwareType = hwtype;
+#endif
+ rv = ioctl(fd, IOCTL_GCHAL_INTERFACE, &ic);
+ if(rv < 0)
+ {
+ perror("Ioctl error");
+ exit(1);
+ }
+ printf("* Power management:\n");
+ printf("Power state: %s\n", vivante_power_state(id.u.QueryPowerManagement.state));
+ printf("Is idle: %s\n", id.u.QueryPowerManagement.isIdle?"yes":"no");
+ printf("\n");
+#endif
+ memset((void*)&id, 0, sizeof(id));
+ id.command = gcvHAL_QUERY_KERNEL_SETTINGS;
+#ifdef GCABI_HAS_HARDWARE_TYPE
+ id.hardwareType = hwtype;
+#endif
+ rv = ioctl(fd, IOCTL_GCHAL_INTERFACE, &ic);
+ if(rv < 0)
+ {
+ perror("Ioctl error");
+ exit(1);
+ }
+
+ printf("* Kernel settings\n");
+ printf("Use realtime signal: %08x\n", id.u.QueryKernelSettings.settings.signal);
+ printf("\n");
+
+ id.command = gcvHAL_GET_BASE_ADDRESS;
+#ifdef GCABI_HAS_HARDWARE_TYPE
+ id.hardwareType = hwtype;
+#endif
+ memset((void*)&id, 0, sizeof(id));
+ rv = ioctl(fd, IOCTL_GCHAL_INTERFACE, &ic);
+ if(rv < 0)
+ {
+ perror("Ioctl error");
+ exit(1);
+ }
+ printf("* Base address\n");
+ printf("Physical address of internal memory: %08x\n", id.u.GetBaseAddress.baseAddress);
+ printf("\n");
+
+#ifdef GCABI_HAS_HARDWARE_TYPE
+ }
+#endif
+
+ close(fd);
+
+
+ return 0;
+}
+
diff --git a/src/utils/viv_registers.c b/src/utils/viv_registers.c
new file mode 100644
index 0000000..14a855e
--- /dev/null
+++ b/src/utils/viv_registers.c
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Dump all reachable GPU registers */
+/*
+ * Important: Needs kernel module compiled with user space register access
+ * (gcdREGISTER_ACCESS_FROM_USER=1)
+ */
+/*
+ * Warning: this utility can result in crashes inside the kernel such as (on ARM),
+ *
+ * Unhandled fault: external abort on non-linefetch (0x1028) at 0xfe641000
+ * Internal error: : 1028 [#1] PREEMPT ARM
+ *
+ * It looks as if the actually accessible registers differ per SoC.
+ * When a non-accessible register is loaded, a fault happens. So expect crashes
+ * when using this utility.
+ */
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <etnaviv/viv.h>
+#include "gc_hal.h"
+
+int main()
+{
+ struct viv_conn *conn = 0;
+ int rv = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+
+ gcsHAL_INTERFACE id = {};
+ memset((void*)&id, 0, sizeof(id));
+
+ // 0x000..0x200 ok
+ // 0x200..0x400 crash
+ // 0x400..0x800 ok
+ // 0x800..0xa00 crash
+ // 0xa00..0xc00 crash
+ // 0xc00..0xe00 crash
+ // 0xe00..0x1000 crash
+ // everything above that I've tested: crash
+ for(int address=0x000; address<0x800; address+=4)
+ {
+ if(address >= 0x200 && address < 0x400)
+ continue; /* reading causes CPU(!) crash */
+ id.command = gcvHAL_READ_REGISTER;
+ id.u.ReadRegisterData.address = address;
+ if(viv_invoke(conn, &id) != VIV_STATUS_OK)
+ {
+ perror("Ioctl error");
+ exit(1);
+ }
+ printf("%05x %08x\n", address, id.u.ReadRegisterData.data);
+ fflush(stdout);
+ }
+
+ viv_close(conn);
+ return 0;
+}
+
diff --git a/src/utils/viv_reset.c b/src/utils/viv_reset.c
new file mode 100644
index 0000000..0d7c6a2
--- /dev/null
+++ b/src/utils/viv_reset.c
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Reset GPU, useful in case it hangs.
+ */
+/*
+ * Note: this is known to be unreliable with many kernel drivers and can bring
+ * the GPU in a state that can only be recovered with a device reboot.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+
+#include <etnaviv/viv.h>
+
+int main(int argc, char **argv)
+{
+ int rv;
+ struct viv_conn *conn = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+ printf("Succesfully opened device, resetting\n");
+ viv_reset(conn);
+ viv_close(conn);
+ return 0;
+}
+
diff --git a/src/utils/viv_throughput.c b/src/utils/viv_throughput.c
new file mode 100644
index 0000000..9ae45ca
--- /dev/null
+++ b/src/utils/viv_throughput.c
@@ -0,0 +1,440 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Measure fillrate.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <math.h>
+#include <errno.h>
+#include <getopt.h>
+#ifdef HAVE_CLOCK
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+
+#include "etna_pipe.h"
+#include "etna_debug.h"
+#include "util/u_inlines.h"
+#include "util/u_format.h"
+#include "write_bmp.h"
+#include "state_tracker/graw.h"
+#include "fbdemos.h"
+
+#include "esTransform.h"
+#include "dds.h"
+
+#include <etnaviv/viv_profile.h>
+
+const char *simple_vs =
+ "VERT\n"
+ "DCL IN[0]\n"
+ "DCL IN[1]\n"
+ "DCL OUT[0], POSITION\n"
+ "DCL OUT[1], GENERIC[0]\n"
+ " 0: MOV OUT[0], IN[0]\n"
+ " 1: MOV OUT[1], IN[1]\n"
+ " 2: END\n";
+
+const char *simple_fs =
+ "FRAG\n"
+ "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n"
+ "DCL IN[0], GENERIC[0]\n"
+ "DCL OUT[0], COLOR\n"
+ " 0: MOV OUT[0], IN[0]\n"
+ " 1: END\n";
+
+/*********************************************************************/
+
+const float vVertices[] = {
+ -1.0f, -1.0f, 0.0f, 1.0f,
+ 0.0f, 0.0f, 0.0f, 0.0f,
+
+ 1.0f, -1.0f, 0.0f, 1.0f,
+ 1.0f, 0.0f, 0.0f, 0.0f,
+
+ 1.0f, 1.0f, 0.0f, 1.0f,
+ 1.0f, 1.0f, 0.0f, 0.0f,
+
+ -1.0f, 1.0f, 0.0f, 1.0f,
+ 0.0f, 1.0f, 0.0f, 0.0f
+};
+
+#define VERTEX_STRIDE (8)
+#define NUM_VERTICES (sizeof(vVertices) / (sizeof(float)*VERTEX_STRIDE))
+
+/* Get time in microseconds */
+static unsigned long gettime(void)
+{
+#ifdef HAVE_CLOCK
+ struct timespec t;
+ clock_gettime(CLOCK_MONOTONIC, &t);
+ return (t.tv_nsec/1000 + (t.tv_sec * 1000000));
+#else
+ struct timeval t;
+ gettimeofday(&t, NULL);
+ return (t.tv_usec + (t.tv_sec * 1000000));
+#endif
+}
+
+int main(int argc, char **argv)
+{
+ int width = 1920;
+ int height = 1080;
+ bool do_clear = false;
+ bool super_tiled = false;
+ bool enable_ts = true;
+ bool early_z = false;
+ int num_frames = 2000;
+ unsigned fmt_rt = PIPE_FORMAT_B8G8R8X8_UNORM;
+ unsigned fmt_zs = PIPE_FORMAT_S8_UINT_Z24_UNORM;
+
+ int opt;
+ int error = 0;
+ while ((opt = getopt(argc, argv, "w:h:l:s:t:e:f:d:c:")) != -1) {
+ switch(opt)
+ {
+ case 'w': width = atoi(optarg); break;
+ case 'h': height = atoi(optarg); break;
+ case 'l': do_clear = atoi(optarg); break;
+ case 's': super_tiled = atoi(optarg); break;
+ case 't': enable_ts = atoi(optarg); break;
+ case 'e': early_z = atoi(optarg); break;
+ case 'f': num_frames = atoi(optarg); break;
+ case 'd':
+ switch(atoi(optarg))
+ {
+ case 0: fmt_zs = PIPE_FORMAT_NONE; break;
+ case 16: fmt_zs = PIPE_FORMAT_Z16_UNORM; break;
+ case 32: fmt_zs = PIPE_FORMAT_S8_UINT_Z24_UNORM; break;
+ default:
+ printf("Invalid depth stencil surface depth %s\n", optarg);
+ error = 1;
+ }
+ break;
+ case 'c':
+ switch(atoi(optarg))
+ {
+ case 0: fmt_rt = PIPE_FORMAT_NONE; break;
+ case 16: fmt_rt = PIPE_FORMAT_B5G6R5_UNORM; break;
+ case 32: fmt_rt = PIPE_FORMAT_B8G8R8X8_UNORM; break;
+ default:
+ printf("Invalid color surface depth %s\n", optarg);
+ error = 1;
+ }
+ break;
+ default:
+ printf("Unknown argument %c\n", opt);
+ error = 1;
+ }
+ }
+ if(error)
+ {
+ printf("Usage:\n");
+ printf(" %s [-w <width>] [-h <height>] [-l <0/1>] [-s <0/1>] [-t <0/1>] [-e <0/1>] [-f <frames>] [-d <0/16/32>] [-c <16/32>]\n", argv[0]);
+ printf("\n");
+ printf(" -w <width> Width of surface (default is 1920)\n");
+ printf(" -h <height> Height of surface (default is 1080)\n");
+ printf(" -l <0/1> Clear surface every frame (0=no, 1=yes, default is 0)\n");
+ printf(" -s <0/1> Use supertile layout (0=no, 1=yes, default is 0)\n");
+ printf(" -t <0/1> Enable TS (0=no, 1=yes, default is 1)\n");
+ printf(" -e <0/1> Enable early Z (0=no, 1=yes, default is 0)\n");
+ printf(" -f <frames> Number of frames to render (default is 2000)\n");
+ printf(" -d <0/16/32> Depth/stencil surface depth\n");
+ printf(" -c <16/32> Color surface depth\n");
+ exit(1);
+ }
+
+ struct fbdemos_scaffold *fbs = 0;
+ fbdemo_init(&fbs);
+ struct pipe_context *pipe = fbs->pipe;
+ /* resources */
+ struct pipe_resource *rt_resource = NULL;
+ struct pipe_resource *z_resource = NULL;
+ if(!super_tiled)
+ etna_mesa_debug |= ETNA_DBG_NO_SUPERTILE;
+ if(!enable_ts)
+ etna_mesa_debug |= ETNA_DBG_NO_TS;
+ if(!early_z)
+ etna_mesa_debug |= ETNA_DBG_NO_EARLY_Z;
+
+ if(fmt_rt != PIPE_FORMAT_NONE)
+ rt_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, fmt_rt, width, height, 0);
+ if(fmt_zs != PIPE_FORMAT_NONE)
+ z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, fmt_zs, width, height, 0);
+ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, sizeof(vVertices));
+
+ /* vertex / index buffer setup */
+ struct pipe_transfer *vtx_transfer = 0;
+ float *vtx_logical = pipe_buffer_map(pipe, vtx_resource, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_UNSYNCHRONIZED, &vtx_transfer);
+ assert(vtx_logical);
+ memcpy(vtx_logical, vVertices, sizeof(vVertices));
+ pipe_buffer_unmap(pipe, vtx_transfer);
+
+ struct pipe_vertex_buffer vertex_buf_desc = {
+ .stride = VERTEX_STRIDE*4,
+ .buffer_offset = 0,
+ .buffer = vtx_resource,
+ .user_buffer = 0
+ };
+ struct pipe_vertex_element pipe_vertex_elements[] = {
+ { /* positions */
+ .src_offset = 0*4,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32A32_FLOAT
+ },
+ { /* texcoord */
+ .src_offset = 4*4,
+ .instance_divisor = 0,
+ .vertex_buffer_index = 0,
+ .src_format = PIPE_FORMAT_R32G32B32A32_FLOAT
+ },
+ };
+ void *vertex_elements = pipe->create_vertex_elements_state(pipe,
+ sizeof(pipe_vertex_elements)/sizeof(pipe_vertex_elements[0]), pipe_vertex_elements);
+
+ /* compile gallium3d states */
+ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) {
+ .rt[0] = {
+ .blend_enable = 0,
+ .rgb_func = PIPE_BLEND_ADD,
+ .rgb_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .rgb_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA,
+ .alpha_func = PIPE_BLEND_ADD,
+ .alpha_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA,
+ .alpha_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA,
+ .colormask = 0xf
+ }
+ });
+
+ void *sampler = pipe->create_sampler_state(pipe, &(struct pipe_sampler_state) {
+ .wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE,
+ .min_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .min_mip_filter = PIPE_TEX_MIPFILTER_LINEAR,
+ .mag_img_filter = PIPE_TEX_FILTER_LINEAR,
+ .normalized_coords = 1,
+ .lod_bias = 0.0f,
+ .min_lod = 0.0f, .max_lod=1000.0f
+ });
+
+ void *rasterizer = pipe->create_rasterizer_state(pipe, &(struct pipe_rasterizer_state){
+ .flatshade = 0,
+ .light_twoside = 1,
+ .clamp_vertex_color = 1,
+ .clamp_fragment_color = 1,
+ .front_ccw = 0,
+ .cull_face = PIPE_FACE_NONE, /**< PIPE_FACE_x */
+ .fill_front = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .fill_back = PIPE_POLYGON_MODE_FILL, /**< PIPE_POLYGON_MODE_x */
+ .offset_point = 0,
+ .offset_line = 0,
+ .offset_tri = 0,
+ .scissor = 0,
+ .poly_smooth = 1,
+ .poly_stipple_enable = 0,
+ .point_smooth = 0,
+ .sprite_coord_mode = 0, /**< PIPE_SPRITE_COORD_ */
+ .point_quad_rasterization = 0, /** points rasterized as quads or points */
+ .point_size_per_vertex = 0, /**< size computed in vertex shader */
+ .multisample = 0,
+ .line_smooth = 0,
+ .line_stipple_enable = 0,
+ .line_last_pixel = 0,
+ .flatshade_first = 0,
+ .half_pixel_center = 1,
+ .rasterizer_discard = 0,
+ .depth_clip = 0,
+ .clip_plane_enable = 0,
+ .line_stipple_factor = 0,
+ .line_stipple_pattern = 0,
+ .sprite_coord_enable = 0,
+ .line_width = 1.0f,
+ .point_size = 1.0f,
+ .offset_units = 0.0f,
+ .offset_scale = 0.0f,
+ .offset_clamp = 0.0f
+ });
+
+ struct pipe_surface *cbuf = NULL;
+ struct pipe_surface *zsbuf = NULL;
+ if(rt_resource != NULL)
+ {
+ cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){
+ .texture = rt_resource,
+ .format = rt_resource->format,
+ .u.tex.level = 0
+ });
+ }
+ if(z_resource != NULL)
+ {
+ zsbuf = pipe->create_surface(pipe, z_resource, &(struct pipe_surface){
+ .texture = z_resource,
+ .format = z_resource->format,
+ .u.tex.level = 0
+ });
+ }
+
+ pipe->bind_blend_state(pipe, blend);
+ pipe->bind_fragment_sampler_states(pipe, 1, &sampler);
+ pipe->bind_rasterizer_state(pipe, rasterizer);
+ pipe->bind_vertex_elements_state(pipe, vertex_elements);
+
+ pipe->set_blend_color(pipe, &(struct pipe_blend_color){
+ .color = {0.0f,0.0f,0.0f,1.0f}
+ });
+ pipe->set_stencil_ref(pipe, &(struct pipe_stencil_ref){
+ .ref_value[0] = 0xff,
+ .ref_value[1] = 0xff
+ });
+ pipe->set_sample_mask(pipe, 0xf);
+ pipe->set_framebuffer_state(pipe, &(struct pipe_framebuffer_state){
+ .width = width,
+ .height = height,
+ .nr_cbufs = (cbuf == NULL) ? 0 : 1,
+ .cbufs[0] = cbuf,
+ .zsbuf = zsbuf
+ });
+ pipe->set_scissor_states(pipe, 0, 1, &(struct pipe_scissor_state){
+ .minx = 0,
+ .miny = 0,
+ .maxx = 65535,
+ .maxy = 65535
+ });
+ pipe->set_viewport_states(pipe, 0, 1, &(struct pipe_viewport_state){
+ .scale = {width/2.0f, height/2.0f, 0.5f, 1.0f},
+ .translate = {width/2.0f, height/2.0f, 0.5f, 1.0f}
+ });
+
+ pipe->set_vertex_buffers(pipe, 0, 1, &vertex_buf_desc);
+
+ void *vtx_shader = graw_parse_vertex_shader(pipe, simple_vs);
+ if(vtx_shader == NULL)
+ {
+ printf("Could not parse vertex shader\n");
+ exit(1);
+ }
+ void *frag_shader = graw_parse_fragment_shader(pipe, simple_fs);
+ if(frag_shader == NULL)
+ {
+ printf("Could not parse fragment shader\n");
+ exit(1);
+ }
+ pipe->bind_vs_state(pipe, vtx_shader);
+ pipe->bind_fs_state(pipe, frag_shader);
+
+ void *dsa_bigquad = pipe->create_depth_stencil_alpha_state(pipe, &(struct pipe_depth_stencil_alpha_state){
+ .depth = {
+ .enabled = 0,
+ .writemask = (fmt_zs != PIPE_FORMAT_NONE), /* write only to depth if enabled */
+ .func = PIPE_FUNC_LESS /* GL default */
+ },
+ .stencil[0] = { .enabled = 0 },
+ .stencil[1] = { .enabled = 0 },
+ .alpha = { .enabled = 0 }
+ });
+
+ pipe->bind_depth_stencil_alpha_state(pipe, dsa_bigquad);
+
+ /* Read out and reset profile counters */
+ int num_profile_counters = viv_get_num_profile_counters();
+ bool *reset_after_read = calloc(num_profile_counters, sizeof(bool));
+ uint32_t *counter_data = calloc(num_profile_counters, 4);
+ uint32_t *counter_data_initial = calloc(num_profile_counters, 4);
+ if(viv_read_profile_counters_3d(fbs->conn, counter_data_initial) != 0)
+ {
+ fprintf(stderr, "Error querying counters (probably unsupported with this kernel, or not built into libetnaviv)\n");
+ }
+ viv_get_counters_reset_after_read(fbs->conn, reset_after_read);
+
+ uint64_t start_time = gettime();
+ printf("Timing...\n");
+ for(int frame=0; frame<num_frames; ++frame)
+ {
+ if(do_clear)
+ {
+ /* Clear render target */
+ pipe->clear(pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL, &(const union pipe_color_union) {
+ .f = {0.2, 0.2, 0.2, 1.0}
+ }, 0.75f, 0x01);
+ }
+
+ pipe->draw_vbo(pipe, &(struct pipe_draw_info){
+ .indexed = 0,
+ .mode = PIPE_PRIM_TRIANGLE_FAN,
+ .start = 0,
+ .count = 4 });
+ /* flush cache to make sure we're really writing to memory */
+ etna_set_state(fbs->ctx, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
+ etna_stall(fbs->ctx, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
+ }
+ etna_finish(fbs->ctx);
+ if(viv_read_profile_counters_3d(fbs->conn, counter_data) != 0)
+ {
+ fprintf(stderr, "Error querying counters (probably unsupported with this kernel, or not built into libetnaviv)\n");
+ }
+ uint64_t end_time = gettime();
+ uint64_t diff_time = end_time - start_time;
+ uint32_t screen_size = 0;
+ if(fmt_rt != PIPE_FORMAT_NONE)
+ screen_size += width * height * util_format_get_blocksize(fmt_rt);
+ if(fmt_zs != PIPE_FORMAT_NONE)
+ screen_size += width * height * util_format_get_blocksize(fmt_zs);
+ printf("Input\n");
+ printf(" Frame: %i x %i\n", width, height);
+ printf(" Color format: %s\n", util_format_name(fmt_rt));
+ printf(" Depth format: %s\n", util_format_name(fmt_zs));
+ printf(" Supertiled: %i\n", super_tiled);
+ printf(" Enable TS: %i\n", enable_ts);
+ printf(" Early z: %i\n", early_z);
+ printf(" Do clear: %i\n", do_clear);
+ printf(" Num frames: %i\n", num_frames);
+ printf(" Frame size: %.1f MB\n", (double)screen_size / 1e6);
+ printf("Statistics:\n");
+ printf(" Elapsed time: %.2fs\n", (double)diff_time * 1e-6);
+ printf(" FPS: %.1f\n", (double)num_frames / ((double)diff_time * 1e-6));
+ printf(" Fillrate: %.1f MB/s\n", (double)num_frames * (double)screen_size / (double)diff_time);
+ printf(" Vertices rendered: %i\n", counter_data[VIV_PROF_RENDERED_VERTICE_COUNTER]);
+ printf(" Pixels rendered: %i\n", counter_data[VIV_PROF_RENDERED_PIXEL_COUNTER]);
+ printf(" VS instructions: %i\n", counter_data[VIV_PROF_VS_INST_COUNTER]);
+ printf(" PS instructions: %i\n", counter_data[VIV_PROF_PS_INST_COUNTER]);
+ printf(" Read: %.1f MB/frame\n", (double)counter_data[VIV_PROF_GPU_TOTAL_READ_64_BIT] * 8 / 1e6 / num_frames);
+ printf(" Written: %.1f MB/frame\n", (double)counter_data[VIV_PROF_GPU_TOTAL_WRITE_64_BIT] * 8 / 1e6 / num_frames);
+ printf(" Stalls on read: %.1fM/frame\n", counter_data[VIV_PROF_HI_AXI_CYCLES_READ_REQUEST_STALLED] / 1e6 / num_frames);
+ printf(" Stalls on write request: %.1fM/frame\n", counter_data[VIV_PROF_HI_AXI_CYCLES_WRITE_REQUEST_STALLED] / 1e6 / num_frames);
+ printf(" Stalls on write data: %.1fM/frame\n", counter_data[VIV_PROF_HI_AXI_CYCLES_WRITE_DATA_STALLED] / 1e6 / num_frames);
+
+ fbdemo_free(fbs);
+ return 0;
+}
+
diff --git a/src/utils/viv_watch.c b/src/utils/viv_watch.c
new file mode 100644
index 0000000..6fa6cd3
--- /dev/null
+++ b/src/utils/viv_watch.c
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2012-2013 Etnaviv Project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/* Watch GPU debug registers */
+/* Important: Needs kernel module compiled with user space register access
+ * (gcdREGISTER_ACCESS_FROM_USER=1) */
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <etnaviv/viv.h>
+#include "gc_hal.h"
+
+struct viv_conn *conn = 0;
+
+static const char clear_screen[] = {0x1b, '[', 'H',
+ 0x1b, '[', 'J',
+ 0x0};
+static const char color_num_zero[] = "\x1b[1;30m";
+static const char color_num[] = "\x1b[1;33m";
+static const char color_head[] = "\x1b[1;37;100m";
+static const char color_reset[] = "\x1b[0m";
+
+static void write_register(uint32_t address, uint32_t data)
+{
+ gcsHAL_INTERFACE id;
+ id.command = gcvHAL_WRITE_REGISTER;
+ id.u.WriteRegisterData.address = address;
+ id.u.WriteRegisterData.data = data;
+ if(viv_invoke(conn, &id) != VIV_STATUS_OK)
+ {
+ perror("Ioctl error");
+ exit(1);
+ }
+}
+
+static uint32_t read_register(uint32_t address)
+{
+ gcsHAL_INTERFACE id;
+ id.command = gcvHAL_READ_REGISTER;
+ id.u.ReadRegisterData.address = address;
+ if(viv_invoke(conn, &id) != VIV_STATUS_OK)
+ {
+ perror("Ioctl error");
+ exit(1);
+ }
+ return id.u.ReadRegisterData.data;
+}
+
+struct debug_register
+{
+ const char *module;
+ uint32_t select_reg;
+ uint32_t select_shift;
+ uint32_t read_reg;
+ uint32_t count;
+ uint32_t signature;
+};
+
+/* XXX possible to select/clear four debug registers at a time? this would
+ * avoid writes.
+ */
+static struct debug_register debug_registers[] =
+{
+ { "RA", 0x474, 16, 0x448, 16, 0x12344321 },
+ { "TX", 0x474, 24, 0x44C, 16, 0x12211221 },
+ { "FE", 0x470, 0, 0x450, 16, 0xBABEF00D },
+ { "PE", 0x470, 16, 0x454, 16, 0xBABEF00D },
+ { "DE", 0x470, 8, 0x458, 16, 0xBABEF00D },
+ { "SH", 0x470, 24, 0x45C, 16, 0xDEADBEEF },
+ { "PA", 0x474, 0, 0x460, 16, 0x0000AAAA },
+ { "SE", 0x474, 8, 0x464, 16, 0x5E5E5E5E },
+ { "MC", 0x478, 0, 0x468, 16, 0x12345678 },
+ { "HI", 0x478, 8, 0x46C, 16, 0xAAAAAAAA }
+};
+#define NUM_MODULES (sizeof(debug_registers) / sizeof(struct debug_register))
+#define MAX_COUNT 16
+
+int main()
+{
+ int rv = 0;
+ rv = viv_open(VIV_HW_3D, &conn);
+ if(rv!=0)
+ {
+ fprintf(stderr, "Error opening device\n");
+ exit(1);
+ }
+
+ uint32_t counters[NUM_MODULES][MAX_COUNT] = {{}};
+ uint32_t counters_prev[NUM_MODULES][MAX_COUNT] = {{}};
+ int interval = 1000000;
+ int reset = 0; /* reset counters after read */
+
+ int has_prev = 0;
+ while(true)
+ {
+ printf("%s", clear_screen);
+ for(unsigned int rid=0; rid<NUM_MODULES; ++rid)
+ {
+ struct debug_register *rdesc = &debug_registers[rid];
+ for(unsigned int sid=0; sid<15; ++sid)
+ {
+ write_register(rdesc->select_reg, sid << rdesc->select_shift);
+ counters[rid][sid] = read_register(rdesc->read_reg);
+ }
+ if(reset)
+ {
+ write_register(rdesc->select_reg, 15 << rdesc->select_shift);
+ counters[rid][15] = read_register(rdesc->read_reg);
+ }
+ write_register(debug_registers[rid].select_reg, 0 << rdesc->select_shift);
+ }
+
+ printf("%s ", color_head);
+ for(unsigned int rid=0; rid<NUM_MODULES; ++rid)
+ {
+ printf(" %-2s ", debug_registers[rid].module);
+ }
+ printf("%s\n",color_reset);
+ for(unsigned int sid=0; sid<MAX_COUNT ; ++sid)
+ {
+ printf("%s%01x%s ", color_head, sid, color_reset);
+ for(unsigned int rid=0; rid<NUM_MODULES; ++rid)
+ {
+ const char *color = "";
+ if(has_prev && counters[rid][sid] != counters_prev[rid][sid])
+ color = color_num;
+ printf("%s%08x%s ", color, counters[rid][sid], color_reset);
+ }
+ printf("\n");
+ }
+ usleep(interval);
+
+ for(unsigned int rid=0; rid<NUM_MODULES; ++rid)
+ for(unsigned int sid=0; sid<MAX_COUNT; ++sid)
+ counters_prev[rid][sid] = counters[rid][sid];
+ has_prev = 1;
+ }
+
+ viv_close(conn);
+ return 0;
+}
+